@nativescript/vite 8.0.0-alpha.5 → 8.0.0-alpha.51
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +51 -11
- package/bin/cli.cjs +8 -14
- package/configuration/angular.d.ts +34 -1
- package/configuration/angular.js +376 -165
- package/configuration/angular.js.map +1 -1
- package/configuration/base.js +241 -51
- 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-state.d.ts +8 -0
- package/helpers/app-css-state.js +8 -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 +1 -1
- 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/global-defines.d.ts +142 -0
- package/helpers/global-defines.js +213 -11
- 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.d.ts +1 -0
- package/helpers/logging.js +65 -4
- package/helpers/logging.js.map +1 -1
- package/helpers/main-entry.d.ts +3 -1
- package/helpers/main-entry.js +301 -53
- package/helpers/main-entry.js.map +1 -1
- package/helpers/nativeclass-esbuild-plugin.d.ts +2 -1
- package/helpers/nativeclass-esbuild-plugin.js.map +1 -1
- package/helpers/nativeclass-transform.js +5 -6
- package/helpers/nativeclass-transform.js.map +1 -1
- package/helpers/nativeclass-transformer-plugin.d.ts +9 -2
- package/helpers/nativeclass-transformer-plugin.js +157 -14
- 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-url.d.ts +29 -7
- package/helpers/ns-core-url.js +69 -12
- 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 +14 -0
- package/helpers/ts-config-paths.js +90 -9
- package/helpers/ts-config-paths.js.map +1 -1
- package/helpers/typescript-check.d.ts +2 -1
- package/helpers/typescript-check.js +2 -2
- 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/workers.d.ts +20 -19
- package/helpers/workers.js +624 -4
- package/helpers/workers.js.map +1 -1
- package/hmr/client/css-handler.d.ts +2 -1
- package/hmr/client/css-handler.js +50 -26
- 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 +79 -0
- package/hmr/client/framework-client-strategy.js +19 -0
- package/hmr/client/framework-client-strategy.js.map +1 -0
- package/hmr/client/hmr-pending-overlay.d.ts +13 -0
- package/hmr/client/hmr-pending-overlay.js +60 -0
- package/hmr/client/hmr-pending-overlay.js.map +1 -0
- package/hmr/client/index.js +891 -220
- package/hmr/client/index.js.map +1 -1
- package/hmr/client/utils.d.ts +7 -1
- package/hmr/client/utils.js +207 -29
- package/hmr/client/utils.js.map +1 -1
- package/hmr/entry-runtime.d.ts +2 -1
- package/hmr/entry-runtime.js +256 -69
- 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 +109 -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/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/{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/client/index.d.ts +1 -0
- package/hmr/frameworks/angular/client/index.js +859 -21
- 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/strategy.js +460 -12
- 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 +17 -11
- package/hmr/frameworks/angular/server/websocket-angular-hot-update.js +336 -0
- package/hmr/frameworks/angular/server/websocket-angular-hot-update.js.map +1 -0
- package/hmr/frameworks/react/server/strategy.d.ts +2 -0
- package/hmr/frameworks/react/server/strategy.js +150 -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 +54 -0
- package/hmr/frameworks/solid/client/app-runtime.js +184 -0
- package/hmr/frameworks/solid/client/app-runtime.js.map +1 -0
- package/hmr/frameworks/solid/server/strategy.js +291 -16
- package/hmr/frameworks/solid/server/strategy.js.map +1 -1
- package/hmr/frameworks/typescript/server/strategy.js +38 -14
- package/hmr/frameworks/typescript/server/strategy.js.map +1 -1
- package/hmr/frameworks/vue/client/dep-propagation.d.ts +36 -0
- package/hmr/frameworks/vue/client/dep-propagation.js +101 -0
- package/hmr/frameworks/vue/client/dep-propagation.js.map +1 -0
- package/hmr/frameworks/vue/client/index.d.ts +8 -0
- package/hmr/frameworks/vue/client/index.js +56 -243
- package/hmr/frameworks/vue/client/index.js.map +1 -1
- package/hmr/frameworks/vue/client/strategy.d.ts +33 -0
- package/hmr/frameworks/vue/client/strategy.js +157 -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 +142 -0
- package/hmr/frameworks/vue/client/vue-sfc-update-overlay.js.map +1 -0
- package/hmr/frameworks/vue/server/sfc-route-assemble.d.ts +7 -0
- package/hmr/frameworks/vue/server/sfc-route-assemble.js +747 -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 +459 -0
- package/hmr/frameworks/vue/server/sfc-route-serve.js.map +1 -0
- package/hmr/frameworks/vue/server/sfc-route-shared.d.ts +38 -0
- package/hmr/frameworks/vue/server/sfc-route-shared.js +48 -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 +278 -1
- 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 +77 -10
- 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/server/constants.js +20 -5
- package/hmr/server/constants.js.map +1 -1
- package/hmr/server/core-sanitize.d.ts +86 -7
- package/hmr/server/core-sanitize.js +170 -45
- package/hmr/server/core-sanitize.js.map +1 -1
- 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 +108 -11
- package/hmr/server/hmr-module-graph.d.ts +37 -0
- package/hmr/server/hmr-module-graph.js +214 -0
- package/hmr/server/hmr-module-graph.js.map +1 -0
- package/hmr/server/import-map.d.ts +11 -2
- package/hmr/server/import-map.js +92 -45
- 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/ns-core-cjs-shape.d.ts +2 -4
- package/hmr/server/ns-core-cjs-shape.js +4 -6
- package/hmr/server/ns-core-cjs-shape.js.map +1 -1
- 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 +38 -0
- package/hmr/server/ns-rt-route.js.map +1 -0
- package/hmr/server/perf-instrumentation.d.ts +114 -0
- package/hmr/server/perf-instrumentation.js +197 -0
- package/hmr/server/perf-instrumentation.js.map +1 -0
- package/hmr/server/process-code-for-device.d.ts +14 -0
- package/hmr/server/process-code-for-device.js +699 -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 +630 -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/server-origin.d.ts +2 -0
- package/hmr/server/server-origin.js +83 -0
- package/hmr/server/server-origin.js.map +1 -0
- package/hmr/server/shared-transform-request.js +13 -7
- package/hmr/server/shared-transform-request.js.map +1 -1
- 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.js +78 -42
- package/hmr/server/vite-plugin.js.map +1 -1
- package/hmr/server/websocket-core-bridge.d.ts +45 -4
- package/hmr/server/websocket-core-bridge.js +50 -48
- package/hmr/server/websocket-core-bridge.js.map +1 -1
- package/hmr/server/websocket-css-hot-update.d.ts +33 -0
- package/hmr/server/websocket-css-hot-update.js +65 -0
- package/hmr/server/websocket-css-hot-update.js.map +1 -0
- 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-graph-upsert.d.ts +15 -0
- package/hmr/server/websocket-graph-upsert.js +20 -0
- package/hmr/server/websocket-graph-upsert.js.map +1 -1
- package/hmr/server/websocket-hmr-pending.d.ts +37 -0
- package/hmr/server/websocket-hmr-pending.js +55 -0
- package/hmr/server/websocket-hmr-pending.js.map +1 -0
- package/hmr/server/websocket-hot-update.d.ts +77 -0
- package/hmr/server/websocket-hot-update.js +360 -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 +50 -0
- package/hmr/server/websocket-import-map-route.js.map +1 -0
- package/hmr/server/websocket-module-bindings.js +3 -3
- package/hmr/server/websocket-module-bindings.js.map +1 -1
- package/hmr/server/websocket-module-specifiers.d.ts +66 -2
- package/hmr/server/websocket-module-specifiers.js +191 -20
- package/hmr/server/websocket-module-specifiers.js.map +1 -1
- package/hmr/server/websocket-ns-core.d.ts +21 -0
- package/hmr/server/websocket-ns-core.js +311 -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 +1 -1
- package/hmr/server/websocket-ns-m-paths.js +58 -13
- package/hmr/server/websocket-ns-m-paths.js.map +1 -1
- package/hmr/server/websocket-ns-m-request.d.ts +11 -1
- package/hmr/server/websocket-ns-m-request.js +18 -25
- package/hmr/server/websocket-ns-m-request.js.map +1 -1
- package/hmr/server/websocket-ns-m.d.ts +33 -0
- package/hmr/server/websocket-ns-m.js +752 -0
- package/hmr/server/websocket-ns-m.js.map +1 -0
- package/hmr/server/websocket-served-module-helpers.d.ts +49 -3
- package/hmr/server/websocket-served-module-helpers.js +403 -87
- package/hmr/server/websocket-served-module-helpers.js.map +1 -1
- package/hmr/server/websocket-txn.js +2 -8
- 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 +8 -39
- package/hmr/server/websocket.js +608 -6300
- package/hmr/server/websocket.js.map +1 -1
- package/hmr/shared/ns-globals.d.ts +118 -0
- package/hmr/shared/ns-globals.js +29 -0
- package/hmr/shared/ns-globals.js.map +1 -0
- package/hmr/shared/protocol.d.ts +145 -0
- package/hmr/shared/protocol.js +28 -0
- package/hmr/shared/protocol.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 +133 -0
- package/hmr/shared/runtime/boot-progress.js.map +1 -0
- package/hmr/shared/runtime/boot-timeline.d.ts +18 -0
- package/hmr/shared/runtime/boot-timeline.js +42 -0
- package/hmr/shared/runtime/boot-timeline.js.map +1 -0
- package/hmr/shared/runtime/browser-runtime-contract.js.map +1 -1
- 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.d.ts +119 -26
- package/hmr/shared/runtime/dev-overlay.js +1196 -262
- 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/http-only-boot.js +7 -6
- package/hmr/shared/runtime/http-only-boot.js.map +1 -1
- package/hmr/shared/runtime/module-provenance.js +4 -6
- package/hmr/shared/runtime/module-provenance.js.map +1 -1
- 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 +393 -200
- package/hmr/shared/runtime/root-placeholder.js.map +1 -1
- package/hmr/shared/runtime/session-bootstrap.js +168 -4
- 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/vendor/manifest-collect.d.ts +4 -0
- package/hmr/shared/vendor/manifest-collect.js +549 -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 +1 -7
- package/hmr/shared/vendor/manifest.js +84 -819
- package/hmr/shared/vendor/manifest.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 +38 -0
- package/hmr/shared/vendor/vendor-esbuild-plugins.js +296 -0
- package/hmr/shared/vendor/vendor-esbuild-plugins.js.map +1 -0
- package/hmr/vendor-bootstrap.d.ts +1 -3
- package/hmr/vendor-bootstrap.js +4 -6
- package/hmr/vendor-bootstrap.js.map +1 -1
- package/index.d.ts +1 -0
- package/index.js +5 -0
- package/index.js.map +1 -1
- package/package.json +61 -11
- package/runtime/core-aliases-early.js +25 -55
- 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/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 +0 -239
- 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 -286
- 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 -1117
- package/hmr/server/websocket-vue-sfc.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
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import * as path from 'path';
|
|
2
|
-
import * as PAT from '../../../server/constants.js';
|
|
3
2
|
import { getProjectAppVirtualPath } from '../../../../helpers/utils.js';
|
|
3
|
+
import { purgeTransformCachesForHotUpdate } from '../../../server/transform-cache-invalidation.js';
|
|
4
|
+
import { runHotUpdatePrologue } from '../../../server/websocket-hot-update.js';
|
|
4
5
|
// Solid server strategy for NativeScript HMR.
|
|
5
6
|
// For Solid we don't have .vue-style SFCs today; this strategy mainly
|
|
6
7
|
// ensures Solid runtime imports can be rewritten to vendor when needed
|
|
@@ -13,23 +14,297 @@ export const solidServerStrategy = {
|
|
|
13
14
|
// Treat app TS/TSX/JS/JSX under the configured app root as Solid candidates.
|
|
14
15
|
return SOLID_FILE_PATTERN.test(id) && id.startsWith(SOLID_APP_PREFIX);
|
|
15
16
|
},
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
17
|
+
// Suppress the prologue's common-block delta broadcast: Solid HMR depends on
|
|
18
|
+
// the client re-fetching the just-changed module to drive
|
|
19
|
+
// `solid-refresh.patchRegistry`, so the broadcast must come AFTER this
|
|
20
|
+
// handler purges the transform caches (see handleHotUpdate's tail). Otherwise
|
|
21
|
+
// the client's evict + re-import races the server's invalidation and serves
|
|
22
|
+
// the previous save's transform.
|
|
23
|
+
deferDeltaBroadcast: true,
|
|
24
|
+
// HMR: emit a graph delta for a changed app TSX/TS/JSX file, then bust the
|
|
25
|
+
// shared + Vite transform caches (file + transitive importers) so the
|
|
26
|
+
// client's re-import evaluates fresh code. Reached via the dispatcher's
|
|
27
|
+
// delegation seam after the shared prologue.
|
|
28
|
+
async handleHotUpdate(ctx, deps) {
|
|
29
|
+
const state = await runHotUpdatePrologue(ctx, deps);
|
|
30
|
+
if (!state)
|
|
31
|
+
return;
|
|
32
|
+
const { root, metrics, emitSummary } = state;
|
|
33
|
+
const { moduleGraph, verbose, sharedTransformRequest } = deps;
|
|
34
|
+
const { file, server } = ctx;
|
|
35
|
+
const isSolidFile = /\.(tsx?|jsx?)$/i.test(file);
|
|
36
|
+
if (!isSolidFile)
|
|
37
|
+
return;
|
|
38
|
+
metrics.tAfterFramework = Date.now();
|
|
39
|
+
try {
|
|
40
|
+
const rel = '/' + path.posix.normalize(path.relative(root, file)).split(path.sep).join('/');
|
|
41
|
+
if (verbose)
|
|
42
|
+
console.log('[hmr-ws][solid] app file hot update', { file, rel });
|
|
43
|
+
// The prologue's common graph-update block may have already emitted a
|
|
44
|
+
// delta if the file was in Vite's module graph. This forces emission
|
|
45
|
+
// for files it missed (e.g. new file, or moduleGraph mismatch).
|
|
46
|
+
const normalizedId = moduleGraph.normalizeGraphId(rel);
|
|
47
|
+
const existing = moduleGraph.get(normalizedId);
|
|
48
|
+
if (!existing) {
|
|
49
|
+
// Module not in graph yet — force upsert with timestamp-based
|
|
50
|
+
// hash so the client sees a change.
|
|
51
|
+
moduleGraph.upsert(rel, `/* solid-hmr ${Date.now()} */`, [], { emitDeltaOnInsert: true });
|
|
52
|
+
}
|
|
53
|
+
// Log what we're sending so devs can trace the flow on the server side.
|
|
54
|
+
if (verbose) {
|
|
55
|
+
const gm = moduleGraph.get(normalizedId);
|
|
56
|
+
console.log('[hmr-ws][solid] delta module', { id: gm?.id, hash: gm?.hash });
|
|
57
|
+
}
|
|
58
|
+
// Purge the shared transform-request cache AND Vite's own
|
|
59
|
+
// moduleGraph transformResult cache for the changed file
|
|
60
|
+
// AND every transitive importer.
|
|
61
|
+
//
|
|
62
|
+
// Why this matters for Solid HMR specifically:
|
|
63
|
+
// - The HMR client evicts V8's module cache for the
|
|
64
|
+
// canonical /ns/m/<path> URL and re-imports the module.
|
|
65
|
+
// - The dev server resolves /ns/m/* by calling
|
|
66
|
+
// `sharedTransformRequest(...)`, which has a 60s TTL on
|
|
67
|
+
// transform results to amortize cost across HMR
|
|
68
|
+
// cycles. The shared cache wraps `server.transformRequest`,
|
|
69
|
+
// which itself caches the compiled output on each
|
|
70
|
+
// `ModuleNode.transformResult`. Both layers must be
|
|
71
|
+
// invalidated, or the re-import resolves to whatever
|
|
72
|
+
// the previous save populated.
|
|
73
|
+
// - Without invalidation at *both* layers, the second
|
|
74
|
+
// save of a file within the cache window returns the
|
|
75
|
+
// FIRST save's transform — V8 evaluates stale code,
|
|
76
|
+
// `solid-refresh.patchRegistry` runs against an
|
|
77
|
+
// unchanged source body, and the visible page picks
|
|
78
|
+
// up the previous save's edit instead of the current
|
|
79
|
+
// one (the "one-save-behind" symptom users reported).
|
|
80
|
+
//
|
|
81
|
+
// Critically, transitive importers must also be invalidated
|
|
82
|
+
// because TanStack file-based routing (and similar frameworks)
|
|
83
|
+
// use route files that statically import their components.
|
|
84
|
+
// When `home.tsx` changes, `routes/index.tsx`'s transform
|
|
85
|
+
// output references the imported home module identity. Even
|
|
86
|
+
// though the route file's source bytes did not change, its
|
|
87
|
+
// *resolved* import target has — and its cached transform
|
|
88
|
+
// might still encode the previous resolution. Forcing a
|
|
89
|
+
// fresh transform of the importer guarantees the route
|
|
90
|
+
// file's `import Home from ...` re-resolves against the
|
|
91
|
+
// freshly evaluated home module on V8 side.
|
|
92
|
+
//
|
|
93
|
+
// The transitive walk is bounded (max depth 16, node_modules /
|
|
94
|
+
// virtual ids excluded) so vendor packages stay hot.
|
|
95
|
+
// Invalidate Vite's module graph for the changed file + its bounded
|
|
96
|
+
// transitive importers, then clear the shared transform-request cache.
|
|
97
|
+
// Transitive importers matter because TanStack file-based routing (and
|
|
98
|
+
// similar) statically import their components: when `home.tsx` changes,
|
|
99
|
+
// `routes/index.tsx`'s cached transform still encodes the previous
|
|
100
|
+
// resolution and must be re-run.
|
|
101
|
+
purgeTransformCachesForHotUpdate({ file, server, sharedTransformRequest, verbose, label: 'solid' });
|
|
102
|
+
// Re-run the transform AFTER all caches are invalidated, then
|
|
103
|
+
// re-upsert the graph so the broadcast hash matches the freshly-
|
|
104
|
+
// transformed content. The prologue's common upsert block ran
|
|
105
|
+
// `server.transformRequest` BEFORE invalidation — at that
|
|
106
|
+
// moment Vite's auto-invalidate hadn't fired yet (it runs after
|
|
107
|
+
// `plugin.handleHotUpdate`), so the result it cached was the
|
|
108
|
+
// previous save's. Without this re-transform, the broadcast
|
|
109
|
+
// carries a stale hash and iOS evaluates the previous save's
|
|
110
|
+
// bytes ("one save behind").
|
|
111
|
+
//
|
|
112
|
+
// We pre-populate the cache for every extension variant Vite's
|
|
113
|
+
// /ns/m/ handler might try, so the first request from iOS hits
|
|
114
|
+
// fresh data regardless of which candidate it resolves first.
|
|
115
|
+
try {
|
|
116
|
+
const ext = file.match(/\.(?:[mc]?[jt]sx?)$/i)?.[0] || '';
|
|
117
|
+
const baseSpec = '/' + path.posix.normalize(path.relative(root, file)).split(path.sep).join('/');
|
|
118
|
+
const baseNoExt = ext ? baseSpec.replace(/\.(?:[mc]?[jt]sx?)$/i, '') : baseSpec;
|
|
119
|
+
const candidates = Array.from(new Set([baseSpec, baseNoExt, baseNoExt + '.ts', baseNoExt + '.tsx', baseNoExt + '.js', baseNoExt + '.jsx', baseNoExt + '.mjs', baseNoExt + '.mts', baseNoExt + '.cts', file]));
|
|
120
|
+
let freshCode = '';
|
|
121
|
+
for (const cand of candidates) {
|
|
122
|
+
try {
|
|
123
|
+
const fresh = await sharedTransformRequest(cand, 30000);
|
|
124
|
+
if (fresh?.code && !freshCode)
|
|
125
|
+
freshCode = fresh.code;
|
|
126
|
+
}
|
|
127
|
+
catch { }
|
|
128
|
+
}
|
|
129
|
+
if (freshCode) {
|
|
130
|
+
const existingGm = moduleGraph.get(normalizedId);
|
|
131
|
+
const existingDeps = existingGm?.deps || [];
|
|
132
|
+
moduleGraph.upsert(normalizedId, freshCode, existingDeps, {
|
|
133
|
+
broadcastDelta: false,
|
|
134
|
+
});
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
catch (e) {
|
|
138
|
+
if (verbose)
|
|
139
|
+
console.warn('[hmr-ws][solid] post-invalidation re-transform failed', e);
|
|
140
|
+
}
|
|
141
|
+
// Broadcast the (now-fresh) delta here, AFTER cache invalidation. The
|
|
142
|
+
// prologue suppresses the common-block broadcast for this flavor (via
|
|
143
|
+
// `deferDeltaBroadcast`), so emitting it now ensures the client's
|
|
144
|
+
// eviction + re-import doesn't race the server's cache invalidation.
|
|
145
|
+
try {
|
|
146
|
+
const gm = moduleGraph.get(normalizedId);
|
|
147
|
+
if (gm) {
|
|
148
|
+
moduleGraph.emitDelta([gm], []);
|
|
149
|
+
if (verbose) {
|
|
150
|
+
console.log('[hmr-ws][solid] broadcast delta after cache invalidation', { id: gm.id, hash: gm.hash });
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
catch (e) {
|
|
155
|
+
if (verbose)
|
|
156
|
+
console.warn('[hmr-ws][solid] post-invalidation broadcast failed', e);
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
catch (e) {
|
|
160
|
+
if (verbose)
|
|
161
|
+
console.warn('[hmr-ws][solid] failed to handle hot update for', file, e);
|
|
162
|
+
}
|
|
163
|
+
emitSummary();
|
|
25
164
|
},
|
|
26
|
-
postClean
|
|
27
|
-
|
|
28
|
-
|
|
165
|
+
// preClean/rewriteFrameworkImports/postClean/ensureVersionedImports default to
|
|
166
|
+
// identity: Solid HMR runs through Vite's solid-refresh plugin + the generic
|
|
167
|
+
// vendor bridge, and has no dedicated HTTP endpoints to version.
|
|
168
|
+
//
|
|
169
|
+
// Solid HMR: patch @solid-refresh's $$refreshESM to do inline patching
|
|
170
|
+
// during module re-evaluation instead of deferring to hot.accept() callback.
|
|
171
|
+
// In NativeScript's HTTP ESM environment, accept callbacks are registered
|
|
172
|
+
// but not invoked by the HMR client. By adding a direct patchRegistry()
|
|
173
|
+
// call when hot.data already has a stored registry, component updates
|
|
174
|
+
// apply immediately when the module re-evaluates.
|
|
175
|
+
transformNodeModule(code, moduleId, verbose = false) {
|
|
176
|
+
if (!moduleId.includes('@solid-refresh')) {
|
|
177
|
+
return code;
|
|
178
|
+
}
|
|
179
|
+
const PATCH_SENTINEL = '/* __ns_solid_refresh_patched__ */';
|
|
180
|
+
const alreadyPatched = code.includes(PATCH_SENTINEL);
|
|
181
|
+
if (verbose) {
|
|
182
|
+
console.log('[hmr-ws][solid] @solid-refresh patch check:', { spec: moduleId, alreadyPatched, codeLen: code.length });
|
|
183
|
+
}
|
|
184
|
+
if (alreadyPatched) {
|
|
185
|
+
return code;
|
|
186
|
+
}
|
|
187
|
+
let patchedCode = code;
|
|
188
|
+
// Patch 1: Bypass shouldWarnAndDecline() — the vendor-bundled solid-js
|
|
189
|
+
// may not have the 'development' condition active, making DEV empty/undefined.
|
|
190
|
+
// In NativeScript HMR mode we are always in dev, so force it to return false.
|
|
191
|
+
const declineCheck = 'function shouldWarnAndDecline() {';
|
|
192
|
+
if (patchedCode.includes(declineCheck)) {
|
|
193
|
+
patchedCode = patchedCode.replace(declineCheck, `${PATCH_SENTINEL}\nfunction shouldWarnAndDecline() { return false; /* NS HMR: always allow refresh */ }\nfunction __original_shouldWarnAndDecline() {`);
|
|
194
|
+
if (verbose) {
|
|
195
|
+
console.log('[hmr-ws][solid] bypassed shouldWarnAndDecline() for NativeScript HMR');
|
|
196
|
+
}
|
|
197
|
+
}
|
|
198
|
+
// Patch 2: Force createMemo path in createProxy.
|
|
199
|
+
// Without the 'development' condition, $DEVCOMP is not set on components,
|
|
200
|
+
// so createProxy falls through to `return s(props)` — a direct call with
|
|
201
|
+
// no reactive subscription. When patchComponent fires update() (the signal
|
|
202
|
+
// setter), nobody is listening. By forcing the createMemo path, HMRComp
|
|
203
|
+
// subscribes to the signal and re-renders when the component changes.
|
|
204
|
+
const proxyCondition = 'if (!s || $DEVCOMP in s) {';
|
|
205
|
+
if (patchedCode.includes(proxyCondition)) {
|
|
206
|
+
patchedCode = patchedCode.replace(proxyCondition, 'if (true) { /* NS HMR: always use createMemo for reactive HMR updates */');
|
|
207
|
+
if (verbose) {
|
|
208
|
+
console.log('[hmr-ws][solid] forced createMemo path in createProxy for NativeScript HMR');
|
|
209
|
+
}
|
|
210
|
+
}
|
|
211
|
+
// Patch 2b (NS HMR escape hatch): expose `source` on the proxy
|
|
212
|
+
// itself via a non-enumerable, well-known symbol-ish key. This lets
|
|
213
|
+
// our HMR remount path bypass solid-refresh's proxy chain and call
|
|
214
|
+
// the freshly-patched underlying Home function directly. solid-refresh's
|
|
215
|
+
// proxy wraps everything in nested createMemo's, which under
|
|
216
|
+
// universal-renderer + nested-context (TanStack RouterContextProvider)
|
|
217
|
+
// causes accumulating zombie memos that all subscribe to M_initial.source
|
|
218
|
+
// — the visible symptom is "every other save applies".
|
|
219
|
+
//
|
|
220
|
+
// With this hatch we can do `proxy.__$$ns_resolve()` to obtain the
|
|
221
|
+
// current underlying component (e.g. M_initial.proxy after first save,
|
|
222
|
+
// or the actual Home function on the deepest hop) and then call
|
|
223
|
+
// untrack(() => extract until we reach the actual function), then mount
|
|
224
|
+
// against THAT function — no HMRComp memo proxy chain at the page level.
|
|
225
|
+
// NS HMR escape hatch: stash `source` on the HMRComp function
|
|
226
|
+
// itself AND short-circuit the Proxy's `get` handler so that
|
|
227
|
+
// `proxy.__$ns_resolveSource` returns our exposed function.
|
|
228
|
+
// Without the get-handler short-circuit, accessing the property
|
|
229
|
+
// on the Proxy goes through `return source()[property]` — which
|
|
230
|
+
// asks the *current source value* (which may itself be another
|
|
231
|
+
// solid-refresh proxy or the underlying user function) for the
|
|
232
|
+
// property. The user function doesn't have `__$ns_resolveSource`,
|
|
233
|
+
// and a chained proxy would re-enter its own get handler. Either
|
|
234
|
+
// way we end up with `undefined` at the page-level remount and
|
|
235
|
+
// can't unwrap.
|
|
236
|
+
//
|
|
237
|
+
// NOTE: `$$` in String.prototype.replace replacement is treated
|
|
238
|
+
// as a literal `$`. We use a single `$` to avoid that footgun.
|
|
239
|
+
// Match only the unique opening fragment to avoid getting tripped up
|
|
240
|
+
// by whitespace differences after the AST normalizer ran.
|
|
241
|
+
const newProxyMarker = `if (property === 'location' || property === 'name') {`;
|
|
242
|
+
if (patchedCode.includes(newProxyMarker)) {
|
|
243
|
+
// 1. Inject `__$ns_resolveSource` as a property on the HMRComp
|
|
244
|
+
// function itself (so its closure captures `source`).
|
|
245
|
+
// CRITICAL: assign at module-eval time (right after HMRComp
|
|
246
|
+
// is defined / before `return new Proxy(...)`), NOT inside
|
|
247
|
+
// the HMRComp body — the body only runs when the proxy is
|
|
248
|
+
// called, so before first call the property is undefined
|
|
249
|
+
// and the page-level remount unwrap finds nothing.
|
|
250
|
+
const setupMarker = `setComponentProperty(HMRComp, 'name', refreshName);`;
|
|
251
|
+
patchedCode = patchedCode.replace(setupMarker, `HMRComp.__$ns_resolveSource = function() { return source(); }; ${setupMarker}`);
|
|
252
|
+
// 2. Make the Proxy `get` handler short-circuit our property
|
|
253
|
+
// so callers can do `proxy.__$ns_resolveSource()` without
|
|
254
|
+
// going through `source()[property]` (which would unwrap one
|
|
255
|
+
// hop early or reach the user function which doesn't have it).
|
|
256
|
+
patchedCode = patchedCode.replace(newProxyMarker, `if (property === '__$ns_resolveSource') { return HMRComp.__$ns_resolveSource; } ${newProxyMarker}`);
|
|
257
|
+
if (verbose) {
|
|
258
|
+
console.log('[hmr-ws][solid] exposed __$ns_resolveSource on createProxy for NS HMR escape hatch');
|
|
259
|
+
}
|
|
260
|
+
}
|
|
261
|
+
// Patch 3: Inline patchRegistry call so updates apply immediately
|
|
262
|
+
// on module re-evaluation (accept callbacks are not invoked by the HMR client).
|
|
263
|
+
//
|
|
264
|
+
// The injected diagnostic logs are gated on
|
|
265
|
+
// `globalThis.__NS_ENV_VERBOSE__` so they're silent in
|
|
266
|
+
// normal use but resurface immediately when the user
|
|
267
|
+
// re-runs with verbose logging enabled. The flag is
|
|
268
|
+
// seeded by `mainEntryPlugin` from the same `verbose`
|
|
269
|
+
// option that drives this server-side log gating.
|
|
270
|
+
// Without these the visible HMR signal is just "did it
|
|
271
|
+
// apply" — with them, devs can answer "did `hot.data`
|
|
272
|
+
// persist", "did `patchRegistry` actually swap the
|
|
273
|
+
// proxy's signal source", and "did the registry
|
|
274
|
+
// component count change" without reaching for an
|
|
275
|
+
// inspector.
|
|
276
|
+
const marker = 'hot.data[SOLID_REFRESH] = hot.data[SOLID_REFRESH] || registry;';
|
|
277
|
+
if (patchedCode.includes(marker)) {
|
|
278
|
+
const patchCode = [
|
|
279
|
+
`var __nsRefreshVerbose = (typeof globalThis !== 'undefined') && !!globalThis.__NS_ENV_VERBOSE__;`,
|
|
280
|
+
`if (__nsRefreshVerbose) console.log('[ns-hmr][solid-refresh][$$refreshESM] hot.data has SOLID_REFRESH=', !!(hot.data && hot.data[SOLID_REFRESH]), 'registry components=', registry.components ? registry.components.size : 0);`,
|
|
281
|
+
`if (hot.data[SOLID_REFRESH]) {`,
|
|
282
|
+
` var __nsOldComponents = hot.data[SOLID_REFRESH].components ? hot.data[SOLID_REFRESH].components.size : 0;`,
|
|
283
|
+
` var __nsShouldInvalidate = patchRegistry(hot.data[SOLID_REFRESH], registry);`,
|
|
284
|
+
` if (__nsRefreshVerbose) console.log('[ns-hmr][solid-refresh][$$refreshESM] patched: oldComponents=', __nsOldComponents, 'newComponents=', registry.components ? registry.components.size : 0, 'shouldInvalidate=', __nsShouldInvalidate);`,
|
|
285
|
+
`} else {`,
|
|
286
|
+
` if (__nsRefreshVerbose) console.log('[ns-hmr][solid-refresh][$$refreshESM] first load — no prior registry to patch');`,
|
|
287
|
+
`}`,
|
|
288
|
+
].join('\n ');
|
|
289
|
+
patchedCode = patchedCode.replace(marker, `${patchCode}\n ${marker}`);
|
|
290
|
+
if (verbose) {
|
|
291
|
+
console.log('[hmr-ws][solid] added inline patchRegistry (with diagnostics) for NativeScript HMR');
|
|
292
|
+
}
|
|
293
|
+
}
|
|
294
|
+
return patchedCode;
|
|
29
295
|
},
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
296
|
+
// ── pin solid-js to the canonical HTTP dev.js URL ─────────────────────
|
|
297
|
+
// The vendor bundle
|
|
298
|
+
// externalizes `solid-js` for this flavor, so all three import sites
|
|
299
|
+
// (vendor's externalized `import 'solid-js'`, user code's alias-rewritten
|
|
300
|
+
// path, and `@solid-refresh`'s rewritten import) MUST converge on this one
|
|
301
|
+
// URL — V8's ESM loader dedupes by URL, giving a single reactive graph.
|
|
302
|
+
// No trailing-slash prefix: subpaths (solid-js/store, /web) resolve via
|
|
303
|
+
// HTTP from discoverInstalledPackages().
|
|
304
|
+
importMapEntries(origin) {
|
|
305
|
+
return {
|
|
306
|
+
'solid-js': `${origin}/ns/m/node_modules/solid-js/dist/dev.js`,
|
|
307
|
+
};
|
|
33
308
|
},
|
|
34
309
|
async processFile(ctx) {
|
|
35
310
|
// For now we rely on the generic pipeline; no per-file Solid SFC registry.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"strategy.js","sourceRoot":"","sources":["../../../../../../../packages/vite/hmr/frameworks/solid/server/strategy.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,IAAI,MAAM,MAAM,CAAC;AAC7B,OAAO,
|
|
1
|
+
{"version":3,"file":"strategy.js","sourceRoot":"","sources":["../../../../../../../packages/vite/hmr/frameworks/solid/server/strategy.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,IAAI,MAAM,M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AAC;IACpB,CAAC;IACD,yEAAyE;IACzE,oBAAoB;IACpB,qEAAqE;IACrE,0EAA0E;IAC1E,2EAA2E;IAC3E,wEAAwE;IACxE,wEAAwE;IACxE,yCAAyC;IACzC,gBAAgB,CAAC,MAAc;QAC9B,OAAO;YACN,UAAU,EAAE,GAAG,MAAM,yCAAyC;SAC9D,CAAC;IACH,CAAC;IACD,KAAK,CAAC,WAAW,CAAC,GAAgC;QACjD,2EAA2E;QAC3E,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,OAAO,EAAE,GAAG,GAAG,CAAC;QAC1C,IAAI,CAAC;YACJ,MAAM,WAAW,GAAG,MAAM,MAAM,CAAC,gBAAgB,CAAC,QAAQ,CAAC,CAAC;YAC5D,IAAI,CAAC,WAAW,EAAE,IAAI;gBAAE,OAAO;YAC/B,IAAI,OAAO,EAAE,CAAC;gBACb,OAAO,CAAC,GAAG,CAAC,yBAAyB,QAAQ,EAAE,CAAC,CAAC;YAClD,CAAC;QACF,CAAC;QAAC,OAAO,GAAG,EAAE,CAAC;YACd,IAAI,OAAO,EAAE,CAAC;gBACb,OAAO,CAAC,IAAI,CAAC,mCAAmC,EAAE,QAAQ,EAAE,GAAG,CAAC,CAAC;YAClE,CAAC;QACF,CAAC;IACF,CAAC;IACD,KAAK,CAAC,aAAa,CAAC,IAA8B;QACjD,gFAAgF;QAChF,OAAO;IACR,CAAC;CACD,CAAC"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { getProjectAppPath, getProjectAppVirtualPath } from '../../../../helpers/utils.js';
|
|
2
2
|
import * as path from 'path';
|
|
3
3
|
import { isRuntimeGraphExcludedPath, matchesRuntimeGraphModuleId, shouldIncludeRuntimeGraphFile, shouldSkipRuntimeGraphDirectoryName } from '../../../server/runtime-graph-filter.js';
|
|
4
|
+
import { runHotUpdatePrologue } from '../../../server/websocket-hot-update.js';
|
|
4
5
|
// TypeScript server strategy for NativeScript HMR.
|
|
5
6
|
// This is a lightweight strategy that treats app TS/JS files
|
|
6
7
|
// as HTTP-loaded modules, relying on the shared HMR pipeline
|
|
@@ -13,21 +14,44 @@ export const typescriptServerStrategy = {
|
|
|
13
14
|
// Treat any app TS/JS under the virtual app root as HMR-relevant.
|
|
14
15
|
return matchesRuntimeGraphModuleId(id, TS_APP_PREFIX, TS_FILE_PATTERN);
|
|
15
16
|
},
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
17
|
+
// HMR: reached via the dispatcher's delegation seam. Run the shared
|
|
18
|
+
// prologue (scope gate, pending overlay, common graph upsert, CSS), then —
|
|
19
|
+
// for an in-scope app file — emit a generic graph delta. We treat the changed
|
|
20
|
+
// file as a graph module with no deps so its hash/identity changes and the
|
|
21
|
+
// client sees a delta and can perform a TS root reset; the code body is not
|
|
22
|
+
// used for execution here.
|
|
23
|
+
async handleHotUpdate(ctx, deps) {
|
|
24
|
+
const state = await runHotUpdatePrologue(ctx, deps);
|
|
25
|
+
if (!state)
|
|
26
|
+
return;
|
|
27
|
+
const { root, metrics, emitSummary } = state;
|
|
28
|
+
const { moduleGraph, verbose, wss, isSocketClientOpen } = deps;
|
|
29
|
+
const { file } = ctx;
|
|
30
|
+
metrics.tAfterFramework = Date.now();
|
|
31
|
+
try {
|
|
32
|
+
const rel = '/' + path.posix.normalize(path.relative(root, file)).split(path.sep).join('/');
|
|
33
|
+
if (verbose)
|
|
34
|
+
console.log('[hmr-ws][ts] app file hot update', { file, rel });
|
|
35
|
+
moduleGraph.upsert(rel, '', [], { emitDeltaOnInsert: true });
|
|
36
|
+
// For this flavor the ns:hmr-delta broadcast IS the update delivery —
|
|
37
|
+
// count open sockets so the always-on summary line reflects reality
|
|
38
|
+
// instead of reporting recipients=0 for a delivered update.
|
|
39
|
+
try {
|
|
40
|
+
wss?.clients?.forEach((client) => {
|
|
41
|
+
if (isSocketClientOpen(client))
|
|
42
|
+
metrics.recipients += 1;
|
|
43
|
+
});
|
|
44
|
+
}
|
|
45
|
+
catch { }
|
|
46
|
+
}
|
|
47
|
+
catch (e) {
|
|
48
|
+
if (verbose)
|
|
49
|
+
console.warn('[hmr-ws][ts] failed to emit delta for', file, e);
|
|
50
|
+
}
|
|
51
|
+
emitSummary();
|
|
30
52
|
},
|
|
53
|
+
// preClean/rewriteFrameworkImports/postClean/ensureVersionedImports default to
|
|
54
|
+
// identity: plain TS apps rely on the generic pipeline (vendor bridge, /ns/entry-rt).
|
|
31
55
|
async processFile(ctx) {
|
|
32
56
|
// Ensure that any TS app module requested by the HTTP realm is transformed once,
|
|
33
57
|
// so that downstream helpers (rewriteImports, vendor bridge) see a stable shape.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"strategy.js","sourceRoot":"","sources":["../../../../../../../packages/vite/hmr/frameworks/typescript/server/strategy.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,iBAAiB,EAAE,wBAAwB,EAAE,MAAM,8BAA8B,CAAC;AAC3F,OAAO,KAAK,IAAI,MAAM,MAAM,CAAC;AAC7B,OAAO,EAAE,0BAA0B,EAAE,2BAA2B,EAAE,6BAA6B,EAAE,mCAAmC,EAAE,MAAM,yCAAyC,CAAC;
|
|
1
|
+
{"version":3,"file":"strategy.js","sourceRoot":"","sources":["../../../../../../../packages/vite/hmr/frameworks/typescript/server/strategy.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,iBAAiB,EAAE,wBAAwB,EAAE,MAAM,8BAA8B,CAAC;AAC3F,OAAO,KAAK,IAAI,MAAM,MAAM,CAAC;AAC7B,OAAO,EAAE,0BAA0B,EAAE,2BAA2B,EAAE,6BAA6B,EAAE,mCAAmC,EAAE,MAAM,yCAAyC,CAAC;AACtL,OAAO,EAAE,oBAAoB,EAAE,MAAM,yCAAyC,CAAC;AAG/E,mDAAmD;AACnD,6DAA6D;AAC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E,CAAC;gBACvC,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC,CAAC;YAClC,CAAC;QACF,CAAC,CAAC,CAAC;QACH,IAAI,OAAO,EAAE,CAAC;YACb,OAAO,CAAC,GAAG,CAAC,2BAA2B,OAAO,CAAC,MAAM,aAAa,CAAC,CAAC;QACrE,CAAC;IACF,CAAC;CACD,CAAC"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Reverse-import-graph propagation for non-SFC dependency edits (Vue flavor).
|
|
3
|
+
*
|
|
4
|
+
* Editing a `.vue` file flows through `ns:vue-sfc-registry-update` →
|
|
5
|
+
* `loadSfcComponent` → `performResetRoot`, so the screen always reflects the
|
|
6
|
+
* fresh artifact. Editing a plain `.ts`/`.js` module that an SFC imports does
|
|
7
|
+
* NOT produce a registry update — the shared queue only evicts and re-imports
|
|
8
|
+
* the changed module itself. The freshly-instantiated dep module is then
|
|
9
|
+
* sitting in V8's cache while the live component instance still holds bindings
|
|
10
|
+
* to the OLD module instance, so the visible UI never changes even though the
|
|
11
|
+
* overlay reports the update as applied.
|
|
12
|
+
*
|
|
13
|
+
* This walker finds the `.vue` boundaries that (transitively) import the
|
|
14
|
+
* changed modules so the Vue strategy can reload + remount them — the exact
|
|
15
|
+
* counterpart of the Solid flavor's `.tsx` boundary BFS in the shared queue.
|
|
16
|
+
*
|
|
17
|
+
* Pure function (graph in, boundaries out) so the propagation decision is unit
|
|
18
|
+
* testable without booting the device runtime.
|
|
19
|
+
*/
|
|
20
|
+
export interface DepGraphModuleLike {
|
|
21
|
+
id: string;
|
|
22
|
+
deps: string[];
|
|
23
|
+
}
|
|
24
|
+
export declare function normalizeDepGraphKey(id: string): string;
|
|
25
|
+
/**
|
|
26
|
+
* BFS the reverse import graph from each changed non-`.vue` module up to the
|
|
27
|
+
* NEAREST `.vue` boundaries. SFC boundaries terminate the walk (remounting a
|
|
28
|
+
* boundary re-assembles its whole subtree, so walking past it would only
|
|
29
|
+
* produce redundant ancestors). Returns query-stripped `.vue` ids in BFS
|
|
30
|
+
* discovery order (nearest first), deduplicated.
|
|
31
|
+
*
|
|
32
|
+
* Changed ids that are themselves `.vue` files are ignored — those flow
|
|
33
|
+
* through the SFC registry-update path and never enter the shared re-import
|
|
34
|
+
* queue.
|
|
35
|
+
*/
|
|
36
|
+
export declare function findNearestSfcBoundaries(changedIds: readonly string[], graph: ReadonlyMap<string, DepGraphModuleLike>): string[];
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Reverse-import-graph propagation for non-SFC dependency edits (Vue flavor).
|
|
3
|
+
*
|
|
4
|
+
* Editing a `.vue` file flows through `ns:vue-sfc-registry-update` →
|
|
5
|
+
* `loadSfcComponent` → `performResetRoot`, so the screen always reflects the
|
|
6
|
+
* fresh artifact. Editing a plain `.ts`/`.js` module that an SFC imports does
|
|
7
|
+
* NOT produce a registry update — the shared queue only evicts and re-imports
|
|
8
|
+
* the changed module itself. The freshly-instantiated dep module is then
|
|
9
|
+
* sitting in V8's cache while the live component instance still holds bindings
|
|
10
|
+
* to the OLD module instance, so the visible UI never changes even though the
|
|
11
|
+
* overlay reports the update as applied.
|
|
12
|
+
*
|
|
13
|
+
* This walker finds the `.vue` boundaries that (transitively) import the
|
|
14
|
+
* changed modules so the Vue strategy can reload + remount them — the exact
|
|
15
|
+
* counterpart of the Solid flavor's `.tsx` boundary BFS in the shared queue.
|
|
16
|
+
*
|
|
17
|
+
* Pure function (graph in, boundaries out) so the propagation decision is unit
|
|
18
|
+
* testable without booting the device runtime.
|
|
19
|
+
*/
|
|
20
|
+
const VUE_SFC_ID_RE = /\.vue$/i;
|
|
21
|
+
// Keep in sync with the client utils' canonical-URL extension stripping: the
|
|
22
|
+
// graph may record a dep as `/src/test2.ts` while a changed id (or another
|
|
23
|
+
// importer's dep entry) appears as `/src/test2` — both must key identically.
|
|
24
|
+
const SCRIPT_EXT_RE = /\.(ts|tsx|js|jsx|mjs|mts|cts)$/i;
|
|
25
|
+
export function normalizeDepGraphKey(id) {
|
|
26
|
+
let key = String(id || '').split('?')[0];
|
|
27
|
+
if (!key)
|
|
28
|
+
return '';
|
|
29
|
+
if (!key.startsWith('/'))
|
|
30
|
+
key = '/' + key;
|
|
31
|
+
return key.replace(SCRIPT_EXT_RE, '');
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* BFS the reverse import graph from each changed non-`.vue` module up to the
|
|
35
|
+
* NEAREST `.vue` boundaries. SFC boundaries terminate the walk (remounting a
|
|
36
|
+
* boundary re-assembles its whole subtree, so walking past it would only
|
|
37
|
+
* produce redundant ancestors). Returns query-stripped `.vue` ids in BFS
|
|
38
|
+
* discovery order (nearest first), deduplicated.
|
|
39
|
+
*
|
|
40
|
+
* Changed ids that are themselves `.vue` files are ignored — those flow
|
|
41
|
+
* through the SFC registry-update path and never enter the shared re-import
|
|
42
|
+
* queue.
|
|
43
|
+
*/
|
|
44
|
+
export function findNearestSfcBoundaries(changedIds, graph) {
|
|
45
|
+
if (!changedIds?.length || !graph?.size)
|
|
46
|
+
return [];
|
|
47
|
+
// Reverse index: normalized dep key → importer ids.
|
|
48
|
+
const reverseIndex = new Map();
|
|
49
|
+
for (const [id, mod] of graph) {
|
|
50
|
+
const deps = Array.isArray(mod?.deps) ? mod.deps : [];
|
|
51
|
+
for (const dep of deps) {
|
|
52
|
+
const key = normalizeDepGraphKey(dep);
|
|
53
|
+
if (!key)
|
|
54
|
+
continue;
|
|
55
|
+
let importers = reverseIndex.get(key);
|
|
56
|
+
if (!importers) {
|
|
57
|
+
importers = [];
|
|
58
|
+
reverseIndex.set(key, importers);
|
|
59
|
+
}
|
|
60
|
+
importers.push(id);
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
const boundaries = [];
|
|
64
|
+
const boundarySeen = new Set();
|
|
65
|
+
const visited = new Set();
|
|
66
|
+
const queue = [];
|
|
67
|
+
for (const raw of changedIds) {
|
|
68
|
+
if (!raw || typeof raw !== 'string')
|
|
69
|
+
continue;
|
|
70
|
+
if (VUE_SFC_ID_RE.test(raw.split('?')[0]))
|
|
71
|
+
continue;
|
|
72
|
+
const key = normalizeDepGraphKey(raw);
|
|
73
|
+
if (key && !visited.has(key)) {
|
|
74
|
+
visited.add(key);
|
|
75
|
+
queue.push(key);
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
while (queue.length) {
|
|
79
|
+
const key = queue.shift();
|
|
80
|
+
const importers = reverseIndex.get(key);
|
|
81
|
+
if (!importers)
|
|
82
|
+
continue;
|
|
83
|
+
for (const importer of importers) {
|
|
84
|
+
const importerBase = importer.split('?')[0];
|
|
85
|
+
if (VUE_SFC_ID_RE.test(importerBase)) {
|
|
86
|
+
if (!boundarySeen.has(importerBase)) {
|
|
87
|
+
boundarySeen.add(importerBase);
|
|
88
|
+
boundaries.push(importerBase);
|
|
89
|
+
}
|
|
90
|
+
continue;
|
|
91
|
+
}
|
|
92
|
+
const importerKey = normalizeDepGraphKey(importer);
|
|
93
|
+
if (importerKey && !visited.has(importerKey)) {
|
|
94
|
+
visited.add(importerKey);
|
|
95
|
+
queue.push(importerKey);
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
return boundaries;
|
|
100
|
+
}
|
|
101
|
+
//# sourceMappingURL=dep-propagation.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dep-propagation.js","sourceRoot":"","sources":["../../../../../../../packages/vite/hmr/frameworks/vue/client/dep-propagation.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAOH,MAAM,aAAa,GAAG,SAAS,CAAC;AAChC,6EAA6E;AAC7E,2EAA2E;AAC3E,6EAA6E;AAC7E,MAAM,aAAa,GAAG,iCAAiC,CAAC;AAExD,MAAM,UAAU,oBAAoB,CAAC,EAAU;IAC9C,IAAI,GAAG,GAAG,MAAM,CAAC,EAAE,IAAI,EAAE,CAAC,CA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AAC,OAAO,CAAC,GAAG,CAAC,WAAW,CAAC,EAAE,CAAC;gBAC9C,OAAO,CAAC,GAAG,CAAC,WAAW,CAAC,CAAC;gBACzB,KAAK,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;YACzB,CAAC;QACF,CAAC;IACF,CAAC;IAED,OAAO,UAAU,CAAC;AACnB,CAAC"}
|
|
@@ -7,6 +7,14 @@ export declare function ensureNsVueBootstrap(): void;
|
|
|
7
7
|
export declare function handleVueSfcRegistry(msg: any): void;
|
|
8
8
|
export declare function handleVueSfcRegistryUpdate(msg: any, graphVersion: number): Promise<any>;
|
|
9
9
|
export declare function recordVuePayloadChanges(changed: any[], graphVersion: number): void;
|
|
10
|
+
/**
|
|
11
|
+
* True when the delta for `version` included a `.vue` change. The dep-change
|
|
12
|
+
* propagation in `refreshAfterBatch` uses this to stand down for mixed batches:
|
|
13
|
+
* the SFC registry-update path will already remount with a freshly assembled
|
|
14
|
+
* artifact at this version, which links against the re-imported deps — a second
|
|
15
|
+
* resetRoot from propagation would just double the work (and the flash).
|
|
16
|
+
*/
|
|
17
|
+
export declare function sfcChangedInVersion(version: number): boolean;
|
|
10
18
|
export declare function addSfcMapping(originalPath: string, fileName: string): void;
|
|
11
19
|
export declare function loadSfcComponent(targetVuePath: string, tag: string): Promise<any | null>;
|
|
12
20
|
export declare function getRootForVue(newComponent: any, state: {
|