@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}`));
@@ -4578,7 +4583,7 @@ init_constants();
4578
4583
  import { AsyncLocalStorage as AsyncLocalStorage3 } from "async_hooks";
4579
4584
  import { mkdir as mkdir2, symlink } from "fs/promises";
4580
4585
  import { tmpdir } from "os";
4581
- import { basename as basename4, dirname as dirname5, join as join6, resolve as resolve7 } from "path";
4586
+ import { basename as basename4, dirname as dirname5, join as join6, resolve as resolve6 } from "path";
4582
4587
 
4583
4588
  // src/core/islandPageContext.ts
4584
4589
  init_constants();
@@ -5416,6 +5421,7 @@ var runWithStreamingSlotWarningScope = (task, metadata) => ensureWarningStorage(
5416
5421
  // src/angular/pageHandler.ts
5417
5422
  init_ssrCache();
5418
5423
  init_ssrRender();
5424
+ init_resolveAngularPackage();
5419
5425
  var lastSelector = "angular-page";
5420
5426
  var isRecord5 = (value) => typeof value === "object" && value !== null;
5421
5427
  var isAngularComponent = (value) => typeof value === "function";
@@ -5437,19 +5443,19 @@ var resolvePageComponent = (pageModule) => {
5437
5443
  var compilerImportPromise = null;
5438
5444
  var ensureAngularCompiler = () => {
5439
5445
  if (!compilerImportPromise) {
5440
- compilerImportPromise = import("@angular/compiler");
5446
+ compilerImportPromise = import(resolveAngularPackage("@angular/compiler"));
5441
5447
  }
5442
5448
  return compilerImportPromise;
5443
5449
  };
5444
5450
  var readAngularPageModule = (value) => isRecord5(value) ? value : null;
5445
5451
  var resolveAngularSsrOutDir = () => process.env.ABSOLUTE_ANGULAR_SSR_OUTDIR ?? join6(tmpdir(), "absolutejs", "generated", "angular-ssr");
5446
5452
  var ensureAngularSsrNodeModules = async (outDir) => {
5447
- const outRoot = resolve7(dirname5(dirname5(outDir)));
5453
+ const outRoot = resolve6(dirname5(dirname5(outDir)));
5448
5454
  const nodeModulesLink = join6(outRoot, "node_modules");
5449
5455
  if (process.env.ABSOLUTE_ANGULAR_SSR_OUTDIR) {
5450
5456
  return;
5451
5457
  }
5452
- if (nodeModulesLink === resolve7(process.cwd(), "node_modules")) {
5458
+ if (nodeModulesLink === resolve6(process.cwd(), "node_modules")) {
5453
5459
  return;
5454
5460
  }
5455
5461
  if (await Bun.file(nodeModulesLink).exists()) {
@@ -5457,7 +5463,7 @@ var ensureAngularSsrNodeModules = async (outDir) => {
5457
5463
  }
5458
5464
  await mkdir2(outRoot, { recursive: true });
5459
5465
  try {
5460
- await symlink(resolve7(process.cwd(), "node_modules"), nodeModulesLink, "dir");
5466
+ await symlink(resolve6(process.cwd(), "node_modules"), nodeModulesLink, "dir");
5461
5467
  } catch (error) {
5462
5468
  if (!(error instanceof Error) || !("code" in error) || error.code !== "EEXIST") {
5463
5469
  throw error;
@@ -5607,5 +5613,5 @@ export {
5607
5613
  ABSOLUTE_HTTP_TRANSFER_CACHE_SKIP_HEADER
5608
5614
  };
5609
5615
 
5610
- //# debugId=1182DBD27B32BA4764756E2164756E21
5616
+ //# debugId=3F20F05F4AF33B7464756E2164756E21
5611
5617
  //# sourceMappingURL=server.js.map