@shell-shock/core 0.9.6 → 0.10.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/api.cjs +1 -2
- package/dist/api.cjs.map +1 -1
- package/dist/api.d.cts +1 -1
- package/dist/api.d.mts +1 -1
- package/dist/api.mjs +1 -2
- package/dist/api.mjs.map +1 -1
- package/dist/components/docs.d.cts +5 -5
- package/dist/components/docs.d.mts +5 -5
- package/dist/components/helpers.d.cts +6 -6
- package/dist/components/helpers.d.cts.map +1 -1
- package/dist/components/helpers.d.mts +6 -6
- package/dist/components/helpers.d.mts.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.d.cts +9 -9
- package/dist/components/options-parser-logic.d.mts +9 -9
- package/dist/components/options-parser-logic.d.mts.map +1 -1
- package/dist/components/usage.d.cts +2 -2
- package/dist/components/usage.d.cts.map +1 -1
- package/dist/components/utils-builtin.cjs +204 -0
- package/dist/components/utils-builtin.cjs.map +1 -1
- package/dist/components/utils-builtin.d.cts +13 -9
- package/dist/components/utils-builtin.d.cts.map +1 -1
- package/dist/components/utils-builtin.d.mts +5 -1
- package/dist/components/utils-builtin.d.mts.map +1 -1
- package/dist/components/utils-builtin.mjs +205 -2
- package/dist/components/utils-builtin.mjs.map +1 -1
- package/dist/helpers/docs-helpers.cjs +1 -1
- package/dist/helpers/docs-helpers.cjs.map +1 -1
- package/dist/helpers/docs-helpers.mjs +1 -1
- package/dist/helpers/docs-helpers.mjs.map +1 -1
- package/dist/helpers/resolve-command.cjs +27 -7
- package/dist/helpers/resolve-command.cjs.map +1 -1
- package/dist/helpers/resolve-command.mjs +26 -6
- package/dist/helpers/resolve-command.mjs.map +1 -1
- package/dist/helpers/update-package-json.cjs +1 -1
- package/dist/helpers/update-package-json.cjs.map +1 -1
- package/dist/helpers/update-package-json.mjs +1 -1
- package/dist/helpers/update-package-json.mjs.map +1 -1
- package/dist/index.cjs +1 -5
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +2 -4
- package/dist/index.d.mts +2 -4
- package/dist/index.mjs +2 -4
- package/dist/index.mjs.map +1 -1
- package/dist/plugin.cjs +20 -21
- 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 +19 -19
- package/dist/plugin.mjs.map +1 -1
- package/dist/types/command.cjs +12 -3
- package/dist/types/command.cjs.map +1 -1
- package/dist/types/command.d.cts +15 -2
- package/dist/types/command.d.cts.map +1 -1
- package/dist/types/command.d.mts +15 -2
- package/dist/types/command.d.mts.map +1 -1
- package/dist/types/command.mjs +12 -4
- package/dist/types/command.mjs.map +1 -1
- package/dist/types/config.cjs +1 -2
- package/dist/types/config.cjs.map +1 -1
- package/dist/types/config.d.cts +2 -2
- package/dist/types/config.d.cts.map +1 -1
- package/dist/types/config.d.mts +2 -2
- package/dist/types/config.d.mts.map +1 -1
- package/dist/types/config.mjs +1 -2
- package/dist/types/config.mjs.map +1 -1
- package/dist/types/context.cjs.map +1 -1
- package/dist/types/context.d.cts +1 -1
- package/dist/types/context.d.mts +1 -1
- package/dist/types/context.mjs.map +1 -1
- package/dist/types/index.cjs +1 -0
- 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 +22 -16
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"command.cjs","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 {\n ReflectionFunction,\n ReflectionKind,\n ReflectionParameter,\n ReflectionProperty,\n SerializedTypes\n} from \"@powerlines/deepkit/vendor/type\";\nimport type { AnyFunction } from \"@stryke/types/base\";\nimport type { ResolvedEntryTypeDefinition } from \"powerlines/
|
|
1
|
+
{"version":3,"file":"command.cjs","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 {\n ReflectionFunction,\n ReflectionKind,\n ReflectionParameter,\n ReflectionProperty,\n SerializedTypes\n} from \"@powerlines/deepkit/vendor/type\";\nimport type { AnyFunction } from \"@stryke/types/base\";\nimport type { ResolvedEntryTypeDefinition } from \"powerlines\";\nimport type * as z3 from \"zod/v3\";\nimport type * as z4 from \"zod/v4/core\";\n\nexport interface BaseCommandParameter {\n /**\n * The option name.\n */\n name: string;\n /**\n * The option kind.\n */\n kind: ReflectionKind;\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: ReflectionKind.string;\n /**\n * The default value.\n */\n default?: string;\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: ReflectionKind.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: ReflectionKind.boolean;\n /**\n * The default value.\n */\n default?: boolean;\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 interface StringCommandOption extends StringCommandParameter {\n /**\n * The property reflection.\n */\n reflection?: ReflectionProperty;\n}\n\nexport interface NumberCommandOption extends NumberCommandParameter {\n /**\n * The property reflection.\n */\n reflection?: ReflectionProperty;\n}\n\nexport interface BooleanCommandOption extends BooleanCommandParameter {\n /**\n * The property reflection.\n */\n reflection?: ReflectionProperty;\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 | StringCommandOption\n | NumberCommandOption\n | BooleanCommandOption;\n\nexport interface StringCommandArgument extends StringCommandParameter {\n /**\n * The parameter reflection.\n */\n reflection: ReflectionParameter;\n}\n\nexport interface NumberCommandArgument extends NumberCommandParameter {\n /**\n * The parameter reflection.\n */\n reflection: ReflectionParameter;\n}\n\nexport interface BooleanCommandArgument extends BooleanCommandParameter {\n /**\n * The parameter reflection.\n */\n reflection: ReflectionParameter;\n}\n\nexport type CommandArgument =\n | StringCommandArgument\n | NumberCommandArgument\n | BooleanCommandArgument;\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 CommandInput 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 = CommandInput & {\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 arguments: CommandArgument[];\n /**\n * The parent command.\n */\n parent: null | CommandTree;\n /**\n * Child commands.\n */\n children: Record<string, CommandTree>;\n /**\n * The command handler reflection.\n */\n reflection: ReflectionFunction | null;\n};\n\nexport type SerializedCommandOption = Omit<CommandOption, \"reflection\">;\n\nexport type SerializedCommandArgument = Omit<CommandArgument, \"reflection\">;\n\nexport type SerializedCommandTree = Omit<\n CommandTree,\n \"options\" | \"arguments\" | \"parent\" | \"children\" | \"reflection\"\n> & {\n /**\n * The command options.\n */\n options: Record<string, SerializedCommandOption>;\n /**\n * The positional arguments provided to the command.\n */\n arguments: SerializedCommandArgument[];\n /**\n * The parent command id.\n */\n parent: null | string;\n /**\n * Serialized child commands.\n */\n children: Record<string, SerializedCommandTree>;\n /**\n * The command handler reflection.\n */\n reflection?: SerializedTypes;\n};\n\nexport interface Metadata {\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 type CommandParameterSchema = z3.ZodTypeAny | z4.$ZodType;\n\nexport interface CommandModule {\n metadata?: Metadata;\n options?: Record<string, CommandParameterSchema>;\n arguments?: CommandParameterSchema[];\n default?: AnyFunction;\n}\n"],"mappings":";;AAAA,MAAM,YAAY;CAAC;CAAK;CAAK;CAAU;CAAyB;;;;;;;;;AAEhE,MAAM,UAAU;CAAC;CAAK;CAAK;CAAQ;CAAY;;;;;;;AAE/C,MAAM,0BAA0B;CAAC;CAAQ;CAAkB;CAAQ;CAAG;CAAA;CAAA;CAAA;CAAA;CAAA;CAAA;CAAA;AAEtE,MAAM,4BAA4B;OAAO;CAAyB;CAAG;CAAE;CAAA;CAAA;CAAA;CAAA;CAAA;;;;;;;;;;;AAIvE,MAAM,6BAA6B;OAAO;CAAyB;CAAG;CAAC;CAAA;CAAA;CAAA;CAAA;CAAA;AAEvE,MAAM,yBAAyB;OAAO;CAAqB;CAAA;CAAA;CAAA;CAAA;AAE3D,MAAM,yBAAyB;OAAK;CAAA;CAAA;CAAA;CAAA;CAAA;AAEpC,MAAM,0BAA0B;OAAO;CAA4B;CAAG;CAAA;CAAA;CAAA;CAAA;CAAA;AAEtE,MAAM,mBAAM;OAAA;OAAA;OAAA;CAAA;CAAA;CAAA;AAEZ,MAAM,2BAAU;OAAA;CAAA;CAAA;CAAA;CAAA;CAAA;AAEhB,MAAM,2BAAc;OAAA;CAAA;CAAA;CAAA;CAAA;CAAA;AAEpB,MAAM,4BAA4B;OAAM;CAAA;CAAA;CAAA;CAAA;CAAA;AAExC,MAAM,qBAAqB;OAAO;OAA2B;OAAA;CAAA;CAAA;CAAA;AAE7D,MAAM,iBAAiB;CAAC;CAAM;CAAQ;CAAA;CAAA;CAAA;CAAA;CAAA;CAAA;CAAA;CAAA;CAAA;AAEtC,MAAM,kBAAkB;OAAO;CAAO;CAAA;CAAA;CAAA;CAAA;AAEtC,MAAM,iBAAc;OAAA;CAAA;CAAA;CAAA;OAAA;OAAA;CAAA;OAAA;CAAA;CAAA;CAAA;OAAA;CAAA;CAAA;CAAA;CAAA;CAAA;CAAA;CAAA;AAEpB,MAAM,6BAAQ;OAAA;OAAA;CAAA;CAAA;CAAA;CAAA;AAEd,MAAM,+BAAc;OAAA;OAAA;CAAA;CAAA;CAAA;CAAA;AAEpB,MAAM,2BAAgB;OAAA;OAAA;CAAA;CAAA;CAAA;CAAA;CAAA;OAAA;OAAA;CAAA;OAAA;CAAA;CAAA;OAAA;CAAA;CAAA;CAAA;CAAA;CAAA;CAAA;CAAA;AAEtB,MAAM,cAAc;CAAC;CAAC;CAAA;CAAA;CAAA;CAAA;CAAA;AAEtB,MAAM,4BAAS,CAAA,0BAAA,UAAA;AAEf,MAAM,mBAAmB;OAAE;CAAA;OAAA;OAAA;CAAA;OAAA;CAAA;CAAA;CAAA;CAAA;CAAA"}
|
package/dist/types/command.d.cts
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
|
+
import { ResolvedEntryTypeDefinition } from "powerlines";
|
|
1
2
|
import { ReflectionFunction, ReflectionKind, ReflectionParameter, ReflectionProperty, SerializedTypes } from "@powerlines/deepkit/vendor/type";
|
|
2
3
|
import { AnyFunction } from "@stryke/types/base";
|
|
3
|
-
import
|
|
4
|
+
import * as z3 from "zod/v3";
|
|
5
|
+
import * as z4 from "zod/v4/core";
|
|
4
6
|
|
|
5
7
|
//#region src/types/command.d.ts
|
|
6
8
|
interface BaseCommandParameter {
|
|
@@ -46,6 +48,10 @@ interface StringCommandParameter extends BaseCommandParameter {
|
|
|
46
48
|
* Whether the option accepts multiple values.
|
|
47
49
|
*/
|
|
48
50
|
variadic: boolean;
|
|
51
|
+
/**
|
|
52
|
+
* The allowed choices for the option value.
|
|
53
|
+
*/
|
|
54
|
+
choices?: string[];
|
|
49
55
|
}
|
|
50
56
|
interface NumberCommandParameter extends BaseCommandParameter {
|
|
51
57
|
/**
|
|
@@ -60,6 +66,10 @@ interface NumberCommandParameter extends BaseCommandParameter {
|
|
|
60
66
|
* Whether the option accepts multiple values.
|
|
61
67
|
*/
|
|
62
68
|
variadic: boolean;
|
|
69
|
+
/**
|
|
70
|
+
* The allowed choices for the option value.
|
|
71
|
+
*/
|
|
72
|
+
choices?: number[];
|
|
63
73
|
}
|
|
64
74
|
interface BooleanCommandParameter extends BaseCommandParameter {
|
|
65
75
|
/**
|
|
@@ -261,10 +271,13 @@ interface Metadata {
|
|
|
261
271
|
*/
|
|
262
272
|
icon?: string;
|
|
263
273
|
}
|
|
274
|
+
type CommandParameterSchema = z3.ZodTypeAny | z4.$ZodType;
|
|
264
275
|
interface CommandModule {
|
|
265
276
|
metadata?: Metadata;
|
|
277
|
+
options?: Record<string, CommandParameterSchema>;
|
|
278
|
+
arguments?: CommandParameterSchema[];
|
|
266
279
|
default?: AnyFunction;
|
|
267
280
|
}
|
|
268
281
|
//#endregion
|
|
269
|
-
export { BaseCommandParameter, BooleanCommandArgument, BooleanCommandOption, BooleanCommandParameter, CommandArgument, CommandBase, CommandInput, CommandModule, CommandOption, CommandTree, Metadata, NumberCommandArgument, NumberCommandOption, NumberCommandParameter, SerializedCommandArgument, SerializedCommandOption, SerializedCommandTree, StringCommandArgument, StringCommandOption, StringCommandParameter };
|
|
282
|
+
export { BaseCommandParameter, BooleanCommandArgument, BooleanCommandOption, BooleanCommandParameter, CommandArgument, CommandBase, CommandInput, CommandModule, CommandOption, CommandParameterSchema, CommandTree, Metadata, NumberCommandArgument, NumberCommandOption, NumberCommandParameter, SerializedCommandArgument, SerializedCommandOption, SerializedCommandTree, StringCommandArgument, StringCommandOption, StringCommandParameter };
|
|
270
283
|
//# sourceMappingURL=command.d.cts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"command.d.cts","names":[],"sources":["../../src/types/command.ts"],"sourcesContent":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"command.d.cts","names":[],"sources":["../../src/types/command.ts"],"sourcesContent":[],"mappings":";;;;;;;UA8BiB,oBAAA;;AAAjB;AA+BA;EAoBiB,IAAA,EAAA,MAAA;EAoBA;AAmBjB;AAOA;EAOiB,IAAA,EAhGT,cAgGS;EAeL;;;EAGR,KAAA,EAAA,MAAA;EAAoB;AAExB;AAOA;EAOiB,WAAA,EAAA,MAAA;EAOL;;;EAGR,KAAA,EAAA,MAAA,EAAA;EAAsB;AAE1B;AAkDA;EAYY,GAAA,EAAA,MAAA,GAAW,KAAA;EAAG;;;EAoBb,QAAA,EAAA,OAAA;;AAQc,UAjNV,sBAAA,SAA+B,oBAiNrB,CAAA;EAAf;;;EAOA,IAAA,EApNJ,cAAA,CAAe,MAoNY;EAEvB;AAEZ;;EAAoC,OAAA,CAAA,EAAA,MAAA;EAOV;;;EAYC,QAAA,EAAA,OAAA;EAAf;;;EAOK,OAAA,CAAA,EAAA,MAAQ,EAAA;AA+BzB;AAEiB,UAnQA,sBAAA,SAA+B,oBAmQlB,CAAA;EACjB;;;EAEC,IAAA,EAlQN,cAAA,CAAe,MAkQT;EACF;;;;;;;;;;;;;UAnPK,uBAAA,SAAgC;;;;QAIzC,cAAA,CAAe;;;;;;;;;;;;;;UAeN,mBAAA,SAA4B;;;;eAI9B;;UAGE,mBAAA,SAA4B;;;;eAI9B;;UAGE,oBAAA,SAA6B;;;;eAI/B;;;;;;;;;;KAWH,aAAA,GACR,sBACA,sBACA;UAEa,qBAAA,SAA8B;;;;cAIjC;;UAGG,qBAAA,SAA8B;;;;cAIjC;;UAGG,sBAAA,SAA+B;;;;cAIlC;;KAGF,eAAA,GACR,wBACA,wBACA;UAEa,WAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;UAkDA,YAAA,SAAqB;;;;;;;;SAS7B;;KAGG,WAAA,GAAc;;;;;;;;;;;;;;;;WAgBf,eAAe;;;;aAIb;;;;iBAII;;;;YAIL,eAAe;;;;cAIb;;KAGF,uBAAA,GAA0B,KAAK;KAE/B,yBAAA,GAA4B,KAAK;KAEjC,qBAAA,GAAwB,KAClC;;;;WAMS,eAAe;;;;aAIb;;;;;;;;YAQD,eAAe;;;;eAIZ;;UAGE,QAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;KA+BL,sBAAA,GAAyB,EAAA,CAAG,aAAa,EAAA,CAAG;UAEvC,aAAA;aACJ;YACD,eAAe;cACb;YACF"}
|
package/dist/types/command.d.mts
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
|
+
import { ResolvedEntryTypeDefinition } from "powerlines";
|
|
1
2
|
import { ReflectionFunction, ReflectionKind, ReflectionParameter, ReflectionProperty, SerializedTypes } from "@powerlines/deepkit/vendor/type";
|
|
2
3
|
import { AnyFunction } from "@stryke/types/base";
|
|
3
|
-
import
|
|
4
|
+
import * as z3 from "zod/v3";
|
|
5
|
+
import * as z4 from "zod/v4/core";
|
|
4
6
|
|
|
5
7
|
//#region src/types/command.d.ts
|
|
6
8
|
interface BaseCommandParameter {
|
|
@@ -46,6 +48,10 @@ interface StringCommandParameter extends BaseCommandParameter {
|
|
|
46
48
|
* Whether the option accepts multiple values.
|
|
47
49
|
*/
|
|
48
50
|
variadic: boolean;
|
|
51
|
+
/**
|
|
52
|
+
* The allowed choices for the option value.
|
|
53
|
+
*/
|
|
54
|
+
choices?: string[];
|
|
49
55
|
}
|
|
50
56
|
interface NumberCommandParameter extends BaseCommandParameter {
|
|
51
57
|
/**
|
|
@@ -60,6 +66,10 @@ interface NumberCommandParameter extends BaseCommandParameter {
|
|
|
60
66
|
* Whether the option accepts multiple values.
|
|
61
67
|
*/
|
|
62
68
|
variadic: boolean;
|
|
69
|
+
/**
|
|
70
|
+
* The allowed choices for the option value.
|
|
71
|
+
*/
|
|
72
|
+
choices?: number[];
|
|
63
73
|
}
|
|
64
74
|
interface BooleanCommandParameter extends BaseCommandParameter {
|
|
65
75
|
/**
|
|
@@ -261,10 +271,13 @@ interface Metadata {
|
|
|
261
271
|
*/
|
|
262
272
|
icon?: string;
|
|
263
273
|
}
|
|
274
|
+
type CommandParameterSchema = z3.ZodTypeAny | z4.$ZodType;
|
|
264
275
|
interface CommandModule {
|
|
265
276
|
metadata?: Metadata;
|
|
277
|
+
options?: Record<string, CommandParameterSchema>;
|
|
278
|
+
arguments?: CommandParameterSchema[];
|
|
266
279
|
default?: AnyFunction;
|
|
267
280
|
}
|
|
268
281
|
//#endregion
|
|
269
|
-
export { BaseCommandParameter, BooleanCommandArgument, BooleanCommandOption, BooleanCommandParameter, CommandArgument, CommandBase, CommandInput, CommandModule, CommandOption, CommandTree, Metadata, NumberCommandArgument, NumberCommandOption, NumberCommandParameter, SerializedCommandArgument, SerializedCommandOption, SerializedCommandTree, StringCommandArgument, StringCommandOption, StringCommandParameter };
|
|
282
|
+
export { BaseCommandParameter, BooleanCommandArgument, BooleanCommandOption, BooleanCommandParameter, CommandArgument, CommandBase, CommandInput, CommandModule, CommandOption, CommandParameterSchema, CommandTree, Metadata, NumberCommandArgument, NumberCommandOption, NumberCommandParameter, SerializedCommandArgument, SerializedCommandOption, SerializedCommandTree, StringCommandArgument, StringCommandOption, StringCommandParameter };
|
|
270
283
|
//# 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":";;;;;;;UA8BiB,oBAAA;;AAAjB;AA+BA;EAoBiB,IAAA,EAAA,MAAA;EAoBA;AAmBjB;AAOA;EAOiB,IAAA,EAhGT,cAgGS;EAeL;;;EAGR,KAAA,EAAA,MAAA;EAAoB;AAExB;AAOA;EAOiB,WAAA,EAAA,MAAA;EAOL;;;EAGR,KAAA,EAAA,MAAA,EAAA;EAAsB;AAE1B;AAkDA;EAYY,GAAA,EAAA,MAAA,GAAW,KAAA;EAAG;;;EAoBb,QAAA,EAAA,OAAA;;AAQc,UAjNV,sBAAA,SAA+B,oBAiNrB,CAAA;EAAf;;;EAOA,IAAA,EApNJ,cAAA,CAAe,MAoNY;EAEvB;AAEZ;;EAAoC,OAAA,CAAA,EAAA,MAAA;EAOV;;;EAYC,QAAA,EAAA,OAAA;EAAf;;;EAOK,OAAA,CAAA,EAAA,MAAQ,EAAA;AA+BzB;AAEiB,UAnQA,sBAAA,SAA+B,oBAmQlB,CAAA;EACjB;;;EAEC,IAAA,EAlQN,cAAA,CAAe,MAkQT;EACF;;;;;;;;;;;;;UAnPK,uBAAA,SAAgC;;;;QAIzC,cAAA,CAAe;;;;;;;;;;;;;;UAeN,mBAAA,SAA4B;;;;eAI9B;;UAGE,mBAAA,SAA4B;;;;eAI9B;;UAGE,oBAAA,SAA6B;;;;eAI/B;;;;;;;;;;KAWH,aAAA,GACR,sBACA,sBACA;UAEa,qBAAA,SAA8B;;;;cAIjC;;UAGG,qBAAA,SAA8B;;;;cAIjC;;UAGG,sBAAA,SAA+B;;;;cAIlC;;KAGF,eAAA,GACR,wBACA,wBACA;UAEa,WAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;UAkDA,YAAA,SAAqB;;;;;;;;SAS7B;;KAGG,WAAA,GAAc;;;;;;;;;;;;;;;;WAgBf,eAAe;;;;aAIb;;;;iBAII;;;;YAIL,eAAe;;;;cAIb;;KAGF,uBAAA,GAA0B,KAAK;KAE/B,yBAAA,GAA4B,KAAK;KAEjC,qBAAA,GAAwB,KAClC;;;;WAMS,eAAe;;;;aAIb;;;;;;;;YAQD,eAAe;;;;eAIZ;;UAGE,QAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;KA+BL,sBAAA,GAAyB,EAAA,CAAG,aAAa,EAAA,CAAG;UAEvC,aAAA;aACJ;YACD,eAAe;cACb;YACF"}
|
package/dist/types/command.mjs
CHANGED
|
@@ -44,8 +44,9 @@ const __ΩStringCommandParameter = [
|
|
|
44
44
|
"kind",
|
|
45
45
|
"default",
|
|
46
46
|
"variadic",
|
|
47
|
+
"choices",
|
|
47
48
|
"StringCommandParameter",
|
|
48
|
-
"Pn!a\"4#&4$8)4
|
|
49
|
+
"Pn!a\"4#&4$8)4%&F4&8Mw'y"
|
|
49
50
|
];
|
|
50
51
|
const __ΩNumberCommandParameter = [
|
|
51
52
|
() => __ΩBaseCommandParameter,
|
|
@@ -53,8 +54,9 @@ const __ΩNumberCommandParameter = [
|
|
|
53
54
|
"kind",
|
|
54
55
|
"default",
|
|
55
56
|
"variadic",
|
|
57
|
+
"choices",
|
|
56
58
|
"NumberCommandParameter",
|
|
57
|
-
"Pn!a\"4#'4$8)4%
|
|
59
|
+
"Pn!a\"4#'4$8)4%'F4&8Mw'y"
|
|
58
60
|
];
|
|
59
61
|
const __ΩBooleanCommandParameter = [
|
|
60
62
|
() => __ΩBaseCommandParameter,
|
|
@@ -208,14 +210,20 @@ const __ΩMetadata = [
|
|
|
208
210
|
"Metadata",
|
|
209
211
|
"P&4!8&4\"8P&&FJ4#8&4$8Mw%y"
|
|
210
212
|
];
|
|
213
|
+
const __ΩCommandParameterSchema = ["CommandParameterSchema", "P!!Jw!y"];
|
|
211
214
|
const __ΩCommandModule = [
|
|
212
215
|
() => __ΩMetadata,
|
|
213
216
|
"metadata",
|
|
217
|
+
() => __ΩRecord,
|
|
218
|
+
() => __ΩCommandParameterSchema,
|
|
219
|
+
"options",
|
|
220
|
+
() => __ΩCommandParameterSchema,
|
|
221
|
+
"arguments",
|
|
214
222
|
"default",
|
|
215
223
|
"CommandModule",
|
|
216
|
-
"Pn!4\"8!4
|
|
224
|
+
"Pn!4\"8&n$o##4%8n&F4'8!4(8Mw)y"
|
|
217
225
|
];
|
|
218
226
|
|
|
219
227
|
//#endregion
|
|
220
|
-
export { __ΩBaseCommandParameter, __ΩBooleanCommandArgument, __ΩBooleanCommandOption, __ΩBooleanCommandParameter, __ΩCommandArgument, __ΩCommandBase, __ΩCommandInput, __ΩCommandModule, __ΩCommandOption, __ΩCommandTree, __ΩMetadata, __ΩNumberCommandArgument, __ΩNumberCommandOption, __ΩNumberCommandParameter, __ΩSerializedCommandArgument, __ΩSerializedCommandOption, __ΩSerializedCommandTree, __ΩStringCommandArgument, __ΩStringCommandOption, __ΩStringCommandParameter };
|
|
228
|
+
export { __ΩBaseCommandParameter, __ΩBooleanCommandArgument, __ΩBooleanCommandOption, __ΩBooleanCommandParameter, __ΩCommandArgument, __ΩCommandBase, __ΩCommandInput, __ΩCommandModule, __ΩCommandOption, __ΩCommandParameterSchema, __ΩCommandTree, __ΩMetadata, __ΩNumberCommandArgument, __ΩNumberCommandOption, __ΩNumberCommandParameter, __ΩSerializedCommandArgument, __ΩSerializedCommandOption, __ΩSerializedCommandTree, __ΩStringCommandArgument, __ΩStringCommandOption, __ΩStringCommandParameter };
|
|
221
229
|
//# 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 {\n ReflectionFunction,\n ReflectionKind,\n ReflectionParameter,\n ReflectionProperty,\n SerializedTypes\n} from \"@powerlines/deepkit/vendor/type\";\nimport type { AnyFunction } from \"@stryke/types/base\";\nimport type { ResolvedEntryTypeDefinition } from \"powerlines/
|
|
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 {\n ReflectionFunction,\n ReflectionKind,\n ReflectionParameter,\n ReflectionProperty,\n SerializedTypes\n} from \"@powerlines/deepkit/vendor/type\";\nimport type { AnyFunction } from \"@stryke/types/base\";\nimport type { ResolvedEntryTypeDefinition } from \"powerlines\";\nimport type * as z3 from \"zod/v3\";\nimport type * as z4 from \"zod/v4/core\";\n\nexport interface BaseCommandParameter {\n /**\n * The option name.\n */\n name: string;\n /**\n * The option kind.\n */\n kind: ReflectionKind;\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: ReflectionKind.string;\n /**\n * The default value.\n */\n default?: string;\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: ReflectionKind.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: ReflectionKind.boolean;\n /**\n * The default value.\n */\n default?: boolean;\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 interface StringCommandOption extends StringCommandParameter {\n /**\n * The property reflection.\n */\n reflection?: ReflectionProperty;\n}\n\nexport interface NumberCommandOption extends NumberCommandParameter {\n /**\n * The property reflection.\n */\n reflection?: ReflectionProperty;\n}\n\nexport interface BooleanCommandOption extends BooleanCommandParameter {\n /**\n * The property reflection.\n */\n reflection?: ReflectionProperty;\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 | StringCommandOption\n | NumberCommandOption\n | BooleanCommandOption;\n\nexport interface StringCommandArgument extends StringCommandParameter {\n /**\n * The parameter reflection.\n */\n reflection: ReflectionParameter;\n}\n\nexport interface NumberCommandArgument extends NumberCommandParameter {\n /**\n * The parameter reflection.\n */\n reflection: ReflectionParameter;\n}\n\nexport interface BooleanCommandArgument extends BooleanCommandParameter {\n /**\n * The parameter reflection.\n */\n reflection: ReflectionParameter;\n}\n\nexport type CommandArgument =\n | StringCommandArgument\n | NumberCommandArgument\n | BooleanCommandArgument;\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 CommandInput 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 = CommandInput & {\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 arguments: CommandArgument[];\n /**\n * The parent command.\n */\n parent: null | CommandTree;\n /**\n * Child commands.\n */\n children: Record<string, CommandTree>;\n /**\n * The command handler reflection.\n */\n reflection: ReflectionFunction | null;\n};\n\nexport type SerializedCommandOption = Omit<CommandOption, \"reflection\">;\n\nexport type SerializedCommandArgument = Omit<CommandArgument, \"reflection\">;\n\nexport type SerializedCommandTree = Omit<\n CommandTree,\n \"options\" | \"arguments\" | \"parent\" | \"children\" | \"reflection\"\n> & {\n /**\n * The command options.\n */\n options: Record<string, SerializedCommandOption>;\n /**\n * The positional arguments provided to the command.\n */\n arguments: SerializedCommandArgument[];\n /**\n * The parent command id.\n */\n parent: null | string;\n /**\n * Serialized child commands.\n */\n children: Record<string, SerializedCommandTree>;\n /**\n * The command handler reflection.\n */\n reflection?: SerializedTypes;\n};\n\nexport interface Metadata {\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 type CommandParameterSchema = z3.ZodTypeAny | z4.$ZodType;\n\nexport interface CommandModule {\n metadata?: Metadata;\n options?: Record<string, CommandParameterSchema>;\n arguments?: CommandParameterSchema[];\n default?: AnyFunction;\n}\n"],"mappings":";AAAA,MAAM,YAAY;CAAC;CAAK;CAAK;CAAU;CAAyB;;;;;;;;;AAEhE,MAAM,UAAU;CAAC;CAAK;CAAK;CAAQ;CAAY;;;;;;;AAE/C,MAAM,0BAA0B;CAAC;CAAQ;CAAkB;CAAQ;CAAG;CAAA;CAAA;CAAA;CAAA;CAAA;CAAA;CAAA;AAEtE,MAAM,4BAA4B;OAAO;CAAyB;CAAG;CAAE;CAAA;CAAA;CAAA;CAAA;CAAA;;;;;;;;;;;AAIvE,MAAM,6BAA6B;OAAO;CAAyB;CAAG;CAAC;CAAA;CAAA;CAAA;CAAA;CAAA;AAEvE,MAAM,yBAAyB;OAAO;CAAqB;CAAA;CAAA;CAAA;CAAA;AAE3D,MAAM,yBAAyB;OAAK;CAAA;CAAA;CAAA;CAAA;CAAA;AAEpC,MAAM,0BAA0B;OAAO;CAA4B;CAAG;CAAA;CAAA;CAAA;CAAA;CAAA;AAEtE,MAAM,mBAAM;OAAA;OAAA;OAAA;CAAA;CAAA;CAAA;AAEZ,MAAM,2BAAU;OAAA;CAAA;CAAA;CAAA;CAAA;CAAA;AAEhB,MAAM,2BAAc;OAAA;CAAA;CAAA;CAAA;CAAA;CAAA;AAEpB,MAAM,4BAA4B;OAAM;CAAA;CAAA;CAAA;CAAA;CAAA;AAExC,MAAM,qBAAqB;OAAO;OAA2B;OAAA;CAAA;CAAA;CAAA;AAE7D,MAAM,iBAAiB;CAAC;CAAM;CAAQ;CAAA;CAAA;CAAA;CAAA;CAAA;CAAA;CAAA;CAAA;CAAA;AAEtC,MAAM,kBAAkB;OAAO;CAAO;CAAA;CAAA;CAAA;CAAA;AAEtC,MAAM,iBAAc;OAAA;CAAA;CAAA;CAAA;OAAA;OAAA;CAAA;OAAA;CAAA;CAAA;CAAA;OAAA;CAAA;CAAA;CAAA;CAAA;CAAA;CAAA;CAAA;AAEpB,MAAM,6BAAQ;OAAA;OAAA;CAAA;CAAA;CAAA;CAAA;AAEd,MAAM,+BAAc;OAAA;OAAA;CAAA;CAAA;CAAA;CAAA;AAEpB,MAAM,2BAAgB;OAAA;OAAA;CAAA;CAAA;CAAA;CAAA;CAAA;OAAA;OAAA;CAAA;OAAA;CAAA;CAAA;OAAA;CAAA;CAAA;CAAA;CAAA;CAAA;CAAA;CAAA;AAEtB,MAAM,cAAc;CAAC;CAAC;CAAA;CAAA;CAAA;CAAA;CAAA;AAEtB,MAAM,4BAAS,CAAA,0BAAA,UAAA;AAEf,MAAM,mBAAmB;OAAE;CAAA;OAAA;OAAA;CAAA;OAAA;CAAA;CAAA;CAAA;CAAA;CAAA"}
|
package/dist/types/config.cjs
CHANGED
|
@@ -46,12 +46,11 @@ const __ΩBuildOptions = [
|
|
|
46
46
|
"mode",
|
|
47
47
|
"skipCache",
|
|
48
48
|
"autoInstall",
|
|
49
|
-
"entry",
|
|
50
49
|
"plugins",
|
|
51
50
|
"tsconfig",
|
|
52
51
|
"tsconfigRaw",
|
|
53
52
|
"BuildOptions",
|
|
54
|
-
"!P.\".#.$.%.&.'.(.)
|
|
53
|
+
"!P.\".#.$.%.&.'.(.).*.+.,Jo!#w-y"
|
|
55
54
|
];
|
|
56
55
|
const __ΩBaseOptions = [
|
|
57
56
|
() => __ΩPartial,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.cjs","names":[],"sources":["../../src/types/config.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 { AutoMDPluginResolvedConfig } from \"@powerlines/plugin-automd/types/plugin\";\nimport type {\n NodeJsPluginOptions,\n NodeJsPluginResolvedConfig,\n NodeJsPluginUserConfig\n} from \"@powerlines/plugin-nodejs/types/plugin\";\nimport type {\n TsdownPluginResolvedConfig,\n TsdownPluginUserConfig\n} from \"@powerlines/plugin-tsdown/types/plugin\";\nimport type { OutputConfig as PowerlinesOutputConfig } from \"powerlines
|
|
1
|
+
{"version":3,"file":"config.cjs","names":[],"sources":["../../src/types/config.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 { AutoMDPluginResolvedConfig } from \"@powerlines/plugin-automd/types/plugin\";\nimport type {\n NodeJsPluginOptions,\n NodeJsPluginResolvedConfig,\n NodeJsPluginUserConfig\n} from \"@powerlines/plugin-nodejs/types/plugin\";\nimport type {\n TsdownPluginResolvedConfig,\n TsdownPluginUserConfig\n} from \"@powerlines/plugin-tsdown/types/plugin\";\nimport type { OutputConfig as PowerlinesOutputConfig } from \"powerlines\";\nimport type { CommandBase, CommandOption } from \"./command\";\nimport type { Context } from \"./context\";\n\ntype BuildOptions = Pick<\n TsdownPluginUserConfig,\n | \"root\"\n | \"name\"\n | \"title\"\n | \"description\"\n | \"logLevel\"\n | \"mode\"\n | \"skipCache\"\n | \"autoInstall\"\n | \"plugins\"\n | \"tsconfig\"\n | \"tsconfigRaw\"\n>;\n\ntype BaseOptions = Partial<BuildOptions> & {\n /**\n * A set of default command options to apply to each command.\n *\n * @remarks\n * To disable the addition of these default options, set this property to `false`, or provide a custom set of options/a function that returns them.\n */\n defaultOptions?:\n | CommandOption[]\n | ((context: Context, input: CommandBase) => CommandOption[])\n | false;\n\n /**\n * Determines whether commands and option names are treated as case-sensitive.\n *\n * @defaultValue `false`\n */\n isCaseSensitive?: boolean;\n\n /**\n * The name of the binary (the {@link https://docs.npmjs.com/cli/v11/configuring-npm/package-json#bin | \"bin\" field} in package.json) that will be used to run the application through NodeJs package managers (e.g., npm, yarn, pnpm).\n *\n * @remarks\n * If an array is provided, each binary will be linked to the same compiled output file. If not provided, the {@link Options.name | name} option will be used.\n *\n * @see https://docs.npmjs.com/cli/v11/configuring-npm/package-json#bin\n * @see https://yarnpkg.com/cli/bin\n * @see https://pnpm.io/package_json#bin\n */\n bin?: string | string[];\n\n /**\n * An application specific prefix to check for environment variables.\n *\n * @remarks\n * If not provided, Shell Shock will convert {@link Options.name | name} to {@link https://stringcase.org/cases/constant/ | constant case} format and append an underscore (`_`). If the provided {@link Options.name | name} is `\"my-app\"`, environment variables starting with `\"MY_APP_\"` will be used - for example: `\"MY_APP_CONFIG_NAME\"`. If a trailing underscore already exists in the user provided value, it will result in two consecutive underscores - for example: `\"MY_APP__CONFIG_NAME\"` (this was done intentionally so that users who specifically want multiple underscores have a way to do so).\n *\n * @see https://medium.com/chingu/an-introduction-to-environment-variables-and-how-to-use-them-f602f66d15fa\n * @see https://stringcase.org/cases/constant/\n */\n envPrefix?: string;\n};\n\n/**\n * The plugin options for Shell Shock.\n */\nexport type Options = BaseOptions & Partial<NodeJsPluginOptions>;\n\n/**\n * The output configuration options for Shell Shock.\n */\nexport type OutputConfig = Pick<\n PowerlinesOutputConfig,\n \"outputPath\" | \"assets\" | \"storage\"\n> & {\n /**\n * An indicator specifying whether to generate TypeScript declaration files (.d.ts) during the build process.\n */\n dts?: false;\n};\n\n/**\n * The user configuration options for Shell Shock.\n */\nexport type UserConfig = BaseOptions &\n Partial<NodeJsPluginUserConfig> & {\n /**\n * Configuration for the output of the build process\n */\n output?: OutputConfig;\n };\n\n/**\n * The resolved configuration options for Shell Shock.\n */\nexport type ResolvedConfig = TsdownPluginResolvedConfig &\n AutoMDPluginResolvedConfig &\n NodeJsPluginResolvedConfig &\n Required<Omit<Options, \"bin\">> & {\n /**\n * The name of the binary (the {@link https://docs.npmjs.com/cli/v11/configuring-npm/package-json#bin | \"bin\" field} in package.json) that will be used to run the application through NodeJs package managers (e.g., npm, yarn, pnpm).\n *\n * @remarks\n * If an array is provided, each binary will be linked to the same compiled output file. If not provided, the {@link Options.name | name} option will be used.\n *\n * @see https://docs.npmjs.com/cli/v11/configuring-npm/package-json#bin\n * @see https://yarnpkg.com/cli/bin\n * @see https://pnpm.io/package_json#bin\n */\n bin: Record<string, string>;\n\n /**\n * The user configuration for the Shell Shock process.\n */\n userConfig: UserConfig;\n };\n"],"mappings":";;AAAA,MAAM,UAAU;CAAC;CAAK;CAAK;CAAQ;CAA4B;;;;;;AAE/D,MAAM,cAAc;CAAC;CAAK;CAAY;CAAS;;;;;;;;;AAE/C,MAAM,YAAY;CAAC;CAAK;CAAK;CAAU;CAAyB;AAChE,MAAM,aAAa;CAAC;CAAK;CAAK;CAAW;CAA2B;AACpE,MAAM,kBAAkB;OAAO;CAAS;CAAQ;CAAQ;CAAS;CAAM;CAAA;CAAA;CAAA;CAAA;CAAA;CAAA;CAAA;CAAA;CAAA;AACvE,MAAM,iBAAiB;OAAO;OAAkB;CAAiB;CAAa;CAAA;CAAA;CAAA;CAAA;CAAA;CAAA;CAAA;CAAA;CAAA;CAAA;CAAA;CAAA;CAAA;;;;;;;AAG9E,MAAM,kBAAkB;OAAO;CAAS;CAAc;CAAU;CAAO;CAAA;CAAA;CAAA;CAAA;AAEvE,MAAM,gBAAgB;OAAO;OAAsB;OAAQ;CAAA;CAAA;CAAA;CAAA;AAE3D,MAAM,oBAAoB;OAAO;OAAG;OAAA;CAAA;OAAA;CAAA;OAAA;CAAA;CAAA;CAAA;CAAA"}
|
package/dist/types/config.d.cts
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { CommandBase, CommandOption } from "./command.cjs";
|
|
2
2
|
import { Context } from "./context.cjs";
|
|
3
|
-
import { OutputConfig as OutputConfig$1 } from "powerlines
|
|
3
|
+
import { OutputConfig as OutputConfig$1 } from "powerlines";
|
|
4
4
|
import { AutoMDPluginResolvedConfig } from "@powerlines/plugin-automd/types/plugin";
|
|
5
5
|
import { NodeJsPluginOptions, NodeJsPluginResolvedConfig, NodeJsPluginUserConfig } from "@powerlines/plugin-nodejs/types/plugin";
|
|
6
6
|
import { TsdownPluginResolvedConfig, TsdownPluginUserConfig } from "@powerlines/plugin-tsdown/types/plugin";
|
|
7
7
|
|
|
8
8
|
//#region src/types/config.d.ts
|
|
9
|
-
type BuildOptions = Pick<TsdownPluginUserConfig, "root" | "name" | "title" | "description" | "logLevel" | "mode" | "skipCache" | "autoInstall" | "
|
|
9
|
+
type BuildOptions = Pick<TsdownPluginUserConfig, "root" | "name" | "title" | "description" | "logLevel" | "mode" | "skipCache" | "autoInstall" | "plugins" | "tsconfig" | "tsconfigRaw">;
|
|
10
10
|
type BaseOptions = Partial<BuildOptions> & {
|
|
11
11
|
/**
|
|
12
12
|
* A set of default command options to apply to each command.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.d.cts","names":[],"sources":["../../src/types/config.ts"],"sourcesContent":[],"mappings":";;;;;;;;KAgCK,YAAA,GAAe,KAClB;
|
|
1
|
+
{"version":3,"file":"config.d.cts","names":[],"sources":["../../src/types/config.ts"],"sourcesContent":[],"mappings":";;;;;;;;KAgCK,YAAA,GAAe,KAClB;KAcG,WAAA,GAAc,QAAQ;EAftB;AAAmB;;;;;EAwBS,cAAA,CAAA,EAD3B,aAC2B,EAAA,GAAA,CAAA,CAAA,OAAA,EAAhB,OAAgB,EAAA,KAAA,EAAA,WAAA,EAAA,GAAgB,aAAhB,EAAA,CAAA,GAAA,KAAA;EAAgB;;AAqCjD;;;EAAoC,eAAA,CAAA,EAAA,OAAA;EAAO;AAK3C;AAaA;;;;;;AAWA;;EACE,GAAA,CAAA,EAAA,MAAA,GAAA,MAAA,EAAA;EACA;;;;;;;;;;;;;;KA/BU,OAAA,GAAU,cAAc,QAAQ;;;;KAKhC,YAAA,GAAe,KACzB;;;;;;;;;KAYU,UAAA,GAAa,cACvB,QAAQ;;;;WAIG;;;;;KAMD,cAAA,GAAiB,6BAC3B,6BACA,6BACA,SAAS,KAAK;;;;;;;;;;;OAWP;;;;cAKO"}
|
package/dist/types/config.d.mts
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { CommandBase, CommandOption } from "./command.mjs";
|
|
2
2
|
import { Context } from "./context.mjs";
|
|
3
|
-
import { OutputConfig as OutputConfig$1 } from "powerlines
|
|
3
|
+
import { OutputConfig as OutputConfig$1 } from "powerlines";
|
|
4
4
|
import { AutoMDPluginResolvedConfig } from "@powerlines/plugin-automd/types/plugin";
|
|
5
5
|
import { NodeJsPluginOptions, NodeJsPluginResolvedConfig, NodeJsPluginUserConfig } from "@powerlines/plugin-nodejs/types/plugin";
|
|
6
6
|
import { TsdownPluginResolvedConfig, TsdownPluginUserConfig } from "@powerlines/plugin-tsdown/types/plugin";
|
|
7
7
|
|
|
8
8
|
//#region src/types/config.d.ts
|
|
9
|
-
type BuildOptions = Pick<TsdownPluginUserConfig, "root" | "name" | "title" | "description" | "logLevel" | "mode" | "skipCache" | "autoInstall" | "
|
|
9
|
+
type BuildOptions = Pick<TsdownPluginUserConfig, "root" | "name" | "title" | "description" | "logLevel" | "mode" | "skipCache" | "autoInstall" | "plugins" | "tsconfig" | "tsconfigRaw">;
|
|
10
10
|
type BaseOptions = Partial<BuildOptions> & {
|
|
11
11
|
/**
|
|
12
12
|
* A set of default command options to apply to each command.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.d.mts","names":[],"sources":["../../src/types/config.ts"],"sourcesContent":[],"mappings":";;;;;;;;KAgCK,YAAA,GAAe,KAClB;
|
|
1
|
+
{"version":3,"file":"config.d.mts","names":[],"sources":["../../src/types/config.ts"],"sourcesContent":[],"mappings":";;;;;;;;KAgCK,YAAA,GAAe,KAClB;KAcG,WAAA,GAAc,QAAQ;EAftB;AAAmB;;;;;EAwBS,cAAA,CAAA,EAD3B,aAC2B,EAAA,GAAA,CAAA,CAAA,OAAA,EAAhB,OAAgB,EAAA,KAAA,EAAA,WAAA,EAAA,GAAgB,aAAhB,EAAA,CAAA,GAAA,KAAA;EAAgB;;AAqCjD;;;EAAoC,eAAA,CAAA,EAAA,OAAA;EAAO;AAK3C;AAaA;;;;;;AAWA;;EACE,GAAA,CAAA,EAAA,MAAA,GAAA,MAAA,EAAA;EACA;;;;;;;;;;;;;;KA/BU,OAAA,GAAU,cAAc,QAAQ;;;;KAKhC,YAAA,GAAe,KACzB;;;;;;;;;KAYU,UAAA,GAAa,cACvB,QAAQ;;;;WAIG;;;;;KAMD,cAAA,GAAiB,6BAC3B,6BACA,6BACA,SAAS,KAAK;;;;;;;;;;;OAWP;;;;cAKO"}
|
package/dist/types/config.mjs
CHANGED
|
@@ -45,12 +45,11 @@ const __ΩBuildOptions = [
|
|
|
45
45
|
"mode",
|
|
46
46
|
"skipCache",
|
|
47
47
|
"autoInstall",
|
|
48
|
-
"entry",
|
|
49
48
|
"plugins",
|
|
50
49
|
"tsconfig",
|
|
51
50
|
"tsconfigRaw",
|
|
52
51
|
"BuildOptions",
|
|
53
|
-
"!P.\".#.$.%.&.'.(.)
|
|
52
|
+
"!P.\".#.$.%.&.'.(.).*.+.,Jo!#w-y"
|
|
54
53
|
];
|
|
55
54
|
const __ΩBaseOptions = [
|
|
56
55
|
() => __ΩPartial,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.mjs","names":[],"sources":["../../src/types/config.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 { AutoMDPluginResolvedConfig } from \"@powerlines/plugin-automd/types/plugin\";\nimport type {\n NodeJsPluginOptions,\n NodeJsPluginResolvedConfig,\n NodeJsPluginUserConfig\n} from \"@powerlines/plugin-nodejs/types/plugin\";\nimport type {\n TsdownPluginResolvedConfig,\n TsdownPluginUserConfig\n} from \"@powerlines/plugin-tsdown/types/plugin\";\nimport type { OutputConfig as PowerlinesOutputConfig } from \"powerlines
|
|
1
|
+
{"version":3,"file":"config.mjs","names":[],"sources":["../../src/types/config.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 { AutoMDPluginResolvedConfig } from \"@powerlines/plugin-automd/types/plugin\";\nimport type {\n NodeJsPluginOptions,\n NodeJsPluginResolvedConfig,\n NodeJsPluginUserConfig\n} from \"@powerlines/plugin-nodejs/types/plugin\";\nimport type {\n TsdownPluginResolvedConfig,\n TsdownPluginUserConfig\n} from \"@powerlines/plugin-tsdown/types/plugin\";\nimport type { OutputConfig as PowerlinesOutputConfig } from \"powerlines\";\nimport type { CommandBase, CommandOption } from \"./command\";\nimport type { Context } from \"./context\";\n\ntype BuildOptions = Pick<\n TsdownPluginUserConfig,\n | \"root\"\n | \"name\"\n | \"title\"\n | \"description\"\n | \"logLevel\"\n | \"mode\"\n | \"skipCache\"\n | \"autoInstall\"\n | \"plugins\"\n | \"tsconfig\"\n | \"tsconfigRaw\"\n>;\n\ntype BaseOptions = Partial<BuildOptions> & {\n /**\n * A set of default command options to apply to each command.\n *\n * @remarks\n * To disable the addition of these default options, set this property to `false`, or provide a custom set of options/a function that returns them.\n */\n defaultOptions?:\n | CommandOption[]\n | ((context: Context, input: CommandBase) => CommandOption[])\n | false;\n\n /**\n * Determines whether commands and option names are treated as case-sensitive.\n *\n * @defaultValue `false`\n */\n isCaseSensitive?: boolean;\n\n /**\n * The name of the binary (the {@link https://docs.npmjs.com/cli/v11/configuring-npm/package-json#bin | \"bin\" field} in package.json) that will be used to run the application through NodeJs package managers (e.g., npm, yarn, pnpm).\n *\n * @remarks\n * If an array is provided, each binary will be linked to the same compiled output file. If not provided, the {@link Options.name | name} option will be used.\n *\n * @see https://docs.npmjs.com/cli/v11/configuring-npm/package-json#bin\n * @see https://yarnpkg.com/cli/bin\n * @see https://pnpm.io/package_json#bin\n */\n bin?: string | string[];\n\n /**\n * An application specific prefix to check for environment variables.\n *\n * @remarks\n * If not provided, Shell Shock will convert {@link Options.name | name} to {@link https://stringcase.org/cases/constant/ | constant case} format and append an underscore (`_`). If the provided {@link Options.name | name} is `\"my-app\"`, environment variables starting with `\"MY_APP_\"` will be used - for example: `\"MY_APP_CONFIG_NAME\"`. If a trailing underscore already exists in the user provided value, it will result in two consecutive underscores - for example: `\"MY_APP__CONFIG_NAME\"` (this was done intentionally so that users who specifically want multiple underscores have a way to do so).\n *\n * @see https://medium.com/chingu/an-introduction-to-environment-variables-and-how-to-use-them-f602f66d15fa\n * @see https://stringcase.org/cases/constant/\n */\n envPrefix?: string;\n};\n\n/**\n * The plugin options for Shell Shock.\n */\nexport type Options = BaseOptions & Partial<NodeJsPluginOptions>;\n\n/**\n * The output configuration options for Shell Shock.\n */\nexport type OutputConfig = Pick<\n PowerlinesOutputConfig,\n \"outputPath\" | \"assets\" | \"storage\"\n> & {\n /**\n * An indicator specifying whether to generate TypeScript declaration files (.d.ts) during the build process.\n */\n dts?: false;\n};\n\n/**\n * The user configuration options for Shell Shock.\n */\nexport type UserConfig = BaseOptions &\n Partial<NodeJsPluginUserConfig> & {\n /**\n * Configuration for the output of the build process\n */\n output?: OutputConfig;\n };\n\n/**\n * The resolved configuration options for Shell Shock.\n */\nexport type ResolvedConfig = TsdownPluginResolvedConfig &\n AutoMDPluginResolvedConfig &\n NodeJsPluginResolvedConfig &\n Required<Omit<Options, \"bin\">> & {\n /**\n * The name of the binary (the {@link https://docs.npmjs.com/cli/v11/configuring-npm/package-json#bin | \"bin\" field} in package.json) that will be used to run the application through NodeJs package managers (e.g., npm, yarn, pnpm).\n *\n * @remarks\n * If an array is provided, each binary will be linked to the same compiled output file. If not provided, the {@link Options.name | name} option will be used.\n *\n * @see https://docs.npmjs.com/cli/v11/configuring-npm/package-json#bin\n * @see https://yarnpkg.com/cli/bin\n * @see https://pnpm.io/package_json#bin\n */\n bin: Record<string, string>;\n\n /**\n * The user configuration for the Shell Shock process.\n */\n userConfig: UserConfig;\n };\n"],"mappings":";AAAA,MAAM,UAAU;CAAC;CAAK;CAAK;CAAQ;CAA4B;;;;;;AAE/D,MAAM,cAAc;CAAC;CAAK;CAAY;CAAS;;;;;;;;;AAE/C,MAAM,YAAY;CAAC;CAAK;CAAK;CAAU;CAAyB;AAChE,MAAM,aAAa;CAAC;CAAK;CAAK;CAAW;CAA2B;AACpE,MAAM,kBAAkB;OAAO;CAAS;CAAQ;CAAQ;CAAS;CAAM;CAAA;CAAA;CAAA;CAAA;CAAA;CAAA;CAAA;CAAA;CAAA;AACvE,MAAM,iBAAiB;OAAO;OAAkB;CAAiB;CAAa;CAAA;CAAA;CAAA;CAAA;CAAA;CAAA;CAAA;CAAA;CAAA;CAAA;CAAA;CAAA;CAAA;;;;;;;AAG9E,MAAM,kBAAkB;OAAO;CAAS;CAAc;CAAU;CAAO;CAAA;CAAA;CAAA;CAAA;AAEvE,MAAM,gBAAgB;OAAO;OAAsB;OAAQ;CAAA;CAAA;CAAA;CAAA;AAE3D,MAAM,oBAAoB;OAAO;OAAG;OAAA;CAAA;OAAA;CAAA;OAAA;CAAA;CAAA;CAAA;CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"context.cjs","names":[],"sources":["../../src/types/context.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 { NodeJsPluginContext } from \"@powerlines/plugin-nodejs/types/plugin\";\nimport type { TsdownPluginContext } from \"@powerlines/plugin-tsdown/types/plugin\";\nimport type { UnresolvedContext as PowerlinesUnresolvedContext } from \"powerlines
|
|
1
|
+
{"version":3,"file":"context.cjs","names":[],"sources":["../../src/types/context.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 { NodeJsPluginContext } from \"@powerlines/plugin-nodejs/types/plugin\";\nimport type { TsdownPluginContext } from \"@powerlines/plugin-tsdown/types/plugin\";\nimport type { UnresolvedContext as PowerlinesUnresolvedContext } from \"powerlines\";\nimport type { CommandInput, CommandOption, CommandTree } from \"./command\";\nimport type { ResolvedConfig } from \"./config\";\n\nexport type Context<TResolvedConfig extends ResolvedConfig = ResolvedConfig> =\n TsdownPluginContext<TResolvedConfig> &\n NodeJsPluginContext<TResolvedConfig> & {\n /**\n * The root path where commands are located.\n */\n commandsPath: string;\n\n /**\n * The default command arguments to apply to all application commands.\n */\n options: CommandOption[];\n\n /**\n * The list of commands discovered in the project.\n */\n inputs: CommandInput[];\n\n /**\n * The command-line application structure.\n */\n commands: Record<string, CommandTree>;\n };\n\nexport type UnresolvedContext<\n TResolvedConfig extends ResolvedConfig = ResolvedConfig\n> = PowerlinesUnresolvedContext<TResolvedConfig>;\n"],"mappings":";;AAAA,MAAM,YAAY;CAAC;CAAK;CAAK;CAAU;CAAyB"}
|
package/dist/types/context.d.cts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { CommandInput, CommandOption, CommandTree } from "./command.cjs";
|
|
2
2
|
import { ResolvedConfig } from "./config.cjs";
|
|
3
|
+
import { UnresolvedContext as UnresolvedContext$1 } from "powerlines";
|
|
3
4
|
import { NodeJsPluginContext } from "@powerlines/plugin-nodejs/types/plugin";
|
|
4
5
|
import { TsdownPluginContext } from "@powerlines/plugin-tsdown/types/plugin";
|
|
5
|
-
import { UnresolvedContext as UnresolvedContext$1 } from "powerlines/types/context";
|
|
6
6
|
|
|
7
7
|
//#region src/types/context.d.ts
|
|
8
8
|
type Context<TResolvedConfig extends ResolvedConfig = ResolvedConfig> = TsdownPluginContext<TResolvedConfig> & NodeJsPluginContext<TResolvedConfig> & {
|
package/dist/types/context.d.mts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { CommandInput, CommandOption, CommandTree } from "./command.mjs";
|
|
2
2
|
import { ResolvedConfig } from "./config.mjs";
|
|
3
|
+
import { UnresolvedContext as UnresolvedContext$1 } from "powerlines";
|
|
3
4
|
import { NodeJsPluginContext } from "@powerlines/plugin-nodejs/types/plugin";
|
|
4
5
|
import { TsdownPluginContext } from "@powerlines/plugin-tsdown/types/plugin";
|
|
5
|
-
import { UnresolvedContext as UnresolvedContext$1 } from "powerlines/types/context";
|
|
6
6
|
|
|
7
7
|
//#region src/types/context.d.ts
|
|
8
8
|
type Context<TResolvedConfig extends ResolvedConfig = ResolvedConfig> = TsdownPluginContext<TResolvedConfig> & NodeJsPluginContext<TResolvedConfig> & {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"context.mjs","names":[],"sources":["../../src/types/context.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 { NodeJsPluginContext } from \"@powerlines/plugin-nodejs/types/plugin\";\nimport type { TsdownPluginContext } from \"@powerlines/plugin-tsdown/types/plugin\";\nimport type { UnresolvedContext as PowerlinesUnresolvedContext } from \"powerlines
|
|
1
|
+
{"version":3,"file":"context.mjs","names":[],"sources":["../../src/types/context.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 { NodeJsPluginContext } from \"@powerlines/plugin-nodejs/types/plugin\";\nimport type { TsdownPluginContext } from \"@powerlines/plugin-tsdown/types/plugin\";\nimport type { UnresolvedContext as PowerlinesUnresolvedContext } from \"powerlines\";\nimport type { CommandInput, CommandOption, CommandTree } from \"./command\";\nimport type { ResolvedConfig } from \"./config\";\n\nexport type Context<TResolvedConfig extends ResolvedConfig = ResolvedConfig> =\n TsdownPluginContext<TResolvedConfig> &\n NodeJsPluginContext<TResolvedConfig> & {\n /**\n * The root path where commands are located.\n */\n commandsPath: string;\n\n /**\n * The default command arguments to apply to all application commands.\n */\n options: CommandOption[];\n\n /**\n * The list of commands discovered in the project.\n */\n inputs: CommandInput[];\n\n /**\n * The command-line application structure.\n */\n commands: Record<string, CommandTree>;\n };\n\nexport type UnresolvedContext<\n TResolvedConfig extends ResolvedConfig = ResolvedConfig\n> = PowerlinesUnresolvedContext<TResolvedConfig>;\n"],"mappings":";AAAA,MAAM,YAAY;CAAC;CAAK;CAAK;CAAU;CAAyB"}
|
package/dist/types/index.cjs
CHANGED
|
@@ -15,6 +15,7 @@ exports.__ΩCommandContext = require_types_runtime.__ΩCommandContext;
|
|
|
15
15
|
exports.__ΩCommandInput = require_types_command.__ΩCommandInput;
|
|
16
16
|
exports.__ΩCommandModule = require_types_command.__ΩCommandModule;
|
|
17
17
|
exports.__ΩCommandOption = require_types_command.__ΩCommandOption;
|
|
18
|
+
exports.__ΩCommandParameterSchema = require_types_command.__ΩCommandParameterSchema;
|
|
18
19
|
exports.__ΩCommandTree = require_types_command.__ΩCommandTree;
|
|
19
20
|
exports.__ΩContext = require_types_context.__ΩContext;
|
|
20
21
|
exports.__ΩMetadata = require_types_command.__ΩMetadata;
|
package/dist/types/index.d.cts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { BaseCommandParameter, BooleanCommandArgument, BooleanCommandOption, BooleanCommandParameter, CommandArgument, CommandBase, CommandInput, CommandModule, CommandOption, CommandTree, Metadata, NumberCommandArgument, NumberCommandOption, NumberCommandParameter, SerializedCommandArgument, SerializedCommandOption, SerializedCommandTree, StringCommandArgument, StringCommandOption, StringCommandParameter } from "./command.cjs";
|
|
1
|
+
import { BaseCommandParameter, BooleanCommandArgument, BooleanCommandOption, BooleanCommandParameter, CommandArgument, CommandBase, CommandInput, CommandModule, CommandOption, CommandParameterSchema, CommandTree, Metadata, NumberCommandArgument, NumberCommandOption, NumberCommandParameter, SerializedCommandArgument, SerializedCommandOption, SerializedCommandTree, StringCommandArgument, StringCommandOption, StringCommandParameter } from "./command.cjs";
|
|
2
2
|
import { Context, UnresolvedContext } from "./context.cjs";
|
|
3
3
|
import { Options, OutputConfig, ResolvedConfig, UserConfig } from "./config.cjs";
|
|
4
4
|
import { BaseCommandOptions } from "./options.cjs";
|
|
5
5
|
import { CommandContext } from "./runtime.cjs";
|
|
6
|
-
export { BaseCommandOptions, BaseCommandParameter, BooleanCommandArgument, BooleanCommandOption, BooleanCommandParameter, CommandArgument, CommandBase, CommandContext, CommandInput, CommandModule, CommandOption, CommandTree, Context, Metadata, NumberCommandArgument, NumberCommandOption, NumberCommandParameter, Options, OutputConfig, ResolvedConfig, SerializedCommandArgument, SerializedCommandOption, SerializedCommandTree, StringCommandArgument, StringCommandOption, StringCommandParameter, UnresolvedContext, UserConfig };
|
|
6
|
+
export { BaseCommandOptions, BaseCommandParameter, BooleanCommandArgument, BooleanCommandOption, BooleanCommandParameter, CommandArgument, CommandBase, CommandContext, CommandInput, CommandModule, CommandOption, CommandParameterSchema, CommandTree, Context, Metadata, NumberCommandArgument, NumberCommandOption, NumberCommandParameter, Options, OutputConfig, ResolvedConfig, SerializedCommandArgument, SerializedCommandOption, SerializedCommandTree, StringCommandArgument, StringCommandOption, StringCommandParameter, UnresolvedContext, UserConfig };
|
package/dist/types/index.d.mts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { BaseCommandParameter, BooleanCommandArgument, BooleanCommandOption, BooleanCommandParameter, CommandArgument, CommandBase, CommandInput, CommandModule, CommandOption, CommandTree, Metadata, NumberCommandArgument, NumberCommandOption, NumberCommandParameter, SerializedCommandArgument, SerializedCommandOption, SerializedCommandTree, StringCommandArgument, StringCommandOption, StringCommandParameter } from "./command.mjs";
|
|
1
|
+
import { BaseCommandParameter, BooleanCommandArgument, BooleanCommandOption, BooleanCommandParameter, CommandArgument, CommandBase, CommandInput, CommandModule, CommandOption, CommandParameterSchema, CommandTree, Metadata, NumberCommandArgument, NumberCommandOption, NumberCommandParameter, SerializedCommandArgument, SerializedCommandOption, SerializedCommandTree, StringCommandArgument, StringCommandOption, StringCommandParameter } from "./command.mjs";
|
|
2
2
|
import { Context, UnresolvedContext } from "./context.mjs";
|
|
3
3
|
import { Options, OutputConfig, ResolvedConfig, UserConfig } from "./config.mjs";
|
|
4
4
|
import { BaseCommandOptions } from "./options.mjs";
|
|
5
5
|
import { CommandContext } from "./runtime.mjs";
|
|
6
|
-
export { BaseCommandOptions, BaseCommandParameter, BooleanCommandArgument, BooleanCommandOption, BooleanCommandParameter, CommandArgument, CommandBase, CommandContext, CommandInput, CommandModule, CommandOption, CommandTree, Context, Metadata, NumberCommandArgument, NumberCommandOption, NumberCommandParameter, Options, OutputConfig, ResolvedConfig, SerializedCommandArgument, SerializedCommandOption, SerializedCommandTree, StringCommandArgument, StringCommandOption, StringCommandParameter, UnresolvedContext, UserConfig };
|
|
6
|
+
export { BaseCommandOptions, BaseCommandParameter, BooleanCommandArgument, BooleanCommandOption, BooleanCommandParameter, CommandArgument, CommandBase, CommandContext, CommandInput, CommandModule, CommandOption, CommandParameterSchema, CommandTree, Context, Metadata, NumberCommandArgument, NumberCommandOption, NumberCommandParameter, Options, OutputConfig, ResolvedConfig, SerializedCommandArgument, SerializedCommandOption, SerializedCommandTree, StringCommandArgument, StringCommandOption, StringCommandParameter, UnresolvedContext, UserConfig };
|
package/dist/types/index.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { __ΩBaseCommandParameter, __ΩBooleanCommandArgument, __ΩBooleanCommandOption, __ΩBooleanCommandParameter, __ΩCommandArgument, __ΩCommandBase, __ΩCommandInput, __ΩCommandModule, __ΩCommandOption, __ΩCommandTree, __ΩMetadata, __ΩNumberCommandArgument, __ΩNumberCommandOption, __ΩNumberCommandParameter, __ΩSerializedCommandArgument, __ΩSerializedCommandOption, __ΩSerializedCommandTree, __ΩStringCommandArgument, __ΩStringCommandOption, __ΩStringCommandParameter } from "./command.mjs";
|
|
1
|
+
import { __ΩBaseCommandParameter, __ΩBooleanCommandArgument, __ΩBooleanCommandOption, __ΩBooleanCommandParameter, __ΩCommandArgument, __ΩCommandBase, __ΩCommandInput, __ΩCommandModule, __ΩCommandOption, __ΩCommandParameterSchema, __ΩCommandTree, __ΩMetadata, __ΩNumberCommandArgument, __ΩNumberCommandOption, __ΩNumberCommandParameter, __ΩSerializedCommandArgument, __ΩSerializedCommandOption, __ΩSerializedCommandTree, __ΩStringCommandArgument, __ΩStringCommandOption, __ΩStringCommandParameter } from "./command.mjs";
|
|
2
2
|
import { __ΩOptions, __ΩOutputConfig, __ΩResolvedConfig, __ΩUserConfig } from "./config.mjs";
|
|
3
3
|
import { __ΩContext, __ΩUnresolvedContext } from "./context.mjs";
|
|
4
4
|
import { __ΩBaseCommandOptions } from "./options.mjs";
|
|
5
5
|
import { __ΩCommandContext } from "./runtime.mjs";
|
|
6
6
|
|
|
7
|
-
export { __ΩBaseCommandOptions, __ΩBaseCommandParameter, __ΩBooleanCommandArgument, __ΩBooleanCommandOption, __ΩBooleanCommandParameter, __ΩCommandArgument, __ΩCommandBase, __ΩCommandContext, __ΩCommandInput, __ΩCommandModule, __ΩCommandOption, __ΩCommandTree, __ΩContext, __ΩMetadata, __ΩNumberCommandArgument, __ΩNumberCommandOption, __ΩNumberCommandParameter, __ΩOptions, __ΩOutputConfig, __ΩResolvedConfig, __ΩSerializedCommandArgument, __ΩSerializedCommandOption, __ΩSerializedCommandTree, __ΩStringCommandArgument, __ΩStringCommandOption, __ΩStringCommandParameter, __ΩUnresolvedContext, __ΩUserConfig };
|
|
7
|
+
export { __ΩBaseCommandOptions, __ΩBaseCommandParameter, __ΩBooleanCommandArgument, __ΩBooleanCommandOption, __ΩBooleanCommandParameter, __ΩCommandArgument, __ΩCommandBase, __ΩCommandContext, __ΩCommandInput, __ΩCommandModule, __ΩCommandOption, __ΩCommandParameterSchema, __ΩCommandTree, __ΩContext, __ΩMetadata, __ΩNumberCommandArgument, __ΩNumberCommandOption, __ΩNumberCommandParameter, __ΩOptions, __ΩOutputConfig, __ΩResolvedConfig, __ΩSerializedCommandArgument, __ΩSerializedCommandOption, __ΩSerializedCommandTree, __ΩStringCommandArgument, __ΩStringCommandOption, __ΩStringCommandParameter, __ΩUnresolvedContext, __ΩUserConfig };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@shell-shock/core",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.10.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "A package containing the core Shell Shock functionality used to build and manage a command-line application.",
|
|
6
6
|
"repository": {
|
|
@@ -55,6 +55,7 @@
|
|
|
55
55
|
"default": "./dist/index.mjs"
|
|
56
56
|
}
|
|
57
57
|
},
|
|
58
|
+
"./*": "./*",
|
|
58
59
|
"./api": {
|
|
59
60
|
"require": { "types": "./dist/api.d.cts", "default": "./dist/api.cjs" },
|
|
60
61
|
"import": { "types": "./dist/api.d.mts", "default": "./dist/api.mjs" },
|
|
@@ -200,7 +201,6 @@
|
|
|
200
201
|
"default": "./dist/contexts/options.mjs"
|
|
201
202
|
}
|
|
202
203
|
},
|
|
203
|
-
"./package.json": "./package.json",
|
|
204
204
|
"./plugin": {
|
|
205
205
|
"require": {
|
|
206
206
|
"types": "./dist/plugin.d.cts",
|
|
@@ -388,32 +388,38 @@
|
|
|
388
388
|
"typings": "dist/index.d.mts",
|
|
389
389
|
"files": ["dist/**/*"],
|
|
390
390
|
"keywords": ["shell-shock", "powerlines", "storm-software"],
|
|
391
|
+
"peerDependencies": { "zod": "^3.25.0 || ^4.0.0" },
|
|
392
|
+
"peerDependenciesMeta": { "zod": { "optional": true } },
|
|
391
393
|
"dependencies": {
|
|
392
394
|
"@alloy-js/core": "0.23.0-dev.8",
|
|
393
395
|
"@alloy-js/markdown": "0.23.0-dev.1",
|
|
394
396
|
"@alloy-js/typescript": "0.23.0-dev.4",
|
|
395
|
-
"@powerlines/deepkit": "^0.6.
|
|
396
|
-
"@powerlines/plugin-alloy": "^0.23.
|
|
397
|
-
"@powerlines/plugin-automd": "^0.1.
|
|
398
|
-
"@powerlines/plugin-deepkit": "^0.11.
|
|
399
|
-
"@powerlines/plugin-nodejs": "^0.1.
|
|
400
|
-
"@powerlines/plugin-
|
|
401
|
-
"@powerlines/plugin-tsdown": "^0.1.242",
|
|
397
|
+
"@powerlines/deepkit": "^0.6.88",
|
|
398
|
+
"@powerlines/plugin-alloy": "^0.23.40",
|
|
399
|
+
"@powerlines/plugin-automd": "^0.1.309",
|
|
400
|
+
"@powerlines/plugin-deepkit": "^0.11.188",
|
|
401
|
+
"@powerlines/plugin-nodejs": "^0.1.228",
|
|
402
|
+
"@powerlines/plugin-tsdown": "^0.1.260",
|
|
402
403
|
"@stryke/cli": "^0.13.15",
|
|
403
404
|
"@stryke/convert": "^0.6.40",
|
|
404
405
|
"@stryke/fs": "^0.33.43",
|
|
405
406
|
"@stryke/helpers": "^0.9.42",
|
|
406
407
|
"@stryke/json": "^0.9.43",
|
|
407
|
-
"@stryke/path": "0.26.6",
|
|
408
|
-
"@stryke/string-format": "0.14.2",
|
|
408
|
+
"@stryke/path": "^0.26.6",
|
|
409
|
+
"@stryke/string-format": "^0.14.2",
|
|
409
410
|
"@stryke/type-checks": "^0.5.25",
|
|
410
411
|
"@stryke/types": "^0.10.39",
|
|
411
412
|
"automd": "^0.4.3",
|
|
412
|
-
"defu": "6.1.4",
|
|
413
|
-
"powerlines": "^0.
|
|
414
|
-
"rolldown": "1.0.0-
|
|
413
|
+
"defu": "^6.1.4",
|
|
414
|
+
"powerlines": "^0.39.17",
|
|
415
|
+
"rolldown": "1.0.0-rc.6"
|
|
416
|
+
},
|
|
417
|
+
"devDependencies": {
|
|
418
|
+
"@powerlines/plugin-plugin": "^0.12.260",
|
|
419
|
+
"@types/node": "^25.3.3",
|
|
420
|
+
"typescript": "^5.9.3",
|
|
421
|
+
"zod": "^4.3.6"
|
|
415
422
|
},
|
|
416
|
-
"devDependencies": { "@types/node": "^25.3.1", "typescript": "^5.9.3" },
|
|
417
423
|
"publishConfig": { "access": "public" },
|
|
418
|
-
"gitHead": "
|
|
424
|
+
"gitHead": "d0abdaa95b5e40df2157d393f0ba8499589140ca"
|
|
419
425
|
}
|