@absolutejs/absolute 0.20.0-beta.147 → 0.20.0-beta.149

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.
package/dist/build.js CHANGED
@@ -18667,11 +18667,10 @@ var init_emitTsHelpers = __esm(() => {
18667
18667
  transpiler4 = new Transpiler3({ loader: "ts", target: "browser" });
18668
18668
  });
18669
18669
 
18670
- // src/build/compileVueSfc.ts
18671
- import { existsSync as existsSync28, readFileSync as readFileSync24, realpathSync as realpathSync2 } from "fs";
18672
- import { dirname as dirname20, relative as relative17, resolve as resolve28 } from "path";
18673
- var {Transpiler: Transpiler4 } = globalThis.Bun;
18674
- var transpiler5, inlineCssImports = (cssContent, cssFilePath, visited = new Set) => {
18670
+ // src/build/inlineCssImports.ts
18671
+ import { readFileSync as readFileSync24, realpathSync as realpathSync2 } from "fs";
18672
+ import { dirname as dirname20, resolve as resolve28 } from "path";
18673
+ var inlineCssImports = (cssContent, cssFilePath, visited = new Set) => {
18675
18674
  const resolved = realpathSync2(cssFilePath);
18676
18675
  if (visited.has(resolved))
18677
18676
  return "";
@@ -18684,22 +18683,31 @@ var transpiler5, inlineCssImports = (cssContent, cssFilePath, visited = new Set)
18684
18683
  const importedContent = readFileSync24(importedPath, "utf-8");
18685
18684
  return inlineCssImports(importedContent, importedPath, visited);
18686
18685
  });
18687
- }, toJs = (filePath, sourceDir) => {
18686
+ };
18687
+ var init_inlineCssImports = __esm(() => {
18688
+ init_isFile();
18689
+ });
18690
+
18691
+ // src/build/compileVueSfc.ts
18692
+ import { existsSync as existsSync28, readFileSync as readFileSync25, realpathSync as realpathSync3 } from "fs";
18693
+ import { dirname as dirname21, relative as relative17, resolve as resolve29 } from "path";
18694
+ var {Transpiler: Transpiler4 } = globalThis.Bun;
18695
+ var transpiler5, toJs = (filePath, sourceDir) => {
18688
18696
  if (filePath.endsWith(".vue"))
18689
18697
  return filePath.replace(/\.vue$/, ".js");
18690
18698
  if (filePath.endsWith(".ts"))
18691
18699
  return filePath.replace(/\.ts$/, ".js");
18692
18700
  if (isStylePath(filePath)) {
18693
18701
  if (sourceDir && (filePath.startsWith("./") || filePath.startsWith("../"))) {
18694
- return resolve28(sourceDir, filePath);
18702
+ return resolve29(sourceDir, filePath);
18695
18703
  }
18696
18704
  return filePath;
18697
18705
  }
18698
18706
  if (sourceDir && (filePath.startsWith("./") || filePath.startsWith("../"))) {
18699
- const directTs = resolve28(sourceDir, `${filePath}.ts`);
18707
+ const directTs = resolve29(sourceDir, `${filePath}.ts`);
18700
18708
  if (existsSync28(directTs))
18701
18709
  return `${filePath}.js`;
18702
- const indexedTs = resolve28(sourceDir, filePath, "index.ts");
18710
+ const indexedTs = resolve29(sourceDir, filePath, "index.ts");
18703
18711
  if (existsSync28(indexedTs))
18704
18712
  return `${filePath}/index.js`;
18705
18713
  }
@@ -18767,11 +18775,11 @@ const ${localName} = (source) => ${importedName}(
18767
18775
  const compiledScript = hasScript ? compiler.compileScript(descriptor, {
18768
18776
  fs: {
18769
18777
  fileExists: isFile,
18770
- realpath: realpathSync2,
18778
+ realpath: realpathSync3,
18771
18779
  readFile: (file) => {
18772
18780
  if (!isFile(file))
18773
18781
  return;
18774
- const content = readFileSync24(file, "utf-8");
18782
+ const content = readFileSync25(file, "utf-8");
18775
18783
  typeDepHashes[file] = hashContent(content);
18776
18784
  return content;
18777
18785
  }
@@ -18784,10 +18792,10 @@ const ${localName} = (source) => ${importedName}(
18784
18792
  for (const dep of typeDependencies) {
18785
18793
  if (dep in typeDepHashes || !existsSync28(dep))
18786
18794
  continue;
18787
- typeDepHashes[dep] = hashContent(readFileSync24(dep, "utf-8"));
18795
+ typeDepHashes[dep] = hashContent(readFileSync25(dep, "utf-8"));
18788
18796
  }
18789
18797
  const strippedScript = stripExports2(compiledScript.content);
18790
- const sourceDir = dirname20(sourceFilePath);
18798
+ const sourceDir = dirname21(sourceFilePath);
18791
18799
  const transpiledScript = rewriteRelativeImports(transpiler5.transformSync(strippedScript), sourceDir);
18792
18800
  const generateRenderFunction = (ssr) => {
18793
18801
  const rendered = compiler.compileTemplate({
@@ -18842,7 +18850,7 @@ if (typeof __VUE_HMR_RUNTIME__ !== 'undefined') {
18842
18850
  let result = code;
18843
18851
  for (const [bareImport, paths] of packageImportRewrites) {
18844
18852
  const targetPath = mode === "server" ? paths.server : paths.client;
18845
- let rel = relative17(dirname20(outputPath), targetPath).replace(/\\/g, "/");
18853
+ let rel = relative17(dirname21(outputPath), targetPath).replace(/\\/g, "/");
18846
18854
  if (!rel.startsWith("."))
18847
18855
  rel = `./${rel}`;
18848
18856
  result = result.replaceAll(bareImport, rel);
@@ -18877,6 +18885,7 @@ var init_compileVueSfc = __esm(() => {
18877
18885
  init_isFile();
18878
18886
  init_chainInlineSourcemaps();
18879
18887
  init_stylePreprocessor();
18888
+ init_inlineCssImports();
18880
18889
  init_vueCompileCache();
18881
18890
  transpiler5 = new Transpiler4({ loader: "ts", target: "browser" });
18882
18891
  });
@@ -18939,9 +18948,9 @@ var init_workerJobs = __esm(() => {
18939
18948
  });
18940
18949
 
18941
18950
  // src/build/workerPool.ts
18942
- import { existsSync as existsSync29, readFileSync as readFileSync25 } from "fs";
18951
+ import { existsSync as existsSync29, readFileSync as readFileSync26 } from "fs";
18943
18952
  import { availableParallelism, freemem } from "os";
18944
- import { dirname as dirname21, join as join38 } from "path";
18953
+ import { dirname as dirname22, join as join38 } from "path";
18945
18954
  import { pathToFileURL as pathToFileURL2 } from "url";
18946
18955
  var MIN_WORKERS = 2, MAX_DEFAULT_WORKERS = 8, MAX_OVERRIDE_WORKERS = 64, WORKER_MEMORY_BUDGET_BYTES, DEFAULT_IDLE_TIMEOUT_MS = 2000, DEFAULT_MIN_BATCH = 4, PACKAGE_WALK_DEPTH = 6, PERCENT = 100, OWN_PACKAGE_NAME = "@absolutejs/absolute", parseWorkerOverride = (raw) => {
18947
18956
  if (raw === undefined || raw.trim() === "")
@@ -18962,7 +18971,7 @@ var MIN_WORKERS = 2, MAX_DEFAULT_WORKERS = 8, MAX_OVERRIDE_WORKERS = 64, WORKER_
18962
18971
  if (!existsSync29(packageFile))
18963
18972
  return false;
18964
18973
  try {
18965
- const pkg = JSON.parse(readFileSync25(packageFile, "utf-8"));
18974
+ const pkg = JSON.parse(readFileSync26(packageFile, "utf-8"));
18966
18975
  return typeof pkg === "object" && pkg !== null && "name" in pkg && pkg.name === OWN_PACKAGE_NAME;
18967
18976
  } catch {
18968
18977
  return false;
@@ -18972,7 +18981,7 @@ var MIN_WORKERS = 2, MAX_DEFAULT_WORKERS = 8, MAX_OVERRIDE_WORKERS = 64, WORKER_
18972
18981
  for (let depth = 0;depth < PACKAGE_WALK_DEPTH; depth++) {
18973
18982
  if (isOwnPackageRoot(dir))
18974
18983
  return dir;
18975
- const parent = dirname21(dir);
18984
+ const parent = dirname22(dir);
18976
18985
  if (parent === dir)
18977
18986
  break;
18978
18987
  dir = parent;
@@ -19268,23 +19277,23 @@ import { existsSync as existsSync30 } from "fs";
19268
19277
  import { mkdir as mkdir9 } from "fs/promises";
19269
19278
  import {
19270
19279
  basename as basename14,
19271
- dirname as dirname22,
19280
+ dirname as dirname23,
19272
19281
  isAbsolute as isAbsolute7,
19273
19282
  join as join39,
19274
19283
  relative as relative18,
19275
- resolve as resolve29
19284
+ resolve as resolve30
19276
19285
  } from "path";
19277
19286
  var {file: file3, write: write4 } = globalThis.Bun;
19278
19287
  var resolveDevClientDir3 = () => {
19279
19288
  const projectRoot = process.cwd();
19280
- const fromSource = resolve29(import.meta.dir, "../dev/client");
19289
+ const fromSource = resolve30(import.meta.dir, "../dev/client");
19281
19290
  if (existsSync30(fromSource) && fromSource.startsWith(projectRoot)) {
19282
19291
  return fromSource;
19283
19292
  }
19284
- const fromNodeModules = resolve29(projectRoot, "node_modules/@absolutejs/absolute/dist/dev/client");
19293
+ const fromNodeModules = resolve30(projectRoot, "node_modules/@absolutejs/absolute/dist/dev/client");
19285
19294
  if (existsSync30(fromNodeModules))
19286
19295
  return fromNodeModules;
19287
- return resolve29(import.meta.dir, "./dev/client");
19296
+ return resolve30(import.meta.dir, "./dev/client");
19288
19297
  }, devClientDir3, hmrClientPath4, scriptCache, scriptSetupCache, templateCache, styleCache, persistentBuildCache, vueSourceHashCache, vueHmrMetadata, detectVueChangeType = (filePath, descriptor) => {
19289
19298
  const prevScript = scriptCache.get(filePath);
19290
19299
  const prevScriptSetup = scriptSetupCache.get(filePath);
@@ -19325,11 +19334,11 @@ var resolveDevClientDir3 = () => {
19325
19334
  return Array.from(new Set(found));
19326
19335
  }, resolveHelperTsPath = (sourceDir, helper) => {
19327
19336
  if (helper.endsWith(".ts"))
19328
- return resolve29(sourceDir, helper);
19329
- const direct = resolve29(sourceDir, `${helper}.ts`);
19337
+ return resolve30(sourceDir, helper);
19338
+ const direct = resolve30(sourceDir, `${helper}.ts`);
19330
19339
  if (existsSync30(direct))
19331
19340
  return direct;
19332
- const indexed = resolve29(sourceDir, helper, "index.ts");
19341
+ const indexed = resolve30(sourceDir, helper, "index.ts");
19333
19342
  if (existsSync30(indexed))
19334
19343
  return indexed;
19335
19344
  return direct;
@@ -19356,7 +19365,7 @@ var resolveDevClientDir3 = () => {
19356
19365
  if (!inline)
19357
19366
  pool.warm("vue-sfc");
19358
19367
  const runSfc = (input) => pool.run("vue-sfc", input, {
19359
- affinity: dirname22(input.sourceFilePath),
19368
+ affinity: dirname23(input.sourceFilePath),
19360
19369
  inline
19361
19370
  });
19362
19371
  return runSfc;
@@ -19418,9 +19427,9 @@ var resolveDevClientDir3 = () => {
19418
19427
  serverPath
19419
19428
  }) => {
19420
19429
  await Promise.all([
19421
- mkdir9(dirname22(clientPath), { recursive: true }),
19422
- mkdir9(dirname22(serverPath), { recursive: true }),
19423
- ...css ? [mkdir9(dirname22(css.path), { recursive: true })] : []
19430
+ mkdir9(dirname23(clientPath), { recursive: true }),
19431
+ mkdir9(dirname23(serverPath), { recursive: true }),
19432
+ ...css ? [mkdir9(dirname23(css.path), { recursive: true })] : []
19424
19433
  ]);
19425
19434
  await Promise.all([
19426
19435
  write4(clientPath, clientCode),
@@ -19489,12 +19498,12 @@ var resolveDevClientDir3 = () => {
19489
19498
  const childComponentPaths = importPaths.filter((path) => path.startsWith(".") && path.endsWith(".vue"));
19490
19499
  const packageComponentPaths = Array.from(resolvedPackageVueImports.entries());
19491
19500
  const helperModulePaths = importPaths.filter((path) => path.startsWith(".") && !path.endsWith(".vue") && !isStylePath(path));
19492
- const stylePathsImported = importPaths.filter((path) => (path.startsWith(".") || isAbsolute7(path)) && isStylePath(path)).map((path) => isAbsolute7(path) ? path : resolve29(dirname22(sourceFilePath), path));
19501
+ const stylePathsImported = importPaths.filter((path) => (path.startsWith(".") || isAbsolute7(path)) && isStylePath(path)).map((path) => isAbsolute7(path) ? path : resolve30(dirname23(sourceFilePath), path));
19493
19502
  for (const stylePath of stylePathsImported) {
19494
19503
  addStyleImporter(sourceFilePath, stylePath);
19495
19504
  }
19496
19505
  const childBuildResults = await Promise.all([
19497
- ...childComponentPaths.map((relativeChildPath) => compileVueFile(resolve29(dirname22(sourceFilePath), relativeChildPath), outputDirs, cacheMap, false, vueRootDir, compiler, runSfc, stylePreprocessors)),
19506
+ ...childComponentPaths.map((relativeChildPath) => compileVueFile(resolve30(dirname23(sourceFilePath), relativeChildPath), outputDirs, cacheMap, false, vueRootDir, compiler, runSfc, stylePreprocessors)),
19498
19507
  ...packageComponentPaths.map(([, absolutePath]) => compileVueFile(absolutePath, outputDirs, cacheMap, false, vueRootDir, compiler, runSfc, stylePreprocessors))
19499
19508
  ]);
19500
19509
  const cacheKeyStartedAt = performance.now();
@@ -19563,7 +19572,7 @@ var resolveDevClientDir3 = () => {
19563
19572
  serverPath: serverOutputPath,
19564
19573
  spaRoutes: spaRoutes.length > 0 ? spaRoutes : undefined,
19565
19574
  tsHelperPaths: [
19566
- ...helperModulePaths.map((helper) => resolveHelperTsPath(dirname22(sourceFilePath), helper)),
19575
+ ...helperModulePaths.map((helper) => resolveHelperTsPath(dirname23(sourceFilePath), helper)),
19567
19576
  ...childBuildResults.flatMap((child) => child.tsHelperPaths)
19568
19577
  ]
19569
19578
  };
@@ -19602,7 +19611,7 @@ var resolveDevClientDir3 = () => {
19602
19611
  const buildCache = new Map;
19603
19612
  const allTsHelperPaths = new Set;
19604
19613
  const expandSpaRouteChildren = async (entries) => {
19605
- const expanded = new Set(entries.map((entry) => resolve29(entry)));
19614
+ const expanded = new Set(entries.map((entry) => resolve30(entry)));
19606
19615
  const queue = [...expanded];
19607
19616
  while (queue.length > 0) {
19608
19617
  const entryPath = queue.pop();
@@ -19619,7 +19628,7 @@ var resolveDevClientDir3 = () => {
19619
19628
  });
19620
19629
  const routes = parseVueSpaRoutes(descriptor.script?.content ?? "");
19621
19630
  for (const { importPath } of routes) {
19622
- const childPath = resolve29(dirname22(entryPath), importPath);
19631
+ const childPath = resolve30(dirname23(entryPath), importPath);
19623
19632
  if (expanded.has(childPath) || !existsSync30(childPath)) {
19624
19633
  continue;
19625
19634
  }
@@ -19634,7 +19643,7 @@ var resolveDevClientDir3 = () => {
19634
19643
  vueCompileProfile.stageExpandMs = performance.now() - stageStartedAt;
19635
19644
  stageStartedAt = performance.now();
19636
19645
  const compiledPages = await Promise.all(expandedEntryPoints.map(async (entryPath) => {
19637
- const resolvedEntryPath = resolve29(entryPath);
19646
+ const resolvedEntryPath = resolve30(entryPath);
19638
19647
  const result = await compileVueFile(resolvedEntryPath, {
19639
19648
  client: clientOutputDir,
19640
19649
  css: cssOutputDir,
@@ -19654,14 +19663,14 @@ var resolveDevClientDir3 = () => {
19654
19663
  const entryBaseName = basename14(entryPath, ".vue");
19655
19664
  const indexOutputFile = join39(indexOutputDir, `${entryBaseName}.js`);
19656
19665
  const clientOutputFile = result.clientPath;
19657
- await mkdir9(dirname22(indexOutputFile), { recursive: true });
19666
+ await mkdir9(dirname23(indexOutputFile), { recursive: true });
19658
19667
  const vueHmrImports = isDev ? [
19659
19668
  `window.__HMR_FRAMEWORK__ = "vue";`,
19660
19669
  `import "${hmrClientPath4}";`
19661
19670
  ] : [];
19662
19671
  await write4(indexOutputFile, [
19663
19672
  ...vueHmrImports,
19664
- `import Comp, * as PageModule from "${relative18(dirname22(indexOutputFile), clientOutputFile).replace(/\\/g, "/")}";`,
19673
+ `import Comp, * as PageModule from "${relative18(dirname23(indexOutputFile), clientOutputFile).replace(/\\/g, "/")}";`,
19665
19674
  'import { createSSRApp, createApp } from "vue";',
19666
19675
  'import { prepareBrowserTranslationHydration } from "@absolutejs/absolute/vue";',
19667
19676
  "",
@@ -19827,7 +19836,7 @@ var resolveDevClientDir3 = () => {
19827
19836
  }));
19828
19837
  vueCompileProfile.stagePagesMs = performance.now() - stageStartedAt;
19829
19838
  stageStartedAt = performance.now();
19830
- const helperDependencies = (tsPath, sourceCode) => extractImports(sourceCode).filter((dep) => dep.startsWith(".") && !isStylePath(dep) && !dep.endsWith(".vue")).map((dep) => resolveHelperTsPath(dirname22(tsPath), dep)).filter((resolved) => existsSync30(resolved) && !allTsHelperPaths.has(resolved));
19839
+ const helperDependencies = (tsPath, sourceCode) => extractImports(sourceCode).filter((dep) => dep.startsWith(".") && !isStylePath(dep) && !dep.endsWith(".vue")).map((dep) => resolveHelperTsPath(dirname23(tsPath), dep)).filter((resolved) => existsSync30(resolved) && !allTsHelperPaths.has(resolved));
19831
19840
  const readHelperWave = (paths) => Promise.all(paths.map((tsPath) => file3(tsPath).text().then((sourceCode) => helperDependencies(tsPath, sourceCode)).catch(() => [])));
19832
19841
  const expandHelpers = async (frontier) => {
19833
19842
  if (frontier.length === 0)
@@ -20397,8 +20406,8 @@ __export(exports_compileAngular, {
20397
20406
  compileAngularFileJIT: () => compileAngularFileJIT,
20398
20407
  invalidateAngularJitCache: () => invalidateAngularJitCache
20399
20408
  });
20400
- import { existsSync as existsSync31, readFileSync as readFileSync26, promises as fs5 } from "fs";
20401
- import { join as join40, basename as basename15, sep as sep5, dirname as dirname23, resolve as resolve30, relative as relative19 } from "path";
20409
+ import { existsSync as existsSync31, readFileSync as readFileSync27, promises as fs5 } from "fs";
20410
+ import { join as join40, basename as basename15, sep as sep5, dirname as dirname24, resolve as resolve31, relative as relative19 } from "path";
20402
20411
  var {Glob: Glob6 } = globalThis.Bun;
20403
20412
  import ts18 from "typescript";
20404
20413
  var atomicWriteSequence = 0, writeTextFileAtomically = async (path, content) => {
@@ -20414,10 +20423,10 @@ var atomicWriteSequence = 0, writeTextFileAtomically = async (path, content) =>
20414
20423
  return tracePhase ? tracePhase(`compile/angular/${name}`, fn, metadata) : await fn();
20415
20424
  }, readTsconfigPathAliases = () => {
20416
20425
  try {
20417
- const configPath = resolve30(process.cwd(), "tsconfig.json");
20426
+ const configPath = resolve31(process.cwd(), "tsconfig.json");
20418
20427
  const config = ts18.readConfigFile(configPath, ts18.sys.readFile).config;
20419
20428
  const compilerOptions = config?.compilerOptions ?? {};
20420
- const baseUrl = resolve30(process.cwd(), compilerOptions.baseUrl ?? ".");
20429
+ const baseUrl = resolve31(process.cwd(), compilerOptions.baseUrl ?? ".");
20421
20430
  const aliases = Object.entries(compilerOptions.paths ?? {}).map(([pattern, replacements]) => ({ pattern, replacements }));
20422
20431
  return { aliases, baseUrl };
20423
20432
  } catch {
@@ -20437,7 +20446,7 @@ var atomicWriteSequence = 0, writeTextFileAtomically = async (path, content) =>
20437
20446
  const wildcardValue = exactMatch ? "" : specifier.slice(prefix.length, specifier.length - suffix.length);
20438
20447
  for (const replacement of alias.replacements) {
20439
20448
  const candidate = replacement.replace("*", wildcardValue);
20440
- const resolved = resolveSourceFile(resolve30(baseUrl, candidate));
20449
+ const resolved = resolveSourceFile(resolve31(baseUrl, candidate));
20441
20450
  if (resolved)
20442
20451
  return resolved;
20443
20452
  }
@@ -20456,13 +20465,13 @@ var atomicWriteSequence = 0, writeTextFileAtomically = async (path, content) =>
20456
20465
  ];
20457
20466
  return candidates.find((file) => existsSync31(file));
20458
20467
  }, createLegacyAngularAnimationUsageResolver = (rootDir) => {
20459
- const baseDir = resolve30(rootDir);
20468
+ const baseDir = resolve31(rootDir);
20460
20469
  const tsconfigAliases = readTsconfigPathAliases();
20461
20470
  const transpiler = new Bun.Transpiler({ loader: "tsx" });
20462
20471
  const scanCache = new Map;
20463
20472
  const resolveLocalImport = (specifier, fromDir) => {
20464
20473
  if (specifier.startsWith(".") || specifier.startsWith("/")) {
20465
- return resolveSourceFile(resolve30(fromDir, specifier));
20474
+ return resolveSourceFile(resolve31(fromDir, specifier));
20466
20475
  }
20467
20476
  const aliased = matchTsconfigAlias(specifier, tsconfigAliases.aliases, tsconfigAliases.baseUrl, resolveSourceFile);
20468
20477
  if (aliased)
@@ -20471,7 +20480,7 @@ var atomicWriteSequence = 0, writeTextFileAtomically = async (path, content) =>
20471
20480
  const resolved = Bun.resolveSync(specifier, fromDir);
20472
20481
  if (resolved.includes("/node_modules/"))
20473
20482
  return;
20474
- const absolute = resolve30(resolved);
20483
+ const absolute = resolve31(resolved);
20475
20484
  if (!absolute.startsWith(baseDir))
20476
20485
  return;
20477
20486
  return resolveSourceFile(absolute);
@@ -20487,7 +20496,7 @@ var atomicWriteSequence = 0, writeTextFileAtomically = async (path, content) =>
20487
20496
  usesLegacyAnimations: false
20488
20497
  });
20489
20498
  }
20490
- const resolved = resolve30(actualPath);
20499
+ const resolved = resolve31(actualPath);
20491
20500
  const cached = scanCache.get(resolved);
20492
20501
  if (cached)
20493
20502
  return cached;
@@ -20516,7 +20525,7 @@ var atomicWriteSequence = 0, writeTextFileAtomically = async (path, content) =>
20516
20525
  const actualPath = resolveSourceFile(filePath);
20517
20526
  if (!actualPath)
20518
20527
  return false;
20519
- const resolved = resolve30(actualPath);
20528
+ const resolved = resolve31(actualPath);
20520
20529
  if (visited.has(resolved))
20521
20530
  return false;
20522
20531
  visited.add(resolved);
@@ -20524,7 +20533,7 @@ var atomicWriteSequence = 0, writeTextFileAtomically = async (path, content) =>
20524
20533
  if (scan.usesLegacyAnimations)
20525
20534
  return true;
20526
20535
  for (const specifier of scan.imports) {
20527
- const importedPath = resolveLocalImport(specifier, dirname23(resolved));
20536
+ const importedPath = resolveLocalImport(specifier, dirname24(resolved));
20528
20537
  if (importedPath && await visit(importedPath, visited)) {
20529
20538
  return true;
20530
20539
  }
@@ -20534,14 +20543,14 @@ var atomicWriteSequence = 0, writeTextFileAtomically = async (path, content) =>
20534
20543
  return (entryPath) => visit(entryPath);
20535
20544
  }, resolveDevClientDir4 = () => {
20536
20545
  const projectRoot = process.cwd();
20537
- const fromSource = resolve30(import.meta.dir, "../dev/client");
20546
+ const fromSource = resolve31(import.meta.dir, "../dev/client");
20538
20547
  if (existsSync31(fromSource) && fromSource.startsWith(projectRoot)) {
20539
20548
  return fromSource;
20540
20549
  }
20541
- const fromNodeModules = resolve30(projectRoot, "node_modules/@absolutejs/absolute/dist/dev/client");
20550
+ const fromNodeModules = resolve31(projectRoot, "node_modules/@absolutejs/absolute/dist/dev/client");
20542
20551
  if (existsSync31(fromNodeModules))
20543
20552
  return fromNodeModules;
20544
- return resolve30(import.meta.dir, "./dev/client");
20553
+ return resolve31(import.meta.dir, "./dev/client");
20545
20554
  }, devClientDir4, hmrClientPath5, formatDiagnosticMessage = (diagnostic) => {
20546
20555
  try {
20547
20556
  return ts18.flattenDiagnosticMessageText(diagnostic.messageText, `
@@ -20583,12 +20592,12 @@ var atomicWriteSequence = 0, writeTextFileAtomically = async (path, content) =>
20583
20592
  return `${path.replace(/\.ts$/, ".js")}${query}`;
20584
20593
  if (hasJsLikeExtension(path))
20585
20594
  return `${path}${query}`;
20586
- const importerDir = dirname23(importerOutputPath);
20587
- const fileCandidate = resolve30(importerDir, `${path}.js`);
20595
+ const importerDir = dirname24(importerOutputPath);
20596
+ const fileCandidate = resolve31(importerDir, `${path}.js`);
20588
20597
  if (outputFiles?.has(fileCandidate) || existsSync31(fileCandidate)) {
20589
20598
  return `${path}.js${query}`;
20590
20599
  }
20591
- const indexCandidate = resolve30(importerDir, path, "index.js");
20600
+ const indexCandidate = resolve31(importerDir, path, "index.js");
20592
20601
  if (outputFiles?.has(indexCandidate) || existsSync31(indexCandidate)) {
20593
20602
  return `${path}/index.js${query}`;
20594
20603
  }
@@ -20616,7 +20625,7 @@ var atomicWriteSequence = 0, writeTextFileAtomically = async (path, content) =>
20616
20625
  }, resolveLocalTsImport = (fromFile, specifier) => {
20617
20626
  if (!isRelativeModuleSpecifier(specifier))
20618
20627
  return null;
20619
- const basePath = resolve30(dirname23(fromFile), specifier);
20628
+ const basePath = resolve31(dirname24(fromFile), specifier);
20620
20629
  const candidates = /\.[cm]?[tj]sx?$/.test(basePath) ? [basePath] : [
20621
20630
  `${basePath}.ts`,
20622
20631
  `${basePath}.tsx`,
@@ -20627,7 +20636,7 @@ var atomicWriteSequence = 0, writeTextFileAtomically = async (path, content) =>
20627
20636
  join40(basePath, "index.mts"),
20628
20637
  join40(basePath, "index.cts")
20629
20638
  ];
20630
- return candidates.map((candidate) => resolve30(candidate)).find((candidate) => existsSync31(candidate) && !candidate.endsWith(".d.ts")) ?? null;
20639
+ return candidates.map((candidate) => resolve31(candidate)).find((candidate) => existsSync31(candidate) && !candidate.endsWith(".d.ts")) ?? null;
20631
20640
  }, readFileForAotTransform = async (fileName, readFile) => {
20632
20641
  const hostSource = readFile?.(fileName);
20633
20642
  if (typeof hostSource === "string")
@@ -20662,7 +20671,7 @@ var atomicWriteSequence = 0, writeTextFileAtomically = async (path, content) =>
20662
20671
  paths.push(join40(fileDir, urlMatch.replace(/['"]/g, "")));
20663
20672
  }
20664
20673
  }
20665
- return paths.map((path) => resolve30(path));
20674
+ return paths.map((path) => resolve31(path));
20666
20675
  }, readResourceCacheFile = async (cachePath) => {
20667
20676
  try {
20668
20677
  const entry = JSON.parse(await fs5.readFile(cachePath, "utf-8"));
@@ -20674,13 +20683,13 @@ var atomicWriteSequence = 0, writeTextFileAtomically = async (path, content) =>
20674
20683
  return null;
20675
20684
  }
20676
20685
  }, writeResourceCacheFile = async (cachePath, source) => {
20677
- await fs5.mkdir(dirname23(cachePath), { recursive: true });
20686
+ await fs5.mkdir(dirname24(cachePath), { recursive: true });
20678
20687
  await writeTextFileAtomically(cachePath, JSON.stringify({
20679
20688
  source,
20680
20689
  version: 1
20681
20690
  }));
20682
20691
  }, resolveResourceTransformCachePath = async (filePath, source, stylePreprocessors) => {
20683
- const resourcePaths = collectAngularResourcePaths(source, dirname23(filePath));
20692
+ const resourcePaths = collectAngularResourcePaths(source, dirname24(filePath));
20684
20693
  const resourceContents = await Promise.all(resourcePaths.map(async (resourcePath) => {
20685
20694
  const content = await fs5.readFile(resourcePath, "utf-8");
20686
20695
  return `${resourcePath}\x00${content}`;
@@ -20704,7 +20713,7 @@ var atomicWriteSequence = 0, writeTextFileAtomically = async (path, content) =>
20704
20713
  transformedFiles: 0
20705
20714
  };
20706
20715
  const transformFile = async (filePath) => {
20707
- const resolvedPath = resolve30(filePath);
20716
+ const resolvedPath = resolve31(filePath);
20708
20717
  if (visited.has(resolvedPath))
20709
20718
  return;
20710
20719
  visited.add(resolvedPath);
@@ -20720,7 +20729,7 @@ var atomicWriteSequence = 0, writeTextFileAtomically = async (path, content) =>
20720
20729
  transformedSource = cached.source;
20721
20730
  } else {
20722
20731
  stats.cacheMisses += 1;
20723
- const transformed = await inlineResources(source, dirname23(resolvedPath), stylePreprocessors);
20732
+ const transformed = await inlineResources(source, dirname24(resolvedPath), stylePreprocessors);
20724
20733
  transformedSource = transformed.source;
20725
20734
  await writeResourceCacheFile(cachePath, transformedSource);
20726
20735
  }
@@ -20739,18 +20748,18 @@ var atomicWriteSequence = 0, writeTextFileAtomically = async (path, content) =>
20739
20748
  return { stats, transformedSources };
20740
20749
  }, compileAngularFiles = async (inputPaths, outDir, stylePreprocessors) => {
20741
20750
  const islandMetadataByOutputPath = await traceAngularPhase("aot/island-metadata", () => new Map(inputPaths.map((inputPath) => {
20742
- const outputPath = resolve30(join40(outDir, relative19(process.cwd(), resolve30(inputPath)).replace(/\.[cm]?[tj]sx?$/, ".js")));
20751
+ const outputPath = resolve31(join40(outDir, relative19(process.cwd(), resolve31(inputPath)).replace(/\.[cm]?[tj]sx?$/, ".js")));
20743
20752
  return [
20744
20753
  outputPath,
20745
- buildIslandMetadataExports(readFileSync26(inputPath, "utf-8"))
20754
+ buildIslandMetadataExports(readFileSync27(inputPath, "utf-8"))
20746
20755
  ];
20747
20756
  })), { entries: inputPaths.length });
20748
20757
  await traceAngularPhase("aot/preload-compiler", () => import("@angular/compiler"));
20749
20758
  const { readConfiguration, performCompilation, EmitFlags } = await traceAngularPhase("aot/import-compiler-cli", () => import("@angular/compiler-cli"));
20750
20759
  const tsLibDir = await traceAngularPhase("aot/resolve-typescript-lib", () => {
20751
20760
  const tsPath = __require.resolve("typescript");
20752
- const tsRootDir = dirname23(tsPath);
20753
- return tsRootDir.endsWith("lib") ? tsRootDir : resolve30(tsRootDir, "lib");
20761
+ const tsRootDir = dirname24(tsPath);
20762
+ return tsRootDir.endsWith("lib") ? tsRootDir : resolve31(tsRootDir, "lib");
20754
20763
  });
20755
20764
  const config = await traceAngularPhase("aot/read-configuration", () => readConfiguration("./tsconfig.json"));
20756
20765
  const options = {
@@ -20792,7 +20801,7 @@ var atomicWriteSequence = 0, writeTextFileAtomically = async (path, content) =>
20792
20801
  return originalGetSourceFile?.call(host, fileName, languageVersion, onError);
20793
20802
  };
20794
20803
  const emitted = {};
20795
- const resolvedOutDir = resolve30(outDir);
20804
+ const resolvedOutDir = resolve31(outDir);
20796
20805
  host.writeFile = (fileName, text) => {
20797
20806
  const relativePath = resolveRelativePath(fileName, resolvedOutDir, outDir);
20798
20807
  emitted[relativePath] = text;
@@ -20814,12 +20823,12 @@ var atomicWriteSequence = 0, writeTextFileAtomically = async (path, content) =>
20814
20823
  if (!fileName.endsWith(".ts") || fileName.endsWith(".d.ts")) {
20815
20824
  return source;
20816
20825
  }
20817
- const resolvedPath = resolve30(fileName);
20826
+ const resolvedPath = resolve31(fileName);
20818
20827
  return transformedSources.get(resolvedPath) ?? source;
20819
20828
  };
20820
20829
  const originalGetSourceFileForCompile = host.getSourceFile;
20821
20830
  host.getSourceFile = (fileName, languageVersion, onError) => {
20822
- const source = transformedSources.get(resolve30(fileName));
20831
+ const source = transformedSources.get(resolve31(fileName));
20823
20832
  if (source) {
20824
20833
  return ts18.createSourceFile(fileName, source, languageVersion, true);
20825
20834
  }
@@ -20843,7 +20852,7 @@ var atomicWriteSequence = 0, writeTextFileAtomically = async (path, content) =>
20843
20852
  content,
20844
20853
  target: join40(outDir, fileName)
20845
20854
  }));
20846
- const outputFiles = new Set(rawEntries.map(({ target }) => resolve30(target)));
20855
+ const outputFiles = new Set(rawEntries.map(({ target }) => resolve31(target)));
20847
20856
  return rawEntries.map(({ content, target }) => {
20848
20857
  let processedContent = content.replace(/from\s+(['"])(\.\.?\/[^'"]+)(\1)/g, (match, quote, path) => {
20849
20858
  const rewritten = rewriteRelativeJsSpecifier(target, path, outputFiles);
@@ -20858,17 +20867,17 @@ var atomicWriteSequence = 0, writeTextFileAtomically = async (path, content) =>
20858
20867
  return cleaned ? `import { ${cleaned}, InternalInjectFlags } from '@angular/core'` : `import { InternalInjectFlags } from '@angular/core'`;
20859
20868
  });
20860
20869
  processedContent = processedContent.replace(/\b(?<!Internal)InjectFlags\b/g, "InternalInjectFlags");
20861
- processedContent += islandMetadataByOutputPath.get(resolve30(target)) ?? "";
20870
+ processedContent += islandMetadataByOutputPath.get(resolve31(target)) ?? "";
20862
20871
  return { content: processedContent, target };
20863
20872
  });
20864
20873
  });
20865
20874
  await traceAngularPhase("aot/write-output", () => Promise.all(entries.map(async ({ target, content }) => {
20866
- await fs5.mkdir(dirname23(target), { recursive: true });
20875
+ await fs5.mkdir(dirname24(target), { recursive: true });
20867
20876
  await writeTextFileAtomically(target, content);
20868
20877
  })), { outputs: entries.length });
20869
20878
  return await traceAngularPhase("aot/collect-output-paths", () => entries.map(({ target }) => target), { outputs: entries.length });
20870
20879
  }, jitContentCache, invalidateAngularJitCache = (filePath) => {
20871
- jitContentCache.delete(resolve30(filePath));
20880
+ jitContentCache.delete(resolve31(filePath));
20872
20881
  }, wrapperOutputCache, escapeTemplateContent = (content) => content.replace(/\\/g, "\\\\").replace(/`/g, "\\`").replace(/\$\{/g, "\\${"), findUncommentedMatch = (source, pattern) => {
20873
20882
  const re = new RegExp(pattern.source, pattern.flags.includes("g") ? pattern.flags : pattern.flags + "g");
20874
20883
  let match;
@@ -20881,7 +20890,7 @@ var atomicWriteSequence = 0, writeTextFileAtomically = async (path, content) =>
20881
20890
  }
20882
20891
  return null;
20883
20892
  }, resolveAngularDeferImportSpecifier = () => {
20884
- const sourceEntry = resolve30(import.meta.dir, "../angular/components/index.ts");
20893
+ const sourceEntry = resolve31(import.meta.dir, "../angular/components/index.ts");
20885
20894
  if (existsSync31(sourceEntry)) {
20886
20895
  return sourceEntry.replace(/\\/g, "/");
20887
20896
  }
@@ -21053,7 +21062,7 @@ ${fields}
21053
21062
  if (!existsSync31(templatePath)) {
21054
21063
  throw new Error(`Unable to inline Angular templateUrl "${templateUrlMatch[1]}": file not found at ${templatePath}`);
21055
21064
  }
21056
- const templateRaw = readFileSync26(templatePath, "utf-8");
21065
+ const templateRaw = readFileSync27(templatePath, "utf-8");
21057
21066
  const lowered = lowerAngularDeferSyntax(templateRaw);
21058
21067
  const escaped = escapeTemplateContent(lowered.template);
21059
21068
  const replacedSource = source.slice(0, templateUrlMatch.index) + `template: \`${escaped}\`` + source.slice(templateUrlMatch.index + templateUrlMatch[0].length);
@@ -21171,10 +21180,10 @@ ${fields}
21171
21180
  return "";
21172
21181
  }
21173
21182
  }, compileAngularFileJIT = async (inputPath, outDir, rootDir, stylePreprocessors, cacheBuster) => {
21174
- const entryPath = resolve30(inputPath);
21183
+ const entryPath = resolve31(inputPath);
21175
21184
  const allOutputs = [];
21176
21185
  const visited = new Set;
21177
- const baseDir = resolve30(rootDir ?? process.cwd());
21186
+ const baseDir = resolve31(rootDir ?? process.cwd());
21178
21187
  let usesLegacyAnimations = false;
21179
21188
  const angularTranspiler = new Bun.Transpiler({
21180
21189
  loader: "ts",
@@ -21202,7 +21211,7 @@ ${fields}
21202
21211
  };
21203
21212
  const resolveLocalImport = (specifier, fromDir) => {
21204
21213
  if (specifier.startsWith(".") || specifier.startsWith("/")) {
21205
- return resolveSourceFile(resolve30(fromDir, specifier));
21214
+ return resolveSourceFile(resolve31(fromDir, specifier));
21206
21215
  }
21207
21216
  const aliased = matchTsconfigAlias(specifier, tsconfigAliases.aliases, tsconfigAliases.baseUrl, resolveSourceFile);
21208
21217
  if (aliased)
@@ -21211,7 +21220,7 @@ ${fields}
21211
21220
  const resolved = Bun.resolveSync(specifier, fromDir);
21212
21221
  if (resolved.includes("/node_modules/"))
21213
21222
  return;
21214
- const absolute = resolve30(resolved);
21223
+ const absolute = resolve31(resolved);
21215
21224
  if (!absolute.startsWith(baseDir))
21216
21225
  return;
21217
21226
  return resolveSourceFile(absolute);
@@ -21220,7 +21229,7 @@ ${fields}
21220
21229
  }
21221
21230
  };
21222
21231
  const toOutputPath = (sourcePath) => {
21223
- const inputDir = dirname23(sourcePath);
21232
+ const inputDir = dirname24(sourcePath);
21224
21233
  const fileBase = basename15(sourcePath).replace(/\.[cm]?[tj]sx?$/, ".js");
21225
21234
  if (inputDir === outDir || inputDir.startsWith(`${outDir}${sep5}`)) {
21226
21235
  return join40(inputDir, fileBase);
@@ -21263,18 +21272,18 @@ ${fields}
21263
21272
  return `${prefix}${dots}`;
21264
21273
  return `${prefix}../${dots}`;
21265
21274
  });
21266
- if (resolve30(actualPath) === entryPath) {
21275
+ if (resolve31(actualPath) === entryPath) {
21267
21276
  processedContent += buildIslandMetadataExports(sourceCode);
21268
21277
  }
21269
21278
  return processedContent;
21270
21279
  };
21271
21280
  const transpileFile = async (filePath) => {
21272
- const resolved = resolve30(filePath);
21281
+ const resolved = resolve31(filePath);
21273
21282
  if (visited.has(resolved))
21274
21283
  return;
21275
21284
  visited.add(resolved);
21276
21285
  if (resolved.endsWith(".json") && existsSync31(resolved)) {
21277
- const inputDir = dirname23(resolved);
21286
+ const inputDir = dirname24(resolved);
21278
21287
  const relativeDir = inputDir.startsWith(baseDir) ? inputDir.substring(baseDir.length + 1) : inputDir;
21279
21288
  const targetDir = join40(outDir, relativeDir);
21280
21289
  const targetPath = join40(targetDir, basename15(resolved));
@@ -21289,12 +21298,12 @@ ${fields}
21289
21298
  if (!existsSync31(actualPath))
21290
21299
  return;
21291
21300
  let sourceCode = await fs5.readFile(actualPath, "utf-8");
21292
- const inlined = await inlineResources(sourceCode, dirname23(actualPath), stylePreprocessors);
21293
- sourceCode = inlineTemplateAndLowerDeferSync(inlined.source, dirname23(actualPath)).source;
21294
- const inputDir = dirname23(actualPath);
21301
+ const inlined = await inlineResources(sourceCode, dirname24(actualPath), stylePreprocessors);
21302
+ sourceCode = inlineTemplateAndLowerDeferSync(inlined.source, dirname24(actualPath)).source;
21303
+ const inputDir = dirname24(actualPath);
21295
21304
  const fileBase = basename15(actualPath).replace(/\.[cm]?[tj]sx?$/, ".js");
21296
21305
  const targetPath = toOutputPath(actualPath);
21297
- const targetDir = dirname23(targetPath);
21306
+ const targetDir = dirname24(targetPath);
21298
21307
  const relativeDir = relative19(outDir, targetDir).replace(/\\/g, "/");
21299
21308
  const localImports = [];
21300
21309
  const importRewrites = new Map;
@@ -21321,7 +21330,7 @@ ${fields}
21321
21330
  importRewrites.set(specifier, relativeRewrite);
21322
21331
  return resolved;
21323
21332
  }).filter((path) => Boolean(path));
21324
- const isEntry = resolve30(actualPath) === resolve30(entryPath);
21333
+ const isEntry = resolve31(actualPath) === resolve31(entryPath);
21325
21334
  const contentHash = Bun.hash(sourceCode).toString(BASE_36_RADIX);
21326
21335
  const cacheKey = actualPath;
21327
21336
  const shouldWriteFile = cacheBuster && isEntry ? true : jitContentCache.get(cacheKey) !== contentHash || !existsSync31(targetPath);
@@ -21358,11 +21367,11 @@ export const __ABSOLUTE_PAGE_USES_LEGACY_ANIMATIONS__ = true;
21358
21367
  const compiledRoot = compiledParent;
21359
21368
  const indexesDir = join40(compiledParent, "indexes");
21360
21369
  await traceAngularPhase("setup/create-indexes-dir", () => fs5.mkdir(indexesDir, { recursive: true }));
21361
- const aotOutputs = hmr ? [] : await traceAngularPhase("aot/compile-files", () => compileAngularFiles(entryPoints.map((entry) => resolve30(entry)), compiledRoot, stylePreprocessors), { entries: entryPoints.length });
21370
+ const aotOutputs = hmr ? [] : await traceAngularPhase("aot/compile-files", () => compileAngularFiles(entryPoints.map((entry) => resolve31(entry)), compiledRoot, stylePreprocessors), { entries: entryPoints.length });
21362
21371
  if (!hmr) {
21363
21372
  await traceAngularPhase("aot/copy-json-resources", async () => {
21364
21373
  const cwd = process.cwd();
21365
- const angularSrcDir = resolve30(outRoot);
21374
+ const angularSrcDir = resolve31(outRoot);
21366
21375
  if (!existsSync31(angularSrcDir))
21367
21376
  return;
21368
21377
  const jsonGlob = new Glob6("**/*.json");
@@ -21373,14 +21382,14 @@ export const __ABSOLUTE_PAGE_USES_LEGACY_ANIMATIONS__ = true;
21373
21382
  const sourcePath = join40(angularSrcDir, rel);
21374
21383
  const cwdRel = relative19(cwd, sourcePath);
21375
21384
  const targetPath = join40(compiledRoot, cwdRel);
21376
- await fs5.mkdir(dirname23(targetPath), { recursive: true });
21385
+ await fs5.mkdir(dirname24(targetPath), { recursive: true });
21377
21386
  await fs5.copyFile(sourcePath, targetPath);
21378
21387
  }
21379
21388
  });
21380
21389
  }
21381
21390
  const usesLegacyAngularAnimations = await traceAngularPhase("setup/legacy-animation-resolver", () => createLegacyAngularAnimationUsageResolver(outRoot));
21382
21391
  const compileTasks = entryPoints.map(async (entry) => {
21383
- const resolvedEntry = resolve30(entry);
21392
+ const resolvedEntry = resolve31(entry);
21384
21393
  const relativeEntry = relative19(outRoot, resolvedEntry).replace(/\.[tj]s$/, ".js");
21385
21394
  const compileEntry = () => compileAngularFileJIT(resolvedEntry, compiledRoot, outRoot, stylePreprocessors);
21386
21395
  let outputs = hmr ? await traceAngularPhase("jit/compile-entry", compileEntry, {
@@ -21392,10 +21401,10 @@ export const __ABSOLUTE_PAGE_USES_LEGACY_ANIMATIONS__ = true;
21392
21401
  join40(compiledRoot, relativeEntry),
21393
21402
  join40(compiledRoot, "pages", jsName),
21394
21403
  join40(compiledRoot, jsName)
21395
- ].map((file) => resolve30(file));
21404
+ ].map((file) => resolve31(file));
21396
21405
  const resolveRawServerFile = (candidatePaths) => {
21397
21406
  const normalizedCandidates = [
21398
- ...candidatePaths.map((file) => resolve30(file)),
21407
+ ...candidatePaths.map((file) => resolve31(file)),
21399
21408
  ...compiledFallbackPaths
21400
21409
  ];
21401
21410
  let candidate = normalizedCandidates.find((file) => existsSync31(file) && file.endsWith(`${sep5}${relativeEntry}`));
@@ -21442,7 +21451,7 @@ export const __ABSOLUTE_PAGE_USES_LEGACY_ANIMATIONS__ = true;
21442
21451
  let providersSourceContent = "";
21443
21452
  if (providersInjection.appProvidersSource) {
21444
21453
  try {
21445
- providersSourceContent = readFileSync26(providersInjection.appProvidersSource, "utf-8");
21454
+ providersSourceContent = readFileSync27(providersInjection.appProvidersSource, "utf-8");
21446
21455
  } catch {}
21447
21456
  }
21448
21457
  return JSON.stringify({
@@ -21485,13 +21494,13 @@ export const __ABSOLUTE_PAGE_USES_LEGACY_ANIMATIONS__ = true;
21485
21494
  const fragments = [];
21486
21495
  if (providersInjection.appProvidersSource) {
21487
21496
  const compiledAppProvidersPath = (() => {
21488
- const angularDirAbs = resolve30(outRoot);
21489
- const appSourceAbs = resolve30(providersInjection.appProvidersSource);
21497
+ const angularDirAbs = resolve31(outRoot);
21498
+ const appSourceAbs = resolve31(providersInjection.appProvidersSource);
21490
21499
  const rel = relative19(angularDirAbs, appSourceAbs).replace(/\\/g, "/");
21491
21500
  return join40(compiledParent, rel).replace(/\.[cm]?[tj]sx?$/, ".js");
21492
21501
  })();
21493
21502
  const appProvidersSpec = (() => {
21494
- const rel = relative19(dirname23(rawServerFile), compiledAppProvidersPath).replace(/\\/g, "/");
21503
+ const rel = relative19(dirname24(rawServerFile), compiledAppProvidersPath).replace(/\\/g, "/");
21495
21504
  return rel.startsWith(".") ? rel : `./${rel}`;
21496
21505
  })();
21497
21506
  importLines.push(`import { appProviders as __abs_globalProviders } from "${appProvidersSpec}";`);
@@ -22192,7 +22201,7 @@ var require_node = __commonJS(function(exports, module) {
22192
22201
  // src/build/compileEmber.ts
22193
22202
  import { existsSync as existsSync32 } from "fs";
22194
22203
  import { mkdir as mkdir10, rm as rm5 } from "fs/promises";
22195
- import { basename as basename16, dirname as dirname24, extname as extname13, join as join41, resolve as resolve31 } from "path";
22204
+ import { basename as basename16, dirname as dirname25, extname as extname13, join as join41, resolve as resolve32 } from "path";
22196
22205
  var {build: bunBuild2, Transpiler: Transpiler5, write: write5, file: file4 } = globalThis.Bun;
22197
22206
  var cachedPreprocessor = null, getPreprocessor = async () => {
22198
22207
  if (cachedPreprocessor)
@@ -22288,7 +22297,7 @@ export const importSync = (specifier) => {
22288
22297
  const originalImporter = stagedSourceMap.get(args.importer);
22289
22298
  if (!originalImporter)
22290
22299
  return;
22291
- const candidateBase = resolve31(dirname24(originalImporter), args.path);
22300
+ const candidateBase = resolve32(dirname25(originalImporter), args.path);
22292
22301
  const extensionsToTry = ["", ".gts", ".gjs", ".ts", ".js"];
22293
22302
  for (const ext of extensionsToTry) {
22294
22303
  const candidate = candidateBase + ext;
@@ -22347,7 +22356,7 @@ export const renderToHTML = (props = {}) => {
22347
22356
  export { PageComponent };
22348
22357
  export default PageComponent;
22349
22358
  `, compileEmberFile = async (entry, compiledRoot, cwd = process.cwd()) => {
22350
- const resolvedEntry = resolve31(entry);
22359
+ const resolvedEntry = resolve32(entry);
22351
22360
  const source = await file4(resolvedEntry).text();
22352
22361
  let preprocessed = source;
22353
22362
  if (isTemplateTagFile(resolvedEntry)) {
@@ -22367,8 +22376,8 @@ export default PageComponent;
22367
22376
  mkdir10(serverDir, { recursive: true }),
22368
22377
  mkdir10(clientDir, { recursive: true })
22369
22378
  ]);
22370
- const tmpPagePath = resolve31(join41(tmpDir, `${baseName}.module.js`));
22371
- const tmpHarnessPath = resolve31(join41(tmpDir, `${baseName}.harness.js`));
22379
+ const tmpPagePath = resolve32(join41(tmpDir, `${baseName}.module.js`));
22380
+ const tmpHarnessPath = resolve32(join41(tmpDir, `${baseName}.harness.js`));
22372
22381
  await Promise.all([
22373
22382
  write5(tmpPagePath, transpiled),
22374
22383
  write5(tmpHarnessPath, generateServerHarness(tmpPagePath))
@@ -22433,24 +22442,24 @@ var importFromProject = (specifier, projectRoot = process.cwd()) => {
22433
22442
 
22434
22443
  // src/build/buildReactVendor.ts
22435
22444
  import { existsSync as existsSync33, mkdirSync as mkdirSync8 } from "fs";
22436
- import { join as join42, resolve as resolve32 } from "path";
22445
+ import { join as join42, resolve as resolve33 } from "path";
22437
22446
  import { rm as rm6 } from "fs/promises";
22438
22447
  var {build: bunBuild3 } = globalThis.Bun;
22439
22448
  var resolveJsxDevRuntimeCompatPath = () => {
22440
22449
  const candidates = [
22441
- resolve32(import.meta.dir, "react", "jsxDevRuntimeCompat.js"),
22442
- resolve32(import.meta.dir, "src", "react", "jsxDevRuntimeCompat.ts"),
22443
- resolve32(import.meta.dir, "..", "react", "jsxDevRuntimeCompat.js"),
22444
- resolve32(import.meta.dir, "..", "src", "react", "jsxDevRuntimeCompat.ts"),
22445
- resolve32(import.meta.dir, "..", "..", "dist", "react", "jsxDevRuntimeCompat.js"),
22446
- resolve32(import.meta.dir, "..", "..", "src", "react", "jsxDevRuntimeCompat.ts")
22450
+ resolve33(import.meta.dir, "react", "jsxDevRuntimeCompat.js"),
22451
+ resolve33(import.meta.dir, "src", "react", "jsxDevRuntimeCompat.ts"),
22452
+ resolve33(import.meta.dir, "..", "react", "jsxDevRuntimeCompat.js"),
22453
+ resolve33(import.meta.dir, "..", "src", "react", "jsxDevRuntimeCompat.ts"),
22454
+ resolve33(import.meta.dir, "..", "..", "dist", "react", "jsxDevRuntimeCompat.js"),
22455
+ resolve33(import.meta.dir, "..", "..", "src", "react", "jsxDevRuntimeCompat.ts")
22447
22456
  ];
22448
22457
  for (const candidate of candidates) {
22449
22458
  if (existsSync33(candidate)) {
22450
22459
  return candidate.replace(/\\/g, "/");
22451
22460
  }
22452
22461
  }
22453
- return (candidates[0] ?? resolve32(import.meta.dir, "react", "jsxDevRuntimeCompat.js")).replace(/\\/g, "/");
22462
+ return (candidates[0] ?? resolve33(import.meta.dir, "react", "jsxDevRuntimeCompat.js")).replace(/\\/g, "/");
22454
22463
  }, jsxDevRuntimeCompatPath, jsxRuntimeCompatPath, reactSpecifiers, toSafeFileName = (specifier) => specifier.replace(/\//g, "_"), computeVendorPaths = () => {
22455
22464
  const paths = {};
22456
22465
  for (const specifier of reactSpecifiers) {
@@ -22898,13 +22907,13 @@ import {
22898
22907
  existsSync as existsSync34,
22899
22908
  mkdirSync as mkdirSync12,
22900
22909
  readdirSync as readdirSync7,
22901
- readFileSync as readFileSync27,
22910
+ readFileSync as readFileSync28,
22902
22911
  renameSync,
22903
22912
  rmSync as rmSync2,
22904
22913
  statSync as statSync5,
22905
22914
  writeFileSync as writeFileSync9
22906
22915
  } from "fs";
22907
- import { basename as basename17, dirname as dirname25, extname as extname14, join as join46, relative as relative20, resolve as resolve33 } from "path";
22916
+ import { basename as basename17, dirname as dirname26, extname as extname14, join as join46, relative as relative20, resolve as resolve34 } from "path";
22908
22917
  import { cwd, env as env2, exit } from "process";
22909
22918
  var {build: bunBuild7, Glob: Glob8 } = globalThis.Bun;
22910
22919
  var isBuildTraceEnabled = () => {
@@ -22987,7 +22996,7 @@ var isBuildTraceEnabled = () => {
22987
22996
  }, REACT_VENDOR_SPECIFIERS, findBareReactImports = (path, importRegex) => {
22988
22997
  let content;
22989
22998
  try {
22990
- content = readFileSync27(path, "utf-8");
22999
+ content = readFileSync28(path, "utf-8");
22991
23000
  } catch {
22992
23001
  return [];
22993
23002
  }
@@ -23053,8 +23062,8 @@ ${offenders.map((o) => ` \u2022 ${o}`).join(`
23053
23062
  if (globalThis.__absoluteVersion)
23054
23063
  return;
23055
23064
  const candidates = [
23056
- resolve33(import.meta.dir, "..", "..", "package.json"),
23057
- resolve33(import.meta.dir, "..", "package.json")
23065
+ resolve34(import.meta.dir, "..", "..", "package.json"),
23066
+ resolve34(import.meta.dir, "..", "package.json")
23058
23067
  ];
23059
23068
  const resolveCandidate = async (remaining) => {
23060
23069
  const [candidate, ...rest] = remaining;
@@ -23070,13 +23079,13 @@ ${offenders.map((o) => ` \u2022 ${o}`).join(`
23070
23079
  };
23071
23080
  await resolveCandidate(candidates);
23072
23081
  }, SKIP_DIRS5, addWorkerPathIfExists = (file, relPath, workerPaths) => {
23073
- const absPath = resolve33(file, "..", relPath);
23082
+ const absPath = resolve34(file, "..", relPath);
23074
23083
  try {
23075
23084
  statSync5(absPath);
23076
23085
  workerPaths.add(absPath);
23077
23086
  } catch {}
23078
23087
  }, extractWorkerSpecifiers = (file, patterns) => {
23079
- const content = readFileSync27(file, "utf-8");
23088
+ const content = readFileSync28(file, "utf-8");
23080
23089
  const specifiers = [];
23081
23090
  for (const pattern of patterns) {
23082
23091
  pattern.lastIndex = 0;
@@ -23165,35 +23174,35 @@ ${offenders.map((o) => ` \u2022 ${o}`).join(`
23165
23174
  return;
23166
23175
  }
23167
23176
  const indexFiles = readDir(reactIndexesPath).filter((file) => file.endsWith(".tsx"));
23168
- const pagesRel = relative20(process.cwd(), resolve33(reactPagesPath)).replace(/\\/g, "/");
23177
+ const pagesRel = relative20(process.cwd(), resolve34(reactPagesPath)).replace(/\\/g, "/");
23169
23178
  for (const file of indexFiles) {
23170
- let content = readFileSync27(join46(reactIndexesPath, file), "utf-8");
23179
+ let content = readFileSync28(join46(reactIndexesPath, file), "utf-8");
23171
23180
  content = content.replace(/from\s*['"]([^'"]*\/pages\/([^'"]+))['"]/g, (_match, _fullPath, componentName) => `from '/@src/${pagesRel}/${componentName}'`);
23172
23181
  writeFileSync9(join46(devIndexDir, file), content);
23173
23182
  }
23174
23183
  }, copySvelteDevIndexes = (svelteDir, sveltePagesPath, svelteEntries, devIndexDir) => {
23175
23184
  const svelteIndexDir = join46(getFrameworkGeneratedDir("svelte"), "indexes");
23176
- const sveltePageEntries = svelteEntries.filter((file) => resolve33(file).startsWith(resolve33(sveltePagesPath)));
23185
+ const sveltePageEntries = svelteEntries.filter((file) => resolve34(file).startsWith(resolve34(sveltePagesPath)));
23177
23186
  for (const entry of sveltePageEntries) {
23178
23187
  const name = basename17(entry).replace(/\.svelte(\.(ts|js))?$/, "");
23179
23188
  const indexFile = join46(svelteIndexDir, "pages", `${name}.js`);
23180
23189
  if (!existsSync34(indexFile))
23181
23190
  continue;
23182
- let content = readFileSync27(indexFile, "utf-8");
23183
- const srcRel = relative20(process.cwd(), resolve33(entry)).replace(/\\/g, "/");
23191
+ let content = readFileSync28(indexFile, "utf-8");
23192
+ const srcRel = relative20(process.cwd(), resolve34(entry)).replace(/\\/g, "/");
23184
23193
  content = content.replace(/import\s+Component\s+from\s+['"]([^'"]+)['"]/, `import Component from "/@src/${srcRel}"`);
23185
23194
  writeFileSync9(join46(devIndexDir, `${name}.svelte.js`), content);
23186
23195
  }
23187
23196
  }, copyVueDevIndexes = (vueDir, vuePagesPath, vueEntries, devIndexDir) => {
23188
23197
  const vueIndexDir = join46(getFrameworkGeneratedDir("vue"), "indexes");
23189
- const vuePageEntries = vueEntries.filter((file) => resolve33(file).startsWith(resolve33(vuePagesPath)));
23198
+ const vuePageEntries = vueEntries.filter((file) => resolve34(file).startsWith(resolve34(vuePagesPath)));
23190
23199
  for (const entry of vuePageEntries) {
23191
23200
  const name = basename17(entry, ".vue");
23192
23201
  const indexFile = join46(vueIndexDir, `${name}.js`);
23193
23202
  if (!existsSync34(indexFile))
23194
23203
  continue;
23195
- let content = readFileSync27(indexFile, "utf-8");
23196
- const srcRel = relative20(process.cwd(), resolve33(entry)).replace(/\\/g, "/");
23204
+ let content = readFileSync28(indexFile, "utf-8");
23205
+ const srcRel = relative20(process.cwd(), resolve34(entry)).replace(/\\/g, "/");
23197
23206
  content = content.replace(/import\s+Comp(?:\s*,\s*\*\s+as\s+\w+)?\s+from\s+['"]([^'"]+)['"]/, (match) => match.replace(/from\s+['"][^'"]+['"]/, `from "/@src/${srcRel}"`));
23198
23207
  writeFileSync9(join46(devIndexDir, `${name}.vue.js`), content);
23199
23208
  }
@@ -23432,7 +23441,7 @@ ${offenders.map((o) => ` \u2022 ${o}`).join(`
23432
23441
  const sourceClientRoots = [
23433
23442
  htmlDir,
23434
23443
  htmxDir,
23435
- islandBootstrapPath && dirname25(islandBootstrapPath)
23444
+ islandBootstrapPath && dirname26(islandBootstrapPath)
23436
23445
  ].filter((dir) => Boolean(dir));
23437
23446
  const usesGenerated = Boolean(reactDir) || Boolean(svelteDir) || Boolean(vueDir) || Boolean(angularDir);
23438
23447
  if (usesGenerated)
@@ -23480,13 +23489,13 @@ ${offenders.map((o) => ` \u2022 ${o}`).join(`
23480
23489
  const filterToIncrementalEntries = (entryPoints, mapToSource) => {
23481
23490
  if (!isIncremental || !incrementalFiles)
23482
23491
  return entryPoints;
23483
- const normalizedIncremental = new Set(incrementalFiles.map((f) => resolve33(f)));
23492
+ const normalizedIncremental = new Set(incrementalFiles.map((f) => resolve34(f)));
23484
23493
  const matchingEntries = [];
23485
23494
  for (const entry of entryPoints) {
23486
23495
  const sourceFile = mapToSource(entry);
23487
23496
  if (!sourceFile)
23488
23497
  continue;
23489
- if (!normalizedIncremental.has(resolve33(sourceFile)))
23498
+ if (!normalizedIncremental.has(resolve34(sourceFile)))
23490
23499
  continue;
23491
23500
  matchingEntries.push(entry);
23492
23501
  }
@@ -23662,11 +23671,11 @@ ${offenders.map((o) => ` \u2022 ${o}`).join(`
23662
23671
  return scoped;
23663
23672
  return scoped.filter((entry) => {
23664
23673
  const source = mapToSource(entry);
23665
- return source !== null && deferPageEntries.except.has(resolve33(source));
23674
+ return source !== null && deferPageEntries.except.has(resolve34(source));
23666
23675
  });
23667
23676
  };
23668
23677
  const mapReactIndexToPage = (entry) => {
23669
- if (reactIndexesPath && reactPagesPath && entry.startsWith(resolve33(reactIndexesPath))) {
23678
+ if (reactIndexesPath && reactPagesPath && entry.startsWith(resolve34(reactIndexesPath))) {
23670
23679
  const pageName = basename17(entry, ".tsx");
23671
23680
  return join46(reactPagesPath, `${pageName}.tsx`);
23672
23681
  }
@@ -23708,7 +23717,7 @@ ${offenders.map((o) => ` \u2022 ${o}`).join(`
23708
23717
  for (const entry of vueEntries) {
23709
23718
  const name = basename17(entry, ".vue");
23710
23719
  if (ssrOnlyPageNames.has(name)) {
23711
- resolved.add(resolve33(entry));
23720
+ resolved.add(resolve34(entry));
23712
23721
  }
23713
23722
  }
23714
23723
  return resolved;
@@ -23821,7 +23830,7 @@ ${offenders.map((o) => ` \u2022 ${o}`).join(`
23821
23830
  const clientPath = islandSvelteClientPaths[idx];
23822
23831
  if (!sourcePath || !clientPath)
23823
23832
  continue;
23824
- islandSvelteClientPathMap.set(resolve33(sourcePath), clientPath);
23833
+ islandSvelteClientPathMap.set(resolve34(sourcePath), clientPath);
23825
23834
  }
23826
23835
  const islandVueClientPathMap = new Map;
23827
23836
  for (let idx = 0;idx < islandVueSources.length; idx++) {
@@ -23829,7 +23838,7 @@ ${offenders.map((o) => ` \u2022 ${o}`).join(`
23829
23838
  const clientPath = islandVueClientPaths[idx];
23830
23839
  if (!sourcePath || !clientPath)
23831
23840
  continue;
23832
- islandVueClientPathMap.set(resolve33(sourcePath), clientPath);
23841
+ islandVueClientPathMap.set(resolve34(sourcePath), clientPath);
23833
23842
  }
23834
23843
  const islandAngularClientPathMap = new Map;
23835
23844
  for (let idx = 0;idx < islandAngularSources.length; idx++) {
@@ -23837,7 +23846,7 @@ ${offenders.map((o) => ` \u2022 ${o}`).join(`
23837
23846
  const clientPath = islandAngularClientPaths[idx];
23838
23847
  if (!sourcePath || !clientPath)
23839
23848
  continue;
23840
- islandAngularClientPathMap.set(resolve33(sourcePath), clientPath);
23849
+ islandAngularClientPathMap.set(resolve34(sourcePath), clientPath);
23841
23850
  }
23842
23851
  const reactConventionSources = collectConventionSourceFiles(conventionsMap.react);
23843
23852
  const svelteConventionSources = collectConventionSourceFiles(conventionsMap.svelte);
@@ -23864,7 +23873,7 @@ ${offenders.map((o) => ` \u2022 ${o}`).join(`
23864
23873
  stylePreprocessorPlugin,
23865
23874
  createBunStringRawUnicodePlugin()
23866
23875
  ],
23867
- root: dirname25(source),
23876
+ root: dirname26(source),
23868
23877
  target: "bun",
23869
23878
  throw: false,
23870
23879
  ...projectTsconfig()
@@ -23956,7 +23965,7 @@ ${offenders.map((o) => ` \u2022 ${o}`).join(`
23956
23965
  ...islandBootstrapPath ? [islandBootstrapPath] : []
23957
23966
  ];
23958
23967
  const [onlyWorkerClientEntry] = urlReferencedFiles;
23959
- const workerClientRoot = urlReferencedFiles.length === 1 && onlyWorkerClientEntry ? dirname25(onlyWorkerClientEntry) : commonAncestor(urlReferencedFiles.map((file) => dirname25(file)), projectRoot);
23968
+ const workerClientRoot = urlReferencedFiles.length === 1 && onlyWorkerClientEntry ? dirname26(onlyWorkerClientEntry) : commonAncestor(urlReferencedFiles.map((file) => dirname26(file)), projectRoot);
23960
23969
  const islandEntryResult = islandBuildInfo ? await tracePhase("islands/client-entry-generation", () => generateIslandEntryPoints({
23961
23970
  buildInfo: islandBuildInfo,
23962
23971
  buildPath,
@@ -24284,7 +24293,7 @@ ${offenders.map((o) => ` \u2022 ${o}`).join(`
24284
24293
  renameSync(mapPath, join46(sourcemapDir, basename17(mapPath)));
24285
24294
  const jsPath = mapPath.slice(0, -4);
24286
24295
  try {
24287
- const javascript = readFileSync27(jsPath, "utf-8").replace(/\n?\/\/# sourceMappingURL=[^\n]*\s*$/, `
24296
+ const javascript = readFileSync28(jsPath, "utf-8").replace(/\n?\/\/# sourceMappingURL=[^\n]*\s*$/, `
24288
24297
  `);
24289
24298
  writeFileSync9(jsPath, javascript);
24290
24299
  } catch {}
@@ -24363,7 +24372,7 @@ ${offenders.map((o) => ` \u2022 ${o}`).join(`
24363
24372
  if (serverOutputs.length > 0 && angularServerVendorPaths && Object.keys(angularServerVendorPaths).length > 0) {
24364
24373
  await Promise.resolve().then(() => init_rewriteImportsPlugin());
24365
24374
  await tracePhase("postprocess/server-angular-vendor-imports", () => rewriteBuildOutputsWith(serverOutputs, (artifact) => {
24366
- const fileDir = dirname25(artifact.path);
24375
+ const fileDir = dirname26(artifact.path);
24367
24376
  const relativePaths = {};
24368
24377
  for (const [specifier, absolute] of Object.entries(angularServerVendorPaths)) {
24369
24378
  const rel = relative20(fileDir, absolute);
@@ -24491,7 +24500,7 @@ ${offenders.map((o) => ` \u2022 ${o}`).join(`
24491
24500
  const injectHMRIntoHTMLFile = (filePath, framework) => {
24492
24501
  if (!hmrClientBundle)
24493
24502
  return;
24494
- let html = readFileSync27(filePath, "utf-8");
24503
+ let html = readFileSync28(filePath, "utf-8");
24495
24504
  if (html.includes("data-hmr-client"))
24496
24505
  return;
24497
24506
  const tag = `<script>window.__HMR_FRAMEWORK__="${framework}";</script><script data-hmr-client>${hmrClientBundle}</script>`;
@@ -24516,7 +24525,7 @@ ${offenders.map((o) => ` \u2022 ${o}`).join(`
24516
24525
  if (hmr)
24517
24526
  injectHMRIntoHTMLFile(htmlFile, "html");
24518
24527
  if (pwaArtifacts) {
24519
- const source = readFileSync27(htmlFile, "utf8");
24528
+ const source = readFileSync28(htmlFile, "utf8");
24520
24529
  writeFileSync9(htmlFile, injectPwaBootstrapHtml(source));
24521
24530
  }
24522
24531
  const fileName = basename17(htmlFile, ".html");
@@ -24547,7 +24556,7 @@ ${offenders.map((o) => ` \u2022 ${o}`).join(`
24547
24556
  if (hmr)
24548
24557
  injectHMRIntoHTMLFile(htmxFile, "htmx");
24549
24558
  if (pwaArtifacts) {
24550
- const source = readFileSync27(htmxFile, "utf8");
24559
+ const source = readFileSync28(htmxFile, "utf8");
24551
24560
  writeFileSync9(htmxFile, injectPwaBootstrapHtml(source));
24552
24561
  }
24553
24562
  const fileName = basename17(htmxFile, ".html");
@@ -24672,7 +24681,7 @@ ${offenders.map((o) => ` \u2022 ${o}`).join(`
24672
24681
  pageEntries,
24673
24682
  tailwindChanged: tailwindResult?.cssChanged ?? false
24674
24683
  };
24675
- }, projectTsconfig = () => existsSync34(resolve33("tsconfig.json")) ? { tsconfig: "./tsconfig.json" } : {}, build = async (config) => {
24684
+ }, projectTsconfig = () => existsSync34(resolve34("tsconfig.json")) ? { tsconfig: "./tsconfig.json" } : {}, build = async (config) => {
24676
24685
  const projectRoot = cwd();
24677
24686
  const buildPath = validateSafePath(config.buildDirectory ?? "build", projectRoot);
24678
24687
  return withBuildDirectoryLock(buildPath, () => buildUnlocked(config));
@@ -24760,8 +24769,25 @@ var init_build = __esm(() => {
24760
24769
  };
24761
24770
  });
24762
24771
 
24772
+ // src/dev/runtimePaths.ts
24773
+ import { existsSync as existsSync35 } from "fs";
24774
+ import { resolve as resolve35 } from "path";
24775
+ var resolveDevClientDirectory = () => {
24776
+ const candidates = [
24777
+ resolve35(import.meta.dir, "client"),
24778
+ resolve35(import.meta.dir, "dev/client"),
24779
+ resolve35(import.meta.dir, "../dev/client")
24780
+ ];
24781
+ const directory = candidates.find((candidate) => existsSync35(resolve35(candidate, "hmrClient.ts")));
24782
+ if (!directory) {
24783
+ throw new Error("AbsoluteJS browser HMR sources are missing from the installed package.");
24784
+ }
24785
+ return directory;
24786
+ };
24787
+ var init_runtimePaths = () => {};
24788
+
24763
24789
  // src/build/buildEmberVendor.ts
24764
- import { mkdirSync as mkdirSync13, existsSync as existsSync35 } from "fs";
24790
+ import { mkdirSync as mkdirSync13, existsSync as existsSync36 } from "fs";
24765
24791
  import { join as join47 } from "path";
24766
24792
  import { rm as rm10 } from "fs/promises";
24767
24793
  var {build: bunBuild8 } = globalThis.Bun;
@@ -24815,7 +24841,7 @@ export const importSync = (specifier) => {
24815
24841
  return { resolveTo: specifier, specifier };
24816
24842
  }
24817
24843
  const emberInternalPath = join47(cwd, "node_modules/ember-source/dist/packages", specifier, "index.js");
24818
- if (!existsSync35(emberInternalPath)) {
24844
+ if (!existsSync36(emberInternalPath)) {
24819
24845
  throw new Error(`Ember vendor build: cannot find ${specifier} at ${emberInternalPath}. ` + `Is ember-source installed and at least 6.12?`);
24820
24846
  }
24821
24847
  return { resolveTo: emberInternalPath, specifier };
@@ -24849,7 +24875,7 @@ export const importSync = (specifier) => {
24849
24875
  return;
24850
24876
  }
24851
24877
  const internal = join47(cwd, "node_modules/ember-source/dist/packages", args.path, "index.js");
24852
- if (existsSync35(internal)) {
24878
+ if (existsSync36(internal)) {
24853
24879
  return { path: internal };
24854
24880
  }
24855
24881
  return;
@@ -24909,7 +24935,7 @@ var init_buildEmberVendor = __esm(() => {
24909
24935
  });
24910
24936
 
24911
24937
  // src/build/workspacePackages.ts
24912
- import { readFileSync as readFileSync28, realpathSync as realpathSync3 } from "fs";
24938
+ import { readFileSync as readFileSync29, realpathSync as realpathSync4 } from "fs";
24913
24939
  import { join as join48, sep as sep6 } from "path";
24914
24940
  var NODE_MODULES_SEGMENT, verdicts, isWorkspacePackageSpecifier = (specifier, projectRoot = process.cwd()) => {
24915
24941
  const key = `${projectRoot}\x00${specifier}`;
@@ -24918,7 +24944,7 @@ var NODE_MODULES_SEGMENT, verdicts, isWorkspacePackageSpecifier = (specifier, pr
24918
24944
  return known;
24919
24945
  let verdict = false;
24920
24946
  try {
24921
- const resolved = realpathSync3(Bun.resolveSync(specifier, projectRoot));
24947
+ const resolved = realpathSync4(Bun.resolveSync(specifier, projectRoot));
24922
24948
  verdict = !resolved.includes(NODE_MODULES_SEGMENT);
24923
24949
  } catch {
24924
24950
  verdict = false;
@@ -24928,7 +24954,7 @@ var NODE_MODULES_SEGMENT, verdicts, isWorkspacePackageSpecifier = (specifier, pr
24928
24954
  }, workspacePackageDirs = (projectRoot = process.cwd()) => {
24929
24955
  let manifest;
24930
24956
  try {
24931
- manifest = JSON.parse(readFileSync28(join48(projectRoot, "package.json"), "utf-8"));
24957
+ manifest = JSON.parse(readFileSync29(join48(projectRoot, "package.json"), "utf-8"));
24932
24958
  } catch {
24933
24959
  return [];
24934
24960
  }
@@ -24943,7 +24969,7 @@ var NODE_MODULES_SEGMENT, verdicts, isWorkspacePackageSpecifier = (specifier, pr
24943
24969
  const dirs = new Set;
24944
24970
  for (const name of names) {
24945
24971
  try {
24946
- const linked = realpathSync3(join48(projectRoot, "node_modules", name));
24972
+ const linked = realpathSync4(join48(projectRoot, "node_modules", name));
24947
24973
  if (!`${linked}${sep6}`.includes(NODE_MODULES_SEGMENT))
24948
24974
  dirs.add(linked);
24949
24975
  } catch {}
@@ -25059,9 +25085,9 @@ var stripStringsAndComments = (source) => {
25059
25085
  };
25060
25086
 
25061
25087
  // src/dev/dependencyGraph.ts
25062
- import { existsSync as existsSync36, readFileSync as readFileSync29, realpathSync as realpathSync4 } from "fs";
25088
+ import { existsSync as existsSync37, readFileSync as readFileSync30, realpathSync as realpathSync5 } from "fs";
25063
25089
  var {Glob: Glob9 } = globalThis.Bun;
25064
- import { resolve as resolve34 } from "path";
25090
+ import { resolve as resolve36 } from "path";
25065
25091
  var emptyDependencyGraph, tsTranspiler, jsTranspiler, loaderForFile = (filePath) => {
25066
25092
  const lower = filePath.toLowerCase();
25067
25093
  if (lower.endsWith(".ts") || lower.endsWith(".tsx") || lower.endsWith(".jsx"))
@@ -25072,17 +25098,17 @@ var emptyDependencyGraph, tsTranspiler, jsTranspiler, loaderForFile = (filePath)
25072
25098
  return "html";
25073
25099
  return null;
25074
25100
  }, resolveImportPath2 = (importPath, fromFile) => {
25075
- const fromDir = resolve34(fromFile, "..");
25101
+ const fromDir = resolve36(fromFile, "..");
25076
25102
  if (!importPath.startsWith(".") && !importPath.startsWith("/")) {
25077
25103
  if (!isWorkspacePackageSpecifier(importPath, fromDir))
25078
25104
  return null;
25079
25105
  try {
25080
- return realpathSync4(Bun.resolveSync(importPath, fromDir));
25106
+ return realpathSync5(Bun.resolveSync(importPath, fromDir));
25081
25107
  } catch {
25082
25108
  return null;
25083
25109
  }
25084
25110
  }
25085
- const normalized = resolve34(fromDir, importPath);
25111
+ const normalized = resolve36(fromDir, importPath);
25086
25112
  const extensions = [
25087
25113
  ".ts",
25088
25114
  ".tsx",
@@ -25095,10 +25121,10 @@ var emptyDependencyGraph, tsTranspiler, jsTranspiler, loaderForFile = (filePath)
25095
25121
  ];
25096
25122
  for (const ext of extensions) {
25097
25123
  const withExt = normalized + ext;
25098
- if (existsSync36(withExt))
25124
+ if (existsSync37(withExt))
25099
25125
  return withExt;
25100
25126
  }
25101
- if (existsSync36(normalized))
25127
+ if (existsSync37(normalized))
25102
25128
  return normalized;
25103
25129
  return null;
25104
25130
  }, clearExistingDependents = (graph, normalizedPath) => {
@@ -25112,8 +25138,8 @@ var emptyDependencyGraph, tsTranspiler, jsTranspiler, loaderForFile = (filePath)
25112
25138
  dependents.delete(normalizedPath);
25113
25139
  }
25114
25140
  }, addFileToGraph = (graph, filePath) => {
25115
- const normalizedPath = resolve34(filePath);
25116
- if (!existsSync36(normalizedPath))
25141
+ const normalizedPath = resolve36(filePath);
25142
+ if (!existsSync37(normalizedPath))
25117
25143
  return;
25118
25144
  const dependencies = extractDependencies(normalizedPath);
25119
25145
  clearExistingDependents(graph, normalizedPath);
@@ -25139,10 +25165,10 @@ var emptyDependencyGraph, tsTranspiler, jsTranspiler, loaderForFile = (filePath)
25139
25165
  }, IGNORED_SEGMENTS, buildInitialDependencyGraph = (graph, directories) => {
25140
25166
  const processedFiles = new Set;
25141
25167
  const glob = new Glob9("**/*.{ts,tsx,js,jsx,vue,svelte,html,htm}");
25142
- const resolvedDirs = directories.map((dir) => resolve34(dir)).filter((dir) => existsSync36(dir));
25168
+ const resolvedDirs = directories.map((dir) => resolve36(dir)).filter((dir) => existsSync37(dir));
25143
25169
  const allFiles = resolvedDirs.flatMap((dir) => Array.from(glob.scanSync({ absolute: true, cwd: dir })));
25144
25170
  for (const file of allFiles) {
25145
- const fullPath = resolve34(file);
25171
+ const fullPath = resolve36(file);
25146
25172
  if (IGNORED_SEGMENTS.some((seg) => fullPath.includes(seg)))
25147
25173
  continue;
25148
25174
  if (processedFiles.has(fullPath))
@@ -25236,15 +25262,15 @@ var emptyDependencyGraph, tsTranspiler, jsTranspiler, loaderForFile = (filePath)
25236
25262
  const lowerPath = filePath.toLowerCase();
25237
25263
  const isSvelteOrVue = lowerPath.endsWith(".svelte") || lowerPath.endsWith(".vue");
25238
25264
  if (loader === "html") {
25239
- const content = readFileSync29(filePath, "utf-8");
25265
+ const content = readFileSync30(filePath, "utf-8");
25240
25266
  return extractHtmlDependencies(filePath, content);
25241
25267
  }
25242
25268
  if (loader === "tsx" || loader === "js") {
25243
- const content = readFileSync29(filePath, "utf-8");
25269
+ const content = readFileSync30(filePath, "utf-8");
25244
25270
  return extractJsDependencies(filePath, content, loader);
25245
25271
  }
25246
25272
  if (isSvelteOrVue) {
25247
- const content = readFileSync29(filePath, "utf-8");
25273
+ const content = readFileSync30(filePath, "utf-8");
25248
25274
  return extractSvelteVueDependencies(filePath, content);
25249
25275
  }
25250
25276
  return [];
@@ -25255,7 +25281,7 @@ var emptyDependencyGraph, tsTranspiler, jsTranspiler, loaderForFile = (filePath)
25255
25281
  return [];
25256
25282
  }
25257
25283
  }, getAffectedFiles = (graph, changedFile) => {
25258
- const normalizedPath = resolve34(changedFile);
25284
+ const normalizedPath = resolve36(changedFile);
25259
25285
  const affected = new Set;
25260
25286
  const toProcess = [normalizedPath];
25261
25287
  const processNode = (current) => {
@@ -25286,7 +25312,7 @@ var emptyDependencyGraph, tsTranspiler, jsTranspiler, loaderForFile = (filePath)
25286
25312
  }, removeDependentsForFile = (graph, normalizedPath) => {
25287
25313
  graph.dependents.delete(normalizedPath);
25288
25314
  }, removeFileFromGraph = (graph, filePath) => {
25289
- const normalizedPath = resolve34(filePath);
25315
+ const normalizedPath = resolve36(filePath);
25290
25316
  removeDepsForFile(graph, normalizedPath);
25291
25317
  removeDependentsForFile(graph, normalizedPath);
25292
25318
  };
@@ -25330,12 +25356,12 @@ var globalVersionCounter = 0, createModuleVersionTracker = () => new Map, getNex
25330
25356
  };
25331
25357
 
25332
25358
  // src/dev/configResolver.ts
25333
- import { resolve as resolve35 } from "path";
25359
+ import { resolve as resolve37 } from "path";
25334
25360
  var resolveBuildPaths = (config) => {
25335
25361
  const cwd = process.cwd();
25336
25362
  const normalize = (path) => path.replace(/\\/g, "/");
25337
- const withDefault = (value, fallback) => normalize(resolve35(cwd, value ?? fallback));
25338
- const optional = (value) => value ? normalize(resolve35(cwd, value)) : undefined;
25363
+ const withDefault = (value, fallback) => normalize(resolve37(cwd, value ?? fallback));
25364
+ const optional = (value) => value ? normalize(resolve37(cwd, value)) : undefined;
25339
25365
  return {
25340
25366
  angularDir: optional(config.angularDirectory),
25341
25367
  assetsDir: optional(config.assetsDirectory),
@@ -25394,8 +25420,8 @@ var init_clientManager = __esm(() => {
25394
25420
  });
25395
25421
 
25396
25422
  // src/dev/pathUtils.ts
25397
- import { existsSync as existsSync37, readdirSync as readdirSync8, readFileSync as readFileSync30 } from "fs";
25398
- import { dirname as dirname26, resolve as resolve36 } from "path";
25423
+ import { existsSync as existsSync38, readdirSync as readdirSync8, readFileSync as readFileSync31 } from "fs";
25424
+ import { dirname as dirname27, resolve as resolve38 } from "path";
25399
25425
  var STYLE_EXTENSION_PATTERN2, detectFramework = (filePath, resolved) => {
25400
25426
  if (shouldIgnorePath(filePath, resolved)) {
25401
25427
  return "ignored";
@@ -25471,7 +25497,7 @@ var STYLE_EXTENSION_PATTERN2, detectFramework = (filePath, resolved) => {
25471
25497
  return "unknown";
25472
25498
  }, collectAngularResourceDirs = (angularDir) => {
25473
25499
  const out = new Set;
25474
- const angularRoot = resolve36(angularDir);
25500
+ const angularRoot = resolve38(angularDir);
25475
25501
  const angularRootNormalized = normalizePath(angularRoot);
25476
25502
  const walk = (dir) => {
25477
25503
  let entries;
@@ -25484,7 +25510,7 @@ var STYLE_EXTENSION_PATTERN2, detectFramework = (filePath, resolved) => {
25484
25510
  if (entry.name.startsWith(".") || entry.name === "node_modules") {
25485
25511
  continue;
25486
25512
  }
25487
- const full = resolve36(dir, entry.name);
25513
+ const full = resolve38(dir, entry.name);
25488
25514
  if (entry.isDirectory()) {
25489
25515
  walk(full);
25490
25516
  continue;
@@ -25494,7 +25520,7 @@ var STYLE_EXTENSION_PATTERN2, detectFramework = (filePath, resolved) => {
25494
25520
  }
25495
25521
  let source;
25496
25522
  try {
25497
- source = readFileSync30(full, "utf8");
25523
+ source = readFileSync31(full, "utf8");
25498
25524
  } catch {
25499
25525
  continue;
25500
25526
  }
@@ -25523,10 +25549,10 @@ var STYLE_EXTENSION_PATTERN2, detectFramework = (filePath, resolved) => {
25523
25549
  refs.push(strMatch[1]);
25524
25550
  }
25525
25551
  }
25526
- const componentDir = dirname26(full);
25552
+ const componentDir = dirname27(full);
25527
25553
  for (const ref of refs) {
25528
- const refAbs = normalizePath(resolve36(componentDir, ref));
25529
- const refDir = normalizePath(dirname26(refAbs));
25554
+ const refAbs = normalizePath(resolve38(componentDir, ref));
25555
+ const refDir = normalizePath(dirname27(refAbs));
25530
25556
  if (refDir === angularRootNormalized || refDir.startsWith(`${angularRootNormalized}/`)) {
25531
25557
  continue;
25532
25558
  }
@@ -25542,7 +25568,7 @@ var STYLE_EXTENSION_PATTERN2, detectFramework = (filePath, resolved) => {
25542
25568
  const push = (path) => {
25543
25569
  if (!path)
25544
25570
  return;
25545
- const abs = normalizePath(resolve36(cwd, path));
25571
+ const abs = normalizePath(resolve38(cwd, path));
25546
25572
  if (!roots.includes(abs))
25547
25573
  roots.push(abs);
25548
25574
  };
@@ -25567,8 +25593,8 @@ var STYLE_EXTENSION_PATTERN2, detectFramework = (filePath, resolved) => {
25567
25593
  push(cfg.assetsDir);
25568
25594
  push(cfg.stylesDir);
25569
25595
  for (const candidate of ["src", "db", "assets", "styles"]) {
25570
- const abs = normalizePath(resolve36(cwd, candidate));
25571
- if (existsSync37(abs) && !roots.includes(abs))
25596
+ const abs = normalizePath(resolve38(cwd, candidate));
25597
+ if (existsSync38(abs) && !roots.includes(abs))
25572
25598
  roots.push(abs);
25573
25599
  }
25574
25600
  try {
@@ -25578,7 +25604,7 @@ var STYLE_EXTENSION_PATTERN2, detectFramework = (filePath, resolved) => {
25578
25604
  continue;
25579
25605
  if (entry.name.startsWith("."))
25580
25606
  continue;
25581
- const abs = normalizePath(resolve36(cwd, entry.name));
25607
+ const abs = normalizePath(resolve38(cwd, entry.name));
25582
25608
  if (roots.includes(abs))
25583
25609
  continue;
25584
25610
  if (shouldIgnorePath(abs, resolved))
@@ -25666,7 +25692,7 @@ var init_pathUtils = __esm(() => {
25666
25692
  });
25667
25693
 
25668
25694
  // src/dev/devPrescan.ts
25669
- import { existsSync as existsSync38, readdirSync as readdirSync9, rmSync as rmSync3 } from "fs";
25695
+ import { existsSync as existsSync39, readdirSync as readdirSync9, rmSync as rmSync3 } from "fs";
25670
25696
  import { mkdir as mkdir11, readFile as readFile7, rename as rename3, writeFile as writeFile9 } from "fs/promises";
25671
25697
  import { join as join49 } from "path";
25672
25698
  var PRESCAN_DIR, PAYLOAD_VERSION = 1, POLL_INTERVAL_MS = 10, DEFAULT_WAIT_MS = 2000, collectConfigVendorSourceDirs = (config) => Array.from(new Set([
@@ -25679,7 +25705,7 @@ var PRESCAN_DIR, PAYLOAD_VERSION = 1, POLL_INTERVAL_MS = 10, DEFAULT_WAIT_MS = 2
25679
25705
  ].filter((dir) => Boolean(dir)))), devPrescanEnabled = () => process.env.ABSOLUTE_DEV_PRESCAN === "1", sleep = (delayMs) => new Promise((resolve) => {
25680
25706
  setTimeout(resolve, delayMs);
25681
25707
  }), isPayload = (value) => typeof value === "object" && value !== null && ("version" in value) && value.version === PAYLOAD_VERSION, tryReadPrescan = async (path) => {
25682
- if (!existsSync38(path))
25708
+ if (!existsSync39(path))
25683
25709
  return;
25684
25710
  try {
25685
25711
  const parsed = JSON.parse(await readFile7(path, "utf8"));
@@ -25735,8 +25761,8 @@ var init_serverEntryCopies = () => {};
25735
25761
 
25736
25762
  // src/dev/fileWatcher.ts
25737
25763
  import { watch } from "fs";
25738
- import { existsSync as existsSync39, readdirSync as readdirSync10, statSync as statSync6 } from "fs";
25739
- import { dirname as dirname27, join as join50, resolve as resolve37 } from "path";
25764
+ import { existsSync as existsSync40, readdirSync as readdirSync10, statSync as statSync6 } from "fs";
25765
+ import { dirname as dirname28, join as join50, resolve as resolve39 } from "path";
25740
25766
  var safeRemoveFromGraph = (graph, fullPath) => {
25741
25767
  try {
25742
25768
  removeFileFromGraph(graph, fullPath);
@@ -25791,7 +25817,7 @@ var safeRemoveFromGraph = (graph, fullPath) => {
25791
25817
  return;
25792
25818
  if (shouldSkipFilename(filename, isStylesDir)) {
25793
25819
  if (event === "rename") {
25794
- const eventDir = dirname27(join50(absolutePath, filename)).replace(/\\/g, "/");
25820
+ const eventDir = dirname28(join50(absolutePath, filename)).replace(/\\/g, "/");
25795
25821
  atomicRecoveryScan(eventDir);
25796
25822
  for (const delay of [25, 100]) {
25797
25823
  const timer = setTimeout(() => atomicRecoveryScan(eventDir), delay);
@@ -25804,12 +25830,12 @@ var safeRemoveFromGraph = (graph, fullPath) => {
25804
25830
  if (shouldIgnorePath(fullPath, state.resolvedPaths)) {
25805
25831
  return;
25806
25832
  }
25807
- if (event === "rename" && !existsSync39(fullPath)) {
25833
+ if (event === "rename" && !existsSync40(fullPath)) {
25808
25834
  safeRemoveFromGraph(state.dependencyGraph, fullPath);
25809
25835
  onFileChange(fullPath);
25810
25836
  return;
25811
25837
  }
25812
- if (existsSync39(fullPath)) {
25838
+ if (existsSync40(fullPath)) {
25813
25839
  onFileChange(fullPath);
25814
25840
  safeAddToGraph(state.dependencyGraph, fullPath);
25815
25841
  }
@@ -25818,8 +25844,8 @@ var safeRemoveFromGraph = (graph, fullPath) => {
25818
25844
  }, addFileWatchers = (state, paths, onFileChange) => {
25819
25845
  const stylesDir = state.resolvedPaths?.stylesDir;
25820
25846
  paths.forEach((path) => {
25821
- const absolutePath = resolve37(path).replace(/\\/g, "/");
25822
- if (!existsSync39(absolutePath)) {
25847
+ const absolutePath = resolve39(path).replace(/\\/g, "/");
25848
+ if (!existsSync40(absolutePath)) {
25823
25849
  return;
25824
25850
  }
25825
25851
  const isStylesDir = Boolean(stylesDir && absolutePath.startsWith(stylesDir));
@@ -25829,8 +25855,8 @@ var safeRemoveFromGraph = (graph, fullPath) => {
25829
25855
  const watchPaths = getWatchPaths(config, state.resolvedPaths);
25830
25856
  const stylesDir = state.resolvedPaths?.stylesDir;
25831
25857
  watchPaths.forEach((path) => {
25832
- const absolutePath = resolve37(path).replace(/\\/g, "/");
25833
- if (!existsSync39(absolutePath)) {
25858
+ const absolutePath = resolve39(path).replace(/\\/g, "/");
25859
+ if (!existsSync40(absolutePath)) {
25834
25860
  return;
25835
25861
  }
25836
25862
  const isStylesDir = Boolean(stylesDir && absolutePath.startsWith(stylesDir));
@@ -25849,13 +25875,13 @@ var init_fileWatcher = __esm(() => {
25849
25875
  });
25850
25876
 
25851
25877
  // src/dev/assetStore.ts
25852
- import { resolve as resolve38 } from "path";
25878
+ import { resolve as resolve40 } from "path";
25853
25879
  import { readdir as readdir5, unlink } from "fs/promises";
25854
25880
  var mimeTypes, getMimeType = (filePath) => {
25855
25881
  const ext = filePath.slice(filePath.lastIndexOf("."));
25856
25882
  return mimeTypes[ext] ?? "application/octet-stream";
25857
25883
  }, HASHED_FILE_RE, stripHash = (webPath) => webPath.replace(/\.[a-z0-9]{8}(\.(js|css|mjs))$/, "$1"), processWalkEntry = (entry, dir, liveByIdentity, walkAndClean) => {
25858
- const fullPath = resolve38(dir, entry.name);
25884
+ const fullPath = resolve40(dir, entry.name);
25859
25885
  if (entry.isDirectory()) {
25860
25886
  return walkAndClean(fullPath);
25861
25887
  }
@@ -25871,10 +25897,10 @@ var mimeTypes, getMimeType = (filePath) => {
25871
25897
  }, cleanStaleAssets = async (store, manifest, buildDir) => {
25872
25898
  const liveByIdentity = new Map;
25873
25899
  for (const webPath of store.keys()) {
25874
- const diskPath = resolve38(buildDir, webPath.slice(1));
25900
+ const diskPath = resolve40(buildDir, webPath.slice(1));
25875
25901
  liveByIdentity.set(stripHash(diskPath), diskPath);
25876
25902
  }
25877
- const absBuildDir = resolve38(buildDir);
25903
+ const absBuildDir = resolve40(buildDir);
25878
25904
  Object.values(manifest).forEach((val) => {
25879
25905
  if (!HASHED_FILE_RE.test(val))
25880
25906
  return;
@@ -25894,13 +25920,13 @@ var mimeTypes, getMimeType = (filePath) => {
25894
25920
  }, evictMissingChunks = async (store, buildDir) => {
25895
25921
  const chunkKeys = [...store.keys()].filter((webPath) => webPath.includes("/chunk-"));
25896
25922
  await Promise.all(chunkKeys.map(async (webPath) => {
25897
- const onDisk = await Bun.file(resolve38(buildDir, webPath.slice(1))).exists().catch(() => false);
25923
+ const onDisk = await Bun.file(resolve40(buildDir, webPath.slice(1))).exists().catch(() => false);
25898
25924
  if (!onDisk)
25899
25925
  store.delete(webPath);
25900
25926
  }));
25901
25927
  }, lookupAsset = (store, path) => store.get(path), processScanEntry = (entry, dir, prefix, store, scanDir) => {
25902
25928
  if (entry.isDirectory()) {
25903
- return scanDir(resolve38(dir, entry.name), `${prefix}${entry.name}/`);
25929
+ return scanDir(resolve40(dir, entry.name), `${prefix}${entry.name}/`);
25904
25930
  }
25905
25931
  if (!entry.name.startsWith("chunk-")) {
25906
25932
  return null;
@@ -25909,7 +25935,7 @@ var mimeTypes, getMimeType = (filePath) => {
25909
25935
  if (store.has(webPath)) {
25910
25936
  return null;
25911
25937
  }
25912
- return Bun.file(resolve38(dir, entry.name)).bytes().then((bytes) => {
25938
+ return Bun.file(resolve40(dir, entry.name)).bytes().then((bytes) => {
25913
25939
  store.set(webPath, bytes);
25914
25940
  return;
25915
25941
  }).catch(() => {});
@@ -25931,7 +25957,7 @@ var mimeTypes, getMimeType = (filePath) => {
25931
25957
  for (const webPath of newIdentities.values()) {
25932
25958
  if (store.has(webPath))
25933
25959
  continue;
25934
- loadPromises.push(Bun.file(resolve38(buildDir, webPath.slice(1))).bytes().then((bytes) => {
25960
+ loadPromises.push(Bun.file(resolve40(buildDir, webPath.slice(1))).bytes().then((bytes) => {
25935
25961
  store.set(webPath, bytes);
25936
25962
  return;
25937
25963
  }).catch(() => {}));
@@ -25977,10 +26003,10 @@ var init_assetStore = __esm(() => {
25977
26003
  });
25978
26004
 
25979
26005
  // src/dev/restartScope.ts
25980
- import { realpathSync as realpathSync5 } from "fs";
26006
+ import { realpathSync as realpathSync6 } from "fs";
25981
26007
  var MODULE_FILE, DOCUMENT_FILE, realPath = (path) => {
25982
26008
  try {
25983
- return realpathSync5(path);
26009
+ return realpathSync6(path);
25984
26010
  } catch {
25985
26011
  return path;
25986
26012
  }
@@ -25997,8 +26023,8 @@ var init_restartScope = __esm(() => {
25997
26023
  });
25998
26024
 
25999
26025
  // src/islands/pageMetadata.ts
26000
- import { readFileSync as readFileSync31 } from "fs";
26001
- import { dirname as dirname28, resolve as resolve39 } from "path";
26026
+ import { readFileSync as readFileSync32 } from "fs";
26027
+ import { dirname as dirname29, resolve as resolve41 } from "path";
26002
26028
  var pagePatterns, getPageDirs = (config) => [
26003
26029
  { dir: config.angularDirectory, framework: "angular" },
26004
26030
  { dir: config.emberDirectory, framework: "ember" },
@@ -26018,15 +26044,15 @@ var pagePatterns, getPageDirs = (config) => [
26018
26044
  const source = definition.buildReference?.source;
26019
26045
  if (!source)
26020
26046
  continue;
26021
- const resolvedSource = source.startsWith("file://") ? new URL(source).pathname : resolve39(dirname28(buildInfo.resolvedRegistryPath), source);
26022
- lookup.set(`${definition.framework}:${definition.component}`, resolve39(resolvedSource));
26047
+ const resolvedSource = source.startsWith("file://") ? new URL(source).pathname : resolve41(dirname29(buildInfo.resolvedRegistryPath), source);
26048
+ lookup.set(`${definition.framework}:${definition.component}`, resolve41(resolvedSource));
26023
26049
  }
26024
26050
  return lookup;
26025
26051
  }, getCurrentPageIslandMetadata = () => globalThis.__absolutePageIslandMetadata ?? new Map, metadataUsesSource = (metadata, target) => metadata.islands.some((usage) => {
26026
26052
  const candidate = usage.source;
26027
- return candidate ? resolve39(candidate) === target : false;
26053
+ return candidate ? resolve41(candidate) === target : false;
26028
26054
  }), getPagesUsingIslandSource = (sourcePath) => {
26029
- const target = resolve39(sourcePath);
26055
+ const target = resolve41(sourcePath);
26030
26056
  return [...getCurrentPageIslandMetadata().values()].filter((metadata) => metadataUsesSource(metadata, target)).map((metadata) => metadata.pagePath);
26031
26057
  }, resolveIslandUsages = (islands, islandSourceLookup) => islands.map((usage) => {
26032
26058
  const sourcePath = islandSourceLookup.get(`${usage.framework}:${usage.component}`);
@@ -26038,13 +26064,13 @@ var pagePatterns, getPageDirs = (config) => [
26038
26064
  const pattern = pagePatterns[entry.framework];
26039
26065
  if (!pattern)
26040
26066
  return;
26041
- const files = await scanEntryPoints(resolve39(entry.dir), pattern);
26067
+ const files = await scanEntryPoints(resolve41(entry.dir), pattern);
26042
26068
  for (const filePath of files) {
26043
- const source = readFileSync31(filePath, "utf-8");
26069
+ const source = readFileSync32(filePath, "utf-8");
26044
26070
  const islands = extractIslandUsagesFromSource(source);
26045
- pageMetadata.set(resolve39(filePath), {
26071
+ pageMetadata.set(resolve41(filePath), {
26046
26072
  islands: resolveIslandUsages(islands, islandSourceLookup),
26047
- pagePath: resolve39(filePath)
26073
+ pagePath: resolve41(filePath)
26048
26074
  });
26049
26075
  }
26050
26076
  }, loadPageIslandMetadata = async (config) => {
@@ -26071,10 +26097,10 @@ var init_pageMetadata = __esm(() => {
26071
26097
  });
26072
26098
 
26073
26099
  // src/dev/fileHashTracker.ts
26074
- import { readFileSync as readFileSync32, statSync as statSync7 } from "fs";
26100
+ import { readFileSync as readFileSync33, statSync as statSync7 } from "fs";
26075
26101
  var computeFileHash = (filePath) => {
26076
26102
  try {
26077
- const fileContent = readFileSync32(filePath);
26103
+ const fileContent = readFileSync33(filePath);
26078
26104
  return Number(Bun.hash(fileContent));
26079
26105
  } catch {
26080
26106
  return UNFOUND_INDEX;
@@ -26162,9 +26188,9 @@ var init_transformCache = __esm(() => {
26162
26188
  });
26163
26189
 
26164
26190
  // src/dev/reactComponentClassifier.ts
26165
- import { resolve as resolve40 } from "path";
26191
+ import { resolve as resolve42 } from "path";
26166
26192
  var classifyComponent = (filePath) => {
26167
- const normalizedPath = resolve40(filePath);
26193
+ const normalizedPath = resolve42(filePath);
26168
26194
  if (normalizedPath.includes("/react/pages/")) {
26169
26195
  return "server";
26170
26196
  }
@@ -26176,7 +26202,7 @@ var classifyComponent = (filePath) => {
26176
26202
  var init_reactComponentClassifier = () => {};
26177
26203
 
26178
26204
  // src/dev/moduleMapper.ts
26179
- import { basename as basename18, resolve as resolve41 } from "path";
26205
+ import { basename as basename18, resolve as resolve43 } from "path";
26180
26206
  var buildModulePaths = (moduleKeys, manifest) => {
26181
26207
  const modulePaths = {};
26182
26208
  moduleKeys.forEach((key) => {
@@ -26186,7 +26212,7 @@ var buildModulePaths = (moduleKeys, manifest) => {
26186
26212
  });
26187
26213
  return modulePaths;
26188
26214
  }, processChangedFile = (sourceFile, framework, manifest, resolvedPaths, processedFiles) => {
26189
- const normalizedFile = resolve41(sourceFile);
26215
+ const normalizedFile = resolve43(sourceFile);
26190
26216
  const normalizedPath = normalizedFile.replace(/\\/g, "/");
26191
26217
  if (processedFiles.has(normalizedFile)) {
26192
26218
  return null;
@@ -26222,7 +26248,7 @@ var buildModulePaths = (moduleKeys, manifest) => {
26222
26248
  });
26223
26249
  return grouped;
26224
26250
  }, mapSourceFileToManifestKeys = (sourceFile, framework, resolvedPaths) => {
26225
- const normalizedFile = resolve41(sourceFile);
26251
+ const normalizedFile = resolve43(sourceFile);
26226
26252
  const fileName = basename18(normalizedFile);
26227
26253
  const baseName = fileName.replace(/\.(tsx?|jsx?|vue|svelte|css|html)$/, "");
26228
26254
  const pascalName = toPascal(baseName);
@@ -26278,7 +26304,7 @@ var init_moduleMapper = __esm(() => {
26278
26304
 
26279
26305
  // src/utils/spaRouteCss.ts
26280
26306
  import { readFile as readFile8 } from "fs/promises";
26281
- import { dirname as dirname29, isAbsolute as isAbsolute8, resolve as resolve42 } from "path";
26307
+ import { dirname as dirname30, isAbsolute as isAbsolute8, resolve as resolve44 } from "path";
26282
26308
  var sideManifestCache, readSideManifest = async (sideManifestPath) => {
26283
26309
  const cached = sideManifestCache.get(sideManifestPath);
26284
26310
  if (cached !== undefined)
@@ -26316,7 +26342,7 @@ var sideManifestCache, readSideManifest = async (sideManifestPath) => {
26316
26342
  }, readChildCss = async (cssPath, sideManifestPath) => {
26317
26343
  if (!cssPath)
26318
26344
  return "";
26319
- const resolvedCssPath = isAbsolute8(cssPath) ? cssPath : resolve42(dirname29(sideManifestPath), cssPath);
26345
+ const resolvedCssPath = isAbsolute8(cssPath) ? cssPath : resolve44(dirname30(sideManifestPath), cssPath);
26320
26346
  const cached = childCssCache.get(resolvedCssPath);
26321
26347
  if (cached !== undefined)
26322
26348
  return cached;
@@ -26399,8 +26425,8 @@ __export(exports_resolveOwningComponents, {
26399
26425
  resolveDescendantsOfParent: () => resolveDescendantsOfParent,
26400
26426
  resolveOwningComponents: () => resolveOwningComponents
26401
26427
  });
26402
- import { readdirSync as readdirSync11, readFileSync as readFileSync33, statSync as statSync8 } from "fs";
26403
- import { dirname as dirname30, extname as extname15, join as join51, resolve as resolve43 } from "path";
26428
+ import { readdirSync as readdirSync11, readFileSync as readFileSync34, statSync as statSync8 } from "fs";
26429
+ import { dirname as dirname31, extname as extname15, join as join51, resolve as resolve45 } from "path";
26404
26430
  import ts19 from "typescript";
26405
26431
  var ENTITY_DECORATORS, isAngularSourceFile = (file) => file.endsWith(".ts") || file.endsWith(".tsx"), walkAngularSourceFiles = (root) => {
26406
26432
  const out = [];
@@ -26459,7 +26485,7 @@ var ENTITY_DECORATORS, isAngularSourceFile = (file) => file.endsWith(".ts") || f
26459
26485
  }, parseDecoratedClasses = (filePath) => {
26460
26486
  let source;
26461
26487
  try {
26462
- source = readFileSync33(filePath, "utf8");
26488
+ source = readFileSync34(filePath, "utf8");
26463
26489
  } catch {
26464
26490
  return [];
26465
26491
  }
@@ -26513,7 +26539,7 @@ var ENTITY_DECORATORS, isAngularSourceFile = (file) => file.endsWith(".ts") || f
26513
26539
  };
26514
26540
  visit(sourceFile);
26515
26541
  return out;
26516
- }, safeNormalize = (path) => resolve43(path).replace(/\\/g, "/"), resolveOwningComponents = (params) => {
26542
+ }, safeNormalize = (path) => resolve45(path).replace(/\\/g, "/"), resolveOwningComponents = (params) => {
26517
26543
  const { changedFilePath, userAngularRoot } = params;
26518
26544
  const changedAbs = safeNormalize(changedFilePath);
26519
26545
  const out = [];
@@ -26549,12 +26575,12 @@ var ENTITY_DECORATORS, isAngularSourceFile = (file) => file.endsWith(".ts") || f
26549
26575
  }, indexByRoot, resolveParentClassFile = (parentName, childFilePath, angularRoot) => {
26550
26576
  let source;
26551
26577
  try {
26552
- source = readFileSync33(childFilePath, "utf8");
26578
+ source = readFileSync34(childFilePath, "utf8");
26553
26579
  } catch {
26554
26580
  return null;
26555
26581
  }
26556
26582
  const sourceFile = ts19.createSourceFile(childFilePath, source, ts19.ScriptTarget.ES2022, true, ts19.ScriptKind.TS);
26557
- const childDir = dirname30(childFilePath);
26583
+ const childDir = dirname31(childFilePath);
26558
26584
  for (const stmt of sourceFile.statements) {
26559
26585
  if (!ts19.isImportDeclaration(stmt))
26560
26586
  continue;
@@ -26582,7 +26608,7 @@ var ENTITY_DECORATORS, isAngularSourceFile = (file) => file.endsWith(".ts") || f
26582
26608
  if (!spec.startsWith(".") && !spec.startsWith("/")) {
26583
26609
  return null;
26584
26610
  }
26585
- const base = resolve43(childDir, spec);
26611
+ const base = resolve45(childDir, spec);
26586
26612
  const candidates = [
26587
26613
  `${base}.ts`,
26588
26614
  `${base}.tsx`,
@@ -26611,7 +26637,7 @@ var ENTITY_DECORATORS, isAngularSourceFile = (file) => file.endsWith(".ts") || f
26611
26637
  const parentFile = new Map;
26612
26638
  for (const tsPath of walkAngularSourceFiles(userAngularRoot)) {
26613
26639
  const classes = parseDecoratedClasses(tsPath);
26614
- const componentDir = dirname30(tsPath);
26640
+ const componentDir = dirname31(tsPath);
26615
26641
  for (const cls of classes) {
26616
26642
  const entity = {
26617
26643
  className: cls.className,
@@ -26620,7 +26646,7 @@ var ENTITY_DECORATORS, isAngularSourceFile = (file) => file.endsWith(".ts") || f
26620
26646
  };
26621
26647
  if (cls.kind === "component") {
26622
26648
  for (const url of [...cls.templateUrls, ...cls.styleUrls]) {
26623
- const abs = safeNormalize(resolve43(componentDir, url));
26649
+ const abs = safeNormalize(resolve45(componentDir, url));
26624
26650
  const existing = resource.get(abs);
26625
26651
  if (existing)
26626
26652
  existing.push(entity);
@@ -26888,7 +26914,7 @@ var init_webSocket = __esm(() => {
26888
26914
  });
26889
26915
 
26890
26916
  // src/utils/loadConfig.ts
26891
- import { resolve as resolve44 } from "path";
26917
+ import { resolve as resolve46 } from "path";
26892
26918
  var RESERVED_TOP_LEVEL_KEYS, isObject2 = (value) => typeof value === "object" && value !== null, isCommandService = (service) => service.kind === "command" || Array.isArray(service.command), isServiceCandidate = (value) => isObject2(value) && (typeof value.entry === "string" || Array.isArray(value.command)), isWorkspaceConfig = (config) => {
26893
26919
  if (!isObject2(config)) {
26894
26920
  return false;
@@ -26939,7 +26965,7 @@ var RESERVED_TOP_LEVEL_KEYS, isObject2 = (value) => typeof value === "object" &&
26939
26965
  }
26940
26966
  return config;
26941
26967
  }, loadRawConfig = async (configPath) => {
26942
- const resolved = resolve44(configPath ?? process.env.ABSOLUTE_CONFIG ?? "absolute.config.ts");
26968
+ const resolved = resolve46(configPath ?? process.env.ABSOLUTE_CONFIG ?? "absolute.config.ts");
26943
26969
  const mod = await import(resolved);
26944
26970
  const config = mod.default ?? mod.config;
26945
26971
  if (!config) {
@@ -27065,15 +27091,15 @@ var init_hotResources = __esm(() => {
27065
27091
  });
27066
27092
 
27067
27093
  // src/plugins/openApiPlugin.ts
27068
- import { existsSync as existsSync40, readFileSync as readFileSync34 } from "fs";
27094
+ import { existsSync as existsSync41, readFileSync as readFileSync35 } from "fs";
27069
27095
  import { join as join52 } from "path";
27070
27096
  var FALLBACK_NAME = "AbsoluteJS API", FALLBACK_VERSION = "1.0.0", projectInfo = (cwd) => {
27071
27097
  const path = join52(cwd, "package.json");
27072
- if (!existsSync40(path)) {
27098
+ if (!existsSync41(path)) {
27073
27099
  return { name: FALLBACK_NAME, version: FALLBACK_VERSION };
27074
27100
  }
27075
27101
  try {
27076
- const pkg = JSON.parse(readFileSync34(path, "utf-8"));
27102
+ const pkg = JSON.parse(readFileSync35(path, "utf-8"));
27077
27103
  return {
27078
27104
  name: typeof pkg.name === "string" ? pkg.name : FALLBACK_NAME,
27079
27105
  version: typeof pkg.version === "string" ? pkg.version : FALLBACK_VERSION
@@ -27122,14 +27148,14 @@ var FALLBACK_NAME = "AbsoluteJS API", FALLBACK_VERSION = "1.0.0", projectInfo =
27122
27148
  var init_openApiPlugin = () => {};
27123
27149
 
27124
27150
  // src/plugins/telemetryPlugin.ts
27125
- import { existsSync as existsSync41, readFileSync as readFileSync35 } from "fs";
27151
+ import { existsSync as existsSync42, readFileSync as readFileSync36 } from "fs";
27126
27152
  import { join as join53 } from "path";
27127
27153
  var OTEL_PACKAGE = "@elysia/opentelemetry", readPackageName = (cwd) => {
27128
27154
  const path = join53(cwd, "package.json");
27129
- if (!existsSync41(path))
27155
+ if (!existsSync42(path))
27130
27156
  return null;
27131
27157
  try {
27132
- const pkg = JSON.parse(readFileSync35(path, "utf-8"));
27158
+ const pkg = JSON.parse(readFileSync36(path, "utf-8"));
27133
27159
  return typeof pkg.name === "string" ? pkg.name : null;
27134
27160
  } catch {
27135
27161
  return null;
@@ -27522,7 +27548,7 @@ var init_requestContext = __esm(() => {
27522
27548
  });
27523
27549
 
27524
27550
  // src/core/loadIslandRegistry.ts
27525
- import { resolve as resolve45 } from "path";
27551
+ import { resolve as resolve47 } from "path";
27526
27552
  var isRecord6 = (value) => typeof value === "object" && value !== null, resolveRegistryExport2 = (mod) => {
27527
27553
  if (isRecord6(mod.islandRegistry))
27528
27554
  return mod.islandRegistry;
@@ -27530,7 +27556,7 @@ var isRecord6 = (value) => typeof value === "object" && value !== null, resolveR
27530
27556
  return mod.default;
27531
27557
  throw new Error("Island registry module must export `islandRegistry` or a default registry object.");
27532
27558
  }, isRegistryModuleExport = (value) => isRecord6(value), isIslandRegistryInput = (value) => isRecord6(value), loadIslandRegistry = async (registryPath) => {
27533
- const resolvedRegistryPath = resolve45(registryPath);
27559
+ const resolvedRegistryPath = resolve47(registryPath);
27534
27560
  const buildInfo = await loadIslandRegistryBuildInfo(resolvedRegistryPath);
27535
27561
  if (buildInfo.definitions.length > 0) {
27536
27562
  return buildInfo.registry;
@@ -27737,12 +27763,12 @@ var exports_config = {};
27737
27763
  __export(exports_config, {
27738
27764
  normalizeAbsoluteMobileConfig: () => normalizeAbsoluteMobileConfig
27739
27765
  });
27740
- import { readFileSync as readFileSync36 } from "fs";
27741
- import { resolve as resolve46 } from "path";
27766
+ import { readFileSync as readFileSync37 } from "fs";
27767
+ import { resolve as resolve48 } from "path";
27742
27768
  import { createHash as createHash4, createPublicKey, X509Certificate } from "crypto";
27743
27769
  var APP_ID_PATTERN, SCHEME_PATTERN, APPLE_APP_ID_PREFIX_PATTERN, CERTIFICATE_FINGERPRINT_PATTERN, UPDATE_NAME_PATTERN, RELEASE_TARGET_PATTERN, UPDATE_PUBLIC_KEY_PATTERN, ENVIRONMENT_NAME_PATTERN, COLOR_PATTERN, DEFAULT_UPDATE_BOOT_TIMEOUT_MS = 20000, DEFAULT_UPDATE_HEALTH_FAILURE_RATE = 0.2, DEFAULT_UPDATE_HEALTH_MINIMUM_REPORTS = 20, DEFAULT_UPDATE_ROLLOUT_FAILURE_RATE = 0.05, DEFAULT_UPDATE_ROLLOUT_OBSERVATION_MINUTES = 60, MINUTE_MS, DEFAULT_UPDATE_ROLLOUT_STAGES, MINIMUM_UPDATE_BOOT_TIMEOUT_MS = 5000, MAXIMUM_UPDATE_BOOT_TIMEOUT_MS = 120000, HOSTNAME_PATTERN, EXPO_RESERVED_ROUTE_PREFIXES, resolveProjectPath = (projectRoot, value, field) => {
27744
- const root = resolve46(projectRoot);
27745
- const path = resolve46(root, value);
27770
+ const root = resolve48(projectRoot);
27771
+ const path = resolve48(root, value);
27746
27772
  if (path !== root && !path.startsWith(`${root}/`)) {
27747
27773
  throw new TypeError(`${field} must remain inside the project root.`);
27748
27774
  }
@@ -27936,7 +27962,7 @@ var APP_ID_PATTERN, SCHEME_PATTERN, APPLE_APP_ID_PREFIX_PATTERN, CERTIFICATE_FIN
27936
27962
  }))
27937
27963
  ].sort(), readExpoCodeSigningCertificate = (certificatePath) => {
27938
27964
  try {
27939
- const certificateSource = readFileSync36(certificatePath, "utf8");
27965
+ const certificateSource = readFileSync37(certificatePath, "utf8");
27940
27966
  const certificatePem = certificateSource.endsWith(`
27941
27967
  `) ? certificateSource : `${certificateSource}
27942
27968
  `;
@@ -28261,7 +28287,7 @@ import {
28261
28287
  rm as rm11,
28262
28288
  writeFile as writeFile10
28263
28289
  } from "fs/promises";
28264
- import { resolve as resolve47 } from "path";
28290
+ import { resolve as resolve49 } from "path";
28265
28291
  import { Elysia as Elysia4 } from "elysia";
28266
28292
  var JSON_HEADERS, OWNERSHIP_FILE = ".absolutejs-mobile-associations.json", HTTP_OK = 200, VERIFY_TIMEOUT_MS = 1e4, ANDROID_ASSOCIATION_PATH = "/.well-known/assetlinks.json", APPLE_ASSOCIATION_PATH = "/.well-known/apple-app-site-association", missingIdentity = (field, platform) => new TypeError(`${field} is required to publish ${platform} deep-link association files.`), createAppleDocument = (config, requireAll) => {
28267
28293
  if (!config.platforms.includes("ios"))
@@ -28348,7 +28374,7 @@ var JSON_HEADERS, OWNERSHIP_FILE = ".absolutejs-mobile-associations.json", HTTP_
28348
28374
  return false;
28349
28375
  }
28350
28376
  }, assertOwnedOutput = async (root) => {
28351
- const path = resolve47(root, OWNERSHIP_FILE);
28377
+ const path = resolve49(root, OWNERSHIP_FILE);
28352
28378
  let ownership;
28353
28379
  try {
28354
28380
  ownership = JSON.parse(await readFile9(path, "utf8"));
@@ -28375,10 +28401,10 @@ var JSON_HEADERS, OWNERSHIP_FILE = ".absolutejs-mobile-associations.json", HTTP_
28375
28401
  if (hasCurrent)
28376
28402
  await rm11(backup, { force: true, recursive: true });
28377
28403
  }, materializeHost = async (root, host, files) => {
28378
- const directory = resolve47(root, host, ".well-known");
28404
+ const directory = resolve49(root, host, ".well-known");
28379
28405
  await mkdir12(directory, { recursive: true });
28380
28406
  return Promise.all(files.map(async ([name, document2]) => {
28381
- const path = resolve47(directory, name);
28407
+ const path = resolve49(directory, name);
28382
28408
  await writeAtomic(path, `${JSON.stringify(document2, null, 2)}
28383
28409
  `);
28384
28410
  return path;
@@ -28401,7 +28427,7 @@ var JSON_HEADERS, OWNERSHIP_FILE = ".absolutejs-mobile-associations.json", HTTP_
28401
28427
  });
28402
28428
  return endpoints;
28403
28429
  }), materializeAbsoluteMobileAssociationFiles = async (config, outputDirectory) => {
28404
- const root = resolve47(outputDirectory);
28430
+ const root = resolve49(outputDirectory);
28405
28431
  const temporary = `${root}.${crypto.randomUUID()}.tmp`;
28406
28432
  const documents = createAbsoluteMobileAssociationDocuments(config, {
28407
28433
  requireAll: true
@@ -28415,10 +28441,10 @@ var JSON_HEADERS, OWNERSHIP_FILE = ".absolutejs-mobile-associations.json", HTTP_
28415
28441
  await mkdir12(temporary, { recursive: true });
28416
28442
  try {
28417
28443
  const temporaryPaths = (await Promise.all(config.deepLinkHosts.map((host) => materializeHost(temporary, host, files)))).flat();
28418
- await writeAtomic(resolve47(temporary, OWNERSHIP_FILE), `${JSON.stringify({ format: 1, hosts: config.deepLinkHosts }, null, 2)}
28444
+ await writeAtomic(resolve49(temporary, OWNERSHIP_FILE), `${JSON.stringify({ format: 1, hosts: config.deepLinkHosts }, null, 2)}
28419
28445
  `);
28420
28446
  await publishGeneratedDirectory(temporary, root);
28421
- const written = temporaryPaths.map((path) => resolve47(root, path.slice(temporary.length + 1)));
28447
+ const written = temporaryPaths.map((path) => resolve49(root, path.slice(temporary.length + 1)));
28422
28448
  return { root, written };
28423
28449
  } catch (error) {
28424
28450
  await rm11(temporary, { force: true, recursive: true });
@@ -28538,11 +28564,11 @@ var init_mobilePreview = __esm(() => {
28538
28564
  });
28539
28565
 
28540
28566
  // src/mobile/nativeAuth.ts
28541
- import { readFileSync as readFileSync37 } from "fs";
28567
+ import { readFileSync as readFileSync38 } from "fs";
28542
28568
  import { join as join54 } from "path";
28543
28569
  var ABSOLUTE_AUTH_PACKAGE = "@absolutejs/auth", ABSOLUTE_EXPO_AUTH_CORE_VERSION = "0.76.3", ABSOLUTE_EXPO_AUTH_PACKAGE = "@absolutejs/auth-expo", ABSOLUTE_EXPO_AUTH_VERSION = "0.0.6", ABSOLUTE_EXPO_SYNC_CORE_VERSION = "2.31.0", ABSOLUTE_EXPO_SYNC_PACKAGE = "@absolutejs/sync-expo", ABSOLUTE_EXPO_SYNC_VERSION = "0.0.4", ABSOLUTE_NATIVE_AUTH_CLIENTS_ENV = "ABSOLUTE_AUTH_NATIVE_CLIENTS", ABSOLUTE_NATIVE_AUTH_SCOPES, ABSOLUTE_SYNC_PACKAGE = "@absolutejs/sync", readPackageManifest = (projectRoot) => {
28544
28570
  try {
28545
- return JSON.parse(readFileSync37(join54(projectRoot, "package.json"), "utf8"));
28571
+ return JSON.parse(readFileSync38(join54(projectRoot, "package.json"), "utf8"));
28546
28572
  } catch {
28547
28573
  return;
28548
28574
  }
@@ -29207,12 +29233,12 @@ import {
29207
29233
  X509Certificate as X509Certificate3
29208
29234
  } from "crypto";
29209
29235
  import { access as access4, mkdir as mkdir13 } from "fs/promises";
29210
- import { dirname as dirname31, isAbsolute as isAbsolute9, relative as relative21, resolve as resolve48, sep as sep7 } from "path";
29236
+ import { dirname as dirname32, isAbsolute as isAbsolute9, relative as relative21, resolve as resolve50, sep as sep7 } from "path";
29211
29237
  import { pathToFileURL as pathToFileURL3 } from "url";
29212
29238
  import { Elysia as Elysia6 } from "elysia";
29213
29239
  var ABSOLUTE_MOBILE_UPDATE_SERVER_FORMAT = 1, DEFAULT_MOBILE_UPDATE_REGISTRY_MODULE = "mobile.update.ts", object4 = (value) => typeof value === "object" && value !== null && !Array.isArray(value), projectPath = (projectRoot, requested) => {
29214
- const root = resolve48(projectRoot);
29215
- const path = resolve48(root, requested);
29240
+ const root = resolve50(projectRoot);
29241
+ const path = resolve50(root, requested);
29216
29242
  const projectRelative = relative21(root, path);
29217
29243
  if (projectRelative === ".." || projectRelative.startsWith(`..${sep7}`) || isAbsolute9(projectRelative))
29218
29244
  throw new TypeError("mobile.updates.server.registry must remain inside the project.");
@@ -29432,7 +29458,7 @@ ${generated}`);
29432
29458
  return;
29433
29459
  });
29434
29460
  }
29435
- await mkdir13(dirname31(path), { recursive: true });
29461
+ await mkdir13(dirname32(path), { recursive: true });
29436
29462
  await Bun.write(path, renderAbsoluteMobileUpdateRegistry({
29437
29463
  ...options.health ? { health: options.health } : {},
29438
29464
  ...options.rollout ? { rollout: options.rollout } : {},
@@ -29483,7 +29509,7 @@ var init_bridgeInternals = __esm(() => {
29483
29509
  });
29484
29510
 
29485
29511
  // src/dev/angular/hmrCompiler.ts
29486
- import { dirname as dirname32, relative as relative22, resolve as resolve49 } from "path";
29512
+ import { dirname as dirname33, relative as relative22, resolve as resolve51 } from "path";
29487
29513
  import { performance as performance2 } from "perf_hooks";
29488
29514
  var encodeHmrComponentId = (absoluteFilePath, className) => {
29489
29515
  const projectRel = relative22(process.cwd(), absoluteFilePath).replace(/\\/g, "/");
@@ -29495,7 +29521,7 @@ var encodeHmrComponentId = (absoluteFilePath, className) => {
29495
29521
  return null;
29496
29522
  const filePathRel = decoded.slice(0, separatorIndex);
29497
29523
  const className = decoded.slice(separatorIndex + 1);
29498
- const componentFilePath = resolve49(process.cwd(), filePathRel);
29524
+ const componentFilePath = resolve51(process.cwd(), filePathRel);
29499
29525
  const projectRelPath = relative22(process.cwd(), componentFilePath).replace(/\\/g, "/");
29500
29526
  const cacheKey = encodeURIComponent(`${projectRelPath}@${className}`);
29501
29527
  await Promise.resolve().then(() => init_fastHmrCompiler());
@@ -29506,7 +29532,7 @@ var encodeHmrComponentId = (absoluteFilePath, className) => {
29506
29532
  await Promise.resolve().then(() => init_resolveOwningComponents());
29507
29533
  const owners = resolveOwningComponents({
29508
29534
  changedFilePath: componentFilePath,
29509
- userAngularRoot: dirname32(componentFilePath)
29535
+ userAngularRoot: dirname33(componentFilePath)
29510
29536
  });
29511
29537
  const owner = owners.find((o) => o.className === className);
29512
29538
  const kind = owner?.kind ?? "component";
@@ -29700,17 +29726,17 @@ var init_hmr = __esm(() => {
29700
29726
  });
29701
29727
 
29702
29728
  // src/plugins/devtoolsJson.ts
29703
- import { existsSync as existsSync42, mkdirSync as mkdirSync14, readFileSync as readFileSync38, writeFileSync as writeFileSync10 } from "fs";
29704
- import { dirname as dirname33, join as join57, resolve as resolve50 } from "path";
29729
+ import { existsSync as existsSync43, mkdirSync as mkdirSync14, readFileSync as readFileSync39, writeFileSync as writeFileSync10 } from "fs";
29730
+ import { dirname as dirname34, join as join57, resolve as resolve52 } from "path";
29705
29731
  import { Elysia as Elysia8 } from "elysia";
29706
29732
  var ENDPOINT = "/.well-known/appspecific/com.chrome.devtools.json", UUID_CACHE_KEY = "__absoluteDevtoolsWorkspaceUuid", getGlobalUuid = () => Reflect.get(globalThis, UUID_CACHE_KEY), setGlobalUuid = (uuid) => {
29707
29733
  Reflect.set(globalThis, UUID_CACHE_KEY, uuid);
29708
29734
  return uuid;
29709
- }, isUuidV4 = (value) => /^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i.test(value), resolveDevtoolsUuidCachePath = (buildDir, uuidCachePath) => resolve50(uuidCachePath ?? join57(buildDir, ".absolute", "chrome-devtools-workspace-uuid")), readCachedUuid = (cachePath) => {
29710
- if (!existsSync42(cachePath))
29735
+ }, isUuidV4 = (value) => /^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i.test(value), resolveDevtoolsUuidCachePath = (buildDir, uuidCachePath) => resolve52(uuidCachePath ?? join57(buildDir, ".absolute", "chrome-devtools-workspace-uuid")), readCachedUuid = (cachePath) => {
29736
+ if (!existsSync43(cachePath))
29711
29737
  return null;
29712
29738
  try {
29713
- const value = readFileSync38(cachePath, "utf-8").trim();
29739
+ const value = readFileSync39(cachePath, "utf-8").trim();
29714
29740
  return isUuidV4(value) ? value : null;
29715
29741
  } catch {
29716
29742
  return null;
@@ -29728,11 +29754,11 @@ var ENDPOINT = "/.well-known/appspecific/com.chrome.devtools.json", UUID_CACHE_K
29728
29754
  if (cachedUuid)
29729
29755
  return setGlobalUuid(cachedUuid);
29730
29756
  const uuid = crypto.randomUUID();
29731
- mkdirSync14(dirname33(cachePath), { recursive: true });
29757
+ mkdirSync14(dirname34(cachePath), { recursive: true });
29732
29758
  writeFileSync10(cachePath, uuid, "utf-8");
29733
29759
  return setGlobalUuid(uuid);
29734
29760
  }, devtoolsJson = (buildDir, options = {}) => {
29735
- const rootPath = resolve50(options.projectRoot ?? process.cwd());
29761
+ const rootPath = resolve52(options.projectRoot ?? process.cwd());
29736
29762
  const root = options.normalizeForWindowsContainer === false ? rootPath : normalizeDevtoolsWorkspaceRoot(rootPath);
29737
29763
  const uuid = getOrCreateUuid(buildDir, options);
29738
29764
  return new Elysia8({ name: "absolute-devtools-json" }).get(ENDPOINT, () => ({
@@ -29756,13 +29782,13 @@ var ENDPOINT = "/.well-known/appspecific/com.chrome.devtools.json", UUID_CACHE_K
29756
29782
  var init_devtoolsJson = () => {};
29757
29783
 
29758
29784
  // src/plugins/imageOptimizer.ts
29759
- import { existsSync as existsSync43 } from "fs";
29760
- import { resolve as resolve51 } from "path";
29785
+ import { existsSync as existsSync44 } from "fs";
29786
+ import { resolve as resolve53 } from "path";
29761
29787
  import { Elysia as Elysia9 } from "elysia";
29762
29788
  var DEFAULT_CACHE_TTL_SECONDS = 60, MS_PER_SECOND = 1000, MAX_QUALITY = 100, avifInProgress, safeResolve = (path, baseDir) => {
29763
29789
  try {
29764
29790
  const resolved = validateSafePath(path, baseDir);
29765
- if (existsSync43(resolved))
29791
+ if (existsSync44(resolved))
29766
29792
  return resolved;
29767
29793
  return null;
29768
29794
  } catch {
@@ -29770,7 +29796,7 @@ var DEFAULT_CACHE_TTL_SECONDS = 60, MS_PER_SECOND = 1000, MAX_QUALITY = 100, avi
29770
29796
  }
29771
29797
  }, resolveLocalImage = (url, buildDir) => {
29772
29798
  const cleanPath = url.startsWith("/") ? url.slice(1) : url;
29773
- return safeResolve(cleanPath, buildDir) ?? safeResolve(cleanPath, resolve51(process.cwd()));
29799
+ return safeResolve(cleanPath, buildDir) ?? safeResolve(cleanPath, resolve53(process.cwd()));
29774
29800
  }, parseQueryParams = (query, allowedSizes, defaultQuality) => {
29775
29801
  const url = typeof query["url"] === "string" ? query["url"] : undefined;
29776
29802
  const wParam = typeof query["w"] === "string" ? query["w"] : undefined;
@@ -30497,7 +30523,7 @@ import {
30497
30523
  rm as rm14,
30498
30524
  writeFile as writeFile13
30499
30525
  } from "fs/promises";
30500
- import { dirname as dirname34, join as join59, resolve as resolvePath2 } from "path";
30526
+ import { dirname as dirname35, join as join59, resolve as resolvePath2 } from "path";
30501
30527
  import { pathToFileURL as pathToFileURL5 } from "url";
30502
30528
  var ABSOLUTE_MOBILE_MATERIALIZED_BUNDLE_FORMAT = 1, CURRENT_BUNDLE_FILE = "current.json", BUNDLES_DIRECTORY = "bundles", ARTIFACT_FILE2 = "artifact.json", BUNDLE_ID_PATTERN, isRecord9 = (value) => typeof value === "object" && value !== null && !Array.isArray(value), errorHasCode2 = (error, code) => typeof error === "object" && error !== null && Reflect.get(error, "code") === code, bundleIdFor = (currentReleaseId, releases) => {
30503
30529
  const identity = JSON.stringify({
@@ -30530,7 +30556,7 @@ var ABSOLUTE_MOBILE_MATERIALIZED_BUNDLE_FORMAT = 1, CURRENT_BUNDLE_FILE = "curre
30530
30556
  }, writeRelease = async (root, release) => {
30531
30557
  const directory = join59(root, release.artifact.releaseId);
30532
30558
  const producerPath = join59(directory, release.artifact.producer.module);
30533
- await mkdir15(dirname34(producerPath), { recursive: true });
30559
+ await mkdir15(dirname35(producerPath), { recursive: true });
30534
30560
  await Promise.all([
30535
30561
  writeFile13(join59(directory, ARTIFACT_FILE2), `${JSON.stringify(release.artifact, null, "\t")}
30536
30562
  `),
@@ -31168,7 +31194,7 @@ var init_compatibilityDispatcher = __esm(() => {
31168
31194
  });
31169
31195
 
31170
31196
  // src/core/prerender.ts
31171
- import { mkdirSync as mkdirSync15, readFileSync as readFileSync39 } from "fs";
31197
+ import { mkdirSync as mkdirSync15, readFileSync as readFileSync40 } from "fs";
31172
31198
  import { join as join60 } from "path";
31173
31199
  var DEFAULT_FETCH_TIMEOUT_MS = 1e4, PRERENDER_BYPASS_HEADER = "X-Absolute-Prerender-Bypass", routeToFilename = (route) => route === "/" ? "index.html" : `${route.slice(1).replace(/\//g, "-")}.html`, writeTimestamp = async (htmlPath) => {
31174
31200
  const metaPath = htmlPath.replace(/\.html$/, ".meta");
@@ -31176,7 +31202,7 @@ var DEFAULT_FETCH_TIMEOUT_MS = 1e4, PRERENDER_BYPASS_HEADER = "X-Absolute-Preren
31176
31202
  }, readTimestamp = (htmlPath) => {
31177
31203
  const metaPath = htmlPath.replace(/\.html$/, ".meta");
31178
31204
  try {
31179
- const content = readFileSync39(metaPath, "utf-8");
31205
+ const content = readFileSync40(metaPath, "utf-8");
31180
31206
  return Number(content) || 0;
31181
31207
  } catch {
31182
31208
  return 0;
@@ -31212,7 +31238,7 @@ var init_prerender = () => {};
31212
31238
 
31213
31239
  // src/core/prepare.ts
31214
31240
  import { createHash as createHash9 } from "crypto";
31215
- import { existsSync as existsSync44, readdirSync as readdirSync12, readFileSync as readFileSync40 } from "fs";
31241
+ import { existsSync as existsSync45, readdirSync as readdirSync12, readFileSync as readFileSync41 } from "fs";
31216
31242
  import { basename as basename19, join as join61, relative as relative23, resolve as resolvePath3 } from "path";
31217
31243
  import { Elysia as Elysia12, NotFound } from "elysia";
31218
31244
  var MS_PER_SECOND2 = 1000, DEFAULT_PORT2 = 3000, MAX_STATIC_ROUTE_COUNT, STATIC_PLUGIN_RETRY_DELAY_MS = 50, waitForStaticPluginRetry = () => new Promise((resolve) => {
@@ -31341,7 +31367,7 @@ var MS_PER_SECOND2 = 1000, DEFAULT_PORT2 = 3000, MAX_STATIC_ROUTE_COUNT, STATIC_
31341
31367
  if (!fileName)
31342
31368
  continue;
31343
31369
  const srcPath = resolvePath3(devIndexDir, fileName);
31344
- if (!existsSync44(srcPath))
31370
+ if (!existsSync45(srcPath))
31345
31371
  continue;
31346
31372
  manifest[key] = `${SRC_URL_PREFIX}${encodeSrcPath(relative23(process.cwd(), srcPath))}`;
31347
31373
  }
@@ -31356,8 +31382,8 @@ var MS_PER_SECOND2 = 1000, DEFAULT_PORT2 = 3000, MAX_STATIC_ROUTE_COUNT, STATIC_
31356
31382
  const path = href.split("?")[0] ?? href;
31357
31383
  const filePath = join61(buildDir, path);
31358
31384
  let versioned = href;
31359
- if (existsSync44(filePath)) {
31360
- const hash = createHash9("sha256").update(readFileSync40(filePath)).digest("hex").slice(0, ICON_HASH_LENGTH);
31385
+ if (existsSync45(filePath)) {
31386
+ const hash = createHash9("sha256").update(readFileSync41(filePath)).digest("hex").slice(0, ICON_HASH_LENGTH);
31361
31387
  versioned = href.includes("?") ? `${href}&v=${hash}` : `${href}?v=${hash}`;
31362
31388
  }
31363
31389
  cache.set(href, versioned);
@@ -31478,7 +31504,7 @@ var MS_PER_SECOND2 = 1000, DEFAULT_PORT2 = 3000, MAX_STATIC_ROUTE_COUNT, STATIC_
31478
31504
  };
31479
31505
  }, loadPrerenderMap = (prerenderDir) => {
31480
31506
  const map = new Map;
31481
- if (!existsSync44(prerenderDir))
31507
+ if (!existsSync45(prerenderDir))
31482
31508
  return map;
31483
31509
  let entries;
31484
31510
  try {
@@ -31496,7 +31522,7 @@ var MS_PER_SECOND2 = 1000, DEFAULT_PORT2 = 3000, MAX_STATIC_ROUTE_COUNT, STATIC_
31496
31522
  return map;
31497
31523
  }, loadMobileCompatibilityPlugin = async (buildDir) => {
31498
31524
  const root = join61(buildDir, ".absolutejs", "mobile-compatibility");
31499
- if (!existsSync44(join61(root, "current.json"))) {
31525
+ if (!existsSync45(join61(root, "current.json"))) {
31500
31526
  return new Elysia12({ name: "absolutejs-mobile-compatibility-empty" });
31501
31527
  }
31502
31528
  const [
@@ -31552,7 +31578,7 @@ var MS_PER_SECOND2 = 1000, DEFAULT_PORT2 = 3000, MAX_STATIC_ROUTE_COUNT, STATIC_
31552
31578
  return result;
31553
31579
  }
31554
31580
  stepStartedAt = performance.now();
31555
- const manifest = JSON.parse(readFileSync40(`${buildDir}/manifest.json`, "utf-8"));
31581
+ const manifest = JSON.parse(readFileSync41(`${buildDir}/manifest.json`, "utf-8"));
31556
31582
  setCurrentIslandManifest(manifest);
31557
31583
  if (config.islands?.registry) {
31558
31584
  setCurrentIslandRegistry(await loadIslandRegistry(config.islands.registry));
@@ -31561,13 +31587,13 @@ var MS_PER_SECOND2 = 1000, DEFAULT_PORT2 = 3000, MAX_STATIC_ROUTE_COUNT, STATIC_
31561
31587
  recordStep("load production manifest and island metadata", stepStartedAt);
31562
31588
  stepStartedAt = performance.now();
31563
31589
  const conventionsPath = join61(buildDir, "conventions.json");
31564
- if (existsSync44(conventionsPath)) {
31565
- const conventions = JSON.parse(readFileSync40(conventionsPath, "utf-8"));
31590
+ if (existsSync45(conventionsPath)) {
31591
+ const conventions = JSON.parse(readFileSync41(conventionsPath, "utf-8"));
31566
31592
  setConventions(conventions);
31567
31593
  }
31568
31594
  const spaRoutesPath = join61(buildDir, "spa-routes.json");
31569
- if (existsSync44(spaRoutesPath)) {
31570
- setSpaRouteManifest(JSON.parse(readFileSync40(spaRoutesPath, "utf-8")));
31595
+ if (existsSync45(spaRoutesPath)) {
31596
+ setSpaRouteManifest(JSON.parse(readFileSync41(spaRoutesPath, "utf-8")));
31571
31597
  }
31572
31598
  recordStep("load production conventions", stepStartedAt);
31573
31599
  stepStartedAt = performance.now();
@@ -31738,8 +31764,8 @@ __export(exports_moduleServer, {
31738
31764
  warmPage: () => warmPage,
31739
31765
  warnIfReactFastRefreshUnsupported: () => warnIfReactFastRefreshUnsupported
31740
31766
  });
31741
- import { existsSync as existsSync45, readFileSync as readFileSync41, realpathSync as realpathSync6, statSync as statSync9 } from "fs";
31742
- import { basename as basename20, dirname as dirname35, extname as extname16, join as join62, resolve as resolve52, relative as relative24 } from "path";
31767
+ import { existsSync as existsSync46, readFileSync as readFileSync42, realpathSync as realpathSync7, statSync as statSync9 } from "fs";
31768
+ import { basename as basename20, dirname as dirname36, extname as extname16, join as join62, resolve as resolve54, relative as relative24 } from "path";
31743
31769
  var SRC_PREFIX = "/@src/", BROWSER_DEFINE, jsTranspiler2, legacyDecoratorTsconfig, tsTranspiler2, tsxTranspiler, TRANSPILABLE, ALL_EXPORTS_RE, STRING_CONTENTS_RE, preserveTypeExports = (originalSource, transpiled, valueExports) => {
31744
31770
  const codeOnly = originalSource.replace(STRING_CONTENTS_RE, '""');
31745
31771
  const allExports = [];
@@ -31759,10 +31785,10 @@ var SRC_PREFIX = "/@src/", BROWSER_DEFINE, jsTranspiler2, legacyDecoratorTsconfi
31759
31785
  ${stubs}
31760
31786
  `;
31761
31787
  }, resolveRelativeExtension = (srcPath, projectRoot, extensions) => {
31762
- const directHit = extensions.find((ext) => existsSync45(resolve52(projectRoot, srcPath + ext)));
31788
+ const directHit = extensions.find((ext) => existsSync46(resolve54(projectRoot, srcPath + ext)));
31763
31789
  if (directHit)
31764
31790
  return srcPath + directHit;
31765
- const indexHit = extensions.find((ext) => existsSync45(resolve52(projectRoot, srcPath, `index${ext}`)));
31791
+ const indexHit = extensions.find((ext) => existsSync46(resolve54(projectRoot, srcPath, `index${ext}`)));
31766
31792
  if (indexHit)
31767
31793
  return `${srcPath}/index${indexHit}`;
31768
31794
  return srcPath;
@@ -31791,7 +31817,7 @@ ${stubs}
31791
31817
  return invalidationVersion > 0 ? `${mtime}.${invalidationVersion}` : `${mtime}`;
31792
31818
  }, srcUrl = (relPath, projectRoot) => {
31793
31819
  const base = `${SRC_PREFIX}${encodeSrcPath(relPath)}`;
31794
- const absPath = resolve52(projectRoot, relPath);
31820
+ const absPath = resolve54(projectRoot, relPath);
31795
31821
  const cached = mtimeCache.get(absPath);
31796
31822
  if (cached !== undefined)
31797
31823
  return `${base}?v=${buildVersion(cached, absPath)}`;
@@ -31803,12 +31829,12 @@ ${stubs}
31803
31829
  return base;
31804
31830
  }
31805
31831
  }, resolveRelativeImport = (relPath, fileDir, projectRoot, extensions) => {
31806
- const absPath = resolve52(fileDir, relPath);
31832
+ const absPath = resolve54(fileDir, relPath);
31807
31833
  const rel = relative24(projectRoot, absPath);
31808
31834
  const extension = extname16(rel);
31809
31835
  let srcPath = RESOLVED_MODULE_EXTENSIONS.has(extension) ? rel : resolveRelativeExtension(rel, projectRoot, extensions);
31810
31836
  if (extname16(srcPath) === ".svelte") {
31811
- srcPath = relative24(projectRoot, resolveSvelteModulePath(resolve52(projectRoot, srcPath)));
31837
+ srcPath = relative24(projectRoot, resolveSvelteModulePath(resolve54(projectRoot, srcPath)));
31812
31838
  }
31813
31839
  return srcUrl(srcPath, projectRoot);
31814
31840
  }, NODE_BUILTIN_RE, resolveAbsoluteSpecifier = (specifier, projectRoot) => {
@@ -31827,14 +31853,14 @@ ${stubs}
31827
31853
  const packageName = isScoped ? `${parts[0]}/${parts[1]}` : parts[0];
31828
31854
  const subpath = isScoped ? parts.slice(2).join("/") : parts.slice(1).join("/");
31829
31855
  if (!subpath) {
31830
- const pkgDir = resolve52(projectRoot, "node_modules", packageName ?? "");
31856
+ const pkgDir = resolve54(projectRoot, "node_modules", packageName ?? "");
31831
31857
  const pkgJsonPath = join62(pkgDir, "package.json");
31832
- if (existsSync45(pkgJsonPath)) {
31833
- const pkg = JSON.parse(readFileSync41(pkgJsonPath, "utf-8"));
31858
+ if (existsSync46(pkgJsonPath)) {
31859
+ const pkg = JSON.parse(readFileSync42(pkgJsonPath, "utf-8"));
31834
31860
  const esmEntry = typeof pkg.module === "string" && pkg.module || typeof pkg.browser === "string" && pkg.browser;
31835
31861
  if (esmEntry) {
31836
- const resolved = resolve52(pkgDir, esmEntry);
31837
- if (existsSync45(resolved))
31862
+ const resolved = resolve54(pkgDir, esmEntry);
31863
+ if (existsSync46(resolved))
31838
31864
  return relative24(projectRoot, resolved);
31839
31865
  }
31840
31866
  }
@@ -31873,7 +31899,7 @@ ${stubs}
31873
31899
  };
31874
31900
  result = result.replace(/^((?:import\s+[^"'`;]+?\s+from|export\s+[^"'`;]+?\s+from|import)\s*["'])([^"'./][^"']*)(["'])/gm, stubReplace);
31875
31901
  result = result.replace(/(import\s*\(\s*["'])([^"'./][^"']*)(["']\s*\))/g, stubReplace);
31876
- const fileDir = dirname35(filePath);
31902
+ const fileDir = dirname36(filePath);
31877
31903
  result = result.replace(/(from\s*["'])(\.\.?\/[^"']+)(["'])/g, (_match, prefix, relPath, suffix) => isRealImport(relPath) ? `${prefix}${resolveRelativeImport(relPath, fileDir, projectRoot, IMPORT_EXTENSIONS)}${suffix}` : _match);
31878
31904
  result = result.replace(/(import\s*\(\s*["'])(\.\.?\/[^"']+)(["']\s*\))/g, (_match, prefix, relPath, suffix) => isRealImport(relPath) ? `${prefix}${resolveRelativeImport(relPath, fileDir, projectRoot, IMPORT_EXTENSIONS)}${suffix}` : _match);
31879
31905
  result = result.replace(/(import\s*["'])(\.\.?\/[^"']+)(["']\s*;?)/g, (_match, prefix, relPath, suffix) => isRealImport(relPath) ? `${prefix}${resolveRelativeImport(relPath, fileDir, projectRoot, SIDE_EFFECT_EXTENSIONS)}${suffix}` : _match);
@@ -31882,7 +31908,7 @@ ${stubs}
31882
31908
  const rel = relative24(projectRoot, absPath).replace(/\\/g, "/");
31883
31909
  return `${prefix}${srcUrl(rel, projectRoot)}${suffix}`;
31884
31910
  }
31885
- if (!existsSync45(absPath))
31911
+ if (!existsSync46(absPath))
31886
31912
  return _match;
31887
31913
  const rel = relative24(projectRoot, absPath).replace(/\\/g, "/");
31888
31914
  return `${prefix}${srcUrl(rel, projectRoot)}${suffix}`;
@@ -31890,12 +31916,12 @@ ${stubs}
31890
31916
  result = result.replace(/((?:from|import)\s*["'])(\/[^"']+\.(tsx?|jsx?|ts))(["'])/g, rewriteAbsoluteToSrc);
31891
31917
  result = result.replace(/(import\s*\(\s*["'])(\/[^"']+\.(tsx?|jsx?|ts))(["']\s*\))/g, rewriteAbsoluteToSrc);
31892
31918
  result = result.replace(/new\s+URL\(\s*["'](\.\.?\/[^"']+)["']\s*,\s*import\.meta\.url\s*\)/g, (_match, relPath) => {
31893
- const absPath = resolve52(fileDir, relPath);
31919
+ const absPath = resolve54(fileDir, relPath);
31894
31920
  const rel = relative24(projectRoot, absPath);
31895
31921
  return `new URL('${srcUrl(rel, projectRoot)}', import.meta.url)`;
31896
31922
  });
31897
31923
  result = result.replace(/import\.meta\.resolve\(\s*["'](\.\.?\/[^"']+)["']\s*\)/g, (_match, relPath) => {
31898
- const absPath = resolve52(fileDir, relPath);
31924
+ const absPath = resolve54(fileDir, relPath);
31899
31925
  const rel = relative24(projectRoot, absPath);
31900
31926
  return `'${srcUrl(rel, projectRoot)}'`;
31901
31927
  });
@@ -31941,7 +31967,7 @@ ${code}`;
31941
31967
  reactFastRefreshWarningEmitted = true;
31942
31968
  logWarn("React edits remount the page instead of keeping component state: " + "this Bun ignores `reactFastRefresh` on Bun.Transpiler " + "(https://github.com/oven-sh/bun/issues/32919). Run " + "`absolute bun-patch install` to use AbsoluteJS's patched Bun, " + "which has the fix; `absolute dev` then uses it automatically.");
31943
31969
  }, transformReactFile = (filePath, projectRoot, rewriter) => {
31944
- const raw = readFileSync41(filePath, "utf-8");
31970
+ const raw = readFileSync42(filePath, "utf-8");
31945
31971
  const valueExports = tsxTranspiler.scan(raw).exports;
31946
31972
  let transpiled = reactTranspiler.transformSync(raw);
31947
31973
  transpiled = preserveTypeExports(raw, transpiled, valueExports);
@@ -31957,7 +31983,7 @@ ${transpiled}`;
31957
31983
  transpiled += buildIslandMetadataExports(raw);
31958
31984
  return rewriteImports(transpiled, filePath, projectRoot, rewriter);
31959
31985
  }, transformPlainFile = (filePath, projectRoot, rewriter, vueDir) => {
31960
- const raw = readFileSync41(filePath, "utf-8");
31986
+ const raw = readFileSync42(filePath, "utf-8");
31961
31987
  const ext = extname16(filePath);
31962
31988
  const isTS = ext === ".ts" || ext === ".tsx";
31963
31989
  const isTSX = ext === ".tsx" || ext === ".jsx";
@@ -32123,7 +32149,7 @@ ${code}`;
32123
32149
  ` + ` var __hmr_accept = function(cb) { window.__SVELTE_HMR_ACCEPT__[${JSON.stringify(moduleUrl)}] = cb; };`);
32124
32150
  return code.replace(/import\.meta\.hot\.accept\(/g, "__hmr_accept(");
32125
32151
  }, transformSvelteFile = async (filePath, projectRoot, rewriter, stylePreprocessors) => {
32126
- const raw = readFileSync41(filePath, "utf-8");
32152
+ const raw = readFileSync42(filePath, "utf-8");
32127
32153
  if (!svelteCompiler) {
32128
32154
  svelteCompiler = await import("svelte/compiler");
32129
32155
  }
@@ -32172,7 +32198,7 @@ export default __script__;`;
32172
32198
  filename: filePath,
32173
32199
  id: `data-v-${componentId}`,
32174
32200
  scoped: Boolean(style.scoped),
32175
- source: style.lang ? await compileStyleSource(filePath, style.content, style.lang, stylePreprocessors) : style.content,
32201
+ source: inlineCssImports(style.lang ? await compileStyleSource(filePath, style.content, style.lang, stylePreprocessors) : style.content, filePath),
32176
32202
  trim: true
32177
32203
  }).code))).join(`
32178
32204
  `);
@@ -32189,7 +32215,7 @@ export default __script__;`;
32189
32215
  return `${cssInjection}
32190
32216
  ${code}`;
32191
32217
  }, transformVueFile = async (filePath, projectRoot, rewriter, vueDir, stylePreprocessors) => {
32192
- const rawSource = readFileSync41(filePath, "utf-8");
32218
+ const rawSource = readFileSync42(filePath, "utf-8");
32193
32219
  const raw = addAutoRouterSetupApp(rawSource);
32194
32220
  if (!vueCompiler) {
32195
32221
  vueCompiler = await loadVueCompiler();
@@ -32201,8 +32227,8 @@ ${code}`;
32201
32227
  const compiledScript = hasScript ? vueCompiler.compileScript(descriptor, {
32202
32228
  fs: {
32203
32229
  fileExists: isFile,
32204
- realpath: realpathSync6,
32205
- readFile: (file) => isFile(file) ? readFileSync41(file, "utf-8") : undefined
32230
+ realpath: realpathSync7,
32231
+ readFile: (file) => isFile(file) ? readFileSync42(file, "utf-8") : undefined
32206
32232
  },
32207
32233
  id: componentId,
32208
32234
  inlineTemplate: false
@@ -32217,7 +32243,7 @@ ${code}`;
32217
32243
  code = injectVueHmr(code, filePath, projectRoot, vueDir);
32218
32244
  return rewriteImports(code, filePath, projectRoot, rewriter);
32219
32245
  }, injectVueHmr = (code, filePath, projectRoot, vueDir) => {
32220
- const hmrBase = vueDir ? resolve52(vueDir) : projectRoot;
32246
+ const hmrBase = vueDir ? resolve54(vueDir) : projectRoot;
32221
32247
  const hmrId = relative24(hmrBase, filePath).replace(/\\/g, "/").replace(/\.vue$/, "");
32222
32248
  let result = code.replace(/export\s+default\s+/, "var __hmr_comp__ = ");
32223
32249
  result += [
@@ -32232,11 +32258,11 @@ ${code}`;
32232
32258
  `);
32233
32259
  return result;
32234
32260
  }, resolveSvelteModulePath = (path) => {
32235
- if (existsSync45(path))
32261
+ if (existsSync46(path))
32236
32262
  return path;
32237
- if (existsSync45(`${path}.ts`))
32263
+ if (existsSync46(`${path}.ts`))
32238
32264
  return `${path}.ts`;
32239
- if (existsSync45(`${path}.js`))
32265
+ if (existsSync46(`${path}.js`))
32240
32266
  return `${path}.js`;
32241
32267
  return path;
32242
32268
  }, jsResponse = (body) => {
@@ -32249,7 +32275,7 @@ ${code}`;
32249
32275
  }
32250
32276
  });
32251
32277
  }, handleCssRequest = (filePath) => {
32252
- const raw = readFileSync41(filePath, "utf-8");
32278
+ const raw = readFileSync42(filePath, "utf-8");
32253
32279
  const escaped = raw.replace(/\\/g, "\\\\").replace(/`/g, "\\`").replace(/\$/g, "\\$");
32254
32280
  return [
32255
32281
  `const style = document.createElement('style');`,
@@ -32378,13 +32404,13 @@ export default {};
32378
32404
  const escaped = virtualCss.replace(/\\/g, "\\\\").replace(/`/g, "\\`").replace(/\$/g, "\\$");
32379
32405
  return jsResponse(`var s=document.createElement('style');s.textContent=\`${escaped}\`;s.dataset.svelteHmr=${JSON.stringify(cssCheckPath)};var p=document.querySelector('style[data-svelte-hmr="${cssCheckPath}"]');if(p)p.remove();document.head.appendChild(s);`);
32380
32406
  }, resolveSourcePath2 = (relPath, projectRoot) => {
32381
- const filePath = resolve52(projectRoot, decodeSrcPath(relPath));
32407
+ const filePath = resolve54(projectRoot, decodeSrcPath(relPath));
32382
32408
  const ext = extname16(filePath);
32383
32409
  if (ext === ".svelte")
32384
32410
  return { ext, filePath: resolveSvelteModulePath(filePath) };
32385
32411
  if (ext)
32386
32412
  return { ext, filePath };
32387
- const found = MODULE_EXTENSIONS.find((candidate) => existsSync45(filePath + candidate));
32413
+ const found = MODULE_EXTENSIONS.find((candidate) => existsSync46(filePath + candidate));
32388
32414
  if (!found)
32389
32415
  return { ext, filePath };
32390
32416
  const resolved = filePath + found;
@@ -32415,14 +32441,14 @@ export default {};
32415
32441
  const absoluteCandidate = `/${tail.replace(/^\/+/, "")}`;
32416
32442
  const candidates = [
32417
32443
  absoluteCandidate,
32418
- resolve52(projectRoot, tail)
32444
+ resolve54(projectRoot, tail)
32419
32445
  ];
32420
32446
  try {
32421
32447
  await Promise.resolve().then(() => init_loadConfig());
32422
32448
  const cfg = await loadConfig();
32423
- const angularDir = cfg.angularDirectory && resolve52(projectRoot, cfg.angularDirectory);
32449
+ const angularDir = cfg.angularDirectory && resolve54(projectRoot, cfg.angularDirectory);
32424
32450
  if (angularDir)
32425
- candidates.push(resolve52(angularDir, tail));
32451
+ candidates.push(resolve54(angularDir, tail));
32426
32452
  } catch {}
32427
32453
  for (const candidate of candidates) {
32428
32454
  if (await fileExists(candidate)) {
@@ -32453,7 +32479,7 @@ export default {};
32453
32479
  if (!TRANSPILABLE.has(ext))
32454
32480
  return;
32455
32481
  const stat = statSync9(filePath);
32456
- const resolvedVueDir = vueDir ? resolve52(vueDir) : undefined;
32482
+ const resolvedVueDir = vueDir ? resolve54(vueDir) : undefined;
32457
32483
  let content = REACT_EXTENSIONS.has(ext) ? transformReactFile(filePath, projectRoot, rewriter) : transformPlainFile(filePath, projectRoot, rewriter, resolvedVueDir);
32458
32484
  const isAngularGeneratedJs = ext === ".js" && filePath.replace(/\\/g, "/").includes("/.absolutejs/generated/angular/");
32459
32485
  if (isAngularGeneratedJs) {
@@ -32509,7 +32535,7 @@ export default {};
32509
32535
  const ownMessage = source && typeof source === "object" ? Reflect.get(source, "message") : undefined;
32510
32536
  const message = typeof ownMessage === "string" ? ownMessage : String(source);
32511
32537
  return { message, ...readPosition(first) };
32512
- }, getTransformError = (filePath) => transformErrors.get(resolve52(filePath)), transformErrorResponse = (err) => {
32538
+ }, getTransformError = (filePath) => transformErrors.get(resolve54(filePath)), transformErrorResponse = (err) => {
32513
32539
  const errMsg = err instanceof Error ? err.message : String(err);
32514
32540
  return new Response(`console.error('[ModuleServer] Transform error:', ${JSON.stringify(errMsg)});`, {
32515
32541
  headers: { "Content-Type": "application/javascript" },
@@ -32532,16 +32558,16 @@ export default {};
32532
32558
  const relPath = pathname.slice(SRC_PREFIX.length);
32533
32559
  if (relPath === "bun:wrap" || relPath.startsWith("bun:wrap?"))
32534
32560
  return handleBunWrapRequest();
32535
- const virtualCssResponse = handleVirtualSvelteCss(resolve52(projectRoot, decodeSrcPath(relPath)));
32561
+ const virtualCssResponse = handleVirtualSvelteCss(resolve54(projectRoot, decodeSrcPath(relPath)));
32536
32562
  if (virtualCssResponse)
32537
32563
  return virtualCssResponse;
32538
32564
  const { filePath, ext } = resolveSourcePath2(relPath, projectRoot);
32539
32565
  try {
32540
32566
  const response = await transformAndCache(filePath, ext, projectRoot, rewriter, frameworkDirs?.vue, stylePreprocessors);
32541
- transformErrors.delete(resolve52(filePath));
32567
+ transformErrors.delete(resolve54(filePath));
32542
32568
  return response;
32543
32569
  } catch (err) {
32544
- transformErrors.set(resolve52(filePath), describeTransformError(err));
32570
+ transformErrors.set(resolve54(filePath), describeTransformError(err));
32545
32571
  return transformErrorResponse(err);
32546
32572
  }
32547
32573
  };
@@ -32551,11 +32577,11 @@ export default {};
32551
32577
  SRC_IMPORT_RE.lastIndex = 0;
32552
32578
  while ((match = SRC_IMPORT_RE.exec(content)) !== null) {
32553
32579
  if (match[1])
32554
- files.push(resolve52(projectRoot, decodeSrcPath(match[1])));
32580
+ files.push(resolve54(projectRoot, decodeSrcPath(match[1])));
32555
32581
  }
32556
32582
  return files;
32557
32583
  }, SRC_URL_PREFIX2, invalidateModule = (filePath) => {
32558
- const resolved = resolve52(filePath);
32584
+ const resolved = resolve54(filePath);
32559
32585
  transformErrors.delete(resolved);
32560
32586
  invalidate(filePath);
32561
32587
  if (resolved !== filePath)
@@ -32621,7 +32647,7 @@ export default {};
32621
32647
  return false;
32622
32648
  }
32623
32649
  await Promise.resolve().then(() => init_prepare());
32624
- patchManifestIndexes(cached.manifest, resolve52(state.resolvedPaths.buildDir, "_src_indexes"), SRC_PREFIX);
32650
+ patchManifestIndexes(cached.manifest, resolve54(state.resolvedPaths.buildDir, "_src_indexes"), SRC_PREFIX);
32625
32651
  logPageBuild(entry.source, entry.framework, Math.round(durationMs));
32626
32652
  logStartupTimingBlock("AbsoluteJS on-demand page build", [
32627
32653
  { durationMs, label: entry.name }
@@ -32644,6 +32670,7 @@ export default {};
32644
32670
  };
32645
32671
  var init_moduleServer = __esm(() => {
32646
32672
  init_constants();
32673
+ init_inlineCssImports();
32647
32674
  init_resolvePackageImport();
32648
32675
  init_vueAutoRouterTransform();
32649
32676
  init_sourceMetadata();
@@ -32880,11 +32907,11 @@ var exports_simpleHTMLHMR = {};
32880
32907
  __export(exports_simpleHTMLHMR, {
32881
32908
  handleHTMLUpdate: () => handleHTMLUpdate
32882
32909
  });
32883
- import { resolve as resolve53 } from "path";
32910
+ import { resolve as resolve55 } from "path";
32884
32911
  var handleHTMLUpdate = async (htmlFilePath) => {
32885
32912
  let htmlContent;
32886
32913
  try {
32887
- const resolvedPath = resolve53(htmlFilePath);
32914
+ const resolvedPath = resolve55(htmlFilePath);
32888
32915
  const file = Bun.file(resolvedPath);
32889
32916
  if (!await file.exists()) {
32890
32917
  return null;
@@ -32910,11 +32937,11 @@ var exports_simpleHTMXHMR = {};
32910
32937
  __export(exports_simpleHTMXHMR, {
32911
32938
  handleHTMXUpdate: () => handleHTMXUpdate
32912
32939
  });
32913
- import { resolve as resolve54 } from "path";
32940
+ import { resolve as resolve56 } from "path";
32914
32941
  var handleHTMXUpdate = async (htmxFilePath) => {
32915
32942
  let htmlContent;
32916
32943
  try {
32917
- const resolvedPath = resolve54(htmxFilePath);
32944
+ const resolvedPath = resolve56(htmxFilePath);
32918
32945
  const file = Bun.file(resolvedPath);
32919
32946
  if (!await file.exists()) {
32920
32947
  return null;
@@ -32936,8 +32963,8 @@ var handleHTMXUpdate = async (htmxFilePath) => {
32936
32963
  var init_simpleHTMXHMR = () => {};
32937
32964
 
32938
32965
  // src/dev/backendGraph.ts
32939
- import { readFileSync as readFileSync42, realpathSync as realpathSync7, statSync as statSync10 } from "fs";
32940
- import { dirname as dirname36, extname as extname17, resolve as resolve55 } from "path";
32966
+ import { readFileSync as readFileSync43, realpathSync as realpathSync8, statSync as statSync10 } from "fs";
32967
+ import { dirname as dirname37, extname as extname17, resolve as resolve57 } from "path";
32941
32968
  var SOURCE_FILE, VENDORED, LOADERS, fileCache, transpilers, transpilerFor = (path) => {
32942
32969
  const loader = LOADERS[extname17(path)] ?? "ts";
32943
32970
  const existing = transpilers.get(loader);
@@ -32948,13 +32975,13 @@ var SOURCE_FILE, VENDORED, LOADERS, fileCache, transpilers, transpilerFor = (pat
32948
32975
  return created;
32949
32976
  }, realPath2 = (path) => {
32950
32977
  try {
32951
- return realpathSync7(path);
32978
+ return realpathSync8(path);
32952
32979
  } catch {
32953
32980
  return path;
32954
32981
  }
32955
- }, isProjectModule = (path, root = process.cwd()) => SOURCE_FILE.test(path) && !VENDORED.test(path) && resolve55(path).startsWith(resolve55(root)), resolveImport = (specifier, fromFile) => {
32982
+ }, isProjectModule = (path, root = process.cwd()) => SOURCE_FILE.test(path) && !VENDORED.test(path) && resolve57(path).startsWith(resolve57(root)), resolveImport = (specifier, fromFile) => {
32956
32983
  try {
32957
- return realPath2(Bun.resolveSync(specifier, dirname36(fromFile)));
32984
+ return realPath2(Bun.resolveSync(specifier, dirname37(fromFile)));
32958
32985
  } catch {
32959
32986
  return;
32960
32987
  }
@@ -32971,20 +32998,20 @@ var SOURCE_FILE, VENDORED, LOADERS, fileCache, transpilers, transpilerFor = (pat
32971
32998
  return cached.imports;
32972
32999
  let imports = [];
32973
33000
  try {
32974
- const source = readFileSync42(path, "utf-8");
33001
+ const source = readFileSync43(path, "utf-8");
32975
33002
  imports = transpilerFor(path).scanImports(source).map((entry) => resolveImport(entry.path, path)).filter((target) => target !== undefined);
32976
33003
  } catch {}
32977
33004
  fileCache.set(path, { imports, mtimeMs });
32978
33005
  return imports;
32979
33006
  }, importersOf = (target, entry, loaded = loadedProjectModules(entry)) => {
32980
- const goal = realPath2(resolve55(target));
33007
+ const goal = realPath2(resolve57(target));
32981
33008
  const importers = [];
32982
33009
  for (const file of loaded)
32983
33010
  if (readImports(file).includes(goal))
32984
33011
  importers.push(file);
32985
33012
  return importers;
32986
33013
  }, loadedProjectModules = (entry, loaded = Object.keys(__require.cache), root = process.cwd()) => {
32987
- const entryPath = realPath2(resolve55(entry));
33014
+ const entryPath = realPath2(resolve57(entry));
32988
33015
  const modules = new Set([entryPath]);
32989
33016
  for (const path of loaded) {
32990
33017
  if (isAbsoluteServerEntryCopyPath(path))
@@ -33013,7 +33040,7 @@ var init_backendGraph = __esm(() => {
33013
33040
  });
33014
33041
 
33015
33042
  // src/dev/hot/analyze.ts
33016
- import { dirname as dirname37, extname as extname18 } from "path";
33043
+ import { dirname as dirname38, extname as extname18 } from "path";
33017
33044
  var ANALYZER_VERSION = 1, hashText = (text) => Bun.hash(text).toString(36), scriptKindFor = (tsc, path) => {
33018
33045
  switch (extname18(path)) {
33019
33046
  case ".tsx":
@@ -33695,7 +33722,7 @@ var ANALYZER_VERSION = 1, hashText = (text) => Bun.hash(text).toString(36), scri
33695
33722
  return analysis;
33696
33723
  }, resolveFrom = (fromFile, isManaged) => (specifier) => {
33697
33724
  try {
33698
- const resolved = Bun.resolveSync(specifier, dirname37(fromFile));
33725
+ const resolved = Bun.resolveSync(specifier, dirname38(fromFile));
33699
33726
  return isManaged(resolved) ? resolved : undefined;
33700
33727
  } catch {
33701
33728
  return;
@@ -33769,11 +33796,11 @@ var init_runtime = __esm(() => {
33769
33796
  });
33770
33797
 
33771
33798
  // src/dev/hot/plugin.ts
33772
- import { mkdirSync as mkdirSync16, readFileSync as readFileSync43, realpathSync as realpathSync8, writeFileSync as writeFileSync11 } from "fs";
33773
- import { extname as extname19, join as join63, relative as relative25, resolve as resolve56, sep as sep8 } from "path";
33799
+ import { mkdirSync as mkdirSync16, readFileSync as readFileSync44, realpathSync as realpathSync9, writeFileSync as writeFileSync11 } from "fs";
33800
+ import { extname as extname19, join as join63, relative as relative25, resolve as resolve58, sep as sep8 } from "path";
33774
33801
  var SOURCE, TEST_FILE, GENERATED, ABSOLUTE_ROOT, realPath3 = (path) => {
33775
33802
  try {
33776
- return realpathSync8(path);
33803
+ return realpathSync9(path);
33777
33804
  } catch {
33778
33805
  return path;
33779
33806
  }
@@ -33815,7 +33842,7 @@ var SOURCE, TEST_FILE, GENERATED, ABSOLUTE_ROOT, realPath3 = (path) => {
33815
33842
  if (!state)
33816
33843
  return;
33817
33844
  try {
33818
- const cached = JSON.parse(readFileSync43(cachePath(state.cacheDir, key), "utf-8"));
33845
+ const cached = JSON.parse(readFileSync44(cachePath(state.cacheDir, key), "utf-8"));
33819
33846
  return isAnalysis(cached) ? cached : undefined;
33820
33847
  } catch {
33821
33848
  return;
@@ -33849,7 +33876,7 @@ var init_plugin = __esm(() => {
33849
33876
  SOURCE = /\.(?:[cm]?[jt]sx?)$/;
33850
33877
  TEST_FILE = /(?:\.(?:spec|test)\.[cm]?[jt]sx?$)|(?:[\\/]__tests__[\\/])/;
33851
33878
  GENERATED = /(?:^|[\\/])(?:build|generated|compiled|indexes|\.absolutejs|node_modules|dist)(?:[\\/]|$)/;
33852
- ABSOLUTE_ROOT = resolve56(import.meta.dir, "..", "..", "..");
33879
+ ABSOLUTE_ROOT = resolve58(import.meta.dir, "..", "..", "..");
33853
33880
  shared = globalThis.__absoluteHotPlugin ??= {
33854
33881
  analyses: new Map,
33855
33882
  installed: undefined
@@ -33858,11 +33885,11 @@ var init_plugin = __esm(() => {
33858
33885
  });
33859
33886
 
33860
33887
  // src/dev/hot/reload.ts
33861
- import { readFileSync as readFileSync44, realpathSync as realpathSync9 } from "fs";
33888
+ import { readFileSync as readFileSync45, realpathSync as realpathSync10 } from "fs";
33862
33889
  import { relative as relative26 } from "path";
33863
33890
  var MAX_PROPAGATION_STEPS = 500, realPath4 = (path) => {
33864
33891
  try {
33865
- return realpathSync9(path);
33892
+ return realpathSync10(path);
33866
33893
  } catch {
33867
33894
  return path;
33868
33895
  }
@@ -33936,7 +33963,7 @@ var MAX_PROPAGATION_STEPS = 500, realPath4 = (path) => {
33936
33963
  return { status: "entry" };
33937
33964
  if (!moduleRecord(path) || !isHotManaged(path))
33938
33965
  return { status: "unmanaged" };
33939
- const source = readFileSync44(path, "utf-8");
33966
+ const source = readFileSync45(path, "utf-8");
33940
33967
  if (moduleRecord(path)?.source === source)
33941
33968
  return { status: "unchanged" };
33942
33969
  const analysis = await analyzeSource(path, source);
@@ -34025,10 +34052,10 @@ var init_reload = __esm(() => {
34025
34052
  });
34026
34053
 
34027
34054
  // src/dev/rebuildTrigger.ts
34028
- import { existsSync as existsSync46, readdirSync as readdirSync13, rmSync as rmSync4, statSync as statSync11 } from "fs";
34055
+ import { existsSync as existsSync47, readdirSync as readdirSync13, rmSync as rmSync4, statSync as statSync11 } from "fs";
34029
34056
  import {
34030
34057
  basename as basename21,
34031
- dirname as dirname38,
34058
+ dirname as dirname39,
34032
34059
  isAbsolute as isAbsolute10,
34033
34060
  join as join64,
34034
34061
  relative as relative27,
@@ -34139,7 +34166,7 @@ var moduleServerPromise, getModuleServer = () => moduleServerPromise, clearDevSs
34139
34166
  detectedFw = detected !== "ignored" ? detected : affectedFrameworks[0];
34140
34167
  }
34141
34168
  return { ...parsed, framework: detectedFw };
34142
- }, isValidDeletedAffectedFile = (affectedFile, deletedPathResolved, processedFiles) => affectedFile !== deletedPathResolved && !processedFiles.has(affectedFile) && existsSync46(affectedFile), FRAMEWORK_DIR_KEYS_FOR_CLEANUP, removeStaleGenerated = (state, deletedFile) => {
34169
+ }, isValidDeletedAffectedFile = (affectedFile, deletedPathResolved, processedFiles) => affectedFile !== deletedPathResolved && !processedFiles.has(affectedFile) && existsSync47(affectedFile), FRAMEWORK_DIR_KEYS_FOR_CLEANUP, removeStaleGenerated = (state, deletedFile) => {
34143
34170
  const { config } = state;
34144
34171
  const cwd = process.cwd();
34145
34172
  const absDeleted = resolvePath4(deletedFile).replace(/\\/g, "/");
@@ -34185,7 +34212,7 @@ var moduleServerPromise, getModuleServer = () => moduleServerPromise, clearDevSs
34185
34212
  if (!dependents || dependents.size === 0) {
34186
34213
  return;
34187
34214
  }
34188
- const dependentFiles = Array.from(dependents).filter((file) => existsSync46(file));
34215
+ const dependentFiles = Array.from(dependents).filter((file) => existsSync47(file));
34189
34216
  if (dependentFiles.length === 0) {
34190
34217
  return;
34191
34218
  }
@@ -34201,7 +34228,7 @@ var moduleServerPromise, getModuleServer = () => moduleServerPromise, clearDevSs
34201
34228
  try {
34202
34229
  const affectedFiles = getAffectedFiles(state.dependencyGraph, normalizedFilePath);
34203
34230
  affectedFiles.forEach((affectedFile) => {
34204
- if (!processedFiles.has(affectedFile) && affectedFile !== normalizedFilePath && existsSync46(affectedFile)) {
34231
+ if (!processedFiles.has(affectedFile) && affectedFile !== normalizedFilePath && existsSync47(affectedFile)) {
34205
34232
  validFiles.push(affectedFile);
34206
34233
  processedFiles.add(affectedFile);
34207
34234
  }
@@ -34226,7 +34253,7 @@ var moduleServerPromise, getModuleServer = () => moduleServerPromise, clearDevSs
34226
34253
  collectChangedFileAffected(state, normalizedFilePath, processedFiles, validFiles);
34227
34254
  }, processFilePathSet = (state, filePathSet, processedFiles, validFiles) => {
34228
34255
  filePathSet.forEach((filePathInSet) => {
34229
- if (!existsSync46(filePathInSet)) {
34256
+ if (!existsSync47(filePathInSet)) {
34230
34257
  collectDeletedFileAffected(state, filePathInSet, processedFiles, validFiles);
34231
34258
  return;
34232
34259
  }
@@ -34397,7 +34424,7 @@ var moduleServerPromise, getModuleServer = () => moduleServerPromise, clearDevSs
34397
34424
  const { buildDir } = state.resolvedPaths;
34398
34425
  const destPath = resolvePath4(buildDir, urlPrefix ? `${urlPrefix}/${relFromDir}` : relFromDir);
34399
34426
  const { mkdir, copyFile, readFile } = await import("fs/promises");
34400
- await mkdir(dirname38(destPath), { recursive: true });
34427
+ await mkdir(dirname39(destPath), { recursive: true });
34401
34428
  await copyFile(absSource, destPath);
34402
34429
  const bytes = await readFile(destPath);
34403
34430
  const webPath = urlPrefix ? `/${urlPrefix}/${relFromDir}` : `/${relFromDir}`;
@@ -34509,7 +34536,7 @@ var moduleServerPromise, getModuleServer = () => moduleServerPromise, clearDevSs
34509
34536
  return componentFile;
34510
34537
  }
34511
34538
  const tsCounterpart = componentFile.replace(/\.html$/, ".ts");
34512
- if (existsSync46(tsCounterpart)) {
34539
+ if (existsSync47(tsCounterpart)) {
34513
34540
  return tsCounterpart;
34514
34541
  }
34515
34542
  if (!graph)
@@ -34593,7 +34620,7 @@ var moduleServerPromise, getModuleServer = () => moduleServerPromise, clearDevSs
34593
34620
  const keepStemsByDir = new Map;
34594
34621
  const prefixByDir = new Map;
34595
34622
  for (const artifact of freshOutputs) {
34596
- const dir = dirname38(artifact.path);
34623
+ const dir = dirname39(artifact.path);
34597
34624
  const name = basename21(artifact.path);
34598
34625
  const [prefix] = name.split(".");
34599
34626
  if (!prefix)
@@ -35447,7 +35474,7 @@ var moduleServerPromise, getModuleServer = () => moduleServerPromise, clearDevSs
35447
35474
  }
35448
35475
  return ctx;
35449
35476
  }, runSvelteBundleRebuild = async (state, svelteFiles, config) => {
35450
- const existingSvelteFiles = svelteFiles.filter((file) => existsSync46(file));
35477
+ const existingSvelteFiles = svelteFiles.filter((file) => existsSync47(file));
35451
35478
  if (existingSvelteFiles.length === 0)
35452
35479
  return;
35453
35480
  const svelteDir = config.svelteDirectory ?? "";
@@ -35995,7 +36022,7 @@ var moduleServerPromise, getModuleServer = () => moduleServerPromise, clearDevSs
35995
36022
  if (!buildReference?.source) {
35996
36023
  return;
35997
36024
  }
35998
- const sourcePath = buildReference.source.startsWith("file://") ? new URL(buildReference.source).pathname : resolvePath4(dirname38(buildInfo.resolvedRegistryPath), buildReference.source);
36025
+ const sourcePath = buildReference.source.startsWith("file://") ? new URL(buildReference.source).pathname : resolvePath4(dirname39(buildInfo.resolvedRegistryPath), buildReference.source);
35999
36026
  islandFiles.add(resolvePath4(sourcePath));
36000
36027
  }, resolveIslandSourceFiles = async (config) => {
36001
36028
  const registryPath = config.islands?.registry;
@@ -36830,7 +36857,7 @@ var init_rebuildTrigger = __esm(() => {
36830
36857
  // src/build/buildDepVendor.ts
36831
36858
  import { mkdirSync as mkdirSync17 } from "fs";
36832
36859
  import { isBuiltin as isBuiltin2 } from "module";
36833
- import { join as join65 } from "path";
36860
+ import { join as join65, relative as relative28 } from "path";
36834
36861
  import { rm as rm15 } from "fs/promises";
36835
36862
  var {build: bunBuild9, Glob: Glob10 } = globalThis.Bun;
36836
36863
  var toSafeFileName6 = (specifier) => {
@@ -36866,7 +36893,7 @@ var toSafeFileName6 = (specifier) => {
36866
36893
  const glob = new Glob10("**/*.{ts,tsx,js,jsx}");
36867
36894
  try {
36868
36895
  const all = await Array.fromAsync(glob.scan({ absolute: true, cwd: dir }));
36869
- return all.filter((file) => !isSkippedFile(file));
36896
+ return all.filter((file) => !isSkippedFile(`/${relative28(dir, file).replaceAll("\\", "/")}`));
36870
36897
  } catch {
36871
36898
  return empty;
36872
36899
  }
@@ -37168,13 +37195,13 @@ var init_buildDepVendor = __esm(() => {
37168
37195
  import { createHash as createHash11 } from "crypto";
37169
37196
  import {
37170
37197
  copyFileSync as copyFileSync4,
37171
- existsSync as existsSync47,
37198
+ existsSync as existsSync48,
37172
37199
  mkdirSync as mkdirSync18,
37173
37200
  readdirSync as readdirSync14,
37174
- readFileSync as readFileSync45
37201
+ readFileSync as readFileSync46
37175
37202
  } from "fs";
37176
37203
  import { mkdir as mkdir16, readFile as readFile12, rename as rename7, rm as rm16, writeFile as writeFile14 } from "fs/promises";
37177
- import { basename as basename22, join as join66, resolve as resolve57 } from "path";
37204
+ import { basename as basename22, join as join66, resolve as resolve59 } from "path";
37178
37205
  var CACHE_ROOT2, CACHE_FORMAT_VERSION3 = 1, KEY_LENGTH = 32, LOCKFILES, computeVendorCacheKey = (inputs) => {
37179
37206
  const hash = createHash11("sha256");
37180
37207
  hash.update(String(CACHE_FORMAT_VERSION3));
@@ -37194,7 +37221,7 @@ var CACHE_ROOT2, CACHE_FORMAT_VERSION3 = 1, KEY_LENGTH = 32, LOCKFILES, computeV
37194
37221
  }
37195
37222
  for (const dir of inputs.vendorDirs) {
37196
37223
  hash.update("\x00v");
37197
- hash.update(basename22(resolve57(dir, "..")));
37224
+ hash.update(basename22(resolve59(dir, "..")));
37198
37225
  }
37199
37226
  return hash.digest("hex").slice(0, KEY_LENGTH);
37200
37227
  }, readLockfileHash = (projectRoot = process.cwd()) => {
@@ -37202,11 +37229,11 @@ var CACHE_ROOT2, CACHE_FORMAT_VERSION3 = 1, KEY_LENGTH = 32, LOCKFILES, computeV
37202
37229
  let found = false;
37203
37230
  for (const name of LOCKFILES) {
37204
37231
  const path = join66(projectRoot, name);
37205
- if (!existsSync47(path))
37232
+ if (!existsSync48(path))
37206
37233
  continue;
37207
37234
  found = true;
37208
37235
  hash.update(name);
37209
- hash.update(readFileSync45(path));
37236
+ hash.update(readFileSync46(path));
37210
37237
  }
37211
37238
  return found ? hash.digest("hex") : null;
37212
37239
  }, vendorCacheEnabled = () => process.env.ABSOLUTE_DEV_VENDOR_CACHE !== "0", copyTree = (fromDir, toDir) => {
@@ -37222,21 +37249,21 @@ var CACHE_ROOT2, CACHE_FORMAT_VERSION3 = 1, KEY_LENGTH = 32, LOCKFILES, computeV
37222
37249
  }, copySlotsInto = (cacheDir, vendorDirs) => {
37223
37250
  for (const [index, dir] of vendorDirs.entries()) {
37224
37251
  const source = join66(cacheDir, slotName(index, dir));
37225
- if (!existsSync47(source)) {
37252
+ if (!existsSync48(source)) {
37226
37253
  throw new Error(`missing cached vendor dir ${source}`);
37227
37254
  }
37228
37255
  copyTree(source, dir);
37229
37256
  }
37230
37257
  }, copySlotsFrom = (stagingDir, vendorDirs) => {
37231
37258
  for (const [index, dir] of vendorDirs.entries()) {
37232
- if (!existsSync47(dir))
37259
+ if (!existsSync48(dir))
37233
37260
  continue;
37234
37261
  copyTree(dir, join66(stagingDir, slotName(index, dir)));
37235
37262
  }
37236
- }, isVendorCachePayload = (value) => typeof value === "object" && value !== null && typeof Reflect.get(value, "depPaths") === "object", cacheDirFor = (key, projectRoot) => resolve57(projectRoot, CACHE_ROOT2, key), slotName = (index, dir) => `${index}-${basename22(resolve57(dir, ".."))}`, restoreVendorCache = async (key, vendorDirs, projectRoot = process.cwd()) => {
37263
+ }, isVendorCachePayload = (value) => typeof value === "object" && value !== null && typeof Reflect.get(value, "depPaths") === "object", cacheDirFor = (key, projectRoot) => resolve59(projectRoot, CACHE_ROOT2, key), slotName = (index, dir) => `${index}-${basename22(resolve59(dir, ".."))}`, restoreVendorCache = async (key, vendorDirs, projectRoot = process.cwd()) => {
37237
37264
  const cacheDir = cacheDirFor(key, projectRoot);
37238
37265
  const payloadPath = join66(cacheDir, "payload.json");
37239
- if (!existsSync47(payloadPath))
37266
+ if (!existsSync48(payloadPath))
37240
37267
  return null;
37241
37268
  try {
37242
37269
  const payload = JSON.parse(await readFile12(payloadPath, "utf8"));
@@ -37249,7 +37276,7 @@ var CACHE_ROOT2, CACHE_FORMAT_VERSION3 = 1, KEY_LENGTH = 32, LOCKFILES, computeV
37249
37276
  }
37250
37277
  }, saveVendorCache = async (key, vendorDirs, payload, projectRoot = process.cwd()) => {
37251
37278
  const cacheDir = cacheDirFor(key, projectRoot);
37252
- if (existsSync47(join66(cacheDir, "payload.json")))
37279
+ if (existsSync48(join66(cacheDir, "payload.json")))
37253
37280
  return;
37254
37281
  const stagingDir = `${cacheDir}.${process.pid}.tmp`;
37255
37282
  try {
@@ -37278,9 +37305,9 @@ var init_vendorCache = __esm(() => {
37278
37305
 
37279
37306
  // src/core/devBuild.ts
37280
37307
  import { readdir as readdir7 } from "fs/promises";
37281
- import { existsSync as existsSync48, statSync as statSync12 } from "fs";
37282
- import { resolve as resolve58 } from "path";
37283
- var FRAMEWORK_DIR_KEYS, devClientVendorSourceDir = () => resolve58(import.meta.dir, "../dev/client"), collectDepVendorSourceDirs = (config) => {
37308
+ import { existsSync as existsSync49, statSync as statSync12 } from "fs";
37309
+ import { resolve as resolve60 } from "path";
37310
+ var FRAMEWORK_DIR_KEYS, devClientVendorSourceDir, collectDepVendorSourceDirs = (config) => {
37284
37311
  const configuredDirs = [
37285
37312
  ...collectConfigVendorSourceDirs(config),
37286
37313
  devClientVendorSourceDir()
@@ -37303,7 +37330,7 @@ var FRAMEWORK_DIR_KEYS, devClientVendorSourceDir = () => resolve58(import.meta.d
37303
37330
  return Object.keys(config).length > 0 ? config : null;
37304
37331
  }, reloadConfig = async () => {
37305
37332
  try {
37306
- const configPath = resolve58(process.env.ABSOLUTE_CONFIG ?? "absolute.config.ts");
37333
+ const configPath = resolve60(process.env.ABSOLUTE_CONFIG ?? "absolute.config.ts");
37307
37334
  const source = await Bun.file(configPath).text();
37308
37335
  return parseDirectoryConfig(source);
37309
37336
  } catch {
@@ -37418,7 +37445,7 @@ var FRAMEWORK_DIR_KEYS, devClientVendorSourceDir = () => resolve58(import.meta.d
37418
37445
  });
37419
37446
  }
37420
37447
  }, handleCachedReload = async () => {
37421
- const serverMtime = statSync12(resolve58(Bun.main)).mtimeMs;
37448
+ const serverMtime = statSync12(resolve60(Bun.main)).mtimeMs;
37422
37449
  const lastMtime = globalThis.__hmrServerMtime;
37423
37450
  globalThis.__hmrServerMtime = serverMtime;
37424
37451
  const cached = globalThis.__hmrDevResult;
@@ -37459,8 +37486,8 @@ var FRAMEWORK_DIR_KEYS, devClientVendorSourceDir = () => resolve58(import.meta.d
37459
37486
  return true;
37460
37487
  }, resolveAbsoluteVersion2 = async () => {
37461
37488
  const candidates = [
37462
- resolve58(import.meta.dir, "..", "..", "package.json"),
37463
- resolve58(import.meta.dir, "..", "package.json")
37489
+ resolve60(import.meta.dir, "..", "..", "package.json"),
37490
+ resolve60(import.meta.dir, "..", "package.json")
37464
37491
  ];
37465
37492
  const [candidate, ...remaining] = candidates;
37466
37493
  if (!candidate) {
@@ -37486,7 +37513,7 @@ var FRAMEWORK_DIR_KEYS, devClientVendorSourceDir = () => resolve58(import.meta.d
37486
37513
  const entries = await readdir7(vendorDir).catch(() => emptyStringArray);
37487
37514
  await Promise.all(entries.filter((entry) => entry.endsWith(".js")).map(async (entry) => {
37488
37515
  const webPath = `/${framework}/vendor/${entry}`;
37489
- const bytes = await Bun.file(resolve58(vendorDir, entry)).bytes();
37516
+ const bytes = await Bun.file(resolve60(vendorDir, entry)).bytes();
37490
37517
  assetStore.set(webPath, bytes);
37491
37518
  }));
37492
37519
  }, devBuild = async (config) => {
@@ -37556,7 +37583,7 @@ var FRAMEWORK_DIR_KEYS, devClientVendorSourceDir = () => resolve58(import.meta.d
37556
37583
  const sourceFiles = await collectDepVendorSourceFiles(config);
37557
37584
  const configVendorDirs = collectConfigVendorSourceDirs(config);
37558
37585
  const prescannedVendorPaths = prescanVendorPaths(prescan, configVendorDirs);
37559
- const remainingVendorDirs = prescannedVendorPaths ? sourceDirs.filter((dir) => !configVendorDirs.includes(dir) && existsSync48(dir)) : sourceDirs;
37586
+ const remainingVendorDirs = prescannedVendorPaths ? sourceDirs.filter((dir) => !configVendorDirs.includes(dir) && existsSync49(dir)) : sourceDirs;
37560
37587
  if (prescannedVendorPaths && remainingVendorDirs.length === 0 && sourceFiles.length === 0) {
37561
37588
  globalThis.__depVendorPaths = prescannedVendorPaths;
37562
37589
  } else {
@@ -37672,11 +37699,11 @@ var FRAMEWORK_DIR_KEYS, devClientVendorSourceDir = () => resolve58(import.meta.d
37672
37699
  }
37673
37700
  stepStartedAt = performance.now();
37674
37701
  setBootPhase("build vendor bundles");
37675
- const reactVendorDir = resolve58(state.resolvedPaths.buildDir, "react", "vendor");
37676
- const angularVendorDir = resolve58(state.resolvedPaths.buildDir, "angular", "vendor");
37677
- const svelteVendorDir = resolve58(state.resolvedPaths.buildDir, "svelte", "vendor");
37678
- const vueVendorDir = resolve58(state.resolvedPaths.buildDir, "vue", "vendor");
37679
- const depVendorDir = resolve58(state.resolvedPaths.buildDir, "vendor");
37702
+ const reactVendorDir = resolve60(state.resolvedPaths.buildDir, "react", "vendor");
37703
+ const angularVendorDir = resolve60(state.resolvedPaths.buildDir, "angular", "vendor");
37704
+ const svelteVendorDir = resolve60(state.resolvedPaths.buildDir, "svelte", "vendor");
37705
+ const vueVendorDir = resolve60(state.resolvedPaths.buildDir, "vue", "vendor");
37706
+ const depVendorDir = resolve60(state.resolvedPaths.buildDir, "vendor");
37680
37707
  await Promise.resolve().then(() => init_buildDepVendor());
37681
37708
  const activeVendorDirs = [
37682
37709
  config.reactDirectory ? reactVendorDir : null,
@@ -37793,10 +37820,11 @@ var FRAMEWORK_DIR_KEYS, devClientVendorSourceDir = () => resolve58(import.meta.d
37793
37820
  manifest
37794
37821
  };
37795
37822
  globalThis.__hmrDevResult = result;
37796
- globalThis.__hmrServerMtime = statSync12(resolve58(Bun.main)).mtimeMs;
37823
+ globalThis.__hmrServerMtime = statSync12(resolve60(Bun.main)).mtimeMs;
37797
37824
  return result;
37798
37825
  };
37799
37826
  var init_devBuild = __esm(() => {
37827
+ init_runtimePaths();
37800
37828
  init_build();
37801
37829
  init_buildReactVendor();
37802
37830
  init_buildAngularVendor();
@@ -37824,6 +37852,7 @@ var init_devBuild = __esm(() => {
37824
37852
  "htmxDirectory",
37825
37853
  "angularDirectory"
37826
37854
  ];
37855
+ devClientVendorSourceDir = resolveDevClientDirectory;
37827
37856
  });
37828
37857
 
37829
37858
  // src/build.ts
@@ -37834,5 +37863,5 @@ export {
37834
37863
  devBuild
37835
37864
  };
37836
37865
 
37837
- //# debugId=9218616736C2687B64756E2164756E21
37866
+ //# debugId=AA60B6F5F10DA90864756E2164756E21
37838
37867
  //# sourceMappingURL=build.js.map