@nativescript/vite 8.0.0-alpha.57 → 8.0.0-alpha.59

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (102) hide show
  1. package/configuration/angular.js +3 -3
  2. package/configuration/angular.js.map +1 -1
  3. package/helpers/global-defines.d.ts +1 -1
  4. package/helpers/global-defines.js +1 -1
  5. package/helpers/workers.js +10 -10
  6. package/helpers/workers.js.map +1 -1
  7. package/hmr/client/hot-context.d.ts +67 -0
  8. package/hmr/client/hot-context.js +284 -0
  9. package/hmr/client/hot-context.js.map +1 -0
  10. package/hmr/client/index.js +49 -60
  11. package/hmr/client/index.js.map +1 -1
  12. package/hmr/client/utils.js +29 -57
  13. package/hmr/client/utils.js.map +1 -1
  14. package/hmr/entry-runtime.js +73 -39
  15. package/hmr/entry-runtime.js.map +1 -1
  16. package/hmr/frameworks/angular/client/index.js +103 -161
  17. package/hmr/frameworks/angular/client/index.js.map +1 -1
  18. package/hmr/frameworks/angular/server/strategy.js +4 -6
  19. package/hmr/frameworks/angular/server/strategy.js.map +1 -1
  20. package/hmr/frameworks/angular/server/websocket-angular-hot-update.js +2 -2
  21. package/hmr/frameworks/angular/server/websocket-angular-hot-update.js.map +1 -1
  22. package/hmr/frameworks/solid/client/app-runtime.js +9 -7
  23. package/hmr/frameworks/solid/client/app-runtime.js.map +1 -1
  24. package/hmr/frameworks/solid/server/strategy.js +1 -1
  25. package/hmr/frameworks/solid/server/strategy.js.map +1 -1
  26. package/hmr/frameworks/typescript/server/strategy.js +1 -1
  27. package/hmr/frameworks/typescript/server/strategy.js.map +1 -1
  28. package/hmr/frameworks/vue/client/index.d.ts +1 -0
  29. package/hmr/frameworks/vue/client/index.js +54 -10
  30. package/hmr/frameworks/vue/client/index.js.map +1 -1
  31. package/hmr/frameworks/vue/server/sfc-route-assemble.js +32 -39
  32. package/hmr/frameworks/vue/server/sfc-route-assemble.js.map +1 -1
  33. package/hmr/frameworks/vue/server/sfc-route-serve.js +18 -30
  34. package/hmr/frameworks/vue/server/sfc-route-serve.js.map +1 -1
  35. package/hmr/frameworks/vue/server/sfc-route-shared.d.ts +13 -16
  36. package/hmr/frameworks/vue/server/sfc-route-shared.js +20 -24
  37. package/hmr/frameworks/vue/server/sfc-route-shared.js.map +1 -1
  38. package/hmr/frameworks/vue/server/strategy.js +14 -12
  39. package/hmr/frameworks/vue/server/strategy.js.map +1 -1
  40. package/hmr/helpers/vendor-rewrite.d.ts +1 -1
  41. package/hmr/helpers/vendor-rewrite.js +5 -3
  42. package/hmr/helpers/vendor-rewrite.js.map +1 -1
  43. package/hmr/server/boot-closure-route.d.ts +16 -0
  44. package/hmr/server/boot-closure-route.js +99 -0
  45. package/hmr/server/boot-closure-route.js.map +1 -0
  46. package/hmr/server/core-bundle.d.ts +126 -0
  47. package/hmr/server/core-bundle.js +474 -0
  48. package/hmr/server/core-bundle.js.map +1 -0
  49. package/hmr/server/framework-strategy.d.ts +10 -5
  50. package/hmr/server/hmr-module-graph.js +7 -6
  51. package/hmr/server/hmr-module-graph.js.map +1 -1
  52. package/hmr/server/import-map.d.ts +3 -3
  53. package/hmr/server/import-map.js +4 -4
  54. package/hmr/server/import-map.js.map +1 -1
  55. package/hmr/server/ns-rt-route.js +2 -1
  56. package/hmr/server/ns-rt-route.js.map +1 -1
  57. package/hmr/server/perf-instrumentation.js +1 -1
  58. package/hmr/server/perf-instrumentation.js.map +1 -1
  59. package/hmr/server/process-code-for-device.d.ts +16 -0
  60. package/hmr/server/process-code-for-device.js +94 -2
  61. package/hmr/server/process-code-for-device.js.map +1 -1
  62. package/hmr/server/vite-plugin.d.ts +1 -0
  63. package/hmr/server/vite-plugin.js +110 -20
  64. package/hmr/server/vite-plugin.js.map +1 -1
  65. package/hmr/server/websocket-import-map-route.d.ts +1 -1
  66. package/hmr/server/websocket-import-map-route.js +1 -1
  67. package/hmr/server/websocket-ns-core.d.ts +16 -3
  68. package/hmr/server/websocket-ns-core.js +108 -5
  69. package/hmr/server/websocket-ns-core.js.map +1 -1
  70. package/hmr/server/websocket-ns-m-paths.d.ts +1 -3
  71. package/hmr/server/websocket-ns-m-paths.js +24 -80
  72. package/hmr/server/websocket-ns-m-paths.js.map +1 -1
  73. package/hmr/server/websocket-ns-m.js +41 -77
  74. package/hmr/server/websocket-ns-m.js.map +1 -1
  75. package/hmr/server/websocket-served-module-helpers.d.ts +1 -1
  76. package/hmr/server/websocket-served-module-helpers.js +11 -5
  77. package/hmr/server/websocket-served-module-helpers.js.map +1 -1
  78. package/hmr/server/websocket-txn.js +4 -1
  79. package/hmr/server/websocket-txn.js.map +1 -1
  80. package/hmr/server/websocket.js +8 -1
  81. package/hmr/server/websocket.js.map +1 -1
  82. package/hmr/shared/ns-globals.d.ts +2 -15
  83. package/hmr/shared/ns-globals.js +2 -3
  84. package/hmr/shared/ns-globals.js.map +1 -1
  85. package/hmr/shared/runtime/boot-complete.d.ts +14 -0
  86. package/hmr/shared/runtime/boot-complete.js +32 -0
  87. package/hmr/shared/runtime/boot-complete.js.map +1 -0
  88. package/hmr/shared/runtime/boot-progress.js +6 -5
  89. package/hmr/shared/runtime/boot-progress.js.map +1 -1
  90. package/hmr/shared/runtime/boot-timeline.d.ts +1 -1
  91. package/hmr/shared/runtime/boot-timeline.js +6 -7
  92. package/hmr/shared/runtime/boot-timeline.js.map +1 -1
  93. package/hmr/shared/runtime/browser-runtime-contract.d.ts +34 -22
  94. package/hmr/shared/runtime/browser-runtime-contract.js +6 -9
  95. package/hmr/shared/runtime/browser-runtime-contract.js.map +1 -1
  96. package/hmr/shared/runtime/dev-overlay.js +1 -1
  97. package/hmr/shared/runtime/dev-overlay.js.map +1 -1
  98. package/hmr/shared/runtime/root-placeholder.js +5 -4
  99. package/hmr/shared/runtime/root-placeholder.js.map +1 -1
  100. package/hmr/shared/runtime/session-bootstrap.js +90 -48
  101. package/hmr/shared/runtime/session-bootstrap.js.map +1 -1
  102. package/package.json +5 -1
@@ -0,0 +1,126 @@
1
+ /**
2
+ * Single-eval @nativescript/core bundle for device serving (bundle mode).
3
+ *
4
+ * DEFAULT MODE (consumers)
5
+ * ------------------------
6
+ * Instead of serving @nativescript/core per-module through Vite's transform
7
+ * pipeline (~hundreds of serial HTTP fetches + per-file transforms during cold
8
+ * boot), the dev server pre-bundles the ENTIRE core package with esbuild into
9
+ * one ESM payload served at `GET /ns/core-bundle.mjs`. The canonical
10
+ * `/ns/core[/<sub>]` URL space is preserved — those routes serve THIN SHIMS
11
+ * that statically import the bundle and re-export the requested subpath's
12
+ * namespace from the `globalThis.__NS_CORE_MODULES__` registry the bundle
13
+ * populates. Because every shim's only dependency is the one bundle URL,
14
+ * V8/iOS evaluates core exactly once per app lifetime — the single-realm
15
+ * invariant is enforced by construction, with ONE big prefetchable payload
16
+ * instead of a deep serial fetch chain.
17
+ *
18
+ * OPT-IN PER-MODULE MODE (core maintainers)
19
+ * -----------------------------------------
20
+ * Set `NS_CORE_PER_MODULE=1` to keep the classic per-module `/ns/core` bridge
21
+ * (websocket-ns-core.ts). That is the right mode when editing
22
+ * `@nativescript/core` source live inside the NativeScript monorepo: each core
23
+ * module stays individually served/transformed so core edits participate in
24
+ * HMR. Consumers of the published package don't edit core mid-session, so the
25
+ * bundle is both safe and much faster for them.
26
+ *
27
+ * FAILURE FALLBACK
28
+ * ----------------
29
+ * If the esbuild bundle build fails for any reason, the service marks itself
30
+ * failed and `/ns/core[/<sub>]` transparently falls back to the per-module
31
+ * bridge for the whole session (logged loudly once). Boot still works; only
32
+ * the speed win is lost.
33
+ */
34
+ import type { ViteDevServer } from 'vite';
35
+ import type { Platform } from '../../helpers/platform-types.js';
36
+ /**
37
+ * Per-module /ns/core serving mode (vs the default single-eval bundle).
38
+ *
39
+ * `NS_CORE_PER_MODULE=1|true` forces it on, `0|false` forces bundle mode.
40
+ * When unset, it AUTO-ENABLES for monorepo core source (packages/core in the
41
+ * NativeScript repo). Two reasons:
42
+ * - core maintainers edit core live, and per-module serving keeps those
43
+ * edits in HMR;
44
+ * - realm safety: the build-time externalizer emits
45
+ * `/ns/m/packages/core/<file>` URLs for workspace-source core (see the
46
+ * `ns-core-external-urls` workspace branch in configuration/base.ts), so
47
+ * the served graph's core realm lives under /ns/m. A bundle-mode
48
+ * `/ns/core-bundle.mjs` would evaluate a complete SECOND copy of core for
49
+ * the entry's `/ns/core/globals|application|…` imports — duplicate native
50
+ * class registrations crash in MetadataBuilder at startup.
51
+ */
52
+ export declare function isCorePerModuleServingEnabled(env?: NodeJS.ProcessEnv, hasWorkspaceCoreSource?: () => boolean): boolean;
53
+ export interface CoreBundleState {
54
+ /** Full ESM payload served at /ns/core-bundle.mjs (shape header + esbuild output). */
55
+ code: string;
56
+ /** Canonical subpaths registered in the bundle's __NS_CORE_MODULES__ registry. */
57
+ subs: Set<string>;
58
+ hash: string;
59
+ builtAt: number;
60
+ buildMs: number;
61
+ }
62
+ export interface CoreBundleService {
63
+ /** Resolves the built bundle, or null when the build failed (per-module fallback). */
64
+ ensureBuilt(): Promise<CoreBundleState | null>;
65
+ /** Synchronous view — null until built (or when failed). */
66
+ getState(): CoreBundleState | null;
67
+ hasFailed(): boolean;
68
+ }
69
+ export interface GenerateCoreBundleOptions {
70
+ projectRoot: string;
71
+ platform: Platform | string;
72
+ mode: 'development' | 'production' | string;
73
+ flavor?: string;
74
+ verbose?: boolean;
75
+ }
76
+ /**
77
+ * Resolve the physical @nativescript/core root the same way configuration/
78
+ * base.ts does: prefer monorepo source (`<workspace>/packages/core`), else the
79
+ * node_modules install reachable from the project root.
80
+ */
81
+ export declare function resolveCoreRootForBundle(projectRoot: string): string;
82
+ /**
83
+ * True when a canonical core subpath was DELIBERATELY excluded from bundle
84
+ * enumeration (debugger/, inspector_modules, bundle-entry-points, …). Requests
85
+ * for these at boot are normal — the runtime's inspector/debugger plumbing
86
+ * imports them in dev — and the per-module fallback that serves them is
87
+ * by-design and realm-safe. Callers use this to keep the fallback log
88
+ * verbose-only for expected subs while still surfacing unexpected
89
+ * enumeration misses.
90
+ */
91
+ export declare function isExpectedCoreBundleExclusion(canonicalSub: string): boolean;
92
+ /**
93
+ * Enumerate every importable core subpath (canonical form, per
94
+ * `normalizeCoreSub`) for the given platform. A subpath is included when it
95
+ * has a platform-neutral variant OR a variant for the current platform —
96
+ * other-platform-only modules (e.g. `ui/frame/activity.android` on iOS) are
97
+ * skipped since they can never resolve for this build.
98
+ */
99
+ export declare function enumerateCoreModuleSubpaths(coreRoot: string, platform: string): string[];
100
+ /**
101
+ * Synthetic esbuild entry: evaluate core once, expose every subpath's live
102
+ * namespace through `globalThis.__NS_CORE_MODULES__` (the SAME registry the
103
+ * per-module bridge footers populate, so the vendor CJS `require()` shim and
104
+ * `_nsReq` lookups keep working unchanged), and re-export the package main so
105
+ * `/ns/core-bundle.mjs` itself has core's full named-export surface.
106
+ */
107
+ export declare function buildCoreBundleEntryCode(subs: readonly string[]): string;
108
+ export declare function generateCoreBundle(options: GenerateCoreBundleOptions): Promise<CoreBundleState>;
109
+ export declare function createCoreBundleService(options: GenerateCoreBundleOptions): CoreBundleService;
110
+ /**
111
+ * Process-wide bundle service derived from the dev server's config + CLI
112
+ * flags. One dev server per process, so a module-level singleton matches the
113
+ * vendor manifest's lifecycle.
114
+ */
115
+ export declare function getSharedCoreBundleService(server: ViteDevServer): CoreBundleService;
116
+ /** Test seam: drop the shared service so specs can mount fresh. */
117
+ export declare function resetSharedCoreBundleServiceForTests(): void;
118
+ export declare const CORE_BUNDLE_PATH = "/ns/core-bundle.mjs";
119
+ /**
120
+ * Shim served at `/ns/core` in bundle mode. `export * from` gives real,
121
+ * live named bindings straight off the bundle module record; the explicit
122
+ * default keeps the "default import + destructure" consumer rewrite working
123
+ * (see buildDefaultExportFooter in ns-core-cjs-shape.ts for that contract).
124
+ */
125
+ export declare function buildCoreMainShimCode(): string;
126
+ export declare function buildCoreSubShimCode(sub: string, exportNames: readonly string[], hasOwnDefaultExport?: boolean): string;
@@ -0,0 +1,474 @@
1
+ /**
2
+ * Single-eval @nativescript/core bundle for device serving (bundle mode).
3
+ *
4
+ * DEFAULT MODE (consumers)
5
+ * ------------------------
6
+ * Instead of serving @nativescript/core per-module through Vite's transform
7
+ * pipeline (~hundreds of serial HTTP fetches + per-file transforms during cold
8
+ * boot), the dev server pre-bundles the ENTIRE core package with esbuild into
9
+ * one ESM payload served at `GET /ns/core-bundle.mjs`. The canonical
10
+ * `/ns/core[/<sub>]` URL space is preserved — those routes serve THIN SHIMS
11
+ * that statically import the bundle and re-export the requested subpath's
12
+ * namespace from the `globalThis.__NS_CORE_MODULES__` registry the bundle
13
+ * populates. Because every shim's only dependency is the one bundle URL,
14
+ * V8/iOS evaluates core exactly once per app lifetime — the single-realm
15
+ * invariant is enforced by construction, with ONE big prefetchable payload
16
+ * instead of a deep serial fetch chain.
17
+ *
18
+ * OPT-IN PER-MODULE MODE (core maintainers)
19
+ * -----------------------------------------
20
+ * Set `NS_CORE_PER_MODULE=1` to keep the classic per-module `/ns/core` bridge
21
+ * (websocket-ns-core.ts). That is the right mode when editing
22
+ * `@nativescript/core` source live inside the NativeScript monorepo: each core
23
+ * module stays individually served/transformed so core edits participate in
24
+ * HMR. Consumers of the published package don't edit core mid-session, so the
25
+ * bundle is both safe and much faster for them.
26
+ *
27
+ * FAILURE FALLBACK
28
+ * ----------------
29
+ * If the esbuild bundle build fails for any reason, the service marks itself
30
+ * failed and `/ns/core[/<sub>]` transparently falls back to the per-module
31
+ * bridge for the whole session (logged loudly once). Boot still works; only
32
+ * the speed win is lost.
33
+ */
34
+ import { createRequire } from 'node:module';
35
+ import { existsSync, readdirSync, statSync } from 'node:fs';
36
+ import * as path from 'node:path';
37
+ import { createHash } from 'node:crypto';
38
+ import * as esbuild from 'esbuild';
39
+ import { getCliFlags } from '../../helpers/cli-flags.js';
40
+ import { getGlobalDefines } from '../../helpers/global-defines.js';
41
+ import { getProjectFlavor } from '../../helpers/flavor.js';
42
+ import { createNativeClassEsbuildPlugin } from '../../helpers/nativeclass-esbuild-plugin.js';
43
+ import { createUnicodeRegexEsbuildPlugin } from '../shared/vendor/vendor-esbuild-plugins.js';
44
+ import { moduleRegistrationKeys, normalizeCoreSub } from '../../helpers/ns-core-url.js';
45
+ import { buildShapeInstallHeader } from './ns-core-cjs-shape.js';
46
+ import { resolveVerboseFlag } from '../../helpers/logging.js';
47
+ import { nsConfigToJson } from '../../helpers/utils.js';
48
+ import { aliasCssTree } from '../../helpers/css-tree.js';
49
+ import { getWorkspaceCoreSourceRoot } from './websocket-served-module-helpers.js';
50
+ /**
51
+ * Per-module /ns/core serving mode (vs the default single-eval bundle).
52
+ *
53
+ * `NS_CORE_PER_MODULE=1|true` forces it on, `0|false` forces bundle mode.
54
+ * When unset, it AUTO-ENABLES for monorepo core source (packages/core in the
55
+ * NativeScript repo). Two reasons:
56
+ * - core maintainers edit core live, and per-module serving keeps those
57
+ * edits in HMR;
58
+ * - realm safety: the build-time externalizer emits
59
+ * `/ns/m/packages/core/<file>` URLs for workspace-source core (see the
60
+ * `ns-core-external-urls` workspace branch in configuration/base.ts), so
61
+ * the served graph's core realm lives under /ns/m. A bundle-mode
62
+ * `/ns/core-bundle.mjs` would evaluate a complete SECOND copy of core for
63
+ * the entry's `/ns/core/globals|application|…` imports — duplicate native
64
+ * class registrations crash in MetadataBuilder at startup.
65
+ */
66
+ export function isCorePerModuleServingEnabled(env = process.env, hasWorkspaceCoreSource = () => getWorkspaceCoreSourceRoot() !== null) {
67
+ const v = env.NS_CORE_PER_MODULE;
68
+ if (v === '1' || v === 'true')
69
+ return true;
70
+ if (v === '0' || v === 'false')
71
+ return false;
72
+ try {
73
+ return hasWorkspaceCoreSource();
74
+ }
75
+ catch {
76
+ return false;
77
+ }
78
+ }
79
+ /**
80
+ * Resolve the physical @nativescript/core root the same way configuration/
81
+ * base.ts does: prefer monorepo source (`<workspace>/packages/core`), else the
82
+ * node_modules install reachable from the project root.
83
+ */
84
+ export function resolveCoreRootForBundle(projectRoot) {
85
+ const workspaceCorePkg = path.resolve(projectRoot, '../../packages/core/package.json');
86
+ if (existsSync(workspaceCorePkg)) {
87
+ return path.dirname(workspaceCorePkg);
88
+ }
89
+ const req = createRequire(path.join(projectRoot, 'package.json'));
90
+ const corePkg = req.resolve('@nativescript/core/package.json');
91
+ return path.dirname(corePkg);
92
+ }
93
+ // Directories that are not runtime module space. `debugger/` and
94
+ // `inspector_modules` only evaluate when a Web Inspector session loads them
95
+ // (via the app bundle, not HTTP) and carry heavyweight side effects (network
96
+ // interception) that must NOT run on every boot, so they stay out of the
97
+ // bundle. A request for an excluded subpath falls back to per-module serving —
98
+ // realm-safe, because the per-module response's own core imports are rewritten
99
+ // back to `/ns/core/<sub>` shim URLs that resolve into the bundle realm.
100
+ const EXCLUDED_DIRS = new Set(['node_modules', 'platforms', 'cli-hooks', 'debugger', '.git', '__tests__', 'fixtures']);
101
+ const EXCLUDED_TOP_LEVEL_MODULES = new Set(['inspector_modules', 'bundle-entry-points', 'references', 'global-types', 'vite.config', 'vitest.setup']);
102
+ /**
103
+ * True when a canonical core subpath was DELIBERATELY excluded from bundle
104
+ * enumeration (debugger/, inspector_modules, bundle-entry-points, …). Requests
105
+ * for these at boot are normal — the runtime's inspector/debugger plumbing
106
+ * imports them in dev — and the per-module fallback that serves them is
107
+ * by-design and realm-safe. Callers use this to keep the fallback log
108
+ * verbose-only for expected subs while still surfacing unexpected
109
+ * enumeration misses.
110
+ */
111
+ export function isExpectedCoreBundleExclusion(canonicalSub) {
112
+ if (!canonicalSub)
113
+ return false;
114
+ return canonicalSub.split('/').some((seg) => EXCLUDED_TOP_LEVEL_MODULES.has(seg) || EXCLUDED_DIRS.has(seg));
115
+ }
116
+ const MODULE_FILE_RE = /\.(?:ts|tsx|js|mjs)$/;
117
+ const NON_MODULE_FILE_RE = /\.(?:d\.ts|spec\.(?:ts|js|tsx)|test\.(?:ts|js|tsx))$/;
118
+ function platformSuffixOf(baseName) {
119
+ const m = baseName.match(/\.(ios|android|visionos)$/);
120
+ return m?.[1] || null;
121
+ }
122
+ /**
123
+ * Enumerate every importable core subpath (canonical form, per
124
+ * `normalizeCoreSub`) for the given platform. A subpath is included when it
125
+ * has a platform-neutral variant OR a variant for the current platform —
126
+ * other-platform-only modules (e.g. `ui/frame/activity.android` on iOS) are
127
+ * skipped since they can never resolve for this build.
128
+ */
129
+ export function enumerateCoreModuleSubpaths(coreRoot, platform) {
130
+ const isApple = platform !== 'android';
131
+ // canonical sub → has a variant loadable on this platform
132
+ const loadable = new Map();
133
+ const visit = (dirAbs, relPrefix) => {
134
+ let entries;
135
+ try {
136
+ entries = readdirSync(dirAbs, { withFileTypes: true });
137
+ }
138
+ catch {
139
+ return;
140
+ }
141
+ for (const entry of entries) {
142
+ const name = entry.name;
143
+ if (name.startsWith('.'))
144
+ continue;
145
+ const rel = relPrefix ? `${relPrefix}/${name}` : name;
146
+ let isDir = entry.isDirectory();
147
+ if (entry.isSymbolicLink()) {
148
+ try {
149
+ isDir = statSync(path.join(dirAbs, name)).isDirectory();
150
+ }
151
+ catch {
152
+ continue;
153
+ }
154
+ }
155
+ if (isDir) {
156
+ if (EXCLUDED_DIRS.has(name))
157
+ continue;
158
+ visit(path.join(dirAbs, name), rel);
159
+ continue;
160
+ }
161
+ if (!MODULE_FILE_RE.test(name) || NON_MODULE_FILE_RE.test(name))
162
+ continue;
163
+ const relNoExt = rel.replace(MODULE_FILE_RE, '');
164
+ const suffix = platformSuffixOf(relNoExt);
165
+ const platformOk = suffix === null || (isApple ? suffix !== 'android' : suffix === 'android');
166
+ const canonical = normalizeCoreSub(relNoExt);
167
+ // '' is the package main — always included, not part of the sub list.
168
+ if (!canonical)
169
+ continue;
170
+ if (!relPrefix && EXCLUDED_TOP_LEVEL_MODULES.has(canonical))
171
+ continue;
172
+ if (canonical.split('/').some((seg) => EXCLUDED_TOP_LEVEL_MODULES.has(seg) || EXCLUDED_DIRS.has(seg)))
173
+ continue;
174
+ // Cross-platform helper modules without a platform suffix in their
175
+ // own filename (e.g. `ui/frame/frame-helper-for-android`) import
176
+ // siblings that only exist with the OTHER platform's suffix, so
177
+ // force-importing them on this platform can never resolve. They are
178
+ // only reachable from that platform's `index.<platform>` graph.
179
+ if (/-for-android$/.test(canonical) && isApple)
180
+ continue;
181
+ if (/-for-(?:ios|visionos)$/.test(canonical) && !isApple)
182
+ continue;
183
+ loadable.set(canonical, loadable.get(canonical) || false || platformOk);
184
+ }
185
+ };
186
+ visit(coreRoot, '');
187
+ return Array.from(loadable.entries())
188
+ .filter(([, ok]) => ok)
189
+ .map(([sub]) => sub)
190
+ .sort();
191
+ }
192
+ /**
193
+ * Synthetic esbuild entry: evaluate core once, expose every subpath's live
194
+ * namespace through `globalThis.__NS_CORE_MODULES__` (the SAME registry the
195
+ * per-module bridge footers populate, so the vendor CJS `require()` shim and
196
+ * `_nsReq` lookups keep working unchanged), and re-export the package main so
197
+ * `/ns/core-bundle.mjs` itself has core's full named-export surface.
198
+ */
199
+ export function buildCoreBundleEntryCode(subs) {
200
+ const lines = [];
201
+ // Package main first so its side-effect order (globals, bootstrap) matches
202
+ // the package's own intent; esbuild still evaluates shared deps once.
203
+ lines.push(`import * as __ns_core_main__ from ${JSON.stringify('@nativescript/core')};`);
204
+ subs.forEach((sub, i) => {
205
+ lines.push(`import * as __ns_core_m_${i}__ from ${JSON.stringify(`@nativescript/core/${sub}`)};`);
206
+ });
207
+ lines.push('');
208
+ lines.push('const __nsReg = (globalThis.__NS_CORE_MODULES__ || (globalThis.__NS_CORE_MODULES__ = Object.create(null)));');
209
+ lines.push(`const __nsShapeFn = typeof globalThis.__NS_CJS_SHAPE__ === 'function' ? globalThis.__NS_CJS_SHAPE__ : function (x) { return x; };`);
210
+ lines.push('const __nsRegSet = (keys, ns) => { const shaped = __nsShapeFn(ns); for (const k of keys) { __nsReg[k] = shaped; } };');
211
+ lines.push(`__nsRegSet(${JSON.stringify(moduleRegistrationKeys(''))}, __ns_core_main__);`);
212
+ subs.forEach((sub, i) => {
213
+ lines.push(`__nsRegSet(${JSON.stringify(moduleRegistrationKeys(sub))}, __ns_core_m_${i}__);`);
214
+ });
215
+ lines.push(`try { globalThis.__NS_CORE_EVAL_COUNT__ = (globalThis.__NS_CORE_EVAL_COUNT__ || 0) + 1; globalThis.__NS_CORE_BUNDLE_MODE__ = true; } catch (e) {}`);
216
+ lines.push(`export * from ${JSON.stringify('@nativescript/core')};`);
217
+ lines.push('');
218
+ return lines.join('\n');
219
+ }
220
+ // Platform-first extension order, mirroring Vite's `platformExtensions` in
221
+ // configuration/base.ts so the bundle resolves the same physical files the
222
+ // per-module bridge would (platform variant preferred over the bare one).
223
+ function coreResolveExtensions(platform) {
224
+ if (platform === 'android') {
225
+ return ['.android.tsx', '.tsx', '.android.jsx', '.jsx', '.android.ts', '.ts', '.android.js', '.js', '.mjs', '.cjs', '.json'];
226
+ }
227
+ return ['.ios.tsx', '.visionos.tsx', '.tsx', '.ios.jsx', '.visionos.jsx', '.jsx', '.ios.ts', '.visionos.ts', '.ts', '.ios.js', '.visionos.js', '.js', '.mjs', '.cjs', '.json'];
228
+ }
229
+ // Node built-ins the device runtime cannot resolve — externalized exactly like
230
+ // the vendor bundle build (see manifest.ts).
231
+ const NODE_BUILTINS = ['assert', 'async_hooks', 'buffer', 'child_process', 'cluster', 'console', 'constants', 'crypto', 'dgram', 'diagnostics_channel', 'dns', 'domain', 'events', 'fs', 'fs/promises', 'http', 'http2', 'https', 'inspector', 'module', 'net', 'os', 'path', 'path/posix', 'path/win32', 'perf_hooks', 'process', 'punycode', 'querystring', 'readline', 'repl', 'stream', 'stream/web', 'stream/promises', 'string_decoder', 'sys', 'timers', 'timers/promises', 'tls', 'trace_events', 'tty', 'url', 'util', 'v8', 'vm', 'wasi', 'worker_threads', 'zlib'];
232
+ const NODE_EXTERNALS = [...NODE_BUILTINS, ...NODE_BUILTINS.map((b) => `node:${b}`)];
233
+ export async function generateCoreBundle(options) {
234
+ const { projectRoot, platform, mode, flavor, verbose } = options;
235
+ const t0 = Date.now();
236
+ const coreRoot = resolveCoreRootForBundle(projectRoot);
237
+ const subs = enumerateCoreModuleSubpaths(coreRoot, String(platform));
238
+ const entryCode = buildCoreBundleEntryCode(subs);
239
+ // Resolve bare @nativescript/core[/sub] specifiers against the resolved
240
+ // core root directly. esbuild's default node-resolution can't be trusted
241
+ // here for two reasons: (1) monorepo apps consume core via a symlink whose
242
+ // realpath escapes the project's node_modules, and (2) the package's
243
+ // `main: "index"` is extensionless. Mapping to `<coreRoot>/<sub>` and
244
+ // letting resolveExtensions pick the platform file mirrors Vite's alias +
245
+ // extension behavior byte-for-byte.
246
+ const coreAliasPlugin = {
247
+ name: 'ns-core-bundle-alias',
248
+ setup(build) {
249
+ build.onResolve({ filter: /^@nativescript\/core(?:\/.*)?$/ }, (args) => {
250
+ const sub = args.path === '@nativescript/core' ? '' : args.path.slice('@nativescript/core/'.length);
251
+ const target = sub ? path.join(coreRoot, sub) : path.join(coreRoot, 'index');
252
+ return build.resolve(target, { kind: args.kind, resolveDir: coreRoot });
253
+ });
254
+ },
255
+ };
256
+ // Mirror the Vite pipeline's css-tree environment aliases: css-tree's ESM
257
+ // files do `import { createRequire } from 'module'` to lazily require JSON
258
+ // data — on device that bare 'module' import must resolve to our polyfill
259
+ // (same replacement `aliasCssTree` feeds Vite's resolver; see
260
+ // helpers/css-tree.ts and polyfills/module.ts). In the source tree the
261
+ // replacement's `.js` file may not exist yet (only `.ts`) — fall back.
262
+ const resolvePolyfillFile = (p) => {
263
+ if (existsSync(p))
264
+ return p;
265
+ const ts = p.replace(/\.js$/, '.ts');
266
+ return existsSync(ts) ? ts : p;
267
+ };
268
+ const polyfillAliases = new Map();
269
+ for (const { find, replacement } of aliasCssTree) {
270
+ polyfillAliases.set(String(find), resolvePolyfillFile(replacement));
271
+ }
272
+ const cssTreeEnvPlugin = {
273
+ name: 'ns-core-bundle-css-tree-env',
274
+ setup(build) {
275
+ build.onResolve({ filter: /^(?:node:)?module$|^mdn-data\/css\// }, (args) => {
276
+ const key = args.path.replace(/^node:/, '');
277
+ const target = polyfillAliases.get(key);
278
+ return target ? { path: target } : undefined;
279
+ });
280
+ },
281
+ };
282
+ // `~/package.json` — core's profiling/style-scope modules import the APP's
283
+ // nativescript.config as JSON through this alias (Vite serves it via the
284
+ // nsvite:nsconfig-json virtual module; see helpers/config-as-json.ts).
285
+ // Mirror that here with the same nsConfigToJson() payload.
286
+ const nsConfigJson = (() => {
287
+ try {
288
+ return JSON.stringify(nsConfigToJson());
289
+ }
290
+ catch {
291
+ // No nativescript.config.ts reachable (tests, bare fixtures) — the
292
+ // importers only read optional profiling/cssParser hints from it.
293
+ return '{}';
294
+ }
295
+ })();
296
+ const nsConfigPlugin = {
297
+ name: 'ns-core-bundle-nsconfig',
298
+ setup(build) {
299
+ build.onResolve({ filter: /^~\/package\.json$/ }, () => ({ path: 'ns-core-bundle:nsconfig-json', namespace: 'ns-core-bundle-virtual' }));
300
+ build.onLoad({ filter: /^ns-core-bundle:nsconfig-json$/, namespace: 'ns-core-bundle-virtual' }, () => ({
301
+ contents: `export default ${nsConfigJson};`,
302
+ loader: 'js',
303
+ }));
304
+ },
305
+ };
306
+ const defines = (() => {
307
+ const raw = getGlobalDefines({
308
+ platform: String(platform),
309
+ targetMode: mode === 'development' ? 'development' : 'production',
310
+ verbose: !!verbose,
311
+ flavor: flavor ?? '',
312
+ isCI: !!process.env.CI,
313
+ });
314
+ const out = {};
315
+ for (const [key, value] of Object.entries(raw)) {
316
+ out[key] = typeof value === 'string' ? value : JSON.stringify(value);
317
+ }
318
+ out['process.env.NODE_ENV'] = JSON.stringify(mode === 'development' ? 'development' : 'production');
319
+ return out;
320
+ })();
321
+ const buildResult = await esbuild.build({
322
+ stdin: {
323
+ contents: entryCode,
324
+ resolveDir: projectRoot,
325
+ sourcefile: 'ns-core-bundle-entry.ts',
326
+ loader: 'ts',
327
+ },
328
+ platform: 'neutral',
329
+ format: 'esm',
330
+ bundle: true,
331
+ target: 'es2019',
332
+ // Keep every module body — core relies on registration side effects
333
+ // (CssAnimationProperty.register, global.registerModule, …).
334
+ treeShaking: false,
335
+ sourcemap: false,
336
+ write: false,
337
+ logLevel: 'silent',
338
+ legalComments: 'eof',
339
+ conditions: ['module', 'react-native', 'import', 'browser', 'default'],
340
+ mainFields: ['module', 'browser', 'main'],
341
+ resolveExtensions: coreResolveExtensions(String(platform)),
342
+ loader: {
343
+ '.css': 'text',
344
+ '.json': 'json',
345
+ },
346
+ define: defines,
347
+ plugins: [coreAliasPlugin, cssTreeEnvPlugin, nsConfigPlugin, createNativeClassEsbuildPlugin(platform), createUnicodeRegexEsbuildPlugin(projectRoot)],
348
+ external: NODE_EXTERNALS,
349
+ });
350
+ if (!buildResult.outputFiles?.length) {
351
+ throw new Error('core bundle generation produced no output');
352
+ }
353
+ // The shape installer must run before the registry writes in the entry
354
+ // body so CJS consumers looking up __NS_CORE_MODULES__ always see
355
+ // plain-object-compatible namespaces (Invariant D).
356
+ const code = ['/* /ns/core-bundle.mjs — single-eval @nativescript/core (dev bundle mode) */', buildShapeInstallHeader(), buildResult.outputFiles[0].text].join('\n');
357
+ const hash = createHash('sha1').update(code).digest('hex');
358
+ const state = {
359
+ code,
360
+ subs: new Set(subs),
361
+ hash,
362
+ builtAt: Date.now(),
363
+ buildMs: Date.now() - t0,
364
+ };
365
+ if (verbose) {
366
+ console.log(`[ns-core-bundle] built ${subs.length} subpaths, ${(code.length / 1024).toFixed(0)}kb in ${state.buildMs}ms (hash ${hash.slice(0, 8)})`);
367
+ }
368
+ return state;
369
+ }
370
+ export function createCoreBundleService(options) {
371
+ let state = null;
372
+ let failed = false;
373
+ let building = null;
374
+ const ensureBuilt = async () => {
375
+ if (state)
376
+ return state;
377
+ if (failed)
378
+ return null;
379
+ if (!building) {
380
+ building = generateCoreBundle(options)
381
+ .then((built) => {
382
+ state = built;
383
+ return built;
384
+ })
385
+ .catch((error) => {
386
+ failed = true;
387
+ console.warn(`[ns-core-bundle] bundle build FAILED — falling back to per-module /ns/core serving for this session. Set NS_CORE_PER_MODULE=1 to silence. Error: ${error?.message || error}`);
388
+ return null;
389
+ });
390
+ }
391
+ return building;
392
+ };
393
+ return {
394
+ ensureBuilt,
395
+ getState: () => state,
396
+ hasFailed: () => failed,
397
+ };
398
+ }
399
+ let sharedService = null;
400
+ /**
401
+ * Process-wide bundle service derived from the dev server's config + CLI
402
+ * flags. One dev server per process, so a module-level singleton matches the
403
+ * vendor manifest's lifecycle.
404
+ */
405
+ export function getSharedCoreBundleService(server) {
406
+ if (sharedService)
407
+ return sharedService;
408
+ const cliFlags = (getCliFlags() || {});
409
+ const platform = cliFlags.android ? 'android' : cliFlags.visionos ? 'visionos' : 'ios';
410
+ let flavor = '';
411
+ try {
412
+ flavor = getProjectFlavor();
413
+ }
414
+ catch { }
415
+ sharedService = createCoreBundleService({
416
+ projectRoot: server.config?.root || process.cwd(),
417
+ platform,
418
+ mode: server.config?.mode === 'development' ? 'development' : 'production',
419
+ flavor,
420
+ verbose: resolveVerboseFlag(),
421
+ });
422
+ return sharedService;
423
+ }
424
+ /** Test seam: drop the shared service so specs can mount fresh. */
425
+ export function resetSharedCoreBundleServiceForTests() {
426
+ sharedService = null;
427
+ }
428
+ export const CORE_BUNDLE_PATH = '/ns/core-bundle.mjs';
429
+ /**
430
+ * Shim served at `/ns/core` in bundle mode. `export * from` gives real,
431
+ * live named bindings straight off the bundle module record; the explicit
432
+ * default keeps the "default import + destructure" consumer rewrite working
433
+ * (see buildDefaultExportFooter in ns-core-cjs-shape.ts for that contract).
434
+ */
435
+ export function buildCoreMainShimCode() {
436
+ return [`/* @nativescript/core bridge (bundle mode) — main */`, `import * as __ns_core_bundle_ns__ from ${JSON.stringify(CORE_BUNDLE_PATH)};`, `export * from ${JSON.stringify(CORE_BUNDLE_PATH)};`, `export default __ns_core_bundle_ns__;`, ``].join('\n');
437
+ }
438
+ /**
439
+ * Shim served at `/ns/core/<sub>` in bundle mode. The static bundle import
440
+ * guarantees the registry is populated before the body reads it (ESM deps
441
+ * evaluate first), so the named `export const` bindings snapshot the final
442
+ * class/function values. `exportNames` comes from the same disk-based export
443
+ * discovery the per-module bridge relies on (collectStaticExportNamesFromFile).
444
+ */
445
+ const RESERVED_EXPORT_NAMES = new Set(['default', 'break', 'case', 'catch', 'class', 'const', 'continue', 'debugger', 'delete', 'do', 'else', 'enum', 'export', 'extends', 'false', 'finally', 'for', 'function', 'if', 'import', 'in', 'instanceof', 'new', 'null', 'return', 'super', 'switch', 'this', 'throw', 'true', 'try', 'typeof', 'var', 'void', 'while', 'with', 'let', 'static', 'yield', 'await', 'eval', 'arguments', '__ns_core_sub_ns__']);
446
+ export function buildCoreSubShimCode(sub, exportNames, hasOwnDefaultExport = false) {
447
+ const canonical = normalizeCoreSub(sub);
448
+ const registryKey = `@nativescript/core/${canonical}`;
449
+ const names = Array.from(new Set(exportNames)).filter((n) => /^[A-Za-z_$][\w$]*$/.test(n) && !RESERVED_EXPORT_NAMES.has(n));
450
+ const lines = [];
451
+ lines.push(`/* @nativescript/core bridge (bundle mode) — sub: ${canonical} */`);
452
+ lines.push(`import ${JSON.stringify(CORE_BUNDLE_PATH)};`);
453
+ lines.push(`const __ns_core_sub_ns__ = (globalThis.__NS_CORE_MODULES__ || {})[${JSON.stringify(registryKey)}];`);
454
+ lines.push(`if (!__ns_core_sub_ns__) { throw new Error(${JSON.stringify(`[ns-core] core bundle registry missing '${registryKey}' — restart the dev server or set NS_CORE_PER_MODULE=1`)}); }`);
455
+ for (const name of names) {
456
+ lines.push(`export const ${name} = __ns_core_sub_ns__.${name};`);
457
+ }
458
+ // Deep-subpath contract (see isDeepCoreSubpath / per-module bridge): a sub
459
+ // that declares its own `export default` (e.g. utils/lazy.js's
460
+ // `export default function lazy`) must expose THAT value as the shim's
461
+ // default — consumers like the vendor bundle do
462
+ // `import lazy from '@nativescript/core/utils/lazy'` and call it directly.
463
+ // Subs without an own default keep the self-namespace default so the
464
+ // "default import + destructure" consumer rewrite still works.
465
+ if (hasOwnDefaultExport) {
466
+ lines.push(`export default __ns_core_sub_ns__.default;`);
467
+ }
468
+ else {
469
+ lines.push(`export default __ns_core_sub_ns__;`);
470
+ }
471
+ lines.push('');
472
+ return lines.join('\n');
473
+ }
474
+ //# sourceMappingURL=core-bundle.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"core-bundle.js","sourceRoot":"","sources":["../../../../../packages/vite/hmr/server/core-bundle.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AAEH,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAC5C,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,QAAQ,EAAe,MAAM,SAAS,CAAC;AACzE,OAAO,KAAK,IAAI,MAAM,WAAW,CAAC;AAClC,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACzC,OAAO,KAAK,OAAO,MAAM,SAAS,CAAC;AAGnC,OAAO,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAC;AACzD,OAAO,EAAE,gBAAgB,EAAE,MAAM,iCAAiC,CAAC;AACnE,OAAO,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAC3D,OAAO,EAAE,8BAA8B,EAAE,MAAM,6CAA6C,CAAC;AAE7F,OAAO,EAAE,+BAA+B,EAAE,MAAM,4CAA4C,CAAC;AAC7F,OAAO,EAAE,sBAAsB,EAAE,gBAAgB,EAAE,MAAM,8BAA8B,CAAC;AACxF,OAAO,EAAE,uBAAuB,EAAE,MAAM,wBAAwB,CAAC;AACjE,OAAO,EAAE,kBAAkB,EAAE,MAAM,0BAA0B,CAAC;AAC9D,OAAO,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AACxD,OAAO,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AACzD,OAAO,EAAE,0BAA0B,EAAE,MAAM,sCAAsC,CAAC;AAElF;;;;;;;;;;;;;;;GAeG;AACH,MAAM,UAAU,6BAA6B,CAAC,MAAyB,OAAO,CAAC,GAAG,EAAE,yBAAwC,GAAG,EAAE,CAAC,0BAA0B,EAAE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