@shell-shock/core 0.17.8 → 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/_virtual/_rolldown/runtime.cjs +29 -1
- package/dist/api.cjs +36 -1
- 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 +35 -1
- package/dist/api.mjs.map +1 -1
- package/dist/components/command-validation-logic.cjs +291 -1
- 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 +288 -1
- package/dist/components/command-validation-logic.mjs.map +1 -1
- package/dist/components/docs.cjs +265 -1
- 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 +256 -1
- package/dist/components/docs.mjs.map +1 -1
- package/dist/components/exec-builtin.cjs +429 -15
- 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 +424 -15
- package/dist/components/exec-builtin.mjs.map +1 -1
- package/dist/components/helpers.cjs +119 -1
- 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 +111 -1
- package/dist/components/helpers.mjs.map +1 -1
- package/dist/components/index.cjs +58 -1
- package/dist/components/index.mjs +10 -1
- package/dist/components/options-parser-logic.cjs +959 -5
- 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 +944 -5
- package/dist/components/options-parser-logic.mjs.map +1 -1
- package/dist/components/state-builtin.cjs +630 -8
- 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 +622 -8
- package/dist/components/state-builtin.mjs.map +1 -1
- package/dist/components/usage.cjs +116 -1
- 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 +113 -1
- package/dist/components/usage.mjs.map +1 -1
- package/dist/components/utils-builtin.cjs +839 -33
- 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 +828 -33
- package/dist/components/utils-builtin.mjs.map +1 -1
- package/dist/config.cjs +65 -1
- 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 +62 -1
- package/dist/config.mjs.map +1 -1
- package/dist/contexts/command.cjs +26 -1
- 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 +23 -1
- package/dist/contexts/command.mjs.map +1 -1
- package/dist/contexts/index.cjs +9 -1
- package/dist/contexts/index.mjs +4 -1
- package/dist/contexts/options.cjs +63 -1
- 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 +57 -1
- 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 +70 -1
- package/dist/helpers/automd.cjs.map +1 -0
- package/dist/helpers/automd.mjs +69 -1
- package/dist/helpers/automd.mjs.map +1 -1
- package/dist/helpers/docs-helpers.cjs +23 -1
- package/dist/helpers/docs-helpers.cjs.map +1 -0
- package/dist/helpers/docs-helpers.mjs +22 -1
- 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 +137 -1
- package/dist/helpers/paths.cjs.map +1 -0
- package/dist/helpers/paths.mjs +133 -1
- package/dist/helpers/paths.mjs.map +1 -1
- package/dist/helpers/persistence.cjs +113 -1
- package/dist/helpers/persistence.cjs.map +1 -0
- package/dist/helpers/persistence.mjs +112 -1
- package/dist/helpers/persistence.mjs.map +1 -1
- package/dist/helpers/update-package-json.cjs +65 -1
- package/dist/helpers/update-package-json.cjs.map +1 -0
- package/dist/helpers/update-package-json.mjs +63 -1
- package/dist/helpers/update-package-json.mjs.map +1 -1
- package/dist/helpers/utilities.cjs +95 -1
- package/dist/helpers/utilities.cjs.map +1 -0
- package/dist/helpers/utilities.mjs +93 -1
- package/dist/helpers/utilities.mjs.map +1 -1
- package/dist/helpers/validations.cjs +71 -1
- package/dist/helpers/validations.cjs.map +1 -0
- package/dist/helpers/validations.mjs +69 -1
- package/dist/helpers/validations.mjs.map +1 -1
- package/dist/index.cjs +123 -1
- 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 +119 -1
- 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 +48 -1
- 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 +47 -1
- package/dist/plugin-utils/compute-bin.mjs.map +1 -1
- package/dist/plugin-utils/context-helpers.cjs +224 -1
- 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 +214 -1
- package/dist/plugin-utils/context-helpers.mjs.map +1 -1
- package/dist/plugin-utils/deepkit.cjs +70 -1
- 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 +68 -1
- package/dist/plugin-utils/deepkit.mjs.map +1 -1
- package/dist/plugin-utils/description-helpers.cjs +112 -2
- 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 +107 -2
- package/dist/plugin-utils/description-helpers.mjs.map +1 -1
- package/dist/plugin-utils/get-command-tree.cjs +118 -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 +114 -1
- package/dist/plugin-utils/get-command-tree.mjs.map +1 -1
- package/dist/plugin-utils/index.cjs +39 -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 +10 -1
- package/dist/plugin-utils/reflect.cjs +52 -1
- 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 +50 -1
- package/dist/plugin-utils/reflect.mjs.map +1 -1
- package/dist/plugin-utils/traverse-command-tree.cjs +65 -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 +62 -1
- package/dist/plugin-utils/traverse-command-tree.mjs.map +1 -1
- package/dist/plugin-utils/type-checks.cjs +222 -1
- 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 +217 -1
- package/dist/plugin-utils/type-checks.mjs.map +1 -1
- package/dist/plugin.cjs +495 -4
- 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 +488 -4
- package/dist/plugin.mjs.map +1 -1
- package/dist/resolver/helpers.cjs +182 -1
- package/dist/resolver/helpers.cjs.map +1 -0
- package/dist/resolver/helpers.mjs +178 -1
- package/dist/resolver/helpers.mjs.map +1 -1
- package/dist/resolver/resolve.cjs +479 -1
- package/dist/resolver/resolve.cjs.map +1 -0
- package/dist/resolver/resolve.mjs +478 -1
- package/dist/resolver/resolve.mjs.map +1 -1
- package/dist/types/command.cjs +402 -1
- 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 +367 -1
- package/dist/types/command.mjs.map +1 -1
- package/dist/types/config.cjs +175 -1
- package/dist/types/config.cjs.map +1 -0
- package/dist/types/config.d.cts +19 -12
- package/dist/types/config.d.cts.map +1 -1
- package/dist/types/config.d.mts +19 -12
- package/dist/types/config.d.mts.map +1 -1
- package/dist/types/config.mjs +163 -1
- package/dist/types/config.mjs.map +1 -1
- package/dist/types/context.cjs +45 -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 +40 -1
- package/dist/types/context.mjs.map +1 -1
- package/dist/types/env.cjs +53 -1
- package/dist/types/env.cjs.map +1 -0
- package/dist/types/env.d.cts +1 -1
- package/dist/types/env.d.cts.map +1 -1
- package/dist/types/env.d.mts +1 -1
- package/dist/types/env.d.mts.map +1 -1
- package/dist/types/env.mjs +50 -1
- package/dist/types/env.mjs.map +1 -1
- package/dist/types/index.cjs +53 -1
- package/dist/types/index.d.cts +4 -4
- package/dist/types/index.d.mts +4 -4
- package/dist/types/index.mjs +6 -1
- package/dist/types/options.cjs +13 -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 +10 -1
- package/dist/types/options.mjs.map +1 -1
- package/package.json +43 -34
- package/dist/resolver/deepkit.cjs +0 -1
- package/dist/resolver/deepkit.mjs +0 -2
- package/dist/resolver/deepkit.mjs.map +0 -1
- package/dist/resolver/module.cjs +0 -1
- package/dist/resolver/module.mjs +0 -2
- package/dist/resolver/module.mjs.map +0 -1
|
@@ -1,2 +1,58 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { createNamedContext, useContext } from "@alloy-js/core";
|
|
2
|
+
import { camelCase } from "@stryke/string-format/camel-case";
|
|
3
|
+
import { isSetString } from "@stryke/type-checks/is-set-string";
|
|
4
|
+
import defu$1 from "defu";
|
|
5
|
+
|
|
6
|
+
//#region src/contexts/options.ts
|
|
7
|
+
function __assignType(fn, args) {
|
|
8
|
+
fn.__type = args;
|
|
9
|
+
return fn;
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* The reflection parameter context used in template rendering.
|
|
13
|
+
*/
|
|
14
|
+
const ExistingOptionsContext = (createNamedContext.Ω = [["&F"]], createNamedContext("ExistingOptions", []));
|
|
15
|
+
/**
|
|
16
|
+
* Hook to access the ExistingOptions context.
|
|
17
|
+
*
|
|
18
|
+
* @remarks
|
|
19
|
+
* This context provides a list of option names that already exist on the interface definition.
|
|
20
|
+
*
|
|
21
|
+
* @returns A reactive version of the current reflection.
|
|
22
|
+
*/
|
|
23
|
+
function useExistingOptions() {
|
|
24
|
+
return useContext.Ω = [["&F"]], useContext(ExistingOptionsContext);
|
|
25
|
+
}
|
|
26
|
+
useExistingOptions.__type = [
|
|
27
|
+
"useExistingOptions",
|
|
28
|
+
"Hook to access the ExistingOptions context.",
|
|
29
|
+
"P\"/!?\""
|
|
30
|
+
];
|
|
31
|
+
function computedOptions(options) {
|
|
32
|
+
return options.reduce(__assignType((ret, option) => {
|
|
33
|
+
ret[camelCase(option.name)] ??= defu$1({ name: camelCase(option.name) }, ret[option.name] ?? {}, option);
|
|
34
|
+
if (option.type === "boolean" && !option.variadic && option.isNegativeOf) ret[camelCase(option.isNegativeOf)] = defu$1({ name: camelCase(option.isNegativeOf) }, ret[option.isNegativeOf] ?? {}, {
|
|
35
|
+
...option,
|
|
36
|
+
env: isSetString(option.env) ? `NO_${option.env}` : false,
|
|
37
|
+
description: `${option.description.replace(/\.+$/, "")}. This property is the negative form of ${option.name}.`,
|
|
38
|
+
isNegativeOf: camelCase(option.name),
|
|
39
|
+
default: !option.default
|
|
40
|
+
});
|
|
41
|
+
return ret;
|
|
42
|
+
}, [
|
|
43
|
+
"ret",
|
|
44
|
+
"option",
|
|
45
|
+
"",
|
|
46
|
+
"P\"2!\"2\"\"/#"
|
|
47
|
+
]), {});
|
|
48
|
+
}
|
|
49
|
+
computedOptions.__type = [
|
|
50
|
+
"CommandOption",
|
|
51
|
+
"options",
|
|
52
|
+
"computedOptions",
|
|
53
|
+
"P\"w!F2\"\"/#"
|
|
54
|
+
];
|
|
55
|
+
|
|
56
|
+
//#endregion
|
|
57
|
+
export { ExistingOptionsContext, computedOptions, useExistingOptions };
|
|
2
58
|
//# sourceMappingURL=options.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"options.mjs","names":[],"sources":[
|
|
1
|
+
{"version":3,"file":"options.mjs","names":[],"sources":[],"mappings":""}
|
package/dist/engine.cjs
ADDED
|
@@ -0,0 +1,138 @@
|
|
|
1
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2
|
+
const require_get_framework = require('./helpers/get-framework.cjs');
|
|
3
|
+
let _powerlines_engine = require("@powerlines/engine");
|
|
4
|
+
|
|
5
|
+
//#region src/engine.ts
|
|
6
|
+
/**
|
|
7
|
+
* The Shell Shock Engine class.
|
|
8
|
+
*
|
|
9
|
+
* @remarks
|
|
10
|
+
* This class provides methods to interact with the Shell Shock build system, including cleaning, preparing, linting, building, generating documentation, and finalizing projects.
|
|
11
|
+
*/
|
|
12
|
+
var Engine = class Engine {
|
|
13
|
+
#powerlines;
|
|
14
|
+
/**
|
|
15
|
+
* 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.
|
|
16
|
+
*
|
|
17
|
+
* @param options - The user configuration options.
|
|
18
|
+
* @returns A promise that resolves to a {@link Engine} instance.
|
|
19
|
+
*/
|
|
20
|
+
static async from(options) {
|
|
21
|
+
return new Engine(await (0, _powerlines_engine.createEngine)({
|
|
22
|
+
...options,
|
|
23
|
+
framework: require_get_framework.getFramework()
|
|
24
|
+
}, "@shell-shock/core/api"));
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* 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.
|
|
28
|
+
*
|
|
29
|
+
* @returns The current build context.
|
|
30
|
+
*/
|
|
31
|
+
get context() {
|
|
32
|
+
return this.#powerlines.context;
|
|
33
|
+
}
|
|
34
|
+
constructor(powerlines) {
|
|
35
|
+
this.#powerlines = powerlines;
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* 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.
|
|
39
|
+
*
|
|
40
|
+
* @param inlineConfig - The inline configuration options for the clean operation.
|
|
41
|
+
* @returns A promise that resolves when the clean operation is complete.
|
|
42
|
+
*/
|
|
43
|
+
async clean(inlineConfig) {
|
|
44
|
+
return this.#powerlines.clean(inlineConfig);
|
|
45
|
+
}
|
|
46
|
+
/**
|
|
47
|
+
* 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.
|
|
48
|
+
*
|
|
49
|
+
* @param inlineConfig - The inline configuration options for the prepare operation.
|
|
50
|
+
* @returns A promise that resolves when the prepare operation is complete.
|
|
51
|
+
*/
|
|
52
|
+
async prepare(inlineConfig) {
|
|
53
|
+
return this.#powerlines.prepare(inlineConfig);
|
|
54
|
+
}
|
|
55
|
+
/**
|
|
56
|
+
* 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.
|
|
57
|
+
*
|
|
58
|
+
* @param inlineConfig - The inline configuration options for the lint operation.
|
|
59
|
+
* @returns A promise that resolves when the lint operation is complete.
|
|
60
|
+
*/
|
|
61
|
+
async lint(inlineConfig) {
|
|
62
|
+
return this.#powerlines.lint(inlineConfig);
|
|
63
|
+
}
|
|
64
|
+
/**
|
|
65
|
+
* 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.
|
|
66
|
+
*
|
|
67
|
+
* @param inlineConfig - The inline configuration options for the build operation.
|
|
68
|
+
* @returns A promise that resolves when the build operation is complete.
|
|
69
|
+
*/
|
|
70
|
+
async build(inlineConfig) {
|
|
71
|
+
return this.#powerlines.build(inlineConfig);
|
|
72
|
+
}
|
|
73
|
+
/**
|
|
74
|
+
* 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.
|
|
75
|
+
*
|
|
76
|
+
* @param inlineConfig - The inline configuration options for the documentation operation.
|
|
77
|
+
* @returns A promise that resolves when the documentation generation is complete.
|
|
78
|
+
*/
|
|
79
|
+
async docs(inlineConfig) {
|
|
80
|
+
return this.#powerlines.docs(inlineConfig);
|
|
81
|
+
}
|
|
82
|
+
/**
|
|
83
|
+
* 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.
|
|
84
|
+
*
|
|
85
|
+
* @returns A promise that resolves when the finalize operation is complete.
|
|
86
|
+
*/
|
|
87
|
+
async finalize() {
|
|
88
|
+
return this.#powerlines.finalize();
|
|
89
|
+
}
|
|
90
|
+
static __type = [
|
|
91
|
+
"#powerlines",
|
|
92
|
+
"EngineOptions",
|
|
93
|
+
"options",
|
|
94
|
+
() => Engine,
|
|
95
|
+
"from",
|
|
96
|
+
"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.",
|
|
97
|
+
"powerlines",
|
|
98
|
+
"constructor",
|
|
99
|
+
"inlineConfig",
|
|
100
|
+
"clean",
|
|
101
|
+
"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.",
|
|
102
|
+
"prepare",
|
|
103
|
+
"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.",
|
|
104
|
+
"lint",
|
|
105
|
+
"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.",
|
|
106
|
+
"build",
|
|
107
|
+
"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.",
|
|
108
|
+
"docs",
|
|
109
|
+
"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.",
|
|
110
|
+
"finalize",
|
|
111
|
+
"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.",
|
|
112
|
+
"Engine",
|
|
113
|
+
"The Shell Shock Engine class.",
|
|
114
|
+
"!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"
|
|
115
|
+
];
|
|
116
|
+
};
|
|
117
|
+
/**
|
|
118
|
+
* Creates a new {@link Engine} instance.
|
|
119
|
+
*
|
|
120
|
+
* @param options - The user configuration options.
|
|
121
|
+
* @returns A promise that resolves to a {@link Engine} instance.
|
|
122
|
+
*/
|
|
123
|
+
async function createEngine(options) {
|
|
124
|
+
return Engine.from(options);
|
|
125
|
+
}
|
|
126
|
+
createEngine.__type = [
|
|
127
|
+
"EngineOptions",
|
|
128
|
+
"options",
|
|
129
|
+
() => Engine,
|
|
130
|
+
"createEngine",
|
|
131
|
+
"Creates a new {@link Engine} instance.",
|
|
132
|
+
"P\"w!2\"P7#`/$?%"
|
|
133
|
+
];
|
|
134
|
+
|
|
135
|
+
//#endregion
|
|
136
|
+
exports.Engine = Engine;
|
|
137
|
+
exports.createEngine = createEngine;
|
|
138
|
+
//# sourceMappingURL=engine.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"engine.cjs","names":[],"sources":[],"mappings":""}
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
import { EngineOptions } from "./types/config.cjs";
|
|
2
|
+
import { BuildInlineConfig, CleanInlineConfig, DocsInlineConfig, LintInlineConfig, PrepareInlineConfig } from "powerlines";
|
|
3
|
+
import { EngineContext } from "@powerlines/engine";
|
|
4
|
+
|
|
5
|
+
//#region src/engine.d.ts
|
|
6
|
+
/**
|
|
7
|
+
* The Shell Shock Engine class.
|
|
8
|
+
*
|
|
9
|
+
* @remarks
|
|
10
|
+
* This class provides methods to interact with the Shell Shock build system, including cleaning, preparing, linting, building, generating documentation, and finalizing projects.
|
|
11
|
+
*/
|
|
12
|
+
declare class Engine {
|
|
13
|
+
#private;
|
|
14
|
+
/**
|
|
15
|
+
* 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.
|
|
16
|
+
*
|
|
17
|
+
* @param options - The user configuration options.
|
|
18
|
+
* @returns A promise that resolves to a {@link Engine} instance.
|
|
19
|
+
*/
|
|
20
|
+
static from(options: EngineOptions): Promise<Engine>;
|
|
21
|
+
/**
|
|
22
|
+
* 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.
|
|
23
|
+
*
|
|
24
|
+
* @returns The current build context.
|
|
25
|
+
*/
|
|
26
|
+
get context(): EngineContext;
|
|
27
|
+
private constructor();
|
|
28
|
+
/**
|
|
29
|
+
* 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.
|
|
30
|
+
*
|
|
31
|
+
* @param inlineConfig - The inline configuration options for the clean operation.
|
|
32
|
+
* @returns A promise that resolves when the clean operation is complete.
|
|
33
|
+
*/
|
|
34
|
+
clean(inlineConfig: CleanInlineConfig): Promise<void>;
|
|
35
|
+
/**
|
|
36
|
+
* 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.
|
|
37
|
+
*
|
|
38
|
+
* @param inlineConfig - The inline configuration options for the prepare operation.
|
|
39
|
+
* @returns A promise that resolves when the prepare operation is complete.
|
|
40
|
+
*/
|
|
41
|
+
prepare(inlineConfig: PrepareInlineConfig): Promise<void>;
|
|
42
|
+
/**
|
|
43
|
+
* 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.
|
|
44
|
+
*
|
|
45
|
+
* @param inlineConfig - The inline configuration options for the lint operation.
|
|
46
|
+
* @returns A promise that resolves when the lint operation is complete.
|
|
47
|
+
*/
|
|
48
|
+
lint(inlineConfig: LintInlineConfig): Promise<void>;
|
|
49
|
+
/**
|
|
50
|
+
* 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.
|
|
51
|
+
*
|
|
52
|
+
* @param inlineConfig - The inline configuration options for the build operation.
|
|
53
|
+
* @returns A promise that resolves when the build operation is complete.
|
|
54
|
+
*/
|
|
55
|
+
build(inlineConfig: BuildInlineConfig): Promise<void>;
|
|
56
|
+
/**
|
|
57
|
+
* 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.
|
|
58
|
+
*
|
|
59
|
+
* @param inlineConfig - The inline configuration options for the documentation operation.
|
|
60
|
+
* @returns A promise that resolves when the documentation generation is complete.
|
|
61
|
+
*/
|
|
62
|
+
docs(inlineConfig: DocsInlineConfig): Promise<void>;
|
|
63
|
+
/**
|
|
64
|
+
* 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.
|
|
65
|
+
*
|
|
66
|
+
* @returns A promise that resolves when the finalize operation is complete.
|
|
67
|
+
*/
|
|
68
|
+
finalize(): Promise<void>;
|
|
69
|
+
}
|
|
70
|
+
/**
|
|
71
|
+
* Creates a new {@link Engine} instance.
|
|
72
|
+
*
|
|
73
|
+
* @param options - The user configuration options.
|
|
74
|
+
* @returns A promise that resolves to a {@link Engine} instance.
|
|
75
|
+
*/
|
|
76
|
+
declare function createEngine(options: EngineOptions): Promise<Engine>;
|
|
77
|
+
//#endregion
|
|
78
|
+
export { Engine, createEngine };
|
|
79
|
+
//# sourceMappingURL=engine.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"engine.d.cts","names":[],"sources":["../src/engine.ts"],"mappings":";;;;;;;AAoCA;;;;cAAa,MAAA;EAAA;EA0BW;;;;;;EAAA,OAjBF,IAAA,CAAK,OAAA,EAAS,aAAA,GAAgB,OAAA,CAAQ,MAAA;EA6DzB;;;;;EAAA,IA5CtB,OAAA,IAAW,aAAA;EAAA,QAIf,WAAA;;;;;;;EAUM,KAAA,CAAM,YAAA,EAAc,iBAAA,GAAoB,OAAA;EAd/B;;;;;;EAwBT,OAAA,CAAQ,YAAA,EAAc,mBAAA,GAAsB,OAAA;EAAtB;;;;;;EAUtB,IAAA,CAAK,YAAA,EAAc,gBAAA,GAAmB,OAAA;EAUtC;;;;;;EAAA,KAAA,CAAM,YAAA,EAAc,iBAAA,GAAoB,OAAA;EAUF;;;;AASnB;AAWlC;EApBe,IAAA,CAAK,YAAA,EAAc,gBAAA,GAAmB,OAAA;;;;;;EAStC,QAAA,IAAY,OAAA;AAAA;;;;;AAW+C;;iBAApD,YAAA,CAAa,OAAA,EAAS,aAAA,GAAgB,OAAA,CAAQ,MAAA"}
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
import { EngineOptions } from "./types/config.mjs";
|
|
2
|
+
import { BuildInlineConfig, CleanInlineConfig, DocsInlineConfig, LintInlineConfig, PrepareInlineConfig } from "powerlines";
|
|
3
|
+
import { EngineContext } from "@powerlines/engine";
|
|
4
|
+
|
|
5
|
+
//#region src/engine.d.ts
|
|
6
|
+
/**
|
|
7
|
+
* The Shell Shock Engine class.
|
|
8
|
+
*
|
|
9
|
+
* @remarks
|
|
10
|
+
* This class provides methods to interact with the Shell Shock build system, including cleaning, preparing, linting, building, generating documentation, and finalizing projects.
|
|
11
|
+
*/
|
|
12
|
+
declare class Engine {
|
|
13
|
+
#private;
|
|
14
|
+
/**
|
|
15
|
+
* 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.
|
|
16
|
+
*
|
|
17
|
+
* @param options - The user configuration options.
|
|
18
|
+
* @returns A promise that resolves to a {@link Engine} instance.
|
|
19
|
+
*/
|
|
20
|
+
static from(options: EngineOptions): Promise<Engine>;
|
|
21
|
+
/**
|
|
22
|
+
* 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.
|
|
23
|
+
*
|
|
24
|
+
* @returns The current build context.
|
|
25
|
+
*/
|
|
26
|
+
get context(): EngineContext;
|
|
27
|
+
private constructor();
|
|
28
|
+
/**
|
|
29
|
+
* 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.
|
|
30
|
+
*
|
|
31
|
+
* @param inlineConfig - The inline configuration options for the clean operation.
|
|
32
|
+
* @returns A promise that resolves when the clean operation is complete.
|
|
33
|
+
*/
|
|
34
|
+
clean(inlineConfig: CleanInlineConfig): Promise<void>;
|
|
35
|
+
/**
|
|
36
|
+
* 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.
|
|
37
|
+
*
|
|
38
|
+
* @param inlineConfig - The inline configuration options for the prepare operation.
|
|
39
|
+
* @returns A promise that resolves when the prepare operation is complete.
|
|
40
|
+
*/
|
|
41
|
+
prepare(inlineConfig: PrepareInlineConfig): Promise<void>;
|
|
42
|
+
/**
|
|
43
|
+
* 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.
|
|
44
|
+
*
|
|
45
|
+
* @param inlineConfig - The inline configuration options for the lint operation.
|
|
46
|
+
* @returns A promise that resolves when the lint operation is complete.
|
|
47
|
+
*/
|
|
48
|
+
lint(inlineConfig: LintInlineConfig): Promise<void>;
|
|
49
|
+
/**
|
|
50
|
+
* 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.
|
|
51
|
+
*
|
|
52
|
+
* @param inlineConfig - The inline configuration options for the build operation.
|
|
53
|
+
* @returns A promise that resolves when the build operation is complete.
|
|
54
|
+
*/
|
|
55
|
+
build(inlineConfig: BuildInlineConfig): Promise<void>;
|
|
56
|
+
/**
|
|
57
|
+
* 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.
|
|
58
|
+
*
|
|
59
|
+
* @param inlineConfig - The inline configuration options for the documentation operation.
|
|
60
|
+
* @returns A promise that resolves when the documentation generation is complete.
|
|
61
|
+
*/
|
|
62
|
+
docs(inlineConfig: DocsInlineConfig): Promise<void>;
|
|
63
|
+
/**
|
|
64
|
+
* 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.
|
|
65
|
+
*
|
|
66
|
+
* @returns A promise that resolves when the finalize operation is complete.
|
|
67
|
+
*/
|
|
68
|
+
finalize(): Promise<void>;
|
|
69
|
+
}
|
|
70
|
+
/**
|
|
71
|
+
* Creates a new {@link Engine} instance.
|
|
72
|
+
*
|
|
73
|
+
* @param options - The user configuration options.
|
|
74
|
+
* @returns A promise that resolves to a {@link Engine} instance.
|
|
75
|
+
*/
|
|
76
|
+
declare function createEngine(options: EngineOptions): Promise<Engine>;
|
|
77
|
+
//#endregion
|
|
78
|
+
export { Engine, createEngine };
|
|
79
|
+
//# sourceMappingURL=engine.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"engine.d.mts","names":[],"sources":["../src/engine.ts"],"mappings":""}
|
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 +1,70 @@
|
|
|
1
|
-
|
|
1
|
+
const require_context_helpers = require('../plugin-utils/context-helpers.cjs');
|
|
2
|
+
const require_components_docs = require('../components/docs.cjs');
|
|
3
|
+
require('../plugin-utils/index.cjs');
|
|
4
|
+
let _alloy_js_core_jsx_runtime = require("@alloy-js/core/jsx-runtime");
|
|
5
|
+
let _alloy_js_core = require("@alloy-js/core");
|
|
6
|
+
let _powerlines_plugin_alloy_render = require("@powerlines/plugin-alloy/render");
|
|
7
|
+
let _alloy_js_markdown = require("@alloy-js/markdown");
|
|
8
|
+
let _powerlines_plugin_alloy_core_components_spacing = require("@powerlines/plugin-alloy/core/components/spacing");
|
|
9
|
+
let automd = require("automd");
|
|
10
|
+
|
|
11
|
+
//#region src/helpers/automd.tsx
|
|
12
|
+
function __assignType(fn, args) {
|
|
13
|
+
fn.__type = args;
|
|
14
|
+
return fn;
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* AutoMD generator to generate CLI command documentation
|
|
18
|
+
*
|
|
19
|
+
* @see https://automd.unjs.io/
|
|
20
|
+
*
|
|
21
|
+
* @param context - The generator context.
|
|
22
|
+
* @returns The generated documentation content.
|
|
23
|
+
*/
|
|
24
|
+
const commands = __assignType((context) => (0, automd.defineGenerator)({
|
|
25
|
+
name: "commands",
|
|
26
|
+
async generate() {
|
|
27
|
+
return { contents: (0, _powerlines_plugin_alloy_render.renderString)(context, [
|
|
28
|
+
(0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_markdown.Heading, {
|
|
29
|
+
level: 2,
|
|
30
|
+
children: "Commands"
|
|
31
|
+
}),
|
|
32
|
+
(0, _alloy_js_core_jsx_runtime.createComponent)(_powerlines_plugin_alloy_core_components_spacing.Spacing, {}),
|
|
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:`),
|
|
34
|
+
(0, _alloy_js_core_jsx_runtime.createComponent)(_powerlines_plugin_alloy_core_components_spacing.Spacing, {}),
|
|
35
|
+
(0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_core.For, {
|
|
36
|
+
get each() {
|
|
37
|
+
return Object.values(context.commands);
|
|
38
|
+
},
|
|
39
|
+
doubleHardline: true,
|
|
40
|
+
get children() {
|
|
41
|
+
return __assignType((child) => (0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_core.Show, {
|
|
42
|
+
get when() {
|
|
43
|
+
return !child.virtual;
|
|
44
|
+
},
|
|
45
|
+
get children() {
|
|
46
|
+
return (0, _alloy_js_core_jsx_runtime.createComponent)(require_components_docs.CommandDocs, {
|
|
47
|
+
command: child,
|
|
48
|
+
levelOffset: 2
|
|
49
|
+
});
|
|
50
|
+
}
|
|
51
|
+
}), [
|
|
52
|
+
"child",
|
|
53
|
+
"",
|
|
54
|
+
"P\"2!\"/\""
|
|
55
|
+
]);
|
|
56
|
+
}
|
|
57
|
+
}),
|
|
58
|
+
(0, _alloy_js_core_jsx_runtime.createComponent)(_powerlines_plugin_alloy_core_components_spacing.Spacing, {})
|
|
59
|
+
]) };
|
|
60
|
+
}
|
|
61
|
+
}), [
|
|
62
|
+
"Context",
|
|
63
|
+
"context",
|
|
64
|
+
"",
|
|
65
|
+
"P\"w!2\"\"/#"
|
|
66
|
+
]);
|
|
67
|
+
|
|
68
|
+
//#endregion
|
|
69
|
+
exports.commands = commands;
|
|
70
|
+
//# sourceMappingURL=automd.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"automd.cjs","names":[],"sources":[],"mappings":""}
|