@shell-shock/core 0.10.0 → 0.12.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/docs.cjs +4 -4
- package/dist/components/docs.cjs.map +1 -1
- package/dist/components/docs.d.cts +5 -5
- package/dist/components/docs.d.cts.map +1 -1
- package/dist/components/docs.d.mts +5 -5
- package/dist/components/docs.d.mts.map +1 -1
- package/dist/components/helpers.cjs +9 -0
- package/dist/components/helpers.cjs.map +1 -1
- package/dist/components/helpers.d.cts +15 -7
- package/dist/components/helpers.d.cts.map +1 -1
- package/dist/components/helpers.d.mts +15 -7
- package/dist/components/helpers.d.mts.map +1 -1
- package/dist/components/helpers.mjs +9 -1
- package/dist/components/helpers.mjs.map +1 -1
- package/dist/components/index.cjs +1 -0
- package/dist/components/index.d.cts +2 -2
- package/dist/components/index.d.mts +2 -2
- package/dist/components/index.mjs +2 -2
- package/dist/components/options-parser-logic.cjs +167 -87
- package/dist/components/options-parser-logic.cjs.map +1 -1
- package/dist/components/options-parser-logic.d.cts +15 -15
- package/dist/components/options-parser-logic.d.cts.map +1 -1
- package/dist/components/options-parser-logic.d.mts +15 -15
- package/dist/components/options-parser-logic.d.mts.map +1 -1
- package/dist/components/options-parser-logic.mjs +163 -83
- package/dist/components/options-parser-logic.mjs.map +1 -1
- package/dist/components/usage.cjs +5 -5
- package/dist/components/usage.cjs.map +1 -1
- package/dist/components/usage.d.cts +2 -2
- package/dist/components/usage.d.cts.map +1 -1
- package/dist/components/usage.d.mts +2 -2
- package/dist/components/usage.mjs +4 -4
- package/dist/components/usage.mjs.map +1 -1
- package/dist/components/utils-builtin.cjs +2 -2
- package/dist/components/utils-builtin.cjs.map +1 -1
- package/dist/components/utils-builtin.d.cts +9 -9
- package/dist/components/utils-builtin.d.cts.map +1 -1
- package/dist/components/utils-builtin.d.mts +9 -9
- package/dist/components/utils-builtin.d.mts.map +1 -1
- package/dist/components/utils-builtin.mjs +5 -5
- package/dist/components/utils-builtin.mjs.map +1 -1
- package/dist/contexts/options.cjs +2 -2
- package/dist/contexts/options.cjs.map +1 -1
- package/dist/contexts/options.d.cts +1 -1
- package/dist/contexts/options.d.cts.map +1 -1
- package/dist/contexts/options.d.mts +1 -1
- package/dist/contexts/options.d.mts.map +1 -1
- package/dist/contexts/options.mjs +4 -4
- package/dist/contexts/options.mjs.map +1 -1
- package/dist/helpers/automd.cjs +2 -2
- package/dist/helpers/automd.cjs.map +1 -1
- package/dist/helpers/automd.mjs.map +1 -1
- package/dist/helpers/paths.cjs +125 -0
- package/dist/helpers/paths.cjs.map +1 -0
- package/dist/helpers/paths.mjs +121 -0
- package/dist/helpers/paths.mjs.map +1 -0
- package/dist/helpers/persistence.cjs +68 -116
- package/dist/helpers/persistence.cjs.map +1 -1
- package/dist/helpers/persistence.mjs +68 -116
- package/dist/helpers/persistence.mjs.map +1 -1
- package/dist/helpers/update-package-json.cjs +4 -4
- package/dist/helpers/update-package-json.cjs.map +1 -1
- package/dist/helpers/utilities.cjs +1 -1
- package/dist/helpers/utilities.mjs +1 -1
- package/dist/helpers/validations.cjs +2 -3
- package/dist/helpers/validations.cjs.map +1 -1
- package/dist/helpers/validations.mjs +2 -2
- package/dist/helpers/validations.mjs.map +1 -1
- package/dist/index.cjs +14 -11
- package/dist/index.d.cts +2 -2
- package/dist/index.d.mts +2 -2
- package/dist/index.mjs +3 -3
- package/dist/plugin-utils/deepkit.cjs +72 -0
- package/dist/plugin-utils/deepkit.cjs.map +1 -0
- package/dist/plugin-utils/deepkit.d.cts +24 -0
- package/dist/plugin-utils/deepkit.d.cts.map +1 -0
- package/dist/plugin-utils/deepkit.d.mts +24 -0
- package/dist/plugin-utils/deepkit.d.mts.map +1 -0
- package/dist/plugin-utils/deepkit.mjs +70 -0
- package/dist/plugin-utils/deepkit.mjs.map +1 -0
- package/dist/plugin-utils/description-helpers.cjs +105 -0
- package/dist/plugin-utils/description-helpers.cjs.map +1 -0
- package/dist/plugin-utils/description-helpers.d.cts +44 -0
- package/dist/plugin-utils/description-helpers.d.cts.map +1 -0
- package/dist/plugin-utils/description-helpers.d.mts +44 -0
- package/dist/plugin-utils/description-helpers.d.mts.map +1 -0
- package/dist/plugin-utils/description-helpers.mjs +101 -0
- package/dist/plugin-utils/description-helpers.mjs.map +1 -0
- package/dist/plugin-utils/get-command-tree.cjs +2 -2
- package/dist/plugin-utils/get-command-tree.cjs.map +1 -1
- package/dist/plugin-utils/index.cjs +32 -18
- package/dist/plugin-utils/index.d.cts +4 -1
- package/dist/plugin-utils/index.d.mts +4 -1
- package/dist/plugin-utils/index.mjs +4 -1
- package/dist/plugin-utils/reflect.cjs +4 -5
- package/dist/plugin-utils/reflect.cjs.map +1 -1
- package/dist/plugin-utils/reflect.mjs +4 -4
- package/dist/plugin-utils/reflect.mjs.map +1 -1
- package/dist/plugin-utils/type-checks.cjs +89 -0
- package/dist/plugin-utils/type-checks.cjs.map +1 -0
- package/dist/plugin-utils/type-checks.d.cts +42 -0
- package/dist/plugin-utils/type-checks.d.cts.map +1 -0
- package/dist/plugin-utils/type-checks.d.mts +42 -0
- package/dist/plugin-utils/type-checks.d.mts.map +1 -0
- package/dist/plugin-utils/type-checks.mjs +84 -0
- package/dist/plugin-utils/type-checks.mjs.map +1 -0
- package/dist/plugin.cjs +31 -29
- package/dist/plugin.cjs.map +1 -1
- package/dist/plugin.d.cts.map +1 -1
- package/dist/plugin.d.mts.map +1 -1
- package/dist/plugin.mjs +15 -13
- package/dist/plugin.mjs.map +1 -1
- package/dist/resolver/deepkit.cjs +132 -0
- package/dist/resolver/deepkit.cjs.map +1 -0
- package/dist/resolver/deepkit.mjs +131 -0
- package/dist/resolver/deepkit.mjs.map +1 -0
- package/dist/resolver/helpers.cjs +167 -0
- package/dist/resolver/helpers.cjs.map +1 -0
- package/dist/resolver/helpers.mjs +162 -0
- package/dist/resolver/helpers.mjs.map +1 -0
- package/dist/resolver/module.cjs +144 -0
- package/dist/resolver/module.cjs.map +1 -0
- package/dist/resolver/module.mjs +143 -0
- package/dist/resolver/module.mjs.map +1 -0
- package/dist/resolver/resolve.cjs +209 -0
- package/dist/resolver/resolve.cjs.map +1 -0
- package/dist/resolver/resolve.mjs +208 -0
- package/dist/resolver/resolve.mjs.map +1 -0
- package/dist/types/command.cjs +127 -104
- package/dist/types/command.cjs.map +1 -1
- package/dist/types/command.d.cts +39 -78
- package/dist/types/command.d.cts.map +1 -1
- package/dist/types/command.d.mts +39 -78
- package/dist/types/command.d.mts.map +1 -1
- package/dist/types/command.mjs +115 -95
- package/dist/types/command.mjs.map +1 -1
- package/dist/types/config.cjs +5 -3
- package/dist/types/config.cjs.map +1 -1
- package/dist/types/config.d.cts +7 -3
- package/dist/types/config.d.cts.map +1 -1
- package/dist/types/config.d.mts +7 -3
- package/dist/types/config.d.mts.map +1 -1
- package/dist/types/config.mjs +5 -3
- package/dist/types/config.mjs.map +1 -1
- package/dist/types/context.cjs +1 -1
- package/dist/types/context.cjs.map +1 -1
- package/dist/types/context.d.cts +2 -2
- package/dist/types/context.d.cts.map +1 -1
- package/dist/types/context.d.mts +2 -2
- package/dist/types/context.d.mts.map +1 -1
- package/dist/types/context.mjs +1 -1
- package/dist/types/context.mjs.map +1 -1
- package/dist/types/index.cjs +13 -10
- package/dist/types/index.d.cts +2 -2
- package/dist/types/index.d.mts +2 -2
- package/dist/types/index.mjs +2 -2
- package/package.json +24 -75
- package/dist/helpers/resolve-command.cjs +0 -430
- package/dist/helpers/resolve-command.cjs.map +0 -1
- package/dist/helpers/resolve-command.mjs +0 -425
- package/dist/helpers/resolve-command.mjs.map +0 -1
|
@@ -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\";\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 *
|
|
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 * Should Shell Shock attempt to automatically assign environment variables to manipulate default values for command options based on the option name?\n *\n * @remarks\n * If set to a string, Shell Shock will use the provided string as an application specific environment variable prefix, convert the option name to {@link https://stringcase.org/cases/constant/ | constant case}, and prepend the provided `string` value to determine the corresponding environment variable name. For example, if an option is named `\"configPath\"` and the `autoAssignEnv` is `\"MY_APP_\"`, Shell Shock will look for an environment variable named `\"MY_APP_CONFIG_PATH\"` and assign its value to the option if it exists. If set to `true`, Shell Shock will use a default environment variable prefix derived from the {@link Options.name | application name}.\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 autoAssignEnv?: true | 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 command-line application specific environment variable prefix used for automatically assigning environment variables to command options.\n */\n appSpecificEnvPrefix: 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;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;CAAA;OAAA;CAAA;CAAA;CAAA;CAAA"}
|
package/dist/types/config.d.cts
CHANGED
|
@@ -33,15 +33,15 @@ type BaseOptions = Partial<BuildOptions> & {
|
|
|
33
33
|
*/
|
|
34
34
|
bin?: string | string[];
|
|
35
35
|
/**
|
|
36
|
-
*
|
|
36
|
+
* Should Shell Shock attempt to automatically assign environment variables to manipulate default values for command options based on the option name?
|
|
37
37
|
*
|
|
38
38
|
* @remarks
|
|
39
|
-
* If
|
|
39
|
+
* If set to a string, Shell Shock will use the provided string as an application specific environment variable prefix, convert the option name to {@link https://stringcase.org/cases/constant/ | constant case}, and prepend the provided `string` value to determine the corresponding environment variable name. For example, if an option is named `"configPath"` and the `autoAssignEnv` is `"MY_APP_"`, Shell Shock will look for an environment variable named `"MY_APP_CONFIG_PATH"` and assign its value to the option if it exists. If set to `true`, Shell Shock will use a default environment variable prefix derived from the {@link Options.name | application name}.
|
|
40
40
|
*
|
|
41
41
|
* @see https://medium.com/chingu/an-introduction-to-environment-variables-and-how-to-use-them-f602f66d15fa
|
|
42
42
|
* @see https://stringcase.org/cases/constant/
|
|
43
43
|
*/
|
|
44
|
-
|
|
44
|
+
autoAssignEnv?: true | string;
|
|
45
45
|
};
|
|
46
46
|
/**
|
|
47
47
|
* The plugin options for Shell Shock.
|
|
@@ -80,6 +80,10 @@ type ResolvedConfig = TsdownPluginResolvedConfig & AutoMDPluginResolvedConfig &
|
|
|
80
80
|
* @see https://pnpm.io/package_json#bin
|
|
81
81
|
*/
|
|
82
82
|
bin: Record<string, string>;
|
|
83
|
+
/**
|
|
84
|
+
* The command-line application specific environment variable prefix used for automatically assigning environment variables to command options.
|
|
85
|
+
*/
|
|
86
|
+
appSpecificEnvPrefix: string;
|
|
83
87
|
/**
|
|
84
88
|
* The user configuration for the Shell Shock process.
|
|
85
89
|
*/
|
|
@@ -1 +1 @@
|
|
|
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
|
|
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;;;;;;;;cAUO"}
|
package/dist/types/config.d.mts
CHANGED
|
@@ -33,15 +33,15 @@ type BaseOptions = Partial<BuildOptions> & {
|
|
|
33
33
|
*/
|
|
34
34
|
bin?: string | string[];
|
|
35
35
|
/**
|
|
36
|
-
*
|
|
36
|
+
* Should Shell Shock attempt to automatically assign environment variables to manipulate default values for command options based on the option name?
|
|
37
37
|
*
|
|
38
38
|
* @remarks
|
|
39
|
-
* If
|
|
39
|
+
* If set to a string, Shell Shock will use the provided string as an application specific environment variable prefix, convert the option name to {@link https://stringcase.org/cases/constant/ | constant case}, and prepend the provided `string` value to determine the corresponding environment variable name. For example, if an option is named `"configPath"` and the `autoAssignEnv` is `"MY_APP_"`, Shell Shock will look for an environment variable named `"MY_APP_CONFIG_PATH"` and assign its value to the option if it exists. If set to `true`, Shell Shock will use a default environment variable prefix derived from the {@link Options.name | application name}.
|
|
40
40
|
*
|
|
41
41
|
* @see https://medium.com/chingu/an-introduction-to-environment-variables-and-how-to-use-them-f602f66d15fa
|
|
42
42
|
* @see https://stringcase.org/cases/constant/
|
|
43
43
|
*/
|
|
44
|
-
|
|
44
|
+
autoAssignEnv?: true | string;
|
|
45
45
|
};
|
|
46
46
|
/**
|
|
47
47
|
* The plugin options for Shell Shock.
|
|
@@ -80,6 +80,10 @@ type ResolvedConfig = TsdownPluginResolvedConfig & AutoMDPluginResolvedConfig &
|
|
|
80
80
|
* @see https://pnpm.io/package_json#bin
|
|
81
81
|
*/
|
|
82
82
|
bin: Record<string, string>;
|
|
83
|
+
/**
|
|
84
|
+
* The command-line application specific environment variable prefix used for automatically assigning environment variables to command options.
|
|
85
|
+
*/
|
|
86
|
+
appSpecificEnvPrefix: string;
|
|
83
87
|
/**
|
|
84
88
|
* The user configuration for the Shell Shock process.
|
|
85
89
|
*/
|
|
@@ -1 +1 @@
|
|
|
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
|
|
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;;;;;;;;cAUO"}
|
package/dist/types/config.mjs
CHANGED
|
@@ -65,9 +65,10 @@ const __ΩBaseOptions = [
|
|
|
65
65
|
"isCaseSensitive",
|
|
66
66
|
true,
|
|
67
67
|
"bin",
|
|
68
|
-
|
|
68
|
+
true,
|
|
69
|
+
"autoAssignEnv",
|
|
69
70
|
"BaseOptions",
|
|
70
|
-
"Pn\"o!\"PP\"w#FP\"w$2%\"w&2'\"w#F/(.)J4*8)4+8>,P&&FJ4-
|
|
71
|
+
"Pn\"o!\"PP\"w#FP\"w$2%\"w&2'\"w#F/(.)J4*8)4+8>,P&&FJ4-8P..&J4/8MKw0y"
|
|
71
72
|
];
|
|
72
73
|
const __ΩOptions = [
|
|
73
74
|
() => __ΩBaseOptions,
|
|
@@ -100,10 +101,11 @@ const __ΩResolvedConfig = [
|
|
|
100
101
|
"bin",
|
|
101
102
|
() => __ΩRecord,
|
|
102
103
|
"bin",
|
|
104
|
+
"appSpecificEnvPrefix",
|
|
103
105
|
() => __ΩUserConfig,
|
|
104
106
|
"userConfig",
|
|
105
107
|
"ResolvedConfig",
|
|
106
|
-
"P!!!n#.$o\"#o!\"P&&o%#4
|
|
108
|
+
"P!!!n#.$o\"#o!\"P&&o%#4&&4'n(4)MKw*y"
|
|
107
109
|
];
|
|
108
110
|
|
|
109
111
|
//#endregion
|
|
@@ -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\";\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 *
|
|
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 * Should Shell Shock attempt to automatically assign environment variables to manipulate default values for command options based on the option name?\n *\n * @remarks\n * If set to a string, Shell Shock will use the provided string as an application specific environment variable prefix, convert the option name to {@link https://stringcase.org/cases/constant/ | constant case}, and prepend the provided `string` value to determine the corresponding environment variable name. For example, if an option is named `\"configPath\"` and the `autoAssignEnv` is `\"MY_APP_\"`, Shell Shock will look for an environment variable named `\"MY_APP_CONFIG_PATH\"` and assign its value to the option if it exists. If set to `true`, Shell Shock will use a default environment variable prefix derived from the {@link Options.name | application name}.\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 autoAssignEnv?: true | 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 command-line application specific environment variable prefix used for automatically assigning environment variables to command options.\n */\n appSpecificEnvPrefix: 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;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;CAAA;OAAA;CAAA;CAAA;CAAA;CAAA"}
|
package/dist/types/context.cjs
CHANGED
|
@@ -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\";\nimport type {
|
|
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 { CommandConfig, 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: CommandConfig[];\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,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { CommandConfig, CommandOption, CommandTree } from "./command.cjs";
|
|
2
2
|
import { ResolvedConfig } from "./config.cjs";
|
|
3
3
|
import { UnresolvedContext as UnresolvedContext$1 } from "powerlines";
|
|
4
4
|
import { NodeJsPluginContext } from "@powerlines/plugin-nodejs/types/plugin";
|
|
@@ -17,7 +17,7 @@ type Context<TResolvedConfig extends ResolvedConfig = ResolvedConfig> = TsdownPl
|
|
|
17
17
|
/**
|
|
18
18
|
* The list of commands discovered in the project.
|
|
19
19
|
*/
|
|
20
|
-
inputs:
|
|
20
|
+
inputs: CommandConfig[];
|
|
21
21
|
/**
|
|
22
22
|
* The command-line application structure.
|
|
23
23
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"context.d.cts","names":[],"sources":["../../src/types/context.ts"],"sourcesContent":[],"mappings":";;;;;;;KAwBY,gCAAgC,iBAAiB,kBAC3D,oBAAoB,mBAClB,oBAAoB;;AAFxB;;EAA6D,YAAA,EAAA,MAAA;EACvC;;;EAClB,OAAA,EASW,aATX,EAAA;EASW;;;EAUC,MAAA,EALF,
|
|
1
|
+
{"version":3,"file":"context.d.cts","names":[],"sources":["../../src/types/context.ts"],"sourcesContent":[],"mappings":";;;;;;;KAwBY,gCAAgC,iBAAiB,kBAC3D,oBAAoB,mBAClB,oBAAoB;;AAFxB;;EAA6D,YAAA,EAAA,MAAA;EACvC;;;EAClB,OAAA,EASW,aATX,EAAA;EASW;;;EAUC,MAAA,EALF,aAKE,EAAA;EAAM;AAGtB;;EAC2C,QAAA,EAJ3B,MAI2B,CAAA,MAAA,EAJZ,WAIY,CAAA;CACX;AAA5B,KAFQ,iBAER,CAAA,wBADsB,cACtB,GADuC,cACvC,CAAA,GAAA,mBAAA,CAA4B,eAA5B,CAAA"}
|
package/dist/types/context.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { CommandConfig, CommandOption, CommandTree } from "./command.mjs";
|
|
2
2
|
import { ResolvedConfig } from "./config.mjs";
|
|
3
3
|
import { UnresolvedContext as UnresolvedContext$1 } from "powerlines";
|
|
4
4
|
import { NodeJsPluginContext } from "@powerlines/plugin-nodejs/types/plugin";
|
|
@@ -17,7 +17,7 @@ type Context<TResolvedConfig extends ResolvedConfig = ResolvedConfig> = TsdownPl
|
|
|
17
17
|
/**
|
|
18
18
|
* The list of commands discovered in the project.
|
|
19
19
|
*/
|
|
20
|
-
inputs:
|
|
20
|
+
inputs: CommandConfig[];
|
|
21
21
|
/**
|
|
22
22
|
* The command-line application structure.
|
|
23
23
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"context.d.mts","names":[],"sources":["../../src/types/context.ts"],"sourcesContent":[],"mappings":";;;;;;;KAwBY,gCAAgC,iBAAiB,kBAC3D,oBAAoB,mBAClB,oBAAoB;;AAFxB;;EAA6D,YAAA,EAAA,MAAA;EACvC;;;EAClB,OAAA,EASW,aATX,EAAA;EASW;;;EAUC,MAAA,EALF,
|
|
1
|
+
{"version":3,"file":"context.d.mts","names":[],"sources":["../../src/types/context.ts"],"sourcesContent":[],"mappings":";;;;;;;KAwBY,gCAAgC,iBAAiB,kBAC3D,oBAAoB,mBAClB,oBAAoB;;AAFxB;;EAA6D,YAAA,EAAA,MAAA;EACvC;;;EAClB,OAAA,EASW,aATX,EAAA;EASW;;;EAUC,MAAA,EALF,aAKE,EAAA;EAAM;AAGtB;;EAC2C,QAAA,EAJ3B,MAI2B,CAAA,MAAA,EAJZ,WAIY,CAAA;CACX;AAA5B,KAFQ,iBAER,CAAA,wBADsB,cACtB,GADuC,cACvC,CAAA,GAAA,mBAAA,CAA4B,eAA5B,CAAA"}
|
package/dist/types/context.mjs
CHANGED
|
@@ -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\";\nimport type {
|
|
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 { CommandConfig, 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: CommandConfig[];\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
|
@@ -4,32 +4,35 @@ const require_types_context = require('./context.cjs');
|
|
|
4
4
|
const require_types_options = require('./options.cjs');
|
|
5
5
|
const require_types_runtime = require('./runtime.cjs');
|
|
6
6
|
|
|
7
|
+
exports.CommandParameterKinds = require_types_command.CommandParameterKinds;
|
|
8
|
+
exports.__ΩAsCommandParameterConfig = require_types_command.__ΩAsCommandParameterConfig;
|
|
7
9
|
exports.__ΩBaseCommandOptions = require_types_options.__ΩBaseCommandOptions;
|
|
8
10
|
exports.__ΩBaseCommandParameter = require_types_command.__ΩBaseCommandParameter;
|
|
9
|
-
exports.__ΩBooleanCommandArgument = require_types_command.__ΩBooleanCommandArgument;
|
|
10
11
|
exports.__ΩBooleanCommandOption = require_types_command.__ΩBooleanCommandOption;
|
|
11
12
|
exports.__ΩBooleanCommandParameter = require_types_command.__ΩBooleanCommandParameter;
|
|
13
|
+
exports.__ΩBooleanCommandParameterConfig = require_types_command.__ΩBooleanCommandParameterConfig;
|
|
12
14
|
exports.__ΩCommandArgument = require_types_command.__ΩCommandArgument;
|
|
15
|
+
exports.__ΩCommandArgumentConfig = require_types_command.__ΩCommandArgumentConfig;
|
|
13
16
|
exports.__ΩCommandBase = require_types_command.__ΩCommandBase;
|
|
17
|
+
exports.__ΩCommandConfig = require_types_command.__ΩCommandConfig;
|
|
14
18
|
exports.__ΩCommandContext = require_types_runtime.__ΩCommandContext;
|
|
15
|
-
exports.__Ω
|
|
19
|
+
exports.__ΩCommandMetadata = require_types_command.__ΩCommandMetadata;
|
|
16
20
|
exports.__ΩCommandModule = require_types_command.__ΩCommandModule;
|
|
17
21
|
exports.__ΩCommandOption = require_types_command.__ΩCommandOption;
|
|
18
|
-
exports.__Ω
|
|
22
|
+
exports.__ΩCommandOptionConfig = require_types_command.__ΩCommandOptionConfig;
|
|
23
|
+
exports.__ΩCommandParameter = require_types_command.__ΩCommandParameter;
|
|
24
|
+
exports.__ΩCommandParameterConfig = require_types_command.__ΩCommandParameterConfig;
|
|
25
|
+
exports.__ΩCommandParameterKind = require_types_command.__ΩCommandParameterKind;
|
|
26
|
+
exports.__ΩCommandParameterType = require_types_command.__ΩCommandParameterType;
|
|
19
27
|
exports.__ΩCommandTree = require_types_command.__ΩCommandTree;
|
|
20
28
|
exports.__ΩContext = require_types_context.__ΩContext;
|
|
21
|
-
exports.__ΩMetadata = require_types_command.__ΩMetadata;
|
|
22
|
-
exports.__ΩNumberCommandArgument = require_types_command.__ΩNumberCommandArgument;
|
|
23
|
-
exports.__ΩNumberCommandOption = require_types_command.__ΩNumberCommandOption;
|
|
24
29
|
exports.__ΩNumberCommandParameter = require_types_command.__ΩNumberCommandParameter;
|
|
30
|
+
exports.__ΩNumberCommandParameterConfig = require_types_command.__ΩNumberCommandParameterConfig;
|
|
25
31
|
exports.__ΩOptions = require_types_config.__ΩOptions;
|
|
26
32
|
exports.__ΩOutputConfig = require_types_config.__ΩOutputConfig;
|
|
27
33
|
exports.__ΩResolvedConfig = require_types_config.__ΩResolvedConfig;
|
|
28
|
-
exports.__ΩSerializedCommandArgument = require_types_command.__ΩSerializedCommandArgument;
|
|
29
|
-
exports.__ΩSerializedCommandOption = require_types_command.__ΩSerializedCommandOption;
|
|
30
34
|
exports.__ΩSerializedCommandTree = require_types_command.__ΩSerializedCommandTree;
|
|
31
|
-
exports.__ΩStringCommandArgument = require_types_command.__ΩStringCommandArgument;
|
|
32
|
-
exports.__ΩStringCommandOption = require_types_command.__ΩStringCommandOption;
|
|
33
35
|
exports.__ΩStringCommandParameter = require_types_command.__ΩStringCommandParameter;
|
|
36
|
+
exports.__ΩStringCommandParameterConfig = require_types_command.__ΩStringCommandParameterConfig;
|
|
34
37
|
exports.__ΩUnresolvedContext = require_types_context.__ΩUnresolvedContext;
|
|
35
38
|
exports.__ΩUserConfig = require_types_config.__ΩUserConfig;
|
package/dist/types/index.d.cts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { AsCommandParameterConfig, BaseCommandParameter, BooleanCommandOption, BooleanCommandParameter, BooleanCommandParameterConfig, CommandArgument, CommandArgumentConfig, CommandBase, CommandConfig, CommandMetadata, CommandModule, CommandOption, CommandOptionConfig, CommandParameter, CommandParameterConfig, CommandParameterKind, CommandParameterKinds, CommandParameterType, CommandTree, NumberCommandParameter, NumberCommandParameterConfig, SerializedCommandTree, StringCommandParameter, StringCommandParameterConfig } 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,
|
|
6
|
+
export { AsCommandParameterConfig, BaseCommandOptions, BaseCommandParameter, BooleanCommandOption, BooleanCommandParameter, BooleanCommandParameterConfig, CommandArgument, CommandArgumentConfig, CommandBase, CommandConfig, CommandContext, CommandMetadata, CommandModule, CommandOption, CommandOptionConfig, CommandParameter, CommandParameterConfig, CommandParameterKind, CommandParameterKinds, CommandParameterType, CommandTree, Context, NumberCommandParameter, NumberCommandParameterConfig, Options, OutputConfig, ResolvedConfig, SerializedCommandTree, StringCommandParameter, StringCommandParameterConfig, UnresolvedContext, UserConfig };
|
package/dist/types/index.d.mts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { AsCommandParameterConfig, BaseCommandParameter, BooleanCommandOption, BooleanCommandParameter, BooleanCommandParameterConfig, CommandArgument, CommandArgumentConfig, CommandBase, CommandConfig, CommandMetadata, CommandModule, CommandOption, CommandOptionConfig, CommandParameter, CommandParameterConfig, CommandParameterKind, CommandParameterKinds, CommandParameterType, CommandTree, NumberCommandParameter, NumberCommandParameterConfig, SerializedCommandTree, StringCommandParameter, StringCommandParameterConfig } 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,
|
|
6
|
+
export { AsCommandParameterConfig, BaseCommandOptions, BaseCommandParameter, BooleanCommandOption, BooleanCommandParameter, BooleanCommandParameterConfig, CommandArgument, CommandArgumentConfig, CommandBase, CommandConfig, CommandContext, CommandMetadata, CommandModule, CommandOption, CommandOptionConfig, CommandParameter, CommandParameterConfig, CommandParameterKind, CommandParameterKinds, CommandParameterType, CommandTree, Context, NumberCommandParameter, NumberCommandParameterConfig, Options, OutputConfig, ResolvedConfig, SerializedCommandTree, StringCommandParameter, StringCommandParameterConfig, UnresolvedContext, UserConfig };
|
package/dist/types/index.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { __Ω
|
|
1
|
+
import { CommandParameterKinds, __ΩAsCommandParameterConfig, __ΩBaseCommandParameter, __ΩBooleanCommandOption, __ΩBooleanCommandParameter, __ΩBooleanCommandParameterConfig, __ΩCommandArgument, __ΩCommandArgumentConfig, __ΩCommandBase, __ΩCommandConfig, __ΩCommandMetadata, __ΩCommandModule, __ΩCommandOption, __ΩCommandOptionConfig, __ΩCommandParameter, __ΩCommandParameterConfig, __ΩCommandParameterKind, __ΩCommandParameterType, __ΩCommandTree, __ΩNumberCommandParameter, __ΩNumberCommandParameterConfig, __ΩSerializedCommandTree, __ΩStringCommandParameter, __ΩStringCommandParameterConfig } 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 { __Ω
|
|
7
|
+
export { CommandParameterKinds, __ΩAsCommandParameterConfig, __ΩBaseCommandOptions, __ΩBaseCommandParameter, __ΩBooleanCommandOption, __ΩBooleanCommandParameter, __ΩBooleanCommandParameterConfig, __ΩCommandArgument, __ΩCommandArgumentConfig, __ΩCommandBase, __ΩCommandConfig, __ΩCommandContext, __ΩCommandMetadata, __ΩCommandModule, __ΩCommandOption, __ΩCommandOptionConfig, __ΩCommandParameter, __ΩCommandParameterConfig, __ΩCommandParameterKind, __ΩCommandParameterType, __ΩCommandTree, __ΩContext, __ΩNumberCommandParameter, __ΩNumberCommandParameterConfig, __ΩOptions, __ΩOutputConfig, __ΩResolvedConfig, __ΩSerializedCommandTree, __ΩStringCommandParameter, __ΩStringCommandParameterConfig, __ΩUnresolvedContext, __ΩUserConfig };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@shell-shock/core",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.12.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": {
|
|
@@ -229,62 +229,6 @@
|
|
|
229
229
|
"default": "./dist/plugin-utils/index.mjs"
|
|
230
230
|
}
|
|
231
231
|
},
|
|
232
|
-
"./plugin-utils/context-helpers": {
|
|
233
|
-
"require": {
|
|
234
|
-
"types": "./dist/plugin-utils/context-helpers.d.cts",
|
|
235
|
-
"default": "./dist/plugin-utils/context-helpers.cjs"
|
|
236
|
-
},
|
|
237
|
-
"import": {
|
|
238
|
-
"types": "./dist/plugin-utils/context-helpers.d.mts",
|
|
239
|
-
"default": "./dist/plugin-utils/context-helpers.mjs"
|
|
240
|
-
},
|
|
241
|
-
"default": {
|
|
242
|
-
"types": "./dist/plugin-utils/context-helpers.d.mts",
|
|
243
|
-
"default": "./dist/plugin-utils/context-helpers.mjs"
|
|
244
|
-
}
|
|
245
|
-
},
|
|
246
|
-
"./plugin-utils/get-command-tree": {
|
|
247
|
-
"require": {
|
|
248
|
-
"types": "./dist/plugin-utils/get-command-tree.d.cts",
|
|
249
|
-
"default": "./dist/plugin-utils/get-command-tree.cjs"
|
|
250
|
-
},
|
|
251
|
-
"import": {
|
|
252
|
-
"types": "./dist/plugin-utils/get-command-tree.d.mts",
|
|
253
|
-
"default": "./dist/plugin-utils/get-command-tree.mjs"
|
|
254
|
-
},
|
|
255
|
-
"default": {
|
|
256
|
-
"types": "./dist/plugin-utils/get-command-tree.d.mts",
|
|
257
|
-
"default": "./dist/plugin-utils/get-command-tree.mjs"
|
|
258
|
-
}
|
|
259
|
-
},
|
|
260
|
-
"./plugin-utils/reflect": {
|
|
261
|
-
"require": {
|
|
262
|
-
"types": "./dist/plugin-utils/reflect.d.cts",
|
|
263
|
-
"default": "./dist/plugin-utils/reflect.cjs"
|
|
264
|
-
},
|
|
265
|
-
"import": {
|
|
266
|
-
"types": "./dist/plugin-utils/reflect.d.mts",
|
|
267
|
-
"default": "./dist/plugin-utils/reflect.mjs"
|
|
268
|
-
},
|
|
269
|
-
"default": {
|
|
270
|
-
"types": "./dist/plugin-utils/reflect.d.mts",
|
|
271
|
-
"default": "./dist/plugin-utils/reflect.mjs"
|
|
272
|
-
}
|
|
273
|
-
},
|
|
274
|
-
"./plugin-utils/traverse-command-tree": {
|
|
275
|
-
"require": {
|
|
276
|
-
"types": "./dist/plugin-utils/traverse-command-tree.d.cts",
|
|
277
|
-
"default": "./dist/plugin-utils/traverse-command-tree.cjs"
|
|
278
|
-
},
|
|
279
|
-
"import": {
|
|
280
|
-
"types": "./dist/plugin-utils/traverse-command-tree.d.mts",
|
|
281
|
-
"default": "./dist/plugin-utils/traverse-command-tree.mjs"
|
|
282
|
-
},
|
|
283
|
-
"default": {
|
|
284
|
-
"types": "./dist/plugin-utils/traverse-command-tree.d.mts",
|
|
285
|
-
"default": "./dist/plugin-utils/traverse-command-tree.mjs"
|
|
286
|
-
}
|
|
287
|
-
},
|
|
288
232
|
"./types": {
|
|
289
233
|
"require": {
|
|
290
234
|
"types": "./dist/types/index.d.cts",
|
|
@@ -394,32 +338,37 @@
|
|
|
394
338
|
"@alloy-js/core": "0.23.0-dev.8",
|
|
395
339
|
"@alloy-js/markdown": "0.23.0-dev.1",
|
|
396
340
|
"@alloy-js/typescript": "0.23.0-dev.4",
|
|
397
|
-
"@powerlines/deepkit": "^0.6.
|
|
398
|
-
"@powerlines/plugin-alloy": "^0.
|
|
399
|
-
"@powerlines/plugin-automd": "^0.1.
|
|
400
|
-
"@powerlines/plugin-deepkit": "^0.11.
|
|
401
|
-
"@powerlines/plugin-nodejs": "^0.1.
|
|
402
|
-
"@powerlines/plugin-tsdown": "^0.1.
|
|
403
|
-
"@
|
|
404
|
-
"@
|
|
405
|
-
"@stryke/
|
|
406
|
-
"@stryke/
|
|
407
|
-
"@stryke/
|
|
408
|
-
"@stryke/
|
|
409
|
-
"@stryke/
|
|
410
|
-
"@stryke/
|
|
411
|
-
"@stryke/
|
|
341
|
+
"@powerlines/deepkit": "^0.6.90",
|
|
342
|
+
"@powerlines/plugin-alloy": "^0.24.2",
|
|
343
|
+
"@powerlines/plugin-automd": "^0.1.311",
|
|
344
|
+
"@powerlines/plugin-deepkit": "^0.11.190",
|
|
345
|
+
"@powerlines/plugin-nodejs": "^0.1.231",
|
|
346
|
+
"@powerlines/plugin-tsdown": "^0.1.262",
|
|
347
|
+
"@standard-schema/spec": "^1.1.0",
|
|
348
|
+
"@standard-schema/utils": "^0.3.0",
|
|
349
|
+
"@stryke/cli": "^0.13.22",
|
|
350
|
+
"@stryke/convert": "^0.6.46",
|
|
351
|
+
"@stryke/fs": "^0.33.50",
|
|
352
|
+
"@stryke/helpers": "^0.9.48",
|
|
353
|
+
"@stryke/json": "^0.14.0",
|
|
354
|
+
"@stryke/path": "^0.26.12",
|
|
355
|
+
"@stryke/string-format": "^0.14.8",
|
|
356
|
+
"@stryke/type-checks": "^0.5.31",
|
|
357
|
+
"@stryke/types": "^0.10.45",
|
|
358
|
+
"@stryke/zod": "^0.3.1",
|
|
412
359
|
"automd": "^0.4.3",
|
|
413
360
|
"defu": "^6.1.4",
|
|
414
|
-
"
|
|
361
|
+
"json-schema": "^0.4.0",
|
|
362
|
+
"powerlines": "^0.39.19",
|
|
415
363
|
"rolldown": "1.0.0-rc.6"
|
|
416
364
|
},
|
|
417
365
|
"devDependencies": {
|
|
418
|
-
"@powerlines/plugin-plugin": "^0.12.
|
|
366
|
+
"@powerlines/plugin-plugin": "^0.12.262",
|
|
367
|
+
"@types/json-schema": "^7.0.15",
|
|
419
368
|
"@types/node": "^25.3.3",
|
|
420
369
|
"typescript": "^5.9.3",
|
|
421
370
|
"zod": "^4.3.6"
|
|
422
371
|
},
|
|
423
372
|
"publishConfig": { "access": "public" },
|
|
424
|
-
"gitHead": "
|
|
373
|
+
"gitHead": "c38d304433a296936fb8ca58aa138a0039918931"
|
|
425
374
|
}
|