@absolutejs/absolute 0.19.0-beta.1132 → 0.19.0-beta.1134

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/cli/index.js CHANGED
@@ -1158,17 +1158,234 @@ var init_devCert = __esm(() => {
1158
1158
  KEY_PATH = join5(CERT_DIR, "key.pem");
1159
1159
  });
1160
1160
 
1161
+ // src/cli/scripts/eslintChunked.ts
1162
+ var exports_eslintChunked = {};
1163
+ __export(exports_eslintChunked, {
1164
+ upstreamRef: () => upstreamRef,
1165
+ ruleSummary: () => ruleSummary,
1166
+ parseChunkedArgs: () => parseChunkedArgs,
1167
+ gitVisibleFiles: () => gitVisibleFiles,
1168
+ gitChangedFiles: () => gitChangedFiles,
1169
+ eslintChunked: () => eslintChunked
1170
+ });
1171
+ import { existsSync as existsSync6 } from "fs";
1172
+ import { relative, resolve as resolve4 } from "path";
1173
+ var DEFAULT_CHUNK_SIZE = 20, DEFAULT_SHARDS = 4, DEFAULT_CONCURRENCY = 2, DEFAULT_REPORT = ".absolutejs/lint-report.txt", CHILD_HEAP_MB = 4096, DJB2_SEED = 5381, DJB2_MULTIPLIER = 33, MS_PER_SECOND = 1000, SUMMARY_RULE_WIDTH = 60, SUMMARY_COUNT_PAD = 5, PORCELAIN_STATUS_WIDTH = 3, RENAME_ARROW = " -> ", ASCII_ESC = 27, LINTABLE_EXTENSIONS, ANSI_COLOR, stripAnsi = (text) => text.replace(ANSI_COLOR, ""), shardOf = (path, shards) => [...path].reduce((accumulator, character) => (Math.imul(accumulator, DJB2_MULTIPLIER) ^ character.charCodeAt(0)) >>> 0, DJB2_SEED) % shards, gitLines = (cmd, cwd) => Bun.spawnSync(cmd, { cwd }).stdout.toString().split(`
1174
+ `).map((line) => line.trimEnd()).filter(Boolean), applyChangedBase = (parsed, base) => {
1175
+ parsed.changedOnly = true;
1176
+ parsed.changedBase = base;
1177
+ }, porcelainPath = (line) => {
1178
+ const path = line.slice(PORCELAIN_STATUS_WIDTH);
1179
+ const [, renameTarget] = path.split(RENAME_ARROW);
1180
+ return renameTarget ?? path;
1181
+ }, matchesAnyGlob = (file, globs) => globs.some((pattern) => new Bun.Glob(pattern).match(file)), resolveLintSet = (parsed, cwd) => {
1182
+ const visible = gitVisibleFiles(cwd);
1183
+ const matched = parsed.globs.length === 0 ? visible.filter((file) => LINTABLE_EXTENSIONS.test(file)) : visible.filter((file) => matchesAnyGlob(file, parsed.globs));
1184
+ return matched.filter((file) => existsSync6(resolve4(cwd, file))).sort();
1185
+ }, buildShardChunks = (files, shards, chunkSize) => {
1186
+ const shardFiles = Array.from({ length: shards }, () => []);
1187
+ for (const file of files)
1188
+ shardFiles[shardOf(file, shards)]?.push(file);
1189
+ const shardChunks = Array.from({ length: shards }, () => []);
1190
+ for (let shard = 0;shard < shards; shard++) {
1191
+ const owned = shardFiles[shard] ?? [];
1192
+ for (let index = 0;index < owned.length; index += chunkSize)
1193
+ shardChunks[shard]?.push(owned.slice(index, index + chunkSize));
1194
+ }
1195
+ return shardChunks;
1196
+ }, runEslintProcess = async (chunk, cacheLocation, passthrough, cwd) => {
1197
+ const hasMaxWarnings = passthrough.some((arg) => arg.startsWith("--max-warnings"));
1198
+ const cacheArgs = cacheLocation === null ? [] : [
1199
+ "--cache",
1200
+ "--cache-location",
1201
+ cacheLocation,
1202
+ "--cache-strategy",
1203
+ "content"
1204
+ ];
1205
+ const proc = Bun.spawn([
1206
+ resolve4(cwd, "node_modules/.bin/eslint"),
1207
+ "--color",
1208
+ ...hasMaxWarnings ? [] : ["--max-warnings", "0"],
1209
+ ...cacheArgs,
1210
+ ...passthrough,
1211
+ ...chunk
1212
+ ], {
1213
+ cwd,
1214
+ env: {
1215
+ ...process.env,
1216
+ NODE_OPTIONS: `--max-old-space-size=${CHILD_HEAP_MB}`
1217
+ },
1218
+ stderr: "pipe",
1219
+ stdout: "pipe"
1220
+ });
1221
+ const [out, err, exitCode] = await Promise.all([
1222
+ new Response(proc.stdout).text(),
1223
+ new Response(proc.stderr).text(),
1224
+ proc.exited
1225
+ ]);
1226
+ return { combined: out + err, exitCode };
1227
+ }, retryEachFile = async (chunk, passthrough, cwd) => {
1228
+ console.warn(`ESLint could not process ${chunk.length} files together; retrying each file`);
1229
+ const results = [];
1230
+ for (const file of chunk) {
1231
+ results.push(await runEslintProcess([file], null, passthrough, cwd));
1232
+ }
1233
+ return results;
1234
+ }, wasSilentCrash = (results, chunk) => {
1235
+ const [first] = results;
1236
+ return first !== undefined && first.exitCode !== 0 && first.combined.trim().length === 0 && chunk.length > 1;
1237
+ }, eslintChunked = async (args, cwd = process.cwd()) => {
1238
+ const parsed = parseChunkedArgs(args);
1239
+ let files = resolveLintSet(parsed, cwd);
1240
+ if (parsed.changedOnly) {
1241
+ const base = parsed.changedBase ?? upstreamRef(cwd);
1242
+ const changed = gitChangedFiles(cwd, base);
1243
+ files = files.filter((file) => changed.has(file));
1244
+ }
1245
+ if (parsed.changedOnly && files.length === 0) {
1246
+ console.log("\u2713 Lint (--changed): no lintable files differ \u2014 nothing to do");
1247
+ return;
1248
+ }
1249
+ const cachePrefix = `${getCacheLocation(args)}-shard-`;
1250
+ const fingerprint = createEslintCacheFingerprint(cwd);
1251
+ for (let shard = 0;shard < parsed.shards; shard++)
1252
+ prepareEslintCache({
1253
+ cacheLocation: relative(cwd, resolve4(cwd, `${cachePrefix}${shard}`)),
1254
+ cwd,
1255
+ fingerprint
1256
+ });
1257
+ const shardChunks = buildShardChunks(files, parsed.shards, parsed.chunkSize);
1258
+ const totalChunks = shardChunks.reduce((sum, list) => sum + list.length, 0);
1259
+ const concurrency = Math.max(1, Number(process.env.LINT_CONCURRENCY) || DEFAULT_CONCURRENCY);
1260
+ console.log(`Linting ${files.length} files in ${totalChunks} chunks of ${parsed.chunkSize} ` + `(${parsed.shards} cache shards, concurrency ${concurrency}${parsed.changedOnly ? ", --changed" : ""})`);
1261
+ const startedAt = Date.now();
1262
+ let failedChunks = 0;
1263
+ let completedChunks = 0;
1264
+ let report = "";
1265
+ const runChunk = async (shard, chunk) => {
1266
+ let results = [
1267
+ await runEslintProcess(chunk, `${cachePrefix}${shard}`, parsed.passthrough, cwd)
1268
+ ];
1269
+ if (wasSilentCrash(results, chunk))
1270
+ results = await retryEachFile(chunk, parsed.passthrough, cwd);
1271
+ const combined = results.map((result) => result.combined).join("");
1272
+ const exitCode = results.some((result) => result.exitCode !== 0) ? 1 : 0;
1273
+ const silentFailure = exitCode !== 0 && combined.trim().length === 0 ? `ESLint chunk exited ${exitCode} without diagnostics (${chunk[0]} \u2026 ${chunk[chunk.length - 1]})
1274
+ ` : "";
1275
+ if (combined.trim())
1276
+ process.stdout.write(combined);
1277
+ if (silentFailure)
1278
+ process.stderr.write(silentFailure);
1279
+ report += stripAnsi(combined + silentFailure);
1280
+ completedChunks++;
1281
+ process.stdout.write(` \xB7 chunk ${completedChunks}/${totalChunks}
1282
+ `);
1283
+ if (exitCode !== 0)
1284
+ failedChunks++;
1285
+ };
1286
+ const lanes = Array.from({ length: concurrency }, () => []);
1287
+ shardChunks.forEach((chunkList, shard) => lanes[shard % concurrency]?.push(...chunkList.map((chunk) => ({ chunk, shard }))));
1288
+ await Promise.all(lanes.map((laneChunks) => laneChunks.reduce((previous, item) => previous.then(() => runChunk(item.shard, item.chunk)), Promise.resolve())));
1289
+ const summary = ruleSummary(report);
1290
+ const elapsed = ((Date.now() - startedAt) / MS_PER_SECOND).toFixed(1);
1291
+ const header = `eslint report \u2014 ${files.length} files, ${totalChunks} chunks, ${elapsed}s
1292
+ ${"=".repeat(SUMMARY_RULE_WIDTH)}
1293
+ `;
1294
+ await Bun.write(resolve4(cwd, parsed.outFile), header + report + summary);
1295
+ console.log(summary);
1296
+ console.log(`Full report written to ${parsed.outFile}`);
1297
+ if (failedChunks > 0) {
1298
+ console.error(`\u2717 Lint failed (${failedChunks}/${totalChunks} chunks) in ${elapsed}s`);
1299
+ process.exit(1);
1300
+ }
1301
+ console.log(`\u2713 Lint passed (${totalChunks} chunks) in ${elapsed}s`);
1302
+ }, gitChangedFiles = (cwd, base) => {
1303
+ const committed = base === null ? [] : gitLines([
1304
+ "git",
1305
+ "diff",
1306
+ "--name-only",
1307
+ "--diff-filter=ACMR",
1308
+ `${base}...HEAD`
1309
+ ], cwd);
1310
+ const local = gitLines(["git", "status", "--porcelain"], cwd).map(porcelainPath);
1311
+ return new Set([...committed, ...local]);
1312
+ }, gitVisibleFiles = (cwd) => gitLines(["git", "ls-files", "--cached", "--others", "--exclude-standard"], cwd), parseChunkedArgs = (args) => {
1313
+ const parsed = {
1314
+ changedBase: null,
1315
+ changedOnly: false,
1316
+ chunkSize: DEFAULT_CHUNK_SIZE,
1317
+ globs: [],
1318
+ outFile: DEFAULT_REPORT,
1319
+ passthrough: [],
1320
+ shards: DEFAULT_SHARDS
1321
+ };
1322
+ for (let index = 0;index < args.length; index++) {
1323
+ const arg = args[index];
1324
+ if (arg === undefined || arg === "--chunked")
1325
+ continue;
1326
+ if (arg === "--changed")
1327
+ parsed.changedOnly = true;
1328
+ else if (arg.startsWith("--changed="))
1329
+ applyChangedBase(parsed, arg.slice("--changed=".length));
1330
+ else if (arg === "--changed-base")
1331
+ applyChangedBase(parsed, args[++index] ?? null);
1332
+ else if (arg === "--out")
1333
+ parsed.outFile = args[++index] ?? parsed.outFile;
1334
+ else if (arg.startsWith("--out="))
1335
+ parsed.outFile = arg.slice("--out=".length);
1336
+ else if (arg === "--chunk-size")
1337
+ parsed.chunkSize = Number(args[++index]) || DEFAULT_CHUNK_SIZE;
1338
+ else if (arg === "--shards")
1339
+ parsed.shards = Number(args[++index]) || DEFAULT_SHARDS;
1340
+ else if (arg.startsWith("-"))
1341
+ parsed.passthrough.push(arg);
1342
+ else
1343
+ parsed.globs.push(arg);
1344
+ }
1345
+ return parsed;
1346
+ }, ruleSummary = (report) => {
1347
+ const ruleCounts = new Map;
1348
+ for (const match of report.matchAll(/^\s+\d+:\d+\s+(?:error|warning)\s+.*?\s+([@a-z][\w@/-]*)\s*$/gm)) {
1349
+ const [, rule] = match;
1350
+ if (rule !== undefined)
1351
+ ruleCounts.set(rule, (ruleCounts.get(rule) ?? 0) + 1);
1352
+ }
1353
+ const ranked = [...ruleCounts.entries()].sort(([, leftCount], [, rightCount]) => rightCount - leftCount);
1354
+ const total = ranked.reduce((sum, [, count]) => sum + count, 0);
1355
+ const body = ranked.map(([rule, count]) => ` ${String(count).padStart(SUMMARY_COUNT_PAD)} ${rule}`).join(`
1356
+ `);
1357
+ return `
1358
+ ${"=".repeat(SUMMARY_RULE_WIDTH)}
1359
+ BY RULE (${total} problems):
1360
+ ${body}
1361
+ `;
1362
+ }, upstreamRef = (cwd) => {
1363
+ const [ref] = gitLines([
1364
+ "git",
1365
+ "rev-parse",
1366
+ "--abbrev-ref",
1367
+ "--symbolic-full-name",
1368
+ "@{upstream}"
1369
+ ], cwd);
1370
+ return ref ?? null;
1371
+ };
1372
+ var init_eslintChunked = __esm(() => {
1373
+ init_eslint();
1374
+ LINTABLE_EXTENSIONS = /\.(?:ts|tsx|mts|cts|js|jsx|mjs|cjs|vue|svelte)$/;
1375
+ ANSI_COLOR = new RegExp(`${String.fromCharCode(ASCII_ESC)}\\[[0-9;]*m`, "g");
1376
+ });
1377
+
1161
1378
  // src/cli/scripts/eslint.ts
1162
1379
  import { createHash } from "crypto";
1163
1380
  import {
1164
- existsSync as existsSync6,
1381
+ existsSync as existsSync7,
1165
1382
  mkdirSync as mkdirSync5,
1166
1383
  readFileSync as readFileSync8,
1167
1384
  renameSync,
1168
1385
  rmSync as rmSync3,
1169
1386
  writeFileSync as writeFileSync5
1170
1387
  } from "fs";
1171
- import { dirname as dirname3, relative, resolve as resolve4 } from "path";
1388
+ import { dirname as dirname3, relative as relative2, resolve as resolve5 } from "path";
1172
1389
  var DEFAULT_CACHE_LOCATION = ".absolutejs/eslint-cache", CACHE_CONTRACT_VERSION = "1", CACHE_FINGERPRINT_SUFFIX = ".fingerprint", flagValue = (args, flag) => {
1173
1390
  const assignment = args.find((arg) => arg.startsWith(`${flag}=`));
1174
1391
  if (assignment)
@@ -1192,16 +1409,16 @@ var DEFAULT_CACHE_LOCATION = ".absolutejs/eslint-cache", CACHE_CONTRACT_VERSION
1192
1409
  return false;
1193
1410
  }, findConfigPath = (cwd = process.cwd()) => {
1194
1411
  for (const name of CONFIG_CANDIDATES) {
1195
- const candidate = resolve4(cwd, name);
1196
- if (existsSync6(candidate))
1412
+ const candidate = resolve5(cwd, name);
1413
+ if (existsSync7(candidate))
1197
1414
  return candidate;
1198
1415
  }
1199
1416
  return null;
1200
1417
  }, fingerprintLocation = (cacheLocation, cwd) => {
1201
- const absolute = resolve4(cwd, cacheLocation);
1202
- return /[\\/]$/.test(cacheLocation) ? resolve4(absolute, CACHE_FINGERPRINT_SUFFIX.slice(1)) : `${absolute}${CACHE_FINGERPRINT_SUFFIX}`;
1418
+ const absolute = resolve5(cwd, cacheLocation);
1419
+ return /[\\/]$/.test(cacheLocation) ? resolve5(absolute, CACHE_FINGERPRINT_SUFFIX.slice(1)) : `${absolute}${CACHE_FINGERPRINT_SUFFIX}`;
1203
1420
  }, addFileToFingerprint = (hash, path, label) => {
1204
- if (!existsSync6(path))
1421
+ if (!existsSync7(path))
1205
1422
  return;
1206
1423
  hash.update(label);
1207
1424
  hash.update("\x00");
@@ -1234,8 +1451,8 @@ var DEFAULT_CACHE_LOCATION = ".absolutejs/eslint-cache", CACHE_CONTRACT_VERSION
1234
1451
  return Object.keys(value);
1235
1452
  });
1236
1453
  }, lintDependencyNames = (cwd, configPath2) => {
1237
- const manifestPath = resolve4(cwd, "package.json");
1238
- if (!existsSync6(manifestPath))
1454
+ const manifestPath = resolve5(cwd, "package.json");
1455
+ if (!existsSync7(manifestPath))
1239
1456
  return configPackageNames(configPath2);
1240
1457
  try {
1241
1458
  const manifest = JSON.parse(readFileSync8(manifestPath, "utf-8"));
@@ -1249,8 +1466,8 @@ var DEFAULT_CACHE_LOCATION = ".absolutejs/eslint-cache", CACHE_CONTRACT_VERSION
1249
1466
  }, findInstalledManifest = (cwd, dependency) => {
1250
1467
  let directory = cwd;
1251
1468
  while (true) {
1252
- const candidate = resolve4(directory, "node_modules", dependency, "package.json");
1253
- if (existsSync6(candidate))
1469
+ const candidate = resolve5(directory, "node_modules", dependency, "package.json");
1470
+ if (existsSync7(candidate))
1254
1471
  return candidate;
1255
1472
  const parent = dirname3(directory);
1256
1473
  if (parent === directory)
@@ -1262,7 +1479,7 @@ var DEFAULT_CACHE_LOCATION = ".absolutejs/eslint-cache", CACHE_CONTRACT_VERSION
1262
1479
  hash.update(`absolute-eslint-cache:${CACHE_CONTRACT_VERSION}\x00`);
1263
1480
  const configPath2 = findConfigPath(cwd);
1264
1481
  if (configPath2)
1265
- addFileToFingerprint(hash, configPath2, relative(cwd, configPath2));
1482
+ addFileToFingerprint(hash, configPath2, relative2(cwd, configPath2));
1266
1483
  for (const dependency of lintDependencyNames(cwd, configPath2).sort()) {
1267
1484
  const manifestPath = findInstalledManifest(cwd, dependency);
1268
1485
  if (manifestPath)
@@ -1277,10 +1494,10 @@ var DEFAULT_CACHE_LOCATION = ".absolutejs/eslint-cache", CACHE_CONTRACT_VERSION
1277
1494
  renameSync(temporary, path);
1278
1495
  }, prepareEslintCache = (options) => {
1279
1496
  const cwd = options.cwd ?? process.cwd();
1280
- const cachePath = resolve4(cwd, options.cacheLocation);
1497
+ const cachePath = resolve5(cwd, options.cacheLocation);
1281
1498
  const metadataPath = fingerprintLocation(options.cacheLocation, cwd);
1282
1499
  const fingerprint = options.fingerprint ?? createEslintCacheFingerprint(cwd);
1283
- const prior = existsSync6(metadataPath) ? readFileSync8(metadataPath, "utf-8").trim() : null;
1500
+ const prior = existsSync7(metadataPath) ? readFileSync8(metadataPath, "utf-8").trim() : null;
1284
1501
  if (prior === fingerprint)
1285
1502
  return false;
1286
1503
  rmSync3(cachePath, { force: true, recursive: true });
@@ -1407,7 +1624,7 @@ Detected at: ${configPath2}${reset}`);
1407
1624
  return `${minutes}m ${seconds}s`;
1408
1625
  }, handleClearCache = (cacheLocation, cwd = process.cwd()) => {
1409
1626
  try {
1410
- const cachePath = resolve4(cwd, cacheLocation);
1627
+ const cachePath = resolve5(cwd, cacheLocation);
1411
1628
  const metadataPath = fingerprintLocation(cacheLocation, cwd);
1412
1629
  rmSync3(cachePath, { force: true, recursive: true });
1413
1630
  rmSync3(metadataPath, { force: true, recursive: true });
@@ -1435,7 +1652,16 @@ Detected at: ${configPath2}${reset}`);
1435
1652
  handleClearCache(cacheLocation);
1436
1653
  return;
1437
1654
  }
1438
- if (!existsSync6(resolve4("node_modules", ".bin", "eslint"))) {
1655
+ if (args.includes("--chunked")) {
1656
+ if (!existsSync7(resolve5("node_modules", ".bin", "eslint"))) {
1657
+ console.error("\x1B[31m\u2717\x1B[0m ESLint is not installed in this project. Add it (and a flat `eslint.config.*`): bun add -d eslint");
1658
+ process.exit(1);
1659
+ }
1660
+ const { eslintChunked: eslintChunked2 } = await Promise.resolve().then(() => (init_eslintChunked(), exports_eslintChunked));
1661
+ await eslintChunked2(args);
1662
+ return;
1663
+ }
1664
+ if (!existsSync7(resolve5("node_modules", ".bin", "eslint"))) {
1439
1665
  console.error("\x1B[31m\u2717\x1B[0m ESLint is not installed in this project. Add it (and a flat `eslint.config.*`): bun add -d eslint");
1440
1666
  process.exit(1);
1441
1667
  }
@@ -10472,11 +10698,11 @@ ${lanes.join(`
10472
10698
  return toComponents;
10473
10699
  }
10474
10700
  const components = toComponents.slice(start);
10475
- const relative2 = [];
10701
+ const relative3 = [];
10476
10702
  for (;start < fromComponents.length; start++) {
10477
- relative2.push("..");
10703
+ relative3.push("..");
10478
10704
  }
10479
- return ["", ...relative2, ...components];
10705
+ return ["", ...relative3, ...components];
10480
10706
  }
10481
10707
  function getRelativePathFromDirectory(fromDirectory, to, getCanonicalFileNameOrIgnoreCase) {
10482
10708
  Debug.assert(getRootLength(fromDirectory) > 0 === getRootLength(to) > 0, "Paths must either both be absolute or both be relative");
@@ -47772,9 +47998,9 @@ ${lanes.join(`
47772
47998
  if (!startsWithDirectory(target, realPathDirectory, getCanonicalFileName)) {
47773
47999
  return;
47774
48000
  }
47775
- const relative2 = getRelativePathFromDirectory(realPathDirectory, target, getCanonicalFileName);
48001
+ const relative3 = getRelativePathFromDirectory(realPathDirectory, target, getCanonicalFileName);
47776
48002
  for (const symlinkDirectory of symlinkDirectories) {
47777
- const option = resolvePath(symlinkDirectory, relative2);
48003
+ const option = resolvePath(symlinkDirectory, relative3);
47778
48004
  const result2 = cb(option, target === referenceRedirect);
47779
48005
  shouldFilterIgnoredPaths = true;
47780
48006
  if (result2)
@@ -99890,14 +100116,14 @@ ${lanes.join(`
99890
100116
  }
99891
100117
  }
99892
100118
  function createImportCallExpressionAMD(arg, containsLexicalThis) {
99893
- const resolve6 = factory2.createUniqueName("resolve");
100119
+ const resolve7 = factory2.createUniqueName("resolve");
99894
100120
  const reject = factory2.createUniqueName("reject");
99895
100121
  const parameters = [
99896
- factory2.createParameterDeclaration(undefined, undefined, resolve6),
100122
+ factory2.createParameterDeclaration(undefined, undefined, resolve7),
99897
100123
  factory2.createParameterDeclaration(undefined, undefined, reject)
99898
100124
  ];
99899
100125
  const body = factory2.createBlock([
99900
- factory2.createExpressionStatement(factory2.createCallExpression(factory2.createIdentifier("require"), undefined, [factory2.createArrayLiteralExpression([arg || factory2.createOmittedExpression()]), resolve6, reject]))
100126
+ factory2.createExpressionStatement(factory2.createCallExpression(factory2.createIdentifier("require"), undefined, [factory2.createArrayLiteralExpression([arg || factory2.createOmittedExpression()]), resolve7, reject]))
99901
100127
  ]);
99902
100128
  let func;
99903
100129
  if (languageVersion >= 2) {
@@ -170072,8 +170298,8 @@ Additional information: BADCLIENT: Bad error code, ${badCode} not found in range
170072
170298
  installPackage(options) {
170073
170299
  this.packageInstallId++;
170074
170300
  const request = { kind: "installPackage", ...options, id: this.packageInstallId };
170075
- const promise = new Promise((resolve6, reject) => {
170076
- (this.packageInstalledPromise ?? (this.packageInstalledPromise = /* @__PURE__ */ new Map)).set(this.packageInstallId, { resolve: resolve6, reject });
170301
+ const promise = new Promise((resolve7, reject) => {
170302
+ (this.packageInstalledPromise ?? (this.packageInstalledPromise = /* @__PURE__ */ new Map)).set(this.packageInstallId, { resolve: resolve7, reject });
170077
170303
  });
170078
170304
  this.installer.send(request);
170079
170305
  return promise;
@@ -170347,7 +170573,7 @@ var isRecord = (value) => typeof value === "object" && value !== null, getIsland
170347
170573
  var init_islands = () => {};
170348
170574
 
170349
170575
  // src/build/islandEntries.ts
170350
- import { dirname as dirname4, extname, join as join8, relative as relative2, resolve as resolve6 } from "path";
170576
+ import { dirname as dirname4, extname, join as join8, relative as relative3, resolve as resolve7 } from "path";
170351
170577
  var import_typescript, frameworks, isRecord2 = (value) => typeof value === "object" && value !== null, resolveRegistryExport = (mod) => {
170352
170578
  if (isRecord2(mod.islandRegistry))
170353
170579
  return mod.islandRegistry;
@@ -170358,7 +170584,7 @@ var import_typescript, frameworks, isRecord2 = (value) => typeof value === "obje
170358
170584
  if (sourcePath.startsWith("file://")) {
170359
170585
  return new URL(sourcePath).pathname;
170360
170586
  }
170361
- return resolve6(dirname4(registryPath), sourcePath);
170587
+ return resolve7(dirname4(registryPath), sourcePath);
170362
170588
  }, getObjectPropertyName = (name) => {
170363
170589
  if (import_typescript.default.isIdentifier(name) || import_typescript.default.isStringLiteral(name)) {
170364
170590
  return name.text;
@@ -170515,7 +170741,7 @@ var import_typescript, frameworks, isRecord2 = (value) => typeof value === "obje
170515
170741
  registry
170516
170742
  };
170517
170743
  }, loadIslandRegistryBuildInfo = async (registryPath) => {
170518
- const resolvedRegistryPath = resolve6(registryPath);
170744
+ const resolvedRegistryPath = resolve7(registryPath);
170519
170745
  const registrySource = Bun.file(resolvedRegistryPath);
170520
170746
  const registrySourceText = await registrySource.text();
170521
170747
  const parsedInfo = parseIslandRegistryBuildInfo(registrySourceText, resolvedRegistryPath);
@@ -171341,7 +171567,7 @@ var init_maskLiterals = __esm(() => {
171341
171567
  // src/build/nativeRewrite.ts
171342
171568
  import { dlopen, FFIType, ptr } from "bun:ffi";
171343
171569
  import { platform as platform4, arch as arch3 } from "os";
171344
- import { resolve as resolve7 } from "path";
171570
+ import { resolve as resolve8 } from "path";
171345
171571
  var ffiDefinition, nativeLib = null, loadNative = () => {
171346
171572
  if (nativeLib !== null)
171347
171573
  return nativeLib;
@@ -171359,7 +171585,7 @@ var ffiDefinition, nativeLib = null, loadNative = () => {
171359
171585
  if (!libPath)
171360
171586
  return null;
171361
171587
  try {
171362
- const fullPath = resolve7(import.meta.dir, "../../native/packages", libPath);
171588
+ const fullPath = resolve8(import.meta.dir, "../../native/packages", libPath);
171363
171589
  const lib = dlopen(fullPath, ffiDefinition);
171364
171590
  nativeLib = lib.symbols;
171365
171591
  return nativeLib;
@@ -171633,7 +171859,7 @@ var ANSI_REGEX, trySetRawMode2 = () => {
171633
171859
  return value;
171634
171860
  }
171635
171861
  return `${value}${" ".repeat(width - plainLength)}`;
171636
- }, stripAnsi = (value) => value.replace(ANSI_REGEX, ""), truncateText = (value, width) => {
171862
+ }, stripAnsi2 = (value) => value.replace(ANSI_REGEX, ""), truncateText = (value, width) => {
171637
171863
  if (width <= 0) {
171638
171864
  return "";
171639
171865
  }
@@ -171671,11 +171897,11 @@ var exports_build = {};
171671
171897
  __export(exports_build, {
171672
171898
  build: () => build
171673
171899
  });
171674
- import { existsSync as existsSync10, readdirSync as readdirSync3, readFileSync as readFileSync13 } from "fs";
171675
- import { join as join12, resolve as resolve10 } from "path";
171900
+ import { existsSync as existsSync11, readdirSync as readdirSync3, readFileSync as readFileSync13 } from "fs";
171901
+ import { join as join12, resolve as resolve11 } from "path";
171676
171902
  var PROFILE_TOP = 15, PROFILE_COL = 8, FRAMEWORK_KEYS, cliTag3 = (color, message) => `\x1B[2m${formatTimestamp()}\x1B[0m ${color}[cli]\x1B[0m ${color}${message}\x1B[0m`, printProfile = (buildDir) => {
171677
171903
  const traceDir = join12(buildDir, ".absolute-trace");
171678
- if (!existsSync10(traceDir))
171904
+ if (!existsSync11(traceDir))
171679
171905
  return;
171680
171906
  const files = readdirSync3(traceDir).filter((file) => file.endsWith(".json")).sort();
171681
171907
  const latest = files[files.length - 1];
@@ -171718,7 +171944,7 @@ var PROFILE_TOP = 15, PROFILE_COL = 8, FRAMEWORK_KEYS, cliTag3 = (color, message
171718
171944
  }
171719
171945
  return resolveBuildModule2(remaining);
171720
171946
  }, build = async (outdir, configPath2, profile = false) => {
171721
- const resolvedOutdir = resolve10(outdir ?? "build");
171947
+ const resolvedOutdir = resolve11(outdir ?? "build");
171722
171948
  const buildStart = performance.now();
171723
171949
  if (profile)
171724
171950
  process.env.ABSOLUTE_BUILD_TRACE = "1";
@@ -171728,8 +171954,8 @@ var PROFILE_TOP = 15, PROFILE_COL = 8, FRAMEWORK_KEYS, cliTag3 = (color, message
171728
171954
  buildConfig.mode = "production";
171729
171955
  try {
171730
171956
  const buildApp = await resolveBuildModule2([
171731
- resolve10(import.meta.dir, "..", "..", "core", "build"),
171732
- resolve10(import.meta.dir, "..", "build")
171957
+ resolve11(import.meta.dir, "..", "..", "core", "build"),
171958
+ resolve11(import.meta.dir, "..", "build")
171733
171959
  ]);
171734
171960
  if (!buildApp)
171735
171961
  throw new Error("Could not locate build module");
@@ -171774,7 +172000,7 @@ import {
171774
172000
  verify
171775
172001
  } from "crypto";
171776
172002
  import {
171777
- existsSync as existsSync11,
172003
+ existsSync as existsSync12,
171778
172004
  lstatSync,
171779
172005
  mkdirSync as mkdirSync8,
171780
172006
  mkdtempSync,
@@ -171785,7 +172011,7 @@ import {
171785
172011
  writeFileSync as writeFileSync7
171786
172012
  } from "fs";
171787
172013
  import { tmpdir as tmpdir2 } from "os";
171788
- import { delimiter, dirname as dirname5, relative as relative3, resolve as resolve11 } from "path";
172014
+ import { delimiter, dirname as dirname5, relative as relative4, resolve as resolve12 } from "path";
171789
172015
  var DEFAULT_PROOF_LOCATION = ".absolutejs/lint-proof.json", PROOF_CONTRACT_VERSION = 1, FLAG_NOT_FOUND = -1, runGit = (args, options) => {
171790
172016
  const proc = Bun.spawnSync(["git", ...args], {
171791
172017
  cwd: options.cwd,
@@ -171798,8 +172024,8 @@ var DEFAULT_PROOF_LOCATION = ".absolutejs/lint-proof.json", PROOF_CONTRACT_VERSI
171798
172024
  throw new Error(detail || `git ${args.join(" ")} failed`);
171799
172025
  }
171800
172026
  return proc.stdout.toString().trim();
171801
- }, gitRoot = (cwd) => resolve11(runGit(["rev-parse", "--show-toplevel"], { cwd })), isInside = (parent, candidate) => {
171802
- const path = relative3(parent, candidate);
172027
+ }, gitRoot = (cwd) => resolve12(runGit(["rev-parse", "--show-toplevel"], { cwd })), isInside = (parent, candidate) => {
172028
+ const path = relative4(parent, candidate);
171803
172029
  return path === "" || !path.startsWith("../") && path !== "..";
171804
172030
  }, attestationPayload = (proof) => Buffer.from([
171805
172031
  "absolute-lint-proof-attestation:1",
@@ -171811,7 +172037,7 @@ var DEFAULT_PROOF_LOCATION = ".absolutejs/lint-proof.json", PROOF_CONTRACT_VERSI
171811
172037
  sourceTree: proof.sourceTree
171812
172038
  })
171813
172039
  ].join("\x00")), publicKeyId = (key) => createHash2("sha256").update(key.export({ format: "der", type: "spki" })).digest("hex"), readEd25519PrivateKey = (cwd, location) => {
171814
- const path = resolve11(cwd, location);
172040
+ const path = resolve12(cwd, location);
171815
172041
  if (isInside(realpathSync(gitRoot(cwd)), realpathSync(path))) {
171816
172042
  throw new Error("lint proof signing key must live outside the Git working tree");
171817
172043
  }
@@ -171821,7 +172047,7 @@ var DEFAULT_PROOF_LOCATION = ".absolutejs/lint-proof.json", PROOF_CONTRACT_VERSI
171821
172047
  }
171822
172048
  return key;
171823
172049
  }, readEd25519PublicKey = (cwd, location) => {
171824
- const key = createPublicKey(readFileSync14(resolve11(cwd, location)));
172050
+ const key = createPublicKey(readFileSync14(resolve12(cwd, location)));
171825
172051
  if (key.asymmetricKeyType !== "ed25519") {
171826
172052
  throw new Error("trusted lint proof key must be an Ed25519 public key");
171827
172053
  }
@@ -171836,17 +172062,17 @@ var DEFAULT_PROOF_LOCATION = ".absolutejs/lint-proof.json", PROOF_CONTRACT_VERSI
171836
172062
  }
171837
172063
  }, createLintSourceTree = (cwd = process.cwd(), proofLocation = DEFAULT_PROOF_LOCATION) => {
171838
172064
  const root = gitRoot(cwd);
171839
- const proofPath = resolve11(cwd, proofLocation);
171840
- const proofRelative = relative3(root, proofPath).replaceAll("\\", "/");
172065
+ const proofPath = resolve12(cwd, proofLocation);
172066
+ const proofRelative = relative4(root, proofPath).replaceAll("\\", "/");
171841
172067
  if (proofRelative === ".." || proofRelative.startsWith("../") || proofRelative === "") {
171842
172068
  throw new Error("lint proof must live inside the Git working tree");
171843
172069
  }
171844
- const temporaryDirectory = mkdtempSync(resolve11(tmpdir2(), "absolute-lint-proof-"));
171845
- const temporaryIndex = resolve11(temporaryDirectory, "index");
171846
- const temporaryObjects = resolve11(temporaryDirectory, "objects");
172070
+ const temporaryDirectory = mkdtempSync(resolve12(tmpdir2(), "absolute-lint-proof-"));
172071
+ const temporaryIndex = resolve12(temporaryDirectory, "index");
172072
+ const temporaryObjects = resolve12(temporaryDirectory, "objects");
171847
172073
  mkdirSync8(temporaryObjects, { recursive: true });
171848
172074
  const repositoryObjectsPath = runGit(["rev-parse", "--git-path", "objects"], { cwd: root });
171849
- const repositoryObjects = resolve11(root, repositoryObjectsPath);
172075
+ const repositoryObjects = resolve12(root, repositoryObjectsPath);
171850
172076
  const existingAlternates = process.env.GIT_ALTERNATE_OBJECT_DIRECTORIES?.trim();
171851
172077
  const env3 = {
171852
172078
  GIT_ALTERNATE_OBJECT_DIRECTORIES: [
@@ -171862,7 +172088,7 @@ var DEFAULT_PROOF_LOCATION = ".absolutejs/lint-proof.json", PROOF_CONTRACT_VERSI
171862
172088
  if (!path || path === proofRelative)
171863
172089
  return false;
171864
172090
  try {
171865
- lstatSync(resolve11(root, path));
172091
+ lstatSync(resolve12(root, path));
171866
172092
  return true;
171867
172093
  } catch {
171868
172094
  return false;
@@ -171886,7 +172112,7 @@ var DEFAULT_PROOF_LOCATION = ".absolutejs/lint-proof.json", PROOF_CONTRACT_VERSI
171886
172112
  }, writeLintProof = (command, options = {}) => {
171887
172113
  const cwd = options.cwd ?? process.cwd();
171888
172114
  const proofLocation = options.proofLocation ?? DEFAULT_PROOF_LOCATION;
171889
- const path = resolve11(cwd, proofLocation);
172115
+ const path = resolve12(cwd, proofLocation);
171890
172116
  const temporary = `${path}.${process.pid}.tmp`;
171891
172117
  const proof = createLintProof(command, { cwd, proofLocation });
171892
172118
  if (options.signingKeyLocation) {
@@ -171942,8 +172168,8 @@ var DEFAULT_PROOF_LOCATION = ".absolutejs/lint-proof.json", PROOF_CONTRACT_VERSI
171942
172168
  }, verifyLintProof = (command, options = {}) => {
171943
172169
  const cwd = options.cwd ?? process.cwd();
171944
172170
  const proofLocation = options.proofLocation ?? DEFAULT_PROOF_LOCATION;
171945
- const path = resolve11(cwd, proofLocation);
171946
- if (!existsSync11(path))
172171
+ const path = resolve12(cwd, proofLocation);
172172
+ if (!existsSync12(path))
171947
172173
  return { reason: `missing lint proof: ${proofLocation}`, valid: false };
171948
172174
  let proof;
171949
172175
  try {
@@ -172057,7 +172283,7 @@ var init_lintProof = __esm(() => {
172057
172283
  // src/build/scanConventions.ts
172058
172284
  import { basename as basename4 } from "path";
172059
172285
  var {Glob: Glob2 } = globalThis.Bun;
172060
- import { existsSync as existsSync12 } from "fs";
172286
+ import { existsSync as existsSync13 } from "fs";
172061
172287
  var CONVENTION_RE, classifyFile = (file, pageFiles, defaults, pages) => {
172062
172288
  const fileName = basename4(file);
172063
172289
  const match = CONVENTION_RE.exec(fileName);
@@ -172082,7 +172308,7 @@ var CONVENTION_RE, classifyFile = (file, pageFiles, defaults, pages) => {
172082
172308
  else if (kind === "loading")
172083
172309
  pages[pageName].loading = file;
172084
172310
  }, scanConventions = async (pagesDir, pattern) => {
172085
- if (!existsSync12(pagesDir)) {
172311
+ if (!existsSync13(pagesDir)) {
172086
172312
  const pageFiles2 = [];
172087
172313
  return { conventions: undefined, pageFiles: pageFiles2 };
172088
172314
  }
@@ -172117,8 +172343,8 @@ var exports_ls = {};
172117
172343
  __export(exports_ls, {
172118
172344
  runLs: () => runLs
172119
172345
  });
172120
- import { existsSync as existsSync13, readFileSync as readFileSync15, statSync } from "fs";
172121
- import { basename as basename5, extname as extname3, join as join13, relative as relative4 } from "path";
172346
+ import { existsSync as existsSync14, readFileSync as readFileSync15, statSync } from "fs";
172347
+ import { basename as basename5, extname as extname3, join as join13, relative as relative5 } from "path";
172122
172348
  var DEFAULT_BUILD_DIR = "build", LABEL_ORDER, ARTIFACT_SUFFIXES, FRAMEWORK_FIELDS, readStringField = (source, key) => {
172123
172349
  const value = Reflect.get(source, key);
172124
172350
  return typeof value === "string" ? value : undefined;
@@ -172133,7 +172359,7 @@ var DEFAULT_BUILD_DIR = "build", LABEL_ORDER, ARTIFACT_SUFFIXES, FRAMEWORK_FIELD
172133
172359
  } catch {
172134
172360
  return null;
172135
172361
  }
172136
- }, relativeOrSelf = (target) => relative4(process.cwd(), target) || target, configCandidates = (raw) => isWorkspaceConfig(raw) ? Object.values(raw).map((service) => ({
172362
+ }, relativeOrSelf = (target) => relative5(process.cwd(), target) || target, configCandidates = (raw) => isWorkspaceConfig(raw) ? Object.values(raw).map((service) => ({
172137
172363
  baseDir: readStringField(service, "cwd") ?? ".",
172138
172364
  source: service
172139
172365
  })) : [{ baseDir: ".", source: raw }], specsFor = (source, baseDir) => FRAMEWORK_FIELDS.flatMap((framework) => {
@@ -172168,10 +172394,10 @@ var DEFAULT_BUILD_DIR = "build", LABEL_ORDER, ARTIFACT_SUFFIXES, FRAMEWORK_FIELD
172168
172394
  return pages ? [{ label, pages: sortPages(pages) }] : [];
172169
172395
  });
172170
172396
  }, resolveDiskPath = (buildDir, value) => {
172171
- if (existsSync13(value))
172397
+ if (existsSync14(value))
172172
172398
  return value;
172173
172399
  const underBuild = join13(buildDir, value);
172174
- if (existsSync13(underBuild))
172400
+ if (existsSync14(underBuild))
172175
172401
  return underBuild;
172176
172402
  return join13(process.cwd(), value);
172177
172403
  }, fileSize = (diskPath) => {
@@ -172299,7 +172525,7 @@ ${colors.dim}${frameworkCount} ${frameworkCount === 1 ? "framework" : "framework
172299
172525
  }
172300
172526
  const sizesDir = resolveSizesDir(args, candidates);
172301
172527
  const manifestPath = join13(sizesDir, "manifest.json");
172302
- if (!existsSync13(manifestPath)) {
172528
+ if (!existsSync14(manifestPath)) {
172303
172529
  printDim(`No build at ${relativeOrSelf(manifestPath)}. Run \`absolute build\` first, or pass \`--outdir <dir>\`.`);
172304
172530
  return;
172305
172531
  }
@@ -172361,7 +172587,7 @@ var init_formatBytes = __esm(() => {
172361
172587
  });
172362
172588
 
172363
172589
  // src/cli/discoverInstances.ts
172364
- var MS_PER_SECOND = 1000, isJsRuntime = (command) => /\b(bun|deno|node)\b/.test(command), TOOLING_RE, isToolingProcess = (command) => TOOLING_RE.test(command), untrackedName = (command) => {
172590
+ var MS_PER_SECOND2 = 1000, isJsRuntime = (command) => /\b(bun|deno|node)\b/.test(command), TOOLING_RE, isToolingProcess = (command) => TOOLING_RE.test(command), untrackedName = (command) => {
172365
172591
  const entry = command.split(/\s+/).find((token) => /\.(cjs|js|mjs|ts)$/.test(token));
172366
172592
  if (entry === undefined)
172367
172593
  return "untracked";
@@ -172385,7 +172611,7 @@ var MS_PER_SECOND = 1000, isJsRuntime = (command) => /\b(bun|deno|node)\b/.test(
172385
172611
  port: listener.port,
172386
172612
  ppid: 0,
172387
172613
  source: "untracked",
172388
- startedAt: new Date(Date.now() - listener.etimes * MS_PER_SECOND).toISOString()
172614
+ startedAt: new Date(Date.now() - listener.etimes * MS_PER_SECOND2).toISOString()
172389
172615
  }), compareInstances2 = (left, right) => {
172390
172616
  const leftPort = left.port ?? Number.MAX_SAFE_INTEGER;
172391
172617
  const rightPort = right.port ?? Number.MAX_SAFE_INTEGER;
@@ -172423,21 +172649,21 @@ var init_discoverInstances = __esm(() => {
172423
172649
  import { createConnection as createConnection2 } from "net";
172424
172650
  var {$: $4 } = globalThis.Bun;
172425
172651
  var displayHost = (host) => host === "0.0.0.0" || host === "::" ? "localhost" : host, probePort = (host, port) => {
172426
- const { promise, resolve: resolve12 } = Promise.withResolvers();
172652
+ const { promise, resolve: resolve13 } = Promise.withResolvers();
172427
172653
  const socket = createConnection2({ host: displayHost(host), port });
172428
172654
  const timeout = setTimeout(() => {
172429
172655
  socket.destroy();
172430
- resolve12(false);
172656
+ resolve13(false);
172431
172657
  }, INSTANCE_PROBE_TIMEOUT_MS);
172432
172658
  socket.once("connect", () => {
172433
172659
  clearTimeout(timeout);
172434
172660
  socket.end();
172435
- resolve12(true);
172661
+ resolve13(true);
172436
172662
  });
172437
172663
  socket.once("error", () => {
172438
172664
  clearTimeout(timeout);
172439
172665
  socket.destroy();
172440
- resolve12(false);
172666
+ resolve13(false);
172441
172667
  });
172442
172668
  return promise;
172443
172669
  }, probeStatus = async (record) => {
@@ -172938,7 +173164,7 @@ var TUI_HEADERS, STATUS_INDEX = 8, URL_INDEX = 9, MEM_HISTORY_MAX = 12, SPARK_CH
172938
173164
  if (lines.length === 0) {
172939
173165
  return [`${colors.dim}No output yet.${colors.reset}`];
172940
173166
  }
172941
- return lines.map((line) => truncateText(stripAnsi(line), Math.max(1, width - 1)));
173167
+ return lines.map((line) => truncateText(stripAnsi2(line), Math.max(1, width - 1)));
172942
173168
  };
172943
173169
  const pushLogRows = (rows, width, logHeight) => {
172944
173170
  const contentLines = logContentLines(width);
@@ -173149,7 +173375,7 @@ var exports_heapDiff = {};
173149
173375
  __export(exports_heapDiff, {
173150
173376
  runHeapDiff: () => runHeapDiff
173151
173377
  });
173152
- import { existsSync as existsSync14, readFileSync as readFileSync16 } from "fs";
173378
+ import { existsSync as existsSync15, readFileSync as readFileSync16 } from "fs";
173153
173379
  var TOP = 15, STRING_TYPES, aggregate = (path) => {
173154
173380
  const data = JSON.parse(readFileSync16(path, "utf-8"));
173155
173381
  const { nodes, strings } = data;
@@ -173180,7 +173406,7 @@ var TOP = 15, STRING_TYPES, aggregate = (path) => {
173180
173406
  return;
173181
173407
  }
173182
173408
  for (const path of [beforePath, afterPath]) {
173183
- if (existsSync14(path))
173409
+ if (existsSync15(path))
173184
173410
  continue;
173185
173411
  process.stdout.write(`${colors.red}No such file: ${path}${colors.reset}
173186
173412
  `);
@@ -173300,16 +173526,16 @@ var isRecord4 = (value) => typeof value === "object" && value !== null && !Array
173300
173526
 
173301
173527
  // src/cli/config/schema/fromType.ts
173302
173528
  import {
173303
- existsSync as existsSync15,
173529
+ existsSync as existsSync16,
173304
173530
  mkdirSync as mkdirSync9,
173305
173531
  readFileSync as readFileSync17,
173306
173532
  statSync as statSync2,
173307
173533
  writeFileSync as writeFileSync8
173308
173534
  } from "fs";
173309
- import { resolve as resolve12 } from "path";
173535
+ import { resolve as resolve13 } from "path";
173310
173536
  var import_typescript4, VIRTUAL_NAME = "__absolute_type_introspect__.ts", MAX_DEPTH = 6, isFrameworkRepo = (cwd) => {
173311
173537
  try {
173312
- const pkg = JSON.parse(readFileSync17(resolve12(cwd, "package.json"), "utf-8"));
173538
+ const pkg = JSON.parse(readFileSync17(resolve13(cwd, "package.json"), "utf-8"));
173313
173539
  return pkg?.name === "@absolutejs/absolute";
173314
173540
  } catch {
173315
173541
  return false;
@@ -173330,10 +173556,10 @@ var import_typescript4, VIRTUAL_NAME = "__absolute_type_introspect__.ts", MAX_DE
173330
173556
  };
173331
173557
  }, SCHEMA_VERSION = 1, packageVersion = (cwd, specifier) => {
173332
173558
  const candidates = specifier === "@absolutejs/absolute" ? [
173333
- resolve12(cwd, "node_modules", "@absolutejs", "absolute", "package.json"),
173334
- resolve12(cwd, "package.json")
173559
+ resolve13(cwd, "node_modules", "@absolutejs", "absolute", "package.json"),
173560
+ resolve13(cwd, "package.json")
173335
173561
  ] : [
173336
- resolve12(cwd, "node_modules", ...specifier.split("/"), "package.json")
173562
+ resolve13(cwd, "node_modules", ...specifier.split("/"), "package.json")
173337
173563
  ];
173338
173564
  for (const candidate of candidates) {
173339
173565
  try {
@@ -173348,13 +173574,13 @@ var import_typescript4, VIRTUAL_NAME = "__absolute_type_introspect__.ts", MAX_DE
173348
173574
  if (local) {
173349
173575
  const file = typeName === "PackageJson" ? "packageJson.ts" : "build.ts";
173350
173576
  try {
173351
- signature += `:${statSync2(resolve12(cwd, "types", file)).mtimeMs}`;
173577
+ signature += `:${statSync2(resolve13(cwd, "types", file)).mtimeMs}`;
173352
173578
  } catch {}
173353
173579
  }
173354
173580
  return signature;
173355
173581
  }, cacheSlug = (specifier) => specifier.replace("@", "").split("/").join("-"), cacheFile = (cwd, typeName, specifier) => {
173356
173582
  const name = specifier === "@absolutejs/absolute" ? typeName : `${typeName}.${cacheSlug(specifier)}`;
173357
- return resolve12(cwd, ".absolutejs", "config-schema", `${name}.json`);
173583
+ return resolve13(cwd, ".absolutejs", "config-schema", `${name}.json`);
173358
173584
  }, readDiskCache = (cwd, typeName, signature, specifier) => {
173359
173585
  try {
173360
173586
  const cached = JSON.parse(readFileSync17(cacheFile(cwd, typeName, specifier), "utf-8"));
@@ -173365,7 +173591,7 @@ var import_typescript4, VIRTUAL_NAME = "__absolute_type_introspect__.ts", MAX_DE
173365
173591
  return null;
173366
173592
  }, writeDiskCache = (cwd, typeName, signature, fields, specifier) => {
173367
173593
  try {
173368
- mkdirSync9(resolve12(cwd, ".absolutejs", "config-schema"), {
173594
+ mkdirSync9(resolve13(cwd, ".absolutejs", "config-schema"), {
173369
173595
  recursive: true
173370
173596
  });
173371
173597
  writeFileSync8(cacheFile(cwd, typeName, specifier), JSON.stringify({ fields, signature }));
@@ -173452,7 +173678,7 @@ var import_typescript4, VIRTUAL_NAME = "__absolute_type_introspect__.ts", MAX_DE
173452
173678
  }
173453
173679
  return opaque();
173454
173680
  }, introspectFrom = (cwd, specifier, typeName, options, exclude) => {
173455
- const virtualPath = resolve12(cwd, VIRTUAL_NAME);
173681
+ const virtualPath = resolve13(cwd, VIRTUAL_NAME);
173456
173682
  const source = `import type { ${typeName} } from '${specifier}';
173457
173683
  declare const value: ${typeName};
173458
173684
  export { value };
@@ -173495,7 +173721,7 @@ export { value };
173495
173721
  const cached = cache.get(cacheKey);
173496
173722
  if (cached)
173497
173723
  return cached;
173498
- const local = specifier === "@absolutejs/absolute" && isFrameworkRepo(cwd) && existsSync15(resolve12(cwd, "types/index.ts"));
173724
+ const local = specifier === "@absolutejs/absolute" && isFrameworkRepo(cwd) && existsSync16(resolve13(cwd, "types/index.ts"));
173499
173725
  const signature = cacheSignature(cwd, typeName, local, specifier);
173500
173726
  const fromDisk = readDiskCache(cwd, typeName, signature, specifier);
173501
173727
  if (fromDisk) {
@@ -173523,16 +173749,16 @@ var init_fromType = __esm(() => {
173523
173749
  });
173524
173750
 
173525
173751
  // src/cli/config/absolute/resolveAbsoluteConfig.ts
173526
- import { existsSync as existsSync16, readFileSync as readFileSync18 } from "fs";
173527
- import { resolve as resolve13 } from "path";
173752
+ import { existsSync as existsSync17, readFileSync as readFileSync18 } from "fs";
173753
+ import { resolve as resolve14 } from "path";
173528
173754
  var import_typescript5, CONFIG_CANDIDATES2, RUNTIME_FIELDS, findConfigPath2 = (cwd, override) => {
173529
173755
  if (override) {
173530
- const resolved = resolve13(cwd, override);
173531
- return existsSync16(resolved) ? resolved : null;
173756
+ const resolved = resolve14(cwd, override);
173757
+ return existsSync17(resolved) ? resolved : null;
173532
173758
  }
173533
173759
  for (const name of CONFIG_CANDIDATES2) {
173534
- const candidate = resolve13(cwd, name);
173535
- if (existsSync16(candidate))
173760
+ const candidate = resolve14(cwd, name);
173761
+ if (existsSync17(candidate))
173536
173762
  return candidate;
173537
173763
  }
173538
173764
  return null;
@@ -173765,8 +173991,8 @@ var init_frameworks = __esm(() => {
173765
173991
  });
173766
173992
 
173767
173993
  // src/cli/generate/context.ts
173768
- import { dirname as dirname6, isAbsolute, join as join14, relative as relative5, resolve as resolve14 } from "path";
173769
- var asString = (value) => typeof value === "string" ? value : undefined, isRecord5 = (value) => typeof value === "object" && value !== null, resolveDir = (cwd, value) => isAbsolute(value) ? value : resolve14(cwd, value), resolveStylesDir = (cwd, config) => {
173994
+ import { dirname as dirname6, isAbsolute, join as join14, relative as relative6, resolve as resolve15 } from "path";
173995
+ var asString = (value) => typeof value === "string" ? value : undefined, isRecord5 = (value) => typeof value === "object" && value !== null, resolveDir = (cwd, value) => isAbsolute(value) ? value : resolve15(cwd, value), resolveStylesDir = (cwd, config) => {
173770
173996
  const styles = config.stylesConfig;
173771
173997
  if (typeof styles === "string")
173772
173998
  return resolveDir(cwd, styles);
@@ -173775,10 +174001,10 @@ var asString = (value) => typeof value === "string" ? value : undefined, isRecor
173775
174001
  if (indexes)
173776
174002
  return resolveDir(cwd, indexes);
173777
174003
  }
173778
- return resolve14(cwd, "src/frontend/styles/indexes");
174004
+ return resolve15(cwd, "src/frontend/styles/indexes");
173779
174005
  }, configuredFrameworks = (project) => FRAMEWORK_KEYS2.filter((key) => project.frameworkDirs[key] !== undefined), frontendRootFor = (project, framework) => {
173780
174006
  const dir = project.frameworkDirs[framework];
173781
- return dir ? dirname6(dir) : resolve14(project.cwd, "src/frontend");
174007
+ return dir ? dirname6(dir) : resolve15(project.cwd, "src/frontend");
173782
174008
  }, resolveProject = async (cwd, configOverride) => {
173783
174009
  const loaded = await loadConfig(configOverride);
173784
174010
  const config = isRecord5(loaded) ? loaded : {};
@@ -173829,7 +174055,7 @@ var asString = (value) => typeof value === "string" ? value : undefined, isRecor
173829
174055
  ok: false
173830
174056
  };
173831
174057
  }, sharedDirFor = (project, framework) => join14(frontendRootFor(project, framework), "shared"), toModuleSpecifier = (fromDir, toFileNoExt) => {
173832
- const rel = relative5(fromDir, toFileNoExt).split("\\").join("/");
174058
+ const rel = relative6(fromDir, toFileNoExt).split("\\").join("/");
173833
174059
  return rel.startsWith(".") ? rel : `./${rel}`;
173834
174060
  };
173835
174061
  var init_context = __esm(() => {
@@ -173856,7 +174082,7 @@ var emptyOutcome = () => ({
173856
174082
  });
173857
174083
 
173858
174084
  // src/cli/generate/routeWiring.ts
173859
- import { existsSync as existsSync17, readFileSync as readFileSync19, readdirSync as readdirSync4, writeFileSync as writeFileSync9 } from "fs";
174085
+ import { existsSync as existsSync18, readFileSync as readFileSync19, readdirSync as readdirSync4, writeFileSync as writeFileSync9 } from "fs";
173860
174086
  import { dirname as dirname7, join as join15 } from "path";
173861
174087
  var import_typescript6, DEFAULT_SEPARATOR = `
173862
174088
  `, BOUNDARY_USE, applyEdits = (text, edits) => {
@@ -174005,13 +174231,13 @@ ${newLines.join(`
174005
174231
  return lines.join(`
174006
174232
  `);
174007
174233
  }, hasChain = (path) => {
174008
- if (!existsSync17(path))
174234
+ if (!existsSync18(path))
174009
174235
  return false;
174010
174236
  const sourceFile = parse2(path, readFileSync19(path, "utf-8"));
174011
174237
  const found = findElysiaNew(sourceFile);
174012
174238
  return found !== null;
174013
174239
  }, firstChainFile = (pluginsDir) => {
174014
- if (!existsSync17(pluginsDir))
174240
+ if (!existsSync18(pluginsDir))
174015
174241
  return null;
174016
174242
  for (const name of readdirSync4(pluginsDir)) {
174017
174243
  if (!name.endsWith(".ts"))
@@ -174115,7 +174341,7 @@ var init_routeWiring = __esm(() => {
174115
174341
  });
174116
174342
 
174117
174343
  // src/cli/generate/generateApi.ts
174118
- import { existsSync as existsSync18, mkdirSync as mkdirSync10, writeFileSync as writeFileSync10 } from "fs";
174344
+ import { existsSync as existsSync19, mkdirSync as mkdirSync10, writeFileSync as writeFileSync10 } from "fs";
174119
174345
  import { dirname as dirname8, join as join16 } from "path";
174120
174346
  var apiPluginTemplate = (pluginName, base) => `import { Elysia } from 'elysia';
174121
174347
 
@@ -174130,7 +174356,7 @@ export const ${pluginName} = new Elysia()
174130
174356
  const outcome = { ...emptyOutcome(), route: base };
174131
174357
  const pluginsDir = join16(dirname8(project.serverEntry), "plugins");
174132
174358
  const fileAbs = join16(pluginsDir, `${pluginName}.ts`);
174133
- if (existsSync18(fileAbs)) {
174359
+ if (existsSync19(fileAbs)) {
174134
174360
  outcome.notes.push(`${pluginName} already exists at ${fileAbs} \u2014 skipped.`);
174135
174361
  return outcome;
174136
174362
  }
@@ -174203,7 +174429,7 @@ var init_componentTemplates = __esm(() => {
174203
174429
  });
174204
174430
 
174205
174431
  // src/cli/generate/generateComponent.ts
174206
- import { existsSync as existsSync19, mkdirSync as mkdirSync11, writeFileSync as writeFileSync11 } from "fs";
174432
+ import { existsSync as existsSync20, mkdirSync as mkdirSync11, writeFileSync as writeFileSync11 } from "fs";
174207
174433
  import { dirname as dirname9, join as join17 } from "path";
174208
174434
  var generateComponent = (project, framework, rawName) => {
174209
174435
  const def = frameworks2[framework];
@@ -174216,7 +174442,7 @@ var generateComponent = (project, framework, rawName) => {
174216
174442
  return outcome;
174217
174443
  }
174218
174444
  const fileAbs = join17(frameworkDir, "components", def.componentFile({ kebab, pascal }));
174219
- if (existsSync19(fileAbs)) {
174445
+ if (existsSync20(fileAbs)) {
174220
174446
  outcome.notes.push(`${pascal} already exists at ${fileAbs} \u2014 skipped.`);
174221
174447
  return outcome;
174222
174448
  }
@@ -174235,7 +174461,7 @@ var init_generateComponent = __esm(() => {
174235
174461
  });
174236
174462
 
174237
174463
  // src/cli/generate/cssStrategy.ts
174238
- import { existsSync as existsSync20 } from "fs";
174464
+ import { existsSync as existsSync21 } from "fs";
174239
174465
  import { join as join18 } from "path";
174240
174466
  var import_typescript7, CSS_SUFFIX = "CSS", SHARED_MIN_USES = 2, DEFAULT_CSS = `main {
174241
174467
  margin: 0 auto;
@@ -174283,7 +174509,7 @@ var import_typescript7, CSS_SUFFIX = "CSS", SHARED_MIN_USES = 2, DEFAULT_CSS = `
174283
174509
  return {
174284
174510
  assetKey: sharedKey,
174285
174511
  contents: DEFAULT_CSS,
174286
- create: !existsSync20(cssFileAbs2),
174512
+ create: !existsSync21(cssFileAbs2),
174287
174513
  cssFileAbs: cssFileAbs2,
174288
174514
  shared: true
174289
174515
  };
@@ -174292,7 +174518,7 @@ var import_typescript7, CSS_SUFFIX = "CSS", SHARED_MIN_USES = 2, DEFAULT_CSS = `
174292
174518
  return {
174293
174519
  assetKey: `${pascal}${CSS_SUFFIX}`,
174294
174520
  contents: DEFAULT_CSS,
174295
- create: !existsSync20(cssFileAbs),
174521
+ create: !existsSync21(cssFileAbs),
174296
174522
  cssFileAbs,
174297
174523
  shared: false
174298
174524
  };
@@ -174302,7 +174528,7 @@ var init_cssStrategy = __esm(() => {
174302
174528
  });
174303
174529
 
174304
174530
  // src/cli/generate/navData.ts
174305
- import { existsSync as existsSync21, mkdirSync as mkdirSync12, readFileSync as readFileSync20, writeFileSync as writeFileSync12 } from "fs";
174531
+ import { existsSync as existsSync22, mkdirSync as mkdirSync12, readFileSync as readFileSync20, writeFileSync as writeFileSync12 } from "fs";
174306
174532
  import { dirname as dirname10 } from "path";
174307
174533
  var import_typescript8, NAV_DATA_TEMPLATE = `type NavItem = {
174308
174534
  href: string;
@@ -174341,7 +174567,7 @@ export const navData: NavItem[] = [];
174341
174567
  }
174342
174568
  return items;
174343
174569
  }, readNavItems = (navDataPath) => {
174344
- if (!existsSync21(navDataPath))
174570
+ if (!existsSync22(navDataPath))
174345
174571
  return [];
174346
174572
  const text = readFileSync20(navDataPath, "utf-8");
174347
174573
  const sourceFile = import_typescript8.default.createSourceFile(navDataPath, text, import_typescript8.default.ScriptTarget.Latest, true);
@@ -174378,7 +174604,7 @@ ${indentOf(text, array.getStart(sourceFile))}`;
174378
174604
  ${indent}${entry}`;
174379
174605
  return text.slice(0, insertAt) + insertion + text.slice(insertAt);
174380
174606
  }, upsertNavItem = (navDataPath, item) => {
174381
- const created = !existsSync21(navDataPath);
174607
+ const created = !existsSync22(navDataPath);
174382
174608
  if (created) {
174383
174609
  mkdirSync12(dirname10(navDataPath), { recursive: true });
174384
174610
  writeFileSync12(navDataPath, NAV_DATA_TEMPLATE, "utf-8");
@@ -174546,20 +174772,20 @@ var init_pageTemplates = __esm(() => {
174546
174772
 
174547
174773
  // src/cli/generate/generatePage.ts
174548
174774
  import {
174549
- existsSync as existsSync22,
174775
+ existsSync as existsSync23,
174550
174776
  mkdirSync as mkdirSync13,
174551
174777
  readFileSync as readFileSync21,
174552
174778
  readdirSync as readdirSync5,
174553
174779
  writeFileSync as writeFileSync13
174554
174780
  } from "fs";
174555
- import { dirname as dirname11, join as join19, relative as relative6 } from "path";
174781
+ import { dirname as dirname11, join as join19, relative as relative7 } from "path";
174556
174782
  var writeNew = (path, contents) => {
174557
174783
  mkdirSync13(dirname11(path), { recursive: true });
174558
174784
  writeFileSync13(path, contents, "utf-8");
174559
174785
  }, toHref = (fromDir, toFile) => {
174560
- const rel = relative6(fromDir, toFile).split("\\").join("/");
174786
+ const rel = relative7(fromDir, toFile).split("\\").join("/");
174561
174787
  return rel.startsWith(".") ? rel : `./${rel}`;
174562
- }, staticPageFiles = (project) => ["html", "htmx"].map((key) => project.frameworkDirs[key]).map((dir) => dir ? join19(dir, "pages") : null).filter((pagesDir) => pagesDir !== null && existsSync22(pagesDir)).flatMap((pagesDir) => readdirSync5(pagesDir).filter((name) => name.endsWith(".html")).map((name) => join19(pagesDir, name))), resyncPage = (file, items) => {
174788
+ }, staticPageFiles = (project) => ["html", "htmx"].map((key) => project.frameworkDirs[key]).map((dir) => dir ? join19(dir, "pages") : null).filter((pagesDir) => pagesDir !== null && existsSync23(pagesDir)).flatMap((pagesDir) => readdirSync5(pagesDir).filter((name) => name.endsWith(".html")).map((name) => join19(pagesDir, name))), resyncPage = (file, items) => {
174563
174789
  const html = readFileSync21(file, "utf-8");
174564
174790
  const synced = syncStaticNav(html, items);
174565
174791
  if (synced === null || synced === html)
@@ -174588,7 +174814,7 @@ var writeNew = (path, contents) => {
174588
174814
  return outcome;
174589
174815
  }
174590
174816
  const pageFileAbs = join19(frameworkDir, "pages", def.pageFile({ kebab, pascal }));
174591
- if (existsSync22(pageFileAbs)) {
174817
+ if (existsSync23(pageFileAbs)) {
174592
174818
  outcome.notes.push(`${pascal} already exists at ${pageFileAbs} \u2014 skipped.`);
174593
174819
  return outcome;
174594
174820
  }
@@ -174649,7 +174875,7 @@ var exports_generate = {};
174649
174875
  __export(exports_generate, {
174650
174876
  runGenerate: () => runGenerate
174651
174877
  });
174652
- import { relative as relative7 } from "path";
174878
+ import { relative as relative8 } from "path";
174653
174879
  var SUBCOMMANDS, write = (text) => process.stdout.write(`${text}
174654
174880
  `), fail = (message) => {
174655
174881
  process.stdout.write(`${colors.red}${message}${colors.reset}
@@ -174681,7 +174907,7 @@ var SUBCOMMANDS, write = (text) => process.stdout.write(`${text}
174681
174907
  return;
174682
174908
  write(` ${colors.dim}${label}${colors.reset}`);
174683
174909
  for (const path of paths)
174684
- write(` ${relative7(cwd, path)}`);
174910
+ write(` ${relative8(cwd, path)}`);
174685
174911
  }, printSummary = (title, outcome, cwd) => {
174686
174912
  for (const note of outcome.notes) {
174687
174913
  write(`${colors.yellow}!${colors.reset} ${note}`);
@@ -174974,11 +175200,11 @@ var init_catalog = __esm(() => {
174974
175200
  });
174975
175201
 
174976
175202
  // src/cli/integrations/addPlugin.ts
174977
- import { existsSync as existsSync23, readFileSync as readFileSync23 } from "fs";
175203
+ import { existsSync as existsSync24, readFileSync as readFileSync23 } from "fs";
174978
175204
  import { join as join20 } from "path";
174979
175205
  var isRecord6 = (value) => typeof value === "object" && value !== null && !Array.isArray(value), readPackageJson = (cwd) => {
174980
175206
  const path = join20(cwd, "package.json");
174981
- if (!existsSync23(path))
175207
+ if (!existsSync24(path))
174982
175208
  return null;
174983
175209
  try {
174984
175210
  const parsed = JSON.parse(readFileSync23(path, "utf-8"));
@@ -175472,16 +175698,16 @@ var init_authCatalog = __esm(() => {
175472
175698
  });
175473
175699
 
175474
175700
  // src/cli/config/auth/resolveAuthSettings.ts
175475
- import { existsSync as existsSync24, readFileSync as readFileSync24 } from "fs";
175476
- import { resolve as resolve15 } from "path";
175701
+ import { existsSync as existsSync25, readFileSync as readFileSync24 } from "fs";
175702
+ import { resolve as resolve16 } from "path";
175477
175703
  var import_typescript10, AUTH_PACKAGE = "@absolutejs/auth", CONFIG_CANDIDATES3, findAuthSettingsPath = (cwd, override) => {
175478
175704
  if (override) {
175479
- const resolved = resolve15(cwd, override);
175480
- return existsSync24(resolved) ? resolved : null;
175705
+ const resolved = resolve16(cwd, override);
175706
+ return existsSync25(resolved) ? resolved : null;
175481
175707
  }
175482
175708
  for (const name of CONFIG_CANDIDATES3) {
175483
- const candidate = resolve15(cwd, name);
175484
- if (existsSync24(candidate))
175709
+ const candidate = resolve16(cwd, name);
175710
+ if (existsSync25(candidate))
175485
175711
  return candidate;
175486
175712
  }
175487
175713
  return null;
@@ -175577,10 +175803,10 @@ var init_resolveAuthSettings = __esm(() => {
175577
175803
  });
175578
175804
 
175579
175805
  // src/cli/config/auth/resolveAuthState.ts
175580
- import { existsSync as existsSync25, readdirSync as readdirSync6, readFileSync as readFileSync25 } from "fs";
175581
- import { join as join21, relative as relative8, resolve as resolve16 } from "path";
175806
+ import { existsSync as existsSync26, readdirSync as readdirSync6, readFileSync as readFileSync25 } from "fs";
175807
+ import { join as join21, relative as relative9, resolve as resolve17 } from "path";
175582
175808
  var import_typescript11, AUTH_PACKAGE2 = "@absolutejs/auth", REPO_URL = "https://github.com/absolutejs/absolute-auth", NPM_URL = "https://www.npmjs.com/package/@absolutejs/auth", SKIP_DIRS, MAX_FILES = 4000, SETUP_EXPORTS, isRecord7 = (value) => typeof value === "object" && value !== null && !Array.isArray(value), readJson = (path) => {
175583
- if (!existsSync25(path))
175809
+ if (!existsSync26(path))
175584
175810
  return null;
175585
175811
  try {
175586
175812
  const parsed = JSON.parse(readFileSync25(path, "utf-8"));
@@ -175709,7 +175935,7 @@ var import_typescript11, AUTH_PACKAGE2 = "@absolutejs/auth", REPO_URL = "https:/
175709
175935
  scaffoldable: isScaffoldableFeature(feature.id)
175710
175936
  })), resolveAuthState = (cwd) => {
175711
175937
  const installedVersion = installedVersionFor(cwd);
175712
- const root = existsSync25(join21(cwd, "src")) ? join21(cwd, "src") : cwd;
175938
+ const root = existsSync26(join21(cwd, "src")) ? join21(cwd, "src") : cwd;
175713
175939
  let match = null;
175714
175940
  let setupPath = null;
175715
175941
  for (const file of candidateFiles(root)) {
@@ -175717,7 +175943,7 @@ var import_typescript11, AUTH_PACKAGE2 = "@absolutejs/auth", REPO_URL = "https:/
175717
175943
  if (found === null)
175718
175944
  continue;
175719
175945
  match = found;
175720
- setupPath = relative8(cwd, resolve16(file));
175946
+ setupPath = relative9(cwd, resolve17(file));
175721
175947
  break;
175722
175948
  }
175723
175949
  const keys = match?.keys ?? new Set;
@@ -175755,8 +175981,8 @@ var init_resolveAuthState = __esm(() => {
175755
175981
  });
175756
175982
 
175757
175983
  // src/cli/config/auth/scaffoldAuthFeature.ts
175758
- import { existsSync as existsSync26, writeFileSync as writeFileSync15 } from "fs";
175759
- import { dirname as dirname12, join as join22, relative as relative9, resolve as resolve17 } from "path";
175984
+ import { existsSync as existsSync27, writeFileSync as writeFileSync15 } from "fs";
175985
+ import { dirname as dirname12, join as join22, relative as relative10, resolve as resolve18 } from "path";
175760
175986
  var renderScaffold = (scaffold) => {
175761
175987
  const importNames = [...scaffold.imports, `type ${scaffold.typeName}`];
175762
175988
  const importLine = `import { ${importNames.join(", ")} } from '@absolutejs/auth';`;
@@ -175781,9 +176007,9 @@ ${body}
175781
176007
  }, targetDir = (cwd) => {
175782
176008
  const { setupPath } = resolveAuthState(cwd);
175783
176009
  if (setupPath)
175784
- return dirname12(resolve17(cwd, setupPath));
176010
+ return dirname12(resolve18(cwd, setupPath));
175785
176011
  const src = join22(cwd, "src");
175786
- return existsSync26(src) ? src : cwd;
176012
+ return existsSync27(src) ? src : cwd;
175787
176013
  }, spreadFor = (scaffold) => `import { ${scaffold.exportName} } from './${scaffold.exportName}';
175788
176014
  // add to your auth() call:
175789
176015
  ${scaffold.configKey}: ${scaffold.exportName}`, failure2 = (message) => ({
@@ -175797,8 +176023,8 @@ ${scaffold.configKey}: ${scaffold.exportName}`, failure2 = (message) => ({
175797
176023
  if (!scaffold)
175798
176024
  return failure2(`Unknown auth feature "${id}".`);
175799
176025
  const filePath = join22(targetDir(cwd), `${scaffold.exportName}.ts`);
175800
- const relPath = relative9(cwd, filePath);
175801
- if (existsSync26(filePath)) {
176026
+ const relPath = relative10(cwd, filePath);
176027
+ if (existsSync27(filePath)) {
175802
176028
  return {
175803
176029
  created: null,
175804
176030
  installed: false,
@@ -175825,13 +176051,13 @@ var init_scaffoldAuthFeature = __esm(() => {
175825
176051
  });
175826
176052
 
175827
176053
  // src/cli/htmx/install.ts
175828
- import { existsSync as existsSync27, mkdirSync as mkdirSync14, readFileSync as readFileSync26, writeFileSync as writeFileSync16 } from "fs";
176054
+ import { existsSync as existsSync28, mkdirSync as mkdirSync14, readFileSync as readFileSync26, writeFileSync as writeFileSync16 } from "fs";
175829
176055
  import { join as join23 } from "path";
175830
176056
  var VENDORED_HTMX_VERSION = "2.0.6", vendoredHtmxFile = () => [
175831
176057
  join23(import.meta.dir, "htmx.min.js"),
175832
176058
  join23(import.meta.dir, "htmx", "htmx.min.js"),
175833
176059
  join23(import.meta.dir, "..", "htmx", "htmx.min.js")
175834
- ].find((path) => existsSync27(path)) ?? null, detectHtmxVersion = (content) => {
176060
+ ].find((path) => existsSync28(path)) ?? null, detectHtmxVersion = (content) => {
175835
176061
  const match = content.match(/version:"([0-9.]+)"/);
175836
176062
  return match ? match[1] : null;
175837
176063
  }, fetchHtmx = async (version2) => {
@@ -175843,7 +176069,7 @@ var VENDORED_HTMX_VERSION = "2.0.6", vendoredHtmxFile = () => [
175843
176069
  return response.text();
175844
176070
  }, installedHtmxVersion = (htmxDir) => {
175845
176071
  const file = join23(htmxDir, "htmx.min.js");
175846
- if (!existsSync27(file))
176072
+ if (!existsSync28(file))
175847
176073
  return null;
175848
176074
  return detectHtmxVersion(readFileSync26(file, "utf-8"));
175849
176075
  }, readVendoredHtmx = () => {
@@ -175862,7 +176088,7 @@ var exports_add = {};
175862
176088
  __export(exports_add, {
175863
176089
  runAdd: () => runAdd
175864
176090
  });
175865
- import { dirname as dirname13, join as join24, relative as relative10 } from "path";
176091
+ import { dirname as dirname13, join as join24, relative as relative11 } from "path";
175866
176092
  var write2 = (text) => process.stdout.write(`${text}
175867
176093
  `), fail2 = (message) => {
175868
176094
  process.stdout.write(`${colors.red}${message}${colors.reset}
@@ -175873,7 +176099,7 @@ var write2 = (text) => process.stdout.write(`${text}
175873
176099
  return;
175874
176100
  write2(` ${colors.dim}${label}${colors.reset}`);
175875
176101
  for (const path of paths)
175876
- write2(` ${relative10(cwd, path)}`);
176102
+ write2(` ${relative11(cwd, path)}`);
175877
176103
  }, frontendRoot = (project, cwd) => {
175878
176104
  const [firstKey] = configuredFrameworks(project);
175879
176105
  const firstDir = firstKey ? project.frameworkDirs[firstKey] : undefined;
@@ -175942,7 +176168,7 @@ var write2 = (text) => process.stdout.write(`${text}
175942
176168
  return;
175943
176169
  }
175944
176170
  const dirAbs = join24(frontendRoot(project, cwd), framework);
175945
- const dirRel = `./${relative10(cwd, dirAbs).split("\\").join("/")}`;
176171
+ const dirRel = `./${relative11(cwd, dirAbs).split("\\").join("/")}`;
175946
176172
  let depNote = "Skipped dependency install (--no-install).";
175947
176173
  if (!noInstall) {
175948
176174
  write2(`${colors.dim}Installing ${frameworks2[framework].label} dependencies\u2026${colors.reset}`);
@@ -176011,8 +176237,8 @@ var exports_analyze = {};
176011
176237
  __export(exports_analyze, {
176012
176238
  runAnalyze: () => runAnalyze
176013
176239
  });
176014
- import { existsSync as existsSync28, readFileSync as readFileSync27, statSync as statSync3, writeFileSync as writeFileSync17 } from "fs";
176015
- import { join as join25, resolve as resolve18 } from "path";
176240
+ import { existsSync as existsSync29, readFileSync as readFileSync27, statSync as statSync3, writeFileSync as writeFileSync17 } from "fs";
176241
+ import { join as join25, resolve as resolve19 } from "path";
176016
176242
  var BASELINE_FILE = ".absolute-size-baseline.json", TOP_CHANGES = 12, CATEGORY_WIDTH = 16, SIZE_WIDTH = 12, CHANGE_WIDTH = 10, CATEGORY_ORDER, categoryOf = (key) => {
176017
176243
  if (key.startsWith("Island"))
176018
176244
  return "Islands";
@@ -176033,7 +176259,7 @@ var BASELINE_FILE = ".absolute-size-baseline.json", TOP_CHANGES = 12, CATEGORY_W
176033
176259
  }
176034
176260
  }, readSizes = (manifestDir) => {
176035
176261
  const manifestPath = join25(manifestDir, "manifest.json");
176036
- if (!existsSync28(manifestPath))
176262
+ if (!existsSync29(manifestPath))
176037
176263
  return null;
176038
176264
  const manifest = JSON.parse(readFileSync27(manifestPath, "utf-8"));
176039
176265
  const sizes = {};
@@ -176043,7 +176269,7 @@ var BASELINE_FILE = ".absolute-size-baseline.json", TOP_CHANGES = 12, CATEGORY_W
176043
176269
  return sizes;
176044
176270
  }, readBaseline = (cwd) => {
176045
176271
  const path = join25(cwd, BASELINE_FILE);
176046
- if (!existsSync28(path))
176272
+ if (!existsSync29(path))
176047
176273
  return null;
176048
176274
  try {
176049
176275
  const parsed = JSON.parse(readFileSync27(path, "utf-8"));
@@ -176124,7 +176350,7 @@ var BASELINE_FILE = ".absolute-size-baseline.json", TOP_CHANGES = 12, CATEGORY_W
176124
176350
  const config = await loadConfig(configIndex >= 0 ? args[configIndex + 1] : undefined);
176125
176351
  const outdirIndex = args.indexOf("--outdir");
176126
176352
  const outdir = outdirIndex >= 0 ? args[outdirIndex + 1] : config.buildDirectory;
176127
- const sizes = readSizes(resolve18(cwd, outdir ?? "build"));
176353
+ const sizes = readSizes(resolve19(cwd, outdir ?? "build"));
176128
176354
  if (sizes === null) {
176129
176355
  process.stdout.write(`${colors.dim}No build found. Run \`absolute build\` first.${colors.reset}
176130
176356
  `);
@@ -176377,8 +176603,8 @@ var exports_remove = {};
176377
176603
  __export(exports_remove, {
176378
176604
  runRemove: () => runRemove
176379
176605
  });
176380
- import { existsSync as existsSync29, readFileSync as readFileSync28 } from "fs";
176381
- import { relative as relative11 } from "path";
176606
+ import { existsSync as existsSync30, readFileSync as readFileSync28 } from "fs";
176607
+ import { relative as relative12 } from "path";
176382
176608
  var write3 = (text) => process.stdout.write(`${text}
176383
176609
  `), fail3 = (message) => {
176384
176610
  process.stdout.write(`${colors.red}${message}${colors.reset}
@@ -176388,7 +176614,7 @@ var write3 = (text) => process.stdout.write(`${text}
176388
176614
  const candidates = [findRoutingFile(serverEntry), serverEntry];
176389
176615
  const seen = new Set;
176390
176616
  return candidates.filter((file) => {
176391
- if (file === null || seen.has(file) || !existsSync29(file))
176617
+ if (file === null || seen.has(file) || !existsSync30(file))
176392
176618
  return false;
176393
176619
  seen.add(file);
176394
176620
  return readFileSync28(file, "utf-8").includes(handler);
@@ -176427,10 +176653,10 @@ var write3 = (text) => process.stdout.write(`${text}
176427
176653
  }
176428
176654
  write3(`${colors.green}\u2713${colors.reset} Removed ${framework}Directory from absolute.config.ts
176429
176655
  `);
176430
- write3(` ${colors.dim}Kept${colors.reset} ${relative11(cwd, frameworkDir)} \u2014 delete its source manually if no longer needed.`);
176656
+ write3(` ${colors.dim}Kept${colors.reset} ${relative12(cwd, frameworkDir)} \u2014 delete its source manually if no longer needed.`);
176431
176657
  const refs = referencingFiles(project.serverEntry, HANDLER_NAME[framework]);
176432
176658
  for (const file of refs) {
176433
- write3(` ${colors.yellow}Still references${colors.reset} ${relative11(cwd, file)} (calls ${HANDLER_NAME[framework]})`);
176659
+ write3(` ${colors.yellow}Still references${colors.reset} ${relative12(cwd, file)} (calls ${HANDLER_NAME[framework]})`);
176434
176660
  }
176435
176661
  const deps = frameworkDependencyNames(framework);
176436
176662
  if (prune && deps.length > 0) {
@@ -176518,10 +176744,10 @@ __export(exports_env, {
176518
176744
  runEnv: () => runEnv,
176519
176745
  collectEnvVars: () => collectEnvVars
176520
176746
  });
176521
- import { existsSync as existsSync30, readFileSync as readFileSync29 } from "fs";
176747
+ import { existsSync as existsSync31, readFileSync as readFileSync29 } from "fs";
176522
176748
  import { join as join26 } from "path";
176523
176749
  var {env: env3, Glob: Glob3 } = globalThis.Bun;
176524
- var EXTENSIONS = "ts,tsx,js,jsx,mjs,cjs,svelte,vue", STATUS_WIDTH2, keysInFile = (text) => [...text.matchAll(/getEnv\(\s*['"]([^'"]+)['"]\s*\)/g)].map((match) => match[1]).filter((key) => key !== undefined), scanPatterns = () => existsSync30(join26(process.cwd(), "src")) ? [`src/**/*.{${EXTENSIONS}}`] : [`*.{${EXTENSIONS}}`], scanEnvUsage = async () => {
176750
+ var EXTENSIONS = "ts,tsx,js,jsx,mjs,cjs,svelte,vue", STATUS_WIDTH2, keysInFile = (text) => [...text.matchAll(/getEnv\(\s*['"]([^'"]+)['"]\s*\)/g)].map((match) => match[1]).filter((key) => key !== undefined), scanPatterns = () => existsSync31(join26(process.cwd(), "src")) ? [`src/**/*.{${EXTENSIONS}}`] : [`*.{${EXTENSIONS}}`], scanEnvUsage = async () => {
176525
176751
  const scans = scanPatterns().map((pattern) => Array.fromAsync(new Glob3(pattern).scan({ cwd: process.cwd() })));
176526
176752
  const files = (await Promise.all(scans)).flat();
176527
176753
  const usage = new Map;
@@ -176587,7 +176813,7 @@ __export(exports_db, {
176587
176813
  conflictClause: () => conflictClause,
176588
176814
  chunkRows: () => chunkRows
176589
176815
  });
176590
- import { existsSync as existsSync31, mkdirSync as mkdirSync15, readFileSync as readFileSync30, writeFileSync as writeFileSync18 } from "fs";
176816
+ import { existsSync as existsSync32, mkdirSync as mkdirSync15, readFileSync as readFileSync30, writeFileSync as writeFileSync18 } from "fs";
176591
176817
  import { join as join27 } from "path";
176592
176818
  var {env: env4, spawn: spawn2, SQL } = globalThis.Bun;
176593
176819
  var BACKUP_FORMAT_VERSION = 1, RESTORE_CHUNK_ROWS = 500, URL_ENV_KEYS, JSON_DATA_TYPES, SEED_CANDIDATES, VALUE_FLAGS, paint = (text, color) => `${color}${text}${colors.reset}`, chunkRows = (items, size) => Array.from({ length: Math.ceil(items.length / size) }, (_, idx) => items.slice(idx * size, idx * size + size)), quoteIdent = (name) => `"${name.replace(/"/g, '""')}"`, resolveUrl = (explicit) => {
@@ -176708,7 +176934,7 @@ var BACKUP_FORMAT_VERSION = 1, RESTORE_CHUNK_ROWS = 500, URL_ENV_KEYS, JSON_DATA
176708
176934
  console.log(paint(`\u2713 backup \u2192 ${file}`, colors.green));
176709
176935
  console.log(paint(` ${chosen.length} tables, ${total} rows`, colors.dim));
176710
176936
  }, runRestore = async (file, options) => {
176711
- if (!existsSync31(file))
176937
+ if (!existsSync32(file))
176712
176938
  throw new Error(`Backup not found: ${file}`);
176713
176939
  const payload = JSON.parse(readFileSync30(file, "utf-8"));
176714
176940
  const names = Object.keys(payload.tables).filter((name) => keepTable(name, options));
@@ -176732,7 +176958,7 @@ var BACKUP_FORMAT_VERSION = 1, RESTORE_CHUNK_ROWS = 500, URL_ENV_KEYS, JSON_DATA
176732
176958
  const total = order.reduce((sum, name) => sum + (payload.tables[name]?.length ?? 0), 0);
176733
176959
  console.log(paint(`\u2713 restored ${order.length} tables, ${total} rows (idempotent upsert by primary key)`, colors.green));
176734
176960
  }, runSeed = async (entry) => {
176735
- const target = entry ?? SEED_CANDIDATES.find((candidate) => existsSync31(join27(process.cwd(), candidate)));
176961
+ const target = entry ?? SEED_CANDIDATES.find((candidate) => existsSync32(join27(process.cwd(), candidate)));
176736
176962
  if (target === undefined)
176737
176963
  throw new Error(`No seed script found (looked for ${SEED_CANDIDATES.join(", ")}). Pass a path: absolute db seed <file>.`);
176738
176964
  console.log(paint(`seeding via ${target}\u2026`, colors.cyan));
@@ -176793,7 +177019,7 @@ __export(exports_logs, {
176793
177019
  });
176794
177020
  import {
176795
177021
  closeSync as closeSync2,
176796
- existsSync as existsSync32,
177022
+ existsSync as existsSync33,
176797
177023
  openSync as openSync4,
176798
177024
  readSync as readSync2,
176799
177025
  statSync as statSync4,
@@ -176860,7 +177086,7 @@ var DEFAULT_LINES = 40, POLL_MS = 250, LINES_FLAG_SPAN = 2, readFrom = (path, st
176860
177086
  printAvailable(instances);
176861
177087
  return;
176862
177088
  }
176863
- if (match.logFile === null || !existsSync32(match.logFile)) {
177089
+ if (match.logFile === null || !existsSync33(match.logFile)) {
176864
177090
  printDim3(`"${name}" has no captured log (untracked, or started outside the CLI).`);
176865
177091
  return;
176866
177092
  }
@@ -176880,14 +177106,14 @@ var init_logs = __esm(() => {
176880
177106
 
176881
177107
  // src/cli/typeGraphCoherence.ts
176882
177108
  import {
176883
- existsSync as existsSync33,
177109
+ existsSync as existsSync34,
176884
177110
  readFileSync as readFileSync31,
176885
177111
  realpathSync as realpathSync2,
176886
177112
  rmSync as rmSync6,
176887
177113
  writeFileSync as writeFileSync19
176888
177114
  } from "fs";
176889
177115
  import { createRequire } from "module";
176890
- import { dirname as dirname14, join as join28, resolve as resolve19, sep } from "path";
177116
+ import { dirname as dirname14, join as join28, resolve as resolve20, sep } from "path";
176891
177117
  var DEPENDENCY_FIELDS, TYPE_GRAPH_PACKAGES, readManifest = (path) => {
176892
177118
  try {
176893
177119
  const parsed = JSON.parse(readFileSync31(path, "utf-8"));
@@ -176929,21 +177155,21 @@ var DEPENDENCY_FIELDS, TYPE_GRAPH_PACKAGES, readManifest = (path) => {
176929
177155
  }
176930
177156
  }
176931
177157
  }, findInstallRoot = (cwd) => {
176932
- let directory = resolve19(cwd);
177158
+ let directory = resolve20(cwd);
176933
177159
  for (;; ) {
176934
- if (existsSync33(join28(directory, "bun.lock")) || existsSync33(join28(directory, "bun.lockb"))) {
177160
+ if (existsSync34(join28(directory, "bun.lock")) || existsSync34(join28(directory, "bun.lockb"))) {
176935
177161
  return directory;
176936
177162
  }
176937
177163
  const parent = dirname14(directory);
176938
177164
  if (parent === directory)
176939
- return resolve19(cwd);
177165
+ return resolve20(cwd);
176940
177166
  directory = parent;
176941
177167
  }
176942
177168
  }, findProjectManifest = (cwd, installRoot) => {
176943
- let directory = resolve19(cwd);
177169
+ let directory = resolve20(cwd);
176944
177170
  for (;; ) {
176945
177171
  const candidate = join28(directory, "package.json");
176946
- if (existsSync33(candidate))
177172
+ if (existsSync34(candidate))
176947
177173
  return candidate;
176948
177174
  if (directory === installRoot)
176949
177175
  return join28(installRoot, "package.json");
@@ -177084,7 +177310,7 @@ var exports_doctor = {};
177084
177310
  __export(exports_doctor, {
177085
177311
  runDoctor: () => runDoctor
177086
177312
  });
177087
- import { existsSync as existsSync34, mkdirSync as mkdirSync16, readFileSync as readFileSync32, writeFileSync as writeFileSync20 } from "fs";
177313
+ import { existsSync as existsSync35, mkdirSync as mkdirSync16, readFileSync as readFileSync32, writeFileSync as writeFileSync20 } from "fs";
177088
177314
  import { createRequire as createRequire2 } from "module";
177089
177315
  import { arch as arch4, platform as platform5 } from "os";
177090
177316
  import { join as join29 } from "path";
@@ -177122,7 +177348,7 @@ var FRAMEWORK_FIELDS2, projectRequire, check = (status2, label, detail) => ({
177122
177348
  return [];
177123
177349
  const label = `${field.replace("Directory", "")} pages`;
177124
177350
  return [
177125
- existsSync34(join29(process.cwd(), dir)) ? check("ok", label, dir) : check("fail", label, `${dir} (missing)`)
177351
+ existsSync35(join29(process.cwd(), dir)) ? check("ok", label, dir) : check("fail", label, `${dir} (missing)`)
177126
177352
  ];
177127
177353
  }), envCheck = async () => {
177128
177354
  const vars = await collectEnvVars();
@@ -177184,7 +177410,7 @@ ${colors.dim}${checks.length} checks \xB7 ${colors.reset}${summary}${colors.dim}
177184
177410
  const fixes = [];
177185
177411
  for (const field of FRAMEWORK_FIELDS2) {
177186
177412
  const dir = readString(config, field);
177187
- if (dir === undefined || existsSync34(join29(cwd, dir)))
177413
+ if (dir === undefined || existsSync35(join29(cwd, dir)))
177188
177414
  continue;
177189
177415
  mkdirSync16(join29(cwd, dir, "pages"), { recursive: true });
177190
177416
  fixes.push(`created ${dir}/pages`);
@@ -177195,7 +177421,7 @@ ${colors.dim}${checks.length} checks \xB7 ${colors.reset}${summary}${colors.dim}
177195
177421
  if (missing.length === 0)
177196
177422
  return null;
177197
177423
  const envExample = join29(cwd, ".env.example");
177198
- const existing = existsSync34(envExample) ? readFileSync32(envExample, "utf-8") : "";
177424
+ const existing = existsSync35(envExample) ? readFileSync32(envExample, "utf-8") : "";
177199
177425
  const existingKeys = new Set(existing.split(`
177200
177426
  `).map((line) => line.split("=")[0]?.trim()));
177201
177427
  const toAdd = missing.filter((entry) => !existingKeys.has(entry.key));
@@ -177386,7 +177612,7 @@ var CHROME_LINES = 6, MIN_LIST_HEIGHT = 3, driveInspectTui = async (terminal) =>
177386
177612
  }
177387
177613
  return rows;
177388
177614
  };
177389
- const fitLine = (line, width) => visibleLength(line) <= width ? padLine(line, width) : padLine(truncateText(stripAnsi(line), width), width);
177615
+ const fitLine = (line, width) => visibleLength(line) <= width ? padLine(line, width) : padLine(truncateText(stripAnsi2(line), width), width);
177390
177616
  const detailRows = (width, height, selected) => {
177391
177617
  const record = records[selected];
177392
177618
  const content = record ? requestDetail(record) : [`${colors.dim}No request selected.${colors.reset}`];
@@ -177569,10 +177795,10 @@ var init_inspect = __esm(() => {
177569
177795
  });
177570
177796
 
177571
177797
  // src/build/scanEntryPoints.ts
177572
- import { existsSync as existsSync35 } from "fs";
177798
+ import { existsSync as existsSync36 } from "fs";
177573
177799
  var {Glob: Glob4 } = globalThis.Bun;
177574
177800
  var scanEntryPoints = async (dir, pattern) => {
177575
- if (!existsSync35(dir))
177801
+ if (!existsSync36(dir))
177576
177802
  return [];
177577
177803
  const entryPaths = [];
177578
177804
  const glob = new Glob4(pattern);
@@ -177655,7 +177881,7 @@ var init_sourceMetadata = __esm(() => {
177655
177881
 
177656
177882
  // src/islands/pageMetadata.ts
177657
177883
  import { readFileSync as readFileSync33 } from "fs";
177658
- import { dirname as dirname15, resolve as resolve20 } from "path";
177884
+ import { dirname as dirname15, resolve as resolve21 } from "path";
177659
177885
  var pagePatterns, getPageDirs = (config) => [
177660
177886
  { dir: config.angularDirectory, framework: "angular" },
177661
177887
  { dir: config.emberDirectory, framework: "ember" },
@@ -177675,8 +177901,8 @@ var pagePatterns, getPageDirs = (config) => [
177675
177901
  const source = definition.buildReference?.source;
177676
177902
  if (!source)
177677
177903
  continue;
177678
- const resolvedSource = source.startsWith("file://") ? new URL(source).pathname : resolve20(dirname15(buildInfo.resolvedRegistryPath), source);
177679
- lookup.set(`${definition.framework}:${definition.component}`, resolve20(resolvedSource));
177904
+ const resolvedSource = source.startsWith("file://") ? new URL(source).pathname : resolve21(dirname15(buildInfo.resolvedRegistryPath), source);
177905
+ lookup.set(`${definition.framework}:${definition.component}`, resolve21(resolvedSource));
177680
177906
  }
177681
177907
  return lookup;
177682
177908
  }, resolveIslandUsages = (islands, islandSourceLookup) => islands.map((usage2) => {
@@ -177689,13 +177915,13 @@ var pagePatterns, getPageDirs = (config) => [
177689
177915
  const pattern = pagePatterns[entry.framework];
177690
177916
  if (!pattern)
177691
177917
  return;
177692
- const files = await scanEntryPoints(resolve20(entry.dir), pattern);
177918
+ const files = await scanEntryPoints(resolve21(entry.dir), pattern);
177693
177919
  for (const filePath of files) {
177694
177920
  const source = readFileSync33(filePath, "utf-8");
177695
177921
  const islands = extractIslandUsagesFromSource(source);
177696
- pageMetadata.set(resolve20(filePath), {
177922
+ pageMetadata.set(resolve21(filePath), {
177697
177923
  islands: resolveIslandUsages(islands, islandSourceLookup),
177698
- pagePath: resolve20(filePath)
177924
+ pagePath: resolve21(filePath)
177699
177925
  });
177700
177926
  }
177701
177927
  }, loadPageIslandMetadata = async (config) => {
@@ -177724,14 +177950,14 @@ var exports_islands = {};
177724
177950
  __export(exports_islands, {
177725
177951
  runIslands: () => runIslands
177726
177952
  });
177727
- import { existsSync as existsSync36, readFileSync as readFileSync34, statSync as statSync5 } from "fs";
177728
- import { join as join30, relative as relative12, resolve as resolve21 } from "path";
177953
+ import { existsSync as existsSync37, readFileSync as readFileSync34, statSync as statSync5 } from "fs";
177954
+ import { join as join30, relative as relative13, resolve as resolve22 } from "path";
177729
177955
  var FRAMEWORK_DIR_KEY, FRAMEWORK_COLOR, printDim6 = (message) => process.stdout.write(`${colors.dim}${message}${colors.reset}
177730
177956
  `), hostFrameworkOf = (pagePath, cwd, config) => {
177731
- const resolved = resolve21(cwd, pagePath);
177957
+ const resolved = resolve22(cwd, pagePath);
177732
177958
  for (const [framework, key] of Object.entries(FRAMEWORK_DIR_KEY)) {
177733
177959
  const dir = config[key];
177734
- if (typeof dir === "string" && resolved.startsWith(resolve21(cwd, dir))) {
177960
+ if (typeof dir === "string" && resolved.startsWith(resolve22(cwd, dir))) {
177735
177961
  return framework;
177736
177962
  }
177737
177963
  }
@@ -177744,7 +177970,7 @@ var FRAMEWORK_DIR_KEY, FRAMEWORK_COLOR, printDim6 = (message) => process.stdout.
177744
177970
  }
177745
177971
  }, readManifestSizes2 = (manifestDir) => {
177746
177972
  const manifestPath = join30(manifestDir, "manifest.json");
177747
- if (!existsSync36(manifestPath))
177973
+ if (!existsSync37(manifestPath))
177748
177974
  return null;
177749
177975
  const manifest = JSON.parse(readFileSync34(manifestPath, "utf-8"));
177750
177976
  const sizes = new Map;
@@ -177756,7 +177982,7 @@ var FRAMEWORK_DIR_KEY, FRAMEWORK_COLOR, printDim6 = (message) => process.stdout.
177756
177982
  const registryPath = config.islands?.registry;
177757
177983
  if (typeof registryPath !== "string")
177758
177984
  return null;
177759
- const buildInfo = await loadIslandRegistryBuildInfo(resolve21(cwd, registryPath));
177985
+ const buildInfo = await loadIslandRegistryBuildInfo(resolve22(cwd, registryPath));
177760
177986
  const pageMetadata = await loadPageIslandMetadata(config);
177761
177987
  const usages = [...pageMetadata.values()].flatMap((meta) => meta.islands.map((island) => ({ ...island, page: meta.pagePath })));
177762
177988
  return buildInfo.definitions.map((definition) => {
@@ -177766,7 +177992,7 @@ var FRAMEWORK_DIR_KEY, FRAMEWORK_COLOR, printDim6 = (message) => process.stdout.
177766
177992
  crossFramework: hostFramework !== null && hostFramework !== definition.framework,
177767
177993
  hostFramework,
177768
177994
  hydrate: usage2.hydrate ?? "load",
177769
- page: relative12(cwd, resolve21(cwd, usage2.page))
177995
+ page: relative13(cwd, resolve22(cwd, usage2.page))
177770
177996
  };
177771
177997
  });
177772
177998
  const key = getIslandManifestKey(definition.framework, definition.component);
@@ -177805,7 +178031,7 @@ var FRAMEWORK_DIR_KEY, FRAMEWORK_COLOR, printDim6 = (message) => process.stdout.
177805
178031
  ` ${color}\u2B21${colors.reset} ${colors.bold}${island.component}${colors.reset} ${meta}${sizeText}`
177806
178032
  ];
177807
178033
  if (island.source) {
177808
- lines.push(` ${colors.dim}${relative12(cwd, island.source)}${colors.reset}`);
178034
+ lines.push(` ${colors.dim}${relative13(cwd, island.source)}${colors.reset}`);
177809
178035
  }
177810
178036
  if (pages.length === 0) {
177811
178037
  lines.push(` ${colors.dim}(registered but not mounted on any page)${colors.reset}`);
@@ -177835,7 +178061,7 @@ var FRAMEWORK_DIR_KEY, FRAMEWORK_COLOR, printDim6 = (message) => process.stdout.
177835
178061
  }
177836
178062
  const outdirIndex = args.indexOf("--outdir");
177837
178063
  const outdir = outdirIndex >= 0 ? args[outdirIndex + 1] : config.buildDirectory;
177838
- const sizes = args.includes("--sizes") ? readManifestSizes2(resolve21(cwd, outdir ?? "build")) : null;
178064
+ const sizes = args.includes("--sizes") ? readManifestSizes2(resolve22(cwd, outdir ?? "build")) : null;
177839
178065
  const islands = await collectIslands(cwd, config, sizes);
177840
178066
  if (islands === null) {
177841
178067
  printDim6('No island registry configured. Set `islands: { registry: "..." }` in absolute.config.ts.');
@@ -177884,13 +178110,13 @@ var init_islands2 = __esm(() => {
177884
178110
  });
177885
178111
 
177886
178112
  // src/build/externalAssetPlugin.ts
177887
- import { copyFileSync as copyFileSync2, existsSync as existsSync37, mkdirSync as mkdirSync17, statSync as statSync6 } from "fs";
177888
- import { basename as basename6, dirname as dirname16, join as join31, resolve as resolve22 } from "path";
178113
+ import { copyFileSync as copyFileSync2, existsSync as existsSync38, mkdirSync as mkdirSync17, statSync as statSync6 } from "fs";
178114
+ import { basename as basename6, dirname as dirname16, join as join31, resolve as resolve23 } from "path";
177889
178115
  var createExternalAssetPlugin = (outDir, userSourceRoots = []) => ({
177890
178116
  name: "absolute-external-asset",
177891
178117
  setup(bld) {
177892
178118
  const urlPattern = /new\s+URL\(\s*["'](\.\.?\/[^"']+)["']\s*,\s*import\.meta\.url\s*\)/g;
177893
- const skipRoots = userSourceRoots.map((root) => resolve22(root));
178119
+ const skipRoots = userSourceRoots.map((root) => resolve23(root));
177894
178120
  const isUserSource = (path) => skipRoots.some((root) => path.startsWith(`${root}/`));
177895
178121
  bld.onLoad({ filter: /\.[mc]?[jt]sx?$/ }, async (args) => {
177896
178122
  if (isUserSource(args.path))
@@ -177905,13 +178131,13 @@ var createExternalAssetPlugin = (outDir, userSourceRoots = []) => ({
177905
178131
  const relPath = match[1];
177906
178132
  if (!relPath)
177907
178133
  continue;
177908
- const assetPath = resolve22(sourceDir, relPath);
177909
- if (!existsSync37(assetPath))
178134
+ const assetPath = resolve23(sourceDir, relPath);
178135
+ if (!existsSync38(assetPath))
177910
178136
  continue;
177911
178137
  if (!statSync6(assetPath).isFile())
177912
178138
  continue;
177913
178139
  const targetPath = join31(outDir, basename6(assetPath));
177914
- if (existsSync37(targetPath))
178140
+ if (existsSync38(targetPath))
177915
178141
  continue;
177916
178142
  mkdirSync17(dirname16(targetPath), { recursive: true });
177917
178143
  copyFileSync2(assetPath, targetPath);
@@ -177931,7 +178157,7 @@ __export(exports_compile, {
177931
178157
  var {env: env5 } = globalThis.Bun;
177932
178158
  import {
177933
178159
  cpSync,
177934
- existsSync as existsSync38,
178160
+ existsSync as existsSync39,
177935
178161
  mkdirSync as mkdirSync18,
177936
178162
  readdirSync as readdirSync7,
177937
178163
  readFileSync as readFileSync35,
@@ -177946,8 +178172,8 @@ import {
177946
178172
  dirname as dirname17,
177947
178173
  isAbsolute as isAbsolute2,
177948
178174
  join as join32,
177949
- relative as relative13,
177950
- resolve as resolve23
178175
+ relative as relative14,
178176
+ resolve as resolve24
177951
178177
  } from "path";
177952
178178
  var cliTag4 = (color, message) => `\x1B[2m${formatTimestamp()}\x1B[0m ${color}[cli]\x1B[0m ${color}${message}\x1B[0m`, compileBanner = (version2) => {
177953
178179
  const resolvedVersion = version2 || "unknown";
@@ -177989,7 +178215,7 @@ var cliTag4 = (color, message) => `\x1B[2m${formatTimestamp()}\x1B[0m ${color}[c
177989
178215
  if (/^[A-Za-z][A-Za-z0-9+.-]*:/.test(sourceRoot)) {
177990
178216
  return new URL(entry, sourceRoot).href;
177991
178217
  }
177992
- return resolve23(bundleDirectory, sourceRoot, entry);
178218
+ return resolve24(bundleDirectory, sourceRoot, entry);
177993
178219
  });
177994
178220
  delete map.sourceRoot;
177995
178221
  const rebased = Buffer.from(JSON.stringify(map)).toString("base64");
@@ -178019,12 +178245,12 @@ var cliTag4 = (color, message) => `\x1B[2m${formatTimestamp()}\x1B[0m ${color}[c
178019
178245
  return result;
178020
178246
  }, copyServerRuntimeAssetReferences = (outdir) => {
178021
178247
  const copied = new Set;
178022
- const normalizedOutdir = resolve23(outdir);
178248
+ const normalizedOutdir = resolve24(outdir);
178023
178249
  const copyReference = (filePath, relPath) => {
178024
- const assetSource = resolve23(dirname17(filePath), relPath);
178025
- if (!existsSync38(assetSource) || !statSync7(assetSource).isFile())
178250
+ const assetSource = resolve24(dirname17(filePath), relPath);
178251
+ if (!existsSync39(assetSource) || !statSync7(assetSource).isFile())
178026
178252
  return;
178027
- const assetTarget = resolve23(normalizedOutdir, relPath.replace(/^\.\//, ""));
178253
+ const assetTarget = resolve24(normalizedOutdir, relPath.replace(/^\.\//, ""));
178028
178254
  if (assetTarget !== normalizedOutdir && !assetTarget.startsWith(`${normalizedOutdir}/`))
178029
178255
  return;
178030
178256
  if (copied.has(assetTarget))
@@ -178098,18 +178324,18 @@ var cliTag4 = (color, message) => `\x1B[2m${formatTimestamp()}\x1B[0m ${color}[c
178098
178324
  return resolveBuildModule3(remaining);
178099
178325
  }, resolveJsxDevRuntimeCompatPath2 = () => {
178100
178326
  const candidates = [
178101
- resolve23(import.meta.dir, "..", "..", "dist", "react", "jsxDevRuntimeCompat.js"),
178102
- resolve23(import.meta.dir, "..", "..", "react", "jsxDevRuntimeCompat.js"),
178103
- resolve23(import.meta.dir, "..", "..", "react", "jsxDevRuntimeCompat.ts"),
178104
- resolve23(import.meta.dir, "..", "..", "..", "dist", "react", "jsxDevRuntimeCompat.js"),
178105
- resolve23(import.meta.dir, "..", "..", "..", "react", "jsxDevRuntimeCompat.js"),
178106
- resolve23(import.meta.dir, "..", "..", "..", "src", "react", "jsxDevRuntimeCompat.ts")
178327
+ resolve24(import.meta.dir, "..", "..", "dist", "react", "jsxDevRuntimeCompat.js"),
178328
+ resolve24(import.meta.dir, "..", "..", "react", "jsxDevRuntimeCompat.js"),
178329
+ resolve24(import.meta.dir, "..", "..", "react", "jsxDevRuntimeCompat.ts"),
178330
+ resolve24(import.meta.dir, "..", "..", "..", "dist", "react", "jsxDevRuntimeCompat.js"),
178331
+ resolve24(import.meta.dir, "..", "..", "..", "react", "jsxDevRuntimeCompat.js"),
178332
+ resolve24(import.meta.dir, "..", "..", "..", "src", "react", "jsxDevRuntimeCompat.ts")
178107
178333
  ];
178108
178334
  for (const candidate of candidates) {
178109
- if (existsSync38(candidate))
178335
+ if (existsSync39(candidate))
178110
178336
  return candidate;
178111
178337
  }
178112
- return resolve23(import.meta.dir, "..", "..", "react", "jsxDevRuntimeCompat.js");
178338
+ return resolve24(import.meta.dir, "..", "..", "react", "jsxDevRuntimeCompat.js");
178113
178339
  }, jsxDevRuntimeCompatPath2, shouldEmbedCompiledAsset = (relativePath, skip = new Set) => {
178114
178340
  if (skip.has(relativePath))
178115
178341
  return false;
@@ -178134,7 +178360,7 @@ var cliTag4 = (color, message) => `\x1B[2m${formatTimestamp()}\x1B[0m ${color}[c
178134
178360
  return true;
178135
178361
  }), requireForCompile, resolveNativeAssetForRuntime = (specifier) => {
178136
178362
  if (specifier.startsWith("."))
178137
- return resolve23(process.cwd(), specifier);
178363
+ return resolve24(process.cwd(), specifier);
178138
178364
  if (specifier.startsWith("/"))
178139
178365
  return specifier;
178140
178366
  return requireForCompile.resolve(specifier, { paths: [process.cwd()] });
@@ -178150,7 +178376,7 @@ var cliTag4 = (color, message) => `\x1B[2m${formatTimestamp()}\x1B[0m ${color}[c
178150
178376
  } catch {
178151
178377
  return null;
178152
178378
  }
178153
- }, resolveProjectPackageDir = (specifier) => resolve23(process.cwd(), "node_modules", ...specifier.split("/")), copyPackageToBuild = (specifier, outdir, seen) => {
178379
+ }, resolveProjectPackageDir = (specifier) => resolve24(process.cwd(), "node_modules", ...specifier.split("/")), copyPackageToBuild = (specifier, outdir, seen) => {
178154
178380
  if (seen.has(specifier))
178155
178381
  return;
178156
178382
  const srcDir = resolveProjectPackageDir(specifier);
@@ -178164,7 +178390,7 @@ var cliTag4 = (color, message) => `\x1B[2m${formatTimestamp()}\x1B[0m ${color}[c
178164
178390
  force: true,
178165
178391
  recursive: true,
178166
178392
  filter(source) {
178167
- const rel = relative13(srcDir, source);
178393
+ const rel = relative14(srcDir, source);
178168
178394
  const [firstSegment] = rel.split(/[\\/]/);
178169
178395
  return firstSegment !== "node_modules" && firstSegment !== ".git";
178170
178396
  }
@@ -178180,8 +178406,8 @@ var cliTag4 = (color, message) => `\x1B[2m${formatTimestamp()}\x1B[0m ${color}[c
178180
178406
  }, copyAngularRuntimePackages = (buildConfig, outdir) => {
178181
178407
  if (!buildConfig.angularDirectory)
178182
178408
  return;
178183
- const angularScopeDir = resolve23(process.cwd(), "node_modules", "@angular");
178184
- const angularPackages = existsSync38(angularScopeDir) ? readdirSync7(angularScopeDir, { withFileTypes: true }).filter((entry) => entry.isDirectory()).filter((entry) => entry.name !== "compiler-cli").map((entry) => `@angular/${entry.name}`) : [];
178409
+ const angularScopeDir = resolve24(process.cwd(), "node_modules", "@angular");
178410
+ const angularPackages = existsSync39(angularScopeDir) ? readdirSync7(angularScopeDir, { withFileTypes: true }).filter((entry) => entry.isDirectory()).filter((entry) => entry.name !== "compiler-cli").map((entry) => `@angular/${entry.name}`) : [];
178185
178411
  const roots = new Set([...angularPackages, "rxjs", "tslib", "typescript"]);
178186
178412
  const seen = new Set;
178187
178413
  for (const specifier of roots) {
@@ -178200,7 +178426,7 @@ var cliTag4 = (color, message) => `\x1B[2m${formatTimestamp()}\x1B[0m ${color}[c
178200
178426
  copyChunkReferencedPackages(outdir, seen);
178201
178427
  }, collectRuntimePackageSpecifiers = (distDir) => {
178202
178428
  const nodeModulesDir = join32(distDir, "node_modules");
178203
- if (!existsSync38(nodeModulesDir))
178429
+ if (!existsSync39(nodeModulesDir))
178204
178430
  return [];
178205
178431
  const specifiers = [];
178206
178432
  for (const entry of readdirSync7(nodeModulesDir, { withFileTypes: true })) {
@@ -178221,7 +178447,7 @@ var cliTag4 = (color, message) => `\x1B[2m${formatTimestamp()}\x1B[0m ${color}[c
178221
178447
  }
178222
178448
  return specifiers.sort((firstSpecifier, secondSpecifier) => secondSpecifier.length - firstSpecifier.length);
178223
178449
  }, ensureRelativeModuleSpecifier = (fromFile, toFile) => {
178224
- const rel = relative13(dirname17(fromFile), toFile).replace(/\\/g, "/");
178450
+ const rel = relative14(dirname17(fromFile), toFile).replace(/\\/g, "/");
178225
178451
  return rel.startsWith(".") ? rel : `./${rel}`;
178226
178452
  }, pickExportEntry = (value) => {
178227
178453
  if (typeof value === "string")
@@ -178241,9 +178467,9 @@ var cliTag4 = (color, message) => `\x1B[2m${formatTimestamp()}\x1B[0m ${color}[c
178241
178467
  const packageDir = join32(distDir, "node_modules", ...packageSpecifier.split("/"));
178242
178468
  const subpath = specifier.slice(packageSpecifier.length);
178243
178469
  const subPackageDir = subpath ? join32(packageDir, ...subpath.slice(1).split("/")) : null;
178244
- const resolvedPackageDir = subPackageDir && existsSync38(join32(subPackageDir, "package.json")) ? subPackageDir : packageDir;
178470
+ const resolvedPackageDir = subPackageDir && existsSync39(join32(subPackageDir, "package.json")) ? subPackageDir : packageDir;
178245
178471
  const packageJsonPath = join32(resolvedPackageDir, "package.json");
178246
- if (!existsSync38(packageJsonPath))
178472
+ if (!existsSync39(packageJsonPath))
178247
178473
  return null;
178248
178474
  const pkg = JSON.parse(readFileSync35(packageJsonPath, "utf-8"));
178249
178475
  const exportKey = resolvedPackageDir !== subPackageDir && subpath ? `.${subpath}` : ".";
@@ -178268,7 +178494,7 @@ var cliTag4 = (color, message) => `\x1B[2m${formatTimestamp()}\x1B[0m ${color}[c
178268
178494
  }, findContainingRuntimePackageDir = (filePath) => {
178269
178495
  let dir = dirname17(filePath);
178270
178496
  while (dir !== dirname17(dir)) {
178271
- if (isNodeModulesPath(dir) && existsSync38(join32(dir, "package.json"))) {
178497
+ if (isNodeModulesPath(dir) && existsSync39(join32(dir, "package.json"))) {
178272
178498
  return dir;
178273
178499
  }
178274
178500
  dir = dirname17(dir);
@@ -178286,9 +178512,9 @@ var cliTag4 = (color, message) => `\x1B[2m${formatTimestamp()}\x1B[0m ${color}[c
178286
178512
  return null;
178287
178513
  return join32(packageDir, entry);
178288
178514
  }, collectRuntimeRewriteRoots = (distDir) => collectFiles2(distDir).filter((filePath) => isRuntimeJsFile(filePath) && !isNodeModulesPath(filePath)), toTopLevelPackage = (specifier) => specifier.split("/").slice(0, specifier.startsWith("@") ? 2 : 1).join("/"), FRAMEWORK_PACKAGE_NAME = "@absolutejs/absolute", copyChunkReferencedPackages = (distDir, seen) => {
178289
- const distRoot = resolve23(distDir);
178515
+ const distRoot = resolve24(distDir);
178290
178516
  for (const filePath of collectRuntimeRewriteRoots(distDir)) {
178291
- if (resolve23(dirname17(filePath)) === distRoot)
178517
+ if (resolve24(dirname17(filePath)) === distRoot)
178292
178518
  continue;
178293
178519
  const source = readFileSync35(filePath, "utf-8");
178294
178520
  for (const match of source.matchAll(MODULE_SPECIFIER_RE)) {
@@ -178324,7 +178550,7 @@ var cliTag4 = (color, message) => `\x1B[2m${formatTimestamp()}\x1B[0m ${color}[c
178324
178550
  const { masked, restore } = maskLiterals(source);
178325
178551
  const rewrittenMasked = masked.replace(MODULE_SPECIFIER_RE, (match, prefix, quote, specifier) => {
178326
178552
  if (typeof specifier === "string" && specifier.startsWith(".")) {
178327
- enqueue(resolveRuntimeJsFile(resolve23(dirname17(filePath), specifier)));
178553
+ enqueue(resolveRuntimeJsFile(resolve24(dirname17(filePath), specifier)));
178328
178554
  return match;
178329
178555
  }
178330
178556
  const packageImportTarget = resolveRuntimeJsFile(resolvePackageImportEntryFile(filePath, specifier) ?? "");
@@ -178353,12 +178579,12 @@ var cliTag4 = (color, message) => `\x1B[2m${formatTimestamp()}\x1B[0m ${color}[c
178353
178579
  "_compile_entrypoint.ts"
178354
178580
  ]);
178355
178581
  const embeddedFiles = allFiles.filter((file) => {
178356
- const rel = relative13(distDir, file);
178582
+ const rel = relative14(distDir, file);
178357
178583
  if (embeddedSkip.has(rel))
178358
178584
  return false;
178359
178585
  return true;
178360
178586
  });
178361
- const clientFiles = embeddedFiles.filter((file) => shouldEmbedCompiledAsset(relative13(distDir, file), assetSkip));
178587
+ const clientFiles = embeddedFiles.filter((file) => shouldEmbedCompiledAsset(relative14(distDir, file), assetSkip));
178362
178588
  const imports = [];
178363
178589
  const nativeImports = [];
178364
178590
  const nativeMappings = [];
@@ -178368,19 +178594,19 @@ var cliTag4 = (color, message) => `\x1B[2m${formatTimestamp()}\x1B[0m ${color}[c
178368
178594
  const nativeAssets = resolveCompileNativeAssets(buildConfig);
178369
178595
  nativeAssets.forEach((asset, idx) => {
178370
178596
  const varName = `__native${idx}`;
178371
- const importSpecifier = asset.import.startsWith(".") ? resolve23(process.cwd(), asset.import) : asset.import;
178597
+ const importSpecifier = asset.import.startsWith(".") ? resolve24(process.cwd(), asset.import) : asset.import;
178372
178598
  nativeImports.push(`import ${varName} from ${JSON.stringify(importSpecifier)} with { type: "file" };`);
178373
178599
  nativeMappings.push(` [${JSON.stringify(asset.env)}, resolveNativeAssetPath(${varName})],`);
178374
178600
  });
178375
178601
  embeddedFiles.forEach((filePath, idx) => {
178376
- const rel = relative13(distDir, filePath).replace(/\\/g, "/");
178602
+ const rel = relative14(distDir, filePath).replace(/\\/g, "/");
178377
178603
  const varName = `__a${idx}`;
178378
178604
  embeddedVarMap.set(rel, varName);
178379
178605
  imports.push(`import ${varName} from "./${rel}" with { type: "file" };`);
178380
178606
  embeddedMappings.push(` ["${rel}", ${varName}],`);
178381
178607
  });
178382
178608
  clientFiles.forEach((filePath) => {
178383
- const rel = relative13(distDir, filePath).replace(/\\/g, "/");
178609
+ const rel = relative14(distDir, filePath).replace(/\\/g, "/");
178384
178610
  const varName = embeddedVarMap.get(rel);
178385
178611
  if (!varName)
178386
178612
  return;
@@ -178394,7 +178620,7 @@ var cliTag4 = (color, message) => `\x1B[2m${formatTimestamp()}\x1B[0m ${color}[c
178394
178620
  const pageVarMap = new Map;
178395
178621
  const prerenderEntries = Array.from(prerenderMap.entries());
178396
178622
  prerenderEntries.forEach(([route, filePath]) => {
178397
- const rel = relative13(distDir, filePath).replace(/\\/g, "/");
178623
+ const rel = relative14(distDir, filePath).replace(/\\/g, "/");
178398
178624
  const varName = embeddedVarMap.get(rel);
178399
178625
  if (varName)
178400
178626
  pageVarMap.set(route, varName);
@@ -178427,7 +178653,7 @@ import { websocket as elysiaWebsocket } from "elysia/ws";
178427
178653
  const SERVER_MODULE = (runtimeDir: string) => import(pathToFileURL(join(runtimeDir, ${JSON.stringify(serverBundleName)})).href);
178428
178654
  const RUNTIME_BUILD_ID = ${JSON.stringify(runtimeBuildId)};
178429
178655
  const RUNTIME_CONFIG_SOURCE = ${JSON.stringify(runtimeConfigSource)};
178430
- const ORIGINAL_BUILD_DIR = ${JSON.stringify(resolve23(distDir))};
178656
+ const ORIGINAL_BUILD_DIR = ${JSON.stringify(resolve24(distDir))};
178431
178657
  const ORIGINAL_BUILD_DIR_NORMALIZED = ORIGINAL_BUILD_DIR.replace(/\\\\/g, "/");
178432
178658
 
178433
178659
  const resolveNativeAssetPath = (assetPath: string) => {
@@ -178845,16 +179071,16 @@ console.log(\`
178845
179071
  });
178846
179072
  }
178847
179073
  }), compile = async (serverEntry, outdir, outfile, configPath2) => {
178848
- const resolvedOutdir = resolve23(outdir ?? "dist");
179074
+ const resolvedOutdir = resolve24(outdir ?? "dist");
178849
179075
  await withBuildDirectoryLock(resolvedOutdir, () => compileUnlocked(serverEntry, resolvedOutdir, outfile, configPath2));
178850
179076
  }, compileUnlocked = async (serverEntry, resolvedOutdir, outfile, configPath2) => {
178851
179077
  const prerenderPort = Number(env5.COMPILE_PORT) || Number(env5.PORT) || findFreePort();
178852
179078
  killStaleProcesses(prerenderPort);
178853
179079
  const entryName = basename7(serverEntry).replace(/\.[^.]+$/, "");
178854
- const resolvedOutfile = resolve23(outfile ?? "compiled-server");
179080
+ const resolvedOutfile = resolve24(outfile ?? "compiled-server");
178855
179081
  const absoluteVersion = resolvePackageVersion3([
178856
- resolve23(import.meta.dir, "..", "..", "..", "package.json"),
178857
- resolve23(import.meta.dir, "..", "..", "package.json")
179082
+ resolve24(import.meta.dir, "..", "..", "..", "package.json"),
179083
+ resolve24(import.meta.dir, "..", "..", "package.json")
178858
179084
  ]);
178859
179085
  compileBanner(absoluteVersion);
178860
179086
  const totalStart = performance.now();
@@ -178865,8 +179091,8 @@ console.log(\`
178865
179091
  buildConfig.mode = "production";
178866
179092
  try {
178867
179093
  const build2 = await resolveBuildModule3([
178868
- resolve23(import.meta.dir, "..", "..", "core", "build"),
178869
- resolve23(import.meta.dir, "..", "build")
179094
+ resolve24(import.meta.dir, "..", "..", "core", "build"),
179095
+ resolve24(import.meta.dir, "..", "build")
178870
179096
  ]);
178871
179097
  if (!build2)
178872
179098
  throw new Error("Could not locate build module");
@@ -178888,10 +179114,10 @@ console.log(\`
178888
179114
  buildConfig.htmxDirectory
178889
179115
  ].filter((dir) => Boolean(dir));
178890
179116
  const islandRegistrySpec = buildConfig.islands?.registry;
178891
- const islandRegistryPlugin = islandRegistrySpec ? createIslandRegistryDefinitionPlugin(await loadIslandRegistryBuildInfo(resolve23(islandRegistrySpec))) : undefined;
179117
+ const islandRegistryPlugin = islandRegistrySpec ? createIslandRegistryDefinitionPlugin(await loadIslandRegistryBuildInfo(resolve24(islandRegistrySpec))) : undefined;
178892
179118
  const serverBundle = await Bun.build({
178893
179119
  define: { "process.env.NODE_ENV": '"production"' },
178894
- entrypoints: [resolve23(serverEntry)],
179120
+ entrypoints: [resolve24(serverEntry)],
178895
179121
  external: resolveServerBundleExternals(buildConfig),
178896
179122
  outdir: resolvedOutdir,
178897
179123
  plugins: [
@@ -178915,13 +179141,13 @@ console.log(\`
178915
179141
  console.error(cliTag4("\x1B[31m", "Server bundle failed."));
178916
179142
  process.exit(1);
178917
179143
  }
178918
- const outputPath = resolve23(resolvedOutdir, `${entryName}.js`);
178919
- if (!existsSync38(outputPath)) {
179144
+ const outputPath = resolve24(resolvedOutdir, `${entryName}.js`);
179145
+ if (!existsSync39(outputPath)) {
178920
179146
  console.error(cliTag4("\x1B[31m", `Expected output not found: ${outputPath}`));
178921
179147
  process.exit(1);
178922
179148
  }
178923
- if (existsSync38(resolve23(resolvedOutdir, "angular", "vendor", "server"))) {
178924
- const vendorDir = resolve23(resolvedOutdir, "angular", "vendor", "server");
179149
+ if (existsSync39(resolve24(resolvedOutdir, "angular", "vendor", "server"))) {
179150
+ const vendorDir = resolve24(resolvedOutdir, "angular", "vendor", "server");
178925
179151
  const vendorEntries = readdirSync7(vendorDir).filter((fileName) => fileName.endsWith(".js"));
178926
179152
  const angularServerVendorPaths = {};
178927
179153
  for (const file of vendorEntries) {
@@ -178930,7 +179156,7 @@ console.log(\`
178930
179156
  if (scope !== "angular" || rest.length === 0)
178931
179157
  continue;
178932
179158
  const specifier = `@angular/${rest.join("/")}`;
178933
- const relPath = relative13(dirname17(outputPath), resolve23(vendorDir, file));
179159
+ const relPath = relative14(dirname17(outputPath), resolve24(vendorDir, file));
178934
179160
  angularServerVendorPaths[specifier] = relPath.startsWith(".") ? relPath : `./${relPath}`;
178935
179161
  }
178936
179162
  if (Object.keys(angularServerVendorPaths).length > 0) {
@@ -179047,11 +179273,11 @@ var exports_typecheck = {};
179047
179273
  __export(exports_typecheck, {
179048
179274
  typecheck: () => typecheck
179049
179275
  });
179050
- import { resolve as resolve24, join as join33 } from "path";
179051
- import { existsSync as existsSync39, readFileSync as readFileSync36 } from "fs";
179276
+ import { resolve as resolve25, join as join33 } from "path";
179277
+ import { existsSync as existsSync40, readFileSync as readFileSync36 } from "fs";
179052
179278
  import { mkdir as mkdir2, writeFile } from "fs/promises";
179053
- var isCommandService3 = (service) => service.kind === "command" || Array.isArray(service.command), resolveConfigPath = (configPath2) => resolve24(configPath2 ?? process.env.ABSOLUTE_CONFIG ?? "absolute.config.ts"), getTypecheckTargets = async (configPath2) => {
179054
- if (!existsSync39(resolveConfigPath(configPath2))) {
179279
+ var isCommandService3 = (service) => service.kind === "command" || Array.isArray(service.command), resolveConfigPath = (configPath2) => resolve25(configPath2 ?? process.env.ABSOLUTE_CONFIG ?? "absolute.config.ts"), getTypecheckTargets = async (configPath2) => {
179280
+ if (!existsSync40(resolveConfigPath(configPath2))) {
179055
179281
  const defaultService = {};
179056
179282
  return [defaultService];
179057
179283
  }
@@ -179072,19 +179298,19 @@ var isCommandService3 = (service) => service.kind === "command" || Array.isArray
179072
179298
  const exitCode = await proc.exited;
179073
179299
  return { exitCode, name, output: (stdout + stderr).trim() };
179074
179300
  }, shellEscape = (value) => `'${value.replaceAll("'", "'\\''")}'`, runShell = async (name, command) => run(name, ["/bin/bash", "-lc", command]), findBin = (name) => {
179075
- const local = resolve24("node_modules", ".bin", name);
179076
- return existsSync39(local) ? local : null;
179077
- }, ANSI_COLOR_REGEX, ANSI_PURPLE_REGEX, ANSI_CYAN_REGEX, ANSI_TOKEN_END_REGEX, stripAnsi3 = (str) => str.replace(ANSI_COLOR_REGEX, ""), formatSvelteOutput = (output) => {
179301
+ const local = resolve25("node_modules", ".bin", name);
179302
+ return existsSync40(local) ? local : null;
179303
+ }, ANSI_COLOR_REGEX, ANSI_PURPLE_REGEX, ANSI_CYAN_REGEX, ANSI_TOKEN_END_REGEX, stripAnsi4 = (str) => str.replace(ANSI_COLOR_REGEX, ""), formatSvelteOutput = (output) => {
179078
179304
  const cwd = `${process.cwd()}/`;
179079
- const summaryMatch = stripAnsi3(output).match(/svelte-check found (\d+) error/);
179305
+ const summaryMatch = stripAnsi4(output).match(/svelte-check found (\d+) error/);
179080
179306
  const errorCount = summaryMatch ? parseInt(summaryMatch[1] ?? "0", 10) : 0;
179081
179307
  const formatted = output.split(`
179082
179308
  `).filter((line) => {
179083
- const plain = stripAnsi3(line);
179309
+ const plain = stripAnsi4(line);
179084
179310
  return !plain.startsWith("Loading svelte-check") && !plain.startsWith("Getting Svelte") && !plain.startsWith("====") && !plain.startsWith("svelte-check found") && !/^\d+ (START|COMPLETED)/.test(plain) && plain.trim() !== "";
179085
179311
  }).flatMap((line) => {
179086
179312
  const result = line.replaceAll(cwd, "");
179087
- const plain = stripAnsi3(result);
179313
+ const plain = stripAnsi4(result);
179088
179314
  const pathMatch = plain.match(/^(\S+\.svelte):(\d+:\d+)$/);
179089
179315
  if (pathMatch) {
179090
179316
  return [
@@ -179092,9 +179318,9 @@ var isCommandService3 = (service) => service.kind === "command" || Array.isArray
179092
179318
  ];
179093
179319
  }
179094
179320
  if (result.includes(ANSI_PURPLE_REGEX)) {
179095
- const plainLine = stripAnsi3(result);
179096
- const before = stripAnsi3(result.split(ANSI_PURPLE_REGEX)[0] ?? "");
179097
- const token = stripAnsi3((result.split(ANSI_PURPLE_REGEX)[1] ?? "").split(ANSI_TOKEN_END_REGEX)[0] ?? "");
179321
+ const plainLine = stripAnsi4(result);
179322
+ const before = stripAnsi4(result.split(ANSI_PURPLE_REGEX)[0] ?? "");
179323
+ const token = stripAnsi4((result.split(ANSI_PURPLE_REGEX)[1] ?? "").split(ANSI_TOKEN_END_REGEX)[0] ?? "");
179098
179324
  if (!token)
179099
179325
  return [result];
179100
179326
  const expanded = before.replace(/\t/g, " ");
@@ -179120,15 +179346,15 @@ Found ${errorCount} error${suffix}.`;
179120
179346
  return formatted;
179121
179347
  }, ABSOLUTE_INTERNAL_EXCLUDES, resolveAbsoluteTypeFile = (fileName) => {
179122
179348
  const candidates = [
179123
- resolve24("node_modules/@absolutejs/absolute/dist/types", fileName),
179124
- resolve24(import.meta.dir, "../types", fileName),
179125
- resolve24(import.meta.dir, "../../types", fileName),
179126
- resolve24(import.meta.dir, "../../../types", fileName)
179349
+ resolve25("node_modules/@absolutejs/absolute/dist/types", fileName),
179350
+ resolve25(import.meta.dir, "../types", fileName),
179351
+ resolve25(import.meta.dir, "../../types", fileName),
179352
+ resolve25(import.meta.dir, "../../../types", fileName)
179127
179353
  ];
179128
- return candidates.find((candidate) => existsSync39(candidate)) ?? candidates[0];
179354
+ return candidates.find((candidate) => existsSync40(candidate)) ?? candidates[0];
179129
179355
  }, ABSOLUTE_TYPECHECK_FILES, readProjectTsconfig = () => {
179130
179356
  try {
179131
- return JSON.parse(readFileSync36(resolve24("tsconfig.json"), "utf-8"));
179357
+ return JSON.parse(readFileSync36(resolve25("tsconfig.json"), "utf-8"));
179132
179358
  } catch {
179133
179359
  return {};
179134
179360
  }
@@ -179162,13 +179388,13 @@ Found ${errorCount} error${suffix}.`;
179162
179388
  rootDir: ".."
179163
179389
  },
179164
179390
  exclude: getProjectTypecheckExcludes(),
179165
- extends: resolve24("tsconfig.json"),
179391
+ extends: resolve25("tsconfig.json"),
179166
179392
  include: getProjectTypecheckIncludes()
179167
179393
  }, null, "\t")).then(() => run("vue-tsc", [
179168
179394
  vueTscBin,
179169
179395
  "--noEmit",
179170
179396
  "--project",
179171
- resolve24(vueTsconfigPath),
179397
+ resolve25(vueTsconfigPath),
179172
179398
  "--incremental",
179173
179399
  "--tsBuildInfoFile",
179174
179400
  join33(cacheDir, "vue-tsc.tsbuildinfo"),
@@ -179190,10 +179416,10 @@ Found ${errorCount} error${suffix}.`;
179190
179416
  rootDir: ".."
179191
179417
  },
179192
179418
  exclude: ABSOLUTE_INTERNAL_EXCLUDES.map(toGeneratedConfigPath),
179193
- extends: resolve24("tsconfig.json"),
179419
+ extends: resolve25("tsconfig.json"),
179194
179420
  include: [`../${angularDir}/**/*`]
179195
179421
  }, null, "\t"));
179196
- return runShell("ngc", `${shellEscape(ngcBin)} -p ${shellEscape(resolve24(angularTsconfigPath))}`);
179422
+ return runShell("ngc", `${shellEscape(ngcBin)} -p ${shellEscape(resolve25(angularTsconfigPath))}`);
179197
179423
  }, buildTscCheck = (cacheDir) => {
179198
179424
  const tscBin = findBin("tsc");
179199
179425
  if (!tscBin) {
@@ -179206,13 +179432,13 @@ Found ${errorCount} error${suffix}.`;
179206
179432
  rootDir: ".."
179207
179433
  },
179208
179434
  exclude: getProjectTypecheckExcludes(),
179209
- extends: resolve24("tsconfig.json"),
179435
+ extends: resolve25("tsconfig.json"),
179210
179436
  include: getProjectTypecheckIncludes()
179211
179437
  }, null, "\t")).then(() => run("tsc", [
179212
179438
  tscBin,
179213
179439
  "--noEmit",
179214
179440
  "--project",
179215
- resolve24(tscConfigPath),
179441
+ resolve25(tscConfigPath),
179216
179442
  "--incremental",
179217
179443
  "--tsBuildInfoFile",
179218
179444
  join33(cacheDir, "tsc.tsbuildinfo"),
@@ -179226,14 +179452,14 @@ Found ${errorCount} error${suffix}.`;
179226
179452
  }
179227
179453
  const svelteTsconfigPath = join33(cacheDir, "tsconfig.svelte-check.json");
179228
179454
  await writeFile(svelteTsconfigPath, JSON.stringify({
179229
- extends: resolve24("tsconfig.json"),
179455
+ extends: resolve25("tsconfig.json"),
179230
179456
  files: ABSOLUTE_TYPECHECK_FILES,
179231
179457
  include: [`../${svelteDir}/**/*`]
179232
179458
  }, null, "\t"));
179233
179459
  return run("svelte-check", [
179234
179460
  svelteBin,
179235
179461
  "--tsconfig",
179236
- resolve24(svelteTsconfigPath),
179462
+ resolve25(svelteTsconfigPath),
179237
179463
  "--threshold",
179238
179464
  "error",
179239
179465
  "--compiler-warnings",
@@ -179427,11 +179653,11 @@ var DEFAULT_RELAY_PORT = 8787, DEFAULT_REQUEST_TIMEOUT_MS = 30000, headersToObje
179427
179653
  url: url.pathname + url.search,
179428
179654
  ...bodyBytes && bodyBytes.length > 0 ? { bodyBase64: Buffer.from(bodyBytes).toString("base64") } : {}
179429
179655
  };
179430
- const responsePromise = new Promise((resolve25) => {
179431
- pending.set(id, resolve25);
179656
+ const responsePromise = new Promise((resolve26) => {
179657
+ pending.set(id, resolve26);
179432
179658
  });
179433
179659
  client.send(encodeTunnelMessage(message));
179434
- const timeout = new Promise((resolve25) => setTimeout(() => resolve25({ id, message: "timeout", type: "error" }), requestTimeoutMs));
179660
+ const timeout = new Promise((resolve26) => setTimeout(() => resolve26({ id, message: "timeout", type: "error" }), requestTimeoutMs));
179435
179661
  const result = await Promise.race([responsePromise, timeout]);
179436
179662
  pending.delete(id);
179437
179663
  if (result.type === "error") {
@@ -180733,9 +180959,9 @@ init_eslint();
180733
180959
  init_constants();
180734
180960
  init_utils();
180735
180961
  import { execSync as execSync2 } from "child_process";
180736
- import { existsSync as existsSync7, readFileSync as readFileSync9 } from "fs";
180962
+ import { existsSync as existsSync8, readFileSync as readFileSync9 } from "fs";
180737
180963
  import { arch as arch2, cpus, platform as platform3, totalmem, version } from "os";
180738
- import { resolve as resolve5 } from "path";
180964
+ import { resolve as resolve6 } from "path";
180739
180965
  var bold = (str) => `\x1B[1m${str}\x1B[0m`;
180740
180966
  var getBinaryVersion = (binary, flag = "--version") => {
180741
180967
  try {
@@ -180765,10 +180991,10 @@ var getPackageVersion = (packageName) => {
180765
180991
  var getAbsoluteVersion = () => {
180766
180992
  try {
180767
180993
  const candidates = [
180768
- resolve5(import.meta.dir, "..", "..", "package.json"),
180769
- resolve5(import.meta.dir, "..", "..", "..", "package.json")
180994
+ resolve6(import.meta.dir, "..", "..", "package.json"),
180995
+ resolve6(import.meta.dir, "..", "..", "..", "package.json")
180770
180996
  ];
180771
- const pkgPath = candidates.find((candidate) => existsSync7(candidate));
180997
+ const pkgPath = candidates.find((candidate) => existsSync8(candidate));
180772
180998
  if (pkgPath)
180773
180999
  return readPackageVersion(pkgPath);
180774
181000
  } catch {
@@ -180809,7 +181035,7 @@ var detectCI = () => {
180809
181035
  };
180810
181036
  var isDockerEnvironment = () => {
180811
181037
  try {
180812
- return existsSync7("/.dockerenv");
181038
+ return existsSync8("/.dockerenv");
180813
181039
  } catch {
180814
181040
  return false;
180815
181041
  }
@@ -181074,8 +181300,8 @@ init_telemetryEvent();
181074
181300
  init_serverBundleExternals();
181075
181301
  init_utils();
181076
181302
  var {env: env2 } = globalThis.Bun;
181077
- import { existsSync as existsSync8, readFileSync as readFileSync11, rmSync as rmSync4 } from "fs";
181078
- import { basename as basename3, join as join11, resolve as resolve8 } from "path";
181303
+ import { existsSync as existsSync9, readFileSync as readFileSync11, rmSync as rmSync4 } from "fs";
181304
+ import { basename as basename3, join as join11, resolve as resolve9 } from "path";
181079
181305
  var cliTag2 = (color, message) => `\x1B[2m${formatTimestamp()}\x1B[0m ${color}[cli]\x1B[0m ${color}${message}\x1B[0m`;
181080
181306
  var resolvePackageVersion = (candidates) => {
181081
181307
  for (const candidate of candidates) {
@@ -181130,18 +181356,18 @@ var handleBundleFailure = (serverBundle, bundleStart, serverEntry) => {
181130
181356
  };
181131
181357
  var resolveJsxDevRuntimeCompatPath = () => {
181132
181358
  const candidates = [
181133
- resolve8(import.meta.dir, "..", "..", "dist", "react", "jsxDevRuntimeCompat.js"),
181134
- resolve8(import.meta.dir, "..", "..", "react", "jsxDevRuntimeCompat.js"),
181135
- resolve8(import.meta.dir, "..", "..", "react", "jsxDevRuntimeCompat.ts"),
181136
- resolve8(import.meta.dir, "..", "..", "..", "dist", "react", "jsxDevRuntimeCompat.js"),
181137
- resolve8(import.meta.dir, "..", "..", "..", "react", "jsxDevRuntimeCompat.js"),
181138
- resolve8(import.meta.dir, "..", "..", "..", "src", "react", "jsxDevRuntimeCompat.ts")
181359
+ resolve9(import.meta.dir, "..", "..", "dist", "react", "jsxDevRuntimeCompat.js"),
181360
+ resolve9(import.meta.dir, "..", "..", "react", "jsxDevRuntimeCompat.js"),
181361
+ resolve9(import.meta.dir, "..", "..", "react", "jsxDevRuntimeCompat.ts"),
181362
+ resolve9(import.meta.dir, "..", "..", "..", "dist", "react", "jsxDevRuntimeCompat.js"),
181363
+ resolve9(import.meta.dir, "..", "..", "..", "react", "jsxDevRuntimeCompat.js"),
181364
+ resolve9(import.meta.dir, "..", "..", "..", "src", "react", "jsxDevRuntimeCompat.ts")
181139
181365
  ];
181140
181366
  for (const candidate of candidates) {
181141
- if (existsSync8(candidate))
181367
+ if (existsSync9(candidate))
181142
181368
  return candidate;
181143
181369
  }
181144
- return resolve8(import.meta.dir, "..", "..", "react", "jsxDevRuntimeCompat.js");
181370
+ return resolve9(import.meta.dir, "..", "..", "react", "jsxDevRuntimeCompat.js");
181145
181371
  };
181146
181372
  var jsxDevRuntimeCompatPath = resolveJsxDevRuntimeCompatPath();
181147
181373
  var prerenderStaticPages = async (outputPath, prerenderPort, resolvedOutdir, staticConfig, absoluteVersion, configPath2) => {
@@ -181178,7 +181404,7 @@ var runPreparedServer = async ({
181178
181404
  serverEntry,
181179
181405
  totalDuration
181180
181406
  }) => {
181181
- const usesDocker = existsSync8(resolve8(COMPOSE_PATH));
181407
+ const usesDocker = existsSync9(resolve9(COMPOSE_PATH));
181182
181408
  const scripts = usesDocker ? await readDbScripts() : null;
181183
181409
  if (scripts)
181184
181410
  await startDatabase(scripts);
@@ -181270,10 +181496,10 @@ var start = async (serverEntry, outdir, configPath2, options = {}) => {
181270
181496
  const port = Number(env2.PORT) || DEFAULT_PORT;
181271
181497
  killStaleProcesses(port);
181272
181498
  const entryName = basename3(serverEntry).replace(/\.[^.]+$/, "");
181273
- const resolvedOutdir = resolve8(outdir ?? "dist");
181499
+ const resolvedOutdir = resolve9(outdir ?? "dist");
181274
181500
  const absoluteVersion = resolvePackageVersion([
181275
- resolve8(import.meta.dir, "..", "..", "..", "package.json"),
181276
- resolve8(import.meta.dir, "..", "..", "package.json")
181501
+ resolve9(import.meta.dir, "..", "..", "..", "package.json"),
181502
+ resolve9(import.meta.dir, "..", "..", "package.json")
181277
181503
  ]);
181278
181504
  const buildConfig = await loadConfig(configPath2);
181279
181505
  buildConfig.buildDirectory = resolvedOutdir;
@@ -181286,9 +181512,9 @@ var start = async (serverEntry, outdir, configPath2, options = {}) => {
181286
181512
  buildConfig.vueDirectory && "vue",
181287
181513
  buildConfig.angularDirectory && "angular"
181288
181514
  ].filter((val) => Boolean(val));
181289
- const outputPath = resolve8(resolvedOutdir, `${entryName}.js`);
181515
+ const outputPath = resolve9(resolvedOutdir, `${entryName}.js`);
181290
181516
  if (options.prebuilt) {
181291
- if (!existsSync8(outputPath)) {
181517
+ if (!existsSync9(outputPath)) {
181292
181518
  throw new Error(`Prepared production server not found: ${outputPath}`);
181293
181519
  }
181294
181520
  return runPreparedServer({
@@ -181309,8 +181535,8 @@ var start = async (serverEntry, outdir, configPath2, options = {}) => {
181309
181535
  process.stdout.write(cliTag2("\x1B[36m", `Building assets`));
181310
181536
  try {
181311
181537
  const build = await resolveBuildModule([
181312
- resolve8(import.meta.dir, "..", "..", "core", "build"),
181313
- resolve8(import.meta.dir, "..", "build")
181538
+ resolve9(import.meta.dir, "..", "..", "core", "build"),
181539
+ resolve9(import.meta.dir, "..", "build")
181314
181540
  ]);
181315
181541
  if (!build)
181316
181542
  throw new Error("Could not locate build module");
@@ -181392,10 +181618,10 @@ var start = async (serverEntry, outdir, configPath2, options = {}) => {
181392
181618
  }
181393
181619
  };
181394
181620
  const islandRegistrySpec = buildConfig.islands?.registry;
181395
- const islandRegistryPlugin = islandRegistrySpec ? createIslandRegistryDefinitionPlugin(await loadIslandRegistryBuildInfo(resolve8(islandRegistrySpec))) : undefined;
181621
+ const islandRegistryPlugin = islandRegistrySpec ? createIslandRegistryDefinitionPlugin(await loadIslandRegistryBuildInfo(resolve9(islandRegistrySpec))) : undefined;
181396
181622
  const serverBundle = await Bun.build({
181397
181623
  define: { "process.env.NODE_ENV": '"production"' },
181398
- entrypoints: [resolve8(serverEntry)],
181624
+ entrypoints: [resolve9(serverEntry)],
181399
181625
  external: resolveServerBundleExternals(buildConfig),
181400
181626
  outdir: resolvedOutdir,
181401
181627
  plugins: [
@@ -181409,13 +181635,13 @@ var start = async (serverEntry, outdir, configPath2, options = {}) => {
181409
181635
  if (!serverBundle.success) {
181410
181636
  handleBundleFailure(serverBundle, bundleStart, serverEntry);
181411
181637
  }
181412
- if (!existsSync8(outputPath)) {
181638
+ if (!existsSync9(outputPath)) {
181413
181639
  console.error(cliTag2("\x1B[31m", `Expected output not found: ${outputPath}`));
181414
181640
  process.exit(1);
181415
181641
  }
181416
- if (existsSync8(resolve8(resolvedOutdir, "angular", "vendor", "server"))) {
181642
+ if (existsSync9(resolve9(resolvedOutdir, "angular", "vendor", "server"))) {
181417
181643
  const { readdirSync: readdirSync2 } = await import("fs");
181418
- const vendorDir = resolve8(resolvedOutdir, "angular", "vendor", "server");
181644
+ const vendorDir = resolve9(resolvedOutdir, "angular", "vendor", "server");
181419
181645
  const vendorEntries = readdirSync2(vendorDir).filter((fileName) => fileName.endsWith(".js"));
181420
181646
  const angularServerVendorPaths = {};
181421
181647
  const { relative: pathRelative, dirname: pathDirname } = await import("path");
@@ -181425,7 +181651,7 @@ var start = async (serverEntry, outdir, configPath2, options = {}) => {
181425
181651
  if (scope !== "angular" || rest.length === 0)
181426
181652
  continue;
181427
181653
  const specifier = `@angular/${rest.join("/")}`;
181428
- const relPath = pathRelative(pathDirname(outputPath), resolve8(vendorDir, file));
181654
+ const relPath = pathRelative(pathDirname(outputPath), resolve9(vendorDir, file));
181429
181655
  angularServerVendorPaths[specifier] = relPath.startsWith(".") ? relPath : `./${relPath}`;
181430
181656
  }
181431
181657
  if (Object.keys(angularServerVendorPaths).length > 0) {
@@ -181473,7 +181699,7 @@ init_getDurationString();
181473
181699
  init_instanceRegistry();
181474
181700
  import {
181475
181701
  appendFileSync,
181476
- existsSync as existsSync9,
181702
+ existsSync as existsSync10,
181477
181703
  mkdirSync as mkdirSync7,
181478
181704
  readdirSync as readdirSync2,
181479
181705
  readFileSync as readFileSync12,
@@ -181481,7 +181707,7 @@ import {
181481
181707
  writeFileSync as writeFileSync6
181482
181708
  } from "fs";
181483
181709
  import { createConnection } from "net";
181484
- import { resolve as resolve9 } from "path";
181710
+ import { resolve as resolve10 } from "path";
181485
181711
 
181486
181712
  // src/cli/workspaceTui.ts
181487
181713
  init_constants();
@@ -181757,7 +181983,7 @@ var createWorkspaceTui = ({
181757
181983
  scheduleRender();
181758
181984
  };
181759
181985
  const addLog = (source, message, level = "info") => {
181760
- const cleanMessage = stripAnsi(message).trimEnd();
181986
+ const cleanMessage = stripAnsi2(message).trimEnd();
181761
181987
  if (!cleanMessage) {
181762
181988
  return;
181763
181989
  }
@@ -182043,34 +182269,34 @@ var createWorkspaceTui = ({
182043
182269
 
182044
182270
  // src/cli/scripts/workspace.ts
182045
182271
  init_utils();
182046
- var sourceServerBootstrap2 = resolve9(import.meta.dir, "../../dev/serverBootstrap.ts");
182047
- var serverBootstrap2 = existsSync9(sourceServerBootstrap2) ? sourceServerBootstrap2 : resolve9(import.meta.dir, "../dev/serverBootstrap.js");
182272
+ var sourceServerBootstrap2 = resolve10(import.meta.dir, "../../dev/serverBootstrap.ts");
182273
+ var serverBootstrap2 = existsSync10(sourceServerBootstrap2) ? sourceServerBootstrap2 : resolve10(import.meta.dir, "../dev/serverBootstrap.js");
182048
182274
  var ANSI_REGEX2 = new RegExp(`${String.fromCharCode(ANSI_ESCAPE_CODE)}\\[[0-?]*[ -/]*[@-~]`, "g");
182049
182275
  var sleep = (durationMs) => Bun.sleep(durationMs);
182050
- var stripAnsi2 = (value) => value.replace(ANSI_REGEX2, "");
182276
+ var stripAnsi3 = (value) => value.replace(ANSI_REGEX2, "");
182051
182277
  var sanitizeLogFileName = (value) => value.replace(/[^a-zA-Z0-9._-]/g, "_") || "unknown";
182052
182278
  var createWorkspaceLogSink = (appendLog) => {
182053
- const logDirectory = resolve9(".absolutejs", "workspace", "logs");
182279
+ const logDirectory = resolve10(".absolutejs", "workspace", "logs");
182054
182280
  mkdirSync7(logDirectory, { recursive: true });
182055
- readdirSync2(logDirectory).filter((file) => file.endsWith(".log")).forEach((file) => unlinkSync3(resolve9(logDirectory, file)));
182056
- writeFileSync6(resolve9(logDirectory, "all.log"), "");
182057
- writeFileSync6(resolve9(logDirectory, "workspace.log"), "");
182281
+ readdirSync2(logDirectory).filter((file) => file.endsWith(".log")).forEach((file) => unlinkSync3(resolve10(logDirectory, file)));
182282
+ writeFileSync6(resolve10(logDirectory, "all.log"), "");
182283
+ writeFileSync6(resolve10(logDirectory, "workspace.log"), "");
182058
182284
  const initializedSources = new Set(["workspace"]);
182059
182285
  const writeLog = (source, message, level) => {
182060
- const cleanMessage = stripAnsi2(message).trimEnd();
182286
+ const cleanMessage = stripAnsi3(message).trimEnd();
182061
182287
  if (!cleanMessage) {
182062
182288
  return;
182063
182289
  }
182064
182290
  const timestamp = new Date().toISOString();
182065
182291
  const line = `[${timestamp}] [${level}] [${source}] ${cleanMessage}
182066
182292
  `;
182067
- const sourceFile = resolve9(logDirectory, `${sanitizeLogFileName(source)}.log`);
182293
+ const sourceFile = resolve10(logDirectory, `${sanitizeLogFileName(source)}.log`);
182068
182294
  if (!initializedSources.has(source)) {
182069
182295
  writeFileSync6(sourceFile, "");
182070
182296
  initializedSources.add(source);
182071
182297
  }
182072
182298
  appendFileSync(sourceFile, line);
182073
- appendFileSync(resolve9(logDirectory, "all.log"), line);
182299
+ appendFileSync(resolve10(logDirectory, "all.log"), line);
182074
182300
  };
182075
182301
  return {
182076
182302
  appendLog: (source, message, level = "info") => {
@@ -182094,9 +182320,9 @@ var readPackageVersion3 = (candidate) => {
182094
182320
  };
182095
182321
  var resolvePackageVersion2 = () => {
182096
182322
  const candidates = [
182097
- resolve9(import.meta.dir, "..", "..", "package.json"),
182098
- resolve9(import.meta.dir, "..", "..", "..", "package.json"),
182099
- resolve9(import.meta.dir, "..", "..", "..", "..", "package.json")
182323
+ resolve10(import.meta.dir, "..", "..", "package.json"),
182324
+ resolve10(import.meta.dir, "..", "..", "..", "package.json"),
182325
+ resolve10(import.meta.dir, "..", "..", "..", "..", "package.json")
182100
182326
  ];
182101
182327
  for (const candidate of candidates) {
182102
182328
  const version2 = readPackageVersion3(candidate);
@@ -182450,15 +182676,15 @@ var createWorkspaceServiceEnv = (services) => {
182450
182676
  var getDefinedProcessEnv = () => Object.fromEntries(Object.entries(process.env).filter((entry) => typeof entry[1] === "string"));
182451
182677
  var resolveAbsoluteServiceConfigPath = (service, cwd, options) => {
182452
182678
  if (service.config)
182453
- return resolve9(cwd, service.config);
182679
+ return resolve10(cwd, service.config);
182454
182680
  if (options.configPath)
182455
- return resolve9(options.configPath);
182681
+ return resolve10(options.configPath);
182456
182682
  if (process.env.ABSOLUTE_CONFIG)
182457
- return resolve9(process.env.ABSOLUTE_CONFIG);
182683
+ return resolve10(process.env.ABSOLUTE_CONFIG);
182458
182684
  return;
182459
182685
  };
182460
182686
  var resolveService = (name, service, workspaceEnv, options) => {
182461
- const cwd = resolve9(service.cwd ?? ".");
182687
+ const cwd = resolve10(service.cwd ?? ".");
182462
182688
  const envVars = Object.assign(getDefinedProcessEnv(), workspaceEnv, service.port ? { PORT: String(service.port) } : {}, service.env, {
182463
182689
  ABSOLUTE_INSTANCE_MANAGED: "1",
182464
182690
  ABSOLUTE_WORKSPACE_MANAGED: "1",
@@ -182470,7 +182696,7 @@ var resolveService = (name, service, workspaceEnv, options) => {
182470
182696
  if (isAbsoluteService(service)) {
182471
182697
  const configPath2 = resolveAbsoluteServiceConfigPath(service, cwd, options);
182472
182698
  Object.assign(envVars, configPath2 ? { ABSOLUTE_CONFIG: configPath2 } : {}, {
182473
- ABSOLUTE_SERVER_ENTRY: resolve9(cwd, service.entry ?? DEFAULT_SERVER_ENTRY)
182699
+ ABSOLUTE_SERVER_ENTRY: resolve10(cwd, service.entry ?? DEFAULT_SERVER_ENTRY)
182474
182700
  });
182475
182701
  const command = [
182476
182702
  process.execPath,
@@ -182500,8 +182726,8 @@ var resolveService = (name, service, workspaceEnv, options) => {
182500
182726
  var resolveServiceBuildDirectory = (service) => {
182501
182727
  if (!isAbsoluteService(service))
182502
182728
  return null;
182503
- const cwd = resolve9(service.cwd ?? ".");
182504
- return resolve9(cwd, service.buildDirectory ?? "build");
182729
+ const cwd = resolve10(service.cwd ?? ".");
182730
+ return resolve10(cwd, service.buildDirectory ?? "build");
182505
182731
  };
182506
182732
  var findSharedWorkspaceBuildDirectories = (services) => {
182507
182733
  const byBuildDirectory = new Map;
@@ -182691,7 +182917,7 @@ var workspace = async (subcommand, options) => {
182691
182917
  const resolved = resolveService(name, service, workspaceEnv, options);
182692
182918
  const port = resolveWorkspaceServicePort(resolved.service, resolved.env);
182693
182919
  killStaleServicePort(port);
182694
- if (isAbsoluteService(resolved.service) && resolved.configPath && !existsSync9(resolved.configPath)) {
182920
+ if (isAbsoluteService(resolved.service) && resolved.configPath && !existsSync10(resolved.configPath)) {
182695
182921
  throw new Error(`${name} references missing config "${resolved.configPath}"`);
182696
182922
  }
182697
182923
  serviceBootStartedAt.set(name, performance.now());
@@ -182719,7 +182945,7 @@ var workspace = async (subcommand, options) => {
182719
182945
  frameworks: [],
182720
182946
  host: getServicePublicHost(resolved.service),
182721
182947
  https: getServiceProtocol(resolved.service) === "https",
182722
- logFile: resolve9(workspaceLogs.logDirectory, `${sanitizeLogFileName(name)}.log`),
182948
+ logFile: resolve10(workspaceLogs.logDirectory, `${sanitizeLogFileName(name)}.log`),
182723
182949
  name,
182724
182950
  pid: processHandle.pid,
182725
182951
  port: resolved.service.port ?? null,