@nativescript/vite 8.0.0-alpha.7 → 8.0.0-alpha.70

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 (554) hide show
  1. package/README.md +51 -11
  2. package/bin/cli.cjs +8 -14
  3. package/configuration/angular.d.ts +34 -1
  4. package/configuration/angular.js +293 -172
  5. package/configuration/angular.js.map +1 -1
  6. package/configuration/base.js +177 -110
  7. package/configuration/base.js.map +1 -1
  8. package/configuration/javascript.js +14 -93
  9. package/configuration/javascript.js.map +1 -1
  10. package/configuration/react.js +41 -73
  11. package/configuration/react.js.map +1 -1
  12. package/configuration/solid.js +51 -6
  13. package/configuration/solid.js.map +1 -1
  14. package/configuration/typescript.js +12 -93
  15. package/configuration/typescript.js.map +1 -1
  16. package/helpers/app-components.d.ts +2 -1
  17. package/helpers/app-components.js.map +1 -1
  18. package/helpers/app-css-refresh.d.ts +31 -0
  19. package/helpers/app-css-refresh.js +43 -0
  20. package/helpers/app-css-refresh.js.map +1 -0
  21. package/helpers/app-css-state.d.ts +17 -0
  22. package/helpers/app-css-state.js +51 -0
  23. package/helpers/app-css-state.js.map +1 -0
  24. package/helpers/bundler-context.d.ts +11 -0
  25. package/helpers/bundler-context.js +71 -0
  26. package/helpers/bundler-context.js.map +1 -0
  27. package/helpers/cli-flags.d.ts +12 -0
  28. package/helpers/cli-flags.js +34 -0
  29. package/helpers/cli-flags.js.map +1 -1
  30. package/helpers/css-platform-plugin.d.ts +14 -0
  31. package/helpers/css-platform-plugin.js +43 -25
  32. package/helpers/css-platform-plugin.js.map +1 -1
  33. package/helpers/dev-host.d.ts +360 -0
  34. package/helpers/dev-host.js +694 -0
  35. package/helpers/dev-host.js.map +1 -0
  36. package/helpers/dynamic-import-plugin.js +9 -4
  37. package/helpers/dynamic-import-plugin.js.map +1 -1
  38. package/helpers/esbuild-platform-resolver.js +4 -1
  39. package/helpers/esbuild-platform-resolver.js.map +1 -1
  40. package/helpers/external-configs.d.ts +10 -12
  41. package/helpers/external-configs.js +58 -35
  42. package/helpers/external-configs.js.map +1 -1
  43. package/helpers/flavor.d.ts +13 -0
  44. package/helpers/flavor.js +17 -0
  45. package/helpers/flavor.js.map +1 -1
  46. package/helpers/global-defines.d.ts +101 -33
  47. package/helpers/global-defines.js +187 -64
  48. package/helpers/global-defines.js.map +1 -1
  49. package/helpers/hmr-scope.d.ts +26 -0
  50. package/helpers/hmr-scope.js +67 -0
  51. package/helpers/hmr-scope.js.map +1 -0
  52. package/helpers/init.js +0 -18
  53. package/helpers/init.js.map +1 -1
  54. package/helpers/logging.js +29 -1
  55. package/helpers/logging.js.map +1 -1
  56. package/helpers/main-entry.d.ts +4 -1
  57. package/helpers/main-entry.js +366 -47
  58. package/helpers/main-entry.js.map +1 -1
  59. package/helpers/nativeclass-esbuild-plugin.d.ts +2 -1
  60. package/helpers/nativeclass-esbuild-plugin.js +6 -1
  61. package/helpers/nativeclass-esbuild-plugin.js.map +1 -1
  62. package/helpers/nativeclass-transform.d.ts +13 -0
  63. package/helpers/nativeclass-transform.js +37 -7
  64. package/helpers/nativeclass-transform.js.map +1 -1
  65. package/helpers/nativeclass-transformer-plugin.d.ts +9 -2
  66. package/helpers/nativeclass-transformer-plugin.js +163 -15
  67. package/helpers/nativeclass-transformer-plugin.js.map +1 -1
  68. package/helpers/nativescript-package-resolver.js +10 -62
  69. package/helpers/nativescript-package-resolver.js.map +1 -1
  70. package/helpers/normalize-id.d.ts +42 -0
  71. package/helpers/normalize-id.js +60 -0
  72. package/helpers/normalize-id.js.map +1 -0
  73. package/helpers/ns-core-external-urls.d.ts +32 -0
  74. package/helpers/ns-core-external-urls.js +107 -0
  75. package/helpers/ns-core-external-urls.js.map +1 -0
  76. package/helpers/ns-core-url.d.ts +26 -3
  77. package/helpers/ns-core-url.js +66 -8
  78. package/helpers/ns-core-url.js.map +1 -1
  79. package/helpers/optimize-deps.d.ts +16 -0
  80. package/helpers/optimize-deps.js +17 -0
  81. package/helpers/optimize-deps.js.map +1 -0
  82. package/helpers/package-platform-aliases.js +34 -49
  83. package/helpers/package-platform-aliases.js.map +1 -1
  84. package/helpers/platform-types.d.ts +2 -0
  85. package/helpers/platform-types.js +2 -0
  86. package/helpers/platform-types.js.map +1 -0
  87. package/helpers/postcss-platform-config.d.ts +17 -1
  88. package/helpers/postcss-platform-config.js +20 -37
  89. package/helpers/postcss-platform-config.js.map +1 -1
  90. package/helpers/project.d.ts +35 -0
  91. package/helpers/project.js +120 -2
  92. package/helpers/project.js.map +1 -1
  93. package/helpers/resolve-main-field-platform.d.ts +20 -0
  94. package/helpers/resolve-main-field-platform.js +49 -0
  95. package/helpers/resolve-main-field-platform.js.map +1 -0
  96. package/helpers/resolver.js +17 -2
  97. package/helpers/resolver.js.map +1 -1
  98. package/helpers/theme-core-plugins.js +1 -1
  99. package/helpers/theme-core-plugins.js.map +1 -1
  100. package/helpers/ts-config-paths.d.ts +32 -0
  101. package/helpers/ts-config-paths.js +156 -27
  102. package/helpers/ts-config-paths.js.map +1 -1
  103. package/helpers/typescript-check.d.ts +2 -1
  104. package/helpers/typescript-check.js +4 -4
  105. package/helpers/typescript-check.js.map +1 -1
  106. package/helpers/ui-registration.d.ts +21 -0
  107. package/helpers/ui-registration.js +156 -0
  108. package/helpers/ui-registration.js.map +1 -0
  109. package/helpers/utils.d.ts +9 -0
  110. package/helpers/utils.js +22 -2
  111. package/helpers/utils.js.map +1 -1
  112. package/helpers/vite-package-version.d.ts +7 -0
  113. package/helpers/vite-package-version.js +44 -0
  114. package/helpers/vite-package-version.js.map +1 -0
  115. package/helpers/workers.d.ts +40 -19
  116. package/helpers/workers.js +324 -13
  117. package/helpers/workers.js.map +1 -1
  118. package/hmr/client/css-handler.d.ts +2 -1
  119. package/hmr/client/css-handler.js +63 -32
  120. package/hmr/client/css-handler.js.map +1 -1
  121. package/hmr/client/css-update-overlay.d.ts +18 -0
  122. package/hmr/client/css-update-overlay.js +27 -0
  123. package/hmr/client/css-update-overlay.js.map +1 -0
  124. package/hmr/client/framework-client-strategy.d.ts +87 -0
  125. package/hmr/client/framework-client-strategy.js +18 -0
  126. package/hmr/client/framework-client-strategy.js.map +1 -0
  127. package/hmr/client/hmr-pending-overlay.d.ts +0 -14
  128. package/hmr/client/hmr-pending-overlay.js +2 -11
  129. package/hmr/client/hmr-pending-overlay.js.map +1 -1
  130. package/hmr/client/hot-context.d.ts +67 -0
  131. package/hmr/client/hot-context.js +307 -0
  132. package/hmr/client/hot-context.js.map +1 -0
  133. package/hmr/client/index.d.ts +9 -1
  134. package/hmr/client/index.js +70 -1970
  135. package/hmr/client/index.js.map +1 -1
  136. package/hmr/client/overlay-driver.d.ts +10 -0
  137. package/hmr/client/overlay-driver.js +33 -0
  138. package/hmr/client/overlay-driver.js.map +1 -0
  139. package/hmr/client/protocol-dispatch.d.ts +8 -0
  140. package/hmr/client/protocol-dispatch.js +308 -0
  141. package/hmr/client/protocol-dispatch.js.map +1 -0
  142. package/hmr/client/root-reset.d.ts +15 -0
  143. package/hmr/client/root-reset.js +358 -0
  144. package/hmr/client/root-reset.js.map +1 -0
  145. package/hmr/client/strategy-loader.d.ts +24 -0
  146. package/hmr/client/strategy-loader.js +83 -0
  147. package/hmr/client/strategy-loader.js.map +1 -0
  148. package/hmr/client/update-pipeline.d.ts +27 -0
  149. package/hmr/client/update-pipeline.js +464 -0
  150. package/hmr/client/update-pipeline.js.map +1 -0
  151. package/hmr/client/utils.d.ts +9 -1
  152. package/hmr/client/utils.js +117 -97
  153. package/hmr/client/utils.js.map +1 -1
  154. package/hmr/client/ws-transport.d.ts +21 -0
  155. package/hmr/client/ws-transport.js +323 -0
  156. package/hmr/client/ws-transport.js.map +1 -0
  157. package/hmr/entry-runtime.d.ts +2 -1
  158. package/hmr/entry-runtime.js +282 -71
  159. package/hmr/entry-runtime.js.map +1 -1
  160. package/hmr/frameworks/angular/build/angular-linker.d.ts +12 -0
  161. package/hmr/frameworks/angular/build/angular-linker.js +113 -0
  162. package/hmr/frameworks/angular/build/angular-linker.js.map +1 -0
  163. package/hmr/frameworks/angular/build/inject-component-hmr-registration.d.ts +112 -0
  164. package/hmr/frameworks/angular/build/inject-component-hmr-registration.js +291 -0
  165. package/hmr/frameworks/angular/build/inject-component-hmr-registration.js.map +1 -0
  166. package/hmr/frameworks/angular/build/inject-hmr-vite-ignore.d.ts +75 -0
  167. package/hmr/frameworks/angular/build/inject-hmr-vite-ignore.js +221 -0
  168. package/hmr/frameworks/angular/build/inject-hmr-vite-ignore.js.map +1 -0
  169. package/{helpers/angular → hmr/frameworks/angular/build}/inline-decorator-component-templates.js +1 -170
  170. package/hmr/frameworks/angular/build/inline-decorator-component-templates.js.map +1 -0
  171. package/hmr/frameworks/angular/build/js-lexer.d.ts +4 -0
  172. package/{helpers/angular/synthesize-decorator-ctor-parameters.js → hmr/frameworks/angular/build/js-lexer.js} +22 -96
  173. package/hmr/frameworks/angular/build/js-lexer.js.map +1 -0
  174. package/hmr/frameworks/angular/build/linker-stats.d.ts +18 -0
  175. package/hmr/frameworks/angular/build/linker-stats.js +29 -0
  176. package/hmr/frameworks/angular/build/linker-stats.js.map +1 -0
  177. package/hmr/frameworks/angular/build/shared-linker.d.ts +39 -0
  178. package/hmr/frameworks/angular/build/shared-linker.js +128 -0
  179. package/hmr/frameworks/angular/build/shared-linker.js.map +1 -0
  180. package/hmr/frameworks/angular/build/synthesize-decorator-ctor-parameters.js +88 -0
  181. package/hmr/frameworks/angular/build/synthesize-decorator-ctor-parameters.js.map +1 -0
  182. package/{helpers/angular → hmr/frameworks/angular/build}/synthesize-injectable-factories.js +1 -174
  183. package/hmr/frameworks/angular/build/synthesize-injectable-factories.js.map +1 -0
  184. package/hmr/frameworks/angular/build/ts-fallback-transform.d.ts +5 -0
  185. package/hmr/frameworks/angular/build/ts-fallback-transform.js +138 -0
  186. package/hmr/frameworks/angular/build/ts-fallback-transform.js.map +1 -0
  187. package/{helpers/angular → hmr/frameworks/angular/build}/util.d.ts +1 -0
  188. package/hmr/frameworks/angular/build/util.js +155 -0
  189. package/hmr/frameworks/angular/build/util.js.map +1 -0
  190. package/hmr/frameworks/angular/build/worker-url-preserve.d.ts +5 -0
  191. package/hmr/frameworks/angular/build/worker-url-preserve.js +140 -0
  192. package/hmr/frameworks/angular/build/worker-url-preserve.js.map +1 -0
  193. package/hmr/frameworks/angular/client/index.d.ts +0 -1
  194. package/hmr/frameworks/angular/client/index.js +459 -223
  195. package/hmr/frameworks/angular/client/index.js.map +1 -1
  196. package/hmr/frameworks/angular/client/strategy.d.ts +9 -0
  197. package/hmr/frameworks/angular/client/strategy.js +19 -0
  198. package/hmr/frameworks/angular/client/strategy.js.map +1 -0
  199. package/hmr/frameworks/angular/server/angular-root-component.d.ts +79 -0
  200. package/hmr/frameworks/angular/server/angular-root-component.js +149 -0
  201. package/hmr/frameworks/angular/server/angular-root-component.js.map +1 -0
  202. package/hmr/frameworks/angular/server/linker.js +1 -4
  203. package/hmr/frameworks/angular/server/linker.js.map +1 -1
  204. package/hmr/frameworks/angular/server/ng-component-route.d.ts +43 -0
  205. package/hmr/frameworks/angular/server/ng-component-route.js +113 -0
  206. package/hmr/frameworks/angular/server/ng-component-route.js.map +1 -0
  207. package/hmr/frameworks/angular/server/strategy.js +677 -13
  208. package/hmr/frameworks/angular/server/strategy.js.map +1 -1
  209. package/hmr/{server → frameworks/angular/server}/websocket-angular-entry.js +2 -2
  210. package/hmr/frameworks/angular/server/websocket-angular-entry.js.map +1 -0
  211. package/hmr/{server → frameworks/angular/server}/websocket-angular-hot-update.d.ts +28 -11
  212. package/hmr/{server → frameworks/angular/server}/websocket-angular-hot-update.js +191 -105
  213. package/hmr/frameworks/angular/server/websocket-angular-hot-update.js.map +1 -0
  214. package/hmr/frameworks/react/client/strategy.d.ts +12 -0
  215. package/hmr/frameworks/react/client/strategy.js +27 -0
  216. package/hmr/frameworks/react/client/strategy.js.map +1 -0
  217. package/hmr/frameworks/react/server/strategy.d.ts +2 -0
  218. package/hmr/frameworks/react/server/strategy.js +230 -0
  219. package/hmr/frameworks/react/server/strategy.js.map +1 -0
  220. package/hmr/frameworks/solid/build/solid-jsx-deps.d.ts +15 -0
  221. package/hmr/frameworks/solid/build/solid-jsx-deps.js +178 -0
  222. package/hmr/frameworks/solid/build/solid-jsx-deps.js.map +1 -0
  223. package/hmr/frameworks/solid/client/app-runtime.d.ts +68 -0
  224. package/hmr/frameworks/solid/client/app-runtime.js +252 -0
  225. package/hmr/frameworks/solid/client/app-runtime.js.map +1 -0
  226. package/hmr/frameworks/solid/client/strategy.d.ts +7 -0
  227. package/hmr/frameworks/solid/client/strategy.js +391 -0
  228. package/hmr/frameworks/solid/client/strategy.js.map +1 -0
  229. package/hmr/frameworks/solid/server/strategy.js +293 -16
  230. package/hmr/frameworks/solid/server/strategy.js.map +1 -1
  231. package/hmr/frameworks/typescript/client/strategy.d.ts +7 -0
  232. package/hmr/frameworks/typescript/client/strategy.js +418 -0
  233. package/hmr/frameworks/typescript/client/strategy.js.map +1 -0
  234. package/hmr/frameworks/typescript/server/strategy.js +40 -14
  235. package/hmr/frameworks/typescript/server/strategy.js.map +1 -1
  236. package/hmr/frameworks/vue/client/dep-propagation.d.ts +44 -0
  237. package/hmr/frameworks/vue/client/dep-propagation.js +148 -0
  238. package/hmr/frameworks/vue/client/dep-propagation.js.map +1 -0
  239. package/hmr/frameworks/vue/client/index.d.ts +10 -1
  240. package/hmr/frameworks/vue/client/index.js +287 -562
  241. package/hmr/frameworks/vue/client/index.js.map +1 -1
  242. package/hmr/frameworks/vue/client/navigate-app.d.ts +3 -0
  243. package/hmr/frameworks/vue/client/navigate-app.js +178 -0
  244. package/hmr/frameworks/vue/client/navigate-app.js.map +1 -0
  245. package/hmr/frameworks/vue/client/strategy.d.ts +33 -0
  246. package/hmr/frameworks/vue/client/strategy.js +152 -0
  247. package/hmr/frameworks/vue/client/strategy.js.map +1 -0
  248. package/hmr/frameworks/vue/client/vue-sfc-update-overlay.d.ts +49 -0
  249. package/hmr/frameworks/vue/client/vue-sfc-update-overlay.js +124 -0
  250. package/hmr/frameworks/vue/client/vue-sfc-update-overlay.js.map +1 -0
  251. package/hmr/frameworks/vue/server/compiler.d.ts +3 -1
  252. package/hmr/frameworks/vue/server/compiler.js +3 -1
  253. package/hmr/frameworks/vue/server/compiler.js.map +1 -1
  254. package/hmr/frameworks/vue/server/sfc-route-assemble.d.ts +7 -0
  255. package/hmr/frameworks/vue/server/sfc-route-assemble.js +823 -0
  256. package/hmr/frameworks/vue/server/sfc-route-assemble.js.map +1 -0
  257. package/hmr/frameworks/vue/server/sfc-route-meta.d.ts +7 -0
  258. package/hmr/frameworks/vue/server/sfc-route-meta.js +80 -0
  259. package/hmr/frameworks/vue/server/sfc-route-meta.js.map +1 -0
  260. package/hmr/frameworks/vue/server/sfc-route-serve.d.ts +8 -0
  261. package/hmr/frameworks/vue/server/sfc-route-serve.js +462 -0
  262. package/hmr/frameworks/vue/server/sfc-route-serve.js.map +1 -0
  263. package/hmr/frameworks/vue/server/sfc-route-shared.d.ts +45 -0
  264. package/hmr/frameworks/vue/server/sfc-route-shared.js +105 -0
  265. package/hmr/frameworks/vue/server/sfc-route-shared.js.map +1 -0
  266. package/hmr/frameworks/vue/server/strategy.d.ts +35 -0
  267. package/hmr/frameworks/vue/server/strategy.js +291 -7
  268. package/hmr/frameworks/vue/server/strategy.js.map +1 -1
  269. package/hmr/frameworks/vue/server/websocket-sfc.d.ts +15 -0
  270. package/hmr/frameworks/vue/server/websocket-sfc.js +20 -0
  271. package/hmr/frameworks/vue/server/websocket-sfc.js.map +1 -0
  272. package/hmr/helpers/ast-normalizer.d.ts +3 -1
  273. package/hmr/helpers/ast-normalizer.js +109 -14
  274. package/hmr/helpers/ast-normalizer.js.map +1 -1
  275. package/hmr/helpers/cjs-named-exports.d.ts +23 -0
  276. package/hmr/helpers/cjs-named-exports.js +152 -0
  277. package/hmr/helpers/cjs-named-exports.js.map +1 -0
  278. package/hmr/helpers/package-exports.d.ts +16 -0
  279. package/hmr/helpers/package-exports.js +396 -0
  280. package/hmr/helpers/package-exports.js.map +1 -0
  281. package/hmr/helpers/vendor-rewrite.d.ts +1 -1
  282. package/hmr/helpers/vendor-rewrite.js +5 -3
  283. package/hmr/helpers/vendor-rewrite.js.map +1 -1
  284. package/hmr/server/boot-recording.d.ts +51 -0
  285. package/hmr/server/boot-recording.js +214 -0
  286. package/hmr/server/boot-recording.js.map +1 -0
  287. package/hmr/server/constants.js +20 -5
  288. package/hmr/server/constants.js.map +1 -1
  289. package/hmr/server/content-css-update.d.ts +54 -0
  290. package/hmr/server/content-css-update.js +78 -0
  291. package/hmr/server/content-css-update.js.map +1 -0
  292. package/hmr/server/core-bundle.d.ts +140 -0
  293. package/hmr/server/core-bundle.js +614 -0
  294. package/hmr/server/core-bundle.js.map +1 -0
  295. package/hmr/server/core-sanitize.d.ts +86 -7
  296. package/hmr/server/core-sanitize.js +164 -39
  297. package/hmr/server/core-sanitize.js.map +1 -1
  298. package/hmr/server/css-connect-sync.d.ts +28 -0
  299. package/hmr/server/css-connect-sync.js +59 -0
  300. package/hmr/server/css-connect-sync.js.map +1 -0
  301. package/hmr/server/css-device-module.d.ts +28 -0
  302. package/hmr/server/css-device-module.js +44 -0
  303. package/hmr/server/css-device-module.js.map +1 -0
  304. package/hmr/server/css-update-message.d.ts +23 -0
  305. package/hmr/server/css-update-message.js +41 -0
  306. package/hmr/server/css-update-message.js.map +1 -0
  307. package/hmr/server/deps-bundle.d.ts +233 -0
  308. package/hmr/server/deps-bundle.js +1022 -0
  309. package/hmr/server/deps-bundle.js.map +1 -0
  310. package/hmr/server/device-transform-helpers.d.ts +24 -0
  311. package/hmr/server/device-transform-helpers.js +408 -0
  312. package/hmr/server/device-transform-helpers.js.map +1 -0
  313. package/hmr/server/framework-strategy.d.ts +182 -11
  314. package/hmr/server/hmr-module-graph.d.ts +37 -0
  315. package/hmr/server/hmr-module-graph.js +215 -0
  316. package/hmr/server/hmr-module-graph.js.map +1 -0
  317. package/hmr/server/import-map.d.ts +51 -19
  318. package/hmr/server/import-map.js +136 -66
  319. package/hmr/server/import-map.js.map +1 -1
  320. package/hmr/server/index.js +7 -16
  321. package/hmr/server/index.js.map +1 -1
  322. package/hmr/server/node-builtins-route.d.ts +12 -0
  323. package/hmr/server/node-builtins-route.js +86 -0
  324. package/hmr/server/node-builtins-route.js.map +1 -0
  325. package/hmr/server/ns-core-cjs-shape.js +1 -1
  326. package/hmr/server/ns-core-cjs-shape.js.map +1 -1
  327. package/hmr/server/ns-m-response-memo.d.ts +10 -0
  328. package/hmr/server/ns-m-response-memo.js +33 -0
  329. package/hmr/server/ns-m-response-memo.js.map +1 -0
  330. package/hmr/server/ns-rt-bridge.d.ts +51 -0
  331. package/hmr/server/ns-rt-bridge.js +131 -0
  332. package/hmr/server/ns-rt-bridge.js.map +1 -0
  333. package/hmr/server/ns-rt-route.d.ts +5 -0
  334. package/hmr/server/ns-rt-route.js +39 -0
  335. package/hmr/server/ns-rt-route.js.map +1 -0
  336. package/hmr/server/perf-instrumentation.d.ts +1 -1
  337. package/hmr/server/perf-instrumentation.js +3 -1
  338. package/hmr/server/perf-instrumentation.js.map +1 -1
  339. package/hmr/server/process-code-for-device.d.ts +44 -0
  340. package/hmr/server/process-code-for-device.js +834 -0
  341. package/hmr/server/process-code-for-device.js.map +1 -0
  342. package/hmr/server/require-guard.d.ts +1 -0
  343. package/hmr/server/require-guard.js +12 -0
  344. package/hmr/server/require-guard.js.map +1 -0
  345. package/hmr/server/rewrite-imports.d.ts +2 -0
  346. package/hmr/server/rewrite-imports.js +631 -0
  347. package/hmr/server/rewrite-imports.js.map +1 -0
  348. package/hmr/server/route-helpers.d.ts +7 -0
  349. package/hmr/server/route-helpers.js +13 -0
  350. package/hmr/server/route-helpers.js.map +1 -0
  351. package/hmr/server/runtime-graph-filter.js +8 -1
  352. package/hmr/server/runtime-graph-filter.js.map +1 -1
  353. package/hmr/server/server-origin.d.ts +2 -0
  354. package/hmr/server/server-origin.js +88 -0
  355. package/hmr/server/server-origin.js.map +1 -0
  356. package/hmr/server/shared-transform-request.js +1 -2
  357. package/hmr/server/shared-transform-request.js.map +1 -1
  358. package/hmr/server/socket-utils.d.ts +10 -0
  359. package/hmr/server/socket-utils.js +14 -0
  360. package/hmr/server/socket-utils.js.map +1 -0
  361. package/hmr/server/transform-cache-invalidation.d.ts +37 -0
  362. package/hmr/server/transform-cache-invalidation.js +156 -0
  363. package/hmr/server/transform-cache-invalidation.js.map +1 -0
  364. package/hmr/server/vendor-bare-module-shims.d.ts +4 -0
  365. package/hmr/server/vendor-bare-module-shims.js +80 -0
  366. package/hmr/server/vendor-bare-module-shims.js.map +1 -0
  367. package/hmr/server/vite-plugin.d.ts +1 -0
  368. package/hmr/server/vite-plugin.js +227 -53
  369. package/hmr/server/vite-plugin.js.map +1 -1
  370. package/hmr/server/websocket-core-bridge.d.ts +51 -4
  371. package/hmr/server/websocket-core-bridge.js +62 -49
  372. package/hmr/server/websocket-core-bridge.js.map +1 -1
  373. package/hmr/server/websocket-device-transform.d.ts +3 -0
  374. package/hmr/server/websocket-device-transform.js +7 -0
  375. package/hmr/server/websocket-device-transform.js.map +1 -0
  376. package/hmr/server/websocket-hmr-pending.d.ts +2 -16
  377. package/hmr/server/websocket-hmr-pending.js +0 -22
  378. package/hmr/server/websocket-hmr-pending.js.map +1 -1
  379. package/hmr/server/websocket-hot-update.d.ts +80 -0
  380. package/hmr/server/websocket-hot-update.js +295 -0
  381. package/hmr/server/websocket-hot-update.js.map +1 -0
  382. package/hmr/server/websocket-import-map-route.d.ts +15 -0
  383. package/hmr/server/websocket-import-map-route.js +51 -0
  384. package/hmr/server/websocket-import-map-route.js.map +1 -0
  385. package/hmr/server/websocket-module-bindings.d.ts +15 -0
  386. package/hmr/server/websocket-module-bindings.js +38 -5
  387. package/hmr/server/websocket-module-bindings.js.map +1 -1
  388. package/hmr/server/websocket-module-specifiers.d.ts +66 -7
  389. package/hmr/server/websocket-module-specifiers.js +219 -49
  390. package/hmr/server/websocket-module-specifiers.js.map +1 -1
  391. package/hmr/server/websocket-ns-core.d.ts +34 -0
  392. package/hmr/server/websocket-ns-core.js +414 -0
  393. package/hmr/server/websocket-ns-core.js.map +1 -0
  394. package/hmr/server/websocket-ns-entry.d.ts +21 -0
  395. package/hmr/server/websocket-ns-entry.js +164 -0
  396. package/hmr/server/websocket-ns-entry.js.map +1 -0
  397. package/hmr/server/websocket-ns-m-paths.d.ts +19 -3
  398. package/hmr/server/websocket-ns-m-paths.js +98 -75
  399. package/hmr/server/websocket-ns-m-paths.js.map +1 -1
  400. package/hmr/server/websocket-ns-m-request.d.ts +13 -2
  401. package/hmr/server/websocket-ns-m-request.js +20 -11
  402. package/hmr/server/websocket-ns-m-request.js.map +1 -1
  403. package/hmr/server/websocket-ns-m.d.ts +52 -0
  404. package/hmr/server/websocket-ns-m.js +590 -0
  405. package/hmr/server/websocket-ns-m.js.map +1 -0
  406. package/hmr/server/websocket-served-module-helpers.d.ts +57 -4
  407. package/hmr/server/websocket-served-module-helpers.js +462 -141
  408. package/hmr/server/websocket-served-module-helpers.js.map +1 -1
  409. package/hmr/server/websocket-txn.js +6 -9
  410. package/hmr/server/websocket-txn.js.map +1 -1
  411. package/hmr/server/websocket-vendor-unifier.d.ts +0 -1
  412. package/hmr/server/websocket-vendor-unifier.js +4 -9
  413. package/hmr/server/websocket-vendor-unifier.js.map +1 -1
  414. package/hmr/server/websocket.d.ts +7 -40
  415. package/hmr/server/websocket.js +653 -6734
  416. package/hmr/server/websocket.js.map +1 -1
  417. package/hmr/shared/ns-globals.d.ts +106 -0
  418. package/hmr/shared/ns-globals.js +29 -0
  419. package/hmr/shared/ns-globals.js.map +1 -0
  420. package/hmr/shared/protocol.d.ts +157 -0
  421. package/hmr/shared/protocol.js +28 -0
  422. package/hmr/shared/protocol.js.map +1 -0
  423. package/hmr/shared/runtime/boot-complete.d.ts +14 -0
  424. package/hmr/shared/runtime/boot-complete.js +32 -0
  425. package/hmr/shared/runtime/boot-complete.js.map +1 -0
  426. package/hmr/shared/runtime/boot-placeholder-ui.d.ts +69 -0
  427. package/hmr/shared/runtime/boot-placeholder-ui.js +101 -0
  428. package/hmr/shared/runtime/boot-placeholder-ui.js.map +1 -0
  429. package/hmr/shared/runtime/boot-progress.d.ts +44 -0
  430. package/hmr/shared/runtime/boot-progress.js +134 -0
  431. package/hmr/shared/runtime/boot-progress.js.map +1 -0
  432. package/hmr/shared/runtime/boot-timeline.d.ts +1 -1
  433. package/hmr/shared/runtime/boot-timeline.js +8 -19
  434. package/hmr/shared/runtime/boot-timeline.js.map +1 -1
  435. package/hmr/shared/runtime/browser-runtime-contract.d.ts +43 -24
  436. package/hmr/shared/runtime/browser-runtime-contract.js +21 -9
  437. package/hmr/shared/runtime/browser-runtime-contract.js.map +1 -1
  438. package/hmr/shared/runtime/dev-overlay-ios.d.ts +87 -0
  439. package/hmr/shared/runtime/dev-overlay-ios.js +521 -0
  440. package/hmr/shared/runtime/dev-overlay-ios.js.map +1 -0
  441. package/hmr/shared/runtime/dev-overlay-shared.d.ts +58 -0
  442. package/hmr/shared/runtime/dev-overlay-shared.js +116 -0
  443. package/hmr/shared/runtime/dev-overlay-shared.js.map +1 -0
  444. package/hmr/shared/runtime/dev-overlay-snapshots.d.ts +31 -0
  445. package/hmr/shared/runtime/dev-overlay-snapshots.js +324 -0
  446. package/hmr/shared/runtime/dev-overlay-snapshots.js.map +1 -0
  447. package/hmr/shared/runtime/dev-overlay-tree.d.ts +59 -0
  448. package/hmr/shared/runtime/dev-overlay-tree.js +712 -0
  449. package/hmr/shared/runtime/dev-overlay-tree.js.map +1 -0
  450. package/hmr/shared/runtime/dev-overlay.d.ts +23 -69
  451. package/hmr/shared/runtime/dev-overlay.js +67 -1023
  452. package/hmr/shared/runtime/dev-overlay.js.map +1 -1
  453. package/hmr/shared/runtime/global-scope.d.ts +18 -0
  454. package/hmr/shared/runtime/global-scope.js +21 -0
  455. package/hmr/shared/runtime/global-scope.js.map +1 -0
  456. package/hmr/shared/runtime/hooks.js +2 -1
  457. package/hmr/shared/runtime/hooks.js.map +1 -1
  458. package/hmr/shared/runtime/launch-bridge.d.ts +9 -0
  459. package/hmr/shared/runtime/launch-bridge.js +98 -0
  460. package/hmr/shared/runtime/launch-bridge.js.map +1 -0
  461. package/hmr/shared/runtime/module-provenance.js +4 -6
  462. package/hmr/shared/runtime/module-provenance.js.map +1 -1
  463. package/hmr/shared/runtime/ns-runtime-test-double.d.ts +21 -0
  464. package/hmr/shared/runtime/ns-runtime-test-double.js +20 -0
  465. package/hmr/shared/runtime/ns-runtime-test-double.js.map +1 -0
  466. package/hmr/shared/runtime/overlay-flag.d.ts +9 -0
  467. package/hmr/shared/runtime/overlay-flag.js +34 -0
  468. package/hmr/shared/runtime/overlay-flag.js.map +1 -0
  469. package/hmr/shared/runtime/root-placeholder-view.d.ts +19 -0
  470. package/hmr/shared/runtime/root-placeholder-view.js +311 -0
  471. package/hmr/shared/runtime/root-placeholder-view.js.map +1 -0
  472. package/hmr/shared/runtime/root-placeholder.js +401 -206
  473. package/hmr/shared/runtime/root-placeholder.js.map +1 -1
  474. package/hmr/shared/runtime/session-bootstrap.js +203 -58
  475. package/hmr/shared/runtime/session-bootstrap.js.map +1 -1
  476. package/hmr/shared/runtime/vendor-bootstrap.js +3 -10
  477. package/hmr/shared/runtime/vendor-bootstrap.js.map +1 -1
  478. package/hmr/shared/runtime/vendor-resolve.d.ts +22 -0
  479. package/hmr/shared/runtime/vendor-resolve.js +45 -0
  480. package/hmr/shared/runtime/vendor-resolve.js.map +1 -0
  481. package/hmr/shared/vendor/manifest-collect.d.ts +4 -0
  482. package/hmr/shared/vendor/manifest-collect.js +909 -0
  483. package/hmr/shared/vendor/manifest-collect.js.map +1 -0
  484. package/hmr/shared/vendor/manifest-loader.d.ts +2 -1
  485. package/hmr/shared/vendor/manifest-loader.js +5 -3
  486. package/hmr/shared/vendor/manifest-loader.js.map +1 -1
  487. package/hmr/shared/vendor/manifest.d.ts +12 -7
  488. package/hmr/shared/vendor/manifest.js +180 -826
  489. package/hmr/shared/vendor/manifest.js.map +1 -1
  490. package/hmr/shared/vendor/registry.d.ts +2 -0
  491. package/hmr/shared/vendor/registry.js +14 -0
  492. package/hmr/shared/vendor/registry.js.map +1 -1
  493. package/hmr/shared/vendor/vendor-device-shim.d.ts +1 -0
  494. package/hmr/shared/vendor/vendor-device-shim.js +208 -0
  495. package/hmr/shared/vendor/vendor-device-shim.js.map +1 -0
  496. package/hmr/shared/vendor/vendor-esbuild-plugins.d.ts +107 -0
  497. package/hmr/shared/vendor/vendor-esbuild-plugins.js +540 -0
  498. package/hmr/shared/vendor/vendor-esbuild-plugins.js.map +1 -0
  499. package/index.d.ts +1 -0
  500. package/index.js +5 -0
  501. package/index.js.map +1 -1
  502. package/package.json +65 -13
  503. package/runtime/core-aliases-early.js +28 -57
  504. package/runtime/core-aliases-early.js.map +1 -1
  505. package/shims/react-jsx-runtime.d.ts +4 -0
  506. package/shims/react-jsx-runtime.js +61 -0
  507. package/shims/react-jsx-runtime.js.map +1 -0
  508. package/helpers/angular/angular-linker.d.ts +0 -13
  509. package/helpers/angular/angular-linker.js +0 -194
  510. package/helpers/angular/angular-linker.js.map +0 -1
  511. package/helpers/angular/inline-decorator-component-templates.js.map +0 -1
  512. package/helpers/angular/shared-linker.d.ts +0 -11
  513. package/helpers/angular/shared-linker.js +0 -75
  514. package/helpers/angular/shared-linker.js.map +0 -1
  515. package/helpers/angular/synthesize-decorator-ctor-parameters.js.map +0 -1
  516. package/helpers/angular/synthesize-injectable-factories.js.map +0 -1
  517. package/helpers/angular/util.js +0 -67
  518. package/helpers/angular/util.js.map +0 -1
  519. package/helpers/module-runner-patch.d.ts +0 -3
  520. package/helpers/module-runner-patch.js +0 -63
  521. package/helpers/module-runner-patch.js.map +0 -1
  522. package/helpers/prelink-angular.d.ts +0 -2
  523. package/helpers/prelink-angular.js +0 -117
  524. package/helpers/prelink-angular.js.map +0 -1
  525. package/hmr/server/websocket-angular-entry.js.map +0 -1
  526. package/hmr/server/websocket-angular-hot-update.js.map +0 -1
  527. package/hmr/server/websocket-ns-m-finalize.d.ts +0 -22
  528. package/hmr/server/websocket-ns-m-finalize.js +0 -88
  529. package/hmr/server/websocket-ns-m-finalize.js.map +0 -1
  530. package/hmr/server/websocket-runtime-compat.d.ts +0 -19
  531. package/hmr/server/websocket-runtime-compat.js +0 -287
  532. package/hmr/server/websocket-runtime-compat.js.map +0 -1
  533. package/hmr/server/websocket-vue-sfc.d.ts +0 -27
  534. package/hmr/server/websocket-vue-sfc.js +0 -1114
  535. package/hmr/server/websocket-vue-sfc.js.map +0 -1
  536. package/hmr/shared/runtime/http-only-boot.d.ts +0 -2
  537. package/hmr/shared/runtime/http-only-boot.js +0 -171
  538. package/hmr/shared/runtime/http-only-boot.js.map +0 -1
  539. package/hmr/vendor-bootstrap.d.ts +0 -3
  540. package/hmr/vendor-bootstrap.js +0 -32
  541. package/hmr/vendor-bootstrap.js.map +0 -1
  542. package/shims/react-reconciler-constants.d.ts +0 -14
  543. package/shims/react-reconciler-constants.js +0 -21
  544. package/shims/react-reconciler-constants.js.map +0 -1
  545. package/shims/react-reconciler.d.ts +0 -8
  546. package/shims/react-reconciler.js +0 -15
  547. package/shims/react-reconciler.js.map +0 -1
  548. package/transformers/NativeClass/index.d.ts +0 -2
  549. package/transformers/NativeClass/index.js +0 -222
  550. package/transformers/NativeClass/index.js.map +0 -1
  551. /package/{helpers/angular → hmr/frameworks/angular/build}/inline-decorator-component-templates.d.ts +0 -0
  552. /package/{helpers/angular → hmr/frameworks/angular/build}/synthesize-decorator-ctor-parameters.d.ts +0 -0
  553. /package/{helpers/angular → hmr/frameworks/angular/build}/synthesize-injectable-factories.d.ts +0 -0
  554. /package/hmr/{server → frameworks/angular/server}/websocket-angular-entry.d.ts +0 -0
@@ -0,0 +1,323 @@
1
+ /**
2
+ * WebSocket transport — connect/reconnect candidate loop plus the connection
3
+ * overlay state machine ('connecting' / 'reconnecting' / 'synchronizing' /
4
+ * 'offline').
5
+ *
6
+ * Protocol handling is injected via `setHmrMessageHandler` (wired by the
7
+ * client entry) so this module knows nothing about message shapes; it only
8
+ * owns socket lifecycle and the "is the connection healthy" UX.
9
+ */
10
+ import { getHMRWsUrl, deriveHttpOrigin, setHttpOriginForVite, emitHmrModeBannerOnce, ENV_VERBOSE } from './utils.js';
11
+ import { getGlobalScope } from '../shared/runtime/global-scope.js';
12
+ import { getOverlayApi } from './overlay-driver.js';
13
+ import { getNsHotRegistry } from './hot-context.js';
14
+ const VERBOSE = ENV_VERBOSE;
15
+ function setConnectionOverlayStage(stage, detail) {
16
+ try {
17
+ const api = getOverlayApi();
18
+ if (api && typeof api.setConnectionStage === 'function') {
19
+ api.setConnectionStage(stage, { detail });
20
+ }
21
+ }
22
+ catch { }
23
+ }
24
+ function hideConnectionOverlay() {
25
+ try {
26
+ const api = getOverlayApi();
27
+ if (api && typeof api.hide === 'function') {
28
+ api.hide('healthy');
29
+ }
30
+ }
31
+ catch { }
32
+ }
33
+ let connectionOverlayTimer = null;
34
+ let connectionOverlayVisible = false;
35
+ let hasOpenedHmrSocket = false;
36
+ let awaitingHealthyHmrMessage = false;
37
+ let pendingConnectionOverlayStage = 'connecting';
38
+ let pendingConnectionOverlayDetail = '';
39
+ // The stage currently PAINTED on screen (set only when we actually show
40
+ // the overlay, not when we merely schedule it). Used to suppress the
41
+ // sub-perceptible offline↔reconnecting flicker during the reconnect
42
+ // retry loop — see the deferral in `connectHmr`/`tryNext`.
43
+ let shownConnectionOverlayStage = null;
44
+ // While the terminal 'offline' frame is showing, a fresh reconnect
45
+ // attempt that is refused near-instantly (the norm when the dev server
46
+ // is down — especially on the Android emulator, where connection-refused
47
+ // returns in ~1ms) would flip the overlay to 'reconnecting' and straight
48
+ // back to 'offline', producing a jarring 1-frame flicker. We defer the
49
+ // 'reconnecting' frame by this much so an instant failure (→ back to
50
+ // 'offline') or a success (→ 'synchronizing') cancels it before it ever
51
+ // paints; only a genuinely in-flight attempt surfaces 'reconnecting'.
52
+ // On iOS real connect attempts exceed this threshold, so the behaviour
53
+ // there is unchanged.
54
+ const RECONNECTING_OVER_OFFLINE_DELAY_MS = 500;
55
+ function clearConnectionOverlayTimer() {
56
+ if (connectionOverlayTimer) {
57
+ clearTimeout(connectionOverlayTimer);
58
+ connectionOverlayTimer = null;
59
+ }
60
+ }
61
+ function showConnectionOverlayNow(stage, detail) {
62
+ // Painting a stage now supersedes any scheduled (deferred) stage, so
63
+ // cancel the pending timer — otherwise a deferred 'reconnecting' could
64
+ // fire moments after we settle back on 'offline' and revive the flicker.
65
+ clearConnectionOverlayTimer();
66
+ pendingConnectionOverlayStage = stage;
67
+ pendingConnectionOverlayDetail = detail || '';
68
+ connectionOverlayVisible = true;
69
+ shownConnectionOverlayStage = stage;
70
+ setConnectionOverlayStage(stage, detail);
71
+ }
72
+ function scheduleConnectionOverlay(stage, detail, delayMs = 1200) {
73
+ pendingConnectionOverlayStage = stage;
74
+ pendingConnectionOverlayDetail = detail || '';
75
+ clearConnectionOverlayTimer();
76
+ connectionOverlayTimer = setTimeout(() => {
77
+ showConnectionOverlayNow(pendingConnectionOverlayStage, pendingConnectionOverlayDetail);
78
+ }, delayMs);
79
+ }
80
+ function updateConnectionOverlay(stage, detail) {
81
+ pendingConnectionOverlayStage = stage;
82
+ pendingConnectionOverlayDetail = detail || '';
83
+ if (connectionOverlayVisible) {
84
+ showConnectionOverlayNow(stage, detail);
85
+ }
86
+ }
87
+ function markHmrConnectionHealthy() {
88
+ awaitingHealthyHmrMessage = false;
89
+ clearConnectionOverlayTimer();
90
+ shownConnectionOverlayStage = null;
91
+ if (connectionOverlayVisible) {
92
+ connectionOverlayVisible = false;
93
+ hideConnectionOverlay();
94
+ }
95
+ }
96
+ /**
97
+ * Called by the protocol dispatcher for every parsed message. The first
98
+ * message after a (re)connect proves the pipe is healthy end-to-end, which is
99
+ * what dismisses the connection overlay — `onopen` alone doesn't (the server
100
+ * may accept the socket and still be mid-restart).
101
+ */
102
+ export function noteHealthyHmrMessage() {
103
+ if (awaitingHealthyHmrMessage) {
104
+ markHmrConnectionHealthy();
105
+ }
106
+ }
107
+ let hmrSocket = null;
108
+ let messageHandler = null;
109
+ /** Wire the protocol dispatcher. Must be set before `connectHmr()` runs. */
110
+ export function setHmrMessageHandler(handler) {
111
+ messageHandler = handler;
112
+ }
113
+ /** Best-effort send; silently drops when the socket isn't open. */
114
+ export function sendHmrMessage(payload) {
115
+ try {
116
+ hmrSocket?.send(JSON.stringify(payload));
117
+ }
118
+ catch { }
119
+ }
120
+ // Single reconnect timer. Overlapping close/timeout events used to each schedule
121
+ // their own `setTimeout(connectHmr, …)`, stacking multiple pending reconnects
122
+ // that could spawn (and leak) duplicate sockets/listeners. Route all reconnect
123
+ // scheduling through here so only one is ever pending.
124
+ let reconnectTimer = null;
125
+ function scheduleReconnect(delayMs) {
126
+ if (reconnectTimer)
127
+ clearTimeout(reconnectTimer);
128
+ reconnectTimer = setTimeout(() => {
129
+ reconnectTimer = null;
130
+ connectHmr();
131
+ }, delayMs);
132
+ }
133
+ export function connectHmr() {
134
+ if (hmrSocket?.readyState === WebSocket.OPEN)
135
+ return;
136
+ if (hmrSocket?.readyState === WebSocket.CONNECTING) {
137
+ if (VERBOSE)
138
+ console.log('[hmr-client] Already connecting to HMR WebSocket, skipping');
139
+ return;
140
+ }
141
+ // A reconnect fired (or a manual connect raced one) — cancel any other pending
142
+ // reconnect so we don't end up with overlapping connect attempts.
143
+ if (reconnectTimer) {
144
+ clearTimeout(reconnectTimer);
145
+ reconnectTimer = null;
146
+ }
147
+ try {
148
+ globalThis.__NS_HMR_CLIENT_SOCKET_READY__ = false;
149
+ }
150
+ catch { }
151
+ const overlayStage = hasOpenedHmrSocket ? 'reconnecting' : 'connecting';
152
+ const baseUrl = getHMRWsUrl() || 'ws://localhost:5173/ns-hmr';
153
+ const buildCandidates = (url) => {
154
+ const candidates = [];
155
+ try {
156
+ const u = new URL(url);
157
+ const proto = u.protocol === 'wss:' ? ['wss'] : ['ws'];
158
+ const defaultPort = u.port || '5173';
159
+ // Build ordered host candidates with preference to the active HTTP origin
160
+ const orderedHosts = [];
161
+ try {
162
+ const g = getGlobalScope();
163
+ const httpOrigin = g && typeof g.__NS_HTTP_ORIGIN__ === 'string' ? g.__NS_HTTP_ORIGIN__ : undefined;
164
+ if (httpOrigin) {
165
+ try {
166
+ const ho = new URL(httpOrigin);
167
+ orderedHosts.push({
168
+ host: ho.hostname,
169
+ port: ho.port || defaultPort,
170
+ });
171
+ }
172
+ catch { }
173
+ }
174
+ }
175
+ catch { }
176
+ // From provided URL
177
+ orderedHosts.push({ host: u.hostname, port: defaultPort });
178
+ // Explicit override
179
+ try {
180
+ const h = globalThis.__NS_HMR_HOST;
181
+ if (h)
182
+ orderedHosts.push({ host: String(h), port: defaultPort });
183
+ }
184
+ catch { }
185
+ // Common fallbacks
186
+ orderedHosts.push({ host: '10.0.2.2', port: defaultPort });
187
+ orderedHosts.push({ host: 'localhost', port: defaultPort });
188
+ const seen = new Set();
189
+ for (const p of proto) {
190
+ for (const { host, port } of orderedHosts) {
191
+ const key = `${host}:${port}`;
192
+ if (seen.has(key))
193
+ continue;
194
+ seen.add(key);
195
+ const cand = `${p}://${host}:${port}${u.pathname || '/ns-hmr'}${u.search || ''}`;
196
+ candidates.push(cand);
197
+ }
198
+ }
199
+ }
200
+ catch {
201
+ candidates.push(url);
202
+ }
203
+ // Deduplicate while preserving order
204
+ const seen = new Set();
205
+ return candidates.filter((c) => (seen.has(c) ? false : (seen.add(c), true)));
206
+ };
207
+ const candidates = buildCandidates(baseUrl);
208
+ let idx = 0;
209
+ const tryNext = () => {
210
+ if (idx >= candidates.length) {
211
+ showConnectionOverlayNow('offline', 'Waiting for the Vite websocket to come back.');
212
+ console.warn('[hmr-client] All WS candidates failed:', candidates.join(', '));
213
+ scheduleReconnect(1500);
214
+ return;
215
+ }
216
+ const url = candidates[idx++];
217
+ const connectionDetail = `${overlayStage === 'reconnecting' ? 'Retrying' : 'Opening'} ${url}`;
218
+ if (overlayStage === 'reconnecting' && shownConnectionOverlayStage === 'offline') {
219
+ // Don't flip the visible 'offline' frame to 'reconnecting' for an
220
+ // attempt that may fail instantly — defer it so only a genuinely
221
+ // in-flight attempt surfaces. The deferred show is cancelled by
222
+ // showConnectionOverlayNow (offline re-show / synchronizing) the
223
+ // moment this attempt resolves. Keeps 'offline' stable instead of
224
+ // flickering once per retry. (Checking the PAINTED stage, not the
225
+ // pending one, so every candidate in the loop keeps deferring.)
226
+ scheduleConnectionOverlay(overlayStage, connectionDetail, RECONNECTING_OVER_OFFLINE_DELAY_MS);
227
+ }
228
+ else if (connectionOverlayVisible) {
229
+ updateConnectionOverlay(overlayStage, connectionDetail);
230
+ }
231
+ else {
232
+ scheduleConnectionOverlay(overlayStage, connectionDetail);
233
+ }
234
+ try {
235
+ if (VERBOSE)
236
+ console.log('[hmr-client] Connecting to HMR WebSocket:', url);
237
+ const sock = new WebSocket(url);
238
+ hmrSocket = sock;
239
+ setHttpOriginForVite(deriveHttpOrigin(url));
240
+ let opened = false;
241
+ const timeout = setTimeout(() => {
242
+ if (!opened && sock.readyState !== WebSocket.OPEN) {
243
+ try {
244
+ sock.close();
245
+ }
246
+ catch { }
247
+ if (VERBOSE)
248
+ console.warn('[hmr-client] WS connect timeout, trying next…');
249
+ tryNext();
250
+ }
251
+ }, 3500);
252
+ sock.onopen = () => {
253
+ opened = true;
254
+ clearTimeout(timeout);
255
+ clearConnectionOverlayTimer();
256
+ hasOpenedHmrSocket = true;
257
+ awaitingHealthyHmrMessage = true;
258
+ try {
259
+ globalThis.__NS_HMR_CLIENT_SOCKET_READY__ = true;
260
+ }
261
+ catch { }
262
+ // Wire the JS hot registry's server channel to this socket so
263
+ // `import.meta.hot.send(event, data)` reaches Vite plugins as
264
+ // `{ type: 'custom', event, data }` (Vite wire protocol).
265
+ try {
266
+ getNsHotRegistry().setSendToServer((event, data) => {
267
+ try {
268
+ if (sock.readyState === WebSocket.OPEN) {
269
+ sock.send(JSON.stringify({ type: 'custom', event, data }));
270
+ }
271
+ }
272
+ catch { }
273
+ });
274
+ }
275
+ catch { }
276
+ if (connectionOverlayVisible) {
277
+ showConnectionOverlayNow('synchronizing', 'Connected. Synchronizing the HMR graph.');
278
+ }
279
+ if (VERBOSE)
280
+ console.log('[hmr-client] Connected to HMR WebSocket');
281
+ // Print the active module reload mode once on first
282
+ // successful connect so the user can correlate HMR latency
283
+ // with runtime capability without grepping for protocol
284
+ // details. The banner is verbose-gated.
285
+ try {
286
+ emitHmrModeBannerOnce();
287
+ }
288
+ catch { }
289
+ };
290
+ sock.onmessage = (ev) => messageHandler?.(ev);
291
+ sock.onerror = (error) => {
292
+ clearTimeout(timeout);
293
+ console.warn('[hmr-client] WebSocket error:', (error && (error.message || error)) || error);
294
+ };
295
+ sock.onclose = (ev) => {
296
+ clearTimeout(timeout);
297
+ try {
298
+ globalThis.__NS_HMR_CLIENT_SOCKET_READY__ = false;
299
+ }
300
+ catch { }
301
+ if (!opened) {
302
+ // immediate failure during connect → try another candidate
303
+ if (VERBOSE)
304
+ console.warn('[hmr-client] WS close before open (code', ev?.code, '), trying next…');
305
+ tryNext();
306
+ }
307
+ else {
308
+ if (VERBOSE)
309
+ console.log('[hmr-client] WebSocket closed (code', ev?.code, '), will reconnect…');
310
+ scheduleConnectionOverlay('reconnecting', 'The websocket closed. Waiting to reconnect.', 700);
311
+ // try to reconnect with full candidate list again
312
+ scheduleReconnect(1000);
313
+ }
314
+ };
315
+ }
316
+ catch (e) {
317
+ console.warn('[hmr-client] Failed to connect WebSocket', e);
318
+ tryNext();
319
+ }
320
+ };
321
+ tryNext();
322
+ }
323
+ //# sourceMappingURL=ws-transport.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ws-transport.js","sourceRoot":"","sources":["../../../../../packages/vite/hmr/client/ws-transport.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,EAAE,WAAW,EAAE,gBAAgB,EAAE,oBAAoB,EAAE,qBAAqB,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AACrH,OAA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AM,CAAC,CAAA,CAAC;gBACV,IAAI,CAAC,MAAM,EAAE,CAAC;oBACb,2DAA2D;oBAC3D,IAAI,OAAO;wBAAE,OAAO,CAAC,IAAI,CAAC,yCAAyC,EAAE,EAAE,EAAE,IAAI,EAAE,iBAAiB,CAAC,CAAC;oBAClG,OAAO,EAAE,CAAC;gBACX,CAAC;qBAAM,CAAC;oBACP,IAAI,OAAO;wBAAE,OAAO,CAAC,GAAG,CAAC,qCAAqC,EAAE,EAAE,EAAE,IAAI,EAAE,oBAAoB,CAAC,CAAC;oBAChG,yBAAyB,CAAC,cAAc,EAAE,6CAA6C,EAAE,GAAG,CAAC,CAAC;oBAC9F,kDAAkD;oBAClD,iBAAiB,CAAC,IAAI,CAAC,CAAC;gBACzB,CAAC;YACF,CAAC,CAAC;QACH,CAAC;QAAC,OAAO,CAAC,EAAE,CAAC;YACZ,OAAO,CAAC,IAAI,CAAC,0CAA0C,EAAE,CAAC,CAAC,CAAC;YAC5D,OAAO,EAAE,CAAC;QACX,CAAC;IACF,CAAC,CAAC;IAEF,OAAO,EAAE,CAAC;AACX,CAAC"}
@@ -12,7 +12,8 @@ type HttpPreloadResult = {
12
12
  url: string;
13
13
  err?: string;
14
14
  };
15
+ export declare const APP_CSS_TAG = "app.css";
15
16
  export declare function installHttpCoreCssSupport(coreModule: any, verbose?: boolean): HmrCssApplier | null;
16
- export declare function preloadHttpCoreStyleScope(importHttp: HttpImportFn, origin: string, ver: string | number, verbose?: boolean): Promise<HttpPreloadResult>;
17
+ export declare function preloadHttpCoreStyleScope(importHttp: HttpImportFn, origin: string, verbose?: boolean): Promise<HttpPreloadResult>;
17
18
  export default function startEntry(opts: EntryOpts): Promise<void>;
18
19
  export {};