@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
package/dist/components/docs.cjs
CHANGED
|
@@ -1,366 +1,8 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2
|
-
const
|
|
3
|
-
const require_docs_helpers = require('../helpers/docs-helpers.cjs');
|
|
4
|
-
const require_context_helpers = require('../plugin-utils/context-helpers.cjs');
|
|
5
|
-
const require_reflect = require('../plugin-utils/reflect.cjs');
|
|
6
|
-
const require_components_usage = require('./usage.cjs');
|
|
7
|
-
let _alloy_js_core_jsx_runtime = require("@alloy-js/core/jsx-runtime");
|
|
8
|
-
let _alloy_js_core = require("@alloy-js/core");
|
|
9
|
-
let defu = require("defu");
|
|
10
|
-
let _alloy_js_markdown = require("@alloy-js/markdown");
|
|
11
|
-
let _powerlines_plugin_alloy_core_components_spacing = require("@powerlines/plugin-alloy/core/components/spacing");
|
|
12
|
-
let _powerlines_plugin_alloy_core_contexts_context = require("@powerlines/plugin-alloy/core/contexts/context");
|
|
13
|
-
let _powerlines_plugin_alloy_markdown_components_markdown_file = require("@powerlines/plugin-alloy/markdown/components/markdown-file");
|
|
14
|
-
let _powerlines_plugin_alloy_markdown_components_markdown_table = require("@powerlines/plugin-alloy/markdown/components/markdown-table");
|
|
15
|
-
let _stryke_path_join = require("@stryke/path/join");
|
|
16
|
-
let _stryke_string_format_list = require("@stryke/string-format/list");
|
|
17
|
-
let _stryke_type_checks_is_undefined = require("@stryke/type-checks/is-undefined");
|
|
2
|
+
const require_docs = require('../docs-C6ZvsVMu.cjs');
|
|
18
3
|
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
];
|
|
25
|
-
const __ΩPartial = [
|
|
26
|
-
"T",
|
|
27
|
-
"Partial",
|
|
28
|
-
"l+e#!e\"!fRb!Pde\"!gN#\"w\"y"
|
|
29
|
-
];
|
|
30
|
-
function __assignType(fn, args) {
|
|
31
|
-
fn.__type = args;
|
|
32
|
-
return fn;
|
|
33
|
-
}
|
|
34
|
-
const __ΩCommandParametersDocsProps = [
|
|
35
|
-
"CommandTree",
|
|
36
|
-
"command",
|
|
37
|
-
"The command to generate options documentation for.",
|
|
38
|
-
"CommandParametersDocsProps",
|
|
39
|
-
"P\"w!4\"?#Mw$y"
|
|
40
|
-
];
|
|
41
|
-
/**
|
|
42
|
-
* Generates the arguments markdown documentation for a command.
|
|
43
|
-
*/
|
|
44
|
-
function CommandArgumentDocs(props) {
|
|
45
|
-
const { command } = props;
|
|
46
|
-
if (Object.keys(command.options).length === 0) return _alloy_js_core.code`This command does not have any arguments.`;
|
|
47
|
-
return (0, _alloy_js_core_jsx_runtime.createComponent)(_powerlines_plugin_alloy_markdown_components_markdown_table.MarkdownTable, { get data() {
|
|
48
|
-
return require_reflect.sortOptions(Object.values(command.options)).reduce(__assignType((ret, option) => {
|
|
49
|
-
ret.push({
|
|
50
|
-
name: option.name.trim(),
|
|
51
|
-
description: option.description.trim(),
|
|
52
|
-
defaultValue: (0, _stryke_type_checks_is_undefined.isUndefined)(option.default) ? "" : JSON.stringify(option.default),
|
|
53
|
-
required: !option.required || option.default ? "" : "✔"
|
|
54
|
-
});
|
|
55
|
-
return ret;
|
|
56
|
-
}, [
|
|
57
|
-
"ret",
|
|
58
|
-
"option",
|
|
59
|
-
"",
|
|
60
|
-
"P\"2!\"2\"\"/#"
|
|
61
|
-
]), []);
|
|
62
|
-
} });
|
|
63
|
-
}
|
|
64
|
-
CommandArgumentDocs.__type = [
|
|
65
|
-
() => __ΩCommandParametersDocsProps,
|
|
66
|
-
"props",
|
|
67
|
-
"CommandArgumentDocs",
|
|
68
|
-
"Generates the arguments markdown documentation for a command.",
|
|
69
|
-
"Pn!2\"\"/#?$"
|
|
70
|
-
];
|
|
71
|
-
/**
|
|
72
|
-
* Generates the options markdown documentation for a command.
|
|
73
|
-
*/
|
|
74
|
-
function CommandOptionsDocs(props) {
|
|
75
|
-
const { command } = props;
|
|
76
|
-
if (Object.keys(command.options).length === 0) return _alloy_js_core.code`This command does not have any options.`;
|
|
77
|
-
return (0, _alloy_js_core_jsx_runtime.createComponent)(_powerlines_plugin_alloy_markdown_components_markdown_table.MarkdownTable, { get data() {
|
|
78
|
-
return require_reflect.sortOptions(Object.values(command.options)).reduce(__assignType((ret, option) => {
|
|
79
|
-
ret.push({
|
|
80
|
-
name: option.name.trim(),
|
|
81
|
-
description: option.description.trim(),
|
|
82
|
-
defaultValue: (0, _stryke_type_checks_is_undefined.isUndefined)(option.default) ? "" : JSON.stringify(option.default),
|
|
83
|
-
required: !option.required || option.default ? "" : "✔"
|
|
84
|
-
});
|
|
85
|
-
return ret;
|
|
86
|
-
}, [
|
|
87
|
-
"ret",
|
|
88
|
-
"option",
|
|
89
|
-
"",
|
|
90
|
-
"P\"2!\"2\"\"/#"
|
|
91
|
-
]), []);
|
|
92
|
-
} });
|
|
93
|
-
}
|
|
94
|
-
CommandOptionsDocs.__type = [
|
|
95
|
-
() => __ΩCommandParametersDocsProps,
|
|
96
|
-
"props",
|
|
97
|
-
"CommandOptionsDocs",
|
|
98
|
-
"Generates the options markdown documentation for a command.",
|
|
99
|
-
"Pn!2\"\"/#?$"
|
|
100
|
-
];
|
|
101
|
-
const __ΩCommandDocsUsageExampleProps = [
|
|
102
|
-
"npm",
|
|
103
|
-
"yarn",
|
|
104
|
-
"pnpm",
|
|
105
|
-
"bun",
|
|
106
|
-
"packageManager",
|
|
107
|
-
"npm",
|
|
108
|
-
"The package manager to generate the usage example for.",
|
|
109
|
-
"CommandTree",
|
|
110
|
-
"command",
|
|
111
|
-
"The command to generate the usage example for.",
|
|
112
|
-
"expand",
|
|
113
|
-
true,
|
|
114
|
-
"Whether to add expand/collapse details tags around the usage example. This is useful for hiding long usage examples by default.",
|
|
115
|
-
"CommandDocsUsageExampleProps",
|
|
116
|
-
"PP.!.\".#.$J4%8>&?'\"w(4)?*)4+8>,?-Mw.y"
|
|
117
|
-
];
|
|
118
|
-
/**
|
|
119
|
-
* Generates the markdown documentation for a command.
|
|
120
|
-
*/
|
|
121
|
-
function CommandDocsUsageExample(props) {
|
|
122
|
-
const { packageManager = "npm", command, expand = false } = props;
|
|
123
|
-
const context = (_powerlines_plugin_alloy_core_contexts_context.usePowerlines.Ω = [["Context", "\"w!"]], (0, _powerlines_plugin_alloy_core_contexts_context.usePowerlines)());
|
|
124
|
-
return [
|
|
125
|
-
(0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_core.Show, {
|
|
126
|
-
when: expand,
|
|
127
|
-
fallback: _alloy_js_core.code`\`\`\`sh `,
|
|
128
|
-
get children() {
|
|
129
|
-
return [
|
|
130
|
-
_alloy_js_core.code`<details>
|
|
131
|
-
<summary>Using ${packageManager}:</summary>`,
|
|
132
|
-
(0, _alloy_js_core_jsx_runtime.createComponent)(_powerlines_plugin_alloy_core_components_spacing.Spacing, {}),
|
|
133
|
-
_alloy_js_core.code`\`\`\`sh `
|
|
134
|
-
];
|
|
135
|
-
}
|
|
136
|
-
}),
|
|
137
|
-
(0, _alloy_js_core_jsx_runtime.createIntrinsic)("hbr", {}),
|
|
138
|
-
(0, _alloy_js_core_jsx_runtime.createComponent)(require_components_usage.Usage, {
|
|
139
|
-
command,
|
|
140
|
-
get bin() {
|
|
141
|
-
return require_context_helpers.getAppBin(context);
|
|
142
|
-
},
|
|
143
|
-
packageManager
|
|
144
|
-
}),
|
|
145
|
-
(0, _alloy_js_core_jsx_runtime.createIntrinsic)("hbr", {}),
|
|
146
|
-
(0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_core.Show, {
|
|
147
|
-
when: expand,
|
|
148
|
-
fallback: _alloy_js_core.code`\`\`\` `,
|
|
149
|
-
get children() {
|
|
150
|
-
return [
|
|
151
|
-
_alloy_js_core.code`\`\`\``,
|
|
152
|
-
(0, _alloy_js_core_jsx_runtime.createComponent)(_powerlines_plugin_alloy_core_components_spacing.Spacing, {}),
|
|
153
|
-
_alloy_js_core.code`</details>`
|
|
154
|
-
];
|
|
155
|
-
}
|
|
156
|
-
})
|
|
157
|
-
];
|
|
158
|
-
}
|
|
159
|
-
CommandDocsUsageExample.__type = [
|
|
160
|
-
() => __ΩCommandDocsUsageExampleProps,
|
|
161
|
-
"props",
|
|
162
|
-
"CommandDocsUsageExample",
|
|
163
|
-
"Generates the markdown documentation for a command.",
|
|
164
|
-
"Pn!2\"\"/#?$"
|
|
165
|
-
];
|
|
166
|
-
const __ΩCommandDocsProps = [
|
|
167
|
-
"levelOffset",
|
|
168
|
-
0,
|
|
169
|
-
"The heading level offset to apply to the generated documentation.",
|
|
170
|
-
"CommandTree",
|
|
171
|
-
"command",
|
|
172
|
-
"The command to generate options documentation for.",
|
|
173
|
-
() => __ΩRequired,
|
|
174
|
-
() => __ΩCommandDocsUsageExampleProps,
|
|
175
|
-
"packageManager",
|
|
176
|
-
"usageExamples",
|
|
177
|
-
"`[\"npm\"]`",
|
|
178
|
-
"Optional usage examples to include in the documentation.",
|
|
179
|
-
"CommandDocsProps",
|
|
180
|
-
"P'4!8>\"?#\"w$4%?&n(o'\".)fF4*8>+?,Mw-y"
|
|
181
|
-
];
|
|
182
|
-
/**
|
|
183
|
-
* Generates the markdown documentation for a command.
|
|
184
|
-
*/
|
|
185
|
-
function CommandDocs(props) {
|
|
186
|
-
const { levelOffset = 0, command, usageExamples } = props;
|
|
187
|
-
return [
|
|
188
|
-
(0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_markdown.Heading, {
|
|
189
|
-
level: 1 + levelOffset,
|
|
190
|
-
get children() {
|
|
191
|
-
return `${command.title}${command.tags.includes("deprecated") ? " (Deprecated)" : command.tags.includes("beta") ? " (Beta)" : command.tags.includes("alpha") ? " (Alpha)" : command.tags.includes("experimental") ? " (Experimental)" : ""}`;
|
|
192
|
-
}
|
|
193
|
-
}),
|
|
194
|
-
(0, _alloy_js_core_jsx_runtime.createComponent)(_powerlines_plugin_alloy_core_components_spacing.Spacing, {}),
|
|
195
|
-
(0, _alloy_js_core_jsx_runtime.memo)(() => _alloy_js_core.code`${command.description}`),
|
|
196
|
-
(0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_core.Show, {
|
|
197
|
-
get when() {
|
|
198
|
-
return command.alias && command.alias.length > 0;
|
|
199
|
-
},
|
|
200
|
-
get children() {
|
|
201
|
-
return [(0, _alloy_js_core_jsx_runtime.createComponent)(_powerlines_plugin_alloy_core_components_spacing.Spacing, {}), (0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_core.Show, {
|
|
202
|
-
get when() {
|
|
203
|
-
return command.alias.length > 1;
|
|
204
|
-
},
|
|
205
|
-
get fallback() {
|
|
206
|
-
return _alloy_js_core.code`The \`${command.name}\` command can also be invoked using the alias \`${command.alias[0]}\`.`;
|
|
207
|
-
},
|
|
208
|
-
get children() {
|
|
209
|
-
return _alloy_js_core.code`The \`${command.name}\` command can also be invoked using the following aliases: ${(0, _stryke_string_format_list.list)(command.alias.map(__assignType((alias) => `\`${alias}\``, [
|
|
210
|
-
"alias",
|
|
211
|
-
"",
|
|
212
|
-
"P\"2!\"/\""
|
|
213
|
-
])), { conjunction: "or" })}.`;
|
|
214
|
-
}
|
|
215
|
-
})];
|
|
216
|
-
}
|
|
217
|
-
}),
|
|
218
|
-
(0, _alloy_js_core_jsx_runtime.createComponent)(_powerlines_plugin_alloy_core_components_spacing.Spacing, {}),
|
|
219
|
-
(0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_markdown.Heading, {
|
|
220
|
-
level: 2 + levelOffset,
|
|
221
|
-
children: "Usage"
|
|
222
|
-
}),
|
|
223
|
-
(0, _alloy_js_core_jsx_runtime.createComponent)(_powerlines_plugin_alloy_core_components_spacing.Spacing, {}),
|
|
224
|
-
(0, _alloy_js_core_jsx_runtime.memo)(() => _alloy_js_core.code`The \`${command.name}\` command can be executed using the following syntax: `),
|
|
225
|
-
(0, _alloy_js_core_jsx_runtime.createComponent)(_powerlines_plugin_alloy_core_components_spacing.Spacing, {}),
|
|
226
|
-
(0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_core.Show, {
|
|
227
|
-
get when() {
|
|
228
|
-
return usageExamples && usageExamples.length > 0;
|
|
229
|
-
},
|
|
230
|
-
get fallback() {
|
|
231
|
-
return (0, _alloy_js_core_jsx_runtime.createComponent)(CommandDocsUsageExample, {
|
|
232
|
-
packageManager: "npm",
|
|
233
|
-
command
|
|
234
|
-
});
|
|
235
|
-
},
|
|
236
|
-
get children() {
|
|
237
|
-
return (0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_core.For, {
|
|
238
|
-
each: usageExamples,
|
|
239
|
-
doubleHardline: true,
|
|
240
|
-
get children() {
|
|
241
|
-
return __assignType((packageManager) => (0, _alloy_js_core_jsx_runtime.createComponent)(CommandDocsUsageExample, {
|
|
242
|
-
packageManager,
|
|
243
|
-
command,
|
|
244
|
-
get expand() {
|
|
245
|
-
return usageExamples && usageExamples.length > 1;
|
|
246
|
-
}
|
|
247
|
-
}), [
|
|
248
|
-
"packageManager",
|
|
249
|
-
"",
|
|
250
|
-
"P\"2!\"/\""
|
|
251
|
-
]);
|
|
252
|
-
}
|
|
253
|
-
});
|
|
254
|
-
}
|
|
255
|
-
}),
|
|
256
|
-
(0, _alloy_js_core_jsx_runtime.createComponent)(_powerlines_plugin_alloy_core_components_spacing.Spacing, {}),
|
|
257
|
-
(0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_core.Show, {
|
|
258
|
-
get when() {
|
|
259
|
-
return command.args.length > 0;
|
|
260
|
-
},
|
|
261
|
-
get children() {
|
|
262
|
-
return [
|
|
263
|
-
(0, _alloy_js_core_jsx_runtime.createComponent)(_powerlines_plugin_alloy_core_components_spacing.Spacing, {}),
|
|
264
|
-
(0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_markdown.Heading, {
|
|
265
|
-
level: 2 + levelOffset,
|
|
266
|
-
children: "Positional Arguments"
|
|
267
|
-
}),
|
|
268
|
-
(0, _alloy_js_core_jsx_runtime.createComponent)(_powerlines_plugin_alloy_core_components_spacing.Spacing, {}),
|
|
269
|
-
(0, _alloy_js_core_jsx_runtime.memo)(() => _alloy_js_core.code`The following positional arguments are available for the \`${command.name}\` command:`),
|
|
270
|
-
(0, _alloy_js_core_jsx_runtime.createComponent)(_powerlines_plugin_alloy_core_components_spacing.Spacing, {}),
|
|
271
|
-
(0, _alloy_js_core_jsx_runtime.createComponent)(CommandArgumentDocs, { command }),
|
|
272
|
-
(0, _alloy_js_core_jsx_runtime.createComponent)(_powerlines_plugin_alloy_core_components_spacing.Spacing, {})
|
|
273
|
-
];
|
|
274
|
-
}
|
|
275
|
-
}),
|
|
276
|
-
(0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_markdown.Heading, {
|
|
277
|
-
level: 2 + levelOffset,
|
|
278
|
-
children: "Options"
|
|
279
|
-
}),
|
|
280
|
-
(0, _alloy_js_core_jsx_runtime.createComponent)(_powerlines_plugin_alloy_core_components_spacing.Spacing, {}),
|
|
281
|
-
(0, _alloy_js_core_jsx_runtime.memo)(() => _alloy_js_core.code`The following options are available for the \`${command.name}\` command:`),
|
|
282
|
-
(0, _alloy_js_core_jsx_runtime.createComponent)(_powerlines_plugin_alloy_core_components_spacing.Spacing, {}),
|
|
283
|
-
(0, _alloy_js_core_jsx_runtime.createComponent)(CommandOptionsDocs, { command }),
|
|
284
|
-
(0, _alloy_js_core_jsx_runtime.createComponent)(_powerlines_plugin_alloy_core_components_spacing.Spacing, {})
|
|
285
|
-
];
|
|
286
|
-
}
|
|
287
|
-
CommandDocs.__type = [
|
|
288
|
-
() => __ΩCommandDocsProps,
|
|
289
|
-
"props",
|
|
290
|
-
"CommandDocs",
|
|
291
|
-
"Generates the markdown documentation for a command.",
|
|
292
|
-
"Pn!2\"\"/#?$"
|
|
293
|
-
];
|
|
294
|
-
const __ΩCommandDocsFileProps = [
|
|
295
|
-
() => __ΩPartial,
|
|
296
|
-
"levelOffset",
|
|
297
|
-
0,
|
|
298
|
-
"The heading level offset to apply to the generated documentation.",
|
|
299
|
-
"CommandTree",
|
|
300
|
-
"command",
|
|
301
|
-
"The command to generate documentation for.",
|
|
302
|
-
"CommandDocsFileProps",
|
|
303
|
-
"P!o!\"'4\"8>#?$\"w%4&?'Mw(y"
|
|
304
|
-
];
|
|
305
|
-
/**
|
|
306
|
-
* Generates the markdown documentation file for a command.
|
|
307
|
-
*/
|
|
308
|
-
function CommandDocsFile(props) {
|
|
309
|
-
const { levelOffset = 0, command, frontMatter, ...rest } = props;
|
|
310
|
-
const context = (_powerlines_plugin_alloy_core_contexts_context.usePowerlines.Ω = [["Context", "\"w!"]], (0, _powerlines_plugin_alloy_core_contexts_context.usePowerlines)());
|
|
311
|
-
const usageExamples = (0, _alloy_js_core.memo)(() => [
|
|
312
|
-
"npm",
|
|
313
|
-
"yarn",
|
|
314
|
-
"pnpm",
|
|
315
|
-
"bun"
|
|
316
|
-
]);
|
|
317
|
-
return (0, _alloy_js_core_jsx_runtime.createComponent)(require_contexts_command.CommandContext.Provider, {
|
|
318
|
-
value: command,
|
|
319
|
-
get children() {
|
|
320
|
-
return (0, _alloy_js_core_jsx_runtime.createComponent)(_powerlines_plugin_alloy_markdown_components_markdown_file.MarkdownFile, (0, _alloy_js_core_jsx_runtime.mergeProps)({ get path() {
|
|
321
|
-
return (0, _stryke_path_join.joinPaths)(require_docs_helpers.getDocsOutputPath(context), `${command.path}.md`);
|
|
322
|
-
} }, rest, {
|
|
323
|
-
get frontMatter() {
|
|
324
|
-
return (0, defu.defu)(frontMatter ?? {}, {
|
|
325
|
-
id: command.id,
|
|
326
|
-
name: command.name,
|
|
327
|
-
path: command.path,
|
|
328
|
-
reference: command.docs,
|
|
329
|
-
virtual: command.virtual,
|
|
330
|
-
title: command.title,
|
|
331
|
-
description: command.description,
|
|
332
|
-
tags: command.tags
|
|
333
|
-
});
|
|
334
|
-
},
|
|
335
|
-
get children() {
|
|
336
|
-
return (0, _alloy_js_core_jsx_runtime.createComponent)(CommandDocs, {
|
|
337
|
-
levelOffset,
|
|
338
|
-
command,
|
|
339
|
-
get usageExamples() {
|
|
340
|
-
return usageExamples();
|
|
341
|
-
}
|
|
342
|
-
});
|
|
343
|
-
}
|
|
344
|
-
}));
|
|
345
|
-
}
|
|
346
|
-
});
|
|
347
|
-
}
|
|
348
|
-
CommandDocsFile.__type = [
|
|
349
|
-
() => __ΩCommandDocsFileProps,
|
|
350
|
-
"props",
|
|
351
|
-
"CommandDocsFile",
|
|
352
|
-
"Generates the markdown documentation file for a command.",
|
|
353
|
-
"Pn!2\"\"/#?$"
|
|
354
|
-
];
|
|
355
|
-
|
|
356
|
-
//#endregion
|
|
357
|
-
exports.CommandArgumentDocs = CommandArgumentDocs;
|
|
358
|
-
exports.CommandDocs = CommandDocs;
|
|
359
|
-
exports.CommandDocsFile = CommandDocsFile;
|
|
360
|
-
exports.CommandDocsUsageExample = CommandDocsUsageExample;
|
|
361
|
-
exports.CommandOptionsDocs = CommandOptionsDocs;
|
|
362
|
-
exports.__ΩCommandDocsFileProps = __ΩCommandDocsFileProps;
|
|
363
|
-
exports.__ΩCommandDocsProps = __ΩCommandDocsProps;
|
|
364
|
-
exports.__ΩCommandDocsUsageExampleProps = __ΩCommandDocsUsageExampleProps;
|
|
365
|
-
exports.__ΩCommandParametersDocsProps = __ΩCommandParametersDocsProps;
|
|
366
|
-
//# sourceMappingURL=docs.cjs.map
|
|
4
|
+
exports.CommandArgumentDocs = require_docs.CommandArgumentDocs;
|
|
5
|
+
exports.CommandDocs = require_docs.CommandDocs;
|
|
6
|
+
exports.CommandDocsFile = require_docs.CommandDocsFile;
|
|
7
|
+
exports.CommandDocsUsageExample = require_docs.CommandDocsUsageExample;
|
|
8
|
+
exports.CommandOptionsDocs = require_docs.CommandOptionsDocs;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import { CommandTree } from "../
|
|
2
|
-
import { MarkdownFileProps } from "@
|
|
3
|
-
|
|
1
|
+
import { S as CommandTree } from "../command-CtfR7hKM.cjs";
|
|
2
|
+
import { MarkdownFileProps } from "@power-plant/alloy-js/markdown/components/markdown-file";
|
|
4
3
|
//#region src/components/docs.d.ts
|
|
5
4
|
interface CommandParametersDocsProps {
|
|
6
5
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"docs.d.cts","names":[],"sources":["../../src/components/docs.tsx"],"mappings":";;;;
|
|
1
|
+
{"version":3,"file":"docs.d.cts","names":[],"sources":["../../src/components/docs.tsx"],"mappings":";;;UAqCiB;;;;EAIf,SAAS;;;;;iBAMK,oBAAoB,OAAO,sDAA0B;;;;iBAmCrD,mBAAmB,OAAO,sDAA0B;UAgCnD;;;;;;;;;EASf;;;;EAKA,SAAS;;;;;;EAOT;;;;;iBAMc,wBAAwB,OAAO,wDAA4B;UA6B1D;;;;;;;;;EASf;;;;EAKA,SAAS;;;;;;EAOT,gBAAgB,SAAS;;;;;iBAMX,YAAY,OAAO,4CAAgB;UAyElC,6BAA6B,QAAQ;;;;;;;;;EASpD;;;;EAKA,SAAS;;;;;iBAMK,gBAAgB,OAAO,gDAAoB"}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import { CommandTree } from "../
|
|
2
|
-
import { MarkdownFileProps } from "@
|
|
3
|
-
|
|
1
|
+
import { S as CommandTree } from "../command-B6KYexlV.mjs";
|
|
2
|
+
import { MarkdownFileProps } from "@power-plant/alloy-js/markdown/components/markdown-file";
|
|
4
3
|
//#region src/components/docs.d.ts
|
|
5
4
|
interface CommandParametersDocsProps {
|
|
6
5
|
/**
|