mirror of
https://github.com/morluto/rea.git
synced 2026-11-17 04:04:25 +00:00
test(cli): derive CLI tool coverage and schema parity from command registry (#11776)
* test(cli): derive CLI tool coverage and schema parity from command registry * test(cli): check recorded routed operations and host operation bindings
This commit is contained in:
1 parent
e741366c94
commit
e44f0077c9
11 files changed
+605
-389
No files matched your search
+21
-12
@@ -27,20 +27,29 @@ export const registerProcessCommands = (
|
||||
logger: Logger,
|
||||
environment: Readonly<Record<string, string | undefined>>,
|
||||
): void => {
|
||||
registerCliCommand(cli, CLI_COMMANDS.captureProcess, {
|
||||
description: "Capture one caller-selected process scenario",
|
||||
args: z.object({
|
||||
scenario: localPathStringSchema.describe("Scenario JSON path"),
|
||||
}),
|
||||
run: ({ args }) =>
|
||||
withCommandCancellation((signal) =>
|
||||
logCliCommand(logger, "capture-process", () =>
|
||||
captureProcessScenarioFile(args.scenario, environment, signal).catch(
|
||||
projectProcessCliInputCleanupError,
|
||||
registerCliCommand(
|
||||
cli,
|
||||
CLI_COMMANDS.captureProcess,
|
||||
{
|
||||
description: "Capture one caller-selected process scenario",
|
||||
args: z.object({
|
||||
scenario: localPathStringSchema.describe("Scenario JSON path"),
|
||||
}),
|
||||
run: ({ args }) =>
|
||||
withCommandCancellation((signal) =>
|
||||
logCliCommand(logger, "capture-process", () =>
|
||||
captureProcessScenarioFile(
|
||||
args.scenario,
|
||||
environment,
|
||||
signal,
|
||||
).catch(projectProcessCliInputCleanupError),
|
||||
),
|
||||
),
|
||||
),
|
||||
});
|
||||
},
|
||||
{
|
||||
operations: [{ name: "capture_process_scenario", flags: {} }],
|
||||
},
|
||||
);
|
||||
registerContractCommand(
|
||||
cli as CliInstance,
|
||||
logger,
|
||||
|
||||
Reference in new issue
Block a user