@storm-software/workspace-tools 1.239.4 → 1.239.6
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 +25 -0
- package/README.md +1 -1
- package/dist/{chunk-VTNJFMZL.js → chunk-2VV3TV3C.js} +2 -2
- package/dist/{chunk-SOQA673K.mjs → chunk-34RUITCL.mjs} +5 -5
- package/dist/{chunk-SMQLC4ZD.js → chunk-3LJCHADS.js} +5 -5
- package/dist/{chunk-STENKYWN.js → chunk-4AOGBZNI.js} +2 -2
- package/dist/{chunk-CT2M6P5R.js → chunk-4ZKSU75O.js} +11 -11
- package/dist/{chunk-KTQJ3BYS.js → chunk-5HAR4KEC.js} +9 -9
- package/dist/{chunk-7ZQ2E7DU.mjs → chunk-762D6XMQ.mjs} +1 -1
- package/dist/{chunk-PYLFT2B6.mjs → chunk-7HUOKMPU.mjs} +1 -1
- package/dist/{chunk-LQSCFXXH.mjs → chunk-AJ7WQHX5.mjs} +1 -1
- package/dist/{chunk-UR7LTGOY.js → chunk-APBDTIK2.js} +2 -2
- package/dist/{chunk-OCZKMQKV.mjs → chunk-BFKQCOQJ.mjs} +1 -1
- package/dist/{chunk-FDQROX6T.js → chunk-BJAK7EVK.js} +4 -4
- package/dist/{chunk-B2TMWHSQ.js → chunk-CRMDACYF.js} +20 -20
- package/dist/{chunk-TDO6POJN.js → chunk-EGBJI6CN.js} +15 -15
- package/dist/{chunk-NOGV45XZ.mjs → chunk-FOYWFRVO.mjs} +3 -3
- package/dist/{chunk-BQ6QQEKM.js → chunk-GRU36BAP.js} +41 -41
- package/dist/{chunk-IFT7I2FJ.js → chunk-HCEVPME2.js} +9 -9
- package/dist/{chunk-VNRL6EUK.mjs → chunk-HLVPVUIE.mjs} +5 -5
- package/dist/{chunk-XV2NPRXT.mjs → chunk-HO2DSAZ2.mjs} +1 -1
- package/dist/{chunk-3BU4E3N6.mjs → chunk-I5N7XQEK.mjs} +1 -1
- package/dist/{chunk-GIIOK5XW.mjs → chunk-INGLAMPC.mjs} +4 -4
- package/dist/{chunk-IF2P52VQ.mjs → chunk-JE4JY3YS.mjs} +1 -1
- package/dist/{chunk-FTCEJETR.mjs → chunk-JKJK4ONU.mjs} +3 -3
- package/dist/{chunk-SLVOLY6P.mjs → chunk-JXMDPU4I.mjs} +3 -3
- package/dist/{chunk-YP6KREBX.mjs → chunk-M4PPRKPX.mjs} +2 -2
- package/dist/{chunk-JES75APB.mjs → chunk-MFWYLIWY.mjs} +2 -2
- package/dist/{chunk-7DG4BPDH.js → chunk-MQAKNE4X.js} +5 -5
- package/dist/{chunk-FZRFNRJT.js → chunk-NOVYFOO2.js} +31 -31
- package/dist/{chunk-E42HWC4D.js → chunk-NWSV2EYZ.js} +2 -2
- package/dist/{chunk-BWUHOT6F.mjs → chunk-NYX3ICKR.mjs} +103 -50
- package/dist/{chunk-RER3HTR4.js → chunk-PB6J3FU7.js} +2 -2
- package/dist/{chunk-XV57DEOH.mjs → chunk-QLOTS3MH.mjs} +1 -1
- package/dist/{chunk-M3X4P6AT.js → chunk-RN4QXP7F.js} +111 -58
- package/dist/{chunk-WO3SOZPT.mjs → chunk-RRQ7WHLD.mjs} +2 -2
- package/dist/{chunk-3W2Z7D4U.js → chunk-SBHOAJIT.js} +2 -2
- package/dist/{chunk-ODVU2NXI.mjs → chunk-SC3ANGC5.mjs} +2 -2
- package/dist/{chunk-BUKUNOCV.js → chunk-SGSMEZWT.js} +2 -2
- package/dist/{chunk-6SV7BVD4.mjs → chunk-WGNNLNSH.mjs} +1 -1
- package/dist/{chunk-BNVJA74D.js → chunk-Y7RQKDIF.js} +2 -2
- package/dist/{chunk-LSUHHBAM.js → chunk-YVJY3MXR.js} +2 -2
- package/dist/{executor-B4MiexNw.d.ts → executor-BHwhDrL-.d.ts} +1 -1
- package/dist/{executor-C8vSwRW1.d.ts → executor-BW_5lER2.d.ts} +1 -1
- package/dist/{executor-qCehbH9x.d.mts → executor-Bk4ug-RW.d.mts} +1 -1
- package/dist/{executor-BqpvCbj5.d.ts → executor-CIGyZdrv.d.ts} +1 -1
- package/dist/{executor-D8m1bXgk.d.mts → executor-C_QU1lUw.d.mts} +1 -1
- package/dist/{executor-5Wog21g_.d.mts → executor-D2o23AZj.d.mts} +1 -1
- package/dist/{executor-hq_H_ICT.d.mts → executor-DL3jAzFW.d.mts} +1 -1
- package/dist/{executor-D5hcfG7B.d.ts → executor-DOFe9F7c.d.ts} +1 -1
- package/dist/{executor-U929Bp8J.d.ts → executor-hDJ0Fk_g.d.ts} +1 -1
- package/dist/{executor-CqbWU1uP.d.mts → executor-ozBp5rj1.d.mts} +1 -1
- package/dist/executors.d.mts +6 -6
- package/dist/executors.d.ts +6 -6
- package/dist/executors.js +14 -14
- package/dist/executors.mjs +13 -13
- package/dist/{generator-BLYdn00o.d.mts → generator-BNM0qnMp.d.mts} +1 -1
- package/dist/{generator-48_WHnGL.d.mts → generator-BPXY7sqO.d.mts} +1 -1
- package/dist/{generator-Dyq3mgZU.d.mts → generator-BS6uKMIL.d.mts} +2 -2
- package/dist/{generator-DeKyhxAj.d.mts → generator-BsxAYGR_.d.mts} +2 -2
- package/dist/{generator-OLytwpdD.d.ts → generator-CFxhJoNw.d.ts} +2 -2
- package/dist/{generator-T2p5gT0C.d.ts → generator-CiDljAEY.d.ts} +2 -2
- package/dist/{generator-noL-xIjx.d.ts → generator-CiNaIUED.d.ts} +1 -1
- package/dist/{generator-BufhnJev.d.ts → generator-DDW7kns9.d.ts} +2 -2
- package/dist/{generator-BqzpDHpv.d.mts → generator-DatrLGpK.d.mts} +2 -2
- package/dist/{generator-DeNfAL1R.d.ts → generator-QTX2Ix9P.d.ts} +1 -1
- package/dist/{generator-CC8n6BWL.d.mts → generator-c8PBxLhH.d.mts} +2 -2
- package/dist/{generator-CtpgcwxE.d.ts → generator-ymaJQAJP.d.ts} +2 -2
- package/dist/generators.d.mts +8 -8
- package/dist/generators.d.ts +8 -8
- package/dist/generators.js +9 -9
- package/dist/generators.mjs +8 -8
- package/dist/index.d.mts +13 -13
- package/dist/index.d.ts +13 -13
- package/dist/index.js +21 -21
- package/dist/index.mjs +20 -20
- package/dist/src/base/base-executor.d.mts +2 -2
- package/dist/src/base/base-executor.d.ts +2 -2
- package/dist/src/base/base-executor.js +3 -3
- package/dist/src/base/base-executor.mjs +2 -2
- package/dist/src/base/base-generator.d.mts +2 -2
- package/dist/src/base/base-generator.d.ts +2 -2
- package/dist/src/base/base-generator.js +3 -3
- package/dist/src/base/base-generator.mjs +2 -2
- package/dist/src/base/index.d.mts +2 -2
- package/dist/src/base/index.d.ts +2 -2
- package/dist/src/base/index.js +4 -4
- package/dist/src/base/index.mjs +3 -3
- package/dist/src/executors/cargo-build/executor.js +4 -4
- package/dist/src/executors/cargo-build/executor.mjs +3 -3
- package/dist/src/executors/cargo-check/executor.js +4 -4
- package/dist/src/executors/cargo-check/executor.mjs +3 -3
- package/dist/src/executors/cargo-clippy/executor.js +4 -4
- package/dist/src/executors/cargo-clippy/executor.mjs +3 -3
- package/dist/src/executors/cargo-doc/executor.js +4 -4
- package/dist/src/executors/cargo-doc/executor.mjs +3 -3
- package/dist/src/executors/cargo-format/executor.js +4 -4
- package/dist/src/executors/cargo-format/executor.mjs +3 -3
- package/dist/src/executors/clean-package/executor.d.mts +1 -1
- package/dist/src/executors/clean-package/executor.d.ts +1 -1
- package/dist/src/executors/clean-package/executor.js +5 -5
- package/dist/src/executors/clean-package/executor.mjs +2 -2
- package/dist/src/executors/esbuild/executor.d.mts +2 -2
- package/dist/src/executors/esbuild/executor.d.ts +2 -2
- package/dist/src/executors/esbuild/executor.js +5 -5
- package/dist/src/executors/esbuild/executor.mjs +4 -4
- package/dist/src/executors/size-limit/executor.d.mts +2 -2
- package/dist/src/executors/size-limit/executor.d.ts +2 -2
- package/dist/src/executors/size-limit/executor.js +4 -4
- package/dist/src/executors/size-limit/executor.mjs +3 -3
- package/dist/src/executors/tsdown/executor.d.mts +2 -2
- package/dist/src/executors/tsdown/executor.d.ts +2 -2
- package/dist/src/executors/tsdown/executor.js +5 -5
- package/dist/src/executors/tsdown/executor.mjs +4 -4
- package/dist/src/executors/typia/executor.d.mts +2 -2
- package/dist/src/executors/typia/executor.d.ts +2 -2
- package/dist/src/executors/typia/executor.js +4 -4
- package/dist/src/executors/typia/executor.mjs +3 -3
- package/dist/src/executors/unbuild/executor.d.mts +2 -2
- package/dist/src/executors/unbuild/executor.d.ts +2 -2
- package/dist/src/executors/unbuild/executor.js +4 -4
- package/dist/src/executors/unbuild/executor.mjs +3 -3
- package/dist/src/generators/browser-library/generator.d.mts +3 -3
- package/dist/src/generators/browser-library/generator.d.ts +3 -3
- package/dist/src/generators/browser-library/generator.js +4 -4
- package/dist/src/generators/browser-library/generator.mjs +3 -3
- package/dist/src/generators/config-schema/generator.d.mts +3 -3
- package/dist/src/generators/config-schema/generator.d.ts +3 -3
- package/dist/src/generators/config-schema/generator.js +4 -4
- package/dist/src/generators/config-schema/generator.mjs +3 -3
- package/dist/src/generators/neutral-library/generator.d.mts +3 -3
- package/dist/src/generators/neutral-library/generator.d.ts +3 -3
- package/dist/src/generators/neutral-library/generator.js +4 -4
- package/dist/src/generators/neutral-library/generator.mjs +3 -3
- package/dist/src/generators/node-library/generator.d.mts +3 -3
- package/dist/src/generators/node-library/generator.d.ts +3 -3
- package/dist/src/generators/node-library/generator.js +4 -4
- package/dist/src/generators/node-library/generator.mjs +3 -3
- package/dist/src/generators/preset/generator.d.mts +3 -3
- package/dist/src/generators/preset/generator.d.ts +3 -3
- package/dist/src/generators/preset/generator.js +4 -4
- package/dist/src/generators/preset/generator.mjs +3 -3
- package/dist/src/generators/release-version/generator.d.mts +2 -2
- package/dist/src/generators/release-version/generator.d.ts +2 -2
- package/dist/src/generators/release-version/generator.js +3 -3
- package/dist/src/generators/release-version/generator.mjs +2 -2
- package/dist/src/types.d.mts +2 -2
- package/dist/src/types.d.ts +2 -2
- package/dist/src/utils/apply-workspace-tokens.d.mts +1 -1
- package/dist/src/utils/apply-workspace-tokens.d.ts +1 -1
- package/dist/src/utils/index.d.mts +2 -2
- package/dist/src/utils/index.d.ts +2 -2
- package/dist/src/utils/project-tags.d.mts +2 -2
- package/dist/src/utils/project-tags.d.ts +2 -2
- package/dist/{types-BmsLBqaq.d.ts → types-Bd83s-qg.d.ts} +1 -1
- package/dist/{types-CQzaS20Q.d.mts → types-CYi2oThM.d.mts} +1 -1
- package/dist/{types-D9vU63tt.d.ts → types-zrlItIRw.d.mts} +3 -3
- package/dist/{types-D9vU63tt.d.mts → types-zrlItIRw.d.ts} +3 -3
- package/package.json +5 -5
|
@@ -6,10 +6,10 @@
|
|
|
6
6
|
|
|
7
7
|
|
|
8
8
|
|
|
9
|
-
var
|
|
9
|
+
var _chunk5HAR4KECjs = require('./chunk-5HAR4KEC.js');
|
|
10
10
|
|
|
11
11
|
|
|
12
|
-
var
|
|
12
|
+
var _chunkCRMDACYFjs = require('./chunk-CRMDACYF.js');
|
|
13
13
|
|
|
14
14
|
|
|
15
15
|
|
|
@@ -19,7 +19,7 @@ var _chunkB2TMWHSQjs = require('./chunk-B2TMWHSQ.js');
|
|
|
19
19
|
|
|
20
20
|
|
|
21
21
|
|
|
22
|
-
var
|
|
22
|
+
var _chunkRN4QXP7Fjs = require('./chunk-RN4QXP7F.js');
|
|
23
23
|
|
|
24
24
|
|
|
25
25
|
var _chunkXCSSYTCUjs = require('./chunk-XCSSYTCU.js');
|
|
@@ -37,8 +37,8 @@ var _tsdown = require('tsdown');
|
|
|
37
37
|
// ../tsdown/src/clean.ts
|
|
38
38
|
|
|
39
39
|
async function clean(name = "ESBuild", directory, config) {
|
|
40
|
-
|
|
41
|
-
const stopwatch =
|
|
40
|
+
_chunkRN4QXP7Fjs.writeDebug.call(void 0, ` \u{1F9F9} Cleaning ${name} output path: ${directory}`, config);
|
|
41
|
+
const stopwatch = _chunkRN4QXP7Fjs.getStopwatch.call(void 0, `${name} output clean`);
|
|
42
42
|
await _node.hfs.deleteAll(directory);
|
|
43
43
|
stopwatch();
|
|
44
44
|
}
|
|
@@ -73,9 +73,9 @@ var resolveOptions = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, async
|
|
|
73
73
|
if (!workspaceRoot) {
|
|
74
74
|
throw new Error("Cannot find Nx workspace root");
|
|
75
75
|
}
|
|
76
|
-
const config = await
|
|
77
|
-
|
|
78
|
-
const stopwatch =
|
|
76
|
+
const config = await _chunkRN4QXP7Fjs.getConfig.call(void 0, workspaceRoot.dir);
|
|
77
|
+
_chunkRN4QXP7Fjs.writeDebug.call(void 0, " \u2699\uFE0F Resolving build options", config);
|
|
78
|
+
const stopwatch = _chunkRN4QXP7Fjs.getStopwatch.call(void 0, "Build options resolution");
|
|
79
79
|
const projectGraph = await _devkit.createProjectGraphAsync.call(void 0, {
|
|
80
80
|
exitOnError: true
|
|
81
81
|
});
|
|
@@ -91,19 +91,19 @@ var resolveOptions = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, async
|
|
|
91
91
|
}
|
|
92
92
|
const options = _defu2.default.call(void 0, userOptions, DEFAULT_BUILD_OPTIONS);
|
|
93
93
|
options.name ??= `${projectName}-${options.format}`;
|
|
94
|
-
options.target ??=
|
|
94
|
+
options.target ??= _chunk5HAR4KECjs.DEFAULT_TARGET;
|
|
95
95
|
const packageJsonPath = _chunkXCSSYTCUjs.joinPaths.call(void 0, workspaceRoot.dir, options.projectRoot, "package.json");
|
|
96
96
|
if (!await _node.hfs.isFile(packageJsonPath)) {
|
|
97
97
|
throw new Error("Cannot find package.json configuration");
|
|
98
98
|
}
|
|
99
|
-
const env =
|
|
99
|
+
const env = _chunk5HAR4KECjs.getEnv.call(void 0, "tsdown", options);
|
|
100
100
|
const result = {
|
|
101
101
|
...options,
|
|
102
102
|
config,
|
|
103
103
|
...userOptions,
|
|
104
104
|
tsconfig: _chunkXCSSYTCUjs.joinPaths.call(void 0, projectRoot, userOptions.tsconfig ? userOptions.tsconfig.replace(projectRoot, "") : "tsconfig.json"),
|
|
105
105
|
format: options.format || "cjs",
|
|
106
|
-
entryPoints: await
|
|
106
|
+
entryPoints: await _chunk5HAR4KECjs.getEntryPoints.call(void 0, config, projectRoot, projectJson.sourceRoot, userOptions.entry || [
|
|
107
107
|
"./src/index.ts"
|
|
108
108
|
], userOptions.emitOnAll),
|
|
109
109
|
outdir: userOptions.outputPath || _chunkXCSSYTCUjs.joinPaths.call(void 0, "dist", projectRoot),
|
|
@@ -114,7 +114,7 @@ var resolveOptions = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, async
|
|
|
114
114
|
projectGraph,
|
|
115
115
|
sourceRoot: userOptions.sourceRoot || projectJson.sourceRoot || _chunkXCSSYTCUjs.joinPaths.call(void 0, projectRoot, "src"),
|
|
116
116
|
minify: userOptions.minify || !userOptions.debug,
|
|
117
|
-
verbose: userOptions.verbose ||
|
|
117
|
+
verbose: userOptions.verbose || _chunkRN4QXP7Fjs.isVerbose.call(void 0, ) || userOptions.debug === true,
|
|
118
118
|
includeSrc: userOptions.includeSrc === true,
|
|
119
119
|
metafile: userOptions.metafile !== false,
|
|
120
120
|
generatePackageJson: userOptions.generatePackageJson !== false,
|
|
@@ -149,8 +149,8 @@ var resolveOptions = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, async
|
|
|
149
149
|
}, "resolveOptions");
|
|
150
150
|
async function generatePackageJson(options) {
|
|
151
151
|
if (options.generatePackageJson !== false && await _node.hfs.isFile(_chunkXCSSYTCUjs.joinPaths.call(void 0, options.projectRoot, "package.json"))) {
|
|
152
|
-
|
|
153
|
-
const stopwatch =
|
|
152
|
+
_chunkRN4QXP7Fjs.writeDebug.call(void 0, " \u270D\uFE0F Writing package.json file", options.config);
|
|
153
|
+
const stopwatch = _chunkRN4QXP7Fjs.getStopwatch.call(void 0, "Write package.json file");
|
|
154
154
|
const packageJsonPath = _chunkXCSSYTCUjs.joinPaths.call(void 0, options.projectRoot, "project.json");
|
|
155
155
|
if (!await _node.hfs.isFile(packageJsonPath)) {
|
|
156
156
|
throw new Error("Cannot find package.json configuration");
|
|
@@ -159,11 +159,11 @@ async function generatePackageJson(options) {
|
|
|
159
159
|
if (!packageJson) {
|
|
160
160
|
throw new Error("Cannot find package.json configuration file");
|
|
161
161
|
}
|
|
162
|
-
packageJson = await
|
|
163
|
-
packageJson = await
|
|
162
|
+
packageJson = await _chunk5HAR4KECjs.addPackageDependencies.call(void 0, options.config.workspaceRoot, options.projectRoot, options.projectName, packageJson);
|
|
163
|
+
packageJson = await _chunk5HAR4KECjs.addWorkspacePackageJsonFields.call(void 0, options.config, options.projectRoot, options.sourceRoot, options.projectName, false, packageJson);
|
|
164
164
|
packageJson.exports ??= {};
|
|
165
165
|
packageJson.exports["./package.json"] ??= "./package.json";
|
|
166
|
-
packageJson.exports["."] ??=
|
|
166
|
+
packageJson.exports["."] ??= _chunk5HAR4KECjs.addPackageJsonExport.call(void 0, "index", packageJson.type, options.sourceRoot);
|
|
167
167
|
let entryPoints = [
|
|
168
168
|
{
|
|
169
169
|
in: "./src/index.ts",
|
|
@@ -181,7 +181,7 @@ async function generatePackageJson(options) {
|
|
|
181
181
|
const split = entryPoint.out.split(".");
|
|
182
182
|
split.pop();
|
|
183
183
|
const entry = split.join(".").replaceAll("\\", "/");
|
|
184
|
-
packageJson.exports[`./${entry}`] ??=
|
|
184
|
+
packageJson.exports[`./${entry}`] ??= _chunk5HAR4KECjs.addPackageJsonExport.call(void 0, entry, packageJson.type, options.sourceRoot);
|
|
185
185
|
}
|
|
186
186
|
}
|
|
187
187
|
packageJson.main = packageJson.type === "commonjs" ? "./dist/index.js" : "./dist/index.cjs";
|
|
@@ -200,8 +200,8 @@ async function generatePackageJson(options) {
|
|
|
200
200
|
}
|
|
201
201
|
_chunk3GQAWCBQjs.__name.call(void 0, generatePackageJson, "generatePackageJson");
|
|
202
202
|
async function executeTSDown(options) {
|
|
203
|
-
|
|
204
|
-
const stopwatch =
|
|
203
|
+
_chunkRN4QXP7Fjs.writeDebug.call(void 0, ` \u{1F680} Running ${options.name} build`, options.config);
|
|
204
|
+
const stopwatch = _chunkRN4QXP7Fjs.getStopwatch.call(void 0, `${options.name} build`);
|
|
205
205
|
await _tsdown.build.call(void 0, {
|
|
206
206
|
...options,
|
|
207
207
|
entry: options.entryPoints,
|
|
@@ -213,15 +213,15 @@ async function executeTSDown(options) {
|
|
|
213
213
|
}
|
|
214
214
|
_chunk3GQAWCBQjs.__name.call(void 0, executeTSDown, "executeTSDown");
|
|
215
215
|
async function copyBuildAssets(options) {
|
|
216
|
-
|
|
217
|
-
const stopwatch =
|
|
218
|
-
await
|
|
216
|
+
_chunkRN4QXP7Fjs.writeDebug.call(void 0, ` \u{1F4CB} Copying asset files to output directory: ${options.outdir}`, options.config);
|
|
217
|
+
const stopwatch = _chunkRN4QXP7Fjs.getStopwatch.call(void 0, `${options.name} asset copy`);
|
|
218
|
+
await _chunk5HAR4KECjs.copyAssets.call(void 0, options.config, _nullishCoalesce(options.assets, () => ( [])), options.outdir, options.projectRoot, options.projectName, options.sourceRoot, true, false);
|
|
219
219
|
stopwatch();
|
|
220
220
|
return options;
|
|
221
221
|
}
|
|
222
222
|
_chunk3GQAWCBQjs.__name.call(void 0, copyBuildAssets, "copyBuildAssets");
|
|
223
223
|
async function reportResults(options) {
|
|
224
|
-
|
|
224
|
+
_chunkRN4QXP7Fjs.writeSuccess.call(void 0, ` \u{1F4E6} The ${options.name} build completed successfully`, options.config);
|
|
225
225
|
}
|
|
226
226
|
_chunk3GQAWCBQjs.__name.call(void 0, reportResults, "reportResults");
|
|
227
227
|
async function cleanOutputPath(options) {
|
|
@@ -232,8 +232,8 @@ async function cleanOutputPath(options) {
|
|
|
232
232
|
}
|
|
233
233
|
_chunk3GQAWCBQjs.__name.call(void 0, cleanOutputPath, "cleanOutputPath");
|
|
234
234
|
async function build(options) {
|
|
235
|
-
|
|
236
|
-
const stopwatch =
|
|
235
|
+
_chunkRN4QXP7Fjs.writeDebug.call(void 0, ` \u26A1 Executing Storm TSDown pipeline`);
|
|
236
|
+
const stopwatch = _chunkRN4QXP7Fjs.getStopwatch.call(void 0, "TSDown pipeline");
|
|
237
237
|
try {
|
|
238
238
|
const opts = Array.isArray(options) ? options : [
|
|
239
239
|
options
|
|
@@ -251,11 +251,11 @@ async function build(options) {
|
|
|
251
251
|
await reportResults(opt);
|
|
252
252
|
}));
|
|
253
253
|
} else {
|
|
254
|
-
|
|
254
|
+
_chunkRN4QXP7Fjs.writeWarning.call(void 0, " \u{1F6A7} No options were passed to TSBuild. Please check the parameters passed to the `build` function.");
|
|
255
255
|
}
|
|
256
|
-
|
|
256
|
+
_chunkRN4QXP7Fjs.writeSuccess.call(void 0, " \u{1F3C1} TSDown pipeline build completed successfully");
|
|
257
257
|
} catch (error) {
|
|
258
|
-
|
|
258
|
+
_chunkRN4QXP7Fjs.writeFatal.call(void 0, " \u274C Fatal errors occurred during the build that could not be recovered from. The build process has been terminated.");
|
|
259
259
|
throw error;
|
|
260
260
|
} finally {
|
|
261
261
|
stopwatch();
|
|
@@ -265,7 +265,7 @@ _chunk3GQAWCBQjs.__name.call(void 0, build, "build");
|
|
|
265
265
|
|
|
266
266
|
// src/executors/tsdown/executor.ts
|
|
267
267
|
async function tsdownExecutorFn(options, context, config) {
|
|
268
|
-
|
|
268
|
+
_chunkRN4QXP7Fjs.writeInfo.call(void 0, "\u{1F4E6} Running Storm TSDown build executor on the workspace", config);
|
|
269
269
|
if (!_optionalChain([context, 'access', _3 => _3.projectsConfigurations, 'optionalAccess', _4 => _4.projects]) || !context.projectName || !context.projectsConfigurations.projects[context.projectName] || !_optionalChain([context, 'access', _5 => _5.projectsConfigurations, 'access', _6 => _6.projects, 'access', _7 => _7[context.projectName], 'optionalAccess', _8 => _8.root])) {
|
|
270
270
|
throw new Error("The Build process failed because the context is not valid. Please run this command from a workspace.");
|
|
271
271
|
}
|
|
@@ -282,7 +282,7 @@ async function tsdownExecutorFn(options, context, config) {
|
|
|
282
282
|
};
|
|
283
283
|
}
|
|
284
284
|
_chunk3GQAWCBQjs.__name.call(void 0, tsdownExecutorFn, "tsdownExecutorFn");
|
|
285
|
-
var executor_default =
|
|
285
|
+
var executor_default = _chunkCRMDACYFjs.withRunExecutor.call(void 0, "Storm TSDown build executor", tsdownExecutorFn, {
|
|
286
286
|
skipReadingConfig: false,
|
|
287
287
|
hooks: {
|
|
288
288
|
applyDefaultOptions: /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, async (options, config) => {
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
var _chunkULBTYC2Bjs = require('./chunk-ULBTYC2B.js');
|
|
5
5
|
|
|
6
6
|
|
|
7
|
-
var
|
|
7
|
+
var _chunkCRMDACYFjs = require('./chunk-CRMDACYF.js');
|
|
8
8
|
|
|
9
9
|
|
|
10
10
|
var _chunk3GQAWCBQjs = require('./chunk-3GQAWCBQ.js');
|
|
@@ -15,7 +15,7 @@ async function cargoCheckExecutor(options, context) {
|
|
|
15
15
|
return await _chunkULBTYC2Bjs.cargoCommand.call(void 0, ...command);
|
|
16
16
|
}
|
|
17
17
|
_chunk3GQAWCBQjs.__name.call(void 0, cargoCheckExecutor, "cargoCheckExecutor");
|
|
18
|
-
var executor_default =
|
|
18
|
+
var executor_default = _chunkCRMDACYFjs.withRunExecutor.call(void 0, "Cargo Check", cargoCheckExecutor, {
|
|
19
19
|
skipReadingConfig: false,
|
|
20
20
|
hooks: {
|
|
21
21
|
applyDefaultOptions: /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, (options) => {
|
|
@@ -100,6 +100,8 @@ var ColorConfigMapSchema = z.union([
|
|
|
100
100
|
}),
|
|
101
101
|
z.record(z.string(), ColorConfigSchema)
|
|
102
102
|
]);
|
|
103
|
+
var ExtendsItemSchema = z.string().trim().describe("The path to a base config file to use as a configuration preset file. Documentation can be found at https://github.com/unjs/c12#extending-configuration.");
|
|
104
|
+
var ExtendsSchema = ExtendsItemSchema.or(z.array(ExtendsItemSchema)).describe("The path to a base config file to use as a configuration preset file. Documentation can be found at https://github.com/unjs/c12#extending-configuration.");
|
|
103
105
|
var WorkspaceBotConfigSchema = z.object({
|
|
104
106
|
name: z.string().trim().default("Stormie-Bot").describe("The workspace bot user's name (this is the bot that will be used to perform various tasks)"),
|
|
105
107
|
email: z.string().trim().email().default("bot@stormsoftware.com").describe("The email of the workspace bot")
|
|
@@ -114,11 +116,11 @@ var WorkspaceDirectoryConfigSchema = z.object({
|
|
|
114
116
|
}).describe("Various directories used by the workspace to store data, cache, and configuration files");
|
|
115
117
|
var StormConfigSchema = z.object({
|
|
116
118
|
$schema: z.string().trim().default("https://cdn.jsdelivr.net/npm/@storm-software/config/schemas/storm.schema.json").optional().nullish().describe("The URL to the JSON schema file that describes the Storm configuration file"),
|
|
117
|
-
extends:
|
|
119
|
+
extends: ExtendsSchema.optional(),
|
|
118
120
|
name: z.string().trim().toLowerCase().optional().describe("The name of the service/package/scope using this configuration"),
|
|
119
121
|
namespace: z.string().trim().toLowerCase().optional().describe("The namespace of the package"),
|
|
120
122
|
organization: z.string().trim().default("storm-software").describe("The organization of the workspace"),
|
|
121
|
-
repository: z.string().trim().
|
|
123
|
+
repository: z.string().trim().optional().describe("The repo URL of the workspace (i.e. GitHub)"),
|
|
122
124
|
license: z.string().trim().default("Apache-2.0").describe("The license type of the package"),
|
|
123
125
|
homepage: z.string().trim().url().default(STORM_DEFAULT_HOMEPAGE).describe("The homepage of the workspace"),
|
|
124
126
|
docs: z.string().trim().url().default(STORM_DEFAULT_DOCS).describe("The base documentation site for the workspace"),
|
|
@@ -205,7 +207,8 @@ var LogLevelLabel = {
|
|
|
205
207
|
};
|
|
206
208
|
|
|
207
209
|
// ../config-tools/src/utilities/get-default-config.ts
|
|
208
|
-
import { existsSync
|
|
210
|
+
import { existsSync } from "node:fs";
|
|
211
|
+
import { readFile } from "node:fs/promises";
|
|
209
212
|
import { join } from "node:path";
|
|
210
213
|
var DEFAULT_COLOR_CONFIG = {
|
|
211
214
|
"light": {
|
|
@@ -235,17 +238,15 @@ var DEFAULT_COLOR_CONFIG = {
|
|
|
235
238
|
"negative": "#dc2626"
|
|
236
239
|
}
|
|
237
240
|
};
|
|
238
|
-
var getDefaultConfig = /* @__PURE__ */ __name((root) => {
|
|
241
|
+
var getDefaultConfig = /* @__PURE__ */ __name(async (root) => {
|
|
239
242
|
let license = STORM_DEFAULT_LICENSE;
|
|
240
243
|
let homepage = STORM_DEFAULT_HOMEPAGE;
|
|
241
|
-
let name;
|
|
242
|
-
let namespace;
|
|
243
|
-
let repository;
|
|
244
|
+
let name = void 0;
|
|
245
|
+
let namespace = void 0;
|
|
246
|
+
let repository = void 0;
|
|
244
247
|
const workspaceRoot = findWorkspaceRoot(root);
|
|
245
248
|
if (existsSync(join(workspaceRoot, "package.json"))) {
|
|
246
|
-
const file =
|
|
247
|
-
encoding: "utf8"
|
|
248
|
-
});
|
|
249
|
+
const file = await readFile(joinPaths(workspaceRoot, "package.json"), "utf8");
|
|
249
250
|
if (file) {
|
|
250
251
|
const packageJson = JSON.parse(file);
|
|
251
252
|
if (packageJson.name) {
|
|
@@ -254,8 +255,12 @@ var getDefaultConfig = /* @__PURE__ */ __name((root) => {
|
|
|
254
255
|
if (packageJson.namespace) {
|
|
255
256
|
namespace = packageJson.namespace;
|
|
256
257
|
}
|
|
257
|
-
if (packageJson.repository
|
|
258
|
-
|
|
258
|
+
if (packageJson.repository) {
|
|
259
|
+
if (typeof packageJson.repository === "string") {
|
|
260
|
+
repository = packageJson.repository;
|
|
261
|
+
} else if (packageJson.repository.url) {
|
|
262
|
+
repository = packageJson.repository.url;
|
|
263
|
+
}
|
|
259
264
|
}
|
|
260
265
|
if (packageJson.license) {
|
|
261
266
|
license = packageJson.license;
|
|
@@ -464,7 +469,6 @@ var writeInfo = /* @__PURE__ */ __name((message, config) => getLogFn(LogLevel.IN
|
|
|
464
469
|
var writeSuccess = /* @__PURE__ */ __name((message, config) => getLogFn(LogLevel.SUCCESS, config)(message), "writeSuccess");
|
|
465
470
|
var writeDebug = /* @__PURE__ */ __name((message, config) => getLogFn(LogLevel.DEBUG, config)(message), "writeDebug");
|
|
466
471
|
var writeTrace = /* @__PURE__ */ __name((message, config) => getLogFn(LogLevel.TRACE, config)(message), "writeTrace");
|
|
467
|
-
var writeSystem = /* @__PURE__ */ __name((message, config) => getLogFn(LogLevel.ALL, config)(message), "writeSystem");
|
|
468
472
|
var getStopwatch = /* @__PURE__ */ __name((name) => {
|
|
469
473
|
const start = process.hrtime();
|
|
470
474
|
return () => {
|
|
@@ -508,19 +512,19 @@ import { loadConfig } from "c12";
|
|
|
508
512
|
import defu from "defu";
|
|
509
513
|
var getConfigFileByName = /* @__PURE__ */ __name(async (fileName, filePath, options = {}) => {
|
|
510
514
|
const workspacePath = filePath || findWorkspaceRoot(filePath);
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
515
|
+
const configs = await Promise.all([
|
|
516
|
+
loadConfig({
|
|
517
|
+
cwd: workspacePath,
|
|
518
|
+
packageJson: true,
|
|
519
|
+
name: fileName,
|
|
520
|
+
envName: fileName?.toUpperCase(),
|
|
521
|
+
jitiOptions: {
|
|
522
|
+
debug: false,
|
|
523
|
+
fsCache: process.env.STORM_SKIP_CACHE === "true" ? false : joinPaths(process.env.STORM_CACHE_DIR || "node_modules/.cache/storm", "jiti")
|
|
524
|
+
},
|
|
525
|
+
...options
|
|
526
|
+
}),
|
|
527
|
+
loadConfig({
|
|
524
528
|
cwd: workspacePath,
|
|
525
529
|
packageJson: true,
|
|
526
530
|
name: fileName,
|
|
@@ -531,9 +535,9 @@ var getConfigFileByName = /* @__PURE__ */ __name(async (fileName, filePath, opti
|
|
|
531
535
|
},
|
|
532
536
|
configFile: fileName,
|
|
533
537
|
...options
|
|
534
|
-
})
|
|
535
|
-
|
|
536
|
-
return
|
|
538
|
+
})
|
|
539
|
+
]);
|
|
540
|
+
return defu(configs[0] ?? {}, configs[1] ?? {});
|
|
537
541
|
}, "getConfigFileByName");
|
|
538
542
|
var getConfigFile = /* @__PURE__ */ __name(async (filePath, additionalFileNames = []) => {
|
|
539
543
|
const workspacePath = filePath ? filePath : findWorkspaceRoot(filePath);
|
|
@@ -541,7 +545,7 @@ var getConfigFile = /* @__PURE__ */ __name(async (filePath, additionalFileNames
|
|
|
541
545
|
let config = result.config;
|
|
542
546
|
const configFile = result.configFile;
|
|
543
547
|
if (config && configFile && Object.keys(config).length > 0) {
|
|
544
|
-
|
|
548
|
+
writeTrace(`Found Storm configuration file "${configFile.includes(`${workspacePath}/`) ? configFile.replace(`${workspacePath}/`, "") : configFile}" at "${workspacePath}"`, {
|
|
545
549
|
logLevel: "all"
|
|
546
550
|
});
|
|
547
551
|
}
|
|
@@ -549,7 +553,7 @@ var getConfigFile = /* @__PURE__ */ __name(async (filePath, additionalFileNames
|
|
|
549
553
|
const results = await Promise.all(additionalFileNames.map((fileName) => getConfigFileByName(fileName, workspacePath)));
|
|
550
554
|
for (const result2 of results) {
|
|
551
555
|
if (result2?.config && result2?.configFile && Object.keys(result2.config).length > 0) {
|
|
552
|
-
|
|
556
|
+
writeTrace(`Found alternative configuration file "${result2.configFile.includes(`${workspacePath}/`) ? result2.configFile.replace(`${workspacePath}/`, "") : result2.configFile}" at "${workspacePath}"`, {
|
|
553
557
|
logLevel: "all"
|
|
554
558
|
});
|
|
555
559
|
config = defu(result2.config ?? {}, config ?? {});
|
|
@@ -564,6 +568,16 @@ var getConfigFile = /* @__PURE__ */ __name(async (filePath, additionalFileNames
|
|
|
564
568
|
}, "getConfigFile");
|
|
565
569
|
|
|
566
570
|
// ../config-tools/src/env/get-env.ts
|
|
571
|
+
var getExtensionEnv = /* @__PURE__ */ __name((extensionName) => {
|
|
572
|
+
const prefix = `STORM_EXTENSION_${extensionName.toUpperCase()}_`;
|
|
573
|
+
return Object.keys(process.env).filter((key) => key.startsWith(prefix)).reduce((ret, key) => {
|
|
574
|
+
const name = key.replace(prefix, "").split("_").map((i) => i.length > 0 ? i.trim().charAt(0).toUpperCase() + i.trim().slice(1) : "").join("");
|
|
575
|
+
if (name) {
|
|
576
|
+
ret[name] = process.env[key];
|
|
577
|
+
}
|
|
578
|
+
return ret;
|
|
579
|
+
}, {});
|
|
580
|
+
}, "getExtensionEnv");
|
|
567
581
|
var getConfigEnv = /* @__PURE__ */ __name(() => {
|
|
568
582
|
const prefix = "STORM_";
|
|
569
583
|
let config = {
|
|
@@ -723,7 +737,7 @@ var setExtensionEnv = /* @__PURE__ */ __name((extensionName, extension) => {
|
|
|
723
737
|
var setConfigEnv = /* @__PURE__ */ __name((config) => {
|
|
724
738
|
const prefix = "STORM_";
|
|
725
739
|
if (config.extends) {
|
|
726
|
-
process.env[`${prefix}EXTENDS`] = config.extends;
|
|
740
|
+
process.env[`${prefix}EXTENDS`] = Array.isArray(config.extends) ? JSON.stringify(config.extends) : config.extends;
|
|
727
741
|
}
|
|
728
742
|
if (config.name) {
|
|
729
743
|
process.env[`${prefix}NAME`] = config.name;
|
|
@@ -953,30 +967,69 @@ var setBaseThemeColorConfigEnv = /* @__PURE__ */ __name((prefix, config) => {
|
|
|
953
967
|
}, "setBaseThemeColorConfigEnv");
|
|
954
968
|
|
|
955
969
|
// ../config-tools/src/create-storm-config.ts
|
|
970
|
+
var _extension_cache = /* @__PURE__ */ new WeakMap();
|
|
956
971
|
var _static_cache = void 0;
|
|
957
|
-
var
|
|
958
|
-
let
|
|
959
|
-
if (_static_cache?.data
|
|
960
|
-
|
|
961
|
-
|
|
962
|
-
|
|
963
|
-
|
|
964
|
-
|
|
965
|
-
|
|
966
|
-
|
|
967
|
-
|
|
968
|
-
|
|
969
|
-
|
|
970
|
-
|
|
971
|
-
}
|
|
972
|
+
var createStormConfig = /* @__PURE__ */ __name(async (extensionName, schema, workspaceRoot, skipLogs = false) => {
|
|
973
|
+
let result;
|
|
974
|
+
if (!_static_cache?.data || !_static_cache?.timestamp || _static_cache.timestamp < Date.now() - 8e3) {
|
|
975
|
+
let _workspaceRoot = workspaceRoot;
|
|
976
|
+
if (!_workspaceRoot) {
|
|
977
|
+
_workspaceRoot = findWorkspaceRoot();
|
|
978
|
+
}
|
|
979
|
+
const configEnv = getConfigEnv();
|
|
980
|
+
const defaultConfig = await getDefaultConfig(_workspaceRoot);
|
|
981
|
+
const configFile = await getConfigFile(_workspaceRoot);
|
|
982
|
+
if (!configFile && !skipLogs) {
|
|
983
|
+
writeWarning("No Storm config file found in the current workspace. Please ensure this is the expected behavior - you can add a `storm.json` file to the root of your workspace if it is not.\n", {
|
|
984
|
+
logLevel: "all"
|
|
985
|
+
});
|
|
986
|
+
}
|
|
987
|
+
result = await StormConfigSchema.parseAsync(defu2(configEnv, configFile, defaultConfig));
|
|
988
|
+
result.workspaceRoot ??= _workspaceRoot;
|
|
989
|
+
} else {
|
|
990
|
+
result = _static_cache.data;
|
|
972
991
|
}
|
|
973
|
-
|
|
992
|
+
if (schema && extensionName) {
|
|
993
|
+
result.extensions = {
|
|
994
|
+
...result.extensions,
|
|
995
|
+
[extensionName]: createConfigExtension(extensionName, schema)
|
|
996
|
+
};
|
|
997
|
+
}
|
|
998
|
+
_static_cache = {
|
|
999
|
+
timestamp: Date.now(),
|
|
1000
|
+
data: result
|
|
1001
|
+
};
|
|
1002
|
+
return result;
|
|
1003
|
+
}, "createStormConfig");
|
|
1004
|
+
var createConfigExtension = /* @__PURE__ */ __name((extensionName, schema) => {
|
|
1005
|
+
const extension_cache_key = {
|
|
1006
|
+
extensionName
|
|
1007
|
+
};
|
|
1008
|
+
if (_extension_cache.has(extension_cache_key)) {
|
|
1009
|
+
return _extension_cache.get(extension_cache_key);
|
|
1010
|
+
}
|
|
1011
|
+
let extension = getExtensionEnv(extensionName);
|
|
1012
|
+
if (schema) {
|
|
1013
|
+
extension = schema.parse(extension);
|
|
1014
|
+
}
|
|
1015
|
+
_extension_cache.set(extension_cache_key, extension);
|
|
1016
|
+
return extension;
|
|
1017
|
+
}, "createConfigExtension");
|
|
1018
|
+
var loadStormConfig = /* @__PURE__ */ __name(async (workspaceRoot, skipLogs = false) => {
|
|
1019
|
+
const config = await createStormConfig(void 0, void 0, workspaceRoot, skipLogs);
|
|
974
1020
|
setConfigEnv(config);
|
|
975
|
-
|
|
1021
|
+
if (!skipLogs) {
|
|
1022
|
+
writeTrace(`\u2699\uFE0F Using Storm configuration:
|
|
976
1023
|
${formatLogMessage(config)}`, config);
|
|
1024
|
+
}
|
|
977
1025
|
return config;
|
|
978
1026
|
}, "loadStormConfig");
|
|
979
1027
|
|
|
1028
|
+
// ../config-tools/src/get-config.ts
|
|
1029
|
+
var getConfig = /* @__PURE__ */ __name((workspaceRoot, skipLogs = false) => {
|
|
1030
|
+
return loadStormConfig(workspaceRoot, skipLogs);
|
|
1031
|
+
}, "getConfig");
|
|
1032
|
+
|
|
980
1033
|
export {
|
|
981
1034
|
StormConfigSchema,
|
|
982
1035
|
isVerbose,
|
|
@@ -989,5 +1042,5 @@ export {
|
|
|
989
1042
|
writeTrace,
|
|
990
1043
|
getStopwatch,
|
|
991
1044
|
formatLogMessage,
|
|
992
|
-
|
|
1045
|
+
getConfig
|
|
993
1046
|
};
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
var _chunkHI4G4OOGjs = require('./chunk-HI4G4OOG.js');
|
|
5
5
|
|
|
6
6
|
|
|
7
|
-
var
|
|
7
|
+
var _chunkEGBJI6CNjs = require('./chunk-EGBJI6CN.js');
|
|
8
8
|
|
|
9
9
|
|
|
10
10
|
var _chunk3GQAWCBQjs = require('./chunk-3GQAWCBQ.js');
|
|
@@ -232,7 +232,7 @@ async function presetGeneratorFn(tree, options) {
|
|
|
232
232
|
return null;
|
|
233
233
|
}
|
|
234
234
|
_chunk3GQAWCBQjs.__name.call(void 0, presetGeneratorFn, "presetGeneratorFn");
|
|
235
|
-
var generator_default =
|
|
235
|
+
var generator_default = _chunkEGBJI6CNjs.withRunGenerator.call(void 0, "Storm Workspace Preset Generator", presetGeneratorFn);
|
|
236
236
|
|
|
237
237
|
|
|
238
238
|
|