@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 +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,36 @@
|
|
|
1
|
-
|
|
1
|
+
const require_package = require('./package.cjs');
|
|
2
|
+
const require_plugin = require('./plugin.cjs');
|
|
3
|
+
let powerlines_api_build = require("powerlines/api/build");
|
|
4
|
+
let powerlines_api_clean = require("powerlines/api/clean");
|
|
5
|
+
let powerlines_api_create = require("powerlines/api/create");
|
|
6
|
+
let powerlines_api_deploy = require("powerlines/api/deploy");
|
|
7
|
+
let powerlines_api_docs = require("powerlines/api/docs");
|
|
8
|
+
let powerlines_api_lint = require("powerlines/api/lint");
|
|
9
|
+
let powerlines_api_prepare = require("powerlines/api/prepare");
|
|
10
|
+
let powerlines_api_test = require("powerlines/api/test");
|
|
11
|
+
let powerlines_api_types = require("powerlines/api/types");
|
|
12
|
+
let powerlines_helpers = require("powerlines/helpers");
|
|
13
|
+
|
|
14
|
+
//#region src/api.ts
|
|
15
|
+
var api_default = (0, powerlines_helpers.createApi)({
|
|
16
|
+
types: powerlines_api_types.types,
|
|
17
|
+
prepare: powerlines_api_prepare.prepare,
|
|
18
|
+
create: powerlines_api_create.create,
|
|
19
|
+
clean: powerlines_api_clean.clean,
|
|
20
|
+
lint: powerlines_api_lint.lint,
|
|
21
|
+
test: powerlines_api_test.test,
|
|
22
|
+
build: powerlines_api_build.build,
|
|
23
|
+
docs: powerlines_api_docs.docs,
|
|
24
|
+
deploy: powerlines_api_deploy.deploy
|
|
25
|
+
}, {
|
|
26
|
+
plugins: [require_plugin.default()],
|
|
27
|
+
framework: {
|
|
28
|
+
name: "shell-shock",
|
|
29
|
+
version: require_package.version,
|
|
30
|
+
orgId: "storm-software"
|
|
31
|
+
}
|
|
32
|
+
});
|
|
33
|
+
|
|
34
|
+
//#endregion
|
|
35
|
+
module.exports = api_default;
|
|
36
|
+
//# sourceMappingURL=api.cjs.map
|
package/dist/api.cjs.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"api.cjs","names":[],"sources":[],"mappings":""}
|
package/dist/api.d.cts
CHANGED
|
@@ -1,79 +1,4 @@
|
|
|
1
|
-
import * as _$powerlines from "powerlines";
|
|
2
|
-
import { BuildInlineConfig, CleanInlineConfig, DocsInlineConfig, EngineOptions, LintInlineConfig, PrepareInlineConfig } from "powerlines";
|
|
3
|
-
import { PartialKeys } from "@stryke/types";
|
|
4
|
-
|
|
5
1
|
//#region src/api.d.ts
|
|
6
|
-
|
|
7
|
-
|
|
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 ShellShockAPI {
|
|
13
|
-
#private;
|
|
14
|
-
/**
|
|
15
|
-
* 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.
|
|
16
|
-
*
|
|
17
|
-
* @param options - The user configuration options.
|
|
18
|
-
* @returns A promise that resolves to a {@link ShellShockAPI} instance.
|
|
19
|
-
*/
|
|
20
|
-
static fromOptions(options: EngineOptions): Promise<ShellShockAPI>;
|
|
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(): _$powerlines.ExecutionContext<_$powerlines.ResolvedConfig>;
|
|
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 ShellShockAPI} instance.
|
|
72
|
-
*
|
|
73
|
-
* @param options - The user configuration options.
|
|
74
|
-
* @returns A promise that resolves to a {@link ShellShockAPI} instance.
|
|
75
|
-
*/
|
|
76
|
-
declare function createShellShock(options: PartialKeys<EngineOptions, "cwd" | "framework">): Promise<ShellShockAPI>;
|
|
77
|
-
//#endregion
|
|
78
|
-
export { ShellShockAPI, createShellShock };
|
|
2
|
+
declare const _default: (params: import("@powerlines/engine").ExecutionApiParams<import("powerlines").ExecutionOptions, "types" | "docs" | "create" | "clean" | "prepare" | "lint" | "test" | "build" | "deploy">) => Promise<void>;
|
|
3
|
+
export = _default;
|
|
79
4
|
//# 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":""}
|
package/dist/api.d.mts
CHANGED
|
@@ -1,79 +1,5 @@
|
|
|
1
|
-
import * as _$powerlines from "powerlines";
|
|
2
|
-
import { BuildInlineConfig, CleanInlineConfig, DocsInlineConfig, EngineOptions, LintInlineConfig, PrepareInlineConfig } from "powerlines";
|
|
3
|
-
import { PartialKeys } from "@stryke/types";
|
|
4
|
-
|
|
5
1
|
//#region src/api.d.ts
|
|
6
|
-
|
|
7
|
-
* The Shell Shock API 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 ShellShockAPI {
|
|
13
|
-
#private;
|
|
14
|
-
/**
|
|
15
|
-
* 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.
|
|
16
|
-
*
|
|
17
|
-
* @param options - The user configuration options.
|
|
18
|
-
* @returns A promise that resolves to a {@link ShellShockAPI} instance.
|
|
19
|
-
*/
|
|
20
|
-
static fromOptions(options: EngineOptions): Promise<ShellShockAPI>;
|
|
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(): _$powerlines.ExecutionContext<_$powerlines.ResolvedConfig>;
|
|
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 ShellShockAPI} instance.
|
|
72
|
-
*
|
|
73
|
-
* @param options - The user configuration options.
|
|
74
|
-
* @returns A promise that resolves to a {@link ShellShockAPI} instance.
|
|
75
|
-
*/
|
|
76
|
-
declare function createShellShock(options: PartialKeys<EngineOptions, "cwd" | "framework">): Promise<ShellShockAPI>;
|
|
2
|
+
declare const _default: (params: import("@powerlines/engine").ExecutionApiParams<import("powerlines").ExecutionOptions, "types" | "docs" | "create" | "clean" | "prepare" | "lint" | "test" | "build" | "deploy">) => Promise<void>;
|
|
77
3
|
//#endregion
|
|
78
|
-
export {
|
|
4
|
+
export { _default as default };
|
|
79
5
|
//# 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":""}
|
package/dist/api.mjs
CHANGED
|
@@ -1,2 +1,36 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { version } from "./package.mjs";
|
|
2
|
+
import plugin from "./plugin.mjs";
|
|
3
|
+
import { build } from "powerlines/api/build";
|
|
4
|
+
import { clean } from "powerlines/api/clean";
|
|
5
|
+
import { create } from "powerlines/api/create";
|
|
6
|
+
import { deploy } from "powerlines/api/deploy";
|
|
7
|
+
import { docs } from "powerlines/api/docs";
|
|
8
|
+
import { lint } from "powerlines/api/lint";
|
|
9
|
+
import { prepare } from "powerlines/api/prepare";
|
|
10
|
+
import { test } from "powerlines/api/test";
|
|
11
|
+
import { types } from "powerlines/api/types";
|
|
12
|
+
import { createApi } from "powerlines/helpers";
|
|
13
|
+
|
|
14
|
+
//#region src/api.ts
|
|
15
|
+
var api_default = createApi({
|
|
16
|
+
types,
|
|
17
|
+
prepare,
|
|
18
|
+
create,
|
|
19
|
+
clean,
|
|
20
|
+
lint,
|
|
21
|
+
test,
|
|
22
|
+
build,
|
|
23
|
+
docs,
|
|
24
|
+
deploy
|
|
25
|
+
}, {
|
|
26
|
+
plugins: [plugin()],
|
|
27
|
+
framework: {
|
|
28
|
+
name: "shell-shock",
|
|
29
|
+
version,
|
|
30
|
+
orgId: "storm-software"
|
|
31
|
+
}
|
|
32
|
+
});
|
|
33
|
+
|
|
34
|
+
//#endregion
|
|
35
|
+
export { api_default as default };
|
|
2
36
|
//# sourceMappingURL=api.mjs.map
|
package/dist/api.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"api.mjs","names":[],"sources":[
|
|
1
|
+
{"version":3,"file":"api.mjs","names":[],"sources":[],"mappings":""}
|
|
@@ -1 +1,291 @@
|
|
|
1
|
-
Object.defineProperty(exports,Symbol.toStringTag,
|
|
1
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2
|
+
let _alloy_js_core_jsx_runtime = require("@alloy-js/core/jsx-runtime");
|
|
3
|
+
let _alloy_js_core = require("@alloy-js/core");
|
|
4
|
+
let _stryke_string_format_camel_case = require("@stryke/string-format/camel-case");
|
|
5
|
+
let _powerlines_plugin_alloy_core_components_spacing = require("@powerlines/plugin-alloy/core/components/spacing");
|
|
6
|
+
let _alloy_js_typescript = require("@alloy-js/typescript");
|
|
7
|
+
let _stryke_string_format_list = require("@stryke/string-format/list");
|
|
8
|
+
|
|
9
|
+
//#region src/components/command-validation-logic.tsx
|
|
10
|
+
function __assignType(fn, args) {
|
|
11
|
+
fn.__type = args;
|
|
12
|
+
return fn;
|
|
13
|
+
}
|
|
14
|
+
const __ΩCommandValidationLogicProps = [
|
|
15
|
+
"CommandTree",
|
|
16
|
+
"command",
|
|
17
|
+
"CommandValidationLogicProps",
|
|
18
|
+
"P\"w!4\"Mw#y"
|
|
19
|
+
];
|
|
20
|
+
/**
|
|
21
|
+
* A component that generates command validation logic for required options and arguments.
|
|
22
|
+
*/
|
|
23
|
+
function CommandValidationLogic(props) {
|
|
24
|
+
const { command } = props;
|
|
25
|
+
return [
|
|
26
|
+
(0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_typescript.VarDeclaration, {
|
|
27
|
+
name: "failures",
|
|
28
|
+
type: "string[]",
|
|
29
|
+
initializer: _alloy_js_core.code`[];`
|
|
30
|
+
}),
|
|
31
|
+
(0, _alloy_js_core_jsx_runtime.createIntrinsic)("hbr", {}),
|
|
32
|
+
(0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_core.For, {
|
|
33
|
+
get each() {
|
|
34
|
+
return Object.values(command.options ?? {});
|
|
35
|
+
},
|
|
36
|
+
doubleHardline: true,
|
|
37
|
+
get children() {
|
|
38
|
+
return __assignType((option) => [
|
|
39
|
+
(0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_core.Show, {
|
|
40
|
+
get when() {
|
|
41
|
+
return option.required;
|
|
42
|
+
},
|
|
43
|
+
get children() {
|
|
44
|
+
return [(0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_typescript.IfStatement, {
|
|
45
|
+
get condition() {
|
|
46
|
+
return _alloy_js_core.code`!options${option.name.includes("?") ? `["${option.name}"]` : `.${(0, _stryke_string_format_camel_case.camelCase)(option.name)}`}`;
|
|
47
|
+
},
|
|
48
|
+
get children() {
|
|
49
|
+
return _alloy_js_core.code`failures.push("Missing required \\"${option.name}\\" option");`;
|
|
50
|
+
}
|
|
51
|
+
}), (0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_core.Show, {
|
|
52
|
+
get when() {
|
|
53
|
+
return option.variadic;
|
|
54
|
+
},
|
|
55
|
+
get children() {
|
|
56
|
+
return (0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_typescript.ElseIfClause, {
|
|
57
|
+
get condition() {
|
|
58
|
+
return _alloy_js_core.code`options${option.name.includes("?") ? `["${option.name}"]` : `.${(0, _stryke_string_format_camel_case.camelCase)(option.name)}`}.length === 0`;
|
|
59
|
+
},
|
|
60
|
+
get children() {
|
|
61
|
+
return _alloy_js_core.code`failures.push("No values were provided to the required \\"${option.name}\\" array option");`;
|
|
62
|
+
}
|
|
63
|
+
});
|
|
64
|
+
}
|
|
65
|
+
})];
|
|
66
|
+
}
|
|
67
|
+
}),
|
|
68
|
+
(0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_core.Show, {
|
|
69
|
+
get when() {
|
|
70
|
+
return option.type === "number";
|
|
71
|
+
},
|
|
72
|
+
get children() {
|
|
73
|
+
return (0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_core.Show, {
|
|
74
|
+
get when() {
|
|
75
|
+
return option.variadic;
|
|
76
|
+
},
|
|
77
|
+
get fallback() {
|
|
78
|
+
return (0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_typescript.IfStatement, {
|
|
79
|
+
get condition() {
|
|
80
|
+
return _alloy_js_core.code`options${option.name.includes("?") ? `["${option.name}"]` : `.${(0, _stryke_string_format_camel_case.camelCase)(option.name)}`} && Number.isNaN(options${option.name.includes("?") ? `["${option.name}"]` : `.${(0, _stryke_string_format_camel_case.camelCase)(option.name)}`})`;
|
|
81
|
+
},
|
|
82
|
+
get children() {
|
|
83
|
+
return _alloy_js_core.code`failures.push("Invalid numeric value provided for the \\"${option.name}\\" option");`;
|
|
84
|
+
}
|
|
85
|
+
});
|
|
86
|
+
},
|
|
87
|
+
get children() {
|
|
88
|
+
return (0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_typescript.IfStatement, {
|
|
89
|
+
get condition() {
|
|
90
|
+
return _alloy_js_core.code`options${option.name.includes("?") ? `["${option.name}"]` : `.${(0, _stryke_string_format_camel_case.camelCase)(option.name)}`}.some(value => Number.isNaN(value))`;
|
|
91
|
+
},
|
|
92
|
+
get children() {
|
|
93
|
+
return _alloy_js_core.code`failures.push("Invalid numeric value provided in the \\"${option.name}\\" array option");`;
|
|
94
|
+
}
|
|
95
|
+
});
|
|
96
|
+
}
|
|
97
|
+
});
|
|
98
|
+
}
|
|
99
|
+
}),
|
|
100
|
+
(0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_core.Show, {
|
|
101
|
+
get when() {
|
|
102
|
+
return (option.type === "string" || option.type === "number") && option.choices && option.choices.length > 0;
|
|
103
|
+
},
|
|
104
|
+
get children() {
|
|
105
|
+
return (0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_core.Show, {
|
|
106
|
+
get when() {
|
|
107
|
+
return !option.variadic;
|
|
108
|
+
},
|
|
109
|
+
get fallback() {
|
|
110
|
+
return (0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_core.Show, {
|
|
111
|
+
get when() {
|
|
112
|
+
return option.required;
|
|
113
|
+
},
|
|
114
|
+
get fallback() {
|
|
115
|
+
return (0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_typescript.IfStatement, {
|
|
116
|
+
get condition() {
|
|
117
|
+
return _alloy_js_core.code`!options${option.name.includes("?") ? `["${option.name}"]` : `.${(0, _stryke_string_format_camel_case.camelCase)(option.name)}`}.every(value => [${option.choices?.map(__assignType((choice) => option.type === "string" ? `"${choice}"` : choice, [
|
|
118
|
+
"choice",
|
|
119
|
+
"",
|
|
120
|
+
"P\"2!\"/\""
|
|
121
|
+
])).join(", ")}].includes(value))`;
|
|
122
|
+
},
|
|
123
|
+
get children() {
|
|
124
|
+
return _alloy_js_core.code`failures.push(\`Invalid value provided for the \\"${option.name}\\" option - valid values include: ${(0, _stryke_string_format_list.list)(option?.choices?.map(__assignType((choice) => String(choice), [
|
|
125
|
+
"choice",
|
|
126
|
+
"",
|
|
127
|
+
"P\"2!\"/\""
|
|
128
|
+
])) ?? [])}; provided: \${options${option.name.includes("?") ? `["${option.name}"]` : `.${(0, _stryke_string_format_camel_case.camelCase)(option.name)}`}}\`);`;
|
|
129
|
+
}
|
|
130
|
+
});
|
|
131
|
+
},
|
|
132
|
+
get children() {
|
|
133
|
+
return (0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_typescript.ElseIfClause, {
|
|
134
|
+
get condition() {
|
|
135
|
+
return _alloy_js_core.code`!options${option.name.includes("?") ? `["${option.name}"]` : `.${(0, _stryke_string_format_camel_case.camelCase)(option.name)}`}.every(value => [${option.choices?.map(__assignType((choice) => option.type === "string" ? `"${choice}"` : choice, [
|
|
136
|
+
"choice",
|
|
137
|
+
"",
|
|
138
|
+
"P\"2!\"/\""
|
|
139
|
+
])).join(", ")}].includes(value))`;
|
|
140
|
+
},
|
|
141
|
+
get children() {
|
|
142
|
+
return _alloy_js_core.code`failures.push(\`Invalid value provided for the \\"${option.name}\\" option - valid values include: ${(0, _stryke_string_format_list.list)(option?.choices?.map(__assignType((choice) => String(choice), [
|
|
143
|
+
"choice",
|
|
144
|
+
"",
|
|
145
|
+
"P\"2!\"/\""
|
|
146
|
+
])) ?? [])}; provided: \${options${option.name.includes("?") ? `["${option.name}"]` : `.${(0, _stryke_string_format_camel_case.camelCase)(option.name)}`}}\`);`;
|
|
147
|
+
}
|
|
148
|
+
});
|
|
149
|
+
}
|
|
150
|
+
});
|
|
151
|
+
},
|
|
152
|
+
get children() {
|
|
153
|
+
return (0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_core.Show, {
|
|
154
|
+
get when() {
|
|
155
|
+
return option.required;
|
|
156
|
+
},
|
|
157
|
+
get fallback() {
|
|
158
|
+
return (0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_typescript.IfStatement, {
|
|
159
|
+
get condition() {
|
|
160
|
+
return _alloy_js_core.code`![${option.choices?.map(__assignType((choice) => option.type === "string" ? `"${choice}"` : choice, [
|
|
161
|
+
"choice",
|
|
162
|
+
"",
|
|
163
|
+
"P\"2!\"/\""
|
|
164
|
+
])).join(", ")}].includes(options${option.name.includes("?") ? `["${option.name}"]` : `.${(0, _stryke_string_format_camel_case.camelCase)(option.name)}`})`;
|
|
165
|
+
},
|
|
166
|
+
get children() {
|
|
167
|
+
return _alloy_js_core.code`failures.push(\`Invalid value provided for the \\"${option.name}\\" option - valid values include: ${(0, _stryke_string_format_list.list)(option?.choices?.map(__assignType((choice) => String(choice), [
|
|
168
|
+
"choice",
|
|
169
|
+
"",
|
|
170
|
+
"P\"2!\"/\""
|
|
171
|
+
])) ?? [])}; provided: \${options${option.name.includes("?") ? `["${option.name}"]` : `.${(0, _stryke_string_format_camel_case.camelCase)(option.name)}`}}\`);`;
|
|
172
|
+
}
|
|
173
|
+
});
|
|
174
|
+
},
|
|
175
|
+
get children() {
|
|
176
|
+
return (0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_typescript.ElseIfClause, {
|
|
177
|
+
get condition() {
|
|
178
|
+
return _alloy_js_core.code`![${option.choices?.map(__assignType((choice) => option.type === "string" ? `"${choice}"` : choice, [
|
|
179
|
+
"choice",
|
|
180
|
+
"",
|
|
181
|
+
"P\"2!\"/\""
|
|
182
|
+
])).join(", ")}].includes(options${option.name.includes("?") ? `["${option.name}"]` : `.${(0, _stryke_string_format_camel_case.camelCase)(option.name)}`})`;
|
|
183
|
+
},
|
|
184
|
+
get children() {
|
|
185
|
+
return _alloy_js_core.code`failures.push(\`Invalid value provided for the \\"${option.name}\\" option - valid values include: ${(0, _stryke_string_format_list.list)(option?.choices?.map(__assignType((choice) => String(choice), [
|
|
186
|
+
"choice",
|
|
187
|
+
"",
|
|
188
|
+
"P\"2!\"/\""
|
|
189
|
+
])) ?? [])}; provided: \${options${option.name.includes("?") ? `["${option.name}"]` : `.${(0, _stryke_string_format_camel_case.camelCase)(option.name)}`}}\`);`;
|
|
190
|
+
}
|
|
191
|
+
});
|
|
192
|
+
}
|
|
193
|
+
});
|
|
194
|
+
}
|
|
195
|
+
});
|
|
196
|
+
}
|
|
197
|
+
})
|
|
198
|
+
], [
|
|
199
|
+
"option",
|
|
200
|
+
"",
|
|
201
|
+
"P\"2!\"/\""
|
|
202
|
+
]);
|
|
203
|
+
}
|
|
204
|
+
}),
|
|
205
|
+
(0, _alloy_js_core_jsx_runtime.createComponent)(_powerlines_plugin_alloy_core_components_spacing.Spacing, {}),
|
|
206
|
+
(0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_core.For, {
|
|
207
|
+
get each() {
|
|
208
|
+
return command.args;
|
|
209
|
+
},
|
|
210
|
+
doubleHardline: true,
|
|
211
|
+
get children() {
|
|
212
|
+
return __assignType((argument) => [(0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_core.Show, {
|
|
213
|
+
get when() {
|
|
214
|
+
return argument.required;
|
|
215
|
+
},
|
|
216
|
+
get children() {
|
|
217
|
+
return [(0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_typescript.IfStatement, {
|
|
218
|
+
get condition() {
|
|
219
|
+
return _alloy_js_core.code`!${(0, _stryke_string_format_camel_case.camelCase)(argument.name)}`;
|
|
220
|
+
},
|
|
221
|
+
get children() {
|
|
222
|
+
return _alloy_js_core.code`failures.push("Missing required \\"${argument.name}\\" positional argument");`;
|
|
223
|
+
}
|
|
224
|
+
}), (0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_core.Show, {
|
|
225
|
+
get when() {
|
|
226
|
+
return argument.variadic;
|
|
227
|
+
},
|
|
228
|
+
get children() {
|
|
229
|
+
return (0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_typescript.ElseIfClause, {
|
|
230
|
+
get condition() {
|
|
231
|
+
return _alloy_js_core.code`${(0, _stryke_string_format_camel_case.camelCase)(argument.name)}.length === 0`;
|
|
232
|
+
},
|
|
233
|
+
get children() {
|
|
234
|
+
return _alloy_js_core.code`failures.push("No values were provided to the required \\"${argument.name}\\" array positional argument");`;
|
|
235
|
+
}
|
|
236
|
+
});
|
|
237
|
+
}
|
|
238
|
+
})];
|
|
239
|
+
}
|
|
240
|
+
}), (0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_core.Show, {
|
|
241
|
+
get when() {
|
|
242
|
+
return argument.type === "number";
|
|
243
|
+
},
|
|
244
|
+
get children() {
|
|
245
|
+
return (0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_core.Show, {
|
|
246
|
+
get when() {
|
|
247
|
+
return argument.variadic;
|
|
248
|
+
},
|
|
249
|
+
get fallback() {
|
|
250
|
+
return (0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_typescript.IfStatement, {
|
|
251
|
+
get condition() {
|
|
252
|
+
return _alloy_js_core.code`${(0, _stryke_string_format_camel_case.camelCase)(argument.name)} && Number.isNaN(${(0, _stryke_string_format_camel_case.camelCase)(argument.name)})`;
|
|
253
|
+
},
|
|
254
|
+
get children() {
|
|
255
|
+
return _alloy_js_core.code`failures.push("Invalid numeric value provided for the \\"${argument.name}\\" positional argument");`;
|
|
256
|
+
}
|
|
257
|
+
});
|
|
258
|
+
},
|
|
259
|
+
get children() {
|
|
260
|
+
return (0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_typescript.IfStatement, {
|
|
261
|
+
get condition() {
|
|
262
|
+
return _alloy_js_core.code`${(0, _stryke_string_format_camel_case.camelCase)(argument.name)}.some(value => Number.isNaN(value))`;
|
|
263
|
+
},
|
|
264
|
+
get children() {
|
|
265
|
+
return _alloy_js_core.code`failures.push("Invalid numeric value provided in the \\"${argument.name}\\" array positional argument");`;
|
|
266
|
+
}
|
|
267
|
+
});
|
|
268
|
+
}
|
|
269
|
+
});
|
|
270
|
+
}
|
|
271
|
+
})], [
|
|
272
|
+
"argument",
|
|
273
|
+
"",
|
|
274
|
+
"P\"2!\"/\""
|
|
275
|
+
]);
|
|
276
|
+
}
|
|
277
|
+
})
|
|
278
|
+
];
|
|
279
|
+
}
|
|
280
|
+
CommandValidationLogic.__type = [
|
|
281
|
+
() => __ΩCommandValidationLogicProps,
|
|
282
|
+
"props",
|
|
283
|
+
"CommandValidationLogic",
|
|
284
|
+
"A component that generates command validation logic for required options and arguments.",
|
|
285
|
+
"Pn!2\"\"/#?$"
|
|
286
|
+
];
|
|
287
|
+
|
|
288
|
+
//#endregion
|
|
289
|
+
exports.CommandValidationLogic = CommandValidationLogic;
|
|
290
|
+
exports.__ΩCommandValidationLogicProps = __ΩCommandValidationLogicProps;
|
|
291
|
+
//# sourceMappingURL=command-validation-logic.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"command-validation-logic.cjs","names":[],"sources":[],"mappings":""}
|
|
@@ -1,6 +1,4 @@
|
|
|
1
1
|
import { CommandTree } from "../types/command.cjs";
|
|
2
|
-
import * as _$_alloy_js_core0 from "@alloy-js/core";
|
|
3
|
-
|
|
4
2
|
//#region src/components/command-validation-logic.d.ts
|
|
5
3
|
interface CommandValidationLogicProps {
|
|
6
4
|
command: CommandTree;
|
|
@@ -8,7 +6,7 @@ interface CommandValidationLogicProps {
|
|
|
8
6
|
/**
|
|
9
7
|
* A component that generates command validation logic for required options and arguments.
|
|
10
8
|
*/
|
|
11
|
-
declare function CommandValidationLogic(props: CommandValidationLogicProps):
|
|
9
|
+
declare function CommandValidationLogic(props: CommandValidationLogicProps): import("@alloy-js/core").Children;
|
|
12
10
|
//#endregion
|
|
13
11
|
export { CommandValidationLogic, CommandValidationLogicProps };
|
|
14
12
|
//# sourceMappingURL=command-validation-logic.d.cts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"command-validation-logic.d.cts","names":[],"sources":["../../src/components/command-validation-logic.tsx"],"mappings":"
|
|
1
|
+
{"version":3,"file":"command-validation-logic.d.cts","names":[],"sources":["../../src/components/command-validation-logic.tsx"],"mappings":";;UAiCiB,2BAAA;EACf,OAAA,EAAS,WAAW;AAAA;AADtB;;;AAAA,iBAOgB,sBAAA,CAAuB,KAAA,EAAO,2BAA2B,4BAAA,QAAA"}
|