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/qa-cli.js
CHANGED
|
@@ -1692,8 +1692,13 @@ function createOption(field) {
|
|
|
1692
1692
|
if (collidesWithGlobalFlag) {
|
|
1693
1693
|
return [createCommanderOption(flags, field.description, field)];
|
|
1694
1694
|
}
|
|
1695
|
+
const mainOption = createCommanderOption(`${flags} [value]`, field.description, field);
|
|
1696
|
+
mainOption.preset(true);
|
|
1697
|
+
mainOption.argParser(
|
|
1698
|
+
(value) => typeof value === "boolean" ? value : parseBooleanText(value, field.displayPath)
|
|
1699
|
+
);
|
|
1695
1700
|
return [
|
|
1696
|
-
|
|
1701
|
+
mainOption,
|
|
1697
1702
|
createCommanderOption(`--no-${field.optionFlag.slice(2)}`, field.description, field)
|
|
1698
1703
|
];
|
|
1699
1704
|
}
|
|
@@ -1811,7 +1816,7 @@ function formatHelpFieldFlags(field) {
|
|
|
1811
1816
|
return formatPositionalToken(field);
|
|
1812
1817
|
}
|
|
1813
1818
|
if (field.schema.kind === "boolean") {
|
|
1814
|
-
return formatOptionFlags(field)
|
|
1819
|
+
return `${formatOptionFlags(field)} [value]`;
|
|
1815
1820
|
}
|
|
1816
1821
|
return `${formatOptionFlags(field)} <${describeSchemaType(field.schema)}>`;
|
|
1817
1822
|
}
|