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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -11060,6 +11060,10 @@ var init_updateAssetPaths = __esm(() => {
11060
11060
  });
11061
11061
 
11062
11062
  // src/dev/buildHMRClient.ts
11063
+ var exports_buildHMRClient = {};
11064
+ __export(exports_buildHMRClient, {
11065
+ buildHMRClient: () => buildHMRClient
11066
+ });
11063
11067
  import { existsSync as existsSync17 } from "fs";
11064
11068
  import { resolve as resolve15 } from "path";
11065
11069
  var {build: bunBuild } = globalThis.Bun;
@@ -11859,11 +11863,15 @@ var validateSafePath = (targetPath, baseDirectory) => {
11859
11863
  };
11860
11864
  var init_validateSafePath = () => {};
11861
11865
 
11862
- // src/build/scanAngularHandlerCalls.ts
11866
+ // src/build/scanVueSsrOnlyPages.ts
11867
+ var exports_scanVueSsrOnlyPages = {};
11868
+ __export(exports_scanVueSsrOnlyPages, {
11869
+ scanVueSsrOnlyPages: () => scanVueSsrOnlyPages
11870
+ });
11863
11871
  import { readdirSync as readdirSync2, readFileSync as readFileSync14 } from "fs";
11864
11872
  import { join as join23 } from "path";
11865
11873
  import ts6 from "typescript";
11866
- var ELYSIA_ROUTE_METHODS2, SKIP_DIRS2, SOURCE_EXTENSIONS2, getScriptKind2 = (filePath) => {
11874
+ var SKIP_DIRS2, SOURCE_EXTENSIONS2, getScriptKind2 = (filePath) => {
11867
11875
  if (filePath.endsWith(".tsx"))
11868
11876
  return ts6.ScriptKind.TSX;
11869
11877
  return ts6.ScriptKind.TS;
@@ -11901,26 +11909,173 @@ var ELYSIA_ROUTE_METHODS2, SKIP_DIRS2, SOURCE_EXTENSIONS2, getScriptKind2 = (fil
11901
11909
  }
11902
11910
  }
11903
11911
  return out;
11912
+ }, fileMayContainVueHandler = (source) => source.includes("handleVuePageRequest"), isHandleVuePageRequestCallee = (expression) => {
11913
+ if (ts6.isIdentifier(expression)) {
11914
+ return expression.text === "handleVuePageRequest";
11915
+ }
11916
+ if (ts6.isPropertyAccessExpression(expression) && ts6.isIdentifier(expression.name)) {
11917
+ return expression.name.text === "handleVuePageRequest";
11918
+ }
11919
+ return false;
11920
+ }, getPropertyName = (name) => {
11921
+ if (ts6.isIdentifier(name) || ts6.isStringLiteral(name)) {
11922
+ return name.text;
11923
+ }
11924
+ return null;
11925
+ }, readStringLiteralValue = (node) => {
11926
+ if (ts6.isStringLiteral(node) || ts6.isNoSubstitutionTemplateLiteral(node)) {
11927
+ return node.text;
11928
+ }
11929
+ return null;
11930
+ }, isAssetCall = (node) => {
11931
+ if (!ts6.isCallExpression(node))
11932
+ return false;
11933
+ if (!ts6.isIdentifier(node.expression))
11934
+ return false;
11935
+ return node.expression.text === "asset";
11936
+ }, extractAssetLiteralKey = (call) => {
11937
+ if (call.arguments.length < 2)
11938
+ return null;
11939
+ const keyArg = call.arguments[1];
11940
+ if (!keyArg)
11941
+ return null;
11942
+ return readStringLiteralValue(keyArg);
11943
+ }, extractPagePathAssetKey = (initializer) => {
11944
+ if (!isAssetCall(initializer))
11945
+ return null;
11946
+ if (!ts6.isCallExpression(initializer))
11947
+ return null;
11948
+ return extractAssetLiteralKey(initializer);
11949
+ }, extractSsrOnlyPageName = (objectLiteral) => {
11950
+ let hasClientNone = false;
11951
+ let pageAssetKey = null;
11952
+ for (const property of objectLiteral.properties) {
11953
+ if (!ts6.isPropertyAssignment(property))
11954
+ continue;
11955
+ const name = getPropertyName(property.name);
11956
+ if (!name)
11957
+ continue;
11958
+ if (name === "client") {
11959
+ const value = readStringLiteralValue(property.initializer);
11960
+ if (value === "none")
11961
+ hasClientNone = true;
11962
+ continue;
11963
+ }
11964
+ if (name === "pagePath") {
11965
+ pageAssetKey = extractPagePathAssetKey(property.initializer);
11966
+ }
11967
+ }
11968
+ if (!hasClientNone)
11969
+ return null;
11970
+ return pageAssetKey;
11971
+ }, extractFromFile = (filePath, out) => {
11972
+ let source;
11973
+ try {
11974
+ source = readFileSync14(filePath, "utf-8");
11975
+ } catch {
11976
+ return;
11977
+ }
11978
+ if (!fileMayContainVueHandler(source))
11979
+ return;
11980
+ const sourceFile = ts6.createSourceFile(filePath, source, ts6.ScriptTarget.Latest, true, getScriptKind2(filePath));
11981
+ const visit = (node) => {
11982
+ if (ts6.isCallExpression(node) && isHandleVuePageRequestCallee(node.expression)) {
11983
+ const firstArg = node.arguments[0];
11984
+ if (firstArg && ts6.isObjectLiteralExpression(firstArg)) {
11985
+ const pageName = extractSsrOnlyPageName(firstArg);
11986
+ if (pageName)
11987
+ out.add(pageName);
11988
+ }
11989
+ }
11990
+ ts6.forEachChild(node, visit);
11991
+ };
11992
+ ts6.forEachChild(sourceFile, visit);
11993
+ }, scanVueSsrOnlyPages = (projectRoot) => {
11994
+ const files = collectSourceFiles2(projectRoot);
11995
+ const ssrOnlyPageNames = new Set;
11996
+ for (const file2 of files) {
11997
+ extractFromFile(file2, ssrOnlyPageNames);
11998
+ }
11999
+ return ssrOnlyPageNames;
12000
+ };
12001
+ var init_scanVueSsrOnlyPages = __esm(() => {
12002
+ SKIP_DIRS2 = new Set([
12003
+ ".absolutejs",
12004
+ ".generated",
12005
+ ".git",
12006
+ ".next",
12007
+ ".svelte-kit",
12008
+ ".vercel",
12009
+ "build",
12010
+ "compiled",
12011
+ "dist",
12012
+ "node_modules"
12013
+ ]);
12014
+ SOURCE_EXTENSIONS2 = new Set([".ts", ".tsx", ".mts", ".cts"]);
12015
+ });
12016
+
12017
+ // src/build/scanAngularHandlerCalls.ts
12018
+ import { readdirSync as readdirSync3, readFileSync as readFileSync15 } from "fs";
12019
+ import { join as join24 } from "path";
12020
+ import ts7 from "typescript";
12021
+ var ELYSIA_ROUTE_METHODS2, SKIP_DIRS3, SOURCE_EXTENSIONS3, getScriptKind3 = (filePath) => {
12022
+ if (filePath.endsWith(".tsx"))
12023
+ return ts7.ScriptKind.TSX;
12024
+ return ts7.ScriptKind.TS;
12025
+ }, hasSourceExtension3 = (filePath) => {
12026
+ const idx = filePath.lastIndexOf(".");
12027
+ if (idx === -1)
12028
+ return false;
12029
+ return SOURCE_EXTENSIONS3.has(filePath.slice(idx));
12030
+ }, collectSourceFiles3 = (root) => {
12031
+ const out = [];
12032
+ const stack = [root];
12033
+ while (stack.length > 0) {
12034
+ const dir = stack.pop();
12035
+ if (!dir)
12036
+ continue;
12037
+ let entries;
12038
+ try {
12039
+ entries = readdirSync3(dir, {
12040
+ encoding: "utf-8",
12041
+ withFileTypes: true
12042
+ });
12043
+ } catch {
12044
+ continue;
12045
+ }
12046
+ for (const entry of entries) {
12047
+ if (entry.isDirectory()) {
12048
+ if (SKIP_DIRS3.has(entry.name))
12049
+ continue;
12050
+ if (entry.name.startsWith("."))
12051
+ continue;
12052
+ stack.push(join24(dir, entry.name));
12053
+ } else if (entry.isFile() && hasSourceExtension3(entry.name)) {
12054
+ out.push(join24(dir, entry.name));
12055
+ }
12056
+ }
12057
+ }
12058
+ return out;
11904
12059
  }, fileMayContainAngularHandler = (source) => source.includes("handleAngularPageRequest"), extractManifestKey = (pagePathValue) => {
11905
- if (!ts6.isCallExpression(pagePathValue))
12060
+ if (!ts7.isCallExpression(pagePathValue))
11906
12061
  return null;
11907
12062
  const callee = pagePathValue.expression;
11908
- if (!ts6.isIdentifier(callee) || callee.text !== "asset")
12063
+ if (!ts7.isIdentifier(callee) || callee.text !== "asset")
11909
12064
  return null;
11910
12065
  const [, second] = pagePathValue.arguments;
11911
12066
  if (!second)
11912
12067
  return null;
11913
- if (!ts6.isStringLiteral(second))
12068
+ if (!ts7.isStringLiteral(second))
11914
12069
  return null;
11915
12070
  return second.text;
11916
12071
  }, findEnclosingMountPath = (node) => {
11917
12072
  let cursor = node.parent;
11918
12073
  while (cursor) {
11919
- if (ts6.isCallExpression(cursor)) {
12074
+ if (ts7.isCallExpression(cursor)) {
11920
12075
  const callee = cursor.expression;
11921
- if (ts6.isPropertyAccessExpression(callee) && ts6.isIdentifier(callee.name) && ELYSIA_ROUTE_METHODS2.has(callee.name.text)) {
12076
+ if (ts7.isPropertyAccessExpression(callee) && ts7.isIdentifier(callee.name) && ELYSIA_ROUTE_METHODS2.has(callee.name.text)) {
11922
12077
  const firstArg = cursor.arguments[0];
11923
- if (firstArg && ts6.isStringLiteral(firstArg) && firstArg.text.startsWith("/")) {
12078
+ if (firstArg && ts7.isStringLiteral(firstArg) && firstArg.text.startsWith("/")) {
11924
12079
  return firstArg.text;
11925
12080
  }
11926
12081
  }
@@ -11931,33 +12086,33 @@ var ELYSIA_ROUTE_METHODS2, SKIP_DIRS2, SOURCE_EXTENSIONS2, getScriptKind2 = (fil
11931
12086
  }, extractCallsFromFile = (filePath, out) => {
11932
12087
  let source;
11933
12088
  try {
11934
- source = readFileSync14(filePath, "utf-8");
12089
+ source = readFileSync15(filePath, "utf-8");
11935
12090
  } catch {
11936
12091
  return;
11937
12092
  }
11938
12093
  if (!fileMayContainAngularHandler(source))
11939
12094
  return;
11940
- const sf = ts6.createSourceFile(filePath, source, ts6.ScriptTarget.Latest, true, getScriptKind2(filePath));
12095
+ const sf = ts7.createSourceFile(filePath, source, ts7.ScriptTarget.Latest, true, getScriptKind3(filePath));
11941
12096
  const visit = (node) => {
11942
- if (ts6.isCallExpression(node) && ts6.isIdentifier(node.expression) && node.expression.text === "handleAngularPageRequest") {
12097
+ if (ts7.isCallExpression(node) && ts7.isIdentifier(node.expression) && node.expression.text === "handleAngularPageRequest") {
11943
12098
  const [arg] = node.arguments;
11944
- if (arg && ts6.isObjectLiteralExpression(arg)) {
12099
+ if (arg && ts7.isObjectLiteralExpression(arg)) {
11945
12100
  let manifestKey = null;
11946
12101
  for (const prop of arg.properties) {
11947
- if (ts6.isPropertyAssignment(prop)) {
12102
+ if (ts7.isPropertyAssignment(prop)) {
11948
12103
  if (!prop.name)
11949
12104
  continue;
11950
- const name = ts6.isIdentifier(prop.name) ? prop.name.text : ts6.isStringLiteral(prop.name) ? prop.name.text : null;
12105
+ const name = ts7.isIdentifier(prop.name) ? prop.name.text : ts7.isStringLiteral(prop.name) ? prop.name.text : null;
11951
12106
  if (name === "pagePath") {
11952
12107
  manifestKey = extractManifestKey(prop.initializer);
11953
12108
  }
11954
- } else if (ts6.isSpreadAssignment(prop)) {
12109
+ } else if (ts7.isSpreadAssignment(prop)) {
11955
12110
  if (manifestKey)
11956
12111
  continue;
11957
12112
  const spreadExpr = prop.expression;
11958
- if (ts6.isCallExpression(spreadExpr) && spreadExpr.arguments.length > 0) {
12113
+ if (ts7.isCallExpression(spreadExpr) && spreadExpr.arguments.length > 0) {
11959
12114
  const [firstArg] = spreadExpr.arguments;
11960
- if (firstArg && ts6.isStringLiteral(firstArg)) {
12115
+ if (firstArg && ts7.isStringLiteral(firstArg)) {
11961
12116
  manifestKey = firstArg.text;
11962
12117
  }
11963
12118
  }
@@ -11972,11 +12127,11 @@ var ELYSIA_ROUTE_METHODS2, SKIP_DIRS2, SOURCE_EXTENSIONS2, getScriptKind2 = (fil
11972
12127
  }
11973
12128
  }
11974
12129
  }
11975
- ts6.forEachChild(node, visit);
12130
+ ts7.forEachChild(node, visit);
11976
12131
  };
11977
- ts6.forEachChild(sf, visit);
12132
+ ts7.forEachChild(sf, visit);
11978
12133
  }, scanAngularHandlerCalls = (projectRoot) => {
11979
- const files = collectSourceFiles2(projectRoot);
12134
+ const files = collectSourceFiles3(projectRoot);
11980
12135
  const collected = [];
11981
12136
  for (const file2 of files) {
11982
12137
  extractCallsFromFile(file2, collected);
@@ -11994,7 +12149,7 @@ var init_scanAngularHandlerCalls = __esm(() => {
11994
12149
  "post",
11995
12150
  "put"
11996
12151
  ]);
11997
- SKIP_DIRS2 = new Set([
12152
+ SKIP_DIRS3 = new Set([
11998
12153
  ".absolutejs",
11999
12154
  ".generated",
12000
12155
  ".git",
@@ -12006,20 +12161,20 @@ var init_scanAngularHandlerCalls = __esm(() => {
12006
12161
  "dist",
12007
12162
  "node_modules"
12008
12163
  ]);
12009
- SOURCE_EXTENSIONS2 = new Set([".ts", ".tsx", ".mts", ".cts"]);
12164
+ SOURCE_EXTENSIONS3 = new Set([".ts", ".tsx", ".mts", ".cts"]);
12010
12165
  });
12011
12166
 
12012
12167
  // src/build/scanAngularPageRoutes.ts
12013
- import { readdirSync as readdirSync3, readFileSync as readFileSync15 } from "fs";
12014
- import { basename as basename6, join as join24 } from "path";
12015
- import ts7 from "typescript";
12016
- var SOURCE_EXTENSIONS3, SKIP_DIRS3, hasSourceExtension3 = (filePath) => {
12168
+ import { readdirSync as readdirSync4, readFileSync as readFileSync16 } from "fs";
12169
+ import { basename as basename6, join as join25 } from "path";
12170
+ import ts8 from "typescript";
12171
+ var SOURCE_EXTENSIONS4, SKIP_DIRS4, hasSourceExtension4 = (filePath) => {
12017
12172
  const idx = filePath.lastIndexOf(".");
12018
12173
  if (idx === -1)
12019
12174
  return false;
12020
- return SOURCE_EXTENSIONS3.has(filePath.slice(idx));
12175
+ return SOURCE_EXTENSIONS4.has(filePath.slice(idx));
12021
12176
  }, isPageFile = (filePath) => {
12022
- if (!hasSourceExtension3(filePath))
12177
+ if (!hasSourceExtension4(filePath))
12023
12178
  return false;
12024
12179
  const base = basename6(filePath);
12025
12180
  if (base.endsWith(".d.ts"))
@@ -12038,7 +12193,7 @@ var SOURCE_EXTENSIONS3, SKIP_DIRS3, hasSourceExtension3 = (filePath) => {
12038
12193
  continue;
12039
12194
  let entries;
12040
12195
  try {
12041
- entries = readdirSync3(dir, {
12196
+ entries = readdirSync4(dir, {
12042
12197
  encoding: "utf-8",
12043
12198
  withFileTypes: true
12044
12199
  });
@@ -12047,13 +12202,13 @@ var SOURCE_EXTENSIONS3, SKIP_DIRS3, hasSourceExtension3 = (filePath) => {
12047
12202
  }
12048
12203
  for (const entry of entries) {
12049
12204
  if (entry.isDirectory()) {
12050
- if (SKIP_DIRS3.has(entry.name))
12205
+ if (SKIP_DIRS4.has(entry.name))
12051
12206
  continue;
12052
12207
  if (entry.name.startsWith("."))
12053
12208
  continue;
12054
- stack.push(join24(dir, entry.name));
12209
+ stack.push(join25(dir, entry.name));
12055
12210
  } else if (entry.isFile() && isPageFile(entry.name)) {
12056
- out.push(join24(dir, entry.name));
12211
+ out.push(join25(dir, entry.name));
12057
12212
  }
12058
12213
  }
12059
12214
  }
@@ -12061,15 +12216,15 @@ var SOURCE_EXTENSIONS3, SKIP_DIRS3, hasSourceExtension3 = (filePath) => {
12061
12216
  }, hasTopLevelRoutesExport = (source, filePath) => {
12062
12217
  if (!source.includes("routes"))
12063
12218
  return false;
12064
- const sf = ts7.createSourceFile(filePath, source, ts7.ScriptTarget.Latest, true, ts7.ScriptKind.TS);
12219
+ const sf = ts8.createSourceFile(filePath, source, ts8.ScriptTarget.Latest, true, ts8.ScriptKind.TS);
12065
12220
  for (const statement of sf.statements) {
12066
- if (!ts7.isVariableStatement(statement))
12221
+ if (!ts8.isVariableStatement(statement))
12067
12222
  continue;
12068
- const isExported = statement.modifiers?.some((modifier) => modifier.kind === ts7.SyntaxKind.ExportKeyword);
12223
+ const isExported = statement.modifiers?.some((modifier) => modifier.kind === ts8.SyntaxKind.ExportKeyword);
12069
12224
  if (!isExported)
12070
12225
  continue;
12071
12226
  for (const declaration of statement.declarationList.declarations) {
12072
- if (!ts7.isIdentifier(declaration.name))
12227
+ if (!ts8.isIdentifier(declaration.name))
12073
12228
  continue;
12074
12229
  if (declaration.name.text === "routes")
12075
12230
  return true;
@@ -12082,7 +12237,7 @@ var SOURCE_EXTENSIONS3, SKIP_DIRS3, hasSourceExtension3 = (filePath) => {
12082
12237
  for (const file2 of files) {
12083
12238
  let source;
12084
12239
  try {
12085
- source = readFileSync15(file2, "utf-8");
12240
+ source = readFileSync16(file2, "utf-8");
12086
12241
  } catch {
12087
12242
  continue;
12088
12243
  }
@@ -12098,8 +12253,8 @@ var SOURCE_EXTENSIONS3, SKIP_DIRS3, hasSourceExtension3 = (filePath) => {
12098
12253
  return out;
12099
12254
  };
12100
12255
  var init_scanAngularPageRoutes = __esm(() => {
12101
- SOURCE_EXTENSIONS3 = new Set([".ts", ".tsx", ".mts", ".cts"]);
12102
- SKIP_DIRS3 = new Set([
12256
+ SOURCE_EXTENSIONS4 = new Set([".ts", ".tsx", ".mts", ".cts"]);
12257
+ SKIP_DIRS4 = new Set([
12103
12258
  ".absolutejs",
12104
12259
  ".generated",
12105
12260
  ".git",
@@ -12129,46 +12284,46 @@ var exports_parseAngularConfigImports = {};
12129
12284
  __export(exports_parseAngularConfigImports, {
12130
12285
  parseAngularProvidersImport: () => parseAngularProvidersImport
12131
12286
  });
12132
- import { existsSync as existsSync20, readFileSync as readFileSync16 } from "fs";
12133
- import { dirname as dirname13, isAbsolute as isAbsolute3, join as join25 } from "path";
12134
- import ts8 from "typescript";
12287
+ import { existsSync as existsSync20, readFileSync as readFileSync17 } from "fs";
12288
+ import { dirname as dirname13, isAbsolute as isAbsolute3, join as join26 } from "path";
12289
+ import ts9 from "typescript";
12135
12290
  var findDefineConfigCall = (sf) => {
12136
12291
  let result = null;
12137
12292
  const visit = (node) => {
12138
12293
  if (result)
12139
12294
  return;
12140
- if (ts8.isCallExpression(node) && ts8.isIdentifier(node.expression) && node.expression.text === "defineConfig") {
12295
+ if (ts9.isCallExpression(node) && ts9.isIdentifier(node.expression) && node.expression.text === "defineConfig") {
12141
12296
  const [arg] = node.arguments;
12142
- if (arg && ts8.isObjectLiteralExpression(arg)) {
12297
+ if (arg && ts9.isObjectLiteralExpression(arg)) {
12143
12298
  result = arg;
12144
12299
  return;
12145
12300
  }
12146
12301
  }
12147
- ts8.forEachChild(node, visit);
12302
+ ts9.forEachChild(node, visit);
12148
12303
  };
12149
- ts8.forEachChild(sf, visit);
12304
+ ts9.forEachChild(sf, visit);
12150
12305
  return result;
12151
12306
  }, findPropertyInitializer = (object, name) => {
12152
12307
  for (const prop of object.properties) {
12153
- if (!ts8.isPropertyAssignment(prop))
12308
+ if (!ts9.isPropertyAssignment(prop))
12154
12309
  continue;
12155
12310
  if (!prop.name)
12156
12311
  continue;
12157
- const key = ts8.isIdentifier(prop.name) ? prop.name.text : ts8.isStringLiteral(prop.name) ? prop.name.text : null;
12312
+ const key = ts9.isIdentifier(prop.name) ? prop.name.text : ts9.isStringLiteral(prop.name) ? prop.name.text : null;
12158
12313
  if (key === name)
12159
12314
  return prop.initializer;
12160
12315
  }
12161
12316
  return null;
12162
12317
  }, findImportForBinding = (sf, binding) => {
12163
12318
  for (const statement of sf.statements) {
12164
- if (!ts8.isImportDeclaration(statement))
12319
+ if (!ts9.isImportDeclaration(statement))
12165
12320
  continue;
12166
- if (!ts8.isStringLiteral(statement.moduleSpecifier))
12321
+ if (!ts9.isStringLiteral(statement.moduleSpecifier))
12167
12322
  continue;
12168
12323
  if (statement.importClause?.isTypeOnly)
12169
12324
  continue;
12170
12325
  const named = statement.importClause?.namedBindings;
12171
- if (!named || !ts8.isNamedImports(named))
12326
+ if (!named || !ts9.isNamedImports(named))
12172
12327
  continue;
12173
12328
  for (const element of named.elements) {
12174
12329
  if (element.isTypeOnly)
@@ -12185,15 +12340,15 @@ var findDefineConfigCall = (sf) => {
12185
12340
  }, resolveConfigPath = (projectRoot) => {
12186
12341
  const envOverride = process.env.ABSOLUTE_CONFIG;
12187
12342
  if (envOverride) {
12188
- const resolved = isAbsolute3(envOverride) ? envOverride : join25(projectRoot, envOverride);
12343
+ const resolved = isAbsolute3(envOverride) ? envOverride : join26(projectRoot, envOverride);
12189
12344
  if (existsSync20(resolved))
12190
12345
  return resolved;
12191
12346
  }
12192
12347
  const candidates = [
12193
- join25(projectRoot, "absolute.config.ts"),
12194
- join25(projectRoot, "absolute.config.mts"),
12195
- join25(projectRoot, "absolute.config.js"),
12196
- join25(projectRoot, "absolute.config.mjs")
12348
+ join26(projectRoot, "absolute.config.ts"),
12349
+ join26(projectRoot, "absolute.config.mts"),
12350
+ join26(projectRoot, "absolute.config.js"),
12351
+ join26(projectRoot, "absolute.config.mjs")
12197
12352
  ];
12198
12353
  for (const candidate of candidates) {
12199
12354
  if (existsSync20(candidate))
@@ -12204,29 +12359,29 @@ var findDefineConfigCall = (sf) => {
12204
12359
  const configPath2 = resolveConfigPath(projectRoot);
12205
12360
  if (!configPath2)
12206
12361
  return null;
12207
- const source = readFileSync16(configPath2, "utf-8");
12362
+ const source = readFileSync17(configPath2, "utf-8");
12208
12363
  if (!source.includes("angular"))
12209
12364
  return null;
12210
12365
  if (!source.includes("providers"))
12211
12366
  return null;
12212
- const sf = ts8.createSourceFile(configPath2, source, ts8.ScriptTarget.Latest, true, ts8.ScriptKind.TS);
12367
+ const sf = ts9.createSourceFile(configPath2, source, ts9.ScriptTarget.Latest, true, ts9.ScriptKind.TS);
12213
12368
  const configObject = findDefineConfigCall(sf);
12214
12369
  if (!configObject)
12215
12370
  return null;
12216
12371
  const angularField = findPropertyInitializer(configObject, "angular");
12217
- if (!angularField || !ts8.isObjectLiteralExpression(angularField))
12372
+ if (!angularField || !ts9.isObjectLiteralExpression(angularField))
12218
12373
  return null;
12219
12374
  const providersField = findPropertyInitializer(angularField, "providers");
12220
12375
  if (!providersField)
12221
12376
  return null;
12222
- if (!ts8.isIdentifier(providersField))
12377
+ if (!ts9.isIdentifier(providersField))
12223
12378
  return null;
12224
12379
  const binding = providersField.text;
12225
12380
  const importInfo = findImportForBinding(sf, binding);
12226
12381
  if (!importInfo)
12227
12382
  return null;
12228
12383
  const configDir2 = dirname13(configPath2);
12229
- const absolutePath = importInfo.source.startsWith(".") ? join25(configDir2, importInfo.source).replace(/\.[cm]?[tj]sx?$/, "") : isAbsolute3(importInfo.source) ? importInfo.source.replace(/\.[cm]?[tj]sx?$/, "") : importInfo.source;
12384
+ const absolutePath = importInfo.source.startsWith(".") ? join26(configDir2, importInfo.source).replace(/\.[cm]?[tj]sx?$/, "") : isAbsolute3(importInfo.source) ? importInfo.source.replace(/\.[cm]?[tj]sx?$/, "") : importInfo.source;
12230
12385
  return {
12231
12386
  absolutePath,
12232
12387
  bindingName: binding,
@@ -12301,7 +12456,7 @@ import { existsSync as existsSync21 } from "fs";
12301
12456
  import { mkdir as mkdir4, stat as stat2 } from "fs/promises";
12302
12457
  import {
12303
12458
  dirname as dirname14,
12304
- join as join26,
12459
+ join as join27,
12305
12460
  basename as basename7,
12306
12461
  extname as extname5,
12307
12462
  resolve as resolve22,
@@ -12360,14 +12515,14 @@ var resolveDevClientDir2 = () => {
12360
12515
  `${basePath}.svelte`,
12361
12516
  `${basePath}.svelte.ts`,
12362
12517
  `${basePath}.svelte.js`,
12363
- join26(basePath, "index.ts"),
12364
- join26(basePath, "index.js"),
12365
- join26(basePath, "index.mjs"),
12366
- join26(basePath, "index.cjs"),
12367
- join26(basePath, "index.json"),
12368
- join26(basePath, "index.svelte"),
12369
- join26(basePath, "index.svelte.ts"),
12370
- join26(basePath, "index.svelte.js")
12518
+ join27(basePath, "index.ts"),
12519
+ join27(basePath, "index.js"),
12520
+ join27(basePath, "index.mjs"),
12521
+ join27(basePath, "index.cjs"),
12522
+ join27(basePath, "index.json"),
12523
+ join27(basePath, "index.svelte"),
12524
+ join27(basePath, "index.svelte.ts"),
12525
+ join27(basePath, "index.svelte.js")
12371
12526
  ];
12372
12527
  const checks = await Promise.all(candidates.map(exists));
12373
12528
  return candidates.find((_2, index) => checks[index]) ?? null;
@@ -12406,9 +12561,9 @@ var resolveDevClientDir2 = () => {
12406
12561
  }, compileSvelte = async (entryPoints, svelteRoot, cache = new Map, isDev2 = false, stylePreprocessors) => {
12407
12562
  const { compile, compileModule, preprocess } = await import("svelte/compiler");
12408
12563
  const generatedDir = getFrameworkGeneratedDir("svelte");
12409
- const clientDir = join26(generatedDir, "client");
12410
- const indexDir = join26(generatedDir, "indexes");
12411
- const serverDir = join26(generatedDir, "server");
12564
+ const clientDir = join27(generatedDir, "client");
12565
+ const indexDir = join27(generatedDir, "indexes");
12566
+ const serverDir = join27(generatedDir, "server");
12412
12567
  await Promise.all([clientDir, indexDir, serverDir].map((dir) => mkdir4(dir, { recursive: true })));
12413
12568
  const dev = env2.NODE_ENV !== "production";
12414
12569
  const build2 = async (src) => {
@@ -12446,8 +12601,8 @@ var resolveDevClientDir2 = () => {
12446
12601
  const childBuilt = await Promise.all(childSources.map((child) => build2(child)));
12447
12602
  const hasAwaitSlotFromChildren = childBuilt.some((child) => child.hasAwaitSlot);
12448
12603
  const externalRewrites = new Map;
12449
- const ssrOutputDir = dirname14(join26(serverDir, relDir, `${baseName}.js`));
12450
- const clientOutputDir = dirname14(join26(clientDir, relDir, `${baseName}.js`));
12604
+ const ssrOutputDir = dirname14(join27(serverDir, relDir, `${baseName}.js`));
12605
+ const clientOutputDir = dirname14(join27(clientDir, relDir, `${baseName}.js`));
12451
12606
  for (let idx = 0;idx < importPaths.length; idx++) {
12452
12607
  const rawSpec = importPaths[idx];
12453
12608
  if (!rawSpec)
@@ -12512,8 +12667,8 @@ var resolveDevClientDir2 = () => {
12512
12667
  code += islandMetadataExports;
12513
12668
  return { code, map: compiledJs.map };
12514
12669
  };
12515
- const ssrPath = join26(serverDir, relDir, `${baseName}.js`);
12516
- const clientPath = join26(clientDir, relDir, `${baseName}.js`);
12670
+ const ssrPath = join27(serverDir, relDir, `${baseName}.js`);
12671
+ const clientPath = join27(clientDir, relDir, `${baseName}.js`);
12517
12672
  await Promise.all([
12518
12673
  mkdir4(dirname14(ssrPath), { recursive: true }),
12519
12674
  mkdir4(dirname14(clientPath), { recursive: true })
@@ -12551,7 +12706,7 @@ var resolveDevClientDir2 = () => {
12551
12706
  await Promise.all(roots.map(async ({ client: client2, hasAwaitSlot }) => {
12552
12707
  const relClientDir = dirname14(relative9(clientDir, client2));
12553
12708
  const name = basename7(client2, extname5(client2));
12554
- const indexPath = join26(indexDir, relClientDir, `${name}.js`);
12709
+ const indexPath = join27(indexDir, relClientDir, `${name}.js`);
12555
12710
  const importRaw = relative9(dirname14(indexPath), client2).split(sep2).join("/");
12556
12711
  const importPath = importRaw.startsWith(".") || importRaw.startsWith("/") ? importRaw : `./${importRaw}`;
12557
12712
  const hmrImports = isDev2 ? `window.__HMR_FRAMEWORK__ = "svelte";
@@ -12630,7 +12785,7 @@ if (typeof window !== "undefined") {
12630
12785
  svelteClientPaths: roots.map(({ client: client2 }) => client2),
12631
12786
  svelteIndexPaths: roots.map(({ client: client2 }) => {
12632
12787
  const rel = dirname14(relative9(clientDir, client2));
12633
- return join26(indexDir, rel, basename7(client2));
12788
+ return join27(indexDir, rel, basename7(client2));
12634
12789
  }),
12635
12790
  svelteServerPaths: roots.map(({ ssr }) => ssr)
12636
12791
  };
@@ -12645,7 +12800,7 @@ var init_compileSvelte = __esm(() => {
12645
12800
  init_lowerAwaitSlotSyntax();
12646
12801
  init_renderToReadableStream();
12647
12802
  devClientDir2 = resolveDevClientDir2();
12648
- hmrClientPath3 = join26(devClientDir2, "hmrClient.ts").replace(/\\/g, "/");
12803
+ hmrClientPath3 = join27(devClientDir2, "hmrClient.ts").replace(/\\/g, "/");
12649
12804
  persistentCache = new Map;
12650
12805
  sourceHashCache = new Map;
12651
12806
  transpiler3 = new Transpiler2({ loader: "ts", target: "browser" });
@@ -12660,7 +12815,7 @@ __export(exports_chainInlineSourcemaps, {
12660
12815
  chainBundleInlineSourcemap: () => chainBundleInlineSourcemap,
12661
12816
  buildLineRemap: () => buildLineRemap
12662
12817
  });
12663
- import { readFileSync as readFileSync17, writeFileSync as writeFileSync8 } from "fs";
12818
+ import { readFileSync as readFileSync18, writeFileSync as writeFileSync8 } from "fs";
12664
12819
  var BASE64_CHARS = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/", BASE64_TO_INT, decodeVlq = (str, startPos) => {
12665
12820
  let result = 0;
12666
12821
  let shift = 0;
@@ -12951,7 +13106,7 @@ var BASE64_CHARS = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz01234567
12951
13106
  version: 3
12952
13107
  };
12953
13108
  }, chainBundleInlineSourcemap = (bundleFilePath) => {
12954
- const text = readFileSync17(bundleFilePath, "utf-8");
13109
+ const text = readFileSync18(bundleFilePath, "utf-8");
12955
13110
  const outerMap = extractInlineMap(text);
12956
13111
  if (!outerMap)
12957
13112
  return;
@@ -13037,13 +13192,13 @@ __export(exports_compileVue, {
13037
13192
  compileVue: () => compileVue,
13038
13193
  clearVueHmrCaches: () => clearVueHmrCaches
13039
13194
  });
13040
- import { existsSync as existsSync22 } from "fs";
13195
+ import { existsSync as existsSync22, readFileSync as readFileSync19, realpathSync } from "fs";
13041
13196
  import { mkdir as mkdir5 } from "fs/promises";
13042
13197
  import {
13043
13198
  basename as basename8,
13044
13199
  dirname as dirname15,
13045
13200
  isAbsolute as isAbsolute4,
13046
- join as join27,
13201
+ join as join28,
13047
13202
  relative as relative10,
13048
13203
  resolve as resolve23
13049
13204
  } from "path";
@@ -13177,6 +13332,11 @@ var resolveDevClientDir3 = () => {
13177
13332
  ]);
13178
13333
  const hasScript = descriptor.script || descriptor.scriptSetup;
13179
13334
  const compiledScript = hasScript ? compiler.compileScript(descriptor, {
13335
+ fs: {
13336
+ fileExists: existsSync22,
13337
+ readFile: (file4) => existsSync22(file4) ? readFileSync19(file4, "utf-8") : undefined,
13338
+ realpath: realpathSync
13339
+ },
13180
13340
  id: componentId,
13181
13341
  inlineTemplate: false,
13182
13342
  sourceMap: true
@@ -13221,7 +13381,7 @@ var resolveDevClientDir3 = () => {
13221
13381
  ];
13222
13382
  let cssOutputPaths = [];
13223
13383
  if (isEntryPoint && allCss.length) {
13224
- const cssOutputFile = join27(outputDirs.css, `${toKebab(fileBaseName)}-compiled.css`);
13384
+ const cssOutputFile = join28(outputDirs.css, `${toKebab(fileBaseName)}-compiled.css`);
13225
13385
  await mkdir5(dirname15(cssOutputFile), { recursive: true });
13226
13386
  await write3(cssOutputFile, allCss.join(`
13227
13387
  `));
@@ -13252,8 +13412,8 @@ if (typeof __VUE_HMR_RUNTIME__ !== 'undefined') {
13252
13412
  };
13253
13413
  const clientCode = assembleModule(generateRenderFunction(false), "render", true) + islandMetadataExports;
13254
13414
  const serverCode = assembleModule(generateRenderFunction(true), "ssrRender", false) + islandMetadataExports;
13255
- const clientOutputPath = join27(outputDirs.client, `${relativeWithoutExtension}.js`);
13256
- const serverOutputPath = join27(outputDirs.server, `${relativeWithoutExtension}.js`);
13415
+ const clientOutputPath = join28(outputDirs.client, `${relativeWithoutExtension}.js`);
13416
+ const serverOutputPath = join28(outputDirs.server, `${relativeWithoutExtension}.js`);
13257
13417
  const relDir = dirname15(relativeFilePath);
13258
13418
  const relDepth = relDir === "." ? 0 : relDir.split("/").length;
13259
13419
  const adjustImports = (code) => code.replace(/(from\s+['"])(\.\.\/(?:\.\.\/)*)/g, (_2, prefix, dots) => {
@@ -13303,13 +13463,13 @@ if (typeof __VUE_HMR_RUNTIME__ !== 'undefined') {
13303
13463
  cacheMap.set(sourceFilePath, result);
13304
13464
  persistentBuildCache.set(sourceFilePath, result);
13305
13465
  return result;
13306
- }, compileVue = async (entryPoints, vueRootDir, isDev2 = false, stylePreprocessors) => {
13466
+ }, compileVue = async (entryPoints, vueRootDir, isDev2 = false, stylePreprocessors, ssrOnlyEntries) => {
13307
13467
  const compiler = await import("@vue/compiler-sfc");
13308
13468
  const generatedDir = getFrameworkGeneratedDir("vue");
13309
- const clientOutputDir = join27(generatedDir, "client");
13310
- const indexOutputDir = join27(generatedDir, "indexes");
13311
- const serverOutputDir = join27(generatedDir, "server");
13312
- const cssOutputDir = join27(generatedDir, "compiled");
13469
+ const clientOutputDir = join28(generatedDir, "client");
13470
+ const indexOutputDir = join28(generatedDir, "indexes");
13471
+ const serverOutputDir = join28(generatedDir, "server");
13472
+ const cssOutputDir = join28(generatedDir, "compiled");
13313
13473
  await Promise.all([
13314
13474
  mkdir5(clientOutputDir, { recursive: true }),
13315
13475
  mkdir5(indexOutputDir, { recursive: true }),
@@ -13319,15 +13479,24 @@ if (typeof __VUE_HMR_RUNTIME__ !== 'undefined') {
13319
13479
  const buildCache = new Map;
13320
13480
  const allTsHelperPaths = new Set;
13321
13481
  const compiledPages = await Promise.all(entryPoints.map(async (entryPath) => {
13322
- const result = await compileVueFile(resolve23(entryPath), {
13482
+ const resolvedEntryPath = resolve23(entryPath);
13483
+ const result = await compileVueFile(resolvedEntryPath, {
13323
13484
  client: clientOutputDir,
13324
13485
  css: cssOutputDir,
13325
13486
  server: serverOutputDir
13326
13487
  }, buildCache, true, vueRootDir, compiler, stylePreprocessors);
13327
13488
  result.tsHelperPaths.forEach((path) => allTsHelperPaths.add(path));
13489
+ if (ssrOnlyEntries?.has(resolvedEntryPath)) {
13490
+ return {
13491
+ clientPath: null,
13492
+ cssPaths: result.cssPaths,
13493
+ indexPath: null,
13494
+ serverPath: result.serverPath
13495
+ };
13496
+ }
13328
13497
  const entryBaseName = basename8(entryPath, ".vue");
13329
- const indexOutputFile = join27(indexOutputDir, `${entryBaseName}.js`);
13330
- const clientOutputFile = join27(clientOutputDir, relative10(vueRootDir, entryPath).replace(/\\/g, "/").replace(/\.vue$/, ".js"));
13498
+ const indexOutputFile = join28(indexOutputDir, `${entryBaseName}.js`);
13499
+ const clientOutputFile = join28(clientOutputDir, relative10(vueRootDir, entryPath).replace(/\\/g, "/").replace(/\.vue$/, ".js"));
13331
13500
  await mkdir5(dirname15(indexOutputFile), { recursive: true });
13332
13501
  const vueHmrImports = isDev2 ? [
13333
13502
  `window.__HMR_FRAMEWORK__ = "vue";`,
@@ -13480,18 +13649,19 @@ if (typeof __VUE_HMR_RUNTIME__ !== 'undefined') {
13480
13649
  const sourceCode = await file3(tsPath).text();
13481
13650
  const transpiledCode = transpiler4.transformSync(sourceCode);
13482
13651
  const relativeJsPath = relative10(vueRootDir, tsPath).replace(/\.ts$/, ".js");
13483
- const outClientPath = join27(clientOutputDir, relativeJsPath);
13484
- const outServerPath = join27(serverOutputDir, relativeJsPath);
13652
+ const outClientPath = join28(clientOutputDir, relativeJsPath);
13653
+ const outServerPath = join28(serverOutputDir, relativeJsPath);
13485
13654
  await mkdir5(dirname15(outClientPath), { recursive: true });
13486
13655
  await mkdir5(dirname15(outServerPath), { recursive: true });
13487
13656
  await write3(outClientPath, transpiledCode);
13488
13657
  await write3(outServerPath, transpiledCode);
13489
13658
  }));
13659
+ const isString = (value) => value !== null;
13490
13660
  return {
13491
13661
  hmrMetadata: new Map(vueHmrMetadata),
13492
- vueClientPaths: compiledPages.map((result) => result.clientPath),
13662
+ vueClientPaths: compiledPages.map((p2) => p2.clientPath).filter(isString),
13493
13663
  vueCssPaths: compiledPages.flatMap((result) => result.cssPaths),
13494
- vueIndexPaths: compiledPages.map((result) => result.indexPath),
13664
+ vueIndexPaths: compiledPages.map((p2) => p2.indexPath).filter(isString),
13495
13665
  vueServerPaths: compiledPages.map((result) => result.serverPath)
13496
13666
  };
13497
13667
  };
@@ -13504,7 +13674,7 @@ var init_compileVue = __esm(() => {
13504
13674
  init_vueAutoRouterTransform();
13505
13675
  init_stylePreprocessor();
13506
13676
  devClientDir3 = resolveDevClientDir3();
13507
- hmrClientPath4 = join27(devClientDir3, "hmrClient.ts").replace(/\\/g, "/");
13677
+ hmrClientPath4 = join28(devClientDir3, "hmrClient.ts").replace(/\\/g, "/");
13508
13678
  transpiler4 = new Transpiler3({ loader: "ts", target: "browser" });
13509
13679
  scriptCache = new Map;
13510
13680
  scriptSetupCache = new Map;
@@ -13985,17 +14155,17 @@ __export(exports_compileAngular, {
13985
14155
  compileAngularFile: () => compileAngularFile,
13986
14156
  compileAngular: () => compileAngular
13987
14157
  });
13988
- import { existsSync as existsSync23, readFileSync as readFileSync18, promises as fs5 } from "fs";
13989
- import { join as join28, basename as basename9, sep as sep3, dirname as dirname16, resolve as resolve24, relative as relative11 } from "path";
14158
+ import { existsSync as existsSync23, readFileSync as readFileSync20, promises as fs5 } from "fs";
14159
+ import { join as join29, basename as basename9, sep as sep3, dirname as dirname16, resolve as resolve24, relative as relative11 } from "path";
13990
14160
  var {Glob: Glob6 } = globalThis.Bun;
13991
- import ts9 from "typescript";
14161
+ import ts10 from "typescript";
13992
14162
  var traceAngularPhase = async (name, fn2, metadata2) => {
13993
14163
  const tracePhase = globalThis.__absoluteBuildTracePhase;
13994
14164
  return tracePhase ? tracePhase(`compile/angular/${name}`, fn2, metadata2) : await fn2();
13995
14165
  }, readTsconfigPathAliases = () => {
13996
14166
  try {
13997
14167
  const configPath2 = resolve24(process.cwd(), "tsconfig.json");
13998
- const config = ts9.readConfigFile(configPath2, ts9.sys.readFile).config;
14168
+ const config = ts10.readConfigFile(configPath2, ts10.sys.readFile).config;
13999
14169
  const compilerOptions = config?.compilerOptions ?? {};
14000
14170
  const baseUrl = resolve24(process.cwd(), compilerOptions.baseUrl ?? ".");
14001
14171
  const aliases = Object.entries(compilerOptions.paths ?? {}).map(([pattern, replacements]) => ({ pattern, replacements }));
@@ -14029,10 +14199,10 @@ var traceAngularPhase = async (name, fn2, metadata2) => {
14029
14199
  `${candidate}.tsx`,
14030
14200
  `${candidate}.js`,
14031
14201
  `${candidate}.jsx`,
14032
- join28(candidate, "index.ts"),
14033
- join28(candidate, "index.tsx"),
14034
- join28(candidate, "index.js"),
14035
- join28(candidate, "index.jsx")
14202
+ join29(candidate, "index.ts"),
14203
+ join29(candidate, "index.tsx"),
14204
+ join29(candidate, "index.js"),
14205
+ join29(candidate, "index.jsx")
14036
14206
  ];
14037
14207
  return candidates.find((file4) => existsSync23(file4));
14038
14208
  }, createLegacyAngularAnimationUsageResolver = (rootDir) => {
@@ -14124,7 +14294,7 @@ var traceAngularPhase = async (name, fn2, metadata2) => {
14124
14294
  return resolve24(import.meta.dir, "./dev/client");
14125
14295
  }, devClientDir4, hmrClientPath5, formatDiagnosticMessage = (diagnostic) => {
14126
14296
  try {
14127
- return ts9.flattenDiagnosticMessageText(diagnostic.messageText, `
14297
+ return ts10.flattenDiagnosticMessageText(diagnostic.messageText, `
14128
14298
  `);
14129
14299
  } catch {
14130
14300
  return String(diagnostic.messageText || "Unknown error");
@@ -14132,7 +14302,7 @@ var traceAngularPhase = async (name, fn2, metadata2) => {
14132
14302
  }, throwOnCompilationErrors = (diagnostics) => {
14133
14303
  if (!diagnostics?.length)
14134
14304
  return;
14135
- const errors = diagnostics.filter((diag) => diag.category === ts9.DiagnosticCategory.Error);
14305
+ const errors = diagnostics.filter((diag) => diag.category === ts10.DiagnosticCategory.Error);
14136
14306
  if (!errors.length)
14137
14307
  return;
14138
14308
  const fullMessage = errors.map(formatDiagnosticMessage).join(`
@@ -14174,22 +14344,22 @@ var traceAngularPhase = async (name, fn2, metadata2) => {
14174
14344
  }
14175
14345
  return `${path}.js${query}`;
14176
14346
  }, isRelativeModuleSpecifier = (specifier) => specifier.startsWith("./") || specifier.startsWith("../"), extractLocalImportSpecifiers = (source, fileName) => {
14177
- const sourceFile = ts9.createSourceFile(fileName, source, ts9.ScriptTarget.Latest, true, ts9.ScriptKind.TS);
14347
+ const sourceFile = ts10.createSourceFile(fileName, source, ts10.ScriptTarget.Latest, true, ts10.ScriptKind.TS);
14178
14348
  const specifiers = [];
14179
14349
  const addSpecifier = (node) => {
14180
- if (!node || !ts9.isStringLiteralLike(node))
14350
+ if (!node || !ts10.isStringLiteralLike(node))
14181
14351
  return;
14182
14352
  const specifier = node.text;
14183
14353
  if (isRelativeModuleSpecifier(specifier))
14184
14354
  specifiers.push(specifier);
14185
14355
  };
14186
14356
  const visit = (node) => {
14187
- if (ts9.isImportDeclaration(node) || ts9.isExportDeclaration(node)) {
14357
+ if (ts10.isImportDeclaration(node) || ts10.isExportDeclaration(node)) {
14188
14358
  addSpecifier(node.moduleSpecifier);
14189
- } else if (ts9.isCallExpression(node) && node.expression.kind === ts9.SyntaxKind.ImportKeyword) {
14359
+ } else if (ts10.isCallExpression(node) && node.expression.kind === ts10.SyntaxKind.ImportKeyword) {
14190
14360
  addSpecifier(node.arguments[0]);
14191
14361
  }
14192
- ts9.forEachChild(node, visit);
14362
+ ts10.forEachChild(node, visit);
14193
14363
  };
14194
14364
  visit(sourceFile);
14195
14365
  return specifiers;
@@ -14202,10 +14372,10 @@ var traceAngularPhase = async (name, fn2, metadata2) => {
14202
14372
  `${basePath}.tsx`,
14203
14373
  `${basePath}.mts`,
14204
14374
  `${basePath}.cts`,
14205
- join28(basePath, "index.ts"),
14206
- join28(basePath, "index.tsx"),
14207
- join28(basePath, "index.mts"),
14208
- join28(basePath, "index.cts")
14375
+ join29(basePath, "index.ts"),
14376
+ join29(basePath, "index.tsx"),
14377
+ join29(basePath, "index.mts"),
14378
+ join29(basePath, "index.cts")
14209
14379
  ];
14210
14380
  return candidates.map((candidate) => resolve24(candidate)).find((candidate) => existsSync23(candidate) && !candidate.endsWith(".d.ts")) ?? null;
14211
14381
  }, readFileForAotTransform = async (fileName, readFile6) => {
@@ -14231,15 +14401,15 @@ var traceAngularPhase = async (name, fn2, metadata2) => {
14231
14401
  const paths = [];
14232
14402
  const templateUrlMatch = findUncommentedMatch(source, /templateUrl\s*:\s*['"]([^'"]+)['"]/);
14233
14403
  if (templateUrlMatch?.[1])
14234
- paths.push(join28(fileDir, templateUrlMatch[1]));
14404
+ paths.push(join29(fileDir, templateUrlMatch[1]));
14235
14405
  const styleUrlMatch = findUncommentedMatch(source, /styleUrl\s*:\s*['"]([^'"]+)['"]/);
14236
14406
  if (styleUrlMatch?.[1])
14237
- paths.push(join28(fileDir, styleUrlMatch[1]));
14407
+ paths.push(join29(fileDir, styleUrlMatch[1]));
14238
14408
  const styleUrlsMatch = findUncommentedMatch(source, /styleUrls\s*:\s*\[([^\]]+)\]/);
14239
14409
  const urlMatches = styleUrlsMatch?.[1]?.match(/['"]([^'"]+)['"]/g);
14240
14410
  if (urlMatches) {
14241
14411
  for (const urlMatch of urlMatches) {
14242
- paths.push(join28(fileDir, urlMatch.replace(/['"]/g, "")));
14412
+ paths.push(join29(fileDir, urlMatch.replace(/['"]/g, "")));
14243
14413
  }
14244
14414
  }
14245
14415
  return paths.map((path) => resolve24(path));
@@ -14273,7 +14443,7 @@ var traceAngularPhase = async (name, fn2, metadata2) => {
14273
14443
  safeStableStringify(stylePreprocessors ?? null)
14274
14444
  ].join("\x00");
14275
14445
  const cacheKey2 = Bun.hash(cacheInput).toString(BASE_36_RADIX);
14276
- return join28(process.cwd(), ".absolutejs", "cache", "angular-resources", `${cacheKey2}.json`);
14446
+ return join29(process.cwd(), ".absolutejs", "cache", "angular-resources", `${cacheKey2}.json`);
14277
14447
  }, precomputeAotResourceTransforms = async (inputPaths, readFile6, stylePreprocessors) => {
14278
14448
  const transformedSources = new Map;
14279
14449
  const visited = new Set;
@@ -14319,10 +14489,10 @@ var traceAngularPhase = async (name, fn2, metadata2) => {
14319
14489
  return { stats, transformedSources };
14320
14490
  }, compileAngularFiles = async (inputPaths, outDir, stylePreprocessors) => {
14321
14491
  const islandMetadataByOutputPath = await traceAngularPhase("aot/island-metadata", () => new Map(inputPaths.map((inputPath) => {
14322
- const outputPath = resolve24(join28(outDir, relative11(process.cwd(), resolve24(inputPath)).replace(/\.[cm]?[tj]sx?$/, ".js")));
14492
+ const outputPath = resolve24(join29(outDir, relative11(process.cwd(), resolve24(inputPath)).replace(/\.[cm]?[tj]sx?$/, ".js")));
14323
14493
  return [
14324
14494
  outputPath,
14325
- buildIslandMetadataExports(readFileSync18(inputPath, "utf-8"))
14495
+ buildIslandMetadataExports(readFileSync20(inputPath, "utf-8"))
14326
14496
  ];
14327
14497
  })), { entries: inputPaths.length });
14328
14498
  await traceAngularPhase("aot/preload-compiler", () => import("@angular/compiler"));
@@ -14337,25 +14507,25 @@ var traceAngularPhase = async (name, fn2, metadata2) => {
14337
14507
  emitDecoratorMetadata: true,
14338
14508
  esModuleInterop: true,
14339
14509
  experimentalDecorators: true,
14340
- module: ts9.ModuleKind.ESNext,
14341
- moduleResolution: ts9.ModuleResolutionKind.Bundler,
14342
- newLine: ts9.NewLineKind.LineFeed,
14510
+ module: ts10.ModuleKind.ESNext,
14511
+ moduleResolution: ts10.ModuleResolutionKind.Bundler,
14512
+ newLine: ts10.NewLineKind.LineFeed,
14343
14513
  noLib: false,
14344
14514
  outDir,
14345
14515
  skipLibCheck: true,
14346
- target: ts9.ScriptTarget.ES2022,
14516
+ target: ts10.ScriptTarget.ES2022,
14347
14517
  ...config.options
14348
14518
  };
14349
- options.target = ts9.ScriptTarget.ES2022;
14519
+ options.target = ts10.ScriptTarget.ES2022;
14350
14520
  options.experimentalDecorators = true;
14351
14521
  options.emitDecoratorMetadata = true;
14352
- options.newLine = ts9.NewLineKind.LineFeed;
14522
+ options.newLine = ts10.NewLineKind.LineFeed;
14353
14523
  options.outDir = outDir;
14354
14524
  options.noEmit = false;
14355
14525
  options.incremental = false;
14356
14526
  options.tsBuildInfoFile = undefined;
14357
14527
  options.rootDir = process.cwd();
14358
- const host = await traceAngularPhase("aot/create-compiler-host", () => ts9.createCompilerHost(options));
14528
+ const host = await traceAngularPhase("aot/create-compiler-host", () => ts10.createCompilerHost(options));
14359
14529
  const originalGetDefaultLibLocation = host.getDefaultLibLocation;
14360
14530
  host.getDefaultLibLocation = () => tsLibDir || (originalGetDefaultLibLocation ? originalGetDefaultLibLocation() : "");
14361
14531
  const originalGetDefaultLibFileName = host.getDefaultLibFileName;
@@ -14366,7 +14536,7 @@ var traceAngularPhase = async (name, fn2, metadata2) => {
14366
14536
  const originalGetSourceFile = host.getSourceFile;
14367
14537
  host.getSourceFile = (fileName, languageVersion, onError) => {
14368
14538
  if (fileName.startsWith("lib.") && fileName.endsWith(".d.ts") && tsLibDir) {
14369
- const resolvedPath = join28(tsLibDir, fileName);
14539
+ const resolvedPath = join29(tsLibDir, fileName);
14370
14540
  return originalGetSourceFile?.call(host, resolvedPath, languageVersion, onError);
14371
14541
  }
14372
14542
  return originalGetSourceFile?.call(host, fileName, languageVersion, onError);
@@ -14401,7 +14571,7 @@ var traceAngularPhase = async (name, fn2, metadata2) => {
14401
14571
  host.getSourceFile = (fileName, languageVersion, onError) => {
14402
14572
  const source = transformedSources.get(resolve24(fileName));
14403
14573
  if (source) {
14404
- return ts9.createSourceFile(fileName, source, languageVersion, true);
14574
+ return ts10.createSourceFile(fileName, source, languageVersion, true);
14405
14575
  }
14406
14576
  return originalGetSourceFileForCompile?.call(host, fileName, languageVersion, onError);
14407
14577
  };
@@ -14421,7 +14591,7 @@ var traceAngularPhase = async (name, fn2, metadata2) => {
14421
14591
  const entries = await traceAngularPhase("aot/postprocess-emitted-js", () => {
14422
14592
  const rawEntries = Object.entries(emitted).filter(([fileName]) => fileName.endsWith(".js")).map(([fileName, content]) => ({
14423
14593
  content,
14424
- target: join28(outDir, fileName)
14594
+ target: join29(outDir, fileName)
14425
14595
  }));
14426
14596
  const outputFiles = new Set(rawEntries.map(({ target }) => resolve24(target)));
14427
14597
  return rawEntries.map(({ content, target }) => {
@@ -14598,7 +14768,7 @@ ${fields}
14598
14768
  }, inlineTemplateAndLowerDefer = async (source, fileDir) => {
14599
14769
  const templateUrlMatch = findUncommentedMatch(source, /templateUrl\s*:\s*['"]([^'"]+)['"]/);
14600
14770
  if (templateUrlMatch?.[1]) {
14601
- const templatePath = join28(fileDir, templateUrlMatch[1]);
14771
+ const templatePath = join29(fileDir, templateUrlMatch[1]);
14602
14772
  if (!existsSync23(templatePath)) {
14603
14773
  throw new Error(`Unable to inline Angular templateUrl "${templateUrlMatch[1]}": file not found at ${templatePath}`);
14604
14774
  }
@@ -14629,11 +14799,11 @@ ${fields}
14629
14799
  }, inlineTemplateAndLowerDeferSync = (source, fileDir) => {
14630
14800
  const templateUrlMatch = findUncommentedMatch(source, /templateUrl\s*:\s*['"]([^'"]+)['"]/);
14631
14801
  if (templateUrlMatch?.[1]) {
14632
- const templatePath = join28(fileDir, templateUrlMatch[1]);
14802
+ const templatePath = join29(fileDir, templateUrlMatch[1]);
14633
14803
  if (!existsSync23(templatePath)) {
14634
14804
  throw new Error(`Unable to inline Angular templateUrl "${templateUrlMatch[1]}": file not found at ${templatePath}`);
14635
14805
  }
14636
- const templateRaw2 = readFileSync18(templatePath, "utf-8");
14806
+ const templateRaw2 = readFileSync20(templatePath, "utf-8");
14637
14807
  const lowered2 = lowerAngularDeferSyntax(templateRaw2);
14638
14808
  const escaped2 = escapeTemplateContent(lowered2.template);
14639
14809
  const replacedSource2 = source.slice(0, templateUrlMatch.index) + `template: \`${escaped2}\`` + source.slice(templateUrlMatch.index + templateUrlMatch[0].length);
@@ -14666,7 +14836,7 @@ ${fields}
14666
14836
  return source;
14667
14837
  const stylePromises = urlMatches.map((urlMatch) => {
14668
14838
  const styleUrl = urlMatch.replace(/['"]/g, "");
14669
- return readAndEscapeFile(join28(fileDir, styleUrl), stylePreprocessors);
14839
+ return readAndEscapeFile(join29(fileDir, styleUrl), stylePreprocessors);
14670
14840
  });
14671
14841
  const results = await Promise.all(stylePromises);
14672
14842
  const inlinedStyles = results.filter(Boolean).map((escaped) => `\`${escaped}\``);
@@ -14677,7 +14847,7 @@ ${fields}
14677
14847
  const styleUrlMatch = findUncommentedMatch(source, /styleUrl\s*:\s*['"]([^'"]+)['"]/);
14678
14848
  if (!styleUrlMatch?.[1])
14679
14849
  return source;
14680
- const escaped = await readAndEscapeFile(join28(fileDir, styleUrlMatch[1]), stylePreprocessors);
14850
+ const escaped = await readAndEscapeFile(join29(fileDir, styleUrlMatch[1]), stylePreprocessors);
14681
14851
  if (!escaped)
14682
14852
  return source;
14683
14853
  return source.slice(0, styleUrlMatch.index) + `styles: [\`${escaped}\`]` + source.slice(styleUrlMatch.index + styleUrlMatch[0].length);
@@ -14713,10 +14883,10 @@ ${fields}
14713
14883
  `${candidate}.js`,
14714
14884
  `${candidate}.jsx`,
14715
14885
  `${candidate}.json`,
14716
- join28(candidate, "index.ts"),
14717
- join28(candidate, "index.tsx"),
14718
- join28(candidate, "index.js"),
14719
- join28(candidate, "index.jsx")
14886
+ join29(candidate, "index.ts"),
14887
+ join29(candidate, "index.tsx"),
14888
+ join29(candidate, "index.js"),
14889
+ join29(candidate, "index.jsx")
14720
14890
  ];
14721
14891
  return candidates.find((file4) => existsSync23(file4));
14722
14892
  };
@@ -14743,10 +14913,10 @@ ${fields}
14743
14913
  const inputDir = dirname16(sourcePath);
14744
14914
  const fileBase = basename9(sourcePath).replace(/\.[cm]?[tj]sx?$/, ".js");
14745
14915
  if (inputDir === outDir || inputDir.startsWith(`${outDir}${sep3}`)) {
14746
- return join28(inputDir, fileBase);
14916
+ return join29(inputDir, fileBase);
14747
14917
  }
14748
14918
  const relativeDir = inputDir.startsWith(baseDir) ? inputDir.substring(baseDir.length + 1) : inputDir;
14749
- return join28(outDir, relativeDir, fileBase);
14919
+ return join29(outDir, relativeDir, fileBase);
14750
14920
  };
14751
14921
  const withCacheBuster = (specifier) => {
14752
14922
  if (!cacheBuster)
@@ -14796,8 +14966,8 @@ ${fields}
14796
14966
  if (resolved.endsWith(".json") && existsSync23(resolved)) {
14797
14967
  const inputDir2 = dirname16(resolved);
14798
14968
  const relativeDir2 = inputDir2.startsWith(baseDir) ? inputDir2.substring(baseDir.length + 1) : inputDir2;
14799
- const targetDir2 = join28(outDir, relativeDir2);
14800
- const targetPath2 = join28(targetDir2, basename9(resolved));
14969
+ const targetDir2 = join29(outDir, relativeDir2);
14970
+ const targetPath2 = join29(targetDir2, basename9(resolved));
14801
14971
  await fs5.mkdir(targetDir2, { recursive: true });
14802
14972
  await fs5.copyFile(resolved, targetPath2);
14803
14973
  allOutputs.push(targetPath2);
@@ -14875,7 +15045,7 @@ export const __ABSOLUTE_PAGE_USES_LEGACY_ANIMATIONS__ = true;
14875
15045
  return { clientPaths: [...emptyPaths], serverPaths: [...emptyPaths] };
14876
15046
  }
14877
15047
  const compiledRoot = compiledParent;
14878
- const indexesDir = join28(compiledParent, "indexes");
15048
+ const indexesDir = join29(compiledParent, "indexes");
14879
15049
  await traceAngularPhase("setup/create-indexes-dir", () => fs5.mkdir(indexesDir, { recursive: true }));
14880
15050
  const aotOutputs = hmr ? [] : await traceAngularPhase("aot/compile-files", () => compileAngularFiles(entryPoints.map((entry) => resolve24(entry)), compiledRoot, stylePreprocessors), { entries: entryPoints.length });
14881
15051
  if (!hmr) {
@@ -14889,9 +15059,9 @@ export const __ABSOLUTE_PAGE_USES_LEGACY_ANIMATIONS__ = true;
14889
15059
  absolute: false,
14890
15060
  cwd: angularSrcDir
14891
15061
  })) {
14892
- const sourcePath = join28(angularSrcDir, rel);
15062
+ const sourcePath = join29(angularSrcDir, rel);
14893
15063
  const cwdRel = relative11(cwd, sourcePath);
14894
- const targetPath = join28(compiledRoot, cwdRel);
15064
+ const targetPath = join29(compiledRoot, cwdRel);
14895
15065
  await fs5.mkdir(dirname16(targetPath), { recursive: true });
14896
15066
  await fs5.copyFile(sourcePath, targetPath);
14897
15067
  }
@@ -14908,9 +15078,9 @@ export const __ABSOLUTE_PAGE_USES_LEGACY_ANIMATIONS__ = true;
14908
15078
  const fileBase = basename9(resolvedEntry).replace(/\.[tj]s$/, "");
14909
15079
  const jsName = `${fileBase}.js`;
14910
15080
  const compiledFallbackPaths = [
14911
- join28(compiledRoot, relativeEntry),
14912
- join28(compiledRoot, "pages", jsName),
14913
- join28(compiledRoot, jsName)
15081
+ join29(compiledRoot, relativeEntry),
15082
+ join29(compiledRoot, "pages", jsName),
15083
+ join29(compiledRoot, jsName)
14914
15084
  ].map((file4) => resolve24(file4));
14915
15085
  const resolveRawServerFile = (candidatePaths) => {
14916
15086
  const normalizedCandidates = [
@@ -14960,7 +15130,7 @@ export const __ABSOLUTE_PAGE_USES_LEGACY_ANIMATIONS__ = true;
14960
15130
  const providersHashInput = providersInjection ? (() => {
14961
15131
  let providersSourceContent = "";
14962
15132
  try {
14963
- providersSourceContent = readFileSync18(providersInjection.appProvidersSource, "utf-8");
15133
+ providersSourceContent = readFileSync20(providersInjection.appProvidersSource, "utf-8");
14964
15134
  } catch {}
14965
15135
  return JSON.stringify({
14966
15136
  basePath: pageInjectionForHash?.basePath ?? null,
@@ -14970,7 +15140,7 @@ export const __ABSOLUTE_PAGE_USES_LEGACY_ANIMATIONS__ = true;
14970
15140
  })() : "no-providers";
14971
15141
  const serverContentHash = `${Bun.hash(original).toString(BASE_36_RADIX)}.${Bun.hash(providersHashInput).toString(BASE_36_RADIX)}`;
14972
15142
  const cachedWrapper = wrapperOutputCache.get(resolvedEntry);
14973
- const clientFile = join28(indexesDir, jsName);
15143
+ const clientFile = join29(indexesDir, jsName);
14974
15144
  if (hmr && cachedWrapper && cachedWrapper.serverHash === serverContentHash && existsSync23(clientFile) && (usesLegacyAnimations || !original.includes("__ABSOLUTE_PAGE_USES_LEGACY_ANIMATIONS__")) && (!usesLegacyAnimations || original.includes("__ABSOLUTE_PAGE_USES_LEGACY_ANIMATIONS__"))) {
14975
15145
  return {
14976
15146
  clientPath: clientFile,
@@ -15002,7 +15172,7 @@ export const __ABSOLUTE_PAGE_USES_LEGACY_ANIMATIONS__ = true;
15002
15172
  const angularDirAbs = resolve24(outRoot);
15003
15173
  const appSourceAbs = resolve24(providersInjection.appProvidersSource);
15004
15174
  const rel = relative11(angularDirAbs, appSourceAbs).replace(/\\/g, "/");
15005
- return join28(compiledParent, rel).replace(/\.[cm]?[tj]sx?$/, ".js");
15175
+ return join29(compiledParent, rel).replace(/\.[cm]?[tj]sx?$/, ".js");
15006
15176
  })();
15007
15177
  const appProvidersSpec = (() => {
15008
15178
  const rel = relative11(dirname16(rawServerFile), compiledAppProvidersPath).replace(/\\/g, "/");
@@ -15225,24 +15395,24 @@ var init_compileAngular = __esm(() => {
15225
15395
  init_stylePreprocessor();
15226
15396
  init_generatedDir();
15227
15397
  devClientDir4 = resolveDevClientDir4();
15228
- hmrClientPath5 = join28(devClientDir4, "hmrClient.ts").replace(/\\/g, "/");
15398
+ hmrClientPath5 = join29(devClientDir4, "hmrClient.ts").replace(/\\/g, "/");
15229
15399
  jitContentCache = new Map;
15230
15400
  wrapperOutputCache = new Map;
15231
15401
  });
15232
15402
 
15233
15403
  // src/dev/angular/hmrImportGenerator.ts
15234
- import ts10 from "typescript";
15404
+ import ts11 from "typescript";
15235
15405
  var createHmrImportGenerator = (namespaceMap) => ({
15236
15406
  addImport(request) {
15237
15407
  const ns = namespaceMap.get(request.exportModuleSpecifier);
15238
15408
  if (!ns) {
15239
15409
  throw new Error(`HMR import generator has no namespace mapping for ${request.exportModuleSpecifier}. ` + `Add it to namespaceDependencies before calling compileHmrUpdateCallback.`);
15240
15410
  }
15241
- const namespaceId = ts10.factory.createIdentifier(ns);
15411
+ const namespaceId = ts11.factory.createIdentifier(ns);
15242
15412
  if (request.exportSymbolName === null) {
15243
15413
  return namespaceId;
15244
15414
  }
15245
- return ts10.factory.createPropertyAccessExpression(namespaceId, ts10.factory.createIdentifier(request.exportSymbolName));
15415
+ return ts11.factory.createPropertyAccessExpression(namespaceId, ts11.factory.createIdentifier(request.exportSymbolName));
15246
15416
  }
15247
15417
  });
15248
15418
  var init_hmrImportGenerator = () => {};
@@ -15615,13 +15785,13 @@ var init_translator = __esm(() => {
15615
15785
  });
15616
15786
 
15617
15787
  // src/dev/angular/vendor/translator/ts_util.ts
15618
- import ts11 from "typescript";
15788
+ import ts12 from "typescript";
15619
15789
  function tsNumericExpression(value) {
15620
15790
  if (value < 0) {
15621
- const operand = ts11.factory.createNumericLiteral(Math.abs(value));
15622
- return ts11.factory.createPrefixUnaryExpression(ts11.SyntaxKind.MinusToken, operand);
15791
+ const operand = ts12.factory.createNumericLiteral(Math.abs(value));
15792
+ return ts12.factory.createPrefixUnaryExpression(ts12.SyntaxKind.MinusToken, operand);
15623
15793
  }
15624
- return ts11.factory.createNumericLiteral(value);
15794
+ return ts12.factory.createNumericLiteral(value);
15625
15795
  }
15626
15796
  var init_ts_util = __esm(() => {
15627
15797
  /*!
@@ -15634,142 +15804,142 @@ var init_ts_util = __esm(() => {
15634
15804
  });
15635
15805
 
15636
15806
  // src/dev/angular/vendor/translator/typescript_ast_factory.ts
15637
- import ts12 from "typescript";
15807
+ import ts13 from "typescript";
15638
15808
 
15639
15809
  class TypeScriptAstFactory {
15640
15810
  annotateForClosureCompiler;
15641
15811
  externalSourceFiles = new Map;
15642
15812
  UNARY_OPERATORS = /* @__PURE__ */ (() => ({
15643
- "+": ts12.SyntaxKind.PlusToken,
15644
- "-": ts12.SyntaxKind.MinusToken,
15645
- "!": ts12.SyntaxKind.ExclamationToken
15813
+ "+": ts13.SyntaxKind.PlusToken,
15814
+ "-": ts13.SyntaxKind.MinusToken,
15815
+ "!": ts13.SyntaxKind.ExclamationToken
15646
15816
  }))();
15647
15817
  BINARY_OPERATORS = /* @__PURE__ */ (() => ({
15648
- "&&": ts12.SyntaxKind.AmpersandAmpersandToken,
15649
- ">": ts12.SyntaxKind.GreaterThanToken,
15650
- ">=": ts12.SyntaxKind.GreaterThanEqualsToken,
15651
- "&": ts12.SyntaxKind.AmpersandToken,
15652
- "|": ts12.SyntaxKind.BarToken,
15653
- "/": ts12.SyntaxKind.SlashToken,
15654
- "==": ts12.SyntaxKind.EqualsEqualsToken,
15655
- "===": ts12.SyntaxKind.EqualsEqualsEqualsToken,
15656
- "<": ts12.SyntaxKind.LessThanToken,
15657
- "<=": ts12.SyntaxKind.LessThanEqualsToken,
15658
- "-": ts12.SyntaxKind.MinusToken,
15659
- "%": ts12.SyntaxKind.PercentToken,
15660
- "*": ts12.SyntaxKind.AsteriskToken,
15661
- "**": ts12.SyntaxKind.AsteriskAsteriskToken,
15662
- "!=": ts12.SyntaxKind.ExclamationEqualsToken,
15663
- "!==": ts12.SyntaxKind.ExclamationEqualsEqualsToken,
15664
- "||": ts12.SyntaxKind.BarBarToken,
15665
- "+": ts12.SyntaxKind.PlusToken,
15666
- "??": ts12.SyntaxKind.QuestionQuestionToken,
15667
- "=": ts12.SyntaxKind.EqualsToken,
15668
- "+=": ts12.SyntaxKind.PlusEqualsToken,
15669
- "-=": ts12.SyntaxKind.MinusEqualsToken,
15670
- "*=": ts12.SyntaxKind.AsteriskEqualsToken,
15671
- "/=": ts12.SyntaxKind.SlashEqualsToken,
15672
- "%=": ts12.SyntaxKind.PercentEqualsToken,
15673
- "**=": ts12.SyntaxKind.AsteriskAsteriskEqualsToken,
15674
- "&&=": ts12.SyntaxKind.AmpersandAmpersandEqualsToken,
15675
- "||=": ts12.SyntaxKind.BarBarEqualsToken,
15676
- "??=": ts12.SyntaxKind.QuestionQuestionEqualsToken,
15677
- in: ts12.SyntaxKind.InKeyword,
15678
- instanceof: ts12.SyntaxKind.InstanceOfKeyword
15818
+ "&&": ts13.SyntaxKind.AmpersandAmpersandToken,
15819
+ ">": ts13.SyntaxKind.GreaterThanToken,
15820
+ ">=": ts13.SyntaxKind.GreaterThanEqualsToken,
15821
+ "&": ts13.SyntaxKind.AmpersandToken,
15822
+ "|": ts13.SyntaxKind.BarToken,
15823
+ "/": ts13.SyntaxKind.SlashToken,
15824
+ "==": ts13.SyntaxKind.EqualsEqualsToken,
15825
+ "===": ts13.SyntaxKind.EqualsEqualsEqualsToken,
15826
+ "<": ts13.SyntaxKind.LessThanToken,
15827
+ "<=": ts13.SyntaxKind.LessThanEqualsToken,
15828
+ "-": ts13.SyntaxKind.MinusToken,
15829
+ "%": ts13.SyntaxKind.PercentToken,
15830
+ "*": ts13.SyntaxKind.AsteriskToken,
15831
+ "**": ts13.SyntaxKind.AsteriskAsteriskToken,
15832
+ "!=": ts13.SyntaxKind.ExclamationEqualsToken,
15833
+ "!==": ts13.SyntaxKind.ExclamationEqualsEqualsToken,
15834
+ "||": ts13.SyntaxKind.BarBarToken,
15835
+ "+": ts13.SyntaxKind.PlusToken,
15836
+ "??": ts13.SyntaxKind.QuestionQuestionToken,
15837
+ "=": ts13.SyntaxKind.EqualsToken,
15838
+ "+=": ts13.SyntaxKind.PlusEqualsToken,
15839
+ "-=": ts13.SyntaxKind.MinusEqualsToken,
15840
+ "*=": ts13.SyntaxKind.AsteriskEqualsToken,
15841
+ "/=": ts13.SyntaxKind.SlashEqualsToken,
15842
+ "%=": ts13.SyntaxKind.PercentEqualsToken,
15843
+ "**=": ts13.SyntaxKind.AsteriskAsteriskEqualsToken,
15844
+ "&&=": ts13.SyntaxKind.AmpersandAmpersandEqualsToken,
15845
+ "||=": ts13.SyntaxKind.BarBarEqualsToken,
15846
+ "??=": ts13.SyntaxKind.QuestionQuestionEqualsToken,
15847
+ in: ts13.SyntaxKind.InKeyword,
15848
+ instanceof: ts13.SyntaxKind.InstanceOfKeyword
15679
15849
  }))();
15680
15850
  VAR_TYPES = /* @__PURE__ */ (() => ({
15681
- const: ts12.NodeFlags.Const,
15682
- let: ts12.NodeFlags.Let,
15683
- var: ts12.NodeFlags.None
15851
+ const: ts13.NodeFlags.Const,
15852
+ let: ts13.NodeFlags.Let,
15853
+ var: ts13.NodeFlags.None
15684
15854
  }))();
15685
15855
  constructor(annotateForClosureCompiler) {
15686
15856
  this.annotateForClosureCompiler = annotateForClosureCompiler;
15687
15857
  }
15688
15858
  attachComments = attachComments;
15689
- createArrayLiteral = ts12.factory.createArrayLiteralExpression;
15859
+ createArrayLiteral = ts13.factory.createArrayLiteralExpression;
15690
15860
  createAssignment(target, operator, value) {
15691
- return ts12.factory.createBinaryExpression(target, this.BINARY_OPERATORS[operator], value);
15861
+ return ts13.factory.createBinaryExpression(target, this.BINARY_OPERATORS[operator], value);
15692
15862
  }
15693
15863
  createBinaryExpression(leftOperand, operator, rightOperand) {
15694
- return ts12.factory.createBinaryExpression(leftOperand, this.BINARY_OPERATORS[operator], rightOperand);
15864
+ return ts13.factory.createBinaryExpression(leftOperand, this.BINARY_OPERATORS[operator], rightOperand);
15695
15865
  }
15696
15866
  createBlock(body) {
15697
- return ts12.factory.createBlock(body);
15867
+ return ts13.factory.createBlock(body);
15698
15868
  }
15699
15869
  createCallExpression(callee, args, pure) {
15700
- const call = ts12.factory.createCallExpression(callee, undefined, args);
15870
+ const call = ts13.factory.createCallExpression(callee, undefined, args);
15701
15871
  if (pure) {
15702
- ts12.addSyntheticLeadingComment(call, ts12.SyntaxKind.MultiLineCommentTrivia, this.annotateForClosureCompiler ? "* @pureOrBreakMyCode " /* CLOSURE */ : "@__PURE__" /* TERSER */, false);
15872
+ ts13.addSyntheticLeadingComment(call, ts13.SyntaxKind.MultiLineCommentTrivia, this.annotateForClosureCompiler ? "* @pureOrBreakMyCode " /* CLOSURE */ : "@__PURE__" /* TERSER */, false);
15703
15873
  }
15704
15874
  return call;
15705
15875
  }
15706
15876
  createConditional(condition, whenTrue, whenFalse) {
15707
- return ts12.factory.createConditionalExpression(condition, undefined, whenTrue, undefined, whenFalse);
15877
+ return ts13.factory.createConditionalExpression(condition, undefined, whenTrue, undefined, whenFalse);
15708
15878
  }
15709
- createElementAccess = ts12.factory.createElementAccessExpression;
15710
- createExpressionStatement = ts12.factory.createExpressionStatement;
15879
+ createElementAccess = ts13.factory.createElementAccessExpression;
15880
+ createExpressionStatement = ts13.factory.createExpressionStatement;
15711
15881
  createDynamicImport(url) {
15712
- return ts12.factory.createCallExpression(ts12.factory.createToken(ts12.SyntaxKind.ImportKeyword), undefined, [
15713
- typeof url === "string" ? ts12.factory.createStringLiteral(url) : url
15882
+ return ts13.factory.createCallExpression(ts13.factory.createToken(ts13.SyntaxKind.ImportKeyword), undefined, [
15883
+ typeof url === "string" ? ts13.factory.createStringLiteral(url) : url
15714
15884
  ]);
15715
15885
  }
15716
15886
  createFunctionDeclaration(functionName, parameters, body) {
15717
- if (!ts12.isBlock(body)) {
15718
- throw new Error(`Invalid syntax, expected a block, but got ${ts12.SyntaxKind[body.kind]}.`);
15887
+ if (!ts13.isBlock(body)) {
15888
+ throw new Error(`Invalid syntax, expected a block, but got ${ts13.SyntaxKind[body.kind]}.`);
15719
15889
  }
15720
- return ts12.factory.createFunctionDeclaration(undefined, undefined, functionName, undefined, parameters.map((param) => this.createParameter(param)), undefined, body);
15890
+ return ts13.factory.createFunctionDeclaration(undefined, undefined, functionName, undefined, parameters.map((param) => this.createParameter(param)), undefined, body);
15721
15891
  }
15722
15892
  createFunctionExpression(functionName, parameters, body) {
15723
- if (!ts12.isBlock(body)) {
15724
- throw new Error(`Invalid syntax, expected a block, but got ${ts12.SyntaxKind[body.kind]}.`);
15893
+ if (!ts13.isBlock(body)) {
15894
+ throw new Error(`Invalid syntax, expected a block, but got ${ts13.SyntaxKind[body.kind]}.`);
15725
15895
  }
15726
- return ts12.factory.createFunctionExpression(undefined, undefined, functionName ?? undefined, undefined, parameters.map((param) => this.createParameter(param)), undefined, body);
15896
+ return ts13.factory.createFunctionExpression(undefined, undefined, functionName ?? undefined, undefined, parameters.map((param) => this.createParameter(param)), undefined, body);
15727
15897
  }
15728
15898
  createArrowFunctionExpression(parameters, body) {
15729
- if (ts12.isStatement(body) && !ts12.isBlock(body)) {
15730
- throw new Error(`Invalid syntax, expected a block, but got ${ts12.SyntaxKind[body.kind]}.`);
15899
+ if (ts13.isStatement(body) && !ts13.isBlock(body)) {
15900
+ throw new Error(`Invalid syntax, expected a block, but got ${ts13.SyntaxKind[body.kind]}.`);
15731
15901
  }
15732
- return ts12.factory.createArrowFunction(undefined, undefined, parameters.map((param) => this.createParameter(param)), undefined, undefined, body);
15902
+ return ts13.factory.createArrowFunction(undefined, undefined, parameters.map((param) => this.createParameter(param)), undefined, undefined, body);
15733
15903
  }
15734
15904
  createParameter(param) {
15735
- return ts12.factory.createParameterDeclaration(undefined, undefined, param.name, undefined, param.type ?? undefined);
15905
+ return ts13.factory.createParameterDeclaration(undefined, undefined, param.name, undefined, param.type ?? undefined);
15736
15906
  }
15737
- createIdentifier = ts12.factory.createIdentifier;
15907
+ createIdentifier = ts13.factory.createIdentifier;
15738
15908
  createIfStatement(condition, thenStatement, elseStatement) {
15739
- return ts12.factory.createIfStatement(condition, thenStatement, elseStatement ?? undefined);
15909
+ return ts13.factory.createIfStatement(condition, thenStatement, elseStatement ?? undefined);
15740
15910
  }
15741
15911
  createLiteral(value) {
15742
15912
  if (value === undefined) {
15743
- return ts12.factory.createIdentifier("undefined");
15913
+ return ts13.factory.createIdentifier("undefined");
15744
15914
  } else if (value === null) {
15745
- return ts12.factory.createNull();
15915
+ return ts13.factory.createNull();
15746
15916
  } else if (typeof value === "boolean") {
15747
- return value ? ts12.factory.createTrue() : ts12.factory.createFalse();
15917
+ return value ? ts13.factory.createTrue() : ts13.factory.createFalse();
15748
15918
  } else if (typeof value === "number") {
15749
15919
  return tsNumericExpression(value);
15750
15920
  } else {
15751
- return ts12.factory.createStringLiteral(value);
15921
+ return ts13.factory.createStringLiteral(value);
15752
15922
  }
15753
15923
  }
15754
15924
  createNewExpression(expression, args) {
15755
- return ts12.factory.createNewExpression(expression, undefined, args);
15925
+ return ts13.factory.createNewExpression(expression, undefined, args);
15756
15926
  }
15757
15927
  createObjectLiteral(properties) {
15758
- return ts12.factory.createObjectLiteralExpression(properties.map((prop) => {
15928
+ return ts13.factory.createObjectLiteralExpression(properties.map((prop) => {
15759
15929
  if (prop.kind === "spread") {
15760
- return ts12.factory.createSpreadAssignment(prop.expression);
15930
+ return ts13.factory.createSpreadAssignment(prop.expression);
15761
15931
  }
15762
- return ts12.factory.createPropertyAssignment(prop.quoted ? ts12.factory.createStringLiteral(prop.propertyName) : ts12.factory.createIdentifier(prop.propertyName), prop.value);
15932
+ return ts13.factory.createPropertyAssignment(prop.quoted ? ts13.factory.createStringLiteral(prop.propertyName) : ts13.factory.createIdentifier(prop.propertyName), prop.value);
15763
15933
  }));
15764
15934
  }
15765
- createParenthesizedExpression = ts12.factory.createParenthesizedExpression;
15766
- createPropertyAccess = ts12.factory.createPropertyAccessExpression;
15767
- createSpreadElement = ts12.factory.createSpreadElement;
15935
+ createParenthesizedExpression = ts13.factory.createParenthesizedExpression;
15936
+ createPropertyAccess = ts13.factory.createPropertyAccessExpression;
15937
+ createSpreadElement = ts13.factory.createSpreadElement;
15768
15938
  createReturnStatement(expression) {
15769
- return ts12.factory.createReturnStatement(expression ?? undefined);
15939
+ return ts13.factory.createReturnStatement(expression ?? undefined);
15770
15940
  }
15771
15941
  createTaggedTemplate(tag, template) {
15772
- return ts12.factory.createTaggedTemplateExpression(tag, undefined, this.createTemplateLiteral(template));
15942
+ return ts13.factory.createTaggedTemplateExpression(tag, undefined, this.createTemplateLiteral(template));
15773
15943
  }
15774
15944
  createTemplateLiteral(template) {
15775
15945
  let templateLiteral;
@@ -15779,7 +15949,7 @@ class TypeScriptAstFactory {
15779
15949
  throw new Error("createTemplateLiteral: template has no elements");
15780
15950
  }
15781
15951
  if (length === 1) {
15782
- templateLiteral = ts12.factory.createNoSubstitutionTemplateLiteral(head.cooked, head.raw);
15952
+ templateLiteral = ts13.factory.createNoSubstitutionTemplateLiteral(head.cooked, head.raw);
15783
15953
  } else {
15784
15954
  const spans = [];
15785
15955
  for (let i = 1;i < length - 1; i++) {
@@ -15793,7 +15963,7 @@ class TypeScriptAstFactory {
15793
15963
  if (range !== null) {
15794
15964
  this.setSourceMapRange(middle, range);
15795
15965
  }
15796
- spans.push(ts12.factory.createTemplateSpan(expression, middle));
15966
+ spans.push(ts13.factory.createTemplateSpan(expression, middle));
15797
15967
  }
15798
15968
  const resolvedExpression = template.expressions[length - 2];
15799
15969
  const templatePart = template.elements[length - 1];
@@ -15804,27 +15974,27 @@ class TypeScriptAstFactory {
15804
15974
  if (templatePart.range !== null) {
15805
15975
  this.setSourceMapRange(templateTail, templatePart.range);
15806
15976
  }
15807
- spans.push(ts12.factory.createTemplateSpan(resolvedExpression, templateTail));
15808
- templateLiteral = ts12.factory.createTemplateExpression(ts12.factory.createTemplateHead(head.cooked, head.raw), spans);
15977
+ spans.push(ts13.factory.createTemplateSpan(resolvedExpression, templateTail));
15978
+ templateLiteral = ts13.factory.createTemplateExpression(ts13.factory.createTemplateHead(head.cooked, head.raw), spans);
15809
15979
  }
15810
15980
  if (head.range !== null) {
15811
15981
  this.setSourceMapRange(templateLiteral, head.range);
15812
15982
  }
15813
15983
  return templateLiteral;
15814
15984
  }
15815
- createThrowStatement = ts12.factory.createThrowStatement;
15816
- createTypeOfExpression = ts12.factory.createTypeOfExpression;
15817
- createVoidExpression = ts12.factory.createVoidExpression;
15985
+ createThrowStatement = ts13.factory.createThrowStatement;
15986
+ createTypeOfExpression = ts13.factory.createTypeOfExpression;
15987
+ createVoidExpression = ts13.factory.createVoidExpression;
15818
15988
  createUnaryExpression(operator, operand) {
15819
- return ts12.factory.createPrefixUnaryExpression(this.UNARY_OPERATORS[operator], operand);
15989
+ return ts13.factory.createPrefixUnaryExpression(this.UNARY_OPERATORS[operator], operand);
15820
15990
  }
15821
15991
  createVariableDeclaration(variableName, initializer, variableType, type) {
15822
- return ts12.factory.createVariableStatement(undefined, ts12.factory.createVariableDeclarationList([
15823
- ts12.factory.createVariableDeclaration(variableName, undefined, type ?? undefined, initializer ?? undefined)
15992
+ return ts13.factory.createVariableStatement(undefined, ts13.factory.createVariableDeclarationList([
15993
+ ts13.factory.createVariableDeclaration(variableName, undefined, type ?? undefined, initializer ?? undefined)
15824
15994
  ], this.VAR_TYPES[variableType]));
15825
15995
  }
15826
15996
  createRegularExpressionLiteral(body, flags) {
15827
- return ts12.factory.createRegularExpressionLiteral(`/${body}/${flags ?? ""}`);
15997
+ return ts13.factory.createRegularExpressionLiteral(`/${body}/${flags ?? ""}`);
15828
15998
  }
15829
15999
  setSourceMapRange(node, sourceMapRange) {
15830
16000
  if (sourceMapRange === null) {
@@ -15832,10 +16002,10 @@ class TypeScriptAstFactory {
15832
16002
  }
15833
16003
  const url = sourceMapRange.url;
15834
16004
  if (!this.externalSourceFiles.has(url)) {
15835
- this.externalSourceFiles.set(url, ts12.createSourceMapSource(url, sourceMapRange.content, (pos) => pos));
16005
+ this.externalSourceFiles.set(url, ts13.createSourceMapSource(url, sourceMapRange.content, (pos) => pos));
15836
16006
  }
15837
16007
  const source = this.externalSourceFiles.get(url);
15838
- ts12.setSourceMapRange(node, {
16008
+ ts13.setSourceMapRange(node, {
15839
16009
  pos: sourceMapRange.start.offset,
15840
16010
  end: sourceMapRange.end.offset,
15841
16011
  source
@@ -15845,77 +16015,77 @@ class TypeScriptAstFactory {
15845
16015
  createBuiltInType(type) {
15846
16016
  switch (type) {
15847
16017
  case "any":
15848
- return ts12.factory.createKeywordTypeNode(ts12.SyntaxKind.AnyKeyword);
16018
+ return ts13.factory.createKeywordTypeNode(ts13.SyntaxKind.AnyKeyword);
15849
16019
  case "boolean":
15850
- return ts12.factory.createKeywordTypeNode(ts12.SyntaxKind.BooleanKeyword);
16020
+ return ts13.factory.createKeywordTypeNode(ts13.SyntaxKind.BooleanKeyword);
15851
16021
  case "number":
15852
- return ts12.factory.createKeywordTypeNode(ts12.SyntaxKind.NumberKeyword);
16022
+ return ts13.factory.createKeywordTypeNode(ts13.SyntaxKind.NumberKeyword);
15853
16023
  case "string":
15854
- return ts12.factory.createKeywordTypeNode(ts12.SyntaxKind.StringKeyword);
16024
+ return ts13.factory.createKeywordTypeNode(ts13.SyntaxKind.StringKeyword);
15855
16025
  case "function":
15856
- return ts12.factory.createTypeReferenceNode(ts12.factory.createIdentifier("Function"));
16026
+ return ts13.factory.createTypeReferenceNode(ts13.factory.createIdentifier("Function"));
15857
16027
  case "never":
15858
- return ts12.factory.createKeywordTypeNode(ts12.SyntaxKind.NeverKeyword);
16028
+ return ts13.factory.createKeywordTypeNode(ts13.SyntaxKind.NeverKeyword);
15859
16029
  case "unknown":
15860
- return ts12.factory.createKeywordTypeNode(ts12.SyntaxKind.UnknownKeyword);
16030
+ return ts13.factory.createKeywordTypeNode(ts13.SyntaxKind.UnknownKeyword);
15861
16031
  }
15862
16032
  }
15863
16033
  createExpressionType(expression, typeParams) {
15864
16034
  const typeName = getEntityTypeFromExpression(expression);
15865
- return ts12.factory.createTypeReferenceNode(typeName, typeParams ?? undefined);
16035
+ return ts13.factory.createTypeReferenceNode(typeName, typeParams ?? undefined);
15866
16036
  }
15867
16037
  createArrayType(elementType) {
15868
- return ts12.factory.createArrayTypeNode(elementType);
16038
+ return ts13.factory.createArrayTypeNode(elementType);
15869
16039
  }
15870
16040
  createMapType(valueType) {
15871
- return ts12.factory.createTypeLiteralNode([
15872
- ts12.factory.createIndexSignature(undefined, [
15873
- ts12.factory.createParameterDeclaration(undefined, undefined, "key", undefined, ts12.factory.createKeywordTypeNode(ts12.SyntaxKind.StringKeyword))
16041
+ return ts13.factory.createTypeLiteralNode([
16042
+ ts13.factory.createIndexSignature(undefined, [
16043
+ ts13.factory.createParameterDeclaration(undefined, undefined, "key", undefined, ts13.factory.createKeywordTypeNode(ts13.SyntaxKind.StringKeyword))
15874
16044
  ], valueType)
15875
16045
  ]);
15876
16046
  }
15877
16047
  transplantType(type) {
15878
- if (typeof type.kind === "number" && typeof type.getSourceFile === "function" && ts12.isTypeNode(type)) {
16048
+ if (typeof type.kind === "number" && typeof type.getSourceFile === "function" && ts13.isTypeNode(type)) {
15879
16049
  return type;
15880
16050
  }
15881
16051
  throw new Error("Attempting to transplant a type node from a non-TypeScript AST: " + type);
15882
16052
  }
15883
16053
  }
15884
16054
  function createTemplateMiddle(cooked, raw) {
15885
- const node = ts12.factory.createTemplateHead(cooked, raw);
15886
- node.kind = ts12.SyntaxKind.TemplateMiddle;
16055
+ const node = ts13.factory.createTemplateHead(cooked, raw);
16056
+ node.kind = ts13.SyntaxKind.TemplateMiddle;
15887
16057
  return node;
15888
16058
  }
15889
16059
  function createTemplateTail(cooked, raw) {
15890
- const node = ts12.factory.createTemplateHead(cooked, raw);
15891
- node.kind = ts12.SyntaxKind.TemplateTail;
16060
+ const node = ts13.factory.createTemplateHead(cooked, raw);
16061
+ node.kind = ts13.SyntaxKind.TemplateTail;
15892
16062
  return node;
15893
16063
  }
15894
16064
  function attachComments(statement, leadingComments) {
15895
16065
  for (const comment of leadingComments) {
15896
- const commentKind = comment.multiline ? ts12.SyntaxKind.MultiLineCommentTrivia : ts12.SyntaxKind.SingleLineCommentTrivia;
16066
+ const commentKind = comment.multiline ? ts13.SyntaxKind.MultiLineCommentTrivia : ts13.SyntaxKind.SingleLineCommentTrivia;
15897
16067
  if (comment.multiline) {
15898
- ts12.addSyntheticLeadingComment(statement, commentKind, comment.toString(), comment.trailingNewline);
16068
+ ts13.addSyntheticLeadingComment(statement, commentKind, comment.toString(), comment.trailingNewline);
15899
16069
  } else {
15900
16070
  for (const line of comment.toString().split(`
15901
16071
  `)) {
15902
- ts12.addSyntheticLeadingComment(statement, commentKind, line, comment.trailingNewline);
16072
+ ts13.addSyntheticLeadingComment(statement, commentKind, line, comment.trailingNewline);
15903
16073
  }
15904
16074
  }
15905
16075
  }
15906
16076
  }
15907
16077
  function getEntityTypeFromExpression(expression) {
15908
- if (ts12.isIdentifier(expression)) {
16078
+ if (ts13.isIdentifier(expression)) {
15909
16079
  return expression;
15910
16080
  }
15911
- if (ts12.isPropertyAccessExpression(expression)) {
16081
+ if (ts13.isPropertyAccessExpression(expression)) {
15912
16082
  const left = getEntityTypeFromExpression(expression.expression);
15913
- if (!ts12.isIdentifier(expression.name)) {
16083
+ if (!ts13.isIdentifier(expression.name)) {
15914
16084
  throw new Error(`Unsupported property access for type reference: ${expression.name.text}`);
15915
16085
  }
15916
- return ts12.factory.createQualifiedName(left, expression.name);
16086
+ return ts13.factory.createQualifiedName(left, expression.name);
15917
16087
  }
15918
- throw new Error(`Unsupported expression for type reference: ${ts12.SyntaxKind[expression.kind]}`);
16088
+ throw new Error(`Unsupported expression for type reference: ${ts13.SyntaxKind[expression.kind]}`);
15919
16089
  }
15920
16090
  var init_typescript_ast_factory = __esm(() => {
15921
16091
  init_ts_util();
@@ -15948,9 +16118,9 @@ __export(exports_fastHmrCompiler, {
15948
16118
  primeComponentFingerprint: () => primeComponentFingerprint,
15949
16119
  invalidateFingerprintCache: () => invalidateFingerprintCache
15950
16120
  });
15951
- import { existsSync as existsSync24, readFileSync as readFileSync19, statSync as statSync2 } from "fs";
16121
+ import { existsSync as existsSync24, readFileSync as readFileSync21, statSync as statSync2 } from "fs";
15952
16122
  import { dirname as dirname17, extname as extname6, relative as relative12, resolve as resolve25 } from "path";
15953
- import ts13 from "typescript";
16123
+ import ts14 from "typescript";
15954
16124
  var fail = (reason, detail, location) => ({
15955
16125
  ok: false,
15956
16126
  reason,
@@ -16034,23 +16204,23 @@ var fail = (reason, detail, location) => ({
16034
16204
  }
16035
16205
  let sourceFile;
16036
16206
  try {
16037
- sourceFile = ts13.createSourceFile(componentFilePath, source, ts13.ScriptTarget.Latest, true, ts13.ScriptKind.TS);
16207
+ sourceFile = ts14.createSourceFile(componentFilePath, source, ts14.ScriptTarget.Latest, true, ts14.ScriptKind.TS);
16038
16208
  } catch {
16039
16209
  return;
16040
16210
  }
16041
16211
  for (const stmt of sourceFile.statements) {
16042
- if (!ts13.isClassDeclaration(stmt))
16212
+ if (!ts14.isClassDeclaration(stmt))
16043
16213
  continue;
16044
16214
  const className = stmt.name?.text;
16045
16215
  if (!className)
16046
16216
  continue;
16047
- const decorators = ts13.getDecorators(stmt) ?? [];
16217
+ const decorators = ts14.getDecorators(stmt) ?? [];
16048
16218
  const decoratorName = (() => {
16049
16219
  for (const d2 of decorators) {
16050
- if (!ts13.isCallExpression(d2.expression))
16220
+ if (!ts14.isCallExpression(d2.expression))
16051
16221
  continue;
16052
16222
  const expr = d2.expression.expression;
16053
- if (!ts13.isIdentifier(expr))
16223
+ if (!ts14.isIdentifier(expr))
16054
16224
  continue;
16055
16225
  if (expr.text === "Component" || expr.text === "Directive" || expr.text === "Pipe" || expr.text === "Injectable") {
16056
16226
  return expr.text;
@@ -16064,16 +16234,16 @@ var fail = (reason, detail, location) => ({
16064
16234
  const id = encodeURIComponent(`${projectRel}@${className}`);
16065
16235
  if (decoratorName === "Component") {
16066
16236
  const componentDecorator = decorators.find((d2) => {
16067
- if (!ts13.isCallExpression(d2.expression))
16237
+ if (!ts14.isCallExpression(d2.expression))
16068
16238
  return false;
16069
16239
  const expr = d2.expression.expression;
16070
- return ts13.isIdentifier(expr) && expr.text === "Component";
16240
+ return ts14.isIdentifier(expr) && expr.text === "Component";
16071
16241
  });
16072
16242
  if (!componentDecorator)
16073
16243
  continue;
16074
16244
  const decoratorCall = componentDecorator.expression;
16075
16245
  const args = decoratorCall.arguments[0];
16076
- if (!args || !ts13.isObjectLiteralExpression(args))
16246
+ if (!args || !ts14.isObjectLiteralExpression(args))
16077
16247
  continue;
16078
16248
  const decoratorMeta = readDecoratorMeta(args);
16079
16249
  const { inputs, outputs } = extractInputsAndOutputs(stmt, null);
@@ -16107,11 +16277,11 @@ var fail = (reason, detail, location) => ({
16107
16277
  return false;
16108
16278
  return true;
16109
16279
  }, ENTITY_DECORATOR_NAMES, findEntityDecorator = (cls) => {
16110
- for (const dec of ts13.getDecorators(cls) ?? []) {
16280
+ for (const dec of ts14.getDecorators(cls) ?? []) {
16111
16281
  const expr = dec.expression;
16112
- if (!ts13.isCallExpression(expr))
16282
+ if (!ts14.isCallExpression(expr))
16113
16283
  continue;
16114
- if (!ts13.isIdentifier(expr.expression))
16284
+ if (!ts14.isIdentifier(expr.expression))
16115
16285
  continue;
16116
16286
  if (ENTITY_DECORATOR_NAMES.has(expr.expression.text))
16117
16287
  return dec;
@@ -16129,18 +16299,18 @@ var fail = (reason, detail, location) => ({
16129
16299
  }
16130
16300
  const ctorParamTypes = [];
16131
16301
  for (const member of cls.members) {
16132
- if (!ts13.isConstructorDeclaration(member))
16302
+ if (!ts14.isConstructorDeclaration(member))
16133
16303
  continue;
16134
16304
  for (const param of member.parameters) {
16135
16305
  const typeText = param.type ? param.type.getText() : "";
16136
- const decorators = ts13.getDecorators(param) ?? [];
16306
+ const decorators = ts14.getDecorators(param) ?? [];
16137
16307
  const decoratorSig = decorators.length === 0 ? "" : decorators.map((d2) => {
16138
16308
  const e = d2.expression;
16139
- if (ts13.isCallExpression(e) && ts13.isIdentifier(e.expression)) {
16309
+ if (ts14.isCallExpression(e) && ts14.isIdentifier(e.expression)) {
16140
16310
  const args = e.arguments.map((a) => a.getText()).join(",");
16141
16311
  return `@${e.expression.text}(${args})`;
16142
16312
  }
16143
- if (ts13.isIdentifier(e))
16313
+ if (ts14.isIdentifier(e))
16144
16314
  return `@${e.text}`;
16145
16315
  return "@<unknown>";
16146
16316
  }).join("");
@@ -16162,23 +16332,23 @@ var fail = (reason, detail, location) => ({
16162
16332
  const walk = (node) => {
16163
16333
  if (found)
16164
16334
  return;
16165
- if (ts13.isClassDeclaration(node) && node.name?.text === className) {
16335
+ if (ts14.isClassDeclaration(node) && node.name?.text === className) {
16166
16336
  found = node;
16167
16337
  return;
16168
16338
  }
16169
- ts13.forEachChild(node, walk);
16339
+ ts14.forEachChild(node, walk);
16170
16340
  };
16171
16341
  walk(sourceFile);
16172
16342
  return found;
16173
16343
  }, getClassDecorators = (cls) => {
16174
- const modifiers = ts13.getDecorators(cls) ?? [];
16344
+ const modifiers = ts14.getDecorators(cls) ?? [];
16175
16345
  return [...modifiers];
16176
16346
  }, findComponentDecorator = (cls) => {
16177
16347
  for (const decorator of getClassDecorators(cls)) {
16178
16348
  const expr = decorator.expression;
16179
- if (ts13.isCallExpression(expr)) {
16349
+ if (ts14.isCallExpression(expr)) {
16180
16350
  const fn2 = expr.expression;
16181
- if (ts13.isIdentifier(fn2) && fn2.text === "Component") {
16351
+ if (ts14.isIdentifier(fn2) && fn2.text === "Component") {
16182
16352
  return decorator;
16183
16353
  }
16184
16354
  }
@@ -16186,15 +16356,15 @@ var fail = (reason, detail, location) => ({
16186
16356
  return null;
16187
16357
  }, getDecoratorArgsObject = (decorator) => {
16188
16358
  const call = decorator.expression;
16189
- if (!ts13.isCallExpression(call))
16359
+ if (!ts14.isCallExpression(call))
16190
16360
  return null;
16191
16361
  const arg = call.arguments[0];
16192
- if (!arg || !ts13.isObjectLiteralExpression(arg))
16362
+ if (!arg || !ts14.isObjectLiteralExpression(arg))
16193
16363
  return null;
16194
16364
  return arg;
16195
16365
  }, getProperty = (obj, name) => {
16196
16366
  for (const prop of obj.properties) {
16197
- if (ts13.isPropertyAssignment(prop) && (ts13.isIdentifier(prop.name) && prop.name.text === name || ts13.isStringLiteral(prop.name) && prop.name.text === name)) {
16367
+ if (ts14.isPropertyAssignment(prop) && (ts14.isIdentifier(prop.name) && prop.name.text === name || ts14.isStringLiteral(prop.name) && prop.name.text === name)) {
16198
16368
  return prop.initializer;
16199
16369
  }
16200
16370
  }
@@ -16203,7 +16373,7 @@ var fail = (reason, detail, location) => ({
16203
16373
  const expr = getProperty(obj, name);
16204
16374
  if (!expr)
16205
16375
  return null;
16206
- if (ts13.isStringLiteral(expr) || ts13.isNoSubstitutionTemplateLiteral(expr)) {
16376
+ if (ts14.isStringLiteral(expr) || ts14.isNoSubstitutionTemplateLiteral(expr)) {
16207
16377
  return expr.text;
16208
16378
  }
16209
16379
  return null;
@@ -16211,22 +16381,22 @@ var fail = (reason, detail, location) => ({
16211
16381
  const expr = getProperty(obj, name);
16212
16382
  if (!expr)
16213
16383
  return null;
16214
- if (expr.kind === ts13.SyntaxKind.TrueKeyword)
16384
+ if (expr.kind === ts14.SyntaxKind.TrueKeyword)
16215
16385
  return true;
16216
- if (expr.kind === ts13.SyntaxKind.FalseKeyword)
16386
+ if (expr.kind === ts14.SyntaxKind.FalseKeyword)
16217
16387
  return false;
16218
16388
  return null;
16219
16389
  }, isAngularDecoratorIdentifier = (name) => name === "Component" || name === "Directive" || name === "Pipe" || name === "Injectable", classHasAngularDecorator = (cls) => {
16220
- for (const dec of ts13.getDecorators(cls) ?? []) {
16390
+ for (const dec of ts14.getDecorators(cls) ?? []) {
16221
16391
  const expr = dec.expression;
16222
- if (ts13.isCallExpression(expr) && ts13.isIdentifier(expr.expression) && isAngularDecoratorIdentifier(expr.expression.text)) {
16392
+ if (ts14.isCallExpression(expr) && ts14.isIdentifier(expr.expression) && isAngularDecoratorIdentifier(expr.expression.text)) {
16223
16393
  return true;
16224
16394
  }
16225
16395
  }
16226
16396
  return false;
16227
16397
  }, findClassInSourceFile = (sf, className) => {
16228
16398
  for (const stmt of sf.statements) {
16229
- if (ts13.isClassDeclaration(stmt) && stmt.name?.text === className) {
16399
+ if (ts14.isClassDeclaration(stmt) && stmt.name?.text === className) {
16230
16400
  return stmt;
16231
16401
  }
16232
16402
  }
@@ -16236,15 +16406,15 @@ var fail = (reason, detail, location) => ({
16236
16406
  if (sameFile)
16237
16407
  return classHasAngularDecorator(sameFile);
16238
16408
  for (const stmt of sourceFile.statements) {
16239
- if (!ts13.isImportDeclaration(stmt))
16409
+ if (!ts14.isImportDeclaration(stmt))
16240
16410
  continue;
16241
- if (!ts13.isStringLiteral(stmt.moduleSpecifier))
16411
+ if (!ts14.isStringLiteral(stmt.moduleSpecifier))
16242
16412
  continue;
16243
16413
  const clause = stmt.importClause;
16244
16414
  if (!clause || clause.isTypeOnly)
16245
16415
  continue;
16246
16416
  const named = clause.namedBindings;
16247
- if (!named || !ts13.isNamedImports(named))
16417
+ if (!named || !ts14.isNamedImports(named))
16248
16418
  continue;
16249
16419
  const found = named.elements.find((el) => el.name.text === parentClassName);
16250
16420
  if (!found)
@@ -16265,11 +16435,11 @@ var fail = (reason, detail, location) => ({
16265
16435
  continue;
16266
16436
  let content;
16267
16437
  try {
16268
- content = readFileSync19(candidate, "utf-8");
16438
+ content = readFileSync21(candidate, "utf-8");
16269
16439
  } catch {
16270
16440
  continue;
16271
16441
  }
16272
- const parentSf = ts13.createSourceFile(candidate, content, ts13.ScriptTarget.Latest, true);
16442
+ const parentSf = ts14.createSourceFile(candidate, content, ts14.ScriptTarget.Latest, true);
16273
16443
  const parentCls = findClassInSourceFile(parentSf, parentClassName);
16274
16444
  if (!parentCls)
16275
16445
  continue;
@@ -16281,11 +16451,11 @@ var fail = (reason, detail, location) => ({
16281
16451
  }, inheritsDecoratedClass = (cls, sourceFile, componentDir, projectRoot) => {
16282
16452
  const heritage = cls.heritageClauses ?? [];
16283
16453
  for (const clause of heritage) {
16284
- if (clause.token !== ts13.SyntaxKind.ExtendsKeyword)
16454
+ if (clause.token !== ts14.SyntaxKind.ExtendsKeyword)
16285
16455
  continue;
16286
16456
  for (const typeNode of clause.types) {
16287
16457
  const expr = typeNode.expression;
16288
- if (!ts13.isIdentifier(expr)) {
16458
+ if (!ts14.isIdentifier(expr)) {
16289
16459
  return true;
16290
16460
  }
16291
16461
  if (parentHasAngularDecoratorAcrossFiles(expr.text, sourceFile, componentDir, projectRoot)) {
@@ -16296,18 +16466,18 @@ var fail = (reason, detail, location) => ({
16296
16466
  return false;
16297
16467
  }, CONTROL_CREATE_METHOD_NAME = "\u0275ngControlCreate", extractControlCreate = (cls) => {
16298
16468
  for (const member of cls.members) {
16299
- if (!ts13.isMethodDeclaration(member))
16469
+ if (!ts14.isMethodDeclaration(member))
16300
16470
  continue;
16301
- if (member.modifiers?.some((m) => m.kind === ts13.SyntaxKind.StaticKeyword))
16471
+ if (member.modifiers?.some((m) => m.kind === ts14.SyntaxKind.StaticKeyword))
16302
16472
  continue;
16303
16473
  const name = member.name;
16304
16474
  if (name === undefined)
16305
16475
  continue;
16306
- const nameText = ts13.isIdentifier(name) ? name.text : name.getText();
16476
+ const nameText = ts14.isIdentifier(name) ? name.text : name.getText();
16307
16477
  if (nameText !== CONTROL_CREATE_METHOD_NAME)
16308
16478
  continue;
16309
16479
  const firstParam = member.parameters[0];
16310
- if (firstParam === undefined || firstParam.type === undefined || !ts13.isTypeReferenceNode(firstParam.type)) {
16480
+ if (firstParam === undefined || firstParam.type === undefined || !ts14.isTypeReferenceNode(firstParam.type)) {
16311
16481
  return { passThroughInput: null };
16312
16482
  }
16313
16483
  const typeArgs = firstParam.type.typeArguments;
@@ -16315,16 +16485,16 @@ var fail = (reason, detail, location) => ({
16315
16485
  return { passThroughInput: null };
16316
16486
  }
16317
16487
  const arg = typeArgs[0];
16318
- if (arg === undefined || !ts13.isLiteralTypeNode(arg) || !ts13.isStringLiteral(arg.literal)) {
16488
+ if (arg === undefined || !ts14.isLiteralTypeNode(arg) || !ts14.isStringLiteral(arg.literal)) {
16319
16489
  return { passThroughInput: null };
16320
16490
  }
16321
16491
  return { passThroughInput: arg.literal.text };
16322
16492
  }
16323
16493
  return null;
16324
16494
  }, resolveEnumPropertyAccess = (expr, enumName, values) => {
16325
- if (!ts13.isPropertyAccessExpression(expr))
16495
+ if (!ts14.isPropertyAccessExpression(expr))
16326
16496
  return null;
16327
- if (!ts13.isIdentifier(expr.expression))
16497
+ if (!ts14.isIdentifier(expr.expression))
16328
16498
  return null;
16329
16499
  if (expr.expression.text !== enumName)
16330
16500
  return null;
@@ -16343,21 +16513,21 @@ var fail = (reason, detail, location) => ({
16343
16513
  const hostExpr = getProperty(args, "host");
16344
16514
  const schemasExpr = getProperty(args, "schemas");
16345
16515
  const styleUrls = [];
16346
- if (styleUrlsExpr && ts13.isArrayLiteralExpression(styleUrlsExpr)) {
16516
+ if (styleUrlsExpr && ts14.isArrayLiteralExpression(styleUrlsExpr)) {
16347
16517
  for (const el of styleUrlsExpr.elements) {
16348
- if (ts13.isStringLiteral(el))
16518
+ if (ts14.isStringLiteral(el))
16349
16519
  styleUrls.push(el.text);
16350
16520
  }
16351
16521
  }
16352
16522
  const styles = [];
16353
16523
  if (stylesExpr) {
16354
- if (ts13.isArrayLiteralExpression(stylesExpr)) {
16524
+ if (ts14.isArrayLiteralExpression(stylesExpr)) {
16355
16525
  for (const el of stylesExpr.elements) {
16356
- if (ts13.isStringLiteral(el) || ts13.isNoSubstitutionTemplateLiteral(el)) {
16526
+ if (ts14.isStringLiteral(el) || ts14.isNoSubstitutionTemplateLiteral(el)) {
16357
16527
  styles.push(el.text);
16358
16528
  }
16359
16529
  }
16360
- } else if (ts13.isStringLiteral(stylesExpr) || ts13.isNoSubstitutionTemplateLiteral(stylesExpr)) {
16530
+ } else if (ts14.isStringLiteral(stylesExpr) || ts14.isNoSubstitutionTemplateLiteral(stylesExpr)) {
16361
16531
  styles.push(stylesExpr.text);
16362
16532
  }
16363
16533
  }
@@ -16370,15 +16540,15 @@ var fail = (reason, detail, location) => ({
16370
16540
  encapsulation,
16371
16541
  hasProviders: getProperty(args, "providers") !== null,
16372
16542
  hasViewProviders: getProperty(args, "viewProviders") !== null,
16373
- importsExpr: importsExpr && ts13.isArrayLiteralExpression(importsExpr) ? importsExpr : null,
16374
- hostDirectivesExpr: hostDirectivesExpr && ts13.isArrayLiteralExpression(hostDirectivesExpr) ? hostDirectivesExpr : null,
16375
- animationsExpr: animationsExpr && ts13.isArrayLiteralExpression(animationsExpr) ? animationsExpr : null,
16376
- providersExpr: providersExpr && ts13.isArrayLiteralExpression(providersExpr) ? providersExpr : null,
16377
- viewProvidersExpr: viewProvidersExpr && ts13.isArrayLiteralExpression(viewProvidersExpr) ? viewProvidersExpr : null,
16378
- inputsArrayExpr: inputsArrayExpr && ts13.isArrayLiteralExpression(inputsArrayExpr) ? inputsArrayExpr : null,
16379
- outputsArrayExpr: outputsArrayExpr && ts13.isArrayLiteralExpression(outputsArrayExpr) ? outputsArrayExpr : null,
16380
- hostExpr: hostExpr && ts13.isObjectLiteralExpression(hostExpr) ? hostExpr : null,
16381
- schemasExpr: schemasExpr && ts13.isArrayLiteralExpression(schemasExpr) ? schemasExpr : null,
16543
+ importsExpr: importsExpr && ts14.isArrayLiteralExpression(importsExpr) ? importsExpr : null,
16544
+ hostDirectivesExpr: hostDirectivesExpr && ts14.isArrayLiteralExpression(hostDirectivesExpr) ? hostDirectivesExpr : null,
16545
+ animationsExpr: animationsExpr && ts14.isArrayLiteralExpression(animationsExpr) ? animationsExpr : null,
16546
+ providersExpr: providersExpr && ts14.isArrayLiteralExpression(providersExpr) ? providersExpr : null,
16547
+ viewProvidersExpr: viewProvidersExpr && ts14.isArrayLiteralExpression(viewProvidersExpr) ? viewProvidersExpr : null,
16548
+ inputsArrayExpr: inputsArrayExpr && ts14.isArrayLiteralExpression(inputsArrayExpr) ? inputsArrayExpr : null,
16549
+ outputsArrayExpr: outputsArrayExpr && ts14.isArrayLiteralExpression(outputsArrayExpr) ? outputsArrayExpr : null,
16550
+ hostExpr: hostExpr && ts14.isObjectLiteralExpression(hostExpr) ? hostExpr : null,
16551
+ schemasExpr: schemasExpr && ts14.isArrayLiteralExpression(schemasExpr) ? schemasExpr : null,
16382
16552
  preserveWhitespaces: getBooleanProperty(args, "preserveWhitespaces") ?? projectDefaults.preserveWhitespaces ?? false,
16383
16553
  selector: getStringProperty(args, "selector"),
16384
16554
  standalone: getBooleanProperty(args, "standalone") ?? true,
@@ -16389,13 +16559,13 @@ var fail = (reason, detail, location) => ({
16389
16559
  templateUrl: getStringProperty(args, "templateUrl")
16390
16560
  };
16391
16561
  }, extractDecoratorInput = (prop, compiler) => {
16392
- const decorators = ts13.getDecorators(prop) ?? [];
16562
+ const decorators = ts14.getDecorators(prop) ?? [];
16393
16563
  for (const decorator of decorators) {
16394
16564
  const expr = decorator.expression;
16395
- if (!ts13.isCallExpression(expr))
16565
+ if (!ts14.isCallExpression(expr))
16396
16566
  continue;
16397
16567
  const fn2 = expr.expression;
16398
- if (!ts13.isIdentifier(fn2) || fn2.text !== "Input")
16568
+ if (!ts14.isIdentifier(fn2) || fn2.text !== "Input")
16399
16569
  continue;
16400
16570
  const classPropertyName = prop.name.getText();
16401
16571
  let bindingPropertyName = classPropertyName;
@@ -16403,9 +16573,9 @@ var fail = (reason, detail, location) => ({
16403
16573
  let transformFunction = null;
16404
16574
  const arg = expr.arguments[0];
16405
16575
  if (arg) {
16406
- if (ts13.isStringLiteral(arg)) {
16576
+ if (ts14.isStringLiteral(arg)) {
16407
16577
  bindingPropertyName = arg.text;
16408
- } else if (ts13.isObjectLiteralExpression(arg)) {
16578
+ } else if (ts14.isObjectLiteralExpression(arg)) {
16409
16579
  const aliasNode = getStringProperty(arg, "alias");
16410
16580
  if (aliasNode !== null)
16411
16581
  bindingPropertyName = aliasNode;
@@ -16429,11 +16599,11 @@ var fail = (reason, detail, location) => ({
16429
16599
  }
16430
16600
  return null;
16431
16601
  }, isInputSignalCall = (init) => {
16432
- if (ts13.isCallExpression(init)) {
16602
+ if (ts14.isCallExpression(init)) {
16433
16603
  const fn2 = init.expression;
16434
- if (ts13.isIdentifier(fn2) && fn2.text === "input")
16604
+ if (ts14.isIdentifier(fn2) && fn2.text === "input")
16435
16605
  return true;
16436
- if (ts13.isPropertyAccessExpression(fn2) && ts13.isIdentifier(fn2.expression) && fn2.expression.text === "input") {
16606
+ if (ts14.isPropertyAccessExpression(fn2) && ts14.isIdentifier(fn2.expression) && fn2.expression.text === "input") {
16437
16607
  return true;
16438
16608
  }
16439
16609
  }
@@ -16444,13 +16614,13 @@ var fail = (reason, detail, location) => ({
16444
16614
  const classPropertyName = prop.name.getText();
16445
16615
  const call = prop.initializer;
16446
16616
  let required = false;
16447
- if (ts13.isPropertyAccessExpression(call.expression) && ts13.isIdentifier(call.expression.name) && call.expression.name.text === "required") {
16617
+ if (ts14.isPropertyAccessExpression(call.expression) && ts14.isIdentifier(call.expression.name) && call.expression.name.text === "required") {
16448
16618
  required = true;
16449
16619
  }
16450
16620
  let bindingPropertyName = classPropertyName;
16451
16621
  let transformFunction = null;
16452
16622
  const optsArg = call.arguments[required ? 0 : 1];
16453
- if (optsArg && ts13.isObjectLiteralExpression(optsArg)) {
16623
+ if (optsArg && ts14.isObjectLiteralExpression(optsArg)) {
16454
16624
  const aliasNode = getStringProperty(optsArg, "alias");
16455
16625
  if (aliasNode !== null)
16456
16626
  bindingPropertyName = aliasNode;
@@ -16470,28 +16640,28 @@ var fail = (reason, detail, location) => ({
16470
16640
  }
16471
16641
  };
16472
16642
  }, extractDecoratorOutput = (prop) => {
16473
- const decorators = ts13.getDecorators(prop) ?? [];
16643
+ const decorators = ts14.getDecorators(prop) ?? [];
16474
16644
  for (const decorator of decorators) {
16475
16645
  const expr = decorator.expression;
16476
- if (!ts13.isCallExpression(expr))
16646
+ if (!ts14.isCallExpression(expr))
16477
16647
  continue;
16478
16648
  const fn2 = expr.expression;
16479
- if (!ts13.isIdentifier(fn2) || fn2.text !== "Output")
16649
+ if (!ts14.isIdentifier(fn2) || fn2.text !== "Output")
16480
16650
  continue;
16481
16651
  const classPropertyName = prop.name.getText();
16482
16652
  let bindingName = classPropertyName;
16483
16653
  const arg = expr.arguments[0];
16484
- if (arg && ts13.isStringLiteral(arg))
16654
+ if (arg && ts14.isStringLiteral(arg))
16485
16655
  bindingName = arg.text;
16486
16656
  return { classPropertyName, bindingName };
16487
16657
  }
16488
16658
  return null;
16489
16659
  }, isOutputSignalCall = (init) => {
16490
- if (ts13.isCallExpression(init)) {
16660
+ if (ts14.isCallExpression(init)) {
16491
16661
  const fn2 = init.expression;
16492
- if (ts13.isIdentifier(fn2) && fn2.text === "output")
16662
+ if (ts14.isIdentifier(fn2) && fn2.text === "output")
16493
16663
  return true;
16494
- if (ts13.isPropertyAccessExpression(fn2) && ts13.isIdentifier(fn2.expression) && fn2.expression.text === "output") {
16664
+ if (ts14.isPropertyAccessExpression(fn2) && ts14.isIdentifier(fn2.expression) && fn2.expression.text === "output") {
16495
16665
  return true;
16496
16666
  }
16497
16667
  }
@@ -16503,7 +16673,7 @@ var fail = (reason, detail, location) => ({
16503
16673
  const call = prop.initializer;
16504
16674
  let bindingName = classPropertyName;
16505
16675
  const optsArg = call.arguments[0];
16506
- if (optsArg && ts13.isObjectLiteralExpression(optsArg)) {
16676
+ if (optsArg && ts14.isObjectLiteralExpression(optsArg)) {
16507
16677
  const aliasNode = getStringProperty(optsArg, "alias");
16508
16678
  if (aliasNode !== null)
16509
16679
  bindingName = aliasNode;
@@ -16515,7 +16685,7 @@ var fail = (reason, detail, location) => ({
16515
16685
  let hasDecoratorIO = false;
16516
16686
  let hasSignalIO = false;
16517
16687
  for (const member of cls.members) {
16518
- if (!ts13.isPropertyDeclaration(member))
16688
+ if (!ts14.isPropertyDeclaration(member))
16519
16689
  continue;
16520
16690
  const decoratorIn = extractDecoratorInput(member, compiler);
16521
16691
  if (decoratorIn) {
@@ -16549,21 +16719,21 @@ var fail = (reason, detail, location) => ({
16549
16719
  specialAttributes: {}
16550
16720
  }), parseHostObjectInto = (host, args, hostExprNode, compiler) => {
16551
16721
  const hostNode = getProperty(args, "host");
16552
- if (!hostNode || !ts13.isObjectLiteralExpression(hostNode)) {
16722
+ if (!hostNode || !ts14.isObjectLiteralExpression(hostNode)) {
16553
16723
  if (!hostExprNode)
16554
16724
  return;
16555
16725
  }
16556
- const obj = hostNode && ts13.isObjectLiteralExpression(hostNode) ? hostNode : hostExprNode;
16726
+ const obj = hostNode && ts14.isObjectLiteralExpression(hostNode) ? hostNode : hostExprNode;
16557
16727
  if (!obj)
16558
16728
  return;
16559
16729
  for (const prop of obj.properties) {
16560
- if (!ts13.isPropertyAssignment(prop))
16730
+ if (!ts14.isPropertyAssignment(prop))
16561
16731
  continue;
16562
16732
  const keyNode = prop.name;
16563
16733
  let key;
16564
- if (ts13.isStringLiteral(keyNode) || ts13.isNoSubstitutionTemplateLiteral(keyNode)) {
16734
+ if (ts14.isStringLiteral(keyNode) || ts14.isNoSubstitutionTemplateLiteral(keyNode)) {
16565
16735
  key = keyNode.text;
16566
- } else if (ts13.isIdentifier(keyNode)) {
16736
+ } else if (ts14.isIdentifier(keyNode)) {
16567
16737
  key = keyNode.text;
16568
16738
  } else {
16569
16739
  continue;
@@ -16580,36 +16750,36 @@ var fail = (reason, detail, location) => ({
16580
16750
  }
16581
16751
  }, mergeMemberHostDecorators = (host, cls) => {
16582
16752
  for (const member of cls.members) {
16583
- if (!ts13.canHaveDecorators(member))
16753
+ if (!ts14.canHaveDecorators(member))
16584
16754
  continue;
16585
- const decorators = ts13.getDecorators(member) ?? [];
16755
+ const decorators = ts14.getDecorators(member) ?? [];
16586
16756
  for (const dec of decorators) {
16587
16757
  const expr = dec.expression;
16588
- if (!ts13.isCallExpression(expr))
16758
+ if (!ts14.isCallExpression(expr))
16589
16759
  continue;
16590
16760
  const fn2 = expr.expression;
16591
- if (!ts13.isIdentifier(fn2))
16761
+ if (!ts14.isIdentifier(fn2))
16592
16762
  continue;
16593
16763
  if (fn2.text === "HostBinding") {
16594
- if (!ts13.isPropertyDeclaration(member) && !ts13.isGetAccessor(member))
16764
+ if (!ts14.isPropertyDeclaration(member) && !ts14.isGetAccessor(member))
16595
16765
  continue;
16596
16766
  const propertyName = member.name.text;
16597
16767
  const target = expr.arguments[0];
16598
- const key = target && ts13.isStringLiteral(target) ? target.text : propertyName;
16768
+ const key = target && ts14.isStringLiteral(target) ? target.text : propertyName;
16599
16769
  host.properties[key] = propertyName;
16600
16770
  } else if (fn2.text === "HostListener") {
16601
- if (!ts13.isMethodDeclaration(member))
16771
+ if (!ts14.isMethodDeclaration(member))
16602
16772
  continue;
16603
16773
  const methodName = member.name.text;
16604
16774
  const eventArg = expr.arguments[0];
16605
- if (!eventArg || !ts13.isStringLiteral(eventArg))
16775
+ if (!eventArg || !ts14.isStringLiteral(eventArg))
16606
16776
  continue;
16607
16777
  const event = eventArg.text;
16608
16778
  const argsArg = expr.arguments[1];
16609
16779
  let argsList = [];
16610
- if (argsArg && ts13.isArrayLiteralExpression(argsArg)) {
16780
+ if (argsArg && ts14.isArrayLiteralExpression(argsArg)) {
16611
16781
  for (const el of argsArg.elements) {
16612
- if (ts13.isStringLiteral(el))
16782
+ if (ts14.isStringLiteral(el))
16613
16783
  argsList.push(el.text);
16614
16784
  }
16615
16785
  }
@@ -16622,14 +16792,14 @@ var fail = (reason, detail, location) => ({
16622
16792
  let descendants = true;
16623
16793
  let emitDistinctChangesOnly = true;
16624
16794
  const opts = args[1];
16625
- if (opts && ts13.isObjectLiteralExpression(opts)) {
16795
+ if (opts && ts14.isObjectLiteralExpression(opts)) {
16626
16796
  static_ = getBooleanProperty(opts, "static") ?? false;
16627
16797
  descendants = getBooleanProperty(opts, "descendants") ?? true;
16628
16798
  emitDistinctChangesOnly = getBooleanProperty(opts, "emitDistinctChangesOnly") ?? true;
16629
16799
  }
16630
16800
  return { static_, descendants, emitDistinctChangesOnly };
16631
16801
  }, queryPredicateFromArg = (arg, compiler) => {
16632
- if (ts13.isStringLiteral(arg)) {
16802
+ if (ts14.isStringLiteral(arg)) {
16633
16803
  return arg.text.split(",").map((s2) => s2.trim()).filter(Boolean);
16634
16804
  }
16635
16805
  return {
@@ -16640,15 +16810,15 @@ var fail = (reason, detail, location) => ({
16640
16810
  const contentQueries = [];
16641
16811
  const viewQueries = [];
16642
16812
  for (const member of cls.members) {
16643
- if (!ts13.isPropertyDeclaration(member))
16813
+ if (!ts14.isPropertyDeclaration(member))
16644
16814
  continue;
16645
- const decorators = ts13.getDecorators(member) ?? [];
16815
+ const decorators = ts14.getDecorators(member) ?? [];
16646
16816
  for (const dec of decorators) {
16647
16817
  const expr = dec.expression;
16648
- if (!ts13.isCallExpression(expr))
16818
+ if (!ts14.isCallExpression(expr))
16649
16819
  continue;
16650
16820
  const fn2 = expr.expression;
16651
- if (!ts13.isIdentifier(fn2) || !QUERY_DECORATORS.has(fn2.text))
16821
+ if (!ts14.isIdentifier(fn2) || !QUERY_DECORATORS.has(fn2.text))
16652
16822
  continue;
16653
16823
  const propertyName = member.name.text;
16654
16824
  const tokenArg = expr.arguments[0];
@@ -16660,7 +16830,7 @@ var fail = (reason, detail, location) => ({
16660
16830
  const { static_, descendants, emitDistinctChangesOnly } = parseQueryDecoratorOptions(expr.arguments);
16661
16831
  const opts = expr.arguments[1];
16662
16832
  let read = null;
16663
- if (opts && ts13.isObjectLiteralExpression(opts)) {
16833
+ if (opts && ts14.isObjectLiteralExpression(opts)) {
16664
16834
  const readNode = getProperty(opts, "read");
16665
16835
  if (readNode) {
16666
16836
  read = new compiler.WrappedNodeExpr(readNode);
@@ -16688,15 +16858,15 @@ var fail = (reason, detail, location) => ({
16688
16858
  const contentQueries = [];
16689
16859
  const viewQueries = [];
16690
16860
  for (const member of cls.members) {
16691
- if (!ts13.isPropertyDeclaration(member) || !member.initializer)
16861
+ if (!ts14.isPropertyDeclaration(member) || !member.initializer)
16692
16862
  continue;
16693
16863
  let init = member.initializer;
16694
- if (!ts13.isCallExpression(init))
16864
+ if (!ts14.isCallExpression(init))
16695
16865
  continue;
16696
16866
  let queryName;
16697
- if (ts13.isIdentifier(init.expression)) {
16867
+ if (ts14.isIdentifier(init.expression)) {
16698
16868
  queryName = init.expression.text;
16699
- } else if (ts13.isPropertyAccessExpression(init.expression) && ts13.isIdentifier(init.expression.expression) && init.expression.name.text === "required") {
16869
+ } else if (ts14.isPropertyAccessExpression(init.expression) && ts14.isIdentifier(init.expression.expression) && init.expression.name.text === "required") {
16700
16870
  queryName = init.expression.expression.text;
16701
16871
  } else {
16702
16872
  continue;
@@ -16714,7 +16884,7 @@ var fail = (reason, detail, location) => ({
16714
16884
  let descendants = true;
16715
16885
  let read = null;
16716
16886
  const opts = init.arguments[1];
16717
- if (opts && ts13.isObjectLiteralExpression(opts)) {
16887
+ if (opts && ts14.isObjectLiteralExpression(opts)) {
16718
16888
  descendants = getBooleanProperty(opts, "descendants") ?? true;
16719
16889
  const readNode = getProperty(opts, "read");
16720
16890
  if (readNode)
@@ -16740,13 +16910,13 @@ var fail = (reason, detail, location) => ({
16740
16910
  const node = getProperty(args, "exportAs");
16741
16911
  if (!node)
16742
16912
  return null;
16743
- if (ts13.isStringLiteral(node)) {
16913
+ if (ts14.isStringLiteral(node)) {
16744
16914
  return node.text.split(",").map((s2) => s2.trim()).filter(Boolean);
16745
16915
  }
16746
- if (ts13.isArrayLiteralExpression(node)) {
16916
+ if (ts14.isArrayLiteralExpression(node)) {
16747
16917
  const out = [];
16748
16918
  for (const el of node.elements) {
16749
- if (ts13.isStringLiteral(el))
16919
+ if (ts14.isStringLiteral(el))
16750
16920
  out.push(el.text);
16751
16921
  }
16752
16922
  return out.length > 0 ? out : null;
@@ -16754,11 +16924,11 @@ var fail = (reason, detail, location) => ({
16754
16924
  return null;
16755
16925
  }, extractHostDirectives = (args, compiler) => {
16756
16926
  const node = getProperty(args, "hostDirectives");
16757
- if (!node || !ts13.isArrayLiteralExpression(node))
16927
+ if (!node || !ts14.isArrayLiteralExpression(node))
16758
16928
  return null;
16759
16929
  const out = [];
16760
16930
  for (const el of node.elements) {
16761
- if (ts13.isIdentifier(el)) {
16931
+ if (ts14.isIdentifier(el)) {
16762
16932
  out.push({
16763
16933
  directive: {
16764
16934
  value: new compiler.WrappedNodeExpr(el),
@@ -16770,7 +16940,7 @@ var fail = (reason, detail, location) => ({
16770
16940
  });
16771
16941
  continue;
16772
16942
  }
16773
- if (!ts13.isObjectLiteralExpression(el))
16943
+ if (!ts14.isObjectLiteralExpression(el))
16774
16944
  continue;
16775
16945
  const directiveNode = getProperty(el, "directive");
16776
16946
  if (!directiveNode)
@@ -16778,11 +16948,11 @@ var fail = (reason, detail, location) => ({
16778
16948
  const inputsNode = getProperty(el, "inputs");
16779
16949
  const outputsNode = getProperty(el, "outputs");
16780
16950
  const collectMap = (n) => {
16781
- if (!n || !ts13.isArrayLiteralExpression(n))
16951
+ if (!n || !ts14.isArrayLiteralExpression(n))
16782
16952
  return null;
16783
16953
  const map = {};
16784
16954
  for (const item of n.elements) {
16785
- if (!ts13.isStringLiteral(item))
16955
+ if (!ts14.isStringLiteral(item))
16786
16956
  continue;
16787
16957
  const [name, alias] = item.text.split(":").map((s2) => s2.trim());
16788
16958
  if (name)
@@ -16844,7 +17014,7 @@ var fail = (reason, detail, location) => ({
16844
17014
  return cached.info;
16845
17015
  let source;
16846
17016
  try {
16847
- source = readFileSync19(filePath, "utf-8");
17017
+ source = readFileSync21(filePath, "utf-8");
16848
17018
  } catch {
16849
17019
  childComponentInfoCache.set(cacheKey2, {
16850
17020
  info: null,
@@ -16852,10 +17022,10 @@ var fail = (reason, detail, location) => ({
16852
17022
  });
16853
17023
  return null;
16854
17024
  }
16855
- const sf = ts13.createSourceFile(filePath, source, ts13.ScriptTarget.Latest, true);
17025
+ const sf = ts14.createSourceFile(filePath, source, ts14.ScriptTarget.Latest, true);
16856
17026
  let info = null;
16857
17027
  for (const stmt of sf.statements) {
16858
- if (!ts13.isClassDeclaration(stmt))
17028
+ if (!ts14.isClassDeclaration(stmt))
16859
17029
  continue;
16860
17030
  if (!stmt.name || stmt.name.text !== className)
16861
17031
  continue;
@@ -16898,7 +17068,7 @@ var fail = (reason, detail, location) => ({
16898
17068
  return cached.info;
16899
17069
  let content;
16900
17070
  try {
16901
- content = readFileSync19(dtsPath, "utf-8");
17071
+ content = readFileSync21(dtsPath, "utf-8");
16902
17072
  } catch {
16903
17073
  childComponentInfoCache.set(cacheKey2, {
16904
17074
  info: null,
@@ -16990,9 +17160,9 @@ var fail = (reason, detail, location) => ({
16990
17160
  }, buildClassToSpecMap = (sourceFile) => {
16991
17161
  const result = new Map;
16992
17162
  for (const stmt of sourceFile.statements) {
16993
- if (!ts13.isImportDeclaration(stmt))
17163
+ if (!ts14.isImportDeclaration(stmt))
16994
17164
  continue;
16995
- if (!ts13.isStringLiteral(stmt.moduleSpecifier))
17165
+ if (!ts14.isStringLiteral(stmt.moduleSpecifier))
16996
17166
  continue;
16997
17167
  const spec = stmt.moduleSpecifier.text;
16998
17168
  const clause = stmt.importClause;
@@ -17001,7 +17171,7 @@ var fail = (reason, detail, location) => ({
17001
17171
  if (clause.name)
17002
17172
  result.set(clause.name.text, spec);
17003
17173
  const named = clause.namedBindings;
17004
- if (named && ts13.isNamedImports(named)) {
17174
+ if (named && ts14.isNamedImports(named)) {
17005
17175
  for (const el of named.elements) {
17006
17176
  if (el.isTypeOnly)
17007
17177
  continue;
@@ -17018,7 +17188,7 @@ var fail = (reason, detail, location) => ({
17018
17188
  return null;
17019
17189
  let content;
17020
17190
  try {
17021
- content = readFileSync19(startDtsPath, "utf-8");
17191
+ content = readFileSync21(startDtsPath, "utf-8");
17022
17192
  } catch {
17023
17193
  return null;
17024
17194
  }
@@ -17114,7 +17284,7 @@ var fail = (reason, detail, location) => ({
17114
17284
  return result;
17115
17285
  const classToSpec = buildClassToSpecMap(sourceFile);
17116
17286
  for (const el of importsExpr.elements) {
17117
- if (!ts13.isIdentifier(el))
17287
+ if (!ts14.isIdentifier(el))
17118
17288
  continue;
17119
17289
  const className = el.text;
17120
17290
  const spec = classToSpec.get(className);
@@ -17133,35 +17303,35 @@ var fail = (reason, detail, location) => ({
17133
17303
  }
17134
17304
  return (h2 >>> 0).toString(36);
17135
17305
  }, initializerShapeIsStructural = (node) => {
17136
- if (ts13.isArrowFunction(node) || ts13.isFunctionExpression(node) || ts13.isCallExpression(node) || ts13.isNewExpression(node)) {
17306
+ if (ts14.isArrowFunction(node) || ts14.isFunctionExpression(node) || ts14.isCallExpression(node) || ts14.isNewExpression(node)) {
17137
17307
  return true;
17138
17308
  }
17139
- if (ts13.isConditionalExpression(node)) {
17309
+ if (ts14.isConditionalExpression(node)) {
17140
17310
  return initializerShapeIsStructural(node.whenTrue) || initializerShapeIsStructural(node.whenFalse);
17141
17311
  }
17142
- if (ts13.isParenthesizedExpression(node)) {
17312
+ if (ts14.isParenthesizedExpression(node)) {
17143
17313
  return initializerShapeIsStructural(node.expression);
17144
17314
  }
17145
- if (ts13.isAsExpression(node) || ts13.isTypeAssertionExpression(node)) {
17315
+ if (ts14.isAsExpression(node) || ts14.isTypeAssertionExpression(node)) {
17146
17316
  return initializerShapeIsStructural(node.expression);
17147
17317
  }
17148
- if (ts13.isNonNullExpression(node)) {
17318
+ if (ts14.isNonNullExpression(node)) {
17149
17319
  return initializerShapeIsStructural(node.expression);
17150
17320
  }
17151
- if (ts13.isObjectLiteralExpression(node)) {
17321
+ if (ts14.isObjectLiteralExpression(node)) {
17152
17322
  for (const prop of node.properties) {
17153
- if (ts13.isPropertyAssignment(prop) && initializerShapeIsStructural(prop.initializer)) {
17323
+ if (ts14.isPropertyAssignment(prop) && initializerShapeIsStructural(prop.initializer)) {
17154
17324
  return true;
17155
17325
  }
17156
- if (ts13.isShorthandPropertyAssignment(prop))
17326
+ if (ts14.isShorthandPropertyAssignment(prop))
17157
17327
  continue;
17158
- if (ts13.isSpreadAssignment(prop) && initializerShapeIsStructural(prop.expression)) {
17328
+ if (ts14.isSpreadAssignment(prop) && initializerShapeIsStructural(prop.expression)) {
17159
17329
  return true;
17160
17330
  }
17161
17331
  }
17162
17332
  return false;
17163
17333
  }
17164
- if (ts13.isArrayLiteralExpression(node)) {
17334
+ if (ts14.isArrayLiteralExpression(node)) {
17165
17335
  for (const el of node.elements) {
17166
17336
  if (initializerShapeIsStructural(el))
17167
17337
  return true;
@@ -17172,7 +17342,7 @@ var fail = (reason, detail, location) => ({
17172
17342
  }, extractArrowFieldSig = (cls) => {
17173
17343
  const entries = [];
17174
17344
  for (const member of cls.members) {
17175
- if (!ts13.isPropertyDeclaration(member))
17345
+ if (!ts14.isPropertyDeclaration(member))
17176
17346
  continue;
17177
17347
  const init = member.initializer;
17178
17348
  if (!init)
@@ -17182,12 +17352,12 @@ var fail = (reason, detail, location) => ({
17182
17352
  const name = member.name.getText();
17183
17353
  let bodyText;
17184
17354
  try {
17185
- const printer = ts13.createPrinter({
17186
- newLine: ts13.NewLineKind.LineFeed,
17355
+ const printer = ts14.createPrinter({
17356
+ newLine: ts14.NewLineKind.LineFeed,
17187
17357
  omitTrailingSemicolon: true,
17188
17358
  removeComments: true
17189
17359
  });
17190
- bodyText = printer.printNode(ts13.EmitHint.Unspecified, init, cls.getSourceFile());
17360
+ bodyText = printer.printNode(ts14.EmitHint.Unspecified, init, cls.getSourceFile());
17191
17361
  } catch {
17192
17362
  bodyText = init.getText();
17193
17363
  }
@@ -17198,9 +17368,9 @@ var fail = (reason, detail, location) => ({
17198
17368
  }, INPUT_OUTPUT_DECORATORS, extractMemberDecoratorSig = (cls) => {
17199
17369
  const entries = [];
17200
17370
  for (const member of cls.members) {
17201
- if (!ts13.canHaveDecorators(member))
17371
+ if (!ts14.canHaveDecorators(member))
17202
17372
  continue;
17203
- const decorators = ts13.getDecorators(member) ?? [];
17373
+ const decorators = ts14.getDecorators(member) ?? [];
17204
17374
  if (decorators.length === 0)
17205
17375
  continue;
17206
17376
  const memberName = member.name?.getText() ?? "<anon>";
@@ -17208,14 +17378,14 @@ var fail = (reason, detail, location) => ({
17208
17378
  const expr = decorator.expression;
17209
17379
  let decName = "<unknown>";
17210
17380
  let argText = "";
17211
- if (ts13.isCallExpression(expr)) {
17212
- if (ts13.isIdentifier(expr.expression)) {
17381
+ if (ts14.isCallExpression(expr)) {
17382
+ if (ts14.isIdentifier(expr.expression)) {
17213
17383
  decName = expr.expression.text;
17214
17384
  }
17215
17385
  if (expr.arguments.length > 0) {
17216
17386
  argText = expr.arguments.map((a) => a.getText()).join(",");
17217
17387
  }
17218
- } else if (ts13.isIdentifier(expr)) {
17388
+ } else if (ts14.isIdentifier(expr)) {
17219
17389
  decName = expr.text;
17220
17390
  }
17221
17391
  if (INPUT_OUTPUT_DECORATORS.has(decName))
@@ -17236,22 +17406,22 @@ var fail = (reason, detail, location) => ({
17236
17406
  return cached.hasProviders;
17237
17407
  let source;
17238
17408
  try {
17239
- source = readFileSync19(filePath, "utf8");
17409
+ source = readFileSync21(filePath, "utf8");
17240
17410
  } catch {
17241
17411
  return true;
17242
17412
  }
17243
- const sf = ts13.createSourceFile(filePath, source, ts13.ScriptTarget.ES2022, true, ts13.ScriptKind.TS);
17413
+ const sf = ts14.createSourceFile(filePath, source, ts14.ScriptTarget.ES2022, true, ts14.ScriptKind.TS);
17244
17414
  let hasProviders = false;
17245
17415
  const visit = (node) => {
17246
17416
  if (hasProviders)
17247
17417
  return;
17248
- if (ts13.isClassDeclaration(node)) {
17249
- for (const decorator of ts13.getDecorators(node) ?? []) {
17418
+ if (ts14.isClassDeclaration(node)) {
17419
+ for (const decorator of ts14.getDecorators(node) ?? []) {
17250
17420
  const expr = decorator.expression;
17251
- if (!ts13.isCallExpression(expr))
17421
+ if (!ts14.isCallExpression(expr))
17252
17422
  continue;
17253
17423
  const arg = expr.arguments[0];
17254
- if (!arg || !ts13.isObjectLiteralExpression(arg))
17424
+ if (!arg || !ts14.isObjectLiteralExpression(arg))
17255
17425
  continue;
17256
17426
  if (getProperty(arg, "providers") !== null) {
17257
17427
  hasProviders = true;
@@ -17259,7 +17429,7 @@ var fail = (reason, detail, location) => ({
17259
17429
  }
17260
17430
  }
17261
17431
  }
17262
- ts13.forEachChild(node, visit);
17432
+ ts14.forEachChild(node, visit);
17263
17433
  };
17264
17434
  visit(sf);
17265
17435
  providerProbeCache.set(filePath, {
@@ -17269,10 +17439,10 @@ var fail = (reason, detail, location) => ({
17269
17439
  return hasProviders;
17270
17440
  }, TS_EXTENSIONS, resolveImportSource = (identifierName, sourceFile, componentDir) => {
17271
17441
  for (const stmt of sourceFile.statements) {
17272
- if (!ts13.isImportDeclaration(stmt))
17442
+ if (!ts14.isImportDeclaration(stmt))
17273
17443
  continue;
17274
17444
  const moduleSpec = stmt.moduleSpecifier;
17275
- if (!ts13.isStringLiteral(moduleSpec))
17445
+ if (!ts14.isStringLiteral(moduleSpec))
17276
17446
  continue;
17277
17447
  const spec = moduleSpec.text;
17278
17448
  if (!spec.startsWith(".") && !spec.startsWith("/"))
@@ -17286,7 +17456,7 @@ var fail = (reason, detail, location) => ({
17286
17456
  }
17287
17457
  if (importClause.namedBindings) {
17288
17458
  const nb = importClause.namedBindings;
17289
- if (ts13.isNamespaceImport(nb)) {
17459
+ if (ts14.isNamespaceImport(nb)) {
17290
17460
  if (nb.name.text === identifierName)
17291
17461
  matches = true;
17292
17462
  } else {
@@ -17316,7 +17486,7 @@ var fail = (reason, detail, location) => ({
17316
17486
  return [];
17317
17487
  const sig = [];
17318
17488
  for (const entry of importsExpr.elements) {
17319
- if (ts13.isIdentifier(entry)) {
17489
+ if (ts14.isIdentifier(entry)) {
17320
17490
  const importPath = resolveImportSource(entry.text, sourceFile, componentDir);
17321
17491
  if (importPath) {
17322
17492
  if (fileHasModuleProviders(importPath)) {
@@ -17335,13 +17505,13 @@ var fail = (reason, detail, location) => ({
17335
17505
  }, extractPropertyFieldNames = (cls) => {
17336
17506
  const names = [];
17337
17507
  for (const member of cls.members) {
17338
- if (!ts13.isPropertyDeclaration(member) && !ts13.isMethodDeclaration(member) && !ts13.isGetAccessorDeclaration(member) && !ts13.isSetAccessorDeclaration(member)) {
17508
+ if (!ts14.isPropertyDeclaration(member) && !ts14.isMethodDeclaration(member) && !ts14.isGetAccessorDeclaration(member) && !ts14.isSetAccessorDeclaration(member)) {
17339
17509
  continue;
17340
17510
  }
17341
17511
  const name = member.name;
17342
17512
  if (name === undefined)
17343
17513
  continue;
17344
- const text = ts13.isIdentifier(name) ? name.text : ts13.isStringLiteral(name) || ts13.isNoSubstitutionTemplateLiteral(name) ? name.text : name.getText();
17514
+ const text = ts14.isIdentifier(name) ? name.text : ts14.isStringLiteral(name) || ts14.isNoSubstitutionTemplateLiteral(name) ? name.text : name.getText();
17345
17515
  if (text.length > 0)
17346
17516
  names.push(text);
17347
17517
  }
@@ -17349,7 +17519,7 @@ var fail = (reason, detail, location) => ({
17349
17519
  }, extractTopLevelImports = (sourceFile) => {
17350
17520
  const names = new Set;
17351
17521
  for (const stmt of sourceFile.statements) {
17352
- if (!ts13.isImportDeclaration(stmt))
17522
+ if (!ts14.isImportDeclaration(stmt))
17353
17523
  continue;
17354
17524
  const clause = stmt.importClause;
17355
17525
  if (!clause)
@@ -17361,9 +17531,9 @@ var fail = (reason, detail, location) => ({
17361
17531
  const bindings = clause.namedBindings;
17362
17532
  if (!bindings)
17363
17533
  continue;
17364
- if (ts13.isNamespaceImport(bindings)) {
17534
+ if (ts14.isNamespaceImport(bindings)) {
17365
17535
  names.add(bindings.name.text);
17366
- } else if (ts13.isNamedImports(bindings)) {
17536
+ } else if (ts14.isNamedImports(bindings)) {
17367
17537
  for (const el of bindings.elements) {
17368
17538
  if (el.isTypeOnly)
17369
17539
  continue;
@@ -17375,18 +17545,18 @@ var fail = (reason, detail, location) => ({
17375
17545
  }, extractFingerprint = (cls, className, decoratorMeta, inputs, outputs, sourceFile, componentDir) => {
17376
17546
  const ctorParamTypes = [];
17377
17547
  for (const member of cls.members) {
17378
- if (!ts13.isConstructorDeclaration(member))
17548
+ if (!ts14.isConstructorDeclaration(member))
17379
17549
  continue;
17380
17550
  for (const param of member.parameters) {
17381
17551
  const typeText = param.type ? param.type.getText() : "";
17382
- const decorators = ts13.getDecorators(param) ?? [];
17552
+ const decorators = ts14.getDecorators(param) ?? [];
17383
17553
  const decoratorSig = decorators.length === 0 ? "" : decorators.map((d2) => {
17384
17554
  const expr = d2.expression;
17385
- if (ts13.isCallExpression(expr) && ts13.isIdentifier(expr.expression)) {
17555
+ if (ts14.isCallExpression(expr) && ts14.isIdentifier(expr.expression)) {
17386
17556
  const args = expr.arguments.map((a) => a.getText()).join(",");
17387
17557
  return `@${expr.expression.text}(${args})`;
17388
17558
  }
17389
- if (ts13.isIdentifier(expr)) {
17559
+ if (ts14.isIdentifier(expr)) {
17390
17560
  return `@${expr.text}`;
17391
17561
  }
17392
17562
  return "@<unknown>";
@@ -17402,12 +17572,12 @@ var fail = (reason, detail, location) => ({
17402
17572
  const providerImportSig = extractProviderImportSig(decoratorMeta.importsExpr, sourceFile, componentDir);
17403
17573
  const topLevelImports = extractTopLevelImports(sourceFile);
17404
17574
  const propertyFieldNames = extractPropertyFieldNames(cls);
17405
- const printer = ts13.createPrinter({
17406
- newLine: ts13.NewLineKind.LineFeed,
17575
+ const printer = ts14.createPrinter({
17576
+ newLine: ts14.NewLineKind.LineFeed,
17407
17577
  omitTrailingSemicolon: true,
17408
17578
  removeComments: true
17409
17579
  });
17410
- const canonicalText = (node) => printer.printNode(ts13.EmitHint.Unspecified, node, sourceFile);
17580
+ const canonicalText = (node) => printer.printNode(ts14.EmitHint.Unspecified, node, sourceFile);
17411
17581
  const importsArraySig = decoratorMeta.importsExpr ? djb2Hash(canonicalText(decoratorMeta.importsExpr)) : "";
17412
17582
  const hostDirectivesSig = decoratorMeta.hostDirectivesExpr ? djb2Hash(canonicalText(decoratorMeta.hostDirectivesExpr)) : "";
17413
17583
  const animationsArraySig = decoratorMeta.animationsExpr ? djb2Hash(canonicalText(decoratorMeta.animationsExpr)) : "";
@@ -17420,13 +17590,13 @@ var fail = (reason, detail, location) => ({
17420
17590
  const PAGE_EXPORT_NAMES = new Set(["providers", "routes"]);
17421
17591
  const pageExportEntries = [];
17422
17592
  for (const stmt of sourceFile.statements) {
17423
- if (!ts13.isVariableStatement(stmt))
17593
+ if (!ts14.isVariableStatement(stmt))
17424
17594
  continue;
17425
- const isExported = stmt.modifiers?.some((m) => m.kind === ts13.SyntaxKind.ExportKeyword);
17595
+ const isExported = stmt.modifiers?.some((m) => m.kind === ts14.SyntaxKind.ExportKeyword);
17426
17596
  if (!isExported)
17427
17597
  continue;
17428
17598
  for (const decl of stmt.declarationList.declarations) {
17429
- if (!ts13.isIdentifier(decl.name))
17599
+ if (!ts14.isIdentifier(decl.name))
17430
17600
  continue;
17431
17601
  if (!PAGE_EXPORT_NAMES.has(decl.name.text))
17432
17602
  continue;
@@ -17467,35 +17637,35 @@ var fail = (reason, detail, location) => ({
17467
17637
  }, buildFreshClassMethodsBlock = (classNode, className) => {
17468
17638
  const memberSources = [];
17469
17639
  let hasStatic = false;
17470
- const printer = ts13.createPrinter({ removeComments: true });
17640
+ const printer = ts14.createPrinter({ removeComments: true });
17471
17641
  for (const member of classNode.members) {
17472
- if (ts13.isPropertyDeclaration(member)) {
17473
- const modifiers = (ts13.getModifiers(member) ?? []).filter((m) => m.kind !== ts13.SyntaxKind.PrivateKeyword && m.kind !== ts13.SyntaxKind.PublicKeyword && m.kind !== ts13.SyntaxKind.ProtectedKeyword && m.kind !== ts13.SyntaxKind.ReadonlyKeyword && m.kind !== ts13.SyntaxKind.OverrideKeyword);
17474
- const cleaned = ts13.factory.createPropertyDeclaration(modifiers, member.name, undefined, undefined, member.initializer);
17475
- memberSources.push(printer.printNode(ts13.EmitHint.Unspecified, cleaned, classNode.getSourceFile()));
17642
+ if (ts14.isPropertyDeclaration(member)) {
17643
+ const modifiers = (ts14.getModifiers(member) ?? []).filter((m) => m.kind !== ts14.SyntaxKind.PrivateKeyword && m.kind !== ts14.SyntaxKind.PublicKeyword && m.kind !== ts14.SyntaxKind.ProtectedKeyword && m.kind !== ts14.SyntaxKind.ReadonlyKeyword && m.kind !== ts14.SyntaxKind.OverrideKeyword);
17644
+ const cleaned = ts14.factory.createPropertyDeclaration(modifiers, member.name, undefined, undefined, member.initializer);
17645
+ memberSources.push(printer.printNode(ts14.EmitHint.Unspecified, cleaned, classNode.getSourceFile()));
17476
17646
  continue;
17477
17647
  }
17478
- if (ts13.isConstructorDeclaration(member)) {
17479
- const cleanedParams = member.parameters.map((param) => ts13.factory.updateParameterDeclaration(param, (ts13.getModifiers(param) ?? []).filter((m) => m.kind !== ts13.SyntaxKind.PrivateKeyword && m.kind !== ts13.SyntaxKind.PublicKeyword && m.kind !== ts13.SyntaxKind.ProtectedKeyword && m.kind !== ts13.SyntaxKind.ReadonlyKeyword && m.kind !== ts13.SyntaxKind.OverrideKeyword), param.dotDotDotToken, param.name, param.questionToken, param.type, param.initializer));
17480
- const cleaned = ts13.factory.createConstructorDeclaration([], cleanedParams, member.body);
17481
- memberSources.push(printer.printNode(ts13.EmitHint.Unspecified, cleaned, classNode.getSourceFile()));
17648
+ if (ts14.isConstructorDeclaration(member)) {
17649
+ const cleanedParams = member.parameters.map((param) => ts14.factory.updateParameterDeclaration(param, (ts14.getModifiers(param) ?? []).filter((m) => m.kind !== ts14.SyntaxKind.PrivateKeyword && m.kind !== ts14.SyntaxKind.PublicKeyword && m.kind !== ts14.SyntaxKind.ProtectedKeyword && m.kind !== ts14.SyntaxKind.ReadonlyKeyword && m.kind !== ts14.SyntaxKind.OverrideKeyword), param.dotDotDotToken, param.name, param.questionToken, param.type, param.initializer));
17650
+ const cleaned = ts14.factory.createConstructorDeclaration([], cleanedParams, member.body);
17651
+ memberSources.push(printer.printNode(ts14.EmitHint.Unspecified, cleaned, classNode.getSourceFile()));
17482
17652
  continue;
17483
17653
  }
17484
- if (ts13.isMethodDeclaration(member) || ts13.isGetAccessorDeclaration(member) || ts13.isSetAccessorDeclaration(member)) {
17485
- const modifiers = ts13.getModifiers(member) ?? [];
17486
- const isStatic = modifiers.some((m) => m.kind === ts13.SyntaxKind.StaticKeyword);
17654
+ if (ts14.isMethodDeclaration(member) || ts14.isGetAccessorDeclaration(member) || ts14.isSetAccessorDeclaration(member)) {
17655
+ const modifiers = ts14.getModifiers(member) ?? [];
17656
+ const isStatic = modifiers.some((m) => m.kind === ts14.SyntaxKind.StaticKeyword);
17487
17657
  if (isStatic)
17488
17658
  hasStatic = true;
17489
- const cleanedParams = member.parameters.map((param) => ts13.factory.updateParameterDeclaration(param, ts13.getModifiers(param) ?? [], param.dotDotDotToken, param.name, param.questionToken, param.type, param.initializer));
17659
+ const cleanedParams = member.parameters.map((param) => ts14.factory.updateParameterDeclaration(param, ts14.getModifiers(param) ?? [], param.dotDotDotToken, param.name, param.questionToken, param.type, param.initializer));
17490
17660
  let cleaned;
17491
- if (ts13.isMethodDeclaration(member)) {
17492
- cleaned = ts13.factory.createMethodDeclaration(modifiers, member.asteriskToken, member.name, member.questionToken, member.typeParameters, cleanedParams, member.type, member.body);
17493
- } else if (ts13.isGetAccessorDeclaration(member)) {
17494
- cleaned = ts13.factory.createGetAccessorDeclaration(modifiers, member.name, cleanedParams, member.type, member.body);
17661
+ if (ts14.isMethodDeclaration(member)) {
17662
+ cleaned = ts14.factory.createMethodDeclaration(modifiers, member.asteriskToken, member.name, member.questionToken, member.typeParameters, cleanedParams, member.type, member.body);
17663
+ } else if (ts14.isGetAccessorDeclaration(member)) {
17664
+ cleaned = ts14.factory.createGetAccessorDeclaration(modifiers, member.name, cleanedParams, member.type, member.body);
17495
17665
  } else {
17496
- cleaned = ts13.factory.createSetAccessorDeclaration(modifiers, member.name, cleanedParams, member.body);
17666
+ cleaned = ts14.factory.createSetAccessorDeclaration(modifiers, member.name, cleanedParams, member.body);
17497
17667
  }
17498
- const printed = printer.printNode(ts13.EmitHint.Unspecified, cleaned, classNode.getSourceFile());
17668
+ const printed = printer.printNode(ts14.EmitHint.Unspecified, cleaned, classNode.getSourceFile());
17499
17669
  memberSources.push(printed);
17500
17670
  }
17501
17671
  }
@@ -17507,10 +17677,10 @@ ${memberSources.join(`
17507
17677
  }`;
17508
17678
  let transpiled;
17509
17679
  try {
17510
- transpiled = ts13.transpileModule(wrappedSource, {
17680
+ transpiled = ts14.transpileModule(wrappedSource, {
17511
17681
  compilerOptions: {
17512
- module: ts13.ModuleKind.ES2022,
17513
- target: ts13.ScriptTarget.ES2022
17682
+ module: ts14.ModuleKind.ES2022,
17683
+ target: ts14.ScriptTarget.ES2022
17514
17684
  },
17515
17685
  reportDiagnostics: false
17516
17686
  }).outputText;
@@ -17544,7 +17714,7 @@ ${transpiled}
17544
17714
  return null;
17545
17715
  const ext = extname6(abs).toLowerCase();
17546
17716
  if (!STYLE_PREPROCESSED_EXT.has(ext) || ext === ".css") {
17547
- return readFileSync19(abs, "utf8");
17717
+ return readFileSync21(abs, "utf8");
17548
17718
  }
17549
17719
  try {
17550
17720
  const { compileStyleFileIfNeededSync: compileStyleFileIfNeededSync2 } = (init_stylePreprocessor(), __toCommonJS(exports_stylePreprocessor));
@@ -17583,8 +17753,8 @@ ${block}
17583
17753
  const opts = {};
17584
17754
  if (existsSync24(tsconfigPath)) {
17585
17755
  try {
17586
- const text = readFileSync19(tsconfigPath, "utf8");
17587
- const parsed = ts13.parseConfigFileTextToJson(tsconfigPath, text);
17756
+ const text = readFileSync21(tsconfigPath, "utf8");
17757
+ const parsed = ts14.parseConfigFileTextToJson(tsconfigPath, text);
17588
17758
  if (!parsed.error && parsed.config) {
17589
17759
  const cfg = parsed.config;
17590
17760
  const ang = cfg.angularCompilerOptions ?? {};
@@ -17617,8 +17787,8 @@ ${block}
17617
17787
  } catch (err) {
17618
17788
  return fail("unexpected-error", `import @angular/compiler: ${err}`);
17619
17789
  }
17620
- const tsSource = readFileSync19(componentFilePath, "utf8");
17621
- const sourceFile = ts13.createSourceFile(componentFilePath, tsSource, ts13.ScriptTarget.ES2022, true, ts13.ScriptKind.TS);
17790
+ const tsSource = readFileSync21(componentFilePath, "utf8");
17791
+ const sourceFile = ts14.createSourceFile(componentFilePath, tsSource, ts14.ScriptTarget.ES2022, true, ts14.ScriptKind.TS);
17622
17792
  const classNode = findClassDeclaration(sourceFile, className);
17623
17793
  if (!classNode) {
17624
17794
  return fail("class-not-found", `${className} in ${componentFilePath}`);
@@ -17667,7 +17837,7 @@ ${block}
17667
17837
  if (!existsSync24(tplAbs)) {
17668
17838
  return fail("template-resource-not-found", `Template file not found: ${tplAbs}`, { file: componentFilePath });
17669
17839
  }
17670
- templateText = readFileSync19(tplAbs, "utf8");
17840
+ templateText = readFileSync21(tplAbs, "utf8");
17671
17841
  templatePath = tplAbs;
17672
17842
  } else {
17673
17843
  return fail("unsupported-decorator-args", "missing template/templateUrl");
@@ -17738,7 +17908,7 @@ ${block}
17738
17908
  viewQueries: advancedMetadata.viewQueries,
17739
17909
  host: advancedMetadata.host,
17740
17910
  lifecycle: {
17741
- usesOnChanges: classNode.members.some((m) => ts13.isMethodDeclaration(m) && m.name !== undefined && ts13.isIdentifier(m.name) && m.name.text === "ngOnChanges")
17911
+ usesOnChanges: classNode.members.some((m) => ts14.isMethodDeclaration(m) && m.name !== undefined && ts14.isIdentifier(m.name) && m.name.text === "ngOnChanges")
17742
17912
  },
17743
17913
  inputs,
17744
17914
  outputs,
@@ -17794,15 +17964,15 @@ ${block}
17794
17964
  }
17795
17965
  const importGenerator = createHmrImportGenerator(namespaceMap);
17796
17966
  const tsFunctionDecl = translateStatement(sourceFile, callback, importGenerator);
17797
- const exportedDecl = ts13.factory.updateFunctionDeclaration(tsFunctionDecl, [
17798
- ts13.factory.createToken(ts13.SyntaxKind.ExportKeyword),
17799
- ts13.factory.createToken(ts13.SyntaxKind.DefaultKeyword)
17967
+ const exportedDecl = ts14.factory.updateFunctionDeclaration(tsFunctionDecl, [
17968
+ ts14.factory.createToken(ts14.SyntaxKind.ExportKeyword),
17969
+ ts14.factory.createToken(ts14.SyntaxKind.DefaultKeyword)
17800
17970
  ], tsFunctionDecl.asteriskToken, tsFunctionDecl.name, tsFunctionDecl.typeParameters, tsFunctionDecl.parameters, tsFunctionDecl.type, tsFunctionDecl.body);
17801
- const printer = ts13.createPrinter({
17802
- newLine: ts13.NewLineKind.LineFeed,
17971
+ const printer = ts14.createPrinter({
17972
+ newLine: ts14.NewLineKind.LineFeed,
17803
17973
  removeComments: false
17804
17974
  });
17805
- const fnText = printer.printNode(ts13.EmitHint.Unspecified, exportedDecl, sourceFile);
17975
+ const fnText = printer.printNode(ts14.EmitHint.Unspecified, exportedDecl, sourceFile);
17806
17976
  const provisionalMethodsBlock = buildFreshClassMethodsBlock(classNode, className) ?? "";
17807
17977
  const referencedNames = new Set;
17808
17978
  const identRe = /[A-Za-z_$][A-Za-z0-9_$]*/g;
@@ -17812,33 +17982,33 @@ ${block}
17812
17982
  }
17813
17983
  const sourceScopeNames = new Set;
17814
17984
  for (const stmt of sourceFile.statements) {
17815
- if (ts13.isImportDeclaration(stmt)) {
17816
- if (!ts13.isStringLiteral(stmt.moduleSpecifier))
17985
+ if (ts14.isImportDeclaration(stmt)) {
17986
+ if (!ts14.isStringLiteral(stmt.moduleSpecifier))
17817
17987
  continue;
17818
17988
  const clause = stmt.importClause;
17819
17989
  if (clause?.name)
17820
17990
  sourceScopeNames.add(clause.name.text);
17821
- if (clause?.namedBindings && ts13.isNamedImports(clause.namedBindings)) {
17991
+ if (clause?.namedBindings && ts14.isNamedImports(clause.namedBindings)) {
17822
17992
  for (const el of clause.namedBindings.elements) {
17823
17993
  if (el.isTypeOnly)
17824
17994
  continue;
17825
17995
  sourceScopeNames.add(el.name.text);
17826
17996
  }
17827
- } else if (clause?.namedBindings && ts13.isNamespaceImport(clause.namedBindings)) {
17997
+ } else if (clause?.namedBindings && ts14.isNamespaceImport(clause.namedBindings)) {
17828
17998
  sourceScopeNames.add(clause.namedBindings.name.text);
17829
17999
  }
17830
18000
  continue;
17831
18001
  }
17832
- if (ts13.isVariableStatement(stmt) || stmt.kind === ts13.SyntaxKind.VariableStatement) {
18002
+ if (ts14.isVariableStatement(stmt) || stmt.kind === ts14.SyntaxKind.VariableStatement) {
17833
18003
  const varStmt = stmt;
17834
18004
  for (const decl of varStmt.declarationList.declarations) {
17835
- if (ts13.isIdentifier(decl.name)) {
18005
+ if (ts14.isIdentifier(decl.name)) {
17836
18006
  sourceScopeNames.add(decl.name.text);
17837
18007
  }
17838
18008
  }
17839
18009
  continue;
17840
18010
  }
17841
- if (ts13.isFunctionDeclaration(stmt) || ts13.isClassDeclaration(stmt)) {
18011
+ if (ts14.isFunctionDeclaration(stmt) || ts14.isClassDeclaration(stmt)) {
17842
18012
  if (stmt.name)
17843
18013
  sourceScopeNames.add(stmt.name.text);
17844
18014
  }
@@ -17849,7 +18019,7 @@ ${block}
17849
18019
  }
17850
18020
  const allImportedNames = new Set;
17851
18021
  for (const stmt of sourceFile.statements) {
17852
- if (!ts13.isImportDeclaration(stmt))
18022
+ if (!ts14.isImportDeclaration(stmt))
17853
18023
  continue;
17854
18024
  const clause = stmt.importClause;
17855
18025
  if (!clause || clause.isTypeOnly)
@@ -17859,7 +18029,7 @@ ${block}
17859
18029
  const bindings = clause.namedBindings;
17860
18030
  if (!bindings)
17861
18031
  continue;
17862
- if (ts13.isNamespaceImport(bindings)) {
18032
+ if (ts14.isNamespaceImport(bindings)) {
17863
18033
  allImportedNames.add(bindings.name.text);
17864
18034
  } else {
17865
18035
  for (const el of bindings.elements) {
@@ -17871,10 +18041,10 @@ ${block}
17871
18041
  }
17872
18042
  const depsToDestructure = [...sourceScopeNames].filter((n) => referencedNames.has(n) || allImportedNames.has(n));
17873
18043
  const tsSourceText = fnText;
17874
- const transpiled = ts13.transpileModule(tsSourceText, {
18044
+ const transpiled = ts14.transpileModule(tsSourceText, {
17875
18045
  compilerOptions: {
17876
- module: ts13.ModuleKind.ES2022,
17877
- target: ts13.ScriptTarget.ES2022
18046
+ module: ts14.ModuleKind.ES2022,
18047
+ target: ts14.ScriptTarget.ES2022
17878
18048
  },
17879
18049
  fileName: componentFilePath,
17880
18050
  reportDiagnostics: false
@@ -18426,7 +18596,7 @@ __export(exports_compileEmber, {
18426
18596
  });
18427
18597
  import { existsSync as existsSync25 } from "fs";
18428
18598
  import { mkdir as mkdir6, rm as rm4 } from "fs/promises";
18429
- import { basename as basename10, dirname as dirname18, extname as extname7, join as join29, resolve as resolve26 } from "path";
18599
+ import { basename as basename10, dirname as dirname18, extname as extname7, join as join30, resolve as resolve26 } from "path";
18430
18600
  var {build: bunBuild2, Transpiler: Transpiler4, write: write4, file: file4 } = globalThis.Bun;
18431
18601
  var cachedPreprocessor = null, getPreprocessor = async () => {
18432
18602
  if (cachedPreprocessor)
@@ -18545,7 +18715,7 @@ export const importSync = (specifier) => {
18545
18715
  build2.onResolve({ filter: /^@(?:ember|glimmer|simple-dom)\// }, (args) => {
18546
18716
  if (standalonePackages.has(args.path))
18547
18717
  return;
18548
- const internal = join29(cwd, "node_modules/ember-source/dist/packages", args.path, "index.js");
18718
+ const internal = join30(cwd, "node_modules/ember-source/dist/packages", args.path, "index.js");
18549
18719
  if (existsSync25(internal))
18550
18720
  return { path: internal };
18551
18721
  return;
@@ -18593,16 +18763,16 @@ export default PageComponent;
18593
18763
  }
18594
18764
  const transpiled = transpiler5.transformSync(preprocessed);
18595
18765
  const baseName = basename10(resolvedEntry).replace(/\.(gjs|gts|ts|js)$/, "");
18596
- const tmpDir = join29(compiledRoot, "_tmp");
18597
- const serverDir = join29(compiledRoot, "server");
18598
- const clientDir = join29(compiledRoot, "client");
18766
+ const tmpDir = join30(compiledRoot, "_tmp");
18767
+ const serverDir = join30(compiledRoot, "server");
18768
+ const clientDir = join30(compiledRoot, "client");
18599
18769
  await Promise.all([
18600
18770
  mkdir6(tmpDir, { recursive: true }),
18601
18771
  mkdir6(serverDir, { recursive: true }),
18602
18772
  mkdir6(clientDir, { recursive: true })
18603
18773
  ]);
18604
- const tmpPagePath = resolve26(join29(tmpDir, `${baseName}.module.js`));
18605
- const tmpHarnessPath = resolve26(join29(tmpDir, `${baseName}.harness.js`));
18774
+ const tmpPagePath = resolve26(join30(tmpDir, `${baseName}.module.js`));
18775
+ const tmpHarnessPath = resolve26(join30(tmpDir, `${baseName}.harness.js`));
18606
18776
  await Promise.all([
18607
18777
  write4(tmpPagePath, transpiled),
18608
18778
  write4(tmpHarnessPath, generateServerHarness(tmpPagePath))
@@ -18610,7 +18780,7 @@ export default PageComponent;
18610
18780
  const stagedSourceMap = new Map([
18611
18781
  [tmpPagePath, resolvedEntry]
18612
18782
  ]);
18613
- const serverPath = join29(serverDir, `${baseName}.js`);
18783
+ const serverPath = join30(serverDir, `${baseName}.js`);
18614
18784
  const buildResult = await bunBuild2({
18615
18785
  entrypoints: [tmpHarnessPath],
18616
18786
  format: "esm",
@@ -18627,7 +18797,7 @@ export default PageComponent;
18627
18797
  console.warn(`\u26A0\uFE0F Ember server build for ${baseName} had errors:`, buildResult.logs);
18628
18798
  }
18629
18799
  await rm4(tmpDir, { force: true, recursive: true });
18630
- const clientPath = join29(clientDir, `${baseName}.js`);
18800
+ const clientPath = join30(clientDir, `${baseName}.js`);
18631
18801
  await write4(clientPath, transpiled);
18632
18802
  return { clientPath, serverPath };
18633
18803
  }, compileEmber = async (entries, emberDir, cwd = process.cwd(), _hmr = false) => {
@@ -18655,7 +18825,7 @@ export default PageComponent;
18655
18825
  preprocessed = rewriteTemplateEvalToScope(result.code);
18656
18826
  }
18657
18827
  return transpiler5.transformSync(preprocessed);
18658
- }, clearEmberCompilerCache = () => {}, getEmberCompiledRoot = (_emberDir) => getFrameworkGeneratedDir("ember"), getEmberServerCompiledDir = (emberDir) => join29(getEmberCompiledRoot(emberDir), "server"), getEmberClientCompiledDir = (emberDir) => join29(getEmberCompiledRoot(emberDir), "client");
18828
+ }, clearEmberCompilerCache = () => {}, getEmberCompiledRoot = (_emberDir) => getFrameworkGeneratedDir("ember"), getEmberServerCompiledDir = (emberDir) => join30(getEmberCompiledRoot(emberDir), "server"), getEmberClientCompiledDir = (emberDir) => join30(getEmberCompiledRoot(emberDir), "client");
18659
18829
  var init_compileEmber = __esm(() => {
18660
18830
  init_generatedDir();
18661
18831
  transpiler5 = new Transpiler4({
@@ -18677,7 +18847,7 @@ __export(exports_buildReactVendor, {
18677
18847
  buildReactVendor: () => buildReactVendor
18678
18848
  });
18679
18849
  import { existsSync as existsSync26, mkdirSync as mkdirSync8 } from "fs";
18680
- import { join as join30, resolve as resolve27 } from "path";
18850
+ import { join as join31, resolve as resolve27 } from "path";
18681
18851
  import { rm as rm5 } from "fs/promises";
18682
18852
  var {build: bunBuild3 } = globalThis.Bun;
18683
18853
  var resolveJsxDevRuntimeCompatPath = () => {
@@ -18731,14 +18901,14 @@ var resolveJsxDevRuntimeCompatPath = () => {
18731
18901
  `)}
18732
18902
  `;
18733
18903
  }, buildReactVendor = async (buildDir) => {
18734
- const vendorDir = join30(buildDir, "react", "vendor");
18904
+ const vendorDir = join31(buildDir, "react", "vendor");
18735
18905
  mkdirSync8(vendorDir, { recursive: true });
18736
- const tmpDir = join30(buildDir, "_vendor_tmp");
18906
+ const tmpDir = join31(buildDir, "_vendor_tmp");
18737
18907
  mkdirSync8(tmpDir, { recursive: true });
18738
18908
  const specifiers = resolveVendorSpecifiers();
18739
18909
  const entrypoints = await Promise.all(specifiers.map(async (specifier) => {
18740
18910
  const safeName = toSafeFileName(specifier);
18741
- const entryPath = join30(tmpDir, `${safeName}.ts`);
18911
+ const entryPath = join31(tmpDir, `${safeName}.ts`);
18742
18912
  const source = await generateEntrySource(specifier);
18743
18913
  await Bun.write(entryPath, source);
18744
18914
  return entryPath;
@@ -18803,7 +18973,7 @@ __export(exports_buildAngularVendor, {
18803
18973
  buildAngularServerVendor: () => buildAngularServerVendor
18804
18974
  });
18805
18975
  import { mkdirSync as mkdirSync9 } from "fs";
18806
- import { join as join31 } from "path";
18976
+ import { join as join32 } from "path";
18807
18977
  import { rm as rm6 } from "fs/promises";
18808
18978
  var {build: bunBuild4, Glob: Glob7 } = globalThis.Bun;
18809
18979
  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) => {
@@ -18840,7 +19010,7 @@ var REQUIRED_ANGULAR_SPECIFIERS_BASE, requiredAngularSpecifiers = (jitMode) => j
18840
19010
  }
18841
19011
  return { angular, transitiveRoots };
18842
19012
  }, PARTIAL_DECL_MARKERS, containsPartialDeclarations = (source) => PARTIAL_DECL_MARKERS.some((marker) => source.includes(marker)), collectTransitiveAngularSpecs = async (roots, angularFound) => {
18843
- const { readFileSync: readFileSync20 } = await import("fs");
19013
+ const { readFileSync: readFileSync22 } = await import("fs");
18844
19014
  const transpiler6 = new Bun.Transpiler({ loader: "js" });
18845
19015
  const visited = new Set;
18846
19016
  const frontier = [];
@@ -18861,7 +19031,7 @@ var REQUIRED_ANGULAR_SPECIFIERS_BASE, requiredAngularSpecifiers = (jitMode) => j
18861
19031
  }
18862
19032
  let content;
18863
19033
  try {
18864
- content = readFileSync20(resolved, "utf-8");
19034
+ content = readFileSync22(resolved, "utf-8");
18865
19035
  } catch {
18866
19036
  continue;
18867
19037
  }
@@ -18900,14 +19070,14 @@ var REQUIRED_ANGULAR_SPECIFIERS_BASE, requiredAngularSpecifiers = (jitMode) => j
18900
19070
  await collectTransitiveAngularSpecs([...angular, ...transitiveRoots], angular);
18901
19071
  return Array.from(angular).filter(isResolvable2);
18902
19072
  }, buildAngularVendor = async (buildDir, directories = [], linkerJitMode = false, depVendorSpecifiers = []) => {
18903
- const vendorDir = join31(buildDir, "angular", "vendor");
19073
+ const vendorDir = join32(buildDir, "angular", "vendor");
18904
19074
  mkdirSync9(vendorDir, { recursive: true });
18905
- const tmpDir = join31(buildDir, "_angular_vendor_tmp");
19075
+ const tmpDir = join32(buildDir, "_angular_vendor_tmp");
18906
19076
  mkdirSync9(tmpDir, { recursive: true });
18907
19077
  const specifiers = await resolveAngularSpecifiers(directories, linkerJitMode);
18908
19078
  const entrypoints = await Promise.all(specifiers.map(async (specifier) => {
18909
19079
  const safeName = toSafeFileName2(specifier);
18910
- const entryPath = join31(tmpDir, `${safeName}.ts`);
19080
+ const entryPath = join32(tmpDir, `${safeName}.ts`);
18911
19081
  await Bun.write(entryPath, await generateVendorEntrySource(specifier));
18912
19082
  return entryPath;
18913
19083
  }));
@@ -18938,9 +19108,9 @@ var REQUIRED_ANGULAR_SPECIFIERS_BASE, requiredAngularSpecifiers = (jitMode) => j
18938
19108
  const specifiers = await resolveAngularSpecifiers(directories, linkerJitMode);
18939
19109
  return computeAngularVendorPaths(specifiers);
18940
19110
  }, buildAngularServerVendor = async (buildDir, directories = [], linkerJitMode = false) => {
18941
- const vendorDir = join31(buildDir, "angular", "vendor", "server");
19111
+ const vendorDir = join32(buildDir, "angular", "vendor", "server");
18942
19112
  mkdirSync9(vendorDir, { recursive: true });
18943
- const tmpDir = join31(buildDir, "_angular_server_vendor_tmp");
19113
+ const tmpDir = join32(buildDir, "_angular_server_vendor_tmp");
18944
19114
  mkdirSync9(tmpDir, { recursive: true });
18945
19115
  const browserSpecs = await resolveAngularSpecifiers(directories, linkerJitMode);
18946
19116
  const allSpecs = new Set(browserSpecs);
@@ -18951,7 +19121,7 @@ var REQUIRED_ANGULAR_SPECIFIERS_BASE, requiredAngularSpecifiers = (jitMode) => j
18951
19121
  const specifiers = Array.from(allSpecs);
18952
19122
  const entrypoints = await Promise.all(specifiers.map(async (specifier) => {
18953
19123
  const safeName = toSafeFileName2(specifier);
18954
- const entryPath = join31(tmpDir, `${safeName}.ts`);
19124
+ const entryPath = join32(tmpDir, `${safeName}.ts`);
18955
19125
  await Bun.write(entryPath, await generateVendorEntrySource(specifier));
18956
19126
  return entryPath;
18957
19127
  }));
@@ -18973,9 +19143,9 @@ var REQUIRED_ANGULAR_SPECIFIERS_BASE, requiredAngularSpecifiers = (jitMode) => j
18973
19143
  return specifiers;
18974
19144
  }, computeAngularServerVendorPaths = (buildDir, specifiers) => {
18975
19145
  const paths = {};
18976
- const vendorDir = join31(buildDir, "angular", "vendor", "server");
19146
+ const vendorDir = join32(buildDir, "angular", "vendor", "server");
18977
19147
  for (const specifier of specifiers) {
18978
- paths[specifier] = join31(vendorDir, `${toSafeFileName2(specifier)}.js`);
19148
+ paths[specifier] = join32(vendorDir, `${toSafeFileName2(specifier)}.js`);
18979
19149
  }
18980
19150
  return paths;
18981
19151
  }, computeAngularServerVendorPathsAsync = async (buildDir, directories = [], linkerJitMode = true) => {
@@ -19031,17 +19201,17 @@ __export(exports_buildVueVendor, {
19031
19201
  buildVueVendor: () => buildVueVendor
19032
19202
  });
19033
19203
  import { mkdirSync as mkdirSync10 } from "fs";
19034
- import { join as join32 } from "path";
19204
+ import { join as join33 } from "path";
19035
19205
  import { rm as rm7 } from "fs/promises";
19036
19206
  var {build: bunBuild5 } = globalThis.Bun;
19037
19207
  var vueSpecifiers, toSafeFileName3 = (specifier) => specifier.replace(/\//g, "_"), buildVueVendor = async (buildDir) => {
19038
- const vendorDir = join32(buildDir, "vue", "vendor");
19208
+ const vendorDir = join33(buildDir, "vue", "vendor");
19039
19209
  mkdirSync10(vendorDir, { recursive: true });
19040
- const tmpDir = join32(buildDir, "_vue_vendor_tmp");
19210
+ const tmpDir = join33(buildDir, "_vue_vendor_tmp");
19041
19211
  mkdirSync10(tmpDir, { recursive: true });
19042
19212
  const entrypoints = await Promise.all(vueSpecifiers.map(async (specifier) => {
19043
19213
  const safeName = toSafeFileName3(specifier);
19044
- const entryPath = join32(tmpDir, `${safeName}.ts`);
19214
+ const entryPath = join33(tmpDir, `${safeName}.ts`);
19045
19215
  await Bun.write(entryPath, `export * from '${specifier}';
19046
19216
  `);
19047
19217
  return entryPath;
@@ -19066,11 +19236,11 @@ var vueSpecifiers, toSafeFileName3 = (specifier) => specifier.replace(/\//g, "_"
19066
19236
  console.warn("\u26A0\uFE0F Vue vendor build had errors:", result.logs);
19067
19237
  return;
19068
19238
  }
19069
- const { readFileSync: readFileSync20, writeFileSync: writeFileSync9, readdirSync: readdirSync4 } = await import("fs");
19070
- const files = readdirSync4(vendorDir).filter((f2) => f2.endsWith(".js"));
19239
+ const { readFileSync: readFileSync22, writeFileSync: writeFileSync9, readdirSync: readdirSync5 } = await import("fs");
19240
+ const files = readdirSync5(vendorDir).filter((f2) => f2.endsWith(".js"));
19071
19241
  for (const file5 of files) {
19072
- const filePath = join32(vendorDir, file5);
19073
- const content = readFileSync20(filePath, "utf-8");
19242
+ const filePath = join33(vendorDir, file5);
19243
+ const content = readFileSync22(filePath, "utf-8");
19074
19244
  if (!content.includes("__VUE_HMR_RUNTIME__"))
19075
19245
  continue;
19076
19246
  const patched = content.replace(/getGlobalThis\(\)\.__VUE_HMR_RUNTIME__\s*=\s*\{/, "getGlobalThis().__VUE_HMR_RUNTIME__ = getGlobalThis().__VUE_HMR_RUNTIME__ || {");
@@ -19096,7 +19266,7 @@ __export(exports_buildSvelteVendor, {
19096
19266
  buildSvelteVendor: () => buildSvelteVendor
19097
19267
  });
19098
19268
  import { mkdirSync as mkdirSync11 } from "fs";
19099
- import { join as join33 } from "path";
19269
+ import { join as join34 } from "path";
19100
19270
  import { rm as rm8 } from "fs/promises";
19101
19271
  var {build: bunBuild6 } = globalThis.Bun;
19102
19272
  var svelteSpecifiers, isResolvable3 = (specifier) => {
@@ -19110,13 +19280,13 @@ var svelteSpecifiers, isResolvable3 = (specifier) => {
19110
19280
  const specifiers = resolveVendorSpecifiers2();
19111
19281
  if (specifiers.length === 0)
19112
19282
  return;
19113
- const vendorDir = join33(buildDir, "svelte", "vendor");
19283
+ const vendorDir = join34(buildDir, "svelte", "vendor");
19114
19284
  mkdirSync11(vendorDir, { recursive: true });
19115
- const tmpDir = join33(buildDir, "_svelte_vendor_tmp");
19285
+ const tmpDir = join34(buildDir, "_svelte_vendor_tmp");
19116
19286
  mkdirSync11(tmpDir, { recursive: true });
19117
19287
  const entrypoints = await Promise.all(specifiers.map(async (specifier) => {
19118
19288
  const safeName = toSafeFileName4(specifier);
19119
- const entryPath = join33(tmpDir, `${safeName}.ts`);
19289
+ const entryPath = join34(tmpDir, `${safeName}.ts`);
19120
19290
  await Bun.write(entryPath, `export * from '${specifier}';
19121
19291
  `);
19122
19292
  return entryPath;
@@ -19166,7 +19336,7 @@ __export(exports_rewriteImportsPlugin, {
19166
19336
  buildWithImportRewrite: () => buildWithImportRewrite
19167
19337
  });
19168
19338
  import { readdir as readdir3 } from "fs/promises";
19169
- import { join as join34 } from "path";
19339
+ import { join as join35 } from "path";
19170
19340
  var escapeRegex2 = (str) => str.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"), jsRewriteImports = (content, replacements) => {
19171
19341
  let result = content;
19172
19342
  for (const [specifier, webPath] of replacements) {
@@ -19295,7 +19465,7 @@ ${content}`;
19295
19465
  const entries = await readdir3(dir);
19296
19466
  for (const entry of entries) {
19297
19467
  if (entry.endsWith(".js"))
19298
- allFiles.push(join34(dir, entry));
19468
+ allFiles.push(join35(dir, entry));
19299
19469
  }
19300
19470
  } catch {}
19301
19471
  }
@@ -19339,12 +19509,12 @@ import {
19339
19509
  cpSync,
19340
19510
  existsSync as existsSync27,
19341
19511
  mkdirSync as mkdirSync12,
19342
- readFileSync as readFileSync20,
19512
+ readFileSync as readFileSync22,
19343
19513
  rmSync as rmSync2,
19344
19514
  statSync as statSync3,
19345
19515
  writeFileSync as writeFileSync9
19346
19516
  } from "fs";
19347
- import { basename as basename11, dirname as dirname19, extname as extname8, join as join35, relative as relative13, resolve as resolve28 } from "path";
19517
+ import { basename as basename11, dirname as dirname19, extname as extname8, join as join36, relative as relative13, resolve as resolve28 } from "path";
19348
19518
  import { cwd, env as env3, exit } from "process";
19349
19519
  var {build: bunBuild7, Glob: Glob8 } = globalThis.Bun;
19350
19520
  var isDev2, isBuildTraceEnabled = () => {
@@ -19422,8 +19592,8 @@ var isDev2, isBuildTraceEnabled = () => {
19422
19592
  mkdirSync12(htmxDestDir, { recursive: true });
19423
19593
  const glob = new Glob8("htmx*.min.js");
19424
19594
  for (const relPath of glob.scanSync({ cwd: htmxDir })) {
19425
- const src = join35(htmxDir, relPath);
19426
- const dest = join35(htmxDestDir, "htmx.min.js");
19595
+ const src = join36(htmxDir, relPath);
19596
+ const dest = join36(htmxDestDir, "htmx.min.js");
19427
19597
  copyFileSync2(src, dest);
19428
19598
  return;
19429
19599
  }
@@ -19451,7 +19621,7 @@ var isDev2, isBuildTraceEnabled = () => {
19451
19621
  globalThis.__absoluteVersion = pkg.version;
19452
19622
  };
19453
19623
  await resolveCandidate(candidates);
19454
- }, SKIP_DIRS4, addWorkerPathIfExists = (file5, relPath, workerPaths) => {
19624
+ }, SKIP_DIRS5, addWorkerPathIfExists = (file5, relPath, workerPaths) => {
19455
19625
  const absPath = resolve28(file5, "..", relPath);
19456
19626
  try {
19457
19627
  statSync3(absPath);
@@ -19467,7 +19637,7 @@ var isDev2, isBuildTraceEnabled = () => {
19467
19637
  addWorkerPathIfExists(file5, relPath, workerPaths);
19468
19638
  }
19469
19639
  }, collectWorkerPathsFromFile = (file5, patterns, workerPaths) => {
19470
- const content = readFileSync20(file5, "utf-8");
19640
+ const content = readFileSync22(file5, "utf-8");
19471
19641
  for (const pattern of patterns) {
19472
19642
  collectWorkerPathsFromContent(content, pattern, file5, workerPaths);
19473
19643
  }
@@ -19476,7 +19646,7 @@ var isDev2, isBuildTraceEnabled = () => {
19476
19646
  for await (const file5 of glob.scan({ absolute: true, cwd: dir })) {
19477
19647
  const relToDir = file5.slice(dir.length + 1);
19478
19648
  const [firstSegment] = relToDir.split("/");
19479
- if (firstSegment && SKIP_DIRS4.has(firstSegment))
19649
+ if (firstSegment && SKIP_DIRS5.has(firstSegment))
19480
19650
  continue;
19481
19651
  collectWorkerPathsFromFile(file5, patterns, workerPaths);
19482
19652
  }
@@ -19498,7 +19668,7 @@ var isDev2, isBuildTraceEnabled = () => {
19498
19668
  vuePagesPath
19499
19669
  }) => {
19500
19670
  const { readdirSync: readDir } = await import("fs");
19501
- const devIndexDir = join35(buildPath, "_src_indexes");
19671
+ const devIndexDir = join36(buildPath, "_src_indexes");
19502
19672
  mkdirSync12(devIndexDir, { recursive: true });
19503
19673
  if (reactIndexesPath && reactPagesPath) {
19504
19674
  copyReactDevIndexes(reactIndexesPath, reactPagesPath, devIndexDir, readDir);
@@ -19516,35 +19686,35 @@ var isDev2, isBuildTraceEnabled = () => {
19516
19686
  const indexFiles = readDir(reactIndexesPath).filter((file5) => file5.endsWith(".tsx"));
19517
19687
  const pagesRel = relative13(process.cwd(), resolve28(reactPagesPath)).replace(/\\/g, "/");
19518
19688
  for (const file5 of indexFiles) {
19519
- let content = readFileSync20(join35(reactIndexesPath, file5), "utf-8");
19689
+ let content = readFileSync22(join36(reactIndexesPath, file5), "utf-8");
19520
19690
  content = content.replace(/from\s*['"]([^'"]*\/pages\/([^'"]+))['"]/g, (_match, _fullPath, componentName) => `from '/@src/${pagesRel}/${componentName}'`);
19521
- writeFileSync9(join35(devIndexDir, file5), content);
19691
+ writeFileSync9(join36(devIndexDir, file5), content);
19522
19692
  }
19523
19693
  }, copySvelteDevIndexes = (svelteDir, sveltePagesPath, svelteEntries, devIndexDir) => {
19524
- const svelteIndexDir = join35(getFrameworkGeneratedDir("svelte"), "indexes");
19694
+ const svelteIndexDir = join36(getFrameworkGeneratedDir("svelte"), "indexes");
19525
19695
  const sveltePageEntries = svelteEntries.filter((file5) => resolve28(file5).startsWith(resolve28(sveltePagesPath)));
19526
19696
  for (const entry of sveltePageEntries) {
19527
19697
  const name = basename11(entry).replace(/\.svelte(\.(ts|js))?$/, "");
19528
- const indexFile = join35(svelteIndexDir, "pages", `${name}.js`);
19698
+ const indexFile = join36(svelteIndexDir, "pages", `${name}.js`);
19529
19699
  if (!existsSync27(indexFile))
19530
19700
  continue;
19531
- let content = readFileSync20(indexFile, "utf-8");
19701
+ let content = readFileSync22(indexFile, "utf-8");
19532
19702
  const srcRel = relative13(process.cwd(), resolve28(entry)).replace(/\\/g, "/");
19533
19703
  content = content.replace(/import\s+Component\s+from\s+['"]([^'"]+)['"]/, `import Component from "/@src/${srcRel}"`);
19534
- writeFileSync9(join35(devIndexDir, `${name}.svelte.js`), content);
19704
+ writeFileSync9(join36(devIndexDir, `${name}.svelte.js`), content);
19535
19705
  }
19536
19706
  }, copyVueDevIndexes = (vueDir, vuePagesPath, vueEntries, devIndexDir) => {
19537
- const vueIndexDir = join35(getFrameworkGeneratedDir("vue"), "indexes");
19707
+ const vueIndexDir = join36(getFrameworkGeneratedDir("vue"), "indexes");
19538
19708
  const vuePageEntries = vueEntries.filter((file5) => resolve28(file5).startsWith(resolve28(vuePagesPath)));
19539
19709
  for (const entry of vuePageEntries) {
19540
19710
  const name = basename11(entry, ".vue");
19541
- const indexFile = join35(vueIndexDir, `${name}.js`);
19711
+ const indexFile = join36(vueIndexDir, `${name}.js`);
19542
19712
  if (!existsSync27(indexFile))
19543
19713
  continue;
19544
- let content = readFileSync20(indexFile, "utf-8");
19714
+ let content = readFileSync22(indexFile, "utf-8");
19545
19715
  const srcRel = relative13(process.cwd(), resolve28(entry)).replace(/\\/g, "/");
19546
19716
  content = content.replace(/import\s+Comp(?:\s*,\s*\*\s+as\s+\w+)?\s+from\s+['"]([^'"]+)['"]/, (match) => match.replace(/from\s+['"][^'"]+['"]/, `from "/@src/${srcRel}"`));
19547
- writeFileSync9(join35(devIndexDir, `${name}.vue.js`), content);
19717
+ writeFileSync9(join36(devIndexDir, `${name}.vue.js`), content);
19548
19718
  }
19549
19719
  }, resolveVueRuntimeId = (content, firstUseName, outputPath, projectRoot) => {
19550
19720
  const varIdx = content.indexOf(`var ${firstUseName} =`);
@@ -19592,7 +19762,7 @@ var isDev2, isBuildTraceEnabled = () => {
19592
19762
  }
19593
19763
  return result;
19594
19764
  }, VUE_HMR_RUNTIME, injectVueComposableTracking = (outputPath, projectRoot) => {
19595
- let content = readFileSync20(outputPath, "utf-8");
19765
+ let content = readFileSync22(outputPath, "utf-8");
19596
19766
  const usePattern = /^var\s+(use[A-Z]\w*)\s*=/gm;
19597
19767
  const useNames = [];
19598
19768
  let match;
@@ -19642,7 +19812,7 @@ ${content.slice(firstUseIdx)}`;
19642
19812
  }, rewriteUrlReferences = (outputPaths, urlFileMap) => {
19643
19813
  const urlPattern = /new\s+URL\(\s*["'](\.\.?\/[^"']+)["']\s*,\s*import\.meta\.url\s*\)/g;
19644
19814
  for (const outputPath of outputPaths) {
19645
- let content = readFileSync20(outputPath, "utf-8");
19815
+ let content = readFileSync22(outputPath, "utf-8");
19646
19816
  let changed = false;
19647
19817
  content = content.replace(urlPattern, (_match, relPath) => {
19648
19818
  const targetName = basename11(relPath);
@@ -19767,10 +19937,10 @@ ${content.slice(firstUseIdx)}`;
19767
19937
  restoreTracePhase();
19768
19938
  return;
19769
19939
  }
19770
- const traceDir = join35(buildPath2, ".absolute-trace");
19940
+ const traceDir = join36(buildPath2, ".absolute-trace");
19771
19941
  const timestamp = new Date().toISOString().replace(/[:.]/g, "-");
19772
19942
  mkdirSync12(traceDir, { recursive: true });
19773
- writeFileSync9(join35(traceDir, `build-trace-${timestamp}.json`), JSON.stringify({
19943
+ writeFileSync9(join36(traceDir, `build-trace-${timestamp}.json`), JSON.stringify({
19774
19944
  events: traceEvents,
19775
19945
  frameworks: traceFrameworkNames,
19776
19946
  generatedAt: new Date().toISOString(),
@@ -19801,15 +19971,15 @@ ${content.slice(firstUseIdx)}`;
19801
19971
  const stylesPath = typeof stylesConfig === "string" ? stylesConfig : stylesConfig?.path;
19802
19972
  const stylesIgnore = typeof stylesConfig === "object" ? stylesConfig.ignore : undefined;
19803
19973
  const stylesDir = stylesPath && validateSafePath(stylesPath, projectRoot);
19804
- const reactIndexesPath = reactDir && join35(getFrameworkGeneratedDir("react"), "indexes");
19805
- const reactPagesPath = reactDir && join35(reactDir, "pages");
19806
- const htmlPagesPath = htmlDir && join35(htmlDir, "pages");
19807
- const htmlScriptsPath = htmlDir && join35(htmlDir, "scripts");
19808
- const sveltePagesPath = svelteDir && join35(svelteDir, "pages");
19809
- const vuePagesPath = vueDir && join35(vueDir, "pages");
19810
- const htmxPagesPath = htmxDir && join35(htmxDir, "pages");
19811
- const angularPagesPath = angularDir && join35(angularDir, "pages");
19812
- const emberPagesPath = emberDir && join35(emberDir, "pages");
19974
+ const reactIndexesPath = reactDir && join36(getFrameworkGeneratedDir("react"), "indexes");
19975
+ const reactPagesPath = reactDir && join36(reactDir, "pages");
19976
+ const htmlPagesPath = htmlDir && join36(htmlDir, "pages");
19977
+ const htmlScriptsPath = htmlDir && join36(htmlDir, "scripts");
19978
+ const sveltePagesPath = svelteDir && join36(svelteDir, "pages");
19979
+ const vuePagesPath = vueDir && join36(vueDir, "pages");
19980
+ const htmxPagesPath = htmxDir && join36(htmxDir, "pages");
19981
+ const angularPagesPath = angularDir && join36(angularDir, "pages");
19982
+ const emberPagesPath = emberDir && join36(emberDir, "pages");
19813
19983
  const frontends = [
19814
19984
  reactDir,
19815
19985
  htmlDir,
@@ -19868,8 +20038,8 @@ ${content.slice(firstUseIdx)}`;
19868
20038
  const [firstEntry] = serverDirMap;
19869
20039
  if (!firstEntry)
19870
20040
  throw new Error("Expected at least one server directory entry");
19871
- serverRoot = join35(firstEntry.dir, firstEntry.subdir);
19872
- serverOutDir = join35(buildPath, basename11(firstEntry.dir));
20041
+ serverRoot = join36(firstEntry.dir, firstEntry.subdir);
20042
+ serverOutDir = join36(buildPath, basename11(firstEntry.dir));
19873
20043
  } else if (serverDirMap.length > 1) {
19874
20044
  serverRoot = commonAncestor(serverDirMap.map((entry) => entry.dir), projectRoot);
19875
20045
  serverOutDir = buildPath;
@@ -19897,7 +20067,7 @@ ${content.slice(firstUseIdx)}`;
19897
20067
  await tracePhase("react/index-generation", () => generateReactIndexFiles(reactPagesPath, reactIndexesPath, hmr));
19898
20068
  }
19899
20069
  if (assetsPath && (!isIncremental || normalizedIncrementalFiles?.some((f2) => f2.includes("/assets/")))) {
19900
- await tracePhase("assets/copy", () => cpSync(assetsPath, join35(buildPath, "assets"), {
20070
+ await tracePhase("assets/copy", () => cpSync(assetsPath, join36(buildPath, "assets"), {
19901
20071
  force: true,
19902
20072
  recursive: true
19903
20073
  }));
@@ -20007,11 +20177,11 @@ ${content.slice(firstUseIdx)}`;
20007
20177
  }
20008
20178
  }
20009
20179
  if (htmlDefaults.error || htmlDefaults.notFound || htmlDefaults.loading || Object.keys(htmlPages).length > 0) {
20010
- const htmlConventionsOutDir = join35(buildPath, "conventions", "html");
20180
+ const htmlConventionsOutDir = join36(buildPath, "conventions", "html");
20011
20181
  mkdirSync12(htmlConventionsOutDir, { recursive: true });
20012
20182
  const htmlPathRemap = new Map;
20013
20183
  for (const sourcePath of htmlConventionSources) {
20014
- const dest = join35(htmlConventionsOutDir, basename11(sourcePath));
20184
+ const dest = join36(htmlConventionsOutDir, basename11(sourcePath));
20015
20185
  cpSync(sourcePath, dest, { force: true });
20016
20186
  htmlPathRemap.set(sourcePath, dest);
20017
20187
  }
@@ -20054,7 +20224,7 @@ ${content.slice(firstUseIdx)}`;
20054
20224
  const reactEntries = isIncremental && reactIndexesPath && reactPagesPath ? filterToIncrementalEntries(allReactEntries, (entry) => {
20055
20225
  if (entry.startsWith(resolve28(reactIndexesPath))) {
20056
20226
  const pageName = basename11(entry, ".tsx");
20057
- return join35(reactPagesPath, `${pageName}.tsx`);
20227
+ return join36(reactPagesPath, `${pageName}.tsx`);
20058
20228
  }
20059
20229
  return null;
20060
20230
  }) : allReactEntries;
@@ -20077,6 +20247,20 @@ ${content.slice(firstUseIdx)}`;
20077
20247
  const shouldCompileSvelte = svelteDir && svelteEntries.length > 0;
20078
20248
  const shouldCompileVue = vueDir && vueEntries.length > 0;
20079
20249
  const shouldCompileAngular = angularDir && angularEntries.length > 0;
20250
+ const ssrOnlyVueEntries = shouldCompileVue ? await tracePhase("scan/vue-ssr-only", async () => {
20251
+ const { scanVueSsrOnlyPages: scanVueSsrOnlyPages2 } = await Promise.resolve().then(() => (init_scanVueSsrOnlyPages(), exports_scanVueSsrOnlyPages));
20252
+ const ssrOnlyPageNames = scanVueSsrOnlyPages2(projectRoot);
20253
+ if (ssrOnlyPageNames.size === 0)
20254
+ return new Set;
20255
+ const resolved = new Set;
20256
+ for (const entry of vueEntries) {
20257
+ const name = basename11(entry, ".vue");
20258
+ if (ssrOnlyPageNames.has(name)) {
20259
+ resolved.add(resolve28(entry));
20260
+ }
20261
+ }
20262
+ return resolved;
20263
+ }) : new Set;
20080
20264
  const shouldCompileEmber = emberDir && emberEntries.length > 0;
20081
20265
  const emptyStringArray = [];
20082
20266
  const islandBuildInfo = islandRegistryPath ? await tracePhase("islands/registry", () => loadIslandRegistryBuildInfo(islandRegistryPath)) : null;
@@ -20139,7 +20323,7 @@ ${content.slice(firstUseIdx)}`;
20139
20323
  svelteIndexPaths: [...emptyStringArray],
20140
20324
  svelteServerPaths: [...emptyStringArray]
20141
20325
  },
20142
- shouldCompileVue ? tracePhase("compile/vue", () => Promise.resolve().then(() => (init_compileVue(), exports_compileVue)).then((mod) => mod.compileVue(vueEntries, vueDir, hmr, styleTransformConfig))) : {
20326
+ shouldCompileVue ? tracePhase("compile/vue", () => Promise.resolve().then(() => (init_compileVue(), exports_compileVue)).then((mod) => mod.compileVue(vueEntries, vueDir, hmr, styleTransformConfig, ssrOnlyVueEntries))) : {
20143
20327
  vueClientPaths: [...emptyStringArray],
20144
20328
  vueCssPaths: [...emptyStringArray],
20145
20329
  vueIndexPaths: [...emptyStringArray],
@@ -20157,14 +20341,14 @@ ${content.slice(firstUseIdx)}`;
20157
20341
  try {
20158
20342
  const { primeComponentFingerprint: primeComponentFingerprint2 } = await Promise.resolve().then(() => (init_fastHmrCompiler(), exports_fastHmrCompiler));
20159
20343
  const { readdir: readdir4 } = await import("fs/promises");
20160
- const { join: join36 } = await import("path");
20344
+ const { join: join37 } = await import("path");
20161
20345
  const walk = async (dir) => {
20162
20346
  const entries = await readdir4(dir, {
20163
20347
  withFileTypes: true
20164
20348
  });
20165
20349
  const out = [];
20166
20350
  for (const entry of entries) {
20167
- const full = join36(dir, entry.name);
20351
+ const full = join37(dir, entry.name);
20168
20352
  if (entry.isDirectory()) {
20169
20353
  out.push(...await walk(full));
20170
20354
  } else if (entry.isFile() && entry.name.endsWith(".ts") && !entry.name.endsWith(".d.ts")) {
@@ -20229,7 +20413,7 @@ ${content.slice(firstUseIdx)}`;
20229
20413
  const compileReactConventions = async () => {
20230
20414
  if (reactConventionSources.length === 0)
20231
20415
  return emptyStringArray;
20232
- const destDir = join35(buildPath, "conventions", "react");
20416
+ const destDir = join36(buildPath, "conventions", "react");
20233
20417
  rmSync2(destDir, { force: true, recursive: true });
20234
20418
  mkdirSync12(destDir, { recursive: true });
20235
20419
  const destPaths = [];
@@ -20273,7 +20457,7 @@ ${content.slice(firstUseIdx)}`;
20273
20457
  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 }
20274
20458
  ]);
20275
20459
  const bundleConventionFiles = async (framework, compiledPaths) => {
20276
- const destDir = join35(buildPath, "conventions", framework);
20460
+ const destDir = join36(buildPath, "conventions", framework);
20277
20461
  rmSync2(destDir, { force: true, recursive: true });
20278
20462
  mkdirSync12(destDir, { recursive: true });
20279
20463
  const destPaths = [];
@@ -20347,7 +20531,7 @@ ${content.slice(firstUseIdx)}`;
20347
20531
  }
20348
20532
  })) : {
20349
20533
  entries: [],
20350
- generatedRoot: join35(buildPath, "_island_entries")
20534
+ generatedRoot: join36(buildPath, "_island_entries")
20351
20535
  };
20352
20536
  const islandClientEntryPoints = islandEntryResult.entries.map((entry) => entry.entryPath);
20353
20537
  if (serverEntryPoints.length === 0 && reactClientEntryPoints.length === 0 && nonReactClientEntryPoints.length === 0 && islandClientEntryPoints.length === 0 && htmxDir === undefined && htmlDir === undefined) {
@@ -20383,7 +20567,7 @@ ${content.slice(firstUseIdx)}`;
20383
20567
  return {};
20384
20568
  }
20385
20569
  if (hmr && reactIndexesPath && reactClientEntryPoints.length > 0) {
20386
- const refreshEntry = join35(reactIndexesPath, "_refresh.tsx");
20570
+ const refreshEntry = join36(reactIndexesPath, "_refresh.tsx");
20387
20571
  if (!reactClientEntryPoints.includes(refreshEntry))
20388
20572
  reactClientEntryPoints.push(refreshEntry);
20389
20573
  }
@@ -20485,19 +20669,19 @@ ${content.slice(firstUseIdx)}`;
20485
20669
  throw: false
20486
20670
  }, resolveBunBuildOverride(bunBuildConfig, "reactClient")) : undefined;
20487
20671
  if (reactDir && reactClientEntryPoints.length > 0) {
20488
- rmSync2(join35(buildPath, "react", "generated", "indexes"), {
20672
+ rmSync2(join36(buildPath, "react", "generated", "indexes"), {
20489
20673
  force: true,
20490
20674
  recursive: true
20491
20675
  });
20492
20676
  }
20493
20677
  if (angularDir && angularClientPaths.length > 0) {
20494
- rmSync2(join35(buildPath, "angular", "indexes"), {
20678
+ rmSync2(join36(buildPath, "angular", "indexes"), {
20495
20679
  force: true,
20496
20680
  recursive: true
20497
20681
  });
20498
20682
  }
20499
20683
  if (islandClientEntryPoints.length > 0) {
20500
- rmSync2(join35(buildPath, "islands"), {
20684
+ rmSync2(join36(buildPath, "islands"), {
20501
20685
  force: true,
20502
20686
  recursive: true
20503
20687
  });
@@ -20586,7 +20770,7 @@ ${content.slice(firstUseIdx)}`;
20586
20770
  globalCssEntries.length > 0 ? tracePhase("bun/global-css", () => bunBuild7(mergeBunBuildConfig({
20587
20771
  entrypoints: globalCssEntries,
20588
20772
  naming: `[dir]/[name].[hash].[ext]`,
20589
- outdir: stylesDir ? join35(buildPath, basename11(stylesDir)) : buildPath,
20773
+ outdir: stylesDir ? join36(buildPath, basename11(stylesDir)) : buildPath,
20590
20774
  plugins: [stylePreprocessorPlugin2],
20591
20775
  root: stylesDir || clientRoot,
20592
20776
  target: "browser",
@@ -20595,7 +20779,7 @@ ${content.slice(firstUseIdx)}`;
20595
20779
  vueCssPaths.length > 0 ? tracePhase("bun/vue-css", () => bunBuild7(mergeBunBuildConfig({
20596
20780
  entrypoints: vueCssPaths,
20597
20781
  naming: `[name].[hash].[ext]`,
20598
- outdir: join35(buildPath, assetsPath ? basename11(assetsPath) : "assets", "css"),
20782
+ outdir: join36(buildPath, assetsPath ? basename11(assetsPath) : "assets", "css"),
20599
20783
  target: "browser",
20600
20784
  throw: false
20601
20785
  }, resolveBunBuildOverride(bunBuildConfig, "vueCss")))) : undefined
@@ -20755,7 +20939,7 @@ ${content.slice(firstUseIdx)}`;
20755
20939
  const injectHMRIntoHTMLFile = (filePath, framework) => {
20756
20940
  if (!hmrClientBundle)
20757
20941
  return;
20758
- let html = readFileSync20(filePath, "utf-8");
20942
+ let html = readFileSync22(filePath, "utf-8");
20759
20943
  if (html.includes("data-hmr-client"))
20760
20944
  return;
20761
20945
  const tag = `<script>window.__HMR_FRAMEWORK__="${framework}";</script><script data-hmr-client>${hmrClientBundle}</script>`;
@@ -20766,7 +20950,7 @@ ${content.slice(firstUseIdx)}`;
20766
20950
  const processHtmlPages = async () => {
20767
20951
  if (!(htmlDir && htmlPagesPath))
20768
20952
  return;
20769
- const outputHtmlPages = isSingle ? join35(buildPath, "pages") : join35(buildPath, basename11(htmlDir), "pages");
20953
+ const outputHtmlPages = isSingle ? join36(buildPath, "pages") : join36(buildPath, basename11(htmlDir), "pages");
20770
20954
  mkdirSync12(outputHtmlPages, { recursive: true });
20771
20955
  cpSync(htmlPagesPath, outputHtmlPages, {
20772
20956
  force: true,
@@ -20791,14 +20975,14 @@ ${content.slice(firstUseIdx)}`;
20791
20975
  const processHtmxPages = async () => {
20792
20976
  if (!(htmxDir && htmxPagesPath))
20793
20977
  return;
20794
- const outputHtmxPages = isSingle ? join35(buildPath, "pages") : join35(buildPath, basename11(htmxDir), "pages");
20978
+ const outputHtmxPages = isSingle ? join36(buildPath, "pages") : join36(buildPath, basename11(htmxDir), "pages");
20795
20979
  mkdirSync12(outputHtmxPages, { recursive: true });
20796
20980
  cpSync(htmxPagesPath, outputHtmxPages, {
20797
20981
  force: true,
20798
20982
  recursive: true
20799
20983
  });
20800
20984
  if (shouldCopyHtmx) {
20801
- const htmxDestDir = isSingle ? buildPath : join35(buildPath, basename11(htmxDir));
20985
+ const htmxDestDir = isSingle ? buildPath : join36(buildPath, basename11(htmxDir));
20802
20986
  copyHtmxVendor(htmxDir, htmxDestDir);
20803
20987
  }
20804
20988
  if (shouldUpdateHtmxAssetPaths) {
@@ -20863,9 +21047,9 @@ ${content.slice(firstUseIdx)}`;
20863
21047
  writeBuildTrace(buildPath);
20864
21048
  return { conventions: conventionsMap, manifest };
20865
21049
  }
20866
- writeFileSync9(join35(buildPath, "manifest.json"), JSON.stringify(manifest, null, "\t"));
21050
+ writeFileSync9(join36(buildPath, "manifest.json"), JSON.stringify(manifest, null, "\t"));
20867
21051
  if (Object.keys(conventionsMap).length > 0) {
20868
- writeFileSync9(join35(buildPath, "conventions.json"), JSON.stringify(conventionsMap, null, "\t"));
21052
+ writeFileSync9(join36(buildPath, "conventions.json"), JSON.stringify(conventionsMap, null, "\t"));
20869
21053
  }
20870
21054
  writeBuildTrace(buildPath);
20871
21055
  if (mode === "production") {
@@ -20928,7 +21112,7 @@ var init_build = __esm(() => {
20928
21112
  init_logger();
20929
21113
  init_validateSafePath();
20930
21114
  isDev2 = env3.NODE_ENV === "development";
20931
- SKIP_DIRS4 = new Set([
21115
+ SKIP_DIRS5 = new Set([
20932
21116
  "build",
20933
21117
  "node_modules",
20934
21118
  ".absolutejs",
@@ -20987,7 +21171,7 @@ var init_build = __esm(() => {
20987
21171
 
20988
21172
  // src/build/buildEmberVendor.ts
20989
21173
  import { mkdirSync as mkdirSync13, existsSync as existsSync28 } from "fs";
20990
- import { join as join36 } from "path";
21174
+ import { join as join37 } from "path";
20991
21175
  import { rm as rm9 } from "fs/promises";
20992
21176
  var {build: bunBuild8 } = globalThis.Bun;
20993
21177
  var toSafeFileName5 = (specifier) => specifier.replace(/^@/, "").replace(/\//g, "_"), generateMacrosShim = () => `// Generated shim for @embroider/macros \u2014 provides minimal runtime
@@ -21039,7 +21223,7 @@ export const importSync = (specifier) => {
21039
21223
  if (standaloneSpecifiers.has(specifier)) {
21040
21224
  return { resolveTo: specifier, specifier };
21041
21225
  }
21042
- const emberInternalPath = join36(cwd2, "node_modules/ember-source/dist/packages", specifier, "index.js");
21226
+ const emberInternalPath = join37(cwd2, "node_modules/ember-source/dist/packages", specifier, "index.js");
21043
21227
  if (!existsSync28(emberInternalPath)) {
21044
21228
  throw new Error(`Ember vendor build: cannot find ${specifier} at ${emberInternalPath}. ` + `Is ember-source installed and at least 6.12?`);
21045
21229
  }
@@ -21071,7 +21255,7 @@ export const importSync = (specifier) => {
21071
21255
  if (standalonePackages.has(args.path)) {
21072
21256
  return;
21073
21257
  }
21074
- const internal = join36(cwd2, "node_modules/ember-source/dist/packages", args.path, "index.js");
21258
+ const internal = join37(cwd2, "node_modules/ember-source/dist/packages", args.path, "index.js");
21075
21259
  if (existsSync28(internal)) {
21076
21260
  return { path: internal };
21077
21261
  }
@@ -21079,16 +21263,16 @@ export const importSync = (specifier) => {
21079
21263
  });
21080
21264
  }
21081
21265
  }), buildEmberVendor = async (buildDir, cwd2 = process.cwd()) => {
21082
- const vendorDir = join36(buildDir, "ember", "vendor");
21266
+ const vendorDir = join37(buildDir, "ember", "vendor");
21083
21267
  mkdirSync13(vendorDir, { recursive: true });
21084
- const tmpDir = join36(buildDir, "_ember_vendor_tmp");
21268
+ const tmpDir = join37(buildDir, "_ember_vendor_tmp");
21085
21269
  mkdirSync13(tmpDir, { recursive: true });
21086
- const macrosShimPath = join36(tmpDir, "embroider_macros_shim.js");
21270
+ const macrosShimPath = join37(tmpDir, "embroider_macros_shim.js");
21087
21271
  await Bun.write(macrosShimPath, generateMacrosShim());
21088
21272
  const resolutions = REQUIRED_EMBER_SPECIFIERS.map((specifier) => resolveEmberSpecifier(specifier, cwd2));
21089
21273
  const entrypoints = await Promise.all(resolutions.map(async (resolution) => {
21090
21274
  const safeName = toSafeFileName5(resolution.specifier);
21091
- const entryPath = join36(tmpDir, `${safeName}.js`);
21275
+ const entryPath = join37(tmpDir, `${safeName}.js`);
21092
21276
  const source = resolution.specifier === "@embroider/macros" ? `export * from ${JSON.stringify(macrosShimPath)};
21093
21277
  ` : generateVendorEntrySource2(resolution);
21094
21278
  await Bun.write(entryPath, source);
@@ -21141,7 +21325,7 @@ __export(exports_dependencyGraph, {
21141
21325
  buildInitialDependencyGraph: () => buildInitialDependencyGraph,
21142
21326
  addFileToGraph: () => addFileToGraph
21143
21327
  });
21144
- import { existsSync as existsSync29, readFileSync as readFileSync21 } from "fs";
21328
+ import { existsSync as existsSync29, readFileSync as readFileSync23 } from "fs";
21145
21329
  var {Glob: Glob9 } = globalThis.Bun;
21146
21330
  import { resolve as resolve29 } from "path";
21147
21331
  var emptyDependencyGraph, tsTranspiler, jsTranspiler, loaderForFile = (filePath) => {
@@ -21312,15 +21496,15 @@ var emptyDependencyGraph, tsTranspiler, jsTranspiler, loaderForFile = (filePath)
21312
21496
  const lowerPath = filePath.toLowerCase();
21313
21497
  const isSvelteOrVue = lowerPath.endsWith(".svelte") || lowerPath.endsWith(".vue");
21314
21498
  if (loader === "html") {
21315
- const content = readFileSync21(filePath, "utf-8");
21499
+ const content = readFileSync23(filePath, "utf-8");
21316
21500
  return extractHtmlDependencies(filePath, content);
21317
21501
  }
21318
21502
  if (loader === "tsx" || loader === "js") {
21319
- const content = readFileSync21(filePath, "utf-8");
21503
+ const content = readFileSync23(filePath, "utf-8");
21320
21504
  return extractJsDependencies(filePath, content, loader);
21321
21505
  }
21322
21506
  if (isSvelteOrVue) {
21323
- const content = readFileSync21(filePath, "utf-8");
21507
+ const content = readFileSync23(filePath, "utf-8");
21324
21508
  return extractSvelteVueDependencies(filePath, content);
21325
21509
  }
21326
21510
  return [];
@@ -21463,7 +21647,7 @@ var init_clientManager = __esm(() => {
21463
21647
  });
21464
21648
 
21465
21649
  // src/dev/pathUtils.ts
21466
- import { existsSync as existsSync30, readdirSync as readdirSync4, readFileSync as readFileSync22 } from "fs";
21650
+ import { existsSync as existsSync30, readdirSync as readdirSync5, readFileSync as readFileSync24 } from "fs";
21467
21651
  import { dirname as dirname20, resolve as resolve31 } from "path";
21468
21652
  var STYLE_EXTENSION_PATTERN2, detectFramework = (filePath, resolved) => {
21469
21653
  if (shouldIgnorePath(filePath, resolved)) {
@@ -21545,7 +21729,7 @@ var STYLE_EXTENSION_PATTERN2, detectFramework = (filePath, resolved) => {
21545
21729
  const walk = (dir) => {
21546
21730
  let entries;
21547
21731
  try {
21548
- entries = readdirSync4(dir, { withFileTypes: true });
21732
+ entries = readdirSync5(dir, { withFileTypes: true });
21549
21733
  } catch {
21550
21734
  return;
21551
21735
  }
@@ -21563,7 +21747,7 @@ var STYLE_EXTENSION_PATTERN2, detectFramework = (filePath, resolved) => {
21563
21747
  }
21564
21748
  let source;
21565
21749
  try {
21566
- source = readFileSync22(full, "utf8");
21750
+ source = readFileSync24(full, "utf8");
21567
21751
  } catch {
21568
21752
  continue;
21569
21753
  }
@@ -21641,8 +21825,8 @@ var STYLE_EXTENSION_PATTERN2, detectFramework = (filePath, resolved) => {
21641
21825
  roots.push(abs);
21642
21826
  }
21643
21827
  try {
21644
- const { readdirSync: readdirSync5 } = __require("fs");
21645
- const entries = readdirSync5(cwd2, { withFileTypes: true });
21828
+ const { readdirSync: readdirSync6 } = __require("fs");
21829
+ const entries = readdirSync6(cwd2, { withFileTypes: true });
21646
21830
  for (const entry of entries) {
21647
21831
  if (!entry.isDirectory())
21648
21832
  continue;
@@ -21722,8 +21906,8 @@ var init_pathUtils = __esm(() => {
21722
21906
 
21723
21907
  // src/dev/fileWatcher.ts
21724
21908
  import { watch } from "fs";
21725
- import { existsSync as existsSync31, readdirSync as readdirSync5, statSync as statSync4 } from "fs";
21726
- import { dirname as dirname21, join as join37, resolve as resolve32 } from "path";
21909
+ import { existsSync as existsSync31, readdirSync as readdirSync6, statSync as statSync4 } from "fs";
21910
+ import { dirname as dirname21, join as join38, resolve as resolve32 } from "path";
21727
21911
  var safeRemoveFromGraph = (graph, fullPath) => {
21728
21912
  try {
21729
21913
  removeFileFromGraph(graph, fullPath);
@@ -21748,7 +21932,7 @@ var safeRemoveFromGraph = (graph, fullPath) => {
21748
21932
  const atomicRecoveryScan = (eventDir) => {
21749
21933
  let entries;
21750
21934
  try {
21751
- entries = readdirSync5(eventDir);
21935
+ entries = readdirSync6(eventDir);
21752
21936
  } catch {
21753
21937
  return;
21754
21938
  }
@@ -21756,7 +21940,7 @@ var safeRemoveFromGraph = (graph, fullPath) => {
21756
21940
  for (const name of entries) {
21757
21941
  if (shouldSkipFilename(name, isStylesDir))
21758
21942
  continue;
21759
- const child = join37(eventDir, name).replace(/\\/g, "/");
21943
+ const child = join38(eventDir, name).replace(/\\/g, "/");
21760
21944
  let st2;
21761
21945
  try {
21762
21946
  st2 = statSync4(child);
@@ -21781,12 +21965,12 @@ var safeRemoveFromGraph = (graph, fullPath) => {
21781
21965
  return;
21782
21966
  if (shouldSkipFilename(filename, isStylesDir)) {
21783
21967
  if (event === "rename") {
21784
- const eventDir = dirname21(join37(absolutePath, filename)).replace(/\\/g, "/");
21968
+ const eventDir = dirname21(join38(absolutePath, filename)).replace(/\\/g, "/");
21785
21969
  atomicRecoveryScan(eventDir);
21786
21970
  }
21787
21971
  return;
21788
21972
  }
21789
- const fullPath = join37(absolutePath, filename).replace(/\\/g, "/");
21973
+ const fullPath = join38(absolutePath, filename).replace(/\\/g, "/");
21790
21974
  if (shouldIgnorePath(fullPath, state.resolvedPaths)) {
21791
21975
  return;
21792
21976
  }
@@ -21938,10 +22122,10 @@ var init_assetStore = __esm(() => {
21938
22122
  });
21939
22123
 
21940
22124
  // src/dev/fileHashTracker.ts
21941
- import { readFileSync as readFileSync23 } from "fs";
22125
+ import { readFileSync as readFileSync25 } from "fs";
21942
22126
  var computeFileHash = (filePath) => {
21943
22127
  try {
21944
- const fileContent = readFileSync23(filePath);
22128
+ const fileContent = readFileSync25(filePath);
21945
22129
  return Number(Bun.hash(fileContent));
21946
22130
  } catch {
21947
22131
  return UNFOUND_INDEX;
@@ -22155,15 +22339,15 @@ __export(exports_resolveOwningComponents, {
22155
22339
  resolveDescendantsOfParent: () => resolveDescendantsOfParent,
22156
22340
  invalidateResourceIndex: () => invalidateResourceIndex
22157
22341
  });
22158
- import { readdirSync as readdirSync6, readFileSync as readFileSync24, statSync as statSync5 } from "fs";
22159
- import { dirname as dirname22, extname as extname9, join as join38, resolve as resolve36 } from "path";
22160
- import ts14 from "typescript";
22342
+ import { readdirSync as readdirSync7, readFileSync as readFileSync26, statSync as statSync5 } from "fs";
22343
+ import { dirname as dirname22, extname as extname9, join as join39, resolve as resolve36 } from "path";
22344
+ import ts15 from "typescript";
22161
22345
  var ENTITY_DECORATORS, isAngularSourceFile = (file5) => file5.endsWith(".ts") || file5.endsWith(".tsx"), walkAngularSourceFiles = (root) => {
22162
22346
  const out = [];
22163
22347
  const visit = (dir) => {
22164
22348
  let entries;
22165
22349
  try {
22166
- entries = readdirSync6(dir, { withFileTypes: true });
22350
+ entries = readdirSync7(dir, { withFileTypes: true });
22167
22351
  } catch {
22168
22352
  return;
22169
22353
  }
@@ -22171,7 +22355,7 @@ var ENTITY_DECORATORS, isAngularSourceFile = (file5) => file5.endsWith(".ts") ||
22171
22355
  if (entry.name.startsWith(".") || entry.name === "node_modules") {
22172
22356
  continue;
22173
22357
  }
22174
- const full = join38(dir, entry.name);
22358
+ const full = join39(dir, entry.name);
22175
22359
  if (entry.isDirectory()) {
22176
22360
  visit(full);
22177
22361
  } else if (entry.isFile() && isAngularSourceFile(entry.name)) {
@@ -22183,13 +22367,13 @@ var ENTITY_DECORATORS, isAngularSourceFile = (file5) => file5.endsWith(".ts") ||
22183
22367
  return out;
22184
22368
  }, getStringPropertyValue = (obj, name) => {
22185
22369
  for (const prop of obj.properties) {
22186
- if (!ts14.isPropertyAssignment(prop))
22370
+ if (!ts15.isPropertyAssignment(prop))
22187
22371
  continue;
22188
- const propName = ts14.isIdentifier(prop.name) ? prop.name.text : ts14.isStringLiteral(prop.name) ? prop.name.text : null;
22372
+ const propName = ts15.isIdentifier(prop.name) ? prop.name.text : ts15.isStringLiteral(prop.name) ? prop.name.text : null;
22189
22373
  if (propName !== name)
22190
22374
  continue;
22191
22375
  const init = prop.initializer;
22192
- if (ts14.isStringLiteral(init) || ts14.isNoSubstitutionTemplateLiteral(init)) {
22376
+ if (ts15.isStringLiteral(init) || ts15.isNoSubstitutionTemplateLiteral(init)) {
22193
22377
  return init.text;
22194
22378
  }
22195
22379
  }
@@ -22197,16 +22381,16 @@ var ENTITY_DECORATORS, isAngularSourceFile = (file5) => file5.endsWith(".ts") ||
22197
22381
  }, getStringArrayProperty = (obj, name) => {
22198
22382
  const out = [];
22199
22383
  for (const prop of obj.properties) {
22200
- if (!ts14.isPropertyAssignment(prop))
22384
+ if (!ts15.isPropertyAssignment(prop))
22201
22385
  continue;
22202
- const propName = ts14.isIdentifier(prop.name) ? prop.name.text : ts14.isStringLiteral(prop.name) ? prop.name.text : null;
22386
+ const propName = ts15.isIdentifier(prop.name) ? prop.name.text : ts15.isStringLiteral(prop.name) ? prop.name.text : null;
22203
22387
  if (propName !== name)
22204
22388
  continue;
22205
22389
  const init = prop.initializer;
22206
- if (!ts14.isArrayLiteralExpression(init))
22390
+ if (!ts15.isArrayLiteralExpression(init))
22207
22391
  continue;
22208
22392
  for (const element of init.elements) {
22209
- if (ts14.isStringLiteral(element) || ts14.isNoSubstitutionTemplateLiteral(element)) {
22393
+ if (ts15.isStringLiteral(element) || ts15.isNoSubstitutionTemplateLiteral(element)) {
22210
22394
  out.push(element.text);
22211
22395
  }
22212
22396
  }
@@ -22215,31 +22399,31 @@ var ENTITY_DECORATORS, isAngularSourceFile = (file5) => file5.endsWith(".ts") ||
22215
22399
  }, parseDecoratedClasses = (filePath) => {
22216
22400
  let source;
22217
22401
  try {
22218
- source = readFileSync24(filePath, "utf8");
22402
+ source = readFileSync26(filePath, "utf8");
22219
22403
  } catch {
22220
22404
  return [];
22221
22405
  }
22222
- const sourceFile = ts14.createSourceFile(filePath, source, ts14.ScriptTarget.ES2022, true, ts14.ScriptKind.TS);
22406
+ const sourceFile = ts15.createSourceFile(filePath, source, ts15.ScriptTarget.ES2022, true, ts15.ScriptKind.TS);
22223
22407
  const out = [];
22224
22408
  const visit = (node) => {
22225
- if (ts14.isClassDeclaration(node) && node.name) {
22226
- for (const decorator of ts14.getDecorators(node) ?? []) {
22409
+ if (ts15.isClassDeclaration(node) && node.name) {
22410
+ for (const decorator of ts15.getDecorators(node) ?? []) {
22227
22411
  const expr = decorator.expression;
22228
- if (!ts14.isCallExpression(expr))
22412
+ if (!ts15.isCallExpression(expr))
22229
22413
  continue;
22230
22414
  const fn2 = expr.expression;
22231
- if (!ts14.isIdentifier(fn2))
22415
+ if (!ts15.isIdentifier(fn2))
22232
22416
  continue;
22233
22417
  const kind = ENTITY_DECORATORS[fn2.text];
22234
22418
  if (!kind)
22235
22419
  continue;
22236
22420
  let extendsName = null;
22237
22421
  for (const heritage of node.heritageClauses ?? []) {
22238
- if (heritage.token !== ts14.SyntaxKind.ExtendsKeyword) {
22422
+ if (heritage.token !== ts15.SyntaxKind.ExtendsKeyword) {
22239
22423
  continue;
22240
22424
  }
22241
22425
  const first = heritage.types[0];
22242
- if (first && ts14.isIdentifier(first.expression)) {
22426
+ if (first && ts15.isIdentifier(first.expression)) {
22243
22427
  extendsName = first.expression.text;
22244
22428
  }
22245
22429
  break;
@@ -22252,7 +22436,7 @@ var ENTITY_DECORATORS, isAngularSourceFile = (file5) => file5.endsWith(".ts") ||
22252
22436
  extendsName
22253
22437
  };
22254
22438
  const arg = expr.arguments[0];
22255
- if (arg && ts14.isObjectLiteralExpression(arg) && kind === "component") {
22439
+ if (arg && ts15.isObjectLiteralExpression(arg) && kind === "component") {
22256
22440
  const tplUrl = getStringPropertyValue(arg, "templateUrl");
22257
22441
  if (tplUrl)
22258
22442
  entry.templateUrls.push(tplUrl);
@@ -22265,7 +22449,7 @@ var ENTITY_DECORATORS, isAngularSourceFile = (file5) => file5.endsWith(".ts") ||
22265
22449
  break;
22266
22450
  }
22267
22451
  }
22268
- ts14.forEachChild(node, visit);
22452
+ ts15.forEachChild(node, visit);
22269
22453
  };
22270
22454
  visit(sourceFile);
22271
22455
  return out;
@@ -22305,16 +22489,16 @@ var ENTITY_DECORATORS, isAngularSourceFile = (file5) => file5.endsWith(".ts") ||
22305
22489
  }, indexByRoot, resolveParentClassFile = (parentName, childFilePath, angularRoot) => {
22306
22490
  let source;
22307
22491
  try {
22308
- source = readFileSync24(childFilePath, "utf8");
22492
+ source = readFileSync26(childFilePath, "utf8");
22309
22493
  } catch {
22310
22494
  return null;
22311
22495
  }
22312
- const sf = ts14.createSourceFile(childFilePath, source, ts14.ScriptTarget.ES2022, true, ts14.ScriptKind.TS);
22496
+ const sf = ts15.createSourceFile(childFilePath, source, ts15.ScriptTarget.ES2022, true, ts15.ScriptKind.TS);
22313
22497
  const childDir = dirname22(childFilePath);
22314
22498
  for (const stmt of sf.statements) {
22315
- if (!ts14.isImportDeclaration(stmt))
22499
+ if (!ts15.isImportDeclaration(stmt))
22316
22500
  continue;
22317
- if (!ts14.isStringLiteral(stmt.moduleSpecifier))
22501
+ if (!ts15.isStringLiteral(stmt.moduleSpecifier))
22318
22502
  continue;
22319
22503
  const clause = stmt.importClause;
22320
22504
  if (!clause || clause.isTypeOnly)
@@ -22322,7 +22506,7 @@ var ENTITY_DECORATORS, isAngularSourceFile = (file5) => file5.endsWith(".ts") ||
22322
22506
  let matchesName = false;
22323
22507
  if (clause.name && clause.name.text === parentName)
22324
22508
  matchesName = true;
22325
- if (!matchesName && clause.namedBindings && ts14.isNamedImports(clause.namedBindings)) {
22509
+ if (!matchesName && clause.namedBindings && ts15.isNamedImports(clause.namedBindings)) {
22326
22510
  for (const el of clause.namedBindings.elements) {
22327
22511
  if (el.isTypeOnly)
22328
22512
  continue;
@@ -22543,8 +22727,8 @@ __export(exports_moduleServer, {
22543
22727
  createModuleServer: () => createModuleServer,
22544
22728
  SRC_URL_PREFIX: () => SRC_URL_PREFIX
22545
22729
  });
22546
- import { existsSync as existsSync32, readFileSync as readFileSync25, statSync as statSync6 } from "fs";
22547
- import { basename as basename13, dirname as dirname23, extname as extname10, join as join39, resolve as resolve37, relative as relative14 } from "path";
22730
+ import { existsSync as existsSync32, readFileSync as readFileSync27, statSync as statSync6 } from "fs";
22731
+ import { basename as basename13, dirname as dirname23, extname as extname10, join as join40, resolve as resolve37, relative as relative14 } from "path";
22548
22732
  var SRC_PREFIX = "/@src/", jsTranspiler2, tsTranspiler2, tsxTranspiler, TRANSPILABLE, ALL_EXPORTS_RE, STRING_CONTENTS_RE, preserveTypeExports = (originalSource, transpiled, valueExports) => {
22549
22733
  const codeOnly = originalSource.replace(STRING_CONTENTS_RE, '""');
22550
22734
  const allExports = [];
@@ -22616,9 +22800,9 @@ ${stubs}
22616
22800
  const subpath = isScoped ? parts.slice(2).join("/") : parts.slice(1).join("/");
22617
22801
  if (!subpath) {
22618
22802
  const pkgDir = resolve37(projectRoot, "node_modules", packageName ?? "");
22619
- const pkgJsonPath = join39(pkgDir, "package.json");
22803
+ const pkgJsonPath = join40(pkgDir, "package.json");
22620
22804
  if (existsSync32(pkgJsonPath)) {
22621
- const pkg = JSON.parse(readFileSync25(pkgJsonPath, "utf-8"));
22805
+ const pkg = JSON.parse(readFileSync27(pkgJsonPath, "utf-8"));
22622
22806
  const esmEntry = typeof pkg.module === "string" && pkg.module || typeof pkg.browser === "string" && pkg.browser;
22623
22807
  if (esmEntry) {
22624
22808
  const resolved = resolve37(pkgDir, esmEntry);
@@ -22719,7 +22903,7 @@ ${code}`;
22719
22903
  reactFastRefreshWarningEmitted = true;
22720
22904
  logWarn("React HMR is blocked: this Bun build ignores " + "`reactFastRefresh` on Bun.Transpiler, so component state " + "cannot be preserved across edits. Tracking " + "https://github.com/oven-sh/bun/pull/28312 \u2014 if it still has " + "not merged, leave a \uD83D\uDC4D on the PR so the Bun team knows it " + "is blocking you. Until then, React edits trigger a full " + "reload instead of a fast refresh.");
22721
22905
  }, transformReactFile = (filePath, projectRoot, rewriter) => {
22722
- const raw = readFileSync25(filePath, "utf-8");
22906
+ const raw = readFileSync27(filePath, "utf-8");
22723
22907
  const valueExports = tsxTranspiler.scan(raw).exports;
22724
22908
  let transpiled = reactTranspiler.transformSync(raw);
22725
22909
  transpiled = preserveTypeExports(raw, transpiled, valueExports);
@@ -22735,7 +22919,7 @@ ${transpiled}`;
22735
22919
  transpiled += buildIslandMetadataExports(raw);
22736
22920
  return rewriteImports(transpiled, filePath, projectRoot, rewriter);
22737
22921
  }, transformPlainFile = (filePath, projectRoot, rewriter, vueDir) => {
22738
- const raw = readFileSync25(filePath, "utf-8");
22922
+ const raw = readFileSync27(filePath, "utf-8");
22739
22923
  const ext = extname10(filePath);
22740
22924
  const isTS = ext === ".ts" || ext === ".tsx";
22741
22925
  const isTSX = ext === ".tsx" || ext === ".jsx";
@@ -22901,7 +23085,7 @@ ${code}`;
22901
23085
  ` + ` var __hmr_accept = function(cb) { window.__SVELTE_HMR_ACCEPT__[${JSON.stringify(moduleUrl)}] = cb; };`);
22902
23086
  return code.replace(/import\.meta\.hot\.accept\(/g, "__hmr_accept(");
22903
23087
  }, transformSvelteFile = async (filePath, projectRoot, rewriter, stylePreprocessors) => {
22904
- const raw = readFileSync25(filePath, "utf-8");
23088
+ const raw = readFileSync27(filePath, "utf-8");
22905
23089
  if (!svelteCompiler) {
22906
23090
  svelteCompiler = await import("svelte/compiler");
22907
23091
  }
@@ -22963,7 +23147,7 @@ export default __script__;`;
22963
23147
  return `${cssInjection}
22964
23148
  ${code}`;
22965
23149
  }, transformVueFile = async (filePath, projectRoot, rewriter, vueDir, stylePreprocessors) => {
22966
- const rawSource = readFileSync25(filePath, "utf-8");
23150
+ const rawSource = readFileSync27(filePath, "utf-8");
22967
23151
  const raw = addAutoRouterSetupApp(rawSource);
22968
23152
  if (!vueCompiler) {
22969
23153
  vueCompiler = await import("@vue/compiler-sfc");
@@ -23018,7 +23202,7 @@ ${code}`;
23018
23202
  }
23019
23203
  });
23020
23204
  }, handleCssRequest = (filePath) => {
23021
- const raw = readFileSync25(filePath, "utf-8");
23205
+ const raw = readFileSync27(filePath, "utf-8");
23022
23206
  const escaped = raw.replace(/\\/g, "\\\\").replace(/`/g, "\\`").replace(/\$/g, "\\$");
23023
23207
  return [
23024
23208
  `const style = document.createElement('style');`,
@@ -23677,7 +23861,7 @@ var init_simpleHTMXHMR = () => {};
23677
23861
 
23678
23862
  // src/dev/rebuildTrigger.ts
23679
23863
  import { existsSync as existsSync33, rmSync as rmSync3 } from "fs";
23680
- import { basename as basename14, dirname as dirname25, join as join40, relative as relative16, resolve as resolve41, sep as sep4 } from "path";
23864
+ import { basename as basename14, dirname as dirname25, join as join41, relative as relative16, resolve as resolve41, sep as sep4 } from "path";
23681
23865
  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) => {
23682
23866
  if (!config.tailwind)
23683
23867
  return;
@@ -23794,8 +23978,8 @@ var moduleServerPromise, getModuleServer = () => moduleServerPromise, runSequent
23794
23978
  const relJs = `${rel.slice(0, -ext[0].length)}.js`;
23795
23979
  const generatedDir = getFrameworkGeneratedDir(framework, cwd2);
23796
23980
  for (const candidate of [
23797
- join40(generatedDir, relJs),
23798
- `${join40(generatedDir, relJs)}.map`
23981
+ join41(generatedDir, relJs),
23982
+ `${join41(generatedDir, relJs)}.map`
23799
23983
  ]) {
23800
23984
  try {
23801
23985
  rmSync3(candidate, { force: true });
@@ -24657,12 +24841,12 @@ var moduleServerPromise, getModuleServer = () => moduleServerPromise, runSequent
24657
24841
  try {
24658
24842
  const { primeComponentFingerprint: primeComponentFingerprint2 } = await Promise.resolve().then(() => (init_fastHmrCompiler(), exports_fastHmrCompiler));
24659
24843
  const { readdir: readdir5 } = await import("fs/promises");
24660
- const { join: join41 } = await import("path");
24844
+ const { join: join42 } = await import("path");
24661
24845
  const walk = async (dir) => {
24662
24846
  const entries = await readdir5(dir, { withFileTypes: true });
24663
24847
  const files = [];
24664
24848
  for (const entry of entries) {
24665
- const full = join41(dir, entry.name);
24849
+ const full = join42(dir, entry.name);
24666
24850
  if (entry.isDirectory()) {
24667
24851
  files.push(...await walk(full));
24668
24852
  } else if (entry.isFile() && entry.name.endsWith(".ts") && !entry.name.endsWith(".d.ts")) {
@@ -24715,9 +24899,9 @@ var moduleServerPromise, getModuleServer = () => moduleServerPromise, runSequent
24715
24899
  const editedProvidersChain = providersImport && angularFiles.some((file5) => resolve41(file5) === resolve41(providersImport.absolutePath) || resolve41(file5).startsWith(`${resolve41(angularDir)}/`));
24716
24900
  const pageEntries = editedProvidersChain && initialPageEntries.length === 0 ? (() => {
24717
24901
  const allPages = [];
24718
- const { readdirSync: readdirSync7 } = __require("fs");
24902
+ const { readdirSync: readdirSync8 } = __require("fs");
24719
24903
  const walk = (dir) => {
24720
- for (const entry of readdirSync7(dir, {
24904
+ for (const entry of readdirSync8(dir, {
24721
24905
  withFileTypes: true
24722
24906
  })) {
24723
24907
  const full = resolve41(dir, entry.name);
@@ -25128,7 +25312,7 @@ var moduleServerPromise, getModuleServer = () => moduleServerPromise, runSequent
25128
25312
  const { vueServerPaths, vueIndexPaths, vueClientPaths, vueCssPaths } = await compileVue2(vueFiles, vueDir, true, getStyleTransformConfig(state.config));
25129
25313
  const serverEntries = [...vueServerPaths];
25130
25314
  const clientEntries = [...vueIndexPaths, ...vueClientPaths];
25131
- const cssOutDir = join40(buildDir, state.resolvedPaths.assetsDir ? basename14(state.resolvedPaths.assetsDir) : "assets", "css");
25315
+ const cssOutDir = join41(buildDir, state.resolvedPaths.assetsDir ? basename14(state.resolvedPaths.assetsDir) : "assets", "css");
25132
25316
  const { serverRoot, serverOutDir } = await computeServerOutPaths(state.resolvedPaths, "vue");
25133
25317
  const [serverResult, clientResult, cssResult] = await Promise.all([
25134
25318
  serverEntries.length > 0 ? bunBuild9({
@@ -26123,7 +26307,7 @@ __export(exports_buildDepVendor, {
26123
26307
  buildDepVendor: () => buildDepVendor
26124
26308
  });
26125
26309
  import { mkdirSync as mkdirSync14 } from "fs";
26126
- import { join as join41 } from "path";
26310
+ import { join as join42 } from "path";
26127
26311
  import { rm as rm10 } from "fs/promises";
26128
26312
  var {build: bunBuild9, Glob: Glob10 } = globalThis.Bun;
26129
26313
  var toSafeFileName6 = (specifier) => {
@@ -26177,7 +26361,7 @@ var toSafeFileName6 = (specifier) => {
26177
26361
  framework: Array.from(framework).filter(isResolvable4)
26178
26362
  };
26179
26363
  }, collectTransitiveImports = async (specs, alreadyVendored, alreadyScanned) => {
26180
- const { readFileSync: readFileSync26 } = await import("fs");
26364
+ const { readFileSync: readFileSync28 } = await import("fs");
26181
26365
  const transpiler6 = new Bun.Transpiler({ loader: "js" });
26182
26366
  const newSpecs = new Set;
26183
26367
  for (const spec of specs) {
@@ -26192,7 +26376,7 @@ var toSafeFileName6 = (specifier) => {
26192
26376
  }
26193
26377
  let content;
26194
26378
  try {
26195
- content = readFileSync26(resolved, "utf-8");
26379
+ content = readFileSync28(resolved, "utf-8");
26196
26380
  } catch {
26197
26381
  continue;
26198
26382
  }
@@ -26234,7 +26418,7 @@ var toSafeFileName6 = (specifier) => {
26234
26418
  }), buildDepVendorPass = async (specifiers, vendorDir, tmpDir) => {
26235
26419
  const entries = await Promise.all(specifiers.map(async (specifier) => {
26236
26420
  const safeName = toSafeFileName6(specifier);
26237
- const entryPath = join41(tmpDir, `${safeName}.ts`);
26421
+ const entryPath = join42(tmpDir, `${safeName}.ts`);
26238
26422
  await Bun.write(entryPath, await generateVendorEntrySource(specifier));
26239
26423
  return { entryPath, specifier };
26240
26424
  }));
@@ -26295,9 +26479,9 @@ var toSafeFileName6 = (specifier) => {
26295
26479
  const { dep: initialSpecs, framework: frameworkRoots } = await scanBareImports(directories);
26296
26480
  if (initialSpecs.length === 0 && frameworkRoots.length === 0)
26297
26481
  return {};
26298
- const vendorDir = join41(buildDir, "vendor");
26482
+ const vendorDir = join42(buildDir, "vendor");
26299
26483
  mkdirSync14(vendorDir, { recursive: true });
26300
- const tmpDir = join41(buildDir, "_dep_vendor_tmp");
26484
+ const tmpDir = join42(buildDir, "_dep_vendor_tmp");
26301
26485
  mkdirSync14(tmpDir, { recursive: true });
26302
26486
  const allSpecs = new Set(initialSpecs);
26303
26487
  const alreadyScanned = new Set;
@@ -26998,17 +27182,17 @@ __export(exports_devtoolsJson, {
26998
27182
  normalizeDevtoolsWorkspaceRoot: () => normalizeDevtoolsWorkspaceRoot,
26999
27183
  devtoolsJson: () => devtoolsJson
27000
27184
  });
27001
- import { existsSync as existsSync34, mkdirSync as mkdirSync15, readFileSync as readFileSync26, writeFileSync as writeFileSync10 } from "fs";
27002
- import { dirname as dirname26, join as join42, resolve as resolve43 } from "path";
27185
+ import { existsSync as existsSync34, mkdirSync as mkdirSync15, readFileSync as readFileSync28, writeFileSync as writeFileSync10 } from "fs";
27186
+ import { dirname as dirname26, join as join43, resolve as resolve43 } from "path";
27003
27187
  import { Elysia as Elysia3 } from "elysia";
27004
27188
  var ENDPOINT = "/.well-known/appspecific/com.chrome.devtools.json", UUID_CACHE_KEY = "__absoluteDevtoolsWorkspaceUuid", getGlobalUuid = () => Reflect.get(globalThis, UUID_CACHE_KEY), setGlobalUuid = (uuid) => {
27005
27189
  Reflect.set(globalThis, UUID_CACHE_KEY, uuid);
27006
27190
  return uuid;
27007
- }, 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) => resolve43(uuidCachePath ?? join42(buildDir, ".absolute", "chrome-devtools-workspace-uuid")), readCachedUuid = (cachePath) => {
27191
+ }, 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) => resolve43(uuidCachePath ?? join43(buildDir, ".absolute", "chrome-devtools-workspace-uuid")), readCachedUuid = (cachePath) => {
27008
27192
  if (!existsSync34(cachePath))
27009
27193
  return null;
27010
27194
  try {
27011
- const value = readFileSync26(cachePath, "utf-8").trim();
27195
+ const value = readFileSync28(cachePath, "utf-8").trim();
27012
27196
  return isUuidV4(value) ? value : null;
27013
27197
  } catch {
27014
27198
  return null;
@@ -27043,11 +27227,11 @@ var ENDPOINT = "/.well-known/appspecific/com.chrome.devtools.json", UUID_CACHE_K
27043
27227
  if (process.env.WSL_DISTRO_NAME) {
27044
27228
  const distro = process.env.WSL_DISTRO_NAME;
27045
27229
  const withoutLeadingSlash = root.replace(/^\//, "");
27046
- return join42("\\\\wsl.localhost", distro, withoutLeadingSlash).replace(/\//g, "\\");
27230
+ return join43("\\\\wsl.localhost", distro, withoutLeadingSlash).replace(/\//g, "\\");
27047
27231
  }
27048
27232
  if (process.env.DOCKER_DESKTOP && !root.startsWith("\\\\")) {
27049
27233
  const withoutLeadingSlash = root.replace(/^\//, "");
27050
- return join42("\\\\wsl.localhost", "docker-desktop-data", withoutLeadingSlash).replace(/\//g, "\\");
27234
+ return join43("\\\\wsl.localhost", "docker-desktop-data", withoutLeadingSlash).replace(/\//g, "\\");
27051
27235
  }
27052
27236
  return root;
27053
27237
  };
@@ -27278,15 +27462,15 @@ __export(exports_prerender, {
27278
27462
  prerender: () => prerender,
27279
27463
  PRERENDER_BYPASS_HEADER: () => PRERENDER_BYPASS_HEADER
27280
27464
  });
27281
- import { mkdirSync as mkdirSync16, readFileSync as readFileSync27 } from "fs";
27282
- import { join as join43 } from "path";
27465
+ import { mkdirSync as mkdirSync16, readFileSync as readFileSync29 } from "fs";
27466
+ import { join as join44 } from "path";
27283
27467
  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) => {
27284
27468
  const metaPath = htmlPath.replace(/\.html$/, ".meta");
27285
27469
  await Bun.write(metaPath, String(Date.now()));
27286
27470
  }, readTimestamp = (htmlPath) => {
27287
27471
  const metaPath = htmlPath.replace(/\.html$/, ".meta");
27288
27472
  try {
27289
- const content = readFileSync27(metaPath, "utf-8");
27473
+ const content = readFileSync29(metaPath, "utf-8");
27290
27474
  return Number(content) || 0;
27291
27475
  } catch {
27292
27476
  return 0;
@@ -27345,7 +27529,7 @@ var SERVER_OUTPUT_LIMIT = 4000, STARTUP_POLL_INTERVAL_MS = 100, DEFAULT_STARTUP_
27345
27529
  return false;
27346
27530
  const html = await res.text();
27347
27531
  const fileName = routeToFilename(route);
27348
- const filePath = join43(prerenderDir, fileName);
27532
+ const filePath = join44(prerenderDir, fileName);
27349
27533
  await Bun.write(filePath, html);
27350
27534
  await writeTimestamp(filePath);
27351
27535
  return true;
@@ -27371,13 +27555,13 @@ var SERVER_OUTPUT_LIMIT = 4000, STARTUP_POLL_INTERVAL_MS = 100, DEFAULT_STARTUP_
27371
27555
  }
27372
27556
  const html = await res.text();
27373
27557
  const fileName = routeToFilename(route);
27374
- const filePath = join43(prerenderDir, fileName);
27558
+ const filePath = join44(prerenderDir, fileName);
27375
27559
  await Bun.write(filePath, html);
27376
27560
  await writeTimestamp(filePath);
27377
27561
  result.routes.set(route, filePath);
27378
27562
  log2?.(` Pre-rendered ${route} \u2192 ${fileName} (${html.length} bytes)`);
27379
27563
  }, prerender = async (port, outDir, staticConfig, log2) => {
27380
- const prerenderDir = join43(outDir, "_prerendered");
27564
+ const prerenderDir = join44(outDir, "_prerendered");
27381
27565
  mkdirSync16(prerenderDir, { recursive: true });
27382
27566
  const baseUrl = `http://localhost:${port}`;
27383
27567
  let routes;
@@ -27479,7 +27663,7 @@ __export(exports_serverEntryWatcher, {
27479
27663
  });
27480
27664
  import { existsSync as existsSync38, statSync as statSync8, watch as watch2 } from "fs";
27481
27665
  import { createRequire as createRequire2 } from "module";
27482
- import { dirname as dirname27, join as join46, resolve as resolve46 } from "path";
27666
+ import { dirname as dirname27, join as join47, resolve as resolve46 } from "path";
27483
27667
  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 = () => {
27484
27668
  if (globalThis.__absoluteEntryWatcherStarted)
27485
27669
  return;
@@ -27567,8 +27751,8 @@ var ATOMIC_RECOVERY_WINDOW_MS = 1000, RELOAD_DEBOUNCE_MS = 80, ATOMIC_WRITE_TEMP
27567
27751
  const recoveryScan = (dir) => {
27568
27752
  let entries;
27569
27753
  try {
27570
- const { readdirSync: readdirSync8 } = __require("fs");
27571
- entries = readdirSync8(dir, { withFileTypes: true });
27754
+ const { readdirSync: readdirSync9 } = __require("fs");
27755
+ entries = readdirSync9(dir, { withFileTypes: true });
27572
27756
  } catch {
27573
27757
  return;
27574
27758
  }
@@ -27582,7 +27766,7 @@ var ATOMIC_RECOVERY_WINDOW_MS = 1000, RELOAD_DEBOUNCE_MS = 80, ATOMIC_WRITE_TEMP
27582
27766
  continue;
27583
27767
  let st2;
27584
27768
  try {
27585
- st2 = statSync8(join46(dir, entry.name));
27769
+ st2 = statSync8(join47(dir, entry.name));
27586
27770
  } catch {
27587
27771
  continue;
27588
27772
  }
@@ -28137,8 +28321,8 @@ var handleHTMXPageRequest = async (pagePath) => {
28137
28321
  };
28138
28322
  // src/core/prepare.ts
28139
28323
  init_loadConfig();
28140
- import { existsSync as existsSync36, readdirSync as readdirSync7, readFileSync as readFileSync28 } from "fs";
28141
- import { basename as basename15, join as join44, relative as relative17, resolve as resolve45 } from "path";
28324
+ import { existsSync as existsSync36, readdirSync as readdirSync8, readFileSync as readFileSync30 } from "fs";
28325
+ import { basename as basename15, join as join45, relative as relative17, resolve as resolve45 } from "path";
28142
28326
  import { Elysia as Elysia5 } from "elysia";
28143
28327
 
28144
28328
  // src/core/loadIslandRegistry.ts
@@ -28649,7 +28833,7 @@ var loadPrerenderMap = (prerenderDir) => {
28649
28833
  return map;
28650
28834
  let entries;
28651
28835
  try {
28652
- entries = readdirSync7(prerenderDir);
28836
+ entries = readdirSync8(prerenderDir);
28653
28837
  } catch {
28654
28838
  return map;
28655
28839
  }
@@ -28658,7 +28842,7 @@ var loadPrerenderMap = (prerenderDir) => {
28658
28842
  continue;
28659
28843
  const name = basename15(entry, ".html");
28660
28844
  const route = name === "index" ? "/" : `/${name}`;
28661
- map.set(route, join44(prerenderDir, entry));
28845
+ map.set(route, join45(prerenderDir, entry));
28662
28846
  }
28663
28847
  return map;
28664
28848
  };
@@ -28710,7 +28894,7 @@ var prepare = async (configOrPath) => {
28710
28894
  return result;
28711
28895
  }
28712
28896
  stepStartedAt = performance.now();
28713
- const manifest = JSON.parse(readFileSync28(`${buildDir}/manifest.json`, "utf-8"));
28897
+ const manifest = JSON.parse(readFileSync30(`${buildDir}/manifest.json`, "utf-8"));
28714
28898
  setCurrentIslandManifest(manifest);
28715
28899
  if (config.islands?.registry) {
28716
28900
  setCurrentIslandRegistry(await loadIslandRegistry(config.islands.registry));
@@ -28718,9 +28902,9 @@ var prepare = async (configOrPath) => {
28718
28902
  setCurrentPageIslandMetadata(await loadPageIslandMetadata(config));
28719
28903
  recordStep("load production manifest and island metadata", stepStartedAt);
28720
28904
  stepStartedAt = performance.now();
28721
- const conventionsPath = join44(buildDir, "conventions.json");
28905
+ const conventionsPath = join45(buildDir, "conventions.json");
28722
28906
  if (existsSync36(conventionsPath)) {
28723
- const conventions2 = JSON.parse(readFileSync28(conventionsPath, "utf-8"));
28907
+ const conventions2 = JSON.parse(readFileSync30(conventionsPath, "utf-8"));
28724
28908
  setConventions(conventions2);
28725
28909
  }
28726
28910
  recordStep("load production conventions", stepStartedAt);
@@ -28734,7 +28918,7 @@ var prepare = async (configOrPath) => {
28734
28918
  });
28735
28919
  recordStep("create static plugin", stepStartedAt);
28736
28920
  stepStartedAt = performance.now();
28737
- const prerenderDir = join44(buildDir, "_prerendered");
28921
+ const prerenderDir = join45(buildDir, "_prerendered");
28738
28922
  const prerenderMap = loadPrerenderMap(prerenderDir);
28739
28923
  recordStep("load prerender map", stepStartedAt);
28740
28924
  if (prerenderMap.size > 0) {
@@ -28792,18 +28976,18 @@ import { argv } from "process";
28792
28976
  var {env: env4 } = globalThis.Bun;
28793
28977
 
28794
28978
  // src/dev/devCert.ts
28795
- import { existsSync as existsSync37, mkdirSync as mkdirSync17, readFileSync as readFileSync29, rmSync as rmSync4 } from "fs";
28796
- import { join as join45 } from "path";
28797
- var CERT_DIR = join45(process.cwd(), ".absolutejs");
28798
- var CERT_PATH = join45(CERT_DIR, "cert.pem");
28799
- var KEY_PATH = join45(CERT_DIR, "key.pem");
28979
+ import { existsSync as existsSync37, mkdirSync as mkdirSync17, readFileSync as readFileSync31, rmSync as rmSync4 } from "fs";
28980
+ import { join as join46 } from "path";
28981
+ var CERT_DIR = join46(process.cwd(), ".absolutejs");
28982
+ var CERT_PATH = join46(CERT_DIR, "cert.pem");
28983
+ var KEY_PATH = join46(CERT_DIR, "key.pem");
28800
28984
  var CERT_VALIDITY_DAYS = 365;
28801
28985
  var devLog = (msg) => console.log(`\x1B[2m${new Date().toLocaleTimeString()}\x1B[0m \x1B[36m[dev]\x1B[0m ${msg}`);
28802
28986
  var devWarn = (msg) => console.log(`\x1B[2m${new Date().toLocaleTimeString()}\x1B[0m \x1B[33m[dev]\x1B[0m \x1B[33m${msg}\x1B[0m`);
28803
28987
  var certFilesExist = () => existsSync37(CERT_PATH) && existsSync37(KEY_PATH);
28804
28988
  var isCertExpired = () => {
28805
28989
  try {
28806
- const certPem = readFileSync29(CERT_PATH, "utf-8");
28990
+ const certPem = readFileSync31(CERT_PATH, "utf-8");
28807
28991
  const proc = Bun.spawnSync(["openssl", "x509", "-enddate", "-noout"], {
28808
28992
  stdin: new TextEncoder().encode(certPem)
28809
28993
  });
@@ -28899,8 +29083,8 @@ var loadDevCert = () => {
28899
29083
  return null;
28900
29084
  try {
28901
29085
  return {
28902
- cert: readFileSync29(paths.cert, "utf-8"),
28903
- key: readFileSync29(paths.key, "utf-8")
29086
+ cert: readFileSync31(paths.cert, "utf-8"),
29087
+ key: readFileSync31(paths.key, "utf-8")
28904
29088
  };
28905
29089
  } catch {
28906
29090
  return null;
@@ -29175,7 +29359,7 @@ var generateHeadElement = ({
29175
29359
  };
29176
29360
  // src/utils/defineEnv.ts
29177
29361
  var {env: bunEnv } = globalThis.Bun;
29178
- import { existsSync as existsSync39, readFileSync as readFileSync30 } from "fs";
29362
+ import { existsSync as existsSync39, readFileSync as readFileSync32 } from "fs";
29179
29363
  import { resolve as resolve47 } from "path";
29180
29364
 
29181
29365
  // node_modules/@sinclair/typebox/build/esm/type/guard/value.mjs
@@ -35217,13 +35401,13 @@ var checkEnvFileSecurity = (properties) => {
35217
35401
  const sensitiveKeys = Object.keys(properties).filter(isSensitive);
35218
35402
  if (sensitiveKeys.length === 0)
35219
35403
  return;
35220
- const envContent = readFileSync30(envPath, "utf-8");
35404
+ const envContent = readFileSync32(envPath, "utf-8");
35221
35405
  const presentKeys = sensitiveKeys.filter((key) => envContent.includes(`${key}=`));
35222
35406
  if (presentKeys.length === 0)
35223
35407
  return;
35224
35408
  const gitignorePath = resolve47(cwd2, ".gitignore");
35225
35409
  if (existsSync39(gitignorePath)) {
35226
- const gitignore = readFileSync30(gitignorePath, "utf-8");
35410
+ const gitignore = readFileSync32(gitignorePath, "utf-8");
35227
35411
  if (gitignore.split(`
35228
35412
  `).some((line) => line.trim() === ".env"))
35229
35413
  return;
@@ -35464,5 +35648,5 @@ export {
35464
35648
  ANGULAR_INIT_TIMEOUT_MS
35465
35649
  };
35466
35650
 
35467
- //# debugId=BC09861E4889D03064756E2164756E21
35651
+ //# debugId=17E22E0D3B1C272064756E2164756E21
35468
35652
  //# sourceMappingURL=index.js.map