@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
|
@@ -1,48 +1,20 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2
|
-
|
|
2
|
+
require('../contexts/power-plant.cjs');
|
|
3
3
|
let _alloy_js_core_jsx_runtime = require("@alloy-js/core/jsx-runtime");
|
|
4
4
|
let _alloy_js_core = require("@alloy-js/core");
|
|
5
5
|
let defu = require("defu");
|
|
6
|
-
|
|
7
|
-
let _powerlines_plugin_alloy_core_components_spacing = require("@powerlines/plugin-alloy/core/components/spacing");
|
|
8
|
-
let _powerlines_plugin_alloy_core_contexts_context = require("@powerlines/plugin-alloy/core/contexts/context");
|
|
6
|
+
let _power_plant_alloy_js_core_components_spacing = require("@power-plant/alloy-js/core/components/spacing");
|
|
9
7
|
let _alloy_js_typescript = require("@alloy-js/typescript");
|
|
8
|
+
let _power_plant_alloy_js_typescript_components_tsdoc = require("@power-plant/alloy-js/typescript/components/tsdoc");
|
|
9
|
+
let _powerlines_plugin_alloy_core_contexts_context = require("@powerlines/plugin-alloy/core/contexts/context");
|
|
10
10
|
let _powerlines_plugin_alloy_typescript_components_builtin_file = require("@powerlines/plugin-alloy/typescript/components/builtin-file");
|
|
11
|
-
let _powerlines_plugin_alloy_typescript_components_tsdoc = require("@powerlines/plugin-alloy/typescript/components/tsdoc");
|
|
12
11
|
|
|
13
12
|
//#region src/components/utils-builtin.tsx
|
|
14
|
-
const __ΩOmit = [
|
|
15
|
-
"T",
|
|
16
|
-
"K",
|
|
17
|
-
() => __ΩPick,
|
|
18
|
-
() => __ΩExclude,
|
|
19
|
-
"Omit",
|
|
20
|
-
"b!b\"e!!e!!ge!\"o$#o##w%y"
|
|
21
|
-
];
|
|
22
|
-
const __ΩPick = [
|
|
23
|
-
"T",
|
|
24
|
-
"K",
|
|
25
|
-
"Pick",
|
|
26
|
-
"l+e#!e\"!fRb!b\"Pde\"\"N#!w#y"
|
|
27
|
-
];
|
|
28
|
-
const __ΩExclude = [
|
|
29
|
-
"T",
|
|
30
|
-
"U",
|
|
31
|
-
"Exclude",
|
|
32
|
-
"l6!Re$!RPe#!e$\"qk#%QRb!b\"Pde\"!p)w#y"
|
|
33
|
-
];
|
|
34
|
-
const __ΩUtilsBuiltinProps = [
|
|
35
|
-
() => __ΩOmit,
|
|
36
|
-
"id",
|
|
37
|
-
"description",
|
|
38
|
-
"UtilsBuiltinProps",
|
|
39
|
-
"P!P.\".#Jo!#Mw$y"
|
|
40
|
-
];
|
|
41
13
|
/**
|
|
42
14
|
* Generates the `findSuggestions` function for suggesting corrections for potentially misspelled options or commands.
|
|
43
15
|
*/
|
|
44
16
|
function FindSuggestionsDeclaration() {
|
|
45
|
-
const context = (
|
|
17
|
+
const context = (0, _powerlines_plugin_alloy_core_contexts_context.usePowerlines)();
|
|
46
18
|
return [
|
|
47
19
|
(0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_typescript.VarDeclaration, {
|
|
48
20
|
"const": true,
|
|
@@ -102,24 +74,24 @@ function FindSuggestionsDeclaration() {
|
|
|
102
74
|
"\\u0149": "n", "\\u017f": "s"
|
|
103
75
|
} as Record<string, string>; `
|
|
104
76
|
}),
|
|
105
|
-
(0, _alloy_js_core_jsx_runtime.createComponent)(
|
|
106
|
-
(0, _alloy_js_core_jsx_runtime.createComponent)(
|
|
77
|
+
(0, _alloy_js_core_jsx_runtime.createComponent)(_power_plant_alloy_js_core_components_spacing.Spacing, {}),
|
|
78
|
+
(0, _alloy_js_core_jsx_runtime.createComponent)(_power_plant_alloy_js_typescript_components_tsdoc.TSDoc, {
|
|
107
79
|
heading: "A utility function that takes an input string and a list of possible matches, and returns a list of suggested matches based on the Levenshtein distance between the input and the possible matches.",
|
|
108
80
|
get children() {
|
|
109
81
|
return [
|
|
110
|
-
(0, _alloy_js_core_jsx_runtime.createComponent)(
|
|
111
|
-
(0, _alloy_js_core_jsx_runtime.createComponent)(
|
|
112
|
-
(0, _alloy_js_core_jsx_runtime.createComponent)(
|
|
113
|
-
(0, _alloy_js_core_jsx_runtime.createComponent)(
|
|
114
|
-
(0, _alloy_js_core_jsx_runtime.createComponent)(
|
|
82
|
+
(0, _alloy_js_core_jsx_runtime.createComponent)(_power_plant_alloy_js_typescript_components_tsdoc.TSDocRemarks, { children: "This function is intended to be used to suggest corrections for potentially misspelled options or commands." }),
|
|
83
|
+
(0, _alloy_js_core_jsx_runtime.createComponent)(_power_plant_alloy_js_core_components_spacing.Spacing, {}),
|
|
84
|
+
(0, _alloy_js_core_jsx_runtime.createComponent)(_power_plant_alloy_js_typescript_components_tsdoc.TSDocInternal, {}),
|
|
85
|
+
(0, _alloy_js_core_jsx_runtime.createComponent)(_power_plant_alloy_js_core_components_spacing.Spacing, {}),
|
|
86
|
+
(0, _alloy_js_core_jsx_runtime.createComponent)(_power_plant_alloy_js_typescript_components_tsdoc.TSDocParam, {
|
|
115
87
|
name: "input",
|
|
116
88
|
children: "The input string to check for potential matches."
|
|
117
89
|
}),
|
|
118
|
-
(0, _alloy_js_core_jsx_runtime.createComponent)(
|
|
90
|
+
(0, _alloy_js_core_jsx_runtime.createComponent)(_power_plant_alloy_js_typescript_components_tsdoc.TSDocParam, {
|
|
119
91
|
name: "options",
|
|
120
92
|
children: "A list of possible matches to compare against the input."
|
|
121
93
|
}),
|
|
122
|
-
(0, _alloy_js_core_jsx_runtime.createComponent)(
|
|
94
|
+
(0, _alloy_js_core_jsx_runtime.createComponent)(_power_plant_alloy_js_typescript_components_tsdoc.TSDocReturns, { children: "A list of suggested matches based on the Levenshtein distance." })
|
|
123
95
|
];
|
|
124
96
|
}
|
|
125
97
|
}),
|
|
@@ -143,7 +115,7 @@ function FindSuggestionsDeclaration() {
|
|
|
143
115
|
return _alloy_js_core.code`String(input ?? "")${context.config.isCaseSensitive ? "" : ".toLowerCase()"}.trim().replaceAll(/[\\s\\-_\\.]+/gu, " ").replace(/[\\\\xc0-\\\\xd6\\\\xd8-\\\\xf6\\\\xf8-\\\\xff\\\\u0100-\\\\u017f]/g, key => deburred[key]).replace(/[\\\\u0300-\\\\u036f\\\\ufe20-\\\\ufe2f\\\\u20d0-\\\\u20ff]/g, ""); `;
|
|
144
116
|
}
|
|
145
117
|
}),
|
|
146
|
-
(0, _alloy_js_core_jsx_runtime.createComponent)(
|
|
118
|
+
(0, _alloy_js_core_jsx_runtime.createComponent)(_power_plant_alloy_js_core_components_spacing.Spacing, {}),
|
|
147
119
|
(0, _alloy_js_core_jsx_runtime.memo)(() => _alloy_js_core.code`
|
|
148
120
|
if (!normalizedInput || options.length === 0) {
|
|
149
121
|
return [];
|
|
@@ -236,11 +208,6 @@ function FindSuggestionsDeclaration() {
|
|
|
236
208
|
})
|
|
237
209
|
];
|
|
238
210
|
}
|
|
239
|
-
FindSuggestionsDeclaration.__type = [
|
|
240
|
-
"FindSuggestionsDeclaration",
|
|
241
|
-
"Generates the `findSuggestions` function for suggesting corrections for potentially misspelled options or commands.",
|
|
242
|
-
"P\"/!?\""
|
|
243
|
-
];
|
|
244
211
|
/**
|
|
245
212
|
* Generates utilities for detecting terminal size and whether the process is running in the foreground, which can be used to determine how to render output (e.g., whether to use a progress bar or spinner).
|
|
246
213
|
*/
|
|
@@ -253,7 +220,7 @@ function TerminalSizeDeclaration() {
|
|
|
253
220
|
doc: "Default number of terminal columns",
|
|
254
221
|
initializer: _alloy_js_core.code`80`
|
|
255
222
|
}),
|
|
256
|
-
(0, _alloy_js_core_jsx_runtime.createComponent)(
|
|
223
|
+
(0, _alloy_js_core_jsx_runtime.createComponent)(_power_plant_alloy_js_core_components_spacing.Spacing, {}),
|
|
257
224
|
(0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_typescript.VarDeclaration, {
|
|
258
225
|
"export": true,
|
|
259
226
|
"const": true,
|
|
@@ -261,7 +228,7 @@ function TerminalSizeDeclaration() {
|
|
|
261
228
|
doc: "Default number of terminal rows",
|
|
262
229
|
initializer: _alloy_js_core.code`24`
|
|
263
230
|
}),
|
|
264
|
-
(0, _alloy_js_core_jsx_runtime.createComponent)(
|
|
231
|
+
(0, _alloy_js_core_jsx_runtime.createComponent)(_power_plant_alloy_js_core_components_spacing.Spacing, {}),
|
|
265
232
|
(0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_typescript.FunctionDeclaration, {
|
|
266
233
|
name: "isForegroundProcess",
|
|
267
234
|
children: _alloy_js_core.code`if (isLinux) {
|
|
@@ -293,7 +260,7 @@ function TerminalSizeDeclaration() {
|
|
|
293
260
|
return false;
|
|
294
261
|
} `
|
|
295
262
|
}),
|
|
296
|
-
(0, _alloy_js_core_jsx_runtime.createComponent)(
|
|
263
|
+
(0, _alloy_js_core_jsx_runtime.createComponent)(_power_plant_alloy_js_core_components_spacing.Spacing, {}),
|
|
297
264
|
(0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_typescript.FunctionDeclaration, {
|
|
298
265
|
name: "tput",
|
|
299
266
|
children: _alloy_js_core.code`try {
|
|
@@ -305,7 +272,7 @@ function TerminalSizeDeclaration() {
|
|
|
305
272
|
}
|
|
306
273
|
} catch {} `
|
|
307
274
|
}),
|
|
308
|
-
(0, _alloy_js_core_jsx_runtime.createComponent)(
|
|
275
|
+
(0, _alloy_js_core_jsx_runtime.createComponent)(_power_plant_alloy_js_core_components_spacing.Spacing, {}),
|
|
309
276
|
(0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_typescript.FunctionDeclaration, {
|
|
310
277
|
name: "devTty",
|
|
311
278
|
children: _alloy_js_core.code`try {
|
|
@@ -319,14 +286,14 @@ function TerminalSizeDeclaration() {
|
|
|
319
286
|
return { columns: writeStream[0], rows: writeStream[1] };
|
|
320
287
|
} catch {} `
|
|
321
288
|
}),
|
|
322
|
-
(0, _alloy_js_core_jsx_runtime.createComponent)(
|
|
323
|
-
(0, _alloy_js_core_jsx_runtime.createComponent)(
|
|
289
|
+
(0, _alloy_js_core_jsx_runtime.createComponent)(_power_plant_alloy_js_core_components_spacing.Spacing, {}),
|
|
290
|
+
(0, _alloy_js_core_jsx_runtime.createComponent)(_power_plant_alloy_js_typescript_components_tsdoc.TSDoc, {
|
|
324
291
|
heading: "A utility function that attempts to determine the size of the terminal (number of columns and rows) using various methods, and falls back to default values if it cannot be determined. This can be used to adjust output formatting based on the available terminal size.",
|
|
325
292
|
get children() {
|
|
326
293
|
return [
|
|
327
|
-
(0, _alloy_js_core_jsx_runtime.createComponent)(
|
|
328
|
-
(0, _alloy_js_core_jsx_runtime.createComponent)(
|
|
329
|
-
(0, _alloy_js_core_jsx_runtime.createComponent)(
|
|
294
|
+
(0, _alloy_js_core_jsx_runtime.createComponent)(_power_plant_alloy_js_typescript_components_tsdoc.TSDocRemarks, { children: "The function first checks if the process is running in a TTY environment and if the stdout or stderr streams provide column and row information. If not, it attempts to use platform-specific methods (like reading from /proc/self/stat on Linux, using tput on Unix-like systems, or checking /dev/tty) to determine the terminal size. If all else fails, it returns default values." }),
|
|
295
|
+
(0, _alloy_js_core_jsx_runtime.createComponent)(_power_plant_alloy_js_core_components_spacing.Spacing, {}),
|
|
296
|
+
(0, _alloy_js_core_jsx_runtime.createComponent)(_power_plant_alloy_js_typescript_components_tsdoc.TSDocReturns, { children: "An object containing the number of columns and rows of the terminal." })
|
|
330
297
|
];
|
|
331
298
|
}
|
|
332
299
|
}),
|
|
@@ -344,7 +311,7 @@ function TerminalSizeDeclaration() {
|
|
|
344
311
|
condition: _alloy_js_core.code`process.stderr?.columns && process.stderr?.rows`,
|
|
345
312
|
children: _alloy_js_core.code`return { columns: process.stderr.columns, rows: process.stderr.rows };`
|
|
346
313
|
}),
|
|
347
|
-
(0, _alloy_js_core_jsx_runtime.createComponent)(
|
|
314
|
+
(0, _alloy_js_core_jsx_runtime.createComponent)(_power_plant_alloy_js_core_components_spacing.Spacing, {}),
|
|
348
315
|
(0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_typescript.IfStatement, {
|
|
349
316
|
condition: _alloy_js_core.code`isWindows`,
|
|
350
317
|
children: _alloy_js_core.code`return tput() ?? {
|
|
@@ -359,7 +326,7 @@ function TerminalSizeDeclaration() {
|
|
|
359
326
|
rows: DEFAULT_TERMINAL_ROWS,
|
|
360
327
|
}; `
|
|
361
328
|
}),
|
|
362
|
-
(0, _alloy_js_core_jsx_runtime.createComponent)(
|
|
329
|
+
(0, _alloy_js_core_jsx_runtime.createComponent)(_power_plant_alloy_js_core_components_spacing.Spacing, {}),
|
|
363
330
|
(0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_typescript.VarDeclaration, {
|
|
364
331
|
"let": true,
|
|
365
332
|
name: "result",
|
|
@@ -374,7 +341,7 @@ function TerminalSizeDeclaration() {
|
|
|
374
341
|
}
|
|
375
342
|
} catch {} `
|
|
376
343
|
}),
|
|
377
|
-
(0, _alloy_js_core_jsx_runtime.createComponent)(
|
|
344
|
+
(0, _alloy_js_core_jsx_runtime.createComponent)(_power_plant_alloy_js_core_components_spacing.Spacing, {}),
|
|
378
345
|
_alloy_js_core.code`return result ?? {
|
|
379
346
|
columns: DEFAULT_TERMINAL_COLUMNS,
|
|
380
347
|
rows: DEFAULT_TERMINAL_ROWS,
|
|
@@ -384,11 +351,6 @@ function TerminalSizeDeclaration() {
|
|
|
384
351
|
})
|
|
385
352
|
];
|
|
386
353
|
}
|
|
387
|
-
TerminalSizeDeclaration.__type = [
|
|
388
|
-
"TerminalSizeDeclaration",
|
|
389
|
-
"Generates utilities for detecting terminal size and whether the process is running in the foreground, which can be used to determine how to render output (e.g., whether to use a progress bar or spinner).",
|
|
390
|
-
"P\"/!?\""
|
|
391
|
-
];
|
|
392
354
|
/**
|
|
393
355
|
* Generates utilities for detecting terminal color support.
|
|
394
356
|
*/
|
|
@@ -401,7 +363,7 @@ function EnvSupportUtilities() {
|
|
|
401
363
|
doc: "Detect if stdout.TTY is available",
|
|
402
364
|
initializer: _alloy_js_core.code`Boolean(process.stdout && process.stdout.isTTY);`
|
|
403
365
|
}),
|
|
404
|
-
(0, _alloy_js_core_jsx_runtime.createComponent)(
|
|
366
|
+
(0, _alloy_js_core_jsx_runtime.createComponent)(_power_plant_alloy_js_core_components_spacing.Spacing, {}),
|
|
405
367
|
(0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_typescript.VarDeclaration, {
|
|
406
368
|
"export": true,
|
|
407
369
|
"const": true,
|
|
@@ -409,7 +371,7 @@ function EnvSupportUtilities() {
|
|
|
409
371
|
doc: "Detect if the current environment is minimal (CI, non-TTY, etc.)",
|
|
410
372
|
initializer: _alloy_js_core.code` env.MINIMAL || isCI || isTest || !isTTY; `
|
|
411
373
|
}),
|
|
412
|
-
(0, _alloy_js_core_jsx_runtime.createComponent)(
|
|
374
|
+
(0, _alloy_js_core_jsx_runtime.createComponent)(_power_plant_alloy_js_core_components_spacing.Spacing, {}),
|
|
413
375
|
(0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_typescript.VarDeclaration, {
|
|
414
376
|
"export": true,
|
|
415
377
|
"const": true,
|
|
@@ -419,11 +381,6 @@ function EnvSupportUtilities() {
|
|
|
419
381
|
})
|
|
420
382
|
];
|
|
421
383
|
}
|
|
422
|
-
EnvSupportUtilities.__type = [
|
|
423
|
-
"EnvSupportUtilities",
|
|
424
|
-
"Generates utilities for detecting terminal color support.",
|
|
425
|
-
"P\"/!?\""
|
|
426
|
-
];
|
|
427
384
|
/**
|
|
428
385
|
* Generates utilities for detecting terminal color support.
|
|
429
386
|
*/
|
|
@@ -441,21 +398,21 @@ function ColorSupportUtilities() {
|
|
|
441
398
|
});
|
|
442
399
|
}
|
|
443
400
|
}),
|
|
444
|
-
(0, _alloy_js_core_jsx_runtime.createComponent)(
|
|
445
|
-
(0, _alloy_js_core_jsx_runtime.createComponent)(
|
|
401
|
+
(0, _alloy_js_core_jsx_runtime.createComponent)(_power_plant_alloy_js_core_components_spacing.Spacing, {}),
|
|
402
|
+
(0, _alloy_js_core_jsx_runtime.createComponent)(_power_plant_alloy_js_typescript_components_tsdoc.TSDoc, {
|
|
446
403
|
heading: "Checks if a specific flag is present in the command-line arguments.",
|
|
447
404
|
get children() {
|
|
448
405
|
return [
|
|
449
|
-
(0, _alloy_js_core_jsx_runtime.createComponent)(
|
|
450
|
-
(0, _alloy_js_core_jsx_runtime.createComponent)(
|
|
406
|
+
(0, _alloy_js_core_jsx_runtime.createComponent)(_power_plant_alloy_js_typescript_components_tsdoc.TSDocLink, { children: "https://github.com/sindresorhus/has-flag/blob/main/index.js" }),
|
|
407
|
+
(0, _alloy_js_core_jsx_runtime.createComponent)(_power_plant_alloy_js_typescript_components_tsdoc.TSDocParam, {
|
|
451
408
|
name: "flag",
|
|
452
409
|
children: "The flag to check for, e.g., \"color\", \"no-color\"."
|
|
453
410
|
}),
|
|
454
|
-
(0, _alloy_js_core_jsx_runtime.createComponent)(
|
|
411
|
+
(0, _alloy_js_core_jsx_runtime.createComponent)(_power_plant_alloy_js_typescript_components_tsdoc.TSDocParam, {
|
|
455
412
|
name: "argv",
|
|
456
413
|
children: "The command-line arguments to check against. Defaults to global Deno args or process args."
|
|
457
414
|
}),
|
|
458
|
-
(0, _alloy_js_core_jsx_runtime.createComponent)(
|
|
415
|
+
(0, _alloy_js_core_jsx_runtime.createComponent)(_power_plant_alloy_js_typescript_components_tsdoc.TSDocReturns, { children: "True if the flag is present, false otherwise." })
|
|
459
416
|
];
|
|
460
417
|
}
|
|
461
418
|
}),
|
|
@@ -581,7 +538,7 @@ function ColorSupportUtilities() {
|
|
|
581
538
|
|
|
582
539
|
`
|
|
583
540
|
}),
|
|
584
|
-
(0, _alloy_js_core_jsx_runtime.createComponent)(
|
|
541
|
+
(0, _alloy_js_core_jsx_runtime.createComponent)(_power_plant_alloy_js_core_components_spacing.Spacing, {}),
|
|
585
542
|
(0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_typescript.VarDeclaration, {
|
|
586
543
|
"export": true,
|
|
587
544
|
"const": true,
|
|
@@ -592,7 +549,7 @@ function ColorSupportUtilities() {
|
|
|
592
549
|
stderr: getColorSupportLevel(process.stderr),
|
|
593
550
|
}; `
|
|
594
551
|
}),
|
|
595
|
-
(0, _alloy_js_core_jsx_runtime.createComponent)(
|
|
552
|
+
(0, _alloy_js_core_jsx_runtime.createComponent)(_power_plant_alloy_js_core_components_spacing.Spacing, {}),
|
|
596
553
|
(0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_typescript.VarDeclaration, {
|
|
597
554
|
"export": true,
|
|
598
555
|
"const": true,
|
|
@@ -600,7 +557,7 @@ function ColorSupportUtilities() {
|
|
|
600
557
|
doc: "Detect if terminal color is supported in the current environment",
|
|
601
558
|
initializer: _alloy_js_core.code` Boolean(colorSupportLevels.stdout); `
|
|
602
559
|
}),
|
|
603
|
-
(0, _alloy_js_core_jsx_runtime.createComponent)(
|
|
560
|
+
(0, _alloy_js_core_jsx_runtime.createComponent)(_power_plant_alloy_js_core_components_spacing.Spacing, {}),
|
|
604
561
|
(0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_typescript.VarDeclaration, {
|
|
605
562
|
"export": true,
|
|
606
563
|
"const": true,
|
|
@@ -621,11 +578,6 @@ function ColorSupportUtilities() {
|
|
|
621
578
|
})
|
|
622
579
|
];
|
|
623
580
|
}
|
|
624
|
-
ColorSupportUtilities.__type = [
|
|
625
|
-
"ColorSupportUtilities",
|
|
626
|
-
"Generates utilities for detecting terminal color support.",
|
|
627
|
-
"P\"/!?\""
|
|
628
|
-
];
|
|
629
581
|
/**
|
|
630
582
|
* Generates utilities for detecting terminal color support.
|
|
631
583
|
*/
|
|
@@ -658,11 +610,11 @@ function HyperlinkSupportUtilities() {
|
|
|
658
610
|
patch: versionParts[2]
|
|
659
611
|
}; `
|
|
660
612
|
}),
|
|
661
|
-
(0, _alloy_js_core_jsx_runtime.createComponent)(
|
|
662
|
-
(0, _alloy_js_core_jsx_runtime.createComponent)(
|
|
613
|
+
(0, _alloy_js_core_jsx_runtime.createComponent)(_power_plant_alloy_js_core_components_spacing.Spacing, {}),
|
|
614
|
+
(0, _alloy_js_core_jsx_runtime.createComponent)(_power_plant_alloy_js_typescript_components_tsdoc.TSDoc, {
|
|
663
615
|
heading: "Check if the current environment/terminal supports hyperlinks in the terminal.",
|
|
664
616
|
get children() {
|
|
665
|
-
return (0, _alloy_js_core_jsx_runtime.createComponent)(
|
|
617
|
+
return (0, _alloy_js_core_jsx_runtime.createComponent)(_power_plant_alloy_js_typescript_components_tsdoc.TSDocReturns, { children: "True if the current environment/terminal supports hyperlinks." });
|
|
666
618
|
}
|
|
667
619
|
}),
|
|
668
620
|
(0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_typescript.FunctionDeclaration, {
|
|
@@ -734,18 +686,13 @@ function HyperlinkSupportUtilities() {
|
|
|
734
686
|
})
|
|
735
687
|
];
|
|
736
688
|
}
|
|
737
|
-
HyperlinkSupportUtilities.__type = [
|
|
738
|
-
"HyperlinkSupportUtilities",
|
|
739
|
-
"Generates utilities for detecting terminal color support.",
|
|
740
|
-
"P\"/!?\""
|
|
741
|
-
];
|
|
742
689
|
/**
|
|
743
690
|
* Generates the `resolveModule` function declaration, which is a utility for resolving file paths across different platforms.
|
|
744
691
|
*/
|
|
745
692
|
function ResolveModuleFunctionDeclaration() {
|
|
746
|
-
const context = (
|
|
693
|
+
const context = (0, _powerlines_plugin_alloy_core_contexts_context.usePowerlines)();
|
|
747
694
|
return [
|
|
748
|
-
(0, _alloy_js_core_jsx_runtime.createComponent)(
|
|
695
|
+
(0, _alloy_js_core_jsx_runtime.createComponent)(_power_plant_alloy_js_core_components_spacing.Spacing, {}),
|
|
749
696
|
(0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_typescript.InterfaceDeclaration, {
|
|
750
697
|
name: "ResolveModuleOptions",
|
|
751
698
|
doc: "Options for the `resolve` handler function.",
|
|
@@ -768,7 +715,7 @@ function ResolveModuleFunctionDeclaration() {
|
|
|
768
715
|
];
|
|
769
716
|
}
|
|
770
717
|
}),
|
|
771
|
-
(0, _alloy_js_core_jsx_runtime.createComponent)(
|
|
718
|
+
(0, _alloy_js_core_jsx_runtime.createComponent)(_power_plant_alloy_js_core_components_spacing.Spacing, {}),
|
|
772
719
|
(0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_typescript.InterfaceDeclaration, {
|
|
773
720
|
name: "PackageConfig",
|
|
774
721
|
doc: "Parsed package.json configuration for module resolution.",
|
|
@@ -823,25 +770,25 @@ function ResolveModuleFunctionDeclaration() {
|
|
|
823
770
|
];
|
|
824
771
|
}
|
|
825
772
|
}),
|
|
826
|
-
(0, _alloy_js_core_jsx_runtime.createComponent)(
|
|
773
|
+
(0, _alloy_js_core_jsx_runtime.createComponent)(_power_plant_alloy_js_core_components_spacing.Spacing, {}),
|
|
827
774
|
(0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_typescript.VarDeclaration, {
|
|
828
775
|
"const": true,
|
|
829
776
|
name: "DEFAULT_CONDITIONS_SET",
|
|
830
777
|
initializer: _alloy_js_core.code`new Set(["node", "import"]);`
|
|
831
778
|
}),
|
|
832
|
-
(0, _alloy_js_core_jsx_runtime.createComponent)(
|
|
779
|
+
(0, _alloy_js_core_jsx_runtime.createComponent)(_power_plant_alloy_js_core_components_spacing.Spacing, {}),
|
|
833
780
|
(0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_typescript.VarDeclaration, {
|
|
834
781
|
"const": true,
|
|
835
782
|
name: "DEFAULT_EXTENSIONS",
|
|
836
783
|
initializer: _alloy_js_core.code`[".mjs", ".cjs", ".js", ".json", ".node"];`
|
|
837
784
|
}),
|
|
838
|
-
(0, _alloy_js_core_jsx_runtime.createComponent)(
|
|
785
|
+
(0, _alloy_js_core_jsx_runtime.createComponent)(_power_plant_alloy_js_core_components_spacing.Spacing, {}),
|
|
839
786
|
(0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_typescript.VarDeclaration, {
|
|
840
787
|
"const": true,
|
|
841
788
|
name: "invalidPackageNameRegEx",
|
|
842
789
|
initializer: _alloy_js_core.code`/^\\.|\\/|%/;`
|
|
843
790
|
}),
|
|
844
|
-
(0, _alloy_js_core_jsx_runtime.createComponent)(
|
|
791
|
+
(0, _alloy_js_core_jsx_runtime.createComponent)(_power_plant_alloy_js_core_components_spacing.Spacing, {}),
|
|
845
792
|
(0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_typescript.FunctionDeclaration, {
|
|
846
793
|
name: "readPackageConfig",
|
|
847
794
|
parameters: [{
|
|
@@ -896,7 +843,7 @@ function ResolveModuleFunctionDeclaration() {
|
|
|
896
843
|
|
|
897
844
|
return result;`
|
|
898
845
|
}),
|
|
899
|
-
(0, _alloy_js_core_jsx_runtime.createComponent)(
|
|
846
|
+
(0, _alloy_js_core_jsx_runtime.createComponent)(_power_plant_alloy_js_core_components_spacing.Spacing, {}),
|
|
900
847
|
(0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_typescript.FunctionDeclaration, {
|
|
901
848
|
name: "getPackageScopeConfig",
|
|
902
849
|
parameters: [{
|
|
@@ -931,7 +878,7 @@ function ResolveModuleFunctionDeclaration() {
|
|
|
931
878
|
type: "none"
|
|
932
879
|
};`
|
|
933
880
|
}),
|
|
934
|
-
(0, _alloy_js_core_jsx_runtime.createComponent)(
|
|
881
|
+
(0, _alloy_js_core_jsx_runtime.createComponent)(_power_plant_alloy_js_core_components_spacing.Spacing, {}),
|
|
935
882
|
(0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_typescript.FunctionDeclaration, {
|
|
936
883
|
name: "isConditionalExportsMainSugar",
|
|
937
884
|
parameters: [{
|
|
@@ -963,7 +910,7 @@ function ResolveModuleFunctionDeclaration() {
|
|
|
963
910
|
|
|
964
911
|
return isConditionalSugar;`
|
|
965
912
|
}),
|
|
966
|
-
(0, _alloy_js_core_jsx_runtime.createComponent)(
|
|
913
|
+
(0, _alloy_js_core_jsx_runtime.createComponent)(_power_plant_alloy_js_core_components_spacing.Spacing, {}),
|
|
967
914
|
(0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_typescript.FunctionDeclaration, {
|
|
968
915
|
name: "resolvePackageTarget",
|
|
969
916
|
parameters: [
|
|
@@ -1100,7 +1047,7 @@ function ResolveModuleFunctionDeclaration() {
|
|
|
1100
1047
|
|
|
1101
1048
|
return null;`
|
|
1102
1049
|
}),
|
|
1103
|
-
(0, _alloy_js_core_jsx_runtime.createComponent)(
|
|
1050
|
+
(0, _alloy_js_core_jsx_runtime.createComponent)(_power_plant_alloy_js_core_components_spacing.Spacing, {}),
|
|
1104
1051
|
(0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_typescript.FunctionDeclaration, {
|
|
1105
1052
|
name: "packageExportsResolve",
|
|
1106
1053
|
parameters: [
|
|
@@ -1202,7 +1149,7 @@ function ResolveModuleFunctionDeclaration() {
|
|
|
1202
1149
|
(err as any).code = "ERR_PACKAGE_PATH_NOT_EXPORTED";
|
|
1203
1150
|
throw err;`
|
|
1204
1151
|
}),
|
|
1205
|
-
(0, _alloy_js_core_jsx_runtime.createComponent)(
|
|
1152
|
+
(0, _alloy_js_core_jsx_runtime.createComponent)(_power_plant_alloy_js_core_components_spacing.Spacing, {}),
|
|
1206
1153
|
(0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_typescript.FunctionDeclaration, {
|
|
1207
1154
|
name: "patternKeyCompare",
|
|
1208
1155
|
parameters: [{
|
|
@@ -1225,7 +1172,7 @@ function ResolveModuleFunctionDeclaration() {
|
|
|
1225
1172
|
if (b.length > a.length) return 1;
|
|
1226
1173
|
return 0;`
|
|
1227
1174
|
}),
|
|
1228
|
-
(0, _alloy_js_core_jsx_runtime.createComponent)(
|
|
1175
|
+
(0, _alloy_js_core_jsx_runtime.createComponent)(_power_plant_alloy_js_core_components_spacing.Spacing, {}),
|
|
1229
1176
|
(0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_typescript.FunctionDeclaration, {
|
|
1230
1177
|
name: "legacyMainResolve",
|
|
1231
1178
|
parameters: [{
|
|
@@ -1266,7 +1213,7 @@ function ResolveModuleFunctionDeclaration() {
|
|
|
1266
1213
|
|
|
1267
1214
|
return undefined;`
|
|
1268
1215
|
}),
|
|
1269
|
-
(0, _alloy_js_core_jsx_runtime.createComponent)(
|
|
1216
|
+
(0, _alloy_js_core_jsx_runtime.createComponent)(_power_plant_alloy_js_core_components_spacing.Spacing, {}),
|
|
1270
1217
|
(0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_typescript.FunctionDeclaration, {
|
|
1271
1218
|
name: "parsePackageName",
|
|
1272
1219
|
parameters: [{
|
|
@@ -1312,7 +1259,7 @@ function ResolveModuleFunctionDeclaration() {
|
|
|
1312
1259
|
|
|
1313
1260
|
return { packageName, packageSubpath, isScoped };`
|
|
1314
1261
|
}),
|
|
1315
|
-
(0, _alloy_js_core_jsx_runtime.createComponent)(
|
|
1262
|
+
(0, _alloy_js_core_jsx_runtime.createComponent)(_power_plant_alloy_js_core_components_spacing.Spacing, {}),
|
|
1316
1263
|
(0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_typescript.FunctionDeclaration, {
|
|
1317
1264
|
name: "packageResolve",
|
|
1318
1265
|
parameters: [
|
|
@@ -1406,7 +1353,7 @@ function ResolveModuleFunctionDeclaration() {
|
|
|
1406
1353
|
|
|
1407
1354
|
throw err;`
|
|
1408
1355
|
}),
|
|
1409
|
-
(0, _alloy_js_core_jsx_runtime.createComponent)(
|
|
1356
|
+
(0, _alloy_js_core_jsx_runtime.createComponent)(_power_plant_alloy_js_core_components_spacing.Spacing, {}),
|
|
1410
1357
|
(0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_typescript.FunctionDeclaration, {
|
|
1411
1358
|
name: "finalizeResolution",
|
|
1412
1359
|
parameters: [{
|
|
@@ -1457,7 +1404,7 @@ function ResolveModuleFunctionDeclaration() {
|
|
|
1457
1404
|
|
|
1458
1405
|
return realUrl;`
|
|
1459
1406
|
}),
|
|
1460
|
-
(0, _alloy_js_core_jsx_runtime.createComponent)(
|
|
1407
|
+
(0, _alloy_js_core_jsx_runtime.createComponent)(_power_plant_alloy_js_core_components_spacing.Spacing, {}),
|
|
1461
1408
|
(0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_typescript.FunctionDeclaration, {
|
|
1462
1409
|
name: "moduleResolve",
|
|
1463
1410
|
parameters: [
|
|
@@ -1566,7 +1513,7 @@ function ResolveModuleFunctionDeclaration() {
|
|
|
1566
1513
|
|
|
1567
1514
|
return finalizeResolution(resolved, base);`
|
|
1568
1515
|
}),
|
|
1569
|
-
(0, _alloy_js_core_jsx_runtime.createComponent)(
|
|
1516
|
+
(0, _alloy_js_core_jsx_runtime.createComponent)(_power_plant_alloy_js_core_components_spacing.Spacing, {}),
|
|
1570
1517
|
(0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_typescript.FunctionDeclaration, {
|
|
1571
1518
|
name: "tryModuleResolve",
|
|
1572
1519
|
parameters: [
|
|
@@ -1600,20 +1547,20 @@ function ResolveModuleFunctionDeclaration() {
|
|
|
1600
1547
|
}
|
|
1601
1548
|
}`
|
|
1602
1549
|
}),
|
|
1603
|
-
(0, _alloy_js_core_jsx_runtime.createComponent)(
|
|
1604
|
-
(0, _alloy_js_core_jsx_runtime.createComponent)(
|
|
1550
|
+
(0, _alloy_js_core_jsx_runtime.createComponent)(_power_plant_alloy_js_core_components_spacing.Spacing, {}),
|
|
1551
|
+
(0, _alloy_js_core_jsx_runtime.createComponent)(_power_plant_alloy_js_typescript_components_tsdoc.TSDoc, {
|
|
1605
1552
|
heading: "A function to resolve module specifiers to URLs.",
|
|
1606
1553
|
get children() {
|
|
1607
1554
|
return [
|
|
1608
|
-
(0, _alloy_js_core_jsx_runtime.createComponent)(
|
|
1555
|
+
(0, _alloy_js_core_jsx_runtime.createComponent)(_power_plant_alloy_js_typescript_components_tsdoc.TSDocParam, {
|
|
1609
1556
|
name: "specifier",
|
|
1610
1557
|
children: `The module specifier to resolve.`
|
|
1611
1558
|
}),
|
|
1612
|
-
(0, _alloy_js_core_jsx_runtime.createComponent)(
|
|
1559
|
+
(0, _alloy_js_core_jsx_runtime.createComponent)(_power_plant_alloy_js_typescript_components_tsdoc.TSDocParam, {
|
|
1613
1560
|
name: "options",
|
|
1614
1561
|
children: `The options for resolving the module. Defaults to an empty object.`
|
|
1615
1562
|
}),
|
|
1616
|
-
(0, _alloy_js_core_jsx_runtime.createComponent)(
|
|
1563
|
+
(0, _alloy_js_core_jsx_runtime.createComponent)(_power_plant_alloy_js_typescript_components_tsdoc.TSDocReturns, { children: `The result of the resolve operation.` })
|
|
1617
1564
|
];
|
|
1618
1565
|
}
|
|
1619
1566
|
}),
|
|
@@ -1733,11 +1680,6 @@ function ResolveModuleFunctionDeclaration() {
|
|
|
1733
1680
|
})
|
|
1734
1681
|
];
|
|
1735
1682
|
}
|
|
1736
|
-
ResolveModuleFunctionDeclaration.__type = [
|
|
1737
|
-
"ResolveModuleFunctionDeclaration",
|
|
1738
|
-
"Generates the `resolveModule` function declaration, which is a utility for resolving file paths across different platforms.",
|
|
1739
|
-
"P\"/!?\""
|
|
1740
|
-
];
|
|
1741
1683
|
/**
|
|
1742
1684
|
* A built-in utilities module for Shell Shock.
|
|
1743
1685
|
*/
|
|
@@ -1748,7 +1690,7 @@ function UtilsBuiltin(props) {
|
|
|
1748
1690
|
description: "A collection of helper utilities that ease command-line application development."
|
|
1749
1691
|
}, rest, {
|
|
1750
1692
|
get imports() {
|
|
1751
|
-
return (0, defu.
|
|
1693
|
+
return (0, defu.defu)(rest.imports ?? {}, {
|
|
1752
1694
|
"node:os": "os",
|
|
1753
1695
|
"node:process": "process",
|
|
1754
1696
|
"node:path": [
|
|
@@ -1774,7 +1716,7 @@ function UtilsBuiltin(props) {
|
|
|
1774
1716
|
});
|
|
1775
1717
|
},
|
|
1776
1718
|
get builtinImports() {
|
|
1777
|
-
return (0, defu.
|
|
1719
|
+
return (0, defu.defu)(rest.builtinImports ?? {}, {
|
|
1778
1720
|
env: [
|
|
1779
1721
|
"env",
|
|
1780
1722
|
"isCI",
|
|
@@ -1789,13 +1731,13 @@ function UtilsBuiltin(props) {
|
|
|
1789
1731
|
},
|
|
1790
1732
|
get children() {
|
|
1791
1733
|
return [
|
|
1792
|
-
(0, _alloy_js_core_jsx_runtime.createComponent)(
|
|
1734
|
+
(0, _alloy_js_core_jsx_runtime.createComponent)(_power_plant_alloy_js_typescript_components_tsdoc.TSDoc, {
|
|
1793
1735
|
heading: "A utility function to pause execution for a specified duration, which can be used in prompt interactions to create delays or timeouts. The function returns a promise that resolves after the specified duration in milliseconds, allowing it to be used with async/await syntax for easier handling of asynchronous prompt logic.",
|
|
1794
1736
|
get children() {
|
|
1795
|
-
return [(0, _alloy_js_core_jsx_runtime.createComponent)(
|
|
1737
|
+
return [(0, _alloy_js_core_jsx_runtime.createComponent)(_power_plant_alloy_js_typescript_components_tsdoc.TSDocParam, {
|
|
1796
1738
|
name: "durationMs",
|
|
1797
1739
|
children: `The duration to sleep in milliseconds.`
|
|
1798
|
-
}), (0, _alloy_js_core_jsx_runtime.createComponent)(
|
|
1740
|
+
}), (0, _alloy_js_core_jsx_runtime.createComponent)(_power_plant_alloy_js_typescript_components_tsdoc.TSDocReturns, { children: `A promise that resolves after the specified duration, allowing for asynchronous delays in prompt interactions.` })];
|
|
1799
1741
|
}
|
|
1800
1742
|
}),
|
|
1801
1743
|
(0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_typescript.FunctionDeclaration, {
|
|
@@ -1808,19 +1750,19 @@ function UtilsBuiltin(props) {
|
|
|
1808
1750
|
returnType: "Promise<void>",
|
|
1809
1751
|
children: _alloy_js_core.code`return new Promise((resolve) => setTimeout(resolve, durationMs)); `
|
|
1810
1752
|
}),
|
|
1811
|
-
(0, _alloy_js_core_jsx_runtime.createComponent)(
|
|
1753
|
+
(0, _alloy_js_core_jsx_runtime.createComponent)(_power_plant_alloy_js_core_components_spacing.Spacing, {}),
|
|
1812
1754
|
(0, _alloy_js_core_jsx_runtime.createComponent)(TerminalSizeDeclaration, {}),
|
|
1813
|
-
(0, _alloy_js_core_jsx_runtime.createComponent)(
|
|
1755
|
+
(0, _alloy_js_core_jsx_runtime.createComponent)(_power_plant_alloy_js_core_components_spacing.Spacing, {}),
|
|
1814
1756
|
(0, _alloy_js_core_jsx_runtime.createComponent)(EnvSupportUtilities, {}),
|
|
1815
|
-
(0, _alloy_js_core_jsx_runtime.createComponent)(
|
|
1757
|
+
(0, _alloy_js_core_jsx_runtime.createComponent)(_power_plant_alloy_js_core_components_spacing.Spacing, {}),
|
|
1816
1758
|
(0, _alloy_js_core_jsx_runtime.createComponent)(HyperlinkSupportUtilities, {}),
|
|
1817
|
-
(0, _alloy_js_core_jsx_runtime.createComponent)(
|
|
1759
|
+
(0, _alloy_js_core_jsx_runtime.createComponent)(_power_plant_alloy_js_core_components_spacing.Spacing, {}),
|
|
1818
1760
|
(0, _alloy_js_core_jsx_runtime.createComponent)(ColorSupportUtilities, {}),
|
|
1819
|
-
(0, _alloy_js_core_jsx_runtime.createComponent)(
|
|
1761
|
+
(0, _alloy_js_core_jsx_runtime.createComponent)(_power_plant_alloy_js_core_components_spacing.Spacing, {}),
|
|
1820
1762
|
(0, _alloy_js_core_jsx_runtime.createComponent)(ResolveModuleFunctionDeclaration, {}),
|
|
1821
|
-
(0, _alloy_js_core_jsx_runtime.createComponent)(
|
|
1763
|
+
(0, _alloy_js_core_jsx_runtime.createComponent)(_power_plant_alloy_js_core_components_spacing.Spacing, {}),
|
|
1822
1764
|
(0, _alloy_js_core_jsx_runtime.createComponent)(FindSuggestionsDeclaration, {}),
|
|
1823
|
-
(0, _alloy_js_core_jsx_runtime.createComponent)(
|
|
1765
|
+
(0, _alloy_js_core_jsx_runtime.createComponent)(_power_plant_alloy_js_core_components_spacing.Spacing, {}),
|
|
1824
1766
|
(0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_core.Show, {
|
|
1825
1767
|
get when() {
|
|
1826
1768
|
return Boolean(children);
|
|
@@ -1831,13 +1773,6 @@ function UtilsBuiltin(props) {
|
|
|
1831
1773
|
}
|
|
1832
1774
|
}));
|
|
1833
1775
|
}
|
|
1834
|
-
UtilsBuiltin.__type = [
|
|
1835
|
-
() => __ΩUtilsBuiltinProps,
|
|
1836
|
-
"props",
|
|
1837
|
-
"UtilsBuiltin",
|
|
1838
|
-
"A built-in utilities module for Shell Shock.",
|
|
1839
|
-
"Pn!2\"\"/#?$"
|
|
1840
|
-
];
|
|
1841
1776
|
|
|
1842
1777
|
//#endregion
|
|
1843
1778
|
exports.ColorSupportUtilities = ColorSupportUtilities;
|
|
@@ -1846,6 +1781,4 @@ exports.FindSuggestionsDeclaration = FindSuggestionsDeclaration;
|
|
|
1846
1781
|
exports.HyperlinkSupportUtilities = HyperlinkSupportUtilities;
|
|
1847
1782
|
exports.ResolveModuleFunctionDeclaration = ResolveModuleFunctionDeclaration;
|
|
1848
1783
|
exports.TerminalSizeDeclaration = TerminalSizeDeclaration;
|
|
1849
|
-
exports.UtilsBuiltin = UtilsBuiltin;
|
|
1850
|
-
exports.__ΩUtilsBuiltinProps = __ΩUtilsBuiltinProps;
|
|
1851
|
-
//# sourceMappingURL=utils-builtin.cjs.map
|
|
1784
|
+
exports.UtilsBuiltin = UtilsBuiltin;
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import { BuiltinFileProps } from "
|
|
2
|
-
|
|
1
|
+
import { n as BuiltinFileProps } from "../power-plant-LgxcvlMN.cjs";
|
|
3
2
|
//#region src/components/utils-builtin.d.ts
|
|
4
3
|
interface UtilsBuiltinProps extends Omit<BuiltinFileProps, "id" | "description"> {}
|
|
5
4
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils-builtin.d.cts","names":[],"sources":["../../src/components/utils-builtin.tsx"],"mappings":"
|
|
1
|
+
{"version":3,"file":"utils-builtin.d.cts","names":[],"sources":["../../src/components/utils-builtin.tsx"],"mappings":";;UAwCiB,0BAA0B,KACzC;;;;iBAOc,uDAA0B;;;;iBA0M1B,oDAAuB;;;;iBA2IvB,gDAAmB;;;;iBAiCnB,kDAAqB;;;;iBAsMrB,sDAAyB;;;;iBA0GzB,6DAAgC;;;;iBA83BhC,aAAa,OAAO,6CAAiB"}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import { BuiltinFileProps } from "
|
|
2
|
-
|
|
1
|
+
import { n as BuiltinFileProps } from "../power-plant-LgxcvlMN.mjs";
|
|
3
2
|
//#region src/components/utils-builtin.d.ts
|
|
4
3
|
interface UtilsBuiltinProps extends Omit<BuiltinFileProps, "id" | "description"> {}
|
|
5
4
|
/**
|