@mutagent/cli 0.1.73 → 0.1.75

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/bin/cli.js CHANGED
@@ -9073,17 +9073,15 @@ ${!hasCredentials() ? `
9073
9073
  ` : ""}${!hasRcConfig() ? `
9074
9074
  ` + chalk31.green(" Get started: mutagent init") + `
9075
9075
  ` : ""}`);
9076
- program.hook("preAction", (thisCommand) => {
9077
- const opts = thisCommand.optsWithGlobals();
9078
- if (opts.version) {
9079
- if (opts.json) {
9080
- console.log(JSON.stringify({ version: cliVersion }));
9081
- } else {
9082
- console.log(cliVersion);
9083
- }
9084
- process.exit(0);
9076
+ var rawArgs = process.argv.slice(2);
9077
+ if (rawArgs.includes("-v") || rawArgs.includes("--version")) {
9078
+ if (rawArgs.includes("--json")) {
9079
+ console.log(JSON.stringify({ version: cliVersion }));
9080
+ } else {
9081
+ console.log(cliVersion);
9085
9082
  }
9086
- });
9083
+ process.exit(0);
9084
+ }
9087
9085
  program.hook("preAction", (thisCommand) => {
9088
9086
  const globalOpts = thisCommand.optsWithGlobals();
9089
9087
  if (globalOpts.apiKey && !process.env.MUTAGENT_API_KEY) {
@@ -9114,5 +9112,5 @@ program.addCommand(createHooksCommand());
9114
9112
  program.addCommand(createFeedbackCommand());
9115
9113
  program.parse();
9116
9114
 
9117
- //# debugId=7EC4737925B3BC4B64756E2164756E21
9115
+ //# debugId=C8296489B85CD22864756E2164756E21
9118
9116
  //# sourceMappingURL=cli.js.map