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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (424) hide show
  1. package/README.md +51 -11
  2. package/bin/cli.cjs +8 -14
  3. package/configuration/angular.d.ts +34 -1
  4. package/configuration/angular.js +376 -165
  5. package/configuration/angular.js.map +1 -1
  6. package/configuration/base.js +241 -51
  7. package/configuration/base.js.map +1 -1
  8. package/configuration/javascript.js +14 -93
  9. package/configuration/javascript.js.map +1 -1
  10. package/configuration/react.js +41 -73
  11. package/configuration/react.js.map +1 -1
  12. package/configuration/solid.js +51 -6
  13. package/configuration/solid.js.map +1 -1
  14. package/configuration/typescript.js +12 -93
  15. package/configuration/typescript.js.map +1 -1
  16. package/helpers/app-components.d.ts +2 -1
  17. package/helpers/app-components.js.map +1 -1
  18. package/helpers/app-css-state.d.ts +8 -0
  19. package/helpers/app-css-state.js +8 -0
  20. package/helpers/app-css-state.js.map +1 -0
  21. package/helpers/bundler-context.d.ts +11 -0
  22. package/helpers/bundler-context.js +71 -0
  23. package/helpers/bundler-context.js.map +1 -0
  24. package/helpers/cli-flags.d.ts +12 -0
  25. package/helpers/cli-flags.js +34 -0
  26. package/helpers/cli-flags.js.map +1 -1
  27. package/helpers/css-platform-plugin.d.ts +14 -0
  28. package/helpers/css-platform-plugin.js +43 -25
  29. package/helpers/css-platform-plugin.js.map +1 -1
  30. package/helpers/dev-host.d.ts +360 -0
  31. package/helpers/dev-host.js +694 -0
  32. package/helpers/dev-host.js.map +1 -0
  33. package/helpers/dynamic-import-plugin.js +1 -1
  34. package/helpers/dynamic-import-plugin.js.map +1 -1
  35. package/helpers/esbuild-platform-resolver.js +4 -1
  36. package/helpers/esbuild-platform-resolver.js.map +1 -1
  37. package/helpers/external-configs.d.ts +10 -12
  38. package/helpers/external-configs.js +58 -35
  39. package/helpers/external-configs.js.map +1 -1
  40. package/helpers/global-defines.d.ts +142 -0
  41. package/helpers/global-defines.js +213 -11
  42. package/helpers/global-defines.js.map +1 -1
  43. package/helpers/hmr-scope.d.ts +26 -0
  44. package/helpers/hmr-scope.js +67 -0
  45. package/helpers/hmr-scope.js.map +1 -0
  46. package/helpers/init.js +0 -18
  47. package/helpers/init.js.map +1 -1
  48. package/helpers/logging.d.ts +1 -0
  49. package/helpers/logging.js +65 -4
  50. package/helpers/logging.js.map +1 -1
  51. package/helpers/main-entry.d.ts +3 -1
  52. package/helpers/main-entry.js +301 -53
  53. package/helpers/main-entry.js.map +1 -1
  54. package/helpers/nativeclass-esbuild-plugin.d.ts +2 -1
  55. package/helpers/nativeclass-esbuild-plugin.js.map +1 -1
  56. package/helpers/nativeclass-transform.js +5 -6
  57. package/helpers/nativeclass-transform.js.map +1 -1
  58. package/helpers/nativeclass-transformer-plugin.d.ts +9 -2
  59. package/helpers/nativeclass-transformer-plugin.js +157 -14
  60. package/helpers/nativeclass-transformer-plugin.js.map +1 -1
  61. package/helpers/nativescript-package-resolver.js +10 -62
  62. package/helpers/nativescript-package-resolver.js.map +1 -1
  63. package/helpers/normalize-id.d.ts +42 -0
  64. package/helpers/normalize-id.js +60 -0
  65. package/helpers/normalize-id.js.map +1 -0
  66. package/helpers/ns-core-url.d.ts +29 -7
  67. package/helpers/ns-core-url.js +69 -12
  68. package/helpers/ns-core-url.js.map +1 -1
  69. package/helpers/optimize-deps.d.ts +16 -0
  70. package/helpers/optimize-deps.js +17 -0
  71. package/helpers/optimize-deps.js.map +1 -0
  72. package/helpers/package-platform-aliases.js +34 -49
  73. package/helpers/package-platform-aliases.js.map +1 -1
  74. package/helpers/platform-types.d.ts +2 -0
  75. package/helpers/platform-types.js +2 -0
  76. package/helpers/platform-types.js.map +1 -0
  77. package/helpers/postcss-platform-config.d.ts +17 -1
  78. package/helpers/postcss-platform-config.js +20 -37
  79. package/helpers/postcss-platform-config.js.map +1 -1
  80. package/helpers/project.d.ts +35 -0
  81. package/helpers/project.js +120 -2
  82. package/helpers/project.js.map +1 -1
  83. package/helpers/resolve-main-field-platform.d.ts +20 -0
  84. package/helpers/resolve-main-field-platform.js +49 -0
  85. package/helpers/resolve-main-field-platform.js.map +1 -0
  86. package/helpers/resolver.js +17 -2
  87. package/helpers/resolver.js.map +1 -1
  88. package/helpers/theme-core-plugins.js +1 -1
  89. package/helpers/theme-core-plugins.js.map +1 -1
  90. package/helpers/ts-config-paths.d.ts +14 -0
  91. package/helpers/ts-config-paths.js +90 -9
  92. package/helpers/ts-config-paths.js.map +1 -1
  93. package/helpers/typescript-check.d.ts +2 -1
  94. package/helpers/typescript-check.js +2 -2
  95. package/helpers/typescript-check.js.map +1 -1
  96. package/helpers/ui-registration.d.ts +21 -0
  97. package/helpers/ui-registration.js +156 -0
  98. package/helpers/ui-registration.js.map +1 -0
  99. package/helpers/utils.d.ts +9 -0
  100. package/helpers/utils.js +22 -2
  101. package/helpers/utils.js.map +1 -1
  102. package/helpers/workers.d.ts +20 -19
  103. package/helpers/workers.js +624 -4
  104. package/helpers/workers.js.map +1 -1
  105. package/hmr/client/css-handler.d.ts +2 -1
  106. package/hmr/client/css-handler.js +50 -26
  107. package/hmr/client/css-handler.js.map +1 -1
  108. package/hmr/client/css-update-overlay.d.ts +18 -0
  109. package/hmr/client/css-update-overlay.js +27 -0
  110. package/hmr/client/css-update-overlay.js.map +1 -0
  111. package/hmr/client/framework-client-strategy.d.ts +79 -0
  112. package/hmr/client/framework-client-strategy.js +19 -0
  113. package/hmr/client/framework-client-strategy.js.map +1 -0
  114. package/hmr/client/hmr-pending-overlay.d.ts +13 -0
  115. package/hmr/client/hmr-pending-overlay.js +60 -0
  116. package/hmr/client/hmr-pending-overlay.js.map +1 -0
  117. package/hmr/client/index.js +891 -220
  118. package/hmr/client/index.js.map +1 -1
  119. package/hmr/client/utils.d.ts +7 -1
  120. package/hmr/client/utils.js +207 -29
  121. package/hmr/client/utils.js.map +1 -1
  122. package/hmr/entry-runtime.d.ts +2 -1
  123. package/hmr/entry-runtime.js +256 -69
  124. package/hmr/entry-runtime.js.map +1 -1
  125. package/hmr/frameworks/angular/build/angular-linker.d.ts +12 -0
  126. package/hmr/frameworks/angular/build/angular-linker.js +109 -0
  127. package/hmr/frameworks/angular/build/angular-linker.js.map +1 -0
  128. package/hmr/frameworks/angular/build/inject-component-hmr-registration.d.ts +112 -0
  129. package/hmr/frameworks/angular/build/inject-component-hmr-registration.js +291 -0
  130. package/hmr/frameworks/angular/build/inject-component-hmr-registration.js.map +1 -0
  131. package/hmr/frameworks/angular/build/inject-hmr-vite-ignore.d.ts +75 -0
  132. package/hmr/frameworks/angular/build/inject-hmr-vite-ignore.js +221 -0
  133. package/hmr/frameworks/angular/build/inject-hmr-vite-ignore.js.map +1 -0
  134. package/{helpers/angular → hmr/frameworks/angular/build}/inline-decorator-component-templates.js +1 -170
  135. package/hmr/frameworks/angular/build/inline-decorator-component-templates.js.map +1 -0
  136. package/hmr/frameworks/angular/build/js-lexer.d.ts +4 -0
  137. package/{helpers/angular/synthesize-decorator-ctor-parameters.js → hmr/frameworks/angular/build/js-lexer.js} +22 -96
  138. package/hmr/frameworks/angular/build/js-lexer.js.map +1 -0
  139. package/hmr/frameworks/angular/build/shared-linker.d.ts +39 -0
  140. package/hmr/frameworks/angular/build/shared-linker.js +128 -0
  141. package/hmr/frameworks/angular/build/shared-linker.js.map +1 -0
  142. package/hmr/frameworks/angular/build/synthesize-decorator-ctor-parameters.js +88 -0
  143. package/hmr/frameworks/angular/build/synthesize-decorator-ctor-parameters.js.map +1 -0
  144. package/{helpers/angular → hmr/frameworks/angular/build}/synthesize-injectable-factories.js +1 -174
  145. package/hmr/frameworks/angular/build/synthesize-injectable-factories.js.map +1 -0
  146. package/{helpers/angular → hmr/frameworks/angular/build}/util.d.ts +1 -0
  147. package/hmr/frameworks/angular/build/util.js +155 -0
  148. package/hmr/frameworks/angular/build/util.js.map +1 -0
  149. package/hmr/frameworks/angular/client/index.d.ts +1 -0
  150. package/hmr/frameworks/angular/client/index.js +859 -21
  151. package/hmr/frameworks/angular/client/index.js.map +1 -1
  152. package/hmr/frameworks/angular/client/strategy.d.ts +9 -0
  153. package/hmr/frameworks/angular/client/strategy.js +19 -0
  154. package/hmr/frameworks/angular/client/strategy.js.map +1 -0
  155. package/hmr/frameworks/angular/server/angular-root-component.d.ts +79 -0
  156. package/hmr/frameworks/angular/server/angular-root-component.js +149 -0
  157. package/hmr/frameworks/angular/server/angular-root-component.js.map +1 -0
  158. package/hmr/frameworks/angular/server/linker.js +1 -4
  159. package/hmr/frameworks/angular/server/linker.js.map +1 -1
  160. package/hmr/frameworks/angular/server/strategy.js +460 -12
  161. package/hmr/frameworks/angular/server/strategy.js.map +1 -1
  162. package/hmr/{server → frameworks/angular/server}/websocket-angular-entry.js +2 -2
  163. package/hmr/frameworks/angular/server/websocket-angular-entry.js.map +1 -0
  164. package/hmr/{server → frameworks/angular/server}/websocket-angular-hot-update.d.ts +17 -11
  165. package/hmr/frameworks/angular/server/websocket-angular-hot-update.js +336 -0
  166. package/hmr/frameworks/angular/server/websocket-angular-hot-update.js.map +1 -0
  167. package/hmr/frameworks/react/server/strategy.d.ts +2 -0
  168. package/hmr/frameworks/react/server/strategy.js +150 -0
  169. package/hmr/frameworks/react/server/strategy.js.map +1 -0
  170. package/hmr/frameworks/solid/build/solid-jsx-deps.d.ts +15 -0
  171. package/hmr/frameworks/solid/build/solid-jsx-deps.js +178 -0
  172. package/hmr/frameworks/solid/build/solid-jsx-deps.js.map +1 -0
  173. package/hmr/frameworks/solid/client/app-runtime.d.ts +54 -0
  174. package/hmr/frameworks/solid/client/app-runtime.js +184 -0
  175. package/hmr/frameworks/solid/client/app-runtime.js.map +1 -0
  176. package/hmr/frameworks/solid/server/strategy.js +291 -16
  177. package/hmr/frameworks/solid/server/strategy.js.map +1 -1
  178. package/hmr/frameworks/typescript/server/strategy.js +38 -14
  179. package/hmr/frameworks/typescript/server/strategy.js.map +1 -1
  180. package/hmr/frameworks/vue/client/dep-propagation.d.ts +36 -0
  181. package/hmr/frameworks/vue/client/dep-propagation.js +101 -0
  182. package/hmr/frameworks/vue/client/dep-propagation.js.map +1 -0
  183. package/hmr/frameworks/vue/client/index.d.ts +8 -0
  184. package/hmr/frameworks/vue/client/index.js +56 -243
  185. package/hmr/frameworks/vue/client/index.js.map +1 -1
  186. package/hmr/frameworks/vue/client/strategy.d.ts +33 -0
  187. package/hmr/frameworks/vue/client/strategy.js +157 -0
  188. package/hmr/frameworks/vue/client/strategy.js.map +1 -0
  189. package/hmr/frameworks/vue/client/vue-sfc-update-overlay.d.ts +49 -0
  190. package/hmr/frameworks/vue/client/vue-sfc-update-overlay.js +142 -0
  191. package/hmr/frameworks/vue/client/vue-sfc-update-overlay.js.map +1 -0
  192. package/hmr/frameworks/vue/server/sfc-route-assemble.d.ts +7 -0
  193. package/hmr/frameworks/vue/server/sfc-route-assemble.js +747 -0
  194. package/hmr/frameworks/vue/server/sfc-route-assemble.js.map +1 -0
  195. package/hmr/frameworks/vue/server/sfc-route-meta.d.ts +7 -0
  196. package/hmr/frameworks/vue/server/sfc-route-meta.js +80 -0
  197. package/hmr/frameworks/vue/server/sfc-route-meta.js.map +1 -0
  198. package/hmr/frameworks/vue/server/sfc-route-serve.d.ts +8 -0
  199. package/hmr/frameworks/vue/server/sfc-route-serve.js +459 -0
  200. package/hmr/frameworks/vue/server/sfc-route-serve.js.map +1 -0
  201. package/hmr/frameworks/vue/server/sfc-route-shared.d.ts +38 -0
  202. package/hmr/frameworks/vue/server/sfc-route-shared.js +48 -0
  203. package/hmr/frameworks/vue/server/sfc-route-shared.js.map +1 -0
  204. package/hmr/frameworks/vue/server/strategy.d.ts +35 -0
  205. package/hmr/frameworks/vue/server/strategy.js +278 -1
  206. package/hmr/frameworks/vue/server/strategy.js.map +1 -1
  207. package/hmr/frameworks/vue/server/websocket-sfc.d.ts +15 -0
  208. package/hmr/frameworks/vue/server/websocket-sfc.js +20 -0
  209. package/hmr/frameworks/vue/server/websocket-sfc.js.map +1 -0
  210. package/hmr/helpers/ast-normalizer.d.ts +3 -1
  211. package/hmr/helpers/ast-normalizer.js +77 -10
  212. package/hmr/helpers/ast-normalizer.js.map +1 -1
  213. package/hmr/helpers/cjs-named-exports.d.ts +23 -0
  214. package/hmr/helpers/cjs-named-exports.js +152 -0
  215. package/hmr/helpers/cjs-named-exports.js.map +1 -0
  216. package/hmr/helpers/package-exports.d.ts +16 -0
  217. package/hmr/helpers/package-exports.js +396 -0
  218. package/hmr/helpers/package-exports.js.map +1 -0
  219. package/hmr/server/constants.js +20 -5
  220. package/hmr/server/constants.js.map +1 -1
  221. package/hmr/server/core-sanitize.d.ts +86 -7
  222. package/hmr/server/core-sanitize.js +170 -45
  223. package/hmr/server/core-sanitize.js.map +1 -1
  224. package/hmr/server/device-transform-helpers.d.ts +24 -0
  225. package/hmr/server/device-transform-helpers.js +408 -0
  226. package/hmr/server/device-transform-helpers.js.map +1 -0
  227. package/hmr/server/framework-strategy.d.ts +108 -11
  228. package/hmr/server/hmr-module-graph.d.ts +37 -0
  229. package/hmr/server/hmr-module-graph.js +214 -0
  230. package/hmr/server/hmr-module-graph.js.map +1 -0
  231. package/hmr/server/import-map.d.ts +11 -2
  232. package/hmr/server/import-map.js +92 -45
  233. package/hmr/server/import-map.js.map +1 -1
  234. package/hmr/server/index.js +7 -16
  235. package/hmr/server/index.js.map +1 -1
  236. package/hmr/server/ns-core-cjs-shape.d.ts +2 -4
  237. package/hmr/server/ns-core-cjs-shape.js +4 -6
  238. package/hmr/server/ns-core-cjs-shape.js.map +1 -1
  239. package/hmr/server/ns-rt-bridge.d.ts +51 -0
  240. package/hmr/server/ns-rt-bridge.js +131 -0
  241. package/hmr/server/ns-rt-bridge.js.map +1 -0
  242. package/hmr/server/ns-rt-route.d.ts +5 -0
  243. package/hmr/server/ns-rt-route.js +38 -0
  244. package/hmr/server/ns-rt-route.js.map +1 -0
  245. package/hmr/server/perf-instrumentation.d.ts +114 -0
  246. package/hmr/server/perf-instrumentation.js +197 -0
  247. package/hmr/server/perf-instrumentation.js.map +1 -0
  248. package/hmr/server/process-code-for-device.d.ts +14 -0
  249. package/hmr/server/process-code-for-device.js +699 -0
  250. package/hmr/server/process-code-for-device.js.map +1 -0
  251. package/hmr/server/require-guard.d.ts +1 -0
  252. package/hmr/server/require-guard.js +12 -0
  253. package/hmr/server/require-guard.js.map +1 -0
  254. package/hmr/server/rewrite-imports.d.ts +2 -0
  255. package/hmr/server/rewrite-imports.js +630 -0
  256. package/hmr/server/rewrite-imports.js.map +1 -0
  257. package/hmr/server/route-helpers.d.ts +7 -0
  258. package/hmr/server/route-helpers.js +13 -0
  259. package/hmr/server/route-helpers.js.map +1 -0
  260. package/hmr/server/server-origin.d.ts +2 -0
  261. package/hmr/server/server-origin.js +83 -0
  262. package/hmr/server/server-origin.js.map +1 -0
  263. package/hmr/server/shared-transform-request.js +13 -7
  264. package/hmr/server/shared-transform-request.js.map +1 -1
  265. package/hmr/server/transform-cache-invalidation.d.ts +37 -0
  266. package/hmr/server/transform-cache-invalidation.js +156 -0
  267. package/hmr/server/transform-cache-invalidation.js.map +1 -0
  268. package/hmr/server/vendor-bare-module-shims.d.ts +4 -0
  269. package/hmr/server/vendor-bare-module-shims.js +80 -0
  270. package/hmr/server/vendor-bare-module-shims.js.map +1 -0
  271. package/hmr/server/vite-plugin.js +78 -42
  272. package/hmr/server/vite-plugin.js.map +1 -1
  273. package/hmr/server/websocket-core-bridge.d.ts +45 -4
  274. package/hmr/server/websocket-core-bridge.js +50 -48
  275. package/hmr/server/websocket-core-bridge.js.map +1 -1
  276. package/hmr/server/websocket-css-hot-update.d.ts +33 -0
  277. package/hmr/server/websocket-css-hot-update.js +65 -0
  278. package/hmr/server/websocket-css-hot-update.js.map +1 -0
  279. package/hmr/server/websocket-device-transform.d.ts +3 -0
  280. package/hmr/server/websocket-device-transform.js +7 -0
  281. package/hmr/server/websocket-device-transform.js.map +1 -0
  282. package/hmr/server/websocket-graph-upsert.d.ts +15 -0
  283. package/hmr/server/websocket-graph-upsert.js +20 -0
  284. package/hmr/server/websocket-graph-upsert.js.map +1 -1
  285. package/hmr/server/websocket-hmr-pending.d.ts +37 -0
  286. package/hmr/server/websocket-hmr-pending.js +55 -0
  287. package/hmr/server/websocket-hmr-pending.js.map +1 -0
  288. package/hmr/server/websocket-hot-update.d.ts +77 -0
  289. package/hmr/server/websocket-hot-update.js +360 -0
  290. package/hmr/server/websocket-hot-update.js.map +1 -0
  291. package/hmr/server/websocket-import-map-route.d.ts +15 -0
  292. package/hmr/server/websocket-import-map-route.js +50 -0
  293. package/hmr/server/websocket-import-map-route.js.map +1 -0
  294. package/hmr/server/websocket-module-bindings.js +3 -3
  295. package/hmr/server/websocket-module-bindings.js.map +1 -1
  296. package/hmr/server/websocket-module-specifiers.d.ts +66 -2
  297. package/hmr/server/websocket-module-specifiers.js +191 -20
  298. package/hmr/server/websocket-module-specifiers.js.map +1 -1
  299. package/hmr/server/websocket-ns-core.d.ts +21 -0
  300. package/hmr/server/websocket-ns-core.js +311 -0
  301. package/hmr/server/websocket-ns-core.js.map +1 -0
  302. package/hmr/server/websocket-ns-entry.d.ts +21 -0
  303. package/hmr/server/websocket-ns-entry.js +164 -0
  304. package/hmr/server/websocket-ns-entry.js.map +1 -0
  305. package/hmr/server/websocket-ns-m-paths.d.ts +1 -1
  306. package/hmr/server/websocket-ns-m-paths.js +58 -13
  307. package/hmr/server/websocket-ns-m-paths.js.map +1 -1
  308. package/hmr/server/websocket-ns-m-request.d.ts +11 -1
  309. package/hmr/server/websocket-ns-m-request.js +18 -25
  310. package/hmr/server/websocket-ns-m-request.js.map +1 -1
  311. package/hmr/server/websocket-ns-m.d.ts +33 -0
  312. package/hmr/server/websocket-ns-m.js +752 -0
  313. package/hmr/server/websocket-ns-m.js.map +1 -0
  314. package/hmr/server/websocket-served-module-helpers.d.ts +49 -3
  315. package/hmr/server/websocket-served-module-helpers.js +403 -87
  316. package/hmr/server/websocket-served-module-helpers.js.map +1 -1
  317. package/hmr/server/websocket-txn.js +2 -8
  318. package/hmr/server/websocket-txn.js.map +1 -1
  319. package/hmr/server/websocket-vendor-unifier.d.ts +0 -1
  320. package/hmr/server/websocket-vendor-unifier.js +4 -9
  321. package/hmr/server/websocket-vendor-unifier.js.map +1 -1
  322. package/hmr/server/websocket.d.ts +8 -39
  323. package/hmr/server/websocket.js +608 -6300
  324. package/hmr/server/websocket.js.map +1 -1
  325. package/hmr/shared/ns-globals.d.ts +118 -0
  326. package/hmr/shared/ns-globals.js +29 -0
  327. package/hmr/shared/ns-globals.js.map +1 -0
  328. package/hmr/shared/protocol.d.ts +145 -0
  329. package/hmr/shared/protocol.js +28 -0
  330. package/hmr/shared/protocol.js.map +1 -0
  331. package/hmr/shared/runtime/boot-placeholder-ui.d.ts +69 -0
  332. package/hmr/shared/runtime/boot-placeholder-ui.js +101 -0
  333. package/hmr/shared/runtime/boot-placeholder-ui.js.map +1 -0
  334. package/hmr/shared/runtime/boot-progress.d.ts +44 -0
  335. package/hmr/shared/runtime/boot-progress.js +133 -0
  336. package/hmr/shared/runtime/boot-progress.js.map +1 -0
  337. package/hmr/shared/runtime/boot-timeline.d.ts +18 -0
  338. package/hmr/shared/runtime/boot-timeline.js +42 -0
  339. package/hmr/shared/runtime/boot-timeline.js.map +1 -0
  340. package/hmr/shared/runtime/browser-runtime-contract.js.map +1 -1
  341. package/hmr/shared/runtime/dev-overlay-snapshots.d.ts +31 -0
  342. package/hmr/shared/runtime/dev-overlay-snapshots.js +324 -0
  343. package/hmr/shared/runtime/dev-overlay-snapshots.js.map +1 -0
  344. package/hmr/shared/runtime/dev-overlay.d.ts +119 -26
  345. package/hmr/shared/runtime/dev-overlay.js +1196 -262
  346. package/hmr/shared/runtime/dev-overlay.js.map +1 -1
  347. package/hmr/shared/runtime/global-scope.d.ts +18 -0
  348. package/hmr/shared/runtime/global-scope.js +21 -0
  349. package/hmr/shared/runtime/global-scope.js.map +1 -0
  350. package/hmr/shared/runtime/hooks.js +2 -1
  351. package/hmr/shared/runtime/hooks.js.map +1 -1
  352. package/hmr/shared/runtime/http-only-boot.js +7 -6
  353. package/hmr/shared/runtime/http-only-boot.js.map +1 -1
  354. package/hmr/shared/runtime/module-provenance.js +4 -6
  355. package/hmr/shared/runtime/module-provenance.js.map +1 -1
  356. package/hmr/shared/runtime/root-placeholder-view.d.ts +19 -0
  357. package/hmr/shared/runtime/root-placeholder-view.js +311 -0
  358. package/hmr/shared/runtime/root-placeholder-view.js.map +1 -0
  359. package/hmr/shared/runtime/root-placeholder.js +393 -200
  360. package/hmr/shared/runtime/root-placeholder.js.map +1 -1
  361. package/hmr/shared/runtime/session-bootstrap.js +168 -4
  362. package/hmr/shared/runtime/session-bootstrap.js.map +1 -1
  363. package/hmr/shared/runtime/vendor-bootstrap.js +3 -10
  364. package/hmr/shared/runtime/vendor-bootstrap.js.map +1 -1
  365. package/hmr/shared/vendor/manifest-collect.d.ts +4 -0
  366. package/hmr/shared/vendor/manifest-collect.js +549 -0
  367. package/hmr/shared/vendor/manifest-collect.js.map +1 -0
  368. package/hmr/shared/vendor/manifest-loader.d.ts +2 -1
  369. package/hmr/shared/vendor/manifest-loader.js +5 -3
  370. package/hmr/shared/vendor/manifest-loader.js.map +1 -1
  371. package/hmr/shared/vendor/manifest.d.ts +1 -7
  372. package/hmr/shared/vendor/manifest.js +84 -819
  373. package/hmr/shared/vendor/manifest.js.map +1 -1
  374. package/hmr/shared/vendor/vendor-device-shim.d.ts +1 -0
  375. package/hmr/shared/vendor/vendor-device-shim.js +208 -0
  376. package/hmr/shared/vendor/vendor-device-shim.js.map +1 -0
  377. package/hmr/shared/vendor/vendor-esbuild-plugins.d.ts +38 -0
  378. package/hmr/shared/vendor/vendor-esbuild-plugins.js +296 -0
  379. package/hmr/shared/vendor/vendor-esbuild-plugins.js.map +1 -0
  380. package/hmr/vendor-bootstrap.d.ts +1 -3
  381. package/hmr/vendor-bootstrap.js +4 -6
  382. package/hmr/vendor-bootstrap.js.map +1 -1
  383. package/index.d.ts +1 -0
  384. package/index.js +5 -0
  385. package/index.js.map +1 -1
  386. package/package.json +61 -11
  387. package/runtime/core-aliases-early.js +25 -55
  388. package/runtime/core-aliases-early.js.map +1 -1
  389. package/shims/react-jsx-runtime.d.ts +4 -0
  390. package/shims/react-jsx-runtime.js +61 -0
  391. package/shims/react-jsx-runtime.js.map +1 -0
  392. package/helpers/angular/angular-linker.d.ts +0 -13
  393. package/helpers/angular/angular-linker.js +0 -194
  394. package/helpers/angular/angular-linker.js.map +0 -1
  395. package/helpers/angular/inline-decorator-component-templates.js.map +0 -1
  396. package/helpers/angular/shared-linker.d.ts +0 -11
  397. package/helpers/angular/shared-linker.js +0 -75
  398. package/helpers/angular/shared-linker.js.map +0 -1
  399. package/helpers/angular/synthesize-decorator-ctor-parameters.js.map +0 -1
  400. package/helpers/angular/synthesize-injectable-factories.js.map +0 -1
  401. package/helpers/angular/util.js +0 -67
  402. package/helpers/angular/util.js.map +0 -1
  403. package/helpers/prelink-angular.d.ts +0 -2
  404. package/helpers/prelink-angular.js +0 -117
  405. package/helpers/prelink-angular.js.map +0 -1
  406. package/hmr/server/websocket-angular-entry.js.map +0 -1
  407. package/hmr/server/websocket-angular-hot-update.js +0 -239
  408. package/hmr/server/websocket-angular-hot-update.js.map +0 -1
  409. package/hmr/server/websocket-ns-m-finalize.d.ts +0 -22
  410. package/hmr/server/websocket-ns-m-finalize.js +0 -88
  411. package/hmr/server/websocket-ns-m-finalize.js.map +0 -1
  412. package/hmr/server/websocket-runtime-compat.d.ts +0 -19
  413. package/hmr/server/websocket-runtime-compat.js +0 -286
  414. package/hmr/server/websocket-runtime-compat.js.map +0 -1
  415. package/hmr/server/websocket-vue-sfc.d.ts +0 -27
  416. package/hmr/server/websocket-vue-sfc.js +0 -1117
  417. package/hmr/server/websocket-vue-sfc.js.map +0 -1
  418. package/transformers/NativeClass/index.d.ts +0 -2
  419. package/transformers/NativeClass/index.js +0 -222
  420. package/transformers/NativeClass/index.js.map +0 -1
  421. /package/{helpers/angular → hmr/frameworks/angular/build}/inline-decorator-component-templates.d.ts +0 -0
  422. /package/{helpers/angular → hmr/frameworks/angular/build}/synthesize-decorator-ctor-parameters.d.ts +0 -0
  423. /package/{helpers/angular → hmr/frameworks/angular/build}/synthesize-injectable-factories.d.ts +0 -0
  424. /package/hmr/{server → frameworks/angular/server}/websocket-angular-entry.d.ts +0 -0
@@ -0,0 +1 @@
1
+ {"version":3,"file":"websocket-css-hot-update.js","sourceRoot":"","sources":["../../../../../packages/vite/hmr/server/websocket-css-hot-update.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,MAAM,CAAC;AAmBxB,MAAM,aAAa,GAAG,oBAAoB,CAAC;AAE3C,SAAS,OAAO,CAAC,KAAa;IAC7B,OAAO,KAAK,CAAC,OAAO,CAAC,KAAK,EAAE,GAAG,CAAC,CAAC;AAClC,CAAC;AAED,SAAS,UAAU,CAAC,KAAa;IAChC,MAAM,GAAG,GAAG,KAAK,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;IACjC,OAAO,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,EAAE,GAAG,CAAC,CAAC;AACjD,CAAC;AAED,SAAS,gBAAgB,CAAC,OAAe,EAAE,IAAY,EAAE,UAAmB;IAC3E,IAAI,CAAC,OAAO,IAAI,CAAC,IAAI;QAAE,OAAO,KAAK,CAAC;IACpC,MAAM,QAAQ,GAAG,UAAU,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC,CAAC;IAC9C,MAAM,SAAS,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC,OAAO,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC;IACnD,MAAM,IAAI,GAAG,CAAC,GAAG,SAAS,MAAM,EAAE,GAAG,SAAS,OAAO,CAAC,CAAC;IACvD,IAAI,UAAU,IAAI,UAAU,KAAK,KAAK,EAAE,CAAC;QACxC,IAAI,CAAC,IAAI,CAAC,GAAG,SAAS,IAAI,UAAU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C,IAAI,CAAC,IAAI,CAAC;QAAE,OAAO,EAAE,CAAC;IAEzC,IAAI,gBAAgB,CAAC,IAAI,EAAE,IAAI,EAAE,UAAU,CAAC,EAAE,CAAC;QAC9C,MAAM,GAAG,GAAG,cAAc,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;QACvC,OAAO,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;IACzB,CAAC;IAED,IAAI,CAAC,WAAW;QAAE,OAAO,EAAE,CAAC;IAC5B,MAAM,GAAG,GAAG,cAAc,CAAC,WAAW,EAAE,IAAI,CAAC,CAAC;IAC9C,OAAO,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;AACzB,CAAC"}
@@ -0,0 +1,3 @@
1
+ export { processCodeForDevice, cleanCode, collectImportDependencies } from './process-code-for-device.js';
2
+ export { rewriteImports, prepareAngularEntryForDevice } from './rewrite-imports.js';
3
+ export { shouldRemapImport } from './device-transform-helpers.js';
@@ -0,0 +1,7 @@
1
+ // Public entry point for the device code-transform subsystem (the HMR plugin's
2
+ // hot path). The implementation lives in three focused modules; consumers and
3
+ // spec suites import the subsystem's surface from here.
4
+ export { processCodeForDevice, cleanCode, collectImportDependencies } from './process-code-for-device.js';
5
+ export { rewriteImports, prepareAngularEntryForDevice } from './rewrite-imports.js';
6
+ export { shouldRemapImport } from './device-transform-helpers.js';
7
+ //# sourceMappingURL=websocket-device-transform.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"websocket-device-transform.js","sourceRoot":"","sources":["../../../../../packages/vite/hmr/server/websocket-device-transform.ts"],"names":[],"mappings":"AAAA,+EAA+E;AAC/E,8EAA8E;AAC9E,wDAAwD;AACxD,OAAO,EAAE,oBAAoB,EAAE,SAAS,EAAE,yBAAyB,EAAE,MAAM,8BAA8B,CAAC;AAC1G,OAAO,EAAE,cAAc,EAAE,4BAA4B,EAAE,MAAM,sBAAsB,CAAC;AACpF,OAAO,EAAE,iBAAiB,EAAE,MAAM,+BAA+B,CAAC"}
@@ -4,3 +4,18 @@ export declare function classifyGraphUpsert(existing: {
4
4
  deps: string[];
5
5
  } | undefined, nextHash: string, nextDeps: string[]): GraphUpsertClassification;
6
6
  export declare function shouldBroadcastGraphUpsertDelta(classification: GraphUpsertClassification, emitDeltaOnInsert?: boolean, broadcastEnabled?: boolean): boolean;
7
+ /**
8
+ * Decide whether an upsert should advance the shared graphVersion
9
+ * counter. Serve-time warm-ups (and the background initial-graph walk) pass
10
+ * `bumpVersion: false` so graphVersion stays stable during cold boot — that
11
+ * stability is what lets the dynamic-import helper tag every first-session
12
+ * URL with a consistent `v1` instead of drifting between `live`, `v12`,
13
+ * `v433`... (which would produce double-loaded modules on iOS HTTP ESM).
14
+ * Real live edits (handleHotUpdate and framework hot-update handlers) leave
15
+ * `bumpVersion` unset or true and advance the counter as before.
16
+ *
17
+ * The helper also treats `unchanged` classifications as no-op: they bypass
18
+ * the graph set entirely in upsertGraphModule, so the version must not
19
+ * advance for them either.
20
+ */
21
+ export declare function shouldBumpGraphVersion(classification: GraphUpsertClassification, bumpVersion?: boolean): boolean;
@@ -10,4 +10,24 @@ export function classifyGraphUpsert(existing, nextHash, nextDeps) {
10
10
  export function shouldBroadcastGraphUpsertDelta(classification, emitDeltaOnInsert = false, broadcastEnabled = true) {
11
11
  return broadcastEnabled && (classification === 'changed' || (classification === 'inserted' && emitDeltaOnInsert));
12
12
  }
13
+ /**
14
+ * Decide whether an upsert should advance the shared graphVersion
15
+ * counter. Serve-time warm-ups (and the background initial-graph walk) pass
16
+ * `bumpVersion: false` so graphVersion stays stable during cold boot — that
17
+ * stability is what lets the dynamic-import helper tag every first-session
18
+ * URL with a consistent `v1` instead of drifting between `live`, `v12`,
19
+ * `v433`... (which would produce double-loaded modules on iOS HTTP ESM).
20
+ * Real live edits (handleHotUpdate and framework hot-update handlers) leave
21
+ * `bumpVersion` unset or true and advance the counter as before.
22
+ *
23
+ * The helper also treats `unchanged` classifications as no-op: they bypass
24
+ * the graph set entirely in upsertGraphModule, so the version must not
25
+ * advance for them either.
26
+ */
27
+ export function shouldBumpGraphVersion(classification, bumpVersion = true) {
28
+ if (classification === 'unchanged') {
29
+ return false;
30
+ }
31
+ return bumpVersion !== false;
32
+ }
13
33
  //# sourceMappingURL=websocket-graph-upsert.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"websocket-graph-upsert.js","sourceRoot":"","sources":["../../../../../packages/vite/hmr/server/websocket-graph-upsert.ts"],"names":[],"mappings":"AAEA,MAAM,UAAU,mBAAmB,CAAC,QAAsD,EAAE,QAAgB,EAAE,QAAkB;IAC/H,IAAI,CAAC,QAAQ,EAAE,CAAC;QACf,OAAO,UAAU,CAAC;IACnB,CAAC;IACD,IAAI,QAAQ,CAAC,IAAI,KAAK,QAAQ,IAAI,QAAQ,CAAC,IAAI,CAAC,MAAM,KAAK,QAAQ,CAAC,MAAM,IAAI,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,KAAK,QAAQ,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;QAChI,OAAO,WAAW,CAAC;IACpB,CAAC;IACD,OAAO,SAAS,CAAC;AAClB,CAAC;AAED,MAAM,UAAU,+BAA+B,CAAC,cAAyC,EAAE,oBAA6B,KAAK,EAAE,mBAA4B,IAAI;IAC9J,OAAO,gBAAgB,IAAI,CAAC,cAAc,KAAK,SAAS,IAAI,CAAC,cAAc,KAAK,UAAU,IAAI,iBAAiB,CAAC,CAAC,CAAC;AACnH,CAAC"}
1
+ {"version":3,"file":"websocket-graph-upsert.js","sourceRoot":"","sources":["../../../../../packages/vite/hmr/server/websocket-graph-upsert.ts"],"names":[],"mappings":"AAEA,MAAM,UAAU,mBAAmB,CAAC,QAAsD,EAAE,QAAgB,EAAE,QAAkB;IAC/H,IAAI,CAAC,QAAQ,EAAE,CAAC;QACf,OAAO,UAAU,CAAC;IACnB,CAAC;IACD,IAAI,QAAQ,CAAC,IAAI,KAAK,QAAQ,IAAI,QAAQ,CAAC,IAAI,CAAC,MAAM,KAAK,QAAQ,CAAC,MAAM,IAAI,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,KAAK,QAAQ,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;QAChI,OAAO,WAAW,CAAC;IACpB,CAAC;IACD,OAAO,SAAS,CAAC;AAClB,CAAC;AAED,MAAM,UAAU,+BAA+B,CAAC,cAAyC,EAAE,oBAA6B,KAAK,EAAE,mBAA4B,IAAI;IAC9J,OAAO,gBAAgB,IAAI,CAAC,cAAc,KAAK,SAAS,IAAI,CAAC,cAAc,KAAK,UAAU,IAAI,iBAAiB,CAAC,CAAC,CAAC;AACnH,CAAC;AAED;;;;;;;;;;;;;GAaG;AACH,MAAM,UAAU,sBAAsB,CAAC,cAAyC,EAAE,cAAuB,IAAI;IAC5G,IAAI,cAAc,KAAK,WAAW,EAAE,CAAC;QACpC,OAAO,KAAK,CAAC;IACd,CAAC;IACD,OAAO,WAAW,KAAK,KAAK,CAAC;AAC9B,CAAC"}
@@ -0,0 +1,37 @@
1
+ /**
2
+ * Early "pending" notification for HMR.
3
+ *
4
+ * When `handleHotUpdate(ctx)` first fires for a save event, the server
5
+ * spends 7–200ms doing graph upserts, transforms and dependency
6
+ * analysis BEFORE broadcasting `ns:angular-update` (or
7
+ * `ns:css-updates`). During that window the client has no idea a
8
+ * change is in flight, so the HMR-applying overlay only appears at
9
+ * the tail end of the cycle and the user perceives the dev loop as
10
+ * laggy.
11
+ *
12
+ * `ns:hmr-pending` is broadcast at the very start of `handleHotUpdate`
13
+ * with just the file path + classified kind. The client reacts by
14
+ * showing the 'received' overlay frame immediately. The authoritative
15
+ * payload (`ns:angular-update` / `ns:css-updates`) follows once the
16
+ * server is ready and walks the rest of the stage progression.
17
+ *
18
+ * This module is intentionally a pure helper so the message shape and
19
+ * narrowing rules can be verified without spinning up a Vite dev
20
+ * server.
21
+ */
22
+ import type { HmrPendingKind, HmrPendingMessage } from '../shared/protocol.js';
23
+ export type { HmrPendingKind, HmrPendingMessage };
24
+ export declare function createHmrPendingMessage(input: {
25
+ origin: string;
26
+ path: string;
27
+ kind: string;
28
+ timestamp: number;
29
+ }): HmrPendingMessage;
30
+ /**
31
+ * Parser used by the client to identify a pending message regardless of
32
+ * which framework is active. We accept the message only when every
33
+ * expected field is present and well-formed — this guards against
34
+ * accidental matches on legacy server payloads or developer-written
35
+ * mocks during tests.
36
+ */
37
+ export declare function isHmrPendingMessage(value: unknown): value is HmrPendingMessage;
@@ -0,0 +1,55 @@
1
+ /**
2
+ * Early "pending" notification for HMR.
3
+ *
4
+ * When `handleHotUpdate(ctx)` first fires for a save event, the server
5
+ * spends 7–200ms doing graph upserts, transforms and dependency
6
+ * analysis BEFORE broadcasting `ns:angular-update` (or
7
+ * `ns:css-updates`). During that window the client has no idea a
8
+ * change is in flight, so the HMR-applying overlay only appears at
9
+ * the tail end of the cycle and the user perceives the dev loop as
10
+ * laggy.
11
+ *
12
+ * `ns:hmr-pending` is broadcast at the very start of `handleHotUpdate`
13
+ * with just the file path + classified kind. The client reacts by
14
+ * showing the 'received' overlay frame immediately. The authoritative
15
+ * payload (`ns:angular-update` / `ns:css-updates`) follows once the
16
+ * server is ready and walks the rest of the stage progression.
17
+ *
18
+ * This module is intentionally a pure helper so the message shape and
19
+ * narrowing rules can be verified without spinning up a Vite dev
20
+ * server.
21
+ */
22
+ export function createHmrPendingMessage(input) {
23
+ const allowed = ['ts', 'css', 'html', 'unknown'];
24
+ const kind = allowed.includes(input.kind || '') ? input.kind : 'unknown';
25
+ return {
26
+ type: 'ns:hmr-pending',
27
+ origin: typeof input.origin === 'string' ? input.origin : '',
28
+ path: typeof input.path === 'string' ? input.path : '',
29
+ kind,
30
+ timestamp: typeof input.timestamp === 'number' && Number.isFinite(input.timestamp) ? input.timestamp : 0,
31
+ };
32
+ }
33
+ /**
34
+ * Parser used by the client to identify a pending message regardless of
35
+ * which framework is active. We accept the message only when every
36
+ * expected field is present and well-formed — this guards against
37
+ * accidental matches on legacy server payloads or developer-written
38
+ * mocks during tests.
39
+ */
40
+ export function isHmrPendingMessage(value) {
41
+ if (!value || typeof value !== 'object')
42
+ return false;
43
+ const v = value;
44
+ if (v.type !== 'ns:hmr-pending')
45
+ return false;
46
+ if (typeof v.path !== 'string' || !v.path)
47
+ return false;
48
+ if (typeof v.timestamp !== 'number' || !Number.isFinite(v.timestamp))
49
+ return false;
50
+ const allowed = ['ts', 'css', 'html', 'unknown'];
51
+ if (!allowed.includes(v.kind || ''))
52
+ return false;
53
+ return true;
54
+ }
55
+ //# sourceMappingURL=websocket-hmr-pending.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"websocket-hmr-pending.js","sourceRoot":"","sources":["../../../../../packages/vite/hmr/server/websocket-hmr-pending.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AAQH,MAAM,UAAU,uBAAuB,CAAC,KAAwE;IAC/G,MAAM,OAAO,GAAqB,CAAC,IAAI,EAAE,KAAK,EAAE,MAAM,EAAE,SAAS,CAAC,CAAC;IACnE,MAAM,IAAI,GAAI,OAA6B,CAAC,QAAQ,CAAC,KAAK,CAAC,IAAI,IAAI,EAAE,CAAC,CAAC,CAAC,CAAE,KAAK,CAAC,IAAuB,CAAC,CAAC,CAAC,SAAS,CAAC;IACpH,OAAO;QACN,IAAI,EAAE,gBAAgB;QACtB,MAAM,EAAE,OAAO,KAAK,CAAC,MAAM,KAAK,QAAQ,CAAC,CAAC,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE;QAC5D,IAAI,EAAE,OAAO,KAAK,CAAC,IAAI,KAAK,QAAQ,CAAC,CAAC,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE;QACtD,IAAI;QACJ,SAAS,EAAE,OAAO,KAAK,CAAC,SAAS,KAAK,QAAQ,IAAI,MAAM,CAAC,QAAQ,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC;KACxG,CAAC;AACH,CAAC;AAED;;;;;;GAMG;AACH,MAAM,UAAU,mBAAmB,CAAC,KAAc;IACjD,IAAI,CAAC,KAAK,IAAI,OAAO,KAAK,KAAK,QAAQ;QAAE,OAAO,KAAK,CAAC;IACtD,MAAM,CAAC,GAAG,KAAmC,CAAC;IAC9C,IAAI,CAAC,CAAC,IAAI,KAAK,gBAAgB;QAAE,OAAO,KAAK,CAAC;IAC9C,IAAI,OAAO,CAAC,CAAC,IAAI,KAAK,QAAQ,IAAI,CAAC,CAAC,CAAC,IAAI;QAAE,OAAO,KAAK,CAAC;IACxD,IAAI,OAAO,CAAC,CAAC,SAAS,KAAK,QAAQ,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC,CAAC,SAAS,CAAC;QAAE,OAAO,KAAK,CAAC;IACnF,MAAM,OAAO,GAAqB,CAAC,IAAI,EAAE,KAAK,EAAE,MAAM,EAAE,SAAS,CAAC,CAAC;IACnE,IAAI,CAAE,OAA6B,CAAC,QAAQ,CAAC,CAAC,CAAC,IAAI,IAAI,EAAE,CAAC;QAAE,OAAO,KAAK,CAAC;IACzE,OAAO,IAAI,CAAC;AACb,CAAC"}
@@ -0,0 +1,77 @@
1
+ import type { HmrContext } from 'vite';
2
+ import type { WebSocketServer } from 'ws';
3
+ import type { FrameworkServerStrategy } from './framework-strategy.js';
4
+ import type { HmrModuleGraph } from './hmr-module-graph.js';
5
+ import type { SharedTransformRequestRunner } from './shared-transform-request.js';
6
+ import type { BootstrapRootComponent } from '../frameworks/angular/server/angular-root-component.js';
7
+ /**
8
+ * Dependencies injected into each strategy's `handleHotUpdate` (and the shared
9
+ * {@link runHotUpdatePrologue} it runs first). These hold per-server instance
10
+ * state (`wss`, `moduleGraph`, the file maps, `sharedTransformRequest`) or are
11
+ * plugin-closure accessors. Pure transform helpers (`cleanCode`,
12
+ * `rewriteImports`, `processSfcCode`, `collectImportDependencies`) are NOT on the
13
+ * context — the strategies that need them import them directly from
14
+ * `websocket-device-transform.ts`. `getServerOrigin` is likewise imported
15
+ * directly here from `server-origin.ts` (spy via the module in tests).
16
+ */
17
+ export interface NsHotUpdateContext {
18
+ wss: WebSocketServer | null;
19
+ moduleGraph: HmrModuleGraph;
20
+ strategy: FrameworkServerStrategy;
21
+ verbose: boolean;
22
+ sfcFileMap: Map<string, string>;
23
+ depFileMap: Map<string, string>;
24
+ sharedTransformRequest: SharedTransformRequestRunner;
25
+ getHmrSourceRootsCached: () => string[];
26
+ getBootstrapEntryRelPath: () => string;
27
+ isSocketClientOpen: (client: {
28
+ readyState?: number;
29
+ OPEN?: number;
30
+ } | null | undefined) => boolean;
31
+ getHmrSocketRole: (client: {
32
+ __nsHmrClientRole?: string;
33
+ } | null | undefined) => string;
34
+ shouldRemapImport: (spec: string) => boolean;
35
+ rememberAngularReloadSuppression: (root: string, file: string, ttlMs?: number) => void;
36
+ /**
37
+ * Resolves the Angular bootstrap (root) component, or `null` when it
38
+ * can't be statically determined. Used to force root-component template
39
+ * edits through the reboot path instead of Analog's in-place update,
40
+ * which is destructive for the root view (see {@link BootstrapRootComponent}).
41
+ */
42
+ getRootComponentIdentity: () => BootstrapRootComponent | null;
43
+ getGraphInitialPopulationPromise: () => Promise<void> | null;
44
+ appRootDir: string;
45
+ }
46
+ /** Always-on per-update timing + diagnostics, mutated in place across the prologue and the framework tail. */
47
+ export interface HmrUpdateMetrics {
48
+ file: string;
49
+ kind: string;
50
+ t0: number;
51
+ tAfterAwait: number;
52
+ tAfterFramework: number;
53
+ tEnd: number;
54
+ invalidated: number;
55
+ recipients: number;
56
+ narrowed: boolean | undefined;
57
+ emitted: boolean;
58
+ }
59
+ /** Per-invocation locals computed by {@link runHotUpdatePrologue} and consumed by the per-flavor tail. */
60
+ export interface HotUpdatePrologueState {
61
+ root: string;
62
+ updateRel: string;
63
+ metrics: HmrUpdateMetrics;
64
+ emitSummary: () => void;
65
+ }
66
+ /**
67
+ * Shared, framework-agnostic prologue for every strategy's `handleHotUpdate`:
68
+ * scope gating, update-metrics setup, the `ns:hmr-pending` broadcast, awaiting the
69
+ * initial graph population, the common module-graph upsert, CSS hot-update +
70
+ * Tailwind content-CSS broadcast, and the project-scope filter. Returns `null`
71
+ * when one of those steps fully handles the change (every such path resolves to
72
+ * Vite's `undefined` result, so the caller just returns), otherwise the
73
+ * per-invocation {@link HotUpdatePrologueState} (`root`, `updateRel`, the live
74
+ * `metrics` object, the idempotent `emitSummary`) the per-flavor tail consumes.
75
+ * Exported so per-flavor strategies can own `prologue + their tail`.
76
+ */
77
+ export declare function runHotUpdatePrologue(ctx: HmrContext, deps: NsHotUpdateContext): Promise<HotUpdatePrologueState | null>;
@@ -0,0 +1,360 @@
1
+ import * as path from 'path';
2
+ import { isRuntimeGraphExcludedPath } from './runtime-graph-filter.js';
3
+ import { isWithinHmrScope } from '../../helpers/hmr-scope.js';
4
+ import { collectGraphUpdateModulesForHotUpdate } from '../frameworks/angular/server/websocket-angular-hot-update.js';
5
+ import { getAppCssState } from '../../helpers/app-css-state.js';
6
+ import { classifyHmrUpdateKind, formatHmrUpdateSummary } from './perf-instrumentation.js';
7
+ import { createHmrPendingMessage } from './websocket-hmr-pending.js';
8
+ import { getServerOrigin } from './server-origin.js';
9
+ /**
10
+ * Shared, framework-agnostic prologue for every strategy's `handleHotUpdate`:
11
+ * scope gating, update-metrics setup, the `ns:hmr-pending` broadcast, awaiting the
12
+ * initial graph population, the common module-graph upsert, CSS hot-update +
13
+ * Tailwind content-CSS broadcast, and the project-scope filter. Returns `null`
14
+ * when one of those steps fully handles the change (every such path resolves to
15
+ * Vite's `undefined` result, so the caller just returns), otherwise the
16
+ * per-invocation {@link HotUpdatePrologueState} (`root`, `updateRel`, the live
17
+ * `metrics` object, the idempotent `emitSummary`) the per-flavor tail consumes.
18
+ * Exported so per-flavor strategies can own `prologue + their tail`.
19
+ */
20
+ export async function runHotUpdatePrologue(ctx, deps) {
21
+ const { wss, moduleGraph, strategy, verbose, getHmrSourceRootsCached, isSocketClientOpen } = deps;
22
+ const APP_ROOT_DIR = deps.appRootDir;
23
+ const graphInitialPopulationPromise = deps.getGraphInitialPopulationPromise();
24
+ const { file, server } = ctx;
25
+ if (!wss) {
26
+ return null;
27
+ }
28
+ if (isRuntimeGraphExcludedPath(file)) {
29
+ return null;
30
+ }
31
+ // Authoritative "what triggers HMR" gate, applied before the pending
32
+ // overlay broadcast below: react only to files inside the app source
33
+ // dir (`appPath`) or a tsconfig-configured shared library.
34
+ if (!isWithinHmrScope(file, getHmrSourceRootsCached())) {
35
+ if (verbose) {
36
+ console.log(`[ns-hmr][server] ignored change (outside HMR source scope): ${file}`);
37
+ }
38
+ return null;
39
+ }
40
+ // Always-on update timing. Captures the four phases (await,
41
+ // framework, broadcast, total) plus invalidated module count
42
+ // and recipient count. Emitted at the end of this function via
43
+ // `emitHmrUpdateSummary()`. Single line, always-on so a
44
+ // 6-second `.ts` save is immediately visible without flipping
45
+ // verbose.
46
+ const updateRoot = server.config.root || process.cwd();
47
+ const updateRel = (() => {
48
+ try {
49
+ return '/' + path.posix.normalize(path.relative(updateRoot, file)).split(path.sep).join('/');
50
+ }
51
+ catch {
52
+ return file;
53
+ }
54
+ })();
55
+ const updateMetrics = {
56
+ file: updateRel,
57
+ kind: classifyHmrUpdateKind(file),
58
+ t0: Date.now(),
59
+ tAfterAwait: 0,
60
+ tAfterFramework: 0,
61
+ tEnd: 0,
62
+ invalidated: 0,
63
+ recipients: 0,
64
+ // Narrowing diagnostic — populated by the angular branch when
65
+ // the changed file is `.ts`, otherwise remains undefined and is
66
+ // omitted from the summary line entirely.
67
+ narrowed: undefined,
68
+ emitted: false,
69
+ };
70
+ // Broadcast a "pending" notification at the very start of
71
+ // handleHotUpdate so the client can show the HMR-applying
72
+ // overlay BEFORE we spend time on graph updates / transforms /
73
+ // dependency analysis (typically 7–200ms on a warm cache).
74
+ // Without this, the overlay only appears at `ns:angular-update`
75
+ // broadcast time and the user perceives a "delayed" reaction
76
+ // to their save.
77
+ //
78
+ // Fire-and-forget: a failed pending broadcast must never
79
+ // hold up the actual update. The client treats receipt of
80
+ // `ns:angular-update` (or `ns:css-updates`) as authoritative;
81
+ // the pending message is purely a UX hint.
82
+ try {
83
+ const pendingPayload = JSON.stringify(createHmrPendingMessage({
84
+ origin: getServerOrigin(server),
85
+ path: updateMetrics.file,
86
+ kind: updateMetrics.kind,
87
+ timestamp: updateMetrics.t0,
88
+ }));
89
+ wss.clients.forEach((client) => {
90
+ if (isSocketClientOpen(client)) {
91
+ try {
92
+ client.send(pendingPayload);
93
+ }
94
+ catch { }
95
+ }
96
+ });
97
+ }
98
+ catch { }
99
+ const emitHmrUpdateSummary = () => {
100
+ if (updateMetrics.emitted)
101
+ return;
102
+ updateMetrics.emitted = true;
103
+ updateMetrics.tEnd = Date.now();
104
+ try {
105
+ const awaitMs = (updateMetrics.tAfterAwait || updateMetrics.t0) - updateMetrics.t0;
106
+ const frameworkMs = (updateMetrics.tAfterFramework || updateMetrics.tAfterAwait || updateMetrics.t0) - (updateMetrics.tAfterAwait || updateMetrics.t0);
107
+ const broadcastMs = updateMetrics.tEnd - (updateMetrics.tAfterFramework || updateMetrics.tAfterAwait || updateMetrics.t0);
108
+ const totalMs = updateMetrics.tEnd - updateMetrics.t0;
109
+ console.info(formatHmrUpdateSummary({
110
+ file: updateMetrics.file,
111
+ kind: updateMetrics.kind,
112
+ awaitMs,
113
+ frameworkMs,
114
+ broadcastMs,
115
+ totalMs,
116
+ invalidated: updateMetrics.invalidated,
117
+ recipients: updateMetrics.recipients,
118
+ narrowed: updateMetrics.narrowed,
119
+ }));
120
+ }
121
+ catch { }
122
+ };
123
+ // The first /ns/m request kicks off populateInitialGraph in the
124
+ // background. If an HMR update races in before that walk
125
+ // completes, we'd lose transitive-importer data. Await
126
+ // completion here so the delta computation below always sees a
127
+ // populated graph.
128
+ if (graphInitialPopulationPromise) {
129
+ try {
130
+ await graphInitialPopulationPromise;
131
+ }
132
+ catch { }
133
+ }
134
+ updateMetrics.tAfterAwait = Date.now();
135
+ // Graph update for this file change (wrapped to avoid aborting rest of handler)
136
+ try {
137
+ // Angular HTML templates opt out via `skipDefaultGraphUpdate` — their tail
138
+ // re-queries the graph and drives the in-place swap / reboot itself.
139
+ const skipDefaultGraphUpdate = strategy.skipDefaultGraphUpdate?.(file) ?? false;
140
+ if (!skipDefaultGraphUpdate) {
141
+ const graphTargets = collectGraphUpdateModulesForHotUpdate({
142
+ file,
143
+ flavor: strategy.flavor,
144
+ modules: ctx.modules,
145
+ getModuleById: (id) => server.moduleGraph.getModuleById(id),
146
+ verbose,
147
+ });
148
+ for (const mod of graphTargets) {
149
+ if (!mod?.id)
150
+ continue;
151
+ try {
152
+ const deps = Array.from(mod.importedModules || [])
153
+ .map((m) => (m.id || '').replace(/\?.*$/, ''))
154
+ .filter(Boolean);
155
+ const transformed = await server.transformRequest(mod.id);
156
+ const code = transformed?.code || '';
157
+ moduleGraph.upsert((mod.id || '').replace(/\?.*$/, ''), code, deps, {
158
+ emitDeltaOnInsert: true,
159
+ // Defer the delta broadcast until AFTER the framework
160
+ // hot-update handler has had a chance to invalidate the
161
+ // shared transform-request cache + Vite's moduleGraph
162
+ // for the changed file and its transitive importers.
163
+ // Otherwise the client races: it receives the delta
164
+ // (eviction + re-import via tagged URL) before the
165
+ // server has purged its caches, and the re-import is
166
+ // served from cache → V8 evaluates the previous save's
167
+ // transformed code → patchRegistry runs against an
168
+ // unchanged source → the visible page is "one save
169
+ // behind". Angular has always taken this path; Solid
170
+ // needs the same contract because Solid HMR depends
171
+ // on the client re-fetching the just-changed module
172
+ // to drive `solid-refresh.patchRegistry`.
173
+ broadcastDelta: !strategy.deferDeltaBroadcast,
174
+ });
175
+ }
176
+ catch (error) {
177
+ if (verbose)
178
+ console.warn('[hmr-ws][v2] failed graph update target', mod.id, error);
179
+ }
180
+ }
181
+ }
182
+ }
183
+ catch (e) {
184
+ if (verbose)
185
+ console.warn('[hmr-ws][v2] failed graph update', e);
186
+ }
187
+ const root = server.config.root || process.cwd();
188
+ // CSS hot-update — handled BEFORE the project-scope filter because
189
+ // workspace deps (component `styleUrls`, `@import` partials) live outside
190
+ // `<root>/`. We distinguish two kinds of style edit and apply each
191
+ // correctly on the device — this is the fix for the regression where
192
+ // component `styleUrls` edits were misrouted to a global `app.css` refresh
193
+ // and silently did nothing:
194
+ //
195
+ // • GLOBAL stylesheet — the app entry CSS itself OR one of its `@import`
196
+ // deps (tracked via `getAppCssState().deps`). Broadcast the app entry
197
+ // CSS path so Vite re-runs PostCSS through the `@import` chain; the
198
+ // device replaces the boot-time `app.css`-tagged selectors.
199
+ //
200
+ // • COMPONENT style (`styleUrls`, including workspace-library
201
+ // components). Broadcast the style file's OWN path under a per-file
202
+ // tag. The device fetches that component's CSS and replaces just that
203
+ // file's selectors (`addTaggedAdditionalCSS` keyed by the file path),
204
+ // re-styling the live view without a reboot or `ɵɵreplaceMetadata`
205
+ // swap. `app.css` is never involved — it does not contain the
206
+ // component's inlined styles. Using a per-file tag (instead of the
207
+ // shared `app.css` tag) avoids clobbering the global stylesheet.
208
+ if (file.endsWith('.css')) {
209
+ const fileAbs = path.resolve(file).replace(/\\/g, '/');
210
+ const appCssState = getAppCssState(server);
211
+ const appEntryCssAbs = (appCssState?.path || path.resolve(root, APP_ROOT_DIR, 'app.css')).replace(/\\/g, '/');
212
+ const isGlobalStyle = fileAbs === appEntryCssAbs || !!appCssState?.deps?.has(fileAbs);
213
+ // Component-scoped style edit the framework applies in place itself
214
+ // (Angular + Analog liveReload → `angular:component-update`). Suppress
215
+ // the `ns:css-updates` broadcast: it can't win the emulated-scoping
216
+ // specificity battle anyway, AND the device's `?direct=1` fetch would
217
+ // create the css `?direct` module that stops the framework from
218
+ // re-emitting its component-update on subsequent edits. The framework's
219
+ // own `handleHotUpdate` (a separate plugin) drives the update.
220
+ if (!isGlobalStyle && strategy.ownsComponentStyleHmr?.(server)) {
221
+ updateMetrics.tAfterFramework = Date.now();
222
+ if (verbose)
223
+ console.log(`[hmr-ws] component style edit ${file} → left to framework component-update (no css broadcast)`);
224
+ emitHmrUpdateSummary();
225
+ return null;
226
+ }
227
+ const toRootRel = (absOrFile) => '/' + path.posix.normalize(path.relative(root, absOrFile)).split(path.sep).join('/');
228
+ // GLOBAL → app entry CSS path (default `app.css` tag on the client).
229
+ // COMPONENT → the style file's own path, tagged by that path.
230
+ const broadcastPath = isGlobalStyle ? toRootRel(appEntryCssAbs) : toRootRel(file);
231
+ const tag = isGlobalStyle ? undefined : broadcastPath;
232
+ updateMetrics.tAfterFramework = Date.now();
233
+ try {
234
+ const origin = getServerOrigin(server);
235
+ const timestamp = Date.now();
236
+ const msg = {
237
+ type: 'ns:css-updates',
238
+ origin,
239
+ updates: [
240
+ {
241
+ type: 'css-update',
242
+ path: broadcastPath,
243
+ acceptedPath: broadcastPath,
244
+ timestamp,
245
+ ...(tag ? { tag } : {}),
246
+ },
247
+ ],
248
+ };
249
+ wss.clients.forEach((client) => {
250
+ if (isSocketClientOpen(client)) {
251
+ client.send(JSON.stringify(msg));
252
+ updateMetrics.recipients += 1;
253
+ }
254
+ });
255
+ }
256
+ catch (error) {
257
+ console.warn('[hmr-ws] CSS update failed:', error);
258
+ }
259
+ if (verbose)
260
+ console.log(`[hmr-ws] Hot update for: ${file} → broadcast CSS ${broadcastPath} (${isGlobalStyle ? 'global app.css' : `component, tag=${tag}`})`);
261
+ emitHmrUpdateSummary();
262
+ return null;
263
+ }
264
+ const srcDir = `${root}/src`;
265
+ const coreDir = `${root}/core`;
266
+ const appDir = `${root}/${APP_ROOT_DIR}`;
267
+ const normalizedFile = file.split(path.sep).join('/');
268
+ const inSrcOrCore = normalizedFile.includes(srcDir) || normalizedFile.includes(coreDir);
269
+ const inApp = normalizedFile.includes(appDir);
270
+ const shouldIgnore = !(inSrcOrCore || inApp);
271
+ if (shouldIgnore)
272
+ return null;
273
+ if (verbose)
274
+ console.log(`[hmr-ws] Hot update for: ${file}`);
275
+ // Tailwind / content-scanning CSS broadcast for non-CSS edits.
276
+ //
277
+ // Background: when a `.html` template or `.ts` file scanned
278
+ // by Tailwind's `content` config gets a brand-new utility
279
+ // class (e.g. `pt-6` that was never used in the codebase
280
+ // before), the booted CSS bundle doesn't contain a rule for
281
+ // it. The Angular template HMR swaps the markup, the view
282
+ // re-renders, the class lookup misses, and the layout
283
+ // regresses to its default.
284
+ //
285
+ // In a "normal" Vite setup, the `vite:css` plugin consumes
286
+ // each PostCSS `dependency` message via `addWatchFile`, and
287
+ // `vite:css-analysis` later registers each watched file as
288
+ // an importer of the CSS module. A content-file edit then
289
+ // invalidates the CSS module through the moduleGraph and
290
+ // `ctx.modules`/`mod.importers` would surface it.
291
+ //
292
+ // NS HMR breaks that chain: `app.css` is loaded via a
293
+ // virtual module (`virtual:ns-app-css`) whose `load` hook
294
+ // calls `preprocessCSS(...)` and emits a JS module — the
295
+ // CSS itself is never a moduleGraph node, so the importer
296
+ // chain never forms. `ctx.modules` for the html edit only
297
+ // contains the html-as-Angular-template module with the
298
+ // component `.ts` as its importer.
299
+ //
300
+ // To bridge that gap, `mainEntryPlugin` stores the set of
301
+ // `preprocessCSS` deps for `app.css` on the server as
302
+ // `__nsAppCssDeps` (refreshed when `app.css` /
303
+ // `tailwind.config.*` change, or when files are added /
304
+ // removed). If the changed file is in that set, we
305
+ // broadcast a `ns:css-updates` for `app.css` so the device
306
+ // fetches fresh CSS through `?direct=1` and Vite re-runs
307
+ // PostCSS+Tailwind — picking up the new utility class.
308
+ //
309
+ // This MUST run before the framework branches because
310
+ // several of them return early (notably the Angular HTML
311
+ // live-reload path), and the broadcast must land alongside
312
+ // the framework's own template-update payload.
313
+ if (!file.endsWith('.css')) {
314
+ try {
315
+ const appCssState = getAppCssState(server);
316
+ const deps = appCssState?.deps;
317
+ const appCssPath = appCssState?.path;
318
+ if (deps && appCssPath) {
319
+ const normalizedFile = path.resolve(file).replace(/\\/g, '/');
320
+ if (deps.has(normalizedFile)) {
321
+ const rootPosix = root.replace(/\\/g, '/').replace(/\/$/, '');
322
+ const relRaw = path.posix.normalize(path.posix.relative(rootPosix, appCssPath));
323
+ const appCssRel = relRaw && relRaw !== '.' && !relRaw.startsWith('..') ? (relRaw.startsWith('/') ? relRaw : `/${relRaw}`) : null;
324
+ if (appCssRel) {
325
+ const origin = getServerOrigin(server);
326
+ const timestamp = Date.now();
327
+ const msg = {
328
+ type: 'ns:css-updates',
329
+ origin,
330
+ updates: [
331
+ {
332
+ type: 'css-update',
333
+ path: appCssRel,
334
+ acceptedPath: appCssRel,
335
+ timestamp,
336
+ },
337
+ ],
338
+ };
339
+ wss.clients.forEach((client) => {
340
+ if (isSocketClientOpen(client)) {
341
+ try {
342
+ client.send(JSON.stringify(msg));
343
+ updateMetrics.recipients += 1;
344
+ }
345
+ catch { }
346
+ }
347
+ });
348
+ if (verbose)
349
+ console.info(`[ns-hmr][server] Tailwind/PostCSS content-file edit (${path.basename(file)}) broadcast ${appCssRel}`);
350
+ }
351
+ }
352
+ }
353
+ }
354
+ catch (error) {
355
+ console.warn('[hmr-ws] CSS content-source broadcast failed:', error);
356
+ }
357
+ }
358
+ return { root, updateRel, metrics: updateMetrics, emitSummary: emitHmrUpdateSummary };
359
+ }
360
+ //# sourceMappingURL=websocket-hot-update.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"websocket-hot-update.js","sourceRoot":"","sources":["../../../../../packages/vite/hmr/server/websocket-hot-update.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,IAAI,MAAM,MAAM,CAAC;AAI7B,OAAO,EAAE,0BAA0B,EAAE,MAAM,2BAA2B,CAAC;AACvE,OAAO,EAAE,gBAAgB,EAAE,MAAM,4BAA4B,CAAC;AAC9D,OAAO,EAAE,qCAAqC,EAAiC,MAAM,8DAA8D,CAAC;AACpJ,OAAO,EAAE,cAAc,EAAE,MAA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