@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
|
@@ -0,0 +1,296 @@
|
|
|
1
|
+
import * as esbuild from 'esbuild';
|
|
2
|
+
import path from 'path';
|
|
3
|
+
import { readFile } from 'fs/promises';
|
|
4
|
+
import { getAngularLinkerFactory, runAngularLinker } from '../../frameworks/angular/build/shared-linker.js';
|
|
5
|
+
import { vendorModuleShim } from './vendor-device-shim.js';
|
|
6
|
+
export function createVendorEsbuildPlugin(projectRoot) {
|
|
7
|
+
return {
|
|
8
|
+
name: 'ns-vendor-resolver',
|
|
9
|
+
setup(build) {
|
|
10
|
+
const debug = process.env.VITE_DEBUG_LOGS === 'true' || process.env.VITE_DEBUG_LOGS === '1';
|
|
11
|
+
build.onResolve({ filter: /^~\/package\.json$/ }, () => ({
|
|
12
|
+
path: path.resolve(projectRoot, 'package.json'),
|
|
13
|
+
}));
|
|
14
|
+
build.onResolve({ filter: /^module$/ }, () => ({
|
|
15
|
+
path: 'ns-vendor-module-shim',
|
|
16
|
+
namespace: 'ns-vendor',
|
|
17
|
+
}));
|
|
18
|
+
build.onLoad({ filter: /^ns-vendor-module-shim$/, namespace: 'ns-vendor' }, () => ({
|
|
19
|
+
contents: vendorModuleShim,
|
|
20
|
+
loader: 'js',
|
|
21
|
+
}));
|
|
22
|
+
// Stub Angular animations in vendor to avoid bundling browser-only code.
|
|
23
|
+
// Provide named exports expected by @nativescript/angular to satisfy esbuild.
|
|
24
|
+
const PB_ANIMATIONS_ID = 'ns-animations-pb-shim';
|
|
25
|
+
const ANIMATIONS_BROWSER_ID = 'ns-animations-browser-shim';
|
|
26
|
+
const ANIMATIONS_ID = 'ns-animations-noop';
|
|
27
|
+
// @angular/platform-browser/animations -> provide concrete named stubs
|
|
28
|
+
build.onResolve({ filter: /^@angular\/platform-browser\/animations(?:\/.*)?$/ }, (args) => {
|
|
29
|
+
if (debug) {
|
|
30
|
+
console.log('[vendor] map', args.path, '->', PB_ANIMATIONS_ID);
|
|
31
|
+
}
|
|
32
|
+
return { path: PB_ANIMATIONS_ID, namespace: 'ns-vendor' };
|
|
33
|
+
});
|
|
34
|
+
build.onLoad({ filter: new RegExp(`^${PB_ANIMATIONS_ID}$`), namespace: 'ns-vendor' }, () => ({
|
|
35
|
+
contents: [
|
|
36
|
+
'export default {};',
|
|
37
|
+
// Commonly imported symbols by @nativescript/angular
|
|
38
|
+
'export class AnimationBuilder {};',
|
|
39
|
+
'export const \u0275BrowserAnimationBuilder = class {};',
|
|
40
|
+
'export const \u0275AnimationEngine = class {};',
|
|
41
|
+
'export const \u0275AnimationRendererFactory = class {};',
|
|
42
|
+
'export const \u0275WebAnimationsStyleNormalizer = class {};',
|
|
43
|
+
// Typical platform-browser/animations APIs exported; safe no-ops
|
|
44
|
+
'export class BrowserAnimationsModule {};',
|
|
45
|
+
'export class NoopAnimationsModule {};',
|
|
46
|
+
'export const provideAnimations = (..._args) => [];',
|
|
47
|
+
'export const provideNoopAnimations = (..._args) => [];',
|
|
48
|
+
// Marker used by some Angular internals
|
|
49
|
+
'export const ANIMATION_MODULE_TYPE = void 0;',
|
|
50
|
+
].join('\n'),
|
|
51
|
+
loader: 'js',
|
|
52
|
+
}));
|
|
53
|
+
// @angular/animations/browser -> provide ɵ* engine/renderer/style normalizer stubs
|
|
54
|
+
build.onResolve({ filter: /^@angular\/animations\/browser(?:\/.*)?$/ }, (args) => {
|
|
55
|
+
if (debug) {
|
|
56
|
+
console.log('[vendor] map', args.path, '->', ANIMATIONS_BROWSER_ID);
|
|
57
|
+
}
|
|
58
|
+
return { path: ANIMATIONS_BROWSER_ID, namespace: 'ns-vendor' };
|
|
59
|
+
});
|
|
60
|
+
build.onLoad({ filter: new RegExp(`^${ANIMATIONS_BROWSER_ID}$`), namespace: 'ns-vendor' }, () => ({
|
|
61
|
+
contents: [
|
|
62
|
+
'export default {};',
|
|
63
|
+
'export class AnimationDriver {};',
|
|
64
|
+
'export const \u0275AnimationRendererFactory = class {};',
|
|
65
|
+
'export const \u0275AnimationStyleNormalizer = class {};',
|
|
66
|
+
'export const \u0275WebAnimationsStyleNormalizer = class {};',
|
|
67
|
+
'export const \u0275AnimationEngine = class {};',
|
|
68
|
+
// Convenience alias if any consumers import non-ɵ name
|
|
69
|
+
'export const AnimationStyleNormalizer = \u0275AnimationStyleNormalizer;',
|
|
70
|
+
].join('\n'),
|
|
71
|
+
loader: 'js',
|
|
72
|
+
}));
|
|
73
|
+
// @angular/animations -> broad no-op surface
|
|
74
|
+
build.onResolve(
|
|
75
|
+
// Keep generic mapping for @angular/animations base; /browser is handled above
|
|
76
|
+
{ filter: /^@angular\/animations(?:$|\/)$/ }, (args) => {
|
|
77
|
+
if (debug) {
|
|
78
|
+
console.log('[vendor] map', args.path, '->', ANIMATIONS_ID);
|
|
79
|
+
}
|
|
80
|
+
return { path: ANIMATIONS_ID, namespace: 'ns-vendor' };
|
|
81
|
+
});
|
|
82
|
+
build.onLoad({ filter: new RegExp(`^${ANIMATIONS_ID}$`), namespace: 'ns-vendor' }, () => ({
|
|
83
|
+
contents: [
|
|
84
|
+
'export default {};',
|
|
85
|
+
// Provide names sometimes (incorrectly) imported from @angular/animations by wrappers
|
|
86
|
+
'export class AnimationBuilder {};',
|
|
87
|
+
'export const \u0275BrowserAnimationBuilder = class {};',
|
|
88
|
+
'export const \u0275AnimationEngine = class {};',
|
|
89
|
+
'export const \u0275AnimationRendererFactory = class {};',
|
|
90
|
+
'export const \u0275WebAnimationsStyleNormalizer = class {};',
|
|
91
|
+
'export const ANIMATION_MODULE_TYPE = void 0;',
|
|
92
|
+
// Export a few common tokens as harmless stubs
|
|
93
|
+
'export const animate = (..._a) => ({});',
|
|
94
|
+
'export const state = (..._a) => ({});',
|
|
95
|
+
'export const style = (..._a) => ({});',
|
|
96
|
+
'export const transition = (..._a) => ({});',
|
|
97
|
+
'export const trigger = (..._a) => ({});',
|
|
98
|
+
'export const sequence = (..._a) => ({});',
|
|
99
|
+
'export const group = (..._a) => ({});',
|
|
100
|
+
'export const query = (..._a) => ({});',
|
|
101
|
+
'export const stagger = (..._a) => ({});',
|
|
102
|
+
'export const keyframes = (..._a) => ({});',
|
|
103
|
+
].join('\n'),
|
|
104
|
+
loader: 'js',
|
|
105
|
+
}));
|
|
106
|
+
},
|
|
107
|
+
};
|
|
108
|
+
}
|
|
109
|
+
/**
|
|
110
|
+
* esbuild plugin to compile .jsx/.tsx files from Solid packages through
|
|
111
|
+
* babel-preset-solid. Without this, esbuild uses its default React JSX
|
|
112
|
+
* transform, producing React.createElement calls that crash at runtime.
|
|
113
|
+
*
|
|
114
|
+
* Only applied to files inside node_modules that have .jsx or .tsx extension.
|
|
115
|
+
*/
|
|
116
|
+
export function createSolidJsxEsbuildPlugin(projectRoot) {
|
|
117
|
+
// Lazy-load Babel and the Solid preset so they're only required when
|
|
118
|
+
// the Solid flavor is active.
|
|
119
|
+
let babel;
|
|
120
|
+
let solidPreset;
|
|
121
|
+
return {
|
|
122
|
+
name: 'ns-vendor-solid-jsx',
|
|
123
|
+
setup(build) {
|
|
124
|
+
// Intercept .jsx and .tsx files from node_modules
|
|
125
|
+
build.onLoad({ filter: /node_modules[\\/].*\.[jt]sx$/ }, async (args) => {
|
|
126
|
+
try {
|
|
127
|
+
if (!babel) {
|
|
128
|
+
babel = await import('@babel/core');
|
|
129
|
+
// babel-preset-solid is the standard Solid JSX transform
|
|
130
|
+
solidPreset = (await import('babel-preset-solid')).default;
|
|
131
|
+
}
|
|
132
|
+
const source = await readFile(args.path, 'utf-8');
|
|
133
|
+
const result = await babel.transformAsync(source, {
|
|
134
|
+
filename: args.path,
|
|
135
|
+
presets: [
|
|
136
|
+
[
|
|
137
|
+
solidPreset,
|
|
138
|
+
{
|
|
139
|
+
generate: 'universal',
|
|
140
|
+
hydratable: false,
|
|
141
|
+
moduleName: '@nativescript-community/solid-js',
|
|
142
|
+
},
|
|
143
|
+
],
|
|
144
|
+
],
|
|
145
|
+
parserOpts: {
|
|
146
|
+
plugins: ['jsx', ...(args.path.endsWith('.tsx') ? ['typescript'] : [])],
|
|
147
|
+
},
|
|
148
|
+
ast: false,
|
|
149
|
+
sourceMaps: false,
|
|
150
|
+
configFile: false,
|
|
151
|
+
babelrc: false,
|
|
152
|
+
});
|
|
153
|
+
if (result?.code) {
|
|
154
|
+
return { contents: result.code, loader: 'js' };
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
catch (e) {
|
|
158
|
+
console.warn(`[ns-vendor-solid-jsx] failed to transform ${args.path}:`, e?.message || e);
|
|
159
|
+
}
|
|
160
|
+
// Fall through to esbuild's default handling
|
|
161
|
+
return undefined;
|
|
162
|
+
});
|
|
163
|
+
},
|
|
164
|
+
};
|
|
165
|
+
}
|
|
166
|
+
/**
|
|
167
|
+
* esbuild plugin that rewrites Unicode property-escape regular expressions
|
|
168
|
+
* (`\p{…}` / `\P{…}` used with the `u`/`v` flag) in vendored `node_modules`
|
|
169
|
+
* code into explicit character ranges, via
|
|
170
|
+
* `@babel/plugin-transform-unicode-property-regex`.
|
|
171
|
+
*
|
|
172
|
+
* NativeScript's V8 is compiled WITHOUT ICU/Intl, so Unicode property escapes
|
|
173
|
+
* are unrecognized and throw `SyntaxError: Invalid property name in character
|
|
174
|
+
* class` at *compile* time — not at match time. Because the HMR vendor bundle
|
|
175
|
+
* is a single large module, one offending regex (e.g. highlight.js's
|
|
176
|
+
* `TAG_NAME_RE = regex.concat(/[\p{L}_]/u, …)`) aborts the whole `vendor.mjs`
|
|
177
|
+
* compile and takes the entire dev session down with the misleading
|
|
178
|
+
* "ES module returned empty namespace" error.
|
|
179
|
+
*
|
|
180
|
+
* Babel expands the escapes to explicit ranges (`[A-Za-z\xAA…]`) that compile
|
|
181
|
+
* on a non-ICU engine while preserving match semantics — the `u` flag itself
|
|
182
|
+
* works fine without ICU; only the `\p{…}` property lookups need it. The
|
|
183
|
+
* transform is gated on a cheap substring check so only files that actually
|
|
184
|
+
* contain `\p{` / `\P{` pay the parse/regenerate cost, and any failure falls
|
|
185
|
+
* through to the untransformed source rather than aborting the build.
|
|
186
|
+
*/
|
|
187
|
+
export function createUnicodeRegexEsbuildPlugin(projectRoot) {
|
|
188
|
+
// Lazy-load Babel and the transform so the cost is only paid when a vendored
|
|
189
|
+
// package actually ships property-escape regexes.
|
|
190
|
+
let babel;
|
|
191
|
+
let unicodePropertyRegexPlugin;
|
|
192
|
+
let toolingUnavailable = false;
|
|
193
|
+
return {
|
|
194
|
+
name: 'ns-vendor-unicode-regex',
|
|
195
|
+
setup(build) {
|
|
196
|
+
const debug = process.env.VITE_DEBUG_LOGS === 'true' || process.env.VITE_DEBUG_LOGS === '1';
|
|
197
|
+
// .js/.mjs/.cjs only — .jsx/.tsx are owned by the Solid JSX pass and
|
|
198
|
+
// Angular partials by the linker pass.
|
|
199
|
+
build.onLoad({ filter: /node_modules[\\/].*\.[mc]?js$/ }, async (args) => {
|
|
200
|
+
// Angular framework files are handled by the linker pass; leave them
|
|
201
|
+
// to it to avoid double-processing the same module.
|
|
202
|
+
if (/[\\/](?:@angular|@nativescript[\\/]angular)[\\/]/.test(args.path)) {
|
|
203
|
+
return undefined;
|
|
204
|
+
}
|
|
205
|
+
let source;
|
|
206
|
+
try {
|
|
207
|
+
source = await readFile(args.path, 'utf-8');
|
|
208
|
+
}
|
|
209
|
+
catch {
|
|
210
|
+
return undefined;
|
|
211
|
+
}
|
|
212
|
+
// Fast path: skip files that cannot contain a property escape.
|
|
213
|
+
if (!source.includes('\\p{') && !source.includes('\\P{')) {
|
|
214
|
+
return undefined;
|
|
215
|
+
}
|
|
216
|
+
if (toolingUnavailable) {
|
|
217
|
+
return undefined;
|
|
218
|
+
}
|
|
219
|
+
try {
|
|
220
|
+
if (!babel) {
|
|
221
|
+
babel = await import('@babel/core');
|
|
222
|
+
unicodePropertyRegexPlugin = (await import('@babel/plugin-transform-unicode-property-regex')).default;
|
|
223
|
+
}
|
|
224
|
+
}
|
|
225
|
+
catch (e) {
|
|
226
|
+
// Don't fail the build if the optional transform tooling is
|
|
227
|
+
// missing — leave the regex as-is (it only matters if the
|
|
228
|
+
// package is actually evaluated on-device).
|
|
229
|
+
toolingUnavailable = true;
|
|
230
|
+
console.warn(`[ns-vendor-unicode-regex] @babel/plugin-transform-unicode-property-regex unavailable; leaving \\p{} regexes untransformed:`, e?.message || e);
|
|
231
|
+
return undefined;
|
|
232
|
+
}
|
|
233
|
+
try {
|
|
234
|
+
const result = await babel.transformAsync(source, {
|
|
235
|
+
filename: args.path,
|
|
236
|
+
// node_modules dist files may be ESM or CJS/UMD; let Babel decide.
|
|
237
|
+
sourceType: 'unambiguous',
|
|
238
|
+
plugins: [unicodePropertyRegexPlugin],
|
|
239
|
+
ast: false,
|
|
240
|
+
sourceMaps: false,
|
|
241
|
+
configFile: false,
|
|
242
|
+
babelrc: false,
|
|
243
|
+
});
|
|
244
|
+
if (result?.code) {
|
|
245
|
+
if (debug) {
|
|
246
|
+
console.log('[ns-vendor-unicode-regex] transformed', args.path);
|
|
247
|
+
}
|
|
248
|
+
return { contents: result.code, loader: 'js' };
|
|
249
|
+
}
|
|
250
|
+
}
|
|
251
|
+
catch (e) {
|
|
252
|
+
console.warn(`[ns-vendor-unicode-regex] failed to transform ${args.path}:`, e?.message || e);
|
|
253
|
+
}
|
|
254
|
+
return undefined;
|
|
255
|
+
});
|
|
256
|
+
},
|
|
257
|
+
};
|
|
258
|
+
}
|
|
259
|
+
/**
|
|
260
|
+
* Minimal esbuild plugin to run Angular linker (Babel) over partial-compiled
|
|
261
|
+
* Angular packages in node_modules. This converts ɵɵngDeclare* calls into
|
|
262
|
+
* ɵɵdefine* so runtime doesn't require the JIT compiler.
|
|
263
|
+
*/
|
|
264
|
+
export function angularLinkerEsbuildPlugin(projectRoot) {
|
|
265
|
+
// Restrict to Angular framework packages to minimize esbuild memory usage.
|
|
266
|
+
const FILTER = /node_modules[\\/](?:@angular|@nativescript[\\/]angular)[\\/].*\.[mc]?js$/;
|
|
267
|
+
return {
|
|
268
|
+
name: 'ns-angular-linker',
|
|
269
|
+
async setup(build) {
|
|
270
|
+
const debug = process.env.VITE_DEBUG_LOGS === 'true' || process.env.VITE_DEBUG_LOGS === '1';
|
|
271
|
+
const { babel, createLinker } = await getAngularLinkerFactory(projectRoot);
|
|
272
|
+
if (!babel || !createLinker) {
|
|
273
|
+
// Nothing to do if deps unavailable
|
|
274
|
+
return;
|
|
275
|
+
}
|
|
276
|
+
build.onLoad({ filter: FILTER }, async (args) => {
|
|
277
|
+
try {
|
|
278
|
+
const source = await readFile(args.path, 'utf8');
|
|
279
|
+
// Fast-path: only run linker when partial declarations are present
|
|
280
|
+
if (!(source.includes('\u0275\u0275ngDeclare') || source.includes('ɵɵngDeclare'))) {
|
|
281
|
+
return { contents: source, loader: 'js' };
|
|
282
|
+
}
|
|
283
|
+
if (debug) {
|
|
284
|
+
console.log('[ns-angular-linker][vendor] linking', args.path);
|
|
285
|
+
}
|
|
286
|
+
const linked = await runAngularLinker(source, { filename: args.path, projectRoot, freshPlugin: true });
|
|
287
|
+
return { contents: linked || source, loader: 'js' };
|
|
288
|
+
}
|
|
289
|
+
catch {
|
|
290
|
+
return { contents: await readFile(args.path, 'utf8'), loader: 'js' };
|
|
291
|
+
}
|
|
292
|
+
});
|
|
293
|
+
},
|
|
294
|
+
};
|
|
295
|
+
}
|
|
296
|
+
//# sourceMappingURL=vendor-esbuild-plugins.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"vendor-esbuild-plug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EAAE,MAAM,EAAE,IAAI,EAAE,CAAC;oBAC3C,CAAC;oBACD,IAAI,KAAK,EAAE,CAAC;wBACX,OAAO,CAAC,GAAG,CAAC,qCAAqC,EAAE,IAAI,CAAC,IAAI,CAAC,CAAC;oBAC/D,CAAC;oBACD,MAAM,MAAM,GAAG,MAAM,gBAAgB,CAAC,MAAM,EAAE,EAAE,QAAQ,EAAE,IAAI,CAAC,IAAI,EAAE,WAAW,EAAE,WAAW,EAAE,IAAI,EAAE,CAAC,CAAC;oBACvG,OAAO,EAAE,QAAQ,EAAE,MAAM,IAAI,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC;gBACrD,CAAC;gBAAC,MAAM,CAAC;oBACR,OAAO,EAAE,QAAQ,EAAE,MAAM,QAAQ,CAAC,IAAI,CAAC,IAAI,EAAE,MAAM,CAAC,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC;gBACtE,CAAC;YACF,CAAC,CAAC,CAAC;QACJ,CAAC;KACD,CAAC;AACH,CAAC"}
|
package/hmr/vendor-bootstrap.js
CHANGED
|
@@ -1,11 +1,9 @@
|
|
|
1
|
-
|
|
2
|
-
// Ensures a stable global lookup for vendor modules that were bundled and registered.
|
|
3
|
-
// This can be injected or imported by the HMR runtime before rewriting modules rely on it.
|
|
1
|
+
import { getGlobalScope } from './shared/runtime/global-scope.js';
|
|
4
2
|
(function initVendorAccessor() {
|
|
5
|
-
if (
|
|
3
|
+
if (getGlobalScope().__nsVendor)
|
|
6
4
|
return;
|
|
7
|
-
const getManifest = () =>
|
|
8
|
-
const getRegistry = () =>
|
|
5
|
+
const getManifest = () => getGlobalScope().__NS_VENDOR_MANIFEST__ || null;
|
|
6
|
+
const getRegistry = () => getGlobalScope().__nsModules || getGlobalScope().__nsModuleRegistry || null;
|
|
9
7
|
const accessor = function (id) {
|
|
10
8
|
if (!id)
|
|
11
9
|
return undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"vendor-bootstrap.js","sourceRoot":"","sources":["../../../../packages/vite/hmr/vendor-bootstrap.ts"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"vendor-bootstrap.js","sourceRoot":"","sources":["../../../../packages/vite/hmr/vendor-bootstrap.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,kCAAkC,CAAC;AASlE,CAAC,SAAS,kBAAkB;IAC3B,IAAI,cAAc,EAAE,CAAC,UAAU;QAAE,OAAO;IAExC,MAAM,WAAW,GAAG,GAAG,EAAE,CAAC,cAAc,EAAE,CAAC,sBAAsB,IAAI,IAAI,CAAC;IAC1E,MAAM,WAAW,GAAG,GAAG,EAAE,CAAC,cAAc,EAAE,CAAC,WAAW,IAAI,cAAc,EAAE,CAAC,kBAAkB,IAAI,IAAI,CAAC;IAEtG,MAAM,QAAQ,GAAmB,UAAU,EAAU;QACpD,IAAI,CAAC,EAAE;YAAE,OAAO,SAAS,CAAC;QAC1B,MAAM,QAAQ,GAAG,WAAW,EAAE,CAAC;QAC/B,MAAM,QAAQ,GAAG,WAAW,EAAE,CAAC;QAC/B,IAAI,CAAC,QAAQ,IAAI,CAAC,QAAQ,CAAC,OAAO,IAAI,CAAC,QAAQ;YAAE,OAAO,SAAS,CAAC;QAClE,eAAe;QACf,IAAI,QAAQ,CAAC,GAAG,IAAI,QAAQ,CAAC,GAAG,CAAC,EAAE,CAAC;YAAE,OAAO,QAAQ,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;QAC9D,uBAAuB;QACvB,MAAM,KAAK,GAAG,QAAQ,CAAC,OAAO,EAAE,CAAC,EAAE,CAAC,CAAC;QACrC,IAAI,KAAK,IAAI,QAAQ,CAAC,GAAG,IAAI,QAAQ,CAAC,GAAG,CAAC,KAAK,CAAC;YAAE,OAAO,QAAQ,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;QAC7E,OAAO,SAAS,CAAC;IAClB,CAAC,CAAC;IAEF,MAAM,CAAC,cAAc,CAAC,UAAU,EAAE,YAAY,EAAE;QAC/C,KAAK,EAAE,QAAQ;QACf,UAAU,EAAE,KAAK;QACjB,YAAY,EAAE,IAAI;QAClB,QAAQ,EAAE,KAAK;KACf,CAAC,CAAC;AACJ,CAAC,CAAC,EAAE,CAAC"}
|
package/index.d.ts
CHANGED
|
@@ -2,3 +2,4 @@ export * from './configuration/base.js';
|
|
|
2
2
|
export * from './configuration/javascript.js';
|
|
3
3
|
export * from './configuration/typescript.js';
|
|
4
4
|
export { appComponentsPlugin, type AppComponentsOptions } from './helpers/app-components.js';
|
|
5
|
+
export { getCliFlags } from './helpers/cli-flags.js';
|
package/index.js
CHANGED
|
@@ -3,6 +3,11 @@ export * from './configuration/javascript.js';
|
|
|
3
3
|
export * from './configuration/typescript.js';
|
|
4
4
|
// App components plugin for custom Android Activity/Application classes
|
|
5
5
|
export { appComponentsPlugin } from './helpers/app-components.js';
|
|
6
|
+
// Helper for parsing `--env.foo=bar` style flags forwarded by the NativeScript
|
|
7
|
+
// CLI (and any other `vite … -- --env.X=Y` invocation). Exposed so apps with a
|
|
8
|
+
// custom `vite.config.ts` can read the same flag set the base config sees
|
|
9
|
+
// without having to re-implement the parser.
|
|
10
|
+
export { getCliFlags } from './helpers/cli-flags.js';
|
|
6
11
|
// Simple CLI entry to support `npx @nativescript/vite init`
|
|
7
12
|
// This keeps the library export surface intact while allowing a
|
|
8
13
|
// lightweight command for project bootstrapping.
|
package/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../packages/vite/index.ts"],"names":[],"mappings":"AAAA,cAAc,yBAAyB,CAAC;AACxC,cAAc,+BAA+B,CAAC;AAC9C,cAAc,+BAA+B,CAAC;AAE9C,wEAAwE;AACxE,OAAO,EAAE,mBAAmB,EAA6B,MAAM,6BAA6B,CAAC;AAE7F,4DAA4D;AAC5D,gEAAgE;AAChE,iDAAiD;AACjD,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI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AAE,OAAO,IAAI,GAAG,CAAC,CAAC;QACxE,OAAO,CAAC,QAAQ,GAAG,CAAC,CAAC;IACtB,CAAC,CAAC,CAAC;AACL,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,11 +1,18 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nativescript/vite",
|
|
3
|
-
"version": "8.0.0-alpha.
|
|
3
|
+
"version": "8.0.0-alpha.51",
|
|
4
4
|
"description": "Vite for NativeScript",
|
|
5
5
|
"main": "./index.js",
|
|
6
6
|
"module": "./index.js",
|
|
7
7
|
"types": "./index.d.ts",
|
|
8
8
|
"type": "module",
|
|
9
|
+
"files": [
|
|
10
|
+
"**/*.d.ts",
|
|
11
|
+
"**/*.js",
|
|
12
|
+
"**/*.mjs",
|
|
13
|
+
"**/*.cjs",
|
|
14
|
+
"**/*.map"
|
|
15
|
+
],
|
|
9
16
|
"exports": {
|
|
10
17
|
".": {
|
|
11
18
|
"types": "./index.d.ts",
|
|
@@ -27,6 +34,11 @@
|
|
|
27
34
|
"import": "./configuration/solid.js",
|
|
28
35
|
"default": "./configuration/solid.js"
|
|
29
36
|
},
|
|
37
|
+
"./solid-bootstrap": {
|
|
38
|
+
"types": "./hmr/frameworks/solid/client/app-runtime.d.ts",
|
|
39
|
+
"import": "./hmr/frameworks/solid/client/app-runtime.js",
|
|
40
|
+
"default": "./hmr/frameworks/solid/client/app-runtime.js"
|
|
41
|
+
},
|
|
30
42
|
"./vue": {
|
|
31
43
|
"types": "./configuration/vue.d.ts",
|
|
32
44
|
"import": "./configuration/vue.js",
|
|
@@ -78,32 +90,70 @@
|
|
|
78
90
|
"vite"
|
|
79
91
|
],
|
|
80
92
|
"dependencies": {
|
|
81
|
-
"@analogjs/vite-plugin-angular": "^2.0.0",
|
|
82
|
-
"@angular-devkit/build-angular": "^21.0.0",
|
|
83
|
-
"@angular/build": "^21.0.0",
|
|
84
93
|
"@babel/core": "^7.28.0",
|
|
85
94
|
"@babel/generator": "^7.28.0",
|
|
86
95
|
"@babel/parser": "^7.28.0",
|
|
87
96
|
"@babel/plugin-transform-typescript": "^7.28.0",
|
|
97
|
+
"@babel/plugin-transform-unicode-property-regex": "^7.25.9",
|
|
88
98
|
"@rollup/plugin-alias": "^6.0.0",
|
|
89
99
|
"@rollup/plugin-commonjs": "^29.0.0",
|
|
90
100
|
"@rollup/plugin-replace": "^6.0.2",
|
|
91
|
-
"
|
|
92
|
-
"@vitejs/plugin-vue-jsx": "^5.1.5",
|
|
93
|
-
"@vue/compiler-sfc": "^3.5.0",
|
|
94
|
-
"vue-tsc": "^3.2.0",
|
|
101
|
+
"css": "^3.0.0",
|
|
95
102
|
"esbuild": "^0.27.4",
|
|
96
103
|
"minimist": "^1.2.8",
|
|
97
|
-
"react-reconciler": "^0.32.0",
|
|
98
104
|
"sass": ">=1.70.0 <2",
|
|
99
105
|
"vite": "^8.0.0",
|
|
100
|
-
"vite-plugin-solid": "^2.11.11",
|
|
101
106
|
"vite-plugin-static-copy": "^4.0.1",
|
|
102
107
|
"ws": "^8.18.0"
|
|
103
108
|
},
|
|
109
|
+
"peerDependencies": {
|
|
110
|
+
"@analogjs/vite-plugin-angular": "^2.0.0",
|
|
111
|
+
"@angular/build": "^21.0.0",
|
|
112
|
+
"@vitejs/plugin-vue": "^6.0.5",
|
|
113
|
+
"@vitejs/plugin-vue-jsx": "^5.1.5",
|
|
114
|
+
"@vue/compiler-sfc": "^3.5.0",
|
|
115
|
+
"react-reconciler": "^0.32.0",
|
|
116
|
+
"vite-plugin-solid": "^2.11.11",
|
|
117
|
+
"vue-tsc": "^3.2.0"
|
|
118
|
+
},
|
|
119
|
+
"peerDependenciesMeta": {
|
|
120
|
+
"@analogjs/vite-plugin-angular": {
|
|
121
|
+
"optional": true
|
|
122
|
+
},
|
|
123
|
+
"@angular/build": {
|
|
124
|
+
"optional": true
|
|
125
|
+
},
|
|
126
|
+
"@vitejs/plugin-vue": {
|
|
127
|
+
"optional": true
|
|
128
|
+
},
|
|
129
|
+
"@vitejs/plugin-vue-jsx": {
|
|
130
|
+
"optional": true
|
|
131
|
+
},
|
|
132
|
+
"@vue/compiler-sfc": {
|
|
133
|
+
"optional": true
|
|
134
|
+
},
|
|
135
|
+
"react-reconciler": {
|
|
136
|
+
"optional": true
|
|
137
|
+
},
|
|
138
|
+
"vite-plugin-solid": {
|
|
139
|
+
"optional": true
|
|
140
|
+
},
|
|
141
|
+
"vue-tsc": {
|
|
142
|
+
"optional": true
|
|
143
|
+
}
|
|
144
|
+
},
|
|
104
145
|
"devDependencies": {
|
|
146
|
+
"@analogjs/vite-plugin-angular": "^2.0.0",
|
|
147
|
+
"@angular/build": "^21.0.0",
|
|
148
|
+
"@types/css": "^0.0.38",
|
|
105
149
|
"@types/node": "^24.9.1",
|
|
106
|
-
"
|
|
150
|
+
"@vitejs/plugin-vue": "^6.0.5",
|
|
151
|
+
"@vitejs/plugin-vue-jsx": "^5.1.5",
|
|
152
|
+
"@vue/compiler-sfc": "^3.5.0",
|
|
153
|
+
"react-reconciler": "^0.32.0",
|
|
154
|
+
"vite-plugin-solid": "^2.11.11",
|
|
155
|
+
"vitest": "~4.0.9",
|
|
156
|
+
"vue-tsc": "^3.2.0"
|
|
107
157
|
},
|
|
108
158
|
"homepage": "https://docs.nativescript.org/configuration/vite",
|
|
109
159
|
"repository": {
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
// Runs on device in the virtual entry context.
|
|
1
|
+
import { getGlobalScope } from '../hmr/shared/runtime/global-scope.js';
|
|
3
2
|
export function installCoreAliasesEarly(verbose) {
|
|
4
3
|
try {
|
|
5
|
-
const g =
|
|
4
|
+
const g = getGlobalScope();
|
|
6
5
|
const resolveModule = (moduleIds) => {
|
|
7
6
|
for (const moduleId of moduleIds) {
|
|
8
7
|
try {
|
|
@@ -93,29 +92,23 @@ export function installCoreAliasesEarly(verbose) {
|
|
|
93
92
|
if (val && needs) {
|
|
94
93
|
g[n] = val;
|
|
95
94
|
if (verbose) {
|
|
96
|
-
|
|
97
|
-
console.info('[ns-entry] core alias (early)', n);
|
|
98
|
-
}
|
|
99
|
-
catch { }
|
|
95
|
+
console.info('[ns-entry] core alias (early)', n);
|
|
100
96
|
}
|
|
101
97
|
}
|
|
102
98
|
}
|
|
103
99
|
catch { }
|
|
104
100
|
}
|
|
105
101
|
if (verbose) {
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
});
|
|
117
|
-
}
|
|
118
|
-
catch { }
|
|
102
|
+
console.info('[ns-entry] core alias status (early)', {
|
|
103
|
+
has: { Frame: !!g.Frame, Application: !!g.Application, Page: !!g.Page },
|
|
104
|
+
resolution: resolutionStatus,
|
|
105
|
+
moduleApis: {
|
|
106
|
+
moduleExists: typeof g.moduleExists === 'function',
|
|
107
|
+
loadModule: typeof g.loadModule === 'function',
|
|
108
|
+
uiModuleRegistered: typeof g.moduleExists === 'function' ? !!g.moduleExists('@nativescript/core/ui') : false,
|
|
109
|
+
},
|
|
110
|
+
methods: { FrameTopmost: typeof g.Frame?.topmost === 'function', AppResetRoot: typeof g.Application?.resetRootView === 'function' },
|
|
111
|
+
});
|
|
119
112
|
}
|
|
120
113
|
// Android-only resilience: patch AndroidApplication.init
|
|
121
114
|
try {
|
|
@@ -217,10 +210,7 @@ export function installCoreAliasesEarly(verbose) {
|
|
|
217
210
|
}
|
|
218
211
|
catch { }
|
|
219
212
|
if (verbose) {
|
|
220
|
-
|
|
221
|
-
console.warn('[ns-entry][android] Application.init called with null and resolution failed; deferring.');
|
|
222
|
-
}
|
|
223
|
-
catch { }
|
|
213
|
+
console.warn('[ns-entry][android] Application.init called with null and resolution failed; deferring.');
|
|
224
214
|
}
|
|
225
215
|
return;
|
|
226
216
|
}
|
|
@@ -240,10 +230,7 @@ export function installCoreAliasesEarly(verbose) {
|
|
|
240
230
|
}
|
|
241
231
|
catch { }
|
|
242
232
|
if (verbose) {
|
|
243
|
-
|
|
244
|
-
console.info('[ns-entry][android] Application.init already initialized; continuing.');
|
|
245
|
-
}
|
|
246
|
-
catch { }
|
|
233
|
+
console.info('[ns-entry][android] Application.init already initialized; continuing.');
|
|
247
234
|
}
|
|
248
235
|
return;
|
|
249
236
|
}
|
|
@@ -255,10 +242,7 @@ export function installCoreAliasesEarly(verbose) {
|
|
|
255
242
|
}
|
|
256
243
|
catch { }
|
|
257
244
|
if (verbose) {
|
|
258
|
-
|
|
259
|
-
console.info('[ns-entry] AndroidApplication.init patched for resilience');
|
|
260
|
-
}
|
|
261
|
-
catch { }
|
|
245
|
+
console.info('[ns-entry] AndroidApplication.init patched for resilience');
|
|
262
246
|
}
|
|
263
247
|
}
|
|
264
248
|
catch { }
|
|
@@ -318,10 +302,7 @@ export function installCoreAliasesEarly(verbose) {
|
|
|
318
302
|
const patched = function __ns_safe_resetRootView(entry) {
|
|
319
303
|
if (!isReady()) {
|
|
320
304
|
if (verbose) {
|
|
321
|
-
|
|
322
|
-
console.info('[ns-entry][android] deferring resetRootView until activity is ready');
|
|
323
|
-
}
|
|
324
|
-
catch { }
|
|
305
|
+
console.info('[ns-entry][android] deferring resetRootView until activity is ready');
|
|
325
306
|
}
|
|
326
307
|
return once(() => {
|
|
327
308
|
try {
|
|
@@ -334,27 +315,19 @@ export function installCoreAliasesEarly(verbose) {
|
|
|
334
315
|
catch { }
|
|
335
316
|
}
|
|
336
317
|
catch (e) {
|
|
337
|
-
|
|
338
|
-
console.error('[ns-entry][android] deferred resetRootView failed', e);
|
|
339
|
-
}
|
|
340
|
-
catch { }
|
|
318
|
+
console.error('[ns-entry][android] deferred resetRootView failed', e);
|
|
341
319
|
throw e;
|
|
342
320
|
}
|
|
343
321
|
});
|
|
344
322
|
}
|
|
323
|
+
const res = origReset.call(this, entry);
|
|
345
324
|
try {
|
|
346
|
-
const
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
if (typeof restore === 'function')
|
|
350
|
-
restore();
|
|
351
|
-
}
|
|
352
|
-
catch { }
|
|
353
|
-
return res;
|
|
354
|
-
}
|
|
355
|
-
catch (e) {
|
|
356
|
-
throw e;
|
|
325
|
+
const restore = g['__NS_DEV_RESTORE_PLACEHOLDER__'];
|
|
326
|
+
if (typeof restore === 'function')
|
|
327
|
+
restore();
|
|
357
328
|
}
|
|
329
|
+
catch { }
|
|
330
|
+
return res;
|
|
358
331
|
};
|
|
359
332
|
try {
|
|
360
333
|
App.resetRootView = patched;
|
|
@@ -370,10 +343,7 @@ export function installCoreAliasesEarly(verbose) {
|
|
|
370
343
|
}
|
|
371
344
|
catch { }
|
|
372
345
|
if (verbose) {
|
|
373
|
-
|
|
374
|
-
console.info('[ns-entry] Application.resetRootView patched for early-boot readiness');
|
|
375
|
-
}
|
|
376
|
-
catch { }
|
|
346
|
+
console.info('[ns-entry] Application.resetRootView patched for early-boot readiness');
|
|
377
347
|
}
|
|
378
348
|
}
|
|
379
349
|
}
|