@shell-shock/core 0.17.21 → 0.17.23
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/README.md +16 -7
- package/dist/api.cjs +4 -5
- package/dist/api.d.cts +1 -1
- package/dist/api.d.mts +1 -1
- package/dist/api.mjs +2 -2
- package/dist/command-B6KYexlV.d.mts +308 -0
- package/dist/command-B6KYexlV.d.mts.map +1 -0
- package/dist/command-CtfR7hKM.d.cts +308 -0
- package/dist/command-CtfR7hKM.d.cts.map +1 -0
- package/dist/components/command-validation-logic.cjs +153 -216
- package/dist/components/command-validation-logic.d.cts +2 -1
- package/dist/components/command-validation-logic.d.cts.map +1 -1
- package/dist/components/command-validation-logic.d.mts +2 -1
- package/dist/components/command-validation-logic.mjs +153 -214
- package/dist/components/docs.cjs +6 -364
- package/dist/components/docs.d.cts +2 -3
- package/dist/components/docs.d.cts.map +1 -1
- package/dist/components/docs.d.mts +2 -3
- package/dist/components/docs.mjs +2 -356
- package/dist/components/exec-builtin.cjs +63 -100
- 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.mjs +7 -41
- package/dist/components/helpers.cjs +2 -52
- package/dist/components/helpers.d.cts +2 -1
- package/dist/components/helpers.d.cts.map +1 -1
- package/dist/components/helpers.d.mts +2 -1
- package/dist/components/helpers.mjs +2 -50
- package/dist/components/index.cjs +7 -23
- package/dist/components/index.mjs +9 -9
- package/dist/components/options-parser-logic.cjs +198 -420
- package/dist/components/options-parser-logic.d.cts +2 -5
- package/dist/components/options-parser-logic.d.cts.map +1 -1
- package/dist/components/options-parser-logic.d.mts +2 -5
- package/dist/components/options-parser-logic.mjs +192 -407
- package/dist/components/state-builtin.cjs +106 -164
- package/dist/components/state-builtin.d.cts +1 -2
- package/dist/components/state-builtin.d.cts.map +1 -1
- package/dist/components/state-builtin.d.mts +1 -2
- package/dist/components/state-builtin.mjs +12 -68
- package/dist/components/usage.cjs +4 -48
- 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.mjs +4 -46
- package/dist/components/utils-builtin.cjs +77 -144
- package/dist/components/utils-builtin.d.cts +1 -2
- package/dist/components/utils-builtin.d.cts.map +1 -1
- package/dist/components/utils-builtin.d.mts +1 -2
- package/dist/components/utils-builtin.mjs +9 -74
- package/dist/config-BIF9mEz0.d.cts +157 -0
- package/dist/config-BIF9mEz0.d.cts.map +1 -0
- package/dist/config-CnNYdfsL.d.mts +157 -0
- package/dist/config-CnNYdfsL.d.mts.map +1 -0
- package/dist/config.cjs +24 -58
- package/dist/config.d.cts +1 -2
- package/dist/config.d.cts.map +1 -1
- package/dist/config.d.mts +1 -2
- package/dist/config.mjs +23 -55
- package/dist/{plugin-utils/context-helpers.mjs → context-helpers-D3EJxwbq.mjs} +5 -83
- package/dist/context-helpers-D3EJxwbq.mjs.map +1 -0
- package/dist/{plugin-utils/context-helpers.cjs → context-helpers-_wUuFRB8.cjs} +63 -92
- package/dist/contexts/command.cjs +3 -9
- package/dist/contexts/command.d.cts +1 -2
- package/dist/contexts/command.d.cts.map +1 -1
- package/dist/contexts/command.d.mts +1 -2
- package/dist/contexts/command.mjs +2 -7
- package/dist/contexts/index.cjs +19 -1
- package/dist/contexts/index.d.cts +2 -1
- package/dist/contexts/index.d.mts +2 -1
- package/dist/contexts/index.mjs +2 -1
- package/dist/contexts/options.cjs +7 -30
- package/dist/contexts/options.d.cts +1 -2
- package/dist/contexts/options.d.cts.map +1 -1
- package/dist/contexts/options.d.mts +1 -2
- package/dist/contexts/options.mjs +7 -27
- package/dist/contexts/power-plant.cjs +19 -0
- package/dist/contexts/power-plant.d.cts +2 -0
- package/dist/contexts/power-plant.d.mts +2 -0
- package/dist/contexts/power-plant.mjs +5 -0
- package/dist/docs-C6ZvsVMu.cjs +278 -0
- package/dist/docs-CGQ2HtEY.mjs +249 -0
- package/dist/docs-CGQ2HtEY.mjs.map +1 -0
- package/dist/engine.cjs +5 -39
- package/dist/engine.d.cts +1 -2
- package/dist/engine.d.cts.map +1 -1
- package/dist/engine.d.mts +1 -2
- package/dist/engine.mjs +4 -37
- package/dist/generator.cjs +68 -0
- package/dist/generator.d.cts +15 -0
- package/dist/generator.d.cts.map +1 -0
- package/dist/generator.d.mts +15 -0
- package/dist/generator.d.mts.map +1 -0
- package/dist/generator.mjs +66 -0
- package/dist/generator.mjs.map +1 -0
- package/dist/{helpers/get-framework.cjs → get-framework-CxZc2krd.cjs} +7 -8
- package/dist/{helpers/get-framework.mjs → get-framework-Dlqz2hVZ.mjs} +3 -8
- package/dist/get-framework-Dlqz2hVZ.mjs.map +1 -0
- package/dist/helpers/power-plant.cjs +102 -0
- package/dist/helpers/power-plant.d.cts +61 -0
- package/dist/helpers/power-plant.d.cts.map +1 -0
- package/dist/helpers/power-plant.d.mts +61 -0
- package/dist/helpers/power-plant.d.mts.map +1 -0
- package/dist/helpers/power-plant.mjs +99 -0
- package/dist/helpers/power-plant.mjs.map +1 -0
- package/dist/index-D4klH_pj.d.mts +2 -0
- package/dist/index-DYOBadKY.d.cts +2 -0
- package/dist/index.cjs +1 -37
- package/dist/index.d.cts +4 -6
- package/dist/index.d.cts.map +1 -1
- package/dist/index.d.mts +4 -6
- package/dist/index.mjs +0 -35
- package/dist/package-B7Vu265G.mjs +6 -0
- package/dist/package-B7Vu265G.mjs.map +1 -0
- package/dist/{package.cjs → package-BLC4qc8t.cjs} +2 -4
- package/dist/plugin-B-hM2twc.mjs +1458 -0
- package/dist/plugin-B-hM2twc.mjs.map +1 -0
- package/dist/plugin-Bhfq0DMC.cjs +1490 -0
- package/dist/plugin-utils/index.cjs +359 -26
- package/dist/plugin-utils/index.d.cts +273 -9
- package/dist/plugin-utils/index.d.cts.map +1 -0
- package/dist/plugin-utils/index.d.mts +273 -9
- package/dist/plugin-utils/index.d.mts.map +1 -0
- package/dist/plugin-utils/index.mjs +346 -10
- package/dist/plugin-utils/index.mjs.map +1 -0
- package/dist/plugin.cjs +3 -496
- package/dist/plugin.d.cts +1 -3
- package/dist/plugin.d.cts.map +1 -1
- package/dist/plugin.d.mts +1 -3
- package/dist/plugin.mjs +2 -491
- package/dist/power-plant-LgxcvlMN.d.cts +4 -0
- package/dist/power-plant-LgxcvlMN.d.mts +4 -0
- package/dist/reflect-CSiffeL9.cjs +27 -0
- package/dist/reflect-DXKSFgvS.mjs +23 -0
- package/dist/reflect-DXKSFgvS.mjs.map +1 -0
- package/dist/schemas/env.cjs +91 -0
- package/dist/schemas/env.d.cts +145 -0
- package/dist/schemas/env.d.cts.map +1 -0
- package/dist/schemas/env.d.mts +145 -0
- package/dist/{types → schemas}/env.d.mts.map +1 -1
- package/dist/schemas/env.mjs +91 -0
- package/dist/schemas/index.cjs +4 -0
- package/dist/schemas/index.d.cts +2 -0
- package/dist/schemas/index.d.mts +2 -0
- package/dist/schemas/index.mjs +3 -0
- package/dist/types/command.cjs +0 -402
- package/dist/types/command.d.cts +2 -309
- package/dist/types/command.d.mts +2 -309
- package/dist/types/command.mjs +1 -368
- package/dist/types/config.cjs +0 -175
- package/dist/types/config.d.cts +2 -126
- package/dist/types/config.d.mts +2 -126
- package/dist/types/config.mjs +1 -164
- package/dist/types/context.cjs +0 -45
- package/dist/types/context.d.cts +2 -31
- package/dist/types/context.d.mts +2 -31
- package/dist/types/context.mjs +1 -41
- package/dist/types/index.cjs +3 -53
- package/dist/types/index.d.cts +4 -5
- package/dist/types/index.d.mts +4 -5
- package/dist/types/index.mjs +4 -5
- package/package.json +106 -42
- package/dist/_virtual/_rolldown/runtime.cjs +0 -29
- package/dist/api.cjs.map +0 -1
- package/dist/components/command-validation-logic.cjs.map +0 -1
- package/dist/components/docs.cjs.map +0 -1
- package/dist/components/docs.mjs.map +0 -1
- package/dist/components/exec-builtin.cjs.map +0 -1
- package/dist/components/helpers.cjs.map +0 -1
- package/dist/components/options-parser-logic.cjs.map +0 -1
- package/dist/components/state-builtin.cjs.map +0 -1
- package/dist/components/usage.cjs.map +0 -1
- package/dist/components/utils-builtin.cjs.map +0 -1
- package/dist/config.cjs.map +0 -1
- package/dist/contexts/command.cjs.map +0 -1
- package/dist/contexts/options.cjs.map +0 -1
- package/dist/engine.cjs.map +0 -1
- package/dist/helpers/automd.cjs +0 -193
- package/dist/helpers/automd.cjs.map +0 -1
- package/dist/helpers/automd.mjs +0 -190
- package/dist/helpers/automd.mjs.map +0 -1
- package/dist/helpers/docs-helpers.cjs +0 -24
- package/dist/helpers/docs-helpers.cjs.map +0 -1
- package/dist/helpers/docs-helpers.mjs +0 -24
- package/dist/helpers/docs-helpers.mjs.map +0 -1
- package/dist/helpers/get-framework.cjs.map +0 -1
- package/dist/helpers/get-framework.mjs.map +0 -1
- package/dist/helpers/paths.cjs +0 -137
- package/dist/helpers/paths.cjs.map +0 -1
- package/dist/helpers/paths.mjs +0 -134
- package/dist/helpers/paths.mjs.map +0 -1
- package/dist/helpers/persistence.cjs +0 -114
- package/dist/helpers/persistence.cjs.map +0 -1
- package/dist/helpers/persistence.mjs +0 -113
- package/dist/helpers/persistence.mjs.map +0 -1
- package/dist/helpers/update-package-json.cjs +0 -65
- package/dist/helpers/update-package-json.cjs.map +0 -1
- package/dist/helpers/update-package-json.mjs +0 -64
- package/dist/helpers/update-package-json.mjs.map +0 -1
- package/dist/helpers/utilities.cjs +0 -95
- package/dist/helpers/utilities.cjs.map +0 -1
- package/dist/helpers/utilities.mjs +0 -94
- package/dist/helpers/utilities.mjs.map +0 -1
- package/dist/helpers/validations.cjs +0 -71
- package/dist/helpers/validations.cjs.map +0 -1
- package/dist/helpers/validations.mjs +0 -70
- package/dist/helpers/validations.mjs.map +0 -1
- package/dist/index.cjs.map +0 -1
- package/dist/package.cjs.map +0 -1
- package/dist/package.mjs +0 -6
- package/dist/package.mjs.map +0 -1
- package/dist/plugin-utils/compute-bin.cjs +0 -49
- package/dist/plugin-utils/compute-bin.cjs.map +0 -1
- package/dist/plugin-utils/compute-bin.d.cts +0 -13
- package/dist/plugin-utils/compute-bin.d.cts.map +0 -1
- package/dist/plugin-utils/compute-bin.d.mts +0 -13
- package/dist/plugin-utils/compute-bin.d.mts.map +0 -1
- package/dist/plugin-utils/compute-bin.mjs +0 -49
- package/dist/plugin-utils/compute-bin.mjs.map +0 -1
- package/dist/plugin-utils/context-helpers.cjs.map +0 -1
- package/dist/plugin-utils/context-helpers.d.cts +0 -106
- package/dist/plugin-utils/context-helpers.d.cts.map +0 -1
- package/dist/plugin-utils/context-helpers.d.mts +0 -106
- package/dist/plugin-utils/context-helpers.d.mts.map +0 -1
- package/dist/plugin-utils/context-helpers.mjs.map +0 -1
- package/dist/plugin-utils/deepkit.cjs +0 -70
- package/dist/plugin-utils/deepkit.cjs.map +0 -1
- package/dist/plugin-utils/deepkit.d.cts +0 -23
- package/dist/plugin-utils/deepkit.d.cts.map +0 -1
- package/dist/plugin-utils/deepkit.d.mts +0 -23
- package/dist/plugin-utils/deepkit.d.mts.map +0 -1
- package/dist/plugin-utils/deepkit.mjs +0 -69
- package/dist/plugin-utils/deepkit.mjs.map +0 -1
- package/dist/plugin-utils/description-helpers.cjs +0 -112
- package/dist/plugin-utils/description-helpers.cjs.map +0 -1
- package/dist/plugin-utils/description-helpers.d.cts +0 -44
- package/dist/plugin-utils/description-helpers.d.cts.map +0 -1
- package/dist/plugin-utils/description-helpers.d.mts +0 -44
- package/dist/plugin-utils/description-helpers.d.mts.map +0 -1
- package/dist/plugin-utils/description-helpers.mjs +0 -108
- package/dist/plugin-utils/description-helpers.mjs.map +0 -1
- package/dist/plugin-utils/get-command-tree.cjs +0 -118
- package/dist/plugin-utils/get-command-tree.cjs.map +0 -1
- package/dist/plugin-utils/get-command-tree.d.cts +0 -36
- package/dist/plugin-utils/get-command-tree.d.cts.map +0 -1
- package/dist/plugin-utils/get-command-tree.d.mts +0 -36
- package/dist/plugin-utils/get-command-tree.d.mts.map +0 -1
- package/dist/plugin-utils/get-command-tree.mjs +0 -115
- package/dist/plugin-utils/get-command-tree.mjs.map +0 -1
- package/dist/plugin-utils/reflect.cjs +0 -54
- package/dist/plugin-utils/reflect.cjs.map +0 -1
- package/dist/plugin-utils/reflect.d.cts +0 -14
- package/dist/plugin-utils/reflect.d.cts.map +0 -1
- package/dist/plugin-utils/reflect.d.mts +0 -14
- package/dist/plugin-utils/reflect.d.mts.map +0 -1
- package/dist/plugin-utils/reflect.mjs +0 -53
- package/dist/plugin-utils/reflect.mjs.map +0 -1
- package/dist/plugin-utils/traverse-command-tree.cjs +0 -65
- package/dist/plugin-utils/traverse-command-tree.cjs.map +0 -1
- package/dist/plugin-utils/traverse-command-tree.d.cts +0 -22
- package/dist/plugin-utils/traverse-command-tree.d.cts.map +0 -1
- package/dist/plugin-utils/traverse-command-tree.d.mts +0 -22
- package/dist/plugin-utils/traverse-command-tree.d.mts.map +0 -1
- package/dist/plugin-utils/traverse-command-tree.mjs +0 -63
- package/dist/plugin-utils/traverse-command-tree.mjs.map +0 -1
- package/dist/plugin-utils/type-checks.cjs +0 -222
- package/dist/plugin-utils/type-checks.cjs.map +0 -1
- package/dist/plugin-utils/type-checks.d.cts +0 -41
- package/dist/plugin-utils/type-checks.d.cts.map +0 -1
- package/dist/plugin-utils/type-checks.d.mts +0 -41
- package/dist/plugin-utils/type-checks.d.mts.map +0 -1
- package/dist/plugin-utils/type-checks.mjs +0 -218
- package/dist/plugin-utils/type-checks.mjs.map +0 -1
- package/dist/plugin.cjs.map +0 -1
- package/dist/plugin.mjs.map +0 -1
- package/dist/resolver/deepkit.cjs +0 -110
- package/dist/resolver/deepkit.cjs.map +0 -1
- package/dist/resolver/deepkit.mjs +0 -109
- package/dist/resolver/deepkit.mjs.map +0 -1
- package/dist/resolver/helpers.cjs +0 -184
- package/dist/resolver/helpers.cjs.map +0 -1
- package/dist/resolver/helpers.mjs +0 -180
- package/dist/resolver/helpers.mjs.map +0 -1
- package/dist/resolver/resolve.cjs +0 -473
- package/dist/resolver/resolve.cjs.map +0 -1
- package/dist/resolver/resolve.mjs +0 -473
- package/dist/resolver/resolve.mjs.map +0 -1
- package/dist/types/command.cjs.map +0 -1
- package/dist/types/command.d.cts.map +0 -1
- package/dist/types/command.d.mts.map +0 -1
- package/dist/types/command.mjs.map +0 -1
- package/dist/types/config.cjs.map +0 -1
- package/dist/types/config.d.cts.map +0 -1
- package/dist/types/config.d.mts.map +0 -1
- package/dist/types/config.mjs.map +0 -1
- package/dist/types/context.cjs.map +0 -1
- package/dist/types/context.d.cts.map +0 -1
- package/dist/types/context.d.mts.map +0 -1
- package/dist/types/context.mjs.map +0 -1
- package/dist/types/env.cjs +0 -53
- package/dist/types/env.cjs.map +0 -1
- package/dist/types/env.d.cts +0 -71
- package/dist/types/env.d.cts.map +0 -1
- package/dist/types/env.d.mts +0 -71
- package/dist/types/env.mjs +0 -51
- /package/dist/{types → schemas}/env.mjs.map +0 -0
|
@@ -2,21 +2,11 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
|
2
2
|
let _alloy_js_core_jsx_runtime = require("@alloy-js/core/jsx-runtime");
|
|
3
3
|
let _alloy_js_core = require("@alloy-js/core");
|
|
4
4
|
let _stryke_string_format_camel_case = require("@stryke/string-format/camel-case");
|
|
5
|
-
let
|
|
5
|
+
let _power_plant_alloy_js_core_components_spacing = require("@power-plant/alloy-js/core/components/spacing");
|
|
6
6
|
let _stryke_string_format_list = require("@stryke/string-format/list");
|
|
7
7
|
let _alloy_js_typescript = require("@alloy-js/typescript");
|
|
8
8
|
|
|
9
9
|
//#region src/components/command-validation-logic.tsx
|
|
10
|
-
function __assignType(fn, args) {
|
|
11
|
-
fn.__type = args;
|
|
12
|
-
return fn;
|
|
13
|
-
}
|
|
14
|
-
const __ΩCommandValidationLogicProps = [
|
|
15
|
-
"CommandTree",
|
|
16
|
-
"command",
|
|
17
|
-
"CommandValidationLogicProps",
|
|
18
|
-
"P\"w!4\"Mw#y"
|
|
19
|
-
];
|
|
20
10
|
/**
|
|
21
11
|
* A component that generates command validation logic for required options and arguments.
|
|
22
12
|
*/
|
|
@@ -34,258 +24,205 @@ function CommandValidationLogic(props) {
|
|
|
34
24
|
return Object.values(command.options ?? {});
|
|
35
25
|
},
|
|
36
26
|
doubleHardline: true,
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
(0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_core.Show, {
|
|
40
|
-
get when() {
|
|
41
|
-
return option.required;
|
|
42
|
-
},
|
|
43
|
-
get children() {
|
|
44
|
-
return [(0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_typescript.IfStatement, {
|
|
45
|
-
get condition() {
|
|
46
|
-
return _alloy_js_core.code`!options${option.name.includes("?") ? `["${option.name}"]` : `.${(0, _stryke_string_format_camel_case.camelCase)(option.name)}`}`;
|
|
47
|
-
},
|
|
48
|
-
get children() {
|
|
49
|
-
return _alloy_js_core.code`failures.push("Missing required \\"${option.name}\\" option");`;
|
|
50
|
-
}
|
|
51
|
-
}), (0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_core.Show, {
|
|
52
|
-
get when() {
|
|
53
|
-
return option.variadic;
|
|
54
|
-
},
|
|
55
|
-
get children() {
|
|
56
|
-
return (0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_typescript.ElseIfClause, {
|
|
57
|
-
get condition() {
|
|
58
|
-
return _alloy_js_core.code`options${option.name.includes("?") ? `["${option.name}"]` : `.${(0, _stryke_string_format_camel_case.camelCase)(option.name)}`}.length === 0`;
|
|
59
|
-
},
|
|
60
|
-
get children() {
|
|
61
|
-
return _alloy_js_core.code`failures.push("No values were provided to the required \\"${option.name}\\" array option");`;
|
|
62
|
-
}
|
|
63
|
-
});
|
|
64
|
-
}
|
|
65
|
-
})];
|
|
66
|
-
}
|
|
67
|
-
}),
|
|
68
|
-
(0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_core.Show, {
|
|
69
|
-
get when() {
|
|
70
|
-
return option.type === "number";
|
|
71
|
-
},
|
|
72
|
-
get children() {
|
|
73
|
-
return (0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_core.Show, {
|
|
74
|
-
get when() {
|
|
75
|
-
return option.variadic;
|
|
76
|
-
},
|
|
77
|
-
get fallback() {
|
|
78
|
-
return (0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_typescript.IfStatement, {
|
|
79
|
-
get condition() {
|
|
80
|
-
return _alloy_js_core.code`options${option.name.includes("?") ? `["${option.name}"]` : `.${(0, _stryke_string_format_camel_case.camelCase)(option.name)}`} && Number.isNaN(options${option.name.includes("?") ? `["${option.name}"]` : `.${(0, _stryke_string_format_camel_case.camelCase)(option.name)}`})`;
|
|
81
|
-
},
|
|
82
|
-
get children() {
|
|
83
|
-
return _alloy_js_core.code`failures.push("Invalid numeric value provided for the \\"${option.name}\\" option");`;
|
|
84
|
-
}
|
|
85
|
-
});
|
|
86
|
-
},
|
|
87
|
-
get children() {
|
|
88
|
-
return (0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_typescript.IfStatement, {
|
|
89
|
-
get condition() {
|
|
90
|
-
return _alloy_js_core.code`options${option.name.includes("?") ? `["${option.name}"]` : `.${(0, _stryke_string_format_camel_case.camelCase)(option.name)}`}.some(value => Number.isNaN(value))`;
|
|
91
|
-
},
|
|
92
|
-
get children() {
|
|
93
|
-
return _alloy_js_core.code`failures.push("Invalid numeric value provided in the \\"${option.name}\\" array option");`;
|
|
94
|
-
}
|
|
95
|
-
});
|
|
96
|
-
}
|
|
97
|
-
});
|
|
98
|
-
}
|
|
99
|
-
}),
|
|
100
|
-
(0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_core.Show, {
|
|
101
|
-
get when() {
|
|
102
|
-
return (option.type === "string" || option.type === "number") && option.choices && option.choices.length > 0;
|
|
103
|
-
},
|
|
104
|
-
get children() {
|
|
105
|
-
return (0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_core.Show, {
|
|
106
|
-
get when() {
|
|
107
|
-
return !option.variadic;
|
|
108
|
-
},
|
|
109
|
-
get fallback() {
|
|
110
|
-
return (0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_core.Show, {
|
|
111
|
-
get when() {
|
|
112
|
-
return option.required;
|
|
113
|
-
},
|
|
114
|
-
get fallback() {
|
|
115
|
-
return (0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_typescript.IfStatement, {
|
|
116
|
-
get condition() {
|
|
117
|
-
return _alloy_js_core.code`!options${option.name.includes("?") ? `["${option.name}"]` : `.${(0, _stryke_string_format_camel_case.camelCase)(option.name)}`}.every(value => [${option.choices?.map(__assignType((choice) => option.type === "string" ? `"${choice}"` : choice, [
|
|
118
|
-
"choice",
|
|
119
|
-
"",
|
|
120
|
-
"P\"2!\"/\""
|
|
121
|
-
])).join(", ")}].includes(value))`;
|
|
122
|
-
},
|
|
123
|
-
get children() {
|
|
124
|
-
return _alloy_js_core.code`failures.push(\`Invalid value provided for the \\"${option.name}\\" option - valid values include: ${(0, _stryke_string_format_list.list)(option?.choices?.map(__assignType((choice) => String(choice), [
|
|
125
|
-
"choice",
|
|
126
|
-
"",
|
|
127
|
-
"P\"2!\"/\""
|
|
128
|
-
])) ?? [])}; provided: \${options${option.name.includes("?") ? `["${option.name}"]` : `.${(0, _stryke_string_format_camel_case.camelCase)(option.name)}`}}\`);`;
|
|
129
|
-
}
|
|
130
|
-
});
|
|
131
|
-
},
|
|
132
|
-
get children() {
|
|
133
|
-
return (0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_typescript.ElseIfClause, {
|
|
134
|
-
get condition() {
|
|
135
|
-
return _alloy_js_core.code`!options${option.name.includes("?") ? `["${option.name}"]` : `.${(0, _stryke_string_format_camel_case.camelCase)(option.name)}`}.every(value => [${option.choices?.map(__assignType((choice) => option.type === "string" ? `"${choice}"` : choice, [
|
|
136
|
-
"choice",
|
|
137
|
-
"",
|
|
138
|
-
"P\"2!\"/\""
|
|
139
|
-
])).join(", ")}].includes(value))`;
|
|
140
|
-
},
|
|
141
|
-
get children() {
|
|
142
|
-
return _alloy_js_core.code`failures.push(\`Invalid value provided for the \\"${option.name}\\" option - valid values include: ${(0, _stryke_string_format_list.list)(option?.choices?.map(__assignType((choice) => String(choice), [
|
|
143
|
-
"choice",
|
|
144
|
-
"",
|
|
145
|
-
"P\"2!\"/\""
|
|
146
|
-
])) ?? [])}; provided: \${options${option.name.includes("?") ? `["${option.name}"]` : `.${(0, _stryke_string_format_camel_case.camelCase)(option.name)}`}}\`);`;
|
|
147
|
-
}
|
|
148
|
-
});
|
|
149
|
-
}
|
|
150
|
-
});
|
|
151
|
-
},
|
|
152
|
-
get children() {
|
|
153
|
-
return (0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_core.Show, {
|
|
154
|
-
get when() {
|
|
155
|
-
return option.required;
|
|
156
|
-
},
|
|
157
|
-
get fallback() {
|
|
158
|
-
return (0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_typescript.IfStatement, {
|
|
159
|
-
get condition() {
|
|
160
|
-
return _alloy_js_core.code`![${option.choices?.map(__assignType((choice) => option.type === "string" ? `"${choice}"` : choice, [
|
|
161
|
-
"choice",
|
|
162
|
-
"",
|
|
163
|
-
"P\"2!\"/\""
|
|
164
|
-
])).join(", ")}].includes(options${option.name.includes("?") ? `["${option.name}"]` : `.${(0, _stryke_string_format_camel_case.camelCase)(option.name)}`})`;
|
|
165
|
-
},
|
|
166
|
-
get children() {
|
|
167
|
-
return _alloy_js_core.code`failures.push(\`Invalid value provided for the \\"${option.name}\\" option - valid values include: ${(0, _stryke_string_format_list.list)(option?.choices?.map(__assignType((choice) => String(choice), [
|
|
168
|
-
"choice",
|
|
169
|
-
"",
|
|
170
|
-
"P\"2!\"/\""
|
|
171
|
-
])) ?? [])}; provided: \${options${option.name.includes("?") ? `["${option.name}"]` : `.${(0, _stryke_string_format_camel_case.camelCase)(option.name)}`}}\`);`;
|
|
172
|
-
}
|
|
173
|
-
});
|
|
174
|
-
},
|
|
175
|
-
get children() {
|
|
176
|
-
return (0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_typescript.ElseIfClause, {
|
|
177
|
-
get condition() {
|
|
178
|
-
return _alloy_js_core.code`![${option.choices?.map(__assignType((choice) => option.type === "string" ? `"${choice}"` : choice, [
|
|
179
|
-
"choice",
|
|
180
|
-
"",
|
|
181
|
-
"P\"2!\"/\""
|
|
182
|
-
])).join(", ")}].includes(options${option.name.includes("?") ? `["${option.name}"]` : `.${(0, _stryke_string_format_camel_case.camelCase)(option.name)}`})`;
|
|
183
|
-
},
|
|
184
|
-
get children() {
|
|
185
|
-
return _alloy_js_core.code`failures.push(\`Invalid value provided for the \\"${option.name}\\" option - valid values include: ${(0, _stryke_string_format_list.list)(option?.choices?.map(__assignType((choice) => String(choice), [
|
|
186
|
-
"choice",
|
|
187
|
-
"",
|
|
188
|
-
"P\"2!\"/\""
|
|
189
|
-
])) ?? [])}; provided: \${options${option.name.includes("?") ? `["${option.name}"]` : `.${(0, _stryke_string_format_camel_case.camelCase)(option.name)}`}}\`);`;
|
|
190
|
-
}
|
|
191
|
-
});
|
|
192
|
-
}
|
|
193
|
-
});
|
|
194
|
-
}
|
|
195
|
-
});
|
|
196
|
-
}
|
|
197
|
-
})
|
|
198
|
-
], [
|
|
199
|
-
"option",
|
|
200
|
-
"",
|
|
201
|
-
"P\"2!\"/\""
|
|
202
|
-
]);
|
|
203
|
-
}
|
|
204
|
-
}),
|
|
205
|
-
(0, _alloy_js_core_jsx_runtime.createComponent)(_powerlines_plugin_alloy_core_components_spacing.Spacing, {}),
|
|
206
|
-
(0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_core.For, {
|
|
207
|
-
get each() {
|
|
208
|
-
return command.args;
|
|
209
|
-
},
|
|
210
|
-
doubleHardline: true,
|
|
211
|
-
get children() {
|
|
212
|
-
return __assignType((argument) => [(0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_core.Show, {
|
|
27
|
+
children: (option) => [
|
|
28
|
+
(0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_core.Show, {
|
|
213
29
|
get when() {
|
|
214
|
-
return
|
|
30
|
+
return option.required;
|
|
215
31
|
},
|
|
216
32
|
get children() {
|
|
217
33
|
return [(0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_typescript.IfStatement, {
|
|
218
34
|
get condition() {
|
|
219
|
-
return _alloy_js_core.code
|
|
35
|
+
return _alloy_js_core.code`!options${option.name.includes("?") ? `["${option.name}"]` : `.${(0, _stryke_string_format_camel_case.camelCase)(option.name)}`}`;
|
|
220
36
|
},
|
|
221
37
|
get children() {
|
|
222
|
-
return _alloy_js_core.code`failures.push("Missing required \\"${
|
|
38
|
+
return _alloy_js_core.code`failures.push("Missing required \\"${option.name}\\" option");`;
|
|
223
39
|
}
|
|
224
40
|
}), (0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_core.Show, {
|
|
225
41
|
get when() {
|
|
226
|
-
return
|
|
42
|
+
return option.variadic;
|
|
227
43
|
},
|
|
228
44
|
get children() {
|
|
229
45
|
return (0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_typescript.ElseIfClause, {
|
|
230
46
|
get condition() {
|
|
231
|
-
return _alloy_js_core.code
|
|
47
|
+
return _alloy_js_core.code`options${option.name.includes("?") ? `["${option.name}"]` : `.${(0, _stryke_string_format_camel_case.camelCase)(option.name)}`}.length === 0`;
|
|
232
48
|
},
|
|
233
49
|
get children() {
|
|
234
|
-
return _alloy_js_core.code`failures.push("No values were provided to the required \\"${
|
|
50
|
+
return _alloy_js_core.code`failures.push("No values were provided to the required \\"${option.name}\\" array option");`;
|
|
235
51
|
}
|
|
236
52
|
});
|
|
237
53
|
}
|
|
238
54
|
})];
|
|
239
55
|
}
|
|
240
|
-
}),
|
|
56
|
+
}),
|
|
57
|
+
(0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_core.Show, {
|
|
241
58
|
get when() {
|
|
242
|
-
return
|
|
59
|
+
return option.type === "number";
|
|
243
60
|
},
|
|
244
61
|
get children() {
|
|
245
62
|
return (0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_core.Show, {
|
|
246
63
|
get when() {
|
|
247
|
-
return
|
|
64
|
+
return option.variadic;
|
|
248
65
|
},
|
|
249
66
|
get fallback() {
|
|
250
67
|
return (0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_typescript.IfStatement, {
|
|
251
68
|
get condition() {
|
|
252
|
-
return _alloy_js_core.code
|
|
69
|
+
return _alloy_js_core.code`options${option.name.includes("?") ? `["${option.name}"]` : `.${(0, _stryke_string_format_camel_case.camelCase)(option.name)}`} && Number.isNaN(options${option.name.includes("?") ? `["${option.name}"]` : `.${(0, _stryke_string_format_camel_case.camelCase)(option.name)}`})`;
|
|
253
70
|
},
|
|
254
71
|
get children() {
|
|
255
|
-
return _alloy_js_core.code`failures.push("Invalid numeric value provided for the \\"${
|
|
72
|
+
return _alloy_js_core.code`failures.push("Invalid numeric value provided for the \\"${option.name}\\" option");`;
|
|
256
73
|
}
|
|
257
74
|
});
|
|
258
75
|
},
|
|
259
76
|
get children() {
|
|
260
77
|
return (0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_typescript.IfStatement, {
|
|
261
78
|
get condition() {
|
|
262
|
-
return _alloy_js_core.code
|
|
79
|
+
return _alloy_js_core.code`options${option.name.includes("?") ? `["${option.name}"]` : `.${(0, _stryke_string_format_camel_case.camelCase)(option.name)}`}.some(value => Number.isNaN(value))`;
|
|
263
80
|
},
|
|
264
81
|
get children() {
|
|
265
|
-
return _alloy_js_core.code`failures.push("Invalid numeric value provided in the \\"${
|
|
82
|
+
return _alloy_js_core.code`failures.push("Invalid numeric value provided in the \\"${option.name}\\" array option");`;
|
|
266
83
|
}
|
|
267
84
|
});
|
|
268
85
|
}
|
|
269
86
|
});
|
|
270
87
|
}
|
|
271
|
-
})
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
88
|
+
}),
|
|
89
|
+
(0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_core.Show, {
|
|
90
|
+
get when() {
|
|
91
|
+
return (option.type === "string" || option.type === "number") && option.choices && option.choices.length > 0;
|
|
92
|
+
},
|
|
93
|
+
get children() {
|
|
94
|
+
return (0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_core.Show, {
|
|
95
|
+
get when() {
|
|
96
|
+
return !option.variadic;
|
|
97
|
+
},
|
|
98
|
+
get fallback() {
|
|
99
|
+
return (0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_core.Show, {
|
|
100
|
+
get when() {
|
|
101
|
+
return option.required;
|
|
102
|
+
},
|
|
103
|
+
get fallback() {
|
|
104
|
+
return (0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_typescript.IfStatement, {
|
|
105
|
+
get condition() {
|
|
106
|
+
return _alloy_js_core.code`!options${option.name.includes("?") ? `["${option.name}"]` : `.${(0, _stryke_string_format_camel_case.camelCase)(option.name)}`}.every(value => [${option.choices?.map((choice) => option.type === "string" ? `"${choice}"` : choice).join(", ")}].includes(value))`;
|
|
107
|
+
},
|
|
108
|
+
get children() {
|
|
109
|
+
return _alloy_js_core.code`failures.push(\`Invalid value provided for the \\"${option.name}\\" option - valid values include: ${(0, _stryke_string_format_list.list)(option?.choices?.map((choice) => String(choice)) ?? [])}; provided: \${options${option.name.includes("?") ? `["${option.name}"]` : `.${(0, _stryke_string_format_camel_case.camelCase)(option.name)}`}}\`);`;
|
|
110
|
+
}
|
|
111
|
+
});
|
|
112
|
+
},
|
|
113
|
+
get children() {
|
|
114
|
+
return (0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_typescript.ElseIfClause, {
|
|
115
|
+
get condition() {
|
|
116
|
+
return _alloy_js_core.code`!options${option.name.includes("?") ? `["${option.name}"]` : `.${(0, _stryke_string_format_camel_case.camelCase)(option.name)}`}.every(value => [${option.choices?.map((choice) => option.type === "string" ? `"${choice}"` : choice).join(", ")}].includes(value))`;
|
|
117
|
+
},
|
|
118
|
+
get children() {
|
|
119
|
+
return _alloy_js_core.code`failures.push(\`Invalid value provided for the \\"${option.name}\\" option - valid values include: ${(0, _stryke_string_format_list.list)(option?.choices?.map((choice) => String(choice)) ?? [])}; provided: \${options${option.name.includes("?") ? `["${option.name}"]` : `.${(0, _stryke_string_format_camel_case.camelCase)(option.name)}`}}\`);`;
|
|
120
|
+
}
|
|
121
|
+
});
|
|
122
|
+
}
|
|
123
|
+
});
|
|
124
|
+
},
|
|
125
|
+
get children() {
|
|
126
|
+
return (0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_core.Show, {
|
|
127
|
+
get when() {
|
|
128
|
+
return option.required;
|
|
129
|
+
},
|
|
130
|
+
get fallback() {
|
|
131
|
+
return (0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_typescript.IfStatement, {
|
|
132
|
+
get condition() {
|
|
133
|
+
return _alloy_js_core.code`![${option.choices?.map((choice) => option.type === "string" ? `"${choice}"` : choice).join(", ")}].includes(options${option.name.includes("?") ? `["${option.name}"]` : `.${(0, _stryke_string_format_camel_case.camelCase)(option.name)}`})`;
|
|
134
|
+
},
|
|
135
|
+
get children() {
|
|
136
|
+
return _alloy_js_core.code`failures.push(\`Invalid value provided for the \\"${option.name}\\" option - valid values include: ${(0, _stryke_string_format_list.list)(option?.choices?.map((choice) => String(choice)) ?? [])}; provided: \${options${option.name.includes("?") ? `["${option.name}"]` : `.${(0, _stryke_string_format_camel_case.camelCase)(option.name)}`}}\`);`;
|
|
137
|
+
}
|
|
138
|
+
});
|
|
139
|
+
},
|
|
140
|
+
get children() {
|
|
141
|
+
return (0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_typescript.ElseIfClause, {
|
|
142
|
+
get condition() {
|
|
143
|
+
return _alloy_js_core.code`![${option.choices?.map((choice) => option.type === "string" ? `"${choice}"` : choice).join(", ")}].includes(options${option.name.includes("?") ? `["${option.name}"]` : `.${(0, _stryke_string_format_camel_case.camelCase)(option.name)}`})`;
|
|
144
|
+
},
|
|
145
|
+
get children() {
|
|
146
|
+
return _alloy_js_core.code`failures.push(\`Invalid value provided for the \\"${option.name}\\" option - valid values include: ${(0, _stryke_string_format_list.list)(option?.choices?.map((choice) => String(choice)) ?? [])}; provided: \${options${option.name.includes("?") ? `["${option.name}"]` : `.${(0, _stryke_string_format_camel_case.camelCase)(option.name)}`}}\`);`;
|
|
147
|
+
}
|
|
148
|
+
});
|
|
149
|
+
}
|
|
150
|
+
});
|
|
151
|
+
}
|
|
152
|
+
});
|
|
153
|
+
}
|
|
154
|
+
})
|
|
155
|
+
]
|
|
156
|
+
}),
|
|
157
|
+
(0, _alloy_js_core_jsx_runtime.createComponent)(_power_plant_alloy_js_core_components_spacing.Spacing, {}),
|
|
158
|
+
(0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_core.For, {
|
|
159
|
+
get each() {
|
|
160
|
+
return command.args;
|
|
161
|
+
},
|
|
162
|
+
doubleHardline: true,
|
|
163
|
+
children: (argument) => [(0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_core.Show, {
|
|
164
|
+
get when() {
|
|
165
|
+
return argument.required;
|
|
166
|
+
},
|
|
167
|
+
get children() {
|
|
168
|
+
return [(0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_typescript.IfStatement, {
|
|
169
|
+
get condition() {
|
|
170
|
+
return _alloy_js_core.code`!${(0, _stryke_string_format_camel_case.camelCase)(argument.name)}`;
|
|
171
|
+
},
|
|
172
|
+
get children() {
|
|
173
|
+
return _alloy_js_core.code`failures.push("Missing required \\"${argument.name}\\" positional argument");`;
|
|
174
|
+
}
|
|
175
|
+
}), (0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_core.Show, {
|
|
176
|
+
get when() {
|
|
177
|
+
return argument.variadic;
|
|
178
|
+
},
|
|
179
|
+
get children() {
|
|
180
|
+
return (0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_typescript.ElseIfClause, {
|
|
181
|
+
get condition() {
|
|
182
|
+
return _alloy_js_core.code`${(0, _stryke_string_format_camel_case.camelCase)(argument.name)}.length === 0`;
|
|
183
|
+
},
|
|
184
|
+
get children() {
|
|
185
|
+
return _alloy_js_core.code`failures.push("No values were provided to the required \\"${argument.name}\\" array positional argument");`;
|
|
186
|
+
}
|
|
187
|
+
});
|
|
188
|
+
}
|
|
189
|
+
})];
|
|
190
|
+
}
|
|
191
|
+
}), (0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_core.Show, {
|
|
192
|
+
get when() {
|
|
193
|
+
return argument.type === "number";
|
|
194
|
+
},
|
|
195
|
+
get children() {
|
|
196
|
+
return (0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_core.Show, {
|
|
197
|
+
get when() {
|
|
198
|
+
return argument.variadic;
|
|
199
|
+
},
|
|
200
|
+
get fallback() {
|
|
201
|
+
return (0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_typescript.IfStatement, {
|
|
202
|
+
get condition() {
|
|
203
|
+
return _alloy_js_core.code`${(0, _stryke_string_format_camel_case.camelCase)(argument.name)} && Number.isNaN(${(0, _stryke_string_format_camel_case.camelCase)(argument.name)})`;
|
|
204
|
+
},
|
|
205
|
+
get children() {
|
|
206
|
+
return _alloy_js_core.code`failures.push("Invalid numeric value provided for the \\"${argument.name}\\" positional argument");`;
|
|
207
|
+
}
|
|
208
|
+
});
|
|
209
|
+
},
|
|
210
|
+
get children() {
|
|
211
|
+
return (0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_typescript.IfStatement, {
|
|
212
|
+
get condition() {
|
|
213
|
+
return _alloy_js_core.code`${(0, _stryke_string_format_camel_case.camelCase)(argument.name)}.some(value => Number.isNaN(value))`;
|
|
214
|
+
},
|
|
215
|
+
get children() {
|
|
216
|
+
return _alloy_js_core.code`failures.push("Invalid numeric value provided in the \\"${argument.name}\\" array positional argument");`;
|
|
217
|
+
}
|
|
218
|
+
});
|
|
219
|
+
}
|
|
220
|
+
});
|
|
221
|
+
}
|
|
222
|
+
})]
|
|
277
223
|
})
|
|
278
224
|
];
|
|
279
225
|
}
|
|
280
|
-
CommandValidationLogic.__type = [
|
|
281
|
-
() => __ΩCommandValidationLogicProps,
|
|
282
|
-
"props",
|
|
283
|
-
"CommandValidationLogic",
|
|
284
|
-
"A component that generates command validation logic for required options and arguments.",
|
|
285
|
-
"Pn!2\"\"/#?$"
|
|
286
|
-
];
|
|
287
226
|
|
|
288
227
|
//#endregion
|
|
289
|
-
exports.CommandValidationLogic = CommandValidationLogic;
|
|
290
|
-
exports.__ΩCommandValidationLogicProps = __ΩCommandValidationLogicProps;
|
|
291
|
-
//# sourceMappingURL=command-validation-logic.cjs.map
|
|
228
|
+
exports.CommandValidationLogic = CommandValidationLogic;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { CommandTree } from "../
|
|
1
|
+
import { S as CommandTree } from "../command-CtfR7hKM.cjs";
|
|
2
|
+
import "../index-DYOBadKY.cjs";
|
|
2
3
|
//#region src/components/command-validation-logic.d.ts
|
|
3
4
|
interface CommandValidationLogicProps {
|
|
4
5
|
command: CommandTree;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"command-validation-logic.d.cts","names":[],"sources":["../../src/components/command-validation-logic.tsx"],"mappings":"
|
|
1
|
+
{"version":3,"file":"command-validation-logic.d.cts","names":[],"sources":["../../src/components/command-validation-logic.tsx"],"mappings":";;;UAiCiB;EACf,SAAS;;;;;iBAMK,uBAAuB,OAAO,uDAA2B"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { CommandTree } from "../
|
|
1
|
+
import { S as CommandTree } from "../command-B6KYexlV.mjs";
|
|
2
|
+
import "../index-D4klH_pj.mjs";
|
|
2
3
|
//#region src/components/command-validation-logic.d.ts
|
|
3
4
|
interface CommandValidationLogicProps {
|
|
4
5
|
command: CommandTree;
|