@storm-software/unbuild 0.49.34 → 0.49.35
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/README.md +1 -1
- package/bin/unbuild.cjs +37 -46
- package/bin/unbuild.js +37 -46
- package/dist/build.cjs +7 -7
- package/dist/build.js +6 -6
- package/dist/{chunk-K4ZHJTO2.cjs → chunk-3XRGRZN3.cjs} +123 -129
- package/dist/{chunk-ZKTNXGEF.cjs → chunk-5KAGDMCA.cjs} +2 -2
- package/dist/{chunk-OHCC62S7.js → chunk-5XOAK534.js} +1 -1
- package/dist/{chunk-VZQDYKJV.cjs → chunk-7CTYKC3M.cjs} +3 -3
- package/dist/{chunk-OEWYDDEF.cjs → chunk-BOURL2AF.cjs} +3 -3
- package/dist/{chunk-WHSDAXF3.cjs → chunk-DBA3KANT.cjs} +2 -2
- package/dist/{chunk-YBFLGHF3.cjs → chunk-FMIGI6JG.cjs} +17 -20
- package/dist/{chunk-2NL7D6LZ.js → chunk-HPUTMCFR.js} +1 -1
- package/dist/{chunk-2363GX3V.js → chunk-IHFYK7AH.js} +25 -31
- package/dist/{chunk-5LTNOK6K.js → chunk-NE22YS5A.js} +1 -1
- package/dist/{chunk-YWONX7HR.js → chunk-PN4YHJFZ.js} +17 -20
- package/dist/{chunk-J6YEEFZI.js → chunk-SFZ4V2LD.js} +1 -1
- package/dist/clean.cjs +3 -3
- package/dist/clean.js +2 -2
- package/dist/index.cjs +7 -7
- package/dist/index.js +6 -6
- package/dist/plugins/analyze.cjs +3 -3
- package/dist/plugins/analyze.js +2 -2
- package/dist/plugins/on-error.cjs +3 -3
- package/dist/plugins/on-error.js +2 -2
- package/dist/plugins/tsc.cjs +3 -3
- package/dist/plugins/tsc.js +2 -2
- package/package.json +4 -4
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var _chunkBOURL2AFcjs = require('./chunk-BOURL2AF.cjs');
|
|
4
4
|
|
|
5
5
|
|
|
6
|
-
var
|
|
6
|
+
var _chunk5KAGDMCAcjs = require('./chunk-5KAGDMCA.cjs');
|
|
7
7
|
|
|
8
8
|
|
|
9
|
-
var
|
|
9
|
+
var _chunk7CTYKC3Mcjs = require('./chunk-7CTYKC3M.cjs');
|
|
10
10
|
|
|
11
11
|
|
|
12
12
|
|
|
13
|
-
var
|
|
13
|
+
var _chunkDBA3KANTcjs = require('./chunk-DBA3KANT.cjs');
|
|
14
14
|
|
|
15
15
|
|
|
16
16
|
|
|
@@ -34,7 +34,7 @@ var _chunkWHSDAXF3cjs = require('./chunk-WHSDAXF3.cjs');
|
|
|
34
34
|
|
|
35
35
|
|
|
36
36
|
|
|
37
|
-
var
|
|
37
|
+
var _chunkFMIGI6JGcjs = require('./chunk-FMIGI6JG.cjs');
|
|
38
38
|
|
|
39
39
|
// src/build.ts
|
|
40
40
|
|
|
@@ -88,9 +88,9 @@ var copyAssets = async (config, assets, outputPath, projectRoot, sourceRoot, gen
|
|
|
88
88
|
output: "src/"
|
|
89
89
|
});
|
|
90
90
|
}
|
|
91
|
-
|
|
91
|
+
_chunkFMIGI6JGcjs.writeTrace.call(void 0,
|
|
92
92
|
`\u{1F4DD} Copying the following assets to the output directory:
|
|
93
|
-
${pendingAssets.map((pendingAsset) => typeof pendingAsset === "string" ? ` - ${pendingAsset} -> ${outputPath}` : ` - ${pendingAsset.input}/${pendingAsset.glob} -> ${
|
|
93
|
+
${pendingAssets.map((pendingAsset) => typeof pendingAsset === "string" ? ` - ${pendingAsset} -> ${outputPath}` : ` - ${pendingAsset.input}/${pendingAsset.glob} -> ${_chunkFMIGI6JGcjs.joinPaths.call(void 0, outputPath, pendingAsset.output)}`).join("\n")}`,
|
|
94
94
|
config
|
|
95
95
|
);
|
|
96
96
|
const assetHandler = new (0, _copyassetshandler.CopyAssetsHandler)({
|
|
@@ -101,18 +101,18 @@ ${pendingAssets.map((pendingAsset) => typeof pendingAsset === "string" ? ` - ${p
|
|
|
101
101
|
});
|
|
102
102
|
await assetHandler.processAllAssetsOnce();
|
|
103
103
|
if (includeSrc === true) {
|
|
104
|
-
|
|
105
|
-
`\u{1F4DD} Adding banner and writing source files: ${
|
|
104
|
+
_chunkFMIGI6JGcjs.writeDebug.call(void 0,
|
|
105
|
+
`\u{1F4DD} Adding banner and writing source files: ${_chunkFMIGI6JGcjs.joinPaths.call(void 0,
|
|
106
106
|
outputPath,
|
|
107
107
|
"src"
|
|
108
108
|
)}`,
|
|
109
109
|
config
|
|
110
110
|
);
|
|
111
111
|
const files = await _glob.glob.call(void 0, [
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
112
|
+
_chunkFMIGI6JGcjs.joinPaths.call(void 0, config.workspaceRoot, outputPath, "src/**/*.ts"),
|
|
113
|
+
_chunkFMIGI6JGcjs.joinPaths.call(void 0, config.workspaceRoot, outputPath, "src/**/*.tsx"),
|
|
114
|
+
_chunkFMIGI6JGcjs.joinPaths.call(void 0, config.workspaceRoot, outputPath, "src/**/*.js"),
|
|
115
|
+
_chunkFMIGI6JGcjs.joinPaths.call(void 0, config.workspaceRoot, outputPath, "src/**/*.jsx")
|
|
116
116
|
]);
|
|
117
117
|
await Promise.allSettled(
|
|
118
118
|
files.map(
|
|
@@ -167,7 +167,7 @@ var addPackageDependencies = async (workspaceRoot, projectRoot, projectName, pac
|
|
|
167
167
|
)) {
|
|
168
168
|
const projectNode = project.node;
|
|
169
169
|
if (projectNode.data.root) {
|
|
170
|
-
const projectPackageJsonPath =
|
|
170
|
+
const projectPackageJsonPath = _chunkFMIGI6JGcjs.joinPaths.call(void 0,
|
|
171
171
|
workspaceRoot,
|
|
172
172
|
projectNode.data.root,
|
|
173
173
|
"package.json"
|
|
@@ -185,11 +185,11 @@ var addPackageDependencies = async (workspaceRoot, projectRoot, projectName, pac
|
|
|
185
185
|
}
|
|
186
186
|
}
|
|
187
187
|
if (localPackages.length > 0) {
|
|
188
|
-
|
|
188
|
+
_chunkFMIGI6JGcjs.writeTrace.call(void 0,
|
|
189
189
|
`\u{1F4E6} Adding local packages to package.json: ${localPackages.map((p) => p.name).join(", ")}`
|
|
190
190
|
);
|
|
191
191
|
const projectJsonFile = await _promises.readFile.call(void 0,
|
|
192
|
-
|
|
192
|
+
_chunkFMIGI6JGcjs.joinPaths.call(void 0, projectRoot, "project.json"),
|
|
193
193
|
"utf8"
|
|
194
194
|
);
|
|
195
195
|
const projectJson = JSON.parse(projectJsonFile);
|
|
@@ -202,7 +202,7 @@ var addPackageDependencies = async (workspaceRoot, projectRoot, projectName, pac
|
|
|
202
202
|
}
|
|
203
203
|
const implicitDependencies = _optionalChain([projectConfigurations, 'access', _9 => _9.projects, 'optionalAccess', _10 => _10[projectName2], 'access', _11 => _11.implicitDependencies, 'optionalAccess', _12 => _12.reduce, 'call', _13 => _13((ret, dep) => {
|
|
204
204
|
if (_optionalChain([projectConfigurations, 'access', _14 => _14.projects, 'optionalAccess', _15 => _15[dep]])) {
|
|
205
|
-
const depPackageJsonPath =
|
|
205
|
+
const depPackageJsonPath = _chunkFMIGI6JGcjs.joinPaths.call(void 0,
|
|
206
206
|
workspaceRoot,
|
|
207
207
|
projectConfigurations.projects[dep].root,
|
|
208
208
|
"package.json"
|
|
@@ -233,14 +233,14 @@ var addPackageDependencies = async (workspaceRoot, projectRoot, projectName, pac
|
|
|
233
233
|
return ret;
|
|
234
234
|
}, _nullishCoalesce(packageJson.devDependencies, () => ( {})));
|
|
235
235
|
} else {
|
|
236
|
-
|
|
236
|
+
_chunkFMIGI6JGcjs.writeTrace.call(void 0, "\u{1F4E6} No local packages dependencies to add to package.json");
|
|
237
237
|
}
|
|
238
238
|
return packageJson;
|
|
239
239
|
};
|
|
240
240
|
var addWorkspacePackageJsonFields = async (workspaceConfig, projectRoot, sourceRoot, projectName, includeSrc = false, packageJson) => {
|
|
241
|
-
const workspaceRoot = workspaceConfig.workspaceRoot ? workspaceConfig.workspaceRoot :
|
|
241
|
+
const workspaceRoot = workspaceConfig.workspaceRoot ? workspaceConfig.workspaceRoot : _chunkFMIGI6JGcjs.findWorkspaceRoot.call(void 0, );
|
|
242
242
|
const workspacePackageJsonContent = await _promises.readFile.call(void 0,
|
|
243
|
-
|
|
243
|
+
_chunkFMIGI6JGcjs.joinPaths.call(void 0, workspaceRoot, "package.json"),
|
|
244
244
|
"utf8"
|
|
245
245
|
);
|
|
246
246
|
const workspacePackageJson = JSON.parse(workspacePackageJsonContent);
|
|
@@ -251,7 +251,7 @@ var addWorkspacePackageJsonFields = async (workspaceConfig, projectRoot, sourceR
|
|
|
251
251
|
if (distSrc.startsWith("/")) {
|
|
252
252
|
distSrc = distSrc.substring(1);
|
|
253
253
|
}
|
|
254
|
-
packageJson.source ??= `${
|
|
254
|
+
packageJson.source ??= `${_chunkFMIGI6JGcjs.joinPaths.call(void 0, distSrc, "index.ts").replaceAll("\\", "/")}`;
|
|
255
255
|
}
|
|
256
256
|
packageJson.files ??= ["dist/**/*"];
|
|
257
257
|
if (includeSrc === true && !packageJson.files.includes("src")) {
|
|
@@ -276,7 +276,7 @@ var addWorkspacePackageJsonFields = async (workspaceConfig, projectRoot, sourceR
|
|
|
276
276
|
packageJson.contributors = [packageJson.author];
|
|
277
277
|
}
|
|
278
278
|
packageJson.repository ??= workspacePackageJson.repository;
|
|
279
|
-
packageJson.repository.directory ??= projectRoot ? projectRoot :
|
|
279
|
+
packageJson.repository.directory ??= projectRoot ? projectRoot : _chunkFMIGI6JGcjs.joinPaths.call(void 0, "packages", projectName);
|
|
280
280
|
return packageJson;
|
|
281
281
|
};
|
|
282
282
|
|
|
@@ -284,7 +284,7 @@ var addWorkspacePackageJsonFields = async (workspaceConfig, projectRoot, sourceR
|
|
|
284
284
|
var _c12 = require('c12');
|
|
285
285
|
var _defu = require('defu'); var _defu2 = _interopRequireDefault(_defu);
|
|
286
286
|
var getConfigFileByName = async (fileName, filePath, options = {}) => {
|
|
287
|
-
const workspacePath = filePath ||
|
|
287
|
+
const workspacePath = filePath || _chunkFMIGI6JGcjs.findWorkspaceRoot.call(void 0, filePath);
|
|
288
288
|
const configs = await Promise.all([
|
|
289
289
|
_c12.loadConfig.call(void 0, {
|
|
290
290
|
cwd: workspacePath,
|
|
@@ -293,7 +293,7 @@ var getConfigFileByName = async (fileName, filePath, options = {}) => {
|
|
|
293
293
|
envName: _optionalChain([fileName, 'optionalAccess', _24 => _24.toUpperCase, 'call', _25 => _25()]),
|
|
294
294
|
jitiOptions: {
|
|
295
295
|
debug: false,
|
|
296
|
-
fsCache: process.env.STORM_SKIP_CACHE === "true" ? false :
|
|
296
|
+
fsCache: process.env.STORM_SKIP_CACHE === "true" ? false : _chunkFMIGI6JGcjs.joinPaths.call(void 0,
|
|
297
297
|
process.env.STORM_CACHE_DIR || "node_modules/.cache/storm",
|
|
298
298
|
"jiti"
|
|
299
299
|
)
|
|
@@ -307,7 +307,7 @@ var getConfigFileByName = async (fileName, filePath, options = {}) => {
|
|
|
307
307
|
envName: _optionalChain([fileName, 'optionalAccess', _26 => _26.toUpperCase, 'call', _27 => _27()]),
|
|
308
308
|
jitiOptions: {
|
|
309
309
|
debug: false,
|
|
310
|
-
fsCache: process.env.STORM_SKIP_CACHE === "true" ? false :
|
|
310
|
+
fsCache: process.env.STORM_SKIP_CACHE === "true" ? false : _chunkFMIGI6JGcjs.joinPaths.call(void 0,
|
|
311
311
|
process.env.STORM_CACHE_DIR || "node_modules/.cache/storm",
|
|
312
312
|
"jiti"
|
|
313
313
|
)
|
|
@@ -319,12 +319,12 @@ var getConfigFileByName = async (fileName, filePath, options = {}) => {
|
|
|
319
319
|
return _defu2.default.call(void 0, _nullishCoalesce(configs[0], () => ( {})), _nullishCoalesce(configs[1], () => ( {})));
|
|
320
320
|
};
|
|
321
321
|
var getConfigFile = async (filePath, additionalFileNames = []) => {
|
|
322
|
-
const workspacePath = filePath ? filePath :
|
|
322
|
+
const workspacePath = filePath ? filePath : _chunkFMIGI6JGcjs.findWorkspaceRoot.call(void 0, filePath);
|
|
323
323
|
const result = await getConfigFileByName("storm-workspace", workspacePath);
|
|
324
324
|
let config = result.config;
|
|
325
325
|
const configFile = result.configFile;
|
|
326
326
|
if (config && configFile && Object.keys(config).length > 0 && !config.skipConfigLogging) {
|
|
327
|
-
|
|
327
|
+
_chunkFMIGI6JGcjs.writeTrace.call(void 0,
|
|
328
328
|
`Found Storm configuration file "${configFile.includes(`${workspacePath}/`) ? configFile.replace(`${workspacePath}/`, "") : configFile}" at "${workspacePath}"`,
|
|
329
329
|
{
|
|
330
330
|
logLevel: "all"
|
|
@@ -340,7 +340,7 @@ var getConfigFile = async (filePath, additionalFileNames = []) => {
|
|
|
340
340
|
for (const result2 of results) {
|
|
341
341
|
if (_optionalChain([result2, 'optionalAccess', _28 => _28.config]) && _optionalChain([result2, 'optionalAccess', _29 => _29.configFile]) && Object.keys(result2.config).length > 0) {
|
|
342
342
|
if (!config.skipConfigLogging && !result2.config.skipConfigLogging) {
|
|
343
|
-
|
|
343
|
+
_chunkFMIGI6JGcjs.writeTrace.call(void 0,
|
|
344
344
|
`Found alternative configuration file "${result2.configFile.includes(`${workspacePath}/`) ? result2.configFile.replace(`${workspacePath}/`, "") : result2.configFile}" at "${workspacePath}"`,
|
|
345
345
|
{
|
|
346
346
|
logLevel: "all"
|
|
@@ -394,13 +394,13 @@ var getConfigEnv = () => {
|
|
|
394
394
|
codesFile: process.env[`${prefix}ERROR_CODES_FILE`] || void 0,
|
|
395
395
|
url: process.env[`${prefix}ERROR_URL`] || void 0
|
|
396
396
|
},
|
|
397
|
-
|
|
398
|
-
twitter: process.env[`${prefix}
|
|
399
|
-
discord: process.env[`${prefix}
|
|
400
|
-
telegram: process.env[`${prefix}
|
|
401
|
-
slack: process.env[`${prefix}
|
|
402
|
-
medium: process.env[`${prefix}
|
|
403
|
-
github: process.env[`${prefix}
|
|
397
|
+
socials: {
|
|
398
|
+
twitter: process.env[`${prefix}SOCIAL_TWITTER`] || void 0,
|
|
399
|
+
discord: process.env[`${prefix}SOCIAL_DISCORD`] || void 0,
|
|
400
|
+
telegram: process.env[`${prefix}SOCIAL_TELEGRAM`] || void 0,
|
|
401
|
+
slack: process.env[`${prefix}SOCIAL_SLACK`] || void 0,
|
|
402
|
+
medium: process.env[`${prefix}SOCIAL_MEDIUM`] || void 0,
|
|
403
|
+
github: process.env[`${prefix}SOCIAL_GITHUB`] || void 0
|
|
404
404
|
},
|
|
405
405
|
organization: process.env[`${prefix}ORG`] || process.env[`${prefix}ORGANIZATION`] || process.env[`${prefix}ORG_NAME`] || process.env[`${prefix}ORGANIZATION_NAME`] ? process.env[`${prefix}ORG_DESCRIPTION`] || process.env[`${prefix}ORGANIZATION_DESCRIPTION`] || process.env[`${prefix}ORG_URL`] || process.env[`${prefix}ORGANIZATION_URL`] || process.env[`${prefix}ORG_LOGO`] || process.env[`${prefix}ORGANIZATION_LOGO`] ? {
|
|
406
406
|
name: process.env[`${prefix}ORG`] || process.env[`${prefix}ORGANIZATION`] || process.env[`${prefix}ORG_NAME`] || process.env[`${prefix}ORGANIZATION_NAME`],
|
|
@@ -419,15 +419,15 @@ var getConfigEnv = () => {
|
|
|
419
419
|
support: process.env[`${prefix}SUPPORT`] || void 0,
|
|
420
420
|
timezone: process.env[`${prefix}TIMEZONE`] || process.env.TZ || void 0,
|
|
421
421
|
locale: process.env[`${prefix}LOCALE`] || process.env.LOCALE || void 0,
|
|
422
|
-
configFile: process.env[`${prefix}CONFIG_FILE`] ?
|
|
423
|
-
workspaceRoot: process.env[`${prefix}WORKSPACE_ROOT`] ?
|
|
422
|
+
configFile: process.env[`${prefix}CONFIG_FILE`] ? _chunkFMIGI6JGcjs.correctPaths.call(void 0, process.env[`${prefix}CONFIG_FILE`]) : void 0,
|
|
423
|
+
workspaceRoot: process.env[`${prefix}WORKSPACE_ROOT`] ? _chunkFMIGI6JGcjs.correctPaths.call(void 0, process.env[`${prefix}WORKSPACE_ROOT`]) : void 0,
|
|
424
424
|
directories: {
|
|
425
|
-
cache: process.env[`${prefix}CACHE_DIR`] ?
|
|
426
|
-
data: process.env[`${prefix}DATA_DIR`] ?
|
|
427
|
-
config: process.env[`${prefix}CONFIG_DIR`] ?
|
|
428
|
-
temp: process.env[`${prefix}TEMP_DIR`] ?
|
|
429
|
-
log: process.env[`${prefix}LOG_DIR`] ?
|
|
430
|
-
build: process.env[`${prefix}BUILD_DIR`] ?
|
|
425
|
+
cache: process.env[`${prefix}CACHE_DIR`] ? _chunkFMIGI6JGcjs.correctPaths.call(void 0, process.env[`${prefix}CACHE_DIR`]) : process.env[`${prefix}CACHE_DIRECTORY`] ? _chunkFMIGI6JGcjs.correctPaths.call(void 0, process.env[`${prefix}CACHE_DIRECTORY`]) : void 0,
|
|
426
|
+
data: process.env[`${prefix}DATA_DIR`] ? _chunkFMIGI6JGcjs.correctPaths.call(void 0, process.env[`${prefix}DATA_DIR`]) : process.env[`${prefix}DATA_DIRECTORY`] ? _chunkFMIGI6JGcjs.correctPaths.call(void 0, process.env[`${prefix}DATA_DIRECTORY`]) : void 0,
|
|
427
|
+
config: process.env[`${prefix}CONFIG_DIR`] ? _chunkFMIGI6JGcjs.correctPaths.call(void 0, process.env[`${prefix}CONFIG_DIR`]) : process.env[`${prefix}CONFIG_DIRECTORY`] ? _chunkFMIGI6JGcjs.correctPaths.call(void 0, process.env[`${prefix}CONFIG_DIRECTORY`]) : void 0,
|
|
428
|
+
temp: process.env[`${prefix}TEMP_DIR`] ? _chunkFMIGI6JGcjs.correctPaths.call(void 0, process.env[`${prefix}TEMP_DIR`]) : process.env[`${prefix}TEMP_DIRECTORY`] ? _chunkFMIGI6JGcjs.correctPaths.call(void 0, process.env[`${prefix}TEMP_DIRECTORY`]) : void 0,
|
|
429
|
+
log: process.env[`${prefix}LOG_DIR`] ? _chunkFMIGI6JGcjs.correctPaths.call(void 0, process.env[`${prefix}LOG_DIR`]) : process.env[`${prefix}LOG_DIRECTORY`] ? _chunkFMIGI6JGcjs.correctPaths.call(void 0, process.env[`${prefix}LOG_DIRECTORY`]) : void 0,
|
|
430
|
+
build: process.env[`${prefix}BUILD_DIR`] ? _chunkFMIGI6JGcjs.correctPaths.call(void 0, process.env[`${prefix}BUILD_DIR`]) : process.env[`${prefix}BUILD_DIRECTORY`] ? _chunkFMIGI6JGcjs.correctPaths.call(void 0, process.env[`${prefix}BUILD_DIRECTORY`]) : void 0
|
|
431
431
|
},
|
|
432
432
|
skipCache: process.env[`${prefix}SKIP_CACHE`] !== void 0 ? Boolean(process.env[`${prefix}SKIP_CACHE`]) : void 0,
|
|
433
433
|
mode: (_nullishCoalesce(_nullishCoalesce(process.env[`${prefix}MODE`], () => ( process.env.NODE_ENV)), () => ( process.env.ENVIRONMENT))) || void 0,
|
|
@@ -442,7 +442,6 @@ var getConfigEnv = () => {
|
|
|
442
442
|
repository: process.env[`${prefix}REPOSITORY`] || void 0,
|
|
443
443
|
branch: process.env[`${prefix}BRANCH`] || void 0,
|
|
444
444
|
preid: process.env[`${prefix}PRE_ID`] || void 0,
|
|
445
|
-
externalPackagePatterns: process.env[`${prefix}EXTERNAL_PACKAGE_PATTERNS`] ? JSON.parse(process.env[`${prefix}EXTERNAL_PACKAGE_PATTERNS`]) : [],
|
|
446
445
|
registry: {
|
|
447
446
|
github: process.env[`${prefix}REGISTRY_GITHUB`] || void 0,
|
|
448
447
|
npm: process.env[`${prefix}REGISTRY_NPM`] || void 0,
|
|
@@ -452,13 +451,13 @@ var getConfigEnv = () => {
|
|
|
452
451
|
},
|
|
453
452
|
logLevel: process.env[`${prefix}LOG_LEVEL`] !== null && process.env[`${prefix}LOG_LEVEL`] !== void 0 ? process.env[`${prefix}LOG_LEVEL`] && Number.isSafeInteger(
|
|
454
453
|
Number.parseInt(process.env[`${prefix}LOG_LEVEL`])
|
|
455
|
-
) ?
|
|
454
|
+
) ? _chunkFMIGI6JGcjs.getLogLevelLabel.call(void 0,
|
|
456
455
|
Number.parseInt(process.env[`${prefix}LOG_LEVEL`])
|
|
457
456
|
) : process.env[`${prefix}LOG_LEVEL`] : void 0,
|
|
458
457
|
skipConfigLogging: process.env[`${prefix}SKIP_CONFIG_LOGGING`] !== void 0 ? Boolean(process.env[`${prefix}SKIP_CONFIG_LOGGING`]) : void 0
|
|
459
458
|
};
|
|
460
459
|
const themeNames = Object.keys(process.env).filter(
|
|
461
|
-
(envKey) => envKey.startsWith(`${prefix}COLOR_`) &&
|
|
460
|
+
(envKey) => envKey.startsWith(`${prefix}COLOR_`) && _chunkFMIGI6JGcjs.COLOR_KEYS.every(
|
|
462
461
|
(colorKey) => !envKey.startsWith(`${prefix}COLOR_LIGHT_${colorKey}`) && !envKey.startsWith(`${prefix}COLOR_DARK_${colorKey}`)
|
|
463
462
|
)
|
|
464
463
|
);
|
|
@@ -469,16 +468,16 @@ var getConfigEnv = () => {
|
|
|
469
468
|
},
|
|
470
469
|
{}
|
|
471
470
|
) : getThemeColorConfigEnv(prefix);
|
|
472
|
-
if (config.docs ===
|
|
473
|
-
if (config.homepage ===
|
|
474
|
-
config.docs = `${
|
|
471
|
+
if (config.docs === _chunkFMIGI6JGcjs.STORM_DEFAULT_DOCS) {
|
|
472
|
+
if (config.homepage === _chunkFMIGI6JGcjs.STORM_DEFAULT_HOMEPAGE) {
|
|
473
|
+
config.docs = `${_chunkFMIGI6JGcjs.STORM_DEFAULT_HOMEPAGE}/projects/${config.name}/docs`;
|
|
475
474
|
} else {
|
|
476
475
|
config.docs = `${config.homepage}/docs`;
|
|
477
476
|
}
|
|
478
477
|
}
|
|
479
|
-
if (config.licensing ===
|
|
480
|
-
if (config.homepage ===
|
|
481
|
-
config.licensing = `${
|
|
478
|
+
if (config.licensing === _chunkFMIGI6JGcjs.STORM_DEFAULT_LICENSING) {
|
|
479
|
+
if (config.homepage === _chunkFMIGI6JGcjs.STORM_DEFAULT_HOMEPAGE) {
|
|
480
|
+
config.licensing = `${_chunkFMIGI6JGcjs.STORM_DEFAULT_HOMEPAGE}/projects/${config.name}/licensing`;
|
|
482
481
|
} else {
|
|
483
482
|
config.licensing = `${config.homepage}/docs`;
|
|
484
483
|
}
|
|
@@ -594,24 +593,24 @@ var setConfigEnv = (config) => {
|
|
|
594
593
|
process.env[`${prefix}RELEASE_HEADER`] = config.release.header;
|
|
595
594
|
process.env[`${prefix}RELEASE_FOOTER`] = config.release.footer;
|
|
596
595
|
}
|
|
597
|
-
if (config.
|
|
598
|
-
if (config.
|
|
599
|
-
process.env[`${prefix}
|
|
596
|
+
if (config.socials) {
|
|
597
|
+
if (config.socials.twitter) {
|
|
598
|
+
process.env[`${prefix}SOCIAL_TWITTER`] = config.socials.twitter;
|
|
600
599
|
}
|
|
601
|
-
if (config.
|
|
602
|
-
process.env[`${prefix}
|
|
600
|
+
if (config.socials.discord) {
|
|
601
|
+
process.env[`${prefix}SOCIAL_DISCORD`] = config.socials.discord;
|
|
603
602
|
}
|
|
604
|
-
if (config.
|
|
605
|
-
process.env[`${prefix}
|
|
603
|
+
if (config.socials.telegram) {
|
|
604
|
+
process.env[`${prefix}SOCIAL_TELEGRAM`] = config.socials.telegram;
|
|
606
605
|
}
|
|
607
|
-
if (config.
|
|
608
|
-
process.env[`${prefix}
|
|
606
|
+
if (config.socials.slack) {
|
|
607
|
+
process.env[`${prefix}SOCIAL_SLACK`] = config.socials.slack;
|
|
609
608
|
}
|
|
610
|
-
if (config.
|
|
611
|
-
process.env[`${prefix}
|
|
609
|
+
if (config.socials.medium) {
|
|
610
|
+
process.env[`${prefix}SOCIAL_MEDIUM`] = config.socials.medium;
|
|
612
611
|
}
|
|
613
|
-
if (config.
|
|
614
|
-
process.env[`${prefix}
|
|
612
|
+
if (config.socials.github) {
|
|
613
|
+
process.env[`${prefix}SOCIAL_GITHUB`] = config.socials.github;
|
|
615
614
|
}
|
|
616
615
|
}
|
|
617
616
|
if (config.organization) {
|
|
@@ -679,40 +678,40 @@ var setConfigEnv = (config) => {
|
|
|
679
678
|
process.env.LANG = config.locale ? `${config.locale.replaceAll("-", "_")}.UTF-8` : "en_US.UTF-8";
|
|
680
679
|
}
|
|
681
680
|
if (config.configFile) {
|
|
682
|
-
process.env[`${prefix}CONFIG_FILE`] =
|
|
681
|
+
process.env[`${prefix}CONFIG_FILE`] = _chunkFMIGI6JGcjs.correctPaths.call(void 0, config.configFile);
|
|
683
682
|
}
|
|
684
683
|
if (config.workspaceRoot) {
|
|
685
|
-
process.env[`${prefix}WORKSPACE_ROOT`] =
|
|
686
|
-
process.env.NX_WORKSPACE_ROOT =
|
|
687
|
-
process.env.NX_WORKSPACE_ROOT_PATH =
|
|
684
|
+
process.env[`${prefix}WORKSPACE_ROOT`] = _chunkFMIGI6JGcjs.correctPaths.call(void 0, config.workspaceRoot);
|
|
685
|
+
process.env.NX_WORKSPACE_ROOT = _chunkFMIGI6JGcjs.correctPaths.call(void 0, config.workspaceRoot);
|
|
686
|
+
process.env.NX_WORKSPACE_ROOT_PATH = _chunkFMIGI6JGcjs.correctPaths.call(void 0, config.workspaceRoot);
|
|
688
687
|
}
|
|
689
688
|
if (config.directories) {
|
|
690
689
|
if (!config.skipCache && config.directories.cache) {
|
|
691
|
-
process.env[`${prefix}CACHE_DIR`] =
|
|
690
|
+
process.env[`${prefix}CACHE_DIR`] = _chunkFMIGI6JGcjs.correctPaths.call(void 0,
|
|
692
691
|
config.directories.cache
|
|
693
692
|
);
|
|
694
693
|
process.env[`${prefix}CACHE_DIRECTORY`] = process.env[`${prefix}CACHE_DIR`];
|
|
695
694
|
}
|
|
696
695
|
if (config.directories.data) {
|
|
697
|
-
process.env[`${prefix}DATA_DIR`] =
|
|
696
|
+
process.env[`${prefix}DATA_DIR`] = _chunkFMIGI6JGcjs.correctPaths.call(void 0, config.directories.data);
|
|
698
697
|
process.env[`${prefix}DATA_DIRECTORY`] = process.env[`${prefix}DATA_DIR`];
|
|
699
698
|
}
|
|
700
699
|
if (config.directories.config) {
|
|
701
|
-
process.env[`${prefix}CONFIG_DIR`] =
|
|
700
|
+
process.env[`${prefix}CONFIG_DIR`] = _chunkFMIGI6JGcjs.correctPaths.call(void 0,
|
|
702
701
|
config.directories.config
|
|
703
702
|
);
|
|
704
703
|
process.env[`${prefix}CONFIG_DIRECTORY`] = process.env[`${prefix}CONFIG_DIR`];
|
|
705
704
|
}
|
|
706
705
|
if (config.directories.temp) {
|
|
707
|
-
process.env[`${prefix}TEMP_DIR`] =
|
|
706
|
+
process.env[`${prefix}TEMP_DIR`] = _chunkFMIGI6JGcjs.correctPaths.call(void 0, config.directories.temp);
|
|
708
707
|
process.env[`${prefix}TEMP_DIRECTORY`] = process.env[`${prefix}TEMP_DIR`];
|
|
709
708
|
}
|
|
710
709
|
if (config.directories.log) {
|
|
711
|
-
process.env[`${prefix}LOG_DIR`] =
|
|
710
|
+
process.env[`${prefix}LOG_DIR`] = _chunkFMIGI6JGcjs.correctPaths.call(void 0, config.directories.log);
|
|
712
711
|
process.env[`${prefix}LOG_DIRECTORY`] = process.env[`${prefix}LOG_DIR`];
|
|
713
712
|
}
|
|
714
713
|
if (config.directories.build) {
|
|
715
|
-
process.env[`${prefix}BUILD_DIR`] =
|
|
714
|
+
process.env[`${prefix}BUILD_DIR`] = _chunkFMIGI6JGcjs.correctPaths.call(void 0,
|
|
716
715
|
config.directories.build
|
|
717
716
|
);
|
|
718
717
|
process.env[`${prefix}BUILD_DIRECTORY`] = process.env[`${prefix}BUILD_DIR`];
|
|
@@ -749,11 +748,6 @@ var setConfigEnv = (config) => {
|
|
|
749
748
|
if (config.preid) {
|
|
750
749
|
process.env[`${prefix}PRE_ID`] = String(config.preid);
|
|
751
750
|
}
|
|
752
|
-
if (config.externalPackagePatterns) {
|
|
753
|
-
process.env[`${prefix}EXTERNAL_PACKAGE_PATTERNS`] = JSON.stringify(
|
|
754
|
-
config.externalPackagePatterns
|
|
755
|
-
);
|
|
756
|
-
}
|
|
757
751
|
if (config.registry) {
|
|
758
752
|
if (config.registry.github) {
|
|
759
753
|
process.env[`${prefix}REGISTRY_GITHUB`] = String(config.registry.github);
|
|
@@ -779,9 +773,9 @@ var setConfigEnv = (config) => {
|
|
|
779
773
|
process.env[`${prefix}LOG_LEVEL`] = String(config.logLevel);
|
|
780
774
|
process.env.LOG_LEVEL = String(config.logLevel);
|
|
781
775
|
process.env.NX_VERBOSE_LOGGING = String(
|
|
782
|
-
|
|
776
|
+
_chunkFMIGI6JGcjs.getLogLevel.call(void 0, config.logLevel) >= _chunkFMIGI6JGcjs.LogLevel.DEBUG ? true : false
|
|
783
777
|
);
|
|
784
|
-
process.env.RUST_BACKTRACE =
|
|
778
|
+
process.env.RUST_BACKTRACE = _chunkFMIGI6JGcjs.getLogLevel.call(void 0, config.logLevel) >= _chunkFMIGI6JGcjs.LogLevel.DEBUG ? "full" : "none";
|
|
785
779
|
}
|
|
786
780
|
if (config.skipConfigLogging !== void 0) {
|
|
787
781
|
process.env[`${prefix}SKIP_CONFIG_LOGGING`] = String(
|
|
@@ -901,13 +895,13 @@ var createStormWorkspaceConfig = async (extensionName, schema, workspaceRoot, sk
|
|
|
901
895
|
if (!_optionalChain([_static_cache, 'optionalAccess', _52 => _52.data]) || !_optionalChain([_static_cache, 'optionalAccess', _53 => _53.timestamp]) || _static_cache.timestamp < Date.now() - 8e3) {
|
|
902
896
|
let _workspaceRoot = workspaceRoot;
|
|
903
897
|
if (!_workspaceRoot) {
|
|
904
|
-
_workspaceRoot =
|
|
898
|
+
_workspaceRoot = _chunkFMIGI6JGcjs.findWorkspaceRoot.call(void 0, );
|
|
905
899
|
}
|
|
906
900
|
const configEnv = getConfigEnv();
|
|
907
901
|
const configFile = await getConfigFile(_workspaceRoot);
|
|
908
902
|
if (!configFile) {
|
|
909
903
|
if (!skipLogs) {
|
|
910
|
-
|
|
904
|
+
_chunkFMIGI6JGcjs.writeWarning.call(void 0,
|
|
911
905
|
"No Storm Workspace configuration file found in the current repository. Please ensure this is the expected behavior - you can add a `storm-workspace.json` file to the root of your workspace if it is not.\n",
|
|
912
906
|
{ logLevel: "all" }
|
|
913
907
|
);
|
|
@@ -916,9 +910,9 @@ var createStormWorkspaceConfig = async (extensionName, schema, workspaceRoot, sk
|
|
|
916
910
|
return void 0;
|
|
917
911
|
}
|
|
918
912
|
}
|
|
919
|
-
const defaultConfig = await
|
|
920
|
-
result =
|
|
921
|
-
await
|
|
913
|
+
const defaultConfig = await _chunkFMIGI6JGcjs.getPackageJsonConfig.call(void 0, _workspaceRoot);
|
|
914
|
+
result = _chunkFMIGI6JGcjs.applyDefaultConfig.call(void 0,
|
|
915
|
+
await _chunkFMIGI6JGcjs.stormWorkspaceConfigSchema.parseAsync(
|
|
922
916
|
_defu2.default.call(void 0, configEnv, configFile, defaultConfig)
|
|
923
917
|
)
|
|
924
918
|
);
|
|
@@ -960,9 +954,9 @@ var loadStormWorkspaceConfig = async (workspaceRoot, skipLogs = false) => {
|
|
|
960
954
|
);
|
|
961
955
|
setConfigEnv(config);
|
|
962
956
|
if (!skipLogs && !config.skipConfigLogging) {
|
|
963
|
-
|
|
957
|
+
_chunkFMIGI6JGcjs.writeTrace.call(void 0,
|
|
964
958
|
`\u2699\uFE0F Using Storm Workspace configuration:
|
|
965
|
-
${
|
|
959
|
+
${_chunkFMIGI6JGcjs.formatLogMessage.call(void 0, config)}`,
|
|
966
960
|
config
|
|
967
961
|
);
|
|
968
962
|
}
|
|
@@ -998,15 +992,15 @@ var _findworkspaceroot = require('nx/src/utils/find-workspace-root');
|
|
|
998
992
|
|
|
999
993
|
var _unbuild = require('unbuild');
|
|
1000
994
|
async function resolveOptions(options, config) {
|
|
1001
|
-
|
|
1002
|
-
const stopwatch =
|
|
995
|
+
_chunkFMIGI6JGcjs.writeDebug.call(void 0, " \u2699\uFE0F Resolving build options", config);
|
|
996
|
+
const stopwatch = _chunkFMIGI6JGcjs.getStopwatch.call(void 0, "Build options resolution");
|
|
1003
997
|
if (options.configPath) {
|
|
1004
|
-
const configFile = await
|
|
998
|
+
const configFile = await _chunkDBA3KANTcjs.loadConfig.call(void 0, options.configPath);
|
|
1005
999
|
if (configFile) {
|
|
1006
1000
|
options = _defu2.default.call(void 0, options, configFile);
|
|
1007
1001
|
}
|
|
1008
1002
|
}
|
|
1009
|
-
const outputPath = options.outputPath ||
|
|
1003
|
+
const outputPath = options.outputPath || _chunkFMIGI6JGcjs.joinPaths.call(void 0, "dist", options.projectRoot);
|
|
1010
1004
|
let projectGraph;
|
|
1011
1005
|
try {
|
|
1012
1006
|
projectGraph = _devkit.readCachedProjectGraph.call(void 0, );
|
|
@@ -1019,7 +1013,7 @@ async function resolveOptions(options, config) {
|
|
|
1019
1013
|
"The build process failed because the project graph is not available. Please run the build command again."
|
|
1020
1014
|
);
|
|
1021
1015
|
}
|
|
1022
|
-
const projectJsonPath =
|
|
1016
|
+
const projectJsonPath = _chunkFMIGI6JGcjs.joinPaths.call(void 0,
|
|
1023
1017
|
config.workspaceRoot,
|
|
1024
1018
|
options.projectRoot,
|
|
1025
1019
|
"project.json"
|
|
@@ -1030,7 +1024,7 @@ async function resolveOptions(options, config) {
|
|
|
1030
1024
|
const projectJsonContent = await _promises.readFile.call(void 0, projectJsonPath, "utf8");
|
|
1031
1025
|
const projectJson = JSON.parse(projectJsonContent);
|
|
1032
1026
|
const projectName = projectJson.name;
|
|
1033
|
-
const packageJsonPath =
|
|
1027
|
+
const packageJsonPath = _chunkFMIGI6JGcjs.joinPaths.call(void 0,
|
|
1034
1028
|
config.workspaceRoot,
|
|
1035
1029
|
options.projectRoot,
|
|
1036
1030
|
"package.json"
|
|
@@ -1042,17 +1036,17 @@ async function resolveOptions(options, config) {
|
|
|
1042
1036
|
const packageJson = JSON.parse(packageJsonContent);
|
|
1043
1037
|
let tsconfig = options.tsconfig;
|
|
1044
1038
|
if (!tsconfig) {
|
|
1045
|
-
tsconfig =
|
|
1039
|
+
tsconfig = _chunkFMIGI6JGcjs.joinPaths.call(void 0, options.projectRoot, "tsconfig.json");
|
|
1046
1040
|
}
|
|
1047
1041
|
if (!tsconfig.startsWith(config.workspaceRoot)) {
|
|
1048
|
-
tsconfig =
|
|
1042
|
+
tsconfig = _chunkFMIGI6JGcjs.joinPaths.call(void 0, config.workspaceRoot, tsconfig);
|
|
1049
1043
|
}
|
|
1050
1044
|
if (!_fs.existsSync.call(void 0, tsconfig)) {
|
|
1051
1045
|
throw new Error("Cannot find tsconfig.json configuration");
|
|
1052
1046
|
}
|
|
1053
1047
|
let sourceRoot = projectJson.sourceRoot;
|
|
1054
1048
|
if (!sourceRoot) {
|
|
1055
|
-
sourceRoot =
|
|
1049
|
+
sourceRoot = _chunkFMIGI6JGcjs.joinPaths.call(void 0, options.projectRoot, "src");
|
|
1056
1050
|
}
|
|
1057
1051
|
if (!_fs.existsSync.call(void 0, sourceRoot)) {
|
|
1058
1052
|
throw new Error("Cannot find sourceRoot directory");
|
|
@@ -1101,9 +1095,9 @@ async function resolveOptions(options, config) {
|
|
|
1101
1095
|
while (entryPath.startsWith("/")) {
|
|
1102
1096
|
entryPath = entryPath.substring(1);
|
|
1103
1097
|
}
|
|
1104
|
-
const outDir =
|
|
1098
|
+
const outDir = _chunkFMIGI6JGcjs.joinPaths.call(void 0,
|
|
1105
1099
|
_path.relative.call(void 0,
|
|
1106
|
-
|
|
1100
|
+
_chunkFMIGI6JGcjs.joinPaths.call(void 0, config.workspaceRoot, options.projectRoot),
|
|
1107
1101
|
config.workspaceRoot
|
|
1108
1102
|
),
|
|
1109
1103
|
outputPath,
|
|
@@ -1182,7 +1176,7 @@ async function resolveOptions(options, config) {
|
|
|
1182
1176
|
treeShaking: options.treeShaking !== false,
|
|
1183
1177
|
platform: options.platform || "neutral",
|
|
1184
1178
|
color: true,
|
|
1185
|
-
logLevel: config.logLevel ===
|
|
1179
|
+
logLevel: config.logLevel === _chunkFMIGI6JGcjs.LogLevelLabel.FATAL ? _chunkFMIGI6JGcjs.LogLevelLabel.ERROR : _chunkFMIGI6JGcjs.isVerbose.call(void 0, ) ? "verbose" : config.logLevel
|
|
1186
1180
|
}
|
|
1187
1181
|
}
|
|
1188
1182
|
};
|
|
@@ -1203,7 +1197,7 @@ async function resolveOptions(options, config) {
|
|
|
1203
1197
|
if (options.rollup) {
|
|
1204
1198
|
let rollup = {};
|
|
1205
1199
|
if (typeof options.rollup === "string") {
|
|
1206
|
-
const rollupFile = await
|
|
1200
|
+
const rollupFile = await _chunkDBA3KANTcjs.loadConfig.call(void 0, options.rollup);
|
|
1207
1201
|
if (rollupFile) {
|
|
1208
1202
|
rollup = rollupFile;
|
|
1209
1203
|
}
|
|
@@ -1215,20 +1209,20 @@ async function resolveOptions(options, config) {
|
|
|
1215
1209
|
resolvedOptions.hooks = {
|
|
1216
1210
|
"rollup:options": async (ctx, opts) => {
|
|
1217
1211
|
if (options.plugins && options.plugins.length > 0) {
|
|
1218
|
-
|
|
1212
|
+
_chunkFMIGI6JGcjs.writeDebug.call(void 0,
|
|
1219
1213
|
` \u{1F9E9} Found ${options.plugins.length} plugins in provided build options`,
|
|
1220
1214
|
config
|
|
1221
1215
|
);
|
|
1222
1216
|
opts.plugins = options.plugins;
|
|
1223
1217
|
} else {
|
|
1224
|
-
|
|
1218
|
+
_chunkFMIGI6JGcjs.writeDebug.call(void 0,
|
|
1225
1219
|
` \u{1F9E9} No plugins found in provided build options, using default plugins`,
|
|
1226
1220
|
config
|
|
1227
1221
|
);
|
|
1228
1222
|
opts.plugins = await Promise.all([
|
|
1229
|
-
|
|
1230
|
-
|
|
1231
|
-
|
|
1223
|
+
_chunk5KAGDMCAcjs.analyzePlugin.call(void 0, resolvedOptions),
|
|
1224
|
+
_chunkDBA3KANTcjs.tscPlugin.call(void 0, resolvedOptions),
|
|
1225
|
+
_chunk7CTYKC3Mcjs.onErrorPlugin.call(void 0, resolvedOptions)
|
|
1232
1226
|
]);
|
|
1233
1227
|
}
|
|
1234
1228
|
},
|
|
@@ -1282,15 +1276,15 @@ var addPackageJsonExport = (file, type = "module", sourceRoot, projectRoot) => {
|
|
|
1282
1276
|
};
|
|
1283
1277
|
};
|
|
1284
1278
|
async function generatePackageJson(options) {
|
|
1285
|
-
if (options.generatePackageJson !== false && _fs.existsSync.call(void 0,
|
|
1286
|
-
|
|
1287
|
-
const stopwatch =
|
|
1288
|
-
const packageJsonPath =
|
|
1279
|
+
if (options.generatePackageJson !== false && _fs.existsSync.call(void 0, _chunkFMIGI6JGcjs.joinPaths.call(void 0, options.projectRoot, "package.json"))) {
|
|
1280
|
+
_chunkFMIGI6JGcjs.writeDebug.call(void 0, " \u270D\uFE0F Writing package.json file", options.config);
|
|
1281
|
+
const stopwatch = _chunkFMIGI6JGcjs.getStopwatch.call(void 0, "Write package.json file");
|
|
1282
|
+
const packageJsonPath = _chunkFMIGI6JGcjs.joinPaths.call(void 0, options.projectRoot, "project.json");
|
|
1289
1283
|
if (!_fs.existsSync.call(void 0, packageJsonPath)) {
|
|
1290
1284
|
throw new Error("Cannot find package.json configuration");
|
|
1291
1285
|
}
|
|
1292
1286
|
const packageJsonContent = await _promises.readFile.call(void 0,
|
|
1293
|
-
|
|
1287
|
+
_chunkFMIGI6JGcjs.joinPaths.call(void 0,
|
|
1294
1288
|
options.config.workspaceRoot,
|
|
1295
1289
|
options.projectRoot,
|
|
1296
1290
|
"package.json"
|
|
@@ -1326,7 +1320,7 @@ async function generatePackageJson(options) {
|
|
|
1326
1320
|
while (entryPath.startsWith("/")) {
|
|
1327
1321
|
entryPath = entryPath.substring(1);
|
|
1328
1322
|
}
|
|
1329
|
-
entryPath = `./${
|
|
1323
|
+
entryPath = `./${_chunkFMIGI6JGcjs.joinPaths.call(void 0, options.projectRoot, entryPath)}`;
|
|
1330
1324
|
if (!ret.includes(entryPath)) {
|
|
1331
1325
|
ret.push(entryPath);
|
|
1332
1326
|
}
|
|
@@ -1376,28 +1370,28 @@ async function generatePackageJson(options) {
|
|
|
1376
1370
|
options.sourceRoot,
|
|
1377
1371
|
options.projectRoot
|
|
1378
1372
|
);
|
|
1379
|
-
await _devkit.writeJsonFile.call(void 0,
|
|
1373
|
+
await _devkit.writeJsonFile.call(void 0, _chunkFMIGI6JGcjs.joinPaths.call(void 0, options.outDir, "package.json"), packageJson);
|
|
1380
1374
|
stopwatch();
|
|
1381
1375
|
}
|
|
1382
1376
|
return options;
|
|
1383
1377
|
}
|
|
1384
1378
|
async function executeUnbuild(options) {
|
|
1385
|
-
|
|
1379
|
+
_chunkFMIGI6JGcjs.writeDebug.call(void 0,
|
|
1386
1380
|
` \u{1F680} Running ${options.name} (${options.projectRoot}) build`,
|
|
1387
1381
|
options.config
|
|
1388
1382
|
);
|
|
1389
|
-
const stopwatch =
|
|
1383
|
+
const stopwatch = _chunkFMIGI6JGcjs.getStopwatch.call(void 0,
|
|
1390
1384
|
`${options.name} (${options.projectRoot}) build`
|
|
1391
1385
|
);
|
|
1392
1386
|
try {
|
|
1393
1387
|
const config = {
|
|
1394
1388
|
...options,
|
|
1395
1389
|
config: null,
|
|
1396
|
-
rootDir:
|
|
1390
|
+
rootDir: _chunkFMIGI6JGcjs.joinPaths.call(void 0, options.config.workspaceRoot, options.projectRoot)
|
|
1397
1391
|
};
|
|
1398
|
-
|
|
1392
|
+
_chunkFMIGI6JGcjs.writeTrace.call(void 0,
|
|
1399
1393
|
`Running with unbuild configuration:
|
|
1400
|
-
${
|
|
1394
|
+
${_chunkFMIGI6JGcjs.formatLogMessage.call(void 0, { ...config, env: "<Hidden>" })}
|
|
1401
1395
|
`,
|
|
1402
1396
|
options.config
|
|
1403
1397
|
);
|
|
@@ -1408,11 +1402,11 @@ ${_chunkYBFLGHF3cjs.formatLogMessage.call(void 0, { ...config, env: "<Hidden>" }
|
|
|
1408
1402
|
return options;
|
|
1409
1403
|
}
|
|
1410
1404
|
async function copyBuildAssets(options) {
|
|
1411
|
-
|
|
1405
|
+
_chunkFMIGI6JGcjs.writeDebug.call(void 0,
|
|
1412
1406
|
` \u{1F4CB} Copying asset files to output directory: ${options.outDir}`,
|
|
1413
1407
|
options.config
|
|
1414
1408
|
);
|
|
1415
|
-
const stopwatch =
|
|
1409
|
+
const stopwatch = _chunkFMIGI6JGcjs.getStopwatch.call(void 0, `${options.name} asset copy`);
|
|
1416
1410
|
await copyAssets(
|
|
1417
1411
|
options.config,
|
|
1418
1412
|
_nullishCoalesce(options.assets, () => ( [])),
|
|
@@ -1427,12 +1421,12 @@ async function copyBuildAssets(options) {
|
|
|
1427
1421
|
}
|
|
1428
1422
|
async function cleanOutputPath(options) {
|
|
1429
1423
|
if (options.clean !== false && options.outDir) {
|
|
1430
|
-
|
|
1424
|
+
_chunkFMIGI6JGcjs.writeDebug.call(void 0,
|
|
1431
1425
|
` \u{1F9F9} Cleaning ${options.name} output path: ${options.outDir}`,
|
|
1432
1426
|
options.config
|
|
1433
1427
|
);
|
|
1434
|
-
const stopwatch =
|
|
1435
|
-
await
|
|
1428
|
+
const stopwatch = _chunkFMIGI6JGcjs.getStopwatch.call(void 0, `${options.name} output clean`);
|
|
1429
|
+
await _chunkBOURL2AFcjs.cleanDirectories.call(void 0, options.name, options.outDir, options.config);
|
|
1436
1430
|
stopwatch();
|
|
1437
1431
|
}
|
|
1438
1432
|
return options;
|
|
@@ -1447,10 +1441,10 @@ async function build(options) {
|
|
|
1447
1441
|
throw new Error("Cannot find workspace root");
|
|
1448
1442
|
}
|
|
1449
1443
|
const config = await getConfig(workspaceRoot.dir);
|
|
1450
|
-
|
|
1451
|
-
const stopwatch =
|
|
1444
|
+
_chunkFMIGI6JGcjs.writeDebug.call(void 0, ` \u26A1 Executing Storm Unbuild pipeline`, config);
|
|
1445
|
+
const stopwatch = _chunkFMIGI6JGcjs.getStopwatch.call(void 0, "Unbuild pipeline");
|
|
1452
1446
|
try {
|
|
1453
|
-
options.projectRoot =
|
|
1447
|
+
options.projectRoot = _chunkFMIGI6JGcjs.correctPaths.call(void 0, projectRoot);
|
|
1454
1448
|
const resolvedOptions = await resolveOptions(options, config);
|
|
1455
1449
|
await cleanOutputPath(resolvedOptions);
|
|
1456
1450
|
if (options.buildOnly !== true) {
|
|
@@ -1460,12 +1454,12 @@ async function build(options) {
|
|
|
1460
1454
|
if (options.buildOnly !== true) {
|
|
1461
1455
|
await copyBuildAssets(resolvedOptions);
|
|
1462
1456
|
}
|
|
1463
|
-
|
|
1457
|
+
_chunkFMIGI6JGcjs.writeSuccess.call(void 0,
|
|
1464
1458
|
` \u{1F3C1} The ${resolvedOptions.name} build completed successfully`,
|
|
1465
1459
|
config
|
|
1466
1460
|
);
|
|
1467
1461
|
} catch (error) {
|
|
1468
|
-
|
|
1462
|
+
_chunkFMIGI6JGcjs.writeFatal.call(void 0,
|
|
1469
1463
|
"Fatal errors that the build process could not recover from have occured. The build process has been terminated.",
|
|
1470
1464
|
config
|
|
1471
1465
|
);
|