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.
- package/dist/index.js +25 -2
- package/dist/index.js.map +2 -2
- package/dist/metafile.json +1 -1
- package/package.json +1 -1
- package/packages/terminal-pilot/dist/cli.js +24 -1
- package/packages/terminal-pilot/dist/cli.js.map +2 -2
- package/packages/terminal-pilot/dist/testing/cli-repl.js +24 -1
- package/packages/terminal-pilot/dist/testing/cli-repl.js.map +2 -2
- package/packages/terminal-pilot/dist/testing/qa-cli.js +24 -1
- package/packages/terminal-pilot/dist/testing/qa-cli.js.map +2 -2
- package/packages/toolcraft/dist/cli.js +24 -1
|
@@ -14082,6 +14082,20 @@ function parseArrayValue(value, schema, label) {
|
|
|
14082
14082
|
(item) => parseScalarValue(item, itemSchema, label)
|
|
14083
14083
|
);
|
|
14084
14084
|
}
|
|
14085
|
+
function isNegativeNumericArrayToken(token, schema) {
|
|
14086
|
+
if (!token.startsWith("-") || token.startsWith("--")) {
|
|
14087
|
+
return false;
|
|
14088
|
+
}
|
|
14089
|
+
const itemSchema = unwrapOptional2(schema.item);
|
|
14090
|
+
if (itemSchema.kind !== "number") {
|
|
14091
|
+
return false;
|
|
14092
|
+
}
|
|
14093
|
+
const items = splitArrayInput(token);
|
|
14094
|
+
return items.length > 0 && items.every((item) => isValidNumberSchemaValue(Number(item), itemSchema));
|
|
14095
|
+
}
|
|
14096
|
+
function isNextArrayOptionToken(token, schema) {
|
|
14097
|
+
return token.startsWith("-") && !isNegativeNumericArrayToken(token, schema);
|
|
14098
|
+
}
|
|
14085
14099
|
function validateArrayBounds(value, schema, label) {
|
|
14086
14100
|
if (schema.minItems !== void 0 && value.length < schema.minItems) {
|
|
14087
14101
|
throw new UserError(
|
|
@@ -15615,7 +15629,7 @@ function consumeFieldValue(args, index, schema, label, inlineValue) {
|
|
|
15615
15629
|
let cursor2 = index + 1;
|
|
15616
15630
|
while (cursor2 < args.length) {
|
|
15617
15631
|
const token = args[cursor2] ?? "";
|
|
15618
|
-
if (token
|
|
15632
|
+
if (isNextArrayOptionToken(token, schema)) {
|
|
15619
15633
|
break;
|
|
15620
15634
|
}
|
|
15621
15635
|
const parsed = parseArrayValue(token, schema, label);
|
|
@@ -16491,6 +16505,12 @@ This is a bug in toolcraft or in the command definition; it cannot be worked aro
|
|
|
16491
16505
|
);
|
|
16492
16506
|
return;
|
|
16493
16507
|
}
|
|
16508
|
+
logger2.error(
|
|
16509
|
+
appendUsagePointer(formatCommanderErrorMessage(error3), {
|
|
16510
|
+
rootUsageName: options.rootUsageName,
|
|
16511
|
+
commandPath: options.commandPath.length > 0 ? options.commandPath : findCurrentCommanderCommandPath(options.program, options.argv ?? process.argv)
|
|
16512
|
+
})
|
|
16513
|
+
);
|
|
16494
16514
|
return;
|
|
16495
16515
|
}
|
|
16496
16516
|
if (isHttpErrorLike(error3)) {
|
|
@@ -16508,6 +16528,9 @@ This is a bug in toolcraft or in the command definition; it cannot be worked aro
|
|
|
16508
16528
|
}
|
|
16509
16529
|
process.exitCode = 1;
|
|
16510
16530
|
}
|
|
16531
|
+
function formatCommanderErrorMessage(error3) {
|
|
16532
|
+
return error3.message.startsWith("error:") ? error3.message : `error: ${error3.message}`;
|
|
16533
|
+
}
|
|
16511
16534
|
function formatInvalidEnumMessage(label, value, values, opts = {}) {
|
|
16512
16535
|
const suggestions = suggest(
|
|
16513
16536
|
value,
|