@shell-shock/core 0.15.2 → 0.16.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/api.cjs +10 -7
- package/dist/api.cjs.map +1 -1
- package/dist/api.d.cts +1 -1
- package/dist/api.d.cts.map +1 -1
- package/dist/api.d.mts +1 -1
- package/dist/api.d.mts.map +1 -1
- package/dist/api.mjs +11 -8
- package/dist/api.mjs.map +1 -1
- package/dist/components/helpers.cjs +1 -1
- package/dist/components/helpers.cjs.map +1 -1
- package/dist/components/helpers.mjs +1 -1
- package/dist/components/helpers.mjs.map +1 -1
- package/dist/components/index.cjs +8 -4
- package/dist/components/index.d.cts +4 -2
- package/dist/components/index.d.mts +4 -2
- package/dist/components/index.mjs +4 -2
- package/dist/components/options-parser-logic.cjs +68 -48
- package/dist/components/options-parser-logic.cjs.map +1 -1
- package/dist/components/options-parser-logic.d.cts.map +1 -1
- package/dist/components/options-parser-logic.d.mts.map +1 -1
- package/dist/components/options-parser-logic.mjs +68 -48
- package/dist/components/options-parser-logic.mjs.map +1 -1
- package/dist/components/spawn-builtin.cjs +656 -0
- package/dist/components/spawn-builtin.cjs.map +1 -0
- package/dist/components/spawn-builtin.d.cts +12 -0
- package/dist/components/spawn-builtin.d.cts.map +1 -0
- package/dist/components/spawn-builtin.d.mts +12 -0
- package/dist/components/spawn-builtin.d.mts.map +1 -0
- package/dist/components/spawn-builtin.mjs +653 -0
- package/dist/components/spawn-builtin.mjs.map +1 -0
- package/dist/components/state-builtin.cjs +553 -0
- package/dist/components/state-builtin.cjs.map +1 -0
- package/dist/components/state-builtin.d.cts +18 -0
- package/dist/components/state-builtin.d.cts.map +1 -0
- package/dist/components/state-builtin.d.mts +18 -0
- package/dist/components/state-builtin.d.mts.map +1 -0
- package/dist/components/state-builtin.mjs +547 -0
- package/dist/components/state-builtin.mjs.map +1 -0
- package/dist/components/utils-builtin.cjs +3 -499
- package/dist/components/utils-builtin.cjs.map +1 -1
- package/dist/components/utils-builtin.d.cts +1 -10
- package/dist/components/utils-builtin.d.cts.map +1 -1
- package/dist/components/utils-builtin.d.mts +1 -10
- package/dist/components/utils-builtin.d.mts.map +1 -1
- package/dist/components/utils-builtin.mjs +5 -498
- package/dist/components/utils-builtin.mjs.map +1 -1
- package/dist/config.cjs.map +1 -1
- package/dist/config.mjs.map +1 -1
- package/dist/contexts/options.cjs +9 -9
- package/dist/contexts/options.cjs.map +1 -1
- package/dist/contexts/options.d.cts +2 -2
- package/dist/contexts/options.d.cts.map +1 -1
- package/dist/contexts/options.d.mts +2 -2
- package/dist/contexts/options.d.mts.map +1 -1
- package/dist/contexts/options.mjs +9 -9
- package/dist/contexts/options.mjs.map +1 -1
- package/dist/index.cjs +2 -10
- package/dist/index.d.cts +1 -2
- package/dist/index.d.mts +1 -2
- package/dist/index.mjs +1 -7
- package/dist/plugin.cjs +11 -26
- package/dist/plugin.cjs.map +1 -1
- package/dist/plugin.d.cts +1 -1
- package/dist/plugin.d.cts.map +1 -1
- package/dist/plugin.d.mts +1 -1
- package/dist/plugin.d.mts.map +1 -1
- package/dist/plugin.mjs +10 -24
- package/dist/plugin.mjs.map +1 -1
- package/dist/types/config.cjs +3 -1
- package/dist/types/config.cjs.map +1 -1
- package/dist/types/config.d.cts +1 -1
- package/dist/types/config.d.cts.map +1 -1
- package/dist/types/config.d.mts +1 -1
- package/dist/types/config.d.mts.map +1 -1
- package/dist/types/config.mjs +3 -1
- package/dist/types/config.mjs.map +1 -1
- package/dist/types/env.cjs +2 -1
- package/dist/types/env.cjs.map +1 -1
- package/dist/types/env.d.cts +15 -0
- package/dist/types/env.d.cts.map +1 -1
- package/dist/types/env.d.mts +15 -0
- package/dist/types/env.d.mts.map +1 -1
- package/dist/types/env.mjs +2 -1
- package/dist/types/env.mjs.map +1 -1
- package/dist/types/index.cjs +0 -2
- package/dist/types/index.d.cts +1 -2
- package/dist/types/index.d.mts +1 -2
- package/dist/types/index.mjs +1 -2
- package/package.json +50 -36
- package/dist/index.cjs.map +0 -1
- package/dist/index.mjs.map +0 -1
- package/dist/types/runtime.cjs +0 -13
- package/dist/types/runtime.cjs.map +0 -1
- package/dist/types/runtime.d.cts +0 -14
- package/dist/types/runtime.d.cts.map +0 -1
- package/dist/types/runtime.d.mts +0 -14
- package/dist/types/runtime.d.mts.map +0 -1
- package/dist/types/runtime.mjs +0 -11
- package/dist/types/runtime.mjs.map +0 -1
package/dist/api.cjs
CHANGED
|
@@ -17,12 +17,13 @@ const __ΩPartial = [
|
|
|
17
17
|
*/
|
|
18
18
|
var ShellShockAPI = class ShellShockAPI {
|
|
19
19
|
#powerlines;
|
|
20
|
-
static async from(config
|
|
21
|
-
|
|
20
|
+
static async from(config, workspaceRoot) {
|
|
21
|
+
const userConfig = {
|
|
22
22
|
framework: "shell-shock",
|
|
23
23
|
...config,
|
|
24
24
|
plugins: [require_plugin.default(), ...config.plugins ?? []]
|
|
25
|
-
}
|
|
25
|
+
};
|
|
26
|
+
return new ShellShockAPI(await (workspaceRoot ? powerlines.PowerlinesAPI.from(workspaceRoot, userConfig) : (0, powerlines.createPowerlines)(userConfig)));
|
|
26
27
|
}
|
|
27
28
|
constructor(powerlines$1) {
|
|
28
29
|
this.#powerlines = powerlines$1;
|
|
@@ -49,7 +50,7 @@ var ShellShockAPI = class ShellShockAPI {
|
|
|
49
50
|
"#powerlines",
|
|
50
51
|
"UserConfig",
|
|
51
52
|
"config",
|
|
52
|
-
|
|
53
|
+
"workspaceRoot",
|
|
53
54
|
() => ShellShockAPI,
|
|
54
55
|
"from",
|
|
55
56
|
"powerlines",
|
|
@@ -62,7 +63,7 @@ var ShellShockAPI = class ShellShockAPI {
|
|
|
62
63
|
"docs",
|
|
63
64
|
"finalize",
|
|
64
65
|
"ShellShockAPI",
|
|
65
|
-
"!3!P\"w\"2
|
|
66
|
+
"!3!P\"w\"2#&2$8P7%`0&sP!2'\"0(P!2)$`0*P!2)$`0+P!2)$`0,P!2)$`0-P!2)$`0.P$`0/5w0"
|
|
66
67
|
];
|
|
67
68
|
};
|
|
68
69
|
/**
|
|
@@ -72,8 +73,10 @@ var ShellShockAPI = class ShellShockAPI {
|
|
|
72
73
|
* @returns A promise that resolves to a {@link ShellShockAPI} instance.
|
|
73
74
|
*/
|
|
74
75
|
async function createShellShock(options = {}) {
|
|
75
|
-
|
|
76
|
-
|
|
76
|
+
return ShellShockAPI.from({
|
|
77
|
+
root: process.cwd(),
|
|
78
|
+
...options
|
|
79
|
+
});
|
|
77
80
|
}
|
|
78
81
|
createShellShock.__type = [
|
|
79
82
|
() => __ΩPartial,
|
package/dist/api.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"api.cjs","names":[],"sources":["../src/api.ts"],"sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Shell Shock\n\n This code was released as part of the Shell Shock project. Shell Shock\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/shell-shock.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/shell-shock\n Documentation: https://docs.stormsoftware.com/projects/shell-shock\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nimport type {\n BuildInlineConfig,\n CleanInlineConfig,\n DocsInlineConfig,\n LintInlineConfig,\n PluginConfig,\n
|
|
1
|
+
{"version":3,"file":"api.cjs","names":[],"sources":["../src/api.ts"],"sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Shell Shock\n\n This code was released as part of the Shell Shock project. Shell Shock\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/shell-shock.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/shell-shock\n Documentation: https://docs.stormsoftware.com/projects/shell-shock\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nimport type {\n BuildInlineConfig,\n CleanInlineConfig,\n DocsInlineConfig,\n LintInlineConfig,\n PluginConfig,\n PrepareInlineConfig\n} from \"powerlines\";\nimport { createPowerlines, PowerlinesAPI } from \"powerlines\";\nimport { plugin } from \"./plugin\";\nimport type { UserConfig } from \"./types/config\";\n\n/**\n * The Shell Shock API class.\n *\n * @remarks\n * This class provides methods to interact with the Shell Shock build system, including cleaning, preparing, linting, building, generating documentation, and finalizing projects.\n */\nexport class ShellShockAPI {\n #powerlines: PowerlinesAPI;\n\n public static async from(\n config: UserConfig,\n workspaceRoot?: string\n ): Promise<ShellShockAPI> {\n const userConfig = {\n framework: \"shell-shock\",\n ...config,\n plugins: [plugin(), ...(config.plugins ?? [])] as PluginConfig<any>[]\n };\n\n const powerlines = await (workspaceRoot\n ? PowerlinesAPI.from(workspaceRoot, userConfig)\n : createPowerlines(userConfig));\n\n return new ShellShockAPI(powerlines);\n }\n\n private constructor(powerlines: PowerlinesAPI) {\n this.#powerlines = powerlines;\n }\n\n public async clean(inlineConfig: CleanInlineConfig): Promise<void> {\n return this.#powerlines.clean(inlineConfig);\n }\n\n public async prepare(inlineConfig: PrepareInlineConfig): Promise<void> {\n return this.#powerlines.prepare(inlineConfig);\n }\n\n public async lint(inlineConfig: LintInlineConfig): Promise<void> {\n return this.#powerlines.lint(inlineConfig);\n }\n\n public async build(inlineConfig: BuildInlineConfig): Promise<void> {\n return this.#powerlines.build(inlineConfig);\n }\n\n public async docs(inlineConfig: DocsInlineConfig): Promise<void> {\n return this.#powerlines.docs(inlineConfig);\n }\n\n public async finalize(): Promise<void> {\n return this.#powerlines.finalize();\n }\n}\n\n/**\n * Creates a new {@link ShellShockAPI} instance.\n *\n * @param options - The user configuration options.\n * @returns A promise that resolves to a {@link ShellShockAPI} instance.\n */\nexport async function createShellShock(\n options: Partial<UserConfig> = {}\n): Promise<ShellShockAPI> {\n return ShellShockAPI.from({ root: process.cwd(), ...options });\n}\n"],"mappings":";;;;;;AAAA,MAAM,aAAa;CAAC;CAAK;CAAW;CAA2B;;;;;;;AAS/D,IAAa,gBAAb,MAAa,cAAc;CAC1B;CACA,aAAgB,KAAK,QAAK,eAAa;EAChC,MAAM,aAAa;;GAErB,GAAQ;;GAEL;AAIP,SAAA,IAAiB,qCAFP,yBAAA,KAAA,eAAA,WAAA,oCACO,WAAA,EACA;;CAEjB,YAAA,cAAgB;AAChB,QAAA,aAAY;;CAEZ,MAAM,MAAA,cAAW;AACX,SAAC,MAAA,WAAkB,MAAA,aAAsB;;CAEjD,MAAO,QAAO,cAAkB;;;CAG7B,MAAI,KAAM,cAAe;AAC3B,SAAA,MAAA,WAAA,KAAA,aAAA;;CAEE,MAAK,MAAM,cAAgB;AAC5B,SAAA,MAAA,WAAA,MAAA,aAAA;;CAEC,MAAA,KAAY,cAAa;;;CAGxB,MAAM,WAAE;AACR,SAAA,MAAgB,WAAA,UAAA;;CAEhB,OAAM,SAAU;EAAC;EAAE;EAAA;EAAA;QAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;;;;;;;;AAQvB,eAAQ,iBAA6B,UAAA,EAAA,EAAA;;;;;;AAGrC,iBAAE,SAAA;OAAA;CAAA;CAAA;QAAA,EAAA;OAAA;CAAA;CAAA;CAAA"}
|
package/dist/api.d.cts
CHANGED
|
@@ -10,7 +10,7 @@ import { BuildInlineConfig, CleanInlineConfig, DocsInlineConfig, LintInlineConfi
|
|
|
10
10
|
*/
|
|
11
11
|
declare class ShellShockAPI {
|
|
12
12
|
#private;
|
|
13
|
-
static from(config?:
|
|
13
|
+
static from(config: UserConfig, workspaceRoot?: string): Promise<ShellShockAPI>;
|
|
14
14
|
private constructor();
|
|
15
15
|
clean(inlineConfig: CleanInlineConfig): Promise<void>;
|
|
16
16
|
prepare(inlineConfig: PrepareInlineConfig): Promise<void>;
|
package/dist/api.d.cts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"api.d.cts","names":[],"sources":["../src/api.ts"],"mappings":";;;;;;
|
|
1
|
+
{"version":3,"file":"api.d.cts","names":[],"sources":["../src/api.ts"],"mappings":";;;;;;AAoCA;;;;cAAa,aAAA;EAAA;SAGS,IAAA,CAClB,MAAA,EAAQ,UAAA,EACR,aAAA,YACC,OAAA,CAAQ,aAAA;EAAA,QAcJ,WAAA,CAAA;EAIM,KAAA,CAAM,YAAA,EAAc,iBAAA,GAAoB,OAAA;EAIxC,OAAA,CAAQ,YAAA,EAAc,mBAAA,GAAsB,OAAA;EAI5C,IAAA,CAAK,YAAA,EAAc,gBAAA,GAAmB,OAAA;EAItC,KAAA,CAAM,YAAA,EAAc,iBAAA,GAAoB,OAAA;EAIxC,IAAA,CAAK,YAAA,EAAc,gBAAA,GAAmB,OAAA;EAItC,QAAA,CAAA,GAAY,OAAA;AAAA;;;;;;;iBAWL,gBAAA,CACpB,OAAA,GAAS,OAAA,CAAQ,UAAA,IAChB,OAAA,CAAQ,aAAA"}
|
package/dist/api.d.mts
CHANGED
|
@@ -10,7 +10,7 @@ import { BuildInlineConfig, CleanInlineConfig, DocsInlineConfig, LintInlineConfi
|
|
|
10
10
|
*/
|
|
11
11
|
declare class ShellShockAPI {
|
|
12
12
|
#private;
|
|
13
|
-
static from(config?:
|
|
13
|
+
static from(config: UserConfig, workspaceRoot?: string): Promise<ShellShockAPI>;
|
|
14
14
|
private constructor();
|
|
15
15
|
clean(inlineConfig: CleanInlineConfig): Promise<void>;
|
|
16
16
|
prepare(inlineConfig: PrepareInlineConfig): Promise<void>;
|
package/dist/api.d.mts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"api.d.mts","names":[],"sources":["../src/api.ts"],"mappings":";;;;;;
|
|
1
|
+
{"version":3,"file":"api.d.mts","names":[],"sources":["../src/api.ts"],"mappings":";;;;;;AAoCA;;;;cAAa,aAAA;EAAA;SAGS,IAAA,CAClB,MAAA,EAAQ,UAAA,EACR,aAAA,YACC,OAAA,CAAQ,aAAA;EAAA,QAcJ,WAAA,CAAA;EAIM,KAAA,CAAM,YAAA,EAAc,iBAAA,GAAoB,OAAA;EAIxC,OAAA,CAAQ,YAAA,EAAc,mBAAA,GAAsB,OAAA;EAI5C,IAAA,CAAK,YAAA,EAAc,gBAAA,GAAmB,OAAA;EAItC,KAAA,CAAM,YAAA,EAAc,iBAAA,GAAoB,OAAA;EAIxC,IAAA,CAAK,YAAA,EAAc,gBAAA,GAAmB,OAAA;EAItC,QAAA,CAAA,GAAY,OAAA;AAAA;;;;;;;iBAWL,gBAAA,CACpB,OAAA,GAAS,OAAA,CAAQ,UAAA,IAChB,OAAA,CAAQ,aAAA"}
|
package/dist/api.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import plugin from "./plugin.mjs";
|
|
2
|
-
import { createPowerlines } from "powerlines";
|
|
2
|
+
import { PowerlinesAPI, createPowerlines } from "powerlines";
|
|
3
3
|
|
|
4
4
|
//#region src/api.ts
|
|
5
5
|
const __ΩPartial = [
|
|
@@ -15,12 +15,13 @@ const __ΩPartial = [
|
|
|
15
15
|
*/
|
|
16
16
|
var ShellShockAPI = class ShellShockAPI {
|
|
17
17
|
#powerlines;
|
|
18
|
-
static async from(config
|
|
19
|
-
|
|
18
|
+
static async from(config, workspaceRoot) {
|
|
19
|
+
const userConfig = {
|
|
20
20
|
framework: "shell-shock",
|
|
21
21
|
...config,
|
|
22
22
|
plugins: [plugin(), ...config.plugins ?? []]
|
|
23
|
-
}
|
|
23
|
+
};
|
|
24
|
+
return new ShellShockAPI(await (workspaceRoot ? PowerlinesAPI.from(workspaceRoot, userConfig) : createPowerlines(userConfig)));
|
|
24
25
|
}
|
|
25
26
|
constructor(powerlines) {
|
|
26
27
|
this.#powerlines = powerlines;
|
|
@@ -47,7 +48,7 @@ var ShellShockAPI = class ShellShockAPI {
|
|
|
47
48
|
"#powerlines",
|
|
48
49
|
"UserConfig",
|
|
49
50
|
"config",
|
|
50
|
-
|
|
51
|
+
"workspaceRoot",
|
|
51
52
|
() => ShellShockAPI,
|
|
52
53
|
"from",
|
|
53
54
|
"powerlines",
|
|
@@ -60,7 +61,7 @@ var ShellShockAPI = class ShellShockAPI {
|
|
|
60
61
|
"docs",
|
|
61
62
|
"finalize",
|
|
62
63
|
"ShellShockAPI",
|
|
63
|
-
"!3!P\"w\"2
|
|
64
|
+
"!3!P\"w\"2#&2$8P7%`0&sP!2'\"0(P!2)$`0*P!2)$`0+P!2)$`0,P!2)$`0-P!2)$`0.P$`0/5w0"
|
|
64
65
|
];
|
|
65
66
|
};
|
|
66
67
|
/**
|
|
@@ -70,8 +71,10 @@ var ShellShockAPI = class ShellShockAPI {
|
|
|
70
71
|
* @returns A promise that resolves to a {@link ShellShockAPI} instance.
|
|
71
72
|
*/
|
|
72
73
|
async function createShellShock(options = {}) {
|
|
73
|
-
|
|
74
|
-
|
|
74
|
+
return ShellShockAPI.from({
|
|
75
|
+
root: process.cwd(),
|
|
76
|
+
...options
|
|
77
|
+
});
|
|
75
78
|
}
|
|
76
79
|
createShellShock.__type = [
|
|
77
80
|
() => __ΩPartial,
|
package/dist/api.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"api.mjs","names":[],"sources":["../src/api.ts"],"sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Shell Shock\n\n This code was released as part of the Shell Shock project. Shell Shock\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/shell-shock.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/shell-shock\n Documentation: https://docs.stormsoftware.com/projects/shell-shock\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nimport type {\n BuildInlineConfig,\n CleanInlineConfig,\n DocsInlineConfig,\n LintInlineConfig,\n PluginConfig,\n
|
|
1
|
+
{"version":3,"file":"api.mjs","names":[],"sources":["../src/api.ts"],"sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Shell Shock\n\n This code was released as part of the Shell Shock project. Shell Shock\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/shell-shock.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/shell-shock\n Documentation: https://docs.stormsoftware.com/projects/shell-shock\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nimport type {\n BuildInlineConfig,\n CleanInlineConfig,\n DocsInlineConfig,\n LintInlineConfig,\n PluginConfig,\n PrepareInlineConfig\n} from \"powerlines\";\nimport { createPowerlines, PowerlinesAPI } from \"powerlines\";\nimport { plugin } from \"./plugin\";\nimport type { UserConfig } from \"./types/config\";\n\n/**\n * The Shell Shock API class.\n *\n * @remarks\n * This class provides methods to interact with the Shell Shock build system, including cleaning, preparing, linting, building, generating documentation, and finalizing projects.\n */\nexport class ShellShockAPI {\n #powerlines: PowerlinesAPI;\n\n public static async from(\n config: UserConfig,\n workspaceRoot?: string\n ): Promise<ShellShockAPI> {\n const userConfig = {\n framework: \"shell-shock\",\n ...config,\n plugins: [plugin(), ...(config.plugins ?? [])] as PluginConfig<any>[]\n };\n\n const powerlines = await (workspaceRoot\n ? PowerlinesAPI.from(workspaceRoot, userConfig)\n : createPowerlines(userConfig));\n\n return new ShellShockAPI(powerlines);\n }\n\n private constructor(powerlines: PowerlinesAPI) {\n this.#powerlines = powerlines;\n }\n\n public async clean(inlineConfig: CleanInlineConfig): Promise<void> {\n return this.#powerlines.clean(inlineConfig);\n }\n\n public async prepare(inlineConfig: PrepareInlineConfig): Promise<void> {\n return this.#powerlines.prepare(inlineConfig);\n }\n\n public async lint(inlineConfig: LintInlineConfig): Promise<void> {\n return this.#powerlines.lint(inlineConfig);\n }\n\n public async build(inlineConfig: BuildInlineConfig): Promise<void> {\n return this.#powerlines.build(inlineConfig);\n }\n\n public async docs(inlineConfig: DocsInlineConfig): Promise<void> {\n return this.#powerlines.docs(inlineConfig);\n }\n\n public async finalize(): Promise<void> {\n return this.#powerlines.finalize();\n }\n}\n\n/**\n * Creates a new {@link ShellShockAPI} instance.\n *\n * @param options - The user configuration options.\n * @returns A promise that resolves to a {@link ShellShockAPI} instance.\n */\nexport async function createShellShock(\n options: Partial<UserConfig> = {}\n): Promise<ShellShockAPI> {\n return ShellShockAPI.from({ root: process.cwd(), ...options });\n}\n"],"mappings":";;;;AAAA,MAAM,aAAa;CAAC;CAAK;CAAW;CAA2B;;;;;;;AAS/D,IAAa,gBAAb,MAAa,cAAc;CAC1B;CACA,aAAgB,KAAK,QAAK,eAAa;EAChC,MAAM,aAAa;;GAErB,GAAQ;;GAEL;AAIP,SAAA,IAAiB,qCAFP,cAAA,KAAA,eAAA,WAAA,GACV,iBAAiB,WAAA,EACA;;CAEjB,YAAA,YAAgB;AAChB,QAAA,aAAY;;CAEZ,MAAM,MAAA,cAAW;AACX,SAAC,MAAA,WAAkB,MAAA,aAAsB;;CAEjD,MAAO,QAAO,cAAkB;;;CAG7B,MAAI,KAAM,cAAe;AAC3B,SAAA,MAAA,WAAA,KAAA,aAAA;;CAEE,MAAK,MAAM,cAAgB;AAC5B,SAAA,MAAA,WAAA,MAAA,aAAA;;CAEC,MAAA,KAAY,cAAa;;;CAGxB,MAAM,WAAE;AACR,SAAA,MAAgB,WAAA,UAAA;;CAEhB,OAAM,SAAU;EAAC;EAAE;EAAA;EAAA;QAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;;;;;;;;AAQvB,eAAQ,iBAA6B,UAAA,EAAA,EAAA;;;;;;AAGrC,iBAAE,SAAA;OAAA;CAAA;CAAA;QAAA,EAAA;OAAA;CAAA;CAAA;CAAA"}
|
|
@@ -59,7 +59,7 @@ function IsNotVerbose() {
|
|
|
59
59
|
*/
|
|
60
60
|
function CommandParameterType(props) {
|
|
61
61
|
const { parameter } = props;
|
|
62
|
-
return _alloy_js_core.code`${(parameter.kind === require_types_command.CommandParameterKinds.string || parameter.kind === require_types_command.CommandParameterKinds.number) && parameter.choices && parameter.choices.length > 0 ? parameter.choices.map((choice) => typeof choice === "string" ? `"${choice}"` : choice).join(" | ") : parameter.kind === require_types_command.CommandParameterKinds.boolean ? "boolean" : parameter.kind === require_types_command.CommandParameterKinds.number ? "number" : "string"}${
|
|
62
|
+
return _alloy_js_core.code`${(parameter.kind === require_types_command.CommandParameterKinds.string || parameter.kind === require_types_command.CommandParameterKinds.number) && parameter.choices && parameter.choices.length > 0 ? parameter.choices.map((choice) => typeof choice === "string" ? `"${choice}"` : choice).join(" | ") : parameter.kind === require_types_command.CommandParameterKinds.boolean ? "boolean" : parameter.kind === require_types_command.CommandParameterKinds.number ? "number" : "string"}${parameter.variadic ? "[]" : ""}${parameter.optional ? " | undefined" : ""}`;
|
|
63
63
|
}
|
|
64
64
|
|
|
65
65
|
//#endregion
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"helpers.cjs","names":[],"sources":["../../src/components/helpers.tsx"],"sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Shell Shock\n\n This code was released as part of the Shell Shock project. Shell Shock\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/shell-shock.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/shell-shock\n Documentation: https://docs.stormsoftware.com/projects/shell-shock\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nimport { code } from \"@alloy-js/core\";\nimport type { CommandParameter } from \"../types\";\nimport { CommandParameterKinds } from \"../types\";\n\nexport interface BooleanInputParserLogicProps {\n name: string;\n}\n\n/**\n * Parses a string input into a boolean value, interpreting common truthy and falsy string representations.\n */\nexport function BooleanInputParserLogic(props: BooleanInputParserLogicProps) {\n const { name } = props;\n\n return (\n <>{code` !!${name} && ${name}.toLowerCase() !== \"false\" && ${\n name\n }.toLowerCase() !== \"f\" && ${name}.toLowerCase() !== \"no\" && ${\n name\n } !== \"n\" && ${name}.toLowerCase() !== \"0\" && ${\n name\n }.toLowerCase() !== \"off\" && ${\n name\n } !== \"disable\" && ${name}.toLowerCase() !== \"disabled\" && ${\n name\n }.toLowerCase() !== \"never\" && (Number.isNaN(Number.parseFloat(${\n name\n })) || Number.parseFloat(${name}) > 0) `}</>\n );\n}\n\n/**\n * Write the logic to determine if the application is running in debug mode.\n *\n * @remarks\n * This is used to conditionally include debug-only logic in the generated application, such as additional logging or development tools. The logic should check for common indicators of debug mode, such as environment variables or the presence of a debugger.\n */\nexport function IsDebug() {\n return code`isDevelopment || isDebug || env.LOG_LEVEL === \"debug\"`;\n}\n\n/**\n * Write the logic to determine if the application is **not** running in debug mode.\n */\nexport function IsNotDebug() {\n return (\n <>\n {code`!(`}\n <IsDebug />\n {code`)`}\n </>\n );\n}\n\n/**\n * Write the logic to determine if the application is running in verbose mode.\n *\n * @remarks\n * This is used to conditionally include verbose-only logic in the generated application, such as additional logging or detailed output. The logic should check for common indicators of verbose mode, such as environment variables or command-line flags.\n */\nexport function IsVerbose() {\n return (\n <>\n {code`( `}\n <IsDebug />\n {code`|| hasFlag([\"verbose\", \"verbose=true\", \"verbose=always\"]))`}\n </>\n );\n}\n\n/**\n * Write the logic to determine if the application is **not** running in verbose mode.\n */\nexport function IsNotVerbose() {\n return (\n <>\n {code`!(`}\n <IsVerbose />\n {code`)`}\n </>\n );\n}\n\n/**\n * Write the type declaration for a command parameter based on its configuration.\n */\nexport function CommandParameterType(props: { parameter: CommandParameter }) {\n const { parameter } = props;\n\n return code`${\n (parameter.kind === CommandParameterKinds.string ||\n parameter.kind === CommandParameterKinds.number) &&\n parameter.choices &&\n parameter.choices.length > 0\n ? parameter.choices\n .map(choice => (typeof choice === \"string\" ? `\"${choice}\"` : choice))\n .join(\" | \")\n : parameter.kind === CommandParameterKinds.boolean\n ? \"boolean\"\n : parameter.kind === CommandParameterKinds.number\n ? \"number\"\n : \"string\"\n }${\n
|
|
1
|
+
{"version":3,"file":"helpers.cjs","names":[],"sources":["../../src/components/helpers.tsx"],"sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Shell Shock\n\n This code was released as part of the Shell Shock project. Shell Shock\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/shell-shock.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/shell-shock\n Documentation: https://docs.stormsoftware.com/projects/shell-shock\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nimport { code } from \"@alloy-js/core\";\nimport type { CommandParameter } from \"../types\";\nimport { CommandParameterKinds } from \"../types\";\n\nexport interface BooleanInputParserLogicProps {\n name: string;\n}\n\n/**\n * Parses a string input into a boolean value, interpreting common truthy and falsy string representations.\n */\nexport function BooleanInputParserLogic(props: BooleanInputParserLogicProps) {\n const { name } = props;\n\n return (\n <>{code` !!${name} && ${name}.toLowerCase() !== \"false\" && ${\n name\n }.toLowerCase() !== \"f\" && ${name}.toLowerCase() !== \"no\" && ${\n name\n } !== \"n\" && ${name}.toLowerCase() !== \"0\" && ${\n name\n }.toLowerCase() !== \"off\" && ${\n name\n } !== \"disable\" && ${name}.toLowerCase() !== \"disabled\" && ${\n name\n }.toLowerCase() !== \"never\" && (Number.isNaN(Number.parseFloat(${\n name\n })) || Number.parseFloat(${name}) > 0) `}</>\n );\n}\n\n/**\n * Write the logic to determine if the application is running in debug mode.\n *\n * @remarks\n * This is used to conditionally include debug-only logic in the generated application, such as additional logging or development tools. The logic should check for common indicators of debug mode, such as environment variables or the presence of a debugger.\n */\nexport function IsDebug() {\n return code`isDevelopment || isDebug || env.LOG_LEVEL === \"debug\"`;\n}\n\n/**\n * Write the logic to determine if the application is **not** running in debug mode.\n */\nexport function IsNotDebug() {\n return (\n <>\n {code`!(`}\n <IsDebug />\n {code`)`}\n </>\n );\n}\n\n/**\n * Write the logic to determine if the application is running in verbose mode.\n *\n * @remarks\n * This is used to conditionally include verbose-only logic in the generated application, such as additional logging or detailed output. The logic should check for common indicators of verbose mode, such as environment variables or command-line flags.\n */\nexport function IsVerbose() {\n return (\n <>\n {code`( `}\n <IsDebug />\n {code`|| hasFlag([\"verbose\", \"verbose=true\", \"verbose=always\"]))`}\n </>\n );\n}\n\n/**\n * Write the logic to determine if the application is **not** running in verbose mode.\n */\nexport function IsNotVerbose() {\n return (\n <>\n {code`!(`}\n <IsVerbose />\n {code`)`}\n </>\n );\n}\n\n/**\n * Write the type declaration for a command parameter based on its configuration.\n */\nexport function CommandParameterType(props: { parameter: CommandParameter }) {\n const { parameter } = props;\n\n return code`${\n (parameter.kind === CommandParameterKinds.string ||\n parameter.kind === CommandParameterKinds.number) &&\n parameter.choices &&\n parameter.choices.length > 0\n ? parameter.choices\n .map(choice => (typeof choice === \"string\" ? `\"${choice}\"` : choice))\n .join(\" | \")\n : parameter.kind === CommandParameterKinds.boolean\n ? \"boolean\"\n : parameter.kind === CommandParameterKinds.number\n ? \"number\"\n : \"string\"\n }${\n parameter.variadic ? \"[]\" : \"\"\n }${parameter.optional ? \" | undefined\" : \"\"}`;\n}\n"],"mappings":";;;;;;;;;;AA6BA,SAAgB,wBAAwB,OAAqC;CAC3E,MAAM,WAEN;AACA,QAAK,CAAA,mBAAO,MAAG,KAAQ,MAAG,KAAM,gCAA8B,KAAA,4BAAA,KAAA,6BAAA,KAAA,cAAA,KAAA,4BAAA,KAAA,8BAAA,KAAA,oBAAA,KAAA,mCAAA,KAAA,gEAAA,KAAA,0BAAA,KAAA,SAAA;;;;;;;;AAShE,SAAM,UAAA;AACJ,QAAI,mBAAA;;;;;AAMN,SAAE,aAAA;AACA,QAAO;EAAA,mBAAI;kDAAyB,SAAC,EAAA,CAAW;EAAC,mBAAG;EAAA;;;;;;;;AAStD,SAAE,YAAA;AACA,QAAO;EAAA,mBAAI;kDAAyB,SAAC,EAAA,CAAW;EAAC,mBAAK;EAA2B;;;;;AAMnF,SAAgB,eAAA;AACd,QAAK;EAAA,mBAAO;kDAAA,WAAA,EAAA,CAAA;EAAA,mBAAA;EAAA;;;;;AAMd,SAAa,qBAAsB,OAEhC;CACD,MAAM,EACN,cACI;AACJ,QAAO,mBAAA,IAAA,UAAA,SAAA,4CAAA,UAAA,UAAA,SAAA,4CAAA,WAAA,UAAA,WAAA,UAAA,QAAA,SAAA,IAAA,UAAA,QAAA,KAAA,WAAA,OAAA,WAAA,WAAA,IAAA,OAAA,KAAA,OAAA,CAAA,KAAA,MAAA,GAAA,UAAA,SAAA,4CAAA,UAAA,YAAA,UAAA,SAAA,4CAAA,SAAA,WAAA,WAAA,UAAA,WAAA,OAAA,KAAA,UAAA,WAAA,iBAAA"}
|
|
@@ -57,7 +57,7 @@ function IsNotVerbose() {
|
|
|
57
57
|
*/
|
|
58
58
|
function CommandParameterType(props) {
|
|
59
59
|
const { parameter } = props;
|
|
60
|
-
return code`${(parameter.kind === CommandParameterKinds.string || parameter.kind === CommandParameterKinds.number) && parameter.choices && parameter.choices.length > 0 ? parameter.choices.map((choice) => typeof choice === "string" ? `"${choice}"` : choice).join(" | ") : parameter.kind === CommandParameterKinds.boolean ? "boolean" : parameter.kind === CommandParameterKinds.number ? "number" : "string"}${
|
|
60
|
+
return code`${(parameter.kind === CommandParameterKinds.string || parameter.kind === CommandParameterKinds.number) && parameter.choices && parameter.choices.length > 0 ? parameter.choices.map((choice) => typeof choice === "string" ? `"${choice}"` : choice).join(" | ") : parameter.kind === CommandParameterKinds.boolean ? "boolean" : parameter.kind === CommandParameterKinds.number ? "number" : "string"}${parameter.variadic ? "[]" : ""}${parameter.optional ? " | undefined" : ""}`;
|
|
61
61
|
}
|
|
62
62
|
|
|
63
63
|
//#endregion
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"helpers.mjs","names":[],"sources":["../../src/components/helpers.tsx"],"sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Shell Shock\n\n This code was released as part of the Shell Shock project. Shell Shock\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/shell-shock.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/shell-shock\n Documentation: https://docs.stormsoftware.com/projects/shell-shock\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nimport { code } from \"@alloy-js/core\";\nimport type { CommandParameter } from \"../types\";\nimport { CommandParameterKinds } from \"../types\";\n\nexport interface BooleanInputParserLogicProps {\n name: string;\n}\n\n/**\n * Parses a string input into a boolean value, interpreting common truthy and falsy string representations.\n */\nexport function BooleanInputParserLogic(props: BooleanInputParserLogicProps) {\n const { name } = props;\n\n return (\n <>{code` !!${name} && ${name}.toLowerCase() !== \"false\" && ${\n name\n }.toLowerCase() !== \"f\" && ${name}.toLowerCase() !== \"no\" && ${\n name\n } !== \"n\" && ${name}.toLowerCase() !== \"0\" && ${\n name\n }.toLowerCase() !== \"off\" && ${\n name\n } !== \"disable\" && ${name}.toLowerCase() !== \"disabled\" && ${\n name\n }.toLowerCase() !== \"never\" && (Number.isNaN(Number.parseFloat(${\n name\n })) || Number.parseFloat(${name}) > 0) `}</>\n );\n}\n\n/**\n * Write the logic to determine if the application is running in debug mode.\n *\n * @remarks\n * This is used to conditionally include debug-only logic in the generated application, such as additional logging or development tools. The logic should check for common indicators of debug mode, such as environment variables or the presence of a debugger.\n */\nexport function IsDebug() {\n return code`isDevelopment || isDebug || env.LOG_LEVEL === \"debug\"`;\n}\n\n/**\n * Write the logic to determine if the application is **not** running in debug mode.\n */\nexport function IsNotDebug() {\n return (\n <>\n {code`!(`}\n <IsDebug />\n {code`)`}\n </>\n );\n}\n\n/**\n * Write the logic to determine if the application is running in verbose mode.\n *\n * @remarks\n * This is used to conditionally include verbose-only logic in the generated application, such as additional logging or detailed output. The logic should check for common indicators of verbose mode, such as environment variables or command-line flags.\n */\nexport function IsVerbose() {\n return (\n <>\n {code`( `}\n <IsDebug />\n {code`|| hasFlag([\"verbose\", \"verbose=true\", \"verbose=always\"]))`}\n </>\n );\n}\n\n/**\n * Write the logic to determine if the application is **not** running in verbose mode.\n */\nexport function IsNotVerbose() {\n return (\n <>\n {code`!(`}\n <IsVerbose />\n {code`)`}\n </>\n );\n}\n\n/**\n * Write the type declaration for a command parameter based on its configuration.\n */\nexport function CommandParameterType(props: { parameter: CommandParameter }) {\n const { parameter } = props;\n\n return code`${\n (parameter.kind === CommandParameterKinds.string ||\n parameter.kind === CommandParameterKinds.number) &&\n parameter.choices &&\n parameter.choices.length > 0\n ? parameter.choices\n .map(choice => (typeof choice === \"string\" ? `\"${choice}\"` : choice))\n .join(\" | \")\n : parameter.kind === CommandParameterKinds.boolean\n ? \"boolean\"\n : parameter.kind === CommandParameterKinds.number\n ? \"number\"\n : \"string\"\n }${\n
|
|
1
|
+
{"version":3,"file":"helpers.mjs","names":[],"sources":["../../src/components/helpers.tsx"],"sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Shell Shock\n\n This code was released as part of the Shell Shock project. Shell Shock\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/shell-shock.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/shell-shock\n Documentation: https://docs.stormsoftware.com/projects/shell-shock\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nimport { code } from \"@alloy-js/core\";\nimport type { CommandParameter } from \"../types\";\nimport { CommandParameterKinds } from \"../types\";\n\nexport interface BooleanInputParserLogicProps {\n name: string;\n}\n\n/**\n * Parses a string input into a boolean value, interpreting common truthy and falsy string representations.\n */\nexport function BooleanInputParserLogic(props: BooleanInputParserLogicProps) {\n const { name } = props;\n\n return (\n <>{code` !!${name} && ${name}.toLowerCase() !== \"false\" && ${\n name\n }.toLowerCase() !== \"f\" && ${name}.toLowerCase() !== \"no\" && ${\n name\n } !== \"n\" && ${name}.toLowerCase() !== \"0\" && ${\n name\n }.toLowerCase() !== \"off\" && ${\n name\n } !== \"disable\" && ${name}.toLowerCase() !== \"disabled\" && ${\n name\n }.toLowerCase() !== \"never\" && (Number.isNaN(Number.parseFloat(${\n name\n })) || Number.parseFloat(${name}) > 0) `}</>\n );\n}\n\n/**\n * Write the logic to determine if the application is running in debug mode.\n *\n * @remarks\n * This is used to conditionally include debug-only logic in the generated application, such as additional logging or development tools. The logic should check for common indicators of debug mode, such as environment variables or the presence of a debugger.\n */\nexport function IsDebug() {\n return code`isDevelopment || isDebug || env.LOG_LEVEL === \"debug\"`;\n}\n\n/**\n * Write the logic to determine if the application is **not** running in debug mode.\n */\nexport function IsNotDebug() {\n return (\n <>\n {code`!(`}\n <IsDebug />\n {code`)`}\n </>\n );\n}\n\n/**\n * Write the logic to determine if the application is running in verbose mode.\n *\n * @remarks\n * This is used to conditionally include verbose-only logic in the generated application, such as additional logging or detailed output. The logic should check for common indicators of verbose mode, such as environment variables or command-line flags.\n */\nexport function IsVerbose() {\n return (\n <>\n {code`( `}\n <IsDebug />\n {code`|| hasFlag([\"verbose\", \"verbose=true\", \"verbose=always\"]))`}\n </>\n );\n}\n\n/**\n * Write the logic to determine if the application is **not** running in verbose mode.\n */\nexport function IsNotVerbose() {\n return (\n <>\n {code`!(`}\n <IsVerbose />\n {code`)`}\n </>\n );\n}\n\n/**\n * Write the type declaration for a command parameter based on its configuration.\n */\nexport function CommandParameterType(props: { parameter: CommandParameter }) {\n const { parameter } = props;\n\n return code`${\n (parameter.kind === CommandParameterKinds.string ||\n parameter.kind === CommandParameterKinds.number) &&\n parameter.choices &&\n parameter.choices.length > 0\n ? parameter.choices\n .map(choice => (typeof choice === \"string\" ? `\"${choice}\"` : choice))\n .join(\" | \")\n : parameter.kind === CommandParameterKinds.boolean\n ? \"boolean\"\n : parameter.kind === CommandParameterKinds.number\n ? \"number\"\n : \"string\"\n }${\n parameter.variadic ? \"[]\" : \"\"\n }${parameter.optional ? \" | undefined\" : \"\"}`;\n}\n"],"mappings":";;;;;;;;AA6BA,SAAgB,wBAAwB,OAAqC;CAC3E,MAAM,WAEN;AACA,QAAK,CAAA,IAAO,MAAG,KAAQ,MAAG,KAAM,gCAA8B,KAAA,4BAAA,KAAA,6BAAA,KAAA,cAAA,KAAA,4BAAA,KAAA,8BAAA,KAAA,oBAAA,KAAA,mCAAA,KAAA,gEAAA,KAAA,0BAAA,KAAA,SAAA;;;;;;;;AAShE,SAAM,UAAA;AACJ,QAAI,IAAA;;;;;AAMN,SAAE,aAAA;AACA,QAAO;EAAA,IAAI;EAAM,gBAAmB,SAAC,EAAA,CAAW;EAAC,IAAG;EAAA;;;;;;;;AAStD,SAAE,YAAA;AACA,QAAO;EAAA,IAAI;EAAM,gBAAmB,SAAC,EAAA,CAAW;EAAC,IAAK;EAA2B;;;;;AAMnF,SAAgB,eAAA;AACd,QAAK;EAAA,IAAO;EAAA,gBAAA,WAAA,EAAA,CAAA;EAAA,IAAA;EAAA;;;;;AAMd,SAAa,qBAAsB,OAEhC;CACD,MAAM,EACN,cACI;AACJ,QAAO,IAAA,IAAA,UAAA,SAAA,sBAAA,UAAA,UAAA,SAAA,sBAAA,WAAA,UAAA,WAAA,UAAA,QAAA,SAAA,IAAA,UAAA,QAAA,KAAA,WAAA,OAAA,WAAA,WAAA,IAAA,OAAA,KAAA,OAAA,CAAA,KAAA,MAAA,GAAA,UAAA,SAAA,sBAAA,UAAA,YAAA,UAAA,SAAA,sBAAA,SAAA,WAAA,WAAA,UAAA,WAAA,OAAA,KAAA,UAAA,WAAA,iBAAA"}
|
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2
2
|
const require_components_usage = require('./usage.cjs');
|
|
3
3
|
const require_components_docs = require('./docs.cjs');
|
|
4
|
-
const
|
|
4
|
+
const require_components_spawn_builtin = require('./spawn-builtin.cjs');
|
|
5
5
|
const require_components_helpers = require('./helpers.cjs');
|
|
6
6
|
const require_components_options_parser_logic = require('./options-parser-logic.cjs');
|
|
7
|
+
const require_components_state_builtin = require('./state-builtin.cjs');
|
|
8
|
+
const require_components_utils_builtin = require('./utils-builtin.cjs');
|
|
7
9
|
const require_components_command_validation_logic = require('./command-validation-logic.cjs');
|
|
8
10
|
|
|
9
|
-
exports.ArgsUtilities =
|
|
11
|
+
exports.ArgsUtilities = require_components_state_builtin.ArgsUtilities;
|
|
10
12
|
exports.ArgumentsParserLogic = require_components_options_parser_logic.ArgumentsParserLogic;
|
|
11
13
|
exports.BooleanInputParserLogic = require_components_helpers.BooleanInputParserLogic;
|
|
12
14
|
exports.ColorSupportUtilities = require_components_utils_builtin.ColorSupportUtilities;
|
|
@@ -17,10 +19,11 @@ exports.CommandOptionsDocs = require_components_docs.CommandOptionsDocs;
|
|
|
17
19
|
exports.CommandParameterType = require_components_helpers.CommandParameterType;
|
|
18
20
|
exports.CommandParserLogic = require_components_options_parser_logic.CommandParserLogic;
|
|
19
21
|
exports.CommandValidationLogic = require_components_command_validation_logic.CommandValidationLogic;
|
|
20
|
-
exports.ContextUtilities =
|
|
22
|
+
exports.ContextUtilities = require_components_state_builtin.ContextUtilities;
|
|
21
23
|
exports.DynamicSegmentsParserLogic = require_components_options_parser_logic.DynamicSegmentsParserLogic;
|
|
22
24
|
exports.EnvSupportUtilities = require_components_utils_builtin.EnvSupportUtilities;
|
|
23
25
|
exports.FindSuggestionsDeclaration = require_components_utils_builtin.FindSuggestionsDeclaration;
|
|
26
|
+
exports.GlobalTypeDefinitions = require_components_state_builtin.GlobalTypeDefinitions;
|
|
24
27
|
exports.HyperlinkSupportUtilities = require_components_utils_builtin.HyperlinkSupportUtilities;
|
|
25
28
|
exports.IsDebug = require_components_helpers.IsDebug;
|
|
26
29
|
exports.IsNotDebug = require_components_helpers.IsNotDebug;
|
|
@@ -32,6 +35,7 @@ exports.OptionsMemberParserCondition = require_components_options_parser_logic.O
|
|
|
32
35
|
exports.OptionsMemberParserLogic = require_components_options_parser_logic.OptionsMemberParserLogic;
|
|
33
36
|
exports.OptionsParserLogic = require_components_options_parser_logic.OptionsParserLogic;
|
|
34
37
|
exports.ResolveModuleFunctionDeclaration = require_components_utils_builtin.ResolveModuleFunctionDeclaration;
|
|
35
|
-
exports.
|
|
38
|
+
exports.SpawnBuiltin = require_components_spawn_builtin.SpawnBuiltin;
|
|
39
|
+
exports.StateBuiltin = require_components_state_builtin.StateBuiltin;
|
|
36
40
|
exports.Usage = require_components_usage.Usage;
|
|
37
41
|
exports.UtilsBuiltin = require_components_utils_builtin.UtilsBuiltin;
|
|
@@ -2,6 +2,8 @@ import { CommandValidationLogic, CommandValidationLogicProps } from "./command-v
|
|
|
2
2
|
import { CommandDocs, CommandDocsFile, CommandDocsFileProps, CommandDocsProps, CommandDocsUsageExample, CommandDocsUsageExampleProps, CommandOptionsDocs, CommandOptionsDocsProps } from "./docs.cjs";
|
|
3
3
|
import { BooleanInputParserLogic, BooleanInputParserLogicProps, CommandParameterType, IsDebug, IsNotDebug, IsNotVerbose, IsVerbose } from "./helpers.cjs";
|
|
4
4
|
import { ArgumentsParserLogic, ArgumentsParserLogicProps, CommandParserLogic, CommandParserLogicProps, DynamicSegmentsParserLogic, DynamicSegmentsParserLogicProps, OptionsInterfaceDeclaration, OptionsMember, OptionsMemberParserCondition, OptionsMemberParserConditionProps, OptionsMemberParserLogic, OptionsMemberParserLogicProps, OptionsParserLogic, OptionsParserLogicProps } from "./options-parser-logic.cjs";
|
|
5
|
+
import { SpawnBuiltin, SpawnBuiltinProps } from "./spawn-builtin.cjs";
|
|
6
|
+
import { ArgsUtilities, ContextUtilities, GlobalTypeDefinitions, StateBuiltin, StateBuiltinProps } from "./state-builtin.cjs";
|
|
5
7
|
import { Usage, UsageProps } from "./usage.cjs";
|
|
6
|
-
import {
|
|
7
|
-
export { ArgsUtilities, ArgumentsParserLogic, ArgumentsParserLogicProps, BooleanInputParserLogic, BooleanInputParserLogicProps, ColorSupportUtilities, CommandDocs, CommandDocsFile, CommandDocsFileProps, CommandDocsProps, CommandDocsUsageExample, CommandDocsUsageExampleProps, CommandOptionsDocs, CommandOptionsDocsProps, CommandParameterType, CommandParserLogic, CommandParserLogicProps, CommandValidationLogic, CommandValidationLogicProps, ContextUtilities, DynamicSegmentsParserLogic, DynamicSegmentsParserLogicProps, EnvSupportUtilities, FindSuggestionsDeclaration, HyperlinkSupportUtilities, IsDebug, IsNotDebug, IsNotVerbose, IsVerbose, OptionsInterfaceDeclaration, OptionsMember, OptionsMemberParserCondition, OptionsMemberParserConditionProps, OptionsMemberParserLogic, OptionsMemberParserLogicProps, OptionsParserLogic, OptionsParserLogicProps, ResolveModuleFunctionDeclaration,
|
|
8
|
+
import { ColorSupportUtilities, EnvSupportUtilities, FindSuggestionsDeclaration, HyperlinkSupportUtilities, ResolveModuleFunctionDeclaration, UtilsBuiltin, UtilsBuiltinProps } from "./utils-builtin.cjs";
|
|
9
|
+
export { ArgsUtilities, ArgumentsParserLogic, ArgumentsParserLogicProps, BooleanInputParserLogic, BooleanInputParserLogicProps, ColorSupportUtilities, CommandDocs, CommandDocsFile, CommandDocsFileProps, CommandDocsProps, CommandDocsUsageExample, CommandDocsUsageExampleProps, CommandOptionsDocs, CommandOptionsDocsProps, CommandParameterType, CommandParserLogic, CommandParserLogicProps, CommandValidationLogic, CommandValidationLogicProps, ContextUtilities, DynamicSegmentsParserLogic, DynamicSegmentsParserLogicProps, EnvSupportUtilities, FindSuggestionsDeclaration, GlobalTypeDefinitions, HyperlinkSupportUtilities, IsDebug, IsNotDebug, IsNotVerbose, IsVerbose, OptionsInterfaceDeclaration, OptionsMember, OptionsMemberParserCondition, OptionsMemberParserConditionProps, OptionsMemberParserLogic, OptionsMemberParserLogicProps, OptionsParserLogic, OptionsParserLogicProps, ResolveModuleFunctionDeclaration, SpawnBuiltin, SpawnBuiltinProps, StateBuiltin, StateBuiltinProps, Usage, UsageProps, UtilsBuiltin, UtilsBuiltinProps };
|
|
@@ -2,6 +2,8 @@ import { CommandValidationLogic, CommandValidationLogicProps } from "./command-v
|
|
|
2
2
|
import { CommandDocs, CommandDocsFile, CommandDocsFileProps, CommandDocsProps, CommandDocsUsageExample, CommandDocsUsageExampleProps, CommandOptionsDocs, CommandOptionsDocsProps } from "./docs.mjs";
|
|
3
3
|
import { BooleanInputParserLogic, BooleanInputParserLogicProps, CommandParameterType, IsDebug, IsNotDebug, IsNotVerbose, IsVerbose } from "./helpers.mjs";
|
|
4
4
|
import { ArgumentsParserLogic, ArgumentsParserLogicProps, CommandParserLogic, CommandParserLogicProps, DynamicSegmentsParserLogic, DynamicSegmentsParserLogicProps, OptionsInterfaceDeclaration, OptionsMember, OptionsMemberParserCondition, OptionsMemberParserConditionProps, OptionsMemberParserLogic, OptionsMemberParserLogicProps, OptionsParserLogic, OptionsParserLogicProps } from "./options-parser-logic.mjs";
|
|
5
|
+
import { SpawnBuiltin, SpawnBuiltinProps } from "./spawn-builtin.mjs";
|
|
6
|
+
import { ArgsUtilities, ContextUtilities, GlobalTypeDefinitions, StateBuiltin, StateBuiltinProps } from "./state-builtin.mjs";
|
|
5
7
|
import { Usage, UsageProps } from "./usage.mjs";
|
|
6
|
-
import {
|
|
7
|
-
export { ArgsUtilities, ArgumentsParserLogic, ArgumentsParserLogicProps, BooleanInputParserLogic, BooleanInputParserLogicProps, ColorSupportUtilities, CommandDocs, CommandDocsFile, CommandDocsFileProps, CommandDocsProps, CommandDocsUsageExample, CommandDocsUsageExampleProps, CommandOptionsDocs, CommandOptionsDocsProps, CommandParameterType, CommandParserLogic, CommandParserLogicProps, CommandValidationLogic, CommandValidationLogicProps, ContextUtilities, DynamicSegmentsParserLogic, DynamicSegmentsParserLogicProps, EnvSupportUtilities, FindSuggestionsDeclaration, HyperlinkSupportUtilities, IsDebug, IsNotDebug, IsNotVerbose, IsVerbose, OptionsInterfaceDeclaration, OptionsMember, OptionsMemberParserCondition, OptionsMemberParserConditionProps, OptionsMemberParserLogic, OptionsMemberParserLogicProps, OptionsParserLogic, OptionsParserLogicProps, ResolveModuleFunctionDeclaration,
|
|
8
|
+
import { ColorSupportUtilities, EnvSupportUtilities, FindSuggestionsDeclaration, HyperlinkSupportUtilities, ResolveModuleFunctionDeclaration, UtilsBuiltin, UtilsBuiltinProps } from "./utils-builtin.mjs";
|
|
9
|
+
export { ArgsUtilities, ArgumentsParserLogic, ArgumentsParserLogicProps, BooleanInputParserLogic, BooleanInputParserLogicProps, ColorSupportUtilities, CommandDocs, CommandDocsFile, CommandDocsFileProps, CommandDocsProps, CommandDocsUsageExample, CommandDocsUsageExampleProps, CommandOptionsDocs, CommandOptionsDocsProps, CommandParameterType, CommandParserLogic, CommandParserLogicProps, CommandValidationLogic, CommandValidationLogicProps, ContextUtilities, DynamicSegmentsParserLogic, DynamicSegmentsParserLogicProps, EnvSupportUtilities, FindSuggestionsDeclaration, GlobalTypeDefinitions, HyperlinkSupportUtilities, IsDebug, IsNotDebug, IsNotVerbose, IsVerbose, OptionsInterfaceDeclaration, OptionsMember, OptionsMemberParserCondition, OptionsMemberParserConditionProps, OptionsMemberParserLogic, OptionsMemberParserLogicProps, OptionsParserLogic, OptionsParserLogicProps, ResolveModuleFunctionDeclaration, SpawnBuiltin, SpawnBuiltinProps, StateBuiltin, StateBuiltinProps, Usage, UsageProps, UtilsBuiltin, UtilsBuiltinProps };
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
import { Usage } from "./usage.mjs";
|
|
2
2
|
import { CommandDocs, CommandDocsFile, CommandDocsUsageExample, CommandOptionsDocs } from "./docs.mjs";
|
|
3
|
-
import {
|
|
3
|
+
import { SpawnBuiltin } from "./spawn-builtin.mjs";
|
|
4
4
|
import { BooleanInputParserLogic, CommandParameterType, IsDebug, IsNotDebug, IsNotVerbose, IsVerbose } from "./helpers.mjs";
|
|
5
5
|
import { ArgumentsParserLogic, CommandParserLogic, DynamicSegmentsParserLogic, OptionsInterfaceDeclaration, OptionsMember, OptionsMemberParserCondition, OptionsMemberParserLogic, OptionsParserLogic } from "./options-parser-logic.mjs";
|
|
6
|
+
import { ArgsUtilities, ContextUtilities, GlobalTypeDefinitions, StateBuiltin } from "./state-builtin.mjs";
|
|
7
|
+
import { ColorSupportUtilities, EnvSupportUtilities, FindSuggestionsDeclaration, HyperlinkSupportUtilities, ResolveModuleFunctionDeclaration, UtilsBuiltin } from "./utils-builtin.mjs";
|
|
6
8
|
import { CommandValidationLogic } from "./command-validation-logic.mjs";
|
|
7
9
|
|
|
8
|
-
export { ArgsUtilities, ArgumentsParserLogic, BooleanInputParserLogic, ColorSupportUtilities, CommandDocs, CommandDocsFile, CommandDocsUsageExample, CommandOptionsDocs, CommandParameterType, CommandParserLogic, CommandValidationLogic, ContextUtilities, DynamicSegmentsParserLogic, EnvSupportUtilities, FindSuggestionsDeclaration, HyperlinkSupportUtilities, IsDebug, IsNotDebug, IsNotVerbose, IsVerbose, OptionsInterfaceDeclaration, OptionsMember, OptionsMemberParserCondition, OptionsMemberParserLogic, OptionsParserLogic, ResolveModuleFunctionDeclaration,
|
|
10
|
+
export { ArgsUtilities, ArgumentsParserLogic, BooleanInputParserLogic, ColorSupportUtilities, CommandDocs, CommandDocsFile, CommandDocsUsageExample, CommandOptionsDocs, CommandParameterType, CommandParserLogic, CommandValidationLogic, ContextUtilities, DynamicSegmentsParserLogic, EnvSupportUtilities, FindSuggestionsDeclaration, GlobalTypeDefinitions, HyperlinkSupportUtilities, IsDebug, IsNotDebug, IsNotVerbose, IsVerbose, OptionsInterfaceDeclaration, OptionsMember, OptionsMemberParserCondition, OptionsMemberParserLogic, OptionsParserLogic, ResolveModuleFunctionDeclaration, SpawnBuiltin, StateBuiltin, Usage, UtilsBuiltin };
|
|
@@ -100,24 +100,31 @@ function ArgumentsParserLogic(props) {
|
|
|
100
100
|
return (0, _alloy_js_core_jsx_runtime.createComponent)(require_components_helpers.CommandParameterType, { parameter: arg });
|
|
101
101
|
},
|
|
102
102
|
get initializer() {
|
|
103
|
-
return [
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
103
|
+
return [
|
|
104
|
+
_alloy_js_core.code` ( `,
|
|
105
|
+
(0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_core.Show, {
|
|
106
|
+
get when() {
|
|
107
|
+
return (0, _stryke_type_checks_is_set_string.isSetString)(arg.env);
|
|
108
|
+
},
|
|
109
|
+
get children() {
|
|
110
|
+
return _alloy_js_core.code`env.${appSpecificEnvPrefix}_${(0, _stryke_string_format_constant_case.constantCase)(String(arg.env))} ?? `;
|
|
111
|
+
}
|
|
112
|
+
}),
|
|
113
|
+
(0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_core.Show, {
|
|
114
|
+
get when() {
|
|
115
|
+
return arg.default !== void 0;
|
|
116
|
+
},
|
|
117
|
+
get fallback() {
|
|
118
|
+
return arg.variadic ? _alloy_js_core.code`[]` : _alloy_js_core.code`undefined`;
|
|
119
|
+
},
|
|
120
|
+
get children() {
|
|
121
|
+
return arg.kind === require_types_command.CommandParameterKinds.string ? _alloy_js_core.code`"${arg.default}"` : _alloy_js_core.code`${arg.default}`;
|
|
122
|
+
}
|
|
123
|
+
}),
|
|
124
|
+
_alloy_js_core.code`) as `,
|
|
125
|
+
(0, _alloy_js_core_jsx_runtime.createComponent)(require_components_helpers.CommandParameterType, { parameter: arg }),
|
|
126
|
+
_alloy_js_core.code`; `
|
|
127
|
+
];
|
|
121
128
|
}
|
|
122
129
|
});
|
|
123
130
|
}
|
|
@@ -126,33 +133,39 @@ function ArgumentsParserLogic(props) {
|
|
|
126
133
|
(0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_typescript.IfStatement, {
|
|
127
134
|
condition: _alloy_js_core.code`argsIndex + ${index} < args.length && argsIndex + ${index} !== optionsIndex`,
|
|
128
135
|
get children() {
|
|
129
|
-
return [
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
136
|
+
return [
|
|
137
|
+
(0, _alloy_js_core_jsx_runtime.memo)(() => _alloy_js_core.code`${(0, _stryke_string_format_camel_case.camelCase)(arg.name)} = `),
|
|
138
|
+
(0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_core.Show, {
|
|
139
|
+
get when() {
|
|
140
|
+
return arg.kind === require_types_command.CommandParameterKinds.string || arg.kind === require_types_command.CommandParameterKinds.number;
|
|
141
|
+
},
|
|
142
|
+
get fallback() {
|
|
143
|
+
return (0, _alloy_js_core_jsx_runtime.createComponent)(require_components_helpers.BooleanInputParserLogic, { name: `args[argsIndex + ${index}] ` });
|
|
144
|
+
},
|
|
145
|
+
get children() {
|
|
146
|
+
return (0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_core.Show, {
|
|
147
|
+
get when() {
|
|
148
|
+
return arg.variadic;
|
|
149
|
+
},
|
|
150
|
+
get fallback() {
|
|
151
|
+
return (0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_core.Show, {
|
|
152
|
+
get when() {
|
|
153
|
+
return arg.kind === require_types_command.CommandParameterKinds.number;
|
|
154
|
+
},
|
|
155
|
+
fallback: _alloy_js_core.code`args[argsIndex + ${index}] `,
|
|
156
|
+
children: _alloy_js_core.code`Number(args[argsIndex + ${index}]) `
|
|
157
|
+
});
|
|
158
|
+
},
|
|
159
|
+
get children() {
|
|
160
|
+
return _alloy_js_core.code`args.slice(argsIndex + ${index}, (optionsIndex > argsIndex ? optionsIndex : args.length) - ${command.args.length - index}).join(" ").split(",").map(item => item.trim().replace(/^("|')/, "").replace(/("|')$/, "")).filter(Boolean)`;
|
|
161
|
+
}
|
|
162
|
+
});
|
|
163
|
+
}
|
|
164
|
+
}),
|
|
165
|
+
_alloy_js_core.code` as `,
|
|
166
|
+
(0, _alloy_js_core_jsx_runtime.createComponent)(require_components_helpers.CommandParameterType, { parameter: arg }),
|
|
167
|
+
_alloy_js_core.code`; `
|
|
168
|
+
];
|
|
156
169
|
}
|
|
157
170
|
}),
|
|
158
171
|
(0, _alloy_js_core_jsx_runtime.createComponent)(_powerlines_plugin_alloy_core_components_spacing.Spacing, {})
|
|
@@ -554,12 +567,16 @@ function OptionsMemberParserCondition(props) {
|
|
|
554
567
|
}
|
|
555
568
|
function OptionsInterfaceDeclaration(props) {
|
|
556
569
|
const { command } = props;
|
|
557
|
-
const options = (0, _alloy_js_core.computed)(() => require_contexts_options.computedOptions(command))
|
|
570
|
+
const options = (0, _alloy_js_core.computed)(() => require_contexts_options.computedOptions(Object.entries(command.options).map(([name, option]) => ({
|
|
571
|
+
...option,
|
|
572
|
+
name
|
|
573
|
+
}))));
|
|
558
574
|
return (0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_typescript.InterfaceDeclaration, {
|
|
559
575
|
"export": true,
|
|
560
576
|
get name() {
|
|
561
577
|
return `${(0, _stryke_string_format_pascal_case.pascalCase)(command.name)}Options`;
|
|
562
578
|
},
|
|
579
|
+
"extends": "GlobalOptions",
|
|
563
580
|
get children() {
|
|
564
581
|
return (0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_core.For, {
|
|
565
582
|
get each() {
|
|
@@ -576,7 +593,10 @@ function OptionsInterfaceDeclaration(props) {
|
|
|
576
593
|
*/
|
|
577
594
|
function OptionsParserLogic(props) {
|
|
578
595
|
const { command, appSpecificEnvPrefix, isCaseSensitive = false } = props;
|
|
579
|
-
const options = (0, _alloy_js_core.computed)(() => require_contexts_options.computedOptions(command))
|
|
596
|
+
const options = (0, _alloy_js_core.computed)(() => require_contexts_options.computedOptions(Object.entries(command.options).map(([name, option]) => ({
|
|
597
|
+
...option,
|
|
598
|
+
name
|
|
599
|
+
}))));
|
|
580
600
|
return [
|
|
581
601
|
(0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_typescript.VarDeclaration, {
|
|
582
602
|
"const": true,
|
|
@@ -589,7 +609,7 @@ function OptionsParserLogic(props) {
|
|
|
589
609
|
else if (option.kind === require_types_command.CommandParameterKinds.boolean) return ` ${name.includes("?") || name.includes("-") ? `"${name}"` : `${name}`}: ${option.env ? `env.${appSpecificEnvPrefix}_${option.env} ?? ` : ""}${option.default ? "true" : "false"},`;
|
|
590
610
|
return "";
|
|
591
611
|
}).join("")}
|
|
592
|
-
} as ${(0, _stryke_string_format_pascal_case.pascalCase)(command.name)}Options;`;
|
|
612
|
+
} as unknown as ${(0, _stryke_string_format_pascal_case.pascalCase)(command.name)}Options;`;
|
|
593
613
|
}
|
|
594
614
|
}),
|
|
595
615
|
(0, _alloy_js_core_jsx_runtime.createComponent)(_powerlines_plugin_alloy_core_components_spacing.Spacing, {}),
|