@absolutejs/absolute 0.19.0-beta.1037 → 0.19.0-beta.1038

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
@@ -170805,8 +170805,35 @@ var exports_build = {};
170805
170805
  __export(exports_build, {
170806
170806
  build: () => build
170807
170807
  });
170808
- import { resolve as resolve10 } from "path";
170809
- var cliTag3 = (color, message) => `\x1B[2m${formatTimestamp()}\x1B[0m ${color}[cli]\x1B[0m ${color}${message}\x1B[0m`, tryImportBuild2 = async (candidate) => {
170808
+ import { existsSync as existsSync10, readdirSync as readdirSync3, readFileSync as readFileSync13 } from "fs";
170809
+ import { join as join12, resolve as resolve10 } from "path";
170810
+ 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) => {
170811
+ const traceDir = join12(buildDir, ".absolute-trace");
170812
+ if (!existsSync10(traceDir))
170813
+ return;
170814
+ const files = readdirSync3(traceDir).filter((file) => file.endsWith(".json")).sort();
170815
+ const latest = files[files.length - 1];
170816
+ if (latest === undefined)
170817
+ return;
170818
+ const trace = JSON.parse(readFileSync13(join12(traceDir, latest), "utf-8"));
170819
+ const events = Array.isArray(trace.events) ? trace.events : [];
170820
+ if (events.length === 0)
170821
+ return;
170822
+ const slowest = [...events].sort((left, right) => right.durationMs - left.durationMs).slice(0, PROFILE_TOP);
170823
+ const byFramework = FRAMEWORK_KEYS.map((key) => ({
170824
+ ms: events.filter((event) => event.name.includes(key)).reduce((total, event) => total + event.durationMs, 0),
170825
+ name: key
170826
+ })).filter((entry) => entry.ms > 0);
170827
+ const lines = [
170828
+ `
170829
+ \x1B[1mbuild profile\x1B[0m \x1B[2m\xB7 slowest phases\x1B[0m`,
170830
+ ...slowest.map((event) => ` \x1B[2m${getDurationString(event.durationMs).padStart(PROFILE_COL)}\x1B[0m ${event.name}`),
170831
+ `
170832
+ \x1B[2mby framework: ${byFramework.map((entry) => `${entry.name} ${getDurationString(entry.ms)}`).join(" \xB7 ")}\x1B[0m`
170833
+ ];
170834
+ console.log(lines.join(`
170835
+ `));
170836
+ }, tryImportBuild2 = async (candidate) => {
170810
170837
  try {
170811
170838
  const mod = await import(candidate);
170812
170839
  const buildFn = mod.build;
@@ -170824,9 +170851,11 @@ var cliTag3 = (color, message) => `\x1B[2m${formatTimestamp()}\x1B[0m ${color}[c
170824
170851
  return mod;
170825
170852
  }
170826
170853
  return resolveBuildModule2(remaining);
170827
- }, build = async (outdir, configPath2) => {
170854
+ }, build = async (outdir, configPath2, profile = false) => {
170828
170855
  const resolvedOutdir = resolve10(outdir ?? "build");
170829
170856
  const buildStart = performance.now();
170857
+ if (profile)
170858
+ process.env.ABSOLUTE_BUILD_TRACE = "1";
170830
170859
  process.stdout.write(cliTag3("\x1B[36m", "Building assets"));
170831
170860
  const buildConfig = await loadConfig(configPath2);
170832
170861
  buildConfig.buildDirectory = resolvedOutdir;
@@ -170851,18 +170880,21 @@ var cliTag3 = (color, message) => `\x1B[2m${formatTimestamp()}\x1B[0m ${color}[c
170851
170880
  durationMs: Math.round(performance.now() - buildStart)
170852
170881
  });
170853
170882
  console.log(` \x1B[2m(${getDurationString(performance.now() - buildStart)})\x1B[0m`);
170883
+ if (profile)
170884
+ printProfile(resolvedOutdir);
170854
170885
  };
170855
170886
  var init_build = __esm(() => {
170856
170887
  init_getDurationString();
170857
170888
  init_loadConfig();
170858
170889
  init_startupBanner();
170859
170890
  init_telemetryEvent();
170891
+ FRAMEWORK_KEYS = ["react", "vue", "svelte", "angular", "html", "htmx"];
170860
170892
  });
170861
170893
 
170862
170894
  // src/build/scanConventions.ts
170863
170895
  import { basename as basename4 } from "path";
170864
170896
  var {Glob: Glob2 } = globalThis.Bun;
170865
- import { existsSync as existsSync10 } from "fs";
170897
+ import { existsSync as existsSync11 } from "fs";
170866
170898
  var CONVENTION_RE, classifyFile = (file, pageFiles, defaults, pages) => {
170867
170899
  const fileName = basename4(file);
170868
170900
  const match = CONVENTION_RE.exec(fileName);
@@ -170887,7 +170919,7 @@ var CONVENTION_RE, classifyFile = (file, pageFiles, defaults, pages) => {
170887
170919
  else if (kind === "loading")
170888
170920
  pages[pageName].loading = file;
170889
170921
  }, scanConventions = async (pagesDir, pattern) => {
170890
- if (!existsSync10(pagesDir)) {
170922
+ if (!existsSync11(pagesDir)) {
170891
170923
  const pageFiles2 = [];
170892
170924
  return { conventions: undefined, pageFiles: pageFiles2 };
170893
170925
  }
@@ -170922,8 +170954,8 @@ var exports_ls = {};
170922
170954
  __export(exports_ls, {
170923
170955
  runLs: () => runLs
170924
170956
  });
170925
- import { existsSync as existsSync11, readFileSync as readFileSync13, statSync } from "fs";
170926
- import { basename as basename5, extname as extname2, join as join12, relative as relative2 } from "path";
170957
+ import { existsSync as existsSync12, readFileSync as readFileSync14, statSync } from "fs";
170958
+ import { basename as basename5, extname as extname2, join as join13, relative as relative2 } from "path";
170927
170959
  var DEFAULT_BUILD_DIR = "build", LABEL_ORDER, ARTIFACT_SUFFIXES, FRAMEWORK_FIELDS, readStringField = (source, key) => {
170928
170960
  const value = Reflect.get(source, key);
170929
170961
  return typeof value === "string" ? value : undefined;
@@ -170945,13 +170977,13 @@ var DEFAULT_BUILD_DIR = "build", LABEL_ORDER, ARTIFACT_SUFFIXES, FRAMEWORK_FIELD
170945
170977
  const dir = readStringField(source, framework.field);
170946
170978
  return dir === undefined ? [] : [
170947
170979
  {
170948
- dir: join12(baseDir, dir),
170980
+ dir: join13(baseDir, dir),
170949
170981
  label: framework.label,
170950
170982
  pattern: framework.pattern
170951
170983
  }
170952
170984
  ];
170953
170985
  }), scanFramework = async (spec) => {
170954
- const { pageFiles } = await scanConventions(join12(spec.dir, "pages"), spec.pattern);
170986
+ const { pageFiles } = await scanConventions(join13(spec.dir, "pages"), spec.pattern);
170955
170987
  if (pageFiles.length === 0)
170956
170988
  return null;
170957
170989
  const pages = pageFiles.map((file) => ({
@@ -170973,12 +171005,12 @@ var DEFAULT_BUILD_DIR = "build", LABEL_ORDER, ARTIFACT_SUFFIXES, FRAMEWORK_FIELD
170973
171005
  return pages ? [{ label, pages: sortPages(pages) }] : [];
170974
171006
  });
170975
171007
  }, resolveDiskPath = (buildDir, value) => {
170976
- if (existsSync11(value))
171008
+ if (existsSync12(value))
170977
171009
  return value;
170978
- const underBuild = join12(buildDir, value);
170979
- if (existsSync11(underBuild))
171010
+ const underBuild = join13(buildDir, value);
171011
+ if (existsSync12(underBuild))
170980
171012
  return underBuild;
170981
- return join12(process.cwd(), value);
171013
+ return join13(process.cwd(), value);
170982
171014
  }, fileSize = (diskPath) => {
170983
171015
  try {
170984
171016
  return statSync(diskPath).size;
@@ -170986,7 +171018,7 @@ var DEFAULT_BUILD_DIR = "build", LABEL_ORDER, ARTIFACT_SUFFIXES, FRAMEWORK_FIELD
170986
171018
  return 0;
170987
171019
  }
170988
171020
  }, readManifestSizes = (manifestDir) => {
170989
- const manifest = JSON.parse(readFileSync13(join12(manifestDir, "manifest.json"), "utf-8"));
171021
+ const manifest = JSON.parse(readFileSync14(join13(manifestDir, "manifest.json"), "utf-8"));
170990
171022
  const sizes = new Map;
170991
171023
  Object.entries(manifest).forEach(([key, value]) => {
170992
171024
  sizes.set(key, fileSize(resolveDiskPath(manifestDir, value)));
@@ -171005,7 +171037,7 @@ var DEFAULT_BUILD_DIR = "build", LABEL_ORDER, ARTIFACT_SUFFIXES, FRAMEWORK_FIELD
171005
171037
  }))
171006
171038
  })), manifestAge = (manifestPath) => getDurationString(Date.now() - statSync(manifestPath).mtimeMs), firstBuildDir = (candidates) => candidates.map((candidate) => {
171007
171039
  const dir = readStringField(candidate.source, "buildDirectory");
171008
- return dir === undefined ? undefined : join12(candidate.baseDir, dir);
171040
+ return dir === undefined ? undefined : join13(candidate.baseDir, dir);
171009
171041
  }).find((dir) => dir !== undefined), resolveSizesDir = (args, candidates) => parseFlagValue(args, "--outdir") ?? firstBuildDir(candidates) ?? DEFAULT_BUILD_DIR, formatSize = (bytes) => {
171010
171042
  if (bytes === null || bytes === 0)
171011
171043
  return "-";
@@ -171057,6 +171089,25 @@ ${colors.dim}${frameworkCount} ${frameworkCount === 1 ? "framework" : "framework
171057
171089
  }, printDim = (message) => {
171058
171090
  process.stdout.write(`${colors.dim}${message}${colors.reset}
171059
171091
  `);
171092
+ }, SIZE_UNITS, parseBudget = (args) => {
171093
+ const value = parseFlagValue(args, "--budget");
171094
+ if (value === undefined)
171095
+ return null;
171096
+ const match = value.toLowerCase().match(/^([\d.]+)\s*(gb|mb|kb|b)?$/);
171097
+ const amount = match ? Number(match[1]) : NaN;
171098
+ if (!Number.isFinite(amount))
171099
+ return null;
171100
+ return amount * (SIZE_UNITS[match?.[2] ?? "b"] ?? 1);
171101
+ }, reportBudget = (groups, budget) => {
171102
+ const over = groups.flatMap((group) => group.pages).filter((page) => (page.sizeBytes ?? 0) > budget);
171103
+ if (over.length === 0) {
171104
+ printDim(`\u2713 all pages within ${formatSize(budget)} budget`);
171105
+ return;
171106
+ }
171107
+ over.forEach((page) => process.stdout.write(` ${colors.red}\u2717 ${page.name} ${formatSize(page.sizeBytes)} > ${formatSize(budget)}${colors.reset}
171108
+ `));
171109
+ printDim(`${over.length} page${over.length === 1 ? "" : "s"} over budget`);
171110
+ process.exitCode = 1;
171060
171111
  }, guardBrokenPipe = () => {
171061
171112
  process.stdout.on("error", (error) => {
171062
171113
  if (error instanceof Error && "code" in error && error.code === "EPIPE") {
@@ -171084,14 +171135,17 @@ ${colors.dim}${frameworkCount} ${frameworkCount === 1 ? "framework" : "framework
171084
171135
  return;
171085
171136
  }
171086
171137
  const sizesDir = resolveSizesDir(args, candidates);
171087
- const manifestPath = join12(sizesDir, "manifest.json");
171088
- if (!existsSync11(manifestPath)) {
171138
+ const manifestPath = join13(sizesDir, "manifest.json");
171139
+ if (!existsSync12(manifestPath)) {
171089
171140
  printDim(`No build at ${relativeOrSelf(manifestPath)}. Run \`absolute build\` first, or pass \`--outdir <dir>\`.`);
171090
171141
  return;
171091
171142
  }
171092
171143
  const sized = withSizes(groups, pageSizer(readManifestSizes(sizesDir)));
171093
171144
  const note = `${relativeOrSelf(manifestPath)} \xB7 built ${manifestAge(manifestPath)} ago`;
171094
171145
  emit(sized, true, note, wantsJson);
171146
+ const budget = parseBudget(args);
171147
+ if (budget !== null && !wantsJson)
171148
+ reportBudget(sized, budget);
171095
171149
  };
171096
171150
  var init_ls = __esm(() => {
171097
171151
  init_scanConventions();
@@ -171117,6 +171171,12 @@ var init_ls = __esm(() => {
171117
171171
  { field: "htmlDirectory", label: "HTML", pattern: "*.html" },
171118
171172
  { field: "htmxDirectory", label: "HTMX", pattern: "*.html" }
171119
171173
  ];
171174
+ SIZE_UNITS = {
171175
+ b: 1,
171176
+ gb: BYTES_PER_KILOBYTE * BYTES_PER_KILOBYTE * BYTES_PER_KILOBYTE,
171177
+ kb: BYTES_PER_KILOBYTE,
171178
+ mb: BYTES_PER_KILOBYTE * BYTES_PER_KILOBYTE
171179
+ };
171120
171180
  });
171121
171181
 
171122
171182
  // src/utils/formatBytes.ts
@@ -171993,15 +172053,15 @@ __export(exports_env, {
171993
172053
  runEnv: () => runEnv,
171994
172054
  collectEnvVars: () => collectEnvVars
171995
172055
  });
171996
- import { existsSync as existsSync12, readFileSync as readFileSync14 } from "fs";
171997
- import { join as join13 } from "path";
172056
+ import { existsSync as existsSync13, readFileSync as readFileSync15 } from "fs";
172057
+ import { join as join14 } from "path";
171998
172058
  var {env: env3, Glob: Glob3 } = globalThis.Bun;
171999
- var EXTENSIONS = "ts,tsx,js,jsx,mjs,cjs,svelte,vue", STATUS_WIDTH, keysInFile = (text) => [...text.matchAll(/getEnv\(\s*['"]([^'"]+)['"]\s*\)/g)].map((match) => match[1]).filter((key) => key !== undefined), scanPatterns = () => existsSync12(join13(process.cwd(), "src")) ? [`src/**/*.{${EXTENSIONS}}`] : [`*.{${EXTENSIONS}}`], scanEnvUsage = async () => {
172059
+ var EXTENSIONS = "ts,tsx,js,jsx,mjs,cjs,svelte,vue", STATUS_WIDTH, keysInFile = (text) => [...text.matchAll(/getEnv\(\s*['"]([^'"]+)['"]\s*\)/g)].map((match) => match[1]).filter((key) => key !== undefined), scanPatterns = () => existsSync13(join14(process.cwd(), "src")) ? [`src/**/*.{${EXTENSIONS}}`] : [`*.{${EXTENSIONS}}`], scanEnvUsage = async () => {
172000
172060
  const scans = scanPatterns().map((pattern) => Array.fromAsync(new Glob3(pattern).scan({ cwd: process.cwd() })));
172001
172061
  const files = (await Promise.all(scans)).flat();
172002
172062
  const usage = new Map;
172003
172063
  files.forEach((file) => {
172004
- keysInFile(readFileSync14(file, "utf-8")).forEach((key) => {
172064
+ keysInFile(readFileSync15(file, "utf-8")).forEach((key) => {
172005
172065
  usage.set(key, [...usage.get(key) ?? [], file]);
172006
172066
  });
172007
172067
  });
@@ -172059,7 +172119,7 @@ __export(exports_logs, {
172059
172119
  });
172060
172120
  import {
172061
172121
  closeSync as closeSync2,
172062
- existsSync as existsSync13,
172122
+ existsSync as existsSync14,
172063
172123
  openSync as openSync4,
172064
172124
  readSync as readSync2,
172065
172125
  statSync as statSync2,
@@ -172126,7 +172186,7 @@ var DEFAULT_LINES = 40, POLL_MS = 250, LINES_FLAG_SPAN = 2, readFrom = (path, st
172126
172186
  printAvailable(instances);
172127
172187
  return;
172128
172188
  }
172129
- if (match.logFile === null || !existsSync13(match.logFile)) {
172189
+ if (match.logFile === null || !existsSync14(match.logFile)) {
172130
172190
  printDim2(`"${name}" has no captured log (untracked, or started outside the CLI).`);
172131
172191
  return;
172132
172192
  }
@@ -172149,10 +172209,10 @@ var exports_doctor = {};
172149
172209
  __export(exports_doctor, {
172150
172210
  runDoctor: () => runDoctor
172151
172211
  });
172152
- import { existsSync as existsSync14 } from "fs";
172212
+ import { existsSync as existsSync15 } from "fs";
172153
172213
  import { createRequire } from "module";
172154
172214
  import { arch as arch4, platform as platform5 } from "os";
172155
- import { join as join14 } from "path";
172215
+ import { join as join15 } from "path";
172156
172216
  var FRAMEWORK_FIELDS2, projectRequire, check = (status2, label, detail) => ({
172157
172217
  detail,
172158
172218
  label,
@@ -172187,7 +172247,7 @@ var FRAMEWORK_FIELDS2, projectRequire, check = (status2, label, detail) => ({
172187
172247
  return [];
172188
172248
  const label = `${field.replace("Directory", "")} pages`;
172189
172249
  return [
172190
- existsSync14(join14(process.cwd(), dir)) ? check("ok", label, dir) : check("fail", label, `${dir} (missing)`)
172250
+ existsSync15(join15(process.cwd(), dir)) ? check("ok", label, dir) : check("fail", label, `${dir} (missing)`)
172191
172251
  ];
172192
172252
  }), envCheck = async () => {
172193
172253
  const vars = await collectEnvVars();
@@ -172257,7 +172317,7 @@ var init_doctor = __esm(() => {
172257
172317
  "htmlDirectory",
172258
172318
  "htmxDirectory"
172259
172319
  ];
172260
- projectRequire = createRequire(join14(process.cwd(), "package.json"));
172320
+ projectRequire = createRequire(join15(process.cwd(), "package.json"));
172261
172321
  STATUS_MARK = {
172262
172322
  fail: `${colors.red}\u2717${colors.reset}`,
172263
172323
  ok: `${colors.green}\u2713${colors.reset}`,
@@ -172265,9 +172325,81 @@ var init_doctor = __esm(() => {
172265
172325
  };
172266
172326
  });
172267
172327
 
172328
+ // src/cli/scripts/routes.ts
172329
+ var exports_routes = {};
172330
+ __export(exports_routes, {
172331
+ runRoutes: () => runRoutes
172332
+ });
172333
+ var METHOD_COLOR, printDim3 = (message) => {
172334
+ process.stdout.write(`${colors.dim}${message}${colors.reset}
172335
+ `);
172336
+ }, pickServer = (instances) => {
172337
+ const withUrl = instances.filter((instance) => instance.url !== null);
172338
+ return withUrl.find((instance) => instance.source === "dev") ?? withUrl.find((instance) => instance.source !== "untracked") ?? withUrl[0];
172339
+ }, fetchRoutes = async (url) => {
172340
+ try {
172341
+ const response = await fetch(`${url}__absolute/routes`);
172342
+ if (!response.ok)
172343
+ return null;
172344
+ const data = await response.json();
172345
+ if (!Array.isArray(data))
172346
+ return null;
172347
+ return data.map((entry) => ({
172348
+ method: String(entry.method ?? "").toUpperCase(),
172349
+ path: String(entry.path ?? "")
172350
+ }));
172351
+ } catch {
172352
+ return null;
172353
+ }
172354
+ }, runRoutes = async (args) => {
172355
+ const instances = await enrichInstances(await discoverInstances());
172356
+ const server2 = pickServer(instances);
172357
+ if (!server2 || server2.url === null) {
172358
+ printDim3("No running server found. Start one with `absolute dev`, then run `absolute routes`.");
172359
+ return;
172360
+ }
172361
+ const routes = await fetchRoutes(server2.url);
172362
+ if (!routes) {
172363
+ printDim3(`Could not read routes from ${server2.name} \u2014 route introspection needs a dev server.`);
172364
+ return;
172365
+ }
172366
+ const sorted = routes.filter((route) => route.path !== "/__absolute/routes").sort((left, right) => left.path.localeCompare(right.path) || left.method.localeCompare(right.method));
172367
+ if (args.includes("--json")) {
172368
+ process.stdout.write(`${JSON.stringify(sorted, null, 2)}
172369
+ `);
172370
+ return;
172371
+ }
172372
+ if (sorted.length === 0) {
172373
+ printDim3("No routes registered.");
172374
+ return;
172375
+ }
172376
+ const methodWidth = Math.max(...sorted.map((route) => route.method.length));
172377
+ const lines = sorted.map((route) => {
172378
+ const color = METHOD_COLOR[route.method] ?? colors.dim;
172379
+ return ` ${color}${padLine(route.method, methodWidth)}${colors.reset} ${route.path}`;
172380
+ });
172381
+ process.stdout.write(`${lines.join(`
172382
+ `)}
172383
+
172384
+ ${colors.dim}${sorted.length} routes \xB7 ${server2.name}${colors.reset}
172385
+ `);
172386
+ };
172387
+ var init_routes = __esm(() => {
172388
+ init_discoverInstances();
172389
+ init_instanceStatus();
172390
+ init_tuiPrimitives();
172391
+ METHOD_COLOR = {
172392
+ DELETE: colors.red,
172393
+ GET: colors.green,
172394
+ PATCH: colors.yellow,
172395
+ POST: colors.cyan,
172396
+ PUT: colors.yellow
172397
+ };
172398
+ });
172399
+
172268
172400
  // src/build/externalAssetPlugin.ts
172269
- import { copyFileSync as copyFileSync2, existsSync as existsSync15, mkdirSync as mkdirSync7, statSync as statSync3 } from "fs";
172270
- import { basename as basename6, dirname as dirname4, join as join15, resolve as resolve11 } from "path";
172401
+ import { copyFileSync as copyFileSync2, existsSync as existsSync16, mkdirSync as mkdirSync7, statSync as statSync3 } from "fs";
172402
+ import { basename as basename6, dirname as dirname4, join as join16, resolve as resolve11 } from "path";
172271
172403
  var createExternalAssetPlugin = (outDir, userSourceRoots = []) => ({
172272
172404
  name: "absolute-external-asset",
172273
172405
  setup(bld) {
@@ -172288,12 +172420,12 @@ var createExternalAssetPlugin = (outDir, userSourceRoots = []) => ({
172288
172420
  if (!relPath)
172289
172421
  continue;
172290
172422
  const assetPath = resolve11(sourceDir, relPath);
172291
- if (!existsSync15(assetPath))
172423
+ if (!existsSync16(assetPath))
172292
172424
  continue;
172293
172425
  if (!statSync3(assetPath).isFile())
172294
172426
  continue;
172295
- const targetPath = join15(outDir, basename6(assetPath));
172296
- if (existsSync15(targetPath))
172427
+ const targetPath = join16(outDir, basename6(assetPath));
172428
+ if (existsSync16(targetPath))
172297
172429
  continue;
172298
172430
  mkdirSync7(dirname4(targetPath), { recursive: true });
172299
172431
  copyFileSync2(assetPath, targetPath);
@@ -172313,16 +172445,16 @@ __export(exports_compile, {
172313
172445
  var {env: env4 } = globalThis.Bun;
172314
172446
  import {
172315
172447
  cpSync,
172316
- existsSync as existsSync16,
172448
+ existsSync as existsSync17,
172317
172449
  mkdirSync as mkdirSync8,
172318
- readdirSync as readdirSync3,
172319
- readFileSync as readFileSync15,
172450
+ readdirSync as readdirSync4,
172451
+ readFileSync as readFileSync16,
172320
172452
  rmSync as rmSync5,
172321
172453
  statSync as statSync4,
172322
172454
  unlinkSync as unlinkSync4,
172323
172455
  writeFileSync as writeFileSync6
172324
172456
  } from "fs";
172325
- import { basename as basename7, dirname as dirname5, join as join16, relative as relative3, resolve as resolve12 } from "path";
172457
+ import { basename as basename7, dirname as dirname5, join as join17, relative as relative3, resolve as resolve12 } from "path";
172326
172458
  var cliTag4 = (color, message) => `\x1B[2m${formatTimestamp()}\x1B[0m ${color}[cli]\x1B[0m ${color}${message}\x1B[0m`, compileBanner = (version2) => {
172327
172459
  const resolvedVersion = version2 || "unknown";
172328
172460
  console.log("");
@@ -172330,14 +172462,14 @@ var cliTag4 = (color, message) => `\x1B[2m${formatTimestamp()}\x1B[0m ${color}[c
172330
172462
  console.log("");
172331
172463
  }, collectFiles2 = (dir) => {
172332
172464
  const result = [];
172333
- let pending = readdirSync3(dir, { withFileTypes: true });
172465
+ let pending = readdirSync4(dir, { withFileTypes: true });
172334
172466
  while (pending.length > 0) {
172335
172467
  const entry = pending.pop();
172336
172468
  if (!entry)
172337
172469
  continue;
172338
- const fullPath = join16(entry.parentPath, entry.name);
172470
+ const fullPath = join17(entry.parentPath, entry.name);
172339
172471
  if (entry.isDirectory())
172340
- pending = pending.concat(readdirSync3(fullPath, { withFileTypes: true }));
172472
+ pending = pending.concat(readdirSync4(fullPath, { withFileTypes: true }));
172341
172473
  else
172342
172474
  result.push(fullPath);
172343
172475
  }
@@ -172350,16 +172482,16 @@ var cliTag4 = (color, message) => `\x1B[2m${formatTimestamp()}\x1B[0m ${color}[c
172350
172482
  return `./${parts.join("/")}`;
172351
172483
  }, collectProjectSourceFiles = (dir) => {
172352
172484
  const result = [];
172353
- let pending = readdirSync3(dir, { withFileTypes: true });
172485
+ let pending = readdirSync4(dir, { withFileTypes: true });
172354
172486
  while (pending.length > 0) {
172355
172487
  const entry = pending.pop();
172356
172488
  if (!entry)
172357
172489
  continue;
172358
- const fullPath = join16(entry.parentPath, entry.name);
172490
+ const fullPath = join17(entry.parentPath, entry.name);
172359
172491
  if (entry.isDirectory()) {
172360
172492
  if (SERVER_RUNTIME_SCAN_SKIP_DIRS.has(entry.name))
172361
172493
  continue;
172362
- pending = pending.concat(readdirSync3(fullPath, { withFileTypes: true }));
172494
+ pending = pending.concat(readdirSync4(fullPath, { withFileTypes: true }));
172363
172495
  } else if (hasSourceExtension(fullPath)) {
172364
172496
  result.push(fullPath);
172365
172497
  }
@@ -172370,7 +172502,7 @@ var cliTag4 = (color, message) => `\x1B[2m${formatTimestamp()}\x1B[0m ${color}[c
172370
172502
  const normalizedOutdir = resolve12(outdir);
172371
172503
  const copyReference = (filePath, relPath) => {
172372
172504
  const assetSource = resolve12(dirname5(filePath), relPath);
172373
- if (!existsSync16(assetSource) || !statSync4(assetSource).isFile())
172505
+ if (!existsSync17(assetSource) || !statSync4(assetSource).isFile())
172374
172506
  return;
172375
172507
  const assetTarget = resolve12(normalizedOutdir, relPath.replace(/^\.\//, ""));
172376
172508
  if (assetTarget !== normalizedOutdir && !assetTarget.startsWith(`${normalizedOutdir}/`))
@@ -172382,7 +172514,7 @@ var cliTag4 = (color, message) => `\x1B[2m${formatTimestamp()}\x1B[0m ${color}[c
172382
172514
  cpSync(assetSource, assetTarget, { force: true });
172383
172515
  };
172384
172516
  for (const filePath of collectProjectSourceFiles(process.cwd())) {
172385
- const source = readFileSync15(filePath, "utf-8");
172517
+ const source = readFileSync16(filePath, "utf-8");
172386
172518
  SERVER_RUNTIME_ASSET_RE.lastIndex = 0;
172387
172519
  let match;
172388
172520
  while ((match = SERVER_RUNTIME_ASSET_RE.exec(source)) !== null) {
@@ -172411,7 +172543,7 @@ var cliTag4 = (color, message) => `\x1B[2m${formatTimestamp()}\x1B[0m ${color}[c
172411
172543
  }
172412
172544
  }, readPackageVersion4 = (candidate) => {
172413
172545
  try {
172414
- const pkg = JSON.parse(readFileSync15(candidate, "utf-8"));
172546
+ const pkg = JSON.parse(readFileSync16(candidate, "utf-8"));
172415
172547
  if (pkg.name !== "@absolutejs/absolute")
172416
172548
  return null;
172417
172549
  const ver = pkg.version;
@@ -172454,7 +172586,7 @@ var cliTag4 = (color, message) => `\x1B[2m${formatTimestamp()}\x1B[0m ${color}[c
172454
172586
  resolve12(import.meta.dir, "..", "..", "..", "src", "react", "jsxDevRuntimeCompat.ts")
172455
172587
  ];
172456
172588
  for (const candidate of candidates) {
172457
- if (existsSync16(candidate))
172589
+ if (existsSync17(candidate))
172458
172590
  return candidate;
172459
172591
  }
172460
172592
  return resolve12(import.meta.dir, "..", "..", "react", "jsxDevRuntimeCompat.js");
@@ -172470,7 +172602,7 @@ var cliTag4 = (color, message) => `\x1B[2m${formatTimestamp()}\x1B[0m ${color}[c
172470
172602
  return true;
172471
172603
  }, tryReadNodePackageJson = (packageDir) => {
172472
172604
  try {
172473
- return JSON.parse(readFileSync15(join16(packageDir, "package.json"), "utf-8"));
172605
+ return JSON.parse(readFileSync16(join17(packageDir, "package.json"), "utf-8"));
172474
172606
  } catch {
172475
172607
  return null;
172476
172608
  }
@@ -172482,7 +172614,7 @@ var cliTag4 = (color, message) => `\x1B[2m${formatTimestamp()}\x1B[0m ${color}[c
172482
172614
  if (!pkg)
172483
172615
  return;
172484
172616
  seen.add(specifier);
172485
- const destDir = join16(outdir, "node_modules", ...specifier.split("/"));
172617
+ const destDir = join17(outdir, "node_modules", ...specifier.split("/"));
172486
172618
  rmSync5(destDir, { force: true, recursive: true });
172487
172619
  cpSync(srcDir, destDir, {
172488
172620
  force: true,
@@ -172505,7 +172637,7 @@ var cliTag4 = (color, message) => `\x1B[2m${formatTimestamp()}\x1B[0m ${color}[c
172505
172637
  if (!buildConfig.angularDirectory)
172506
172638
  return;
172507
172639
  const angularScopeDir = resolve12(process.cwd(), "node_modules", "@angular");
172508
- const angularPackages = existsSync16(angularScopeDir) ? readdirSync3(angularScopeDir, { withFileTypes: true }).filter((entry) => entry.isDirectory()).filter((entry) => entry.name !== "compiler-cli").map((entry) => `@angular/${entry.name}`) : [];
172640
+ const angularPackages = existsSync17(angularScopeDir) ? readdirSync4(angularScopeDir, { withFileTypes: true }).filter((entry) => entry.isDirectory()).filter((entry) => entry.name !== "compiler-cli").map((entry) => `@angular/${entry.name}`) : [];
172509
172641
  const roots = new Set([...angularPackages, "rxjs", "tslib", "typescript"]);
172510
172642
  const seen = new Set;
172511
172643
  for (const specifier of roots) {
@@ -172522,16 +172654,16 @@ var cliTag4 = (color, message) => `\x1B[2m${formatTimestamp()}\x1B[0m ${color}[c
172522
172654
  }
172523
172655
  copyAngularRuntimePackages(buildConfig, outdir);
172524
172656
  }, collectRuntimePackageSpecifiers = (distDir) => {
172525
- const nodeModulesDir = join16(distDir, "node_modules");
172526
- if (!existsSync16(nodeModulesDir))
172657
+ const nodeModulesDir = join17(distDir, "node_modules");
172658
+ if (!existsSync17(nodeModulesDir))
172527
172659
  return [];
172528
172660
  const specifiers = [];
172529
- for (const entry of readdirSync3(nodeModulesDir, { withFileTypes: true })) {
172661
+ for (const entry of readdirSync4(nodeModulesDir, { withFileTypes: true })) {
172530
172662
  if (!entry.isDirectory())
172531
172663
  continue;
172532
172664
  if (entry.name.startsWith("@")) {
172533
- const scopeDir = join16(nodeModulesDir, entry.name);
172534
- for (const scopedEntry of readdirSync3(scopeDir, {
172665
+ const scopeDir = join17(nodeModulesDir, entry.name);
172666
+ for (const scopedEntry of readdirSync4(scopeDir, {
172535
172667
  withFileTypes: true
172536
172668
  })) {
172537
172669
  if (scopedEntry.isDirectory()) {
@@ -172562,18 +172694,18 @@ var cliTag4 = (color, message) => `\x1B[2m${formatTimestamp()}\x1B[0m ${color}[c
172562
172694
  const packageSpecifier = packageSpecifiers.find((root) => specifier === root || specifier.startsWith(`${root}/`));
172563
172695
  if (!packageSpecifier)
172564
172696
  return null;
172565
- const packageDir = join16(distDir, "node_modules", ...packageSpecifier.split("/"));
172697
+ const packageDir = join17(distDir, "node_modules", ...packageSpecifier.split("/"));
172566
172698
  const subpath = specifier.slice(packageSpecifier.length);
172567
- const subPackageDir = subpath ? join16(packageDir, ...subpath.slice(1).split("/")) : null;
172568
- const resolvedPackageDir = subPackageDir && existsSync16(join16(subPackageDir, "package.json")) ? subPackageDir : packageDir;
172569
- const packageJsonPath = join16(resolvedPackageDir, "package.json");
172570
- if (!existsSync16(packageJsonPath))
172699
+ const subPackageDir = subpath ? join17(packageDir, ...subpath.slice(1).split("/")) : null;
172700
+ const resolvedPackageDir = subPackageDir && existsSync17(join17(subPackageDir, "package.json")) ? subPackageDir : packageDir;
172701
+ const packageJsonPath = join17(resolvedPackageDir, "package.json");
172702
+ if (!existsSync17(packageJsonPath))
172571
172703
  return null;
172572
- const pkg = JSON.parse(readFileSync15(packageJsonPath, "utf-8"));
172704
+ const pkg = JSON.parse(readFileSync16(packageJsonPath, "utf-8"));
172573
172705
  const exportKey = resolvedPackageDir !== subPackageDir && subpath ? `.${subpath}` : ".";
172574
172706
  const rootExport = pkg.exports?.[exportKey];
172575
172707
  const entry = pickExportEntry(rootExport) ?? (resolvedPackageDir === subPackageDir || !subpath ? pkg.module ?? pkg.main ?? "index.js" : `.${subpath}`);
172576
- return join16(resolvedPackageDir, entry);
172708
+ return join17(resolvedPackageDir, entry);
172577
172709
  }, RUNTIME_JS_EXTENSIONS, MODULE_SPECIFIER_RE, isRuntimeJsFile = (filePath) => RUNTIME_JS_EXTENSIONS.some((extension) => filePath.endsWith(extension)), isNodeModulesPath = (filePath) => filePath.split(/[\\/]/).includes("node_modules"), isFile = (filePath) => {
172578
172710
  try {
172579
172711
  return statSync4(filePath).isFile();
@@ -172586,13 +172718,13 @@ var cliTag4 = (color, message) => `\x1B[2m${formatTimestamp()}\x1B[0m ${color}[c
172586
172718
  const candidates = [
172587
172719
  candidate,
172588
172720
  ...RUNTIME_JS_EXTENSIONS.map((extension) => `${candidate}${extension}`),
172589
- ...RUNTIME_JS_EXTENSIONS.map((extension) => join16(candidate, `index${extension}`))
172721
+ ...RUNTIME_JS_EXTENSIONS.map((extension) => join17(candidate, `index${extension}`))
172590
172722
  ];
172591
172723
  return candidates.find((filePath) => isRuntimeJsFile(filePath) && isFile(filePath)) ?? null;
172592
172724
  }, findContainingRuntimePackageDir = (filePath) => {
172593
172725
  let dir = dirname5(filePath);
172594
172726
  while (dir !== dirname5(dir)) {
172595
- if (isNodeModulesPath(dir) && existsSync16(join16(dir, "package.json"))) {
172727
+ if (isNodeModulesPath(dir) && existsSync17(join17(dir, "package.json"))) {
172596
172728
  return dir;
172597
172729
  }
172598
172730
  dir = dirname5(dir);
@@ -172608,7 +172740,7 @@ var cliTag4 = (color, message) => `\x1B[2m${formatTimestamp()}\x1B[0m ${color}[c
172608
172740
  const entry = pickExportEntry(pkg?.imports?.[specifier]);
172609
172741
  if (!entry)
172610
172742
  return null;
172611
- return join16(packageDir, entry);
172743
+ return join17(packageDir, entry);
172612
172744
  }, collectRuntimeRewriteRoots = (distDir) => collectFiles2(distDir).filter((filePath) => isRuntimeJsFile(filePath) && !isNodeModulesPath(filePath)), rewriteRuntimeModuleSpecifiers = (distDir) => {
172613
172745
  const packageSpecifiers = collectRuntimePackageSpecifiers(distDir);
172614
172746
  if (packageSpecifiers.length === 0)
@@ -172627,7 +172759,7 @@ var cliTag4 = (color, message) => `\x1B[2m${formatTimestamp()}\x1B[0m ${color}[c
172627
172759
  if (!filePath || seen.has(filePath))
172628
172760
  continue;
172629
172761
  seen.add(filePath);
172630
- const source = readFileSync15(filePath, "utf-8");
172762
+ const source = readFileSync16(filePath, "utf-8");
172631
172763
  const rewritten = source.replace(MODULE_SPECIFIER_RE, (match, prefix, quote, specifier) => {
172632
172764
  if (typeof specifier === "string" && specifier.startsWith(".")) {
172633
172765
  enqueue(resolveRuntimeJsFile(resolve12(dirname5(filePath), specifier)));
@@ -173165,13 +173297,13 @@ console.log(\`
173165
173297
  process.exit(1);
173166
173298
  }
173167
173299
  const outputPath = resolve12(resolvedOutdir, `${entryName}.js`);
173168
- if (!existsSync16(outputPath)) {
173300
+ if (!existsSync17(outputPath)) {
173169
173301
  console.error(cliTag4("\x1B[31m", `Expected output not found: ${outputPath}`));
173170
173302
  process.exit(1);
173171
173303
  }
173172
- if (existsSync16(resolve12(resolvedOutdir, "angular", "vendor", "server"))) {
173304
+ if (existsSync17(resolve12(resolvedOutdir, "angular", "vendor", "server"))) {
173173
173305
  const vendorDir = resolve12(resolvedOutdir, "angular", "vendor", "server");
173174
- const vendorEntries = readdirSync3(vendorDir).filter((f) => f.endsWith(".js"));
173306
+ const vendorEntries = readdirSync4(vendorDir).filter((f) => f.endsWith(".js"));
173175
173307
  const angularServerVendorPaths = {};
173176
173308
  for (const file of vendorEntries) {
173177
173309
  const stem = file.replace(/\.js$/, "");
@@ -173191,7 +173323,7 @@ console.log(\`
173191
173323
  copyServerRuntimeAssetReferences(resolvedOutdir);
173192
173324
  const prerenderStart = performance.now();
173193
173325
  process.stdout.write(cliTag4("\x1B[36m", "Pre-rendering pages"));
173194
- rmSync5(join16(resolvedOutdir, "_prerendered"), {
173326
+ rmSync5(join17(resolvedOutdir, "_prerendered"), {
173195
173327
  force: true,
173196
173328
  recursive: true
173197
173329
  });
@@ -173210,7 +173342,7 @@ console.log(\`
173210
173342
  const compileStart = performance.now();
173211
173343
  process.stdout.write(cliTag4("\x1B[36m", "Compiling standalone executable"));
173212
173344
  const entrypointCode = generateEntrypoint(resolvedOutdir, serverEntry, prerenderMap, absoluteVersion, buildConfig);
173213
- const entrypointPath = join16(resolvedOutdir, "_compile_entrypoint.ts");
173345
+ const entrypointPath = join17(resolvedOutdir, "_compile_entrypoint.ts");
173214
173346
  await Bun.write(entrypointPath, entrypointCode);
173215
173347
  mkdirSync8(dirname5(resolvedOutfile), { recursive: true });
173216
173348
  const result = await Bun.build({
@@ -173306,11 +173438,11 @@ var exports_typecheck = {};
173306
173438
  __export(exports_typecheck, {
173307
173439
  typecheck: () => typecheck
173308
173440
  });
173309
- import { resolve as resolve13, join as join17 } from "path";
173310
- import { existsSync as existsSync17, readFileSync as readFileSync16 } from "fs";
173441
+ import { resolve as resolve13, join as join18 } from "path";
173442
+ import { existsSync as existsSync18, readFileSync as readFileSync17 } from "fs";
173311
173443
  import { mkdir as mkdir2, writeFile } from "fs/promises";
173312
173444
  var isCommandService3 = (service) => service.kind === "command" || Array.isArray(service.command), resolveConfigPath = (configPath2) => resolve13(configPath2 ?? process.env.ABSOLUTE_CONFIG ?? "absolute.config.ts"), getTypecheckTargets = async (configPath2) => {
173313
- if (!existsSync17(resolveConfigPath(configPath2))) {
173445
+ if (!existsSync18(resolveConfigPath(configPath2))) {
173314
173446
  return [{}];
173315
173447
  }
173316
173448
  const rawConfig = await loadRawConfig(configPath2);
@@ -173331,7 +173463,7 @@ var isCommandService3 = (service) => service.kind === "command" || Array.isArray
173331
173463
  return { exitCode, name, output: (stdout + stderr).trim() };
173332
173464
  }, shellEscape = (value) => `'${value.replaceAll("'", "'\\''")}'`, runShell = async (name, command) => run(name, ["/bin/bash", "-lc", command]), findBin = (name) => {
173333
173465
  const local = resolve13("node_modules", ".bin", name);
173334
- return existsSync17(local) ? local : null;
173466
+ return existsSync18(local) ? local : null;
173335
173467
  }, ANSI_COLOR_REGEX, ANSI_PURPLE_REGEX, ANSI_CYAN_REGEX, ANSI_TOKEN_END_REGEX, stripAnsi3 = (str) => str.replace(ANSI_COLOR_REGEX, ""), formatSvelteOutput = (output) => {
173336
173468
  const cwd = `${process.cwd()}/`;
173337
173469
  const summaryMatch = stripAnsi3(output).match(/svelte-check found (\d+) error/);
@@ -173383,10 +173515,10 @@ Found ${errorCount} error${suffix}.`;
173383
173515
  resolve13(import.meta.dir, "../../types", fileName),
173384
173516
  resolve13(import.meta.dir, "../../../types", fileName)
173385
173517
  ];
173386
- return candidates.find((candidate) => existsSync17(candidate)) ?? candidates[0];
173518
+ return candidates.find((candidate) => existsSync18(candidate)) ?? candidates[0];
173387
173519
  }, ABSOLUTE_TYPECHECK_FILES, readProjectTsconfig = () => {
173388
173520
  try {
173389
- return JSON.parse(readFileSync16(resolve13("tsconfig.json"), "utf-8"));
173521
+ return JSON.parse(readFileSync17(resolve13("tsconfig.json"), "utf-8"));
173390
173522
  } catch {
173391
173523
  return {};
173392
173524
  }
@@ -173414,7 +173546,7 @@ Found ${errorCount} error${suffix}.`;
173414
173546
  console.error("\x1B[31m\u2717\x1B[0m vue-tsc is required for Vue type checking. Install it: bun add -d vue-tsc");
173415
173547
  process.exit(1);
173416
173548
  }
173417
- const vueTsconfigPath = join17(cacheDir, "tsconfig.vue-check.json");
173549
+ const vueTsconfigPath = join18(cacheDir, "tsconfig.vue-check.json");
173418
173550
  return writeFile(vueTsconfigPath, JSON.stringify({
173419
173551
  compilerOptions: {
173420
173552
  rootDir: ".."
@@ -173429,7 +173561,7 @@ Found ${errorCount} error${suffix}.`;
173429
173561
  resolve13(vueTsconfigPath),
173430
173562
  "--incremental",
173431
173563
  "--tsBuildInfoFile",
173432
- join17(cacheDir, "vue-tsc.tsbuildinfo"),
173564
+ join18(cacheDir, "vue-tsc.tsbuildinfo"),
173433
173565
  "--pretty"
173434
173566
  ]));
173435
173567
  }, buildAngularCheck = async (cacheDir, angularDir) => {
@@ -173438,7 +173570,7 @@ Found ${errorCount} error${suffix}.`;
173438
173570
  console.error("\x1B[31m\u2717\x1B[0m @angular/compiler-cli is required for Angular type checking. Install it: bun add -d @angular/compiler-cli");
173439
173571
  process.exit(1);
173440
173572
  }
173441
- const angularTsconfigPath = join17(cacheDir, "tsconfig.angular-check.json");
173573
+ const angularTsconfigPath = join18(cacheDir, "tsconfig.angular-check.json");
173442
173574
  await writeFile(angularTsconfigPath, JSON.stringify({
173443
173575
  angularCompilerOptions: {
173444
173576
  strictTemplates: true
@@ -173458,7 +173590,7 @@ Found ${errorCount} error${suffix}.`;
173458
173590
  console.error("\x1B[31m\u2717\x1B[0m typescript is required for type checking. Install it: bun add -d typescript");
173459
173591
  process.exit(1);
173460
173592
  }
173461
- const tscConfigPath = join17(cacheDir, "tsconfig.typecheck.json");
173593
+ const tscConfigPath = join18(cacheDir, "tsconfig.typecheck.json");
173462
173594
  return writeFile(tscConfigPath, JSON.stringify({
173463
173595
  compilerOptions: {
173464
173596
  rootDir: ".."
@@ -173473,7 +173605,7 @@ Found ${errorCount} error${suffix}.`;
173473
173605
  resolve13(tscConfigPath),
173474
173606
  "--incremental",
173475
173607
  "--tsBuildInfoFile",
173476
- join17(cacheDir, "tsc.tsbuildinfo"),
173608
+ join18(cacheDir, "tsc.tsbuildinfo"),
173477
173609
  "--pretty"
173478
173610
  ]));
173479
173611
  }, buildSvelteCheck = async (cacheDir, svelteDir) => {
@@ -173482,7 +173614,7 @@ Found ${errorCount} error${suffix}.`;
173482
173614
  console.error("\x1B[31m\u2717\x1B[0m svelte-check is required for Svelte type checking. Install it: bun add -d svelte-check");
173483
173615
  process.exit(1);
173484
173616
  }
173485
- const svelteTsconfigPath = join17(cacheDir, "tsconfig.svelte-check.json");
173617
+ const svelteTsconfigPath = join18(cacheDir, "tsconfig.svelte-check.json");
173486
173618
  await writeFile(svelteTsconfigPath, JSON.stringify({
173487
173619
  extends: resolve13("tsconfig.json"),
173488
173620
  files: ABSOLUTE_TYPECHECK_FILES,
@@ -177156,7 +177288,7 @@ if (command === "dev") {
177156
177288
  const outdir = parseNamedArg("--outdir");
177157
177289
  const configPath2 = parseNamedArg("--config");
177158
177290
  const { build: build2 } = await Promise.resolve().then(() => (init_build(), exports_build));
177159
- await build2(outdir, configPath2);
177291
+ await build2(outdir, configPath2, args.includes("--profile"));
177160
177292
  } else if (command === "workspace") {
177161
177293
  sendTelemetryEvent("cli:command", {
177162
177294
  command: `workspace:${workspaceCommand ?? "unknown"}`
@@ -177201,6 +177333,10 @@ if (command === "dev") {
177201
177333
  sendTelemetryEvent("cli:command", { command: "doctor" });
177202
177334
  const { runDoctor: runDoctor2 } = await Promise.resolve().then(() => (init_doctor(), exports_doctor));
177203
177335
  await runDoctor2(args);
177336
+ } else if (command === "routes") {
177337
+ sendTelemetryEvent("cli:command", { command: "routes" });
177338
+ const { runRoutes: runRoutes2 } = await Promise.resolve().then(() => (init_routes(), exports_routes));
177339
+ await runRoutes2(args);
177204
177340
  } else if (command === "info") {
177205
177341
  sendTelemetryEvent("cli:command", { command });
177206
177342
  info();
@@ -177236,7 +177372,7 @@ if (command === "dev") {
177236
177372
  console.error("Commands:");
177237
177373
  console.error(" dev [entry] Start development server");
177238
177374
  console.error(" workspace dev [--no-tui] Start multi-service workspace dev");
177239
- console.error(" build [--outdir dir] Build production assets");
177375
+ console.error(" build [--outdir dir] [--profile] Build production assets");
177240
177376
  console.error(" start [entry] [--outdir dir] Start production server");
177241
177377
  console.error(" compile [entry] [--outdir dir] [--outfile path] Compile standalone executable");
177242
177378
  console.error(" config [--port n] Open the unified config UI (ESLint, tsconfig, Prettier)");
@@ -177245,10 +177381,11 @@ if (command === "dev") {
177245
177381
  console.error(" eslint Run ESLint (cached)");
177246
177382
  console.error(" info Print system info for bug reports");
177247
177383
  console.error(" logs <name> [-f] [-n <lines>] Tail a running server's log by name");
177248
- console.error(" ls [--sizes] [--json] List the project's pages by framework (from source)");
177384
+ console.error(" ls [--sizes] [--budget <size>] [--json] List the project's pages by framework");
177249
177385
  console.error(" mem [--json] Memory report (RSS) for running servers, plus system usage");
177250
177386
  console.error(" ps [--watch] [--json] [--kill <pid|port>] [--kill-all] List/manage running servers");
177251
177387
  console.error(" prettier Run Prettier check (cached)");
177388
+ console.error(" routes [--json] List every route (pages + API) of a running dev server");
177252
177389
  console.error(" typecheck Run type checkers for all frameworks");
177253
177390
  console.error(" telemetry Manage anonymous telemetry");
177254
177391
  console.error(" tunnel-relay Run the public reverse-tunnel relay (for webhook dev)");