@absolutejs/absolute 0.19.0-beta.805 → 0.19.0-beta.806

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 (49) hide show
  1. package/dist/angular/index.js +5 -5
  2. package/dist/angular/server.js +5 -5
  3. package/dist/build.js +4 -4
  4. package/dist/{chunk-z6c8qcmw.js → chunk-21ht3swm.js} +2 -2
  5. package/dist/{chunk-r0w678ve.js → chunk-5s1km9v3.js} +2 -2
  6. package/dist/{chunk-ccz4x8vr.js → chunk-7syt9sz1.js} +3 -3
  7. package/dist/{chunk-a0x4bf8d.js → chunk-92fsjfpp.js} +2 -14
  8. package/dist/{chunk-a0x4bf8d.js.map → chunk-92fsjfpp.js.map} +3 -3
  9. package/dist/{chunk-gxrsf71e.js → chunk-bjdg6cw6.js} +28 -13
  10. package/dist/chunk-bjdg6cw6.js.map +11 -0
  11. package/dist/{chunk-0r32762k.js → chunk-dxcf95sb.js} +3 -3
  12. package/dist/{chunk-0r32762k.js.map → chunk-dxcf95sb.js.map} +1 -1
  13. package/dist/{chunk-hf5fjykx.js → chunk-kn1jn1he.js} +13 -53
  14. package/dist/chunk-kn1jn1he.js.map +11 -0
  15. package/dist/{chunk-by7t1d3r.js → chunk-kp7gkhcr.js} +2 -2
  16. package/dist/{chunk-pevt15h0.js → chunk-nq65m0kj.js} +5 -5
  17. package/dist/{chunk-0fsxp5gc.js → chunk-nrbnqx5s.js} +2 -2
  18. package/dist/chunk-pnscgw95.js +90 -0
  19. package/dist/chunk-pnscgw95.js.map +10 -0
  20. package/dist/{chunk-n5a5nxnt.js → chunk-qx83krhs.js} +22 -14
  21. package/dist/{chunk-n5a5nxnt.js.map → chunk-qx83krhs.js.map} +4 -4
  22. package/dist/{chunk-f8k0tb5z.js → chunk-ya6g8djq.js} +5 -5
  23. package/dist/{chunk-8zz4g25g.js → chunk-yc263ckx.js} +13 -15
  24. package/dist/chunk-yc263ckx.js.map +14 -0
  25. package/dist/client/index.js +4 -4
  26. package/dist/index.js +5 -6
  27. package/dist/index.js.map +2 -2
  28. package/dist/islands/index.js +1 -1
  29. package/dist/react/index.js +1 -1
  30. package/dist/src/angular/ssrRender.d.ts +1 -3
  31. package/dist/src/build/buildAngularVendor.d.ts +2 -2
  32. package/dist/src/index.d.ts +0 -1
  33. package/dist/svelte/index.js +1 -1
  34. package/dist/types/angular.d.ts +0 -6
  35. package/dist/vue/index.js +1 -1
  36. package/package.json +1 -1
  37. package/dist/chunk-8zz4g25g.js.map +0 -14
  38. package/dist/chunk-gxrsf71e.js.map +0 -11
  39. package/dist/chunk-hf5fjykx.js.map +0 -11
  40. package/dist/chunk-r8dzkm4s.js +0 -194
  41. package/dist/chunk-r8dzkm4s.js.map +0 -11
  42. package/dist/src/angular/injectorPatch.d.ts +0 -1
  43. /package/dist/{chunk-z6c8qcmw.js.map → chunk-21ht3swm.js.map} +0 -0
  44. /package/dist/{chunk-r0w678ve.js.map → chunk-5s1km9v3.js.map} +0 -0
  45. /package/dist/{chunk-ccz4x8vr.js.map → chunk-7syt9sz1.js.map} +0 -0
  46. /package/dist/{chunk-by7t1d3r.js.map → chunk-kp7gkhcr.js.map} +0 -0
  47. /package/dist/{chunk-pevt15h0.js.map → chunk-nq65m0kj.js.map} +0 -0
  48. /package/dist/{chunk-0fsxp5gc.js.map → chunk-nrbnqx5s.js.map} +0 -0
  49. /package/dist/{chunk-f8k0tb5z.js.map → chunk-ya6g8djq.js.map} +0 -0
@@ -90,13 +90,13 @@ var createAngularLinkerPlugin = (linkerJitMode) => ({
90
90
  var angularLinkerPlugin = createAngularLinkerPlugin(false);
91
91
 
92
92
  // src/build/buildAngularVendor.ts
93
- var REQUIRED_ANGULAR_SPECIFIERS = [
93
+ var REQUIRED_ANGULAR_SPECIFIERS_BASE = [
94
94
  "@angular/core",
95
- "@angular/compiler",
96
95
  "@angular/common",
97
96
  "@angular/common/http",
98
97
  "@angular/platform-browser"
99
98
  ];
99
+ var requiredAngularSpecifiers = (jitMode) => jitMode ? [...REQUIRED_ANGULAR_SPECIFIERS_BASE, "@angular/compiler"] : REQUIRED_ANGULAR_SPECIFIERS_BASE;
100
100
  var SERVER_ONLY_ANGULAR_SPECIFIERS = new Set([
101
101
  "@angular/platform-server",
102
102
  "@angular/ssr",
@@ -146,6 +146,17 @@ var scanSourceImports = async (directories) => {
146
146
  }
147
147
  return { angular, transitiveRoots };
148
148
  };
149
+ var PARTIAL_DECL_MARKERS = [
150
+ "\u0275\u0275ngDeclareDirective",
151
+ "\u0275\u0275ngDeclareComponent",
152
+ "\u0275\u0275ngDeclareFactory",
153
+ "\u0275\u0275ngDeclareInjectable",
154
+ "\u0275\u0275ngDeclareInjector",
155
+ "\u0275\u0275ngDeclareNgModule",
156
+ "\u0275\u0275ngDeclarePipe",
157
+ "\u0275\u0275ngDeclareClassMetadata"
158
+ ];
159
+ var containsPartialDeclarations = (source) => PARTIAL_DECL_MARKERS.some((marker) => source.includes(marker));
149
160
  var collectTransitiveAngularSpecs = async (roots, angularFound) => {
150
161
  const { readFileSync: readFileSync2 } = await import("fs");
151
162
  const transpiler = new Bun.Transpiler({ loader: "js" });
@@ -172,6 +183,9 @@ var collectTransitiveAngularSpecs = async (roots, angularFound) => {
172
183
  } catch {
173
184
  continue;
174
185
  }
186
+ if (!isAngularBrowserSpecifier(spec) && containsPartialDeclarations(content)) {
187
+ angularFound.add(spec);
188
+ }
175
189
  let imports;
176
190
  try {
177
191
  imports = transpiler.scanImports(content);
@@ -198,10 +212,11 @@ var collectTransitiveAngularSpecs = async (roots, angularFound) => {
198
212
  }
199
213
  };
200
214
  var toSafeFileName = (specifier) => specifier.replace(/^@/, "").replace(/\//g, "_");
201
- var resolveAngularSpecifiers = async (directories) => {
215
+ var resolveAngularSpecifiers = async (directories, linkerJitMode) => {
202
216
  const { angular, transitiveRoots } = await scanSourceImports(directories);
203
- for (const spec of REQUIRED_ANGULAR_SPECIFIERS)
217
+ for (const spec of requiredAngularSpecifiers(linkerJitMode)) {
204
218
  angular.add(spec);
219
+ }
205
220
  await collectTransitiveAngularSpecs([...angular, ...transitiveRoots], angular);
206
221
  return Array.from(angular).filter(isResolvable);
207
222
  };
@@ -210,7 +225,7 @@ var buildAngularVendor = async (buildDir, directories = [], linkerJitMode = fals
210
225
  mkdirSync2(vendorDir, { recursive: true });
211
226
  const tmpDir = join2(buildDir, "_angular_vendor_tmp");
212
227
  mkdirSync2(tmpDir, { recursive: true });
213
- const specifiers = await resolveAngularSpecifiers(directories);
228
+ const specifiers = await resolveAngularSpecifiers(directories, linkerJitMode);
214
229
  const entrypoints = await Promise.all(specifiers.map(async (specifier) => {
215
230
  const safeName = toSafeFileName(specifier);
216
231
  const entryPath = join2(tmpDir, `${safeName}.ts`);
@@ -235,15 +250,15 @@ var buildAngularVendor = async (buildDir, directories = [], linkerJitMode = fals
235
250
  }
236
251
  return specifiers;
237
252
  };
238
- var computeAngularVendorPaths = (specifiers = REQUIRED_ANGULAR_SPECIFIERS) => {
253
+ var computeAngularVendorPaths = (specifiers = requiredAngularSpecifiers(true)) => {
239
254
  const paths = {};
240
255
  for (const specifier of specifiers) {
241
256
  paths[specifier] = `/angular/vendor/${toSafeFileName(specifier)}.js`;
242
257
  }
243
258
  return paths;
244
259
  };
245
- var computeAngularVendorPathsAsync = async (directories = []) => {
246
- const specifiers = await resolveAngularSpecifiers(directories);
260
+ var computeAngularVendorPathsAsync = async (directories = [], linkerJitMode = true) => {
261
+ const specifiers = await resolveAngularSpecifiers(directories, linkerJitMode);
247
262
  return computeAngularVendorPaths(specifiers);
248
263
  };
249
264
  var buildAngularServerVendor = async (buildDir, directories = [], linkerJitMode = false) => {
@@ -251,7 +266,7 @@ var buildAngularServerVendor = async (buildDir, directories = [], linkerJitMode
251
266
  mkdirSync2(vendorDir, { recursive: true });
252
267
  const tmpDir = join2(buildDir, "_angular_server_vendor_tmp");
253
268
  mkdirSync2(tmpDir, { recursive: true });
254
- const browserSpecs = await resolveAngularSpecifiers(directories);
269
+ const browserSpecs = await resolveAngularSpecifiers(directories, linkerJitMode);
255
270
  const allSpecs = new Set(browserSpecs);
256
271
  for (const spec of SERVER_ONLY_ANGULAR_SPECIFIERS) {
257
272
  if (isResolvable(spec))
@@ -289,8 +304,8 @@ var computeAngularServerVendorPaths = (buildDir, specifiers) => {
289
304
  }
290
305
  return paths;
291
306
  };
292
- var computeAngularServerVendorPathsAsync = async (buildDir, directories = []) => {
293
- const browserSpecs = await resolveAngularSpecifiers(directories);
307
+ var computeAngularServerVendorPathsAsync = async (buildDir, directories = [], linkerJitMode = true) => {
308
+ const browserSpecs = await resolveAngularSpecifiers(directories, linkerJitMode);
294
309
  const allSpecs = new Set(browserSpecs);
295
310
  for (const spec of SERVER_ONLY_ANGULAR_SPECIFIERS) {
296
311
  if (isResolvable(spec))
@@ -301,5 +316,5 @@ var computeAngularServerVendorPathsAsync = async (buildDir, directories = []) =>
301
316
 
302
317
  export { createAngularLinkerPlugin, buildAngularVendor, computeAngularVendorPaths, computeAngularVendorPathsAsync, buildAngularServerVendor, computeAngularServerVendorPaths, computeAngularServerVendorPathsAsync };
303
318
 
304
- //# debugId=F45049F8BF9564F964756E2164756E21
305
- //# sourceMappingURL=chunk-gxrsf71e.js.map
319
+ //# debugId=A01FFECE2AADFE9264756E2164756E21
320
+ //# sourceMappingURL=chunk-bjdg6cw6.js.map
@@ -0,0 +1,11 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../src/build/buildAngularVendor.ts", "../src/build/angularLinkerPlugin.ts"],
4
+ "sourcesContent": [
5
+ "import { mkdirSync } from 'node:fs';\nimport { join } from 'node:path';\nimport { rm } from 'node:fs/promises';\nimport { build as bunBuild, Glob } from 'bun';\nimport { createAngularLinkerPlugin } from './angularLinkerPlugin';\nimport { generateVendorEntrySource } from './vendorEntrySource';\n\n/** Always-vendored Angular packages.\n * Required for any Angular page even if not imported in user code: the runtime\n * needs them to bootstrap. Server-only packages (@angular/platform-server) are\n * excluded. Additional @angular/* packages are auto-discovered from source.\n *\n * `@angular/compiler` is included only when the vendor is built in JIT mode\n * (dev). In AOT mode (prod) every `ɵɵngDeclare*` has been linked at vendor\n * build time, so the compiler isn't needed at runtime and is dropped to keep\n * the prod artifact slim. */\nconst REQUIRED_ANGULAR_SPECIFIERS_BASE = [\n\t'@angular/core',\n\t'@angular/common',\n\t'@angular/common/http',\n\t'@angular/platform-browser'\n];\nconst requiredAngularSpecifiers = (jitMode: boolean) =>\n\tjitMode\n\t\t? [...REQUIRED_ANGULAR_SPECIFIERS_BASE, '@angular/compiler']\n\t\t: REQUIRED_ANGULAR_SPECIFIERS_BASE;\n\n/** Build-only / server-only specifiers that should never be browser-vendored. */\nconst SERVER_ONLY_ANGULAR_SPECIFIERS = new Set([\n\t'@angular/platform-server',\n\t'@angular/ssr',\n\t'@angular/compiler-cli'\n]);\n\nconst SCAN_SKIP_DIRS = new Set([\n\t'node_modules',\n\t'build',\n\t'dist',\n\t'.absolutejs',\n\t'generated'\n]);\n\nconst isResolvable = (specifier: string) => {\n\ttry {\n\t\tBun.resolveSync(specifier, process.cwd());\n\n\t\treturn true;\n\t} catch {\n\t\treturn false;\n\t}\n};\n\nconst isBareSpecifier = (spec: string) =>\n\t!spec.startsWith('.') && !spec.startsWith('/') && !spec.startsWith('@src/');\n\nconst isAngularBrowserSpecifier = (spec: string) =>\n\tspec.startsWith('@angular/') && !SERVER_ONLY_ANGULAR_SPECIFIERS.has(spec);\n\n/** Scan user source for any imports — both @angular/* (kept) and other bare\n * specs (returned as transitive scan seeds). Finding angular subpaths only\n * reachable through deps (e.g. `@angular/core/rxjs-interop` from\n * `@angular/fire/compat/auth`) requires walking through non-angular roots. */\nconst scanSourceImports = async (directories: string[]) => {\n\tconst angular = new Set<string>();\n\tconst transitiveRoots = new Set<string>();\n\tconst transpiler = new Bun.Transpiler({ loader: 'tsx' });\n\tconst glob = new Glob('**/*.{ts,tsx,js,jsx}');\n\n\tfor (const dir of directories) {\n\t\ttry {\n\t\t\tfor await (const file of glob.scan({ absolute: true, cwd: dir })) {\n\t\t\t\tconst rel = file.slice(dir.length + 1);\n\t\t\t\tconst [first] = rel.split('/');\n\t\t\t\tif (first && SCAN_SKIP_DIRS.has(first)) continue;\n\t\t\t\ttry {\n\t\t\t\t\tconst content = await Bun.file(file).text();\n\t\t\t\t\tfor (const imp of transpiler.scanImports(content)) {\n\t\t\t\t\t\tif (isAngularBrowserSpecifier(imp.path)) {\n\t\t\t\t\t\t\tangular.add(imp.path);\n\t\t\t\t\t\t} else if (isBareSpecifier(imp.path)) {\n\t\t\t\t\t\t\ttransitiveRoots.add(imp.path);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t} catch {\n\t\t\t\t\t// unreadable file, skip\n\t\t\t\t}\n\t\t\t}\n\t\t} catch {\n\t\t\t// missing dir, skip\n\t\t}\n\t}\n\n\treturn { angular, transitiveRoots };\n};\n\n/** Marker substrings emitted by Angular's partial-AOT compiler into any\n * package that ships `ɵɵngDeclare*` declarations. The presence of any\n * one of these means the file needs the linker before it can run, which\n * in turn means the package belongs in the Angular vendor — even if it's\n * not under `@angular/*` (e.g. `@ngx-translate/core`, `@ng-bootstrap`,\n * community Material extensions, etc.). Mirrors `declarationFunctions`\n * in `@angular/compiler-cli/linker`. */\nconst PARTIAL_DECL_MARKERS = [\n\t'ɵɵngDeclareDirective',\n\t'ɵɵngDeclareComponent',\n\t'ɵɵngDeclareFactory',\n\t'ɵɵngDeclareInjectable',\n\t'ɵɵngDeclareInjector',\n\t'ɵɵngDeclareNgModule',\n\t'ɵɵngDeclarePipe',\n\t'ɵɵngDeclareClassMetadata'\n];\n\nconst containsPartialDeclarations = (source: string) =>\n\tPARTIAL_DECL_MARKERS.some((marker) => source.includes(marker));\n\n/** Walk through transitive deps and harvest any @angular/* subpaths reachable\n * via non-angular packages (e.g. firebase imports `@angular/core/rxjs-interop`\n * through @angular/fire). Also harvests any non-@angular package whose\n * shipped code contains partial AOT declarations — those need the linker\n * too, so they belong in the Angular vendor pipeline. */\nconst collectTransitiveAngularSpecs = async (\n\troots: Iterable<string>,\n\tangularFound: Set<string>\n) => {\n\tconst { readFileSync } = await import('node:fs');\n\tconst transpiler = new Bun.Transpiler({ loader: 'js' });\n\tconst visited = new Set<string>();\n\tconst frontier: string[] = [];\n\tfor (const r of roots) frontier.push(r);\n\n\tconst MAX_PASSES = 5;\n\tfor (let pass = 0; pass < MAX_PASSES; pass++) {\n\t\tconst next: string[] = [];\n\t\tfor (const spec of frontier) {\n\t\t\tif (visited.has(spec)) continue;\n\t\t\tvisited.add(spec);\n\t\t\tlet resolved: string;\n\t\t\ttry {\n\t\t\t\tresolved = Bun.resolveSync(spec, process.cwd());\n\t\t\t} catch {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tlet content: string;\n\t\t\ttry {\n\t\t\t\tcontent = readFileSync(resolved, 'utf-8');\n\t\t\t} catch {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t// If this file ships partial AOT declarations, the *package* it\n\t\t\t// belongs to needs the linker — add the spec used to import it.\n\t\t\t// Skip if it's already an @angular/* spec (covered separately).\n\t\t\tif (\n\t\t\t\t!isAngularBrowserSpecifier(spec) &&\n\t\t\t\tcontainsPartialDeclarations(content)\n\t\t\t) {\n\t\t\t\tangularFound.add(spec);\n\t\t\t}\n\t\t\tlet imports;\n\t\t\ttry {\n\t\t\t\timports = transpiler.scanImports(content);\n\t\t\t} catch {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tfor (const imp of imports) {\n\t\t\t\tconst child = imp.path;\n\t\t\t\tif (!isBareSpecifier(child)) continue;\n\t\t\t\tif (visited.has(child)) continue;\n\t\t\t\tif (isAngularBrowserSpecifier(child)) {\n\t\t\t\t\tangularFound.add(child);\n\t\t\t\t}\n\t\t\t\tnext.push(child);\n\t\t\t}\n\t\t}\n\t\tif (next.length === 0) break;\n\t\tfrontier.length = 0;\n\t\tfor (const s of next) frontier.push(s);\n\t}\n};\n\n/** Convert a bare specifier to a safe filename:\n * @angular/common/http → angular_common_http */\nconst toSafeFileName = (specifier: string) =>\n\tspecifier.replace(/^@/, '').replace(/\\//g, '_');\n\nconst resolveAngularSpecifiers = async (\n\tdirectories: string[],\n\tlinkerJitMode: boolean\n) => {\n\tconst { angular, transitiveRoots } = await scanSourceImports(directories);\n\tfor (const spec of requiredAngularSpecifiers(linkerJitMode)) {\n\t\tangular.add(spec);\n\t}\n\tawait collectTransitiveAngularSpecs(\n\t\t[...angular, ...transitiveRoots],\n\t\tangular\n\t);\n\n\treturn Array.from(angular).filter(isResolvable);\n};\n\n/** Build vendor bundles for every @angular/* package the project imports.\n * `linkerJitMode` controls whether NgModule definitions retain their\n * declarations/exports — required when consumer (user) components are\n * runtime-compiled by `@angular/compiler` (dev/HMR via compileAngularFileJIT).\n * Production AOT builds set this to false to match AOT'd user components.\n *\n * `depVendorSpecifiers` are non-framework packages that are also vendored\n * separately (by `buildDepVendor`). They MUST be externalized here too —\n * otherwise transitive imports like `@angular/fire/compat/auth` →\n * `firebase/compat/auth` get bundled twice, creating duplicate\n * @firebase/app-compat instances. The angular-vendor copy registers\n * `firebase.auth.*` on its own firebase singleton, leaving the user's\n * `import firebase from 'firebase/compat/app'` with `firebase.auth` undefined.\n * Externalizing forces both pipelines to share the same /vendor chunks. */\nexport const buildAngularVendor = async (\n\tbuildDir: string,\n\tdirectories: string[] = [],\n\tlinkerJitMode = false,\n\tdepVendorSpecifiers: string[] = []\n) => {\n\tconst vendorDir = join(buildDir, 'angular', 'vendor');\n\tmkdirSync(vendorDir, { recursive: true });\n\n\tconst tmpDir = join(buildDir, '_angular_vendor_tmp');\n\tmkdirSync(tmpDir, { recursive: true });\n\n\tconst specifiers = await resolveAngularSpecifiers(\n\t\tdirectories,\n\t\tlinkerJitMode\n\t);\n\n\t// Angular packages are proper ESM. `export *` re-exports only NAMED exports\n\t// per ECMA spec, so we use the namespace-default-fallback pattern that's\n\t// safe regardless of whether the package has a default export.\n\tconst entrypoints = await Promise.all(\n\t\tspecifiers.map(async (specifier) => {\n\t\t\tconst safeName = toSafeFileName(specifier);\n\t\t\tconst entryPath = join(tmpDir, `${safeName}.ts`);\n\t\t\tawait Bun.write(entryPath, generateVendorEntrySource(specifier));\n\n\t\t\treturn entryPath;\n\t\t})\n\t);\n\n\tconst result = await bunBuild({\n\t\tentrypoints,\n\t\texternal: depVendorSpecifiers,\n\t\tformat: 'esm',\n\t\tminify: false,\n\t\tnaming: '[name].[ext]',\n\t\toutdir: vendorDir,\n\t\tplugins: [createAngularLinkerPlugin(linkerJitMode)],\n\t\tsplitting: true,\n\t\ttarget: 'browser',\n\t\tthrow: false\n\t});\n\n\tawait rm(tmpDir, { force: true, recursive: true });\n\n\tif (!result.success) {\n\t\tconsole.warn('⚠️ Angular vendor build had errors:', result.logs);\n\t}\n\n\treturn specifiers;\n};\nexport const computeAngularVendorPaths = (\n\tspecifiers: string[] = requiredAngularSpecifiers(true)\n) => {\n\tconst paths: Record<string, string> = {};\n\tfor (const specifier of specifiers) {\n\t\tpaths[specifier] = `/angular/vendor/${toSafeFileName(specifier)}.js`;\n\t}\n\n\treturn paths;\n};\n\n/** Async variant that scans source + transitive deps before producing the\n * vendor path map. Use this when the page-bundle build needs the full set of\n * angular specs in its rewrite map (otherwise transitively-discovered subpaths\n * like `@angular/core/rxjs-interop` end up as bare specifiers in the output). */\nexport const computeAngularVendorPathsAsync = async (\n\tdirectories: string[] = [],\n\tlinkerJitMode = true\n) => {\n\tconst specifiers = await resolveAngularSpecifiers(\n\t\tdirectories,\n\t\tlinkerJitMode\n\t);\n\n\treturn computeAngularVendorPaths(specifiers);\n};\n\n/** Server-side counterpart to `buildAngularVendor`. Outputs fully-linked\n * Bun-target ESM bundles for every @angular/* package the project uses,\n * *plus* `@angular/platform-server` and `@angular/ssr` (excluded from the\n * browser vendor). The server bundle and `getAngularDeps()` import from\n * these paths so SSR shares one Angular runtime instance with the page\n * bundles — eliminates the dual-package hazard that produces NG0201.\n *\n * After this build, `@angular/compiler` is no longer required at runtime\n * for AOT-mode builds: every partial `ɵɵngDeclare*` has been linked into\n * final ɵdir/ɵcmp/ɵfac definitions in the vendor output. */\nexport const buildAngularServerVendor = async (\n\tbuildDir: string,\n\tdirectories: string[] = [],\n\tlinkerJitMode = false\n) => {\n\tconst vendorDir = join(buildDir, 'angular', 'vendor', 'server');\n\tmkdirSync(vendorDir, { recursive: true });\n\n\tconst tmpDir = join(buildDir, '_angular_server_vendor_tmp');\n\tmkdirSync(tmpDir, { recursive: true });\n\n\tconst browserSpecs = await resolveAngularSpecifiers(\n\t\tdirectories,\n\t\tlinkerJitMode\n\t);\n\tconst allSpecs = new Set(browserSpecs);\n\tfor (const spec of SERVER_ONLY_ANGULAR_SPECIFIERS) {\n\t\tif (isResolvable(spec)) allSpecs.add(spec);\n\t}\n\tconst specifiers = Array.from(allSpecs);\n\n\tconst entrypoints = await Promise.all(\n\t\tspecifiers.map(async (specifier) => {\n\t\t\tconst safeName = toSafeFileName(specifier);\n\t\t\tconst entryPath = join(tmpDir, `${safeName}.ts`);\n\t\t\tawait Bun.write(entryPath, generateVendorEntrySource(specifier));\n\n\t\t\treturn entryPath;\n\t\t})\n\t);\n\n\tconst result = await bunBuild({\n\t\tentrypoints,\n\t\tformat: 'esm',\n\t\tminify: false,\n\t\tnaming: '[name].[ext]',\n\t\toutdir: vendorDir,\n\t\tplugins: [createAngularLinkerPlugin(linkerJitMode)],\n\t\tsplitting: true,\n\t\ttarget: 'bun',\n\t\tthrow: false\n\t});\n\n\tawait rm(tmpDir, { force: true, recursive: true });\n\n\tif (!result.success) {\n\t\tconsole.warn(\n\t\t\t'⚠️ Angular server vendor build had errors:',\n\t\t\tresult.logs\n\t\t);\n\t}\n\n\treturn specifiers;\n};\n\n/** Absolute filesystem paths to server vendor files, for `rewriteImports`\n * on server-side bundles and for runtime resolution in `getAngularDeps`. */\nexport const computeAngularServerVendorPaths = (\n\tbuildDir: string,\n\tspecifiers: string[]\n) => {\n\tconst paths: Record<string, string> = {};\n\tconst vendorDir = join(buildDir, 'angular', 'vendor', 'server');\n\tfor (const specifier of specifiers) {\n\t\tpaths[specifier] = join(vendorDir, `${toSafeFileName(specifier)}.js`);\n\t}\n\n\treturn paths;\n};\n\n/** Async server-vendor path map: scans source + transitive deps, then\n * produces absolute filesystem paths for every @angular/* spec the project\n * uses (plus the always-vendored server-only specs). Mirrors\n * `computeAngularVendorPathsAsync` but for server-side rewriting. */\nexport const computeAngularServerVendorPathsAsync = async (\n\tbuildDir: string,\n\tdirectories: string[] = [],\n\tlinkerJitMode = true\n) => {\n\tconst browserSpecs = await resolveAngularSpecifiers(\n\t\tdirectories,\n\t\tlinkerJitMode\n\t);\n\tconst allSpecs = new Set(browserSpecs);\n\tfor (const spec of SERVER_ONLY_ANGULAR_SPECIFIERS) {\n\t\tif (isResolvable(spec)) allSpecs.add(spec);\n\t}\n\n\treturn computeAngularServerVendorPaths(buildDir, Array.from(allSpecs));\n};\n",
6
+ "import { existsSync, mkdirSync, readFileSync, writeFileSync } from 'node:fs';\nimport { dirname, join, relative, resolve } from 'node:path';\nimport { createHash } from 'node:crypto';\nimport type { BunPlugin } from 'bun';\n\nconst CACHE_ROOT = resolve('.absolutejs', 'cache', 'angular-linker');\n\n/**\n * Bun bundler plugin that runs the Angular Linker on partially compiled\n * Angular libraries at build time. Converts ɵɵngDeclare* declarations\n * into fully linked code.\n *\n * The `linkerJitMode` flag controls whether NgModule definitions retain\n * `declarations`/`exports` (JIT-mode, required when consumer code is\n * runtime-compiled) or strip them (AOT-mode, smaller output but only\n * correct when consumer components have ɵcmp.dependencies baked in by\n * the Angular compiler-cli).\n *\n * In AbsoluteJS dev/HMR, user components are TypeScript-transpiled via\n * `compileAngularFileJIT` and rely on @angular/compiler at runtime —\n * that runtime JIT path reads `NgModule.ɵmod.declarations` to find\n * directives like FormGroupDirective. Linking vendor code in AOT mode\n * (the default) silently breaks dev because declarations get stripped\n * and runtime JIT then can't resolve `[formGroup]`, `[ngIf]`, etc. So\n * dev/HMR builds must use `linkerJitMode: true`. Production AOT builds\n * use `linkerJitMode: false` (matches AOT'd user components).\n *\n * Cache key includes mode so dev and prod artifacts don't collide.\n */\nexport const createAngularLinkerPlugin = (\n\tlinkerJitMode: boolean\n): BunPlugin => ({\n\tname: 'angular-linker',\n\tsetup(bld) {\n\t\tlet needsLinking: ((path: string, source: string) => boolean) | undefined;\n\t\tlet babelTransform: ((source: string, options: Record<string, unknown>) => { code?: string } | null) | undefined;\n\t\tlet linkerPlugin: unknown;\n\n\t\tconst cacheDir = join(CACHE_ROOT, linkerJitMode ? 'jit' : 'aot');\n\n\t\tbld.onLoad(\n\t\t\t{ filter: /[\\\\/]@angular[\\\\/].*\\.m?js$/ },\n\t\t\tasync (args) => {\n\t\t\t\tconst source = await Bun.file(args.path).text();\n\n\t\t\t\tif (!needsLinking) {\n\t\t\t\t\tconst specifier = '@angular/compiler-cli/linker';\n\t\t\t\t\tconst mod = await import(specifier);\n\t\t\t\t\t({ needsLinking } = mod);\n\t\t\t\t}\n\n\t\t\t\tconst checkLink = needsLinking;\n\t\t\t\tif (!checkLink || !checkLink(args.path, source)) {\n\t\t\t\t\treturn undefined;\n\t\t\t\t}\n\n\t\t\t\tconst hash = createHash('md5')\n\t\t\t\t\t.update(source)\n\t\t\t\t\t.digest('hex');\n\t\t\t\tconst cachePath = join(cacheDir, `${hash}.js`);\n\n\t\t\t\tif (existsSync(cachePath)) {\n\t\t\t\t\treturn {\n\t\t\t\t\t\tcontents: readFileSync(cachePath, 'utf-8'),\n\t\t\t\t\t\tloader: 'js'\n\t\t\t\t\t};\n\t\t\t\t}\n\n\t\t\t\tif (!babelTransform) {\n\t\t\t\t\tconst babelSpecifier = '@babel/core';\n\t\t\t\t\tconst babel = await import(babelSpecifier);\n\t\t\t\t\tbabelTransform = babel.transformSync;\n\t\t\t\t}\n\t\t\t\tif (!linkerPlugin) {\n\t\t\t\t\tconst linkerSpecifier = '@angular/compiler-cli/linker/babel';\n\t\t\t\t\tconst mod = await import(linkerSpecifier);\n\t\t\t\t\tlinkerPlugin = mod.createEs2015LinkerPlugin({\n\t\t\t\t\t\tfileSystem: {\n\t\t\t\t\t\t\tdirname,\n\t\t\t\t\t\t\texists: existsSync,\n\t\t\t\t\t\t\treadFile: readFileSync,\n\t\t\t\t\t\t\trelative,\n\t\t\t\t\t\t\tresolve\n\t\t\t\t\t\t},\n\t\t\t\t\t\tlinkerJitMode,\n\t\t\t\t\t\tlogger: {\n\t\t\t\t\t\t\terror: console.error,\n\t\t\t\t\t\t\tlevel: 1,\n\t\t\t\t\t\t\twarn: console.warn,\n\t\t\t\t\t\t\tdebug: () => { /* noop */ },\n\t\t\t\t\t\t\tinfo: () => { /* noop */ }\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t\t}\n\n\t\t\t\tconst transform = babelTransform;\n\t\t\t\tif (!transform) {\n\t\t\t\t\treturn { contents: source, loader: 'js' };\n\t\t\t\t}\n\n\t\t\t\tconst result = transform(source, {\n\t\t\t\t\tcompact: false,\n\t\t\t\t\tfilename: args.path,\n\t\t\t\t\tfilenameRelative: args.path,\n\t\t\t\t\tplugins: [linkerPlugin],\n\t\t\t\t\tsourceMaps: false\n\t\t\t\t});\n\n\t\t\t\tconst linked = result?.code ?? source;\n\n\t\t\t\tmkdirSync(cacheDir, { recursive: true });\n\t\t\t\twriteFileSync(cachePath, linked, 'utf-8');\n\n\t\t\t\treturn { contents: linked, loader: 'js' };\n\t\t\t}\n\t\t);\n\t}\n});\n\n/** Default AOT-mode plugin instance — keep for callers that don't need\n * to choose. Production AOT builds and any callsite that AOT-compiles\n * user components alongside vendor should use this. */\nexport const angularLinkerPlugin: BunPlugin = createAngularLinkerPlugin(false);\n"
7
+ ],
8
+ "mappings": ";;;;;;;;;AAAA,sBAAS;AACT,iBAAS;AACT;AACA;;;ACHA;AACA;AACA;AAGA,IAAM,aAAa,QAAQ,eAAe,SAAS,gBAAgB;AAwB5D,IAAM,4BAA4B,CACxC,mBACgB;AAAA,EAChB,MAAM;AAAA,EACN,KAAK,CAAC,KAAK;AA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AE/D,OAAO;AAAA,GACP,CACF;AAAA,EAEA,MAAM,SAAS,MAAM,SAAS;AAAA,IAC7B;AAAA,IACA,QAAQ;AAAA,IACR,QAAQ;AAAA,IACR,QAAQ;AAAA,IACR,QAAQ;AAAA,IACR,SAAS,CAAC,0BAA0B,aAAa,CAAC;AAAA,IAClD,WAAW;AAAA,IACX,QAAQ;AAAA,IACR,OAAO;AAAA,EACR,CAAC;AAAA,EAED,MAAM,GAAG,QAAQ,EAAE,OAAO,MAAM,WAAW,KAAK,CAAC;AAAA,EAEjD,IAAI,CAAC,OAAO,SAAS;AAAA,IACpB,QAAQ,KACP,wDACA,OAAO,IACR;AAAA,EACD;AAAA,EAEA,OAAO;AAAA;AAKD,IAAM,kCAAkC,CAC9C,UACA,eACI;AAAA,EACJ,MAAM,QAAgC,CAAC;AAAA,EACvC,MAAM,YAAY,MAAK,UAAU,WAAW,UAAU,QAAQ;AAAA,EAC9D,WAAW,aAAa,YAAY;AAAA,IACnC,MAAM,aAAa,MAAK,WAAW,GAAG,eAAe,SAAS,MAAM;AAAA,EACrE;AAAA,EAEA,OAAO;AAAA;AAOD,IAAM,uCAAuC,OACnD,UACA,cAAwB,CAAC,GACzB,gBAAgB,SACZ;AAAA,EACJ,MAAM,eAAe,MAAM,yBAC1B,aACA,aACD;AAAA,EACA,MAAM,WAAW,IAAI,IAAI,YAAY;AAAA,EACrC,WAAW,QAAQ,gCAAgC;AAAA,IAClD,IAAI,aAAa,IAAI;AAAA,MAAG,SAAS,IAAI,IAAI;AAAA,EAC1C;AAAA,EAEA,OAAO,gCAAgC,UAAU,MAAM,KAAK,QAAQ,CAAC;AAAA;",
9
+ "debugId": "A01FFECE2AADFE9264756E2164756E21",
10
+ "names": []
11
+ }
@@ -40,7 +40,7 @@ var resolveAngularRuntimePath = (specifier) => {
40
40
  return resolveAngularPackage(specifier);
41
41
  };
42
42
 
43
- export { resolveAngularPackageDir, resolveAngularPackage, resolveAngularRuntimePath };
43
+ export { resolveAngularPackage, resolveAngularRuntimePath };
44
44
 
45
- //# debugId=75E2EE6F8A14489264756E2164756E21
46
- //# sourceMappingURL=chunk-0r32762k.js.map
45
+ //# debugId=129A264626638E4264756E2164756E21
46
+ //# sourceMappingURL=chunk-dxcf95sb.js.map
@@ -5,6 +5,6 @@
5
5
  "import { existsSync, readFileSync } from 'node:fs';\nimport { join, resolve } from 'node:path';\n\n/**\n * Resolve Angular package paths from the compiled runtime node_modules first,\n * then the app's process.cwd()/node_modules, falling back to the bare specifier.\n * This prevents Bun's baked import.meta.dir from resolving Angular packages\n * from the absolutejs source tree instead of the consumer's project when\n * running from a published npm package.\n */\nexport const resolveAngularPackageDir = (specifier: string) => {\n\tconst fromCompiledRuntime = process.env.ABSOLUTE_BUILD_DIR\n\t\t? resolve(process.env.ABSOLUTE_BUILD_DIR, 'node_modules', specifier)\n\t\t: null;\n\tif (fromCompiledRuntime && existsSync(fromCompiledRuntime)) {\n\t\treturn fromCompiledRuntime;\n\t}\n\n\tconst fromProject = resolve(process.cwd(), 'node_modules', specifier);\n\n\tif (existsSync(fromProject)) {\n\t\treturn fromProject;\n\t}\n\n\treturn null;\n};\n\nconst resolvePackageEntry = (packageDir: string) => {\n\ttry {\n\t\tconst pkg = JSON.parse(\n\t\t\treadFileSync(join(packageDir, 'package.json'), 'utf-8')\n\t\t);\n\t\tconst rootExport = pkg.exports?.['.'];\n\t\tconst entry =\n\t\t\t(typeof rootExport === 'string'\n\t\t\t\t? rootExport\n\t\t\t\t: rootExport?.default) ??\n\t\t\tpkg.module ??\n\t\t\tpkg.main ??\n\t\t\t'index.js';\n\n\t\treturn join(packageDir, entry);\n\t} catch {\n\t\treturn packageDir;\n\t}\n};\n\nexport const resolveAngularPackage = (specifier: string) => {\n\tconst packageDir = resolveAngularPackageDir(specifier);\n\tif (packageDir) return resolvePackageEntry(packageDir);\n\n\treturn specifier;\n};\n\nconst toSafeVendorName = (specifier: string) =>\n\tspecifier.replace(/^@/, '').replace(/\\//g, '_');\n\n/** Prefer the linked Bun-target vendor file built by\n * `buildAngularServerVendor`. The file is at\n * `<ABSOLUTE_BUILD_DIR>/angular/vendor/server/<safe>.js`, which is what every\n * server bundle's `@angular/*` imports get rewritten to point at. Sharing\n * this path keeps SSR's class identity unified — the dual-package hazard\n * that produces NG0201 only appears when the runtime imports a *different*\n * copy from the bundles. Falls back to `resolveAngularPackage` (node_modules)\n * when no vendor file is available — e.g. running tests outside an\n * absolutejs build, or before the vendor pass completes. */\nexport const resolveAngularRuntimePath = (specifier: string) => {\n\tconst buildDir = process.env.ABSOLUTE_BUILD_DIR;\n\tif (buildDir) {\n\t\tconst vendorPath = join(\n\t\t\tbuildDir,\n\t\t\t'angular',\n\t\t\t'vendor',\n\t\t\t'server',\n\t\t\t`${toSafeVendorName(specifier)}.js`\n\t\t);\n\t\tif (existsSync(vendorPath)) return vendorPath;\n\t}\n\n\treturn resolveAngularPackage(specifier);\n};\n"
6
6
  ],
7
7
  "mappings": ";;AAAA;AACA;AASO,IAAM,2BAA2B,CAAC,cAAsB;AAAA,EAC9D,MAAM,sBAAsB,QAAQ,IAAI,qBACrC,QAAQ,QAAQ,IAAI,oBAAoB,gBAAgB,SAAS,IACjE;AAAA,EACH,IAAI,uBAAuB,WAAW,mBAAmB,GAAG;AAAA,IAC3D,OAAO;AAAA,EACR;AAAA,EAEA,MAAM,cAAc,QAAQ,QAAQ,IAAI,GAAG,gBAAgB,SAAS;AAAA,EAEpE,IAAI,WAAW,WAAW,GAAG;AAAA,IAC5B,OAAO;AAAA,EACR;AAAA,EAEA,OAAO;AAAA;AAGR,IAAM,sBAAsB,CAAC,eAAuB;AAAA,EACnD,IAAI;AAAA,IACH,MAAM,MAAM,KAAK,MAChB,aAAa,KAAK,YAAY,cAAc,GAAG,OAAO,CACvD;AAAA,IACA,MAAM,aAAa,IAAI,UAAU;AAAA,IACjC,MAAM,SACJ,OAAO,eAAe,WACpB,aACA,YAAY,YACf,IAAI,UACJ,IAAI,QACJ;AAAA,IAED,OAAO,KAAK,YAAY,KAAK;AAAA,IAC5B,MAAM;AAAA,IACP,OAAO;AAAA;AAAA;AAIF,IAAM,wBAAwB,CAAC,cAAsB;AAAA,EAC3D,MAAM,aAAa,yBAAyB,SAAS;AAAA,EACrD,IAAI;AAAA,IAAY,OAAO,oBAAoB,UAAU;AAAA,EAErD,OAAO;AAAA;AAGR,IAAM,mBAAmB,CAAC,cACzB,UAAU,QAAQ,MAAM,EAAE,EAAE,QAAQ,OAAO,GAAG;AAWxC,IAAM,4BAA4B,CAAC,cAAsB;AAAA,EAC/D,MAAM,WAAW,QAAQ,IAAI;AAAA,EAC7B,IAAI,UAAU;AAAA,IACb,MAAM,aAAa,KAClB,UACA,WACA,UACA,UACA,GAAG,iBAAiB,SAAS,MAC9B;AAAA,IACA,IAAI,WAAW,UAAU;AAAA,MAAG,OAAO;AAAA,EACpC;AAAA,EAEA,OAAO,sBAAsB,SAAS;AAAA;",
8
- "debugId": "75E2EE6F8A14489264756E2164756E21",
8
+ "debugId": "129A264626638E4264756E2164756E21",
9
9
  "names": []
10
10
  }
@@ -1,12 +1,11 @@
1
1
  // @bun
2
- import {
3
- generateClientScriptCode,
4
- getAndClearClientScripts,
5
- patchAngularInjectorSingleton
6
- } from "./chunk-r8dzkm4s.js";
7
2
  import {
8
3
  resolveAngularRuntimePath
9
- } from "./chunk-0r32762k.js";
4
+ } from "./chunk-dxcf95sb.js";
5
+ import {
6
+ generateClientScriptCode,
7
+ getAndClearClientScripts
8
+ } from "./chunk-pnscgw95.js";
10
9
  import {
11
10
  toScreamingSnake
12
11
  } from "./chunk-p5504p14.js";
@@ -21,16 +20,16 @@ import {
21
20
  // src/angular/angularDeps.ts
22
21
  var initDominoAdapter = (platformServer) => {
23
22
  try {
24
- const DominoAdapter = platformServer.\u{275}DominoAdapter;
25
- DominoAdapter?.makeCurrent?.();
23
+ platformServer.\u{275}DominoAdapter?.makeCurrent?.();
26
24
  } catch (err) {
27
25
  console.error("Failed to initialize DominoAdapter:", err);
28
26
  }
29
27
  };
30
28
  var loadAngularDeps = async () => {
31
- patchAngularInjectorSingleton();
32
- await import(resolveAngularRuntimePath("@angular/compiler"));
33
- const { applyPatches } = await import("./chunk-by7t1d3r.js");
29
+ if (true) {
30
+ await import(resolveAngularRuntimePath("@angular/compiler"));
31
+ }
32
+ const { applyPatches } = await import("./chunk-kp7gkhcr.js");
34
33
  await applyPatches();
35
34
  const [platformBrowser, platformServer, common, core] = await Promise.all([
36
35
  import(resolveAngularRuntimePath("@angular/platform-browser")),
@@ -75,30 +74,6 @@ var cacheRouteData = (pagePath, data) => {
75
74
  };
76
75
  var getCachedRouteData = (pagePath) => routePropsCache.get(pagePath);
77
76
  var selectorCache = new Map;
78
- var buildDeps = (ssrResult, baseDeps) => {
79
- if (!ssrResult?.core) {
80
- return baseDeps;
81
- }
82
- const { common, core, platformBrowser, platformServer } = ssrResult;
83
- return {
84
- APP_BASE_HREF: common?.APP_BASE_HREF ?? baseDeps.APP_BASE_HREF,
85
- bootstrapApplication: platformBrowser?.bootstrapApplication ?? baseDeps.bootstrapApplication,
86
- DomSanitizer: platformBrowser?.DomSanitizer ?? baseDeps.DomSanitizer,
87
- ENVIRONMENT_INITIALIZER: core.ENVIRONMENT_INITIALIZER ?? baseDeps.ENVIRONMENT_INITIALIZER,
88
- inject: core.inject ?? baseDeps.inject,
89
- provideClientHydration: platformBrowser?.provideClientHydration ?? baseDeps.provideClientHydration,
90
- provideServerRendering: platformServer?.provideServerRendering ?? baseDeps.provideServerRendering,
91
- provideZonelessChangeDetection: core.provideZonelessChangeDetection,
92
- reflectComponentType: core.reflectComponentType,
93
- renderApplication: platformServer?.renderApplication ?? baseDeps.renderApplication,
94
- REQUEST: core.REQUEST ?? baseDeps.REQUEST,
95
- REQUEST_CONTEXT: core.REQUEST_CONTEXT ?? baseDeps.REQUEST_CONTEXT,
96
- RESPONSE_INIT: core.RESPONSE_INIT ?? baseDeps.RESPONSE_INIT,
97
- Sanitizer: core.Sanitizer,
98
- SecurityContext: core.SecurityContext,
99
- withHttpTransferCacheOptions: platformBrowser?.withHttpTransferCacheOptions ?? baseDeps.withHttpTransferCacheOptions
100
- };
101
- };
102
77
  var buildProviders = (deps, sanitizer, maybeProps, tokenMap, request, requestContext, responseInit, userProviders = []) => {
103
78
  const providers = [
104
79
  deps.provideServerRendering(),
@@ -130,21 +105,6 @@ var isInjectionToken = (value) => {
130
105
  return "ngMetadataName" in value && value.ngMetadataName === "InjectionToken";
131
106
  };
132
107
  var discoverTokens = (pageModule) => new Map(Object.entries(pageModule).filter(([, value]) => isInjectionToken(value)));
133
- var loadSsrDeps = async (pagePath) => {
134
- const ssrDepsPath = (pagePath.split("?")[0] ?? pagePath).replace(/\.js$/, ".ssr-deps.js");
135
- try {
136
- const ssrDeps = await import(ssrDepsPath);
137
- const result = {
138
- common: ssrDeps.__angularCommon,
139
- core: ssrDeps.__angularCore,
140
- platformBrowser: ssrDeps.__angularPlatformBrowser,
141
- platformServer: ssrDeps.__angularPlatformServer
142
- };
143
- return result;
144
- } catch {
145
- return null;
146
- }
147
- };
148
108
  var resolveSelector = (deps, pagePath, PageComponent) => {
149
109
  const cached = selectorCache.get(pagePath);
150
110
  if (cached) {
@@ -201,7 +161,7 @@ var withSuppressedAngularDevLogs = async (render) => {
201
161
  }
202
162
  };
203
163
 
204
- export { getAngularDeps, cacheRouteData, getCachedRouteData, buildDeps, buildProviders, clearSelectorCache, discoverTokens, loadSsrDeps, resolveSelector, injectSsrScripts, renderAngularApp, withSuppressedAngularDevLogs };
164
+ export { getAngularDeps, cacheRouteData, getCachedRouteData, buildProviders, clearSelectorCache, discoverTokens, resolveSelector, injectSsrScripts, renderAngularApp, withSuppressedAngularDevLogs };
205
165
 
206
- //# debugId=70A307989631B9D464756E2164756E21
207
- //# sourceMappingURL=chunk-hf5fjykx.js.map
166
+ //# debugId=B7A848C26CC37E7664756E2164756E21
167
+ //# sourceMappingURL=chunk-kn1jn1he.js.map
@@ -0,0 +1,11 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../src/angular/angularDeps.ts", "../src/angular/ssrRender.ts"],
4
+ "sourcesContent": [
5
+ "import type { AngularDeps } from '../../types/angular';\nimport { resolveAngularRuntimePath } from './resolveAngularPackage';\n\nconst initDominoAdapter = (platformServer: {\n\tɵDominoAdapter?: { makeCurrent?: () => void };\n}) => {\n\ttry {\n\t\tplatformServer.ɵDominoAdapter?.makeCurrent?.();\n\t} catch (err) {\n\t\tconsole.error('Failed to initialize DominoAdapter:', err);\n\t}\n};\n\nconst loadAngularDeps = async () => {\n\t// JIT compiler is only needed in development, where user pages are\n\t// runtime-compiled by `compileAngularFileJIT` and emit partial\n\t// declarations that need the compiler facade to link. In production\n\t// the linker has already processed every partial declaration into\n\t// final ɵdir/ɵcmp/ɵfac at vendor build time, so the compiler isn't\n\t// imported and isn't part of the prod vendor bundle.\n\tif (process.env.NODE_ENV !== 'production') {\n\t\tawait import(resolveAngularRuntimePath('@angular/compiler'));\n\t}\n\n\t// angularPatch imports @angular/platform-server internally, so it\n\t// must also run after the compiler is available.\n\tconst { applyPatches } = await import('./angularPatch');\n\tawait applyPatches();\n\n\t// Now safe to load all Angular packages in parallel\n\tconst [platformBrowser, platformServer, common, core] = await Promise.all([\n\t\timport(resolveAngularRuntimePath('@angular/platform-browser')),\n\t\timport(resolveAngularRuntimePath('@angular/platform-server')),\n\t\timport(resolveAngularRuntimePath('@angular/common')),\n\t\timport(resolveAngularRuntimePath('@angular/core'))\n\t]);\n\n\tif (process.env.NODE_ENV !== 'development') {\n\t\tcore.enableProdMode();\n\t}\n\n\tinitDominoAdapter(platformServer);\n\n\treturn {\n\t\tAPP_BASE_HREF: common.APP_BASE_HREF,\n\t\tbootstrapApplication: platformBrowser.bootstrapApplication,\n\t\tDomSanitizer: platformBrowser.DomSanitizer,\n\t\tENVIRONMENT_INITIALIZER: core.ENVIRONMENT_INITIALIZER,\n\t\tinject: core.inject,\n\t\tprovideClientHydration: platformBrowser.provideClientHydration,\n\t\tprovideServerRendering: platformServer.provideServerRendering,\n\t\tprovideZonelessChangeDetection: core.provideZonelessChangeDetection,\n\t\treflectComponentType: core.reflectComponentType,\n\t\trenderApplication: platformServer.renderApplication,\n\t\tREQUEST: core.REQUEST,\n\t\tREQUEST_CONTEXT: core.REQUEST_CONTEXT,\n\t\tRESPONSE_INIT: core.RESPONSE_INIT,\n\t\tSanitizer: core.Sanitizer,\n\t\tSecurityContext: core.SecurityContext,\n\t\twithHttpTransferCacheOptions:\n\t\t\tplatformBrowser.withHttpTransferCacheOptions\n\t};\n};\n\nlet angularDeps: Promise<AngularDeps> | null = null;\n\nexport const getAngularDeps = () => {\n\tif (!angularDeps) {\n\t\tangularDeps = loadAngularDeps();\n\t}\n\n\treturn angularDeps;\n};\n",
6
+ "import type { EnvironmentProviders, Provider, Type } from '@angular/core';\nimport type { BootstrapContext } from '@angular/platform-browser';\nimport type { AngularDeps, CachedRouteData } from '../../types/angular';\nimport { toScreamingSnake } from '../utils/stringModifiers';\nimport {\n\tgetAndClearClientScripts,\n\tgenerateClientScriptCode\n} from '../utils/registerClientScript';\nimport { buildAbsoluteHttpTransferCacheOptions } from './httpTransferCache';\nimport { buildRequestProviders } from './requestProviders';\n\n// --- Last-used props cache for HMR ---\n// Stores { props, headTag } from the most recent real request per route\n// so HMR re-renders with the same data the user last saw (Vite/Next behavior).\n\nconst routePropsCache = new Map<string, CachedRouteData>();\n\nexport const cacheRouteData = (pagePath: string, data: CachedRouteData) => {\n\tconst cacheKey = pagePath.split('?')[0] ?? pagePath;\n\troutePropsCache.set(cacheKey, data);\n};\nexport const getCachedRouteData = (pagePath: string) =>\n\troutePropsCache.get(pagePath);\n\n// --- Selector cache ---\n\nconst selectorCache = new Map<string, string>();\nexport const buildProviders = (\n\tdeps: AngularDeps,\n\tsanitizer: InstanceType<AngularDeps['DomSanitizer']>,\n\tmaybeProps: Record<string, unknown> | undefined,\n\ttokenMap: Map<string, unknown>,\n\trequest: Request | undefined,\n\trequestContext: unknown,\n\tresponseInit: ResponseInit | undefined,\n\tuserProviders: ReadonlyArray<Provider | EnvironmentProviders> = []\n) => {\n\tconst providers: (Provider | EnvironmentProviders)[] = [\n\t\tdeps.provideServerRendering(),\n\t\tdeps.provideClientHydration(\n\t\t\tdeps.withHttpTransferCacheOptions(\n\t\t\t\tbuildAbsoluteHttpTransferCacheOptions()\n\t\t\t)\n\t\t),\n\t\tdeps.provideZonelessChangeDetection(),\n\t\t{ provide: deps.APP_BASE_HREF, useValue: '/' },\n\t\t{\n\t\t\tprovide: deps.DomSanitizer,\n\t\t\tuseValue: sanitizer\n\t\t},\n\t\t{ provide: deps.Sanitizer, useValue: sanitizer },\n\t\t...buildRequestProviders(deps, request, requestContext, responseInit),\n\t\t...userProviders\n\t];\n\n\tif (!maybeProps) {\n\t\treturn providers;\n\t}\n\n\tconst propProviders = Object.entries(maybeProps)\n\t\t.map(([propName, propValue]) => ({\n\t\t\ttoken: tokenMap.get(toScreamingSnake(propName)),\n\t\t\tvalue: propValue\n\t\t}))\n\t\t.filter((entry) => entry.token)\n\t\t.map((entry) => ({ provide: entry.token, useValue: entry.value }));\n\n\treturn [...providers, ...propProviders];\n};\nexport const clearSelectorCache = () => selectorCache.clear();\n\nconst isInjectionToken = (value: unknown) => {\n\tif (!value || typeof value !== 'object') {\n\t\treturn false;\n\t}\n\n\treturn (\n\t\t'ngMetadataName' in value && value.ngMetadataName === 'InjectionToken'\n\t);\n};\n\nexport const discoverTokens = (pageModule: Record<string, unknown>) =>\n\tnew Map(\n\t\tObject.entries(pageModule).filter(([, value]) =>\n\t\t\tisInjectionToken(value)\n\t\t)\n\t);\nexport const resolveSelector = (\n\tdeps: AngularDeps,\n\tpagePath: string,\n\tPageComponent: Type<unknown>\n) => {\n\tconst cached = selectorCache.get(pagePath);\n\tif (cached) {\n\t\treturn cached;\n\t}\n\n\tconst selector =\n\t\tdeps.reflectComponentType(PageComponent)?.selector ?? 'ng-app';\n\tselectorCache.set(pagePath, selector);\n\n\treturn selector;\n};\n\n// --- Inject HTML helper ---\n\nconst injectBeforeClose = (html: string, snippet: string) => {\n\tif (html.includes('</body>')) {\n\t\treturn html.replace('</body>', `${snippet}</body>`);\n\t}\n\tif (html.includes('</html>')) {\n\t\treturn html.replace('</html>', `${snippet}</html>`);\n\t}\n\n\treturn html + snippet;\n};\n\n// --- Post-render HTML injection ---\n\nexport const injectSsrScripts = (\n\thtml: string,\n\trequestId: string,\n\tindexPath: string,\n\tprops?: Record<string, unknown>\n) => {\n\tlet result = html;\n\n\tconst registeredScripts = getAndClearClientScripts(requestId);\n\tif (registeredScripts.length > 0) {\n\t\tresult = injectBeforeClose(\n\t\t\tresult,\n\t\t\tgenerateClientScriptCode(registeredScripts)\n\t\t);\n\t}\n\n\tif (props) {\n\t\tresult = injectBeforeClose(\n\t\t\tresult,\n\t\t\t`<script>window.__ABS_ANGULAR_PAGE_PROPS__ = ${JSON.stringify(props)};</script>`\n\t\t);\n\t}\n\n\tif (indexPath) {\n\t\tconst escapedIndexPath = JSON.stringify(indexPath);\n\t\tresult = injectBeforeClose(\n\t\t\tresult,\n\t\t\t`<script>import(${escapedIndexPath});</script>`\n\t\t);\n\t}\n\n\treturn result;\n};\nexport const renderAngularApp = async (\n\tdeps: AngularDeps,\n\tPageComponent: Type<unknown>,\n\tproviders: (Provider | EnvironmentProviders)[],\n\tdocument: string | Document,\n\turl: string = '/'\n) => {\n\tconst bootstrap = (context: BootstrapContext) =>\n\t\tdeps.bootstrapApplication(PageComponent, { providers }, context);\n\n\treturn withSuppressedAngularDevLogs(() =>\n\t\tdeps.renderApplication(bootstrap, {\n\t\t\tdocument,\n\t\t\tplatformProviders: [],\n\t\t\turl\n\t\t})\n\t);\n};\nexport const withSuppressedAngularDevLogs = async <T>(\n\trender: () => Promise<T>\n) => {\n\tconst origLog = console.log;\n\tconsole.log = (...args: unknown[]) => {\n\t\tif (\n\t\t\ttypeof args[0] === 'string' &&\n\t\t\targs[0].includes('development mode')\n\t\t) {\n\t\t\treturn;\n\t\t}\n\t\torigLog.apply(console,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,EAEA,OAAO;AAAA;AAED,IAAM,mBAAmB,OAC/B,MACA,eACA,WACA,UACA,MAAc,QACV;AAAA,EACJ,MAAM,YAAY,CAAC,YAClB,KAAK,qBAAqB,eAAe,EAAE,UAAU,GAAG,OAAO;AAAA,EAEhE,OAAO,6BAA6B,MACnC,KAAK,kBAAkB,WAAW;AAAA,IACjC;AAAA,IACA,mBAAmB,CAAC;AAAA,IACpB;AAAA,EACD,CAAC,CACF;AAAA;AAEM,IAAM,+BAA+B,OAC3C,WACI;AAAA,EACJ,MAAM,UAAU,QAAQ;AAAA,EACxB,QAAQ,MAAM,IAAI,SAAoB;AAAA,IACrC,IACC,OAAO,KAAK,OAAO,YACnB,KAAK,GAAG,SAAS,kBAAkB,GAClC;AAAA,MACD;AAAA,IACD;AAAA,IACA,QAAQ,MAAM,SAAS,IAAI;AAAA;AAAA,EAG5B,IAAI;AAAA,IACH,OAAO,MAAM,OAAO;AAAA,YACnB;AAAA,IACD,QAAQ,MAAM;AAAA;AAAA;",
9
+ "debugId": "B7A848C26CC37E7664756E2164756E21",
10
+ "names": []
11
+ }
@@ -1,7 +1,7 @@
1
1
  // @bun
2
2
  import {
3
3
  resolveAngularRuntimePath
4
- } from "./chunk-0r32762k.js";
4
+ } from "./chunk-dxcf95sb.js";
5
5
  import"./chunk-bmgqm774.js";
6
6
 
7
7
  // src/angular/angularPatch.ts
@@ -146,4 +146,4 @@ export {
146
146
  };
147
147
 
148
148
  //# debugId=D59B1B9EA72E3DAF64756E2164756E21
149
- //# sourceMappingURL=chunk-by7t1d3r.js.map
149
+ //# sourceMappingURL=chunk-kp7gkhcr.js.map
@@ -3,10 +3,10 @@ import {
3
3
  getAngularIslandSelector,
4
4
  mountAngularIsland,
5
5
  renderAngularIslandToHtml
6
- } from "./chunk-ccz4x8vr.js";
7
- import"./chunk-hf5fjykx.js";
8
- import"./chunk-r8dzkm4s.js";
9
- import"./chunk-0r32762k.js";
6
+ } from "./chunk-7syt9sz1.js";
7
+ import"./chunk-kn1jn1he.js";
8
+ import"./chunk-dxcf95sb.js";
9
+ import"./chunk-pnscgw95.js";
10
10
  import"./chunk-p5504p14.js";
11
11
  import"./chunk-25v9t56f.js";
12
12
  import"./chunk-bmgqm774.js";
@@ -17,4 +17,4 @@ export {
17
17
  };
18
18
 
19
19
  //# debugId=C1AFCC34B998790A64756E2164756E21
20
- //# sourceMappingURL=chunk-pevt15h0.js.map
20
+ //# sourceMappingURL=chunk-nq65m0kj.js.map
@@ -6,7 +6,7 @@ import {
6
6
  computeAngularServerVendorPathsAsync,
7
7
  computeAngularVendorPaths,
8
8
  computeAngularVendorPathsAsync
9
- } from "./chunk-gxrsf71e.js";
9
+ } from "./chunk-bjdg6cw6.js";
10
10
  import"./chunk-7kjj42xm.js";
11
11
  import"./chunk-bmgqm774.js";
12
12
  export {
@@ -19,4 +19,4 @@ export {
19
19
  };
20
20
 
21
21
  //# debugId=C6F3C3EFFE1C979664756E2164756E21
22
- //# sourceMappingURL=chunk-0fsxp5gc.js.map
22
+ //# sourceMappingURL=chunk-nrbnqx5s.js.map
@@ -0,0 +1,90 @@
1
+ // @bun
2
+ // src/utils/registerClientScript.ts
3
+ var scriptRegistry = new Map;
4
+ var requestCounter = 0;
5
+ var getRequestId = () => `req_${Date.now()}_${++requestCounter}`;
6
+ var ssrContextGetter = null;
7
+ var getSsrContextId = () => ssrContextGetter?.() || Object.getOwnPropertyDescriptor(globalThis, "__absolutejs_requestId")?.value;
8
+ var registerClientScript = (script, requestId) => {
9
+ const id = requestId || getSsrContextId() || getRequestId();
10
+ if (!scriptRegistry.has(id)) {
11
+ scriptRegistry.set(id, new Set);
12
+ }
13
+ scriptRegistry.get(id)?.add(script);
14
+ return id;
15
+ };
16
+ var setSsrContextGetter = (getter) => {
17
+ ssrContextGetter = getter;
18
+ };
19
+ if (typeof globalThis !== "undefined") {
20
+ Object.assign(globalThis, { registerClientScript });
21
+ }
22
+ var clearAllClientScripts = () => {
23
+ scriptRegistry.clear();
24
+ };
25
+ var generateClientScriptCode = (scripts) => {
26
+ if (scripts.length === 0) {
27
+ return "";
28
+ }
29
+ const scriptCode = scripts.map((script, index) => {
30
+ const funcString = script.toString();
31
+ const bodyMatch = funcString.match(/\{([\s\S]*)\}/);
32
+ if (!bodyMatch || !bodyMatch[1]) {
33
+ return "";
34
+ }
35
+ const body = bodyMatch[1].trim();
36
+ return `
37
+ (function() {
38
+ var executed = false;
39
+ function executeScript_${index}() {
40
+ if (executed) return;
41
+ executed = true;
42
+ ${body}
43
+ }
44
+
45
+ if (document.readyState === 'complete' || document.readyState === 'interactive') {
46
+ executeScript_${index}();
47
+ } else {
48
+ document.addEventListener('DOMContentLoaded', executeScript_${index});
49
+ }
50
+
51
+ // Watch for hydration-added elements
52
+ var observer = new MutationObserver(function() {
53
+ executeScript_${index}();
54
+ if (executed) observer.disconnect();
55
+ });
56
+ if (!executed) {
57
+ observer.observe(document.body || document.documentElement, { childList: true, subtree: true });
58
+ }
59
+
60
+ // Single fallback timeout
61
+ setTimeout(function() {
62
+ executeScript_${index}();
63
+ observer.disconnect();
64
+ }, 1000);
65
+ })();`;
66
+ }).join(`
67
+ `);
68
+ return `<script>
69
+ (function() {
70
+ ${scriptCode}
71
+ })();
72
+ </script>`;
73
+ };
74
+ var getAndClearClientScripts = (requestId) => {
75
+ const id = requestId || ssrContextGetter?.();
76
+ if (!id)
77
+ return [];
78
+ const scripts = scriptRegistry.get(id);
79
+ if (!scripts) {
80
+ return [];
81
+ }
82
+ const scriptArray = Array.from(scripts);
83
+ scriptRegistry.delete(id);
84
+ return scriptArray;
85
+ };
86
+
87
+ export { getSsrContextId, registerClientScript, setSsrContextGetter, clearAllClientScripts, generateClientScriptCode, getAndClearClientScripts };
88
+
89
+ //# debugId=9DFF481135ABC22A64756E2164756E21
90
+ //# sourceMappingURL=chunk-pnscgw95.js.map
@@ -0,0 +1,10 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../src/utils/registerClientScript.ts"],
4
+ "sourcesContent": [
5
+ "/**\n * Utility for registering client-side scripts that need to run after Angular SSR hydration.\n *\n * This is necessary because Angular's lifecycle hooks don't always run reliably on the client\n * after SSR hydration, especially for event listeners attached to DOM elements.\n *\n * Usage in Angular components:\n * ```typescript\n * import { registerClientScript } from '@absolutejs/absolute';\n *\n * // Register an event listener script\n * registerClientScript(() => {\n * const element = document.querySelector('.my-element');\n * if (element) {\n * element.addEventListener('click', () => {\n * console.log('Clicked!');\n * });\n * }\n * });\n * ```\n *\n * The script will be automatically injected into the HTML response and executed on the client.\n */\n\n// Request-scoped registry for client scripts\n// Each request gets its own set of scripts to inject\nconst scriptRegistry = new Map<string, Set<() => void>>();\n\n// Generate a unique request ID for tracking scripts per request\nlet requestCounter = 0;\nconst getRequestId = () => `req_${Date.now()}_${++requestCounter}`;\n\n// Allow SSR frameworks to inject a request context getter (e.g. AsyncLocalStorage)\nlet ssrContextGetter: (() => string | undefined) | null = null;\nexport const getSsrContextId = () =>\n\tssrContextGetter?.() ||\n\tObject.getOwnPropertyDescriptor(globalThis, '__absolutejs_requestId')\n\t\t?.value;\nexport const registerClientScript = (\n\tscript: () => void,\n\trequestId?: string\n) => {\n\t// Try to get requestId from explicit arg, then Async Context, then global fallback\n\tconst id = requestId || getSsrContextId() || getRequestId();\n\n\tif (!scriptRegistry.has(id)) {\n\t\tscriptRegistry.set(id, new Set());\n\t}\n\n\tscriptRegistry.get(id)?.add(script);\n\n\treturn id;\n};\nexport const setSsrContextGetter = (getter: () => string | undefined) => {\n\tssrContextGetter = getter;\n};\n\n// Make registerClientScript available globally during SSR for Angular components\n// Using type assertion for globalThis extension\nif (typeof globalThis !== 'undefined') {\n\tObject.assign(globalThis, { registerClientScript });\n}\n\n/**\n * Get all registered scripts for a request and clear them.\n * This is called by the page handler after rendering.\n *\n * @param requestId - The request ID to get scripts for\n * @returns Array of script functions, or empty array if none registered\n */\nexport const clearAllClientScripts = () => {\n\tscriptRegistry.clear();\n};\nexport const generateClientScriptCode = (scripts: (() => void)[]) => {\n\tif (scripts.length === 0) {\n\t\treturn '';\n\t}\n\n\t// Convert functions to strings and wrap in IIFE\n\tconst scriptCode = scripts\n\t\t.map((script, index) => {\n\t\t\t// Get the function body as a string\n\t\t\tconst funcString = script.toString();\n\n\t\t\t// Extract the body (everything between { and })\n\t\t\tconst bodyMatch = funcString.match(/\\{([\\s\\S]*)\\}/);\n\t\t\tif (!bodyMatch || !bodyMatch[1]) {\n\t\t\t\treturn '';\n\t\t\t}\n\n\t\t\tconst body = bodyMatch[1].trim();\n\n\t\t\t// Wrap in IIFE with MutationObserver for DOM readiness\n\t\t\treturn `\n\t(function() {\n\t\tvar executed = false;\n\t\tfunction executeScript_${index}() {\n\t\t\tif (executed) return;\n\t\t\texecuted = true;\n\t\t\t${body}\n\t\t}\n\n\t\tif (document.readyState === 'complete' || document.readyState === 'interactive') {\n\t\t\texecuteScript_${index}();\n\t\t} else {\n\t\t\tdocument.addEventListener('DOMContentLoaded', executeScript_${index});\n\t\t}\n\n\t\t// Watch for hydration-added elements\n\t\tvar observer = new MutationObserver(function() {\n\t\t\texecuteScript_${index}();\n\t\t\tif (executed) observer.disconnect();\n\t\t});\n\t\tif (!executed) {\n\t\t\tobserver.observe(document.body || document.documentElement, { childList: true, subtree: true });\n\t\t}\n\n\t\t// Single fallback timeout\n\t\tsetTimeout(function() {\n\t\t\texecuteScript_${index}();\n\t\t\tobserver.disconnect();\n\t\t}, 1000);\n\t})();`;\n\t\t})\n\t\t.join('\\n');\n\n\treturn `<script>\n(function() {\n${scriptCode}\n})();\n</script>`;\n};\nexport const getAndClearClientScripts = (requestId?: string) => {\n\tconst id = requestId || ssrContextGetter?.();\n\tif (!id) return [];\n\n\tconst scripts = scriptRegistry.get(id);\n\tif (!scripts) {\n\t\treturn [];\n\t}\n\n\tconst scriptArray = Array.from(scripts);\n\tscriptRegistry.delete(id);\n\n\treturn scriptArray;\n};\n"
6
+ ],
7
+ "mappings": ";;AA0BA,IAAM,iBAAiB,IAAI;AAG3B,IAAI,iBAAiB;A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AAK;AAAA,CAAI;AAAA,EAEX,OAAO;AAAA;AAAA,EAEN;AAAA;AAAA;AAAA;AAIK,IAAM,2BAA2B,CAAC,cAAuB;AAAA,EAC/D,MAAM,KAAK,aAAa,mBAAmB;AAAA,EAC3C,IAAI,CAAC;AAAA,IAAI,OAAO,CAAC;AAAA,EAEjB,MAAM,UAAU,eAAe,IAAI,EAAE;AAAA,EACrC,IAAI,CAAC,SAAS;AAAA,IACb,OAAO,CAAC;AAAA,EACT;AAAA,EAEA,MAAM,cAAc,MAAM,KAAK,OAAO;AAAA,EACtC,eAAe,OAAO,EAAE;AAAA,EAExB,OAAO;AAAA;",
8
+ "debugId": "9DFF481135ABC22A64756E2164756E21",
9
+ "names": []
10
+ }
@@ -32,7 +32,7 @@ import {
32
32
  computeAngularVendorPaths,
33
33
  computeAngularVendorPathsAsync,
34
34
  createAngularLinkerPlugin
35
- } from "./chunk-gxrsf71e.js";
35
+ } from "./chunk-bjdg6cw6.js";
36
36
  import {
37
37
  buildVueVendor,
38
38
  computeVueVendorPaths
@@ -80,7 +80,7 @@ import {
80
80
  logStartupTimingBlock,
81
81
  setCurrentPageIslandMetadata,
82
82
  transformStaticPagesWithIslands
83
- } from "./chunk-r0w678ve.js";
83
+ } from "./chunk-5s1km9v3.js";
84
84
  import {
85
85
  disposeTailwindCompiler,
86
86
  incrementalTailwindBuild
@@ -1070,7 +1070,7 @@ var build = async ({
1070
1070
  vueIndexPaths: [...emptyStringArray],
1071
1071
  vueServerPaths: [...emptyStringArray]
1072
1072
  },
1073
- shouldCompileAngular ? tracePhase("compile/angular", () => import("./chunk-a0x4bf8d.js").then((mod) => mod.compileAngular(angularEntries, angularDir, hmr, styleTransformConfig))) : {
1073
+ shouldCompileAngular ? tracePhase("compile/angular", () => import("./chunk-92fsjfpp.js").then((mod) => mod.compileAngular(angularEntries, angularDir, hmr, styleTransformConfig))) : {
1074
1074
  clientPaths: [...emptyStringArray],
1075
1075
  serverPaths: [...emptyStringArray]
1076
1076
  },
@@ -1080,7 +1080,7 @@ var build = async ({
1080
1080
  shouldCompileIslandVue ? tracePhase("compile/island-vue", () => import("./chunk-5f67rsed.js").then((mod) => mod.compileVue(islandVueSources, vueDir, hmr, styleTransformConfig))) : {
1081
1081
  vueClientPaths: [...emptyStringArray]
1082
1082
  },
1083
- shouldCompileIslandAngular ? tracePhase("compile/island-angular", () => import("./chunk-a0x4bf8d.js").then((mod) => mod.compileAngular(islandAngularSources, angularDir, hmr, styleTransformConfig))) : {
1083
+ shouldCompileIslandAngular ? tracePhase("compile/island-angular", () => import("./chunk-92fsjfpp.js").then((mod) => mod.compileAngular(islandAngularSources, angularDir, hmr, styleTransformConfig))) : {
1084
1084
  clientPaths: [...emptyStringArray]
1085
1085
  }
1086
1086
  ]);
@@ -1158,7 +1158,7 @@ var build = async ({
1158
1158
  tracePhase("compile/convention-react", compileReactConventions),
1159
1159
  svelteConventionSources.length > 0 && svelteDir ? tracePhase("compile/convention-svelte", () => import("./chunk-x09cskqd.js").then((mod) => mod.compileSvelte(svelteConventionSources, svelteDir, new Map, false, styleTransformConfig))) : { svelteServerPaths: emptyStringArray },
1160
1160
  vueConventionSources.length > 0 && vueDir ? tracePhase("compile/convention-vue", () => import("./chunk-5f67rsed.js").then((mod) => mod.compileVue(vueConventionSources, vueDir, false, styleTransformConfig))) : { vueServerPaths: emptyStringArray },
1161
- angularConventionSources.length > 0 && angularDir ? tracePhase("compile/convention-angular", () => import("./chunk-a0x4bf8d.js").then((mod) => mod.compileAngular(angularConventionSources, angularDir, hmr, styleTransformConfig))) : { serverPaths: emptyStringArray }
1161
+ angularConventionSources.length > 0 && angularDir ? tracePhase("compile/convention-angular", () => import("./chunk-92fsjfpp.js").then((mod) => mod.compileAngular(angularConventionSources, angularDir, hmr, styleTransformConfig))) : { serverPaths: emptyStringArray }
1162
1162
  ]);
1163
1163
  const bundleConventionFiles = async (framework, compiledPaths) => {
1164
1164
  const destDir = join2(buildPath, "conventions", framework);
@@ -1282,13 +1282,13 @@ var build = async ({
1282
1282
  }
1283
1283
  let angularVendorPaths = getAngularVendorPaths();
1284
1284
  if (!angularVendorPaths && hmr && angularDir) {
1285
- const { computeAngularVendorPaths: computeAngularVendorPaths2 } = await import("./chunk-0fsxp5gc.js");
1285
+ const { computeAngularVendorPaths: computeAngularVendorPaths2 } = await import("./chunk-nrbnqx5s.js");
1286
1286
  angularVendorPaths = computeAngularVendorPaths2(globalThis.__angularVendorSpecifiers);
1287
1287
  setAngularVendorPaths(angularVendorPaths);
1288
1288
  }
1289
1289
  let angularServerVendorPaths = getAngularServerVendorPaths();
1290
1290
  if (!angularServerVendorPaths && hmr && angularDir) {
1291
- const { computeAngularServerVendorPaths: computeAngularServerVendorPaths2 } = await import("./chunk-0fsxp5gc.js");
1291
+ const { computeAngularServerVendorPaths: computeAngularServerVendorPaths2 } = await import("./chunk-nrbnqx5s.js");
1292
1292
  angularServerVendorPaths = computeAngularServerVendorPaths2(buildPath, globalThis.__angularVendorSpecifiers ?? []);
1293
1293
  setAngularServerVendorPaths(angularServerVendorPaths);
1294
1294
  }
@@ -1306,10 +1306,10 @@ var build = async ({
1306
1306
  buildAngularServerVendor: buildAngularServerVendor2,
1307
1307
  computeAngularVendorPathsAsync: computeAngularVendorPathsAsync2,
1308
1308
  computeAngularServerVendorPathsAsync: computeAngularServerVendorPathsAsync2
1309
- } = await import("./chunk-0fsxp5gc.js");
1309
+ } = await import("./chunk-nrbnqx5s.js");
1310
1310
  [angularVendorPaths, angularServerVendorPaths] = await Promise.all([
1311
- computeAngularVendorPathsAsync2(angularSourceDirs),
1312
- computeAngularServerVendorPathsAsync2(buildPath, angularSourceDirs)
1311
+ computeAngularVendorPathsAsync2(angularSourceDirs, false),
1312
+ computeAngularServerVendorPathsAsync2(buildPath, angularSourceDirs, false)
1313
1313
  ]);
1314
1314
  setAngularVendorPaths(angularVendorPaths);
1315
1315
  setAngularServerVendorPaths(angularServerVendorPaths);
@@ -2731,7 +2731,7 @@ var bundleAngularClient = async (state, clientPaths, buildDir) => {
2731
2731
  const depVendorPaths = globalThis.__depVendorPaths ?? {};
2732
2732
  let angVendorPaths = getAngularVendorPaths2();
2733
2733
  if (!angVendorPaths) {
2734
- const { computeAngularVendorPaths: computeAngularVendorPaths2 } = await import("./chunk-0fsxp5gc.js");
2734
+ const { computeAngularVendorPaths: computeAngularVendorPaths2 } = await import("./chunk-nrbnqx5s.js");
2735
2735
  const { setAngularVendorPaths: setAngularVendorPaths2 } = await import("./chunk-vjhxm8n2.js");
2736
2736
  angVendorPaths = computeAngularVendorPaths2(globalThis.__angularVendorSpecifiers);
2737
2737
  setAngularVendorPaths2(angVendorPaths);
@@ -2794,8 +2794,16 @@ var broadcastAngularPageUpdates = (state, pagesToUpdate, manifest, startTime) =>
2794
2794
  });
2795
2795
  };
2796
2796
  var compileAndBundleAngular = async (state, pageEntries, angularDir) => {
2797
- const { compileAngular } = await import("./chunk-a0x4bf8d.js");
2797
+ const { compileAngular } = await import("./chunk-92fsjfpp.js");
2798
2798
  const { clientPaths, serverPaths } = await compileAngular(pageEntries, angularDir, true, getStyleTransformConfig(state.config));
2799
+ if (serverPaths.length > 0) {
2800
+ const { getAngularServerVendorPaths: getAngularServerVendorPaths2 } = await import("./chunk-vjhxm8n2.js");
2801
+ const angServerVendorPaths = getAngularServerVendorPaths2();
2802
+ if (angServerVendorPaths) {
2803
+ const { rewriteImports } = await import("./chunk-r7jmgqnw.js");
2804
+ await rewriteImports(serverPaths, angServerVendorPaths);
2805
+ }
2806
+ }
2799
2807
  serverPaths.forEach((serverPath) => {
2800
2808
  const fileBase = basename4(serverPath, ".js");
2801
2809
  state.manifest[toPascal(fileBase)] = resolve9(serverPath);
@@ -4393,5 +4401,5 @@ var devBuild = async (config) => {
4393
4401
 
4394
4402
  export { build, devBuild };
4395
4403
 
4396
- //# debugId=522511C75F3F794F64756E2164756E21
4397
- //# sourceMappingURL=chunk-n5a5nxnt.js.map
4404
+ //# debugId=C67C66C0EB01F95664756E2164756E21
4405
+ //# sourceMappingURL=chunk-qx83krhs.js.map