@absolutejs/absolute 0.19.0-beta.689 → 0.19.0-beta.690

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
@@ -2448,9 +2448,10 @@ var init_lowerAwaitSlotSyntax = __esm(() => {
2448
2448
  });
2449
2449
 
2450
2450
  // src/build/stylePreprocessor.ts
2451
+ import { readFileSync as readFileSync3 } from "fs";
2451
2452
  import { readFile } from "fs/promises";
2452
2453
  import { dirname as dirname3, extname as extname3 } from "path";
2453
- var STYLE_EXTENSION_PATTERN, STYLE_MODULE_EXTENSION_PATTERN, STYLE_LANGUAGE_PATTERN, importOptionalPeer, isPreprocessableStylePath = (filePath) => STYLE_EXTENSION_PATTERN.test(filePath), isStyleModulePath = (filePath) => STYLE_MODULE_EXTENSION_PATTERN.test(filePath), isStylePath = (filePath) => /\.(css|s[ac]ss|less)$/i.test(filePath), getStyleBaseName = (filePath) => filePath.replace(/\.(css|s[ac]ss|less)$/i, ""), getStyleLanguage = (filePathOrLanguage) => {
2454
+ var STYLE_EXTENSION_PATTERN, STYLE_MODULE_EXTENSION_PATTERN, STYLE_LANGUAGE_PATTERN, importOptionalPeer, requireOptionalPeer, isPreprocessableStylePath = (filePath) => STYLE_EXTENSION_PATTERN.test(filePath), isStyleModulePath = (filePath) => STYLE_MODULE_EXTENSION_PATTERN.test(filePath), isStylePath = (filePath) => /\.(css|s[ac]ss|less)$/i.test(filePath), getStyleBaseName = (filePath) => filePath.replace(/\.(css|s[ac]ss|less)$/i, ""), getStyleLanguage = (filePathOrLanguage) => {
2454
2455
  const normalized = filePathOrLanguage.toLowerCase();
2455
2456
  if (normalized === "scss" || normalized.endsWith(".scss"))
2456
2457
  return "scss";
@@ -2514,12 +2515,34 @@ var STYLE_EXTENSION_PATTERN, STYLE_MODULE_EXTENSION_PATTERN, STYLE_LANGUAGE_PATT
2514
2515
  return readFile(filePath, "utf-8");
2515
2516
  }
2516
2517
  return compileStyleSource(filePath);
2518
+ }, compileStyleFileIfNeededSync = (filePath) => {
2519
+ const contents = readFileSync3(filePath, "utf-8");
2520
+ const language = getStyleLanguage(filePath);
2521
+ if (language === "scss" || language === "sass") {
2522
+ let sass;
2523
+ try {
2524
+ sass = requireOptionalPeer("sass");
2525
+ } catch {
2526
+ throw missingDependencyError("sass", filePath);
2527
+ }
2528
+ return sass.compileString(contents, {
2529
+ loadPaths: [dirname3(filePath), process.cwd()],
2530
+ style: "expanded",
2531
+ syntax: language === "sass" ? "indented" : "scss",
2532
+ url: new URL(`file://${filePath}`)
2533
+ }).css;
2534
+ }
2535
+ if (language === "less") {
2536
+ throw new Error(`Unable to compile ${filePath}: Less styleUrl preprocessing is async-only. Import the Less file from a bundled entrypoint or use SCSS/CSS for Angular styleUrl.`);
2537
+ }
2538
+ return contents;
2517
2539
  };
2518
2540
  var init_stylePreprocessor = __esm(() => {
2519
2541
  STYLE_EXTENSION_PATTERN = /\.(s[ac]ss|less)$/i;
2520
2542
  STYLE_MODULE_EXTENSION_PATTERN = /\.module\.(s[ac]ss|less)$/i;
2521
2543
  STYLE_LANGUAGE_PATTERN = /^(s[ac]ss|less)$/i;
2522
2544
  importOptionalPeer = new Function("specifier", "return import(specifier)");
2545
+ requireOptionalPeer = new Function("specifier", "return require(specifier)");
2523
2546
  stylePreprocessorPlugin = {
2524
2547
  name: "absolute-style-preprocessor",
2525
2548
  setup(build) {
@@ -2944,7 +2967,7 @@ var init_staticStreaming = __esm(() => {
2944
2967
  });
2945
2968
 
2946
2969
  // src/build/staticIslandPages.ts
2947
- import { readFileSync as readFileSync3, writeFileSync as writeFileSync3 } from "fs";
2970
+ import { readFileSync as readFileSync4, writeFileSync as writeFileSync3 } from "fs";
2948
2971
  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) => {
2949
2972
  const attributeRe = new RegExp(ATTRIBUTE_RE_SOURCE, "g");
2950
2973
  const attributes = new Map;
@@ -3073,7 +3096,7 @@ var ISLAND_TAG_RE_SOURCE = "<(?:absolute-island|island)\\b([^>]*?)(?:\\/\\>|>(?:
3073
3096
  }
3074
3097
  return result + originalHtml.slice(nextIndex);
3075
3098
  }, transformStaticPage = async (pagePath, registry) => {
3076
- const originalHtml = readFileSync3(pagePath, "utf-8");
3099
+ const originalHtml = readFileSync4(pagePath, "utf-8");
3077
3100
  const transformedHtml = await transformStaticPageHtml(originalHtml, registry);
3078
3101
  if (transformedHtml !== originalHtml) {
3079
3102
  writeFileSync3(pagePath, transformedHtml);
@@ -3211,7 +3234,7 @@ var init_scanCssEntryPoints = __esm(() => {
3211
3234
  });
3212
3235
 
3213
3236
  // src/utils/imageProcessing.ts
3214
- import { existsSync as existsSync8, mkdirSync as mkdirSync3, readFileSync as readFileSync4, writeFileSync as writeFileSync4 } from "fs";
3237
+ import { existsSync as existsSync8, mkdirSync as mkdirSync3, readFileSync as readFileSync5, writeFileSync as writeFileSync4 } from "fs";
3215
3238
  import { join as join6, resolve as resolve7 } from "path";
3216
3239
  var DEFAULT_DEVICE_SIZES, DEFAULT_IMAGE_SIZES, DEFAULT_QUALITY = 75, OPTIMIZATION_ENDPOINT = "/_absolute/image", BLUR_DEVIATION = 20, sharpModule = undefined, sharpLoaded = false, sharpWarned = false, snapToSize = (target, sizes) => {
3217
3240
  for (const size of sizes) {
@@ -3327,8 +3350,8 @@ var DEFAULT_DEVICE_SIZES, DEFAULT_IMAGE_SIZES, DEFAULT_QUALITY = 75, OPTIMIZATIO
3327
3350
  if (!existsSync8(metaPath) || !existsSync8(dataPath))
3328
3351
  return null;
3329
3352
  try {
3330
- const meta = JSON.parse(readFileSync4(metaPath, "utf-8"));
3331
- const buffer = readFileSync4(dataPath);
3353
+ const meta = JSON.parse(readFileSync5(metaPath, "utf-8"));
3354
+ const buffer = readFileSync5(dataPath);
3332
3355
  return { buffer, meta };
3333
3356
  } catch {
3334
3357
  return null;
@@ -3443,14 +3466,14 @@ var init_optimizeHtmlImages = __esm(() => {
3443
3466
  });
3444
3467
 
3445
3468
  // src/cli/scripts/telemetry.ts
3446
- import { existsSync as existsSync9, mkdirSync as mkdirSync4, readFileSync as readFileSync5, writeFileSync as writeFileSync5 } from "fs";
3469
+ import { existsSync as existsSync9, mkdirSync as mkdirSync4, readFileSync as readFileSync6, writeFileSync as writeFileSync5 } from "fs";
3447
3470
  import { homedir } from "os";
3448
3471
  import { join as join7 } from "path";
3449
3472
  var configDir, configPath, getTelemetryConfig = () => {
3450
3473
  try {
3451
3474
  if (!existsSync9(configPath))
3452
3475
  return null;
3453
- const raw = readFileSync5(configPath, "utf-8");
3476
+ const raw = readFileSync6(configPath, "utf-8");
3454
3477
  const config = JSON.parse(raw);
3455
3478
  return config;
3456
3479
  } catch {
@@ -3463,14 +3486,14 @@ var init_telemetry = __esm(() => {
3463
3486
  });
3464
3487
 
3465
3488
  // src/cli/telemetryEvent.ts
3466
- import { existsSync as existsSync10, readFileSync as readFileSync6 } from "fs";
3489
+ import { existsSync as existsSync10, readFileSync as readFileSync7 } from "fs";
3467
3490
  import { arch, platform } from "os";
3468
3491
  import { dirname as dirname5, join as join8, parse } from "path";
3469
3492
  var checkCandidate = (candidate) => {
3470
3493
  if (!existsSync10(candidate)) {
3471
3494
  return null;
3472
3495
  }
3473
- const pkg = JSON.parse(readFileSync6(candidate, "utf-8"));
3496
+ const pkg = JSON.parse(readFileSync7(candidate, "utf-8"));
3474
3497
  if (pkg.name === "@absolutejs/absolute") {
3475
3498
  const ver = pkg.version;
3476
3499
  return ver;
@@ -3777,7 +3800,7 @@ var devVendorPaths = null, getDevVendorPaths = () => devVendorPaths, setDevVendo
3777
3800
  };
3778
3801
 
3779
3802
  // src/build/angularLinkerPlugin.ts
3780
- import { existsSync as existsSync12, mkdirSync as mkdirSync5, readFileSync as readFileSync7, writeFileSync as writeFileSync6 } from "fs";
3803
+ import { existsSync as existsSync12, mkdirSync as mkdirSync5, readFileSync as readFileSync8, writeFileSync as writeFileSync6 } from "fs";
3781
3804
  import { dirname as dirname6, join as join9, relative as relative4, resolve as resolve10 } from "path";
3782
3805
  import { createHash } from "crypto";
3783
3806
  var CACHE_DIR, angularLinkerPlugin;
@@ -3804,7 +3827,7 @@ var init_angularLinkerPlugin = __esm(() => {
3804
3827
  const cachePath = join9(CACHE_DIR, `${hash}.js`);
3805
3828
  if (existsSync12(cachePath)) {
3806
3829
  return {
3807
- contents: readFileSync7(cachePath, "utf-8"),
3830
+ contents: readFileSync8(cachePath, "utf-8"),
3808
3831
  loader: "js"
3809
3832
  };
3810
3833
  }
@@ -3820,7 +3843,7 @@ var init_angularLinkerPlugin = __esm(() => {
3820
3843
  fileSystem: {
3821
3844
  dirname: dirname6,
3822
3845
  exists: existsSync12,
3823
- readFile: readFileSync7,
3846
+ readFile: readFileSync8,
3824
3847
  relative: relative4,
3825
3848
  resolve: resolve10
3826
3849
  },
@@ -5312,13 +5335,13 @@ __export(exports_compileAngular, {
5312
5335
  compileAngularFile: () => compileAngularFile,
5313
5336
  compileAngular: () => compileAngular
5314
5337
  });
5315
- import { existsSync as existsSync15, readFileSync as readFileSync8, promises as fs } from "fs";
5338
+ import { existsSync as existsSync15, readFileSync as readFileSync9, promises as fs } from "fs";
5316
5339
  import { join as join13, basename as basename6, sep as sep3, dirname as dirname9, resolve as resolve15, relative as relative8 } from "path";
5317
5340
  import ts2 from "typescript";
5318
5341
  import { createHash as createHash2 } from "crypto";
5319
5342
  var computeConfigHash = () => {
5320
5343
  try {
5321
- const content = readFileSync8("./tsconfig.json", "utf-8");
5344
+ const content = readFileSync9("./tsconfig.json", "utf-8");
5322
5345
  return createHash2("md5").update(content).digest("hex");
5323
5346
  } catch {
5324
5347
  return "";
@@ -5376,7 +5399,7 @@ ${registrations}
5376
5399
  return fileName.substring(outDir.length + 1);
5377
5400
  return fileName;
5378
5401
  }, compileAngularFile = async (inputPath, outDir) => {
5379
- const islandMetadataExports = buildIslandMetadataExports(readFileSync8(inputPath, "utf-8"));
5402
+ const islandMetadataExports = buildIslandMetadataExports(readFileSync9(inputPath, "utf-8"));
5380
5403
  const { readConfiguration, performCompilation, EmitFlags } = await import("@angular/compiler-cli");
5381
5404
  const configHash = computeConfigHash();
5382
5405
  const cached = globalThis.__angularCompilerCache;
@@ -5456,7 +5479,7 @@ ${registrations}
5456
5479
  const cached2 = aotTransformCache.get(resolvedPath);
5457
5480
  if (cached2 !== undefined)
5458
5481
  return cached2;
5459
- const transformed = inlineTemplateAndLowerDeferSync(source, dirname9(resolvedPath)).source;
5482
+ const transformed = inlineResourcesSync(source, dirname9(resolvedPath)).source;
5460
5483
  aotTransformCache.set(resolvedPath, transformed);
5461
5484
  return transformed;
5462
5485
  };
@@ -5673,7 +5696,7 @@ ${fields}
5673
5696
  if (!existsSync15(templatePath)) {
5674
5697
  return { deferSlots: [], source };
5675
5698
  }
5676
- const templateRaw2 = readFileSync8(templatePath, "utf-8");
5699
+ const templateRaw2 = readFileSync9(templatePath, "utf-8");
5677
5700
  const lowered2 = lowerAngularDeferSyntax(templateRaw2);
5678
5701
  const escaped2 = escapeTemplateContent(lowered2.template);
5679
5702
  const replacedSource2 = source.replace(/templateUrl\s*:\s*['"][^'"]+['"]/, `template: \`${escaped2}\``);
@@ -5697,6 +5720,42 @@ ${fields}
5697
5720
  deferSlots: lowered.slots,
5698
5721
  source: injectDeferSlotFields(replacedSource, lowered.slots, resolveAngularDeferImportSpecifier())
5699
5722
  };
5723
+ }, readAndEscapeFileSync = (filePath) => {
5724
+ if (!existsSync15(filePath))
5725
+ return null;
5726
+ const content = compileStyleFileIfNeededSync(filePath);
5727
+ return escapeTemplateContent(content);
5728
+ }, inlineStyleUrlsSync = (source, fileDir) => {
5729
+ const styleUrlsMatch = source.match(/styleUrls\s*:\s*\[([^\]]+)\]/);
5730
+ if (!styleUrlsMatch?.[1])
5731
+ return source;
5732
+ const urlMatches = styleUrlsMatch[1].match(/['"]([^'"]+)['"]/g);
5733
+ if (!urlMatches)
5734
+ return source;
5735
+ const inlinedStyles = urlMatches.map((urlMatch) => {
5736
+ const styleUrl = urlMatch.replace(/['"]/g, "");
5737
+ return readAndEscapeFileSync(join13(fileDir, styleUrl));
5738
+ }).filter(Boolean).map((escaped) => `\`${escaped}\``);
5739
+ if (inlinedStyles.length === 0)
5740
+ return source;
5741
+ return source.replace(/styleUrls\s*:\s*\[[^\]]+\]/, `styles: [${inlinedStyles.join(", ")}]`);
5742
+ }, inlineSingleStyleUrlSync = (source, fileDir) => {
5743
+ const styleUrlMatch = source.match(/styleUrl\s*:\s*['"]([^'"]+)['"]/);
5744
+ if (!styleUrlMatch?.[1])
5745
+ return source;
5746
+ const escaped = readAndEscapeFileSync(join13(fileDir, styleUrlMatch[1]));
5747
+ if (!escaped)
5748
+ return source;
5749
+ return source.replace(/styleUrl\s*:\s*['"][^'"]+['"]/, `styles: [\`${escaped}\`]`);
5750
+ }, inlineResourcesSync = (source, fileDir) => {
5751
+ const inlinedTemplate = inlineTemplateAndLowerDeferSync(source, fileDir);
5752
+ let result = inlinedTemplate.source;
5753
+ result = inlineStyleUrlsSync(result, fileDir);
5754
+ result = inlineSingleStyleUrlSync(result, fileDir);
5755
+ return {
5756
+ deferSlots: inlinedTemplate.deferSlots,
5757
+ source: result
5758
+ };
5700
5759
  }, inlineStyleUrls = async (source, fileDir) => {
5701
5760
  const styleUrlsMatch = source.match(/styleUrls\s*:\s*\[([^\]]+)\]/);
5702
5761
  if (!styleUrlsMatch?.[1])
@@ -6268,11 +6327,11 @@ var vueSpecifiers, toSafeFileName3 = (specifier) => specifier.replace(/\//g, "_"
6268
6327
  console.warn("\u26A0\uFE0F Vue vendor build had errors:", result.logs);
6269
6328
  return;
6270
6329
  }
6271
- const { readFileSync: readFileSync9, writeFileSync: writeFileSync7, readdirSync } = await import("fs");
6330
+ const { readFileSync: readFileSync10, writeFileSync: writeFileSync7, readdirSync } = await import("fs");
6272
6331
  const files = readdirSync(vendorDir).filter((f) => f.endsWith(".js"));
6273
6332
  for (const file3 of files) {
6274
6333
  const filePath = join16(vendorDir, file3);
6275
- const content = readFileSync9(filePath, "utf-8");
6334
+ const content = readFileSync10(filePath, "utf-8");
6276
6335
  if (!content.includes("__VUE_HMR_RUNTIME__"))
6277
6336
  continue;
6278
6337
  const patched = content.replace(/getGlobalThis\(\)\.__VUE_HMR_RUNTIME__\s*=\s*\{/, "getGlobalThis().__VUE_HMR_RUNTIME__ = getGlobalThis().__VUE_HMR_RUNTIME__ || {");
@@ -6397,7 +6456,7 @@ import {
6397
6456
  cpSync,
6398
6457
  existsSync as existsSync17,
6399
6458
  mkdirSync as mkdirSync10,
6400
- readFileSync as readFileSync9,
6459
+ readFileSync as readFileSync10,
6401
6460
  rmSync as rmSync2,
6402
6461
  statSync,
6403
6462
  writeFileSync as writeFileSync7
@@ -6518,7 +6577,7 @@ var isDev, collectConventionSourceFiles = (entry) => {
6518
6577
  addWorkerPathIfExists(file3, relPath, workerPaths);
6519
6578
  }
6520
6579
  }, collectWorkerPathsFromFile = (file3, patterns, workerPaths) => {
6521
- const content = readFileSync9(file3, "utf-8");
6580
+ const content = readFileSync10(file3, "utf-8");
6522
6581
  for (const pattern of patterns) {
6523
6582
  collectWorkerPathsFromContent(content, pattern, file3, workerPaths);
6524
6583
  }
@@ -6569,7 +6628,7 @@ var isDev, collectConventionSourceFiles = (entry) => {
6569
6628
  const indexFiles = readDir(reactIndexesPath).filter((file3) => file3.endsWith(".tsx"));
6570
6629
  const pagesRel = relative9(process.cwd(), resolve17(reactPagesPath)).replace(/\\/g, "/");
6571
6630
  for (const file3 of indexFiles) {
6572
- let content = readFileSync9(join18(reactIndexesPath, file3), "utf-8");
6631
+ let content = readFileSync10(join18(reactIndexesPath, file3), "utf-8");
6573
6632
  content = content.replace(/from\s*['"]([^'"]*\/pages\/([^'"]+))['"]/g, (_match, _fullPath, componentName) => `from '/@src/${pagesRel}/${componentName}'`);
6574
6633
  writeFileSync7(join18(devIndexDir, file3), content);
6575
6634
  }
@@ -6581,7 +6640,7 @@ var isDev, collectConventionSourceFiles = (entry) => {
6581
6640
  const indexFile = join18(svelteIndexDir, "pages", `${name}.js`);
6582
6641
  if (!existsSync17(indexFile))
6583
6642
  continue;
6584
- let content = readFileSync9(indexFile, "utf-8");
6643
+ let content = readFileSync10(indexFile, "utf-8");
6585
6644
  const srcRel = relative9(process.cwd(), resolve17(entry)).replace(/\\/g, "/");
6586
6645
  content = content.replace(/import\s+Component\s+from\s+['"]([^'"]+)['"]/, `import Component from "/@src/${srcRel}"`);
6587
6646
  writeFileSync7(join18(devIndexDir, `${name}.svelte.js`), content);
@@ -6594,7 +6653,7 @@ var isDev, collectConventionSourceFiles = (entry) => {
6594
6653
  const indexFile = join18(vueIndexDir, `${name}.js`);
6595
6654
  if (!existsSync17(indexFile))
6596
6655
  continue;
6597
- let content = readFileSync9(indexFile, "utf-8");
6656
+ let content = readFileSync10(indexFile, "utf-8");
6598
6657
  const srcRel = relative9(process.cwd(), resolve17(entry)).replace(/\\/g, "/");
6599
6658
  content = content.replace(/import\s+Comp\s+from\s+['"]([^'"]+)['"]/, `import Comp from "/@src/${srcRel}"`);
6600
6659
  writeFileSync7(join18(devIndexDir, `${name}.vue.js`), content);
@@ -6645,7 +6704,7 @@ var isDev, collectConventionSourceFiles = (entry) => {
6645
6704
  }
6646
6705
  return result;
6647
6706
  }, VUE_HMR_RUNTIME, injectVueComposableTracking = (outputPath, projectRoot) => {
6648
- let content = readFileSync9(outputPath, "utf-8");
6707
+ let content = readFileSync10(outputPath, "utf-8");
6649
6708
  const usePattern = /^var\s+(use[A-Z]\w*)\s*=/gm;
6650
6709
  const useNames = [];
6651
6710
  let match;
@@ -6695,7 +6754,7 @@ ${content.slice(firstUseIdx)}`;
6695
6754
  }, rewriteUrlReferences = (outputPaths, urlFileMap) => {
6696
6755
  const urlPattern = /new\s+URL\(\s*["'](\.\.?\/[^"']+)["']\s*,\s*import\.meta\.url\s*\)/g;
6697
6756
  for (const outputPath of outputPaths) {
6698
- let content = readFileSync9(outputPath, "utf-8");
6757
+ let content = readFileSync10(outputPath, "utf-8");
6699
6758
  let changed = false;
6700
6759
  content = content.replace(urlPattern, (_match, relPath) => {
6701
6760
  const targetName = basename7(relPath);
@@ -7350,7 +7409,7 @@ ${content.slice(firstUseIdx)}`;
7350
7409
  const injectHMRIntoHTMLFile = (filePath, framework) => {
7351
7410
  if (!hmrClientBundle)
7352
7411
  return;
7353
- let html = readFileSync9(filePath, "utf-8");
7412
+ let html = readFileSync10(filePath, "utf-8");
7354
7413
  if (html.includes("data-hmr-client"))
7355
7414
  return;
7356
7415
  const tag = `<script>window.__HMR_FRAMEWORK__="${framework}";</script><script data-hmr-client>${hmrClientBundle}</script>`;
@@ -7511,7 +7570,7 @@ var init_build = __esm(() => {
7511
7570
  });
7512
7571
 
7513
7572
  // src/dev/dependencyGraph.ts
7514
- import { existsSync as existsSync18, readFileSync as readFileSync10 } from "fs";
7573
+ import { existsSync as existsSync18, readFileSync as readFileSync11 } from "fs";
7515
7574
  var {Glob: Glob7 } = globalThis.Bun;
7516
7575
  import { resolve as resolve18 } from "path";
7517
7576
  var emptyDependencyGraph, tsTranspiler, jsTranspiler, loaderForFile = (filePath) => {
@@ -7672,15 +7731,15 @@ var emptyDependencyGraph, tsTranspiler, jsTranspiler, loaderForFile = (filePath)
7672
7731
  const lowerPath = filePath.toLowerCase();
7673
7732
  const isSvelteOrVue = lowerPath.endsWith(".svelte") || lowerPath.endsWith(".vue");
7674
7733
  if (loader === "html") {
7675
- const content = readFileSync10(filePath, "utf-8");
7734
+ const content = readFileSync11(filePath, "utf-8");
7676
7735
  return extractHtmlDependencies(filePath, content);
7677
7736
  }
7678
7737
  if (loader === "tsx" || loader === "js") {
7679
- const content = readFileSync10(filePath, "utf-8");
7738
+ const content = readFileSync11(filePath, "utf-8");
7680
7739
  return extractJsDependencies(filePath, content, loader);
7681
7740
  }
7682
7741
  if (isSvelteOrVue) {
7683
- const content = readFileSync10(filePath, "utf-8");
7742
+ const content = readFileSync11(filePath, "utf-8");
7684
7743
  return extractSvelteVueDependencies(filePath, content);
7685
7744
  }
7686
7745
  return [];
@@ -8147,7 +8206,7 @@ var init_assetStore = __esm(() => {
8147
8206
  });
8148
8207
 
8149
8208
  // src/islands/pageMetadata.ts
8150
- import { readFileSync as readFileSync11 } from "fs";
8209
+ import { readFileSync as readFileSync12 } from "fs";
8151
8210
  import { dirname as dirname11, resolve as resolve22 } from "path";
8152
8211
  var pagePatterns, getPageDirs = (config) => [
8153
8212
  { dir: config.angularDirectory, framework: "angular" },
@@ -8189,7 +8248,7 @@ var pagePatterns, getPageDirs = (config) => [
8189
8248
  return;
8190
8249
  const files = await scanEntryPoints(resolve22(entry.dir), pattern);
8191
8250
  for (const filePath of files) {
8192
- const source = readFileSync11(filePath, "utf-8");
8251
+ const source = readFileSync12(filePath, "utf-8");
8193
8252
  const islands = extractIslandUsagesFromSource(source);
8194
8253
  pageMetadata.set(resolve22(filePath), {
8195
8254
  islands: resolveIslandUsages(islands, islandSourceLookup),
@@ -8219,10 +8278,10 @@ var init_pageMetadata = __esm(() => {
8219
8278
  });
8220
8279
 
8221
8280
  // src/dev/fileHashTracker.ts
8222
- import { readFileSync as readFileSync12 } from "fs";
8281
+ import { readFileSync as readFileSync13 } from "fs";
8223
8282
  var computeFileHash = (filePath) => {
8224
8283
  try {
8225
- const fileContent = readFileSync12(filePath);
8284
+ const fileContent = readFileSync13(filePath);
8226
8285
  return Number(Bun.hash(fileContent));
8227
8286
  } catch {
8228
8287
  return UNFOUND_INDEX;
@@ -9779,7 +9838,7 @@ __export(exports_moduleServer, {
9779
9838
  createModuleServer: () => createModuleServer,
9780
9839
  SRC_URL_PREFIX: () => SRC_URL_PREFIX
9781
9840
  });
9782
- import { existsSync as existsSync20, readFileSync as readFileSync13, statSync as statSync2 } from "fs";
9841
+ import { existsSync as existsSync20, readFileSync as readFileSync14, statSync as statSync2 } from "fs";
9783
9842
  import { basename as basename12, dirname as dirname14, extname as extname6, resolve as resolve26, relative as relative10 } from "path";
9784
9843
  var SRC_PREFIX = "/@src/", jsTranspiler2, tsTranspiler2, tsxTranspiler, TRANSPILABLE, ALL_EXPORTS_RE, STRING_CONTENTS_RE, preserveTypeExports = (originalSource, transpiled, valueExports) => {
9785
9844
  const codeOnly = originalSource.replace(STRING_CONTENTS_RE, '""');
@@ -9912,7 +9971,7 @@ ${stubs}
9912
9971
  `)}
9913
9972
  ${code}`;
9914
9973
  }, reactTranspilerOptions, reactTranspiler, transformReactFile = (filePath, projectRoot, rewriter) => {
9915
- const raw = readFileSync13(filePath, "utf-8");
9974
+ const raw = readFileSync14(filePath, "utf-8");
9916
9975
  const valueExports = tsxTranspiler.scan(raw).exports;
9917
9976
  let transpiled = reactTranspiler.transformSync(raw);
9918
9977
  transpiled = preserveTypeExports(raw, transpiled, valueExports);
@@ -9928,7 +9987,7 @@ ${transpiled}`;
9928
9987
  transpiled += buildIslandMetadataExports(raw);
9929
9988
  return rewriteImports2(transpiled, filePath, projectRoot, rewriter);
9930
9989
  }, transformPlainFile = (filePath, projectRoot, rewriter, vueDir) => {
9931
- const raw = readFileSync13(filePath, "utf-8");
9990
+ const raw = readFileSync14(filePath, "utf-8");
9932
9991
  const ext = extname6(filePath);
9933
9992
  const isTS = ext === ".ts" || ext === ".tsx";
9934
9993
  const isTSX = ext === ".tsx" || ext === ".jsx";
@@ -10084,7 +10143,7 @@ ${code}`;
10084
10143
  ` + ` var __hmr_accept = function(cb) { window.__SVELTE_HMR_ACCEPT__[${JSON.stringify(moduleUrl)}] = cb; };`);
10085
10144
  return code.replace(/import\.meta\.hot\.accept\(/g, "__hmr_accept(");
10086
10145
  }, transformSvelteFile = async (filePath, projectRoot, rewriter) => {
10087
- const raw = readFileSync13(filePath, "utf-8");
10146
+ const raw = readFileSync14(filePath, "utf-8");
10088
10147
  if (!svelteCompiler) {
10089
10148
  svelteCompiler = await import("svelte/compiler");
10090
10149
  }
@@ -10142,7 +10201,7 @@ export default __script__;`;
10142
10201
  return `${cssInjection}
10143
10202
  ${code}`;
10144
10203
  }, transformVueFile = async (filePath, projectRoot, rewriter, vueDir) => {
10145
- const raw = readFileSync13(filePath, "utf-8");
10204
+ const raw = readFileSync14(filePath, "utf-8");
10146
10205
  if (!vueCompiler) {
10147
10206
  vueCompiler = await import("@vue/compiler-sfc");
10148
10207
  }
@@ -10191,7 +10250,7 @@ ${code}`;
10191
10250
  }
10192
10251
  });
10193
10252
  }, handleCssRequest = (filePath) => {
10194
- const raw = readFileSync13(filePath, "utf-8");
10253
+ const raw = readFileSync14(filePath, "utf-8");
10195
10254
  const escaped = raw.replace(/\\/g, "\\\\").replace(/`/g, "\\`").replace(/\$/g, "\\$");
10196
10255
  return [
10197
10256
  `const style = document.createElement('style');`,
@@ -12141,7 +12200,7 @@ var toSafeFileName5 = (specifier) => specifier.replace(/\//g, "_").replace(/@/g,
12141
12200
  return Array.from(specifiers).filter(isResolvable3);
12142
12201
  }, generateEntrySource2 = (specifier) => `export * from '${specifier}';
12143
12202
  `, rewriteVendorFiles = async (vendorDir) => {
12144
- const { readdirSync: readdirSync2, readFileSync: readFileSync14, writeFileSync: writeFileSync8 } = await import("fs");
12203
+ const { readdirSync: readdirSync2, readFileSync: readFileSync15, writeFileSync: writeFileSync8 } = await import("fs");
12145
12204
  const { computeVendorPaths: computeVendorPaths2 } = await Promise.resolve().then(() => (init_buildReactVendor(), exports_buildReactVendor));
12146
12205
  const reactPaths = Object.entries(computeVendorPaths2());
12147
12206
  const rewriteContent = (content) => reactPaths.reduce((acc, [specifier, webPath]) => {
@@ -12152,7 +12211,7 @@ var toSafeFileName5 = (specifier) => specifier.replace(/\//g, "_").replace(/@/g,
12152
12211
  const files = readdirSync2(vendorDir).filter((f) => f.endsWith(".js"));
12153
12212
  for (const file3 of files) {
12154
12213
  const filePath = join21(vendorDir, file3);
12155
- const original = readFileSync14(filePath, "utf-8");
12214
+ const original = readFileSync15(filePath, "utf-8");
12156
12215
  const rewritten = rewriteContent(original);
12157
12216
  if (rewritten !== original)
12158
12217
  writeFileSync8(filePath, rewritten);
@@ -12551,5 +12610,5 @@ export {
12551
12610
  build
12552
12611
  };
12553
12612
 
12554
- //# debugId=7D2C601E09E2659464756E2164756E21
12613
+ //# debugId=C5F50D50F93BCF4E64756E2164756E21
12555
12614
  //# sourceMappingURL=build.js.map