@storm-software/unbuild 0.37.18 → 0.37.19
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 +7 -7
- package/bin/unbuild.cjs +53 -4
- package/bin/unbuild.js +53 -4
- package/dist/build.cjs +7 -7
- package/dist/build.js +6 -6
- package/dist/{chunk-6W4BKEOJ.js → chunk-2FX3WQNK.js} +1 -1
- package/dist/{chunk-AD5M2WQK.js → chunk-5XTPDLOE.js} +1 -1
- package/dist/{chunk-7AM5XAIN.js → chunk-EJVOWVIQ.js} +21 -4
- package/dist/{chunk-C6CJ25UC.js → chunk-IYFBAI6G.js} +1 -1
- package/dist/{chunk-WPNQQP7F.js → chunk-JJ5QDPA6.js} +37 -5
- package/dist/{chunk-GNWDG3BC.js → chunk-JLKMLDBA.js} +1 -1
- package/dist/{chunk-OGMYQNDM.cjs → chunk-K5SEKFQA.cjs} +21 -4
- package/dist/{chunk-KMW24CQZ.cjs → chunk-OOFPXPRC.cjs} +2 -2
- package/dist/{chunk-7VZ5DKNY.cjs → chunk-SOHZAEOH.cjs} +131 -99
- package/dist/{chunk-KYBJAKNR.cjs → chunk-VPCO2H3G.cjs} +2 -2
- package/dist/{chunk-3LF6BMSN.cjs → chunk-WGGER7UI.cjs} +3 -3
- package/dist/{chunk-DTNFTCIE.cjs → chunk-X25DCA4T.cjs} +3 -3
- 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 +1 -1
|
@@ -3,17 +3,17 @@
|
|
|
3
3
|
var _chunkOD3ULBE3cjs = require('./chunk-OD3ULBE3.cjs');
|
|
4
4
|
|
|
5
5
|
|
|
6
|
-
var
|
|
6
|
+
var _chunkWGGER7UIcjs = require('./chunk-WGGER7UI.cjs');
|
|
7
7
|
|
|
8
8
|
|
|
9
|
-
var
|
|
9
|
+
var _chunkOOFPXPRCcjs = require('./chunk-OOFPXPRC.cjs');
|
|
10
10
|
|
|
11
11
|
|
|
12
|
-
var
|
|
12
|
+
var _chunkX25DCA4Tcjs = require('./chunk-X25DCA4T.cjs');
|
|
13
13
|
|
|
14
14
|
|
|
15
15
|
|
|
16
|
-
var
|
|
16
|
+
var _chunkVPCO2H3Gcjs = require('./chunk-VPCO2H3G.cjs');
|
|
17
17
|
|
|
18
18
|
|
|
19
19
|
|
|
@@ -36,7 +36,7 @@ var _chunkKYBJAKNRcjs = require('./chunk-KYBJAKNR.cjs');
|
|
|
36
36
|
|
|
37
37
|
|
|
38
38
|
|
|
39
|
-
var
|
|
39
|
+
var _chunkK5SEKFQAcjs = require('./chunk-K5SEKFQA.cjs');
|
|
40
40
|
|
|
41
41
|
|
|
42
42
|
var _chunkBGYQAVKQcjs = require('./chunk-BGYQAVKQ.cjs');
|
|
@@ -89,8 +89,8 @@ var copyAssets = /* @__PURE__ */ _chunkBGYQAVKQcjs.__name.call(void 0, async (co
|
|
|
89
89
|
output: "src/"
|
|
90
90
|
});
|
|
91
91
|
}
|
|
92
|
-
|
|
93
|
-
${pendingAssets.map((pendingAsset) => typeof pendingAsset === "string" ? ` - ${pendingAsset} -> ${outputPath}` : ` - ${pendingAsset.input}/${pendingAsset.glob} -> ${
|
|
92
|
+
_chunkK5SEKFQAcjs.writeTrace.call(void 0, `\u{1F4DD} Copying the following assets to the output directory:
|
|
93
|
+
${pendingAssets.map((pendingAsset) => typeof pendingAsset === "string" ? ` - ${pendingAsset} -> ${outputPath}` : ` - ${pendingAsset.input}/${pendingAsset.glob} -> ${_chunkK5SEKFQAcjs.joinPaths.call(void 0, outputPath, pendingAsset.output)}`).join("\n")}`, config);
|
|
94
94
|
const assetHandler = new (0, _copyassetshandler.CopyAssetsHandler)({
|
|
95
95
|
projectDir: projectRoot,
|
|
96
96
|
rootDir: config.workspaceRoot,
|
|
@@ -99,12 +99,12 @@ ${pendingAssets.map((pendingAsset) => typeof pendingAsset === "string" ? ` - ${p
|
|
|
99
99
|
});
|
|
100
100
|
await assetHandler.processAllAssetsOnce();
|
|
101
101
|
if (includeSrc === true) {
|
|
102
|
-
|
|
102
|
+
_chunkK5SEKFQAcjs.writeDebug.call(void 0, `\u{1F4DD} Adding banner and writing source files: ${_chunkK5SEKFQAcjs.joinPaths.call(void 0, outputPath, "src")}`, config);
|
|
103
103
|
const files = await _glob.glob.call(void 0, [
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
104
|
+
_chunkK5SEKFQAcjs.joinPaths.call(void 0, config.workspaceRoot, outputPath, "src/**/*.ts"),
|
|
105
|
+
_chunkK5SEKFQAcjs.joinPaths.call(void 0, config.workspaceRoot, outputPath, "src/**/*.tsx"),
|
|
106
|
+
_chunkK5SEKFQAcjs.joinPaths.call(void 0, config.workspaceRoot, outputPath, "src/**/*.js"),
|
|
107
|
+
_chunkK5SEKFQAcjs.joinPaths.call(void 0, config.workspaceRoot, outputPath, "src/**/*.jsx")
|
|
108
108
|
]);
|
|
109
109
|
await Promise.allSettled(files.map(async (file) => _promises.writeFile.call(void 0, file, `${banner && typeof banner === "string" ? banner.startsWith("//") ? banner : `// ${banner}` : ""}
|
|
110
110
|
|
|
@@ -127,7 +127,7 @@ var addPackageDependencies = /* @__PURE__ */ _chunkBGYQAVKQcjs.__name.call(void
|
|
|
127
127
|
for (const project of projectDependencies.dependencies.filter((dep) => dep.node.type === "lib" && _optionalChain([dep, 'access', _ => _.node, 'access', _2 => _2.data, 'optionalAccess', _3 => _3.root]) !== projectRoot && _optionalChain([dep, 'access', _4 => _4.node, 'access', _5 => _5.data, 'optionalAccess', _6 => _6.root]) !== workspaceRoot)) {
|
|
128
128
|
const projectNode = project.node;
|
|
129
129
|
if (projectNode.data.root) {
|
|
130
|
-
const projectPackageJsonPath =
|
|
130
|
+
const projectPackageJsonPath = _chunkK5SEKFQAcjs.joinPaths.call(void 0, workspaceRoot, projectNode.data.root, "package.json");
|
|
131
131
|
if (_fs.existsSync.call(void 0, projectPackageJsonPath)) {
|
|
132
132
|
const projectPackageJsonContent = await _promises.readFile.call(void 0, projectPackageJsonPath, "utf8");
|
|
133
133
|
const projectPackageJson = JSON.parse(projectPackageJsonContent);
|
|
@@ -138,8 +138,8 @@ var addPackageDependencies = /* @__PURE__ */ _chunkBGYQAVKQcjs.__name.call(void
|
|
|
138
138
|
}
|
|
139
139
|
}
|
|
140
140
|
if (localPackages.length > 0) {
|
|
141
|
-
|
|
142
|
-
const projectJsonFile = await _promises.readFile.call(void 0,
|
|
141
|
+
_chunkK5SEKFQAcjs.writeTrace.call(void 0, `\u{1F4E6} Adding local packages to package.json: ${localPackages.map((p) => p.name).join(", ")}`);
|
|
142
|
+
const projectJsonFile = await _promises.readFile.call(void 0, _chunkK5SEKFQAcjs.joinPaths.call(void 0, projectRoot, "project.json"), "utf8");
|
|
143
143
|
const projectJson = JSON.parse(projectJsonFile);
|
|
144
144
|
const projectName2 = projectJson.name;
|
|
145
145
|
const projectConfigurations = _projectgraph.readProjectsConfigurationFromProjectGraph.call(void 0, projectGraph);
|
|
@@ -148,7 +148,7 @@ var addPackageDependencies = /* @__PURE__ */ _chunkBGYQAVKQcjs.__name.call(void
|
|
|
148
148
|
}
|
|
149
149
|
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) => {
|
|
150
150
|
if (_optionalChain([projectConfigurations, 'access', _14 => _14.projects, 'optionalAccess', _15 => _15[dep]])) {
|
|
151
|
-
const depPackageJsonPath =
|
|
151
|
+
const depPackageJsonPath = _chunkK5SEKFQAcjs.joinPaths.call(void 0, workspaceRoot, projectConfigurations.projects[dep].root, "package.json");
|
|
152
152
|
if (_fs.existsSync.call(void 0, depPackageJsonPath)) {
|
|
153
153
|
const depPackageJsonContent = _fs.readFileSync.call(void 0, depPackageJsonPath, "utf8");
|
|
154
154
|
const depPackageJson = JSON.parse(depPackageJsonContent);
|
|
@@ -172,13 +172,13 @@ var addPackageDependencies = /* @__PURE__ */ _chunkBGYQAVKQcjs.__name.call(void
|
|
|
172
172
|
return ret;
|
|
173
173
|
}, _nullishCoalesce(packageJson.devDependencies, () => ( {})));
|
|
174
174
|
} else {
|
|
175
|
-
|
|
175
|
+
_chunkK5SEKFQAcjs.writeTrace.call(void 0, "\u{1F4E6} No local packages dependencies to add to package.json");
|
|
176
176
|
}
|
|
177
177
|
return packageJson;
|
|
178
178
|
}, "addPackageDependencies");
|
|
179
179
|
var addWorkspacePackageJsonFields = /* @__PURE__ */ _chunkBGYQAVKQcjs.__name.call(void 0, async (config, projectRoot, sourceRoot, projectName, includeSrc = false, packageJson) => {
|
|
180
|
-
const workspaceRoot = config.workspaceRoot ? config.workspaceRoot :
|
|
181
|
-
const workspacePackageJsonContent = await _promises.readFile.call(void 0,
|
|
180
|
+
const workspaceRoot = config.workspaceRoot ? config.workspaceRoot : _chunkK5SEKFQAcjs.findWorkspaceRoot.call(void 0, );
|
|
181
|
+
const workspacePackageJsonContent = await _promises.readFile.call(void 0, _chunkK5SEKFQAcjs.joinPaths.call(void 0, workspaceRoot, "package.json"), "utf8");
|
|
182
182
|
const workspacePackageJson = JSON.parse(workspacePackageJsonContent);
|
|
183
183
|
packageJson.type ??= "module";
|
|
184
184
|
packageJson.sideEffects ??= false;
|
|
@@ -187,7 +187,7 @@ var addWorkspacePackageJsonFields = /* @__PURE__ */ _chunkBGYQAVKQcjs.__name.cal
|
|
|
187
187
|
if (distSrc.startsWith("/")) {
|
|
188
188
|
distSrc = distSrc.substring(1);
|
|
189
189
|
}
|
|
190
|
-
packageJson.source ??= `${
|
|
190
|
+
packageJson.source ??= `${_chunkK5SEKFQAcjs.joinPaths.call(void 0, distSrc, "index.ts").replaceAll("\\", "/")}`;
|
|
191
191
|
}
|
|
192
192
|
packageJson.files ??= [
|
|
193
193
|
"dist/**/*"
|
|
@@ -218,7 +218,7 @@ var addWorkspacePackageJsonFields = /* @__PURE__ */ _chunkBGYQAVKQcjs.__name.cal
|
|
|
218
218
|
];
|
|
219
219
|
}
|
|
220
220
|
packageJson.repository ??= workspacePackageJson.repository;
|
|
221
|
-
packageJson.repository.directory ??= projectRoot ? projectRoot :
|
|
221
|
+
packageJson.repository.directory ??= projectRoot ? projectRoot : _chunkK5SEKFQAcjs.joinPaths.call(void 0, "packages", projectName);
|
|
222
222
|
return packageJson;
|
|
223
223
|
}, "addWorkspacePackageJsonFields");
|
|
224
224
|
|
|
@@ -226,7 +226,7 @@ var addWorkspacePackageJsonFields = /* @__PURE__ */ _chunkBGYQAVKQcjs.__name.cal
|
|
|
226
226
|
var _c12 = require('c12');
|
|
227
227
|
var _defu = require('defu'); var _defu2 = _interopRequireDefault(_defu);
|
|
228
228
|
var getConfigFileByName = /* @__PURE__ */ _chunkBGYQAVKQcjs.__name.call(void 0, async (fileName, filePath, options = {}) => {
|
|
229
|
-
const workspacePath = filePath ||
|
|
229
|
+
const workspacePath = filePath || _chunkK5SEKFQAcjs.findWorkspaceRoot.call(void 0, filePath);
|
|
230
230
|
const configs = await Promise.all([
|
|
231
231
|
_c12.loadConfig.call(void 0, {
|
|
232
232
|
cwd: workspacePath,
|
|
@@ -235,7 +235,7 @@ var getConfigFileByName = /* @__PURE__ */ _chunkBGYQAVKQcjs.__name.call(void 0,
|
|
|
235
235
|
envName: _optionalChain([fileName, 'optionalAccess', _20 => _20.toUpperCase, 'call', _21 => _21()]),
|
|
236
236
|
jitiOptions: {
|
|
237
237
|
debug: false,
|
|
238
|
-
fsCache: process.env.STORM_SKIP_CACHE === "true" ? false :
|
|
238
|
+
fsCache: process.env.STORM_SKIP_CACHE === "true" ? false : _chunkK5SEKFQAcjs.joinPaths.call(void 0, process.env.STORM_CACHE_DIR || "node_modules/.cache/storm", "jiti")
|
|
239
239
|
},
|
|
240
240
|
...options
|
|
241
241
|
}),
|
|
@@ -246,7 +246,7 @@ var getConfigFileByName = /* @__PURE__ */ _chunkBGYQAVKQcjs.__name.call(void 0,
|
|
|
246
246
|
envName: _optionalChain([fileName, 'optionalAccess', _22 => _22.toUpperCase, 'call', _23 => _23()]),
|
|
247
247
|
jitiOptions: {
|
|
248
248
|
debug: false,
|
|
249
|
-
fsCache: process.env.STORM_SKIP_CACHE === "true" ? false :
|
|
249
|
+
fsCache: process.env.STORM_SKIP_CACHE === "true" ? false : _chunkK5SEKFQAcjs.joinPaths.call(void 0, process.env.STORM_CACHE_DIR || "node_modules/.cache/storm", "jiti")
|
|
250
250
|
},
|
|
251
251
|
configFile: fileName,
|
|
252
252
|
...options
|
|
@@ -255,12 +255,12 @@ var getConfigFileByName = /* @__PURE__ */ _chunkBGYQAVKQcjs.__name.call(void 0,
|
|
|
255
255
|
return _defu2.default.call(void 0, _nullishCoalesce(configs[0], () => ( {})), _nullishCoalesce(configs[1], () => ( {})));
|
|
256
256
|
}, "getConfigFileByName");
|
|
257
257
|
var getConfigFile = /* @__PURE__ */ _chunkBGYQAVKQcjs.__name.call(void 0, async (filePath, additionalFileNames = []) => {
|
|
258
|
-
const workspacePath = filePath ? filePath :
|
|
258
|
+
const workspacePath = filePath ? filePath : _chunkK5SEKFQAcjs.findWorkspaceRoot.call(void 0, filePath);
|
|
259
259
|
const result = await getConfigFileByName("storm-workspace", workspacePath);
|
|
260
260
|
let config = result.config;
|
|
261
261
|
const configFile = result.configFile;
|
|
262
262
|
if (config && configFile && Object.keys(config).length > 0 && !config.skipConfigLogging) {
|
|
263
|
-
|
|
263
|
+
_chunkK5SEKFQAcjs.writeTrace.call(void 0, `Found Storm configuration file "${configFile.includes(`${workspacePath}/`) ? configFile.replace(`${workspacePath}/`, "") : configFile}" at "${workspacePath}"`, {
|
|
264
264
|
logLevel: "all"
|
|
265
265
|
});
|
|
266
266
|
}
|
|
@@ -269,7 +269,7 @@ var getConfigFile = /* @__PURE__ */ _chunkBGYQAVKQcjs.__name.call(void 0, async
|
|
|
269
269
|
for (const result2 of results) {
|
|
270
270
|
if (_optionalChain([result2, 'optionalAccess', _24 => _24.config]) && _optionalChain([result2, 'optionalAccess', _25 => _25.configFile]) && Object.keys(result2.config).length > 0) {
|
|
271
271
|
if (!config.skipConfigLogging && !result2.config.skipConfigLogging) {
|
|
272
|
-
|
|
272
|
+
_chunkK5SEKFQAcjs.writeTrace.call(void 0, `Found alternative configuration file "${result2.configFile.includes(`${workspacePath}/`) ? result2.configFile.replace(`${workspacePath}/`, "") : result2.configFile}" at "${workspacePath}"`, {
|
|
273
273
|
logLevel: "all"
|
|
274
274
|
});
|
|
275
275
|
}
|
|
@@ -314,23 +314,32 @@ var getConfigEnv = /* @__PURE__ */ _chunkBGYQAVKQcjs.__name.call(void 0, () => {
|
|
|
314
314
|
header: process.env[`${prefix}RELEASE_HEADER`] || void 0,
|
|
315
315
|
footer: process.env[`${prefix}RELEASE_FOOTER`] || void 0
|
|
316
316
|
},
|
|
317
|
+
account: {
|
|
318
|
+
twitter: process.env[`${prefix}ACCOUNT_TWITTER`] || void 0,
|
|
319
|
+
discord: process.env[`${prefix}ACCOUNT_DISCORD`] || void 0,
|
|
320
|
+
telegram: process.env[`${prefix}ACCOUNT_TELEGRAM`] || void 0,
|
|
321
|
+
slack: process.env[`${prefix}ACCOUNT_SLACK`] || void 0,
|
|
322
|
+
medium: process.env[`${prefix}ACCOUNT_MEDIUM`] || void 0,
|
|
323
|
+
github: process.env[`${prefix}ACCOUNT_GITHUB`] || void 0
|
|
324
|
+
},
|
|
317
325
|
organization: process.env[`${prefix}ORGANIZATION`] || void 0,
|
|
318
326
|
packageManager: process.env[`${prefix}PACKAGE_MANAGER`] || void 0,
|
|
319
327
|
license: process.env[`${prefix}LICENSE`] || void 0,
|
|
320
328
|
homepage: process.env[`${prefix}HOMEPAGE`] || void 0,
|
|
321
329
|
docs: process.env[`${prefix}DOCS`] || void 0,
|
|
322
330
|
licensing: process.env[`${prefix}LICENSING`] || void 0,
|
|
331
|
+
contact: process.env[`${prefix}CONTACT`] || void 0,
|
|
323
332
|
timezone: process.env[`${prefix}TIMEZONE`] || process.env.TZ || void 0,
|
|
324
333
|
locale: process.env[`${prefix}LOCALE`] || process.env.LOCALE || void 0,
|
|
325
|
-
configFile: process.env[`${prefix}CONFIG_FILE`] ?
|
|
326
|
-
workspaceRoot: process.env[`${prefix}WORKSPACE_ROOT`] ?
|
|
334
|
+
configFile: process.env[`${prefix}CONFIG_FILE`] ? _chunkK5SEKFQAcjs.correctPaths.call(void 0, process.env[`${prefix}CONFIG_FILE`]) : void 0,
|
|
335
|
+
workspaceRoot: process.env[`${prefix}WORKSPACE_ROOT`] ? _chunkK5SEKFQAcjs.correctPaths.call(void 0, process.env[`${prefix}WORKSPACE_ROOT`]) : void 0,
|
|
327
336
|
directories: {
|
|
328
|
-
cache: process.env[`${prefix}CACHE_DIR`] ?
|
|
329
|
-
data: process.env[`${prefix}DATA_DIR`] ?
|
|
330
|
-
config: process.env[`${prefix}CONFIG_DIR`] ?
|
|
331
|
-
temp: process.env[`${prefix}TEMP_DIR`] ?
|
|
332
|
-
log: process.env[`${prefix}LOG_DIR`] ?
|
|
333
|
-
build: process.env[`${prefix}BUILD_DIR`] ?
|
|
337
|
+
cache: process.env[`${prefix}CACHE_DIR`] ? _chunkK5SEKFQAcjs.correctPaths.call(void 0, process.env[`${prefix}CACHE_DIR`]) : void 0,
|
|
338
|
+
data: process.env[`${prefix}DATA_DIR`] ? _chunkK5SEKFQAcjs.correctPaths.call(void 0, process.env[`${prefix}DATA_DIR`]) : void 0,
|
|
339
|
+
config: process.env[`${prefix}CONFIG_DIR`] ? _chunkK5SEKFQAcjs.correctPaths.call(void 0, process.env[`${prefix}CONFIG_DIR`]) : void 0,
|
|
340
|
+
temp: process.env[`${prefix}TEMP_DIR`] ? _chunkK5SEKFQAcjs.correctPaths.call(void 0, process.env[`${prefix}TEMP_DIR`]) : void 0,
|
|
341
|
+
log: process.env[`${prefix}LOG_DIR`] ? _chunkK5SEKFQAcjs.correctPaths.call(void 0, process.env[`${prefix}LOG_DIR`]) : void 0,
|
|
342
|
+
build: process.env[`${prefix}BUILD_DIR`] ? _chunkK5SEKFQAcjs.correctPaths.call(void 0, process.env[`${prefix}BUILD_DIR`]) : void 0
|
|
334
343
|
},
|
|
335
344
|
skipCache: process.env[`${prefix}SKIP_CACHE`] !== void 0 ? Boolean(process.env[`${prefix}SKIP_CACHE`]) : void 0,
|
|
336
345
|
mode: (_nullishCoalesce(_nullishCoalesce(process.env[`${prefix}MODE`], () => ( process.env.NODE_ENV)), () => ( process.env.ENVIRONMENT))) || void 0,
|
|
@@ -353,24 +362,24 @@ var getConfigEnv = /* @__PURE__ */ _chunkBGYQAVKQcjs.__name.call(void 0, () => {
|
|
|
353
362
|
cyclone: process.env[`${prefix}REGISTRY_CYCLONE`] || void 0,
|
|
354
363
|
container: process.env[`${prefix}REGISTRY_CONTAINER`] || void 0
|
|
355
364
|
},
|
|
356
|
-
logLevel: process.env[`${prefix}LOG_LEVEL`] !== null && process.env[`${prefix}LOG_LEVEL`] !== void 0 ? process.env[`${prefix}LOG_LEVEL`] && Number.isSafeInteger(Number.parseInt(process.env[`${prefix}LOG_LEVEL`])) ?
|
|
365
|
+
logLevel: process.env[`${prefix}LOG_LEVEL`] !== null && process.env[`${prefix}LOG_LEVEL`] !== void 0 ? process.env[`${prefix}LOG_LEVEL`] && Number.isSafeInteger(Number.parseInt(process.env[`${prefix}LOG_LEVEL`])) ? _chunkK5SEKFQAcjs.getLogLevelLabel.call(void 0, Number.parseInt(process.env[`${prefix}LOG_LEVEL`])) : process.env[`${prefix}LOG_LEVEL`] : void 0,
|
|
357
366
|
skipConfigLogging: process.env[`${prefix}SKIP_CONFIG_LOGGING`] !== void 0 ? Boolean(process.env[`${prefix}SKIP_CONFIG_LOGGING`]) : void 0
|
|
358
367
|
};
|
|
359
|
-
const themeNames = Object.keys(process.env).filter((envKey) => envKey.startsWith(`${prefix}COLOR_`) &&
|
|
368
|
+
const themeNames = Object.keys(process.env).filter((envKey) => envKey.startsWith(`${prefix}COLOR_`) && _chunkK5SEKFQAcjs.COLOR_KEYS.every((colorKey) => !envKey.startsWith(`${prefix}COLOR_LIGHT_${colorKey}`) && !envKey.startsWith(`${prefix}COLOR_DARK_${colorKey}`)));
|
|
360
369
|
config.colors = themeNames.length > 0 ? themeNames.reduce((ret, themeName) => {
|
|
361
370
|
ret[themeName] = getThemeColorConfigEnv(prefix, themeName);
|
|
362
371
|
return ret;
|
|
363
372
|
}, {}) : getThemeColorConfigEnv(prefix);
|
|
364
|
-
if (config.docs ===
|
|
365
|
-
if (config.homepage ===
|
|
366
|
-
config.docs = `${
|
|
373
|
+
if (config.docs === _chunkK5SEKFQAcjs.STORM_DEFAULT_DOCS) {
|
|
374
|
+
if (config.homepage === _chunkK5SEKFQAcjs.STORM_DEFAULT_HOMEPAGE) {
|
|
375
|
+
config.docs = `${_chunkK5SEKFQAcjs.STORM_DEFAULT_HOMEPAGE}/projects/${config.name}/docs`;
|
|
367
376
|
} else {
|
|
368
377
|
config.docs = `${config.homepage}/docs`;
|
|
369
378
|
}
|
|
370
379
|
}
|
|
371
|
-
if (config.licensing ===
|
|
372
|
-
if (config.homepage ===
|
|
373
|
-
config.licensing = `${
|
|
380
|
+
if (config.licensing === _chunkK5SEKFQAcjs.STORM_DEFAULT_LICENSING) {
|
|
381
|
+
if (config.homepage === _chunkK5SEKFQAcjs.STORM_DEFAULT_HOMEPAGE) {
|
|
382
|
+
config.licensing = `${_chunkK5SEKFQAcjs.STORM_DEFAULT_HOMEPAGE}/projects/${config.name}/licensing`;
|
|
374
383
|
} else {
|
|
375
384
|
config.licensing = `${config.homepage}/docs`;
|
|
376
385
|
}
|
|
@@ -483,6 +492,26 @@ var setConfigEnv = /* @__PURE__ */ _chunkBGYQAVKQcjs.__name.call(void 0, (config
|
|
|
483
492
|
process.env[`${prefix}RELEASE_HEADER`] = config.release.header;
|
|
484
493
|
process.env[`${prefix}RELEASE_FOOTER`] = config.release.footer;
|
|
485
494
|
}
|
|
495
|
+
if (config.account) {
|
|
496
|
+
if (config.account.twitter) {
|
|
497
|
+
process.env[`${prefix}ACCOUNT_TWITTER`] = config.account.twitter;
|
|
498
|
+
}
|
|
499
|
+
if (config.account.discord) {
|
|
500
|
+
process.env[`${prefix}ACCOUNT_DISCORD`] = config.account.discord;
|
|
501
|
+
}
|
|
502
|
+
if (config.account.telegram) {
|
|
503
|
+
process.env[`${prefix}ACCOUNT_TELEGRAM`] = config.account.telegram;
|
|
504
|
+
}
|
|
505
|
+
if (config.account.slack) {
|
|
506
|
+
process.env[`${prefix}ACCOUNT_SLACK`] = config.account.slack;
|
|
507
|
+
}
|
|
508
|
+
if (config.account.medium) {
|
|
509
|
+
process.env[`${prefix}ACCOUNT_MEDIUM`] = config.account.medium;
|
|
510
|
+
}
|
|
511
|
+
if (config.account.github) {
|
|
512
|
+
process.env[`${prefix}ACCOUNT_GITHUB`] = config.account.github;
|
|
513
|
+
}
|
|
514
|
+
}
|
|
486
515
|
if (config.organization) {
|
|
487
516
|
process.env[`${prefix}ORGANIZATION`] = config.organization;
|
|
488
517
|
}
|
|
@@ -501,6 +530,9 @@ var setConfigEnv = /* @__PURE__ */ _chunkBGYQAVKQcjs.__name.call(void 0, (config
|
|
|
501
530
|
if (config.licensing) {
|
|
502
531
|
process.env[`${prefix}LICENSING`] = config.licensing;
|
|
503
532
|
}
|
|
533
|
+
if (config.contact) {
|
|
534
|
+
process.env[`${prefix}CONTACT`] = config.contact;
|
|
535
|
+
}
|
|
504
536
|
if (config.timezone) {
|
|
505
537
|
process.env[`${prefix}TIMEZONE`] = config.timezone;
|
|
506
538
|
process.env.TZ = config.timezone;
|
|
@@ -513,31 +545,31 @@ var setConfigEnv = /* @__PURE__ */ _chunkBGYQAVKQcjs.__name.call(void 0, (config
|
|
|
513
545
|
process.env.LANG = config.locale ? `${config.locale.replaceAll("-", "_")}.UTF-8` : "en_US.UTF-8";
|
|
514
546
|
}
|
|
515
547
|
if (config.configFile) {
|
|
516
|
-
process.env[`${prefix}CONFIG_FILE`] =
|
|
548
|
+
process.env[`${prefix}CONFIG_FILE`] = _chunkK5SEKFQAcjs.correctPaths.call(void 0, config.configFile);
|
|
517
549
|
}
|
|
518
550
|
if (config.workspaceRoot) {
|
|
519
|
-
process.env[`${prefix}WORKSPACE_ROOT`] =
|
|
520
|
-
process.env.NX_WORKSPACE_ROOT =
|
|
521
|
-
process.env.NX_WORKSPACE_ROOT_PATH =
|
|
551
|
+
process.env[`${prefix}WORKSPACE_ROOT`] = _chunkK5SEKFQAcjs.correctPaths.call(void 0, config.workspaceRoot);
|
|
552
|
+
process.env.NX_WORKSPACE_ROOT = _chunkK5SEKFQAcjs.correctPaths.call(void 0, config.workspaceRoot);
|
|
553
|
+
process.env.NX_WORKSPACE_ROOT_PATH = _chunkK5SEKFQAcjs.correctPaths.call(void 0, config.workspaceRoot);
|
|
522
554
|
}
|
|
523
555
|
if (config.directories) {
|
|
524
556
|
if (!config.skipCache && config.directories.cache) {
|
|
525
|
-
process.env[`${prefix}CACHE_DIR`] =
|
|
557
|
+
process.env[`${prefix}CACHE_DIR`] = _chunkK5SEKFQAcjs.correctPaths.call(void 0, config.directories.cache);
|
|
526
558
|
}
|
|
527
559
|
if (config.directories.data) {
|
|
528
|
-
process.env[`${prefix}DATA_DIR`] =
|
|
560
|
+
process.env[`${prefix}DATA_DIR`] = _chunkK5SEKFQAcjs.correctPaths.call(void 0, config.directories.data);
|
|
529
561
|
}
|
|
530
562
|
if (config.directories.config) {
|
|
531
|
-
process.env[`${prefix}CONFIG_DIR`] =
|
|
563
|
+
process.env[`${prefix}CONFIG_DIR`] = _chunkK5SEKFQAcjs.correctPaths.call(void 0, config.directories.config);
|
|
532
564
|
}
|
|
533
565
|
if (config.directories.temp) {
|
|
534
|
-
process.env[`${prefix}TEMP_DIR`] =
|
|
566
|
+
process.env[`${prefix}TEMP_DIR`] = _chunkK5SEKFQAcjs.correctPaths.call(void 0, config.directories.temp);
|
|
535
567
|
}
|
|
536
568
|
if (config.directories.log) {
|
|
537
|
-
process.env[`${prefix}LOG_DIR`] =
|
|
569
|
+
process.env[`${prefix}LOG_DIR`] = _chunkK5SEKFQAcjs.correctPaths.call(void 0, config.directories.log);
|
|
538
570
|
}
|
|
539
571
|
if (config.directories.build) {
|
|
540
|
-
process.env[`${prefix}BUILD_DIR`] =
|
|
572
|
+
process.env[`${prefix}BUILD_DIR`] = _chunkK5SEKFQAcjs.correctPaths.call(void 0, config.directories.build);
|
|
541
573
|
}
|
|
542
574
|
}
|
|
543
575
|
if (config.skipCache !== void 0) {
|
|
@@ -591,8 +623,8 @@ var setConfigEnv = /* @__PURE__ */ _chunkBGYQAVKQcjs.__name.call(void 0, (config
|
|
|
591
623
|
if (config.logLevel) {
|
|
592
624
|
process.env[`${prefix}LOG_LEVEL`] = String(config.logLevel);
|
|
593
625
|
process.env.LOG_LEVEL = String(config.logLevel);
|
|
594
|
-
process.env.NX_VERBOSE_LOGGING = String(
|
|
595
|
-
process.env.RUST_BACKTRACE =
|
|
626
|
+
process.env.NX_VERBOSE_LOGGING = String(_chunkK5SEKFQAcjs.getLogLevel.call(void 0, config.logLevel) >= _chunkK5SEKFQAcjs.LogLevel.DEBUG ? true : false);
|
|
627
|
+
process.env.RUST_BACKTRACE = _chunkK5SEKFQAcjs.getLogLevel.call(void 0, config.logLevel) >= _chunkK5SEKFQAcjs.LogLevel.DEBUG ? "full" : "none";
|
|
596
628
|
}
|
|
597
629
|
if (config.skipConfigLogging !== void 0) {
|
|
598
630
|
process.env[`${prefix}SKIP_CONFIG_LOGGING`] = String(config.skipConfigLogging);
|
|
@@ -710,17 +742,17 @@ var createStormConfig = /* @__PURE__ */ _chunkBGYQAVKQcjs.__name.call(void 0, as
|
|
|
710
742
|
if (!_optionalChain([_static_cache, 'optionalAccess', _48 => _48.data]) || !_optionalChain([_static_cache, 'optionalAccess', _49 => _49.timestamp]) || _static_cache.timestamp < Date.now() - 8e3) {
|
|
711
743
|
let _workspaceRoot = workspaceRoot;
|
|
712
744
|
if (!_workspaceRoot) {
|
|
713
|
-
_workspaceRoot =
|
|
745
|
+
_workspaceRoot = _chunkK5SEKFQAcjs.findWorkspaceRoot.call(void 0, );
|
|
714
746
|
}
|
|
715
747
|
const configEnv = getConfigEnv();
|
|
716
|
-
const defaultConfig = await
|
|
748
|
+
const defaultConfig = await _chunkK5SEKFQAcjs.getDefaultConfig.call(void 0, _workspaceRoot);
|
|
717
749
|
const configFile = await getConfigFile(_workspaceRoot);
|
|
718
750
|
if (!configFile && !skipLogs) {
|
|
719
|
-
|
|
751
|
+
_chunkK5SEKFQAcjs.writeWarning.call(void 0, "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", {
|
|
720
752
|
logLevel: "all"
|
|
721
753
|
});
|
|
722
754
|
}
|
|
723
|
-
result = await
|
|
755
|
+
result = await _chunkK5SEKFQAcjs.StormConfigSchema.parseAsync(_defu2.default.call(void 0, configEnv, configFile, defaultConfig));
|
|
724
756
|
result.workspaceRoot ??= _workspaceRoot;
|
|
725
757
|
} else {
|
|
726
758
|
result = _static_cache.data;
|
|
@@ -755,8 +787,8 @@ var loadStormConfig = /* @__PURE__ */ _chunkBGYQAVKQcjs.__name.call(void 0, asyn
|
|
|
755
787
|
const config = await createStormConfig(void 0, void 0, workspaceRoot, skipLogs);
|
|
756
788
|
setConfigEnv(config);
|
|
757
789
|
if (!skipLogs && !config.skipConfigLogging) {
|
|
758
|
-
|
|
759
|
-
${
|
|
790
|
+
_chunkK5SEKFQAcjs.writeTrace.call(void 0, `\u2699\uFE0F Using Storm Workspace configuration:
|
|
791
|
+
${_chunkK5SEKFQAcjs.formatLogMessage.call(void 0, config)}`, config);
|
|
760
792
|
}
|
|
761
793
|
return config;
|
|
762
794
|
}, "loadStormConfig");
|
|
@@ -785,24 +817,24 @@ var _createtaskgraph = require('nx/src/tasks-runner/create-task-graph');
|
|
|
785
817
|
var _findworkspaceroot = require('nx/src/utils/find-workspace-root');
|
|
786
818
|
var _unbuild = require('unbuild');
|
|
787
819
|
async function resolveOptions(options, config) {
|
|
788
|
-
|
|
789
|
-
const stopwatch =
|
|
820
|
+
_chunkK5SEKFQAcjs.writeDebug.call(void 0, " \u2699\uFE0F Resolving build options", config);
|
|
821
|
+
const stopwatch = _chunkK5SEKFQAcjs.getStopwatch.call(void 0, "Build options resolution");
|
|
790
822
|
if (options.configPath) {
|
|
791
|
-
const configFile = await
|
|
823
|
+
const configFile = await _chunkVPCO2H3Gcjs.loadConfig.call(void 0, options.configPath);
|
|
792
824
|
if (configFile) {
|
|
793
825
|
options = _defu2.default.call(void 0, options, configFile);
|
|
794
826
|
}
|
|
795
827
|
}
|
|
796
|
-
const outputPath = options.outputPath ||
|
|
828
|
+
const outputPath = options.outputPath || _chunkK5SEKFQAcjs.joinPaths.call(void 0, "dist", options.projectRoot);
|
|
797
829
|
const projectGraph = _devkit.readCachedProjectGraph.call(void 0, );
|
|
798
|
-
const projectJsonPath =
|
|
830
|
+
const projectJsonPath = _chunkK5SEKFQAcjs.joinPaths.call(void 0, config.workspaceRoot, options.projectRoot, "project.json");
|
|
799
831
|
if (!_fs.existsSync.call(void 0, projectJsonPath)) {
|
|
800
832
|
throw new Error("Cannot find project.json configuration");
|
|
801
833
|
}
|
|
802
834
|
const projectJsonContent = await _promises.readFile.call(void 0, projectJsonPath, "utf8");
|
|
803
835
|
const projectJson = JSON.parse(projectJsonContent);
|
|
804
836
|
const projectName = projectJson.name;
|
|
805
|
-
const packageJsonPath =
|
|
837
|
+
const packageJsonPath = _chunkK5SEKFQAcjs.joinPaths.call(void 0, config.workspaceRoot, options.projectRoot, "package.json");
|
|
806
838
|
if (!_fs.existsSync.call(void 0, packageJsonPath)) {
|
|
807
839
|
throw new Error("Cannot find package.json configuration");
|
|
808
840
|
}
|
|
@@ -810,14 +842,14 @@ async function resolveOptions(options, config) {
|
|
|
810
842
|
const packageJson = JSON.parse(packageJsonContent);
|
|
811
843
|
let tsconfig = options.tsconfig;
|
|
812
844
|
if (!tsconfig) {
|
|
813
|
-
tsconfig =
|
|
845
|
+
tsconfig = _chunkK5SEKFQAcjs.joinPaths.call(void 0, config.workspaceRoot, options.projectRoot, "tsconfig.json");
|
|
814
846
|
}
|
|
815
847
|
if (!_fs.existsSync.call(void 0, tsconfig)) {
|
|
816
848
|
throw new Error("Cannot find tsconfig.json configuration");
|
|
817
849
|
}
|
|
818
850
|
let sourceRoot = projectJson.sourceRoot;
|
|
819
851
|
if (!sourceRoot) {
|
|
820
|
-
sourceRoot =
|
|
852
|
+
sourceRoot = _chunkK5SEKFQAcjs.joinPaths.call(void 0, options.projectRoot, "src");
|
|
821
853
|
}
|
|
822
854
|
if (!_fs.existsSync.call(void 0, sourceRoot)) {
|
|
823
855
|
throw new Error("Cannot find sourceRoot directory");
|
|
@@ -853,7 +885,7 @@ async function resolveOptions(options, config) {
|
|
|
853
885
|
while (entryPath.startsWith("/")) {
|
|
854
886
|
entryPath = entryPath.substring(1);
|
|
855
887
|
}
|
|
856
|
-
const outDir =
|
|
888
|
+
const outDir = _chunkK5SEKFQAcjs.joinPaths.call(void 0, _path.relative.call(void 0, _chunkK5SEKFQAcjs.joinPaths.call(void 0, config.workspaceRoot, options.projectRoot), config.workspaceRoot), outputPath, "dist");
|
|
857
889
|
ret.push({
|
|
858
890
|
name: `${name}-esm`,
|
|
859
891
|
builder: "mkdist",
|
|
@@ -927,7 +959,7 @@ async function resolveOptions(options, config) {
|
|
|
927
959
|
treeShaking: options.treeShaking !== false,
|
|
928
960
|
platform: _nullishCoalesce(options.platform, () => ( "neutral")),
|
|
929
961
|
color: true,
|
|
930
|
-
logLevel: config.logLevel ===
|
|
962
|
+
logLevel: config.logLevel === _chunkK5SEKFQAcjs.LogLevelLabel.FATAL ? _chunkK5SEKFQAcjs.LogLevelLabel.ERROR : _chunkK5SEKFQAcjs.isVerbose.call(void 0, ) ? "verbose" : config.logLevel
|
|
931
963
|
}
|
|
932
964
|
}
|
|
933
965
|
};
|
|
@@ -944,7 +976,7 @@ async function resolveOptions(options, config) {
|
|
|
944
976
|
if (options.rollup) {
|
|
945
977
|
let rollup = {};
|
|
946
978
|
if (typeof options.rollup === "string") {
|
|
947
|
-
const rollupFile = await
|
|
979
|
+
const rollupFile = await _chunkVPCO2H3Gcjs.loadConfig.call(void 0, options.rollup);
|
|
948
980
|
if (rollupFile) {
|
|
949
981
|
rollup = rollupFile;
|
|
950
982
|
}
|
|
@@ -956,15 +988,15 @@ async function resolveOptions(options, config) {
|
|
|
956
988
|
resolvedOptions.hooks = {
|
|
957
989
|
"rollup:options": /* @__PURE__ */ _chunkBGYQAVKQcjs.__name.call(void 0, async (ctx, opts) => {
|
|
958
990
|
if (options.plugins && options.plugins.length > 0) {
|
|
959
|
-
|
|
991
|
+
_chunkK5SEKFQAcjs.writeDebug.call(void 0, ` \u{1F9E9} Found ${options.plugins.length} plugins in provided build options`, config);
|
|
960
992
|
opts.plugins = options.plugins;
|
|
961
993
|
} else {
|
|
962
|
-
|
|
994
|
+
_chunkK5SEKFQAcjs.writeDebug.call(void 0, ` \u{1F9E9} No plugins found in provided build options, using default plugins`, config);
|
|
963
995
|
opts.plugins = await Promise.all([
|
|
964
|
-
|
|
996
|
+
_chunkOOFPXPRCcjs.analyzePlugin.call(void 0, resolvedOptions),
|
|
965
997
|
_chunkOD3ULBE3cjs.typeDefinitionsPlugin.call(void 0, resolvedOptions),
|
|
966
|
-
|
|
967
|
-
|
|
998
|
+
_chunkVPCO2H3Gcjs.tscPlugin.call(void 0, resolvedOptions),
|
|
999
|
+
_chunkX25DCA4Tcjs.onErrorPlugin.call(void 0, resolvedOptions)
|
|
968
1000
|
]);
|
|
969
1001
|
}
|
|
970
1002
|
}, "rollup:options"),
|
|
@@ -1017,14 +1049,14 @@ var addPackageJsonExport = /* @__PURE__ */ _chunkBGYQAVKQcjs.__name.call(void 0,
|
|
|
1017
1049
|
};
|
|
1018
1050
|
}, "addPackageJsonExport");
|
|
1019
1051
|
async function generatePackageJson(options) {
|
|
1020
|
-
if (options.generatePackageJson !== false && _fs.existsSync.call(void 0,
|
|
1021
|
-
|
|
1022
|
-
const stopwatch =
|
|
1023
|
-
const packageJsonPath =
|
|
1052
|
+
if (options.generatePackageJson !== false && _fs.existsSync.call(void 0, _chunkK5SEKFQAcjs.joinPaths.call(void 0, options.projectRoot, "package.json"))) {
|
|
1053
|
+
_chunkK5SEKFQAcjs.writeDebug.call(void 0, " \u270D\uFE0F Writing package.json file", options.config);
|
|
1054
|
+
const stopwatch = _chunkK5SEKFQAcjs.getStopwatch.call(void 0, "Write package.json file");
|
|
1055
|
+
const packageJsonPath = _chunkK5SEKFQAcjs.joinPaths.call(void 0, options.projectRoot, "project.json");
|
|
1024
1056
|
if (!_fs.existsSync.call(void 0, packageJsonPath)) {
|
|
1025
1057
|
throw new Error("Cannot find package.json configuration");
|
|
1026
1058
|
}
|
|
1027
|
-
const packageJsonContent = await _promises.readFile.call(void 0,
|
|
1059
|
+
const packageJsonContent = await _promises.readFile.call(void 0, _chunkK5SEKFQAcjs.joinPaths.call(void 0, options.config.workspaceRoot, options.projectRoot, "package.json"), "utf8");
|
|
1028
1060
|
if (!packageJsonContent) {
|
|
1029
1061
|
throw new Error("Cannot find package.json configuration file");
|
|
1030
1062
|
}
|
|
@@ -1041,7 +1073,7 @@ async function generatePackageJson(options) {
|
|
|
1041
1073
|
while (entryPath.startsWith("/")) {
|
|
1042
1074
|
entryPath = entryPath.substring(1);
|
|
1043
1075
|
}
|
|
1044
|
-
entryPath = `./${
|
|
1076
|
+
entryPath = `./${_chunkK5SEKFQAcjs.joinPaths.call(void 0, options.projectRoot, entryPath)}`;
|
|
1045
1077
|
if (!ret.includes(entryPath)) {
|
|
1046
1078
|
ret.push(entryPath);
|
|
1047
1079
|
}
|
|
@@ -1072,23 +1104,23 @@ async function generatePackageJson(options) {
|
|
|
1072
1104
|
}, packageJson.exports);
|
|
1073
1105
|
packageJson.exports["./package.json"] ??= "./package.json";
|
|
1074
1106
|
packageJson.exports["."] ??= addPackageJsonExport("index", packageJson.type, options.sourceRoot, options.projectRoot);
|
|
1075
|
-
await _devkit.writeJsonFile.call(void 0,
|
|
1107
|
+
await _devkit.writeJsonFile.call(void 0, _chunkK5SEKFQAcjs.joinPaths.call(void 0, options.outDir, "package.json"), packageJson);
|
|
1076
1108
|
stopwatch();
|
|
1077
1109
|
}
|
|
1078
1110
|
return options;
|
|
1079
1111
|
}
|
|
1080
1112
|
_chunkBGYQAVKQcjs.__name.call(void 0, generatePackageJson, "generatePackageJson");
|
|
1081
1113
|
async function executeUnbuild(options) {
|
|
1082
|
-
|
|
1083
|
-
const stopwatch =
|
|
1114
|
+
_chunkK5SEKFQAcjs.writeDebug.call(void 0, ` \u{1F680} Running ${options.name} (${options.projectRoot}) build`, options.config);
|
|
1115
|
+
const stopwatch = _chunkK5SEKFQAcjs.getStopwatch.call(void 0, `${options.name} (${options.projectRoot}) build`);
|
|
1084
1116
|
try {
|
|
1085
1117
|
const config = {
|
|
1086
1118
|
...options,
|
|
1087
1119
|
config: null,
|
|
1088
|
-
rootDir:
|
|
1120
|
+
rootDir: _chunkK5SEKFQAcjs.joinPaths.call(void 0, options.config.workspaceRoot, options.projectRoot)
|
|
1089
1121
|
};
|
|
1090
|
-
|
|
1091
|
-
${
|
|
1122
|
+
_chunkK5SEKFQAcjs.writeTrace.call(void 0, `Running with unbuild configuration:
|
|
1123
|
+
${_chunkK5SEKFQAcjs.formatLogMessage.call(void 0, config)}
|
|
1092
1124
|
`, options.config);
|
|
1093
1125
|
await _unbuild.build.call(void 0, options.projectRoot, false, config);
|
|
1094
1126
|
} finally {
|
|
@@ -1098,8 +1130,8 @@ ${_chunkOGMYQNDMcjs.formatLogMessage.call(void 0, config)}
|
|
|
1098
1130
|
}
|
|
1099
1131
|
_chunkBGYQAVKQcjs.__name.call(void 0, executeUnbuild, "executeUnbuild");
|
|
1100
1132
|
async function copyBuildAssets(options) {
|
|
1101
|
-
|
|
1102
|
-
const stopwatch =
|
|
1133
|
+
_chunkK5SEKFQAcjs.writeDebug.call(void 0, ` \u{1F4CB} Copying asset files to output directory: ${options.outDir}`, options.config);
|
|
1134
|
+
const stopwatch = _chunkK5SEKFQAcjs.getStopwatch.call(void 0, `${options.name} asset copy`);
|
|
1103
1135
|
await copyAssets(options.config, _nullishCoalesce(options.assets, () => ( [])), options.outDir, options.projectRoot, options.sourceRoot, options.generatePackageJson, options.includeSrc);
|
|
1104
1136
|
stopwatch();
|
|
1105
1137
|
return options;
|
|
@@ -1107,9 +1139,9 @@ async function copyBuildAssets(options) {
|
|
|
1107
1139
|
_chunkBGYQAVKQcjs.__name.call(void 0, copyBuildAssets, "copyBuildAssets");
|
|
1108
1140
|
async function cleanOutputPath(options) {
|
|
1109
1141
|
if (options.clean !== false && options.outDir) {
|
|
1110
|
-
|
|
1111
|
-
const stopwatch =
|
|
1112
|
-
await
|
|
1142
|
+
_chunkK5SEKFQAcjs.writeDebug.call(void 0, ` \u{1F9F9} Cleaning ${options.name} output path: ${options.outDir}`, options.config);
|
|
1143
|
+
const stopwatch = _chunkK5SEKFQAcjs.getStopwatch.call(void 0, `${options.name} output clean`);
|
|
1144
|
+
await _chunkWGGER7UIcjs.cleanDirectories.call(void 0, options.name, options.outDir, options.config);
|
|
1113
1145
|
stopwatch();
|
|
1114
1146
|
}
|
|
1115
1147
|
return options;
|
|
@@ -1125,18 +1157,18 @@ async function build(options) {
|
|
|
1125
1157
|
throw new Error("Cannot find workspace root");
|
|
1126
1158
|
}
|
|
1127
1159
|
const config = await getConfig(workspaceRoot.dir);
|
|
1128
|
-
|
|
1129
|
-
const stopwatch =
|
|
1160
|
+
_chunkK5SEKFQAcjs.writeDebug.call(void 0, ` \u26A1 Executing Storm Unbuild pipeline`, config);
|
|
1161
|
+
const stopwatch = _chunkK5SEKFQAcjs.getStopwatch.call(void 0, "Unbuild pipeline");
|
|
1130
1162
|
try {
|
|
1131
|
-
options.projectRoot =
|
|
1163
|
+
options.projectRoot = _chunkK5SEKFQAcjs.correctPaths.call(void 0, projectRoot);
|
|
1132
1164
|
const resolvedOptions = await resolveOptions(options, config);
|
|
1133
1165
|
await cleanOutputPath(resolvedOptions);
|
|
1134
1166
|
await generatePackageJson(resolvedOptions);
|
|
1135
1167
|
await executeUnbuild(resolvedOptions);
|
|
1136
1168
|
await copyBuildAssets(resolvedOptions);
|
|
1137
|
-
|
|
1169
|
+
_chunkK5SEKFQAcjs.writeSuccess.call(void 0, ` \u{1F3C1} The ${resolvedOptions.name} build completed successfully`, config);
|
|
1138
1170
|
} catch (error) {
|
|
1139
|
-
|
|
1171
|
+
_chunkK5SEKFQAcjs.writeFatal.call(void 0, "Fatal errors that the build process could not recover from have occured. The build process has been terminated.", config);
|
|
1140
1172
|
throw error;
|
|
1141
1173
|
} finally {
|
|
1142
1174
|
stopwatch();
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { newObj[key] = obj[key]; } } } newObj.default = obj; return newObj; } } function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } }
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var _chunkK5SEKFQAcjs = require('./chunk-K5SEKFQA.cjs');
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
var _chunkBGYQAVKQcjs = require('./chunk-BGYQAVKQ.cjs');
|
|
@@ -32,7 +32,7 @@ async function createTsCompilerOptions(config, tsConfigPath, projectRoot, depend
|
|
|
32
32
|
declaration: true,
|
|
33
33
|
paths: _buildablelibsutils.computeCompilerOptionsPaths.call(void 0, tsConfig, _nullishCoalesce(dependencies, () => ( [])))
|
|
34
34
|
};
|
|
35
|
-
|
|
35
|
+
_chunkK5SEKFQAcjs.writeTrace.call(void 0, compilerOptions, config);
|
|
36
36
|
return compilerOptions;
|
|
37
37
|
}
|
|
38
38
|
_chunkBGYQAVKQcjs.__name.call(void 0, createTsCompilerOptions, "createTsCompilerOptions");
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
3
|
|
|
4
|
-
var
|
|
4
|
+
var _chunkK5SEKFQAcjs = require('./chunk-K5SEKFQA.cjs');
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
var _chunkBGYQAVKQcjs = require('./chunk-BGYQAVKQ.cjs');
|
|
@@ -9,8 +9,8 @@ var _chunkBGYQAVKQcjs = require('./chunk-BGYQAVKQ.cjs');
|
|
|
9
9
|
// src/clean.ts
|
|
10
10
|
var _promises = require('fs/promises');
|
|
11
11
|
async function clean(name = "Unbuild", directory, config) {
|
|
12
|
-
|
|
13
|
-
const stopwatch =
|
|
12
|
+
_chunkK5SEKFQAcjs.writeDebug.call(void 0, ` \u{1F9F9} Cleaning ${name} output path: ${directory}`, config);
|
|
13
|
+
const stopwatch = _chunkK5SEKFQAcjs.getStopwatch.call(void 0, `${name} output clean`);
|
|
14
14
|
await cleanDirectories(name, directory, config);
|
|
15
15
|
stopwatch();
|
|
16
16
|
}
|