@storm-software/workspace-tools 1.246.3 → 1.246.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +6 -0
- package/README.md +1 -1
- package/config/{nx-default.json → base.json} +18 -13
- package/dist/{chunk-WPYYDD5F.js → chunk-24AOAWKM.js} +2 -2
- package/dist/{chunk-7QVGAOPQ.mjs → chunk-24DH46CG.mjs} +1 -1
- package/dist/{chunk-P4ALYDGC.js → chunk-2HIEYKTF.js} +5 -5
- package/dist/{chunk-Q2DU6KGV.js → chunk-3SODJVIS.js} +2 -2
- package/dist/{chunk-O3ZLX7S5.mjs → chunk-46LLLM6U.mjs} +2 -2
- package/dist/{chunk-66FRJGIN.js → chunk-4AJFP7HM.js} +20 -20
- package/dist/{chunk-6V5GP3U4.js → chunk-4JOIS7WW.js} +24 -14
- package/dist/{chunk-BYLPQCIB.js → chunk-5CXC7ITO.js} +11 -11
- package/dist/{chunk-AY5HELLN.js → chunk-5LEU7C3E.js} +25 -25
- package/dist/{chunk-Z6E637KA.js → chunk-6TUIQWYY.js} +41 -41
- package/dist/{chunk-U7TEDNQF.js → chunk-7JBZ67ON.js} +31 -31
- package/dist/{chunk-G3AMYMML.js → chunk-7UV5IDAC.js} +9 -9
- package/dist/{chunk-H5XURNDS.js → chunk-AC5SI4YZ.js} +2 -2
- package/dist/{chunk-2AKLJNKO.mjs → chunk-B3V2M6LS.mjs} +18 -11
- package/dist/{chunk-BBRVJL4A.mjs → chunk-BKTZEV6F.mjs} +2 -2
- package/dist/{chunk-ZQPK5G4U.js → chunk-BRWRLQDC.js} +22 -15
- package/dist/{chunk-KV7YB4MU.mjs → chunk-CXICJ646.mjs} +1 -1
- package/dist/{chunk-IPMZQTRA.mjs → chunk-EOUMS7CZ.mjs} +1 -1
- package/dist/{chunk-N3WLDHSN.js → chunk-ETVB65M4.js} +2 -2
- package/dist/{chunk-AWPP7DRY.js → chunk-GKL4BY2Y.js} +2 -2
- package/dist/{chunk-U3TVR7B3.js → chunk-IDXFMQIQ.js} +2 -2
- package/dist/{chunk-KPKHTJWT.mjs → chunk-K4OE73MG.mjs} +1 -1
- package/dist/{chunk-U4AQXXXF.mjs → chunk-LREFZEYI.mjs} +1 -1
- package/dist/{chunk-BLG6LLHW.mjs → chunk-M666DZYJ.mjs} +24 -14
- package/dist/{chunk-GQ6ZBQ6I.mjs → chunk-N3CJLBVV.mjs} +3 -3
- package/dist/{chunk-WCIY3TEF.mjs → chunk-NDZMHOBS.mjs} +1 -1
- package/dist/{chunk-BC3QVHAH.mjs → chunk-NXGZ7AHM.mjs} +3 -3
- package/dist/{chunk-3SPGOKCO.mjs → chunk-OUEARINQ.mjs} +1 -1
- package/dist/{chunk-TJ6WVBYM.mjs → chunk-P2US2643.mjs} +2 -2
- package/dist/{chunk-ZVP6NBMF.js → chunk-QMXS4YBR.js} +2 -2
- package/dist/{chunk-XI4BWTXX.mjs → chunk-RIZNQRKB.mjs} +2 -2
- package/dist/{chunk-LZNWOO4B.js → chunk-SIKIOIIG.js} +2 -2
- package/dist/{chunk-RWDBQOGV.js → chunk-SJY2MQ7F.js} +5 -5
- package/dist/{chunk-4F75KA7J.mjs → chunk-T433AJNU.mjs} +1 -1
- package/dist/{chunk-R7VJ7ZHV.mjs → chunk-TBQH5BQE.mjs} +1 -1
- package/dist/{chunk-AQLXZBXJ.mjs → chunk-TTVIYPRD.mjs} +3 -3
- package/dist/{chunk-34JK7ZOU.js → chunk-UALZJZUK.js} +2 -2
- package/dist/{chunk-ZAE2P6GK.js → chunk-UKNWS4VZ.js} +4 -4
- package/dist/{chunk-Q47LFUGL.mjs → chunk-UTHOW4PP.mjs} +1 -1
- package/dist/{chunk-EIL3PQQL.js → chunk-VBROJHZZ.js} +2 -2
- package/dist/{chunk-FDPZRNKZ.js → chunk-VBYEJNI3.js} +15 -15
- package/dist/{chunk-ITL2GPJB.js → chunk-WAZC2KG4.js} +2 -2
- package/dist/{chunk-ZKWGOANM.mjs → chunk-XIVUJTNL.mjs} +3 -3
- package/dist/{chunk-I6BCQJPP.mjs → chunk-XN7ENDA5.mjs} +1 -1
- package/dist/{chunk-4YODDZMS.mjs → chunk-XXRNBEAC.mjs} +1 -1
- package/dist/{chunk-BNYY2WQJ.js → chunk-ZDN367AN.js} +2 -2
- package/dist/{chunk-TBQLIKD4.mjs → chunk-ZKBLM3HV.mjs} +5 -5
- package/dist/{chunk-HK26KBWU.mjs → chunk-ZKFSI55N.mjs} +2 -2
- package/dist/{executor-CnnrgXKr.d.mts → executor-BDL9OXAe.d.mts} +1 -1
- package/dist/{executor-De29T5QB.d.mts → executor-BOz02M0D.d.mts} +1 -1
- package/dist/{executor-DZ-0sX_w.d.ts → executor-BzM1aAMj.d.ts} +1 -1
- package/dist/{executor-B2I8lRie.d.mts → executor-CJ2sUUqC.d.mts} +1 -1
- package/dist/{executor-B3LJ1461.d.mts → executor-D9Lkezla.d.mts} +1 -1
- package/dist/{executor-SU5oGftF.d.ts → executor-DIeaVupa.d.ts} +1 -1
- package/dist/{executor-D04WPR2V.d.ts → executor-DLeeL4eB.d.ts} +1 -1
- package/dist/{executor-B1mTS_M5.d.ts → executor-DdnyhsRE.d.ts} +1 -1
- package/dist/{executor-9k0vy4BU.d.mts → executor-DvKywXQM.d.mts} +1 -1
- package/dist/{executor-Dfot53CG.d.ts → executor-DxeOzkYd.d.ts} +1 -1
- package/dist/executors.d.mts +6 -6
- package/dist/executors.d.ts +6 -6
- package/dist/executors.js +16 -16
- package/dist/executors.mjs +15 -15
- package/dist/{generator-BCkqWM1d.d.ts → generator-8l8dnSzj.d.ts} +1 -1
- package/dist/{generator-DBa9-HbU.d.ts → generator-96lYy3vU.d.ts} +1 -1
- package/dist/{generator-BAbOohf7.d.mts → generator-ANcVdjRd.d.mts} +2 -2
- package/dist/{generator-CrR9QK6B.d.mts → generator-BXQhJBFX.d.mts} +2 -2
- package/dist/{generator-AFivysTp.d.ts → generator-Br48n2Qc.d.ts} +2 -2
- package/dist/{generator-CRiDjsPp.d.mts → generator-CAGPcZQ4.d.mts} +1 -1
- package/dist/{generator-rf62OraH.d.ts → generator-Cg5cXOd-.d.ts} +2 -2
- package/dist/{generator-B_HN13az.d.mts → generator-Ci71Fj-h.d.mts} +2 -2
- package/dist/{generator-DpXgF55u.d.mts → generator-D4l8BFsS.d.mts} +1 -1
- package/dist/{generator-DATsTV1E.d.mts → generator-DDFJK57t.d.mts} +2 -2
- package/dist/{generator-DNdirMec.d.ts → generator-DcKIyM9v.d.ts} +2 -2
- package/dist/{generator-F6EuzmJD.d.ts → generator-SVDta1L0.d.ts} +2 -2
- package/dist/generators.d.mts +8 -8
- package/dist/generators.d.ts +8 -8
- package/dist/generators.js +11 -11
- package/dist/generators.mjs +10 -10
- package/dist/index.d.mts +13 -13
- package/dist/index.d.ts +13 -13
- package/dist/index.js +25 -25
- package/dist/index.mjs +24 -24
- 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 +5 -5
- package/dist/src/base/base-executor.mjs +4 -4
- 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 +5 -5
- package/dist/src/base/base-generator.mjs +4 -4
- package/dist/src/base/index.d.mts +2 -2
- package/dist/src/base/index.d.ts +2 -2
- package/dist/src/base/index.js +6 -6
- package/dist/src/base/index.mjs +5 -5
- package/dist/src/executors/cargo-build/executor.js +6 -6
- package/dist/src/executors/cargo-build/executor.mjs +5 -5
- package/dist/src/executors/cargo-check/executor.js +6 -6
- package/dist/src/executors/cargo-check/executor.mjs +5 -5
- package/dist/src/executors/cargo-clippy/executor.js +6 -6
- package/dist/src/executors/cargo-clippy/executor.mjs +5 -5
- package/dist/src/executors/cargo-doc/executor.js +6 -6
- package/dist/src/executors/cargo-doc/executor.mjs +5 -5
- package/dist/src/executors/cargo-format/executor.js +6 -6
- package/dist/src/executors/cargo-format/executor.mjs +5 -5
- 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 +7 -7
- package/dist/src/executors/clean-package/executor.mjs +4 -4
- 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 +7 -7
- package/dist/src/executors/esbuild/executor.mjs +6 -6
- 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 +6 -6
- package/dist/src/executors/size-limit/executor.mjs +5 -5
- 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 +7 -7
- package/dist/src/executors/tsdown/executor.mjs +6 -6
- 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 +6 -6
- package/dist/src/executors/typia/executor.mjs +5 -5
- 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 +6 -6
- package/dist/src/executors/unbuild/executor.mjs +5 -5
- 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 +6 -6
- package/dist/src/generators/browser-library/generator.mjs +5 -5
- 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 +6 -6
- package/dist/src/generators/config-schema/generator.mjs +5 -5
- 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 +6 -6
- package/dist/src/generators/neutral-library/generator.mjs +5 -5
- 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 +6 -6
- package/dist/src/generators/node-library/generator.mjs +5 -5
- 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 +6 -6
- package/dist/src/generators/preset/generator.mjs +5 -5
- 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 +4 -4
- package/dist/src/generators/release-version/generator.mjs +3 -3
- 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/apply-workspace-tokens.js +3 -3
- package/dist/src/utils/apply-workspace-tokens.mjs +2 -2
- package/dist/src/utils/get-project-configurations.js +3 -3
- package/dist/src/utils/get-project-configurations.mjs +2 -2
- package/dist/src/utils/index.d.mts +2 -2
- package/dist/src/utils/index.d.ts +2 -2
- package/dist/src/utils/index.js +4 -4
- package/dist/src/utils/index.mjs +3 -3
- package/dist/src/utils/project-tags.d.mts +2 -2
- package/dist/src/utils/project-tags.d.ts +2 -2
- package/dist/{types-B5IG4iSJ.d.ts → types-BbEVA-sX.d.mts} +3 -0
- package/dist/{types-B5IG4iSJ.d.mts → types-BbEVA-sX.d.ts} +3 -0
- package/dist/{types-DpaECebR.d.ts → types-DLS_kod0.d.ts} +1 -1
- package/dist/{types-44XkV3HO.d.mts → types-DM_AJ5NA.d.mts} +1 -1
- package/package.json +2 -3
- package/config/nx-cloud.json +0 -459
|
@@ -8,10 +8,10 @@
|
|
|
8
8
|
|
|
9
9
|
|
|
10
10
|
|
|
11
|
-
var
|
|
11
|
+
var _chunk7UV5IDACjs = require('./chunk-7UV5IDAC.js');
|
|
12
12
|
|
|
13
13
|
|
|
14
|
-
var
|
|
14
|
+
var _chunk5LEU7C3Ejs = require('./chunk-5LEU7C3E.js');
|
|
15
15
|
|
|
16
16
|
|
|
17
17
|
|
|
@@ -23,7 +23,7 @@ var _chunkAY5HELLNjs = require('./chunk-AY5HELLN.js');
|
|
|
23
23
|
|
|
24
24
|
|
|
25
25
|
|
|
26
|
-
var
|
|
26
|
+
var _chunkBRWRLQDCjs = require('./chunk-BRWRLQDC.js');
|
|
27
27
|
|
|
28
28
|
|
|
29
29
|
var _chunkJTAXCQX6js = require('./chunk-JTAXCQX6.js');
|
|
@@ -331,7 +331,7 @@ var onErrorPlugin = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, (option
|
|
|
331
331
|
setup(build4) {
|
|
332
332
|
build4.onEnd((result) => {
|
|
333
333
|
if (result.errors.length > 0 && process.env.WATCH !== "true") {
|
|
334
|
-
|
|
334
|
+
_chunkBRWRLQDCjs.writeError.call(void 0, `The following errors occurred during the build:
|
|
335
335
|
${result.errors.map((error) => error.text).join("\n")}
|
|
336
336
|
|
|
337
337
|
`, resolvedOptions.config);
|
|
@@ -440,7 +440,7 @@ function bundleTypeDefinitions(filename, outfile, externals, options) {
|
|
|
440
440
|
localBuild: true
|
|
441
441
|
});
|
|
442
442
|
if (extractorResult.succeeded === false) {
|
|
443
|
-
|
|
443
|
+
_chunkBRWRLQDCjs.writeError.call(void 0, `API Extractor completed with ${extractorResult.errorCount} ${extractorResult.errorCount === 1 ? "error" : "errors"}`);
|
|
444
444
|
throw new Error("API Extractor completed with errors");
|
|
445
445
|
}
|
|
446
446
|
}
|
|
@@ -489,7 +489,7 @@ _chunk3GQAWCBQjs.__name.call(void 0, getTypeDependencyPackageName, "getTypeDepen
|
|
|
489
489
|
|
|
490
490
|
// ../esbuild/src/config.ts
|
|
491
491
|
var getOutputExtensionMap = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, (options, pkgType) => {
|
|
492
|
-
return options.outExtension ? options.outExtension(options.format, pkgType) :
|
|
492
|
+
return options.outExtension ? options.outExtension(options.format, pkgType) : _chunk7UV5IDACjs.getOutExtension.call(void 0, options.format, pkgType);
|
|
493
493
|
}, "getOutputExtensionMap");
|
|
494
494
|
var getDefaultBuildPlugins = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, (options, resolvedOptions) => [
|
|
495
495
|
nodeProtocolPlugin(options, resolvedOptions),
|
|
@@ -537,7 +537,7 @@ var DEFAULT_BUILD_OPTIONS = {
|
|
|
537
537
|
".woff": "file",
|
|
538
538
|
".woff2": "file"
|
|
539
539
|
},
|
|
540
|
-
banner:
|
|
540
|
+
banner: _chunk7UV5IDACjs.DEFAULT_COMPILED_BANNER
|
|
541
541
|
};
|
|
542
542
|
|
|
543
543
|
// ../esbuild/src/plugins/deps-check.ts
|
|
@@ -619,8 +619,8 @@ var depsCheckPlugin = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, (bund
|
|
|
619
619
|
const filteredMissingDeps = missingDependencies.filter((dep) => {
|
|
620
620
|
return !missingIgnore.some((pattern) => dep.match(pattern)) && !peerDependencies.includes(dep);
|
|
621
621
|
});
|
|
622
|
-
|
|
623
|
-
|
|
622
|
+
_chunkBRWRLQDCjs.writeWarning.call(void 0, `Unused Dependencies: ${JSON.stringify(filteredUnusedDeps)}`);
|
|
623
|
+
_chunkBRWRLQDCjs.writeError.call(void 0, `Missing Dependencies: ${JSON.stringify(filteredMissingDeps)}`);
|
|
624
624
|
if (filteredMissingDeps.length > 0) {
|
|
625
625
|
throw new Error(`Missing dependencies detected - please install them:
|
|
626
626
|
${JSON.stringify(filteredMissingDeps)}
|
|
@@ -714,9 +714,9 @@ var resolveOptions = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, async
|
|
|
714
714
|
if (!workspaceRoot) {
|
|
715
715
|
throw new Error("Cannot find Nx workspace root");
|
|
716
716
|
}
|
|
717
|
-
const config = await
|
|
718
|
-
|
|
719
|
-
const stopwatch =
|
|
717
|
+
const config = await _chunkBRWRLQDCjs.getConfig.call(void 0, workspaceRoot.dir);
|
|
718
|
+
_chunkBRWRLQDCjs.writeDebug.call(void 0, " \u2699\uFE0F Resolving build options", config);
|
|
719
|
+
const stopwatch = _chunkBRWRLQDCjs.getStopwatch.call(void 0, "Build options resolution");
|
|
720
720
|
const projectGraph = await _devkit.createProjectGraphAsync.call(void 0, {
|
|
721
721
|
exitOnError: true
|
|
722
722
|
});
|
|
@@ -733,7 +733,7 @@ var resolveOptions = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, async
|
|
|
733
733
|
}
|
|
734
734
|
const options = _defu2.default.call(void 0, userOptions, DEFAULT_BUILD_OPTIONS);
|
|
735
735
|
options.name ??= `${projectName}-${options.format}`;
|
|
736
|
-
options.target ??=
|
|
736
|
+
options.target ??= _chunk7UV5IDACjs.DEFAULT_TARGET;
|
|
737
737
|
const packageJsonPath = _chunkJTAXCQX6js.joinPaths.call(void 0, workspaceRoot.dir, options.projectRoot, "package.json");
|
|
738
738
|
if (!_fs.existsSync.call(void 0, packageJsonPath)) {
|
|
739
739
|
throw new Error("Cannot find package.json configuration");
|
|
@@ -741,7 +741,7 @@ var resolveOptions = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, async
|
|
|
741
741
|
const packageJsonFile = await _promises2.default.readFile(packageJsonPath, "utf8");
|
|
742
742
|
const packageJson = JSON.parse(packageJsonFile);
|
|
743
743
|
const outExtension = getOutputExtensionMap(options, packageJson.type);
|
|
744
|
-
const env =
|
|
744
|
+
const env = _chunk7UV5IDACjs.getEnv.call(void 0, "esbuild", options);
|
|
745
745
|
const result = {
|
|
746
746
|
...options,
|
|
747
747
|
config,
|
|
@@ -761,7 +761,7 @@ var resolveOptions = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, async
|
|
|
761
761
|
...userOptions,
|
|
762
762
|
tsconfig: _chunkJTAXCQX6js.joinPaths.call(void 0, projectRoot, userOptions.tsconfig ? userOptions.tsconfig.replace(projectRoot, "") : "tsconfig.json"),
|
|
763
763
|
format: options.format || "cjs",
|
|
764
|
-
entryPoints: await
|
|
764
|
+
entryPoints: await _chunk7UV5IDACjs.getEntryPoints.call(void 0, config, projectRoot, projectJson.sourceRoot, userOptions.entry || [
|
|
765
765
|
"./src/index.ts"
|
|
766
766
|
], userOptions.emitOnAll),
|
|
767
767
|
outdir: userOptions.outputPath || _chunkJTAXCQX6js.joinPaths.call(void 0, "dist", projectRoot),
|
|
@@ -772,7 +772,7 @@ var resolveOptions = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, async
|
|
|
772
772
|
projectGraph,
|
|
773
773
|
sourceRoot: userOptions.sourceRoot || projectJson.sourceRoot || _chunkJTAXCQX6js.joinPaths.call(void 0, projectRoot, "src"),
|
|
774
774
|
minify: userOptions.minify || !userOptions.debug,
|
|
775
|
-
verbose: userOptions.verbose ||
|
|
775
|
+
verbose: userOptions.verbose || _chunkBRWRLQDCjs.isVerbose.call(void 0, ) || userOptions.debug === true,
|
|
776
776
|
includeSrc: userOptions.includeSrc === true,
|
|
777
777
|
metafile: userOptions.metafile !== false,
|
|
778
778
|
generatePackageJson: userOptions.generatePackageJson !== false,
|
|
@@ -786,8 +786,8 @@ var resolveOptions = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, async
|
|
|
786
786
|
outExtension,
|
|
787
787
|
footer: userOptions.footer,
|
|
788
788
|
banner: {
|
|
789
|
-
js: options.banner ||
|
|
790
|
-
css: options.banner ||
|
|
789
|
+
js: options.banner || _chunk7UV5IDACjs.DEFAULT_COMPILED_BANNER,
|
|
790
|
+
css: options.banner || _chunk7UV5IDACjs.DEFAULT_COMPILED_BANNER
|
|
791
791
|
},
|
|
792
792
|
splitting: options.format === "iife" ? false : typeof options.splitting === "boolean" ? options.splitting : options.format === "esm",
|
|
793
793
|
treeShaking: options.format === "esm",
|
|
@@ -819,8 +819,8 @@ var resolveOptions = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, async
|
|
|
819
819
|
}, "resolveOptions");
|
|
820
820
|
async function generatePackageJson(context2) {
|
|
821
821
|
if (context2.options.generatePackageJson !== false && _fs.existsSync.call(void 0, _chunkJTAXCQX6js.joinPaths.call(void 0, context2.options.projectRoot, "package.json"))) {
|
|
822
|
-
|
|
823
|
-
const stopwatch =
|
|
822
|
+
_chunkBRWRLQDCjs.writeDebug.call(void 0, " \u270D\uFE0F Writing package.json file", context2.options.config);
|
|
823
|
+
const stopwatch = _chunkBRWRLQDCjs.getStopwatch.call(void 0, "Write package.json file");
|
|
824
824
|
const packageJsonPath = _chunkJTAXCQX6js.joinPaths.call(void 0, context2.options.projectRoot, "project.json");
|
|
825
825
|
if (!_fs.existsSync.call(void 0, packageJsonPath)) {
|
|
826
826
|
throw new Error("Cannot find package.json configuration");
|
|
@@ -830,11 +830,11 @@ async function generatePackageJson(context2) {
|
|
|
830
830
|
if (!packageJson) {
|
|
831
831
|
throw new Error("Cannot find package.json configuration file");
|
|
832
832
|
}
|
|
833
|
-
packageJson = await
|
|
834
|
-
packageJson = await
|
|
833
|
+
packageJson = await _chunk7UV5IDACjs.addPackageDependencies.call(void 0, context2.options.config.workspaceRoot, context2.options.projectRoot, context2.options.projectName, packageJson);
|
|
834
|
+
packageJson = await _chunk7UV5IDACjs.addWorkspacePackageJsonFields.call(void 0, context2.options.config, context2.options.projectRoot, context2.options.sourceRoot, context2.options.projectName, false, packageJson);
|
|
835
835
|
packageJson.exports ??= {};
|
|
836
836
|
packageJson.exports["./package.json"] ??= "./package.json";
|
|
837
|
-
packageJson.exports["."] ??=
|
|
837
|
+
packageJson.exports["."] ??= _chunk7UV5IDACjs.addPackageJsonExport.call(void 0, "index", packageJson.type, context2.options.sourceRoot);
|
|
838
838
|
let entryPoints = [
|
|
839
839
|
{
|
|
840
840
|
in: "./src/index.ts",
|
|
@@ -852,7 +852,7 @@ async function generatePackageJson(context2) {
|
|
|
852
852
|
const split = entryPoint.out.split(".");
|
|
853
853
|
split.pop();
|
|
854
854
|
const entry = split.join(".").replaceAll("\\", "/");
|
|
855
|
-
packageJson.exports[`./${entry}`] ??=
|
|
855
|
+
packageJson.exports[`./${entry}`] ??= _chunk7UV5IDACjs.addPackageJsonExport.call(void 0, entry, packageJson.type, context2.options.sourceRoot);
|
|
856
856
|
}
|
|
857
857
|
}
|
|
858
858
|
packageJson.main = packageJson.type === "commonjs" ? "./dist/index.js" : "./dist/index.cjs";
|
|
@@ -890,8 +890,8 @@ async function generateContext(getOptions) {
|
|
|
890
890
|
}
|
|
891
891
|
_chunk3GQAWCBQjs.__name.call(void 0, generateContext, "generateContext");
|
|
892
892
|
async function executeEsBuild(context2) {
|
|
893
|
-
|
|
894
|
-
const stopwatch =
|
|
893
|
+
_chunkBRWRLQDCjs.writeDebug.call(void 0, ` \u{1F680} Running ${context2.options.name} build`, context2.options.config);
|
|
894
|
+
const stopwatch = _chunkBRWRLQDCjs.getStopwatch.call(void 0, `${context2.options.name} build`);
|
|
895
895
|
if (process.env.WATCH === "true") {
|
|
896
896
|
const ctx = await esbuild2.context(context2.options);
|
|
897
897
|
watch(ctx, context2.options);
|
|
@@ -907,9 +907,9 @@ async function executeEsBuild(context2) {
|
|
|
907
907
|
_chunk3GQAWCBQjs.__name.call(void 0, executeEsBuild, "executeEsBuild");
|
|
908
908
|
async function copyBuildAssets(context2) {
|
|
909
909
|
if (_optionalChain([context2, 'access', _26 => _26.result, 'optionalAccess', _27 => _27.errors, 'access', _28 => _28.length]) === 0) {
|
|
910
|
-
|
|
911
|
-
const stopwatch =
|
|
912
|
-
await
|
|
910
|
+
_chunkBRWRLQDCjs.writeDebug.call(void 0, ` \u{1F4CB} Copying asset files to output directory: ${context2.options.outdir}`, context2.options.config);
|
|
911
|
+
const stopwatch = _chunkBRWRLQDCjs.getStopwatch.call(void 0, `${context2.options.name} asset copy`);
|
|
912
|
+
await _chunk7UV5IDACjs.copyAssets.call(void 0, context2.options.config, _nullishCoalesce(context2.options.assets, () => ( [])), context2.options.outdir, context2.options.projectRoot, context2.options.sourceRoot, true, false);
|
|
913
913
|
stopwatch();
|
|
914
914
|
}
|
|
915
915
|
return context2;
|
|
@@ -918,9 +918,9 @@ _chunk3GQAWCBQjs.__name.call(void 0, copyBuildAssets, "copyBuildAssets");
|
|
|
918
918
|
async function reportResults(context2) {
|
|
919
919
|
if (_optionalChain([context2, 'access', _29 => _29.result, 'optionalAccess', _30 => _30.errors, 'access', _31 => _31.length]) === 0) {
|
|
920
920
|
if (context2.result.warnings.length > 0) {
|
|
921
|
-
|
|
921
|
+
_chunkBRWRLQDCjs.writeWarning.call(void 0, ` \u{1F6A7} The following warnings occurred during the build: ${context2.result.warnings.map((warning) => warning.text).join("\n")}`, context2.options.config);
|
|
922
922
|
}
|
|
923
|
-
|
|
923
|
+
_chunkBRWRLQDCjs.writeSuccess.call(void 0, ` \u{1F4E6} The ${context2.options.name} build completed successfully`, context2.options.config);
|
|
924
924
|
}
|
|
925
925
|
}
|
|
926
926
|
_chunk3GQAWCBQjs.__name.call(void 0, reportResults, "reportResults");
|
|
@@ -956,8 +956,8 @@ async function dependencyCheck(options) {
|
|
|
956
956
|
_chunk3GQAWCBQjs.__name.call(void 0, dependencyCheck, "dependencyCheck");
|
|
957
957
|
async function cleanOutputPath(context2) {
|
|
958
958
|
if (context2.options.clean !== false && context2.options.outdir) {
|
|
959
|
-
|
|
960
|
-
const stopwatch =
|
|
959
|
+
_chunkBRWRLQDCjs.writeDebug.call(void 0, ` \u{1F9F9} Cleaning ${context2.options.name} output path: ${context2.options.outdir}`, context2.options.config);
|
|
960
|
+
const stopwatch = _chunkBRWRLQDCjs.getStopwatch.call(void 0, `${context2.options.name} output clean`);
|
|
961
961
|
await cleanDirectories(context2.options.name, context2.options.outdir, context2.options.config);
|
|
962
962
|
stopwatch();
|
|
963
963
|
}
|
|
@@ -965,8 +965,8 @@ async function cleanOutputPath(context2) {
|
|
|
965
965
|
}
|
|
966
966
|
_chunk3GQAWCBQjs.__name.call(void 0, cleanOutputPath, "cleanOutputPath");
|
|
967
967
|
async function build3(options) {
|
|
968
|
-
|
|
969
|
-
const stopwatch =
|
|
968
|
+
_chunkBRWRLQDCjs.writeDebug.call(void 0, ` \u26A1 Executing Storm ESBuild pipeline`);
|
|
969
|
+
const stopwatch = _chunkBRWRLQDCjs.getStopwatch.call(void 0, "ESBuild pipeline");
|
|
970
970
|
try {
|
|
971
971
|
const opts = Array.isArray(options) ? options : [
|
|
972
972
|
options
|
|
@@ -976,9 +976,9 @@ async function build3(options) {
|
|
|
976
976
|
}
|
|
977
977
|
void transduce.async(opts, dependencyCheck);
|
|
978
978
|
await transduce.async(await createOptions(opts), pipe.async(generateContext, cleanOutputPath, generatePackageJson, executeEsBuild, copyBuildAssets, reportResults));
|
|
979
|
-
|
|
979
|
+
_chunkBRWRLQDCjs.writeSuccess.call(void 0, " \u{1F3C1} ESBuild pipeline build completed successfully");
|
|
980
980
|
} catch (error) {
|
|
981
|
-
|
|
981
|
+
_chunkBRWRLQDCjs.writeFatal.call(void 0, " \u274C Fatal errors occurred during the build that could not be recovered from. The build process has been terminated.");
|
|
982
982
|
throw error;
|
|
983
983
|
} finally {
|
|
984
984
|
stopwatch();
|
|
@@ -1006,9 +1006,9 @@ var watch = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, (context2, opti
|
|
|
1006
1006
|
return context2.rebuild();
|
|
1007
1007
|
});
|
|
1008
1008
|
if (rebuildResult instanceof Error) {
|
|
1009
|
-
|
|
1009
|
+
_chunkBRWRLQDCjs.writeError.call(void 0, rebuildResult.message);
|
|
1010
1010
|
}
|
|
1011
|
-
|
|
1011
|
+
_chunkBRWRLQDCjs.writeTrace.call(void 0, `${Date.now() - timeBefore}ms [${_nullishCoalesce(options.name, () => ( ""))}]`);
|
|
1012
1012
|
}, 10);
|
|
1013
1013
|
changeWatcher.on("change", fastRebuild);
|
|
1014
1014
|
return void 0;
|
|
@@ -1016,7 +1016,7 @@ var watch = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, (context2, opti
|
|
|
1016
1016
|
|
|
1017
1017
|
// src/executors/esbuild/executor.ts
|
|
1018
1018
|
async function esbuildExecutorFn(options, context2, config) {
|
|
1019
|
-
|
|
1019
|
+
_chunkBRWRLQDCjs.writeInfo.call(void 0, "\u{1F4E6} Running Storm ESBuild executor on the workspace", config);
|
|
1020
1020
|
if (!_optionalChain([context2, 'access', _32 => _32.projectsConfigurations, 'optionalAccess', _33 => _33.projects]) || !context2.projectName || !context2.projectsConfigurations.projects[context2.projectName] || !_optionalChain([context2, 'access', _34 => _34.projectsConfigurations, 'access', _35 => _35.projects, 'access', _36 => _36[context2.projectName], 'optionalAccess', _37 => _37.root])) {
|
|
1021
1021
|
throw new Error("The Build process failed because the context is not valid. Please run this command from a workspace.");
|
|
1022
1022
|
}
|
|
@@ -1033,7 +1033,7 @@ async function esbuildExecutorFn(options, context2, config) {
|
|
|
1033
1033
|
};
|
|
1034
1034
|
}
|
|
1035
1035
|
_chunk3GQAWCBQjs.__name.call(void 0, esbuildExecutorFn, "esbuildExecutorFn");
|
|
1036
|
-
var executor_default =
|
|
1036
|
+
var executor_default = _chunk5LEU7C3Ejs.withRunExecutor.call(void 0, "Storm ESBuild build", esbuildExecutorFn, {
|
|
1037
1037
|
skipReadingConfig: false,
|
|
1038
1038
|
hooks: {
|
|
1039
1039
|
applyDefaultOptions: /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, async (options, config) => {
|
|
@@ -6,10 +6,10 @@
|
|
|
6
6
|
|
|
7
7
|
|
|
8
8
|
|
|
9
|
-
var
|
|
9
|
+
var _chunk7UV5IDACjs = require('./chunk-7UV5IDAC.js');
|
|
10
10
|
|
|
11
11
|
|
|
12
|
-
var
|
|
12
|
+
var _chunk5LEU7C3Ejs = require('./chunk-5LEU7C3E.js');
|
|
13
13
|
|
|
14
14
|
|
|
15
15
|
|
|
@@ -19,7 +19,7 @@ var _chunkAY5HELLNjs = require('./chunk-AY5HELLN.js');
|
|
|
19
19
|
|
|
20
20
|
|
|
21
21
|
|
|
22
|
-
var
|
|
22
|
+
var _chunkBRWRLQDCjs = require('./chunk-BRWRLQDC.js');
|
|
23
23
|
|
|
24
24
|
|
|
25
25
|
var _chunkJTAXCQX6js = require('./chunk-JTAXCQX6.js');
|
|
@@ -74,9 +74,9 @@ var resolveOptions = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, async
|
|
|
74
74
|
if (!workspaceRoot) {
|
|
75
75
|
throw new Error("Cannot find Nx workspace root");
|
|
76
76
|
}
|
|
77
|
-
const config = await
|
|
78
|
-
|
|
79
|
-
const stopwatch =
|
|
77
|
+
const config = await _chunkBRWRLQDCjs.getConfig.call(void 0, workspaceRoot.dir);
|
|
78
|
+
_chunkBRWRLQDCjs.writeDebug.call(void 0, " \u2699\uFE0F Resolving build options", config);
|
|
79
|
+
const stopwatch = _chunkBRWRLQDCjs.getStopwatch.call(void 0, "Build options resolution");
|
|
80
80
|
const projectGraph = await _devkit.createProjectGraphAsync.call(void 0, {
|
|
81
81
|
exitOnError: true
|
|
82
82
|
});
|
|
@@ -93,19 +93,19 @@ var resolveOptions = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, async
|
|
|
93
93
|
}
|
|
94
94
|
const options = _defu2.default.call(void 0, userOptions, DEFAULT_BUILD_OPTIONS);
|
|
95
95
|
options.name ??= `${projectName}-${options.format}`;
|
|
96
|
-
options.target ??=
|
|
96
|
+
options.target ??= _chunk7UV5IDACjs.DEFAULT_TARGET;
|
|
97
97
|
const packageJsonPath = _chunkJTAXCQX6js.joinPaths.call(void 0, workspaceRoot.dir, options.projectRoot, "package.json");
|
|
98
98
|
if (!_fs.existsSync.call(void 0, packageJsonPath)) {
|
|
99
99
|
throw new Error("Cannot find package.json configuration");
|
|
100
100
|
}
|
|
101
|
-
const env =
|
|
101
|
+
const env = _chunk7UV5IDACjs.getEnv.call(void 0, "tsdown", options);
|
|
102
102
|
const result = {
|
|
103
103
|
...options,
|
|
104
104
|
config,
|
|
105
105
|
...userOptions,
|
|
106
106
|
tsconfig: _chunkJTAXCQX6js.joinPaths.call(void 0, projectRoot, userOptions.tsconfig ? userOptions.tsconfig.replace(projectRoot, "") : "tsconfig.json"),
|
|
107
107
|
format: options.format || "cjs",
|
|
108
|
-
entryPoints: await
|
|
108
|
+
entryPoints: await _chunk7UV5IDACjs.getEntryPoints.call(void 0, config, projectRoot, projectJson.sourceRoot, userOptions.entry || [
|
|
109
109
|
"./src/index.ts"
|
|
110
110
|
], userOptions.emitOnAll),
|
|
111
111
|
outdir: userOptions.outputPath || _chunkJTAXCQX6js.joinPaths.call(void 0, "dist", projectRoot),
|
|
@@ -116,7 +116,7 @@ var resolveOptions = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, async
|
|
|
116
116
|
projectGraph,
|
|
117
117
|
sourceRoot: userOptions.sourceRoot || projectJson.sourceRoot || _chunkJTAXCQX6js.joinPaths.call(void 0, projectRoot, "src"),
|
|
118
118
|
minify: userOptions.minify || !userOptions.debug,
|
|
119
|
-
verbose: userOptions.verbose ||
|
|
119
|
+
verbose: userOptions.verbose || _chunkBRWRLQDCjs.isVerbose.call(void 0, ) || userOptions.debug === true,
|
|
120
120
|
includeSrc: userOptions.includeSrc === true,
|
|
121
121
|
metafile: userOptions.metafile !== false,
|
|
122
122
|
generatePackageJson: userOptions.generatePackageJson !== false,
|
|
@@ -151,8 +151,8 @@ var resolveOptions = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, async
|
|
|
151
151
|
}, "resolveOptions");
|
|
152
152
|
async function generatePackageJson(options) {
|
|
153
153
|
if (options.generatePackageJson !== false && _fs.existsSync.call(void 0, _chunkJTAXCQX6js.joinPaths.call(void 0, options.projectRoot, "package.json"))) {
|
|
154
|
-
|
|
155
|
-
const stopwatch =
|
|
154
|
+
_chunkBRWRLQDCjs.writeDebug.call(void 0, " \u270D\uFE0F Writing package.json file", options.config);
|
|
155
|
+
const stopwatch = _chunkBRWRLQDCjs.getStopwatch.call(void 0, "Write package.json file");
|
|
156
156
|
const packageJsonPath = _chunkJTAXCQX6js.joinPaths.call(void 0, options.projectRoot, "project.json");
|
|
157
157
|
if (!_fs.existsSync.call(void 0, packageJsonPath)) {
|
|
158
158
|
throw new Error("Cannot find package.json configuration");
|
|
@@ -162,11 +162,11 @@ async function generatePackageJson(options) {
|
|
|
162
162
|
throw new Error("Cannot find package.json configuration file");
|
|
163
163
|
}
|
|
164
164
|
let packageJson = JSON.parse(packageJsonFile);
|
|
165
|
-
packageJson = await
|
|
166
|
-
packageJson = await
|
|
165
|
+
packageJson = await _chunk7UV5IDACjs.addPackageDependencies.call(void 0, options.config.workspaceRoot, options.projectRoot, options.projectName, packageJson);
|
|
166
|
+
packageJson = await _chunk7UV5IDACjs.addWorkspacePackageJsonFields.call(void 0, options.config, options.projectRoot, options.sourceRoot, options.projectName, false, packageJson);
|
|
167
167
|
packageJson.exports ??= {};
|
|
168
168
|
packageJson.exports["./package.json"] ??= "./package.json";
|
|
169
|
-
packageJson.exports["."] ??=
|
|
169
|
+
packageJson.exports["."] ??= _chunk7UV5IDACjs.addPackageJsonExport.call(void 0, "index", packageJson.type, options.sourceRoot);
|
|
170
170
|
let entryPoints = [
|
|
171
171
|
{
|
|
172
172
|
in: "./src/index.ts",
|
|
@@ -184,7 +184,7 @@ async function generatePackageJson(options) {
|
|
|
184
184
|
const split = entryPoint.out.split(".");
|
|
185
185
|
split.pop();
|
|
186
186
|
const entry = split.join(".").replaceAll("\\", "/");
|
|
187
|
-
packageJson.exports[`./${entry}`] ??=
|
|
187
|
+
packageJson.exports[`./${entry}`] ??= _chunk7UV5IDACjs.addPackageJsonExport.call(void 0, entry, packageJson.type, options.sourceRoot);
|
|
188
188
|
}
|
|
189
189
|
}
|
|
190
190
|
packageJson.main = packageJson.type === "commonjs" ? "./dist/index.js" : "./dist/index.cjs";
|
|
@@ -203,8 +203,8 @@ async function generatePackageJson(options) {
|
|
|
203
203
|
}
|
|
204
204
|
_chunk3GQAWCBQjs.__name.call(void 0, generatePackageJson, "generatePackageJson");
|
|
205
205
|
async function executeTSDown(options) {
|
|
206
|
-
|
|
207
|
-
const stopwatch =
|
|
206
|
+
_chunkBRWRLQDCjs.writeDebug.call(void 0, ` \u{1F680} Running ${options.name} build`, options.config);
|
|
207
|
+
const stopwatch = _chunkBRWRLQDCjs.getStopwatch.call(void 0, `${options.name} build`);
|
|
208
208
|
await _tsdown.build.call(void 0, {
|
|
209
209
|
...options,
|
|
210
210
|
entry: options.entryPoints,
|
|
@@ -216,21 +216,21 @@ async function executeTSDown(options) {
|
|
|
216
216
|
}
|
|
217
217
|
_chunk3GQAWCBQjs.__name.call(void 0, executeTSDown, "executeTSDown");
|
|
218
218
|
async function copyBuildAssets(options) {
|
|
219
|
-
|
|
220
|
-
const stopwatch =
|
|
221
|
-
await
|
|
219
|
+
_chunkBRWRLQDCjs.writeDebug.call(void 0, ` \u{1F4CB} Copying asset files to output directory: ${options.outdir}`, options.config);
|
|
220
|
+
const stopwatch = _chunkBRWRLQDCjs.getStopwatch.call(void 0, `${options.name} asset copy`);
|
|
221
|
+
await _chunk7UV5IDACjs.copyAssets.call(void 0, options.config, _nullishCoalesce(options.assets, () => ( [])), options.outdir, options.projectRoot, options.sourceRoot, true, false);
|
|
222
222
|
stopwatch();
|
|
223
223
|
return options;
|
|
224
224
|
}
|
|
225
225
|
_chunk3GQAWCBQjs.__name.call(void 0, copyBuildAssets, "copyBuildAssets");
|
|
226
226
|
async function reportResults(options) {
|
|
227
|
-
|
|
227
|
+
_chunkBRWRLQDCjs.writeSuccess.call(void 0, ` \u{1F4E6} The ${options.name} build completed successfully`, options.config);
|
|
228
228
|
}
|
|
229
229
|
_chunk3GQAWCBQjs.__name.call(void 0, reportResults, "reportResults");
|
|
230
230
|
async function cleanOutputPath(options) {
|
|
231
231
|
if (options.clean !== false && options.outdir) {
|
|
232
|
-
|
|
233
|
-
const stopwatch =
|
|
232
|
+
_chunkBRWRLQDCjs.writeDebug.call(void 0, ` \u{1F9F9} Cleaning ${options.name} output path: ${options.outdir}`, options.config);
|
|
233
|
+
const stopwatch = _chunkBRWRLQDCjs.getStopwatch.call(void 0, `${options.name} output clean`);
|
|
234
234
|
await cleanDirectories(options.name, options.outdir, options.config);
|
|
235
235
|
stopwatch();
|
|
236
236
|
}
|
|
@@ -238,8 +238,8 @@ async function cleanOutputPath(options) {
|
|
|
238
238
|
}
|
|
239
239
|
_chunk3GQAWCBQjs.__name.call(void 0, cleanOutputPath, "cleanOutputPath");
|
|
240
240
|
async function build(options) {
|
|
241
|
-
|
|
242
|
-
const stopwatch =
|
|
241
|
+
_chunkBRWRLQDCjs.writeDebug.call(void 0, ` \u26A1 Executing Storm TSDown pipeline`);
|
|
242
|
+
const stopwatch = _chunkBRWRLQDCjs.getStopwatch.call(void 0, "TSDown pipeline");
|
|
243
243
|
try {
|
|
244
244
|
const opts = Array.isArray(options) ? options : [
|
|
245
245
|
options
|
|
@@ -257,11 +257,11 @@ async function build(options) {
|
|
|
257
257
|
await reportResults(opt);
|
|
258
258
|
}));
|
|
259
259
|
} else {
|
|
260
|
-
|
|
260
|
+
_chunkBRWRLQDCjs.writeWarning.call(void 0, " \u{1F6A7} No options were passed to TSBuild. Please check the parameters passed to the `build` function.");
|
|
261
261
|
}
|
|
262
|
-
|
|
262
|
+
_chunkBRWRLQDCjs.writeSuccess.call(void 0, " \u{1F3C1} TSDown pipeline build completed successfully");
|
|
263
263
|
} catch (error) {
|
|
264
|
-
|
|
264
|
+
_chunkBRWRLQDCjs.writeFatal.call(void 0, " \u274C Fatal errors occurred during the build that could not be recovered from. The build process has been terminated.");
|
|
265
265
|
throw error;
|
|
266
266
|
} finally {
|
|
267
267
|
stopwatch();
|
|
@@ -271,7 +271,7 @@ _chunk3GQAWCBQjs.__name.call(void 0, build, "build");
|
|
|
271
271
|
|
|
272
272
|
// src/executors/tsdown/executor.ts
|
|
273
273
|
async function tsdownExecutorFn(options, context, config) {
|
|
274
|
-
|
|
274
|
+
_chunkBRWRLQDCjs.writeInfo.call(void 0, "\u{1F4E6} Running Storm TSDown build executor on the workspace", config);
|
|
275
275
|
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])) {
|
|
276
276
|
throw new Error("The Build process failed because the context is not valid. Please run this command from a workspace.");
|
|
277
277
|
}
|
|
@@ -288,7 +288,7 @@ async function tsdownExecutorFn(options, context, config) {
|
|
|
288
288
|
};
|
|
289
289
|
}
|
|
290
290
|
_chunk3GQAWCBQjs.__name.call(void 0, tsdownExecutorFn, "tsdownExecutorFn");
|
|
291
|
-
var executor_default =
|
|
291
|
+
var executor_default = _chunk5LEU7C3Ejs.withRunExecutor.call(void 0, "Storm TSDown build executor", tsdownExecutorFn, {
|
|
292
292
|
skipReadingConfig: false,
|
|
293
293
|
hooks: {
|
|
294
294
|
applyDefaultOptions: /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, async (options, config) => {
|
|
@@ -1,10 +1,10 @@
|
|
|
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(); } }
|
|
2
2
|
|
|
3
3
|
|
|
4
|
-
var
|
|
4
|
+
var _chunkBRWRLQDCjs = require('./chunk-BRWRLQDC.js');
|
|
5
5
|
|
|
6
6
|
|
|
7
|
-
var
|
|
7
|
+
var _chunk4JOIS7WWjs = require('./chunk-4JOIS7WW.js');
|
|
8
8
|
|
|
9
9
|
|
|
10
10
|
|
|
@@ -54,7 +54,7 @@ var copyAssets = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, async (con
|
|
|
54
54
|
output: "src/"
|
|
55
55
|
});
|
|
56
56
|
}
|
|
57
|
-
|
|
57
|
+
_chunkBRWRLQDCjs.writeTrace.call(void 0, `\u{1F4DD} Copying the following assets to the output directory:
|
|
58
58
|
${pendingAssets.map((pendingAsset) => typeof pendingAsset === "string" ? ` - ${pendingAsset} -> ${outputPath}` : ` - ${pendingAsset.input}/${pendingAsset.glob} -> ${_chunkJTAXCQX6js.joinPaths.call(void 0, outputPath, pendingAsset.output)}`).join("\n")}`, config);
|
|
59
59
|
const assetHandler = new (0, _copyassetshandler.CopyAssetsHandler)({
|
|
60
60
|
projectDir: projectRoot,
|
|
@@ -64,7 +64,7 @@ ${pendingAssets.map((pendingAsset) => typeof pendingAsset === "string" ? ` - ${p
|
|
|
64
64
|
});
|
|
65
65
|
await assetHandler.processAllAssetsOnce();
|
|
66
66
|
if (includeSrc === true) {
|
|
67
|
-
|
|
67
|
+
_chunkBRWRLQDCjs.writeDebug.call(void 0, `\u{1F4DD} Adding banner and writing source files: ${_chunkJTAXCQX6js.joinPaths.call(void 0, outputPath, "src")}`, config);
|
|
68
68
|
const files = await _glob.glob.call(void 0, [
|
|
69
69
|
_chunkJTAXCQX6js.joinPaths.call(void 0, config.workspaceRoot, outputPath, "src/**/*.ts"),
|
|
70
70
|
_chunkJTAXCQX6js.joinPaths.call(void 0, config.workspaceRoot, outputPath, "src/**/*.tsx"),
|
|
@@ -102,7 +102,7 @@ var addPackageDependencies = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0
|
|
|
102
102
|
}
|
|
103
103
|
}
|
|
104
104
|
if (localPackages.length > 0) {
|
|
105
|
-
|
|
105
|
+
_chunkBRWRLQDCjs.writeTrace.call(void 0, `\u{1F4E6} Adding local packages to package.json: ${localPackages.map((p) => p.name).join(", ")}`);
|
|
106
106
|
packageJson.peerDependencies = localPackages.reduce((ret, localPackage) => {
|
|
107
107
|
if (!ret[localPackage.name]) {
|
|
108
108
|
ret[localPackage.name] = `>=${localPackage.version || "0.0.1"}`;
|
|
@@ -124,12 +124,12 @@ var addPackageDependencies = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0
|
|
|
124
124
|
return ret;
|
|
125
125
|
}, _nullishCoalesce(packageJson.peerDependencies, () => ( {})));
|
|
126
126
|
} else {
|
|
127
|
-
|
|
127
|
+
_chunkBRWRLQDCjs.writeTrace.call(void 0, "\u{1F4E6} No local packages dependencies to add to package.json");
|
|
128
128
|
}
|
|
129
129
|
return packageJson;
|
|
130
130
|
}, "addPackageDependencies");
|
|
131
131
|
var addWorkspacePackageJsonFields = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, async (config, projectRoot, sourceRoot, projectName, includeSrc = false, packageJson) => {
|
|
132
|
-
const workspaceRoot = config.workspaceRoot ? config.workspaceRoot :
|
|
132
|
+
const workspaceRoot = config.workspaceRoot ? config.workspaceRoot : _chunk4JOIS7WWjs.findWorkspaceRoot.call(void 0, );
|
|
133
133
|
const workspacePackageJsonContent = await _promises.readFile.call(void 0, _chunkJTAXCQX6js.joinPaths.call(void 0, workspaceRoot, "package.json"), "utf8");
|
|
134
134
|
const workspacePackageJson = JSON.parse(workspacePackageJsonContent);
|
|
135
135
|
packageJson.type ??= "module";
|
|
@@ -197,7 +197,7 @@ var addPackageJsonExport = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0,
|
|
|
197
197
|
// ../build-tools/src/utilities/get-entry-points.ts
|
|
198
198
|
|
|
199
199
|
var getEntryPoints = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, async (config, projectRoot, sourceRoot, entry, emitOnAll = false) => {
|
|
200
|
-
const workspaceRoot = config.workspaceRoot ? config.workspaceRoot :
|
|
200
|
+
const workspaceRoot = config.workspaceRoot ? config.workspaceRoot : _chunk4JOIS7WWjs.findWorkspaceRoot.call(void 0, );
|
|
201
201
|
const entryPoints = [];
|
|
202
202
|
if (entry) {
|
|
203
203
|
if (Array.isArray(entry)) {
|
|
@@ -220,7 +220,7 @@ var getEntryPoints = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, async
|
|
|
220
220
|
results.push(...files.reduce((ret, filePath) => {
|
|
221
221
|
const result = _chunkJTAXCQX6js.correctPaths.call(void 0, _chunkJTAXCQX6js.joinPaths.call(void 0, filePath.path, filePath.name).replaceAll(_chunkJTAXCQX6js.correctPaths.call(void 0, workspaceRoot), "").replaceAll(_chunkJTAXCQX6js.correctPaths.call(void 0, projectRoot), ""));
|
|
222
222
|
if (result) {
|
|
223
|
-
|
|
223
|
+
_chunkBRWRLQDCjs.writeDebug.call(void 0, `Trying to add entry point ${result} at "${_chunkJTAXCQX6js.joinPaths.call(void 0, filePath.path, filePath.name)}"`, config);
|
|
224
224
|
if (!results.includes(result)) {
|
|
225
225
|
results.push(result);
|
|
226
226
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); 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 _chunk4JOIS7WWjs = require('./chunk-4JOIS7WW.js');
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
var _chunk3GQAWCBQjs = require('./chunk-3GQAWCBQ.js');
|
|
@@ -49,7 +49,7 @@ var applyWorkspaceExecutorTokens = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(
|
|
|
49
49
|
result = result.replaceAll("{sourceRoot}", sourceRoot);
|
|
50
50
|
}
|
|
51
51
|
if (result.includes("{workspaceRoot}")) {
|
|
52
|
-
result = result.replaceAll("{workspaceRoot}", _nullishCoalesce(tokenizerOptions.workspaceRoot, () => (
|
|
52
|
+
result = result.replaceAll("{workspaceRoot}", _nullishCoalesce(tokenizerOptions.workspaceRoot, () => ( _chunk4JOIS7WWjs.findWorkspaceRoot.call(void 0, ))));
|
|
53
53
|
}
|
|
54
54
|
return result;
|
|
55
55
|
}, "applyWorkspaceExecutorTokens");
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
findWorkspaceRoot
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-M666DZYJ.mjs";
|
|
4
4
|
import {
|
|
5
5
|
correctPaths,
|
|
6
6
|
joinPaths
|
|
@@ -115,7 +115,7 @@ var WorkspaceDirectoryConfigSchema = z.object({
|
|
|
115
115
|
build: z.string().trim().default("dist").describe("The directory used to store the workspace's distributable files after a build (relative to the workspace root)")
|
|
116
116
|
}).describe("Various directories used by the workspace to store data, cache, and configuration files");
|
|
117
117
|
var StormConfigSchema = z.object({
|
|
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"),
|
|
118
|
+
$schema: z.string().trim().default("https://cdn.jsdelivr.net/npm/@storm-software/config/schemas/storm-workspace.schema.json").optional().nullish().describe("The URL to the JSON schema file that describes the Storm configuration file"),
|
|
119
119
|
extends: ExtendsSchema.optional(),
|
|
120
120
|
name: z.string().trim().toLowerCase().optional().describe("The name of the service/package/scope using this configuration"),
|
|
121
121
|
namespace: z.string().trim().toLowerCase().optional().describe("The namespace of the package"),
|
|
@@ -157,6 +157,7 @@ var StormConfigSchema = z.object({
|
|
|
157
157
|
"trace",
|
|
158
158
|
"all"
|
|
159
159
|
]).default("info").describe("The log level used to filter out lower priority log messages. If not provided, this is defaulted using the `environment` config value (if `environment` is set to `production` then `level` is `error`, else `level` is `debug`)."),
|
|
160
|
+
skipConfigLogging: z.boolean().optional().describe("Should the logging of the current Storm Workspace configuration be skipped?"),
|
|
160
161
|
registry: RegistryConfigSchema,
|
|
161
162
|
configFile: z.string().trim().nullable().default(null).describe("The filepath of the Storm config. When this field is null, no config file was found in the current workspace."),
|
|
162
163
|
colors: ColorConfigSchema.or(ColorConfigMapSchema).describe("Storm theme config values used for styling various package elements"),
|
|
@@ -541,10 +542,10 @@ var getConfigFileByName = /* @__PURE__ */ __name(async (fileName, filePath, opti
|
|
|
541
542
|
}, "getConfigFileByName");
|
|
542
543
|
var getConfigFile = /* @__PURE__ */ __name(async (filePath, additionalFileNames = []) => {
|
|
543
544
|
const workspacePath = filePath ? filePath : findWorkspaceRoot(filePath);
|
|
544
|
-
const result = await getConfigFileByName("storm", workspacePath);
|
|
545
|
+
const result = await getConfigFileByName("storm-workspace", workspacePath);
|
|
545
546
|
let config = result.config;
|
|
546
547
|
const configFile = result.configFile;
|
|
547
|
-
if (config && configFile && Object.keys(config).length > 0) {
|
|
548
|
+
if (config && configFile && Object.keys(config).length > 0 && !config.skipConfigLogging) {
|
|
548
549
|
writeTrace(`Found Storm configuration file "${configFile.includes(`${workspacePath}/`) ? configFile.replace(`${workspacePath}/`, "") : configFile}" at "${workspacePath}"`, {
|
|
549
550
|
logLevel: "all"
|
|
550
551
|
});
|
|
@@ -553,9 +554,11 @@ var getConfigFile = /* @__PURE__ */ __name(async (filePath, additionalFileNames
|
|
|
553
554
|
const results = await Promise.all(additionalFileNames.map((fileName) => getConfigFileByName(fileName, workspacePath)));
|
|
554
555
|
for (const result2 of results) {
|
|
555
556
|
if (result2?.config && result2?.configFile && Object.keys(result2.config).length > 0) {
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
557
|
+
if (!config.skipConfigLogging && !result2.config.skipConfigLogging) {
|
|
558
|
+
writeTrace(`Found alternative configuration file "${result2.configFile.includes(`${workspacePath}/`) ? result2.configFile.replace(`${workspacePath}/`, "") : result2.configFile}" at "${workspacePath}"`, {
|
|
559
|
+
logLevel: "all"
|
|
560
|
+
});
|
|
561
|
+
}
|
|
559
562
|
config = defu(result2.config ?? {}, config ?? {});
|
|
560
563
|
}
|
|
561
564
|
}
|
|
@@ -628,7 +631,8 @@ var getConfigEnv = /* @__PURE__ */ __name(() => {
|
|
|
628
631
|
cyclone: process.env[`${prefix}REGISTRY_CYCLONE`] || void 0,
|
|
629
632
|
container: process.env[`${prefix}REGISTRY_CONTAINER`] || void 0
|
|
630
633
|
},
|
|
631
|
-
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`])) ? getLogLevelLabel(Number.parseInt(process.env[`${prefix}LOG_LEVEL`])) : process.env[`${prefix}LOG_LEVEL`] : void 0
|
|
634
|
+
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`])) ? getLogLevelLabel(Number.parseInt(process.env[`${prefix}LOG_LEVEL`])) : process.env[`${prefix}LOG_LEVEL`] : void 0,
|
|
635
|
+
skipConfigLogging: process.env[`${prefix}SKIP_CONFIG_LOGGING`] !== void 0 ? Boolean(process.env[`${prefix}SKIP_CONFIG_LOGGING`]) : void 0
|
|
632
636
|
};
|
|
633
637
|
const themeNames = Object.keys(process.env).filter((envKey) => envKey.startsWith(`${prefix}COLOR_`) && COLOR_KEYS.every((colorKey) => !envKey.startsWith(`${prefix}COLOR_LIGHT_${colorKey}`) && !envKey.startsWith(`${prefix}COLOR_DARK_${colorKey}`)));
|
|
634
638
|
config.colors = themeNames.length > 0 ? themeNames.reduce((ret, themeName) => {
|
|
@@ -863,6 +867,9 @@ var setConfigEnv = /* @__PURE__ */ __name((config) => {
|
|
|
863
867
|
process.env.NX_VERBOSE_LOGGING = String(getLogLevel(config.logLevel) >= LogLevel.DEBUG ? true : false);
|
|
864
868
|
process.env.RUST_BACKTRACE = getLogLevel(config.logLevel) >= LogLevel.DEBUG ? "full" : "none";
|
|
865
869
|
}
|
|
870
|
+
if (config.skipConfigLogging !== void 0) {
|
|
871
|
+
process.env[`${prefix}SKIP_CONFIG_LOGGING`] = String(config.skipConfigLogging);
|
|
872
|
+
}
|
|
866
873
|
process.env[`${prefix}CONFIG`] = JSON.stringify(config);
|
|
867
874
|
for (const key of Object.keys(config.extensions ?? {})) {
|
|
868
875
|
config.extensions[key] && Object.keys(config.extensions[key]) && setExtensionEnv(key, config.extensions[key]);
|
|
@@ -980,7 +987,7 @@ var createStormConfig = /* @__PURE__ */ __name(async (extensionName, schema, wor
|
|
|
980
987
|
const defaultConfig = await getDefaultConfig(_workspaceRoot);
|
|
981
988
|
const configFile = await getConfigFile(_workspaceRoot);
|
|
982
989
|
if (!configFile && !skipLogs) {
|
|
983
|
-
writeWarning("No Storm
|
|
990
|
+
writeWarning("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", {
|
|
984
991
|
logLevel: "all"
|
|
985
992
|
});
|
|
986
993
|
}
|
|
@@ -1018,8 +1025,8 @@ var createConfigExtension = /* @__PURE__ */ __name((extensionName, schema) => {
|
|
|
1018
1025
|
var loadStormConfig = /* @__PURE__ */ __name(async (workspaceRoot, skipLogs = false) => {
|
|
1019
1026
|
const config = await createStormConfig(void 0, void 0, workspaceRoot, skipLogs);
|
|
1020
1027
|
setConfigEnv(config);
|
|
1021
|
-
if (!skipLogs) {
|
|
1022
|
-
writeTrace(`\u2699\uFE0F Using Storm configuration:
|
|
1028
|
+
if (!skipLogs && !config.skipConfigLogging) {
|
|
1029
|
+
writeTrace(`\u2699\uFE0F Using Storm Workspace configuration:
|
|
1023
1030
|
${formatLogMessage(config)}`, config);
|
|
1024
1031
|
}
|
|
1025
1032
|
return config;
|