@powerlines/engine 0.43.30 → 0.43.31
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/_internal/worker.cjs +112 -42
- package/dist/_internal/worker.mjs +112 -42
- package/dist/_internal/worker.mjs.map +1 -1
- package/dist/api.cjs +9 -7
- package/dist/api.d.cts.map +1 -1
- package/dist/api.d.mts.map +1 -1
- package/dist/api.mjs +9 -7
- package/dist/api.mjs.map +1 -1
- package/dist/{base-context-B9AROf66.cjs → base-context-CPoqO4io.cjs} +9 -8
- package/dist/{base-context-D8a2XGIK.mjs → base-context-SmQ6OfXm.mjs} +10 -9
- package/dist/base-context-SmQ6OfXm.mjs.map +1 -0
- package/dist/context/index.cjs +3 -3
- package/dist/context/index.d.cts +37 -20
- package/dist/context/index.d.cts.map +1 -1
- package/dist/context/index.d.mts +37 -20
- package/dist/context/index.d.mts.map +1 -1
- package/dist/context/index.mjs +3 -3
- package/dist/{engine-context-qCVw66U_.cjs → engine-context-CEu21ZZf.cjs} +36 -10
- package/dist/{engine-context-DsA9XGVb.mjs → engine-context-D7CWyTsr.mjs} +36 -11
- package/dist/engine-context-D7CWyTsr.mjs.map +1 -0
- package/dist/{execution-context-CBJxP2B2.mjs → execution-context-C_7IC8er.mjs} +110 -40
- package/dist/execution-context-C_7IC8er.mjs.map +1 -0
- package/dist/{execution-context-CprxWvYn.cjs → execution-context-DsT6s1du.cjs} +108 -38
- package/dist/index.cjs +135 -54
- package/dist/index.d.cts.map +1 -1
- package/dist/index.d.mts.map +1 -1
- package/dist/index.mjs +135 -54
- package/dist/index.mjs.map +1 -1
- package/dist/storage/index.cjs +1 -1
- package/dist/storage/index.d.mts +1 -1
- package/dist/storage/index.mjs +1 -1
- package/dist/typescript/index.d.mts +1 -1
- package/dist/{virtual-BNdKVkRw.cjs → virtual-1hYa9zCy.cjs} +1 -1
- package/dist/{virtual-gIlTc3Lj.mjs → virtual-CUgOdyIa.mjs} +2 -2
- package/dist/{virtual-gIlTc3Lj.mjs.map → virtual-CUgOdyIa.mjs.map} +1 -1
- package/package.json +3 -3
- package/dist/base-context-D8a2XGIK.mjs.map +0 -1
- package/dist/engine-context-DsA9XGVb.mjs.map +0 -1
- package/dist/execution-context-CBJxP2B2.mjs.map +0 -1
package/dist/api.cjs
CHANGED
|
@@ -1,13 +1,18 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2
2
|
const require_chunk = require('./chunk-C0xms8kb.cjs');
|
|
3
|
-
const require_execution_context = require('./execution-context-
|
|
3
|
+
const require_execution_context = require('./execution-context-DsT6s1du.cjs');
|
|
4
4
|
const require_tsconfig = require('./tsconfig-DeyWQC2N.cjs');
|
|
5
5
|
const require_ts_morph = require('./ts-morph-BaLPVAdB.cjs');
|
|
6
6
|
let _stryke_fs_resolve = require("@stryke/fs/resolve");
|
|
7
7
|
let _stryke_type_checks_is_set = require("@stryke/type-checks/is-set");
|
|
8
|
+
let _stryke_type_checks_is_set_object = require("@stryke/type-checks/is-set-object");
|
|
8
9
|
let _stryke_type_checks_is_string = require("@stryke/type-checks/is-string");
|
|
10
|
+
let _stryke_convert_to_array = require("@stryke/convert/to-array");
|
|
11
|
+
let _stryke_type_checks_is_set_string = require("@stryke/type-checks/is-set-string");
|
|
12
|
+
let _stryke_unique_id_uuid = require("@stryke/unique-id/uuid");
|
|
9
13
|
let _powerlines_core_lib_logger = require("@powerlines/core/lib/logger");
|
|
10
14
|
let _stryke_json_storm_json = require("@stryke/json/storm-json");
|
|
15
|
+
let _stryke_path_replace = require("@stryke/path/replace");
|
|
11
16
|
let chalk = require("chalk");
|
|
12
17
|
chalk = require_chunk.__toESM(chalk, 1);
|
|
13
18
|
let defu = require("defu");
|
|
@@ -15,12 +20,10 @@ defu = require_chunk.__toESM(defu, 1);
|
|
|
15
20
|
let _stryke_path_join_paths = require("@stryke/path/join-paths");
|
|
16
21
|
let _stryke_env_environment_checks = require("@stryke/env/environment-checks");
|
|
17
22
|
let _stryke_string_format_title_case = require("@stryke/string-format/title-case");
|
|
18
|
-
let _stryke_type_checks_is_set_object = require("@stryke/type-checks/is-set-object");
|
|
19
23
|
let _powerlines_core_lib_utilities_file_header = require("@powerlines/core/lib/utilities/file-header");
|
|
20
24
|
let _powerlines_core_lib_utilities_format = require("@powerlines/core/lib/utilities/format");
|
|
21
25
|
let _powerlines_core_plugin_utils = require("@powerlines/core/plugin-utils");
|
|
22
26
|
let _storm_software_config_tools_logger_console = require("@storm-software/config-tools/logger/console");
|
|
23
|
-
let _stryke_convert_to_array = require("@stryke/convert/to-array");
|
|
24
27
|
let _stryke_fs_copy_file = require("@stryke/fs/copy-file");
|
|
25
28
|
let _stryke_fs_exists = require("@stryke/fs/exists");
|
|
26
29
|
let _stryke_fs_helpers = require("@stryke/fs/helpers");
|
|
@@ -32,13 +35,11 @@ let _stryke_helpers_omit = require("@stryke/helpers/omit");
|
|
|
32
35
|
let _stryke_path_append = require("@stryke/path/append");
|
|
33
36
|
let _stryke_path_file_path_fns = require("@stryke/path/file-path-fns");
|
|
34
37
|
let _stryke_path_is_parent_path = require("@stryke/path/is-parent-path");
|
|
35
|
-
let _stryke_path_replace = require("@stryke/path/replace");
|
|
36
38
|
let _stryke_type_checks_is_error = require("@stryke/type-checks/is-error");
|
|
37
39
|
let _stryke_type_checks_is_function = require("@stryke/type-checks/is-function");
|
|
38
40
|
let _stryke_type_checks_is_number = require("@stryke/type-checks/is-number");
|
|
39
41
|
let _stryke_type_checks_is_object = require("@stryke/type-checks/is-object");
|
|
40
42
|
let _stryke_type_checks_is_promise = require("@stryke/type-checks/is-promise");
|
|
41
|
-
let _stryke_type_checks_is_set_string = require("@stryke/type-checks/is-set-string");
|
|
42
43
|
let handlebars = require("handlebars");
|
|
43
44
|
handlebars = require_chunk.__toESM(handlebars, 1);
|
|
44
45
|
let _stryke_fs_json = require("@stryke/fs/json");
|
|
@@ -711,7 +712,7 @@ ${formatTypes(code)}
|
|
|
711
712
|
addPlugin: api.addPlugin.bind(api)
|
|
712
713
|
};
|
|
713
714
|
const timer = api.context.timer("Initialization");
|
|
714
|
-
for (const plugin of api.context.config.plugins.
|
|
715
|
+
for (const plugin of api.context.config.plugins.flatMap((p) => (0, _stryke_convert_to_array.toArray)(p)) ?? []) await api.addPlugin(plugin);
|
|
715
716
|
if (api.context.plugins.length === 0) api.context.warn("No Powerlines plugins were specified in the options. Please ensure this is correct, as it is generally not recommended.");
|
|
716
717
|
else api.context.info(`Loaded ${api.context.plugins.length} ${(0, _stryke_string_format_title_case.titleCase)(api.context.config.framework)} plugin${api.context.plugins.length > 1 ? "s" : ""}: \n${api.context.plugins.map((plugin, index) => ` ${index + 1}. ${(0, _powerlines_core_lib_logger.colorText)(plugin.name)}`).join("\n")}`);
|
|
717
718
|
const pluginConfig = await api.callHook("config", {
|
|
@@ -1077,11 +1078,12 @@ var PowerlinesAPI = class PowerlinesAPI extends PowerlinesExecution {
|
|
|
1077
1078
|
*/
|
|
1078
1079
|
static async fromOptions(options, override) {
|
|
1079
1080
|
const api = new PowerlinesAPI(await require_execution_context.PowerlinesExecutionContext.fromOptions({
|
|
1081
|
+
executionId: (0, _stryke_unique_id_uuid.uuid)(),
|
|
1080
1082
|
cwd: process.cwd(),
|
|
1081
1083
|
mode: _stryke_env_environment_checks.isDevelopment ? "development" : _stryke_env_environment_checks.isTest ? "test" : "production",
|
|
1082
1084
|
framework: "powerlines",
|
|
1083
1085
|
...options,
|
|
1084
|
-
|
|
1086
|
+
executionIndex: 0
|
|
1085
1087
|
}));
|
|
1086
1088
|
if (override) {
|
|
1087
1089
|
api.context.config.inlineConfig = override;
|
package/dist/api.d.cts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"api.d.cts","names":[],"sources":["../src/_internal/execution.ts","../src/api.ts"],"mappings":";;;;;;;;AAyGA;;;;;cAAa,mBAAA,yBACa,cAAA,GAAiB,cAAA,aAC9B,SAAA;EAAA;EA0qBe;;;EAAA,I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Y,iBAAA,eAEzB,OAAA;EDg1Be;;;;;;;;ECzzBI,OAAA,CACpB,YAAA,GACI,WAAA,CAAY,mBAAA,eACZ,WAAA,CAAY,iBAAA,eACZ,WAAA,CAAY,eAAA,eACZ,WAAA,CAAY,iBAAA,eACZ,WAAA,CAAY,iBAAA,eACZ,WAAA,CAAY,gBAAA,eACZ,WAAA,CAAY,gBAAA,eACZ,WAAA,CAAY,gBAAA,eACZ,WAAA,CAAY,kBAAA,eAAuD,OAAA;ED06BH;;;;;;;;;ECl5BhD,GAAA,CACpB,YAAA,EAAc,WAAA,CAAY,eAAA,eAA2B,OAAA;EDqgCc;;;;;;;;;ECj/B/C,KAAA,CACpB,YAAA,GACI,WAAA,CAAY,iBAAA,eACZ,WAAA,CAAY,mBAAA,eAEf,OAAA;EDikCmE;;;;;;EChjChD,IAAA,CACpB,YAAA,GACI,WAAA,CAAY,gBAAA,eACZ,WAAA,CAAY,iBAAA,eAAmD,OAAA;EDqnCvB;;;;;;;;;ECjmCxB,IAAA,CACpB,YAAA,GACI,WAAA,CAAY,gBAAA,eACZ,WAAA,CAAY,iBAAA,eAAmD,OAAA;EDgmCD;;;;;;;;;EC5kC9C,KAAA,CACpB,YAAA,GAAc,WAAA,CAAY,iBAAA,eAEzB,OAAA;ED9LiB;;;;;;EC+ME,IAAA,CACpB,YAAA,GAAc,gBAAA,GAAsC,OAAA;ED+chC;;;;;;;;ECxbA,MAAA,CACpB,YAAA,GAAc,WAAA,CAAY,kBAAA,eAEzB,OAAA;EDmcD;;;;;;;;EChboB,QAAA,CAAA,GAAQ,OAAA;EDonBjB;;;;;;EAAA,CCpmBC,MAAA,CAAO,YAAA,KAAa,OAAA;AAAA"}
|
package/dist/api.mjs
CHANGED
|
@@ -1,22 +1,25 @@
|
|
|
1
|
-
import { a as mergeConfigs, i as callHook, s as writeMetaFile, t as PowerlinesExecutionContext } from "./execution-context-
|
|
1
|
+
import { a as mergeConfigs, i as callHook, s as writeMetaFile, t as PowerlinesExecutionContext } from "./execution-context-C_7IC8er.mjs";
|
|
2
2
|
import { a as isIncludeMatchFound, i as getTsconfigFilePath, r as getParsedTypeScriptConfig } from "./tsconfig-Cstsoprg.mjs";
|
|
3
3
|
import { n as createProgram } from "./ts-morph-D0CaA37w.mjs";
|
|
4
4
|
import { resolvePackage } from "@stryke/fs/resolve";
|
|
5
5
|
import { isSet } from "@stryke/type-checks/is-set";
|
|
6
|
+
import { isSetObject } from "@stryke/type-checks/is-set-object";
|
|
6
7
|
import { isString } from "@stryke/type-checks/is-string";
|
|
8
|
+
import { toArray } from "@stryke/convert/to-array";
|
|
9
|
+
import { isSetString } from "@stryke/type-checks/is-set-string";
|
|
10
|
+
import { uuid } from "@stryke/unique-id/uuid";
|
|
7
11
|
import { colorText } from "@powerlines/core/lib/logger";
|
|
8
12
|
import { StormJSON } from "@stryke/json/storm-json";
|
|
13
|
+
import { replaceExtension, replacePath } from "@stryke/path/replace";
|
|
9
14
|
import chalk from "chalk";
|
|
10
15
|
import defu from "defu";
|
|
11
16
|
import { joinPaths } from "@stryke/path/join-paths";
|
|
12
17
|
import { isDevelopment, isTest } from "@stryke/env/environment-checks";
|
|
13
18
|
import { titleCase } from "@stryke/string-format/title-case";
|
|
14
|
-
import { isSetObject } from "@stryke/type-checks/is-set-object";
|
|
15
19
|
import { getTypescriptFileHeader } from "@powerlines/core/lib/utilities/file-header";
|
|
16
20
|
import { format, formatFolder } from "@powerlines/core/lib/utilities/format";
|
|
17
21
|
import { findInvalidPluginConfig, isDuplicate, isPlugin, isPluginConfig, isPluginConfigObject, isPluginConfigTuple } from "@powerlines/core/plugin-utils";
|
|
18
22
|
import { formatLogMessage } from "@storm-software/config-tools/logger/console";
|
|
19
|
-
import { toArray } from "@stryke/convert/to-array";
|
|
20
23
|
import { copyFiles } from "@stryke/fs/copy-file";
|
|
21
24
|
import { existsSync } from "@stryke/fs/exists";
|
|
22
25
|
import { createDirectory, removeDirectory } from "@stryke/fs/helpers";
|
|
@@ -28,13 +31,11 @@ import { omit } from "@stryke/helpers/omit";
|
|
|
28
31
|
import { appendPath } from "@stryke/path/append";
|
|
29
32
|
import { findFileName, findFilePath, relativePath } from "@stryke/path/file-path-fns";
|
|
30
33
|
import { isParentPath } from "@stryke/path/is-parent-path";
|
|
31
|
-
import { replaceExtension, replacePath } from "@stryke/path/replace";
|
|
32
34
|
import { isError } from "@stryke/type-checks/is-error";
|
|
33
35
|
import { isFunction } from "@stryke/type-checks/is-function";
|
|
34
36
|
import { isNumber } from "@stryke/type-checks/is-number";
|
|
35
37
|
import { isObject } from "@stryke/type-checks/is-object";
|
|
36
38
|
import { isPromiseLike } from "@stryke/type-checks/is-promise";
|
|
37
|
-
import { isSetString } from "@stryke/type-checks/is-set-string";
|
|
38
39
|
import Handlebars from "handlebars";
|
|
39
40
|
import { readJsonFile } from "@stryke/fs/json";
|
|
40
41
|
import { prettyBytes } from "@stryke/string-format/pretty-bytes";
|
|
@@ -706,7 +707,7 @@ ${formatTypes(code)}
|
|
|
706
707
|
addPlugin: api.addPlugin.bind(api)
|
|
707
708
|
};
|
|
708
709
|
const timer = api.context.timer("Initialization");
|
|
709
|
-
for (const plugin of api.context.config.plugins.
|
|
710
|
+
for (const plugin of api.context.config.plugins.flatMap((p) => toArray(p)) ?? []) await api.addPlugin(plugin);
|
|
710
711
|
if (api.context.plugins.length === 0) api.context.warn("No Powerlines plugins were specified in the options. Please ensure this is correct, as it is generally not recommended.");
|
|
711
712
|
else api.context.info(`Loaded ${api.context.plugins.length} ${titleCase(api.context.config.framework)} plugin${api.context.plugins.length > 1 ? "s" : ""}: \n${api.context.plugins.map((plugin, index) => ` ${index + 1}. ${colorText(plugin.name)}`).join("\n")}`);
|
|
712
713
|
const pluginConfig = await api.callHook("config", {
|
|
@@ -1072,11 +1073,12 @@ var PowerlinesAPI = class PowerlinesAPI extends PowerlinesExecution {
|
|
|
1072
1073
|
*/
|
|
1073
1074
|
static async fromOptions(options, override) {
|
|
1074
1075
|
const api = new PowerlinesAPI(await PowerlinesExecutionContext.fromOptions({
|
|
1076
|
+
executionId: uuid(),
|
|
1075
1077
|
cwd: process.cwd(),
|
|
1076
1078
|
mode: isDevelopment ? "development" : isTest ? "test" : "production",
|
|
1077
1079
|
framework: "powerlines",
|
|
1078
1080
|
...options,
|
|
1079
|
-
|
|
1081
|
+
executionIndex: 0
|
|
1080
1082
|
}));
|
|
1081
1083
|
if (override) {
|
|
1082
1084
|
api.context.config.inlineConfig = override;
|