@nativescript/vite 8.0.0-beta.0 → 8.0.0-dev.0

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 (586) hide show
  1. package/README.md +89 -14
  2. package/bin/cli.cjs +8 -14
  3. package/configuration/angular.d.ts +35 -2
  4. package/configuration/angular.js +541 -216
  5. package/configuration/angular.js.map +1 -1
  6. package/configuration/base.js +228 -78
  7. package/configuration/base.js.map +1 -1
  8. package/configuration/javascript.js +17 -96
  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 +58 -6
  13. package/configuration/solid.js.map +1 -1
  14. package/configuration/typescript.js +15 -96
  15. package/configuration/typescript.js.map +1 -1
  16. package/framework.d.ts +22 -0
  17. package/framework.js +18 -0
  18. package/framework.js.map +1 -0
  19. package/helpers/app-components.d.ts +2 -1
  20. package/helpers/app-components.js.map +1 -1
  21. package/helpers/app-css-refresh.d.ts +31 -0
  22. package/helpers/app-css-refresh.js +43 -0
  23. package/helpers/app-css-refresh.js.map +1 -0
  24. package/helpers/app-css-state.d.ts +17 -0
  25. package/helpers/app-css-state.js +51 -0
  26. package/helpers/app-css-state.js.map +1 -0
  27. package/helpers/bundler-context.d.ts +11 -0
  28. package/helpers/bundler-context.js +71 -0
  29. package/helpers/bundler-context.js.map +1 -0
  30. package/helpers/cli-flags.d.ts +12 -0
  31. package/helpers/cli-flags.js +34 -0
  32. package/helpers/cli-flags.js.map +1 -1
  33. package/helpers/commonjs-plugins.d.ts +5 -2
  34. package/helpers/commonjs-plugins.js +126 -0
  35. package/helpers/commonjs-plugins.js.map +1 -1
  36. package/helpers/config-as-json.js +10 -0
  37. package/helpers/config-as-json.js.map +1 -1
  38. package/helpers/css-platform-plugin.d.ts +14 -0
  39. package/helpers/css-platform-plugin.js +43 -25
  40. package/helpers/css-platform-plugin.js.map +1 -1
  41. package/helpers/dev-host.d.ts +360 -0
  42. package/helpers/dev-host.js +694 -0
  43. package/helpers/dev-host.js.map +1 -0
  44. package/helpers/dynamic-import-plugin.d.ts +2 -1
  45. package/helpers/dynamic-import-plugin.js +59 -53
  46. package/helpers/dynamic-import-plugin.js.map +1 -1
  47. package/helpers/esbuild-platform-resolver.js +9 -6
  48. package/helpers/esbuild-platform-resolver.js.map +1 -1
  49. package/helpers/external-configs.d.ts +10 -4
  50. package/helpers/external-configs.js +63 -15
  51. package/helpers/external-configs.js.map +1 -1
  52. package/helpers/flavor.d.ts +31 -0
  53. package/helpers/flavor.js +53 -2
  54. package/helpers/flavor.js.map +1 -1
  55. package/helpers/global-defines.d.ts +118 -0
  56. package/helpers/global-defines.js +214 -11
  57. package/helpers/global-defines.js.map +1 -1
  58. package/helpers/hmr-scope.d.ts +26 -0
  59. package/helpers/hmr-scope.js +67 -0
  60. package/helpers/hmr-scope.js.map +1 -0
  61. package/helpers/import-meta-path.d.ts +4 -0
  62. package/helpers/import-meta-path.js +5 -0
  63. package/helpers/import-meta-path.js.map +1 -0
  64. package/helpers/import-specifier.d.ts +1 -0
  65. package/helpers/import-specifier.js +18 -0
  66. package/helpers/import-specifier.js.map +1 -0
  67. package/helpers/init.js +24 -26
  68. package/helpers/init.js.map +1 -1
  69. package/helpers/logging.d.ts +12 -1
  70. package/helpers/logging.js +81 -5
  71. package/helpers/logging.js.map +1 -1
  72. package/helpers/main-entry.d.ts +8 -2
  73. package/helpers/main-entry.js +622 -120
  74. package/helpers/main-entry.js.map +1 -1
  75. package/helpers/nativeclass-esbuild-plugin.d.ts +2 -1
  76. package/helpers/nativeclass-esbuild-plugin.js +6 -1
  77. package/helpers/nativeclass-esbuild-plugin.js.map +1 -1
  78. package/helpers/nativeclass-transform.d.ts +13 -0
  79. package/helpers/nativeclass-transform.js +42 -131
  80. package/helpers/nativeclass-transform.js.map +1 -1
  81. package/helpers/nativeclass-transformer-plugin.d.ts +19 -1
  82. package/helpers/nativeclass-transformer-plugin.js +324 -37
  83. package/helpers/nativeclass-transformer-plugin.js.map +1 -1
  84. package/helpers/nativescript-package-resolver.js +10 -62
  85. package/helpers/nativescript-package-resolver.js.map +1 -1
  86. package/helpers/normalize-id.d.ts +42 -0
  87. package/helpers/normalize-id.js +60 -0
  88. package/helpers/normalize-id.js.map +1 -0
  89. package/helpers/ns-core-external-urls.d.ts +32 -0
  90. package/helpers/ns-core-external-urls.js +107 -0
  91. package/helpers/ns-core-external-urls.js.map +1 -0
  92. package/helpers/ns-core-url.d.ts +106 -0
  93. package/helpers/ns-core-url.js +225 -0
  94. package/helpers/ns-core-url.js.map +1 -0
  95. package/helpers/optimize-deps.d.ts +16 -0
  96. package/helpers/optimize-deps.js +17 -0
  97. package/helpers/optimize-deps.js.map +1 -0
  98. package/helpers/package-platform-aliases.js +34 -49
  99. package/helpers/package-platform-aliases.js.map +1 -1
  100. package/helpers/platform-types.d.ts +2 -0
  101. package/helpers/platform-types.js +2 -0
  102. package/helpers/platform-types.js.map +1 -0
  103. package/helpers/postcss-platform-config.d.ts +17 -1
  104. package/helpers/postcss-platform-config.js +20 -37
  105. package/helpers/postcss-platform-config.js.map +1 -1
  106. package/helpers/project.d.ts +35 -0
  107. package/helpers/project.js +120 -2
  108. package/helpers/project.js.map +1 -1
  109. package/helpers/resolve-main-field-platform.d.ts +20 -0
  110. package/helpers/resolve-main-field-platform.js +49 -0
  111. package/helpers/resolve-main-field-platform.js.map +1 -0
  112. package/helpers/resolver.js +17 -2
  113. package/helpers/resolver.js.map +1 -1
  114. package/helpers/theme-core-plugins.js +1 -1
  115. package/helpers/theme-core-plugins.js.map +1 -1
  116. package/helpers/ts-config-paths.d.ts +32 -0
  117. package/helpers/ts-config-paths.js +156 -27
  118. package/helpers/ts-config-paths.js.map +1 -1
  119. package/helpers/typescript-check.d.ts +3 -3
  120. package/helpers/typescript-check.js +4 -4
  121. package/helpers/typescript-check.js.map +1 -1
  122. package/helpers/ui-registration.d.ts +21 -0
  123. package/helpers/ui-registration.js +156 -0
  124. package/helpers/ui-registration.js.map +1 -0
  125. package/helpers/utils.d.ts +9 -0
  126. package/helpers/utils.js +22 -2
  127. package/helpers/utils.js.map +1 -1
  128. package/helpers/vite-package-version.d.ts +7 -0
  129. package/helpers/vite-package-version.js +44 -0
  130. package/helpers/vite-package-version.js.map +1 -0
  131. package/helpers/workers.d.ts +40 -19
  132. package/helpers/workers.js +312 -13
  133. package/helpers/workers.js.map +1 -1
  134. package/hmr/client/css-handler.d.ts +2 -1
  135. package/hmr/client/css-handler.js +95 -23
  136. package/hmr/client/css-handler.js.map +1 -1
  137. package/hmr/client/css-update-overlay.d.ts +18 -0
  138. package/hmr/client/css-update-overlay.js +27 -0
  139. package/hmr/client/css-update-overlay.js.map +1 -0
  140. package/hmr/client/framework-client-strategy.d.ts +117 -0
  141. package/hmr/client/framework-client-strategy.js +18 -0
  142. package/hmr/client/framework-client-strategy.js.map +1 -0
  143. package/hmr/client/framework.d.ts +31 -0
  144. package/hmr/client/framework.js +17 -0
  145. package/hmr/client/framework.js.map +1 -0
  146. package/hmr/client/hmr-pending-overlay.d.ts +13 -0
  147. package/hmr/client/hmr-pending-overlay.js +41 -0
  148. package/hmr/client/hmr-pending-overlay.js.map +1 -0
  149. package/hmr/client/hot-context.d.ts +89 -0
  150. package/hmr/client/hot-context.js +404 -0
  151. package/hmr/client/hot-context.js.map +1 -0
  152. package/hmr/client/index.d.ts +9 -1
  153. package/hmr/client/index.js +91 -1418
  154. package/hmr/client/index.js.map +1 -1
  155. package/hmr/client/overlay-driver.d.ts +10 -0
  156. package/hmr/client/overlay-driver.js +33 -0
  157. package/hmr/client/overlay-driver.js.map +1 -0
  158. package/hmr/client/protocol-dispatch.d.ts +8 -0
  159. package/hmr/client/protocol-dispatch.js +308 -0
  160. package/hmr/client/protocol-dispatch.js.map +1 -0
  161. package/hmr/client/root-reset.d.ts +15 -0
  162. package/hmr/client/root-reset.js +358 -0
  163. package/hmr/client/root-reset.js.map +1 -0
  164. package/hmr/client/strategy-loader.d.ts +24 -0
  165. package/hmr/client/strategy-loader.js +136 -0
  166. package/hmr/client/strategy-loader.js.map +1 -0
  167. package/hmr/client/update-pipeline.d.ts +27 -0
  168. package/hmr/client/update-pipeline.js +489 -0
  169. package/hmr/client/update-pipeline.js.map +1 -0
  170. package/hmr/client/utils.d.ts +14 -1
  171. package/hmr/client/utils.js +265 -54
  172. package/hmr/client/utils.js.map +1 -1
  173. package/hmr/client/ws-transport.d.ts +21 -0
  174. package/hmr/client/ws-transport.js +323 -0
  175. package/hmr/client/ws-transport.js.map +1 -0
  176. package/hmr/entry-runtime.d.ts +11 -0
  177. package/hmr/entry-runtime.js +566 -43
  178. package/hmr/entry-runtime.js.map +1 -1
  179. package/hmr/framework-flavors.d.ts +59 -0
  180. package/hmr/framework-flavors.js +108 -0
  181. package/hmr/framework-flavors.js.map +1 -0
  182. package/hmr/frameworks/angular/build/angular-linker.d.ts +12 -0
  183. package/hmr/frameworks/angular/build/angular-linker.js +113 -0
  184. package/hmr/frameworks/angular/build/angular-linker.js.map +1 -0
  185. package/hmr/frameworks/angular/build/inject-component-hmr-registration.d.ts +112 -0
  186. package/hmr/frameworks/angular/build/inject-component-hmr-registration.js +291 -0
  187. package/hmr/frameworks/angular/build/inject-component-hmr-registration.js.map +1 -0
  188. package/hmr/frameworks/angular/build/inject-hmr-vite-ignore.d.ts +75 -0
  189. package/hmr/frameworks/angular/build/inject-hmr-vite-ignore.js +221 -0
  190. package/hmr/frameworks/angular/build/inject-hmr-vite-ignore.js.map +1 -0
  191. package/hmr/frameworks/angular/build/inline-decorator-component-templates.d.ts +3 -0
  192. package/hmr/frameworks/angular/build/inline-decorator-component-templates.js +231 -0
  193. package/hmr/frameworks/angular/build/inline-decorator-component-templates.js.map +1 -0
  194. package/hmr/frameworks/angular/build/js-lexer.d.ts +4 -0
  195. package/hmr/frameworks/angular/build/js-lexer.js +182 -0
  196. package/hmr/frameworks/angular/build/js-lexer.js.map +1 -0
  197. package/hmr/frameworks/angular/build/linker-stats.d.ts +18 -0
  198. package/hmr/frameworks/angular/build/linker-stats.js +29 -0
  199. package/hmr/frameworks/angular/build/linker-stats.js.map +1 -0
  200. package/hmr/frameworks/angular/build/shared-linker.d.ts +39 -0
  201. package/hmr/frameworks/angular/build/shared-linker.js +128 -0
  202. package/hmr/frameworks/angular/build/shared-linker.js.map +1 -0
  203. package/hmr/frameworks/angular/build/synthesize-decorator-ctor-parameters.d.ts +1 -0
  204. package/hmr/frameworks/angular/build/synthesize-decorator-ctor-parameters.js +88 -0
  205. package/hmr/frameworks/angular/build/synthesize-decorator-ctor-parameters.js.map +1 -0
  206. package/hmr/frameworks/angular/build/synthesize-injectable-factories.d.ts +3 -0
  207. package/hmr/frameworks/angular/build/synthesize-injectable-factories.js +241 -0
  208. package/hmr/frameworks/angular/build/synthesize-injectable-factories.js.map +1 -0
  209. package/hmr/frameworks/angular/build/ts-fallback-transform.d.ts +5 -0
  210. package/hmr/frameworks/angular/build/ts-fallback-transform.js +138 -0
  211. package/hmr/frameworks/angular/build/ts-fallback-transform.js.map +1 -0
  212. package/{helpers/angular → hmr/frameworks/angular/build}/util.d.ts +1 -0
  213. package/hmr/frameworks/angular/build/util.js +155 -0
  214. package/hmr/frameworks/angular/build/util.js.map +1 -0
  215. package/hmr/frameworks/angular/build/worker-url-preserve.d.ts +5 -0
  216. package/hmr/frameworks/angular/build/worker-url-preserve.js +140 -0
  217. package/hmr/frameworks/angular/build/worker-url-preserve.js.map +1 -0
  218. package/hmr/frameworks/angular/client/index.d.ts +2 -1
  219. package/hmr/frameworks/angular/client/index.js +637 -23
  220. package/hmr/frameworks/angular/client/index.js.map +1 -1
  221. package/hmr/frameworks/angular/client/strategy.d.ts +9 -0
  222. package/hmr/frameworks/angular/client/strategy.js +19 -0
  223. package/hmr/frameworks/angular/client/strategy.js.map +1 -0
  224. package/hmr/frameworks/angular/server/angular-root-component.d.ts +79 -0
  225. package/hmr/frameworks/angular/server/angular-root-component.js +149 -0
  226. package/hmr/frameworks/angular/server/angular-root-component.js.map +1 -0
  227. package/hmr/frameworks/angular/server/linker.js +37 -6
  228. package/hmr/frameworks/angular/server/linker.js.map +1 -1
  229. package/hmr/frameworks/angular/server/ng-component-route.d.ts +43 -0
  230. package/hmr/frameworks/angular/server/ng-component-route.js +113 -0
  231. package/hmr/frameworks/angular/server/ng-component-route.js.map +1 -0
  232. package/hmr/frameworks/angular/server/strategy.js +697 -18
  233. package/hmr/frameworks/angular/server/strategy.js.map +1 -1
  234. package/hmr/frameworks/angular/server/websocket-angular-entry.d.ts +2 -0
  235. package/hmr/frameworks/angular/server/websocket-angular-entry.js +68 -0
  236. package/hmr/frameworks/angular/server/websocket-angular-entry.js.map +1 -0
  237. package/hmr/frameworks/angular/server/websocket-angular-hot-update.d.ts +94 -0
  238. package/hmr/frameworks/angular/server/websocket-angular-hot-update.js +485 -0
  239. package/hmr/frameworks/angular/server/websocket-angular-hot-update.js.map +1 -0
  240. package/hmr/frameworks/react/client/strategy.d.ts +12 -0
  241. package/hmr/frameworks/react/client/strategy.js +27 -0
  242. package/hmr/frameworks/react/client/strategy.js.map +1 -0
  243. package/hmr/frameworks/react/server/strategy.d.ts +2 -0
  244. package/hmr/frameworks/react/server/strategy.js +230 -0
  245. package/hmr/frameworks/react/server/strategy.js.map +1 -0
  246. package/hmr/frameworks/solid/build/solid-jsx-deps.d.ts +15 -0
  247. package/hmr/frameworks/solid/build/solid-jsx-deps.js +178 -0
  248. package/hmr/frameworks/solid/build/solid-jsx-deps.js.map +1 -0
  249. package/hmr/frameworks/solid/client/app-runtime.d.ts +68 -0
  250. package/hmr/frameworks/solid/client/app-runtime.js +252 -0
  251. package/hmr/frameworks/solid/client/app-runtime.js.map +1 -0
  252. package/hmr/frameworks/solid/client/strategy.d.ts +7 -0
  253. package/hmr/frameworks/solid/client/strategy.js +391 -0
  254. package/hmr/frameworks/solid/client/strategy.js.map +1 -0
  255. package/hmr/frameworks/solid/server/strategy.js +293 -16
  256. package/hmr/frameworks/solid/server/strategy.js.map +1 -1
  257. package/hmr/frameworks/typescript/client/strategy.d.ts +7 -0
  258. package/hmr/frameworks/typescript/client/strategy.js +418 -0
  259. package/hmr/frameworks/typescript/client/strategy.js.map +1 -0
  260. package/hmr/frameworks/typescript/server/strategy.js +48 -16
  261. package/hmr/frameworks/typescript/server/strategy.js.map +1 -1
  262. package/hmr/frameworks/vue/client/dep-propagation.d.ts +44 -0
  263. package/hmr/frameworks/vue/client/dep-propagation.js +148 -0
  264. package/hmr/frameworks/vue/client/dep-propagation.js.map +1 -0
  265. package/hmr/frameworks/vue/client/index.d.ts +10 -1
  266. package/hmr/frameworks/vue/client/index.js +287 -562
  267. package/hmr/frameworks/vue/client/index.js.map +1 -1
  268. package/hmr/frameworks/vue/client/navigate-app.d.ts +3 -0
  269. package/hmr/frameworks/vue/client/navigate-app.js +178 -0
  270. package/hmr/frameworks/vue/client/navigate-app.js.map +1 -0
  271. package/hmr/frameworks/vue/client/strategy.d.ts +33 -0
  272. package/hmr/frameworks/vue/client/strategy.js +152 -0
  273. package/hmr/frameworks/vue/client/strategy.js.map +1 -0
  274. package/hmr/frameworks/vue/client/vue-sfc-update-overlay.d.ts +49 -0
  275. package/hmr/frameworks/vue/client/vue-sfc-update-overlay.js +124 -0
  276. package/hmr/frameworks/vue/client/vue-sfc-update-overlay.js.map +1 -0
  277. package/hmr/frameworks/vue/server/compiler.d.ts +3 -1
  278. package/hmr/frameworks/vue/server/compiler.js +3 -1
  279. package/hmr/frameworks/vue/server/compiler.js.map +1 -1
  280. package/hmr/frameworks/vue/server/sfc-route-assemble.d.ts +7 -0
  281. package/hmr/frameworks/vue/server/sfc-route-assemble.js +823 -0
  282. package/hmr/frameworks/vue/server/sfc-route-assemble.js.map +1 -0
  283. package/hmr/frameworks/vue/server/sfc-route-meta.d.ts +7 -0
  284. package/hmr/frameworks/vue/server/sfc-route-meta.js +80 -0
  285. package/hmr/frameworks/vue/server/sfc-route-meta.js.map +1 -0
  286. package/hmr/frameworks/vue/server/sfc-route-serve.d.ts +8 -0
  287. package/hmr/frameworks/vue/server/sfc-route-serve.js +462 -0
  288. package/hmr/frameworks/vue/server/sfc-route-serve.js.map +1 -0
  289. package/hmr/frameworks/vue/server/sfc-route-shared.d.ts +45 -0
  290. package/hmr/frameworks/vue/server/sfc-route-shared.js +105 -0
  291. package/hmr/frameworks/vue/server/sfc-route-shared.js.map +1 -0
  292. package/hmr/frameworks/vue/server/strategy.d.ts +35 -0
  293. package/hmr/frameworks/vue/server/strategy.js +291 -7
  294. package/hmr/frameworks/vue/server/strategy.js.map +1 -1
  295. package/hmr/frameworks/vue/server/websocket-sfc.d.ts +15 -0
  296. package/hmr/frameworks/vue/server/websocket-sfc.js +20 -0
  297. package/hmr/frameworks/vue/server/websocket-sfc.js.map +1 -0
  298. package/hmr/helpers/ast-normalizer.d.ts +3 -1
  299. package/hmr/helpers/ast-normalizer.js +131 -24
  300. package/hmr/helpers/ast-normalizer.js.map +1 -1
  301. package/hmr/helpers/cjs-named-exports.d.ts +23 -0
  302. package/hmr/helpers/cjs-named-exports.js +152 -0
  303. package/hmr/helpers/cjs-named-exports.js.map +1 -0
  304. package/hmr/helpers/package-exports.d.ts +16 -0
  305. package/hmr/helpers/package-exports.js +396 -0
  306. package/hmr/helpers/package-exports.js.map +1 -0
  307. package/hmr/helpers/vendor-rewrite.d.ts +1 -1
  308. package/hmr/helpers/vendor-rewrite.js +5 -3
  309. package/hmr/helpers/vendor-rewrite.js.map +1 -1
  310. package/hmr/server/boot-recording.d.ts +51 -0
  311. package/hmr/server/boot-recording.js +214 -0
  312. package/hmr/server/boot-recording.js.map +1 -0
  313. package/hmr/server/constants.d.ts +1 -0
  314. package/hmr/server/constants.js +21 -4
  315. package/hmr/server/constants.js.map +1 -1
  316. package/hmr/server/content-css-update.d.ts +54 -0
  317. package/hmr/server/content-css-update.js +78 -0
  318. package/hmr/server/content-css-update.js.map +1 -0
  319. package/hmr/server/core-bundle.d.ts +140 -0
  320. package/hmr/server/core-bundle.js +614 -0
  321. package/hmr/server/core-bundle.js.map +1 -0
  322. package/hmr/server/core-sanitize.d.ts +130 -4
  323. package/hmr/server/core-sanitize.js +393 -32
  324. package/hmr/server/core-sanitize.js.map +1 -1
  325. package/hmr/server/css-connect-sync.d.ts +28 -0
  326. package/hmr/server/css-connect-sync.js +59 -0
  327. package/hmr/server/css-connect-sync.js.map +1 -0
  328. package/hmr/server/css-device-module.d.ts +28 -0
  329. package/hmr/server/css-device-module.js +44 -0
  330. package/hmr/server/css-device-module.js.map +1 -0
  331. package/hmr/server/css-update-message.d.ts +23 -0
  332. package/hmr/server/css-update-message.js +41 -0
  333. package/hmr/server/css-update-message.js.map +1 -0
  334. package/hmr/server/deps-bundle.d.ts +233 -0
  335. package/hmr/server/deps-bundle.js +1022 -0
  336. package/hmr/server/deps-bundle.js.map +1 -0
  337. package/hmr/server/device-transform-helpers.d.ts +24 -0
  338. package/hmr/server/device-transform-helpers.js +408 -0
  339. package/hmr/server/device-transform-helpers.js.map +1 -0
  340. package/hmr/server/framework-strategy.d.ts +182 -11
  341. package/hmr/server/hmr-module-graph.d.ts +37 -0
  342. package/hmr/server/hmr-module-graph.js +215 -0
  343. package/hmr/server/hmr-module-graph.js.map +1 -0
  344. package/hmr/server/import-map.d.ts +99 -0
  345. package/hmr/server/import-map.js +294 -0
  346. package/hmr/server/import-map.js.map +1 -0
  347. package/hmr/server/index.d.ts +2 -1
  348. package/hmr/server/index.js +7 -16
  349. package/hmr/server/index.js.map +1 -1
  350. package/hmr/server/node-builtins-route.d.ts +12 -0
  351. package/hmr/server/node-builtins-route.js +86 -0
  352. package/hmr/server/node-builtins-route.js.map +1 -0
  353. package/hmr/server/ns-core-cjs-shape.d.ts +204 -0
  354. package/hmr/server/ns-core-cjs-shape.js +271 -0
  355. package/hmr/server/ns-core-cjs-shape.js.map +1 -0
  356. package/hmr/server/ns-m-response-memo.d.ts +10 -0
  357. package/hmr/server/ns-m-response-memo.js +33 -0
  358. package/hmr/server/ns-m-response-memo.js.map +1 -0
  359. package/hmr/server/ns-rt-bridge.d.ts +51 -0
  360. package/hmr/server/ns-rt-bridge.js +131 -0
  361. package/hmr/server/ns-rt-bridge.js.map +1 -0
  362. package/hmr/server/ns-rt-route.d.ts +5 -0
  363. package/hmr/server/ns-rt-route.js +39 -0
  364. package/hmr/server/ns-rt-route.js.map +1 -0
  365. package/hmr/server/perf-instrumentation.d.ts +114 -0
  366. package/hmr/server/perf-instrumentation.js +197 -0
  367. package/hmr/server/perf-instrumentation.js.map +1 -0
  368. package/hmr/server/process-code-for-device.d.ts +54 -0
  369. package/hmr/server/process-code-for-device.js +832 -0
  370. package/hmr/server/process-code-for-device.js.map +1 -0
  371. package/hmr/server/require-guard.d.ts +1 -0
  372. package/hmr/server/require-guard.js +12 -0
  373. package/hmr/server/require-guard.js.map +1 -0
  374. package/hmr/server/rewrite-imports.d.ts +2 -0
  375. package/hmr/server/rewrite-imports.js +631 -0
  376. package/hmr/server/rewrite-imports.js.map +1 -0
  377. package/hmr/server/route-helpers.d.ts +7 -0
  378. package/hmr/server/route-helpers.js +13 -0
  379. package/hmr/server/route-helpers.js.map +1 -0
  380. package/hmr/server/runtime-graph-filter.d.ts +5 -0
  381. package/hmr/server/runtime-graph-filter.js +28 -0
  382. package/hmr/server/runtime-graph-filter.js.map +1 -0
  383. package/hmr/server/server-origin.d.ts +2 -0
  384. package/hmr/server/server-origin.js +88 -0
  385. package/hmr/server/server-origin.js.map +1 -0
  386. package/hmr/server/shared-transform-request.d.ts +12 -0
  387. package/hmr/server/shared-transform-request.js +143 -0
  388. package/hmr/server/shared-transform-request.js.map +1 -0
  389. package/hmr/server/socket-utils.d.ts +10 -0
  390. package/hmr/server/socket-utils.js +14 -0
  391. package/hmr/server/socket-utils.js.map +1 -0
  392. package/hmr/server/transform-cache-invalidation.d.ts +37 -0
  393. package/hmr/server/transform-cache-invalidation.js +156 -0
  394. package/hmr/server/transform-cache-invalidation.js.map +1 -0
  395. package/hmr/server/vendor-bare-module-shims.d.ts +4 -0
  396. package/hmr/server/vendor-bare-module-shims.js +80 -0
  397. package/hmr/server/vendor-bare-module-shims.js.map +1 -0
  398. package/hmr/server/vite-plugin.d.ts +22 -1
  399. package/hmr/server/vite-plugin.js +655 -58
  400. package/hmr/server/vite-plugin.js.map +1 -1
  401. package/hmr/server/websocket-core-bridge.d.ts +68 -0
  402. package/hmr/server/websocket-core-bridge.js +370 -0
  403. package/hmr/server/websocket-core-bridge.js.map +1 -0
  404. package/hmr/server/websocket-device-transform.d.ts +3 -0
  405. package/hmr/server/websocket-device-transform.js +7 -0
  406. package/hmr/server/websocket-device-transform.js.map +1 -0
  407. package/hmr/server/websocket-graph-upsert.d.ts +21 -0
  408. package/hmr/server/websocket-graph-upsert.js +33 -0
  409. package/hmr/server/websocket-graph-upsert.js.map +1 -0
  410. package/hmr/server/websocket-hmr-pending.d.ts +29 -0
  411. package/hmr/server/websocket-hmr-pending.js +33 -0
  412. package/hmr/server/websocket-hmr-pending.js.map +1 -0
  413. package/hmr/server/websocket-hot-update.d.ts +80 -0
  414. package/hmr/server/websocket-hot-update.js +299 -0
  415. package/hmr/server/websocket-hot-update.js.map +1 -0
  416. package/hmr/server/websocket-import-map-route.d.ts +15 -0
  417. package/hmr/server/websocket-import-map-route.js +51 -0
  418. package/hmr/server/websocket-import-map-route.js.map +1 -0
  419. package/hmr/server/websocket-module-bindings.d.ts +21 -0
  420. package/hmr/server/websocket-module-bindings.js +504 -0
  421. package/hmr/server/websocket-module-bindings.js.map +1 -0
  422. package/hmr/server/websocket-module-specifiers.d.ts +98 -0
  423. package/hmr/server/websocket-module-specifiers.js +832 -0
  424. package/hmr/server/websocket-module-specifiers.js.map +1 -0
  425. package/hmr/server/websocket-ns-core.d.ts +34 -0
  426. package/hmr/server/websocket-ns-core.js +414 -0
  427. package/hmr/server/websocket-ns-core.js.map +1 -0
  428. package/hmr/server/websocket-ns-entry.d.ts +21 -0
  429. package/hmr/server/websocket-ns-entry.js +163 -0
  430. package/hmr/server/websocket-ns-entry.js.map +1 -0
  431. package/hmr/server/websocket-ns-m-paths.d.ts +19 -0
  432. package/hmr/server/websocket-ns-m-paths.js +115 -0
  433. package/hmr/server/websocket-ns-m-paths.js.map +1 -0
  434. package/hmr/server/websocket-ns-m-request.d.ts +46 -0
  435. package/hmr/server/websocket-ns-m-request.js +197 -0
  436. package/hmr/server/websocket-ns-m-request.js.map +1 -0
  437. package/hmr/server/websocket-ns-m.d.ts +52 -0
  438. package/hmr/server/websocket-ns-m.js +592 -0
  439. package/hmr/server/websocket-ns-m.js.map +1 -0
  440. package/hmr/server/websocket-served-module-helpers.d.ts +98 -0
  441. package/hmr/server/websocket-served-module-helpers.js +948 -0
  442. package/hmr/server/websocket-served-module-helpers.js.map +1 -0
  443. package/hmr/server/websocket-txn.d.ts +6 -0
  444. package/hmr/server/websocket-txn.js +42 -0
  445. package/hmr/server/websocket-txn.js.map +1 -0
  446. package/hmr/server/websocket-vendor-unifier.d.ts +9 -0
  447. package/hmr/server/websocket-vendor-unifier.js +46 -0
  448. package/hmr/server/websocket-vendor-unifier.js.map +1 -0
  449. package/hmr/server/websocket.d.ts +6 -17
  450. package/hmr/server/websocket.js +723 -5376
  451. package/hmr/server/websocket.js.map +1 -1
  452. package/hmr/shared/ns-globals.d.ts +108 -0
  453. package/hmr/shared/ns-globals.js +29 -0
  454. package/hmr/shared/ns-globals.js.map +1 -0
  455. package/hmr/shared/package-classifier.d.ts +9 -0
  456. package/hmr/shared/package-classifier.js +58 -0
  457. package/hmr/shared/package-classifier.js.map +1 -0
  458. package/hmr/shared/protocol.d.ts +157 -0
  459. package/hmr/shared/protocol.js +28 -0
  460. package/hmr/shared/protocol.js.map +1 -0
  461. package/hmr/shared/runtime/boot-complete.d.ts +14 -0
  462. package/hmr/shared/runtime/boot-complete.js +32 -0
  463. package/hmr/shared/runtime/boot-complete.js.map +1 -0
  464. package/hmr/shared/runtime/boot-placeholder-ui.d.ts +69 -0
  465. package/hmr/shared/runtime/boot-placeholder-ui.js +101 -0
  466. package/hmr/shared/runtime/boot-placeholder-ui.js.map +1 -0
  467. package/hmr/shared/runtime/boot-progress.d.ts +44 -0
  468. package/hmr/shared/runtime/boot-progress.js +134 -0
  469. package/hmr/shared/runtime/boot-progress.js.map +1 -0
  470. package/hmr/shared/runtime/boot-timeline.d.ts +17 -0
  471. package/hmr/shared/runtime/boot-timeline.js +40 -0
  472. package/hmr/shared/runtime/boot-timeline.js.map +1 -0
  473. package/hmr/shared/runtime/browser-runtime-contract.d.ts +97 -0
  474. package/hmr/shared/runtime/browser-runtime-contract.js +66 -0
  475. package/hmr/shared/runtime/browser-runtime-contract.js.map +1 -0
  476. package/hmr/shared/runtime/dev-overlay-ios.d.ts +87 -0
  477. package/hmr/shared/runtime/dev-overlay-ios.js +521 -0
  478. package/hmr/shared/runtime/dev-overlay-ios.js.map +1 -0
  479. package/hmr/shared/runtime/dev-overlay-shared.d.ts +58 -0
  480. package/hmr/shared/runtime/dev-overlay-shared.js +116 -0
  481. package/hmr/shared/runtime/dev-overlay-shared.js.map +1 -0
  482. package/hmr/shared/runtime/dev-overlay-snapshots.d.ts +31 -0
  483. package/hmr/shared/runtime/dev-overlay-snapshots.js +324 -0
  484. package/hmr/shared/runtime/dev-overlay-snapshots.js.map +1 -0
  485. package/hmr/shared/runtime/dev-overlay-tree.d.ts +59 -0
  486. package/hmr/shared/runtime/dev-overlay-tree.js +712 -0
  487. package/hmr/shared/runtime/dev-overlay-tree.js.map +1 -0
  488. package/hmr/shared/runtime/dev-overlay.d.ts +39 -0
  489. package/hmr/shared/runtime/dev-overlay.js +292 -0
  490. package/hmr/shared/runtime/dev-overlay.js.map +1 -0
  491. package/hmr/shared/runtime/global-scope.d.ts +18 -0
  492. package/hmr/shared/runtime/global-scope.js +21 -0
  493. package/hmr/shared/runtime/global-scope.js.map +1 -0
  494. package/hmr/shared/runtime/hooks.js +2 -1
  495. package/hmr/shared/runtime/hooks.js.map +1 -1
  496. package/hmr/shared/runtime/launch-bridge.d.ts +9 -0
  497. package/hmr/shared/runtime/launch-bridge.js +98 -0
  498. package/hmr/shared/runtime/launch-bridge.js.map +1 -0
  499. package/hmr/shared/runtime/module-provenance.d.ts +1 -0
  500. package/hmr/shared/runtime/module-provenance.js +64 -0
  501. package/hmr/shared/runtime/module-provenance.js.map +1 -0
  502. package/hmr/shared/runtime/ns-runtime-test-double.d.ts +21 -0
  503. package/hmr/shared/runtime/ns-runtime-test-double.js +20 -0
  504. package/hmr/shared/runtime/ns-runtime-test-double.js.map +1 -0
  505. package/hmr/shared/runtime/overlay-flag.d.ts +9 -0
  506. package/hmr/shared/runtime/overlay-flag.js +34 -0
  507. package/hmr/shared/runtime/overlay-flag.js.map +1 -0
  508. package/hmr/shared/runtime/platform-polyfills.d.ts +26 -0
  509. package/hmr/shared/runtime/platform-polyfills.js +122 -0
  510. package/hmr/shared/runtime/platform-polyfills.js.map +1 -0
  511. package/hmr/shared/runtime/root-placeholder-view.d.ts +19 -0
  512. package/hmr/shared/runtime/root-placeholder-view.js +311 -0
  513. package/hmr/shared/runtime/root-placeholder-view.js.map +1 -0
  514. package/hmr/shared/runtime/root-placeholder.d.ts +1 -0
  515. package/hmr/shared/runtime/root-placeholder.js +778 -83
  516. package/hmr/shared/runtime/root-placeholder.js.map +1 -1
  517. package/hmr/shared/runtime/session-bootstrap.d.ts +1 -0
  518. package/hmr/shared/runtime/session-bootstrap.js +350 -0
  519. package/hmr/shared/runtime/session-bootstrap.js.map +1 -0
  520. package/hmr/shared/runtime/vendor-bootstrap.js +54 -16
  521. package/hmr/shared/runtime/vendor-bootstrap.js.map +1 -1
  522. package/hmr/shared/runtime/vendor-resolve.d.ts +22 -0
  523. package/hmr/shared/runtime/vendor-resolve.js +45 -0
  524. package/hmr/shared/runtime/vendor-resolve.js.map +1 -0
  525. package/hmr/shared/runtime/worker-tracking.d.ts +28 -0
  526. package/hmr/shared/runtime/worker-tracking.js +114 -0
  527. package/hmr/shared/runtime/worker-tracking.js.map +1 -0
  528. package/hmr/shared/vendor/manifest-collect.d.ts +4 -0
  529. package/hmr/shared/vendor/manifest-collect.js +909 -0
  530. package/hmr/shared/vendor/manifest-collect.js.map +1 -0
  531. package/hmr/shared/vendor/manifest-loader.d.ts +2 -1
  532. package/hmr/shared/vendor/manifest-loader.js +5 -3
  533. package/hmr/shared/vendor/manifest-loader.js.map +1 -1
  534. package/hmr/shared/vendor/manifest.d.ts +12 -0
  535. package/hmr/shared/vendor/manifest.js +341 -545
  536. package/hmr/shared/vendor/manifest.js.map +1 -1
  537. package/hmr/shared/vendor/registry.d.ts +2 -0
  538. package/hmr/shared/vendor/registry.js +118 -7
  539. package/hmr/shared/vendor/registry.js.map +1 -1
  540. package/hmr/shared/vendor/vendor-device-shim.d.ts +1 -0
  541. package/hmr/shared/vendor/vendor-device-shim.js +208 -0
  542. package/hmr/shared/vendor/vendor-device-shim.js.map +1 -0
  543. package/hmr/shared/vendor/vendor-esbuild-plugins.d.ts +107 -0
  544. package/hmr/shared/vendor/vendor-esbuild-plugins.js +540 -0
  545. package/hmr/shared/vendor/vendor-esbuild-plugins.js.map +1 -0
  546. package/index.d.ts +1 -0
  547. package/index.js +5 -0
  548. package/index.js.map +1 -1
  549. package/package.json +83 -14
  550. package/runtime/core-aliases-early.js +103 -81
  551. package/runtime/core-aliases-early.js.map +1 -1
  552. package/shims/react-jsx-runtime.d.ts +4 -0
  553. package/shims/react-jsx-runtime.js +61 -0
  554. package/shims/react-jsx-runtime.js.map +1 -0
  555. package/shims/solid-jsx-runtime.d.ts +7 -0
  556. package/shims/solid-jsx-runtime.js +17 -0
  557. package/shims/solid-jsx-runtime.js.map +1 -0
  558. package/helpers/angular/angular-linker.d.ts +0 -13
  559. package/helpers/angular/angular-linker.js +0 -189
  560. package/helpers/angular/angular-linker.js.map +0 -1
  561. package/helpers/angular/shared-linker.d.ts +0 -4
  562. package/helpers/angular/shared-linker.js +0 -39
  563. package/helpers/angular/shared-linker.js.map +0 -1
  564. package/helpers/angular/util.js +0 -67
  565. package/helpers/angular/util.js.map +0 -1
  566. package/helpers/module-runner-patch.d.ts +0 -3
  567. package/helpers/module-runner-patch.js +0 -63
  568. package/helpers/module-runner-patch.js.map +0 -1
  569. package/helpers/prelink-angular.d.ts +0 -2
  570. package/helpers/prelink-angular.js +0 -117
  571. package/helpers/prelink-angular.js.map +0 -1
  572. package/hmr/shared/runtime/http-only-boot.d.ts +0 -1
  573. package/hmr/shared/runtime/http-only-boot.js +0 -124
  574. package/hmr/shared/runtime/http-only-boot.js.map +0 -1
  575. package/hmr/vendor-bootstrap.d.ts +0 -3
  576. package/hmr/vendor-bootstrap.js +0 -32
  577. package/hmr/vendor-bootstrap.js.map +0 -1
  578. package/shims/react-reconciler-constants.d.ts +0 -14
  579. package/shims/react-reconciler-constants.js +0 -21
  580. package/shims/react-reconciler-constants.js.map +0 -1
  581. package/shims/react-reconciler.d.ts +0 -8
  582. package/shims/react-reconciler.js +0 -15
  583. package/shims/react-reconciler.js.map +0 -1
  584. package/transformers/NativeClass/index.d.ts +0 -2
  585. package/transformers/NativeClass/index.js +0 -222
  586. package/transformers/NativeClass/index.js.map +0 -1
@@ -0,0 +1,485 @@
1
+ import { getProjectAppVirtualPath } from '../../../../helpers/utils.js';
2
+ import { isRuntimeGraphExcludedPath } from '../../../server/runtime-graph-filter.js';
3
+ import { canonicalizeTransformRequestCacheKey } from '../../../server/transform-cache-invalidation.js';
4
+ const APP_VIRTUAL_WITH_SLASH = `${getProjectAppVirtualPath()}/`;
5
+ export function collectGraphUpdateModulesForHotUpdate(options) {
6
+ const targets = new Map();
7
+ const addTarget = (mod) => {
8
+ const id = mod?.id?.replace(/\?.*$/, '');
9
+ if (!id)
10
+ return;
11
+ if (isRuntimeGraphExcludedPath(id))
12
+ return;
13
+ if (!targets.has(id)) {
14
+ targets.set(id, mod);
15
+ }
16
+ };
17
+ if (options.flavor === 'angular' && /\.(html|htm)$/i.test(options.file)) {
18
+ const importerIdsSeen = [];
19
+ const importerIdsAccepted = [];
20
+ for (const mod of options.modules || []) {
21
+ for (const importer of mod?.importers || []) {
22
+ const importerId = importer?.id || '';
23
+ importerIdsSeen.push(importerId);
24
+ if (/\.[cm]?[jt]sx?(?:$|\?)/i.test(importerId)) {
25
+ addTarget(importer);
26
+ importerIdsAccepted.push(importerId);
27
+ }
28
+ }
29
+ }
30
+ const fellBackToFile = !targets.size;
31
+ if (fellBackToFile) {
32
+ addTarget(options.getModuleById(options.file.replace(/\.(html|htm)$/i, '.ts')));
33
+ addTarget(options.getModuleById(options.file.replace(/\.(html|htm)$/i, '.js')));
34
+ }
35
+ if (options.verbose) {
36
+ console.info(`[ns-hmr][server] collectGraphUpdateModulesForHotUpdate(html) file=${options.file} importersSeen=${importerIdsSeen.length} importersAccepted=${importerIdsAccepted.length} fellBackToFile=${fellBackToFile} targets=${targets.size}`);
37
+ if (importerIdsSeen.length) {
38
+ console.info(`[ns-hmr][server] importersSeen sample=`, importerIdsSeen.slice(0, 8));
39
+ }
40
+ if (importerIdsAccepted.length) {
41
+ console.info(`[ns-hmr][server] importersAccepted sample=`, importerIdsAccepted.slice(0, 8));
42
+ }
43
+ }
44
+ return Array.from(targets.values());
45
+ }
46
+ if (!options.file.endsWith('.vue')) {
47
+ addTarget(options.getModuleById(options.file) || options.getModuleById(options.file + '?vue'));
48
+ }
49
+ return Array.from(targets.values());
50
+ }
51
+ export function collectAngularHotUpdateRoots(options) {
52
+ const roots = [];
53
+ const seenIds = new Set();
54
+ const seenObjects = new Set();
55
+ const addRoot = (mod) => {
56
+ if (!mod) {
57
+ return;
58
+ }
59
+ if (mod.id) {
60
+ if (isRuntimeGraphExcludedPath(mod.id)) {
61
+ return;
62
+ }
63
+ if (seenIds.has(mod.id)) {
64
+ return;
65
+ }
66
+ seenIds.add(mod.id);
67
+ roots.push(mod);
68
+ return;
69
+ }
70
+ if (seenObjects.has(mod)) {
71
+ return;
72
+ }
73
+ seenObjects.add(mod);
74
+ roots.push(mod);
75
+ };
76
+ if (/\.(html|htm)$/i.test(options.file)) {
77
+ for (const mod of collectGraphUpdateModulesForHotUpdate({
78
+ file: options.file,
79
+ flavor: 'angular',
80
+ modules: options.modules,
81
+ getModuleById: options.getModuleById,
82
+ })) {
83
+ addRoot(mod);
84
+ }
85
+ return roots;
86
+ }
87
+ if (!/\.(m|c)?ts$/i.test(options.file)) {
88
+ return roots;
89
+ }
90
+ for (const mod of options.modules || []) {
91
+ addRoot(mod);
92
+ }
93
+ for (const mod of options.getModulesByFile?.(options.file) || []) {
94
+ addRoot(mod);
95
+ }
96
+ if (!roots.length) {
97
+ addRoot(options.getModuleById(options.file));
98
+ }
99
+ return roots;
100
+ }
101
+ // Angular narrowing: a TS/JS file needs to invalidate its transitive
102
+ // importers only when it carries Angular semantics (a top-level @Component,
103
+ // @Directive, @Pipe, @Injectable, or @NgModule decorator). Files that only
104
+ // export constants, types, enums, plain functions, or plain classes are
105
+ // "leaf" modules — ES modules' live bindings deliver the new exports to
106
+ // importers automatically once V8 re-evaluates the changed module. Forcing
107
+ // every importer to re-transform on a constants edit is what produces the
108
+ // large invalidation waves that dominate the `refresh` phase on
109
+ // constants-style edits in big apps.
110
+ //
111
+ // Regex anchors at line start with only whitespace before `@Decorator(` so
112
+ // we don't false-match on string literals, JSDoc references, or commented-
113
+ // out blocks. Tests pin the matching/non-matching shapes that have come up
114
+ // in real Angular sources.
115
+ const ANGULAR_SEMANTIC_DECORATOR_REGEX = /^[ \t]*@(?:Component|Directive|Pipe|Injectable|NgModule)\b\s*\(/m;
116
+ export function angularSourceHasSemanticDecorator(source) {
117
+ if (!source || source.length === 0)
118
+ return false;
119
+ return ANGULAR_SEMANTIC_DECORATOR_REGEX.test(source);
120
+ }
121
+ export function shouldInvalidateAngularTransitiveImporters(options) {
122
+ if (options.flavor !== 'angular') {
123
+ return false;
124
+ }
125
+ // Template-only (.html/.htm) edits change the component's view but never
126
+ // its exported symbol shape, so importers of the component do not need to
127
+ // re-transform. Skipping the transitive walk here is the single biggest
128
+ // latency win for template HMR.
129
+ if (!/\.(?:(m|c)?[jt]sx?)$/i.test(options.file)) {
130
+ return false;
131
+ }
132
+ // When source is available, narrow to "files whose changes can affect
133
+ // the Angular semantics of their importers". Files without a top-level
134
+ // @Component/@Directive/@Pipe/@Injectable/@NgModule decorator are leaf
135
+ // modules — invalidating the file itself is sufficient. When source is
136
+ // undefined/null (e.g. ctx.read() failed or the caller didn't plumb it
137
+ // through), fall back to the conservative behavior: invalidate
138
+ // transitively.
139
+ if (typeof options.source === 'string') {
140
+ return angularSourceHasSemanticDecorator(options.source);
141
+ }
142
+ return true;
143
+ }
144
+ function isExtensionlessAngularAppTransformCandidate(id) {
145
+ return id.startsWith(APP_VIRTUAL_WITH_SLASH) && /\.(?:[mc]?[jt]sx?)$/i.test(id);
146
+ }
147
+ function addAngularTransformCacheInvalidationUrl(targets, rawId, projectRoot, workspaceRoot) {
148
+ const id = String(rawId || '');
149
+ if (!id) {
150
+ return;
151
+ }
152
+ const cacheKey = projectRoot ? canonicalizeTransformRequestCacheKey(id, projectRoot) : id;
153
+ targets.add(cacheKey);
154
+ // Workspace-lib modules are served (and therefore cached) under keys
155
+ // project-root canonicalization can't produce: their workspace-relative
156
+ // form (`/libs/...` — see `rewriteFsAbsoluteToNsM`) and/or their Vite
157
+ // `/@fs/<abs>` form (how the /ns/m route addresses out-of-root files at
158
+ // transform time). Add both candidates; unknown purge keys are no-ops.
159
+ if (workspaceRoot) {
160
+ const workspaceKey = canonicalizeTransformRequestCacheKey(id, workspaceRoot);
161
+ if (workspaceKey !== cacheKey) {
162
+ targets.add(workspaceKey);
163
+ // The id is under the workspace root but outside the project root
164
+ // (project canonicalization left it alone) — that's exactly the
165
+ // class of file the /ns/m route transforms via its `/@fs/<abs>`
166
+ // form, so purge that spelling as well.
167
+ const idPath = id.split('?')[0].replace(/\\/g, '/');
168
+ if (idPath.startsWith('/') && !idPath.startsWith('/@fs/') && idPath === cacheKey.split('?')[0]) {
169
+ targets.add(`/@fs${idPath}`);
170
+ }
171
+ }
172
+ }
173
+ const normalizedId = cacheKey.replace(/\?.*$/, '');
174
+ if (!isExtensionlessAngularAppTransformCandidate(normalizedId)) {
175
+ return;
176
+ }
177
+ targets.add(normalizedId.replace(/\.(?:[mc]?[jt]sx?)$/i, ''));
178
+ }
179
+ export function collectAngularTransformCacheInvalidationUrls(options) {
180
+ const urls = new Set();
181
+ if (options.isTs) {
182
+ addAngularTransformCacheInvalidationUrl(urls, options.file, options.projectRoot, options.workspaceRoot);
183
+ }
184
+ for (const mod of options.hotUpdateRoots || []) {
185
+ addAngularTransformCacheInvalidationUrl(urls, mod?.id, options.projectRoot, options.workspaceRoot);
186
+ }
187
+ for (const mod of options.transitiveImporters || []) {
188
+ addAngularTransformCacheInvalidationUrl(urls, mod?.id, options.projectRoot, options.workspaceRoot);
189
+ }
190
+ return Array.from(urls);
191
+ }
192
+ // Stable URL + Explicit Invalidation.
193
+ //
194
+ // Compute the set of fully-qualified `/ns/m/<rel>` URLs that the runtime
195
+ // should drop from `g_moduleRegistry` before re-importing main.ts. The
196
+ // set must satisfy these invariants:
197
+ //
198
+ // * The changed file itself (so V8 fetches the new source).
199
+ // * Every transitive importer up to the entry (so the new exports are
200
+ // re-bound; ESM live bindings only "see" new exports if the importer
201
+ // re-evaluates).
202
+ // * No `/node_modules/` paths (vendor packages are stable in dev; evicting
203
+ // them would force unnecessary re-fetch + re-transform).
204
+ // * No virtual / runtime-graph-excluded ids (e.g. `\0` rollup virtuals).
205
+ // * No duplicates — the set is deduped on canonical relative path.
206
+ //
207
+ // The output URLs are origin-absolute (e.g.
208
+ // `http://localhost:5173/ns/m/src/main.ts`) so the runtime can feed the
209
+ // list directly into ns:module `invalidateModules` without any further
210
+ // resolution work. The runtime canonicalizer collapses any residual
211
+ // `__ns_hmr__/<tag>/` or `__ns_boot__/b1/` segments, so the effective
212
+ // registry key is `/ns/m/<rel>` regardless of any tag a stale V8 cache
213
+ // entry might still carry.
214
+ //
215
+ // Extensionless canonical key.
216
+ //
217
+ // Vite emits ES module import statements with extensions stripped (this
218
+ // is how `resolve.extensions` works for Angular/TS apps), so V8 in the
219
+ // NativeScript iOS runtime keys `g_moduleRegistry` by the extensionless
220
+ // URL it sees in the import statement. Concretely, an import like
221
+ // import { AppComponent } from './app.component';
222
+ // inside `main.ts` is rewritten by Vite to
223
+ // import { AppComponent } from '/ns/m/src/app/app.component';
224
+ // and V8 stores the resulting module under the key
225
+ // http://localhost:5173/ns/m/src/app/app.component
226
+ // (no `.ts` extension). The `moduleGraph` ids on the server, however,
227
+ // are absolute file paths that DO carry the extension, so a naive
228
+ // eviction set built from `mod.id` keys against `.../app.component.ts`
229
+ // — which never matches the registry entry. The runtime reports
230
+ // `[resolver][remove:miss]`, the cached module survives, ESM live
231
+ // bindings continue to point at the OLD constants module, and the user
232
+ // sees no visual update despite a clean HMR cycle.
233
+ //
234
+ // Workaround: for any path ending in `.ts/.tsx/.js/.jsx/.mjs/.mts/
235
+ // .cjs/.cts`, emit BOTH the extensioned URL AND the extension-stripped
236
+ // canonical URL. The runtime evicts whichever shape V8 actually has;
237
+ // the other is a harmless `remove:miss`. Cost: at most 2x URLs in
238
+ // `evictPaths` (still tiny relative to the JSON payload).
239
+ //
240
+ // Returning a `Set` of URLs (rather than an array) lets the caller
241
+ // collapse multiple sources (changed file + roots + transitive
242
+ // importers) without paying for an extra dedup pass.
243
+ function stripEvictRootPrefix(id, root) {
244
+ if (!root)
245
+ return null;
246
+ const normalizedRoot = String(root).replace(/\\/g, '/').replace(/\/$/, '');
247
+ if (!normalizedRoot)
248
+ return null;
249
+ if (id.startsWith(`${normalizedRoot}/`)) {
250
+ return id.slice(normalizedRoot.length);
251
+ }
252
+ return null;
253
+ }
254
+ function normalizeAngularEvictRelativeId(rawId, projectRoot, workspaceRoot) {
255
+ if (!rawId)
256
+ return null;
257
+ let id = String(rawId).split('?')[0].replace(/\\/g, '/');
258
+ if (!id)
259
+ return null;
260
+ if (id.startsWith('file://')) {
261
+ id = id.slice('file://'.length);
262
+ }
263
+ // Vite spells any resolved id outside the configured `root` as
264
+ // `/@fs/<abs-path>` — hoisted node_modules AND monorepo workspace libs.
265
+ // Recover the absolute path so the root-stripping below can anchor it;
266
+ // rejecting these outright (the old behavior) silently dropped every
267
+ // workspace-lib importer from the eviction set.
268
+ if (id.startsWith('/@fs/')) {
269
+ id = id.slice('/@fs'.length);
270
+ }
271
+ // Project root first — matches the `/ns/m/<projectRel>` URL shape the
272
+ // device uses for app-local modules. Then the monorepo workspace root:
273
+ // `rewriteFsAbsoluteToNsM` mints workspace-lib device URLs as
274
+ // `/ns/m/<workspaceRel>` (e.g. `/ns/m/libs/...`), so the eviction key for
275
+ // an out-of-root lib module MUST be derived the same way. Deriving it
276
+ // project-relative instead (the old behavior left the absolute path
277
+ // intact) produces `/ns/m/Users/...` URLs the runtime reports as
278
+ // `remove:miss` — the cached module survives and the reboot silently
279
+ // re-imports stale lib code.
280
+ id = stripEvictRootPrefix(id, projectRoot) ?? stripEvictRootPrefix(id, workspaceRoot) ?? id;
281
+ if (!id.startsWith('/')) {
282
+ id = '/' + id;
283
+ }
284
+ if (id.includes('/node_modules/')) {
285
+ return null;
286
+ }
287
+ if (isRuntimeGraphExcludedPath(id)) {
288
+ return null;
289
+ }
290
+ // Reject virtual ids — they aren't fetchable over /ns/m/.
291
+ if (id.includes('\0') || id.includes('/@id/') || id.includes('/@fs/')) {
292
+ return null;
293
+ }
294
+ return id;
295
+ }
296
+ export function collectAngularEvictionUrls(options) {
297
+ const urls = new Set();
298
+ const origin = String(options.origin || '').replace(/\/$/, '');
299
+ const root = options.projectRoot;
300
+ const workspaceRoot = options.workspaceRoot ?? null;
301
+ const addRel = (rel) => {
302
+ if (!rel)
303
+ return;
304
+ // Final defense: never emit non-/ns/m URLs for eviction; the runtime
305
+ // would map them to a different cache namespace.
306
+ urls.add(`${origin}/ns/m${rel}`);
307
+ // V8 in the iOS runtime keys `g_moduleRegistry` by the URL Vite
308
+ // emitted in the *generated* import statement, which strips JS/TS
309
+ // extensions (see the extensionless-key block above). So the
310
+ // canonical registry key for an app TS/JS module is the
311
+ // extensionless form. Emit it alongside the `.ts` form so the
312
+ // explicit eviction matches whatever shape the runtime actually
313
+ // stored. This cannot false-positive: at most one of the two URLs
314
+ // maps to a real entry, and ns:module `invalidateModules` treats unknown
315
+ // keys as no-ops.
316
+ const extMatch = rel.match(/\.(?:[mc]?[jt]sx?)$/i);
317
+ if (extMatch) {
318
+ urls.add(`${origin}/ns/m${rel.slice(0, -extMatch[0].length)}`);
319
+ }
320
+ };
321
+ addRel(normalizeAngularEvictRelativeId(options.file, root, workspaceRoot));
322
+ for (const mod of options.hotUpdateRoots || []) {
323
+ addRel(normalizeAngularEvictRelativeId(mod?.id || mod?.file, root, workspaceRoot));
324
+ }
325
+ for (const mod of options.transitiveImporters || []) {
326
+ addRel(normalizeAngularEvictRelativeId(mod?.id || mod?.file, root, workspaceRoot));
327
+ }
328
+ // The bootstrap entry must always be evicted: V8's `import(entry)` is a
329
+ // no-op if the cache entry is still live, and the entire HMR cycle
330
+ // hinges on re-evaluating main.ts. The transitive walk usually catches
331
+ // this naturally (every component reaches main via importer chains),
332
+ // but include it explicitly as an invariant — covers edge cases like a
333
+ // hand-rolled `@nativescript/hmr-strategy` overriding the candidates,
334
+ // or a pristine app whose graph hasn't yet linked main into the
335
+ // importer set.
336
+ if (typeof options.bootstrapEntry === 'string' && options.bootstrapEntry) {
337
+ addRel(normalizeAngularEvictRelativeId(options.bootstrapEntry, root, workspaceRoot));
338
+ }
339
+ return Array.from(urls);
340
+ }
341
+ // ============================================================================
342
+ // `/@ng/component` live-broadcast ledger
343
+ // ============================================================================
344
+ //
345
+ // Every compiled component body (Analog `liveReload` mode) runs
346
+ // `<Class>_HmrLoad(Date.now())` at module-evaluation time — meaning EVERY
347
+ // cold boot fetches `/@ng/component?c=<id>&t=<now>` for every component.
348
+ // Analog's middleware serves the real `_UpdateMetadata` payload whenever the
349
+ // component's module carries a `lastInvalidationTimestamp` in Vite's module
350
+ // graph — state that persists until the dev server restarts. After any TS
351
+ // edit whose invalidation wave touches component modules, the NEXT app
352
+ // relaunch therefore boot-fetches real metadata-replacement payloads, and
353
+ // `ɵɵreplaceMetadata` runs after the root view commits. For the bootstrap
354
+ // component that recreates the root LView and tears down the
355
+ // `<page-router-outlet>` frame — the "relaunch to white screen" failure. The
356
+ // websocket bridge's root-component guard only covers the *event* path;
357
+ // boot-time fetches bypass it entirely.
358
+ //
359
+ // A fresh boot always evaluates the latest transformed source, so a boot-time
360
+ // replacement is never needed on NativeScript. The only legitimate consumer
361
+ // of a real payload is a live `angular:component-update` event — and the
362
+ // device echoes the server's exact broadcast timestamp back as `t`. This
363
+ // ledger records every broadcast the bridge forwards to `/ns-hmr` clients;
364
+ // the `/ns/m` middleware only delegates `(c, t)` pairs that match a recorded
365
+ // broadcast to Analog and answers everything else with the empty no-update
366
+ // stub (see `registerNsModuleServerRoute`'s
367
+ // `isLiveAngularComponentUpdateFetch`).
368
+ /**
369
+ * Decode an Analog component id (`src%2Fapp%2F…%40Class`) to its canonical
370
+ * form (`src/app/….ts@Class`) — the shape `URLSearchParams` yields for the
371
+ * `c` query param on the device's metadata fetch.
372
+ */
373
+ export function normalizeAngularComponentUpdateId(raw) {
374
+ if (typeof raw !== 'string' || !raw)
375
+ return null;
376
+ try {
377
+ return decodeURIComponent(raw);
378
+ }
379
+ catch {
380
+ return raw;
381
+ }
382
+ }
383
+ const MAX_RECORDED_TIMESTAMPS_PER_COMPONENT = 16;
384
+ export function createAngularComponentUpdateLedger() {
385
+ const broadcasts = new Map();
386
+ return {
387
+ record(data) {
388
+ const id = normalizeAngularComponentUpdateId(data?.id);
389
+ const timestamp = data?.timestamp;
390
+ if (!id || typeof timestamp !== 'number' || !Number.isFinite(timestamp))
391
+ return;
392
+ const list = broadcasts.get(id) ?? [];
393
+ list.push(timestamp);
394
+ if (list.length > MAX_RECORDED_TIMESTAMPS_PER_COMPONENT)
395
+ list.shift();
396
+ broadcasts.set(id, list);
397
+ },
398
+ isLive(componentId, timestamp) {
399
+ return (broadcasts.get(componentId) ?? []).includes(timestamp);
400
+ },
401
+ };
402
+ }
403
+ export function shouldSuppressDefaultViteHotUpdate(options) {
404
+ if (options.flavor !== 'angular') {
405
+ return false;
406
+ }
407
+ return /\.(html|htm|ts)$/i.test(options.file);
408
+ }
409
+ export function normalizeHotReloadMatchPath(raw, root) {
410
+ let normalized = String(raw || '')
411
+ .split('?')[0]
412
+ .replace(/\\/g, '/')
413
+ .replace(/^file:\/\//, '');
414
+ if (root) {
415
+ const rootNormalized = root.replace(/\\/g, '/');
416
+ if (normalized.startsWith(rootNormalized)) {
417
+ normalized = normalized.slice(rootNormalized.length);
418
+ }
419
+ }
420
+ if (!normalized.startsWith('/')) {
421
+ normalized = `/${normalized}`;
422
+ }
423
+ return normalized;
424
+ }
425
+ /**
426
+ * True when any candidate path matches a live (unexpired) suppression entry,
427
+ * comparing every candidate against both the entry's absolute and
428
+ * root-relative forms — payload paths arrive in either shape depending on the
429
+ * emitter. Shared by both suppression predicates below.
430
+ */
431
+ function matchesPendingSuppression(candidates, pendingEntries, now) {
432
+ for (const entry of pendingEntries) {
433
+ if (!entry || entry.expiresAt <= now)
434
+ continue;
435
+ for (const candidate of candidates) {
436
+ if (candidate && (candidate === entry.absPath || candidate === entry.relPath)) {
437
+ return true;
438
+ }
439
+ }
440
+ }
441
+ return false;
442
+ }
443
+ /**
444
+ * True when Analog's in-place component metadata event targets the same TS
445
+ * file already owned by a pending `ns:angular-update` reboot. A single save
446
+ * must never both rebuild the Angular root and then run `ɵɵreplaceMetadata`
447
+ * against that freshly rebuilt routed component tree.
448
+ */
449
+ export function shouldSuppressAngularComponentUpdatePayload(options) {
450
+ const { payload, pendingEntries, root } = options;
451
+ const now = options.now ?? Date.now();
452
+ if (!payload || payload.type !== 'custom' || payload.event !== 'angular:component-update') {
453
+ return false;
454
+ }
455
+ const rawId = payload?.data?.id;
456
+ if (typeof rawId !== 'string' || !rawId) {
457
+ return false;
458
+ }
459
+ let componentFile = rawId;
460
+ try {
461
+ componentFile = decodeURIComponent(rawId);
462
+ }
463
+ catch { }
464
+ // Class names never contain `@`, but a scoped directory may. Analog uses the
465
+ // final `@` as the path/class delimiter.
466
+ const classDelimiter = componentFile.lastIndexOf('@');
467
+ componentFile = classDelimiter >= 0 ? componentFile.slice(0, classDelimiter) : componentFile;
468
+ if (!componentFile) {
469
+ return false;
470
+ }
471
+ const componentAbs = normalizeHotReloadMatchPath(componentFile);
472
+ const componentRel = normalizeHotReloadMatchPath(componentFile, root);
473
+ return matchesPendingSuppression([componentAbs, componentRel], pendingEntries, now);
474
+ }
475
+ export function shouldSuppressViteFullReloadPayload(options) {
476
+ const { payload, pendingEntries, root } = options;
477
+ const now = options.now ?? Date.now();
478
+ if (!payload || payload.type !== 'full-reload') {
479
+ return false;
480
+ }
481
+ const payloadPath = typeof payload.path === 'string' && payload.path !== '*' ? normalizeHotReloadMatchPath(payload.path, root) : null;
482
+ const payloadTriggeredBy = typeof payload.triggeredBy === 'string' ? normalizeHotReloadMatchPath(payload.triggeredBy, root) : null;
483
+ return matchesPendingSuppression([payloadTriggeredBy, payloadPath], pendingEntries, now);
484
+ }
485
+ //# sourceMappingURL=websocket-angular-hot-update.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"websocket-angular-hot-update.js","sourceRoot":"","sources":["../../../../../../../packages/vite/hmr/frameworks/angular/server/websocket-angular-hot-update.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,wBAAwB,EAAE,MAAM,8BAA8B,CAAC;AACxE,OAAO,EAAE,0BAA0B,EAAE,MAAM,yCAAyC,CAAC;AACrF,OAAO,EAAE,oCAAoC,EAAE,MAAM,iDAAiD,CAAC;AAEvG,MAAM,sBAAsB,GAAG,GAAG,wBAAwB,EAAE,GAAG,CAAC;AAQhE,MAAM,UAAU,qCAAqC,CAAC,OAA+K;IACpO,MAAM,OAAO,GAAG,IAAI,GAAG,EAAoC,CAAC;IAC5D,MAAM,SAAS,GAAG,CAAC,GAAqC,EAAE,EAAE;QAC3D,MAAM,EAAE,GAAG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AI,OAAO,CAAC,IAAI,KAAK,GAAG,CAAC,CAAC,CAAC,2BAA2B,CAAC,OAAO,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC;IACtI,MAAM,kBAAkB,GAAG,OAAO,OAAO,CAAC,WAAW,KAAK,QAAQ,CAAC,CAAC,CAAC,2BAA2B,CAAC,OAAO,CAAC,WAAW,EAAE,IAAI,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC;IACnI,OAAO,yBAAyB,CAAC,CAAC,kBAAkB,EAAE,WAAW,CAAC,EAAE,cAAc,EAAE,GAAG,CAAC,CAAC;AAC1F,CAAC"}
@@ -0,0 +1,12 @@
1
+ import type { FrameworkClientStrategy } from '../../../client/framework-client-strategy.js';
2
+ /**
3
+ * React reuses the generic TypeScript HMR path on BOTH server and client: it
4
+ * has no Fast Refresh, so a module edit drives a plain module reload (the
5
+ * React tree re-renders). This mirrors the server's
6
+ * `{ ...typescriptServerStrategy, flavor: 'react' }` — modal tracking, the
7
+ * TS-style root factory, and the code-behind re-registration all apply — but
8
+ * the batch refresh differs: React mounts a dominative document root via
9
+ * `startReactApp` rather than an `app-root` module, so the TypeScript
10
+ * `resetRootView({moduleName:'app-root'})` path doesn't apply.
11
+ */
12
+ export declare const reactClientStrategy: FrameworkClientStrategy;
@@ -0,0 +1,27 @@
1
+ import { typescriptClientStrategy } from '../../typescript/client/strategy.js';
2
+ /**
3
+ * React reuses the generic TypeScript HMR path on BOTH server and client: it
4
+ * has no Fast Refresh, so a module edit drives a plain module reload (the
5
+ * React tree re-renders). This mirrors the server's
6
+ * `{ ...typescriptServerStrategy, flavor: 'react' }` — modal tracking, the
7
+ * TS-style root factory, and the code-behind re-registration all apply — but
8
+ * the batch refresh differs: React mounts a dominative document root via
9
+ * `startReactApp` rather than an `app-root` module, so the TypeScript
10
+ * `resetRootView({moduleName:'app-root'})` path doesn't apply.
11
+ */
12
+ export const reactClientStrategy = {
13
+ ...typescriptClientStrategy,
14
+ flavor: 'react',
15
+ refreshAfterBatch(_drained, ctx) {
16
+ // The changed modules were already re-imported into the device cache by
17
+ // the shared queue; the per-page remount is driven by the app's
18
+ // `__NS_HMR_ON_UPDATE__` hook (see `@nativescript/tanstack-router/react`'s
19
+ // `subscribeReactHmrRemount`), which fires right after this queue drains.
20
+ // Here we only mark the overlay complete so it doesn't stick at
21
+ // 'received' (5%).
22
+ ctx.setUpdateOverlayStage('complete', {
23
+ detail: `Total ${Math.max(0, Date.now() - ctx.startedAt)}ms`,
24
+ });
25
+ },
26
+ };
27
+ //# sourceMappingURL=strategy.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"strategy.js","sourceRoot":"","sources":["../../../../../../../packages/vite/hmr/frameworks/react/client/strategy.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,wBAAwB,EAAE,MAAM,qCAAqC,CAAC;AAE/E;;;;;;;;;GASG;AACH,MAAM,CAAC,MAAM,mBAAmB,GAA4B;IAC3D,GAAG,wBAAwB;IAC3B,MAAM,EAAE,OAAO;IAEf,iBAAiB,CAAC,QAAkB,EAAE,GAAgC;QACrE,wEAAwE;QACxE,gEAAgE;QAChE,2EAA2E;QAC3E,0EAA0E;QAC1E,gEAAgE;QAChE,mBAAmB;QACnB,GAAG,CAAC,qBAAqB,CAAC,UAAU,EAAE;YACrC,MAAM,EAAE,SAAS,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,IAAI,CAAC,GAAG,EAAE,GAAG,GAAG,CAAC,SAAS,CAAC,IAAI;SAC5D,CAAC,CAAC;IACJ,CAAC;CACD,CAAC"}
@@ -0,0 +1,2 @@
1
+ import type { FrameworkServerStrategy } from '../../../server/framework-strategy.js';
2
+ export declare const reactServerStrategy: FrameworkServerStrategy;