@mono-labs/cli 0.0.114 → 0.0.116
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.
|
@@ -98,23 +98,21 @@ export function buildCommands(files) {
|
|
|
98
98
|
let envDefaults = {};
|
|
99
99
|
|
|
100
100
|
console.log(arg);
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
)}`
|
|
117
|
-
);
|
|
101
|
+
if (argInfo) {
|
|
102
|
+
console.log(argInfo);
|
|
103
|
+
console.log(argInfo.options);
|
|
104
|
+
console.log(arg ?? argInfo.default);
|
|
105
|
+
if (
|
|
106
|
+
argInfo &&
|
|
107
|
+
argInfo.options &&
|
|
108
|
+
!argInfo.options.includes(arg ?? argInfo.default)
|
|
109
|
+
) {
|
|
110
|
+
throw new Error(
|
|
111
|
+
`Invalid argument value for ${commandName}, must be one of: ${argInfo.options.join(
|
|
112
|
+
', '
|
|
113
|
+
)}`
|
|
114
|
+
);
|
|
115
|
+
}
|
|
118
116
|
}
|
|
119
117
|
|
|
120
118
|
const optionsDataList = Object.keys(optionsData).map((key) => ({
|