@powerlines/nx 0.11.217 → 0.11.219
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 +16 -0
- package/dist/chunk-3BI2YVJ3.js +156 -0
- package/dist/{chunk-AQU4Y7TY.mjs → chunk-4KF5AUPD.mjs} +1 -1
- package/dist/chunk-4OMPO3GC.mjs +154 -0
- package/dist/{chunk-MMYSL52M.mjs → chunk-7EWOPOET.mjs} +220 -388
- package/dist/{chunk-JQZOWO7J.mjs → chunk-FIOTA3DI.mjs} +1 -1
- package/dist/chunk-FSGRYCTL.js +281 -0
- package/dist/{chunk-UWZA4FE6.mjs → chunk-GB6SETBZ.mjs} +1 -1
- package/dist/{chunk-2YJP4HRC.mjs → chunk-GCIPEE4T.mjs} +7 -7
- package/dist/{chunk-WJP3FWAH.js → chunk-GJ62I4AV.js} +2 -2
- package/dist/chunk-HNRM52ID.js +374 -0
- package/dist/chunk-IA3YWWWC.mjs +366 -0
- package/dist/{chunk-VSMLSWBT.js → chunk-IOBDAGVL.js} +8 -8
- package/dist/chunk-JL4HQ7ZD.mjs +260 -0
- package/dist/{chunk-5XND6U2P.js → chunk-K6HPKAIP.js} +2 -2
- package/dist/{chunk-TL367T24.js → chunk-KAY4UTGV.js} +2 -2
- package/dist/{chunk-2OUVFH73.js → chunk-MYNOF2F6.js} +2 -2
- package/dist/{chunk-5QDW5A4Z.js → chunk-QA32JCA6.js} +2 -2
- package/dist/{chunk-ELBUYWVF.mjs → chunk-QN6ZKFPV.mjs} +1 -1
- package/dist/{chunk-BUUW4BAS.mjs → chunk-RLKRZBG3.mjs} +2 -2
- package/dist/{chunk-C4XEVBMI.mjs → chunk-ULCS2R4D.mjs} +1 -1
- package/dist/{chunk-QJE3HWRQ.js → chunk-WXALQB3J.js} +3 -3
- package/dist/{chunk-BM4NZS6T.js → chunk-ZODDB4GG.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.d.mts +1 -1
- package/dist/src/helpers/plugin-utilities.d.ts +1 -1
- 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-TWOXCXFE.js +0 -364
- package/dist/chunk-XXWF7X5C.mjs +0 -75
- package/dist/chunk-ZYOL33SX.mjs +0 -356
|
@@ -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,9 +1,9 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunkHNRM52ID_js = require('./chunk-HNRM52ID.js');
|
|
4
4
|
|
|
5
5
|
// src/plugin/index.ts
|
|
6
|
-
var createNodesV2 =
|
|
6
|
+
var createNodesV2 = chunkHNRM52ID_js.createNxPlugin({
|
|
7
7
|
framework: "powerlines"
|
|
8
8
|
});
|
|
9
9
|
|