@grantjs/cli 1.4.2 → 1.5.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.
package/dist/index.mjs CHANGED
@@ -73,7 +73,6 @@ var Argument = class {
73
73
  default:
74
74
  this.required = true;
75
75
  this._name = name;
76
- break;
77
76
  }
78
77
  if (this._name.endsWith("...")) {
79
78
  this.variadic = true;
@@ -1534,10 +1533,12 @@ Expecting one of '${allowedValues.join("', '")}'`);
1534
1533
  this.setOptionValueWithSource(name, val, valueSource);
1535
1534
  };
1536
1535
  this.on("option:" + oname, (val) => {
1537
- handleOptionValue(val, `error: option '${option.flags}' argument '${val}' is invalid.`, "cli");
1536
+ const invalidValueMessage = `error: option '${option.flags}' argument '${val}' is invalid.`;
1537
+ handleOptionValue(val, invalidValueMessage, "cli");
1538
1538
  });
1539
1539
  if (option.envVar) this.on("optionEnv:" + oname, (val) => {
1540
- handleOptionValue(val, `error: option '${option.flags}' value '${val}' from env '${option.envVar}' is invalid.`, "env");
1540
+ const invalidValueMessage = `error: option '${option.flags}' value '${val}' from env '${option.envVar}' is invalid.`;
1541
+ handleOptionValue(val, invalidValueMessage, "env");
1541
1542
  });
1542
1543
  return this;
1543
1544
  }
@@ -4110,7 +4111,7 @@ function createStartCommand(program) {
4110
4111
  //#endregion
4111
4112
  //#region src/utils/package.ts
4112
4113
  function getPackageVersion() {
4113
- return "1.4.2";
4114
+ return "1.5.0";
4114
4115
  }
4115
4116
  //#endregion
4116
4117
  //#region src/commands/version.ts