@powerlines/nx 0.11.217 → 0.11.218
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/CHANGELOG.md +6 -0
- package/dist/{chunk-2OUVFH73.js → chunk-2VN57DMC.js} +2 -2
- package/dist/chunk-3BI2YVJ3.js +156 -0
- package/dist/{chunk-5XND6U2P.js → chunk-3TZVQPPH.js} +2 -2
- package/dist/chunk-4OMPO3GC.mjs +154 -0
- package/dist/{chunk-AQU4Y7TY.mjs → chunk-5NHMBXXZ.mjs} +1 -1
- package/dist/{chunk-UWZA4FE6.mjs → chunk-CINC3R52.mjs} +1 -1
- package/dist/{chunk-MMYSL52M.mjs → chunk-EFG2AWKX.mjs} +220 -388
- package/dist/{chunk-TWOXCXFE.js → chunk-EQMUIUSF.js} +16 -16
- package/dist/{chunk-BUUW4BAS.mjs → chunk-ETYR57U3.mjs} +2 -2
- package/dist/chunk-FSGRYCTL.js +281 -0
- package/dist/{chunk-2YJP4HRC.mjs → chunk-GCIPEE4T.mjs} +7 -7
- package/dist/{chunk-ELBUYWVF.mjs → chunk-GKRW32W2.mjs} +1 -1
- package/dist/{chunk-C4XEVBMI.mjs → chunk-H7FXL53F.mjs} +1 -1
- package/dist/{chunk-VSMLSWBT.js → chunk-IOBDAGVL.js} +8 -8
- package/dist/{chunk-5QDW5A4Z.js → chunk-JCB2SUGI.js} +2 -2
- package/dist/{chunk-TL367T24.js → chunk-JFLVE4R6.js} +2 -2
- package/dist/chunk-JL4HQ7ZD.mjs +260 -0
- package/dist/{chunk-WJP3FWAH.js → chunk-MDVQOPYK.js} +2 -2
- package/dist/{chunk-ZYOL33SX.mjs → chunk-RQR4JLRG.mjs} +15 -15
- package/dist/{chunk-QJE3HWRQ.js → chunk-VNEJ2D4E.js} +3 -3
- package/dist/{chunk-JQZOWO7J.mjs → chunk-XX6ZLY4D.mjs} +1 -1
- package/dist/{chunk-BM4NZS6T.js → chunk-ZVVHO24E.js} +244 -412
- package/dist/{executor-Bb8vGV8C.d.ts → executor-AQVlPFta.d.ts} +90 -19
- package/dist/{executor-CQzw0-So.d.mts → executor-BNmIhtpF.d.mts} +90 -19
- package/dist/{executor-DwTFXSVb.d.mts → executor-C0A5mFLO.d.mts} +74 -19
- package/dist/{executor-u-vw0Uzf.d.mts → executor-Cep8-Y3A.d.mts} +90 -19
- package/dist/{executor-DY7vA66P.d.ts → executor-CkyahICv.d.ts} +74 -19
- package/dist/{executor-C2WSCUOW.d.ts → executor-DOsxw-Ih.d.ts} +90 -19
- package/dist/{executor-C5rCem7d.d.ts → executor-DUQbjUVt.d.ts} +90 -19
- package/dist/{executor-C9MI57kJ.d.ts → executor-O3MDQSFT.d.ts} +90 -19
- package/dist/{executor-fccJAIjg.d.mts → executor-U4mVkhQK.d.mts} +90 -19
- package/dist/{executor-DXaEo8YG.d.mts → executor-Xt5qNzC5.d.mts} +90 -19
- package/dist/executors.d.mts +5 -6
- package/dist/executors.d.ts +5 -6
- package/dist/executors.js +12 -12
- package/dist/executors.mjs +7 -7
- package/dist/index.d.mts +5 -6
- package/dist/index.d.ts +5 -6
- package/dist/index.js +15 -15
- package/dist/index.mjs +9 -9
- package/dist/src/base/base-executor.d.mts +1 -2
- package/dist/src/base/base-executor.d.ts +1 -2
- package/dist/src/base/base-executor.js +3 -3
- package/dist/src/base/base-executor.mjs +2 -2
- package/dist/src/base/base-executor.schema.d.d.mts +74 -19
- package/dist/src/base/base-executor.schema.d.d.ts +74 -19
- package/dist/src/base/base-executor.schema.d.ts +74 -19
- package/dist/src/base/base-executor.schema.json +108 -26
- package/dist/src/base/base-executor.untyped.js +2 -2
- package/dist/src/base/base-executor.untyped.mjs +1 -1
- package/dist/src/executors/build/executor.d.mts +1 -2
- package/dist/src/executors/build/executor.d.ts +1 -2
- package/dist/src/executors/build/executor.js +5 -5
- package/dist/src/executors/build/executor.mjs +3 -3
- package/dist/src/executors/build/schema.d.ts +90 -19
- package/dist/src/executors/build/schema.json +119 -25
- package/dist/src/executors/build/untyped.js +3 -3
- package/dist/src/executors/build/untyped.mjs +2 -2
- package/dist/src/executors/clean/executor.d.mts +1 -2
- package/dist/src/executors/clean/executor.d.ts +1 -2
- package/dist/src/executors/clean/executor.js +5 -5
- package/dist/src/executors/clean/executor.mjs +3 -3
- package/dist/src/executors/clean/schema.d.ts +74 -19
- package/dist/src/executors/clean/schema.json +108 -26
- package/dist/src/executors/clean/untyped.js +2 -2
- package/dist/src/executors/clean/untyped.mjs +1 -1
- package/dist/src/executors/docs/executor.d.mts +1 -2
- package/dist/src/executors/docs/executor.d.ts +1 -2
- package/dist/src/executors/docs/executor.js +5 -5
- package/dist/src/executors/docs/executor.mjs +3 -3
- package/dist/src/executors/docs/schema.d.ts +90 -19
- package/dist/src/executors/docs/schema.json +120 -26
- package/dist/src/executors/docs/untyped.js +3 -3
- package/dist/src/executors/docs/untyped.mjs +2 -2
- package/dist/src/executors/lint/executor.d.mts +1 -2
- package/dist/src/executors/lint/executor.d.ts +1 -2
- package/dist/src/executors/lint/executor.js +5 -5
- package/dist/src/executors/lint/executor.mjs +3 -3
- package/dist/src/executors/lint/schema.d.ts +90 -19
- package/dist/src/executors/lint/schema.json +120 -26
- package/dist/src/executors/lint/untyped.js +3 -3
- package/dist/src/executors/lint/untyped.mjs +2 -2
- package/dist/src/executors/prepare/executor.d.mts +1 -2
- package/dist/src/executors/prepare/executor.d.ts +1 -2
- package/dist/src/executors/prepare/executor.js +5 -5
- package/dist/src/executors/prepare/executor.mjs +3 -3
- package/dist/src/executors/prepare/schema.d.ts +90 -19
- package/dist/src/executors/prepare/schema.json +120 -26
- package/dist/src/executors/prepare/untyped.js +3 -3
- package/dist/src/executors/prepare/untyped.mjs +2 -2
- package/dist/src/helpers/plugin-utilities.js +5 -5
- package/dist/src/helpers/plugin-utilities.mjs +2 -2
- package/dist/src/plugin/index.js +4 -4
- package/dist/src/plugin/index.mjs +3 -3
- package/docs/api/base-executor.schema.md +71 -19
- package/docs/api/build/schema.md +89 -19
- package/docs/api/clean/schema.md +71 -19
- package/docs/api/docs/schema.md +89 -19
- package/docs/api/lint/schema.md +89 -19
- package/docs/api/prepare/schema.md +89 -19
- package/package.json +11 -11
- package/dist/chunk-AGZ4P3AS.mjs +0 -87
- package/dist/chunk-IR6TAW72.js +0 -81
- package/dist/chunk-NU3VTAH5.js +0 -98
- package/dist/chunk-XXWF7X5C.mjs +0 -75
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunkFSGRYCTL_js = require('./chunk-FSGRYCTL.js');
|
|
4
4
|
var chunkIQVSZEQ6_js = require('./chunk-IQVSZEQ6.js');
|
|
5
5
|
var chunkSHUYVCID_js = require('./chunk-SHUYVCID.js');
|
|
6
6
|
var devkit = require('@nx/devkit');
|
|
@@ -58,7 +58,7 @@ function createNxPlugin(opts) {
|
|
|
58
58
|
debug: !!options?.debug,
|
|
59
59
|
interopDefault: true,
|
|
60
60
|
fsCache: joinPaths.joinPaths(envPaths.cache, "nx-plugin", murmurhash.murmurhash(contextV2.workspaceRoot, {
|
|
61
|
-
maxLength:
|
|
61
|
+
maxLength: chunkFSGRYCTL_js.ROOT_HASH_LENGTH
|
|
62
62
|
}), "jiti"),
|
|
63
63
|
moduleCache: true
|
|
64
64
|
});
|
|
@@ -73,7 +73,7 @@ function createNxPlugin(opts) {
|
|
|
73
73
|
if (opts?.verbose) {
|
|
74
74
|
console.debug(`[${name}] - ${(/* @__PURE__ */ new Date()).toISOString()} - Loading ${framework} user configuration for project in root directory ${projectRoot}.`);
|
|
75
75
|
}
|
|
76
|
-
const userConfig = await
|
|
76
|
+
const userConfig = await chunkFSGRYCTL_js.loadUserConfigFile(projectRoot, contextV2.workspaceRoot, resolver, "build", "development", configFile, framework);
|
|
77
77
|
if (!exists.existsSync(joinPaths.joinPaths(contextV2.workspaceRoot, projectRoot, "package.json"))) {
|
|
78
78
|
if (opts?.verbose) {
|
|
79
79
|
console.warn(`[${name}] - ${(/* @__PURE__ */ new Date()).toISOString()} - Cannot find \`package.json\` file in the project's root directory (path: "${joinPaths.joinPaths(contextV2.workspaceRoot, projectRoot)}"). Skipping project configuration.`);
|
|
@@ -119,7 +119,7 @@ function createNxPlugin(opts) {
|
|
|
119
119
|
defaultConfiguration: options?.clean?.defaultConfiguration || "production",
|
|
120
120
|
options: {
|
|
121
121
|
outputPath: userConfig.output?.outputPath || "dist/{projectRoot}",
|
|
122
|
-
projectType: projectConfig.projectType || userConfig.
|
|
122
|
+
projectType: projectConfig.projectType || userConfig.projectType,
|
|
123
123
|
autoInstall: userConfig.autoInstall
|
|
124
124
|
},
|
|
125
125
|
configurations: {
|
|
@@ -152,8 +152,8 @@ function createNxPlugin(opts) {
|
|
|
152
152
|
].filter(Boolean),
|
|
153
153
|
defaultConfiguration: options?.prepare?.defaultConfiguration || "production",
|
|
154
154
|
options: {
|
|
155
|
-
|
|
156
|
-
projectType: projectConfig.projectType || userConfig.
|
|
155
|
+
input: userConfig.input,
|
|
156
|
+
projectType: projectConfig.projectType || userConfig.projectType,
|
|
157
157
|
autoInstall: userConfig.autoInstall,
|
|
158
158
|
skipCache: userConfig.skipCache
|
|
159
159
|
},
|
|
@@ -187,9 +187,9 @@ function createNxPlugin(opts) {
|
|
|
187
187
|
].filter(Boolean),
|
|
188
188
|
defaultConfiguration: options?.build?.defaultConfiguration || "production",
|
|
189
189
|
options: {
|
|
190
|
-
|
|
190
|
+
input: userConfig.input,
|
|
191
191
|
outputPath: userConfig.output?.outputPath || "dist/{projectRoot}",
|
|
192
|
-
projectType: projectConfig.projectType || userConfig.
|
|
192
|
+
projectType: projectConfig.projectType || userConfig.projectType,
|
|
193
193
|
autoInstall: userConfig.autoInstall,
|
|
194
194
|
skipCache: userConfig.skipCache
|
|
195
195
|
},
|
|
@@ -229,8 +229,8 @@ function createNxPlugin(opts) {
|
|
|
229
229
|
].filter(Boolean),
|
|
230
230
|
defaultConfiguration: options?.lint?.defaultConfiguration || "production",
|
|
231
231
|
options: {
|
|
232
|
-
|
|
233
|
-
projectType: projectConfig.projectType || userConfig.
|
|
232
|
+
input: userConfig.input,
|
|
233
|
+
projectType: projectConfig.projectType || userConfig.projectType,
|
|
234
234
|
autoInstall: userConfig.autoInstall,
|
|
235
235
|
skipCache: userConfig.skipCache
|
|
236
236
|
},
|
|
@@ -271,8 +271,8 @@ function createNxPlugin(opts) {
|
|
|
271
271
|
].filter(Boolean),
|
|
272
272
|
defaultConfiguration: options?.docs?.defaultConfiguration || "production",
|
|
273
273
|
options: {
|
|
274
|
-
|
|
275
|
-
projectType: projectConfig.projectType || userConfig.
|
|
274
|
+
input: userConfig.input,
|
|
275
|
+
projectType: projectConfig.projectType || userConfig.projectType,
|
|
276
276
|
autoInstall: userConfig.autoInstall,
|
|
277
277
|
skipCache: userConfig.skipCache
|
|
278
278
|
},
|
|
@@ -312,8 +312,8 @@ function createNxPlugin(opts) {
|
|
|
312
312
|
].filter(Boolean),
|
|
313
313
|
defaultConfiguration: options?.deploy?.defaultConfiguration || "production",
|
|
314
314
|
options: {
|
|
315
|
-
|
|
316
|
-
projectType: projectConfig.projectType || userConfig.
|
|
315
|
+
input: userConfig.input,
|
|
316
|
+
projectType: projectConfig.projectType || userConfig.projectType,
|
|
317
317
|
autoInstall: userConfig.autoInstall,
|
|
318
318
|
skipCache: userConfig.skipCache
|
|
319
319
|
},
|
|
@@ -332,7 +332,7 @@ function createNxPlugin(opts) {
|
|
|
332
332
|
};
|
|
333
333
|
}
|
|
334
334
|
projectTags.setDefaultProjectTags(projectConfig, name);
|
|
335
|
-
projectTags.addProjectTag(projectConfig, framework, projectConfig.projectType || userConfig.
|
|
335
|
+
projectTags.addProjectTag(projectConfig, framework, projectConfig.projectType || userConfig.projectType || "library", {
|
|
336
336
|
overwrite: true
|
|
337
337
|
});
|
|
338
338
|
if (opts?.verbose) {
|
|
@@ -342,7 +342,7 @@ function createNxPlugin(opts) {
|
|
|
342
342
|
projects: {
|
|
343
343
|
[root]: defu__default.default(projectConfig, {
|
|
344
344
|
name: kebabCase.kebabCase(userConfig.name),
|
|
345
|
-
projectType: userConfig.
|
|
345
|
+
projectType: userConfig.projectType || "library",
|
|
346
346
|
root,
|
|
347
347
|
sourceRoot: joinPaths.joinPaths(root, "src"),
|
|
348
348
|
targets
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { withExecutor } from './chunk-
|
|
1
|
+
import { withExecutor } from './chunk-EFG2AWKX.mjs';
|
|
2
2
|
import { __name } from './chunk-O6YSETKJ.mjs';
|
|
3
3
|
import defu from 'defu';
|
|
4
4
|
|
|
5
5
|
async function executorFn(context, api) {
|
|
6
6
|
await api.build(defu({
|
|
7
|
-
|
|
7
|
+
input: context.options.input,
|
|
8
8
|
skipCache: context.options.skipCache,
|
|
9
9
|
mode: context.options.mode
|
|
10
10
|
}, context.inlineConfig));
|
|
@@ -0,0 +1,281 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var chunkSHUYVCID_js = require('./chunk-SHUYVCID.js');
|
|
4
|
+
var parseTypeDefinition = require('@stryke/convert/parse-type-definition');
|
|
5
|
+
var toArray = require('@stryke/convert/to-array');
|
|
6
|
+
var murmurhash = require('@stryke/hash/murmurhash');
|
|
7
|
+
var getUnique = require('@stryke/helpers/get-unique');
|
|
8
|
+
var append = require('@stryke/path/append');
|
|
9
|
+
var isType = require('@stryke/path/is-type');
|
|
10
|
+
var joinPaths = require('@stryke/path/join-paths');
|
|
11
|
+
var replace = require('@stryke/path/replace');
|
|
12
|
+
var isObject = require('@stryke/type-checks/is-object');
|
|
13
|
+
var isRegexp = require('@stryke/type-checks/is-regexp');
|
|
14
|
+
var isSetString = require('@stryke/type-checks/is-set-string');
|
|
15
|
+
var isString = require('@stryke/type-checks/is-string');
|
|
16
|
+
var join = require('@stryke/path/join');
|
|
17
|
+
var logger = require('@storm-software/config-tools/logger');
|
|
18
|
+
var types = require('@storm-software/config-tools/types');
|
|
19
|
+
var colors = require('@storm-software/config-tools/utilities/colors');
|
|
20
|
+
var noop = require('@stryke/helpers/noop');
|
|
21
|
+
var kebabCase = require('@stryke/string-format/kebab-case');
|
|
22
|
+
var titleCase = require('@stryke/string-format/title-case');
|
|
23
|
+
var chalk = require('chalk');
|
|
24
|
+
var listFiles = require('@stryke/fs/list-files');
|
|
25
|
+
var isParentPath = require('@stryke/path/is-parent-path');
|
|
26
|
+
var prettier = require('prettier');
|
|
27
|
+
require('@stryke/fs/read-file');
|
|
28
|
+
var isSetObject = require('@stryke/type-checks/is-set-object');
|
|
29
|
+
require('magic-string');
|
|
30
|
+
var Diff = require('diff-match-patch');
|
|
31
|
+
require('@stryke/fs/write-file');
|
|
32
|
+
var getConfig = require('@storm-software/config-tools/get-config');
|
|
33
|
+
var exists = require('@stryke/fs/exists');
|
|
34
|
+
var isFunction = require('@stryke/type-checks/is-function');
|
|
35
|
+
var c12 = require('c12');
|
|
36
|
+
var defu = require('defu');
|
|
37
|
+
|
|
38
|
+
function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
|
|
39
|
+
|
|
40
|
+
var chalk__default = /*#__PURE__*/_interopDefault(chalk);
|
|
41
|
+
var Diff__default = /*#__PURE__*/_interopDefault(Diff);
|
|
42
|
+
var defu__default = /*#__PURE__*/_interopDefault(defu);
|
|
43
|
+
|
|
44
|
+
// ../core/src/lib/constants/meta.ts
|
|
45
|
+
var ROOT_HASH_LENGTH = 45;
|
|
46
|
+
var CACHE_HASH_LENGTH = 62;
|
|
47
|
+
|
|
48
|
+
// ../core/src/lib/constants/environments.ts
|
|
49
|
+
var DEFAULT_ENVIRONMENT = "default";
|
|
50
|
+
var GLOBAL_ENVIRONMENT = "__global__";
|
|
51
|
+
function replacePathTokens(context, path) {
|
|
52
|
+
if (!path) {
|
|
53
|
+
return path;
|
|
54
|
+
}
|
|
55
|
+
return path.replaceAll("{workspaceRoot}", context.workspaceConfig.workspaceRoot).replaceAll("{root}", context.config.root).replaceAll("{projectRoot}", context.config.root).replaceAll("{sourceRoot}", join.joinPaths(context.config.root, "src")).replaceAll("{powerlinesPath}", context.powerlinesPath).replaceAll("{cachePath}", context.cachePath).replaceAll("{dataPath}", context.dataPath).replaceAll("{logPath}", context.envPaths.log).replaceAll("{tempPath}", context.envPaths.temp).replaceAll("{configPath}", context.envPaths.config).replaceAll("{outputPath}", context.config.output.outputPath).replaceAll("{buildPath}", context.config.output.buildPath).replaceAll("{artifactsPath}", replace.replacePath(context.artifactsPath, context.workspaceConfig.workspaceRoot)).replaceAll("{builtinPath}", replace.replacePath(context.builtinsPath, context.workspaceConfig.workspaceRoot)).replaceAll("{entryPath}", replace.replacePath(context.entryPath, context.workspaceConfig.workspaceRoot));
|
|
56
|
+
}
|
|
57
|
+
chunkSHUYVCID_js.__name(replacePathTokens, "replacePathTokens");
|
|
58
|
+
|
|
59
|
+
// ../core/src/lib/entry.ts
|
|
60
|
+
function resolveEntryOutput(context, typeDefinition) {
|
|
61
|
+
return replace.replaceExtension(replace.replacePath(replace.replacePath(replace.replacePath(replace.replacePath(replace.replacePath(typeDefinition.file, joinPaths.joinPaths(context.workspaceConfig.workspaceRoot, context.config.root, "src")), joinPaths.joinPaths(context.workspaceConfig.workspaceRoot, context.config.root)), joinPaths.joinPaths(context.config.root, "src")), context.config.root), "src"));
|
|
62
|
+
}
|
|
63
|
+
chunkSHUYVCID_js.__name(resolveEntryOutput, "resolveEntryOutput");
|
|
64
|
+
function resolveEntry(context, typeDefinition, input, output) {
|
|
65
|
+
return {
|
|
66
|
+
...typeDefinition,
|
|
67
|
+
input: isSetString.isSetString(input) || isRegexp.isRegExp(input) ? {
|
|
68
|
+
file: String(input)
|
|
69
|
+
} : typeDefinition,
|
|
70
|
+
output: output || resolveEntryOutput(context, typeDefinition)
|
|
71
|
+
};
|
|
72
|
+
}
|
|
73
|
+
chunkSHUYVCID_js.__name(resolveEntry, "resolveEntry");
|
|
74
|
+
function isTypeDefinition(entry) {
|
|
75
|
+
return !isString.isString(entry) && entry.file !== void 0;
|
|
76
|
+
}
|
|
77
|
+
chunkSHUYVCID_js.__name(isTypeDefinition, "isTypeDefinition");
|
|
78
|
+
function isResolvedEntryTypeDefinition(entry) {
|
|
79
|
+
return !isRegexp.isRegExp(entry) && isTypeDefinition(entry) && entry.output !== void 0;
|
|
80
|
+
}
|
|
81
|
+
chunkSHUYVCID_js.__name(isResolvedEntryTypeDefinition, "isResolvedEntryTypeDefinition");
|
|
82
|
+
function resolveEntriesSync(context, typeDefinitions) {
|
|
83
|
+
return (isObject.isObject(typeDefinitions) ? Object.values(typeDefinitions).flat() : toArray.toArray(typeDefinitions)).map((entry) => {
|
|
84
|
+
if (isResolvedEntryTypeDefinition(entry)) {
|
|
85
|
+
return {
|
|
86
|
+
...entry,
|
|
87
|
+
output: entry.output ? replacePathTokens(context, entry.output) : void 0,
|
|
88
|
+
file: replacePathTokens(context, entry.file)
|
|
89
|
+
};
|
|
90
|
+
}
|
|
91
|
+
let typeDefinition;
|
|
92
|
+
if (isString.isString(entry)) {
|
|
93
|
+
typeDefinition = parseTypeDefinition.parseTypeDefinition(replacePathTokens(context, entry));
|
|
94
|
+
} else if (isRegexp.isRegExp(entry)) {
|
|
95
|
+
typeDefinition = {
|
|
96
|
+
file: replacePathTokens(context, entry.source)
|
|
97
|
+
};
|
|
98
|
+
} else {
|
|
99
|
+
typeDefinition = entry;
|
|
100
|
+
typeDefinition.file = replacePathTokens(context, typeDefinition.file);
|
|
101
|
+
}
|
|
102
|
+
const filePath = isType.isAbsolutePath(typeDefinition.file) ? typeDefinition.file : append.appendPath(typeDefinition.file, context.config.root);
|
|
103
|
+
if (context.fs.isFileSync(filePath)) {
|
|
104
|
+
return resolveEntry(context, {
|
|
105
|
+
file: append.appendPath(filePath, context.workspaceConfig.workspaceRoot),
|
|
106
|
+
name: typeDefinition.name
|
|
107
|
+
});
|
|
108
|
+
}
|
|
109
|
+
return context.fs.globSync(append.appendPath(filePath, context.workspaceConfig.workspaceRoot)).map((file) => resolveEntry(context, {
|
|
110
|
+
file,
|
|
111
|
+
name: typeDefinition.name
|
|
112
|
+
}));
|
|
113
|
+
}).flat().filter(Boolean);
|
|
114
|
+
}
|
|
115
|
+
chunkSHUYVCID_js.__name(resolveEntriesSync, "resolveEntriesSync");
|
|
116
|
+
function getUniqueInputs(inputs = []) {
|
|
117
|
+
return isObject.isObject(inputs) ? inputs : getUnique.getUniqueBy(toArray.toArray(inputs), (item) => isSetString.isSetString(item) ? item : murmurhash.murmurhash(item ?? {}, {
|
|
118
|
+
maxLength: 24
|
|
119
|
+
}));
|
|
120
|
+
}
|
|
121
|
+
chunkSHUYVCID_js.__name(getUniqueInputs, "getUniqueInputs");
|
|
122
|
+
var createLog = /* @__PURE__ */ chunkSHUYVCID_js.__name((name, options = {}) => {
|
|
123
|
+
const logLevel = options.logLevel === null ? types.LogLevelLabel.SILENT : options.logLevel || types.LogLevelLabel.INFO;
|
|
124
|
+
if (logLevel === types.LogLevelLabel.SILENT) {
|
|
125
|
+
return noop.noop;
|
|
126
|
+
}
|
|
127
|
+
if (options.customLogger) {
|
|
128
|
+
return options.customLogger;
|
|
129
|
+
}
|
|
130
|
+
return (type, ...args) => logger.getLogFn(logger.getLogLevel(type), {
|
|
131
|
+
...options,
|
|
132
|
+
logLevel
|
|
133
|
+
})(`${chalk__default.default.bold.hex(colors.getColor("brand", options))(`${name ? kebabCase.kebabCase(name) : ""}${options.name ? `${name ? chalk__default.default.gray(" > ") : ""}${kebabCase.kebabCase(options.name)}` : ""}${chalk__default.default.gray(" > ")}`)}${args.join(" ")} `.trim());
|
|
134
|
+
}, "createLog");
|
|
135
|
+
var BADGE_COLORS = [
|
|
136
|
+
"#00A0DD",
|
|
137
|
+
"#6FCE4E",
|
|
138
|
+
"#FBBF24",
|
|
139
|
+
"#F43F5E",
|
|
140
|
+
"#3B82F6",
|
|
141
|
+
"#A855F7",
|
|
142
|
+
"#469592",
|
|
143
|
+
"#288EDF",
|
|
144
|
+
"#D8B4FE",
|
|
145
|
+
"#10B981",
|
|
146
|
+
"#EF4444",
|
|
147
|
+
"#F0EC56",
|
|
148
|
+
"#F472B6",
|
|
149
|
+
"#22D3EE",
|
|
150
|
+
"#EAB308",
|
|
151
|
+
"#84CC16",
|
|
152
|
+
"#F87171",
|
|
153
|
+
"#0EA5E9",
|
|
154
|
+
"#D946EF",
|
|
155
|
+
"#FACC15",
|
|
156
|
+
"#34D399",
|
|
157
|
+
"#8B5CF6"
|
|
158
|
+
];
|
|
159
|
+
var extendLog = /* @__PURE__ */ chunkSHUYVCID_js.__name((logFn, name) => {
|
|
160
|
+
return (type, ...args) => logFn(type, ` ${chalk__default.default.inverse.hex(BADGE_COLORS[name.split("").map((char) => char.charCodeAt(0)).reduce((ret, charCode) => ret + charCode, 0) % BADGE_COLORS.length] || BADGE_COLORS[0])(` ${titleCase.titleCase(name)} `)} ${args.join(" ")} `);
|
|
161
|
+
}, "extendLog");
|
|
162
|
+
function getBaseFileHeader(context) {
|
|
163
|
+
return `
|
|
164
|
+
// Generated with ${titleCase.titleCase(context.config.framework)}
|
|
165
|
+
// Note: Do not edit this file manually - it will be overwritten automatically
|
|
166
|
+
`;
|
|
167
|
+
}
|
|
168
|
+
chunkSHUYVCID_js.__name(getBaseFileHeader, "getBaseFileHeader");
|
|
169
|
+
function getFileHeader(context, options = {}) {
|
|
170
|
+
const { directive = null, prettierIgnore = false } = options;
|
|
171
|
+
return `/* eslint-disable */
|
|
172
|
+
// biome-ignore lint: disable
|
|
173
|
+
${prettierIgnore ? `// prettier-ignore` : ""}${directive ? `
|
|
174
|
+
|
|
175
|
+
${directive}
|
|
176
|
+
` : "\n"}
|
|
177
|
+
${getBaseFileHeader(context)}
|
|
178
|
+
|
|
179
|
+
`;
|
|
180
|
+
}
|
|
181
|
+
chunkSHUYVCID_js.__name(getFileHeader, "getFileHeader");
|
|
182
|
+
async function format(context, path, data, force = false) {
|
|
183
|
+
if (!force && (isParentPath.isParentPath(path, append.appendPath(context.config.output.outputPath, context.workspaceConfig.workspaceRoot)) || isParentPath.isParentPath(path, append.appendPath(context.config.output.buildPath, context.workspaceConfig.workspaceRoot)))) {
|
|
184
|
+
return data;
|
|
185
|
+
}
|
|
186
|
+
let code = data;
|
|
187
|
+
const resolvedConfig = await prettier.resolveConfig(path);
|
|
188
|
+
if (resolvedConfig) {
|
|
189
|
+
code = await prettier.format(data, {
|
|
190
|
+
absolutePath: path,
|
|
191
|
+
...resolvedConfig
|
|
192
|
+
});
|
|
193
|
+
}
|
|
194
|
+
return code;
|
|
195
|
+
}
|
|
196
|
+
chunkSHUYVCID_js.__name(format, "format");
|
|
197
|
+
async function formatFolder(context, path) {
|
|
198
|
+
if (!isParentPath.isParentPath(path, append.appendPath(context.config.output.outputPath, context.workspaceConfig.workspaceRoot)) && !isParentPath.isParentPath(path, append.appendPath(context.config.output.buildPath, context.workspaceConfig.workspaceRoot))) {
|
|
199
|
+
await Promise.allSettled((await listFiles.listFiles(path)).map(async (file) => {
|
|
200
|
+
if (!isParentPath.isParentPath(file, append.appendPath(context.config.output.outputPath, context.workspaceConfig.workspaceRoot)) && !isParentPath.isParentPath(file, append.appendPath(context.config.output.buildPath, context.workspaceConfig.workspaceRoot))) {
|
|
201
|
+
const data = await context.fs.read(file);
|
|
202
|
+
if (data) {
|
|
203
|
+
const formatted = await format(context, file, data);
|
|
204
|
+
return context.fs.write(file, formatted);
|
|
205
|
+
}
|
|
206
|
+
}
|
|
207
|
+
}));
|
|
208
|
+
}
|
|
209
|
+
}
|
|
210
|
+
chunkSHUYVCID_js.__name(formatFolder, "formatFolder");
|
|
211
|
+
new Diff__default.default();
|
|
212
|
+
async function loadWorkspaceConfig(workspaceRoot, cwd) {
|
|
213
|
+
return defu__default.default({
|
|
214
|
+
workspaceRoot
|
|
215
|
+
}, await getConfig.getWorkspaceConfig(true, {
|
|
216
|
+
cwd,
|
|
217
|
+
workspaceRoot,
|
|
218
|
+
useDefault: true
|
|
219
|
+
}));
|
|
220
|
+
}
|
|
221
|
+
chunkSHUYVCID_js.__name(loadWorkspaceConfig, "loadWorkspaceConfig");
|
|
222
|
+
async function loadUserConfigFile(projectRoot, workspaceRoot, jiti, command, mode = "production", configFile, framework = "powerlines") {
|
|
223
|
+
let resolvedUserConfig = {};
|
|
224
|
+
let resolvedUserConfigFile;
|
|
225
|
+
if (configFile) {
|
|
226
|
+
resolvedUserConfigFile = exists.existsSync(replace.replacePath(configFile, projectRoot)) ? replace.replacePath(configFile, projectRoot) : exists.existsSync(joinPaths.joinPaths(append.appendPath(projectRoot, workspaceRoot), replace.replacePath(configFile, projectRoot))) ? joinPaths.joinPaths(append.appendPath(projectRoot, workspaceRoot), replace.replacePath(configFile, projectRoot)) : exists.existsSync(joinPaths.joinPaths(append.appendPath(projectRoot, workspaceRoot), configFile)) ? joinPaths.joinPaths(append.appendPath(projectRoot, workspaceRoot), configFile) : void 0;
|
|
227
|
+
}
|
|
228
|
+
if (!resolvedUserConfigFile) {
|
|
229
|
+
resolvedUserConfigFile = exists.existsSync(joinPaths.joinPaths(append.appendPath(projectRoot, workspaceRoot), `${framework}.${mode}.config.ts`)) ? joinPaths.joinPaths(append.appendPath(projectRoot, workspaceRoot), `${framework}.${mode}.config.ts`) : exists.existsSync(joinPaths.joinPaths(append.appendPath(projectRoot, workspaceRoot), `${framework}.${mode}.config.js`)) ? joinPaths.joinPaths(append.appendPath(projectRoot, workspaceRoot), `${framework}.${mode}.config.js`) : exists.existsSync(joinPaths.joinPaths(append.appendPath(projectRoot, workspaceRoot), `${framework}.${mode}.config.mts`)) ? joinPaths.joinPaths(append.appendPath(projectRoot, workspaceRoot), `${framework}.${mode}.config.mts`) : exists.existsSync(joinPaths.joinPaths(append.appendPath(projectRoot, workspaceRoot), `${framework}.${mode}.config.mjs`)) ? joinPaths.joinPaths(append.appendPath(projectRoot, workspaceRoot), `${framework}.${mode}.config.mjs`) : exists.existsSync(joinPaths.joinPaths(append.appendPath(projectRoot, workspaceRoot), `${framework}.config.ts`)) ? joinPaths.joinPaths(append.appendPath(projectRoot, workspaceRoot), `${framework}.config.ts`) : exists.existsSync(joinPaths.joinPaths(append.appendPath(projectRoot, workspaceRoot), `${framework}.config.js`)) ? joinPaths.joinPaths(append.appendPath(projectRoot, workspaceRoot), `${framework}.config.js`) : exists.existsSync(joinPaths.joinPaths(append.appendPath(projectRoot, workspaceRoot), `${framework}.config.mts`)) ? joinPaths.joinPaths(append.appendPath(projectRoot, workspaceRoot), `${framework}.config.mts`) : exists.existsSync(joinPaths.joinPaths(append.appendPath(projectRoot, workspaceRoot), `${framework}.config.mjs`)) ? joinPaths.joinPaths(append.appendPath(projectRoot, workspaceRoot), `${framework}.config.mjs`) : void 0;
|
|
230
|
+
}
|
|
231
|
+
if (resolvedUserConfigFile) {
|
|
232
|
+
const resolved = await jiti.import(jiti.esmResolve(resolvedUserConfigFile));
|
|
233
|
+
if (resolved) {
|
|
234
|
+
let config = {};
|
|
235
|
+
if (isFunction.isFunction(resolved)) {
|
|
236
|
+
config = await Promise.resolve(resolved({
|
|
237
|
+
command,
|
|
238
|
+
mode,
|
|
239
|
+
isSsrBuild: false,
|
|
240
|
+
isPreview: false
|
|
241
|
+
}));
|
|
242
|
+
}
|
|
243
|
+
if (isSetObject.isSetObject(config)) {
|
|
244
|
+
resolvedUserConfig = {
|
|
245
|
+
...config,
|
|
246
|
+
config,
|
|
247
|
+
configFile: resolvedUserConfigFile
|
|
248
|
+
};
|
|
249
|
+
}
|
|
250
|
+
}
|
|
251
|
+
}
|
|
252
|
+
const result = await c12.loadConfig({
|
|
253
|
+
cwd: projectRoot,
|
|
254
|
+
name: framework,
|
|
255
|
+
envName: mode,
|
|
256
|
+
globalRc: true,
|
|
257
|
+
packageJson: true,
|
|
258
|
+
dotenv: true,
|
|
259
|
+
jiti
|
|
260
|
+
});
|
|
261
|
+
return defu__default.default(resolvedUserConfig, isSetObject.isSetObject(result?.config) ? {
|
|
262
|
+
...result.config,
|
|
263
|
+
...result
|
|
264
|
+
} : {});
|
|
265
|
+
}
|
|
266
|
+
chunkSHUYVCID_js.__name(loadUserConfigFile, "loadUserConfigFile");
|
|
267
|
+
|
|
268
|
+
exports.CACHE_HASH_LENGTH = CACHE_HASH_LENGTH;
|
|
269
|
+
exports.DEFAULT_ENVIRONMENT = DEFAULT_ENVIRONMENT;
|
|
270
|
+
exports.GLOBAL_ENVIRONMENT = GLOBAL_ENVIRONMENT;
|
|
271
|
+
exports.ROOT_HASH_LENGTH = ROOT_HASH_LENGTH;
|
|
272
|
+
exports.createLog = createLog;
|
|
273
|
+
exports.extendLog = extendLog;
|
|
274
|
+
exports.format = format;
|
|
275
|
+
exports.formatFolder = formatFolder;
|
|
276
|
+
exports.getFileHeader = getFileHeader;
|
|
277
|
+
exports.getUniqueInputs = getUniqueInputs;
|
|
278
|
+
exports.loadUserConfigFile = loadUserConfigFile;
|
|
279
|
+
exports.loadWorkspaceConfig = loadWorkspaceConfig;
|
|
280
|
+
exports.replacePathTokens = replacePathTokens;
|
|
281
|
+
exports.resolveEntriesSync = resolveEntriesSync;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { base_executor_untyped_default } from './chunk-
|
|
1
|
+
import { base_executor_untyped_default } from './chunk-4OMPO3GC.mjs';
|
|
2
2
|
import { defineUntypedSchema } from 'untyped';
|
|
3
3
|
|
|
4
4
|
var untyped_default = defineUntypedSchema({
|
|
@@ -9,18 +9,18 @@ var untyped_default = defineUntypedSchema({
|
|
|
9
9
|
description: "A type definition for the Powerlines - Prepare executor schema",
|
|
10
10
|
required: []
|
|
11
11
|
},
|
|
12
|
-
|
|
12
|
+
autoInstall: {
|
|
13
13
|
$schema: {
|
|
14
|
-
title: "
|
|
14
|
+
title: "Auto Install",
|
|
15
15
|
type: "boolean",
|
|
16
|
-
description: "
|
|
16
|
+
description: "Automatically install dependencies during prepare stage"
|
|
17
17
|
}
|
|
18
18
|
},
|
|
19
|
-
|
|
19
|
+
skipCache: {
|
|
20
20
|
$schema: {
|
|
21
|
-
title: "
|
|
21
|
+
title: "Skip Cache",
|
|
22
22
|
type: "boolean",
|
|
23
|
-
description: "
|
|
23
|
+
description: "Skip the caching mechanism during the build process (if required)"
|
|
24
24
|
}
|
|
25
25
|
}
|
|
26
26
|
});
|
|
@@ -1,28 +1,28 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunk3BI2YVJ3_js = require('./chunk-3BI2YVJ3.js');
|
|
4
4
|
var untyped = require('untyped');
|
|
5
5
|
|
|
6
6
|
var untyped_default = untyped.defineUntypedSchema({
|
|
7
|
-
...
|
|
7
|
+
...chunk3BI2YVJ3_js.base_executor_untyped_default,
|
|
8
8
|
$schema: {
|
|
9
9
|
id: "PrepareExecutorSchema",
|
|
10
10
|
title: "Prepare Executor",
|
|
11
11
|
description: "A type definition for the Powerlines - Prepare executor schema",
|
|
12
12
|
required: []
|
|
13
13
|
},
|
|
14
|
-
|
|
14
|
+
autoInstall: {
|
|
15
15
|
$schema: {
|
|
16
|
-
title: "
|
|
16
|
+
title: "Auto Install",
|
|
17
17
|
type: "boolean",
|
|
18
|
-
description: "
|
|
18
|
+
description: "Automatically install dependencies during prepare stage"
|
|
19
19
|
}
|
|
20
20
|
},
|
|
21
|
-
|
|
21
|
+
skipCache: {
|
|
22
22
|
$schema: {
|
|
23
|
-
title: "
|
|
23
|
+
title: "Skip Cache",
|
|
24
24
|
type: "boolean",
|
|
25
|
-
description: "
|
|
25
|
+
description: "Skip the caching mechanism during the build process (if required)"
|
|
26
26
|
}
|
|
27
27
|
}
|
|
28
28
|
});
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunkZVVHO24E_js = require('./chunk-ZVVHO24E.js');
|
|
4
4
|
var chunkSHUYVCID_js = require('./chunk-SHUYVCID.js');
|
|
5
5
|
var defu = require('defu');
|
|
6
6
|
|
|
@@ -19,7 +19,7 @@ async function executorFn(context, api) {
|
|
|
19
19
|
};
|
|
20
20
|
}
|
|
21
21
|
chunkSHUYVCID_js.__name(executorFn, "executorFn");
|
|
22
|
-
var executor =
|
|
22
|
+
var executor = chunkZVVHO24E_js.withExecutor("prepare", executorFn);
|
|
23
23
|
var executor_default = executor;
|
|
24
24
|
|
|
25
25
|
exports.executorFn = executorFn;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunkZVVHO24E_js = require('./chunk-ZVVHO24E.js');
|
|
4
4
|
var chunkSHUYVCID_js = require('./chunk-SHUYVCID.js');
|
|
5
5
|
|
|
6
6
|
// src/executors/clean/executor.ts
|
|
@@ -11,7 +11,7 @@ async function executorFn(context, api) {
|
|
|
11
11
|
};
|
|
12
12
|
}
|
|
13
13
|
chunkSHUYVCID_js.__name(executorFn, "executorFn");
|
|
14
|
-
var executor =
|
|
14
|
+
var executor = chunkZVVHO24E_js.withExecutor("clean", executorFn);
|
|
15
15
|
var executor_default = executor;
|
|
16
16
|
|
|
17
17
|
exports.executorFn = executorFn;
|