poe-code 3.0.282 → 3.0.284
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
- package/packages/toolcraft-codemode/dist/execute.js +9 -2
- package/packages/toolcraft-codemode/dist/host-modules.js +3 -0
- package/packages/toolcraft-codemode/dist/search.js +15 -6
- package/packages/toolcraft-codemode/dist/tree.js +14 -3
package/package.json
CHANGED
|
@@ -14010,6 +14010,20 @@ function parseArrayValue(value, schema, label) {
|
|
|
14010
14010
|
(item) => parseScalarValue(item, itemSchema, label)
|
|
14011
14011
|
);
|
|
14012
14012
|
}
|
|
14013
|
+
function isNegativeNumericArrayToken(token, schema) {
|
|
14014
|
+
if (!token.startsWith("-") || token.startsWith("--")) {
|
|
14015
|
+
return false;
|
|
14016
|
+
}
|
|
14017
|
+
const itemSchema = unwrapOptional2(schema.item);
|
|
14018
|
+
if (itemSchema.kind !== "number") {
|
|
14019
|
+
return false;
|
|
14020
|
+
}
|
|
14021
|
+
const items = splitArrayInput(token);
|
|
14022
|
+
return items.length > 0 && items.every((item) => isValidNumberSchemaValue(Number(item), itemSchema));
|
|
14023
|
+
}
|
|
14024
|
+
function isNextArrayOptionToken(token, schema) {
|
|
14025
|
+
return token.startsWith("-") && !isNegativeNumericArrayToken(token, schema);
|
|
14026
|
+
}
|
|
14013
14027
|
function validateArrayBounds(value, schema, label) {
|
|
14014
14028
|
if (schema.minItems !== void 0 && value.length < schema.minItems) {
|
|
14015
14029
|
throw new UserError(
|
|
@@ -15543,7 +15557,7 @@ function consumeFieldValue(args, index, schema, label, inlineValue) {
|
|
|
15543
15557
|
let cursor2 = index + 1;
|
|
15544
15558
|
while (cursor2 < args.length) {
|
|
15545
15559
|
const token = args[cursor2] ?? "";
|
|
15546
|
-
if (token
|
|
15560
|
+
if (isNextArrayOptionToken(token, schema)) {
|
|
15547
15561
|
break;
|
|
15548
15562
|
}
|
|
15549
15563
|
const parsed = parseArrayValue(token, schema, label);
|
|
@@ -16419,6 +16433,12 @@ This is a bug in toolcraft or in the command definition; it cannot be worked aro
|
|
|
16419
16433
|
);
|
|
16420
16434
|
return;
|
|
16421
16435
|
}
|
|
16436
|
+
logger2.error(
|
|
16437
|
+
appendUsagePointer(formatCommanderErrorMessage(error3), {
|
|
16438
|
+
rootUsageName: options.rootUsageName,
|
|
16439
|
+
commandPath: options.commandPath.length > 0 ? options.commandPath : findCurrentCommanderCommandPath(options.program, options.argv ?? process.argv)
|
|
16440
|
+
})
|
|
16441
|
+
);
|
|
16422
16442
|
return;
|
|
16423
16443
|
}
|
|
16424
16444
|
if (isHttpErrorLike(error3)) {
|
|
@@ -16436,6 +16456,9 @@ This is a bug in toolcraft or in the command definition; it cannot be worked aro
|
|
|
16436
16456
|
}
|
|
16437
16457
|
process.exitCode = 1;
|
|
16438
16458
|
}
|
|
16459
|
+
function formatCommanderErrorMessage(error3) {
|
|
16460
|
+
return error3.message.startsWith("error:") ? error3.message : `error: ${error3.message}`;
|
|
16461
|
+
}
|
|
16439
16462
|
function formatInvalidEnumMessage(label, value, values, opts = {}) {
|
|
16440
16463
|
const suggestions = suggest(
|
|
16441
16464
|
value,
|