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

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.
@@ -181,9 +181,25 @@ var init_registerClientScript = __esm(() => {
181
181
  }
182
182
  });
183
183
 
184
+ // src/angular/resolveAngularPackage.ts
185
+ import { existsSync } from "fs";
186
+ import { resolve } from "path";
187
+ var resolveAngularPackage = (specifier) => {
188
+ const fromCompiledRuntime = process.env.ABSOLUTE_BUILD_DIR ? resolve(process.env.ABSOLUTE_BUILD_DIR, "node_modules", specifier) : null;
189
+ if (fromCompiledRuntime && existsSync(fromCompiledRuntime)) {
190
+ return fromCompiledRuntime;
191
+ }
192
+ const fromProject = resolve(process.cwd(), "node_modules", specifier);
193
+ if (existsSync(fromProject)) {
194
+ return fromProject;
195
+ }
196
+ return specifier;
197
+ };
198
+ var init_resolveAngularPackage = () => {};
199
+
184
200
  // src/angular/injectorPatch.ts
185
- import { existsSync, readFileSync, writeFileSync } from "fs";
186
- import { dirname, join, resolve } from "path";
201
+ import { existsSync as existsSync2, readFileSync, writeFileSync } from "fs";
202
+ import { dirname, join } from "path";
187
203
  var applyInjectorPatch = (chunkPath, content) => {
188
204
  if (content.includes('Symbol.for("angular.currentInjector")')) {
189
205
  return;
@@ -219,9 +235,9 @@ var applyInjectorPatch = (chunkPath, content) => {
219
235
  }
220
236
  writeFileSync(chunkPath, patched, "utf-8");
221
237
  }, resolveAngularCoreDir = () => {
222
- const fromProject = resolve(process.cwd(), "node_modules/@angular/core");
223
- if (existsSync(join(fromProject, "package.json"))) {
224
- return fromProject;
238
+ const resolved = resolveAngularPackage("@angular/core");
239
+ if (existsSync2(join(resolved, "package.json"))) {
240
+ return resolved;
225
241
  }
226
242
  return dirname(__require.resolve("@angular/core/package.json"));
227
243
  }, patchAngularInjectorSingleton = () => {
@@ -233,21 +249,10 @@ var applyInjectorPatch = (chunkPath, content) => {
233
249
  } catch {}
234
250
  };
235
251
  var init_injectorPatch = __esm(() => {
252
+ init_resolveAngularPackage();
236
253
  patchAngularInjectorSingleton();
237
254
  });
238
255
 
239
- // src/angular/resolveAngularPackage.ts
240
- import { existsSync as existsSync2 } from "fs";
241
- import { resolve as resolve2 } from "path";
242
- var resolveAngularPackage = (specifier) => {
243
- const fromProject = resolve2(process.cwd(), "node_modules", specifier);
244
- if (existsSync2(fromProject)) {
245
- return fromProject;
246
- }
247
- return specifier;
248
- };
249
- var init_resolveAngularPackage = () => {};
250
-
251
256
  // src/angular/angularPatch.ts
252
257
  var exports_angularPatch = {};
253
258
  __export(exports_angularPatch, {
@@ -768,7 +773,7 @@ var init_islandSsr = __esm(() => {
768
773
  });
769
774
 
770
775
  // src/build/resolvePackageImport.ts
771
- import { resolve as resolve3, join as join2 } from "path";
776
+ import { resolve as resolve2, join as join2 } from "path";
772
777
  import { existsSync as existsSync3, readFileSync as readFileSync2 } from "fs";
773
778
  var resolveExportPath = (entry, conditions) => {
774
779
  if (typeof entry === "string")
@@ -790,10 +795,10 @@ var resolveExportPath = (entry, conditions) => {
790
795
  const packageName = isScoped ? `${parts[0]}/${parts[1]}` : parts[0];
791
796
  const subpath = isScoped ? parts.slice(2).join("/") : parts.slice(1).join("/");
792
797
  const exportKey = subpath ? `./${subpath}` : ".";
793
- const currentPackageJsonPath = resolve3(process.cwd(), "package.json");
798
+ const currentPackageJsonPath = resolve2(process.cwd(), "package.json");
794
799
  const currentPackageJson = existsSync3(currentPackageJsonPath) ? JSON.parse(readFileSync2(currentPackageJsonPath, "utf-8")) : null;
795
800
  const currentPackageDir = currentPackageJson?.name === packageName ? process.cwd() : null;
796
- const packageDir = currentPackageDir ?? resolve3(process.cwd(), "node_modules", packageName ?? "");
801
+ const packageDir = currentPackageDir ?? resolve2(process.cwd(), "node_modules", packageName ?? "");
797
802
  const packageJsonPath = join2(packageDir, "package.json");
798
803
  if (!existsSync3(packageJsonPath))
799
804
  return null;
@@ -809,12 +814,12 @@ var resolveExportPath = (entry, conditions) => {
809
814
  if (!importPath)
810
815
  return null;
811
816
  if (currentPackageDir && importPath.startsWith("./dist/")) {
812
- const sourceCandidate = resolve3(packageDir, importPath.replace(/^\.\/dist\//, "./src/"));
817
+ const sourceCandidate = resolve2(packageDir, importPath.replace(/^\.\/dist\//, "./src/"));
813
818
  if (existsSync3(sourceCandidate)) {
814
819
  return sourceCandidate;
815
820
  }
816
821
  }
817
- const resolved = resolve3(packageDir, importPath);
822
+ const resolved = resolve2(packageDir, importPath);
818
823
  return existsSync3(resolved) ? resolved : null;
819
824
  } catch {
820
825
  return null;
@@ -965,7 +970,7 @@ __export(exports_stylePreprocessor, {
965
970
  import { existsSync as existsSync4, readFileSync as readFileSync3 } from "fs";
966
971
  import { readFile } from "fs/promises";
967
972
  import { createRequire } from "module";
968
- import { dirname as dirname2, extname, isAbsolute, join as join3, relative, resolve as resolve4 } from "path";
973
+ import { dirname as dirname2, extname, isAbsolute, join as join3, relative, resolve as resolve3 } from "path";
969
974
  import { fileURLToPath } from "url";
970
975
  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) => {
971
976
  const normalized = filePathOrLanguage.toLowerCase();
@@ -987,7 +992,7 @@ var CSS_EXTENSION_PATTERN, STYLE_EXTENSION_PATTERN, STYLE_MODULE_EXTENSION_PATTE
987
992
  }, normalizeLoadPaths = (filePath, paths = []) => [
988
993
  dirname2(filePath),
989
994
  process.cwd(),
990
- ...paths.map((path) => resolve4(process.cwd(), path))
995
+ ...paths.map((path) => resolve3(process.cwd(), path))
991
996
  ], tsconfigAliasCache, stripJsonComments = (source) => source.replace(/\/\*[\s\S]*?\*\//g, "").replace(/(^|[^:])\/\/.*$/gm, "$1"), normalizeAliasEntries = (aliases) => Object.entries(aliases ?? {}).map(([pattern, value]) => ({
992
997
  pattern,
993
998
  replacements: Array.isArray(value) ? value : [value]
@@ -995,7 +1000,7 @@ var CSS_EXTENSION_PATTERN, STYLE_EXTENSION_PATTERN, STYLE_MODULE_EXTENSION_PATTE
995
1000
  const cwd = process.cwd();
996
1001
  if (tsconfigAliasCache?.cwd === cwd)
997
1002
  return tsconfigAliasCache;
998
- const tsconfigPath = resolve4(cwd, "tsconfig.json");
1003
+ const tsconfigPath = resolve3(cwd, "tsconfig.json");
999
1004
  const empty = { aliases: [], baseUrl: cwd, cwd };
1000
1005
  if (!existsSync4(tsconfigPath)) {
1001
1006
  tsconfigAliasCache = empty;
@@ -1004,7 +1009,7 @@ var CSS_EXTENSION_PATTERN, STYLE_EXTENSION_PATTERN, STYLE_MODULE_EXTENSION_PATTE
1004
1009
  try {
1005
1010
  const parsed = JSON.parse(stripJsonComments(readFileSync3(tsconfigPath, "utf-8")));
1006
1011
  const compilerOptions = parsed.compilerOptions ?? {};
1007
- const baseUrl = resolve4(cwd, compilerOptions.baseUrl ?? ".");
1012
+ const baseUrl = resolve3(cwd, compilerOptions.baseUrl ?? ".");
1008
1013
  tsconfigAliasCache = {
1009
1014
  aliases: normalizeAliasEntries(compilerOptions.paths),
1010
1015
  baseUrl,
@@ -1029,7 +1034,7 @@ var CSS_EXTENSION_PATTERN, STYLE_EXTENSION_PATTERN, STYLE_MODULE_EXTENSION_PATTE
1029
1034
  continue;
1030
1035
  const wildcard = match[1] ?? "";
1031
1036
  for (const replacement of alias.replacements) {
1032
- targets.push(resolve4(baseUrl, replacement.replace("*", wildcard)));
1037
+ targets.push(resolve3(baseUrl, replacement.replace("*", wildcard)));
1033
1038
  }
1034
1039
  }
1035
1040
  return targets;
@@ -1056,8 +1061,8 @@ var CSS_EXTENSION_PATTERN, STYLE_EXTENSION_PATTERN, STYLE_MODULE_EXTENSION_PATTE
1056
1061
  }, resolveImportPath = (specifier, fromDirectory, loadPaths, language, config) => {
1057
1062
  const rawCandidates = [
1058
1063
  ...resolveAliasTargets(specifier, config),
1059
- isAbsolute(specifier) ? specifier : resolve4(fromDirectory, specifier),
1060
- ...loadPaths.map((path) => resolve4(path, specifier))
1064
+ isAbsolute(specifier) ? specifier : resolve3(fromDirectory, specifier),
1065
+ ...loadPaths.map((path) => resolve3(path, specifier))
1061
1066
  ];
1062
1067
  for (const candidate of rawCandidates.flatMap((path) => getCandidatePaths(path, language))) {
1063
1068
  if (existsSync4(candidate))
@@ -1082,7 +1087,7 @@ var CSS_EXTENSION_PATTERN, STYLE_EXTENSION_PATTERN, STYLE_MODULE_EXTENSION_PATTE
1082
1087
  if (!trimmedUrl || isExternalCssUrl(trimmedUrl))
1083
1088
  return match;
1084
1089
  const { marker, path } = splitCssUrl(trimmedUrl);
1085
- const rebased = relative(entryDir, resolve4(sourceDir, path)).replace(/\\/g, "/");
1090
+ const rebased = relative(entryDir, resolve3(sourceDir, path)).replace(/\\/g, "/");
1086
1091
  const normalized = rebased.startsWith(".") ? rebased : `./${rebased}`;
1087
1092
  const nextQuote = quote || '"';
1088
1093
  return `url(${nextQuote}${normalized}${marker}${nextQuote})`;
@@ -1120,7 +1125,7 @@ ${contents}` : contents, normalizePostcssModule = (mod) => {
1120
1125
  }
1121
1126
  return mod;
1122
1127
  }, loadPostcssConfigFile = async (configPath) => {
1123
- const resolved = resolve4(process.cwd(), configPath);
1128
+ const resolved = resolve3(process.cwd(), configPath);
1124
1129
  const loaded = resolved.endsWith(".cjs") || resolved.endsWith(".cts") ? requireOptionalPeerSync(resolved) : await importOptionalPeer(`${new URL(`file://${resolved}`).href}?t=${Date.now()}`);
1125
1130
  const config = normalizePostcssModule(loaded);
1126
1131
  const value = typeof config === "function" ? await config({
@@ -1198,9 +1203,9 @@ ${contents}` : contents, normalizePostcssModule = (mod) => {
1198
1203
  install(less, pluginManager) {
1199
1204
  const baseManager = new less.FileManager;
1200
1205
  const manager = Object.create(baseManager);
1201
- manager.supports = (filename, currentDirectory) => Boolean(resolveImportPath(filename, resolve4(currentDirectory), loadPaths, "less", config));
1206
+ manager.supports = (filename, currentDirectory) => Boolean(resolveImportPath(filename, resolve3(currentDirectory), loadPaths, "less", config));
1202
1207
  manager.loadFile = async (filename, currentDirectory) => {
1203
- const resolved = resolveImportPath(filename, resolve4(currentDirectory), loadPaths, "less", config);
1208
+ const resolved = resolveImportPath(filename, resolve3(currentDirectory), loadPaths, "less", config);
1204
1209
  if (!resolved) {
1205
1210
  throw new Error(`Unable to resolve Less import "${filename}"`);
1206
1211
  }
@@ -1398,7 +1403,7 @@ var init_stylePreprocessor = __esm(() => {
1398
1403
 
1399
1404
  // src/core/svelteServerModule.ts
1400
1405
  import { mkdir, readdir } from "fs/promises";
1401
- import { basename as basename2, dirname as dirname3, extname as extname2, join as join4, relative as relative2, resolve as resolve5 } from "path";
1406
+ import { basename as basename2, dirname as dirname3, extname as extname2, join as join4, relative as relative2, resolve as resolve4 } from "path";
1402
1407
  var serverCacheRoot, compiledModuleCache, originalSourcePathCache, transpiler, ensureRelativeImportPath = (from, target) => {
1403
1408
  const importPath = relative2(dirname3(from), target).replace(/\\/g, "/");
1404
1409
  return importPath.startsWith(".") ? importPath : `./${importPath}`;
@@ -1446,7 +1451,7 @@ var serverCacheRoot, compiledModuleCache, originalSourcePathCache, transpiler, e
1446
1451
  if (!spec.startsWith(".")) {
1447
1452
  return null;
1448
1453
  }
1449
- const basePath = resolve5(dirname3(from), spec);
1454
+ const basePath = resolve4(dirname3(from), spec);
1450
1455
  const candidates = [
1451
1456
  basePath,
1452
1457
  `${basePath}.ts`,
@@ -1478,7 +1483,7 @@ var serverCacheRoot, compiledModuleCache, originalSourcePathCache, transpiler, e
1478
1483
  if (!spec.startsWith(".")) {
1479
1484
  return null;
1480
1485
  }
1481
- const explicitPath = resolve5(dirname3(from), spec);
1486
+ const explicitPath = resolve4(dirname3(from), spec);
1482
1487
  if (extname2(explicitPath) === ".svelte") {
1483
1488
  return explicitPath;
1484
1489
  }
@@ -3228,17 +3233,17 @@ __export(exports_compileAngular, {
3228
3233
  compileAngular: () => compileAngular
3229
3234
  });
3230
3235
  import { existsSync as existsSync5, readFileSync as readFileSync4, promises as fs } from "fs";
3231
- import { join as join5, basename as basename3, sep, dirname as dirname4, resolve as resolve6, relative as relative3 } from "path";
3236
+ import { join as join5, basename as basename3, sep, dirname as dirname4, resolve as resolve5, relative as relative3 } from "path";
3232
3237
  import ts from "typescript";
3233
3238
  var traceAngularPhase = async (name, fn, metadata) => {
3234
3239
  const tracePhase = globalThis.__absoluteBuildTracePhase;
3235
3240
  return tracePhase ? tracePhase(`compile/angular/${name}`, fn, metadata) : await fn();
3236
3241
  }, readTsconfigPathAliases = () => {
3237
3242
  try {
3238
- const configPath = resolve6(process.cwd(), "tsconfig.json");
3243
+ const configPath = resolve5(process.cwd(), "tsconfig.json");
3239
3244
  const config = ts.readConfigFile(configPath, ts.sys.readFile).config;
3240
3245
  const compilerOptions = config?.compilerOptions ?? {};
3241
- const baseUrl = resolve6(process.cwd(), compilerOptions.baseUrl ?? ".");
3246
+ const baseUrl = resolve5(process.cwd(), compilerOptions.baseUrl ?? ".");
3242
3247
  const aliases = Object.entries(compilerOptions.paths ?? {}).map(([pattern, replacements]) => ({ pattern, replacements }));
3243
3248
  return { aliases, baseUrl };
3244
3249
  } catch {
@@ -3258,7 +3263,7 @@ var traceAngularPhase = async (name, fn, metadata) => {
3258
3263
  const wildcardValue = exactMatch ? "" : specifier.slice(prefix.length, specifier.length - suffix.length);
3259
3264
  for (const replacement of alias.replacements) {
3260
3265
  const candidate = replacement.replace("*", wildcardValue);
3261
- const resolved = resolveSourceFile(resolve6(baseUrl, candidate));
3266
+ const resolved = resolveSourceFile(resolve5(baseUrl, candidate));
3262
3267
  if (resolved)
3263
3268
  return resolved;
3264
3269
  }
@@ -3277,13 +3282,13 @@ var traceAngularPhase = async (name, fn, metadata) => {
3277
3282
  ];
3278
3283
  return candidates.find((file) => existsSync5(file));
3279
3284
  }, createLegacyAngularAnimationUsageResolver = (rootDir) => {
3280
- const baseDir = resolve6(rootDir);
3285
+ const baseDir = resolve5(rootDir);
3281
3286
  const tsconfigAliases = readTsconfigPathAliases();
3282
3287
  const transpiler2 = new Bun.Transpiler({ loader: "tsx" });
3283
3288
  const scanCache = new Map;
3284
3289
  const resolveLocalImport = (specifier, fromDir) => {
3285
3290
  if (specifier.startsWith(".") || specifier.startsWith("/")) {
3286
- return resolveSourceFile(resolve6(fromDir, specifier));
3291
+ return resolveSourceFile(resolve5(fromDir, specifier));
3287
3292
  }
3288
3293
  const aliased = matchTsconfigAlias(specifier, tsconfigAliases.aliases, tsconfigAliases.baseUrl, resolveSourceFile);
3289
3294
  if (aliased)
@@ -3292,7 +3297,7 @@ var traceAngularPhase = async (name, fn, metadata) => {
3292
3297
  const resolved = Bun.resolveSync(specifier, fromDir);
3293
3298
  if (resolved.includes("/node_modules/"))
3294
3299
  return;
3295
- const absolute = resolve6(resolved);
3300
+ const absolute = resolve5(resolved);
3296
3301
  if (!absolute.startsWith(baseDir))
3297
3302
  return;
3298
3303
  return resolveSourceFile(absolute);
@@ -3308,7 +3313,7 @@ var traceAngularPhase = async (name, fn, metadata) => {
3308
3313
  usesLegacyAnimations: false
3309
3314
  });
3310
3315
  }
3311
- const resolved = resolve6(actualPath);
3316
+ const resolved = resolve5(actualPath);
3312
3317
  const cached = scanCache.get(resolved);
3313
3318
  if (cached)
3314
3319
  return cached;
@@ -3337,7 +3342,7 @@ var traceAngularPhase = async (name, fn, metadata) => {
3337
3342
  const actualPath = resolveSourceFile(filePath);
3338
3343
  if (!actualPath)
3339
3344
  return false;
3340
- const resolved = resolve6(actualPath);
3345
+ const resolved = resolve5(actualPath);
3341
3346
  if (visited.has(resolved))
3342
3347
  return false;
3343
3348
  visited.add(resolved);
@@ -3355,14 +3360,14 @@ var traceAngularPhase = async (name, fn, metadata) => {
3355
3360
  return (entryPath) => visit(entryPath);
3356
3361
  }, resolveDevClientDir = () => {
3357
3362
  const projectRoot = process.cwd();
3358
- const fromSource = resolve6(import.meta.dir, "../dev/client");
3363
+ const fromSource = resolve5(import.meta.dir, "../dev/client");
3359
3364
  if (existsSync5(fromSource) && fromSource.startsWith(projectRoot)) {
3360
3365
  return fromSource;
3361
3366
  }
3362
- const fromNodeModules = resolve6(projectRoot, "node_modules/@absolutejs/absolute/dist/dev/client");
3367
+ const fromNodeModules = resolve5(projectRoot, "node_modules/@absolutejs/absolute/dist/dev/client");
3363
3368
  if (existsSync5(fromNodeModules))
3364
3369
  return fromNodeModules;
3365
- return resolve6(import.meta.dir, "./dev/client");
3370
+ return resolve5(import.meta.dir, "./dev/client");
3366
3371
  }, devClientDir, hmrClientPath, hmrRuntimePath, injectHMRRegistration = (content, sourceId) => {
3367
3372
  const componentClassRegex = /(?:export\s+)?class\s+(\w+Component)\s/g;
3368
3373
  const componentNames = [];
@@ -3411,11 +3416,11 @@ ${registrations}
3411
3416
  if (hasJsLikeExtension(specifier))
3412
3417
  return specifier;
3413
3418
  const importerDir = dirname4(importerOutputPath);
3414
- const fileCandidate = resolve6(importerDir, `${specifier}.js`);
3419
+ const fileCandidate = resolve5(importerDir, `${specifier}.js`);
3415
3420
  if (outputFiles?.has(fileCandidate) || existsSync5(fileCandidate)) {
3416
3421
  return `${specifier}.js`;
3417
3422
  }
3418
- const indexCandidate = resolve6(importerDir, specifier, "index.js");
3423
+ const indexCandidate = resolve5(importerDir, specifier, "index.js");
3419
3424
  if (outputFiles?.has(indexCandidate) || existsSync5(indexCandidate)) {
3420
3425
  return `${specifier}/index.js`;
3421
3426
  }
@@ -3443,7 +3448,7 @@ ${registrations}
3443
3448
  }, resolveLocalTsImport = (fromFile, specifier) => {
3444
3449
  if (!isRelativeModuleSpecifier(specifier))
3445
3450
  return null;
3446
- const basePath = resolve6(dirname4(fromFile), specifier);
3451
+ const basePath = resolve5(dirname4(fromFile), specifier);
3447
3452
  const candidates = /\.[cm]?[tj]sx?$/.test(basePath) ? [basePath] : [
3448
3453
  `${basePath}.ts`,
3449
3454
  `${basePath}.tsx`,
@@ -3454,7 +3459,7 @@ ${registrations}
3454
3459
  join5(basePath, "index.mts"),
3455
3460
  join5(basePath, "index.cts")
3456
3461
  ];
3457
- return candidates.map((candidate) => resolve6(candidate)).find((candidate) => existsSync5(candidate) && !candidate.endsWith(".d.ts")) ?? null;
3462
+ return candidates.map((candidate) => resolve5(candidate)).find((candidate) => existsSync5(candidate) && !candidate.endsWith(".d.ts")) ?? null;
3458
3463
  }, readFileForAotTransform = async (fileName, readFile2) => {
3459
3464
  const hostSource = readFile2?.(fileName);
3460
3465
  if (typeof hostSource === "string")
@@ -3489,7 +3494,7 @@ ${registrations}
3489
3494
  paths.push(join5(fileDir, urlMatch.replace(/['"]/g, "")));
3490
3495
  }
3491
3496
  }
3492
- return paths.map((path) => resolve6(path));
3497
+ return paths.map((path) => resolve5(path));
3493
3498
  }, readResourceCacheFile = async (cachePath) => {
3494
3499
  try {
3495
3500
  const entry = JSON.parse(await fs.readFile(cachePath, "utf-8"));
@@ -3531,7 +3536,7 @@ ${registrations}
3531
3536
  transformedFiles: 0
3532
3537
  };
3533
3538
  const transformFile = async (filePath) => {
3534
- const resolvedPath = resolve6(filePath);
3539
+ const resolvedPath = resolve5(filePath);
3535
3540
  if (visited.has(resolvedPath))
3536
3541
  return;
3537
3542
  visited.add(resolvedPath);
@@ -3566,7 +3571,7 @@ ${registrations}
3566
3571
  return { stats, transformedSources };
3567
3572
  }, compileAngularFiles = async (inputPaths, outDir, stylePreprocessors) => {
3568
3573
  const islandMetadataByOutputPath = await traceAngularPhase("aot/island-metadata", () => new Map(inputPaths.map((inputPath) => {
3569
- const outputPath = resolve6(join5(outDir, relative3(process.cwd(), resolve6(inputPath)).replace(/\.[cm]?[tj]sx?$/, ".js")));
3574
+ const outputPath = resolve5(join5(outDir, relative3(process.cwd(), resolve5(inputPath)).replace(/\.[cm]?[tj]sx?$/, ".js")));
3570
3575
  return [
3571
3576
  outputPath,
3572
3577
  buildIslandMetadataExports(readFileSync4(inputPath, "utf-8"))
@@ -3576,7 +3581,7 @@ ${registrations}
3576
3581
  const tsLibDir = await traceAngularPhase("aot/resolve-typescript-lib", () => {
3577
3582
  const tsPath = __require.resolve("typescript");
3578
3583
  const tsRootDir = dirname4(tsPath);
3579
- return tsRootDir.endsWith("lib") ? tsRootDir : resolve6(tsRootDir, "lib");
3584
+ return tsRootDir.endsWith("lib") ? tsRootDir : resolve5(tsRootDir, "lib");
3580
3585
  });
3581
3586
  const config = await traceAngularPhase("aot/read-configuration", () => readConfiguration("./tsconfig.json"));
3582
3587
  const options = {
@@ -3618,7 +3623,7 @@ ${registrations}
3618
3623
  return originalGetSourceFile?.call(host, fileName, languageVersion, onError);
3619
3624
  };
3620
3625
  const emitted = {};
3621
- const resolvedOutDir = resolve6(outDir);
3626
+ const resolvedOutDir = resolve5(outDir);
3622
3627
  host.writeFile = (fileName, text) => {
3623
3628
  const relativePath = resolveRelativePath(fileName, resolvedOutDir, outDir);
3624
3629
  emitted[relativePath] = text;
@@ -3640,12 +3645,12 @@ ${registrations}
3640
3645
  if (!fileName.endsWith(".ts") || fileName.endsWith(".d.ts")) {
3641
3646
  return source;
3642
3647
  }
3643
- const resolvedPath = resolve6(fileName);
3648
+ const resolvedPath = resolve5(fileName);
3644
3649
  return transformedSources.get(resolvedPath) ?? source;
3645
3650
  };
3646
3651
  const originalGetSourceFileForCompile = host.getSourceFile;
3647
3652
  host.getSourceFile = (fileName, languageVersion, onError) => {
3648
- const source = transformedSources.get(resolve6(fileName));
3653
+ const source = transformedSources.get(resolve5(fileName));
3649
3654
  if (source) {
3650
3655
  return ts.createSourceFile(fileName, source, languageVersion, true);
3651
3656
  }
@@ -3669,7 +3674,7 @@ ${registrations}
3669
3674
  content,
3670
3675
  target: join5(outDir, fileName)
3671
3676
  }));
3672
- const outputFiles = new Set(rawEntries.map(({ target }) => resolve6(target)));
3677
+ const outputFiles = new Set(rawEntries.map(({ target }) => resolve5(target)));
3673
3678
  return rawEntries.map(({ content, target }) => {
3674
3679
  let processedContent = content.replace(/from\s+(['"])(\.\.?\/[^'"]+)(\1)/g, (match, quote, path) => {
3675
3680
  const rewritten = rewriteRelativeJsSpecifier(target, path, outputFiles);
@@ -3684,7 +3689,7 @@ ${registrations}
3684
3689
  return cleaned ? `import { ${cleaned}, InternalInjectFlags } from '@angular/core'` : `import { InternalInjectFlags } from '@angular/core'`;
3685
3690
  });
3686
3691
  processedContent = processedContent.replace(/\b(?<!Internal)InjectFlags\b/g, "InternalInjectFlags");
3687
- processedContent += islandMetadataByOutputPath.get(resolve6(target)) ?? "";
3692
+ processedContent += islandMetadataByOutputPath.get(resolve5(target)) ?? "";
3688
3693
  return { content: processedContent, target };
3689
3694
  });
3690
3695
  });
@@ -3705,7 +3710,7 @@ ${registrations}
3705
3710
  }
3706
3711
  return null;
3707
3712
  }, resolveAngularDeferImportSpecifier = () => {
3708
- const sourceEntry = resolve6(import.meta.dir, "../angular/components/index.ts");
3713
+ const sourceEntry = resolve5(import.meta.dir, "../angular/components/index.ts");
3709
3714
  if (existsSync5(sourceEntry)) {
3710
3715
  return sourceEntry.replace(/\\/g, "/");
3711
3716
  }
@@ -3935,10 +3940,10 @@ ${fields}
3935
3940
  source: result
3936
3941
  };
3937
3942
  }, compileAngularFileJIT = async (inputPath, outDir, rootDir, stylePreprocessors) => {
3938
- const entryPath = resolve6(inputPath);
3943
+ const entryPath = resolve5(inputPath);
3939
3944
  const allOutputs = [];
3940
3945
  const visited = new Set;
3941
- const baseDir = resolve6(rootDir ?? process.cwd());
3946
+ const baseDir = resolve5(rootDir ?? process.cwd());
3942
3947
  let usesLegacyAnimations = false;
3943
3948
  const angularTranspiler = new Bun.Transpiler({
3944
3949
  loader: "ts",
@@ -3965,7 +3970,7 @@ ${fields}
3965
3970
  };
3966
3971
  const resolveLocalImport = (specifier, fromDir) => {
3967
3972
  if (specifier.startsWith(".") || specifier.startsWith("/")) {
3968
- return resolveSourceFile2(resolve6(fromDir, specifier));
3973
+ return resolveSourceFile2(resolve5(fromDir, specifier));
3969
3974
  }
3970
3975
  const aliased = matchTsconfigAlias(specifier, tsconfigAliases.aliases, tsconfigAliases.baseUrl, resolveSourceFile2);
3971
3976
  if (aliased)
@@ -3974,7 +3979,7 @@ ${fields}
3974
3979
  const resolved = Bun.resolveSync(specifier, fromDir);
3975
3980
  if (resolved.includes("/node_modules/"))
3976
3981
  return;
3977
- const absolute = resolve6(resolved);
3982
+ const absolute = resolve5(resolved);
3978
3983
  if (!absolute.startsWith(baseDir))
3979
3984
  return;
3980
3985
  return resolveSourceFile2(absolute);
@@ -4018,13 +4023,13 @@ ${fields}
4018
4023
  return `${prefix}${dots}`;
4019
4024
  return `${prefix}../${dots}`;
4020
4025
  });
4021
- if (resolve6(actualPath) === entryPath) {
4026
+ if (resolve5(actualPath) === entryPath) {
4022
4027
  processedContent += buildIslandMetadataExports(sourceCode);
4023
4028
  }
4024
4029
  return processedContent;
4025
4030
  };
4026
4031
  const transpileFile = async (filePath) => {
4027
- const resolved = resolve6(filePath);
4032
+ const resolved = resolve5(filePath);
4028
4033
  if (visited.has(resolved))
4029
4034
  return;
4030
4035
  visited.add(resolved);
@@ -4101,10 +4106,10 @@ export const __ABSOLUTE_PAGE_USES_LEGACY_ANIMATIONS__ = true;
4101
4106
  const compiledRoot = compiledParent;
4102
4107
  const indexesDir = join5(compiledParent, "indexes");
4103
4108
  await traceAngularPhase("setup/create-indexes-dir", () => fs.mkdir(indexesDir, { recursive: true }));
4104
- const aotOutputs = hmr ? [] : await traceAngularPhase("aot/compile-files", () => compileAngularFiles(entryPoints.map((entry) => resolve6(entry)), compiledRoot, stylePreprocessors), { entries: entryPoints.length });
4109
+ const aotOutputs = hmr ? [] : await traceAngularPhase("aot/compile-files", () => compileAngularFiles(entryPoints.map((entry) => resolve5(entry)), compiledRoot, stylePreprocessors), { entries: entryPoints.length });
4105
4110
  const usesLegacyAngularAnimations = await traceAngularPhase("setup/legacy-animation-resolver", () => createLegacyAngularAnimationUsageResolver(outRoot));
4106
4111
  const compileTasks = entryPoints.map(async (entry) => {
4107
- const resolvedEntry = resolve6(entry);
4112
+ const resolvedEntry = resolve5(entry);
4108
4113
  const relativeEntry = relative3(outRoot, resolvedEntry).replace(/\.[tj]s$/, ".js");
4109
4114
  const compileEntry = () => compileAngularFileJIT(resolvedEntry, compiledRoot, outRoot, stylePreprocessors);
4110
4115
  let outputs = hmr ? await traceAngularPhase("jit/compile-entry", compileEntry, {
@@ -4116,10 +4121,10 @@ export const __ABSOLUTE_PAGE_USES_LEGACY_ANIMATIONS__ = true;
4116
4121
  join5(compiledRoot, relativeEntry),
4117
4122
  join5(compiledRoot, "pages", jsName),
4118
4123
  join5(compiledRoot, jsName)
4119
- ].map((file) => resolve6(file));
4124
+ ].map((file) => resolve5(file));
4120
4125
  const resolveRawServerFile = (candidatePaths) => {
4121
4126
  const normalizedCandidates = [
4122
- ...candidatePaths.map((file) => resolve6(file)),
4127
+ ...candidatePaths.map((file) => resolve5(file)),
4123
4128
  ...compiledFallbackPaths
4124
4129
  ];
4125
4130
  let candidate = normalizedCandidates.find((file) => existsSync5(file) && file.endsWith(`${sep}pages${sep}${jsName}`));
@@ -5097,7 +5102,7 @@ var require_Observable = __commonJS((exports) => {
5097
5102
  Observable2.prototype.forEach = function(next, promiseCtor) {
5098
5103
  var _this = this;
5099
5104
  promiseCtor = getPromiseCtor(promiseCtor);
5100
- return new promiseCtor(function(resolve8, reject) {
5105
+ return new promiseCtor(function(resolve7, reject) {
5101
5106
  var subscriber = new Subscriber_1.SafeSubscriber({
5102
5107
  next: function(value) {
5103
5108
  try {
@@ -5108,7 +5113,7 @@ var require_Observable = __commonJS((exports) => {
5108
5113
  }
5109
5114
  },
5110
5115
  error: reject,
5111
- complete: resolve8
5116
+ complete: resolve7
5112
5117
  });
5113
5118
  _this.subscribe(subscriber);
5114
5119
  });
@@ -5130,14 +5135,14 @@ var require_Observable = __commonJS((exports) => {
5130
5135
  Observable2.prototype.toPromise = function(promiseCtor) {
5131
5136
  var _this = this;
5132
5137
  promiseCtor = getPromiseCtor(promiseCtor);
5133
- return new promiseCtor(function(resolve8, reject) {
5138
+ return new promiseCtor(function(resolve7, reject) {
5134
5139
  var value;
5135
5140
  _this.subscribe(function(x) {
5136
5141
  return value = x;
5137
5142
  }, function(err) {
5138
5143
  return reject(err);
5139
5144
  }, function() {
5140
- return resolve8(value);
5145
+ return resolve7(value);
5141
5146
  });
5142
5147
  });
5143
5148
  };
@@ -7165,11 +7170,11 @@ var require_isReadableStreamLike = __commonJS((exports) => {
7165
7170
  var require_innerFrom = __commonJS((exports) => {
7166
7171
  var __awaiter = exports && exports.__awaiter || function(thisArg, _arguments, P, generator) {
7167
7172
  function adopt(value) {
7168
- return value instanceof P ? value : new P(function(resolve8) {
7169
- resolve8(value);
7173
+ return value instanceof P ? value : new P(function(resolve7) {
7174
+ resolve7(value);
7170
7175
  });
7171
7176
  }
7172
- return new (P || (P = Promise))(function(resolve8, reject) {
7177
+ return new (P || (P = Promise))(function(resolve7, reject) {
7173
7178
  function fulfilled(value) {
7174
7179
  try {
7175
7180
  step(generator.next(value));
@@ -7185,7 +7190,7 @@ var require_innerFrom = __commonJS((exports) => {
7185
7190
  }
7186
7191
  }
7187
7192
  function step(result) {
7188
- result.done ? resolve8(result.value) : adopt(result.value).then(fulfilled, rejected);
7193
+ result.done ? resolve7(result.value) : adopt(result.value).then(fulfilled, rejected);
7189
7194
  }
7190
7195
  step((generator = generator.apply(thisArg, _arguments || [])).next());
7191
7196
  });
@@ -7275,14 +7280,14 @@ var require_innerFrom = __commonJS((exports) => {
7275
7280
  }, i);
7276
7281
  function verb(n) {
7277
7282
  i[n] = o[n] && function(v) {
7278
- return new Promise(function(resolve8, reject) {
7279
- v = o[n](v), settle(resolve8, reject, v.done, v.value);
7283
+ return new Promise(function(resolve7, reject) {
7284
+ v = o[n](v), settle(resolve7, reject, v.done, v.value);
7280
7285
  });
7281
7286
  };
7282
7287
  }
7283
- function settle(resolve8, reject, d, v) {
7288
+ function settle(resolve7, reject, d, v) {
7284
7289
  Promise.resolve(v).then(function(v2) {
7285
- resolve8({ value: v2, done: d });
7290
+ resolve7({ value: v2, done: d });
7286
7291
  }, reject);
7287
7292
  }
7288
7293
  };
@@ -7858,7 +7863,7 @@ var require_lastValueFrom = __commonJS((exports) => {
7858
7863
  var EmptyError_1 = require_EmptyError();
7859
7864
  function lastValueFrom(source, config) {
7860
7865
  var hasConfig = typeof config === "object";
7861
- return new Promise(function(resolve8, reject) {
7866
+ return new Promise(function(resolve7, reject) {
7862
7867
  var _hasValue = false;
7863
7868
  var _value;
7864
7869
  source.subscribe({
@@ -7869,9 +7874,9 @@ var require_lastValueFrom = __commonJS((exports) => {
7869
7874
  error: reject,
7870
7875
  complete: function() {
7871
7876
  if (_hasValue) {
7872
- resolve8(_value);
7877
+ resolve7(_value);
7873
7878
  } else if (hasConfig) {
7874
- resolve8(config.defaultValue);
7879
+ resolve7(config.defaultValue);
7875
7880
  } else {
7876
7881
  reject(new EmptyError_1.EmptyError);
7877
7882
  }
@@ -7890,16 +7895,16 @@ var require_firstValueFrom = __commonJS((exports) => {
7890
7895
  var Subscriber_1 = require_Subscriber();
7891
7896
  function firstValueFrom(source, config) {
7892
7897
  var hasConfig = typeof config === "object";
7893
- return new Promise(function(resolve8, reject) {
7898
+ return new Promise(function(resolve7, reject) {
7894
7899
  var subscriber = new Subscriber_1.SafeSubscriber({
7895
7900
  next: function(value) {
7896
- resolve8(value);
7901
+ resolve7(value);
7897
7902
  subscriber.unsubscribe();
7898
7903
  },
7899
7904
  error: reject,
7900
7905
  complete: function() {
7901
7906
  if (hasConfig) {
7902
- resolve8(config.defaultValue);
7907
+ resolve7(config.defaultValue);
7903
7908
  } else {
7904
7909
  reject(new EmptyError_1.EmptyError);
7905
7910
  }
@@ -13519,7 +13524,7 @@ init_constants();
13519
13524
  import { AsyncLocalStorage as AsyncLocalStorage3 } from "async_hooks";
13520
13525
  import { mkdir as mkdir2, symlink } from "fs/promises";
13521
13526
  import { tmpdir } from "os";
13522
- import { basename as basename4, dirname as dirname5, join as join6, resolve as resolve7 } from "path";
13527
+ import { basename as basename4, dirname as dirname5, join as join6, resolve as resolve6 } from "path";
13523
13528
 
13524
13529
  // src/core/islandPageContext.ts
13525
13530
  init_constants();
@@ -14357,6 +14362,7 @@ var runWithStreamingSlotWarningScope = (task, metadata) => ensureWarningStorage(
14357
14362
  // src/angular/pageHandler.ts
14358
14363
  init_ssrCache();
14359
14364
  init_ssrRender();
14365
+ init_resolveAngularPackage();
14360
14366
  var lastSelector = "angular-page";
14361
14367
  var isRecord5 = (value) => typeof value === "object" && value !== null;
14362
14368
  var isAngularComponent = (value) => typeof value === "function";
@@ -14378,19 +14384,19 @@ var resolvePageComponent = (pageModule) => {
14378
14384
  var compilerImportPromise = null;
14379
14385
  var ensureAngularCompiler = () => {
14380
14386
  if (!compilerImportPromise) {
14381
- compilerImportPromise = import("@angular/compiler");
14387
+ compilerImportPromise = import(resolveAngularPackage("@angular/compiler"));
14382
14388
  }
14383
14389
  return compilerImportPromise;
14384
14390
  };
14385
14391
  var readAngularPageModule = (value) => isRecord5(value) ? value : null;
14386
14392
  var resolveAngularSsrOutDir = () => process.env.ABSOLUTE_ANGULAR_SSR_OUTDIR ?? join6(tmpdir(), "absolutejs", "generated", "angular-ssr");
14387
14393
  var ensureAngularSsrNodeModules = async (outDir) => {
14388
- const outRoot = resolve7(dirname5(dirname5(outDir)));
14394
+ const outRoot = resolve6(dirname5(dirname5(outDir)));
14389
14395
  const nodeModulesLink = join6(outRoot, "node_modules");
14390
14396
  if (process.env.ABSOLUTE_ANGULAR_SSR_OUTDIR) {
14391
14397
  return;
14392
14398
  }
14393
- if (nodeModulesLink === resolve7(process.cwd(), "node_modules")) {
14399
+ if (nodeModulesLink === resolve6(process.cwd(), "node_modules")) {
14394
14400
  return;
14395
14401
  }
14396
14402
  if (await Bun.file(nodeModulesLink).exists()) {
@@ -14398,7 +14404,7 @@ var ensureAngularSsrNodeModules = async (outDir) => {
14398
14404
  }
14399
14405
  await mkdir2(outRoot, { recursive: true });
14400
14406
  try {
14401
- await symlink(resolve7(process.cwd(), "node_modules"), nodeModulesLink, "dir");
14407
+ await symlink(resolve6(process.cwd(), "node_modules"), nodeModulesLink, "dir");
14402
14408
  } catch (error) {
14403
14409
  if (!(error instanceof Error) || !("code" in error) || error.code !== "EEXIST") {
14404
14410
  throw error;
@@ -14931,5 +14937,5 @@ export {
14931
14937
  ABSOLUTE_HTTP_TRANSFER_CACHE_SKIP_HEADER
14932
14938
  };
14933
14939
 
14934
- //# debugId=FF5A9552060CA26464756E2164756E21
14940
+ //# debugId=9928FEB01477D94764756E2164756E21
14935
14941
  //# sourceMappingURL=index.js.map