feat(host): generate dist/index.html for Pulsar CEF + browser hosts#2
Merged
ClodoCapeo merged 1 commit intomainfrom May 2, 2026
Merged
feat(host): generate dist/index.html for Pulsar CEF + browser hosts#2ClodoCapeo merged 1 commit intomainfrom
ClodoCapeo merged 1 commit intomainfrom
Conversation
Solar is a library bundle, but the broadcast host (Pulsar CEF, also the editor preview iframe) loads it as a static URL — it needs an HTML entry that imports solar.js, reads URL query params, and calls mount(). Vite's library mode strips index.html ; this PR adds a postbuild script that generates dist/index.html with an inline ES module bootstrap mirroring the dev-entry harness, but production- ready (defaults to broadcast mode, no test-token, console.error only — no chrome on the broadcast surface). The HTML is 1992 bytes raw, references ./solar.js relatively so any host that serves the unpacked tarball at a path can load it without template substitution. Bumps to v0.1.1 ; release workflow on tag push will publish the updated tarball with index.html alongside the chunks.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
index.html. The broadcast host (Pulsar CEF, editor preview iframe) needs one to loadsolar.jsand callmount().scripts/build-host-html.mjs— a postbuild step that generatesdist/index.htmlwith an inline ES-module bootstrap mirroringsrc/dev-entry.tsxbut production-defaulted (broadcast mode, no test token,console.erroronly).v0.1.1. Tagv0.1.1after merge → release workflow publishes the new tarball.Why now
Wave 4 Pulsar wiring loads
https://<gate>/orion/static/solar/v{N}/index.html?orion=...&token=...&mode=broadcast(chantier-pulsar-wiring § Scope > URL acceptance contract). Withoutindex.htmlthe URL contract is unfulfilled.The Vite config already documented this gap inline:
This PR closes that follow-up.
Test plan
npm run lintcleannpm run typecheckcleannpm test43/43npm run buildproducesdist/index.html(1992 B) alongside the JS chunksnpm run check:bundlestill passes (the host HTML is not gz-budgeted — it's a separate static file)v0.1.1after merge → release workflow publishessolar-v0.1.1.tgzwithindex.htmlincluded🤖 Generated with Claude Code