@shell-shock/core 0.10.0 → 0.12.0
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/components/docs.cjs +4 -4
- package/dist/components/docs.cjs.map +1 -1
- package/dist/components/docs.d.cts +5 -5
- package/dist/components/docs.d.cts.map +1 -1
- package/dist/components/docs.d.mts +5 -5
- package/dist/components/docs.d.mts.map +1 -1
- package/dist/components/helpers.cjs +9 -0
- package/dist/components/helpers.cjs.map +1 -1
- package/dist/components/helpers.d.cts +15 -7
- package/dist/components/helpers.d.cts.map +1 -1
- package/dist/components/helpers.d.mts +15 -7
- package/dist/components/helpers.d.mts.map +1 -1
- package/dist/components/helpers.mjs +9 -1
- package/dist/components/helpers.mjs.map +1 -1
- package/dist/components/index.cjs +1 -0
- package/dist/components/index.d.cts +2 -2
- package/dist/components/index.d.mts +2 -2
- package/dist/components/index.mjs +2 -2
- package/dist/components/options-parser-logic.cjs +167 -87
- package/dist/components/options-parser-logic.cjs.map +1 -1
- package/dist/components/options-parser-logic.d.cts +15 -15
- package/dist/components/options-parser-logic.d.cts.map +1 -1
- package/dist/components/options-parser-logic.d.mts +15 -15
- package/dist/components/options-parser-logic.d.mts.map +1 -1
- package/dist/components/options-parser-logic.mjs +163 -83
- package/dist/components/options-parser-logic.mjs.map +1 -1
- package/dist/components/usage.cjs +5 -5
- package/dist/components/usage.cjs.map +1 -1
- package/dist/components/usage.d.cts +2 -2
- package/dist/components/usage.d.cts.map +1 -1
- package/dist/components/usage.d.mts +2 -2
- package/dist/components/usage.mjs +4 -4
- package/dist/components/usage.mjs.map +1 -1
- package/dist/components/utils-builtin.cjs +2 -2
- package/dist/components/utils-builtin.cjs.map +1 -1
- package/dist/components/utils-builtin.d.cts +9 -9
- package/dist/components/utils-builtin.d.cts.map +1 -1
- package/dist/components/utils-builtin.d.mts +9 -9
- package/dist/components/utils-builtin.d.mts.map +1 -1
- package/dist/components/utils-builtin.mjs +5 -5
- package/dist/components/utils-builtin.mjs.map +1 -1
- package/dist/contexts/options.cjs +2 -2
- package/dist/contexts/options.cjs.map +1 -1
- package/dist/contexts/options.d.cts +1 -1
- package/dist/contexts/options.d.cts.map +1 -1
- package/dist/contexts/options.d.mts +1 -1
- package/dist/contexts/options.d.mts.map +1 -1
- package/dist/contexts/options.mjs +4 -4
- package/dist/contexts/options.mjs.map +1 -1
- package/dist/helpers/automd.cjs +2 -2
- package/dist/helpers/automd.cjs.map +1 -1
- package/dist/helpers/automd.mjs.map +1 -1
- package/dist/helpers/paths.cjs +125 -0
- package/dist/helpers/paths.cjs.map +1 -0
- package/dist/helpers/paths.mjs +121 -0
- package/dist/helpers/paths.mjs.map +1 -0
- package/dist/helpers/persistence.cjs +68 -116
- package/dist/helpers/persistence.cjs.map +1 -1
- package/dist/helpers/persistence.mjs +68 -116
- package/dist/helpers/persistence.mjs.map +1 -1
- package/dist/helpers/update-package-json.cjs +4 -4
- package/dist/helpers/update-package-json.cjs.map +1 -1
- package/dist/helpers/utilities.cjs +1 -1
- package/dist/helpers/utilities.mjs +1 -1
- package/dist/helpers/validations.cjs +2 -3
- package/dist/helpers/validations.cjs.map +1 -1
- package/dist/helpers/validations.mjs +2 -2
- package/dist/helpers/validations.mjs.map +1 -1
- package/dist/index.cjs +14 -11
- package/dist/index.d.cts +2 -2
- package/dist/index.d.mts +2 -2
- package/dist/index.mjs +3 -3
- package/dist/plugin-utils/deepkit.cjs +72 -0
- package/dist/plugin-utils/deepkit.cjs.map +1 -0
- package/dist/plugin-utils/deepkit.d.cts +24 -0
- package/dist/plugin-utils/deepkit.d.cts.map +1 -0
- package/dist/plugin-utils/deepkit.d.mts +24 -0
- package/dist/plugin-utils/deepkit.d.mts.map +1 -0
- package/dist/plugin-utils/deepkit.mjs +70 -0
- package/dist/plugin-utils/deepkit.mjs.map +1 -0
- package/dist/plugin-utils/description-helpers.cjs +105 -0
- package/dist/plugin-utils/description-helpers.cjs.map +1 -0
- package/dist/plugin-utils/description-helpers.d.cts +44 -0
- package/dist/plugin-utils/description-helpers.d.cts.map +1 -0
- package/dist/plugin-utils/description-helpers.d.mts +44 -0
- package/dist/plugin-utils/description-helpers.d.mts.map +1 -0
- package/dist/plugin-utils/description-helpers.mjs +101 -0
- package/dist/plugin-utils/description-helpers.mjs.map +1 -0
- package/dist/plugin-utils/get-command-tree.cjs +2 -2
- package/dist/plugin-utils/get-command-tree.cjs.map +1 -1
- package/dist/plugin-utils/index.cjs +32 -18
- package/dist/plugin-utils/index.d.cts +4 -1
- package/dist/plugin-utils/index.d.mts +4 -1
- package/dist/plugin-utils/index.mjs +4 -1
- package/dist/plugin-utils/reflect.cjs +4 -5
- package/dist/plugin-utils/reflect.cjs.map +1 -1
- package/dist/plugin-utils/reflect.mjs +4 -4
- package/dist/plugin-utils/reflect.mjs.map +1 -1
- package/dist/plugin-utils/type-checks.cjs +89 -0
- package/dist/plugin-utils/type-checks.cjs.map +1 -0
- package/dist/plugin-utils/type-checks.d.cts +42 -0
- package/dist/plugin-utils/type-checks.d.cts.map +1 -0
- package/dist/plugin-utils/type-checks.d.mts +42 -0
- package/dist/plugin-utils/type-checks.d.mts.map +1 -0
- package/dist/plugin-utils/type-checks.mjs +84 -0
- package/dist/plugin-utils/type-checks.mjs.map +1 -0
- package/dist/plugin.cjs +31 -29
- package/dist/plugin.cjs.map +1 -1
- package/dist/plugin.d.cts.map +1 -1
- package/dist/plugin.d.mts.map +1 -1
- package/dist/plugin.mjs +15 -13
- package/dist/plugin.mjs.map +1 -1
- package/dist/resolver/deepkit.cjs +132 -0
- package/dist/resolver/deepkit.cjs.map +1 -0
- package/dist/resolver/deepkit.mjs +131 -0
- package/dist/resolver/deepkit.mjs.map +1 -0
- package/dist/resolver/helpers.cjs +167 -0
- package/dist/resolver/helpers.cjs.map +1 -0
- package/dist/resolver/helpers.mjs +162 -0
- package/dist/resolver/helpers.mjs.map +1 -0
- package/dist/resolver/module.cjs +144 -0
- package/dist/resolver/module.cjs.map +1 -0
- package/dist/resolver/module.mjs +143 -0
- package/dist/resolver/module.mjs.map +1 -0
- package/dist/resolver/resolve.cjs +209 -0
- package/dist/resolver/resolve.cjs.map +1 -0
- package/dist/resolver/resolve.mjs +208 -0
- package/dist/resolver/resolve.mjs.map +1 -0
- package/dist/types/command.cjs +127 -104
- package/dist/types/command.cjs.map +1 -1
- package/dist/types/command.d.cts +39 -78
- package/dist/types/command.d.cts.map +1 -1
- package/dist/types/command.d.mts +39 -78
- package/dist/types/command.d.mts.map +1 -1
- package/dist/types/command.mjs +115 -95
- package/dist/types/command.mjs.map +1 -1
- package/dist/types/config.cjs +5 -3
- package/dist/types/config.cjs.map +1 -1
- package/dist/types/config.d.cts +7 -3
- package/dist/types/config.d.cts.map +1 -1
- package/dist/types/config.d.mts +7 -3
- package/dist/types/config.d.mts.map +1 -1
- package/dist/types/config.mjs +5 -3
- package/dist/types/config.mjs.map +1 -1
- package/dist/types/context.cjs +1 -1
- package/dist/types/context.cjs.map +1 -1
- package/dist/types/context.d.cts +2 -2
- package/dist/types/context.d.cts.map +1 -1
- package/dist/types/context.d.mts +2 -2
- package/dist/types/context.d.mts.map +1 -1
- package/dist/types/context.mjs +1 -1
- package/dist/types/context.mjs.map +1 -1
- package/dist/types/index.cjs +13 -10
- package/dist/types/index.d.cts +2 -2
- package/dist/types/index.d.mts +2 -2
- package/dist/types/index.mjs +2 -2
- package/package.json +24 -75
- package/dist/helpers/resolve-command.cjs +0 -430
- package/dist/helpers/resolve-command.cjs.map +0 -1
- package/dist/helpers/resolve-command.mjs +0 -425
- package/dist/helpers/resolve-command.mjs.map +0 -1
package/dist/types/command.d.mts
CHANGED
|
@@ -1,10 +1,18 @@
|
|
|
1
1
|
import { ResolvedEntryTypeDefinition } from "powerlines";
|
|
2
|
-
import {
|
|
2
|
+
import { JsonSchema7TupleType } from "@stryke/json";
|
|
3
|
+
import { StandardJSONSchemaV1 } from "@standard-schema/spec";
|
|
3
4
|
import { AnyFunction } from "@stryke/types/base";
|
|
5
|
+
import { JSONSchema7Object } from "json-schema";
|
|
4
6
|
import * as z3 from "zod/v3";
|
|
5
|
-
import * as z4 from "zod/v4/core";
|
|
6
7
|
|
|
7
8
|
//#region src/types/command.d.ts
|
|
9
|
+
type CommandParameterType = string | number | boolean | (string | number)[];
|
|
10
|
+
declare const CommandParameterKinds: {
|
|
11
|
+
readonly string: "string";
|
|
12
|
+
readonly number: "number";
|
|
13
|
+
readonly boolean: "boolean";
|
|
14
|
+
};
|
|
15
|
+
type CommandParameterKind = (typeof CommandParameterKinds)[keyof typeof CommandParameterKinds];
|
|
8
16
|
interface BaseCommandParameter {
|
|
9
17
|
/**
|
|
10
18
|
* The option name.
|
|
@@ -13,7 +21,7 @@ interface BaseCommandParameter {
|
|
|
13
21
|
/**
|
|
14
22
|
* The option kind.
|
|
15
23
|
*/
|
|
16
|
-
kind:
|
|
24
|
+
kind: CommandParameterKind;
|
|
17
25
|
/**
|
|
18
26
|
* The display title.
|
|
19
27
|
*/
|
|
@@ -39,11 +47,15 @@ interface StringCommandParameter extends BaseCommandParameter {
|
|
|
39
47
|
/**
|
|
40
48
|
* The option kind.
|
|
41
49
|
*/
|
|
42
|
-
kind:
|
|
50
|
+
kind: "string";
|
|
43
51
|
/**
|
|
44
52
|
* The default value.
|
|
45
53
|
*/
|
|
46
54
|
default?: string;
|
|
55
|
+
/**
|
|
56
|
+
* A standard string format to validate the option value against.
|
|
57
|
+
*/
|
|
58
|
+
format?: "email" | "uri" | "uuid" | "ipv4" | "ipv6" | "date" | "time" | "date-time" | "duration";
|
|
47
59
|
/**
|
|
48
60
|
* Whether the option accepts multiple values.
|
|
49
61
|
*/
|
|
@@ -57,7 +69,7 @@ interface NumberCommandParameter extends BaseCommandParameter {
|
|
|
57
69
|
/**
|
|
58
70
|
* The option kind.
|
|
59
71
|
*/
|
|
60
|
-
kind:
|
|
72
|
+
kind: "number";
|
|
61
73
|
/**
|
|
62
74
|
* The default value.
|
|
63
75
|
*/
|
|
@@ -75,37 +87,21 @@ interface BooleanCommandParameter extends BaseCommandParameter {
|
|
|
75
87
|
/**
|
|
76
88
|
* The option kind.
|
|
77
89
|
*/
|
|
78
|
-
kind:
|
|
90
|
+
kind: "boolean";
|
|
79
91
|
/**
|
|
80
92
|
* The default value.
|
|
81
93
|
*/
|
|
82
94
|
default?: boolean;
|
|
83
|
-
/**
|
|
84
|
-
* The option this negates.
|
|
85
|
-
*/
|
|
86
|
-
isNegativeOf?: string;
|
|
87
|
-
/**
|
|
88
|
-
* Whether to skip adding a negative option.
|
|
89
|
-
*/
|
|
90
|
-
skipAddingNegative?: boolean;
|
|
91
|
-
}
|
|
92
|
-
interface StringCommandOption extends StringCommandParameter {
|
|
93
|
-
/**
|
|
94
|
-
* The property reflection.
|
|
95
|
-
*/
|
|
96
|
-
reflection?: ReflectionProperty;
|
|
97
|
-
}
|
|
98
|
-
interface NumberCommandOption extends NumberCommandParameter {
|
|
99
|
-
/**
|
|
100
|
-
* The property reflection.
|
|
101
|
-
*/
|
|
102
|
-
reflection?: ReflectionProperty;
|
|
103
95
|
}
|
|
96
|
+
type CommandParameter = StringCommandParameter | NumberCommandParameter | BooleanCommandParameter;
|
|
97
|
+
type AsCommandParameterConfig<T extends BaseCommandParameter> = Pick<T, "kind" | "alias"> & Partial<Omit<T, "kind" | "alias">> & {
|
|
98
|
+
alias?: string | string[];
|
|
99
|
+
};
|
|
100
|
+
type StringCommandParameterConfig = AsCommandParameterConfig<StringCommandParameter>;
|
|
101
|
+
type NumberCommandParameterConfig = AsCommandParameterConfig<NumberCommandParameter>;
|
|
102
|
+
type BooleanCommandParameterConfig = AsCommandParameterConfig<BooleanCommandParameter>;
|
|
103
|
+
type CommandParameterConfig = StringCommandParameterConfig | NumberCommandParameterConfig | BooleanCommandParameterConfig;
|
|
104
104
|
interface BooleanCommandOption extends BooleanCommandParameter {
|
|
105
|
-
/**
|
|
106
|
-
* The property reflection.
|
|
107
|
-
*/
|
|
108
|
-
reflection?: ReflectionProperty;
|
|
109
105
|
/**
|
|
110
106
|
* The option this negates.
|
|
111
107
|
*/
|
|
@@ -115,26 +111,10 @@ interface BooleanCommandOption extends BooleanCommandParameter {
|
|
|
115
111
|
*/
|
|
116
112
|
skipAddingNegative?: boolean;
|
|
117
113
|
}
|
|
118
|
-
type CommandOption =
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
*/
|
|
123
|
-
reflection: ReflectionParameter;
|
|
124
|
-
}
|
|
125
|
-
interface NumberCommandArgument extends NumberCommandParameter {
|
|
126
|
-
/**
|
|
127
|
-
* The parameter reflection.
|
|
128
|
-
*/
|
|
129
|
-
reflection: ReflectionParameter;
|
|
130
|
-
}
|
|
131
|
-
interface BooleanCommandArgument extends BooleanCommandParameter {
|
|
132
|
-
/**
|
|
133
|
-
* The parameter reflection.
|
|
134
|
-
*/
|
|
135
|
-
reflection: ReflectionParameter;
|
|
136
|
-
}
|
|
137
|
-
type CommandArgument = StringCommandArgument | NumberCommandArgument | BooleanCommandArgument;
|
|
114
|
+
type CommandOption = StringCommandParameter | NumberCommandParameter | BooleanCommandOption;
|
|
115
|
+
type CommandOptionConfig = AsCommandParameterConfig<CommandOption>;
|
|
116
|
+
type CommandArgument = StringCommandParameter | NumberCommandParameter | BooleanCommandParameter;
|
|
117
|
+
type CommandArgumentConfig = AsCommandParameterConfig<CommandArgument>;
|
|
138
118
|
interface CommandBase {
|
|
139
119
|
/**
|
|
140
120
|
* The command id.
|
|
@@ -176,7 +156,7 @@ interface CommandBase {
|
|
|
176
156
|
*/
|
|
177
157
|
isVirtual: boolean;
|
|
178
158
|
}
|
|
179
|
-
interface
|
|
159
|
+
interface CommandConfig extends CommandBase {
|
|
180
160
|
/**
|
|
181
161
|
* The command id.
|
|
182
162
|
*/
|
|
@@ -186,7 +166,7 @@ interface CommandInput extends CommandBase {
|
|
|
186
166
|
*/
|
|
187
167
|
entry: ResolvedEntryTypeDefinition;
|
|
188
168
|
}
|
|
189
|
-
type CommandTree =
|
|
169
|
+
type CommandTree = CommandConfig & {
|
|
190
170
|
/**
|
|
191
171
|
* The display title.
|
|
192
172
|
*/
|
|
@@ -206,7 +186,7 @@ type CommandTree = CommandInput & {
|
|
|
206
186
|
/**
|
|
207
187
|
* The positional arguments provided to the command.
|
|
208
188
|
*/
|
|
209
|
-
|
|
189
|
+
args: CommandArgument[];
|
|
210
190
|
/**
|
|
211
191
|
* The parent command.
|
|
212
192
|
*/
|
|
@@ -215,22 +195,8 @@ type CommandTree = CommandInput & {
|
|
|
215
195
|
* Child commands.
|
|
216
196
|
*/
|
|
217
197
|
children: Record<string, CommandTree>;
|
|
218
|
-
/**
|
|
219
|
-
* The command handler reflection.
|
|
220
|
-
*/
|
|
221
|
-
reflection: ReflectionFunction | null;
|
|
222
198
|
};
|
|
223
|
-
type
|
|
224
|
-
type SerializedCommandArgument = Omit<CommandArgument, "reflection">;
|
|
225
|
-
type SerializedCommandTree = Omit<CommandTree, "options" | "arguments" | "parent" | "children" | "reflection"> & {
|
|
226
|
-
/**
|
|
227
|
-
* The command options.
|
|
228
|
-
*/
|
|
229
|
-
options: Record<string, SerializedCommandOption>;
|
|
230
|
-
/**
|
|
231
|
-
* The positional arguments provided to the command.
|
|
232
|
-
*/
|
|
233
|
-
arguments: SerializedCommandArgument[];
|
|
199
|
+
type SerializedCommandTree = Omit<CommandTree, "parent" | "children"> & {
|
|
234
200
|
/**
|
|
235
201
|
* The parent command id.
|
|
236
202
|
*/
|
|
@@ -239,12 +205,8 @@ type SerializedCommandTree = Omit<CommandTree, "options" | "arguments" | "parent
|
|
|
239
205
|
* Serialized child commands.
|
|
240
206
|
*/
|
|
241
207
|
children: Record<string, SerializedCommandTree>;
|
|
242
|
-
/**
|
|
243
|
-
* The command handler reflection.
|
|
244
|
-
*/
|
|
245
|
-
reflection?: SerializedTypes;
|
|
246
208
|
};
|
|
247
|
-
interface
|
|
209
|
+
interface CommandMetadata {
|
|
248
210
|
/**
|
|
249
211
|
* The display name of the command.
|
|
250
212
|
*
|
|
@@ -271,13 +233,12 @@ interface Metadata {
|
|
|
271
233
|
*/
|
|
272
234
|
icon?: string;
|
|
273
235
|
}
|
|
274
|
-
type CommandParameterSchema = z3.ZodTypeAny | z4.$ZodType;
|
|
275
236
|
interface CommandModule {
|
|
276
|
-
metadata?:
|
|
277
|
-
options?: Record<string,
|
|
278
|
-
|
|
237
|
+
metadata?: CommandMetadata;
|
|
238
|
+
options?: Record<string, CommandOptionConfig> | JSONSchema7Object | StandardJSONSchemaV1<Record<string, CommandParameterType>> | z3.AnyZodObject;
|
|
239
|
+
args?: CommandArgumentConfig[] | JsonSchema7TupleType | StandardJSONSchemaV1<CommandParameterType[]> | z3.AnyZodTuple;
|
|
279
240
|
default?: AnyFunction;
|
|
280
241
|
}
|
|
281
242
|
//#endregion
|
|
282
|
-
export {
|
|
243
|
+
export { AsCommandParameterConfig, BaseCommandParameter, BooleanCommandOption, BooleanCommandParameter, BooleanCommandParameterConfig, CommandArgument, CommandArgumentConfig, CommandBase, CommandConfig, CommandMetadata, CommandModule, CommandOption, CommandOptionConfig, CommandParameter, CommandParameterConfig, CommandParameterKind, CommandParameterKinds, CommandParameterType, CommandTree, NumberCommandParameter, NumberCommandParameterConfig, SerializedCommandTree, StringCommandParameter, StringCommandParameterConfig };
|
|
283
244
|
//# sourceMappingURL=command.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"command.d.mts","names":[],"sources":["../../src/types/command.ts"],"sourcesContent":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"command.d.mts","names":[],"sources":["../../src/types/command.ts"],"sourcesContent":[],"mappings":";;;;;;;;KAyBY,oBAAA;cAMC;EAND,SAAA,MAAA,EAAA,QAAoB;EAMnB,SAAA,MAAA,EAAA,QAIH;EAEE,SAAA,OAAA,EAAA,SAAoB;AAGhC,CAAA;AA+BiB,KAlCL,oBAAA,GAkC4B,CAAA,OAjC9B,qBAiC0D,CAAA,CAAA,MAAA,OAjCtB,qBAiCsB,CAAA;AAiCnD,UAhEA,oBAAA,CAgEuB;EAoBvB;AAWjB;;EAEI,IAAA,EAAA,MAAA;EACA;;AAEJ;EAA+C,IAAA,EA5FvC,oBA4FuC;EAC7C;;;EAGQ,KAAA,EAAA,MAAA;EAAR;;AAIF;EAEY,WAAA,EAAA,MAAA;EAEA;AAGZ;;EAEI,KAAA,EAAA,MAAA,EAAA;EACA;;AAEJ;EAWY,GAAA,EAAA,MAAA,GAAA,KAAa;EACrB;;;EAEoB,QAAA,EAAA,OAAA;AACxB;AAEY,UA1GK,sBAAA,SAA+B,oBA0GrB,CAAA;EACvB;;;EAEuB,IAAA,EAAA,QAAA;EACf;AAEZ;AAkDA;EAYY,OAAA,CAAA,EAAA,MAAW;EAAG;;;EAoBlB,MAAA,CAAA,EAAA,OAAA,GAAA,KAAA,GAAA,MAAA,GAAA,MAAA,GAAA,MAAA,GAAA,MAAA,GAAA,MAAA,GAAA,WAAA,GAAA,UAAA;EAIS;;;EAIC,QAAA,EAAA,OAAA;EAGN;;;EAQe,OAAA,CAAA,EAAA,MAAA,EAAA;;AAAT,UApLD,sBAAA,SAA+B,oBAoL9B,CAAA;EAGD;AA+BjB;;EAGqB,IAAA,EAAA,QAAA;EAAf;;;EAEqB,OAAA,CAAA,EAAA,MAAA;EAArB;;;EAIA,QAAA,EAAA,OAAA;EACqB;;;EAEf,OAAA,CAAA,EAAA,MAAA,EAAA;;UA9MK,uBAAA,SAAgC;;;;;;;;;;KAWrC,gBAAA,GACR,yBACA,yBACA;KAEQ,mCAAmC,wBAAwB,KACrE,uBAGA,QAAQ,KAAK;;;KAIH,4BAAA,GACV,yBAAyB;KACf,4BAAA,GACV,yBAAyB;KACf,6BAAA,GACV,yBAAyB;KAEf,sBAAA,GACR,+BACA,+BACA;UAEa,oBAAA,SAA6B;;;;;;;;;;KAWlC,aAAA,GACR,yBACA,yBACA;KACQ,mBAAA,GAAsB,yBAAyB;KAE/C,eAAA,GACR,yBACA,yBACA;KACQ,qBAAA,GAAwB,yBAAyB;UAE5C,WAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;UAkDA,aAAA,SAAsB;;;;;;;;SAS9B;;KAGG,WAAA,GAAc;;;;;;;;;;;;;;;;WAgBf,eAAe;;;;QAIlB;;;;iBAIS;;;;YAIL,eAAe;;KAGf,qBAAA,GAAwB,KAAK;;;;;;;;YAQ7B,eAAe;;UAGV,eAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;UA+BA,aAAA;aACJ;YAEP,eAAe,uBACf,oBACA,qBAAqB,eAAe,yBACpC,EAAA,CAAG;SAEH,0BACA,uBACA,qBAAqB,0BACrB,EAAA,CAAG;YACG"}
|
package/dist/types/command.mjs
CHANGED
|
@@ -1,9 +1,14 @@
|
|
|
1
1
|
//#region src/types/command.ts
|
|
2
|
-
const __Ω
|
|
2
|
+
const __ΩPick = [
|
|
3
|
+
"T",
|
|
3
4
|
"K",
|
|
5
|
+
"Pick",
|
|
6
|
+
"l+e#!e\"!fRb!b\"Pde\"\"N#!w#y"
|
|
7
|
+
];
|
|
8
|
+
const __ΩPartial = [
|
|
4
9
|
"T",
|
|
5
|
-
"
|
|
6
|
-
"l
|
|
10
|
+
"Partial",
|
|
11
|
+
"l+e#!e\"!fRb!Pde\"!gN#\"w\"y"
|
|
7
12
|
];
|
|
8
13
|
const __ΩOmit = [
|
|
9
14
|
"T",
|
|
@@ -13,11 +18,11 @@ const __ΩOmit = [
|
|
|
13
18
|
"Omit",
|
|
14
19
|
"b!b\"e!!e!!ge!\"o$#o##w%y"
|
|
15
20
|
];
|
|
16
|
-
const __Ω
|
|
17
|
-
"T",
|
|
21
|
+
const __ΩRecord = [
|
|
18
22
|
"K",
|
|
19
|
-
"
|
|
20
|
-
"
|
|
23
|
+
"T",
|
|
24
|
+
"Record",
|
|
25
|
+
"l'e#\"Rb!b\"Pde\"!N#!w#y"
|
|
21
26
|
];
|
|
22
27
|
const __ΩExclude = [
|
|
23
28
|
"T",
|
|
@@ -25,9 +30,21 @@ const __ΩExclude = [
|
|
|
25
30
|
"Exclude",
|
|
26
31
|
"l6!Re$!RPe#!e$\"qk#%QRb!b\"Pde\"!p)w#y"
|
|
27
32
|
];
|
|
33
|
+
const __ΩCommandParameterType = ["CommandParameterType", "P&')P&'JFJw!y"];
|
|
34
|
+
const CommandParameterKinds = {
|
|
35
|
+
string: "string",
|
|
36
|
+
number: "number",
|
|
37
|
+
boolean: "boolean"
|
|
38
|
+
};
|
|
39
|
+
const __ΩCommandParameterKind = [
|
|
40
|
+
() => CommandParameterKinds,
|
|
41
|
+
() => CommandParameterKinds,
|
|
42
|
+
"CommandParameterKind",
|
|
43
|
+
"i!i\"gfw#y"
|
|
44
|
+
];
|
|
28
45
|
const __ΩBaseCommandParameter = [
|
|
29
46
|
"name",
|
|
30
|
-
|
|
47
|
+
() => __ΩCommandParameterKind,
|
|
31
48
|
"kind",
|
|
32
49
|
"title",
|
|
33
50
|
"description",
|
|
@@ -36,96 +53,124 @@ const __ΩBaseCommandParameter = [
|
|
|
36
53
|
"env",
|
|
37
54
|
"optional",
|
|
38
55
|
"BaseCommandParameter",
|
|
39
|
-
"P&4
|
|
56
|
+
"P&4!n\"4#&4$&4%&F4&P&.'J4()4)Mw*y"
|
|
40
57
|
];
|
|
41
58
|
const __ΩStringCommandParameter = [
|
|
42
59
|
() => __ΩBaseCommandParameter,
|
|
43
|
-
|
|
60
|
+
"string",
|
|
44
61
|
"kind",
|
|
45
62
|
"default",
|
|
63
|
+
"email",
|
|
64
|
+
"uri",
|
|
65
|
+
"uuid",
|
|
66
|
+
"ipv4",
|
|
67
|
+
"ipv6",
|
|
68
|
+
"date",
|
|
69
|
+
"time",
|
|
70
|
+
"date-time",
|
|
71
|
+
"duration",
|
|
72
|
+
"format",
|
|
46
73
|
"variadic",
|
|
47
74
|
"choices",
|
|
48
75
|
"StringCommandParameter",
|
|
49
|
-
"Pn
|
|
76
|
+
"Pn!.\"4#&4$8P.%.&.'.(.).*.+.,.-J4.8)4/&F408Mw1y"
|
|
50
77
|
];
|
|
51
78
|
const __ΩNumberCommandParameter = [
|
|
52
79
|
() => __ΩBaseCommandParameter,
|
|
53
|
-
|
|
80
|
+
"number",
|
|
54
81
|
"kind",
|
|
55
82
|
"default",
|
|
56
83
|
"variadic",
|
|
57
84
|
"choices",
|
|
58
85
|
"NumberCommandParameter",
|
|
59
|
-
"Pn
|
|
86
|
+
"Pn!.\"4#'4$8)4%'F4&8Mw'y"
|
|
60
87
|
];
|
|
61
88
|
const __ΩBooleanCommandParameter = [
|
|
62
89
|
() => __ΩBaseCommandParameter,
|
|
63
|
-
|
|
90
|
+
"boolean",
|
|
64
91
|
"kind",
|
|
65
92
|
"default",
|
|
66
|
-
"isNegativeOf",
|
|
67
|
-
"skipAddingNegative",
|
|
68
93
|
"BooleanCommandParameter",
|
|
69
|
-
"Pn
|
|
94
|
+
"Pn!.\"4#)4$8Mw%y"
|
|
95
|
+
];
|
|
96
|
+
const __ΩCommandParameter = [
|
|
97
|
+
() => __ΩStringCommandParameter,
|
|
98
|
+
() => __ΩNumberCommandParameter,
|
|
99
|
+
() => __ΩBooleanCommandParameter,
|
|
100
|
+
"CommandParameter",
|
|
101
|
+
"Pn!n\"n#Jw$y"
|
|
102
|
+
];
|
|
103
|
+
const __ΩAsCommandParameterConfig = [
|
|
104
|
+
"T",
|
|
105
|
+
() => __ΩPick,
|
|
106
|
+
"kind",
|
|
107
|
+
"alias",
|
|
108
|
+
() => __ΩPartial,
|
|
109
|
+
() => __ΩOmit,
|
|
110
|
+
"kind",
|
|
111
|
+
"alias",
|
|
112
|
+
"alias",
|
|
113
|
+
"AsCommandParameterConfig",
|
|
114
|
+
"b!Pe\"!P.#.$Jo\"#e\"!P.'.(Jo&#o%\"PP&&FJ4)8MKw*y"
|
|
70
115
|
];
|
|
71
|
-
const __Ω
|
|
116
|
+
const __ΩStringCommandParameterConfig = [
|
|
117
|
+
() => __ΩAsCommandParameterConfig,
|
|
72
118
|
() => __ΩStringCommandParameter,
|
|
73
|
-
"
|
|
74
|
-
"
|
|
75
|
-
"StringCommandOption",
|
|
76
|
-
"Pn!\"w\"4#8Mw$y"
|
|
119
|
+
"StringCommandParameterConfig",
|
|
120
|
+
"n\"o!\"w#y"
|
|
77
121
|
];
|
|
78
|
-
const __Ω
|
|
122
|
+
const __ΩNumberCommandParameterConfig = [
|
|
123
|
+
() => __ΩAsCommandParameterConfig,
|
|
79
124
|
() => __ΩNumberCommandParameter,
|
|
80
|
-
"
|
|
81
|
-
"
|
|
82
|
-
|
|
83
|
-
|
|
125
|
+
"NumberCommandParameterConfig",
|
|
126
|
+
"n\"o!\"w#y"
|
|
127
|
+
];
|
|
128
|
+
const __ΩBooleanCommandParameterConfig = [
|
|
129
|
+
() => __ΩAsCommandParameterConfig,
|
|
130
|
+
() => __ΩBooleanCommandParameter,
|
|
131
|
+
"BooleanCommandParameterConfig",
|
|
132
|
+
"n\"o!\"w#y"
|
|
133
|
+
];
|
|
134
|
+
const __ΩCommandParameterConfig = [
|
|
135
|
+
() => __ΩStringCommandParameterConfig,
|
|
136
|
+
() => __ΩNumberCommandParameterConfig,
|
|
137
|
+
() => __ΩBooleanCommandParameterConfig,
|
|
138
|
+
"CommandParameterConfig",
|
|
139
|
+
"Pn!n\"n#Jw$y"
|
|
84
140
|
];
|
|
85
141
|
const __ΩBooleanCommandOption = [
|
|
86
142
|
() => __ΩBooleanCommandParameter,
|
|
87
|
-
"ReflectionProperty",
|
|
88
|
-
"reflection",
|
|
89
143
|
"isNegativeOf",
|
|
90
144
|
"skipAddingNegative",
|
|
91
145
|
"BooleanCommandOption",
|
|
92
|
-
"Pn
|
|
146
|
+
"Pn!&4\"8)4#8Mw$y"
|
|
93
147
|
];
|
|
94
148
|
const __ΩCommandOption = [
|
|
95
|
-
() => __Ω
|
|
96
|
-
() => __Ω
|
|
149
|
+
() => __ΩStringCommandParameter,
|
|
150
|
+
() => __ΩNumberCommandParameter,
|
|
97
151
|
() => __ΩBooleanCommandOption,
|
|
98
152
|
"CommandOption",
|
|
99
153
|
"Pn!n\"n#Jw$y"
|
|
100
154
|
];
|
|
101
|
-
const __Ω
|
|
102
|
-
() => __Ω
|
|
103
|
-
|
|
104
|
-
"
|
|
105
|
-
"
|
|
106
|
-
"Pn!\"w\"4#Mw$y"
|
|
155
|
+
const __ΩCommandOptionConfig = [
|
|
156
|
+
() => __ΩAsCommandParameterConfig,
|
|
157
|
+
() => __ΩCommandOption,
|
|
158
|
+
"CommandOptionConfig",
|
|
159
|
+
"n\"o!\"w#y"
|
|
107
160
|
];
|
|
108
|
-
const __Ω
|
|
161
|
+
const __ΩCommandArgument = [
|
|
162
|
+
() => __ΩStringCommandParameter,
|
|
109
163
|
() => __ΩNumberCommandParameter,
|
|
110
|
-
"ReflectionParameter",
|
|
111
|
-
"reflection",
|
|
112
|
-
"NumberCommandArgument",
|
|
113
|
-
"Pn!\"w\"4#Mw$y"
|
|
114
|
-
];
|
|
115
|
-
const __ΩBooleanCommandArgument = [
|
|
116
164
|
() => __ΩBooleanCommandParameter,
|
|
117
|
-
"ReflectionParameter",
|
|
118
|
-
"reflection",
|
|
119
|
-
"BooleanCommandArgument",
|
|
120
|
-
"Pn!\"w\"4#Mw$y"
|
|
121
|
-
];
|
|
122
|
-
const __ΩCommandArgument = [
|
|
123
|
-
() => __ΩStringCommandArgument,
|
|
124
|
-
() => __ΩNumberCommandArgument,
|
|
125
|
-
() => __ΩBooleanCommandArgument,
|
|
126
165
|
"CommandArgument",
|
|
127
166
|
"Pn!n\"n#Jw$y"
|
|
128
167
|
];
|
|
168
|
+
const __ΩCommandArgumentConfig = [
|
|
169
|
+
() => __ΩAsCommandParameterConfig,
|
|
170
|
+
() => __ΩCommandArgument,
|
|
171
|
+
"CommandArgumentConfig",
|
|
172
|
+
"n\"o!\"w#y"
|
|
173
|
+
];
|
|
129
174
|
const __ΩCommandBase = [
|
|
130
175
|
"id",
|
|
131
176
|
"name",
|
|
@@ -139,15 +184,15 @@ const __ΩCommandBase = [
|
|
|
139
184
|
"CommandBase",
|
|
140
185
|
"PP&,J4!&4\"P&,J4#&F4$&4%8&4&8&F4'8&4(8)4)Mw*y"
|
|
141
186
|
];
|
|
142
|
-
const __Ω
|
|
187
|
+
const __ΩCommandConfig = [
|
|
143
188
|
() => __ΩCommandBase,
|
|
144
189
|
"id",
|
|
145
190
|
"entry",
|
|
146
|
-
"
|
|
191
|
+
"CommandConfig",
|
|
147
192
|
"Pn!&4\"!4#Mw$y"
|
|
148
193
|
];
|
|
149
194
|
const __ΩCommandTree = [
|
|
150
|
-
() => __Ω
|
|
195
|
+
() => __ΩCommandConfig,
|
|
151
196
|
"title",
|
|
152
197
|
"description",
|
|
153
198
|
"alias",
|
|
@@ -155,75 +200,50 @@ const __ΩCommandTree = [
|
|
|
155
200
|
() => __ΩCommandOption,
|
|
156
201
|
"options",
|
|
157
202
|
() => __ΩCommandArgument,
|
|
158
|
-
"
|
|
203
|
+
"args",
|
|
159
204
|
0,
|
|
160
205
|
"parent",
|
|
161
206
|
() => __ΩRecord,
|
|
162
207
|
0,
|
|
163
208
|
"children",
|
|
164
|
-
"ReflectionFunction",
|
|
165
|
-
"reflection",
|
|
166
209
|
"CommandTree",
|
|
167
|
-
"Pn!P&4\"&4#&F4$&n&o%#4'n(F4)P,n*J4+&n-o,#4.
|
|
168
|
-
];
|
|
169
|
-
const __ΩSerializedCommandOption = [
|
|
170
|
-
() => __ΩOmit,
|
|
171
|
-
() => __ΩCommandOption,
|
|
172
|
-
"reflection",
|
|
173
|
-
"SerializedCommandOption",
|
|
174
|
-
"n\".#o!#w$y"
|
|
175
|
-
];
|
|
176
|
-
const __ΩSerializedCommandArgument = [
|
|
177
|
-
() => __ΩOmit,
|
|
178
|
-
() => __ΩCommandArgument,
|
|
179
|
-
"reflection",
|
|
180
|
-
"SerializedCommandArgument",
|
|
181
|
-
"n\".#o!#w$y"
|
|
210
|
+
"Pn!P&4\"&4#&F4$&n&o%#4'n(F4)P,n*J4+&n-o,#4.MKw/y"
|
|
182
211
|
];
|
|
183
212
|
const __ΩSerializedCommandTree = [
|
|
184
213
|
() => __ΩOmit,
|
|
185
214
|
() => __ΩCommandTree,
|
|
186
|
-
"options",
|
|
187
|
-
"arguments",
|
|
188
215
|
"parent",
|
|
189
216
|
"children",
|
|
190
|
-
"reflection",
|
|
191
|
-
() => __ΩRecord,
|
|
192
|
-
() => __ΩSerializedCommandOption,
|
|
193
|
-
"options",
|
|
194
|
-
() => __ΩSerializedCommandArgument,
|
|
195
|
-
"arguments",
|
|
196
217
|
"parent",
|
|
197
218
|
() => __ΩRecord,
|
|
198
219
|
0,
|
|
199
220
|
"children",
|
|
200
|
-
"SerializedTypes",
|
|
201
|
-
"reflection",
|
|
202
221
|
"SerializedCommandTree",
|
|
203
|
-
"Pn\"P
|
|
222
|
+
"Pn\"P.#.$Jo!#PP,&J4%&n'o(MKw)y"
|
|
204
223
|
];
|
|
205
|
-
const __Ω
|
|
224
|
+
const __ΩCommandMetadata = [
|
|
206
225
|
"title",
|
|
207
226
|
"description",
|
|
208
227
|
"alias",
|
|
209
228
|
"icon",
|
|
210
|
-
"
|
|
229
|
+
"CommandMetadata",
|
|
211
230
|
"P&4!8&4\"8P&&FJ4#8&4$8Mw%y"
|
|
212
231
|
];
|
|
213
|
-
const __ΩCommandParameterSchema = ["CommandParameterSchema", "P!!Jw!y"];
|
|
214
232
|
const __ΩCommandModule = [
|
|
215
|
-
() => __Ω
|
|
233
|
+
() => __ΩCommandMetadata,
|
|
216
234
|
"metadata",
|
|
217
235
|
() => __ΩRecord,
|
|
218
|
-
() => __Ω
|
|
236
|
+
() => __ΩCommandOptionConfig,
|
|
237
|
+
"JSONSchema7Object",
|
|
238
|
+
"StandardJSONSchemaV1",
|
|
219
239
|
"options",
|
|
220
|
-
() => __Ω
|
|
221
|
-
"
|
|
240
|
+
() => __ΩCommandArgumentConfig,
|
|
241
|
+
"args",
|
|
222
242
|
"default",
|
|
223
243
|
"CommandModule",
|
|
224
|
-
"Pn!4\"
|
|
244
|
+
"Pn!4\"8P&n$o##\"w%\"w&!J4'8Pn(F!\"w&!J4)8!4*8Mw+y"
|
|
225
245
|
];
|
|
226
246
|
|
|
227
247
|
//#endregion
|
|
228
|
-
export { __Ω
|
|
248
|
+
export { CommandParameterKinds, __ΩAsCommandParameterConfig, __ΩBaseCommandParameter, __ΩBooleanCommandOption, __ΩBooleanCommandParameter, __ΩBooleanCommandParameterConfig, __ΩCommandArgument, __ΩCommandArgumentConfig, __ΩCommandBase, __ΩCommandConfig, __ΩCommandMetadata, __ΩCommandModule, __ΩCommandOption, __ΩCommandOptionConfig, __ΩCommandParameter, __ΩCommandParameterConfig, __ΩCommandParameterKind, __ΩCommandParameterType, __ΩCommandTree, __ΩNumberCommandParameter, __ΩNumberCommandParameterConfig, __ΩSerializedCommandTree, __ΩStringCommandParameter, __ΩStringCommandParameterConfig };
|
|
229
249
|
//# sourceMappingURL=command.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"command.mjs","names":[],"sources":["../../src/types/command.ts"],"sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Shell Shock\n\n This code was released as part of the Shell Shock project. Shell Shock\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/shell-shock.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/shell-shock\n Documentation: https://docs.stormsoftware.com/projects/shell-shock\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nimport type {\
|
|
1
|
+
{"version":3,"file":"command.mjs","names":[],"sources":["../../src/types/command.ts"],"sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Shell Shock\n\n This code was released as part of the Shell Shock project. Shell Shock\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/shell-shock.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/shell-shock\n Documentation: https://docs.stormsoftware.com/projects/shell-shock\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nimport type { StandardJSONSchemaV1 } from \"@standard-schema/spec\";\nimport type { JsonSchema7TupleType } from \"@stryke/json\";\nimport type { AnyFunction } from \"@stryke/types/base\";\nimport type { JSONSchema7Object } from \"json-schema\";\nimport type { ResolvedEntryTypeDefinition } from \"powerlines\";\nimport type * as z3 from \"zod/v3\";\n\nexport type CommandParameterType =\n | string\n | number\n | boolean\n | (string | number)[];\n\nexport const CommandParameterKinds = {\n string: \"string\",\n number: \"number\",\n boolean: \"boolean\"\n} as const;\n\nexport type CommandParameterKind =\n (typeof CommandParameterKinds)[keyof typeof CommandParameterKinds];\n\nexport interface BaseCommandParameter {\n /**\n * The option name.\n */\n name: string;\n /**\n * The option kind.\n */\n kind: CommandParameterKind;\n /**\n * The display title.\n */\n title: string;\n /**\n * The option description.\n */\n description: string;\n /**\n * Alternative option names.\n */\n alias: string[];\n /**\n * The environment variable name or false to disable.\n */\n env: string | false;\n /**\n * Whether the option is optional.\n */\n optional: boolean;\n}\n\nexport interface StringCommandParameter extends BaseCommandParameter {\n /**\n * The option kind.\n */\n kind: \"string\";\n /**\n * The default value.\n */\n default?: string;\n /**\n * A standard string format to validate the option value against.\n */\n format?:\n | \"email\"\n | \"uri\"\n | \"uuid\"\n | \"ipv4\"\n | \"ipv6\"\n | \"date\"\n | \"time\"\n | \"date-time\"\n | \"duration\";\n /**\n * Whether the option accepts multiple values.\n */\n variadic: boolean;\n\n /**\n * The allowed choices for the option value.\n */\n choices?: string[];\n}\n\nexport interface NumberCommandParameter extends BaseCommandParameter {\n /**\n * The option kind.\n */\n kind: \"number\";\n /**\n * The default value.\n */\n default?: number;\n /**\n * Whether the option accepts multiple values.\n */\n variadic: boolean;\n\n /**\n * The allowed choices for the option value.\n */\n choices?: number[];\n}\n\nexport interface BooleanCommandParameter extends BaseCommandParameter {\n /**\n * The option kind.\n */\n kind: \"boolean\";\n /**\n * The default value.\n */\n default?: boolean;\n}\n\nexport type CommandParameter =\n | StringCommandParameter\n | NumberCommandParameter\n | BooleanCommandParameter;\n\nexport type AsCommandParameterConfig<T extends BaseCommandParameter> = Pick<\n T,\n \"kind\" | \"alias\"\n> &\n Partial<Omit<T, \"kind\" | \"alias\">> & {\n alias?: string | string[];\n };\n\nexport type StringCommandParameterConfig =\n AsCommandParameterConfig<StringCommandParameter>;\nexport type NumberCommandParameterConfig =\n AsCommandParameterConfig<NumberCommandParameter>;\nexport type BooleanCommandParameterConfig =\n AsCommandParameterConfig<BooleanCommandParameter>;\n\nexport type CommandParameterConfig =\n | StringCommandParameterConfig\n | NumberCommandParameterConfig\n | BooleanCommandParameterConfig;\n\nexport interface BooleanCommandOption extends BooleanCommandParameter {\n /**\n * The option this negates.\n */\n isNegativeOf?: string;\n /**\n * Whether to skip adding a negative option.\n */\n skipAddingNegative?: boolean;\n}\n\nexport type CommandOption =\n | StringCommandParameter\n | NumberCommandParameter\n | BooleanCommandOption;\nexport type CommandOptionConfig = AsCommandParameterConfig<CommandOption>;\n\nexport type CommandArgument =\n | StringCommandParameter\n | NumberCommandParameter\n | BooleanCommandParameter;\nexport type CommandArgumentConfig = AsCommandParameterConfig<CommandArgument>;\n\nexport interface CommandBase {\n /**\n * The command id.\n */\n id: string | null;\n\n /**\n * The command name.\n */\n name: string;\n\n /**\n * The full command path value.\n */\n path: string | null;\n\n /**\n * The path segments.\n */\n segments: string[];\n\n /**\n * The display title.\n */\n title?: string;\n\n /**\n * The command description.\n */\n description?: string;\n\n /**\n * Alternative command names.\n */\n alias?: string[];\n\n /**\n * The command icon.\n */\n icon?: string;\n\n /**\n * Whether the command is virtual.\n *\n * @remarks\n * Virtual commands are considered forks in the command tree and are not directly executable. They are used to group related subcommands together without having an actual command handler or entry point.\n */\n isVirtual: boolean;\n}\n\nexport interface CommandConfig extends CommandBase {\n /**\n * The command id.\n */\n id: string;\n\n /**\n * The resolved entry definition.\n */\n entry: ResolvedEntryTypeDefinition;\n}\n\nexport type CommandTree = CommandConfig & {\n /**\n * The display title.\n */\n title: string;\n /**\n * The command description.\n */\n description: string;\n /**\n * Alternative command names.\n */\n alias: string[];\n /**\n * The command options.\n */\n options: Record<string, CommandOption>;\n /**\n * The positional arguments provided to the command.\n */\n args: CommandArgument[];\n /**\n * The parent command.\n */\n parent: null | CommandTree;\n /**\n * Child commands.\n */\n children: Record<string, CommandTree>;\n};\n\nexport type SerializedCommandTree = Omit<CommandTree, \"parent\" | \"children\"> & {\n /**\n * The parent command id.\n */\n parent: null | string;\n /**\n * Serialized child commands.\n */\n children: Record<string, SerializedCommandTree>;\n};\n\nexport interface CommandMetadata {\n /**\n * The display name of the command.\n *\n * @remarks\n * This value will be used in various displays of the user interface and documentation. If not provided, a formatted value of the command name will be used.\n */\n title?: string;\n\n /**\n * A brief description of what the command does.\n *\n * @remarks\n * This value will be used in various displays of the user interface and documentation. If not provided, a default message may be shown.\n */\n description?: string;\n\n /**\n * One or more alternative names for the command.\n */\n alias?: string | string[];\n\n /**\n * An optional icon to visually represent the command in user interfaces.\n *\n * @remarks\n * This can be a string containing an emoji, a Unicode character, or any other symbol that helps to visually identify the command. If not provided, no icon will be displayed.\n */\n icon?: string;\n}\n\nexport interface CommandModule {\n metadata?: CommandMetadata;\n options?:\n | Record<string, CommandOptionConfig>\n | JSONSchema7Object\n | StandardJSONSchemaV1<Record<string, CommandParameterType>>\n | z3.AnyZodObject;\n args?:\n | CommandArgumentConfig[]\n | JsonSchema7TupleType\n | StandardJSONSchemaV1<CommandParameterType[]>\n | z3.AnyZodTuple;\n default?: AnyFunction;\n}\n"],"mappings":";AAAA,MAAM,UAAU;CAAC;CAAK;CAAK;CAAQ;CAA4B;;;;;;AAE/D,MAAM,UAAU;CAAC;CAAK;OAAW;OAAc;CAAA;CAAA;CAAA;;;;;;;AAE/C,MAAM,aAAa;CAAC;CAAK;CAAK;CAAW;CAA6B;AACtE,MAAM,0BAA0B,CAAC,wBAAwB,gBAAW;AAEpE,MAAa,wBAAwB;;CAEjC,QAAQ;CACR,SAAS;CACZ;AACD,MAAM,0BAA0B;OAAO;OAAoB;CAAA;CAAA;CAAA;AAE3D,MAAM,0BAA0B;CAAC;OAAG;CAAA;CAAA;CAAA;CAAA;CAAA;CAAA;CAAA;CAAA;CAAA;CAAA;AAEpC,MAAM,4BAA4B;OAAO;CAAyB;CAAI;CAAA;CAAA;CAAA;CAAA;CAAA;CAAA;CAAA;CAAA;CAAA;CAAA;CAAA;CAAA;CAAA;CAAA;CAAA;CAAA;AAEtE,MAAM,4BAA4B;OAAO;CAAwB;CAAA;CAAA;CAAA;CAAA;CAAA;CAAA;CAAA;AAEjE,MAAM,6BAA6B;OAAO;CAAW;CAAA;CAAA;CAAA;CAAA;CAAA;AAErD,MAAM,sBAAsB;OAAO;OAA0B;OAAA;CAAA;CAAA;CAAA;;;;;;;;;;;;;;AAI7D,MAAM,kCAAG;OAAA;OAAA;CAAA;CAAA;CAAA;AAET,MAAM,kCAAI;OAAA;OAAA;CAAA;CAAA;CAAA;;;;;;;AAIV,MAAM,4BAAY;OAAA;OAAA;OAAA;CAAA;CAAA;CAAA;AAElB,MAAM,0BAAa;OAAA;CAAA;CAAA;CAAA;CAAA;CAAA;;;;;;;;AAInB,MAAM,yBAAyB;OAAO;OAA8B;CAAA;CAAA;CAAA;AAEpE,MAAM,qBAAqB;OAAO;OAAI;OAAA;CAAA;CAAA;CAAA;AAEtC,MAAM,2BAAc;OAAA;OAAA;CAAA;CAAA;CAAA;AAEpB,MAAM,iBAAQ;CAAA;CAAA;CAAA;CAAA;CAAA;CAAA;CAAA;CAAA;CAAA;CAAA;CAAA;CAAA;AAEd,MAAM,mBAAc;OAAA;CAAA;CAAA;CAAA;CAAA;CAAA;AAEpB,MAAM,iBAAiB;OAAK;CAAA;CAAA;CAAA;OAAA;OAAA;CAAA;OAAA;CAAA;CAAA;CAAA;OAAA;CAAA;CAAA;CAAA;CAAA;CAAA;AAE5B,MAAM,2BAAgB;OAAA;OAAA;CAAA;CAAA;CAAA;OAAA;CAAA;CAAA;CAAA;CAAA;CAAA;AAEtB,MAAM,qBAAS;CAAA;CAAA;CAAA;CAAA;CAAA;CAAA;CAAA;AAEf,MAAM,mBAAmB;OAAE;CAAA;OAAA;OAAA;CAAA;CAAA;CAAA;OAAA;CAAA;CAAA;CAAA;CAAA;CAAA"}
|
package/dist/types/config.cjs
CHANGED
|
@@ -66,9 +66,10 @@ const __ΩBaseOptions = [
|
|
|
66
66
|
"isCaseSensitive",
|
|
67
67
|
true,
|
|
68
68
|
"bin",
|
|
69
|
-
|
|
69
|
+
true,
|
|
70
|
+
"autoAssignEnv",
|
|
70
71
|
"BaseOptions",
|
|
71
|
-
"Pn\"o!\"PP\"w#FP\"w$2%\"w&2'\"w#F/(.)J4*8)4+8>,P&&FJ4-
|
|
72
|
+
"Pn\"o!\"PP\"w#FP\"w$2%\"w&2'\"w#F/(.)J4*8)4+8>,P&&FJ4-8P..&J4/8MKw0y"
|
|
72
73
|
];
|
|
73
74
|
const __ΩOptions = [
|
|
74
75
|
() => __ΩBaseOptions,
|
|
@@ -101,10 +102,11 @@ const __ΩResolvedConfig = [
|
|
|
101
102
|
"bin",
|
|
102
103
|
() => __ΩRecord,
|
|
103
104
|
"bin",
|
|
105
|
+
"appSpecificEnvPrefix",
|
|
104
106
|
() => __ΩUserConfig,
|
|
105
107
|
"userConfig",
|
|
106
108
|
"ResolvedConfig",
|
|
107
|
-
"P!!!n#.$o\"#o!\"P&&o%#4
|
|
109
|
+
"P!!!n#.$o\"#o!\"P&&o%#4&&4'n(4)MKw*y"
|
|
108
110
|
];
|
|
109
111
|
|
|
110
112
|
//#endregion
|