fix(http-loader): survive the Network permission prompt on first time physical install#393
fix(http-loader): survive the Network permission prompt on first time physical install#393NathanWalker wants to merge 5 commits into
Conversation
NathanWalker
commented
Jun 17, 2026
- Strategy to aid the first time install of hmr dev sessions on physical devices which will do a 1 time network permission prompt before beginning the boot loader
Adds the Hot Module Replacement runtime layer plus the supporting ESM resolver hardening and dev-session globals that make hot reload viable on iOS.
* `import.meta.hot`: `data`, `accept`, `dispose`, `prune`,
`decline`, `invalidate`, `on`/`off`/`send` event surface.
* Dev-session globals (`__nsStartDevSession`, `__nsReloadDevApp`,
`__nsInvalidateModules`, `__nsRunHmrDispose`, `__nsRunHmrPrune`,
`__nsKickstartHmrPrefetch`, `__nsGetLoadedModuleUrls`,
`__nsApplyStyleUpdate`, `__nsConfigureDevRuntime`,
`__nsTerminateAllWorkers`).
* Speculative HTTP module prefetch with canonical-key normalization so
`__ns_hmr__/v<N>` and `__ns_boot__/b<N>` tag prefixes share `hot.data`
identity across reload cycles.
* ESM resolver hardening in `ModuleInternalCallbacks.mm` to:
- Preserve synthetic-namespace identity (`ns-vendor://`,
`optional:`, `node:`, `blob:`) — these are NOT filesystem paths.
- Handle HTTP/HTTPS module URLs end-to-end (resolution, fetch,
canonical-key collapse, dynamic import).
- Compile `.json` imports into synthetic ES modules.
* `NodeBuiltinsAndOptionalModulesTests.mjs`, `HttpEsmLoaderTests.js`,
`hot-data-ext.{js,mjs}` test fixtures, plus integration wiring in
`TestRunnerTests.swift` and the Jasmine boot harness.
…nstall, true off-main fetches, and unified volatile-URL registry identity For HMR dev sessions with physical devices.
|
Important Review skippedDraft detected. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
Noting that this is not a guarantee and just a potential direction on handling. Something similar to this direction.may work. It some cases this would resolve it, others not so it's timing related largely. |
2c5d877 to
6dfbacd
Compare