@mono-labs/cli 0.0.147 → 0.0.148
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.
|
@@ -86,15 +86,18 @@ export function buildCommands(files) {
|
|
|
86
86
|
|
|
87
87
|
current.action(async (arg, cmd) => {
|
|
88
88
|
let envDefaults = {};
|
|
89
|
+
const optionValueList = argInfo.options;
|
|
90
|
+
const actualOptions =
|
|
91
|
+
argInfo?.allowAll ? [...optionValueList, 'all'] : [...optionValueList];
|
|
89
92
|
|
|
90
93
|
if (argInfo) {
|
|
91
94
|
if (
|
|
92
95
|
argInfo &&
|
|
93
|
-
|
|
94
|
-
!
|
|
96
|
+
optionValueList &&
|
|
97
|
+
!actualOptions.includes(arg ?? argInfo.default)
|
|
95
98
|
) {
|
|
96
99
|
throw new Error(
|
|
97
|
-
`Invalid argument value for ${commandName}, must be one of: ${
|
|
100
|
+
`Invalid argument value for ${commandName}, must be one of: ${actualOptions.join(
|
|
98
101
|
', '
|
|
99
102
|
)}`
|
|
100
103
|
);
|
package/package.json
CHANGED