terminal-pilot 0.0.12 → 0.0.13
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/testing/cli-repl.js
CHANGED
|
@@ -1685,8 +1685,13 @@ function createOption(field) {
|
|
|
1685
1685
|
if (collidesWithGlobalFlag) {
|
|
1686
1686
|
return [createCommanderOption(flags, field.description, field)];
|
|
1687
1687
|
}
|
|
1688
|
+
const mainOption = createCommanderOption(`${flags} [value]`, field.description, field);
|
|
1689
|
+
mainOption.preset(true);
|
|
1690
|
+
mainOption.argParser(
|
|
1691
|
+
(value) => typeof value === "boolean" ? value : parseBooleanText(value, field.displayPath)
|
|
1692
|
+
);
|
|
1688
1693
|
return [
|
|
1689
|
-
|
|
1694
|
+
mainOption,
|
|
1690
1695
|
createCommanderOption(`--no-${field.optionFlag.slice(2)}`, field.description, field)
|
|
1691
1696
|
];
|
|
1692
1697
|
}
|
|
@@ -1804,7 +1809,7 @@ function formatHelpFieldFlags(field) {
|
|
|
1804
1809
|
return formatPositionalToken(field);
|
|
1805
1810
|
}
|
|
1806
1811
|
if (field.schema.kind === "boolean") {
|
|
1807
|
-
return formatOptionFlags(field)
|
|
1812
|
+
return `${formatOptionFlags(field)} [value]`;
|
|
1808
1813
|
}
|
|
1809
1814
|
return `${formatOptionFlags(field)} <${describeSchemaType(field.schema)}>`;
|
|
1810
1815
|
}
|