@absolutejs/absolute 0.19.0-beta.981 → 0.19.0-beta.983

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
@@ -6839,7 +6839,6 @@ var initDominoAdapter = (platformServer) => {
6839
6839
  return {
6840
6840
  APP_BASE_HREF: common.APP_BASE_HREF,
6841
6841
  bootstrapApplication: platformBrowser.bootstrapApplication,
6842
- clearResolutionOfComponentResourcesQueue: core.\u{275}clearResolutionOfComponentResourcesQueue,
6843
6842
  DomSanitizer: platformBrowser.DomSanitizer,
6844
6843
  ENVIRONMENT_INITIALIZER: core.ENVIRONMENT_INITIALIZER,
6845
6844
  inject: core.inject,
@@ -7010,7 +7009,6 @@ var routeContextCache, cacheRouteData = (pagePath, data) => {
7010
7009
  }
7011
7010
  return result;
7012
7011
  }, renderAngularApp = async (deps, PageComponent, providers, document2, url = "/") => {
7013
- deps.clearResolutionOfComponentResourcesQueue();
7014
7012
  const bootstrap = (context) => deps.bootstrapApplication(PageComponent, { providers }, context);
7015
7013
  return withSuppressedAngularDevLogs(() => deps.renderApplication(bootstrap, {
7016
7014
  document: document2,
@@ -11861,300 +11859,14 @@ var validateSafePath = (targetPath, baseDirectory) => {
11861
11859
  };
11862
11860
  var init_validateSafePath = () => {};
11863
11861
 
11864
- // src/build/emitAngularProvidersFiles.ts
11865
- import { mkdirSync as mkdirSync8, writeFileSync as writeFileSync8 } from "fs";
11866
- import { dirname as dirname13, join as join23, relative as relative9 } from "path";
11867
- var relativeImportSpecifier = (fromDir, targetAbsPath) => {
11868
- const targetWithoutExt = targetAbsPath.replace(/\.[cm]?[tj]sx?$/, "");
11869
- const rel = relative9(fromDir, targetWithoutExt).replace(/\\/g, "/");
11870
- return rel.startsWith(".") ? rel : `./${rel}`;
11871
- }, buildModuleSpecifier = (importSpec, outputPath) => {
11872
- if (!importSpec.resolvedAbsPath)
11873
- return importSpec.source;
11874
- const outputDir = dirname13(outputPath);
11875
- const rel = relative9(outputDir, importSpec.resolvedAbsPath).replace(/\\/g, "/");
11876
- const withoutExt = rel.replace(/\.[cm]?[tj]sx?$/, "");
11877
- return withoutExt.startsWith(".") ? withoutExt : `./${withoutExt}`;
11878
- }, buildImportLine = (importSpec, outputPath) => {
11879
- const specifier = buildModuleSpecifier(importSpec, outputPath);
11880
- if (importSpec.isDefault) {
11881
- return `import ${importSpec.localName} from "${specifier}";`;
11882
- }
11883
- if (importSpec.importedName === "*") {
11884
- return `import * as ${importSpec.localName} from "${specifier}";`;
11885
- }
11886
- if (importSpec.importedName === importSpec.localName) {
11887
- return `import { ${importSpec.localName} } from "${specifier}";`;
11888
- }
11889
- return `import { ${importSpec.importedName} as ${importSpec.localName} } from "${specifier}";`;
11890
- }, groupImports = (specs) => {
11891
- const bySource = new Map;
11892
- for (const spec of specs) {
11893
- const list = bySource.get(spec.source);
11894
- if (list) {
11895
- if (!list.some((existing) => existing.localName === spec.localName)) {
11896
- list.push(spec);
11897
- }
11898
- } else {
11899
- bySource.set(spec.source, [spec]);
11900
- }
11901
- }
11902
- return [...bySource.values()];
11903
- }, renderImportGroup = (specs, outputPath) => {
11904
- const named = [];
11905
- const standalone = [];
11906
- for (const spec of specs) {
11907
- if (spec.isDefault || spec.importedName === "*") {
11908
- standalone.push(buildImportLine(spec, outputPath));
11909
- } else {
11910
- named.push(spec);
11911
- }
11912
- }
11913
- const lines = [...standalone];
11914
- if (named.length > 0) {
11915
- const specifier = buildModuleSpecifier(named[0], outputPath);
11916
- const fragments = named.map((spec) => spec.importedName === spec.localName ? spec.localName : `${spec.importedName} as ${spec.localName}`);
11917
- lines.push(`import { ${fragments.join(", ")} } from "${specifier}";`);
11918
- }
11919
- return lines.join(`
11920
- `);
11921
- }, ROUTER_FEATURES_DEFAULT, renderFile = (call, outputPath, basePath, pageRoutes, providersImport) => {
11922
- const sections = [];
11923
- sections.push("/* AUTOGENERATED by AbsoluteJS \u2014 see `scanAngularHandlerCalls`. */", "/* eslint-disable */");
11924
- const groups = groupImports(call.providerImports);
11925
- if (groups.length > 0) {
11926
- for (const group of groups) {
11927
- sections.push(renderImportGroup(group, outputPath));
11928
- }
11929
- }
11930
- if (providersImport) {
11931
- const outputDir = dirname13(outputPath);
11932
- const specifier = relativeImportSpecifier(outputDir, providersImport.absolutePath);
11933
- const importClause = providersImport.importedName === providersImport.bindingName ? `{ ${providersImport.bindingName} as __globalProviders }` : `{ ${providersImport.importedName} as __globalProviders }`;
11934
- sections.push(`import ${importClause} from "${specifier}";`);
11935
- }
11936
- if (basePath !== null) {
11937
- sections.push(`import { APP_BASE_HREF } from "@angular/common";`, `const __basePathProvider = { provide: APP_BASE_HREF, useValue: ${JSON.stringify(basePath)} };`);
11938
- }
11939
- if (pageRoutes?.hasRoutes) {
11940
- const routesImport = relativeImportSpecifier(dirname13(outputPath), pageRoutes.pageFile);
11941
- 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(", ")});`);
11942
- }
11943
- const userProvidersExpr = call.providersExpr ?? "[]";
11944
- const fragments = [];
11945
- if (providersImport)
11946
- fragments.push("...__globalProviders");
11947
- if (call.providersExpr !== null)
11948
- fragments.push(`...(${userProvidersExpr})`);
11949
- if (pageRoutes?.hasRoutes)
11950
- fragments.push("__routerProvider");
11951
- if (basePath !== null)
11952
- fragments.push("__basePathProvider");
11953
- const exportExpr = fragments.length === 0 ? "[]" : `[${fragments.join(", ")}]`;
11954
- sections.push(`export const providers = ${exportExpr};`);
11955
- return sections.join(`
11956
-
11957
- `) + `
11958
- `;
11959
- }, deriveBasePath = (mountPath) => {
11960
- if (!mountPath)
11961
- return null;
11962
- if (!mountPath.endsWith("/*"))
11963
- return null;
11964
- const trimmed = mountPath.slice(0, -1);
11965
- return trimmed === "/" ? null : trimmed;
11966
- }, emitAngularProvidersFiles = (projectRoot, calls, pageRoutes, options = {}) => {
11967
- const outputDir = getProvidersOutputDir(projectRoot);
11968
- mkdirSync8(outputDir, { recursive: true });
11969
- const pageRoutesByKey = new Map;
11970
- for (const entry of pageRoutes) {
11971
- pageRoutesByKey.set(entry.manifestKey, entry);
11972
- }
11973
- const emitted = [];
11974
- for (const call of calls) {
11975
- const outputPath = join23(outputDir, `${call.manifestKey}.providers.ts`);
11976
- const basePath = deriveBasePath(call.mountPath);
11977
- const pageRoute = pageRoutesByKey.get(call.manifestKey);
11978
- const content = renderFile(call, outputPath, basePath, pageRoute, options.providersImport ?? null);
11979
- writeFileSync8(outputPath, content, "utf-8");
11980
- emitted.push({
11981
- basePath,
11982
- hasProviders: call.providersExpr !== null,
11983
- manifestKey: call.manifestKey,
11984
- outputPath
11985
- });
11986
- }
11987
- return emitted;
11988
- }, getProvidersOutputDir = (projectRoot) => join23(getFrameworkGeneratedDir("angular", projectRoot), "providers");
11989
- var init_emitAngularProvidersFiles = __esm(() => {
11990
- init_generatedDir();
11991
- ROUTER_FEATURES_DEFAULT = [
11992
- "withComponentInputBinding",
11993
- "withViewTransitions"
11994
- ];
11995
- });
11996
-
11997
- // src/build/emitAngularRouteMounts.ts
11998
- import { mkdirSync as mkdirSync9, writeFileSync as writeFileSync9 } from "fs";
11999
- import { join as join24 } from "path";
12000
- var deriveBasePath2 = (mountPath) => {
12001
- if (!mountPath)
12002
- return null;
12003
- if (!mountPath.endsWith("/*"))
12004
- return null;
12005
- const trimmed = mountPath.slice(0, -1);
12006
- return trimmed === "/" ? null : trimmed;
12007
- }, escapeForRegex = (literal) => literal.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"), mountToPatternSource = (basePath) => {
12008
- const withoutTrailing = basePath.replace(/\/$/, "");
12009
- return `^${escapeForRegex(withoutTrailing)}(\\/|$)`;
12010
- }, getRouteMountsOutputPath = (projectRoot) => join24(getFrameworkGeneratedDir("angular", projectRoot), "route-mounts.ts"), emitAngularRouteMounts = (projectRoot, calls) => {
12011
- const entries = [];
12012
- const seen = new Set;
12013
- for (const call of calls) {
12014
- const basePath = deriveBasePath2(call.mountPath);
12015
- if (!basePath)
12016
- continue;
12017
- if (seen.has(basePath))
12018
- continue;
12019
- seen.add(basePath);
12020
- entries.push({
12021
- basePath,
12022
- patternSource: mountToPatternSource(basePath)
12023
- });
12024
- }
12025
- const outputPath = getRouteMountsOutputPath(projectRoot);
12026
- mkdirSync9(getFrameworkGeneratedDir("angular", projectRoot), {
12027
- recursive: true
12028
- });
12029
- const literal = entries.length === 0 ? "[]" : `[
12030
- ${entries.map((e) => ` { pattern: new RegExp(${JSON.stringify(e.patternSource)}), basePath: ${JSON.stringify(e.basePath)} }`).join(`,
12031
- `)}
12032
- ]`;
12033
- const body = `/* AUTOGENERATED by AbsoluteJS \u2014 see \`emitAngularRouteMounts\`. */
12034
- /* eslint-disable */
12035
- export type AngularRouteMount = { pattern: RegExp; basePath: string };
12036
- export const routeMounts: AngularRouteMount[] = ${literal};
12037
- `;
12038
- writeFileSync9(outputPath, body, "utf-8");
12039
- return outputPath;
12040
- };
12041
- var init_emitAngularRouteMounts = __esm(() => {
12042
- init_generatedDir();
12043
- });
12044
-
12045
- // src/build/parseAngularConfigImports.ts
12046
- var exports_parseAngularConfigImports = {};
12047
- __export(exports_parseAngularConfigImports, {
12048
- parseAngularProvidersImport: () => parseAngularProvidersImport
12049
- });
12050
- import { existsSync as existsSync20, readFileSync as readFileSync14 } from "fs";
12051
- import { dirname as dirname14, isAbsolute as isAbsolute3, join as join25 } from "path";
12052
- import ts6 from "typescript";
12053
- var findDefineConfigCall = (sf) => {
12054
- let result = null;
12055
- const visit = (node) => {
12056
- if (result)
12057
- return;
12058
- if (ts6.isCallExpression(node) && ts6.isIdentifier(node.expression) && node.expression.text === "defineConfig") {
12059
- const [arg] = node.arguments;
12060
- if (arg && ts6.isObjectLiteralExpression(arg)) {
12061
- result = arg;
12062
- return;
12063
- }
12064
- }
12065
- ts6.forEachChild(node, visit);
12066
- };
12067
- ts6.forEachChild(sf, visit);
12068
- return result;
12069
- }, findPropertyInitializer = (object, name) => {
12070
- for (const prop of object.properties) {
12071
- if (!ts6.isPropertyAssignment(prop))
12072
- continue;
12073
- if (!prop.name)
12074
- continue;
12075
- const key = ts6.isIdentifier(prop.name) ? prop.name.text : ts6.isStringLiteral(prop.name) ? prop.name.text : null;
12076
- if (key === name)
12077
- return prop.initializer;
12078
- }
12079
- return null;
12080
- }, findImportForBinding = (sf, binding) => {
12081
- for (const statement of sf.statements) {
12082
- if (!ts6.isImportDeclaration(statement))
12083
- continue;
12084
- if (!ts6.isStringLiteral(statement.moduleSpecifier))
12085
- continue;
12086
- if (statement.importClause?.isTypeOnly)
12087
- continue;
12088
- const named = statement.importClause?.namedBindings;
12089
- if (!named || !ts6.isNamedImports(named))
12090
- continue;
12091
- for (const element of named.elements) {
12092
- if (element.isTypeOnly)
12093
- continue;
12094
- if (element.name.text === binding) {
12095
- return {
12096
- importedName: element.propertyName?.text ?? element.name.text,
12097
- source: statement.moduleSpecifier.text
12098
- };
12099
- }
12100
- }
12101
- }
12102
- return null;
12103
- }, resolveConfigPath = (projectRoot) => {
12104
- const candidates = [
12105
- join25(projectRoot, "absolute.config.ts"),
12106
- join25(projectRoot, "absolute.config.mts"),
12107
- join25(projectRoot, "absolute.config.js"),
12108
- join25(projectRoot, "absolute.config.mjs")
12109
- ];
12110
- for (const candidate of candidates) {
12111
- if (existsSync20(candidate))
12112
- return candidate;
12113
- }
12114
- return null;
12115
- }, parseAngularProvidersImport = (projectRoot) => {
12116
- const configPath2 = resolveConfigPath(projectRoot);
12117
- if (!configPath2)
12118
- return null;
12119
- const source = readFileSync14(configPath2, "utf-8");
12120
- if (!source.includes("angular"))
12121
- return null;
12122
- if (!source.includes("providers"))
12123
- return null;
12124
- const sf = ts6.createSourceFile(configPath2, source, ts6.ScriptTarget.Latest, true, ts6.ScriptKind.TS);
12125
- const configObject = findDefineConfigCall(sf);
12126
- if (!configObject)
12127
- return null;
12128
- const angularField = findPropertyInitializer(configObject, "angular");
12129
- if (!angularField || !ts6.isObjectLiteralExpression(angularField))
12130
- return null;
12131
- const providersField = findPropertyInitializer(angularField, "providers");
12132
- if (!providersField)
12133
- return null;
12134
- if (!ts6.isIdentifier(providersField))
12135
- return null;
12136
- const binding = providersField.text;
12137
- const importInfo = findImportForBinding(sf, binding);
12138
- if (!importInfo)
12139
- return null;
12140
- const configDir2 = dirname14(configPath2);
12141
- const absolutePath = importInfo.source.startsWith(".") ? join25(configDir2, importInfo.source).replace(/\.[cm]?[tj]sx?$/, "") : isAbsolute3(importInfo.source) ? importInfo.source.replace(/\.[cm]?[tj]sx?$/, "") : importInfo.source;
12142
- return {
12143
- absolutePath,
12144
- bindingName: binding,
12145
- importedName: importInfo.importedName
12146
- };
12147
- };
12148
- var init_parseAngularConfigImports = () => {};
12149
-
12150
11862
  // src/build/scanAngularHandlerCalls.ts
12151
- import { readdirSync as readdirSync2, readFileSync as readFileSync15 } from "fs";
12152
- import { dirname as dirname15, isAbsolute as isAbsolute4, join as join26, resolve as resolve22 } from "path";
12153
- import ts7 from "typescript";
11863
+ import { readdirSync as readdirSync2, readFileSync as readFileSync14 } from "fs";
11864
+ import { dirname as dirname13, isAbsolute as isAbsolute3, join as join23, resolve as resolve22 } from "path";
11865
+ import ts6 from "typescript";
12154
11866
  var ELYSIA_ROUTE_METHODS2, SKIP_DIRS2, SOURCE_EXTENSIONS2, getScriptKind2 = (filePath) => {
12155
11867
  if (filePath.endsWith(".tsx"))
12156
- return ts7.ScriptKind.TSX;
12157
- return ts7.ScriptKind.TS;
11868
+ return ts6.ScriptKind.TSX;
11869
+ return ts6.ScriptKind.TS;
12158
11870
  }, hasSourceExtension2 = (filePath) => {
12159
11871
  const idx = filePath.lastIndexOf(".");
12160
11872
  if (idx === -1)
@@ -12182,16 +11894,16 @@ var ELYSIA_ROUTE_METHODS2, SKIP_DIRS2, SOURCE_EXTENSIONS2, getScriptKind2 = (fil
12182
11894
  continue;
12183
11895
  if (entry.name.startsWith("."))
12184
11896
  continue;
12185
- stack.push(join26(dir, entry.name));
11897
+ stack.push(join23(dir, entry.name));
12186
11898
  } else if (entry.isFile() && hasSourceExtension2(entry.name)) {
12187
- out.push(join26(dir, entry.name));
11899
+ out.push(join23(dir, entry.name));
12188
11900
  }
12189
11901
  }
12190
11902
  }
12191
11903
  return out;
12192
11904
  }, fileMayContainAngularHandler = (source) => source.includes("handleAngularPageRequest"), collectFileImports = (sf, filePath) => {
12193
11905
  const map = new Map;
12194
- const fileDir = dirname15(filePath);
11906
+ const fileDir = dirname13(filePath);
12195
11907
  const recordSpec = (localName, spec) => {
12196
11908
  map.set(localName, spec);
12197
11909
  };
@@ -12199,15 +11911,15 @@ var ELYSIA_ROUTE_METHODS2, SKIP_DIRS2, SOURCE_EXTENSIONS2, getScriptKind2 = (fil
12199
11911
  if (specifier.startsWith(".")) {
12200
11912
  return resolve22(fileDir, specifier);
12201
11913
  }
12202
- if (isAbsolute4(specifier)) {
11914
+ if (isAbsolute3(specifier)) {
12203
11915
  return specifier;
12204
11916
  }
12205
11917
  return null;
12206
11918
  };
12207
11919
  for (const statement of sf.statements) {
12208
- if (!ts7.isImportDeclaration(statement))
11920
+ if (!ts6.isImportDeclaration(statement))
12209
11921
  continue;
12210
- if (!ts7.isStringLiteral(statement.moduleSpecifier))
11922
+ if (!ts6.isStringLiteral(statement.moduleSpecifier))
12211
11923
  continue;
12212
11924
  if (statement.importClause?.isTypeOnly)
12213
11925
  continue;
@@ -12228,7 +11940,7 @@ var ELYSIA_ROUTE_METHODS2, SKIP_DIRS2, SOURCE_EXTENSIONS2, getScriptKind2 = (fil
12228
11940
  const bindings = clause.namedBindings;
12229
11941
  if (!bindings)
12230
11942
  continue;
12231
- if (ts7.isNamespaceImport(bindings)) {
11943
+ if (ts6.isNamespaceImport(bindings)) {
12232
11944
  recordSpec(bindings.name.text, {
12233
11945
  importedName: "*",
12234
11946
  isDefault: false,
@@ -12256,38 +11968,38 @@ var ELYSIA_ROUTE_METHODS2, SKIP_DIRS2, SOURCE_EXTENSIONS2, getScriptKind2 = (fil
12256
11968
  }, collectExpressionIdentifiers = (expr) => {
12257
11969
  const out = new Set;
12258
11970
  const visit = (node) => {
12259
- if (ts7.isIdentifier(node)) {
11971
+ if (ts6.isIdentifier(node)) {
12260
11972
  out.add(node.text);
12261
11973
  return;
12262
11974
  }
12263
- if (ts7.isPropertyAccessExpression(node)) {
11975
+ if (ts6.isPropertyAccessExpression(node)) {
12264
11976
  visit(node.expression);
12265
11977
  return;
12266
11978
  }
12267
- ts7.forEachChild(node, visit);
11979
+ ts6.forEachChild(node, visit);
12268
11980
  };
12269
11981
  visit(expr);
12270
11982
  return out;
12271
11983
  }, extractManifestKey = (pagePathValue) => {
12272
- if (!ts7.isCallExpression(pagePathValue))
11984
+ if (!ts6.isCallExpression(pagePathValue))
12273
11985
  return null;
12274
11986
  const callee = pagePathValue.expression;
12275
- if (!ts7.isIdentifier(callee) || callee.text !== "asset")
11987
+ if (!ts6.isIdentifier(callee) || callee.text !== "asset")
12276
11988
  return null;
12277
11989
  const [, second] = pagePathValue.arguments;
12278
11990
  if (!second)
12279
11991
  return null;
12280
- if (!ts7.isStringLiteral(second))
11992
+ if (!ts6.isStringLiteral(second))
12281
11993
  return null;
12282
11994
  return second.text;
12283
11995
  }, findEnclosingMountPath = (node) => {
12284
11996
  let cursor = node.parent;
12285
11997
  while (cursor) {
12286
- if (ts7.isCallExpression(cursor)) {
11998
+ if (ts6.isCallExpression(cursor)) {
12287
11999
  const callee = cursor.expression;
12288
- if (ts7.isPropertyAccessExpression(callee) && ts7.isIdentifier(callee.name) && ELYSIA_ROUTE_METHODS2.has(callee.name.text)) {
12000
+ if (ts6.isPropertyAccessExpression(callee) && ts6.isIdentifier(callee.name) && ELYSIA_ROUTE_METHODS2.has(callee.name.text)) {
12289
12001
  const firstArg = cursor.arguments[0];
12290
- if (firstArg && ts7.isStringLiteral(firstArg) && firstArg.text.startsWith("/")) {
12002
+ if (firstArg && ts6.isStringLiteral(firstArg) && firstArg.text.startsWith("/")) {
12291
12003
  return firstArg.text;
12292
12004
  }
12293
12005
  }
@@ -12298,37 +12010,37 @@ var ELYSIA_ROUTE_METHODS2, SKIP_DIRS2, SOURCE_EXTENSIONS2, getScriptKind2 = (fil
12298
12010
  }, extractCallsFromFile = (filePath, out) => {
12299
12011
  let source;
12300
12012
  try {
12301
- source = readFileSync15(filePath, "utf-8");
12013
+ source = readFileSync14(filePath, "utf-8");
12302
12014
  } catch {
12303
12015
  return;
12304
12016
  }
12305
12017
  if (!fileMayContainAngularHandler(source))
12306
12018
  return;
12307
- const sf = ts7.createSourceFile(filePath, source, ts7.ScriptTarget.Latest, true, getScriptKind2(filePath));
12019
+ const sf = ts6.createSourceFile(filePath, source, ts6.ScriptTarget.Latest, true, getScriptKind2(filePath));
12308
12020
  const imports = collectFileImports(sf, filePath);
12309
12021
  const visit = (node) => {
12310
- if (ts7.isCallExpression(node) && ts7.isIdentifier(node.expression) && node.expression.text === "handleAngularPageRequest") {
12022
+ if (ts6.isCallExpression(node) && ts6.isIdentifier(node.expression) && node.expression.text === "handleAngularPageRequest") {
12311
12023
  const [arg] = node.arguments;
12312
- if (arg && ts7.isObjectLiteralExpression(arg)) {
12024
+ if (arg && ts6.isObjectLiteralExpression(arg)) {
12313
12025
  let manifestKey = null;
12314
12026
  let providersExpr = null;
12315
12027
  for (const prop of arg.properties) {
12316
- if (ts7.isPropertyAssignment(prop)) {
12028
+ if (ts6.isPropertyAssignment(prop)) {
12317
12029
  if (!prop.name)
12318
12030
  continue;
12319
- const name = ts7.isIdentifier(prop.name) ? prop.name.text : ts7.isStringLiteral(prop.name) ? prop.name.text : null;
12031
+ const name = ts6.isIdentifier(prop.name) ? prop.name.text : ts6.isStringLiteral(prop.name) ? prop.name.text : null;
12320
12032
  if (name === "pagePath") {
12321
12033
  manifestKey = extractManifestKey(prop.initializer);
12322
12034
  } else if (name === "providers") {
12323
12035
  providersExpr = prop.initializer;
12324
12036
  }
12325
- } else if (ts7.isSpreadAssignment(prop)) {
12037
+ } else if (ts6.isSpreadAssignment(prop)) {
12326
12038
  if (manifestKey)
12327
12039
  continue;
12328
12040
  const spreadExpr = prop.expression;
12329
- if (ts7.isCallExpression(spreadExpr) && spreadExpr.arguments.length > 0) {
12041
+ if (ts6.isCallExpression(spreadExpr) && spreadExpr.arguments.length > 0) {
12330
12042
  const [firstArg] = spreadExpr.arguments;
12331
- if (firstArg && ts7.isStringLiteral(firstArg)) {
12043
+ if (firstArg && ts6.isStringLiteral(firstArg)) {
12332
12044
  manifestKey = firstArg.text;
12333
12045
  }
12334
12046
  }
@@ -12356,9 +12068,9 @@ var ELYSIA_ROUTE_METHODS2, SKIP_DIRS2, SOURCE_EXTENSIONS2, getScriptKind2 = (fil
12356
12068
  }
12357
12069
  }
12358
12070
  }
12359
- ts7.forEachChild(node, visit);
12071
+ ts6.forEachChild(node, visit);
12360
12072
  };
12361
- ts7.forEachChild(sf, visit);
12073
+ ts6.forEachChild(sf, visit);
12362
12074
  }, scanAngularHandlerCalls = (projectRoot) => {
12363
12075
  const files = collectSourceFiles2(projectRoot);
12364
12076
  const collected = [];
@@ -12394,9 +12106,9 @@ var init_scanAngularHandlerCalls = __esm(() => {
12394
12106
  });
12395
12107
 
12396
12108
  // src/build/scanAngularPageRoutes.ts
12397
- import { readdirSync as readdirSync3, readFileSync as readFileSync16 } from "fs";
12398
- import { basename as basename6, join as join27 } from "path";
12399
- import ts8 from "typescript";
12109
+ import { readdirSync as readdirSync3, readFileSync as readFileSync15 } from "fs";
12110
+ import { basename as basename6, join as join24 } from "path";
12111
+ import ts7 from "typescript";
12400
12112
  var SOURCE_EXTENSIONS3, SKIP_DIRS3, hasSourceExtension3 = (filePath) => {
12401
12113
  const idx = filePath.lastIndexOf(".");
12402
12114
  if (idx === -1)
@@ -12435,9 +12147,9 @@ var SOURCE_EXTENSIONS3, SKIP_DIRS3, hasSourceExtension3 = (filePath) => {
12435
12147
  continue;
12436
12148
  if (entry.name.startsWith("."))
12437
12149
  continue;
12438
- stack.push(join27(dir, entry.name));
12150
+ stack.push(join24(dir, entry.name));
12439
12151
  } else if (entry.isFile() && isPageFile(entry.name)) {
12440
- out.push(join27(dir, entry.name));
12152
+ out.push(join24(dir, entry.name));
12441
12153
  }
12442
12154
  }
12443
12155
  }
@@ -12445,15 +12157,15 @@ var SOURCE_EXTENSIONS3, SKIP_DIRS3, hasSourceExtension3 = (filePath) => {
12445
12157
  }, hasTopLevelRoutesExport = (source, filePath) => {
12446
12158
  if (!source.includes("routes"))
12447
12159
  return false;
12448
- const sf = ts8.createSourceFile(filePath, source, ts8.ScriptTarget.Latest, true, ts8.ScriptKind.TS);
12160
+ const sf = ts7.createSourceFile(filePath, source, ts7.ScriptTarget.Latest, true, ts7.ScriptKind.TS);
12449
12161
  for (const statement of sf.statements) {
12450
- if (!ts8.isVariableStatement(statement))
12162
+ if (!ts7.isVariableStatement(statement))
12451
12163
  continue;
12452
- const isExported = statement.modifiers?.some((modifier) => modifier.kind === ts8.SyntaxKind.ExportKeyword);
12164
+ const isExported = statement.modifiers?.some((modifier) => modifier.kind === ts7.SyntaxKind.ExportKeyword);
12453
12165
  if (!isExported)
12454
12166
  continue;
12455
12167
  for (const declaration of statement.declarationList.declarations) {
12456
- if (!ts8.isIdentifier(declaration.name))
12168
+ if (!ts7.isIdentifier(declaration.name))
12457
12169
  continue;
12458
12170
  if (declaration.name.text === "routes")
12459
12171
  return true;
@@ -12466,7 +12178,7 @@ var SOURCE_EXTENSIONS3, SKIP_DIRS3, hasSourceExtension3 = (filePath) => {
12466
12178
  for (const file2 of files) {
12467
12179
  let source;
12468
12180
  try {
12469
- source = readFileSync16(file2, "utf-8");
12181
+ source = readFileSync15(file2, "utf-8");
12470
12182
  } catch {
12471
12183
  continue;
12472
12184
  }
@@ -12499,27 +12211,120 @@ var exports_runAngularHandlerScan = {};
12499
12211
  __export(exports_runAngularHandlerScan, {
12500
12212
  runAngularHandlerScan: () => runAngularHandlerScan
12501
12213
  });
12502
- var runAngularHandlerScan = (projectRoot, angularDirectory) => {
12503
- const calls = scanAngularHandlerCalls(projectRoot);
12504
- const pageRoutes = scanAngularPageRoutes(angularDirectory);
12505
- const providersImport = parseAngularProvidersImport(projectRoot);
12506
- const providersFiles = emitAngularProvidersFiles(projectRoot, calls, pageRoutes, { providersImport });
12507
- emitAngularRouteMounts(projectRoot, calls);
12508
- return {
12509
- calls,
12510
- manifestKeysWithProviders: new Set(providersFiles.map((file2) => file2.manifestKey)),
12511
- pageRoutes,
12512
- providersFiles
12513
- };
12514
- };
12214
+ var runAngularHandlerScan = (projectRoot, angularDirectory) => ({
12215
+ calls: scanAngularHandlerCalls(projectRoot),
12216
+ pageRoutes: scanAngularPageRoutes(angularDirectory)
12217
+ });
12515
12218
  var init_runAngularHandlerScan = __esm(() => {
12516
- init_emitAngularProvidersFiles();
12517
- init_emitAngularRouteMounts();
12518
- init_parseAngularConfigImports();
12519
12219
  init_scanAngularHandlerCalls();
12520
12220
  init_scanAngularPageRoutes();
12521
12221
  });
12522
12222
 
12223
+ // src/build/parseAngularConfigImports.ts
12224
+ var exports_parseAngularConfigImports = {};
12225
+ __export(exports_parseAngularConfigImports, {
12226
+ parseAngularProvidersImport: () => parseAngularProvidersImport
12227
+ });
12228
+ import { existsSync as existsSync20, readFileSync as readFileSync16 } from "fs";
12229
+ import { dirname as dirname14, isAbsolute as isAbsolute4, join as join25 } from "path";
12230
+ import ts8 from "typescript";
12231
+ var findDefineConfigCall = (sf) => {
12232
+ let result = null;
12233
+ const visit = (node) => {
12234
+ if (result)
12235
+ return;
12236
+ if (ts8.isCallExpression(node) && ts8.isIdentifier(node.expression) && node.expression.text === "defineConfig") {
12237
+ const [arg] = node.arguments;
12238
+ if (arg && ts8.isObjectLiteralExpression(arg)) {
12239
+ result = arg;
12240
+ return;
12241
+ }
12242
+ }
12243
+ ts8.forEachChild(node, visit);
12244
+ };
12245
+ ts8.forEachChild(sf, visit);
12246
+ return result;
12247
+ }, findPropertyInitializer = (object, name) => {
12248
+ for (const prop of object.properties) {
12249
+ if (!ts8.isPropertyAssignment(prop))
12250
+ continue;
12251
+ if (!prop.name)
12252
+ continue;
12253
+ const key = ts8.isIdentifier(prop.name) ? prop.name.text : ts8.isStringLiteral(prop.name) ? prop.name.text : null;
12254
+ if (key === name)
12255
+ return prop.initializer;
12256
+ }
12257
+ return null;
12258
+ }, findImportForBinding = (sf, binding) => {
12259
+ for (const statement of sf.statements) {
12260
+ if (!ts8.isImportDeclaration(statement))
12261
+ continue;
12262
+ if (!ts8.isStringLiteral(statement.moduleSpecifier))
12263
+ continue;
12264
+ if (statement.importClause?.isTypeOnly)
12265
+ continue;
12266
+ const named = statement.importClause?.namedBindings;
12267
+ if (!named || !ts8.isNamedImports(named))
12268
+ continue;
12269
+ for (const element of named.elements) {
12270
+ if (element.isTypeOnly)
12271
+ continue;
12272
+ if (element.name.text === binding) {
12273
+ return {
12274
+ importedName: element.propertyName?.text ?? element.name.text,
12275
+ source: statement.moduleSpecifier.text
12276
+ };
12277
+ }
12278
+ }
12279
+ }
12280
+ return null;
12281
+ }, resolveConfigPath = (projectRoot) => {
12282
+ const candidates = [
12283
+ join25(projectRoot, "absolute.config.ts"),
12284
+ join25(projectRoot, "absolute.config.mts"),
12285
+ join25(projectRoot, "absolute.config.js"),
12286
+ join25(projectRoot, "absolute.config.mjs")
12287
+ ];
12288
+ for (const candidate of candidates) {
12289
+ if (existsSync20(candidate))
12290
+ return candidate;
12291
+ }
12292
+ return null;
12293
+ }, parseAngularProvidersImport = (projectRoot) => {
12294
+ const configPath2 = resolveConfigPath(projectRoot);
12295
+ if (!configPath2)
12296
+ return null;
12297
+ const source = readFileSync16(configPath2, "utf-8");
12298
+ if (!source.includes("angular"))
12299
+ return null;
12300
+ if (!source.includes("providers"))
12301
+ return null;
12302
+ const sf = ts8.createSourceFile(configPath2, source, ts8.ScriptTarget.Latest, true, ts8.ScriptKind.TS);
12303
+ const configObject = findDefineConfigCall(sf);
12304
+ if (!configObject)
12305
+ return null;
12306
+ const angularField = findPropertyInitializer(configObject, "angular");
12307
+ if (!angularField || !ts8.isObjectLiteralExpression(angularField))
12308
+ return null;
12309
+ const providersField = findPropertyInitializer(angularField, "providers");
12310
+ if (!providersField)
12311
+ return null;
12312
+ if (!ts8.isIdentifier(providersField))
12313
+ return null;
12314
+ const binding = providersField.text;
12315
+ const importInfo = findImportForBinding(sf, binding);
12316
+ if (!importInfo)
12317
+ return null;
12318
+ const configDir2 = dirname14(configPath2);
12319
+ const absolutePath = importInfo.source.startsWith(".") ? join25(configDir2, importInfo.source).replace(/\.[cm]?[tj]sx?$/, "") : isAbsolute4(importInfo.source) ? importInfo.source.replace(/\.[cm]?[tj]sx?$/, "") : importInfo.source;
12320
+ return {
12321
+ absolutePath,
12322
+ bindingName: binding,
12323
+ importedName: importInfo.importedName
12324
+ };
12325
+ };
12326
+ var init_parseAngularConfigImports = () => {};
12327
+
12523
12328
  // src/svelte/renderToReadableStream.ts
12524
12329
  var exports_renderToReadableStream = {};
12525
12330
  __export(exports_renderToReadableStream, {
@@ -12585,12 +12390,12 @@ __export(exports_compileSvelte, {
12585
12390
  import { existsSync as existsSync21 } from "fs";
12586
12391
  import { mkdir as mkdir4, stat as stat2 } from "fs/promises";
12587
12392
  import {
12588
- dirname as dirname16,
12589
- join as join28,
12393
+ dirname as dirname15,
12394
+ join as join26,
12590
12395
  basename as basename7,
12591
12396
  extname as extname5,
12592
12397
  resolve as resolve23,
12593
- relative as relative10,
12398
+ relative as relative9,
12594
12399
  sep as sep2
12595
12400
  } from "path";
12596
12401
  import { env as env2 } from "process";
@@ -12634,7 +12439,7 @@ var resolveDevClientDir2 = () => {
12634
12439
  }, resolveRelativeModule2 = async (spec, from) => {
12635
12440
  if (!spec.startsWith("."))
12636
12441
  return null;
12637
- const basePath = resolve23(dirname16(from), spec);
12442
+ const basePath = resolve23(dirname15(from), spec);
12638
12443
  const candidates = [
12639
12444
  basePath,
12640
12445
  `${basePath}.ts`,
@@ -12645,14 +12450,14 @@ var resolveDevClientDir2 = () => {
12645
12450
  `${basePath}.svelte`,
12646
12451
  `${basePath}.svelte.ts`,
12647
12452
  `${basePath}.svelte.js`,
12648
- join28(basePath, "index.ts"),
12649
- join28(basePath, "index.js"),
12650
- join28(basePath, "index.mjs"),
12651
- join28(basePath, "index.cjs"),
12652
- join28(basePath, "index.json"),
12653
- join28(basePath, "index.svelte"),
12654
- join28(basePath, "index.svelte.ts"),
12655
- join28(basePath, "index.svelte.js")
12453
+ join26(basePath, "index.ts"),
12454
+ join26(basePath, "index.js"),
12455
+ join26(basePath, "index.mjs"),
12456
+ join26(basePath, "index.cjs"),
12457
+ join26(basePath, "index.json"),
12458
+ join26(basePath, "index.svelte"),
12459
+ join26(basePath, "index.svelte.ts"),
12460
+ join26(basePath, "index.svelte.js")
12656
12461
  ];
12657
12462
  const checks = await Promise.all(candidates.map(exists));
12658
12463
  return candidates.find((_2, index) => checks[index]) ?? null;
@@ -12661,7 +12466,7 @@ var resolveDevClientDir2 = () => {
12661
12466
  const resolved = resolvePackageImport(spec);
12662
12467
  return resolved && /\.svelte(\.(?:ts|js))?$/.test(resolved) ? resolved : null;
12663
12468
  }
12664
- const basePath = resolve23(dirname16(from), spec);
12469
+ const basePath = resolve23(dirname15(from), spec);
12665
12470
  const explicit = /\.(svelte|svelte\.(?:ts|js))$/.test(basePath);
12666
12471
  if (!explicit) {
12667
12472
  const extensions = [".svelte", ".svelte.ts", ".svelte.js"];
@@ -12682,8 +12487,8 @@ var resolveDevClientDir2 = () => {
12682
12487
  return jsPath;
12683
12488
  return null;
12684
12489
  }, addModuleRewrite = (rewrites, rawSpec, resolvedModule, ssrOutputDir, clientOutputDir) => {
12685
- const toServer = relative10(ssrOutputDir, resolvedModule).replace(/\\/g, "/");
12686
- const toClient = relative10(clientOutputDir, resolvedModule).replace(/\\/g, "/");
12490
+ const toServer = relative9(ssrOutputDir, resolvedModule).replace(/\\/g, "/");
12491
+ const toClient = relative9(clientOutputDir, resolvedModule).replace(/\\/g, "/");
12687
12492
  rewrites.set(rawSpec, {
12688
12493
  client: toClient.startsWith(".") || toClient.startsWith("/") ? toClient : `./${toClient}`,
12689
12494
  server: toServer.startsWith(".") ? toServer : `./${toServer}`
@@ -12691,9 +12496,9 @@ var resolveDevClientDir2 = () => {
12691
12496
  }, compileSvelte = async (entryPoints, svelteRoot, cache = new Map, isDev2 = false, stylePreprocessors) => {
12692
12497
  const { compile, compileModule, preprocess } = await import("svelte/compiler");
12693
12498
  const generatedDir = getFrameworkGeneratedDir("svelte");
12694
- const clientDir = join28(generatedDir, "client");
12695
- const indexDir = join28(generatedDir, "indexes");
12696
- const serverDir = join28(generatedDir, "server");
12499
+ const clientDir = join26(generatedDir, "client");
12500
+ const indexDir = join26(generatedDir, "indexes");
12501
+ const serverDir = join26(generatedDir, "server");
12697
12502
  await Promise.all([clientDir, indexDir, serverDir].map((dir) => mkdir4(dir, { recursive: true })));
12698
12503
  const dev = env2.NODE_ENV !== "production";
12699
12504
  const build2 = async (src) => {
@@ -12721,8 +12526,8 @@ var resolveDevClientDir2 = () => {
12721
12526
  const preprocessedClient = isModule ? loweredClientSource.code : (await preprocess(loweredClientSource.code, svelteStylePreprocessor)).code;
12722
12527
  const transpiledServer = src.endsWith(".ts") || src.endsWith(".svelte.ts") ? transpiler3.transformSync(preprocessedServer) : preprocessedServer;
12723
12528
  const transpiledClient = src.endsWith(".ts") || src.endsWith(".svelte.ts") ? transpiler3.transformSync(preprocessedClient) : preprocessedClient;
12724
- const rawRel = dirname16(relative10(svelteRoot, src)).replace(/\\/g, "/");
12725
- const relDir = rawRel.startsWith("..") ? `_ext/${relative10(process.cwd(), dirname16(src)).replace(/\\/g, "/")}` : rawRel;
12529
+ const rawRel = dirname15(relative9(svelteRoot, src)).replace(/\\/g, "/");
12530
+ const relDir = rawRel.startsWith("..") ? `_ext/${relative9(process.cwd(), dirname15(src)).replace(/\\/g, "/")}` : rawRel;
12726
12531
  const baseName = basename7(src).replace(/\.svelte(\.(ts|js))?$/, "");
12727
12532
  const importPaths = Array.from(transpiledServer.matchAll(/from\s+['"]([^'"]+)['"]/g)).map((match) => match[1]).filter((path) => path !== undefined);
12728
12533
  const resolvedModuleImports = await Promise.all(importPaths.map((importPath) => resolveRelativeModule2(importPath, src)));
@@ -12731,8 +12536,8 @@ var resolveDevClientDir2 = () => {
12731
12536
  const childBuilt = await Promise.all(childSources.map((child) => build2(child)));
12732
12537
  const hasAwaitSlotFromChildren = childBuilt.some((child) => child.hasAwaitSlot);
12733
12538
  const externalRewrites = new Map;
12734
- const ssrOutputDir = dirname16(join28(serverDir, relDir, `${baseName}.js`));
12735
- const clientOutputDir = dirname16(join28(clientDir, relDir, `${baseName}.js`));
12539
+ const ssrOutputDir = dirname15(join26(serverDir, relDir, `${baseName}.js`));
12540
+ const clientOutputDir = dirname15(join26(clientDir, relDir, `${baseName}.js`));
12736
12541
  for (let idx = 0;idx < importPaths.length; idx++) {
12737
12542
  const rawSpec = importPaths[idx];
12738
12543
  if (!rawSpec)
@@ -12743,15 +12548,15 @@ var resolveDevClientDir2 = () => {
12743
12548
  addModuleRewrite(externalRewrites, rawSpec, resolvedModule, ssrOutputDir, clientOutputDir);
12744
12549
  if (!resolved)
12745
12550
  continue;
12746
- const childRel = relative10(svelteRoot, resolved).replace(/\\/g, "/");
12551
+ const childRel = relative9(svelteRoot, resolved).replace(/\\/g, "/");
12747
12552
  if (!childRel.startsWith(".."))
12748
12553
  continue;
12749
12554
  const childBuilt2 = cache.get(resolved);
12750
12555
  if (!childBuilt2)
12751
12556
  continue;
12752
12557
  const origSpec = rawSpec.replace(/\.svelte(?:\.(?:ts|js))?$/, ".js");
12753
- const toServer = relative10(ssrOutputDir, childBuilt2.ssr).replace(/\\/g, "/");
12754
- const toClient = relative10(clientOutputDir, childBuilt2.client).replace(/\\/g, "/");
12558
+ const toServer = relative9(ssrOutputDir, childBuilt2.ssr).replace(/\\/g, "/");
12559
+ const toClient = relative9(clientOutputDir, childBuilt2.client).replace(/\\/g, "/");
12755
12560
  externalRewrites.set(origSpec, {
12756
12561
  client: toClient.startsWith(".") ? toClient : `./${toClient}`,
12757
12562
  server: toServer.startsWith(".") ? toServer : `./${toServer}`
@@ -12785,7 +12590,7 @@ var resolveDevClientDir2 = () => {
12785
12590
  }).js;
12786
12591
  let code = compiledJs.code.replace(/\.svelte(?:\.(?:ts|js))?(['"])/g, ".js$1");
12787
12592
  if (mode === "client" && isDev2) {
12788
- const moduleKey = `/@src/${relative10(process.cwd(), src).replace(/\\/g, "/")}`;
12593
+ const moduleKey = `/@src/${relative9(process.cwd(), src).replace(/\\/g, "/")}`;
12789
12594
  code = code.replace(/if\s*\(import\.meta\.hot\)\s*\{/, `if (typeof window !== "undefined") {
12790
12595
  if (!window.__SVELTE_HMR_ACCEPT__) window.__SVELTE_HMR_ACCEPT__ = {};
12791
12596
  var __hmr_accept = function(cb) { window.__SVELTE_HMR_ACCEPT__[${JSON.stringify(moduleKey)}] = cb; };`);
@@ -12797,11 +12602,11 @@ var resolveDevClientDir2 = () => {
12797
12602
  code += islandMetadataExports;
12798
12603
  return { code, map: compiledJs.map };
12799
12604
  };
12800
- const ssrPath = join28(serverDir, relDir, `${baseName}.js`);
12801
- const clientPath = join28(clientDir, relDir, `${baseName}.js`);
12605
+ const ssrPath = join26(serverDir, relDir, `${baseName}.js`);
12606
+ const clientPath = join26(clientDir, relDir, `${baseName}.js`);
12802
12607
  await Promise.all([
12803
- mkdir4(dirname16(ssrPath), { recursive: true }),
12804
- mkdir4(dirname16(clientPath), { recursive: true })
12608
+ mkdir4(dirname15(ssrPath), { recursive: true }),
12609
+ mkdir4(dirname15(clientPath), { recursive: true })
12805
12610
  ]);
12806
12611
  const inlineMap = (map) => map ? `
12807
12612
  //# sourceMappingURL=data:application/json;base64,${Buffer.from(JSON.stringify(map)).toString("base64")}
@@ -12834,10 +12639,10 @@ var resolveDevClientDir2 = () => {
12834
12639
  };
12835
12640
  const roots = await Promise.all(entryPoints.map(build2));
12836
12641
  await Promise.all(roots.map(async ({ client: client2, hasAwaitSlot }) => {
12837
- const relClientDir = dirname16(relative10(clientDir, client2));
12642
+ const relClientDir = dirname15(relative9(clientDir, client2));
12838
12643
  const name = basename7(client2, extname5(client2));
12839
- const indexPath = join28(indexDir, relClientDir, `${name}.js`);
12840
- const importRaw = relative10(dirname16(indexPath), client2).split(sep2).join("/");
12644
+ const indexPath = join26(indexDir, relClientDir, `${name}.js`);
12645
+ const importRaw = relative9(dirname15(indexPath), client2).split(sep2).join("/");
12841
12646
  const importPath = importRaw.startsWith(".") || importRaw.startsWith("/") ? importRaw : `./${importRaw}`;
12842
12647
  const hmrImports = isDev2 ? `window.__HMR_FRAMEWORK__ = "svelte";
12843
12648
  import "${hmrClientPath3}";
@@ -12908,14 +12713,14 @@ if (typeof window !== "undefined") {
12908
12713
  setTimeout(releaseStreamingSlots, 0);
12909
12714
  }
12910
12715
  }`;
12911
- await mkdir4(dirname16(indexPath), { recursive: true });
12716
+ await mkdir4(dirname15(indexPath), { recursive: true });
12912
12717
  return write2(indexPath, bootstrap);
12913
12718
  }));
12914
12719
  return {
12915
12720
  svelteClientPaths: roots.map(({ client: client2 }) => client2),
12916
12721
  svelteIndexPaths: roots.map(({ client: client2 }) => {
12917
- const rel = dirname16(relative10(clientDir, client2));
12918
- return join28(indexDir, rel, basename7(client2));
12722
+ const rel = dirname15(relative9(clientDir, client2));
12723
+ return join26(indexDir, rel, basename7(client2));
12919
12724
  }),
12920
12725
  svelteServerPaths: roots.map(({ ssr }) => ssr)
12921
12726
  };
@@ -12930,7 +12735,7 @@ var init_compileSvelte = __esm(() => {
12930
12735
  init_lowerAwaitSlotSyntax();
12931
12736
  init_renderToReadableStream();
12932
12737
  devClientDir2 = resolveDevClientDir2();
12933
- hmrClientPath3 = join28(devClientDir2, "hmrClient.ts").replace(/\\/g, "/");
12738
+ hmrClientPath3 = join26(devClientDir2, "hmrClient.ts").replace(/\\/g, "/");
12934
12739
  persistentCache = new Map;
12935
12740
  sourceHashCache = new Map;
12936
12741
  transpiler3 = new Transpiler2({ loader: "ts", target: "browser" });
@@ -12945,7 +12750,7 @@ __export(exports_chainInlineSourcemaps, {
12945
12750
  chainBundleInlineSourcemap: () => chainBundleInlineSourcemap,
12946
12751
  buildLineRemap: () => buildLineRemap
12947
12752
  });
12948
- import { readFileSync as readFileSync17, writeFileSync as writeFileSync10 } from "fs";
12753
+ import { readFileSync as readFileSync17, writeFileSync as writeFileSync8 } from "fs";
12949
12754
  var BASE64_CHARS = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/", BASE64_TO_INT, decodeVlq = (str, startPos) => {
12950
12755
  let result = 0;
12951
12756
  let shift = 0;
@@ -13252,7 +13057,7 @@ var BASE64_CHARS = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz01234567
13252
13057
  const stripped = text.replace(SOURCEMAP_INLINE_RE, "");
13253
13058
  const inline = `
13254
13059
  //# sourceMappingURL=data:application/json;base64,` + Buffer.from(JSON.stringify(chained)).toString("base64");
13255
- writeFileSync10(bundleFilePath, stripped + inline);
13060
+ writeFileSync8(bundleFilePath, stripped + inline);
13256
13061
  };
13257
13062
  var init_chainInlineSourcemaps = __esm(() => {
13258
13063
  BASE64_TO_INT = new Int8Array(128).fill(-1);
@@ -13326,10 +13131,10 @@ import { existsSync as existsSync22 } from "fs";
13326
13131
  import { mkdir as mkdir5 } from "fs/promises";
13327
13132
  import {
13328
13133
  basename as basename8,
13329
- dirname as dirname17,
13134
+ dirname as dirname16,
13330
13135
  isAbsolute as isAbsolute5,
13331
- join as join29,
13332
- relative as relative11,
13136
+ join as join27,
13137
+ relative as relative10,
13333
13138
  resolve as resolve24
13334
13139
  } from "path";
13335
13140
  var {file: file3, write: write3, Transpiler: Transpiler3 } = globalThis.Bun;
@@ -13381,7 +13186,7 @@ var resolveDevClientDir3 = () => {
13381
13186
  return "template-only";
13382
13187
  }
13383
13188
  return "full";
13384
- }, generateVueHmrId = (sourceFilePath, vueRootDir) => relative11(vueRootDir, sourceFilePath).replace(/\\/g, "/").replace(/\.vue$/, ""), extractImports = (sourceCode) => Array.from(sourceCode.matchAll(/import\s+[\s\S]+?['"]([^'"]+)['"]/g)).map((match) => match[1]).filter((importPath) => importPath !== undefined), toJs = (filePath, sourceDir) => {
13189
+ }, generateVueHmrId = (sourceFilePath, vueRootDir) => relative10(vueRootDir, sourceFilePath).replace(/\\/g, "/").replace(/\.vue$/, ""), extractImports = (sourceCode) => Array.from(sourceCode.matchAll(/import\s+[\s\S]+?['"]([^'"]+)['"]/g)).map((match) => match[1]).filter((importPath) => importPath !== undefined), toJs = (filePath, sourceDir) => {
13385
13190
  if (filePath.endsWith(".vue"))
13386
13191
  return filePath.replace(/\.vue$/, ".js");
13387
13192
  if (filePath.endsWith(".ts"))
@@ -13414,7 +13219,7 @@ var resolveDevClientDir3 = () => {
13414
13219
  const cachedResult = cacheMap.get(sourceFilePath);
13415
13220
  if (cachedResult)
13416
13221
  return cachedResult;
13417
- const relativeFilePath = relative11(vueRootDir, sourceFilePath).replace(/\\/g, "/");
13222
+ const relativeFilePath = relative10(vueRootDir, sourceFilePath).replace(/\\/g, "/");
13418
13223
  const relativeWithoutExtension = relativeFilePath.replace(/\.vue$/, "");
13419
13224
  const fileBaseName = basename8(sourceFilePath, ".vue");
13420
13225
  const componentId = toKebab(fileBaseName);
@@ -13452,12 +13257,12 @@ var resolveDevClientDir3 = () => {
13452
13257
  const childComponentPaths = importPaths.filter((path) => path.startsWith(".") && path.endsWith(".vue"));
13453
13258
  const packageComponentPaths = Array.from(resolvedPackageVueImports.entries());
13454
13259
  const helperModulePaths = importPaths.filter((path) => path.startsWith(".") && !path.endsWith(".vue") && !isStylePath(path));
13455
- const stylePathsImported = importPaths.filter((path) => (path.startsWith(".") || isAbsolute5(path)) && isStylePath(path)).map((path) => isAbsolute5(path) ? path : resolve24(dirname17(sourceFilePath), path));
13260
+ const stylePathsImported = importPaths.filter((path) => (path.startsWith(".") || isAbsolute5(path)) && isStylePath(path)).map((path) => isAbsolute5(path) ? path : resolve24(dirname16(sourceFilePath), path));
13456
13261
  for (const stylePath of stylePathsImported) {
13457
13262
  addStyleImporter(sourceFilePath, stylePath);
13458
13263
  }
13459
13264
  const childBuildResults = await Promise.all([
13460
- ...childComponentPaths.map((relativeChildPath) => compileVueFile(resolve24(dirname17(sourceFilePath), relativeChildPath), outputDirs, cacheMap, false, vueRootDir, compiler, stylePreprocessors)),
13265
+ ...childComponentPaths.map((relativeChildPath) => compileVueFile(resolve24(dirname16(sourceFilePath), relativeChildPath), outputDirs, cacheMap, false, vueRootDir, compiler, stylePreprocessors)),
13461
13266
  ...packageComponentPaths.map(([, absolutePath]) => compileVueFile(absolutePath, outputDirs, cacheMap, false, vueRootDir, compiler, stylePreprocessors))
13462
13267
  ]);
13463
13268
  const hasScript = descriptor.script || descriptor.scriptSetup;
@@ -13467,7 +13272,7 @@ var resolveDevClientDir3 = () => {
13467
13272
  sourceMap: true
13468
13273
  }) : { bindings: {}, content: "export default {};", map: undefined };
13469
13274
  const strippedScript = stripExports2(compiledScript.content);
13470
- const sourceDir = dirname17(sourceFilePath);
13275
+ const sourceDir = dirname16(sourceFilePath);
13471
13276
  const transpiledScript = transpiler4.transformSync(strippedScript).replace(/(['"])(\.{1,2}\/[^'"]+)(['"])/g, (_2, quoteStart, relativeImport, quoteEnd) => `${quoteStart}${toJs(relativeImport, sourceDir)}${quoteEnd}`);
13472
13277
  const packageImportRewrites = new Map;
13473
13278
  for (const [bareImport, absolutePath] of packageComponentPaths) {
@@ -13506,8 +13311,8 @@ var resolveDevClientDir3 = () => {
13506
13311
  ];
13507
13312
  let cssOutputPaths = [];
13508
13313
  if (isEntryPoint && allCss.length) {
13509
- const cssOutputFile = join29(outputDirs.css, `${toKebab(fileBaseName)}-compiled.css`);
13510
- await mkdir5(dirname17(cssOutputFile), { recursive: true });
13314
+ const cssOutputFile = join27(outputDirs.css, `${toKebab(fileBaseName)}-compiled.css`);
13315
+ await mkdir5(dirname16(cssOutputFile), { recursive: true });
13511
13316
  await write3(cssOutputFile, allCss.join(`
13512
13317
  `));
13513
13318
  cssOutputPaths = [cssOutputFile];
@@ -13537,9 +13342,9 @@ if (typeof __VUE_HMR_RUNTIME__ !== 'undefined') {
13537
13342
  };
13538
13343
  const clientCode = assembleModule(generateRenderFunction(false), "render", true) + islandMetadataExports;
13539
13344
  const serverCode = assembleModule(generateRenderFunction(true), "ssrRender", false) + islandMetadataExports;
13540
- const clientOutputPath = join29(outputDirs.client, `${relativeWithoutExtension}.js`);
13541
- const serverOutputPath = join29(outputDirs.server, `${relativeWithoutExtension}.js`);
13542
- const relDir = dirname17(relativeFilePath);
13345
+ const clientOutputPath = join27(outputDirs.client, `${relativeWithoutExtension}.js`);
13346
+ const serverOutputPath = join27(outputDirs.server, `${relativeWithoutExtension}.js`);
13347
+ const relDir = dirname16(relativeFilePath);
13543
13348
  const relDepth = relDir === "." ? 0 : relDir.split("/").length;
13544
13349
  const adjustImports = (code) => code.replace(/(from\s+['"])(\.\.\/(?:\.\.\/)*)/g, (_2, prefix, dots) => {
13545
13350
  const upCount = dots.split("/").length - 1;
@@ -13551,15 +13356,15 @@ if (typeof __VUE_HMR_RUNTIME__ !== 'undefined') {
13551
13356
  let result2 = code;
13552
13357
  for (const [bareImport, paths] of packageImportRewrites) {
13553
13358
  const targetPath = mode === "server" ? paths.server : paths.client;
13554
- let rel = relative11(dirname17(outputPath), targetPath).replace(/\\/g, "/");
13359
+ let rel = relative10(dirname16(outputPath), targetPath).replace(/\\/g, "/");
13555
13360
  if (!rel.startsWith("."))
13556
13361
  rel = `./${rel}`;
13557
13362
  result2 = result2.replaceAll(bareImport, rel);
13558
13363
  }
13559
13364
  return result2;
13560
13365
  };
13561
- await mkdir5(dirname17(clientOutputPath), { recursive: true });
13562
- await mkdir5(dirname17(serverOutputPath), { recursive: true });
13366
+ await mkdir5(dirname16(clientOutputPath), { recursive: true });
13367
+ await mkdir5(dirname16(serverOutputPath), { recursive: true });
13563
13368
  const clientFinal = rewritePackageImports(adjustImports(clientCode), clientOutputPath, "client");
13564
13369
  const serverFinal = rewritePackageImports(adjustImports(serverCode), serverOutputPath, "server");
13565
13370
  const inlineSourceMapFor = (finalContent) => {
@@ -13581,7 +13386,7 @@ if (typeof __VUE_HMR_RUNTIME__ !== 'undefined') {
13581
13386
  hmrId,
13582
13387
  serverPath: serverOutputPath,
13583
13388
  tsHelperPaths: [
13584
- ...helperModulePaths.map((helper) => resolve24(dirname17(sourceFilePath), helper.endsWith(".ts") ? helper : `${helper}.ts`)),
13389
+ ...helperModulePaths.map((helper) => resolve24(dirname16(sourceFilePath), helper.endsWith(".ts") ? helper : `${helper}.ts`)),
13585
13390
  ...childBuildResults.flatMap((child) => child.tsHelperPaths)
13586
13391
  ]
13587
13392
  };
@@ -13591,10 +13396,10 @@ if (typeof __VUE_HMR_RUNTIME__ !== 'undefined') {
13591
13396
  }, compileVue = async (entryPoints, vueRootDir, isDev2 = false, stylePreprocessors) => {
13592
13397
  const compiler = await import("@vue/compiler-sfc");
13593
13398
  const generatedDir = getFrameworkGeneratedDir("vue");
13594
- const clientOutputDir = join29(generatedDir, "client");
13595
- const indexOutputDir = join29(generatedDir, "indexes");
13596
- const serverOutputDir = join29(generatedDir, "server");
13597
- const cssOutputDir = join29(generatedDir, "compiled");
13399
+ const clientOutputDir = join27(generatedDir, "client");
13400
+ const indexOutputDir = join27(generatedDir, "indexes");
13401
+ const serverOutputDir = join27(generatedDir, "server");
13402
+ const cssOutputDir = join27(generatedDir, "compiled");
13598
13403
  await Promise.all([
13599
13404
  mkdir5(clientOutputDir, { recursive: true }),
13600
13405
  mkdir5(indexOutputDir, { recursive: true }),
@@ -13611,16 +13416,16 @@ if (typeof __VUE_HMR_RUNTIME__ !== 'undefined') {
13611
13416
  }, buildCache, true, vueRootDir, compiler, stylePreprocessors);
13612
13417
  result.tsHelperPaths.forEach((path) => allTsHelperPaths.add(path));
13613
13418
  const entryBaseName = basename8(entryPath, ".vue");
13614
- const indexOutputFile = join29(indexOutputDir, `${entryBaseName}.js`);
13615
- const clientOutputFile = join29(clientOutputDir, relative11(vueRootDir, entryPath).replace(/\\/g, "/").replace(/\.vue$/, ".js"));
13616
- await mkdir5(dirname17(indexOutputFile), { recursive: true });
13419
+ const indexOutputFile = join27(indexOutputDir, `${entryBaseName}.js`);
13420
+ const clientOutputFile = join27(clientOutputDir, relative10(vueRootDir, entryPath).replace(/\\/g, "/").replace(/\.vue$/, ".js"));
13421
+ await mkdir5(dirname16(indexOutputFile), { recursive: true });
13617
13422
  const vueHmrImports = isDev2 ? [
13618
13423
  `window.__HMR_FRAMEWORK__ = "vue";`,
13619
13424
  `import "${hmrClientPath4}";`
13620
13425
  ] : [];
13621
13426
  await write3(indexOutputFile, [
13622
13427
  ...vueHmrImports,
13623
- `import Comp, * as PageModule from "${relative11(dirname17(indexOutputFile), clientOutputFile).replace(/\\/g, "/")}";`,
13428
+ `import Comp, * as PageModule from "${relative10(dirname16(indexOutputFile), clientOutputFile).replace(/\\/g, "/")}";`,
13624
13429
  'import { createSSRApp, createApp } from "vue";',
13625
13430
  "",
13626
13431
  "// HMR State Preservation: Check for preserved state from HMR",
@@ -13764,11 +13569,11 @@ if (typeof __VUE_HMR_RUNTIME__ !== 'undefined') {
13764
13569
  await Promise.all(Array.from(allTsHelperPaths).map(async (tsPath) => {
13765
13570
  const sourceCode = await file3(tsPath).text();
13766
13571
  const transpiledCode = transpiler4.transformSync(sourceCode);
13767
- const relativeJsPath = relative11(vueRootDir, tsPath).replace(/\.ts$/, ".js");
13768
- const outClientPath = join29(clientOutputDir, relativeJsPath);
13769
- const outServerPath = join29(serverOutputDir, relativeJsPath);
13770
- await mkdir5(dirname17(outClientPath), { recursive: true });
13771
- await mkdir5(dirname17(outServerPath), { recursive: true });
13572
+ const relativeJsPath = relative10(vueRootDir, tsPath).replace(/\.ts$/, ".js");
13573
+ const outClientPath = join27(clientOutputDir, relativeJsPath);
13574
+ const outServerPath = join27(serverOutputDir, relativeJsPath);
13575
+ await mkdir5(dirname16(outClientPath), { recursive: true });
13576
+ await mkdir5(dirname16(outServerPath), { recursive: true });
13772
13577
  await write3(outClientPath, transpiledCode);
13773
13578
  await write3(outServerPath, transpiledCode);
13774
13579
  }));
@@ -13789,7 +13594,7 @@ var init_compileVue = __esm(() => {
13789
13594
  init_vueAutoRouterTransform();
13790
13595
  init_stylePreprocessor();
13791
13596
  devClientDir3 = resolveDevClientDir3();
13792
- hmrClientPath4 = join29(devClientDir3, "hmrClient.ts").replace(/\\/g, "/");
13597
+ hmrClientPath4 = join27(devClientDir3, "hmrClient.ts").replace(/\\/g, "/");
13793
13598
  transpiler4 = new Transpiler3({ loader: "ts", target: "browser" });
13794
13599
  scriptCache = new Map;
13795
13600
  scriptSetupCache = new Map;
@@ -14271,7 +14076,7 @@ __export(exports_compileAngular, {
14271
14076
  compileAngular: () => compileAngular
14272
14077
  });
14273
14078
  import { existsSync as existsSync23, readFileSync as readFileSync18, promises as fs5 } from "fs";
14274
- import { join as join30, basename as basename9, sep as sep3, dirname as dirname18, resolve as resolve25, relative as relative12 } from "path";
14079
+ import { join as join28, basename as basename9, sep as sep3, dirname as dirname17, resolve as resolve25, relative as relative11 } from "path";
14275
14080
  var {Glob: Glob6 } = globalThis.Bun;
14276
14081
  import ts9 from "typescript";
14277
14082
  var traceAngularPhase = async (name, fn2, metadata2) => {
@@ -14314,10 +14119,10 @@ var traceAngularPhase = async (name, fn2, metadata2) => {
14314
14119
  `${candidate}.tsx`,
14315
14120
  `${candidate}.js`,
14316
14121
  `${candidate}.jsx`,
14317
- join30(candidate, "index.ts"),
14318
- join30(candidate, "index.tsx"),
14319
- join30(candidate, "index.js"),
14320
- join30(candidate, "index.jsx")
14122
+ join28(candidate, "index.ts"),
14123
+ join28(candidate, "index.tsx"),
14124
+ join28(candidate, "index.js"),
14125
+ join28(candidate, "index.jsx")
14321
14126
  ];
14322
14127
  return candidates.find((file4) => existsSync23(file4));
14323
14128
  }, createLegacyAngularAnimationUsageResolver = (rootDir) => {
@@ -14389,7 +14194,7 @@ var traceAngularPhase = async (name, fn2, metadata2) => {
14389
14194
  if (scan.usesLegacyAnimations)
14390
14195
  return true;
14391
14196
  for (const specifier of scan.imports) {
14392
- const importedPath = resolveLocalImport(specifier, dirname18(resolved));
14197
+ const importedPath = resolveLocalImport(specifier, dirname17(resolved));
14393
14198
  if (importedPath && await visit(importedPath, visited)) {
14394
14199
  return true;
14395
14200
  }
@@ -14448,7 +14253,7 @@ var traceAngularPhase = async (name, fn2, metadata2) => {
14448
14253
  return `${path.replace(/\.ts$/, ".js")}${query}`;
14449
14254
  if (hasJsLikeExtension(path))
14450
14255
  return `${path}${query}`;
14451
- const importerDir = dirname18(importerOutputPath);
14256
+ const importerDir = dirname17(importerOutputPath);
14452
14257
  const fileCandidate = resolve25(importerDir, `${path}.js`);
14453
14258
  if (outputFiles?.has(fileCandidate) || existsSync23(fileCandidate)) {
14454
14259
  return `${path}.js${query}`;
@@ -14481,16 +14286,16 @@ var traceAngularPhase = async (name, fn2, metadata2) => {
14481
14286
  }, resolveLocalTsImport = (fromFile, specifier) => {
14482
14287
  if (!isRelativeModuleSpecifier(specifier))
14483
14288
  return null;
14484
- const basePath = resolve25(dirname18(fromFile), specifier);
14289
+ const basePath = resolve25(dirname17(fromFile), specifier);
14485
14290
  const candidates = /\.[cm]?[tj]sx?$/.test(basePath) ? [basePath] : [
14486
14291
  `${basePath}.ts`,
14487
14292
  `${basePath}.tsx`,
14488
14293
  `${basePath}.mts`,
14489
14294
  `${basePath}.cts`,
14490
- join30(basePath, "index.ts"),
14491
- join30(basePath, "index.tsx"),
14492
- join30(basePath, "index.mts"),
14493
- join30(basePath, "index.cts")
14295
+ join28(basePath, "index.ts"),
14296
+ join28(basePath, "index.tsx"),
14297
+ join28(basePath, "index.mts"),
14298
+ join28(basePath, "index.cts")
14494
14299
  ];
14495
14300
  return candidates.map((candidate) => resolve25(candidate)).find((candidate) => existsSync23(candidate) && !candidate.endsWith(".d.ts")) ?? null;
14496
14301
  }, readFileForAotTransform = async (fileName, readFile6) => {
@@ -14516,15 +14321,15 @@ var traceAngularPhase = async (name, fn2, metadata2) => {
14516
14321
  const paths = [];
14517
14322
  const templateUrlMatch = findUncommentedMatch(source, /templateUrl\s*:\s*['"]([^'"]+)['"]/);
14518
14323
  if (templateUrlMatch?.[1])
14519
- paths.push(join30(fileDir, templateUrlMatch[1]));
14324
+ paths.push(join28(fileDir, templateUrlMatch[1]));
14520
14325
  const styleUrlMatch = findUncommentedMatch(source, /styleUrl\s*:\s*['"]([^'"]+)['"]/);
14521
14326
  if (styleUrlMatch?.[1])
14522
- paths.push(join30(fileDir, styleUrlMatch[1]));
14327
+ paths.push(join28(fileDir, styleUrlMatch[1]));
14523
14328
  const styleUrlsMatch = findUncommentedMatch(source, /styleUrls\s*:\s*\[([^\]]+)\]/);
14524
14329
  const urlMatches = styleUrlsMatch?.[1]?.match(/['"]([^'"]+)['"]/g);
14525
14330
  if (urlMatches) {
14526
14331
  for (const urlMatch of urlMatches) {
14527
- paths.push(join30(fileDir, urlMatch.replace(/['"]/g, "")));
14332
+ paths.push(join28(fileDir, urlMatch.replace(/['"]/g, "")));
14528
14333
  }
14529
14334
  }
14530
14335
  return paths.map((path) => resolve25(path));
@@ -14539,13 +14344,13 @@ var traceAngularPhase = async (name, fn2, metadata2) => {
14539
14344
  return null;
14540
14345
  }
14541
14346
  }, writeResourceCacheFile = async (cachePath, source) => {
14542
- await fs5.mkdir(dirname18(cachePath), { recursive: true });
14347
+ await fs5.mkdir(dirname17(cachePath), { recursive: true });
14543
14348
  await fs5.writeFile(cachePath, JSON.stringify({
14544
14349
  source,
14545
14350
  version: 1
14546
14351
  }), "utf-8");
14547
14352
  }, resolveResourceTransformCachePath = async (filePath, source, stylePreprocessors) => {
14548
- const resourcePaths = collectAngularResourcePaths(source, dirname18(filePath));
14353
+ const resourcePaths = collectAngularResourcePaths(source, dirname17(filePath));
14549
14354
  const resourceContents = await Promise.all(resourcePaths.map(async (resourcePath) => {
14550
14355
  const content = await fs5.readFile(resourcePath, "utf-8");
14551
14356
  return `${resourcePath}\x00${content}`;
@@ -14558,7 +14363,7 @@ var traceAngularPhase = async (name, fn2, metadata2) => {
14558
14363
  safeStableStringify(stylePreprocessors ?? null)
14559
14364
  ].join("\x00");
14560
14365
  const cacheKey2 = Bun.hash(cacheInput).toString(BASE_36_RADIX);
14561
- return join30(process.cwd(), ".absolutejs", "cache", "angular-resources", `${cacheKey2}.json`);
14366
+ return join28(process.cwd(), ".absolutejs", "cache", "angular-resources", `${cacheKey2}.json`);
14562
14367
  }, precomputeAotResourceTransforms = async (inputPaths, readFile6, stylePreprocessors) => {
14563
14368
  const transformedSources = new Map;
14564
14369
  const visited = new Set;
@@ -14585,7 +14390,7 @@ var traceAngularPhase = async (name, fn2, metadata2) => {
14585
14390
  transformedSource = cached.source;
14586
14391
  } else {
14587
14392
  stats.cacheMisses += 1;
14588
- const transformed = await inlineResources(source, dirname18(resolvedPath), stylePreprocessors);
14393
+ const transformed = await inlineResources(source, dirname17(resolvedPath), stylePreprocessors);
14589
14394
  transformedSource = transformed.source;
14590
14395
  await writeResourceCacheFile(cachePath, transformedSource);
14591
14396
  }
@@ -14604,7 +14409,7 @@ var traceAngularPhase = async (name, fn2, metadata2) => {
14604
14409
  return { stats, transformedSources };
14605
14410
  }, compileAngularFiles = async (inputPaths, outDir, stylePreprocessors) => {
14606
14411
  const islandMetadataByOutputPath = await traceAngularPhase("aot/island-metadata", () => new Map(inputPaths.map((inputPath) => {
14607
- const outputPath = resolve25(join30(outDir, relative12(process.cwd(), resolve25(inputPath)).replace(/\.[cm]?[tj]sx?$/, ".js")));
14412
+ const outputPath = resolve25(join28(outDir, relative11(process.cwd(), resolve25(inputPath)).replace(/\.[cm]?[tj]sx?$/, ".js")));
14608
14413
  return [
14609
14414
  outputPath,
14610
14415
  buildIslandMetadataExports(readFileSync18(inputPath, "utf-8"))
@@ -14614,7 +14419,7 @@ var traceAngularPhase = async (name, fn2, metadata2) => {
14614
14419
  const { readConfiguration, performCompilation, EmitFlags } = await traceAngularPhase("aot/import-compiler-cli", () => import("@angular/compiler-cli"));
14615
14420
  const tsLibDir = await traceAngularPhase("aot/resolve-typescript-lib", () => {
14616
14421
  const tsPath = __require.resolve("typescript");
14617
- const tsRootDir = dirname18(tsPath);
14422
+ const tsRootDir = dirname17(tsPath);
14618
14423
  return tsRootDir.endsWith("lib") ? tsRootDir : resolve25(tsRootDir, "lib");
14619
14424
  });
14620
14425
  const config = await traceAngularPhase("aot/read-configuration", () => readConfiguration("./tsconfig.json"));
@@ -14651,7 +14456,7 @@ var traceAngularPhase = async (name, fn2, metadata2) => {
14651
14456
  const originalGetSourceFile = host.getSourceFile;
14652
14457
  host.getSourceFile = (fileName, languageVersion, onError) => {
14653
14458
  if (fileName.startsWith("lib.") && fileName.endsWith(".d.ts") && tsLibDir) {
14654
- const resolvedPath = join30(tsLibDir, fileName);
14459
+ const resolvedPath = join28(tsLibDir, fileName);
14655
14460
  return originalGetSourceFile?.call(host, resolvedPath, languageVersion, onError);
14656
14461
  }
14657
14462
  return originalGetSourceFile?.call(host, fileName, languageVersion, onError);
@@ -14706,7 +14511,7 @@ var traceAngularPhase = async (name, fn2, metadata2) => {
14706
14511
  const entries = await traceAngularPhase("aot/postprocess-emitted-js", () => {
14707
14512
  const rawEntries = Object.entries(emitted).filter(([fileName]) => fileName.endsWith(".js")).map(([fileName, content]) => ({
14708
14513
  content,
14709
- target: join30(outDir, fileName)
14514
+ target: join28(outDir, fileName)
14710
14515
  }));
14711
14516
  const outputFiles = new Set(rawEntries.map(({ target }) => resolve25(target)));
14712
14517
  return rawEntries.map(({ content, target }) => {
@@ -14728,7 +14533,7 @@ var traceAngularPhase = async (name, fn2, metadata2) => {
14728
14533
  });
14729
14534
  });
14730
14535
  await traceAngularPhase("aot/write-output", () => Promise.all(entries.map(async ({ target, content }) => {
14731
- await fs5.mkdir(dirname18(target), { recursive: true });
14536
+ await fs5.mkdir(dirname17(target), { recursive: true });
14732
14537
  await fs5.writeFile(target, content, "utf-8");
14733
14538
  })), { outputs: entries.length });
14734
14539
  return await traceAngularPhase("aot/collect-output-paths", () => entries.map(({ target }) => target), { outputs: entries.length });
@@ -14883,7 +14688,7 @@ ${fields}
14883
14688
  }, inlineTemplateAndLowerDefer = async (source, fileDir) => {
14884
14689
  const templateUrlMatch = findUncommentedMatch(source, /templateUrl\s*:\s*['"]([^'"]+)['"]/);
14885
14690
  if (templateUrlMatch?.[1]) {
14886
- const templatePath = join30(fileDir, templateUrlMatch[1]);
14691
+ const templatePath = join28(fileDir, templateUrlMatch[1]);
14887
14692
  if (!existsSync23(templatePath)) {
14888
14693
  throw new Error(`Unable to inline Angular templateUrl "${templateUrlMatch[1]}": file not found at ${templatePath}`);
14889
14694
  }
@@ -14914,7 +14719,7 @@ ${fields}
14914
14719
  }, inlineTemplateAndLowerDeferSync = (source, fileDir) => {
14915
14720
  const templateUrlMatch = findUncommentedMatch(source, /templateUrl\s*:\s*['"]([^'"]+)['"]/);
14916
14721
  if (templateUrlMatch?.[1]) {
14917
- const templatePath = join30(fileDir, templateUrlMatch[1]);
14722
+ const templatePath = join28(fileDir, templateUrlMatch[1]);
14918
14723
  if (!existsSync23(templatePath)) {
14919
14724
  throw new Error(`Unable to inline Angular templateUrl "${templateUrlMatch[1]}": file not found at ${templatePath}`);
14920
14725
  }
@@ -14951,7 +14756,7 @@ ${fields}
14951
14756
  return source;
14952
14757
  const stylePromises = urlMatches.map((urlMatch) => {
14953
14758
  const styleUrl = urlMatch.replace(/['"]/g, "");
14954
- return readAndEscapeFile(join30(fileDir, styleUrl), stylePreprocessors);
14759
+ return readAndEscapeFile(join28(fileDir, styleUrl), stylePreprocessors);
14955
14760
  });
14956
14761
  const results = await Promise.all(stylePromises);
14957
14762
  const inlinedStyles = results.filter(Boolean).map((escaped) => `\`${escaped}\``);
@@ -14962,7 +14767,7 @@ ${fields}
14962
14767
  const styleUrlMatch = findUncommentedMatch(source, /styleUrl\s*:\s*['"]([^'"]+)['"]/);
14963
14768
  if (!styleUrlMatch?.[1])
14964
14769
  return source;
14965
- const escaped = await readAndEscapeFile(join30(fileDir, styleUrlMatch[1]), stylePreprocessors);
14770
+ const escaped = await readAndEscapeFile(join28(fileDir, styleUrlMatch[1]), stylePreprocessors);
14966
14771
  if (!escaped)
14967
14772
  return source;
14968
14773
  return source.slice(0, styleUrlMatch.index) + `styles: [\`${escaped}\`]` + source.slice(styleUrlMatch.index + styleUrlMatch[0].length);
@@ -14998,10 +14803,10 @@ ${fields}
14998
14803
  `${candidate}.js`,
14999
14804
  `${candidate}.jsx`,
15000
14805
  `${candidate}.json`,
15001
- join30(candidate, "index.ts"),
15002
- join30(candidate, "index.tsx"),
15003
- join30(candidate, "index.js"),
15004
- join30(candidate, "index.jsx")
14806
+ join28(candidate, "index.ts"),
14807
+ join28(candidate, "index.tsx"),
14808
+ join28(candidate, "index.js"),
14809
+ join28(candidate, "index.jsx")
15005
14810
  ];
15006
14811
  return candidates.find((file4) => existsSync23(file4));
15007
14812
  };
@@ -15025,13 +14830,13 @@ ${fields}
15025
14830
  }
15026
14831
  };
15027
14832
  const toOutputPath = (sourcePath) => {
15028
- const inputDir = dirname18(sourcePath);
14833
+ const inputDir = dirname17(sourcePath);
15029
14834
  const fileBase = basename9(sourcePath).replace(/\.[cm]?[tj]sx?$/, ".js");
15030
14835
  if (inputDir === outDir || inputDir.startsWith(`${outDir}${sep3}`)) {
15031
- return join30(inputDir, fileBase);
14836
+ return join28(inputDir, fileBase);
15032
14837
  }
15033
14838
  const relativeDir = inputDir.startsWith(baseDir) ? inputDir.substring(baseDir.length + 1) : inputDir;
15034
- return join30(outDir, relativeDir, fileBase);
14839
+ return join28(outDir, relativeDir, fileBase);
15035
14840
  };
15036
14841
  const withCacheBuster = (specifier) => {
15037
14842
  if (!cacheBuster)
@@ -15079,10 +14884,10 @@ ${fields}
15079
14884
  return;
15080
14885
  visited.add(resolved);
15081
14886
  if (resolved.endsWith(".json") && existsSync23(resolved)) {
15082
- const inputDir2 = dirname18(resolved);
14887
+ const inputDir2 = dirname17(resolved);
15083
14888
  const relativeDir2 = inputDir2.startsWith(baseDir) ? inputDir2.substring(baseDir.length + 1) : inputDir2;
15084
- const targetDir2 = join30(outDir, relativeDir2);
15085
- const targetPath2 = join30(targetDir2, basename9(resolved));
14889
+ const targetDir2 = join28(outDir, relativeDir2);
14890
+ const targetPath2 = join28(targetDir2, basename9(resolved));
15086
14891
  await fs5.mkdir(targetDir2, { recursive: true });
15087
14892
  await fs5.copyFile(resolved, targetPath2);
15088
14893
  allOutputs.push(targetPath2);
@@ -15094,13 +14899,13 @@ ${fields}
15094
14899
  if (!existsSync23(actualPath))
15095
14900
  return;
15096
14901
  let sourceCode = await fs5.readFile(actualPath, "utf-8");
15097
- const inlined = await inlineResources(sourceCode, dirname18(actualPath), stylePreprocessors);
15098
- sourceCode = inlineTemplateAndLowerDeferSync(inlined.source, dirname18(actualPath)).source;
15099
- const inputDir = dirname18(actualPath);
14902
+ const inlined = await inlineResources(sourceCode, dirname17(actualPath), stylePreprocessors);
14903
+ sourceCode = inlineTemplateAndLowerDeferSync(inlined.source, dirname17(actualPath)).source;
14904
+ const inputDir = dirname17(actualPath);
15100
14905
  const fileBase = basename9(actualPath).replace(/\.[cm]?[tj]sx?$/, ".js");
15101
14906
  const targetPath = toOutputPath(actualPath);
15102
- const targetDir = dirname18(targetPath);
15103
- const relativeDir = relative12(outDir, targetDir).replace(/\\/g, "/");
14907
+ const targetDir = dirname17(targetPath);
14908
+ const relativeDir = relative11(outDir, targetDir).replace(/\\/g, "/");
15104
14909
  const localImports = [];
15105
14910
  const importRewrites = new Map;
15106
14911
  const fromRegex = /(?:from|import)\s+['"]([^'".][^'"]*|\.\.?\/[^'"]+)['"]/g;
@@ -15121,7 +14926,7 @@ ${fields}
15121
14926
  const resolved2 = resolveLocalImport(specifier, inputDir);
15122
14927
  if (!resolved2)
15123
14928
  return null;
15124
- const relativeImport = relative12(targetDir, toOutputPath(resolved2)).replace(/\\/g, "/").replace(/\.js$/, "");
14929
+ const relativeImport = relative11(targetDir, toOutputPath(resolved2)).replace(/\\/g, "/").replace(/\.js$/, "");
15125
14930
  const relativeRewrite = relativeImport.startsWith(".") ? relativeImport : `./${relativeImport}`;
15126
14931
  importRewrites.set(specifier, relativeRewrite);
15127
14932
  return resolved2;
@@ -15160,7 +14965,7 @@ export const __ABSOLUTE_PAGE_USES_LEGACY_ANIMATIONS__ = true;
15160
14965
  return { clientPaths: [...emptyPaths], serverPaths: [...emptyPaths] };
15161
14966
  }
15162
14967
  const compiledRoot = compiledParent;
15163
- const indexesDir = join30(compiledParent, "indexes");
14968
+ const indexesDir = join28(compiledParent, "indexes");
15164
14969
  await traceAngularPhase("setup/create-indexes-dir", () => fs5.mkdir(indexesDir, { recursive: true }));
15165
14970
  const aotOutputs = hmr ? [] : await traceAngularPhase("aot/compile-files", () => compileAngularFiles(entryPoints.map((entry) => resolve25(entry)), compiledRoot, stylePreprocessors), { entries: entryPoints.length });
15166
14971
  if (!hmr) {
@@ -15174,10 +14979,10 @@ export const __ABSOLUTE_PAGE_USES_LEGACY_ANIMATIONS__ = true;
15174
14979
  absolute: false,
15175
14980
  cwd: angularSrcDir
15176
14981
  })) {
15177
- const sourcePath = join30(angularSrcDir, rel);
15178
- const cwdRel = relative12(cwd, sourcePath);
15179
- const targetPath = join30(compiledRoot, cwdRel);
15180
- await fs5.mkdir(dirname18(targetPath), { recursive: true });
14982
+ const sourcePath = join28(angularSrcDir, rel);
14983
+ const cwdRel = relative11(cwd, sourcePath);
14984
+ const targetPath = join28(compiledRoot, cwdRel);
14985
+ await fs5.mkdir(dirname17(targetPath), { recursive: true });
15181
14986
  await fs5.copyFile(sourcePath, targetPath);
15182
14987
  }
15183
14988
  });
@@ -15185,7 +14990,7 @@ export const __ABSOLUTE_PAGE_USES_LEGACY_ANIMATIONS__ = true;
15185
14990
  const usesLegacyAngularAnimations = await traceAngularPhase("setup/legacy-animation-resolver", () => createLegacyAngularAnimationUsageResolver(outRoot));
15186
14991
  const compileTasks = entryPoints.map(async (entry) => {
15187
14992
  const resolvedEntry = resolve25(entry);
15188
- const relativeEntry = relative12(outRoot, resolvedEntry).replace(/\.[tj]s$/, ".js");
14993
+ const relativeEntry = relative11(outRoot, resolvedEntry).replace(/\.[tj]s$/, ".js");
15189
14994
  const compileEntry = () => compileAngularFileJIT(resolvedEntry, compiledRoot, outRoot, stylePreprocessors);
15190
14995
  let outputs = hmr ? await traceAngularPhase("jit/compile-entry", compileEntry, {
15191
14996
  entry: resolvedEntry
@@ -15193,9 +14998,9 @@ export const __ABSOLUTE_PAGE_USES_LEGACY_ANIMATIONS__ = true;
15193
14998
  const fileBase = basename9(resolvedEntry).replace(/\.[tj]s$/, "");
15194
14999
  const jsName = `${fileBase}.js`;
15195
15000
  const compiledFallbackPaths = [
15196
- join30(compiledRoot, relativeEntry),
15197
- join30(compiledRoot, "pages", jsName),
15198
- join30(compiledRoot, jsName)
15001
+ join28(compiledRoot, relativeEntry),
15002
+ join28(compiledRoot, "pages", jsName),
15003
+ join28(compiledRoot, jsName)
15199
15004
  ].map((file4) => resolve25(file4));
15200
15005
  const resolveRawServerFile = (candidatePaths) => {
15201
15006
  const normalizedCandidates = [
@@ -15243,7 +15048,7 @@ export const __ABSOLUTE_PAGE_USES_LEGACY_ANIMATIONS__ = true;
15243
15048
  const usesLegacyAnimations = await traceAngularPhase("wrapper/detect-legacy-animations", () => usesLegacyAngularAnimations(resolvedEntry), { entry: resolvedEntry });
15244
15049
  const serverContentHash = Bun.hash(original).toString(BASE_36_RADIX);
15245
15050
  const cachedWrapper = wrapperOutputCache.get(resolvedEntry);
15246
- const clientFile = join30(indexesDir, jsName);
15051
+ const clientFile = join28(indexesDir, jsName);
15247
15052
  if (hmr && cachedWrapper && cachedWrapper.serverHash === serverContentHash && existsSync23(clientFile) && (usesLegacyAnimations || !original.includes("__ABSOLUTE_PAGE_USES_LEGACY_ANIMATIONS__")) && (!usesLegacyAnimations || original.includes("__ABSOLUTE_PAGE_USES_LEGACY_ANIMATIONS__"))) {
15248
15053
  return {
15249
15054
  clientPath: clientFile,
@@ -15273,11 +15078,11 @@ export const __ABSOLUTE_PAGE_USES_LEGACY_ANIMATIONS__ = true;
15273
15078
  const compiledAppProvidersPath = (() => {
15274
15079
  const angularDirAbs = resolve25(outRoot);
15275
15080
  const appSourceAbs = resolve25(providersInjection.appProvidersSource);
15276
- const rel = relative12(angularDirAbs, appSourceAbs).replace(/\\/g, "/");
15277
- return join30(compiledParent, rel).replace(/\.[cm]?[tj]sx?$/, ".js");
15081
+ const rel = relative11(angularDirAbs, appSourceAbs).replace(/\\/g, "/");
15082
+ return join28(compiledParent, rel).replace(/\.[cm]?[tj]sx?$/, ".js");
15278
15083
  })();
15279
15084
  const appProvidersSpec = (() => {
15280
- const rel = relative12(dirname18(rawServerFile), compiledAppProvidersPath).replace(/\\/g, "/");
15085
+ const rel = relative11(dirname17(rawServerFile), compiledAppProvidersPath).replace(/\\/g, "/");
15281
15086
  return rel.startsWith(".") ? rel : `./${rel}`;
15282
15087
  })();
15283
15088
  const importLines = [
@@ -15299,9 +15104,8 @@ export const providers = [${fragments.join(", ")}];
15299
15104
  `;
15300
15105
  }
15301
15106
  await traceAngularPhase("wrapper/write-server-output", () => fs5.writeFile(rawServerFile, rewritten, "utf-8"), { entry: resolvedEntry });
15302
- const relativePath = relative12(indexesDir, rawServerFile).replace(/\\/g, "/");
15107
+ const relativePath = relative11(indexesDir, rawServerFile).replace(/\\/g, "/");
15303
15108
  const normalizedImportPath = relativePath.startsWith(".") ? relativePath : `./${relativePath}`;
15304
- const generatedProvidersImport = "var generatedProviders = null;";
15305
15109
  const hmrPreamble = hmr ? `window.__HMR_FRAMEWORK__ = "angular";
15306
15110
  import "${hmrClientPath5}";
15307
15111
  ` : "";
@@ -15312,8 +15116,6 @@ import { provideClientHydration } from '@angular/platform-browser';
15312
15116
  import { withHttpTransferCacheOptions } from '@angular/platform-browser';
15313
15117
  import { provideZonelessChangeDetection, REQUEST_CONTEXT } from '@angular/core';
15314
15118
  import * as pageModule from '${normalizedImportPath}';
15315
- ${generatedProvidersImport}
15316
-
15317
15119
  var ${componentClassName} = pageModule.default;
15318
15120
  // REQUEST_CONTEXT is hydrated from the SSR-serialized payload so client-side
15319
15121
  // \`inject(REQUEST_CONTEXT)\` (or \`usePageContext<T>()\`) returns the same
@@ -15326,15 +15128,14 @@ var pageHasIslands = Boolean(pageModule.__ABSOLUTE_PAGE_HAS_ISLANDS__) || Boolea
15326
15128
  var pageHasRawStreamingSlots = Boolean(document.querySelector('[data-absolute-raw-slot="true"]'));
15327
15129
  var pageHasStreamingSlots = Boolean(document.querySelector('[data-absolute-slot="true"]'));
15328
15130
  var contextProviders = [{ provide: REQUEST_CONTEXT, useValue: requestContext }];
15329
- // Page-level providers come from the build-generated providers file
15330
- // (emitted by \`runAngularHandlerScan\` based on the page's
15331
- // \`handleAngularPageRequest({...})\` call). Falls back to the legacy
15332
- // \`export const providers\` on the page module for projects that
15333
- // haven't migrated yet.
15334
- var legacyPageProviders = Reflect.get(pageModule, 'providers');
15335
- var pageProviders = Array.isArray(generatedProviders)
15336
- ? generatedProviders
15337
- : (Array.isArray(legacyPageProviders) ? legacyPageProviders : []);
15131
+ // Page-level providers are injected directly into the page module's
15132
+ // server output by \`compileAngular\`'s providers-injection step
15133
+ // (\`...appProviders, provideRouter(routes), { APP_BASE_HREF }\`),
15134
+ // so the page module always exports its own ready-to-use \`providers\`
15135
+ // array. Same module, same \`@angular/core\` instance on both server
15136
+ // and client bundle.
15137
+ var pageProvidersExport = Reflect.get(pageModule, 'providers');
15138
+ var pageProviders = Array.isArray(pageProvidersExport) ? pageProvidersExport : [];
15338
15139
  var absoluteHttpTransferCacheOptions = {
15339
15140
  includePostRequests: false,
15340
15141
  includeRequestsWithAuthHeaders: false,
@@ -15411,8 +15212,6 @@ import { provideClientHydration } from '@angular/platform-browser';
15411
15212
  import { withHttpTransferCacheOptions } from '@angular/platform-browser';
15412
15213
  import { enableProdMode, provideZonelessChangeDetection, REQUEST_CONTEXT } from '@angular/core';
15413
15214
  import * as pageModule from '${normalizedImportPath}';
15414
- ${generatedProvidersImport}
15415
-
15416
15215
  var ${componentClassName} = pageModule.default;
15417
15216
  // REQUEST_CONTEXT is hydrated from the SSR-serialized payload so client-side
15418
15217
  // \`inject(REQUEST_CONTEXT)\` (or \`usePageContext<T>()\`) returns the same
@@ -15425,15 +15224,14 @@ var pageHasIslands = Boolean(pageModule.__ABSOLUTE_PAGE_HAS_ISLANDS__) || Boolea
15425
15224
  var pageHasRawStreamingSlots = Boolean(document.querySelector('[data-absolute-raw-slot="true"]'));
15426
15225
  var pageHasStreamingSlots = Boolean(document.querySelector('[data-absolute-slot="true"]'));
15427
15226
  var contextProviders = [{ provide: REQUEST_CONTEXT, useValue: requestContext }];
15428
- // Page-level providers come from the build-generated providers file
15429
- // (emitted by \`runAngularHandlerScan\` based on the page's
15430
- // \`handleAngularPageRequest({...})\` call). Falls back to the legacy
15431
- // \`export const providers\` on the page module for projects that
15432
- // haven't migrated yet.
15433
- var legacyPageProviders = Reflect.get(pageModule, 'providers');
15434
- var pageProviders = Array.isArray(generatedProviders)
15435
- ? generatedProviders
15436
- : (Array.isArray(legacyPageProviders) ? legacyPageProviders : []);
15227
+ // Page-level providers are injected directly into the page module's
15228
+ // server output by \`compileAngular\`'s providers-injection step
15229
+ // (\`...appProviders, provideRouter(routes), { APP_BASE_HREF }\`),
15230
+ // so the page module always exports its own ready-to-use \`providers\`
15231
+ // array. Same module, same \`@angular/core\` instance on both server
15232
+ // and client bundle.
15233
+ var pageProvidersExport = Reflect.get(pageModule, 'providers');
15234
+ var pageProviders = Array.isArray(pageProvidersExport) ? pageProvidersExport : [];
15437
15235
  var absoluteHttpTransferCacheOptions = {
15438
15236
  includePostRequests: false,
15439
15237
  includeRequestsWithAuthHeaders: false,
@@ -15502,7 +15300,7 @@ var init_compileAngular = __esm(() => {
15502
15300
  init_stylePreprocessor();
15503
15301
  init_generatedDir();
15504
15302
  devClientDir4 = resolveDevClientDir4();
15505
- hmrClientPath5 = join30(devClientDir4, "hmrClient.ts").replace(/\\/g, "/");
15303
+ hmrClientPath5 = join28(devClientDir4, "hmrClient.ts").replace(/\\/g, "/");
15506
15304
  jitContentCache = new Map;
15507
15305
  wrapperOutputCache = new Map;
15508
15306
  });
@@ -16226,7 +16024,7 @@ __export(exports_fastHmrCompiler, {
16226
16024
  invalidateFingerprintCache: () => invalidateFingerprintCache
16227
16025
  });
16228
16026
  import { existsSync as existsSync24, readFileSync as readFileSync19, statSync as statSync2 } from "fs";
16229
- import { dirname as dirname19, extname as extname6, relative as relative13, resolve as resolve26 } from "path";
16027
+ import { dirname as dirname18, extname as extname6, relative as relative12, resolve as resolve26 } from "path";
16230
16028
  import ts13 from "typescript";
16231
16029
  var fail = (reason, detail, location) => ({
16232
16030
  ok: false,
@@ -16337,7 +16135,7 @@ var fail = (reason, detail, location) => ({
16337
16135
  })();
16338
16136
  if (!decoratorName)
16339
16137
  continue;
16340
- const projectRel = relative13(process.cwd(), componentFilePath).replace(/\\/g, "/");
16138
+ const projectRel = relative12(process.cwd(), componentFilePath).replace(/\\/g, "/");
16341
16139
  const id = encodeURIComponent(`${projectRel}@${className}`);
16342
16140
  if (decoratorName === "Component") {
16343
16141
  const componentDecorator = decorators.find((d2) => {
@@ -16354,7 +16152,7 @@ var fail = (reason, detail, location) => ({
16354
16152
  continue;
16355
16153
  const decoratorMeta = readDecoratorMeta(args);
16356
16154
  const { inputs, outputs } = extractInputsAndOutputs(stmt, null);
16357
- const componentDir = dirname19(componentFilePath);
16155
+ const componentDir = dirname18(componentFilePath);
16358
16156
  const fingerprint = extractFingerprint(stmt, className, decoratorMeta, inputs, outputs, sourceFile, componentDir);
16359
16157
  fingerprintCache.set(id, fingerprint);
16360
16158
  } else {
@@ -17314,7 +17112,7 @@ var fail = (reason, detail, location) => ({
17314
17112
  });
17315
17113
  if (!names.includes(className))
17316
17114
  continue;
17317
- const nextDts = resolveDtsFromSpec(fromPath, dirname19(startDtsPath));
17115
+ const nextDts = resolveDtsFromSpec(fromPath, dirname18(startDtsPath));
17318
17116
  if (!nextDts)
17319
17117
  continue;
17320
17118
  const found = findDtsContainingClass(nextDts, className, visited);
@@ -17324,7 +17122,7 @@ var fail = (reason, detail, location) => ({
17324
17122
  const starReExportRe = /export\s*\*\s*from\s*["']([^"']+)["']/g;
17325
17123
  while ((m = starReExportRe.exec(content)) !== null) {
17326
17124
  const fromPath = m[1] || "";
17327
- const nextDts = resolveDtsFromSpec(fromPath, dirname19(startDtsPath));
17125
+ const nextDts = resolveDtsFromSpec(fromPath, dirname18(startDtsPath));
17328
17126
  if (!nextDts)
17329
17127
  continue;
17330
17128
  const found = findDtsContainingClass(nextDts, className, visited);
@@ -17902,7 +17700,7 @@ ${block}
17902
17700
  }
17903
17701
  const kind = params.kind ?? "component";
17904
17702
  if (kind !== "component") {
17905
- const entityId = encodeURIComponent(`${relative13(projectRoot, componentFilePath).replace(/\\/g, "/")}@${className}`);
17703
+ const entityId = encodeURIComponent(`${relative12(projectRoot, componentFilePath).replace(/\\/g, "/")}@${className}`);
17906
17704
  const currentEntityFingerprint = extractEntityFingerprint(classNode, className, sourceFile);
17907
17705
  const cachedEntityFingerprint = entityFingerprintCache.get(entityId);
17908
17706
  if (cachedEntityFingerprint !== undefined && !entityFingerprintsEqual(cachedEntityFingerprint, currentEntityFingerprint)) {
@@ -17921,7 +17719,7 @@ ${block}
17921
17719
  rebootstrapRequired: false
17922
17720
  };
17923
17721
  }
17924
- if (inheritsDecoratedClass(classNode, sourceFile, dirname19(componentFilePath), projectRoot)) {
17722
+ if (inheritsDecoratedClass(classNode, sourceFile, dirname18(componentFilePath), projectRoot)) {
17925
17723
  return fail("inherits-decorated-class");
17926
17724
  }
17927
17725
  const decorator = findComponentDecorator(classNode);
@@ -17933,7 +17731,7 @@ ${block}
17933
17731
  const projectDefaults = readProjectAngularCompilerOptions(projectRoot);
17934
17732
  const decoratorMeta = readDecoratorMeta(decoratorArgs, projectDefaults);
17935
17733
  const advancedMetadata = extractAdvancedMetadata(classNode, decoratorArgs, compiler);
17936
- const componentDir = dirname19(componentFilePath);
17734
+ const componentDir = dirname18(componentFilePath);
17937
17735
  let templateText;
17938
17736
  let templatePath;
17939
17737
  if (decoratorMeta.template !== null) {
@@ -17986,7 +17784,7 @@ ${block}
17986
17784
  return fail("class-not-found", "anonymous class");
17987
17785
  const wrappedClass = new compiler.WrappedNodeExpr(className_);
17988
17786
  const { inputs, outputs, hasDecoratorIO, hasSignalIO } = extractInputsAndOutputs(classNode, compiler);
17989
- const projectRelPath = relative13(projectRoot, componentFilePath).replace(/\\/g, "/");
17787
+ const projectRelPath = relative12(projectRoot, componentFilePath).replace(/\\/g, "/");
17990
17788
  const fingerprintId = encodeURIComponent(`${projectRelPath}@${className}`);
17991
17789
  const currentFingerprint = extractFingerprint(classNode, className, decoratorMeta, inputs, outputs, sourceFile, componentDir);
17992
17790
  const cachedFingerprint = fingerprintCache.get(fingerprintId);
@@ -18694,7 +18492,7 @@ __export(exports_compileEmber, {
18694
18492
  getEmberServerCompiledDir: () => getEmberServerCompiledDir,
18695
18493
  getEmberCompiledRoot: () => getEmberCompiledRoot,
18696
18494
  getEmberClientCompiledDir: () => getEmberClientCompiledDir,
18697
- dirname: () => dirname20,
18495
+ dirname: () => dirname19,
18698
18496
  compileEmberFileSource: () => compileEmberFileSource,
18699
18497
  compileEmberFile: () => compileEmberFile,
18700
18498
  compileEmber: () => compileEmber,
@@ -18703,7 +18501,7 @@ __export(exports_compileEmber, {
18703
18501
  });
18704
18502
  import { existsSync as existsSync25 } from "fs";
18705
18503
  import { mkdir as mkdir6, rm as rm4 } from "fs/promises";
18706
- import { basename as basename10, dirname as dirname20, extname as extname7, join as join31, resolve as resolve27 } from "path";
18504
+ import { basename as basename10, dirname as dirname19, extname as extname7, join as join29, resolve as resolve27 } from "path";
18707
18505
  var {build: bunBuild2, Transpiler: Transpiler4, write: write4, file: file4 } = globalThis.Bun;
18708
18506
  var cachedPreprocessor = null, getPreprocessor = async () => {
18709
18507
  if (cachedPreprocessor)
@@ -18799,7 +18597,7 @@ export const importSync = (specifier) => {
18799
18597
  const originalImporter = stagedSourceMap.get(args.importer);
18800
18598
  if (!originalImporter)
18801
18599
  return;
18802
- const candidateBase = resolve27(dirname20(originalImporter), args.path);
18600
+ const candidateBase = resolve27(dirname19(originalImporter), args.path);
18803
18601
  const extensionsToTry = ["", ".gts", ".gjs", ".ts", ".js"];
18804
18602
  for (const ext of extensionsToTry) {
18805
18603
  const candidate = candidateBase + ext;
@@ -18822,7 +18620,7 @@ export const importSync = (specifier) => {
18822
18620
  build2.onResolve({ filter: /^@(?:ember|glimmer|simple-dom)\// }, (args) => {
18823
18621
  if (standalonePackages.has(args.path))
18824
18622
  return;
18825
- const internal = join31(cwd, "node_modules/ember-source/dist/packages", args.path, "index.js");
18623
+ const internal = join29(cwd, "node_modules/ember-source/dist/packages", args.path, "index.js");
18826
18624
  if (existsSync25(internal))
18827
18625
  return { path: internal };
18828
18626
  return;
@@ -18870,16 +18668,16 @@ export default PageComponent;
18870
18668
  }
18871
18669
  const transpiled = transpiler5.transformSync(preprocessed);
18872
18670
  const baseName = basename10(resolvedEntry).replace(/\.(gjs|gts|ts|js)$/, "");
18873
- const tmpDir = join31(compiledRoot, "_tmp");
18874
- const serverDir = join31(compiledRoot, "server");
18875
- const clientDir = join31(compiledRoot, "client");
18671
+ const tmpDir = join29(compiledRoot, "_tmp");
18672
+ const serverDir = join29(compiledRoot, "server");
18673
+ const clientDir = join29(compiledRoot, "client");
18876
18674
  await Promise.all([
18877
18675
  mkdir6(tmpDir, { recursive: true }),
18878
18676
  mkdir6(serverDir, { recursive: true }),
18879
18677
  mkdir6(clientDir, { recursive: true })
18880
18678
  ]);
18881
- const tmpPagePath = resolve27(join31(tmpDir, `${baseName}.module.js`));
18882
- const tmpHarnessPath = resolve27(join31(tmpDir, `${baseName}.harness.js`));
18679
+ const tmpPagePath = resolve27(join29(tmpDir, `${baseName}.module.js`));
18680
+ const tmpHarnessPath = resolve27(join29(tmpDir, `${baseName}.harness.js`));
18883
18681
  await Promise.all([
18884
18682
  write4(tmpPagePath, transpiled),
18885
18683
  write4(tmpHarnessPath, generateServerHarness(tmpPagePath))
@@ -18887,7 +18685,7 @@ export default PageComponent;
18887
18685
  const stagedSourceMap = new Map([
18888
18686
  [tmpPagePath, resolvedEntry]
18889
18687
  ]);
18890
- const serverPath = join31(serverDir, `${baseName}.js`);
18688
+ const serverPath = join29(serverDir, `${baseName}.js`);
18891
18689
  const buildResult = await bunBuild2({
18892
18690
  entrypoints: [tmpHarnessPath],
18893
18691
  format: "esm",
@@ -18904,7 +18702,7 @@ export default PageComponent;
18904
18702
  console.warn(`\u26A0\uFE0F Ember server build for ${baseName} had errors:`, buildResult.logs);
18905
18703
  }
18906
18704
  await rm4(tmpDir, { force: true, recursive: true });
18907
- const clientPath = join31(clientDir, `${baseName}.js`);
18705
+ const clientPath = join29(clientDir, `${baseName}.js`);
18908
18706
  await write4(clientPath, transpiled);
18909
18707
  return { clientPath, serverPath };
18910
18708
  }, compileEmber = async (entries, emberDir, cwd = process.cwd(), _hmr = false) => {
@@ -18932,7 +18730,7 @@ export default PageComponent;
18932
18730
  preprocessed = rewriteTemplateEvalToScope(result.code);
18933
18731
  }
18934
18732
  return transpiler5.transformSync(preprocessed);
18935
- }, clearEmberCompilerCache = () => {}, getEmberCompiledRoot = (_emberDir) => getFrameworkGeneratedDir("ember"), getEmberServerCompiledDir = (emberDir) => join31(getEmberCompiledRoot(emberDir), "server"), getEmberClientCompiledDir = (emberDir) => join31(getEmberCompiledRoot(emberDir), "client");
18733
+ }, clearEmberCompilerCache = () => {}, getEmberCompiledRoot = (_emberDir) => getFrameworkGeneratedDir("ember"), getEmberServerCompiledDir = (emberDir) => join29(getEmberCompiledRoot(emberDir), "server"), getEmberClientCompiledDir = (emberDir) => join29(getEmberCompiledRoot(emberDir), "client");
18936
18734
  var init_compileEmber = __esm(() => {
18937
18735
  init_generatedDir();
18938
18736
  transpiler5 = new Transpiler4({
@@ -18953,8 +18751,8 @@ __export(exports_buildReactVendor, {
18953
18751
  computeVendorPaths: () => computeVendorPaths,
18954
18752
  buildReactVendor: () => buildReactVendor
18955
18753
  });
18956
- import { existsSync as existsSync26, mkdirSync as mkdirSync10 } from "fs";
18957
- import { join as join32, resolve as resolve28 } from "path";
18754
+ import { existsSync as existsSync26, mkdirSync as mkdirSync8 } from "fs";
18755
+ import { join as join30, resolve as resolve28 } from "path";
18958
18756
  import { rm as rm5 } from "fs/promises";
18959
18757
  var {build: bunBuild3 } = globalThis.Bun;
18960
18758
  var resolveJsxDevRuntimeCompatPath = () => {
@@ -19008,14 +18806,14 @@ var resolveJsxDevRuntimeCompatPath = () => {
19008
18806
  `)}
19009
18807
  `;
19010
18808
  }, buildReactVendor = async (buildDir) => {
19011
- const vendorDir = join32(buildDir, "react", "vendor");
19012
- mkdirSync10(vendorDir, { recursive: true });
19013
- const tmpDir = join32(buildDir, "_vendor_tmp");
19014
- mkdirSync10(tmpDir, { recursive: true });
18809
+ const vendorDir = join30(buildDir, "react", "vendor");
18810
+ mkdirSync8(vendorDir, { recursive: true });
18811
+ const tmpDir = join30(buildDir, "_vendor_tmp");
18812
+ mkdirSync8(tmpDir, { recursive: true });
19015
18813
  const specifiers = resolveVendorSpecifiers();
19016
18814
  const entrypoints = await Promise.all(specifiers.map(async (specifier) => {
19017
18815
  const safeName = toSafeFileName(specifier);
19018
- const entryPath = join32(tmpDir, `${safeName}.ts`);
18816
+ const entryPath = join30(tmpDir, `${safeName}.ts`);
19019
18817
  const source = await generateEntrySource(specifier);
19020
18818
  await Bun.write(entryPath, source);
19021
18819
  return entryPath;
@@ -19079,8 +18877,8 @@ __export(exports_buildAngularVendor, {
19079
18877
  buildAngularVendor: () => buildAngularVendor,
19080
18878
  buildAngularServerVendor: () => buildAngularServerVendor
19081
18879
  });
19082
- import { mkdirSync as mkdirSync11 } from "fs";
19083
- import { join as join33 } from "path";
18880
+ import { mkdirSync as mkdirSync9 } from "fs";
18881
+ import { join as join31 } from "path";
19084
18882
  import { rm as rm6 } from "fs/promises";
19085
18883
  var {build: bunBuild4, Glob: Glob7 } = globalThis.Bun;
19086
18884
  var REQUIRED_ANGULAR_SPECIFIERS_BASE, requiredAngularSpecifiers = (jitMode) => jitMode ? [...REQUIRED_ANGULAR_SPECIFIERS_BASE, "@angular/compiler"] : REQUIRED_ANGULAR_SPECIFIERS_BASE, SERVER_ONLY_ANGULAR_SPECIFIERS, BUILD_ONLY_ANGULAR_SPECIFIER_PREFIXES, isBuildOnlyAngularSpecifier = (spec) => BUILD_ONLY_ANGULAR_SPECIFIER_PREFIXES.some((prefix) => spec === prefix || spec.startsWith(`${prefix}/`)), SCAN_SKIP_DIRS, isResolvable2 = (specifier) => {
@@ -19177,14 +18975,14 @@ var REQUIRED_ANGULAR_SPECIFIERS_BASE, requiredAngularSpecifiers = (jitMode) => j
19177
18975
  await collectTransitiveAngularSpecs([...angular, ...transitiveRoots], angular);
19178
18976
  return Array.from(angular).filter(isResolvable2);
19179
18977
  }, buildAngularVendor = async (buildDir, directories = [], linkerJitMode = false, depVendorSpecifiers = []) => {
19180
- const vendorDir = join33(buildDir, "angular", "vendor");
19181
- mkdirSync11(vendorDir, { recursive: true });
19182
- const tmpDir = join33(buildDir, "_angular_vendor_tmp");
19183
- mkdirSync11(tmpDir, { recursive: true });
18978
+ const vendorDir = join31(buildDir, "angular", "vendor");
18979
+ mkdirSync9(vendorDir, { recursive: true });
18980
+ const tmpDir = join31(buildDir, "_angular_vendor_tmp");
18981
+ mkdirSync9(tmpDir, { recursive: true });
19184
18982
  const specifiers = await resolveAngularSpecifiers(directories, linkerJitMode);
19185
18983
  const entrypoints = await Promise.all(specifiers.map(async (specifier) => {
19186
18984
  const safeName = toSafeFileName2(specifier);
19187
- const entryPath = join33(tmpDir, `${safeName}.ts`);
18985
+ const entryPath = join31(tmpDir, `${safeName}.ts`);
19188
18986
  await Bun.write(entryPath, await generateVendorEntrySource(specifier));
19189
18987
  return entryPath;
19190
18988
  }));
@@ -19215,10 +19013,10 @@ var REQUIRED_ANGULAR_SPECIFIERS_BASE, requiredAngularSpecifiers = (jitMode) => j
19215
19013
  const specifiers = await resolveAngularSpecifiers(directories, linkerJitMode);
19216
19014
  return computeAngularVendorPaths(specifiers);
19217
19015
  }, buildAngularServerVendor = async (buildDir, directories = [], linkerJitMode = false) => {
19218
- const vendorDir = join33(buildDir, "angular", "vendor", "server");
19219
- mkdirSync11(vendorDir, { recursive: true });
19220
- const tmpDir = join33(buildDir, "_angular_server_vendor_tmp");
19221
- mkdirSync11(tmpDir, { recursive: true });
19016
+ const vendorDir = join31(buildDir, "angular", "vendor", "server");
19017
+ mkdirSync9(vendorDir, { recursive: true });
19018
+ const tmpDir = join31(buildDir, "_angular_server_vendor_tmp");
19019
+ mkdirSync9(tmpDir, { recursive: true });
19222
19020
  const browserSpecs = await resolveAngularSpecifiers(directories, linkerJitMode);
19223
19021
  const allSpecs = new Set(browserSpecs);
19224
19022
  for (const spec of SERVER_ONLY_ANGULAR_SPECIFIERS) {
@@ -19228,7 +19026,7 @@ var REQUIRED_ANGULAR_SPECIFIERS_BASE, requiredAngularSpecifiers = (jitMode) => j
19228
19026
  const specifiers = Array.from(allSpecs);
19229
19027
  const entrypoints = await Promise.all(specifiers.map(async (specifier) => {
19230
19028
  const safeName = toSafeFileName2(specifier);
19231
- const entryPath = join33(tmpDir, `${safeName}.ts`);
19029
+ const entryPath = join31(tmpDir, `${safeName}.ts`);
19232
19030
  await Bun.write(entryPath, await generateVendorEntrySource(specifier));
19233
19031
  return entryPath;
19234
19032
  }));
@@ -19250,9 +19048,9 @@ var REQUIRED_ANGULAR_SPECIFIERS_BASE, requiredAngularSpecifiers = (jitMode) => j
19250
19048
  return specifiers;
19251
19049
  }, computeAngularServerVendorPaths = (buildDir, specifiers) => {
19252
19050
  const paths = {};
19253
- const vendorDir = join33(buildDir, "angular", "vendor", "server");
19051
+ const vendorDir = join31(buildDir, "angular", "vendor", "server");
19254
19052
  for (const specifier of specifiers) {
19255
- paths[specifier] = join33(vendorDir, `${toSafeFileName2(specifier)}.js`);
19053
+ paths[specifier] = join31(vendorDir, `${toSafeFileName2(specifier)}.js`);
19256
19054
  }
19257
19055
  return paths;
19258
19056
  }, computeAngularServerVendorPathsAsync = async (buildDir, directories = [], linkerJitMode = true) => {
@@ -19307,18 +19105,18 @@ __export(exports_buildVueVendor, {
19307
19105
  computeVueVendorPaths: () => computeVueVendorPaths,
19308
19106
  buildVueVendor: () => buildVueVendor
19309
19107
  });
19310
- import { mkdirSync as mkdirSync12 } from "fs";
19311
- import { join as join34 } from "path";
19108
+ import { mkdirSync as mkdirSync10 } from "fs";
19109
+ import { join as join32 } from "path";
19312
19110
  import { rm as rm7 } from "fs/promises";
19313
19111
  var {build: bunBuild5 } = globalThis.Bun;
19314
19112
  var vueSpecifiers, toSafeFileName3 = (specifier) => specifier.replace(/\//g, "_"), buildVueVendor = async (buildDir) => {
19315
- const vendorDir = join34(buildDir, "vue", "vendor");
19316
- mkdirSync12(vendorDir, { recursive: true });
19317
- const tmpDir = join34(buildDir, "_vue_vendor_tmp");
19318
- mkdirSync12(tmpDir, { recursive: true });
19113
+ const vendorDir = join32(buildDir, "vue", "vendor");
19114
+ mkdirSync10(vendorDir, { recursive: true });
19115
+ const tmpDir = join32(buildDir, "_vue_vendor_tmp");
19116
+ mkdirSync10(tmpDir, { recursive: true });
19319
19117
  const entrypoints = await Promise.all(vueSpecifiers.map(async (specifier) => {
19320
19118
  const safeName = toSafeFileName3(specifier);
19321
- const entryPath = join34(tmpDir, `${safeName}.ts`);
19119
+ const entryPath = join32(tmpDir, `${safeName}.ts`);
19322
19120
  await Bun.write(entryPath, `export * from '${specifier}';
19323
19121
  `);
19324
19122
  return entryPath;
@@ -19343,17 +19141,17 @@ var vueSpecifiers, toSafeFileName3 = (specifier) => specifier.replace(/\//g, "_"
19343
19141
  console.warn("\u26A0\uFE0F Vue vendor build had errors:", result.logs);
19344
19142
  return;
19345
19143
  }
19346
- const { readFileSync: readFileSync20, writeFileSync: writeFileSync11, readdirSync: readdirSync4 } = await import("fs");
19144
+ const { readFileSync: readFileSync20, writeFileSync: writeFileSync9, readdirSync: readdirSync4 } = await import("fs");
19347
19145
  const files = readdirSync4(vendorDir).filter((f2) => f2.endsWith(".js"));
19348
19146
  for (const file5 of files) {
19349
- const filePath = join34(vendorDir, file5);
19147
+ const filePath = join32(vendorDir, file5);
19350
19148
  const content = readFileSync20(filePath, "utf-8");
19351
19149
  if (!content.includes("__VUE_HMR_RUNTIME__"))
19352
19150
  continue;
19353
19151
  const patched = content.replace(/getGlobalThis\(\)\.__VUE_HMR_RUNTIME__\s*=\s*\{/, "getGlobalThis().__VUE_HMR_RUNTIME__ = getGlobalThis().__VUE_HMR_RUNTIME__ || {");
19354
19152
  if (patched === content)
19355
19153
  continue;
19356
- writeFileSync11(filePath, patched);
19154
+ writeFileSync9(filePath, patched);
19357
19155
  }
19358
19156
  }, computeVueVendorPaths = () => {
19359
19157
  const paths = {};
@@ -19372,8 +19170,8 @@ __export(exports_buildSvelteVendor, {
19372
19170
  computeSvelteVendorPaths: () => computeSvelteVendorPaths,
19373
19171
  buildSvelteVendor: () => buildSvelteVendor
19374
19172
  });
19375
- import { mkdirSync as mkdirSync13 } from "fs";
19376
- import { join as join35 } from "path";
19173
+ import { mkdirSync as mkdirSync11 } from "fs";
19174
+ import { join as join33 } from "path";
19377
19175
  import { rm as rm8 } from "fs/promises";
19378
19176
  var {build: bunBuild6 } = globalThis.Bun;
19379
19177
  var svelteSpecifiers, isResolvable3 = (specifier) => {
@@ -19387,13 +19185,13 @@ var svelteSpecifiers, isResolvable3 = (specifier) => {
19387
19185
  const specifiers = resolveVendorSpecifiers2();
19388
19186
  if (specifiers.length === 0)
19389
19187
  return;
19390
- const vendorDir = join35(buildDir, "svelte", "vendor");
19391
- mkdirSync13(vendorDir, { recursive: true });
19392
- const tmpDir = join35(buildDir, "_svelte_vendor_tmp");
19393
- mkdirSync13(tmpDir, { recursive: true });
19188
+ const vendorDir = join33(buildDir, "svelte", "vendor");
19189
+ mkdirSync11(vendorDir, { recursive: true });
19190
+ const tmpDir = join33(buildDir, "_svelte_vendor_tmp");
19191
+ mkdirSync11(tmpDir, { recursive: true });
19394
19192
  const entrypoints = await Promise.all(specifiers.map(async (specifier) => {
19395
19193
  const safeName = toSafeFileName4(specifier);
19396
- const entryPath = join35(tmpDir, `${safeName}.ts`);
19194
+ const entryPath = join33(tmpDir, `${safeName}.ts`);
19397
19195
  await Bun.write(entryPath, `export * from '${specifier}';
19398
19196
  `);
19399
19197
  return entryPath;
@@ -19443,7 +19241,7 @@ __export(exports_rewriteImportsPlugin, {
19443
19241
  buildWithImportRewrite: () => buildWithImportRewrite
19444
19242
  });
19445
19243
  import { readdir as readdir3 } from "fs/promises";
19446
- import { join as join36 } from "path";
19244
+ import { join as join34 } from "path";
19447
19245
  var escapeRegex2 = (str) => str.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"), jsRewriteImports = (content, replacements) => {
19448
19246
  let result = content;
19449
19247
  for (const [specifier, webPath] of replacements) {
@@ -19572,7 +19370,7 @@ ${content}`;
19572
19370
  const entries = await readdir3(dir);
19573
19371
  for (const entry of entries) {
19574
19372
  if (entry.endsWith(".js"))
19575
- allFiles.push(join36(dir, entry));
19373
+ allFiles.push(join34(dir, entry));
19576
19374
  }
19577
19375
  } catch {}
19578
19376
  }
@@ -19615,13 +19413,13 @@ import {
19615
19413
  copyFileSync as copyFileSync2,
19616
19414
  cpSync,
19617
19415
  existsSync as existsSync27,
19618
- mkdirSync as mkdirSync14,
19416
+ mkdirSync as mkdirSync12,
19619
19417
  readFileSync as readFileSync20,
19620
19418
  rmSync as rmSync2,
19621
19419
  statSync as statSync3,
19622
- writeFileSync as writeFileSync11
19420
+ writeFileSync as writeFileSync9
19623
19421
  } from "fs";
19624
- import { basename as basename11, dirname as dirname21, extname as extname8, join as join37, relative as relative14, resolve as resolve29 } from "path";
19422
+ import { basename as basename11, dirname as dirname20, extname as extname8, join as join35, relative as relative13, resolve as resolve29 } from "path";
19625
19423
  import { cwd, env as env3, exit } from "process";
19626
19424
  var {build: bunBuild7, Glob: Glob8 } = globalThis.Bun;
19627
19425
  var isDev2, isBuildTraceEnabled = () => {
@@ -19696,11 +19494,11 @@ var isDev2, isBuildTraceEnabled = () => {
19696
19494
  throw err;
19697
19495
  exit(1);
19698
19496
  }, copyHtmxVendor = (htmxDir, htmxDestDir) => {
19699
- mkdirSync14(htmxDestDir, { recursive: true });
19497
+ mkdirSync12(htmxDestDir, { recursive: true });
19700
19498
  const glob = new Glob8("htmx*.min.js");
19701
19499
  for (const relPath of glob.scanSync({ cwd: htmxDir })) {
19702
- const src = join37(htmxDir, relPath);
19703
- const dest = join37(htmxDestDir, "htmx.min.js");
19500
+ const src = join35(htmxDir, relPath);
19501
+ const dest = join35(htmxDestDir, "htmx.min.js");
19704
19502
  copyFileSync2(src, dest);
19705
19503
  return;
19706
19504
  }
@@ -19775,8 +19573,8 @@ var isDev2, isBuildTraceEnabled = () => {
19775
19573
  vuePagesPath
19776
19574
  }) => {
19777
19575
  const { readdirSync: readDir } = await import("fs");
19778
- const devIndexDir = join37(buildPath, "_src_indexes");
19779
- mkdirSync14(devIndexDir, { recursive: true });
19576
+ const devIndexDir = join35(buildPath, "_src_indexes");
19577
+ mkdirSync12(devIndexDir, { recursive: true });
19780
19578
  if (reactIndexesPath && reactPagesPath) {
19781
19579
  copyReactDevIndexes(reactIndexesPath, reactPagesPath, devIndexDir, readDir);
19782
19580
  }
@@ -19791,37 +19589,37 @@ var isDev2, isBuildTraceEnabled = () => {
19791
19589
  return;
19792
19590
  }
19793
19591
  const indexFiles = readDir(reactIndexesPath).filter((file5) => file5.endsWith(".tsx"));
19794
- const pagesRel = relative14(process.cwd(), resolve29(reactPagesPath)).replace(/\\/g, "/");
19592
+ const pagesRel = relative13(process.cwd(), resolve29(reactPagesPath)).replace(/\\/g, "/");
19795
19593
  for (const file5 of indexFiles) {
19796
- let content = readFileSync20(join37(reactIndexesPath, file5), "utf-8");
19594
+ let content = readFileSync20(join35(reactIndexesPath, file5), "utf-8");
19797
19595
  content = content.replace(/from\s*['"]([^'"]*\/pages\/([^'"]+))['"]/g, (_match, _fullPath, componentName) => `from '/@src/${pagesRel}/${componentName}'`);
19798
- writeFileSync11(join37(devIndexDir, file5), content);
19596
+ writeFileSync9(join35(devIndexDir, file5), content);
19799
19597
  }
19800
19598
  }, copySvelteDevIndexes = (svelteDir, sveltePagesPath, svelteEntries, devIndexDir) => {
19801
- const svelteIndexDir = join37(getFrameworkGeneratedDir("svelte"), "indexes");
19599
+ const svelteIndexDir = join35(getFrameworkGeneratedDir("svelte"), "indexes");
19802
19600
  const sveltePageEntries = svelteEntries.filter((file5) => resolve29(file5).startsWith(resolve29(sveltePagesPath)));
19803
19601
  for (const entry of sveltePageEntries) {
19804
19602
  const name = basename11(entry).replace(/\.svelte(\.(ts|js))?$/, "");
19805
- const indexFile = join37(svelteIndexDir, "pages", `${name}.js`);
19603
+ const indexFile = join35(svelteIndexDir, "pages", `${name}.js`);
19806
19604
  if (!existsSync27(indexFile))
19807
19605
  continue;
19808
19606
  let content = readFileSync20(indexFile, "utf-8");
19809
- const srcRel = relative14(process.cwd(), resolve29(entry)).replace(/\\/g, "/");
19607
+ const srcRel = relative13(process.cwd(), resolve29(entry)).replace(/\\/g, "/");
19810
19608
  content = content.replace(/import\s+Component\s+from\s+['"]([^'"]+)['"]/, `import Component from "/@src/${srcRel}"`);
19811
- writeFileSync11(join37(devIndexDir, `${name}.svelte.js`), content);
19609
+ writeFileSync9(join35(devIndexDir, `${name}.svelte.js`), content);
19812
19610
  }
19813
19611
  }, copyVueDevIndexes = (vueDir, vuePagesPath, vueEntries, devIndexDir) => {
19814
- const vueIndexDir = join37(getFrameworkGeneratedDir("vue"), "indexes");
19612
+ const vueIndexDir = join35(getFrameworkGeneratedDir("vue"), "indexes");
19815
19613
  const vuePageEntries = vueEntries.filter((file5) => resolve29(file5).startsWith(resolve29(vuePagesPath)));
19816
19614
  for (const entry of vuePageEntries) {
19817
19615
  const name = basename11(entry, ".vue");
19818
- const indexFile = join37(vueIndexDir, `${name}.js`);
19616
+ const indexFile = join35(vueIndexDir, `${name}.js`);
19819
19617
  if (!existsSync27(indexFile))
19820
19618
  continue;
19821
19619
  let content = readFileSync20(indexFile, "utf-8");
19822
- const srcRel = relative14(process.cwd(), resolve29(entry)).replace(/\\/g, "/");
19620
+ const srcRel = relative13(process.cwd(), resolve29(entry)).replace(/\\/g, "/");
19823
19621
  content = content.replace(/import\s+Comp(?:\s*,\s*\*\s+as\s+\w+)?\s+from\s+['"]([^'"]+)['"]/, (match) => match.replace(/from\s+['"][^'"]+['"]/, `from "/@src/${srcRel}"`));
19824
- writeFileSync11(join37(devIndexDir, `${name}.vue.js`), content);
19622
+ writeFileSync9(join35(devIndexDir, `${name}.vue.js`), content);
19825
19623
  }
19826
19624
  }, resolveVueRuntimeId = (content, firstUseName, outputPath, projectRoot) => {
19827
19625
  const varIdx = content.indexOf(`var ${firstUseName} =`);
@@ -19890,11 +19688,11 @@ var isDev2, isBuildTraceEnabled = () => {
19890
19688
  content = `${content.slice(0, firstUseIdx) + runtime}
19891
19689
  ${content.slice(firstUseIdx)}`;
19892
19690
  content = wrapUseFunctions(content, useNames);
19893
- writeFileSync11(outputPath, content);
19691
+ writeFileSync9(outputPath, content);
19894
19692
  }, buildDevUrlFileMap = (urlReferencedFiles, projectRoot) => {
19895
19693
  const urlFileMap = new Map;
19896
19694
  for (const srcPath of urlReferencedFiles) {
19897
- const rel = relative14(projectRoot, srcPath).replace(/\\/g, "/");
19695
+ const rel = relative13(projectRoot, srcPath).replace(/\\/g, "/");
19898
19696
  const name = basename11(srcPath);
19899
19697
  const mtime = Math.round(statSync3(srcPath).mtimeMs);
19900
19698
  const url = `/@src/${rel}?v=${mtime}`;
@@ -19909,7 +19707,7 @@ ${content.slice(firstUseIdx)}`;
19909
19707
  const output = nonReactClientOutputs.find((artifact) => basename11(artifact.path).startsWith(`${srcBase}.`));
19910
19708
  if (!output)
19911
19709
  continue;
19912
- urlFileMap.set(basename11(srcPath), `/${relative14(buildPath, output.path).replace(/\\/g, "/")}`);
19710
+ urlFileMap.set(basename11(srcPath), `/${relative13(buildPath, output.path).replace(/\\/g, "/")}`);
19913
19711
  }
19914
19712
  return urlFileMap;
19915
19713
  }, buildUrlFileMap = (urlReferencedFiles, hmr, projectRoot, buildPath, nonReactClientOutputs) => {
@@ -19930,7 +19728,7 @@ ${content.slice(firstUseIdx)}`;
19930
19728
  return `new URL('${resolvedPath}', import.meta.url)`;
19931
19729
  });
19932
19730
  if (changed)
19933
- writeFileSync11(outputPath, content);
19731
+ writeFileSync9(outputPath, content);
19934
19732
  }
19935
19733
  }, vueFeatureFlags, bunBuildPassKeys, bunBuildPassKeySet, reservedBunBuildConfigKeys, passLockedKeys, isObject2 = (value) => typeof value === "object" && value !== null, isBunBuildPassConfig = (config) => isObject2(config) && Object.keys(config).some((key) => bunBuildPassKeySet.has(key)), sanitizeBunBuildOverride = (override, extraReservedKeys = new Set) => {
19936
19734
  if (!override)
@@ -20044,10 +19842,10 @@ ${content.slice(firstUseIdx)}`;
20044
19842
  restoreTracePhase();
20045
19843
  return;
20046
19844
  }
20047
- const traceDir = join37(buildPath2, ".absolute-trace");
19845
+ const traceDir = join35(buildPath2, ".absolute-trace");
20048
19846
  const timestamp = new Date().toISOString().replace(/[:.]/g, "-");
20049
- mkdirSync14(traceDir, { recursive: true });
20050
- writeFileSync11(join37(traceDir, `build-trace-${timestamp}.json`), JSON.stringify({
19847
+ mkdirSync12(traceDir, { recursive: true });
19848
+ writeFileSync9(join35(traceDir, `build-trace-${timestamp}.json`), JSON.stringify({
20051
19849
  events: traceEvents,
20052
19850
  frameworks: traceFrameworkNames,
20053
19851
  generatedAt: new Date().toISOString(),
@@ -20078,15 +19876,15 @@ ${content.slice(firstUseIdx)}`;
20078
19876
  const stylesPath = typeof stylesConfig === "string" ? stylesConfig : stylesConfig?.path;
20079
19877
  const stylesIgnore = typeof stylesConfig === "object" ? stylesConfig.ignore : undefined;
20080
19878
  const stylesDir = stylesPath && validateSafePath(stylesPath, projectRoot);
20081
- const reactIndexesPath = reactDir && join37(getFrameworkGeneratedDir("react"), "indexes");
20082
- const reactPagesPath = reactDir && join37(reactDir, "pages");
20083
- const htmlPagesPath = htmlDir && join37(htmlDir, "pages");
20084
- const htmlScriptsPath = htmlDir && join37(htmlDir, "scripts");
20085
- const sveltePagesPath = svelteDir && join37(svelteDir, "pages");
20086
- const vuePagesPath = vueDir && join37(vueDir, "pages");
20087
- const htmxPagesPath = htmxDir && join37(htmxDir, "pages");
20088
- const angularPagesPath = angularDir && join37(angularDir, "pages");
20089
- const emberPagesPath = emberDir && join37(emberDir, "pages");
19879
+ const reactIndexesPath = reactDir && join35(getFrameworkGeneratedDir("react"), "indexes");
19880
+ const reactPagesPath = reactDir && join35(reactDir, "pages");
19881
+ const htmlPagesPath = htmlDir && join35(htmlDir, "pages");
19882
+ const htmlScriptsPath = htmlDir && join35(htmlDir, "scripts");
19883
+ const sveltePagesPath = svelteDir && join35(svelteDir, "pages");
19884
+ const vuePagesPath = vueDir && join35(vueDir, "pages");
19885
+ const htmxPagesPath = htmxDir && join35(htmxDir, "pages");
19886
+ const angularPagesPath = angularDir && join35(angularDir, "pages");
19887
+ const emberPagesPath = emberDir && join35(emberDir, "pages");
20090
19888
  const frontends = [
20091
19889
  reactDir,
20092
19890
  htmlDir,
@@ -20117,7 +19915,7 @@ ${content.slice(firstUseIdx)}`;
20117
19915
  const sourceClientRoots = [
20118
19916
  htmlDir,
20119
19917
  htmxDir,
20120
- islandBootstrapPath && dirname21(islandBootstrapPath)
19918
+ islandBootstrapPath && dirname20(islandBootstrapPath)
20121
19919
  ].filter((dir) => Boolean(dir));
20122
19920
  const usesGenerated = Boolean(reactDir) || Boolean(svelteDir) || Boolean(vueDir) || Boolean(angularDir);
20123
19921
  if (usesGenerated)
@@ -20145,14 +19943,14 @@ ${content.slice(firstUseIdx)}`;
20145
19943
  const [firstEntry] = serverDirMap;
20146
19944
  if (!firstEntry)
20147
19945
  throw new Error("Expected at least one server directory entry");
20148
- serverRoot = join37(firstEntry.dir, firstEntry.subdir);
20149
- serverOutDir = join37(buildPath, basename11(firstEntry.dir));
19946
+ serverRoot = join35(firstEntry.dir, firstEntry.subdir);
19947
+ serverOutDir = join35(buildPath, basename11(firstEntry.dir));
20150
19948
  } else if (serverDirMap.length > 1) {
20151
19949
  serverRoot = commonAncestor(serverDirMap.map((entry) => entry.dir), projectRoot);
20152
19950
  serverOutDir = buildPath;
20153
19951
  }
20154
19952
  const publicPath = publicDirectory && validateSafePath(publicDirectory, projectRoot);
20155
- await tracePhase("build-dir/create", () => mkdirSync14(buildPath, { recursive: true }));
19953
+ await tracePhase("build-dir/create", () => mkdirSync12(buildPath, { recursive: true }));
20156
19954
  if (publicPath)
20157
19955
  await tracePhase("public/copy", () => cpSync(publicPath, buildPath, { force: true, recursive: true }));
20158
19956
  const filterToIncrementalEntries = (entryPoints, mapToSource) => {
@@ -20174,7 +19972,7 @@ ${content.slice(firstUseIdx)}`;
20174
19972
  await tracePhase("react/index-generation", () => generateReactIndexFiles(reactPagesPath, reactIndexesPath, hmr));
20175
19973
  }
20176
19974
  if (assetsPath && (!isIncremental || normalizedIncrementalFiles?.some((f2) => f2.includes("/assets/")))) {
20177
- await tracePhase("assets/copy", () => cpSync(assetsPath, join37(buildPath, "assets"), {
19975
+ await tracePhase("assets/copy", () => cpSync(assetsPath, join35(buildPath, "assets"), {
20178
19976
  force: true,
20179
19977
  recursive: true
20180
19978
  }));
@@ -20284,11 +20082,11 @@ ${content.slice(firstUseIdx)}`;
20284
20082
  }
20285
20083
  }
20286
20084
  if (htmlDefaults.error || htmlDefaults.notFound || htmlDefaults.loading || Object.keys(htmlPages).length > 0) {
20287
- const htmlConventionsOutDir = join37(buildPath, "conventions", "html");
20288
- mkdirSync14(htmlConventionsOutDir, { recursive: true });
20085
+ const htmlConventionsOutDir = join35(buildPath, "conventions", "html");
20086
+ mkdirSync12(htmlConventionsOutDir, { recursive: true });
20289
20087
  const htmlPathRemap = new Map;
20290
20088
  for (const sourcePath of htmlConventionSources) {
20291
- const dest = join37(htmlConventionsOutDir, basename11(sourcePath));
20089
+ const dest = join35(htmlConventionsOutDir, basename11(sourcePath));
20292
20090
  cpSync(sourcePath, dest, { force: true });
20293
20091
  htmlPathRemap.set(sourcePath, dest);
20294
20092
  }
@@ -20331,7 +20129,7 @@ ${content.slice(firstUseIdx)}`;
20331
20129
  const reactEntries = isIncremental && reactIndexesPath && reactPagesPath ? filterToIncrementalEntries(allReactEntries, (entry) => {
20332
20130
  if (entry.startsWith(resolve29(reactIndexesPath))) {
20333
20131
  const pageName = basename11(entry, ".tsx");
20334
- return join37(reactPagesPath, `${pageName}.tsx`);
20132
+ return join35(reactPagesPath, `${pageName}.tsx`);
20335
20133
  }
20336
20134
  return null;
20337
20135
  }) : allReactEntries;
@@ -20434,14 +20232,14 @@ ${content.slice(firstUseIdx)}`;
20434
20232
  try {
20435
20233
  const { primeComponentFingerprint: primeComponentFingerprint2 } = await Promise.resolve().then(() => (init_fastHmrCompiler(), exports_fastHmrCompiler));
20436
20234
  const { readdir: readdir4 } = await import("fs/promises");
20437
- const { join: join38 } = await import("path");
20235
+ const { join: join36 } = await import("path");
20438
20236
  const walk = async (dir) => {
20439
20237
  const entries = await readdir4(dir, {
20440
20238
  withFileTypes: true
20441
20239
  });
20442
20240
  const out = [];
20443
20241
  for (const entry of entries) {
20444
- const full = join38(dir, entry.name);
20242
+ const full = join36(dir, entry.name);
20445
20243
  if (entry.isDirectory()) {
20446
20244
  out.push(...await walk(full));
20447
20245
  } else if (entry.isFile() && entry.name.endsWith(".ts") && !entry.name.endsWith(".d.ts")) {
@@ -20506,9 +20304,9 @@ ${content.slice(firstUseIdx)}`;
20506
20304
  const compileReactConventions = async () => {
20507
20305
  if (reactConventionSources.length === 0)
20508
20306
  return emptyStringArray;
20509
- const destDir = join37(buildPath, "conventions", "react");
20307
+ const destDir = join35(buildPath, "conventions", "react");
20510
20308
  rmSync2(destDir, { force: true, recursive: true });
20511
- mkdirSync14(destDir, { recursive: true });
20309
+ mkdirSync12(destDir, { recursive: true });
20512
20310
  const destPaths = [];
20513
20311
  for (let idx = 0;idx < reactConventionSources.length; idx++) {
20514
20312
  const source = reactConventionSources[idx];
@@ -20522,7 +20320,7 @@ ${content.slice(firstUseIdx)}`;
20522
20320
  naming: `${idx}-[name].[ext]`,
20523
20321
  outdir: destDir,
20524
20322
  plugins: [stylePreprocessorPlugin2],
20525
- root: dirname21(source),
20323
+ root: dirname20(source),
20526
20324
  target: "bun",
20527
20325
  throw: false,
20528
20326
  tsconfig: "./tsconfig.json"
@@ -20550,9 +20348,9 @@ ${content.slice(firstUseIdx)}`;
20550
20348
  angularConventionSources.length > 0 && angularDir ? tracePhase("compile/convention-angular", () => Promise.resolve().then(() => (init_compileAngular(), exports_compileAngular)).then((mod) => mod.compileAngular(angularConventionSources, angularDir, hmr, styleTransformConfig))) : { serverPaths: emptyStringArray }
20551
20349
  ]);
20552
20350
  const bundleConventionFiles = async (framework, compiledPaths) => {
20553
- const destDir = join37(buildPath, "conventions", framework);
20351
+ const destDir = join35(buildPath, "conventions", framework);
20554
20352
  rmSync2(destDir, { force: true, recursive: true });
20555
- mkdirSync14(destDir, { recursive: true });
20353
+ mkdirSync12(destDir, { recursive: true });
20556
20354
  const destPaths = [];
20557
20355
  for (let idx = 0;idx < compiledPaths.length; idx++) {
20558
20356
  const compiledPath = compiledPaths[idx];
@@ -20624,7 +20422,7 @@ ${content.slice(firstUseIdx)}`;
20624
20422
  }
20625
20423
  })) : {
20626
20424
  entries: [],
20627
- generatedRoot: join37(buildPath, "_island_entries")
20425
+ generatedRoot: join35(buildPath, "_island_entries")
20628
20426
  };
20629
20427
  const islandClientEntryPoints = islandEntryResult.entries.map((entry) => entry.entryPath);
20630
20428
  if (serverEntryPoints.length === 0 && reactClientEntryPoints.length === 0 && nonReactClientEntryPoints.length === 0 && islandClientEntryPoints.length === 0 && htmxDir === undefined && htmlDir === undefined) {
@@ -20660,7 +20458,7 @@ ${content.slice(firstUseIdx)}`;
20660
20458
  return {};
20661
20459
  }
20662
20460
  if (hmr && reactIndexesPath && reactClientEntryPoints.length > 0) {
20663
- const refreshEntry = join37(reactIndexesPath, "_refresh.tsx");
20461
+ const refreshEntry = join35(reactIndexesPath, "_refresh.tsx");
20664
20462
  if (!reactClientEntryPoints.includes(refreshEntry))
20665
20463
  reactClientEntryPoints.push(refreshEntry);
20666
20464
  }
@@ -20762,19 +20560,19 @@ ${content.slice(firstUseIdx)}`;
20762
20560
  throw: false
20763
20561
  }, resolveBunBuildOverride(bunBuildConfig, "reactClient")) : undefined;
20764
20562
  if (reactDir && reactClientEntryPoints.length > 0) {
20765
- rmSync2(join37(buildPath, "react", "generated", "indexes"), {
20563
+ rmSync2(join35(buildPath, "react", "generated", "indexes"), {
20766
20564
  force: true,
20767
20565
  recursive: true
20768
20566
  });
20769
20567
  }
20770
20568
  if (angularDir && angularClientPaths.length > 0) {
20771
- rmSync2(join37(buildPath, "angular", "indexes"), {
20569
+ rmSync2(join35(buildPath, "angular", "indexes"), {
20772
20570
  force: true,
20773
20571
  recursive: true
20774
20572
  });
20775
20573
  }
20776
20574
  if (islandClientEntryPoints.length > 0) {
20777
- rmSync2(join37(buildPath, "islands"), {
20575
+ rmSync2(join35(buildPath, "islands"), {
20778
20576
  force: true,
20779
20577
  recursive: true
20780
20578
  });
@@ -20863,7 +20661,7 @@ ${content.slice(firstUseIdx)}`;
20863
20661
  globalCssEntries.length > 0 ? tracePhase("bun/global-css", () => bunBuild7(mergeBunBuildConfig({
20864
20662
  entrypoints: globalCssEntries,
20865
20663
  naming: `[dir]/[name].[hash].[ext]`,
20866
- outdir: stylesDir ? join37(buildPath, basename11(stylesDir)) : buildPath,
20664
+ outdir: stylesDir ? join35(buildPath, basename11(stylesDir)) : buildPath,
20867
20665
  plugins: [stylePreprocessorPlugin2],
20868
20666
  root: stylesDir || clientRoot,
20869
20667
  target: "browser",
@@ -20872,7 +20670,7 @@ ${content.slice(firstUseIdx)}`;
20872
20670
  vueCssPaths.length > 0 ? tracePhase("bun/vue-css", () => bunBuild7(mergeBunBuildConfig({
20873
20671
  entrypoints: vueCssPaths,
20874
20672
  naming: `[name].[hash].[ext]`,
20875
- outdir: join37(buildPath, assetsPath ? basename11(assetsPath) : "assets", "css"),
20673
+ outdir: join35(buildPath, assetsPath ? basename11(assetsPath) : "assets", "css"),
20876
20674
  target: "browser",
20877
20675
  throw: false
20878
20676
  }, resolveBunBuildOverride(bunBuildConfig, "vueCss")))) : undefined
@@ -20946,10 +20744,10 @@ ${content.slice(firstUseIdx)}`;
20946
20744
  if (serverOutputs.length > 0 && angularServerVendorPaths2 && Object.keys(angularServerVendorPaths2).length > 0) {
20947
20745
  const { rewriteBuildOutputsWith: rewriteBuildOutputsWith2 } = await Promise.resolve().then(() => (init_rewriteImportsPlugin(), exports_rewriteImportsPlugin));
20948
20746
  await tracePhase("postprocess/server-angular-vendor-imports", () => rewriteBuildOutputsWith2(serverOutputs, (artifact) => {
20949
- const fileDir = dirname21(artifact.path);
20747
+ const fileDir = dirname20(artifact.path);
20950
20748
  const relativePaths = {};
20951
20749
  for (const [specifier, absolute] of Object.entries(angularServerVendorPaths2)) {
20952
- const rel = relative14(fileDir, absolute);
20750
+ const rel = relative13(fileDir, absolute);
20953
20751
  relativePaths[specifier] = rel.startsWith(".") ? rel : `./${rel}`;
20954
20752
  }
20955
20753
  return relativePaths;
@@ -21018,7 +20816,7 @@ ${content.slice(firstUseIdx)}`;
21018
20816
  if (skipAngularClientBundle) {
21019
20817
  for (const clientPath of angularClientPaths) {
21020
20818
  const fileBase = basename11(clientPath, ".js");
21021
- const relFromCwd = relative14(projectRoot, clientPath).replace(/\\/g, "/");
20819
+ const relFromCwd = relative13(projectRoot, clientPath).replace(/\\/g, "/");
21022
20820
  manifest[`${toPascal(fileBase)}Index`] = `/@src/${relFromCwd}`;
21023
20821
  }
21024
20822
  }
@@ -21038,13 +20836,13 @@ ${content.slice(firstUseIdx)}`;
21038
20836
  const tag = `<script>window.__HMR_FRAMEWORK__="${framework}";</script><script data-hmr-client>${hmrClientBundle}</script>`;
21039
20837
  const bodyClose = /<\/body\s*>/i.exec(html);
21040
20838
  html = bodyClose ? html.slice(0, bodyClose.index) + tag + html.slice(bodyClose.index) : html + tag;
21041
- writeFileSync11(filePath, html);
20839
+ writeFileSync9(filePath, html);
21042
20840
  };
21043
20841
  const processHtmlPages = async () => {
21044
20842
  if (!(htmlDir && htmlPagesPath))
21045
20843
  return;
21046
- const outputHtmlPages = isSingle ? join37(buildPath, "pages") : join37(buildPath, basename11(htmlDir), "pages");
21047
- mkdirSync14(outputHtmlPages, { recursive: true });
20844
+ const outputHtmlPages = isSingle ? join35(buildPath, "pages") : join35(buildPath, basename11(htmlDir), "pages");
20845
+ mkdirSync12(outputHtmlPages, { recursive: true });
21048
20846
  cpSync(htmlPagesPath, outputHtmlPages, {
21049
20847
  force: true,
21050
20848
  recursive: true
@@ -21068,14 +20866,14 @@ ${content.slice(firstUseIdx)}`;
21068
20866
  const processHtmxPages = async () => {
21069
20867
  if (!(htmxDir && htmxPagesPath))
21070
20868
  return;
21071
- const outputHtmxPages = isSingle ? join37(buildPath, "pages") : join37(buildPath, basename11(htmxDir), "pages");
21072
- mkdirSync14(outputHtmxPages, { recursive: true });
20869
+ const outputHtmxPages = isSingle ? join35(buildPath, "pages") : join35(buildPath, basename11(htmxDir), "pages");
20870
+ mkdirSync12(outputHtmxPages, { recursive: true });
21073
20871
  cpSync(htmxPagesPath, outputHtmxPages, {
21074
20872
  force: true,
21075
20873
  recursive: true
21076
20874
  });
21077
20875
  if (shouldCopyHtmx) {
21078
- const htmxDestDir = isSingle ? buildPath : join37(buildPath, basename11(htmxDir));
20876
+ const htmxDestDir = isSingle ? buildPath : join35(buildPath, basename11(htmxDir));
21079
20877
  copyHtmxVendor(htmxDir, htmxDestDir);
21080
20878
  }
21081
20879
  if (shouldUpdateHtmxAssetPaths) {
@@ -21140,9 +20938,9 @@ ${content.slice(firstUseIdx)}`;
21140
20938
  writeBuildTrace(buildPath);
21141
20939
  return { conventions: conventionsMap, manifest };
21142
20940
  }
21143
- writeFileSync11(join37(buildPath, "manifest.json"), JSON.stringify(manifest, null, "\t"));
20941
+ writeFileSync9(join35(buildPath, "manifest.json"), JSON.stringify(manifest, null, "\t"));
21144
20942
  if (Object.keys(conventionsMap).length > 0) {
21145
- writeFileSync11(join37(buildPath, "conventions.json"), JSON.stringify(conventionsMap, null, "\t"));
20943
+ writeFileSync9(join35(buildPath, "conventions.json"), JSON.stringify(conventionsMap, null, "\t"));
21146
20944
  }
21147
20945
  writeBuildTrace(buildPath);
21148
20946
  if (mode === "production") {
@@ -21263,8 +21061,8 @@ var init_build = __esm(() => {
21263
21061
  });
21264
21062
 
21265
21063
  // src/build/buildEmberVendor.ts
21266
- import { mkdirSync as mkdirSync15, existsSync as existsSync28 } from "fs";
21267
- import { join as join38 } from "path";
21064
+ import { mkdirSync as mkdirSync13, existsSync as existsSync28 } from "fs";
21065
+ import { join as join36 } from "path";
21268
21066
  import { rm as rm9 } from "fs/promises";
21269
21067
  var {build: bunBuild8 } = globalThis.Bun;
21270
21068
  var toSafeFileName5 = (specifier) => specifier.replace(/^@/, "").replace(/\//g, "_"), generateMacrosShim = () => `// Generated shim for @embroider/macros \u2014 provides minimal runtime
@@ -21316,7 +21114,7 @@ export const importSync = (specifier) => {
21316
21114
  if (standaloneSpecifiers.has(specifier)) {
21317
21115
  return { resolveTo: specifier, specifier };
21318
21116
  }
21319
- const emberInternalPath = join38(cwd2, "node_modules/ember-source/dist/packages", specifier, "index.js");
21117
+ const emberInternalPath = join36(cwd2, "node_modules/ember-source/dist/packages", specifier, "index.js");
21320
21118
  if (!existsSync28(emberInternalPath)) {
21321
21119
  throw new Error(`Ember vendor build: cannot find ${specifier} at ${emberInternalPath}. ` + `Is ember-source installed and at least 6.12?`);
21322
21120
  }
@@ -21348,7 +21146,7 @@ export const importSync = (specifier) => {
21348
21146
  if (standalonePackages.has(args.path)) {
21349
21147
  return;
21350
21148
  }
21351
- const internal = join38(cwd2, "node_modules/ember-source/dist/packages", args.path, "index.js");
21149
+ const internal = join36(cwd2, "node_modules/ember-source/dist/packages", args.path, "index.js");
21352
21150
  if (existsSync28(internal)) {
21353
21151
  return { path: internal };
21354
21152
  }
@@ -21356,16 +21154,16 @@ export const importSync = (specifier) => {
21356
21154
  });
21357
21155
  }
21358
21156
  }), buildEmberVendor = async (buildDir, cwd2 = process.cwd()) => {
21359
- const vendorDir = join38(buildDir, "ember", "vendor");
21360
- mkdirSync15(vendorDir, { recursive: true });
21361
- const tmpDir = join38(buildDir, "_ember_vendor_tmp");
21362
- mkdirSync15(tmpDir, { recursive: true });
21363
- const macrosShimPath = join38(tmpDir, "embroider_macros_shim.js");
21157
+ const vendorDir = join36(buildDir, "ember", "vendor");
21158
+ mkdirSync13(vendorDir, { recursive: true });
21159
+ const tmpDir = join36(buildDir, "_ember_vendor_tmp");
21160
+ mkdirSync13(tmpDir, { recursive: true });
21161
+ const macrosShimPath = join36(tmpDir, "embroider_macros_shim.js");
21364
21162
  await Bun.write(macrosShimPath, generateMacrosShim());
21365
21163
  const resolutions = REQUIRED_EMBER_SPECIFIERS.map((specifier) => resolveEmberSpecifier(specifier, cwd2));
21366
21164
  const entrypoints = await Promise.all(resolutions.map(async (resolution) => {
21367
21165
  const safeName = toSafeFileName5(resolution.specifier);
21368
- const entryPath = join38(tmpDir, `${safeName}.js`);
21166
+ const entryPath = join36(tmpDir, `${safeName}.js`);
21369
21167
  const source = resolution.specifier === "@embroider/macros" ? `export * from ${JSON.stringify(macrosShimPath)};
21370
21168
  ` : generateVendorEntrySource2(resolution);
21371
21169
  await Bun.write(entryPath, source);
@@ -21741,7 +21539,7 @@ var init_clientManager = __esm(() => {
21741
21539
 
21742
21540
  // src/dev/pathUtils.ts
21743
21541
  import { existsSync as existsSync30, readdirSync as readdirSync4, readFileSync as readFileSync22 } from "fs";
21744
- import { dirname as dirname22, resolve as resolve32 } from "path";
21542
+ import { dirname as dirname21, resolve as resolve32 } from "path";
21745
21543
  var STYLE_EXTENSION_PATTERN2, detectFramework = (filePath, resolved) => {
21746
21544
  if (shouldIgnorePath(filePath, resolved)) {
21747
21545
  return "ignored";
@@ -21869,10 +21667,10 @@ var STYLE_EXTENSION_PATTERN2, detectFramework = (filePath, resolved) => {
21869
21667
  refs.push(strMatch[1]);
21870
21668
  }
21871
21669
  }
21872
- const componentDir = dirname22(full);
21670
+ const componentDir = dirname21(full);
21873
21671
  for (const ref of refs) {
21874
21672
  const refAbs = normalizePath(resolve32(componentDir, ref));
21875
- const refDir = normalizePath(dirname22(refAbs));
21673
+ const refDir = normalizePath(dirname21(refAbs));
21876
21674
  if (refDir === angularRootNormalized || refDir.startsWith(angularRootNormalized + "/")) {
21877
21675
  continue;
21878
21676
  }
@@ -22000,7 +21798,7 @@ var init_pathUtils = __esm(() => {
22000
21798
  // src/dev/fileWatcher.ts
22001
21799
  import { watch } from "fs";
22002
21800
  import { existsSync as existsSync31, readdirSync as readdirSync5, statSync as statSync4 } from "fs";
22003
- import { dirname as dirname23, join as join39, resolve as resolve33 } from "path";
21801
+ import { dirname as dirname22, join as join37, resolve as resolve33 } from "path";
22004
21802
  var safeRemoveFromGraph = (graph, fullPath) => {
22005
21803
  try {
22006
21804
  removeFileFromGraph(graph, fullPath);
@@ -22033,7 +21831,7 @@ var safeRemoveFromGraph = (graph, fullPath) => {
22033
21831
  for (const name of entries) {
22034
21832
  if (shouldSkipFilename(name, isStylesDir))
22035
21833
  continue;
22036
- const child = join39(eventDir, name).replace(/\\/g, "/");
21834
+ const child = join37(eventDir, name).replace(/\\/g, "/");
22037
21835
  let st2;
22038
21836
  try {
22039
21837
  st2 = statSync4(child);
@@ -22058,12 +21856,12 @@ var safeRemoveFromGraph = (graph, fullPath) => {
22058
21856
  return;
22059
21857
  if (shouldSkipFilename(filename, isStylesDir)) {
22060
21858
  if (event === "rename") {
22061
- const eventDir = dirname23(join39(absolutePath, filename)).replace(/\\/g, "/");
21859
+ const eventDir = dirname22(join37(absolutePath, filename)).replace(/\\/g, "/");
22062
21860
  atomicRecoveryScan(eventDir);
22063
21861
  }
22064
21862
  return;
22065
21863
  }
22066
- const fullPath = join39(absolutePath, filename).replace(/\\/g, "/");
21864
+ const fullPath = join37(absolutePath, filename).replace(/\\/g, "/");
22067
21865
  if (shouldIgnorePath(fullPath, state.resolvedPaths)) {
22068
21866
  return;
22069
21867
  }
@@ -22433,7 +22231,7 @@ __export(exports_resolveOwningComponents, {
22433
22231
  invalidateResourceIndex: () => invalidateResourceIndex
22434
22232
  });
22435
22233
  import { readdirSync as readdirSync6, readFileSync as readFileSync24, statSync as statSync5 } from "fs";
22436
- import { dirname as dirname24, extname as extname9, join as join40, resolve as resolve37 } from "path";
22234
+ import { dirname as dirname23, extname as extname9, join as join38, resolve as resolve37 } from "path";
22437
22235
  import ts14 from "typescript";
22438
22236
  var ENTITY_DECORATORS, isAngularSourceFile = (file5) => file5.endsWith(".ts") || file5.endsWith(".tsx"), walkAngularSourceFiles = (root) => {
22439
22237
  const out = [];
@@ -22448,7 +22246,7 @@ var ENTITY_DECORATORS, isAngularSourceFile = (file5) => file5.endsWith(".ts") ||
22448
22246
  if (entry.name.startsWith(".") || entry.name === "node_modules") {
22449
22247
  continue;
22450
22248
  }
22451
- const full = join40(dir, entry.name);
22249
+ const full = join38(dir, entry.name);
22452
22250
  if (entry.isDirectory()) {
22453
22251
  visit(full);
22454
22252
  } else if (entry.isFile() && isAngularSourceFile(entry.name)) {
@@ -22587,7 +22385,7 @@ var ENTITY_DECORATORS, isAngularSourceFile = (file5) => file5.endsWith(".ts") ||
22587
22385
  return null;
22588
22386
  }
22589
22387
  const sf = ts14.createSourceFile(childFilePath, source, ts14.ScriptTarget.ES2022, true, ts14.ScriptKind.TS);
22590
- const childDir = dirname24(childFilePath);
22388
+ const childDir = dirname23(childFilePath);
22591
22389
  for (const stmt of sf.statements) {
22592
22390
  if (!ts14.isImportDeclaration(stmt))
22593
22391
  continue;
@@ -22644,7 +22442,7 @@ var ENTITY_DECORATORS, isAngularSourceFile = (file5) => file5.endsWith(".ts") ||
22644
22442
  const parentFile = new Map;
22645
22443
  for (const tsPath of walkAngularSourceFiles(userAngularRoot)) {
22646
22444
  const classes = parseDecoratedClasses(tsPath);
22647
- const componentDir = dirname24(tsPath);
22445
+ const componentDir = dirname23(tsPath);
22648
22446
  for (const cls of classes) {
22649
22447
  const entity = {
22650
22448
  className: cls.className,
@@ -22821,7 +22619,7 @@ __export(exports_moduleServer, {
22821
22619
  SRC_URL_PREFIX: () => SRC_URL_PREFIX
22822
22620
  });
22823
22621
  import { existsSync as existsSync32, readFileSync as readFileSync25, statSync as statSync6 } from "fs";
22824
- import { basename as basename13, dirname as dirname25, extname as extname10, join as join41, resolve as resolve38, relative as relative15 } from "path";
22622
+ import { basename as basename13, dirname as dirname24, extname as extname10, join as join39, resolve as resolve38, relative as relative14 } from "path";
22825
22623
  var SRC_PREFIX = "/@src/", jsTranspiler2, tsTranspiler2, tsxTranspiler, TRANSPILABLE, ALL_EXPORTS_RE, STRING_CONTENTS_RE, preserveTypeExports = (originalSource, transpiled, valueExports) => {
22826
22624
  const codeOnly = originalSource.replace(STRING_CONTENTS_RE, '""');
22827
22625
  const allExports = [];
@@ -22869,11 +22667,11 @@ ${stubs}
22869
22667
  }
22870
22668
  }, resolveRelativeImport = (relPath, fileDir, projectRoot, extensions) => {
22871
22669
  const absPath = resolve38(fileDir, relPath);
22872
- const rel = relative15(projectRoot, absPath);
22670
+ const rel = relative14(projectRoot, absPath);
22873
22671
  const extension = extname10(rel);
22874
22672
  let srcPath = RESOLVED_MODULE_EXTENSIONS.has(extension) ? rel : resolveRelativeExtension(rel, projectRoot, extensions);
22875
22673
  if (extname10(srcPath) === ".svelte") {
22876
- srcPath = relative15(projectRoot, resolveSvelteModulePath(resolve38(projectRoot, srcPath)));
22674
+ srcPath = relative14(projectRoot, resolveSvelteModulePath(resolve38(projectRoot, srcPath)));
22877
22675
  }
22878
22676
  return srcUrl(srcPath, projectRoot);
22879
22677
  }, NODE_BUILTIN_RE, resolveAbsoluteSpecifier = (specifier, projectRoot) => {
@@ -22885,7 +22683,7 @@ ${stubs}
22885
22683
  "import"
22886
22684
  ]);
22887
22685
  if (fromExports)
22888
- return relative15(projectRoot, fromExports);
22686
+ return relative14(projectRoot, fromExports);
22889
22687
  try {
22890
22688
  const isScoped = specifier.startsWith("@");
22891
22689
  const parts = specifier.split("/");
@@ -22893,19 +22691,19 @@ ${stubs}
22893
22691
  const subpath = isScoped ? parts.slice(2).join("/") : parts.slice(1).join("/");
22894
22692
  if (!subpath) {
22895
22693
  const pkgDir = resolve38(projectRoot, "node_modules", packageName ?? "");
22896
- const pkgJsonPath = join41(pkgDir, "package.json");
22694
+ const pkgJsonPath = join39(pkgDir, "package.json");
22897
22695
  if (existsSync32(pkgJsonPath)) {
22898
22696
  const pkg = JSON.parse(readFileSync25(pkgJsonPath, "utf-8"));
22899
22697
  const esmEntry = typeof pkg.module === "string" && pkg.module || typeof pkg.browser === "string" && pkg.browser;
22900
22698
  if (esmEntry) {
22901
22699
  const resolved = resolve38(pkgDir, esmEntry);
22902
22700
  if (existsSync32(resolved))
22903
- return relative15(projectRoot, resolved);
22701
+ return relative14(projectRoot, resolved);
22904
22702
  }
22905
22703
  }
22906
22704
  }
22907
22705
  } catch {}
22908
- return relative15(projectRoot, Bun.resolveSync(specifier, projectRoot));
22706
+ return relative14(projectRoot, Bun.resolveSync(specifier, projectRoot));
22909
22707
  } catch {
22910
22708
  return;
22911
22709
  }
@@ -22930,28 +22728,28 @@ ${stubs}
22930
22728
  };
22931
22729
  result = result.replace(/^((?:import\s+[\s\S]+?\s+from|export\s+[\s\S]+?\s+from|import)\s*["'])([^"'./][^"']*)(["'])/gm, stubReplace);
22932
22730
  result = result.replace(/(import\s*\(\s*["'])([^"'./][^"']*)(["']\s*\))/g, stubReplace);
22933
- const fileDir = dirname25(filePath);
22731
+ const fileDir = dirname24(filePath);
22934
22732
  result = result.replace(/(from\s*["'])(\.\.?\/[^"']+)(["'])/g, (_match, prefix, relPath, suffix) => `${prefix}${resolveRelativeImport(relPath, fileDir, projectRoot, IMPORT_EXTENSIONS)}${suffix}`);
22935
22733
  result = result.replace(/(import\s*\(\s*["'])(\.\.?\/[^"']+)(["']\s*\))/g, (_match, prefix, relPath, suffix) => `${prefix}${resolveRelativeImport(relPath, fileDir, projectRoot, IMPORT_EXTENSIONS)}${suffix}`);
22936
22734
  result = result.replace(/(import\s*["'])(\.\.?\/[^"']+)(["']\s*;?)/g, (_match, prefix, relPath, suffix) => `${prefix}${resolveRelativeImport(relPath, fileDir, projectRoot, SIDE_EFFECT_EXTENSIONS)}${suffix}`);
22937
22735
  const rewriteAbsoluteToSrc = (_match, prefix, absPath, _ext, suffix) => {
22938
22736
  if (absPath.startsWith(projectRoot)) {
22939
- const rel2 = relative15(projectRoot, absPath).replace(/\\/g, "/");
22737
+ const rel2 = relative14(projectRoot, absPath).replace(/\\/g, "/");
22940
22738
  return `${prefix}${srcUrl(rel2, projectRoot)}${suffix}`;
22941
22739
  }
22942
- const rel = relative15(projectRoot, absPath).replace(/\\/g, "/");
22740
+ const rel = relative14(projectRoot, absPath).replace(/\\/g, "/");
22943
22741
  return `${prefix}${srcUrl(rel, projectRoot)}${suffix}`;
22944
22742
  };
22945
22743
  result = result.replace(/((?:from|import)\s*["'])(\/[^"']+\.(tsx?|jsx?|ts))(["'])/g, rewriteAbsoluteToSrc);
22946
22744
  result = result.replace(/(import\s*\(\s*["'])(\/[^"']+\.(tsx?|jsx?|ts))(["']\s*\))/g, rewriteAbsoluteToSrc);
22947
22745
  result = result.replace(/new\s+URL\(\s*["'](\.\.?\/[^"']+)["']\s*,\s*import\.meta\.url\s*\)/g, (_match, relPath) => {
22948
22746
  const absPath = resolve38(fileDir, relPath);
22949
- const rel = relative15(projectRoot, absPath);
22747
+ const rel = relative14(projectRoot, absPath);
22950
22748
  return `new URL('${srcUrl(rel, projectRoot)}', import.meta.url)`;
22951
22749
  });
22952
22750
  result = result.replace(/import\.meta\.resolve\(\s*["'](\.\.?\/[^"']+)["']\s*\)/g, (_match, relPath) => {
22953
22751
  const absPath = resolve38(fileDir, relPath);
22954
- const rel = relative15(projectRoot, absPath);
22752
+ const rel = relative14(projectRoot, absPath);
22955
22753
  return `'${srcUrl(rel, projectRoot)}'`;
22956
22754
  });
22957
22755
  return result;
@@ -23007,7 +22805,7 @@ ${code}`;
23007
22805
  transpiled = `var $RefreshReg$ = window.$RefreshReg$ || function(){};
23008
22806
  ` + `var $RefreshSig$ = window.$RefreshSig$ || function(){ return function(t){ return t; }; };
23009
22807
  ${transpiled}`;
23010
- const relPath = relative15(projectRoot, filePath).replace(/\\/g, "/");
22808
+ const relPath = relative14(projectRoot, filePath).replace(/\\/g, "/");
23011
22809
  transpiled = transpiled.replace(/\binput\.tsx:/g, `${relPath}:`);
23012
22810
  transpiled += buildIslandMetadataExports(raw);
23013
22811
  return rewriteImports(transpiled, filePath, projectRoot, rewriter);
@@ -23168,11 +22966,11 @@ ${code}`;
23168
22966
  if (compiled.css?.code) {
23169
22967
  const cssPath = `${filePath}.css`;
23170
22968
  svelteExternalCss.set(cssPath, compiled.css.code);
23171
- const cssUrl = srcUrl(relative15(projectRoot, cssPath), projectRoot);
22969
+ const cssUrl = srcUrl(relative14(projectRoot, cssPath), projectRoot);
23172
22970
  code = `import "${cssUrl}";
23173
22971
  ${code}`;
23174
22972
  }
23175
- const moduleUrl = `${SRC_PREFIX}${relative15(projectRoot, filePath).replace(/\\/g, "/")}`;
22973
+ const moduleUrl = `${SRC_PREFIX}${relative14(projectRoot, filePath).replace(/\\/g, "/")}`;
23176
22974
  code = code.replace(/if\s*\(import\.meta\.hot\)\s*\{/, `if (typeof window !== "undefined") {
23177
22975
  ` + ` if (!window.__SVELTE_HMR_ACCEPT__) window.__SVELTE_HMR_ACCEPT__ = {};
23178
22976
  ` + ` var __hmr_accept = function(cb) { window.__SVELTE_HMR_ACCEPT__[${JSON.stringify(moduleUrl)}] = cb; };`);
@@ -23264,7 +23062,7 @@ ${code}`;
23264
23062
  return rewriteImports(code, filePath, projectRoot, rewriter);
23265
23063
  }, injectVueHmr = (code, filePath, projectRoot, vueDir) => {
23266
23064
  const hmrBase = vueDir ? resolve38(vueDir) : projectRoot;
23267
- const hmrId = relative15(hmrBase, filePath).replace(/\\/g, "/").replace(/\.vue$/, "");
23065
+ const hmrId = relative14(hmrBase, filePath).replace(/\\/g, "/").replace(/\.vue$/, "");
23268
23066
  let result = code.replace(/export\s+default\s+/, "var __hmr_comp__ = ");
23269
23067
  result += [
23270
23068
  "",
@@ -23726,7 +23524,7 @@ __export(exports_hmrCompiler, {
23726
23524
  getApplyMetadataModule: () => getApplyMetadataModule,
23727
23525
  encodeHmrComponentId: () => encodeHmrComponentId
23728
23526
  });
23729
- import { dirname as dirname26, relative as relative16, resolve as resolve39 } from "path";
23527
+ import { dirname as dirname25, relative as relative15, resolve as resolve39 } from "path";
23730
23528
  import { performance as performance2 } from "perf_hooks";
23731
23529
  var getApplyMetadataModule = async (encodedId) => {
23732
23530
  const decoded = decodeURIComponent(encodedId);
@@ -23736,7 +23534,7 @@ var getApplyMetadataModule = async (encodedId) => {
23736
23534
  const filePathRel = decoded.slice(0, at2);
23737
23535
  const className = decoded.slice(at2 + 1);
23738
23536
  const componentFilePath = resolve39(process.cwd(), filePathRel);
23739
- const projectRelPath = relative16(process.cwd(), componentFilePath).replace(/\\/g, "/");
23537
+ const projectRelPath = relative15(process.cwd(), componentFilePath).replace(/\\/g, "/");
23740
23538
  const cacheKey2 = encodeURIComponent(`${projectRelPath}@${className}`);
23741
23539
  const { takePendingModule: takePendingModule2 } = await Promise.resolve().then(() => (init_fastHmrCompiler(), exports_fastHmrCompiler));
23742
23540
  const cached = takePendingModule2(cacheKey2);
@@ -23746,7 +23544,7 @@ var getApplyMetadataModule = async (encodedId) => {
23746
23544
  const { resolveOwningComponents: resolveOwningComponents2 } = await Promise.resolve().then(() => (init_resolveOwningComponents(), exports_resolveOwningComponents));
23747
23545
  const owners = resolveOwningComponents2({
23748
23546
  changedFilePath: componentFilePath,
23749
- userAngularRoot: dirname26(componentFilePath)
23547
+ userAngularRoot: dirname25(componentFilePath)
23750
23548
  });
23751
23549
  const owner = owners.find((o3) => o3.className === className);
23752
23550
  const kind = owner?.kind ?? "component";
@@ -23758,7 +23556,7 @@ var getApplyMetadataModule = async (encodedId) => {
23758
23556
  }
23759
23557
  return null;
23760
23558
  }, encodeHmrComponentId = (absoluteFilePath, className) => {
23761
- const projectRel = relative16(process.cwd(), absoluteFilePath).replace(/\\/g, "/");
23559
+ const projectRel = relative15(process.cwd(), absoluteFilePath).replace(/\\/g, "/");
23762
23560
  return `${projectRel}@${className}`;
23763
23561
  };
23764
23562
  var init_hmrCompiler = __esm(() => {
@@ -23954,7 +23752,7 @@ var init_simpleHTMXHMR = () => {};
23954
23752
 
23955
23753
  // src/dev/rebuildTrigger.ts
23956
23754
  import { existsSync as existsSync33, rmSync as rmSync3 } from "fs";
23957
- import { basename as basename14, dirname as dirname27, join as join42, relative as relative17, resolve as resolve42, sep as sep4 } from "path";
23755
+ import { basename as basename14, dirname as dirname26, join as join40, relative as relative16, resolve as resolve42, sep as sep4 } from "path";
23958
23756
  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) => {
23959
23757
  if (!config.tailwind)
23960
23758
  return;
@@ -24071,8 +23869,8 @@ var moduleServerPromise, getModuleServer = () => moduleServerPromise, runSequent
24071
23869
  const relJs = `${rel.slice(0, -ext[0].length)}.js`;
24072
23870
  const generatedDir = getFrameworkGeneratedDir(framework, cwd2);
24073
23871
  for (const candidate of [
24074
- join42(generatedDir, relJs),
24075
- `${join42(generatedDir, relJs)}.map`
23872
+ join40(generatedDir, relJs),
23873
+ `${join40(generatedDir, relJs)}.map`
24076
23874
  ]) {
24077
23875
  try {
24078
23876
  rmSync3(candidate, { force: true });
@@ -24277,14 +24075,14 @@ var moduleServerPromise, getModuleServer = () => moduleServerPromise, runSequent
24277
24075
  const buildDir = state.resolvedPaths.buildDir;
24278
24076
  const destPath = resolve42(buildDir, urlPrefix ? `${urlPrefix}/${relFromDir}` : relFromDir);
24279
24077
  const { mkdir: mkdir7, copyFile, readFile: readFile6 } = await import("fs/promises");
24280
- const { dirname: dirname28 } = await import("path");
24281
- await mkdir7(dirname28(destPath), { recursive: true });
24078
+ const { dirname: dirname27 } = await import("path");
24079
+ await mkdir7(dirname27(destPath), { recursive: true });
24282
24080
  await copyFile(absSource, destPath);
24283
24081
  const bytes = await readFile6(destPath);
24284
24082
  const webPath = urlPrefix ? `/${urlPrefix}/${relFromDir}` : `/${relFromDir}`;
24285
24083
  state.assetStore.set(webPath, new Uint8Array(bytes));
24286
24084
  state.fileHashes.set(absSource, currentHash);
24287
- logHmrUpdate(relative17(process.cwd(), filePath));
24085
+ logHmrUpdate(relative16(process.cwd(), filePath));
24288
24086
  broadcastToClients(state, {
24289
24087
  data: {
24290
24088
  framework: urlPrefix || "public",
@@ -24302,7 +24100,7 @@ var moduleServerPromise, getModuleServer = () => moduleServerPromise, runSequent
24302
24100
  return;
24303
24101
  if (framework === "unknown") {
24304
24102
  invalidate(resolve42(filePath));
24305
- const relPath = relative17(process.cwd(), filePath);
24103
+ const relPath = relative16(process.cwd(), filePath);
24306
24104
  logHmrUpdate(relPath);
24307
24105
  const angularDir = state.resolvedPaths.angularDir;
24308
24106
  let hasAngularDependent = false;
@@ -24480,7 +24278,7 @@ var moduleServerPromise, getModuleServer = () => moduleServerPromise, runSequent
24480
24278
  const keepByDir = new Map;
24481
24279
  const prefixByDir = new Map;
24482
24280
  for (const artifact of freshOutputs) {
24483
- const dir = dirname27(artifact.path);
24281
+ const dir = dirname26(artifact.path);
24484
24282
  const name = basename14(artifact.path);
24485
24283
  const [prefix] = name.split(".");
24486
24284
  if (!prefix)
@@ -24893,7 +24691,7 @@ var moduleServerPromise, getModuleServer = () => moduleServerPromise, runSequent
24893
24691
  try {
24894
24692
  const { invalidateModule: invalidateModule2 } = await Promise.resolve().then(() => (init_moduleServer(), exports_moduleServer));
24895
24693
  for (const tsFile of tsFilesToRefresh) {
24896
- const rel = relative17(angularDirAbs, tsFile).replace(/\\/g, "/").replace(/\.[tj]sx?$/, ".js");
24694
+ const rel = relative16(angularDirAbs, tsFile).replace(/\\/g, "/").replace(/\.[tj]sx?$/, ".js");
24897
24695
  const compiledFile = resolve42(compiledRoot, rel);
24898
24696
  invalidateModule2(compiledFile);
24899
24697
  }
@@ -24910,12 +24708,12 @@ var moduleServerPromise, getModuleServer = () => moduleServerPromise, runSequent
24910
24708
  try {
24911
24709
  const { primeComponentFingerprint: primeComponentFingerprint2 } = await Promise.resolve().then(() => (init_fastHmrCompiler(), exports_fastHmrCompiler));
24912
24710
  const { readdir: readdir5 } = await import("fs/promises");
24913
- const { join: join43 } = await import("path");
24711
+ const { join: join41 } = await import("path");
24914
24712
  const walk = async (dir) => {
24915
24713
  const entries = await readdir5(dir, { withFileTypes: true });
24916
24714
  const files = [];
24917
24715
  for (const entry of entries) {
24918
- const full = join43(dir, entry.name);
24716
+ const full = join41(dir, entry.name);
24919
24717
  if (entry.isDirectory()) {
24920
24718
  files.push(...await walk(full));
24921
24719
  } else if (entry.isFile() && entry.name.endsWith(".ts") && !entry.name.endsWith(".d.ts")) {
@@ -24992,7 +24790,7 @@ var moduleServerPromise, getModuleServer = () => moduleServerPromise, runSequent
24992
24790
  }, getModuleUrl = async (pageFile) => {
24993
24791
  const { invalidateModule: invalidateModule2, warmCache: warmCache2, SRC_URL_PREFIX: SRC_URL_PREFIX2 } = await Promise.resolve().then(() => (init_moduleServer(), exports_moduleServer));
24994
24792
  invalidateModule2(pageFile);
24995
- const rel = relative17(process.cwd(), pageFile).replace(/\\/g, "/");
24793
+ const rel = relative16(process.cwd(), pageFile).replace(/\\/g, "/");
24996
24794
  const url = `${SRC_URL_PREFIX2}${rel}`;
24997
24795
  warmCache2(url);
24998
24796
  return url;
@@ -25023,7 +24821,7 @@ var moduleServerPromise, getModuleServer = () => moduleServerPromise, runSequent
25023
24821
  const pageModuleUrl = await getReactModuleUrl(broadcastTarget);
25024
24822
  if (pageModuleUrl) {
25025
24823
  const serverDuration = Date.now() - startTime;
25026
- state.lastHmrPath = relative17(process.cwd(), primaryFile).replace(/\\/g, "/");
24824
+ state.lastHmrPath = relative16(process.cwd(), primaryFile).replace(/\\/g, "/");
25027
24825
  state.lastHmrFramework = "react";
25028
24826
  broadcastToClients(state, {
25029
24827
  data: {
@@ -25358,7 +25156,7 @@ var moduleServerPromise, getModuleServer = () => moduleServerPromise, runSequent
25358
25156
  const { vueServerPaths, vueIndexPaths, vueClientPaths, vueCssPaths } = await compileVue2(vueFiles, vueDir, true, getStyleTransformConfig(state.config));
25359
25157
  const serverEntries = [...vueServerPaths];
25360
25158
  const clientEntries = [...vueIndexPaths, ...vueClientPaths];
25361
- const cssOutDir = join42(buildDir, state.resolvedPaths.assetsDir ? basename14(state.resolvedPaths.assetsDir) : "assets", "css");
25159
+ const cssOutDir = join40(buildDir, state.resolvedPaths.assetsDir ? basename14(state.resolvedPaths.assetsDir) : "assets", "css");
25362
25160
  const { serverRoot, serverOutDir } = await computeServerOutPaths(state.resolvedPaths, "vue");
25363
25161
  const [serverResult, clientResult, cssResult] = await Promise.all([
25364
25162
  serverEntries.length > 0 ? bunBuild9({
@@ -25514,7 +25312,7 @@ var moduleServerPromise, getModuleServer = () => moduleServerPromise, runSequent
25514
25312
  const duration = Date.now() - startTime;
25515
25313
  const [primary] = emberFiles;
25516
25314
  if (primary) {
25517
- state.lastHmrPath = relative17(process.cwd(), primary).replace(/\\/g, "/");
25315
+ state.lastHmrPath = relative16(process.cwd(), primary).replace(/\\/g, "/");
25518
25316
  state.lastHmrFramework = "ember";
25519
25317
  logHmrUpdate(primary, "ember", duration);
25520
25318
  }
@@ -25599,7 +25397,7 @@ var moduleServerPromise, getModuleServer = () => moduleServerPromise, runSequent
25599
25397
  if (!buildReference?.source) {
25600
25398
  return;
25601
25399
  }
25602
- const sourcePath = buildReference.source.startsWith("file://") ? new URL(buildReference.source).pathname : resolve42(dirname27(buildInfo.resolvedRegistryPath), buildReference.source);
25400
+ const sourcePath = buildReference.source.startsWith("file://") ? new URL(buildReference.source).pathname : resolve42(dirname26(buildInfo.resolvedRegistryPath), buildReference.source);
25603
25401
  islandFiles.add(resolve42(sourcePath));
25604
25402
  }, resolveIslandSourceFiles = async (config) => {
25605
25403
  const registryPath = config.islands?.registry;
@@ -25757,7 +25555,7 @@ var moduleServerPromise, getModuleServer = () => moduleServerPromise, runSequent
25757
25555
  const baseName = fileName.replace(/\.vue$/, "");
25758
25556
  const pascalName = toPascal(baseName);
25759
25557
  const vueRoot = config.vueDirectory;
25760
- const hmrId = vueRoot ? relative17(vueRoot, vuePagePath).replace(/\\/g, "/").replace(/\.vue$/, "") : baseName;
25558
+ const hmrId = vueRoot ? relative16(vueRoot, vuePagePath).replace(/\\/g, "/").replace(/\.vue$/, "") : baseName;
25761
25559
  const cssKey = `${pascalName}CSS`;
25762
25560
  const cssUrl = manifest[cssKey] || null;
25763
25561
  const { vueHmrMetadata: vueHmrMetadata2 } = await Promise.resolve().then(() => (init_compileVue(), exports_compileVue));
@@ -26352,8 +26150,8 @@ __export(exports_buildDepVendor, {
26352
26150
  computeDepVendorPaths: () => computeDepVendorPaths,
26353
26151
  buildDepVendor: () => buildDepVendor
26354
26152
  });
26355
- import { mkdirSync as mkdirSync16 } from "fs";
26356
- import { join as join43 } from "path";
26153
+ import { mkdirSync as mkdirSync14 } from "fs";
26154
+ import { join as join41 } from "path";
26357
26155
  import { rm as rm10 } from "fs/promises";
26358
26156
  var {build: bunBuild9, Glob: Glob10 } = globalThis.Bun;
26359
26157
  var toSafeFileName6 = (specifier) => {
@@ -26464,7 +26262,7 @@ var toSafeFileName6 = (specifier) => {
26464
26262
  }), buildDepVendorPass = async (specifiers, vendorDir, tmpDir) => {
26465
26263
  const entries = await Promise.all(specifiers.map(async (specifier) => {
26466
26264
  const safeName = toSafeFileName6(specifier);
26467
- const entryPath = join43(tmpDir, `${safeName}.ts`);
26265
+ const entryPath = join41(tmpDir, `${safeName}.ts`);
26468
26266
  await Bun.write(entryPath, await generateVendorEntrySource(specifier));
26469
26267
  return { entryPath, specifier };
26470
26268
  }));
@@ -26525,10 +26323,10 @@ var toSafeFileName6 = (specifier) => {
26525
26323
  const { dep: initialSpecs, framework: frameworkRoots } = await scanBareImports(directories);
26526
26324
  if (initialSpecs.length === 0 && frameworkRoots.length === 0)
26527
26325
  return {};
26528
- const vendorDir = join43(buildDir, "vendor");
26529
- mkdirSync16(vendorDir, { recursive: true });
26530
- const tmpDir = join43(buildDir, "_dep_vendor_tmp");
26531
- mkdirSync16(tmpDir, { recursive: true });
26326
+ const vendorDir = join41(buildDir, "vendor");
26327
+ mkdirSync14(vendorDir, { recursive: true });
26328
+ const tmpDir = join41(buildDir, "_dep_vendor_tmp");
26329
+ mkdirSync14(tmpDir, { recursive: true });
26532
26330
  const allSpecs = new Set(initialSpecs);
26533
26331
  const alreadyScanned = new Set;
26534
26332
  let frontier = [...allSpecs, ...frameworkRoots];
@@ -27228,13 +27026,13 @@ __export(exports_devtoolsJson, {
27228
27026
  normalizeDevtoolsWorkspaceRoot: () => normalizeDevtoolsWorkspaceRoot,
27229
27027
  devtoolsJson: () => devtoolsJson
27230
27028
  });
27231
- import { existsSync as existsSync34, mkdirSync as mkdirSync17, readFileSync as readFileSync26, writeFileSync as writeFileSync12 } from "fs";
27232
- import { dirname as dirname28, join as join44, resolve as resolve44 } from "path";
27029
+ import { existsSync as existsSync34, mkdirSync as mkdirSync15, readFileSync as readFileSync26, writeFileSync as writeFileSync10 } from "fs";
27030
+ import { dirname as dirname27, join as join42, resolve as resolve44 } from "path";
27233
27031
  import { Elysia as Elysia3 } from "elysia";
27234
27032
  var ENDPOINT = "/.well-known/appspecific/com.chrome.devtools.json", UUID_CACHE_KEY = "__absoluteDevtoolsWorkspaceUuid", getGlobalUuid = () => Reflect.get(globalThis, UUID_CACHE_KEY), setGlobalUuid = (uuid) => {
27235
27033
  Reflect.set(globalThis, UUID_CACHE_KEY, uuid);
27236
27034
  return uuid;
27237
- }, 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) => {
27035
+ }, 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 ?? join42(buildDir, ".absolute", "chrome-devtools-workspace-uuid")), readCachedUuid = (cachePath) => {
27238
27036
  if (!existsSync34(cachePath))
27239
27037
  return null;
27240
27038
  try {
@@ -27256,8 +27054,8 @@ var ENDPOINT = "/.well-known/appspecific/com.chrome.devtools.json", UUID_CACHE_K
27256
27054
  if (cachedUuid)
27257
27055
  return setGlobalUuid(cachedUuid);
27258
27056
  const uuid = crypto.randomUUID();
27259
- mkdirSync17(dirname28(cachePath), { recursive: true });
27260
- writeFileSync12(cachePath, uuid, "utf-8");
27057
+ mkdirSync15(dirname27(cachePath), { recursive: true });
27058
+ writeFileSync10(cachePath, uuid, "utf-8");
27261
27059
  return setGlobalUuid(uuid);
27262
27060
  }, devtoolsJson = (buildDir, options = {}) => {
27263
27061
  const rootPath = resolve44(options.projectRoot ?? process.cwd());
@@ -27273,11 +27071,11 @@ var ENDPOINT = "/.well-known/appspecific/com.chrome.devtools.json", UUID_CACHE_K
27273
27071
  if (process.env.WSL_DISTRO_NAME) {
27274
27072
  const distro = process.env.WSL_DISTRO_NAME;
27275
27073
  const withoutLeadingSlash = root.replace(/^\//, "");
27276
- return join44("\\\\wsl.localhost", distro, withoutLeadingSlash).replace(/\//g, "\\");
27074
+ return join42("\\\\wsl.localhost", distro, withoutLeadingSlash).replace(/\//g, "\\");
27277
27075
  }
27278
27076
  if (process.env.DOCKER_DESKTOP && !root.startsWith("\\\\")) {
27279
27077
  const withoutLeadingSlash = root.replace(/^\//, "");
27280
- return join44("\\\\wsl.localhost", "docker-desktop-data", withoutLeadingSlash).replace(/\//g, "\\");
27078
+ return join42("\\\\wsl.localhost", "docker-desktop-data", withoutLeadingSlash).replace(/\//g, "\\");
27281
27079
  }
27282
27080
  return root;
27283
27081
  };
@@ -27508,8 +27306,8 @@ __export(exports_prerender, {
27508
27306
  prerender: () => prerender,
27509
27307
  PRERENDER_BYPASS_HEADER: () => PRERENDER_BYPASS_HEADER
27510
27308
  });
27511
- import { mkdirSync as mkdirSync18, readFileSync as readFileSync27 } from "fs";
27512
- import { join as join45 } from "path";
27309
+ import { mkdirSync as mkdirSync16, readFileSync as readFileSync27 } from "fs";
27310
+ import { join as join43 } from "path";
27513
27311
  var SERVER_OUTPUT_LIMIT = 4000, STARTUP_POLL_INTERVAL_MS = 100, DEFAULT_STARTUP_TIMEOUT_MS = 30000, PRERENDER_BYPASS_HEADER = "X-Absolute-Prerender-Bypass", routeToFilename = (route) => route === "/" ? "index.html" : `${route.slice(1).replace(/\//g, "-")}.html`, writeTimestamp = async (htmlPath) => {
27514
27312
  const metaPath = htmlPath.replace(/\.html$/, ".meta");
27515
27313
  await Bun.write(metaPath, String(Date.now()));
@@ -27575,7 +27373,7 @@ var SERVER_OUTPUT_LIMIT = 4000, STARTUP_POLL_INTERVAL_MS = 100, DEFAULT_STARTUP_
27575
27373
  return false;
27576
27374
  const html = await res.text();
27577
27375
  const fileName = routeToFilename(route);
27578
- const filePath = join45(prerenderDir, fileName);
27376
+ const filePath = join43(prerenderDir, fileName);
27579
27377
  await Bun.write(filePath, html);
27580
27378
  await writeTimestamp(filePath);
27581
27379
  return true;
@@ -27601,14 +27399,14 @@ var SERVER_OUTPUT_LIMIT = 4000, STARTUP_POLL_INTERVAL_MS = 100, DEFAULT_STARTUP_
27601
27399
  }
27602
27400
  const html = await res.text();
27603
27401
  const fileName = routeToFilename(route);
27604
- const filePath = join45(prerenderDir, fileName);
27402
+ const filePath = join43(prerenderDir, fileName);
27605
27403
  await Bun.write(filePath, html);
27606
27404
  await writeTimestamp(filePath);
27607
27405
  result.routes.set(route, filePath);
27608
27406
  log2?.(` Pre-rendered ${route} \u2192 ${fileName} (${html.length} bytes)`);
27609
27407
  }, prerender = async (port, outDir, staticConfig, log2) => {
27610
- const prerenderDir = join45(outDir, "_prerendered");
27611
- mkdirSync18(prerenderDir, { recursive: true });
27408
+ const prerenderDir = join43(outDir, "_prerendered");
27409
+ mkdirSync16(prerenderDir, { recursive: true });
27612
27410
  const baseUrl = `http://localhost:${port}`;
27613
27411
  let routes;
27614
27412
  if (staticConfig.routes === "all") {
@@ -27709,7 +27507,7 @@ __export(exports_serverEntryWatcher, {
27709
27507
  });
27710
27508
  import { existsSync as existsSync38, statSync as statSync8, watch as watch2 } from "fs";
27711
27509
  import { createRequire as createRequire2 } from "module";
27712
- import { dirname as dirname29, join as join48, resolve as resolve47 } from "path";
27510
+ import { dirname as dirname28, join as join46, resolve as resolve47 } from "path";
27713
27511
  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 = () => {
27714
27512
  if (globalThis.__absoluteEntryWatcherStarted)
27715
27513
  return;
@@ -27718,10 +27516,10 @@ var ATOMIC_RECOVERY_WINDOW_MS = 1000, RELOAD_DEBOUNCE_MS = 80, ATOMIC_WRITE_TEMP
27718
27516
  return;
27719
27517
  globalThis.__absoluteEntryWatcherStarted = true;
27720
27518
  const entryPath = resolve47(main);
27721
- const entryDir = dirname29(entryPath);
27519
+ const entryDir = dirname28(entryPath);
27722
27520
  const entryBase = entryPath.slice(entryDir.length + 1);
27723
27521
  const configPath2 = resolve47(process.env.ABSOLUTE_CONFIG ?? "absolute.config.ts");
27724
- const configDir2 = dirname29(configPath2);
27522
+ const configDir2 = dirname28(configPath2);
27725
27523
  const configBase = configPath2.slice(configDir2.length + 1);
27726
27524
  const recentlyHandled = new Map;
27727
27525
  let entryReloadTimer = null;
@@ -27812,7 +27610,7 @@ var ATOMIC_RECOVERY_WINDOW_MS = 1000, RELOAD_DEBOUNCE_MS = 80, ATOMIC_WRITE_TEMP
27812
27610
  continue;
27813
27611
  let st2;
27814
27612
  try {
27815
- st2 = statSync8(join48(dir, entry.name));
27613
+ st2 = statSync8(join46(dir, entry.name));
27816
27614
  } catch {
27817
27615
  continue;
27818
27616
  }
@@ -28368,7 +28166,7 @@ var handleHTMXPageRequest = async (pagePath) => {
28368
28166
  // src/core/prepare.ts
28369
28167
  init_loadConfig();
28370
28168
  import { existsSync as existsSync36, readdirSync as readdirSync7, readFileSync as readFileSync28 } from "fs";
28371
- import { basename as basename15, join as join46, relative as relative18, resolve as resolve46 } from "path";
28169
+ import { basename as basename15, join as join44, relative as relative17, resolve as resolve46 } from "path";
28372
28170
  import { Elysia as Elysia5 } from "elysia";
28373
28171
 
28374
28172
  // src/core/loadIslandRegistry.ts
@@ -28741,7 +28539,7 @@ var warmPrewarmDirs = async (prewarmDirs, warmCache2, SRC_URL_PREFIX2) => {
28741
28539
  for (const file5 of files) {
28742
28540
  if (file5.includes("/node_modules/"))
28743
28541
  continue;
28744
- const rel = relative18(process.cwd(), file5).replace(/\\/g, "/");
28542
+ const rel = relative17(process.cwd(), file5).replace(/\\/g, "/");
28745
28543
  warmCache2(`${SRC_URL_PREFIX2}${rel}`);
28746
28544
  }
28747
28545
  };
@@ -28769,7 +28567,7 @@ var patchManifestIndexes = (manifest, devIndexDir, SRC_URL_PREFIX2) => {
28769
28567
  const srcPath = resolve46(devIndexDir, fileName);
28770
28568
  if (!existsSync36(srcPath))
28771
28569
  continue;
28772
- const rel = relative18(process.cwd(), srcPath).replace(/\\/g, "/");
28570
+ const rel = relative17(process.cwd(), srcPath).replace(/\\/g, "/");
28773
28571
  manifest[key] = `${SRC_URL_PREFIX2}${rel}`;
28774
28572
  }
28775
28573
  };
@@ -28888,7 +28686,7 @@ var loadPrerenderMap = (prerenderDir) => {
28888
28686
  continue;
28889
28687
  const name = basename15(entry, ".html");
28890
28688
  const route = name === "index" ? "/" : `/${name}`;
28891
- map.set(route, join46(prerenderDir, entry));
28689
+ map.set(route, join44(prerenderDir, entry));
28892
28690
  }
28893
28691
  return map;
28894
28692
  };
@@ -28948,7 +28746,7 @@ var prepare = async (configOrPath) => {
28948
28746
  setCurrentPageIslandMetadata(await loadPageIslandMetadata(config));
28949
28747
  recordStep("load production manifest and island metadata", stepStartedAt);
28950
28748
  stepStartedAt = performance.now();
28951
- const conventionsPath = join46(buildDir, "conventions.json");
28749
+ const conventionsPath = join44(buildDir, "conventions.json");
28952
28750
  if (existsSync36(conventionsPath)) {
28953
28751
  const conventions2 = JSON.parse(readFileSync28(conventionsPath, "utf-8"));
28954
28752
  setConventions(conventions2);
@@ -28964,7 +28762,7 @@ var prepare = async (configOrPath) => {
28964
28762
  });
28965
28763
  recordStep("create static plugin", stepStartedAt);
28966
28764
  stepStartedAt = performance.now();
28967
- const prerenderDir = join46(buildDir, "_prerendered");
28765
+ const prerenderDir = join44(buildDir, "_prerendered");
28968
28766
  const prerenderMap = loadPrerenderMap(prerenderDir);
28969
28767
  recordStep("load prerender map", stepStartedAt);
28970
28768
  if (prerenderMap.size > 0) {
@@ -29022,11 +28820,11 @@ import { argv } from "process";
29022
28820
  var {env: env4 } = globalThis.Bun;
29023
28821
 
29024
28822
  // src/dev/devCert.ts
29025
- import { existsSync as existsSync37, mkdirSync as mkdirSync19, readFileSync as readFileSync29, rmSync as rmSync4 } from "fs";
29026
- import { join as join47 } from "path";
29027
- var CERT_DIR = join47(process.cwd(), ".absolutejs");
29028
- var CERT_PATH = join47(CERT_DIR, "cert.pem");
29029
- var KEY_PATH = join47(CERT_DIR, "key.pem");
28823
+ import { existsSync as existsSync37, mkdirSync as mkdirSync17, readFileSync as readFileSync29, rmSync as rmSync4 } from "fs";
28824
+ import { join as join45 } from "path";
28825
+ var CERT_DIR = join45(process.cwd(), ".absolutejs");
28826
+ var CERT_PATH = join45(CERT_DIR, "cert.pem");
28827
+ var KEY_PATH = join45(CERT_DIR, "key.pem");
29030
28828
  var CERT_VALIDITY_DAYS = 365;
29031
28829
  var devLog = (msg) => console.log(`\x1B[2m${new Date().toLocaleTimeString()}\x1B[0m \x1B[36m[dev]\x1B[0m ${msg}`);
29032
28830
  var devWarn = (msg) => console.log(`\x1B[2m${new Date().toLocaleTimeString()}\x1B[0m \x1B[33m[dev]\x1B[0m \x1B[33m${msg}\x1B[0m`);
@@ -29107,7 +28905,7 @@ var generateCert = () => {
29107
28905
  }
29108
28906
  };
29109
28907
  var ensureDevCert = () => {
29110
- mkdirSync19(CERT_DIR, { recursive: true });
28908
+ mkdirSync17(CERT_DIR, { recursive: true });
29111
28909
  if (hasCert()) {
29112
28910
  return { cert: CERT_PATH, key: KEY_PATH };
29113
28911
  }
@@ -35694,5 +35492,5 @@ export {
35694
35492
  ANGULAR_INIT_TIMEOUT_MS
35695
35493
  };
35696
35494
 
35697
- //# debugId=76639FC616A4AF9764756E2164756E21
35495
+ //# debugId=82D6CDA02768647B64756E2164756E21
35698
35496
  //# sourceMappingURL=index.js.map