@nativescript/vite 8.0.0-alpha.4 → 8.0.0-alpha.41

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 (410) 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 +256 -30
  7. package/configuration/base.js.map +1 -1
  8. package/configuration/javascript.js +12 -90
  9. package/configuration/javascript.js.map +1 -1
  10. package/configuration/solid.js +33 -4
  11. package/configuration/solid.js.map +1 -1
  12. package/configuration/typescript.js +10 -90
  13. package/configuration/typescript.js.map +1 -1
  14. package/helpers/app-components.d.ts +2 -1
  15. package/helpers/app-components.js.map +1 -1
  16. package/helpers/app-css-state.d.ts +8 -0
  17. package/helpers/app-css-state.js +8 -0
  18. package/helpers/app-css-state.js.map +1 -0
  19. package/helpers/bundler-context.d.ts +11 -0
  20. package/helpers/bundler-context.js +71 -0
  21. package/helpers/bundler-context.js.map +1 -0
  22. package/helpers/config-as-json.js +10 -0
  23. package/helpers/config-as-json.js.map +1 -1
  24. package/helpers/css-platform-plugin.d.ts +14 -0
  25. package/helpers/css-platform-plugin.js +43 -25
  26. package/helpers/css-platform-plugin.js.map +1 -1
  27. package/helpers/dev-host.d.ts +360 -0
  28. package/helpers/dev-host.js +692 -0
  29. package/helpers/dev-host.js.map +1 -0
  30. package/helpers/dynamic-import-plugin.js +1 -1
  31. package/helpers/dynamic-import-plugin.js.map +1 -1
  32. package/helpers/esbuild-platform-resolver.js +4 -1
  33. package/helpers/esbuild-platform-resolver.js.map +1 -1
  34. package/helpers/external-configs.d.ts +10 -12
  35. package/helpers/external-configs.js +54 -35
  36. package/helpers/external-configs.js.map +1 -1
  37. package/helpers/global-defines.d.ts +128 -0
  38. package/helpers/global-defines.js +174 -11
  39. package/helpers/global-defines.js.map +1 -1
  40. package/helpers/hmr-scope.d.ts +26 -0
  41. package/helpers/hmr-scope.js +67 -0
  42. package/helpers/hmr-scope.js.map +1 -0
  43. package/helpers/init.js +0 -18
  44. package/helpers/init.js.map +1 -1
  45. package/helpers/logging.d.ts +1 -0
  46. package/helpers/logging.js +65 -4
  47. package/helpers/logging.js.map +1 -1
  48. package/helpers/main-entry.d.ts +3 -1
  49. package/helpers/main-entry.js +444 -50
  50. package/helpers/main-entry.js.map +1 -1
  51. package/helpers/nativeclass-esbuild-plugin.d.ts +2 -1
  52. package/helpers/nativeclass-esbuild-plugin.js.map +1 -1
  53. package/helpers/nativeclass-transform.js +5 -6
  54. package/helpers/nativeclass-transform.js.map +1 -1
  55. package/helpers/nativeclass-transformer-plugin.d.ts +9 -2
  56. package/helpers/nativeclass-transformer-plugin.js +157 -14
  57. package/helpers/nativeclass-transformer-plugin.js.map +1 -1
  58. package/helpers/nativescript-package-resolver.js +10 -62
  59. package/helpers/nativescript-package-resolver.js.map +1 -1
  60. package/helpers/normalize-id.d.ts +42 -0
  61. package/helpers/normalize-id.js +60 -0
  62. package/helpers/normalize-id.js.map +1 -0
  63. package/helpers/ns-core-url.d.ts +106 -0
  64. package/helpers/ns-core-url.js +225 -0
  65. package/helpers/ns-core-url.js.map +1 -0
  66. package/helpers/optimize-deps.d.ts +16 -0
  67. package/helpers/optimize-deps.js +17 -0
  68. package/helpers/optimize-deps.js.map +1 -0
  69. package/helpers/package-platform-aliases.js +34 -49
  70. package/helpers/package-platform-aliases.js.map +1 -1
  71. package/helpers/platform-types.d.ts +2 -0
  72. package/helpers/platform-types.js +2 -0
  73. package/helpers/platform-types.js.map +1 -0
  74. package/helpers/postcss-platform-config.d.ts +17 -1
  75. package/helpers/postcss-platform-config.js +20 -37
  76. package/helpers/postcss-platform-config.js.map +1 -1
  77. package/helpers/project.d.ts +35 -0
  78. package/helpers/project.js +120 -2
  79. package/helpers/project.js.map +1 -1
  80. package/helpers/resolve-main-field-platform.d.ts +20 -0
  81. package/helpers/resolve-main-field-platform.js +49 -0
  82. package/helpers/resolve-main-field-platform.js.map +1 -0
  83. package/helpers/resolver.js +17 -2
  84. package/helpers/resolver.js.map +1 -1
  85. package/helpers/theme-core-plugins.js +1 -1
  86. package/helpers/theme-core-plugins.js.map +1 -1
  87. package/helpers/ts-config-paths.d.ts +14 -0
  88. package/helpers/ts-config-paths.js +90 -9
  89. package/helpers/ts-config-paths.js.map +1 -1
  90. package/helpers/typescript-check.d.ts +2 -1
  91. package/helpers/typescript-check.js.map +1 -1
  92. package/helpers/ui-registration.d.ts +21 -0
  93. package/helpers/ui-registration.js +156 -0
  94. package/helpers/ui-registration.js.map +1 -0
  95. package/helpers/utils.js +1 -2
  96. package/helpers/utils.js.map +1 -1
  97. package/helpers/workers.d.ts +20 -19
  98. package/helpers/workers.js +624 -4
  99. package/helpers/workers.js.map +1 -1
  100. package/hmr/client/css-handler.d.ts +2 -1
  101. package/hmr/client/css-handler.js +50 -26
  102. package/hmr/client/css-handler.js.map +1 -1
  103. package/hmr/client/css-update-overlay.d.ts +18 -0
  104. package/hmr/client/css-update-overlay.js +27 -0
  105. package/hmr/client/css-update-overlay.js.map +1 -0
  106. package/hmr/client/framework-client-strategy.d.ts +79 -0
  107. package/hmr/client/framework-client-strategy.js +19 -0
  108. package/hmr/client/framework-client-strategy.js.map +1 -0
  109. package/hmr/client/hmr-pending-overlay.d.ts +13 -0
  110. package/hmr/client/hmr-pending-overlay.js +60 -0
  111. package/hmr/client/hmr-pending-overlay.js.map +1 -0
  112. package/hmr/client/index.js +820 -212
  113. package/hmr/client/index.js.map +1 -1
  114. package/hmr/client/utils.d.ts +7 -1
  115. package/hmr/client/utils.js +207 -29
  116. package/hmr/client/utils.js.map +1 -1
  117. package/hmr/entry-runtime.d.ts +2 -1
  118. package/hmr/entry-runtime.js +256 -69
  119. package/hmr/entry-runtime.js.map +1 -1
  120. package/hmr/frameworks/angular/build/angular-linker.d.ts +12 -0
  121. package/hmr/frameworks/angular/build/angular-linker.js +109 -0
  122. package/hmr/frameworks/angular/build/angular-linker.js.map +1 -0
  123. package/hmr/frameworks/angular/build/inject-component-hmr-registration.d.ts +112 -0
  124. package/hmr/frameworks/angular/build/inject-component-hmr-registration.js +291 -0
  125. package/hmr/frameworks/angular/build/inject-component-hmr-registration.js.map +1 -0
  126. package/hmr/frameworks/angular/build/inject-hmr-vite-ignore.d.ts +75 -0
  127. package/hmr/frameworks/angular/build/inject-hmr-vite-ignore.js +221 -0
  128. package/hmr/frameworks/angular/build/inject-hmr-vite-ignore.js.map +1 -0
  129. package/{helpers/angular → hmr/frameworks/angular/build}/inline-decorator-component-templates.js +1 -170
  130. package/hmr/frameworks/angular/build/inline-decorator-component-templates.js.map +1 -0
  131. package/hmr/frameworks/angular/build/js-lexer.d.ts +4 -0
  132. package/{helpers/angular/synthesize-decorator-ctor-parameters.js → hmr/frameworks/angular/build/js-lexer.js} +22 -96
  133. package/hmr/frameworks/angular/build/js-lexer.js.map +1 -0
  134. package/hmr/frameworks/angular/build/shared-linker.d.ts +39 -0
  135. package/hmr/frameworks/angular/build/shared-linker.js +128 -0
  136. package/hmr/frameworks/angular/build/shared-linker.js.map +1 -0
  137. package/hmr/frameworks/angular/build/synthesize-decorator-ctor-parameters.js +88 -0
  138. package/hmr/frameworks/angular/build/synthesize-decorator-ctor-parameters.js.map +1 -0
  139. package/{helpers/angular → hmr/frameworks/angular/build}/synthesize-injectable-factories.js +1 -174
  140. package/hmr/frameworks/angular/build/synthesize-injectable-factories.js.map +1 -0
  141. package/{helpers/angular → hmr/frameworks/angular/build}/util.d.ts +1 -0
  142. package/hmr/frameworks/angular/build/util.js +155 -0
  143. package/hmr/frameworks/angular/build/util.js.map +1 -0
  144. package/hmr/frameworks/angular/client/index.d.ts +1 -0
  145. package/hmr/frameworks/angular/client/index.js +803 -21
  146. package/hmr/frameworks/angular/client/index.js.map +1 -1
  147. package/hmr/frameworks/angular/client/strategy.d.ts +9 -0
  148. package/hmr/frameworks/angular/client/strategy.js +19 -0
  149. package/hmr/frameworks/angular/client/strategy.js.map +1 -0
  150. package/hmr/frameworks/angular/server/angular-root-component.d.ts +79 -0
  151. package/hmr/frameworks/angular/server/angular-root-component.js +149 -0
  152. package/hmr/frameworks/angular/server/angular-root-component.js.map +1 -0
  153. package/hmr/frameworks/angular/server/linker.js +1 -4
  154. package/hmr/frameworks/angular/server/linker.js.map +1 -1
  155. package/hmr/frameworks/angular/server/strategy.js +460 -12
  156. package/hmr/frameworks/angular/server/strategy.js.map +1 -1
  157. package/hmr/{server → frameworks/angular/server}/websocket-angular-entry.js +2 -2
  158. package/hmr/frameworks/angular/server/websocket-angular-entry.js.map +1 -0
  159. package/hmr/{server → frameworks/angular/server}/websocket-angular-hot-update.d.ts +17 -11
  160. package/hmr/frameworks/angular/server/websocket-angular-hot-update.js +336 -0
  161. package/hmr/frameworks/angular/server/websocket-angular-hot-update.js.map +1 -0
  162. package/hmr/frameworks/solid/build/solid-jsx-deps.d.ts +15 -0
  163. package/hmr/frameworks/solid/build/solid-jsx-deps.js +178 -0
  164. package/hmr/frameworks/solid/build/solid-jsx-deps.js.map +1 -0
  165. package/hmr/frameworks/solid/server/strategy.js +291 -16
  166. package/hmr/frameworks/solid/server/strategy.js.map +1 -1
  167. package/hmr/frameworks/typescript/server/strategy.js +38 -14
  168. package/hmr/frameworks/typescript/server/strategy.js.map +1 -1
  169. package/hmr/frameworks/vue/client/dep-propagation.d.ts +36 -0
  170. package/hmr/frameworks/vue/client/dep-propagation.js +101 -0
  171. package/hmr/frameworks/vue/client/dep-propagation.js.map +1 -0
  172. package/hmr/frameworks/vue/client/index.d.ts +8 -0
  173. package/hmr/frameworks/vue/client/index.js +56 -243
  174. package/hmr/frameworks/vue/client/index.js.map +1 -1
  175. package/hmr/frameworks/vue/client/strategy.d.ts +33 -0
  176. package/hmr/frameworks/vue/client/strategy.js +157 -0
  177. package/hmr/frameworks/vue/client/strategy.js.map +1 -0
  178. package/hmr/frameworks/vue/client/vue-sfc-update-overlay.d.ts +49 -0
  179. package/hmr/frameworks/vue/client/vue-sfc-update-overlay.js +142 -0
  180. package/hmr/frameworks/vue/client/vue-sfc-update-overlay.js.map +1 -0
  181. package/hmr/frameworks/vue/server/sfc-route-assemble.d.ts +7 -0
  182. package/hmr/frameworks/vue/server/sfc-route-assemble.js +747 -0
  183. package/hmr/frameworks/vue/server/sfc-route-assemble.js.map +1 -0
  184. package/hmr/frameworks/vue/server/sfc-route-meta.d.ts +7 -0
  185. package/hmr/frameworks/vue/server/sfc-route-meta.js +80 -0
  186. package/hmr/frameworks/vue/server/sfc-route-meta.js.map +1 -0
  187. package/hmr/frameworks/vue/server/sfc-route-serve.d.ts +8 -0
  188. package/hmr/frameworks/vue/server/sfc-route-serve.js +459 -0
  189. package/hmr/frameworks/vue/server/sfc-route-serve.js.map +1 -0
  190. package/hmr/frameworks/vue/server/sfc-route-shared.d.ts +38 -0
  191. package/hmr/frameworks/vue/server/sfc-route-shared.js +48 -0
  192. package/hmr/frameworks/vue/server/sfc-route-shared.js.map +1 -0
  193. package/hmr/frameworks/vue/server/strategy.d.ts +35 -0
  194. package/hmr/frameworks/vue/server/strategy.js +278 -1
  195. package/hmr/frameworks/vue/server/strategy.js.map +1 -1
  196. package/hmr/frameworks/vue/server/websocket-sfc.d.ts +15 -0
  197. package/hmr/frameworks/vue/server/websocket-sfc.js +20 -0
  198. package/hmr/frameworks/vue/server/websocket-sfc.js.map +1 -0
  199. package/hmr/helpers/ast-normalizer.d.ts +3 -1
  200. package/hmr/helpers/ast-normalizer.js +77 -10
  201. package/hmr/helpers/ast-normalizer.js.map +1 -1
  202. package/hmr/helpers/cjs-named-exports.d.ts +23 -0
  203. package/hmr/helpers/cjs-named-exports.js +152 -0
  204. package/hmr/helpers/cjs-named-exports.js.map +1 -0
  205. package/hmr/helpers/package-exports.d.ts +16 -0
  206. package/hmr/helpers/package-exports.js +396 -0
  207. package/hmr/helpers/package-exports.js.map +1 -0
  208. package/hmr/server/constants.js +20 -5
  209. package/hmr/server/constants.js.map +1 -1
  210. package/hmr/server/core-sanitize.d.ts +90 -7
  211. package/hmr/server/core-sanitize.js +211 -56
  212. package/hmr/server/core-sanitize.js.map +1 -1
  213. package/hmr/server/device-transform-helpers.d.ts +24 -0
  214. package/hmr/server/device-transform-helpers.js +369 -0
  215. package/hmr/server/device-transform-helpers.js.map +1 -0
  216. package/hmr/server/framework-strategy.d.ts +108 -11
  217. package/hmr/server/hmr-module-graph.d.ts +37 -0
  218. package/hmr/server/hmr-module-graph.js +214 -0
  219. package/hmr/server/hmr-module-graph.js.map +1 -0
  220. package/hmr/server/import-map.d.ts +11 -2
  221. package/hmr/server/import-map.js +95 -44
  222. package/hmr/server/import-map.js.map +1 -1
  223. package/hmr/server/index.js +7 -16
  224. package/hmr/server/index.js.map +1 -1
  225. package/hmr/server/ns-core-cjs-shape.d.ts +204 -0
  226. package/hmr/server/ns-core-cjs-shape.js +271 -0
  227. package/hmr/server/ns-core-cjs-shape.js.map +1 -0
  228. package/hmr/server/ns-rt-bridge.d.ts +51 -0
  229. package/hmr/server/ns-rt-bridge.js +131 -0
  230. package/hmr/server/ns-rt-bridge.js.map +1 -0
  231. package/hmr/server/ns-rt-route.d.ts +5 -0
  232. package/hmr/server/ns-rt-route.js +38 -0
  233. package/hmr/server/ns-rt-route.js.map +1 -0
  234. package/hmr/server/perf-instrumentation.d.ts +114 -0
  235. package/hmr/server/perf-instrumentation.js +197 -0
  236. package/hmr/server/perf-instrumentation.js.map +1 -0
  237. package/hmr/server/process-code-for-device.d.ts +14 -0
  238. package/hmr/server/process-code-for-device.js +702 -0
  239. package/hmr/server/process-code-for-device.js.map +1 -0
  240. package/hmr/server/require-guard.d.ts +1 -0
  241. package/hmr/server/require-guard.js +12 -0
  242. package/hmr/server/require-guard.js.map +1 -0
  243. package/hmr/server/rewrite-imports.d.ts +2 -0
  244. package/hmr/server/rewrite-imports.js +600 -0
  245. package/hmr/server/rewrite-imports.js.map +1 -0
  246. package/hmr/server/route-helpers.d.ts +7 -0
  247. package/hmr/server/route-helpers.js +13 -0
  248. package/hmr/server/route-helpers.js.map +1 -0
  249. package/hmr/server/server-origin.d.ts +2 -0
  250. package/hmr/server/server-origin.js +83 -0
  251. package/hmr/server/server-origin.js.map +1 -0
  252. package/hmr/server/shared-transform-request.js +13 -7
  253. package/hmr/server/shared-transform-request.js.map +1 -1
  254. package/hmr/server/transform-cache-invalidation.d.ts +37 -0
  255. package/hmr/server/transform-cache-invalidation.js +156 -0
  256. package/hmr/server/transform-cache-invalidation.js.map +1 -0
  257. package/hmr/server/vendor-bare-module-shims.d.ts +4 -0
  258. package/hmr/server/vendor-bare-module-shims.js +80 -0
  259. package/hmr/server/vendor-bare-module-shims.js.map +1 -0
  260. package/hmr/server/vite-plugin.js +72 -42
  261. package/hmr/server/vite-plugin.js.map +1 -1
  262. package/hmr/server/websocket-core-bridge.d.ts +45 -6
  263. package/hmr/server/websocket-core-bridge.js +81 -77
  264. package/hmr/server/websocket-core-bridge.js.map +1 -1
  265. package/hmr/server/websocket-css-hot-update.d.ts +33 -0
  266. package/hmr/server/websocket-css-hot-update.js +65 -0
  267. package/hmr/server/websocket-css-hot-update.js.map +1 -0
  268. package/hmr/server/websocket-device-transform.d.ts +3 -0
  269. package/hmr/server/websocket-device-transform.js +7 -0
  270. package/hmr/server/websocket-device-transform.js.map +1 -0
  271. package/hmr/server/websocket-graph-upsert.d.ts +15 -0
  272. package/hmr/server/websocket-graph-upsert.js +20 -0
  273. package/hmr/server/websocket-graph-upsert.js.map +1 -1
  274. package/hmr/server/websocket-hmr-pending.d.ts +37 -0
  275. package/hmr/server/websocket-hmr-pending.js +55 -0
  276. package/hmr/server/websocket-hmr-pending.js.map +1 -0
  277. package/hmr/server/websocket-hot-update.d.ts +77 -0
  278. package/hmr/server/websocket-hot-update.js +360 -0
  279. package/hmr/server/websocket-hot-update.js.map +1 -0
  280. package/hmr/server/websocket-import-map-route.d.ts +15 -0
  281. package/hmr/server/websocket-import-map-route.js +50 -0
  282. package/hmr/server/websocket-import-map-route.js.map +1 -0
  283. package/hmr/server/websocket-module-bindings.js +3 -3
  284. package/hmr/server/websocket-module-bindings.js.map +1 -1
  285. package/hmr/server/websocket-module-specifiers.d.ts +66 -2
  286. package/hmr/server/websocket-module-specifiers.js +203 -20
  287. package/hmr/server/websocket-module-specifiers.js.map +1 -1
  288. package/hmr/server/websocket-ns-core.d.ts +21 -0
  289. package/hmr/server/websocket-ns-core.js +311 -0
  290. package/hmr/server/websocket-ns-core.js.map +1 -0
  291. package/hmr/server/websocket-ns-entry.d.ts +21 -0
  292. package/hmr/server/websocket-ns-entry.js +164 -0
  293. package/hmr/server/websocket-ns-entry.js.map +1 -0
  294. package/hmr/server/websocket-ns-m-paths.d.ts +1 -1
  295. package/hmr/server/websocket-ns-m-paths.js +58 -13
  296. package/hmr/server/websocket-ns-m-paths.js.map +1 -1
  297. package/hmr/server/websocket-ns-m-request.d.ts +11 -1
  298. package/hmr/server/websocket-ns-m-request.js +18 -25
  299. package/hmr/server/websocket-ns-m-request.js.map +1 -1
  300. package/hmr/server/websocket-ns-m.d.ts +33 -0
  301. package/hmr/server/websocket-ns-m.js +752 -0
  302. package/hmr/server/websocket-ns-m.js.map +1 -0
  303. package/hmr/server/websocket-served-module-helpers.d.ts +82 -0
  304. package/hmr/server/websocket-served-module-helpers.js +879 -0
  305. package/hmr/server/websocket-served-module-helpers.js.map +1 -0
  306. package/hmr/server/websocket-txn.js +2 -8
  307. package/hmr/server/websocket-txn.js.map +1 -1
  308. package/hmr/server/websocket-vendor-unifier.d.ts +0 -1
  309. package/hmr/server/websocket-vendor-unifier.js +4 -9
  310. package/hmr/server/websocket-vendor-unifier.js.map +1 -1
  311. package/hmr/server/websocket.d.ts +8 -39
  312. package/hmr/server/websocket.js +514 -4030
  313. package/hmr/server/websocket.js.map +1 -1
  314. package/hmr/shared/ns-globals.d.ts +118 -0
  315. package/hmr/shared/ns-globals.js +29 -0
  316. package/hmr/shared/ns-globals.js.map +1 -0
  317. package/hmr/shared/protocol.d.ts +145 -0
  318. package/hmr/shared/protocol.js +28 -0
  319. package/hmr/shared/protocol.js.map +1 -0
  320. package/hmr/shared/runtime/boot-placeholder-ui.d.ts +69 -0
  321. package/hmr/shared/runtime/boot-placeholder-ui.js +101 -0
  322. package/hmr/shared/runtime/boot-placeholder-ui.js.map +1 -0
  323. package/hmr/shared/runtime/boot-progress.d.ts +44 -0
  324. package/hmr/shared/runtime/boot-progress.js +133 -0
  325. package/hmr/shared/runtime/boot-progress.js.map +1 -0
  326. package/hmr/shared/runtime/boot-timeline.d.ts +18 -0
  327. package/hmr/shared/runtime/boot-timeline.js +42 -0
  328. package/hmr/shared/runtime/boot-timeline.js.map +1 -0
  329. package/hmr/shared/runtime/browser-runtime-contract.js.map +1 -1
  330. package/hmr/shared/runtime/dev-overlay-snapshots.d.ts +31 -0
  331. package/hmr/shared/runtime/dev-overlay-snapshots.js +324 -0
  332. package/hmr/shared/runtime/dev-overlay-snapshots.js.map +1 -0
  333. package/hmr/shared/runtime/dev-overlay.d.ts +119 -26
  334. package/hmr/shared/runtime/dev-overlay.js +1153 -261
  335. package/hmr/shared/runtime/dev-overlay.js.map +1 -1
  336. package/hmr/shared/runtime/global-scope.d.ts +18 -0
  337. package/hmr/shared/runtime/global-scope.js +21 -0
  338. package/hmr/shared/runtime/global-scope.js.map +1 -0
  339. package/hmr/shared/runtime/hooks.js +2 -1
  340. package/hmr/shared/runtime/hooks.js.map +1 -1
  341. package/hmr/shared/runtime/http-only-boot.js +7 -6
  342. package/hmr/shared/runtime/http-only-boot.js.map +1 -1
  343. package/hmr/shared/runtime/module-provenance.js +4 -6
  344. package/hmr/shared/runtime/module-provenance.js.map +1 -1
  345. package/hmr/shared/runtime/root-placeholder-view.d.ts +19 -0
  346. package/hmr/shared/runtime/root-placeholder-view.js +311 -0
  347. package/hmr/shared/runtime/root-placeholder-view.js.map +1 -0
  348. package/hmr/shared/runtime/root-placeholder.js +371 -197
  349. package/hmr/shared/runtime/root-placeholder.js.map +1 -1
  350. package/hmr/shared/runtime/session-bootstrap.js +168 -4
  351. package/hmr/shared/runtime/session-bootstrap.js.map +1 -1
  352. package/hmr/shared/runtime/vendor-bootstrap.js +3 -10
  353. package/hmr/shared/runtime/vendor-bootstrap.js.map +1 -1
  354. package/hmr/shared/vendor/manifest-collect.d.ts +4 -0
  355. package/hmr/shared/vendor/manifest-collect.js +512 -0
  356. package/hmr/shared/vendor/manifest-collect.js.map +1 -0
  357. package/hmr/shared/vendor/manifest-loader.d.ts +2 -1
  358. package/hmr/shared/vendor/manifest-loader.js +5 -3
  359. package/hmr/shared/vendor/manifest-loader.js.map +1 -1
  360. package/hmr/shared/vendor/manifest.d.ts +1 -7
  361. package/hmr/shared/vendor/manifest.js +102 -741
  362. package/hmr/shared/vendor/manifest.js.map +1 -1
  363. package/hmr/shared/vendor/vendor-device-shim.d.ts +1 -0
  364. package/hmr/shared/vendor/vendor-device-shim.js +208 -0
  365. package/hmr/shared/vendor/vendor-device-shim.js.map +1 -0
  366. package/hmr/shared/vendor/vendor-esbuild-plugins.d.ts +16 -0
  367. package/hmr/shared/vendor/vendor-esbuild-plugins.js +203 -0
  368. package/hmr/shared/vendor/vendor-esbuild-plugins.js.map +1 -0
  369. package/hmr/vendor-bootstrap.d.ts +1 -3
  370. package/hmr/vendor-bootstrap.js +4 -6
  371. package/hmr/vendor-bootstrap.js.map +1 -1
  372. package/index.d.ts +1 -0
  373. package/index.js +5 -0
  374. package/index.js.map +1 -1
  375. package/package.json +55 -11
  376. package/runtime/core-aliases-early.js +25 -55
  377. package/runtime/core-aliases-early.js.map +1 -1
  378. package/helpers/angular/angular-linker.d.ts +0 -13
  379. package/helpers/angular/angular-linker.js +0 -194
  380. package/helpers/angular/angular-linker.js.map +0 -1
  381. package/helpers/angular/inline-decorator-component-templates.js.map +0 -1
  382. package/helpers/angular/shared-linker.d.ts +0 -11
  383. package/helpers/angular/shared-linker.js +0 -75
  384. package/helpers/angular/shared-linker.js.map +0 -1
  385. package/helpers/angular/synthesize-decorator-ctor-parameters.js.map +0 -1
  386. package/helpers/angular/synthesize-injectable-factories.js.map +0 -1
  387. package/helpers/angular/util.js +0 -67
  388. package/helpers/angular/util.js.map +0 -1
  389. package/helpers/prelink-angular.d.ts +0 -2
  390. package/helpers/prelink-angular.js +0 -117
  391. package/helpers/prelink-angular.js.map +0 -1
  392. package/hmr/server/websocket-angular-entry.js.map +0 -1
  393. package/hmr/server/websocket-angular-hot-update.js +0 -239
  394. package/hmr/server/websocket-angular-hot-update.js.map +0 -1
  395. package/hmr/server/websocket-ns-m-finalize.d.ts +0 -32
  396. package/hmr/server/websocket-ns-m-finalize.js +0 -73
  397. package/hmr/server/websocket-ns-m-finalize.js.map +0 -1
  398. package/hmr/server/websocket-runtime-compat.d.ts +0 -19
  399. package/hmr/server/websocket-runtime-compat.js +0 -286
  400. package/hmr/server/websocket-runtime-compat.js.map +0 -1
  401. package/hmr/server/websocket-vue-sfc.d.ts +0 -35
  402. package/hmr/server/websocket-vue-sfc.js +0 -1116
  403. package/hmr/server/websocket-vue-sfc.js.map +0 -1
  404. package/transformers/NativeClass/index.d.ts +0 -2
  405. package/transformers/NativeClass/index.js +0 -222
  406. package/transformers/NativeClass/index.js.map +0 -1
  407. /package/{helpers/angular → hmr/frameworks/angular/build}/inline-decorator-component-templates.d.ts +0 -0
  408. /package/{helpers/angular → hmr/frameworks/angular/build}/synthesize-decorator-ctor-parameters.d.ts +0 -0
  409. /package/{helpers/angular → hmr/frameworks/angular/build}/synthesize-injectable-factories.d.ts +0 -0
  410. /package/hmr/{server → frameworks/angular/server}/websocket-angular-entry.d.ts +0 -0
@@ -0,0 +1,145 @@
1
+ /**
2
+ * Wire protocol for the `ns:*` HMR messages exchanged over the dev-server
3
+ * WebSocket between the Vite dev server and the on-device client.
4
+ *
5
+ * This is the single source of truth for message shapes. Server emit sites
6
+ * annotate their payload objects with the matching interface here, so a field
7
+ * rename or type drift becomes a compile error at the emit site instead of a
8
+ * silent runtime mismatch the device only discovers at parse time. The client
9
+ * dispatch (`switch (msg.type)`) consumes the `ServerToClientMessage` union and
10
+ * uses {@link assertNeverNsMessage} for exhaustiveness.
11
+ *
12
+ * Pure types + one pure helper only — this module is in `hmr/shared` and must
13
+ * not import from `hmr/server` or `hmr/client`.
14
+ *
15
+ * Direction is encoded by the two unions:
16
+ * - {@link ServerToClientMessage} — dev server → device (9 messages)
17
+ * - {@link ClientToServerMessage} — device → dev server (2 messages)
18
+ */
19
+ /** Module entry as carried inside the graph payloads (`ns:hmr-full-graph`, `ns:hmr-delta`). */
20
+ export interface GraphModulePayload {
21
+ id: string;
22
+ deps: string[];
23
+ hash: string;
24
+ }
25
+ /** A single CSS update item nested inside an `ns:css-updates` batch. */
26
+ export interface CssUpdateItem {
27
+ type: 'css-update';
28
+ path: string;
29
+ acceptedPath: string;
30
+ timestamp: number;
31
+ /**
32
+ * Tag for the client's `addTaggedAdditionalCSS`/`removeTaggedAdditionalCSS`
33
+ * remove+add pair, scoping the replace so repeated edits of the SAME source
34
+ * swap cleanly instead of stacking. Omitted for the app entry CSS (the
35
+ * client defaults to the shared `app.css` tag). Set to the component style
36
+ * file's own path for `styleUrls` edits so a component's rules replace
37
+ * independently of `app.css`.
38
+ */
39
+ tag?: string;
40
+ }
41
+ /** A single Vue SFC registry entry carried inside `ns:vue-sfc-registry`. */
42
+ export interface VueSfcRegistryEntry {
43
+ path: string;
44
+ fileName: string;
45
+ hmrId: string;
46
+ /** Always empty in HTTP-only mode (artifacts are fetched over HTTP, not pushed over WS). */
47
+ code: string;
48
+ }
49
+ /** Classified kind of a pending HMR update (used by `ns:hmr-pending`). */
50
+ export type HmrPendingKind = 'ts' | 'css' | 'html' | 'unknown';
51
+ /** Angular hot-update broadcast: the device evicts `evictPaths` and re-fetches. */
52
+ export interface AngularUpdateMessage {
53
+ type: 'ns:angular-update';
54
+ origin: string;
55
+ path: string;
56
+ version: number;
57
+ timestamp: number;
58
+ evictPaths: string[];
59
+ importerEntry: string;
60
+ /** Legacy fallback the Angular client still reads; not emitted by the current server. */
61
+ entryCandidates?: string[];
62
+ }
63
+ /** Batched CSS hot-update broadcast (direct `.css` saves and Tailwind/PostCSS content edits). */
64
+ export interface CssUpdatesMessage {
65
+ type: 'ns:css-updates';
66
+ origin: string;
67
+ updates: CssUpdateItem[];
68
+ }
69
+ /** Incremental module-graph delta broadcast on every graph mutation. */
70
+ export interface HmrDeltaMessage {
71
+ type: 'ns:hmr-delta';
72
+ baseVersion: number;
73
+ newVersion: number;
74
+ changed: GraphModulePayload[];
75
+ removed: string[];
76
+ }
77
+ /** Full module-graph snapshot sent on connect and in response to `ns:hmr-resync-request`. */
78
+ export interface HmrFullGraphMessage {
79
+ type: 'ns:hmr-full-graph';
80
+ version: number;
81
+ modules: GraphModulePayload[];
82
+ }
83
+ /** Early "change in flight" notification sent at the very start of `handleHotUpdate`. */
84
+ export interface HmrPendingMessage {
85
+ type: 'ns:hmr-pending';
86
+ origin: string;
87
+ path: string;
88
+ kind: HmrPendingKind;
89
+ timestamp: number;
90
+ }
91
+ /**
92
+ * Response to a legacy on-demand module fetch (Option A).
93
+ *
94
+ * No server emit site currently exists — the live module-fetch path resolves
95
+ * HTTP URLs directly — but the client still handles this shape, so it is part
96
+ * of the union for completeness. Shape is inferred from the consumer.
97
+ */
98
+ export interface ModuleResponseMessage {
99
+ type: 'ns:module-response';
100
+ requestId: number;
101
+ error?: string;
102
+ }
103
+ /** TypeScript-flavor module registry primed on connect; coalesced into the graph client-side. */
104
+ export interface TsModuleRegistryMessage {
105
+ type: 'ns:ts-module-registry';
106
+ modules: string[];
107
+ ts: number;
108
+ }
109
+ /** Vue SFC registry sent on connect and in response to `ns:hmr-sfc-registry-request`. */
110
+ export interface VueSfcRegistryMessage {
111
+ type: 'ns:vue-sfc-registry';
112
+ entries: VueSfcRegistryEntry[];
113
+ ts: number;
114
+ }
115
+ /** Mapping-only Vue SFC registry update emitted ahead of the artifact for a changed `.vue` file. */
116
+ export interface VueSfcRegistryUpdateMessage {
117
+ type: 'ns:vue-sfc-registry-update';
118
+ path: string;
119
+ fileName: string;
120
+ ts: number;
121
+ version: number;
122
+ }
123
+ /** Device asks for a fresh full graph when its delta base version drifts from the server's. */
124
+ export interface HmrResyncRequestMessage {
125
+ type: 'ns:hmr-resync-request';
126
+ }
127
+ /** Device asks the server to rebuild and re-broadcast the SFC registry. */
128
+ export interface HmrSfcRegistryRequestMessage {
129
+ type: 'ns:hmr-sfc-registry-request';
130
+ }
131
+ /** Every `ns:*` message the dev server can send to the device. */
132
+ export type ServerToClientMessage = AngularUpdateMessage | CssUpdatesMessage | HmrDeltaMessage | HmrFullGraphMessage | HmrPendingMessage | ModuleResponseMessage | TsModuleRegistryMessage | VueSfcRegistryMessage | VueSfcRegistryUpdateMessage;
133
+ /** Every `ns:*` message the device can send back to the dev server. */
134
+ export type ClientToServerMessage = HmrResyncRequestMessage | HmrSfcRegistryRequestMessage;
135
+ /** Any `ns:*` HMR message, regardless of direction. */
136
+ export type NsHmrMessage = ServerToClientMessage | ClientToServerMessage;
137
+ /** The `type` discriminant of any `ns:*` HMR message. */
138
+ export type NsHmrMessageType = NsHmrMessage['type'];
139
+ /**
140
+ * Exhaustiveness guard for `switch (msg.type)` dispatch over the message unions.
141
+ * Reaching it means a new message type was added to the union but not handled;
142
+ * TypeScript flags the unhandled branch at compile time and this throws if a
143
+ * truly unexpected payload arrives at runtime.
144
+ */
145
+ export declare function assertNeverNsMessage(message: never): never;
@@ -0,0 +1,28 @@
1
+ /**
2
+ * Wire protocol for the `ns:*` HMR messages exchanged over the dev-server
3
+ * WebSocket between the Vite dev server and the on-device client.
4
+ *
5
+ * This is the single source of truth for message shapes. Server emit sites
6
+ * annotate their payload objects with the matching interface here, so a field
7
+ * rename or type drift becomes a compile error at the emit site instead of a
8
+ * silent runtime mismatch the device only discovers at parse time. The client
9
+ * dispatch (`switch (msg.type)`) consumes the `ServerToClientMessage` union and
10
+ * uses {@link assertNeverNsMessage} for exhaustiveness.
11
+ *
12
+ * Pure types + one pure helper only — this module is in `hmr/shared` and must
13
+ * not import from `hmr/server` or `hmr/client`.
14
+ *
15
+ * Direction is encoded by the two unions:
16
+ * - {@link ServerToClientMessage} — dev server → device (9 messages)
17
+ * - {@link ClientToServerMessage} — device → dev server (2 messages)
18
+ */
19
+ /**
20
+ * Exhaustiveness guard for `switch (msg.type)` dispatch over the message unions.
21
+ * Reaching it means a new message type was added to the union but not handled;
22
+ * TypeScript flags the unhandled branch at compile time and this throws if a
23
+ * truly unexpected payload arrives at runtime.
24
+ */
25
+ export function assertNeverNsMessage(message) {
26
+ throw new Error(`Unhandled ns:* HMR message: ${JSON.stringify(message)}`);
27
+ }
28
+ //# sourceMappingURL=protocol.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"protocol.js","sourceRoot":"","sources":["../../../../../packages/vite/hmr/shared/protocol.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAyJH;;;;;GAKG;AACH,MAAM,UAAU,oBAAoB,CAAC,OAAc;IAClD,MAAM,IAAI,KAAK,CAAC,+BAA+B,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC;AAC3E,CAAC"}
@@ -0,0 +1,69 @@
1
+ import type { HmrOverlaySnapshot } from './dev-overlay.js';
2
+ /**
3
+ * Calibrated palette for the boot placeholder card. The card is
4
+ * intentionally light so the small accent (brand badge + progress
5
+ * fill) reads as the only "live" element on the screen.
6
+ *
7
+ * Tones map to the snapshot tone enum from `dev-overlay.ts`:
8
+ * - `info` (default) — calm slate + NS blue
9
+ * - `error` — dusty rose-on-white surface
10
+ */
11
+ export type BootPlaceholderTone = 'info' | 'error';
12
+ export interface BootPlaceholderPalette {
13
+ pageBackground: string;
14
+ cardBackground: string;
15
+ cardShadow: string;
16
+ titleText: string;
17
+ phaseText: string;
18
+ detailText: string;
19
+ progressTrack: string;
20
+ progressFill: string;
21
+ activityIndicator: string;
22
+ }
23
+ /**
24
+ * Resolve the palette for a given tone. Unknown tones fall back to
25
+ * the calm `info` palette
26
+ */
27
+ export declare function getBootPlaceholderPalette(tone?: string | null): BootPlaceholderPalette;
28
+ /**
29
+ * Animation contract for the boot placeholder.
30
+ *
31
+ * `entranceDurationMs` covers the one-shot fade + scale that fires
32
+ * when the placeholder card first attaches to the visual tree.
33
+ * `entranceFromScale` is the starting scale before easeOut to 1.
34
+ *
35
+ * `progressDurationMs` is the per-update fade for the progress fill's
36
+ * `scaleX`. Pegged to 220 ms (just under the heartbeat's 250 ms tick)
37
+ * so consecutive ticks chain into continuous motion rather than
38
+ * waiting on the previous animation to settle.
39
+ *
40
+ * `brandPulseDurationMs` is one half-period of the brand badge's
41
+ * opacity pulse. A full cycle is `brandPulseDurationMs * 2`. Keeping
42
+ * it long (~1.2 s) makes the pulse feel ambient rather than nervous.
43
+ */
44
+ export declare const BOOT_PLACEHOLDER_MOTION: {
45
+ readonly entranceDurationMs: 380;
46
+ readonly entranceFromScale: 0.94;
47
+ readonly progressDurationMs: 220;
48
+ readonly brandPulseDurationMs: 1200;
49
+ readonly brandPulseMinOpacity: 0.55;
50
+ };
51
+ /**
52
+ * Convert a 0–100 progress percentage into an `scaleX` factor that
53
+ * the fill view can animate against. Clamps to [`minScale`, 1] so the
54
+ * fill never collapses to an invisible hairline
55
+ *
56
+ * The default `minScale` of 0.01 keeps the bar visible during the
57
+ * earliest moments of boot when progress is 0
58
+ */
59
+ export declare function computeBootProgressFillScale(progress: number | null | undefined, minScale?: number): number;
60
+ /**
61
+ * The "phase + percent" line we show as the primary status text
62
+ * inside the card
63
+ */
64
+ export declare function formatBootPrimaryLine(snapshot: Pick<HmrOverlaySnapshot, 'phase' | 'progress'> | null | undefined): string;
65
+ /**
66
+ * The secondary detail line (e.g. "Loading the module graph…" or
67
+ * "Evaluated 42 modules").
68
+ */
69
+ export declare function formatBootDetailLine(snapshot: Pick<HmrOverlaySnapshot, 'detail'> | null | undefined): string;
@@ -0,0 +1,101 @@
1
+ // Pure helpers for the cold-boot placeholder's visual treatment.
2
+ //
3
+ // The visible UI is constructed in `root-placeholder.ts` (an NS view
4
+ // tree attached to `Application` via `launchEvent`), and driven by the
5
+ // dev-overlay via `updateBootStatusLabel`. This file owns the bits
6
+ // that don't need a runtime view tree to make sense — colours,
7
+ // animation timings, the formula that turns a 0–100 progress into the
8
+ // fill bar's `scaleX`, and the split between the "phase + percent"
9
+ // primary line and the secondary detail line.
10
+ //
11
+ const INFO_PALETTE = {
12
+ pageBackground: '#F4F7FB',
13
+ cardBackground: '#FFFFFF',
14
+ cardShadow: '#0F172A',
15
+ titleText: '#0F172A',
16
+ phaseText: '#475569',
17
+ detailText: '#94A3B8',
18
+ progressTrack: '#E2E8F0',
19
+ progressFill: '#3B6FE5',
20
+ activityIndicator: '#3B6FE5',
21
+ };
22
+ const ERROR_PALETTE = {
23
+ pageBackground: '#FFF5F5',
24
+ cardBackground: '#FFFFFF',
25
+ cardShadow: '#7F1D1D',
26
+ titleText: '#7F1D1D',
27
+ phaseText: '#B91C1C',
28
+ detailText: '#DC2626',
29
+ progressTrack: '#FCA5A5',
30
+ progressFill: '#B41810',
31
+ activityIndicator: '#B41810',
32
+ };
33
+ /**
34
+ * Resolve the palette for a given tone. Unknown tones fall back to
35
+ * the calm `info` palette
36
+ */
37
+ export function getBootPlaceholderPalette(tone) {
38
+ if (tone === 'error')
39
+ return ERROR_PALETTE;
40
+ return INFO_PALETTE;
41
+ }
42
+ /**
43
+ * Animation contract for the boot placeholder.
44
+ *
45
+ * `entranceDurationMs` covers the one-shot fade + scale that fires
46
+ * when the placeholder card first attaches to the visual tree.
47
+ * `entranceFromScale` is the starting scale before easeOut to 1.
48
+ *
49
+ * `progressDurationMs` is the per-update fade for the progress fill's
50
+ * `scaleX`. Pegged to 220 ms (just under the heartbeat's 250 ms tick)
51
+ * so consecutive ticks chain into continuous motion rather than
52
+ * waiting on the previous animation to settle.
53
+ *
54
+ * `brandPulseDurationMs` is one half-period of the brand badge's
55
+ * opacity pulse. A full cycle is `brandPulseDurationMs * 2`. Keeping
56
+ * it long (~1.2 s) makes the pulse feel ambient rather than nervous.
57
+ */
58
+ export const BOOT_PLACEHOLDER_MOTION = {
59
+ entranceDurationMs: 380,
60
+ entranceFromScale: 0.94,
61
+ progressDurationMs: 220,
62
+ brandPulseDurationMs: 1200,
63
+ brandPulseMinOpacity: 0.55,
64
+ };
65
+ /**
66
+ * Convert a 0–100 progress percentage into an `scaleX` factor that
67
+ * the fill view can animate against. Clamps to [`minScale`, 1] so the
68
+ * fill never collapses to an invisible hairline
69
+ *
70
+ * The default `minScale` of 0.01 keeps the bar visible during the
71
+ * earliest moments of boot when progress is 0
72
+ */
73
+ export function computeBootProgressFillScale(progress, minScale = 0.01) {
74
+ const numeric = typeof progress === 'number' && Number.isFinite(progress) ? progress : 0;
75
+ const normalized = numeric / 100;
76
+ if (!Number.isFinite(normalized))
77
+ return minScale;
78
+ return Math.max(minScale, Math.min(1, normalized));
79
+ }
80
+ /**
81
+ * The "phase + percent" line we show as the primary status text
82
+ * inside the card
83
+ */
84
+ export function formatBootPrimaryLine(snapshot) {
85
+ if (!snapshot)
86
+ return '';
87
+ const progress = snapshot.progress;
88
+ const progressText = typeof progress === 'number' && Number.isFinite(progress) ? ` (${Math.round(progress)}%)` : '';
89
+ return `${snapshot.phase || ''}${progressText}`.trim();
90
+ }
91
+ /**
92
+ * The secondary detail line (e.g. "Loading the module graph…" or
93
+ * "Evaluated 42 modules").
94
+ */
95
+ export function formatBootDetailLine(snapshot) {
96
+ if (!snapshot)
97
+ return '';
98
+ const detail = snapshot.detail;
99
+ return typeof detail === 'string' ? detail : '';
100
+ }
101
+ //# sourceMappingURL=boot-placeholder-ui.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"boot-placeholder-ui.js","sourceRoot":"","sources":["../../../../../../packages/vite/hmr/shared/runtime/boot-placeholder-ui.ts"],"names":[],"mappings":"AAAA,iEAAiE;AACjE,EAAE;AACF,qEAAqE;AACrE,uEAAuE;AACvE,mEAAmE;AACnE,+DAA+D;AAC/D,sEAAsE;AACtE,m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C,UAAU,CAAC;QAAE,OAAO,QAAQ,CAAC;IAClD,OAAO,IAAI,CAAC,GAAG,CAAC,QAAQ,EAAE,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,UAAU,CAAC,CAAC,CAAC;AACpD,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,qBAAqB,CAAC,QAA2E;IAChH,IAAI,CAAC,QAAQ;QAAE,OAAO,EAAE,CAAC;IACzB,MAAM,QAAQ,GAAG,QAAQ,CAAC,QAAQ,CAAC;IACnC,MAAM,YAAY,GAAG,OAAO,QAAQ,KAAK,QAAQ,IAAI,MAAM,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,KAAK,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC;IACpH,OAAO,GAAG,QAAQ,CAAC,KAAK,IAAI,EAAE,GAAG,YAAY,EAAE,CAAC,IAAI,EAAE,CAAC;AACxD,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,oBAAoB,CAAC,QAA+D;IACnG,IAAI,CAAC,QAAQ;QAAE,OAAO,EAAE,CAAC;IACzB,MAAM,MAAM,GAAG,QAAQ,CAAC,MAAM,CAAC;IAC/B,OAAO,OAAO,MAAM,KAAK,QAAQ,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC;AACjD,CAAC"}
@@ -0,0 +1,44 @@
1
+ /**
2
+ * `'importing-main'` is the long HTTP-module-load phase (5–10s for a
3
+ * real Angular app). The bar uses this range so the user sees ~62
4
+ * percentage points of motion during the phase that actually takes
5
+ * time, sandwiched between the cheap bootstrap stages
6
+ * ('configuring-import-map' = 26) and the post-import wait
7
+ * ('waiting-for-app' = 94 → 'app-root-committed' = 100).
8
+ */
9
+ export declare const BOOT_IMPORT_PROGRESS_MIN = 30;
10
+ export declare const BOOT_IMPORT_PROGRESS_MAX = 92;
11
+ /** Ceiling guards against rounding into `'waiting-for-app'` (94). */
12
+ export declare const BOOT_IMPORT_PROGRESS_CEILING = 94;
13
+ export declare function computeBootImportProgress(input: {
14
+ count?: number;
15
+ elapsedMs?: number;
16
+ }): number;
17
+ /**
18
+ * Render the second-line detail for the placeholder. Surfaces the
19
+ * count + last-loaded module path once the snippet has fired, or a
20
+ * generic "Loading the module graph…" line during the pre-snippet
21
+ * window.
22
+ *
23
+ * No elapsed-ms readout: the primary line's percentage is the progress
24
+ * signal, and the heartbeat's `elapsedMs` is wall-clock since the import
25
+ * started — not a per-module timing — so surfacing it next to the
26
+ * percentage read as a confusing, inaccurate duration.
27
+ */
28
+ export declare function formatBootImportDetail(input: {
29
+ count?: number;
30
+ lastModule?: string;
31
+ }): string;
32
+ /**
33
+ * Ratchet a candidate boot-import progress value against the highest
34
+ * value any consumer has emitted so far (stored on
35
+ * `globalThis.__NS_HMR_BOOT_LAST_PROGRESS__`). Reset by
36
+ * `clearBootProgressState` between sessions.
37
+ */
38
+ export declare function applyMonotonicBootProgress(candidate: number): number;
39
+ /**
40
+ * Reset every boot-progress global so a re-bootstrapped session (e.g.
41
+ * after `__reboot_ng_modules__`) starts a fresh ratchet rather than
42
+ * inheriting the previous cycle's terminal values.
43
+ */
44
+ export declare function clearBootProgressState(): void;
@@ -0,0 +1,133 @@
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 `__ns_boot__/b1`-tagged module and bumps the count /
7
+ // last-module globals (FULLY SYNCHRONOUS — see the snippet doc for
8
+ // why top-level await must stay out of boot-tagged modules).
9
+ // * `startBrowserRuntimeSession` stamps the time origin
10
+ // (`__NS_HMR_BOOT_IMPORT_STARTED_AT__`) right before
11
+ // `__nsStartDevSession`.
12
+ // * `startBootImportHeartbeat` reads both signals every 250 ms and
13
+ // re-asserts `'importing-main'` so the bar climbs even across long
14
+ // vendor stretches that don't tick the count axis. The iOS runtime's
15
+ // `MaybePumpJSThreadDuringBoot` keeps the JS-thread CFRunLoop ticking
16
+ // between synchronous fetches so the heartbeat's `setInterval` timer
17
+ // can fire during the cold-boot module walk.
18
+ //
19
+ // Monotonic ratchet (`applyMonotonicBootProgress`,
20
+ // `__NS_HMR_BOOT_LAST_PROGRESS__`): each tick can never undercut the
21
+ // previous one, preventing visible stutter when the count axis briefly
22
+ // wins over the time axis.
23
+ /**
24
+ * `'importing-main'` is the long HTTP-module-load phase (5–10s for a
25
+ * real Angular app). The bar uses this range so the user sees ~62
26
+ * percentage points of motion during the phase that actually takes
27
+ * time, sandwiched between the cheap bootstrap stages
28
+ * ('configuring-import-map' = 26) and the post-import wait
29
+ * ('waiting-for-app' = 94 → 'app-root-committed' = 100).
30
+ */
31
+ export const BOOT_IMPORT_PROGRESS_MIN = 30;
32
+ export const BOOT_IMPORT_PROGRESS_MAX = 92;
33
+ /** Ceiling guards against rounding into `'waiting-for-app'` (94). */
34
+ export const BOOT_IMPORT_PROGRESS_CEILING = 94;
35
+ const BOOT_IMPORT_PROGRESS_RANGE = BOOT_IMPORT_PROGRESS_MAX - BOOT_IMPORT_PROGRESS_MIN;
36
+ /**
37
+ * Compute the percentage shown next to "Importing the app entry".
38
+ *
39
+ * Sum of two clamped contributions:
40
+ * * `progressFromCount` — `__NS_HMR_BOOT_MODULE_COUNT__` bumped by the
41
+ * boot snippet (1 unit per 2 modules, cap 40).
42
+ * * `progressFromTime` — elapsed wall-clock since
43
+ * `__NS_HMR_BOOT_IMPORT_STARTED_AT__` (1 unit per 250 ms, cap
44
+ * matches the full 62-point range so time alone can drive the bar
45
+ * 30 → 92 if the count axis is starved).
46
+ *
47
+ * The count axis goes silent in long node_modules stretches and on
48
+ * Vite's rewrite chains where the served import URL skips the
49
+ * `__ns_boot__/b1` prefix; the time axis covers those gaps. Both
50
+ * contributions are summed, clamped to the 62-point range, then
51
+ * ceilinged so they cannot cross into 'waiting-for-app' (94+).
52
+ *
53
+ * Canonical values are pinned by `boot-progress.spec.ts`. The
54
+ * server-side snippet does NOT mirror this math — it only writes the
55
+ * counters; the heartbeat in `session-bootstrap.ts` is the sole caller.
56
+ */
57
+ const BOOT_IMPORT_COUNT_CONTRIBUTION_MAX = 40;
58
+ const BOOT_IMPORT_TIME_CONTRIBUTION_MAX = 62;
59
+ const BOOT_IMPORT_COUNT_DIVISOR = 2;
60
+ const BOOT_IMPORT_TIME_TICK_MS = 250;
61
+ export function computeBootImportProgress(input) {
62
+ // Coerce NaN / ±Infinity / negatives to 0 — `Math.max(0, NaN)` is NaN.
63
+ const rawCount = Number(input?.count ?? 0);
64
+ const rawElapsed = Number(input?.elapsedMs ?? 0);
65
+ const count = Number.isFinite(rawCount) ? Math.max(0, rawCount) : 0;
66
+ const elapsedMs = Number.isFinite(rawElapsed) ? Math.max(0, rawElapsed) : 0;
67
+ const progressFromCount = Math.min(BOOT_IMPORT_COUNT_CONTRIBUTION_MAX, Math.floor(count / BOOT_IMPORT_COUNT_DIVISOR));
68
+ const progressFromTime = Math.min(BOOT_IMPORT_TIME_CONTRIBUTION_MAX, Math.floor(elapsedMs / BOOT_IMPORT_TIME_TICK_MS));
69
+ const combined = BOOT_IMPORT_PROGRESS_MIN + Math.min(BOOT_IMPORT_PROGRESS_RANGE, progressFromCount + progressFromTime);
70
+ return Math.min(BOOT_IMPORT_PROGRESS_CEILING, combined);
71
+ }
72
+ /**
73
+ * Render the second-line detail for the placeholder. Surfaces the
74
+ * count + last-loaded module path once the snippet has fired, or a
75
+ * generic "Loading the module graph…" line during the pre-snippet
76
+ * window.
77
+ *
78
+ * No elapsed-ms readout: the primary line's percentage is the progress
79
+ * signal, and the heartbeat's `elapsedMs` is wall-clock since the import
80
+ * started — not a per-module timing — so surfacing it next to the
81
+ * percentage read as a confusing, inaccurate duration.
82
+ */
83
+ export function formatBootImportDetail(input) {
84
+ const count = Math.max(0, Number(input?.count ?? 0));
85
+ const lastModule = typeof input?.lastModule === 'string' ? input.lastModule : '';
86
+ if (count > 0) {
87
+ return lastModule ? `Evaluated ${count} modules\n${lastModule}` : `Evaluated ${count} modules`;
88
+ }
89
+ return 'Loading the module graph…';
90
+ }
91
+ /**
92
+ * Ratchet a candidate boot-import progress value against the highest
93
+ * value any consumer has emitted so far (stored on
94
+ * `globalThis.__NS_HMR_BOOT_LAST_PROGRESS__`). Reset by
95
+ * `clearBootProgressState` between sessions.
96
+ */
97
+ export function applyMonotonicBootProgress(candidate) {
98
+ const g = getGlobalScope();
99
+ const previousRaw = g.__NS_HMR_BOOT_LAST_PROGRESS__;
100
+ const previous = typeof previousRaw === 'number' && Number.isFinite(previousRaw) ? previousRaw : 0;
101
+ const next = Math.max(previous, Math.max(0, Number(candidate) || 0));
102
+ try {
103
+ g.__NS_HMR_BOOT_LAST_PROGRESS__ = next;
104
+ }
105
+ catch { }
106
+ return next;
107
+ }
108
+ /**
109
+ * Reset every boot-progress global so a re-bootstrapped session (e.g.
110
+ * after `__reboot_ng_modules__`) starts a fresh ratchet rather than
111
+ * inheriting the previous cycle's terminal values.
112
+ */
113
+ export function clearBootProgressState() {
114
+ const g = getGlobalScope();
115
+ for (const key of [
116
+ '__NS_HMR_BOOT_MODULE_COUNT__',
117
+ '__NS_HMR_BOOT_LAST_MODULE__',
118
+ '__NS_HMR_BOOT_LAST_PROGRESS__',
119
+ '__NS_HMR_BOOT_LAST_PROGRESS_AT__',
120
+ '__NS_HMR_BOOT_IMPORT_STARTED_AT__',
121
+ // Defensive: an earlier snippet shape used this to throttle a
122
+ // top-level await yield. Removed — top-level await in a boot-tagged
123
+ // module trips the iOS 10s async-module deadline. Cleared in case a
124
+ // stale boot left it behind.
125
+ '__NS_HMR_BOOT_LAST_YIELD_AT__',
126
+ ]) {
127
+ try {
128
+ delete g[key];
129
+ }
130
+ catch { }
131
+ }
132
+ }
133
+ //# sourceMappingURL=boot-progress.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"boot-progress.js","sourceRoot":"","sources":["../../../../../../packages/vite/hmr/shared/runtime/boot-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GAAG,OAAO,WAAW,KAAK,QAAQ,IAAI,MAAM,CAAC,QAAQ,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,CAAC;IACnG,MAAM,IAAI,GAAG,IAAI,CAAC,GAAG,CAAC,QAAQ,EAAE,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,MAAM,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IACrE,IAAI,CAAC;QACJ,CAAC,CAAC,6BAA6B,GAAG,IAAI,CAAC;IACxC,CAAC;IAAC,MAAM,CAAC,CAAA,CAAC;IACV,OAAO,IAAI,CAAC;AACb,CAAC;AAED;;;;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"}
@@ -0,0 +1,18 @@
1
+ export type BootTraceSegment = {
2
+ ok?: boolean;
3
+ ms?: number;
4
+ meta?: Record<string, unknown>;
5
+ };
6
+ export type BootTrace = {
7
+ t0: number;
8
+ t1?: number;
9
+ session?: BootTraceSegment;
10
+ importMap?: BootTraceSegment;
11
+ kickstart?: BootTraceSegment;
12
+ native?: BootTraceSegment;
13
+ error?: {
14
+ message: string;
15
+ };
16
+ };
17
+ export declare function formatBootTimeline(trace: BootTrace): string;
18
+ export declare function publishBootTrace(trace: BootTrace): void;
@@ -0,0 +1,42 @@
1
+ import { getGlobalScope } from './global-scope.js';
2
+ // Pure formatter so we can unit-test the exact string shape without
3
+ // touching `console.info` or `Date.now()`.
4
+ //
5
+ // Format:
6
+ // [ns-boot] ok total=1234ms session=45ms importMap=67ms native=1100ms
7
+ // [ns-boot] FAILED total=230ms session=45ms ...: <message>
8
+ //
9
+ // Segment entries are only included when a numeric `ms` was recorded —
10
+ // this keeps the log compact when a particular phase was skipped (e.g.
11
+ // `__NS_IMPORT_MAP_CONFIGURED__` dedup) or never reached (early error).
12
+ export function formatBootTimeline(trace) {
13
+ const status = trace.error ? 'FAILED' : 'ok';
14
+ const parts = [];
15
+ const push = (label, seg) => {
16
+ if (seg && typeof seg.ms === 'number' && Number.isFinite(seg.ms)) {
17
+ parts.push(`${label}=${Math.max(0, Math.round(seg.ms))}ms`);
18
+ }
19
+ };
20
+ const total = typeof trace.t0 === 'number' && typeof trace.t1 === 'number' ? trace.t1 - trace.t0 : undefined;
21
+ if (typeof total === 'number' && Number.isFinite(total)) {
22
+ parts.push(`total=${Math.max(0, Math.round(total))}ms`);
23
+ }
24
+ push('session', trace.session);
25
+ push('importMap', trace.importMap);
26
+ push('kickstart', trace.kickstart);
27
+ push('native', trace.native);
28
+ const suffix = trace.error?.message ? `: ${trace.error.message}` : '';
29
+ return `[ns-boot] ${status} ${parts.join(' ')}${suffix}`.replace(/\s+$/, '');
30
+ }
31
+ // Install the trace on `globalThis` so diagnostics can pick it up. We
32
+ // use a distinct key from the legacy entry-runtime trace so existing
33
+ // readers that expect `__NS_ENTRY_TRACE__` keep working. Exported for
34
+ // tests; the runtime path calls this from the session-bootstrap finally
35
+ // block.
36
+ export function publishBootTrace(trace) {
37
+ try {
38
+ getGlobalScope().__NS_BOOT_TRACE__ = trace;
39
+ }
40
+ catch { }
41
+ }
42
+ //# sourceMappingURL=boot-timeline.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"boot-timeline.js","sourceRoot":"","sources":["../../../../../../packages/vite/hmr/shared/runtime/boot-timeline.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,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K,CAAC,SAAS,CAAC,CAAC;IACnC,IAAI,CAAC,WAAW,EAAE,KAAK,CAAC,SAAS,CAAC,CAAC;IACnC,IAAI,CAAC,QAAQ,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IAE7B,MAAM,MAAM,GAAG,KAAK,CAAC,KAAK,EAAE,OAAO,CAAC,CAAC,CAAC,KAAK,KAAK,CAAC,KAAK,CAAC,OAAO,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;IAEtE,OAAO,aAAa,MAAM,IAAI,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,GAAG,MAAM,EAAE,CAAC,OAAO,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC;AAC9E,CAAC;AAED,sEAAsE;AACtE,qEAAqE;AACrE,sEAAsE;AACtE,wEAAwE;AACxE,SAAS;AACT,MAAM,UAAU,gBAAgB,CAAC,KAAgB;IAChD,IAAI,CAAC;QACJ,cAAc,EAAE,CAAC,iBAAiB,GAAG,KAAK,CAAC;IAC5C,CAAC;IAAC,MAAM,CAAC,CAAA,CAAC;AACX,CAAC"}
@@ -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,CAAC,MAAM,uBAAuB,GAAG,CAAC,yBAAyB,EAAE,+BAA+B,CAA8C,CAAC;AAEjJ,MAAM,CAAC,MAAM,8BAA8B,GAAG,CAAC,WAAW,EAAE,QAAQ,EAAE,UAAU,EAAE,WAAW,EAAE,OAAO,EAAE,UAAU,CAAU,CAAC;AAS7H,MAAM,CAAC,MAAM,4BAA4B,GAAyE;IACjH,UAAU,EAAE,IAAI;IAChB,MAAM,EAAE,IAAI;CACZ,CAAC;AA6CF,SAAS,gBAAgB,CAAC,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B,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,GAAG,mBAA4B,CAAC;AACtE,MAAM,CAAC,MAAM,+BAA+B,GAAG,yBAAkC,CAAC;AAClF,MAAM,CAAC,MAAM,uBAAuB,GAAG,CAAC,yBAAyB,EAAE,+BAA+B,CAA8C,CAAC;AAEjJ,MAAM,CAAC,MAAM,8BAA8B,GAAG,CAAC,WAAW,EAAE,QAAQ,EAAE,UAAU,EAAE,WAAW,EAAE,OAAO,EAAE,UAAU,CAAU,CAAC;AAS7H,MAAM,CAAC,MAAM,4BAA4B,GAAyE;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AI,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"}
@@ -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 {};