@absolutejs/absolute 0.19.0-beta.988 → 0.19.0-beta.989

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/build.js CHANGED
@@ -12966,7 +12966,7 @@ __export(exports_compileVue, {
12966
12966
  compileVue: () => compileVue,
12967
12967
  clearVueHmrCaches: () => clearVueHmrCaches
12968
12968
  });
12969
- import { existsSync as existsSync21 } from "fs";
12969
+ import { existsSync as existsSync21, readFileSync as readFileSync17, realpathSync } from "fs";
12970
12970
  import { mkdir as mkdir5 } from "fs/promises";
12971
12971
  import {
12972
12972
  basename as basename7,
@@ -13106,6 +13106,11 @@ var resolveDevClientDir3 = () => {
13106
13106
  ]);
13107
13107
  const hasScript = descriptor.script || descriptor.scriptSetup;
13108
13108
  const compiledScript = hasScript ? compiler.compileScript(descriptor, {
13109
+ fs: {
13110
+ fileExists: existsSync21,
13111
+ readFile: (file3) => existsSync21(file3) ? readFileSync17(file3, "utf-8") : undefined,
13112
+ realpath: realpathSync
13113
+ },
13109
13114
  id: componentId,
13110
13115
  inlineTemplate: false,
13111
13116
  sourceMap: true
@@ -13924,7 +13929,7 @@ __export(exports_compileAngular, {
13924
13929
  compileAngularFile: () => compileAngularFile,
13925
13930
  compileAngular: () => compileAngular
13926
13931
  });
13927
- import { existsSync as existsSync22, readFileSync as readFileSync17, promises as fs5 } from "fs";
13932
+ import { existsSync as existsSync22, readFileSync as readFileSync18, promises as fs5 } from "fs";
13928
13933
  import { join as join28, basename as basename8, sep as sep3, dirname as dirname14, resolve as resolve21, relative as relative11 } from "path";
13929
13934
  var {Glob: Glob6 } = globalThis.Bun;
13930
13935
  import ts10 from "typescript";
@@ -14261,7 +14266,7 @@ var traceAngularPhase = async (name, fn2, metadata) => {
14261
14266
  const outputPath = resolve21(join28(outDir, relative11(process.cwd(), resolve21(inputPath)).replace(/\.[cm]?[tj]sx?$/, ".js")));
14262
14267
  return [
14263
14268
  outputPath,
14264
- buildIslandMetadataExports(readFileSync17(inputPath, "utf-8"))
14269
+ buildIslandMetadataExports(readFileSync18(inputPath, "utf-8"))
14265
14270
  ];
14266
14271
  })), { entries: inputPaths.length });
14267
14272
  await traceAngularPhase("aot/preload-compiler", () => import("@angular/compiler"));
@@ -14572,7 +14577,7 @@ ${fields}
14572
14577
  if (!existsSync22(templatePath)) {
14573
14578
  throw new Error(`Unable to inline Angular templateUrl "${templateUrlMatch[1]}": file not found at ${templatePath}`);
14574
14579
  }
14575
- const templateRaw2 = readFileSync17(templatePath, "utf-8");
14580
+ const templateRaw2 = readFileSync18(templatePath, "utf-8");
14576
14581
  const lowered2 = lowerAngularDeferSyntax(templateRaw2);
14577
14582
  const escaped2 = escapeTemplateContent(lowered2.template);
14578
14583
  const replacedSource2 = source.slice(0, templateUrlMatch.index) + `template: \`${escaped2}\`` + source.slice(templateUrlMatch.index + templateUrlMatch[0].length);
@@ -14899,7 +14904,7 @@ export const __ABSOLUTE_PAGE_USES_LEGACY_ANIMATIONS__ = true;
14899
14904
  const providersHashInput = providersInjection ? (() => {
14900
14905
  let providersSourceContent = "";
14901
14906
  try {
14902
- providersSourceContent = readFileSync17(providersInjection.appProvidersSource, "utf-8");
14907
+ providersSourceContent = readFileSync18(providersInjection.appProvidersSource, "utf-8");
14903
14908
  } catch {}
14904
14909
  return JSON.stringify({
14905
14910
  basePath: pageInjectionForHash?.basePath ?? null,
@@ -15887,7 +15892,7 @@ __export(exports_fastHmrCompiler, {
15887
15892
  primeComponentFingerprint: () => primeComponentFingerprint,
15888
15893
  invalidateFingerprintCache: () => invalidateFingerprintCache
15889
15894
  });
15890
- import { existsSync as existsSync23, readFileSync as readFileSync18, statSync as statSync2 } from "fs";
15895
+ import { existsSync as existsSync23, readFileSync as readFileSync19, statSync as statSync2 } from "fs";
15891
15896
  import { dirname as dirname15, extname as extname6, relative as relative12, resolve as resolve22 } from "path";
15892
15897
  import ts14 from "typescript";
15893
15898
  var fail = (reason, detail, location) => ({
@@ -16204,7 +16209,7 @@ var fail = (reason, detail, location) => ({
16204
16209
  continue;
16205
16210
  let content;
16206
16211
  try {
16207
- content = readFileSync18(candidate, "utf-8");
16212
+ content = readFileSync19(candidate, "utf-8");
16208
16213
  } catch {
16209
16214
  continue;
16210
16215
  }
@@ -16783,7 +16788,7 @@ var fail = (reason, detail, location) => ({
16783
16788
  return cached.info;
16784
16789
  let source;
16785
16790
  try {
16786
- source = readFileSync18(filePath, "utf-8");
16791
+ source = readFileSync19(filePath, "utf-8");
16787
16792
  } catch {
16788
16793
  childComponentInfoCache.set(cacheKey2, {
16789
16794
  info: null,
@@ -16837,7 +16842,7 @@ var fail = (reason, detail, location) => ({
16837
16842
  return cached.info;
16838
16843
  let content;
16839
16844
  try {
16840
- content = readFileSync18(dtsPath, "utf-8");
16845
+ content = readFileSync19(dtsPath, "utf-8");
16841
16846
  } catch {
16842
16847
  childComponentInfoCache.set(cacheKey2, {
16843
16848
  info: null,
@@ -16957,7 +16962,7 @@ var fail = (reason, detail, location) => ({
16957
16962
  return null;
16958
16963
  let content;
16959
16964
  try {
16960
- content = readFileSync18(startDtsPath, "utf-8");
16965
+ content = readFileSync19(startDtsPath, "utf-8");
16961
16966
  } catch {
16962
16967
  return null;
16963
16968
  }
@@ -17175,7 +17180,7 @@ var fail = (reason, detail, location) => ({
17175
17180
  return cached.hasProviders;
17176
17181
  let source;
17177
17182
  try {
17178
- source = readFileSync18(filePath, "utf8");
17183
+ source = readFileSync19(filePath, "utf8");
17179
17184
  } catch {
17180
17185
  return true;
17181
17186
  }
@@ -17483,7 +17488,7 @@ ${transpiled}
17483
17488
  return null;
17484
17489
  const ext = extname6(abs).toLowerCase();
17485
17490
  if (!STYLE_PREPROCESSED_EXT.has(ext) || ext === ".css") {
17486
- return readFileSync18(abs, "utf8");
17491
+ return readFileSync19(abs, "utf8");
17487
17492
  }
17488
17493
  try {
17489
17494
  const { compileStyleFileIfNeededSync: compileStyleFileIfNeededSync2 } = (init_stylePreprocessor(), __toCommonJS(exports_stylePreprocessor));
@@ -17522,7 +17527,7 @@ ${block}
17522
17527
  const opts = {};
17523
17528
  if (existsSync23(tsconfigPath)) {
17524
17529
  try {
17525
- const text = readFileSync18(tsconfigPath, "utf8");
17530
+ const text = readFileSync19(tsconfigPath, "utf8");
17526
17531
  const parsed = ts14.parseConfigFileTextToJson(tsconfigPath, text);
17527
17532
  if (!parsed.error && parsed.config) {
17528
17533
  const cfg = parsed.config;
@@ -17556,7 +17561,7 @@ ${block}
17556
17561
  } catch (err) {
17557
17562
  return fail("unexpected-error", `import @angular/compiler: ${err}`);
17558
17563
  }
17559
- const tsSource = readFileSync18(componentFilePath, "utf8");
17564
+ const tsSource = readFileSync19(componentFilePath, "utf8");
17560
17565
  const sourceFile = ts14.createSourceFile(componentFilePath, tsSource, ts14.ScriptTarget.ES2022, true, ts14.ScriptKind.TS);
17561
17566
  const classNode = findClassDeclaration(sourceFile, className);
17562
17567
  if (!classNode) {
@@ -17606,7 +17611,7 @@ ${block}
17606
17611
  if (!existsSync23(tplAbs)) {
17607
17612
  return fail("template-resource-not-found", `Template file not found: ${tplAbs}`, { file: componentFilePath });
17608
17613
  }
17609
- templateText = readFileSync18(tplAbs, "utf8");
17614
+ templateText = readFileSync19(tplAbs, "utf8");
17610
17615
  templatePath = tplAbs;
17611
17616
  } else {
17612
17617
  return fail("unsupported-decorator-args", "missing template/templateUrl");
@@ -18779,7 +18784,7 @@ var REQUIRED_ANGULAR_SPECIFIERS_BASE, requiredAngularSpecifiers = (jitMode) => j
18779
18784
  }
18780
18785
  return { angular, transitiveRoots };
18781
18786
  }, PARTIAL_DECL_MARKERS, containsPartialDeclarations = (source) => PARTIAL_DECL_MARKERS.some((marker) => source.includes(marker)), collectTransitiveAngularSpecs = async (roots, angularFound) => {
18782
- const { readFileSync: readFileSync19 } = await import("fs");
18787
+ const { readFileSync: readFileSync20 } = await import("fs");
18783
18788
  const transpiler6 = new Bun.Transpiler({ loader: "js" });
18784
18789
  const visited = new Set;
18785
18790
  const frontier = [];
@@ -18800,7 +18805,7 @@ var REQUIRED_ANGULAR_SPECIFIERS_BASE, requiredAngularSpecifiers = (jitMode) => j
18800
18805
  }
18801
18806
  let content;
18802
18807
  try {
18803
- content = readFileSync19(resolved, "utf-8");
18808
+ content = readFileSync20(resolved, "utf-8");
18804
18809
  } catch {
18805
18810
  continue;
18806
18811
  }
@@ -19005,11 +19010,11 @@ var vueSpecifiers, toSafeFileName3 = (specifier) => specifier.replace(/\//g, "_"
19005
19010
  console.warn("\u26A0\uFE0F Vue vendor build had errors:", result.logs);
19006
19011
  return;
19007
19012
  }
19008
- const { readFileSync: readFileSync19, writeFileSync: writeFileSync8, readdirSync: readdirSync5 } = await import("fs");
19013
+ const { readFileSync: readFileSync20, writeFileSync: writeFileSync8, readdirSync: readdirSync5 } = await import("fs");
19009
19014
  const files = readdirSync5(vendorDir).filter((f2) => f2.endsWith(".js"));
19010
19015
  for (const file4 of files) {
19011
19016
  const filePath = join32(vendorDir, file4);
19012
- const content = readFileSync19(filePath, "utf-8");
19017
+ const content = readFileSync20(filePath, "utf-8");
19013
19018
  if (!content.includes("__VUE_HMR_RUNTIME__"))
19014
19019
  continue;
19015
19020
  const patched = content.replace(/getGlobalThis\(\)\.__VUE_HMR_RUNTIME__\s*=\s*\{/, "getGlobalThis().__VUE_HMR_RUNTIME__ = getGlobalThis().__VUE_HMR_RUNTIME__ || {");
@@ -19278,7 +19283,7 @@ import {
19278
19283
  cpSync,
19279
19284
  existsSync as existsSync26,
19280
19285
  mkdirSync as mkdirSync12,
19281
- readFileSync as readFileSync19,
19286
+ readFileSync as readFileSync20,
19282
19287
  rmSync as rmSync2,
19283
19288
  statSync as statSync3,
19284
19289
  writeFileSync as writeFileSync8
@@ -19406,7 +19411,7 @@ var isDev, isBuildTraceEnabled = () => {
19406
19411
  addWorkerPathIfExists(file4, relPath, workerPaths);
19407
19412
  }
19408
19413
  }, collectWorkerPathsFromFile = (file4, patterns, workerPaths) => {
19409
- const content = readFileSync19(file4, "utf-8");
19414
+ const content = readFileSync20(file4, "utf-8");
19410
19415
  for (const pattern of patterns) {
19411
19416
  collectWorkerPathsFromContent(content, pattern, file4, workerPaths);
19412
19417
  }
@@ -19455,7 +19460,7 @@ var isDev, isBuildTraceEnabled = () => {
19455
19460
  const indexFiles = readDir(reactIndexesPath).filter((file4) => file4.endsWith(".tsx"));
19456
19461
  const pagesRel = relative13(process.cwd(), resolve25(reactPagesPath)).replace(/\\/g, "/");
19457
19462
  for (const file4 of indexFiles) {
19458
- let content = readFileSync19(join35(reactIndexesPath, file4), "utf-8");
19463
+ let content = readFileSync20(join35(reactIndexesPath, file4), "utf-8");
19459
19464
  content = content.replace(/from\s*['"]([^'"]*\/pages\/([^'"]+))['"]/g, (_match, _fullPath, componentName) => `from '/@src/${pagesRel}/${componentName}'`);
19460
19465
  writeFileSync8(join35(devIndexDir, file4), content);
19461
19466
  }
@@ -19467,7 +19472,7 @@ var isDev, isBuildTraceEnabled = () => {
19467
19472
  const indexFile = join35(svelteIndexDir, "pages", `${name}.js`);
19468
19473
  if (!existsSync26(indexFile))
19469
19474
  continue;
19470
- let content = readFileSync19(indexFile, "utf-8");
19475
+ let content = readFileSync20(indexFile, "utf-8");
19471
19476
  const srcRel = relative13(process.cwd(), resolve25(entry)).replace(/\\/g, "/");
19472
19477
  content = content.replace(/import\s+Component\s+from\s+['"]([^'"]+)['"]/, `import Component from "/@src/${srcRel}"`);
19473
19478
  writeFileSync8(join35(devIndexDir, `${name}.svelte.js`), content);
@@ -19480,7 +19485,7 @@ var isDev, isBuildTraceEnabled = () => {
19480
19485
  const indexFile = join35(vueIndexDir, `${name}.js`);
19481
19486
  if (!existsSync26(indexFile))
19482
19487
  continue;
19483
- let content = readFileSync19(indexFile, "utf-8");
19488
+ let content = readFileSync20(indexFile, "utf-8");
19484
19489
  const srcRel = relative13(process.cwd(), resolve25(entry)).replace(/\\/g, "/");
19485
19490
  content = content.replace(/import\s+Comp(?:\s*,\s*\*\s+as\s+\w+)?\s+from\s+['"]([^'"]+)['"]/, (match) => match.replace(/from\s+['"][^'"]+['"]/, `from "/@src/${srcRel}"`));
19486
19491
  writeFileSync8(join35(devIndexDir, `${name}.vue.js`), content);
@@ -19531,7 +19536,7 @@ var isDev, isBuildTraceEnabled = () => {
19531
19536
  }
19532
19537
  return result;
19533
19538
  }, VUE_HMR_RUNTIME, injectVueComposableTracking = (outputPath, projectRoot) => {
19534
- let content = readFileSync19(outputPath, "utf-8");
19539
+ let content = readFileSync20(outputPath, "utf-8");
19535
19540
  const usePattern = /^var\s+(use[A-Z]\w*)\s*=/gm;
19536
19541
  const useNames = [];
19537
19542
  let match;
@@ -19581,7 +19586,7 @@ ${content.slice(firstUseIdx)}`;
19581
19586
  }, rewriteUrlReferences = (outputPaths, urlFileMap) => {
19582
19587
  const urlPattern = /new\s+URL\(\s*["'](\.\.?\/[^"']+)["']\s*,\s*import\.meta\.url\s*\)/g;
19583
19588
  for (const outputPath of outputPaths) {
19584
- let content = readFileSync19(outputPath, "utf-8");
19589
+ let content = readFileSync20(outputPath, "utf-8");
19585
19590
  let changed = false;
19586
19591
  content = content.replace(urlPattern, (_match, relPath) => {
19587
19592
  const targetName = basename10(relPath);
@@ -20708,7 +20713,7 @@ ${content.slice(firstUseIdx)}`;
20708
20713
  const injectHMRIntoHTMLFile = (filePath, framework) => {
20709
20714
  if (!hmrClientBundle)
20710
20715
  return;
20711
- let html = readFileSync19(filePath, "utf-8");
20716
+ let html = readFileSync20(filePath, "utf-8");
20712
20717
  if (html.includes("data-hmr-client"))
20713
20718
  return;
20714
20719
  const tag = `<script>window.__HMR_FRAMEWORK__="${framework}";</script><script data-hmr-client>${hmrClientBundle}</script>`;
@@ -21094,7 +21099,7 @@ __export(exports_dependencyGraph, {
21094
21099
  buildInitialDependencyGraph: () => buildInitialDependencyGraph,
21095
21100
  addFileToGraph: () => addFileToGraph
21096
21101
  });
21097
- import { existsSync as existsSync28, readFileSync as readFileSync20 } from "fs";
21102
+ import { existsSync as existsSync28, readFileSync as readFileSync21 } from "fs";
21098
21103
  var {Glob: Glob9 } = globalThis.Bun;
21099
21104
  import { resolve as resolve26 } from "path";
21100
21105
  var emptyDependencyGraph, tsTranspiler, jsTranspiler, loaderForFile = (filePath) => {
@@ -21265,15 +21270,15 @@ var emptyDependencyGraph, tsTranspiler, jsTranspiler, loaderForFile = (filePath)
21265
21270
  const lowerPath = filePath.toLowerCase();
21266
21271
  const isSvelteOrVue = lowerPath.endsWith(".svelte") || lowerPath.endsWith(".vue");
21267
21272
  if (loader === "html") {
21268
- const content = readFileSync20(filePath, "utf-8");
21273
+ const content = readFileSync21(filePath, "utf-8");
21269
21274
  return extractHtmlDependencies(filePath, content);
21270
21275
  }
21271
21276
  if (loader === "tsx" || loader === "js") {
21272
- const content = readFileSync20(filePath, "utf-8");
21277
+ const content = readFileSync21(filePath, "utf-8");
21273
21278
  return extractJsDependencies(filePath, content, loader);
21274
21279
  }
21275
21280
  if (isSvelteOrVue) {
21276
- const content = readFileSync20(filePath, "utf-8");
21281
+ const content = readFileSync21(filePath, "utf-8");
21277
21282
  return extractSvelteVueDependencies(filePath, content);
21278
21283
  }
21279
21284
  return [];
@@ -21416,7 +21421,7 @@ var init_clientManager = __esm(() => {
21416
21421
  });
21417
21422
 
21418
21423
  // src/dev/pathUtils.ts
21419
- import { existsSync as existsSync29, readdirSync as readdirSync5, readFileSync as readFileSync21 } from "fs";
21424
+ import { existsSync as existsSync29, readdirSync as readdirSync5, readFileSync as readFileSync22 } from "fs";
21420
21425
  import { dirname as dirname18, resolve as resolve28 } from "path";
21421
21426
  var STYLE_EXTENSION_PATTERN2, detectFramework = (filePath, resolved) => {
21422
21427
  if (shouldIgnorePath(filePath, resolved)) {
@@ -21516,7 +21521,7 @@ var STYLE_EXTENSION_PATTERN2, detectFramework = (filePath, resolved) => {
21516
21521
  }
21517
21522
  let source;
21518
21523
  try {
21519
- source = readFileSync21(full, "utf8");
21524
+ source = readFileSync22(full, "utf8");
21520
21525
  } catch {
21521
21526
  continue;
21522
21527
  }
@@ -21891,7 +21896,7 @@ var init_assetStore = __esm(() => {
21891
21896
  });
21892
21897
 
21893
21898
  // src/islands/pageMetadata.ts
21894
- import { readFileSync as readFileSync22 } from "fs";
21899
+ import { readFileSync as readFileSync23 } from "fs";
21895
21900
  import { dirname as dirname20, resolve as resolve31 } from "path";
21896
21901
  var pagePatterns, getPageDirs = (config) => [
21897
21902
  { dir: config.angularDirectory, framework: "angular" },
@@ -21934,7 +21939,7 @@ var pagePatterns, getPageDirs = (config) => [
21934
21939
  return;
21935
21940
  const files = await scanEntryPoints(resolve31(entry.dir), pattern);
21936
21941
  for (const filePath of files) {
21937
- const source = readFileSync22(filePath, "utf-8");
21942
+ const source = readFileSync23(filePath, "utf-8");
21938
21943
  const islands = extractIslandUsagesFromSource(source);
21939
21944
  pageMetadata.set(resolve31(filePath), {
21940
21945
  islands: resolveIslandUsages(islands, islandSourceLookup),
@@ -21965,10 +21970,10 @@ var init_pageMetadata = __esm(() => {
21965
21970
  });
21966
21971
 
21967
21972
  // src/dev/fileHashTracker.ts
21968
- import { readFileSync as readFileSync23 } from "fs";
21973
+ import { readFileSync as readFileSync24 } from "fs";
21969
21974
  var computeFileHash = (filePath) => {
21970
21975
  try {
21971
- const fileContent = readFileSync23(filePath);
21976
+ const fileContent = readFileSync24(filePath);
21972
21977
  return Number(Bun.hash(fileContent));
21973
21978
  } catch {
21974
21979
  return UNFOUND_INDEX;
@@ -22182,7 +22187,7 @@ __export(exports_resolveOwningComponents, {
22182
22187
  resolveDescendantsOfParent: () => resolveDescendantsOfParent,
22183
22188
  invalidateResourceIndex: () => invalidateResourceIndex
22184
22189
  });
22185
- import { readdirSync as readdirSync7, readFileSync as readFileSync24, statSync as statSync5 } from "fs";
22190
+ import { readdirSync as readdirSync7, readFileSync as readFileSync25, statSync as statSync5 } from "fs";
22186
22191
  import { dirname as dirname21, extname as extname9, join as join38, resolve as resolve34 } from "path";
22187
22192
  import ts15 from "typescript";
22188
22193
  var ENTITY_DECORATORS, isAngularSourceFile = (file4) => file4.endsWith(".ts") || file4.endsWith(".tsx"), walkAngularSourceFiles = (root) => {
@@ -22242,7 +22247,7 @@ var ENTITY_DECORATORS, isAngularSourceFile = (file4) => file4.endsWith(".ts") ||
22242
22247
  }, parseDecoratedClasses = (filePath) => {
22243
22248
  let source;
22244
22249
  try {
22245
- source = readFileSync24(filePath, "utf8");
22250
+ source = readFileSync25(filePath, "utf8");
22246
22251
  } catch {
22247
22252
  return [];
22248
22253
  }
@@ -22332,7 +22337,7 @@ var ENTITY_DECORATORS, isAngularSourceFile = (file4) => file4.endsWith(".ts") ||
22332
22337
  }, indexByRoot, resolveParentClassFile = (parentName, childFilePath, angularRoot) => {
22333
22338
  let source;
22334
22339
  try {
22335
- source = readFileSync24(childFilePath, "utf8");
22340
+ source = readFileSync25(childFilePath, "utf8");
22336
22341
  } catch {
22337
22342
  return null;
22338
22343
  }
@@ -22699,7 +22704,7 @@ __export(exports_moduleServer, {
22699
22704
  createModuleServer: () => createModuleServer,
22700
22705
  SRC_URL_PREFIX: () => SRC_URL_PREFIX
22701
22706
  });
22702
- import { existsSync as existsSync31, readFileSync as readFileSync25, statSync as statSync6 } from "fs";
22707
+ import { existsSync as existsSync31, readFileSync as readFileSync26, statSync as statSync6 } from "fs";
22703
22708
  import { basename as basename12, dirname as dirname22, extname as extname10, join as join39, resolve as resolve36, relative as relative14 } from "path";
22704
22709
  var SRC_PREFIX = "/@src/", jsTranspiler2, tsTranspiler2, tsxTranspiler, TRANSPILABLE, ALL_EXPORTS_RE, STRING_CONTENTS_RE, preserveTypeExports = (originalSource, transpiled, valueExports) => {
22705
22710
  const codeOnly = originalSource.replace(STRING_CONTENTS_RE, '""');
@@ -22774,7 +22779,7 @@ ${stubs}
22774
22779
  const pkgDir = resolve36(projectRoot, "node_modules", packageName ?? "");
22775
22780
  const pkgJsonPath = join39(pkgDir, "package.json");
22776
22781
  if (existsSync31(pkgJsonPath)) {
22777
- const pkg = JSON.parse(readFileSync25(pkgJsonPath, "utf-8"));
22782
+ const pkg = JSON.parse(readFileSync26(pkgJsonPath, "utf-8"));
22778
22783
  const esmEntry = typeof pkg.module === "string" && pkg.module || typeof pkg.browser === "string" && pkg.browser;
22779
22784
  if (esmEntry) {
22780
22785
  const resolved = resolve36(pkgDir, esmEntry);
@@ -22875,7 +22880,7 @@ ${code}`;
22875
22880
  reactFastRefreshWarningEmitted = true;
22876
22881
  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.");
22877
22882
  }, transformReactFile = (filePath, projectRoot, rewriter) => {
22878
- const raw = readFileSync25(filePath, "utf-8");
22883
+ const raw = readFileSync26(filePath, "utf-8");
22879
22884
  const valueExports = tsxTranspiler.scan(raw).exports;
22880
22885
  let transpiled = reactTranspiler.transformSync(raw);
22881
22886
  transpiled = preserveTypeExports(raw, transpiled, valueExports);
@@ -22891,7 +22896,7 @@ ${transpiled}`;
22891
22896
  transpiled += buildIslandMetadataExports(raw);
22892
22897
  return rewriteImports(transpiled, filePath, projectRoot, rewriter);
22893
22898
  }, transformPlainFile = (filePath, projectRoot, rewriter, vueDir) => {
22894
- const raw = readFileSync25(filePath, "utf-8");
22899
+ const raw = readFileSync26(filePath, "utf-8");
22895
22900
  const ext = extname10(filePath);
22896
22901
  const isTS = ext === ".ts" || ext === ".tsx";
22897
22902
  const isTSX = ext === ".tsx" || ext === ".jsx";
@@ -23057,7 +23062,7 @@ ${code}`;
23057
23062
  ` + ` var __hmr_accept = function(cb) { window.__SVELTE_HMR_ACCEPT__[${JSON.stringify(moduleUrl)}] = cb; };`);
23058
23063
  return code.replace(/import\.meta\.hot\.accept\(/g, "__hmr_accept(");
23059
23064
  }, transformSvelteFile = async (filePath, projectRoot, rewriter, stylePreprocessors) => {
23060
- const raw = readFileSync25(filePath, "utf-8");
23065
+ const raw = readFileSync26(filePath, "utf-8");
23061
23066
  if (!svelteCompiler) {
23062
23067
  svelteCompiler = await import("svelte/compiler");
23063
23068
  }
@@ -23119,7 +23124,7 @@ export default __script__;`;
23119
23124
  return `${cssInjection}
23120
23125
  ${code}`;
23121
23126
  }, transformVueFile = async (filePath, projectRoot, rewriter, vueDir, stylePreprocessors) => {
23122
- const rawSource = readFileSync25(filePath, "utf-8");
23127
+ const rawSource = readFileSync26(filePath, "utf-8");
23123
23128
  const raw = addAutoRouterSetupApp(rawSource);
23124
23129
  if (!vueCompiler) {
23125
23130
  vueCompiler = await import("@vue/compiler-sfc");
@@ -23174,7 +23179,7 @@ ${code}`;
23174
23179
  }
23175
23180
  });
23176
23181
  }, handleCssRequest = (filePath) => {
23177
- const raw = readFileSync25(filePath, "utf-8");
23182
+ const raw = readFileSync26(filePath, "utf-8");
23178
23183
  const escaped = raw.replace(/\\/g, "\\\\").replace(/`/g, "\\`").replace(/\$/g, "\\$");
23179
23184
  return [
23180
23185
  `const style = document.createElement('style');`,
@@ -26353,7 +26358,7 @@ var toSafeFileName6 = (specifier) => {
26353
26358
  framework: Array.from(framework).filter(isResolvable4)
26354
26359
  };
26355
26360
  }, collectTransitiveImports = async (specs, alreadyVendored, alreadyScanned) => {
26356
- const { readFileSync: readFileSync26 } = await import("fs");
26361
+ const { readFileSync: readFileSync27 } = await import("fs");
26357
26362
  const transpiler6 = new Bun.Transpiler({ loader: "js" });
26358
26363
  const newSpecs = new Set;
26359
26364
  for (const spec of specs) {
@@ -26368,7 +26373,7 @@ var toSafeFileName6 = (specifier) => {
26368
26373
  }
26369
26374
  let content;
26370
26375
  try {
26371
- content = readFileSync26(resolved, "utf-8");
26376
+ content = readFileSync27(resolved, "utf-8");
26372
26377
  } catch {
26373
26378
  continue;
26374
26379
  }
@@ -26985,5 +26990,5 @@ export {
26985
26990
  build
26986
26991
  };
26987
26992
 
26988
- //# debugId=71A611117C6D2CDE64756E2164756E21
26993
+ //# debugId=D5F157E27B971C2F64756E2164756E21
26989
26994
  //# sourceMappingURL=build.js.map