@nativescript/vite 8.0.0-alpha.5 → 8.0.0-alpha.51

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (424) hide show
  1. package/README.md +51 -11
  2. package/bin/cli.cjs +8 -14
  3. package/configuration/angular.d.ts +34 -1
  4. package/configuration/angular.js +376 -165
  5. package/configuration/angular.js.map +1 -1
  6. package/configuration/base.js +241 -51
  7. package/configuration/base.js.map +1 -1
  8. package/configuration/javascript.js +14 -93
  9. package/configuration/javascript.js.map +1 -1
  10. package/configuration/react.js +41 -73
  11. package/configuration/react.js.map +1 -1
  12. package/configuration/solid.js +51 -6
  13. package/configuration/solid.js.map +1 -1
  14. package/configuration/typescript.js +12 -93
  15. package/configuration/typescript.js.map +1 -1
  16. package/helpers/app-components.d.ts +2 -1
  17. package/helpers/app-components.js.map +1 -1
  18. package/helpers/app-css-state.d.ts +8 -0
  19. package/helpers/app-css-state.js +8 -0
  20. package/helpers/app-css-state.js.map +1 -0
  21. package/helpers/bundler-context.d.ts +11 -0
  22. package/helpers/bundler-context.js +71 -0
  23. package/helpers/bundler-context.js.map +1 -0
  24. package/helpers/cli-flags.d.ts +12 -0
  25. package/helpers/cli-flags.js +34 -0
  26. package/helpers/cli-flags.js.map +1 -1
  27. package/helpers/css-platform-plugin.d.ts +14 -0
  28. package/helpers/css-platform-plugin.js +43 -25
  29. package/helpers/css-platform-plugin.js.map +1 -1
  30. package/helpers/dev-host.d.ts +360 -0
  31. package/helpers/dev-host.js +694 -0
  32. package/helpers/dev-host.js.map +1 -0
  33. package/helpers/dynamic-import-plugin.js +1 -1
  34. package/helpers/dynamic-import-plugin.js.map +1 -1
  35. package/helpers/esbuild-platform-resolver.js +4 -1
  36. package/helpers/esbuild-platform-resolver.js.map +1 -1
  37. package/helpers/external-configs.d.ts +10 -12
  38. package/helpers/external-configs.js +58 -35
  39. package/helpers/external-configs.js.map +1 -1
  40. package/helpers/global-defines.d.ts +142 -0
  41. package/helpers/global-defines.js +213 -11
  42. package/helpers/global-defines.js.map +1 -1
  43. package/helpers/hmr-scope.d.ts +26 -0
  44. package/helpers/hmr-scope.js +67 -0
  45. package/helpers/hmr-scope.js.map +1 -0
  46. package/helpers/init.js +0 -18
  47. package/helpers/init.js.map +1 -1
  48. package/helpers/logging.d.ts +1 -0
  49. package/helpers/logging.js +65 -4
  50. package/helpers/logging.js.map +1 -1
  51. package/helpers/main-entry.d.ts +3 -1
  52. package/helpers/main-entry.js +301 -53
  53. package/helpers/main-entry.js.map +1 -1
  54. package/helpers/nativeclass-esbuild-plugin.d.ts +2 -1
  55. package/helpers/nativeclass-esbuild-plugin.js.map +1 -1
  56. package/helpers/nativeclass-transform.js +5 -6
  57. package/helpers/nativeclass-transform.js.map +1 -1
  58. package/helpers/nativeclass-transformer-plugin.d.ts +9 -2
  59. package/helpers/nativeclass-transformer-plugin.js +157 -14
  60. package/helpers/nativeclass-transformer-plugin.js.map +1 -1
  61. package/helpers/nativescript-package-resolver.js +10 -62
  62. package/helpers/nativescript-package-resolver.js.map +1 -1
  63. package/helpers/normalize-id.d.ts +42 -0
  64. package/helpers/normalize-id.js +60 -0
  65. package/helpers/normalize-id.js.map +1 -0
  66. package/helpers/ns-core-url.d.ts +29 -7
  67. package/helpers/ns-core-url.js +69 -12
  68. package/helpers/ns-core-url.js.map +1 -1
  69. package/helpers/optimize-deps.d.ts +16 -0
  70. package/helpers/optimize-deps.js +17 -0
  71. package/helpers/optimize-deps.js.map +1 -0
  72. package/helpers/package-platform-aliases.js +34 -49
  73. package/helpers/package-platform-aliases.js.map +1 -1
  74. package/helpers/platform-types.d.ts +2 -0
  75. package/helpers/platform-types.js +2 -0
  76. package/helpers/platform-types.js.map +1 -0
  77. package/helpers/postcss-platform-config.d.ts +17 -1
  78. package/helpers/postcss-platform-config.js +20 -37
  79. package/helpers/postcss-platform-config.js.map +1 -1
  80. package/helpers/project.d.ts +35 -0
  81. package/helpers/project.js +120 -2
  82. package/helpers/project.js.map +1 -1
  83. package/helpers/resolve-main-field-platform.d.ts +20 -0
  84. package/helpers/resolve-main-field-platform.js +49 -0
  85. package/helpers/resolve-main-field-platform.js.map +1 -0
  86. package/helpers/resolver.js +17 -2
  87. package/helpers/resolver.js.map +1 -1
  88. package/helpers/theme-core-plugins.js +1 -1
  89. package/helpers/theme-core-plugins.js.map +1 -1
  90. package/helpers/ts-config-paths.d.ts +14 -0
  91. package/helpers/ts-config-paths.js +90 -9
  92. package/helpers/ts-config-paths.js.map +1 -1
  93. package/helpers/typescript-check.d.ts +2 -1
  94. package/helpers/typescript-check.js +2 -2
  95. package/helpers/typescript-check.js.map +1 -1
  96. package/helpers/ui-registration.d.ts +21 -0
  97. package/helpers/ui-registration.js +156 -0
  98. package/helpers/ui-registration.js.map +1 -0
  99. package/helpers/utils.d.ts +9 -0
  100. package/helpers/utils.js +22 -2
  101. package/helpers/utils.js.map +1 -1
  102. package/helpers/workers.d.ts +20 -19
  103. package/helpers/workers.js +624 -4
  104. package/helpers/workers.js.map +1 -1
  105. package/hmr/client/css-handler.d.ts +2 -1
  106. package/hmr/client/css-handler.js +50 -26
  107. package/hmr/client/css-handler.js.map +1 -1
  108. package/hmr/client/css-update-overlay.d.ts +18 -0
  109. package/hmr/client/css-update-overlay.js +27 -0
  110. package/hmr/client/css-update-overlay.js.map +1 -0
  111. package/hmr/client/framework-client-strategy.d.ts +79 -0
  112. package/hmr/client/framework-client-strategy.js +19 -0
  113. package/hmr/client/framework-client-strategy.js.map +1 -0
  114. package/hmr/client/hmr-pending-overlay.d.ts +13 -0
  115. package/hmr/client/hmr-pending-overlay.js +60 -0
  116. package/hmr/client/hmr-pending-overlay.js.map +1 -0
  117. package/hmr/client/index.js +891 -220
  118. package/hmr/client/index.js.map +1 -1
  119. package/hmr/client/utils.d.ts +7 -1
  120. package/hmr/client/utils.js +207 -29
  121. package/hmr/client/utils.js.map +1 -1
  122. package/hmr/entry-runtime.d.ts +2 -1
  123. package/hmr/entry-runtime.js +256 -69
  124. package/hmr/entry-runtime.js.map +1 -1
  125. package/hmr/frameworks/angular/build/angular-linker.d.ts +12 -0
  126. package/hmr/frameworks/angular/build/angular-linker.js +109 -0
  127. package/hmr/frameworks/angular/build/angular-linker.js.map +1 -0
  128. package/hmr/frameworks/angular/build/inject-component-hmr-registration.d.ts +112 -0
  129. package/hmr/frameworks/angular/build/inject-component-hmr-registration.js +291 -0
  130. package/hmr/frameworks/angular/build/inject-component-hmr-registration.js.map +1 -0
  131. package/hmr/frameworks/angular/build/inject-hmr-vite-ignore.d.ts +75 -0
  132. package/hmr/frameworks/angular/build/inject-hmr-vite-ignore.js +221 -0
  133. package/hmr/frameworks/angular/build/inject-hmr-vite-ignore.js.map +1 -0
  134. package/{helpers/angular → hmr/frameworks/angular/build}/inline-decorator-component-templates.js +1 -170
  135. package/hmr/frameworks/angular/build/inline-decorator-component-templates.js.map +1 -0
  136. package/hmr/frameworks/angular/build/js-lexer.d.ts +4 -0
  137. package/{helpers/angular/synthesize-decorator-ctor-parameters.js → hmr/frameworks/angular/build/js-lexer.js} +22 -96
  138. package/hmr/frameworks/angular/build/js-lexer.js.map +1 -0
  139. package/hmr/frameworks/angular/build/shared-linker.d.ts +39 -0
  140. package/hmr/frameworks/angular/build/shared-linker.js +128 -0
  141. package/hmr/frameworks/angular/build/shared-linker.js.map +1 -0
  142. package/hmr/frameworks/angular/build/synthesize-decorator-ctor-parameters.js +88 -0
  143. package/hmr/frameworks/angular/build/synthesize-decorator-ctor-parameters.js.map +1 -0
  144. package/{helpers/angular → hmr/frameworks/angular/build}/synthesize-injectable-factories.js +1 -174
  145. package/hmr/frameworks/angular/build/synthesize-injectable-factories.js.map +1 -0
  146. package/{helpers/angular → hmr/frameworks/angular/build}/util.d.ts +1 -0
  147. package/hmr/frameworks/angular/build/util.js +155 -0
  148. package/hmr/frameworks/angular/build/util.js.map +1 -0
  149. package/hmr/frameworks/angular/client/index.d.ts +1 -0
  150. package/hmr/frameworks/angular/client/index.js +859 -21
  151. package/hmr/frameworks/angular/client/index.js.map +1 -1
  152. package/hmr/frameworks/angular/client/strategy.d.ts +9 -0
  153. package/hmr/frameworks/angular/client/strategy.js +19 -0
  154. package/hmr/frameworks/angular/client/strategy.js.map +1 -0
  155. package/hmr/frameworks/angular/server/angular-root-component.d.ts +79 -0
  156. package/hmr/frameworks/angular/server/angular-root-component.js +149 -0
  157. package/hmr/frameworks/angular/server/angular-root-component.js.map +1 -0
  158. package/hmr/frameworks/angular/server/linker.js +1 -4
  159. package/hmr/frameworks/angular/server/linker.js.map +1 -1
  160. package/hmr/frameworks/angular/server/strategy.js +460 -12
  161. package/hmr/frameworks/angular/server/strategy.js.map +1 -1
  162. package/hmr/{server → frameworks/angular/server}/websocket-angular-entry.js +2 -2
  163. package/hmr/frameworks/angular/server/websocket-angular-entry.js.map +1 -0
  164. package/hmr/{server → frameworks/angular/server}/websocket-angular-hot-update.d.ts +17 -11
  165. package/hmr/frameworks/angular/server/websocket-angular-hot-update.js +336 -0
  166. package/hmr/frameworks/angular/server/websocket-angular-hot-update.js.map +1 -0
  167. package/hmr/frameworks/react/server/strategy.d.ts +2 -0
  168. package/hmr/frameworks/react/server/strategy.js +150 -0
  169. package/hmr/frameworks/react/server/strategy.js.map +1 -0
  170. package/hmr/frameworks/solid/build/solid-jsx-deps.d.ts +15 -0
  171. package/hmr/frameworks/solid/build/solid-jsx-deps.js +178 -0
  172. package/hmr/frameworks/solid/build/solid-jsx-deps.js.map +1 -0
  173. package/hmr/frameworks/solid/client/app-runtime.d.ts +54 -0
  174. package/hmr/frameworks/solid/client/app-runtime.js +184 -0
  175. package/hmr/frameworks/solid/client/app-runtime.js.map +1 -0
  176. package/hmr/frameworks/solid/server/strategy.js +291 -16
  177. package/hmr/frameworks/solid/server/strategy.js.map +1 -1
  178. package/hmr/frameworks/typescript/server/strategy.js +38 -14
  179. package/hmr/frameworks/typescript/server/strategy.js.map +1 -1
  180. package/hmr/frameworks/vue/client/dep-propagation.d.ts +36 -0
  181. package/hmr/frameworks/vue/client/dep-propagation.js +101 -0
  182. package/hmr/frameworks/vue/client/dep-propagation.js.map +1 -0
  183. package/hmr/frameworks/vue/client/index.d.ts +8 -0
  184. package/hmr/frameworks/vue/client/index.js +56 -243
  185. package/hmr/frameworks/vue/client/index.js.map +1 -1
  186. package/hmr/frameworks/vue/client/strategy.d.ts +33 -0
  187. package/hmr/frameworks/vue/client/strategy.js +157 -0
  188. package/hmr/frameworks/vue/client/strategy.js.map +1 -0
  189. package/hmr/frameworks/vue/client/vue-sfc-update-overlay.d.ts +49 -0
  190. package/hmr/frameworks/vue/client/vue-sfc-update-overlay.js +142 -0
  191. package/hmr/frameworks/vue/client/vue-sfc-update-overlay.js.map +1 -0
  192. package/hmr/frameworks/vue/server/sfc-route-assemble.d.ts +7 -0
  193. package/hmr/frameworks/vue/server/sfc-route-assemble.js +747 -0
  194. package/hmr/frameworks/vue/server/sfc-route-assemble.js.map +1 -0
  195. package/hmr/frameworks/vue/server/sfc-route-meta.d.ts +7 -0
  196. package/hmr/frameworks/vue/server/sfc-route-meta.js +80 -0
  197. package/hmr/frameworks/vue/server/sfc-route-meta.js.map +1 -0
  198. package/hmr/frameworks/vue/server/sfc-route-serve.d.ts +8 -0
  199. package/hmr/frameworks/vue/server/sfc-route-serve.js +459 -0
  200. package/hmr/frameworks/vue/server/sfc-route-serve.js.map +1 -0
  201. package/hmr/frameworks/vue/server/sfc-route-shared.d.ts +38 -0
  202. package/hmr/frameworks/vue/server/sfc-route-shared.js +48 -0
  203. package/hmr/frameworks/vue/server/sfc-route-shared.js.map +1 -0
  204. package/hmr/frameworks/vue/server/strategy.d.ts +35 -0
  205. package/hmr/frameworks/vue/server/strategy.js +278 -1
  206. package/hmr/frameworks/vue/server/strategy.js.map +1 -1
  207. package/hmr/frameworks/vue/server/websocket-sfc.d.ts +15 -0
  208. package/hmr/frameworks/vue/server/websocket-sfc.js +20 -0
  209. package/hmr/frameworks/vue/server/websocket-sfc.js.map +1 -0
  210. package/hmr/helpers/ast-normalizer.d.ts +3 -1
  211. package/hmr/helpers/ast-normalizer.js +77 -10
  212. package/hmr/helpers/ast-normalizer.js.map +1 -1
  213. package/hmr/helpers/cjs-named-exports.d.ts +23 -0
  214. package/hmr/helpers/cjs-named-exports.js +152 -0
  215. package/hmr/helpers/cjs-named-exports.js.map +1 -0
  216. package/hmr/helpers/package-exports.d.ts +16 -0
  217. package/hmr/helpers/package-exports.js +396 -0
  218. package/hmr/helpers/package-exports.js.map +1 -0
  219. package/hmr/server/constants.js +20 -5
  220. package/hmr/server/constants.js.map +1 -1
  221. package/hmr/server/core-sanitize.d.ts +86 -7
  222. package/hmr/server/core-sanitize.js +170 -45
  223. package/hmr/server/core-sanitize.js.map +1 -1
  224. package/hmr/server/device-transform-helpers.d.ts +24 -0
  225. package/hmr/server/device-transform-helpers.js +408 -0
  226. package/hmr/server/device-transform-helpers.js.map +1 -0
  227. package/hmr/server/framework-strategy.d.ts +108 -11
  228. package/hmr/server/hmr-module-graph.d.ts +37 -0
  229. package/hmr/server/hmr-module-graph.js +214 -0
  230. package/hmr/server/hmr-module-graph.js.map +1 -0
  231. package/hmr/server/import-map.d.ts +11 -2
  232. package/hmr/server/import-map.js +92 -45
  233. package/hmr/server/import-map.js.map +1 -1
  234. package/hmr/server/index.js +7 -16
  235. package/hmr/server/index.js.map +1 -1
  236. package/hmr/server/ns-core-cjs-shape.d.ts +2 -4
  237. package/hmr/server/ns-core-cjs-shape.js +4 -6
  238. package/hmr/server/ns-core-cjs-shape.js.map +1 -1
  239. package/hmr/server/ns-rt-bridge.d.ts +51 -0
  240. package/hmr/server/ns-rt-bridge.js +131 -0
  241. package/hmr/server/ns-rt-bridge.js.map +1 -0
  242. package/hmr/server/ns-rt-route.d.ts +5 -0
  243. package/hmr/server/ns-rt-route.js +38 -0
  244. package/hmr/server/ns-rt-route.js.map +1 -0
  245. package/hmr/server/perf-instrumentation.d.ts +114 -0
  246. package/hmr/server/perf-instrumentation.js +197 -0
  247. package/hmr/server/perf-instrumentation.js.map +1 -0
  248. package/hmr/server/process-code-for-device.d.ts +14 -0
  249. package/hmr/server/process-code-for-device.js +699 -0
  250. package/hmr/server/process-code-for-device.js.map +1 -0
  251. package/hmr/server/require-guard.d.ts +1 -0
  252. package/hmr/server/require-guard.js +12 -0
  253. package/hmr/server/require-guard.js.map +1 -0
  254. package/hmr/server/rewrite-imports.d.ts +2 -0
  255. package/hmr/server/rewrite-imports.js +630 -0
  256. package/hmr/server/rewrite-imports.js.map +1 -0
  257. package/hmr/server/route-helpers.d.ts +7 -0
  258. package/hmr/server/route-helpers.js +13 -0
  259. package/hmr/server/route-helpers.js.map +1 -0
  260. package/hmr/server/server-origin.d.ts +2 -0
  261. package/hmr/server/server-origin.js +83 -0
  262. package/hmr/server/server-origin.js.map +1 -0
  263. package/hmr/server/shared-transform-request.js +13 -7
  264. package/hmr/server/shared-transform-request.js.map +1 -1
  265. package/hmr/server/transform-cache-invalidation.d.ts +37 -0
  266. package/hmr/server/transform-cache-invalidation.js +156 -0
  267. package/hmr/server/transform-cache-invalidation.js.map +1 -0
  268. package/hmr/server/vendor-bare-module-shims.d.ts +4 -0
  269. package/hmr/server/vendor-bare-module-shims.js +80 -0
  270. package/hmr/server/vendor-bare-module-shims.js.map +1 -0
  271. package/hmr/server/vite-plugin.js +78 -42
  272. package/hmr/server/vite-plugin.js.map +1 -1
  273. package/hmr/server/websocket-core-bridge.d.ts +45 -4
  274. package/hmr/server/websocket-core-bridge.js +50 -48
  275. package/hmr/server/websocket-core-bridge.js.map +1 -1
  276. package/hmr/server/websocket-css-hot-update.d.ts +33 -0
  277. package/hmr/server/websocket-css-hot-update.js +65 -0
  278. package/hmr/server/websocket-css-hot-update.js.map +1 -0
  279. package/hmr/server/websocket-device-transform.d.ts +3 -0
  280. package/hmr/server/websocket-device-transform.js +7 -0
  281. package/hmr/server/websocket-device-transform.js.map +1 -0
  282. package/hmr/server/websocket-graph-upsert.d.ts +15 -0
  283. package/hmr/server/websocket-graph-upsert.js +20 -0
  284. package/hmr/server/websocket-graph-upsert.js.map +1 -1
  285. package/hmr/server/websocket-hmr-pending.d.ts +37 -0
  286. package/hmr/server/websocket-hmr-pending.js +55 -0
  287. package/hmr/server/websocket-hmr-pending.js.map +1 -0
  288. package/hmr/server/websocket-hot-update.d.ts +77 -0
  289. package/hmr/server/websocket-hot-update.js +360 -0
  290. package/hmr/server/websocket-hot-update.js.map +1 -0
  291. package/hmr/server/websocket-import-map-route.d.ts +15 -0
  292. package/hmr/server/websocket-import-map-route.js +50 -0
  293. package/hmr/server/websocket-import-map-route.js.map +1 -0
  294. package/hmr/server/websocket-module-bindings.js +3 -3
  295. package/hmr/server/websocket-module-bindings.js.map +1 -1
  296. package/hmr/server/websocket-module-specifiers.d.ts +66 -2
  297. package/hmr/server/websocket-module-specifiers.js +191 -20
  298. package/hmr/server/websocket-module-specifiers.js.map +1 -1
  299. package/hmr/server/websocket-ns-core.d.ts +21 -0
  300. package/hmr/server/websocket-ns-core.js +311 -0
  301. package/hmr/server/websocket-ns-core.js.map +1 -0
  302. package/hmr/server/websocket-ns-entry.d.ts +21 -0
  303. package/hmr/server/websocket-ns-entry.js +164 -0
  304. package/hmr/server/websocket-ns-entry.js.map +1 -0
  305. package/hmr/server/websocket-ns-m-paths.d.ts +1 -1
  306. package/hmr/server/websocket-ns-m-paths.js +58 -13
  307. package/hmr/server/websocket-ns-m-paths.js.map +1 -1
  308. package/hmr/server/websocket-ns-m-request.d.ts +11 -1
  309. package/hmr/server/websocket-ns-m-request.js +18 -25
  310. package/hmr/server/websocket-ns-m-request.js.map +1 -1
  311. package/hmr/server/websocket-ns-m.d.ts +33 -0
  312. package/hmr/server/websocket-ns-m.js +752 -0
  313. package/hmr/server/websocket-ns-m.js.map +1 -0
  314. package/hmr/server/websocket-served-module-helpers.d.ts +49 -3
  315. package/hmr/server/websocket-served-module-helpers.js +403 -87
  316. package/hmr/server/websocket-served-module-helpers.js.map +1 -1
  317. package/hmr/server/websocket-txn.js +2 -8
  318. package/hmr/server/websocket-txn.js.map +1 -1
  319. package/hmr/server/websocket-vendor-unifier.d.ts +0 -1
  320. package/hmr/server/websocket-vendor-unifier.js +4 -9
  321. package/hmr/server/websocket-vendor-unifier.js.map +1 -1
  322. package/hmr/server/websocket.d.ts +8 -39
  323. package/hmr/server/websocket.js +608 -6300
  324. package/hmr/server/websocket.js.map +1 -1
  325. package/hmr/shared/ns-globals.d.ts +118 -0
  326. package/hmr/shared/ns-globals.js +29 -0
  327. package/hmr/shared/ns-globals.js.map +1 -0
  328. package/hmr/shared/protocol.d.ts +145 -0
  329. package/hmr/shared/protocol.js +28 -0
  330. package/hmr/shared/protocol.js.map +1 -0
  331. package/hmr/shared/runtime/boot-placeholder-ui.d.ts +69 -0
  332. package/hmr/shared/runtime/boot-placeholder-ui.js +101 -0
  333. package/hmr/shared/runtime/boot-placeholder-ui.js.map +1 -0
  334. package/hmr/shared/runtime/boot-progress.d.ts +44 -0
  335. package/hmr/shared/runtime/boot-progress.js +133 -0
  336. package/hmr/shared/runtime/boot-progress.js.map +1 -0
  337. package/hmr/shared/runtime/boot-timeline.d.ts +18 -0
  338. package/hmr/shared/runtime/boot-timeline.js +42 -0
  339. package/hmr/shared/runtime/boot-timeline.js.map +1 -0
  340. package/hmr/shared/runtime/browser-runtime-contract.js.map +1 -1
  341. package/hmr/shared/runtime/dev-overlay-snapshots.d.ts +31 -0
  342. package/hmr/shared/runtime/dev-overlay-snapshots.js +324 -0
  343. package/hmr/shared/runtime/dev-overlay-snapshots.js.map +1 -0
  344. package/hmr/shared/runtime/dev-overlay.d.ts +119 -26
  345. package/hmr/shared/runtime/dev-overlay.js +1196 -262
  346. package/hmr/shared/runtime/dev-overlay.js.map +1 -1
  347. package/hmr/shared/runtime/global-scope.d.ts +18 -0
  348. package/hmr/shared/runtime/global-scope.js +21 -0
  349. package/hmr/shared/runtime/global-scope.js.map +1 -0
  350. package/hmr/shared/runtime/hooks.js +2 -1
  351. package/hmr/shared/runtime/hooks.js.map +1 -1
  352. package/hmr/shared/runtime/http-only-boot.js +7 -6
  353. package/hmr/shared/runtime/http-only-boot.js.map +1 -1
  354. package/hmr/shared/runtime/module-provenance.js +4 -6
  355. package/hmr/shared/runtime/module-provenance.js.map +1 -1
  356. package/hmr/shared/runtime/root-placeholder-view.d.ts +19 -0
  357. package/hmr/shared/runtime/root-placeholder-view.js +311 -0
  358. package/hmr/shared/runtime/root-placeholder-view.js.map +1 -0
  359. package/hmr/shared/runtime/root-placeholder.js +393 -200
  360. package/hmr/shared/runtime/root-placeholder.js.map +1 -1
  361. package/hmr/shared/runtime/session-bootstrap.js +168 -4
  362. package/hmr/shared/runtime/session-bootstrap.js.map +1 -1
  363. package/hmr/shared/runtime/vendor-bootstrap.js +3 -10
  364. package/hmr/shared/runtime/vendor-bootstrap.js.map +1 -1
  365. package/hmr/shared/vendor/manifest-collect.d.ts +4 -0
  366. package/hmr/shared/vendor/manifest-collect.js +549 -0
  367. package/hmr/shared/vendor/manifest-collect.js.map +1 -0
  368. package/hmr/shared/vendor/manifest-loader.d.ts +2 -1
  369. package/hmr/shared/vendor/manifest-loader.js +5 -3
  370. package/hmr/shared/vendor/manifest-loader.js.map +1 -1
  371. package/hmr/shared/vendor/manifest.d.ts +1 -7
  372. package/hmr/shared/vendor/manifest.js +84 -819
  373. package/hmr/shared/vendor/manifest.js.map +1 -1
  374. package/hmr/shared/vendor/vendor-device-shim.d.ts +1 -0
  375. package/hmr/shared/vendor/vendor-device-shim.js +208 -0
  376. package/hmr/shared/vendor/vendor-device-shim.js.map +1 -0
  377. package/hmr/shared/vendor/vendor-esbuild-plugins.d.ts +38 -0
  378. package/hmr/shared/vendor/vendor-esbuild-plugins.js +296 -0
  379. package/hmr/shared/vendor/vendor-esbuild-plugins.js.map +1 -0
  380. package/hmr/vendor-bootstrap.d.ts +1 -3
  381. package/hmr/vendor-bootstrap.js +4 -6
  382. package/hmr/vendor-bootstrap.js.map +1 -1
  383. package/index.d.ts +1 -0
  384. package/index.js +5 -0
  385. package/index.js.map +1 -1
  386. package/package.json +61 -11
  387. package/runtime/core-aliases-early.js +25 -55
  388. package/runtime/core-aliases-early.js.map +1 -1
  389. package/shims/react-jsx-runtime.d.ts +4 -0
  390. package/shims/react-jsx-runtime.js +61 -0
  391. package/shims/react-jsx-runtime.js.map +1 -0
  392. package/helpers/angular/angular-linker.d.ts +0 -13
  393. package/helpers/angular/angular-linker.js +0 -194
  394. package/helpers/angular/angular-linker.js.map +0 -1
  395. package/helpers/angular/inline-decorator-component-templates.js.map +0 -1
  396. package/helpers/angular/shared-linker.d.ts +0 -11
  397. package/helpers/angular/shared-linker.js +0 -75
  398. package/helpers/angular/shared-linker.js.map +0 -1
  399. package/helpers/angular/synthesize-decorator-ctor-parameters.js.map +0 -1
  400. package/helpers/angular/synthesize-injectable-factories.js.map +0 -1
  401. package/helpers/angular/util.js +0 -67
  402. package/helpers/angular/util.js.map +0 -1
  403. package/helpers/prelink-angular.d.ts +0 -2
  404. package/helpers/prelink-angular.js +0 -117
  405. package/helpers/prelink-angular.js.map +0 -1
  406. package/hmr/server/websocket-angular-entry.js.map +0 -1
  407. package/hmr/server/websocket-angular-hot-update.js +0 -239
  408. package/hmr/server/websocket-angular-hot-update.js.map +0 -1
  409. package/hmr/server/websocket-ns-m-finalize.d.ts +0 -22
  410. package/hmr/server/websocket-ns-m-finalize.js +0 -88
  411. package/hmr/server/websocket-ns-m-finalize.js.map +0 -1
  412. package/hmr/server/websocket-runtime-compat.d.ts +0 -19
  413. package/hmr/server/websocket-runtime-compat.js +0 -286
  414. package/hmr/server/websocket-runtime-compat.js.map +0 -1
  415. package/hmr/server/websocket-vue-sfc.d.ts +0 -27
  416. package/hmr/server/websocket-vue-sfc.js +0 -1117
  417. package/hmr/server/websocket-vue-sfc.js.map +0 -1
  418. package/transformers/NativeClass/index.d.ts +0 -2
  419. package/transformers/NativeClass/index.js +0 -222
  420. package/transformers/NativeClass/index.js.map +0 -1
  421. /package/{helpers/angular → hmr/frameworks/angular/build}/inline-decorator-component-templates.d.ts +0 -0
  422. /package/{helpers/angular → hmr/frameworks/angular/build}/synthesize-decorator-ctor-parameters.d.ts +0 -0
  423. /package/{helpers/angular → hmr/frameworks/angular/build}/synthesize-injectable-factories.d.ts +0 -0
  424. /package/hmr/{server → frameworks/angular/server}/websocket-angular-entry.d.ts +0 -0
@@ -0,0 +1,360 @@
1
+ /**
2
+ * Canonical resolver for the Vite dev-server origin that a NativeScript
3
+ * device or simulator can actually reach.
4
+ *
5
+ * Why this exists. The Vite dev server commonly binds to `0.0.0.0`
6
+ * (the wildcard "all interfaces" address) so both the host browser and
7
+ * a sibling mobile device can hit it. That bind address is fine for
8
+ * the LISTENING socket — but it is NOT a routable hostname:
9
+ *
10
+ * - iOS Simulator shares the host's network stack, so `localhost` /
11
+ * `127.0.0.1` work from inside the simulator and even `0.0.0.0`
12
+ * sometimes resolves there. The simulator path is forgiving.
13
+ *
14
+ * - Physical iOS / visionOS devices are NOT forgiving: `localhost`
15
+ * on the phone is the phone itself, and there is no iOS analog of
16
+ * `adb reverse` (usbmuxd's `iproxy` forwards host→device only, the
17
+ * wrong direction for a device-side fetch). The first HTTP ESM
18
+ * import in `bundle.mjs` dies with
19
+ * `HTTP import failed: http://localhost:5173/ns/core/xhr (status=0)`
20
+ * before any user code runs. The standard route is the host's LAN IP over
21
+ * a shared network. Because the Simulator shares the host's
22
+ * network stack, it reaches that LAN IP exactly as well as
23
+ * loopback — so iOS/visionOS dev URLs simply USE the LAN IP
24
+ * whenever a LAN NIC is up. One deterministic origin, both
25
+ * targets, no device detection. (We deliberately do NOT probe for
26
+ * attached hardware: `xcrun devicectl` state flaps between
27
+ * `connected` and `available (paired)` for an idle USB/Wi-Fi
28
+ * phone, so any probe-based answer is a coin toss.) `localhost`
29
+ * remains the fallback when no NIC is found, and
30
+ * `NS_HMR_PREFER_LAN_HOST=0` forces loopback for firewalled Macs
31
+ * that block LAN inbound.
32
+ *
33
+ * - Android Emulator runs inside a virtual NIC with NAT (QEMU
34
+ * `slirp`). `0.0.0.0` and `localhost` / `127.0.0.1` refer to the
35
+ * EMULATOR ITSELF, not the development host. Two routable paths
36
+ * exist:
37
+ *
38
+ * (a) `adb reverse tcp:<port> tcp:<port>` — multiplexes the
39
+ * device-side `127.0.0.1:<port>` over the existing ADB
40
+ * transport to the host. This is the PREFERRED path: slirp
41
+ * is famously flaky under burst-connect load and drops
42
+ * ~80% of cold-boot module-loader fetches with
43
+ * `IOException: unexpected end of stream`. The ADB tunnel
44
+ * bypasses slirp entirely and is reliable. We try this
45
+ * automatically — see `tryEnableAdbReverse`. We emit the
46
+ * IPv4 literal `127.0.0.1` instead of `localhost` because
47
+ * Android API 36+ system images periodically ship without
48
+ * a `localhost` mapping in the resolver, and
49
+ * `UnknownHostException` fires before adb-reverse can do
50
+ * its job.
51
+ *
52
+ * (b) `10.0.2.2` (Genymotion: `10.0.3.2`) — slirp's host alias.
53
+ * Used as a fallback when ADB isn't available or the user
54
+ * opted out via `NS_HMR_NO_ADB_REVERSE=1`. Works, just less
55
+ * reliable than the ADB tunnel.
56
+ *
57
+ * - Physical Android devices over USB get the same automatic
58
+ * `adb reverse` treatment as emulators. Over Wi-Fi (no ADB
59
+ * tunnel), the user must opt out of adb reverse via
60
+ * `NS_HMR_NO_ADB_REVERSE=1` and supply a routable host via
61
+ * `NS_HMR_HOST=<ip>` or `NS_HMR_PREFER_LAN_HOST=1`.
62
+ *
63
+ * Without this normalization, `bundle.mjs` ships with statically
64
+ * embedded URLs like `http://0.0.0.0:5173/ns/core/xhr` and the very
65
+ * first dynamic import during Application boot fails with
66
+ * `status=0 (network unreachable)` on Android, killing the runtime
67
+ * before any user code runs.
68
+ *
69
+ * Resolution rules (highest precedence first):
70
+ *
71
+ * 1. `process.env.NS_HMR_HOST` — always wins. CI, tunneled setups,
72
+ * and remote devices use this to point at a known-good origin.
73
+ *
74
+ * 2. A concrete non-wildcard, non-loopback `host` arg — trust the
75
+ * developer's explicit choice (`server.host: '192.168.1.42'`
76
+ * already routes from any device on the LAN).
77
+ *
78
+ * 3. `process.env.NS_HMR_PREFER_LAN_HOST` truthy AND a LAN NIC is
79
+ * detected — emit the LAN IP. Opt-in for physical-device-over-
80
+ * Wi-Fi dev. Also disables the adb-reverse path below so the
81
+ * caller actually gets LAN routing.
82
+ *
83
+ * 4. Wildcard bind (`0.0.0.0`, `::`, `true`, empty) OR Android
84
+ * loopback — emit the platform-appropriate routable address.
85
+ * For Android, we first try `adb reverse tcp:<port> tcp:<port>`
86
+ * and emit `127.0.0.1` on success (bypasses slirp NAT entirely
87
+ * and avoids Android API 36+'s missing-`localhost`-from-resolver
88
+ * bug); on failure we fall back to `10.0.2.2`. iOS/visionOS emit
89
+ * the host's LAN IP when a LAN NIC is up (reachable from both
90
+ * physical devices and the Simulator), otherwise `localhost`.
91
+ * `NS_HMR_PREFER_LAN_HOST=0` forces `localhost`. iOS/visionOS
92
+ * loopback passes through unchanged.
93
+ *
94
+ * Every dev-mode emitter that bakes a URL into `bundle.mjs` or sends
95
+ * one to a device-side fetch site MUST run through this helper so the
96
+ * device receives a single canonical, reachable origin.
97
+ */
98
+ import type { Platform } from './platform-types.js';
99
+ export type DevHostPlatform = Platform;
100
+ /**
101
+ * Per-port cache of `adb reverse` setup attempts. Keyed by port so
102
+ * dev servers that switch ports across restarts get a clean attempt
103
+ * each time. The cache is required because every entry point that
104
+ * embeds a device-reachable URL (the bundle.mjs boot path, the
105
+ * `/ns/core/*` external resolver, the websocket URL emitter, the
106
+ * served-module rewriter) hits `resolveDeviceReachable*` — if we
107
+ * spawned `adb reverse` on every call we'd fork ~half a dozen
108
+ * subprocesses per Vite startup and the cold-boot would slow
109
+ * noticeably.
110
+ *
111
+ * The cache also gives us a stable answer across all consumers: once
112
+ * the first caller learns that adb reverse is available, every later
113
+ * caller in the same process gets the same `localhost`/`10.0.2.2`
114
+ * decision. URL identity is what keeps the iOS HTTP ESM realm from
115
+ * splitting and what keeps the Android HMR client and bundle.mjs
116
+ * pointing at the same origin.
117
+ */
118
+ interface AdbReverseStatus {
119
+ attempted: boolean;
120
+ succeeded: boolean;
121
+ error?: string;
122
+ /** Device serials that successfully received the reverse mapping. */
123
+ devices: string[];
124
+ /**
125
+ * Set when the mapping was established by the NativeScript CLI (it
126
+ * exported `NS_ADB_REVERSE_READY=1`) rather than by this plugin.
127
+ * In that case the plugin never spawned `adb` at all — it simply
128
+ * trusts that `127.0.0.1:<port>` already tunnels to the host. See
129
+ * the CLI-handoff note in `tryEnableAdbReverse`.
130
+ */
131
+ viaCli?: boolean;
132
+ }
133
+ /**
134
+ * Returns the first non-internal IPv4 address on the host machine, or
135
+ * `undefined` if no LAN NIC is up. Pure wrapper around
136
+ * `os.networkInterfaces()` so callers and tests can stub it cleanly.
137
+ */
138
+ export declare function guessLanHost(): string | undefined;
139
+ /**
140
+ * Whether the given host string is a wildcard "all interfaces" bind
141
+ * address rather than a routable hostname. `host` may be the literal
142
+ * string from a Vite config (`'0.0.0.0'`), an empty string, or `'true'`
143
+ * (some older Vite/CLI surfaces stringify the boolean).
144
+ */
145
+ export declare function isWildcardHost(host: string): boolean;
146
+ /**
147
+ * Whether the given host string is loopback. On Android the loopback
148
+ * address is the device itself, NOT the development host — so callers
149
+ * must remap it for Android consumers.
150
+ */
151
+ export declare function isLoopbackHost(host: string): boolean;
152
+ export interface DeviceHostResolution {
153
+ /** Final host string baked into the device-side URL. */
154
+ host: string;
155
+ /**
156
+ * How the value was chosen. `'env'` / `'explicit'` mean the result
157
+ * is locked-in; `'lan'`, `'adb-reverse'`, and `'platform-default'`
158
+ * are fallbacks selected by this helper.
159
+ */
160
+ source: 'env' | 'explicit' | 'lan' | 'adb-reverse' | 'platform-default';
161
+ }
162
+ export interface ResolveDeviceHostOptions {
163
+ /** The raw host value from the Vite config (`server.host`). */
164
+ host?: unknown;
165
+ /** Target device platform. Drives the loopback / wildcard fallback. */
166
+ platform: DevHostPlatform;
167
+ /**
168
+ * Override for `process.env`. Tests pass a fixture object; runtime
169
+ * callers omit this and pick up the ambient process environment.
170
+ */
171
+ env?: NodeJS.ProcessEnv;
172
+ /**
173
+ * Override for `guessLanHost()`. Tests stub a fixed return value;
174
+ * runtime callers omit this and the helper hits real NICs.
175
+ */
176
+ lanHostResolver?: () => string | undefined;
177
+ /**
178
+ * Dev-server port. When set AND `platform === 'android'`, this
179
+ * helper will lazily attempt `adb reverse tcp:<port> tcp:<port>`
180
+ * on first call and, if it succeeds, emit `localhost` instead of
181
+ * `10.0.2.2`. See `tryEnableAdbReverse` for the full rationale.
182
+ *
183
+ * Optional for backwards compatibility — callers that already have
184
+ * the port (which is everyone except a couple of legacy test
185
+ * fixtures) should pass it so Android emulator users get the
186
+ * reliable ADB tunnel path instead of QEMU slirp's flaky NAT.
187
+ */
188
+ port?: number;
189
+ /**
190
+ * Test seam for the adb-reverse subprocess. When passed, this
191
+ * helper uses the injected exec function instead of spawning
192
+ * `child_process.execFileSync`. Runtime callers omit this and pick
193
+ * up the SDK-resolved adb binary (see `resolveAdbPath`).
194
+ */
195
+ adbExec?: AdbExec;
196
+ }
197
+ /**
198
+ * Subprocess shim used by `tryEnableAdbReverse`. Production code
199
+ * routes through `child_process.execFileSync` — argv form, NO
200
+ * `/bin/sh -c` wrapper. That matters for two reasons:
201
+ *
202
+ * 1. On timeout, `execFileSync` signals the actual `adb` child
203
+ * directly. The old `execSync('adb …')` form spawned a shell
204
+ * that spawned adb; killing the shell on timeout ORPHANED the
205
+ * adb grandchild, and a half-handshaked orphan can wedge the
206
+ * adb daemon out from under the CLI's device tracker.
207
+ *
208
+ * 2. No shell means no quoting / `$PATH` surprises — we invoke an
209
+ * absolute, SDK-resolved adb binary (see `resolveAdbPath`) with
210
+ * a literal argv.
211
+ *
212
+ * Tests stub this so the suite can exercise success / failure /
213
+ * "multiple devices" / "no ADB" paths without touching a real
214
+ * Android emulator. The shim receives the resolved adb path and the
215
+ * argv array (e.g. `['-s', 'emulator-5554', 'reverse', …]`).
216
+ */
217
+ export type AdbExec = (adbPath: string, args: string[], opts: {
218
+ timeout: number;
219
+ }) => string;
220
+ /**
221
+ * Resolve the `adb` executable the way the Android SDK tooling does,
222
+ * so the plugin and the NativeScript CLI drive the *same* adb client.
223
+ *
224
+ * Why this is load-bearing. A bare `adb` from `$PATH` is frequently a
225
+ * DIFFERENT version than the one the CLI resolves from the SDK. When
226
+ * two adb *clients* of differing versions talk to the one global adb
227
+ * server (port 5037), the newer client prints
228
+ * `adb server version (NN) doesn't match this client (MM); killing...`
229
+ * and restarts the daemon — severing the CLI's `track-devices` stream
230
+ * and hanging it at "Searching for devices…" forever. Resolving the
231
+ * exact SDK adb eliminates that mismatch.
232
+ *
233
+ * Precedence:
234
+ * 1. `NS_ADB_PATH` — the CLI exports the absolute path to the adb it
235
+ * itself uses. Always wins so the two processes are byte-identical.
236
+ * 2. `$ANDROID_HOME/platform-tools/adb` (+ `.exe` on Windows).
237
+ * 3. `$ANDROID_SDK_ROOT/platform-tools/adb`.
238
+ * 4. Bare `adb` — last-resort PATH lookup (kept only so a machine
239
+ * with adb on PATH but no SDK env still limps along).
240
+ *
241
+ * Candidates from (2)/(3) are existence-checked; a stale env var that
242
+ * points at a missing binary falls through rather than guaranteeing a
243
+ * spawn failure.
244
+ */
245
+ export declare function resolveAdbPath(env?: NodeJS.ProcessEnv): string;
246
+ export interface TryEnableAdbReverseOptions {
247
+ /** Port to forward on both sides of the ADB bridge. */
248
+ port: number;
249
+ /** Override for `process.env`; tests pass a fixture object. */
250
+ env?: NodeJS.ProcessEnv;
251
+ /** Test seam — see `AdbExec`. */
252
+ exec?: AdbExec;
253
+ }
254
+ /**
255
+ * Read-only view of the current `adb reverse` status for a given
256
+ * dev-server port. Returns `undefined` if `tryEnableAdbReverse` has
257
+ * never been called for that port.
258
+ */
259
+ export declare function getAdbReverseStatus(port: number): AdbReverseStatus | undefined;
260
+ /**
261
+ * Test hook — clears the per-port cache so unit tests can exercise
262
+ * fresh "first call" behavior without leaking state between cases.
263
+ * NOT exported from the package barrel; spec files import via the
264
+ * file path directly.
265
+ */
266
+ export declare function __resetAdbReverseCacheForTests(): void;
267
+ /**
268
+ * Try to set up `adb reverse tcp:<port> tcp:<port>` for every
269
+ * connected Android device / emulator so device-side `localhost:port`
270
+ * routes through the ADB transport to the host's dev server.
271
+ *
272
+ * Why this beats `10.0.2.2`. The Android emulator's stock NAT is
273
+ * QEMU's `slirp` user-mode network stack, which is well-known to
274
+ * drop bursts of concurrent TCP setups to the host. In practice this
275
+ * surfaces as ~80% of synchronous module-loader fetches failing with
276
+ * `IOException: unexpected end of stream` — the connection establishes,
277
+ * the request goes out, and then slirp drops the response before
278
+ * okhttp can read the status line. The failures are random per-module
279
+ * across runs, retries help but don't eliminate them, and the symptom
280
+ * masquerades as a server-side bug.
281
+ *
282
+ * `adb reverse` bypasses the emulator NIC entirely — the device-side
283
+ * connection is multiplexed over the existing ADB USB / TCP channel
284
+ * to the host.
285
+ *
286
+ * Caching. The result is cached per-port so repeat callers don't
287
+ * fork extra subprocesses. The cache is keyed on port (not platform)
288
+ * because the wildcard "Android-ness" of the call is already implied
289
+ * by the caller — only Android consumers hit this path.
290
+ *
291
+ * CLI handoff (the preferred path). When the NativeScript CLI drives
292
+ * the run it already owns device discovery, install, and launch — it
293
+ * knows the exact target serial and exactly when the device is ready.
294
+ * In that mode the CLI performs the `adb reverse` itself, with its own
295
+ * SDK-resolved adb, AFTER the device is up, and exports
296
+ * `NS_ADB_REVERSE_READY=1`. Seeing that flag, this function returns a
297
+ * synthetic success WITHOUT spawning adb at all — removing the second,
298
+ * racing adb owner that used to collide with the CLI's device search
299
+ * during cold start. `NS_DEVICE_SERIAL` (the CLI's deploy target) and
300
+ * `NS_ADB_PATH` (the CLI's adb) are honored in the self-managed
301
+ * fallback below for setups where the CLI did NOT pre-wire the reverse.
302
+ *
303
+ * Self-managed hardening (fallback). When `NS_ADB_REVERSE_READY` is
304
+ * absent we still set the mapping ourselves, but defensively:
305
+ * - resolve adb from the SDK (`resolveAdbPath`) — never a bare PATH
306
+ * `adb` that could version-mismatch and kill the CLI's daemon;
307
+ * - `adb start-server` once up front so a cold daemon is owned by a
308
+ * single, version-matched client before anything else touches it;
309
+ * - argv `execFileSync` (no shell) with a child-killing timeout so a
310
+ * hung adb is reaped rather than orphaned;
311
+ * - `wait-for-device` per serial so we don't issue `reverse` against
312
+ * an emulator whose `adbd` hasn't finished coming up.
313
+ *
314
+ * Failure modes (all surface as a cached `succeeded: false`):
315
+ * - `NS_HMR_NO_ADB_REVERSE=1` — explicit opt-out for unusual
316
+ * setups (e.g. Wi-Fi-connected device with no ADB tunnel, CI
317
+ * containers without ADB installed).
318
+ * - `adb` not resolvable / not runnable.
319
+ * - No connected devices — user started Vite before booting the
320
+ * emulator. We do NOT keep retrying after the first failure
321
+ * because the URL is baked into bundle.mjs at config-load time
322
+ * and there's no point in flipping it later.
323
+ * - "more than one device" — fatal for unqualified `adb reverse`,
324
+ * so we target each serial individually with `-s <serial>`. As
325
+ * long as at least one device gets the mapping we treat the whole
326
+ * call as a success.
327
+ */
328
+ export declare function tryEnableAdbReverse(opts: TryEnableAdbReverseOptions): AdbReverseStatus;
329
+ /**
330
+ * Pick the host string a device or simulator can actually reach.
331
+ *
332
+ * See the file-level comment for the full resolution-precedence
333
+ * narrative. Returns the chosen host alongside a `source` tag so
334
+ * callers (and logs) can explain why a given URL was emitted.
335
+ */
336
+ export declare function resolveDeviceReachableHost(opts: ResolveDeviceHostOptions): DeviceHostResolution;
337
+ export interface ResolveDeviceOriginOptions extends ResolveDeviceHostOptions {
338
+ /** Wire protocol; usually 'http' unless `server.https` is set. */
339
+ protocol?: 'http' | 'https';
340
+ /** Server port; defaults to 5173 to match the Vite dev default. */
341
+ port?: number;
342
+ }
343
+ export interface DeviceOriginResolution extends DeviceHostResolution {
344
+ /** Fully assembled `protocol://host:port` string. */
345
+ origin: string;
346
+ protocol: 'http' | 'https';
347
+ port: number;
348
+ }
349
+ /**
350
+ * Convenience wrapper that returns the full `protocol://host:port`
351
+ * origin string alongside the host-resolution metadata. The vast
352
+ * majority of callers want the assembled origin to splice into a
353
+ * `/ns/...` URL, so this saves them the trivial template string.
354
+ *
355
+ * When the resolved host already includes a `:port` suffix (a common
356
+ * shape for `NS_HMR_HOST=tunnel.example.com:5173`), we split it back
357
+ * out so the assembled origin never doubles up the port.
358
+ */
359
+ export declare function resolveDeviceReachableOrigin(opts: ResolveDeviceOriginOptions): DeviceOriginResolution;
360
+ export {};