@shell-shock/core 0.17.8 → 0.17.11
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/_virtual/_rolldown/runtime.cjs +29 -1
- package/dist/api.cjs +36 -1
- package/dist/api.cjs.map +1 -0
- package/dist/api.d.cts +2 -77
- package/dist/api.d.cts.map +1 -1
- package/dist/api.d.mts +2 -76
- package/dist/api.d.mts.map +1 -1
- package/dist/api.mjs +35 -1
- package/dist/api.mjs.map +1 -1
- package/dist/components/command-validation-logic.cjs +291 -1
- package/dist/components/command-validation-logic.cjs.map +1 -0
- package/dist/components/command-validation-logic.d.cts +1 -3
- package/dist/components/command-validation-logic.d.cts.map +1 -1
- package/dist/components/command-validation-logic.d.mts +1 -3
- package/dist/components/command-validation-logic.d.mts.map +1 -1
- package/dist/components/command-validation-logic.mjs +288 -1
- package/dist/components/command-validation-logic.mjs.map +1 -1
- package/dist/components/docs.cjs +265 -1
- package/dist/components/docs.cjs.map +1 -0
- package/dist/components/docs.d.cts +4 -5
- package/dist/components/docs.d.cts.map +1 -1
- package/dist/components/docs.d.mts +4 -5
- package/dist/components/docs.d.mts.map +1 -1
- package/dist/components/docs.mjs +256 -1
- package/dist/components/docs.mjs.map +1 -1
- package/dist/components/exec-builtin.cjs +429 -15
- package/dist/components/exec-builtin.cjs.map +1 -0
- package/dist/components/exec-builtin.d.cts +1 -2
- package/dist/components/exec-builtin.d.cts.map +1 -1
- package/dist/components/exec-builtin.d.mts +1 -2
- package/dist/components/exec-builtin.d.mts.map +1 -1
- package/dist/components/exec-builtin.mjs +424 -15
- package/dist/components/exec-builtin.mjs.map +1 -1
- package/dist/components/helpers.cjs +119 -1
- package/dist/components/helpers.cjs.map +1 -0
- package/dist/components/helpers.d.cts +6 -8
- package/dist/components/helpers.d.cts.map +1 -1
- package/dist/components/helpers.d.mts +6 -8
- package/dist/components/helpers.d.mts.map +1 -1
- package/dist/components/helpers.mjs +111 -1
- package/dist/components/helpers.mjs.map +1 -1
- package/dist/components/index.cjs +58 -1
- package/dist/components/index.mjs +10 -1
- package/dist/components/options-parser-logic.cjs +959 -5
- package/dist/components/options-parser-logic.cjs.map +1 -0
- package/dist/components/options-parser-logic.d.cts +8 -9
- package/dist/components/options-parser-logic.d.cts.map +1 -1
- package/dist/components/options-parser-logic.d.mts +8 -9
- package/dist/components/options-parser-logic.d.mts.map +1 -1
- package/dist/components/options-parser-logic.mjs +944 -5
- package/dist/components/options-parser-logic.mjs.map +1 -1
- package/dist/components/state-builtin.cjs +630 -8
- package/dist/components/state-builtin.cjs.map +1 -0
- package/dist/components/state-builtin.d.cts +4 -5
- package/dist/components/state-builtin.d.cts.map +1 -1
- package/dist/components/state-builtin.d.mts +4 -5
- package/dist/components/state-builtin.d.mts.map +1 -1
- package/dist/components/state-builtin.mjs +622 -8
- package/dist/components/state-builtin.mjs.map +1 -1
- package/dist/components/usage.cjs +116 -1
- package/dist/components/usage.cjs.map +1 -0
- package/dist/components/usage.d.cts +1 -2
- package/dist/components/usage.d.cts.map +1 -1
- package/dist/components/usage.d.mts +1 -2
- package/dist/components/usage.d.mts.map +1 -1
- package/dist/components/usage.mjs +113 -1
- package/dist/components/usage.mjs.map +1 -1
- package/dist/components/utils-builtin.cjs +839 -33
- package/dist/components/utils-builtin.cjs.map +1 -0
- package/dist/components/utils-builtin.d.cts +7 -8
- package/dist/components/utils-builtin.d.cts.map +1 -1
- package/dist/components/utils-builtin.d.mts +7 -8
- package/dist/components/utils-builtin.d.mts.map +1 -1
- package/dist/components/utils-builtin.mjs +828 -33
- package/dist/components/utils-builtin.mjs.map +1 -1
- package/dist/config.cjs +65 -1
- package/dist/config.cjs.map +1 -0
- package/dist/config.d.cts +29 -8
- package/dist/config.d.cts.map +1 -1
- package/dist/config.d.mts +29 -8
- package/dist/config.d.mts.map +1 -1
- package/dist/config.mjs +62 -1
- package/dist/config.mjs.map +1 -1
- package/dist/contexts/command.cjs +26 -1
- package/dist/contexts/command.cjs.map +1 -0
- package/dist/contexts/command.d.cts.map +1 -1
- package/dist/contexts/command.d.mts.map +1 -1
- package/dist/contexts/command.mjs +23 -1
- package/dist/contexts/command.mjs.map +1 -1
- package/dist/contexts/index.cjs +9 -1
- package/dist/contexts/index.mjs +4 -1
- package/dist/contexts/options.cjs +63 -1
- package/dist/contexts/options.cjs.map +1 -0
- package/dist/contexts/options.d.cts.map +1 -1
- package/dist/contexts/options.d.mts.map +1 -1
- package/dist/contexts/options.mjs +57 -1
- package/dist/contexts/options.mjs.map +1 -1
- package/dist/engine.cjs +138 -0
- package/dist/engine.cjs.map +1 -0
- package/dist/engine.d.cts +79 -0
- package/dist/engine.d.cts.map +1 -0
- package/dist/engine.d.mts +79 -0
- package/dist/engine.d.mts.map +1 -0
- package/dist/engine.mjs +136 -0
- package/dist/engine.mjs.map +1 -0
- package/dist/helpers/automd.cjs +70 -1
- package/dist/helpers/automd.cjs.map +1 -0
- package/dist/helpers/automd.mjs +69 -1
- package/dist/helpers/automd.mjs.map +1 -1
- package/dist/helpers/docs-helpers.cjs +23 -1
- package/dist/helpers/docs-helpers.cjs.map +1 -0
- package/dist/helpers/docs-helpers.mjs +22 -1
- package/dist/helpers/docs-helpers.mjs.map +1 -1
- package/dist/helpers/get-framework.cjs +24 -0
- package/dist/helpers/get-framework.cjs.map +1 -0
- package/dist/helpers/get-framework.mjs +24 -0
- package/dist/helpers/get-framework.mjs.map +1 -0
- package/dist/helpers/paths.cjs +137 -1
- package/dist/helpers/paths.cjs.map +1 -0
- package/dist/helpers/paths.mjs +133 -1
- package/dist/helpers/paths.mjs.map +1 -1
- package/dist/helpers/persistence.cjs +113 -1
- package/dist/helpers/persistence.cjs.map +1 -0
- package/dist/helpers/persistence.mjs +112 -1
- package/dist/helpers/persistence.mjs.map +1 -1
- package/dist/helpers/update-package-json.cjs +65 -1
- package/dist/helpers/update-package-json.cjs.map +1 -0
- package/dist/helpers/update-package-json.mjs +63 -1
- package/dist/helpers/update-package-json.mjs.map +1 -1
- package/dist/helpers/utilities.cjs +95 -1
- package/dist/helpers/utilities.cjs.map +1 -0
- package/dist/helpers/utilities.mjs +93 -1
- package/dist/helpers/utilities.mjs.map +1 -1
- package/dist/helpers/validations.cjs +71 -1
- package/dist/helpers/validations.cjs.map +1 -0
- package/dist/helpers/validations.mjs +69 -1
- package/dist/helpers/validations.mjs.map +1 -1
- package/dist/index.cjs +123 -1
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.cts +80 -5
- package/dist/index.d.cts.map +1 -0
- package/dist/index.d.mts +80 -5
- package/dist/index.d.mts.map +1 -0
- package/dist/index.mjs +119 -1
- package/dist/index.mjs.map +1 -0
- package/dist/package.cjs +12 -0
- package/dist/package.cjs.map +1 -0
- package/dist/package.mjs +6 -0
- package/dist/package.mjs.map +1 -0
- package/dist/plugin-utils/compute-bin.cjs +48 -1
- package/dist/plugin-utils/compute-bin.cjs.map +1 -0
- package/dist/plugin-utils/compute-bin.d.cts +2 -2
- package/dist/plugin-utils/compute-bin.d.cts.map +1 -1
- package/dist/plugin-utils/compute-bin.d.mts +2 -2
- package/dist/plugin-utils/compute-bin.d.mts.map +1 -1
- package/dist/plugin-utils/compute-bin.mjs +47 -1
- package/dist/plugin-utils/compute-bin.mjs.map +1 -1
- package/dist/plugin-utils/context-helpers.cjs +224 -1
- package/dist/plugin-utils/context-helpers.cjs.map +1 -0
- package/dist/plugin-utils/context-helpers.d.cts +4 -4
- package/dist/plugin-utils/context-helpers.d.cts.map +1 -1
- package/dist/plugin-utils/context-helpers.d.mts +4 -4
- package/dist/plugin-utils/context-helpers.d.mts.map +1 -1
- package/dist/plugin-utils/context-helpers.mjs +214 -1
- package/dist/plugin-utils/context-helpers.mjs.map +1 -1
- package/dist/plugin-utils/deepkit.cjs +70 -1
- package/dist/plugin-utils/deepkit.cjs.map +1 -0
- package/dist/plugin-utils/deepkit.d.cts +5 -5
- package/dist/plugin-utils/deepkit.d.cts.map +1 -1
- package/dist/plugin-utils/deepkit.d.mts +5 -5
- package/dist/plugin-utils/deepkit.d.mts.map +1 -1
- package/dist/plugin-utils/deepkit.mjs +68 -1
- package/dist/plugin-utils/deepkit.mjs.map +1 -1
- package/dist/plugin-utils/description-helpers.cjs +112 -2
- package/dist/plugin-utils/description-helpers.cjs.map +1 -0
- package/dist/plugin-utils/description-helpers.d.cts.map +1 -1
- package/dist/plugin-utils/description-helpers.d.mts.map +1 -1
- package/dist/plugin-utils/description-helpers.mjs +107 -2
- package/dist/plugin-utils/description-helpers.mjs.map +1 -1
- package/dist/plugin-utils/get-command-tree.cjs +118 -1
- package/dist/plugin-utils/get-command-tree.cjs.map +1 -0
- package/dist/plugin-utils/get-command-tree.d.cts.map +1 -1
- package/dist/plugin-utils/get-command-tree.d.mts.map +1 -1
- package/dist/plugin-utils/get-command-tree.mjs +114 -1
- package/dist/plugin-utils/get-command-tree.mjs.map +1 -1
- package/dist/plugin-utils/index.cjs +39 -1
- package/dist/plugin-utils/index.d.cts +2 -2
- package/dist/plugin-utils/index.d.mts +2 -2
- package/dist/plugin-utils/index.mjs +10 -1
- package/dist/plugin-utils/reflect.cjs +52 -1
- package/dist/plugin-utils/reflect.cjs.map +1 -0
- package/dist/plugin-utils/reflect.d.cts.map +1 -1
- package/dist/plugin-utils/reflect.d.mts.map +1 -1
- package/dist/plugin-utils/reflect.mjs +50 -1
- package/dist/plugin-utils/reflect.mjs.map +1 -1
- package/dist/plugin-utils/traverse-command-tree.cjs +65 -1
- package/dist/plugin-utils/traverse-command-tree.cjs.map +1 -0
- package/dist/plugin-utils/traverse-command-tree.d.cts.map +1 -1
- package/dist/plugin-utils/traverse-command-tree.d.mts.map +1 -1
- package/dist/plugin-utils/traverse-command-tree.mjs +62 -1
- package/dist/plugin-utils/traverse-command-tree.mjs.map +1 -1
- package/dist/plugin-utils/type-checks.cjs +222 -1
- package/dist/plugin-utils/type-checks.cjs.map +1 -0
- package/dist/plugin-utils/type-checks.d.cts +5 -5
- package/dist/plugin-utils/type-checks.d.cts.map +1 -1
- package/dist/plugin-utils/type-checks.d.mts +5 -5
- package/dist/plugin-utils/type-checks.d.mts.map +1 -1
- package/dist/plugin-utils/type-checks.mjs +217 -1
- package/dist/plugin-utils/type-checks.mjs.map +1 -1
- package/dist/plugin.cjs +495 -4
- package/dist/plugin.cjs.map +1 -0
- package/dist/plugin.d.cts.map +1 -1
- package/dist/plugin.d.mts.map +1 -1
- package/dist/plugin.mjs +488 -4
- package/dist/plugin.mjs.map +1 -1
- package/dist/resolver/helpers.cjs +182 -1
- package/dist/resolver/helpers.cjs.map +1 -0
- package/dist/resolver/helpers.mjs +178 -1
- package/dist/resolver/helpers.mjs.map +1 -1
- package/dist/resolver/resolve.cjs +479 -1
- package/dist/resolver/resolve.cjs.map +1 -0
- package/dist/resolver/resolve.mjs +478 -1
- package/dist/resolver/resolve.mjs.map +1 -1
- package/dist/types/command.cjs +402 -1
- package/dist/types/command.cjs.map +1 -0
- package/dist/types/command.d.cts +61 -119
- package/dist/types/command.d.cts.map +1 -1
- package/dist/types/command.d.mts +61 -119
- package/dist/types/command.d.mts.map +1 -1
- package/dist/types/command.mjs +367 -1
- package/dist/types/command.mjs.map +1 -1
- package/dist/types/config.cjs +175 -1
- package/dist/types/config.cjs.map +1 -0
- package/dist/types/config.d.cts +19 -12
- package/dist/types/config.d.cts.map +1 -1
- package/dist/types/config.d.mts +19 -12
- package/dist/types/config.d.mts.map +1 -1
- package/dist/types/config.mjs +163 -1
- package/dist/types/config.mjs.map +1 -1
- package/dist/types/context.cjs +45 -1
- package/dist/types/context.cjs.map +1 -0
- package/dist/types/context.d.cts +3 -2
- package/dist/types/context.d.cts.map +1 -1
- package/dist/types/context.d.mts +3 -2
- package/dist/types/context.d.mts.map +1 -1
- package/dist/types/context.mjs +40 -1
- package/dist/types/context.mjs.map +1 -1
- package/dist/types/env.cjs +53 -1
- package/dist/types/env.cjs.map +1 -0
- package/dist/types/env.d.cts +1 -1
- package/dist/types/env.d.cts.map +1 -1
- package/dist/types/env.d.mts +1 -1
- package/dist/types/env.d.mts.map +1 -1
- package/dist/types/env.mjs +50 -1
- package/dist/types/env.mjs.map +1 -1
- package/dist/types/index.cjs +53 -1
- package/dist/types/index.d.cts +4 -4
- package/dist/types/index.d.mts +4 -4
- package/dist/types/index.mjs +6 -1
- package/dist/types/options.cjs +13 -1
- package/dist/types/options.cjs.map +1 -0
- package/dist/types/options.d.cts.map +1 -1
- package/dist/types/options.d.mts.map +1 -1
- package/dist/types/options.mjs +10 -1
- package/dist/types/options.mjs.map +1 -1
- package/package.json +43 -34
- package/dist/resolver/deepkit.cjs +0 -1
- package/dist/resolver/deepkit.mjs +0 -2
- package/dist/resolver/deepkit.mjs.map +0 -1
- package/dist/resolver/module.cjs +0 -1
- package/dist/resolver/module.mjs +0 -2
- package/dist/resolver/module.mjs.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"command.d.cts","names":[],"sources":["../../src/types/command.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"command.d.cts","names":[],"sources":["../../src/types/command.ts"],"mappings":";;;;;KAsBY,oBAAA;AAAA,UAEK,oBAAA;EAFL;;;EAMV,IAAA;EAN8B;AAEhC;;EASE,IAAA,EAAM,oBAAoB;EAAA;;;EAK1B,KAAA;EAAA;;;EAKA,WAAA;EAeA;;;EAVA,KAAA;EAoBQ;AAGV;;EAlBE,OAAA;EAsBA;AAKQ;AAGV;EAzBE,GAAA;;;AAkCQ;EA7BR,QAAA;EAgC0C;;;EA3B1C,QAAA;AAAA;AAAA,UAGe,0BAAA;EAsCf;;;EAlCA,OAAA;EAuCO;AAGT;;EArCE,QAAQ;AAAA;AAAA,UAGO,4BAAA;EAsCf;;;EAlCA,OAAA;EA0Ce;;;EArCf,QAAQ;AAAA;AAAA,UAGO,0BAAA,SAAmC,oBAAoB;EA2CtE;;AAAQ;EAvCR,IAAA;EA0CgC;;;EArChC,OAAA;EAyCe;;;EApCf,MAAA,GAAS,sBAAA;EAoCyC;;;EA/BlD,OAAA;AAAA;AAAA,U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A;EACX,OAAA,GAAU,MAAA,SAAe,mBAAA,IAAuB,WAAA;EAChD,IAAA,IAAQ,qBAAA,GAAwB,WAAA;EAChC,OAAA,GAAU,WAAA;AAAA"}
|
package/dist/types/command.d.mts
CHANGED
|
@@ -1,18 +1,9 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import { AnyFunction } from "@stryke/types/base";
|
|
5
|
-
import { JSONSchema7Object } from "json-schema";
|
|
6
|
-
import * as z3 from "zod/v3";
|
|
1
|
+
import { JsonSchemaStringFormat, SchemaInput } from "@powerlines/schema";
|
|
2
|
+
import { ResolvedEntryFileReference } from "powerlines";
|
|
3
|
+
import { AnyFunction, RequiredKeys } from "@stryke/types/base";
|
|
7
4
|
|
|
8
5
|
//#region src/types/command.d.ts
|
|
9
|
-
type CommandParameterType = string | number | boolean
|
|
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];
|
|
6
|
+
type CommandParameterType = "string" | "number" | "boolean";
|
|
16
7
|
interface BaseCommandParameter {
|
|
17
8
|
/**
|
|
18
9
|
* The option name.
|
|
@@ -21,7 +12,7 @@ interface BaseCommandParameter {
|
|
|
21
12
|
/**
|
|
22
13
|
* The option kind.
|
|
23
14
|
*/
|
|
24
|
-
|
|
15
|
+
type: CommandParameterType;
|
|
25
16
|
/**
|
|
26
17
|
* The display title.
|
|
27
18
|
*/
|
|
@@ -43,9 +34,9 @@ interface BaseCommandParameter {
|
|
|
43
34
|
*/
|
|
44
35
|
env: string | false;
|
|
45
36
|
/**
|
|
46
|
-
* Whether the option is
|
|
37
|
+
* Whether the option is required.
|
|
47
38
|
*/
|
|
48
|
-
|
|
39
|
+
required: boolean;
|
|
49
40
|
/**
|
|
50
41
|
* Whether the option accepts multiple values.
|
|
51
42
|
*/
|
|
@@ -75,7 +66,7 @@ interface BaseStringCommandParameter extends BaseCommandParameter {
|
|
|
75
66
|
/**
|
|
76
67
|
* The option kind.
|
|
77
68
|
*/
|
|
78
|
-
|
|
69
|
+
type: "string";
|
|
79
70
|
/**
|
|
80
71
|
* The default value.
|
|
81
72
|
*/
|
|
@@ -83,7 +74,7 @@ interface BaseStringCommandParameter extends BaseCommandParameter {
|
|
|
83
74
|
/**
|
|
84
75
|
* A standard string format to validate the option value against.
|
|
85
76
|
*/
|
|
86
|
-
format?:
|
|
77
|
+
format?: JsonSchemaStringFormat | string;
|
|
87
78
|
/**
|
|
88
79
|
* The allowed choices for the option value.
|
|
89
80
|
*/
|
|
@@ -114,7 +105,7 @@ interface BaseNumberCommandParameter extends BaseCommandParameter {
|
|
|
114
105
|
/**
|
|
115
106
|
* The option kind.
|
|
116
107
|
*/
|
|
117
|
-
|
|
108
|
+
type: "number";
|
|
118
109
|
/**
|
|
119
110
|
* The default value.
|
|
120
111
|
*/
|
|
@@ -149,7 +140,7 @@ interface BaseBooleanCommandParameter extends BaseCommandParameter {
|
|
|
149
140
|
/**
|
|
150
141
|
* The option kind.
|
|
151
142
|
*/
|
|
152
|
-
|
|
143
|
+
type: "boolean";
|
|
153
144
|
/**
|
|
154
145
|
* The default value.
|
|
155
146
|
*/
|
|
@@ -177,7 +168,7 @@ interface VariadicBooleanCommandParameter extends BaseBooleanCommandParameter {
|
|
|
177
168
|
}
|
|
178
169
|
type BooleanCommandParameter = SingleBooleanCommandParameter | VariadicBooleanCommandParameter;
|
|
179
170
|
type CommandParameter = StringCommandParameter | NumberCommandParameter | BooleanCommandParameter;
|
|
180
|
-
type AsCommandParameterConfig<T extends BaseCommandParameter> = Pick<T, "
|
|
171
|
+
type AsCommandParameterConfig<T extends BaseCommandParameter> = Pick<T, "type"> & Partial<Omit<T, "type" | "alias">> & {
|
|
181
172
|
alias?: string | string[];
|
|
182
173
|
};
|
|
183
174
|
type StringCommandParameterConfig = AsCommandParameterConfig<StringCommandParameter>;
|
|
@@ -198,7 +189,48 @@ type CommandOption = StringCommandParameter | NumberCommandParameter | BooleanCo
|
|
|
198
189
|
type CommandOptionConfig = AsCommandParameterConfig<CommandOption>;
|
|
199
190
|
type CommandArgument = StringCommandParameter | NumberCommandParameter | BooleanCommandParameter;
|
|
200
191
|
type CommandArgumentConfig = AsCommandParameterConfig<CommandArgument>;
|
|
201
|
-
interface
|
|
192
|
+
interface CommandMetadata {
|
|
193
|
+
/**
|
|
194
|
+
* The display name of the command.
|
|
195
|
+
*
|
|
196
|
+
* @remarks
|
|
197
|
+
* 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.
|
|
198
|
+
*/
|
|
199
|
+
title?: string;
|
|
200
|
+
/**
|
|
201
|
+
* A brief description of what the command does.
|
|
202
|
+
*
|
|
203
|
+
* @remarks
|
|
204
|
+
* This value will be used in various displays of the user interface and documentation. If not provided, a default message may be shown.
|
|
205
|
+
*/
|
|
206
|
+
description?: string;
|
|
207
|
+
/**
|
|
208
|
+
* One or more alternative names for the command.
|
|
209
|
+
*/
|
|
210
|
+
alias?: string | string[];
|
|
211
|
+
/**
|
|
212
|
+
* Optional tags for the command.
|
|
213
|
+
*
|
|
214
|
+
* @remarks
|
|
215
|
+
* Tags can be used to categorize and organize commands, and can also be utilized by plugins to provide additional functionality or filtering based on tags.
|
|
216
|
+
*/
|
|
217
|
+
tags?: string[];
|
|
218
|
+
/**
|
|
219
|
+
* An optional icon to visually represent the command in user interfaces.
|
|
220
|
+
*
|
|
221
|
+
* @remarks
|
|
222
|
+
* 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.
|
|
223
|
+
*/
|
|
224
|
+
icon?: string;
|
|
225
|
+
/**
|
|
226
|
+
* A URL to the command documentation or reference.
|
|
227
|
+
*
|
|
228
|
+
* @remarks
|
|
229
|
+
* This URL can be used in various displays of the user interface and documentation to provide users with a reference for the command. It can also be used by plugins to link to the documentation in relevant contexts. If the token `{command}` is included in the URL, it will be replaced with the full command path to provide links to command specific documentation. For example, `myapp command subcommand` will be translated to `{docs}/command/subcommand`.
|
|
230
|
+
*/
|
|
231
|
+
docs?: string;
|
|
232
|
+
}
|
|
233
|
+
interface CommandBase extends CommandMetadata {
|
|
202
234
|
/**
|
|
203
235
|
* The command id.
|
|
204
236
|
*/
|
|
@@ -215,33 +247,17 @@ interface CommandBase {
|
|
|
215
247
|
* The path segments.
|
|
216
248
|
*/
|
|
217
249
|
segments: string[];
|
|
218
|
-
/**
|
|
219
|
-
* The display title.
|
|
220
|
-
*/
|
|
221
|
-
title?: string;
|
|
222
|
-
/**
|
|
223
|
-
* The command description.
|
|
224
|
-
*/
|
|
225
|
-
description?: string;
|
|
226
250
|
/**
|
|
227
251
|
* Alternative command names.
|
|
228
252
|
*/
|
|
229
253
|
alias?: string[];
|
|
230
|
-
/**
|
|
231
|
-
* The command icon.
|
|
232
|
-
*/
|
|
233
|
-
icon?: string;
|
|
234
|
-
/**
|
|
235
|
-
* A URL to the command documentation or reference.
|
|
236
|
-
*/
|
|
237
|
-
reference?: string;
|
|
238
254
|
/**
|
|
239
255
|
* Whether the command is virtual.
|
|
240
256
|
*
|
|
241
257
|
* @remarks
|
|
242
258
|
* 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.
|
|
243
259
|
*/
|
|
244
|
-
|
|
260
|
+
virtual: boolean;
|
|
245
261
|
}
|
|
246
262
|
interface CommandConfig extends CommandBase {
|
|
247
263
|
/**
|
|
@@ -251,43 +267,10 @@ interface CommandConfig extends CommandBase {
|
|
|
251
267
|
/**
|
|
252
268
|
* The resolved entry definition.
|
|
253
269
|
*/
|
|
254
|
-
entry:
|
|
255
|
-
|
|
256
|
-
* Optional tags for the command.
|
|
257
|
-
*
|
|
258
|
-
* @remarks
|
|
259
|
-
* Tags can be used to categorize and organize commands, and can also be utilized by plugins to provide additional functionality or filtering based on tags.
|
|
260
|
-
*/
|
|
261
|
-
tags?: string[];
|
|
262
|
-
/**
|
|
263
|
-
* A string representing the source of the command, which can be "file", a specific plugin name, or any other string value that describes the source that added the command.
|
|
264
|
-
*/
|
|
265
|
-
source?: "file" | string;
|
|
270
|
+
entry: ResolvedEntryFileReference;
|
|
271
|
+
tags?: CommandMetadata["tags"];
|
|
266
272
|
}
|
|
267
|
-
type CommandTree = CommandConfig & {
|
|
268
|
-
/**
|
|
269
|
-
* The display title.
|
|
270
|
-
*/
|
|
271
|
-
title: string;
|
|
272
|
-
/**
|
|
273
|
-
* The command description.
|
|
274
|
-
*/
|
|
275
|
-
description: string;
|
|
276
|
-
/**
|
|
277
|
-
* Alternative command names.
|
|
278
|
-
*/
|
|
279
|
-
alias: string[];
|
|
280
|
-
/**
|
|
281
|
-
* A set of tags for the command.
|
|
282
|
-
*
|
|
283
|
-
* @remarks
|
|
284
|
-
* Tags can be used to categorize and organize commands, and can also be utilized by plugins to provide additional functionality or filtering based on tags.
|
|
285
|
-
*/
|
|
286
|
-
tags: string[];
|
|
287
|
-
/**
|
|
288
|
-
* A string representing the source of the command, which can be "file", a specific plugin name, or any other string value that describes the source that added the command.
|
|
289
|
-
*/
|
|
290
|
-
source: "file" | string;
|
|
273
|
+
type CommandTree = RequiredKeys<CommandConfig, "title" | "description" | "alias" | "tags"> & {
|
|
291
274
|
/**
|
|
292
275
|
* The command options.
|
|
293
276
|
*/
|
|
@@ -315,53 +298,12 @@ type SerializedCommandTree = Omit<CommandTree, "parent" | "children"> & {
|
|
|
315
298
|
*/
|
|
316
299
|
children: Record<string, SerializedCommandTree>;
|
|
317
300
|
};
|
|
318
|
-
interface CommandMetadata {
|
|
319
|
-
/**
|
|
320
|
-
* The display name of the command.
|
|
321
|
-
*
|
|
322
|
-
* @remarks
|
|
323
|
-
* 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.
|
|
324
|
-
*/
|
|
325
|
-
title?: string;
|
|
326
|
-
/**
|
|
327
|
-
* A brief description of what the command does.
|
|
328
|
-
*
|
|
329
|
-
* @remarks
|
|
330
|
-
* This value will be used in various displays of the user interface and documentation. If not provided, a default message may be shown.
|
|
331
|
-
*/
|
|
332
|
-
description?: string;
|
|
333
|
-
/**
|
|
334
|
-
* One or more alternative names for the command.
|
|
335
|
-
*/
|
|
336
|
-
alias?: string | string[];
|
|
337
|
-
/**
|
|
338
|
-
* Optional tags for the command.
|
|
339
|
-
*
|
|
340
|
-
* @remarks
|
|
341
|
-
* Tags can be used to categorize and organize commands, and can also be utilized by plugins to provide additional functionality or filtering based on tags.
|
|
342
|
-
*/
|
|
343
|
-
tags?: string[];
|
|
344
|
-
/**
|
|
345
|
-
* An optional icon to visually represent the command in user interfaces.
|
|
346
|
-
*
|
|
347
|
-
* @remarks
|
|
348
|
-
* 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.
|
|
349
|
-
*/
|
|
350
|
-
icon?: string;
|
|
351
|
-
/**
|
|
352
|
-
* A URL to the command documentation or reference.
|
|
353
|
-
*
|
|
354
|
-
* @remarks
|
|
355
|
-
* This URL can be used in various displays of the user interface and documentation to provide users with a reference for the command. It can also be used by plugins to link to the documentation in relevant contexts. If the token `{command}` is included in the URL, it will be replaced with the full command path to provide links to command specific documentation. For example, `myapp command subcommand` will be translated to `{referenceLink}/command/subcommand`.
|
|
356
|
-
*/
|
|
357
|
-
reference?: string;
|
|
358
|
-
}
|
|
359
301
|
interface CommandModule {
|
|
360
302
|
metadata?: CommandMetadata;
|
|
361
|
-
options?: Record<string, CommandOptionConfig> |
|
|
362
|
-
args?: CommandArgumentConfig
|
|
303
|
+
options?: Record<string, CommandOptionConfig> | SchemaInput;
|
|
304
|
+
args?: (CommandArgumentConfig | SchemaInput)[];
|
|
363
305
|
default?: AnyFunction;
|
|
364
306
|
}
|
|
365
307
|
//#endregion
|
|
366
|
-
export { AsCommandParameterConfig, BaseBooleanCommandParameter, BaseCommandParameter, BaseNumberCommandParameter, BaseSingleCommandParameter, BaseStringCommandParameter, BaseVariadicCommandParameter, BooleanCommandOption, BooleanCommandParameter, BooleanCommandParameterConfig, CommandArgument, CommandArgumentConfig, CommandBase, CommandConfig, CommandMetadata, CommandModule, CommandOption, CommandOptionConfig, CommandParameter, CommandParameterConfig,
|
|
308
|
+
export { AsCommandParameterConfig, BaseBooleanCommandParameter, BaseCommandParameter, BaseNumberCommandParameter, BaseSingleCommandParameter, BaseStringCommandParameter, BaseVariadicCommandParameter, BooleanCommandOption, BooleanCommandParameter, BooleanCommandParameterConfig, CommandArgument, CommandArgumentConfig, CommandBase, CommandConfig, CommandMetadata, CommandModule, CommandOption, CommandOptionConfig, CommandParameter, CommandParameterConfig, CommandParameterType, CommandTree, NumberCommandParameter, NumberCommandParameterConfig, SerializedCommandTree, SingleBooleanCommandParameter, SingleNumberCommandParameter, SingleStringCommandParameter, StringCommandParameter, StringCommandParameterConfig, VariadicBooleanCommandParameter, VariadicNumberCommandParameter, VariadicStringCommandParameter };
|
|
367
309
|
//# sourceMappingURL=command.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"command.d.mts","names":[],"sources":["../../src/types/command.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"command.d.mts","names":[],"sources":["../../src/types/command.ts"],"mappings":""}
|