@nativescript/vite 8.0.0-alpha.3 → 8.0.0-alpha.31

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 (356) hide show
  1. package/README.md +51 -11
  2. package/configuration/angular.d.ts +34 -1
  3. package/configuration/angular.js +373 -163
  4. package/configuration/angular.js.map +1 -1
  5. package/configuration/base.js +184 -14
  6. package/configuration/base.js.map +1 -1
  7. package/configuration/javascript.js +5 -72
  8. package/configuration/javascript.js.map +1 -1
  9. package/configuration/solid.js +27 -1
  10. package/configuration/solid.js.map +1 -1
  11. package/configuration/typescript.js +5 -75
  12. package/configuration/typescript.js.map +1 -1
  13. package/helpers/app-components.d.ts +2 -1
  14. package/helpers/app-components.js.map +1 -1
  15. package/helpers/app-css-state.d.ts +8 -0
  16. package/helpers/app-css-state.js +8 -0
  17. package/helpers/app-css-state.js.map +1 -0
  18. package/helpers/bundler-context.d.ts +11 -0
  19. package/helpers/bundler-context.js +71 -0
  20. package/helpers/bundler-context.js.map +1 -0
  21. package/helpers/config-as-json.js +10 -0
  22. package/helpers/config-as-json.js.map +1 -1
  23. package/helpers/dev-host.d.ts +341 -0
  24. package/helpers/dev-host.js +617 -0
  25. package/helpers/dev-host.js.map +1 -0
  26. package/helpers/esbuild-platform-resolver.js +4 -1
  27. package/helpers/esbuild-platform-resolver.js.map +1 -1
  28. package/helpers/global-defines.d.ts +51 -0
  29. package/helpers/global-defines.js +77 -0
  30. package/helpers/global-defines.js.map +1 -1
  31. package/helpers/hmr-scope.d.ts +26 -0
  32. package/helpers/hmr-scope.js +67 -0
  33. package/helpers/hmr-scope.js.map +1 -0
  34. package/helpers/init.js +0 -18
  35. package/helpers/init.js.map +1 -1
  36. package/helpers/logging.d.ts +1 -0
  37. package/helpers/logging.js +63 -3
  38. package/helpers/logging.js.map +1 -1
  39. package/helpers/main-entry.d.ts +2 -1
  40. package/helpers/main-entry.js +430 -47
  41. package/helpers/main-entry.js.map +1 -1
  42. package/helpers/nativeclass-esbuild-plugin.d.ts +2 -1
  43. package/helpers/nativeclass-esbuild-plugin.js.map +1 -1
  44. package/helpers/nativeclass-transform.js.map +1 -1
  45. package/helpers/nativeclass-transformer-plugin.d.ts +9 -2
  46. package/helpers/nativeclass-transformer-plugin.js +157 -14
  47. package/helpers/nativeclass-transformer-plugin.js.map +1 -1
  48. package/helpers/nativescript-package-resolver.js +8 -3
  49. package/helpers/nativescript-package-resolver.js.map +1 -1
  50. package/helpers/normalize-id.d.ts +42 -0
  51. package/helpers/normalize-id.js +60 -0
  52. package/helpers/normalize-id.js.map +1 -0
  53. package/helpers/ns-core-url.d.ts +88 -0
  54. package/helpers/ns-core-url.js +191 -0
  55. package/helpers/ns-core-url.js.map +1 -0
  56. package/helpers/package-platform-aliases.js +4 -3
  57. package/helpers/package-platform-aliases.js.map +1 -1
  58. package/helpers/platform-types.d.ts +2 -0
  59. package/helpers/platform-types.js +2 -0
  60. package/helpers/platform-types.js.map +1 -0
  61. package/helpers/project.d.ts +35 -0
  62. package/helpers/project.js +120 -2
  63. package/helpers/project.js.map +1 -1
  64. package/helpers/resolver.js +17 -2
  65. package/helpers/resolver.js.map +1 -1
  66. package/helpers/ts-config-paths.d.ts +14 -0
  67. package/helpers/ts-config-paths.js +89 -8
  68. package/helpers/ts-config-paths.js.map +1 -1
  69. package/helpers/typescript-check.d.ts +2 -1
  70. package/helpers/typescript-check.js.map +1 -1
  71. package/helpers/workers.d.ts +20 -19
  72. package/helpers/workers.js +624 -4
  73. package/helpers/workers.js.map +1 -1
  74. package/hmr/client/css-handler.d.ts +1 -0
  75. package/hmr/client/css-handler.js +33 -20
  76. package/hmr/client/css-handler.js.map +1 -1
  77. package/hmr/client/css-update-overlay.d.ts +18 -0
  78. package/hmr/client/css-update-overlay.js +27 -0
  79. package/hmr/client/css-update-overlay.js.map +1 -0
  80. package/hmr/client/framework-client-strategy.d.ts +73 -0
  81. package/hmr/client/framework-client-strategy.js +19 -0
  82. package/hmr/client/framework-client-strategy.js.map +1 -0
  83. package/hmr/client/hmr-pending-overlay.d.ts +27 -0
  84. package/hmr/client/hmr-pending-overlay.js +50 -0
  85. package/hmr/client/hmr-pending-overlay.js.map +1 -0
  86. package/hmr/client/index.js +459 -164
  87. package/hmr/client/index.js.map +1 -1
  88. package/hmr/client/utils.d.ts +6 -1
  89. package/hmr/client/utils.js +184 -8
  90. package/hmr/client/utils.js.map +1 -1
  91. package/hmr/entry-runtime.d.ts +2 -1
  92. package/hmr/entry-runtime.js +252 -65
  93. package/hmr/entry-runtime.js.map +1 -1
  94. package/hmr/frameworks/angular/build/angular-linker.d.ts +12 -0
  95. package/hmr/frameworks/angular/build/angular-linker.js +109 -0
  96. package/hmr/frameworks/angular/build/angular-linker.js.map +1 -0
  97. package/hmr/frameworks/angular/build/inject-component-hmr-registration.d.ts +112 -0
  98. package/hmr/frameworks/angular/build/inject-component-hmr-registration.js +291 -0
  99. package/hmr/frameworks/angular/build/inject-component-hmr-registration.js.map +1 -0
  100. package/hmr/frameworks/angular/build/inject-hmr-vite-ignore.d.ts +75 -0
  101. package/hmr/frameworks/angular/build/inject-hmr-vite-ignore.js +221 -0
  102. package/hmr/frameworks/angular/build/inject-hmr-vite-ignore.js.map +1 -0
  103. package/{helpers/angular → hmr/frameworks/angular/build}/inline-decorator-component-templates.js +1 -170
  104. package/hmr/frameworks/angular/build/inline-decorator-component-templates.js.map +1 -0
  105. package/hmr/frameworks/angular/build/js-lexer.d.ts +4 -0
  106. package/{helpers/angular/synthesize-decorator-ctor-parameters.js → hmr/frameworks/angular/build/js-lexer.js} +22 -96
  107. package/hmr/frameworks/angular/build/js-lexer.js.map +1 -0
  108. package/hmr/frameworks/angular/build/shared-linker.d.ts +39 -0
  109. package/hmr/frameworks/angular/build/shared-linker.js +128 -0
  110. package/hmr/frameworks/angular/build/shared-linker.js.map +1 -0
  111. package/hmr/frameworks/angular/build/synthesize-decorator-ctor-parameters.js +88 -0
  112. package/hmr/frameworks/angular/build/synthesize-decorator-ctor-parameters.js.map +1 -0
  113. package/{helpers/angular → hmr/frameworks/angular/build}/synthesize-injectable-factories.js +1 -174
  114. package/hmr/frameworks/angular/build/synthesize-injectable-factories.js.map +1 -0
  115. package/{helpers/angular → hmr/frameworks/angular/build}/util.d.ts +1 -0
  116. package/hmr/frameworks/angular/build/util.js +155 -0
  117. package/hmr/frameworks/angular/build/util.js.map +1 -0
  118. package/hmr/frameworks/angular/client/index.d.ts +1 -0
  119. package/hmr/frameworks/angular/client/index.js +778 -20
  120. package/hmr/frameworks/angular/client/index.js.map +1 -1
  121. package/hmr/frameworks/angular/client/strategy.d.ts +9 -0
  122. package/hmr/frameworks/angular/client/strategy.js +19 -0
  123. package/hmr/frameworks/angular/client/strategy.js.map +1 -0
  124. package/hmr/frameworks/angular/server/angular-root-component.d.ts +79 -0
  125. package/hmr/frameworks/angular/server/angular-root-component.js +149 -0
  126. package/hmr/frameworks/angular/server/angular-root-component.js.map +1 -0
  127. package/hmr/frameworks/angular/server/linker.js +1 -4
  128. package/hmr/frameworks/angular/server/linker.js.map +1 -1
  129. package/hmr/frameworks/angular/server/strategy.js +448 -12
  130. package/hmr/frameworks/angular/server/strategy.js.map +1 -1
  131. package/hmr/{server → frameworks/angular/server}/websocket-angular-entry.js +2 -2
  132. package/hmr/frameworks/angular/server/websocket-angular-entry.js.map +1 -0
  133. package/hmr/{server → frameworks/angular/server}/websocket-angular-hot-update.d.ts +17 -11
  134. package/hmr/frameworks/angular/server/websocket-angular-hot-update.js +336 -0
  135. package/hmr/frameworks/angular/server/websocket-angular-hot-update.js.map +1 -0
  136. package/hmr/frameworks/solid/build/solid-jsx-deps.d.ts +15 -0
  137. package/hmr/frameworks/solid/build/solid-jsx-deps.js +178 -0
  138. package/hmr/frameworks/solid/build/solid-jsx-deps.js.map +1 -0
  139. package/hmr/frameworks/solid/server/strategy.js +360 -16
  140. package/hmr/frameworks/solid/server/strategy.js.map +1 -1
  141. package/hmr/frameworks/typescript/server/strategy.js +28 -14
  142. package/hmr/frameworks/typescript/server/strategy.js.map +1 -1
  143. package/hmr/frameworks/vue/client/index.js +30 -199
  144. package/hmr/frameworks/vue/client/index.js.map +1 -1
  145. package/hmr/frameworks/vue/client/strategy.d.ts +7 -0
  146. package/hmr/frameworks/vue/client/strategy.js +83 -0
  147. package/hmr/frameworks/vue/client/strategy.js.map +1 -0
  148. package/hmr/frameworks/vue/client/vue-sfc-update-overlay.d.ts +82 -0
  149. package/hmr/frameworks/vue/client/vue-sfc-update-overlay.js +133 -0
  150. package/hmr/frameworks/vue/client/vue-sfc-update-overlay.js.map +1 -0
  151. package/hmr/frameworks/vue/server/sfc-route-assemble.d.ts +7 -0
  152. package/hmr/frameworks/vue/server/sfc-route-assemble.js +706 -0
  153. package/hmr/frameworks/vue/server/sfc-route-assemble.js.map +1 -0
  154. package/hmr/frameworks/vue/server/sfc-route-meta.d.ts +7 -0
  155. package/hmr/frameworks/vue/server/sfc-route-meta.js +80 -0
  156. package/hmr/frameworks/vue/server/sfc-route-meta.js.map +1 -0
  157. package/hmr/frameworks/vue/server/sfc-route-serve.d.ts +8 -0
  158. package/hmr/frameworks/vue/server/sfc-route-serve.js +457 -0
  159. package/hmr/frameworks/vue/server/sfc-route-serve.js.map +1 -0
  160. package/hmr/frameworks/vue/server/sfc-route-shared.d.ts +19 -0
  161. package/hmr/frameworks/vue/server/sfc-route-shared.js +14 -0
  162. package/hmr/frameworks/vue/server/sfc-route-shared.js.map +1 -0
  163. package/hmr/frameworks/vue/server/strategy.js +244 -0
  164. package/hmr/frameworks/vue/server/strategy.js.map +1 -1
  165. package/hmr/frameworks/vue/server/websocket-sfc.d.ts +15 -0
  166. package/hmr/frameworks/vue/server/websocket-sfc.js +20 -0
  167. package/hmr/frameworks/vue/server/websocket-sfc.js.map +1 -0
  168. package/hmr/helpers/ast-normalizer.js +52 -5
  169. package/hmr/helpers/ast-normalizer.js.map +1 -1
  170. package/hmr/helpers/cjs-named-exports.d.ts +23 -0
  171. package/hmr/helpers/cjs-named-exports.js +152 -0
  172. package/hmr/helpers/cjs-named-exports.js.map +1 -0
  173. package/hmr/helpers/package-exports.d.ts +16 -0
  174. package/hmr/helpers/package-exports.js +396 -0
  175. package/hmr/helpers/package-exports.js.map +1 -0
  176. package/hmr/server/constants.js +13 -4
  177. package/hmr/server/constants.js.map +1 -1
  178. package/hmr/server/core-sanitize.d.ts +90 -7
  179. package/hmr/server/core-sanitize.js +211 -56
  180. package/hmr/server/core-sanitize.js.map +1 -1
  181. package/hmr/server/device-transform-helpers.d.ts +24 -0
  182. package/hmr/server/device-transform-helpers.js +327 -0
  183. package/hmr/server/device-transform-helpers.js.map +1 -0
  184. package/hmr/server/framework-strategy.d.ts +95 -11
  185. package/hmr/server/hmr-module-graph.d.ts +37 -0
  186. package/hmr/server/hmr-module-graph.js +214 -0
  187. package/hmr/server/hmr-module-graph.js.map +1 -0
  188. package/hmr/server/import-map.d.ts +11 -2
  189. package/hmr/server/import-map.js +59 -40
  190. package/hmr/server/import-map.js.map +1 -1
  191. package/hmr/server/index.js +7 -16
  192. package/hmr/server/index.js.map +1 -1
  193. package/hmr/server/ns-core-cjs-shape.d.ts +204 -0
  194. package/hmr/server/ns-core-cjs-shape.js +271 -0
  195. package/hmr/server/ns-core-cjs-shape.js.map +1 -0
  196. package/hmr/server/ns-rt-bridge.d.ts +51 -0
  197. package/hmr/server/ns-rt-bridge.js +131 -0
  198. package/hmr/server/ns-rt-bridge.js.map +1 -0
  199. package/hmr/server/ns-rt-route.d.ts +5 -0
  200. package/hmr/server/ns-rt-route.js +35 -0
  201. package/hmr/server/ns-rt-route.js.map +1 -0
  202. package/hmr/server/perf-instrumentation.d.ts +114 -0
  203. package/hmr/server/perf-instrumentation.js +195 -0
  204. package/hmr/server/perf-instrumentation.js.map +1 -0
  205. package/hmr/server/process-code-for-device.d.ts +15 -0
  206. package/hmr/server/process-code-for-device.js +654 -0
  207. package/hmr/server/process-code-for-device.js.map +1 -0
  208. package/hmr/server/require-guard.d.ts +1 -0
  209. package/hmr/server/require-guard.js +12 -0
  210. package/hmr/server/require-guard.js.map +1 -0
  211. package/hmr/server/rewrite-imports.d.ts +2 -0
  212. package/hmr/server/rewrite-imports.js +604 -0
  213. package/hmr/server/rewrite-imports.js.map +1 -0
  214. package/hmr/server/route-helpers.d.ts +7 -0
  215. package/hmr/server/route-helpers.js +13 -0
  216. package/hmr/server/route-helpers.js.map +1 -0
  217. package/hmr/server/server-origin.d.ts +12 -0
  218. package/hmr/server/server-origin.js +66 -0
  219. package/hmr/server/server-origin.js.map +1 -0
  220. package/hmr/server/shared-transform-request.js +12 -5
  221. package/hmr/server/shared-transform-request.js.map +1 -1
  222. package/hmr/server/transform-cache-invalidation.d.ts +11 -0
  223. package/hmr/server/transform-cache-invalidation.js +84 -0
  224. package/hmr/server/transform-cache-invalidation.js.map +1 -0
  225. package/hmr/server/vendor-bare-module-shims.d.ts +4 -0
  226. package/hmr/server/vendor-bare-module-shims.js +80 -0
  227. package/hmr/server/vendor-bare-module-shims.js.map +1 -0
  228. package/hmr/server/vite-plugin.js +60 -42
  229. package/hmr/server/vite-plugin.js.map +1 -1
  230. package/hmr/server/websocket-core-bridge.d.ts +41 -6
  231. package/hmr/server/websocket-core-bridge.js +72 -75
  232. package/hmr/server/websocket-core-bridge.js.map +1 -1
  233. package/hmr/server/websocket-css-hot-update.d.ts +33 -0
  234. package/hmr/server/websocket-css-hot-update.js +65 -0
  235. package/hmr/server/websocket-css-hot-update.js.map +1 -0
  236. package/hmr/server/websocket-device-transform.d.ts +3 -0
  237. package/hmr/server/websocket-device-transform.js +7 -0
  238. package/hmr/server/websocket-device-transform.js.map +1 -0
  239. package/hmr/server/websocket-graph-upsert.d.ts +15 -0
  240. package/hmr/server/websocket-graph-upsert.js +20 -0
  241. package/hmr/server/websocket-graph-upsert.js.map +1 -1
  242. package/hmr/server/websocket-hmr-pending.d.ts +37 -0
  243. package/hmr/server/websocket-hmr-pending.js +55 -0
  244. package/hmr/server/websocket-hmr-pending.js.map +1 -0
  245. package/hmr/server/websocket-hot-update.d.ts +77 -0
  246. package/hmr/server/websocket-hot-update.js +330 -0
  247. package/hmr/server/websocket-hot-update.js.map +1 -0
  248. package/hmr/server/websocket-import-map-route.d.ts +15 -0
  249. package/hmr/server/websocket-import-map-route.js +46 -0
  250. package/hmr/server/websocket-import-map-route.js.map +1 -0
  251. package/hmr/server/websocket-module-bindings.js +3 -3
  252. package/hmr/server/websocket-module-bindings.js.map +1 -1
  253. package/hmr/server/websocket-module-specifiers.d.ts +66 -2
  254. package/hmr/server/websocket-module-specifiers.js +202 -19
  255. package/hmr/server/websocket-module-specifiers.js.map +1 -1
  256. package/hmr/server/websocket-ns-core.d.ts +21 -0
  257. package/hmr/server/websocket-ns-core.js +306 -0
  258. package/hmr/server/websocket-ns-core.js.map +1 -0
  259. package/hmr/server/websocket-ns-entry.d.ts +21 -0
  260. package/hmr/server/websocket-ns-entry.js +150 -0
  261. package/hmr/server/websocket-ns-entry.js.map +1 -0
  262. package/hmr/server/websocket-ns-m-paths.d.ts +3 -0
  263. package/hmr/server/websocket-ns-m-paths.js +92 -0
  264. package/hmr/server/websocket-ns-m-paths.js.map +1 -0
  265. package/hmr/server/websocket-ns-m-request.d.ts +45 -0
  266. package/hmr/server/websocket-ns-m-request.js +196 -0
  267. package/hmr/server/websocket-ns-m-request.js.map +1 -0
  268. package/hmr/server/websocket-ns-m.d.ts +33 -0
  269. package/hmr/server/websocket-ns-m.js +748 -0
  270. package/hmr/server/websocket-ns-m.js.map +1 -0
  271. package/hmr/server/websocket-served-module-helpers.d.ts +39 -0
  272. package/hmr/server/websocket-served-module-helpers.js +654 -0
  273. package/hmr/server/websocket-served-module-helpers.js.map +1 -0
  274. package/hmr/server/websocket-txn.d.ts +6 -0
  275. package/hmr/server/websocket-txn.js +39 -0
  276. package/hmr/server/websocket-txn.js.map +1 -0
  277. package/hmr/server/websocket-vendor-unifier.d.ts +9 -0
  278. package/hmr/server/websocket-vendor-unifier.js +46 -0
  279. package/hmr/server/websocket-vendor-unifier.js.map +1 -0
  280. package/hmr/server/websocket.d.ts +8 -39
  281. package/hmr/server/websocket.js +602 -6049
  282. package/hmr/server/websocket.js.map +1 -1
  283. package/hmr/shared/ns-globals.d.ts +118 -0
  284. package/hmr/shared/ns-globals.js +27 -0
  285. package/hmr/shared/ns-globals.js.map +1 -0
  286. package/hmr/shared/protocol.d.ts +136 -0
  287. package/hmr/shared/protocol.js +28 -0
  288. package/hmr/shared/protocol.js.map +1 -0
  289. package/hmr/shared/runtime/boot-placeholder-ui.d.ts +69 -0
  290. package/hmr/shared/runtime/boot-placeholder-ui.js +101 -0
  291. package/hmr/shared/runtime/boot-placeholder-ui.js.map +1 -0
  292. package/hmr/shared/runtime/boot-progress.d.ts +40 -0
  293. package/hmr/shared/runtime/boot-progress.js +128 -0
  294. package/hmr/shared/runtime/boot-progress.js.map +1 -0
  295. package/hmr/shared/runtime/boot-timeline.d.ts +18 -0
  296. package/hmr/shared/runtime/boot-timeline.js +52 -0
  297. package/hmr/shared/runtime/boot-timeline.js.map +1 -0
  298. package/hmr/shared/runtime/dev-overlay-snapshots.d.ts +31 -0
  299. package/hmr/shared/runtime/dev-overlay-snapshots.js +324 -0
  300. package/hmr/shared/runtime/dev-overlay-snapshots.js.map +1 -0
  301. package/hmr/shared/runtime/dev-overlay.d.ts +75 -26
  302. package/hmr/shared/runtime/dev-overlay.js +990 -260
  303. package/hmr/shared/runtime/dev-overlay.js.map +1 -1
  304. package/hmr/shared/runtime/module-provenance.js +1 -4
  305. package/hmr/shared/runtime/module-provenance.js.map +1 -1
  306. package/hmr/shared/runtime/root-placeholder-view.d.ts +19 -0
  307. package/hmr/shared/runtime/root-placeholder-view.js +310 -0
  308. package/hmr/shared/runtime/root-placeholder-view.js.map +1 -0
  309. package/hmr/shared/runtime/root-placeholder.js +352 -194
  310. package/hmr/shared/runtime/root-placeholder.js.map +1 -1
  311. package/hmr/shared/runtime/session-bootstrap.js +164 -1
  312. package/hmr/shared/runtime/session-bootstrap.js.map +1 -1
  313. package/hmr/shared/runtime/vendor-bootstrap.js +1 -9
  314. package/hmr/shared/runtime/vendor-bootstrap.js.map +1 -1
  315. package/hmr/shared/vendor/manifest-collect.d.ts +4 -0
  316. package/hmr/shared/vendor/manifest-collect.js +512 -0
  317. package/hmr/shared/vendor/manifest-collect.js.map +1 -0
  318. package/hmr/shared/vendor/manifest-loader.d.ts +2 -1
  319. package/hmr/shared/vendor/manifest-loader.js +3 -2
  320. package/hmr/shared/vendor/manifest-loader.js.map +1 -1
  321. package/hmr/shared/vendor/manifest.d.ts +1 -7
  322. package/hmr/shared/vendor/manifest.js +102 -741
  323. package/hmr/shared/vendor/manifest.js.map +1 -1
  324. package/hmr/shared/vendor/vendor-device-shim.d.ts +1 -0
  325. package/hmr/shared/vendor/vendor-device-shim.js +208 -0
  326. package/hmr/shared/vendor/vendor-device-shim.js.map +1 -0
  327. package/hmr/shared/vendor/vendor-esbuild-plugins.d.ts +16 -0
  328. package/hmr/shared/vendor/vendor-esbuild-plugins.js +203 -0
  329. package/hmr/shared/vendor/vendor-esbuild-plugins.js.map +1 -0
  330. package/index.d.ts +1 -0
  331. package/index.js +5 -0
  332. package/index.js.map +1 -1
  333. package/package.json +55 -11
  334. package/runtime/core-aliases-early.js +17 -41
  335. package/runtime/core-aliases-early.js.map +1 -1
  336. package/helpers/angular/angular-linker.d.ts +0 -13
  337. package/helpers/angular/angular-linker.js +0 -194
  338. package/helpers/angular/angular-linker.js.map +0 -1
  339. package/helpers/angular/inline-decorator-component-templates.js.map +0 -1
  340. package/helpers/angular/shared-linker.d.ts +0 -11
  341. package/helpers/angular/shared-linker.js +0 -75
  342. package/helpers/angular/shared-linker.js.map +0 -1
  343. package/helpers/angular/synthesize-decorator-ctor-parameters.js.map +0 -1
  344. package/helpers/angular/synthesize-injectable-factories.js.map +0 -1
  345. package/helpers/angular/util.js +0 -67
  346. package/helpers/angular/util.js.map +0 -1
  347. package/helpers/prelink-angular.d.ts +0 -2
  348. package/helpers/prelink-angular.js +0 -117
  349. package/helpers/prelink-angular.js.map +0 -1
  350. package/hmr/server/websocket-angular-entry.js.map +0 -1
  351. package/hmr/server/websocket-angular-hot-update.js +0 -239
  352. package/hmr/server/websocket-angular-hot-update.js.map +0 -1
  353. /package/{helpers/angular → hmr/frameworks/angular/build}/inline-decorator-component-templates.d.ts +0 -0
  354. /package/{helpers/angular → hmr/frameworks/angular/build}/synthesize-decorator-ctor-parameters.d.ts +0 -0
  355. /package/{helpers/angular → hmr/frameworks/angular/build}/synthesize-injectable-factories.d.ts +0 -0
  356. /package/hmr/{server → frameworks/angular/server}/websocket-angular-entry.d.ts +0 -0
@@ -0,0 +1,604 @@
1
+ // THE SINGLE import-rewrite function — used everywhere for consistency. Maps a
2
+ // served module's specifiers to device-reachable forms: the unified /ns/core
3
+ // bridge, /ns/m node_modules + app modules, /ns/sfc for Vue, vendor bare specs,
4
+ // inlined JSON, and import.meta.url-relative dynamic imports.
5
+ import { existsSync, readFileSync } from 'fs';
6
+ import * as path from 'path';
7
+ import * as PAT from './constants.js';
8
+ import { getMonorepoWorkspaceRoot } from '../../helpers/project.js';
9
+ import { getProjectAppPath } from '../../helpers/utils.js';
10
+ import { buildCoreUrl, buildCoreUrlPath } from '../../helpers/ns-core-url.js';
11
+ import { resolveAngularCoreHmrImportSource, rewriteAngularEntryRegisterOnly } from '../frameworks/angular/server/websocket-angular-entry.js';
12
+ import { isNativeScriptCoreModule, isNativeScriptPluginModule, normalizeNativeScriptCoreSpecifier, normalizeNodeModulesSpecifier, resolveNodeModulesPackageBoundary, resolveVendorRouting, rewriteFsAbsoluteToNsM, shouldPreserveBareRuntimePluginSubpathImport } from './websocket-module-specifiers.js';
13
+ import { ensureDynamicHmrImportHelper } from './websocket-served-module-helpers.js';
14
+ import { collectMixedRuntimePluginHttpRootPackages, findDependencyFileName, getProjectRelativeImportPath, isApplicationImport, normalizeImportPath, stripToProjectRelative, toAppModuleBaseId, toNodeModulesHttpModuleId } from './device-transform-helpers.js';
15
+ const APP_ROOT_DIR = getProjectAppPath();
16
+ export function prepareAngularEntryForDevice(code, importerPath, sfcFileMap, depFileMap, projectRoot, verbose = false, outputDirOverrideRel, httpOrigin, resolveVendorAsHttp = false) {
17
+ const rewrittenCode = rewriteImports(code, importerPath, sfcFileMap, depFileMap, projectRoot, verbose, outputDirOverrideRel, httpOrigin, resolveVendorAsHttp);
18
+ return rewriteAngularEntryRegisterOnly(rewrittenCode, resolveAngularCoreHmrImportSource(rewrittenCode, httpOrigin));
19
+ }
20
+ export function rewriteImports(code, importerPath, sfcFileMap, depFileMap, projectRoot, verbose = false, outputDirOverrideRel, httpOrigin, resolveVendorAsHttp = false) {
21
+ let result = code;
22
+ // Pre-normalize concatenated imports onto their own lines.
23
+ //
24
+ // Babel's `genCode(ast, { retainLines: true })` in
25
+ // `astNormalizeModuleImportsAndHelpers` (which runs before us in the SFC
26
+ // asm pipeline, and in several other hot paths) can emit multiple
27
+ // statements on a single line, e.g.:
28
+ // `} = __ns_rt_ns_1;import { $goTo } from "../utils";import PageWrapper from ...;`
29
+ //
30
+ // IMPORT_PATTERN_1/_2/_3/SIDE_EFFECT all anchor on `(?:^|\n)\s*import`,
31
+ // so any import past the first one on a single line is silently dropped
32
+ // by the rewriter. Downstream that leaves bare relative specifiers like
33
+ // `../utils` to be resolved by the iOS HTTP ESM loader, which interprets
34
+ // them relative to the `/ns/asm/0?path=...` URL and 404s on the
35
+ // resulting `/ns/utils`. Splitting `;import` onto its own line makes the
36
+ // existing patterns match every import, restoring the rewrite contract.
37
+ //
38
+ // Mirrors the same normalization already performed in
39
+ // `core-sanitize.ts::normalizeStrayCoreStringLiterals` (`;\s*import` →
40
+ // `;\nimport`) but applied universally at the rewriter entry point so
41
+ // every caller benefits without having to opt in.
42
+ result = result.replace(/;\s*import\s+/g, ';\nimport ');
43
+ const httpOriginSafe = httpOrigin;
44
+ const mixedRuntimePluginHttpRootPackages = collectMixedRuntimePluginHttpRootPackages(result, projectRoot);
45
+ const isDynamicImportPrefix = (prefix) => /import\(\s*["']?$/.test(prefix.trimStart());
46
+ const importerDir = path.posix.dirname(importerPath);
47
+ // Resolved once per `rewriteImports` call so the per-import `/@fs/` rewriter
48
+ // can convert workspace-lib paths back into our `/ns/m/` pipeline. Memoized
49
+ // upstream — calling here is cheap and we reuse the value below.
50
+ const monorepoWorkspaceRootForRewrite = getMonorepoWorkspaceRoot(projectRoot);
51
+ // Determine importer output relative path (project-relative .mjs) to compute relative imports consistently
52
+ const importerOutRel = outputDirOverrideRel || getProjectRelativeImportPath(importerPath, projectRoot) || stripToProjectRelative(importerPath, projectRoot).replace(/\.(ts|js|tsx|jsx|mjs|mts|cts)$/i, '.mjs');
53
+ const importerOutDir = importerOutRel ? path.posix.dirname(importerOutRel) : '';
54
+ const ensureRel = (p) => (p.startsWith('.') ? p : `./${p}`);
55
+ const isNsSfcSpecifier = (spec) => /^(?:https?:\/\/[^/]+)?\/ns\/sfc(?:\/\d+)?(?:\/|$)/.test(spec.replace(PAT.QUERY_PATTERN, ''));
56
+ // Normalize all @nativescript/core imports to the unified HTTP ESM core bridge to guarantee a single realm on device
57
+ try {
58
+ let coreAliasIdx = 0;
59
+ const mkAlias = () => `__NSC${coreAliasIdx++}`;
60
+ // Use the canonical PATH form `/ns/core/<sub>`. The iOS HTTP ESM
61
+ // loader caches module records by URL string — every emitter
62
+ // (`buildCoreUrl()` / `buildCoreUrlPath()`, the runtime import map,
63
+ // vendor `require()` shims, app-side rewrites, the cold-boot
64
+ // preload in `entry-runtime.ts`) MUST produce the same byte
65
+ // string for the same logical core subpath. A divergence creates
66
+ // two distinct V8 module records for the same source. Each gets
67
+ // its own class
68
+ // identities (TextBase, View, etc.), and side-effect patches
69
+ // applied to one (e.g. @nativescript-community/text's
70
+ // `TextBase.prototype.setTextDecorationAndTransform` override
71
+ // installed when vendor.mjs evaluates `overrideSpanAndFormattedString()`
72
+ // from `@nativescript-community/ui-label/index-common.js`) are
73
+ // invisible to the other — manifesting as inconsistent line-height /
74
+ // letter-spacing rendering between HMR and no-HMR.
75
+ //
76
+ // Mirrors `normalizeCoreSub()` (helpers/ns-core-url.ts) so the URL
77
+ // produced here is byte-identical to what `buildCoreUrl()` produces
78
+ // for the bundle entry, import map, and external-urls plugin.
79
+ // Delegate to the ONE canonical URL builder so every emitter (this
80
+ // rewriter, core-sanitize, the runtime import map, the ns-core-external-urls
81
+ // build plugin, and main-entry) produces byte-identical URLs for
82
+ // the same logical core module. Any drift here would re-introduce
83
+ // the realm-split bug.
84
+ const coreUrl = (sub) => (httpOriginSafe ? buildCoreUrl(httpOriginSafe, sub) : buildCoreUrlPath(sub));
85
+ // Case 1: import { A, B } from '@nativescript/core[/sub]'
86
+ result = result.replace(/(^|\n)\s*import\s*\{\s*([^}]+?)\s*\}\s*from\s+["']@nativescript\/core([^"'\n]*)["'];?/g, (_m, pfx, names, sub) => {
87
+ const alias = mkAlias();
88
+ const url = coreUrl(sub || '');
89
+ const cleaned = names
90
+ .split(',')
91
+ .map((s) => s.trim())
92
+ .filter(Boolean)
93
+ .join(', ');
94
+ return `${pfx}import * as ${alias} from ${JSON.stringify(url)};\nconst { ${cleaned} } = ${alias};`;
95
+ });
96
+ // Case 2: import Default, { A, B } from '@nativescript/core[/sub]'
97
+ result = result.replace(/(^|\n)\s*import\s+([A-Za-z_$][\w$]*)\s*,\s*\{([^}]+?)\s*\}\s*from\s*["']@nativescript\/core([^"'\n]*)["'];?/g, (_m, pfx, defName, names, sub) => {
98
+ const alias = mkAlias();
99
+ const url = coreUrl(sub || '');
100
+ const cleaned = names
101
+ .split(',')
102
+ .map((s) => s.trim())
103
+ .filter(Boolean)
104
+ .join(', ');
105
+ return `${pfx}import * as ${alias} from ${JSON.stringify(url)};\nconst ${defName} = (${alias}.default || ${alias});\nconst { ${cleaned} } = ${alias};`;
106
+ });
107
+ // Case 3: import Default from '@nativescript/core[/sub]'
108
+ result = result.replace(/(^|\n)\s*import\s+([A-Za-z_$][\w$]*)\s+from\s*["']@nativescript\/core([^"'\n]*)["'];?/g, (_m, pfx, defName, sub) => {
109
+ const alias = mkAlias();
110
+ const url = coreUrl(sub || '');
111
+ return `${pfx}import * as ${alias} from ${JSON.stringify(url)};\nconst ${defName} = (${alias}.default || ${alias});`;
112
+ });
113
+ // Case 4: import * as NS from '@nativescript/core[/sub]'
114
+ result = result.replace(/(^|\n)\s*import\s+\*\s+as\s+([A-Za-z_$][\w$]*)\s+from\s*["']@nativescript\/core([^"'\n]*)["'];?/g, (_m, pfx, nsName, sub) => {
115
+ const url = coreUrl(sub || '');
116
+ return `${pfx}import * as ${nsName} from ${JSON.stringify(url)};`;
117
+ });
118
+ // Case 5: side-effect import '@nativescript/core[/sub]'
119
+ result = result.replace(/(^|\n)\s*import\s*["']@nativescript\/core([^"'\n]*)["'];?/g, (_m, pfx, sub) => {
120
+ const url = coreUrl(sub || '');
121
+ return `${pfx}import ${JSON.stringify(url)};`;
122
+ });
123
+ // Case 6: dynamic import('@nativescript/core[/sub]')
124
+ result = result.replace(/import\(\s*["']@nativescript\/core([^"'\n]*)["']\s*\)/g, (_m, sub) => {
125
+ const url = coreUrl(sub || '');
126
+ return `import(${JSON.stringify(url)})`;
127
+ });
128
+ }
129
+ catch { }
130
+ // Inline JSON imports (package.json, config.json, etc.)
131
+ // This must happen BEFORE other rewrites because JSON imports get a ?import query added by Vite
132
+ result = result.replace(/import\s+(\w+)\s+from\s+["']([^"']+\.json(?:\?[^"']*)?)["'];?/g, (match, varName, jsonPath) => {
133
+ try {
134
+ // Remove query params like ?import
135
+ const cleanPath = jsonPath.split('?')[0];
136
+ // Resolve the JSON file path relative to the importer
137
+ let fullPath;
138
+ if (cleanPath.startsWith('/@fs/')) {
139
+ // Vite filesystem URL: `/@fs/<abs-path>`. Strip the `/@fs` prefix
140
+ // (4 chars, leaving the leading `/`) to recover the absolute
141
+ // path. This matches `rewriteFsAbsoluteToNsM`'s convention and
142
+ // covers both bare specifiers Vite pre-resolved out of the
143
+ // project root (e.g. `emojibase-data/en/compact.json` →
144
+ // `/@fs/.../node_modules/.../compact.json`) and tsconfig
145
+ // path-alias targets that resolve outside the project root
146
+ // (e.g. `~shared/...metadata.json` → `/@fs/.../tools/...json`).
147
+ // Without this branch the next `else if` would `path.join` the
148
+ // `/@fs/...` URL onto `projectRoot`, collapsing the leading `/`
149
+ // and producing a malformed nested path that always misses on
150
+ // `existsSync` and triggers a `ReferenceError` at runtime when
151
+ // the JSON-import-failed comment leaves the binding undefined.
152
+ fullPath = cleanPath.slice('/@fs'.length);
153
+ }
154
+ else if (cleanPath.startsWith('/')) {
155
+ // Absolute from project root
156
+ fullPath = path.join(projectRoot, cleanPath);
157
+ }
158
+ else if (cleanPath.startsWith('./') || cleanPath.startsWith('../')) {
159
+ // Relative to importer - resolve from importer's location in project
160
+ const importerFullPath = path.join(projectRoot, importerDir);
161
+ fullPath = path.resolve(importerFullPath, cleanPath);
162
+ }
163
+ else {
164
+ // Skip node_modules JSON imports
165
+ return match;
166
+ }
167
+ if (existsSync(fullPath)) {
168
+ const jsonContent = readFileSync(fullPath, 'utf-8');
169
+ if (verbose) {
170
+ console.log(`[rewrite] JSON inline: ${jsonPath} → const ${varName} = {...}`);
171
+ }
172
+ // Inline the JSON as a const declaration
173
+ return `const ${varName} = ${jsonContent};`;
174
+ }
175
+ else {
176
+ console.warn(`[rewrite] JSON file not found: ${fullPath} (specifier=${jsonPath})`);
177
+ }
178
+ }
179
+ catch (error) {
180
+ console.warn(`[rewrite] Could not inline JSON import: ${jsonPath}`, error);
181
+ }
182
+ // If we can't inline it, remove the import to prevent runtime errors
183
+ // The code will fail with "varName is not defined" which is more debuggable
184
+ return `/* JSON import failed: ${match} */`;
185
+ });
186
+ // Helper to resolve .vue file imports to absolute project paths
187
+ const resolveVueKey = (spec) => {
188
+ if (!spec || typeof spec !== 'string') {
189
+ return null;
190
+ }
191
+ // Only process .vue files
192
+ if (!PAT.VUE_FILE_PATTERN.test(spec)) {
193
+ return null;
194
+ }
195
+ let key;
196
+ if (spec.startsWith('/')) {
197
+ key = spec;
198
+ }
199
+ else if (spec.startsWith('./') || spec.startsWith('../')) {
200
+ key = path.posix.normalize(path.posix.join(importerDir, spec));
201
+ if (!key.startsWith('/'))
202
+ key = '/' + key;
203
+ }
204
+ else {
205
+ return null;
206
+ }
207
+ // Strip query params
208
+ key = key.replace(PAT.QUERY_PATTERN, '');
209
+ return key;
210
+ };
211
+ // Replacement function for all imports
212
+ const replaceVueImport = (_match, prefix, spec, suffix) => {
213
+ // Safety check
214
+ if (!spec || typeof spec !== 'string') {
215
+ return `${prefix}${spec}${suffix}`;
216
+ }
217
+ // Guard 0: leave fully-qualified HTTP(S) URLs alone
218
+ if (/^https?:\/\//.test(spec)) {
219
+ return `${prefix}${spec}${suffix}`;
220
+ }
221
+ // Guard: anomalous bare '@' spec should be rewritten to a safe stub module.
222
+ // This can surface from upstream alias mishaps; mapping it here avoids device-side
223
+ // "instantiate failed @" errors.
224
+ if (spec === '@') {
225
+ const stub = `/ns/m/__invalid_at__.mjs`;
226
+ if (verbose) {
227
+ console.warn(`[rewrite] mapped bare '@' spec to stub: ${stub}`);
228
+ }
229
+ return `${prefix}${stub}${suffix}`;
230
+ }
231
+ spec = normalizeNativeScriptCoreSpecifier(spec);
232
+ // Pull `/@fs/<abs-path>` URLs back into the `/ns/m/` pipeline so they
233
+ // hit our CJS/UMD-wrapping handler. Vite emits `/@fs/...` for any
234
+ // resolved id outside the configured `root` — including hoisted
235
+ // `node_modules/<pkg>` entries and workspace libs in monorepos. Left
236
+ // untouched, the device fetches them through Vite's standard
237
+ // middleware which never invokes `wrapCommonJsModuleForDevice`, so a
238
+ // UMD module like papaparse crashes on `(this).Papa = factory()`
239
+ // because top-level `this` is `undefined` in ESM context.
240
+ if (spec.startsWith('/@fs/')) {
241
+ const rewritten = rewriteFsAbsoluteToNsM(spec, projectRoot, monorepoWorkspaceRootForRewrite);
242
+ if (rewritten) {
243
+ if (httpOriginSafe) {
244
+ return `${prefix}${httpOriginSafe}${rewritten}${suffix}`;
245
+ }
246
+ return `${prefix}${rewritten}${suffix}`;
247
+ }
248
+ // Path resolves outside both roots — leave Vite's URL alone as a
249
+ // last resort. The original behaviour was to fall through here
250
+ // and let downstream branches (e.g. `normalizeNodeModulesSpecifier`)
251
+ // handle paths whose abs form happens to contain `/node_modules/`,
252
+ // so preserve that for the unrewritable case below.
253
+ }
254
+ // Route Vite virtual modules (/@solid-refresh, etc.) through /ns/m/ so their
255
+ // internal imports (e.g. solid-js) get vendor-rewritten by our pipeline.
256
+ // Skip known Vite internals (/@vite/, /@id/) which are handled elsewhere.
257
+ // `/@fs/` is intentionally excluded above; if we ever reach here with a
258
+ // `/@fs/` spec it means the rewrite-to-`/ns/m/` pass couldn't anchor it
259
+ // under projectRoot or workspaceRoot, so we fall through and rely on the
260
+ // `normalizeNodeModulesSpecifier` branch below for paths that still
261
+ // contain a `/node_modules/<pkg>/` segment.
262
+ if (spec.startsWith('/@') && !/^\/@(?:vite|id|fs)\//.test(spec)) {
263
+ const out = `/ns/m${spec}`;
264
+ if (httpOriginSafe) {
265
+ return `${prefix}${httpOriginSafe}${out}${suffix}`;
266
+ }
267
+ return `${prefix}${out}${suffix}`;
268
+ }
269
+ // Route internal NS endpoints to absolute HTTP origin for device
270
+ if (spec.startsWith('/ns/')) {
271
+ if (httpOriginSafe) {
272
+ return `${prefix}${httpOriginSafe}${spec}${suffix}`;
273
+ }
274
+ return `${prefix}${spec}${suffix}`;
275
+ }
276
+ if (isNativeScriptCoreModule(spec)) {
277
+ return `${prefix}${spec}${suffix}`;
278
+ }
279
+ const nodeModulesSpecifier = normalizeNodeModulesSpecifier(spec);
280
+ const normalizedRuntimePluginSpec = nodeModulesSpecifier || spec.replace(PAT.QUERY_PATTERN, '').replace(/^\/+/, '');
281
+ if (normalizedRuntimePluginSpec && mixedRuntimePluginHttpRootPackages.size > 0) {
282
+ const { packageName } = resolveNodeModulesPackageBoundary(normalizedRuntimePluginSpec, projectRoot);
283
+ if (packageName && mixedRuntimePluginHttpRootPackages.has(packageName)) {
284
+ const httpNodeModulesSpecifier = nodeModulesSpecifier || normalizedRuntimePluginSpec;
285
+ const httpSpec = `/ns/m/node_modules/${httpNodeModulesSpecifier}`;
286
+ if (httpOriginSafe) {
287
+ return `${prefix}${httpOriginSafe}${httpSpec}${suffix}`;
288
+ }
289
+ return `${prefix}${httpSpec}${suffix}`;
290
+ }
291
+ }
292
+ if (shouldPreserveBareRuntimePluginSubpathImport(spec, projectRoot)) {
293
+ const httpSpec = `/ns/m/node_modules/${spec.replace(PAT.QUERY_PATTERN, '').replace(/^\/+/, '')}`;
294
+ if (httpOriginSafe) {
295
+ return `${prefix}${httpOriginSafe}${httpSpec}${suffix}`;
296
+ }
297
+ return `${prefix}${httpSpec}${suffix}`;
298
+ }
299
+ // ── Node modules routing ──────────────────────────────────────
300
+ // Uses the package's own package.json exports field to determine
301
+ // whether an import is the main entry (→ vendor bridge) or a
302
+ // subpath entry (→ HTTP). This replaces the old heuristic-based
303
+ // approach that tried to guess from file paths.
304
+ if (nodeModulesSpecifier) {
305
+ const vendorRouting = resolveVendorRouting(nodeModulesSpecifier, projectRoot);
306
+ if (vendorRouting) {
307
+ if (vendorRouting.route === 'vendor') {
308
+ return `${prefix}${vendorRouting.bareSpec}${suffix}`;
309
+ }
310
+ // Vendor package but subpath/platform-specific → HTTP
311
+ const httpSpec = `/ns/m/node_modules/${nodeModulesSpecifier}`;
312
+ if (httpOriginSafe) {
313
+ return `${prefix}${httpOriginSafe}${httpSpec}${suffix}`;
314
+ }
315
+ return `${prefix}${httpSpec}${suffix}`;
316
+ }
317
+ // Not a vendor package → serve via HTTP from Vite dev server
318
+ const httpSpec = `/ns/m/node_modules/${nodeModulesSpecifier}`;
319
+ if (httpOriginSafe) {
320
+ return `${prefix}${httpOriginSafe}${httpSpec}${suffix}`;
321
+ }
322
+ return `${prefix}${httpSpec}${suffix}`;
323
+ }
324
+ // Handle .vue imports
325
+ if (PAT.VUE_FILE_PATTERN.test(spec)) {
326
+ // Case A: SFC submodule variant (template/script) must keep its query to avoid self-import cycles.
327
+ const isVueVariant = /\bvue&type=/.test(spec);
328
+ if (isVueVariant) {
329
+ // Preserve the full ?vue&type=... query and route via /ns/sfc so sanitation applies
330
+ const qIdx = spec.indexOf('?');
331
+ const base = qIdx !== -1 ? spec.slice(0, qIdx) : spec;
332
+ const query = qIdx !== -1 ? spec.slice(qIdx) : '';
333
+ // Resolve to absolute project path if relative
334
+ let abs = base;
335
+ if (!abs.startsWith('/')) {
336
+ const joined = path.posix.normalize(path.posix.join(importerDir, abs));
337
+ abs = joined.startsWith('/') ? joined : `/${joined}`;
338
+ }
339
+ const out = `/ns/sfc${abs}${query}`;
340
+ if (verbose) {
341
+ console.log(`[rewrite] .vue variant routed (http): ${spec} → ${out}`);
342
+ }
343
+ return `${prefix}${out}${suffix}`;
344
+ }
345
+ // Case B: plain .vue module → rewrite to SFC endpoint or local artifact
346
+ const vueKey = resolveVueKey(spec.replace(PAT.QUERY_PATTERN, '')) || '';
347
+ if (vueKey) {
348
+ if (true) {
349
+ const absVue = vueKey.startsWith('/') ? vueKey : '/' + vueKey;
350
+ const out = `/ns/sfc${absVue}`;
351
+ if (verbose) {
352
+ console.log(`[rewrite] .vue rewrite (http): ${spec} → ${out}`);
353
+ }
354
+ return `${prefix}${out}${suffix}`;
355
+ }
356
+ else {
357
+ const vueFile = sfcFileMap.get(vueKey);
358
+ if (vueFile) {
359
+ const target = `_ns_hmr/${APP_ROOT_DIR}/sfc/${vueFile}`;
360
+ const relPath = importerOutDir ? ensureRel(path.posix.relative(importerOutDir, target)) : ensureRel(target);
361
+ if (verbose) {
362
+ console.log(`[rewrite] .vue rewrite: ${spec} → ${relPath}`);
363
+ }
364
+ return `${prefix}${relPath}${suffix}`;
365
+ }
366
+ else if (verbose) {
367
+ console.log(`[rewrite] .vue NOT in sfcFileMap: ${vueKey}`);
368
+ }
369
+ }
370
+ }
371
+ return `${prefix}${spec}${suffix}`;
372
+ }
373
+ // Rewrite relative application imports to HTTP for served modules
374
+ if (spec.startsWith('./') || spec.startsWith('../')) {
375
+ const absMaybe = normalizeImportPath(spec, importerDir);
376
+ const nodeModulesHttpSpec = absMaybe ? toNodeModulesHttpModuleId(absMaybe) : null;
377
+ if (nodeModulesHttpSpec) {
378
+ if (isDynamicImportPrefix(prefix)) {
379
+ if (verbose)
380
+ console.log(`[rewrite][http] dynamic relative node_modules import → ${nodeModulesHttpSpec} (from ${spec})`);
381
+ return `__nsDynamicHmrImport(${JSON.stringify(nodeModulesHttpSpec)})`;
382
+ }
383
+ if (verbose)
384
+ console.log(`[rewrite][http] relative node_modules import → ${nodeModulesHttpSpec} (from ${spec})`);
385
+ return `${prefix}${nodeModulesHttpSpec}${suffix}`;
386
+ }
387
+ const baseId = absMaybe ? toAppModuleBaseId(absMaybe, projectRoot) : null; // e.g. /src/foo.mjs
388
+ if (baseId) {
389
+ const httpSpec = `/ns/m${baseId}`;
390
+ if (isDynamicImportPrefix(prefix)) {
391
+ if (verbose)
392
+ console.log(`[rewrite][http] dynamic relative app import → ${httpSpec} (from ${spec})`);
393
+ return `__nsDynamicHmrImport(${JSON.stringify(httpSpec)})`;
394
+ }
395
+ if (verbose)
396
+ console.log(`[rewrite][http] relative app import → ${httpSpec} (from ${spec})`);
397
+ return `${prefix}${httpSpec}${suffix}`;
398
+ }
399
+ return `${prefix}${spec}${suffix}`;
400
+ }
401
+ // Note: Do NOT rewrite bare application specifiers (e.g. "core/foo").
402
+ // These will be inlined during bundleDependenciesInline() to avoid static HTTP imports on device.
403
+ if (isApplicationImport(spec)) {
404
+ const baseId = toAppModuleBaseId(spec, projectRoot);
405
+ if (baseId) {
406
+ const httpSpec = `/ns/m${baseId}`;
407
+ if (isDynamicImportPrefix(prefix)) {
408
+ if (verbose)
409
+ console.log(`[rewrite][http] dynamic app import → ${httpSpec} (from ${spec})`);
410
+ return `__nsDynamicHmrImport(${JSON.stringify(httpSpec)})`;
411
+ }
412
+ if (verbose)
413
+ console.log(`[rewrite][http] absolute app import → ${httpSpec} (from ${spec})`);
414
+ return `${prefix}${httpSpec}${suffix}`;
415
+ }
416
+ return `${prefix}${spec}${suffix}`;
417
+ }
418
+ // In HTTP mode, avoid rewriting to dep-*.mjs; let imports resolve via server endpoints
419
+ const depKey = normalizeImportPath(spec, importerDir);
420
+ if (depKey && !httpOriginSafe) {
421
+ if (isNativeScriptCoreModule(depKey)) {
422
+ return `${prefix}${spec}${suffix}`;
423
+ }
424
+ if (isNativeScriptPluginModule(depKey)) {
425
+ return `${prefix}${spec}${suffix}`;
426
+ }
427
+ const depFile = findDependencyFileName(depFileMap, depKey);
428
+ if (depFile) {
429
+ if (verbose) {
430
+ console.log(`[rewrite] dep import: ${spec} → ./${depFile}`);
431
+ }
432
+ return `${prefix}./${depFile}${suffix}`;
433
+ }
434
+ }
435
+ // ── Bare specifier vendor routing ────────────────────────────
436
+ // Bare specifiers like `pinia`, `dayjs`, `lodash` never reach
437
+ // the `nodeModulesSpecifier` branch above because
438
+ // `normalizeNodeModulesSpecifier` keys on a literal
439
+ // `/node_modules/` segment in the path. Without this check
440
+ // they'd fall straight into the HTTP fallback below and get
441
+ // rewritten to `/ns/m/node_modules/<spec>`, which serves the
442
+ // package source over HTTP and bypasses the device-side import
443
+ // map's `<pkg>` → `ns-vendor://<pkg>` entry. For CJS/UMD
444
+ // packages (e.g. Pinia) the bare HTTP path doesn't expose the
445
+ // full named-exports surface (only the default export round-
446
+ // trips), so consumers like
447
+ // `import { defineStore } from "pinia"` blow up at instantiate
448
+ // time with `SyntaxError: ... does not provide an export named
449
+ // 'defineStore'`. Preserving the bare spec lets the vendor
450
+ // bridge serve it from the prebuilt `bundle.mjs`, which already
451
+ // re-exports the full CJS surface. Subpath imports
452
+ // (`pinia/plugins/foo`) intentionally fall through to the
453
+ // HTTP fallback — `resolveVendorRouting` returns
454
+ // `{ route: 'http' }` for non-main-entry subpaths even when the
455
+ // root package is in the manifest, mirroring the
456
+ // `nodeModulesSpecifier` branch.
457
+ if (spec && !spec.startsWith('/') && !spec.startsWith('./') && !spec.startsWith('../') && !/^https?:\/\//i.test(spec) && !spec.startsWith('ns-vendor:') && !spec.startsWith('@nativescript/core')) {
458
+ const bareNpmRe = /^(?:@[A-Za-z0-9][\w.-]*\/)?[A-Za-z0-9][\w.-]*(?:\/[\w.\-/]+)?$/;
459
+ if (bareNpmRe.test(spec)) {
460
+ const bareVendorRouting = resolveVendorRouting(spec, projectRoot);
461
+ if (bareVendorRouting?.route === 'vendor') {
462
+ if (verbose) {
463
+ console.log(`[rewrite] bare vendor import: ${spec} → ${bareVendorRouting.bareSpec}`);
464
+ }
465
+ return `${prefix}${bareVendorRouting.bareSpec}${suffix}`;
466
+ }
467
+ }
468
+ }
469
+ // Bare npm package specifier fallback — route to /ns/m/node_modules/.
470
+ // This catches specifiers like `source-map-js/lib/source-map-generator.js`
471
+ // emitted by helpers such as the CommonJS compat transform, which Vite
472
+ // would normally resolve to an absolute path but which pass through the
473
+ // rewriter as bare strings here. Under HMR (core external) bundle.mjs
474
+ // depends on these resolving over HTTP rather than via a filesystem
475
+ // bare-specifier lookup, which iOS can't satisfy and which crashes with
476
+ // "Module not found".
477
+ if (spec && !spec.startsWith('/') && !spec.startsWith('./') && !spec.startsWith('../') && !/^https?:\/\//i.test(spec) && !spec.startsWith('ns-vendor:') && !spec.startsWith('@nativescript/core')) {
478
+ // Only treat as a package spec if it looks like one — disallow
479
+ // plain identifiers like `moment` unresolved (those are left alone
480
+ // for existing vendor-routing paths to handle).
481
+ const bareNpmRe = /^(?:@[A-Za-z0-9][\w.-]*\/)?[A-Za-z0-9][\w.-]*(?:\/[\w.\-/]+)?$/;
482
+ if (bareNpmRe.test(spec)) {
483
+ const httpSpec = `/ns/m/node_modules/${spec}`;
484
+ if (httpOriginSafe) {
485
+ return `${prefix}${httpOriginSafe}${httpSpec}${suffix}`;
486
+ }
487
+ return `${prefix}${httpSpec}${suffix}`;
488
+ }
489
+ }
490
+ // Leave everything else unchanged (vendor imports, etc.)
491
+ return `${prefix}${spec}${suffix}`;
492
+ };
493
+ // Apply to all import/export patterns (but only .vue files will be rewritten)
494
+ result = result.replace(PAT.IMPORT_PATTERN_1, replaceVueImport);
495
+ result = result.replace(PAT.IMPORT_PATTERN_2, replaceVueImport);
496
+ result = result.replace(PAT.EXPORT_PATTERN, replaceVueImport);
497
+ result = result.replace(PAT.IMPORT_PATTERN_3, replaceVueImport);
498
+ // Side-effect imports (import "spec") — must run AFTER named-import patterns
499
+ // since IMPORT_PATTERN_1 already handles `import ... from "spec"`.
500
+ result = result.replace(PAT.IMPORT_PATTERN_SIDE_EFFECT, replaceVueImport);
501
+ result = ensureDynamicHmrImportHelper(result);
502
+ // Extra guard: map any lingering dynamic import('@') to a safe stub module path
503
+ // to prevent device runtime normalization errors.
504
+ // Example matched: import('@') or import("@") with optional whitespace before closing paren
505
+ result = result.replace(/(import\(\s*['"])@(['"]\s*\))/g, (_m) => {
506
+ const stubExpr = `import(new URL('/ns/m/__invalid_at__.mjs', import.meta.url).href)`;
507
+ if (verbose) {
508
+ console.warn(`[rewrite] mapped dynamic import('@') to /ns/m/__invalid_at__.mjs via import.meta.url`);
509
+ }
510
+ return stubExpr;
511
+ });
512
+ // Also guard static spec forms that could erroneously be '@'
513
+ // 1) ESM: import { x } from '@'
514
+ result = result.replace(/(from\s*['"])@(['"])/g, (_m, p1, p2) => {
515
+ const stub = `/ns/m/__invalid_at__.mjs`;
516
+ if (verbose) {
517
+ console.warn(`[rewrite] mapped static from '@' to ${stub}`);
518
+ }
519
+ return `${p1}${stub}${p2}`;
520
+ });
521
+ // 2) ESM side-effect: import '@'
522
+ result = result.replace(/(import\s*(?!\()\s*['"])@(['"])/g, (_m, p1, p2) => {
523
+ const stub = `/ns/m/__invalid_at__.mjs`;
524
+ if (verbose) {
525
+ console.warn(`[rewrite] mapped side-effect import '@' to ${stub}`);
526
+ }
527
+ return `${p1}${stub}${p2}`;
528
+ });
529
+ // Handle .vue imports with queries
530
+ // In HTTP mode, skip legacy local-path rewrite to avoid mixing module origins
531
+ result = result.replace(PAT.VUE_FILE_IMPORT, (_m, p1, spec, p3) => {
532
+ if (httpOrigin) {
533
+ if (isNsSfcSpecifier(spec)) {
534
+ if (verbose)
535
+ console.log(`[rewrite] .vue already routed (VUE_FILE_IMPORT http): ${spec}`);
536
+ return `${p1}${spec}${p3}`;
537
+ }
538
+ // Route via /ns/sfc with full query preserved
539
+ try {
540
+ let base = spec;
541
+ const qIdx = base.indexOf('?');
542
+ const query = qIdx !== -1 ? base.slice(qIdx) : '';
543
+ base = qIdx !== -1 ? base.slice(0, qIdx) : base;
544
+ // Resolve relative to importerDir
545
+ let abs = base;
546
+ if (!abs.startsWith('/')) {
547
+ const joined = path.posix.normalize(path.posix.join(importerDir, abs));
548
+ abs = joined.startsWith('/') ? joined : '/' + joined;
549
+ }
550
+ const out = `/ns/sfc${abs}${query}`;
551
+ if (verbose)
552
+ console.log(`[rewrite] .vue variant routed (VUE_FILE_IMPORT http): ${spec} → ${out}`);
553
+ return `${p1}${out}${p3}`;
554
+ }
555
+ catch { }
556
+ return `${p1}${spec}${p3}`;
557
+ }
558
+ const vueKey = resolveVueKey(spec);
559
+ if (vueKey) {
560
+ const vueFile = sfcFileMap.get(vueKey);
561
+ if (vueFile) {
562
+ const target = `_ns_hmr/${APP_ROOT_DIR}/sfc/${vueFile}`;
563
+ const relPath = importerOutDir ? ensureRel(path.posix.relative(importerOutDir, target)) : ensureRel(target);
564
+ if (verbose) {
565
+ console.log(`[rewrite] .vue rewrite (VUE_FILE_IMPORT): ${spec} → ${relPath}`);
566
+ }
567
+ return `${p1}${relPath}${p3}`;
568
+ }
569
+ else if (verbose) {
570
+ console.log(`[rewrite] .vue NOT in sfcFileMap (VUE_FILE_IMPORT): ${vueKey}`);
571
+ }
572
+ }
573
+ return `${p1}${spec}${p3}`;
574
+ });
575
+ // Final safeguard: normalize any remaining absolute filesystem dynamic imports to HTTP origin spec
576
+ const absoluteDynamicPattern = /(import\(\s*["'])([^"']+)(["']\s*\))/g;
577
+ result = result.replace(absoluteDynamicPattern, (match, _prefix, spec, _suffix) => {
578
+ if (!spec || !spec.startsWith('/'))
579
+ return match;
580
+ // Handle internal NS endpoints
581
+ if (spec.startsWith('/ns/')) {
582
+ const expr = `import(new URL('${spec}', import.meta.url).href)`;
583
+ if (verbose)
584
+ console.log(`[rewrite][http] internal ns import (dynamic) → ${spec} via import.meta.url`);
585
+ return expr;
586
+ }
587
+ const nodeModulesHttpSpec = toNodeModulesHttpModuleId(spec);
588
+ if (nodeModulesHttpSpec) {
589
+ const expr = `import(new URL('${nodeModulesHttpSpec}', import.meta.url).href)`;
590
+ if (verbose)
591
+ console.log(`[rewrite][http] absolute dynamic node_modules import → ${nodeModulesHttpSpec} via import.meta.url (from ${spec})`);
592
+ return expr;
593
+ }
594
+ const baseId = toAppModuleBaseId(spec, projectRoot);
595
+ if (!baseId)
596
+ return match;
597
+ const expr = `import(new URL('/ns/m${baseId}', import.meta.url).href)`;
598
+ if (verbose)
599
+ console.log(`[rewrite][http] absolute dynamic import → /ns/m${baseId} via import.meta.url (from ${spec})`);
600
+ return expr;
601
+ });
602
+ return result;
603
+ }
604
+ //# sourceMappingURL=rewrite-imports.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"rewrite-imports.js","sourceRoot":"","sources":["../../../../../packages/vite/hmr/server/rewrite-imports.ts"],"names":[],"mappings":"AAAA,+EAA+E;AAC/E,6EAA6E;AAC7E,gFAAgF;AAChF,8DAA8D;AAC9D,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,IAAI,CAAC;AAC9C,OAAO,KAAK,IAAI,MAAM,MAAM,CAAC;AAC7B,OAAO,KAAK,GAAG,MAAM,gBAAgB,CAAC;AACtC,OAAO,EAAE,wBAAwB,EAAE,MAAM,0BAA0B,CAAC;AACpE,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAC3D,OAAO,EAAE,YAAY,EAAE,gBAAgB,EAAE,MAAM,8BAA8B,CAAC;AAC9E,OAAO,EAA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