flakelab 0.1.0 → 0.1.1
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/README.md +224 -37
- package/dist/analysis/blob-report.d.ts +15 -0
- package/dist/analysis/blob-report.js +137 -0
- package/dist/analysis/blob-report.js.map +1 -0
- package/dist/analysis/cli.d.ts +7 -0
- package/dist/analysis/cli.js +28 -0
- package/dist/analysis/cli.js.map +1 -0
- package/dist/analysis/schema.d.ts +175 -0
- package/dist/analysis/schema.js +34 -0
- package/dist/analysis/schema.js.map +1 -0
- package/dist/analysis/zip-archive.d.ts +6 -0
- package/dist/analysis/zip-archive.js +193 -0
- package/dist/analysis/zip-archive.js.map +1 -0
- package/dist/artifacts/paths.d.ts +3 -0
- package/dist/artifacts/paths.js +34 -0
- package/dist/artifacts/paths.js.map +1 -0
- package/dist/artifacts/retention.d.ts +1 -0
- package/dist/artifacts/retention.js +80 -0
- package/dist/artifacts/retention.js.map +1 -0
- package/dist/bisect/engine.js +0 -1
- package/dist/bisect/engine.js.map +1 -1
- package/dist/bisect/schema.d.ts +5 -6
- package/dist/bisect/schema.js +1 -2
- package/dist/bisect/schema.js.map +1 -1
- package/dist/bisect/solari-evaluator.js +9 -1
- package/dist/bisect/solari-evaluator.js.map +1 -1
- package/dist/ci/job-summary.d.ts +2 -0
- package/dist/ci/job-summary.js +120 -2
- package/dist/ci/job-summary.js.map +1 -1
- package/dist/ci/select-command.js +1 -1
- package/dist/ci/select-command.js.map +1 -1
- package/dist/ci/summary-command.js +12 -7
- package/dist/ci/summary-command.js.map +1 -1
- package/dist/cli-arguments.d.ts +44 -0
- package/dist/cli-arguments.js +356 -0
- package/dist/cli-arguments.js.map +1 -0
- package/dist/cli-command-help.d.ts +11 -0
- package/dist/cli-command-help.js +211 -0
- package/dist/cli-command-help.js.map +1 -0
- package/dist/cli-help.d.ts +5 -2
- package/dist/cli-help.js +74 -45
- package/dist/cli-help.js.map +1 -1
- package/dist/cli-option-definitions.d.ts +202 -0
- package/dist/cli-option-definitions.js +59 -0
- package/dist/cli-option-definitions.js.map +1 -0
- package/dist/cli.js +100 -100
- package/dist/cli.js.map +1 -1
- package/dist/commands/analyze-summary.d.ts +5 -0
- package/dist/commands/analyze-summary.js +89 -0
- package/dist/commands/analyze-summary.js.map +1 -0
- package/dist/commands/analyze.d.ts +6 -0
- package/dist/commands/analyze.js +128 -0
- package/dist/commands/analyze.js.map +1 -0
- package/dist/commands/bisect.d.ts +2 -2
- package/dist/commands/bisect.js +32 -3
- package/dist/commands/bisect.js.map +1 -1
- package/dist/commands/diagnose.d.ts +3 -2
- package/dist/commands/diagnose.js +331 -23
- package/dist/commands/diagnose.js.map +1 -1
- package/dist/commands/discover.d.ts +18 -2
- package/dist/commands/discover.js +215 -25
- package/dist/commands/discover.js.map +1 -1
- package/dist/commands/doctor.d.ts +2 -0
- package/dist/commands/doctor.js +66 -25
- package/dist/commands/doctor.js.map +1 -1
- package/dist/commands/investigate.d.ts +3 -2
- package/dist/commands/investigate.js +22 -3
- package/dist/commands/investigate.js.map +1 -1
- package/dist/commands/options.d.ts +123 -16
- package/dist/commands/options.js +24 -2
- package/dist/commands/options.js.map +1 -1
- package/dist/commands/prove.d.ts +2 -2
- package/dist/commands/prove.js +36 -1
- package/dist/commands/prove.js.map +1 -1
- package/dist/commands/repair.d.ts +8 -2
- package/dist/commands/repair.js +32 -9
- package/dist/commands/repair.js.map +1 -1
- package/dist/commands/replay.d.ts +2 -2
- package/dist/commands/replay.js +15 -2
- package/dist/commands/replay.js.map +1 -1
- package/dist/commands/report.d.ts +2 -2
- package/dist/commands/report.js +35 -10
- package/dist/commands/report.js.map +1 -1
- package/dist/commands/scan-summary.d.ts +7 -0
- package/dist/commands/scan-summary.js +175 -0
- package/dist/commands/scan-summary.js.map +1 -0
- package/dist/commands/scan.d.ts +9 -12
- package/dist/commands/scan.js +66 -62
- package/dist/commands/scan.js.map +1 -1
- package/dist/core/plan.js +1 -1
- package/dist/core/plan.js.map +1 -1
- package/dist/diagnosis/checkpoint.d.ts +6 -0
- package/dist/diagnosis/checkpoint.js +46 -0
- package/dist/diagnosis/checkpoint.js.map +1 -0
- package/dist/diagnosis/cli.d.ts +7 -0
- package/dist/diagnosis/cli.js +84 -0
- package/dist/diagnosis/cli.js.map +1 -0
- package/dist/diagnosis/recommendation.d.ts +13 -0
- package/dist/diagnosis/recommendation.js +95 -0
- package/dist/diagnosis/recommendation.js.map +1 -0
- package/dist/diagnosis/run-state.d.ts +52 -0
- package/dist/diagnosis/run-state.js +173 -0
- package/dist/diagnosis/run-state.js.map +1 -0
- package/dist/diagnosis/schema.d.ts +207 -0
- package/dist/diagnosis/schema.js +108 -0
- package/dist/diagnosis/schema.js.map +1 -0
- package/dist/diagnosis/summary.d.ts +3 -0
- package/dist/diagnosis/summary.js +115 -0
- package/dist/diagnosis/summary.js.map +1 -0
- package/dist/discovery/auth-cookie.d.ts +19 -0
- package/dist/discovery/auth-cookie.js +26 -0
- package/dist/discovery/auth-cookie.js.map +1 -0
- package/dist/discovery/evaluate.d.ts +35 -2
- package/dist/discovery/evaluate.js +136 -30
- package/dist/discovery/evaluate.js.map +1 -1
- package/dist/discovery/event-loop.d.ts +25 -0
- package/dist/discovery/event-loop.js +84 -0
- package/dist/discovery/event-loop.js.map +1 -0
- package/dist/discovery/minimize.d.ts +61 -1
- package/dist/discovery/minimize.js +179 -7
- package/dist/discovery/minimize.js.map +1 -1
- package/dist/discovery/resource-loading.d.ts +25 -0
- package/dist/discovery/resource-loading.js +84 -0
- package/dist/discovery/resource-loading.js.map +1 -0
- package/dist/discovery/runner-environment.d.ts +26 -0
- package/dist/discovery/runner-environment.js +68 -0
- package/dist/discovery/runner-environment.js.map +1 -0
- package/dist/discovery/startup-event.d.ts +25 -0
- package/dist/discovery/startup-event.js +84 -0
- package/dist/discovery/startup-event.js.map +1 -0
- package/dist/discovery/storage-state.d.ts +26 -0
- package/dist/discovery/storage-state.js +86 -0
- package/dist/discovery/storage-state.js.map +1 -0
- package/dist/discovery/temporal-environment.d.ts +31 -0
- package/dist/discovery/temporal-environment.js +43 -0
- package/dist/discovery/temporal-environment.js.map +1 -0
- package/dist/discovery/visual-environment.d.ts +28 -0
- package/dist/discovery/visual-environment.js +42 -0
- package/dist/discovery/visual-environment.js.map +1 -0
- package/dist/domain/schema.d.ts +840 -20
- package/dist/domain/schema.js +216 -6
- package/dist/domain/schema.js.map +1 -1
- package/dist/faults/browser-context.d.ts +16 -0
- package/dist/faults/browser-context.js +60 -0
- package/dist/faults/browser-context.js.map +1 -0
- package/dist/faults/cookie-header.d.ts +5 -0
- package/dist/faults/cookie-header.js +25 -0
- package/dist/faults/cookie-header.js.map +1 -0
- package/dist/faults/document-bootstrap.d.ts +5 -0
- package/dist/faults/document-bootstrap.js +141 -0
- package/dist/faults/document-bootstrap.js.map +1 -0
- package/dist/faults/install.d.ts +1 -1
- package/dist/faults/install.js +199 -6
- package/dist/faults/install.js.map +1 -1
- package/dist/faults/pattern.d.ts +1 -0
- package/dist/faults/pattern.js +24 -0
- package/dist/faults/pattern.js.map +1 -0
- package/dist/investigator/agent.js +39 -17
- package/dist/investigator/agent.js.map +1 -1
- package/dist/investigator/ledger.d.ts +1 -1
- package/dist/investigator/ledger.js +2 -2
- package/dist/investigator/ledger.js.map +1 -1
- package/dist/investigator/safe-source.d.ts +1 -0
- package/dist/investigator/safe-source.js +12 -3
- package/dist/investigator/safe-source.js.map +1 -1
- package/dist/investigator/schema.d.ts +293 -2
- package/dist/investigator/schema.js +100 -2
- package/dist/investigator/schema.js.map +1 -1
- package/dist/proof/cli.d.ts +7 -0
- package/dist/proof/cli.js +108 -0
- package/dist/proof/cli.js.map +1 -0
- package/dist/repair/generator.d.ts +12 -1
- package/dist/repair/generator.js +30 -6
- package/dist/repair/generator.js.map +1 -1
- package/dist/repair/remote-proof-runner.js +6 -10
- package/dist/repair/remote-proof-runner.js.map +1 -1
- package/dist/repair/schema.d.ts +77 -2
- package/dist/repair/schema.js +23 -2
- package/dist/repair/schema.js.map +1 -1
- package/dist/repair/solari-validator.d.ts +2 -0
- package/dist/repair/solari-validator.js +4 -6
- package/dist/repair/solari-validator.js.map +1 -1
- package/dist/repair/summary.d.ts +10 -0
- package/dist/repair/summary.js +58 -0
- package/dist/repair/summary.js.map +1 -0
- package/dist/repair/validator.d.ts +1 -0
- package/dist/repair/validator.js +53 -12
- package/dist/repair/validator.js.map +1 -1
- package/dist/report/bundle.js +16 -37
- package/dist/report/bundle.js.map +1 -1
- package/dist/report/model.js +131 -12
- package/dist/report/model.js.map +1 -1
- package/dist/report/open.d.ts +9 -0
- package/dist/report/open.js +23 -0
- package/dist/report/open.js.map +1 -1
- package/dist/report/report-client.css +2 -0
- package/dist/report/report-client.js +58 -0
- package/dist/report/schema.d.ts +115 -5
- package/dist/report/schema.js +24 -5
- package/dist/report/schema.js.map +1 -1
- package/dist/reproducer/schema.d.ts +89 -4
- package/dist/reproducer/schema.js +3 -4
- package/dist/reproducer/schema.js.map +1 -1
- package/dist/runner/execution-fault.d.ts +10 -0
- package/dist/runner/execution-fault.js +24 -0
- package/dist/runner/execution-fault.js.map +1 -0
- package/dist/runner/fault-proxy.d.ts +7 -0
- package/dist/runner/fault-proxy.js +366 -0
- package/dist/runner/fault-proxy.js.map +1 -0
- package/dist/runner/local.js +2 -2
- package/dist/runner/local.js.map +1 -1
- package/dist/runner/native-scan.d.ts +25 -0
- package/dist/runner/native-scan.js +306 -0
- package/dist/runner/native-scan.js.map +1 -0
- package/dist/runner/playwright-executor.d.ts +3 -0
- package/dist/runner/playwright-executor.js +125 -66
- package/dist/runner/playwright-executor.js.map +1 -1
- package/dist/runner/process-tree.d.ts +7 -0
- package/dist/runner/process-tree.js +62 -0
- package/dist/runner/process-tree.js.map +1 -0
- package/dist/runner/project-bridge.d.ts +7 -0
- package/dist/runner/project-bridge.js +83 -0
- package/dist/runner/project-bridge.js.map +1 -0
- package/dist/runner/trial-reporter.d.ts +7 -0
- package/dist/runner/trial-reporter.js +47 -0
- package/dist/runner/trial-reporter.js.map +1 -0
- package/dist/scan/failure-clusters.d.ts +24 -0
- package/dist/scan/failure-clusters.js +74 -0
- package/dist/scan/failure-clusters.js.map +1 -0
- package/dist/scan/schema.d.ts +170 -0
- package/dist/scan/schema.js +71 -0
- package/dist/scan/schema.js.map +1 -0
- package/dist/solari/executor.d.ts +5 -1
- package/dist/solari/executor.js +25 -17
- package/dist/solari/executor.js.map +1 -1
- package/dist/solari/run-demo.d.ts +13 -1
- package/dist/solari/run-demo.js +35 -16
- package/dist/solari/run-demo.js.map +1 -1
- package/dist/solari/usage.d.ts +8 -2
- package/dist/solari/usage.js +14 -4
- package/dist/solari/usage.js.map +1 -1
- package/dist/ui/boundary.d.ts +17 -0
- package/dist/ui/boundary.js +18 -0
- package/dist/ui/boundary.js.map +1 -0
- package/dist/ui/console.d.ts +4 -0
- package/dist/ui/console.js +11 -0
- package/dist/ui/console.js.map +1 -0
- package/dist/ui/document.d.ts +40 -0
- package/dist/ui/document.js +120 -0
- package/dist/ui/document.js.map +1 -0
- package/dist/ui/format.d.ts +8 -0
- package/dist/ui/format.js +32 -0
- package/dist/ui/format.js.map +1 -0
- package/dist/ui/progress.d.ts +17 -1
- package/dist/ui/progress.js +51 -8
- package/dist/ui/progress.js.map +1 -1
- package/dist/ui/status.d.ts +7 -0
- package/dist/ui/status.js +36 -0
- package/dist/ui/status.js.map +1 -0
- package/dist/ui/style.d.ts +8 -0
- package/dist/ui/style.js +22 -0
- package/dist/ui/style.js.map +1 -0
- package/dist/ui/text.d.ts +17 -0
- package/dist/ui/text.js +123 -0
- package/dist/ui/text.js.map +1 -0
- package/dist/ui/theme.d.ts +23 -0
- package/dist/ui/theme.js +77 -0
- package/dist/ui/theme.js.map +1 -0
- package/dist/ui/trial-progress.d.ts +13 -0
- package/dist/ui/trial-progress.js +42 -0
- package/dist/ui/trial-progress.js.map +1 -0
- package/package.json +14 -19
- package/dist/faults/network-delay.d.ts +0 -5
- package/dist/faults/network-delay.js +0 -34
- package/dist/faults/network-delay.js.map +0 -1
- package/dist/faults/request-failure.d.ts +0 -5
- package/dist/faults/request-failure.js +0 -24
- package/dist/faults/request-failure.js.map +0 -1
- package/dist/playwright.d.ts +0 -3
- package/dist/playwright.js +0 -21
- package/dist/playwright.js.map +0 -1
- package/dist/report/browser-entry.d.ts +0 -2
- package/dist/report/browser-entry.js +0 -15
- package/dist/report/browser-entry.js.map +0 -1
- package/dist/report/components/artifacts.d.ts +0 -4
- package/dist/report/components/artifacts.js +0 -6
- package/dist/report/components/artifacts.js.map +0 -1
- package/dist/report/components/experiments.d.ts +0 -4
- package/dist/report/components/experiments.js +0 -7
- package/dist/report/components/experiments.js.map +0 -1
- package/dist/report/components/hypotheses.d.ts +0 -4
- package/dist/report/components/hypotheses.js +0 -26
- package/dist/report/components/hypotheses.js.map +0 -1
- package/dist/report/components/indicators.d.ts +0 -32
- package/dist/report/components/indicators.js +0 -42
- package/dist/report/components/indicators.js.map +0 -1
- package/dist/report/components/layout.d.ts +0 -29
- package/dist/report/components/layout.js +0 -20
- package/dist/report/components/layout.js.map +0 -1
- package/dist/report/components/proof.d.ts +0 -4
- package/dist/report/components/proof.js +0 -34
- package/dist/report/components/proof.js.map +0 -1
- package/dist/report/components/reproduction.d.ts +0 -4
- package/dist/report/components/reproduction.js +0 -19
- package/dist/report/components/reproduction.js.map +0 -1
- package/dist/report/components/summary.d.ts +0 -4
- package/dist/report/components/summary.js +0 -12
- package/dist/report/components/summary.js.map +0 -1
- package/dist/report/components/verdict.d.ts +0 -4
- package/dist/report/components/verdict.js +0 -27
- package/dist/report/components/verdict.js.map +0 -1
- package/dist/report/report-app.d.ts +0 -6
- package/dist/report/report-app.js +0 -16
- package/dist/report/report-app.js.map +0 -1
- package/dist/report/report-details.css +0 -182
- package/dist/report/report.css +0 -404
package/dist/cli-help.js
CHANGED
|
@@ -1,47 +1,76 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
1
|
+
import { commandHelpText } from "./cli-command-help.js";
|
|
2
|
+
import { labelColumn, TerminalDocument } from "./ui/document.js";
|
|
3
|
+
import { PLAIN_THEME } from "./ui/theme.js";
|
|
4
|
+
export const VERSION = "0.1.1";
|
|
5
|
+
const DOCUMENTATION = "https://github.com/Astraque-Softwares/solari-cookbook/tree/main/projects/flakelab";
|
|
6
|
+
const COMMAND_GROUPS = [
|
|
7
|
+
{
|
|
8
|
+
rows: [
|
|
9
|
+
{ label: "scan <target>", value: "Run a bounded stability scan" },
|
|
10
|
+
{ label: "analyze <blob-report>", value: "Triage an existing Playwright blob report" },
|
|
11
|
+
{ label: "doctor", value: "Check local readiness and credential safety" },
|
|
12
|
+
],
|
|
13
|
+
title: "Observe",
|
|
14
|
+
},
|
|
15
|
+
{
|
|
16
|
+
rows: [
|
|
17
|
+
{ label: "diagnose [test]", value: "Explain evidence and run the next bounded step" },
|
|
18
|
+
{ label: "discover <test>", value: "Minimize a reproducible causal fault" },
|
|
19
|
+
{ label: "replay <reproducer>", value: "Verify a saved reproducer" },
|
|
20
|
+
{ label: "resume <diagnose.json>", value: "Continue a checkpointed diagnosis" },
|
|
21
|
+
],
|
|
22
|
+
title: "Reproduce",
|
|
23
|
+
},
|
|
24
|
+
{
|
|
25
|
+
rows: [
|
|
26
|
+
{ label: "investigate <test>", value: "Run the bounded Groq investigator" },
|
|
27
|
+
{ label: "repair <investigation>", value: "Prove a candidate repair in Solari" },
|
|
28
|
+
{ label: "prove <test>", value: "Run discover, investigate, repair, and report" },
|
|
29
|
+
{ label: "report <investigation>", value: "Build the portable evidence report" },
|
|
30
|
+
{ label: "bisect --good <rev>", value: "Locate the introducing commit in Solari" },
|
|
31
|
+
],
|
|
32
|
+
title: "Explain and prove",
|
|
33
|
+
},
|
|
34
|
+
];
|
|
35
|
+
const WORKFLOWS = [
|
|
36
|
+
{ label: "Measure stability", value: "flakelab tests/checkout.spec.ts --runs 20" },
|
|
37
|
+
{ label: "Triage CI evidence", value: "flakelab analyze ./blob-report" },
|
|
38
|
+
{ label: "Find a trigger", value: "flakelab diagnose tests/checkout.spec.ts --discover" },
|
|
39
|
+
{ label: "Prove a fix", value: "flakelab prove tests/checkout.spec.ts" },
|
|
40
|
+
];
|
|
41
|
+
const EXIT_CODES = [
|
|
42
|
+
{ label: "0", value: "No failure observed" },
|
|
43
|
+
{ label: "1", value: "Mixed outcomes, failure in every run, or command error" },
|
|
44
|
+
{ label: "2", value: "Inconclusive scan caused by test or Playwright infrastructure" },
|
|
45
|
+
];
|
|
46
|
+
const CREDENTIALS = [
|
|
47
|
+
{ label: "GROQ_API_KEY", value: "investigate, repair, prove" },
|
|
48
|
+
{ label: "SOLARI_API_KEY", value: "repair, bisect, publish, prove" },
|
|
49
|
+
];
|
|
50
|
+
function appendCommands(document) {
|
|
51
|
+
const column = labelColumn(COMMAND_GROUPS.flatMap((group) => group.rows));
|
|
52
|
+
for (const group of COMMAND_GROUPS) {
|
|
53
|
+
document.section(group.title).rows(group.rows, column);
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
export function mainHelpText(theme = PLAIN_THEME) {
|
|
57
|
+
const document = new TerminalDocument(theme);
|
|
58
|
+
document.banner(`FlakeLab ${VERSION} — find and prove flaky Playwright tests`);
|
|
59
|
+
document.section("Usage");
|
|
60
|
+
document.command("flakelab <target> [scan options]");
|
|
61
|
+
document.command("flakelab <command> [command options]");
|
|
62
|
+
appendCommands(document);
|
|
63
|
+
document.section("Common workflows").rows(WORKFLOWS);
|
|
64
|
+
document.section("Exit codes").rows(EXIT_CODES);
|
|
65
|
+
document.section("Credentials").rows(CREDENTIALS);
|
|
66
|
+
document.note("Missing keys are requested through hidden, run-once terminal prompts and are never"
|
|
67
|
+
+ " passed to Playwright test processes.");
|
|
68
|
+
document.section("More");
|
|
69
|
+
document.command("flakelab <command> --help");
|
|
70
|
+
document.note(DOCUMENTATION);
|
|
71
|
+
return `${document.render()}\n`;
|
|
72
|
+
}
|
|
73
|
+
export function helpText(topic, theme = PLAIN_THEME) {
|
|
74
|
+
return topic ? commandHelpText(topic, theme) : mainHelpText(theme);
|
|
46
75
|
}
|
|
47
76
|
//# sourceMappingURL=cli-help.js.map
|
package/dist/cli-help.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cli-help.js","sourceRoot":"","sources":["../src/cli-help.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"cli-help.js","sourceRoot":"","sources":["../src/cli-help.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAA;AAEvD,OAAO,EAAE,WAAW,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAA;AAEhE,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAA;AAE3C,MAAM,CAAC,MAAM,OAAO,GAAG,OAAO,CAAA;AAE9B,MAAM,aAAa,GACjB,mFAAmF,CAAA;AAOrF,MAAM,cAAc,GAAgB;IAClC;QACE,IAAI,EAAE;YACJ,EAAE,KAAK,EAAE,eAAe,EAAE,KAAK,EAAE,8BAA8B,EAAE;YACjE,EAAE,KAAK,EAAE,uBAAuB,EAAE,KAAK,EAAE,2CAA2C,EAAE;YACtF,EAAE,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oFAAoF;UAClF,uCAAuC,CAC1C,CAAA;IACD,QAAQ,CAAC,OAAO,CAAC,MAAM,CAAC,CAAA;IACxB,QAAQ,CAAC,OAAO,CAAC,2BAA2B,CAAC,CAAA;IAC7C,QAAQ,CAAC,IAAI,CAAC,aAAa,CAAC,CAAA;IAC5B,OAAO,GAAG,QAAQ,CAAC,MAAM,EAAE,IAAI,CAAA;AACjC,CAAC;AAED,MAAM,UAAU,QAAQ,CAAC,KAAiB,EAAE,QAAuB,WAAW;IAC5E,OAAO,KAAK,CAAC,CAAC,CAAC,eAAe,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC,CAAC,CAAC,YAAY,CAAC,KAAK,CAAC,CAAA;AACpE,CAAC"}
|
|
@@ -0,0 +1,202 @@
|
|
|
1
|
+
export declare const CLI_OPTION_DEFINITIONS: {
|
|
2
|
+
readonly animationRate: {
|
|
3
|
+
readonly type: "string";
|
|
4
|
+
readonly default: "5";
|
|
5
|
+
};
|
|
6
|
+
readonly artifacts: {
|
|
7
|
+
readonly type: "string";
|
|
8
|
+
readonly default: ".flakelab/runs";
|
|
9
|
+
};
|
|
10
|
+
readonly bad: {
|
|
11
|
+
readonly type: "string";
|
|
12
|
+
readonly default: "HEAD";
|
|
13
|
+
};
|
|
14
|
+
readonly bisectParallelism: {
|
|
15
|
+
readonly type: "string";
|
|
16
|
+
readonly default: "2";
|
|
17
|
+
};
|
|
18
|
+
readonly bisectReport: {
|
|
19
|
+
readonly type: "string";
|
|
20
|
+
readonly default: "flakelab.bisect.json";
|
|
21
|
+
};
|
|
22
|
+
readonly concurrency: {
|
|
23
|
+
readonly type: "string";
|
|
24
|
+
readonly default: "1";
|
|
25
|
+
};
|
|
26
|
+
readonly clockOffsetMs: {
|
|
27
|
+
readonly type: "string";
|
|
28
|
+
readonly default: "3600000";
|
|
29
|
+
};
|
|
30
|
+
readonly cookieName: {
|
|
31
|
+
readonly type: "string";
|
|
32
|
+
};
|
|
33
|
+
readonly fault: {
|
|
34
|
+
readonly type: "string";
|
|
35
|
+
readonly default: "network-delay";
|
|
36
|
+
};
|
|
37
|
+
readonly html: {
|
|
38
|
+
readonly type: "string";
|
|
39
|
+
readonly default: "flakelab.report.html";
|
|
40
|
+
};
|
|
41
|
+
readonly json: {
|
|
42
|
+
readonly type: "boolean";
|
|
43
|
+
readonly default: false;
|
|
44
|
+
};
|
|
45
|
+
readonly jumpAfterMs: {
|
|
46
|
+
readonly type: "string";
|
|
47
|
+
readonly default: "0";
|
|
48
|
+
};
|
|
49
|
+
readonly locale: {
|
|
50
|
+
readonly type: "string";
|
|
51
|
+
readonly default: "fr-FR";
|
|
52
|
+
};
|
|
53
|
+
readonly maxCost: {
|
|
54
|
+
readonly type: "string";
|
|
55
|
+
readonly default: "0.25";
|
|
56
|
+
};
|
|
57
|
+
readonly maxCopies: {
|
|
58
|
+
readonly type: "string";
|
|
59
|
+
readonly default: "4";
|
|
60
|
+
};
|
|
61
|
+
readonly maxDelay: {
|
|
62
|
+
readonly type: "string";
|
|
63
|
+
readonly default: "250";
|
|
64
|
+
};
|
|
65
|
+
readonly discoveryMaxSeconds: {
|
|
66
|
+
readonly type: "string";
|
|
67
|
+
readonly default: "300";
|
|
68
|
+
};
|
|
69
|
+
readonly maxDuplicateBytes: {
|
|
70
|
+
readonly type: "string";
|
|
71
|
+
readonly default: "1024";
|
|
72
|
+
};
|
|
73
|
+
readonly maxHoldMs: {
|
|
74
|
+
readonly type: "string";
|
|
75
|
+
readonly default: "250";
|
|
76
|
+
};
|
|
77
|
+
readonly maxRemoveBytes: {
|
|
78
|
+
readonly type: "string";
|
|
79
|
+
readonly default: "1024";
|
|
80
|
+
};
|
|
81
|
+
readonly maxStallMs: {
|
|
82
|
+
readonly type: "string";
|
|
83
|
+
readonly default: "500";
|
|
84
|
+
};
|
|
85
|
+
readonly maxExperiments: {
|
|
86
|
+
readonly type: "string";
|
|
87
|
+
readonly default: "3";
|
|
88
|
+
};
|
|
89
|
+
readonly maxSeconds: {
|
|
90
|
+
readonly type: "string";
|
|
91
|
+
readonly default: "90";
|
|
92
|
+
};
|
|
93
|
+
readonly maxSteps: {
|
|
94
|
+
readonly type: "string";
|
|
95
|
+
readonly default: "3";
|
|
96
|
+
};
|
|
97
|
+
readonly maxTrials: {
|
|
98
|
+
readonly type: "string";
|
|
99
|
+
readonly default: "12";
|
|
100
|
+
};
|
|
101
|
+
readonly maxWorkers: {
|
|
102
|
+
readonly type: "string";
|
|
103
|
+
readonly default: "4";
|
|
104
|
+
};
|
|
105
|
+
readonly minRate: {
|
|
106
|
+
readonly type: "string";
|
|
107
|
+
readonly default: "0.7";
|
|
108
|
+
};
|
|
109
|
+
readonly model: {
|
|
110
|
+
readonly type: "string";
|
|
111
|
+
readonly default: "qwen/qwen3.8-27b";
|
|
112
|
+
};
|
|
113
|
+
readonly open: {
|
|
114
|
+
readonly type: "boolean";
|
|
115
|
+
readonly default: false;
|
|
116
|
+
};
|
|
117
|
+
readonly output: {
|
|
118
|
+
readonly type: "string";
|
|
119
|
+
readonly default: "flakelab.repro.yaml";
|
|
120
|
+
};
|
|
121
|
+
readonly patch: {
|
|
122
|
+
readonly type: "string";
|
|
123
|
+
readonly default: "candidate.diff";
|
|
124
|
+
};
|
|
125
|
+
readonly pattern: {
|
|
126
|
+
readonly type: "string";
|
|
127
|
+
readonly default: "**/api/checkout";
|
|
128
|
+
};
|
|
129
|
+
readonly proof: {
|
|
130
|
+
readonly type: "string";
|
|
131
|
+
readonly default: "flakelab.proof.json";
|
|
132
|
+
};
|
|
133
|
+
readonly promptCredentials: {
|
|
134
|
+
readonly type: "boolean";
|
|
135
|
+
readonly default: false;
|
|
136
|
+
};
|
|
137
|
+
readonly publish: {
|
|
138
|
+
readonly type: "boolean";
|
|
139
|
+
readonly default: false;
|
|
140
|
+
};
|
|
141
|
+
readonly report: {
|
|
142
|
+
readonly type: "string";
|
|
143
|
+
readonly default: "flakelab.investigation.json";
|
|
144
|
+
};
|
|
145
|
+
readonly reproducer: {
|
|
146
|
+
readonly type: "string";
|
|
147
|
+
readonly default: "flakelab.repro.yaml";
|
|
148
|
+
};
|
|
149
|
+
readonly resourceType: {
|
|
150
|
+
readonly type: "string";
|
|
151
|
+
readonly default: "script";
|
|
152
|
+
};
|
|
153
|
+
readonly runs: {
|
|
154
|
+
readonly type: "string";
|
|
155
|
+
readonly default: "4";
|
|
156
|
+
};
|
|
157
|
+
readonly seed: {
|
|
158
|
+
readonly type: "string";
|
|
159
|
+
readonly default: "1";
|
|
160
|
+
};
|
|
161
|
+
readonly source: {
|
|
162
|
+
readonly type: "string";
|
|
163
|
+
readonly multiple: true;
|
|
164
|
+
readonly default: string[];
|
|
165
|
+
};
|
|
166
|
+
readonly startupEvent: {
|
|
167
|
+
readonly type: "string";
|
|
168
|
+
readonly default: "dom-content-loaded";
|
|
169
|
+
};
|
|
170
|
+
readonly storage: {
|
|
171
|
+
readonly type: "string";
|
|
172
|
+
readonly default: "local-storage";
|
|
173
|
+
};
|
|
174
|
+
readonly storageKey: {
|
|
175
|
+
readonly type: "string";
|
|
176
|
+
};
|
|
177
|
+
readonly timezone: {
|
|
178
|
+
readonly type: "string";
|
|
179
|
+
readonly default: "America/New_York";
|
|
180
|
+
};
|
|
181
|
+
readonly stallAfterMs: {
|
|
182
|
+
readonly type: "string";
|
|
183
|
+
readonly default: "0";
|
|
184
|
+
};
|
|
185
|
+
readonly trials: {
|
|
186
|
+
readonly type: "string";
|
|
187
|
+
readonly default: "4";
|
|
188
|
+
};
|
|
189
|
+
readonly verbose: {
|
|
190
|
+
readonly type: "boolean";
|
|
191
|
+
readonly default: false;
|
|
192
|
+
};
|
|
193
|
+
readonly viewportHeight: {
|
|
194
|
+
readonly type: "string";
|
|
195
|
+
readonly default: "667";
|
|
196
|
+
};
|
|
197
|
+
readonly viewportWidth: {
|
|
198
|
+
readonly type: "string";
|
|
199
|
+
readonly default: "375";
|
|
200
|
+
};
|
|
201
|
+
};
|
|
202
|
+
export declare function requiredOption<T>(value: T | undefined, name: string): T;
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
export const CLI_OPTION_DEFINITIONS = {
|
|
2
|
+
animationRate: { type: "string", default: "5" },
|
|
3
|
+
artifacts: { type: "string", default: ".flakelab/runs" },
|
|
4
|
+
bad: { type: "string", default: "HEAD" },
|
|
5
|
+
bisectParallelism: { type: "string", default: "2" },
|
|
6
|
+
bisectReport: { type: "string", default: "flakelab.bisect.json" },
|
|
7
|
+
concurrency: { type: "string", default: "1" },
|
|
8
|
+
clockOffsetMs: { type: "string", default: "3600000" },
|
|
9
|
+
cookieName: { type: "string" },
|
|
10
|
+
fault: { type: "string", default: "network-delay" },
|
|
11
|
+
html: { type: "string", default: "flakelab.report.html" },
|
|
12
|
+
json: { type: "boolean", default: false },
|
|
13
|
+
jumpAfterMs: { type: "string", default: "0" },
|
|
14
|
+
locale: { type: "string", default: "fr-FR" },
|
|
15
|
+
maxCost: { type: "string", default: "0.25" },
|
|
16
|
+
maxCopies: { type: "string", default: "4" },
|
|
17
|
+
maxDelay: { type: "string", default: "250" },
|
|
18
|
+
discoveryMaxSeconds: { type: "string", default: "300" },
|
|
19
|
+
maxDuplicateBytes: { type: "string", default: "1024" },
|
|
20
|
+
maxHoldMs: { type: "string", default: "250" },
|
|
21
|
+
maxRemoveBytes: { type: "string", default: "1024" },
|
|
22
|
+
maxStallMs: { type: "string", default: "500" },
|
|
23
|
+
maxExperiments: { type: "string", default: "3" },
|
|
24
|
+
maxSeconds: { type: "string", default: "90" },
|
|
25
|
+
maxSteps: { type: "string", default: "3" },
|
|
26
|
+
maxTrials: { type: "string", default: "12" },
|
|
27
|
+
maxWorkers: { type: "string", default: "4" },
|
|
28
|
+
minRate: { type: "string", default: "0.7" },
|
|
29
|
+
model: { type: "string", default: "qwen/qwen3.8-27b" },
|
|
30
|
+
open: { type: "boolean", default: false },
|
|
31
|
+
output: { type: "string", default: "flakelab.repro.yaml" },
|
|
32
|
+
patch: { type: "string", default: "candidate.diff" },
|
|
33
|
+
pattern: { type: "string", default: "**/api/checkout" },
|
|
34
|
+
proof: { type: "string", default: "flakelab.proof.json" },
|
|
35
|
+
promptCredentials: { type: "boolean", default: false },
|
|
36
|
+
publish: { type: "boolean", default: false },
|
|
37
|
+
report: { type: "string", default: "flakelab.investigation.json" },
|
|
38
|
+
reproducer: { type: "string", default: "flakelab.repro.yaml" },
|
|
39
|
+
resourceType: { type: "string", default: "script" },
|
|
40
|
+
runs: { type: "string", default: "4" },
|
|
41
|
+
seed: { type: "string", default: "1" },
|
|
42
|
+
source: { type: "string", multiple: true, default: [] },
|
|
43
|
+
startupEvent: { type: "string", default: "dom-content-loaded" },
|
|
44
|
+
storage: { type: "string", default: "local-storage" },
|
|
45
|
+
storageKey: { type: "string" },
|
|
46
|
+
timezone: { type: "string", default: "America/New_York" },
|
|
47
|
+
stallAfterMs: { type: "string", default: "0" },
|
|
48
|
+
trials: { type: "string", default: "4" },
|
|
49
|
+
verbose: { type: "boolean", default: false },
|
|
50
|
+
viewportHeight: { type: "string", default: "667" },
|
|
51
|
+
viewportWidth: { type: "string", default: "375" },
|
|
52
|
+
};
|
|
53
|
+
export function requiredOption(value, name) {
|
|
54
|
+
if (value === undefined) {
|
|
55
|
+
throw new Error(`Internal CLI default is missing for --${name}`);
|
|
56
|
+
}
|
|
57
|
+
return value;
|
|
58
|
+
}
|
|
59
|
+
//# sourceMappingURL=cli-option-definitions.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cli-option-definitions.js","sourceRoot":"","sources":["../src/cli-option-definitions.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,sBAAsB,GAAG;IACpC,aAAa,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,OAAO,EAAE,GAAG,EAAE;IAC/C,SAAS,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,OAAO,EAAE,gBAAgB,EAAE;IACxD,GAAG,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,OAAO,EAAE,MAAM,EAAE;IACxC,iBA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dist/cli.js
CHANGED
|
@@ -1,121 +1,121 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { parseCliArguments } from "./cli-arguments.js";
|
|
2
2
|
import { helpText, VERSION } from "./cli-help.js";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
|
|
7
|
-
import { investigate } from "./commands/investigate.js";
|
|
8
|
-
import { prove } from "./commands/prove.js";
|
|
9
|
-
import { repair } from "./commands/repair.js";
|
|
10
|
-
import { replay } from "./commands/replay.js";
|
|
11
|
-
import { generateReport } from "./commands/report.js";
|
|
12
|
-
import { scan } from "./commands/scan.js";
|
|
13
|
-
import { cliErrorMessage } from "./providers/errors.js";
|
|
14
|
-
const ADVANCED_COMMANDS = new Set([
|
|
3
|
+
import { writeStderr, writeStdout } from "./ui/console.js";
|
|
4
|
+
import { TerminalDocument } from "./ui/document.js";
|
|
5
|
+
import { stderrTheme, stdoutTheme } from "./ui/theme.js";
|
|
6
|
+
const PROVIDER_COMMANDS = new Set([
|
|
15
7
|
"bisect",
|
|
16
|
-
"diagnose",
|
|
17
|
-
"discover",
|
|
18
|
-
"doctor",
|
|
19
8
|
"investigate",
|
|
9
|
+
"prove",
|
|
20
10
|
"repair",
|
|
21
|
-
"replay",
|
|
22
11
|
"report",
|
|
23
|
-
"scan",
|
|
24
12
|
]);
|
|
25
|
-
async function
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
13
|
+
async function runNonScanCommand(invocation) {
|
|
14
|
+
switch (invocation.command) {
|
|
15
|
+
case "bisect": {
|
|
16
|
+
const { bisect } = await import("./commands/bisect.js");
|
|
17
|
+
await bisect(invocation.options);
|
|
18
|
+
return;
|
|
19
|
+
}
|
|
20
|
+
case "diagnose": {
|
|
21
|
+
const { diagnose } = await import("./commands/diagnose.js");
|
|
22
|
+
await diagnose(invocation.target, invocation.options);
|
|
23
|
+
return;
|
|
24
|
+
}
|
|
25
|
+
case "discover": {
|
|
26
|
+
const { discover } = await import("./commands/discover.js");
|
|
27
|
+
await discover(invocation.target, invocation.options);
|
|
28
|
+
return;
|
|
29
|
+
}
|
|
30
|
+
case "doctor": {
|
|
31
|
+
const { doctor } = await import("./commands/doctor.js");
|
|
32
|
+
await doctor();
|
|
33
|
+
return;
|
|
34
|
+
}
|
|
35
|
+
case "investigate": {
|
|
36
|
+
const { investigate } = await import("./commands/investigate.js");
|
|
37
|
+
await investigate(invocation.target, invocation.options);
|
|
38
|
+
return;
|
|
39
|
+
}
|
|
40
|
+
case "prove": {
|
|
41
|
+
const { prove } = await import("./commands/prove.js");
|
|
42
|
+
await prove(invocation.target, invocation.options);
|
|
43
|
+
return;
|
|
44
|
+
}
|
|
45
|
+
case "repair": {
|
|
46
|
+
const { repair } = await import("./commands/repair.js");
|
|
47
|
+
await repair(invocation.target, invocation.options);
|
|
48
|
+
return;
|
|
49
|
+
}
|
|
50
|
+
case "replay": {
|
|
51
|
+
const { replay } = await import("./commands/replay.js");
|
|
52
|
+
await replay(invocation.target, invocation.options);
|
|
53
|
+
return;
|
|
54
|
+
}
|
|
55
|
+
case "report": {
|
|
56
|
+
const { generateReport } = await import("./commands/report.js");
|
|
57
|
+
await generateReport(invocation.target, invocation.options);
|
|
58
|
+
return;
|
|
29
59
|
}
|
|
30
|
-
await doctor();
|
|
31
|
-
return;
|
|
32
|
-
}
|
|
33
|
-
if (command === "bisect") {
|
|
34
|
-
await bisect(values);
|
|
35
|
-
return;
|
|
36
|
-
}
|
|
37
|
-
const selectedTarget = target ?? (command === "scan" ? "." : undefined);
|
|
38
|
-
if (!selectedTarget) {
|
|
39
|
-
throw new Error(`${command} requires a target. Run flakelab --help for examples.`);
|
|
40
60
|
}
|
|
41
|
-
const commands = {
|
|
42
|
-
diagnose,
|
|
43
|
-
discover,
|
|
44
|
-
investigate,
|
|
45
|
-
repair,
|
|
46
|
-
replay,
|
|
47
|
-
report: generateReport,
|
|
48
|
-
scan: async (value, options) => {
|
|
49
|
-
await scan(value, options);
|
|
50
|
-
},
|
|
51
|
-
};
|
|
52
|
-
await commands[command](selectedTarget, values);
|
|
53
61
|
}
|
|
54
|
-
async function
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
options
|
|
58
|
-
artifacts: { type: "string", default: ".flakelab/runs" },
|
|
59
|
-
bad: { type: "string", default: "HEAD" },
|
|
60
|
-
"bisect-parallelism": { type: "string", default: "2" },
|
|
61
|
-
"bisect-report": { type: "string", default: "flakelab.bisect.json" },
|
|
62
|
-
concurrency: { type: "string", default: "4" },
|
|
63
|
-
"delay-ms": { type: "string", default: "250" },
|
|
64
|
-
"max-cost": { type: "string", default: "0.25" },
|
|
65
|
-
"max-delay": { type: "string", default: "250" },
|
|
66
|
-
"max-experiments": { type: "string", default: "3" },
|
|
67
|
-
"max-seconds": { type: "string", default: "90" },
|
|
68
|
-
"max-steps": { type: "string", default: "3" },
|
|
69
|
-
"max-trials": { type: "string", default: "12" },
|
|
70
|
-
"min-rate": { type: "string", default: "0.7" },
|
|
71
|
-
html: { type: "string", default: "flakelab.report.html" },
|
|
72
|
-
good: { type: "string", default: "" },
|
|
73
|
-
help: { type: "boolean", short: "h", default: false },
|
|
74
|
-
model: { type: "string", default: "qwen/qwen3.8-27b" },
|
|
75
|
-
open: { type: "boolean", default: false },
|
|
76
|
-
output: { type: "string", default: "flakelab.repro.yaml" },
|
|
77
|
-
patch: { type: "string", default: "candidate.diff" },
|
|
78
|
-
pattern: { type: "string", default: "**/api/checkout" },
|
|
79
|
-
publish: { type: "boolean", default: false },
|
|
80
|
-
proof: { type: "string", default: "flakelab.proof.json" },
|
|
81
|
-
"prompt-credentials": { type: "boolean", default: false },
|
|
82
|
-
prove: { type: "boolean", default: false },
|
|
83
|
-
report: { type: "string", default: "flakelab.investigation.json" },
|
|
84
|
-
reproducer: { type: "string", default: "flakelab.repro.yaml" },
|
|
85
|
-
runs: { type: "string", default: "4" },
|
|
86
|
-
seed: { type: "string", default: "1" },
|
|
87
|
-
trials: { type: "string", default: "4" },
|
|
88
|
-
verbose: { type: "boolean", default: false },
|
|
89
|
-
version: { type: "boolean", short: "v", default: false },
|
|
90
|
-
},
|
|
91
|
-
});
|
|
92
|
-
if (values.version) {
|
|
93
|
-
process.stdout.write(`${VERSION}\n`);
|
|
62
|
+
async function runCommand(invocation) {
|
|
63
|
+
if (invocation.command === "analyze") {
|
|
64
|
+
const { analyze } = await import("./commands/analyze.js");
|
|
65
|
+
await analyze(invocation.target, invocation.options);
|
|
94
66
|
return;
|
|
95
67
|
}
|
|
96
|
-
if (
|
|
97
|
-
|
|
68
|
+
if (invocation.command === "scan") {
|
|
69
|
+
const { scan } = await import("./commands/scan.js");
|
|
70
|
+
await scan(invocation.target, invocation.options);
|
|
98
71
|
return;
|
|
99
72
|
}
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
await
|
|
73
|
+
if (invocation.command === "resume") {
|
|
74
|
+
const { resumeDiagnosis } = await import("./commands/diagnose.js");
|
|
75
|
+
await resumeDiagnosis(invocation.target);
|
|
103
76
|
return;
|
|
104
77
|
}
|
|
105
|
-
|
|
106
|
-
|
|
78
|
+
await runNonScanCommand(invocation);
|
|
79
|
+
}
|
|
80
|
+
async function providerErrorMessage(error) {
|
|
81
|
+
try {
|
|
82
|
+
const { cliErrorMessage } = await import("./providers/errors.js");
|
|
83
|
+
return cliErrorMessage(error);
|
|
107
84
|
}
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
return;
|
|
85
|
+
catch {
|
|
86
|
+
return error.message;
|
|
111
87
|
}
|
|
112
|
-
await scan(first, values);
|
|
113
88
|
}
|
|
114
|
-
|
|
115
|
-
|
|
89
|
+
/**
|
|
90
|
+
* Command failures use the same status vocabulary as successful output, on
|
|
91
|
+
* stderr, so a machine-readable stdout stream stays clean.
|
|
92
|
+
*/
|
|
93
|
+
function failureText(message) {
|
|
94
|
+
return new TerminalDocument(stderrTheme()).entry("failure", message).render();
|
|
116
95
|
}
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
96
|
+
async function main() {
|
|
97
|
+
let providerCommand = false;
|
|
98
|
+
try {
|
|
99
|
+
const invocation = parseCliArguments(process.argv.slice(2));
|
|
100
|
+
if (invocation.command === "help") {
|
|
101
|
+
process.stdout.write(helpText(invocation.topic, stdoutTheme()));
|
|
102
|
+
return;
|
|
103
|
+
}
|
|
104
|
+
if (invocation.command === "version") {
|
|
105
|
+
writeStdout(VERSION);
|
|
106
|
+
return;
|
|
107
|
+
}
|
|
108
|
+
providerCommand = PROVIDER_COMMANDS.has(invocation.command);
|
|
109
|
+
await runCommand(invocation);
|
|
110
|
+
}
|
|
111
|
+
catch (error) {
|
|
112
|
+
let message = "FlakeLab failed";
|
|
113
|
+
if (error instanceof Error) {
|
|
114
|
+
message = providerCommand ? await providerErrorMessage(error) : error.message;
|
|
115
|
+
}
|
|
116
|
+
writeStderr(failureText(message));
|
|
117
|
+
process.exitCode = 1;
|
|
118
|
+
}
|
|
120
119
|
}
|
|
120
|
+
await main();
|
|
121
121
|
//# sourceMappingURL=cli.js.map
|