@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,119 @@
|
|
|
1
|
-
Object.defineProperty(exports,Symbol.toStringTag,
|
|
1
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2
|
+
let _alloy_js_core_jsx_runtime = require("@alloy-js/core/jsx-runtime");
|
|
3
|
+
let _alloy_js_core = require("@alloy-js/core");
|
|
4
|
+
|
|
5
|
+
//#region src/components/helpers.tsx
|
|
6
|
+
function __assignType(fn, args) {
|
|
7
|
+
fn.__type = args;
|
|
8
|
+
return fn;
|
|
9
|
+
}
|
|
10
|
+
const __ΩBooleanInputParserLogicProps = [
|
|
11
|
+
"name",
|
|
12
|
+
"BooleanInputParserLogicProps",
|
|
13
|
+
"P&4!Mw\"y"
|
|
14
|
+
];
|
|
15
|
+
/**
|
|
16
|
+
* Parses a string input into a boolean value, interpreting common truthy and falsy string representations.
|
|
17
|
+
*/
|
|
18
|
+
function BooleanInputParserLogic(props) {
|
|
19
|
+
const { name } = props;
|
|
20
|
+
return [_alloy_js_core.code` !!${name} && ${name}.toLowerCase() !== "false" && ${name}.toLowerCase() !== "f" && ${name}.toLowerCase() !== "no" && ${name} !== "n" && ${name}.toLowerCase() !== "0" && ${name}.toLowerCase() !== "off" && ${name} !== "disable" && ${name}.toLowerCase() !== "disabled" && ${name}.toLowerCase() !== "never" && (Number.isNaN(Number.parseFloat(${name})) || Number.parseFloat(${name}) > 0) `];
|
|
21
|
+
}
|
|
22
|
+
BooleanInputParserLogic.__type = [
|
|
23
|
+
() => __ΩBooleanInputParserLogicProps,
|
|
24
|
+
"props",
|
|
25
|
+
"BooleanInputParserLogic",
|
|
26
|
+
"Parses a string input into a boolean value, interpreting common truthy and falsy string representations.",
|
|
27
|
+
"Pn!2\"\"/#?$"
|
|
28
|
+
];
|
|
29
|
+
/**
|
|
30
|
+
* Write the logic to determine if the application is running in debug mode.
|
|
31
|
+
*
|
|
32
|
+
* @remarks
|
|
33
|
+
* This is used to conditionally include debug-only logic in the generated application, such as additional logging or development tools. The logic should check for common indicators of debug mode, such as environment variables or the presence of a debugger.
|
|
34
|
+
*/
|
|
35
|
+
function IsDebug() {
|
|
36
|
+
return _alloy_js_core.code`isDevelopment || isDebug || env.LOG_LEVEL === "debug"`;
|
|
37
|
+
}
|
|
38
|
+
IsDebug.__type = [
|
|
39
|
+
"IsDebug",
|
|
40
|
+
"Write the logic to determine if the application is running in debug mode.",
|
|
41
|
+
"P\"/!?\""
|
|
42
|
+
];
|
|
43
|
+
/**
|
|
44
|
+
* Write the logic to determine if the application is **not** running in debug mode.
|
|
45
|
+
*/
|
|
46
|
+
function IsNotDebug() {
|
|
47
|
+
return [
|
|
48
|
+
_alloy_js_core.code`!(`,
|
|
49
|
+
(0, _alloy_js_core_jsx_runtime.createComponent)(IsDebug, {}),
|
|
50
|
+
_alloy_js_core.code`)`
|
|
51
|
+
];
|
|
52
|
+
}
|
|
53
|
+
IsNotDebug.__type = [
|
|
54
|
+
"IsNotDebug",
|
|
55
|
+
"Write the logic to determine if the application is **not** running in debug mode.",
|
|
56
|
+
"P\"/!?\""
|
|
57
|
+
];
|
|
58
|
+
/**
|
|
59
|
+
* Write the logic to determine if the application is running in verbose mode.
|
|
60
|
+
*
|
|
61
|
+
* @remarks
|
|
62
|
+
* This is used to conditionally include verbose-only logic in the generated application, such as additional logging or detailed output. The logic should check for common indicators of verbose mode, such as environment variables or command-line flags.
|
|
63
|
+
*/
|
|
64
|
+
function IsVerbose() {
|
|
65
|
+
return [
|
|
66
|
+
_alloy_js_core.code`( `,
|
|
67
|
+
(0, _alloy_js_core_jsx_runtime.createComponent)(IsDebug, {}),
|
|
68
|
+
_alloy_js_core.code`|| hasFlag(["verbose", "verbose=true", "verbose=always"]))`
|
|
69
|
+
];
|
|
70
|
+
}
|
|
71
|
+
IsVerbose.__type = [
|
|
72
|
+
"IsVerbose",
|
|
73
|
+
"Write the logic to determine if the application is running in verbose mode.",
|
|
74
|
+
"P\"/!?\""
|
|
75
|
+
];
|
|
76
|
+
/**
|
|
77
|
+
* Write the logic to determine if the application is **not** running in verbose mode.
|
|
78
|
+
*/
|
|
79
|
+
function IsNotVerbose() {
|
|
80
|
+
return [
|
|
81
|
+
_alloy_js_core.code`!(`,
|
|
82
|
+
(0, _alloy_js_core_jsx_runtime.createComponent)(IsVerbose, {}),
|
|
83
|
+
_alloy_js_core.code`)`
|
|
84
|
+
];
|
|
85
|
+
}
|
|
86
|
+
IsNotVerbose.__type = [
|
|
87
|
+
"IsNotVerbose",
|
|
88
|
+
"Write the logic to determine if the application is **not** running in verbose mode.",
|
|
89
|
+
"P\"/!?\""
|
|
90
|
+
];
|
|
91
|
+
/**
|
|
92
|
+
* Write the type declaration for a command parameter based on its configuration.
|
|
93
|
+
*/
|
|
94
|
+
function CommandParameterType(props) {
|
|
95
|
+
const { parameter } = props;
|
|
96
|
+
return _alloy_js_core.code`${(parameter.type === "string" || parameter.type === "number") && parameter.choices && parameter.choices.length > 0 ? parameter.choices.map(__assignType((choice) => typeof choice === "string" ? `"${choice}"` : choice, [
|
|
97
|
+
"choice",
|
|
98
|
+
"",
|
|
99
|
+
"P\"2!\"/\""
|
|
100
|
+
])).join(" | ") : parameter.type === "boolean" ? "boolean" : parameter.type === "number" ? "number" : "string"}${parameter.variadic ? "[]" : ""}${!parameter.required ? " | undefined" : ""}`;
|
|
101
|
+
}
|
|
102
|
+
CommandParameterType.__type = [
|
|
103
|
+
"CommandParameter",
|
|
104
|
+
"parameter",
|
|
105
|
+
"props",
|
|
106
|
+
"CommandParameterType",
|
|
107
|
+
"Write the type declaration for a command parameter based on its configuration.",
|
|
108
|
+
"PP\"w!4\"M2#\"/$?%"
|
|
109
|
+
];
|
|
110
|
+
|
|
111
|
+
//#endregion
|
|
112
|
+
exports.BooleanInputParserLogic = BooleanInputParserLogic;
|
|
113
|
+
exports.CommandParameterType = CommandParameterType;
|
|
114
|
+
exports.IsDebug = IsDebug;
|
|
115
|
+
exports.IsNotDebug = IsNotDebug;
|
|
116
|
+
exports.IsNotVerbose = IsNotVerbose;
|
|
117
|
+
exports.IsVerbose = IsVerbose;
|
|
118
|
+
exports.__ΩBooleanInputParserLogicProps = __ΩBooleanInputParserLogicProps;
|
|
119
|
+
//# sourceMappingURL=helpers.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"helpers.cjs","names":[],"sources":[],"mappings":""}
|
|
@@ -1,6 +1,4 @@
|
|
|
1
1
|
import { CommandParameter } from "../types/command.cjs";
|
|
2
|
-
import * as _$_alloy_js_core0 from "@alloy-js/core";
|
|
3
|
-
|
|
4
2
|
//#region src/components/helpers.d.ts
|
|
5
3
|
interface BooleanInputParserLogicProps {
|
|
6
4
|
name: string;
|
|
@@ -8,35 +6,35 @@ interface BooleanInputParserLogicProps {
|
|
|
8
6
|
/**
|
|
9
7
|
* Parses a string input into a boolean value, interpreting common truthy and falsy string representations.
|
|
10
8
|
*/
|
|
11
|
-
declare function BooleanInputParserLogic(props: BooleanInputParserLogicProps):
|
|
9
|
+
declare function BooleanInputParserLogic(props: BooleanInputParserLogicProps): import("@alloy-js/core").Children;
|
|
12
10
|
/**
|
|
13
11
|
* Write the logic to determine if the application is running in debug mode.
|
|
14
12
|
*
|
|
15
13
|
* @remarks
|
|
16
14
|
* This is used to conditionally include debug-only logic in the generated application, such as additional logging or development tools. The logic should check for common indicators of debug mode, such as environment variables or the presence of a debugger.
|
|
17
15
|
*/
|
|
18
|
-
declare function IsDebug():
|
|
16
|
+
declare function IsDebug(): import("@alloy-js/core").Children;
|
|
19
17
|
/**
|
|
20
18
|
* Write the logic to determine if the application is **not** running in debug mode.
|
|
21
19
|
*/
|
|
22
|
-
declare function IsNotDebug():
|
|
20
|
+
declare function IsNotDebug(): import("@alloy-js/core").Children;
|
|
23
21
|
/**
|
|
24
22
|
* Write the logic to determine if the application is running in verbose mode.
|
|
25
23
|
*
|
|
26
24
|
* @remarks
|
|
27
25
|
* This is used to conditionally include verbose-only logic in the generated application, such as additional logging or detailed output. The logic should check for common indicators of verbose mode, such as environment variables or command-line flags.
|
|
28
26
|
*/
|
|
29
|
-
declare function IsVerbose():
|
|
27
|
+
declare function IsVerbose(): import("@alloy-js/core").Children;
|
|
30
28
|
/**
|
|
31
29
|
* Write the logic to determine if the application is **not** running in verbose mode.
|
|
32
30
|
*/
|
|
33
|
-
declare function IsNotVerbose():
|
|
31
|
+
declare function IsNotVerbose(): import("@alloy-js/core").Children;
|
|
34
32
|
/**
|
|
35
33
|
* Write the type declaration for a command parameter based on its configuration.
|
|
36
34
|
*/
|
|
37
35
|
declare function CommandParameterType(props: {
|
|
38
36
|
parameter: CommandParameter;
|
|
39
|
-
}):
|
|
37
|
+
}): import("@alloy-js/core").Children;
|
|
40
38
|
//#endregion
|
|
41
39
|
export { BooleanInputParserLogic, BooleanInputParserLogicProps, CommandParameterType, IsDebug, IsNotDebug, IsNotVerbose, IsVerbose };
|
|
42
40
|
//# sourceMappingURL=helpers.d.cts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"helpers.d.cts","names":[],"sources":["../../src/components/helpers.tsx"],"mappings":"
|
|
1
|
+
{"version":3,"file":"helpers.d.cts","names":[],"sources":["../../src/components/helpers.tsx"],"mappings":";;UAqBiB,4BAAA;EACf,IAAI;AAAA;AADN;;;AAAA,iBAOgB,uBAAA,CAAwB,KAAA,EAAO,4BAA4B,4BAAA,QAAA;AANrE;AAMN;;;;;AANM,iBAgCU,OAAA,6BAAO,QAAA;;;AA1BoD;iBAiC3D,UAAA,6BAAU,QAAA;;;;AAPH;AAOvB;;iBAgBgB,SAAA,6BAAS,QAAA;;AAhBC;AAgB1B;iBAagB,YAAA,6BAAY,QAAA;;;AAbH;iBA0BT,oBAAA,CAAqB,KAAA;EAAS,SAAA,EAAW,gBAAgB;AAAA,6BAAE,QAAA"}
|
|
@@ -1,6 +1,4 @@
|
|
|
1
1
|
import { CommandParameter } from "../types/command.mjs";
|
|
2
|
-
import * as _$_alloy_js_core0 from "@alloy-js/core";
|
|
3
|
-
|
|
4
2
|
//#region src/components/helpers.d.ts
|
|
5
3
|
interface BooleanInputParserLogicProps {
|
|
6
4
|
name: string;
|
|
@@ -8,35 +6,35 @@ interface BooleanInputParserLogicProps {
|
|
|
8
6
|
/**
|
|
9
7
|
* Parses a string input into a boolean value, interpreting common truthy and falsy string representations.
|
|
10
8
|
*/
|
|
11
|
-
declare function BooleanInputParserLogic(props: BooleanInputParserLogicProps):
|
|
9
|
+
declare function BooleanInputParserLogic(props: BooleanInputParserLogicProps): import("@alloy-js/core").Children;
|
|
12
10
|
/**
|
|
13
11
|
* Write the logic to determine if the application is running in debug mode.
|
|
14
12
|
*
|
|
15
13
|
* @remarks
|
|
16
14
|
* This is used to conditionally include debug-only logic in the generated application, such as additional logging or development tools. The logic should check for common indicators of debug mode, such as environment variables or the presence of a debugger.
|
|
17
15
|
*/
|
|
18
|
-
declare function IsDebug():
|
|
16
|
+
declare function IsDebug(): import("@alloy-js/core").Children;
|
|
19
17
|
/**
|
|
20
18
|
* Write the logic to determine if the application is **not** running in debug mode.
|
|
21
19
|
*/
|
|
22
|
-
declare function IsNotDebug():
|
|
20
|
+
declare function IsNotDebug(): import("@alloy-js/core").Children;
|
|
23
21
|
/**
|
|
24
22
|
* Write the logic to determine if the application is running in verbose mode.
|
|
25
23
|
*
|
|
26
24
|
* @remarks
|
|
27
25
|
* This is used to conditionally include verbose-only logic in the generated application, such as additional logging or detailed output. The logic should check for common indicators of verbose mode, such as environment variables or command-line flags.
|
|
28
26
|
*/
|
|
29
|
-
declare function IsVerbose():
|
|
27
|
+
declare function IsVerbose(): import("@alloy-js/core").Children;
|
|
30
28
|
/**
|
|
31
29
|
* Write the logic to determine if the application is **not** running in verbose mode.
|
|
32
30
|
*/
|
|
33
|
-
declare function IsNotVerbose():
|
|
31
|
+
declare function IsNotVerbose(): import("@alloy-js/core").Children;
|
|
34
32
|
/**
|
|
35
33
|
* Write the type declaration for a command parameter based on its configuration.
|
|
36
34
|
*/
|
|
37
35
|
declare function CommandParameterType(props: {
|
|
38
36
|
parameter: CommandParameter;
|
|
39
|
-
}):
|
|
37
|
+
}): import("@alloy-js/core").Children;
|
|
40
38
|
//#endregion
|
|
41
39
|
export { BooleanInputParserLogic, BooleanInputParserLogicProps, CommandParameterType, IsDebug, IsNotDebug, IsNotVerbose, IsVerbose };
|
|
42
40
|
//# sourceMappingURL=helpers.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"helpers.d.mts","names":[],"sources":["../../src/components/helpers.tsx"],"mappings":"
|
|
1
|
+
{"version":3,"file":"helpers.d.mts","names":[],"sources":["../../src/components/helpers.tsx"],"mappings":""}
|
|
@@ -1,2 +1,112 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import { createComponent } from "@alloy-js/core/jsx-runtime";
|
|
2
|
+
import { code } from "@alloy-js/core";
|
|
3
|
+
|
|
4
|
+
//#region src/components/helpers.tsx
|
|
5
|
+
function __assignType(fn, args) {
|
|
6
|
+
fn.__type = args;
|
|
7
|
+
return fn;
|
|
8
|
+
}
|
|
9
|
+
const __ΩBooleanInputParserLogicProps = [
|
|
10
|
+
"name",
|
|
11
|
+
"BooleanInputParserLogicProps",
|
|
12
|
+
"P&4!Mw\"y"
|
|
13
|
+
];
|
|
14
|
+
/**
|
|
15
|
+
* Parses a string input into a boolean value, interpreting common truthy and falsy string representations.
|
|
16
|
+
*/
|
|
17
|
+
function BooleanInputParserLogic(props) {
|
|
18
|
+
const { name } = props;
|
|
19
|
+
return [code` !!${name} && ${name}.toLowerCase() !== "false" && ${name}.toLowerCase() !== "f" && ${name}.toLowerCase() !== "no" && ${name} !== "n" && ${name}.toLowerCase() !== "0" && ${name}.toLowerCase() !== "off" && ${name} !== "disable" && ${name}.toLowerCase() !== "disabled" && ${name}.toLowerCase() !== "never" && (Number.isNaN(Number.parseFloat(${name})) || Number.parseFloat(${name}) > 0) `];
|
|
20
|
+
}
|
|
21
|
+
BooleanInputParserLogic.__type = [
|
|
22
|
+
() => __ΩBooleanInputParserLogicProps,
|
|
23
|
+
"props",
|
|
24
|
+
"BooleanInputParserLogic",
|
|
25
|
+
"Parses a string input into a boolean value, interpreting common truthy and falsy string representations.",
|
|
26
|
+
"Pn!2\"\"/#?$"
|
|
27
|
+
];
|
|
28
|
+
/**
|
|
29
|
+
* Write the logic to determine if the application is running in debug mode.
|
|
30
|
+
*
|
|
31
|
+
* @remarks
|
|
32
|
+
* This is used to conditionally include debug-only logic in the generated application, such as additional logging or development tools. The logic should check for common indicators of debug mode, such as environment variables or the presence of a debugger.
|
|
33
|
+
*/
|
|
34
|
+
function IsDebug() {
|
|
35
|
+
return code`isDevelopment || isDebug || env.LOG_LEVEL === "debug"`;
|
|
36
|
+
}
|
|
37
|
+
IsDebug.__type = [
|
|
38
|
+
"IsDebug",
|
|
39
|
+
"Write the logic to determine if the application is running in debug mode.",
|
|
40
|
+
"P\"/!?\""
|
|
41
|
+
];
|
|
42
|
+
/**
|
|
43
|
+
* Write the logic to determine if the application is **not** running in debug mode.
|
|
44
|
+
*/
|
|
45
|
+
function IsNotDebug() {
|
|
46
|
+
return [
|
|
47
|
+
code`!(`,
|
|
48
|
+
createComponent(IsDebug, {}),
|
|
49
|
+
code`)`
|
|
50
|
+
];
|
|
51
|
+
}
|
|
52
|
+
IsNotDebug.__type = [
|
|
53
|
+
"IsNotDebug",
|
|
54
|
+
"Write the logic to determine if the application is **not** running in debug mode.",
|
|
55
|
+
"P\"/!?\""
|
|
56
|
+
];
|
|
57
|
+
/**
|
|
58
|
+
* Write the logic to determine if the application is running in verbose mode.
|
|
59
|
+
*
|
|
60
|
+
* @remarks
|
|
61
|
+
* This is used to conditionally include verbose-only logic in the generated application, such as additional logging or detailed output. The logic should check for common indicators of verbose mode, such as environment variables or command-line flags.
|
|
62
|
+
*/
|
|
63
|
+
function IsVerbose() {
|
|
64
|
+
return [
|
|
65
|
+
code`( `,
|
|
66
|
+
createComponent(IsDebug, {}),
|
|
67
|
+
code`|| hasFlag(["verbose", "verbose=true", "verbose=always"]))`
|
|
68
|
+
];
|
|
69
|
+
}
|
|
70
|
+
IsVerbose.__type = [
|
|
71
|
+
"IsVerbose",
|
|
72
|
+
"Write the logic to determine if the application is running in verbose mode.",
|
|
73
|
+
"P\"/!?\""
|
|
74
|
+
];
|
|
75
|
+
/**
|
|
76
|
+
* Write the logic to determine if the application is **not** running in verbose mode.
|
|
77
|
+
*/
|
|
78
|
+
function IsNotVerbose() {
|
|
79
|
+
return [
|
|
80
|
+
code`!(`,
|
|
81
|
+
createComponent(IsVerbose, {}),
|
|
82
|
+
code`)`
|
|
83
|
+
];
|
|
84
|
+
}
|
|
85
|
+
IsNotVerbose.__type = [
|
|
86
|
+
"IsNotVerbose",
|
|
87
|
+
"Write the logic to determine if the application is **not** running in verbose mode.",
|
|
88
|
+
"P\"/!?\""
|
|
89
|
+
];
|
|
90
|
+
/**
|
|
91
|
+
* Write the type declaration for a command parameter based on its configuration.
|
|
92
|
+
*/
|
|
93
|
+
function CommandParameterType(props) {
|
|
94
|
+
const { parameter } = props;
|
|
95
|
+
return code`${(parameter.type === "string" || parameter.type === "number") && parameter.choices && parameter.choices.length > 0 ? parameter.choices.map(__assignType((choice) => typeof choice === "string" ? `"${choice}"` : choice, [
|
|
96
|
+
"choice",
|
|
97
|
+
"",
|
|
98
|
+
"P\"2!\"/\""
|
|
99
|
+
])).join(" | ") : parameter.type === "boolean" ? "boolean" : parameter.type === "number" ? "number" : "string"}${parameter.variadic ? "[]" : ""}${!parameter.required ? " | undefined" : ""}`;
|
|
100
|
+
}
|
|
101
|
+
CommandParameterType.__type = [
|
|
102
|
+
"CommandParameter",
|
|
103
|
+
"parameter",
|
|
104
|
+
"props",
|
|
105
|
+
"CommandParameterType",
|
|
106
|
+
"Write the type declaration for a command parameter based on its configuration.",
|
|
107
|
+
"PP\"w!4\"M2#\"/$?%"
|
|
108
|
+
];
|
|
109
|
+
|
|
110
|
+
//#endregion
|
|
111
|
+
export { BooleanInputParserLogic, CommandParameterType, IsDebug, IsNotDebug, IsNotVerbose, IsVerbose, __ΩBooleanInputParserLogicProps };
|
|
2
112
|
//# sourceMappingURL=helpers.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"helpers.mjs","names":[],"sources":[
|
|
1
|
+
{"version":3,"file":"helpers.mjs","names":[],"sources":[],"mappings":""}
|
|
@@ -1 +1,58 @@
|
|
|
1
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value
|
|
1
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2
|
+
const require_components_usage = require('./usage.cjs');
|
|
3
|
+
const require_components_docs = require('./docs.cjs');
|
|
4
|
+
const require_components_exec_builtin = require('./exec-builtin.cjs');
|
|
5
|
+
const require_components_helpers = require('./helpers.cjs');
|
|
6
|
+
const require_components_options_parser_logic = require('./options-parser-logic.cjs');
|
|
7
|
+
const require_components_state_builtin = require('./state-builtin.cjs');
|
|
8
|
+
const require_components_utils_builtin = require('./utils-builtin.cjs');
|
|
9
|
+
const require_components_command_validation_logic = require('./command-validation-logic.cjs');
|
|
10
|
+
|
|
11
|
+
exports.ArgsUtilities = require_components_state_builtin.ArgsUtilities;
|
|
12
|
+
exports.ArgumentsParserLogic = require_components_options_parser_logic.ArgumentsParserLogic;
|
|
13
|
+
exports.BooleanInputParserLogic = require_components_helpers.BooleanInputParserLogic;
|
|
14
|
+
exports.ColorSupportUtilities = require_components_utils_builtin.ColorSupportUtilities;
|
|
15
|
+
exports.CommandDocs = require_components_docs.CommandDocs;
|
|
16
|
+
exports.CommandDocsFile = require_components_docs.CommandDocsFile;
|
|
17
|
+
exports.CommandDocsUsageExample = require_components_docs.CommandDocsUsageExample;
|
|
18
|
+
exports.CommandOptionsDocs = require_components_docs.CommandOptionsDocs;
|
|
19
|
+
exports.CommandParameterType = require_components_helpers.CommandParameterType;
|
|
20
|
+
exports.CommandParserLogic = require_components_options_parser_logic.CommandParserLogic;
|
|
21
|
+
exports.CommandValidationLogic = require_components_command_validation_logic.CommandValidationLogic;
|
|
22
|
+
exports.ContextUtilities = require_components_state_builtin.ContextUtilities;
|
|
23
|
+
exports.DynamicSegmentsParserLogic = require_components_options_parser_logic.DynamicSegmentsParserLogic;
|
|
24
|
+
exports.EnvSupportUtilities = require_components_utils_builtin.EnvSupportUtilities;
|
|
25
|
+
exports.ExecBuiltin = require_components_exec_builtin.ExecBuiltin;
|
|
26
|
+
exports.FindSuggestionsDeclaration = require_components_utils_builtin.FindSuggestionsDeclaration;
|
|
27
|
+
exports.GlobalTypeDefinitions = require_components_state_builtin.GlobalTypeDefinitions;
|
|
28
|
+
exports.HyperlinkSupportUtilities = require_components_utils_builtin.HyperlinkSupportUtilities;
|
|
29
|
+
exports.IsDebug = require_components_helpers.IsDebug;
|
|
30
|
+
exports.IsNotDebug = require_components_helpers.IsNotDebug;
|
|
31
|
+
exports.IsNotVerbose = require_components_helpers.IsNotVerbose;
|
|
32
|
+
exports.IsVerbose = require_components_helpers.IsVerbose;
|
|
33
|
+
exports.OptionsInterfaceDeclaration = require_components_options_parser_logic.OptionsInterfaceDeclaration;
|
|
34
|
+
exports.OptionsMember = require_components_options_parser_logic.OptionsMember;
|
|
35
|
+
exports.OptionsMemberParserCondition = require_components_options_parser_logic.OptionsMemberParserCondition;
|
|
36
|
+
exports.OptionsMemberParserLogic = require_components_options_parser_logic.OptionsMemberParserLogic;
|
|
37
|
+
exports.OptionsParserLogic = require_components_options_parser_logic.OptionsParserLogic;
|
|
38
|
+
exports.ResolveModuleFunctionDeclaration = require_components_utils_builtin.ResolveModuleFunctionDeclaration;
|
|
39
|
+
exports.StateBuiltin = require_components_state_builtin.StateBuiltin;
|
|
40
|
+
exports.TerminalSizeDeclaration = require_components_utils_builtin.TerminalSizeDeclaration;
|
|
41
|
+
exports.Usage = require_components_usage.Usage;
|
|
42
|
+
exports.UtilsBuiltin = require_components_utils_builtin.UtilsBuiltin;
|
|
43
|
+
exports.__ΩArgumentsParserLogicProps = require_components_options_parser_logic.__ΩArgumentsParserLogicProps;
|
|
44
|
+
exports.__ΩBooleanInputParserLogicProps = require_components_helpers.__ΩBooleanInputParserLogicProps;
|
|
45
|
+
exports.__ΩCommandDocsFileProps = require_components_docs.__ΩCommandDocsFileProps;
|
|
46
|
+
exports.__ΩCommandDocsProps = require_components_docs.__ΩCommandDocsProps;
|
|
47
|
+
exports.__ΩCommandDocsUsageExampleProps = require_components_docs.__ΩCommandDocsUsageExampleProps;
|
|
48
|
+
exports.__ΩCommandOptionsDocsProps = require_components_docs.__ΩCommandOptionsDocsProps;
|
|
49
|
+
exports.__ΩCommandParserLogicProps = require_components_options_parser_logic.__ΩCommandParserLogicProps;
|
|
50
|
+
exports.__ΩCommandValidationLogicProps = require_components_command_validation_logic.__ΩCommandValidationLogicProps;
|
|
51
|
+
exports.__ΩDynamicSegmentsParserLogicProps = require_components_options_parser_logic.__ΩDynamicSegmentsParserLogicProps;
|
|
52
|
+
exports.__ΩExecBuiltinProps = require_components_exec_builtin.__ΩExecBuiltinProps;
|
|
53
|
+
exports.__ΩOptionsMemberParserConditionProps = require_components_options_parser_logic.__ΩOptionsMemberParserConditionProps;
|
|
54
|
+
exports.__ΩOptionsMemberParserLogicProps = require_components_options_parser_logic.__ΩOptionsMemberParserLogicProps;
|
|
55
|
+
exports.__ΩOptionsParserLogicProps = require_components_options_parser_logic.__ΩOptionsParserLogicProps;
|
|
56
|
+
exports.__ΩStateBuiltinProps = require_components_state_builtin.__ΩStateBuiltinProps;
|
|
57
|
+
exports.__ΩUsageProps = require_components_usage.__ΩUsageProps;
|
|
58
|
+
exports.__ΩUtilsBuiltinProps = require_components_utils_builtin.__ΩUtilsBuiltinProps;
|
|
@@ -1 +1,10 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { Usage, __ΩUsageProps } from "./usage.mjs";
|
|
2
|
+
import { CommandDocs, CommandDocsFile, CommandDocsUsageExample, CommandOptionsDocs, __ΩCommandDocsFileProps, __ΩCommandDocsProps, __ΩCommandDocsUsageExampleProps, __ΩCommandOptionsDocsProps } from "./docs.mjs";
|
|
3
|
+
import { ExecBuiltin, __ΩExecBuiltinProps } from "./exec-builtin.mjs";
|
|
4
|
+
import { BooleanInputParserLogic, CommandParameterType, IsDebug, IsNotDebug, IsNotVerbose, IsVerbose, __ΩBooleanInputParserLogicProps } from "./helpers.mjs";
|
|
5
|
+
import { ArgumentsParserLogic, CommandParserLogic, DynamicSegmentsParserLogic, OptionsInterfaceDeclaration, OptionsMember, OptionsMemberParserCondition, OptionsMemberParserLogic, OptionsParserLogic, __ΩArgumentsParserLogicProps, __ΩCommandParserLogicProps, __ΩDynamicSegmentsParserLogicProps, __ΩOptionsMemberParserConditionProps, __ΩOptionsMemberParserLogicProps, __ΩOptionsParserLogicProps } from "./options-parser-logic.mjs";
|
|
6
|
+
import { ArgsUtilities, ContextUtilities, GlobalTypeDefinitions, StateBuiltin, __ΩStateBuiltinProps } from "./state-builtin.mjs";
|
|
7
|
+
import { ColorSupportUtilities, EnvSupportUtilities, FindSuggestionsDeclaration, HyperlinkSupportUtilities, ResolveModuleFunctionDeclaration, TerminalSizeDeclaration, UtilsBuiltin, __ΩUtilsBuiltinProps } from "./utils-builtin.mjs";
|
|
8
|
+
import { CommandValidationLogic, __ΩCommandValidationLogicProps } from "./command-validation-logic.mjs";
|
|
9
|
+
|
|
10
|
+
export { ArgsUtilities, ArgumentsParserLogic, BooleanInputParserLogic, ColorSupportUtilities, CommandDocs, CommandDocsFile, CommandDocsUsageExample, CommandOptionsDocs, CommandParameterType, CommandParserLogic, CommandValidationLogic, ContextUtilities, DynamicSegmentsParserLogic, EnvSupportUtilities, ExecBuiltin, FindSuggestionsDeclaration, GlobalTypeDefinitions, HyperlinkSupportUtilities, IsDebug, IsNotDebug, IsNotVerbose, IsVerbose, OptionsInterfaceDeclaration, OptionsMember, OptionsMemberParserCondition, OptionsMemberParserLogic, OptionsParserLogic, ResolveModuleFunctionDeclaration, StateBuiltin, TerminalSizeDeclaration, Usage, UtilsBuiltin, __ΩArgumentsParserLogicProps, __ΩBooleanInputParserLogicProps, __ΩCommandDocsFileProps, __ΩCommandDocsProps, __ΩCommandDocsUsageExampleProps, __ΩCommandOptionsDocsProps, __ΩCommandParserLogicProps, __ΩCommandValidationLogicProps, __ΩDynamicSegmentsParserLogicProps, __ΩExecBuiltinProps, __ΩOptionsMemberParserConditionProps, __ΩOptionsMemberParserLogicProps, __ΩOptionsParserLogicProps, __ΩStateBuiltinProps, __ΩUsageProps, __ΩUtilsBuiltinProps };
|