@qawolf/cli 2.15.0 → 2.16.0

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.
Files changed (2) hide show
  1. package/dist/cli.js +12 -8
  2. package/package.json +1 -1
package/dist/cli.js CHANGED
@@ -26551,7 +26551,7 @@ function startUpdateCheck(deps) {
26551
26551
  // package.json
26552
26552
  var package_default = {
26553
26553
  name: "@qawolf/cli",
26554
- version: "2.15.0",
26554
+ version: "2.16.0",
26555
26555
  description: "Run and manage QA Wolf flows from the terminal, CI, or an AI agent",
26556
26556
  keywords: [
26557
26557
  "automation",
@@ -41553,7 +41553,7 @@ function buildFlagSpecs(inputSchema) {
41553
41553
  function isContract(value) {
41554
41554
  return "name" in value && typeof value.name === "string";
41555
41555
  }
41556
- function buildSpec(contract, path, skipFlagPaths) {
41556
+ function buildSpec(contract, path, negatedFlagPaths) {
41557
41557
  const dottedPath = path.join(".");
41558
41558
  if (contract.name !== dottedPath) {
41559
41559
  throw new Error(`Contract at "${dottedPath}" declares name "${contract.name}"; names must match their position in the contract tree.`);
@@ -41567,7 +41567,7 @@ function buildSpec(contract, path, skipFlagPaths) {
41567
41567
  trpcPath: `public.${contract.name}`,
41568
41568
  kind: contract.kind,
41569
41569
  description: contract.description,
41570
- flags: flags.flags.filter((flag) => !skipFlagPaths?.has([...path, ...flag.path].join("."))),
41570
+ flags: flags.flags.map((flag) => negatedFlagPaths?.has([...path, ...flag.path].join(".")) ? { ...flag, flag: flag.flag.replace(/^--/, "--no-") } : flag),
41571
41571
  contract
41572
41572
  };
41573
41573
  }
@@ -41579,7 +41579,7 @@ function buildCommandSpecs(tree, options = {}) {
41579
41579
  return walk(value, childPath);
41580
41580
  if (skip?.has(childPath.join(".")))
41581
41581
  return [];
41582
- return [buildSpec(value, childPath, options.skipFlagPaths)];
41582
+ return [buildSpec(value, childPath, options.negatedFlagPaths)];
41583
41583
  });
41584
41584
  return walk(tree, []);
41585
41585
  }
@@ -41820,7 +41820,7 @@ var skippedContractNames = new Set([
41820
41820
  ...handWrittenContractNames,
41821
41821
  ...deprecatedContractNames
41822
41822
  ]);
41823
- var skippedFlagPaths = new Set([
41823
+ var negatedFlagPaths = new Set([
41824
41824
  "run.create.investigateFailures"
41825
41825
  ]);
41826
41826
 
@@ -41856,12 +41856,16 @@ function registerSpec(program, signals, spec, authDeps) {
41856
41856
  command.option(flag.flag, flag.description);
41857
41857
  }
41858
41858
  }
41859
- command.action((options, leaf) => withAuthContext(signals, (ctx) => handlePublicApiCommand(ctx, spec, withoutExclusiveConflict(spec, leaf, options)), authDeps ?? {})(options, leaf));
41859
+ command.action((options, leaf) => withAuthContext(signals, (ctx) => handlePublicApiCommand(ctx, spec, withoutExclusiveConflict(spec, leaf, withoutNegatedDefaults(spec, leaf, options))), authDeps ?? {})(options, leaf));
41860
+ }
41861
+ function withoutNegatedDefaults(spec, command, options) {
41862
+ const defaulted = new Set(spec.flags.filter((flag) => flag.flag.startsWith("--no-") && command.getOptionValueSource(flag.optionKey) === "default").map((flag) => flag.optionKey));
41863
+ return Object.fromEntries(Object.entries(options).filter(([key]) => !defaulted.has(key)));
41860
41864
  }
41861
41865
  function registerPublicApiCommands(program, signals, options = {}) {
41862
41866
  const specs = buildCommandSpecs(options.contracts ?? publicContractsV1, {
41863
41867
  skipContractNames: skippedContractNames,
41864
- skipFlagPaths: skippedFlagPaths
41868
+ negatedFlagPaths
41865
41869
  });
41866
41870
  for (const spec of specs) {
41867
41871
  registerSpec(program, signals, spec, options.authDeps);
@@ -45279,4 +45283,4 @@ createProgram({ signals }).parseAsync().catch(() => {
45279
45283
  process.exitCode = 1;
45280
45284
  }).finally(() => exitWhenIdle(typeof process.exitCode === "number" ? process.exitCode : 0));
45281
45285
 
45282
- //# debugId=A305E95D82772A0E64756E2164756E21
45286
+ //# debugId=45AE364EBFF3C43064756E2164756E21
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@qawolf/cli",
3
- "version": "2.15.0",
3
+ "version": "2.16.0",
4
4
  "description": "Run and manage QA Wolf flows from the terminal, CI, or an AI agent",
5
5
  "keywords": [
6
6
  "automation",