@absolutejs/absolute 0.19.0-beta.997 → 0.19.0-beta.999

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/index.js CHANGED
@@ -7578,6 +7578,7 @@ var init_svelteServerModule = __esm(() => {
7578
7578
  });
7579
7579
 
7580
7580
  // src/core/vueServerModule.ts
7581
+ import { existsSync as existsSync6, readFileSync as readFileSync6, realpathSync } from "fs";
7581
7582
  import { mkdir as mkdir3 } from "fs/promises";
7582
7583
  import { dirname as dirname6, join as join7, relative as relative3, resolve as resolve7 } from "path";
7583
7584
  var {Transpiler } = globalThis.Bun;
@@ -7623,6 +7624,11 @@ var ISLAND_COMPONENT_ID_LENGTH = 8, serverCacheRoot2, compiledModuleCache2, tran
7623
7624
  const componentId = Bun.hash(sourcePath).toString(BASE_36_RADIX).slice(0, ISLAND_COMPONENT_ID_LENGTH);
7624
7625
  const hasScript = descriptor.script || descriptor.scriptSetup;
7625
7626
  const compiledScript = hasScript ? compiler.compileScript(descriptor, {
7627
+ fs: {
7628
+ fileExists: existsSync6,
7629
+ readFile: (file) => existsSync6(file) ? readFileSync6(file, "utf-8") : undefined,
7630
+ realpath: realpathSync
7631
+ },
7626
7632
  id: componentId,
7627
7633
  inlineTemplate: false
7628
7634
  }) : { bindings: {}, content: "export default {};" };
@@ -8179,7 +8185,7 @@ var init_staticStreaming = __esm(() => {
8179
8185
  });
8180
8186
 
8181
8187
  // src/build/staticIslandPages.ts
8182
- import { readFileSync as readFileSync6, writeFileSync as writeFileSync3 } from "fs";
8188
+ import { readFileSync as readFileSync7, writeFileSync as writeFileSync3 } from "fs";
8183
8189
  var ISLAND_TAG_RE_SOURCE = "<(?:absolute-island|island)\\b([^>]*?)(?:\\/\\>|>(?:[\\s\\S]*?)<\\/(?:absolute-island|island)>)", ATTRIBUTE_RE_SOURCE = `([A-Za-z_:][-A-Za-z0-9_:.]*)\\s*=\\s*(?:"([^"]*)"|'([^']*)')`, islandFrameworks, islandHydrationModes, isRecord5 = (value) => typeof value === "object" && value !== null, isIslandFramework = (value) => islandFrameworks.some((framework) => framework === value), isIslandHydrationMode = (value) => islandHydrationModes.some((mode) => mode === value), parseHtmlAttributes = (attributeString) => {
8184
8190
  const attributeRe = new RegExp(ATTRIBUTE_RE_SOURCE, "g");
8185
8191
  const attributes = new Map;
@@ -8308,7 +8314,7 @@ var ISLAND_TAG_RE_SOURCE = "<(?:absolute-island|island)\\b([^>]*?)(?:\\/\\>|>(?:
8308
8314
  }
8309
8315
  return result + originalHtml.slice(nextIndex);
8310
8316
  }, transformStaticPage = async (pagePath, registry) => {
8311
- const originalHtml = readFileSync6(pagePath, "utf-8");
8317
+ const originalHtml = readFileSync7(pagePath, "utf-8");
8312
8318
  const transformedHtml = await transformStaticPageHtml(originalHtml, registry);
8313
8319
  if (transformedHtml !== originalHtml) {
8314
8320
  writeFileSync3(pagePath, transformedHtml);
@@ -8452,10 +8458,10 @@ var init_loadConfig = __esm(() => {
8452
8458
  });
8453
8459
 
8454
8460
  // src/build/scanEntryPoints.ts
8455
- import { existsSync as existsSync6 } from "fs";
8461
+ import { existsSync as existsSync7 } from "fs";
8456
8462
  var {Glob } = globalThis.Bun;
8457
8463
  var scanEntryPoints = async (dir, pattern) => {
8458
- if (!existsSync6(dir))
8464
+ if (!existsSync7(dir))
8459
8465
  return [];
8460
8466
  const entryPaths = [];
8461
8467
  const glob = new Glob(pattern);
@@ -8544,7 +8550,7 @@ var init_sourceMetadata = __esm(() => {
8544
8550
  });
8545
8551
 
8546
8552
  // src/islands/pageMetadata.ts
8547
- import { readFileSync as readFileSync7 } from "fs";
8553
+ import { readFileSync as readFileSync8 } from "fs";
8548
8554
  import { dirname as dirname8, resolve as resolve11 } from "path";
8549
8555
  var pagePatterns, getPageDirs = (config) => [
8550
8556
  { dir: config.angularDirectory, framework: "angular" },
@@ -8587,7 +8593,7 @@ var pagePatterns, getPageDirs = (config) => [
8587
8593
  return;
8588
8594
  const files = await scanEntryPoints(resolve11(entry.dir), pattern);
8589
8595
  for (const filePath of files) {
8590
- const source = readFileSync7(filePath, "utf-8");
8596
+ const source = readFileSync8(filePath, "utf-8");
8591
8597
  const islands = extractIslandUsagesFromSource(source);
8592
8598
  pageMetadata.set(resolve11(filePath), {
8593
8599
  islands: resolveIslandUsages(islands, islandSourceLookup),
@@ -9063,22 +9069,22 @@ var init_verifyAngularCoreUniqueness = __esm(() => {
9063
9069
  });
9064
9070
 
9065
9071
  // src/build/generateReactIndexes.ts
9066
- import { existsSync as existsSync7, mkdirSync as mkdirSync2 } from "fs";
9072
+ import { existsSync as existsSync8, mkdirSync as mkdirSync2 } from "fs";
9067
9073
  import { readdir as readdir2, rm, writeFile } from "fs/promises";
9068
9074
  import { basename as basename3, join as join9, relative as relative5, resolve as resolve13, sep } from "path";
9069
9075
  var {Glob: Glob2 } = globalThis.Bun;
9070
9076
  var indexContentCache, resolveDevClientDir = () => {
9071
9077
  const projectRoot = process.cwd();
9072
9078
  const fromSource = resolve13(import.meta.dir, "../dev/client");
9073
- if (existsSync7(fromSource) && fromSource.startsWith(projectRoot)) {
9079
+ if (existsSync8(fromSource) && fromSource.startsWith(projectRoot)) {
9074
9080
  return fromSource;
9075
9081
  }
9076
9082
  const fromNodeModules = resolve13(projectRoot, "node_modules/@absolutejs/absolute/dist/dev/client");
9077
- if (existsSync7(fromNodeModules))
9083
+ if (existsSync8(fromNodeModules))
9078
9084
  return fromNodeModules;
9079
9085
  return resolve13(import.meta.dir, "./dev/client");
9080
9086
  }, devClientDir, errorOverlayPath, hmrClientPath, refreshSetupPath, generateReactIndexFiles = async (reactPagesDirectory, reactIndexesDirectory, isDev2 = false) => {
9081
- if (!existsSync7(reactIndexesDirectory)) {
9087
+ if (!existsSync8(reactIndexesDirectory)) {
9082
9088
  mkdirSync2(reactIndexesDirectory, { recursive: true });
9083
9089
  }
9084
9090
  const CONVENTION_RE = /^(?:(.+)\.)?(error|loading|not-found)\.[^.]+$/;
@@ -9386,7 +9392,7 @@ var indexContentCache, resolveDevClientDir = () => {
9386
9392
  const hasher = new Bun.CryptoHasher("md5");
9387
9393
  hasher.update(content);
9388
9394
  const contentHash = hasher.digest("hex");
9389
- if (indexContentCache.get(indexPath) === contentHash && existsSync7(indexPath)) {
9395
+ if (indexContentCache.get(indexPath) === contentHash && existsSync8(indexPath)) {
9390
9396
  return;
9391
9397
  }
9392
9398
  indexContentCache.set(indexPath, contentHash);
@@ -9397,7 +9403,7 @@ var indexContentCache, resolveDevClientDir = () => {
9397
9403
  return;
9398
9404
  }
9399
9405
  const refreshPath = join9(reactIndexesDirectory, "_refresh.tsx");
9400
- if (!existsSync7(refreshPath)) {
9406
+ if (!existsSync8(refreshPath)) {
9401
9407
  await writeFile(refreshPath, `import '${refreshSetupPath}';
9402
9408
  import 'react';
9403
9409
  import 'react-dom/client';
@@ -9477,7 +9483,7 @@ var init_outputLogs = __esm(() => {
9477
9483
  // src/build/scanConventions.ts
9478
9484
  import { basename as basename4 } from "path";
9479
9485
  var {Glob: Glob3 } = globalThis.Bun;
9480
- import { existsSync as existsSync8 } from "fs";
9486
+ import { existsSync as existsSync9 } from "fs";
9481
9487
  var CONVENTION_RE, classifyFile = (file2, pageFiles, defaults, pages) => {
9482
9488
  const fileName = basename4(file2);
9483
9489
  const match = CONVENTION_RE.exec(fileName);
@@ -9502,7 +9508,7 @@ var CONVENTION_RE, classifyFile = (file2, pageFiles, defaults, pages) => {
9502
9508
  else if (kind === "loading")
9503
9509
  pages[pageName].loading = file2;
9504
9510
  }, scanConventions = async (pagesDir, pattern) => {
9505
- if (!existsSync8(pagesDir)) {
9511
+ if (!existsSync9(pagesDir)) {
9506
9512
  const pageFiles2 = [];
9507
9513
  return { conventions: undefined, pageFiles: pageFiles2 };
9508
9514
  }
@@ -9525,7 +9531,7 @@ var init_scanConventions = __esm(() => {
9525
9531
  });
9526
9532
 
9527
9533
  // src/build/scanRouteRegistrations.ts
9528
- import { readdirSync, readFileSync as readFileSync8 } from "fs";
9534
+ import { readdirSync, readFileSync as readFileSync9 } from "fs";
9529
9535
  import { join as join10 } from "path";
9530
9536
  import ts2 from "typescript";
9531
9537
  var ELYSIA_ROUTE_METHODS, SKIP_DIRS, SOURCE_EXTENSIONS, getScriptKind = (filePath) => {
@@ -9579,7 +9585,7 @@ var ELYSIA_ROUTE_METHODS, SKIP_DIRS, SOURCE_EXTENSIONS, getScriptKind = (filePat
9579
9585
  }, extractRoutesFromFile = (filePath, out) => {
9580
9586
  let source;
9581
9587
  try {
9582
- source = readFileSync8(filePath, "utf-8");
9588
+ source = readFileSync9(filePath, "utf-8");
9583
9589
  } catch {
9584
9590
  return;
9585
9591
  }
@@ -9648,7 +9654,7 @@ var init_scanRouteRegistrations = __esm(() => {
9648
9654
  });
9649
9655
 
9650
9656
  // src/angular/staticAnalyzeSpaRoutes.ts
9651
- import { existsSync as existsSync9, promises as fs } from "fs";
9657
+ import { existsSync as existsSync10, promises as fs } from "fs";
9652
9658
  import { join as join11 } from "path";
9653
9659
  import ts3 from "typescript";
9654
9660
  var DYNAMIC_SEGMENT_PATTERN, pathHasDynamic = (path) => path.split("/").some((seg) => DYNAMIC_SEGMENT_PATTERN.test(seg) || seg === "**"), importsSymbolFrom = (sf, localName, moduleSpecifier) => {
@@ -9855,7 +9861,7 @@ var DYNAMIC_SEGMENT_PATTERN, pathHasDynamic = (path) => path.split("/").some((se
9855
9861
  }
9856
9862
  }
9857
9863
  }, analyzeAngularSpaRoutes = async (angularDirectory) => {
9858
- if (!existsSync9(angularDirectory))
9864
+ if (!existsSync10(angularDirectory))
9859
9865
  return [];
9860
9866
  const tsFiles = [];
9861
9867
  await walkTsFiles(angularDirectory, tsFiles);
@@ -9876,7 +9882,7 @@ var init_staticAnalyzeSpaRoutes = __esm(() => {
9876
9882
  });
9877
9883
 
9878
9884
  // src/react/staticAnalyzeSpaRoutes.ts
9879
- import { existsSync as existsSync10, promises as fs2 } from "fs";
9885
+ import { existsSync as existsSync11, promises as fs2 } from "fs";
9880
9886
  import { join as join12 } from "path";
9881
9887
  import ts4 from "typescript";
9882
9888
  var DYNAMIC_SEGMENT_PATTERN2, pathHasDynamic2 = (path) => path.split("/").some((seg) => DYNAMIC_SEGMENT_PATTERN2.test(seg) || seg === "**"), readStringLiteral2 = (expression) => {
@@ -10065,7 +10071,7 @@ var DYNAMIC_SEGMENT_PATTERN2, pathHasDynamic2 = (path) => path.split("/").some((
10065
10071
  }
10066
10072
  }
10067
10073
  }, analyzeReactSpaRoutes = async (reactDirectory) => {
10068
- if (!existsSync10(reactDirectory))
10074
+ if (!existsSync11(reactDirectory))
10069
10075
  return [];
10070
10076
  const files = [];
10071
10077
  await walkSourceFiles(reactDirectory, files);
@@ -10086,7 +10092,7 @@ var init_staticAnalyzeSpaRoutes2 = __esm(() => {
10086
10092
  });
10087
10093
 
10088
10094
  // src/svelte/staticAnalyzeSpaRoutes.ts
10089
- import { existsSync as existsSync11, promises as fs3 } from "fs";
10095
+ import { existsSync as existsSync12, promises as fs3 } from "fs";
10090
10096
  import { join as join13 } from "path";
10091
10097
  var DYNAMIC_SEGMENT_PATTERN3, pathHasDynamic3 = (path) => path.split("/").some((seg) => DYNAMIC_SEGMENT_PATTERN3.test(seg) || seg === "**"), joinSegments3 = (parent, child) => {
10092
10098
  if (!child)
@@ -10167,7 +10173,7 @@ var DYNAMIC_SEGMENT_PATTERN3, pathHasDynamic3 = (path) => path.split("/").some((
10167
10173
  }
10168
10174
  }
10169
10175
  }, analyzeSvelteSpaRoutes = async (svelteDirectory) => {
10170
- if (!existsSync11(svelteDirectory))
10176
+ if (!existsSync12(svelteDirectory))
10171
10177
  return [];
10172
10178
  const files = [];
10173
10179
  await walkSvelteFiles(svelteDirectory, files);
@@ -10190,7 +10196,7 @@ var init_staticAnalyzeSpaRoutes3 = __esm(() => {
10190
10196
  });
10191
10197
 
10192
10198
  // src/vue/staticAnalyzeSpaRoutes.ts
10193
- import { existsSync as existsSync12, promises as fs4 } from "fs";
10199
+ import { existsSync as existsSync13, promises as fs4 } from "fs";
10194
10200
  import { join as join14 } from "path";
10195
10201
  import ts5 from "typescript";
10196
10202
  var DYNAMIC_SEGMENT_PATTERN4, pathHasDynamic4 = (path) => path.split("/").some((seg) => DYNAMIC_SEGMENT_PATTERN4.test(seg) || seg === "**"), readStringLiteral3 = (expression) => {
@@ -10405,7 +10411,7 @@ var DYNAMIC_SEGMENT_PATTERN4, pathHasDynamic4 = (path) => path.split("/").some((
10405
10411
  }
10406
10412
  }
10407
10413
  }, analyzeVueSpaRoutes = async (vueDirectory) => {
10408
- if (!existsSync12(vueDirectory))
10414
+ if (!existsSync13(vueDirectory))
10409
10415
  return [];
10410
10416
  const files = [];
10411
10417
  await walkSourceFiles2(vueDirectory, files);
@@ -10658,10 +10664,10 @@ var init_generateSitemap = __esm(() => {
10658
10664
  });
10659
10665
 
10660
10666
  // src/build/scanCssEntryPoints.ts
10661
- import { existsSync as existsSync13 } from "fs";
10667
+ import { existsSync as existsSync14 } from "fs";
10662
10668
  var {Glob: Glob4 } = globalThis.Bun;
10663
10669
  var scanCssEntryPoints = async (dir, ignore) => {
10664
- if (!existsSync13(dir))
10670
+ if (!existsSync14(dir))
10665
10671
  return [];
10666
10672
  const entryPaths = [];
10667
10673
  const glob = new Glob4("**/*.{css,scss,sass,less,styl,stylus}");
@@ -10678,7 +10684,7 @@ var init_scanCssEntryPoints = __esm(() => {
10678
10684
  });
10679
10685
 
10680
10686
  // src/utils/imageProcessing.ts
10681
- import { existsSync as existsSync14, mkdirSync as mkdirSync3, readFileSync as readFileSync9, writeFileSync as writeFileSync4 } from "fs";
10687
+ import { existsSync as existsSync15, mkdirSync as mkdirSync3, readFileSync as readFileSync10, writeFileSync as writeFileSync4 } from "fs";
10682
10688
  import { join as join15, resolve as resolve14 } from "path";
10683
10689
  var DEFAULT_DEVICE_SIZES, DEFAULT_IMAGE_SIZES, DEFAULT_QUALITY, OPTIMIZATION_ENDPOINT = "/_absolute/image", BLUR_DEVIATION = 20, sharpModule = undefined, sharpLoaded = false, sharpWarned = false, snapToSize = (target, sizes) => {
10684
10690
  for (const size of sizes) {
@@ -10730,7 +10736,7 @@ var DEFAULT_DEVICE_SIZES, DEFAULT_IMAGE_SIZES, DEFAULT_QUALITY, OPTIMIZATION_END
10730
10736
  return [...device, ...image2].sort((left, right) => left - right);
10731
10737
  }, getCacheDir = (buildDir) => {
10732
10738
  const dir = join15(buildDir, ".cache", "images");
10733
- if (!existsSync14(dir))
10739
+ if (!existsSync15(dir))
10734
10740
  mkdirSync3(dir, { recursive: true });
10735
10741
  return dir;
10736
10742
  }, getCacheKey = (url, width, quality, format) => {
@@ -10812,11 +10818,11 @@ var DEFAULT_DEVICE_SIZES, DEFAULT_IMAGE_SIZES, DEFAULT_QUALITY, OPTIMIZATION_END
10812
10818
  }, readFromCache = (cacheDir, cacheKey) => {
10813
10819
  const metaPath = join15(cacheDir, `${cacheKey}.meta`);
10814
10820
  const dataPath = join15(cacheDir, `${cacheKey}.data`);
10815
- if (!existsSync14(metaPath) || !existsSync14(dataPath))
10821
+ if (!existsSync15(metaPath) || !existsSync15(dataPath))
10816
10822
  return null;
10817
10823
  try {
10818
- const meta = JSON.parse(readFileSync9(metaPath, "utf-8"));
10819
- const buffer = readFileSync9(dataPath);
10824
+ const meta = JSON.parse(readFileSync10(metaPath, "utf-8"));
10825
+ const buffer = readFileSync10(dataPath);
10820
10826
  return { buffer, meta };
10821
10827
  } catch {
10822
10828
  return null;
@@ -10925,14 +10931,14 @@ var init_optimizeHtmlImages = __esm(() => {
10925
10931
  });
10926
10932
 
10927
10933
  // src/cli/scripts/telemetry.ts
10928
- import { existsSync as existsSync15, mkdirSync as mkdirSync4, readFileSync as readFileSync10, writeFileSync as writeFileSync5 } from "fs";
10934
+ import { existsSync as existsSync16, mkdirSync as mkdirSync4, readFileSync as readFileSync11, writeFileSync as writeFileSync5 } from "fs";
10929
10935
  import { homedir } from "os";
10930
10936
  import { join as join16 } from "path";
10931
10937
  var configDir, configPath, getTelemetryConfig = () => {
10932
10938
  try {
10933
- if (!existsSync15(configPath))
10939
+ if (!existsSync16(configPath))
10934
10940
  return null;
10935
- const raw = readFileSync10(configPath, "utf-8");
10941
+ const raw = readFileSync11(configPath, "utf-8");
10936
10942
  const config = JSON.parse(raw);
10937
10943
  return config;
10938
10944
  } catch {
@@ -10945,14 +10951,14 @@ var init_telemetry = __esm(() => {
10945
10951
  });
10946
10952
 
10947
10953
  // src/cli/telemetryEvent.ts
10948
- import { existsSync as existsSync16, readFileSync as readFileSync11 } from "fs";
10954
+ import { existsSync as existsSync17, readFileSync as readFileSync12 } from "fs";
10949
10955
  import { arch, platform } from "os";
10950
10956
  import { dirname as dirname9, join as join17, parse } from "path";
10951
10957
  var checkCandidate = (candidate) => {
10952
- if (!existsSync16(candidate)) {
10958
+ if (!existsSync17(candidate)) {
10953
10959
  return null;
10954
10960
  }
10955
- const pkg = JSON.parse(readFileSync11(candidate, "utf-8"));
10961
+ const pkg = JSON.parse(readFileSync12(candidate, "utf-8"));
10956
10962
  if (pkg.name === "@absolutejs/absolute") {
10957
10963
  const ver = pkg.version;
10958
10964
  return ver;
@@ -11064,17 +11070,17 @@ var exports_buildHMRClient = {};
11064
11070
  __export(exports_buildHMRClient, {
11065
11071
  buildHMRClient: () => buildHMRClient
11066
11072
  });
11067
- import { existsSync as existsSync17 } from "fs";
11073
+ import { existsSync as existsSync18 } from "fs";
11068
11074
  import { resolve as resolve15 } from "path";
11069
11075
  var {build: bunBuild } = globalThis.Bun;
11070
11076
  var resolveHmrClientPath = () => {
11071
11077
  const projectRoot = process.cwd();
11072
11078
  const fromSource = resolve15(import.meta.dir, "client/hmrClient.ts");
11073
- if (existsSync17(fromSource) && fromSource.startsWith(projectRoot)) {
11079
+ if (existsSync18(fromSource) && fromSource.startsWith(projectRoot)) {
11074
11080
  return fromSource;
11075
11081
  }
11076
11082
  const fromNodeModules = resolve15(projectRoot, "node_modules/@absolutejs/absolute/dist/dev/client/hmrClient.ts");
11077
- if (existsSync17(fromNodeModules))
11083
+ if (existsSync18(fromNodeModules))
11078
11084
  return fromNodeModules;
11079
11085
  return resolve15(import.meta.dir, "dev/client/hmrClient.ts");
11080
11086
  }, hmrClientPath2, buildHMRClient = async () => {
@@ -11269,7 +11275,7 @@ var devVendorPaths = null, getDevVendorPaths = () => devVendorPaths, setDevVendo
11269
11275
  };
11270
11276
 
11271
11277
  // src/build/angularLinkerPlugin.ts
11272
- import { existsSync as existsSync18, mkdirSync as mkdirSync5, readFileSync as readFileSync12, writeFileSync as writeFileSync6 } from "fs";
11278
+ import { existsSync as existsSync19, mkdirSync as mkdirSync5, readFileSync as readFileSync13, writeFileSync as writeFileSync6 } from "fs";
11273
11279
  import { dirname as dirname10, join as join18, relative as relative6, resolve as resolve17 } from "path";
11274
11280
  import { createHash as createHash3 } from "crypto";
11275
11281
  var CACHE_ROOT, ANGULAR_LINKER_CANDIDATE_RE, createAngularLinkerPlugin = (linkerJitMode) => ({
@@ -11292,9 +11298,9 @@ var CACHE_ROOT, ANGULAR_LINKER_CANDIDATE_RE, createAngularLinkerPlugin = (linker
11292
11298
  }
11293
11299
  const hash = createHash3("md5").update(source).digest("hex");
11294
11300
  const cachePath = join18(cacheDir, `${hash}.js`);
11295
- if (existsSync18(cachePath)) {
11301
+ if (existsSync19(cachePath)) {
11296
11302
  return {
11297
- contents: readFileSync12(cachePath, "utf-8"),
11303
+ contents: readFileSync13(cachePath, "utf-8"),
11298
11304
  loader: "js"
11299
11305
  };
11300
11306
  }
@@ -11309,8 +11315,8 @@ var CACHE_ROOT, ANGULAR_LINKER_CANDIDATE_RE, createAngularLinkerPlugin = (linker
11309
11315
  linkerPlugin = mod.createEs2015LinkerPlugin({
11310
11316
  fileSystem: {
11311
11317
  dirname: dirname10,
11312
- exists: existsSync18,
11313
- readFile: readFileSync12,
11318
+ exists: existsSync19,
11319
+ readFile: readFileSync13,
11314
11320
  relative: relative6,
11315
11321
  resolve: resolve17
11316
11322
  },
@@ -11349,7 +11355,7 @@ var init_angularLinkerPlugin = __esm(() => {
11349
11355
  });
11350
11356
 
11351
11357
  // src/build/externalAssetPlugin.ts
11352
- import { copyFileSync, existsSync as existsSync19, mkdirSync as mkdirSync6, statSync } from "fs";
11358
+ import { copyFileSync, existsSync as existsSync20, mkdirSync as mkdirSync6, statSync } from "fs";
11353
11359
  import { basename as basename5, dirname as dirname11, join as join19, resolve as resolve18 } from "path";
11354
11360
  var createExternalAssetPlugin = (outDir, userSourceRoots = []) => ({
11355
11361
  name: "absolute-external-asset",
@@ -11371,12 +11377,12 @@ var createExternalAssetPlugin = (outDir, userSourceRoots = []) => ({
11371
11377
  if (!relPath)
11372
11378
  continue;
11373
11379
  const assetPath = resolve18(sourceDir, relPath);
11374
- if (!existsSync19(assetPath))
11380
+ if (!existsSync20(assetPath))
11375
11381
  continue;
11376
11382
  if (!statSync(assetPath).isFile())
11377
11383
  continue;
11378
11384
  const targetPath = join19(outDir, basename5(assetPath));
11379
- if (existsSync19(targetPath))
11385
+ if (existsSync20(targetPath))
11380
11386
  continue;
11381
11387
  mkdirSync6(dirname11(targetPath), { recursive: true });
11382
11388
  copyFileSync(assetPath, targetPath);
@@ -11687,7 +11693,7 @@ var commonAncestor = (paths, fallback) => {
11687
11693
  var init_commonAncestor = () => {};
11688
11694
 
11689
11695
  // src/utils/buildDirectoryLock.ts
11690
- import { mkdirSync as mkdirSync7, unlinkSync, writeFileSync as writeFileSync7, readFileSync as readFileSync13 } from "fs";
11696
+ import { mkdirSync as mkdirSync7, unlinkSync, writeFileSync as writeFileSync7, readFileSync as readFileSync14 } from "fs";
11691
11697
  import { dirname as dirname12, join as join22 } from "path";
11692
11698
  var heldLocks, HELD_LOCKS_ENV = "ABSOLUTE_HELD_BUILD_DIRECTORY_LOCKS", exitHandlersRegistered = false, registerExitHandlersOnce = () => {
11693
11699
  if (exitHandlersRegistered)
@@ -11735,7 +11741,7 @@ var heldLocks, HELD_LOCKS_ENV = "ABSOLUTE_HELD_BUILD_DIRECTORY_LOCKS", exitHandl
11735
11741
  writeFileSync7(lockPath, JSON.stringify(metadata2, null, 2), { flag: "wx" });
11736
11742
  }, readLockMetadata = (lockPath) => {
11737
11743
  try {
11738
- const raw = readFileSync13(lockPath, "utf-8");
11744
+ const raw = readFileSync14(lockPath, "utf-8");
11739
11745
  const parsed = JSON.parse(raw);
11740
11746
  if (typeof parsed === "object" && parsed !== null && typeof parsed.pid === "number") {
11741
11747
  return {
@@ -11868,7 +11874,7 @@ var exports_scanVueSsrOnlyPages = {};
11868
11874
  __export(exports_scanVueSsrOnlyPages, {
11869
11875
  scanVueSsrOnlyPages: () => scanVueSsrOnlyPages
11870
11876
  });
11871
- import { readdirSync as readdirSync2, readFileSync as readFileSync14 } from "fs";
11877
+ import { readdirSync as readdirSync2, readFileSync as readFileSync15 } from "fs";
11872
11878
  import { join as join23 } from "path";
11873
11879
  import ts6 from "typescript";
11874
11880
  var SKIP_DIRS2, SOURCE_EXTENSIONS2, getScriptKind2 = (filePath) => {
@@ -11971,7 +11977,7 @@ var SKIP_DIRS2, SOURCE_EXTENSIONS2, getScriptKind2 = (filePath) => {
11971
11977
  }, extractFromFile = (filePath, out) => {
11972
11978
  let source;
11973
11979
  try {
11974
- source = readFileSync14(filePath, "utf-8");
11980
+ source = readFileSync15(filePath, "utf-8");
11975
11981
  } catch {
11976
11982
  return;
11977
11983
  }
@@ -12015,7 +12021,7 @@ var init_scanVueSsrOnlyPages = __esm(() => {
12015
12021
  });
12016
12022
 
12017
12023
  // src/build/scanAngularHandlerCalls.ts
12018
- import { readdirSync as readdirSync3, readFileSync as readFileSync15 } from "fs";
12024
+ import { readdirSync as readdirSync3, readFileSync as readFileSync16 } from "fs";
12019
12025
  import { join as join24 } from "path";
12020
12026
  import ts7 from "typescript";
12021
12027
  var ELYSIA_ROUTE_METHODS2, SKIP_DIRS3, SOURCE_EXTENSIONS3, getScriptKind3 = (filePath) => {
@@ -12086,7 +12092,7 @@ var ELYSIA_ROUTE_METHODS2, SKIP_DIRS3, SOURCE_EXTENSIONS3, getScriptKind3 = (fil
12086
12092
  }, extractCallsFromFile = (filePath, out) => {
12087
12093
  let source;
12088
12094
  try {
12089
- source = readFileSync15(filePath, "utf-8");
12095
+ source = readFileSync16(filePath, "utf-8");
12090
12096
  } catch {
12091
12097
  return;
12092
12098
  }
@@ -12165,7 +12171,7 @@ var init_scanAngularHandlerCalls = __esm(() => {
12165
12171
  });
12166
12172
 
12167
12173
  // src/build/scanAngularPageRoutes.ts
12168
- import { readdirSync as readdirSync4, readFileSync as readFileSync16 } from "fs";
12174
+ import { readdirSync as readdirSync4, readFileSync as readFileSync17 } from "fs";
12169
12175
  import { basename as basename6, join as join25 } from "path";
12170
12176
  import ts8 from "typescript";
12171
12177
  var SOURCE_EXTENSIONS4, SKIP_DIRS4, hasSourceExtension4 = (filePath) => {
@@ -12237,7 +12243,7 @@ var SOURCE_EXTENSIONS4, SKIP_DIRS4, hasSourceExtension4 = (filePath) => {
12237
12243
  for (const file2 of files) {
12238
12244
  let source;
12239
12245
  try {
12240
- source = readFileSync16(file2, "utf-8");
12246
+ source = readFileSync17(file2, "utf-8");
12241
12247
  } catch {
12242
12248
  continue;
12243
12249
  }
@@ -12284,7 +12290,7 @@ var exports_parseAngularConfigImports = {};
12284
12290
  __export(exports_parseAngularConfigImports, {
12285
12291
  parseAngularProvidersImport: () => parseAngularProvidersImport
12286
12292
  });
12287
- import { existsSync as existsSync20, readFileSync as readFileSync17 } from "fs";
12293
+ import { existsSync as existsSync21, readFileSync as readFileSync18 } from "fs";
12288
12294
  import { dirname as dirname13, isAbsolute as isAbsolute3, join as join26 } from "path";
12289
12295
  import ts9 from "typescript";
12290
12296
  var findDefineConfigCall = (sf) => {
@@ -12341,7 +12347,7 @@ var findDefineConfigCall = (sf) => {
12341
12347
  const envOverride = process.env.ABSOLUTE_CONFIG;
12342
12348
  if (envOverride) {
12343
12349
  const resolved = isAbsolute3(envOverride) ? envOverride : join26(projectRoot, envOverride);
12344
- if (existsSync20(resolved))
12350
+ if (existsSync21(resolved))
12345
12351
  return resolved;
12346
12352
  }
12347
12353
  const candidates = [
@@ -12351,7 +12357,7 @@ var findDefineConfigCall = (sf) => {
12351
12357
  join26(projectRoot, "absolute.config.mjs")
12352
12358
  ];
12353
12359
  for (const candidate of candidates) {
12354
- if (existsSync20(candidate))
12360
+ if (existsSync21(candidate))
12355
12361
  return candidate;
12356
12362
  }
12357
12363
  return null;
@@ -12359,7 +12365,7 @@ var findDefineConfigCall = (sf) => {
12359
12365
  const configPath2 = resolveConfigPath(projectRoot);
12360
12366
  if (!configPath2)
12361
12367
  return null;
12362
- const source = readFileSync17(configPath2, "utf-8");
12368
+ const source = readFileSync18(configPath2, "utf-8");
12363
12369
  if (!source.includes("angular"))
12364
12370
  return null;
12365
12371
  if (!source.includes("providers"))
@@ -12452,7 +12458,7 @@ __export(exports_compileSvelte, {
12452
12458
  compileSvelte: () => compileSvelte,
12453
12459
  clearSvelteCompilerCache: () => clearSvelteCompilerCache
12454
12460
  });
12455
- import { existsSync as existsSync21 } from "fs";
12461
+ import { existsSync as existsSync22 } from "fs";
12456
12462
  import { mkdir as mkdir4, stat as stat2 } from "fs/promises";
12457
12463
  import {
12458
12464
  dirname as dirname14,
@@ -12468,11 +12474,11 @@ var {write: write2, file: file2, Transpiler: Transpiler2 } = globalThis.Bun;
12468
12474
  var resolveDevClientDir2 = () => {
12469
12475
  const projectRoot = process.cwd();
12470
12476
  const fromSource = resolve22(import.meta.dir, "../dev/client");
12471
- if (existsSync21(fromSource) && fromSource.startsWith(projectRoot)) {
12477
+ if (existsSync22(fromSource) && fromSource.startsWith(projectRoot)) {
12472
12478
  return fromSource;
12473
12479
  }
12474
12480
  const fromNodeModules = resolve22(projectRoot, "node_modules/@absolutejs/absolute/dist/dev/client");
12475
- if (existsSync21(fromNodeModules))
12481
+ if (existsSync22(fromNodeModules))
12476
12482
  return fromNodeModules;
12477
12483
  return resolve22(import.meta.dir, "./dev/client");
12478
12484
  }, devClientDir2, hmrClientPath3, persistentCache, sourceHashCache, clearSvelteCompilerCache = () => {
@@ -12575,7 +12581,7 @@ var resolveDevClientDir2 = () => {
12575
12581
  const contentHash = Bun.hash(raw).toString(BASE_36_RADIX);
12576
12582
  const prevHash = sourceHashCache.get(src);
12577
12583
  const persistent = persistentCache.get(src);
12578
- if (prevHash === contentHash && persistent && existsSync21(persistent.ssr) && existsSync21(persistent.client)) {
12584
+ if (prevHash === contentHash && persistent && existsSync22(persistent.ssr) && existsSync22(persistent.client)) {
12579
12585
  cache.set(src, persistent);
12580
12586
  return persistent;
12581
12587
  }
@@ -12815,7 +12821,7 @@ __export(exports_chainInlineSourcemaps, {
12815
12821
  chainBundleInlineSourcemap: () => chainBundleInlineSourcemap,
12816
12822
  buildLineRemap: () => buildLineRemap
12817
12823
  });
12818
- import { readFileSync as readFileSync18, writeFileSync as writeFileSync8 } from "fs";
12824
+ import { readFileSync as readFileSync19, writeFileSync as writeFileSync8 } from "fs";
12819
12825
  var BASE64_CHARS = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/", BASE64_TO_INT, decodeVlq = (str, startPos) => {
12820
12826
  let result = 0;
12821
12827
  let shift = 0;
@@ -13106,7 +13112,7 @@ var BASE64_CHARS = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz01234567
13106
13112
  version: 3
13107
13113
  };
13108
13114
  }, chainBundleInlineSourcemap = (bundleFilePath) => {
13109
- const text = readFileSync18(bundleFilePath, "utf-8");
13115
+ const text = readFileSync19(bundleFilePath, "utf-8");
13110
13116
  const outerMap = extractInlineMap(text);
13111
13117
  if (!outerMap)
13112
13118
  return;
@@ -13192,7 +13198,7 @@ __export(exports_compileVue, {
13192
13198
  compileVue: () => compileVue,
13193
13199
  clearVueHmrCaches: () => clearVueHmrCaches
13194
13200
  });
13195
- import { existsSync as existsSync22, readFileSync as readFileSync19, realpathSync } from "fs";
13201
+ import { existsSync as existsSync23, readFileSync as readFileSync20, realpathSync as realpathSync2 } from "fs";
13196
13202
  import { mkdir as mkdir5 } from "fs/promises";
13197
13203
  import {
13198
13204
  basename as basename8,
@@ -13206,11 +13212,11 @@ var {file: file3, write: write3, Transpiler: Transpiler3 } = globalThis.Bun;
13206
13212
  var resolveDevClientDir3 = () => {
13207
13213
  const projectRoot = process.cwd();
13208
13214
  const fromSource = resolve23(import.meta.dir, "../dev/client");
13209
- if (existsSync22(fromSource) && fromSource.startsWith(projectRoot)) {
13215
+ if (existsSync23(fromSource) && fromSource.startsWith(projectRoot)) {
13210
13216
  return fromSource;
13211
13217
  }
13212
13218
  const fromNodeModules = resolve23(projectRoot, "node_modules/@absolutejs/absolute/dist/dev/client");
13213
- if (existsSync22(fromNodeModules))
13219
+ if (existsSync23(fromNodeModules))
13214
13220
  return fromNodeModules;
13215
13221
  return resolve23(import.meta.dir, "./dev/client");
13216
13222
  }, devClientDir3, hmrClientPath4, transpiler4, scriptCache, scriptSetupCache, templateCache, styleCache, persistentBuildCache, vueSourceHashCache, vueHmrMetadata, clearVueHmrCaches = () => {
@@ -13252,26 +13258,26 @@ var resolveDevClientDir3 = () => {
13252
13258
  }
13253
13259
  return "full";
13254
13260
  }, generateVueHmrId = (sourceFilePath, vueRootDir) => relative10(vueRootDir, sourceFilePath).replace(/\\/g, "/").replace(/\.vue$/, ""), extractImports = (sourceCode) => Array.from(sourceCode.matchAll(/import\s+[\s\S]+?['"]([^'"]+)['"]/g)).map((match) => match[1]).filter((importPath) => importPath !== undefined), inlineCssImports = (cssContent, cssFilePath, visited = new Set) => {
13255
- const resolved = realpathSync(cssFilePath);
13261
+ const resolved = realpathSync2(cssFilePath);
13256
13262
  if (visited.has(resolved))
13257
13263
  return "";
13258
13264
  visited.add(resolved);
13259
13265
  const importRegex = /@import\s+(?:url\(\s*)?(['"])(\.{1,2}\/[^'"]+)\1\s*\)?\s*;?/g;
13260
13266
  return cssContent.replace(importRegex, (match, _quote, relPath) => {
13261
13267
  const importedPath = resolve23(dirname15(cssFilePath), relPath);
13262
- if (!existsSync22(importedPath))
13268
+ if (!existsSync23(importedPath))
13263
13269
  return match;
13264
- const importedContent = readFileSync19(importedPath, "utf-8");
13270
+ const importedContent = readFileSync20(importedPath, "utf-8");
13265
13271
  return inlineCssImports(importedContent, importedPath, visited);
13266
13272
  });
13267
13273
  }, resolveHelperTsPath = (sourceDir, helper) => {
13268
13274
  if (helper.endsWith(".ts"))
13269
13275
  return resolve23(sourceDir, helper);
13270
13276
  const direct = resolve23(sourceDir, `${helper}.ts`);
13271
- if (existsSync22(direct))
13277
+ if (existsSync23(direct))
13272
13278
  return direct;
13273
13279
  const indexed = resolve23(sourceDir, helper, "index.ts");
13274
- if (existsSync22(indexed))
13280
+ if (existsSync23(indexed))
13275
13281
  return indexed;
13276
13282
  return direct;
13277
13283
  }, toJs = (filePath, sourceDir) => {
@@ -13287,10 +13293,10 @@ var resolveDevClientDir3 = () => {
13287
13293
  }
13288
13294
  if (sourceDir && (filePath.startsWith("./") || filePath.startsWith("../"))) {
13289
13295
  const directTs = resolve23(sourceDir, `${filePath}.ts`);
13290
- if (existsSync22(directTs))
13296
+ if (existsSync23(directTs))
13291
13297
  return `${filePath}.js`;
13292
13298
  const indexedTs = resolve23(sourceDir, filePath, "index.ts");
13293
- if (existsSync22(indexedTs))
13299
+ if (existsSync23(indexedTs))
13294
13300
  return `${filePath}/index.js`;
13295
13301
  }
13296
13302
  return `${filePath}.js`;
@@ -13325,7 +13331,7 @@ var resolveDevClientDir3 = () => {
13325
13331
  const contentHash = Bun.hash(sourceContent).toString(BASE_36_RADIX);
13326
13332
  const prevHash = vueSourceHashCache.get(sourceFilePath);
13327
13333
  const persistent = persistentBuildCache.get(sourceFilePath);
13328
- if (prevHash === contentHash && persistent && existsSync22(persistent.clientPath) && existsSync22(persistent.serverPath)) {
13334
+ if (prevHash === contentHash && persistent && existsSync23(persistent.clientPath) && existsSync23(persistent.serverPath)) {
13329
13335
  cacheMap.set(sourceFilePath, persistent);
13330
13336
  return persistent;
13331
13337
  }
@@ -13364,9 +13370,9 @@ var resolveDevClientDir3 = () => {
13364
13370
  const hasScript = descriptor.script || descriptor.scriptSetup;
13365
13371
  const compiledScript = hasScript ? compiler.compileScript(descriptor, {
13366
13372
  fs: {
13367
- fileExists: existsSync22,
13368
- readFile: (file4) => existsSync22(file4) ? readFileSync19(file4, "utf-8") : undefined,
13369
- realpath: realpathSync
13373
+ fileExists: existsSync23,
13374
+ readFile: (file4) => existsSync23(file4) ? readFileSync20(file4, "utf-8") : undefined,
13375
+ realpath: realpathSync2
13370
13376
  },
13371
13377
  id: componentId,
13372
13378
  inlineTemplate: false,
@@ -13686,7 +13692,7 @@ if (typeof __VUE_HMR_RUNTIME__ !== 'undefined') {
13686
13692
  continue;
13687
13693
  }
13688
13694
  const resolved = resolveHelperTsPath(helperDir, dep);
13689
- if (!existsSync22(resolved))
13695
+ if (!existsSync23(resolved))
13690
13696
  continue;
13691
13697
  if (allTsHelperPaths.has(resolved))
13692
13698
  continue;
@@ -14204,7 +14210,7 @@ __export(exports_compileAngular, {
14204
14210
  compileAngularFile: () => compileAngularFile,
14205
14211
  compileAngular: () => compileAngular
14206
14212
  });
14207
- import { existsSync as existsSync23, readFileSync as readFileSync20, promises as fs5 } from "fs";
14213
+ import { existsSync as existsSync24, readFileSync as readFileSync21, promises as fs5 } from "fs";
14208
14214
  import { join as join29, basename as basename9, sep as sep3, dirname as dirname16, resolve as resolve24, relative as relative11 } from "path";
14209
14215
  var {Glob: Glob6 } = globalThis.Bun;
14210
14216
  import ts10 from "typescript";
@@ -14253,7 +14259,7 @@ var traceAngularPhase = async (name, fn2, metadata2) => {
14253
14259
  join29(candidate, "index.js"),
14254
14260
  join29(candidate, "index.jsx")
14255
14261
  ];
14256
- return candidates.find((file4) => existsSync23(file4));
14262
+ return candidates.find((file4) => existsSync24(file4));
14257
14263
  }, createLegacyAngularAnimationUsageResolver = (rootDir) => {
14258
14264
  const baseDir = resolve24(rootDir);
14259
14265
  const tsconfigAliases = readTsconfigPathAliases();
@@ -14334,11 +14340,11 @@ var traceAngularPhase = async (name, fn2, metadata2) => {
14334
14340
  }, resolveDevClientDir4 = () => {
14335
14341
  const projectRoot = process.cwd();
14336
14342
  const fromSource = resolve24(import.meta.dir, "../dev/client");
14337
- if (existsSync23(fromSource) && fromSource.startsWith(projectRoot)) {
14343
+ if (existsSync24(fromSource) && fromSource.startsWith(projectRoot)) {
14338
14344
  return fromSource;
14339
14345
  }
14340
14346
  const fromNodeModules = resolve24(projectRoot, "node_modules/@absolutejs/absolute/dist/dev/client");
14341
- if (existsSync23(fromNodeModules))
14347
+ if (existsSync24(fromNodeModules))
14342
14348
  return fromNodeModules;
14343
14349
  return resolve24(import.meta.dir, "./dev/client");
14344
14350
  }, devClientDir4, hmrClientPath5, formatDiagnosticMessage = (diagnostic) => {
@@ -14384,11 +14390,11 @@ var traceAngularPhase = async (name, fn2, metadata2) => {
14384
14390
  return `${path}${query}`;
14385
14391
  const importerDir = dirname16(importerOutputPath);
14386
14392
  const fileCandidate = resolve24(importerDir, `${path}.js`);
14387
- if (outputFiles?.has(fileCandidate) || existsSync23(fileCandidate)) {
14393
+ if (outputFiles?.has(fileCandidate) || existsSync24(fileCandidate)) {
14388
14394
  return `${path}.js${query}`;
14389
14395
  }
14390
14396
  const indexCandidate = resolve24(importerDir, path, "index.js");
14391
- if (outputFiles?.has(indexCandidate) || existsSync23(indexCandidate)) {
14397
+ if (outputFiles?.has(indexCandidate) || existsSync24(indexCandidate)) {
14392
14398
  return `${path}/index.js${query}`;
14393
14399
  }
14394
14400
  return `${path}.js${query}`;
@@ -14426,7 +14432,7 @@ var traceAngularPhase = async (name, fn2, metadata2) => {
14426
14432
  join29(basePath, "index.mts"),
14427
14433
  join29(basePath, "index.cts")
14428
14434
  ];
14429
- return candidates.map((candidate) => resolve24(candidate)).find((candidate) => existsSync23(candidate) && !candidate.endsWith(".d.ts")) ?? null;
14435
+ return candidates.map((candidate) => resolve24(candidate)).find((candidate) => existsSync24(candidate) && !candidate.endsWith(".d.ts")) ?? null;
14430
14436
  }, readFileForAotTransform = async (fileName, readFile6) => {
14431
14437
  const hostSource = readFile6?.(fileName);
14432
14438
  if (typeof hostSource === "string")
@@ -14507,7 +14513,7 @@ var traceAngularPhase = async (name, fn2, metadata2) => {
14507
14513
  if (visited.has(resolvedPath))
14508
14514
  return;
14509
14515
  visited.add(resolvedPath);
14510
- if (!existsSync23(resolvedPath) || resolvedPath.endsWith(".d.ts"))
14516
+ if (!existsSync24(resolvedPath) || resolvedPath.endsWith(".d.ts"))
14511
14517
  return;
14512
14518
  stats.filesVisited += 1;
14513
14519
  const source = await readFileForAotTransform(resolvedPath, readFile6);
@@ -14541,7 +14547,7 @@ var traceAngularPhase = async (name, fn2, metadata2) => {
14541
14547
  const outputPath = resolve24(join29(outDir, relative11(process.cwd(), resolve24(inputPath)).replace(/\.[cm]?[tj]sx?$/, ".js")));
14542
14548
  return [
14543
14549
  outputPath,
14544
- buildIslandMetadataExports(readFileSync20(inputPath, "utf-8"))
14550
+ buildIslandMetadataExports(readFileSync21(inputPath, "utf-8"))
14545
14551
  ];
14546
14552
  })), { entries: inputPaths.length });
14547
14553
  await traceAngularPhase("aot/preload-compiler", () => import("@angular/compiler"));
@@ -14681,7 +14687,7 @@ var traceAngularPhase = async (name, fn2, metadata2) => {
14681
14687
  return null;
14682
14688
  }, resolveAngularDeferImportSpecifier = () => {
14683
14689
  const sourceEntry = resolve24(import.meta.dir, "../angular/components/index.ts");
14684
- if (existsSync23(sourceEntry)) {
14690
+ if (existsSync24(sourceEntry)) {
14685
14691
  return sourceEntry.replace(/\\/g, "/");
14686
14692
  }
14687
14693
  return "@absolutejs/absolute/angular/components";
@@ -14809,7 +14815,7 @@ ${slot.resolvedBindings.map((binding) => ` "${binding.key}": this.__absoluteDef
14809
14815
  ${fields}
14810
14816
  `);
14811
14817
  }, readAndEscapeFile = async (filePath, stylePreprocessors) => {
14812
- if (!existsSync23(filePath)) {
14818
+ if (!existsSync24(filePath)) {
14813
14819
  throw new Error(`Unable to inline Angular style resource: file not found at ${filePath}`);
14814
14820
  }
14815
14821
  const content = await compileStyleFileIfNeeded(filePath, stylePreprocessors);
@@ -14818,7 +14824,7 @@ ${fields}
14818
14824
  const templateUrlMatch = findUncommentedMatch(source, /templateUrl\s*:\s*['"]([^'"]+)['"]/);
14819
14825
  if (templateUrlMatch?.[1]) {
14820
14826
  const templatePath = join29(fileDir, templateUrlMatch[1]);
14821
- if (!existsSync23(templatePath)) {
14827
+ if (!existsSync24(templatePath)) {
14822
14828
  throw new Error(`Unable to inline Angular templateUrl "${templateUrlMatch[1]}": file not found at ${templatePath}`);
14823
14829
  }
14824
14830
  const templateRaw2 = await fs5.readFile(templatePath, "utf-8");
@@ -14849,10 +14855,10 @@ ${fields}
14849
14855
  const templateUrlMatch = findUncommentedMatch(source, /templateUrl\s*:\s*['"]([^'"]+)['"]/);
14850
14856
  if (templateUrlMatch?.[1]) {
14851
14857
  const templatePath = join29(fileDir, templateUrlMatch[1]);
14852
- if (!existsSync23(templatePath)) {
14858
+ if (!existsSync24(templatePath)) {
14853
14859
  throw new Error(`Unable to inline Angular templateUrl "${templateUrlMatch[1]}": file not found at ${templatePath}`);
14854
14860
  }
14855
- const templateRaw2 = readFileSync20(templatePath, "utf-8");
14861
+ const templateRaw2 = readFileSync21(templatePath, "utf-8");
14856
14862
  const lowered2 = lowerAngularDeferSyntax(templateRaw2);
14857
14863
  const escaped2 = escapeTemplateContent(lowered2.template);
14858
14864
  const replacedSource2 = source.slice(0, templateUrlMatch.index) + `template: \`${escaped2}\`` + source.slice(templateUrlMatch.index + templateUrlMatch[0].length);
@@ -14937,7 +14943,7 @@ ${fields}
14937
14943
  join29(candidate, "index.js"),
14938
14944
  join29(candidate, "index.jsx")
14939
14945
  ];
14940
- return candidates.find((file4) => existsSync23(file4));
14946
+ return candidates.find((file4) => existsSync24(file4));
14941
14947
  };
14942
14948
  const resolveLocalImport = (specifier, fromDir) => {
14943
14949
  if (specifier.startsWith(".") || specifier.startsWith("/")) {
@@ -15012,7 +15018,7 @@ ${fields}
15012
15018
  if (visited.has(resolved))
15013
15019
  return;
15014
15020
  visited.add(resolved);
15015
- if (resolved.endsWith(".json") && existsSync23(resolved)) {
15021
+ if (resolved.endsWith(".json") && existsSync24(resolved)) {
15016
15022
  const inputDir2 = dirname16(resolved);
15017
15023
  const relativeDir2 = inputDir2.startsWith(baseDir) ? inputDir2.substring(baseDir.length + 1) : inputDir2;
15018
15024
  const targetDir2 = join29(outDir, relativeDir2);
@@ -15025,7 +15031,7 @@ ${fields}
15025
15031
  let actualPath = resolved;
15026
15032
  if (!actualPath.endsWith(".ts"))
15027
15033
  actualPath += ".ts";
15028
- if (!existsSync23(actualPath))
15034
+ if (!existsSync24(actualPath))
15029
15035
  return;
15030
15036
  let sourceCode = await fs5.readFile(actualPath, "utf-8");
15031
15037
  const inlined = await inlineResources(sourceCode, dirname16(actualPath), stylePreprocessors);
@@ -15063,7 +15069,7 @@ ${fields}
15063
15069
  const isEntry = resolve24(actualPath) === resolve24(entryPath);
15064
15070
  const contentHash = Bun.hash(sourceCode).toString(BASE_36_RADIX);
15065
15071
  const cacheKey2 = actualPath;
15066
- const shouldWriteFile = cacheBuster && isEntry ? true : jitContentCache.get(cacheKey2) !== contentHash || !existsSync23(targetPath);
15072
+ const shouldWriteFile = cacheBuster && isEntry ? true : jitContentCache.get(cacheKey2) !== contentHash || !existsSync24(targetPath);
15067
15073
  if (shouldWriteFile) {
15068
15074
  const processedContent = transpileAndRewrite(sourceCode, relativeDir, actualPath, importRewrites);
15069
15075
  await fs5.mkdir(targetDir, { recursive: true });
@@ -15075,7 +15081,7 @@ ${fields}
15075
15081
  };
15076
15082
  await transpileFile(inputPath);
15077
15083
  const entryOutputPath = toOutputPath(entryPath);
15078
- if (existsSync23(entryOutputPath)) {
15084
+ if (existsSync24(entryOutputPath)) {
15079
15085
  const entryOutput = await fs5.readFile(entryOutputPath, "utf-8");
15080
15086
  const withoutLegacyFlag = entryOutput.replace(/\nexport const __ABSOLUTE_PAGE_USES_LEGACY_ANIMATIONS__ = true;\n?/g, `
15081
15087
  `);
@@ -15101,7 +15107,7 @@ export const __ABSOLUTE_PAGE_USES_LEGACY_ANIMATIONS__ = true;
15101
15107
  await traceAngularPhase("aot/copy-json-resources", async () => {
15102
15108
  const cwd = process.cwd();
15103
15109
  const angularSrcDir = resolve24(outRoot);
15104
- if (!existsSync23(angularSrcDir))
15110
+ if (!existsSync24(angularSrcDir))
15105
15111
  return;
15106
15112
  const jsonGlob = new Glob6("**/*.json");
15107
15113
  for (const rel of jsonGlob.scanSync({
@@ -15136,15 +15142,15 @@ export const __ABSOLUTE_PAGE_USES_LEGACY_ANIMATIONS__ = true;
15136
15142
  ...candidatePaths.map((file4) => resolve24(file4)),
15137
15143
  ...compiledFallbackPaths
15138
15144
  ];
15139
- let candidate = normalizedCandidates.find((file4) => existsSync23(file4) && file4.endsWith(`${sep3}${relativeEntry}`));
15145
+ let candidate = normalizedCandidates.find((file4) => existsSync24(file4) && file4.endsWith(`${sep3}${relativeEntry}`));
15140
15146
  if (!candidate) {
15141
- candidate = normalizedCandidates.find((file4) => existsSync23(file4) && file4.endsWith(`${sep3}pages${sep3}${jsName}`));
15147
+ candidate = normalizedCandidates.find((file4) => existsSync24(file4) && file4.endsWith(`${sep3}pages${sep3}${jsName}`));
15142
15148
  }
15143
15149
  if (!candidate) {
15144
- candidate = normalizedCandidates.find((file4) => existsSync23(file4) && file4.endsWith(`${sep3}${jsName}`));
15150
+ candidate = normalizedCandidates.find((file4) => existsSync24(file4) && file4.endsWith(`${sep3}${jsName}`));
15145
15151
  }
15146
15152
  if (!candidate) {
15147
- candidate = normalizedCandidates.find((file4) => existsSync23(file4));
15153
+ candidate = normalizedCandidates.find((file4) => existsSync24(file4));
15148
15154
  }
15149
15155
  return candidate;
15150
15156
  };
@@ -15152,11 +15158,11 @@ export const __ABSOLUTE_PAGE_USES_LEGACY_ANIMATIONS__ = true;
15152
15158
  if (!rawServerFile) {
15153
15159
  rawServerFile = await traceAngularPhase("wrapper/resolve-server-output-fallback", () => resolveRawServerFile([]), { entry: resolvedEntry });
15154
15160
  }
15155
- if (rawServerFile && !existsSync23(rawServerFile)) {
15161
+ if (rawServerFile && !existsSync24(rawServerFile)) {
15156
15162
  outputs = hmr ? await compileEntry() : aotOutputs;
15157
15163
  rawServerFile = await traceAngularPhase("wrapper/resolve-server-output-retry", () => resolveRawServerFile(outputs), { entry: resolvedEntry });
15158
15164
  }
15159
- if (!rawServerFile || !existsSync23(rawServerFile)) {
15165
+ if (!rawServerFile || !existsSync24(rawServerFile)) {
15160
15166
  throw new Error(`Compiled output not found for ${entry}. Looking for: ${jsName}. Available: ${[
15161
15167
  ...outputs,
15162
15168
  ...compiledFallbackPaths
@@ -15179,7 +15185,7 @@ export const __ABSOLUTE_PAGE_USES_LEGACY_ANIMATIONS__ = true;
15179
15185
  const providersHashInput = providersInjection ? (() => {
15180
15186
  let providersSourceContent = "";
15181
15187
  try {
15182
- providersSourceContent = readFileSync20(providersInjection.appProvidersSource, "utf-8");
15188
+ providersSourceContent = readFileSync21(providersInjection.appProvidersSource, "utf-8");
15183
15189
  } catch {}
15184
15190
  return JSON.stringify({
15185
15191
  basePath: pageInjectionForHash?.basePath ?? null,
@@ -15190,7 +15196,7 @@ export const __ABSOLUTE_PAGE_USES_LEGACY_ANIMATIONS__ = true;
15190
15196
  const serverContentHash = `${Bun.hash(original).toString(BASE_36_RADIX)}.${Bun.hash(providersHashInput).toString(BASE_36_RADIX)}`;
15191
15197
  const cachedWrapper = wrapperOutputCache.get(resolvedEntry);
15192
15198
  const clientFile = join29(indexesDir, jsName);
15193
- if (hmr && cachedWrapper && cachedWrapper.serverHash === serverContentHash && existsSync23(clientFile) && (usesLegacyAnimations || !original.includes("__ABSOLUTE_PAGE_USES_LEGACY_ANIMATIONS__")) && (!usesLegacyAnimations || original.includes("__ABSOLUTE_PAGE_USES_LEGACY_ANIMATIONS__"))) {
15199
+ if (hmr && cachedWrapper && cachedWrapper.serverHash === serverContentHash && existsSync24(clientFile) && (usesLegacyAnimations || !original.includes("__ABSOLUTE_PAGE_USES_LEGACY_ANIMATIONS__")) && (!usesLegacyAnimations || original.includes("__ABSOLUTE_PAGE_USES_LEGACY_ANIMATIONS__"))) {
15194
15200
  return {
15195
15201
  clientPath: clientFile,
15196
15202
  indexUnchanged: true,
@@ -16167,7 +16173,7 @@ __export(exports_fastHmrCompiler, {
16167
16173
  primeComponentFingerprint: () => primeComponentFingerprint,
16168
16174
  invalidateFingerprintCache: () => invalidateFingerprintCache
16169
16175
  });
16170
- import { existsSync as existsSync24, readFileSync as readFileSync21, statSync as statSync2 } from "fs";
16176
+ import { existsSync as existsSync25, readFileSync as readFileSync22, statSync as statSync2 } from "fs";
16171
16177
  import { dirname as dirname17, extname as extname6, relative as relative12, resolve as resolve25 } from "path";
16172
16178
  import ts14 from "typescript";
16173
16179
  var fail = (reason, detail, location) => ({
@@ -16480,11 +16486,11 @@ var fail = (reason, detail, location) => ({
16480
16486
  `${base}/index.tsx`
16481
16487
  ];
16482
16488
  for (const candidate of candidates) {
16483
- if (!existsSync24(candidate))
16489
+ if (!existsSync25(candidate))
16484
16490
  continue;
16485
16491
  let content;
16486
16492
  try {
16487
- content = readFileSync21(candidate, "utf-8");
16493
+ content = readFileSync22(candidate, "utf-8");
16488
16494
  } catch {
16489
16495
  continue;
16490
16496
  }
@@ -17063,7 +17069,7 @@ var fail = (reason, detail, location) => ({
17063
17069
  return cached.info;
17064
17070
  let source;
17065
17071
  try {
17066
- source = readFileSync21(filePath, "utf-8");
17072
+ source = readFileSync22(filePath, "utf-8");
17067
17073
  } catch {
17068
17074
  childComponentInfoCache.set(cacheKey2, {
17069
17075
  info: null,
@@ -17117,7 +17123,7 @@ var fail = (reason, detail, location) => ({
17117
17123
  return cached.info;
17118
17124
  let content;
17119
17125
  try {
17120
- content = readFileSync21(dtsPath, "utf-8");
17126
+ content = readFileSync22(dtsPath, "utf-8");
17121
17127
  } catch {
17122
17128
  childComponentInfoCache.set(cacheKey2, {
17123
17129
  info: null,
@@ -17233,11 +17239,11 @@ var fail = (reason, detail, location) => ({
17233
17239
  if (visited.has(startDtsPath))
17234
17240
  return null;
17235
17241
  visited.add(startDtsPath);
17236
- if (!existsSync24(startDtsPath))
17242
+ if (!existsSync25(startDtsPath))
17237
17243
  return null;
17238
17244
  let content;
17239
17245
  try {
17240
- content = readFileSync21(startDtsPath, "utf-8");
17246
+ content = readFileSync22(startDtsPath, "utf-8");
17241
17247
  } catch {
17242
17248
  return null;
17243
17249
  }
@@ -17286,16 +17292,16 @@ var fail = (reason, detail, location) => ({
17286
17292
  `${base}/index.d.cts`
17287
17293
  ];
17288
17294
  for (const c of candidates) {
17289
- if (existsSync24(c))
17295
+ if (existsSync25(c))
17290
17296
  return c;
17291
17297
  }
17292
17298
  return null;
17293
17299
  }, findPackageDtsForJs = (jsPath) => {
17294
17300
  const sibling = jsPath.replace(/\.[mc]?js$/, ".d.ts");
17295
- if (existsSync24(sibling))
17301
+ if (existsSync25(sibling))
17296
17302
  return sibling;
17297
17303
  const mirror = jsPath.replace(/\/dist\//, "/dist/src/").replace(/\.[mc]?js$/, ".d.ts");
17298
- if (existsSync24(mirror))
17304
+ if (existsSync25(mirror))
17299
17305
  return mirror;
17300
17306
  return null;
17301
17307
  }, resolveChildComponentInfo = (className, spec, componentDir, projectRoot) => {
@@ -17308,7 +17314,7 @@ var fail = (reason, detail, location) => ({
17308
17314
  `${base}/index.tsx`
17309
17315
  ];
17310
17316
  for (const candidate of candidates) {
17311
- if (!existsSync24(candidate))
17317
+ if (!existsSync25(candidate))
17312
17318
  continue;
17313
17319
  const info = getChildComponentInfoFromTsSource(candidate, className);
17314
17320
  if (info)
@@ -17455,7 +17461,7 @@ var fail = (reason, detail, location) => ({
17455
17461
  return cached.hasProviders;
17456
17462
  let source;
17457
17463
  try {
17458
- source = readFileSync21(filePath, "utf8");
17464
+ source = readFileSync22(filePath, "utf8");
17459
17465
  } catch {
17460
17466
  return true;
17461
17467
  }
@@ -17522,11 +17528,11 @@ var fail = (reason, detail, location) => ({
17522
17528
  const resolved = resolve25(componentDir, spec);
17523
17529
  for (const ext of TS_EXTENSIONS) {
17524
17530
  const candidate = resolved + ext;
17525
- if (existsSync24(candidate))
17531
+ if (existsSync25(candidate))
17526
17532
  return candidate;
17527
17533
  }
17528
17534
  const indexCandidate = resolve25(resolved, "index.ts");
17529
- if (existsSync24(indexCandidate))
17535
+ if (existsSync25(indexCandidate))
17530
17536
  return indexCandidate;
17531
17537
  }
17532
17538
  return null;
@@ -17759,11 +17765,11 @@ ${transpiled}
17759
17765
  }${staticPatch}`;
17760
17766
  }, STYLE_PREPROCESSED_EXT, resolveAndReadStyleResource = (componentDir, url) => {
17761
17767
  const abs = resolve25(componentDir, url);
17762
- if (!existsSync24(abs))
17768
+ if (!existsSync25(abs))
17763
17769
  return null;
17764
17770
  const ext = extname6(abs).toLowerCase();
17765
17771
  if (!STYLE_PREPROCESSED_EXT.has(ext) || ext === ".css") {
17766
- return readFileSync21(abs, "utf8");
17772
+ return readFileSync22(abs, "utf8");
17767
17773
  }
17768
17774
  try {
17769
17775
  const { compileStyleFileIfNeededSync: compileStyleFileIfNeededSync2 } = (init_stylePreprocessor(), __toCommonJS(exports_stylePreprocessor));
@@ -17800,9 +17806,9 @@ ${block}
17800
17806
  return cached;
17801
17807
  const tsconfigPath = resolve25(projectRoot, "tsconfig.json");
17802
17808
  const opts = {};
17803
- if (existsSync24(tsconfigPath)) {
17809
+ if (existsSync25(tsconfigPath)) {
17804
17810
  try {
17805
- const text = readFileSync21(tsconfigPath, "utf8");
17811
+ const text = readFileSync22(tsconfigPath, "utf8");
17806
17812
  const parsed = ts14.parseConfigFileTextToJson(tsconfigPath, text);
17807
17813
  if (!parsed.error && parsed.config) {
17808
17814
  const cfg = parsed.config;
@@ -17827,7 +17833,7 @@ ${block}
17827
17833
  }, tryFastHmr = async (params) => {
17828
17834
  const { componentFilePath, className } = params;
17829
17835
  const projectRoot = params.projectRoot ?? process.cwd();
17830
- if (!existsSync24(componentFilePath)) {
17836
+ if (!existsSync25(componentFilePath)) {
17831
17837
  return fail("file-not-found", componentFilePath);
17832
17838
  }
17833
17839
  let compiler;
@@ -17836,7 +17842,7 @@ ${block}
17836
17842
  } catch (err) {
17837
17843
  return fail("unexpected-error", `import @angular/compiler: ${err}`);
17838
17844
  }
17839
- const tsSource = readFileSync21(componentFilePath, "utf8");
17845
+ const tsSource = readFileSync22(componentFilePath, "utf8");
17840
17846
  const sourceFile = ts14.createSourceFile(componentFilePath, tsSource, ts14.ScriptTarget.ES2022, true, ts14.ScriptKind.TS);
17841
17847
  const classNode = findClassDeclaration(sourceFile, className);
17842
17848
  if (!classNode) {
@@ -17883,10 +17889,10 @@ ${block}
17883
17889
  templatePath = componentFilePath;
17884
17890
  } else if (decoratorMeta.templateUrl) {
17885
17891
  const tplAbs = resolve25(componentDir, decoratorMeta.templateUrl);
17886
- if (!existsSync24(tplAbs)) {
17892
+ if (!existsSync25(tplAbs)) {
17887
17893
  return fail("template-resource-not-found", `Template file not found: ${tplAbs}`, { file: componentFilePath });
17888
17894
  }
17889
- templateText = readFileSync21(tplAbs, "utf8");
17895
+ templateText = readFileSync22(tplAbs, "utf8");
17890
17896
  templatePath = tplAbs;
17891
17897
  } else {
17892
17898
  return fail("unsupported-decorator-args", "missing template/templateUrl");
@@ -18643,7 +18649,7 @@ __export(exports_compileEmber, {
18643
18649
  clearEmberCompilerCache: () => clearEmberCompilerCache,
18644
18650
  basename: () => basename10
18645
18651
  });
18646
- import { existsSync as existsSync25 } from "fs";
18652
+ import { existsSync as existsSync26 } from "fs";
18647
18653
  import { mkdir as mkdir6, rm as rm4 } from "fs/promises";
18648
18654
  import { basename as basename10, dirname as dirname18, extname as extname7, join as join30, resolve as resolve26 } from "path";
18649
18655
  var {build: bunBuild2, Transpiler: Transpiler4, write: write4, file: file4 } = globalThis.Bun;
@@ -18745,7 +18751,7 @@ export const importSync = (specifier) => {
18745
18751
  const extensionsToTry = ["", ".gts", ".gjs", ".ts", ".js"];
18746
18752
  for (const ext of extensionsToTry) {
18747
18753
  const candidate = candidateBase + ext;
18748
- if (existsSync25(candidate))
18754
+ if (existsSync26(candidate))
18749
18755
  return { path: candidate };
18750
18756
  }
18751
18757
  return;
@@ -18765,7 +18771,7 @@ export const importSync = (specifier) => {
18765
18771
  if (standalonePackages.has(args.path))
18766
18772
  return;
18767
18773
  const internal = join30(cwd, "node_modules/ember-source/dist/packages", args.path, "index.js");
18768
- if (existsSync25(internal))
18774
+ if (existsSync26(internal))
18769
18775
  return { path: internal };
18770
18776
  return;
18771
18777
  });
@@ -18895,7 +18901,7 @@ __export(exports_buildReactVendor, {
18895
18901
  computeVendorPaths: () => computeVendorPaths,
18896
18902
  buildReactVendor: () => buildReactVendor
18897
18903
  });
18898
- import { existsSync as existsSync26, mkdirSync as mkdirSync8 } from "fs";
18904
+ import { existsSync as existsSync27, mkdirSync as mkdirSync8 } from "fs";
18899
18905
  import { join as join31, resolve as resolve27 } from "path";
18900
18906
  import { rm as rm5 } from "fs/promises";
18901
18907
  var {build: bunBuild3 } = globalThis.Bun;
@@ -18909,7 +18915,7 @@ var resolveJsxDevRuntimeCompatPath = () => {
18909
18915
  resolve27(import.meta.dir, "..", "..", "src", "react", "jsxDevRuntimeCompat.ts")
18910
18916
  ];
18911
18917
  for (const candidate of candidates) {
18912
- if (existsSync26(candidate)) {
18918
+ if (existsSync27(candidate)) {
18913
18919
  return candidate.replace(/\\/g, "/");
18914
18920
  }
18915
18921
  }
@@ -19059,7 +19065,7 @@ var REQUIRED_ANGULAR_SPECIFIERS_BASE, requiredAngularSpecifiers = (jitMode) => j
19059
19065
  }
19060
19066
  return { angular, transitiveRoots };
19061
19067
  }, PARTIAL_DECL_MARKERS, containsPartialDeclarations = (source) => PARTIAL_DECL_MARKERS.some((marker) => source.includes(marker)), collectTransitiveAngularSpecs = async (roots, angularFound) => {
19062
- const { readFileSync: readFileSync22 } = await import("fs");
19068
+ const { readFileSync: readFileSync23 } = await import("fs");
19063
19069
  const transpiler6 = new Bun.Transpiler({ loader: "js" });
19064
19070
  const visited = new Set;
19065
19071
  const frontier = [];
@@ -19080,7 +19086,7 @@ var REQUIRED_ANGULAR_SPECIFIERS_BASE, requiredAngularSpecifiers = (jitMode) => j
19080
19086
  }
19081
19087
  let content;
19082
19088
  try {
19083
- content = readFileSync22(resolved, "utf-8");
19089
+ content = readFileSync23(resolved, "utf-8");
19084
19090
  } catch {
19085
19091
  continue;
19086
19092
  }
@@ -19285,11 +19291,11 @@ var vueSpecifiers, toSafeFileName3 = (specifier) => specifier.replace(/\//g, "_"
19285
19291
  console.warn("\u26A0\uFE0F Vue vendor build had errors:", result.logs);
19286
19292
  return;
19287
19293
  }
19288
- const { readFileSync: readFileSync22, writeFileSync: writeFileSync9, readdirSync: readdirSync5 } = await import("fs");
19294
+ const { readFileSync: readFileSync23, writeFileSync: writeFileSync9, readdirSync: readdirSync5 } = await import("fs");
19289
19295
  const files = readdirSync5(vendorDir).filter((f2) => f2.endsWith(".js"));
19290
19296
  for (const file5 of files) {
19291
19297
  const filePath = join33(vendorDir, file5);
19292
- const content = readFileSync22(filePath, "utf-8");
19298
+ const content = readFileSync23(filePath, "utf-8");
19293
19299
  if (!content.includes("__VUE_HMR_RUNTIME__"))
19294
19300
  continue;
19295
19301
  const patched = content.replace(/getGlobalThis\(\)\.__VUE_HMR_RUNTIME__\s*=\s*\{/, "getGlobalThis().__VUE_HMR_RUNTIME__ = getGlobalThis().__VUE_HMR_RUNTIME__ || {");
@@ -19556,9 +19562,9 @@ var init_rewriteImportsPlugin = __esm(() => {
19556
19562
  import {
19557
19563
  copyFileSync as copyFileSync2,
19558
19564
  cpSync,
19559
- existsSync as existsSync27,
19565
+ existsSync as existsSync28,
19560
19566
  mkdirSync as mkdirSync12,
19561
- readFileSync as readFileSync22,
19567
+ readFileSync as readFileSync23,
19562
19568
  rmSync as rmSync2,
19563
19569
  statSync as statSync3,
19564
19570
  writeFileSync as writeFileSync9
@@ -19686,7 +19692,7 @@ var isDev2, isBuildTraceEnabled = () => {
19686
19692
  addWorkerPathIfExists(file5, relPath, workerPaths);
19687
19693
  }
19688
19694
  }, collectWorkerPathsFromFile = (file5, patterns, workerPaths) => {
19689
- const content = readFileSync22(file5, "utf-8");
19695
+ const content = readFileSync23(file5, "utf-8");
19690
19696
  for (const pattern of patterns) {
19691
19697
  collectWorkerPathsFromContent(content, pattern, file5, workerPaths);
19692
19698
  }
@@ -19729,13 +19735,13 @@ var isDev2, isBuildTraceEnabled = () => {
19729
19735
  copyVueDevIndexes(vueDir, vuePagesPath, vueEntries, devIndexDir);
19730
19736
  }
19731
19737
  }, copyReactDevIndexes = (reactIndexesPath, reactPagesPath, devIndexDir, readDir) => {
19732
- if (!existsSync27(reactIndexesPath)) {
19738
+ if (!existsSync28(reactIndexesPath)) {
19733
19739
  return;
19734
19740
  }
19735
19741
  const indexFiles = readDir(reactIndexesPath).filter((file5) => file5.endsWith(".tsx"));
19736
19742
  const pagesRel = relative13(process.cwd(), resolve28(reactPagesPath)).replace(/\\/g, "/");
19737
19743
  for (const file5 of indexFiles) {
19738
- let content = readFileSync22(join36(reactIndexesPath, file5), "utf-8");
19744
+ let content = readFileSync23(join36(reactIndexesPath, file5), "utf-8");
19739
19745
  content = content.replace(/from\s*['"]([^'"]*\/pages\/([^'"]+))['"]/g, (_match, _fullPath, componentName) => `from '/@src/${pagesRel}/${componentName}'`);
19740
19746
  writeFileSync9(join36(devIndexDir, file5), content);
19741
19747
  }
@@ -19745,9 +19751,9 @@ var isDev2, isBuildTraceEnabled = () => {
19745
19751
  for (const entry of sveltePageEntries) {
19746
19752
  const name = basename11(entry).replace(/\.svelte(\.(ts|js))?$/, "");
19747
19753
  const indexFile = join36(svelteIndexDir, "pages", `${name}.js`);
19748
- if (!existsSync27(indexFile))
19754
+ if (!existsSync28(indexFile))
19749
19755
  continue;
19750
- let content = readFileSync22(indexFile, "utf-8");
19756
+ let content = readFileSync23(indexFile, "utf-8");
19751
19757
  const srcRel = relative13(process.cwd(), resolve28(entry)).replace(/\\/g, "/");
19752
19758
  content = content.replace(/import\s+Component\s+from\s+['"]([^'"]+)['"]/, `import Component from "/@src/${srcRel}"`);
19753
19759
  writeFileSync9(join36(devIndexDir, `${name}.svelte.js`), content);
@@ -19758,9 +19764,9 @@ var isDev2, isBuildTraceEnabled = () => {
19758
19764
  for (const entry of vuePageEntries) {
19759
19765
  const name = basename11(entry, ".vue");
19760
19766
  const indexFile = join36(vueIndexDir, `${name}.js`);
19761
- if (!existsSync27(indexFile))
19767
+ if (!existsSync28(indexFile))
19762
19768
  continue;
19763
- let content = readFileSync22(indexFile, "utf-8");
19769
+ let content = readFileSync23(indexFile, "utf-8");
19764
19770
  const srcRel = relative13(process.cwd(), resolve28(entry)).replace(/\\/g, "/");
19765
19771
  content = content.replace(/import\s+Comp(?:\s*,\s*\*\s+as\s+\w+)?\s+from\s+['"]([^'"]+)['"]/, (match) => match.replace(/from\s+['"][^'"]+['"]/, `from "/@src/${srcRel}"`));
19766
19772
  writeFileSync9(join36(devIndexDir, `${name}.vue.js`), content);
@@ -19811,7 +19817,7 @@ var isDev2, isBuildTraceEnabled = () => {
19811
19817
  }
19812
19818
  return result;
19813
19819
  }, VUE_HMR_RUNTIME, injectVueComposableTracking = (outputPath, projectRoot) => {
19814
- let content = readFileSync22(outputPath, "utf-8");
19820
+ let content = readFileSync23(outputPath, "utf-8");
19815
19821
  const usePattern = /^var\s+(use[A-Z]\w*)\s*=/gm;
19816
19822
  const useNames = [];
19817
19823
  let match;
@@ -19861,7 +19867,7 @@ ${content.slice(firstUseIdx)}`;
19861
19867
  }, rewriteUrlReferences = (outputPaths, urlFileMap) => {
19862
19868
  const urlPattern = /new\s+URL\(\s*["'](\.\.?\/[^"']+)["']\s*,\s*import\.meta\.url\s*\)/g;
19863
19869
  for (const outputPath of outputPaths) {
19864
- let content = readFileSync22(outputPath, "utf-8");
19870
+ let content = readFileSync23(outputPath, "utf-8");
19865
19871
  let changed = false;
19866
19872
  content = content.replace(urlPattern, (_match, relPath) => {
19867
19873
  const targetName = basename11(relPath);
@@ -20989,7 +20995,7 @@ ${content.slice(firstUseIdx)}`;
20989
20995
  const injectHMRIntoHTMLFile = (filePath, framework) => {
20990
20996
  if (!hmrClientBundle)
20991
20997
  return;
20992
- let html = readFileSync22(filePath, "utf-8");
20998
+ let html = readFileSync23(filePath, "utf-8");
20993
20999
  if (html.includes("data-hmr-client"))
20994
21000
  return;
20995
21001
  const tag = `<script>window.__HMR_FRAMEWORK__="${framework}";</script><script data-hmr-client>${hmrClientBundle}</script>`;
@@ -21220,7 +21226,7 @@ var init_build = __esm(() => {
21220
21226
  });
21221
21227
 
21222
21228
  // src/build/buildEmberVendor.ts
21223
- import { mkdirSync as mkdirSync13, existsSync as existsSync28 } from "fs";
21229
+ import { mkdirSync as mkdirSync13, existsSync as existsSync29 } from "fs";
21224
21230
  import { join as join37 } from "path";
21225
21231
  import { rm as rm9 } from "fs/promises";
21226
21232
  var {build: bunBuild8 } = globalThis.Bun;
@@ -21274,7 +21280,7 @@ export const importSync = (specifier) => {
21274
21280
  return { resolveTo: specifier, specifier };
21275
21281
  }
21276
21282
  const emberInternalPath = join37(cwd2, "node_modules/ember-source/dist/packages", specifier, "index.js");
21277
- if (!existsSync28(emberInternalPath)) {
21283
+ if (!existsSync29(emberInternalPath)) {
21278
21284
  throw new Error(`Ember vendor build: cannot find ${specifier} at ${emberInternalPath}. ` + `Is ember-source installed and at least 6.12?`);
21279
21285
  }
21280
21286
  return { resolveTo: emberInternalPath, specifier };
@@ -21306,7 +21312,7 @@ export const importSync = (specifier) => {
21306
21312
  return;
21307
21313
  }
21308
21314
  const internal = join37(cwd2, "node_modules/ember-source/dist/packages", args.path, "index.js");
21309
- if (existsSync28(internal)) {
21315
+ if (existsSync29(internal)) {
21310
21316
  return { path: internal };
21311
21317
  }
21312
21318
  return;
@@ -21375,7 +21381,7 @@ __export(exports_dependencyGraph, {
21375
21381
  buildInitialDependencyGraph: () => buildInitialDependencyGraph,
21376
21382
  addFileToGraph: () => addFileToGraph
21377
21383
  });
21378
- import { existsSync as existsSync29, readFileSync as readFileSync23 } from "fs";
21384
+ import { existsSync as existsSync30, readFileSync as readFileSync24 } from "fs";
21379
21385
  var {Glob: Glob9 } = globalThis.Bun;
21380
21386
  import { resolve as resolve29 } from "path";
21381
21387
  var emptyDependencyGraph, tsTranspiler, jsTranspiler, loaderForFile = (filePath) => {
@@ -21405,10 +21411,10 @@ var emptyDependencyGraph, tsTranspiler, jsTranspiler, loaderForFile = (filePath)
21405
21411
  ];
21406
21412
  for (const ext of extensions) {
21407
21413
  const withExt = normalized + ext;
21408
- if (existsSync29(withExt))
21414
+ if (existsSync30(withExt))
21409
21415
  return withExt;
21410
21416
  }
21411
- if (existsSync29(normalized))
21417
+ if (existsSync30(normalized))
21412
21418
  return normalized;
21413
21419
  return null;
21414
21420
  }, clearExistingDependents = (graph, normalizedPath) => {
@@ -21423,7 +21429,7 @@ var emptyDependencyGraph, tsTranspiler, jsTranspiler, loaderForFile = (filePath)
21423
21429
  }
21424
21430
  }, addFileToGraph = (graph, filePath) => {
21425
21431
  const normalizedPath = resolve29(filePath);
21426
- if (!existsSync29(normalizedPath))
21432
+ if (!existsSync30(normalizedPath))
21427
21433
  return;
21428
21434
  const dependencies = extractDependencies(normalizedPath);
21429
21435
  clearExistingDependents(graph, normalizedPath);
@@ -21449,7 +21455,7 @@ var emptyDependencyGraph, tsTranspiler, jsTranspiler, loaderForFile = (filePath)
21449
21455
  }, IGNORED_SEGMENTS, buildInitialDependencyGraph = (graph, directories) => {
21450
21456
  const processedFiles = new Set;
21451
21457
  const glob = new Glob9("**/*.{ts,tsx,js,jsx,vue,svelte,html,htm}");
21452
- const resolvedDirs = directories.map((dir) => resolve29(dir)).filter((dir) => existsSync29(dir));
21458
+ const resolvedDirs = directories.map((dir) => resolve29(dir)).filter((dir) => existsSync30(dir));
21453
21459
  const allFiles = resolvedDirs.flatMap((dir) => Array.from(glob.scanSync({ absolute: true, cwd: dir })));
21454
21460
  for (const file5 of allFiles) {
21455
21461
  const fullPath = resolve29(file5);
@@ -21546,15 +21552,15 @@ var emptyDependencyGraph, tsTranspiler, jsTranspiler, loaderForFile = (filePath)
21546
21552
  const lowerPath = filePath.toLowerCase();
21547
21553
  const isSvelteOrVue = lowerPath.endsWith(".svelte") || lowerPath.endsWith(".vue");
21548
21554
  if (loader === "html") {
21549
- const content = readFileSync23(filePath, "utf-8");
21555
+ const content = readFileSync24(filePath, "utf-8");
21550
21556
  return extractHtmlDependencies(filePath, content);
21551
21557
  }
21552
21558
  if (loader === "tsx" || loader === "js") {
21553
- const content = readFileSync23(filePath, "utf-8");
21559
+ const content = readFileSync24(filePath, "utf-8");
21554
21560
  return extractJsDependencies(filePath, content, loader);
21555
21561
  }
21556
21562
  if (isSvelteOrVue) {
21557
- const content = readFileSync23(filePath, "utf-8");
21563
+ const content = readFileSync24(filePath, "utf-8");
21558
21564
  return extractSvelteVueDependencies(filePath, content);
21559
21565
  }
21560
21566
  return [];
@@ -21697,7 +21703,7 @@ var init_clientManager = __esm(() => {
21697
21703
  });
21698
21704
 
21699
21705
  // src/dev/pathUtils.ts
21700
- import { existsSync as existsSync30, readdirSync as readdirSync5, readFileSync as readFileSync24 } from "fs";
21706
+ import { existsSync as existsSync31, readdirSync as readdirSync5, readFileSync as readFileSync25 } from "fs";
21701
21707
  import { dirname as dirname20, resolve as resolve31 } from "path";
21702
21708
  var STYLE_EXTENSION_PATTERN2, detectFramework = (filePath, resolved) => {
21703
21709
  if (shouldIgnorePath(filePath, resolved)) {
@@ -21797,7 +21803,7 @@ var STYLE_EXTENSION_PATTERN2, detectFramework = (filePath, resolved) => {
21797
21803
  }
21798
21804
  let source;
21799
21805
  try {
21800
- source = readFileSync24(full, "utf8");
21806
+ source = readFileSync25(full, "utf8");
21801
21807
  } catch {
21802
21808
  continue;
21803
21809
  }
@@ -21871,7 +21877,7 @@ var STYLE_EXTENSION_PATTERN2, detectFramework = (filePath, resolved) => {
21871
21877
  push(cfg.stylesDir);
21872
21878
  for (const candidate of ["src", "db", "assets", "styles"]) {
21873
21879
  const abs = normalizePath(resolve31(cwd2, candidate));
21874
- if (existsSync30(abs) && !roots.includes(abs))
21880
+ if (existsSync31(abs) && !roots.includes(abs))
21875
21881
  roots.push(abs);
21876
21882
  }
21877
21883
  try {
@@ -21956,7 +21962,7 @@ var init_pathUtils = __esm(() => {
21956
21962
 
21957
21963
  // src/dev/fileWatcher.ts
21958
21964
  import { watch } from "fs";
21959
- import { existsSync as existsSync31, readdirSync as readdirSync6, statSync as statSync4 } from "fs";
21965
+ import { existsSync as existsSync32, readdirSync as readdirSync6, statSync as statSync4 } from "fs";
21960
21966
  import { dirname as dirname21, join as join38, resolve as resolve32 } from "path";
21961
21967
  var safeRemoveFromGraph = (graph, fullPath) => {
21962
21968
  try {
@@ -22024,12 +22030,12 @@ var safeRemoveFromGraph = (graph, fullPath) => {
22024
22030
  if (shouldIgnorePath(fullPath, state.resolvedPaths)) {
22025
22031
  return;
22026
22032
  }
22027
- if (event === "rename" && !existsSync31(fullPath)) {
22033
+ if (event === "rename" && !existsSync32(fullPath)) {
22028
22034
  safeRemoveFromGraph(state.dependencyGraph, fullPath);
22029
22035
  onFileChange(fullPath);
22030
22036
  return;
22031
22037
  }
22032
- if (existsSync31(fullPath)) {
22038
+ if (existsSync32(fullPath)) {
22033
22039
  onFileChange(fullPath);
22034
22040
  safeAddToGraph(state.dependencyGraph, fullPath);
22035
22041
  }
@@ -22039,7 +22045,7 @@ var safeRemoveFromGraph = (graph, fullPath) => {
22039
22045
  const stylesDir = state.resolvedPaths?.stylesDir;
22040
22046
  paths.forEach((path) => {
22041
22047
  const absolutePath = resolve32(path).replace(/\\/g, "/");
22042
- if (!existsSync31(absolutePath)) {
22048
+ if (!existsSync32(absolutePath)) {
22043
22049
  return;
22044
22050
  }
22045
22051
  const isStylesDir = Boolean(stylesDir && absolutePath.startsWith(stylesDir));
@@ -22050,7 +22056,7 @@ var safeRemoveFromGraph = (graph, fullPath) => {
22050
22056
  const stylesDir = state.resolvedPaths?.stylesDir;
22051
22057
  watchPaths.forEach((path) => {
22052
22058
  const absolutePath = resolve32(path).replace(/\\/g, "/");
22053
- if (!existsSync31(absolutePath)) {
22059
+ if (!existsSync32(absolutePath)) {
22054
22060
  return;
22055
22061
  }
22056
22062
  const isStylesDir = Boolean(stylesDir && absolutePath.startsWith(stylesDir));
@@ -22172,10 +22178,10 @@ var init_assetStore = __esm(() => {
22172
22178
  });
22173
22179
 
22174
22180
  // src/dev/fileHashTracker.ts
22175
- import { readFileSync as readFileSync25 } from "fs";
22181
+ import { readFileSync as readFileSync26 } from "fs";
22176
22182
  var computeFileHash = (filePath) => {
22177
22183
  try {
22178
- const fileContent = readFileSync25(filePath);
22184
+ const fileContent = readFileSync26(filePath);
22179
22185
  return Number(Bun.hash(fileContent));
22180
22186
  } catch {
22181
22187
  return UNFOUND_INDEX;
@@ -22389,7 +22395,7 @@ __export(exports_resolveOwningComponents, {
22389
22395
  resolveDescendantsOfParent: () => resolveDescendantsOfParent,
22390
22396
  invalidateResourceIndex: () => invalidateResourceIndex
22391
22397
  });
22392
- import { readdirSync as readdirSync7, readFileSync as readFileSync26, statSync as statSync5 } from "fs";
22398
+ import { readdirSync as readdirSync7, readFileSync as readFileSync27, statSync as statSync5 } from "fs";
22393
22399
  import { dirname as dirname22, extname as extname9, join as join39, resolve as resolve36 } from "path";
22394
22400
  import ts15 from "typescript";
22395
22401
  var ENTITY_DECORATORS, isAngularSourceFile = (file5) => file5.endsWith(".ts") || file5.endsWith(".tsx"), walkAngularSourceFiles = (root) => {
@@ -22449,7 +22455,7 @@ var ENTITY_DECORATORS, isAngularSourceFile = (file5) => file5.endsWith(".ts") ||
22449
22455
  }, parseDecoratedClasses = (filePath) => {
22450
22456
  let source;
22451
22457
  try {
22452
- source = readFileSync26(filePath, "utf8");
22458
+ source = readFileSync27(filePath, "utf8");
22453
22459
  } catch {
22454
22460
  return [];
22455
22461
  }
@@ -22539,7 +22545,7 @@ var ENTITY_DECORATORS, isAngularSourceFile = (file5) => file5.endsWith(".ts") ||
22539
22545
  }, indexByRoot, resolveParentClassFile = (parentName, childFilePath, angularRoot) => {
22540
22546
  let source;
22541
22547
  try {
22542
- source = readFileSync26(childFilePath, "utf8");
22548
+ source = readFileSync27(childFilePath, "utf8");
22543
22549
  } catch {
22544
22550
  return null;
22545
22551
  }
@@ -22777,7 +22783,7 @@ __export(exports_moduleServer, {
22777
22783
  createModuleServer: () => createModuleServer,
22778
22784
  SRC_URL_PREFIX: () => SRC_URL_PREFIX
22779
22785
  });
22780
- import { existsSync as existsSync32, readFileSync as readFileSync27, statSync as statSync6 } from "fs";
22786
+ import { existsSync as existsSync33, readFileSync as readFileSync28, realpathSync as realpathSync3, statSync as statSync6 } from "fs";
22781
22787
  import { basename as basename13, dirname as dirname23, extname as extname10, join as join40, resolve as resolve37, relative as relative14 } from "path";
22782
22788
  var SRC_PREFIX = "/@src/", jsTranspiler2, tsTranspiler2, tsxTranspiler, TRANSPILABLE, ALL_EXPORTS_RE, STRING_CONTENTS_RE, preserveTypeExports = (originalSource, transpiled, valueExports) => {
22783
22789
  const codeOnly = originalSource.replace(STRING_CONTENTS_RE, '""');
@@ -22798,8 +22804,13 @@ var SRC_PREFIX = "/@src/", jsTranspiler2, tsTranspiler2, tsxTranspiler, TRANSPIL
22798
22804
  ${stubs}
22799
22805
  `;
22800
22806
  }, resolveRelativeExtension = (srcPath, projectRoot, extensions) => {
22801
- const found = extensions.find((ext) => existsSync32(resolve37(projectRoot, srcPath + ext)));
22802
- return found ? srcPath + found : srcPath;
22807
+ const directHit = extensions.find((ext) => existsSync33(resolve37(projectRoot, srcPath + ext)));
22808
+ if (directHit)
22809
+ return srcPath + directHit;
22810
+ const indexHit = extensions.find((ext) => existsSync33(resolve37(projectRoot, srcPath, `index${ext}`)));
22811
+ if (indexHit)
22812
+ return `${srcPath}/index${indexHit}`;
22813
+ return srcPath;
22803
22814
  }, IMPORT_EXTENSIONS, SIDE_EFFECT_EXTENSIONS, MODULE_EXTENSIONS, RESOLVED_MODULE_EXTENSIONS, REACT_EXTENSIONS, escapeRegex3 = (str) => str.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"), buildImportRewriter = (vendorPaths) => {
22804
22815
  const entries = Object.entries(vendorPaths).sort(([a], [b2]) => b2.length - a.length);
22805
22816
  if (entries.length === 0)
@@ -22851,12 +22862,12 @@ ${stubs}
22851
22862
  if (!subpath) {
22852
22863
  const pkgDir = resolve37(projectRoot, "node_modules", packageName ?? "");
22853
22864
  const pkgJsonPath = join40(pkgDir, "package.json");
22854
- if (existsSync32(pkgJsonPath)) {
22855
- const pkg = JSON.parse(readFileSync27(pkgJsonPath, "utf-8"));
22865
+ if (existsSync33(pkgJsonPath)) {
22866
+ const pkg = JSON.parse(readFileSync28(pkgJsonPath, "utf-8"));
22856
22867
  const esmEntry = typeof pkg.module === "string" && pkg.module || typeof pkg.browser === "string" && pkg.browser;
22857
22868
  if (esmEntry) {
22858
22869
  const resolved = resolve37(pkgDir, esmEntry);
22859
- if (existsSync32(resolved))
22870
+ if (existsSync33(resolved))
22860
22871
  return relative14(projectRoot, resolved);
22861
22872
  }
22862
22873
  }
@@ -22953,7 +22964,7 @@ ${code}`;
22953
22964
  reactFastRefreshWarningEmitted = true;
22954
22965
  logWarn("React HMR is blocked: this Bun build ignores " + "`reactFastRefresh` on Bun.Transpiler, so component state " + "cannot be preserved across edits. Tracking " + "https://github.com/oven-sh/bun/pull/28312 \u2014 if it still has " + "not merged, leave a \uD83D\uDC4D on the PR so the Bun team knows it " + "is blocking you. Until then, React edits trigger a full " + "reload instead of a fast refresh.");
22955
22966
  }, transformReactFile = (filePath, projectRoot, rewriter) => {
22956
- const raw = readFileSync27(filePath, "utf-8");
22967
+ const raw = readFileSync28(filePath, "utf-8");
22957
22968
  const valueExports = tsxTranspiler.scan(raw).exports;
22958
22969
  let transpiled = reactTranspiler.transformSync(raw);
22959
22970
  transpiled = preserveTypeExports(raw, transpiled, valueExports);
@@ -22969,7 +22980,7 @@ ${transpiled}`;
22969
22980
  transpiled += buildIslandMetadataExports(raw);
22970
22981
  return rewriteImports(transpiled, filePath, projectRoot, rewriter);
22971
22982
  }, transformPlainFile = (filePath, projectRoot, rewriter, vueDir) => {
22972
- const raw = readFileSync27(filePath, "utf-8");
22983
+ const raw = readFileSync28(filePath, "utf-8");
22973
22984
  const ext = extname10(filePath);
22974
22985
  const isTS = ext === ".ts" || ext === ".tsx";
22975
22986
  const isTSX = ext === ".tsx" || ext === ".jsx";
@@ -23135,7 +23146,7 @@ ${code}`;
23135
23146
  ` + ` var __hmr_accept = function(cb) { window.__SVELTE_HMR_ACCEPT__[${JSON.stringify(moduleUrl)}] = cb; };`);
23136
23147
  return code.replace(/import\.meta\.hot\.accept\(/g, "__hmr_accept(");
23137
23148
  }, transformSvelteFile = async (filePath, projectRoot, rewriter, stylePreprocessors) => {
23138
- const raw = readFileSync27(filePath, "utf-8");
23149
+ const raw = readFileSync28(filePath, "utf-8");
23139
23150
  if (!svelteCompiler) {
23140
23151
  svelteCompiler = await import("svelte/compiler");
23141
23152
  }
@@ -23197,7 +23208,7 @@ export default __script__;`;
23197
23208
  return `${cssInjection}
23198
23209
  ${code}`;
23199
23210
  }, transformVueFile = async (filePath, projectRoot, rewriter, vueDir, stylePreprocessors) => {
23200
- const rawSource = readFileSync27(filePath, "utf-8");
23211
+ const rawSource = readFileSync28(filePath, "utf-8");
23201
23212
  const raw = addAutoRouterSetupApp(rawSource);
23202
23213
  if (!vueCompiler) {
23203
23214
  vueCompiler = await import("@vue/compiler-sfc");
@@ -23207,6 +23218,11 @@ ${code}`;
23207
23218
  const { descriptor } = vueCompiler.parse(raw, { filename: filePath });
23208
23219
  const hasScript = descriptor.script || descriptor.scriptSetup;
23209
23220
  const compiledScript = hasScript ? vueCompiler.compileScript(descriptor, {
23221
+ fs: {
23222
+ fileExists: existsSync33,
23223
+ readFile: (file5) => existsSync33(file5) ? readFileSync28(file5, "utf-8") : undefined,
23224
+ realpath: realpathSync3
23225
+ },
23210
23226
  id: componentId,
23211
23227
  inlineTemplate: false
23212
23228
  }) : { bindings: {}, content: "export default {};" };
@@ -23235,11 +23251,11 @@ ${code}`;
23235
23251
  `);
23236
23252
  return result;
23237
23253
  }, resolveSvelteModulePath = (path) => {
23238
- if (existsSync32(path))
23254
+ if (existsSync33(path))
23239
23255
  return path;
23240
- if (existsSync32(`${path}.ts`))
23256
+ if (existsSync33(`${path}.ts`))
23241
23257
  return `${path}.ts`;
23242
- if (existsSync32(`${path}.js`))
23258
+ if (existsSync33(`${path}.js`))
23243
23259
  return `${path}.js`;
23244
23260
  return path;
23245
23261
  }, jsResponse = (body) => {
@@ -23252,7 +23268,7 @@ ${code}`;
23252
23268
  }
23253
23269
  });
23254
23270
  }, handleCssRequest = (filePath) => {
23255
- const raw = readFileSync27(filePath, "utf-8");
23271
+ const raw = readFileSync28(filePath, "utf-8");
23256
23272
  const escaped = raw.replace(/\\/g, "\\\\").replace(/`/g, "\\`").replace(/\$/g, "\\$");
23257
23273
  return [
23258
23274
  `const style = document.createElement('style');`,
@@ -23390,7 +23406,7 @@ export default {};
23390
23406
  return { ext, filePath: resolveSvelteModulePath(filePath) };
23391
23407
  if (ext)
23392
23408
  return { ext, filePath };
23393
- const found = MODULE_EXTENSIONS.find((candidate) => existsSync32(filePath + candidate));
23409
+ const found = MODULE_EXTENSIONS.find((candidate) => existsSync33(filePath + candidate));
23394
23410
  if (!found)
23395
23411
  return { ext, filePath };
23396
23412
  const resolved = filePath + found;
@@ -23910,7 +23926,7 @@ var handleHTMXUpdate = async (htmxFilePath) => {
23910
23926
  var init_simpleHTMXHMR = () => {};
23911
23927
 
23912
23928
  // src/dev/rebuildTrigger.ts
23913
- import { existsSync as existsSync33, rmSync as rmSync3 } from "fs";
23929
+ import { existsSync as existsSync34, rmSync as rmSync3 } from "fs";
23914
23930
  import { basename as basename14, dirname as dirname25, join as join41, relative as relative16, resolve as resolve41, sep as sep4 } from "path";
23915
23931
  var moduleServerPromise, getModuleServer = () => moduleServerPromise, runSequentially = (items, action) => items.reduce((chain, item) => chain.then(() => action(item)), Promise.resolve()), getStyleTransformConfig = (config) => createStyleTransformConfig(config.stylePreprocessors, config.postcss), recompileTailwindForFastPath = async (state, config, files) => {
23916
23932
  if (!config.tailwind)
@@ -24010,7 +24026,7 @@ var moduleServerPromise, getModuleServer = () => moduleServerPromise, runSequent
24010
24026
  detectedFw = detected !== "ignored" ? detected : affectedFrameworks[0];
24011
24027
  }
24012
24028
  return { ...parsed, framework: detectedFw };
24013
- }, isValidDeletedAffectedFile = (affectedFile, deletedPathResolved, processedFiles) => affectedFile !== deletedPathResolved && !processedFiles.has(affectedFile) && existsSync33(affectedFile), FRAMEWORK_DIR_KEYS_FOR_CLEANUP, removeStaleGenerated = (state, deletedFile) => {
24029
+ }, isValidDeletedAffectedFile = (affectedFile, deletedPathResolved, processedFiles) => affectedFile !== deletedPathResolved && !processedFiles.has(affectedFile) && existsSync34(affectedFile), FRAMEWORK_DIR_KEYS_FOR_CLEANUP, removeStaleGenerated = (state, deletedFile) => {
24014
24030
  const config = state.config;
24015
24031
  const cwd2 = process.cwd();
24016
24032
  const absDeleted = resolve41(deletedFile).replace(/\\/g, "/");
@@ -24056,7 +24072,7 @@ var moduleServerPromise, getModuleServer = () => moduleServerPromise, runSequent
24056
24072
  if (!dependents || dependents.size === 0) {
24057
24073
  return;
24058
24074
  }
24059
- const dependentFiles = Array.from(dependents).filter((file5) => existsSync33(file5));
24075
+ const dependentFiles = Array.from(dependents).filter((file5) => existsSync34(file5));
24060
24076
  if (dependentFiles.length === 0) {
24061
24077
  return;
24062
24078
  }
@@ -24072,7 +24088,7 @@ var moduleServerPromise, getModuleServer = () => moduleServerPromise, runSequent
24072
24088
  try {
24073
24089
  const affectedFiles = getAffectedFiles(state.dependencyGraph, normalizedFilePath);
24074
24090
  affectedFiles.forEach((affectedFile) => {
24075
- if (!processedFiles.has(affectedFile) && affectedFile !== normalizedFilePath && existsSync33(affectedFile)) {
24091
+ if (!processedFiles.has(affectedFile) && affectedFile !== normalizedFilePath && existsSync34(affectedFile)) {
24076
24092
  validFiles.push(affectedFile);
24077
24093
  processedFiles.add(affectedFile);
24078
24094
  }
@@ -24097,7 +24113,7 @@ var moduleServerPromise, getModuleServer = () => moduleServerPromise, runSequent
24097
24113
  collectChangedFileAffected(state, normalizedFilePath, processedFiles, validFiles);
24098
24114
  }, processFilePathSet = (state, filePathSet, processedFiles, validFiles) => {
24099
24115
  filePathSet.forEach((filePathInSet) => {
24100
- if (!existsSync33(filePathInSet)) {
24116
+ if (!existsSync34(filePathInSet)) {
24101
24117
  collectDeletedFileAffected(state, filePathInSet, processedFiles, validFiles);
24102
24118
  return;
24103
24119
  }
@@ -24351,7 +24367,7 @@ var moduleServerPromise, getModuleServer = () => moduleServerPromise, runSequent
24351
24367
  return componentFile;
24352
24368
  }
24353
24369
  const tsCounterpart = componentFile.replace(/\.html$/, ".ts");
24354
- if (existsSync33(tsCounterpart)) {
24370
+ if (existsSync34(tsCounterpart)) {
24355
24371
  return tsCounterpart;
24356
24372
  }
24357
24373
  if (!graph)
@@ -26411,7 +26427,7 @@ var toSafeFileName6 = (specifier) => {
26411
26427
  framework: Array.from(framework).filter(isResolvable4)
26412
26428
  };
26413
26429
  }, collectTransitiveImports = async (specs, alreadyVendored, alreadyScanned) => {
26414
- const { readFileSync: readFileSync28 } = await import("fs");
26430
+ const { readFileSync: readFileSync29 } = await import("fs");
26415
26431
  const transpiler6 = new Bun.Transpiler({ loader: "js" });
26416
26432
  const newSpecs = new Set;
26417
26433
  for (const spec of specs) {
@@ -26426,7 +26442,7 @@ var toSafeFileName6 = (specifier) => {
26426
26442
  }
26427
26443
  let content;
26428
26444
  try {
26429
- content = readFileSync28(resolved, "utf-8");
26445
+ content = readFileSync29(resolved, "utf-8");
26430
26446
  } catch {
26431
26447
  continue;
26432
26448
  }
@@ -27232,17 +27248,17 @@ __export(exports_devtoolsJson, {
27232
27248
  normalizeDevtoolsWorkspaceRoot: () => normalizeDevtoolsWorkspaceRoot,
27233
27249
  devtoolsJson: () => devtoolsJson
27234
27250
  });
27235
- import { existsSync as existsSync34, mkdirSync as mkdirSync15, readFileSync as readFileSync28, writeFileSync as writeFileSync10 } from "fs";
27251
+ import { existsSync as existsSync35, mkdirSync as mkdirSync15, readFileSync as readFileSync29, writeFileSync as writeFileSync10 } from "fs";
27236
27252
  import { dirname as dirname26, join as join43, resolve as resolve43 } from "path";
27237
27253
  import { Elysia as Elysia3 } from "elysia";
27238
27254
  var ENDPOINT = "/.well-known/appspecific/com.chrome.devtools.json", UUID_CACHE_KEY = "__absoluteDevtoolsWorkspaceUuid", getGlobalUuid = () => Reflect.get(globalThis, UUID_CACHE_KEY), setGlobalUuid = (uuid) => {
27239
27255
  Reflect.set(globalThis, UUID_CACHE_KEY, uuid);
27240
27256
  return uuid;
27241
27257
  }, 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) => resolve43(uuidCachePath ?? join43(buildDir, ".absolute", "chrome-devtools-workspace-uuid")), readCachedUuid = (cachePath) => {
27242
- if (!existsSync34(cachePath))
27258
+ if (!existsSync35(cachePath))
27243
27259
  return null;
27244
27260
  try {
27245
- const value = readFileSync28(cachePath, "utf-8").trim();
27261
+ const value = readFileSync29(cachePath, "utf-8").trim();
27246
27262
  return isUuidV4(value) ? value : null;
27247
27263
  } catch {
27248
27264
  return null;
@@ -27292,13 +27308,13 @@ var exports_imageOptimizer = {};
27292
27308
  __export(exports_imageOptimizer, {
27293
27309
  imageOptimizer: () => imageOptimizer
27294
27310
  });
27295
- import { existsSync as existsSync35 } from "fs";
27311
+ import { existsSync as existsSync36 } from "fs";
27296
27312
  import { resolve as resolve44 } from "path";
27297
27313
  import { Elysia as Elysia4 } from "elysia";
27298
27314
  var DEFAULT_CACHE_TTL_SECONDS = 60, MS_PER_SECOND = 1000, MAX_QUALITY = 100, avifInProgress, safeResolve = (path, baseDir) => {
27299
27315
  try {
27300
27316
  const resolved = validateSafePath(path, baseDir);
27301
- if (existsSync35(resolved))
27317
+ if (existsSync36(resolved))
27302
27318
  return resolved;
27303
27319
  return null;
27304
27320
  } catch {
@@ -27512,7 +27528,7 @@ __export(exports_prerender, {
27512
27528
  prerender: () => prerender,
27513
27529
  PRERENDER_BYPASS_HEADER: () => PRERENDER_BYPASS_HEADER
27514
27530
  });
27515
- import { mkdirSync as mkdirSync16, readFileSync as readFileSync29 } from "fs";
27531
+ import { mkdirSync as mkdirSync16, readFileSync as readFileSync30 } from "fs";
27516
27532
  import { join as join44 } from "path";
27517
27533
  var SERVER_OUTPUT_LIMIT = 4000, STARTUP_POLL_INTERVAL_MS = 100, DEFAULT_STARTUP_TIMEOUT_MS = 30000, PRERENDER_BYPASS_HEADER = "X-Absolute-Prerender-Bypass", routeToFilename = (route) => route === "/" ? "index.html" : `${route.slice(1).replace(/\//g, "-")}.html`, writeTimestamp = async (htmlPath) => {
27518
27534
  const metaPath = htmlPath.replace(/\.html$/, ".meta");
@@ -27520,7 +27536,7 @@ var SERVER_OUTPUT_LIMIT = 4000, STARTUP_POLL_INTERVAL_MS = 100, DEFAULT_STARTUP_
27520
27536
  }, readTimestamp = (htmlPath) => {
27521
27537
  const metaPath = htmlPath.replace(/\.html$/, ".meta");
27522
27538
  try {
27523
- const content = readFileSync29(metaPath, "utf-8");
27539
+ const content = readFileSync30(metaPath, "utf-8");
27524
27540
  return Number(content) || 0;
27525
27541
  } catch {
27526
27542
  return 0;
@@ -27711,14 +27727,14 @@ __export(exports_serverEntryWatcher, {
27711
27727
  startServerEntryWatcher: () => startServerEntryWatcher,
27712
27728
  isAtomicWriteTemp: () => isAtomicWriteTemp
27713
27729
  });
27714
- import { existsSync as existsSync38, statSync as statSync8, watch as watch2 } from "fs";
27730
+ import { existsSync as existsSync39, statSync as statSync8, watch as watch2 } from "fs";
27715
27731
  import { createRequire as createRequire2 } from "module";
27716
27732
  import { dirname as dirname27, join as join47, resolve as resolve46 } from "path";
27717
27733
  var ATOMIC_RECOVERY_WINDOW_MS = 1000, RELOAD_DEBOUNCE_MS = 80, ATOMIC_WRITE_TEMP_PATTERNS2, isAtomicWriteTemp = (filename) => filename.endsWith(".tmp") || filename.includes(".tmp.") || filename.endsWith("~") || filename.startsWith(".#") || ATOMIC_WRITE_TEMP_PATTERNS2.some((re2) => re2.test(filename)), startServerEntryWatcher = () => {
27718
27734
  if (globalThis.__absoluteEntryWatcherStarted)
27719
27735
  return;
27720
27736
  const main = Bun.main;
27721
- if (!main || !existsSync38(main))
27737
+ if (!main || !existsSync39(main))
27722
27738
  return;
27723
27739
  globalThis.__absoluteEntryWatcherStarted = true;
27724
27740
  const entryPath = resolve46(main);
@@ -28371,7 +28387,7 @@ var handleHTMXPageRequest = async (pagePath) => {
28371
28387
  };
28372
28388
  // src/core/prepare.ts
28373
28389
  init_loadConfig();
28374
- import { existsSync as existsSync36, readdirSync as readdirSync8, readFileSync as readFileSync30 } from "fs";
28390
+ import { existsSync as existsSync37, readdirSync as readdirSync8, readFileSync as readFileSync31 } from "fs";
28375
28391
  import { basename as basename15, join as join45, relative as relative17, resolve as resolve45 } from "path";
28376
28392
  import { Elysia as Elysia5 } from "elysia";
28377
28393
 
@@ -28771,7 +28787,7 @@ var patchManifestIndexes = (manifest, devIndexDir, SRC_URL_PREFIX2) => {
28771
28787
  if (!fileName)
28772
28788
  continue;
28773
28789
  const srcPath = resolve45(devIndexDir, fileName);
28774
- if (!existsSync36(srcPath))
28790
+ if (!existsSync37(srcPath))
28775
28791
  continue;
28776
28792
  const rel = relative17(process.cwd(), srcPath).replace(/\\/g, "/");
28777
28793
  manifest[key] = `${SRC_URL_PREFIX2}${rel}`;
@@ -28879,7 +28895,7 @@ var prepareDev = async (config, buildDir) => {
28879
28895
  };
28880
28896
  var loadPrerenderMap = (prerenderDir) => {
28881
28897
  const map = new Map;
28882
- if (!existsSync36(prerenderDir))
28898
+ if (!existsSync37(prerenderDir))
28883
28899
  return map;
28884
28900
  let entries;
28885
28901
  try {
@@ -28944,7 +28960,7 @@ var prepare = async (configOrPath) => {
28944
28960
  return result;
28945
28961
  }
28946
28962
  stepStartedAt = performance.now();
28947
- const manifest = JSON.parse(readFileSync30(`${buildDir}/manifest.json`, "utf-8"));
28963
+ const manifest = JSON.parse(readFileSync31(`${buildDir}/manifest.json`, "utf-8"));
28948
28964
  setCurrentIslandManifest(manifest);
28949
28965
  if (config.islands?.registry) {
28950
28966
  setCurrentIslandRegistry(await loadIslandRegistry(config.islands.registry));
@@ -28953,8 +28969,8 @@ var prepare = async (configOrPath) => {
28953
28969
  recordStep("load production manifest and island metadata", stepStartedAt);
28954
28970
  stepStartedAt = performance.now();
28955
28971
  const conventionsPath = join45(buildDir, "conventions.json");
28956
- if (existsSync36(conventionsPath)) {
28957
- const conventions2 = JSON.parse(readFileSync30(conventionsPath, "utf-8"));
28972
+ if (existsSync37(conventionsPath)) {
28973
+ const conventions2 = JSON.parse(readFileSync31(conventionsPath, "utf-8"));
28958
28974
  setConventions(conventions2);
28959
28975
  }
28960
28976
  recordStep("load production conventions", stepStartedAt);
@@ -29026,7 +29042,7 @@ import { argv } from "process";
29026
29042
  var {env: env4 } = globalThis.Bun;
29027
29043
 
29028
29044
  // src/dev/devCert.ts
29029
- import { existsSync as existsSync37, mkdirSync as mkdirSync17, readFileSync as readFileSync31, rmSync as rmSync4 } from "fs";
29045
+ import { existsSync as existsSync38, mkdirSync as mkdirSync17, readFileSync as readFileSync32, rmSync as rmSync4 } from "fs";
29030
29046
  import { join as join46 } from "path";
29031
29047
  var CERT_DIR = join46(process.cwd(), ".absolutejs");
29032
29048
  var CERT_PATH = join46(CERT_DIR, "cert.pem");
@@ -29034,10 +29050,10 @@ var KEY_PATH = join46(CERT_DIR, "key.pem");
29034
29050
  var CERT_VALIDITY_DAYS = 365;
29035
29051
  var devLog = (msg) => console.log(`\x1B[2m${new Date().toLocaleTimeString()}\x1B[0m \x1B[36m[dev]\x1B[0m ${msg}`);
29036
29052
  var devWarn = (msg) => console.log(`\x1B[2m${new Date().toLocaleTimeString()}\x1B[0m \x1B[33m[dev]\x1B[0m \x1B[33m${msg}\x1B[0m`);
29037
- var certFilesExist = () => existsSync37(CERT_PATH) && existsSync37(KEY_PATH);
29053
+ var certFilesExist = () => existsSync38(CERT_PATH) && existsSync38(KEY_PATH);
29038
29054
  var isCertExpired = () => {
29039
29055
  try {
29040
- const certPem = readFileSync31(CERT_PATH, "utf-8");
29056
+ const certPem = readFileSync32(CERT_PATH, "utf-8");
29041
29057
  const proc = Bun.spawnSync(["openssl", "x509", "-enddate", "-noout"], {
29042
29058
  stdin: new TextEncoder().encode(certPem)
29043
29059
  });
@@ -29133,8 +29149,8 @@ var loadDevCert = () => {
29133
29149
  return null;
29134
29150
  try {
29135
29151
  return {
29136
- cert: readFileSync31(paths.cert, "utf-8"),
29137
- key: readFileSync31(paths.key, "utf-8")
29152
+ cert: readFileSync32(paths.cert, "utf-8"),
29153
+ key: readFileSync32(paths.key, "utf-8")
29138
29154
  };
29139
29155
  } catch {
29140
29156
  return null;
@@ -29409,7 +29425,7 @@ var generateHeadElement = ({
29409
29425
  };
29410
29426
  // src/utils/defineEnv.ts
29411
29427
  var {env: bunEnv } = globalThis.Bun;
29412
- import { existsSync as existsSync39, readFileSync as readFileSync32 } from "fs";
29428
+ import { existsSync as existsSync40, readFileSync as readFileSync33 } from "fs";
29413
29429
  import { resolve as resolve47 } from "path";
29414
29430
 
29415
29431
  // node_modules/@sinclair/typebox/build/esm/type/guard/value.mjs
@@ -35446,18 +35462,18 @@ ${lines.join(`
35446
35462
  var checkEnvFileSecurity = (properties) => {
35447
35463
  const cwd2 = process.cwd();
35448
35464
  const envPath = resolve47(cwd2, ".env");
35449
- if (!existsSync39(envPath))
35465
+ if (!existsSync40(envPath))
35450
35466
  return;
35451
35467
  const sensitiveKeys = Object.keys(properties).filter(isSensitive);
35452
35468
  if (sensitiveKeys.length === 0)
35453
35469
  return;
35454
- const envContent = readFileSync32(envPath, "utf-8");
35470
+ const envContent = readFileSync33(envPath, "utf-8");
35455
35471
  const presentKeys = sensitiveKeys.filter((key) => envContent.includes(`${key}=`));
35456
35472
  if (presentKeys.length === 0)
35457
35473
  return;
35458
35474
  const gitignorePath = resolve47(cwd2, ".gitignore");
35459
- if (existsSync39(gitignorePath)) {
35460
- const gitignore = readFileSync32(gitignorePath, "utf-8");
35475
+ if (existsSync40(gitignorePath)) {
35476
+ const gitignore = readFileSync33(gitignorePath, "utf-8");
35461
35477
  if (gitignore.split(`
35462
35478
  `).some((line) => line.trim() === ".env"))
35463
35479
  return;
@@ -35698,5 +35714,5 @@ export {
35698
35714
  ANGULAR_INIT_TIMEOUT_MS
35699
35715
  };
35700
35716
 
35701
- //# debugId=42C3C759690AAEFD64756E2164756E21
35717
+ //# debugId=A63C1B6D62AC083364756E2164756E21
35702
35718
  //# sourceMappingURL=index.js.map