@nativescript/vite 8.0.0-alpha.6 → 8.0.0-alpha.60

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 (463) 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 +244 -53
  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 +4 -2
  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 +100 -13
  41. package/helpers/global-defines.js +149 -28
  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.js +29 -1
  49. package/helpers/logging.js.map +1 -1
  50. package/helpers/main-entry.d.ts +4 -1
  51. package/helpers/main-entry.js +368 -53
  52. package/helpers/main-entry.js.map +1 -1
  53. package/helpers/nativeclass-esbuild-plugin.d.ts +2 -1
  54. package/helpers/nativeclass-esbuild-plugin.js.map +1 -1
  55. package/helpers/nativeclass-transform.js +5 -6
  56. package/helpers/nativeclass-transform.js.map +1 -1
  57. package/helpers/nativeclass-transformer-plugin.d.ts +9 -2
  58. package/helpers/nativeclass-transformer-plugin.js +157 -14
  59. package/helpers/nativeclass-transformer-plugin.js.map +1 -1
  60. package/helpers/nativescript-package-resolver.js +10 -62
  61. package/helpers/nativescript-package-resolver.js.map +1 -1
  62. package/helpers/normalize-id.d.ts +42 -0
  63. package/helpers/normalize-id.js +60 -0
  64. package/helpers/normalize-id.js.map +1 -0
  65. package/helpers/ns-core-url.d.ts +29 -7
  66. package/helpers/ns-core-url.js +69 -12
  67. package/helpers/ns-core-url.js.map +1 -1
  68. package/helpers/optimize-deps.d.ts +16 -0
  69. package/helpers/optimize-deps.js +17 -0
  70. package/helpers/optimize-deps.js.map +1 -0
  71. package/helpers/package-platform-aliases.js +34 -49
  72. package/helpers/package-platform-aliases.js.map +1 -1
  73. package/helpers/platform-types.d.ts +2 -0
  74. package/helpers/platform-types.js +2 -0
  75. package/helpers/platform-types.js.map +1 -0
  76. package/helpers/postcss-platform-config.d.ts +17 -1
  77. package/helpers/postcss-platform-config.js +20 -37
  78. package/helpers/postcss-platform-config.js.map +1 -1
  79. package/helpers/project.d.ts +35 -0
  80. package/helpers/project.js +120 -2
  81. package/helpers/project.js.map +1 -1
  82. package/helpers/resolve-main-field-platform.d.ts +20 -0
  83. package/helpers/resolve-main-field-platform.js +49 -0
  84. package/helpers/resolve-main-field-platform.js.map +1 -0
  85. package/helpers/resolver.js +17 -2
  86. package/helpers/resolver.js.map +1 -1
  87. package/helpers/theme-core-plugins.js +1 -1
  88. package/helpers/theme-core-plugins.js.map +1 -1
  89. package/helpers/ts-config-paths.d.ts +32 -0
  90. package/helpers/ts-config-paths.js +156 -27
  91. package/helpers/ts-config-paths.js.map +1 -1
  92. package/helpers/typescript-check.d.ts +2 -1
  93. package/helpers/typescript-check.js +2 -2
  94. package/helpers/typescript-check.js.map +1 -1
  95. package/helpers/ui-registration.d.ts +21 -0
  96. package/helpers/ui-registration.js +156 -0
  97. package/helpers/ui-registration.js.map +1 -0
  98. package/helpers/utils.d.ts +9 -0
  99. package/helpers/utils.js +22 -2
  100. package/helpers/utils.js.map +1 -1
  101. package/helpers/vite-package-version.d.ts +7 -0
  102. package/helpers/vite-package-version.js +44 -0
  103. package/helpers/vite-package-version.js.map +1 -0
  104. package/helpers/workers.d.ts +20 -19
  105. package/helpers/workers.js +624 -4
  106. package/helpers/workers.js.map +1 -1
  107. package/hmr/client/css-handler.d.ts +2 -1
  108. package/hmr/client/css-handler.js +50 -26
  109. package/hmr/client/css-handler.js.map +1 -1
  110. package/hmr/client/css-update-overlay.d.ts +18 -0
  111. package/hmr/client/css-update-overlay.js +27 -0
  112. package/hmr/client/css-update-overlay.js.map +1 -0
  113. package/hmr/client/framework-client-strategy.d.ts +79 -0
  114. package/hmr/client/framework-client-strategy.js +19 -0
  115. package/hmr/client/framework-client-strategy.js.map +1 -0
  116. package/hmr/client/hmr-pending-overlay.d.ts +0 -14
  117. package/hmr/client/hmr-pending-overlay.js +14 -4
  118. package/hmr/client/hmr-pending-overlay.js.map +1 -1
  119. package/hmr/client/hot-context.d.ts +67 -0
  120. package/hmr/client/hot-context.js +284 -0
  121. package/hmr/client/hot-context.js.map +1 -0
  122. package/hmr/client/index.js +922 -273
  123. package/hmr/client/index.js.map +1 -1
  124. package/hmr/client/utils.d.ts +2 -1
  125. package/hmr/client/utils.js +111 -99
  126. package/hmr/client/utils.js.map +1 -1
  127. package/hmr/entry-runtime.d.ts +2 -1
  128. package/hmr/entry-runtime.js +271 -69
  129. package/hmr/entry-runtime.js.map +1 -1
  130. package/hmr/frameworks/angular/build/angular-linker.d.ts +12 -0
  131. package/hmr/frameworks/angular/build/angular-linker.js +109 -0
  132. package/hmr/frameworks/angular/build/angular-linker.js.map +1 -0
  133. package/hmr/frameworks/angular/build/inject-component-hmr-registration.d.ts +112 -0
  134. package/hmr/frameworks/angular/build/inject-component-hmr-registration.js +291 -0
  135. package/hmr/frameworks/angular/build/inject-component-hmr-registration.js.map +1 -0
  136. package/hmr/frameworks/angular/build/inject-hmr-vite-ignore.d.ts +75 -0
  137. package/hmr/frameworks/angular/build/inject-hmr-vite-ignore.js +221 -0
  138. package/hmr/frameworks/angular/build/inject-hmr-vite-ignore.js.map +1 -0
  139. package/{helpers/angular → hmr/frameworks/angular/build}/inline-decorator-component-templates.js +1 -170
  140. package/hmr/frameworks/angular/build/inline-decorator-component-templates.js.map +1 -0
  141. package/hmr/frameworks/angular/build/js-lexer.d.ts +4 -0
  142. package/{helpers/angular/synthesize-decorator-ctor-parameters.js → hmr/frameworks/angular/build/js-lexer.js} +22 -96
  143. package/hmr/frameworks/angular/build/js-lexer.js.map +1 -0
  144. package/hmr/frameworks/angular/build/shared-linker.d.ts +39 -0
  145. package/hmr/frameworks/angular/build/shared-linker.js +128 -0
  146. package/hmr/frameworks/angular/build/shared-linker.js.map +1 -0
  147. package/hmr/frameworks/angular/build/synthesize-decorator-ctor-parameters.js +88 -0
  148. package/hmr/frameworks/angular/build/synthesize-decorator-ctor-parameters.js.map +1 -0
  149. package/{helpers/angular → hmr/frameworks/angular/build}/synthesize-injectable-factories.js +1 -174
  150. package/hmr/frameworks/angular/build/synthesize-injectable-factories.js.map +1 -0
  151. package/{helpers/angular → hmr/frameworks/angular/build}/util.d.ts +1 -0
  152. package/hmr/frameworks/angular/build/util.js +155 -0
  153. package/hmr/frameworks/angular/build/util.js.map +1 -0
  154. package/hmr/frameworks/angular/client/index.js +542 -175
  155. package/hmr/frameworks/angular/client/index.js.map +1 -1
  156. package/hmr/frameworks/angular/client/strategy.d.ts +9 -0
  157. package/hmr/frameworks/angular/client/strategy.js +19 -0
  158. package/hmr/frameworks/angular/client/strategy.js.map +1 -0
  159. package/hmr/frameworks/angular/server/angular-root-component.d.ts +79 -0
  160. package/hmr/frameworks/angular/server/angular-root-component.js +149 -0
  161. package/hmr/frameworks/angular/server/angular-root-component.js.map +1 -0
  162. package/hmr/frameworks/angular/server/linker.js +1 -4
  163. package/hmr/frameworks/angular/server/linker.js.map +1 -1
  164. package/hmr/frameworks/angular/server/strategy.js +458 -12
  165. package/hmr/frameworks/angular/server/strategy.js.map +1 -1
  166. package/hmr/{server → frameworks/angular/server}/websocket-angular-entry.js +2 -2
  167. package/hmr/frameworks/angular/server/websocket-angular-entry.js.map +1 -0
  168. package/hmr/{server → frameworks/angular/server}/websocket-angular-hot-update.d.ts +14 -11
  169. package/hmr/{server → frameworks/angular/server}/websocket-angular-hot-update.js +108 -111
  170. package/hmr/frameworks/angular/server/websocket-angular-hot-update.js.map +1 -0
  171. package/hmr/frameworks/react/server/strategy.d.ts +2 -0
  172. package/hmr/frameworks/react/server/strategy.js +230 -0
  173. package/hmr/frameworks/react/server/strategy.js.map +1 -0
  174. package/hmr/frameworks/solid/build/solid-jsx-deps.d.ts +15 -0
  175. package/hmr/frameworks/solid/build/solid-jsx-deps.js +178 -0
  176. package/hmr/frameworks/solid/build/solid-jsx-deps.js.map +1 -0
  177. package/hmr/frameworks/solid/client/app-runtime.d.ts +68 -0
  178. package/hmr/frameworks/solid/client/app-runtime.js +246 -0
  179. package/hmr/frameworks/solid/client/app-runtime.js.map +1 -0
  180. package/hmr/frameworks/solid/server/strategy.js +291 -16
  181. package/hmr/frameworks/solid/server/strategy.js.map +1 -1
  182. package/hmr/frameworks/typescript/server/strategy.js +38 -14
  183. package/hmr/frameworks/typescript/server/strategy.js.map +1 -1
  184. package/hmr/frameworks/vue/client/dep-propagation.d.ts +44 -0
  185. package/hmr/frameworks/vue/client/dep-propagation.js +148 -0
  186. package/hmr/frameworks/vue/client/dep-propagation.js.map +1 -0
  187. package/hmr/frameworks/vue/client/index.d.ts +9 -0
  188. package/hmr/frameworks/vue/client/index.js +251 -247
  189. package/hmr/frameworks/vue/client/index.js.map +1 -1
  190. package/hmr/frameworks/vue/client/strategy.d.ts +33 -0
  191. package/hmr/frameworks/vue/client/strategy.js +157 -0
  192. package/hmr/frameworks/vue/client/strategy.js.map +1 -0
  193. package/hmr/frameworks/vue/client/vue-sfc-update-overlay.d.ts +49 -0
  194. package/hmr/frameworks/vue/client/vue-sfc-update-overlay.js +142 -0
  195. package/hmr/frameworks/vue/client/vue-sfc-update-overlay.js.map +1 -0
  196. package/hmr/frameworks/vue/server/compiler.d.ts +3 -1
  197. package/hmr/frameworks/vue/server/compiler.js +3 -1
  198. package/hmr/frameworks/vue/server/compiler.js.map +1 -1
  199. package/hmr/frameworks/vue/server/sfc-route-assemble.d.ts +7 -0
  200. package/hmr/frameworks/vue/server/sfc-route-assemble.js +823 -0
  201. package/hmr/frameworks/vue/server/sfc-route-assemble.js.map +1 -0
  202. package/hmr/frameworks/vue/server/sfc-route-meta.d.ts +7 -0
  203. package/hmr/frameworks/vue/server/sfc-route-meta.js +80 -0
  204. package/hmr/frameworks/vue/server/sfc-route-meta.js.map +1 -0
  205. package/hmr/frameworks/vue/server/sfc-route-serve.d.ts +8 -0
  206. package/hmr/frameworks/vue/server/sfc-route-serve.js +462 -0
  207. package/hmr/frameworks/vue/server/sfc-route-serve.js.map +1 -0
  208. package/hmr/frameworks/vue/server/sfc-route-shared.d.ts +45 -0
  209. package/hmr/frameworks/vue/server/sfc-route-shared.js +105 -0
  210. package/hmr/frameworks/vue/server/sfc-route-shared.js.map +1 -0
  211. package/hmr/frameworks/vue/server/strategy.d.ts +35 -0
  212. package/hmr/frameworks/vue/server/strategy.js +286 -7
  213. package/hmr/frameworks/vue/server/strategy.js.map +1 -1
  214. package/hmr/frameworks/vue/server/websocket-sfc.d.ts +15 -0
  215. package/hmr/frameworks/vue/server/websocket-sfc.js +20 -0
  216. package/hmr/frameworks/vue/server/websocket-sfc.js.map +1 -0
  217. package/hmr/helpers/ast-normalizer.d.ts +3 -1
  218. package/hmr/helpers/ast-normalizer.js +77 -10
  219. package/hmr/helpers/ast-normalizer.js.map +1 -1
  220. package/hmr/helpers/cjs-named-exports.d.ts +23 -0
  221. package/hmr/helpers/cjs-named-exports.js +152 -0
  222. package/hmr/helpers/cjs-named-exports.js.map +1 -0
  223. package/hmr/helpers/package-exports.d.ts +16 -0
  224. package/hmr/helpers/package-exports.js +396 -0
  225. package/hmr/helpers/package-exports.js.map +1 -0
  226. package/hmr/helpers/vendor-rewrite.d.ts +1 -1
  227. package/hmr/helpers/vendor-rewrite.js +5 -3
  228. package/hmr/helpers/vendor-rewrite.js.map +1 -1
  229. package/hmr/server/boot-archive-route.d.ts +40 -0
  230. package/hmr/server/boot-archive-route.js +154 -0
  231. package/hmr/server/boot-archive-route.js.map +1 -0
  232. package/hmr/server/boot-closure-route.d.ts +49 -0
  233. package/hmr/server/boot-closure-route.js +144 -0
  234. package/hmr/server/boot-closure-route.js.map +1 -0
  235. package/hmr/server/boot-recording.d.ts +58 -0
  236. package/hmr/server/boot-recording.js +228 -0
  237. package/hmr/server/boot-recording.js.map +1 -0
  238. package/hmr/server/constants.js +20 -5
  239. package/hmr/server/constants.js.map +1 -1
  240. package/hmr/server/core-bundle.d.ts +140 -0
  241. package/hmr/server/core-bundle.js +614 -0
  242. package/hmr/server/core-bundle.js.map +1 -0
  243. package/hmr/server/core-sanitize.d.ts +86 -7
  244. package/hmr/server/core-sanitize.js +170 -45
  245. package/hmr/server/core-sanitize.js.map +1 -1
  246. package/hmr/server/css-device-module.d.ts +28 -0
  247. package/hmr/server/css-device-module.js +44 -0
  248. package/hmr/server/css-device-module.js.map +1 -0
  249. package/hmr/server/deps-bundle.d.ts +218 -0
  250. package/hmr/server/deps-bundle.js +984 -0
  251. package/hmr/server/deps-bundle.js.map +1 -0
  252. package/hmr/server/device-transform-helpers.d.ts +24 -0
  253. package/hmr/server/device-transform-helpers.js +408 -0
  254. package/hmr/server/device-transform-helpers.js.map +1 -0
  255. package/hmr/server/framework-strategy.d.ts +113 -11
  256. package/hmr/server/hmr-module-graph.d.ts +37 -0
  257. package/hmr/server/hmr-module-graph.js +215 -0
  258. package/hmr/server/hmr-module-graph.js.map +1 -0
  259. package/hmr/server/import-map.d.ts +13 -4
  260. package/hmr/server/import-map.js +94 -47
  261. package/hmr/server/import-map.js.map +1 -1
  262. package/hmr/server/index.js +7 -16
  263. package/hmr/server/index.js.map +1 -1
  264. package/hmr/server/ns-core-cjs-shape.d.ts +2 -4
  265. package/hmr/server/ns-core-cjs-shape.js +4 -6
  266. package/hmr/server/ns-core-cjs-shape.js.map +1 -1
  267. package/hmr/server/ns-m-response-memo.d.ts +10 -0
  268. package/hmr/server/ns-m-response-memo.js +33 -0
  269. package/hmr/server/ns-m-response-memo.js.map +1 -0
  270. package/hmr/server/ns-rt-bridge.d.ts +51 -0
  271. package/hmr/server/ns-rt-bridge.js +131 -0
  272. package/hmr/server/ns-rt-bridge.js.map +1 -0
  273. package/hmr/server/ns-rt-route.d.ts +5 -0
  274. package/hmr/server/ns-rt-route.js +39 -0
  275. package/hmr/server/ns-rt-route.js.map +1 -0
  276. package/hmr/server/perf-instrumentation.d.ts +6 -10
  277. package/hmr/server/perf-instrumentation.js +5 -6
  278. package/hmr/server/perf-instrumentation.js.map +1 -1
  279. package/hmr/server/process-code-for-device.d.ts +30 -0
  280. package/hmr/server/process-code-for-device.js +791 -0
  281. package/hmr/server/process-code-for-device.js.map +1 -0
  282. package/hmr/server/require-guard.d.ts +1 -0
  283. package/hmr/server/require-guard.js +12 -0
  284. package/hmr/server/require-guard.js.map +1 -0
  285. package/hmr/server/rewrite-imports.d.ts +2 -0
  286. package/hmr/server/rewrite-imports.js +630 -0
  287. package/hmr/server/rewrite-imports.js.map +1 -0
  288. package/hmr/server/route-helpers.d.ts +7 -0
  289. package/hmr/server/route-helpers.js +13 -0
  290. package/hmr/server/route-helpers.js.map +1 -0
  291. package/hmr/server/server-origin.d.ts +2 -0
  292. package/hmr/server/server-origin.js +83 -0
  293. package/hmr/server/server-origin.js.map +1 -0
  294. package/hmr/server/shared-transform-request.js +1 -2
  295. package/hmr/server/shared-transform-request.js.map +1 -1
  296. package/hmr/server/transform-cache-invalidation.d.ts +37 -0
  297. package/hmr/server/transform-cache-invalidation.js +156 -0
  298. package/hmr/server/transform-cache-invalidation.js.map +1 -0
  299. package/hmr/server/vendor-bare-module-shims.d.ts +4 -0
  300. package/hmr/server/vendor-bare-module-shims.js +80 -0
  301. package/hmr/server/vendor-bare-module-shims.js.map +1 -0
  302. package/hmr/server/vite-plugin.d.ts +1 -0
  303. package/hmr/server/vite-plugin.js +180 -54
  304. package/hmr/server/vite-plugin.js.map +1 -1
  305. package/hmr/server/websocket-core-bridge.d.ts +51 -4
  306. package/hmr/server/websocket-core-bridge.js +62 -54
  307. package/hmr/server/websocket-core-bridge.js.map +1 -1
  308. package/hmr/server/websocket-css-hot-update.d.ts +33 -0
  309. package/hmr/server/websocket-css-hot-update.js +65 -0
  310. package/hmr/server/websocket-css-hot-update.js.map +1 -0
  311. package/hmr/server/websocket-device-transform.d.ts +3 -0
  312. package/hmr/server/websocket-device-transform.js +7 -0
  313. package/hmr/server/websocket-device-transform.js.map +1 -0
  314. package/hmr/server/websocket-hmr-pending.d.ts +3 -9
  315. package/hmr/server/websocket-hmr-pending.js +1 -1
  316. package/hmr/server/websocket-hmr-pending.js.map +1 -1
  317. package/hmr/server/websocket-hot-update.d.ts +77 -0
  318. package/hmr/server/websocket-hot-update.js +360 -0
  319. package/hmr/server/websocket-hot-update.js.map +1 -0
  320. package/hmr/server/websocket-import-map-route.d.ts +15 -0
  321. package/hmr/server/websocket-import-map-route.js +50 -0
  322. package/hmr/server/websocket-import-map-route.js.map +1 -0
  323. package/hmr/server/websocket-module-bindings.js +3 -3
  324. package/hmr/server/websocket-module-bindings.js.map +1 -1
  325. package/hmr/server/websocket-module-specifiers.d.ts +66 -2
  326. package/hmr/server/websocket-module-specifiers.js +191 -20
  327. package/hmr/server/websocket-module-specifiers.js.map +1 -1
  328. package/hmr/server/websocket-ns-core.d.ts +34 -0
  329. package/hmr/server/websocket-ns-core.js +414 -0
  330. package/hmr/server/websocket-ns-core.js.map +1 -0
  331. package/hmr/server/websocket-ns-entry.d.ts +21 -0
  332. package/hmr/server/websocket-ns-entry.js +164 -0
  333. package/hmr/server/websocket-ns-entry.js.map +1 -0
  334. package/hmr/server/websocket-ns-m-paths.d.ts +1 -3
  335. package/hmr/server/websocket-ns-m-paths.js +25 -82
  336. package/hmr/server/websocket-ns-m-paths.js.map +1 -1
  337. package/hmr/server/websocket-ns-m-request.d.ts +11 -1
  338. package/hmr/server/websocket-ns-m-request.js +17 -9
  339. package/hmr/server/websocket-ns-m-request.js.map +1 -1
  340. package/hmr/server/websocket-ns-m.d.ts +52 -0
  341. package/hmr/server/websocket-ns-m.js +824 -0
  342. package/hmr/server/websocket-ns-m.js.map +1 -0
  343. package/hmr/server/websocket-served-module-helpers.d.ts +50 -4
  344. package/hmr/server/websocket-served-module-helpers.js +384 -86
  345. package/hmr/server/websocket-served-module-helpers.js.map +1 -1
  346. package/hmr/server/websocket-txn.js +6 -9
  347. package/hmr/server/websocket-txn.js.map +1 -1
  348. package/hmr/server/websocket-vendor-unifier.d.ts +0 -1
  349. package/hmr/server/websocket-vendor-unifier.js +4 -9
  350. package/hmr/server/websocket-vendor-unifier.js.map +1 -1
  351. package/hmr/server/websocket.d.ts +7 -39
  352. package/hmr/server/websocket.js +643 -6716
  353. package/hmr/server/websocket.js.map +1 -1
  354. package/hmr/shared/ns-globals.d.ts +108 -0
  355. package/hmr/shared/ns-globals.js +28 -0
  356. package/hmr/shared/ns-globals.js.map +1 -0
  357. package/hmr/shared/protocol.d.ts +145 -0
  358. package/hmr/shared/protocol.js +28 -0
  359. package/hmr/shared/protocol.js.map +1 -0
  360. package/hmr/shared/runtime/boot-archive-format.d.ts +16 -0
  361. package/hmr/shared/runtime/boot-archive-format.js +31 -0
  362. package/hmr/shared/runtime/boot-archive-format.js.map +1 -0
  363. package/hmr/shared/runtime/boot-complete.d.ts +14 -0
  364. package/hmr/shared/runtime/boot-complete.js +32 -0
  365. package/hmr/shared/runtime/boot-complete.js.map +1 -0
  366. package/hmr/shared/runtime/boot-placeholder-ui.d.ts +69 -0
  367. package/hmr/shared/runtime/boot-placeholder-ui.js +101 -0
  368. package/hmr/shared/runtime/boot-placeholder-ui.js.map +1 -0
  369. package/hmr/shared/runtime/boot-progress.d.ts +44 -0
  370. package/hmr/shared/runtime/boot-progress.js +134 -0
  371. package/hmr/shared/runtime/boot-progress.js.map +1 -0
  372. package/hmr/shared/runtime/boot-timeline.d.ts +2 -1
  373. package/hmr/shared/runtime/boot-timeline.js +9 -22
  374. package/hmr/shared/runtime/boot-timeline.js.map +1 -1
  375. package/hmr/shared/runtime/browser-runtime-contract.d.ts +53 -22
  376. package/hmr/shared/runtime/browser-runtime-contract.js +6 -9
  377. package/hmr/shared/runtime/browser-runtime-contract.js.map +1 -1
  378. package/hmr/shared/runtime/dev-overlay-snapshots.d.ts +31 -0
  379. package/hmr/shared/runtime/dev-overlay-snapshots.js +324 -0
  380. package/hmr/shared/runtime/dev-overlay-snapshots.js.map +1 -0
  381. package/hmr/shared/runtime/dev-overlay.d.ts +76 -30
  382. package/hmr/shared/runtime/dev-overlay.js +767 -408
  383. package/hmr/shared/runtime/dev-overlay.js.map +1 -1
  384. package/hmr/shared/runtime/global-scope.d.ts +18 -0
  385. package/hmr/shared/runtime/global-scope.js +21 -0
  386. package/hmr/shared/runtime/global-scope.js.map +1 -0
  387. package/hmr/shared/runtime/hooks.js +2 -1
  388. package/hmr/shared/runtime/hooks.js.map +1 -1
  389. package/hmr/shared/runtime/http-only-boot.js +7 -6
  390. package/hmr/shared/runtime/http-only-boot.js.map +1 -1
  391. package/hmr/shared/runtime/module-provenance.js +4 -6
  392. package/hmr/shared/runtime/module-provenance.js.map +1 -1
  393. package/hmr/shared/runtime/root-placeholder-view.d.ts +19 -0
  394. package/hmr/shared/runtime/root-placeholder-view.js +311 -0
  395. package/hmr/shared/runtime/root-placeholder-view.js.map +1 -0
  396. package/hmr/shared/runtime/root-placeholder.js +398 -204
  397. package/hmr/shared/runtime/root-placeholder.js.map +1 -1
  398. package/hmr/shared/runtime/session-bootstrap.js +255 -50
  399. package/hmr/shared/runtime/session-bootstrap.js.map +1 -1
  400. package/hmr/shared/runtime/vendor-bootstrap.js +3 -10
  401. package/hmr/shared/runtime/vendor-bootstrap.js.map +1 -1
  402. package/hmr/shared/vendor/manifest-collect.d.ts +4 -0
  403. package/hmr/shared/vendor/manifest-collect.js +549 -0
  404. package/hmr/shared/vendor/manifest-collect.js.map +1 -0
  405. package/hmr/shared/vendor/manifest-loader.d.ts +2 -1
  406. package/hmr/shared/vendor/manifest-loader.js +5 -3
  407. package/hmr/shared/vendor/manifest-loader.js.map +1 -1
  408. package/hmr/shared/vendor/manifest.d.ts +1 -7
  409. package/hmr/shared/vendor/manifest.js +125 -825
  410. package/hmr/shared/vendor/manifest.js.map +1 -1
  411. package/hmr/shared/vendor/registry.d.ts +2 -0
  412. package/hmr/shared/vendor/registry.js +14 -0
  413. package/hmr/shared/vendor/registry.js.map +1 -1
  414. package/hmr/shared/vendor/vendor-device-shim.d.ts +1 -0
  415. package/hmr/shared/vendor/vendor-device-shim.js +208 -0
  416. package/hmr/shared/vendor/vendor-device-shim.js.map +1 -0
  417. package/hmr/shared/vendor/vendor-esbuild-plugins.d.ts +38 -0
  418. package/hmr/shared/vendor/vendor-esbuild-plugins.js +296 -0
  419. package/hmr/shared/vendor/vendor-esbuild-plugins.js.map +1 -0
  420. package/hmr/vendor-bootstrap.d.ts +1 -3
  421. package/hmr/vendor-bootstrap.js +4 -6
  422. package/hmr/vendor-bootstrap.js.map +1 -1
  423. package/index.d.ts +1 -0
  424. package/index.js +5 -0
  425. package/index.js.map +1 -1
  426. package/package.json +65 -11
  427. package/runtime/core-aliases-early.js +25 -55
  428. package/runtime/core-aliases-early.js.map +1 -1
  429. package/shims/react-jsx-runtime.d.ts +4 -0
  430. package/shims/react-jsx-runtime.js +61 -0
  431. package/shims/react-jsx-runtime.js.map +1 -0
  432. package/helpers/angular/angular-linker.d.ts +0 -13
  433. package/helpers/angular/angular-linker.js +0 -194
  434. package/helpers/angular/angular-linker.js.map +0 -1
  435. package/helpers/angular/inline-decorator-component-templates.js.map +0 -1
  436. package/helpers/angular/shared-linker.d.ts +0 -11
  437. package/helpers/angular/shared-linker.js +0 -75
  438. package/helpers/angular/shared-linker.js.map +0 -1
  439. package/helpers/angular/synthesize-decorator-ctor-parameters.js.map +0 -1
  440. package/helpers/angular/synthesize-injectable-factories.js.map +0 -1
  441. package/helpers/angular/util.js +0 -67
  442. package/helpers/angular/util.js.map +0 -1
  443. package/helpers/prelink-angular.d.ts +0 -2
  444. package/helpers/prelink-angular.js +0 -117
  445. package/helpers/prelink-angular.js.map +0 -1
  446. package/hmr/server/websocket-angular-entry.js.map +0 -1
  447. package/hmr/server/websocket-angular-hot-update.js.map +0 -1
  448. package/hmr/server/websocket-ns-m-finalize.d.ts +0 -22
  449. package/hmr/server/websocket-ns-m-finalize.js +0 -88
  450. package/hmr/server/websocket-ns-m-finalize.js.map +0 -1
  451. package/hmr/server/websocket-runtime-compat.d.ts +0 -19
  452. package/hmr/server/websocket-runtime-compat.js +0 -286
  453. package/hmr/server/websocket-runtime-compat.js.map +0 -1
  454. package/hmr/server/websocket-vue-sfc.d.ts +0 -27
  455. package/hmr/server/websocket-vue-sfc.js +0 -1114
  456. package/hmr/server/websocket-vue-sfc.js.map +0 -1
  457. package/transformers/NativeClass/index.d.ts +0 -2
  458. package/transformers/NativeClass/index.js +0 -222
  459. package/transformers/NativeClass/index.js.map +0 -1
  460. /package/{helpers/angular → hmr/frameworks/angular/build}/inline-decorator-component-templates.d.ts +0 -0
  461. /package/{helpers/angular → hmr/frameworks/angular/build}/synthesize-decorator-ctor-parameters.d.ts +0 -0
  462. /package/{helpers/angular → hmr/frameworks/angular/build}/synthesize-injectable-factories.d.ts +0 -0
  463. /package/hmr/{server → frameworks/angular/server}/websocket-angular-entry.d.ts +0 -0
@@ -0,0 +1,134 @@
1
+ import { getGlobalScope } from './global-scope.js';
2
+ // Pure helpers for the cold-boot "Importing the app entry" progress display.
3
+ //
4
+ // Pipeline:
5
+ // * Server-side `buildBootProgressSnippet` is injected at the top of
6
+ // every served app module and bumps the count / last-module globals
7
+ // while `__NS_HMR_BOOT_COMPLETE__` is falsy (self-gating — the
8
+ // snippet no-ops after boot; FULLY SYNCHRONOUS — see the snippet
9
+ // doc for why top-level await must stay out of served modules).
10
+ // * `startBrowserRuntimeSession` stamps the time origin
11
+ // (`__NS_HMR_BOOT_IMPORT_STARTED_AT__`) right before the client +
12
+ // entry dynamic-import walk.
13
+ // * `startBootImportHeartbeat` reads both signals every 250 ms and
14
+ // re-asserts `'importing-main'` so the bar climbs even across long
15
+ // vendor stretches that don't tick the count axis. The iOS runtime's
16
+ // `MaybePumpJSThreadDuringBoot` keeps the JS-thread CFRunLoop ticking
17
+ // between synchronous fetches so the heartbeat's `setInterval` timer
18
+ // can fire during the cold-boot module walk.
19
+ //
20
+ // Monotonic ratchet (`applyMonotonicBootProgress`,
21
+ // `__NS_HMR_BOOT_LAST_PROGRESS__`): each tick can never undercut the
22
+ // previous one, preventing visible stutter when the count axis briefly
23
+ // wins over the time axis.
24
+ /**
25
+ * `'importing-main'` is the long HTTP-module-load phase (5–10s for a
26
+ * real Angular app). The bar uses this range so the user sees ~62
27
+ * percentage points of motion during the phase that actually takes
28
+ * time, sandwiched between the cheap bootstrap stages
29
+ * ('configuring-import-map' = 26) and the post-import wait
30
+ * ('waiting-for-app' = 94 → 'app-root-committed' = 100).
31
+ */
32
+ export const BOOT_IMPORT_PROGRESS_MIN = 30;
33
+ export const BOOT_IMPORT_PROGRESS_MAX = 92;
34
+ /** Ceiling guards against rounding into `'waiting-for-app'` (94). */
35
+ export const BOOT_IMPORT_PROGRESS_CEILING = 94;
36
+ const BOOT_IMPORT_PROGRESS_RANGE = BOOT_IMPORT_PROGRESS_MAX - BOOT_IMPORT_PROGRESS_MIN;
37
+ /**
38
+ * Compute the percentage shown next to "Importing the app entry".
39
+ *
40
+ * Sum of two clamped contributions:
41
+ * * `progressFromCount` — `__NS_HMR_BOOT_MODULE_COUNT__` bumped by the
42
+ * boot snippet (1 unit per 2 modules, cap 40).
43
+ * * `progressFromTime` — elapsed wall-clock since
44
+ * `__NS_HMR_BOOT_IMPORT_STARTED_AT__` (1 unit per 250 ms, cap
45
+ * matches the full 62-point range so time alone can drive the bar
46
+ * 30 → 92 if the count axis is starved).
47
+ *
48
+ * The count axis goes silent in long node_modules stretches and on
49
+ * Vite's rewrite chains where the served import URL skips the
50
+ * `__ns_boot__/b1` prefix; the time axis covers those gaps. Both
51
+ * contributions are summed, clamped to the 62-point range, then
52
+ * ceilinged so they cannot cross into 'waiting-for-app' (94+).
53
+ *
54
+ * Canonical values are pinned by `boot-progress.spec.ts`. The
55
+ * server-side snippet does NOT mirror this math — it only writes the
56
+ * counters; the heartbeat in `session-bootstrap.ts` is the sole caller.
57
+ */
58
+ const BOOT_IMPORT_COUNT_CONTRIBUTION_MAX = 40;
59
+ const BOOT_IMPORT_TIME_CONTRIBUTION_MAX = 62;
60
+ const BOOT_IMPORT_COUNT_DIVISOR = 2;
61
+ const BOOT_IMPORT_TIME_TICK_MS = 250;
62
+ export function computeBootImportProgress(input) {
63
+ // Coerce NaN / ±Infinity / negatives to 0 — `Math.max(0, NaN)` is NaN.
64
+ const rawCount = Number(input?.count ?? 0);
65
+ const rawElapsed = Number(input?.elapsedMs ?? 0);
66
+ const count = Number.isFinite(rawCount) ? Math.max(0, rawCount) : 0;
67
+ const elapsedMs = Number.isFinite(rawElapsed) ? Math.max(0, rawElapsed) : 0;
68
+ const progressFromCount = Math.min(BOOT_IMPORT_COUNT_CONTRIBUTION_MAX, Math.floor(count / BOOT_IMPORT_COUNT_DIVISOR));
69
+ const progressFromTime = Math.min(BOOT_IMPORT_TIME_CONTRIBUTION_MAX, Math.floor(elapsedMs / BOOT_IMPORT_TIME_TICK_MS));
70
+ const combined = BOOT_IMPORT_PROGRESS_MIN + Math.min(BOOT_IMPORT_PROGRESS_RANGE, progressFromCount + progressFromTime);
71
+ return Math.min(BOOT_IMPORT_PROGRESS_CEILING, combined);
72
+ }
73
+ /**
74
+ * Render the second-line detail for the placeholder. Surfaces the
75
+ * count + last-loaded module path once the snippet has fired, or a
76
+ * generic "Loading the module graph…" line during the pre-snippet
77
+ * window.
78
+ *
79
+ * No elapsed-ms readout: the primary line's percentage is the progress
80
+ * signal, and the heartbeat's `elapsedMs` is wall-clock since the import
81
+ * started — not a per-module timing — so surfacing it next to the
82
+ * percentage read as a confusing, inaccurate duration.
83
+ */
84
+ export function formatBootImportDetail(input) {
85
+ const count = Math.max(0, Number(input?.count ?? 0));
86
+ const lastModule = typeof input?.lastModule === 'string' ? input.lastModule : '';
87
+ if (count > 0) {
88
+ return lastModule ? `Evaluated ${count} modules\n${lastModule}` : `Evaluated ${count} modules`;
89
+ }
90
+ return 'Loading the module graph…';
91
+ }
92
+ /**
93
+ * Ratchet a candidate boot-import progress value against the highest
94
+ * value any consumer has emitted so far (stored on
95
+ * `globalThis.__NS_HMR_BOOT_LAST_PROGRESS__`). Reset by
96
+ * `clearBootProgressState` between sessions.
97
+ */
98
+ export function applyMonotonicBootProgress(candidate) {
99
+ const g = getGlobalScope();
100
+ const previousRaw = g.__NS_HMR_BOOT_LAST_PROGRESS__;
101
+ const previous = typeof previousRaw === 'number' && Number.isFinite(previousRaw) ? previousRaw : 0;
102
+ const next = Math.max(previous, Math.max(0, Number(candidate) || 0));
103
+ try {
104
+ g.__NS_HMR_BOOT_LAST_PROGRESS__ = next;
105
+ }
106
+ catch { }
107
+ return next;
108
+ }
109
+ /**
110
+ * Reset every boot-progress global so a re-bootstrapped session (e.g.
111
+ * after `__reboot_ng_modules__`) starts a fresh ratchet rather than
112
+ * inheriting the previous cycle's terminal values.
113
+ */
114
+ export function clearBootProgressState() {
115
+ const g = getGlobalScope();
116
+ for (const key of [
117
+ '__NS_HMR_BOOT_MODULE_COUNT__',
118
+ '__NS_HMR_BOOT_LAST_MODULE__',
119
+ '__NS_HMR_BOOT_LAST_PROGRESS__',
120
+ '__NS_HMR_BOOT_LAST_PROGRESS_AT__',
121
+ '__NS_HMR_BOOT_IMPORT_STARTED_AT__',
122
+ // Defensive: an earlier snippet shape used this to throttle a
123
+ // top-level await yield. Removed — top-level await in a boot-tagged
124
+ // module trips the iOS 10s async-module deadline. Cleared in case a
125
+ // stale boot left it behind.
126
+ '__NS_HMR_BOOT_LAST_YIELD_AT__',
127
+ ]) {
128
+ try {
129
+ delete g[key];
130
+ }
131
+ catch { }
132
+ }
133
+ }
134
+ //# sourceMappingURL=boot-progress.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"boot-progress.js","sourceRoot":"","sources":["../../../../../../packages/vite/hmr/shared/runtime/boot-progress.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AACnD,6EAA6E;AAC7E,EAAE;AACF,YAAY;AACZ,uEAAuE;AACvE,wEAAwE;AACxE,mEAAmE;AACnE,qEAAqE;AACrE,oEAAoE;AACpE,0DAA0D;AAC1D,sEAAsE;AACtE,iCAAiC;AACjC,qEAAqE;AACrE,uEAAuE;AACvE,yEAAyE;AACzE,0EAA0E;AAC1E,yEAAyE;AACzE,iDAAiD;AACjD,EAAE;AACF,mDAAmD;AACnD,qEAAqE;AACrE,uEAAuE;AACvE,2BAA2B;AAE3B;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,wBAAw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AED;;;;GAIG;AACH,MAAM,UAAU,sBAAsB;IACrC,MAAM,CAAC,GAAQ,cAAc,EAAE,CAAC;IAChC,KAAK,MAAM,GAAG,IAAI;QACjB,8BAA8B;QAC9B,6BAA6B;QAC7B,+BAA+B;QAC/B,kCAAkC;QAClC,mCAAmC;QACnC,8DAA8D;QAC9D,oEAAoE;QACpE,oEAAoE;QACpE,6BAA6B;QAC7B,+BAA+B;KAC/B,EAAE,CAAC;QACH,IAAI,CAAC;YACJ,OAAO,CAAC,CAAC,GAAG,CAAC,CAAC;QACf,CAAC;QAAC,MAAM,CAAC,CAAA,CAAC;IACX,CAAC;AACF,CAAC"}
@@ -8,7 +8,8 @@ export type BootTrace = {
8
8
  t1?: number;
9
9
  session?: BootTraceSegment;
10
10
  importMap?: BootTraceSegment;
11
- native?: BootTraceSegment;
11
+ kickstart?: BootTraceSegment;
12
+ entry?: BootTraceSegment;
12
13
  error?: {
13
14
  message: string;
14
15
  };
@@ -1,22 +1,9 @@
1
- // Boot timeline instrumentation for the NativeScript dev session.
2
- //
3
- // `session-bootstrap.ts` is the real boot path on modern runtimes with
4
- // `__nsStartDevSession`. We record how long each segment takes and turn
5
- // the result into a single-line, human-readable log that is always on
6
- // (not behind the verbose flag) so anyone chasing regressions can see
7
- // the shape of a cold boot without having to flip any switches.
8
- //
9
- // The trace is also mirrored onto `globalThis.__NS_BOOT_TRACE__` so a
10
- // developer can `console.log(globalThis.__NS_BOOT_TRACE__)` from the
11
- // device or pick it up via `js:evaluate` in test harnesses.
12
- //
13
- // See HMR_CORE_REALM_DETERMINISTIC_PLAN.md — "Post-D roadmap — dev-loop
14
- // performance and UX" for the full context.
1
+ import { getGlobalScope } from './global-scope.js';
15
2
  // Pure formatter so we can unit-test the exact string shape without
16
3
  // touching `console.info` or `Date.now()`.
17
4
  //
18
5
  // Format:
19
- // [ns-boot] ok total=1234ms session=45ms importMap=67ms native=1100ms
6
+ // [ns-boot] ok total=1234ms session=45ms importMap=67ms entry=1100ms
20
7
  // [ns-boot] FAILED total=230ms session=45ms ...: <message>
21
8
  //
22
9
  // Segment entries are only included when a numeric `ms` was recorded —
@@ -36,18 +23,18 @@ export function formatBootTimeline(trace) {
36
23
  }
37
24
  push('session', trace.session);
38
25
  push('importMap', trace.importMap);
39
- push('native', trace.native);
26
+ push('kickstart', trace.kickstart);
27
+ push('entry', trace.entry);
40
28
  const suffix = trace.error?.message ? `: ${trace.error.message}` : '';
41
29
  return `[ns-boot] ${status} ${parts.join(' ')}${suffix}`.replace(/\s+$/, '');
42
30
  }
43
- // Install the trace on `globalThis` so diagnostics can pick it up. We
44
- // use a distinct key from the legacy entry-runtime trace so existing
45
- // readers that expect `__NS_ENTRY_TRACE__` keep working. Exported for
46
- // tests; the runtime path calls this from the session-bootstrap finally
47
- // block.
31
+ // Install the trace on `globalThis` so diagnostics can pick it up. The key
32
+ // is distinct from the entry-runtime trace (`__NS_ENTRY_TRACE__`), which the
33
+ // entry runtime writes for its own phases. Exported for tests; the runtime
34
+ // path calls this from the session-bootstrap finally block.
48
35
  export function publishBootTrace(trace) {
49
36
  try {
50
- globalThis.__NS_BOOT_TRACE__ = trace;
37
+ getGlobalScope().__NS_BOOT_TRACE__ = trace;
51
38
  }
52
39
  catch { }
53
40
  }
@@ -1 +1 @@
1
- {"version":3,"file":"boot-timeline.js","sourceRoot":"","sources":["../../../../../../packages/vite/hmr/shared/runtime/boot-timeline.ts"],"names":[],"mappings":"AAAA,kEAAkE;AAClE,EAAE;AACF,uEAAuE;AACvE,wEAAwE;AACxE,sEAAsE;AACtE,sEAAsE;AACtE,gEAAgE;AAChE,EAAE;AACF,sEAAsE;AACtE,qEAAqE;AACrE,4DAA4D;AAC5D,EAAE;AACF,wEAAwE;AACxE,4CAA4C;AAiB5C,oEAAoE;AACpE,2CAA2C;AAC3C,EAAE;AACF,UAAU;AACV,wEAAwE;AACxE,6DAA6D;AAC7D,EAAE;AACF,uEAAuE;AACvE,uEAAuE;AACvE,wEAAwE;AACxE,MAAM,UA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AC"}
@@ -22,16 +22,6 @@ export interface NsDevSessionDescriptor {
22
22
  hostModules?: NsHostModuleId[];
23
23
  features?: NsDevFeatureFlags;
24
24
  }
25
- export interface NsRuntimeDevSessionConfig extends NsDevSessionDescriptor {
26
- }
27
- export interface NsStyleUpdatePayload {
28
- url: string;
29
- cssText: string;
30
- }
31
- export interface NsHotUpdateInvalidatePayload {
32
- urls: string[];
33
- updatedAt?: number;
34
- }
35
25
  export interface NsRuntimeImportMap {
36
26
  imports: Record<string, string>;
37
27
  }
@@ -39,26 +29,67 @@ export interface NsRuntimeConfigurePayload {
39
29
  importMap: NsRuntimeImportMap;
40
30
  volatilePatterns?: string[];
41
31
  }
32
+ export interface NsKickstartPrefetchOptions {
33
+ maxConcurrent?: number;
34
+ timeoutMs?: number;
35
+ }
36
+ export interface NsKickstartPrefetchResult {
37
+ ok: boolean;
38
+ fetched: number;
39
+ ms: number;
40
+ }
41
+ /** One `{url, body}` pair seeded into the native prewarm cache (boot archive). */
42
+ export interface NsSeedModuleBodyEntry {
43
+ url: string;
44
+ body: string;
45
+ }
46
+ export interface NsSeedModuleBodiesResult {
47
+ ok: boolean;
48
+ seeded: number;
49
+ bytes: number;
50
+ }
51
+ /**
52
+ * The native dev-host contract — mechanism only. The runtime exposes its
53
+ * mechanism primitives on the single `globalThis.__NS_DEV__` namespace
54
+ * object; every policy concern (boot orchestration, import.meta.hot, full
55
+ * reload, CSS apply, WebSocket protocol) lives in JS inside
56
+ * @nativescript/vite.
57
+ *
58
+ * Every member is optional: a non-dev environment (or a test) may expose
59
+ * none or only some of them, and callers degrade gracefully.
60
+ */
42
61
  export interface NsRuntimeDevHostApi {
62
+ /** `__NS_DEV__.configureRuntime` — import map + volatile URL patterns for the sync resolver. */
43
63
  configureRuntime?: (config: NsRuntimeConfigurePayload) => void;
44
- supportsRuntimeConfigUrl: boolean;
45
- startDevSession: (config: NsRuntimeDevSessionConfig) => Promise<void>;
64
+ /** `__NS_DEV__.invalidateModules` — dual-cache eviction (V8 registry + prefetch cache + bust-next-fetch nonce). */
46
65
  invalidateModules?: (urls: string[]) => void;
47
- reloadDevApp?: () => Promise<void>;
48
- applyStyleUpdate?: (payload: NsStyleUpdatePayload) => void;
66
+ /** `__NS_DEV__.getLoadedModuleUrls` — registry introspection for JS-driven full reload. */
49
67
  getLoadedModuleUrls?: () => string[];
68
+ /** `__NS_DEV__.kickstartPrefetch(urls)` — parallel HTTP body prewarm for an explicit URL list. */
69
+ kickstartPrefetch?: (urls: string[], options?: NsKickstartPrefetchOptions) => NsKickstartPrefetchResult | null;
70
+ /**
71
+ * `__NS_DEV__.seedModuleBodies(entries)` — batch prewarm-cache seeding: the
72
+ * bootstrap downloads `/__ns_dev__/boot-archive` (NDJSON) and seeds every
73
+ * `{url, body}` into the prewarm cache in one call, behind the same
74
+ * http(s)/JS-shape/allowlist gates as a kickstart fetch. Callers fall back
75
+ * to `kickstartPrefetch(urls)` when absent or nothing seeded.
76
+ */
77
+ seedModuleBodies?: (entries: NsSeedModuleBodyEntry[]) => NsSeedModuleBodiesResult | null;
78
+ /** `__NS_DEV__.setDevBootComplete` — flips the native cold-boot gate + `__NS_HMR_BOOT_COMPLETE__`. */
79
+ setDevBootComplete?: (value?: boolean) => void;
80
+ /** `__NS_DEV__.terminateAllWorkers` — drains `Caches::Workers`; returns the count terminated (main isolate only). */
81
+ terminateAllWorkers?: () => number;
50
82
  }
51
83
  export declare function isNsDevPlatform(value: unknown): value is NsDevPlatform;
52
84
  export declare function assertNsDevSessionDescriptor(session: unknown): asserts session is NsDevSessionDescriptor;
85
+ /**
86
+ * Resolve the dev host API from `globalThis.__NS_DEV__` — the one namespace
87
+ * object the runtime installs. Always read through this function rather than
88
+ * poking at the global so every consumer resolves the contract identically.
89
+ */
53
90
  export declare function readNsRuntimeDevHostApi(target?: Partial<typeof globalThis>): NsRuntimeDevHostApi;
54
91
  declare global {
55
- var __nsConfigureDevRuntime: ((config: NsRuntimeConfigurePayload) => void) | undefined;
56
- var __nsConfigureRuntime: ((config: NsRuntimeConfigurePayload) => void) | undefined;
57
- var __nsSupportsRuntimeConfigUrl: boolean | undefined;
58
- var __nsStartDevSession: ((config: NsRuntimeDevSessionConfig) => Promise<void>) | undefined;
59
- var __nsInvalidateModules: ((urls: string[]) => void) | undefined;
60
- var __nsReloadDevApp: (() => Promise<void>) | undefined;
61
- var __nsApplyStyleUpdate: ((payload: NsStyleUpdatePayload) => void) | undefined;
62
- var __nsGetLoadedModuleUrls: (() => string[]) | undefined;
92
+ /** The dev host namespace object the runtime installs (see NsRuntimeDevHostApi). */
93
+ var __NS_DEV__: NsRuntimeDevHostApi | undefined;
63
94
  }
64
95
  export {};
@@ -39,16 +39,13 @@ export function assertNsDevSessionDescriptor(session) {
39
39
  }
40
40
  }
41
41
  }
42
+ /**
43
+ * Resolve the dev host API from `globalThis.__NS_DEV__` — the one namespace
44
+ * object the runtime installs. Always read through this function rather than
45
+ * poking at the global so every consumer resolves the contract identically.
46
+ */
42
47
  export function readNsRuntimeDevHostApi(target = globalThis) {
43
- return {
44
- configureRuntime: target.__nsConfigureDevRuntime ?? target.__nsConfigureRuntime,
45
- supportsRuntimeConfigUrl: target.__nsSupportsRuntimeConfigUrl === true,
46
- startDevSession: target.__nsStartDevSession,
47
- invalidateModules: target.__nsInvalidateModules,
48
- reloadDevApp: target.__nsReloadDevApp,
49
- applyStyleUpdate: target.__nsApplyStyleUpdate,
50
- getLoadedModuleUrls: target.__nsGetLoadedModuleUrls,
51
- };
48
+ return target.__NS_DEV__ ?? {};
52
49
  }
53
50
  export {};
54
51
  //# sourceMappingURL=browser-runtime-contract.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"browser-runtime-contract.js","sourceRoot":"","sources":["../../../../../../packages/vite/hmr/shared/runtime/browser-runtime-contract.ts"],"names":[],"mappings":"AAIA,MAAM,CAAC,MAAM,yBAAyB,GAAG,mBAA4B,CAAC;AACtE,MAAM,CAAC,MAAM,+BAA+B,GAAG,yBAAkC,CAAC;AAClF,MAAM,C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CAAC,SAAS,CAAC,WAAW,CAAC,IAAI,SAAS,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC,gBAAgB,CAAC,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,UAAU,CAAC,YAAY,CAAC,CAAC,EAAE,CAAC;YACzJ,MAAM,IAAI,KAAK,CAAC,iCAAiC,CAAC,CAAC;QACpD,CAAC;IACF,CAAC;IAED,IAAI,SAAS,CAAC,gBAAgB,IAAI,IAAI,IAAI,CAAC,gBAAgB,CAAC,SAAS,CAAC,gBAAgB,CAAC,EAAE,CAAC;QACzF,MAAM,IAAI,KAAK,CAAC,sCAAsC,CAAC,CAAC;IACzD,CAAC;IAED,IAAI,SAAS,CAAC,QAAQ,IAAI,IAAI,EAAE,CAAC;QAChC,IAAI,OAAO,SAAS,CAAC,QAAQ,KAAK,QAAQ,EAAE,CAAC;YAC5C,MAAM,IAAI,KAAK,CAAC,8BAA8B,CAAC,CAAC;QACjD,CAAC;IACF,CAAC;AACF,CAAC;AAED,MAAM,UAAU,uBAAuB,CAAC,SAAqC,UAAU;IACtF,OAAO;QACN,gBAAgB,EAAE,MAAM,CAAC,uBAAuB,IAAI,MAAM,CAAC,oBAAoB;QAC/E,wBAAwB,EAAE,MAAM,CAAC,4BAA4B,KAAK,IAAI;QACtE,eAAe,EAAE,MAAM,CAAC,mBAAmB;QAC3C,iBAAiB,EAAE,MAAM,CAAC,qBAAqB;QAC/C,YAAY,EAAE,MAAM,CAAC,gBAAgB;QACrC,gBAAgB,EAAE,MAAM,CAAC,oBAAoB;QAC7C,mBAAmB,EAAE,MAAM,CAAC,uBAAuB;KACnD,CAAC;AACH,CAAC;AAaD,OAAO,EAAE,CAAC"}
1
+ {"version":3,"file":"browser-runtime-contract.js","sourceRoot":"","sources":["../../../../../../packages/vite/hmr/shared/runtime/browser-runtime-contract.ts"],"names":[],"mappings":"AAMA,MAAM,CAAC,MAAM,yBAAyB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AED,IAAI,SAAS,CAAC,WAAW,IAAI,IAAI,EAAE,CAAC;QACnC,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,SAAS,CAAC,WAAW,CAAC,IAAI,SAAS,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC,gBAAgB,CAAC,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,UAAU,CAAC,YAAY,CAAC,CAAC,EAAE,CAAC;YACzJ,MAAM,IAAI,KAAK,CAAC,iCAAiC,CAAC,CAAC;QACpD,CAAC;IACF,CAAC;IAED,IAAI,SAAS,CAAC,gBAAgB,IAAI,IAAI,IAAI,CAAC,gBAAgB,CAAC,SAAS,CAAC,gBAAgB,CAAC,EAAE,CAAC;QACzF,MAAM,IAAI,KAAK,CAAC,sCAAsC,CAAC,CAAC;IACzD,CAAC;IAED,IAAI,SAAS,CAAC,QAAQ,IAAI,IAAI,EAAE,CAAC;QAChC,IAAI,OAAO,SAAS,CAAC,QAAQ,KAAK,QAAQ,EAAE,CAAC;YAC5C,MAAM,IAAI,KAAK,CAAC,8BAA8B,CAAC,CAAC;QACjD,CAAC;IACF,CAAC;AACF,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,uBAAuB,CAAC,SAAqC,UAAU;IACtF,OAAO,MAAM,CAAC,UAAU,IAAI,EAAE,CAAC;AAChC,CAAC;AAOD,OAAO,EAAE,CAAC"}
@@ -0,0 +1,31 @@
1
+ type HmrOverlayTone = 'info' | 'warn' | 'error' | 'success';
2
+ type HmrOverlayMode = 'hidden' | 'boot' | 'connection' | 'update';
3
+ export type HmrOverlayPosition = 'top' | 'bottom' | 'center';
4
+ export type HmrBootStage = 'placeholder' | 'probing-origin' | 'loading-entry-runtime' | 'configuring-import-map' | 'loading-runtime-bridge' | 'loading-core-bridge' | 'preloading-style-scope' | 'installing-css' | 'importing-main' | 'waiting-for-app' | 'app-root-committed' | 'ready' | 'error';
5
+ export type HmrConnectionStage = 'connecting' | 'reconnecting' | 'synchronizing' | 'offline' | 'healthy';
6
+ export type HmrUpdateStage = 'received' | 'evicting' | 'reimporting' | 'rebooting' | 'complete';
7
+ export type HmrOverlayStageInfo = {
8
+ detail?: string;
9
+ origin?: string;
10
+ progress?: number | null;
11
+ attempt?: number;
12
+ attempts?: number;
13
+ };
14
+ export type HmrOverlaySnapshot = {
15
+ visible: boolean;
16
+ mode: HmrOverlayMode;
17
+ badge: string;
18
+ title: string;
19
+ phase: string;
20
+ detail: string;
21
+ progress: number | null;
22
+ busy: boolean;
23
+ blocking: boolean;
24
+ tone: HmrOverlayTone;
25
+ };
26
+ export declare const BOOT_TITLE = "NativeScript Vite preparing dev session...";
27
+ export declare const DEFAULT_SNAPSHOT: HmrOverlaySnapshot;
28
+ export declare function createBootOverlaySnapshot(stage: HmrBootStage, info?: HmrOverlayStageInfo): HmrOverlaySnapshot;
29
+ export declare function createConnectionOverlaySnapshot(stage: HmrConnectionStage, info?: HmrOverlayStageInfo): HmrOverlaySnapshot;
30
+ export declare function createUpdateOverlaySnapshot(stage: HmrUpdateStage, info?: HmrOverlayStageInfo): HmrOverlaySnapshot;
31
+ export {};