@absolutejs/absolute 0.20.0-beta.176 → 0.20.0-beta.178

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.
Files changed (82) hide show
  1. package/CHANGELOG.md +33 -0
  2. package/changelog.json +62 -0
  3. package/dist/angular/browser.js +17 -2
  4. package/dist/angular/browser.js.map +4 -4
  5. package/dist/angular/components/core/streamingSlotRegistrar.js +1 -1
  6. package/dist/angular/components/core/streamingSlotRegistry.js +2 -2
  7. package/dist/angular/index.js +57 -33
  8. package/dist/angular/index.js.map +9 -8
  9. package/dist/angular/server.js +57 -33
  10. package/dist/angular/server.js.map +9 -8
  11. package/dist/build.js +532 -416
  12. package/dist/build.js.map +15 -15
  13. package/dist/cli/{compile-w2z6c9vt.js → compile-p5yv6ecp.js} +2 -2
  14. package/dist/cli/config/server.js +45 -12
  15. package/dist/cli/{dev-8br5mr7t.js → dev-2hbcsvkp.js} +1 -1
  16. package/dist/cli/{index-420h9hq7.js → index-1ewba8ye.js} +32 -3
  17. package/dist/cli/{index-7z1hh3fg.js → index-9dzdbbfc.js} +1 -1
  18. package/dist/cli/index.js +7 -7
  19. package/dist/cli/{islands-bx67g15t.js → islands-6zgb7501.js} +1 -1
  20. package/dist/cli/{mobile-we5q51ey.js → mobile-c92dh8s2.js} +2 -2
  21. package/dist/cli/{start-srs11bm8.js → start-asxb79rc.js} +2 -2
  22. package/dist/cli/{typecheck-7fvww3b7.js → typecheck-m2j4tkdk.js} +165 -35
  23. package/dist/client/chunks/{index-8m2qq61n.js → index-58svs66p.js} +13 -3
  24. package/dist/client/chunks/{index-8m2qq61n.js.map → index-58svs66p.js.map} +5 -4
  25. package/dist/client/chunks/{islands-mfjmdwnb.js → islands-tcadmgcx.js} +3 -6
  26. package/dist/client/chunks/{islands-mfjmdwnb.js.map → islands-tcadmgcx.js.map} +3 -4
  27. package/dist/client/chunks/{react-sprprqzs.js → react-khr6ewhr.js} +2 -2
  28. package/dist/client/index.js +82 -6
  29. package/dist/client/index.js.map +7 -6
  30. package/dist/dev/client/handlers/islands.ts +2 -0
  31. package/dist/dev/client/handlers/react.ts +92 -111
  32. package/dist/dev/client/handlers/reactUpdateQueue.ts +153 -0
  33. package/dist/index.js +506 -389
  34. package/dist/index.js.map +16 -16
  35. package/dist/islands/browser.js +2 -2
  36. package/dist/islands/browser.js.map +3 -3
  37. package/dist/islands/index.js +13 -6
  38. package/dist/islands/index.js.map +6 -5
  39. package/dist/react/browser.js +113 -12
  40. package/dist/react/browser.js.map +10 -7
  41. package/dist/react/components/index.js +31 -7
  42. package/dist/react/components/index.js.map +5 -4
  43. package/dist/react/components/server/index.js +22 -6
  44. package/dist/react/index.js +190 -46
  45. package/dist/react/index.js.map +15 -11
  46. package/dist/react/server.js +82 -23
  47. package/dist/react/server.js.map +11 -9
  48. package/dist/src/build/compileSvelte.d.ts +12 -1
  49. package/dist/src/build/compileVue.d.ts +1 -0
  50. package/dist/src/build/islandEntries.d.ts +3 -1
  51. package/dist/src/cli/scripts/typecheck.d.ts +8 -0
  52. package/dist/src/cli/scripts/typecheckDiagnostics.d.ts +17 -0
  53. package/dist/src/client/preserveIslandMarkup.d.ts +4 -0
  54. package/dist/src/core/islandManifest.d.ts +6 -0
  55. package/dist/src/core/islandStylesheet.d.ts +17 -0
  56. package/dist/src/react/Island.d.ts +9 -2
  57. package/dist/src/react/IslandStyleLink.d.ts +11 -0
  58. package/dist/src/react/createIsland.d.ts +1 -1
  59. package/dist/src/react/serverComponents/nodeRendererRef.d.ts +13 -0
  60. package/dist/src/utils/requestRenderUrl.d.ts +1 -0
  61. package/dist/src/utils/resolveConvention.d.ts +1 -0
  62. package/dist/src/vue/Island.browser.d.ts +3 -1
  63. package/dist/src/vue/Island.d.ts +2 -2
  64. package/dist/src/vue/createIsland.browser.d.ts +2 -2
  65. package/dist/src/vue/createIsland.d.ts +2 -2
  66. package/dist/src/vue/islandStyleLink.d.ts +30 -0
  67. package/dist/svelte/browser.js +2 -2
  68. package/dist/svelte/browser.js.map +3 -3
  69. package/dist/svelte/index.js +51 -49
  70. package/dist/svelte/index.js.map +9 -8
  71. package/dist/svelte/server.js +48 -45
  72. package/dist/svelte/server.js.map +8 -7
  73. package/dist/types/globals.d.ts +3 -0
  74. package/dist/vue/browser.js +105 -10
  75. package/dist/vue/browser.js.map +10 -7
  76. package/dist/vue/index.js +170 -47
  77. package/dist/vue/index.js.map +14 -11
  78. package/dist/vue/server.js +81 -22
  79. package/dist/vue/server.js.map +9 -7
  80. package/package.json +1 -1
  81. /package/dist/cli/{index-6522t968.js → index-yd672jyq.js} +0 -0
  82. /package/dist/client/chunks/{react-sprprqzs.js.map → react-khr6ewhr.js.map} +0 -0
package/dist/build.js CHANGED
@@ -786,7 +786,7 @@ var ISLAND_BOOTSTRAP_MANIFEST_KEY = "AbsoluteIslandBootstrap", LEGACY_ISLAND_BOO
786
786
  islands[framework] = entries;
787
787
  }
788
788
  return islands;
789
- }, getIslandManifestKey = (framework, component) => `Island${toIslandFrameworkSegment(framework)}${component}`;
789
+ }, getIslandManifestKey = (framework, component) => `Island${toIslandFrameworkSegment(framework)}${component}`, ISLAND_STYLE_PREFIX = "IslandStyle", getIslandStyleManifestEntries = (manifest) => Object.entries(manifest).filter(([key]) => key.startsWith(ISLAND_STYLE_PREFIX)), getIslandStyleManifestKey = (framework, component) => `${ISLAND_STYLE_PREFIX}${toIslandFrameworkSegment(framework)}${component}`;
790
790
 
791
791
  // src/utils/runtimeMode.ts
792
792
  var ENV_VAR = "NODE_ENV", readEnv = () => typeof process === "undefined" ? undefined : process.env?.[ENV_VAR], getNodeEnv = () => readEnv(), isDevelopmentRuntime = () => readEnv() === "development", isProductionRuntime = () => readEnv() === "production";
@@ -1011,6 +1011,11 @@ var getManifestKey = (folder, pascalName, isClientComponent, isReact, isVue, isS
1011
1011
  if (ext === ".css") {
1012
1012
  if (segments.includes("server"))
1013
1013
  return manifest;
1014
+ const islandStyleFramework = islandIndex > UNFOUND_INDEX ? segments[islandIndex + 1] : undefined;
1015
+ if (islandStyleFramework === "react" || islandStyleFramework === "svelte" || islandStyleFramework === "vue" || islandStyleFramework === "angular") {
1016
+ manifest[getIslandStyleManifestKey(islandStyleFramework, pascalName)] = `/${relative}`;
1017
+ return manifest;
1018
+ }
1014
1019
  const cssKey = getCssKey(pascalName, segments);
1015
1020
  if (manifest[cssKey] && manifest[cssKey] !== `/${relative}`)
1016
1021
  logWarn(`Duplicate manifest key "${cssKey}" \u2014 "${manifest[cssKey]}" will be overwritten by "/${relative}". Use unique page names across frameworks.`);
@@ -1417,10 +1422,12 @@ export default component;
1417
1422
  sources[definition.framework] = frameworkSources;
1418
1423
  }
1419
1424
  return sources;
1420
- }, generateIslandEntryPoints = async ({
1425
+ }, createCssImports = (entryPath, cssPaths) => cssPaths.map((cssPath) => `import ${JSON.stringify(normalizeImportPath(entryPath, cssPath))};
1426
+ `).join(""), generateIslandEntryPoints = async ({
1421
1427
  buildInfo,
1422
1428
  buildPath,
1423
- clientPathMaps = {}
1429
+ clientPathMaps = {},
1430
+ cssPathMaps = {}
1424
1431
  }) => {
1425
1432
  const generatedRoot = join2(buildPath, "_island_entries");
1426
1433
  rmSync(generatedRoot, { force: true, recursive: true });
@@ -1431,8 +1438,9 @@ export default component;
1431
1438
  const source = buildReference ? resolveIslandSourcePath(buildInfo.resolvedRegistryPath, buildReference.source) : null;
1432
1439
  const compiledSourcePath = source && shouldUseCompiledClientPath(definition.framework, source) ? clientPathMaps[definition.framework]?.get(source) : undefined;
1433
1440
  const entrySource = source && (compiledSourcePath || !shouldUseCompiledClientPath(definition.framework, source)) ? createDirectEntrySource(entryPath, compiledSourcePath ?? source, compiledSourcePath ? undefined : buildReference?.export) : createRegistryEntrySource(entryPath, buildInfo.resolvedRegistryPath, buildInfo.hasNamedExport, definition.framework, definition.component);
1441
+ const cssPaths = source ? cssPathMaps[definition.framework]?.get(source) ?? [] : [];
1434
1442
  mkdirSync2(dirname(entryPath), { recursive: true });
1435
- writeFileSync2(entryPath, entrySource);
1443
+ writeFileSync2(entryPath, `${createCssImports(entryPath, cssPaths)}${entrySource}`);
1436
1444
  entries.push({
1437
1445
  component: definition.component,
1438
1446
  entryPath,
@@ -2036,6 +2044,22 @@ export const renderHtml = (flight, options) => {
2036
2044
 
2037
2045
  return renderToReadableStream(createElement(Root), options);
2038
2046
  };
2047
+
2048
+ // A fragment (a SuspenseSlot's resolved content) rendered to an HTML string.
2049
+ export const renderStaticHtml = async (flight) => {
2050
+ const root = createFromReadableStream(flight, {
2051
+ serverConsumerManifest: {
2052
+ moduleLoading: null,
2053
+ moduleMap,
2054
+ serverModuleMap: null
2055
+ }
2056
+ });
2057
+ const Root = () => use(root);
2058
+ const stream = await renderToReadableStream(createElement(Root));
2059
+ await stream.allReady;
2060
+
2061
+ return new Response(stream).text();
2062
+ };
2039
2063
  `;
2040
2064
  }, clientRuntimeSource = (modules) => {
2041
2065
  const loaders = modules.map((module) => ` ${JSON.stringify(module.id)}: () => import(${JSON.stringify(module.path)})`);
@@ -2061,7 +2085,7 @@ globalThis.__webpack_chunk_load__ = (id) => {
2061
2085
  }, clientEntrySource = () => `import './ReactServerClientRuntime';
2062
2086
  import { createFromReadableStream } from 'react-server-dom-webpack/client.browser';
2063
2087
  import { hydrateRoot } from 'react-dom/client';
2064
- import { createElement, use } from 'react';
2088
+ import { createElement, use, useEffect } from 'react';
2065
2089
 
2066
2090
  const encoder = new TextEncoder();
2067
2091
  const stream = new ReadableStream({
@@ -2083,7 +2107,21 @@ const stream = new ReadableStream({
2083
2107
  }
2084
2108
  });
2085
2109
  const root = createFromReadableStream(stream);
2086
- const Root = () => use(root);
2110
+ // The page's inline bootstrap holds streamed slot content back
2111
+ // (__ABS_SLOT_HYDRATION_PENDING__) so hydration compares against the HTML the
2112
+ // server rendered: a slot whose fallback is a React node would otherwise
2113
+ // mismatch, and React's client re-render would drop every patched slot.
2114
+ const releaseStreamingSlots = () => {
2115
+ self.__ABS_SLOT_HYDRATION_PENDING__ = false;
2116
+ if (typeof self.__ABS_SLOT_FLUSH__ === 'function') self.__ABS_SLOT_FLUSH__();
2117
+ };
2118
+ const Root = () => {
2119
+ useEffect(() => {
2120
+ setTimeout(releaseStreamingSlots, 0);
2121
+ }, []);
2122
+
2123
+ return use(root);
2124
+ };
2087
2125
  hydrateRoot(document, createElement(Root));
2088
2126
  `, findOutput = (outputs, name) => outputs.find((artifact) => artifact.kind === "entry-point" && basename2(artifact.path).startsWith(`${name}.`)), toWebPath2 = (buildPath, path) => `/${relative4(buildPath, path).replace(/\\/g, "/")}`, assertFlightPackage = (projectRoot) => {
2089
2127
  try {
@@ -5284,9 +5322,9 @@ var createVueCompiler = async () => {
5284
5322
  // src/core/vueServerModule.ts
5285
5323
  import { readFileSync as readFileSync6, realpathSync } from "fs";
5286
5324
  import { mkdir as mkdir3 } from "fs/promises";
5287
- import { dirname as dirname6, join as join11, relative as relative8, resolve as resolve11 } from "path";
5325
+ import { basename as basename4, dirname as dirname6, join as join11, relative as relative8, resolve as resolve11 } from "path";
5288
5326
  var {Transpiler: Transpiler2 } = globalThis.Bun;
5289
- var ISLAND_COMPONENT_ID_LENGTH = 8, serverCacheRoot3, compiledModuleCache3, syncIslandGeneration2, transpiler2, ensureRelativeImportPath2 = (from, target) => {
5327
+ var serverCacheRoot3, compiledModuleCache3, syncIslandGeneration2, transpiler2, ensureRelativeImportPath2 = (from, target) => {
5290
5328
  const importPath = relative8(dirname6(from), target).replace(/\\/g, "/");
5291
5329
  return importPath.startsWith(".") ? importPath : `./${importPath}`;
5292
5330
  }, getCachedModulePath3 = (sourcePath) => {
@@ -5328,7 +5366,7 @@ var ISLAND_COMPONENT_ID_LENGTH = 8, serverCacheRoot3, compiledModuleCache3, sync
5328
5366
  const compiler = await loadVueCompiler();
5329
5367
  const source = await Bun.file(sourcePath).text();
5330
5368
  const { descriptor } = compiler.parse(source, { filename: sourcePath });
5331
- const componentId = Bun.hash(sourcePath).toString(BASE_36_RADIX).slice(0, ISLAND_COMPONENT_ID_LENGTH);
5369
+ const componentId = toKebab(basename4(sourcePath, ".vue"));
5332
5370
  const hasScript = descriptor.script || descriptor.scriptSetup;
5333
5371
  const compiledScript = hasScript ? compiler.compileScript(descriptor, {
5334
5372
  fs: {
@@ -5378,7 +5416,6 @@ var ISLAND_COMPONENT_ID_LENGTH = 8, serverCacheRoot3, compiledModuleCache3, sync
5378
5416
  return compiledModulePath;
5379
5417
  };
5380
5418
  var init_vueServerModule = __esm(() => {
5381
- init_constants();
5382
5419
  init_isFile();
5383
5420
  serverCacheRoot3 = join11(process.cwd(), ".absolutejs", "islands", "vue");
5384
5421
  compiledModuleCache3 = new Map;
@@ -5846,11 +5883,11 @@ var STAMP_SETTLE_MS = 2000, createStampedFileCache = () => {
5846
5883
  var init_stampedFileCache = () => {};
5847
5884
 
5848
5885
  // src/build/scanConventions.ts
5849
- import { basename as basename4 } from "path";
5886
+ import { basename as basename5 } from "path";
5850
5887
  var {Glob: Glob4 } = globalThis.Bun;
5851
5888
  import { existsSync as existsSync8 } from "fs";
5852
- var CONVENTION_RE, isConventionFile = (fileName) => CONVENTION_RE.test(basename4(fileName)), classifyFile = (file, pageFiles, defaults, pages) => {
5853
- const fileName = basename4(file);
5889
+ var CONVENTION_RE, isConventionFile = (fileName) => CONVENTION_RE.test(basename5(fileName)), classifyFile = (file, pageFiles, defaults, pages) => {
5890
+ const fileName = basename5(file);
5854
5891
  const match = CONVENTION_RE.exec(fileName);
5855
5892
  if (!match) {
5856
5893
  pageFiles.push(file);
@@ -6064,18 +6101,18 @@ var init_htmlIncludes = () => {};
6064
6101
 
6065
6102
  // src/build/spaSideManifests.ts
6066
6103
  import { writeFile as writeFile3 } from "fs/promises";
6067
- import { basename as basename5, dirname as dirname8, relative as relative11, resolve as resolve13 } from "path";
6104
+ import { basename as basename6, dirname as dirname8, relative as relative11, resolve as resolve13 } from "path";
6068
6105
  var writeSpaSideManifests = async (spaRoutesBySource, resolveServerJsPath) => {
6069
6106
  const manifestEntries = {};
6070
6107
  await Promise.all([...spaRoutesBySource.entries()].map(async ([source, routes]) => {
6071
- const parentName = basename5(source, ".vue");
6108
+ const parentName = basename6(source, ".vue");
6072
6109
  const parentJsPath = resolveServerJsPath(parentName);
6073
6110
  if (!parentJsPath)
6074
6111
  return;
6075
6112
  const sourceDir = dirname8(source);
6076
6113
  const entries = routes.flatMap(({ path, importPath }) => {
6077
6114
  const childSourcePath = resolve13(sourceDir, importPath);
6078
- const childName = basename5(childSourcePath, ".vue");
6115
+ const childName = basename6(childSourcePath, ".vue");
6079
6116
  const childJsPath = resolveServerJsPath(childName);
6080
6117
  if (!childJsPath)
6081
6118
  return [];
@@ -6301,7 +6338,7 @@ var init_serverExternals = __esm(() => {
6301
6338
 
6302
6339
  // src/build/islandBootstrap.ts
6303
6340
  import { mkdirSync as mkdirSync5, writeFileSync as writeFileSync5 } from "fs";
6304
- import { basename as basename6, dirname as dirname10, extname as extname8, join as join14, relative as relative12 } from "path";
6341
+ import { basename as basename7, dirname as dirname10, extname as extname8, join as join14, relative as relative12 } from "path";
6305
6342
  var DEFAULT_ISLAND_BOOTSTRAP_NAME = "absoluteIslandBootstrap", DEFAULT_ISLAND_BOOTSTRAP_SOURCE = `import {
6306
6343
  createIslandManifestResolver,
6307
6344
  startIslands
@@ -6317,7 +6354,7 @@ startIslands({
6317
6354
  writeFileSync5(entryPath, DEFAULT_ISLAND_BOOTSTRAP_SOURCE);
6318
6355
  return entryPath;
6319
6356
  }, artifactStem = (artifact) => {
6320
- const fileName = basename6(artifact.path);
6357
+ const fileName = basename7(artifact.path);
6321
6358
  const stem = fileName.slice(0, fileName.length - extname8(fileName).length);
6322
6359
  const hashSuffix = artifact.hash ? `.${artifact.hash}` : "";
6323
6360
  return hashSuffix && stem.endsWith(hashSuffix) ? stem.slice(0, stem.length - hashSuffix.length) : stem;
@@ -6328,7 +6365,7 @@ startIslands({
6328
6365
  passRoot
6329
6366
  }) => {
6330
6367
  const expectedDir = passRoot === undefined ? undefined : normalizePath(join14(buildPath, relative12(passRoot, dirname10(bootstrapPath))));
6331
- const expectedStem = basename6(bootstrapPath, extname8(bootstrapPath));
6368
+ const expectedStem = basename7(bootstrapPath, extname8(bootstrapPath));
6332
6369
  const artifact = outputs.find((output) => output.kind === "entry-point" && extname8(output.path) === ".js" && (expectedDir === undefined || normalizePath(dirname10(output.path)) === expectedDir) && artifactStem(output) === expectedStem);
6333
6370
  if (!artifact)
6334
6371
  return;
@@ -13476,7 +13513,7 @@ var init_rewriteReactImports = __esm(() => {
13476
13513
  });
13477
13514
 
13478
13515
  // src/build/rewriteClientOutputs.ts
13479
- import { basename as basename7 } from "path";
13516
+ import { basename as basename8 } from "path";
13480
13517
  var reduceVendorPaths = (vendorPaths, reactPaths) => Object.fromEntries(Object.entries(vendorPaths).filter(([specifier, webPath]) => reactPaths[specifier] !== webPath)), hasEntries = (paths) => Object.keys(paths).length > 0, compileClientRewriteFamilies = (options) => {
13481
13518
  const reactPaths = options.reactPaths ?? {};
13482
13519
  const react = hasEntries(reactPaths) ? compileSpecifierRewriter(reactPaths) : undefined;
@@ -13544,7 +13581,7 @@ var reduceVendorPaths = (vendorPaths, reactPaths) => Object.fromEntries(Object.e
13544
13581
  if (!content.includes("URL("))
13545
13582
  return content;
13546
13583
  return content.replace(URL_REFERENCE_PATTERN, (match, relPath) => {
13547
- const resolvedPath = urlFileMap.get(basename7(relPath));
13584
+ const resolvedPath = urlFileMap.get(basename8(relPath));
13548
13585
  if (!resolvedPath)
13549
13586
  return match;
13550
13587
  return `new URL('${resolvedPath}', import.meta.url)`;
@@ -13854,7 +13891,7 @@ var init_fileRoutes = __esm(() => {
13854
13891
 
13855
13892
  // src/dev/lazyPages.ts
13856
13893
  import { existsSync as existsSync24 } from "fs";
13857
- import { basename as basename8, extname as extname11, isAbsolute as isAbsolute5, join as join27, resolve as resolve19 } from "path";
13894
+ import { basename as basename9, extname as extname11, isAbsolute as isAbsolute5, join as join27, resolve as resolve19 } from "path";
13858
13895
  var PAGE_EXTENSIONS2, KEY_SUFFIXES, SRC_URL_PREFIX = "/@src/", isTruthyFlag = (value) => value === "1" || value === "true", looksLikePath = (value) => value.includes("/") || value.includes("\\") || value.startsWith("."), probeDirForName = ({ dir, framework }, name) => {
13859
13896
  const extension = PAGE_EXTENSIONS2[framework].find((ext) => existsSync24(join27(dir, `${name}${ext}`)));
13860
13897
  return extension === undefined ? undefined : toDevPageEntry(framework, join27(dir, `${name}${extension}`));
@@ -13929,7 +13966,7 @@ var PAGE_EXTENSIONS2, KEY_SUFFIXES, SRC_URL_PREFIX = "/@src/", isTruthyFlag = (v
13929
13966
  const resolved = resolve19(source);
13930
13967
  const entry = {
13931
13968
  framework,
13932
- name: fileRouteFor(resolved)?.name ?? toPascal(basename8(resolved, extname11(resolved))),
13969
+ name: fileRouteFor(resolved)?.name ?? toPascal(basename9(resolved, extname11(resolved))),
13933
13970
  source: resolved
13934
13971
  };
13935
13972
  return entry;
@@ -14125,7 +14162,7 @@ var init_bunStringRawUnicodePlugin = __esm(() => {
14125
14162
 
14126
14163
  // src/build/externalAssetPlugin.ts
14127
14164
  import { copyFileSync, existsSync as existsSync26, mkdirSync as mkdirSync10, statSync as statSync4 } from "fs";
14128
- import { basename as basename9, dirname as dirname18, join as join29, resolve as resolve21 } from "path";
14165
+ import { basename as basename10, dirname as dirname18, join as join29, resolve as resolve21 } from "path";
14129
14166
  var createExternalAssetPlugin = (outDir, userSourceRoots = []) => ({
14130
14167
  name: "absolute-external-asset",
14131
14168
  setup(bld) {
@@ -14150,7 +14187,7 @@ var createExternalAssetPlugin = (outDir, userSourceRoots = []) => ({
14150
14187
  continue;
14151
14188
  if (!statSync4(assetPath).isFile())
14152
14189
  continue;
14153
- const targetPath = join29(outDir, basename9(assetPath));
14190
+ const targetPath = join29(outDir, basename10(assetPath));
14154
14191
  if (existsSync26(targetPath))
14155
14192
  continue;
14156
14193
  mkdirSync10(dirname18(targetPath), { recursive: true });
@@ -14163,7 +14200,7 @@ var createExternalAssetPlugin = (outDir, userSourceRoots = []) => ({
14163
14200
  var init_externalAssetPlugin = () => {};
14164
14201
 
14165
14202
  // src/build/islandRegistryTransform.ts
14166
- import { basename as basename10 } from "path";
14203
+ import { basename as basename11 } from "path";
14167
14204
  var VALID_FRAMEWORKS, getObjectPropertyName2 = (name) => lazyTypescript.isIdentifier(name) || lazyTypescript.isStringLiteral(name) ? name.text : null, isIslandRegistryHelperImport2 = (source) => source === "@absolutejs/absolute/islands" || source.endsWith("/islands") || source.endsWith("/core/islands"), collectRegistryFactory = (sourceFile) => {
14168
14205
  const factoryNames = new Set;
14169
14206
  const namespaceNames = new Set;
@@ -14326,7 +14363,7 @@ var VALID_FRAMEWORKS, getObjectPropertyName2 = (name) => lazyTypescript.isIdenti
14326
14363
  }
14327
14364
  return "ts";
14328
14365
  }, createIslandRegistryDefinitionPlugin = (info) => {
14329
- const registryBase = basename10(info.resolvedRegistryPath).replace(/\.[mc]?[jt]sx?$/, "");
14366
+ const registryBase = basename11(info.resolvedRegistryPath).replace(/\.[mc]?[jt]sx?$/, "");
14330
14367
  const filter = new RegExp(`(^|[/\\\\])${escapeRegExp3(registryBase)}\\.[mc]?[jt]sx?$`);
14331
14368
  return {
14332
14369
  name: "absolute-island-registry-definitions",
@@ -14413,7 +14450,7 @@ var init_vueModuleOutputPath = __esm(() => {
14413
14450
 
14414
14451
  // src/build/injectVueComposableTracking.ts
14415
14452
  import { existsSync as existsSync27, readFileSync as readFileSync19, writeFileSync as writeFileSync10 } from "fs";
14416
- import { basename as basename11, isAbsolute as isAbsolute7, relative as relative16, resolve as resolve23 } from "path";
14453
+ import { basename as basename12, isAbsolute as isAbsolute7, relative as relative16, resolve as resolve23 } from "path";
14417
14454
  var VUE_HMR_RUNTIME, USE_DECLARATION, MODULE_COMMENT, LINE_TERMINATOR, STATEMENT_OPENER, SOURCE_EXTENSIONS2, CHUNK_REFERENCE, isSharedChunkFile = (fileName) => fileName.startsWith("chunk-") && fileName.endsWith(".js"), collectModuleComments = (content) => Array.from(content.matchAll(MODULE_COMMENT), (match) => ({
14418
14455
  index: match.index,
14419
14456
  path: match[1] ?? ""
@@ -14454,7 +14491,7 @@ var VUE_HMR_RUNTIME, USE_DECLARATION, MODULE_COMMENT, LINE_TERMINATOR, STATEMENT
14454
14491
  return text;
14455
14492
  return `${text.slice(0, declaration.exprStart)}__hmr_wrap(${JSON.stringify(moduleId)}, ${JSON.stringify(declaration.name)}, ${expression})${text.slice(end)}`;
14456
14493
  }, collectVueHmrOutputPaths = (vueOutputPaths, chunkOutputPaths) => {
14457
- const chunkByName = new Map(chunkOutputPaths.filter(isSharedChunkPath).map((path) => [basename11(path), path]));
14494
+ const chunkByName = new Map(chunkOutputPaths.filter(isSharedChunkPath).map((path) => [basename12(path), path]));
14458
14495
  const selected = new Set(vueOutputPaths);
14459
14496
  if (chunkByName.size === 0)
14460
14497
  return [...selected];
@@ -14514,7 +14551,7 @@ var VUE_HMR_RUNTIME, USE_DECLARATION, MODULE_COMMENT, LINE_TERMINATOR, STATEMENT
14514
14551
  const insertAt = firstDeclaration?.start ?? 0;
14515
14552
  return restore(`${wrapped.slice(0, insertAt)}${VUE_HMR_RUNTIME}
14516
14553
  ${wrapped.slice(insertAt)}`);
14517
- }, isSharedChunkPath = (path) => isSharedChunkFile(basename11(path)), resolveVueComposableModuleId = (commentPath, options) => {
14554
+ }, isSharedChunkPath = (path) => isSharedChunkFile(basename12(path)), resolveVueComposableModuleId = (commentPath, options) => {
14518
14555
  const absolutePath = resolve23(options.projectRoot, commentPath);
14519
14556
  const { vueDir, generatedVueDir } = options;
14520
14557
  if (!vueDir || !generatedVueDir)
@@ -14960,8 +14997,14 @@ var commonAncestor = (paths, fallback) => {
14960
14997
  var init_commonAncestor = () => {};
14961
14998
 
14962
14999
  // src/utils/buildDirectoryLock.ts
14963
- import { mkdirSync as mkdirSync12, unlinkSync, writeFileSync as writeFileSync12, readFileSync as readFileSync21 } from "fs";
14964
- import { dirname as dirname20, join as join34 } from "path";
15000
+ import {
15001
+ mkdirSync as mkdirSync12,
15002
+ readFileSync as readFileSync21,
15003
+ realpathSync as realpathSync3,
15004
+ unlinkSync,
15005
+ writeFileSync as writeFileSync12
15006
+ } from "fs";
15007
+ import { dirname as dirname20, join as join34, resolve as resolve26 } from "path";
14965
15008
  var heldLocks, HELD_LOCKS_ENV = "ABSOLUTE_HELD_BUILD_DIRECTORY_LOCKS", exitHandlersRegistered = false, registerExitHandlersOnce = () => {
14966
15009
  if (exitHandlersRegistered)
14967
15010
  return;
@@ -15004,6 +15047,13 @@ var heldLocks, HELD_LOCKS_ENV = "ABSOLUTE_HELD_BUILD_DIRECTORY_LOCKS", exitHandl
15004
15047
  const locks = readHeldLockEnv();
15005
15048
  locks.delete(buildDirectory);
15006
15049
  writeHeldLockEnv(locks);
15050
+ }, lockProjectRoot = (buildDirectory) => {
15051
+ const projectRoot = dirname20(resolve26(buildDirectory));
15052
+ try {
15053
+ return realpathSync3.native(projectRoot);
15054
+ } catch {
15055
+ return projectRoot;
15056
+ }
15007
15057
  }, writeLockFileSync = (lockPath, metadata) => {
15008
15058
  mkdirSync12(dirname20(lockPath), { recursive: true });
15009
15059
  writeFileSync12(lockPath, JSON.stringify(metadata, null, 2), { flag: "wx" });
@@ -15012,11 +15062,13 @@ var heldLocks, HELD_LOCKS_ENV = "ABSOLUTE_HELD_BUILD_DIRECTORY_LOCKS", exitHandl
15012
15062
  const raw = readFileSync21(lockPath, "utf-8");
15013
15063
  const parsed = JSON.parse(raw);
15014
15064
  if (typeof parsed === "object" && parsed !== null && typeof parsed.pid === "number") {
15015
- return {
15065
+ const metadata = {
15016
15066
  pid: parsed.pid,
15017
15067
  port: typeof parsed.port === "number" ? parsed.port : null,
15068
+ projectRoot: typeof parsed.projectRoot === "string" ? parsed.projectRoot : undefined,
15018
15069
  startedAt: typeof parsed.startedAt === "string" ? parsed.startedAt : new Date().toISOString()
15019
15070
  };
15071
+ return metadata;
15020
15072
  }
15021
15073
  } catch {}
15022
15074
  return null;
@@ -15037,6 +15089,11 @@ var heldLocks, HELD_LOCKS_ENV = "ABSOLUTE_HELD_BUILD_DIRECTORY_LOCKS", exitHandl
15037
15089
  unlinkSync(lockPath);
15038
15090
  console.warn(`[absolutejs] removed stale lock from PID ${pid}`);
15039
15091
  } catch {}
15092
+ }, removeForeignLockSync = (lockPath, existing) => {
15093
+ try {
15094
+ unlinkSync(lockPath);
15095
+ console.warn(`[absolutejs] removed a build lock copied from ${existing.projectRoot} (PID ${existing.pid} holds the original project, not this one)`);
15096
+ } catch {}
15040
15097
  }, LOCK_POLL_MS = 250, DEFAULT_WAIT_TIMEOUT_MS = 120000, acquireBuildDirectoryLock = async (buildDirectory, options = {}) => {
15041
15098
  registerExitHandlersOnce();
15042
15099
  if (readHeldLockEnv().has(buildDirectory)) {
@@ -15058,9 +15115,11 @@ var heldLocks, HELD_LOCKS_ENV = "ABSOLUTE_HELD_BUILD_DIRECTORY_LOCKS", exitHandl
15058
15115
  const waitTimeoutMs = options.waitTimeoutMs ?? DEFAULT_WAIT_TIMEOUT_MS;
15059
15116
  const start = Date.now();
15060
15117
  const tryCreate = () => {
15118
+ mkdirSync12(dirname20(lockPath), { recursive: true });
15061
15119
  writeLockFileSync(lockPath, {
15062
15120
  pid: process.pid,
15063
15121
  port: options.port ?? null,
15122
+ projectRoot: lockProjectRoot(buildDirectory),
15064
15123
  startedAt: new Date().toISOString()
15065
15124
  });
15066
15125
  };
@@ -15082,6 +15141,10 @@ var heldLocks, HELD_LOCKS_ENV = "ABSOLUTE_HELD_BUILD_DIRECTORY_LOCKS", exitHandl
15082
15141
  removeStaleLockSync(lockPath, existing.pid);
15083
15142
  continue;
15084
15143
  }
15144
+ if (existing.projectRoot !== undefined && existing.projectRoot !== lockProjectRoot(buildDirectory)) {
15145
+ removeForeignLockSync(lockPath, existing);
15146
+ continue;
15147
+ }
15085
15148
  if (wait && Date.now() - start < waitTimeoutMs) {
15086
15149
  await Bun.sleep(LOCK_POLL_MS);
15087
15150
  continue;
@@ -15238,7 +15301,7 @@ var init_ssrErrorPage = __esm(() => {
15238
15301
  });
15239
15302
 
15240
15303
  // src/utils/resolveConvention.ts
15241
- import { basename as basename12 } from "path";
15304
+ import { basename as basename13 } from "path";
15242
15305
  var CONVENTIONS_KEY = "__absoluteConventions", isConventionsMap = (value) => Boolean(value) && typeof value === "object", getMap = () => {
15243
15306
  const value = Reflect.get(globalThis, CONVENTIONS_KEY);
15244
15307
  if (isConventionsMap(value))
@@ -15246,7 +15309,7 @@ var CONVENTIONS_KEY = "__absoluteConventions", isConventionsMap = (value) => Boo
15246
15309
  const empty = {};
15247
15310
  return empty;
15248
15311
  }, derivePageName = (pagePath) => {
15249
- const base = basename12(pagePath);
15312
+ const base = basename13(pagePath);
15250
15313
  const dotIndex = base.indexOf(".");
15251
15314
  const name = dotIndex > 0 ? base.slice(0, dotIndex) : base;
15252
15315
  return toPascal(name);
@@ -15387,6 +15450,12 @@ var CONVENTIONS_KEY = "__absoluteConventions", isConventionsMap = (value) => Boo
15387
15450
  logConventionRenderError(framework, "error", renderError);
15388
15451
  }
15389
15452
  return null;
15453
+ }, isPageRequest = (request) => {
15454
+ if (request.headers.get("hx-request") === "true")
15455
+ return true;
15456
+ if (request.headers.get("sec-fetch-dest") === "document")
15457
+ return true;
15458
+ return (request.headers.get("accept") ?? "").includes("text/html");
15390
15459
  }, renderConventionError = async (framework, pageName, error) => {
15391
15460
  const errorProps = buildErrorProps(error);
15392
15461
  const frameworkResponse = await tryFrameworkErrorConvention(framework, pageName, errorProps, error);
@@ -15398,12 +15467,6 @@ var CONVENTIONS_KEY = "__absoluteConventions", isConventionsMap = (value) => Boo
15398
15467
  return htmlResponse;
15399
15468
  }
15400
15469
  return null;
15401
- }, isPageRequest = (request) => {
15402
- if (request.headers.get("hx-request") === "true")
15403
- return true;
15404
- if (request.headers.get("sec-fetch-dest") === "document")
15405
- return true;
15406
- return (request.headers.get("accept") ?? "").includes("text/html");
15407
15470
  }, renderStaticRouteError = async (request, error) => {
15408
15471
  if (!isPageRequest(request))
15409
15472
  return null;
@@ -15545,7 +15608,7 @@ var init_resolveConvention = __esm(() => {
15545
15608
  });
15546
15609
 
15547
15610
  // src/utils/spaRouteManifest.ts
15548
- import { basename as basename13 } from "path";
15611
+ import { basename as basename14 } from "path";
15549
15612
  var SPA_ROUTES_KEY = "__absoluteSpaRoutes", setSpaRouteManifest = (hosts) => {
15550
15613
  Reflect.set(globalThis, SPA_ROUTES_KEY, hosts);
15551
15614
  }, isRuntimeSpaHost = (value) => typeof value === "object" && value !== null && typeof Reflect.get(value, "framework") === "string", getSpaRouteManifest = () => {
@@ -15581,7 +15644,7 @@ var SPA_ROUTES_KEY = "__absoluteSpaRoutes", setSpaRouteManifest = (hosts) => {
15581
15644
  expression += `/${segment.replace(/[.+?^${}()|[\]\\]/g, "\\$&")}`;
15582
15645
  }
15583
15646
  return new RegExp(`${expression || "^/"}/?$`);
15584
- }, sourcePageName = (sourceFile) => basename13(sourceFile).replace(/\.[^.]+$/, "").toLowerCase(), isKnownSpaRoute = (framework, pageName, request) => {
15647
+ }, sourcePageName = (sourceFile) => basename14(sourceFile).replace(/\.[^.]+$/, "").toLowerCase(), isKnownSpaRoute = (framework, pageName, request) => {
15585
15648
  if (!request)
15586
15649
  return true;
15587
15650
  let pathname;
@@ -15621,7 +15684,7 @@ var isTestSourcePath = (file) => {
15621
15684
 
15622
15685
  // src/mobile/deviceCapabilities.ts
15623
15686
  import { existsSync as existsSync29, readFileSync as readFileSync22 } from "fs";
15624
- import { extname as extname13, join as join35, relative as relative19, resolve as resolve26 } from "path";
15687
+ import { extname as extname13, join as join35, relative as relative19, resolve as resolve27 } from "path";
15625
15688
  import { fileURLToPath as fileURLToPath3 } from "url";
15626
15689
  var DEVICES_PACKAGE = "@absolutejs/devices", ABSOLUTE_MOBILE_SHELL_DEVICE_CAPABILITIES, ADAPTERS2, SOURCE_GLOB, IGNORED_DIRECTORIES, IDENTIFIER_PATTERN, providerModulePattern = (provider) => new RegExp(`^@absolutejs/devices-${provider}/[a-z][a-z0-9-]*$`, "u"), providerPackagePattern = (provider) => provider === "capacitor" ? /^@capacitor\/[a-z][a-z0-9-]*@\d+\.\d+\.\d+$/u : /^(?:expo-[a-z][a-z0-9-]*|@react-native-[a-z0-9-]+\/[a-z][a-z0-9-]*)@\d+\.\d+\.\d+$/u, providerLabel = (provider) => provider === "capacitor" ? "Capacitor" : "Expo", ANDROID_PERMISSION_PATTERN, IOS_USAGE_DESCRIPTIONS, IOS_PRIVACY_ACCESSED_API_REASONS, IOS_PRIVACY_ACCESSED_APIS, object = (value) => typeof value === "object" && value !== null && !Array.isArray(value), readJson = (path) => {
15627
15690
  const value = JSON.parse(readFileSync22(path, "utf8"));
@@ -15754,7 +15817,7 @@ var DEVICES_PACKAGE = "@absolutejs/devices", ABSOLUTE_MOBILE_SHELL_DEVICE_CAPABI
15754
15817
  }
15755
15818
  }, loadAbsoluteDeviceCapabilityProviders = (projectRoot, provider = "capacitor") => {
15756
15819
  const adapter = ADAPTERS2[provider];
15757
- let path = join35(resolve26(projectRoot), "node_modules", adapter, "package.json");
15820
+ let path = join35(resolve27(projectRoot), "node_modules", adapter, "package.json");
15758
15821
  try {
15759
15822
  readFileSync22(path, "utf8");
15760
15823
  } catch {
@@ -15809,7 +15872,7 @@ var DEVICES_PACKAGE = "@absolutejs/devices", ABSOLUTE_MOBILE_SHELL_DEVICE_CAPABI
15809
15872
  if (missing.includes(spec))
15810
15873
  return false;
15811
15874
  try {
15812
- return readJson(join35(resolve26(projectRoot), "node_modules", packageName, "package.json")).version !== spec.slice(separator + 1);
15875
+ return readJson(join35(resolve27(projectRoot), "node_modules", packageName, "package.json")).version !== spec.slice(separator + 1);
15813
15876
  } catch {
15814
15877
  return true;
15815
15878
  }
@@ -15818,7 +15881,7 @@ var DEVICES_PACKAGE = "@absolutejs/devices", ABSOLUTE_MOBILE_SHELL_DEVICE_CAPABI
15818
15881
  if (unmet.length > 0)
15819
15882
  throw new TypeError(`Device capabilities ${plan.capabilities.join(", ")} require ${unmet.join(", ")}. Run absolute mobile sync and approve the detected capability plugins.`);
15820
15883
  }, directAbsoluteProjectPackages = (projectRoot) => {
15821
- const manifest = readJson(join35(resolve26(projectRoot), "package.json"));
15884
+ const manifest = readJson(join35(resolve27(projectRoot), "package.json"));
15822
15885
  const packages = new Set;
15823
15886
  for (const field of ["dependencies", "devDependencies"]) {
15824
15887
  const dependencies = manifest[field];
@@ -15828,16 +15891,16 @@ var DEVICES_PACKAGE = "@absolutejs/devices", ABSOLUTE_MOBILE_SHELL_DEVICE_CAPABI
15828
15891
  }
15829
15892
  return packages;
15830
15893
  }, discoverAbsoluteDeviceCapabilities = (projectRoot, providers = loadAbsoluteDeviceCapabilityProviders(projectRoot)) => {
15831
- const root = resolve26(projectRoot);
15894
+ const root = resolve27(projectRoot);
15832
15895
  if (!existsSync29(root))
15833
15896
  return [];
15834
15897
  const known = new Set(Object.keys(providers));
15835
15898
  const capabilities = new Set;
15836
15899
  for (const path of SOURCE_GLOB.scanSync({ cwd: root })) {
15837
- const portable = relative19(root, resolve26(root, path)).replaceAll("\\", "/");
15900
+ const portable = relative19(root, resolve27(root, path)).replaceAll("\\", "/");
15838
15901
  if (isIgnored(portable))
15839
15902
  continue;
15840
- const source = readFileSync22(resolve26(root, portable), "utf8");
15903
+ const source = readFileSync22(resolve27(root, portable), "utf8");
15841
15904
  for (const name of importedCapabilities(source, portable))
15842
15905
  if (known.has(name))
15843
15906
  capabilities.add(name);
@@ -15847,12 +15910,12 @@ var DEVICES_PACKAGE = "@absolutejs/devices", ABSOLUTE_MOBILE_SHELL_DEVICE_CAPABI
15847
15910
  const packageName = spec.slice(0, spec.lastIndexOf("@"));
15848
15911
  return !directPackages.has(packageName);
15849
15912
  }), projectImportsAbsoluteDeviceCapability = (projectRoot, capability) => {
15850
- const root = resolve26(projectRoot);
15913
+ const root = resolve27(projectRoot);
15851
15914
  for (const path of SOURCE_GLOB.scanSync({ cwd: root })) {
15852
- const portable = relative19(root, resolve26(root, path)).replaceAll("\\", "/");
15915
+ const portable = relative19(root, resolve27(root, path)).replaceAll("\\", "/");
15853
15916
  if (isIgnored(portable))
15854
15917
  continue;
15855
- const source = readFileSync22(resolve26(root, portable), "utf8");
15918
+ const source = readFileSync22(resolve27(root, portable), "utf8");
15856
15919
  if (importedCapabilities(source, portable).has(capability))
15857
15920
  return true;
15858
15921
  }
@@ -16049,7 +16112,7 @@ var init_client = __esm(() => {
16049
16112
 
16050
16113
  // src/mobile/syncSchema.ts
16051
16114
  import { readFileSync as readFileSync23 } from "fs";
16052
- import { dirname as dirname21, join as join36, resolve as resolve27 } from "path";
16115
+ import { dirname as dirname21, join as join36, resolve as resolve28 } from "path";
16053
16116
  var object2 = (value) => typeof value === "object" && value !== null && !Array.isArray(value), manifestAt = (path) => {
16054
16117
  try {
16055
16118
  const value = JSON.parse(readFileSync23(path, "utf8"));
@@ -16066,7 +16129,7 @@ var object2 = (value) => typeof value === "object" && value !== null && !Array.i
16066
16129
  return;
16067
16130
  return Reflect.get(sync, "localSchema");
16068
16131
  }, packageManifestPath = (projectRoot, packageName) => {
16069
- let directory = resolve27(projectRoot);
16132
+ let directory = resolve28(projectRoot);
16070
16133
  while (true) {
16071
16134
  const candidate = join36(directory, "node_modules", packageName, "package.json");
16072
16135
  const manifest = manifestAt(candidate);
@@ -16299,7 +16362,7 @@ var object2 = (value) => typeof value === "object" && value !== null && !Array.i
16299
16362
  Reflect.get(manifest, "devDependencies"),
16300
16363
  Reflect.get(manifest, "peerDependencies")
16301
16364
  ].flatMap((dependencies) => object2(dependencies) ? Object.keys(dependencies) : []).filter((name, index, names) => names.indexOf(name) === index).sort(), discoverAbsoluteSyncSchema = (projectRoot) => {
16302
- const appManifestPath = join36(resolve27(projectRoot), "package.json");
16365
+ const appManifestPath = join36(resolve28(projectRoot), "package.json");
16303
16366
  const appManifest = manifestAt(appManifestPath);
16304
16367
  if (!appManifest)
16305
16368
  return {
@@ -16602,7 +16665,7 @@ var init_vitals = () => {};
16602
16665
 
16603
16666
  // src/core/precompressed.ts
16604
16667
  import { readdir as readdir4, readFile as readFile7, stat as stat2, writeFile as writeFile8 } from "fs/promises";
16605
- import { extname as extname14, join as join39, relative as relative20, resolve as resolve28, sep as sep6 } from "path";
16668
+ import { extname as extname14, join as join39, relative as relative20, resolve as resolve29, sep as sep6 } from "path";
16606
16669
  import { promisify } from "util";
16607
16670
  import { brotliCompress, constants, gzip } from "zlib";
16608
16671
  import { Elysia as Elysia2 } from "elysia";
@@ -16630,7 +16693,7 @@ var COMPRESSIBLE_EXTENSIONS, MIN_COMPRESSIBLE_BYTES = 1024, MIN_SAVING_RATIO = 0
16630
16693
  if (set.headers["cache-control"] !== undefined)
16631
16694
  set.headers["cache-control"] = policy;
16632
16695
  }), createPrecompressedPlugin = async (buildDir, ignorePatterns = []) => {
16633
- const root = resolve28(buildDir);
16696
+ const root = resolve29(buildDir);
16634
16697
  const copies = new Map;
16635
16698
  const isIgnored = (pathname) => ignorePatterns.some((pattern) => typeof pattern === "string" ? pathname.includes(pattern) : pattern.test(pathname));
16636
16699
  for (const path of await listFiles(root)) {
@@ -17428,7 +17491,7 @@ var init_typescript_translator = __esm(() => {
17428
17491
 
17429
17492
  // src/dev/angular/fastHmrCompiler.ts
17430
17493
  import { existsSync as existsSync30, readFileSync as readFileSync24, statSync as statSync5 } from "fs";
17431
- import { dirname as dirname23, extname as extname15, relative as relative21, resolve as resolve29 } from "path";
17494
+ import { dirname as dirname23, extname as extname15, relative as relative21, resolve as resolve30 } from "path";
17432
17495
  var fail2 = (reason, detail, location) => ({
17433
17496
  detail,
17434
17497
  ok: false,
@@ -17740,7 +17803,7 @@ var fail2 = (reason, detail, location) => ({
17740
17803
  if (!spec.startsWith(".") && !spec.startsWith("/")) {
17741
17804
  return true;
17742
17805
  }
17743
- const base = resolve29(componentDir, spec);
17806
+ const base = resolve30(componentDir, spec);
17744
17807
  const candidates = [
17745
17808
  `${base}.ts`,
17746
17809
  `${base}.tsx`,
@@ -18556,7 +18619,7 @@ var fail2 = (reason, detail, location) => ({
18556
18619
  return null;
18557
18620
  }, resolveDtsFromSpec = (spec, fromDir) => {
18558
18621
  const stripped = spec.replace(/\.[mc]?js$/, "");
18559
- const base = resolve29(fromDir, stripped);
18622
+ const base = resolve30(fromDir, stripped);
18560
18623
  const candidates = [
18561
18624
  `${base}.d.ts`,
18562
18625
  `${base}.d.mts`,
@@ -18580,7 +18643,7 @@ var fail2 = (reason, detail, location) => ({
18580
18643
  return null;
18581
18644
  }, resolveChildComponentInfo = (className, spec, componentDir, projectRoot) => {
18582
18645
  if (spec.startsWith(".") || spec.startsWith("/")) {
18583
- const base = resolve29(componentDir, spec);
18646
+ const base = resolve30(componentDir, spec);
18584
18647
  const candidates = [
18585
18648
  `${base}.ts`,
18586
18649
  `${base}.tsx`,
@@ -18799,13 +18862,13 @@ var fail2 = (reason, detail, location) => ({
18799
18862
  }
18800
18863
  if (!matches)
18801
18864
  continue;
18802
- const resolved = resolve29(componentDir, spec);
18865
+ const resolved = resolve30(componentDir, spec);
18803
18866
  for (const ext of TS_EXTENSIONS) {
18804
18867
  const candidate = resolved + ext;
18805
18868
  if (existsSync30(candidate))
18806
18869
  return candidate;
18807
18870
  }
18808
- const indexCandidate = resolve29(resolved, "index.ts");
18871
+ const indexCandidate = resolve30(resolved, "index.ts");
18809
18872
  if (existsSync30(indexCandidate))
18810
18873
  return indexCandidate;
18811
18874
  }
@@ -19050,7 +19113,7 @@ ${transpiled}
19050
19113
  return compileStyleFileIfNeeded(abs);
19051
19114
  return compileStyleFileIfNeededSync(abs);
19052
19115
  }, resolveAndReadStyleResource = async (componentDir, url) => {
19053
- const abs = resolve29(componentDir, url);
19116
+ const abs = resolve30(componentDir, url);
19054
19117
  if (!existsSync30(abs)) {
19055
19118
  const failure = {
19056
19119
  detail: `Style file not found: ${url} (looked for ${abs})`,
@@ -19094,7 +19157,7 @@ ${block}
19094
19157
  const cached = projectOptionsCache.get(projectRoot);
19095
19158
  if (cached !== undefined)
19096
19159
  return cached;
19097
- const tsconfigPath = resolve29(projectRoot, "tsconfig.json");
19160
+ const tsconfigPath = resolve30(projectRoot, "tsconfig.json");
19098
19161
  const opts = {};
19099
19162
  if (existsSync30(tsconfigPath)) {
19100
19163
  try {
@@ -19178,7 +19241,7 @@ ${block}
19178
19241
  templateText = decoratorMeta.template;
19179
19242
  templatePath = componentFilePath;
19180
19243
  } else if (decoratorMeta.templateUrl) {
19181
- const tplAbs = resolve29(componentDir, decoratorMeta.templateUrl);
19244
+ const tplAbs = resolve30(componentDir, decoratorMeta.templateUrl);
19182
19245
  if (!existsSync30(tplAbs)) {
19183
19246
  return fail2("template-resource-not-found", `Template file not found: ${tplAbs}`, { file: componentFilePath });
19184
19247
  }
@@ -19840,7 +19903,7 @@ var init_scanAngularHandlerCalls = __esm(() => {
19840
19903
 
19841
19904
  // src/build/scanAngularPageRoutes.ts
19842
19905
  import { readdirSync as readdirSync5, readFileSync as readFileSync27 } from "fs";
19843
- import { basename as basename14, join as join42 } from "path";
19906
+ import { basename as basename15, join as join42 } from "path";
19844
19907
  var SOURCE_EXTENSIONS5, SKIP_DIRS4, hasSourceExtension4 = (filePath) => {
19845
19908
  const idx = filePath.lastIndexOf(".");
19846
19909
  if (idx === -1)
@@ -19849,7 +19912,7 @@ var SOURCE_EXTENSIONS5, SKIP_DIRS4, hasSourceExtension4 = (filePath) => {
19849
19912
  }, isPageFile = (filePath) => {
19850
19913
  if (!hasSourceExtension4(filePath))
19851
19914
  return false;
19852
- const base = basename14(filePath);
19915
+ const base = basename15(filePath);
19853
19916
  if (base.endsWith(".d.ts"))
19854
19917
  return false;
19855
19918
  if (base.endsWith(".test.ts"))
@@ -19915,7 +19978,7 @@ var SOURCE_EXTENSIONS5, SKIP_DIRS4, hasSourceExtension4 = (filePath) => {
19915
19978
  continue;
19916
19979
  }
19917
19980
  const hasRoutes = hasTopLevelRoutesExport(source, file);
19918
- const base = basename14(file).replace(/\.[cm]?[tj]sx?$/, "");
19981
+ const base = basename15(file).replace(/\.[cm]?[tj]sx?$/, "");
19919
19982
  const manifestKey = toPascal(base);
19920
19983
  out.push({
19921
19984
  hasRoutes,
@@ -20239,9 +20302,9 @@ import {
20239
20302
  dirname as dirname25,
20240
20303
  isAbsolute as isAbsolute9,
20241
20304
  join as join44,
20242
- basename as basename15,
20305
+ basename as basename16,
20243
20306
  extname as extname16,
20244
- resolve as resolve30,
20307
+ resolve as resolve31,
20245
20308
  relative as relative22,
20246
20309
  sep as sep7
20247
20310
  } from "path";
@@ -20255,19 +20318,19 @@ var withResolvedSources = (map, sourceFile) => {
20255
20318
  return map;
20256
20319
  return {
20257
20320
  ...map,
20258
- sources: sources.map((source) => typeof source === "string" && !isAbsolute9(source) ? resolve30(dirname25(sourceFile), source) : source)
20321
+ sources: sources.map((source) => typeof source === "string" && !isAbsolute9(source) ? resolve31(dirname25(sourceFile), source) : source)
20259
20322
  };
20260
20323
  }, resolveDevClientDir2 = () => {
20261
20324
  const projectRoot = process.cwd();
20262
- const fromSource = resolve30(import.meta.dir, "../dev/client");
20325
+ const fromSource = resolve31(import.meta.dir, "../dev/client");
20263
20326
  if (existsSync32(fromSource) && fromSource.startsWith(projectRoot)) {
20264
20327
  return fromSource;
20265
20328
  }
20266
- const fromNodeModules = resolve30(projectRoot, "node_modules/@absolutejs/absolute/dist/dev/client");
20329
+ const fromNodeModules = resolve31(projectRoot, "node_modules/@absolutejs/absolute/dist/dev/client");
20267
20330
  if (existsSync32(fromNodeModules))
20268
20331
  return fromNodeModules;
20269
- return resolve30(import.meta.dir, "./dev/client");
20270
- }, devClientDir2, hmrClientPath3, persistentCache, sourceHashCache, transpiler3, DYNAMIC_IMPORT_PATTERN, LAZY_MODULE_REGISTRY_NAME = "absolutejs.svelte.lazy-modules", LAZY_RESOLVED_NAME = "absolutejs.svelte.lazy-resolved", LAZY_PRELOAD_MAX_DEPTH = 5, toSourceId = (path) => relative22(process.cwd(), path).replace(/\\/g, "/"), removeUnusedRequireHelper = (code) => {
20332
+ return resolve31(import.meta.dir, "./dev/client");
20333
+ }, devClientDir2, hmrClientPath3, persistentCaches, sourceHashCaches, transpiler3, DYNAMIC_IMPORT_PATTERN, LAZY_MODULE_REGISTRY_NAME = "absolutejs.svelte.lazy-modules", LAZY_RESOLVED_NAME = "absolutejs.svelte.lazy-resolved", LAZY_PRELOAD_MAX_DEPTH = 5, toSourceId = (path) => relative22(process.cwd(), path).replace(/\\/g, "/"), removeUnusedRequireHelper = (code) => {
20271
20334
  const helperStart = code.indexOf("var __require = /* @__PURE__ */");
20272
20335
  if (helperStart === -1) {
20273
20336
  return code;
@@ -20293,7 +20356,7 @@ var withResolvedSources = (map, sourceFile) => {
20293
20356
  }, resolveRelativeModule2 = async (spec, from) => {
20294
20357
  if (!spec.startsWith("."))
20295
20358
  return null;
20296
- const basePath = resolve30(dirname25(from), spec);
20359
+ const basePath = resolve31(dirname25(from), spec);
20297
20360
  const candidates = [
20298
20361
  basePath,
20299
20362
  `${basePath}.ts`,
@@ -20320,7 +20383,7 @@ var withResolvedSources = (map, sourceFile) => {
20320
20383
  const resolved = resolvePackageImport(spec);
20321
20384
  return resolved && /\.svelte(\.(?:ts|js))?$/.test(resolved) ? resolved : null;
20322
20385
  }
20323
- const basePath = resolve30(dirname25(from), spec);
20386
+ const basePath = resolve31(dirname25(from), spec);
20324
20387
  const explicit = /\.(svelte|svelte\.(?:ts|js))$/.test(basePath);
20325
20388
  if (!explicit) {
20326
20389
  const extensions = [".svelte", ".svelte.ts", ".svelte.js"];
@@ -20347,9 +20410,13 @@ var withResolvedSources = (map, sourceFile) => {
20347
20410
  client: toClient.startsWith(".") || toClient.startsWith("/") ? toClient : `./${toClient}`,
20348
20411
  server: toServer.startsWith(".") ? toServer : `./${toServer}`
20349
20412
  });
20350
- }, compileSvelte = async (entryPoints, svelteRoot, cache = new Map, isDev = false, stylePreprocessors) => {
20413
+ }, compileSvelte = async (entryPoints, svelteRoot, cache = new Map, isDev = false, stylePreprocessors, options = {}) => {
20351
20414
  const { compile, compileModule, preprocess } = await import("svelte/compiler");
20352
- const generatedDir = getFrameworkGeneratedDir("svelte");
20415
+ const externalCss = options.externalCss === true;
20416
+ const cssMode = externalCss ? "external" : "injected";
20417
+ const persistentCache = persistentCaches[cssMode];
20418
+ const sourceHashCache = sourceHashCaches[cssMode];
20419
+ const generatedDir = externalCss ? join44(getFrameworkGeneratedDir("svelte"), "islands") : getFrameworkGeneratedDir("svelte");
20353
20420
  const clientDir = join44(generatedDir, "client");
20354
20421
  const indexDir = join44(generatedDir, "indexes");
20355
20422
  const serverDir = join44(generatedDir, "server");
@@ -20364,7 +20431,7 @@ var withResolvedSources = (map, sourceFile) => {
20364
20431
  const contentHash = Bun.hash(raw).toString(BASE_36_RADIX);
20365
20432
  const prevHash = sourceHashCache.get(src);
20366
20433
  const persistent = persistentCache.get(src);
20367
- if (prevHash === contentHash && persistent && existsSync32(persistent.ssr) && existsSync32(persistent.client)) {
20434
+ if (prevHash === contentHash && persistent && existsSync32(persistent.ssr) && existsSync32(persistent.client) && (!persistent.css || existsSync32(persistent.css))) {
20368
20435
  cache.set(src, persistent);
20369
20436
  return persistent;
20370
20437
  }
@@ -20383,7 +20450,7 @@ var withResolvedSources = (map, sourceFile) => {
20383
20450
  const fileRoute = fileRouteFor(src);
20384
20451
  const rawRel = fileRoute ? "pages" : dirname25(relative22(svelteRoot, src)).replace(/\\/g, "/");
20385
20452
  const relDir = rawRel.startsWith("..") ? `_ext/${relative22(process.cwd(), dirname25(src)).replace(/\\/g, "/")}` : rawRel;
20386
- const baseName = fileRoute?.name ?? basename15(src).replace(/\.svelte(\.(ts|js))?$/, "");
20453
+ const baseName = fileRoute?.name ?? basename16(src).replace(/\.svelte(\.(ts|js))?$/, "");
20387
20454
  const staticImportPaths = Array.from(transpiledServer.matchAll(/from\s+['"]([^'"]+)['"]/g)).map((match) => match[1]).filter((path) => path !== undefined);
20388
20455
  const dynamicImportPaths = Array.from(transpiledServer.matchAll(DYNAMIC_IMPORT_PATTERN)).map((match) => match[1]).filter((path) => path !== undefined);
20389
20456
  const importPaths = Array.from(new Set([...staticImportPaths, ...dynamicImportPaths]));
@@ -20429,14 +20496,14 @@ var withResolvedSources = (map, sourceFile) => {
20429
20496
  };
20430
20497
  const generate = (mode) => {
20431
20498
  const transpiled = mode === "server" ? transpiledServer : transpiledClient;
20432
- const compiledJs = isModule ? compileModule(transpiled, {
20499
+ const compiled = isModule ? compileModule(transpiled, {
20433
20500
  dev: mode === "client" && dev,
20434
20501
  experimental: {
20435
20502
  async: transformedByLowering
20436
20503
  },
20437
20504
  filename: src
20438
- }).js : compile(transpiled, {
20439
- css: "injected",
20505
+ }) : compile(transpiled, {
20506
+ css: externalCss && mode === "client" ? "external" : "injected",
20440
20507
  dev: mode === "client" && dev,
20441
20508
  experimental: {
20442
20509
  async: transformedByLowering
@@ -20444,7 +20511,8 @@ var withResolvedSources = (map, sourceFile) => {
20444
20511
  filename: src,
20445
20512
  generate: mode,
20446
20513
  hmr: isDev
20447
- }).js;
20514
+ });
20515
+ const compiledJs = compiled.js;
20448
20516
  let code = compiledJs.code.replace(/\.svelte(?:\.(?:ts|js))?(['"])/g, ".js$1");
20449
20517
  if (mode === "client" && isDev) {
20450
20518
  const moduleKey = `/@src/${relative22(process.cwd(), src).replace(/\\/g, "/")}`;
@@ -20457,7 +20525,8 @@ var withResolvedSources = (map, sourceFile) => {
20457
20525
  code = removeUnusedRequireHelper(code);
20458
20526
  }
20459
20527
  code += islandMetadataExports;
20460
- return { code, map: compiledJs.map };
20528
+ const css = !isModule && externalCss && mode === "client" ? (compiled.css?.code ?? "").trim() : "";
20529
+ return { code, css, map: compiledJs.map };
20461
20530
  };
20462
20531
  const ssrPath = join44(serverDir, relDir, `${baseName}.js`);
20463
20532
  const clientPath = join44(clientDir, relDir, `${baseName}.js`);
@@ -20483,6 +20552,7 @@ export const ${LAZY_SOURCE_EXPORT} = ${sourceId};${componentStamp}`;
20483
20552
  ]);
20484
20553
  const inlineMap = (map) => map ? `${inlineSourceMapComment(withResolvedSources(map, src))}
20485
20554
  ` : "";
20555
+ let cssFile;
20486
20556
  if (isModule) {
20487
20557
  const generated = generate("client");
20488
20558
  const bundle = rewriteExternalImports(generated.code, "client") + inlineMap(generated.map);
@@ -20495,14 +20565,21 @@ export const ${LAZY_SOURCE_EXPORT} = ${sourceId};${componentStamp}`;
20495
20565
  const clientGen = generate("client");
20496
20566
  const serverCode = rewriteExternalImports(serverGen.code, "server");
20497
20567
  const serverBundle = serverCode + sourceExport(serverCode) + inlineMap(serverGen.map);
20498
- const clientBundle = rewriteExternalImports(clientGen.code, "client") + lazyRegistrations + inlineMap(clientGen.map);
20568
+ const cssPath = clientPath.replace(/\.js$/, ".css");
20569
+ const cssImport = clientGen.css ? `
20570
+ import ${JSON.stringify(`./${basename16(cssPath)}`)};
20571
+ ` : "";
20572
+ const clientBundle = rewriteExternalImports(clientGen.code, "client") + lazyRegistrations + cssImport + inlineMap(clientGen.map);
20573
+ cssFile = clientGen.css ? cssPath : undefined;
20499
20574
  await Promise.all([
20500
20575
  write2(ssrPath, serverBundle),
20501
- write2(clientPath, clientBundle)
20576
+ write2(clientPath, clientBundle),
20577
+ ...clientGen.css ? [write2(cssPath, clientGen.css)] : []
20502
20578
  ]);
20503
20579
  }
20504
20580
  const built = {
20505
20581
  client: clientPath,
20582
+ css: cssFile,
20506
20583
  hasAwaitSlot: loweredAwaitServerSource.transformed || loweredAwaitClientSource.transformed || loweredServerSource.transformed || loweredClientSource.transformed || hasAwaitSlotFromChildren,
20507
20584
  isModule,
20508
20585
  ssr: ssrPath
@@ -20515,7 +20592,7 @@ export const ${LAZY_SOURCE_EXPORT} = ${sourceId};${componentStamp}`;
20515
20592
  const componentRoots = roots.filter((root) => !root.isModule);
20516
20593
  await Promise.all(componentRoots.map(async ({ client, hasAwaitSlot }) => {
20517
20594
  const relClientDir = dirname25(relative22(clientDir, client));
20518
- const name = basename15(client, extname16(client));
20595
+ const name = basename16(client, extname16(client));
20519
20596
  const indexPath = join44(indexDir, relClientDir, `${name}.js`);
20520
20597
  const importRaw = relative22(dirname25(indexPath), client).split(sep7).join("/");
20521
20598
  const importPath = importRaw.startsWith(".") || importRaw.startsWith("/") ? importRaw : `./${importRaw}`;
@@ -20632,7 +20709,7 @@ if (typeof window !== "undefined") {
20632
20709
  svelteClientPaths: roots.map(({ client }) => client),
20633
20710
  svelteIndexPaths: componentRoots.map(({ client }) => {
20634
20711
  const rel = dirname25(relative22(clientDir, client));
20635
- return join44(indexDir, rel, basename15(client));
20712
+ return join44(indexDir, rel, basename16(client));
20636
20713
  }),
20637
20714
  svelteServerPaths: roots.map(({ ssr }) => ssr)
20638
20715
  };
@@ -20650,8 +20727,14 @@ var init_compileSvelte = __esm(() => {
20650
20727
  init_lazyModule();
20651
20728
  devClientDir2 = resolveDevClientDir2();
20652
20729
  hmrClientPath3 = join44(devClientDir2, "hmrClient.ts").replace(/\\/g, "/");
20653
- persistentCache = new Map;
20654
- sourceHashCache = new Map;
20730
+ persistentCaches = {
20731
+ external: new Map,
20732
+ injected: new Map
20733
+ };
20734
+ sourceHashCaches = {
20735
+ external: new Map,
20736
+ injected: new Map
20737
+ };
20655
20738
  transpiler3 = new Transpiler3({ loader: "ts", target: "browser" });
20656
20739
  DYNAMIC_IMPORT_PATTERN = /\bimport\s*\(\s*['"]([^'"]+)['"]\s*\)/g;
20657
20740
  });
@@ -21162,7 +21245,7 @@ var init_chainInlineSourcemaps = __esm(() => {
21162
21245
  import { createHash as createHash5 } from "crypto";
21163
21246
  import { existsSync as existsSync33, readFileSync as readFileSync30 } from "fs";
21164
21247
  import { mkdir as mkdir8, rename, writeFile as writeFile9 } from "fs/promises";
21165
- import { join as join45, resolve as resolve31 } from "path";
21248
+ import { join as join45, resolve as resolve32 } from "path";
21166
21249
  var CACHE_DIR_NAME = "compile-cache", ABSOLUTE_CACHE_DIR_NAME2 = ".absolutejs", CACHE_FORMAT_VERSION = 3, FILE_NAME_HASH_LENGTH = 32, vueCompileCacheEnabled = () => process.env.ABSOLUTE_COMPILE_CACHE !== "0", hashContent = (content) => createHash5("sha256").update(content).digest("hex"), hashParts = (parts) => {
21167
21250
  const hash = createHash5("sha256");
21168
21251
  for (const part of parts) {
@@ -21172,8 +21255,8 @@ var CACHE_DIR_NAME = "compile-cache", ABSOLUTE_CACHE_DIR_NAME2 = ".absolutejs",
21172
21255
  return hash.digest("hex");
21173
21256
  }, readOwnPackageVersion = () => {
21174
21257
  const candidates = [
21175
- resolve31(import.meta.dir, "..", "..", "package.json"),
21176
- resolve31(import.meta.dir, "..", "package.json")
21258
+ resolve32(import.meta.dir, "..", "..", "package.json"),
21259
+ resolve32(import.meta.dir, "..", "package.json")
21177
21260
  ];
21178
21261
  for (const candidate of candidates) {
21179
21262
  try {
@@ -21254,7 +21337,7 @@ __export(exports_emitTsHelpers, {
21254
21337
  var {file: file2, Transpiler: Transpiler4, write: write3 } = globalThis.Bun;
21255
21338
  import { copyFileSync as copyFileSync2, existsSync as existsSync34, readdirSync as readdirSync6, statSync as statSync6 } from "fs";
21256
21339
  import { mkdir as mkdir9, rename as rename2, writeFile as writeFile10 } from "fs/promises";
21257
- import { dirname as dirname26, join as join46, resolve as resolve32, sep as sep8 } from "path";
21340
+ import { dirname as dirname26, join as join46, resolve as resolve33, sep as sep8 } from "path";
21258
21341
  var CACHE_DIR_NAME2 = "vue-helpers", CACHE_FORMAT_VERSION2 = 2, HASH_LENGTH4 = 24, transpiler4, cacheDir = () => join46(process.cwd(), ".absolutejs", "compile-cache", CACHE_DIR_NAME2), cacheKey2 = (sourcePath, sourceCode) => {
21259
21342
  const frameworkVersion = frameworkVersionForCache();
21260
21343
  if (!frameworkVersion || !vueCompileCacheEnabled())
@@ -21321,7 +21404,7 @@ var CACHE_DIR_NAME2 = "vue-helpers", CACHE_FORMAT_VERSION2 = 2, HASH_LENGTH4 = 2
21321
21404
  return false;
21322
21405
  }
21323
21406
  }, resolveImportTarget = (sourceDir, specifier) => {
21324
- const base = resolve32(sourceDir, specifier);
21407
+ const base = resolve33(sourceDir, specifier);
21325
21408
  return IMPORT_CANDIDATE_SUFFIXES.map((suffix) => `${base}${suffix}`).find(isFilePath) ?? base;
21326
21409
  }, rewriteMirrorImports = (code, sourcePath) => {
21327
21410
  const sourceDir = dirname26(sourcePath);
@@ -21385,16 +21468,16 @@ var init_emitTsHelpers = __esm(() => {
21385
21468
  });
21386
21469
 
21387
21470
  // src/build/inlineCssImports.ts
21388
- import { readFileSync as readFileSync31, realpathSync as realpathSync3 } from "fs";
21389
- import { dirname as dirname27, resolve as resolve33 } from "path";
21471
+ import { readFileSync as readFileSync31, realpathSync as realpathSync4 } from "fs";
21472
+ import { dirname as dirname27, resolve as resolve34 } from "path";
21390
21473
  var inlineCssImports = (cssContent, cssFilePath, visited = new Set) => {
21391
- const resolved = realpathSync3(cssFilePath);
21474
+ const resolved = realpathSync4(cssFilePath);
21392
21475
  if (visited.has(resolved))
21393
21476
  return "";
21394
21477
  visited.add(resolved);
21395
21478
  const importRegex = /@import\s+(?:url\(\s*)?(['"])(\.{1,2}\/[^'"]+)\1\s*\)?\s*;?/g;
21396
21479
  return cssContent.replace(importRegex, (match, _quote, relPath) => {
21397
- const importedPath = resolve33(dirname27(cssFilePath), relPath);
21480
+ const importedPath = resolve34(dirname27(cssFilePath), relPath);
21398
21481
  if (!isFile(importedPath))
21399
21482
  return match;
21400
21483
  const importedContent = readFileSync31(importedPath, "utf-8");
@@ -21406,8 +21489,8 @@ var init_inlineCssImports = __esm(() => {
21406
21489
  });
21407
21490
 
21408
21491
  // src/build/compileVueSfc.ts
21409
- import { existsSync as existsSync35, readFileSync as readFileSync32, realpathSync as realpathSync4 } from "fs";
21410
- import { dirname as dirname28, join as join47, relative as relative23, resolve as resolve34 } from "path";
21492
+ import { existsSync as existsSync35, readFileSync as readFileSync32, realpathSync as realpathSync5 } from "fs";
21493
+ import { dirname as dirname28, join as join47, relative as relative23, resolve as resolve35 } from "path";
21411
21494
  var {Transpiler: Transpiler5 } = globalThis.Bun;
21412
21495
  var transpiler5, toJs = (filePath, sourceDir) => {
21413
21496
  if (filePath.endsWith(".vue"))
@@ -21416,15 +21499,15 @@ var transpiler5, toJs = (filePath, sourceDir) => {
21416
21499
  return filePath.replace(/\.ts$/, ".js");
21417
21500
  if (isStylePath(filePath)) {
21418
21501
  if (sourceDir && (filePath.startsWith("./") || filePath.startsWith("../"))) {
21419
- return resolve34(sourceDir, filePath);
21502
+ return resolve35(sourceDir, filePath);
21420
21503
  }
21421
21504
  return filePath;
21422
21505
  }
21423
21506
  if (sourceDir && (filePath.startsWith("./") || filePath.startsWith("../"))) {
21424
- const directTs = resolve34(sourceDir, `${filePath}.ts`);
21507
+ const directTs = resolve35(sourceDir, `${filePath}.ts`);
21425
21508
  if (existsSync35(directTs))
21426
21509
  return `${filePath}.js`;
21427
- const indexedTs = resolve34(sourceDir, filePath, "index.ts");
21510
+ const indexedTs = resolve35(sourceDir, filePath, "index.ts");
21428
21511
  if (existsSync35(indexedTs))
21429
21512
  return `${filePath}/index.js`;
21430
21513
  }
@@ -21472,7 +21555,7 @@ const ${localName} = (source) => ${importedName}(
21472
21555
  : { ...source, loader: () => __absoluteResolveAsyncVueComponent(source.loader) },
21473
21556
  );`;
21474
21557
  return code.replace(vueImportRegex, `import { ${specifiers.join(", ")} } from 'vue';${wrapper}`);
21475
- }, toOutputImport = (specifier, sourceDir) => specifier.startsWith("./") || specifier.startsWith("../") ? vueMirrorImport(join47(sourceDir, "__importer__"), specifier, resolve34(sourceDir, specifier)) : specifier, rewriteRelativeImports = (code, sourceDir) => code.replace(/(['"])(\.{1,2}\/[^'"]+)(['"])/g, (_, quoteStart, relativeImport, quoteEnd) => `${quoteStart}${toOutputImport(toJs(relativeImport, sourceDir), sourceDir)}${quoteEnd}`), compileVueSfc = async ({
21558
+ }, toOutputImport = (specifier, sourceDir) => specifier.startsWith("./") || specifier.startsWith("../") ? vueMirrorImport(join47(sourceDir, "__importer__"), specifier, resolve35(sourceDir, specifier)) : specifier, rewriteRelativeImports = (code, sourceDir) => code.replace(/(['"])(\.{1,2}\/[^'"]+)(['"])/g, (_, quoteStart, relativeImport, quoteEnd) => `${quoteStart}${toOutputImport(toJs(relativeImport, sourceDir), sourceDir)}${quoteEnd}`), compileVueSfc = async ({
21476
21559
  clientOutputPath,
21477
21560
  componentId,
21478
21561
  hmrId,
@@ -21492,7 +21575,7 @@ const ${localName} = (source) => ${importedName}(
21492
21575
  const compiledScript = hasScript ? compiler.compileScript(descriptor, {
21493
21576
  fs: {
21494
21577
  fileExists: isFile,
21495
- realpath: realpathSync4,
21578
+ realpath: realpathSync5,
21496
21579
  readFile: (file) => {
21497
21580
  if (!isFile(file))
21498
21581
  return;
@@ -21993,24 +22076,24 @@ var init_workerPool = __esm(() => {
21993
22076
  import { existsSync as existsSync37 } from "fs";
21994
22077
  import { mkdir as mkdir10 } from "fs/promises";
21995
22078
  import {
21996
- basename as basename16,
22079
+ basename as basename17,
21997
22080
  dirname as dirname30,
21998
22081
  isAbsolute as isAbsolute10,
21999
22082
  join as join49,
22000
22083
  relative as relative24,
22001
- resolve as resolve35
22084
+ resolve as resolve36
22002
22085
  } from "path";
22003
22086
  var {file: file3, write: write4 } = globalThis.Bun;
22004
22087
  var resolveDevClientDir3 = () => {
22005
22088
  const projectRoot = process.cwd();
22006
- const fromSource = resolve35(import.meta.dir, "../dev/client");
22089
+ const fromSource = resolve36(import.meta.dir, "../dev/client");
22007
22090
  if (existsSync37(fromSource) && fromSource.startsWith(projectRoot)) {
22008
22091
  return fromSource;
22009
22092
  }
22010
- const fromNodeModules = resolve35(projectRoot, "node_modules/@absolutejs/absolute/dist/dev/client");
22093
+ const fromNodeModules = resolve36(projectRoot, "node_modules/@absolutejs/absolute/dist/dev/client");
22011
22094
  if (existsSync37(fromNodeModules))
22012
22095
  return fromNodeModules;
22013
- return resolve35(import.meta.dir, "./dev/client");
22096
+ return resolve36(import.meta.dir, "./dev/client");
22014
22097
  }, devClientDir3, hmrClientPath4, scriptCache, scriptSetupCache, templateCache, styleCache, persistentBuildCache, vueSourceHashCache, vueHmrMetadata, detectVueChangeType = (filePath, descriptor) => {
22015
22098
  const prevScript = scriptCache.get(filePath);
22016
22099
  const prevScriptSetup = scriptSetupCache.get(filePath);
@@ -22051,11 +22134,11 @@ var resolveDevClientDir3 = () => {
22051
22134
  return Array.from(new Set(found));
22052
22135
  }, resolveHelperTsPath = (sourceDir, helper) => {
22053
22136
  if (helper.endsWith(".ts"))
22054
- return resolve35(sourceDir, helper);
22055
- const direct = resolve35(sourceDir, `${helper}.ts`);
22137
+ return resolve36(sourceDir, helper);
22138
+ const direct = resolve36(sourceDir, `${helper}.ts`);
22056
22139
  if (existsSync37(direct))
22057
22140
  return direct;
22058
- const indexed = resolve35(sourceDir, helper, "index.ts");
22141
+ const indexed = resolve36(sourceDir, helper, "index.ts");
22059
22142
  if (existsSync37(indexed))
22060
22143
  return indexed;
22061
22144
  return direct;
@@ -22178,7 +22261,7 @@ var resolveDevClientDir3 = () => {
22178
22261
  throw error;
22179
22262
  }
22180
22263
  }, compileVueFileUncached = async (sourceFilePath, outputDirs, cacheMap, isEntryPoint, vueRootDir, compiler, runSfc, stylePreprocessors) => {
22181
- const fileBaseName = basename16(sourceFilePath, ".vue");
22264
+ const fileBaseName = basename17(sourceFilePath, ".vue");
22182
22265
  const componentId = toKebab(fileBaseName);
22183
22266
  vueCompileProfile.files += 1;
22184
22267
  const rawSourceContent = await timed("readMs", () => file3(sourceFilePath).text());
@@ -22215,12 +22298,12 @@ var resolveDevClientDir3 = () => {
22215
22298
  const childComponentPaths = importPaths.filter((path) => path.startsWith(".") && path.endsWith(".vue"));
22216
22299
  const packageComponentPaths = Array.from(resolvedPackageVueImports.entries());
22217
22300
  const helperModulePaths = importPaths.filter((path) => path.startsWith(".") && !path.endsWith(".vue") && !isStylePath(path));
22218
- const stylePathsImported = importPaths.filter((path) => (path.startsWith(".") || isAbsolute10(path)) && isStylePath(path)).map((path) => isAbsolute10(path) ? path : resolve35(dirname30(sourceFilePath), path));
22301
+ const stylePathsImported = importPaths.filter((path) => (path.startsWith(".") || isAbsolute10(path)) && isStylePath(path)).map((path) => isAbsolute10(path) ? path : resolve36(dirname30(sourceFilePath), path));
22219
22302
  for (const stylePath of stylePathsImported) {
22220
22303
  addStyleImporter(sourceFilePath, stylePath);
22221
22304
  }
22222
22305
  const childBuildResults = await Promise.all([
22223
- ...childComponentPaths.map((relativeChildPath) => compileVueFile(resolve35(dirname30(sourceFilePath), relativeChildPath), outputDirs, cacheMap, false, vueRootDir, compiler, runSfc, stylePreprocessors)),
22306
+ ...childComponentPaths.map((relativeChildPath) => compileVueFile(resolve36(dirname30(sourceFilePath), relativeChildPath), outputDirs, cacheMap, false, vueRootDir, compiler, runSfc, stylePreprocessors)),
22224
22307
  ...packageComponentPaths.map(([, absolutePath]) => compileVueFile(absolutePath, outputDirs, cacheMap, false, vueRootDir, compiler, runSfc, stylePreprocessors))
22225
22308
  ]);
22226
22309
  const cacheKeyStartedAt = performance.now();
@@ -22328,7 +22411,7 @@ var resolveDevClientDir3 = () => {
22328
22411
  const buildCache = new Map;
22329
22412
  const allTsHelperPaths = new Set;
22330
22413
  const expandSpaRouteChildren = async (entries) => {
22331
- const expanded = new Set(entries.map((entry) => resolve35(entry)));
22414
+ const expanded = new Set(entries.map((entry) => resolve36(entry)));
22332
22415
  const queue = [...expanded];
22333
22416
  while (queue.length > 0) {
22334
22417
  const entryPath = queue.pop();
@@ -22345,7 +22428,7 @@ var resolveDevClientDir3 = () => {
22345
22428
  });
22346
22429
  const routes = parseVueSpaRoutes(descriptor.script?.content ?? "");
22347
22430
  for (const { importPath } of routes) {
22348
- const childPath = resolve35(dirname30(entryPath), importPath);
22431
+ const childPath = resolve36(dirname30(entryPath), importPath);
22349
22432
  if (expanded.has(childPath) || !existsSync37(childPath)) {
22350
22433
  continue;
22351
22434
  }
@@ -22360,7 +22443,7 @@ var resolveDevClientDir3 = () => {
22360
22443
  vueCompileProfile.stageExpandMs = performance.now() - stageStartedAt;
22361
22444
  stageStartedAt = performance.now();
22362
22445
  const compiledPages = await Promise.all(expandedEntryPoints.map(async (entryPath) => {
22363
- const resolvedEntryPath = resolve35(entryPath);
22446
+ const resolvedEntryPath = resolve36(entryPath);
22364
22447
  const result = await compileVueFile(resolvedEntryPath, {
22365
22448
  client: clientOutputDir,
22366
22449
  css: cssOutputDir,
@@ -22377,7 +22460,7 @@ var resolveDevClientDir3 = () => {
22377
22460
  spaRoutes: result.spaRoutes
22378
22461
  };
22379
22462
  }
22380
- const entryBaseName = basename16(entryPath, ".vue");
22463
+ const entryBaseName = basename17(entryPath, ".vue");
22381
22464
  const indexOutputFile = join49(indexOutputDir, `${entryBaseName}.js`);
22382
22465
  const clientOutputFile = result.clientPath;
22383
22466
  await mkdir10(dirname30(indexOutputFile), { recursive: true });
@@ -22598,6 +22681,7 @@ var resolveDevClientDir3 = () => {
22598
22681
  hmrMetadata: new Map(vueHmrMetadata),
22599
22682
  vueClientPaths: compiledPages.map((p) => p.clientPath).filter(isString),
22600
22683
  vueCssPaths: compiledPages.flatMap((result) => result.cssPaths),
22684
+ vueCssPathsBySource: new Map(compiledPages.map((page) => [page.sourcePath, page.cssPaths])),
22601
22685
  vueIndexPaths: compiledPages.map((p) => p.indexPath).filter(isString),
22602
22686
  vueServerPaths: compiledPages.map((result) => result.serverPath),
22603
22687
  vueSpaRoutesBySource
@@ -23144,7 +23228,7 @@ __export(exports_compileAngular, {
23144
23228
  invalidateAngularJitCache: () => invalidateAngularJitCache
23145
23229
  });
23146
23230
  import { existsSync as existsSync38, readFileSync as readFileSync34, promises as fs5 } from "fs";
23147
- import { join as join50, basename as basename17, sep as sep9, dirname as dirname31, resolve as resolve36, relative as relative25 } from "path";
23231
+ import { join as join50, basename as basename18, sep as sep9, dirname as dirname31, resolve as resolve37, relative as relative25 } from "path";
23148
23232
  var {Glob: Glob8 } = globalThis.Bun;
23149
23233
  var atomicWriteSequence = 0, writeTextFileAtomically = async (path, content) => {
23150
23234
  const temporaryPath = `${path}.tmp.${process.pid}.${atomicWriteSequence++}`;
@@ -23159,10 +23243,10 @@ var atomicWriteSequence = 0, writeTextFileAtomically = async (path, content) =>
23159
23243
  return tracePhase ? tracePhase(`compile/angular/${name}`, fn, metadata) : await fn();
23160
23244
  }, readTsconfigPathAliases = () => {
23161
23245
  try {
23162
- const configPath = resolve36(process.cwd(), "tsconfig.json");
23246
+ const configPath = resolve37(process.cwd(), "tsconfig.json");
23163
23247
  const config = lazyTypescript.readConfigFile(configPath, lazyTypescript.sys.readFile).config;
23164
23248
  const compilerOptions = config?.compilerOptions ?? {};
23165
- const baseUrl = resolve36(process.cwd(), compilerOptions.baseUrl ?? ".");
23249
+ const baseUrl = resolve37(process.cwd(), compilerOptions.baseUrl ?? ".");
23166
23250
  const aliases = Object.entries(compilerOptions.paths ?? {}).map(([pattern, replacements]) => ({ pattern, replacements }));
23167
23251
  return { aliases, baseUrl };
23168
23252
  } catch {
@@ -23182,7 +23266,7 @@ var atomicWriteSequence = 0, writeTextFileAtomically = async (path, content) =>
23182
23266
  const wildcardValue = exactMatch ? "" : specifier.slice(prefix.length, specifier.length - suffix.length);
23183
23267
  for (const replacement of alias.replacements) {
23184
23268
  const candidate = replacement.replace("*", wildcardValue);
23185
- const resolved = resolveSourceFile(resolve36(baseUrl, candidate));
23269
+ const resolved = resolveSourceFile(resolve37(baseUrl, candidate));
23186
23270
  if (resolved)
23187
23271
  return resolved;
23188
23272
  }
@@ -23201,13 +23285,13 @@ var atomicWriteSequence = 0, writeTextFileAtomically = async (path, content) =>
23201
23285
  ];
23202
23286
  return candidates.find((file) => existsSync38(file));
23203
23287
  }, createLegacyAngularAnimationUsageResolver = (rootDir) => {
23204
- const baseDir = resolve36(rootDir);
23288
+ const baseDir = resolve37(rootDir);
23205
23289
  const tsconfigAliases = readTsconfigPathAliases();
23206
23290
  const transpiler = new Bun.Transpiler({ loader: "tsx" });
23207
23291
  const scanCache = new Map;
23208
23292
  const resolveLocalImport = (specifier, fromDir) => {
23209
23293
  if (specifier.startsWith(".") || specifier.startsWith("/")) {
23210
- return resolveSourceFile(resolve36(fromDir, specifier));
23294
+ return resolveSourceFile(resolve37(fromDir, specifier));
23211
23295
  }
23212
23296
  const aliased = matchTsconfigAlias(specifier, tsconfigAliases.aliases, tsconfigAliases.baseUrl, resolveSourceFile);
23213
23297
  if (aliased)
@@ -23216,7 +23300,7 @@ var atomicWriteSequence = 0, writeTextFileAtomically = async (path, content) =>
23216
23300
  const resolved = Bun.resolveSync(specifier, fromDir);
23217
23301
  if (resolved.includes("/node_modules/"))
23218
23302
  return;
23219
- const absolute = resolve36(resolved);
23303
+ const absolute = resolve37(resolved);
23220
23304
  if (!absolute.startsWith(baseDir))
23221
23305
  return;
23222
23306
  return resolveSourceFile(absolute);
@@ -23232,7 +23316,7 @@ var atomicWriteSequence = 0, writeTextFileAtomically = async (path, content) =>
23232
23316
  usesLegacyAnimations: false
23233
23317
  });
23234
23318
  }
23235
- const resolved = resolve36(actualPath);
23319
+ const resolved = resolve37(actualPath);
23236
23320
  const cached = scanCache.get(resolved);
23237
23321
  if (cached)
23238
23322
  return cached;
@@ -23261,7 +23345,7 @@ var atomicWriteSequence = 0, writeTextFileAtomically = async (path, content) =>
23261
23345
  const actualPath = resolveSourceFile(filePath);
23262
23346
  if (!actualPath)
23263
23347
  return false;
23264
- const resolved = resolve36(actualPath);
23348
+ const resolved = resolve37(actualPath);
23265
23349
  if (visited.has(resolved))
23266
23350
  return false;
23267
23351
  visited.add(resolved);
@@ -23279,14 +23363,14 @@ var atomicWriteSequence = 0, writeTextFileAtomically = async (path, content) =>
23279
23363
  return (entryPath) => visit(entryPath);
23280
23364
  }, resolveDevClientDir4 = () => {
23281
23365
  const projectRoot = process.cwd();
23282
- const fromSource = resolve36(import.meta.dir, "../dev/client");
23366
+ const fromSource = resolve37(import.meta.dir, "../dev/client");
23283
23367
  if (existsSync38(fromSource) && fromSource.startsWith(projectRoot)) {
23284
23368
  return fromSource;
23285
23369
  }
23286
- const fromNodeModules = resolve36(projectRoot, "node_modules/@absolutejs/absolute/dist/dev/client");
23370
+ const fromNodeModules = resolve37(projectRoot, "node_modules/@absolutejs/absolute/dist/dev/client");
23287
23371
  if (existsSync38(fromNodeModules))
23288
23372
  return fromNodeModules;
23289
- return resolve36(import.meta.dir, "./dev/client");
23373
+ return resolve37(import.meta.dir, "./dev/client");
23290
23374
  }, devClientDir4, hmrClientPath5, formatDiagnosticMessage = (diagnostic) => {
23291
23375
  try {
23292
23376
  return lazyTypescript.flattenDiagnosticMessageText(diagnostic.messageText, `
@@ -23329,11 +23413,11 @@ var atomicWriteSequence = 0, writeTextFileAtomically = async (path, content) =>
23329
23413
  if (hasJsLikeExtension(path))
23330
23414
  return `${path}${query}`;
23331
23415
  const importerDir = dirname31(importerOutputPath);
23332
- const fileCandidate = resolve36(importerDir, `${path}.js`);
23416
+ const fileCandidate = resolve37(importerDir, `${path}.js`);
23333
23417
  if (outputFiles?.has(fileCandidate) || existsSync38(fileCandidate)) {
23334
23418
  return `${path}.js${query}`;
23335
23419
  }
23336
- const indexCandidate = resolve36(importerDir, path, "index.js");
23420
+ const indexCandidate = resolve37(importerDir, path, "index.js");
23337
23421
  if (outputFiles?.has(indexCandidate) || existsSync38(indexCandidate)) {
23338
23422
  return `${path}/index.js${query}`;
23339
23423
  }
@@ -23361,7 +23445,7 @@ var atomicWriteSequence = 0, writeTextFileAtomically = async (path, content) =>
23361
23445
  }, resolveLocalTsImport = (fromFile, specifier) => {
23362
23446
  if (!isRelativeModuleSpecifier(specifier))
23363
23447
  return null;
23364
- const basePath = resolve36(dirname31(fromFile), specifier);
23448
+ const basePath = resolve37(dirname31(fromFile), specifier);
23365
23449
  const candidates = /\.[cm]?[tj]sx?$/.test(basePath) ? [basePath] : [
23366
23450
  `${basePath}.ts`,
23367
23451
  `${basePath}.tsx`,
@@ -23372,7 +23456,7 @@ var atomicWriteSequence = 0, writeTextFileAtomically = async (path, content) =>
23372
23456
  join50(basePath, "index.mts"),
23373
23457
  join50(basePath, "index.cts")
23374
23458
  ];
23375
- return candidates.map((candidate) => resolve36(candidate)).find((candidate) => existsSync38(candidate) && !candidate.endsWith(".d.ts")) ?? null;
23459
+ return candidates.map((candidate) => resolve37(candidate)).find((candidate) => existsSync38(candidate) && !candidate.endsWith(".d.ts")) ?? null;
23376
23460
  }, readFileForAotTransform = async (fileName, readFile) => {
23377
23461
  const hostSource = readFile?.(fileName);
23378
23462
  if (typeof hostSource === "string")
@@ -23407,7 +23491,7 @@ var atomicWriteSequence = 0, writeTextFileAtomically = async (path, content) =>
23407
23491
  paths.push(join50(fileDir, urlMatch.replace(/['"]/g, "")));
23408
23492
  }
23409
23493
  }
23410
- return paths.map((path) => resolve36(path));
23494
+ return paths.map((path) => resolve37(path));
23411
23495
  }, readResourceCacheFile = async (cachePath) => {
23412
23496
  try {
23413
23497
  const entry = JSON.parse(await fs5.readFile(cachePath, "utf-8"));
@@ -23449,7 +23533,7 @@ var atomicWriteSequence = 0, writeTextFileAtomically = async (path, content) =>
23449
23533
  transformedFiles: 0
23450
23534
  };
23451
23535
  const transformFile = async (filePath) => {
23452
- const resolvedPath = resolve36(filePath);
23536
+ const resolvedPath = resolve37(filePath);
23453
23537
  if (visited.has(resolvedPath))
23454
23538
  return;
23455
23539
  visited.add(resolvedPath);
@@ -23484,7 +23568,7 @@ var atomicWriteSequence = 0, writeTextFileAtomically = async (path, content) =>
23484
23568
  return { stats, transformedSources };
23485
23569
  }, compileAngularFiles = async (inputPaths, outDir, stylePreprocessors) => {
23486
23570
  const islandMetadataByOutputPath = await traceAngularPhase("aot/island-metadata", () => new Map(inputPaths.map((inputPath) => {
23487
- const outputPath = resolve36(join50(outDir, relative25(process.cwd(), resolve36(inputPath)).replace(/\.[cm]?[tj]sx?$/, ".js")));
23571
+ const outputPath = resolve37(join50(outDir, relative25(process.cwd(), resolve37(inputPath)).replace(/\.[cm]?[tj]sx?$/, ".js")));
23488
23572
  return [
23489
23573
  outputPath,
23490
23574
  buildIslandMetadataExports(readFileSync34(inputPath, "utf-8"))
@@ -23495,7 +23579,7 @@ var atomicWriteSequence = 0, writeTextFileAtomically = async (path, content) =>
23495
23579
  const tsLibDir = await traceAngularPhase("aot/resolve-typescript-lib", () => {
23496
23580
  const tsPath = __require.resolve("typescript");
23497
23581
  const tsRootDir = dirname31(tsPath);
23498
- return tsRootDir.endsWith("lib") ? tsRootDir : resolve36(tsRootDir, "lib");
23582
+ return tsRootDir.endsWith("lib") ? tsRootDir : resolve37(tsRootDir, "lib");
23499
23583
  });
23500
23584
  const config = await traceAngularPhase("aot/read-configuration", () => readConfiguration("./tsconfig.json"));
23501
23585
  const options = {
@@ -23526,7 +23610,7 @@ var atomicWriteSequence = 0, writeTextFileAtomically = async (path, content) =>
23526
23610
  const originalGetDefaultLibFileName = host.getDefaultLibFileName;
23527
23611
  host.getDefaultLibFileName = (opts) => {
23528
23612
  const fileName = originalGetDefaultLibFileName ? originalGetDefaultLibFileName(opts) : "lib.d.ts";
23529
- return basename17(fileName);
23613
+ return basename18(fileName);
23530
23614
  };
23531
23615
  const originalGetSourceFile = host.getSourceFile;
23532
23616
  host.getSourceFile = (fileName, languageVersion, onError) => {
@@ -23537,7 +23621,7 @@ var atomicWriteSequence = 0, writeTextFileAtomically = async (path, content) =>
23537
23621
  return originalGetSourceFile?.call(host, fileName, languageVersion, onError);
23538
23622
  };
23539
23623
  const emitted = {};
23540
- const resolvedOutDir = resolve36(outDir);
23624
+ const resolvedOutDir = resolve37(outDir);
23541
23625
  host.writeFile = (fileName, text) => {
23542
23626
  const relativePath = resolveRelativePath(fileName, resolvedOutDir, outDir);
23543
23627
  emitted[relativePath] = text;
@@ -23559,12 +23643,12 @@ var atomicWriteSequence = 0, writeTextFileAtomically = async (path, content) =>
23559
23643
  if (!fileName.endsWith(".ts") || fileName.endsWith(".d.ts")) {
23560
23644
  return source;
23561
23645
  }
23562
- const resolvedPath = resolve36(fileName);
23646
+ const resolvedPath = resolve37(fileName);
23563
23647
  return transformedSources.get(resolvedPath) ?? source;
23564
23648
  };
23565
23649
  const originalGetSourceFileForCompile = host.getSourceFile;
23566
23650
  host.getSourceFile = (fileName, languageVersion, onError) => {
23567
- const source = transformedSources.get(resolve36(fileName));
23651
+ const source = transformedSources.get(resolve37(fileName));
23568
23652
  if (source) {
23569
23653
  return lazyTypescript.createSourceFile(fileName, source, languageVersion, true);
23570
23654
  }
@@ -23588,7 +23672,7 @@ var atomicWriteSequence = 0, writeTextFileAtomically = async (path, content) =>
23588
23672
  content,
23589
23673
  target: join50(outDir, fileName)
23590
23674
  }));
23591
- const outputFiles = new Set(rawEntries.map(({ target }) => resolve36(target)));
23675
+ const outputFiles = new Set(rawEntries.map(({ target }) => resolve37(target)));
23592
23676
  return rawEntries.map(({ content, target }) => {
23593
23677
  let processedContent = content.replace(/from\s+(['"])(\.\.?\/[^'"]+)(\1)/g, (match, quote, path) => {
23594
23678
  const rewritten = rewriteRelativeJsSpecifier(target, path, outputFiles);
@@ -23603,7 +23687,7 @@ var atomicWriteSequence = 0, writeTextFileAtomically = async (path, content) =>
23603
23687
  return cleaned ? `import { ${cleaned}, InternalInjectFlags } from '@angular/core'` : `import { InternalInjectFlags } from '@angular/core'`;
23604
23688
  });
23605
23689
  processedContent = processedContent.replace(/\b(?<!Internal)InjectFlags\b/g, "InternalInjectFlags");
23606
- processedContent += islandMetadataByOutputPath.get(resolve36(target)) ?? "";
23690
+ processedContent += islandMetadataByOutputPath.get(resolve37(target)) ?? "";
23607
23691
  processedContent = downlevelAsyncForZone(processedContent, target);
23608
23692
  return { content: processedContent, target };
23609
23693
  });
@@ -23614,7 +23698,7 @@ var atomicWriteSequence = 0, writeTextFileAtomically = async (path, content) =>
23614
23698
  })), { outputs: entries.length });
23615
23699
  return await traceAngularPhase("aot/collect-output-paths", () => entries.map(({ target }) => target), { outputs: entries.length });
23616
23700
  }, jitContentCache, invalidateAngularJitCache = (filePath) => {
23617
- jitContentCache.delete(resolve36(filePath));
23701
+ jitContentCache.delete(resolve37(filePath));
23618
23702
  }, wrapperOutputCache, escapeTemplateContent = (content) => content.replace(/\\/g, "\\\\").replace(/`/g, "\\`").replace(/\$\{/g, "\\${"), findUncommentedMatch = (source, pattern) => {
23619
23703
  const re = new RegExp(pattern.source, pattern.flags.includes("g") ? pattern.flags : pattern.flags + "g");
23620
23704
  let match;
@@ -23627,7 +23711,7 @@ var atomicWriteSequence = 0, writeTextFileAtomically = async (path, content) =>
23627
23711
  }
23628
23712
  return null;
23629
23713
  }, resolveAngularDeferImportSpecifier = () => {
23630
- const sourceEntry = resolve36(import.meta.dir, "../angular/components/index.ts");
23714
+ const sourceEntry = resolve37(import.meta.dir, "../angular/components/index.ts");
23631
23715
  if (existsSync38(sourceEntry)) {
23632
23716
  return sourceEntry.replace(/\\/g, "/");
23633
23717
  }
@@ -23917,10 +24001,10 @@ ${fields}
23917
24001
  return "";
23918
24002
  }
23919
24003
  }, compileAngularFileJIT = async (inputPath, outDir, rootDir, stylePreprocessors, cacheBuster) => {
23920
- const entryPath = resolve36(inputPath);
24004
+ const entryPath = resolve37(inputPath);
23921
24005
  const allOutputs = [];
23922
24006
  const visited = new Set;
23923
- const baseDir = resolve36(rootDir ?? process.cwd());
24007
+ const baseDir = resolve37(rootDir ?? process.cwd());
23924
24008
  let usesLegacyAnimations = false;
23925
24009
  const angularTranspiler = new Bun.Transpiler({
23926
24010
  loader: "ts",
@@ -23948,7 +24032,7 @@ ${fields}
23948
24032
  };
23949
24033
  const resolveLocalImport = (specifier, fromDir) => {
23950
24034
  if (specifier.startsWith(".") || specifier.startsWith("/")) {
23951
- return resolveSourceFile(resolve36(fromDir, specifier));
24035
+ return resolveSourceFile(resolve37(fromDir, specifier));
23952
24036
  }
23953
24037
  const aliased = matchTsconfigAlias(specifier, tsconfigAliases.aliases, tsconfigAliases.baseUrl, resolveSourceFile);
23954
24038
  if (aliased)
@@ -23957,7 +24041,7 @@ ${fields}
23957
24041
  const resolved = Bun.resolveSync(specifier, fromDir);
23958
24042
  if (resolved.includes("/node_modules/"))
23959
24043
  return;
23960
- const absolute = resolve36(resolved);
24044
+ const absolute = resolve37(resolved);
23961
24045
  if (!absolute.startsWith(baseDir))
23962
24046
  return;
23963
24047
  return resolveSourceFile(absolute);
@@ -23967,7 +24051,7 @@ ${fields}
23967
24051
  };
23968
24052
  const toOutputPath = (sourcePath) => {
23969
24053
  const inputDir = dirname31(sourcePath);
23970
- const fileBase = basename17(sourcePath).replace(/\.[cm]?[tj]sx?$/, ".js");
24054
+ const fileBase = basename18(sourcePath).replace(/\.[cm]?[tj]sx?$/, ".js");
23971
24055
  if (inputDir === outDir || inputDir.startsWith(`${outDir}${sep9}`)) {
23972
24056
  return join50(inputDir, fileBase);
23973
24057
  }
@@ -24009,13 +24093,13 @@ ${fields}
24009
24093
  return `${prefix}${dots}`;
24010
24094
  return `${prefix}../${dots}`;
24011
24095
  });
24012
- if (resolve36(actualPath) === entryPath) {
24096
+ if (resolve37(actualPath) === entryPath) {
24013
24097
  processedContent += buildIslandMetadataExports(sourceCode);
24014
24098
  }
24015
24099
  return processedContent;
24016
24100
  };
24017
24101
  const transpileFile = async (filePath) => {
24018
- const resolved = resolve36(filePath);
24102
+ const resolved = resolve37(filePath);
24019
24103
  if (visited.has(resolved))
24020
24104
  return;
24021
24105
  visited.add(resolved);
@@ -24023,7 +24107,7 @@ ${fields}
24023
24107
  const inputDir = dirname31(resolved);
24024
24108
  const relativeDir = inputDir.startsWith(baseDir) ? inputDir.substring(baseDir.length + 1) : inputDir;
24025
24109
  const targetDir = join50(outDir, relativeDir);
24026
- const targetPath = join50(targetDir, basename17(resolved));
24110
+ const targetPath = join50(targetDir, basename18(resolved));
24027
24111
  await fs5.mkdir(targetDir, { recursive: true });
24028
24112
  await fs5.copyFile(resolved, targetPath);
24029
24113
  allOutputs.push(targetPath);
@@ -24038,7 +24122,7 @@ ${fields}
24038
24122
  const inlined = await inlineResources(sourceCode, dirname31(actualPath), stylePreprocessors);
24039
24123
  sourceCode = inlineTemplateAndLowerDeferSync(inlined.source, dirname31(actualPath)).source;
24040
24124
  const inputDir = dirname31(actualPath);
24041
- const fileBase = basename17(actualPath).replace(/\.[cm]?[tj]sx?$/, ".js");
24125
+ const fileBase = basename18(actualPath).replace(/\.[cm]?[tj]sx?$/, ".js");
24042
24126
  const targetPath = toOutputPath(actualPath);
24043
24127
  const targetDir = dirname31(targetPath);
24044
24128
  const relativeDir = relative25(outDir, targetDir).replace(/\\/g, "/");
@@ -24067,7 +24151,7 @@ ${fields}
24067
24151
  importRewrites.set(specifier, relativeRewrite);
24068
24152
  return resolved;
24069
24153
  }).filter((path) => Boolean(path));
24070
- const isEntry = resolve36(actualPath) === resolve36(entryPath);
24154
+ const isEntry = resolve37(actualPath) === resolve37(entryPath);
24071
24155
  const contentHash = Bun.hash(sourceCode).toString(BASE_36_RADIX);
24072
24156
  const cacheKey = actualPath;
24073
24157
  const shouldWriteFile = cacheBuster && isEntry ? true : jitContentCache.get(cacheKey) !== contentHash || !existsSync38(targetPath);
@@ -24139,11 +24223,11 @@ export const __ABSOLUTE_PAGE_USES_LEGACY_ANIMATIONS__ = true;
24139
24223
  const compiledRoot = compiledParent;
24140
24224
  const indexesDir = join50(compiledParent, "indexes");
24141
24225
  await traceAngularPhase("setup/create-indexes-dir", () => fs5.mkdir(indexesDir, { recursive: true }));
24142
- const aotOutputs = hmr ? [] : await traceAngularPhase("aot/compile-files", () => compileAngularFiles(entryPoints.map((entry) => resolve36(entry)), compiledRoot, stylePreprocessors), { entries: entryPoints.length });
24226
+ const aotOutputs = hmr ? [] : await traceAngularPhase("aot/compile-files", () => compileAngularFiles(entryPoints.map((entry) => resolve37(entry)), compiledRoot, stylePreprocessors), { entries: entryPoints.length });
24143
24227
  if (!hmr) {
24144
24228
  await traceAngularPhase("aot/copy-json-resources", async () => {
24145
24229
  const cwd = process.cwd();
24146
- const angularSrcDir = resolve36(outRoot);
24230
+ const angularSrcDir = resolve37(outRoot);
24147
24231
  if (!existsSync38(angularSrcDir))
24148
24232
  return;
24149
24233
  const jsonGlob = new Glob8("**/*.json");
@@ -24161,22 +24245,22 @@ export const __ABSOLUTE_PAGE_USES_LEGACY_ANIMATIONS__ = true;
24161
24245
  }
24162
24246
  const usesLegacyAngularAnimations = await traceAngularPhase("setup/legacy-animation-resolver", () => createLegacyAngularAnimationUsageResolver(outRoot));
24163
24247
  const compileTasks = entryPoints.map(async (entry) => {
24164
- const resolvedEntry = resolve36(entry);
24248
+ const resolvedEntry = resolve37(entry);
24165
24249
  const relativeEntry = relative25(outRoot, resolvedEntry).replace(/\.[tj]s$/, ".js");
24166
24250
  const compileEntry = () => compileAngularFileJIT(resolvedEntry, compiledRoot, outRoot, stylePreprocessors);
24167
24251
  let outputs = hmr ? await traceAngularPhase("jit/compile-entry", compileEntry, {
24168
24252
  entry: resolvedEntry
24169
24253
  }) : aotOutputs;
24170
- const fileBase = basename17(resolvedEntry).replace(/\.[tj]s$/, "");
24254
+ const fileBase = basename18(resolvedEntry).replace(/\.[tj]s$/, "");
24171
24255
  const jsName = `${fileBase}.js`;
24172
24256
  const compiledFallbackPaths = [
24173
24257
  join50(compiledRoot, relativeEntry),
24174
24258
  join50(compiledRoot, "pages", jsName),
24175
24259
  join50(compiledRoot, jsName)
24176
- ].map((file) => resolve36(file));
24260
+ ].map((file) => resolve37(file));
24177
24261
  const resolveRawServerFile = (candidatePaths) => {
24178
24262
  const normalizedCandidates = [
24179
- ...candidatePaths.map((file) => resolve36(file)),
24263
+ ...candidatePaths.map((file) => resolve37(file)),
24180
24264
  ...compiledFallbackPaths
24181
24265
  ];
24182
24266
  let candidate = normalizedCandidates.find((file) => existsSync38(file) && file.endsWith(`${sep9}${relativeEntry}`));
@@ -24257,8 +24341,8 @@ export const __ABSOLUTE_PAGE_USES_LEGACY_ANIMATIONS__ = true;
24257
24341
  const fragments = [];
24258
24342
  if (providersInjection.appProvidersSource) {
24259
24343
  const compiledAppProvidersPath = (() => {
24260
- const angularDirAbs = resolve36(outRoot);
24261
- const appSourceAbs = resolve36(providersInjection.appProvidersSource);
24344
+ const angularDirAbs = resolve37(outRoot);
24345
+ const appSourceAbs = resolve37(providersInjection.appProvidersSource);
24262
24346
  const rel = relative25(angularDirAbs, appSourceAbs).replace(/\\/g, "/");
24263
24347
  return join50(compiledParent, rel).replace(/\.[cm]?[tj]sx?$/, ".js");
24264
24348
  })();
@@ -25005,7 +25089,7 @@ var require_node = __commonJS(function(exports, module) {
25005
25089
  // src/build/compileEmber.ts
25006
25090
  import { existsSync as existsSync39 } from "fs";
25007
25091
  import { mkdir as mkdir11, rm as rm6 } from "fs/promises";
25008
- import { basename as basename18, dirname as dirname32, extname as extname17, join as join51, resolve as resolve37 } from "path";
25092
+ import { basename as basename19, dirname as dirname32, extname as extname17, join as join51, resolve as resolve38 } from "path";
25009
25093
  var {build: bunBuild3, Transpiler: Transpiler6, write: write5, file: file4 } = globalThis.Bun;
25010
25094
  var cachedPreprocessor = null, getPreprocessor = async () => {
25011
25095
  if (cachedPreprocessor)
@@ -25101,7 +25185,7 @@ export const importSync = (specifier) => {
25101
25185
  const originalImporter = stagedSourceMap.get(args.importer);
25102
25186
  if (!originalImporter)
25103
25187
  return;
25104
- const candidateBase = resolve37(dirname32(originalImporter), args.path);
25188
+ const candidateBase = resolve38(dirname32(originalImporter), args.path);
25105
25189
  const extensionsToTry = ["", ".gts", ".gjs", ".ts", ".js"];
25106
25190
  for (const ext of extensionsToTry) {
25107
25191
  const candidate = candidateBase + ext;
@@ -25160,7 +25244,7 @@ export const renderToHTML = (props = {}) => {
25160
25244
  export { PageComponent };
25161
25245
  export default PageComponent;
25162
25246
  `, compileEmberFile = async (entry, compiledRoot, cwd = process.cwd()) => {
25163
- const resolvedEntry = resolve37(entry);
25247
+ const resolvedEntry = resolve38(entry);
25164
25248
  const source = await file4(resolvedEntry).text();
25165
25249
  let preprocessed = source;
25166
25250
  if (isTemplateTagFile(resolvedEntry)) {
@@ -25171,7 +25255,7 @@ export default PageComponent;
25171
25255
  preprocessed = rewriteTemplateEvalToScope(result.code);
25172
25256
  }
25173
25257
  const transpiled = transpiler6.transformSync(preprocessed);
25174
- const baseName = basename18(resolvedEntry).replace(/\.(gjs|gts|ts|js)$/, "");
25258
+ const baseName = basename19(resolvedEntry).replace(/\.(gjs|gts|ts|js)$/, "");
25175
25259
  const tmpDir = join51(compiledRoot, "_tmp");
25176
25260
  const serverDir = join51(compiledRoot, "server");
25177
25261
  const clientDir = join51(compiledRoot, "client");
@@ -25180,8 +25264,8 @@ export default PageComponent;
25180
25264
  mkdir11(serverDir, { recursive: true }),
25181
25265
  mkdir11(clientDir, { recursive: true })
25182
25266
  ]);
25183
- const tmpPagePath = resolve37(join51(tmpDir, `${baseName}.module.js`));
25184
- const tmpHarnessPath = resolve37(join51(tmpDir, `${baseName}.harness.js`));
25267
+ const tmpPagePath = resolve38(join51(tmpDir, `${baseName}.module.js`));
25268
+ const tmpHarnessPath = resolve38(join51(tmpDir, `${baseName}.harness.js`));
25185
25269
  await Promise.all([
25186
25270
  write5(tmpPagePath, transpiled),
25187
25271
  write5(tmpHarnessPath, generateServerHarness(tmpPagePath))
@@ -25246,24 +25330,24 @@ var importFromProject = (specifier, projectRoot = process.cwd()) => {
25246
25330
 
25247
25331
  // src/build/buildReactVendor.ts
25248
25332
  import { existsSync as existsSync40, mkdirSync as mkdirSync13 } from "fs";
25249
- import { join as join52, resolve as resolve38 } from "path";
25333
+ import { join as join52, resolve as resolve39 } from "path";
25250
25334
  import { rm as rm7 } from "fs/promises";
25251
25335
  var {build: bunBuild4 } = globalThis.Bun;
25252
25336
  var resolveJsxDevRuntimeCompatPath = () => {
25253
25337
  const candidates = [
25254
- resolve38(import.meta.dir, "react", "jsxDevRuntimeCompat.js"),
25255
- resolve38(import.meta.dir, "src", "react", "jsxDevRuntimeCompat.ts"),
25256
- resolve38(import.meta.dir, "..", "react", "jsxDevRuntimeCompat.js"),
25257
- resolve38(import.meta.dir, "..", "src", "react", "jsxDevRuntimeCompat.ts"),
25258
- resolve38(import.meta.dir, "..", "..", "dist", "react", "jsxDevRuntimeCompat.js"),
25259
- resolve38(import.meta.dir, "..", "..", "src", "react", "jsxDevRuntimeCompat.ts")
25338
+ resolve39(import.meta.dir, "react", "jsxDevRuntimeCompat.js"),
25339
+ resolve39(import.meta.dir, "src", "react", "jsxDevRuntimeCompat.ts"),
25340
+ resolve39(import.meta.dir, "..", "react", "jsxDevRuntimeCompat.js"),
25341
+ resolve39(import.meta.dir, "..", "src", "react", "jsxDevRuntimeCompat.ts"),
25342
+ resolve39(import.meta.dir, "..", "..", "dist", "react", "jsxDevRuntimeCompat.js"),
25343
+ resolve39(import.meta.dir, "..", "..", "src", "react", "jsxDevRuntimeCompat.ts")
25260
25344
  ];
25261
25345
  for (const candidate of candidates) {
25262
25346
  if (existsSync40(candidate)) {
25263
25347
  return candidate.replace(/\\/g, "/");
25264
25348
  }
25265
25349
  }
25266
- return (candidates[0] ?? resolve38(import.meta.dir, "react", "jsxDevRuntimeCompat.js")).replace(/\\/g, "/");
25350
+ return (candidates[0] ?? resolve39(import.meta.dir, "react", "jsxDevRuntimeCompat.js")).replace(/\\/g, "/");
25267
25351
  }, jsxDevRuntimeCompatPath, jsxRuntimeCompatPath, reactSpecifiers, toSafeFileName = (specifier) => specifier.replace(/\//g, "_"), computeVendorPaths = () => {
25268
25352
  const paths = {};
25269
25353
  for (const specifier of reactSpecifiers) {
@@ -25718,12 +25802,12 @@ import {
25718
25802
  writeFileSync as writeFileSync14
25719
25803
  } from "fs";
25720
25804
  import {
25721
- basename as basename19,
25805
+ basename as basename20,
25722
25806
  dirname as dirname33,
25723
25807
  extname as extname18,
25724
25808
  join as join56,
25725
25809
  relative as relative26,
25726
- resolve as resolve39,
25810
+ resolve as resolve40,
25727
25811
  sep as sep10
25728
25812
  } from "path";
25729
25813
  import { cwd, env as env2, exit } from "process";
@@ -25860,7 +25944,7 @@ ${offenders.map((o) => ` \u2022 ${o}`).join(`
25860
25944
  const copyFile = (path) => {
25861
25945
  if (!path)
25862
25946
  return;
25863
- const dest = join56(outDir, basename19(path));
25947
+ const dest = join56(outDir, basename20(path));
25864
25948
  cpSync(path, dest, { force: true });
25865
25949
  return dest;
25866
25950
  };
@@ -25886,7 +25970,7 @@ ${offenders.map((o) => ` \u2022 ${o}`).join(`
25886
25970
  }, formatManifestKeyCollisions = (collisions, projectRoot) => collisions.map(({ key, next, previous }) => {
25887
25971
  const first = relative26(projectRoot, previous);
25888
25972
  const second = relative26(projectRoot, next);
25889
- return `Manifest key "${key}" belongs to two pages: ${first} and ${second}. Pages are looked up by file name (asset(manifest, '${key}')), so each name must be unique across htmlDirectory, htmxDirectory and the other page directories. Rename one of them, for example ${basename19(second)} to ${basename19(second).replace(key, `${key}Page`)}, and update its route.`;
25973
+ return `Manifest key "${key}" belongs to two pages: ${first} and ${second}. Pages are looked up by file name (asset(manifest, '${key}')), so each name must be unique across htmlDirectory, htmxDirectory and the other page directories. Rename one of them, for example ${basename20(second)} to ${basename20(second).replace(key, `${key}Page`)}, and update its route.`;
25890
25974
  }).join(`
25891
25975
  `), copyHtmxVendor = (htmxDir, htmxDestDir) => {
25892
25976
  mkdirSync17(htmxDestDir, { recursive: true });
@@ -25907,8 +25991,8 @@ ${offenders.map((o) => ` \u2022 ${o}`).join(`
25907
25991
  if (globalThis.__absoluteVersion)
25908
25992
  return;
25909
25993
  const candidates = [
25910
- resolve39(import.meta.dir, "..", "..", "package.json"),
25911
- resolve39(import.meta.dir, "..", "package.json")
25994
+ resolve40(import.meta.dir, "..", "..", "package.json"),
25995
+ resolve40(import.meta.dir, "..", "package.json")
25912
25996
  ];
25913
25997
  const resolveCandidate = async (remaining) => {
25914
25998
  const [candidate, ...rest] = remaining;
@@ -25924,7 +26008,7 @@ ${offenders.map((o) => ` \u2022 ${o}`).join(`
25924
26008
  };
25925
26009
  await resolveCandidate(candidates);
25926
26010
  }, SKIP_DIRS5, addWorkerPathIfExists = (file, relPath, workerPaths) => {
25927
- const absPath = resolve39(file, "..", relPath);
26011
+ const absPath = resolve40(file, "..", relPath);
25928
26012
  try {
25929
26013
  statSync7(absPath);
25930
26014
  workerPaths.add(absPath);
@@ -26015,7 +26099,7 @@ ${offenders.map((o) => ` \u2022 ${o}`).join(`
26015
26099
  copyVueDevIndexes(vueDir, vuePagesPath, vueEntries, devIndexDir);
26016
26100
  }
26017
26101
  }, rewriteFileRouteImports = (content, indexesDir) => content.replace(/from\s*'(\.{1,2}\/[^']+)'/g, (match, specifier) => {
26018
- const target = resolve39(indexesDir, specifier);
26102
+ const target = resolve40(indexesDir, specifier);
26019
26103
  if (!isInFileRouteRoot(target))
26020
26104
  return match;
26021
26105
  return `from '/@src/${relative26(process.cwd(), target).replace(/\\/g, "/")}'`;
@@ -26033,7 +26117,7 @@ ${offenders.map((o) => ` \u2022 ${o}`).join(`
26033
26117
  return;
26034
26118
  }
26035
26119
  const indexFiles = readDir(reactIndexesPath).filter((file) => file.endsWith(".tsx"));
26036
- const pagesRel = relative26(process.cwd(), resolve39(reactPagesPath)).replace(/\\/g, "/");
26120
+ const pagesRel = relative26(process.cwd(), resolve40(reactPagesPath)).replace(/\\/g, "/");
26037
26121
  for (const file of indexFiles) {
26038
26122
  let content = readFileSync35(join56(reactIndexesPath, file), "utf-8");
26039
26123
  content = content.replace(/from\s*['"]([^'"]*\/pages\/([^'"]+))['"]/g, (_match, _fullPath, componentName) => `from '/@src/${pagesRel}/${componentName}'`);
@@ -26042,27 +26126,27 @@ ${offenders.map((o) => ` \u2022 ${o}`).join(`
26042
26126
  }
26043
26127
  }, copySvelteDevIndexes = (svelteDir, sveltePagesPath, svelteEntries, devIndexDir) => {
26044
26128
  const svelteIndexDir = join56(getFrameworkGeneratedDir("svelte"), "indexes");
26045
- const sveltePageEntries = svelteEntries.filter((file) => resolve39(file).startsWith(resolve39(sveltePagesPath)) || fileRouteFor(file) !== undefined);
26129
+ const sveltePageEntries = svelteEntries.filter((file) => resolve40(file).startsWith(resolve40(sveltePagesPath)) || fileRouteFor(file) !== undefined);
26046
26130
  for (const entry of sveltePageEntries) {
26047
- const name = fileRouteFor(entry)?.name ?? basename19(entry).replace(/\.svelte(\.(ts|js))?$/, "");
26131
+ const name = fileRouteFor(entry)?.name ?? basename20(entry).replace(/\.svelte(\.(ts|js))?$/, "");
26048
26132
  const indexFile = join56(svelteIndexDir, "pages", `${name}.js`);
26049
26133
  if (!existsSync41(indexFile))
26050
26134
  continue;
26051
26135
  let content = readFileSync35(indexFile, "utf-8");
26052
- const srcRel = relative26(process.cwd(), resolve39(entry)).replace(/\\/g, "/");
26136
+ const srcRel = relative26(process.cwd(), resolve40(entry)).replace(/\\/g, "/");
26053
26137
  content = content.replace(/import\s+Component\s+from\s+['"]([^'"]+)['"]/, `import Component from "/@src/${srcRel}"`);
26054
26138
  writeFileSync14(join56(devIndexDir, `${name}.svelte.js`), content);
26055
26139
  }
26056
26140
  }, copyVueDevIndexes = (vueDir, vuePagesPath, vueEntries, devIndexDir) => {
26057
26141
  const vueIndexDir = join56(getFrameworkGeneratedDir("vue"), "indexes");
26058
- const vuePageEntries = vueEntries.filter((file) => resolve39(file).startsWith(resolve39(vuePagesPath)));
26142
+ const vuePageEntries = vueEntries.filter((file) => resolve40(file).startsWith(resolve40(vuePagesPath)));
26059
26143
  for (const entry of vuePageEntries) {
26060
- const name = basename19(entry, ".vue");
26144
+ const name = basename20(entry, ".vue");
26061
26145
  const indexFile = join56(vueIndexDir, `${name}.js`);
26062
26146
  if (!existsSync41(indexFile))
26063
26147
  continue;
26064
26148
  let content = readFileSync35(indexFile, "utf-8");
26065
- const srcRel = relative26(process.cwd(), resolve39(entry)).replace(/\\/g, "/");
26149
+ const srcRel = relative26(process.cwd(), resolve40(entry)).replace(/\\/g, "/");
26066
26150
  content = content.replace(/import\s+Comp(?:\s*,\s*\*\s+as\s+\w+)?\s+from\s+['"]([^'"]+)['"]/, (match) => match.replace(/from\s+['"][^'"]+['"]/, `from "/@src/${srcRel}"`));
26067
26151
  writeFileSync14(join56(devIndexDir, `${name}.vue.js`), content);
26068
26152
  }
@@ -26070,7 +26154,7 @@ ${offenders.map((o) => ` \u2022 ${o}`).join(`
26070
26154
  const urlFileMap = new Map;
26071
26155
  for (const srcPath of urlReferencedFiles) {
26072
26156
  const rel = relative26(projectRoot, srcPath).replace(/\\/g, "/");
26073
- const name = basename19(srcPath);
26157
+ const name = basename20(srcPath);
26074
26158
  const mtime = Math.round(statSync7(srcPath).mtimeMs);
26075
26159
  const url = `/@src/${rel}?v=${mtime}`;
26076
26160
  urlFileMap.set(name, url);
@@ -26080,13 +26164,13 @@ ${offenders.map((o) => ` \u2022 ${o}`).join(`
26080
26164
  }, buildProdUrlFileMap = (urlReferencedFiles, buildPath, nonReactClientOutputs) => {
26081
26165
  const urlFileMap = new Map;
26082
26166
  for (const srcPath of urlReferencedFiles) {
26083
- const srcBase = basename19(srcPath).replace(/\.[^.]+$/, "");
26084
- const output = nonReactClientOutputs.find((artifact) => basename19(artifact.path).startsWith(`${srcBase}.`));
26167
+ const srcBase = basename20(srcPath).replace(/\.[^.]+$/, "");
26168
+ const output = nonReactClientOutputs.find((artifact) => basename20(artifact.path).startsWith(`${srcBase}.`));
26085
26169
  if (!output)
26086
26170
  continue;
26087
26171
  const url = `/${relative26(buildPath, output.path).replace(/\\/g, "/")}`;
26088
- urlFileMap.set(basename19(srcPath), url);
26089
- urlFileMap.set(basename19(srcPath).replace(/\.tsx?$/, ".js"), url);
26172
+ urlFileMap.set(basename20(srcPath), url);
26173
+ urlFileMap.set(basename20(srcPath).replace(/\.tsx?$/, ".js"), url);
26090
26174
  }
26091
26175
  return urlFileMap;
26092
26176
  }, buildUrlFileMap = (urlReferencedFiles, hmr, projectRoot, buildPath, nonReactClientOutputs) => {
@@ -26344,7 +26428,7 @@ ${offenders.map((o) => ` \u2022 ${o}`).join(`
26344
26428
  if (!firstEntry)
26345
26429
  throw new Error("Expected at least one server directory entry");
26346
26430
  serverRoot = join56(firstEntry.dir, firstEntry.subdir);
26347
- serverOutDir = join56(buildPath, basename19(firstEntry.dir));
26431
+ serverOutDir = join56(buildPath, basename20(firstEntry.dir));
26348
26432
  } else if (serverDirMap.length > 1) {
26349
26433
  serverRoot = commonAncestor(serverDirMap.map((entry) => entry.dir), projectRoot);
26350
26434
  serverOutDir = buildPath;
@@ -26377,13 +26461,13 @@ ${offenders.map((o) => ` \u2022 ${o}`).join(`
26377
26461
  const filterToIncrementalEntries = (entryPoints, mapToSource) => {
26378
26462
  if (!isIncremental || !incrementalFiles)
26379
26463
  return entryPoints;
26380
- const normalizedIncremental = new Set(incrementalFiles.map((f) => resolve39(f)));
26464
+ const normalizedIncremental = new Set(incrementalFiles.map((f) => resolve40(f)));
26381
26465
  const matchingEntries = [];
26382
26466
  for (const entry of entryPoints) {
26383
26467
  const sourceFile = mapToSource(entry);
26384
26468
  if (!sourceFile)
26385
26469
  continue;
26386
- if (!normalizedIncremental.has(resolve39(sourceFile)))
26470
+ if (!normalizedIncremental.has(resolve40(sourceFile)))
26387
26471
  continue;
26388
26472
  matchingEntries.push(entry);
26389
26473
  }
@@ -26517,7 +26601,7 @@ ${offenders.map((o) => ` \u2022 ${o}`).join(`
26517
26601
  mkdirSync17(htmlConventionsOutDir, { recursive: true });
26518
26602
  const htmlPathRemap = new Map;
26519
26603
  for (const sourcePath of htmlConventionSources) {
26520
- const dest = join56(htmlConventionsOutDir, basename19(sourcePath));
26604
+ const dest = join56(htmlConventionsOutDir, basename20(sourcePath));
26521
26605
  cpSync(sourcePath, dest, { force: true });
26522
26606
  htmlPathRemap.set(sourcePath, dest);
26523
26607
  }
@@ -26569,12 +26653,12 @@ ${offenders.map((o) => ` \u2022 ${o}`).join(`
26569
26653
  return scoped;
26570
26654
  return scoped.filter((entry) => {
26571
26655
  const source = mapToSource(entry);
26572
- return source !== null && deferPageEntries.except.has(resolve39(source));
26656
+ return source !== null && deferPageEntries.except.has(resolve40(source));
26573
26657
  });
26574
26658
  };
26575
26659
  const mapReactIndexToPage = (entry) => {
26576
- if (reactIndexesPath && reactPagesPath && entry.startsWith(resolve39(reactIndexesPath))) {
26577
- const pageName = basename19(entry, ".tsx");
26660
+ if (reactIndexesPath && reactPagesPath && entry.startsWith(resolve40(reactIndexesPath))) {
26661
+ const pageName = basename20(entry, ".tsx");
26578
26662
  return fileRouteNamed(pageName)?.source ?? join56(reactPagesPath, `${pageName}.tsx`);
26579
26663
  }
26580
26664
  return null;
@@ -26613,9 +26697,9 @@ ${offenders.map((o) => ` \u2022 ${o}`).join(`
26613
26697
  return new Set;
26614
26698
  const resolved = new Set;
26615
26699
  for (const entry of vueEntries) {
26616
- const name = basename19(entry, ".vue");
26700
+ const name = basename20(entry, ".vue");
26617
26701
  if (ssrOnlyPageNames.has(name)) {
26618
- resolved.add(resolve39(entry));
26702
+ resolved.add(resolve40(entry));
26619
26703
  }
26620
26704
  }
26621
26705
  return resolved;
@@ -26678,7 +26762,10 @@ ${offenders.map((o) => ` \u2022 ${o}`).join(`
26678
26762
  { clientPaths: angularClientPaths, serverPaths: angularServerPaths },
26679
26763
  { serverPaths: emberServerPaths },
26680
26764
  { svelteClientPaths: islandSvelteClientPaths },
26681
- { vueClientPaths: islandVueClientPaths },
26765
+ {
26766
+ vueClientPaths: islandVueClientPaths,
26767
+ vueCssPathsBySource: islandVueCssPathsBySource
26768
+ },
26682
26769
  { clientPaths: islandAngularClientPaths }
26683
26770
  ] = await Promise.all([
26684
26771
  shouldCompileSvelte ? tracePhase("compile/svelte", () => Promise.resolve().then(() => (init_compileSvelte(), {})).then((mod) => compileSvelte(svelteEntries, svelteDir, new Map, hmr, styleTransformConfig))) : {
@@ -26712,11 +26799,12 @@ ${offenders.map((o) => ` \u2022 ${o}`).join(`
26712
26799
  clientPaths: [...emptyStringArray],
26713
26800
  serverPaths: [...emptyStringArray]
26714
26801
  },
26715
- shouldCompileIslandSvelte ? tracePhase("compile/island-svelte", () => Promise.resolve().then(() => (init_compileSvelte(), {})).then((mod) => compileSvelte(islandSvelteSources, svelteDir, new Map, hmr, styleTransformConfig))) : {
26802
+ shouldCompileIslandSvelte ? tracePhase("compile/island-svelte", () => Promise.resolve().then(() => (init_compileSvelte(), {})).then((mod) => compileSvelte(islandSvelteSources, svelteDir, new Map, hmr, styleTransformConfig, { externalCss: true }))) : {
26716
26803
  svelteClientPaths: [...emptyStringArray]
26717
26804
  },
26718
26805
  shouldCompileIslandVue ? tracePhase("compile/island-vue", () => Promise.resolve().then(() => (init_compileVue(), {})).then((mod) => compileVue(islandVueSources, vueDir, hmr, styleTransformConfig))) : {
26719
- vueClientPaths: [...emptyStringArray]
26806
+ vueClientPaths: [...emptyStringArray],
26807
+ vueCssPathsBySource: new Map
26720
26808
  },
26721
26809
  shouldCompileIslandAngular ? tracePhase("compile/island-angular", () => Promise.resolve().then(() => (init_compileAngular(), {})).then((mod) => compileAngular(islandAngularSources, angularDir, hmr, styleTransformConfig))) : {
26722
26810
  clientPaths: [...emptyStringArray]
@@ -26728,7 +26816,7 @@ ${offenders.map((o) => ` \u2022 ${o}`).join(`
26728
26816
  const clientPath = islandSvelteClientPaths[idx];
26729
26817
  if (!sourcePath || !clientPath)
26730
26818
  continue;
26731
- islandSvelteClientPathMap.set(resolve39(sourcePath), clientPath);
26819
+ islandSvelteClientPathMap.set(resolve40(sourcePath), clientPath);
26732
26820
  }
26733
26821
  const islandVueClientPathMap = new Map;
26734
26822
  for (let idx = 0;idx < islandVueSources.length; idx++) {
@@ -26736,7 +26824,7 @@ ${offenders.map((o) => ` \u2022 ${o}`).join(`
26736
26824
  const clientPath = islandVueClientPaths[idx];
26737
26825
  if (!sourcePath || !clientPath)
26738
26826
  continue;
26739
- islandVueClientPathMap.set(resolve39(sourcePath), clientPath);
26827
+ islandVueClientPathMap.set(resolve40(sourcePath), clientPath);
26740
26828
  }
26741
26829
  const islandAngularClientPathMap = new Map;
26742
26830
  for (let idx = 0;idx < islandAngularSources.length; idx++) {
@@ -26744,7 +26832,7 @@ ${offenders.map((o) => ` \u2022 ${o}`).join(`
26744
26832
  const clientPath = islandAngularClientPaths[idx];
26745
26833
  if (!sourcePath || !clientPath)
26746
26834
  continue;
26747
- islandAngularClientPathMap.set(resolve39(sourcePath), clientPath);
26835
+ islandAngularClientPathMap.set(resolve40(sourcePath), clientPath);
26748
26836
  }
26749
26837
  const reactConventionSources = collectConventionSourceFiles(conventionsMap.react);
26750
26838
  const svelteConventionSources = collectConventionSourceFiles(conventionsMap.svelte);
@@ -26803,7 +26891,7 @@ ${offenders.map((o) => ` \u2022 ${o}`).join(`
26803
26891
  rmSync2(destDir, { force: true, recursive: true });
26804
26892
  mkdirSync17(destDir, { recursive: true });
26805
26893
  const destPaths = await Promise.all(compiledPaths.map(async (compiledPath, idx) => {
26806
- const name = basename19(compiledPath).replace(/\.[^.]+$/, "");
26894
+ const name = basename20(compiledPath).replace(/\.[^.]+$/, "");
26807
26895
  const result = await bunBuild8({
26808
26896
  define: serverDefine,
26809
26897
  entrypoints: [compiledPath],
@@ -26872,6 +26960,9 @@ ${offenders.map((o) => ` \u2022 ${o}`).join(`
26872
26960
  angular: islandAngularClientPathMap,
26873
26961
  svelte: islandSvelteClientPathMap,
26874
26962
  vue: islandVueClientPathMap
26963
+ },
26964
+ cssPathMaps: {
26965
+ vue: islandVueCssPathsBySource
26875
26966
  }
26876
26967
  })) : {
26877
26968
  entries: [],
@@ -27177,7 +27268,7 @@ ${offenders.map((o) => ` \u2022 ${o}`).join(`
27177
27268
  globalCssEntries.length > 0 ? tracePhase("bun/global-css", () => bunBuild8(mergeBunBuildConfig({
27178
27269
  entrypoints: globalCssEntries,
27179
27270
  naming: `[dir]/[name].[hash].[ext]`,
27180
- outdir: stylesDir ? join56(buildPath, basename19(stylesDir)) : buildPath,
27271
+ outdir: stylesDir ? join56(buildPath, basename20(stylesDir)) : buildPath,
27181
27272
  plugins: [stylePreprocessorPlugin],
27182
27273
  root: stylesDir || clientRoot,
27183
27274
  target: "browser",
@@ -27186,7 +27277,7 @@ ${offenders.map((o) => ` \u2022 ${o}`).join(`
27186
27277
  vueCssPaths.length > 0 ? tracePhase("bun/vue-css", () => bunBuild8(mergeBunBuildConfig({
27187
27278
  entrypoints: vueCssPaths,
27188
27279
  naming: `[name].[hash].[ext]`,
27189
- outdir: join56(buildPath, assetsPath ? basename19(assetsPath) : "assets", "css"),
27280
+ outdir: join56(buildPath, assetsPath ? basename20(assetsPath) : "assets", "css"),
27190
27281
  target: "browser",
27191
27282
  throw: false
27192
27283
  }, resolveBunBuildOverride(bunBuildConfig, "vueCss")))) : undefined
@@ -27216,7 +27307,7 @@ ${offenders.map((o) => ` \u2022 ${o}`).join(`
27216
27307
  }).filter((entry) => entry.endsWith(".js.map") && !entry.includes("node_modules")).map((entry) => join56(buildPath, entry));
27217
27308
  for (const mapPath of mapFiles) {
27218
27309
  chainExternalSourcemap(mapPath);
27219
- renameSync(mapPath, join56(sourcemapDir, basename19(mapPath)));
27310
+ renameSync(mapPath, join56(sourcemapDir, basename20(mapPath)));
27220
27311
  const jsPath = mapPath.slice(0, -4);
27221
27312
  try {
27222
27313
  const javascript = readFileSync35(jsPath, "utf-8").replace(/\n?\/\/# sourceMappingURL=[^\n]*\s*$/, `
@@ -27380,7 +27471,7 @@ ${offenders.map((o) => ` \u2022 ${o}`).join(`
27380
27471
  for (const artifact of serverOutputs) {
27381
27472
  if (extname18(artifact.path) !== ".js")
27382
27473
  continue;
27383
- const fileWithHash = basename19(artifact.path);
27474
+ const fileWithHash = basename20(artifact.path);
27384
27475
  const [baseName] = fileWithHash.split(`.${artifact.hash}.`);
27385
27476
  if (!baseName)
27386
27477
  continue;
@@ -27400,7 +27491,7 @@ ${offenders.map((o) => ` \u2022 ${o}`).join(`
27400
27491
  for (const artifact of cssOutputs) {
27401
27492
  if (extname18(artifact.path) !== ".css")
27402
27493
  continue;
27403
- const cssName = stripHash(basename19(artifact.path), artifact.hash);
27494
+ const cssName = stripHash(basename20(artifact.path), artifact.hash);
27404
27495
  if (cssName)
27405
27496
  cssByName.set(cssName, artifact);
27406
27497
  }
@@ -27410,7 +27501,7 @@ ${offenders.map((o) => ` \u2022 ${o}`).join(`
27410
27501
  await Promise.all(serverOutputs.map(async (artifact) => {
27411
27502
  if (extname18(artifact.path) !== ".js")
27412
27503
  return;
27413
- const pascalName = stripHash(basename19(artifact.path), artifact.hash);
27504
+ const pascalName = stripHash(basename20(artifact.path), artifact.hash);
27414
27505
  if (!pascalName)
27415
27506
  return;
27416
27507
  serverJsByPascalName.set(pascalName, artifact);
@@ -27429,12 +27520,12 @@ ${offenders.map((o) => ` \u2022 ${o}`).join(`
27429
27520
  spaSideManifestPaths.push(sideManifestPath);
27430
27521
  }
27431
27522
  for (const serverPath of emberServerPaths) {
27432
- const fileBase = basename19(serverPath, ".js");
27523
+ const fileBase = basename20(serverPath, ".js");
27433
27524
  manifest[toPascal(fileBase)] = serverPath;
27434
27525
  }
27435
27526
  if (skipAngularClientBundle) {
27436
27527
  for (const clientPath of angularClientPaths) {
27437
- const fileBase = basename19(clientPath, ".js");
27528
+ const fileBase = basename20(clientPath, ".js");
27438
27529
  const relFromCwd = relative26(projectRoot, clientPath).replace(/\\/g, "/");
27439
27530
  manifest[`${toPascal(fileBase)}Index`] = `/@src/${relFromCwd}`;
27440
27531
  }
@@ -27461,7 +27552,7 @@ ${offenders.map((o) => ` \u2022 ${o}`).join(`
27461
27552
  let html = readFileSync35(filePath, "utf-8");
27462
27553
  if (html.includes("data-hmr-client"))
27463
27554
  return;
27464
- const pageName = JSON.stringify(basename19(filePath)).replace(/</g, "\\u003c");
27555
+ const pageName = JSON.stringify(basename20(filePath)).replace(/</g, "\\u003c");
27465
27556
  const tag = `<script>window.__HMR_FRAMEWORK__="${framework}";window.__HMR_PAGE__=${pageName};</script><script data-hmr-client>${hmrClientBundle}</script>`;
27466
27557
  const bodyClose = /<\/body\s*>/i.exec(html);
27467
27558
  html = bodyClose ? html.slice(0, bodyClose.index) + tag + html.slice(bodyClose.index) : html + tag;
@@ -27470,7 +27561,7 @@ ${offenders.map((o) => ` \u2022 ${o}`).join(`
27470
27561
  const processHtmlPages = async () => {
27471
27562
  if (!(htmlDir && htmlPagesPath))
27472
27563
  return;
27473
- const outputHtmlPages = isSingle ? join56(buildPath, "pages") : join56(buildPath, basename19(htmlDir), "pages");
27564
+ const outputHtmlPages = isSingle ? join56(buildPath, "pages") : join56(buildPath, basename20(htmlDir), "pages");
27474
27565
  mkdirSync17(outputHtmlPages, { recursive: true });
27475
27566
  cpSync(htmlPagesPath, outputHtmlPages, {
27476
27567
  force: true,
@@ -27494,13 +27585,13 @@ ${offenders.map((o) => ` \u2022 ${o}`).join(`
27494
27585
  const source = readFileSync35(htmlFile, "utf8");
27495
27586
  writeFileSync14(htmlFile, injectVitalsReporterHtml(source));
27496
27587
  }
27497
- recordManifestKey(basename19(htmlFile, ".html"), htmlFile, join56(htmlPagesPath, relative26(outputHtmlPages, htmlFile)));
27588
+ recordManifestKey(basename20(htmlFile, ".html"), htmlFile, join56(htmlPagesPath, relative26(outputHtmlPages, htmlFile)));
27498
27589
  }
27499
27590
  };
27500
27591
  const processHtmxPages = async () => {
27501
27592
  if (!(htmxDir && htmxPagesPath))
27502
27593
  return;
27503
- const outputHtmxPages = isSingle ? join56(buildPath, "pages") : join56(buildPath, basename19(htmxDir), "pages");
27594
+ const outputHtmxPages = isSingle ? join56(buildPath, "pages") : join56(buildPath, basename20(htmxDir), "pages");
27504
27595
  mkdirSync17(outputHtmxPages, { recursive: true });
27505
27596
  cpSync(htmxPagesPath, outputHtmxPages, {
27506
27597
  force: true,
@@ -27508,7 +27599,7 @@ ${offenders.map((o) => ` \u2022 ${o}`).join(`
27508
27599
  });
27509
27600
  await expandStaticPageIncludes(htmxPagesPath, outputHtmxPages);
27510
27601
  if (shouldCopyHtmx) {
27511
- const htmxDestDir = isSingle ? buildPath : join56(buildPath, basename19(htmxDir));
27602
+ const htmxDestDir = isSingle ? buildPath : join56(buildPath, basename20(htmxDir));
27512
27603
  copyHtmxVendor(htmxDir, htmxDestDir);
27513
27604
  }
27514
27605
  await updateAssetPaths(manifest, outputHtmxPages);
@@ -27528,7 +27619,7 @@ ${offenders.map((o) => ` \u2022 ${o}`).join(`
27528
27619
  const source = readFileSync35(htmxFile, "utf8");
27529
27620
  writeFileSync14(htmxFile, injectVitalsReporterHtml(source));
27530
27621
  }
27531
- recordManifestKey(basename19(htmxFile, ".html"), htmxFile, join56(htmxPagesPath, relative26(outputHtmxPages, htmxFile)));
27622
+ recordManifestKey(basename20(htmxFile, ".html"), htmxFile, join56(htmxPagesPath, relative26(outputHtmxPages, htmxFile)));
27532
27623
  }
27533
27624
  };
27534
27625
  const processStaticConventions = async () => {
@@ -27678,7 +27769,7 @@ ${offenders.map((o) => ` \u2022 ${o}`).join(`
27678
27769
  pageEntries,
27679
27770
  tailwindChanged: tailwindResult?.cssChanged ?? false
27680
27771
  };
27681
- }, projectTsconfig = () => existsSync41(resolve39("tsconfig.json")) ? { tsconfig: "./tsconfig.json" } : {}, build = async (config) => {
27772
+ }, projectTsconfig = () => existsSync41(resolve40("tsconfig.json")) ? { tsconfig: "./tsconfig.json" } : {}, build = async (config) => {
27682
27773
  const projectRoot = cwd();
27683
27774
  const buildPath = validateSafePath(config.buildDirectory ?? "build", projectRoot);
27684
27775
  return withBuildDirectoryLock(buildPath, () => buildUnlocked(config));
@@ -27779,14 +27870,14 @@ var init_build = __esm(() => {
27779
27870
 
27780
27871
  // src/dev/runtimePaths.ts
27781
27872
  import { existsSync as existsSync42 } from "fs";
27782
- import { resolve as resolve40 } from "path";
27873
+ import { resolve as resolve41 } from "path";
27783
27874
  var resolveDevClientDirectory = () => {
27784
27875
  const candidates = [
27785
- resolve40(import.meta.dir, "client"),
27786
- resolve40(import.meta.dir, "dev/client"),
27787
- resolve40(import.meta.dir, "../dev/client")
27876
+ resolve41(import.meta.dir, "client"),
27877
+ resolve41(import.meta.dir, "dev/client"),
27878
+ resolve41(import.meta.dir, "../dev/client")
27788
27879
  ];
27789
- const directory = candidates.find((candidate) => existsSync42(resolve40(candidate, "hmrClient.ts")));
27880
+ const directory = candidates.find((candidate) => existsSync42(resolve41(candidate, "hmrClient.ts")));
27790
27881
  if (!directory) {
27791
27882
  throw new Error("AbsoluteJS browser HMR sources are missing from the installed package.");
27792
27883
  }
@@ -27943,7 +28034,7 @@ var init_buildEmberVendor = __esm(() => {
27943
28034
  });
27944
28035
 
27945
28036
  // src/build/workspacePackages.ts
27946
- import { readFileSync as readFileSync36, realpathSync as realpathSync5 } from "fs";
28037
+ import { readFileSync as readFileSync36, realpathSync as realpathSync6 } from "fs";
27947
28038
  import { join as join58, sep as sep11 } from "path";
27948
28039
  var NODE_MODULES_SEGMENT, verdicts, isWorkspacePackageSpecifier = (specifier, projectRoot = process.cwd()) => {
27949
28040
  const key = `${projectRoot}\x00${specifier}`;
@@ -27952,7 +28043,7 @@ var NODE_MODULES_SEGMENT, verdicts, isWorkspacePackageSpecifier = (specifier, pr
27952
28043
  return known;
27953
28044
  let verdict = false;
27954
28045
  try {
27955
- const resolved = realpathSync5(Bun.resolveSync(specifier, projectRoot));
28046
+ const resolved = realpathSync6(Bun.resolveSync(specifier, projectRoot));
27956
28047
  verdict = !resolved.includes(NODE_MODULES_SEGMENT);
27957
28048
  } catch {
27958
28049
  verdict = false;
@@ -27977,7 +28068,7 @@ var NODE_MODULES_SEGMENT, verdicts, isWorkspacePackageSpecifier = (specifier, pr
27977
28068
  const dirs = new Set;
27978
28069
  for (const name of names) {
27979
28070
  try {
27980
- const linked = realpathSync5(join58(projectRoot, "node_modules", name));
28071
+ const linked = realpathSync6(join58(projectRoot, "node_modules", name));
27981
28072
  if (!`${linked}${sep11}`.includes(NODE_MODULES_SEGMENT))
27982
28073
  dirs.add(linked);
27983
28074
  } catch {}
@@ -28093,9 +28184,9 @@ var stripStringsAndComments = (source) => {
28093
28184
  };
28094
28185
 
28095
28186
  // src/dev/dependencyGraph.ts
28096
- import { existsSync as existsSync44, readFileSync as readFileSync37, realpathSync as realpathSync6 } from "fs";
28187
+ import { existsSync as existsSync44, readFileSync as readFileSync37, realpathSync as realpathSync7 } from "fs";
28097
28188
  var {Glob: Glob11 } = globalThis.Bun;
28098
- import { resolve as resolve41 } from "path";
28189
+ import { resolve as resolve42 } from "path";
28099
28190
  var emptyDependencyGraph, tsTranspiler, jsTranspiler, loaderForFile = (filePath) => {
28100
28191
  const lower = filePath.toLowerCase();
28101
28192
  if (lower.endsWith(".ts") || lower.endsWith(".tsx") || lower.endsWith(".jsx"))
@@ -28106,17 +28197,17 @@ var emptyDependencyGraph, tsTranspiler, jsTranspiler, loaderForFile = (filePath)
28106
28197
  return "html";
28107
28198
  return null;
28108
28199
  }, resolveImportPath2 = (importPath, fromFile) => {
28109
- const fromDir = resolve41(fromFile, "..");
28200
+ const fromDir = resolve42(fromFile, "..");
28110
28201
  if (!importPath.startsWith(".") && !importPath.startsWith("/")) {
28111
28202
  if (!isWorkspacePackageSpecifier(importPath, fromDir))
28112
28203
  return null;
28113
28204
  try {
28114
- return realpathSync6(Bun.resolveSync(importPath, fromDir));
28205
+ return realpathSync7(Bun.resolveSync(importPath, fromDir));
28115
28206
  } catch {
28116
28207
  return null;
28117
28208
  }
28118
28209
  }
28119
- const normalized = resolve41(fromDir, importPath);
28210
+ const normalized = resolve42(fromDir, importPath);
28120
28211
  const extensions = [
28121
28212
  ".ts",
28122
28213
  ".tsx",
@@ -28146,7 +28237,7 @@ var emptyDependencyGraph, tsTranspiler, jsTranspiler, loaderForFile = (filePath)
28146
28237
  dependents.delete(normalizedPath);
28147
28238
  }
28148
28239
  }, addFileToGraph = (graph, filePath) => {
28149
- const normalizedPath = resolve41(filePath);
28240
+ const normalizedPath = resolve42(filePath);
28150
28241
  if (!existsSync44(normalizedPath))
28151
28242
  return;
28152
28243
  const dependencies = extractDependencies(normalizedPath);
@@ -28173,10 +28264,10 @@ var emptyDependencyGraph, tsTranspiler, jsTranspiler, loaderForFile = (filePath)
28173
28264
  }, IGNORED_SEGMENTS, buildInitialDependencyGraph = (graph, directories) => {
28174
28265
  const processedFiles = new Set;
28175
28266
  const glob = new Glob11("**/*.{ts,tsx,js,jsx,vue,svelte,html,htm}");
28176
- const resolvedDirs = directories.map((dir) => resolve41(dir)).filter((dir) => existsSync44(dir));
28267
+ const resolvedDirs = directories.map((dir) => resolve42(dir)).filter((dir) => existsSync44(dir));
28177
28268
  const allFiles = resolvedDirs.flatMap((dir) => Array.from(glob.scanSync({ absolute: true, cwd: dir })));
28178
28269
  for (const file of allFiles) {
28179
- const fullPath = resolve41(file);
28270
+ const fullPath = resolve42(file);
28180
28271
  if (IGNORED_SEGMENTS.some((seg) => fullPath.includes(seg)))
28181
28272
  continue;
28182
28273
  if (processedFiles.has(fullPath))
@@ -28289,7 +28380,7 @@ var emptyDependencyGraph, tsTranspiler, jsTranspiler, loaderForFile = (filePath)
28289
28380
  return [];
28290
28381
  }
28291
28382
  }, getAffectedFiles = (graph, changedFile) => {
28292
- const normalizedPath = resolve41(changedFile);
28383
+ const normalizedPath = resolve42(changedFile);
28293
28384
  const affected = new Set;
28294
28385
  const toProcess = [normalizedPath];
28295
28386
  const processNode = (current) => {
@@ -28320,7 +28411,7 @@ var emptyDependencyGraph, tsTranspiler, jsTranspiler, loaderForFile = (filePath)
28320
28411
  }, removeDependentsForFile = (graph, normalizedPath) => {
28321
28412
  graph.dependents.delete(normalizedPath);
28322
28413
  }, removeFileFromGraph = (graph, filePath) => {
28323
- const normalizedPath = resolve41(filePath);
28414
+ const normalizedPath = resolve42(filePath);
28324
28415
  removeDepsForFile(graph, normalizedPath);
28325
28416
  removeDependentsForFile(graph, normalizedPath);
28326
28417
  };
@@ -28364,12 +28455,12 @@ var globalVersionCounter = 0, createModuleVersionTracker = () => new Map, getNex
28364
28455
  };
28365
28456
 
28366
28457
  // src/dev/configResolver.ts
28367
- import { resolve as resolve42 } from "path";
28458
+ import { resolve as resolve43 } from "path";
28368
28459
  var resolveBuildPaths = (config) => {
28369
28460
  const cwd = process.cwd();
28370
28461
  const normalize = (path) => path.replace(/\\/g, "/");
28371
- const withDefault = (value, fallback) => normalize(resolve42(cwd, value ?? fallback));
28372
- const optional = (value) => value ? normalize(resolve42(cwd, value)) : undefined;
28462
+ const withDefault = (value, fallback) => normalize(resolve43(cwd, value ?? fallback));
28463
+ const optional = (value) => value ? normalize(resolve43(cwd, value)) : undefined;
28373
28464
  return {
28374
28465
  angularDir: optional(config.angularDirectory),
28375
28466
  assetsDir: optional(config.assetsDirectory),
@@ -28429,7 +28520,7 @@ var init_clientManager = __esm(() => {
28429
28520
 
28430
28521
  // src/dev/pathUtils.ts
28431
28522
  import { existsSync as existsSync45, readdirSync as readdirSync8, readFileSync as readFileSync38 } from "fs";
28432
- import { dirname as dirname34, resolve as resolve43 } from "path";
28523
+ import { dirname as dirname34, resolve as resolve44 } from "path";
28433
28524
  var STYLE_EXTENSION_PATTERN2, detectFramework = (filePath, resolved) => {
28434
28525
  if (shouldIgnorePath(filePath, resolved)) {
28435
28526
  return "ignored";
@@ -28510,7 +28601,7 @@ var STYLE_EXTENSION_PATTERN2, detectFramework = (filePath, resolved) => {
28510
28601
  return "unknown";
28511
28602
  }, collectAngularResourceDirs = (angularDir) => {
28512
28603
  const out = new Set;
28513
- const angularRoot = resolve43(angularDir);
28604
+ const angularRoot = resolve44(angularDir);
28514
28605
  const angularRootNormalized = normalizePath(angularRoot);
28515
28606
  const walk = (dir) => {
28516
28607
  let entries;
@@ -28523,7 +28614,7 @@ var STYLE_EXTENSION_PATTERN2, detectFramework = (filePath, resolved) => {
28523
28614
  if (entry.name.startsWith(".") || entry.name === "node_modules") {
28524
28615
  continue;
28525
28616
  }
28526
- const full = resolve43(dir, entry.name);
28617
+ const full = resolve44(dir, entry.name);
28527
28618
  if (entry.isDirectory()) {
28528
28619
  walk(full);
28529
28620
  continue;
@@ -28564,7 +28655,7 @@ var STYLE_EXTENSION_PATTERN2, detectFramework = (filePath, resolved) => {
28564
28655
  }
28565
28656
  const componentDir = dirname34(full);
28566
28657
  for (const ref of refs) {
28567
- const refAbs = normalizePath(resolve43(componentDir, ref));
28658
+ const refAbs = normalizePath(resolve44(componentDir, ref));
28568
28659
  const refDir = normalizePath(dirname34(refAbs));
28569
28660
  if (refDir === angularRootNormalized || refDir.startsWith(`${angularRootNormalized}/`)) {
28570
28661
  continue;
@@ -28581,7 +28672,7 @@ var STYLE_EXTENSION_PATTERN2, detectFramework = (filePath, resolved) => {
28581
28672
  const push = (path) => {
28582
28673
  if (!path)
28583
28674
  return;
28584
- const abs = normalizePath(resolve43(cwd, path));
28675
+ const abs = normalizePath(resolve44(cwd, path));
28585
28676
  if (!roots.includes(abs))
28586
28677
  roots.push(abs);
28587
28678
  };
@@ -28606,7 +28697,7 @@ var STYLE_EXTENSION_PATTERN2, detectFramework = (filePath, resolved) => {
28606
28697
  push(cfg.assetsDir);
28607
28698
  push(cfg.stylesDir);
28608
28699
  for (const candidate of ["src", "db", "assets", "styles"]) {
28609
- const abs = normalizePath(resolve43(cwd, candidate));
28700
+ const abs = normalizePath(resolve44(cwd, candidate));
28610
28701
  if (existsSync45(abs) && !roots.includes(abs))
28611
28702
  roots.push(abs);
28612
28703
  }
@@ -28618,7 +28709,7 @@ var STYLE_EXTENSION_PATTERN2, detectFramework = (filePath, resolved) => {
28618
28709
  continue;
28619
28710
  if (entry.name.startsWith("."))
28620
28711
  continue;
28621
- const abs = normalizePath(resolve43(cwd, entry.name));
28712
+ const abs = normalizePath(resolve44(cwd, entry.name));
28622
28713
  if (roots.includes(abs))
28623
28714
  continue;
28624
28715
  if (shouldIgnorePath(abs, resolved))
@@ -28629,7 +28720,7 @@ var STYLE_EXTENSION_PATTERN2, detectFramework = (filePath, resolved) => {
28629
28720
  }
28630
28721
  const registryPath = config.islands?.registry;
28631
28722
  if (registryPath) {
28632
- const registryDir = normalizePath(dirname34(resolve43(cwd, registryPath)));
28723
+ const registryDir = normalizePath(dirname34(resolve44(cwd, registryPath)));
28633
28724
  const isWatched = roots.some((root) => registryDir === root || registryDir.startsWith(`${root}/`));
28634
28725
  if (!isWatched && registryDir !== normalizePath(cwd))
28635
28726
  push(registryDir);
@@ -28813,7 +28904,7 @@ var init_editorTempFiles = __esm(() => {
28813
28904
  // src/dev/fileWatcher.ts
28814
28905
  import { watch } from "fs";
28815
28906
  import { existsSync as existsSync47, readdirSync as readdirSync10, statSync as statSync8 } from "fs";
28816
- import { dirname as dirname35, join as join60, resolve as resolve44 } from "path";
28907
+ import { dirname as dirname35, join as join60, resolve as resolve45 } from "path";
28817
28908
  var safeRemoveFromGraph = (graph, fullPath) => {
28818
28909
  try {
28819
28910
  removeFileFromGraph(graph, fullPath);
@@ -28895,7 +28986,7 @@ var safeRemoveFromGraph = (graph, fullPath) => {
28895
28986
  }, addFileWatchers = (state, paths, onFileChange) => {
28896
28987
  const stylesDir = state.resolvedPaths?.stylesDir;
28897
28988
  paths.forEach((path) => {
28898
- const absolutePath = resolve44(path).replace(/\\/g, "/");
28989
+ const absolutePath = resolve45(path).replace(/\\/g, "/");
28899
28990
  if (!existsSync47(absolutePath)) {
28900
28991
  return;
28901
28992
  }
@@ -28964,7 +29055,7 @@ var safeRemoveFromGraph = (graph, fullPath) => {
28964
29055
  const watchPaths = getWatchPaths(config, state.resolvedPaths);
28965
29056
  const stylesDir = state.resolvedPaths?.stylesDir;
28966
29057
  watchPaths.forEach((path) => {
28967
- const absolutePath = resolve44(path).replace(/\\/g, "/");
29058
+ const absolutePath = resolve45(path).replace(/\\/g, "/");
28968
29059
  if (!existsSync47(absolutePath)) {
28969
29060
  return;
28970
29061
  }
@@ -28983,7 +29074,7 @@ var init_fileWatcher = __esm(() => {
28983
29074
  // src/build/svelteDeclarations.ts
28984
29075
  import { existsSync as existsSync48, readdirSync as readdirSync11, readFileSync as readFileSync39, statSync as statSync9 } from "fs";
28985
29076
  import { mkdir as mkdir13, rename as rename4, rm as rm12, writeFile as writeFile12 } from "fs/promises";
28986
- import { dirname as dirname36, join as join61, relative as relative27, resolve as resolve45 } from "path";
29077
+ import { dirname as dirname36, join as join61, relative as relative27, resolve as resolve46 } from "path";
28987
29078
  var SVELTE_DECLARATIONS_ROOT = ".absolutejs/types/svelte", FINGERPRINT_FILE = ".fingerprint", SKIPPED_DIRECTORIES, EMIT_SCRIPT = `
28988
29079
  const { resolve, sep } = require('node:path');
28989
29080
  const { shimsPath, stagingDir, svelte2tsxPath, svelteDir, tsconfigPath, typescriptPath } =
@@ -29056,7 +29147,7 @@ emitDts({
29056
29147
  projectRoot,
29057
29148
  svelteDirectory
29058
29149
  }) => {
29059
- const svelteDir = resolve45(projectRoot, svelteDirectory);
29150
+ const svelteDir = resolve46(projectRoot, svelteDirectory);
29060
29151
  const tsconfigPath = join61(projectRoot, "tsconfig.json");
29061
29152
  if (!existsSync48(svelteDir))
29062
29153
  return {
@@ -29112,13 +29203,13 @@ var init_svelteDeclarations = __esm(() => {
29112
29203
  });
29113
29204
 
29114
29205
  // src/dev/svelteDeclarationRefresher.ts
29115
- import { resolve as resolve46, sep as sep12 } from "path";
29206
+ import { resolve as resolve47, sep as sep12 } from "path";
29116
29207
  var REFRESH_DEBOUNCE_MS = 400, createSvelteDeclarationRefresher = (config) => {
29117
29208
  const { svelteDirectory } = config;
29118
29209
  if (!svelteDirectory)
29119
29210
  return null;
29120
29211
  const projectRoot = process.cwd();
29121
- const svelteRoot = resolve46(projectRoot, svelteDirectory) + sep12;
29212
+ const svelteRoot = resolve47(projectRoot, svelteDirectory) + sep12;
29122
29213
  let timer;
29123
29214
  let running = false;
29124
29215
  let pending = false;
@@ -29149,7 +29240,7 @@ var REFRESH_DEBOUNCE_MS = 400, createSvelteDeclarationRefresher = (config) => {
29149
29240
  return {
29150
29241
  refresh: schedule,
29151
29242
  onFileChange: (filePath) => {
29152
- if (resolve46(filePath).startsWith(svelteRoot))
29243
+ if (resolve47(filePath).startsWith(svelteRoot))
29153
29244
  schedule();
29154
29245
  }
29155
29246
  };
@@ -29200,13 +29291,13 @@ var init_fileRouteRefresher = __esm(() => {
29200
29291
  });
29201
29292
 
29202
29293
  // src/dev/assetStore.ts
29203
- import { resolve as resolve47 } from "path";
29294
+ import { resolve as resolve48 } from "path";
29204
29295
  import { readdir as readdir5, unlink } from "fs/promises";
29205
29296
  var mimeTypes, getMimeType = (filePath) => {
29206
29297
  const ext = filePath.slice(filePath.lastIndexOf("."));
29207
29298
  return mimeTypes[ext] ?? "application/octet-stream";
29208
29299
  }, HASHED_FILE_RE, stripHash = (webPath) => webPath.replace(/\.[a-z0-9]{8}(\.(js|css|mjs))$/, "$1"), processWalkEntry = (entry, dir, liveByIdentity, walkAndClean) => {
29209
- const fullPath = resolve47(dir, entry.name);
29300
+ const fullPath = resolve48(dir, entry.name);
29210
29301
  if (entry.isDirectory()) {
29211
29302
  return walkAndClean(fullPath);
29212
29303
  }
@@ -29222,10 +29313,10 @@ var mimeTypes, getMimeType = (filePath) => {
29222
29313
  }, cleanStaleAssets = async (store, manifest, buildDir) => {
29223
29314
  const liveByIdentity = new Map;
29224
29315
  for (const webPath of store.keys()) {
29225
- const diskPath = resolve47(buildDir, webPath.slice(1));
29316
+ const diskPath = resolve48(buildDir, webPath.slice(1));
29226
29317
  liveByIdentity.set(stripHash(diskPath), diskPath);
29227
29318
  }
29228
- const absBuildDir = resolve47(buildDir);
29319
+ const absBuildDir = resolve48(buildDir);
29229
29320
  Object.values(manifest).forEach((val) => {
29230
29321
  if (!HASHED_FILE_RE.test(val))
29231
29322
  return;
@@ -29245,13 +29336,13 @@ var mimeTypes, getMimeType = (filePath) => {
29245
29336
  }, evictMissingChunks = async (store, buildDir) => {
29246
29337
  const chunkKeys = [...store.keys()].filter((webPath) => webPath.includes("/chunk-"));
29247
29338
  await Promise.all(chunkKeys.map(async (webPath) => {
29248
- const onDisk = await Bun.file(resolve47(buildDir, webPath.slice(1))).exists().catch(() => false);
29339
+ const onDisk = await Bun.file(resolve48(buildDir, webPath.slice(1))).exists().catch(() => false);
29249
29340
  if (!onDisk)
29250
29341
  store.delete(webPath);
29251
29342
  }));
29252
29343
  }, lookupAsset = (store, path) => store.get(path), processScanEntry = (entry, dir, prefix, store, scanDir) => {
29253
29344
  if (entry.isDirectory()) {
29254
- return scanDir(resolve47(dir, entry.name), `${prefix}${entry.name}/`);
29345
+ return scanDir(resolve48(dir, entry.name), `${prefix}${entry.name}/`);
29255
29346
  }
29256
29347
  if (!entry.name.startsWith("chunk-")) {
29257
29348
  return null;
@@ -29260,7 +29351,7 @@ var mimeTypes, getMimeType = (filePath) => {
29260
29351
  if (store.has(webPath)) {
29261
29352
  return null;
29262
29353
  }
29263
- return Bun.file(resolve47(dir, entry.name)).bytes().then((bytes) => {
29354
+ return Bun.file(resolve48(dir, entry.name)).bytes().then((bytes) => {
29264
29355
  store.set(webPath, bytes);
29265
29356
  return;
29266
29357
  }).catch(() => {});
@@ -29282,7 +29373,7 @@ var mimeTypes, getMimeType = (filePath) => {
29282
29373
  for (const webPath of newIdentities.values()) {
29283
29374
  if (store.has(webPath))
29284
29375
  continue;
29285
- loadPromises.push(Bun.file(resolve47(buildDir, webPath.slice(1))).bytes().then((bytes) => {
29376
+ loadPromises.push(Bun.file(resolve48(buildDir, webPath.slice(1))).bytes().then((bytes) => {
29286
29377
  store.set(webPath, bytes);
29287
29378
  return;
29288
29379
  }).catch(() => {}));
@@ -29328,10 +29419,10 @@ var init_assetStore = __esm(() => {
29328
29419
  });
29329
29420
 
29330
29421
  // src/dev/restartScope.ts
29331
- import { realpathSync as realpathSync7, statSync as statSync10 } from "fs";
29422
+ import { realpathSync as realpathSync8, statSync as statSync10 } from "fs";
29332
29423
  var MODULE_FILE, DOCUMENT_FILE, realPath = (path) => {
29333
29424
  try {
29334
- return realpathSync7(path);
29425
+ return realpathSync8(path);
29335
29426
  } catch {
29336
29427
  return path;
29337
29428
  }
@@ -29355,7 +29446,7 @@ var init_restartScope = __esm(() => {
29355
29446
 
29356
29447
  // src/islands/pageMetadata.ts
29357
29448
  import { readFileSync as readFileSync40 } from "fs";
29358
- import { resolve as resolve48 } from "path";
29449
+ import { resolve as resolve49 } from "path";
29359
29450
  var pagePatterns, getPageDirs = (config) => [
29360
29451
  { dir: config.angularDirectory, framework: "angular" },
29361
29452
  { dir: config.emberDirectory, framework: "ember" },
@@ -29375,7 +29466,7 @@ var pagePatterns, getPageDirs = (config) => [
29375
29466
  const source = definition.buildReference?.source;
29376
29467
  if (!source)
29377
29468
  continue;
29378
- lookup.set(`${definition.framework}:${definition.component}`, resolve48(resolveIslandSourceFile(buildInfo.resolvedRegistryPath, source)));
29469
+ lookup.set(`${definition.framework}:${definition.component}`, resolve49(resolveIslandSourceFile(buildInfo.resolvedRegistryPath, source)));
29379
29470
  }
29380
29471
  return lookup;
29381
29472
  }, getCurrentPageIslandMetadata = () => globalThis.__absolutePageIslandMetadata ?? new Map, resolveIslandUsages = (islands, islandSourceLookup) => islands.map((usage) => {
@@ -29388,13 +29479,13 @@ var pagePatterns, getPageDirs = (config) => [
29388
29479
  const pattern = pagePatterns[entry.framework];
29389
29480
  if (!pattern)
29390
29481
  return;
29391
- const files = await scanEntryPoints(resolve48(entry.dir), pattern);
29482
+ const files = await scanEntryPoints(resolve49(entry.dir), pattern);
29392
29483
  for (const filePath of files) {
29393
29484
  const source = readFileSync40(filePath, "utf-8");
29394
29485
  const islands = extractIslandUsagesFromSource(source);
29395
- pageMetadata.set(resolve48(filePath), {
29486
+ pageMetadata.set(resolve49(filePath), {
29396
29487
  islands: resolveIslandUsages(islands, islandSourceLookup),
29397
- pagePath: resolve48(filePath)
29488
+ pagePath: resolve49(filePath)
29398
29489
  });
29399
29490
  }
29400
29491
  }, loadPageIslandMetadata = async (config) => {
@@ -29512,9 +29603,9 @@ var init_transformCache = __esm(() => {
29512
29603
  });
29513
29604
 
29514
29605
  // src/dev/reactComponentClassifier.ts
29515
- import { resolve as resolve49 } from "path";
29606
+ import { resolve as resolve50 } from "path";
29516
29607
  var classifyComponent = (filePath) => {
29517
- const normalizedPath = resolve49(filePath);
29608
+ const normalizedPath = resolve50(filePath);
29518
29609
  if (normalizedPath.includes("/react/pages/")) {
29519
29610
  return "server";
29520
29611
  }
@@ -29526,7 +29617,7 @@ var classifyComponent = (filePath) => {
29526
29617
  var init_reactComponentClassifier = () => {};
29527
29618
 
29528
29619
  // src/dev/moduleMapper.ts
29529
- import { basename as basename20, resolve as resolve50 } from "path";
29620
+ import { basename as basename21, resolve as resolve51 } from "path";
29530
29621
  var buildModulePaths = (moduleKeys, manifest) => {
29531
29622
  const modulePaths = {};
29532
29623
  moduleKeys.forEach((key) => {
@@ -29536,7 +29627,7 @@ var buildModulePaths = (moduleKeys, manifest) => {
29536
29627
  });
29537
29628
  return modulePaths;
29538
29629
  }, processChangedFile = (sourceFile, framework, manifest, resolvedPaths, processedFiles) => {
29539
- const normalizedFile = resolve50(sourceFile);
29630
+ const normalizedFile = resolve51(sourceFile);
29540
29631
  const normalizedPath = normalizedFile.replace(/\\/g, "/");
29541
29632
  if (processedFiles.has(normalizedFile)) {
29542
29633
  return null;
@@ -29572,8 +29663,8 @@ var buildModulePaths = (moduleKeys, manifest) => {
29572
29663
  });
29573
29664
  return grouped;
29574
29665
  }, mapSourceFileToManifestKeys = (sourceFile, framework, resolvedPaths) => {
29575
- const normalizedFile = resolve50(sourceFile);
29576
- const fileName = basename20(normalizedFile);
29666
+ const normalizedFile = resolve51(sourceFile);
29667
+ const fileName = basename21(normalizedFile);
29577
29668
  const baseName = fileName.replace(/\.(tsx?|jsx?|vue|svelte|css|html)$/, "");
29578
29669
  const pascalName = toPascal(baseName);
29579
29670
  const keys = [];
@@ -29627,7 +29718,7 @@ var init_moduleMapper = __esm(() => {
29627
29718
  });
29628
29719
 
29629
29720
  // src/dev/reactServerComponentsRebuild.ts
29630
- import { relative as relative28, resolve as resolve51 } from "path";
29721
+ import { relative as relative28, resolve as resolve52 } from "path";
29631
29722
  var toError = (error) => error instanceof Error ? error : new Error(String(error)), runPass = async (state, directory) => {
29632
29723
  const { buildDir } = state.resolvedPaths;
29633
29724
  const result = await buildReactServerComponentsPass({
@@ -29649,8 +29740,8 @@ var toError = (error) => error instanceof Error ? error : new Error(String(error
29649
29740
  const directory = config.reactServerComponentsDirectory;
29650
29741
  if (!directory)
29651
29742
  return false;
29652
- const absolutePath = normalizePath(resolve51(filePath));
29653
- if (!absolutePath.startsWith(`${normalizePath(resolve51(directory))}/`))
29743
+ const absolutePath = normalizePath(resolve52(filePath));
29744
+ if (!absolutePath.startsWith(`${normalizePath(resolve52(directory))}/`))
29654
29745
  return false;
29655
29746
  state.fileHashes.set(absolutePath, currentHash);
29656
29747
  const startedAt = performance.now();
@@ -29670,7 +29761,7 @@ var init_reactServerComponentsRebuild = __esm(() => {
29670
29761
 
29671
29762
  // src/utils/spaRouteCss.ts
29672
29763
  import { readFile as readFile9 } from "fs/promises";
29673
- import { dirname as dirname37, isAbsolute as isAbsolute11, resolve as resolve52 } from "path";
29764
+ import { dirname as dirname37, isAbsolute as isAbsolute11, resolve as resolve53 } from "path";
29674
29765
  var sideManifestCache, readSideManifest = async (sideManifestPath) => {
29675
29766
  const cached = sideManifestCache.get(sideManifestPath);
29676
29767
  if (cached !== undefined)
@@ -29708,7 +29799,7 @@ var sideManifestCache, readSideManifest = async (sideManifestPath) => {
29708
29799
  }, readChildCss = async (cssPath, sideManifestPath) => {
29709
29800
  if (!cssPath)
29710
29801
  return "";
29711
- const resolvedCssPath = isAbsolute11(cssPath) ? cssPath : resolve52(dirname37(sideManifestPath), cssPath);
29802
+ const resolvedCssPath = isAbsolute11(cssPath) ? cssPath : resolve53(dirname37(sideManifestPath), cssPath);
29712
29803
  const cached = childCssCache.get(resolvedCssPath);
29713
29804
  if (cached !== undefined)
29714
29805
  return cached;
@@ -29793,7 +29884,7 @@ __export(exports_resolveOwningComponents, {
29793
29884
  resolveOwningComponents: () => resolveOwningComponents
29794
29885
  });
29795
29886
  import { readdirSync as readdirSync12, readFileSync as readFileSync42, statSync as statSync12 } from "fs";
29796
- import { dirname as dirname38, extname as extname19, join as join62, resolve as resolve53 } from "path";
29887
+ import { dirname as dirname38, extname as extname19, join as join62, resolve as resolve54 } from "path";
29797
29888
  var ENTITY_DECORATORS, isAngularSourceFile = (file) => file.endsWith(".ts") || file.endsWith(".tsx"), walkAngularSourceFiles = (root) => {
29798
29889
  const out = [];
29799
29890
  const visit = (dir) => {
@@ -29905,7 +29996,7 @@ var ENTITY_DECORATORS, isAngularSourceFile = (file) => file.endsWith(".ts") || f
29905
29996
  };
29906
29997
  visit(sourceFile);
29907
29998
  return out;
29908
- }, safeNormalize = (path) => resolve53(path).replace(/\\/g, "/"), resolveOwningComponents = (params) => {
29999
+ }, safeNormalize = (path) => resolve54(path).replace(/\\/g, "/"), resolveOwningComponents = (params) => {
29909
30000
  const { changedFilePath, userAngularRoot } = params;
29910
30001
  const changedAbs = safeNormalize(changedFilePath);
29911
30002
  const out = [];
@@ -29974,7 +30065,7 @@ var ENTITY_DECORATORS, isAngularSourceFile = (file) => file.endsWith(".ts") || f
29974
30065
  if (!spec.startsWith(".") && !spec.startsWith("/")) {
29975
30066
  return null;
29976
30067
  }
29977
- const base = resolve53(childDir, spec);
30068
+ const base = resolve54(childDir, spec);
29978
30069
  const candidates = [
29979
30070
  `${base}.ts`,
29980
30071
  `${base}.tsx`,
@@ -30012,7 +30103,7 @@ var ENTITY_DECORATORS, isAngularSourceFile = (file) => file.endsWith(".ts") || f
30012
30103
  };
30013
30104
  if (cls.kind === "component") {
30014
30105
  for (const url of [...cls.templateUrls, ...cls.styleUrls]) {
30015
- const abs = safeNormalize(resolve53(componentDir, url));
30106
+ const abs = safeNormalize(resolve54(componentDir, url));
30016
30107
  const existing = resource.get(abs);
30017
30108
  if (existing)
30018
30109
  existing.push(entity);
@@ -30281,7 +30372,7 @@ var init_webSocket = __esm(() => {
30281
30372
  });
30282
30373
 
30283
30374
  // src/utils/loadConfig.ts
30284
- import { resolve as resolve54 } from "path";
30375
+ import { resolve as resolve55 } from "path";
30285
30376
  var RESERVED_TOP_LEVEL_KEYS, isObject2 = (value) => typeof value === "object" && value !== null, isCommandService = (service) => service.kind === "command" || Array.isArray(service.command), isServiceCandidate = (value) => isObject2(value) && (typeof value.entry === "string" || Array.isArray(value.command)), isWorkspaceConfig = (config) => {
30286
30377
  if (!isObject2(config)) {
30287
30378
  return false;
@@ -30332,7 +30423,7 @@ var RESERVED_TOP_LEVEL_KEYS, isObject2 = (value) => typeof value === "object" &&
30332
30423
  }
30333
30424
  return config;
30334
30425
  }, loadRawConfig = async (configPath) => {
30335
- const resolved = resolve54(configPath ?? process.env.ABSOLUTE_CONFIG ?? "absolute.config.ts");
30426
+ const resolved = resolve55(configPath ?? process.env.ABSOLUTE_CONFIG ?? "absolute.config.ts");
30336
30427
  const mod = await import(resolved);
30337
30428
  const config = mod.default ?? mod.config;
30338
30429
  if (!config) {
@@ -30611,12 +30702,27 @@ var ISLAND_MARKER = 'data-island="true"', MANIFEST_MARKER = "__ABSOLUTE_MANIFEST
30611
30702
  browserManifest[key] = value;
30612
30703
  }
30613
30704
  return browserManifest;
30614
- }, buildIslandsHeadMarkup = (manifest) => {
30705
+ }, ISLAND_MARKER_TAG, ISLAND_FRAMEWORKS, readMarkerAttribute = (tag, name) => new RegExp(`\\b${name}="([^"]*)"`).exec(tag)?.[1]?.replaceAll("&quot;", '"').replaceAll("&lt;", "<").replaceAll("&gt;", ">").replaceAll("&amp;", "&"), toIslandFramework = (value) => ISLAND_FRAMEWORKS.find((framework) => framework === value), collectRenderedIslandStyleKeys = (html) => {
30706
+ const keys = new Set;
30707
+ for (const [tag] of html.matchAll(ISLAND_MARKER_TAG)) {
30708
+ const framework = toIslandFramework(readMarkerAttribute(tag, "data-framework"));
30709
+ const component = readMarkerAttribute(tag, "data-component");
30710
+ if (framework && component)
30711
+ keys.add(getIslandStyleManifestKey(framework, component));
30712
+ }
30713
+ return keys;
30714
+ }, buildIslandStyleLinks = (manifest, html) => {
30715
+ if (html === undefined)
30716
+ return "";
30717
+ const renderedKeys = collectRenderedIslandStyleKeys(html);
30718
+ return getIslandStyleManifestEntries(manifest).filter(([key]) => renderedKeys.has(key)).filter(([, href]) => !html.includes(`href="${href}"`)).map(([key, href]) => `<link rel="stylesheet" href="${href}" data-island-style="${key}"${nonceAttr()}>`).join("");
30719
+ }, buildIslandsHeadMarkup = (manifest, html) => {
30720
+ const styleLinks = buildIslandStyleLinks(manifest, html);
30615
30721
  const manifestScript = `<script${nonceAttr()}>window.__ABSOLUTE_MANIFEST__ = ${escapeScriptContent(JSON.stringify(toBrowserManifest(manifest)))}</script>`;
30616
30722
  const islandStateScript = `<script${nonceAttr()}>window.__ABS_ISLAND_STATE__ = ${escapeScriptContent(JSON.stringify(globalThis.__ABS_ISLAND_STATE__ ?? {}))}</script>`;
30617
30723
  const bootstrapPath = getIslandBootstrapPath(manifest);
30618
30724
  const bootstrapScript = bootstrapPath ? `<script${nonceAttr()} type="module" src="${bootstrapPath}"></script>` : "";
30619
- return `${manifestScript}${islandStateScript}${bootstrapScript}`;
30725
+ return `${styleLinks}${manifestScript}${islandStateScript}${bootstrapScript}`;
30620
30726
  }, injectHeadMarkup = (html, markup) => {
30621
30727
  const closingHeadIndex = html.indexOf("</head>");
30622
30728
  if (closingHeadIndex >= 0) {
@@ -30798,7 +30904,7 @@ var ISLAND_MARKER = 'data-island="true"', MANIFEST_MARKER = "__ABSOLUTE_MANIFEST
30798
30904
  return html;
30799
30905
  }
30800
30906
  warnIfBootstrapMissing(manifest);
30801
- return injectHeadMarkup(html, buildIslandsHeadMarkup(manifest));
30907
+ return injectHeadMarkup(html, buildIslandsHeadMarkup(manifest, html));
30802
30908
  }, injectIslandPageContextStream = (stream, options) => {
30803
30909
  const manifest = globalThis.__absoluteManifest;
30804
30910
  if (!manifest)
@@ -30822,6 +30928,13 @@ var init_islandPageContext = __esm(() => {
30822
30928
  init_logger();
30823
30929
  MANIFEST_BUILD_DIR_KEY = Symbol.for("absolutejs.islandManifestBuildDir");
30824
30930
  WINDOWS_ABSOLUTE_PATH = /^[A-Za-z]:[\\/]|^\\\\/;
30931
+ ISLAND_MARKER_TAG = /<[^>]*\bdata-island="true"[^>]*>/g;
30932
+ ISLAND_FRAMEWORKS = [
30933
+ "react",
30934
+ "svelte",
30935
+ "vue",
30936
+ "angular"
30937
+ ];
30825
30938
  });
30826
30939
 
30827
30940
  // src/core/requestContext.ts
@@ -31138,7 +31251,7 @@ var init_formActionFlash = __esm(() => {
31138
31251
  });
31139
31252
 
31140
31253
  // src/core/loadIslandRegistry.ts
31141
- import { resolve as resolve55 } from "path";
31254
+ import { resolve as resolve56 } from "path";
31142
31255
  var isRecord10 = (value) => typeof value === "object" && value !== null, resolveRegistryExport2 = (mod) => {
31143
31256
  if (isRecord10(mod.islandRegistry))
31144
31257
  return mod.islandRegistry;
@@ -31146,7 +31259,7 @@ var isRecord10 = (value) => typeof value === "object" && value !== null, resolve
31146
31259
  return mod.default;
31147
31260
  throw new Error("Island registry module must export `islandRegistry` or a default registry object.");
31148
31261
  }, isRegistryModuleExport = (value) => isRecord10(value), isIslandRegistryInput = (value) => isRecord10(value), loadIslandRegistry = async (registryPath) => {
31149
- const resolvedRegistryPath = resolve55(registryPath);
31262
+ const resolvedRegistryPath = resolve56(registryPath);
31150
31263
  const buildInfo = await loadIslandRegistryBuildInfo(resolvedRegistryPath);
31151
31264
  if (buildInfo.definitions.length > 0) {
31152
31265
  return buildInfo.registry;
@@ -31533,11 +31646,11 @@ __export(exports_config, {
31533
31646
  normalizeAbsoluteMobileConfig: () => normalizeAbsoluteMobileConfig
31534
31647
  });
31535
31648
  import { readFileSync as readFileSync47 } from "fs";
31536
- import { resolve as resolve56 } from "path";
31649
+ import { resolve as resolve57 } from "path";
31537
31650
  import { createHash as createHash6, createPublicKey, X509Certificate } from "crypto";
31538
31651
  var APP_ID_PATTERN, SCHEME_PATTERN, APPLE_APP_ID_PREFIX_PATTERN, CERTIFICATE_FINGERPRINT_PATTERN, UPDATE_NAME_PATTERN, RELEASE_TARGET_PATTERN, UPDATE_PUBLIC_KEY_PATTERN, ENVIRONMENT_NAME_PATTERN, COLOR_PATTERN, DEFAULT_UPDATE_BOOT_TIMEOUT_MS = 20000, DEFAULT_UPDATE_HEALTH_FAILURE_RATE = 0.2, DEFAULT_UPDATE_HEALTH_MINIMUM_REPORTS = 20, DEFAULT_UPDATE_ROLLOUT_FAILURE_RATE = 0.05, DEFAULT_UPDATE_ROLLOUT_OBSERVATION_MINUTES = 60, MINUTE_MS, DEFAULT_UPDATE_ROLLOUT_STAGES, MINIMUM_UPDATE_BOOT_TIMEOUT_MS = 5000, MAXIMUM_UPDATE_BOOT_TIMEOUT_MS = 120000, HOSTNAME_PATTERN, EXPO_RESERVED_ROUTE_PREFIXES, resolveProjectPath = (projectRoot, value, field) => {
31539
- const root = resolve56(projectRoot);
31540
- const path = resolve56(root, value);
31652
+ const root = resolve57(projectRoot);
31653
+ const path = resolve57(root, value);
31541
31654
  if (path !== root && !path.startsWith(`${root}/`)) {
31542
31655
  throw new TypeError(`${field} must remain inside the project root.`);
31543
31656
  }
@@ -32056,7 +32169,7 @@ import {
32056
32169
  rm as rm14,
32057
32170
  writeFile as writeFile13
32058
32171
  } from "fs/promises";
32059
- import { resolve as resolve57 } from "path";
32172
+ import { resolve as resolve58 } from "path";
32060
32173
  import { Elysia as Elysia6 } from "elysia";
32061
32174
  var JSON_HEADERS, OWNERSHIP_FILE = ".absolutejs-mobile-associations.json", HTTP_OK = 200, VERIFY_TIMEOUT_MS = 1e4, ANDROID_ASSOCIATION_PATH = "/.well-known/assetlinks.json", APPLE_ASSOCIATION_PATH = "/.well-known/apple-app-site-association", missingIdentity = (field, platform) => new TypeError(`${field} is required to publish ${platform} deep-link association files.`), createAppleDocument = (config, requireAll) => {
32062
32175
  if (!config.platforms.includes("ios"))
@@ -32143,7 +32256,7 @@ var JSON_HEADERS, OWNERSHIP_FILE = ".absolutejs-mobile-associations.json", HTTP_
32143
32256
  return false;
32144
32257
  }
32145
32258
  }, assertOwnedOutput = async (root) => {
32146
- const path = resolve57(root, OWNERSHIP_FILE);
32259
+ const path = resolve58(root, OWNERSHIP_FILE);
32147
32260
  let ownership;
32148
32261
  try {
32149
32262
  ownership = JSON.parse(await readFile10(path, "utf8"));
@@ -32170,10 +32283,10 @@ var JSON_HEADERS, OWNERSHIP_FILE = ".absolutejs-mobile-associations.json", HTTP_
32170
32283
  if (hasCurrent)
32171
32284
  await rm14(backup, { force: true, recursive: true });
32172
32285
  }, materializeHost = async (root, host, files) => {
32173
- const directory = resolve57(root, host, ".well-known");
32286
+ const directory = resolve58(root, host, ".well-known");
32174
32287
  await mkdir14(directory, { recursive: true });
32175
32288
  return Promise.all(files.map(async ([name, document2]) => {
32176
- const path = resolve57(directory, name);
32289
+ const path = resolve58(directory, name);
32177
32290
  await writeAtomic(path, `${JSON.stringify(document2, null, 2)}
32178
32291
  `);
32179
32292
  return path;
@@ -32196,7 +32309,7 @@ var JSON_HEADERS, OWNERSHIP_FILE = ".absolutejs-mobile-associations.json", HTTP_
32196
32309
  });
32197
32310
  return endpoints;
32198
32311
  }), materializeAbsoluteMobileAssociationFiles = async (config, outputDirectory) => {
32199
- const root = resolve57(outputDirectory);
32312
+ const root = resolve58(outputDirectory);
32200
32313
  const temporary = `${root}.${crypto.randomUUID()}.tmp`;
32201
32314
  const documents = createAbsoluteMobileAssociationDocuments(config, {
32202
32315
  requireAll: true
@@ -32210,10 +32323,10 @@ var JSON_HEADERS, OWNERSHIP_FILE = ".absolutejs-mobile-associations.json", HTTP_
32210
32323
  await mkdir14(temporary, { recursive: true });
32211
32324
  try {
32212
32325
  const temporaryPaths = (await Promise.all(config.deepLinkHosts.map((host) => materializeHost(temporary, host, files)))).flat();
32213
- await writeAtomic(resolve57(temporary, OWNERSHIP_FILE), `${JSON.stringify({ format: 1, hosts: config.deepLinkHosts }, null, 2)}
32326
+ await writeAtomic(resolve58(temporary, OWNERSHIP_FILE), `${JSON.stringify({ format: 1, hosts: config.deepLinkHosts }, null, 2)}
32214
32327
  `);
32215
32328
  await publishGeneratedDirectory(temporary, root);
32216
- const written = temporaryPaths.map((path) => resolve57(root, path.slice(temporary.length + 1)));
32329
+ const written = temporaryPaths.map((path) => resolve58(root, path.slice(temporary.length + 1)));
32217
32330
  return { root, written };
32218
32331
  } catch (error) {
32219
32332
  await rm14(temporary, { force: true, recursive: true });
@@ -33002,12 +33115,12 @@ import {
33002
33115
  X509Certificate as X509Certificate3
33003
33116
  } from "crypto";
33004
33117
  import { access as access4, mkdir as mkdir15 } from "fs/promises";
33005
- import { dirname as dirname39, isAbsolute as isAbsolute12, relative as relative29, resolve as resolve58, sep as sep13 } from "path";
33118
+ import { dirname as dirname39, isAbsolute as isAbsolute12, relative as relative29, resolve as resolve59, sep as sep13 } from "path";
33006
33119
  import { pathToFileURL as pathToFileURL3 } from "url";
33007
33120
  import { Elysia as Elysia8 } from "elysia";
33008
33121
  var ABSOLUTE_MOBILE_UPDATE_SERVER_FORMAT = 1, DEFAULT_MOBILE_UPDATE_REGISTRY_MODULE = "mobile.update.ts", object4 = (value) => typeof value === "object" && value !== null && !Array.isArray(value), projectPath = (projectRoot, requested) => {
33009
- const root = resolve58(projectRoot);
33010
- const path = resolve58(root, requested);
33122
+ const root = resolve59(projectRoot);
33123
+ const path = resolve59(root, requested);
33011
33124
  const projectRelative = relative29(root, path);
33012
33125
  if (projectRelative === ".." || projectRelative.startsWith(`..${sep13}`) || isAbsolute12(projectRelative))
33013
33126
  throw new TypeError("mobile.updates.server.registry must remain inside the project.");
@@ -33278,7 +33391,7 @@ var init_bridgeInternals = __esm(() => {
33278
33391
  });
33279
33392
 
33280
33393
  // src/dev/angular/hmrCompiler.ts
33281
- import { dirname as dirname40, relative as relative30, resolve as resolve59 } from "path";
33394
+ import { dirname as dirname40, relative as relative30, resolve as resolve60 } from "path";
33282
33395
  import { performance as performance2 } from "perf_hooks";
33283
33396
  var encodeHmrComponentId = (absoluteFilePath, className) => {
33284
33397
  const projectRel = relative30(process.cwd(), absoluteFilePath).replace(/\\/g, "/");
@@ -33290,7 +33403,7 @@ var encodeHmrComponentId = (absoluteFilePath, className) => {
33290
33403
  return null;
33291
33404
  const filePathRel = decoded.slice(0, separatorIndex);
33292
33405
  const className = decoded.slice(separatorIndex + 1);
33293
- const componentFilePath = resolve59(process.cwd(), filePathRel);
33406
+ const componentFilePath = resolve60(process.cwd(), filePathRel);
33294
33407
  const projectRelPath = relative30(process.cwd(), componentFilePath).replace(/\\/g, "/");
33295
33408
  const cacheKey = encodeURIComponent(`${projectRelPath}@${className}`);
33296
33409
  await Promise.resolve().then(() => init_fastHmrCompiler());
@@ -33496,12 +33609,12 @@ var init_hmr = __esm(() => {
33496
33609
 
33497
33610
  // src/plugins/devtoolsJson.ts
33498
33611
  import { existsSync as existsSync53, mkdirSync as mkdirSync19, readFileSync as readFileSync49, writeFileSync as writeFileSync16 } from "fs";
33499
- import { dirname as dirname41, join as join69, resolve as resolve60 } from "path";
33612
+ import { dirname as dirname41, join as join69, resolve as resolve61 } from "path";
33500
33613
  import { Elysia as Elysia10 } from "elysia";
33501
33614
  var ENDPOINT = "/.well-known/appspecific/com.chrome.devtools.json", UUID_CACHE_KEY = "__absoluteDevtoolsWorkspaceUuid", getGlobalUuid = () => Reflect.get(globalThis, UUID_CACHE_KEY), setGlobalUuid = (uuid) => {
33502
33615
  Reflect.set(globalThis, UUID_CACHE_KEY, uuid);
33503
33616
  return uuid;
33504
- }, 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) => resolve60(uuidCachePath ?? join69(buildDir, ".absolute", "chrome-devtools-workspace-uuid")), readCachedUuid = (cachePath) => {
33617
+ }, 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) => resolve61(uuidCachePath ?? join69(buildDir, ".absolute", "chrome-devtools-workspace-uuid")), readCachedUuid = (cachePath) => {
33505
33618
  if (!existsSync53(cachePath))
33506
33619
  return null;
33507
33620
  try {
@@ -33527,7 +33640,7 @@ var ENDPOINT = "/.well-known/appspecific/com.chrome.devtools.json", UUID_CACHE_K
33527
33640
  writeFileSync16(cachePath, uuid, "utf-8");
33528
33641
  return setGlobalUuid(uuid);
33529
33642
  }, devtoolsJson = (buildDir, options = {}) => {
33530
- const rootPath = resolve60(options.projectRoot ?? process.cwd());
33643
+ const rootPath = resolve61(options.projectRoot ?? process.cwd());
33531
33644
  const root = options.normalizeForWindowsContainer === false ? rootPath : normalizeDevtoolsWorkspaceRoot(rootPath);
33532
33645
  const uuid = getOrCreateUuid(buildDir, options);
33533
33646
  return new Elysia10({ name: "absolute-devtools-json" }).get(ENDPOINT, () => ({
@@ -33552,7 +33665,7 @@ var init_devtoolsJson = () => {};
33552
33665
 
33553
33666
  // src/plugins/imageOptimizer.ts
33554
33667
  import { existsSync as existsSync54 } from "fs";
33555
- import { resolve as resolve61 } from "path";
33668
+ import { resolve as resolve62 } from "path";
33556
33669
  import { Elysia as Elysia11 } from "elysia";
33557
33670
  var DEFAULT_CACHE_TTL_SECONDS = 60, MS_PER_SECOND = 1000, MAX_QUALITY = 100, avifInProgress, safeResolve = (path, baseDir) => {
33558
33671
  try {
@@ -33565,7 +33678,7 @@ var DEFAULT_CACHE_TTL_SECONDS = 60, MS_PER_SECOND = 1000, MAX_QUALITY = 100, avi
33565
33678
  }
33566
33679
  }, resolveLocalImage = (url, buildDir) => {
33567
33680
  const cleanPath = url.startsWith("/") ? url.slice(1) : url;
33568
- return safeResolve(cleanPath, buildDir) ?? safeResolve(cleanPath, resolve61(process.cwd()));
33681
+ return safeResolve(cleanPath, buildDir) ?? safeResolve(cleanPath, resolve62(process.cwd()));
33569
33682
  }, parseQueryParams = (query, allowedSizes, defaultQuality) => {
33570
33683
  const url = typeof query["url"] === "string" ? query["url"] : undefined;
33571
33684
  const wParam = typeof query["w"] === "string" ? query["w"] : undefined;
@@ -35195,7 +35308,7 @@ var init_partialPrerenderServe = __esm(() => {
35195
35308
  // src/core/prepare.ts
35196
35309
  import { createHash as createHash11 } from "crypto";
35197
35310
  import { existsSync as existsSync56, readdirSync as readdirSync13, readFileSync as readFileSync52 } from "fs";
35198
- import { basename as basename21, join as join73, relative as relative31, resolve as resolvePath3 } from "path";
35311
+ import { basename as basename22, join as join73, relative as relative31, resolve as resolvePath3 } from "path";
35199
35312
  import { Elysia as Elysia15, ElysiaError, InternalServerError, NotFound } from "elysia";
35200
35313
  var MS_PER_SECOND2 = 1000, DEFAULT_PORT2 = 3000, MAX_STATIC_ROUTE_COUNT, STATIC_PLUGIN_RETRY_DELAY_MS = 50, waitForStaticPluginRetry = () => new Promise((resolve) => {
35201
35314
  setTimeout(resolve, STATIC_PLUGIN_RETRY_DELAY_MS);
@@ -35478,7 +35591,7 @@ var MS_PER_SECOND2 = 1000, DEFAULT_PORT2 = 3000, MAX_STATIC_ROUTE_COUNT, STATIC_
35478
35591
  for (const entry of entries) {
35479
35592
  if (!entry.endsWith(".html"))
35480
35593
  continue;
35481
- const name = basename21(entry, ".html");
35594
+ const name = basename22(entry, ".html");
35482
35595
  const route = name === "index" ? "/" : `/${name}`;
35483
35596
  map.set(route, join73(prerenderDir, entry));
35484
35597
  }
@@ -35504,6 +35617,8 @@ var MS_PER_SECOND2 = 1000, DEFAULT_PORT2 = 3000, MAX_STATIC_ROUTE_COUNT, STATIC_
35504
35617
  const { endpoint } = resolveVitalsConfig(config.vitals);
35505
35618
  return endpoint.startsWith("/") ? createVitalsPlugin(endpoint) : new Elysia15({ name: "absolutejs-vitals-remote" });
35506
35619
  }, createNotFoundPlugin = () => new Elysia15({ name: "absolutejs-not-found" }).onError("global", NotFound, async ({ request }) => {
35620
+ if (!isPageRequest(request))
35621
+ return;
35507
35622
  const response = await renderFirstNotFound({
35508
35623
  preferHtmx: request.headers.get("hx-request") === "true"
35509
35624
  });
@@ -35793,8 +35908,8 @@ __export(exports_moduleServer, {
35793
35908
  warmPage: () => warmPage,
35794
35909
  warnIfReactFastRefreshUnsupported: () => warnIfReactFastRefreshUnsupported
35795
35910
  });
35796
- import { existsSync as existsSync57, readFileSync as readFileSync53, realpathSync as realpathSync8, statSync as statSync13 } from "fs";
35797
- import { basename as basename22, dirname as dirname43, extname as extname20, join as join74, resolve as resolve62, relative as relative32 } from "path";
35911
+ import { existsSync as existsSync57, readFileSync as readFileSync53, realpathSync as realpathSync9, statSync as statSync13 } from "fs";
35912
+ import { basename as basename23, dirname as dirname43, extname as extname20, join as join74, resolve as resolve63, relative as relative32 } from "path";
35798
35913
  var SRC_PREFIX = "/@src/", BROWSER_DEFINE, jsTranspiler2, legacyDecoratorTsconfig, tsTranspiler2, tsxTranspiler, TRANSPILABLE, ALL_EXPORTS_RE, STRING_CONTENTS_RE, preserveTypeExports = (originalSource, transpiled, valueExports) => {
35799
35914
  const codeOnly = originalSource.replace(STRING_CONTENTS_RE, '""');
35800
35915
  const allExports = [];
@@ -35814,10 +35929,10 @@ var SRC_PREFIX = "/@src/", BROWSER_DEFINE, jsTranspiler2, legacyDecoratorTsconfi
35814
35929
  ${stubs}
35815
35930
  `;
35816
35931
  }, resolveRelativeExtension = (srcPath, projectRoot, extensions) => {
35817
- const directHit = extensions.find((ext) => existsSync57(resolve62(projectRoot, srcPath + ext)));
35932
+ const directHit = extensions.find((ext) => existsSync57(resolve63(projectRoot, srcPath + ext)));
35818
35933
  if (directHit)
35819
35934
  return srcPath + directHit;
35820
- const indexHit = extensions.find((ext) => existsSync57(resolve62(projectRoot, srcPath, `index${ext}`)));
35935
+ const indexHit = extensions.find((ext) => existsSync57(resolve63(projectRoot, srcPath, `index${ext}`)));
35821
35936
  if (indexHit)
35822
35937
  return `${srcPath}/index${indexHit}`;
35823
35938
  return srcPath;
@@ -35846,7 +35961,7 @@ ${stubs}
35846
35961
  return invalidationVersion > 0 ? `${mtime}.${invalidationVersion}` : `${mtime}`;
35847
35962
  }, srcUrl = (relPath, projectRoot) => {
35848
35963
  const base = `${SRC_PREFIX}${encodeSrcPath(relPath)}`;
35849
- const absPath = resolve62(projectRoot, relPath);
35964
+ const absPath = resolve63(projectRoot, relPath);
35850
35965
  const cached = mtimeCache.get(absPath);
35851
35966
  if (cached !== undefined)
35852
35967
  return `${base}?v=${buildVersion(cached, absPath)}`;
@@ -35858,12 +35973,12 @@ ${stubs}
35858
35973
  return base;
35859
35974
  }
35860
35975
  }, resolveRelativeImport = (relPath, fileDir, projectRoot, extensions) => {
35861
- const absPath = resolve62(fileDir, relPath);
35976
+ const absPath = resolve63(fileDir, relPath);
35862
35977
  const rel = relative32(projectRoot, absPath);
35863
35978
  const extension = extname20(rel);
35864
35979
  let srcPath = RESOLVED_MODULE_EXTENSIONS.has(extension) ? rel : resolveRelativeExtension(rel, projectRoot, extensions);
35865
35980
  if (extname20(srcPath) === ".svelte") {
35866
- srcPath = relative32(projectRoot, resolveSvelteModulePath(resolve62(projectRoot, srcPath)));
35981
+ srcPath = relative32(projectRoot, resolveSvelteModulePath(resolve63(projectRoot, srcPath)));
35867
35982
  }
35868
35983
  return srcUrl(srcPath, projectRoot);
35869
35984
  }, NODE_BUILTIN_RE, resolveAbsoluteSpecifier = (specifier, projectRoot) => {
@@ -35882,13 +35997,13 @@ ${stubs}
35882
35997
  const packageName = isScoped ? `${parts[0]}/${parts[1]}` : parts[0];
35883
35998
  const subpath = isScoped ? parts.slice(2).join("/") : parts.slice(1).join("/");
35884
35999
  if (!subpath) {
35885
- const pkgDir = resolve62(projectRoot, "node_modules", packageName ?? "");
36000
+ const pkgDir = resolve63(projectRoot, "node_modules", packageName ?? "");
35886
36001
  const pkgJsonPath = join74(pkgDir, "package.json");
35887
36002
  if (existsSync57(pkgJsonPath)) {
35888
36003
  const pkg = JSON.parse(readFileSync53(pkgJsonPath, "utf-8"));
35889
36004
  const esmEntry = typeof pkg.module === "string" && pkg.module || typeof pkg.browser === "string" && pkg.browser;
35890
36005
  if (esmEntry) {
35891
- const resolved = resolve62(pkgDir, esmEntry);
36006
+ const resolved = resolve63(pkgDir, esmEntry);
35892
36007
  if (existsSync57(resolved))
35893
36008
  return relative32(projectRoot, resolved);
35894
36009
  }
@@ -35945,12 +36060,12 @@ ${stubs}
35945
36060
  result = result.replace(/((?:from|import)\s*["'])(\/[^"']+\.(tsx?|jsx?|ts))(["'])/g, rewriteAbsoluteToSrc);
35946
36061
  result = result.replace(/(import\s*\(\s*["'])(\/[^"']+\.(tsx?|jsx?|ts))(["']\s*\))/g, rewriteAbsoluteToSrc);
35947
36062
  result = result.replace(/new\s+URL\(\s*["'](\.\.?\/[^"']+)["']\s*,\s*import\.meta\.url\s*\)/g, (_match, relPath) => {
35948
- const absPath = resolve62(fileDir, relPath);
36063
+ const absPath = resolve63(fileDir, relPath);
35949
36064
  const rel = relative32(projectRoot, absPath);
35950
36065
  return `new URL('${srcUrl(rel, projectRoot)}', import.meta.url)`;
35951
36066
  });
35952
36067
  result = result.replace(/import\.meta\.resolve\(\s*["'](\.\.?\/[^"']+)["']\s*\)/g, (_match, relPath) => {
35953
- const absPath = resolve62(fileDir, relPath);
36068
+ const absPath = resolve63(fileDir, relPath);
35954
36069
  const rel = relative32(projectRoot, absPath);
35955
36070
  return `'${srcUrl(rel, projectRoot)}'`;
35956
36071
  });
@@ -36177,7 +36292,7 @@ ${code}`;
36177
36292
  ` + ` if (!window.__SVELTE_HMR_ACCEPT__) window.__SVELTE_HMR_ACCEPT__ = {};
36178
36293
  ` + ` var __hmr_accept = function(cb) { window.__SVELTE_HMR_ACCEPT__[${JSON.stringify(moduleUrl)}] = cb; };`);
36179
36294
  return code.replace(/import\.meta\.hot\.accept\(/g, "__hmr_accept(");
36180
- }, svelteLazyRegistrations = (raw, filePath, projectRoot) => Array.from(raw.matchAll(/\bimport\s*\(\s*['"](\.[^'"]+\.svelte)['"]\s*\)/g)).map((match) => match[1]).filter((spec) => spec !== undefined).filter((spec) => existsSync57(resolve62(dirname43(filePath), spec))).map((spec) => lazyModuleRegistration(relative32(projectRoot, resolve62(dirname43(filePath), spec)).replace(/\\/g, "/"), spec)).join(""), transformSvelteFile = async (filePath, projectRoot, rewriter, stylePreprocessors) => {
36295
+ }, svelteLazyRegistrations = (raw, filePath, projectRoot) => Array.from(raw.matchAll(/\bimport\s*\(\s*['"](\.[^'"]+\.svelte)['"]\s*\)/g)).map((match) => match[1]).filter((spec) => spec !== undefined).filter((spec) => existsSync57(resolve63(dirname43(filePath), spec))).map((spec) => lazyModuleRegistration(relative32(projectRoot, resolve63(dirname43(filePath), spec)).replace(/\\/g, "/"), spec)).join(""), transformSvelteFile = async (filePath, projectRoot, rewriter, stylePreprocessors) => {
36181
36296
  const raw = readFileSync53(filePath, "utf-8");
36182
36297
  if (!svelteCompiler) {
36183
36298
  svelteCompiler = await import("svelte/compiler");
@@ -36250,14 +36365,14 @@ ${code}`;
36250
36365
  if (!vueCompiler) {
36251
36366
  vueCompiler = await loadVueCompiler();
36252
36367
  }
36253
- const fileName = basename22(filePath, ".vue");
36368
+ const fileName = basename23(filePath, ".vue");
36254
36369
  const componentId = toKebab(fileName);
36255
36370
  const { descriptor } = vueCompiler.parse(raw, { filename: filePath });
36256
36371
  const hasScript = descriptor.script || descriptor.scriptSetup;
36257
36372
  const compiledScript = hasScript ? vueCompiler.compileScript(descriptor, {
36258
36373
  fs: {
36259
36374
  fileExists: isFile,
36260
- realpath: realpathSync8,
36375
+ realpath: realpathSync9,
36261
36376
  readFile: (file) => isFile(file) ? readFileSync53(file, "utf-8") : undefined
36262
36377
  },
36263
36378
  id: componentId,
@@ -36273,7 +36388,7 @@ ${code}`;
36273
36388
  code = injectVueHmr(code, filePath, projectRoot, vueDir);
36274
36389
  return rewriteImports(code, filePath, projectRoot, rewriter);
36275
36390
  }, injectVueHmr = (code, filePath, projectRoot, vueDir) => {
36276
- const hmrBase = vueDir ? resolve62(vueDir) : projectRoot;
36391
+ const hmrBase = vueDir ? resolve63(vueDir) : projectRoot;
36277
36392
  const hmrId = relative32(hmrBase, filePath).replace(/\\/g, "/").replace(/\.vue$/, "");
36278
36393
  let result = code.replace(/export\s+default\s+/, "var __hmr_comp__ = ");
36279
36394
  result += [
@@ -36422,7 +36537,7 @@ export default {};
36422
36537
  const escaped = virtualCss.replace(/\\/g, "\\\\").replace(/`/g, "\\`").replace(/\$/g, "\\$");
36423
36538
  return jsResponse(`var s=document.createElement('style');var __absNonce=(document.querySelector('script[nonce],style[nonce]')||{}).nonce;if(__absNonce)s.nonce=__absNonce;s.textContent=\`${escaped}\`;s.dataset.svelteHmr=${JSON.stringify(cssCheckPath)};var p=document.querySelector('style[data-svelte-hmr="${cssCheckPath}"]');if(p)p.remove();document.head.appendChild(s);`);
36424
36539
  }, resolveSourcePath2 = (relPath, projectRoot) => {
36425
- const filePath = resolve62(projectRoot, decodeSrcPath(relPath));
36540
+ const filePath = resolve63(projectRoot, decodeSrcPath(relPath));
36426
36541
  const ext = extname20(filePath);
36427
36542
  if (ext === ".svelte")
36428
36543
  return { ext, filePath: resolveSvelteModulePath(filePath) };
@@ -36459,14 +36574,14 @@ export default {};
36459
36574
  const absoluteCandidate = `/${tail.replace(/^\/+/, "")}`;
36460
36575
  const candidates = [
36461
36576
  absoluteCandidate,
36462
- resolve62(projectRoot, tail)
36577
+ resolve63(projectRoot, tail)
36463
36578
  ];
36464
36579
  try {
36465
36580
  await Promise.resolve().then(() => init_loadConfig());
36466
36581
  const cfg = await loadConfig();
36467
- const angularDir = cfg.angularDirectory && resolve62(projectRoot, cfg.angularDirectory);
36582
+ const angularDir = cfg.angularDirectory && resolve63(projectRoot, cfg.angularDirectory);
36468
36583
  if (angularDir)
36469
- candidates.push(resolve62(angularDir, tail));
36584
+ candidates.push(resolve63(angularDir, tail));
36470
36585
  } catch {}
36471
36586
  for (const candidate of candidates) {
36472
36587
  if (await fileExists(candidate)) {
@@ -36497,7 +36612,7 @@ export default {};
36497
36612
  if (!TRANSPILABLE.has(ext))
36498
36613
  return;
36499
36614
  const stat = statSync13(filePath);
36500
- const resolvedVueDir = vueDir ? resolve62(vueDir) : undefined;
36615
+ const resolvedVueDir = vueDir ? resolve63(vueDir) : undefined;
36501
36616
  let content = REACT_EXTENSIONS.has(ext) ? transformReactFile(filePath, projectRoot, rewriter) : transformPlainFile(filePath, projectRoot, rewriter, resolvedVueDir);
36502
36617
  const isAngularGeneratedJs = ext === ".js" && filePath.replace(/\\/g, "/").includes("/.absolutejs/generated/angular/");
36503
36618
  if (isAngularGeneratedJs) {
@@ -36553,7 +36668,7 @@ export default {};
36553
36668
  const ownMessage = source && typeof source === "object" ? Reflect.get(source, "message") : undefined;
36554
36669
  const message = typeof ownMessage === "string" ? ownMessage : String(source);
36555
36670
  return { message, ...readPosition(first) };
36556
- }, getTransformError = (filePath) => transformErrors.get(resolve62(filePath)), transformErrorResponse = (err) => {
36671
+ }, getTransformError = (filePath) => transformErrors.get(resolve63(filePath)), transformErrorResponse = (err) => {
36557
36672
  const errMsg = err instanceof Error ? err.message : String(err);
36558
36673
  return new Response(`console.error('[ModuleServer] Transform error:', ${JSON.stringify(errMsg)});`, {
36559
36674
  headers: { "Content-Type": "application/javascript" },
@@ -36576,16 +36691,16 @@ export default {};
36576
36691
  const relPath = pathname.slice(SRC_PREFIX.length);
36577
36692
  if (relPath === "bun:wrap" || relPath.startsWith("bun:wrap?"))
36578
36693
  return handleBunWrapRequest();
36579
- const virtualCssResponse = handleVirtualSvelteCss(resolve62(projectRoot, decodeSrcPath(relPath)));
36694
+ const virtualCssResponse = handleVirtualSvelteCss(resolve63(projectRoot, decodeSrcPath(relPath)));
36580
36695
  if (virtualCssResponse)
36581
36696
  return virtualCssResponse;
36582
36697
  const { filePath, ext } = resolveSourcePath2(relPath, projectRoot);
36583
36698
  try {
36584
36699
  const response = await transformAndCache(filePath, ext, projectRoot, rewriter, frameworkDirs?.vue, stylePreprocessors);
36585
- transformErrors.delete(resolve62(filePath));
36700
+ transformErrors.delete(resolve63(filePath));
36586
36701
  return response;
36587
36702
  } catch (err) {
36588
- transformErrors.set(resolve62(filePath), describeTransformError(err));
36703
+ transformErrors.set(resolve63(filePath), describeTransformError(err));
36589
36704
  return transformErrorResponse(err);
36590
36705
  }
36591
36706
  };
@@ -36595,11 +36710,11 @@ export default {};
36595
36710
  SRC_IMPORT_RE.lastIndex = 0;
36596
36711
  while ((match = SRC_IMPORT_RE.exec(content)) !== null) {
36597
36712
  if (match[1])
36598
- files.push(resolve62(projectRoot, decodeSrcPath(match[1])));
36713
+ files.push(resolve63(projectRoot, decodeSrcPath(match[1])));
36599
36714
  }
36600
36715
  return files;
36601
36716
  }, SRC_URL_PREFIX2, invalidateModule = (filePath) => {
36602
- const resolved = resolve62(filePath);
36717
+ const resolved = resolve63(filePath);
36603
36718
  transformErrors.delete(resolved);
36604
36719
  invalidate(filePath);
36605
36720
  if (resolved !== filePath)
@@ -36665,7 +36780,7 @@ export default {};
36665
36780
  return false;
36666
36781
  }
36667
36782
  await Promise.resolve().then(() => init_prepare());
36668
- patchManifestIndexes(cached.manifest, resolve62(state.resolvedPaths.buildDir, "_src_indexes"), SRC_PREFIX);
36783
+ patchManifestIndexes(cached.manifest, resolve63(state.resolvedPaths.buildDir, "_src_indexes"), SRC_PREFIX);
36669
36784
  logPageBuild(entry.source, entry.framework, Math.round(durationMs));
36670
36785
  logStartupTimingBlock("AbsoluteJS on-demand page build", [
36671
36786
  { durationMs, label: entry.name }
@@ -36932,11 +37047,11 @@ var exports_simpleHTMLHMR = {};
36932
37047
  __export(exports_simpleHTMLHMR, {
36933
37048
  handleHTMLUpdate: () => handleHTMLUpdate
36934
37049
  });
36935
- import { resolve as resolve63 } from "path";
37050
+ import { resolve as resolve64 } from "path";
36936
37051
  var handleHTMLUpdate = async (htmlFilePath) => {
36937
37052
  let htmlContent;
36938
37053
  try {
36939
- const resolvedPath = resolve63(htmlFilePath);
37054
+ const resolvedPath = resolve64(htmlFilePath);
36940
37055
  const file = Bun.file(resolvedPath);
36941
37056
  if (!await file.exists()) {
36942
37057
  return null;
@@ -36962,11 +37077,11 @@ var exports_simpleHTMXHMR = {};
36962
37077
  __export(exports_simpleHTMXHMR, {
36963
37078
  handleHTMXUpdate: () => handleHTMXUpdate
36964
37079
  });
36965
- import { resolve as resolve64 } from "path";
37080
+ import { resolve as resolve65 } from "path";
36966
37081
  var handleHTMXUpdate = async (htmxFilePath) => {
36967
37082
  let htmlContent;
36968
37083
  try {
36969
- const resolvedPath = resolve64(htmxFilePath);
37084
+ const resolvedPath = resolve65(htmxFilePath);
36970
37085
  const file = Bun.file(resolvedPath);
36971
37086
  if (!await file.exists()) {
36972
37087
  return null;
@@ -36988,8 +37103,8 @@ var handleHTMXUpdate = async (htmxFilePath) => {
36988
37103
  var init_simpleHTMXHMR = () => {};
36989
37104
 
36990
37105
  // src/dev/backendGraph.ts
36991
- import { readFileSync as readFileSync54, realpathSync as realpathSync9, statSync as statSync14 } from "fs";
36992
- import { dirname as dirname44, extname as extname21, resolve as resolve65 } from "path";
37106
+ import { readFileSync as readFileSync54, realpathSync as realpathSync10, statSync as statSync14 } from "fs";
37107
+ import { dirname as dirname44, extname as extname21, resolve as resolve66 } from "path";
36993
37108
  var SOURCE_FILE, VENDORED, LOADERS, fileCache, transpilers, transpilerFor = (path) => {
36994
37109
  const loader = LOADERS[extname21(path)] ?? "ts";
36995
37110
  const existing = transpilers.get(loader);
@@ -37000,11 +37115,11 @@ var SOURCE_FILE, VENDORED, LOADERS, fileCache, transpilers, transpilerFor = (pat
37000
37115
  return created;
37001
37116
  }, realPath2 = (path) => {
37002
37117
  try {
37003
- return realpathSync9(path);
37118
+ return realpathSync10(path);
37004
37119
  } catch {
37005
37120
  return path;
37006
37121
  }
37007
- }, isProjectModule = (path, root = process.cwd()) => SOURCE_FILE.test(path) && !VENDORED.test(path) && resolve65(path).startsWith(resolve65(root)), resolveImport = (specifier, fromFile) => {
37122
+ }, isProjectModule = (path, root = process.cwd()) => SOURCE_FILE.test(path) && !VENDORED.test(path) && resolve66(path).startsWith(resolve66(root)), resolveImport = (specifier, fromFile) => {
37008
37123
  try {
37009
37124
  return realPath2(Bun.resolveSync(specifier, dirname44(fromFile)));
37010
37125
  } catch {
@@ -37029,14 +37144,14 @@ var SOURCE_FILE, VENDORED, LOADERS, fileCache, transpilers, transpilerFor = (pat
37029
37144
  fileCache.set(path, { imports, mtimeMs });
37030
37145
  return imports;
37031
37146
  }, importersOf = (target, entry, loaded = loadedProjectModules(entry)) => {
37032
- const goal = realPath2(resolve65(target));
37147
+ const goal = realPath2(resolve66(target));
37033
37148
  const importers = [];
37034
37149
  for (const file of loaded)
37035
37150
  if (readImports(file).includes(goal))
37036
37151
  importers.push(file);
37037
37152
  return importers;
37038
37153
  }, loadedProjectModules = (entry, loaded = Object.keys(__require.cache), root = process.cwd()) => {
37039
- const entryPath = realPath2(resolve65(entry));
37154
+ const entryPath = realPath2(resolve66(entry));
37040
37155
  const modules = new Set([entryPath]);
37041
37156
  for (const path of loaded) {
37042
37157
  if (isAbsoluteServerEntryCopyPath(path))
@@ -37903,11 +38018,11 @@ var init_runtime = __esm(() => {
37903
38018
  });
37904
38019
 
37905
38020
  // src/dev/hot/plugin.ts
37906
- import { mkdirSync as mkdirSync21, readFileSync as readFileSync55, realpathSync as realpathSync10, writeFileSync as writeFileSync17 } from "fs";
37907
- import { extname as extname23, join as join75, relative as relative33, resolve as resolve66, sep as sep14 } from "path";
38021
+ import { mkdirSync as mkdirSync21, readFileSync as readFileSync55, realpathSync as realpathSync11, writeFileSync as writeFileSync17 } from "fs";
38022
+ import { extname as extname23, join as join75, relative as relative33, resolve as resolve67, sep as sep14 } from "path";
37908
38023
  var SOURCE, TEST_FILE, GENERATED, ABSOLUTE_ROOT, realPath3 = (path) => {
37909
38024
  try {
37910
- return realpathSync10(path);
38025
+ return realpathSync11(path);
37911
38026
  } catch {
37912
38027
  return path;
37913
38028
  }
@@ -37983,7 +38098,7 @@ var init_plugin = __esm(() => {
37983
38098
  SOURCE = /\.(?:[cm]?[jt]sx?)$/;
37984
38099
  TEST_FILE = /(?:\.(?:spec|test)\.[cm]?[jt]sx?$)|(?:[\\/]__tests__[\\/])/;
37985
38100
  GENERATED = /(?:^|[\\/])(?:build|generated|compiled|indexes|\.absolutejs|node_modules|dist)(?:[\\/]|$)/;
37986
- ABSOLUTE_ROOT = resolve66(import.meta.dir, "..", "..", "..");
38101
+ ABSOLUTE_ROOT = resolve67(import.meta.dir, "..", "..", "..");
37987
38102
  shared = globalThis.__absoluteHotPlugin ??= {
37988
38103
  analyses: new Map,
37989
38104
  installed: undefined
@@ -37992,11 +38107,11 @@ var init_plugin = __esm(() => {
37992
38107
  });
37993
38108
 
37994
38109
  // src/dev/hot/reload.ts
37995
- import { readFileSync as readFileSync56, realpathSync as realpathSync11 } from "fs";
38110
+ import { readFileSync as readFileSync56, realpathSync as realpathSync12 } from "fs";
37996
38111
  import { relative as relative34 } from "path";
37997
38112
  var MAX_PROPAGATION_STEPS = 500, realPath4 = (path) => {
37998
38113
  try {
37999
- return realpathSync11(path);
38114
+ return realpathSync12(path);
38000
38115
  } catch {
38001
38116
  return path;
38002
38117
  }
@@ -38185,7 +38300,7 @@ var init_reload = __esm(() => {
38185
38300
  // src/dev/rebuildTrigger.ts
38186
38301
  import { existsSync as existsSync58, readdirSync as readdirSync14, rmSync as rmSync4, statSync as statSync15 } from "fs";
38187
38302
  import {
38188
- basename as basename23,
38303
+ basename as basename24,
38189
38304
  dirname as dirname46,
38190
38305
  isAbsolute as isAbsolute13,
38191
38306
  join as join76,
@@ -38733,7 +38848,7 @@ var moduleServerPromise, getModuleServer = () => moduleServerPromise, clearDevSs
38733
38848
  if (serverDirs.length <= 1) {
38734
38849
  const dir = getFrameworkGeneratedDir(framework, projectRoot);
38735
38850
  return {
38736
- serverOutDir: resolvePath4(resolvedPaths.buildDir, basename23(dir)),
38851
+ serverOutDir: resolvePath4(resolvedPaths.buildDir, basename24(dir)),
38737
38852
  serverRoot: resolvePath4(dir, "server")
38738
38853
  };
38739
38854
  }
@@ -38742,7 +38857,7 @@ var moduleServerPromise, getModuleServer = () => moduleServerPromise, clearDevSs
38742
38857
  serverRoot: commonAncestor(serverDirs.map((entry) => entry.dir), projectRoot)
38743
38858
  };
38744
38859
  }, updateServerManifestEntry = (state, artifact) => {
38745
- const fileWithHash = basename23(artifact.path);
38860
+ const fileWithHash = basename24(artifact.path);
38746
38861
  const [baseName] = fileWithHash.split(`.${artifact.hash}.`);
38747
38862
  if (!baseName) {
38748
38863
  return;
@@ -38757,7 +38872,7 @@ var moduleServerPromise, getModuleServer = () => moduleServerPromise, clearDevSs
38757
38872
  const prefixByDir = new Map;
38758
38873
  for (const artifact of freshOutputs) {
38759
38874
  const dir = dirname46(artifact.path);
38760
- const name = basename23(artifact.path);
38875
+ const name = basename24(artifact.path);
38761
38876
  const [prefix] = name.split(".");
38762
38877
  if (!prefix)
38763
38878
  continue;
@@ -39275,7 +39390,7 @@ var moduleServerPromise, getModuleServer = () => moduleServerPromise, clearDevSs
39275
39390
  await rewriteImports2(ssrPaths, angServerVendorPaths);
39276
39391
  }
39277
39392
  serverPaths.forEach((serverPath, idx) => {
39278
- const fileBase = basename23(serverPath, ".js");
39393
+ const fileBase = basename24(serverPath, ".js");
39279
39394
  const ssrPath = ssrPaths[idx] ?? serverPath;
39280
39395
  state.manifest[toPascal(fileBase)] = resolvePath4(ssrPath);
39281
39396
  });
@@ -39394,7 +39509,7 @@ var moduleServerPromise, getModuleServer = () => moduleServerPromise, clearDevSs
39394
39509
  }, resolveAffectedPageModules = async (reactFiles) => {
39395
39510
  const pages = reactFiles.filter((file) => isReactPagePath(file) && isReactComponentPath(file) && isImportableModule(file));
39396
39511
  const entries = await Promise.all(pages.map(async (page) => [
39397
- `${basename23(page).replace(/\.[jt]sx$/, "")}Index`,
39512
+ `${basename24(page).replace(/\.[jt]sx$/, "")}Index`,
39398
39513
  await getReactModuleUrl(page)
39399
39514
  ]));
39400
39515
  return Object.fromEntries(entries);
@@ -39528,7 +39643,7 @@ var moduleServerPromise, getModuleServer = () => moduleServerPromise, clearDevSs
39528
39643
  for (const artifact of cssResult.outputs) {
39529
39644
  if (!artifact.path.endsWith(".css"))
39530
39645
  continue;
39531
- const cssName = stripArtifactHash(basename23(artifact.path), artifact.hash);
39646
+ const cssName = stripArtifactHash(basename24(artifact.path), artifact.hash);
39532
39647
  if (cssName)
39533
39648
  cssByName.set(cssName, artifact.path);
39534
39649
  }
@@ -39538,7 +39653,7 @@ var moduleServerPromise, getModuleServer = () => moduleServerPromise, clearDevSs
39538
39653
  await Promise.all(serverResult.outputs.map(async (artifact) => {
39539
39654
  if (!artifact.path.endsWith(".js"))
39540
39655
  return;
39541
- const pascalName = stripArtifactHash(basename23(artifact.path), artifact.hash);
39656
+ const pascalName = stripArtifactHash(basename24(artifact.path), artifact.hash);
39542
39657
  if (!pascalName)
39543
39658
  return;
39544
39659
  const cssBundlePath = cssByName.get(`${toKebab(pascalName)}-compiled`);
@@ -39811,7 +39926,7 @@ var moduleServerPromise, getModuleServer = () => moduleServerPromise, clearDevSs
39811
39926
  const duration = Date.now() - startTime;
39812
39927
  const broadcastFiles = svelteFiles.length > 0 ? svelteFiles : filesToRebuild;
39813
39928
  broadcastFiles.forEach((sveltePagePath) => {
39814
- const fileName = basename23(sveltePagePath);
39929
+ const fileName = basename24(sveltePagePath);
39815
39930
  const baseName = fileName.replace(/\.svelte$/, "");
39816
39931
  const pascalName = toPascal(baseName);
39817
39932
  const cssKey = `${pascalName}CSS`;
@@ -39894,7 +40009,7 @@ var moduleServerPromise, getModuleServer = () => moduleServerPromise, clearDevSs
39894
40009
  } = await compileVue(vueFiles, vueDir, true, getStyleTransformConfig(state.config));
39895
40010
  const serverEntries = [...vueServerPaths];
39896
40011
  const clientEntries = [...vueIndexPaths, ...vueClientPaths];
39897
- const cssOutDir = join76(buildDir, state.resolvedPaths.assetsDir ? basename23(state.resolvedPaths.assetsDir) : "assets", "css");
40012
+ const cssOutDir = join76(buildDir, state.resolvedPaths.assetsDir ? basename24(state.resolvedPaths.assetsDir) : "assets", "css");
39898
40013
  const { serverRoot, serverOutDir } = await computeServerOutPaths(state.resolvedPaths, "vue");
39899
40014
  const serverExternals = await getServerBundleExternals();
39900
40015
  const serverExternalsPlugins = await getServerBundleExternalsPlugins(state.config);
@@ -40071,7 +40186,7 @@ var moduleServerPromise, getModuleServer = () => moduleServerPromise, clearDevSs
40071
40186
  await Promise.resolve().then(() => init_compileEmber());
40072
40187
  const { serverPaths } = await compileEmber(allPageEntries, emberDir, process.cwd(), true);
40073
40188
  for (const serverPath of serverPaths) {
40074
- const fileBase = basename23(serverPath, ".js");
40189
+ const fileBase = basename24(serverPath, ".js");
40075
40190
  state.manifest[toPascal(fileBase)] = resolvePath4(serverPath);
40076
40191
  }
40077
40192
  await Promise.resolve().then(() => init_ember());
@@ -40150,7 +40265,7 @@ var moduleServerPromise, getModuleServer = () => moduleServerPromise, clearDevSs
40150
40265
  });
40151
40266
  }
40152
40267
  }, handleScriptUpdate = (state, scriptFile, manifest, framework, duration) => {
40153
- const scriptBaseName = basename23(scriptFile).replace(/\.(ts|js|tsx|jsx)$/, "");
40268
+ const scriptBaseName = basename24(scriptFile).replace(/\.(ts|js|tsx|jsx)$/, "");
40154
40269
  const pascalName = toPascal(scriptBaseName);
40155
40270
  const scriptPath = manifest[pascalName] || null;
40156
40271
  if (!scriptPath) {
@@ -40251,7 +40366,8 @@ var moduleServerPromise, getModuleServer = () => moduleServerPromise, clearDevSs
40251
40366
  const changedIslands = await collectChangedIslands(config, filesToRebuild);
40252
40367
  const islands = changedIslands.flatMap(({ component, framework }) => {
40253
40368
  const modulePath = manifest[getIslandManifestKey(framework, component)];
40254
- return modulePath ? [{ component, framework, modulePath }] : [];
40369
+ const stylePath = manifest[getIslandStyleManifestKey(framework, component)];
40370
+ return modulePath ? [{ component, framework, modulePath, stylePath }] : [];
40255
40371
  });
40256
40372
  if (islands.length === 0)
40257
40373
  return true;
@@ -40296,7 +40412,7 @@ var moduleServerPromise, getModuleServer = () => moduleServerPromise, clearDevSs
40296
40412
  if (isSingle) {
40297
40413
  return resolvePath4(state.resolvedPaths.buildDir, "pages");
40298
40414
  }
40299
- const dirName = framework === "html" ? basename23(config.htmlDirectory ?? "html") : basename23(config.htmxDirectory ?? "htmx");
40415
+ const dirName = framework === "html" ? basename24(config.htmlDirectory ?? "html") : basename24(config.htmxDirectory ?? "htmx");
40300
40416
  return resolvePath4(state.resolvedPaths.buildDir, dirName, "pages");
40301
40417
  }, processHtmlPageUpdate = async (state, pageFile, builtHtmlPagePath, manifest, duration) => {
40302
40418
  try {
@@ -40337,7 +40453,7 @@ var moduleServerPromise, getModuleServer = () => moduleServerPromise, clearDevSs
40337
40453
  const shouldRefreshAllPages = htmlPageFiles.length === 0 && shouldRefreshFromIslandChange;
40338
40454
  const pageFilesToUpdate = shouldRefreshAllPages ? await scanEntryPoints(outputHtmlPages, "*.html") : htmlPageFiles;
40339
40455
  await runSequentially(pageFilesToUpdate, async (pageFile) => {
40340
- const htmlPageName = basename23(pageFile);
40456
+ const htmlPageName = basename24(pageFile);
40341
40457
  const builtHtmlPagePath = resolvePath4(outputHtmlPages, htmlPageName);
40342
40458
  await processHtmlPageUpdate(state, pageFile, builtHtmlPagePath, manifest, duration);
40343
40459
  });
@@ -40346,7 +40462,7 @@ var moduleServerPromise, getModuleServer = () => moduleServerPromise, clearDevSs
40346
40462
  if (!cssFile) {
40347
40463
  return;
40348
40464
  }
40349
- const cssBaseName = basename23(getStyleBaseName(cssFile));
40465
+ const cssBaseName = basename24(getStyleBaseName(cssFile));
40350
40466
  const cssPascalName = toPascal(cssBaseName);
40351
40467
  const cssKey = `${cssPascalName}CSS`;
40352
40468
  const cssUrl = manifest[cssKey] || null;
@@ -40398,7 +40514,7 @@ var moduleServerPromise, getModuleServer = () => moduleServerPromise, clearDevSs
40398
40514
  type: "vue-update"
40399
40515
  });
40400
40516
  }, broadcastVuePageChange = async (state, config, vuePagePath, manifest, duration) => {
40401
- const fileName = basename23(vuePagePath);
40517
+ const fileName = basename24(vuePagePath);
40402
40518
  const baseName = fileName.replace(/\.vue$/, "");
40403
40519
  const pascalName = toPascal(baseName);
40404
40520
  const vueRoot = config.vueDirectory;
@@ -40445,7 +40561,7 @@ var moduleServerPromise, getModuleServer = () => moduleServerPromise, clearDevSs
40445
40561
  if (!cssFile) {
40446
40562
  return;
40447
40563
  }
40448
- const cssBaseName = basename23(getStyleBaseName(cssFile));
40564
+ const cssBaseName = basename24(getStyleBaseName(cssFile));
40449
40565
  const cssPascalName = toPascal(cssBaseName);
40450
40566
  const cssKey = `${cssPascalName}CSS`;
40451
40567
  const cssUrl = manifest[cssKey] || null;
@@ -40464,7 +40580,7 @@ var moduleServerPromise, getModuleServer = () => moduleServerPromise, clearDevSs
40464
40580
  });
40465
40581
  }, broadcastSveltePageUpdate = (state, sveltePagePath, manifest, duration) => {
40466
40582
  try {
40467
- const fileName = basename23(sveltePagePath);
40583
+ const fileName = basename24(sveltePagePath);
40468
40584
  const baseName = fileName.replace(/\.svelte$/, "");
40469
40585
  const pascalName = toPascal(baseName);
40470
40586
  const cssKey = `${pascalName}CSS`;
@@ -40515,7 +40631,7 @@ var moduleServerPromise, getModuleServer = () => moduleServerPromise, clearDevSs
40515
40631
  if (!cssFile) {
40516
40632
  return;
40517
40633
  }
40518
- const cssBaseName = basename23(getStyleBaseName(cssFile));
40634
+ const cssBaseName = basename24(getStyleBaseName(cssFile));
40519
40635
  const cssPascalName = toPascal(cssBaseName);
40520
40636
  const cssKey = `${cssPascalName}CSS`;
40521
40637
  const cssUrl = manifest[cssKey] || null;
@@ -40598,7 +40714,7 @@ var moduleServerPromise, getModuleServer = () => moduleServerPromise, clearDevSs
40598
40714
  const shouldRefreshAllPages = htmxPageFiles.length === 0 && shouldRefreshFromIslandChange;
40599
40715
  const pageFilesToUpdate = shouldRefreshAllPages ? await scanEntryPoints(outputHtmxPages, "*.html") : htmxPageFiles;
40600
40716
  await runSequentially(pageFilesToUpdate, async (htmxPageFile) => {
40601
- const htmxPageName = basename23(htmxPageFile);
40717
+ const htmxPageName = basename24(htmxPageFile);
40602
40718
  const builtHtmxPagePath = resolvePath4(outputHtmxPages, htmxPageName);
40603
40719
  await processHtmxPageUpdate(state, htmxPageFile, builtHtmxPagePath, manifest, duration);
40604
40720
  });
@@ -40710,7 +40826,7 @@ var moduleServerPromise, getModuleServer = () => moduleServerPromise, clearDevSs
40710
40826
  html = html.slice(0, bodyClose.index) + hmrScript + html.slice(bodyClose.index);
40711
40827
  writeFs(destPath, html);
40712
40828
  }, processMarkupFileFastPath = async (state, sourceFile, outputDir, framework, startTime, updateAssetPaths, handleUpdate, readFs, writeFs) => {
40713
- const destPath = resolvePath4(outputDir, basename23(sourceFile));
40829
+ const destPath = resolvePath4(outputDir, basename24(sourceFile));
40714
40830
  const hmrScript = extractHmrScript(destPath, readFs);
40715
40831
  const source = await Bun.file(sourceFile).text();
40716
40832
  await Bun.write(destPath, source);
@@ -40796,9 +40912,9 @@ var moduleServerPromise, getModuleServer = () => moduleServerPromise, clearDevSs
40796
40912
  await fastPath.handler(state, config, files, startTime, onRebuildComplete);
40797
40913
  markHandledFiles(files, fastPath.framework, state.resolvedPaths, handled);
40798
40914
  });
40799
- const configPath = resolvePath4(process.env.ABSOLUTE_CONFIG ?? "absolute.config.ts");
40800
- if (affectedFrameworks.includes("angular") && files.includes(configPath) && !state.lastUserEditedFiles?.has(configPath)) {
40801
- handled.add(configPath);
40915
+ for (const file of files) {
40916
+ if (!handled.has(file) && detectFramework(file, state.resolvedPaths) === "unknown" && !state.lastUserEditedFiles?.has(resolvePath4(file)))
40917
+ handled.add(file);
40802
40918
  }
40803
40919
  return files.every((f) => handled.has(f));
40804
40920
  }, keepReactIndexesOnModuleServer = async (state, manifest) => {
@@ -41425,7 +41541,7 @@ import {
41425
41541
  readFileSync as readFileSync57
41426
41542
  } from "fs";
41427
41543
  import { mkdir as mkdir18, readFile as readFile13, rename as rename8, rm as rm20, writeFile as writeFile17 } from "fs/promises";
41428
- import { basename as basename24, join as join78, resolve as resolve67 } from "path";
41544
+ import { basename as basename25, join as join78, resolve as resolve68 } from "path";
41429
41545
  var CACHE_ROOT2, CACHE_FORMAT_VERSION3 = 1, KEY_LENGTH = 32, LOCKFILES, computeVendorCacheKey = (inputs) => {
41430
41546
  const hash = createHash13("sha256");
41431
41547
  hash.update(String(CACHE_FORMAT_VERSION3));
@@ -41445,7 +41561,7 @@ var CACHE_ROOT2, CACHE_FORMAT_VERSION3 = 1, KEY_LENGTH = 32, LOCKFILES, computeV
41445
41561
  }
41446
41562
  for (const dir of inputs.vendorDirs) {
41447
41563
  hash.update("\x00v");
41448
- hash.update(basename24(resolve67(dir, "..")));
41564
+ hash.update(basename25(resolve68(dir, "..")));
41449
41565
  }
41450
41566
  return hash.digest("hex").slice(0, KEY_LENGTH);
41451
41567
  }, readLockfileHash = (projectRoot = process.cwd()) => {
@@ -41484,7 +41600,7 @@ var CACHE_ROOT2, CACHE_FORMAT_VERSION3 = 1, KEY_LENGTH = 32, LOCKFILES, computeV
41484
41600
  continue;
41485
41601
  copyTree(dir, join78(stagingDir, slotName(index, dir)));
41486
41602
  }
41487
- }, isVendorCachePayload = (value) => typeof value === "object" && value !== null && typeof Reflect.get(value, "depPaths") === "object", cacheDirFor = (key, projectRoot) => resolve67(projectRoot, CACHE_ROOT2, key), slotName = (index, dir) => `${index}-${basename24(resolve67(dir, ".."))}`, restoreVendorCache = async (key, vendorDirs, projectRoot = process.cwd()) => {
41603
+ }, isVendorCachePayload = (value) => typeof value === "object" && value !== null && typeof Reflect.get(value, "depPaths") === "object", cacheDirFor = (key, projectRoot) => resolve68(projectRoot, CACHE_ROOT2, key), slotName = (index, dir) => `${index}-${basename25(resolve68(dir, ".."))}`, restoreVendorCache = async (key, vendorDirs, projectRoot = process.cwd()) => {
41488
41604
  const cacheDir = cacheDirFor(key, projectRoot);
41489
41605
  const payloadPath = join78(cacheDir, "payload.json");
41490
41606
  if (!existsSync59(payloadPath))
@@ -41530,7 +41646,7 @@ var init_vendorCache = __esm(() => {
41530
41646
  // src/core/devBuild.ts
41531
41647
  import { readdir as readdir7 } from "fs/promises";
41532
41648
  import { existsSync as existsSync60, statSync as statSync16 } from "fs";
41533
- import { resolve as resolve68 } from "path";
41649
+ import { resolve as resolve69 } from "path";
41534
41650
  var FRAMEWORK_DIR_KEYS, devClientVendorSourceDir, collectDepVendorSourceDirs = (config) => {
41535
41651
  const configuredDirs = [
41536
41652
  ...collectConfigVendorSourceDirs(config),
@@ -41554,7 +41670,7 @@ var FRAMEWORK_DIR_KEYS, devClientVendorSourceDir, collectDepVendorSourceDirs = (
41554
41670
  return Object.keys(config).length > 0 ? config : null;
41555
41671
  }, reloadConfig = async () => {
41556
41672
  try {
41557
- const configPath = resolve68(process.env.ABSOLUTE_CONFIG ?? "absolute.config.ts");
41673
+ const configPath = resolve69(process.env.ABSOLUTE_CONFIG ?? "absolute.config.ts");
41558
41674
  const source = await Bun.file(configPath).text();
41559
41675
  return parseDirectoryConfig(source);
41560
41676
  } catch {
@@ -41669,7 +41785,7 @@ var FRAMEWORK_DIR_KEYS, devClientVendorSourceDir, collectDepVendorSourceDirs = (
41669
41785
  });
41670
41786
  }
41671
41787
  }, handleCachedReload = async () => {
41672
- const serverMtime = statSync16(resolve68(Bun.main)).mtimeMs;
41788
+ const serverMtime = statSync16(resolve69(Bun.main)).mtimeMs;
41673
41789
  const lastMtime = globalThis.__hmrServerMtime;
41674
41790
  globalThis.__hmrServerMtime = serverMtime;
41675
41791
  const cached = globalThis.__hmrDevResult;
@@ -41710,8 +41826,8 @@ var FRAMEWORK_DIR_KEYS, devClientVendorSourceDir, collectDepVendorSourceDirs = (
41710
41826
  return true;
41711
41827
  }, resolveAbsoluteVersion2 = async () => {
41712
41828
  const candidates = [
41713
- resolve68(import.meta.dir, "..", "..", "package.json"),
41714
- resolve68(import.meta.dir, "..", "package.json")
41829
+ resolve69(import.meta.dir, "..", "..", "package.json"),
41830
+ resolve69(import.meta.dir, "..", "package.json")
41715
41831
  ];
41716
41832
  const [candidate, ...remaining] = candidates;
41717
41833
  if (!candidate) {
@@ -41737,7 +41853,7 @@ var FRAMEWORK_DIR_KEYS, devClientVendorSourceDir, collectDepVendorSourceDirs = (
41737
41853
  const entries = await readdir7(vendorDir).catch(() => emptyStringArray);
41738
41854
  await Promise.all(entries.filter((entry) => entry.endsWith(".js")).map(async (entry) => {
41739
41855
  const webPath = `/${framework}/vendor/${entry}`;
41740
- const bytes = await Bun.file(resolve68(vendorDir, entry)).bytes();
41856
+ const bytes = await Bun.file(resolve69(vendorDir, entry)).bytes();
41741
41857
  assetStore.set(webPath, bytes);
41742
41858
  }));
41743
41859
  }, devBuild = async (config) => {
@@ -41929,11 +42045,11 @@ var FRAMEWORK_DIR_KEYS, devClientVendorSourceDir, collectDepVendorSourceDirs = (
41929
42045
  }
41930
42046
  stepStartedAt = performance.now();
41931
42047
  setBootPhase("build vendor bundles");
41932
- const reactVendorDir = resolve68(state.resolvedPaths.buildDir, "react", "vendor");
41933
- const angularVendorDir = resolve68(state.resolvedPaths.buildDir, "angular", "vendor");
41934
- const svelteVendorDir = resolve68(state.resolvedPaths.buildDir, "svelte", "vendor");
41935
- const vueVendorDir = resolve68(state.resolvedPaths.buildDir, "vue", "vendor");
41936
- const depVendorDir = resolve68(state.resolvedPaths.buildDir, "vendor");
42048
+ const reactVendorDir = resolve69(state.resolvedPaths.buildDir, "react", "vendor");
42049
+ const angularVendorDir = resolve69(state.resolvedPaths.buildDir, "angular", "vendor");
42050
+ const svelteVendorDir = resolve69(state.resolvedPaths.buildDir, "svelte", "vendor");
42051
+ const vueVendorDir = resolve69(state.resolvedPaths.buildDir, "vue", "vendor");
42052
+ const depVendorDir = resolve69(state.resolvedPaths.buildDir, "vendor");
41937
42053
  await Promise.resolve().then(() => init_buildDepVendor());
41938
42054
  const activeVendorDirs = [
41939
42055
  reactVendorEnabled ? reactVendorDir : null,
@@ -42050,7 +42166,7 @@ var FRAMEWORK_DIR_KEYS, devClientVendorSourceDir, collectDepVendorSourceDirs = (
42050
42166
  manifest
42051
42167
  };
42052
42168
  globalThis.__hmrDevResult = result;
42053
- globalThis.__hmrServerMtime = statSync16(resolve68(Bun.main)).mtimeMs;
42169
+ globalThis.__hmrServerMtime = statSync16(resolve69(Bun.main)).mtimeMs;
42054
42170
  return result;
42055
42171
  };
42056
42172
  var init_devBuild = __esm(() => {
@@ -42096,5 +42212,5 @@ export {
42096
42212
  devBuild
42097
42213
  };
42098
42214
 
42099
- //# debugId=2C9457EC4704C29664756E2164756E21
42215
+ //# debugId=016613A38B1FF09364756E2164756E21
42100
42216
  //# sourceMappingURL=build.js.map