@akanjs/cli 3.2.0-rc.0 → 3.2.0-rc.10
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/.build-stamp +2 -1
- package/{CodeAgent-h6g8dg3a.js → CodeAgent-fk66n37w.js} +3 -3
- package/{CodeTui-n9gacepn.js → CodeTui-4rf1mqmv.js} +1 -1
- package/README.ko.md +26 -1
- package/README.md +26 -1
- package/TunnelShare-44er4e29.js +15 -0
- package/{agent.command-2f657613.js → agent.command-7g9czkkd.js} +20 -19
- package/akanCode.js +6 -6
- package/{application.command-yb8v177e.js → application.command-00spg55s.js} +31 -24
- package/{applicationBuildRunner-sctcmkyx.js → applicationBuildRunner-f4yf0qyc.js} +9 -7
- package/buildBatch.proc.js +7 -6
- package/{cloud.command-et06ja22.js → cloud.command-ab704p0g.js} +24 -25
- package/cloud.script-4p4y0s7e.js +31 -0
- package/{code.command-7m67c7zc.js → code.command-m6c9xk56.js} +7 -6
- package/{context.command-569z0rqf.js → context.command-hgcgxtdk.js} +20 -19
- package/context.runner-w071gmc3.js +30 -0
- package/{devTui-evr3b35y.js → devTui-h77zrjv5.js} +1 -1
- package/{guideline.command-gnv3e8p8.js → guideline.command-6yz6d4hf.js} +3 -2
- package/guidelines/agentRule/agentRule.instruction.md +4 -3
- package/guidelines/conventions/core.md +1 -1
- package/guidelines/conventions/rules/app.md +3 -0
- package/guidelines/conventions/rules/page.md +5 -0
- package/guidelines/errorCodes/errorCodes.instruction.md +140 -0
- package/guidelines/fieldRule/fieldRule.instruction.md +2 -1
- package/guidelines/mcpRule/mcpRule.instruction.md +28 -0
- package/guidelines/pageRule/pageRule.instruction.md +5 -0
- package/guidelines/runtimeRule/runtimeRule.instruction.md +5 -1
- package/guidelines/transportRule/transportRule.instruction.md +5 -0
- package/incrementalBuilder.proc.js +8 -7
- package/{index-vkzfk7qt.js → index-097bjwvm.js} +40 -30
- package/{index-93ewzmp6.js → index-23d8gw08.js} +165 -102
- package/{index-p6hjwt2d.js → index-41mfhgq0.js} +72 -26
- package/{index-ktb3wcqz.js → index-4k9nv4m3.js} +71 -81
- package/{index-ryrm5z2c.js → index-5jwx4bf2.js} +69 -33
- package/{index-5w9my9qe.js → index-6eptmk8z.js} +30 -20
- package/{index-d4n1wmrz.js → index-6fnrhpn1.js} +8 -4
- package/{index-kpdv34rq.js → index-6qtxs86x.js} +10 -7
- package/{index-ed6ea0qp.js → index-6z57w95f.js} +1 -1
- package/{index-drz9e84d.js → index-7ky4brfy.js} +2 -2
- package/{index-8g7tdsk4.js → index-849qvd7t.js} +58 -29
- package/{index-1q1cjn8s.js → index-9xh4zvw3.js} +94 -53
- package/{index-48d5qsj3.js → index-adj7qmz9.js} +23 -15
- package/{index-fjr4d6yd.js → index-apcr1qgk.js} +458 -304
- package/{index-8ts9774g.js → index-aybfcx58.js} +9 -4
- package/{index-3wjbhj2n.js → index-b3pr4ee6.js} +1 -1
- package/{index-tenw3mah.js → index-b4qq3rq0.js} +32 -7
- package/{index-thckcabc.js → index-bper31wr.js} +24 -6
- package/{index-jdamtr7e.js → index-bxkx0x03.js} +17 -10
- package/{index-0fb3cpbt.js → index-c3r23w24.js} +9 -7
- package/{index-8pb9yvp8.js → index-dfsa009c.js} +148 -31
- package/{index-zpv14wpy.js → index-dsg50er9.js} +3 -3
- package/{index-hqrkqxx2.js → index-e5f6czck.js} +46 -7
- package/{index-sy481q2x.js → index-frvjq1rd.js} +1 -1
- package/{index-abgh0jve.js → index-grt0e6kk.js} +1 -1
- package/{index-e3vmjtph.js → index-hf9nvwam.js} +7 -2
- package/{index-zxsygkda.js → index-hhagjhkh.js} +7 -7
- package/index-j4yvgfhr.js +70 -0
- package/{index-s2grpzef.js → index-k2r3hmbz.js} +6 -4
- package/{index-7y5yghjg.js → index-nd39rssn.js} +1162 -435
- package/{index-6wpaq392.js → index-p4htjyvk.js} +44 -5
- package/{index-aj3ehkcx.js → index-p54s83sz.js} +1 -1
- package/{index-7xdpww43.js → index-rdx8cyv2.js} +342 -134
- package/{index-sr5da35e.js → index-sq9d0jhj.js} +21 -18
- package/{index-eajbmk10.js → index-t4d0ckde.js} +2 -2
- package/{index-mqntfzv5.js → index-t8h09yjs.js} +7 -2
- package/index-va90m8nd.js +25 -0
- package/{index-rc5fvqj2.js → index-xfv2p7b5.js} +95 -58
- package/{index-w639tvkd.js → index-xgqz3kak.js} +29 -8
- package/{index-9tbgb4d8.js → index-xy70tcv4.js} +1 -1
- package/{index-mmym5xmb.js → index-z43wddce.js} +5 -3
- package/index.js +24 -23
- package/{library.command-1gp5qe3r.js → library.command-kc1zahcg.js} +5 -4
- package/{localRegistry.command-v3g21rex.js → localRegistry.command-bz2df40m.js} +19 -18
- package/{module.command-4xz9he6h.js → module.command-cchwzz9r.js} +12 -7
- package/{package.command-s7qpnn1g.js → package.command-qcjajpv8.js} +8 -7
- package/package.json +2 -2
- package/{page.command-fan34c49.js → page.command-1t86dx8a.js} +4 -3
- package/{pipeline.command-ph4fnn9w.js → pipeline.command-2xx9z3d0.js} +3 -2
- package/{primitive.command-3fqh8emf.js → primitive.command-mc0x8txr.js} +8 -7
- package/{projectTypecheck-vkb40hjc.js → projectTypecheck-tz497yx7.js} +2 -1
- package/{quality.command-ecj6exsh.js → quality.command-11rayf5c.js} +7 -6
- package/{repair.command-fe9jw719.js → repair.command-8w41vy78.js} +7 -6
- package/{scalar.command-cnvfhk0n.js → scalar.command-rvwh98ny.js} +7 -6
- package/skills/akan-debug/SKILL.md +7 -3
- package/skills/akan-err/SKILL.md +7 -0
- package/skills/akan-mcp/SKILL.md +7 -1
- package/skills/akan-scaffold/SKILL.md +3 -2
- package/skills/akan-transport/SKILL.md +2 -0
- package/skills/akan-validate/SKILL.md +1 -0
- package/{subspace.command-yxtt3v3e.js → subspace.command-0970n7kd.js} +9 -8
- package/{tunnel.command-ggj38mqf.js → tunnel.command-bcy0rtmh.js} +8 -7
- package/typecheck.proc.js +5 -2
- package/{verify.command-w9ttxkdz.js → verify.command-ynaztxr2.js} +18 -16
- package/{workflow.command-ss8devj0.js → workflow.command-yp9ajthb.js} +45 -16
- package/{workspace.command-rw1p0xeq.js → workspace.command-e4wfxm86.js} +39 -34
- package/TunnelShare-k3ja4w9x.js +0 -14
- package/cloud.script-s6rbrwer.js +0 -30
- package/context.runner-ms8v1rxy.js +0 -29
|
@@ -1,4 +1,7 @@
|
|
|
1
1
|
// @bun
|
|
2
|
+
import {
|
|
3
|
+
CliError
|
|
4
|
+
} from "./index-j4yvgfhr.js";
|
|
2
5
|
import {
|
|
3
6
|
getDirname2,
|
|
4
7
|
FileSys2
|
|
@@ -10,7 +13,7 @@ import {
|
|
|
10
13
|
LibExecutor,
|
|
11
14
|
PkgExecutor,
|
|
12
15
|
ModuleExecutor
|
|
13
|
-
} from "./index-
|
|
16
|
+
} from "./index-sq9d0jhj.js";
|
|
14
17
|
|
|
15
18
|
// pkgs/@akanjs/devkit/commandDecorators/camelToKebabCase.ts
|
|
16
19
|
var camelToKebabCase = (str) => str.replace(/([A-Z])/g, "-$1").toLowerCase();
|
|
@@ -58,6 +61,7 @@ var SysOrOnlyApp = createInternalArgToken("Sys", { onlyApp: true });
|
|
|
58
61
|
var Exec = createInternalArgToken("Exec");
|
|
59
62
|
var Pkg = createInternalArgToken("Pkg");
|
|
60
63
|
var Module = createInternalArgToken("Module");
|
|
64
|
+
var ModuleOrService = createInternalArgToken("Module", { services: true });
|
|
61
65
|
var Workspace = createInternalArgToken("Workspace");
|
|
62
66
|
// pkgs/@akanjs/devkit/commandDecorators/command.ts
|
|
63
67
|
import path3 from "path";
|
|
@@ -160,19 +164,6 @@ var script = (refName, deps = []) => {
|
|
|
160
164
|
return ScriptBase;
|
|
161
165
|
};
|
|
162
166
|
|
|
163
|
-
// pkgs/@akanjs/devkit/commandDecorators/exitCodeError.ts
|
|
164
|
-
class ExitCodeError extends Error {
|
|
165
|
-
exitCode;
|
|
166
|
-
name = "ExitCodeError";
|
|
167
|
-
constructor(message, exitCode) {
|
|
168
|
-
super(message);
|
|
169
|
-
this.exitCode = exitCode;
|
|
170
|
-
}
|
|
171
|
-
static codeOf(error) {
|
|
172
|
-
return error instanceof ExitCodeError ? error.exitCode : null;
|
|
173
|
-
}
|
|
174
|
-
}
|
|
175
|
-
|
|
176
167
|
// pkgs/@akanjs/devkit/commandDecorators/helpFormatter.ts
|
|
177
168
|
import chalk from "chalk";
|
|
178
169
|
var formatChoice = (choice) => typeof choice === "object" ? choice.label : choice.toString();
|
|
@@ -358,39 +349,54 @@ class WorkspaceVersionCheck {
|
|
|
358
349
|
|
|
359
350
|
// pkgs/@akanjs/devkit/commandDecorators/command.ts
|
|
360
351
|
var loggedCliErrorObjects = new WeakSet;
|
|
352
|
+
var answeredCliErrors = new WeakSet;
|
|
361
353
|
var loggedCliErrorMessages = new Set;
|
|
362
354
|
var markCliErrorPrinted = (error) => {
|
|
363
|
-
if (typeof error
|
|
364
|
-
|
|
355
|
+
if (typeof error !== "object" || error === null)
|
|
356
|
+
return;
|
|
357
|
+
loggedCliErrorObjects.add(error);
|
|
358
|
+
answeredCliErrors.add(error);
|
|
365
359
|
};
|
|
366
|
-
var
|
|
367
|
-
if (error instanceof Error)
|
|
368
|
-
return error.message || error.name;
|
|
369
|
-
if (typeof error === "string")
|
|
370
|
-
return error.trim() || "Unknown error";
|
|
371
|
-
if (error === null || error === undefined)
|
|
372
|
-
return "Unknown error";
|
|
373
|
-
try {
|
|
374
|
-
const json = JSON.stringify(error);
|
|
375
|
-
if (json)
|
|
376
|
-
return json;
|
|
377
|
-
} catch {
|
|
378
|
-
return String(error);
|
|
379
|
-
}
|
|
380
|
-
return String(error) || "Unknown error";
|
|
381
|
-
};
|
|
382
|
-
var printCliError = (error) => {
|
|
360
|
+
var printCliError = (error, stream = "log") => {
|
|
383
361
|
if (typeof error === "object" && error !== null) {
|
|
384
362
|
if (loggedCliErrorObjects.has(error))
|
|
385
363
|
return;
|
|
386
364
|
loggedCliErrorObjects.add(error);
|
|
387
365
|
}
|
|
388
|
-
const message =
|
|
366
|
+
const message = CliError.messageOf(error);
|
|
389
367
|
if (loggedCliErrorMessages.has(message))
|
|
390
368
|
return;
|
|
391
369
|
loggedCliErrorMessages.add(message);
|
|
392
370
|
Logger.rawLog(`
|
|
393
|
-
${chalk2.red(message)}
|
|
371
|
+
${chalk2.red(message)}`, undefined, stream);
|
|
372
|
+
};
|
|
373
|
+
var asksJson = (argMetas, opt) => argMetas.some((argMeta) => {
|
|
374
|
+
if (argMeta.type !== "Option")
|
|
375
|
+
return false;
|
|
376
|
+
const value = opt[argMeta.name] ?? argMeta.argsOption.default;
|
|
377
|
+
if (argMeta.name === "json")
|
|
378
|
+
return value === true || value === "true";
|
|
379
|
+
return argMeta.name === "format" && value === "json";
|
|
380
|
+
});
|
|
381
|
+
var writeJsonFailure = async (error) => {
|
|
382
|
+
if (typeof error === "object" && error !== null && answeredCliErrors.has(error))
|
|
383
|
+
return;
|
|
384
|
+
const line = `${JSON.stringify(CliError.failureOf(error))}
|
|
385
|
+
`;
|
|
386
|
+
await new Promise((resolve) => process.stdout.write(line, () => resolve()));
|
|
387
|
+
};
|
|
388
|
+
var failureReporterOf = (json, onFailure, failure) => async (error) => {
|
|
389
|
+
if (onFailure)
|
|
390
|
+
await onFailure(error, failure);
|
|
391
|
+
else if (json)
|
|
392
|
+
await writeJsonFailure(error);
|
|
393
|
+
};
|
|
394
|
+
var usageRefusalOf = (error) => {
|
|
395
|
+
if (error.exitCode === 0)
|
|
396
|
+
process.exit(0);
|
|
397
|
+
const refused = new CliError("usage", error.message.replace(/^error: /, ""));
|
|
398
|
+
loggedCliErrorObjects.add(refused);
|
|
399
|
+
return refused;
|
|
394
400
|
};
|
|
395
401
|
var handleOption = (programCommand, argMeta) => {
|
|
396
402
|
const {
|
|
@@ -451,13 +457,14 @@ var assertEnumChoice = (argMeta, value) => {
|
|
|
451
457
|
const choices = normalizeEnumChoices(enumChoices);
|
|
452
458
|
if (choices.some((choice) => String(choice.value) === String(value)))
|
|
453
459
|
return;
|
|
454
|
-
throw new
|
|
460
|
+
throw new CliError("usage", `${argLabelOf(argMeta)} argument '${String(value)}' is invalid. Allowed choices are ${choices.map((choice) => choice.name).join(", ")}.`);
|
|
455
461
|
};
|
|
456
|
-
var assertPromptable = (problem,
|
|
462
|
+
var assertPromptable = (problem, refusal = {}) => {
|
|
457
463
|
if (process.stdin.isTTY)
|
|
458
464
|
return;
|
|
459
|
-
throw
|
|
465
|
+
throw refusalOf(problem, "stdin is not a terminal to prompt on", refusal);
|
|
460
466
|
};
|
|
467
|
+
var refusalOf = (problem, reason, { choices = [], remedy = "pass it on the command line", code = "usage" }) => new CliError(code, `${problem}: ${reason}, so ${remedy}${choices.length ? ` (choices: ${choices.join(", ")})` : ""}.`);
|
|
461
468
|
var inputMessageOf = ({ name, argsOption: { desc, example, ask } }) => ask ? `${ask}: ` : desc ? `${desc}: ` : `Enter the ${name} value${example ? ` (example: ${example})` : ""}: `;
|
|
462
469
|
var getOptionValue = async (argMeta, opt, context) => {
|
|
463
470
|
const {
|
|
@@ -531,7 +538,7 @@ var assertCurrentDirectoryIsWorkspaceRoot = async () => {
|
|
|
531
538
|
]);
|
|
532
539
|
if (hasPackageJson && hasTsConfig && hasMemberDirs.some(Boolean))
|
|
533
540
|
return;
|
|
534
|
-
throw new
|
|
541
|
+
throw new CliError("usage", [
|
|
535
542
|
"Akan CLI commands must be run from the workspace root.",
|
|
536
543
|
`Current directory: ${cwd}`,
|
|
537
544
|
"Move to the directory that contains package.json, tsconfig.json, and an apps/, libs/ or pkgs/ folder, then run the command again."
|
|
@@ -566,7 +573,7 @@ var getAppsArgumentValue = async (value, workspace, rerun) => {
|
|
|
566
573
|
if (requested.length) {
|
|
567
574
|
const unknown = requested.filter((name) => !appNames.includes(name));
|
|
568
575
|
if (unknown.length)
|
|
569
|
-
throw new
|
|
576
|
+
throw new CliError("unknownTarget", `Unknown app${unknown.length > 1 ? "s" : ""}: ${unknown.join(", ")}. Available: ${appNames.join(", ")}, all`);
|
|
570
577
|
return [...new Set(requested)].map((name) => AppExecutor.from(workspace, name));
|
|
571
578
|
}
|
|
572
579
|
if (appNames.length === 1 && appNames[0])
|
|
@@ -581,12 +588,26 @@ var getAppsArgumentValue = async (value, workspace, rerun) => {
|
|
|
581
588
|
await AppSelectionMemory.write(workspace.workspaceRoot, picked);
|
|
582
589
|
return picked.map((name) => AppExecutor.from(workspace, name));
|
|
583
590
|
};
|
|
584
|
-
var getInternalArgumentValue = async (argMeta, value, workspace, rerun) => {
|
|
591
|
+
var getInternalArgumentValue = async (argMeta, value, workspace, rerun, { destructive = false } = {}) => {
|
|
585
592
|
if (argMeta.type === "Workspace")
|
|
586
593
|
return workspace;
|
|
587
594
|
const sysType = argMeta.type.toLowerCase();
|
|
588
595
|
const [appNames, libNames, pkgNames] = await workspace.getExecs();
|
|
589
596
|
const problemOf = (kind) => value ? `Unknown ${kind} '${value}'` : `Missing ${kind}`;
|
|
597
|
+
const assertAskable = (kind, choices, placeholder) => {
|
|
598
|
+
const refusal = { choices, code: value ? "unknownTarget" : "usage", ...rerunRemedyOf(rerun, placeholder) };
|
|
599
|
+
if (destructive)
|
|
600
|
+
throw refusalOf(problemOf(kind), "this command deletes files and never picks its target", refusal);
|
|
601
|
+
assertPromptable(problemOf(kind), refusal);
|
|
602
|
+
};
|
|
603
|
+
const takeOnly = (kind, names, take) => {
|
|
604
|
+
const [only] = names;
|
|
605
|
+
if (value || destructive || process.stdin.isTTY || names.length !== 1 || !only)
|
|
606
|
+
return null;
|
|
607
|
+
const how = rerun ? `: ${rerun(only)}` : "";
|
|
608
|
+
Logger.rawLog(`No ${kind} named, so this runs on '${only}', the only one in this workspace${how}`, undefined, "error");
|
|
609
|
+
return take(only);
|
|
610
|
+
};
|
|
590
611
|
if (sysType === "sys" || sysType === "exec") {
|
|
591
612
|
const pkgChoices = sysType === "exec" ? pkgNames : [];
|
|
592
613
|
const execOf = (name) => {
|
|
@@ -601,72 +622,83 @@ var getInternalArgumentValue = async (argMeta, value, workspace, rerun) => {
|
|
|
601
622
|
const found = value ? execOf(value) : null;
|
|
602
623
|
if (found)
|
|
603
624
|
return found;
|
|
604
|
-
if (!value && argMeta.option?.onlyApp && appNames.length === 1 && appNames[0])
|
|
625
|
+
if (!value && !destructive && argMeta.option?.onlyApp && appNames.length === 1 && appNames[0])
|
|
605
626
|
return AppExecutor.from(workspace, appNames[0]);
|
|
606
627
|
const [kind, placeholder] = sysType === "exec" ? ["app, lib or pkg", "<app-lib-or-pkg>"] : ["app or lib", "<app-or-lib>"];
|
|
607
628
|
const choices = [...appNames, ...libNames, ...pkgChoices];
|
|
608
|
-
const only = choices
|
|
609
|
-
if (
|
|
610
|
-
const how = rerun ? `: ${rerun(only.name)}` : "";
|
|
611
|
-
Logger.rawLog(`No ${kind} named, so this runs on '${only.name}', the only one in this workspace${how}`, undefined, "error");
|
|
629
|
+
const only = takeOnly(kind, choices, execOf);
|
|
630
|
+
if (only)
|
|
612
631
|
return only;
|
|
613
|
-
|
|
614
|
-
assertPromptable(problemOf(kind), { choices, ...rerunRemedyOf(rerun, placeholder) });
|
|
632
|
+
assertAskable(kind, choices, placeholder);
|
|
615
633
|
const name = await select({
|
|
616
634
|
message: sysType === "exec" ? `Select the App or Lib or Pkg name` : `Select the App or Lib name`,
|
|
617
635
|
choices
|
|
618
636
|
});
|
|
619
637
|
const picked = execOf(name);
|
|
620
638
|
if (!picked)
|
|
621
|
-
throw new
|
|
639
|
+
throw new CliError("unknownTarget", `Invalid system name: ${name}`);
|
|
622
640
|
return picked;
|
|
623
641
|
} else if (sysType === "app") {
|
|
624
642
|
if (value && appNames.includes(value))
|
|
625
643
|
return AppExecutor.from(workspace, value);
|
|
626
|
-
if (!value && appNames.length === 1 && appNames[0])
|
|
644
|
+
if (!value && !destructive && appNames.length === 1 && appNames[0])
|
|
627
645
|
return AppExecutor.from(workspace, appNames[0]);
|
|
628
|
-
|
|
646
|
+
assertAskable("app", appNames, "<app>");
|
|
629
647
|
const appName = await select({ message: `Select the ${sysType} name`, choices: appNames });
|
|
630
648
|
return AppExecutor.from(workspace, appName);
|
|
631
649
|
} else if (sysType === "lib") {
|
|
632
650
|
if (value && libNames.includes(value))
|
|
633
651
|
return LibExecutor.from(workspace, value);
|
|
634
|
-
|
|
652
|
+
const only = takeOnly("lib", libNames, (name) => LibExecutor.from(workspace, name));
|
|
653
|
+
if (only)
|
|
654
|
+
return only;
|
|
655
|
+
assertAskable("lib", libNames, "<lib>");
|
|
635
656
|
const libName = await select({ message: `Select the ${sysType} name`, choices: libNames });
|
|
636
657
|
return LibExecutor.from(workspace, libName);
|
|
637
658
|
} else if (sysType === "pkg") {
|
|
638
659
|
const pkgs = await workspace.getPkgs();
|
|
639
660
|
if (value && pkgs.includes(value))
|
|
640
661
|
return PkgExecutor.from(workspace, value);
|
|
641
|
-
|
|
662
|
+
const only = takeOnly("pkg", pkgs, (name) => PkgExecutor.from(workspace, name));
|
|
663
|
+
if (only)
|
|
664
|
+
return only;
|
|
665
|
+
assertAskable("pkg", pkgs, "<pkg>");
|
|
642
666
|
const pkgName = await select({ message: `Select the ${sysType} name`, choices: pkgs });
|
|
643
667
|
return PkgExecutor.from(workspace, pkgName);
|
|
644
668
|
} else if (sysType === "module") {
|
|
645
|
-
if (value) {
|
|
646
|
-
const [sysName, moduleName] = value.split(":");
|
|
647
|
-
if (!sysName || !moduleName)
|
|
648
|
-
throw new Error(`Invalid module name: ${value}`);
|
|
649
|
-
if (appNames.includes(sysName)) {
|
|
650
|
-
const app = AppExecutor.from(workspace, sysName);
|
|
651
|
-
const modules = await app.getModules();
|
|
652
|
-
if (modules.includes(moduleName))
|
|
653
|
-
return ModuleExecutor.from(app, moduleName);
|
|
654
|
-
else
|
|
655
|
-
throw new Error(`Invalid module name: ${moduleName}`);
|
|
656
|
-
} else if (libNames.includes(sysName)) {
|
|
657
|
-
const lib = LibExecutor.from(workspace, sysName);
|
|
658
|
-
const modules = await lib.getModules();
|
|
659
|
-
if (modules.includes(moduleName))
|
|
660
|
-
return ModuleExecutor.from(lib, moduleName);
|
|
661
|
-
} else
|
|
662
|
-
throw new Error(`Invalid system name: ${sysName}`);
|
|
663
|
-
}
|
|
664
669
|
const systems = [
|
|
665
670
|
...appNames.map((name) => AppExecutor.from(workspace, name)),
|
|
666
671
|
...libNames.map((name) => LibExecutor.from(workspace, name))
|
|
667
672
|
];
|
|
668
|
-
const
|
|
669
|
-
|
|
673
|
+
const modulesOf = async (sys) => [
|
|
674
|
+
...await sys.getModules(),
|
|
675
|
+
...argMeta.option?.services ? await sys.getServiceModules() : []
|
|
676
|
+
];
|
|
677
|
+
const listModules = async () => (await Promise.all(systems.map(async (sys) => (await modulesOf(sys)).map((m) => `${sys.name}:${m}`)))).flat();
|
|
678
|
+
if (value) {
|
|
679
|
+
const [sysName, moduleName] = value.split(":");
|
|
680
|
+
if (!sysName || !moduleName)
|
|
681
|
+
throw new CliError("usage", `Invalid module name: ${value}`);
|
|
682
|
+
const sys = systems.find((each) => each.name === sysName);
|
|
683
|
+
if (!sys)
|
|
684
|
+
throw new CliError("unknownTarget", `Invalid system name: ${sysName}`);
|
|
685
|
+
if ((await modulesOf(sys)).includes(moduleName))
|
|
686
|
+
return ModuleExecutor.from(sys, moduleName);
|
|
687
|
+
throw refusalOf(problemOf("module"), `${sysName} has no such module`, {
|
|
688
|
+
code: "unknownTarget",
|
|
689
|
+
choices: await listModules(),
|
|
690
|
+
...rerunRemedyOf(rerun, "<sys:module>")
|
|
691
|
+
});
|
|
692
|
+
}
|
|
693
|
+
const choices = process.stdin.isTTY && !destructive ? [] : await listModules();
|
|
694
|
+
const only = takeOnly("module", choices, (label) => {
|
|
695
|
+
const [sysName, moduleName = ""] = label.split(":");
|
|
696
|
+
const sys = systems.find((each) => each.name === sysName);
|
|
697
|
+
return sys ? ModuleExecutor.from(sys, moduleName) : null;
|
|
698
|
+
});
|
|
699
|
+
if (only)
|
|
700
|
+
return only;
|
|
701
|
+
assertAskable("module", choices, "<sys:module>");
|
|
670
702
|
const { type, name } = await select({
|
|
671
703
|
message: `select the App or Lib name`,
|
|
672
704
|
choices: [
|
|
@@ -675,7 +707,7 @@ var getInternalArgumentValue = async (argMeta, value, workspace, rerun) => {
|
|
|
675
707
|
]
|
|
676
708
|
});
|
|
677
709
|
const executor = type === "app" ? AppExecutor.from(workspace, name) : LibExecutor.from(workspace, name);
|
|
678
|
-
const modules = await executor
|
|
710
|
+
const modules = await modulesOf(executor);
|
|
679
711
|
const moduleName = await select({
|
|
680
712
|
message: `Select the module name`,
|
|
681
713
|
choices: modules.map((name) => ({ name: `${executor.name}:${name}`, value: name }))
|
|
@@ -684,13 +716,33 @@ var getInternalArgumentValue = async (argMeta, value, workspace, rerun) => {
|
|
|
684
716
|
} else
|
|
685
717
|
throw new Error(`Invalid system type: ${argMeta.type}`);
|
|
686
718
|
};
|
|
719
|
+
var cliFailureOf = () => {
|
|
720
|
+
let failing = false;
|
|
721
|
+
const failure = {
|
|
722
|
+
exitCode: 1,
|
|
723
|
+
usageExitCode: undefined,
|
|
724
|
+
stream: "log",
|
|
725
|
+
report: async (_error) => {},
|
|
726
|
+
exitCodeOf: (error) => {
|
|
727
|
+
const { usageExitCode } = failure;
|
|
728
|
+
if (usageExitCode !== undefined && error instanceof CliError && CliError.usageCodes.includes(error.code))
|
|
729
|
+
return usageExitCode;
|
|
730
|
+
return CliError.exitCodeOf(error) ?? failure.exitCode;
|
|
731
|
+
},
|
|
732
|
+
fail: async (error) => {
|
|
733
|
+
if (failing)
|
|
734
|
+
return;
|
|
735
|
+
failing = true;
|
|
736
|
+
printCliError(error, failure.stream);
|
|
737
|
+
await failure.report(error).catch((reportError) => printCliError(reportError, "error"));
|
|
738
|
+
process.exit(failure.exitCodeOf(error));
|
|
739
|
+
}
|
|
740
|
+
};
|
|
741
|
+
return failure;
|
|
742
|
+
};
|
|
687
743
|
var runCommands = async (...commands) => {
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
process.on("unhandledRejection", (error) => {
|
|
691
|
-
printCliError(error);
|
|
692
|
-
process.exit(ExitCodeError.codeOf(error) ?? failureExitCode);
|
|
693
|
-
});
|
|
744
|
+
const failure = cliFailureOf();
|
|
745
|
+
process.on("unhandledRejection", (error) => void failure.fail(error));
|
|
694
746
|
const __dirname2 = getDirname2(import.meta.url);
|
|
695
747
|
const packageJsonCandidates = [`${path3.dirname(Bun.main)}/package.json`, `${__dirname2}/../package.json`];
|
|
696
748
|
let cliPackageJson = null;
|
|
@@ -724,20 +776,16 @@ ${versionWarning}`), undefined, "error");
|
|
|
724
776
|
let programCommand = program.command(commandName, {
|
|
725
777
|
hidden: targetMeta.targetOption.devOnly
|
|
726
778
|
});
|
|
727
|
-
const targetFailureExitCode = targetMeta.targetOption
|
|
728
|
-
const usageExitCode = targetMeta.targetOption.usageExitCode ?? targetFailureExitCode;
|
|
779
|
+
const { failureExitCode: targetFailureExitCode, usageExitCode: targetUsageExitCode } = targetMeta.targetOption;
|
|
729
780
|
const { onFailure } = targetMeta.targetOption;
|
|
730
781
|
const [allArgMetas] = getArgMetas(command, targetMeta.key);
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
reportFailure = async (failure) => await onFailure?.(failure, { usage: true, given });
|
|
739
|
-
throw refused;
|
|
740
|
-
});
|
|
782
|
+
programCommand.exitOverride((error) => {
|
|
783
|
+
const refused = usageRefusalOf(error);
|
|
784
|
+
failure.usageExitCode = targetUsageExitCode;
|
|
785
|
+
const given = givenOptionsOf(allArgMetas, programCommand.opts());
|
|
786
|
+
failure.report = failureReporterOf(asksJson(allArgMetas, given), onFailure, { usage: true, given });
|
|
787
|
+
throw refused;
|
|
788
|
+
});
|
|
741
789
|
for (const argMeta of allArgMetas) {
|
|
742
790
|
if (argMeta.type === "Option")
|
|
743
791
|
programCommand = handleOption(programCommand, argMeta);
|
|
@@ -759,12 +807,18 @@ ${versionWarning}`), undefined, "error");
|
|
|
759
807
|
return formatCommandHelp(command, targetMeta.key);
|
|
760
808
|
};
|
|
761
809
|
programCommand.action(async (...args) => {
|
|
762
|
-
|
|
810
|
+
failure.exitCode = targetFailureExitCode ?? 1;
|
|
811
|
+
failure.usageExitCode = targetUsageExitCode;
|
|
763
812
|
if (!targetMeta.targetOption.stdio)
|
|
764
813
|
Logger.rawLog();
|
|
765
814
|
const cmdArgs = args.slice(0, args.length - 2);
|
|
766
815
|
const opt = args[args.length - 2];
|
|
767
|
-
|
|
816
|
+
const json = asksJson(allArgMetas, opt);
|
|
817
|
+
failure.stream = json ? "error" : "log";
|
|
818
|
+
failure.report = failureReporterOf(json, onFailure, {
|
|
819
|
+
usage: false,
|
|
820
|
+
given: givenOptionsOf(allArgMetas, opt)
|
|
821
|
+
});
|
|
768
822
|
const commandArgs = [];
|
|
769
823
|
if (targetMeta.targetOption.runsOnWorkspaceRoot) {
|
|
770
824
|
await assertCurrentDirectoryIsWorkspaceRoot();
|
|
@@ -781,7 +835,7 @@ ${versionWarning}`), undefined, "error");
|
|
|
781
835
|
else if (argMeta.type === "Apps")
|
|
782
836
|
commandArgs[argMeta.idx] = await getAppsArgumentValue(cmdArgs[argMeta.idx], workspace, rerun);
|
|
783
837
|
else
|
|
784
|
-
commandArgs[argMeta.idx] = await getInternalArgumentValue(argMeta, cmdArgs[argMeta.idx], workspace, rerun);
|
|
838
|
+
commandArgs[argMeta.idx] = await getInternalArgumentValue(argMeta, cmdArgs[argMeta.idx], workspace, rerun, { destructive: targetMeta.targetOption.destructive });
|
|
785
839
|
if (commandArgs[argMeta.idx] instanceof AppExecutor)
|
|
786
840
|
process.env.AKAN_PUBLIC_APP_NAME = commandArgs[argMeta.idx].name;
|
|
787
841
|
else if (Array.isArray(commandArgs[argMeta.idx])) {
|
|
@@ -799,18 +853,17 @@ ${versionWarning}`), undefined, "error");
|
|
|
799
853
|
if (!targetMeta.targetOption.stdio)
|
|
800
854
|
Logger.rawLog();
|
|
801
855
|
} catch (e) {
|
|
802
|
-
printCliError(e);
|
|
856
|
+
printCliError(e, failure.stream);
|
|
803
857
|
throw e;
|
|
804
858
|
}
|
|
805
859
|
});
|
|
806
860
|
}
|
|
807
861
|
}
|
|
808
862
|
}
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
await reportFailure(error).catch(printCliError);
|
|
812
|
-
process.exit(ExitCodeError.codeOf(error) ?? failureExitCode);
|
|
863
|
+
program.exitOverride((error) => {
|
|
864
|
+
throw usageRefusalOf(error);
|
|
813
865
|
});
|
|
866
|
+
await program.parseAsync(process.argv).catch(failure.fail);
|
|
814
867
|
};
|
|
815
868
|
// pkgs/@akanjs/devkit/commandDecorators/commandBuilder.ts
|
|
816
869
|
var argMetaOf = (type, name, primitive, argsOption, idx) => {
|
|
@@ -888,4 +941,14 @@ function command(refName, depsOrBuilder, builder) {
|
|
|
888
941
|
}
|
|
889
942
|
return CommandBase;
|
|
890
943
|
}
|
|
891
|
-
|
|
944
|
+
// pkgs/@akanjs/devkit/commandDecorators/exitCodeError.ts
|
|
945
|
+
class ExitCodeError extends CliError {
|
|
946
|
+
name = "ExitCodeError";
|
|
947
|
+
constructor(message, exitCode) {
|
|
948
|
+
super(exitCode === 2 ? "refused" : exitCode === 3 ? "checkFailed" : "failed", message, { exitCode });
|
|
949
|
+
}
|
|
950
|
+
static codeOf(error) {
|
|
951
|
+
return CliError.exitCodeOf(error);
|
|
952
|
+
}
|
|
953
|
+
}
|
|
954
|
+
export { camelToKebabCase, getTargetMetas, getTargetCommandNames, App, Apps, Lib, Sys, SysOrOnlyApp, Exec, Pkg, Module, ModuleOrService, Workspace, CommandContainer, runner, script, markCliErrorPrinted, assertPromptable, runCommands, command, ExitCodeError };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// @bun
|
|
2
2
|
import {
|
|
3
3
|
JsonFormatter
|
|
4
|
-
} from "./index-
|
|
4
|
+
} from "./index-sq9d0jhj.js";
|
|
5
5
|
|
|
6
6
|
// pkgs/@akanjs/devkit/applicationBuildReporter.ts
|
|
7
7
|
import { realpathSync } from "fs";
|
|
@@ -694,47 +694,74 @@ class RouteJsBudget {
|
|
|
694
694
|
brotliBytes: urls.reduce((total, url) => total + (sizeByUrl.get(url)?.brotli ?? 0), 0)
|
|
695
695
|
})).sort((a, b) => b.brotliBytes - a.brotliBytes || RouteJsBudget.#byCodeUnit(a.routeId, b.routeId));
|
|
696
696
|
}
|
|
697
|
+
static modeOf({ checkBudget = false, updateBudget = false, raiseBudget = false }) {
|
|
698
|
+
if ([checkBudget, updateBudget, raiseBudget].filter(Boolean).length > 1)
|
|
699
|
+
throw new Error("Pass at most one of --check-budget, --update-budget and --raise-budget.");
|
|
700
|
+
return checkBudget ? "enforce" : updateBudget ? "update" : raiseBudget ? "raise" : "report";
|
|
701
|
+
}
|
|
697
702
|
static async load(filePath, source = filePath) {
|
|
698
703
|
const file = Bun.file(filePath);
|
|
699
704
|
if (!await file.exists())
|
|
700
705
|
return null;
|
|
701
706
|
return RouteJsBudget.parse(await file.text(), source);
|
|
702
707
|
}
|
|
703
|
-
static async check(sizes,
|
|
708
|
+
static async check(sizes, check) {
|
|
709
|
+
const { mode, app, budgetPath, source, environment } = check;
|
|
704
710
|
const { committed, unreadable } = await RouteJsBudget.#loadFor(mode, budgetPath, source);
|
|
705
|
-
|
|
706
|
-
|
|
711
|
+
if (mode === "enforce" && !committed)
|
|
712
|
+
throw new Error(`--check-budget found no ${source}: record one with \`akan build ${app} --update-budget\`.`);
|
|
713
|
+
const budget = mode === "raise" ? new RouteJsBudget().tightenedBy(sizes, environment) : mode === "update" ? (committed ?? new RouteJsBudget).tightenedBy(sizes, environment) : committed;
|
|
714
|
+
if ((mode === "update" || mode === "raise") && budget)
|
|
707
715
|
await Bun.write(budgetPath, budget.stringify());
|
|
708
716
|
const overages = budget?.overages(sizes) ?? [];
|
|
717
|
+
const unbudgeted = budget?.unbudgeted(sizes) ?? [];
|
|
709
718
|
const envNote = committed?.envNote(environment) ?? "";
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
719
|
+
const target = { app, source };
|
|
720
|
+
const failures = [
|
|
721
|
+
...overages.length && mode !== "report" ? [RouteJsBudget.formatOverages(overages, target, envNote)] : [],
|
|
722
|
+
...unbudgeted.length && mode === "enforce" ? [RouteJsBudget.formatUnbudgeted(unbudgeted, target)] : []
|
|
723
|
+
];
|
|
724
|
+
if (failures.length)
|
|
725
|
+
throw new Error(failures.join(`
|
|
726
|
+
`));
|
|
727
|
+
if (mode === "update" || mode === "raise")
|
|
728
|
+
return { summary: RouteJsBudget.#writtenSummary(check, unreadable, committed, budget) };
|
|
715
729
|
if (unreadable)
|
|
716
730
|
return {
|
|
717
731
|
summary: `${unreadable}, not checked`,
|
|
718
732
|
warnings: [
|
|
719
733
|
{
|
|
720
734
|
file: source,
|
|
721
|
-
message: `${unreadable}; akan build fails on it`,
|
|
722
|
-
fix:
|
|
735
|
+
message: `${unreadable}; akan build --check-budget fails on it`,
|
|
736
|
+
fix: `correct it, or rewrite it with akan build ${app} --update-budget`
|
|
723
737
|
}
|
|
724
738
|
]
|
|
725
739
|
};
|
|
726
740
|
if (!budget)
|
|
727
741
|
return { summary: `no ${RouteJsBudget.fileName}` };
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
742
|
+
const warnings = [
|
|
743
|
+
...overages.map(({ routeId, brotliBytes, limitBytes }) => ({
|
|
744
|
+
file: source,
|
|
745
|
+
message: `${routeId} loads ${RouteJsBudget.#bytes(brotliBytes)} bytes brotli, over its limit of ${RouteJsBudget.#bytes(limitBytes)}${envNote}; akan build --check-budget fails on it`,
|
|
746
|
+
fix: `shrink what the route loads, or raise its entry with akan build ${app} --raise-budget`
|
|
747
|
+
})),
|
|
748
|
+
...unbudgeted.map((routeId) => ({
|
|
749
|
+
file: source,
|
|
750
|
+
message: `${routeId} has no entry; akan build --check-budget fails on it`,
|
|
751
|
+
fix: `record it with akan build ${app} --update-budget`
|
|
752
|
+
}))
|
|
753
|
+
];
|
|
754
|
+
const verdict = overages.length ? `${overages.length} route(s) over ${source}${envNote}, reported only: ${overages.map(({ routeId }) => routeId).join(", ")}` : `within ${source}${envNote}`;
|
|
755
|
+
const unbudgetedNote = unbudgeted.length ? `; ${unbudgeted.length} route(s) without an entry` : "";
|
|
756
|
+
return { summary: `${verdict}${unbudgetedNote}`, ...warnings.length ? { warnings } : {} };
|
|
757
|
+
}
|
|
758
|
+
static #writtenSummary({ mode, source }, unreadable, committed, written) {
|
|
759
|
+
if (unreadable)
|
|
760
|
+
return `${source} rewritten (${unreadable})`;
|
|
761
|
+
if (mode === "update")
|
|
762
|
+
return `${source} updated`;
|
|
763
|
+
const raised = [...written?.kbByRoute ?? []].filter(([routeId, kb]) => kb > (committed?.kbByRoute.get(routeId) ?? kb));
|
|
764
|
+
return `${source} re-recorded at each route's measured size${raised.length ? `, raised: ${raised.map(([routeId]) => routeId).join(", ")}` : ""}`;
|
|
738
765
|
}
|
|
739
766
|
static async#loadFor(mode, budgetPath, source) {
|
|
740
767
|
try {
|
|
@@ -778,15 +805,27 @@ class RouteJsBudget {
|
|
|
778
805
|
...sizes.length > shown.length ? [` \u2026and ${sizes.length - shown.length} more`] : []
|
|
779
806
|
];
|
|
780
807
|
}
|
|
781
|
-
static formatOverages(overages,
|
|
808
|
+
static formatOverages(overages, target, envNote = "") {
|
|
782
809
|
const bytes = RouteJsBudget.#bytes;
|
|
810
|
+
const { source } = target;
|
|
783
811
|
return [
|
|
784
812
|
`${overages.length} route${overages.length === 1 ? "" : "s"} over the JS budget in ${source}${envNote}:`,
|
|
785
813
|
...overages.map(({ routeId, brotliBytes, budgetKB, limitBytes }) => ` ${routeId}: ${bytes(brotliBytes)} bytes brotli, over its limit of ${bytes(limitBytes)} (${budgetKB}KB + the larger of 1% and 4KB)`),
|
|
786
|
-
|
|
814
|
+
RouteJsBudget.#overageFix(target)
|
|
787
815
|
].join(`
|
|
788
816
|
`);
|
|
789
817
|
}
|
|
818
|
+
static formatUnbudgeted(routeIds, { app, source }) {
|
|
819
|
+
return [
|
|
820
|
+
`${routeIds.length} route${routeIds.length === 1 ? "" : "s"} with no entry in ${source}, which --check-budget checks every route against:`,
|
|
821
|
+
...routeIds.map((routeId) => ` ${routeId}`),
|
|
822
|
+
`Record ${routeIds.length === 1 ? "it" : "them"} in the same change: \`akan build ${app} --update-budget\` adds each new route at its measured size.`
|
|
823
|
+
].join(`
|
|
824
|
+
`);
|
|
825
|
+
}
|
|
826
|
+
static #overageFix({ app, source }) {
|
|
827
|
+
return `Shrink what the route loads. If the growth is intended, record it in the same change: \`akan build ${app} --raise-budget\` re-records every route at its measured size, or raise the route's entry under "${RouteJsBudget.section}" in ${source} by hand.`;
|
|
828
|
+
}
|
|
790
829
|
static #bytes(value) {
|
|
791
830
|
return value.toLocaleString("en-US");
|
|
792
831
|
}
|
|
@@ -838,12 +877,20 @@ class ApplicationBuildReporter {
|
|
|
838
877
|
Logger.rawLog(line);
|
|
839
878
|
Logger.rawLog("");
|
|
840
879
|
}
|
|
880
|
+
if (result.routeJsWarnings?.length) {
|
|
881
|
+
ApplicationBuildReporter.printRouteJsWarnings(result);
|
|
882
|
+
Logger.rawLog("");
|
|
883
|
+
}
|
|
841
884
|
Logger.rawLog(`Route artifacts: ${result.artifactDir}`);
|
|
842
885
|
Logger.rawLog(`Server output: ${result.outputDir}`);
|
|
843
886
|
Logger.rawLog(`Done in ${ApplicationBuildReporter.formatDuration(result.durationMs)}`);
|
|
844
887
|
if (result.environment === "local")
|
|
845
888
|
Logger.rawLog(ApplicationBuildReporter.localBuildNotice);
|
|
846
889
|
}
|
|
890
|
+
static printRouteJsWarnings({ routeJsWarnings = [] }) {
|
|
891
|
+
for (const { file, message, fix } of routeJsWarnings)
|
|
892
|
+
Logger.rawLog(`Warning: ${file}: ${message} (${fix})`);
|
|
893
|
+
}
|
|
847
894
|
static localBuildNotice = "Built for local: the server runs without endpoint rate limits, and boots on local defaults (Redis on localhost, the first database mode) where a deployment would stop to ask. For a host others can reach, run `akan build <app> --env main` with AKAN_PUBLIC_REPO_NAME and AKAN_PUBLIC_SERVE_DOMAIN set in the shell or the workspace .env.";
|
|
848
895
|
static formatError(error, workspaceRoot = process.cwd()) {
|
|
849
896
|
if (error instanceof AggregateError) {
|
|
@@ -907,7 +954,7 @@ var redisTunnelPolicy = ({
|
|
|
907
954
|
environment,
|
|
908
955
|
databaseMode
|
|
909
956
|
}) => environment === "local" ? "none" : databaseMode === "single" ? "optional" : "required";
|
|
910
|
-
var
|
|
957
|
+
var backendRecoveryPolicy = { min: 1000, max: 30000, maxAttempts: 5 };
|
|
911
958
|
var HELD_BUILDER_REQUEST_LIMIT = 64;
|
|
912
959
|
var BUILDER_MIN_RSS_RECYCLE_INTERVAL_MS = 30000;
|
|
913
960
|
var BUILDER_TIGHT_RSS_REPORT_LIMIT = 2;
|
|
@@ -928,7 +975,6 @@ var shouldRestartBackendByDevPlan = (message) => {
|
|
|
928
975
|
return message.devPlan.actions.includes("restart-backend");
|
|
929
976
|
};
|
|
930
977
|
var shouldRestartBuilderByDevPlan = (message) => message.devPlan?.actions.includes("restart-builder") ?? false;
|
|
931
|
-
var shouldAbandonBackendRecovery = (attempts, maxAttempts = BACKEND_RECOVERY_MAX_ATTEMPTS) => attempts >= maxAttempts;
|
|
932
978
|
var normalizeBackendReportedGeneration = (generation) => generation >= 0 ? generation : undefined;
|
|
933
979
|
var shouldRestartDevHostByDevPlan = (message) => message.devPlan?.actions.includes("restart-dev-host") ?? message.kinds.includes("config");
|
|
934
980
|
var devHostStateByBackendState = {
|
|
@@ -1665,4 +1711,4 @@ class HmrWatcher {
|
|
|
1665
1711
|
}
|
|
1666
1712
|
}
|
|
1667
1713
|
|
|
1668
|
-
export { UNAVAILABLE_REDIS_HOST, redisTunnelPolicy, BUILDER_MIN_RSS_RECYCLE_INTERVAL_MS, SOURCE_EXTS, shouldRestartBackendByDevPlan, shouldRestartBuilderByDevPlan,
|
|
1714
|
+
export { UNAVAILABLE_REDIS_HOST, redisTunnelPolicy, backendRecoveryPolicy, BUILDER_MIN_RSS_RECYCLE_INTERVAL_MS, SOURCE_EXTS, shouldRestartBackendByDevPlan, shouldRestartBuilderByDevPlan, normalizeBackendReportedGeneration, shouldRestartDevHostByDevPlan, devHostStateOf, isLegacyBackendFallbackFile, shouldMarkBuildPhaseRecovered, shouldKeepBuildFailure, createBackendBuildStatus, backendRestartReasonFromMessage, mergeBackendRestartReasons, shouldReplaceLastGoodMessage, shouldQueueBuildStatusReplay, hasBuildFailureForGeneration, decideBuilderRssRecycle, decideBuilderRssSettle, decideIdleSuspend, resolveIdleSuspendMs, hasAnyBuildFailure, shouldRefreshConfigOnIdleWake, shouldHoldForReturningBuilder, shouldWarnBuilderRssCeilingTight, isRssCeilingUnreachable, shouldRelayRecycledFrontendState, mergeInvalidateMessages, buildStatusReplaySequence, filesChangedSince, HmrWatcher, WatchRootResolver, FontOptimizer, FontPruner, RouteJsBudget, ApplicationBuildReporter };
|