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

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
  };
@@ -773,8 +787,8 @@ var init_islandSsr = __esm(() => {
773
787
  });
774
788
 
775
789
  // src/build/resolvePackageImport.ts
776
- import { resolve as resolve2, join as join2 } from "path";
777
- import { existsSync as existsSync3, readFileSync as readFileSync2 } from "fs";
790
+ import { resolve as resolve2, join as join3 } from "path";
791
+ import { existsSync as existsSync3, readFileSync as readFileSync3 } from "fs";
778
792
  var resolveExportPath = (entry, conditions) => {
779
793
  if (typeof entry === "string")
780
794
  return entry;
@@ -796,14 +810,14 @@ var resolveExportPath = (entry, conditions) => {
796
810
  const subpath = isScoped ? parts.slice(2).join("/") : parts.slice(1).join("/");
797
811
  const exportKey = subpath ? `./${subpath}` : ".";
798
812
  const currentPackageJsonPath = resolve2(process.cwd(), "package.json");
799
- const currentPackageJson = existsSync3(currentPackageJsonPath) ? JSON.parse(readFileSync2(currentPackageJsonPath, "utf-8")) : null;
813
+ const currentPackageJson = existsSync3(currentPackageJsonPath) ? JSON.parse(readFileSync3(currentPackageJsonPath, "utf-8")) : null;
800
814
  const currentPackageDir = currentPackageJson?.name === packageName ? process.cwd() : null;
801
815
  const packageDir = currentPackageDir ?? resolve2(process.cwd(), "node_modules", packageName ?? "");
802
- const packageJsonPath = join2(packageDir, "package.json");
816
+ const packageJsonPath = join3(packageDir, "package.json");
803
817
  if (!existsSync3(packageJsonPath))
804
818
  return null;
805
819
  try {
806
- const packageJson = currentPackageDir && currentPackageJson ? currentPackageJson : JSON.parse(readFileSync2(packageJsonPath, "utf-8"));
820
+ const packageJson = currentPackageDir && currentPackageJson ? currentPackageJson : JSON.parse(readFileSync3(packageJsonPath, "utf-8"));
807
821
  const { exports } = packageJson;
808
822
  if (!exports)
809
823
  return null;
@@ -967,10 +981,10 @@ __export(exports_stylePreprocessor, {
967
981
  compileStyleFileIfNeededSync: () => compileStyleFileIfNeededSync,
968
982
  compileStyleFileIfNeeded: () => compileStyleFileIfNeeded
969
983
  });
970
- import { existsSync as existsSync4, readFileSync as readFileSync3 } from "fs";
984
+ import { existsSync as existsSync4, readFileSync as readFileSync4 } from "fs";
971
985
  import { readFile } from "fs/promises";
972
986
  import { createRequire } from "module";
973
- import { dirname as dirname2, extname, isAbsolute, join as join3, relative, resolve as resolve3 } from "path";
987
+ import { dirname as dirname2, extname, isAbsolute, join as join4, relative, resolve as resolve3 } from "path";
974
988
  import { fileURLToPath } from "url";
975
989
  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
990
  const normalized = filePathOrLanguage.toLowerCase();
@@ -1007,7 +1021,7 @@ var CSS_EXTENSION_PATTERN, STYLE_EXTENSION_PATTERN, STYLE_MODULE_EXTENSION_PATTE
1007
1021
  return empty;
1008
1022
  }
1009
1023
  try {
1010
- const parsed = JSON.parse(stripJsonComments(readFileSync3(tsconfigPath, "utf-8")));
1024
+ const parsed = JSON.parse(stripJsonComments(readFileSync4(tsconfigPath, "utf-8")));
1011
1025
  const compilerOptions = parsed.compilerOptions ?? {};
1012
1026
  const baseUrl = resolve3(cwd, compilerOptions.baseUrl ?? ".");
1013
1027
  tsconfigAliasCache = {
@@ -1048,13 +1062,13 @@ var CSS_EXTENSION_PATTERN, STYLE_EXTENSION_PATTERN, STYLE_MODULE_EXTENSION_PATTE
1048
1062
  const ext = extname(basePath);
1049
1063
  const paths = ext ? [basePath] : getLanguageExtensions(language).flatMap((extension) => [
1050
1064
  `${basePath}${extension}`,
1051
- join3(basePath, `index${extension}`)
1065
+ join4(basePath, `index${extension}`)
1052
1066
  ]);
1053
1067
  if (language === "scss" || language === "sass") {
1054
1068
  return paths.flatMap((path) => {
1055
1069
  const dir = dirname2(path);
1056
1070
  const base = path.slice(dir.length + 1);
1057
- return [path, join3(dir, `_${base}`)];
1071
+ return [path, join4(dir, `_${base}`)];
1058
1072
  });
1059
1073
  }
1060
1074
  return paths;
@@ -1195,7 +1209,7 @@ ${contents}` : contents, normalizePostcssModule = (mod) => {
1195
1209
  if (fileLanguage !== "scss" && fileLanguage !== "sass" && fileLanguage !== null)
1196
1210
  return null;
1197
1211
  return {
1198
- contents: preprocessLoadedStyle(readFileSync3(filePath, "utf-8"), filePath, entryFile, loadPaths, language, config),
1212
+ contents: preprocessLoadedStyle(readFileSync4(filePath, "utf-8"), filePath, entryFile, loadPaths, language, config),
1199
1213
  syntax: filePath.endsWith(".sass") ? "indented" : "scss"
1200
1214
  };
1201
1215
  }
@@ -1356,7 +1370,7 @@ ${contents}` : contents, normalizePostcssModule = (mod) => {
1356
1370
  }
1357
1371
  return compileStyleSource(filePath, undefined, undefined, config);
1358
1372
  }, compileStyleFileIfNeededSync = (filePath, config) => {
1359
- const rawContents = readFileSync3(filePath, "utf-8");
1373
+ const rawContents = readFileSync4(filePath, "utf-8");
1360
1374
  const language = getStyleLanguage(filePath);
1361
1375
  if (config?.postcss) {
1362
1376
  throw new Error(`Unable to compile ${filePath}: PostCSS preprocessing is async-only.`);
@@ -1397,19 +1411,19 @@ var init_stylePreprocessor = __esm(() => {
1397
1411
  STYLE_LANGUAGE_PATTERN = /^(s[ac]ss|less|styl(?:us)?)$/i;
1398
1412
  importOptionalPeer = new Function("specifier", "return import(specifier)");
1399
1413
  requireOptionalPeer = new Function("specifier", "return require(specifier)");
1400
- requireFromCwd = createRequire(join3(process.cwd(), "package.json"));
1414
+ requireFromCwd = createRequire(join4(process.cwd(), "package.json"));
1401
1415
  stylePreprocessorPlugin = createStylePreprocessorPlugin();
1402
1416
  });
1403
1417
 
1404
1418
  // src/core/svelteServerModule.ts
1405
1419
  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";
1420
+ import { basename as basename2, dirname as dirname3, extname as extname2, join as join5, relative as relative2, resolve as resolve4 } from "path";
1407
1421
  var serverCacheRoot, compiledModuleCache, originalSourcePathCache, transpiler, ensureRelativeImportPath = (from, target) => {
1408
1422
  const importPath = relative2(dirname3(from), target).replace(/\\/g, "/");
1409
1423
  return importPath.startsWith(".") ? importPath : `./${importPath}`;
1410
1424
  }, processDirectoryEntries = (entries, dir, targetFileName, stack) => {
1411
1425
  for (const entry of entries) {
1412
- const entryPath = join4(dir, entry.name);
1426
+ const entryPath = join5(dir, entry.name);
1413
1427
  if (entry.isDirectory())
1414
1428
  stack.push(entryPath);
1415
1429
  if (entry.isFile() && entry.name === targetFileName) {
@@ -1439,11 +1453,11 @@ var serverCacheRoot, compiledModuleCache, originalSourcePathCache, transpiler, e
1439
1453
  if (cachedPath !== undefined) {
1440
1454
  return cachedPath;
1441
1455
  }
1442
- if (!sourcePath.includes(`${join4(process.cwd(), "build")}${process.platform === "win32" ? "" : "/"}`) && !sourcePath.includes("/build/")) {
1456
+ if (!sourcePath.includes(`${join5(process.cwd(), "build")}${process.platform === "win32" ? "" : "/"}`) && !sourcePath.includes("/build/")) {
1443
1457
  originalSourcePathCache.set(sourcePath, sourcePath);
1444
1458
  return sourcePath;
1445
1459
  }
1446
- const resolvedSourcePath = await findSourceFileByBasename(join4(process.cwd(), "src"), normalizeBuiltSvelteFileName(sourcePath));
1460
+ const resolvedSourcePath = await findSourceFileByBasename(join5(process.cwd(), "src"), normalizeBuiltSvelteFileName(sourcePath));
1447
1461
  const nextPath = resolvedSourcePath ?? sourcePath;
1448
1462
  originalSourcePathCache.set(sourcePath, nextPath);
1449
1463
  return nextPath;
@@ -1459,11 +1473,11 @@ var serverCacheRoot, compiledModuleCache, originalSourcePathCache, transpiler, e
1459
1473
  `${basePath}.mjs`,
1460
1474
  `${basePath}.cjs`,
1461
1475
  `${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")
1476
+ join5(basePath, "index.ts"),
1477
+ join5(basePath, "index.js"),
1478
+ join5(basePath, "index.mjs"),
1479
+ join5(basePath, "index.cjs"),
1480
+ join5(basePath, "index.json")
1467
1481
  ];
1468
1482
  const existResults = await Promise.all(candidates.map((candidate) => Bun.file(candidate).exists()));
1469
1483
  const foundIndex = existResults.indexOf(true);
@@ -1471,7 +1485,7 @@ var serverCacheRoot, compiledModuleCache, originalSourcePathCache, transpiler, e
1471
1485
  }, getCachedModulePath = (sourcePath) => {
1472
1486
  const relativeSourcePath = relative2(process.cwd(), sourcePath).replace(/\\/g, "/");
1473
1487
  const normalizedSourcePath = relativeSourcePath.startsWith("..") ? sourcePath.replace(/[:\\/]/g, "_") : relativeSourcePath;
1474
- return join4(serverCacheRoot, `${normalizedSourcePath}.server.js`);
1488
+ return join5(serverCacheRoot, `${normalizedSourcePath}.server.js`);
1475
1489
  }, resolveSvelteImport = async (spec, from) => {
1476
1490
  if (!spec.startsWith(".") && !spec.startsWith("/")) {
1477
1491
  const resolved = resolvePackageImport(spec);
@@ -1572,7 +1586,7 @@ var init_svelteServerModule = __esm(() => {
1572
1586
  init_lowerIslandSyntax();
1573
1587
  init_lowerAwaitSlotSyntax();
1574
1588
  init_stylePreprocessor();
1575
- serverCacheRoot = join4(process.cwd(), ".absolutejs", "islands", "svelte");
1589
+ serverCacheRoot = join5(process.cwd(), ".absolutejs", "islands", "svelte");
1576
1590
  compiledModuleCache = new Map;
1577
1591
  originalSourcePathCache = new Map;
1578
1592
  transpiler = new Bun.Transpiler({
@@ -3232,8 +3246,8 @@ __export(exports_compileAngular, {
3232
3246
  compileAngularFile: () => compileAngularFile,
3233
3247
  compileAngular: () => compileAngular
3234
3248
  });
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";
3249
+ import { existsSync as existsSync5, readFileSync as readFileSync5, promises as fs } from "fs";
3250
+ import { join as join6, basename as basename3, sep, dirname as dirname4, resolve as resolve5, relative as relative3 } from "path";
3237
3251
  import ts from "typescript";
3238
3252
  var traceAngularPhase = async (name, fn, metadata) => {
3239
3253
  const tracePhase = globalThis.__absoluteBuildTracePhase;
@@ -3275,10 +3289,10 @@ var traceAngularPhase = async (name, fn, metadata) => {
3275
3289
  `${candidate}.tsx`,
3276
3290
  `${candidate}.js`,
3277
3291
  `${candidate}.jsx`,
3278
- join5(candidate, "index.ts"),
3279
- join5(candidate, "index.tsx"),
3280
- join5(candidate, "index.js"),
3281
- join5(candidate, "index.jsx")
3292
+ join6(candidate, "index.ts"),
3293
+ join6(candidate, "index.tsx"),
3294
+ join6(candidate, "index.js"),
3295
+ join6(candidate, "index.jsx")
3282
3296
  ];
3283
3297
  return candidates.find((file) => existsSync5(file));
3284
3298
  }, createLegacyAngularAnimationUsageResolver = (rootDir) => {
@@ -3454,10 +3468,10 @@ ${registrations}
3454
3468
  `${basePath}.tsx`,
3455
3469
  `${basePath}.mts`,
3456
3470
  `${basePath}.cts`,
3457
- join5(basePath, "index.ts"),
3458
- join5(basePath, "index.tsx"),
3459
- join5(basePath, "index.mts"),
3460
- join5(basePath, "index.cts")
3471
+ join6(basePath, "index.ts"),
3472
+ join6(basePath, "index.tsx"),
3473
+ join6(basePath, "index.mts"),
3474
+ join6(basePath, "index.cts")
3461
3475
  ];
3462
3476
  return candidates.map((candidate) => resolve5(candidate)).find((candidate) => existsSync5(candidate) && !candidate.endsWith(".d.ts")) ?? null;
3463
3477
  }, readFileForAotTransform = async (fileName, readFile2) => {
@@ -3483,15 +3497,15 @@ ${registrations}
3483
3497
  const paths = [];
3484
3498
  const templateUrlMatch = findUncommentedMatch(source, /templateUrl\s*:\s*['"]([^'"]+)['"]/);
3485
3499
  if (templateUrlMatch?.[1])
3486
- paths.push(join5(fileDir, templateUrlMatch[1]));
3500
+ paths.push(join6(fileDir, templateUrlMatch[1]));
3487
3501
  const styleUrlMatch = findUncommentedMatch(source, /styleUrl\s*:\s*['"]([^'"]+)['"]/);
3488
3502
  if (styleUrlMatch?.[1])
3489
- paths.push(join5(fileDir, styleUrlMatch[1]));
3503
+ paths.push(join6(fileDir, styleUrlMatch[1]));
3490
3504
  const styleUrlsMatch = findUncommentedMatch(source, /styleUrls\s*:\s*\[([^\]]+)\]/);
3491
3505
  const urlMatches = styleUrlsMatch?.[1]?.match(/['"]([^'"]+)['"]/g);
3492
3506
  if (urlMatches) {
3493
3507
  for (const urlMatch of urlMatches) {
3494
- paths.push(join5(fileDir, urlMatch.replace(/['"]/g, "")));
3508
+ paths.push(join6(fileDir, urlMatch.replace(/['"]/g, "")));
3495
3509
  }
3496
3510
  }
3497
3511
  return paths.map((path) => resolve5(path));
@@ -3525,7 +3539,7 @@ ${registrations}
3525
3539
  safeStableStringify(stylePreprocessors ?? null)
3526
3540
  ].join("\x00");
3527
3541
  const cacheKey = Bun.hash(cacheInput).toString(BASE_36_RADIX);
3528
- return join5(process.cwd(), ".absolutejs", "cache", "angular-resources", `${cacheKey}.json`);
3542
+ return join6(process.cwd(), ".absolutejs", "cache", "angular-resources", `${cacheKey}.json`);
3529
3543
  }, precomputeAotResourceTransforms = async (inputPaths, readFile2, stylePreprocessors) => {
3530
3544
  const transformedSources = new Map;
3531
3545
  const visited = new Set;
@@ -3571,10 +3585,10 @@ ${registrations}
3571
3585
  return { stats, transformedSources };
3572
3586
  }, compileAngularFiles = async (inputPaths, outDir, stylePreprocessors) => {
3573
3587
  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")));
3588
+ const outputPath = resolve5(join6(outDir, relative3(process.cwd(), resolve5(inputPath)).replace(/\.[cm]?[tj]sx?$/, ".js")));
3575
3589
  return [
3576
3590
  outputPath,
3577
- buildIslandMetadataExports(readFileSync4(inputPath, "utf-8"))
3591
+ buildIslandMetadataExports(readFileSync5(inputPath, "utf-8"))
3578
3592
  ];
3579
3593
  })), { entries: inputPaths.length });
3580
3594
  const { readConfiguration, performCompilation, EmitFlags } = await traceAngularPhase("aot/import-compiler-cli", () => import("@angular/compiler-cli"));
@@ -3617,7 +3631,7 @@ ${registrations}
3617
3631
  const originalGetSourceFile = host.getSourceFile;
3618
3632
  host.getSourceFile = (fileName, languageVersion, onError) => {
3619
3633
  if (fileName.startsWith("lib.") && fileName.endsWith(".d.ts") && tsLibDir) {
3620
- const resolvedPath = join5(tsLibDir, fileName);
3634
+ const resolvedPath = join6(tsLibDir, fileName);
3621
3635
  return originalGetSourceFile?.call(host, resolvedPath, languageVersion, onError);
3622
3636
  }
3623
3637
  return originalGetSourceFile?.call(host, fileName, languageVersion, onError);
@@ -3672,7 +3686,7 @@ ${registrations}
3672
3686
  const entries = await traceAngularPhase("aot/postprocess-emitted-js", () => {
3673
3687
  const rawEntries = Object.entries(emitted).filter(([fileName]) => fileName.endsWith(".js")).map(([fileName, content]) => ({
3674
3688
  content,
3675
- target: join5(outDir, fileName)
3689
+ target: join6(outDir, fileName)
3676
3690
  }));
3677
3691
  const outputFiles = new Set(rawEntries.map(({ target }) => resolve5(target)));
3678
3692
  return rawEntries.map(({ content, target }) => {
@@ -3847,7 +3861,7 @@ ${fields}
3847
3861
  }, inlineTemplateAndLowerDefer = async (source, fileDir) => {
3848
3862
  const templateUrlMatch = findUncommentedMatch(source, /templateUrl\s*:\s*['"]([^'"]+)['"]/);
3849
3863
  if (templateUrlMatch?.[1]) {
3850
- const templatePath = join5(fileDir, templateUrlMatch[1]);
3864
+ const templatePath = join6(fileDir, templateUrlMatch[1]);
3851
3865
  if (!existsSync5(templatePath)) {
3852
3866
  throw new Error(`Unable to inline Angular templateUrl "${templateUrlMatch[1]}": file not found at ${templatePath}`);
3853
3867
  }
@@ -3878,11 +3892,11 @@ ${fields}
3878
3892
  }, inlineTemplateAndLowerDeferSync = (source, fileDir) => {
3879
3893
  const templateUrlMatch = findUncommentedMatch(source, /templateUrl\s*:\s*['"]([^'"]+)['"]/);
3880
3894
  if (templateUrlMatch?.[1]) {
3881
- const templatePath = join5(fileDir, templateUrlMatch[1]);
3895
+ const templatePath = join6(fileDir, templateUrlMatch[1]);
3882
3896
  if (!existsSync5(templatePath)) {
3883
3897
  throw new Error(`Unable to inline Angular templateUrl "${templateUrlMatch[1]}": file not found at ${templatePath}`);
3884
3898
  }
3885
- const templateRaw2 = readFileSync4(templatePath, "utf-8");
3899
+ const templateRaw2 = readFileSync5(templatePath, "utf-8");
3886
3900
  const lowered2 = lowerAngularDeferSyntax(templateRaw2);
3887
3901
  const escaped2 = escapeTemplateContent(lowered2.template);
3888
3902
  const replacedSource2 = source.slice(0, templateUrlMatch.index) + `template: \`${escaped2}\`` + source.slice(templateUrlMatch.index + templateUrlMatch[0].length);
@@ -3915,7 +3929,7 @@ ${fields}
3915
3929
  return source;
3916
3930
  const stylePromises = urlMatches.map((urlMatch) => {
3917
3931
  const styleUrl = urlMatch.replace(/['"]/g, "");
3918
- return readAndEscapeFile(join5(fileDir, styleUrl), stylePreprocessors);
3932
+ return readAndEscapeFile(join6(fileDir, styleUrl), stylePreprocessors);
3919
3933
  });
3920
3934
  const results = await Promise.all(stylePromises);
3921
3935
  const inlinedStyles = results.filter(Boolean).map((escaped) => `\`${escaped}\``);
@@ -3926,7 +3940,7 @@ ${fields}
3926
3940
  const styleUrlMatch = findUncommentedMatch(source, /styleUrl\s*:\s*['"]([^'"]+)['"]/);
3927
3941
  if (!styleUrlMatch?.[1])
3928
3942
  return source;
3929
- const escaped = await readAndEscapeFile(join5(fileDir, styleUrlMatch[1]), stylePreprocessors);
3943
+ const escaped = await readAndEscapeFile(join6(fileDir, styleUrlMatch[1]), stylePreprocessors);
3930
3944
  if (!escaped)
3931
3945
  return source;
3932
3946
  return source.slice(0, styleUrlMatch.index) + `styles: [\`${escaped}\`]` + source.slice(styleUrlMatch.index + styleUrlMatch[0].length);
@@ -3961,10 +3975,10 @@ ${fields}
3961
3975
  `${candidate}.tsx`,
3962
3976
  `${candidate}.js`,
3963
3977
  `${candidate}.jsx`,
3964
- join5(candidate, "index.ts"),
3965
- join5(candidate, "index.tsx"),
3966
- join5(candidate, "index.js"),
3967
- join5(candidate, "index.jsx")
3978
+ join6(candidate, "index.ts"),
3979
+ join6(candidate, "index.tsx"),
3980
+ join6(candidate, "index.js"),
3981
+ join6(candidate, "index.jsx")
3968
3982
  ];
3969
3983
  return candidates.find((file) => existsSync5(file));
3970
3984
  };
@@ -3991,7 +4005,7 @@ ${fields}
3991
4005
  const inputDir = dirname4(sourcePath);
3992
4006
  const relativeDir = inputDir.startsWith(baseDir) ? inputDir.substring(baseDir.length + 1) : inputDir;
3993
4007
  const fileBase = basename3(sourcePath).replace(/\.[cm]?[tj]sx?$/, ".js");
3994
- return join5(outDir, relativeDir, fileBase);
4008
+ return join6(outDir, relativeDir, fileBase);
3995
4009
  };
3996
4010
  const transpileAndRewrite = (sourceCode, relativeDir, actualPath, importRewrites) => {
3997
4011
  let processedContent = angularTranspiler.transformSync(sourceCode);
@@ -4044,7 +4058,7 @@ ${fields}
4044
4058
  const inputDir = dirname4(actualPath);
4045
4059
  const relativeDir = inputDir.startsWith(baseDir) ? inputDir.substring(baseDir.length + 1) : inputDir;
4046
4060
  const fileBase = basename3(actualPath).replace(/\.[cm]?[tj]sx?$/, ".js");
4047
- const targetDir = join5(outDir, relativeDir);
4061
+ const targetDir = join6(outDir, relativeDir);
4048
4062
  const targetPath = toOutputPath(actualPath);
4049
4063
  const localImports = [];
4050
4064
  const importRewrites = new Map;
@@ -4098,13 +4112,13 @@ export const __ABSOLUTE_PAGE_USES_LEGACY_ANIMATIONS__ = true;
4098
4112
  }
4099
4113
  return allOutputs;
4100
4114
  }, compileAngular = async (entryPoints, outRoot, hmr = false, stylePreprocessors) => {
4101
- const compiledParent = join5(outRoot, "generated");
4115
+ const compiledParent = join6(outRoot, "generated");
4102
4116
  if (entryPoints.length === 0) {
4103
4117
  const emptyPaths = [];
4104
4118
  return { clientPaths: [...emptyPaths], serverPaths: [...emptyPaths] };
4105
4119
  }
4106
4120
  const compiledRoot = compiledParent;
4107
- const indexesDir = join5(compiledParent, "indexes");
4121
+ const indexesDir = join6(compiledParent, "indexes");
4108
4122
  await traceAngularPhase("setup/create-indexes-dir", () => fs.mkdir(indexesDir, { recursive: true }));
4109
4123
  const aotOutputs = hmr ? [] : await traceAngularPhase("aot/compile-files", () => compileAngularFiles(entryPoints.map((entry) => resolve5(entry)), compiledRoot, stylePreprocessors), { entries: entryPoints.length });
4110
4124
  const usesLegacyAngularAnimations = await traceAngularPhase("setup/legacy-animation-resolver", () => createLegacyAngularAnimationUsageResolver(outRoot));
@@ -4118,9 +4132,9 @@ export const __ABSOLUTE_PAGE_USES_LEGACY_ANIMATIONS__ = true;
4118
4132
  const fileBase = basename3(resolvedEntry).replace(/\.[tj]s$/, "");
4119
4133
  const jsName = `${fileBase}.js`;
4120
4134
  const compiledFallbackPaths = [
4121
- join5(compiledRoot, relativeEntry),
4122
- join5(compiledRoot, "pages", jsName),
4123
- join5(compiledRoot, jsName)
4135
+ join6(compiledRoot, relativeEntry),
4136
+ join6(compiledRoot, "pages", jsName),
4137
+ join6(compiledRoot, jsName)
4124
4138
  ].map((file) => resolve5(file));
4125
4139
  const resolveRawServerFile = (candidatePaths) => {
4126
4140
  const normalizedCandidates = [
@@ -4164,7 +4178,7 @@ export const __ABSOLUTE_PAGE_USES_LEGACY_ANIMATIONS__ = true;
4164
4178
  const usesLegacyAnimations = await traceAngularPhase("wrapper/detect-legacy-animations", () => usesLegacyAngularAnimations(resolvedEntry), { entry: resolvedEntry });
4165
4179
  const serverContentHash = Bun.hash(original).toString(BASE_36_RADIX);
4166
4180
  const cachedWrapper = wrapperOutputCache.get(resolvedEntry);
4167
- const clientFile = join5(indexesDir, jsName);
4181
+ const clientFile = join6(indexesDir, jsName);
4168
4182
  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
4183
  return {
4170
4184
  clientPath: clientFile,
@@ -4412,8 +4426,8 @@ var init_compileAngular = __esm(() => {
4412
4426
  init_lowerDeferSyntax();
4413
4427
  init_stylePreprocessor();
4414
4428
  devClientDir = resolveDevClientDir();
4415
- hmrClientPath = join5(devClientDir, "hmrClient.ts").replace(/\\/g, "/");
4416
- hmrRuntimePath = join5(devClientDir, "handlers", "angularRuntime.ts").replace(/\\/g, "/");
4429
+ hmrClientPath = join6(devClientDir, "hmrClient.ts").replace(/\\/g, "/");
4430
+ hmrRuntimePath = join6(devClientDir, "handlers", "angularRuntime.ts").replace(/\\/g, "/");
4417
4431
  jitContentCache = new Map;
4418
4432
  wrapperOutputCache = new Map;
4419
4433
  });
@@ -13524,7 +13538,7 @@ init_constants();
13524
13538
  import { AsyncLocalStorage as AsyncLocalStorage3 } from "async_hooks";
13525
13539
  import { mkdir as mkdir2, symlink } from "fs/promises";
13526
13540
  import { tmpdir } from "os";
13527
- import { basename as basename4, dirname as dirname5, join as join6, resolve as resolve6 } from "path";
13541
+ import { basename as basename4, dirname as dirname5, join as join7, resolve as resolve6 } from "path";
13528
13542
 
13529
13543
  // src/core/islandPageContext.ts
13530
13544
  init_constants();
@@ -14389,10 +14403,10 @@ var ensureAngularCompiler = () => {
14389
14403
  return compilerImportPromise;
14390
14404
  };
14391
14405
  var readAngularPageModule = (value) => isRecord5(value) ? value : null;
14392
- var resolveAngularSsrOutDir = () => process.env.ABSOLUTE_ANGULAR_SSR_OUTDIR ?? join6(tmpdir(), "absolutejs", "generated", "angular-ssr");
14406
+ var resolveAngularSsrOutDir = () => process.env.ABSOLUTE_ANGULAR_SSR_OUTDIR ?? join7(tmpdir(), "absolutejs", "generated", "angular-ssr");
14393
14407
  var ensureAngularSsrNodeModules = async (outDir) => {
14394
14408
  const outRoot = resolve6(dirname5(dirname5(outDir)));
14395
- const nodeModulesLink = join6(outRoot, "node_modules");
14409
+ const nodeModulesLink = join7(outRoot, "node_modules");
14396
14410
  if (process.env.ABSOLUTE_ANGULAR_SSR_OUTDIR) {
14397
14411
  return;
14398
14412
  }
@@ -14509,7 +14523,7 @@ var handleAngularPageRequest = async (input) => {
14509
14523
  const html = injectIslandPageContext(injectSsrScripts(htmlWithLoweredIslands, requestId, resolvedIndexPath, maybeProps), { hasIslands: shouldProcessIslands });
14510
14524
  return new Response(html, withHtmlContentType(responseInit));
14511
14525
  };
14512
- return runWithStreamingSlotWarningScope(() => options?.collectStreamingSlots === true ? withRegisteredStreamingSlots(renderPageResponse, options) : renderPageResponse(), { handlerCallsite });
14526
+ return await runWithStreamingSlotWarningScope(() => options?.collectStreamingSlots === true ? withRegisteredStreamingSlots(renderPageResponse, options) : renderPageResponse(), { handlerCallsite });
14513
14527
  } catch (error) {
14514
14528
  console.error("[SSR] Angular render error:", error);
14515
14529
  const pageName = derivePageName(resolvedPagePath);
@@ -14937,5 +14951,5 @@ export {
14937
14951
  ABSOLUTE_HTTP_TRANSFER_CACHE_SKIP_HEADER
14938
14952
  };
14939
14953
 
14940
- //# debugId=9928FEB01477D94764756E2164756E21
14954
+ //# debugId=BE386767BA716DCF64756E2164756E21
14941
14955
  //# sourceMappingURL=index.js.map