@shell-shock/core 0.17.8 → 0.17.10
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 +148 -1
- package/dist/api.d.cts +6 -6
- package/dist/api.d.cts.map +1 -1
- package/dist/api.d.mts +6 -6
- package/dist/api.d.mts.map +1 -1
- package/dist/api.mjs +145 -1
- package/dist/api.mjs.map +1 -1
- package/dist/components/command-validation-logic.cjs +292 -1
- package/dist/components/command-validation-logic.mjs +289 -1
- package/dist/components/command-validation-logic.mjs.map +1 -1
- package/dist/components/docs.cjs +265 -1
- package/dist/components/docs.mjs +256 -1
- package/dist/components/docs.mjs.map +1 -1
- package/dist/components/exec-builtin.cjs +429 -13
- package/dist/components/exec-builtin.mjs +425 -13
- package/dist/components/exec-builtin.mjs.map +1 -1
- package/dist/components/helpers.cjs +120 -1
- package/dist/components/helpers.mjs +112 -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 +960 -5
- package/dist/components/options-parser-logic.d.cts +1 -1
- package/dist/components/options-parser-logic.mjs +945 -5
- package/dist/components/options-parser-logic.mjs.map +1 -1
- package/dist/components/state-builtin.cjs +629 -8
- package/dist/components/state-builtin.mjs +622 -8
- package/dist/components/state-builtin.mjs.map +1 -1
- package/dist/components/usage.cjs +117 -1
- package/dist/components/usage.mjs +114 -1
- package/dist/components/usage.mjs.map +1 -1
- package/dist/components/utils-builtin.cjs +838 -33
- package/dist/components/utils-builtin.mjs +828 -33
- package/dist/components/utils-builtin.mjs.map +1 -1
- package/dist/config.cjs +31 -1
- package/dist/config.mjs +29 -1
- package/dist/config.mjs.map +1 -1
- package/dist/contexts/command.cjs +26 -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.mjs +58 -1
- package/dist/contexts/options.mjs.map +1 -1
- package/dist/helpers/automd.cjs +71 -1
- package/dist/helpers/automd.mjs +70 -1
- package/dist/helpers/automd.mjs.map +1 -1
- package/dist/helpers/docs-helpers.cjs +23 -1
- package/dist/helpers/docs-helpers.mjs +22 -1
- package/dist/helpers/docs-helpers.mjs.map +1 -1
- package/dist/helpers/paths.cjs +137 -1
- package/dist/helpers/paths.mjs +133 -1
- package/dist/helpers/paths.mjs.map +1 -1
- package/dist/helpers/persistence.cjs +115 -1
- 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.mjs +63 -1
- package/dist/helpers/update-package-json.mjs.map +1 -1
- package/dist/helpers/utilities.cjs +95 -1
- 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.mjs +71 -1
- package/dist/helpers/validations.mjs.map +1 -1
- package/dist/index.cjs +53 -1
- package/dist/index.d.cts +3 -3
- package/dist/index.d.mts +3 -3
- package/dist/index.mjs +7 -1
- package/dist/plugin-utils/compute-bin.cjs +50 -1
- package/dist/plugin-utils/compute-bin.mjs +49 -1
- package/dist/plugin-utils/compute-bin.mjs.map +1 -1
- package/dist/plugin-utils/context-helpers.cjs +231 -1
- package/dist/plugin-utils/context-helpers.mjs +221 -1
- package/dist/plugin-utils/context-helpers.mjs.map +1 -1
- package/dist/plugin-utils/deepkit.cjs +71 -1
- package/dist/plugin-utils/deepkit.mjs +69 -1
- package/dist/plugin-utils/deepkit.mjs.map +1 -1
- package/dist/plugin-utils/description-helpers.cjs +111 -2
- 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 +117 -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.mjs +10 -1
- package/dist/plugin-utils/reflect.cjs +52 -1
- package/dist/plugin-utils/reflect.mjs +52 -1
- package/dist/plugin-utils/reflect.mjs.map +1 -1
- package/dist/plugin-utils/traverse-command-tree.cjs +64 -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 +93 -1
- package/dist/plugin-utils/type-checks.mjs +88 -1
- package/dist/plugin-utils/type-checks.mjs.map +1 -1
- package/dist/plugin.cjs +471 -4
- package/dist/plugin.d.cts.map +1 -1
- package/dist/plugin.d.mts.map +1 -1
- package/dist/plugin.mjs +465 -4
- package/dist/plugin.mjs.map +1 -1
- package/dist/resolver/deepkit.cjs +135 -1
- package/dist/resolver/deepkit.mjs +134 -1
- package/dist/resolver/deepkit.mjs.map +1 -1
- package/dist/resolver/helpers.cjs +173 -1
- package/dist/resolver/helpers.mjs +168 -1
- package/dist/resolver/helpers.mjs.map +1 -1
- package/dist/resolver/module.cjs +145 -1
- package/dist/resolver/module.mjs +144 -1
- package/dist/resolver/module.mjs.map +1 -1
- package/dist/resolver/resolve.cjs +222 -1
- package/dist/resolver/resolve.mjs +221 -1
- package/dist/resolver/resolve.mjs.map +1 -1
- package/dist/types/command.cjs +441 -1
- package/dist/types/command.d.cts +1 -1
- package/dist/types/command.d.mts +2 -2
- package/dist/types/command.mjs +405 -1
- package/dist/types/command.mjs.map +1 -1
- package/dist/types/config.cjs +134 -1
- package/dist/types/config.d.cts +10 -8
- package/dist/types/config.d.cts.map +1 -1
- package/dist/types/config.d.mts +10 -8
- package/dist/types/config.d.mts.map +1 -1
- package/dist/types/config.mjs +127 -1
- package/dist/types/config.mjs.map +1 -1
- package/dist/types/context.cjs +37 -1
- package/dist/types/context.mjs +34 -1
- package/dist/types/context.mjs.map +1 -1
- package/dist/types/env.cjs +52 -1
- package/dist/types/env.d.cts +1 -1
- package/dist/types/env.d.mts +1 -1
- package/dist/types/env.mjs +50 -1
- package/dist/types/env.mjs.map +1 -1
- package/dist/types/index.cjs +50 -1
- package/dist/types/index.d.cts +2 -2
- package/dist/types/index.d.mts +2 -2
- package/dist/types/index.mjs +6 -1
- package/dist/types/options.cjs +12 -1
- package/dist/types/options.mjs +10 -1
- package/package.json +22 -21
|
@@ -1 +1,29 @@
|
|
|
1
|
-
|
|
1
|
+
//#region \0rolldown/runtime.js
|
|
2
|
+
var __create = Object.create;
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
+
var __copyProps = (to, from, except, desc) => {
|
|
9
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
10
|
+
for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) {
|
|
11
|
+
key = keys[i];
|
|
12
|
+
if (!__hasOwnProp.call(to, key) && key !== except) {
|
|
13
|
+
__defProp(to, key, {
|
|
14
|
+
get: ((k) => from[k]).bind(null, key),
|
|
15
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
16
|
+
});
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
return to;
|
|
21
|
+
};
|
|
22
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
|
|
23
|
+
value: mod,
|
|
24
|
+
enumerable: true
|
|
25
|
+
}) : target, mod));
|
|
26
|
+
|
|
27
|
+
//#endregion
|
|
28
|
+
|
|
29
|
+
exports.__toESM = __toESM;
|
package/dist/api.cjs
CHANGED
|
@@ -1 +1,148 @@
|
|
|
1
|
-
Object.defineProperty(exports,Symbol.toStringTag,
|
|
1
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2
|
+
const require_runtime = require('./_virtual/_rolldown/runtime.cjs');
|
|
3
|
+
const require_plugin = require('./plugin.cjs');
|
|
4
|
+
let powerlines_api = require("powerlines/api");
|
|
5
|
+
|
|
6
|
+
//#region src/api.ts
|
|
7
|
+
/**
|
|
8
|
+
* The Shell Shock API class.
|
|
9
|
+
*
|
|
10
|
+
* @remarks
|
|
11
|
+
* This class provides methods to interact with the Shell Shock build system, including cleaning, preparing, linting, building, generating documentation, and finalizing projects.
|
|
12
|
+
*/
|
|
13
|
+
var ShellShockAPI = class ShellShockAPI {
|
|
14
|
+
#powerlines;
|
|
15
|
+
/**
|
|
16
|
+
* Creates a new instance of the {@link ShellShockAPI} class using the provided configuration options. This method initializes the underlying Powerlines API with the appropriate plugins and settings for Shell Shock.
|
|
17
|
+
*
|
|
18
|
+
* @param options - The user configuration options.
|
|
19
|
+
* @returns A promise that resolves to a {@link ShellShockAPI} instance.
|
|
20
|
+
*/
|
|
21
|
+
static async from(options) {
|
|
22
|
+
const { name, root, cwd, mode, logLevel, organization, configFile, ...pluginOptions } = options;
|
|
23
|
+
return new ShellShockAPI(await powerlines_api.PowerlinesAPI.from({
|
|
24
|
+
name,
|
|
25
|
+
root,
|
|
26
|
+
cwd: cwd || process.cwd(),
|
|
27
|
+
mode,
|
|
28
|
+
logLevel,
|
|
29
|
+
organization,
|
|
30
|
+
configFile,
|
|
31
|
+
framework: "shell-shock"
|
|
32
|
+
}, {
|
|
33
|
+
plugins: [require_plugin.default(pluginOptions)],
|
|
34
|
+
framework: "shell-shock"
|
|
35
|
+
}));
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* 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.
|
|
39
|
+
*
|
|
40
|
+
* @returns The current build context.
|
|
41
|
+
*/
|
|
42
|
+
get context() {
|
|
43
|
+
return this.#powerlines.context;
|
|
44
|
+
}
|
|
45
|
+
constructor(powerlines) {
|
|
46
|
+
this.#powerlines = powerlines;
|
|
47
|
+
}
|
|
48
|
+
/**
|
|
49
|
+
* 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.
|
|
50
|
+
*
|
|
51
|
+
* @param inlineConfig - The inline configuration options for the clean operation.
|
|
52
|
+
* @returns A promise that resolves when the clean operation is complete.
|
|
53
|
+
*/
|
|
54
|
+
async clean(inlineConfig) {
|
|
55
|
+
return this.#powerlines.clean(inlineConfig);
|
|
56
|
+
}
|
|
57
|
+
/**
|
|
58
|
+
* 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.
|
|
59
|
+
*
|
|
60
|
+
* @param inlineConfig - The inline configuration options for the prepare operation.
|
|
61
|
+
* @returns A promise that resolves when the prepare operation is complete.
|
|
62
|
+
*/
|
|
63
|
+
async prepare(inlineConfig) {
|
|
64
|
+
return this.#powerlines.prepare(inlineConfig);
|
|
65
|
+
}
|
|
66
|
+
/**
|
|
67
|
+
* 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.
|
|
68
|
+
*
|
|
69
|
+
* @param inlineConfig - The inline configuration options for the lint operation.
|
|
70
|
+
* @returns A promise that resolves when the lint operation is complete.
|
|
71
|
+
*/
|
|
72
|
+
async lint(inlineConfig) {
|
|
73
|
+
return this.#powerlines.lint(inlineConfig);
|
|
74
|
+
}
|
|
75
|
+
/**
|
|
76
|
+
* 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.
|
|
77
|
+
*
|
|
78
|
+
* @param inlineConfig - The inline configuration options for the build operation.
|
|
79
|
+
* @returns A promise that resolves when the build operation is complete.
|
|
80
|
+
*/
|
|
81
|
+
async build(inlineConfig) {
|
|
82
|
+
return this.#powerlines.build(inlineConfig);
|
|
83
|
+
}
|
|
84
|
+
/**
|
|
85
|
+
* 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.
|
|
86
|
+
*
|
|
87
|
+
* @param inlineConfig - The inline configuration options for the documentation operation.
|
|
88
|
+
* @returns A promise that resolves when the documentation generation is complete.
|
|
89
|
+
*/
|
|
90
|
+
async docs(inlineConfig) {
|
|
91
|
+
return this.#powerlines.docs(inlineConfig);
|
|
92
|
+
}
|
|
93
|
+
/**
|
|
94
|
+
* 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.
|
|
95
|
+
*
|
|
96
|
+
* @returns A promise that resolves when the finalize operation is complete.
|
|
97
|
+
*/
|
|
98
|
+
async finalize() {
|
|
99
|
+
return this.#powerlines.finalize();
|
|
100
|
+
}
|
|
101
|
+
static __type = [
|
|
102
|
+
"#powerlines",
|
|
103
|
+
"EngineOptions",
|
|
104
|
+
"options",
|
|
105
|
+
() => ShellShockAPI,
|
|
106
|
+
"from",
|
|
107
|
+
"Creates a new instance of the {@link ShellShockAPI} class using the provided configuration options. This method initializes the underlying Powerlines API with the appropriate plugins and settings for Shell Shock.",
|
|
108
|
+
"powerlines",
|
|
109
|
+
"constructor",
|
|
110
|
+
"inlineConfig",
|
|
111
|
+
"clean",
|
|
112
|
+
"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.",
|
|
113
|
+
"prepare",
|
|
114
|
+
"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.",
|
|
115
|
+
"lint",
|
|
116
|
+
"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.",
|
|
117
|
+
"build",
|
|
118
|
+
"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.",
|
|
119
|
+
"docs",
|
|
120
|
+
"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.",
|
|
121
|
+
"finalize",
|
|
122
|
+
"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.",
|
|
123
|
+
"ShellShockAPI",
|
|
124
|
+
"The Shell Shock API class.",
|
|
125
|
+
"!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"
|
|
126
|
+
];
|
|
127
|
+
};
|
|
128
|
+
/**
|
|
129
|
+
* Creates a new {@link ShellShockAPI} instance.
|
|
130
|
+
*
|
|
131
|
+
* @param options - The user configuration options.
|
|
132
|
+
* @returns A promise that resolves to a {@link ShellShockAPI} instance.
|
|
133
|
+
*/
|
|
134
|
+
async function createShellShock(options) {
|
|
135
|
+
return ShellShockAPI.from(options);
|
|
136
|
+
}
|
|
137
|
+
createShellShock.__type = [
|
|
138
|
+
"EngineOptions",
|
|
139
|
+
"options",
|
|
140
|
+
() => ShellShockAPI,
|
|
141
|
+
"createShellShock",
|
|
142
|
+
"Creates a new {@link ShellShockAPI} instance.",
|
|
143
|
+
"P\"w!2\"P7#`/$?%"
|
|
144
|
+
];
|
|
145
|
+
|
|
146
|
+
//#endregion
|
|
147
|
+
exports.ShellShockAPI = ShellShockAPI;
|
|
148
|
+
exports.createShellShock = createShellShock;
|
package/dist/api.d.cts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { BuildInlineConfig, CleanInlineConfig, DocsInlineConfig,
|
|
3
|
-
import {
|
|
1
|
+
import { EngineOptions as EngineOptions$1 } from "./types/config.cjs";
|
|
2
|
+
import { BuildInlineConfig, CleanInlineConfig, DocsInlineConfig, LintInlineConfig, PrepareInlineConfig } from "powerlines";
|
|
3
|
+
import { PowerlinesExecutionContext } from "powerlines/context";
|
|
4
4
|
|
|
5
5
|
//#region src/api.d.ts
|
|
6
6
|
/**
|
|
@@ -17,13 +17,13 @@ declare class ShellShockAPI {
|
|
|
17
17
|
* @param options - The user configuration options.
|
|
18
18
|
* @returns A promise that resolves to a {@link ShellShockAPI} instance.
|
|
19
19
|
*/
|
|
20
|
-
static
|
|
20
|
+
static from(options: EngineOptions$1): Promise<ShellShockAPI>;
|
|
21
21
|
/**
|
|
22
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
23
|
*
|
|
24
24
|
* @returns The current build context.
|
|
25
25
|
*/
|
|
26
|
-
get context():
|
|
26
|
+
get context(): PowerlinesExecutionContext;
|
|
27
27
|
private constructor();
|
|
28
28
|
/**
|
|
29
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.
|
|
@@ -73,7 +73,7 @@ declare class ShellShockAPI {
|
|
|
73
73
|
* @param options - The user configuration options.
|
|
74
74
|
* @returns A promise that resolves to a {@link ShellShockAPI} instance.
|
|
75
75
|
*/
|
|
76
|
-
declare function createShellShock(options:
|
|
76
|
+
declare function createShellShock(options: EngineOptions$1): Promise<ShellShockAPI>;
|
|
77
77
|
//#endregion
|
|
78
78
|
export { ShellShockAPI, createShellShock };
|
|
79
79
|
//# sourceMappingURL=api.d.cts.map
|
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;EA8CW;;;;;;EAAA,OArCF,IAAA,CAAK,OAAA,EAAS,eAAA,GAAgB,OAAA,CAAQ,aAAA;EAiFzB;;;;;EAAA,IA5CtB,OAAA,CAAA,GAAW,0BAAA;EAAA,QAIf,WAAA,CAAA;;;;;;;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;;;;;AAoBrD;EApBe,IAAA,CAAK,YAAA,EAAc,gBAAA,GAAmB,OAAA;;;;;;EAStC,QAAA,CAAA,GAAY,OAAA;AAAA;;;;;;;iBAWL,gBAAA,CACpB,OAAA,EAAS,eAAA,GACR,OAAA,CAAQ,aAAA"}
|
package/dist/api.d.mts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { BuildInlineConfig, CleanInlineConfig, DocsInlineConfig,
|
|
3
|
-
import {
|
|
1
|
+
import { EngineOptions as EngineOptions$1 } from "./types/config.mjs";
|
|
2
|
+
import { BuildInlineConfig, CleanInlineConfig, DocsInlineConfig, LintInlineConfig, PrepareInlineConfig } from "powerlines";
|
|
3
|
+
import { PowerlinesExecutionContext } from "powerlines/context";
|
|
4
4
|
|
|
5
5
|
//#region src/api.d.ts
|
|
6
6
|
/**
|
|
@@ -17,13 +17,13 @@ declare class ShellShockAPI {
|
|
|
17
17
|
* @param options - The user configuration options.
|
|
18
18
|
* @returns A promise that resolves to a {@link ShellShockAPI} instance.
|
|
19
19
|
*/
|
|
20
|
-
static
|
|
20
|
+
static from(options: EngineOptions$1): Promise<ShellShockAPI>;
|
|
21
21
|
/**
|
|
22
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
23
|
*
|
|
24
24
|
* @returns The current build context.
|
|
25
25
|
*/
|
|
26
|
-
get context():
|
|
26
|
+
get context(): PowerlinesExecutionContext;
|
|
27
27
|
private constructor();
|
|
28
28
|
/**
|
|
29
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.
|
|
@@ -73,7 +73,7 @@ declare class ShellShockAPI {
|
|
|
73
73
|
* @param options - The user configuration options.
|
|
74
74
|
* @returns A promise that resolves to a {@link ShellShockAPI} instance.
|
|
75
75
|
*/
|
|
76
|
-
declare function createShellShock(options:
|
|
76
|
+
declare function createShellShock(options: EngineOptions$1): Promise<ShellShockAPI>;
|
|
77
77
|
//#endregion
|
|
78
78
|
export { ShellShockAPI, createShellShock };
|
|
79
79
|
//# sourceMappingURL=api.d.mts.map
|
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;EA8CW;;;;;;EAAA,OArCF,IAAA,CAAK,OAAA,EAAS,eAAA,GAAgB,OAAA,CAAQ,aAAA;EAiFzB;;;;;EAAA,IA5CtB,OAAA,CAAA,GAAW,0BAAA;EAAA,QAIf,WAAA,CAAA;;;;;;;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;;;;;AAoBrD;EApBe,IAAA,CAAK,YAAA,EAAc,gBAAA,GAAmB,OAAA;;;;;;EAStC,QAAA,CAAA,GAAY,OAAA;AAAA;;;;;;;iBAWL,gBAAA,CACpB,OAAA,EAAS,eAAA,GACR,OAAA,CAAQ,aAAA"}
|
package/dist/api.mjs
CHANGED
|
@@ -1,2 +1,146 @@
|
|
|
1
|
-
import
|
|
1
|
+
import plugin from "./plugin.mjs";
|
|
2
|
+
import { PowerlinesAPI } from "powerlines/api";
|
|
3
|
+
|
|
4
|
+
//#region src/api.ts
|
|
5
|
+
/**
|
|
6
|
+
* The Shell Shock API 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 ShellShockAPI = class ShellShockAPI {
|
|
12
|
+
#powerlines;
|
|
13
|
+
/**
|
|
14
|
+
* Creates a new instance of the {@link ShellShockAPI} 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 ShellShockAPI} instance.
|
|
18
|
+
*/
|
|
19
|
+
static async from(options) {
|
|
20
|
+
const { name, root, cwd, mode, logLevel, organization, configFile, ...pluginOptions } = options;
|
|
21
|
+
return new ShellShockAPI(await PowerlinesAPI.from({
|
|
22
|
+
name,
|
|
23
|
+
root,
|
|
24
|
+
cwd: cwd || process.cwd(),
|
|
25
|
+
mode,
|
|
26
|
+
logLevel,
|
|
27
|
+
organization,
|
|
28
|
+
configFile,
|
|
29
|
+
framework: "shell-shock"
|
|
30
|
+
}, {
|
|
31
|
+
plugins: [plugin(pluginOptions)],
|
|
32
|
+
framework: "shell-shock"
|
|
33
|
+
}));
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* 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.
|
|
37
|
+
*
|
|
38
|
+
* @returns The current build context.
|
|
39
|
+
*/
|
|
40
|
+
get context() {
|
|
41
|
+
return this.#powerlines.context;
|
|
42
|
+
}
|
|
43
|
+
constructor(powerlines) {
|
|
44
|
+
this.#powerlines = powerlines;
|
|
45
|
+
}
|
|
46
|
+
/**
|
|
47
|
+
* 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.
|
|
48
|
+
*
|
|
49
|
+
* @param inlineConfig - The inline configuration options for the clean operation.
|
|
50
|
+
* @returns A promise that resolves when the clean operation is complete.
|
|
51
|
+
*/
|
|
52
|
+
async clean(inlineConfig) {
|
|
53
|
+
return this.#powerlines.clean(inlineConfig);
|
|
54
|
+
}
|
|
55
|
+
/**
|
|
56
|
+
* 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.
|
|
57
|
+
*
|
|
58
|
+
* @param inlineConfig - The inline configuration options for the prepare operation.
|
|
59
|
+
* @returns A promise that resolves when the prepare operation is complete.
|
|
60
|
+
*/
|
|
61
|
+
async prepare(inlineConfig) {
|
|
62
|
+
return this.#powerlines.prepare(inlineConfig);
|
|
63
|
+
}
|
|
64
|
+
/**
|
|
65
|
+
* 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.
|
|
66
|
+
*
|
|
67
|
+
* @param inlineConfig - The inline configuration options for the lint operation.
|
|
68
|
+
* @returns A promise that resolves when the lint operation is complete.
|
|
69
|
+
*/
|
|
70
|
+
async lint(inlineConfig) {
|
|
71
|
+
return this.#powerlines.lint(inlineConfig);
|
|
72
|
+
}
|
|
73
|
+
/**
|
|
74
|
+
* 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.
|
|
75
|
+
*
|
|
76
|
+
* @param inlineConfig - The inline configuration options for the build operation.
|
|
77
|
+
* @returns A promise that resolves when the build operation is complete.
|
|
78
|
+
*/
|
|
79
|
+
async build(inlineConfig) {
|
|
80
|
+
return this.#powerlines.build(inlineConfig);
|
|
81
|
+
}
|
|
82
|
+
/**
|
|
83
|
+
* 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.
|
|
84
|
+
*
|
|
85
|
+
* @param inlineConfig - The inline configuration options for the documentation operation.
|
|
86
|
+
* @returns A promise that resolves when the documentation generation is complete.
|
|
87
|
+
*/
|
|
88
|
+
async docs(inlineConfig) {
|
|
89
|
+
return this.#powerlines.docs(inlineConfig);
|
|
90
|
+
}
|
|
91
|
+
/**
|
|
92
|
+
* 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.
|
|
93
|
+
*
|
|
94
|
+
* @returns A promise that resolves when the finalize operation is complete.
|
|
95
|
+
*/
|
|
96
|
+
async finalize() {
|
|
97
|
+
return this.#powerlines.finalize();
|
|
98
|
+
}
|
|
99
|
+
static __type = [
|
|
100
|
+
"#powerlines",
|
|
101
|
+
"EngineOptions",
|
|
102
|
+
"options",
|
|
103
|
+
() => ShellShockAPI,
|
|
104
|
+
"from",
|
|
105
|
+
"Creates a new instance of the {@link ShellShockAPI} class using the provided configuration options. This method initializes the underlying Powerlines API with the appropriate plugins and settings for Shell Shock.",
|
|
106
|
+
"powerlines",
|
|
107
|
+
"constructor",
|
|
108
|
+
"inlineConfig",
|
|
109
|
+
"clean",
|
|
110
|
+
"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.",
|
|
111
|
+
"prepare",
|
|
112
|
+
"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.",
|
|
113
|
+
"lint",
|
|
114
|
+
"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.",
|
|
115
|
+
"build",
|
|
116
|
+
"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.",
|
|
117
|
+
"docs",
|
|
118
|
+
"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.",
|
|
119
|
+
"finalize",
|
|
120
|
+
"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.",
|
|
121
|
+
"ShellShockAPI",
|
|
122
|
+
"The Shell Shock API class.",
|
|
123
|
+
"!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"
|
|
124
|
+
];
|
|
125
|
+
};
|
|
126
|
+
/**
|
|
127
|
+
* Creates a new {@link ShellShockAPI} instance.
|
|
128
|
+
*
|
|
129
|
+
* @param options - The user configuration options.
|
|
130
|
+
* @returns A promise that resolves to a {@link ShellShockAPI} instance.
|
|
131
|
+
*/
|
|
132
|
+
async function createShellShock(options) {
|
|
133
|
+
return ShellShockAPI.from(options);
|
|
134
|
+
}
|
|
135
|
+
createShellShock.__type = [
|
|
136
|
+
"EngineOptions",
|
|
137
|
+
"options",
|
|
138
|
+
() => ShellShockAPI,
|
|
139
|
+
"createShellShock",
|
|
140
|
+
"Creates a new {@link ShellShockAPI} instance.",
|
|
141
|
+
"P\"w!2\"P7#`/$?%"
|
|
142
|
+
];
|
|
143
|
+
|
|
144
|
+
//#endregion
|
|
145
|
+
export { ShellShockAPI, createShellShock };
|
|
2
146
|
//# sourceMappingURL=api.mjs.map
|
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 {
|
|
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 PrepareInlineConfig\n} from \"powerlines\";\nimport { PowerlinesAPI } from \"powerlines/api\";\nimport type { PowerlinesExecutionContext } from \"powerlines/context\";\nimport { plugin } from \"./plugin\";\nimport type { EngineOptions } 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 /**\n * Creates a new instance of the {@link ShellShockAPI} class using the provided configuration options. This method initializes the underlying Powerlines API with the appropriate plugins and settings for Shell Shock.\n *\n * @param options - The user configuration options.\n * @returns A promise that resolves to a {@link ShellShockAPI} instance.\n */\n public static async from(options: EngineOptions): Promise<ShellShockAPI> {\n const {\n name,\n root,\n cwd,\n mode,\n logLevel,\n organization,\n configFile,\n ...pluginOptions\n } = options;\n\n const powerlines = await PowerlinesAPI.from(\n {\n name,\n root,\n cwd: cwd || process.cwd(),\n mode,\n logLevel,\n organization,\n configFile,\n framework: \"shell-shock\"\n },\n {\n plugins: [plugin(pluginOptions)],\n framework: \"shell-shock\"\n }\n );\n\n return new ShellShockAPI(powerlines);\n }\n\n /**\n * 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.\n *\n * @returns The current build context.\n */\n public get context(): PowerlinesExecutionContext {\n return this.#powerlines.context;\n }\n\n private constructor(powerlines: PowerlinesAPI) {\n this.#powerlines = powerlines;\n }\n\n /**\n * 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.\n *\n * @param inlineConfig - The inline configuration options for the clean operation.\n * @returns A promise that resolves when the clean operation is complete.\n */\n public async clean(inlineConfig: CleanInlineConfig): Promise<void> {\n return this.#powerlines.clean(inlineConfig);\n }\n\n /**\n * 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.\n *\n * @param inlineConfig - The inline configuration options for the prepare operation.\n * @returns A promise that resolves when the prepare operation is complete.\n */\n public async prepare(inlineConfig: PrepareInlineConfig): Promise<void> {\n return this.#powerlines.prepare(inlineConfig);\n }\n\n /**\n * 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.\n *\n * @param inlineConfig - The inline configuration options for the lint operation.\n * @returns A promise that resolves when the lint operation is complete.\n */\n public async lint(inlineConfig: LintInlineConfig): Promise<void> {\n return this.#powerlines.lint(inlineConfig);\n }\n\n /**\n * 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.\n *\n * @param inlineConfig - The inline configuration options for the build operation.\n * @returns A promise that resolves when the build operation is complete.\n */\n public async build(inlineConfig: BuildInlineConfig): Promise<void> {\n return this.#powerlines.build(inlineConfig);\n }\n\n /**\n * 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.\n *\n * @param inlineConfig - The inline configuration options for the documentation operation.\n * @returns A promise that resolves when the documentation generation is complete.\n */\n public async docs(inlineConfig: DocsInlineConfig): Promise<void> {\n return this.#powerlines.docs(inlineConfig);\n }\n\n /**\n * 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.\n *\n * @returns A promise that resolves when the finalize operation is complete.\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: EngineOptions\n): Promise<ShellShockAPI> {\n return ShellShockAPI.from(options);\n}\n"],"mappings":";;;;;;;;;;AAyBA,IAAS,gBAAT,MAAS,cAAgB;CACzB;;;;;;;CAOE,aAAE,KAAA,SAAA;EACD,MAAK,EACN,MACI,MACH,WAEC,UACC,cACF,YACG,GAAA,kBACA;AAcF,SAAM,IAAA,cAAmB,MAbzB,cAAA,KAAA;GACF;GACE;GACE,KAAI,OAAA,QAAA,KAAA;GACJ;GACA;GACA;GACA;GACA,WAAA;GACD,EAAC;GACA,SAAG,CAAA,OAAA,cAAA,CAAA;GACH,WAAS;KAEc;;;;;;;CAO3B,IAAI,UAAE;AACJ,SAAI,MAAA,WAAU;;CAEhB,YAAK,YAAA;AACH,QAAE,aAAA;;;;;;;;;AASF,SAAA,MAAA,WAAA,MAAA,aAAA;;;;;;;;;AASF,SAAQ,MAAA,WAAY,QAAY,aAAe;;;;;;;;CAQ/C,MAAI,KAAO,cAAW;AACpB,SAAA,MAAA,WAAA,KAAA,aAAA;;;;;;;;CAQF,MAAI,MAAM,cAAe;AACvB,SAAE,MAAU,WAAY,MAAC,aAAkB;;;;;;;;CAQ7C,MAAC,KAAA,cAAA;AACC,SAAO,MAAC,WAAe,KAAI,aAAO;;;;;;;CAOpC,MAAE,WAAA;AACA,SAAC,MAAS,WAAU,UAAa;;CAEnC,OAAI,SAAM;EAAA;EAAmB;EAAoB;QAAiB;EAAe;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;;;;;;;;AAQnF,eAAkB,iBAAc,SAAgB;AAC9C,QAAC,cAAA,KAAA,QAAA;;AAEH,iBAAgB,SAAQ;CAAA;CAAmB;OAAkB;CAAc;CAAQ;CAAA;CAAA"}
|