@shell-shock/core 0.17.8 → 0.17.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/_virtual/_rolldown/runtime.cjs +29 -1
- package/dist/api.cjs +36 -1
- package/dist/api.cjs.map +1 -0
- package/dist/api.d.cts +2 -77
- package/dist/api.d.cts.map +1 -1
- package/dist/api.d.mts +2 -76
- package/dist/api.d.mts.map +1 -1
- package/dist/api.mjs +35 -1
- package/dist/api.mjs.map +1 -1
- package/dist/components/command-validation-logic.cjs +291 -1
- package/dist/components/command-validation-logic.cjs.map +1 -0
- package/dist/components/command-validation-logic.d.cts +1 -3
- package/dist/components/command-validation-logic.d.cts.map +1 -1
- package/dist/components/command-validation-logic.d.mts +1 -3
- package/dist/components/command-validation-logic.d.mts.map +1 -1
- package/dist/components/command-validation-logic.mjs +288 -1
- package/dist/components/command-validation-logic.mjs.map +1 -1
- package/dist/components/docs.cjs +265 -1
- package/dist/components/docs.cjs.map +1 -0
- package/dist/components/docs.d.cts +4 -5
- package/dist/components/docs.d.cts.map +1 -1
- package/dist/components/docs.d.mts +4 -5
- package/dist/components/docs.d.mts.map +1 -1
- package/dist/components/docs.mjs +256 -1
- package/dist/components/docs.mjs.map +1 -1
- package/dist/components/exec-builtin.cjs +429 -15
- package/dist/components/exec-builtin.cjs.map +1 -0
- package/dist/components/exec-builtin.d.cts +1 -2
- package/dist/components/exec-builtin.d.cts.map +1 -1
- package/dist/components/exec-builtin.d.mts +1 -2
- package/dist/components/exec-builtin.d.mts.map +1 -1
- package/dist/components/exec-builtin.mjs +424 -15
- package/dist/components/exec-builtin.mjs.map +1 -1
- package/dist/components/helpers.cjs +119 -1
- package/dist/components/helpers.cjs.map +1 -0
- package/dist/components/helpers.d.cts +6 -8
- package/dist/components/helpers.d.cts.map +1 -1
- package/dist/components/helpers.d.mts +6 -8
- package/dist/components/helpers.d.mts.map +1 -1
- package/dist/components/helpers.mjs +111 -1
- package/dist/components/helpers.mjs.map +1 -1
- package/dist/components/index.cjs +58 -1
- package/dist/components/index.mjs +10 -1
- package/dist/components/options-parser-logic.cjs +959 -5
- package/dist/components/options-parser-logic.cjs.map +1 -0
- package/dist/components/options-parser-logic.d.cts +8 -9
- package/dist/components/options-parser-logic.d.cts.map +1 -1
- package/dist/components/options-parser-logic.d.mts +8 -9
- package/dist/components/options-parser-logic.d.mts.map +1 -1
- package/dist/components/options-parser-logic.mjs +944 -5
- package/dist/components/options-parser-logic.mjs.map +1 -1
- package/dist/components/state-builtin.cjs +630 -8
- package/dist/components/state-builtin.cjs.map +1 -0
- package/dist/components/state-builtin.d.cts +4 -5
- package/dist/components/state-builtin.d.cts.map +1 -1
- package/dist/components/state-builtin.d.mts +4 -5
- package/dist/components/state-builtin.d.mts.map +1 -1
- package/dist/components/state-builtin.mjs +622 -8
- package/dist/components/state-builtin.mjs.map +1 -1
- package/dist/components/usage.cjs +116 -1
- package/dist/components/usage.cjs.map +1 -0
- package/dist/components/usage.d.cts +1 -2
- package/dist/components/usage.d.cts.map +1 -1
- package/dist/components/usage.d.mts +1 -2
- package/dist/components/usage.d.mts.map +1 -1
- package/dist/components/usage.mjs +113 -1
- package/dist/components/usage.mjs.map +1 -1
- package/dist/components/utils-builtin.cjs +839 -33
- package/dist/components/utils-builtin.cjs.map +1 -0
- package/dist/components/utils-builtin.d.cts +7 -8
- package/dist/components/utils-builtin.d.cts.map +1 -1
- package/dist/components/utils-builtin.d.mts +7 -8
- package/dist/components/utils-builtin.d.mts.map +1 -1
- package/dist/components/utils-builtin.mjs +828 -33
- package/dist/components/utils-builtin.mjs.map +1 -1
- package/dist/config.cjs +65 -1
- package/dist/config.cjs.map +1 -0
- package/dist/config.d.cts +29 -8
- package/dist/config.d.cts.map +1 -1
- package/dist/config.d.mts +29 -8
- package/dist/config.d.mts.map +1 -1
- package/dist/config.mjs +62 -1
- package/dist/config.mjs.map +1 -1
- package/dist/contexts/command.cjs +26 -1
- package/dist/contexts/command.cjs.map +1 -0
- package/dist/contexts/command.d.cts.map +1 -1
- package/dist/contexts/command.d.mts.map +1 -1
- package/dist/contexts/command.mjs +23 -1
- package/dist/contexts/command.mjs.map +1 -1
- package/dist/contexts/index.cjs +9 -1
- package/dist/contexts/index.mjs +4 -1
- package/dist/contexts/options.cjs +63 -1
- package/dist/contexts/options.cjs.map +1 -0
- package/dist/contexts/options.d.cts.map +1 -1
- package/dist/contexts/options.d.mts.map +1 -1
- package/dist/contexts/options.mjs +57 -1
- package/dist/contexts/options.mjs.map +1 -1
- package/dist/engine.cjs +138 -0
- package/dist/engine.cjs.map +1 -0
- package/dist/engine.d.cts +79 -0
- package/dist/engine.d.cts.map +1 -0
- package/dist/engine.d.mts +79 -0
- package/dist/engine.d.mts.map +1 -0
- package/dist/engine.mjs +136 -0
- package/dist/engine.mjs.map +1 -0
- package/dist/helpers/automd.cjs +70 -1
- package/dist/helpers/automd.cjs.map +1 -0
- package/dist/helpers/automd.mjs +69 -1
- package/dist/helpers/automd.mjs.map +1 -1
- package/dist/helpers/docs-helpers.cjs +23 -1
- package/dist/helpers/docs-helpers.cjs.map +1 -0
- package/dist/helpers/docs-helpers.mjs +22 -1
- package/dist/helpers/docs-helpers.mjs.map +1 -1
- package/dist/helpers/get-framework.cjs +24 -0
- package/dist/helpers/get-framework.cjs.map +1 -0
- package/dist/helpers/get-framework.mjs +24 -0
- package/dist/helpers/get-framework.mjs.map +1 -0
- package/dist/helpers/paths.cjs +137 -1
- package/dist/helpers/paths.cjs.map +1 -0
- package/dist/helpers/paths.mjs +133 -1
- package/dist/helpers/paths.mjs.map +1 -1
- package/dist/helpers/persistence.cjs +113 -1
- package/dist/helpers/persistence.cjs.map +1 -0
- package/dist/helpers/persistence.mjs +112 -1
- package/dist/helpers/persistence.mjs.map +1 -1
- package/dist/helpers/update-package-json.cjs +65 -1
- package/dist/helpers/update-package-json.cjs.map +1 -0
- package/dist/helpers/update-package-json.mjs +63 -1
- package/dist/helpers/update-package-json.mjs.map +1 -1
- package/dist/helpers/utilities.cjs +95 -1
- package/dist/helpers/utilities.cjs.map +1 -0
- package/dist/helpers/utilities.mjs +93 -1
- package/dist/helpers/utilities.mjs.map +1 -1
- package/dist/helpers/validations.cjs +71 -1
- package/dist/helpers/validations.cjs.map +1 -0
- package/dist/helpers/validations.mjs +69 -1
- package/dist/helpers/validations.mjs.map +1 -1
- package/dist/index.cjs +123 -1
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.cts +80 -5
- package/dist/index.d.cts.map +1 -0
- package/dist/index.d.mts +80 -5
- package/dist/index.d.mts.map +1 -0
- package/dist/index.mjs +119 -1
- package/dist/index.mjs.map +1 -0
- package/dist/package.cjs +12 -0
- package/dist/package.cjs.map +1 -0
- package/dist/package.mjs +6 -0
- package/dist/package.mjs.map +1 -0
- package/dist/plugin-utils/compute-bin.cjs +48 -1
- package/dist/plugin-utils/compute-bin.cjs.map +1 -0
- package/dist/plugin-utils/compute-bin.d.cts +2 -2
- package/dist/plugin-utils/compute-bin.d.cts.map +1 -1
- package/dist/plugin-utils/compute-bin.d.mts +2 -2
- package/dist/plugin-utils/compute-bin.d.mts.map +1 -1
- package/dist/plugin-utils/compute-bin.mjs +47 -1
- package/dist/plugin-utils/compute-bin.mjs.map +1 -1
- package/dist/plugin-utils/context-helpers.cjs +224 -1
- package/dist/plugin-utils/context-helpers.cjs.map +1 -0
- package/dist/plugin-utils/context-helpers.d.cts +4 -4
- package/dist/plugin-utils/context-helpers.d.cts.map +1 -1
- package/dist/plugin-utils/context-helpers.d.mts +4 -4
- package/dist/plugin-utils/context-helpers.d.mts.map +1 -1
- package/dist/plugin-utils/context-helpers.mjs +214 -1
- package/dist/plugin-utils/context-helpers.mjs.map +1 -1
- package/dist/plugin-utils/deepkit.cjs +70 -1
- package/dist/plugin-utils/deepkit.cjs.map +1 -0
- package/dist/plugin-utils/deepkit.d.cts +5 -5
- package/dist/plugin-utils/deepkit.d.cts.map +1 -1
- package/dist/plugin-utils/deepkit.d.mts +5 -5
- package/dist/plugin-utils/deepkit.d.mts.map +1 -1
- package/dist/plugin-utils/deepkit.mjs +68 -1
- package/dist/plugin-utils/deepkit.mjs.map +1 -1
- package/dist/plugin-utils/description-helpers.cjs +112 -2
- package/dist/plugin-utils/description-helpers.cjs.map +1 -0
- package/dist/plugin-utils/description-helpers.d.cts.map +1 -1
- package/dist/plugin-utils/description-helpers.d.mts.map +1 -1
- package/dist/plugin-utils/description-helpers.mjs +107 -2
- package/dist/plugin-utils/description-helpers.mjs.map +1 -1
- package/dist/plugin-utils/get-command-tree.cjs +118 -1
- package/dist/plugin-utils/get-command-tree.cjs.map +1 -0
- package/dist/plugin-utils/get-command-tree.d.cts.map +1 -1
- package/dist/plugin-utils/get-command-tree.d.mts.map +1 -1
- package/dist/plugin-utils/get-command-tree.mjs +114 -1
- package/dist/plugin-utils/get-command-tree.mjs.map +1 -1
- package/dist/plugin-utils/index.cjs +39 -1
- package/dist/plugin-utils/index.d.cts +2 -2
- package/dist/plugin-utils/index.d.mts +2 -2
- package/dist/plugin-utils/index.mjs +10 -1
- package/dist/plugin-utils/reflect.cjs +52 -1
- package/dist/plugin-utils/reflect.cjs.map +1 -0
- package/dist/plugin-utils/reflect.d.cts.map +1 -1
- package/dist/plugin-utils/reflect.d.mts.map +1 -1
- package/dist/plugin-utils/reflect.mjs +50 -1
- package/dist/plugin-utils/reflect.mjs.map +1 -1
- package/dist/plugin-utils/traverse-command-tree.cjs +65 -1
- package/dist/plugin-utils/traverse-command-tree.cjs.map +1 -0
- package/dist/plugin-utils/traverse-command-tree.d.cts.map +1 -1
- package/dist/plugin-utils/traverse-command-tree.d.mts.map +1 -1
- package/dist/plugin-utils/traverse-command-tree.mjs +62 -1
- package/dist/plugin-utils/traverse-command-tree.mjs.map +1 -1
- package/dist/plugin-utils/type-checks.cjs +222 -1
- package/dist/plugin-utils/type-checks.cjs.map +1 -0
- package/dist/plugin-utils/type-checks.d.cts +5 -5
- package/dist/plugin-utils/type-checks.d.cts.map +1 -1
- package/dist/plugin-utils/type-checks.d.mts +5 -5
- package/dist/plugin-utils/type-checks.d.mts.map +1 -1
- package/dist/plugin-utils/type-checks.mjs +217 -1
- package/dist/plugin-utils/type-checks.mjs.map +1 -1
- package/dist/plugin.cjs +495 -4
- package/dist/plugin.cjs.map +1 -0
- package/dist/plugin.d.cts.map +1 -1
- package/dist/plugin.d.mts.map +1 -1
- package/dist/plugin.mjs +488 -4
- package/dist/plugin.mjs.map +1 -1
- package/dist/resolver/helpers.cjs +182 -1
- package/dist/resolver/helpers.cjs.map +1 -0
- package/dist/resolver/helpers.mjs +178 -1
- package/dist/resolver/helpers.mjs.map +1 -1
- package/dist/resolver/resolve.cjs +479 -1
- package/dist/resolver/resolve.cjs.map +1 -0
- package/dist/resolver/resolve.mjs +478 -1
- package/dist/resolver/resolve.mjs.map +1 -1
- package/dist/types/command.cjs +402 -1
- package/dist/types/command.cjs.map +1 -0
- package/dist/types/command.d.cts +61 -119
- package/dist/types/command.d.cts.map +1 -1
- package/dist/types/command.d.mts +61 -119
- package/dist/types/command.d.mts.map +1 -1
- package/dist/types/command.mjs +367 -1
- package/dist/types/command.mjs.map +1 -1
- package/dist/types/config.cjs +175 -1
- package/dist/types/config.cjs.map +1 -0
- package/dist/types/config.d.cts +19 -12
- package/dist/types/config.d.cts.map +1 -1
- package/dist/types/config.d.mts +19 -12
- package/dist/types/config.d.mts.map +1 -1
- package/dist/types/config.mjs +163 -1
- package/dist/types/config.mjs.map +1 -1
- package/dist/types/context.cjs +45 -1
- package/dist/types/context.cjs.map +1 -0
- package/dist/types/context.d.cts +3 -2
- package/dist/types/context.d.cts.map +1 -1
- package/dist/types/context.d.mts +3 -2
- package/dist/types/context.d.mts.map +1 -1
- package/dist/types/context.mjs +40 -1
- package/dist/types/context.mjs.map +1 -1
- package/dist/types/env.cjs +53 -1
- package/dist/types/env.cjs.map +1 -0
- package/dist/types/env.d.cts +1 -1
- package/dist/types/env.d.cts.map +1 -1
- package/dist/types/env.d.mts +1 -1
- package/dist/types/env.d.mts.map +1 -1
- package/dist/types/env.mjs +50 -1
- package/dist/types/env.mjs.map +1 -1
- package/dist/types/index.cjs +53 -1
- package/dist/types/index.d.cts +4 -4
- package/dist/types/index.d.mts +4 -4
- package/dist/types/index.mjs +6 -1
- package/dist/types/options.cjs +13 -1
- package/dist/types/options.cjs.map +1 -0
- package/dist/types/options.d.cts.map +1 -1
- package/dist/types/options.d.mts.map +1 -1
- package/dist/types/options.mjs +10 -1
- package/dist/types/options.mjs.map +1 -1
- package/package.json +43 -34
- package/dist/resolver/deepkit.cjs +0 -1
- package/dist/resolver/deepkit.mjs +0 -2
- package/dist/resolver/deepkit.mjs.map +0 -1
- package/dist/resolver/module.cjs +0 -1
- package/dist/resolver/module.mjs +0 -2
- package/dist/resolver/module.mjs.map +0 -1
|
@@ -1 +1,182 @@
|
|
|
1
|
-
|
|
1
|
+
const require_context_helpers = require('../plugin-utils/context-helpers.cjs');
|
|
2
|
+
let _stryke_string_format_constant_case = require("@stryke/string-format/constant-case");
|
|
3
|
+
let _stryke_type_checks_is_set_string = require("@stryke/type-checks/is-set-string");
|
|
4
|
+
let defu = require("defu");
|
|
5
|
+
let _stryke_string_format_title_case = require("@stryke/string-format/title-case");
|
|
6
|
+
let _stryke_helpers_get_unique = require("@stryke/helpers/get-unique");
|
|
7
|
+
let _stryke_type_checks_is_string = require("@stryke/type-checks/is-string");
|
|
8
|
+
|
|
9
|
+
//#region src/resolver/helpers.ts
|
|
10
|
+
function __assignType(fn, args) {
|
|
11
|
+
fn.__type = args;
|
|
12
|
+
return fn;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* Resolves the description for a command option based on its reflection.
|
|
16
|
+
*
|
|
17
|
+
* @param name - The name of the command option.
|
|
18
|
+
* @param type - The reflection kind of the command option.
|
|
19
|
+
* @param required - Whether the command option is required.
|
|
20
|
+
* @param variadic - Whether the command option is variadic (i.e., an array).
|
|
21
|
+
* @param title - The title of the command option, if any.
|
|
22
|
+
* @param defaultValue - The default value of the command option, if any.
|
|
23
|
+
* @returns The resolved description for the command option.
|
|
24
|
+
*/
|
|
25
|
+
function resolveCommandOptionDescription(name, type, required = true, variadic = false, title, defaultValue) {
|
|
26
|
+
return `A${!required && !defaultValue ? "n optional" : ""} command-line ${type === "boolean" ? "flag" : "option"} that allows the user to ${type === "boolean" ? "set the" : variadic ? "specify custom" : "specify a custom"} ${title?.trim() || (0, _stryke_string_format_title_case.titleCase)(name)} ${type === "boolean" ? "indicator" : `${type === "number" ? "numeric" : "string"} value${variadic ? "s" : ""}`}.`;
|
|
27
|
+
}
|
|
28
|
+
resolveCommandOptionDescription.__type = [
|
|
29
|
+
"name",
|
|
30
|
+
"string",
|
|
31
|
+
"number",
|
|
32
|
+
"boolean",
|
|
33
|
+
"type",
|
|
34
|
+
"required",
|
|
35
|
+
"variadic",
|
|
36
|
+
"title",
|
|
37
|
+
"defaultValue",
|
|
38
|
+
"resolveCommandOptionDescription",
|
|
39
|
+
"Resolves the description for a command option based on its reflection.",
|
|
40
|
+
"P&2!P.\".#.$J2%\"2&\"2'&2(8\"2)8&/*?+"
|
|
41
|
+
];
|
|
42
|
+
/**
|
|
43
|
+
* Resolves the description for a command argument based on its reflection.
|
|
44
|
+
*
|
|
45
|
+
* @param name - The name of the command argument.
|
|
46
|
+
* @param type - The reflection kind of the command argument.
|
|
47
|
+
* @param required - Whether the command argument is required.
|
|
48
|
+
* @param variadic - Whether the command argument is variadic (i.e., an array).
|
|
49
|
+
* @param title - The title of the command argument, if any.
|
|
50
|
+
* @param defaultValue - The default value of the command argument, if any.
|
|
51
|
+
* @returns The resolved description for the command argument.
|
|
52
|
+
*/
|
|
53
|
+
function resolveCommandArgumentDescription(name, type, required = true, variadic = false, title, defaultValue) {
|
|
54
|
+
return `An${!required && !defaultValue ? " optional" : ""} argument that allows the user to ${type === "boolean" ? "set the" : variadic ? "specify custom" : "specify a custom"} ${title?.trim() || (0, _stryke_string_format_title_case.titleCase)(name)} ${type === "boolean" ? "indicator" : `${type === "number" ? "numeric" : "string"} value${variadic ? "s" : ""}`}.`;
|
|
55
|
+
}
|
|
56
|
+
resolveCommandArgumentDescription.__type = [
|
|
57
|
+
"name",
|
|
58
|
+
"string",
|
|
59
|
+
"number",
|
|
60
|
+
"boolean",
|
|
61
|
+
"type",
|
|
62
|
+
"required",
|
|
63
|
+
"variadic",
|
|
64
|
+
"title",
|
|
65
|
+
"defaultValue",
|
|
66
|
+
"resolveCommandArgumentDescription",
|
|
67
|
+
"Resolves the description for a command argument based on its reflection.",
|
|
68
|
+
"P&2!P.\".#.$J2%\"2&\"2'&2(8\"2)8&/*?+"
|
|
69
|
+
];
|
|
70
|
+
function applyOptionsDefaults(ctx) {
|
|
71
|
+
return Object.fromEntries(Object.entries(ctx.output.options).map(__assignType(([key, option]) => {
|
|
72
|
+
const name = option.name || key;
|
|
73
|
+
const title = option.title || (0, _stryke_string_format_title_case.titleCase)(name);
|
|
74
|
+
return [key, {
|
|
75
|
+
...option,
|
|
76
|
+
name,
|
|
77
|
+
title,
|
|
78
|
+
description: option.description || resolveCommandOptionDescription(name, option.type, option.required, option.type !== "boolean" && option.variadic, title, option.default),
|
|
79
|
+
env: option.env || option.env === false ? option.env : ctx.input.context.config.autoAssignEnv ? (0, _stryke_string_format_constant_case.constantCase)(name) : false
|
|
80
|
+
}];
|
|
81
|
+
}, [
|
|
82
|
+
"param0",
|
|
83
|
+
"",
|
|
84
|
+
"P\"2!\"/\""
|
|
85
|
+
])));
|
|
86
|
+
}
|
|
87
|
+
applyOptionsDefaults.__type = [
|
|
88
|
+
"ResolverContext",
|
|
89
|
+
"ctx",
|
|
90
|
+
"applyOptionsDefaults",
|
|
91
|
+
"P\"w!2\"\"/#"
|
|
92
|
+
];
|
|
93
|
+
function applyArgsDefaults(ctx) {
|
|
94
|
+
return ctx.output.args.map(__assignType((arg, i) => {
|
|
95
|
+
const name = arg.name || `arg${i + 1}`;
|
|
96
|
+
const title = arg.title || (0, _stryke_string_format_title_case.titleCase)(name);
|
|
97
|
+
return {
|
|
98
|
+
...arg,
|
|
99
|
+
name,
|
|
100
|
+
title,
|
|
101
|
+
description: arg.description || resolveCommandArgumentDescription(name, arg.type, arg.required, arg.type !== "boolean" && arg.variadic, title, arg.default),
|
|
102
|
+
env: arg.name ? arg.env || arg.env === false ? arg.env : ctx.input.context.config.autoAssignEnv ? (0, _stryke_string_format_constant_case.constantCase)(name) : false : false
|
|
103
|
+
};
|
|
104
|
+
}, [
|
|
105
|
+
"arg",
|
|
106
|
+
"i",
|
|
107
|
+
"",
|
|
108
|
+
"P\"2!\"2\"\"/#"
|
|
109
|
+
]));
|
|
110
|
+
}
|
|
111
|
+
applyArgsDefaults.__type = [
|
|
112
|
+
"ResolverContext",
|
|
113
|
+
"ctx",
|
|
114
|
+
"CommandArgument",
|
|
115
|
+
"applyArgsDefaults",
|
|
116
|
+
"P\"w!2\"\"w#F/$"
|
|
117
|
+
];
|
|
118
|
+
function applyDefaults(ctx) {
|
|
119
|
+
ctx.output.description ??= `The ${ctx.output.title.replace(/(?:c|C)ommands?$/, "").trim()} executable command-line interface.`;
|
|
120
|
+
if ((0, _stryke_type_checks_is_set_string.isSetString)(ctx.input.context.config.reference?.commands) && ctx.input.context.config.reference.commands.includes("{command}")) ctx.output.docs ??= ctx.input.context.config.reference.commands ? ctx.input.context.config.reference.commands.replace("{command}", ctx.input.command.segments.filter(__assignType((segment) => !require_context_helpers.isDynamicPathSegment(segment), [
|
|
121
|
+
"segment",
|
|
122
|
+
"",
|
|
123
|
+
"P\"2!\"/\""
|
|
124
|
+
])).join("/")) : void 0;
|
|
125
|
+
}
|
|
126
|
+
applyDefaults.__type = [
|
|
127
|
+
"ResolverContext",
|
|
128
|
+
"ctx",
|
|
129
|
+
"applyDefaults",
|
|
130
|
+
"P\"w!2\"\"/#"
|
|
131
|
+
];
|
|
132
|
+
/**
|
|
133
|
+
* Resolves a virtual command by applying default values to its title and description based on the command name and application title.
|
|
134
|
+
*
|
|
135
|
+
* @template TContext - The type of the context object.
|
|
136
|
+
* @param ctx - The resolver context containing the input and output for the command resolution process.
|
|
137
|
+
*/
|
|
138
|
+
function resolveVirtualCommand(ctx) {
|
|
139
|
+
ctx.output.title ??= (0, _stryke_string_format_title_case.titleCase)(ctx.input.command.name);
|
|
140
|
+
ctx.output.description ??= `A collection of available ${ctx.output.title.replace(/(?:c|C)ommands?$/, "").trim() || (0, _stryke_string_format_title_case.titleCase)(ctx.input.command.name)} commands that are included in the ${require_context_helpers.getAppTitle(ctx.input.context, true)} command-line application.`;
|
|
141
|
+
}
|
|
142
|
+
resolveVirtualCommand.__type = [
|
|
143
|
+
"ResolverContext",
|
|
144
|
+
"ctx",
|
|
145
|
+
"resolveVirtualCommand",
|
|
146
|
+
"Resolves a virtual command by applying default values to its title and description based on the command name and application title.",
|
|
147
|
+
"P\"w!2\"\"/#?$"
|
|
148
|
+
];
|
|
149
|
+
/**
|
|
150
|
+
* Merges two command parameters, giving precedence to string values in the second configuration.
|
|
151
|
+
*
|
|
152
|
+
* @param objA - The first command parameter object.
|
|
153
|
+
* @param objB - The second command parameter object.
|
|
154
|
+
* @returns The merged command parameter object.
|
|
155
|
+
*/
|
|
156
|
+
const mergeCommandParameter = (0, defu.createDefu)(__assignType((obj, key, value) => {
|
|
157
|
+
if ((0, _stryke_type_checks_is_string.isString)(obj[key]) && (0, _stryke_type_checks_is_string.isString)(value)) {
|
|
158
|
+
if ((0, _stryke_type_checks_is_set_string.isSetString)(value)) obj[key] = value;
|
|
159
|
+
return true;
|
|
160
|
+
} else if (Array.isArray(obj[key]) && Array.isArray(value)) {
|
|
161
|
+
if (value.length > 0) obj[key] = (0, _stryke_helpers_get_unique.getUniqueBy)(obj[key].concat(value), __assignType((item) => (0, _stryke_type_checks_is_string.isString)(item) ? item : JSON.stringify(item), [
|
|
162
|
+
"item",
|
|
163
|
+
"",
|
|
164
|
+
"P\"2!\"/\""
|
|
165
|
+
]));
|
|
166
|
+
return true;
|
|
167
|
+
}
|
|
168
|
+
return false;
|
|
169
|
+
}, [
|
|
170
|
+
"obj",
|
|
171
|
+
"key",
|
|
172
|
+
"value",
|
|
173
|
+
"",
|
|
174
|
+
"P\"2!\"2\"\"2#\"/$"
|
|
175
|
+
]));
|
|
176
|
+
|
|
177
|
+
//#endregion
|
|
178
|
+
exports.applyArgsDefaults = applyArgsDefaults;
|
|
179
|
+
exports.applyDefaults = applyDefaults;
|
|
180
|
+
exports.applyOptionsDefaults = applyOptionsDefaults;
|
|
181
|
+
exports.resolveVirtualCommand = resolveVirtualCommand;
|
|
182
|
+
//# sourceMappingURL=helpers.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"helpers.cjs","names":[],"sources":[],"mappings":""}
|
|
@@ -1,2 +1,179 @@
|
|
|
1
|
-
import{getAppTitle
|
|
1
|
+
import { getAppTitle, isDynamicPathSegment } from "../plugin-utils/context-helpers.mjs";
|
|
2
|
+
import { constantCase } from "@stryke/string-format/constant-case";
|
|
3
|
+
import { isSetString } from "@stryke/type-checks/is-set-string";
|
|
4
|
+
import { createDefu } from "defu";
|
|
5
|
+
import { titleCase } from "@stryke/string-format/title-case";
|
|
6
|
+
import { getUniqueBy } from "@stryke/helpers/get-unique";
|
|
7
|
+
import { isString } from "@stryke/type-checks/is-string";
|
|
8
|
+
|
|
9
|
+
//#region src/resolver/helpers.ts
|
|
10
|
+
function __assignType(fn, args) {
|
|
11
|
+
fn.__type = args;
|
|
12
|
+
return fn;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* Resolves the description for a command option based on its reflection.
|
|
16
|
+
*
|
|
17
|
+
* @param name - The name of the command option.
|
|
18
|
+
* @param type - The reflection kind of the command option.
|
|
19
|
+
* @param required - Whether the command option is required.
|
|
20
|
+
* @param variadic - Whether the command option is variadic (i.e., an array).
|
|
21
|
+
* @param title - The title of the command option, if any.
|
|
22
|
+
* @param defaultValue - The default value of the command option, if any.
|
|
23
|
+
* @returns The resolved description for the command option.
|
|
24
|
+
*/
|
|
25
|
+
function resolveCommandOptionDescription(name, type, required = true, variadic = false, title, defaultValue) {
|
|
26
|
+
return `A${!required && !defaultValue ? "n optional" : ""} command-line ${type === "boolean" ? "flag" : "option"} that allows the user to ${type === "boolean" ? "set the" : variadic ? "specify custom" : "specify a custom"} ${title?.trim() || titleCase(name)} ${type === "boolean" ? "indicator" : `${type === "number" ? "numeric" : "string"} value${variadic ? "s" : ""}`}.`;
|
|
27
|
+
}
|
|
28
|
+
resolveCommandOptionDescription.__type = [
|
|
29
|
+
"name",
|
|
30
|
+
"string",
|
|
31
|
+
"number",
|
|
32
|
+
"boolean",
|
|
33
|
+
"type",
|
|
34
|
+
"required",
|
|
35
|
+
"variadic",
|
|
36
|
+
"title",
|
|
37
|
+
"defaultValue",
|
|
38
|
+
"resolveCommandOptionDescription",
|
|
39
|
+
"Resolves the description for a command option based on its reflection.",
|
|
40
|
+
"P&2!P.\".#.$J2%\"2&\"2'&2(8\"2)8&/*?+"
|
|
41
|
+
];
|
|
42
|
+
/**
|
|
43
|
+
* Resolves the description for a command argument based on its reflection.
|
|
44
|
+
*
|
|
45
|
+
* @param name - The name of the command argument.
|
|
46
|
+
* @param type - The reflection kind of the command argument.
|
|
47
|
+
* @param required - Whether the command argument is required.
|
|
48
|
+
* @param variadic - Whether the command argument is variadic (i.e., an array).
|
|
49
|
+
* @param title - The title of the command argument, if any.
|
|
50
|
+
* @param defaultValue - The default value of the command argument, if any.
|
|
51
|
+
* @returns The resolved description for the command argument.
|
|
52
|
+
*/
|
|
53
|
+
function resolveCommandArgumentDescription(name, type, required = true, variadic = false, title, defaultValue) {
|
|
54
|
+
return `An${!required && !defaultValue ? " optional" : ""} argument that allows the user to ${type === "boolean" ? "set the" : variadic ? "specify custom" : "specify a custom"} ${title?.trim() || titleCase(name)} ${type === "boolean" ? "indicator" : `${type === "number" ? "numeric" : "string"} value${variadic ? "s" : ""}`}.`;
|
|
55
|
+
}
|
|
56
|
+
resolveCommandArgumentDescription.__type = [
|
|
57
|
+
"name",
|
|
58
|
+
"string",
|
|
59
|
+
"number",
|
|
60
|
+
"boolean",
|
|
61
|
+
"type",
|
|
62
|
+
"required",
|
|
63
|
+
"variadic",
|
|
64
|
+
"title",
|
|
65
|
+
"defaultValue",
|
|
66
|
+
"resolveCommandArgumentDescription",
|
|
67
|
+
"Resolves the description for a command argument based on its reflection.",
|
|
68
|
+
"P&2!P.\".#.$J2%\"2&\"2'&2(8\"2)8&/*?+"
|
|
69
|
+
];
|
|
70
|
+
function applyOptionsDefaults(ctx) {
|
|
71
|
+
return Object.fromEntries(Object.entries(ctx.output.options).map(__assignType(([key, option]) => {
|
|
72
|
+
const name = option.name || key;
|
|
73
|
+
const title = option.title || titleCase(name);
|
|
74
|
+
return [key, {
|
|
75
|
+
...option,
|
|
76
|
+
name,
|
|
77
|
+
title,
|
|
78
|
+
description: option.description || resolveCommandOptionDescription(name, option.type, option.required, option.type !== "boolean" && option.variadic, title, option.default),
|
|
79
|
+
env: option.env || option.env === false ? option.env : ctx.input.context.config.autoAssignEnv ? constantCase(name) : false
|
|
80
|
+
}];
|
|
81
|
+
}, [
|
|
82
|
+
"param0",
|
|
83
|
+
"",
|
|
84
|
+
"P\"2!\"/\""
|
|
85
|
+
])));
|
|
86
|
+
}
|
|
87
|
+
applyOptionsDefaults.__type = [
|
|
88
|
+
"ResolverContext",
|
|
89
|
+
"ctx",
|
|
90
|
+
"applyOptionsDefaults",
|
|
91
|
+
"P\"w!2\"\"/#"
|
|
92
|
+
];
|
|
93
|
+
function applyArgsDefaults(ctx) {
|
|
94
|
+
return ctx.output.args.map(__assignType((arg, i) => {
|
|
95
|
+
const name = arg.name || `arg${i + 1}`;
|
|
96
|
+
const title = arg.title || titleCase(name);
|
|
97
|
+
return {
|
|
98
|
+
...arg,
|
|
99
|
+
name,
|
|
100
|
+
title,
|
|
101
|
+
description: arg.description || resolveCommandArgumentDescription(name, arg.type, arg.required, arg.type !== "boolean" && arg.variadic, title, arg.default),
|
|
102
|
+
env: arg.name ? arg.env || arg.env === false ? arg.env : ctx.input.context.config.autoAssignEnv ? constantCase(name) : false : false
|
|
103
|
+
};
|
|
104
|
+
}, [
|
|
105
|
+
"arg",
|
|
106
|
+
"i",
|
|
107
|
+
"",
|
|
108
|
+
"P\"2!\"2\"\"/#"
|
|
109
|
+
]));
|
|
110
|
+
}
|
|
111
|
+
applyArgsDefaults.__type = [
|
|
112
|
+
"ResolverContext",
|
|
113
|
+
"ctx",
|
|
114
|
+
"CommandArgument",
|
|
115
|
+
"applyArgsDefaults",
|
|
116
|
+
"P\"w!2\"\"w#F/$"
|
|
117
|
+
];
|
|
118
|
+
function applyDefaults(ctx) {
|
|
119
|
+
ctx.output.description ??= `The ${ctx.output.title.replace(/(?:c|C)ommands?$/, "").trim()} executable command-line interface.`;
|
|
120
|
+
if (isSetString(ctx.input.context.config.reference?.commands) && ctx.input.context.config.reference.commands.includes("{command}")) ctx.output.docs ??= ctx.input.context.config.reference.commands ? ctx.input.context.config.reference.commands.replace("{command}", ctx.input.command.segments.filter(__assignType((segment) => !isDynamicPathSegment(segment), [
|
|
121
|
+
"segment",
|
|
122
|
+
"",
|
|
123
|
+
"P\"2!\"/\""
|
|
124
|
+
])).join("/")) : void 0;
|
|
125
|
+
}
|
|
126
|
+
applyDefaults.__type = [
|
|
127
|
+
"ResolverContext",
|
|
128
|
+
"ctx",
|
|
129
|
+
"applyDefaults",
|
|
130
|
+
"P\"w!2\"\"/#"
|
|
131
|
+
];
|
|
132
|
+
/**
|
|
133
|
+
* Resolves a virtual command by applying default values to its title and description based on the command name and application title.
|
|
134
|
+
*
|
|
135
|
+
* @template TContext - The type of the context object.
|
|
136
|
+
* @param ctx - The resolver context containing the input and output for the command resolution process.
|
|
137
|
+
*/
|
|
138
|
+
function resolveVirtualCommand(ctx) {
|
|
139
|
+
ctx.output.title ??= titleCase(ctx.input.command.name);
|
|
140
|
+
ctx.output.description ??= `A collection of available ${ctx.output.title.replace(/(?:c|C)ommands?$/, "").trim() || titleCase(ctx.input.command.name)} commands that are included in the ${getAppTitle(ctx.input.context, true)} command-line application.`;
|
|
141
|
+
}
|
|
142
|
+
resolveVirtualCommand.__type = [
|
|
143
|
+
"ResolverContext",
|
|
144
|
+
"ctx",
|
|
145
|
+
"resolveVirtualCommand",
|
|
146
|
+
"Resolves a virtual command by applying default values to its title and description based on the command name and application title.",
|
|
147
|
+
"P\"w!2\"\"/#?$"
|
|
148
|
+
];
|
|
149
|
+
/**
|
|
150
|
+
* Merges two command parameters, giving precedence to string values in the second configuration.
|
|
151
|
+
*
|
|
152
|
+
* @param objA - The first command parameter object.
|
|
153
|
+
* @param objB - The second command parameter object.
|
|
154
|
+
* @returns The merged command parameter object.
|
|
155
|
+
*/
|
|
156
|
+
const mergeCommandParameter = createDefu(__assignType((obj, key, value) => {
|
|
157
|
+
if (isString(obj[key]) && isString(value)) {
|
|
158
|
+
if (isSetString(value)) obj[key] = value;
|
|
159
|
+
return true;
|
|
160
|
+
} else if (Array.isArray(obj[key]) && Array.isArray(value)) {
|
|
161
|
+
if (value.length > 0) obj[key] = getUniqueBy(obj[key].concat(value), __assignType((item) => isString(item) ? item : JSON.stringify(item), [
|
|
162
|
+
"item",
|
|
163
|
+
"",
|
|
164
|
+
"P\"2!\"/\""
|
|
165
|
+
]));
|
|
166
|
+
return true;
|
|
167
|
+
}
|
|
168
|
+
return false;
|
|
169
|
+
}, [
|
|
170
|
+
"obj",
|
|
171
|
+
"key",
|
|
172
|
+
"value",
|
|
173
|
+
"",
|
|
174
|
+
"P\"2!\"2\"\"2#\"/$"
|
|
175
|
+
]));
|
|
176
|
+
|
|
177
|
+
//#endregion
|
|
178
|
+
export { applyArgsDefaults, applyDefaults, applyOptionsDefaults, resolveVirtualCommand };
|
|
2
179
|
//# sourceMappingURL=helpers.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"helpers.mjs","names":[],"sources":["../../src/resolver/helpers.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 { getUniqueBy } from \"@stryke/helpers/get-unique\";\nimport { constantCase } from \"@stryke/string-format/constant-case\";\nimport { titleCase } from \"@stryke/string-format/title-case\";\nimport { isSetString } from \"@stryke/type-checks/is-set-string\";\nimport { isString } from \"@stryke/type-checks/is-string\";\nimport { createDefu } from \"defu\";\nimport {\n getAppTitle,\n isDynamicPathSegment\n} from \"../plugin-utils/context-helpers\";\nimport type { CommandArgument, CommandParameterKind } from \"../types/command\";\nimport { CommandParameterKinds } from \"../types/command\";\nimport type { Context } from \"../types/context\";\nimport type { ResolverContext } from \"./types\";\n\n/**\n * Resolves the description for a command option based on its reflection.\n *\n * @param name - The name of the command option.\n * @param kind - The reflection kind of the command option.\n * @param optional - Whether the command option is optional.\n * @param variadic - Whether the command option is variadic (i.e., an array).\n * @param title - The title of the command option, if any.\n * @param defaultValue - The default value of the command option, if any.\n * @returns The resolved description for the command option.\n */\nexport function resolveCommandOptionDescription(\n name: string,\n kind: CommandParameterKind,\n optional = false,\n variadic = false,\n title?: string,\n defaultValue?: any\n): string {\n return `A${optional && !defaultValue ? \"n optional\" : \"\"} command-line ${\n kind === CommandParameterKinds.boolean ? \"flag\" : \"option\"\n } that allows the user to ${\n kind === CommandParameterKinds.boolean\n ? \"set the\"\n : variadic\n ? \"specify custom\"\n : \"specify a custom\"\n } ${title?.trim() || titleCase(name)} ${\n kind === CommandParameterKinds.boolean\n ? \"indicator\"\n : `${kind === CommandParameterKinds.number ? \"numeric\" : \"string\"} value${\n variadic ? \"s\" : \"\"\n }`\n }.`;\n}\n\n/**\n * Resolves the description for a command argument based on its reflection.\n *\n * @param name - The name of the command argument.\n * @param kind - The reflection kind of the command argument.\n * @param optional - Whether the command argument is optional.\n * @param variadic - Whether the command argument is variadic (i.e., an array).\n * @param title - The title of the command argument, if any.\n * @param defaultValue - The default value of the command argument, if any.\n * @returns The resolved description for the command argument.\n */\nexport function resolveCommandArgumentDescription(\n name: string,\n kind: CommandParameterKind,\n optional = false,\n variadic = false,\n title?: string,\n defaultValue?: any\n): string {\n return `An${\n optional && !defaultValue ? \" optional\" : \"\"\n } argument that allows the user to ${\n kind === CommandParameterKinds.boolean\n ? \"set the\"\n : variadic\n ? \"specify custom\"\n : \"specify a custom\"\n } ${title?.trim() || titleCase(name)} ${\n kind === CommandParameterKinds.boolean\n ? \"indicator\"\n : `${kind === CommandParameterKinds.number ? \"numeric\" : \"string\"} value${\n variadic ? \"s\" : \"\"\n }`\n }.`;\n}\n\nexport function applyOptionsDefaults(ctx: ResolverContext) {\n return Object.fromEntries(\n Object.entries(ctx.output.options).map(([key, option]) => {\n const name = option.name || key;\n const title = option.title || titleCase(name);\n\n return [\n key,\n {\n ...option,\n name,\n title,\n description:\n option.description ||\n resolveCommandOptionDescription(\n name,\n option.kind,\n option.optional,\n option.kind !== CommandParameterKinds.boolean && option.variadic,\n title,\n option.default\n ),\n env:\n option.env || option.env === false\n ? option.env\n : ctx.input.context.config.autoAssignEnv\n ? constantCase(name)\n : false\n }\n ];\n })\n );\n}\n\nexport function applyArgsDefaults(ctx: ResolverContext): CommandArgument[] {\n return ctx.output.args.map((arg, i) => {\n const name = arg.name || `arg${i + 1}`;\n const title = arg.title || titleCase(name);\n\n return {\n ...arg,\n name,\n title,\n description:\n arg.description ||\n resolveCommandArgumentDescription(\n name,\n arg.kind,\n arg.optional,\n arg.kind !== CommandParameterKinds.boolean && arg.variadic,\n title,\n arg.default\n ),\n env: arg.name\n ? arg.env || arg.env === false\n ? arg.env\n : ctx.input.context.config.autoAssignEnv\n ? constantCase(name)\n : false\n : false\n };\n });\n}\n\nexport function applyDefaults(ctx: ResolverContext) {\n ctx.output.description ??= `The ${ctx.output.title.replace(/(?:c|C)ommands?$/, \"\").trim()} executable command-line interface.`;\n if (\n isSetString(ctx.input.context.config.reference?.commands) &&\n ctx.input.context.config.reference.commands.includes(\"{command}\")\n ) {\n ctx.output.reference ??= ctx.input.context.config.reference.commands\n ? ctx.input.context.config.reference.commands.replace(\n \"{command}\",\n ctx.input.command.segments\n .filter(segment => !isDynamicPathSegment(segment))\n .join(\"/\")\n )\n : undefined;\n }\n}\n\nexport function resolveVirtualCommand<TContext extends Context = Context>(\n ctx: ResolverContext<TContext>\n) {\n ctx.output.title ??= titleCase(ctx.input.command.name);\n ctx.output.description ??= `A collection of available ${\n ctx.output.title.replace(/(?:c|C)ommands?$/, \"\").trim() ||\n titleCase(ctx.input.command.name)\n } commands that are included in the ${getAppTitle(\n ctx.input.context,\n true\n )} command-line application.`;\n}\n\n/**\n * Merges two command parameters, giving precedence to string values in the second configuration.\n *\n * @param objA - The first command parameter object.\n * @param objB - The second command parameter object.\n * @returns The merged command parameter object.\n */\nexport const mergeCommandParameter = createDefu((obj, key, value) => {\n if (isString(obj[key]) && isString(value)) {\n if (isSetString(value)) {\n obj[key] = value;\n }\n\n return true;\n } else if (Array.isArray(obj[key]) && Array.isArray(value)) {\n if (value.length > 0) {\n obj[key] = getUniqueBy((obj[key] as unknown[]).concat(value), item =>\n isString(item) ? item : JSON.stringify(item)\n ) as (typeof obj)[typeof key];\n }\n\n return true;\n }\n\n return false;\n});\n"],"mappings":"6eAAA,SAAS,EAAa,EAAI,EAAM,CAE9B,kBAAO,EAsCT,SAAgB,EAA2B,EAAW,EAAG,EAAA,GAAA,EAAA,GAAA,EAAA,EAAA,CACvD,MAAO,IAAC,GAAe,CAAA,EAAY,aAAa,GAAQ,gBAAc,IAAA,EAAA,QAAA,OAAA,SAAA,2BAAA,IAAA,EAAA,QAAA,UAAA,EAAA,iBAAA,mBAAA,GAAA,G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