@absolutejs/absolute 0.19.0-beta.772 → 0.19.0-beta.773

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.
@@ -182,9 +182,9 @@ var init_registerClientScript = __esm(() => {
182
182
  });
183
183
 
184
184
  // src/angular/resolveAngularPackage.ts
185
- import { existsSync } from "fs";
186
- import { resolve } from "path";
187
- var resolveAngularPackage = (specifier) => {
185
+ import { existsSync, readFileSync } from "fs";
186
+ import { join, resolve } from "path";
187
+ var resolveAngularPackageDir = (specifier) => {
188
188
  const fromCompiledRuntime = process.env.ABSOLUTE_BUILD_DIR ? resolve(process.env.ABSOLUTE_BUILD_DIR, "node_modules", specifier) : null;
189
189
  if (fromCompiledRuntime && existsSync(fromCompiledRuntime)) {
190
190
  return fromCompiledRuntime;
@@ -193,13 +193,27 @@ var resolveAngularPackage = (specifier) => {
193
193
  if (existsSync(fromProject)) {
194
194
  return fromProject;
195
195
  }
196
+ return null;
197
+ }, resolvePackageEntry = (packageDir) => {
198
+ try {
199
+ const pkg = JSON.parse(readFileSync(join(packageDir, "package.json"), "utf-8"));
200
+ const rootExport = pkg.exports?.["."];
201
+ const entry = (typeof rootExport === "string" ? rootExport : rootExport?.default) ?? pkg.module ?? pkg.main ?? "index.js";
202
+ return join(packageDir, entry);
203
+ } catch {
204
+ return packageDir;
205
+ }
206
+ }, resolveAngularPackage = (specifier) => {
207
+ const packageDir = resolveAngularPackageDir(specifier);
208
+ if (packageDir)
209
+ return resolvePackageEntry(packageDir);
196
210
  return specifier;
197
211
  };
198
212
  var init_resolveAngularPackage = () => {};
199
213
 
200
214
  // src/angular/injectorPatch.ts
201
- import { existsSync as existsSync2, readFileSync, writeFileSync } from "fs";
202
- import { dirname, join } from "path";
215
+ import { existsSync as existsSync2, readFileSync as readFileSync2, writeFileSync } from "fs";
216
+ import { dirname, join as join2 } from "path";
203
217
  var applyInjectorPatch = (chunkPath, content) => {
204
218
  if (content.includes('Symbol.for("angular.currentInjector")')) {
205
219
  return;
@@ -235,16 +249,16 @@ var applyInjectorPatch = (chunkPath, content) => {
235
249
  }
236
250
  writeFileSync(chunkPath, patched, "utf-8");
237
251
  }, resolveAngularCoreDir = () => {
238
- const resolved = resolveAngularPackage("@angular/core");
239
- if (existsSync2(join(resolved, "package.json"))) {
252
+ const resolved = resolveAngularPackageDir("@angular/core");
253
+ if (resolved && existsSync2(join2(resolved, "package.json"))) {
240
254
  return resolved;
241
255
  }
242
256
  return dirname(__require.resolve("@angular/core/package.json"));
243
257
  }, patchAngularInjectorSingleton = () => {
244
258
  try {
245
259
  const coreDir = resolveAngularCoreDir();
246
- const chunkPath = join(coreDir, "fesm2022", "_not_found-chunk.mjs");
247
- const content = readFileSync(chunkPath, "utf-8");
260
+ const chunkPath = join2(coreDir, "fesm2022", "_not_found-chunk.mjs");
261
+ const content = readFileSync2(chunkPath, "utf-8");
248
262
  applyInjectorPatch(chunkPath, content);
249
263
  } catch {}
250
264
  };
@@ -413,7 +427,9 @@ var initDominoAdapter = (platformServer) => {
413
427
  import(resolveAngularPackage("@angular/common")),
414
428
  import(resolveAngularPackage("@angular/core"))
415
429
  ]);
416
- if (false) {}
430
+ if (true) {
431
+ core.enableProdMode();
432
+ }
417
433
  initDominoAdapter(platformServer);
418
434
  return {
419
435
  APP_BASE_HREF: common.APP_BASE_HREF,
@@ -773,8 +789,8 @@ var init_islandSsr = __esm(() => {
773
789
  });
774
790
 
775
791
  // src/build/resolvePackageImport.ts
776
- import { resolve as resolve2, join as join2 } from "path";
777
- import { existsSync as existsSync3, readFileSync as readFileSync2 } from "fs";
792
+ import { resolve as resolve2, join as join3 } from "path";
793
+ import { existsSync as existsSync3, readFileSync as readFileSync3 } from "fs";
778
794
  var resolveExportPath = (entry, conditions) => {
779
795
  if (typeof entry === "string")
780
796
  return entry;
@@ -796,14 +812,14 @@ var resolveExportPath = (entry, conditions) => {
796
812
  const subpath = isScoped ? parts.slice(2).join("/") : parts.slice(1).join("/");
797
813
  const exportKey = subpath ? `./${subpath}` : ".";
798
814
  const currentPackageJsonPath = resolve2(process.cwd(), "package.json");
799
- const currentPackageJson = existsSync3(currentPackageJsonPath) ? JSON.parse(readFileSync2(currentPackageJsonPath, "utf-8")) : null;
815
+ const currentPackageJson = existsSync3(currentPackageJsonPath) ? JSON.parse(readFileSync3(currentPackageJsonPath, "utf-8")) : null;
800
816
  const currentPackageDir = currentPackageJson?.name === packageName ? process.cwd() : null;
801
817
  const packageDir = currentPackageDir ?? resolve2(process.cwd(), "node_modules", packageName ?? "");
802
- const packageJsonPath = join2(packageDir, "package.json");
818
+ const packageJsonPath = join3(packageDir, "package.json");
803
819
  if (!existsSync3(packageJsonPath))
804
820
  return null;
805
821
  try {
806
- const packageJson = currentPackageDir && currentPackageJson ? currentPackageJson : JSON.parse(readFileSync2(packageJsonPath, "utf-8"));
822
+ const packageJson = currentPackageDir && currentPackageJson ? currentPackageJson : JSON.parse(readFileSync3(packageJsonPath, "utf-8"));
807
823
  const { exports } = packageJson;
808
824
  if (!exports)
809
825
  return null;
@@ -967,10 +983,10 @@ __export(exports_stylePreprocessor, {
967
983
  compileStyleFileIfNeededSync: () => compileStyleFileIfNeededSync,
968
984
  compileStyleFileIfNeeded: () => compileStyleFileIfNeeded
969
985
  });
970
- import { existsSync as existsSync4, readFileSync as readFileSync3 } from "fs";
986
+ import { existsSync as existsSync4, readFileSync as readFileSync4 } from "fs";
971
987
  import { readFile } from "fs/promises";
972
988
  import { createRequire } from "module";
973
- import { dirname as dirname2, extname, isAbsolute, join as join3, relative, resolve as resolve3 } from "path";
989
+ import { dirname as dirname2, extname, isAbsolute, join as join4, relative, resolve as resolve3 } from "path";
974
990
  import { fileURLToPath } from "url";
975
991
  var CSS_EXTENSION_PATTERN, STYLE_EXTENSION_PATTERN, STYLE_MODULE_EXTENSION_PATTERN, STYLE_LANGUAGE_PATTERN, importOptionalPeer, requireOptionalPeer, requireFromCwd, isPreprocessableStylePath = (filePath) => STYLE_EXTENSION_PATTERN.test(filePath), isStyleModulePath = (filePath) => STYLE_MODULE_EXTENSION_PATTERN.test(filePath), isStylePath = (filePath) => /\.(css|s[ac]ss|less|styl(?:us)?)$/i.test(filePath), getStyleBaseName = (filePath) => filePath.replace(/\.(css|s[ac]ss|less|styl(?:us)?)$/i, ""), getStyleLanguage = (filePathOrLanguage) => {
976
992
  const normalized = filePathOrLanguage.toLowerCase();
@@ -1007,7 +1023,7 @@ var CSS_EXTENSION_PATTERN, STYLE_EXTENSION_PATTERN, STYLE_MODULE_EXTENSION_PATTE
1007
1023
  return empty;
1008
1024
  }
1009
1025
  try {
1010
- const parsed = JSON.parse(stripJsonComments(readFileSync3(tsconfigPath, "utf-8")));
1026
+ const parsed = JSON.parse(stripJsonComments(readFileSync4(tsconfigPath, "utf-8")));
1011
1027
  const compilerOptions = parsed.compilerOptions ?? {};
1012
1028
  const baseUrl = resolve3(cwd, compilerOptions.baseUrl ?? ".");
1013
1029
  tsconfigAliasCache = {
@@ -1048,13 +1064,13 @@ var CSS_EXTENSION_PATTERN, STYLE_EXTENSION_PATTERN, STYLE_MODULE_EXTENSION_PATTE
1048
1064
  const ext = extname(basePath);
1049
1065
  const paths = ext ? [basePath] : getLanguageExtensions(language).flatMap((extension) => [
1050
1066
  `${basePath}${extension}`,
1051
- join3(basePath, `index${extension}`)
1067
+ join4(basePath, `index${extension}`)
1052
1068
  ]);
1053
1069
  if (language === "scss" || language === "sass") {
1054
1070
  return paths.flatMap((path) => {
1055
1071
  const dir = dirname2(path);
1056
1072
  const base = path.slice(dir.length + 1);
1057
- return [path, join3(dir, `_${base}`)];
1073
+ return [path, join4(dir, `_${base}`)];
1058
1074
  });
1059
1075
  }
1060
1076
  return paths;
@@ -1130,7 +1146,7 @@ ${contents}` : contents, normalizePostcssModule = (mod) => {
1130
1146
  const config = normalizePostcssModule(loaded);
1131
1147
  const value = typeof config === "function" ? await config({
1132
1148
  cwd: process.cwd(),
1133
- env: "development"
1149
+ env: "test"
1134
1150
  }) : config;
1135
1151
  return normalizePostcssModule(value) ?? {};
1136
1152
  }, normalizePostcssPlugins = (plugins) => {
@@ -1195,7 +1211,7 @@ ${contents}` : contents, normalizePostcssModule = (mod) => {
1195
1211
  if (fileLanguage !== "scss" && fileLanguage !== "sass" && fileLanguage !== null)
1196
1212
  return null;
1197
1213
  return {
1198
- contents: preprocessLoadedStyle(readFileSync3(filePath, "utf-8"), filePath, entryFile, loadPaths, language, config),
1214
+ contents: preprocessLoadedStyle(readFileSync4(filePath, "utf-8"), filePath, entryFile, loadPaths, language, config),
1199
1215
  syntax: filePath.endsWith(".sass") ? "indented" : "scss"
1200
1216
  };
1201
1217
  }
@@ -1356,7 +1372,7 @@ ${contents}` : contents, normalizePostcssModule = (mod) => {
1356
1372
  }
1357
1373
  return compileStyleSource(filePath, undefined, undefined, config);
1358
1374
  }, compileStyleFileIfNeededSync = (filePath, config) => {
1359
- const rawContents = readFileSync3(filePath, "utf-8");
1375
+ const rawContents = readFileSync4(filePath, "utf-8");
1360
1376
  const language = getStyleLanguage(filePath);
1361
1377
  if (config?.postcss) {
1362
1378
  throw new Error(`Unable to compile ${filePath}: PostCSS preprocessing is async-only.`);
@@ -1397,19 +1413,19 @@ var init_stylePreprocessor = __esm(() => {
1397
1413
  STYLE_LANGUAGE_PATTERN = /^(s[ac]ss|less|styl(?:us)?)$/i;
1398
1414
  importOptionalPeer = new Function("specifier", "return import(specifier)");
1399
1415
  requireOptionalPeer = new Function("specifier", "return require(specifier)");
1400
- requireFromCwd = createRequire(join3(process.cwd(), "package.json"));
1416
+ requireFromCwd = createRequire(join4(process.cwd(), "package.json"));
1401
1417
  stylePreprocessorPlugin = createStylePreprocessorPlugin();
1402
1418
  });
1403
1419
 
1404
1420
  // src/core/svelteServerModule.ts
1405
1421
  import { mkdir, readdir } from "fs/promises";
1406
- import { basename as basename2, dirname as dirname3, extname as extname2, join as join4, relative as relative2, resolve as resolve4 } from "path";
1422
+ import { basename as basename2, dirname as dirname3, extname as extname2, join as join5, relative as relative2, resolve as resolve4 } from "path";
1407
1423
  var serverCacheRoot, compiledModuleCache, originalSourcePathCache, transpiler, ensureRelativeImportPath = (from, target) => {
1408
1424
  const importPath = relative2(dirname3(from), target).replace(/\\/g, "/");
1409
1425
  return importPath.startsWith(".") ? importPath : `./${importPath}`;
1410
1426
  }, processDirectoryEntries = (entries, dir, targetFileName, stack) => {
1411
1427
  for (const entry of entries) {
1412
- const entryPath = join4(dir, entry.name);
1428
+ const entryPath = join5(dir, entry.name);
1413
1429
  if (entry.isDirectory())
1414
1430
  stack.push(entryPath);
1415
1431
  if (entry.isFile() && entry.name === targetFileName) {
@@ -1439,11 +1455,11 @@ var serverCacheRoot, compiledModuleCache, originalSourcePathCache, transpiler, e
1439
1455
  if (cachedPath !== undefined) {
1440
1456
  return cachedPath;
1441
1457
  }
1442
- if (!sourcePath.includes(`${join4(process.cwd(), "build")}${process.platform === "win32" ? "" : "/"}`) && !sourcePath.includes("/build/")) {
1458
+ if (!sourcePath.includes(`${join5(process.cwd(), "build")}${process.platform === "win32" ? "" : "/"}`) && !sourcePath.includes("/build/")) {
1443
1459
  originalSourcePathCache.set(sourcePath, sourcePath);
1444
1460
  return sourcePath;
1445
1461
  }
1446
- const resolvedSourcePath = await findSourceFileByBasename(join4(process.cwd(), "src"), normalizeBuiltSvelteFileName(sourcePath));
1462
+ const resolvedSourcePath = await findSourceFileByBasename(join5(process.cwd(), "src"), normalizeBuiltSvelteFileName(sourcePath));
1447
1463
  const nextPath = resolvedSourcePath ?? sourcePath;
1448
1464
  originalSourcePathCache.set(sourcePath, nextPath);
1449
1465
  return nextPath;
@@ -1459,11 +1475,11 @@ var serverCacheRoot, compiledModuleCache, originalSourcePathCache, transpiler, e
1459
1475
  `${basePath}.mjs`,
1460
1476
  `${basePath}.cjs`,
1461
1477
  `${basePath}.json`,
1462
- join4(basePath, "index.ts"),
1463
- join4(basePath, "index.js"),
1464
- join4(basePath, "index.mjs"),
1465
- join4(basePath, "index.cjs"),
1466
- join4(basePath, "index.json")
1478
+ join5(basePath, "index.ts"),
1479
+ join5(basePath, "index.js"),
1480
+ join5(basePath, "index.mjs"),
1481
+ join5(basePath, "index.cjs"),
1482
+ join5(basePath, "index.json")
1467
1483
  ];
1468
1484
  const existResults = await Promise.all(candidates.map((candidate) => Bun.file(candidate).exists()));
1469
1485
  const foundIndex = existResults.indexOf(true);
@@ -1471,7 +1487,7 @@ var serverCacheRoot, compiledModuleCache, originalSourcePathCache, transpiler, e
1471
1487
  }, getCachedModulePath = (sourcePath) => {
1472
1488
  const relativeSourcePath = relative2(process.cwd(), sourcePath).replace(/\\/g, "/");
1473
1489
  const normalizedSourcePath = relativeSourcePath.startsWith("..") ? sourcePath.replace(/[:\\/]/g, "_") : relativeSourcePath;
1474
- return join4(serverCacheRoot, `${normalizedSourcePath}.server.js`);
1490
+ return join5(serverCacheRoot, `${normalizedSourcePath}.server.js`);
1475
1491
  }, resolveSvelteImport = async (spec, from) => {
1476
1492
  if (!spec.startsWith(".") && !spec.startsWith("/")) {
1477
1493
  const resolved = resolvePackageImport(spec);
@@ -1572,7 +1588,7 @@ var init_svelteServerModule = __esm(() => {
1572
1588
  init_lowerIslandSyntax();
1573
1589
  init_lowerAwaitSlotSyntax();
1574
1590
  init_stylePreprocessor();
1575
- serverCacheRoot = join4(process.cwd(), ".absolutejs", "islands", "svelte");
1591
+ serverCacheRoot = join5(process.cwd(), ".absolutejs", "islands", "svelte");
1576
1592
  compiledModuleCache = new Map;
1577
1593
  originalSourcePathCache = new Map;
1578
1594
  transpiler = new Bun.Transpiler({
@@ -3232,8 +3248,8 @@ __export(exports_compileAngular, {
3232
3248
  compileAngularFile: () => compileAngularFile,
3233
3249
  compileAngular: () => compileAngular
3234
3250
  });
3235
- import { existsSync as existsSync5, readFileSync as readFileSync4, promises as fs } from "fs";
3236
- import { join as join5, basename as basename3, sep, dirname as dirname4, resolve as resolve5, relative as relative3 } from "path";
3251
+ import { existsSync as existsSync5, readFileSync as readFileSync5, promises as fs } from "fs";
3252
+ import { join as join6, basename as basename3, sep, dirname as dirname4, resolve as resolve5, relative as relative3 } from "path";
3237
3253
  import ts from "typescript";
3238
3254
  var traceAngularPhase = async (name, fn, metadata) => {
3239
3255
  const tracePhase = globalThis.__absoluteBuildTracePhase;
@@ -3275,10 +3291,10 @@ var traceAngularPhase = async (name, fn, metadata) => {
3275
3291
  `${candidate}.tsx`,
3276
3292
  `${candidate}.js`,
3277
3293
  `${candidate}.jsx`,
3278
- join5(candidate, "index.ts"),
3279
- join5(candidate, "index.tsx"),
3280
- join5(candidate, "index.js"),
3281
- join5(candidate, "index.jsx")
3294
+ join6(candidate, "index.ts"),
3295
+ join6(candidate, "index.tsx"),
3296
+ join6(candidate, "index.js"),
3297
+ join6(candidate, "index.jsx")
3282
3298
  ];
3283
3299
  return candidates.find((file) => existsSync5(file));
3284
3300
  }, createLegacyAngularAnimationUsageResolver = (rootDir) => {
@@ -3454,10 +3470,10 @@ ${registrations}
3454
3470
  `${basePath}.tsx`,
3455
3471
  `${basePath}.mts`,
3456
3472
  `${basePath}.cts`,
3457
- join5(basePath, "index.ts"),
3458
- join5(basePath, "index.tsx"),
3459
- join5(basePath, "index.mts"),
3460
- join5(basePath, "index.cts")
3473
+ join6(basePath, "index.ts"),
3474
+ join6(basePath, "index.tsx"),
3475
+ join6(basePath, "index.mts"),
3476
+ join6(basePath, "index.cts")
3461
3477
  ];
3462
3478
  return candidates.map((candidate) => resolve5(candidate)).find((candidate) => existsSync5(candidate) && !candidate.endsWith(".d.ts")) ?? null;
3463
3479
  }, readFileForAotTransform = async (fileName, readFile2) => {
@@ -3483,15 +3499,15 @@ ${registrations}
3483
3499
  const paths = [];
3484
3500
  const templateUrlMatch = findUncommentedMatch(source, /templateUrl\s*:\s*['"]([^'"]+)['"]/);
3485
3501
  if (templateUrlMatch?.[1])
3486
- paths.push(join5(fileDir, templateUrlMatch[1]));
3502
+ paths.push(join6(fileDir, templateUrlMatch[1]));
3487
3503
  const styleUrlMatch = findUncommentedMatch(source, /styleUrl\s*:\s*['"]([^'"]+)['"]/);
3488
3504
  if (styleUrlMatch?.[1])
3489
- paths.push(join5(fileDir, styleUrlMatch[1]));
3505
+ paths.push(join6(fileDir, styleUrlMatch[1]));
3490
3506
  const styleUrlsMatch = findUncommentedMatch(source, /styleUrls\s*:\s*\[([^\]]+)\]/);
3491
3507
  const urlMatches = styleUrlsMatch?.[1]?.match(/['"]([^'"]+)['"]/g);
3492
3508
  if (urlMatches) {
3493
3509
  for (const urlMatch of urlMatches) {
3494
- paths.push(join5(fileDir, urlMatch.replace(/['"]/g, "")));
3510
+ paths.push(join6(fileDir, urlMatch.replace(/['"]/g, "")));
3495
3511
  }
3496
3512
  }
3497
3513
  return paths.map((path) => resolve5(path));
@@ -3525,7 +3541,7 @@ ${registrations}
3525
3541
  safeStableStringify(stylePreprocessors ?? null)
3526
3542
  ].join("\x00");
3527
3543
  const cacheKey = Bun.hash(cacheInput).toString(BASE_36_RADIX);
3528
- return join5(process.cwd(), ".absolutejs", "cache", "angular-resources", `${cacheKey}.json`);
3544
+ return join6(process.cwd(), ".absolutejs", "cache", "angular-resources", `${cacheKey}.json`);
3529
3545
  }, precomputeAotResourceTransforms = async (inputPaths, readFile2, stylePreprocessors) => {
3530
3546
  const transformedSources = new Map;
3531
3547
  const visited = new Set;
@@ -3571,10 +3587,10 @@ ${registrations}
3571
3587
  return { stats, transformedSources };
3572
3588
  }, compileAngularFiles = async (inputPaths, outDir, stylePreprocessors) => {
3573
3589
  const islandMetadataByOutputPath = await traceAngularPhase("aot/island-metadata", () => new Map(inputPaths.map((inputPath) => {
3574
- const outputPath = resolve5(join5(outDir, relative3(process.cwd(), resolve5(inputPath)).replace(/\.[cm]?[tj]sx?$/, ".js")));
3590
+ const outputPath = resolve5(join6(outDir, relative3(process.cwd(), resolve5(inputPath)).replace(/\.[cm]?[tj]sx?$/, ".js")));
3575
3591
  return [
3576
3592
  outputPath,
3577
- buildIslandMetadataExports(readFileSync4(inputPath, "utf-8"))
3593
+ buildIslandMetadataExports(readFileSync5(inputPath, "utf-8"))
3578
3594
  ];
3579
3595
  })), { entries: inputPaths.length });
3580
3596
  const { readConfiguration, performCompilation, EmitFlags } = await traceAngularPhase("aot/import-compiler-cli", () => import("@angular/compiler-cli"));
@@ -3617,7 +3633,7 @@ ${registrations}
3617
3633
  const originalGetSourceFile = host.getSourceFile;
3618
3634
  host.getSourceFile = (fileName, languageVersion, onError) => {
3619
3635
  if (fileName.startsWith("lib.") && fileName.endsWith(".d.ts") && tsLibDir) {
3620
- const resolvedPath = join5(tsLibDir, fileName);
3636
+ const resolvedPath = join6(tsLibDir, fileName);
3621
3637
  return originalGetSourceFile?.call(host, resolvedPath, languageVersion, onError);
3622
3638
  }
3623
3639
  return originalGetSourceFile?.call(host, fileName, languageVersion, onError);
@@ -3672,7 +3688,7 @@ ${registrations}
3672
3688
  const entries = await traceAngularPhase("aot/postprocess-emitted-js", () => {
3673
3689
  const rawEntries = Object.entries(emitted).filter(([fileName]) => fileName.endsWith(".js")).map(([fileName, content]) => ({
3674
3690
  content,
3675
- target: join5(outDir, fileName)
3691
+ target: join6(outDir, fileName)
3676
3692
  }));
3677
3693
  const outputFiles = new Set(rawEntries.map(({ target }) => resolve5(target)));
3678
3694
  return rawEntries.map(({ content, target }) => {
@@ -3847,7 +3863,7 @@ ${fields}
3847
3863
  }, inlineTemplateAndLowerDefer = async (source, fileDir) => {
3848
3864
  const templateUrlMatch = findUncommentedMatch(source, /templateUrl\s*:\s*['"]([^'"]+)['"]/);
3849
3865
  if (templateUrlMatch?.[1]) {
3850
- const templatePath = join5(fileDir, templateUrlMatch[1]);
3866
+ const templatePath = join6(fileDir, templateUrlMatch[1]);
3851
3867
  if (!existsSync5(templatePath)) {
3852
3868
  throw new Error(`Unable to inline Angular templateUrl "${templateUrlMatch[1]}": file not found at ${templatePath}`);
3853
3869
  }
@@ -3878,11 +3894,11 @@ ${fields}
3878
3894
  }, inlineTemplateAndLowerDeferSync = (source, fileDir) => {
3879
3895
  const templateUrlMatch = findUncommentedMatch(source, /templateUrl\s*:\s*['"]([^'"]+)['"]/);
3880
3896
  if (templateUrlMatch?.[1]) {
3881
- const templatePath = join5(fileDir, templateUrlMatch[1]);
3897
+ const templatePath = join6(fileDir, templateUrlMatch[1]);
3882
3898
  if (!existsSync5(templatePath)) {
3883
3899
  throw new Error(`Unable to inline Angular templateUrl "${templateUrlMatch[1]}": file not found at ${templatePath}`);
3884
3900
  }
3885
- const templateRaw2 = readFileSync4(templatePath, "utf-8");
3901
+ const templateRaw2 = readFileSync5(templatePath, "utf-8");
3886
3902
  const lowered2 = lowerAngularDeferSyntax(templateRaw2);
3887
3903
  const escaped2 = escapeTemplateContent(lowered2.template);
3888
3904
  const replacedSource2 = source.slice(0, templateUrlMatch.index) + `template: \`${escaped2}\`` + source.slice(templateUrlMatch.index + templateUrlMatch[0].length);
@@ -3915,7 +3931,7 @@ ${fields}
3915
3931
  return source;
3916
3932
  const stylePromises = urlMatches.map((urlMatch) => {
3917
3933
  const styleUrl = urlMatch.replace(/['"]/g, "");
3918
- return readAndEscapeFile(join5(fileDir, styleUrl), stylePreprocessors);
3934
+ return readAndEscapeFile(join6(fileDir, styleUrl), stylePreprocessors);
3919
3935
  });
3920
3936
  const results = await Promise.all(stylePromises);
3921
3937
  const inlinedStyles = results.filter(Boolean).map((escaped) => `\`${escaped}\``);
@@ -3926,7 +3942,7 @@ ${fields}
3926
3942
  const styleUrlMatch = findUncommentedMatch(source, /styleUrl\s*:\s*['"]([^'"]+)['"]/);
3927
3943
  if (!styleUrlMatch?.[1])
3928
3944
  return source;
3929
- const escaped = await readAndEscapeFile(join5(fileDir, styleUrlMatch[1]), stylePreprocessors);
3945
+ const escaped = await readAndEscapeFile(join6(fileDir, styleUrlMatch[1]), stylePreprocessors);
3930
3946
  if (!escaped)
3931
3947
  return source;
3932
3948
  return source.slice(0, styleUrlMatch.index) + `styles: [\`${escaped}\`]` + source.slice(styleUrlMatch.index + styleUrlMatch[0].length);
@@ -3961,10 +3977,10 @@ ${fields}
3961
3977
  `${candidate}.tsx`,
3962
3978
  `${candidate}.js`,
3963
3979
  `${candidate}.jsx`,
3964
- join5(candidate, "index.ts"),
3965
- join5(candidate, "index.tsx"),
3966
- join5(candidate, "index.js"),
3967
- join5(candidate, "index.jsx")
3980
+ join6(candidate, "index.ts"),
3981
+ join6(candidate, "index.tsx"),
3982
+ join6(candidate, "index.js"),
3983
+ join6(candidate, "index.jsx")
3968
3984
  ];
3969
3985
  return candidates.find((file) => existsSync5(file));
3970
3986
  };
@@ -3991,7 +4007,7 @@ ${fields}
3991
4007
  const inputDir = dirname4(sourcePath);
3992
4008
  const relativeDir = inputDir.startsWith(baseDir) ? inputDir.substring(baseDir.length + 1) : inputDir;
3993
4009
  const fileBase = basename3(sourcePath).replace(/\.[cm]?[tj]sx?$/, ".js");
3994
- return join5(outDir, relativeDir, fileBase);
4010
+ return join6(outDir, relativeDir, fileBase);
3995
4011
  };
3996
4012
  const transpileAndRewrite = (sourceCode, relativeDir, actualPath, importRewrites) => {
3997
4013
  let processedContent = angularTranspiler.transformSync(sourceCode);
@@ -4044,7 +4060,7 @@ ${fields}
4044
4060
  const inputDir = dirname4(actualPath);
4045
4061
  const relativeDir = inputDir.startsWith(baseDir) ? inputDir.substring(baseDir.length + 1) : inputDir;
4046
4062
  const fileBase = basename3(actualPath).replace(/\.[cm]?[tj]sx?$/, ".js");
4047
- const targetDir = join5(outDir, relativeDir);
4063
+ const targetDir = join6(outDir, relativeDir);
4048
4064
  const targetPath = toOutputPath(actualPath);
4049
4065
  const localImports = [];
4050
4066
  const importRewrites = new Map;
@@ -4098,13 +4114,13 @@ export const __ABSOLUTE_PAGE_USES_LEGACY_ANIMATIONS__ = true;
4098
4114
  }
4099
4115
  return allOutputs;
4100
4116
  }, compileAngular = async (entryPoints, outRoot, hmr = false, stylePreprocessors) => {
4101
- const compiledParent = join5(outRoot, "generated");
4117
+ const compiledParent = join6(outRoot, "generated");
4102
4118
  if (entryPoints.length === 0) {
4103
4119
  const emptyPaths = [];
4104
4120
  return { clientPaths: [...emptyPaths], serverPaths: [...emptyPaths] };
4105
4121
  }
4106
4122
  const compiledRoot = compiledParent;
4107
- const indexesDir = join5(compiledParent, "indexes");
4123
+ const indexesDir = join6(compiledParent, "indexes");
4108
4124
  await traceAngularPhase("setup/create-indexes-dir", () => fs.mkdir(indexesDir, { recursive: true }));
4109
4125
  const aotOutputs = hmr ? [] : await traceAngularPhase("aot/compile-files", () => compileAngularFiles(entryPoints.map((entry) => resolve5(entry)), compiledRoot, stylePreprocessors), { entries: entryPoints.length });
4110
4126
  const usesLegacyAngularAnimations = await traceAngularPhase("setup/legacy-animation-resolver", () => createLegacyAngularAnimationUsageResolver(outRoot));
@@ -4118,9 +4134,9 @@ export const __ABSOLUTE_PAGE_USES_LEGACY_ANIMATIONS__ = true;
4118
4134
  const fileBase = basename3(resolvedEntry).replace(/\.[tj]s$/, "");
4119
4135
  const jsName = `${fileBase}.js`;
4120
4136
  const compiledFallbackPaths = [
4121
- join5(compiledRoot, relativeEntry),
4122
- join5(compiledRoot, "pages", jsName),
4123
- join5(compiledRoot, jsName)
4137
+ join6(compiledRoot, relativeEntry),
4138
+ join6(compiledRoot, "pages", jsName),
4139
+ join6(compiledRoot, jsName)
4124
4140
  ].map((file) => resolve5(file));
4125
4141
  const resolveRawServerFile = (candidatePaths) => {
4126
4142
  const normalizedCandidates = [
@@ -4164,7 +4180,7 @@ export const __ABSOLUTE_PAGE_USES_LEGACY_ANIMATIONS__ = true;
4164
4180
  const usesLegacyAnimations = await traceAngularPhase("wrapper/detect-legacy-animations", () => usesLegacyAngularAnimations(resolvedEntry), { entry: resolvedEntry });
4165
4181
  const serverContentHash = Bun.hash(original).toString(BASE_36_RADIX);
4166
4182
  const cachedWrapper = wrapperOutputCache.get(resolvedEntry);
4167
- const clientFile = join5(indexesDir, jsName);
4183
+ const clientFile = join6(indexesDir, jsName);
4168
4184
  if (hmr && cachedWrapper && cachedWrapper.serverHash === serverContentHash && existsSync5(clientFile) && (usesLegacyAnimations || !original.includes("__ABSOLUTE_PAGE_USES_LEGACY_ANIMATIONS__")) && (!usesLegacyAnimations || original.includes("__ABSOLUTE_PAGE_USES_LEGACY_ANIMATIONS__"))) {
4169
4185
  return {
4170
4186
  clientPath: clientFile,
@@ -4412,8 +4428,8 @@ var init_compileAngular = __esm(() => {
4412
4428
  init_lowerDeferSyntax();
4413
4429
  init_stylePreprocessor();
4414
4430
  devClientDir = resolveDevClientDir();
4415
- hmrClientPath = join5(devClientDir, "hmrClient.ts").replace(/\\/g, "/");
4416
- hmrRuntimePath = join5(devClientDir, "handlers", "angularRuntime.ts").replace(/\\/g, "/");
4431
+ hmrClientPath = join6(devClientDir, "hmrClient.ts").replace(/\\/g, "/");
4432
+ hmrRuntimePath = join6(devClientDir, "handlers", "angularRuntime.ts").replace(/\\/g, "/");
4417
4433
  jitContentCache = new Map;
4418
4434
  wrapperOutputCache = new Map;
4419
4435
  });
@@ -4583,7 +4599,7 @@ init_constants();
4583
4599
  import { AsyncLocalStorage as AsyncLocalStorage3 } from "async_hooks";
4584
4600
  import { mkdir as mkdir2, symlink } from "fs/promises";
4585
4601
  import { tmpdir } from "os";
4586
- import { basename as basename4, dirname as dirname5, join as join6, resolve as resolve6 } from "path";
4602
+ import { basename as basename4, dirname as dirname5, join as join7, resolve as resolve6 } from "path";
4587
4603
 
4588
4604
  // src/core/islandPageContext.ts
4589
4605
  init_constants();
@@ -4894,7 +4910,7 @@ var hasErrorConvention = (framework) => {
4894
4910
  var setConventions = (map) => {
4895
4911
  Reflect.set(globalThis, CONVENTIONS_KEY, map);
4896
4912
  };
4897
- var isDev = () => true;
4913
+ var isDev = () => false;
4898
4914
  var buildErrorProps = (error) => {
4899
4915
  const message = error instanceof Error ? error.message : String(error);
4900
4916
  const stack = isDev() && error instanceof Error ? error.stack : undefined;
@@ -5448,10 +5464,10 @@ var ensureAngularCompiler = () => {
5448
5464
  return compilerImportPromise;
5449
5465
  };
5450
5466
  var readAngularPageModule = (value) => isRecord5(value) ? value : null;
5451
- var resolveAngularSsrOutDir = () => process.env.ABSOLUTE_ANGULAR_SSR_OUTDIR ?? join6(tmpdir(), "absolutejs", "generated", "angular-ssr");
5467
+ var resolveAngularSsrOutDir = () => process.env.ABSOLUTE_ANGULAR_SSR_OUTDIR ?? join7(tmpdir(), "absolutejs", "generated", "angular-ssr");
5452
5468
  var ensureAngularSsrNodeModules = async (outDir) => {
5453
5469
  const outRoot = resolve6(dirname5(dirname5(outDir)));
5454
- const nodeModulesLink = join6(outRoot, "node_modules");
5470
+ const nodeModulesLink = join7(outRoot, "node_modules");
5455
5471
  if (process.env.ABSOLUTE_ANGULAR_SSR_OUTDIR) {
5456
5472
  return;
5457
5473
  }
@@ -5568,7 +5584,7 @@ var handleAngularPageRequest = async (input) => {
5568
5584
  const html = injectIslandPageContext(injectSsrScripts(htmlWithLoweredIslands, requestId, resolvedIndexPath, maybeProps), { hasIslands: shouldProcessIslands });
5569
5585
  return new Response(html, withHtmlContentType(responseInit));
5570
5586
  };
5571
- return runWithStreamingSlotWarningScope(() => options?.collectStreamingSlots === true ? withRegisteredStreamingSlots(renderPageResponse, options) : renderPageResponse(), { handlerCallsite });
5587
+ return await runWithStreamingSlotWarningScope(() => options?.collectStreamingSlots === true ? withRegisteredStreamingSlots(renderPageResponse, options) : renderPageResponse(), { handlerCallsite });
5572
5588
  } catch (error) {
5573
5589
  console.error("[SSR] Angular render error:", error);
5574
5590
  const pageName = derivePageName(resolvedPagePath);
@@ -5613,5 +5629,5 @@ export {
5613
5629
  ABSOLUTE_HTTP_TRANSFER_CACHE_SKIP_HEADER
5614
5630
  };
5615
5631
 
5616
- //# debugId=3F20F05F4AF33B7464756E2164756E21
5632
+ //# debugId=18661722AE30358364756E2164756E21
5617
5633
  //# sourceMappingURL=server.js.map