@absolutejs/absolute 0.19.0-beta.976 → 0.19.0-beta.978

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -11861,17 +11861,8 @@ var init_validateSafePath = () => {};
11861
11861
 
11862
11862
  // src/build/emitAngularProvidersFiles.ts
11863
11863
  import { mkdirSync as mkdirSync8, writeFileSync as writeFileSync8 } from "fs";
11864
- import { dirname as dirname13, isAbsolute as isAbsolute3, join as join23, relative as relative9, resolve as resolve22 } from "path";
11865
- var mapToCompiledPath = (sourceAbsPath, angularDir, angularGeneratedDir) => {
11866
- const normalizedSrc = resolve22(sourceAbsPath);
11867
- const normalizedAngularDir = resolve22(angularDir);
11868
- if (!normalizedSrc.startsWith(`${normalizedAngularDir}/`) && normalizedSrc !== normalizedAngularDir) {
11869
- return normalizedSrc;
11870
- }
11871
- const relPath = normalizedSrc.slice(normalizedAngularDir.length + 1);
11872
- const compiledRelPath = relPath.replace(/\.[cm]?[tj]sx?$/, ".js");
11873
- return join23(angularGeneratedDir, compiledRelPath);
11874
- }, relativeImportSpecifier = (fromDir, targetAbsPath) => {
11864
+ import { dirname as dirname13, join as join23, relative as relative9 } from "path";
11865
+ var relativeImportSpecifier = (fromDir, targetAbsPath) => {
11875
11866
  const targetWithoutExt = targetAbsPath.replace(/\.[cm]?[tj]sx?$/, "");
11876
11867
  const rel = relative9(fromDir, targetWithoutExt).replace(/\\/g, "/");
11877
11868
  return rel.startsWith(".") ? rel : `./${rel}`;
@@ -11925,7 +11916,7 @@ var mapToCompiledPath = (sourceAbsPath, angularDir, angularGeneratedDir) => {
11925
11916
  }
11926
11917
  return lines.join(`
11927
11918
  `);
11928
- }, ROUTER_FEATURES_DEFAULT, renderFile = (call, outputPath, basePath, pageRoutes, providersImport, context) => {
11919
+ }, ROUTER_FEATURES_DEFAULT, renderFile = (call, outputPath, basePath, pageRoutes, providersImport) => {
11929
11920
  const sections = [];
11930
11921
  sections.push("/* AUTOGENERATED by AbsoluteJS \u2014 see `scanAngularHandlerCalls`. */", "/* eslint-disable */");
11931
11922
  const groups = groupImports(call.providerImports);
@@ -11936,8 +11927,7 @@ var mapToCompiledPath = (sourceAbsPath, angularDir, angularGeneratedDir) => {
11936
11927
  }
11937
11928
  if (providersImport) {
11938
11929
  const outputDir = dirname13(outputPath);
11939
- const compiledTarget = mapToCompiledPath(providersImport.absolutePath, context.angularDir, context.angularGeneratedDir);
11940
- const specifier = relativeImportSpecifier(outputDir, compiledTarget);
11930
+ const specifier = relativeImportSpecifier(outputDir, providersImport.absolutePath);
11941
11931
  const importClause = providersImport.importedName === providersImport.bindingName ? `{ ${providersImport.bindingName} as __globalProviders }` : `{ ${providersImport.importedName} as __globalProviders }`;
11942
11932
  sections.push(`import ${importClause} from "${specifier}";`);
11943
11933
  }
@@ -11945,8 +11935,7 @@ var mapToCompiledPath = (sourceAbsPath, angularDir, angularGeneratedDir) => {
11945
11935
  sections.push(`import { APP_BASE_HREF } from "@angular/common";`, `const __basePathProvider = { provide: APP_BASE_HREF, useValue: ${JSON.stringify(basePath)} };`);
11946
11936
  }
11947
11937
  if (pageRoutes?.hasRoutes) {
11948
- const compiledPageTarget = mapToCompiledPath(pageRoutes.pageFile, context.angularDir, context.angularGeneratedDir);
11949
- const routesImport = relativeImportSpecifier(dirname13(outputPath), compiledPageTarget);
11938
+ const routesImport = relativeImportSpecifier(dirname13(outputPath), pageRoutes.pageFile);
11950
11939
  sections.push(`import { ${["provideRouter", ...ROUTER_FEATURES_DEFAULT].join(", ")} } from "@angular/router";`, `import { routes as __pageRoutes } from "${routesImport}";`, `const __routerProvider = provideRouter(__pageRoutes, ${ROUTER_FEATURES_DEFAULT.map((name) => `${name}()`).join(", ")});`);
11951
11940
  }
11952
11941
  const userProvidersExpr = call.providersExpr ?? "[]";
@@ -11972,15 +11961,9 @@ var mapToCompiledPath = (sourceAbsPath, angularDir, angularGeneratedDir) => {
11972
11961
  return null;
11973
11962
  const trimmed = mountPath.slice(0, -1);
11974
11963
  return trimmed === "/" ? null : trimmed;
11975
- }, emitAngularProvidersFiles = (projectRoot, angularDir, calls, pageRoutes, options = {}) => {
11964
+ }, emitAngularProvidersFiles = (projectRoot, calls, pageRoutes, options = {}) => {
11976
11965
  const outputDir = getProvidersOutputDir(projectRoot);
11977
11966
  mkdirSync8(outputDir, { recursive: true });
11978
- const angularGeneratedDir = getFrameworkGeneratedDir("angular", projectRoot);
11979
- const resolvedAngularDir = isAbsolute3(angularDir) ? resolve22(angularDir) : resolve22(projectRoot, angularDir);
11980
- const context = {
11981
- angularDir: resolvedAngularDir,
11982
- angularGeneratedDir
11983
- };
11984
11967
  const pageRoutesByKey = new Map;
11985
11968
  for (const entry of pageRoutes) {
11986
11969
  pageRoutesByKey.set(entry.manifestKey, entry);
@@ -11990,7 +11973,7 @@ var mapToCompiledPath = (sourceAbsPath, angularDir, angularGeneratedDir) => {
11990
11973
  const outputPath = join23(outputDir, `${call.manifestKey}.providers.ts`);
11991
11974
  const basePath = deriveBasePath(call.mountPath);
11992
11975
  const pageRoute = pageRoutesByKey.get(call.manifestKey);
11993
- const content = renderFile(call, outputPath, basePath, pageRoute, options.providersImport ?? null, context);
11976
+ const content = renderFile(call, outputPath, basePath, pageRoute, options.providersImport ?? null);
11994
11977
  writeFileSync8(outputPath, content, "utf-8");
11995
11978
  emitted.push({
11996
11979
  basePath,
@@ -12059,7 +12042,7 @@ var init_emitAngularRouteMounts = __esm(() => {
12059
12042
 
12060
12043
  // src/build/parseAngularConfigImports.ts
12061
12044
  import { existsSync as existsSync20, readFileSync as readFileSync14 } from "fs";
12062
- import { dirname as dirname14, isAbsolute as isAbsolute4, join as join25 } from "path";
12045
+ import { dirname as dirname14, isAbsolute as isAbsolute3, join as join25 } from "path";
12063
12046
  import ts6 from "typescript";
12064
12047
  var findDefineConfigCall = (sf) => {
12065
12048
  let result = null;
@@ -12149,7 +12132,7 @@ var findDefineConfigCall = (sf) => {
12149
12132
  if (!importInfo)
12150
12133
  return null;
12151
12134
  const configDir2 = dirname14(configPath2);
12152
- const absolutePath = importInfo.source.startsWith(".") ? join25(configDir2, importInfo.source).replace(/\.[cm]?[tj]sx?$/, "") : isAbsolute4(importInfo.source) ? importInfo.source.replace(/\.[cm]?[tj]sx?$/, "") : importInfo.source;
12135
+ const absolutePath = importInfo.source.startsWith(".") ? join25(configDir2, importInfo.source).replace(/\.[cm]?[tj]sx?$/, "") : isAbsolute3(importInfo.source) ? importInfo.source.replace(/\.[cm]?[tj]sx?$/, "") : importInfo.source;
12153
12136
  return {
12154
12137
  absolutePath,
12155
12138
  bindingName: binding,
@@ -12160,7 +12143,7 @@ var init_parseAngularConfigImports = () => {};
12160
12143
 
12161
12144
  // src/build/scanAngularHandlerCalls.ts
12162
12145
  import { readdirSync as readdirSync2, readFileSync as readFileSync15 } from "fs";
12163
- import { dirname as dirname15, isAbsolute as isAbsolute5, join as join26, resolve as resolve23 } from "path";
12146
+ import { dirname as dirname15, isAbsolute as isAbsolute4, join as join26, resolve as resolve22 } from "path";
12164
12147
  import ts7 from "typescript";
12165
12148
  var ELYSIA_ROUTE_METHODS2, SKIP_DIRS2, SOURCE_EXTENSIONS2, getScriptKind2 = (filePath) => {
12166
12149
  if (filePath.endsWith(".tsx"))
@@ -12208,9 +12191,9 @@ var ELYSIA_ROUTE_METHODS2, SKIP_DIRS2, SOURCE_EXTENSIONS2, getScriptKind2 = (fil
12208
12191
  };
12209
12192
  const resolveSource = (specifier) => {
12210
12193
  if (specifier.startsWith(".")) {
12211
- return resolve23(fileDir, specifier);
12194
+ return resolve22(fileDir, specifier);
12212
12195
  }
12213
- if (isAbsolute5(specifier)) {
12196
+ if (isAbsolute4(specifier)) {
12214
12197
  return specifier;
12215
12198
  }
12216
12199
  return null;
@@ -12514,11 +12497,9 @@ var runAngularHandlerScan = (projectRoot, angularDirectory) => {
12514
12497
  const calls = scanAngularHandlerCalls(projectRoot);
12515
12498
  const pageRoutes = scanAngularPageRoutes(angularDirectory);
12516
12499
  const providersImport = parseAngularProvidersImport(projectRoot);
12517
- const providersFiles = emitAngularProvidersFiles(projectRoot, angularDirectory, calls, pageRoutes, { providersImport });
12500
+ const providersFiles = emitAngularProvidersFiles(projectRoot, calls, pageRoutes, { providersImport });
12518
12501
  emitAngularRouteMounts(projectRoot, calls);
12519
- const angularEntryAddons = providersImport ? [providersImport.absolutePath] : [];
12520
12502
  return {
12521
- angularEntryAddons,
12522
12503
  calls,
12523
12504
  manifestKeysWithProviders: new Set(providersFiles.map((file2) => file2.manifestKey)),
12524
12505
  pageRoutes,
@@ -12602,7 +12583,7 @@ import {
12602
12583
  join as join28,
12603
12584
  basename as basename7,
12604
12585
  extname as extname5,
12605
- resolve as resolve24,
12586
+ resolve as resolve23,
12606
12587
  relative as relative10,
12607
12588
  sep as sep2
12608
12589
  } from "path";
@@ -12610,14 +12591,14 @@ import { env as env2 } from "process";
12610
12591
  var {write: write2, file: file2, Transpiler: Transpiler2 } = globalThis.Bun;
12611
12592
  var resolveDevClientDir2 = () => {
12612
12593
  const projectRoot = process.cwd();
12613
- const fromSource = resolve24(import.meta.dir, "../dev/client");
12594
+ const fromSource = resolve23(import.meta.dir, "../dev/client");
12614
12595
  if (existsSync21(fromSource) && fromSource.startsWith(projectRoot)) {
12615
12596
  return fromSource;
12616
12597
  }
12617
- const fromNodeModules = resolve24(projectRoot, "node_modules/@absolutejs/absolute/dist/dev/client");
12598
+ const fromNodeModules = resolve23(projectRoot, "node_modules/@absolutejs/absolute/dist/dev/client");
12618
12599
  if (existsSync21(fromNodeModules))
12619
12600
  return fromNodeModules;
12620
- return resolve24(import.meta.dir, "./dev/client");
12601
+ return resolve23(import.meta.dir, "./dev/client");
12621
12602
  }, devClientDir2, hmrClientPath3, persistentCache, sourceHashCache, clearSvelteCompilerCache = () => {
12622
12603
  persistentCache.clear();
12623
12604
  sourceHashCache.clear();
@@ -12647,7 +12628,7 @@ var resolveDevClientDir2 = () => {
12647
12628
  }, resolveRelativeModule2 = async (spec, from) => {
12648
12629
  if (!spec.startsWith("."))
12649
12630
  return null;
12650
- const basePath = resolve24(dirname16(from), spec);
12631
+ const basePath = resolve23(dirname16(from), spec);
12651
12632
  const candidates = [
12652
12633
  basePath,
12653
12634
  `${basePath}.ts`,
@@ -12674,7 +12655,7 @@ var resolveDevClientDir2 = () => {
12674
12655
  const resolved = resolvePackageImport(spec);
12675
12656
  return resolved && /\.svelte(\.(?:ts|js))?$/.test(resolved) ? resolved : null;
12676
12657
  }
12677
- const basePath = resolve24(dirname16(from), spec);
12658
+ const basePath = resolve23(dirname16(from), spec);
12678
12659
  const explicit = /\.(svelte|svelte\.(?:ts|js))$/.test(basePath);
12679
12660
  if (!explicit) {
12680
12661
  const extensions = [".svelte", ".svelte.ts", ".svelte.js"];
@@ -13340,22 +13321,22 @@ import { mkdir as mkdir5 } from "fs/promises";
13340
13321
  import {
13341
13322
  basename as basename8,
13342
13323
  dirname as dirname17,
13343
- isAbsolute as isAbsolute6,
13324
+ isAbsolute as isAbsolute5,
13344
13325
  join as join29,
13345
13326
  relative as relative11,
13346
- resolve as resolve25
13327
+ resolve as resolve24
13347
13328
  } from "path";
13348
13329
  var {file: file3, write: write3, Transpiler: Transpiler3 } = globalThis.Bun;
13349
13330
  var resolveDevClientDir3 = () => {
13350
13331
  const projectRoot = process.cwd();
13351
- const fromSource = resolve25(import.meta.dir, "../dev/client");
13332
+ const fromSource = resolve24(import.meta.dir, "../dev/client");
13352
13333
  if (existsSync22(fromSource) && fromSource.startsWith(projectRoot)) {
13353
13334
  return fromSource;
13354
13335
  }
13355
- const fromNodeModules = resolve25(projectRoot, "node_modules/@absolutejs/absolute/dist/dev/client");
13336
+ const fromNodeModules = resolve24(projectRoot, "node_modules/@absolutejs/absolute/dist/dev/client");
13356
13337
  if (existsSync22(fromNodeModules))
13357
13338
  return fromNodeModules;
13358
- return resolve25(import.meta.dir, "./dev/client");
13339
+ return resolve24(import.meta.dir, "./dev/client");
13359
13340
  }, devClientDir3, hmrClientPath4, transpiler4, scriptCache, scriptSetupCache, templateCache, styleCache, persistentBuildCache, vueSourceHashCache, vueHmrMetadata, clearVueHmrCaches = () => {
13360
13341
  scriptCache.clear();
13361
13342
  scriptSetupCache.clear();
@@ -13401,7 +13382,7 @@ var resolveDevClientDir3 = () => {
13401
13382
  return filePath.replace(/\.ts$/, ".js");
13402
13383
  if (isStylePath(filePath)) {
13403
13384
  if (sourceDir && (filePath.startsWith("./") || filePath.startsWith("../"))) {
13404
- return resolve25(sourceDir, filePath);
13385
+ return resolve24(sourceDir, filePath);
13405
13386
  }
13406
13387
  return filePath;
13407
13388
  }
@@ -13465,12 +13446,12 @@ var resolveDevClientDir3 = () => {
13465
13446
  const childComponentPaths = importPaths.filter((path) => path.startsWith(".") && path.endsWith(".vue"));
13466
13447
  const packageComponentPaths = Array.from(resolvedPackageVueImports.entries());
13467
13448
  const helperModulePaths = importPaths.filter((path) => path.startsWith(".") && !path.endsWith(".vue") && !isStylePath(path));
13468
- const stylePathsImported = importPaths.filter((path) => (path.startsWith(".") || isAbsolute6(path)) && isStylePath(path)).map((path) => isAbsolute6(path) ? path : resolve25(dirname17(sourceFilePath), path));
13449
+ const stylePathsImported = importPaths.filter((path) => (path.startsWith(".") || isAbsolute5(path)) && isStylePath(path)).map((path) => isAbsolute5(path) ? path : resolve24(dirname17(sourceFilePath), path));
13469
13450
  for (const stylePath of stylePathsImported) {
13470
13451
  addStyleImporter(sourceFilePath, stylePath);
13471
13452
  }
13472
13453
  const childBuildResults = await Promise.all([
13473
- ...childComponentPaths.map((relativeChildPath) => compileVueFile(resolve25(dirname17(sourceFilePath), relativeChildPath), outputDirs, cacheMap, false, vueRootDir, compiler, stylePreprocessors)),
13454
+ ...childComponentPaths.map((relativeChildPath) => compileVueFile(resolve24(dirname17(sourceFilePath), relativeChildPath), outputDirs, cacheMap, false, vueRootDir, compiler, stylePreprocessors)),
13474
13455
  ...packageComponentPaths.map(([, absolutePath]) => compileVueFile(absolutePath, outputDirs, cacheMap, false, vueRootDir, compiler, stylePreprocessors))
13475
13456
  ]);
13476
13457
  const hasScript = descriptor.script || descriptor.scriptSetup;
@@ -13594,7 +13575,7 @@ if (typeof __VUE_HMR_RUNTIME__ !== 'undefined') {
13594
13575
  hmrId,
13595
13576
  serverPath: serverOutputPath,
13596
13577
  tsHelperPaths: [
13597
- ...helperModulePaths.map((helper) => resolve25(dirname17(sourceFilePath), helper.endsWith(".ts") ? helper : `${helper}.ts`)),
13578
+ ...helperModulePaths.map((helper) => resolve24(dirname17(sourceFilePath), helper.endsWith(".ts") ? helper : `${helper}.ts`)),
13598
13579
  ...childBuildResults.flatMap((child) => child.tsHelperPaths)
13599
13580
  ]
13600
13581
  };
@@ -13617,7 +13598,7 @@ if (typeof __VUE_HMR_RUNTIME__ !== 'undefined') {
13617
13598
  const buildCache = new Map;
13618
13599
  const allTsHelperPaths = new Set;
13619
13600
  const compiledPages = await Promise.all(entryPoints.map(async (entryPath) => {
13620
- const result = await compileVueFile(resolve25(entryPath), {
13601
+ const result = await compileVueFile(resolve24(entryPath), {
13621
13602
  client: clientOutputDir,
13622
13603
  css: cssOutputDir,
13623
13604
  server: serverOutputDir
@@ -14284,7 +14265,7 @@ __export(exports_compileAngular, {
14284
14265
  compileAngular: () => compileAngular
14285
14266
  });
14286
14267
  import { existsSync as existsSync23, readFileSync as readFileSync18, promises as fs5 } from "fs";
14287
- import { join as join30, basename as basename9, sep as sep3, dirname as dirname18, resolve as resolve26, relative as relative12 } from "path";
14268
+ import { join as join30, basename as basename9, sep as sep3, dirname as dirname18, resolve as resolve25, relative as relative12 } from "path";
14288
14269
  var {Glob: Glob6 } = globalThis.Bun;
14289
14270
  import ts9 from "typescript";
14290
14271
  var traceAngularPhase = async (name, fn2, metadata2) => {
@@ -14292,10 +14273,10 @@ var traceAngularPhase = async (name, fn2, metadata2) => {
14292
14273
  return tracePhase ? tracePhase(`compile/angular/${name}`, fn2, metadata2) : await fn2();
14293
14274
  }, readTsconfigPathAliases = () => {
14294
14275
  try {
14295
- const configPath2 = resolve26(process.cwd(), "tsconfig.json");
14276
+ const configPath2 = resolve25(process.cwd(), "tsconfig.json");
14296
14277
  const config = ts9.readConfigFile(configPath2, ts9.sys.readFile).config;
14297
14278
  const compilerOptions = config?.compilerOptions ?? {};
14298
- const baseUrl = resolve26(process.cwd(), compilerOptions.baseUrl ?? ".");
14279
+ const baseUrl = resolve25(process.cwd(), compilerOptions.baseUrl ?? ".");
14299
14280
  const aliases = Object.entries(compilerOptions.paths ?? {}).map(([pattern, replacements]) => ({ pattern, replacements }));
14300
14281
  return { aliases, baseUrl };
14301
14282
  } catch {
@@ -14315,7 +14296,7 @@ var traceAngularPhase = async (name, fn2, metadata2) => {
14315
14296
  const wildcardValue = exactMatch ? "" : specifier.slice(prefix.length, specifier.length - suffix.length);
14316
14297
  for (const replacement of alias.replacements) {
14317
14298
  const candidate = replacement.replace("*", wildcardValue);
14318
- const resolved = resolveSourceFile(resolve26(baseUrl, candidate));
14299
+ const resolved = resolveSourceFile(resolve25(baseUrl, candidate));
14319
14300
  if (resolved)
14320
14301
  return resolved;
14321
14302
  }
@@ -14334,13 +14315,13 @@ var traceAngularPhase = async (name, fn2, metadata2) => {
14334
14315
  ];
14335
14316
  return candidates.find((file4) => existsSync23(file4));
14336
14317
  }, createLegacyAngularAnimationUsageResolver = (rootDir) => {
14337
- const baseDir = resolve26(rootDir);
14318
+ const baseDir = resolve25(rootDir);
14338
14319
  const tsconfigAliases = readTsconfigPathAliases();
14339
14320
  const transpiler5 = new Bun.Transpiler({ loader: "tsx" });
14340
14321
  const scanCache = new Map;
14341
14322
  const resolveLocalImport = (specifier, fromDir) => {
14342
14323
  if (specifier.startsWith(".") || specifier.startsWith("/")) {
14343
- return resolveSourceFile(resolve26(fromDir, specifier));
14324
+ return resolveSourceFile(resolve25(fromDir, specifier));
14344
14325
  }
14345
14326
  const aliased = matchTsconfigAlias(specifier, tsconfigAliases.aliases, tsconfigAliases.baseUrl, resolveSourceFile);
14346
14327
  if (aliased)
@@ -14349,7 +14330,7 @@ var traceAngularPhase = async (name, fn2, metadata2) => {
14349
14330
  const resolved = Bun.resolveSync(specifier, fromDir);
14350
14331
  if (resolved.includes("/node_modules/"))
14351
14332
  return;
14352
- const absolute = resolve26(resolved);
14333
+ const absolute = resolve25(resolved);
14353
14334
  if (!absolute.startsWith(baseDir))
14354
14335
  return;
14355
14336
  return resolveSourceFile(absolute);
@@ -14365,7 +14346,7 @@ var traceAngularPhase = async (name, fn2, metadata2) => {
14365
14346
  usesLegacyAnimations: false
14366
14347
  });
14367
14348
  }
14368
- const resolved = resolve26(actualPath);
14349
+ const resolved = resolve25(actualPath);
14369
14350
  const cached = scanCache.get(resolved);
14370
14351
  if (cached)
14371
14352
  return cached;
@@ -14394,7 +14375,7 @@ var traceAngularPhase = async (name, fn2, metadata2) => {
14394
14375
  const actualPath = resolveSourceFile(filePath);
14395
14376
  if (!actualPath)
14396
14377
  return false;
14397
- const resolved = resolve26(actualPath);
14378
+ const resolved = resolve25(actualPath);
14398
14379
  if (visited.has(resolved))
14399
14380
  return false;
14400
14381
  visited.add(resolved);
@@ -14412,14 +14393,14 @@ var traceAngularPhase = async (name, fn2, metadata2) => {
14412
14393
  return (entryPath) => visit(entryPath);
14413
14394
  }, resolveDevClientDir4 = () => {
14414
14395
  const projectRoot = process.cwd();
14415
- const fromSource = resolve26(import.meta.dir, "../dev/client");
14396
+ const fromSource = resolve25(import.meta.dir, "../dev/client");
14416
14397
  if (existsSync23(fromSource) && fromSource.startsWith(projectRoot)) {
14417
14398
  return fromSource;
14418
14399
  }
14419
- const fromNodeModules = resolve26(projectRoot, "node_modules/@absolutejs/absolute/dist/dev/client");
14400
+ const fromNodeModules = resolve25(projectRoot, "node_modules/@absolutejs/absolute/dist/dev/client");
14420
14401
  if (existsSync23(fromNodeModules))
14421
14402
  return fromNodeModules;
14422
- return resolve26(import.meta.dir, "./dev/client");
14403
+ return resolve25(import.meta.dir, "./dev/client");
14423
14404
  }, devClientDir4, hmrClientPath5, formatDiagnosticMessage = (diagnostic) => {
14424
14405
  try {
14425
14406
  return ts9.flattenDiagnosticMessageText(diagnostic.messageText, `
@@ -14462,11 +14443,11 @@ var traceAngularPhase = async (name, fn2, metadata2) => {
14462
14443
  if (hasJsLikeExtension(path))
14463
14444
  return `${path}${query}`;
14464
14445
  const importerDir = dirname18(importerOutputPath);
14465
- const fileCandidate = resolve26(importerDir, `${path}.js`);
14446
+ const fileCandidate = resolve25(importerDir, `${path}.js`);
14466
14447
  if (outputFiles?.has(fileCandidate) || existsSync23(fileCandidate)) {
14467
14448
  return `${path}.js${query}`;
14468
14449
  }
14469
- const indexCandidate = resolve26(importerDir, path, "index.js");
14450
+ const indexCandidate = resolve25(importerDir, path, "index.js");
14470
14451
  if (outputFiles?.has(indexCandidate) || existsSync23(indexCandidate)) {
14471
14452
  return `${path}/index.js${query}`;
14472
14453
  }
@@ -14494,7 +14475,7 @@ var traceAngularPhase = async (name, fn2, metadata2) => {
14494
14475
  }, resolveLocalTsImport = (fromFile, specifier) => {
14495
14476
  if (!isRelativeModuleSpecifier(specifier))
14496
14477
  return null;
14497
- const basePath = resolve26(dirname18(fromFile), specifier);
14478
+ const basePath = resolve25(dirname18(fromFile), specifier);
14498
14479
  const candidates = /\.[cm]?[tj]sx?$/.test(basePath) ? [basePath] : [
14499
14480
  `${basePath}.ts`,
14500
14481
  `${basePath}.tsx`,
@@ -14505,7 +14486,7 @@ var traceAngularPhase = async (name, fn2, metadata2) => {
14505
14486
  join30(basePath, "index.mts"),
14506
14487
  join30(basePath, "index.cts")
14507
14488
  ];
14508
- return candidates.map((candidate) => resolve26(candidate)).find((candidate) => existsSync23(candidate) && !candidate.endsWith(".d.ts")) ?? null;
14489
+ return candidates.map((candidate) => resolve25(candidate)).find((candidate) => existsSync23(candidate) && !candidate.endsWith(".d.ts")) ?? null;
14509
14490
  }, readFileForAotTransform = async (fileName, readFile6) => {
14510
14491
  const hostSource = readFile6?.(fileName);
14511
14492
  if (typeof hostSource === "string")
@@ -14540,7 +14521,7 @@ var traceAngularPhase = async (name, fn2, metadata2) => {
14540
14521
  paths.push(join30(fileDir, urlMatch.replace(/['"]/g, "")));
14541
14522
  }
14542
14523
  }
14543
- return paths.map((path) => resolve26(path));
14524
+ return paths.map((path) => resolve25(path));
14544
14525
  }, readResourceCacheFile = async (cachePath) => {
14545
14526
  try {
14546
14527
  const entry = JSON.parse(await fs5.readFile(cachePath, "utf-8"));
@@ -14582,7 +14563,7 @@ var traceAngularPhase = async (name, fn2, metadata2) => {
14582
14563
  transformedFiles: 0
14583
14564
  };
14584
14565
  const transformFile = async (filePath) => {
14585
- const resolvedPath = resolve26(filePath);
14566
+ const resolvedPath = resolve25(filePath);
14586
14567
  if (visited.has(resolvedPath))
14587
14568
  return;
14588
14569
  visited.add(resolvedPath);
@@ -14617,7 +14598,7 @@ var traceAngularPhase = async (name, fn2, metadata2) => {
14617
14598
  return { stats, transformedSources };
14618
14599
  }, compileAngularFiles = async (inputPaths, outDir, stylePreprocessors) => {
14619
14600
  const islandMetadataByOutputPath = await traceAngularPhase("aot/island-metadata", () => new Map(inputPaths.map((inputPath) => {
14620
- const outputPath = resolve26(join30(outDir, relative12(process.cwd(), resolve26(inputPath)).replace(/\.[cm]?[tj]sx?$/, ".js")));
14601
+ const outputPath = resolve25(join30(outDir, relative12(process.cwd(), resolve25(inputPath)).replace(/\.[cm]?[tj]sx?$/, ".js")));
14621
14602
  return [
14622
14603
  outputPath,
14623
14604
  buildIslandMetadataExports(readFileSync18(inputPath, "utf-8"))
@@ -14628,7 +14609,7 @@ var traceAngularPhase = async (name, fn2, metadata2) => {
14628
14609
  const tsLibDir = await traceAngularPhase("aot/resolve-typescript-lib", () => {
14629
14610
  const tsPath = __require.resolve("typescript");
14630
14611
  const tsRootDir = dirname18(tsPath);
14631
- return tsRootDir.endsWith("lib") ? tsRootDir : resolve26(tsRootDir, "lib");
14612
+ return tsRootDir.endsWith("lib") ? tsRootDir : resolve25(tsRootDir, "lib");
14632
14613
  });
14633
14614
  const config = await traceAngularPhase("aot/read-configuration", () => readConfiguration("./tsconfig.json"));
14634
14615
  const options = {
@@ -14670,7 +14651,7 @@ var traceAngularPhase = async (name, fn2, metadata2) => {
14670
14651
  return originalGetSourceFile?.call(host, fileName, languageVersion, onError);
14671
14652
  };
14672
14653
  const emitted = {};
14673
- const resolvedOutDir = resolve26(outDir);
14654
+ const resolvedOutDir = resolve25(outDir);
14674
14655
  host.writeFile = (fileName, text) => {
14675
14656
  const relativePath = resolveRelativePath(fileName, resolvedOutDir, outDir);
14676
14657
  emitted[relativePath] = text;
@@ -14692,12 +14673,12 @@ var traceAngularPhase = async (name, fn2, metadata2) => {
14692
14673
  if (!fileName.endsWith(".ts") || fileName.endsWith(".d.ts")) {
14693
14674
  return source;
14694
14675
  }
14695
- const resolvedPath = resolve26(fileName);
14676
+ const resolvedPath = resolve25(fileName);
14696
14677
  return transformedSources.get(resolvedPath) ?? source;
14697
14678
  };
14698
14679
  const originalGetSourceFileForCompile = host.getSourceFile;
14699
14680
  host.getSourceFile = (fileName, languageVersion, onError) => {
14700
- const source = transformedSources.get(resolve26(fileName));
14681
+ const source = transformedSources.get(resolve25(fileName));
14701
14682
  if (source) {
14702
14683
  return ts9.createSourceFile(fileName, source, languageVersion, true);
14703
14684
  }
@@ -14721,7 +14702,7 @@ var traceAngularPhase = async (name, fn2, metadata2) => {
14721
14702
  content,
14722
14703
  target: join30(outDir, fileName)
14723
14704
  }));
14724
- const outputFiles = new Set(rawEntries.map(({ target }) => resolve26(target)));
14705
+ const outputFiles = new Set(rawEntries.map(({ target }) => resolve25(target)));
14725
14706
  return rawEntries.map(({ content, target }) => {
14726
14707
  let processedContent = content.replace(/from\s+(['"])(\.\.?\/[^'"]+)(\1)/g, (match, quote, path) => {
14727
14708
  const rewritten = rewriteRelativeJsSpecifier(target, path, outputFiles);
@@ -14736,7 +14717,7 @@ var traceAngularPhase = async (name, fn2, metadata2) => {
14736
14717
  return cleaned ? `import { ${cleaned}, InternalInjectFlags } from '@angular/core'` : `import { InternalInjectFlags } from '@angular/core'`;
14737
14718
  });
14738
14719
  processedContent = processedContent.replace(/\b(?<!Internal)InjectFlags\b/g, "InternalInjectFlags");
14739
- processedContent += islandMetadataByOutputPath.get(resolve26(target)) ?? "";
14720
+ processedContent += islandMetadataByOutputPath.get(resolve25(target)) ?? "";
14740
14721
  return { content: processedContent, target };
14741
14722
  });
14742
14723
  });
@@ -14746,7 +14727,7 @@ var traceAngularPhase = async (name, fn2, metadata2) => {
14746
14727
  })), { outputs: entries.length });
14747
14728
  return await traceAngularPhase("aot/collect-output-paths", () => entries.map(({ target }) => target), { outputs: entries.length });
14748
14729
  }, compileAngularFile = async (inputPath, outDir, stylePreprocessors) => compileAngularFiles([inputPath], outDir, stylePreprocessors), jitContentCache, invalidateAngularJitCache = (filePath) => {
14749
- jitContentCache.delete(resolve26(filePath));
14730
+ jitContentCache.delete(resolve25(filePath));
14750
14731
  }, wrapperOutputCache, escapeTemplateContent = (content) => content.replace(/\\/g, "\\\\").replace(/`/g, "\\`").replace(/\$\{/g, "\\${"), findUncommentedMatch = (source, pattern) => {
14751
14732
  const re2 = new RegExp(pattern.source, pattern.flags.includes("g") ? pattern.flags : pattern.flags + "g");
14752
14733
  let match;
@@ -14759,7 +14740,7 @@ var traceAngularPhase = async (name, fn2, metadata2) => {
14759
14740
  }
14760
14741
  return null;
14761
14742
  }, resolveAngularDeferImportSpecifier = () => {
14762
- const sourceEntry = resolve26(import.meta.dir, "../angular/components/index.ts");
14743
+ const sourceEntry = resolve25(import.meta.dir, "../angular/components/index.ts");
14763
14744
  if (existsSync23(sourceEntry)) {
14764
14745
  return sourceEntry.replace(/\\/g, "/");
14765
14746
  }
@@ -14989,10 +14970,10 @@ ${fields}
14989
14970
  source: result
14990
14971
  };
14991
14972
  }, compileAngularFileJIT = async (inputPath, outDir, rootDir, stylePreprocessors, cacheBuster) => {
14992
- const entryPath = resolve26(inputPath);
14973
+ const entryPath = resolve25(inputPath);
14993
14974
  const allOutputs = [];
14994
14975
  const visited = new Set;
14995
- const baseDir = resolve26(rootDir ?? process.cwd());
14976
+ const baseDir = resolve25(rootDir ?? process.cwd());
14996
14977
  let usesLegacyAnimations = false;
14997
14978
  const angularTranspiler = new Bun.Transpiler({
14998
14979
  loader: "ts",
@@ -15020,7 +15001,7 @@ ${fields}
15020
15001
  };
15021
15002
  const resolveLocalImport = (specifier, fromDir) => {
15022
15003
  if (specifier.startsWith(".") || specifier.startsWith("/")) {
15023
- return resolveSourceFile2(resolve26(fromDir, specifier));
15004
+ return resolveSourceFile2(resolve25(fromDir, specifier));
15024
15005
  }
15025
15006
  const aliased = matchTsconfigAlias(specifier, tsconfigAliases.aliases, tsconfigAliases.baseUrl, resolveSourceFile2);
15026
15007
  if (aliased)
@@ -15029,7 +15010,7 @@ ${fields}
15029
15010
  const resolved = Bun.resolveSync(specifier, fromDir);
15030
15011
  if (resolved.includes("/node_modules/"))
15031
15012
  return;
15032
- const absolute = resolve26(resolved);
15013
+ const absolute = resolve25(resolved);
15033
15014
  if (!absolute.startsWith(baseDir))
15034
15015
  return;
15035
15016
  return resolveSourceFile2(absolute);
@@ -15039,8 +15020,11 @@ ${fields}
15039
15020
  };
15040
15021
  const toOutputPath = (sourcePath) => {
15041
15022
  const inputDir = dirname18(sourcePath);
15042
- const relativeDir = inputDir.startsWith(baseDir) ? inputDir.substring(baseDir.length + 1) : inputDir;
15043
15023
  const fileBase = basename9(sourcePath).replace(/\.[cm]?[tj]sx?$/, ".js");
15024
+ if (inputDir === outDir || inputDir.startsWith(`${outDir}${sep3}`)) {
15025
+ return join30(inputDir, fileBase);
15026
+ }
15027
+ const relativeDir = inputDir.startsWith(baseDir) ? inputDir.substring(baseDir.length + 1) : inputDir;
15044
15028
  return join30(outDir, relativeDir, fileBase);
15045
15029
  };
15046
15030
  const withCacheBuster = (specifier) => {
@@ -15078,13 +15062,13 @@ ${fields}
15078
15062
  return `${prefix}${dots}`;
15079
15063
  return `${prefix}../${dots}`;
15080
15064
  });
15081
- if (resolve26(actualPath) === entryPath) {
15065
+ if (resolve25(actualPath) === entryPath) {
15082
15066
  processedContent += buildIslandMetadataExports(sourceCode);
15083
15067
  }
15084
15068
  return processedContent;
15085
15069
  };
15086
15070
  const transpileFile = async (filePath) => {
15087
- const resolved = resolve26(filePath);
15071
+ const resolved = resolve25(filePath);
15088
15072
  if (visited.has(resolved))
15089
15073
  return;
15090
15074
  visited.add(resolved);
@@ -15136,7 +15120,7 @@ ${fields}
15136
15120
  importRewrites.set(specifier, relativeRewrite);
15137
15121
  return resolved2;
15138
15122
  }).filter((path) => Boolean(path));
15139
- const isEntry = resolve26(actualPath) === resolve26(entryPath);
15123
+ const isEntry = resolve25(actualPath) === resolve25(entryPath);
15140
15124
  const contentHash = Bun.hash(sourceCode).toString(BASE_36_RADIX);
15141
15125
  const cacheKey2 = actualPath;
15142
15126
  const shouldWriteFile = cacheBuster && isEntry ? true : jitContentCache.get(cacheKey2) !== contentHash || !existsSync23(targetPath);
@@ -15172,11 +15156,11 @@ export const __ABSOLUTE_PAGE_USES_LEGACY_ANIMATIONS__ = true;
15172
15156
  const compiledRoot = compiledParent;
15173
15157
  const indexesDir = join30(compiledParent, "indexes");
15174
15158
  await traceAngularPhase("setup/create-indexes-dir", () => fs5.mkdir(indexesDir, { recursive: true }));
15175
- const aotOutputs = hmr ? [] : await traceAngularPhase("aot/compile-files", () => compileAngularFiles(entryPoints.map((entry) => resolve26(entry)), compiledRoot, stylePreprocessors), { entries: entryPoints.length });
15159
+ const aotOutputs = hmr ? [] : await traceAngularPhase("aot/compile-files", () => compileAngularFiles(entryPoints.map((entry) => resolve25(entry)), compiledRoot, stylePreprocessors), { entries: entryPoints.length });
15176
15160
  if (!hmr) {
15177
15161
  await traceAngularPhase("aot/copy-json-resources", async () => {
15178
15162
  const cwd = process.cwd();
15179
- const angularSrcDir = resolve26(outRoot);
15163
+ const angularSrcDir = resolve25(outRoot);
15180
15164
  if (!existsSync23(angularSrcDir))
15181
15165
  return;
15182
15166
  const jsonGlob = new Glob6("**/*.json");
@@ -15194,7 +15178,7 @@ export const __ABSOLUTE_PAGE_USES_LEGACY_ANIMATIONS__ = true;
15194
15178
  }
15195
15179
  const usesLegacyAngularAnimations = await traceAngularPhase("setup/legacy-animation-resolver", () => createLegacyAngularAnimationUsageResolver(outRoot));
15196
15180
  const compileTasks = entryPoints.map(async (entry) => {
15197
- const resolvedEntry = resolve26(entry);
15181
+ const resolvedEntry = resolve25(entry);
15198
15182
  const relativeEntry = relative12(outRoot, resolvedEntry).replace(/\.[tj]s$/, ".js");
15199
15183
  const compileEntry = () => compileAngularFileJIT(resolvedEntry, compiledRoot, outRoot, stylePreprocessors);
15200
15184
  let outputs = hmr ? await traceAngularPhase("jit/compile-entry", compileEntry, {
@@ -15206,10 +15190,10 @@ export const __ABSOLUTE_PAGE_USES_LEGACY_ANIMATIONS__ = true;
15206
15190
  join30(compiledRoot, relativeEntry),
15207
15191
  join30(compiledRoot, "pages", jsName),
15208
15192
  join30(compiledRoot, jsName)
15209
- ].map((file4) => resolve26(file4));
15193
+ ].map((file4) => resolve25(file4));
15210
15194
  const resolveRawServerFile = (candidatePaths) => {
15211
15195
  const normalizedCandidates = [
15212
- ...candidatePaths.map((file4) => resolve26(file4)),
15196
+ ...candidatePaths.map((file4) => resolve25(file4)),
15213
15197
  ...compiledFallbackPaths
15214
15198
  ];
15215
15199
  let candidate = normalizedCandidates.find((file4) => existsSync23(file4) && file4.endsWith(`${sep3}${relativeEntry}`));
@@ -15276,16 +15260,24 @@ export default ${componentClassName};
15276
15260
  if (usesLegacyAnimations) {
15277
15261
  rewritten += `
15278
15262
  export const __ABSOLUTE_PAGE_USES_LEGACY_ANIMATIONS__ = true;
15263
+ `;
15264
+ }
15265
+ const providersServerPath = join30(compiledParent, "providers", `${toPascal(fileBase)}.providers.js`);
15266
+ if (existsSync23(providersServerPath)) {
15267
+ const rel = relative12(dirname18(rawServerFile), providersServerPath).replace(/\\/g, "/");
15268
+ const specifier = rel.startsWith(".") ? rel : `./${rel}`;
15269
+ rewritten += `
15270
+ export { providers } from "${specifier}";
15279
15271
  `;
15280
15272
  }
15281
15273
  await traceAngularPhase("wrapper/write-server-output", () => fs5.writeFile(rawServerFile, rewritten, "utf-8"), { entry: resolvedEntry });
15282
15274
  const relativePath = relative12(indexesDir, rawServerFile).replace(/\\/g, "/");
15283
15275
  const normalizedImportPath = relativePath.startsWith(".") ? relativePath : `./${relativePath}`;
15284
15276
  const manifestKeyForProviders = toPascal(fileBase);
15285
- const providersFilePath = join30(compiledParent, "providers", `${manifestKeyForProviders}.providers.ts`);
15286
- const hasGeneratedProviders = existsSync23(providersFilePath);
15277
+ const providersServerFilePath = join30(compiledParent, "providers", `${manifestKeyForProviders}.providers.js`);
15278
+ const hasGeneratedProviders = existsSync23(providersServerFilePath);
15287
15279
  const providersImportPath = hasGeneratedProviders ? (() => {
15288
- const rel = relative12(indexesDir, providersFilePath.replace(/\.ts$/, "")).replace(/\\/g, "/");
15280
+ const rel = relative12(indexesDir, providersServerFilePath.replace(/\.js$/, "")).replace(/\\/g, "/");
15289
15281
  return rel.startsWith(".") ? rel : `./${rel}`;
15290
15282
  })() : null;
15291
15283
  const generatedProvidersImport = providersImportPath ? `import { providers as generatedProviders } from '${providersImportPath}';` : "var generatedProviders = null;";
@@ -16213,7 +16205,7 @@ __export(exports_fastHmrCompiler, {
16213
16205
  invalidateFingerprintCache: () => invalidateFingerprintCache
16214
16206
  });
16215
16207
  import { existsSync as existsSync24, readFileSync as readFileSync19, statSync as statSync2 } from "fs";
16216
- import { dirname as dirname19, extname as extname6, relative as relative13, resolve as resolve27 } from "path";
16208
+ import { dirname as dirname19, extname as extname6, relative as relative13, resolve as resolve26 } from "path";
16217
16209
  import ts13 from "typescript";
16218
16210
  var fail = (reason, detail, location) => ({
16219
16211
  ok: false,
@@ -16517,7 +16509,7 @@ var fail = (reason, detail, location) => ({
16517
16509
  if (!spec.startsWith(".") && !spec.startsWith("/")) {
16518
16510
  return true;
16519
16511
  }
16520
- const base = resolve27(componentDir, spec);
16512
+ const base = resolve26(componentDir, spec);
16521
16513
  const candidates = [
16522
16514
  `${base}.ts`,
16523
16515
  `${base}.tsx`,
@@ -17321,7 +17313,7 @@ var fail = (reason, detail, location) => ({
17321
17313
  return null;
17322
17314
  }, resolveDtsFromSpec = (spec, fromDir) => {
17323
17315
  const stripped = spec.replace(/\.[mc]?js$/, "");
17324
- const base = resolve27(fromDir, stripped);
17316
+ const base = resolve26(fromDir, stripped);
17325
17317
  const candidates = [
17326
17318
  `${base}.d.ts`,
17327
17319
  `${base}.d.mts`,
@@ -17345,7 +17337,7 @@ var fail = (reason, detail, location) => ({
17345
17337
  return null;
17346
17338
  }, resolveChildComponentInfo = (className, spec, componentDir, projectRoot) => {
17347
17339
  if (spec.startsWith(".") || spec.startsWith("/")) {
17348
- const base = resolve27(componentDir, spec);
17340
+ const base = resolve26(componentDir, spec);
17349
17341
  const candidates = [
17350
17342
  `${base}.ts`,
17351
17343
  `${base}.tsx`,
@@ -17564,13 +17556,13 @@ var fail = (reason, detail, location) => ({
17564
17556
  }
17565
17557
  if (!matches)
17566
17558
  continue;
17567
- const resolved = resolve27(componentDir, spec);
17559
+ const resolved = resolve26(componentDir, spec);
17568
17560
  for (const ext of TS_EXTENSIONS) {
17569
17561
  const candidate = resolved + ext;
17570
17562
  if (existsSync24(candidate))
17571
17563
  return candidate;
17572
17564
  }
17573
- const indexCandidate = resolve27(resolved, "index.ts");
17565
+ const indexCandidate = resolve26(resolved, "index.ts");
17574
17566
  if (existsSync24(indexCandidate))
17575
17567
  return indexCandidate;
17576
17568
  }
@@ -17803,7 +17795,7 @@ ${transpiled}
17803
17795
  }
17804
17796
  }${staticPatch}`;
17805
17797
  }, STYLE_PREPROCESSED_EXT, resolveAndReadStyleResource = (componentDir, url) => {
17806
- const abs = resolve27(componentDir, url);
17798
+ const abs = resolve26(componentDir, url);
17807
17799
  if (!existsSync24(abs))
17808
17800
  return null;
17809
17801
  const ext = extname6(abs).toLowerCase();
@@ -17843,7 +17835,7 @@ ${block}
17843
17835
  const cached = projectOptionsCache.get(projectRoot);
17844
17836
  if (cached !== undefined)
17845
17837
  return cached;
17846
- const tsconfigPath = resolve27(projectRoot, "tsconfig.json");
17838
+ const tsconfigPath = resolve26(projectRoot, "tsconfig.json");
17847
17839
  const opts = {};
17848
17840
  if (existsSync24(tsconfigPath)) {
17849
17841
  try {
@@ -17927,7 +17919,7 @@ ${block}
17927
17919
  templateText = decoratorMeta.template;
17928
17920
  templatePath = componentFilePath;
17929
17921
  } else if (decoratorMeta.templateUrl) {
17930
- const tplAbs = resolve27(componentDir, decoratorMeta.templateUrl);
17922
+ const tplAbs = resolve26(componentDir, decoratorMeta.templateUrl);
17931
17923
  if (!existsSync24(tplAbs)) {
17932
17924
  return fail("template-resource-not-found", `Template file not found: ${tplAbs}`, { file: componentFilePath });
17933
17925
  }
@@ -18690,7 +18682,7 @@ __export(exports_compileEmber, {
18690
18682
  });
18691
18683
  import { existsSync as existsSync25 } from "fs";
18692
18684
  import { mkdir as mkdir6, rm as rm4 } from "fs/promises";
18693
- import { basename as basename10, dirname as dirname20, extname as extname7, join as join31, resolve as resolve28 } from "path";
18685
+ import { basename as basename10, dirname as dirname20, extname as extname7, join as join31, resolve as resolve27 } from "path";
18694
18686
  var {build: bunBuild2, Transpiler: Transpiler4, write: write4, file: file4 } = globalThis.Bun;
18695
18687
  var cachedPreprocessor = null, getPreprocessor = async () => {
18696
18688
  if (cachedPreprocessor)
@@ -18786,7 +18778,7 @@ export const importSync = (specifier) => {
18786
18778
  const originalImporter = stagedSourceMap.get(args.importer);
18787
18779
  if (!originalImporter)
18788
18780
  return;
18789
- const candidateBase = resolve28(dirname20(originalImporter), args.path);
18781
+ const candidateBase = resolve27(dirname20(originalImporter), args.path);
18790
18782
  const extensionsToTry = ["", ".gts", ".gjs", ".ts", ".js"];
18791
18783
  for (const ext of extensionsToTry) {
18792
18784
  const candidate = candidateBase + ext;
@@ -18845,7 +18837,7 @@ export const renderToHTML = (props = {}) => {
18845
18837
  export { PageComponent };
18846
18838
  export default PageComponent;
18847
18839
  `, compileEmberFile = async (entry, compiledRoot, cwd = process.cwd()) => {
18848
- const resolvedEntry = resolve28(entry);
18840
+ const resolvedEntry = resolve27(entry);
18849
18841
  const source = await file4(resolvedEntry).text();
18850
18842
  let preprocessed = source;
18851
18843
  if (isTemplateTagFile(resolvedEntry)) {
@@ -18865,8 +18857,8 @@ export default PageComponent;
18865
18857
  mkdir6(serverDir, { recursive: true }),
18866
18858
  mkdir6(clientDir, { recursive: true })
18867
18859
  ]);
18868
- const tmpPagePath = resolve28(join31(tmpDir, `${baseName}.module.js`));
18869
- const tmpHarnessPath = resolve28(join31(tmpDir, `${baseName}.harness.js`));
18860
+ const tmpPagePath = resolve27(join31(tmpDir, `${baseName}.module.js`));
18861
+ const tmpHarnessPath = resolve27(join31(tmpDir, `${baseName}.harness.js`));
18870
18862
  await Promise.all([
18871
18863
  write4(tmpPagePath, transpiled),
18872
18864
  write4(tmpHarnessPath, generateServerHarness(tmpPagePath))
@@ -18908,7 +18900,7 @@ export default PageComponent;
18908
18900
  serverPaths: outputs.map((o3) => o3.serverPath)
18909
18901
  };
18910
18902
  }, compileEmberFileSource = async (entry) => {
18911
- const resolvedEntry = resolve28(entry);
18903
+ const resolvedEntry = resolve27(entry);
18912
18904
  const source = await file4(resolvedEntry).text();
18913
18905
  let preprocessed = source;
18914
18906
  if (isTemplateTagFile(resolvedEntry)) {
@@ -18941,24 +18933,24 @@ __export(exports_buildReactVendor, {
18941
18933
  buildReactVendor: () => buildReactVendor
18942
18934
  });
18943
18935
  import { existsSync as existsSync26, mkdirSync as mkdirSync10 } from "fs";
18944
- import { join as join32, resolve as resolve29 } from "path";
18936
+ import { join as join32, resolve as resolve28 } from "path";
18945
18937
  import { rm as rm5 } from "fs/promises";
18946
18938
  var {build: bunBuild3 } = globalThis.Bun;
18947
18939
  var resolveJsxDevRuntimeCompatPath = () => {
18948
18940
  const candidates = [
18949
- resolve29(import.meta.dir, "react", "jsxDevRuntimeCompat.js"),
18950
- resolve29(import.meta.dir, "src", "react", "jsxDevRuntimeCompat.ts"),
18951
- resolve29(import.meta.dir, "..", "react", "jsxDevRuntimeCompat.js"),
18952
- resolve29(import.meta.dir, "..", "src", "react", "jsxDevRuntimeCompat.ts"),
18953
- resolve29(import.meta.dir, "..", "..", "dist", "react", "jsxDevRuntimeCompat.js"),
18954
- resolve29(import.meta.dir, "..", "..", "src", "react", "jsxDevRuntimeCompat.ts")
18941
+ resolve28(import.meta.dir, "react", "jsxDevRuntimeCompat.js"),
18942
+ resolve28(import.meta.dir, "src", "react", "jsxDevRuntimeCompat.ts"),
18943
+ resolve28(import.meta.dir, "..", "react", "jsxDevRuntimeCompat.js"),
18944
+ resolve28(import.meta.dir, "..", "src", "react", "jsxDevRuntimeCompat.ts"),
18945
+ resolve28(import.meta.dir, "..", "..", "dist", "react", "jsxDevRuntimeCompat.js"),
18946
+ resolve28(import.meta.dir, "..", "..", "src", "react", "jsxDevRuntimeCompat.ts")
18955
18947
  ];
18956
18948
  for (const candidate of candidates) {
18957
18949
  if (existsSync26(candidate)) {
18958
18950
  return candidate.replace(/\\/g, "/");
18959
18951
  }
18960
18952
  }
18961
- return (candidates[0] ?? resolve29(import.meta.dir, "react", "jsxDevRuntimeCompat.js")).replace(/\\/g, "/");
18953
+ return (candidates[0] ?? resolve28(import.meta.dir, "react", "jsxDevRuntimeCompat.js")).replace(/\\/g, "/");
18962
18954
  }, jsxDevRuntimeCompatPath, reactSpecifiers, isResolvable = (specifier) => {
18963
18955
  try {
18964
18956
  Bun.resolveSync(specifier, process.cwd());
@@ -19608,7 +19600,7 @@ import {
19608
19600
  statSync as statSync3,
19609
19601
  writeFileSync as writeFileSync11
19610
19602
  } from "fs";
19611
- import { basename as basename11, dirname as dirname21, extname as extname8, join as join37, relative as relative14, resolve as resolve30 } from "path";
19603
+ import { basename as basename11, dirname as dirname21, extname as extname8, join as join37, relative as relative14, resolve as resolve29 } from "path";
19612
19604
  import { cwd, env as env3, exit } from "process";
19613
19605
  var {build: bunBuild7, Glob: Glob8 } = globalThis.Bun;
19614
19606
  var isDev2, isBuildTraceEnabled = () => {
@@ -19699,8 +19691,8 @@ var isDev2, isBuildTraceEnabled = () => {
19699
19691
  }
19700
19692
  }, resolveAbsoluteVersion = async () => {
19701
19693
  const candidates = [
19702
- resolve30(import.meta.dir, "..", "..", "package.json"),
19703
- resolve30(import.meta.dir, "..", "package.json")
19694
+ resolve29(import.meta.dir, "..", "..", "package.json"),
19695
+ resolve29(import.meta.dir, "..", "package.json")
19704
19696
  ];
19705
19697
  const resolveCandidate = async (remaining) => {
19706
19698
  const [candidate, ...rest] = remaining;
@@ -19716,7 +19708,7 @@ var isDev2, isBuildTraceEnabled = () => {
19716
19708
  };
19717
19709
  await resolveCandidate(candidates);
19718
19710
  }, SKIP_DIRS4, addWorkerPathIfExists = (file5, relPath, workerPaths) => {
19719
- const absPath = resolve30(file5, "..", relPath);
19711
+ const absPath = resolve29(file5, "..", relPath);
19720
19712
  try {
19721
19713
  statSync3(absPath);
19722
19714
  workerPaths.add(absPath);
@@ -19778,7 +19770,7 @@ var isDev2, isBuildTraceEnabled = () => {
19778
19770
  return;
19779
19771
  }
19780
19772
  const indexFiles = readDir(reactIndexesPath).filter((file5) => file5.endsWith(".tsx"));
19781
- const pagesRel = relative14(process.cwd(), resolve30(reactPagesPath)).replace(/\\/g, "/");
19773
+ const pagesRel = relative14(process.cwd(), resolve29(reactPagesPath)).replace(/\\/g, "/");
19782
19774
  for (const file5 of indexFiles) {
19783
19775
  let content = readFileSync20(join37(reactIndexesPath, file5), "utf-8");
19784
19776
  content = content.replace(/from\s*['"]([^'"]*\/pages\/([^'"]+))['"]/g, (_match, _fullPath, componentName) => `from '/@src/${pagesRel}/${componentName}'`);
@@ -19786,27 +19778,27 @@ var isDev2, isBuildTraceEnabled = () => {
19786
19778
  }
19787
19779
  }, copySvelteDevIndexes = (svelteDir, sveltePagesPath, svelteEntries, devIndexDir) => {
19788
19780
  const svelteIndexDir = join37(getFrameworkGeneratedDir("svelte"), "indexes");
19789
- const sveltePageEntries = svelteEntries.filter((file5) => resolve30(file5).startsWith(resolve30(sveltePagesPath)));
19781
+ const sveltePageEntries = svelteEntries.filter((file5) => resolve29(file5).startsWith(resolve29(sveltePagesPath)));
19790
19782
  for (const entry of sveltePageEntries) {
19791
19783
  const name = basename11(entry).replace(/\.svelte(\.(ts|js))?$/, "");
19792
19784
  const indexFile = join37(svelteIndexDir, "pages", `${name}.js`);
19793
19785
  if (!existsSync27(indexFile))
19794
19786
  continue;
19795
19787
  let content = readFileSync20(indexFile, "utf-8");
19796
- const srcRel = relative14(process.cwd(), resolve30(entry)).replace(/\\/g, "/");
19788
+ const srcRel = relative14(process.cwd(), resolve29(entry)).replace(/\\/g, "/");
19797
19789
  content = content.replace(/import\s+Component\s+from\s+['"]([^'"]+)['"]/, `import Component from "/@src/${srcRel}"`);
19798
19790
  writeFileSync11(join37(devIndexDir, `${name}.svelte.js`), content);
19799
19791
  }
19800
19792
  }, copyVueDevIndexes = (vueDir, vuePagesPath, vueEntries, devIndexDir) => {
19801
19793
  const vueIndexDir = join37(getFrameworkGeneratedDir("vue"), "indexes");
19802
- const vuePageEntries = vueEntries.filter((file5) => resolve30(file5).startsWith(resolve30(vuePagesPath)));
19794
+ const vuePageEntries = vueEntries.filter((file5) => resolve29(file5).startsWith(resolve29(vuePagesPath)));
19803
19795
  for (const entry of vuePageEntries) {
19804
19796
  const name = basename11(entry, ".vue");
19805
19797
  const indexFile = join37(vueIndexDir, `${name}.js`);
19806
19798
  if (!existsSync27(indexFile))
19807
19799
  continue;
19808
19800
  let content = readFileSync20(indexFile, "utf-8");
19809
- const srcRel = relative14(process.cwd(), resolve30(entry)).replace(/\\/g, "/");
19801
+ const srcRel = relative14(process.cwd(), resolve29(entry)).replace(/\\/g, "/");
19810
19802
  content = content.replace(/import\s+Comp(?:\s*,\s*\*\s+as\s+\w+)?\s+from\s+['"]([^'"]+)['"]/, (match) => match.replace(/from\s+['"][^'"]+['"]/, `from "/@src/${srcRel}"`));
19811
19803
  writeFileSync11(join37(devIndexDir, `${name}.vue.js`), content);
19812
19804
  }
@@ -19819,7 +19811,7 @@ var isDev2, isBuildTraceEnabled = () => {
19819
19811
  const last = allComments[allComments.length - 1];
19820
19812
  if (!last?.[1])
19821
19813
  return JSON.stringify(outputPath);
19822
- const srcPath = resolve30(projectRoot, last[1].replace("/client/", "/").replace(/\.js$/, ".ts"));
19814
+ const srcPath = resolve29(projectRoot, last[1].replace("/client/", "/").replace(/\.js$/, ".ts"));
19823
19815
  return JSON.stringify(srcPath);
19824
19816
  }, QUOTE_CHARS, OPEN_BRACES, CLOSE_BRACES, findFunctionExpressionEnd = (content, startPos) => {
19825
19817
  let depth = 0;
@@ -20145,13 +20137,13 @@ ${content.slice(firstUseIdx)}`;
20145
20137
  const filterToIncrementalEntries = (entryPoints, mapToSource) => {
20146
20138
  if (!isIncremental || !incrementalFiles)
20147
20139
  return entryPoints;
20148
- const normalizedIncremental = new Set(incrementalFiles.map((f2) => resolve30(f2)));
20140
+ const normalizedIncremental = new Set(incrementalFiles.map((f2) => resolve29(f2)));
20149
20141
  const matchingEntries = [];
20150
20142
  for (const entry of entryPoints) {
20151
20143
  const sourceFile = mapToSource(entry);
20152
20144
  if (!sourceFile)
20153
20145
  continue;
20154
- if (!normalizedIncremental.has(resolve30(sourceFile)))
20146
+ if (!normalizedIncremental.has(resolve29(sourceFile)))
20155
20147
  continue;
20156
20148
  matchingEntries.push(entry);
20157
20149
  }
@@ -20316,7 +20308,7 @@ ${content.slice(firstUseIdx)}`;
20316
20308
  }
20317
20309
  const shouldIncludeHtmlAssets = !isIncremental || normalizedIncrementalFiles?.some((f2) => f2.includes("/html/") && (f2.endsWith(".html") || isStylePath(f2)));
20318
20310
  const reactEntries = isIncremental && reactIndexesPath && reactPagesPath ? filterToIncrementalEntries(allReactEntries, (entry) => {
20319
- if (entry.startsWith(resolve30(reactIndexesPath))) {
20311
+ if (entry.startsWith(resolve29(reactIndexesPath))) {
20320
20312
  const pageName = basename11(entry, ".tsx");
20321
20313
  return join37(reactPagesPath, `${pageName}.tsx`);
20322
20314
  }
@@ -20351,12 +20343,12 @@ ${content.slice(firstUseIdx)}`;
20351
20343
  const shouldCompileIslandSvelte = svelteDir && islandSvelteSources.length > 0;
20352
20344
  const shouldCompileIslandVue = vueDir && islandVueSources.length > 0;
20353
20345
  const shouldCompileIslandAngular = angularDir && islandAngularSources.length > 0;
20354
- let angularProvidersEntryAddons = [];
20346
+ let angularProvidersFilesToCompile = [];
20355
20347
  if (shouldCompileAngular && angularDir) {
20356
20348
  await tracePhase("scan/angular-handlers", async () => {
20357
20349
  const { runAngularHandlerScan: runAngularHandlerScan2 } = await Promise.resolve().then(() => (init_runAngularHandlerScan(), exports_runAngularHandlerScan));
20358
20350
  const scanResult = runAngularHandlerScan2(projectRoot, angularDir);
20359
- angularProvidersEntryAddons = scanResult.angularEntryAddons;
20351
+ angularProvidersFilesToCompile = scanResult.providersFiles.map((file5) => file5.outputPath);
20360
20352
  });
20361
20353
  }
20362
20354
  const [
@@ -20381,8 +20373,12 @@ ${content.slice(firstUseIdx)}`;
20381
20373
  },
20382
20374
  shouldCompileAngular ? tracePhase("compile/angular", async () => {
20383
20375
  const mod = await Promise.resolve().then(() => (init_compileAngular(), exports_compileAngular));
20384
- const combinedAngularEntries = angularProvidersEntryAddons.length > 0 ? [...angularEntries, ...angularProvidersEntryAddons] : angularEntries;
20385
- const result = await mod.compileAngular(combinedAngularEntries, angularDir, hmr, styleTransformConfig);
20376
+ if (angularProvidersFilesToCompile.length > 0 && angularDir) {
20377
+ const { getFrameworkGeneratedDir: getFrameworkGeneratedDir2 } = await Promise.resolve().then(() => (init_generatedDir(), exports_generatedDir));
20378
+ const compiledRoot = getFrameworkGeneratedDir2("angular", projectRoot);
20379
+ await Promise.all(angularProvidersFilesToCompile.map((entry) => mod.compileAngularFileJIT(entry, compiledRoot, angularDir, styleTransformConfig)));
20380
+ }
20381
+ const result = await mod.compileAngular(angularEntries, angularDir, hmr, styleTransformConfig);
20386
20382
  if (hmr) {
20387
20383
  try {
20388
20384
  const { primeComponentFingerprint: primeComponentFingerprint2 } = await Promise.resolve().then(() => (init_fastHmrCompiler(), exports_fastHmrCompiler));
@@ -20432,7 +20428,7 @@ ${content.slice(firstUseIdx)}`;
20432
20428
  const clientPath = islandSvelteClientPaths[idx];
20433
20429
  if (!sourcePath || !clientPath)
20434
20430
  continue;
20435
- islandSvelteClientPathMap.set(resolve30(sourcePath), clientPath);
20431
+ islandSvelteClientPathMap.set(resolve29(sourcePath), clientPath);
20436
20432
  }
20437
20433
  const islandVueClientPathMap = new Map;
20438
20434
  for (let idx = 0;idx < islandVueSources.length; idx++) {
@@ -20440,7 +20436,7 @@ ${content.slice(firstUseIdx)}`;
20440
20436
  const clientPath = islandVueClientPaths[idx];
20441
20437
  if (!sourcePath || !clientPath)
20442
20438
  continue;
20443
- islandVueClientPathMap.set(resolve30(sourcePath), clientPath);
20439
+ islandVueClientPathMap.set(resolve29(sourcePath), clientPath);
20444
20440
  }
20445
20441
  const islandAngularClientPathMap = new Map;
20446
20442
  for (let idx = 0;idx < islandAngularSources.length; idx++) {
@@ -20448,7 +20444,7 @@ ${content.slice(firstUseIdx)}`;
20448
20444
  const clientPath = islandAngularClientPaths[idx];
20449
20445
  if (!sourcePath || !clientPath)
20450
20446
  continue;
20451
- islandAngularClientPathMap.set(resolve30(sourcePath), clientPath);
20447
+ islandAngularClientPathMap.set(resolve29(sourcePath), clientPath);
20452
20448
  }
20453
20449
  const reactConventionSources = collectConventionSourceFiles(conventionsMap.react);
20454
20450
  const svelteConventionSources = collectConventionSourceFiles(conventionsMap.svelte);
@@ -21373,7 +21369,7 @@ __export(exports_dependencyGraph, {
21373
21369
  });
21374
21370
  import { existsSync as existsSync29, readFileSync as readFileSync21 } from "fs";
21375
21371
  var {Glob: Glob9 } = globalThis.Bun;
21376
- import { resolve as resolve31 } from "path";
21372
+ import { resolve as resolve30 } from "path";
21377
21373
  var emptyDependencyGraph, tsTranspiler, jsTranspiler, loaderForFile = (filePath) => {
21378
21374
  const lower = filePath.toLowerCase();
21379
21375
  if (lower.endsWith(".ts") || lower.endsWith(".tsx") || lower.endsWith(".jsx"))
@@ -21387,8 +21383,8 @@ var emptyDependencyGraph, tsTranspiler, jsTranspiler, loaderForFile = (filePath)
21387
21383
  if (!importPath.startsWith(".") && !importPath.startsWith("/")) {
21388
21384
  return null;
21389
21385
  }
21390
- const fromDir = resolve31(fromFile, "..");
21391
- const normalized = resolve31(fromDir, importPath);
21386
+ const fromDir = resolve30(fromFile, "..");
21387
+ const normalized = resolve30(fromDir, importPath);
21392
21388
  const extensions = [
21393
21389
  ".ts",
21394
21390
  ".tsx",
@@ -21418,7 +21414,7 @@ var emptyDependencyGraph, tsTranspiler, jsTranspiler, loaderForFile = (filePath)
21418
21414
  dependents.delete(normalizedPath);
21419
21415
  }
21420
21416
  }, addFileToGraph = (graph, filePath) => {
21421
- const normalizedPath = resolve31(filePath);
21417
+ const normalizedPath = resolve30(filePath);
21422
21418
  if (!existsSync29(normalizedPath))
21423
21419
  return;
21424
21420
  const dependencies = extractDependencies(normalizedPath);
@@ -21445,10 +21441,10 @@ var emptyDependencyGraph, tsTranspiler, jsTranspiler, loaderForFile = (filePath)
21445
21441
  }, IGNORED_SEGMENTS, buildInitialDependencyGraph = (graph, directories) => {
21446
21442
  const processedFiles = new Set;
21447
21443
  const glob = new Glob9("**/*.{ts,tsx,js,jsx,vue,svelte,html,htm}");
21448
- const resolvedDirs = directories.map((dir) => resolve31(dir)).filter((dir) => existsSync29(dir));
21444
+ const resolvedDirs = directories.map((dir) => resolve30(dir)).filter((dir) => existsSync29(dir));
21449
21445
  const allFiles = resolvedDirs.flatMap((dir) => Array.from(glob.scanSync({ absolute: true, cwd: dir })));
21450
21446
  for (const file5 of allFiles) {
21451
- const fullPath = resolve31(file5);
21447
+ const fullPath = resolve30(file5);
21452
21448
  if (IGNORED_SEGMENTS.some((seg) => fullPath.includes(seg)))
21453
21449
  continue;
21454
21450
  if (processedFiles.has(fullPath))
@@ -21561,7 +21557,7 @@ var emptyDependencyGraph, tsTranspiler, jsTranspiler, loaderForFile = (filePath)
21561
21557
  return [];
21562
21558
  }
21563
21559
  }, getAffectedFiles = (graph, changedFile) => {
21564
- const normalizedPath = resolve31(changedFile);
21560
+ const normalizedPath = resolve30(changedFile);
21565
21561
  const affected = new Set;
21566
21562
  const toProcess = [normalizedPath];
21567
21563
  const processNode = (current) => {
@@ -21592,7 +21588,7 @@ var emptyDependencyGraph, tsTranspiler, jsTranspiler, loaderForFile = (filePath)
21592
21588
  }, removeDependentsForFile = (graph, normalizedPath) => {
21593
21589
  graph.dependents.delete(normalizedPath);
21594
21590
  }, removeFileFromGraph = (graph, filePath) => {
21595
- const normalizedPath = resolve31(filePath);
21591
+ const normalizedPath = resolve30(filePath);
21596
21592
  removeDepsForFile(graph, normalizedPath);
21597
21593
  removeDependentsForFile(graph, normalizedPath);
21598
21594
  };
@@ -21635,12 +21631,12 @@ var globalVersionCounter = 0, createModuleVersionTracker = () => new Map, getNex
21635
21631
  };
21636
21632
 
21637
21633
  // src/dev/configResolver.ts
21638
- import { resolve as resolve32 } from "path";
21634
+ import { resolve as resolve31 } from "path";
21639
21635
  var resolveBuildPaths = (config) => {
21640
21636
  const cwd2 = process.cwd();
21641
21637
  const normalize = (path) => path.replace(/\\/g, "/");
21642
- const withDefault = (value, fallback) => normalize(resolve32(cwd2, value ?? fallback));
21643
- const optional = (value) => value ? normalize(resolve32(cwd2, value)) : undefined;
21638
+ const withDefault = (value, fallback) => normalize(resolve31(cwd2, value ?? fallback));
21639
+ const optional = (value) => value ? normalize(resolve31(cwd2, value)) : undefined;
21644
21640
  return {
21645
21641
  angularDir: optional(config.angularDirectory),
21646
21642
  assetsDir: optional(config.assetsDirectory),
@@ -21694,7 +21690,7 @@ var init_clientManager = __esm(() => {
21694
21690
 
21695
21691
  // src/dev/pathUtils.ts
21696
21692
  import { existsSync as existsSync30, readdirSync as readdirSync4, readFileSync as readFileSync22 } from "fs";
21697
- import { dirname as dirname22, resolve as resolve33 } from "path";
21693
+ import { dirname as dirname22, resolve as resolve32 } from "path";
21698
21694
  var STYLE_EXTENSION_PATTERN2, detectFramework = (filePath, resolved) => {
21699
21695
  if (shouldIgnorePath(filePath, resolved)) {
21700
21696
  return "ignored";
@@ -21770,7 +21766,7 @@ var STYLE_EXTENSION_PATTERN2, detectFramework = (filePath, resolved) => {
21770
21766
  return "unknown";
21771
21767
  }, collectAngularResourceDirs = (angularDir) => {
21772
21768
  const out = new Set;
21773
- const angularRoot = resolve33(angularDir);
21769
+ const angularRoot = resolve32(angularDir);
21774
21770
  const angularRootNormalized = normalizePath(angularRoot);
21775
21771
  const walk = (dir) => {
21776
21772
  let entries;
@@ -21783,7 +21779,7 @@ var STYLE_EXTENSION_PATTERN2, detectFramework = (filePath, resolved) => {
21783
21779
  if (entry.name.startsWith(".") || entry.name === "node_modules") {
21784
21780
  continue;
21785
21781
  }
21786
- const full = resolve33(dir, entry.name);
21782
+ const full = resolve32(dir, entry.name);
21787
21783
  if (entry.isDirectory()) {
21788
21784
  walk(full);
21789
21785
  continue;
@@ -21824,7 +21820,7 @@ var STYLE_EXTENSION_PATTERN2, detectFramework = (filePath, resolved) => {
21824
21820
  }
21825
21821
  const componentDir = dirname22(full);
21826
21822
  for (const ref of refs) {
21827
- const refAbs = normalizePath(resolve33(componentDir, ref));
21823
+ const refAbs = normalizePath(resolve32(componentDir, ref));
21828
21824
  const refDir = normalizePath(dirname22(refAbs));
21829
21825
  if (refDir === angularRootNormalized || refDir.startsWith(angularRootNormalized + "/")) {
21830
21826
  continue;
@@ -21841,7 +21837,7 @@ var STYLE_EXTENSION_PATTERN2, detectFramework = (filePath, resolved) => {
21841
21837
  const push = (path) => {
21842
21838
  if (!path)
21843
21839
  return;
21844
- const abs = normalizePath(resolve33(cwd2, path));
21840
+ const abs = normalizePath(resolve32(cwd2, path));
21845
21841
  if (!roots.includes(abs))
21846
21842
  roots.push(abs);
21847
21843
  };
@@ -21866,7 +21862,7 @@ var STYLE_EXTENSION_PATTERN2, detectFramework = (filePath, resolved) => {
21866
21862
  push(cfg.assetsDir);
21867
21863
  push(cfg.stylesDir);
21868
21864
  for (const candidate of ["src", "db", "assets", "styles"]) {
21869
- const abs = normalizePath(resolve33(cwd2, candidate));
21865
+ const abs = normalizePath(resolve32(cwd2, candidate));
21870
21866
  if (existsSync30(abs) && !roots.includes(abs))
21871
21867
  roots.push(abs);
21872
21868
  }
@@ -21878,7 +21874,7 @@ var STYLE_EXTENSION_PATTERN2, detectFramework = (filePath, resolved) => {
21878
21874
  continue;
21879
21875
  if (entry.name.startsWith("."))
21880
21876
  continue;
21881
- const abs = normalizePath(resolve33(cwd2, entry.name));
21877
+ const abs = normalizePath(resolve32(cwd2, entry.name));
21882
21878
  if (roots.includes(abs))
21883
21879
  continue;
21884
21880
  if (shouldIgnorePath(abs, resolved))
@@ -21953,7 +21949,7 @@ var init_pathUtils = __esm(() => {
21953
21949
  // src/dev/fileWatcher.ts
21954
21950
  import { watch } from "fs";
21955
21951
  import { existsSync as existsSync31, readdirSync as readdirSync5, statSync as statSync4 } from "fs";
21956
- import { dirname as dirname23, join as join39, resolve as resolve34 } from "path";
21952
+ import { dirname as dirname23, join as join39, resolve as resolve33 } from "path";
21957
21953
  var safeRemoveFromGraph = (graph, fullPath) => {
21958
21954
  try {
21959
21955
  removeFileFromGraph(graph, fullPath);
@@ -22034,7 +22030,7 @@ var safeRemoveFromGraph = (graph, fullPath) => {
22034
22030
  }, addFileWatchers = (state, paths, onFileChange) => {
22035
22031
  const stylesDir = state.resolvedPaths?.stylesDir;
22036
22032
  paths.forEach((path) => {
22037
- const absolutePath = resolve34(path).replace(/\\/g, "/");
22033
+ const absolutePath = resolve33(path).replace(/\\/g, "/");
22038
22034
  if (!existsSync31(absolutePath)) {
22039
22035
  return;
22040
22036
  }
@@ -22045,7 +22041,7 @@ var safeRemoveFromGraph = (graph, fullPath) => {
22045
22041
  const watchPaths = getWatchPaths(config, state.resolvedPaths);
22046
22042
  const stylesDir = state.resolvedPaths?.stylesDir;
22047
22043
  watchPaths.forEach((path) => {
22048
- const absolutePath = resolve34(path).replace(/\\/g, "/");
22044
+ const absolutePath = resolve33(path).replace(/\\/g, "/");
22049
22045
  if (!existsSync31(absolutePath)) {
22050
22046
  return;
22051
22047
  }
@@ -22064,13 +22060,13 @@ var init_fileWatcher = __esm(() => {
22064
22060
  });
22065
22061
 
22066
22062
  // src/dev/assetStore.ts
22067
- import { resolve as resolve35 } from "path";
22063
+ import { resolve as resolve34 } from "path";
22068
22064
  import { readdir as readdir4, unlink } from "fs/promises";
22069
22065
  var mimeTypes, getMimeType = (filePath) => {
22070
22066
  const ext = filePath.slice(filePath.lastIndexOf("."));
22071
22067
  return mimeTypes[ext] ?? "application/octet-stream";
22072
22068
  }, HASHED_FILE_RE, stripHash = (webPath) => webPath.replace(/\.[a-z0-9]{8}(\.(js|css|mjs))$/, "$1"), processWalkEntry = (entry, dir, liveByIdentity, walkAndClean) => {
22073
- const fullPath = resolve35(dir, entry.name);
22069
+ const fullPath = resolve34(dir, entry.name);
22074
22070
  if (entry.isDirectory()) {
22075
22071
  return walkAndClean(fullPath);
22076
22072
  }
@@ -22086,10 +22082,10 @@ var mimeTypes, getMimeType = (filePath) => {
22086
22082
  }, cleanStaleAssets = async (store, manifest, buildDir) => {
22087
22083
  const liveByIdentity = new Map;
22088
22084
  for (const webPath of store.keys()) {
22089
- const diskPath = resolve35(buildDir, webPath.slice(1));
22085
+ const diskPath = resolve34(buildDir, webPath.slice(1));
22090
22086
  liveByIdentity.set(stripHash(diskPath), diskPath);
22091
22087
  }
22092
- const absBuildDir = resolve35(buildDir);
22088
+ const absBuildDir = resolve34(buildDir);
22093
22089
  Object.values(manifest).forEach((val) => {
22094
22090
  if (!HASHED_FILE_RE.test(val))
22095
22091
  return;
@@ -22107,7 +22103,7 @@ var mimeTypes, getMimeType = (filePath) => {
22107
22103
  } catch {}
22108
22104
  }, lookupAsset = (store, path) => store.get(path), processScanEntry = (entry, dir, prefix, store, scanDir) => {
22109
22105
  if (entry.isDirectory()) {
22110
- return scanDir(resolve35(dir, entry.name), `${prefix}${entry.name}/`);
22106
+ return scanDir(resolve34(dir, entry.name), `${prefix}${entry.name}/`);
22111
22107
  }
22112
22108
  if (!entry.name.startsWith("chunk-")) {
22113
22109
  return null;
@@ -22116,7 +22112,7 @@ var mimeTypes, getMimeType = (filePath) => {
22116
22112
  if (store.has(webPath)) {
22117
22113
  return null;
22118
22114
  }
22119
- return Bun.file(resolve35(dir, entry.name)).bytes().then((bytes) => {
22115
+ return Bun.file(resolve34(dir, entry.name)).bytes().then((bytes) => {
22120
22116
  store.set(webPath, bytes);
22121
22117
  return;
22122
22118
  }).catch(() => {});
@@ -22138,7 +22134,7 @@ var mimeTypes, getMimeType = (filePath) => {
22138
22134
  for (const webPath of newIdentities.values()) {
22139
22135
  if (store.has(webPath))
22140
22136
  continue;
22141
- loadPromises.push(Bun.file(resolve35(buildDir, webPath.slice(1))).bytes().then((bytes) => {
22137
+ loadPromises.push(Bun.file(resolve34(buildDir, webPath.slice(1))).bytes().then((bytes) => {
22142
22138
  store.set(webPath, bytes);
22143
22139
  return;
22144
22140
  }).catch(() => {}));
@@ -22264,9 +22260,9 @@ var init_transformCache = __esm(() => {
22264
22260
  });
22265
22261
 
22266
22262
  // src/dev/reactComponentClassifier.ts
22267
- import { resolve as resolve36 } from "path";
22263
+ import { resolve as resolve35 } from "path";
22268
22264
  var classifyComponent = (filePath) => {
22269
- const normalizedPath = resolve36(filePath);
22265
+ const normalizedPath = resolve35(filePath);
22270
22266
  if (normalizedPath.includes("/react/pages/")) {
22271
22267
  return "server";
22272
22268
  }
@@ -22278,7 +22274,7 @@ var classifyComponent = (filePath) => {
22278
22274
  var init_reactComponentClassifier = () => {};
22279
22275
 
22280
22276
  // src/dev/moduleMapper.ts
22281
- import { basename as basename12, resolve as resolve37 } from "path";
22277
+ import { basename as basename12, resolve as resolve36 } from "path";
22282
22278
  var buildModulePaths = (moduleKeys, manifest) => {
22283
22279
  const modulePaths = {};
22284
22280
  moduleKeys.forEach((key) => {
@@ -22288,7 +22284,7 @@ var buildModulePaths = (moduleKeys, manifest) => {
22288
22284
  });
22289
22285
  return modulePaths;
22290
22286
  }, processChangedFile = (sourceFile, framework, manifest, resolvedPaths, processedFiles) => {
22291
- const normalizedFile = resolve37(sourceFile);
22287
+ const normalizedFile = resolve36(sourceFile);
22292
22288
  const normalizedPath = normalizedFile.replace(/\\/g, "/");
22293
22289
  if (processedFiles.has(normalizedFile)) {
22294
22290
  return null;
@@ -22324,7 +22320,7 @@ var buildModulePaths = (moduleKeys, manifest) => {
22324
22320
  });
22325
22321
  return grouped;
22326
22322
  }, mapSourceFileToManifestKeys = (sourceFile, framework, resolvedPaths) => {
22327
- const normalizedFile = resolve37(sourceFile);
22323
+ const normalizedFile = resolve36(sourceFile);
22328
22324
  const fileName = basename12(normalizedFile);
22329
22325
  const baseName = fileName.replace(/\.(tsx?|jsx?|vue|svelte|css|html)$/, "");
22330
22326
  const pascalName = toPascal(baseName);
@@ -22386,7 +22382,7 @@ __export(exports_resolveOwningComponents, {
22386
22382
  invalidateResourceIndex: () => invalidateResourceIndex
22387
22383
  });
22388
22384
  import { readdirSync as readdirSync6, readFileSync as readFileSync24, statSync as statSync5 } from "fs";
22389
- import { dirname as dirname24, extname as extname9, join as join40, resolve as resolve38 } from "path";
22385
+ import { dirname as dirname24, extname as extname9, join as join40, resolve as resolve37 } from "path";
22390
22386
  import ts14 from "typescript";
22391
22387
  var ENTITY_DECORATORS, isAngularSourceFile = (file5) => file5.endsWith(".ts") || file5.endsWith(".tsx"), walkAngularSourceFiles = (root) => {
22392
22388
  const out = [];
@@ -22499,7 +22495,7 @@ var ENTITY_DECORATORS, isAngularSourceFile = (file5) => file5.endsWith(".ts") ||
22499
22495
  };
22500
22496
  visit(sourceFile);
22501
22497
  return out;
22502
- }, safeNormalize = (path) => resolve38(path).replace(/\\/g, "/"), resolveOwningComponents = (params) => {
22498
+ }, safeNormalize = (path) => resolve37(path).replace(/\\/g, "/"), resolveOwningComponents = (params) => {
22503
22499
  const { changedFilePath, userAngularRoot } = params;
22504
22500
  const changedAbs = safeNormalize(changedFilePath);
22505
22501
  const out = [];
@@ -22568,7 +22564,7 @@ var ENTITY_DECORATORS, isAngularSourceFile = (file5) => file5.endsWith(".ts") ||
22568
22564
  if (!spec.startsWith(".") && !spec.startsWith("/")) {
22569
22565
  return null;
22570
22566
  }
22571
- const base = resolve38(childDir, spec);
22567
+ const base = resolve37(childDir, spec);
22572
22568
  const candidates = [
22573
22569
  `${base}.ts`,
22574
22570
  `${base}.tsx`,
@@ -22606,7 +22602,7 @@ var ENTITY_DECORATORS, isAngularSourceFile = (file5) => file5.endsWith(".ts") ||
22606
22602
  };
22607
22603
  if (cls.kind === "component") {
22608
22604
  for (const url of [...cls.templateUrls, ...cls.styleUrls]) {
22609
- const abs = safeNormalize(resolve38(componentDir, url));
22605
+ const abs = safeNormalize(resolve37(componentDir, url));
22610
22606
  const existing = resource.get(abs);
22611
22607
  if (existing)
22612
22608
  existing.push(entity);
@@ -22774,7 +22770,7 @@ __export(exports_moduleServer, {
22774
22770
  SRC_URL_PREFIX: () => SRC_URL_PREFIX
22775
22771
  });
22776
22772
  import { existsSync as existsSync32, readFileSync as readFileSync25, statSync as statSync6 } from "fs";
22777
- import { basename as basename13, dirname as dirname25, extname as extname10, join as join41, resolve as resolve39, relative as relative15 } from "path";
22773
+ import { basename as basename13, dirname as dirname25, extname as extname10, join as join41, resolve as resolve38, relative as relative15 } from "path";
22778
22774
  var SRC_PREFIX = "/@src/", jsTranspiler2, tsTranspiler2, tsxTranspiler, TRANSPILABLE, ALL_EXPORTS_RE, STRING_CONTENTS_RE, preserveTypeExports = (originalSource, transpiled, valueExports) => {
22779
22775
  const codeOnly = originalSource.replace(STRING_CONTENTS_RE, '""');
22780
22776
  const allExports = [];
@@ -22794,7 +22790,7 @@ var SRC_PREFIX = "/@src/", jsTranspiler2, tsTranspiler2, tsxTranspiler, TRANSPIL
22794
22790
  ${stubs}
22795
22791
  `;
22796
22792
  }, resolveRelativeExtension = (srcPath, projectRoot, extensions) => {
22797
- const found = extensions.find((ext) => existsSync32(resolve39(projectRoot, srcPath + ext)));
22793
+ const found = extensions.find((ext) => existsSync32(resolve38(projectRoot, srcPath + ext)));
22798
22794
  return found ? srcPath + found : srcPath;
22799
22795
  }, IMPORT_EXTENSIONS, SIDE_EFFECT_EXTENSIONS, MODULE_EXTENSIONS, RESOLVED_MODULE_EXTENSIONS, REACT_EXTENSIONS, escapeRegex3 = (str) => str.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"), buildImportRewriter = (vendorPaths) => {
22800
22796
  const entries = Object.entries(vendorPaths).sort(([a], [b2]) => b2.length - a.length);
@@ -22809,7 +22805,7 @@ ${stubs}
22809
22805
  return invalidationVersion > 0 ? `${mtime}.${invalidationVersion}` : `${mtime}`;
22810
22806
  }, srcUrl = (relPath, projectRoot) => {
22811
22807
  const base = `${SRC_PREFIX}${relPath.replace(/\\/g, "/")}`;
22812
- const absPath = resolve39(projectRoot, relPath);
22808
+ const absPath = resolve38(projectRoot, relPath);
22813
22809
  const cached = mtimeCache.get(absPath);
22814
22810
  if (cached !== undefined)
22815
22811
  return `${base}?v=${buildVersion(cached, absPath)}`;
@@ -22821,12 +22817,12 @@ ${stubs}
22821
22817
  return base;
22822
22818
  }
22823
22819
  }, resolveRelativeImport = (relPath, fileDir, projectRoot, extensions) => {
22824
- const absPath = resolve39(fileDir, relPath);
22820
+ const absPath = resolve38(fileDir, relPath);
22825
22821
  const rel = relative15(projectRoot, absPath);
22826
22822
  const extension = extname10(rel);
22827
22823
  let srcPath = RESOLVED_MODULE_EXTENSIONS.has(extension) ? rel : resolveRelativeExtension(rel, projectRoot, extensions);
22828
22824
  if (extname10(srcPath) === ".svelte") {
22829
- srcPath = relative15(projectRoot, resolveSvelteModulePath(resolve39(projectRoot, srcPath)));
22825
+ srcPath = relative15(projectRoot, resolveSvelteModulePath(resolve38(projectRoot, srcPath)));
22830
22826
  }
22831
22827
  return srcUrl(srcPath, projectRoot);
22832
22828
  }, NODE_BUILTIN_RE, resolveAbsoluteSpecifier = (specifier, projectRoot) => {
@@ -22845,13 +22841,13 @@ ${stubs}
22845
22841
  const packageName = isScoped ? `${parts[0]}/${parts[1]}` : parts[0];
22846
22842
  const subpath = isScoped ? parts.slice(2).join("/") : parts.slice(1).join("/");
22847
22843
  if (!subpath) {
22848
- const pkgDir = resolve39(projectRoot, "node_modules", packageName ?? "");
22844
+ const pkgDir = resolve38(projectRoot, "node_modules", packageName ?? "");
22849
22845
  const pkgJsonPath = join41(pkgDir, "package.json");
22850
22846
  if (existsSync32(pkgJsonPath)) {
22851
22847
  const pkg = JSON.parse(readFileSync25(pkgJsonPath, "utf-8"));
22852
22848
  const esmEntry = typeof pkg.module === "string" && pkg.module || typeof pkg.browser === "string" && pkg.browser;
22853
22849
  if (esmEntry) {
22854
- const resolved = resolve39(pkgDir, esmEntry);
22850
+ const resolved = resolve38(pkgDir, esmEntry);
22855
22851
  if (existsSync32(resolved))
22856
22852
  return relative15(projectRoot, resolved);
22857
22853
  }
@@ -22898,12 +22894,12 @@ ${stubs}
22898
22894
  result = result.replace(/((?:from|import)\s*["'])(\/[^"']+\.(tsx?|jsx?|ts))(["'])/g, rewriteAbsoluteToSrc);
22899
22895
  result = result.replace(/(import\s*\(\s*["'])(\/[^"']+\.(tsx?|jsx?|ts))(["']\s*\))/g, rewriteAbsoluteToSrc);
22900
22896
  result = result.replace(/new\s+URL\(\s*["'](\.\.?\/[^"']+)["']\s*,\s*import\.meta\.url\s*\)/g, (_match, relPath) => {
22901
- const absPath = resolve39(fileDir, relPath);
22897
+ const absPath = resolve38(fileDir, relPath);
22902
22898
  const rel = relative15(projectRoot, absPath);
22903
22899
  return `new URL('${srcUrl(rel, projectRoot)}', import.meta.url)`;
22904
22900
  });
22905
22901
  result = result.replace(/import\.meta\.resolve\(\s*["'](\.\.?\/[^"']+)["']\s*\)/g, (_match, relPath) => {
22906
- const absPath = resolve39(fileDir, relPath);
22902
+ const absPath = resolve38(fileDir, relPath);
22907
22903
  const rel = relative15(projectRoot, absPath);
22908
22904
  return `'${srcUrl(rel, projectRoot)}'`;
22909
22905
  });
@@ -23216,7 +23212,7 @@ ${code}`;
23216
23212
  code = injectVueHmr(code, filePath, projectRoot, vueDir);
23217
23213
  return rewriteImports(code, filePath, projectRoot, rewriter);
23218
23214
  }, injectVueHmr = (code, filePath, projectRoot, vueDir) => {
23219
- const hmrBase = vueDir ? resolve39(vueDir) : projectRoot;
23215
+ const hmrBase = vueDir ? resolve38(vueDir) : projectRoot;
23220
23216
  const hmrId = relative15(hmrBase, filePath).replace(/\\/g, "/").replace(/\.vue$/, "");
23221
23217
  let result = code.replace(/export\s+default\s+/, "var __hmr_comp__ = ");
23222
23218
  result += [
@@ -23380,7 +23376,7 @@ export default {};
23380
23376
  const escaped = virtualCss.replace(/\\/g, "\\\\").replace(/`/g, "\\`").replace(/\$/g, "\\$");
23381
23377
  return jsResponse(`var s=document.createElement('style');s.textContent=\`${escaped}\`;s.dataset.svelteHmr=${JSON.stringify(cssCheckPath)};var p=document.querySelector('style[data-svelte-hmr="${cssCheckPath}"]');if(p)p.remove();document.head.appendChild(s);`);
23382
23378
  }, resolveSourcePath = (relPath, projectRoot) => {
23383
- const filePath = resolve39(projectRoot, relPath);
23379
+ const filePath = resolve38(projectRoot, relPath);
23384
23380
  const ext = extname10(filePath);
23385
23381
  if (ext === ".svelte")
23386
23382
  return { ext, filePath: resolveSvelteModulePath(filePath) };
@@ -23417,14 +23413,14 @@ export default {};
23417
23413
  const absoluteCandidate = "/" + tail.replace(/^\/+/, "");
23418
23414
  const candidates = [
23419
23415
  absoluteCandidate,
23420
- resolve39(projectRoot, tail)
23416
+ resolve38(projectRoot, tail)
23421
23417
  ];
23422
23418
  try {
23423
23419
  const { loadConfig: loadConfig2 } = await Promise.resolve().then(() => (init_loadConfig(), exports_loadConfig));
23424
23420
  const cfg = await loadConfig2();
23425
- const angularDir = cfg.angularDirectory && resolve39(projectRoot, cfg.angularDirectory);
23421
+ const angularDir = cfg.angularDirectory && resolve38(projectRoot, cfg.angularDirectory);
23426
23422
  if (angularDir)
23427
- candidates.push(resolve39(angularDir, tail));
23423
+ candidates.push(resolve38(angularDir, tail));
23428
23424
  } catch {}
23429
23425
  for (const candidate of candidates) {
23430
23426
  if (await fileExists(candidate)) {
@@ -23455,7 +23451,7 @@ export default {};
23455
23451
  if (!TRANSPILABLE.has(ext))
23456
23452
  return;
23457
23453
  const stat3 = statSync6(filePath);
23458
- const resolvedVueDir = vueDir ? resolve39(vueDir) : undefined;
23454
+ const resolvedVueDir = vueDir ? resolve38(vueDir) : undefined;
23459
23455
  let content = REACT_EXTENSIONS.has(ext) ? transformReactFile(filePath, projectRoot, rewriter) : transformPlainFile(filePath, projectRoot, rewriter, resolvedVueDir);
23460
23456
  const isAngularGeneratedJs = ext === ".js" && filePath.replace(/\\/g, "/").includes("/.absolutejs/generated/angular/");
23461
23457
  if (isAngularGeneratedJs) {
@@ -23514,7 +23510,7 @@ export default {};
23514
23510
  const relPath = pathname.slice(SRC_PREFIX.length);
23515
23511
  if (relPath === "bun:wrap" || relPath.startsWith("bun:wrap?"))
23516
23512
  return handleBunWrapRequest();
23517
- const virtualCssResponse = handleVirtualSvelteCss(resolve39(projectRoot, relPath));
23513
+ const virtualCssResponse = handleVirtualSvelteCss(resolve38(projectRoot, relPath));
23518
23514
  if (virtualCssResponse)
23519
23515
  return virtualCssResponse;
23520
23516
  const { filePath, ext } = resolveSourcePath(relPath, projectRoot);
@@ -23530,11 +23526,11 @@ export default {};
23530
23526
  SRC_IMPORT_RE.lastIndex = 0;
23531
23527
  while ((match = SRC_IMPORT_RE.exec(content)) !== null) {
23532
23528
  if (match[1])
23533
- files.push(resolve39(projectRoot, match[1]));
23529
+ files.push(resolve38(projectRoot, match[1]));
23534
23530
  }
23535
23531
  return files;
23536
23532
  }, invalidateModule = (filePath) => {
23537
- const resolved = resolve39(filePath);
23533
+ const resolved = resolve38(filePath);
23538
23534
  invalidate(filePath);
23539
23535
  if (resolved !== filePath)
23540
23536
  invalidate(resolved);
@@ -23679,7 +23675,7 @@ __export(exports_hmrCompiler, {
23679
23675
  getApplyMetadataModule: () => getApplyMetadataModule,
23680
23676
  encodeHmrComponentId: () => encodeHmrComponentId
23681
23677
  });
23682
- import { dirname as dirname26, relative as relative16, resolve as resolve40 } from "path";
23678
+ import { dirname as dirname26, relative as relative16, resolve as resolve39 } from "path";
23683
23679
  import { performance as performance2 } from "perf_hooks";
23684
23680
  var getApplyMetadataModule = async (encodedId) => {
23685
23681
  const decoded = decodeURIComponent(encodedId);
@@ -23688,7 +23684,7 @@ var getApplyMetadataModule = async (encodedId) => {
23688
23684
  return null;
23689
23685
  const filePathRel = decoded.slice(0, at2);
23690
23686
  const className = decoded.slice(at2 + 1);
23691
- const componentFilePath = resolve40(process.cwd(), filePathRel);
23687
+ const componentFilePath = resolve39(process.cwd(), filePathRel);
23692
23688
  const projectRelPath = relative16(process.cwd(), componentFilePath).replace(/\\/g, "/");
23693
23689
  const cacheKey2 = encodeURIComponent(`${projectRelPath}@${className}`);
23694
23690
  const { takePendingModule: takePendingModule2 } = await Promise.resolve().then(() => (init_fastHmrCompiler(), exports_fastHmrCompiler));
@@ -23850,11 +23846,11 @@ var exports_simpleHTMLHMR = {};
23850
23846
  __export(exports_simpleHTMLHMR, {
23851
23847
  handleHTMLUpdate: () => handleHTMLUpdate
23852
23848
  });
23853
- import { resolve as resolve41 } from "path";
23849
+ import { resolve as resolve40 } from "path";
23854
23850
  var handleHTMLUpdate = async (htmlFilePath) => {
23855
23851
  let htmlContent;
23856
23852
  try {
23857
- const resolvedPath = resolve41(htmlFilePath);
23853
+ const resolvedPath = resolve40(htmlFilePath);
23858
23854
  const file5 = Bun.file(resolvedPath);
23859
23855
  if (!await file5.exists()) {
23860
23856
  return null;
@@ -23880,11 +23876,11 @@ var exports_simpleHTMXHMR = {};
23880
23876
  __export(exports_simpleHTMXHMR, {
23881
23877
  handleHTMXUpdate: () => handleHTMXUpdate
23882
23878
  });
23883
- import { resolve as resolve42 } from "path";
23879
+ import { resolve as resolve41 } from "path";
23884
23880
  var handleHTMXUpdate = async (htmxFilePath) => {
23885
23881
  let htmlContent;
23886
23882
  try {
23887
- const resolvedPath = resolve42(htmxFilePath);
23883
+ const resolvedPath = resolve41(htmxFilePath);
23888
23884
  const file5 = Bun.file(resolvedPath);
23889
23885
  if (!await file5.exists()) {
23890
23886
  return null;
@@ -23907,7 +23903,7 @@ var init_simpleHTMXHMR = () => {};
23907
23903
 
23908
23904
  // src/dev/rebuildTrigger.ts
23909
23905
  import { existsSync as existsSync33, rmSync as rmSync3 } from "fs";
23910
- import { basename as basename14, dirname as dirname27, join as join42, relative as relative17, resolve as resolve43, sep as sep4 } from "path";
23906
+ import { basename as basename14, dirname as dirname27, join as join42, relative as relative17, resolve as resolve42, sep as sep4 } from "path";
23911
23907
  var moduleServerPromise, getModuleServer = () => moduleServerPromise, runSequentially = (items, action) => items.reduce((chain, item) => chain.then(() => action(item)), Promise.resolve()), getStyleTransformConfig = (config) => createStyleTransformConfig(config.stylePreprocessors, config.postcss), recompileTailwindForFastPath = async (state, config, files) => {
23912
23908
  if (!config.tailwind)
23913
23909
  return;
@@ -23919,7 +23915,7 @@ var moduleServerPromise, getModuleServer = () => moduleServerPromise, runSequent
23919
23915
  if (!cssChanged)
23920
23916
  return;
23921
23917
  try {
23922
- const outputPath = resolve43(state.resolvedPaths.buildDir, config.tailwind.output);
23918
+ const outputPath = resolve42(state.resolvedPaths.buildDir, config.tailwind.output);
23923
23919
  const bytes = await Bun.file(outputPath).bytes();
23924
23920
  const webPath = `/${config.tailwind.output.replace(/^\/+/, "")}`;
23925
23921
  state.assetStore.set(webPath, bytes);
@@ -24009,12 +24005,12 @@ var moduleServerPromise, getModuleServer = () => moduleServerPromise, runSequent
24009
24005
  }, isValidDeletedAffectedFile = (affectedFile, deletedPathResolved, processedFiles) => affectedFile !== deletedPathResolved && !processedFiles.has(affectedFile) && existsSync33(affectedFile), FRAMEWORK_DIR_KEYS_FOR_CLEANUP, removeStaleGenerated = (state, deletedFile) => {
24010
24006
  const config = state.config;
24011
24007
  const cwd2 = process.cwd();
24012
- const absDeleted = resolve43(deletedFile).replace(/\\/g, "/");
24008
+ const absDeleted = resolve42(deletedFile).replace(/\\/g, "/");
24013
24009
  for (const { configKey, framework } of FRAMEWORK_DIR_KEYS_FOR_CLEANUP) {
24014
24010
  const dir = config[configKey];
24015
24011
  if (!dir)
24016
24012
  continue;
24017
- const absDir = resolve43(cwd2, dir).replace(/\\/g, "/");
24013
+ const absDir = resolve42(cwd2, dir).replace(/\\/g, "/");
24018
24014
  if (!absDeleted.startsWith(`${absDir}/`))
24019
24015
  continue;
24020
24016
  const rel = absDeleted.slice(absDir.length + 1);
@@ -24038,7 +24034,7 @@ var moduleServerPromise, getModuleServer = () => moduleServerPromise, runSequent
24038
24034
  removeStaleGenerated(state, filePathInSet);
24039
24035
  try {
24040
24036
  const affectedFiles = getAffectedFiles(state.dependencyGraph, filePathInSet);
24041
- const deletedPathResolved = resolve43(filePathInSet);
24037
+ const deletedPathResolved = resolve42(filePathInSet);
24042
24038
  affectedFiles.forEach((affectedFile) => {
24043
24039
  if (isValidDeletedAffectedFile(affectedFile, deletedPathResolved, processedFiles)) {
24044
24040
  validFiles.push(affectedFile);
@@ -24082,7 +24078,7 @@ var moduleServerPromise, getModuleServer = () => moduleServerPromise, runSequent
24082
24078
  if (storedHash !== undefined && storedHash === fileHash) {
24083
24079
  return;
24084
24080
  }
24085
- const normalizedFilePath = resolve43(filePathInSet);
24081
+ const normalizedFilePath = resolve42(filePathInSet);
24086
24082
  if (!processedFiles.has(normalizedFilePath)) {
24087
24083
  validFiles.push(normalizedFilePath);
24088
24084
  processedFiles.add(normalizedFilePath);
@@ -24220,7 +24216,7 @@ var moduleServerPromise, getModuleServer = () => moduleServerPromise, runSequent
24220
24216
  const publicDir = state.resolvedPaths.publicDir;
24221
24217
  const assetsDir = state.resolvedPaths.assetsDir;
24222
24218
  const handleStaticMirror = async (sourceDir, urlPrefix) => {
24223
- const absSource = resolve43(filePath);
24219
+ const absSource = resolve42(filePath);
24224
24220
  const normalizedSource = absSource.replace(/\\/g, "/");
24225
24221
  const normalizedDir = sourceDir.replace(/\\/g, "/");
24226
24222
  if (!normalizedSource.startsWith(normalizedDir + "/"))
@@ -24228,7 +24224,7 @@ var moduleServerPromise, getModuleServer = () => moduleServerPromise, runSequent
24228
24224
  try {
24229
24225
  const relFromDir = normalizedSource.slice(normalizedDir.length + 1);
24230
24226
  const buildDir = state.resolvedPaths.buildDir;
24231
- const destPath = resolve43(buildDir, urlPrefix ? `${urlPrefix}/${relFromDir}` : relFromDir);
24227
+ const destPath = resolve42(buildDir, urlPrefix ? `${urlPrefix}/${relFromDir}` : relFromDir);
24232
24228
  const { mkdir: mkdir7, copyFile, readFile: readFile6 } = await import("fs/promises");
24233
24229
  const { dirname: dirname28 } = await import("path");
24234
24230
  await mkdir7(dirname28(destPath), { recursive: true });
@@ -24254,7 +24250,7 @@ var moduleServerPromise, getModuleServer = () => moduleServerPromise, runSequent
24254
24250
  if (assetsDir && await handleStaticMirror(assetsDir, "assets"))
24255
24251
  return;
24256
24252
  if (framework === "unknown") {
24257
- invalidate(resolve43(filePath));
24253
+ invalidate(resolve42(filePath));
24258
24254
  const relPath = relative17(process.cwd(), filePath);
24259
24255
  logHmrUpdate(relPath);
24260
24256
  const angularDir = state.resolvedPaths.angularDir;
@@ -24262,10 +24258,10 @@ var moduleServerPromise, getModuleServer = () => moduleServerPromise, runSequent
24262
24258
  if (angularDir && state.dependencyGraph) {
24263
24259
  try {
24264
24260
  const { addFileToGraph: addFileToGraph2 } = await Promise.resolve().then(() => (init_dependencyGraph(), exports_dependencyGraph));
24265
- addFileToGraph2(state.dependencyGraph, resolve43(filePath));
24266
- const affected = getAffectedFiles(state.dependencyGraph, resolve43(filePath));
24261
+ addFileToGraph2(state.dependencyGraph, resolve42(filePath));
24262
+ const affected = getAffectedFiles(state.dependencyGraph, resolve42(filePath));
24267
24263
  for (const dependent of affected) {
24268
- if (dependent === resolve43(filePath))
24264
+ if (dependent === resolve42(filePath))
24269
24265
  continue;
24270
24266
  const dependentFramework = detectFramework(dependent, state.resolvedPaths);
24271
24267
  if (dependentFramework !== "angular")
@@ -24282,14 +24278,14 @@ var moduleServerPromise, getModuleServer = () => moduleServerPromise, runSequent
24282
24278
  } catch {}
24283
24279
  }
24284
24280
  if (!hasAngularDependent) {
24285
- console.log(`[abs:restart] ${resolve43(filePath)}`);
24281
+ console.log(`[abs:restart] ${resolve42(filePath)}`);
24286
24282
  return;
24287
24283
  }
24288
24284
  try {
24289
24285
  const { getFrameworkGeneratedDir: getFrameworkGeneratedDir2 } = await Promise.resolve().then(() => (init_generatedDir(), exports_generatedDir));
24290
24286
  const { invalidateModule: invalidateModuleServer } = await Promise.resolve().then(() => (init_moduleServer(), exports_moduleServer));
24291
24287
  const generatedAngularRoot = getFrameworkGeneratedDir2("angular");
24292
- const sourceAbs = resolve43(filePath).replace(/\\/g, "/");
24288
+ const sourceAbs = resolve42(filePath).replace(/\\/g, "/");
24293
24289
  const generatedTwin = `${generatedAngularRoot.replace(/\\/g, "/")}${sourceAbs.replace(/\.ts$/, ".js")}`;
24294
24290
  invalidateModuleServer(generatedTwin);
24295
24291
  } catch {}
@@ -24323,7 +24319,7 @@ var moduleServerPromise, getModuleServer = () => moduleServerPromise, runSequent
24323
24319
  const userEditedFiles = new Set;
24324
24320
  state.fileChangeQueue.forEach((filePaths) => {
24325
24321
  for (const filePath2 of filePaths) {
24326
- userEditedFiles.add(resolve43(filePath2));
24322
+ userEditedFiles.add(resolve42(filePath2));
24327
24323
  }
24328
24324
  });
24329
24325
  state.lastUserEditedFiles = userEditedFiles;
@@ -24352,7 +24348,7 @@ var moduleServerPromise, getModuleServer = () => moduleServerPromise, runSequent
24352
24348
  }
24353
24349
  if (!graph)
24354
24350
  return componentFile;
24355
- const dependents = graph.dependents.get(resolve43(componentFile));
24351
+ const dependents = graph.dependents.get(resolve42(componentFile));
24356
24352
  if (!dependents)
24357
24353
  return componentFile;
24358
24354
  for (const dep of dependents) {
@@ -24361,7 +24357,7 @@ var moduleServerPromise, getModuleServer = () => moduleServerPromise, runSequent
24361
24357
  }
24362
24358
  return componentFile;
24363
24359
  }, resolveAngularPageEntries = (state, angularFiles, angularPagesPath) => {
24364
- const pageEntries = angularFiles.filter((file5) => file5.endsWith(".ts") && resolve43(file5).startsWith(angularPagesPath));
24360
+ const pageEntries = angularFiles.filter((file5) => file5.endsWith(".ts") && resolve42(file5).startsWith(angularPagesPath));
24365
24361
  if (pageEntries.length > 0 || !state.dependencyGraph) {
24366
24362
  return pageEntries;
24367
24363
  }
@@ -24370,7 +24366,7 @@ var moduleServerPromise, getModuleServer = () => moduleServerPromise, runSequent
24370
24366
  const lookupFile = resolveComponentLookupFile(componentFile, state.dependencyGraph);
24371
24367
  const affected = getAffectedFiles(state.dependencyGraph, lookupFile);
24372
24368
  affected.forEach((file5) => {
24373
- if (file5.endsWith(".ts") && resolve43(file5).startsWith(angularPagesPath)) {
24369
+ if (file5.endsWith(".ts") && resolve42(file5).startsWith(angularPagesPath)) {
24374
24370
  resolvedPages.add(file5);
24375
24371
  }
24376
24372
  });
@@ -24411,8 +24407,8 @@ var moduleServerPromise, getModuleServer = () => moduleServerPromise, runSequent
24411
24407
  if (serverDirs.length <= 1) {
24412
24408
  const dir = getFrameworkGeneratedDir2(framework, projectRoot);
24413
24409
  return {
24414
- serverOutDir: resolve43(resolvedPaths.buildDir, basename14(dir)),
24415
- serverRoot: resolve43(dir, "server")
24410
+ serverOutDir: resolve42(resolvedPaths.buildDir, basename14(dir)),
24411
+ serverRoot: resolve42(dir, "server")
24416
24412
  };
24417
24413
  }
24418
24414
  return {
@@ -24573,8 +24569,8 @@ var moduleServerPromise, getModuleServer = () => moduleServerPromise, runSequent
24573
24569
  if (detected !== "unknown")
24574
24570
  continue;
24575
24571
  try {
24576
- const affected = getAffectedFiles(state.dependencyGraph, resolve43(editedFile));
24577
- const hasAngularConsumer = affected.some((dep) => dep !== resolve43(editedFile) && detectFramework(dep, state.resolvedPaths) === "angular");
24572
+ const affected = getAffectedFiles(state.dependencyGraph, resolve42(editedFile));
24573
+ const hasAngularConsumer = affected.some((dep) => dep !== resolve42(editedFile) && detectFramework(dep, state.resolvedPaths) === "angular");
24578
24574
  if (hasAngularConsumer) {
24579
24575
  return {
24580
24576
  kind: "rebootstrap",
@@ -24621,7 +24617,7 @@ var moduleServerPromise, getModuleServer = () => moduleServerPromise, runSequent
24621
24617
  }
24622
24618
  if (owners.length === 0 && (editedFile.endsWith(".ts") || editedFile.endsWith(".json")) && !editedFile.endsWith(".d.ts")) {
24623
24619
  const normalized = editedFile.replace(/\\/g, "/");
24624
- const angularDirAbs = resolve43(angularDir).replace(/\\/g, "/");
24620
+ const angularDirAbs = resolve42(angularDir).replace(/\\/g, "/");
24625
24621
  if (normalized.startsWith(angularDirAbs + "/")) {
24626
24622
  return {
24627
24623
  kind: "rebootstrap",
@@ -24764,16 +24760,16 @@ var moduleServerPromise, getModuleServer = () => moduleServerPromise, runSequent
24764
24760
  };
24765
24761
  const fire = () => {
24766
24762
  ctx.debounceTimer = null;
24767
- const resolve44 = ctx.debouncedResolve;
24763
+ const resolve43 = ctx.debouncedResolve;
24768
24764
  ctx.debouncedResolve = null;
24769
24765
  ctx.debouncedPromise = null;
24770
24766
  if (ctx.inFlight) {
24771
24767
  ctx.pending = true;
24772
- ctx.inFlight.finally(() => resolve44?.());
24768
+ ctx.inFlight.finally(() => resolve43?.());
24773
24769
  return;
24774
24770
  }
24775
24771
  ctx.inFlight = drive();
24776
- ctx.inFlight.finally(() => resolve44?.());
24772
+ ctx.inFlight.finally(() => resolve43?.());
24777
24773
  };
24778
24774
  return ({ immediate = false } = {}) => {
24779
24775
  if (!ctx.debouncedPromise) {
@@ -24800,9 +24796,9 @@ var moduleServerPromise, getModuleServer = () => moduleServerPromise, runSequent
24800
24796
  const diskRefreshPromise = (async () => {
24801
24797
  if (!angularDir || editedFiles.size === 0)
24802
24798
  return;
24803
- const angularDirAbs = resolve43(angularDir);
24799
+ const angularDirAbs = resolve42(angularDir);
24804
24800
  const filesUnderAngular = Array.from(editedFiles).filter((file5) => {
24805
- const abs = resolve43(file5);
24801
+ const abs = resolve42(file5);
24806
24802
  return abs === angularDirAbs || abs.startsWith(angularDirAbs + sep4);
24807
24803
  });
24808
24804
  if (filesUnderAngular.length === 0)
@@ -24824,7 +24820,7 @@ var moduleServerPromise, getModuleServer = () => moduleServerPromise, runSequent
24824
24820
  if (!ext)
24825
24821
  continue;
24826
24822
  if (ext === ".ts" || ext === ".tsx") {
24827
- tsFilesToRefresh.add(resolve43(file5));
24823
+ tsFilesToRefresh.add(resolve42(file5));
24828
24824
  continue;
24829
24825
  }
24830
24826
  const owners = resolveOwningComponents2({
@@ -24832,7 +24828,7 @@ var moduleServerPromise, getModuleServer = () => moduleServerPromise, runSequent
24832
24828
  userAngularRoot: angularDirAbs
24833
24829
  });
24834
24830
  for (const owner of owners) {
24835
- tsFilesToRefresh.add(resolve43(owner.componentFilePath));
24831
+ tsFilesToRefresh.add(resolve42(owner.componentFilePath));
24836
24832
  }
24837
24833
  }
24838
24834
  if (tsFilesToRefresh.size === 0)
@@ -24847,7 +24843,7 @@ var moduleServerPromise, getModuleServer = () => moduleServerPromise, runSequent
24847
24843
  const { invalidateModule: invalidateModule2 } = await Promise.resolve().then(() => (init_moduleServer(), exports_moduleServer));
24848
24844
  for (const tsFile of tsFilesToRefresh) {
24849
24845
  const rel = relative17(angularDirAbs, tsFile).replace(/\\/g, "/").replace(/\.[tj]sx?$/, ".js");
24850
- const compiledFile = resolve43(compiledRoot, rel);
24846
+ const compiledFile = resolve42(compiledRoot, rel);
24851
24847
  invalidateModule2(compiledFile);
24852
24848
  }
24853
24849
  } catch {}
@@ -24898,7 +24894,7 @@ var moduleServerPromise, getModuleServer = () => moduleServerPromise, runSequent
24898
24894
  serverPaths.forEach((serverPath, idx) => {
24899
24895
  const fileBase = basename14(serverPath, ".js");
24900
24896
  const ssrPath = ssrPaths[idx] ?? serverPath;
24901
- state.manifest[toPascal(fileBase)] = resolve43(ssrPath);
24897
+ state.manifest[toPascal(fileBase)] = resolve42(ssrPath);
24902
24898
  });
24903
24899
  if (clientPaths.length > 0) {
24904
24900
  await bundleAngularClient(state, clientPaths, state.resolvedPaths.buildDir, angularDir);
@@ -24911,9 +24907,9 @@ var moduleServerPromise, getModuleServer = () => moduleServerPromise, runSequent
24911
24907
  const angularDir = config.angularDirectory ?? "";
24912
24908
  const angularFiles = filesToRebuild.filter((file5) => detectFramework(file5, state.resolvedPaths) === "angular");
24913
24909
  for (const file5 of angularFiles) {
24914
- state.fileHashes.set(resolve43(file5), computeFileHash(file5));
24910
+ state.fileHashes.set(resolve42(file5), computeFileHash(file5));
24915
24911
  }
24916
- const angularPagesPath = resolve43(angularDir, "pages");
24912
+ const angularPagesPath = resolve42(angularDir, "pages");
24917
24913
  const pageEntries = resolveAngularPageEntries(state, angularFiles, angularPagesPath);
24918
24914
  const tierStart = performance.now();
24919
24915
  const verdict = await decideAngularTier(state, angularDir);
@@ -24954,11 +24950,11 @@ var moduleServerPromise, getModuleServer = () => moduleServerPromise, runSequent
24954
24950
  if (isComponentFile2)
24955
24951
  return primaryFile;
24956
24952
  const { findNearestComponent: findNearestComponent2 } = await Promise.resolve().then(() => (init_transformCache(), exports_transformCache));
24957
- const nearest = findNearestComponent2(resolve43(primaryFile));
24953
+ const nearest = findNearestComponent2(resolve42(primaryFile));
24958
24954
  return nearest ?? primaryFile;
24959
24955
  }, handleReactModuleServerPath = async (state, reactFiles, startTime, onRebuildComplete) => {
24960
24956
  for (const file5 of reactFiles) {
24961
- state.fileHashes.set(resolve43(file5), computeFileHash(file5));
24957
+ state.fileHashes.set(resolve42(file5), computeFileHash(file5));
24962
24958
  }
24963
24959
  const primaryFile = reactFiles.find((file5) => !file5.replace(/\\/g, "/").includes("/pages/")) ?? reactFiles[0];
24964
24960
  if (!primaryFile) {
@@ -25039,7 +25035,7 @@ var moduleServerPromise, getModuleServer = () => moduleServerPromise, runSequent
25039
25035
  });
25040
25036
  }, handleSvelteModuleServerPath = async (state, svelteFiles, config, startTime, onRebuildComplete) => {
25041
25037
  for (const file5 of svelteFiles) {
25042
- state.fileHashes.set(resolve43(file5), computeFileHash(file5));
25038
+ state.fileHashes.set(resolve42(file5), computeFileHash(file5));
25043
25039
  }
25044
25040
  const serverDuration = Date.now() - startTime;
25045
25041
  await runSequentially(svelteFiles, (changedFile) => broadcastSvelteModuleUpdate(state, changedFile, svelteFiles, serverDuration));
@@ -25286,7 +25282,7 @@ var moduleServerPromise, getModuleServer = () => moduleServerPromise, runSequent
25286
25282
  });
25287
25283
  }, handleVueModuleServerPath = async (state, vueFiles, nonVueFiles, config, startTime, onRebuildComplete) => {
25288
25284
  for (const file5 of [...vueFiles, ...nonVueFiles]) {
25289
- state.fileHashes.set(resolve43(file5), computeFileHash(file5));
25285
+ state.fileHashes.set(resolve42(file5), computeFileHash(file5));
25290
25286
  }
25291
25287
  await invalidateNonVueModules(nonVueFiles);
25292
25288
  const serverDuration = Date.now() - startTime;
@@ -25435,7 +25431,7 @@ var moduleServerPromise, getModuleServer = () => moduleServerPromise, runSequent
25435
25431
  recursive: true,
25436
25432
  withFileTypes: true
25437
25433
  });
25438
- return entries.filter((entry) => entry.isFile() && EMBER_PAGE_EXTENSIONS.some((ext) => entry.name.endsWith(ext))).map((entry) => resolve43(emberPagesPath, entry.name));
25434
+ return entries.filter((entry) => entry.isFile() && EMBER_PAGE_EXTENSIONS.some((ext) => entry.name.endsWith(ext))).map((entry) => resolve42(emberPagesPath, entry.name));
25439
25435
  } catch {
25440
25436
  return [];
25441
25437
  }
@@ -25447,10 +25443,10 @@ var moduleServerPromise, getModuleServer = () => moduleServerPromise, runSequent
25447
25443
  return state.manifest;
25448
25444
  }
25449
25445
  for (const file5 of emberFiles) {
25450
- state.fileHashes.set(resolve43(file5), computeFileHash(file5));
25446
+ state.fileHashes.set(resolve42(file5), computeFileHash(file5));
25451
25447
  }
25452
- const emberPagesPath = resolve43(emberDir, "pages");
25453
- const directPageEntries = emberFiles.filter((file5) => resolve43(file5).startsWith(emberPagesPath));
25448
+ const emberPagesPath = resolve42(emberDir, "pages");
25449
+ const directPageEntries = emberFiles.filter((file5) => resolve42(file5).startsWith(emberPagesPath));
25454
25450
  const allPageEntries = directPageEntries.length > 0 ? directPageEntries : await collectAllEmberPages(emberPagesPath);
25455
25451
  if (allPageEntries.length === 0) {
25456
25452
  onRebuildComplete({ hmrState: state, manifest: state.manifest });
@@ -25460,7 +25456,7 @@ var moduleServerPromise, getModuleServer = () => moduleServerPromise, runSequent
25460
25456
  const { serverPaths } = await compileEmber2(allPageEntries, emberDir, process.cwd(), true);
25461
25457
  for (const serverPath of serverPaths) {
25462
25458
  const fileBase = basename14(serverPath, ".js");
25463
- state.manifest[toPascal(fileBase)] = resolve43(serverPath);
25459
+ state.manifest[toPascal(fileBase)] = resolve42(serverPath);
25464
25460
  }
25465
25461
  const { invalidateEmberSsrCache: invalidateEmberSsrCache2 } = await Promise.resolve().then(() => (init_ember(), exports_ember));
25466
25462
  invalidateEmberSsrCache2();
@@ -25552,8 +25548,8 @@ var moduleServerPromise, getModuleServer = () => moduleServerPromise, runSequent
25552
25548
  if (!buildReference?.source) {
25553
25549
  return;
25554
25550
  }
25555
- const sourcePath = buildReference.source.startsWith("file://") ? new URL(buildReference.source).pathname : resolve43(dirname27(buildInfo.resolvedRegistryPath), buildReference.source);
25556
- islandFiles.add(resolve43(sourcePath));
25551
+ const sourcePath = buildReference.source.startsWith("file://") ? new URL(buildReference.source).pathname : resolve42(dirname27(buildInfo.resolvedRegistryPath), buildReference.source);
25552
+ islandFiles.add(resolve42(sourcePath));
25557
25553
  }, resolveIslandSourceFiles = async (config) => {
25558
25554
  const registryPath = config.islands?.registry;
25559
25555
  if (!registryPath) {
@@ -25561,7 +25557,7 @@ var moduleServerPromise, getModuleServer = () => moduleServerPromise, runSequent
25561
25557
  }
25562
25558
  const buildInfo = await loadIslandRegistryBuildInfo(registryPath);
25563
25559
  const islandFiles = new Set([
25564
- resolve43(buildInfo.resolvedRegistryPath)
25560
+ resolve42(buildInfo.resolvedRegistryPath)
25565
25561
  ]);
25566
25562
  for (const definition of buildInfo.definitions) {
25567
25563
  resolveIslandDefinitionSource(definition, buildInfo, islandFiles);
@@ -25572,7 +25568,7 @@ var moduleServerPromise, getModuleServer = () => moduleServerPromise, runSequent
25572
25568
  if (islandFiles.size === 0) {
25573
25569
  return false;
25574
25570
  }
25575
- return filesToRebuild.some((file5) => islandFiles.has(resolve43(file5)));
25571
+ return filesToRebuild.some((file5) => islandFiles.has(resolve42(file5)));
25576
25572
  }, handleIslandSourceReload = async (state, config, filesToRebuild, manifest) => {
25577
25573
  const shouldReload = await didStaticPagesNeedIslandRefresh(config, filesToRebuild);
25578
25574
  if (!shouldReload) {
@@ -25607,10 +25603,10 @@ var moduleServerPromise, getModuleServer = () => moduleServerPromise, runSequent
25607
25603
  }, computeOutputPagesDir = (state, config, framework) => {
25608
25604
  const isSingle = !config.reactDirectory && !config.svelteDirectory && !config.vueDirectory && (framework === "html" ? !config.htmxDirectory : !config.htmlDirectory);
25609
25605
  if (isSingle) {
25610
- return resolve43(state.resolvedPaths.buildDir, "pages");
25606
+ return resolve42(state.resolvedPaths.buildDir, "pages");
25611
25607
  }
25612
25608
  const dirName = framework === "html" ? basename14(config.htmlDirectory ?? "html") : basename14(config.htmxDirectory ?? "htmx");
25613
- return resolve43(state.resolvedPaths.buildDir, dirName, "pages");
25609
+ return resolve42(state.resolvedPaths.buildDir, dirName, "pages");
25614
25610
  }, processHtmlPageUpdate = async (state, pageFile, builtHtmlPagePath, manifest, duration) => {
25615
25611
  try {
25616
25612
  const { handleHTMLUpdate: handleHTMLUpdate2 } = await Promise.resolve().then(() => (init_simpleHTMLHMR(), exports_simpleHTMLHMR));
@@ -25649,7 +25645,7 @@ var moduleServerPromise, getModuleServer = () => moduleServerPromise, runSequent
25649
25645
  const pageFilesToUpdate = shouldRefreshAllPages ? await scanEntryPoints(outputHtmlPages, "*.html") : htmlPageFiles;
25650
25646
  await runSequentially(pageFilesToUpdate, async (pageFile) => {
25651
25647
  const htmlPageName = basename14(pageFile);
25652
- const builtHtmlPagePath = resolve43(outputHtmlPages, htmlPageName);
25648
+ const builtHtmlPagePath = resolve42(outputHtmlPages, htmlPageName);
25653
25649
  await processHtmlPageUpdate(state, pageFile, builtHtmlPagePath, manifest, duration);
25654
25650
  });
25655
25651
  }, handleVueCssOnlyUpdate = (state, vueCssFiles, manifest, duration) => {
@@ -25714,7 +25710,7 @@ var moduleServerPromise, getModuleServer = () => moduleServerPromise, runSequent
25714
25710
  const cssKey = `${pascalName}CSS`;
25715
25711
  const cssUrl = manifest[cssKey] || null;
25716
25712
  const { vueHmrMetadata: vueHmrMetadata2 } = await Promise.resolve().then(() => (init_compileVue(), exports_compileVue));
25717
- const hmrMeta = vueHmrMetadata2.get(resolve43(vuePagePath));
25713
+ const hmrMeta = vueHmrMetadata2.get(resolve42(vuePagePath));
25718
25714
  const changeType = hmrMeta?.changeType ?? "full";
25719
25715
  if (changeType === "style-only") {
25720
25716
  broadcastVueStyleOnly(state, vuePagePath, baseName, cssUrl, hmrId, manifest, duration);
@@ -25899,7 +25895,7 @@ var moduleServerPromise, getModuleServer = () => moduleServerPromise, runSequent
25899
25895
  const pageFilesToUpdate = shouldRefreshAllPages ? await scanEntryPoints(outputHtmxPages, "*.html") : htmxPageFiles;
25900
25896
  await runSequentially(pageFilesToUpdate, async (htmxPageFile) => {
25901
25897
  const htmxPageName = basename14(htmxPageFile);
25902
- const builtHtmxPagePath = resolve43(outputHtmxPages, htmxPageName);
25898
+ const builtHtmxPagePath = resolve42(outputHtmxPages, htmxPageName);
25903
25899
  await processHtmxPageUpdate(state, htmxPageFile, builtHtmxPagePath, manifest, duration);
25904
25900
  });
25905
25901
  }, collectUpdatedModulePaths = (allModuleUpdates) => {
@@ -26008,7 +26004,7 @@ var moduleServerPromise, getModuleServer = () => moduleServerPromise, runSequent
26008
26004
  html = html.slice(0, bodyClose.index) + hmrScript + html.slice(bodyClose.index);
26009
26005
  writeFs(destPath, html);
26010
26006
  }, processMarkupFileFastPath = async (state, sourceFile, outputDir, framework, startTime, updateAssetPaths2, handleUpdate, readFs, writeFs) => {
26011
- const destPath = resolve43(outputDir, basename14(sourceFile));
26007
+ const destPath = resolve42(outputDir, basename14(sourceFile));
26012
26008
  const hmrScript = extractHmrScript(destPath, readFs);
26013
26009
  const source = await Bun.file(sourceFile).text();
26014
26010
  await Bun.write(destPath, source);
@@ -26150,7 +26146,7 @@ var moduleServerPromise, getModuleServer = () => moduleServerPromise, runSequent
26150
26146
  });
26151
26147
  if (config.tailwind && filesToRebuild && filesToRebuild.some(isTailwindCandidate)) {
26152
26148
  try {
26153
- const outputPath = resolve43(state.resolvedPaths.buildDir, config.tailwind.output);
26149
+ const outputPath = resolve42(state.resolvedPaths.buildDir, config.tailwind.output);
26154
26150
  const bytes = await Bun.file(outputPath).bytes();
26155
26151
  const webPath = `/${config.tailwind.output.replace(/^\/+/, "")}`;
26156
26152
  state.assetStore.set(webPath, bytes);
@@ -26564,7 +26560,7 @@ __export(exports_devBuild, {
26564
26560
  });
26565
26561
  import { readdir as readdir5 } from "fs/promises";
26566
26562
  import { statSync as statSync7 } from "fs";
26567
- import { resolve as resolve44 } from "path";
26563
+ import { resolve as resolve43 } from "path";
26568
26564
  var FRAMEWORK_DIR_KEYS, collectDepVendorSourceDirs = (config) => {
26569
26565
  const configuredDirs = [
26570
26566
  config.reactDirectory,
@@ -26587,7 +26583,7 @@ var FRAMEWORK_DIR_KEYS, collectDepVendorSourceDirs = (config) => {
26587
26583
  return Object.keys(config).length > 0 ? config : null;
26588
26584
  }, reloadConfig = async () => {
26589
26585
  try {
26590
- const configPath2 = resolve44(process.env.ABSOLUTE_CONFIG ?? "absolute.config.ts");
26586
+ const configPath2 = resolve43(process.env.ABSOLUTE_CONFIG ?? "absolute.config.ts");
26591
26587
  const source = await Bun.file(configPath2).text();
26592
26588
  return parseDirectoryConfig(source);
26593
26589
  } catch {
@@ -26694,7 +26690,7 @@ var FRAMEWORK_DIR_KEYS, collectDepVendorSourceDirs = (config) => {
26694
26690
  state.fileChangeQueue.clear();
26695
26691
  }
26696
26692
  }, handleCachedReload = async () => {
26697
- const serverMtime = statSync7(resolve44(Bun.main)).mtimeMs;
26693
+ const serverMtime = statSync7(resolve43(Bun.main)).mtimeMs;
26698
26694
  const lastMtime = globalThis.__hmrServerMtime;
26699
26695
  globalThis.__hmrServerMtime = serverMtime;
26700
26696
  const cached = globalThis.__hmrDevResult;
@@ -26731,8 +26727,8 @@ var FRAMEWORK_DIR_KEYS, collectDepVendorSourceDirs = (config) => {
26731
26727
  return true;
26732
26728
  }, resolveAbsoluteVersion2 = async () => {
26733
26729
  const candidates = [
26734
- resolve44(import.meta.dir, "..", "..", "package.json"),
26735
- resolve44(import.meta.dir, "..", "package.json")
26730
+ resolve43(import.meta.dir, "..", "..", "package.json"),
26731
+ resolve43(import.meta.dir, "..", "package.json")
26736
26732
  ];
26737
26733
  const [candidate, ...remaining] = candidates;
26738
26734
  if (!candidate) {
@@ -26758,7 +26754,7 @@ var FRAMEWORK_DIR_KEYS, collectDepVendorSourceDirs = (config) => {
26758
26754
  const entries = await readdir5(vendorDir).catch(() => emptyStringArray);
26759
26755
  await Promise.all(entries.filter((entry) => entry.endsWith(".js")).map(async (entry) => {
26760
26756
  const webPath = `/${framework}/vendor/${entry}`;
26761
- const bytes = await Bun.file(resolve44(vendorDir, entry)).bytes();
26757
+ const bytes = await Bun.file(resolve43(vendorDir, entry)).bytes();
26762
26758
  assetStore.set(webPath, bytes);
26763
26759
  }));
26764
26760
  }, devBuild = async (config) => {
@@ -26837,11 +26833,11 @@ var FRAMEWORK_DIR_KEYS, collectDepVendorSourceDirs = (config) => {
26837
26833
  cleanStaleAssets(state.assetStore, manifest, state.resolvedPaths.buildDir);
26838
26834
  recordStep("populate asset store", stepStartedAt);
26839
26835
  stepStartedAt = performance.now();
26840
- const reactVendorDir = resolve44(state.resolvedPaths.buildDir, "react", "vendor");
26841
- const angularVendorDir = resolve44(state.resolvedPaths.buildDir, "angular", "vendor");
26842
- const svelteVendorDir = resolve44(state.resolvedPaths.buildDir, "svelte", "vendor");
26843
- const vueVendorDir = resolve44(state.resolvedPaths.buildDir, "vue", "vendor");
26844
- const depVendorDir = resolve44(state.resolvedPaths.buildDir, "vendor");
26836
+ const reactVendorDir = resolve43(state.resolvedPaths.buildDir, "react", "vendor");
26837
+ const angularVendorDir = resolve43(state.resolvedPaths.buildDir, "angular", "vendor");
26838
+ const svelteVendorDir = resolve43(state.resolvedPaths.buildDir, "svelte", "vendor");
26839
+ const vueVendorDir = resolve43(state.resolvedPaths.buildDir, "vue", "vendor");
26840
+ const depVendorDir = resolve43(state.resolvedPaths.buildDir, "vendor");
26845
26841
  const { buildDepVendor: buildDepVendor2 } = await Promise.resolve().then(() => (init_buildDepVendor(), exports_buildDepVendor));
26846
26842
  const [, angularSpecs, , , , , depPaths] = await Promise.all([
26847
26843
  config.reactDirectory ? buildReactVendor(state.resolvedPaths.buildDir) : Promise.resolve(undefined),
@@ -26952,7 +26948,7 @@ var FRAMEWORK_DIR_KEYS, collectDepVendorSourceDirs = (config) => {
26952
26948
  manifest
26953
26949
  };
26954
26950
  globalThis.__hmrDevResult = result;
26955
- globalThis.__hmrServerMtime = statSync7(resolve44(Bun.main)).mtimeMs;
26951
+ globalThis.__hmrServerMtime = statSync7(resolve43(Bun.main)).mtimeMs;
26956
26952
  return result;
26957
26953
  };
26958
26954
  var init_devBuild = __esm(() => {
@@ -27097,8 +27093,8 @@ var STORE_KEY = "__elysiaStore", getGlobalValue = (key) => Reflect.get(globalThi
27097
27093
  return null;
27098
27094
  if (!pathname.startsWith("/"))
27099
27095
  return null;
27100
- const { resolve: resolve45, normalize } = await import("path");
27101
- const candidate = resolve45(buildDir, pathname.slice(1));
27096
+ const { resolve: resolve44, normalize } = await import("path");
27097
+ const candidate = resolve44(buildDir, pathname.slice(1));
27102
27098
  const normalizedBuild = normalize(buildDir);
27103
27099
  if (!candidate.startsWith(normalizedBuild))
27104
27100
  return null;
@@ -27182,12 +27178,12 @@ __export(exports_devtoolsJson, {
27182
27178
  devtoolsJson: () => devtoolsJson
27183
27179
  });
27184
27180
  import { existsSync as existsSync34, mkdirSync as mkdirSync17, readFileSync as readFileSync26, writeFileSync as writeFileSync12 } from "fs";
27185
- import { dirname as dirname28, join as join44, resolve as resolve45 } from "path";
27181
+ import { dirname as dirname28, join as join44, resolve as resolve44 } from "path";
27186
27182
  import { Elysia as Elysia3 } from "elysia";
27187
27183
  var ENDPOINT = "/.well-known/appspecific/com.chrome.devtools.json", UUID_CACHE_KEY = "__absoluteDevtoolsWorkspaceUuid", getGlobalUuid = () => Reflect.get(globalThis, UUID_CACHE_KEY), setGlobalUuid = (uuid) => {
27188
27184
  Reflect.set(globalThis, UUID_CACHE_KEY, uuid);
27189
27185
  return uuid;
27190
- }, 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) => resolve45(uuidCachePath ?? join44(buildDir, ".absolute", "chrome-devtools-workspace-uuid")), readCachedUuid = (cachePath) => {
27186
+ }, 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) => resolve44(uuidCachePath ?? join44(buildDir, ".absolute", "chrome-devtools-workspace-uuid")), readCachedUuid = (cachePath) => {
27191
27187
  if (!existsSync34(cachePath))
27192
27188
  return null;
27193
27189
  try {
@@ -27213,7 +27209,7 @@ var ENDPOINT = "/.well-known/appspecific/com.chrome.devtools.json", UUID_CACHE_K
27213
27209
  writeFileSync12(cachePath, uuid, "utf-8");
27214
27210
  return setGlobalUuid(uuid);
27215
27211
  }, devtoolsJson = (buildDir, options = {}) => {
27216
- const rootPath = resolve45(options.projectRoot ?? process.cwd());
27212
+ const rootPath = resolve44(options.projectRoot ?? process.cwd());
27217
27213
  const root = options.normalizeForWindowsContainer === false ? rootPath : normalizeDevtoolsWorkspaceRoot(rootPath);
27218
27214
  const uuid = getOrCreateUuid(buildDir, options);
27219
27215
  return new Elysia3({ name: "absolute-devtools-json" }).get(ENDPOINT, () => ({
@@ -27242,7 +27238,7 @@ __export(exports_imageOptimizer, {
27242
27238
  imageOptimizer: () => imageOptimizer
27243
27239
  });
27244
27240
  import { existsSync as existsSync35 } from "fs";
27245
- import { resolve as resolve46 } from "path";
27241
+ import { resolve as resolve45 } from "path";
27246
27242
  import { Elysia as Elysia4 } from "elysia";
27247
27243
  var DEFAULT_CACHE_TTL_SECONDS = 60, MS_PER_SECOND = 1000, MAX_QUALITY = 100, avifInProgress, safeResolve = (path, baseDir) => {
27248
27244
  try {
@@ -27255,7 +27251,7 @@ var DEFAULT_CACHE_TTL_SECONDS = 60, MS_PER_SECOND = 1000, MAX_QUALITY = 100, avi
27255
27251
  }
27256
27252
  }, resolveLocalImage = (url, buildDir) => {
27257
27253
  const cleanPath = url.startsWith("/") ? url.slice(1) : url;
27258
- return safeResolve(cleanPath, buildDir) ?? safeResolve(cleanPath, resolve46(process.cwd()));
27254
+ return safeResolve(cleanPath, buildDir) ?? safeResolve(cleanPath, resolve45(process.cwd()));
27259
27255
  }, parseQueryParams = (query, allowedSizes, defaultQuality) => {
27260
27256
  const url = typeof query["url"] === "string" ? query["url"] : undefined;
27261
27257
  const wParam = typeof query["w"] === "string" ? query["w"] : undefined;
@@ -27662,7 +27658,7 @@ __export(exports_serverEntryWatcher, {
27662
27658
  });
27663
27659
  import { existsSync as existsSync38, statSync as statSync8, watch as watch2 } from "fs";
27664
27660
  import { createRequire as createRequire2 } from "module";
27665
- import { dirname as dirname29, join as join48, resolve as resolve48 } from "path";
27661
+ import { dirname as dirname29, join as join48, resolve as resolve47 } from "path";
27666
27662
  var ATOMIC_RECOVERY_WINDOW_MS = 1000, RELOAD_DEBOUNCE_MS = 80, ATOMIC_WRITE_TEMP_PATTERNS2, isAtomicWriteTemp = (filename) => filename.endsWith(".tmp") || filename.includes(".tmp.") || filename.endsWith("~") || filename.startsWith(".#") || ATOMIC_WRITE_TEMP_PATTERNS2.some((re2) => re2.test(filename)), startServerEntryWatcher = () => {
27667
27663
  if (globalThis.__absoluteEntryWatcherStarted)
27668
27664
  return;
@@ -27670,10 +27666,10 @@ var ATOMIC_RECOVERY_WINDOW_MS = 1000, RELOAD_DEBOUNCE_MS = 80, ATOMIC_WRITE_TEMP
27670
27666
  if (!main || !existsSync38(main))
27671
27667
  return;
27672
27668
  globalThis.__absoluteEntryWatcherStarted = true;
27673
- const entryPath = resolve48(main);
27669
+ const entryPath = resolve47(main);
27674
27670
  const entryDir = dirname29(entryPath);
27675
27671
  const entryBase = entryPath.slice(entryDir.length + 1);
27676
- const configPath2 = resolve48(process.env.ABSOLUTE_CONFIG ?? "absolute.config.ts");
27672
+ const configPath2 = resolve47(process.env.ABSOLUTE_CONFIG ?? "absolute.config.ts");
27677
27673
  const configDir2 = dirname29(configPath2);
27678
27674
  const configBase = configPath2.slice(configDir2.length + 1);
27679
27675
  const recentlyHandled = new Map;
@@ -28321,7 +28317,7 @@ var handleHTMXPageRequest = async (pagePath) => {
28321
28317
  // src/core/prepare.ts
28322
28318
  init_loadConfig();
28323
28319
  import { existsSync as existsSync36, readdirSync as readdirSync7, readFileSync as readFileSync28 } from "fs";
28324
- import { basename as basename15, join as join46, relative as relative18, resolve as resolve47 } from "path";
28320
+ import { basename as basename15, join as join46, relative as relative18, resolve as resolve46 } from "path";
28325
28321
  import { Elysia as Elysia5 } from "elysia";
28326
28322
 
28327
28323
  // src/core/loadIslandRegistry.ts
@@ -28683,7 +28679,7 @@ var collectPrewarmFiles = async (prewarmDirs) => {
28683
28679
  for (const { dir, pattern } of prewarmDirs) {
28684
28680
  const glob = new Glob11(pattern);
28685
28681
  const matches = [
28686
- ...glob.scanSync({ absolute: true, cwd: resolve47(dir) })
28682
+ ...glob.scanSync({ absolute: true, cwd: resolve46(dir) })
28687
28683
  ];
28688
28684
  files.push(...matches);
28689
28685
  }
@@ -28719,7 +28715,7 @@ var patchManifestIndexes = (manifest, devIndexDir, SRC_URL_PREFIX2) => {
28719
28715
  const fileName = resolveDevIndexFileName(manifest[key], baseName);
28720
28716
  if (!fileName)
28721
28717
  continue;
28722
- const srcPath = resolve47(devIndexDir, fileName);
28718
+ const srcPath = resolve46(devIndexDir, fileName);
28723
28719
  if (!existsSync36(srcPath))
28724
28720
  continue;
28725
28721
  const rel = relative18(process.cwd(), srcPath).replace(/\\/g, "/");
@@ -28792,7 +28788,7 @@ var prepareDev = async (config, buildDir) => {
28792
28788
  stepStartedAt = performance.now();
28793
28789
  const hmrPlugin = hmr2(result.hmrState, result.manifest, moduleHandler);
28794
28790
  const { devtoolsJson: devtoolsJson2 } = await Promise.resolve().then(() => (init_devtoolsJson(), exports_devtoolsJson));
28795
- const devIndexDir = resolve47(buildDir, "_src_indexes");
28791
+ const devIndexDir = resolve46(buildDir, "_src_indexes");
28796
28792
  patchManifestIndexes(result.manifest, devIndexDir, SRC_URL_PREFIX2);
28797
28793
  recordStep("configure dev plugins", stepStartedAt);
28798
28794
  stepStartedAt = performance.now();
@@ -28884,7 +28880,7 @@ var prepare = async (configOrPath) => {
28884
28880
  recordStep("load config", stepStartedAt);
28885
28881
  const nodeEnv = process.env["NODE_ENV"];
28886
28882
  const isDev3 = nodeEnv === "development";
28887
- const buildDir = resolve47(process.env.ABSOLUTE_BUILD_DIR ?? config.buildDirectory ?? "build");
28883
+ const buildDir = resolve46(process.env.ABSOLUTE_BUILD_DIR ?? config.buildDirectory ?? "build");
28888
28884
  if (isDev3) {
28889
28885
  stepStartedAt = performance.now();
28890
28886
  const result = await prepareDev(config, buildDir);
@@ -29359,7 +29355,7 @@ var generateHeadElement = ({
29359
29355
  // src/utils/defineEnv.ts
29360
29356
  var {env: bunEnv } = globalThis.Bun;
29361
29357
  import { existsSync as existsSync39, readFileSync as readFileSync30 } from "fs";
29362
- import { resolve as resolve49 } from "path";
29358
+ import { resolve as resolve48 } from "path";
29363
29359
 
29364
29360
  // node_modules/@sinclair/typebox/build/esm/type/guard/value.mjs
29365
29361
  var exports_value = {};
@@ -35394,7 +35390,7 @@ ${lines.join(`
35394
35390
  };
35395
35391
  var checkEnvFileSecurity = (properties) => {
35396
35392
  const cwd2 = process.cwd();
35397
- const envPath = resolve49(cwd2, ".env");
35393
+ const envPath = resolve48(cwd2, ".env");
35398
35394
  if (!existsSync39(envPath))
35399
35395
  return;
35400
35396
  const sensitiveKeys = Object.keys(properties).filter(isSensitive);
@@ -35404,7 +35400,7 @@ var checkEnvFileSecurity = (properties) => {
35404
35400
  const presentKeys = sensitiveKeys.filter((key) => envContent.includes(`${key}=`));
35405
35401
  if (presentKeys.length === 0)
35406
35402
  return;
35407
- const gitignorePath = resolve49(cwd2, ".gitignore");
35403
+ const gitignorePath = resolve48(cwd2, ".gitignore");
35408
35404
  if (existsSync39(gitignorePath)) {
35409
35405
  const gitignore = readFileSync30(gitignorePath, "utf-8");
35410
35406
  if (gitignore.split(`
@@ -35647,5 +35643,5 @@ export {
35647
35643
  ANGULAR_INIT_TIMEOUT_MS
35648
35644
  };
35649
35645
 
35650
- //# debugId=192D823B278E9AC264756E2164756E21
35646
+ //# debugId=A84E774203AFCFDB64756E2164756E21
35651
35647
  //# sourceMappingURL=index.js.map