poe-code 3.0.282 → 3.0.283

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.
@@ -14089,6 +14089,20 @@ function parseArrayValue(value, schema, label) {
14089
14089
  (item) => parseScalarValue(item, itemSchema, label)
14090
14090
  );
14091
14091
  }
14092
+ function isNegativeNumericArrayToken(token, schema) {
14093
+ if (!token.startsWith("-") || token.startsWith("--")) {
14094
+ return false;
14095
+ }
14096
+ const itemSchema = unwrapOptional2(schema.item);
14097
+ if (itemSchema.kind !== "number") {
14098
+ return false;
14099
+ }
14100
+ const items = splitArrayInput(token);
14101
+ return items.length > 0 && items.every((item) => isValidNumberSchemaValue(Number(item), itemSchema));
14102
+ }
14103
+ function isNextArrayOptionToken(token, schema) {
14104
+ return token.startsWith("-") && !isNegativeNumericArrayToken(token, schema);
14105
+ }
14092
14106
  function validateArrayBounds(value, schema, label) {
14093
14107
  if (schema.minItems !== void 0 && value.length < schema.minItems) {
14094
14108
  throw new UserError(
@@ -15622,7 +15636,7 @@ function consumeFieldValue(args, index, schema, label, inlineValue) {
15622
15636
  let cursor2 = index + 1;
15623
15637
  while (cursor2 < args.length) {
15624
15638
  const token = args[cursor2] ?? "";
15625
- if (token.startsWith("-")) {
15639
+ if (isNextArrayOptionToken(token, schema)) {
15626
15640
  break;
15627
15641
  }
15628
15642
  const parsed = parseArrayValue(token, schema, label);
@@ -16498,6 +16512,12 @@ This is a bug in toolcraft or in the command definition; it cannot be worked aro
16498
16512
  );
16499
16513
  return;
16500
16514
  }
16515
+ logger2.error(
16516
+ appendUsagePointer(formatCommanderErrorMessage(error3), {
16517
+ rootUsageName: options.rootUsageName,
16518
+ commandPath: options.commandPath.length > 0 ? options.commandPath : findCurrentCommanderCommandPath(options.program, options.argv ?? process.argv)
16519
+ })
16520
+ );
16501
16521
  return;
16502
16522
  }
16503
16523
  if (isHttpErrorLike(error3)) {
@@ -16515,6 +16535,9 @@ This is a bug in toolcraft or in the command definition; it cannot be worked aro
16515
16535
  }
16516
16536
  process.exitCode = 1;
16517
16537
  }
16538
+ function formatCommanderErrorMessage(error3) {
16539
+ return error3.message.startsWith("error:") ? error3.message : `error: ${error3.message}`;
16540
+ }
16518
16541
  function formatInvalidEnumMessage(label, value, values, opts = {}) {
16519
16542
  const suggestions = suggest(
16520
16543
  value,