@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,45 +1,17 @@
|
|
|
1
|
+
import { BuiltinFile, usePowerlines } from "../contexts/power-plant.mjs";
|
|
1
2
|
import { createComponent, createIntrinsic, memo, mergeProps } from "@alloy-js/core/jsx-runtime";
|
|
2
3
|
import { Show, code, splitProps } from "@alloy-js/core";
|
|
3
|
-
import defu
|
|
4
|
-
import { Spacing } from "@
|
|
5
|
-
import { usePowerlines } from "@powerlines/plugin-alloy/core/contexts/context";
|
|
4
|
+
import { defu } from "defu";
|
|
5
|
+
import { Spacing } from "@power-plant/alloy-js/core/components/spacing";
|
|
6
6
|
import { FunctionDeclaration, IfStatement, InterfaceDeclaration, InterfaceMember, VarDeclaration } from "@alloy-js/typescript";
|
|
7
|
-
import {
|
|
8
|
-
import { TSDoc, TSDocInternal, TSDocLink, TSDocParam, TSDocRemarks, TSDocReturns } from "@powerlines/plugin-alloy/typescript/components/tsdoc";
|
|
7
|
+
import { TSDoc, TSDocInternal, TSDocLink, TSDocParam, TSDocRemarks, TSDocReturns } from "@power-plant/alloy-js/typescript/components/tsdoc";
|
|
9
8
|
|
|
10
9
|
//#region src/components/utils-builtin.tsx
|
|
11
|
-
const __ΩOmit = [
|
|
12
|
-
"T",
|
|
13
|
-
"K",
|
|
14
|
-
() => __ΩPick,
|
|
15
|
-
() => __ΩExclude,
|
|
16
|
-
"Omit",
|
|
17
|
-
"b!b\"e!!e!!ge!\"o$#o##w%y"
|
|
18
|
-
];
|
|
19
|
-
const __ΩPick = [
|
|
20
|
-
"T",
|
|
21
|
-
"K",
|
|
22
|
-
"Pick",
|
|
23
|
-
"l+e#!e\"!fRb!b\"Pde\"\"N#!w#y"
|
|
24
|
-
];
|
|
25
|
-
const __ΩExclude = [
|
|
26
|
-
"T",
|
|
27
|
-
"U",
|
|
28
|
-
"Exclude",
|
|
29
|
-
"l6!Re$!RPe#!e$\"qk#%QRb!b\"Pde\"!p)w#y"
|
|
30
|
-
];
|
|
31
|
-
const __ΩUtilsBuiltinProps = [
|
|
32
|
-
() => __ΩOmit,
|
|
33
|
-
"id",
|
|
34
|
-
"description",
|
|
35
|
-
"UtilsBuiltinProps",
|
|
36
|
-
"P!P.\".#Jo!#Mw$y"
|
|
37
|
-
];
|
|
38
10
|
/**
|
|
39
11
|
* Generates the `findSuggestions` function for suggesting corrections for potentially misspelled options or commands.
|
|
40
12
|
*/
|
|
41
13
|
function FindSuggestionsDeclaration() {
|
|
42
|
-
const context =
|
|
14
|
+
const context = usePowerlines();
|
|
43
15
|
return [
|
|
44
16
|
createComponent(VarDeclaration, {
|
|
45
17
|
"const": true,
|
|
@@ -233,11 +205,6 @@ function FindSuggestionsDeclaration() {
|
|
|
233
205
|
})
|
|
234
206
|
];
|
|
235
207
|
}
|
|
236
|
-
FindSuggestionsDeclaration.__type = [
|
|
237
|
-
"FindSuggestionsDeclaration",
|
|
238
|
-
"Generates the `findSuggestions` function for suggesting corrections for potentially misspelled options or commands.",
|
|
239
|
-
"P\"/!?\""
|
|
240
|
-
];
|
|
241
208
|
/**
|
|
242
209
|
* 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).
|
|
243
210
|
*/
|
|
@@ -381,11 +348,6 @@ function TerminalSizeDeclaration() {
|
|
|
381
348
|
})
|
|
382
349
|
];
|
|
383
350
|
}
|
|
384
|
-
TerminalSizeDeclaration.__type = [
|
|
385
|
-
"TerminalSizeDeclaration",
|
|
386
|
-
"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).",
|
|
387
|
-
"P\"/!?\""
|
|
388
|
-
];
|
|
389
351
|
/**
|
|
390
352
|
* Generates utilities for detecting terminal color support.
|
|
391
353
|
*/
|
|
@@ -416,11 +378,6 @@ function EnvSupportUtilities() {
|
|
|
416
378
|
})
|
|
417
379
|
];
|
|
418
380
|
}
|
|
419
|
-
EnvSupportUtilities.__type = [
|
|
420
|
-
"EnvSupportUtilities",
|
|
421
|
-
"Generates utilities for detecting terminal color support.",
|
|
422
|
-
"P\"/!?\""
|
|
423
|
-
];
|
|
424
381
|
/**
|
|
425
382
|
* Generates utilities for detecting terminal color support.
|
|
426
383
|
*/
|
|
@@ -618,11 +575,6 @@ function ColorSupportUtilities() {
|
|
|
618
575
|
})
|
|
619
576
|
];
|
|
620
577
|
}
|
|
621
|
-
ColorSupportUtilities.__type = [
|
|
622
|
-
"ColorSupportUtilities",
|
|
623
|
-
"Generates utilities for detecting terminal color support.",
|
|
624
|
-
"P\"/!?\""
|
|
625
|
-
];
|
|
626
578
|
/**
|
|
627
579
|
* Generates utilities for detecting terminal color support.
|
|
628
580
|
*/
|
|
@@ -731,16 +683,11 @@ function HyperlinkSupportUtilities() {
|
|
|
731
683
|
})
|
|
732
684
|
];
|
|
733
685
|
}
|
|
734
|
-
HyperlinkSupportUtilities.__type = [
|
|
735
|
-
"HyperlinkSupportUtilities",
|
|
736
|
-
"Generates utilities for detecting terminal color support.",
|
|
737
|
-
"P\"/!?\""
|
|
738
|
-
];
|
|
739
686
|
/**
|
|
740
687
|
* Generates the `resolveModule` function declaration, which is a utility for resolving file paths across different platforms.
|
|
741
688
|
*/
|
|
742
689
|
function ResolveModuleFunctionDeclaration() {
|
|
743
|
-
const context =
|
|
690
|
+
const context = usePowerlines();
|
|
744
691
|
return [
|
|
745
692
|
createComponent(Spacing, {}),
|
|
746
693
|
createComponent(InterfaceDeclaration, {
|
|
@@ -1730,11 +1677,6 @@ function ResolveModuleFunctionDeclaration() {
|
|
|
1730
1677
|
})
|
|
1731
1678
|
];
|
|
1732
1679
|
}
|
|
1733
|
-
ResolveModuleFunctionDeclaration.__type = [
|
|
1734
|
-
"ResolveModuleFunctionDeclaration",
|
|
1735
|
-
"Generates the `resolveModule` function declaration, which is a utility for resolving file paths across different platforms.",
|
|
1736
|
-
"P\"/!?\""
|
|
1737
|
-
];
|
|
1738
1680
|
/**
|
|
1739
1681
|
* A built-in utilities module for Shell Shock.
|
|
1740
1682
|
*/
|
|
@@ -1745,7 +1687,7 @@ function UtilsBuiltin(props) {
|
|
|
1745
1687
|
description: "A collection of helper utilities that ease command-line application development."
|
|
1746
1688
|
}, rest, {
|
|
1747
1689
|
get imports() {
|
|
1748
|
-
return defu
|
|
1690
|
+
return defu(rest.imports ?? {}, {
|
|
1749
1691
|
"node:os": "os",
|
|
1750
1692
|
"node:process": "process",
|
|
1751
1693
|
"node:path": [
|
|
@@ -1771,7 +1713,7 @@ function UtilsBuiltin(props) {
|
|
|
1771
1713
|
});
|
|
1772
1714
|
},
|
|
1773
1715
|
get builtinImports() {
|
|
1774
|
-
return defu
|
|
1716
|
+
return defu(rest.builtinImports ?? {}, {
|
|
1775
1717
|
env: [
|
|
1776
1718
|
"env",
|
|
1777
1719
|
"isCI",
|
|
@@ -1828,14 +1770,7 @@ function UtilsBuiltin(props) {
|
|
|
1828
1770
|
}
|
|
1829
1771
|
}));
|
|
1830
1772
|
}
|
|
1831
|
-
UtilsBuiltin.__type = [
|
|
1832
|
-
() => __ΩUtilsBuiltinProps,
|
|
1833
|
-
"props",
|
|
1834
|
-
"UtilsBuiltin",
|
|
1835
|
-
"A built-in utilities module for Shell Shock.",
|
|
1836
|
-
"Pn!2\"\"/#?$"
|
|
1837
|
-
];
|
|
1838
1773
|
|
|
1839
1774
|
//#endregion
|
|
1840
|
-
export { ColorSupportUtilities, EnvSupportUtilities, FindSuggestionsDeclaration, HyperlinkSupportUtilities, ResolveModuleFunctionDeclaration, TerminalSizeDeclaration, UtilsBuiltin
|
|
1775
|
+
export { ColorSupportUtilities, EnvSupportUtilities, FindSuggestionsDeclaration, HyperlinkSupportUtilities, ResolveModuleFunctionDeclaration, TerminalSizeDeclaration, UtilsBuiltin };
|
|
1841
1776
|
//# sourceMappingURL=utils-builtin.mjs.map
|
|
@@ -0,0 +1,157 @@
|
|
|
1
|
+
import { S as CommandTree, _ as CommandOption, m as CommandConfig, p as CommandBase } from "./command-CtfR7hKM.cjs";
|
|
2
|
+
import { RequiredKeys } from "@stryke/types/base";
|
|
3
|
+
import { ConfigParams, ExecutionContext, OutputConfig, PluginContext, UnresolvedContext, UserConfig } from "powerlines";
|
|
4
|
+
import { AlloyPluginResolvedConfig } from "@powerlines/plugin-alloy/types/plugin";
|
|
5
|
+
import { AutoMDPluginResolvedConfig } from "@powerlines/plugin-automd";
|
|
6
|
+
import { NodeJsPluginOptions, NodeJsPluginResolvedConfig } from "@powerlines/plugin-nodejs/types/plugin";
|
|
7
|
+
import { TsdownPluginResolvedConfig } from "@powerlines/plugin-tsdown/types/plugin";
|
|
8
|
+
import { PackageJson } from "@stryke/types/package-json";
|
|
9
|
+
import { EngineOptions } from "powerlines/engine";
|
|
10
|
+
import { AlloyPluginContext } from "@powerlines/plugin-alloy";
|
|
11
|
+
import { NodeJsPluginContext } from "@powerlines/plugin-nodejs/types";
|
|
12
|
+
import { TsdownPluginContext } from "@powerlines/plugin-tsdown";
|
|
13
|
+
//#region src/types/context.d.ts
|
|
14
|
+
/**
|
|
15
|
+
* Options passed to Shell Shock Power Plant generators.
|
|
16
|
+
*/
|
|
17
|
+
interface CommandGeneratorOptions {
|
|
18
|
+
context: PluginContext;
|
|
19
|
+
template?: unknown;
|
|
20
|
+
}
|
|
21
|
+
type Context<TResolvedConfig extends ResolvedConfig = ResolvedConfig> = TsdownPluginContext<TResolvedConfig> & AlloyPluginContext<TResolvedConfig> & NodeJsPluginContext<TResolvedConfig> & {
|
|
22
|
+
/**
|
|
23
|
+
* The root path where commands are located.
|
|
24
|
+
*/
|
|
25
|
+
commandsPath: string;
|
|
26
|
+
/**
|
|
27
|
+
* The default command arguments to apply to all application commands.
|
|
28
|
+
*/
|
|
29
|
+
globalOptions: CommandOption[];
|
|
30
|
+
/**
|
|
31
|
+
* The list of commands discovered in the project.
|
|
32
|
+
*/
|
|
33
|
+
inputs: CommandConfig[];
|
|
34
|
+
/**
|
|
35
|
+
* The command-line application structure.
|
|
36
|
+
*/
|
|
37
|
+
commands: Record<string, CommandTree>;
|
|
38
|
+
};
|
|
39
|
+
type ExecutionContext$1<TResolvedConfig extends ResolvedConfig = ResolvedConfig> = ExecutionContext<TResolvedConfig>;
|
|
40
|
+
type UnresolvedContext$1<TResolvedConfig extends ResolvedConfig = ResolvedConfig> = UnresolvedContext<TResolvedConfig>;
|
|
41
|
+
//#endregion
|
|
42
|
+
//#region src/types/config.d.ts
|
|
43
|
+
type BuildOptions = Pick<UserConfig, "name" | "title" | "description" | "input" | "output" | "logLevel" | "mode" | "define" | "inject" | "resolve" | "organization" | "skipCache" | "autoInstall" | "plugins" | "tsconfig" | "tsconfigRaw">;
|
|
44
|
+
interface DocsOptions {
|
|
45
|
+
/**
|
|
46
|
+
* A URL to the application documentation or reference.
|
|
47
|
+
*/
|
|
48
|
+
app: string;
|
|
49
|
+
/**
|
|
50
|
+
* A URL to the application command specific documentation or reference.
|
|
51
|
+
*
|
|
52
|
+
* @remarks
|
|
53
|
+
* This URL is expected to contain the token `{command}` or `{cmd}`, which will be replaced with the full command path to provide links to command specific documentation. For example, `myapp command subcommand` will be translated to `{docs}/command/subcommand`.
|
|
54
|
+
*/
|
|
55
|
+
commands?: string;
|
|
56
|
+
}
|
|
57
|
+
interface BaseOptions {
|
|
58
|
+
/**
|
|
59
|
+
* A set of global command options to apply to each command.
|
|
60
|
+
*
|
|
61
|
+
* @remarks
|
|
62
|
+
* Each command will inherit these global options. To disable the addition of these global options, set this property to `false`, or provide a custom set of options/a function that returns them. A `GlobalOptions` interface will be created by the `shell-shock types` command and added to the generated `shell-shock.d.ts` file.
|
|
63
|
+
*/
|
|
64
|
+
globalOptions?: CommandOption[] | ((context: Context<any>, input: CommandBase) => CommandOption[]) | false;
|
|
65
|
+
/**
|
|
66
|
+
* Determines whether commands and option names are treated as case-sensitive.
|
|
67
|
+
*
|
|
68
|
+
* @defaultValue `false`
|
|
69
|
+
*/
|
|
70
|
+
isCaseSensitive?: boolean;
|
|
71
|
+
/**
|
|
72
|
+
* The name of the binary (the {@link https://docs.npmjs.com/cli/v11/configuring-npm/package-json#bin | "bin" field} in package.json) that will be used to run the application through NodeJs package managers (e.g., npm, yarn, pnpm).
|
|
73
|
+
*
|
|
74
|
+
* @remarks
|
|
75
|
+
* If an array is provided, each binary will be linked to the same compiled output file. If not provided, the {@link Options.name | name} option will be used.
|
|
76
|
+
*
|
|
77
|
+
* @see https://docs.npmjs.com/cli/v11/configuring-npm/package-json#bin
|
|
78
|
+
* @see https://yarnpkg.com/cli/bin
|
|
79
|
+
* @see https://pnpm.io/package_json#bin
|
|
80
|
+
*/
|
|
81
|
+
bin?: string | string[];
|
|
82
|
+
/**
|
|
83
|
+
* Should Shell Shock attempt to automatically assign environment variables to manipulate default values for command options based on the option name?
|
|
84
|
+
*
|
|
85
|
+
* @remarks
|
|
86
|
+
* If set to a string, Shell Shock will use the provided string as an application specific environment variable prefix, convert the option name to {@link https://stringcase.org/cases/constant/ | constant case}, and prepend the provided `string` value to determine the corresponding environment variable name. For example, if an option is named `"configPath"` and the `autoAssignEnv` is `"MY_APP"`, Shell Shock will look for an environment variable named `"MY_APP_CONFIG_PATH"` and assign its value to the option if it exists. If set to `true`, Shell Shock will use a default environment variable prefix derived from the {@link Options.name | application name}.
|
|
87
|
+
*
|
|
88
|
+
* @see https://medium.com/chingu/an-introduction-to-environment-variables-and-how-to-use-them-f602f66d15fa
|
|
89
|
+
* @see https://stringcase.org/cases/constant/
|
|
90
|
+
*/
|
|
91
|
+
autoAssignEnv?: true | string;
|
|
92
|
+
/**
|
|
93
|
+
* A URL to the command-line interface application's reference documentation.
|
|
94
|
+
*
|
|
95
|
+
* @remarks
|
|
96
|
+
* This URL can be used in various displays of the user interface and documentation to provide users with a reference for the application. It can also be used by plugins to link to the documentation in relevant contexts. If the token `{command}` (or `{cmd}`) is included in the URL, it will be replaced with the full command path to provide links to command specific documentation. For example, `myapp command subcommand` will be translated to `{docs}/command/subcommand`.
|
|
97
|
+
*/
|
|
98
|
+
docs?: DocsOptions | string;
|
|
99
|
+
}
|
|
100
|
+
/**
|
|
101
|
+
* The plugin options for Shell Shock.
|
|
102
|
+
*/
|
|
103
|
+
type Options = BaseOptions & Partial<NodeJsPluginOptions>;
|
|
104
|
+
/**
|
|
105
|
+
* The output configuration options for Shell Shock.
|
|
106
|
+
*/
|
|
107
|
+
type OutputConfig$1 = Pick<OutputConfig, "path" | "copy" | "storage" | "sourceMap"> & {
|
|
108
|
+
/**
|
|
109
|
+
* An indicator specifying whether to generate TypeScript declaration files (.d.ts) during the build process.
|
|
110
|
+
*/
|
|
111
|
+
dts?: false;
|
|
112
|
+
};
|
|
113
|
+
/**
|
|
114
|
+
* The user configuration options for Shell Shock.
|
|
115
|
+
*/
|
|
116
|
+
type UserConfig$1 = BaseOptions & RequiredKeys<BuildOptions, "name"> & {
|
|
117
|
+
/**
|
|
118
|
+
* Configuration for the output of the build process
|
|
119
|
+
*/
|
|
120
|
+
output?: OutputConfig$1;
|
|
121
|
+
};
|
|
122
|
+
type UserConfigFnObject = (env: ConfigParams) => UserConfig$1 | UserConfig$1[];
|
|
123
|
+
type UserConfigFnPromise = (env: ConfigParams) => Promise<UserConfig$1 | UserConfig$1[]>;
|
|
124
|
+
type UserConfigFn = (env: ConfigParams) => UserConfig$1 | UserConfig$1[] | Promise<UserConfig$1 | UserConfig$1[]>;
|
|
125
|
+
type UserConfigExport = UserConfig$1 | UserConfig$1[] | Promise<UserConfig$1 | UserConfig$1[]> | UserConfigFnObject | UserConfigFnPromise | UserConfigFn;
|
|
126
|
+
type EngineOptions$1 = Omit<EngineOptions, "root" | "name" | "framework">;
|
|
127
|
+
/**
|
|
128
|
+
* The resolved configuration options for Shell Shock.
|
|
129
|
+
*/
|
|
130
|
+
type ResolvedConfig = TsdownPluginResolvedConfig & AlloyPluginResolvedConfig & AutoMDPluginResolvedConfig & NodeJsPluginResolvedConfig & Required<Omit<Options, "bin" | "docs">> & {
|
|
131
|
+
/**
|
|
132
|
+
* The name of the binary (the {@link https://docs.npmjs.com/cli/v11/configuring-npm/package-json#bin | "bin" field} in package.json) that will be used to run the application through NodeJs package managers (e.g., npm, yarn, pnpm).
|
|
133
|
+
*
|
|
134
|
+
* @remarks
|
|
135
|
+
* If an array is provided, each binary will be linked to the same compiled output file. If not provided, the {@link Options.name | name} option will be used.
|
|
136
|
+
*
|
|
137
|
+
* @see https://docs.npmjs.com/cli/v11/configuring-npm/package-json#bin
|
|
138
|
+
* @see https://yarnpkg.com/cli/bin
|
|
139
|
+
* @see https://pnpm.io/package_json#bin
|
|
140
|
+
*/
|
|
141
|
+
bin: PackageJson["bin"];
|
|
142
|
+
/**
|
|
143
|
+
* The URL(s) to the command-line interface application's reference documentation.
|
|
144
|
+
*/
|
|
145
|
+
docs: DocsOptions;
|
|
146
|
+
/**
|
|
147
|
+
* The command-line application specific environment variable prefix used for automatically assigning environment variables to command options.
|
|
148
|
+
*/
|
|
149
|
+
appSpecificEnvPrefix: string;
|
|
150
|
+
/**
|
|
151
|
+
* The user configuration for the Shell Shock process.
|
|
152
|
+
*/
|
|
153
|
+
userConfig: UserConfig$1;
|
|
154
|
+
};
|
|
155
|
+
//#endregion
|
|
156
|
+
export { ResolvedConfig as a, UserConfigFn as c, CommandGeneratorOptions as d, Context as f, OutputConfig$1 as i, UserConfigFnObject as l, UnresolvedContext$1 as m, EngineOptions$1 as n, UserConfig$1 as o, ExecutionContext$1 as p, Options as r, UserConfigExport as s, DocsOptions as t, UserConfigFnPromise as u };
|
|
157
|
+
//# sourceMappingURL=config-BIF9mEz0.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"config-BIF9mEz0.d.cts","names":[],"sources":["../src/types/context.ts","../src/types/config.ts"],"mappings":";;;;;;;;;;;;;;;;UAgCiB;EACf,SAAS;EACT;;KAGU,QAAQ,wBAAwB,iBAAiB,kBAC3D,oBAAoB,mBAClB,mBAAmB,mBACnB,oBAAoB;;;;EAIlB;;;;EAKA,eAAe;;;;EAKf,QAAQ;;;;EAKR,UAAU,eAAe;;KAGnB,mBACV,wBAAwB,iBAAiB,kBACvC,iBAA2B;KAEnB,oBACV,wBAAwB,iBAAiB,kBACvC,kBAA4B;;;KChC3B,eAAe,KAClB;UAmBe;;;;EAIf;;;;;;;EAQA;;UAGQ;;;;;;;EAOR,gBACI,oBACE,SAAS,cAAc,OAAO,gBAAgB;;;;;;EAQpD;;;;;;;;;;;EAYA;;;;;;;;;;EAWA;;;;;;;EAQA,OAAO;;;;;KAMG,UAAU,cAAc,QAAQ;;;;KAKhC,iBAAe,KACzB;;;;EAMA;;;;;KAMU,eAAa,cACvB,aAAa;;;;EAIX,SAAS;;KAGD,sBACV,KAAK,iBACF,eAAa;KACN,uBACV,KAAK,iBACF,QAAQ,eAAa;KACd,gBACV,KAAK,iBACF,eAAa,iBAAe,QAAQ,eAAa;KAE1C,mBACR,eACA,iBACA,QAAQ,eAAa,kBACrB,qBACA,sBACA;KAEQ,kBAAgB,KAC1B;;;;KAOU,iBAAiB,6BAC3B,4BACA,6BACA,6BACA,SAAS,KAAK;;;;;;;;;;;EAWZ,KAAK;;;;EAKL,MAAM;;;;EAKN;;;;EAKA,YAAY"}
|
|
@@ -0,0 +1,157 @@
|
|
|
1
|
+
import { S as CommandTree, _ as CommandOption, m as CommandConfig, p as CommandBase } from "./command-B6KYexlV.mjs";
|
|
2
|
+
import { AutoMDPluginResolvedConfig } from "@powerlines/plugin-automd";
|
|
3
|
+
import { TsdownPluginContext } from "@powerlines/plugin-tsdown";
|
|
4
|
+
import { ConfigParams, ExecutionContext, OutputConfig, PluginContext, UnresolvedContext, UserConfig } from "powerlines";
|
|
5
|
+
import { RequiredKeys } from "@stryke/types/base";
|
|
6
|
+
import { AlloyPluginResolvedConfig } from "@powerlines/plugin-alloy/types/plugin";
|
|
7
|
+
import { NodeJsPluginOptions, NodeJsPluginResolvedConfig } from "@powerlines/plugin-nodejs/types/plugin";
|
|
8
|
+
import { TsdownPluginResolvedConfig } from "@powerlines/plugin-tsdown/types/plugin";
|
|
9
|
+
import { PackageJson } from "@stryke/types/package-json";
|
|
10
|
+
import { EngineOptions } from "powerlines/engine";
|
|
11
|
+
import { AlloyPluginContext } from "@powerlines/plugin-alloy";
|
|
12
|
+
import { NodeJsPluginContext } from "@powerlines/plugin-nodejs/types";
|
|
13
|
+
//#region src/types/context.d.ts
|
|
14
|
+
/**
|
|
15
|
+
* Options passed to Shell Shock Power Plant generators.
|
|
16
|
+
*/
|
|
17
|
+
interface CommandGeneratorOptions {
|
|
18
|
+
context: PluginContext;
|
|
19
|
+
template?: unknown;
|
|
20
|
+
}
|
|
21
|
+
type Context<TResolvedConfig extends ResolvedConfig = ResolvedConfig> = TsdownPluginContext<TResolvedConfig> & AlloyPluginContext<TResolvedConfig> & NodeJsPluginContext<TResolvedConfig> & {
|
|
22
|
+
/**
|
|
23
|
+
* The root path where commands are located.
|
|
24
|
+
*/
|
|
25
|
+
commandsPath: string;
|
|
26
|
+
/**
|
|
27
|
+
* The default command arguments to apply to all application commands.
|
|
28
|
+
*/
|
|
29
|
+
globalOptions: CommandOption[];
|
|
30
|
+
/**
|
|
31
|
+
* The list of commands discovered in the project.
|
|
32
|
+
*/
|
|
33
|
+
inputs: CommandConfig[];
|
|
34
|
+
/**
|
|
35
|
+
* The command-line application structure.
|
|
36
|
+
*/
|
|
37
|
+
commands: Record<string, CommandTree>;
|
|
38
|
+
};
|
|
39
|
+
type ExecutionContext$1<TResolvedConfig extends ResolvedConfig = ResolvedConfig> = ExecutionContext<TResolvedConfig>;
|
|
40
|
+
type UnresolvedContext$1<TResolvedConfig extends ResolvedConfig = ResolvedConfig> = UnresolvedContext<TResolvedConfig>;
|
|
41
|
+
//#endregion
|
|
42
|
+
//#region src/types/config.d.ts
|
|
43
|
+
type BuildOptions = Pick<UserConfig, "name" | "title" | "description" | "input" | "output" | "logLevel" | "mode" | "define" | "inject" | "resolve" | "organization" | "skipCache" | "autoInstall" | "plugins" | "tsconfig" | "tsconfigRaw">;
|
|
44
|
+
interface DocsOptions {
|
|
45
|
+
/**
|
|
46
|
+
* A URL to the application documentation or reference.
|
|
47
|
+
*/
|
|
48
|
+
app: string;
|
|
49
|
+
/**
|
|
50
|
+
* A URL to the application command specific documentation or reference.
|
|
51
|
+
*
|
|
52
|
+
* @remarks
|
|
53
|
+
* This URL is expected to contain the token `{command}` or `{cmd}`, which will be replaced with the full command path to provide links to command specific documentation. For example, `myapp command subcommand` will be translated to `{docs}/command/subcommand`.
|
|
54
|
+
*/
|
|
55
|
+
commands?: string;
|
|
56
|
+
}
|
|
57
|
+
interface BaseOptions {
|
|
58
|
+
/**
|
|
59
|
+
* A set of global command options to apply to each command.
|
|
60
|
+
*
|
|
61
|
+
* @remarks
|
|
62
|
+
* Each command will inherit these global options. To disable the addition of these global options, set this property to `false`, or provide a custom set of options/a function that returns them. A `GlobalOptions` interface will be created by the `shell-shock types` command and added to the generated `shell-shock.d.ts` file.
|
|
63
|
+
*/
|
|
64
|
+
globalOptions?: CommandOption[] | ((context: Context<any>, input: CommandBase) => CommandOption[]) | false;
|
|
65
|
+
/**
|
|
66
|
+
* Determines whether commands and option names are treated as case-sensitive.
|
|
67
|
+
*
|
|
68
|
+
* @defaultValue `false`
|
|
69
|
+
*/
|
|
70
|
+
isCaseSensitive?: boolean;
|
|
71
|
+
/**
|
|
72
|
+
* The name of the binary (the {@link https://docs.npmjs.com/cli/v11/configuring-npm/package-json#bin | "bin" field} in package.json) that will be used to run the application through NodeJs package managers (e.g., npm, yarn, pnpm).
|
|
73
|
+
*
|
|
74
|
+
* @remarks
|
|
75
|
+
* If an array is provided, each binary will be linked to the same compiled output file. If not provided, the {@link Options.name | name} option will be used.
|
|
76
|
+
*
|
|
77
|
+
* @see https://docs.npmjs.com/cli/v11/configuring-npm/package-json#bin
|
|
78
|
+
* @see https://yarnpkg.com/cli/bin
|
|
79
|
+
* @see https://pnpm.io/package_json#bin
|
|
80
|
+
*/
|
|
81
|
+
bin?: string | string[];
|
|
82
|
+
/**
|
|
83
|
+
* Should Shell Shock attempt to automatically assign environment variables to manipulate default values for command options based on the option name?
|
|
84
|
+
*
|
|
85
|
+
* @remarks
|
|
86
|
+
* If set to a string, Shell Shock will use the provided string as an application specific environment variable prefix, convert the option name to {@link https://stringcase.org/cases/constant/ | constant case}, and prepend the provided `string` value to determine the corresponding environment variable name. For example, if an option is named `"configPath"` and the `autoAssignEnv` is `"MY_APP"`, Shell Shock will look for an environment variable named `"MY_APP_CONFIG_PATH"` and assign its value to the option if it exists. If set to `true`, Shell Shock will use a default environment variable prefix derived from the {@link Options.name | application name}.
|
|
87
|
+
*
|
|
88
|
+
* @see https://medium.com/chingu/an-introduction-to-environment-variables-and-how-to-use-them-f602f66d15fa
|
|
89
|
+
* @see https://stringcase.org/cases/constant/
|
|
90
|
+
*/
|
|
91
|
+
autoAssignEnv?: true | string;
|
|
92
|
+
/**
|
|
93
|
+
* A URL to the command-line interface application's reference documentation.
|
|
94
|
+
*
|
|
95
|
+
* @remarks
|
|
96
|
+
* This URL can be used in various displays of the user interface and documentation to provide users with a reference for the application. It can also be used by plugins to link to the documentation in relevant contexts. If the token `{command}` (or `{cmd}`) is included in the URL, it will be replaced with the full command path to provide links to command specific documentation. For example, `myapp command subcommand` will be translated to `{docs}/command/subcommand`.
|
|
97
|
+
*/
|
|
98
|
+
docs?: DocsOptions | string;
|
|
99
|
+
}
|
|
100
|
+
/**
|
|
101
|
+
* The plugin options for Shell Shock.
|
|
102
|
+
*/
|
|
103
|
+
type Options = BaseOptions & Partial<NodeJsPluginOptions>;
|
|
104
|
+
/**
|
|
105
|
+
* The output configuration options for Shell Shock.
|
|
106
|
+
*/
|
|
107
|
+
type OutputConfig$1 = Pick<OutputConfig, "path" | "copy" | "storage" | "sourceMap"> & {
|
|
108
|
+
/**
|
|
109
|
+
* An indicator specifying whether to generate TypeScript declaration files (.d.ts) during the build process.
|
|
110
|
+
*/
|
|
111
|
+
dts?: false;
|
|
112
|
+
};
|
|
113
|
+
/**
|
|
114
|
+
* The user configuration options for Shell Shock.
|
|
115
|
+
*/
|
|
116
|
+
type UserConfig$1 = BaseOptions & RequiredKeys<BuildOptions, "name"> & {
|
|
117
|
+
/**
|
|
118
|
+
* Configuration for the output of the build process
|
|
119
|
+
*/
|
|
120
|
+
output?: OutputConfig$1;
|
|
121
|
+
};
|
|
122
|
+
type UserConfigFnObject = (env: ConfigParams) => UserConfig$1 | UserConfig$1[];
|
|
123
|
+
type UserConfigFnPromise = (env: ConfigParams) => Promise<UserConfig$1 | UserConfig$1[]>;
|
|
124
|
+
type UserConfigFn = (env: ConfigParams) => UserConfig$1 | UserConfig$1[] | Promise<UserConfig$1 | UserConfig$1[]>;
|
|
125
|
+
type UserConfigExport = UserConfig$1 | UserConfig$1[] | Promise<UserConfig$1 | UserConfig$1[]> | UserConfigFnObject | UserConfigFnPromise | UserConfigFn;
|
|
126
|
+
type EngineOptions$1 = Omit<EngineOptions, "root" | "name" | "framework">;
|
|
127
|
+
/**
|
|
128
|
+
* The resolved configuration options for Shell Shock.
|
|
129
|
+
*/
|
|
130
|
+
type ResolvedConfig = TsdownPluginResolvedConfig & AlloyPluginResolvedConfig & AutoMDPluginResolvedConfig & NodeJsPluginResolvedConfig & Required<Omit<Options, "bin" | "docs">> & {
|
|
131
|
+
/**
|
|
132
|
+
* The name of the binary (the {@link https://docs.npmjs.com/cli/v11/configuring-npm/package-json#bin | "bin" field} in package.json) that will be used to run the application through NodeJs package managers (e.g., npm, yarn, pnpm).
|
|
133
|
+
*
|
|
134
|
+
* @remarks
|
|
135
|
+
* If an array is provided, each binary will be linked to the same compiled output file. If not provided, the {@link Options.name | name} option will be used.
|
|
136
|
+
*
|
|
137
|
+
* @see https://docs.npmjs.com/cli/v11/configuring-npm/package-json#bin
|
|
138
|
+
* @see https://yarnpkg.com/cli/bin
|
|
139
|
+
* @see https://pnpm.io/package_json#bin
|
|
140
|
+
*/
|
|
141
|
+
bin: PackageJson["bin"];
|
|
142
|
+
/**
|
|
143
|
+
* The URL(s) to the command-line interface application's reference documentation.
|
|
144
|
+
*/
|
|
145
|
+
docs: DocsOptions;
|
|
146
|
+
/**
|
|
147
|
+
* The command-line application specific environment variable prefix used for automatically assigning environment variables to command options.
|
|
148
|
+
*/
|
|
149
|
+
appSpecificEnvPrefix: string;
|
|
150
|
+
/**
|
|
151
|
+
* The user configuration for the Shell Shock process.
|
|
152
|
+
*/
|
|
153
|
+
userConfig: UserConfig$1;
|
|
154
|
+
};
|
|
155
|
+
//#endregion
|
|
156
|
+
export { ResolvedConfig as a, UserConfigFn as c, CommandGeneratorOptions as d, Context as f, OutputConfig$1 as i, UserConfigFnObject as l, UnresolvedContext$1 as m, EngineOptions$1 as n, UserConfig$1 as o, ExecutionContext$1 as p, Options as r, UserConfigExport as s, DocsOptions as t, UserConfigFnPromise as u };
|
|
157
|
+
//# sourceMappingURL=config-CnNYdfsL.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"config-CnNYdfsL.d.mts","names":[],"sources":["../src/types/context.ts","../src/types/config.ts"],"mappings":""}
|
package/dist/config.cjs
CHANGED
|
@@ -1,65 +1,31 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2
|
-
|
|
3
2
|
//#region src/config.ts
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
"P\"w!F`2\"\"w!F`/#"
|
|
28
|
-
];
|
|
29
|
-
defineConfig.__type = [
|
|
30
|
-
"UserConfigFnObject",
|
|
31
|
-
"config",
|
|
32
|
-
"defineConfig",
|
|
33
|
-
"P\"w!2\"\"w!/#"
|
|
34
|
-
];
|
|
35
|
-
defineConfig.__type = [
|
|
36
|
-
"UserConfigFnPromise",
|
|
37
|
-
"config",
|
|
38
|
-
"defineConfig",
|
|
39
|
-
"P\"w!2\"\"w!/#"
|
|
40
|
-
];
|
|
41
|
-
defineConfig.__type = [
|
|
42
|
-
"UserConfigFn",
|
|
43
|
-
"config",
|
|
44
|
-
"defineConfig",
|
|
45
|
-
"P\"w!2\"\"w!/#"
|
|
46
|
-
];
|
|
47
|
-
defineConfig.__type = [
|
|
48
|
-
"UserConfigExport",
|
|
49
|
-
"config",
|
|
50
|
-
"defineConfig",
|
|
51
|
-
"P\"w!2\"\"w!/#"
|
|
52
|
-
];
|
|
3
|
+
/**
|
|
4
|
+
* Type helper to make it easier to use `shell-shock.config.ts` files. Accepts a direct {@link UserConfig} object, or a function that returns it. The function receives a {@link ConfigParams} object.
|
|
5
|
+
*
|
|
6
|
+
* @example
|
|
7
|
+
* ```ts
|
|
8
|
+
* import { defineConfig } from '@shell-shock/core/config';
|
|
9
|
+
*
|
|
10
|
+
* export default defineConfig({
|
|
11
|
+
* // Your configuration here
|
|
12
|
+
* });
|
|
13
|
+
*
|
|
14
|
+
* // Or with a function
|
|
15
|
+
* export default defineConfig((env) => {
|
|
16
|
+
* console.log(`Running command: ${env.command} in mode: ${env.mode}`);
|
|
17
|
+
* return {
|
|
18
|
+
* // Your configuration here
|
|
19
|
+
* };
|
|
20
|
+
* });
|
|
21
|
+
* ```
|
|
22
|
+
*
|
|
23
|
+
* @param config - The user configuration object or a function that returns it.
|
|
24
|
+
* @returns The provided configuration, unmodified.
|
|
25
|
+
*/
|
|
53
26
|
function defineConfig(config) {
|
|
54
27
|
return config;
|
|
55
28
|
}
|
|
56
|
-
defineConfig.__type = [
|
|
57
|
-
"UserConfigExport",
|
|
58
|
-
"config",
|
|
59
|
-
"defineConfig",
|
|
60
|
-
"P\"w!2\"\"w!/#"
|
|
61
|
-
];
|
|
62
29
|
|
|
63
30
|
//#endregion
|
|
64
|
-
exports.defineConfig = defineConfig;
|
|
65
|
-
//# sourceMappingURL=config.cjs.map
|
|
31
|
+
exports.defineConfig = defineConfig;
|
package/dist/config.d.cts
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
1
|
+
import { a as ResolvedConfig, c as UserConfigFn, i as OutputConfig, l as UserConfigFnObject, n as EngineOptions, o as UserConfig, r as Options, s as UserConfigExport, t as DocsOptions, u as UserConfigFnPromise } from "./config-BIF9mEz0.cjs";
|
|
3
2
|
//#region src/config.d.ts
|
|
4
3
|
/**
|
|
5
4
|
* Type helper to make it easier to use `shell-shock.config.ts` files. Accepts a direct {@link UserConfig} object, or a function that returns it. The function receives a {@link ConfigParams} object.
|
package/dist/config.d.cts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.d.cts","names":[],"sources":["../src/config.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"config.d.cts","names":[],"sources":["../src/config.ts"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;iBAmDgB,aAAa,QAAQ,aAAa;iBAClC,aAAa,QAAQ,eAAe;iBACpC,aAAa,QAAQ,QAAQ,cAAc,QAAQ;iBACnD,aACd,QAAQ,QAAQ,gBACf,QAAQ;iBACK,aAAa,QAAQ,qBAAqB;iBAC1C,aAAa,QAAQ,sBAAsB;iBAC3C,aAAa,QAAQ,eAAe;iBACpC,aAAa,QAAQ,mBAAmB"}
|
package/dist/config.d.mts
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
1
|
+
import { a as ResolvedConfig, c as UserConfigFn, i as OutputConfig, l as UserConfigFnObject, n as EngineOptions, o as UserConfig, r as Options, s as UserConfigExport, t as DocsOptions, u as UserConfigFnPromise } from "./config-CnNYdfsL.mjs";
|
|
3
2
|
//#region src/config.d.ts
|
|
4
3
|
/**
|
|
5
4
|
* Type helper to make it easier to use `shell-shock.config.ts` files. Accepts a direct {@link UserConfig} object, or a function that returns it. The function receives a {@link ConfigParams} object.
|