@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.
- package/README.md +51 -11
- package/bin/cli.cjs +8 -14
- package/configuration/angular.d.ts +34 -1
- package/configuration/angular.js +293 -172
- package/configuration/angular.js.map +1 -1
- package/configuration/base.js +177 -110
- package/configuration/base.js.map +1 -1
- package/configuration/javascript.js +14 -93
- package/configuration/javascript.js.map +1 -1
- package/configuration/react.js +41 -73
- package/configuration/react.js.map +1 -1
- package/configuration/solid.js +51 -6
- package/configuration/solid.js.map +1 -1
- package/configuration/typescript.js +12 -93
- package/configuration/typescript.js.map +1 -1
- package/helpers/app-components.d.ts +2 -1
- package/helpers/app-components.js.map +1 -1
- package/helpers/app-css-refresh.d.ts +31 -0
- package/helpers/app-css-refresh.js +43 -0
- package/helpers/app-css-refresh.js.map +1 -0
- package/helpers/app-css-state.d.ts +17 -0
- package/helpers/app-css-state.js +51 -0
- package/helpers/app-css-state.js.map +1 -0
- package/helpers/bundler-context.d.ts +11 -0
- package/helpers/bundler-context.js +71 -0
- package/helpers/bundler-context.js.map +1 -0
- package/helpers/cli-flags.d.ts +12 -0
- package/helpers/cli-flags.js +34 -0
- package/helpers/cli-flags.js.map +1 -1
- package/helpers/css-platform-plugin.d.ts +14 -0
- package/helpers/css-platform-plugin.js +43 -25
- package/helpers/css-platform-plugin.js.map +1 -1
- package/helpers/dev-host.d.ts +360 -0
- package/helpers/dev-host.js +694 -0
- package/helpers/dev-host.js.map +1 -0
- package/helpers/dynamic-import-plugin.js +9 -4
- package/helpers/dynamic-import-plugin.js.map +1 -1
- package/helpers/esbuild-platform-resolver.js +4 -1
- package/helpers/esbuild-platform-resolver.js.map +1 -1
- package/helpers/external-configs.d.ts +10 -12
- package/helpers/external-configs.js +58 -35
- package/helpers/external-configs.js.map +1 -1
- package/helpers/flavor.d.ts +13 -0
- package/helpers/flavor.js +17 -0
- package/helpers/flavor.js.map +1 -1
- package/helpers/global-defines.d.ts +101 -33
- package/helpers/global-defines.js +187 -64
- package/helpers/global-defines.js.map +1 -1
- package/helpers/hmr-scope.d.ts +26 -0
- package/helpers/hmr-scope.js +67 -0
- package/helpers/hmr-scope.js.map +1 -0
- package/helpers/init.js +0 -18
- package/helpers/init.js.map +1 -1
- package/helpers/logging.js +29 -1
- package/helpers/logging.js.map +1 -1
- package/helpers/main-entry.d.ts +4 -1
- package/helpers/main-entry.js +366 -47
- package/helpers/main-entry.js.map +1 -1
- package/helpers/nativeclass-esbuild-plugin.d.ts +2 -1
- package/helpers/nativeclass-esbuild-plugin.js +6 -1
- package/helpers/nativeclass-esbuild-plugin.js.map +1 -1
- package/helpers/nativeclass-transform.d.ts +13 -0
- package/helpers/nativeclass-transform.js +37 -7
- package/helpers/nativeclass-transform.js.map +1 -1
- package/helpers/nativeclass-transformer-plugin.d.ts +9 -2
- package/helpers/nativeclass-transformer-plugin.js +163 -15
- package/helpers/nativeclass-transformer-plugin.js.map +1 -1
- package/helpers/nativescript-package-resolver.js +10 -62
- package/helpers/nativescript-package-resolver.js.map +1 -1
- package/helpers/normalize-id.d.ts +42 -0
- package/helpers/normalize-id.js +60 -0
- package/helpers/normalize-id.js.map +1 -0
- package/helpers/ns-core-external-urls.d.ts +32 -0
- package/helpers/ns-core-external-urls.js +107 -0
- package/helpers/ns-core-external-urls.js.map +1 -0
- package/helpers/ns-core-url.d.ts +26 -3
- package/helpers/ns-core-url.js +66 -8
- package/helpers/ns-core-url.js.map +1 -1
- package/helpers/optimize-deps.d.ts +16 -0
- package/helpers/optimize-deps.js +17 -0
- package/helpers/optimize-deps.js.map +1 -0
- package/helpers/package-platform-aliases.js +34 -49
- package/helpers/package-platform-aliases.js.map +1 -1
- package/helpers/platform-types.d.ts +2 -0
- package/helpers/platform-types.js +2 -0
- package/helpers/platform-types.js.map +1 -0
- package/helpers/postcss-platform-config.d.ts +17 -1
- package/helpers/postcss-platform-config.js +20 -37
- package/helpers/postcss-platform-config.js.map +1 -1
- package/helpers/project.d.ts +35 -0
- package/helpers/project.js +120 -2
- package/helpers/project.js.map +1 -1
- package/helpers/resolve-main-field-platform.d.ts +20 -0
- package/helpers/resolve-main-field-platform.js +49 -0
- package/helpers/resolve-main-field-platform.js.map +1 -0
- package/helpers/resolver.js +17 -2
- package/helpers/resolver.js.map +1 -1
- package/helpers/theme-core-plugins.js +1 -1
- package/helpers/theme-core-plugins.js.map +1 -1
- package/helpers/ts-config-paths.d.ts +32 -0
- package/helpers/ts-config-paths.js +156 -27
- package/helpers/ts-config-paths.js.map +1 -1
- package/helpers/typescript-check.d.ts +2 -1
- package/helpers/typescript-check.js +4 -4
- package/helpers/typescript-check.js.map +1 -1
- package/helpers/ui-registration.d.ts +21 -0
- package/helpers/ui-registration.js +156 -0
- package/helpers/ui-registration.js.map +1 -0
- package/helpers/utils.d.ts +9 -0
- package/helpers/utils.js +22 -2
- package/helpers/utils.js.map +1 -1
- package/helpers/vite-package-version.d.ts +7 -0
- package/helpers/vite-package-version.js +44 -0
- package/helpers/vite-package-version.js.map +1 -0
- package/helpers/workers.d.ts +40 -19
- package/helpers/workers.js +324 -13
- package/helpers/workers.js.map +1 -1
- package/hmr/client/css-handler.d.ts +2 -1
- package/hmr/client/css-handler.js +63 -32
- package/hmr/client/css-handler.js.map +1 -1
- package/hmr/client/css-update-overlay.d.ts +18 -0
- package/hmr/client/css-update-overlay.js +27 -0
- package/hmr/client/css-update-overlay.js.map +1 -0
- package/hmr/client/framework-client-strategy.d.ts +87 -0
- package/hmr/client/framework-client-strategy.js +18 -0
- package/hmr/client/framework-client-strategy.js.map +1 -0
- package/hmr/client/hmr-pending-overlay.d.ts +0 -14
- package/hmr/client/hmr-pending-overlay.js +2 -11
- package/hmr/client/hmr-pending-overlay.js.map +1 -1
- package/hmr/client/hot-context.d.ts +67 -0
- package/hmr/client/hot-context.js +307 -0
- package/hmr/client/hot-context.js.map +1 -0
- package/hmr/client/index.d.ts +9 -1
- package/hmr/client/index.js +70 -1970
- package/hmr/client/index.js.map +1 -1
- package/hmr/client/overlay-driver.d.ts +10 -0
- package/hmr/client/overlay-driver.js +33 -0
- package/hmr/client/overlay-driver.js.map +1 -0
- package/hmr/client/protocol-dispatch.d.ts +8 -0
- package/hmr/client/protocol-dispatch.js +308 -0
- package/hmr/client/protocol-dispatch.js.map +1 -0
- package/hmr/client/root-reset.d.ts +15 -0
- package/hmr/client/root-reset.js +358 -0
- package/hmr/client/root-reset.js.map +1 -0
- package/hmr/client/strategy-loader.d.ts +24 -0
- package/hmr/client/strategy-loader.js +83 -0
- package/hmr/client/strategy-loader.js.map +1 -0
- package/hmr/client/update-pipeline.d.ts +27 -0
- package/hmr/client/update-pipeline.js +464 -0
- package/hmr/client/update-pipeline.js.map +1 -0
- package/hmr/client/utils.d.ts +9 -1
- package/hmr/client/utils.js +117 -97
- package/hmr/client/utils.js.map +1 -1
- package/hmr/client/ws-transport.d.ts +21 -0
- package/hmr/client/ws-transport.js +323 -0
- package/hmr/client/ws-transport.js.map +1 -0
- package/hmr/entry-runtime.d.ts +2 -1
- package/hmr/entry-runtime.js +282 -71
- package/hmr/entry-runtime.js.map +1 -1
- package/hmr/frameworks/angular/build/angular-linker.d.ts +12 -0
- package/hmr/frameworks/angular/build/angular-linker.js +113 -0
- package/hmr/frameworks/angular/build/angular-linker.js.map +1 -0
- package/hmr/frameworks/angular/build/inject-component-hmr-registration.d.ts +112 -0
- package/hmr/frameworks/angular/build/inject-component-hmr-registration.js +291 -0
- package/hmr/frameworks/angular/build/inject-component-hmr-registration.js.map +1 -0
- package/hmr/frameworks/angular/build/inject-hmr-vite-ignore.d.ts +75 -0
- package/hmr/frameworks/angular/build/inject-hmr-vite-ignore.js +221 -0
- package/hmr/frameworks/angular/build/inject-hmr-vite-ignore.js.map +1 -0
- package/{helpers/angular → hmr/frameworks/angular/build}/inline-decorator-component-templates.js +1 -170
- package/hmr/frameworks/angular/build/inline-decorator-component-templates.js.map +1 -0
- package/hmr/frameworks/angular/build/js-lexer.d.ts +4 -0
- package/{helpers/angular/synthesize-decorator-ctor-parameters.js → hmr/frameworks/angular/build/js-lexer.js} +22 -96
- package/hmr/frameworks/angular/build/js-lexer.js.map +1 -0
- package/hmr/frameworks/angular/build/linker-stats.d.ts +18 -0
- package/hmr/frameworks/angular/build/linker-stats.js +29 -0
- package/hmr/frameworks/angular/build/linker-stats.js.map +1 -0
- package/hmr/frameworks/angular/build/shared-linker.d.ts +39 -0
- package/hmr/frameworks/angular/build/shared-linker.js +128 -0
- package/hmr/frameworks/angular/build/shared-linker.js.map +1 -0
- package/hmr/frameworks/angular/build/synthesize-decorator-ctor-parameters.js +88 -0
- package/hmr/frameworks/angular/build/synthesize-decorator-ctor-parameters.js.map +1 -0
- package/{helpers/angular → hmr/frameworks/angular/build}/synthesize-injectable-factories.js +1 -174
- package/hmr/frameworks/angular/build/synthesize-injectable-factories.js.map +1 -0
- package/hmr/frameworks/angular/build/ts-fallback-transform.d.ts +5 -0
- package/hmr/frameworks/angular/build/ts-fallback-transform.js +138 -0
- package/hmr/frameworks/angular/build/ts-fallback-transform.js.map +1 -0
- package/{helpers/angular → hmr/frameworks/angular/build}/util.d.ts +1 -0
- package/hmr/frameworks/angular/build/util.js +155 -0
- package/hmr/frameworks/angular/build/util.js.map +1 -0
- package/hmr/frameworks/angular/build/worker-url-preserve.d.ts +5 -0
- package/hmr/frameworks/angular/build/worker-url-preserve.js +140 -0
- package/hmr/frameworks/angular/build/worker-url-preserve.js.map +1 -0
- package/hmr/frameworks/angular/client/index.d.ts +0 -1
- package/hmr/frameworks/angular/client/index.js +459 -223
- package/hmr/frameworks/angular/client/index.js.map +1 -1
- package/hmr/frameworks/angular/client/strategy.d.ts +9 -0
- package/hmr/frameworks/angular/client/strategy.js +19 -0
- package/hmr/frameworks/angular/client/strategy.js.map +1 -0
- package/hmr/frameworks/angular/server/angular-root-component.d.ts +79 -0
- package/hmr/frameworks/angular/server/angular-root-component.js +149 -0
- package/hmr/frameworks/angular/server/angular-root-component.js.map +1 -0
- package/hmr/frameworks/angular/server/linker.js +1 -4
- package/hmr/frameworks/angular/server/linker.js.map +1 -1
- package/hmr/frameworks/angular/server/ng-component-route.d.ts +43 -0
- package/hmr/frameworks/angular/server/ng-component-route.js +113 -0
- package/hmr/frameworks/angular/server/ng-component-route.js.map +1 -0
- package/hmr/frameworks/angular/server/strategy.js +677 -13
- package/hmr/frameworks/angular/server/strategy.js.map +1 -1
- package/hmr/{server → frameworks/angular/server}/websocket-angular-entry.js +2 -2
- package/hmr/frameworks/angular/server/websocket-angular-entry.js.map +1 -0
- package/hmr/{server → frameworks/angular/server}/websocket-angular-hot-update.d.ts +28 -11
- package/hmr/{server → frameworks/angular/server}/websocket-angular-hot-update.js +191 -105
- package/hmr/frameworks/angular/server/websocket-angular-hot-update.js.map +1 -0
- package/hmr/frameworks/react/client/strategy.d.ts +12 -0
- package/hmr/frameworks/react/client/strategy.js +27 -0
- package/hmr/frameworks/react/client/strategy.js.map +1 -0
- package/hmr/frameworks/react/server/strategy.d.ts +2 -0
- package/hmr/frameworks/react/server/strategy.js +230 -0
- package/hmr/frameworks/react/server/strategy.js.map +1 -0
- package/hmr/frameworks/solid/build/solid-jsx-deps.d.ts +15 -0
- package/hmr/frameworks/solid/build/solid-jsx-deps.js +178 -0
- package/hmr/frameworks/solid/build/solid-jsx-deps.js.map +1 -0
- package/hmr/frameworks/solid/client/app-runtime.d.ts +68 -0
- package/hmr/frameworks/solid/client/app-runtime.js +252 -0
- package/hmr/frameworks/solid/client/app-runtime.js.map +1 -0
- package/hmr/frameworks/solid/client/strategy.d.ts +7 -0
- package/hmr/frameworks/solid/client/strategy.js +391 -0
- package/hmr/frameworks/solid/client/strategy.js.map +1 -0
- package/hmr/frameworks/solid/server/strategy.js +293 -16
- package/hmr/frameworks/solid/server/strategy.js.map +1 -1
- package/hmr/frameworks/typescript/client/strategy.d.ts +7 -0
- package/hmr/frameworks/typescript/client/strategy.js +418 -0
- package/hmr/frameworks/typescript/client/strategy.js.map +1 -0
- package/hmr/frameworks/typescript/server/strategy.js +40 -14
- package/hmr/frameworks/typescript/server/strategy.js.map +1 -1
- package/hmr/frameworks/vue/client/dep-propagation.d.ts +44 -0
- package/hmr/frameworks/vue/client/dep-propagation.js +148 -0
- package/hmr/frameworks/vue/client/dep-propagation.js.map +1 -0
- package/hmr/frameworks/vue/client/index.d.ts +10 -1
- package/hmr/frameworks/vue/client/index.js +287 -562
- package/hmr/frameworks/vue/client/index.js.map +1 -1
- package/hmr/frameworks/vue/client/navigate-app.d.ts +3 -0
- package/hmr/frameworks/vue/client/navigate-app.js +178 -0
- package/hmr/frameworks/vue/client/navigate-app.js.map +1 -0
- package/hmr/frameworks/vue/client/strategy.d.ts +33 -0
- package/hmr/frameworks/vue/client/strategy.js +152 -0
- package/hmr/frameworks/vue/client/strategy.js.map +1 -0
- package/hmr/frameworks/vue/client/vue-sfc-update-overlay.d.ts +49 -0
- package/hmr/frameworks/vue/client/vue-sfc-update-overlay.js +124 -0
- package/hmr/frameworks/vue/client/vue-sfc-update-overlay.js.map +1 -0
- package/hmr/frameworks/vue/server/compiler.d.ts +3 -1
- package/hmr/frameworks/vue/server/compiler.js +3 -1
- package/hmr/frameworks/vue/server/compiler.js.map +1 -1
- package/hmr/frameworks/vue/server/sfc-route-assemble.d.ts +7 -0
- package/hmr/frameworks/vue/server/sfc-route-assemble.js +823 -0
- package/hmr/frameworks/vue/server/sfc-route-assemble.js.map +1 -0
- package/hmr/frameworks/vue/server/sfc-route-meta.d.ts +7 -0
- package/hmr/frameworks/vue/server/sfc-route-meta.js +80 -0
- package/hmr/frameworks/vue/server/sfc-route-meta.js.map +1 -0
- package/hmr/frameworks/vue/server/sfc-route-serve.d.ts +8 -0
- package/hmr/frameworks/vue/server/sfc-route-serve.js +462 -0
- package/hmr/frameworks/vue/server/sfc-route-serve.js.map +1 -0
- package/hmr/frameworks/vue/server/sfc-route-shared.d.ts +45 -0
- package/hmr/frameworks/vue/server/sfc-route-shared.js +105 -0
- package/hmr/frameworks/vue/server/sfc-route-shared.js.map +1 -0
- package/hmr/frameworks/vue/server/strategy.d.ts +35 -0
- package/hmr/frameworks/vue/server/strategy.js +291 -7
- package/hmr/frameworks/vue/server/strategy.js.map +1 -1
- package/hmr/frameworks/vue/server/websocket-sfc.d.ts +15 -0
- package/hmr/frameworks/vue/server/websocket-sfc.js +20 -0
- package/hmr/frameworks/vue/server/websocket-sfc.js.map +1 -0
- package/hmr/helpers/ast-normalizer.d.ts +3 -1
- package/hmr/helpers/ast-normalizer.js +109 -14
- package/hmr/helpers/ast-normalizer.js.map +1 -1
- package/hmr/helpers/cjs-named-exports.d.ts +23 -0
- package/hmr/helpers/cjs-named-exports.js +152 -0
- package/hmr/helpers/cjs-named-exports.js.map +1 -0
- package/hmr/helpers/package-exports.d.ts +16 -0
- package/hmr/helpers/package-exports.js +396 -0
- package/hmr/helpers/package-exports.js.map +1 -0
- package/hmr/helpers/vendor-rewrite.d.ts +1 -1
- package/hmr/helpers/vendor-rewrite.js +5 -3
- package/hmr/helpers/vendor-rewrite.js.map +1 -1
- package/hmr/server/boot-recording.d.ts +51 -0
- package/hmr/server/boot-recording.js +214 -0
- package/hmr/server/boot-recording.js.map +1 -0
- package/hmr/server/constants.js +20 -5
- package/hmr/server/constants.js.map +1 -1
- package/hmr/server/content-css-update.d.ts +54 -0
- package/hmr/server/content-css-update.js +78 -0
- package/hmr/server/content-css-update.js.map +1 -0
- package/hmr/server/core-bundle.d.ts +140 -0
- package/hmr/server/core-bundle.js +614 -0
- package/hmr/server/core-bundle.js.map +1 -0
- package/hmr/server/core-sanitize.d.ts +86 -7
- package/hmr/server/core-sanitize.js +164 -39
- package/hmr/server/core-sanitize.js.map +1 -1
- package/hmr/server/css-connect-sync.d.ts +28 -0
- package/hmr/server/css-connect-sync.js +59 -0
- package/hmr/server/css-connect-sync.js.map +1 -0
- package/hmr/server/css-device-module.d.ts +28 -0
- package/hmr/server/css-device-module.js +44 -0
- package/hmr/server/css-device-module.js.map +1 -0
- package/hmr/server/css-update-message.d.ts +23 -0
- package/hmr/server/css-update-message.js +41 -0
- package/hmr/server/css-update-message.js.map +1 -0
- package/hmr/server/deps-bundle.d.ts +233 -0
- package/hmr/server/deps-bundle.js +1022 -0
- package/hmr/server/deps-bundle.js.map +1 -0
- package/hmr/server/device-transform-helpers.d.ts +24 -0
- package/hmr/server/device-transform-helpers.js +408 -0
- package/hmr/server/device-transform-helpers.js.map +1 -0
- package/hmr/server/framework-strategy.d.ts +182 -11
- package/hmr/server/hmr-module-graph.d.ts +37 -0
- package/hmr/server/hmr-module-graph.js +215 -0
- package/hmr/server/hmr-module-graph.js.map +1 -0
- package/hmr/server/import-map.d.ts +51 -19
- package/hmr/server/import-map.js +136 -66
- package/hmr/server/import-map.js.map +1 -1
- package/hmr/server/index.js +7 -16
- package/hmr/server/index.js.map +1 -1
- package/hmr/server/node-builtins-route.d.ts +12 -0
- package/hmr/server/node-builtins-route.js +86 -0
- package/hmr/server/node-builtins-route.js.map +1 -0
- package/hmr/server/ns-core-cjs-shape.js +1 -1
- package/hmr/server/ns-core-cjs-shape.js.map +1 -1
- package/hmr/server/ns-m-response-memo.d.ts +10 -0
- package/hmr/server/ns-m-response-memo.js +33 -0
- package/hmr/server/ns-m-response-memo.js.map +1 -0
- package/hmr/server/ns-rt-bridge.d.ts +51 -0
- package/hmr/server/ns-rt-bridge.js +131 -0
- package/hmr/server/ns-rt-bridge.js.map +1 -0
- package/hmr/server/ns-rt-route.d.ts +5 -0
- package/hmr/server/ns-rt-route.js +39 -0
- package/hmr/server/ns-rt-route.js.map +1 -0
- package/hmr/server/perf-instrumentation.d.ts +1 -1
- package/hmr/server/perf-instrumentation.js +3 -1
- package/hmr/server/perf-instrumentation.js.map +1 -1
- package/hmr/server/process-code-for-device.d.ts +44 -0
- package/hmr/server/process-code-for-device.js +834 -0
- package/hmr/server/process-code-for-device.js.map +1 -0
- package/hmr/server/require-guard.d.ts +1 -0
- package/hmr/server/require-guard.js +12 -0
- package/hmr/server/require-guard.js.map +1 -0
- package/hmr/server/rewrite-imports.d.ts +2 -0
- package/hmr/server/rewrite-imports.js +631 -0
- package/hmr/server/rewrite-imports.js.map +1 -0
- package/hmr/server/route-helpers.d.ts +7 -0
- package/hmr/server/route-helpers.js +13 -0
- package/hmr/server/route-helpers.js.map +1 -0
- package/hmr/server/runtime-graph-filter.js +8 -1
- package/hmr/server/runtime-graph-filter.js.map +1 -1
- package/hmr/server/server-origin.d.ts +2 -0
- package/hmr/server/server-origin.js +88 -0
- package/hmr/server/server-origin.js.map +1 -0
- package/hmr/server/shared-transform-request.js +1 -2
- package/hmr/server/shared-transform-request.js.map +1 -1
- package/hmr/server/socket-utils.d.ts +10 -0
- package/hmr/server/socket-utils.js +14 -0
- package/hmr/server/socket-utils.js.map +1 -0
- package/hmr/server/transform-cache-invalidation.d.ts +37 -0
- package/hmr/server/transform-cache-invalidation.js +156 -0
- package/hmr/server/transform-cache-invalidation.js.map +1 -0
- package/hmr/server/vendor-bare-module-shims.d.ts +4 -0
- package/hmr/server/vendor-bare-module-shims.js +80 -0
- package/hmr/server/vendor-bare-module-shims.js.map +1 -0
- package/hmr/server/vite-plugin.d.ts +1 -0
- package/hmr/server/vite-plugin.js +227 -53
- package/hmr/server/vite-plugin.js.map +1 -1
- package/hmr/server/websocket-core-bridge.d.ts +51 -4
- package/hmr/server/websocket-core-bridge.js +62 -49
- package/hmr/server/websocket-core-bridge.js.map +1 -1
- package/hmr/server/websocket-device-transform.d.ts +3 -0
- package/hmr/server/websocket-device-transform.js +7 -0
- package/hmr/server/websocket-device-transform.js.map +1 -0
- package/hmr/server/websocket-hmr-pending.d.ts +2 -16
- package/hmr/server/websocket-hmr-pending.js +0 -22
- package/hmr/server/websocket-hmr-pending.js.map +1 -1
- package/hmr/server/websocket-hot-update.d.ts +80 -0
- package/hmr/server/websocket-hot-update.js +295 -0
- package/hmr/server/websocket-hot-update.js.map +1 -0
- package/hmr/server/websocket-import-map-route.d.ts +15 -0
- package/hmr/server/websocket-import-map-route.js +51 -0
- package/hmr/server/websocket-import-map-route.js.map +1 -0
- package/hmr/server/websocket-module-bindings.d.ts +15 -0
- package/hmr/server/websocket-module-bindings.js +38 -5
- package/hmr/server/websocket-module-bindings.js.map +1 -1
- package/hmr/server/websocket-module-specifiers.d.ts +66 -7
- package/hmr/server/websocket-module-specifiers.js +219 -49
- package/hmr/server/websocket-module-specifiers.js.map +1 -1
- package/hmr/server/websocket-ns-core.d.ts +34 -0
- package/hmr/server/websocket-ns-core.js +414 -0
- package/hmr/server/websocket-ns-core.js.map +1 -0
- package/hmr/server/websocket-ns-entry.d.ts +21 -0
- package/hmr/server/websocket-ns-entry.js +164 -0
- package/hmr/server/websocket-ns-entry.js.map +1 -0
- package/hmr/server/websocket-ns-m-paths.d.ts +19 -3
- package/hmr/server/websocket-ns-m-paths.js +98 -75
- package/hmr/server/websocket-ns-m-paths.js.map +1 -1
- package/hmr/server/websocket-ns-m-request.d.ts +13 -2
- package/hmr/server/websocket-ns-m-request.js +20 -11
- package/hmr/server/websocket-ns-m-request.js.map +1 -1
- package/hmr/server/websocket-ns-m.d.ts +52 -0
- package/hmr/server/websocket-ns-m.js +590 -0
- package/hmr/server/websocket-ns-m.js.map +1 -0
- package/hmr/server/websocket-served-module-helpers.d.ts +57 -4
- package/hmr/server/websocket-served-module-helpers.js +462 -141
- package/hmr/server/websocket-served-module-helpers.js.map +1 -1
- package/hmr/server/websocket-txn.js +6 -9
- package/hmr/server/websocket-txn.js.map +1 -1
- package/hmr/server/websocket-vendor-unifier.d.ts +0 -1
- package/hmr/server/websocket-vendor-unifier.js +4 -9
- package/hmr/server/websocket-vendor-unifier.js.map +1 -1
- package/hmr/server/websocket.d.ts +7 -40
- package/hmr/server/websocket.js +653 -6734
- package/hmr/server/websocket.js.map +1 -1
- package/hmr/shared/ns-globals.d.ts +106 -0
- package/hmr/shared/ns-globals.js +29 -0
- package/hmr/shared/ns-globals.js.map +1 -0
- package/hmr/shared/protocol.d.ts +157 -0
- package/hmr/shared/protocol.js +28 -0
- package/hmr/shared/protocol.js.map +1 -0
- package/hmr/shared/runtime/boot-complete.d.ts +14 -0
- package/hmr/shared/runtime/boot-complete.js +32 -0
- package/hmr/shared/runtime/boot-complete.js.map +1 -0
- package/hmr/shared/runtime/boot-placeholder-ui.d.ts +69 -0
- package/hmr/shared/runtime/boot-placeholder-ui.js +101 -0
- package/hmr/shared/runtime/boot-placeholder-ui.js.map +1 -0
- package/hmr/shared/runtime/boot-progress.d.ts +44 -0
- package/hmr/shared/runtime/boot-progress.js +134 -0
- package/hmr/shared/runtime/boot-progress.js.map +1 -0
- package/hmr/shared/runtime/boot-timeline.d.ts +1 -1
- package/hmr/shared/runtime/boot-timeline.js +8 -19
- package/hmr/shared/runtime/boot-timeline.js.map +1 -1
- package/hmr/shared/runtime/browser-runtime-contract.d.ts +43 -24
- package/hmr/shared/runtime/browser-runtime-contract.js +21 -9
- package/hmr/shared/runtime/browser-runtime-contract.js.map +1 -1
- package/hmr/shared/runtime/dev-overlay-ios.d.ts +87 -0
- package/hmr/shared/runtime/dev-overlay-ios.js +521 -0
- package/hmr/shared/runtime/dev-overlay-ios.js.map +1 -0
- package/hmr/shared/runtime/dev-overlay-shared.d.ts +58 -0
- package/hmr/shared/runtime/dev-overlay-shared.js +116 -0
- package/hmr/shared/runtime/dev-overlay-shared.js.map +1 -0
- package/hmr/shared/runtime/dev-overlay-snapshots.d.ts +31 -0
- package/hmr/shared/runtime/dev-overlay-snapshots.js +324 -0
- package/hmr/shared/runtime/dev-overlay-snapshots.js.map +1 -0
- package/hmr/shared/runtime/dev-overlay-tree.d.ts +59 -0
- package/hmr/shared/runtime/dev-overlay-tree.js +712 -0
- package/hmr/shared/runtime/dev-overlay-tree.js.map +1 -0
- package/hmr/shared/runtime/dev-overlay.d.ts +23 -69
- package/hmr/shared/runtime/dev-overlay.js +67 -1023
- package/hmr/shared/runtime/dev-overlay.js.map +1 -1
- package/hmr/shared/runtime/global-scope.d.ts +18 -0
- package/hmr/shared/runtime/global-scope.js +21 -0
- package/hmr/shared/runtime/global-scope.js.map +1 -0
- package/hmr/shared/runtime/hooks.js +2 -1
- package/hmr/shared/runtime/hooks.js.map +1 -1
- package/hmr/shared/runtime/launch-bridge.d.ts +9 -0
- package/hmr/shared/runtime/launch-bridge.js +98 -0
- package/hmr/shared/runtime/launch-bridge.js.map +1 -0
- package/hmr/shared/runtime/module-provenance.js +4 -6
- package/hmr/shared/runtime/module-provenance.js.map +1 -1
- package/hmr/shared/runtime/ns-runtime-test-double.d.ts +21 -0
- package/hmr/shared/runtime/ns-runtime-test-double.js +20 -0
- package/hmr/shared/runtime/ns-runtime-test-double.js.map +1 -0
- package/hmr/shared/runtime/overlay-flag.d.ts +9 -0
- package/hmr/shared/runtime/overlay-flag.js +34 -0
- package/hmr/shared/runtime/overlay-flag.js.map +1 -0
- package/hmr/shared/runtime/root-placeholder-view.d.ts +19 -0
- package/hmr/shared/runtime/root-placeholder-view.js +311 -0
- package/hmr/shared/runtime/root-placeholder-view.js.map +1 -0
- package/hmr/shared/runtime/root-placeholder.js +401 -206
- package/hmr/shared/runtime/root-placeholder.js.map +1 -1
- package/hmr/shared/runtime/session-bootstrap.js +203 -58
- package/hmr/shared/runtime/session-bootstrap.js.map +1 -1
- package/hmr/shared/runtime/vendor-bootstrap.js +3 -10
- package/hmr/shared/runtime/vendor-bootstrap.js.map +1 -1
- package/hmr/shared/runtime/vendor-resolve.d.ts +22 -0
- package/hmr/shared/runtime/vendor-resolve.js +45 -0
- package/hmr/shared/runtime/vendor-resolve.js.map +1 -0
- package/hmr/shared/vendor/manifest-collect.d.ts +4 -0
- package/hmr/shared/vendor/manifest-collect.js +909 -0
- package/hmr/shared/vendor/manifest-collect.js.map +1 -0
- package/hmr/shared/vendor/manifest-loader.d.ts +2 -1
- package/hmr/shared/vendor/manifest-loader.js +5 -3
- package/hmr/shared/vendor/manifest-loader.js.map +1 -1
- package/hmr/shared/vendor/manifest.d.ts +12 -7
- package/hmr/shared/vendor/manifest.js +180 -826
- package/hmr/shared/vendor/manifest.js.map +1 -1
- package/hmr/shared/vendor/registry.d.ts +2 -0
- package/hmr/shared/vendor/registry.js +14 -0
- package/hmr/shared/vendor/registry.js.map +1 -1
- package/hmr/shared/vendor/vendor-device-shim.d.ts +1 -0
- package/hmr/shared/vendor/vendor-device-shim.js +208 -0
- package/hmr/shared/vendor/vendor-device-shim.js.map +1 -0
- package/hmr/shared/vendor/vendor-esbuild-plugins.d.ts +107 -0
- package/hmr/shared/vendor/vendor-esbuild-plugins.js +540 -0
- package/hmr/shared/vendor/vendor-esbuild-plugins.js.map +1 -0
- package/index.d.ts +1 -0
- package/index.js +5 -0
- package/index.js.map +1 -1
- package/package.json +65 -13
- package/runtime/core-aliases-early.js +28 -57
- package/runtime/core-aliases-early.js.map +1 -1
- package/shims/react-jsx-runtime.d.ts +4 -0
- package/shims/react-jsx-runtime.js +61 -0
- package/shims/react-jsx-runtime.js.map +1 -0
- package/helpers/angular/angular-linker.d.ts +0 -13
- package/helpers/angular/angular-linker.js +0 -194
- package/helpers/angular/angular-linker.js.map +0 -1
- package/helpers/angular/inline-decorator-component-templates.js.map +0 -1
- package/helpers/angular/shared-linker.d.ts +0 -11
- package/helpers/angular/shared-linker.js +0 -75
- package/helpers/angular/shared-linker.js.map +0 -1
- package/helpers/angular/synthesize-decorator-ctor-parameters.js.map +0 -1
- package/helpers/angular/synthesize-injectable-factories.js.map +0 -1
- package/helpers/angular/util.js +0 -67
- package/helpers/angular/util.js.map +0 -1
- package/helpers/module-runner-patch.d.ts +0 -3
- package/helpers/module-runner-patch.js +0 -63
- package/helpers/module-runner-patch.js.map +0 -1
- package/helpers/prelink-angular.d.ts +0 -2
- package/helpers/prelink-angular.js +0 -117
- package/helpers/prelink-angular.js.map +0 -1
- package/hmr/server/websocket-angular-entry.js.map +0 -1
- package/hmr/server/websocket-angular-hot-update.js.map +0 -1
- package/hmr/server/websocket-ns-m-finalize.d.ts +0 -22
- package/hmr/server/websocket-ns-m-finalize.js +0 -88
- package/hmr/server/websocket-ns-m-finalize.js.map +0 -1
- package/hmr/server/websocket-runtime-compat.d.ts +0 -19
- package/hmr/server/websocket-runtime-compat.js +0 -287
- package/hmr/server/websocket-runtime-compat.js.map +0 -1
- package/hmr/server/websocket-vue-sfc.d.ts +0 -27
- package/hmr/server/websocket-vue-sfc.js +0 -1114
- package/hmr/server/websocket-vue-sfc.js.map +0 -1
- package/hmr/shared/runtime/http-only-boot.d.ts +0 -2
- package/hmr/shared/runtime/http-only-boot.js +0 -171
- package/hmr/shared/runtime/http-only-boot.js.map +0 -1
- package/hmr/vendor-bootstrap.d.ts +0 -3
- package/hmr/vendor-bootstrap.js +0 -32
- package/hmr/vendor-bootstrap.js.map +0 -1
- package/shims/react-reconciler-constants.d.ts +0 -14
- package/shims/react-reconciler-constants.js +0 -21
- package/shims/react-reconciler-constants.js.map +0 -1
- package/shims/react-reconciler.d.ts +0 -8
- package/shims/react-reconciler.js +0 -15
- package/shims/react-reconciler.js.map +0 -1
- package/transformers/NativeClass/index.d.ts +0 -2
- package/transformers/NativeClass/index.js +0 -222
- package/transformers/NativeClass/index.js.map +0 -1
- /package/{helpers/angular → hmr/frameworks/angular/build}/inline-decorator-component-templates.d.ts +0 -0
- /package/{helpers/angular → hmr/frameworks/angular/build}/synthesize-decorator-ctor-parameters.d.ts +0 -0
- /package/{helpers/angular → hmr/frameworks/angular/build}/synthesize-injectable-factories.d.ts +0 -0
- /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,OAAO,EAAE,cAAc,EAAE,MAAM,mCAAmC,CAAC;AACnE,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACpD,OAAO,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AAEpD,MAAM,OAAO,GAAG,WAAW,CAAC;AAI5B,SAAS,yBAAyB,CAAC,KAAgC,EAAE,MA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M,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"}
|
package/hmr/entry-runtime.d.ts
CHANGED
|
@@ -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,
|
|
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 {};
|