@absolutejs/absolute 0.20.0-beta.146 → 0.20.0-beta.148

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
@@ -24760,8 +24760,25 @@ var init_build = __esm(() => {
24760
24760
  };
24761
24761
  });
24762
24762
 
24763
+ // src/dev/runtimePaths.ts
24764
+ import { existsSync as existsSync35 } from "fs";
24765
+ import { resolve as resolve34 } from "path";
24766
+ var resolveDevClientDirectory = () => {
24767
+ const candidates = [
24768
+ resolve34(import.meta.dir, "client"),
24769
+ resolve34(import.meta.dir, "dev/client"),
24770
+ resolve34(import.meta.dir, "../dev/client")
24771
+ ];
24772
+ const directory = candidates.find((candidate) => existsSync35(resolve34(candidate, "hmrClient.ts")));
24773
+ if (!directory) {
24774
+ throw new Error("AbsoluteJS browser HMR sources are missing from the installed package.");
24775
+ }
24776
+ return directory;
24777
+ };
24778
+ var init_runtimePaths = () => {};
24779
+
24763
24780
  // src/build/buildEmberVendor.ts
24764
- import { mkdirSync as mkdirSync13, existsSync as existsSync35 } from "fs";
24781
+ import { mkdirSync as mkdirSync13, existsSync as existsSync36 } from "fs";
24765
24782
  import { join as join47 } from "path";
24766
24783
  import { rm as rm10 } from "fs/promises";
24767
24784
  var {build: bunBuild8 } = globalThis.Bun;
@@ -24815,7 +24832,7 @@ export const importSync = (specifier) => {
24815
24832
  return { resolveTo: specifier, specifier };
24816
24833
  }
24817
24834
  const emberInternalPath = join47(cwd, "node_modules/ember-source/dist/packages", specifier, "index.js");
24818
- if (!existsSync35(emberInternalPath)) {
24835
+ if (!existsSync36(emberInternalPath)) {
24819
24836
  throw new Error(`Ember vendor build: cannot find ${specifier} at ${emberInternalPath}. ` + `Is ember-source installed and at least 6.12?`);
24820
24837
  }
24821
24838
  return { resolveTo: emberInternalPath, specifier };
@@ -24849,7 +24866,7 @@ export const importSync = (specifier) => {
24849
24866
  return;
24850
24867
  }
24851
24868
  const internal = join47(cwd, "node_modules/ember-source/dist/packages", args.path, "index.js");
24852
- if (existsSync35(internal)) {
24869
+ if (existsSync36(internal)) {
24853
24870
  return { path: internal };
24854
24871
  }
24855
24872
  return;
@@ -25059,9 +25076,9 @@ var stripStringsAndComments = (source) => {
25059
25076
  };
25060
25077
 
25061
25078
  // src/dev/dependencyGraph.ts
25062
- import { existsSync as existsSync36, readFileSync as readFileSync29, realpathSync as realpathSync4 } from "fs";
25079
+ import { existsSync as existsSync37, readFileSync as readFileSync29, realpathSync as realpathSync4 } from "fs";
25063
25080
  var {Glob: Glob9 } = globalThis.Bun;
25064
- import { resolve as resolve34 } from "path";
25081
+ import { resolve as resolve35 } from "path";
25065
25082
  var emptyDependencyGraph, tsTranspiler, jsTranspiler, loaderForFile = (filePath) => {
25066
25083
  const lower = filePath.toLowerCase();
25067
25084
  if (lower.endsWith(".ts") || lower.endsWith(".tsx") || lower.endsWith(".jsx"))
@@ -25072,7 +25089,7 @@ var emptyDependencyGraph, tsTranspiler, jsTranspiler, loaderForFile = (filePath)
25072
25089
  return "html";
25073
25090
  return null;
25074
25091
  }, resolveImportPath2 = (importPath, fromFile) => {
25075
- const fromDir = resolve34(fromFile, "..");
25092
+ const fromDir = resolve35(fromFile, "..");
25076
25093
  if (!importPath.startsWith(".") && !importPath.startsWith("/")) {
25077
25094
  if (!isWorkspacePackageSpecifier(importPath, fromDir))
25078
25095
  return null;
@@ -25082,7 +25099,7 @@ var emptyDependencyGraph, tsTranspiler, jsTranspiler, loaderForFile = (filePath)
25082
25099
  return null;
25083
25100
  }
25084
25101
  }
25085
- const normalized = resolve34(fromDir, importPath);
25102
+ const normalized = resolve35(fromDir, importPath);
25086
25103
  const extensions = [
25087
25104
  ".ts",
25088
25105
  ".tsx",
@@ -25095,10 +25112,10 @@ var emptyDependencyGraph, tsTranspiler, jsTranspiler, loaderForFile = (filePath)
25095
25112
  ];
25096
25113
  for (const ext of extensions) {
25097
25114
  const withExt = normalized + ext;
25098
- if (existsSync36(withExt))
25115
+ if (existsSync37(withExt))
25099
25116
  return withExt;
25100
25117
  }
25101
- if (existsSync36(normalized))
25118
+ if (existsSync37(normalized))
25102
25119
  return normalized;
25103
25120
  return null;
25104
25121
  }, clearExistingDependents = (graph, normalizedPath) => {
@@ -25112,8 +25129,8 @@ var emptyDependencyGraph, tsTranspiler, jsTranspiler, loaderForFile = (filePath)
25112
25129
  dependents.delete(normalizedPath);
25113
25130
  }
25114
25131
  }, addFileToGraph = (graph, filePath) => {
25115
- const normalizedPath = resolve34(filePath);
25116
- if (!existsSync36(normalizedPath))
25132
+ const normalizedPath = resolve35(filePath);
25133
+ if (!existsSync37(normalizedPath))
25117
25134
  return;
25118
25135
  const dependencies = extractDependencies(normalizedPath);
25119
25136
  clearExistingDependents(graph, normalizedPath);
@@ -25139,10 +25156,10 @@ var emptyDependencyGraph, tsTranspiler, jsTranspiler, loaderForFile = (filePath)
25139
25156
  }, IGNORED_SEGMENTS, buildInitialDependencyGraph = (graph, directories) => {
25140
25157
  const processedFiles = new Set;
25141
25158
  const glob = new Glob9("**/*.{ts,tsx,js,jsx,vue,svelte,html,htm}");
25142
- const resolvedDirs = directories.map((dir) => resolve34(dir)).filter((dir) => existsSync36(dir));
25159
+ const resolvedDirs = directories.map((dir) => resolve35(dir)).filter((dir) => existsSync37(dir));
25143
25160
  const allFiles = resolvedDirs.flatMap((dir) => Array.from(glob.scanSync({ absolute: true, cwd: dir })));
25144
25161
  for (const file of allFiles) {
25145
- const fullPath = resolve34(file);
25162
+ const fullPath = resolve35(file);
25146
25163
  if (IGNORED_SEGMENTS.some((seg) => fullPath.includes(seg)))
25147
25164
  continue;
25148
25165
  if (processedFiles.has(fullPath))
@@ -25255,7 +25272,7 @@ var emptyDependencyGraph, tsTranspiler, jsTranspiler, loaderForFile = (filePath)
25255
25272
  return [];
25256
25273
  }
25257
25274
  }, getAffectedFiles = (graph, changedFile) => {
25258
- const normalizedPath = resolve34(changedFile);
25275
+ const normalizedPath = resolve35(changedFile);
25259
25276
  const affected = new Set;
25260
25277
  const toProcess = [normalizedPath];
25261
25278
  const processNode = (current) => {
@@ -25286,7 +25303,7 @@ var emptyDependencyGraph, tsTranspiler, jsTranspiler, loaderForFile = (filePath)
25286
25303
  }, removeDependentsForFile = (graph, normalizedPath) => {
25287
25304
  graph.dependents.delete(normalizedPath);
25288
25305
  }, removeFileFromGraph = (graph, filePath) => {
25289
- const normalizedPath = resolve34(filePath);
25306
+ const normalizedPath = resolve35(filePath);
25290
25307
  removeDepsForFile(graph, normalizedPath);
25291
25308
  removeDependentsForFile(graph, normalizedPath);
25292
25309
  };
@@ -25330,12 +25347,12 @@ var globalVersionCounter = 0, createModuleVersionTracker = () => new Map, getNex
25330
25347
  };
25331
25348
 
25332
25349
  // src/dev/configResolver.ts
25333
- import { resolve as resolve35 } from "path";
25350
+ import { resolve as resolve36 } from "path";
25334
25351
  var resolveBuildPaths = (config) => {
25335
25352
  const cwd = process.cwd();
25336
25353
  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;
25354
+ const withDefault = (value, fallback) => normalize(resolve36(cwd, value ?? fallback));
25355
+ const optional = (value) => value ? normalize(resolve36(cwd, value)) : undefined;
25339
25356
  return {
25340
25357
  angularDir: optional(config.angularDirectory),
25341
25358
  assetsDir: optional(config.assetsDirectory),
@@ -25394,8 +25411,8 @@ var init_clientManager = __esm(() => {
25394
25411
  });
25395
25412
 
25396
25413
  // 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";
25414
+ import { existsSync as existsSync38, readdirSync as readdirSync8, readFileSync as readFileSync30 } from "fs";
25415
+ import { dirname as dirname26, resolve as resolve37 } from "path";
25399
25416
  var STYLE_EXTENSION_PATTERN2, detectFramework = (filePath, resolved) => {
25400
25417
  if (shouldIgnorePath(filePath, resolved)) {
25401
25418
  return "ignored";
@@ -25471,7 +25488,7 @@ var STYLE_EXTENSION_PATTERN2, detectFramework = (filePath, resolved) => {
25471
25488
  return "unknown";
25472
25489
  }, collectAngularResourceDirs = (angularDir) => {
25473
25490
  const out = new Set;
25474
- const angularRoot = resolve36(angularDir);
25491
+ const angularRoot = resolve37(angularDir);
25475
25492
  const angularRootNormalized = normalizePath(angularRoot);
25476
25493
  const walk = (dir) => {
25477
25494
  let entries;
@@ -25484,7 +25501,7 @@ var STYLE_EXTENSION_PATTERN2, detectFramework = (filePath, resolved) => {
25484
25501
  if (entry.name.startsWith(".") || entry.name === "node_modules") {
25485
25502
  continue;
25486
25503
  }
25487
- const full = resolve36(dir, entry.name);
25504
+ const full = resolve37(dir, entry.name);
25488
25505
  if (entry.isDirectory()) {
25489
25506
  walk(full);
25490
25507
  continue;
@@ -25525,7 +25542,7 @@ var STYLE_EXTENSION_PATTERN2, detectFramework = (filePath, resolved) => {
25525
25542
  }
25526
25543
  const componentDir = dirname26(full);
25527
25544
  for (const ref of refs) {
25528
- const refAbs = normalizePath(resolve36(componentDir, ref));
25545
+ const refAbs = normalizePath(resolve37(componentDir, ref));
25529
25546
  const refDir = normalizePath(dirname26(refAbs));
25530
25547
  if (refDir === angularRootNormalized || refDir.startsWith(`${angularRootNormalized}/`)) {
25531
25548
  continue;
@@ -25542,7 +25559,7 @@ var STYLE_EXTENSION_PATTERN2, detectFramework = (filePath, resolved) => {
25542
25559
  const push = (path) => {
25543
25560
  if (!path)
25544
25561
  return;
25545
- const abs = normalizePath(resolve36(cwd, path));
25562
+ const abs = normalizePath(resolve37(cwd, path));
25546
25563
  if (!roots.includes(abs))
25547
25564
  roots.push(abs);
25548
25565
  };
@@ -25567,8 +25584,8 @@ var STYLE_EXTENSION_PATTERN2, detectFramework = (filePath, resolved) => {
25567
25584
  push(cfg.assetsDir);
25568
25585
  push(cfg.stylesDir);
25569
25586
  for (const candidate of ["src", "db", "assets", "styles"]) {
25570
- const abs = normalizePath(resolve36(cwd, candidate));
25571
- if (existsSync37(abs) && !roots.includes(abs))
25587
+ const abs = normalizePath(resolve37(cwd, candidate));
25588
+ if (existsSync38(abs) && !roots.includes(abs))
25572
25589
  roots.push(abs);
25573
25590
  }
25574
25591
  try {
@@ -25578,7 +25595,7 @@ var STYLE_EXTENSION_PATTERN2, detectFramework = (filePath, resolved) => {
25578
25595
  continue;
25579
25596
  if (entry.name.startsWith("."))
25580
25597
  continue;
25581
- const abs = normalizePath(resolve36(cwd, entry.name));
25598
+ const abs = normalizePath(resolve37(cwd, entry.name));
25582
25599
  if (roots.includes(abs))
25583
25600
  continue;
25584
25601
  if (shouldIgnorePath(abs, resolved))
@@ -25666,7 +25683,7 @@ var init_pathUtils = __esm(() => {
25666
25683
  });
25667
25684
 
25668
25685
  // src/dev/devPrescan.ts
25669
- import { existsSync as existsSync38, readdirSync as readdirSync9, rmSync as rmSync3 } from "fs";
25686
+ import { existsSync as existsSync39, readdirSync as readdirSync9, rmSync as rmSync3 } from "fs";
25670
25687
  import { mkdir as mkdir11, readFile as readFile7, rename as rename3, writeFile as writeFile9 } from "fs/promises";
25671
25688
  import { join as join49 } from "path";
25672
25689
  var PRESCAN_DIR, PAYLOAD_VERSION = 1, POLL_INTERVAL_MS = 10, DEFAULT_WAIT_MS = 2000, collectConfigVendorSourceDirs = (config) => Array.from(new Set([
@@ -25679,7 +25696,7 @@ var PRESCAN_DIR, PAYLOAD_VERSION = 1, POLL_INTERVAL_MS = 10, DEFAULT_WAIT_MS = 2
25679
25696
  ].filter((dir) => Boolean(dir)))), devPrescanEnabled = () => process.env.ABSOLUTE_DEV_PRESCAN === "1", sleep = (delayMs) => new Promise((resolve) => {
25680
25697
  setTimeout(resolve, delayMs);
25681
25698
  }), isPayload = (value) => typeof value === "object" && value !== null && ("version" in value) && value.version === PAYLOAD_VERSION, tryReadPrescan = async (path) => {
25682
- if (!existsSync38(path))
25699
+ if (!existsSync39(path))
25683
25700
  return;
25684
25701
  try {
25685
25702
  const parsed = JSON.parse(await readFile7(path, "utf8"));
@@ -25735,8 +25752,8 @@ var init_serverEntryCopies = () => {};
25735
25752
 
25736
25753
  // src/dev/fileWatcher.ts
25737
25754
  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";
25755
+ import { existsSync as existsSync40, readdirSync as readdirSync10, statSync as statSync6 } from "fs";
25756
+ import { dirname as dirname27, join as join50, resolve as resolve38 } from "path";
25740
25757
  var safeRemoveFromGraph = (graph, fullPath) => {
25741
25758
  try {
25742
25759
  removeFileFromGraph(graph, fullPath);
@@ -25804,12 +25821,12 @@ var safeRemoveFromGraph = (graph, fullPath) => {
25804
25821
  if (shouldIgnorePath(fullPath, state.resolvedPaths)) {
25805
25822
  return;
25806
25823
  }
25807
- if (event === "rename" && !existsSync39(fullPath)) {
25824
+ if (event === "rename" && !existsSync40(fullPath)) {
25808
25825
  safeRemoveFromGraph(state.dependencyGraph, fullPath);
25809
25826
  onFileChange(fullPath);
25810
25827
  return;
25811
25828
  }
25812
- if (existsSync39(fullPath)) {
25829
+ if (existsSync40(fullPath)) {
25813
25830
  onFileChange(fullPath);
25814
25831
  safeAddToGraph(state.dependencyGraph, fullPath);
25815
25832
  }
@@ -25818,8 +25835,8 @@ var safeRemoveFromGraph = (graph, fullPath) => {
25818
25835
  }, addFileWatchers = (state, paths, onFileChange) => {
25819
25836
  const stylesDir = state.resolvedPaths?.stylesDir;
25820
25837
  paths.forEach((path) => {
25821
- const absolutePath = resolve37(path).replace(/\\/g, "/");
25822
- if (!existsSync39(absolutePath)) {
25838
+ const absolutePath = resolve38(path).replace(/\\/g, "/");
25839
+ if (!existsSync40(absolutePath)) {
25823
25840
  return;
25824
25841
  }
25825
25842
  const isStylesDir = Boolean(stylesDir && absolutePath.startsWith(stylesDir));
@@ -25829,8 +25846,8 @@ var safeRemoveFromGraph = (graph, fullPath) => {
25829
25846
  const watchPaths = getWatchPaths(config, state.resolvedPaths);
25830
25847
  const stylesDir = state.resolvedPaths?.stylesDir;
25831
25848
  watchPaths.forEach((path) => {
25832
- const absolutePath = resolve37(path).replace(/\\/g, "/");
25833
- if (!existsSync39(absolutePath)) {
25849
+ const absolutePath = resolve38(path).replace(/\\/g, "/");
25850
+ if (!existsSync40(absolutePath)) {
25834
25851
  return;
25835
25852
  }
25836
25853
  const isStylesDir = Boolean(stylesDir && absolutePath.startsWith(stylesDir));
@@ -25849,13 +25866,13 @@ var init_fileWatcher = __esm(() => {
25849
25866
  });
25850
25867
 
25851
25868
  // src/dev/assetStore.ts
25852
- import { resolve as resolve38 } from "path";
25869
+ import { resolve as resolve39 } from "path";
25853
25870
  import { readdir as readdir5, unlink } from "fs/promises";
25854
25871
  var mimeTypes, getMimeType = (filePath) => {
25855
25872
  const ext = filePath.slice(filePath.lastIndexOf("."));
25856
25873
  return mimeTypes[ext] ?? "application/octet-stream";
25857
25874
  }, 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);
25875
+ const fullPath = resolve39(dir, entry.name);
25859
25876
  if (entry.isDirectory()) {
25860
25877
  return walkAndClean(fullPath);
25861
25878
  }
@@ -25871,10 +25888,10 @@ var mimeTypes, getMimeType = (filePath) => {
25871
25888
  }, cleanStaleAssets = async (store, manifest, buildDir) => {
25872
25889
  const liveByIdentity = new Map;
25873
25890
  for (const webPath of store.keys()) {
25874
- const diskPath = resolve38(buildDir, webPath.slice(1));
25891
+ const diskPath = resolve39(buildDir, webPath.slice(1));
25875
25892
  liveByIdentity.set(stripHash(diskPath), diskPath);
25876
25893
  }
25877
- const absBuildDir = resolve38(buildDir);
25894
+ const absBuildDir = resolve39(buildDir);
25878
25895
  Object.values(manifest).forEach((val) => {
25879
25896
  if (!HASHED_FILE_RE.test(val))
25880
25897
  return;
@@ -25894,13 +25911,13 @@ var mimeTypes, getMimeType = (filePath) => {
25894
25911
  }, evictMissingChunks = async (store, buildDir) => {
25895
25912
  const chunkKeys = [...store.keys()].filter((webPath) => webPath.includes("/chunk-"));
25896
25913
  await Promise.all(chunkKeys.map(async (webPath) => {
25897
- const onDisk = await Bun.file(resolve38(buildDir, webPath.slice(1))).exists().catch(() => false);
25914
+ const onDisk = await Bun.file(resolve39(buildDir, webPath.slice(1))).exists().catch(() => false);
25898
25915
  if (!onDisk)
25899
25916
  store.delete(webPath);
25900
25917
  }));
25901
25918
  }, lookupAsset = (store, path) => store.get(path), processScanEntry = (entry, dir, prefix, store, scanDir) => {
25902
25919
  if (entry.isDirectory()) {
25903
- return scanDir(resolve38(dir, entry.name), `${prefix}${entry.name}/`);
25920
+ return scanDir(resolve39(dir, entry.name), `${prefix}${entry.name}/`);
25904
25921
  }
25905
25922
  if (!entry.name.startsWith("chunk-")) {
25906
25923
  return null;
@@ -25909,7 +25926,7 @@ var mimeTypes, getMimeType = (filePath) => {
25909
25926
  if (store.has(webPath)) {
25910
25927
  return null;
25911
25928
  }
25912
- return Bun.file(resolve38(dir, entry.name)).bytes().then((bytes) => {
25929
+ return Bun.file(resolve39(dir, entry.name)).bytes().then((bytes) => {
25913
25930
  store.set(webPath, bytes);
25914
25931
  return;
25915
25932
  }).catch(() => {});
@@ -25931,7 +25948,7 @@ var mimeTypes, getMimeType = (filePath) => {
25931
25948
  for (const webPath of newIdentities.values()) {
25932
25949
  if (store.has(webPath))
25933
25950
  continue;
25934
- loadPromises.push(Bun.file(resolve38(buildDir, webPath.slice(1))).bytes().then((bytes) => {
25951
+ loadPromises.push(Bun.file(resolve39(buildDir, webPath.slice(1))).bytes().then((bytes) => {
25935
25952
  store.set(webPath, bytes);
25936
25953
  return;
25937
25954
  }).catch(() => {}));
@@ -25998,7 +26015,7 @@ var init_restartScope = __esm(() => {
25998
26015
 
25999
26016
  // src/islands/pageMetadata.ts
26000
26017
  import { readFileSync as readFileSync31 } from "fs";
26001
- import { dirname as dirname28, resolve as resolve39 } from "path";
26018
+ import { dirname as dirname28, resolve as resolve40 } from "path";
26002
26019
  var pagePatterns, getPageDirs = (config) => [
26003
26020
  { dir: config.angularDirectory, framework: "angular" },
26004
26021
  { dir: config.emberDirectory, framework: "ember" },
@@ -26018,15 +26035,15 @@ var pagePatterns, getPageDirs = (config) => [
26018
26035
  const source = definition.buildReference?.source;
26019
26036
  if (!source)
26020
26037
  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));
26038
+ const resolvedSource = source.startsWith("file://") ? new URL(source).pathname : resolve40(dirname28(buildInfo.resolvedRegistryPath), source);
26039
+ lookup.set(`${definition.framework}:${definition.component}`, resolve40(resolvedSource));
26023
26040
  }
26024
26041
  return lookup;
26025
26042
  }, getCurrentPageIslandMetadata = () => globalThis.__absolutePageIslandMetadata ?? new Map, metadataUsesSource = (metadata, target) => metadata.islands.some((usage) => {
26026
26043
  const candidate = usage.source;
26027
- return candidate ? resolve39(candidate) === target : false;
26044
+ return candidate ? resolve40(candidate) === target : false;
26028
26045
  }), getPagesUsingIslandSource = (sourcePath) => {
26029
- const target = resolve39(sourcePath);
26046
+ const target = resolve40(sourcePath);
26030
26047
  return [...getCurrentPageIslandMetadata().values()].filter((metadata) => metadataUsesSource(metadata, target)).map((metadata) => metadata.pagePath);
26031
26048
  }, resolveIslandUsages = (islands, islandSourceLookup) => islands.map((usage) => {
26032
26049
  const sourcePath = islandSourceLookup.get(`${usage.framework}:${usage.component}`);
@@ -26038,13 +26055,13 @@ var pagePatterns, getPageDirs = (config) => [
26038
26055
  const pattern = pagePatterns[entry.framework];
26039
26056
  if (!pattern)
26040
26057
  return;
26041
- const files = await scanEntryPoints(resolve39(entry.dir), pattern);
26058
+ const files = await scanEntryPoints(resolve40(entry.dir), pattern);
26042
26059
  for (const filePath of files) {
26043
26060
  const source = readFileSync31(filePath, "utf-8");
26044
26061
  const islands = extractIslandUsagesFromSource(source);
26045
- pageMetadata.set(resolve39(filePath), {
26062
+ pageMetadata.set(resolve40(filePath), {
26046
26063
  islands: resolveIslandUsages(islands, islandSourceLookup),
26047
- pagePath: resolve39(filePath)
26064
+ pagePath: resolve40(filePath)
26048
26065
  });
26049
26066
  }
26050
26067
  }, loadPageIslandMetadata = async (config) => {
@@ -26162,9 +26179,9 @@ var init_transformCache = __esm(() => {
26162
26179
  });
26163
26180
 
26164
26181
  // src/dev/reactComponentClassifier.ts
26165
- import { resolve as resolve40 } from "path";
26182
+ import { resolve as resolve41 } from "path";
26166
26183
  var classifyComponent = (filePath) => {
26167
- const normalizedPath = resolve40(filePath);
26184
+ const normalizedPath = resolve41(filePath);
26168
26185
  if (normalizedPath.includes("/react/pages/")) {
26169
26186
  return "server";
26170
26187
  }
@@ -26176,7 +26193,7 @@ var classifyComponent = (filePath) => {
26176
26193
  var init_reactComponentClassifier = () => {};
26177
26194
 
26178
26195
  // src/dev/moduleMapper.ts
26179
- import { basename as basename18, resolve as resolve41 } from "path";
26196
+ import { basename as basename18, resolve as resolve42 } from "path";
26180
26197
  var buildModulePaths = (moduleKeys, manifest) => {
26181
26198
  const modulePaths = {};
26182
26199
  moduleKeys.forEach((key) => {
@@ -26186,7 +26203,7 @@ var buildModulePaths = (moduleKeys, manifest) => {
26186
26203
  });
26187
26204
  return modulePaths;
26188
26205
  }, processChangedFile = (sourceFile, framework, manifest, resolvedPaths, processedFiles) => {
26189
- const normalizedFile = resolve41(sourceFile);
26206
+ const normalizedFile = resolve42(sourceFile);
26190
26207
  const normalizedPath = normalizedFile.replace(/\\/g, "/");
26191
26208
  if (processedFiles.has(normalizedFile)) {
26192
26209
  return null;
@@ -26222,7 +26239,7 @@ var buildModulePaths = (moduleKeys, manifest) => {
26222
26239
  });
26223
26240
  return grouped;
26224
26241
  }, mapSourceFileToManifestKeys = (sourceFile, framework, resolvedPaths) => {
26225
- const normalizedFile = resolve41(sourceFile);
26242
+ const normalizedFile = resolve42(sourceFile);
26226
26243
  const fileName = basename18(normalizedFile);
26227
26244
  const baseName = fileName.replace(/\.(tsx?|jsx?|vue|svelte|css|html)$/, "");
26228
26245
  const pascalName = toPascal(baseName);
@@ -26278,7 +26295,7 @@ var init_moduleMapper = __esm(() => {
26278
26295
 
26279
26296
  // src/utils/spaRouteCss.ts
26280
26297
  import { readFile as readFile8 } from "fs/promises";
26281
- import { dirname as dirname29, isAbsolute as isAbsolute8, resolve as resolve42 } from "path";
26298
+ import { dirname as dirname29, isAbsolute as isAbsolute8, resolve as resolve43 } from "path";
26282
26299
  var sideManifestCache, readSideManifest = async (sideManifestPath) => {
26283
26300
  const cached = sideManifestCache.get(sideManifestPath);
26284
26301
  if (cached !== undefined)
@@ -26316,7 +26333,7 @@ var sideManifestCache, readSideManifest = async (sideManifestPath) => {
26316
26333
  }, readChildCss = async (cssPath, sideManifestPath) => {
26317
26334
  if (!cssPath)
26318
26335
  return "";
26319
- const resolvedCssPath = isAbsolute8(cssPath) ? cssPath : resolve42(dirname29(sideManifestPath), cssPath);
26336
+ const resolvedCssPath = isAbsolute8(cssPath) ? cssPath : resolve43(dirname29(sideManifestPath), cssPath);
26320
26337
  const cached = childCssCache.get(resolvedCssPath);
26321
26338
  if (cached !== undefined)
26322
26339
  return cached;
@@ -26400,7 +26417,7 @@ __export(exports_resolveOwningComponents, {
26400
26417
  resolveOwningComponents: () => resolveOwningComponents
26401
26418
  });
26402
26419
  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";
26420
+ import { dirname as dirname30, extname as extname15, join as join51, resolve as resolve44 } from "path";
26404
26421
  import ts19 from "typescript";
26405
26422
  var ENTITY_DECORATORS, isAngularSourceFile = (file) => file.endsWith(".ts") || file.endsWith(".tsx"), walkAngularSourceFiles = (root) => {
26406
26423
  const out = [];
@@ -26513,7 +26530,7 @@ var ENTITY_DECORATORS, isAngularSourceFile = (file) => file.endsWith(".ts") || f
26513
26530
  };
26514
26531
  visit(sourceFile);
26515
26532
  return out;
26516
- }, safeNormalize = (path) => resolve43(path).replace(/\\/g, "/"), resolveOwningComponents = (params) => {
26533
+ }, safeNormalize = (path) => resolve44(path).replace(/\\/g, "/"), resolveOwningComponents = (params) => {
26517
26534
  const { changedFilePath, userAngularRoot } = params;
26518
26535
  const changedAbs = safeNormalize(changedFilePath);
26519
26536
  const out = [];
@@ -26582,7 +26599,7 @@ var ENTITY_DECORATORS, isAngularSourceFile = (file) => file.endsWith(".ts") || f
26582
26599
  if (!spec.startsWith(".") && !spec.startsWith("/")) {
26583
26600
  return null;
26584
26601
  }
26585
- const base = resolve43(childDir, spec);
26602
+ const base = resolve44(childDir, spec);
26586
26603
  const candidates = [
26587
26604
  `${base}.ts`,
26588
26605
  `${base}.tsx`,
@@ -26620,7 +26637,7 @@ var ENTITY_DECORATORS, isAngularSourceFile = (file) => file.endsWith(".ts") || f
26620
26637
  };
26621
26638
  if (cls.kind === "component") {
26622
26639
  for (const url of [...cls.templateUrls, ...cls.styleUrls]) {
26623
- const abs = safeNormalize(resolve43(componentDir, url));
26640
+ const abs = safeNormalize(resolve44(componentDir, url));
26624
26641
  const existing = resource.get(abs);
26625
26642
  if (existing)
26626
26643
  existing.push(entity);
@@ -26888,7 +26905,7 @@ var init_webSocket = __esm(() => {
26888
26905
  });
26889
26906
 
26890
26907
  // src/utils/loadConfig.ts
26891
- import { resolve as resolve44 } from "path";
26908
+ import { resolve as resolve45 } from "path";
26892
26909
  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
26910
  if (!isObject2(config)) {
26894
26911
  return false;
@@ -26939,7 +26956,7 @@ var RESERVED_TOP_LEVEL_KEYS, isObject2 = (value) => typeof value === "object" &&
26939
26956
  }
26940
26957
  return config;
26941
26958
  }, loadRawConfig = async (configPath) => {
26942
- const resolved = resolve44(configPath ?? process.env.ABSOLUTE_CONFIG ?? "absolute.config.ts");
26959
+ const resolved = resolve45(configPath ?? process.env.ABSOLUTE_CONFIG ?? "absolute.config.ts");
26943
26960
  const mod = await import(resolved);
26944
26961
  const config = mod.default ?? mod.config;
26945
26962
  if (!config) {
@@ -27065,11 +27082,11 @@ var init_hotResources = __esm(() => {
27065
27082
  });
27066
27083
 
27067
27084
  // src/plugins/openApiPlugin.ts
27068
- import { existsSync as existsSync40, readFileSync as readFileSync34 } from "fs";
27085
+ import { existsSync as existsSync41, readFileSync as readFileSync34 } from "fs";
27069
27086
  import { join as join52 } from "path";
27070
27087
  var FALLBACK_NAME = "AbsoluteJS API", FALLBACK_VERSION = "1.0.0", projectInfo = (cwd) => {
27071
27088
  const path = join52(cwd, "package.json");
27072
- if (!existsSync40(path)) {
27089
+ if (!existsSync41(path)) {
27073
27090
  return { name: FALLBACK_NAME, version: FALLBACK_VERSION };
27074
27091
  }
27075
27092
  try {
@@ -27122,11 +27139,11 @@ var FALLBACK_NAME = "AbsoluteJS API", FALLBACK_VERSION = "1.0.0", projectInfo =
27122
27139
  var init_openApiPlugin = () => {};
27123
27140
 
27124
27141
  // src/plugins/telemetryPlugin.ts
27125
- import { existsSync as existsSync41, readFileSync as readFileSync35 } from "fs";
27142
+ import { existsSync as existsSync42, readFileSync as readFileSync35 } from "fs";
27126
27143
  import { join as join53 } from "path";
27127
27144
  var OTEL_PACKAGE = "@elysia/opentelemetry", readPackageName = (cwd) => {
27128
27145
  const path = join53(cwd, "package.json");
27129
- if (!existsSync41(path))
27146
+ if (!existsSync42(path))
27130
27147
  return null;
27131
27148
  try {
27132
27149
  const pkg = JSON.parse(readFileSync35(path, "utf-8"));
@@ -27522,7 +27539,7 @@ var init_requestContext = __esm(() => {
27522
27539
  });
27523
27540
 
27524
27541
  // src/core/loadIslandRegistry.ts
27525
- import { resolve as resolve45 } from "path";
27542
+ import { resolve as resolve46 } from "path";
27526
27543
  var isRecord6 = (value) => typeof value === "object" && value !== null, resolveRegistryExport2 = (mod) => {
27527
27544
  if (isRecord6(mod.islandRegistry))
27528
27545
  return mod.islandRegistry;
@@ -27530,7 +27547,7 @@ var isRecord6 = (value) => typeof value === "object" && value !== null, resolveR
27530
27547
  return mod.default;
27531
27548
  throw new Error("Island registry module must export `islandRegistry` or a default registry object.");
27532
27549
  }, isRegistryModuleExport = (value) => isRecord6(value), isIslandRegistryInput = (value) => isRecord6(value), loadIslandRegistry = async (registryPath) => {
27533
- const resolvedRegistryPath = resolve45(registryPath);
27550
+ const resolvedRegistryPath = resolve46(registryPath);
27534
27551
  const buildInfo = await loadIslandRegistryBuildInfo(resolvedRegistryPath);
27535
27552
  if (buildInfo.definitions.length > 0) {
27536
27553
  return buildInfo.registry;
@@ -27738,11 +27755,11 @@ __export(exports_config, {
27738
27755
  normalizeAbsoluteMobileConfig: () => normalizeAbsoluteMobileConfig
27739
27756
  });
27740
27757
  import { readFileSync as readFileSync36 } from "fs";
27741
- import { resolve as resolve46 } from "path";
27758
+ import { resolve as resolve47 } from "path";
27742
27759
  import { createHash as createHash4, createPublicKey, X509Certificate } from "crypto";
27743
27760
  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);
27761
+ const root = resolve47(projectRoot);
27762
+ const path = resolve47(root, value);
27746
27763
  if (path !== root && !path.startsWith(`${root}/`)) {
27747
27764
  throw new TypeError(`${field} must remain inside the project root.`);
27748
27765
  }
@@ -28261,7 +28278,7 @@ import {
28261
28278
  rm as rm11,
28262
28279
  writeFile as writeFile10
28263
28280
  } from "fs/promises";
28264
- import { resolve as resolve47 } from "path";
28281
+ import { resolve as resolve48 } from "path";
28265
28282
  import { Elysia as Elysia4 } from "elysia";
28266
28283
  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
28284
  if (!config.platforms.includes("ios"))
@@ -28348,7 +28365,7 @@ var JSON_HEADERS, OWNERSHIP_FILE = ".absolutejs-mobile-associations.json", HTTP_
28348
28365
  return false;
28349
28366
  }
28350
28367
  }, assertOwnedOutput = async (root) => {
28351
- const path = resolve47(root, OWNERSHIP_FILE);
28368
+ const path = resolve48(root, OWNERSHIP_FILE);
28352
28369
  let ownership;
28353
28370
  try {
28354
28371
  ownership = JSON.parse(await readFile9(path, "utf8"));
@@ -28375,10 +28392,10 @@ var JSON_HEADERS, OWNERSHIP_FILE = ".absolutejs-mobile-associations.json", HTTP_
28375
28392
  if (hasCurrent)
28376
28393
  await rm11(backup, { force: true, recursive: true });
28377
28394
  }, materializeHost = async (root, host, files) => {
28378
- const directory = resolve47(root, host, ".well-known");
28395
+ const directory = resolve48(root, host, ".well-known");
28379
28396
  await mkdir12(directory, { recursive: true });
28380
28397
  return Promise.all(files.map(async ([name, document2]) => {
28381
- const path = resolve47(directory, name);
28398
+ const path = resolve48(directory, name);
28382
28399
  await writeAtomic(path, `${JSON.stringify(document2, null, 2)}
28383
28400
  `);
28384
28401
  return path;
@@ -28401,7 +28418,7 @@ var JSON_HEADERS, OWNERSHIP_FILE = ".absolutejs-mobile-associations.json", HTTP_
28401
28418
  });
28402
28419
  return endpoints;
28403
28420
  }), materializeAbsoluteMobileAssociationFiles = async (config, outputDirectory) => {
28404
- const root = resolve47(outputDirectory);
28421
+ const root = resolve48(outputDirectory);
28405
28422
  const temporary = `${root}.${crypto.randomUUID()}.tmp`;
28406
28423
  const documents = createAbsoluteMobileAssociationDocuments(config, {
28407
28424
  requireAll: true
@@ -28415,10 +28432,10 @@ var JSON_HEADERS, OWNERSHIP_FILE = ".absolutejs-mobile-associations.json", HTTP_
28415
28432
  await mkdir12(temporary, { recursive: true });
28416
28433
  try {
28417
28434
  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)}
28435
+ await writeAtomic(resolve48(temporary, OWNERSHIP_FILE), `${JSON.stringify({ format: 1, hosts: config.deepLinkHosts }, null, 2)}
28419
28436
  `);
28420
28437
  await publishGeneratedDirectory(temporary, root);
28421
- const written = temporaryPaths.map((path) => resolve47(root, path.slice(temporary.length + 1)));
28438
+ const written = temporaryPaths.map((path) => resolve48(root, path.slice(temporary.length + 1)));
28422
28439
  return { root, written };
28423
28440
  } catch (error) {
28424
28441
  await rm11(temporary, { force: true, recursive: true });
@@ -29207,12 +29224,12 @@ import {
29207
29224
  X509Certificate as X509Certificate3
29208
29225
  } from "crypto";
29209
29226
  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";
29227
+ import { dirname as dirname31, isAbsolute as isAbsolute9, relative as relative21, resolve as resolve49, sep as sep7 } from "path";
29211
29228
  import { pathToFileURL as pathToFileURL3 } from "url";
29212
29229
  import { Elysia as Elysia6 } from "elysia";
29213
29230
  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);
29231
+ const root = resolve49(projectRoot);
29232
+ const path = resolve49(root, requested);
29216
29233
  const projectRelative = relative21(root, path);
29217
29234
  if (projectRelative === ".." || projectRelative.startsWith(`..${sep7}`) || isAbsolute9(projectRelative))
29218
29235
  throw new TypeError("mobile.updates.server.registry must remain inside the project.");
@@ -29483,7 +29500,7 @@ var init_bridgeInternals = __esm(() => {
29483
29500
  });
29484
29501
 
29485
29502
  // src/dev/angular/hmrCompiler.ts
29486
- import { dirname as dirname32, relative as relative22, resolve as resolve49 } from "path";
29503
+ import { dirname as dirname32, relative as relative22, resolve as resolve50 } from "path";
29487
29504
  import { performance as performance2 } from "perf_hooks";
29488
29505
  var encodeHmrComponentId = (absoluteFilePath, className) => {
29489
29506
  const projectRel = relative22(process.cwd(), absoluteFilePath).replace(/\\/g, "/");
@@ -29495,7 +29512,7 @@ var encodeHmrComponentId = (absoluteFilePath, className) => {
29495
29512
  return null;
29496
29513
  const filePathRel = decoded.slice(0, separatorIndex);
29497
29514
  const className = decoded.slice(separatorIndex + 1);
29498
- const componentFilePath = resolve49(process.cwd(), filePathRel);
29515
+ const componentFilePath = resolve50(process.cwd(), filePathRel);
29499
29516
  const projectRelPath = relative22(process.cwd(), componentFilePath).replace(/\\/g, "/");
29500
29517
  const cacheKey = encodeURIComponent(`${projectRelPath}@${className}`);
29501
29518
  await Promise.resolve().then(() => init_fastHmrCompiler());
@@ -29700,14 +29717,14 @@ var init_hmr = __esm(() => {
29700
29717
  });
29701
29718
 
29702
29719
  // 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";
29720
+ import { existsSync as existsSync43, mkdirSync as mkdirSync14, readFileSync as readFileSync38, writeFileSync as writeFileSync10 } from "fs";
29721
+ import { dirname as dirname33, join as join57, resolve as resolve51 } from "path";
29705
29722
  import { Elysia as Elysia8 } from "elysia";
29706
29723
  var ENDPOINT = "/.well-known/appspecific/com.chrome.devtools.json", UUID_CACHE_KEY = "__absoluteDevtoolsWorkspaceUuid", getGlobalUuid = () => Reflect.get(globalThis, UUID_CACHE_KEY), setGlobalUuid = (uuid) => {
29707
29724
  Reflect.set(globalThis, UUID_CACHE_KEY, uuid);
29708
29725
  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))
29726
+ }, 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) => resolve51(uuidCachePath ?? join57(buildDir, ".absolute", "chrome-devtools-workspace-uuid")), readCachedUuid = (cachePath) => {
29727
+ if (!existsSync43(cachePath))
29711
29728
  return null;
29712
29729
  try {
29713
29730
  const value = readFileSync38(cachePath, "utf-8").trim();
@@ -29732,7 +29749,7 @@ var ENDPOINT = "/.well-known/appspecific/com.chrome.devtools.json", UUID_CACHE_K
29732
29749
  writeFileSync10(cachePath, uuid, "utf-8");
29733
29750
  return setGlobalUuid(uuid);
29734
29751
  }, devtoolsJson = (buildDir, options = {}) => {
29735
- const rootPath = resolve50(options.projectRoot ?? process.cwd());
29752
+ const rootPath = resolve51(options.projectRoot ?? process.cwd());
29736
29753
  const root = options.normalizeForWindowsContainer === false ? rootPath : normalizeDevtoolsWorkspaceRoot(rootPath);
29737
29754
  const uuid = getOrCreateUuid(buildDir, options);
29738
29755
  return new Elysia8({ name: "absolute-devtools-json" }).get(ENDPOINT, () => ({
@@ -29756,13 +29773,13 @@ var ENDPOINT = "/.well-known/appspecific/com.chrome.devtools.json", UUID_CACHE_K
29756
29773
  var init_devtoolsJson = () => {};
29757
29774
 
29758
29775
  // src/plugins/imageOptimizer.ts
29759
- import { existsSync as existsSync43 } from "fs";
29760
- import { resolve as resolve51 } from "path";
29776
+ import { existsSync as existsSync44 } from "fs";
29777
+ import { resolve as resolve52 } from "path";
29761
29778
  import { Elysia as Elysia9 } from "elysia";
29762
29779
  var DEFAULT_CACHE_TTL_SECONDS = 60, MS_PER_SECOND = 1000, MAX_QUALITY = 100, avifInProgress, safeResolve = (path, baseDir) => {
29763
29780
  try {
29764
29781
  const resolved = validateSafePath(path, baseDir);
29765
- if (existsSync43(resolved))
29782
+ if (existsSync44(resolved))
29766
29783
  return resolved;
29767
29784
  return null;
29768
29785
  } catch {
@@ -29770,7 +29787,7 @@ var DEFAULT_CACHE_TTL_SECONDS = 60, MS_PER_SECOND = 1000, MAX_QUALITY = 100, avi
29770
29787
  }
29771
29788
  }, resolveLocalImage = (url, buildDir) => {
29772
29789
  const cleanPath = url.startsWith("/") ? url.slice(1) : url;
29773
- return safeResolve(cleanPath, buildDir) ?? safeResolve(cleanPath, resolve51(process.cwd()));
29790
+ return safeResolve(cleanPath, buildDir) ?? safeResolve(cleanPath, resolve52(process.cwd()));
29774
29791
  }, parseQueryParams = (query, allowedSizes, defaultQuality) => {
29775
29792
  const url = typeof query["url"] === "string" ? query["url"] : undefined;
29776
29793
  const wParam = typeof query["w"] === "string" ? query["w"] : undefined;
@@ -31212,7 +31229,7 @@ var init_prerender = () => {};
31212
31229
 
31213
31230
  // src/core/prepare.ts
31214
31231
  import { createHash as createHash9 } from "crypto";
31215
- import { existsSync as existsSync44, readdirSync as readdirSync12, readFileSync as readFileSync40 } from "fs";
31232
+ import { existsSync as existsSync45, readdirSync as readdirSync12, readFileSync as readFileSync40 } from "fs";
31216
31233
  import { basename as basename19, join as join61, relative as relative23, resolve as resolvePath3 } from "path";
31217
31234
  import { Elysia as Elysia12, NotFound } from "elysia";
31218
31235
  var MS_PER_SECOND2 = 1000, DEFAULT_PORT2 = 3000, MAX_STATIC_ROUTE_COUNT, STATIC_PLUGIN_RETRY_DELAY_MS = 50, waitForStaticPluginRetry = () => new Promise((resolve) => {
@@ -31341,7 +31358,7 @@ var MS_PER_SECOND2 = 1000, DEFAULT_PORT2 = 3000, MAX_STATIC_ROUTE_COUNT, STATIC_
31341
31358
  if (!fileName)
31342
31359
  continue;
31343
31360
  const srcPath = resolvePath3(devIndexDir, fileName);
31344
- if (!existsSync44(srcPath))
31361
+ if (!existsSync45(srcPath))
31345
31362
  continue;
31346
31363
  manifest[key] = `${SRC_URL_PREFIX}${encodeSrcPath(relative23(process.cwd(), srcPath))}`;
31347
31364
  }
@@ -31356,7 +31373,7 @@ var MS_PER_SECOND2 = 1000, DEFAULT_PORT2 = 3000, MAX_STATIC_ROUTE_COUNT, STATIC_
31356
31373
  const path = href.split("?")[0] ?? href;
31357
31374
  const filePath = join61(buildDir, path);
31358
31375
  let versioned = href;
31359
- if (existsSync44(filePath)) {
31376
+ if (existsSync45(filePath)) {
31360
31377
  const hash = createHash9("sha256").update(readFileSync40(filePath)).digest("hex").slice(0, ICON_HASH_LENGTH);
31361
31378
  versioned = href.includes("?") ? `${href}&v=${hash}` : `${href}?v=${hash}`;
31362
31379
  }
@@ -31478,7 +31495,7 @@ var MS_PER_SECOND2 = 1000, DEFAULT_PORT2 = 3000, MAX_STATIC_ROUTE_COUNT, STATIC_
31478
31495
  };
31479
31496
  }, loadPrerenderMap = (prerenderDir) => {
31480
31497
  const map = new Map;
31481
- if (!existsSync44(prerenderDir))
31498
+ if (!existsSync45(prerenderDir))
31482
31499
  return map;
31483
31500
  let entries;
31484
31501
  try {
@@ -31496,7 +31513,7 @@ var MS_PER_SECOND2 = 1000, DEFAULT_PORT2 = 3000, MAX_STATIC_ROUTE_COUNT, STATIC_
31496
31513
  return map;
31497
31514
  }, loadMobileCompatibilityPlugin = async (buildDir) => {
31498
31515
  const root = join61(buildDir, ".absolutejs", "mobile-compatibility");
31499
- if (!existsSync44(join61(root, "current.json"))) {
31516
+ if (!existsSync45(join61(root, "current.json"))) {
31500
31517
  return new Elysia12({ name: "absolutejs-mobile-compatibility-empty" });
31501
31518
  }
31502
31519
  const [
@@ -31561,12 +31578,12 @@ var MS_PER_SECOND2 = 1000, DEFAULT_PORT2 = 3000, MAX_STATIC_ROUTE_COUNT, STATIC_
31561
31578
  recordStep("load production manifest and island metadata", stepStartedAt);
31562
31579
  stepStartedAt = performance.now();
31563
31580
  const conventionsPath = join61(buildDir, "conventions.json");
31564
- if (existsSync44(conventionsPath)) {
31581
+ if (existsSync45(conventionsPath)) {
31565
31582
  const conventions = JSON.parse(readFileSync40(conventionsPath, "utf-8"));
31566
31583
  setConventions(conventions);
31567
31584
  }
31568
31585
  const spaRoutesPath = join61(buildDir, "spa-routes.json");
31569
- if (existsSync44(spaRoutesPath)) {
31586
+ if (existsSync45(spaRoutesPath)) {
31570
31587
  setSpaRouteManifest(JSON.parse(readFileSync40(spaRoutesPath, "utf-8")));
31571
31588
  }
31572
31589
  recordStep("load production conventions", stepStartedAt);
@@ -31738,8 +31755,8 @@ __export(exports_moduleServer, {
31738
31755
  warmPage: () => warmPage,
31739
31756
  warnIfReactFastRefreshUnsupported: () => warnIfReactFastRefreshUnsupported
31740
31757
  });
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";
31758
+ import { existsSync as existsSync46, readFileSync as readFileSync41, realpathSync as realpathSync6, statSync as statSync9 } from "fs";
31759
+ import { basename as basename20, dirname as dirname35, extname as extname16, join as join62, resolve as resolve53, relative as relative24 } from "path";
31743
31760
  var SRC_PREFIX = "/@src/", BROWSER_DEFINE, jsTranspiler2, legacyDecoratorTsconfig, tsTranspiler2, tsxTranspiler, TRANSPILABLE, ALL_EXPORTS_RE, STRING_CONTENTS_RE, preserveTypeExports = (originalSource, transpiled, valueExports) => {
31744
31761
  const codeOnly = originalSource.replace(STRING_CONTENTS_RE, '""');
31745
31762
  const allExports = [];
@@ -31759,10 +31776,10 @@ var SRC_PREFIX = "/@src/", BROWSER_DEFINE, jsTranspiler2, legacyDecoratorTsconfi
31759
31776
  ${stubs}
31760
31777
  `;
31761
31778
  }, resolveRelativeExtension = (srcPath, projectRoot, extensions) => {
31762
- const directHit = extensions.find((ext) => existsSync45(resolve52(projectRoot, srcPath + ext)));
31779
+ const directHit = extensions.find((ext) => existsSync46(resolve53(projectRoot, srcPath + ext)));
31763
31780
  if (directHit)
31764
31781
  return srcPath + directHit;
31765
- const indexHit = extensions.find((ext) => existsSync45(resolve52(projectRoot, srcPath, `index${ext}`)));
31782
+ const indexHit = extensions.find((ext) => existsSync46(resolve53(projectRoot, srcPath, `index${ext}`)));
31766
31783
  if (indexHit)
31767
31784
  return `${srcPath}/index${indexHit}`;
31768
31785
  return srcPath;
@@ -31791,7 +31808,7 @@ ${stubs}
31791
31808
  return invalidationVersion > 0 ? `${mtime}.${invalidationVersion}` : `${mtime}`;
31792
31809
  }, srcUrl = (relPath, projectRoot) => {
31793
31810
  const base = `${SRC_PREFIX}${encodeSrcPath(relPath)}`;
31794
- const absPath = resolve52(projectRoot, relPath);
31811
+ const absPath = resolve53(projectRoot, relPath);
31795
31812
  const cached = mtimeCache.get(absPath);
31796
31813
  if (cached !== undefined)
31797
31814
  return `${base}?v=${buildVersion(cached, absPath)}`;
@@ -31803,12 +31820,12 @@ ${stubs}
31803
31820
  return base;
31804
31821
  }
31805
31822
  }, resolveRelativeImport = (relPath, fileDir, projectRoot, extensions) => {
31806
- const absPath = resolve52(fileDir, relPath);
31823
+ const absPath = resolve53(fileDir, relPath);
31807
31824
  const rel = relative24(projectRoot, absPath);
31808
31825
  const extension = extname16(rel);
31809
31826
  let srcPath = RESOLVED_MODULE_EXTENSIONS.has(extension) ? rel : resolveRelativeExtension(rel, projectRoot, extensions);
31810
31827
  if (extname16(srcPath) === ".svelte") {
31811
- srcPath = relative24(projectRoot, resolveSvelteModulePath(resolve52(projectRoot, srcPath)));
31828
+ srcPath = relative24(projectRoot, resolveSvelteModulePath(resolve53(projectRoot, srcPath)));
31812
31829
  }
31813
31830
  return srcUrl(srcPath, projectRoot);
31814
31831
  }, NODE_BUILTIN_RE, resolveAbsoluteSpecifier = (specifier, projectRoot) => {
@@ -31827,14 +31844,14 @@ ${stubs}
31827
31844
  const packageName = isScoped ? `${parts[0]}/${parts[1]}` : parts[0];
31828
31845
  const subpath = isScoped ? parts.slice(2).join("/") : parts.slice(1).join("/");
31829
31846
  if (!subpath) {
31830
- const pkgDir = resolve52(projectRoot, "node_modules", packageName ?? "");
31847
+ const pkgDir = resolve53(projectRoot, "node_modules", packageName ?? "");
31831
31848
  const pkgJsonPath = join62(pkgDir, "package.json");
31832
- if (existsSync45(pkgJsonPath)) {
31849
+ if (existsSync46(pkgJsonPath)) {
31833
31850
  const pkg = JSON.parse(readFileSync41(pkgJsonPath, "utf-8"));
31834
31851
  const esmEntry = typeof pkg.module === "string" && pkg.module || typeof pkg.browser === "string" && pkg.browser;
31835
31852
  if (esmEntry) {
31836
- const resolved = resolve52(pkgDir, esmEntry);
31837
- if (existsSync45(resolved))
31853
+ const resolved = resolve53(pkgDir, esmEntry);
31854
+ if (existsSync46(resolved))
31838
31855
  return relative24(projectRoot, resolved);
31839
31856
  }
31840
31857
  }
@@ -31882,7 +31899,7 @@ ${stubs}
31882
31899
  const rel = relative24(projectRoot, absPath).replace(/\\/g, "/");
31883
31900
  return `${prefix}${srcUrl(rel, projectRoot)}${suffix}`;
31884
31901
  }
31885
- if (!existsSync45(absPath))
31902
+ if (!existsSync46(absPath))
31886
31903
  return _match;
31887
31904
  const rel = relative24(projectRoot, absPath).replace(/\\/g, "/");
31888
31905
  return `${prefix}${srcUrl(rel, projectRoot)}${suffix}`;
@@ -31890,12 +31907,12 @@ ${stubs}
31890
31907
  result = result.replace(/((?:from|import)\s*["'])(\/[^"']+\.(tsx?|jsx?|ts))(["'])/g, rewriteAbsoluteToSrc);
31891
31908
  result = result.replace(/(import\s*\(\s*["'])(\/[^"']+\.(tsx?|jsx?|ts))(["']\s*\))/g, rewriteAbsoluteToSrc);
31892
31909
  result = result.replace(/new\s+URL\(\s*["'](\.\.?\/[^"']+)["']\s*,\s*import\.meta\.url\s*\)/g, (_match, relPath) => {
31893
- const absPath = resolve52(fileDir, relPath);
31910
+ const absPath = resolve53(fileDir, relPath);
31894
31911
  const rel = relative24(projectRoot, absPath);
31895
31912
  return `new URL('${srcUrl(rel, projectRoot)}', import.meta.url)`;
31896
31913
  });
31897
31914
  result = result.replace(/import\.meta\.resolve\(\s*["'](\.\.?\/[^"']+)["']\s*\)/g, (_match, relPath) => {
31898
- const absPath = resolve52(fileDir, relPath);
31915
+ const absPath = resolve53(fileDir, relPath);
31899
31916
  const rel = relative24(projectRoot, absPath);
31900
31917
  return `'${srcUrl(rel, projectRoot)}'`;
31901
31918
  });
@@ -32217,7 +32234,7 @@ ${code}`;
32217
32234
  code = injectVueHmr(code, filePath, projectRoot, vueDir);
32218
32235
  return rewriteImports(code, filePath, projectRoot, rewriter);
32219
32236
  }, injectVueHmr = (code, filePath, projectRoot, vueDir) => {
32220
- const hmrBase = vueDir ? resolve52(vueDir) : projectRoot;
32237
+ const hmrBase = vueDir ? resolve53(vueDir) : projectRoot;
32221
32238
  const hmrId = relative24(hmrBase, filePath).replace(/\\/g, "/").replace(/\.vue$/, "");
32222
32239
  let result = code.replace(/export\s+default\s+/, "var __hmr_comp__ = ");
32223
32240
  result += [
@@ -32232,11 +32249,11 @@ ${code}`;
32232
32249
  `);
32233
32250
  return result;
32234
32251
  }, resolveSvelteModulePath = (path) => {
32235
- if (existsSync45(path))
32252
+ if (existsSync46(path))
32236
32253
  return path;
32237
- if (existsSync45(`${path}.ts`))
32254
+ if (existsSync46(`${path}.ts`))
32238
32255
  return `${path}.ts`;
32239
- if (existsSync45(`${path}.js`))
32256
+ if (existsSync46(`${path}.js`))
32240
32257
  return `${path}.js`;
32241
32258
  return path;
32242
32259
  }, jsResponse = (body) => {
@@ -32378,13 +32395,13 @@ export default {};
32378
32395
  const escaped = virtualCss.replace(/\\/g, "\\\\").replace(/`/g, "\\`").replace(/\$/g, "\\$");
32379
32396
  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
32397
  }, resolveSourcePath2 = (relPath, projectRoot) => {
32381
- const filePath = resolve52(projectRoot, decodeSrcPath(relPath));
32398
+ const filePath = resolve53(projectRoot, decodeSrcPath(relPath));
32382
32399
  const ext = extname16(filePath);
32383
32400
  if (ext === ".svelte")
32384
32401
  return { ext, filePath: resolveSvelteModulePath(filePath) };
32385
32402
  if (ext)
32386
32403
  return { ext, filePath };
32387
- const found = MODULE_EXTENSIONS.find((candidate) => existsSync45(filePath + candidate));
32404
+ const found = MODULE_EXTENSIONS.find((candidate) => existsSync46(filePath + candidate));
32388
32405
  if (!found)
32389
32406
  return { ext, filePath };
32390
32407
  const resolved = filePath + found;
@@ -32415,14 +32432,14 @@ export default {};
32415
32432
  const absoluteCandidate = `/${tail.replace(/^\/+/, "")}`;
32416
32433
  const candidates = [
32417
32434
  absoluteCandidate,
32418
- resolve52(projectRoot, tail)
32435
+ resolve53(projectRoot, tail)
32419
32436
  ];
32420
32437
  try {
32421
32438
  await Promise.resolve().then(() => init_loadConfig());
32422
32439
  const cfg = await loadConfig();
32423
- const angularDir = cfg.angularDirectory && resolve52(projectRoot, cfg.angularDirectory);
32440
+ const angularDir = cfg.angularDirectory && resolve53(projectRoot, cfg.angularDirectory);
32424
32441
  if (angularDir)
32425
- candidates.push(resolve52(angularDir, tail));
32442
+ candidates.push(resolve53(angularDir, tail));
32426
32443
  } catch {}
32427
32444
  for (const candidate of candidates) {
32428
32445
  if (await fileExists(candidate)) {
@@ -32453,7 +32470,7 @@ export default {};
32453
32470
  if (!TRANSPILABLE.has(ext))
32454
32471
  return;
32455
32472
  const stat = statSync9(filePath);
32456
- const resolvedVueDir = vueDir ? resolve52(vueDir) : undefined;
32473
+ const resolvedVueDir = vueDir ? resolve53(vueDir) : undefined;
32457
32474
  let content = REACT_EXTENSIONS.has(ext) ? transformReactFile(filePath, projectRoot, rewriter) : transformPlainFile(filePath, projectRoot, rewriter, resolvedVueDir);
32458
32475
  const isAngularGeneratedJs = ext === ".js" && filePath.replace(/\\/g, "/").includes("/.absolutejs/generated/angular/");
32459
32476
  if (isAngularGeneratedJs) {
@@ -32509,7 +32526,7 @@ export default {};
32509
32526
  const ownMessage = source && typeof source === "object" ? Reflect.get(source, "message") : undefined;
32510
32527
  const message = typeof ownMessage === "string" ? ownMessage : String(source);
32511
32528
  return { message, ...readPosition(first) };
32512
- }, getTransformError = (filePath) => transformErrors.get(resolve52(filePath)), transformErrorResponse = (err) => {
32529
+ }, getTransformError = (filePath) => transformErrors.get(resolve53(filePath)), transformErrorResponse = (err) => {
32513
32530
  const errMsg = err instanceof Error ? err.message : String(err);
32514
32531
  return new Response(`console.error('[ModuleServer] Transform error:', ${JSON.stringify(errMsg)});`, {
32515
32532
  headers: { "Content-Type": "application/javascript" },
@@ -32532,16 +32549,16 @@ export default {};
32532
32549
  const relPath = pathname.slice(SRC_PREFIX.length);
32533
32550
  if (relPath === "bun:wrap" || relPath.startsWith("bun:wrap?"))
32534
32551
  return handleBunWrapRequest();
32535
- const virtualCssResponse = handleVirtualSvelteCss(resolve52(projectRoot, decodeSrcPath(relPath)));
32552
+ const virtualCssResponse = handleVirtualSvelteCss(resolve53(projectRoot, decodeSrcPath(relPath)));
32536
32553
  if (virtualCssResponse)
32537
32554
  return virtualCssResponse;
32538
32555
  const { filePath, ext } = resolveSourcePath2(relPath, projectRoot);
32539
32556
  try {
32540
32557
  const response = await transformAndCache(filePath, ext, projectRoot, rewriter, frameworkDirs?.vue, stylePreprocessors);
32541
- transformErrors.delete(resolve52(filePath));
32558
+ transformErrors.delete(resolve53(filePath));
32542
32559
  return response;
32543
32560
  } catch (err) {
32544
- transformErrors.set(resolve52(filePath), describeTransformError(err));
32561
+ transformErrors.set(resolve53(filePath), describeTransformError(err));
32545
32562
  return transformErrorResponse(err);
32546
32563
  }
32547
32564
  };
@@ -32551,11 +32568,11 @@ export default {};
32551
32568
  SRC_IMPORT_RE.lastIndex = 0;
32552
32569
  while ((match = SRC_IMPORT_RE.exec(content)) !== null) {
32553
32570
  if (match[1])
32554
- files.push(resolve52(projectRoot, decodeSrcPath(match[1])));
32571
+ files.push(resolve53(projectRoot, decodeSrcPath(match[1])));
32555
32572
  }
32556
32573
  return files;
32557
32574
  }, SRC_URL_PREFIX2, invalidateModule = (filePath) => {
32558
- const resolved = resolve52(filePath);
32575
+ const resolved = resolve53(filePath);
32559
32576
  transformErrors.delete(resolved);
32560
32577
  invalidate(filePath);
32561
32578
  if (resolved !== filePath)
@@ -32621,7 +32638,7 @@ export default {};
32621
32638
  return false;
32622
32639
  }
32623
32640
  await Promise.resolve().then(() => init_prepare());
32624
- patchManifestIndexes(cached.manifest, resolve52(state.resolvedPaths.buildDir, "_src_indexes"), SRC_PREFIX);
32641
+ patchManifestIndexes(cached.manifest, resolve53(state.resolvedPaths.buildDir, "_src_indexes"), SRC_PREFIX);
32625
32642
  logPageBuild(entry.source, entry.framework, Math.round(durationMs));
32626
32643
  logStartupTimingBlock("AbsoluteJS on-demand page build", [
32627
32644
  { durationMs, label: entry.name }
@@ -32880,11 +32897,11 @@ var exports_simpleHTMLHMR = {};
32880
32897
  __export(exports_simpleHTMLHMR, {
32881
32898
  handleHTMLUpdate: () => handleHTMLUpdate
32882
32899
  });
32883
- import { resolve as resolve53 } from "path";
32900
+ import { resolve as resolve54 } from "path";
32884
32901
  var handleHTMLUpdate = async (htmlFilePath) => {
32885
32902
  let htmlContent;
32886
32903
  try {
32887
- const resolvedPath = resolve53(htmlFilePath);
32904
+ const resolvedPath = resolve54(htmlFilePath);
32888
32905
  const file = Bun.file(resolvedPath);
32889
32906
  if (!await file.exists()) {
32890
32907
  return null;
@@ -32910,11 +32927,11 @@ var exports_simpleHTMXHMR = {};
32910
32927
  __export(exports_simpleHTMXHMR, {
32911
32928
  handleHTMXUpdate: () => handleHTMXUpdate
32912
32929
  });
32913
- import { resolve as resolve54 } from "path";
32930
+ import { resolve as resolve55 } from "path";
32914
32931
  var handleHTMXUpdate = async (htmxFilePath) => {
32915
32932
  let htmlContent;
32916
32933
  try {
32917
- const resolvedPath = resolve54(htmxFilePath);
32934
+ const resolvedPath = resolve55(htmxFilePath);
32918
32935
  const file = Bun.file(resolvedPath);
32919
32936
  if (!await file.exists()) {
32920
32937
  return null;
@@ -32937,7 +32954,7 @@ var init_simpleHTMXHMR = () => {};
32937
32954
 
32938
32955
  // src/dev/backendGraph.ts
32939
32956
  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";
32957
+ import { dirname as dirname36, extname as extname17, resolve as resolve56 } from "path";
32941
32958
  var SOURCE_FILE, VENDORED, LOADERS, fileCache, transpilers, transpilerFor = (path) => {
32942
32959
  const loader = LOADERS[extname17(path)] ?? "ts";
32943
32960
  const existing = transpilers.get(loader);
@@ -32952,7 +32969,7 @@ var SOURCE_FILE, VENDORED, LOADERS, fileCache, transpilers, transpilerFor = (pat
32952
32969
  } catch {
32953
32970
  return path;
32954
32971
  }
32955
- }, isProjectModule = (path, root = process.cwd()) => SOURCE_FILE.test(path) && !VENDORED.test(path) && resolve55(path).startsWith(resolve55(root)), resolveImport = (specifier, fromFile) => {
32972
+ }, isProjectModule = (path, root = process.cwd()) => SOURCE_FILE.test(path) && !VENDORED.test(path) && resolve56(path).startsWith(resolve56(root)), resolveImport = (specifier, fromFile) => {
32956
32973
  try {
32957
32974
  return realPath2(Bun.resolveSync(specifier, dirname36(fromFile)));
32958
32975
  } catch {
@@ -32977,14 +32994,14 @@ var SOURCE_FILE, VENDORED, LOADERS, fileCache, transpilers, transpilerFor = (pat
32977
32994
  fileCache.set(path, { imports, mtimeMs });
32978
32995
  return imports;
32979
32996
  }, importersOf = (target, entry, loaded = loadedProjectModules(entry)) => {
32980
- const goal = realPath2(resolve55(target));
32997
+ const goal = realPath2(resolve56(target));
32981
32998
  const importers = [];
32982
32999
  for (const file of loaded)
32983
33000
  if (readImports(file).includes(goal))
32984
33001
  importers.push(file);
32985
33002
  return importers;
32986
33003
  }, loadedProjectModules = (entry, loaded = Object.keys(__require.cache), root = process.cwd()) => {
32987
- const entryPath = realPath2(resolve55(entry));
33004
+ const entryPath = realPath2(resolve56(entry));
32988
33005
  const modules = new Set([entryPath]);
32989
33006
  for (const path of loaded) {
32990
33007
  if (isAbsoluteServerEntryCopyPath(path))
@@ -33770,7 +33787,7 @@ var init_runtime = __esm(() => {
33770
33787
 
33771
33788
  // src/dev/hot/plugin.ts
33772
33789
  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";
33790
+ import { extname as extname19, join as join63, relative as relative25, resolve as resolve57, sep as sep8 } from "path";
33774
33791
  var SOURCE, TEST_FILE, GENERATED, ABSOLUTE_ROOT, realPath3 = (path) => {
33775
33792
  try {
33776
33793
  return realpathSync8(path);
@@ -33849,7 +33866,7 @@ var init_plugin = __esm(() => {
33849
33866
  SOURCE = /\.(?:[cm]?[jt]sx?)$/;
33850
33867
  TEST_FILE = /(?:\.(?:spec|test)\.[cm]?[jt]sx?$)|(?:[\\/]__tests__[\\/])/;
33851
33868
  GENERATED = /(?:^|[\\/])(?:build|generated|compiled|indexes|\.absolutejs|node_modules|dist)(?:[\\/]|$)/;
33852
- ABSOLUTE_ROOT = resolve56(import.meta.dir, "..", "..", "..");
33869
+ ABSOLUTE_ROOT = resolve57(import.meta.dir, "..", "..", "..");
33853
33870
  shared = globalThis.__absoluteHotPlugin ??= {
33854
33871
  analyses: new Map,
33855
33872
  installed: undefined
@@ -34025,7 +34042,7 @@ var init_reload = __esm(() => {
34025
34042
  });
34026
34043
 
34027
34044
  // src/dev/rebuildTrigger.ts
34028
- import { existsSync as existsSync46, readdirSync as readdirSync13, rmSync as rmSync4, statSync as statSync11 } from "fs";
34045
+ import { existsSync as existsSync47, readdirSync as readdirSync13, rmSync as rmSync4, statSync as statSync11 } from "fs";
34029
34046
  import {
34030
34047
  basename as basename21,
34031
34048
  dirname as dirname38,
@@ -34139,7 +34156,7 @@ var moduleServerPromise, getModuleServer = () => moduleServerPromise, clearDevSs
34139
34156
  detectedFw = detected !== "ignored" ? detected : affectedFrameworks[0];
34140
34157
  }
34141
34158
  return { ...parsed, framework: detectedFw };
34142
- }, isValidDeletedAffectedFile = (affectedFile, deletedPathResolved, processedFiles) => affectedFile !== deletedPathResolved && !processedFiles.has(affectedFile) && existsSync46(affectedFile), FRAMEWORK_DIR_KEYS_FOR_CLEANUP, removeStaleGenerated = (state, deletedFile) => {
34159
+ }, isValidDeletedAffectedFile = (affectedFile, deletedPathResolved, processedFiles) => affectedFile !== deletedPathResolved && !processedFiles.has(affectedFile) && existsSync47(affectedFile), FRAMEWORK_DIR_KEYS_FOR_CLEANUP, removeStaleGenerated = (state, deletedFile) => {
34143
34160
  const { config } = state;
34144
34161
  const cwd = process.cwd();
34145
34162
  const absDeleted = resolvePath4(deletedFile).replace(/\\/g, "/");
@@ -34185,7 +34202,7 @@ var moduleServerPromise, getModuleServer = () => moduleServerPromise, clearDevSs
34185
34202
  if (!dependents || dependents.size === 0) {
34186
34203
  return;
34187
34204
  }
34188
- const dependentFiles = Array.from(dependents).filter((file) => existsSync46(file));
34205
+ const dependentFiles = Array.from(dependents).filter((file) => existsSync47(file));
34189
34206
  if (dependentFiles.length === 0) {
34190
34207
  return;
34191
34208
  }
@@ -34201,7 +34218,7 @@ var moduleServerPromise, getModuleServer = () => moduleServerPromise, clearDevSs
34201
34218
  try {
34202
34219
  const affectedFiles = getAffectedFiles(state.dependencyGraph, normalizedFilePath);
34203
34220
  affectedFiles.forEach((affectedFile) => {
34204
- if (!processedFiles.has(affectedFile) && affectedFile !== normalizedFilePath && existsSync46(affectedFile)) {
34221
+ if (!processedFiles.has(affectedFile) && affectedFile !== normalizedFilePath && existsSync47(affectedFile)) {
34205
34222
  validFiles.push(affectedFile);
34206
34223
  processedFiles.add(affectedFile);
34207
34224
  }
@@ -34226,7 +34243,7 @@ var moduleServerPromise, getModuleServer = () => moduleServerPromise, clearDevSs
34226
34243
  collectChangedFileAffected(state, normalizedFilePath, processedFiles, validFiles);
34227
34244
  }, processFilePathSet = (state, filePathSet, processedFiles, validFiles) => {
34228
34245
  filePathSet.forEach((filePathInSet) => {
34229
- if (!existsSync46(filePathInSet)) {
34246
+ if (!existsSync47(filePathInSet)) {
34230
34247
  collectDeletedFileAffected(state, filePathInSet, processedFiles, validFiles);
34231
34248
  return;
34232
34249
  }
@@ -34509,7 +34526,7 @@ var moduleServerPromise, getModuleServer = () => moduleServerPromise, clearDevSs
34509
34526
  return componentFile;
34510
34527
  }
34511
34528
  const tsCounterpart = componentFile.replace(/\.html$/, ".ts");
34512
- if (existsSync46(tsCounterpart)) {
34529
+ if (existsSync47(tsCounterpart)) {
34513
34530
  return tsCounterpart;
34514
34531
  }
34515
34532
  if (!graph)
@@ -35447,7 +35464,7 @@ var moduleServerPromise, getModuleServer = () => moduleServerPromise, clearDevSs
35447
35464
  }
35448
35465
  return ctx;
35449
35466
  }, runSvelteBundleRebuild = async (state, svelteFiles, config) => {
35450
- const existingSvelteFiles = svelteFiles.filter((file) => existsSync46(file));
35467
+ const existingSvelteFiles = svelteFiles.filter((file) => existsSync47(file));
35451
35468
  if (existingSvelteFiles.length === 0)
35452
35469
  return;
35453
35470
  const svelteDir = config.svelteDirectory ?? "";
@@ -36830,7 +36847,7 @@ var init_rebuildTrigger = __esm(() => {
36830
36847
  // src/build/buildDepVendor.ts
36831
36848
  import { mkdirSync as mkdirSync17 } from "fs";
36832
36849
  import { isBuiltin as isBuiltin2 } from "module";
36833
- import { join as join65 } from "path";
36850
+ import { join as join65, relative as relative28 } from "path";
36834
36851
  import { rm as rm15 } from "fs/promises";
36835
36852
  var {build: bunBuild9, Glob: Glob10 } = globalThis.Bun;
36836
36853
  var toSafeFileName6 = (specifier) => {
@@ -36866,7 +36883,7 @@ var toSafeFileName6 = (specifier) => {
36866
36883
  const glob = new Glob10("**/*.{ts,tsx,js,jsx}");
36867
36884
  try {
36868
36885
  const all = await Array.fromAsync(glob.scan({ absolute: true, cwd: dir }));
36869
- return all.filter((file) => !isSkippedFile(file));
36886
+ return all.filter((file) => !isSkippedFile(`/${relative28(dir, file).replaceAll("\\", "/")}`));
36870
36887
  } catch {
36871
36888
  return empty;
36872
36889
  }
@@ -37168,13 +37185,13 @@ var init_buildDepVendor = __esm(() => {
37168
37185
  import { createHash as createHash11 } from "crypto";
37169
37186
  import {
37170
37187
  copyFileSync as copyFileSync4,
37171
- existsSync as existsSync47,
37188
+ existsSync as existsSync48,
37172
37189
  mkdirSync as mkdirSync18,
37173
37190
  readdirSync as readdirSync14,
37174
37191
  readFileSync as readFileSync45
37175
37192
  } from "fs";
37176
37193
  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";
37194
+ import { basename as basename22, join as join66, resolve as resolve58 } from "path";
37178
37195
  var CACHE_ROOT2, CACHE_FORMAT_VERSION3 = 1, KEY_LENGTH = 32, LOCKFILES, computeVendorCacheKey = (inputs) => {
37179
37196
  const hash = createHash11("sha256");
37180
37197
  hash.update(String(CACHE_FORMAT_VERSION3));
@@ -37194,7 +37211,7 @@ var CACHE_ROOT2, CACHE_FORMAT_VERSION3 = 1, KEY_LENGTH = 32, LOCKFILES, computeV
37194
37211
  }
37195
37212
  for (const dir of inputs.vendorDirs) {
37196
37213
  hash.update("\x00v");
37197
- hash.update(basename22(resolve57(dir, "..")));
37214
+ hash.update(basename22(resolve58(dir, "..")));
37198
37215
  }
37199
37216
  return hash.digest("hex").slice(0, KEY_LENGTH);
37200
37217
  }, readLockfileHash = (projectRoot = process.cwd()) => {
@@ -37202,7 +37219,7 @@ var CACHE_ROOT2, CACHE_FORMAT_VERSION3 = 1, KEY_LENGTH = 32, LOCKFILES, computeV
37202
37219
  let found = false;
37203
37220
  for (const name of LOCKFILES) {
37204
37221
  const path = join66(projectRoot, name);
37205
- if (!existsSync47(path))
37222
+ if (!existsSync48(path))
37206
37223
  continue;
37207
37224
  found = true;
37208
37225
  hash.update(name);
@@ -37222,21 +37239,21 @@ var CACHE_ROOT2, CACHE_FORMAT_VERSION3 = 1, KEY_LENGTH = 32, LOCKFILES, computeV
37222
37239
  }, copySlotsInto = (cacheDir, vendorDirs) => {
37223
37240
  for (const [index, dir] of vendorDirs.entries()) {
37224
37241
  const source = join66(cacheDir, slotName(index, dir));
37225
- if (!existsSync47(source)) {
37242
+ if (!existsSync48(source)) {
37226
37243
  throw new Error(`missing cached vendor dir ${source}`);
37227
37244
  }
37228
37245
  copyTree(source, dir);
37229
37246
  }
37230
37247
  }, copySlotsFrom = (stagingDir, vendorDirs) => {
37231
37248
  for (const [index, dir] of vendorDirs.entries()) {
37232
- if (!existsSync47(dir))
37249
+ if (!existsSync48(dir))
37233
37250
  continue;
37234
37251
  copyTree(dir, join66(stagingDir, slotName(index, dir)));
37235
37252
  }
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()) => {
37253
+ }, isVendorCachePayload = (value) => typeof value === "object" && value !== null && typeof Reflect.get(value, "depPaths") === "object", cacheDirFor = (key, projectRoot) => resolve58(projectRoot, CACHE_ROOT2, key), slotName = (index, dir) => `${index}-${basename22(resolve58(dir, ".."))}`, restoreVendorCache = async (key, vendorDirs, projectRoot = process.cwd()) => {
37237
37254
  const cacheDir = cacheDirFor(key, projectRoot);
37238
37255
  const payloadPath = join66(cacheDir, "payload.json");
37239
- if (!existsSync47(payloadPath))
37256
+ if (!existsSync48(payloadPath))
37240
37257
  return null;
37241
37258
  try {
37242
37259
  const payload = JSON.parse(await readFile12(payloadPath, "utf8"));
@@ -37249,7 +37266,7 @@ var CACHE_ROOT2, CACHE_FORMAT_VERSION3 = 1, KEY_LENGTH = 32, LOCKFILES, computeV
37249
37266
  }
37250
37267
  }, saveVendorCache = async (key, vendorDirs, payload, projectRoot = process.cwd()) => {
37251
37268
  const cacheDir = cacheDirFor(key, projectRoot);
37252
- if (existsSync47(join66(cacheDir, "payload.json")))
37269
+ if (existsSync48(join66(cacheDir, "payload.json")))
37253
37270
  return;
37254
37271
  const stagingDir = `${cacheDir}.${process.pid}.tmp`;
37255
37272
  try {
@@ -37278,9 +37295,9 @@ var init_vendorCache = __esm(() => {
37278
37295
 
37279
37296
  // src/core/devBuild.ts
37280
37297
  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) => {
37298
+ import { existsSync as existsSync49, statSync as statSync12 } from "fs";
37299
+ import { resolve as resolve59 } from "path";
37300
+ var FRAMEWORK_DIR_KEYS, devClientVendorSourceDir, collectDepVendorSourceDirs = (config) => {
37284
37301
  const configuredDirs = [
37285
37302
  ...collectConfigVendorSourceDirs(config),
37286
37303
  devClientVendorSourceDir()
@@ -37303,7 +37320,7 @@ var FRAMEWORK_DIR_KEYS, devClientVendorSourceDir = () => resolve58(import.meta.d
37303
37320
  return Object.keys(config).length > 0 ? config : null;
37304
37321
  }, reloadConfig = async () => {
37305
37322
  try {
37306
- const configPath = resolve58(process.env.ABSOLUTE_CONFIG ?? "absolute.config.ts");
37323
+ const configPath = resolve59(process.env.ABSOLUTE_CONFIG ?? "absolute.config.ts");
37307
37324
  const source = await Bun.file(configPath).text();
37308
37325
  return parseDirectoryConfig(source);
37309
37326
  } catch {
@@ -37418,7 +37435,7 @@ var FRAMEWORK_DIR_KEYS, devClientVendorSourceDir = () => resolve58(import.meta.d
37418
37435
  });
37419
37436
  }
37420
37437
  }, handleCachedReload = async () => {
37421
- const serverMtime = statSync12(resolve58(Bun.main)).mtimeMs;
37438
+ const serverMtime = statSync12(resolve59(Bun.main)).mtimeMs;
37422
37439
  const lastMtime = globalThis.__hmrServerMtime;
37423
37440
  globalThis.__hmrServerMtime = serverMtime;
37424
37441
  const cached = globalThis.__hmrDevResult;
@@ -37459,8 +37476,8 @@ var FRAMEWORK_DIR_KEYS, devClientVendorSourceDir = () => resolve58(import.meta.d
37459
37476
  return true;
37460
37477
  }, resolveAbsoluteVersion2 = async () => {
37461
37478
  const candidates = [
37462
- resolve58(import.meta.dir, "..", "..", "package.json"),
37463
- resolve58(import.meta.dir, "..", "package.json")
37479
+ resolve59(import.meta.dir, "..", "..", "package.json"),
37480
+ resolve59(import.meta.dir, "..", "package.json")
37464
37481
  ];
37465
37482
  const [candidate, ...remaining] = candidates;
37466
37483
  if (!candidate) {
@@ -37486,7 +37503,7 @@ var FRAMEWORK_DIR_KEYS, devClientVendorSourceDir = () => resolve58(import.meta.d
37486
37503
  const entries = await readdir7(vendorDir).catch(() => emptyStringArray);
37487
37504
  await Promise.all(entries.filter((entry) => entry.endsWith(".js")).map(async (entry) => {
37488
37505
  const webPath = `/${framework}/vendor/${entry}`;
37489
- const bytes = await Bun.file(resolve58(vendorDir, entry)).bytes();
37506
+ const bytes = await Bun.file(resolve59(vendorDir, entry)).bytes();
37490
37507
  assetStore.set(webPath, bytes);
37491
37508
  }));
37492
37509
  }, devBuild = async (config) => {
@@ -37556,7 +37573,7 @@ var FRAMEWORK_DIR_KEYS, devClientVendorSourceDir = () => resolve58(import.meta.d
37556
37573
  const sourceFiles = await collectDepVendorSourceFiles(config);
37557
37574
  const configVendorDirs = collectConfigVendorSourceDirs(config);
37558
37575
  const prescannedVendorPaths = prescanVendorPaths(prescan, configVendorDirs);
37559
- const remainingVendorDirs = prescannedVendorPaths ? sourceDirs.filter((dir) => !configVendorDirs.includes(dir) && existsSync48(dir)) : sourceDirs;
37576
+ const remainingVendorDirs = prescannedVendorPaths ? sourceDirs.filter((dir) => !configVendorDirs.includes(dir) && existsSync49(dir)) : sourceDirs;
37560
37577
  if (prescannedVendorPaths && remainingVendorDirs.length === 0 && sourceFiles.length === 0) {
37561
37578
  globalThis.__depVendorPaths = prescannedVendorPaths;
37562
37579
  } else {
@@ -37672,11 +37689,11 @@ var FRAMEWORK_DIR_KEYS, devClientVendorSourceDir = () => resolve58(import.meta.d
37672
37689
  }
37673
37690
  stepStartedAt = performance.now();
37674
37691
  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");
37692
+ const reactVendorDir = resolve59(state.resolvedPaths.buildDir, "react", "vendor");
37693
+ const angularVendorDir = resolve59(state.resolvedPaths.buildDir, "angular", "vendor");
37694
+ const svelteVendorDir = resolve59(state.resolvedPaths.buildDir, "svelte", "vendor");
37695
+ const vueVendorDir = resolve59(state.resolvedPaths.buildDir, "vue", "vendor");
37696
+ const depVendorDir = resolve59(state.resolvedPaths.buildDir, "vendor");
37680
37697
  await Promise.resolve().then(() => init_buildDepVendor());
37681
37698
  const activeVendorDirs = [
37682
37699
  config.reactDirectory ? reactVendorDir : null,
@@ -37793,10 +37810,11 @@ var FRAMEWORK_DIR_KEYS, devClientVendorSourceDir = () => resolve58(import.meta.d
37793
37810
  manifest
37794
37811
  };
37795
37812
  globalThis.__hmrDevResult = result;
37796
- globalThis.__hmrServerMtime = statSync12(resolve58(Bun.main)).mtimeMs;
37813
+ globalThis.__hmrServerMtime = statSync12(resolve59(Bun.main)).mtimeMs;
37797
37814
  return result;
37798
37815
  };
37799
37816
  var init_devBuild = __esm(() => {
37817
+ init_runtimePaths();
37800
37818
  init_build();
37801
37819
  init_buildReactVendor();
37802
37820
  init_buildAngularVendor();
@@ -37824,6 +37842,7 @@ var init_devBuild = __esm(() => {
37824
37842
  "htmxDirectory",
37825
37843
  "angularDirectory"
37826
37844
  ];
37845
+ devClientVendorSourceDir = resolveDevClientDirectory;
37827
37846
  });
37828
37847
 
37829
37848
  // src/build.ts
@@ -37834,5 +37853,5 @@ export {
37834
37853
  devBuild
37835
37854
  };
37836
37855
 
37837
- //# debugId=9218616736C2687B64756E2164756E21
37856
+ //# debugId=0F7A4A3B094DC6C964756E2164756E21
37838
37857
  //# sourceMappingURL=build.js.map