massarg 2.0.1 → 2.1.1
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/README.md +33 -0
- package/color.d.ts +45 -0
- package/color.d.ts.map +1 -0
- package/color.js +52 -0
- package/color.js.map +1 -0
- package/command.d.ts +35 -27
- package/command.d.ts.map +1 -1
- package/command.js +75 -8
- package/command.js.map +1 -1
- package/error.js +2 -2
- package/error.js.map +1 -1
- package/example.d.ts +1 -18
- package/example.d.ts.map +1 -1
- package/help.d.ts +447 -898
- package/help.d.ts.map +1 -1
- package/massarg.d.ts +2 -1
- package/massarg.d.ts.map +1 -1
- package/massarg.js +2 -2
- package/massarg.js.map +1 -1
- package/option.d.ts +22 -238
- package/option.d.ts.map +1 -1
- package/option.js +1 -1
- package/option.js.map +1 -1
- package/package.json +15 -26
- package/sample.d.ts +2 -0
- package/sample.d.ts.map +1 -0
- package/sample.js +121 -0
- package/sample.js.map +1 -0
- package/style.d.ts +36 -28
- package/style.d.ts.map +1 -1
- package/style.js +7 -8
- package/style.js.map +1 -1
- package/utils.d.ts +1 -1
- package/utils.d.ts.map +1 -1
- package/utils.js +12 -13
- package/utils.js.map +1 -1
package/help.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"help.d.ts","sourceRoot":"","sources":["../src/help.ts"],"names":[],"mappings":"AAAA,OAAO,CAAC,MAAM,KAAK,CAAA;AAEnB,OAAO,EAAE,cAAc,EAAE,MAAM,WAAW,CAAA;AAC1C,OAAO,EAAE,YAAY,EAAiC,MAAM,SAAS,CAAA;AAGrE,eAAO,MAAM,0BAA0B
|
|
1
|
+
{"version":3,"file":"help.d.ts","sourceRoot":"","sources":["../src/help.ts"],"names":[],"mappings":"AAAA,OAAO,CAAC,MAAM,KAAK,CAAA;AAEnB,OAAO,EAAE,cAAc,EAAE,MAAM,WAAW,CAAA;AAC1C,OAAO,EAAE,YAAY,EAAiC,MAAM,SAAS,CAAA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EAAE,CAAA;IACjB,eAAe,CAAC,EAAE,MAAM,EAAE,CAAA;IAC1B,WAAW,EAAE,MAAM,CAAA;IACnB,MAAM,CAAC,EAAE,OAAO,CAAA;IAChB,SAAS,CAAC,EAAE,OAAO,CAAA;IACnB,YAAY,CAAC,EAAE,GAAG,CAAA;CACnB,CAAA;AAED,qBAAa,aAAa;IACxB,KAAK,EAAE,cAAc,CAAC,GAAG,CAAC,CAAA;IAC1B,MAAM,EAAE,YAAY,CAAC,UAAU,CAAC,CAAA;gBAEpB,KAAK,EAAE,cAAc,CAAC,GAAG,CAAC,EAAE,MAAM,CAAC,EAAE,UAAU;IAK3D,QAAQ,IAAI,MAAM;IAuHlB,SAAS,IAAI,IAAI;CAGlB"}
|
package/massarg.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { ArgsObject, CommandConfig, MassargCommand } from './command';
|
|
1
|
+
import { ArgsObject, CommandConfig, ErrorHandler, MassargCommand } from './command';
|
|
2
|
+
export type { ErrorHandler };
|
|
2
3
|
/** A minimal command config that can be used to create a top-level command. */
|
|
3
4
|
export type MinimalCommandConfig<Args extends ArgsObject = ArgsObject> = Omit<CommandConfig<Args>, 'aliases' | 'run'> & Partial<Pick<CommandConfig<Args>, 'aliases' | 'run'>>;
|
|
4
5
|
/**
|
package/massarg.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"massarg.d.ts","sourceRoot":"","sources":["../src/massarg.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,WAAW,CAAA;
|
|
1
|
+
{"version":3,"file":"massarg.d.ts","sourceRoot":"","sources":["../src/massarg.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,aAAa,EAAE,YAAY,EAAE,cAAc,EAAE,MAAM,WAAW,CAAA;AAEnF,YAAY,EAAE,YAAY,EAAE,CAAA;AAE5B,+EAA+E;AAC/E,MAAM,MAAM,oBAAoB,CAAC,IAAI,SAAS,UAAU,GAAG,UAAU,IAAI,IAAI,CAC3E,aAAa,CAAC,IAAI,CAAC,EACnB,SAAS,GAAG,KAAK,CAClB,GACC,OAAO,CAAC,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,EAAE,SAAS,GAAG,KAAK,CAAC,CAAC,CAAA;AAEvD;;;;;;GAMG;AACH,qBAAa,OAAO,CAAC,IAAI,SAAS,UAAU,GAAG,UAAU,CAAE,SAAQ,cAAc,CAAC,IAAI,CAAC;gBACzE,OAAO,EAAE,oBAAoB,CAAC,IAAI,CAAC;CAWhD;AAED;;;;GAIG;AACH,wBAAgB,OAAO,CAAC,IAAI,SAAS,UAAU,GAAG,UAAU,EAC1D,OAAO,EAAE,oBAAoB,CAAC,IAAI,CAAC,GAClC,cAAc,CAAC,IAAI,CAAC,CAEtB"}
|
package/massarg.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.Massarg = void 0;
|
|
4
|
+
exports.massarg = massarg;
|
|
4
5
|
const command_1 = require("./command");
|
|
5
6
|
/**
|
|
6
7
|
* This class behaves similarly to {@link MassargCommand}, but it accepts only params that are relevant
|
|
@@ -31,5 +32,4 @@ exports.Massarg = Massarg;
|
|
|
31
32
|
function massarg(options) {
|
|
32
33
|
return new Massarg(options);
|
|
33
34
|
}
|
|
34
|
-
exports.massarg = massarg;
|
|
35
35
|
//# sourceMappingURL=massarg.js.map
|
package/massarg.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"massarg.js","sourceRoot":"","sources":["../src/massarg.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"massarg.js","sourceRoot":"","sources":["../src/massarg.ts"],"names":[],"mappings":";;;AAqCA,0BAIC;AAzCD,uCAAmF;AAWnF;;;;;;GAMG;AACH,MAAa,OAA8C,SAAQ,wBAAoB;IACrF,YAAY,OAAmC;QAC7C,uFAAuF;QACvF,KAAK,CAAC;YACJ,OAAO,EAAE,EAAE;YACX,GAAG,EAAE,GAAG,EAAE;gBACR,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,UAAU,EAAE,CAAC,CAAA;gBAC9B,8CAA8C;YAChD,CAAC;YACD,GAAG,OAAO;SACX,CAAC,CAAA;IACJ,CAAC;CACF;AAZD,0BAYC;AAED;;;;GAIG;AACH,SAAgB,OAAO,CACrB,OAAmC;IAEnC,OAAO,IAAI,OAAO,CAAC,OAAO,CAAC,CAAA;AAC7B,CAAC"}
|
package/option.d.ts
CHANGED
|
@@ -1,291 +1,75 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
import { ArgsObject } from './command';
|
|
3
3
|
export declare const OptionConfig: <OptionType, Args extends ArgsObject = ArgsObject>(type: z.ZodType<OptionType>) => z.ZodObject<{
|
|
4
|
-
/** Name of the option */
|
|
5
4
|
name: z.ZodString;
|
|
6
|
-
/** Description of the option, displayed in the help output */
|
|
7
5
|
description: z.ZodString;
|
|
8
|
-
/** Default value of the option */
|
|
9
6
|
defaultValue: z.ZodOptional<z.ZodAny>;
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
/**
|
|
13
|
-
* Parse the value of the option. You can return any type here, or throw an error if the value
|
|
14
|
-
* is invalid.
|
|
15
|
-
*/
|
|
16
|
-
parse: z.ZodOptional<z.ZodType<Parser<Args, OptionType>, z.ZodTypeDef, Parser<Args, OptionType>>>;
|
|
17
|
-
/**
|
|
18
|
-
* Whether the option is an array.
|
|
19
|
-
*
|
|
20
|
-
* Array options can be specified multiple times, and the values will be collected into an array.
|
|
21
|
-
*
|
|
22
|
-
* Normally, specifying an option multiple times will override the previous value.
|
|
23
|
-
*/
|
|
7
|
+
aliases: z.ZodArray<z.ZodString>;
|
|
8
|
+
parse: z.ZodOptional<z.ZodType<Parser<Args, OptionType>>>;
|
|
24
9
|
array: z.ZodOptional<z.ZodBoolean>;
|
|
25
|
-
/** Whether the option is required. If it is required, parsing will throw an error if it's not
|
|
26
|
-
* present.
|
|
27
|
-
*/
|
|
28
10
|
required: z.ZodOptional<z.ZodBoolean>;
|
|
29
|
-
/** Whether the option is the default option. The default option is the option that is used if
|
|
30
|
-
* no other option is specified, e.g. a value is passed in without an option name.
|
|
31
|
-
*
|
|
32
|
-
* Note that if commands match the same argument first, they will be used instead of the default
|
|
33
|
-
* option.
|
|
34
|
-
*/
|
|
35
11
|
isDefault: z.ZodOptional<z.ZodBoolean>;
|
|
36
|
-
/** Whether the option is hidden. Hidden options are not displayed in the help output. */
|
|
37
12
|
hidden: z.ZodOptional<z.ZodBoolean>;
|
|
38
|
-
/** Specify a custom name for the output, which will be used when parsing the args. */
|
|
39
13
|
outputName: z.ZodOptional<z.ZodString>;
|
|
40
|
-
},
|
|
41
|
-
name: string;
|
|
42
|
-
description: string;
|
|
43
|
-
aliases: string[];
|
|
44
|
-
defaultValue?: any;
|
|
45
|
-
array?: boolean | undefined;
|
|
46
|
-
required?: boolean | undefined;
|
|
47
|
-
isDefault?: boolean | undefined;
|
|
48
|
-
hidden?: boolean | undefined;
|
|
49
|
-
outputName?: string | undefined;
|
|
50
|
-
parse?: Parser<Args, OptionType> | undefined;
|
|
51
|
-
}, {
|
|
52
|
-
name: string;
|
|
53
|
-
description: string;
|
|
54
|
-
aliases: string[];
|
|
55
|
-
defaultValue?: any;
|
|
56
|
-
array?: boolean | undefined;
|
|
57
|
-
required?: boolean | undefined;
|
|
58
|
-
isDefault?: boolean | undefined;
|
|
59
|
-
hidden?: boolean | undefined;
|
|
60
|
-
outputName?: string | undefined;
|
|
61
|
-
parse?: Parser<Args, OptionType> | undefined;
|
|
62
|
-
}>;
|
|
14
|
+
}, z.core.$strip>;
|
|
63
15
|
export type OptionConfig<T = unknown, Args extends ArgsObject = ArgsObject> = z.infer<ReturnType<typeof OptionConfig<T, Args>>>;
|
|
64
16
|
/**
|
|
65
17
|
* Configuration for a flag (boolean argument) that can be passed to a command.
|
|
66
18
|
*/
|
|
67
|
-
export declare const FlagConfig: z.ZodObject<
|
|
68
|
-
/** Name of the option */
|
|
19
|
+
export declare const FlagConfig: z.ZodObject<{
|
|
69
20
|
name: z.ZodString;
|
|
70
|
-
/** Description of the option, displayed in the help output */
|
|
71
21
|
description: z.ZodString;
|
|
72
|
-
/** Default value of the option */
|
|
73
22
|
defaultValue: z.ZodOptional<z.ZodAny>;
|
|
74
|
-
|
|
75
|
-
aliases: z.ZodArray<z.ZodString, "many">;
|
|
76
|
-
/**
|
|
77
|
-
* Parse the value of the option. You can return any type here, or throw an error if the value
|
|
78
|
-
* is invalid.
|
|
79
|
-
*/
|
|
80
|
-
parse: z.ZodOptional<z.ZodType<Parser<ArgsObject, boolean>, z.ZodTypeDef, Parser<ArgsObject, boolean>>>;
|
|
81
|
-
/**
|
|
82
|
-
* Whether the option is an array.
|
|
83
|
-
*
|
|
84
|
-
* Array options can be specified multiple times, and the values will be collected into an array.
|
|
85
|
-
*
|
|
86
|
-
* Normally, specifying an option multiple times will override the previous value.
|
|
87
|
-
*/
|
|
23
|
+
aliases: z.ZodArray<z.ZodString>;
|
|
88
24
|
array: z.ZodOptional<z.ZodBoolean>;
|
|
89
|
-
/** Whether the option is required. If it is required, parsing will throw an error if it's not
|
|
90
|
-
* present.
|
|
91
|
-
*/
|
|
92
25
|
required: z.ZodOptional<z.ZodBoolean>;
|
|
93
|
-
/** Whether the option is the default option. The default option is the option that is used if
|
|
94
|
-
* no other option is specified, e.g. a value is passed in without an option name.
|
|
95
|
-
*
|
|
96
|
-
* Note that if commands match the same argument first, they will be used instead of the default
|
|
97
|
-
* option.
|
|
98
|
-
*/
|
|
99
|
-
isDefault: z.ZodOptional<z.ZodBoolean>;
|
|
100
|
-
/** Whether the option is hidden. Hidden options are not displayed in the help output. */
|
|
101
26
|
hidden: z.ZodOptional<z.ZodBoolean>;
|
|
102
|
-
/** Specify a custom name for the output, which will be used when parsing the args. */
|
|
103
27
|
outputName: z.ZodOptional<z.ZodString>;
|
|
104
|
-
}, "isDefault" | "parse">, {
|
|
105
|
-
/** Whether the flag can be negated, e.g. `--no-verbose` */
|
|
106
28
|
negatable: z.ZodOptional<z.ZodBoolean>;
|
|
107
|
-
/**
|
|
108
|
-
* Negation name of the option, which can be used with the full option notation.
|
|
109
|
-
*
|
|
110
|
-
* Defaults to `no-{name}` of your option's name, e.g. `verbose` becomes `--no-verbose`.
|
|
111
|
-
*
|
|
112
|
-
* To use this, you must set `negatable: true` in the option's configuration.
|
|
113
|
-
*/
|
|
114
29
|
negationName: z.ZodOptional<z.ZodString>;
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
*
|
|
118
|
-
* Defaults to uppercase of each of the aliases provided, e.g. `q` becomes `-Q`.
|
|
119
|
-
*
|
|
120
|
-
* To use this, you must set `negatable: true` in the option's configuration.
|
|
121
|
-
*/
|
|
122
|
-
negationAliases: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
123
|
-
}>, "strip", z.ZodTypeAny, {
|
|
124
|
-
name: string;
|
|
125
|
-
description: string;
|
|
126
|
-
aliases: string[];
|
|
127
|
-
defaultValue?: any;
|
|
128
|
-
array?: boolean | undefined;
|
|
129
|
-
required?: boolean | undefined;
|
|
130
|
-
hidden?: boolean | undefined;
|
|
131
|
-
outputName?: string | undefined;
|
|
132
|
-
negatable?: boolean | undefined;
|
|
133
|
-
negationName?: string | undefined;
|
|
134
|
-
negationAliases?: string[] | undefined;
|
|
135
|
-
}, {
|
|
136
|
-
name: string;
|
|
137
|
-
description: string;
|
|
138
|
-
aliases: string[];
|
|
139
|
-
defaultValue?: any;
|
|
140
|
-
array?: boolean | undefined;
|
|
141
|
-
required?: boolean | undefined;
|
|
142
|
-
hidden?: boolean | undefined;
|
|
143
|
-
outputName?: string | undefined;
|
|
144
|
-
negatable?: boolean | undefined;
|
|
145
|
-
negationName?: string | undefined;
|
|
146
|
-
negationAliases?: string[] | undefined;
|
|
147
|
-
}>;
|
|
30
|
+
negationAliases: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
31
|
+
}, z.core.$strip>;
|
|
148
32
|
export type FlagConfig = z.infer<typeof FlagConfig>;
|
|
149
33
|
/**
|
|
150
34
|
* A function that parses an option value.
|
|
151
35
|
*/
|
|
152
36
|
export type Parser<Args extends ArgsObject = ArgsObject, OptionType extends any = any> = (x: string, y: Args) => OptionType;
|
|
153
37
|
/** {@link OptionConfig} with a specified value type */
|
|
154
|
-
export declare const TypedOptionConfig: <OptionType, Args extends ArgsObject = ArgsObject>(type: z.ZodType<OptionType>) => z.ZodObject<
|
|
155
|
-
/** Name of the option */
|
|
38
|
+
export declare const TypedOptionConfig: <OptionType, Args extends ArgsObject = ArgsObject>(type: z.ZodType<OptionType>) => z.ZodObject<{
|
|
156
39
|
name: z.ZodString;
|
|
157
|
-
/** Description of the option, displayed in the help output */
|
|
158
40
|
description: z.ZodString;
|
|
159
|
-
/** Default value of the option */
|
|
160
41
|
defaultValue: z.ZodOptional<z.ZodAny>;
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
/**
|
|
164
|
-
* Parse the value of the option. You can return any type here, or throw an error if the value
|
|
165
|
-
* is invalid.
|
|
166
|
-
*/
|
|
167
|
-
parse: z.ZodOptional<z.ZodType<Parser<Args, OptionType>, z.ZodTypeDef, Parser<Args, OptionType>>>;
|
|
168
|
-
/**
|
|
169
|
-
* Whether the option is an array.
|
|
170
|
-
*
|
|
171
|
-
* Array options can be specified multiple times, and the values will be collected into an array.
|
|
172
|
-
*
|
|
173
|
-
* Normally, specifying an option multiple times will override the previous value.
|
|
174
|
-
*/
|
|
42
|
+
aliases: z.ZodArray<z.ZodString>;
|
|
43
|
+
parse: z.ZodOptional<z.ZodType<Parser<Args, OptionType>, unknown, z.core.$ZodTypeInternals<Parser<Args, OptionType>, unknown>>>;
|
|
175
44
|
array: z.ZodOptional<z.ZodBoolean>;
|
|
176
|
-
/** Whether the option is required. If it is required, parsing will throw an error if it's not
|
|
177
|
-
* present.
|
|
178
|
-
*/
|
|
179
45
|
required: z.ZodOptional<z.ZodBoolean>;
|
|
180
|
-
/** Whether the option is the default option. The default option is the option that is used if
|
|
181
|
-
* no other option is specified, e.g. a value is passed in without an option name.
|
|
182
|
-
*
|
|
183
|
-
* Note that if commands match the same argument first, they will be used instead of the default
|
|
184
|
-
* option.
|
|
185
|
-
*/
|
|
186
46
|
isDefault: z.ZodOptional<z.ZodBoolean>;
|
|
187
|
-
/** Whether the option is hidden. Hidden options are not displayed in the help output. */
|
|
188
47
|
hidden: z.ZodOptional<z.ZodBoolean>;
|
|
189
|
-
/** Specify a custom name for the output, which will be used when parsing the args. */
|
|
190
48
|
outputName: z.ZodOptional<z.ZodString>;
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
}
|
|
194
|
-
|
|
195
|
-
description: string;
|
|
196
|
-
aliases: string[];
|
|
197
|
-
type?: "number" | undefined;
|
|
198
|
-
defaultValue?: any;
|
|
199
|
-
array?: boolean | undefined;
|
|
200
|
-
required?: boolean | undefined;
|
|
201
|
-
isDefault?: boolean | undefined;
|
|
202
|
-
hidden?: boolean | undefined;
|
|
203
|
-
outputName?: string | undefined;
|
|
204
|
-
parse?: Parser<Args, OptionType> | undefined;
|
|
205
|
-
}, {
|
|
206
|
-
name: string;
|
|
207
|
-
description: string;
|
|
208
|
-
aliases: string[];
|
|
209
|
-
type?: "number" | undefined;
|
|
210
|
-
defaultValue?: any;
|
|
211
|
-
array?: boolean | undefined;
|
|
212
|
-
required?: boolean | undefined;
|
|
213
|
-
isDefault?: boolean | undefined;
|
|
214
|
-
hidden?: boolean | undefined;
|
|
215
|
-
outputName?: string | undefined;
|
|
216
|
-
parse?: Parser<Args, OptionType> | undefined;
|
|
217
|
-
}>;
|
|
49
|
+
type: z.ZodOptional<z.ZodEnum<{
|
|
50
|
+
number: "number";
|
|
51
|
+
}>>;
|
|
52
|
+
}, z.core.$strip>;
|
|
218
53
|
export type TypedOptionConfig<T, A extends ArgsObject = ArgsObject> = z.infer<ReturnType<typeof TypedOptionConfig<T, A>>>;
|
|
219
54
|
/**
|
|
220
55
|
* @see OptionConfig
|
|
221
56
|
* @see ArrayOptionConfig
|
|
222
57
|
*/
|
|
223
|
-
export declare const ArrayOptionConfig: <T, A extends ArgsObject = ArgsObject>(type: z.ZodType<T>) => z.ZodObject<
|
|
224
|
-
/** Name of the option */
|
|
58
|
+
export declare const ArrayOptionConfig: <T, A extends ArgsObject = ArgsObject>(type: z.ZodType<T>) => z.ZodObject<{
|
|
225
59
|
name: z.ZodString;
|
|
226
|
-
/** Description of the option, displayed in the help output */
|
|
227
60
|
description: z.ZodString;
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
/** Aliases for the option, which can be used with the shorthand option notation. */
|
|
231
|
-
aliases: z.ZodArray<z.ZodString, "many">;
|
|
232
|
-
/**
|
|
233
|
-
* Parse the value of the option. You can return any type here, or throw an error if the value
|
|
234
|
-
* is invalid.
|
|
235
|
-
*/
|
|
236
|
-
parse: z.ZodOptional<z.ZodType<Parser<A, T[]>, z.ZodTypeDef, Parser<A, T[]>>>;
|
|
237
|
-
/**
|
|
238
|
-
* Whether the option is an array.
|
|
239
|
-
*
|
|
240
|
-
* Array options can be specified multiple times, and the values will be collected into an array.
|
|
241
|
-
*
|
|
242
|
-
* Normally, specifying an option multiple times will override the previous value.
|
|
243
|
-
*/
|
|
61
|
+
aliases: z.ZodArray<z.ZodString>;
|
|
62
|
+
parse: z.ZodOptional<z.ZodType<Parser<A, T[]>, unknown, z.core.$ZodTypeInternals<Parser<A, T[]>, unknown>>>;
|
|
244
63
|
array: z.ZodOptional<z.ZodBoolean>;
|
|
245
|
-
/** Whether the option is required. If it is required, parsing will throw an error if it's not
|
|
246
|
-
* present.
|
|
247
|
-
*/
|
|
248
64
|
required: z.ZodOptional<z.ZodBoolean>;
|
|
249
|
-
/** Whether the option is the default option. The default option is the option that is used if
|
|
250
|
-
* no other option is specified, e.g. a value is passed in without an option name.
|
|
251
|
-
*
|
|
252
|
-
* Note that if commands match the same argument first, they will be used instead of the default
|
|
253
|
-
* option.
|
|
254
|
-
*/
|
|
255
65
|
isDefault: z.ZodOptional<z.ZodBoolean>;
|
|
256
|
-
/** Whether the option is hidden. Hidden options are not displayed in the help output. */
|
|
257
66
|
hidden: z.ZodOptional<z.ZodBoolean>;
|
|
258
|
-
/** Specify a custom name for the output, which will be used when parsing the args. */
|
|
259
67
|
outputName: z.ZodOptional<z.ZodString>;
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
}
|
|
263
|
-
defaultValue: z.ZodOptional<z.ZodArray<z.ZodType<T, z.
|
|
264
|
-
}
|
|
265
|
-
name: string;
|
|
266
|
-
description: string;
|
|
267
|
-
aliases: string[];
|
|
268
|
-
type?: "number" | undefined;
|
|
269
|
-
defaultValue?: T[] | undefined;
|
|
270
|
-
array?: boolean | undefined;
|
|
271
|
-
required?: boolean | undefined;
|
|
272
|
-
isDefault?: boolean | undefined;
|
|
273
|
-
hidden?: boolean | undefined;
|
|
274
|
-
outputName?: string | undefined;
|
|
275
|
-
parse?: Parser<A, T[]> | undefined;
|
|
276
|
-
}, {
|
|
277
|
-
name: string;
|
|
278
|
-
description: string;
|
|
279
|
-
aliases: string[];
|
|
280
|
-
type?: "number" | undefined;
|
|
281
|
-
defaultValue?: T[] | undefined;
|
|
282
|
-
array?: boolean | undefined;
|
|
283
|
-
required?: boolean | undefined;
|
|
284
|
-
isDefault?: boolean | undefined;
|
|
285
|
-
hidden?: boolean | undefined;
|
|
286
|
-
outputName?: string | undefined;
|
|
287
|
-
parse?: Parser<A, T[]> | undefined;
|
|
288
|
-
}>;
|
|
68
|
+
type: z.ZodOptional<z.ZodEnum<{
|
|
69
|
+
number: "number";
|
|
70
|
+
}>>;
|
|
71
|
+
defaultValue: z.ZodOptional<z.ZodArray<z.ZodType<T, unknown, z.core.$ZodTypeInternals<T, unknown>>>>;
|
|
72
|
+
}, z.core.$strip>;
|
|
289
73
|
/**
|
|
290
74
|
* An option that can be passed to a command.
|
|
291
75
|
*
|
package/option.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"option.d.ts","sourceRoot":"","sources":["../src/option.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAGvB,OAAO,EAAE,UAAU,EAAE,MAAM,WAAW,CAAA;AAEtC,eAAO,MAAM,YAAY,
|
|
1
|
+
{"version":3,"file":"option.d.ts","sourceRoot":"","sources":["../src/option.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAGvB,OAAO,EAAE,UAAU,EAAE,MAAM,WAAW,CAAA;AAEtC,eAAO,MAAM,YAAY,GAAI,UAAU,EAAE,IAAI,SAAS,UAAU,GAAG,UAAU,EAC3E,MAAM,CAAC,CAAC,OAAO,CAAC,UAAU,CAAC;;;;;WAeoB,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,OAAO,CAAC,MAAM,CAAC,IAAI,EAAE,UAAU,CAAC,CAAC,CAAC;;;;;;iBAwB/F,CAAA;AACJ,MAAM,MAAM,YAAY,CAAC,CAAC,GAAG,OAAO,EAAE,IAAI,SAAS,UAAU,GAAG,UAAU,IAAI,CAAC,CAAC,KAAK,CACnF,UAAU,CAAC,OAAO,YAAY,CAAC,CAAC,EAAE,IAAI,CAAC,CAAC,CACzC,CAAA;AAED;;GAEG;AACH,eAAO,MAAM,UAAU;;;;;;;;;;;;iBAuBpB,CAAA;AACH,MAAM,MAAM,UAAU,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,UAAU,CAAC,CAAA;AAEnD;;GAEG;AACH,MAAM,MAAM,MAAM,CAAC,IAAI,SAAS,UAAU,GAAG,UAAU,EAAE,UAAU,SAAS,GAAG,GAAG,GAAG,IAAI,CACvF,CAAC,EAAE,MAAM,EACT,CAAC,EAAE,IAAI,KACJ,UAAU,CAAA;AAEf,uDAAuD;AACvD,eAAO,MAAM,iBAAiB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AAQ,GAAG,cAAc;CAQnD;AAED;;;;;;;;;;;;;;;GAeG;AACH,qBAAa,aAAc,SAAQ,aAAa,CAAC,MAAM,CAAC;gBAC1C,OAAO,EAAE,IAAI,CAAC,YAAY,CAAC,MAAM,CAAC,EAAE,OAAO,CAAC;IAOxD,YAAY,CAAC,IAAI,EAAE,MAAM,EAAE,EAAE,OAAO,EAAE,UAAU,EAAE,QAAQ,EAAE,QAAQ,GAAG,SAAS,CAAC,MAAM,CAAC;CAwBzF;AAED;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,qBAAa,WAAY,SAAQ,aAAa,CAAC,OAAO,CAAC;IACrD,kFAAkF;IAClF,SAAS,EAAE,OAAO,CAAA;IAClB,uFAAuF;IACvF,YAAY,EAAE,MAAM,CAAA;IACpB,+FAA+F;IAC/F,eAAe,EAAE,MAAM,EAAE,CAAA;gBAEb,OAAO,EAAE,UAAU;IAU/B,YAAY,CAAC,IAAI,EAAE,MAAM,EAAE,EAAE,QAAQ,EAAE,UAAU,EAAE,QAAQ,EAAE,QAAQ,GAAG,SAAS,CAAC,OAAO,CAAC;IAyC1F,cAAc,CAAC,QAAQ,EAAE,QAAQ,GAAG,cAAc;CAOnD;AAED,uEAAuE;AACvE,qBAAa,eAAgB,SAAQ,WAAW;gBAClC,MAAM,GAAE,OAAO,CAAC,IAAI,CAAC,YAAY,CAAC,OAAO,CAAC,EAAE,OAAO,CAAC,CAAM;CAQvE"}
|
package/option.js
CHANGED
|
@@ -17,7 +17,7 @@ const OptionConfig = (type) => zod_1.z.object({
|
|
|
17
17
|
* Parse the value of the option. You can return any type here, or throw an error if the value
|
|
18
18
|
* is invalid.
|
|
19
19
|
*/
|
|
20
|
-
parse: zod_1.z.function().
|
|
20
|
+
parse: zod_1.z.function().optional(),
|
|
21
21
|
/**
|
|
22
22
|
* Whether the option is an array.
|
|
23
23
|
*
|
package/option.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"option.js","sourceRoot":"","sources":["../src/option.ts"],"names":[],"mappings":";;;AAAA,6BAAuB;AACvB,mCAAgD;AAChD,mCAAqC;AAG9B,MAAM,YAAY,GAAG,CAC1B,IAA2B,EAC3B,EAAE,CACF,OAAC,CAAC,MAAM,CAAC;IACP,yBAAyB;IACzB,IAAI,EAAE,OAAC,CAAC,MAAM,EAAE;IAChB,8DAA8D;IAC9D,WAAW,EAAE,OAAC,CAAC,MAAM,EAAE;IACvB,kCAAkC;IAClC,YAAY,EAAE,OAAC,CAAC,GAAG,EAAE,CAAC,QAAQ,EAAE;IAChC,oFAAoF;IACpF,OAAO,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,KAAK,EAAE;IAC3B;;;OAGG;IACH,KAAK,EAAE,OAAC,CAAC,QAAQ,EAAE,CAAC,
|
|
1
|
+
{"version":3,"file":"option.js","sourceRoot":"","sources":["../src/option.ts"],"names":[],"mappings":";;;AAAA,6BAAuB;AACvB,mCAAgD;AAChD,mCAAqC;AAG9B,MAAM,YAAY,GAAG,CAC1B,IAA2B,EAC3B,EAAE,CACF,OAAC,CAAC,MAAM,CAAC;IACP,yBAAyB;IACzB,IAAI,EAAE,OAAC,CAAC,MAAM,EAAE;IAChB,8DAA8D;IAC9D,WAAW,EAAE,OAAC,CAAC,MAAM,EAAE;IACvB,kCAAkC;IAClC,YAAY,EAAE,OAAC,CAAC,GAAG,EAAE,CAAC,QAAQ,EAAE;IAChC,oFAAoF;IACpF,OAAO,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,KAAK,EAAE;IAC3B;;;OAGG;IACH,KAAK,EAAE,OAAC,CAAC,QAAQ,EAAE,CAAC,QAAQ,EAAmE;IAC/F;;;;;;OAMG;IACH,KAAK,EAAE,OAAC,CAAC,OAAO,EAAE,CAAC,QAAQ,EAAE;IAC7B;;OAEG;IACH,QAAQ,EAAE,OAAC,CAAC,OAAO,EAAE,CAAC,QAAQ,EAAE;IAChC;;;;;OAKG;IACH,SAAS,EAAE,OAAC,CAAC,OAAO,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,CAAC,QAAkB;QAC/B,OAAO;YACL,GAAG,KAAK,CAAC,cAAc,CAAC,QAAQ,CAAC;YACjC,YAAY,EAAE,QAAQ,CAAC,YAAY,GAAG,IAAI,CAAC,YAAY;YACvD,eAAe,EAAE,IAAI,CAAC,eAAe,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,QAAQ,CAAC,WAAW,GAAG,CAAC,CAAC;SAC3E,CAAA;IACH,CAAC;CACF;AAlED,kCAkEC;AAED,uEAAuE;AACvE,MAAa,eAAgB,SAAQ,WAAW;IAC9C,YAAY,SAAwD,EAAE;QACpE,KAAK,CAAC;YACJ,IAAI,EAAE,MAAM;YACZ,WAAW,EAAE,wBAAwB;YACrC,OAAO,EAAE,CAAC,GAAG,CAAC;YACd,GAAG,MAAM;SACV,CAAC,CAAA;IACJ,CAAC;CACF;AATD,0CASC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "massarg",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.1.1",
|
|
4
4
|
"description": "Flexible, powerful, and simple command/argument parser for CLI applications",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"shell",
|
|
@@ -14,35 +14,24 @@
|
|
|
14
14
|
"repository": "https://github.com/chenasraf/massarg.git",
|
|
15
15
|
"author": "Chen Asraf <chenasrafil@gmail.com>",
|
|
16
16
|
"license": "Apache",
|
|
17
|
+
"devDependencies": {
|
|
18
|
+
"@types/node": "^25.0.10",
|
|
19
|
+
"gh-pages": "^6.3.0",
|
|
20
|
+
"prettier": "^3.8.1",
|
|
21
|
+
"ts-node": "^10.9.2",
|
|
22
|
+
"typescript": "^5.9.3",
|
|
23
|
+
"vitest": "^3.0.0"
|
|
24
|
+
},
|
|
25
|
+
"dependencies": {
|
|
26
|
+
"zod": "^4.3.6"
|
|
27
|
+
},
|
|
17
28
|
"scripts": {
|
|
18
29
|
"build": "tsc -p tsconfig.build.json && cp package.json README.md build",
|
|
19
30
|
"dev": "tsc --watch",
|
|
20
31
|
"cmd": "ts-node src/sample.ts",
|
|
21
|
-
"test": "
|
|
32
|
+
"test": "vitest run",
|
|
22
33
|
"docs:build": "cd docs && pnpm build",
|
|
23
34
|
"docs:watch": "cd docs && pnpm start",
|
|
24
|
-
"docs:deploy": "pnpm docs:build && gh-pages -d docs"
|
|
25
|
-
"semantic-release": "semantic-release",
|
|
26
|
-
"changelog": "conventional-changelog -i CHANGELOG.md -s -r 0; echo \"# Change Log\n\n$(cat CHANGELOG.md)\" > CHANGELOG.md"
|
|
27
|
-
},
|
|
28
|
-
"devDependencies": {
|
|
29
|
-
"@semantic-release/changelog": "^6.0.3",
|
|
30
|
-
"@semantic-release/exec": "^6.0.3",
|
|
31
|
-
"@semantic-release/git": "^10.0.1",
|
|
32
|
-
"@semantic-release/release-notes-generator": "^12.1.0",
|
|
33
|
-
"@types/jest": "^29.5.12",
|
|
34
|
-
"@types/node": "^20.12.8",
|
|
35
|
-
"conventional-changelog": "^5.1.0",
|
|
36
|
-
"conventional-changelog-cli": "^4.1.0",
|
|
37
|
-
"gh-pages": "^6.1.1",
|
|
38
|
-
"jest": "^29.7.0",
|
|
39
|
-
"prettier": "^3.2.5",
|
|
40
|
-
"semantic-release": "^23.0.8",
|
|
41
|
-
"ts-jest": "^29.1.2",
|
|
42
|
-
"ts-node": "^10.9.2",
|
|
43
|
-
"typescript": "^5.4.5"
|
|
44
|
-
},
|
|
45
|
-
"dependencies": {
|
|
46
|
-
"zod": "^3.23.6"
|
|
35
|
+
"docs:deploy": "pnpm docs:build && gh-pages -d docs"
|
|
47
36
|
}
|
|
48
|
-
}
|
|
37
|
+
}
|
package/sample.d.ts
ADDED
package/sample.d.ts.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sample.d.ts","sourceRoot":"","sources":["../src/sample.ts"],"names":[],"mappings":""}
|
package/sample.js
ADDED
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const _1 = require(".");
|
|
4
|
+
const command_1 = require("./command");
|
|
5
|
+
const error_1 = require("./error");
|
|
6
|
+
const echoCmd = (0, _1.massarg)({
|
|
7
|
+
name: 'echo',
|
|
8
|
+
description: 'Echo back the arguments',
|
|
9
|
+
aliases: ['e'],
|
|
10
|
+
run: (opts) => {
|
|
11
|
+
console.log('Echoing back', opts);
|
|
12
|
+
},
|
|
13
|
+
});
|
|
14
|
+
const addCmd = (0, _1.massarg)({
|
|
15
|
+
name: 'add',
|
|
16
|
+
description: 'Add a component',
|
|
17
|
+
aliases: ['a'],
|
|
18
|
+
run: (opts, parser) => {
|
|
19
|
+
console.log('Adding component', opts);
|
|
20
|
+
},
|
|
21
|
+
})
|
|
22
|
+
.option({
|
|
23
|
+
name: 'component',
|
|
24
|
+
description: 'Component to add. Ut consectetur eu et occaecat enim magna amet eiusmod laboris deserunt proident culpa nulla ipsum adipiscing ullamco laboris sed est',
|
|
25
|
+
aliases: ['c'],
|
|
26
|
+
isDefault: true,
|
|
27
|
+
// aliases: "" as never,
|
|
28
|
+
})
|
|
29
|
+
.option({
|
|
30
|
+
name: 'classes',
|
|
31
|
+
description: 'Classes to add',
|
|
32
|
+
aliases: ['l'],
|
|
33
|
+
array: true,
|
|
34
|
+
})
|
|
35
|
+
.option({
|
|
36
|
+
name: 'custom',
|
|
37
|
+
description: 'Custom option',
|
|
38
|
+
aliases: ['x'],
|
|
39
|
+
parse: (value) => {
|
|
40
|
+
const asNumber = Number(value);
|
|
41
|
+
if (isNaN(asNumber)) {
|
|
42
|
+
throw new error_1.ParseError({
|
|
43
|
+
path: ['custom'],
|
|
44
|
+
message: 'Custom option must be a number',
|
|
45
|
+
code: 'invalid_number',
|
|
46
|
+
});
|
|
47
|
+
}
|
|
48
|
+
return {
|
|
49
|
+
value: asNumber,
|
|
50
|
+
half: asNumber / 2,
|
|
51
|
+
double: asNumber * 2,
|
|
52
|
+
};
|
|
53
|
+
},
|
|
54
|
+
})
|
|
55
|
+
.example({
|
|
56
|
+
description: 'Add a component',
|
|
57
|
+
input: 'my-cli add foo',
|
|
58
|
+
output: 'Adding component foo',
|
|
59
|
+
});
|
|
60
|
+
const removeCmd = new command_1.MassargCommand({
|
|
61
|
+
name: 'remove',
|
|
62
|
+
description: 'Remove a component',
|
|
63
|
+
aliases: ['r'],
|
|
64
|
+
run: (opts) => {
|
|
65
|
+
console.log('Removing component', opts.component);
|
|
66
|
+
},
|
|
67
|
+
}).option({
|
|
68
|
+
name: 'component',
|
|
69
|
+
description: 'Component to remove',
|
|
70
|
+
aliases: ['c'],
|
|
71
|
+
});
|
|
72
|
+
const main = (0, _1.massarg)({
|
|
73
|
+
name: 'my-cli',
|
|
74
|
+
description: 'This is an example CLI',
|
|
75
|
+
})
|
|
76
|
+
.help({
|
|
77
|
+
bindOption: true,
|
|
78
|
+
bindCommand: true,
|
|
79
|
+
headerText: 'This is a header',
|
|
80
|
+
footerText: 'This is a footer',
|
|
81
|
+
optionOptions: {
|
|
82
|
+
displayNegations: true,
|
|
83
|
+
},
|
|
84
|
+
})
|
|
85
|
+
.main((opts, parser) => {
|
|
86
|
+
console.log('Main command - printing all opts');
|
|
87
|
+
console.log(opts, '\n');
|
|
88
|
+
})
|
|
89
|
+
.command(echoCmd)
|
|
90
|
+
.command(addCmd)
|
|
91
|
+
.command(removeCmd)
|
|
92
|
+
.flag({
|
|
93
|
+
name: 'bool',
|
|
94
|
+
description: 'Example boolean option',
|
|
95
|
+
aliases: ['b'],
|
|
96
|
+
negatable: true,
|
|
97
|
+
})
|
|
98
|
+
.option({
|
|
99
|
+
name: 'string',
|
|
100
|
+
description: 'Laborum qui ex do consectetur magna. Ex do consectetur magna officia, consequat. Magna officia consequat labore veniam proident exercitation occaecat. Consequat labore veniam proident exercitation occaecat. Veniam proident exercitation occaecat aliquip.',
|
|
101
|
+
aliases: ['s'],
|
|
102
|
+
})
|
|
103
|
+
.option({
|
|
104
|
+
name: 'number',
|
|
105
|
+
description: 'Example number option',
|
|
106
|
+
aliases: ['n'],
|
|
107
|
+
type: 'number',
|
|
108
|
+
})
|
|
109
|
+
.example({
|
|
110
|
+
description: 'Example main command',
|
|
111
|
+
input: 'my-cli --bool --number 123',
|
|
112
|
+
output: 'Main command - printing all opts\n{ bool: true, number: 123 }',
|
|
113
|
+
})
|
|
114
|
+
.example({
|
|
115
|
+
description: 'Example add command',
|
|
116
|
+
input: 'my-cli add --component foo --classes bar --classes baz --custom 123',
|
|
117
|
+
output: 'Duis ad consectetur dolore elit laborum do et aute consequat magna eu consequat dolore dolor commodo sit enim reprehenderit lorem consectetur adipiscing officia nisi adipiscing consequat consequat labore sint incididunt',
|
|
118
|
+
});
|
|
119
|
+
// console.log("Opts:", main.getArgs(process.argv.slice(2)), "\n")
|
|
120
|
+
main.parse(process.argv.slice(2));
|
|
121
|
+
//# sourceMappingURL=sample.js.map
|
package/sample.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sample.js","sourceRoot":"","sources":["../src/sample.ts"],"names":[],"mappings":";;AAAA,wBAA2B;AAC3B,uCAA0C;AAC1C,mCAAoC;AAGpC,MAAM,OAAO,GAAG,IAAA,UAAO,EAAK;IAC1B,IAAI,EAAE,MAAM;IACZ,WAAW,EAAE,yBAAyB;IACtC,OAAO,EAAE,CAAC,GAAG,CAAC;IACd,GAAG,EAAE,CAAC,IAAI,EAAE,EAAE;QACZ,OAAO,CAAC,GAAG,CAAC,cAAc,EAAE,IAAI,CAAC,CAAA;IACnC,CAAC;CACF,CAAC,CAAA;AACF,MAAM,MAAM,GAAG,IAAA,UAAO,EAAwB;IAC5C,IAAI,EAAE,KAAK;IACX,WAAW,EAAE,iBAAiB;IAC9B,OAAO,EAAE,CAAC,GAAG,CAAC;IACd,GAAG,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,EAAE;QACpB,OAAO,CAAC,GAAG,CAAC,kBAAkB,EAAE,IAAI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