@shell-shock/core 0.17.10 → 0.17.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/api.cjs +31 -143
- package/dist/api.cjs.map +1 -0
- package/dist/api.d.cts +2 -77
- package/dist/api.d.cts.map +1 -1
- package/dist/api.d.mts +2 -76
- package/dist/api.d.mts.map +1 -1
- package/dist/api.mjs +30 -140
- package/dist/api.mjs.map +1 -1
- package/dist/components/command-validation-logic.cjs +14 -15
- package/dist/components/command-validation-logic.cjs.map +1 -0
- package/dist/components/command-validation-logic.d.cts +1 -3
- package/dist/components/command-validation-logic.d.cts.map +1 -1
- package/dist/components/command-validation-logic.d.mts +1 -3
- package/dist/components/command-validation-logic.d.mts.map +1 -1
- package/dist/components/command-validation-logic.mjs +12 -13
- package/dist/components/command-validation-logic.mjs.map +1 -1
- package/dist/components/docs.cjs +6 -6
- package/dist/components/docs.cjs.map +1 -0
- package/dist/components/docs.d.cts +4 -5
- package/dist/components/docs.d.cts.map +1 -1
- package/dist/components/docs.d.mts +4 -5
- package/dist/components/docs.d.mts.map +1 -1
- package/dist/components/docs.mjs +4 -4
- package/dist/components/docs.mjs.map +1 -1
- package/dist/components/exec-builtin.cjs +9 -11
- package/dist/components/exec-builtin.cjs.map +1 -0
- package/dist/components/exec-builtin.d.cts +1 -2
- package/dist/components/exec-builtin.d.cts.map +1 -1
- package/dist/components/exec-builtin.d.mts +1 -2
- package/dist/components/exec-builtin.d.mts.map +1 -1
- package/dist/components/exec-builtin.mjs +7 -10
- package/dist/components/exec-builtin.mjs.map +1 -1
- package/dist/components/helpers.cjs +4 -5
- package/dist/components/helpers.cjs.map +1 -0
- package/dist/components/helpers.d.cts +6 -8
- package/dist/components/helpers.d.cts.map +1 -1
- package/dist/components/helpers.d.mts +6 -8
- package/dist/components/helpers.d.mts.map +1 -1
- package/dist/components/helpers.mjs +2 -3
- package/dist/components/helpers.mjs.map +1 -1
- package/dist/components/options-parser-logic.cjs +29 -30
- package/dist/components/options-parser-logic.cjs.map +1 -0
- package/dist/components/options-parser-logic.d.cts +8 -9
- package/dist/components/options-parser-logic.d.cts.map +1 -1
- package/dist/components/options-parser-logic.d.mts +8 -9
- package/dist/components/options-parser-logic.d.mts.map +1 -1
- package/dist/components/options-parser-logic.mjs +27 -28
- package/dist/components/options-parser-logic.mjs.map +1 -1
- package/dist/components/state-builtin.cjs +3 -2
- package/dist/components/state-builtin.cjs.map +1 -0
- package/dist/components/state-builtin.d.cts +4 -5
- package/dist/components/state-builtin.d.cts.map +1 -1
- package/dist/components/state-builtin.d.mts +4 -5
- package/dist/components/state-builtin.d.mts.map +1 -1
- package/dist/components/state-builtin.mjs +1 -1
- package/dist/components/state-builtin.mjs.map +1 -1
- package/dist/components/usage.cjs +4 -5
- package/dist/components/usage.cjs.map +1 -0
- package/dist/components/usage.d.cts +1 -2
- package/dist/components/usage.d.cts.map +1 -1
- package/dist/components/usage.d.mts +1 -2
- package/dist/components/usage.d.mts.map +1 -1
- package/dist/components/usage.mjs +2 -3
- package/dist/components/usage.mjs.map +1 -1
- package/dist/components/utils-builtin.cjs +5 -4
- package/dist/components/utils-builtin.cjs.map +1 -0
- package/dist/components/utils-builtin.d.cts +7 -8
- package/dist/components/utils-builtin.d.cts.map +1 -1
- package/dist/components/utils-builtin.d.mts +7 -8
- package/dist/components/utils-builtin.d.mts.map +1 -1
- package/dist/components/utils-builtin.mjs +3 -3
- package/dist/components/utils-builtin.mjs.map +1 -1
- package/dist/config.cjs +53 -19
- package/dist/config.cjs.map +1 -0
- package/dist/config.d.cts +29 -8
- package/dist/config.d.cts.map +1 -1
- package/dist/config.d.mts +29 -8
- package/dist/config.d.mts.map +1 -1
- package/dist/config.mjs +51 -18
- package/dist/config.mjs.map +1 -1
- package/dist/contexts/command.cjs +2 -2
- package/dist/contexts/command.cjs.map +1 -0
- package/dist/contexts/command.d.cts.map +1 -1
- package/dist/contexts/command.d.mts.map +1 -1
- package/dist/contexts/command.mjs.map +1 -1
- package/dist/contexts/options.cjs +4 -4
- package/dist/contexts/options.cjs.map +1 -0
- package/dist/contexts/options.d.cts.map +1 -1
- package/dist/contexts/options.d.mts.map +1 -1
- package/dist/contexts/options.mjs +2 -3
- package/dist/contexts/options.mjs.map +1 -1
- package/dist/engine.cjs +138 -0
- package/dist/engine.cjs.map +1 -0
- package/dist/engine.d.cts +79 -0
- package/dist/engine.d.cts.map +1 -0
- package/dist/engine.d.mts +79 -0
- package/dist/engine.d.mts.map +1 -0
- package/dist/engine.mjs +136 -0
- package/dist/engine.mjs.map +1 -0
- package/dist/helpers/automd.cjs +6 -7
- package/dist/helpers/automd.cjs.map +1 -0
- package/dist/helpers/automd.mjs +2 -3
- package/dist/helpers/automd.mjs.map +1 -1
- package/dist/helpers/docs-helpers.cjs +2 -2
- package/dist/helpers/docs-helpers.cjs.map +1 -0
- package/dist/helpers/docs-helpers.mjs.map +1 -1
- package/dist/helpers/get-framework.cjs +24 -0
- package/dist/helpers/get-framework.cjs.map +1 -0
- package/dist/helpers/get-framework.mjs +24 -0
- package/dist/helpers/get-framework.mjs.map +1 -0
- package/dist/helpers/paths.cjs +5 -5
- package/dist/helpers/paths.cjs.map +1 -0
- package/dist/helpers/paths.mjs +4 -4
- package/dist/helpers/paths.mjs.map +1 -1
- package/dist/helpers/persistence.cjs +4 -6
- package/dist/helpers/persistence.cjs.map +1 -0
- package/dist/helpers/persistence.mjs +3 -3
- package/dist/helpers/persistence.mjs.map +1 -1
- package/dist/helpers/update-package-json.cjs +2 -2
- package/dist/helpers/update-package-json.cjs.map +1 -0
- package/dist/helpers/update-package-json.mjs.map +1 -1
- package/dist/helpers/utilities.cjs +3 -3
- package/dist/helpers/utilities.cjs.map +1 -0
- package/dist/helpers/utilities.mjs +1 -1
- package/dist/helpers/utilities.mjs.map +1 -1
- package/dist/helpers/validations.cjs +3 -3
- package/dist/helpers/validations.cjs.map +1 -0
- package/dist/helpers/validations.mjs +1 -3
- package/dist/helpers/validations.mjs.map +1 -1
- package/dist/index.cjs +121 -51
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.cts +80 -5
- package/dist/index.d.cts.map +1 -0
- package/dist/index.d.mts +80 -5
- package/dist/index.d.mts.map +1 -0
- package/dist/index.mjs +118 -6
- package/dist/index.mjs.map +1 -0
- package/dist/package.cjs +12 -0
- package/dist/package.cjs.map +1 -0
- package/dist/package.mjs +6 -0
- package/dist/package.mjs.map +1 -0
- package/dist/plugin-utils/compute-bin.cjs +8 -10
- package/dist/plugin-utils/compute-bin.cjs.map +1 -0
- package/dist/plugin-utils/compute-bin.d.cts +2 -2
- package/dist/plugin-utils/compute-bin.d.cts.map +1 -1
- package/dist/plugin-utils/compute-bin.d.mts +2 -2
- package/dist/plugin-utils/compute-bin.d.mts.map +1 -1
- package/dist/plugin-utils/compute-bin.mjs +6 -8
- package/dist/plugin-utils/compute-bin.mjs.map +1 -1
- package/dist/plugin-utils/context-helpers.cjs +7 -14
- package/dist/plugin-utils/context-helpers.cjs.map +1 -0
- package/dist/plugin-utils/context-helpers.d.cts +4 -4
- package/dist/plugin-utils/context-helpers.d.cts.map +1 -1
- package/dist/plugin-utils/context-helpers.d.mts +4 -4
- package/dist/plugin-utils/context-helpers.d.mts.map +1 -1
- package/dist/plugin-utils/context-helpers.mjs +5 -12
- package/dist/plugin-utils/context-helpers.mjs.map +1 -1
- package/dist/plugin-utils/deepkit.cjs +15 -16
- package/dist/plugin-utils/deepkit.cjs.map +1 -0
- package/dist/plugin-utils/deepkit.d.cts +5 -5
- package/dist/plugin-utils/deepkit.d.cts.map +1 -1
- package/dist/plugin-utils/deepkit.d.mts +5 -5
- package/dist/plugin-utils/deepkit.d.mts.map +1 -1
- package/dist/plugin-utils/deepkit.mjs +14 -15
- package/dist/plugin-utils/deepkit.mjs.map +1 -1
- package/dist/plugin-utils/description-helpers.cjs +2 -1
- package/dist/plugin-utils/description-helpers.cjs.map +1 -0
- package/dist/plugin-utils/description-helpers.d.cts.map +1 -1
- package/dist/plugin-utils/description-helpers.d.mts.map +1 -1
- package/dist/plugin-utils/description-helpers.mjs.map +1 -1
- package/dist/plugin-utils/get-command-tree.cjs +2 -1
- package/dist/plugin-utils/get-command-tree.cjs.map +1 -0
- package/dist/plugin-utils/get-command-tree.d.cts.map +1 -1
- package/dist/plugin-utils/get-command-tree.d.mts.map +1 -1
- package/dist/plugin-utils/get-command-tree.mjs.map +1 -1
- package/dist/plugin-utils/index.cjs +1 -1
- package/dist/plugin-utils/index.d.cts +2 -2
- package/dist/plugin-utils/index.d.mts +2 -2
- package/dist/plugin-utils/index.mjs +2 -2
- package/dist/plugin-utils/reflect.cjs +5 -5
- package/dist/plugin-utils/reflect.cjs.map +1 -0
- package/dist/plugin-utils/reflect.d.cts.map +1 -1
- package/dist/plugin-utils/reflect.d.mts.map +1 -1
- package/dist/plugin-utils/reflect.mjs +3 -5
- package/dist/plugin-utils/reflect.mjs.map +1 -1
- package/dist/plugin-utils/traverse-command-tree.cjs +2 -1
- package/dist/plugin-utils/traverse-command-tree.cjs.map +1 -0
- package/dist/plugin-utils/traverse-command-tree.d.cts.map +1 -1
- package/dist/plugin-utils/traverse-command-tree.d.mts.map +1 -1
- package/dist/plugin-utils/traverse-command-tree.mjs.map +1 -1
- package/dist/plugin-utils/type-checks.cjs +146 -17
- package/dist/plugin-utils/type-checks.cjs.map +1 -0
- package/dist/plugin-utils/type-checks.d.cts +5 -5
- package/dist/plugin-utils/type-checks.d.cts.map +1 -1
- package/dist/plugin-utils/type-checks.d.mts +5 -5
- package/dist/plugin-utils/type-checks.d.mts.map +1 -1
- package/dist/plugin-utils/type-checks.mjs +145 -16
- package/dist/plugin-utils/type-checks.mjs.map +1 -1
- package/dist/plugin.cjs +80 -56
- package/dist/plugin.cjs.map +1 -0
- package/dist/plugin.d.cts.map +1 -1
- package/dist/plugin.d.mts.map +1 -1
- package/dist/plugin.mjs +75 -52
- package/dist/plugin.mjs.map +1 -1
- package/dist/resolver/helpers.cjs +33 -24
- package/dist/resolver/helpers.cjs.map +1 -0
- package/dist/resolver/helpers.mjs +32 -22
- package/dist/resolver/helpers.mjs.map +1 -1
- package/dist/resolver/resolve.cjs +316 -59
- package/dist/resolver/resolve.cjs.map +1 -0
- package/dist/resolver/resolve.mjs +313 -56
- package/dist/resolver/resolve.mjs.map +1 -1
- package/dist/types/command.cjs +43 -82
- package/dist/types/command.cjs.map +1 -0
- package/dist/types/command.d.cts +61 -119
- package/dist/types/command.d.cts.map +1 -1
- package/dist/types/command.d.mts +61 -119
- package/dist/types/command.d.mts.map +1 -1
- package/dist/types/command.mjs +42 -80
- package/dist/types/command.mjs.map +1 -1
- package/dist/types/config.cjs +45 -4
- package/dist/types/config.cjs.map +1 -0
- package/dist/types/config.d.cts +15 -10
- package/dist/types/config.d.cts.map +1 -1
- package/dist/types/config.d.mts +15 -10
- package/dist/types/config.d.mts.map +1 -1
- package/dist/types/config.mjs +40 -4
- package/dist/types/config.mjs.map +1 -1
- package/dist/types/context.cjs +9 -1
- package/dist/types/context.cjs.map +1 -0
- package/dist/types/context.d.cts +3 -2
- package/dist/types/context.d.cts.map +1 -1
- package/dist/types/context.d.mts +3 -2
- package/dist/types/context.d.mts.map +1 -1
- package/dist/types/context.mjs +7 -1
- package/dist/types/context.mjs.map +1 -1
- package/dist/types/env.cjs +2 -1
- package/dist/types/env.cjs.map +1 -0
- package/dist/types/env.d.cts.map +1 -1
- package/dist/types/env.d.mts.map +1 -1
- package/dist/types/env.mjs.map +1 -1
- package/dist/types/index.cjs +6 -3
- package/dist/types/index.d.cts +4 -4
- package/dist/types/index.d.mts +4 -4
- package/dist/types/index.mjs +4 -4
- package/dist/types/options.cjs +2 -1
- package/dist/types/options.cjs.map +1 -0
- package/dist/types/options.d.cts.map +1 -1
- package/dist/types/options.d.mts.map +1 -1
- package/dist/types/options.mjs.map +1 -1
- package/package.json +43 -35
- package/dist/resolver/deepkit.cjs +0 -135
- package/dist/resolver/deepkit.mjs +0 -135
- package/dist/resolver/deepkit.mjs.map +0 -1
- package/dist/resolver/module.cjs +0 -145
- package/dist/resolver/module.mjs +0 -145
- package/dist/resolver/module.mjs.map +0 -1
package/dist/engine.mjs
ADDED
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
import { getFramework } from "./helpers/get-framework.mjs";
|
|
2
|
+
import { createEngine as createEngine$1 } from "@powerlines/engine";
|
|
3
|
+
|
|
4
|
+
//#region src/engine.ts
|
|
5
|
+
/**
|
|
6
|
+
* The Shell Shock Engine class.
|
|
7
|
+
*
|
|
8
|
+
* @remarks
|
|
9
|
+
* This class provides methods to interact with the Shell Shock build system, including cleaning, preparing, linting, building, generating documentation, and finalizing projects.
|
|
10
|
+
*/
|
|
11
|
+
var Engine = class Engine {
|
|
12
|
+
#powerlines;
|
|
13
|
+
/**
|
|
14
|
+
* Creates a new instance of the {@link Engine} class using the provided configuration options. This method initializes the underlying Powerlines API with the appropriate plugins and settings for Shell Shock.
|
|
15
|
+
*
|
|
16
|
+
* @param options - The user configuration options.
|
|
17
|
+
* @returns A promise that resolves to a {@link Engine} instance.
|
|
18
|
+
*/
|
|
19
|
+
static async from(options) {
|
|
20
|
+
return new Engine(await createEngine$1({
|
|
21
|
+
...options,
|
|
22
|
+
framework: getFramework()
|
|
23
|
+
}, "@shell-shock/core/api"));
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* Gets the current build context, which includes information about the project, environment, and configuration. This context is used internally by the Shell Shock API to manage the build process and provide relevant data to plugins and other components.
|
|
27
|
+
*
|
|
28
|
+
* @returns The current build context.
|
|
29
|
+
*/
|
|
30
|
+
get context() {
|
|
31
|
+
return this.#powerlines.context;
|
|
32
|
+
}
|
|
33
|
+
constructor(powerlines) {
|
|
34
|
+
this.#powerlines = powerlines;
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* Executes the clean phase of the build process, which typically involves removing generated files and resetting the build environment. The `inlineConfig` parameter allows users to specify additional options or overrides for the clean operation.
|
|
38
|
+
*
|
|
39
|
+
* @param inlineConfig - The inline configuration options for the clean operation.
|
|
40
|
+
* @returns A promise that resolves when the clean operation is complete.
|
|
41
|
+
*/
|
|
42
|
+
async clean(inlineConfig) {
|
|
43
|
+
return this.#powerlines.clean(inlineConfig);
|
|
44
|
+
}
|
|
45
|
+
/**
|
|
46
|
+
* Executes the prepare phase of the build process, which typically involves setting up the build environment and installing dependencies. The `inlineConfig` parameter allows users to specify additional options or overrides for the prepare operation.
|
|
47
|
+
*
|
|
48
|
+
* @param inlineConfig - The inline configuration options for the prepare operation.
|
|
49
|
+
* @returns A promise that resolves when the prepare operation is complete.
|
|
50
|
+
*/
|
|
51
|
+
async prepare(inlineConfig) {
|
|
52
|
+
return this.#powerlines.prepare(inlineConfig);
|
|
53
|
+
}
|
|
54
|
+
/**
|
|
55
|
+
* Executes the lint phase of the build process, which typically involves analyzing code for quality and style issues. The `inlineConfig` parameter allows users to specify additional options or overrides for the lint operation.
|
|
56
|
+
*
|
|
57
|
+
* @param inlineConfig - The inline configuration options for the lint operation.
|
|
58
|
+
* @returns A promise that resolves when the lint operation is complete.
|
|
59
|
+
*/
|
|
60
|
+
async lint(inlineConfig) {
|
|
61
|
+
return this.#powerlines.lint(inlineConfig);
|
|
62
|
+
}
|
|
63
|
+
/**
|
|
64
|
+
* Executes the build phase of the build process, which typically involves compiling source code and generating output artifacts. The `inlineConfig` parameter allows users to specify additional options or overrides for the build operation.
|
|
65
|
+
*
|
|
66
|
+
* @param inlineConfig - The inline configuration options for the build operation.
|
|
67
|
+
* @returns A promise that resolves when the build operation is complete.
|
|
68
|
+
*/
|
|
69
|
+
async build(inlineConfig) {
|
|
70
|
+
return this.#powerlines.build(inlineConfig);
|
|
71
|
+
}
|
|
72
|
+
/**
|
|
73
|
+
* Executes the documentation generation phase of the build process, which typically involves creating API documentation and other project documentation. The `inlineConfig` parameter allows users to specify additional options or overrides for the documentation operation.
|
|
74
|
+
*
|
|
75
|
+
* @param inlineConfig - The inline configuration options for the documentation operation.
|
|
76
|
+
* @returns A promise that resolves when the documentation generation is complete.
|
|
77
|
+
*/
|
|
78
|
+
async docs(inlineConfig) {
|
|
79
|
+
return this.#powerlines.docs(inlineConfig);
|
|
80
|
+
}
|
|
81
|
+
/**
|
|
82
|
+
* Executes the finalize phase of the build process, which typically involves cleanup tasks and final reporting. This method should be called after all other build phases have completed.
|
|
83
|
+
*
|
|
84
|
+
* @returns A promise that resolves when the finalize operation is complete.
|
|
85
|
+
*/
|
|
86
|
+
async finalize() {
|
|
87
|
+
return this.#powerlines.finalize();
|
|
88
|
+
}
|
|
89
|
+
static __type = [
|
|
90
|
+
"#powerlines",
|
|
91
|
+
"EngineOptions",
|
|
92
|
+
"options",
|
|
93
|
+
() => Engine,
|
|
94
|
+
"from",
|
|
95
|
+
"Creates a new instance of the {@link Engine} class using the provided configuration options. This method initializes the underlying Powerlines API with the appropriate plugins and settings for Shell Shock.",
|
|
96
|
+
"powerlines",
|
|
97
|
+
"constructor",
|
|
98
|
+
"inlineConfig",
|
|
99
|
+
"clean",
|
|
100
|
+
"Executes the clean phase of the build process, which typically involves removing generated files and resetting the build environment. The `inlineConfig` parameter allows users to specify additional options or overrides for the clean operation.",
|
|
101
|
+
"prepare",
|
|
102
|
+
"Executes the prepare phase of the build process, which typically involves setting up the build environment and installing dependencies. The `inlineConfig` parameter allows users to specify additional options or overrides for the prepare operation.",
|
|
103
|
+
"lint",
|
|
104
|
+
"Executes the lint phase of the build process, which typically involves analyzing code for quality and style issues. The `inlineConfig` parameter allows users to specify additional options or overrides for the lint operation.",
|
|
105
|
+
"build",
|
|
106
|
+
"Executes the build phase of the build process, which typically involves compiling source code and generating output artifacts. The `inlineConfig` parameter allows users to specify additional options or overrides for the build operation.",
|
|
107
|
+
"docs",
|
|
108
|
+
"Executes the documentation generation phase of the build process, which typically involves creating API documentation and other project documentation. The `inlineConfig` parameter allows users to specify additional options or overrides for the documentation operation.",
|
|
109
|
+
"finalize",
|
|
110
|
+
"Executes the finalize phase of the build process, which typically involves cleanup tasks and final reporting. This method should be called after all other build phases have completed.",
|
|
111
|
+
"Engine",
|
|
112
|
+
"The Shell Shock Engine class.",
|
|
113
|
+
"!3!P\"w\"2#P7$`0%s?&!P!2'\"0(P!2)$`0*?+P!2)$`0,?-P!2)$`0.?/P!2)$`00?1P!2)$`02?3P$`04?55w6?7"
|
|
114
|
+
];
|
|
115
|
+
};
|
|
116
|
+
/**
|
|
117
|
+
* Creates a new {@link Engine} instance.
|
|
118
|
+
*
|
|
119
|
+
* @param options - The user configuration options.
|
|
120
|
+
* @returns A promise that resolves to a {@link Engine} instance.
|
|
121
|
+
*/
|
|
122
|
+
async function createEngine(options) {
|
|
123
|
+
return Engine.from(options);
|
|
124
|
+
}
|
|
125
|
+
createEngine.__type = [
|
|
126
|
+
"EngineOptions",
|
|
127
|
+
"options",
|
|
128
|
+
() => Engine,
|
|
129
|
+
"createEngine",
|
|
130
|
+
"Creates a new {@link Engine} instance.",
|
|
131
|
+
"P\"w!2\"P7#`/$?%"
|
|
132
|
+
];
|
|
133
|
+
|
|
134
|
+
//#endregion
|
|
135
|
+
export { Engine, createEngine };
|
|
136
|
+
//# sourceMappingURL=engine.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"engine.mjs","names":[],"sources":[],"mappings":""}
|
package/dist/helpers/automd.cjs
CHANGED
|
@@ -1,11 +1,9 @@
|
|
|
1
|
-
const require_runtime = require('../_virtual/_rolldown/runtime.cjs');
|
|
2
1
|
const require_context_helpers = require('../plugin-utils/context-helpers.cjs');
|
|
3
2
|
const require_components_docs = require('../components/docs.cjs');
|
|
4
3
|
require('../plugin-utils/index.cjs');
|
|
5
4
|
let _alloy_js_core_jsx_runtime = require("@alloy-js/core/jsx-runtime");
|
|
6
|
-
let _alloy_js_core_components = require("@alloy-js/core/components");
|
|
7
|
-
let _powerlines_plugin_alloy_render = require("@powerlines/plugin-alloy/render");
|
|
8
5
|
let _alloy_js_core = require("@alloy-js/core");
|
|
6
|
+
let _powerlines_plugin_alloy_render = require("@powerlines/plugin-alloy/render");
|
|
9
7
|
let _alloy_js_markdown = require("@alloy-js/markdown");
|
|
10
8
|
let _powerlines_plugin_alloy_core_components_spacing = require("@powerlines/plugin-alloy/core/components/spacing");
|
|
11
9
|
let automd = require("automd");
|
|
@@ -34,15 +32,15 @@ const commands = __assignType((context) => (0, automd.defineGenerator)({
|
|
|
34
32
|
(0, _alloy_js_core_jsx_runtime.createComponent)(_powerlines_plugin_alloy_core_components_spacing.Spacing, {}),
|
|
35
33
|
(0, _alloy_js_core_jsx_runtime.memo)(() => _alloy_js_core.code`The following commands are available in the ${require_context_helpers.getAppTitle(context, true)} command-line interface application:`),
|
|
36
34
|
(0, _alloy_js_core_jsx_runtime.createComponent)(_powerlines_plugin_alloy_core_components_spacing.Spacing, {}),
|
|
37
|
-
(0, _alloy_js_core_jsx_runtime.createComponent)(
|
|
35
|
+
(0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_core.For, {
|
|
38
36
|
get each() {
|
|
39
37
|
return Object.values(context.commands);
|
|
40
38
|
},
|
|
41
39
|
doubleHardline: true,
|
|
42
40
|
get children() {
|
|
43
|
-
return __assignType((child) => (0, _alloy_js_core_jsx_runtime.createComponent)(
|
|
41
|
+
return __assignType((child) => (0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_core.Show, {
|
|
44
42
|
get when() {
|
|
45
|
-
return !child.
|
|
43
|
+
return !child.virtual;
|
|
46
44
|
},
|
|
47
45
|
get children() {
|
|
48
46
|
return (0, _alloy_js_core_jsx_runtime.createComponent)(require_components_docs.CommandDocs, {
|
|
@@ -68,4 +66,5 @@ const commands = __assignType((context) => (0, automd.defineGenerator)({
|
|
|
68
66
|
]);
|
|
69
67
|
|
|
70
68
|
//#endregion
|
|
71
|
-
exports.commands = commands;
|
|
69
|
+
exports.commands = commands;
|
|
70
|
+
//# sourceMappingURL=automd.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"automd.cjs","names":[],"sources":[],"mappings":""}
|
package/dist/helpers/automd.mjs
CHANGED
|
@@ -2,9 +2,8 @@ import { getAppTitle } from "../plugin-utils/context-helpers.mjs";
|
|
|
2
2
|
import { CommandDocs } from "../components/docs.mjs";
|
|
3
3
|
import "../plugin-utils/index.mjs";
|
|
4
4
|
import { createComponent, memo } from "@alloy-js/core/jsx-runtime";
|
|
5
|
-
import { For, Show } from "@alloy-js/core
|
|
5
|
+
import { For, Show, code } from "@alloy-js/core";
|
|
6
6
|
import { renderString } from "@powerlines/plugin-alloy/render";
|
|
7
|
-
import { code } from "@alloy-js/core";
|
|
8
7
|
import { Heading } from "@alloy-js/markdown";
|
|
9
8
|
import { Spacing } from "@powerlines/plugin-alloy/core/components/spacing";
|
|
10
9
|
import { defineGenerator } from "automd";
|
|
@@ -41,7 +40,7 @@ const commands = __assignType((context) => defineGenerator({
|
|
|
41
40
|
get children() {
|
|
42
41
|
return __assignType((child) => createComponent(Show, {
|
|
43
42
|
get when() {
|
|
44
|
-
return !child.
|
|
43
|
+
return !child.virtual;
|
|
45
44
|
},
|
|
46
45
|
get children() {
|
|
47
46
|
return createComponent(CommandDocs, {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"automd.mjs","names":[],"sources":[
|
|
1
|
+
{"version":3,"file":"automd.mjs","names":[],"sources":[],"mappings":""}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
const require_runtime = require('../_virtual/_rolldown/runtime.cjs');
|
|
2
1
|
let _stryke_path_join = require("@stryke/path/join");
|
|
3
2
|
|
|
4
3
|
//#region src/helpers/docs-helpers.ts
|
|
@@ -20,4 +19,5 @@ getDocsOutputPath.__type = [
|
|
|
20
19
|
];
|
|
21
20
|
|
|
22
21
|
//#endregion
|
|
23
|
-
exports.getDocsOutputPath = getDocsOutputPath;
|
|
22
|
+
exports.getDocsOutputPath = getDocsOutputPath;
|
|
23
|
+
//# sourceMappingURL=docs-helpers.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"docs-helpers.cjs","names":[],"sources":[],"mappings":""}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"docs-helpers.mjs","names":[],"sources":[
|
|
1
|
+
{"version":3,"file":"docs-helpers.mjs","names":[],"sources":[],"mappings":""}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
const require_package = require('../package.cjs');
|
|
2
|
+
|
|
3
|
+
//#region src/helpers/get-framework.ts
|
|
4
|
+
/**
|
|
5
|
+
* Retrieves the framework information for Shell Shock.
|
|
6
|
+
*
|
|
7
|
+
* @returns An object containing the name, version, and organization ID of the Shell Shock framework.
|
|
8
|
+
*/
|
|
9
|
+
function getFramework() {
|
|
10
|
+
return {
|
|
11
|
+
name: "shell-shock",
|
|
12
|
+
version: require_package.version,
|
|
13
|
+
orgId: "storm-software"
|
|
14
|
+
};
|
|
15
|
+
}
|
|
16
|
+
getFramework.__type = [
|
|
17
|
+
"getFramework",
|
|
18
|
+
"Retrieves the framework information for Shell Shock.",
|
|
19
|
+
"P!/!?\""
|
|
20
|
+
];
|
|
21
|
+
|
|
22
|
+
//#endregion
|
|
23
|
+
exports.getFramework = getFramework;
|
|
24
|
+
//# sourceMappingURL=get-framework.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"get-framework.cjs","names":[],"sources":[],"mappings":""}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { version } from "../package.mjs";
|
|
2
|
+
|
|
3
|
+
//#region src/helpers/get-framework.ts
|
|
4
|
+
/**
|
|
5
|
+
* Retrieves the framework information for Shell Shock.
|
|
6
|
+
*
|
|
7
|
+
* @returns An object containing the name, version, and organization ID of the Shell Shock framework.
|
|
8
|
+
*/
|
|
9
|
+
function getFramework() {
|
|
10
|
+
return {
|
|
11
|
+
name: "shell-shock",
|
|
12
|
+
version,
|
|
13
|
+
orgId: "storm-software"
|
|
14
|
+
};
|
|
15
|
+
}
|
|
16
|
+
getFramework.__type = [
|
|
17
|
+
"getFramework",
|
|
18
|
+
"Retrieves the framework information for Shell Shock.",
|
|
19
|
+
"P!/!?\""
|
|
20
|
+
];
|
|
21
|
+
|
|
22
|
+
//#endregion
|
|
23
|
+
export { getFramework };
|
|
24
|
+
//# sourceMappingURL=get-framework.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"get-framework.mjs","names":[],"sources":[],"mappings":""}
|
package/dist/helpers/paths.cjs
CHANGED
|
@@ -1,15 +1,14 @@
|
|
|
1
|
-
const require_runtime = require('../_virtual/_rolldown/runtime.cjs');
|
|
2
1
|
const require_context_helpers = require('../plugin-utils/context-helpers.cjs');
|
|
3
2
|
let _stryke_path_append = require("@stryke/path/append");
|
|
4
|
-
let _stryke_path_file_path_fns = require("@stryke/path/file-path-fns");
|
|
5
3
|
let _stryke_path_join_paths = require("@stryke/path/join-paths");
|
|
6
4
|
let _stryke_path_replace = require("@stryke/path/replace");
|
|
7
5
|
let _stryke_path_resolve_parent_path = require("@stryke/path/resolve-parent-path");
|
|
6
|
+
let _stryke_type_checks_is_set_object = require("@stryke/type-checks/is-set-object");
|
|
8
7
|
let _stryke_type_checks_is_set_string = require("@stryke/type-checks/is-set-string");
|
|
9
8
|
let powerlines_utils = require("powerlines/utils");
|
|
10
|
-
let _stryke_type_checks_is_set_object = require("@stryke/type-checks/is-set-object");
|
|
11
9
|
let _stryke_fs_list_files = require("@stryke/fs/list-files");
|
|
12
10
|
let _stryke_path_common = require("@stryke/path/common");
|
|
11
|
+
let _stryke_path_file_path_fns = require("@stryke/path/file-path-fns");
|
|
13
12
|
let node_fs = require("node:fs");
|
|
14
13
|
|
|
15
14
|
//#region src/helpers/paths.ts
|
|
@@ -87,7 +86,7 @@ resolveCommandDynamicPathSegments.__type = [
|
|
|
87
86
|
async function findCommandsRoot(context) {
|
|
88
87
|
let paths = [];
|
|
89
88
|
if ((0, _stryke_type_checks_is_set_string.isSetString)(context.config.input)) paths = await (0, _stryke_fs_list_files.listFiles)((0, _stryke_path_append.appendPath)((0, _stryke_path_append.appendPath)(context.config.input, context.config.root), context.config.cwd));
|
|
90
|
-
else if ((0, powerlines_utils.
|
|
89
|
+
else if ((0, powerlines_utils.isFileReference)(context.config.input)) paths = await (0, _stryke_fs_list_files.listFiles)((0, _stryke_path_append.appendPath)((0, _stryke_path_append.appendPath)(context.config.input.file, context.config.root), context.config.cwd));
|
|
91
90
|
else if (Array.isArray(context.config.input) && context.config.input.length > 0) paths = (await Promise.all(context.config.input.map(__assignType(async (input) => (0, _stryke_fs_list_files.listFiles)((0, _stryke_path_append.appendPath)((0, _stryke_path_append.appendPath)((0, _stryke_type_checks_is_set_string.isSetString)(input) ? input : input.file, context.config.root), context.config.cwd)), [
|
|
92
91
|
"input",
|
|
93
92
|
"",
|
|
@@ -134,4 +133,5 @@ findCommandsRoot.__type = [
|
|
|
134
133
|
exports.findCommandsRoot = findCommandsRoot;
|
|
135
134
|
exports.resolveCommandId = resolveCommandId;
|
|
136
135
|
exports.resolveCommandName = resolveCommandName;
|
|
137
|
-
exports.resolveCommandPath = resolveCommandPath;
|
|
136
|
+
exports.resolveCommandPath = resolveCommandPath;
|
|
137
|
+
//# sourceMappingURL=paths.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"paths.cjs","names":[],"sources":[],"mappings":""}
|
package/dist/helpers/paths.mjs
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { getDynamicPathSegmentName, isDynamicPathSegment, isPathSegmentGroup } from "../plugin-utils/context-helpers.mjs";
|
|
2
2
|
import { appendPath } from "@stryke/path/append";
|
|
3
|
-
import { findFilePath, findFolderName } from "@stryke/path/file-path-fns";
|
|
4
3
|
import { joinPaths } from "@stryke/path/join-paths";
|
|
5
4
|
import { replacePath } from "@stryke/path/replace";
|
|
6
5
|
import { resolveParentPath } from "@stryke/path/resolve-parent-path";
|
|
7
|
-
import { isSetString } from "@stryke/type-checks/is-set-string";
|
|
8
|
-
import { isTypeDefinition } from "powerlines/utils";
|
|
9
6
|
import { isSetObject } from "@stryke/type-checks/is-set-object";
|
|
7
|
+
import { isSetString } from "@stryke/type-checks/is-set-string";
|
|
8
|
+
import { isFileReference } from "powerlines/utils";
|
|
10
9
|
import { listFiles } from "@stryke/fs/list-files";
|
|
11
10
|
import { commonPath } from "@stryke/path/common";
|
|
11
|
+
import { findFilePath, findFolderName } from "@stryke/path/file-path-fns";
|
|
12
12
|
import { existsSync } from "node:fs";
|
|
13
13
|
|
|
14
14
|
//#region src/helpers/paths.ts
|
|
@@ -86,7 +86,7 @@ resolveCommandDynamicPathSegments.__type = [
|
|
|
86
86
|
async function findCommandsRoot(context) {
|
|
87
87
|
let paths = [];
|
|
88
88
|
if (isSetString(context.config.input)) paths = await listFiles(appendPath(appendPath(context.config.input, context.config.root), context.config.cwd));
|
|
89
|
-
else if (
|
|
89
|
+
else if (isFileReference(context.config.input)) paths = await listFiles(appendPath(appendPath(context.config.input.file, context.config.root), context.config.cwd));
|
|
90
90
|
else if (Array.isArray(context.config.input) && context.config.input.length > 0) paths = (await Promise.all(context.config.input.map(__assignType(async (input) => listFiles(appendPath(appendPath(isSetString(input) ? input : input.file, context.config.root), context.config.cwd)), [
|
|
91
91
|
"input",
|
|
92
92
|
"",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"paths.mjs","names":[],"sources":[
|
|
1
|
+
{"version":3,"file":"paths.mjs","names":[],"sources":[],"mappings":""}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
const require_runtime = require('../_virtual/_rolldown/runtime.cjs');
|
|
2
|
-
let _powerlines_plugin_env_helpers = require("@powerlines/plugin-env/helpers");
|
|
3
1
|
let _stryke_path_join_paths = require("@stryke/path/join-paths");
|
|
2
|
+
let _powerlines_plugin_env_helpers = require("@powerlines/plugin-env/helpers");
|
|
4
3
|
|
|
5
4
|
//#region src/helpers/persistence.ts
|
|
6
5
|
function __assignType(fn, args) {
|
|
@@ -94,7 +93,7 @@ readCommandsPersistence.__type = [
|
|
|
94
93
|
*/
|
|
95
94
|
async function writeCommandsPersistence(context) {
|
|
96
95
|
const filePath = getCommandsPersistencePath(context);
|
|
97
|
-
await (0, _powerlines_plugin_env_helpers.
|
|
96
|
+
await (0, _powerlines_plugin_env_helpers.writeEnv)(context);
|
|
98
97
|
await context.fs.write(filePath, JSON.stringify(Object.fromEntries(Object.entries(context.commands).map(__assignType(([name, command]) => [name, serialize(command)], [
|
|
99
98
|
"param0",
|
|
100
99
|
"",
|
|
@@ -110,6 +109,5 @@ writeCommandsPersistence.__type = [
|
|
|
110
109
|
];
|
|
111
110
|
|
|
112
111
|
//#endregion
|
|
113
|
-
exports.
|
|
114
|
-
|
|
115
|
-
exports.writeCommandsPersistence = writeCommandsPersistence;
|
|
112
|
+
exports.writeCommandsPersistence = writeCommandsPersistence;
|
|
113
|
+
//# sourceMappingURL=persistence.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"persistence.cjs","names":[],"sources":[],"mappings":""}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { writeEnvTypeReflection } from "@powerlines/plugin-env/helpers";
|
|
2
1
|
import { joinPaths } from "@stryke/path/join-paths";
|
|
2
|
+
import { writeEnv } from "@powerlines/plugin-env/helpers";
|
|
3
3
|
|
|
4
4
|
//#region src/helpers/persistence.ts
|
|
5
5
|
function __assignType(fn, args) {
|
|
@@ -93,7 +93,7 @@ readCommandsPersistence.__type = [
|
|
|
93
93
|
*/
|
|
94
94
|
async function writeCommandsPersistence(context) {
|
|
95
95
|
const filePath = getCommandsPersistencePath(context);
|
|
96
|
-
await
|
|
96
|
+
await writeEnv(context);
|
|
97
97
|
await context.fs.write(filePath, JSON.stringify(Object.fromEntries(Object.entries(context.commands).map(__assignType(([name, command]) => [name, serialize(command)], [
|
|
98
98
|
"param0",
|
|
99
99
|
"",
|
|
@@ -109,5 +109,5 @@ writeCommandsPersistence.__type = [
|
|
|
109
109
|
];
|
|
110
110
|
|
|
111
111
|
//#endregion
|
|
112
|
-
export {
|
|
112
|
+
export { writeCommandsPersistence };
|
|
113
113
|
//# sourceMappingURL=persistence.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"persistence.mjs","names":[],"sources":[
|
|
1
|
+
{"version":3,"file":"persistence.mjs","names":[],"sources":[],"mappings":""}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
const require_runtime = require('../_virtual/_rolldown/runtime.cjs');
|
|
2
1
|
const require_context_helpers = require('../plugin-utils/context-helpers.cjs');
|
|
3
2
|
let _stryke_convert_to_array = require("@stryke/convert/to-array");
|
|
4
3
|
let _stryke_path_join_paths = require("@stryke/path/join-paths");
|
|
@@ -62,4 +61,5 @@ updatePackageJsonBinary.__type = [
|
|
|
62
61
|
|
|
63
62
|
//#endregion
|
|
64
63
|
exports.formatBinaryPath = formatBinaryPath;
|
|
65
|
-
exports.updatePackageJsonBinary = updatePackageJsonBinary;
|
|
64
|
+
exports.updatePackageJsonBinary = updatePackageJsonBinary;
|
|
65
|
+
//# sourceMappingURL=update-package-json.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"update-package-json.cjs","names":[],"sources":[],"mappings":""}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"update-package-json.mjs","names":[],"sources":[
|
|
1
|
+
{"version":3,"file":"update-package-json.mjs","names":[],"sources":[],"mappings":""}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
const require_runtime = require('../_virtual/_rolldown/runtime.cjs');
|
|
2
1
|
let _stryke_string_format_constant_case = require("@stryke/string-format/constant-case");
|
|
3
2
|
let _stryke_helpers_get_unique = require("@stryke/helpers/get-unique");
|
|
4
3
|
let _stryke_cli_utils_tree = require("@stryke/cli/utils/tree");
|
|
@@ -17,7 +16,7 @@ function __assignType(fn, args) {
|
|
|
17
16
|
}
|
|
18
17
|
function innerFormatCommandTree(command) {
|
|
19
18
|
return {
|
|
20
|
-
name: `${command.name}${command.
|
|
19
|
+
name: `${command.name}${command.virtual ? " (virtual)" : ""}`,
|
|
21
20
|
children: Object.values(command.children ?? {}).map(innerFormatCommandTree)
|
|
22
21
|
};
|
|
23
22
|
}
|
|
@@ -92,4 +91,5 @@ getGlobalOptions.__type = [
|
|
|
92
91
|
|
|
93
92
|
//#endregion
|
|
94
93
|
exports.formatCommandTree = formatCommandTree;
|
|
95
|
-
exports.getGlobalOptions = getGlobalOptions;
|
|
94
|
+
exports.getGlobalOptions = getGlobalOptions;
|
|
95
|
+
//# sourceMappingURL=utilities.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utilities.cjs","names":[],"sources":[],"mappings":""}
|
|
@@ -16,7 +16,7 @@ function __assignType(fn, args) {
|
|
|
16
16
|
}
|
|
17
17
|
function innerFormatCommandTree(command) {
|
|
18
18
|
return {
|
|
19
|
-
name: `${command.name}${command.
|
|
19
|
+
name: `${command.name}${command.virtual ? " (virtual)" : ""}`,
|
|
20
20
|
children: Object.values(command.children ?? {}).map(innerFormatCommandTree)
|
|
21
21
|
};
|
|
22
22
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utilities.mjs","names":[],"sources":[
|
|
1
|
+
{"version":3,"file":"utilities.mjs","names":[],"sources":[],"mappings":""}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
const require_types_command = require('../types/command.cjs');
|
|
2
1
|
|
|
3
2
|
//#region src/helpers/validations.ts
|
|
4
3
|
const __ΩValidationFailure = [
|
|
@@ -10,7 +9,7 @@ const __ΩValidationFailure = [
|
|
|
10
9
|
function validateArguments(command) {
|
|
11
10
|
const failures = [];
|
|
12
11
|
let sequential = false;
|
|
13
|
-
for (const argument of command.args ?? []) if ((argument.
|
|
12
|
+
for (const argument of command.args ?? []) if ((argument.type === "string" || argument.type === "number") && argument.variadic) if (!sequential) sequential = true;
|
|
14
13
|
else failures.push({
|
|
15
14
|
code: "SEQUENTIAL_VARIADIC_ARGUMENTS",
|
|
16
15
|
details: `Sequential variadic arguments are not allowed - since the argument preceding ${argument.name} is variadic, it must not also be variadic.`
|
|
@@ -68,4 +67,5 @@ validateCommand.__type = [
|
|
|
68
67
|
];
|
|
69
68
|
|
|
70
69
|
//#endregion
|
|
71
|
-
exports.validateCommand = validateCommand;
|
|
70
|
+
exports.validateCommand = validateCommand;
|
|
71
|
+
//# sourceMappingURL=validations.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"validations.cjs","names":[],"sources":[],"mappings":""}
|
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
import { CommandParameterKinds } from "../types/command.mjs";
|
|
2
|
-
|
|
3
1
|
//#region src/helpers/validations.ts
|
|
4
2
|
const __ΩValidationFailure = [
|
|
5
3
|
"code",
|
|
@@ -10,7 +8,7 @@ const __ΩValidationFailure = [
|
|
|
10
8
|
function validateArguments(command) {
|
|
11
9
|
const failures = [];
|
|
12
10
|
let sequential = false;
|
|
13
|
-
for (const argument of command.args ?? []) if ((argument.
|
|
11
|
+
for (const argument of command.args ?? []) if ((argument.type === "string" || argument.type === "number") && argument.variadic) if (!sequential) sequential = true;
|
|
14
12
|
else failures.push({
|
|
15
13
|
code: "SEQUENTIAL_VARIADIC_ARGUMENTS",
|
|
16
14
|
details: `Sequential variadic arguments are not allowed - since the argument preceding ${argument.name} is variadic, it must not also be variadic.`
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"validations.mjs","names":[],"sources":[
|
|
1
|
+
{"version":3,"file":"validations.mjs","names":[],"sources":[],"mappings":""}
|