@storm-software/workspace-tools 1.246.0 → 1.246.2
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 +18 -0
- package/README.md +1 -1
- package/dist/{chunk-7Q66XSCS.mjs → chunk-2AKLJNKO.mjs} +2 -2
- package/dist/{chunk-6QSFQS3X.js → chunk-34JK7ZOU.js} +2 -2
- package/dist/{chunk-CLBFXZQ5.mjs → chunk-3SPGOKCO.mjs} +1 -1
- package/dist/{chunk-HXU5ZXAJ.mjs → chunk-4F75KA7J.mjs} +1 -1
- package/dist/{chunk-UI3SQYV3.mjs → chunk-4YODDZMS.mjs} +1 -1
- package/dist/{chunk-KLHTXAIU.js → chunk-66FRJGIN.js} +20 -20
- package/dist/{chunk-U6TLQT5H.js → chunk-6V5GP3U4.js} +3 -3
- package/dist/{chunk-5XF4CY7D.mjs → chunk-7QVGAOPQ.mjs} +1 -1
- package/dist/{chunk-GJ6DN3BR.mjs → chunk-AQLXZBXJ.mjs} +3 -3
- package/dist/{chunk-5DAZ2WTI.js → chunk-AWPP7DRY.js} +2 -2
- package/dist/{chunk-IBHLVELV.js → chunk-AY5HELLN.js} +25 -25
- package/dist/{chunk-EUCOXCI2.mjs → chunk-BBRVJL4A.mjs} +4 -4
- package/dist/{chunk-6627ZZQF.mjs → chunk-BC3QVHAH.mjs} +4 -4
- package/dist/{chunk-ZOFW74B2.mjs → chunk-BLG6LLHW.mjs} +1 -1
- package/dist/{chunk-HONSACRT.js → chunk-BNYY2WQJ.js} +2 -2
- package/dist/{chunk-2HD75CLD.js → chunk-BYLPQCIB.js} +11 -11
- package/dist/{chunk-MMMTLP2W.js → chunk-CQAGLRNY.js} +5 -5
- package/dist/{chunk-2GRVQNW3.js → chunk-CUPARBOS.js} +3 -3
- package/dist/{chunk-RAVLTWJV.js → chunk-ECSCURQQ.js} +13 -13
- package/dist/{chunk-D2ECVPJF.js → chunk-EIL3PQQL.js} +2 -2
- package/dist/{chunk-XIOF32ZH.mjs → chunk-FBIVTCSJ.mjs} +1 -1
- package/dist/{chunk-RRWRVA7F.js → chunk-FDPZRNKZ.js} +15 -15
- package/dist/{chunk-RSILHGEU.js → chunk-G3AMYMML.js} +22 -22
- package/dist/{chunk-SNFZL5BN.mjs → chunk-GQ6ZBQ6I.mjs} +3 -3
- package/dist/{chunk-RFO5NMSB.js → chunk-H5XURNDS.js} +2 -2
- package/dist/{chunk-Q45DDLNL.mjs → chunk-HK26KBWU.mjs} +2 -2
- package/dist/{chunk-TGDWEUKX.mjs → chunk-I6BCQJPP.mjs} +1 -1
- package/dist/{chunk-IUV3RLT4.mjs → chunk-IPMZQTRA.mjs} +1 -1
- package/dist/{chunk-YWKUJJ34.js → chunk-ITL2GPJB.js} +2 -2
- package/dist/chunk-JTAXCQX6.js +135 -0
- package/dist/{chunk-RLGZCVPW.mjs → chunk-KPKHTJWT.mjs} +3 -3
- package/dist/{chunk-PKBHUBDV.mjs → chunk-KV7YB4MU.mjs} +1 -1
- package/dist/{chunk-PCPEJBLO.js → chunk-LZNWOO4B.js} +7 -7
- package/dist/{chunk-YSYBVJGR.js → chunk-N3WLDHSN.js} +2 -2
- package/dist/chunk-NCFX2MWO.mjs +135 -0
- package/dist/{chunk-LYUV4LMB.mjs → chunk-O3ZLX7S5.mjs} +2 -2
- package/dist/{chunk-IF2GIONQ.js → chunk-P4ALYDGC.js} +5 -5
- package/dist/{chunk-C3YSVZWO.js → chunk-Q2DU6KGV.js} +7 -7
- package/dist/{chunk-T2NTGJ6O.mjs → chunk-Q47LFUGL.mjs} +3 -3
- package/dist/{chunk-6N67WSX5.mjs → chunk-R7VJ7ZHV.mjs} +1 -1
- package/dist/{chunk-GYGIXXAL.js → chunk-RWDBQOGV.js} +5 -5
- package/dist/{chunk-C2REXPET.mjs → chunk-SLCOHXD3.mjs} +1 -1
- package/dist/{chunk-KWIXQ4UN.mjs → chunk-TBQLIKD4.mjs} +3 -3
- package/dist/{chunk-INEO4WKL.mjs → chunk-TJ6WVBYM.mjs} +3 -3
- package/dist/{chunk-6ZRK5I4N.js → chunk-U3TVR7B3.js} +7 -7
- package/dist/{chunk-UHNTJRTW.mjs → chunk-U4AQXXXF.mjs} +3 -3
- package/dist/{chunk-FZUZUTKX.js → chunk-U7TEDNQF.js} +41 -41
- package/dist/{chunk-K62HB3IT.mjs → chunk-WCIY3TEF.mjs} +1 -1
- package/dist/{chunk-YFERQMWX.js → chunk-WPYYDD5F.js} +2 -2
- package/dist/{chunk-7PLUDZNP.mjs → chunk-X7XA6QPV.mjs} +2 -2
- package/dist/{chunk-CFRPLVEU.mjs → chunk-XI4BWTXX.mjs} +2 -2
- package/dist/{chunk-GDE7VBWW.js → chunk-Z6E637KA.js} +62 -62
- package/dist/{chunk-M7ZE5SMZ.js → chunk-ZAE2P6GK.js} +7 -7
- package/dist/{chunk-SBCLCF4E.mjs → chunk-ZKWGOANM.mjs} +4 -4
- package/dist/{chunk-B6PUPX6O.js → chunk-ZQPK5G4U.js} +27 -27
- package/dist/{chunk-QSLN7UYG.js → chunk-ZVP6NBMF.js} +2 -2
- package/dist/executors.js +19 -19
- package/dist/executors.mjs +20 -20
- package/dist/generators.js +13 -13
- package/dist/generators.mjs +12 -12
- package/dist/index.js +29 -29
- package/dist/index.mjs +30 -30
- package/dist/src/base/base-executor.js +6 -6
- package/dist/src/base/base-executor.mjs +5 -5
- package/dist/src/base/base-generator.js +6 -6
- package/dist/src/base/base-generator.mjs +5 -5
- package/dist/src/base/index.js +8 -8
- package/dist/src/base/index.mjs +7 -7
- package/dist/src/executors/cargo-build/executor.js +7 -7
- package/dist/src/executors/cargo-build/executor.mjs +6 -6
- package/dist/src/executors/cargo-check/executor.js +7 -7
- package/dist/src/executors/cargo-check/executor.mjs +6 -6
- package/dist/src/executors/cargo-clippy/executor.js +7 -7
- package/dist/src/executors/cargo-clippy/executor.mjs +6 -6
- package/dist/src/executors/cargo-doc/executor.js +7 -7
- package/dist/src/executors/cargo-doc/executor.mjs +6 -6
- package/dist/src/executors/cargo-format/executor.js +7 -7
- package/dist/src/executors/cargo-format/executor.mjs +6 -6
- package/dist/src/executors/clean-package/executor.js +9 -9
- package/dist/src/executors/clean-package/executor.mjs +5 -5
- package/dist/src/executors/esbuild/executor.js +8 -8
- package/dist/src/executors/esbuild/executor.mjs +7 -7
- package/dist/src/executors/npm-publish/executor.js +4 -4
- package/dist/src/executors/npm-publish/executor.mjs +3 -3
- package/dist/src/executors/size-limit/executor.js +7 -7
- package/dist/src/executors/size-limit/executor.mjs +6 -6
- package/dist/src/executors/tsdown/executor.js +8 -8
- package/dist/src/executors/tsdown/executor.mjs +7 -7
- package/dist/src/executors/typia/executor.js +7 -7
- package/dist/src/executors/typia/executor.mjs +6 -6
- package/dist/src/executors/unbuild/executor.js +7 -7
- package/dist/src/executors/unbuild/executor.mjs +6 -6
- package/dist/src/generators/browser-library/generator.js +8 -8
- package/dist/src/generators/browser-library/generator.mjs +7 -7
- package/dist/src/generators/config-schema/generator.js +7 -7
- package/dist/src/generators/config-schema/generator.mjs +6 -6
- package/dist/src/generators/neutral-library/generator.js +8 -8
- package/dist/src/generators/neutral-library/generator.mjs +7 -7
- package/dist/src/generators/node-library/generator.js +8 -8
- package/dist/src/generators/node-library/generator.mjs +7 -7
- package/dist/src/generators/preset/generator.js +7 -7
- package/dist/src/generators/preset/generator.mjs +6 -6
- package/dist/src/generators/release-version/generator.js +5 -5
- package/dist/src/generators/release-version/generator.mjs +4 -4
- package/dist/src/utils/apply-workspace-tokens.js +4 -4
- package/dist/src/utils/apply-workspace-tokens.mjs +3 -3
- package/dist/src/utils/get-project-configurations.js +4 -4
- package/dist/src/utils/get-project-configurations.mjs +3 -3
- package/dist/src/utils/index.js +6 -6
- package/dist/src/utils/index.mjs +5 -5
- package/dist/src/utils/pnpm-deps-update.js +3 -3
- package/dist/src/utils/pnpm-deps-update.mjs +2 -2
- package/package.json +1 -1
- package/dist/chunk-2AUNU6UA.mjs +0 -32
- package/dist/chunk-BUXJSVJG.js +0 -32
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
var _chunkULBTYC2Bjs = require('./chunk-ULBTYC2B.js');
|
|
5
5
|
|
|
6
6
|
|
|
7
|
-
var
|
|
7
|
+
var _chunkAY5HELLNjs = require('./chunk-AY5HELLN.js');
|
|
8
8
|
|
|
9
9
|
|
|
10
10
|
var _chunk3GQAWCBQjs = require('./chunk-3GQAWCBQ.js');
|
|
@@ -20,7 +20,7 @@ async function cargoDocExecutor(options, context) {
|
|
|
20
20
|
return await _chunkULBTYC2Bjs.cargoCommand.call(void 0, ...command);
|
|
21
21
|
}
|
|
22
22
|
_chunk3GQAWCBQjs.__name.call(void 0, cargoDocExecutor, "cargoDocExecutor");
|
|
23
|
-
var executor_default =
|
|
23
|
+
var executor_default = _chunkAY5HELLNjs.withRunExecutor.call(void 0, "Cargo Doc", cargoDocExecutor, {
|
|
24
24
|
skipReadingConfig: false,
|
|
25
25
|
hooks: {
|
|
26
26
|
applyDefaultOptions: /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, (options) => {
|
|
@@ -8,10 +8,10 @@
|
|
|
8
8
|
|
|
9
9
|
|
|
10
10
|
|
|
11
|
-
var
|
|
11
|
+
var _chunkG3AMYMMLjs = require('./chunk-G3AMYMML.js');
|
|
12
12
|
|
|
13
13
|
|
|
14
|
-
var
|
|
14
|
+
var _chunkAY5HELLNjs = require('./chunk-AY5HELLN.js');
|
|
15
15
|
|
|
16
16
|
|
|
17
17
|
|
|
@@ -23,10 +23,10 @@ var _chunkIBHLVELVjs = require('./chunk-IBHLVELV.js');
|
|
|
23
23
|
|
|
24
24
|
|
|
25
25
|
|
|
26
|
-
var
|
|
26
|
+
var _chunkZQPK5G4Ujs = require('./chunk-ZQPK5G4U.js');
|
|
27
27
|
|
|
28
28
|
|
|
29
|
-
var
|
|
29
|
+
var _chunkJTAXCQX6js = require('./chunk-JTAXCQX6.js');
|
|
30
30
|
|
|
31
31
|
|
|
32
32
|
|
|
@@ -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
|
+
_chunkZQPK5G4Ujs.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);
|
|
@@ -366,7 +366,7 @@ _chunk3GQAWCBQjs.__name.call(void 0, resolvePathsConfig, "resolvePathsConfig");
|
|
|
366
366
|
var resolvePathsPlugin = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, (options, resolvedOptions) => ({
|
|
367
367
|
name: "storm:resolve-paths",
|
|
368
368
|
setup(build4) {
|
|
369
|
-
const parentTsConfig = build4.initialOptions.tsconfig ? _chunk3GQAWCBQjs.__require.call(void 0,
|
|
369
|
+
const parentTsConfig = build4.initialOptions.tsconfig ? _chunk3GQAWCBQjs.__require.call(void 0, _chunkJTAXCQX6js.joinPaths.call(void 0, resolvedOptions.config.workspaceRoot, build4.initialOptions.tsconfig)) : _chunk3GQAWCBQjs.__require.call(void 0, _chunkJTAXCQX6js.joinPaths.call(void 0, resolvedOptions.config.workspaceRoot, "tsconfig.json"));
|
|
370
370
|
const resolvedTsPaths = resolvePathsConfig(parentTsConfig, options.projectRoot);
|
|
371
371
|
const packagesRegex = new RegExp(`^(${Object.keys(resolvedTsPaths).join("|")})$`);
|
|
372
372
|
build4.onResolve({
|
|
@@ -390,7 +390,7 @@ var _apiextractor = require('@microsoft/api-extractor');
|
|
|
390
390
|
|
|
391
391
|
|
|
392
392
|
function bundleTypeDefinitions(filename, outfile, externals, options) {
|
|
393
|
-
const { dependencies, peerDependencies, devDependencies } = _chunk3GQAWCBQjs.__require.call(void 0,
|
|
393
|
+
const { dependencies, peerDependencies, devDependencies } = _chunk3GQAWCBQjs.__require.call(void 0, _chunkJTAXCQX6js.joinPaths.call(void 0, options.projectRoot, "package.json"));
|
|
394
394
|
const dependenciesKeys = Object.keys(_nullishCoalesce(dependencies, () => ( {}))).flatMap((p) => [
|
|
395
395
|
p,
|
|
396
396
|
getTypeDependencyPackageName(p)
|
|
@@ -426,13 +426,13 @@ function bundleTypeDefinitions(filename, outfile, externals, options) {
|
|
|
426
426
|
},
|
|
427
427
|
dtsRollup: {
|
|
428
428
|
enabled: true,
|
|
429
|
-
untrimmedFilePath:
|
|
429
|
+
untrimmedFilePath: _chunkJTAXCQX6js.joinPaths.call(void 0, options.outdir, `${outfile}.d.ts`)
|
|
430
430
|
},
|
|
431
431
|
tsdocMetadata: {
|
|
432
432
|
enabled: false
|
|
433
433
|
}
|
|
434
434
|
},
|
|
435
|
-
packageJsonFullPath:
|
|
435
|
+
packageJsonFullPath: _chunkJTAXCQX6js.joinPaths.call(void 0, options.projectRoot, "package.json"),
|
|
436
436
|
configObjectFullPath: void 0
|
|
437
437
|
});
|
|
438
438
|
const extractorResult = _apiextractor.Extractor.invoke(extractorConfig, {
|
|
@@ -440,7 +440,7 @@ function bundleTypeDefinitions(filename, outfile, externals, options) {
|
|
|
440
440
|
localBuild: true
|
|
441
441
|
});
|
|
442
442
|
if (extractorResult.succeeded === false) {
|
|
443
|
-
|
|
443
|
+
_chunkZQPK5G4Ujs.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
|
}
|
|
@@ -459,12 +459,12 @@ var tscPlugin = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, (options, r
|
|
|
459
459
|
const sourceRoot = resolvedOptions.sourceRoot.replaceAll(resolvedOptions.projectRoot, "");
|
|
460
460
|
const typeOutDir = resolvedOptions.outdir;
|
|
461
461
|
const entryPoint = resolvedOptions.entryPoints[0].replace(sourceRoot, "").replace(/\.ts$/, "");
|
|
462
|
-
const bundlePath =
|
|
462
|
+
const bundlePath = _chunkJTAXCQX6js.joinPaths.call(void 0, resolvedOptions.outdir, entryPoint);
|
|
463
463
|
let dtsPath;
|
|
464
|
-
if (_fs.existsSync.call(void 0,
|
|
465
|
-
dtsPath =
|
|
466
|
-
} else if (_fs.existsSync.call(void 0,
|
|
467
|
-
dtsPath =
|
|
464
|
+
if (_fs.existsSync.call(void 0, _chunkJTAXCQX6js.joinPaths.call(void 0, resolvedOptions.config.workspaceRoot, typeOutDir, `${entryPoint}.d.ts`))) {
|
|
465
|
+
dtsPath = _chunkJTAXCQX6js.joinPaths.call(void 0, resolvedOptions.config.workspaceRoot, typeOutDir, `${entryPoint}.d.ts`);
|
|
466
|
+
} else if (_fs.existsSync.call(void 0, _chunkJTAXCQX6js.joinPaths.call(void 0, resolvedOptions.config.workspaceRoot, typeOutDir, `${entryPoint.replace(/^src\//, "")}.d.ts`))) {
|
|
467
|
+
dtsPath = _chunkJTAXCQX6js.joinPaths.call(void 0, resolvedOptions.config.workspaceRoot, typeOutDir, `${entryPoint.replace(/^src\//, "")}.d.ts`);
|
|
468
468
|
}
|
|
469
469
|
const ext = resolvedOptions.outExtension.dts || resolvedOptions.format === "esm" ? "d.mts" : "d.ts";
|
|
470
470
|
if (process.env.WATCH !== "true" && process.env.DEV !== "true") {
|
|
@@ -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) : _chunkG3AMYMMLjs.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: _chunkG3AMYMMLjs.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
|
+
_chunkZQPK5G4Ujs.writeWarning.call(void 0, `Unused Dependencies: ${JSON.stringify(filteredUnusedDeps)}`);
|
|
623
|
+
_chunkZQPK5G4Ujs.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,13 +714,13 @@ 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 _chunkZQPK5G4Ujs.getConfig.call(void 0, workspaceRoot.dir);
|
|
718
|
+
_chunkZQPK5G4Ujs.writeDebug.call(void 0, " \u2699\uFE0F Resolving build options", config);
|
|
719
|
+
const stopwatch = _chunkZQPK5G4Ujs.getStopwatch.call(void 0, "Build options resolution");
|
|
720
720
|
const projectGraph = await _devkit.createProjectGraphAsync.call(void 0, {
|
|
721
721
|
exitOnError: true
|
|
722
722
|
});
|
|
723
|
-
const projectJsonPath =
|
|
723
|
+
const projectJsonPath = _chunkJTAXCQX6js.joinPaths.call(void 0, workspaceRoot.dir, projectRoot, "project.json");
|
|
724
724
|
if (!_fs.existsSync.call(void 0, projectJsonPath)) {
|
|
725
725
|
throw new Error("Cannot find project.json configuration");
|
|
726
726
|
}
|
|
@@ -733,15 +733,15 @@ 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 ??=
|
|
737
|
-
const packageJsonPath =
|
|
736
|
+
options.target ??= _chunkG3AMYMMLjs.DEFAULT_TARGET;
|
|
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");
|
|
740
740
|
}
|
|
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 = _chunkG3AMYMMLjs.getEnv.call(void 0, "esbuild", options);
|
|
745
745
|
const result = {
|
|
746
746
|
...options,
|
|
747
747
|
config,
|
|
@@ -759,20 +759,20 @@ var resolveOptions = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, async
|
|
|
759
759
|
".node"
|
|
760
760
|
],
|
|
761
761
|
...userOptions,
|
|
762
|
-
tsconfig:
|
|
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 _chunkG3AMYMMLjs.getEntryPoints.call(void 0, config, projectRoot, projectJson.sourceRoot, userOptions.entry || [
|
|
765
765
|
"./src/index.ts"
|
|
766
766
|
], userOptions.emitOnAll),
|
|
767
|
-
outdir: userOptions.outputPath ||
|
|
767
|
+
outdir: userOptions.outputPath || _chunkJTAXCQX6js.joinPaths.call(void 0, "dist", projectRoot),
|
|
768
768
|
plugins: [],
|
|
769
769
|
name: userOptions.name || projectName,
|
|
770
770
|
projectConfigurations,
|
|
771
771
|
projectName,
|
|
772
772
|
projectGraph,
|
|
773
|
-
sourceRoot: userOptions.sourceRoot || projectJson.sourceRoot ||
|
|
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 || _chunkZQPK5G4Ujs.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 || _chunkG3AMYMMLjs.DEFAULT_COMPILED_BANNER,
|
|
790
|
+
css: options.banner || _chunkG3AMYMMLjs.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",
|
|
@@ -808,8 +808,8 @@ var resolveOptions = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, async
|
|
|
808
808
|
}, {})
|
|
809
809
|
},
|
|
810
810
|
inject: [
|
|
811
|
-
options.format === "cjs" && options.injectShims ?
|
|
812
|
-
options.format === "esm" && options.injectShims && options.platform === "node" ?
|
|
811
|
+
options.format === "cjs" && options.injectShims ? _chunkJTAXCQX6js.joinPaths.call(void 0, __dirname, "../assets/cjs_shims.js") : "",
|
|
812
|
+
options.format === "esm" && options.injectShims && options.platform === "node" ? _chunkJTAXCQX6js.joinPaths.call(void 0, __dirname, "../assets/esm_shims.js") : "",
|
|
813
813
|
..._nullishCoalesce(options.inject, () => ( []))
|
|
814
814
|
].filter(Boolean)
|
|
815
815
|
};
|
|
@@ -818,23 +818,23 @@ var resolveOptions = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, async
|
|
|
818
818
|
return result;
|
|
819
819
|
}, "resolveOptions");
|
|
820
820
|
async function generatePackageJson(context2) {
|
|
821
|
-
if (context2.options.generatePackageJson !== false && _fs.existsSync.call(void 0,
|
|
822
|
-
|
|
823
|
-
const stopwatch =
|
|
824
|
-
const packageJsonPath =
|
|
821
|
+
if (context2.options.generatePackageJson !== false && _fs.existsSync.call(void 0, _chunkJTAXCQX6js.joinPaths.call(void 0, context2.options.projectRoot, "package.json"))) {
|
|
822
|
+
_chunkZQPK5G4Ujs.writeDebug.call(void 0, " \u270D\uFE0F Writing package.json file", context2.options.config);
|
|
823
|
+
const stopwatch = _chunkZQPK5G4Ujs.getStopwatch.call(void 0, "Write package.json file");
|
|
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");
|
|
827
827
|
}
|
|
828
|
-
const packageJsonFile = await _promises2.default.readFile(
|
|
828
|
+
const packageJsonFile = await _promises2.default.readFile(_chunkJTAXCQX6js.joinPaths.call(void 0, context2.options.config.workspaceRoot, context2.options.projectRoot, "package.json"), "utf8");
|
|
829
829
|
let packageJson = JSON.parse(packageJsonFile);
|
|
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 _chunkG3AMYMMLjs.addPackageDependencies.call(void 0, context2.options.config.workspaceRoot, context2.options.projectRoot, context2.options.projectName, packageJson);
|
|
834
|
+
packageJson = await _chunkG3AMYMMLjs.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["."] ??= _chunkG3AMYMMLjs.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}`] ??= _chunkG3AMYMMLjs.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";
|
|
@@ -864,7 +864,7 @@ async function generatePackageJson(context2) {
|
|
|
864
864
|
}
|
|
865
865
|
return ret;
|
|
866
866
|
}, packageJson.exports);
|
|
867
|
-
await _devkit.writeJsonFile.call(void 0,
|
|
867
|
+
await _devkit.writeJsonFile.call(void 0, _chunkJTAXCQX6js.joinPaths.call(void 0, context2.options.outdir, "package.json"), packageJson);
|
|
868
868
|
stopwatch();
|
|
869
869
|
}
|
|
870
870
|
return context2;
|
|
@@ -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
|
+
_chunkZQPK5G4Ujs.writeDebug.call(void 0, ` \u{1F680} Running ${context2.options.name} build`, context2.options.config);
|
|
894
|
+
const stopwatch = _chunkZQPK5G4Ujs.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
|
+
_chunkZQPK5G4Ujs.writeDebug.call(void 0, ` \u{1F4CB} Copying asset files to output directory: ${context2.options.outdir}`, context2.options.config);
|
|
911
|
+
const stopwatch = _chunkZQPK5G4Ujs.getStopwatch.call(void 0, `${context2.options.name} asset copy`);
|
|
912
|
+
await _chunkG3AMYMMLjs.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
|
+
_chunkZQPK5G4Ujs.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
|
+
_chunkZQPK5G4Ujs.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
|
+
_chunkZQPK5G4Ujs.writeDebug.call(void 0, ` \u{1F9F9} Cleaning ${context2.options.name} output path: ${context2.options.outdir}`, context2.options.config);
|
|
960
|
+
const stopwatch = _chunkZQPK5G4Ujs.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
|
+
_chunkZQPK5G4Ujs.writeDebug.call(void 0, ` \u26A1 Executing Storm ESBuild pipeline`);
|
|
969
|
+
const stopwatch = _chunkZQPK5G4Ujs.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
|
+
_chunkZQPK5G4Ujs.writeSuccess.call(void 0, " \u{1F3C1} ESBuild pipeline build completed successfully");
|
|
980
980
|
} catch (error) {
|
|
981
|
-
|
|
981
|
+
_chunkZQPK5G4Ujs.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
|
+
_chunkZQPK5G4Ujs.writeError.call(void 0, rebuildResult.message);
|
|
1010
1010
|
}
|
|
1011
|
-
|
|
1011
|
+
_chunkZQPK5G4Ujs.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
|
+
_chunkZQPK5G4Ujs.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 = _chunkAY5HELLNjs.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) => {
|
|
@@ -1,12 +1,12 @@
|
|
|
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 _chunkAY5HELLNjs = require('./chunk-AY5HELLN.js');
|
|
4
4
|
|
|
5
5
|
|
|
6
|
-
var
|
|
6
|
+
var _chunkZQPK5G4Ujs = require('./chunk-ZQPK5G4U.js');
|
|
7
7
|
|
|
8
8
|
|
|
9
|
-
var
|
|
9
|
+
var _chunkJTAXCQX6js = require('./chunk-JTAXCQX6.js');
|
|
10
10
|
|
|
11
11
|
|
|
12
12
|
var _chunk3GQAWCBQjs = require('./chunk-3GQAWCBQ.js');
|
|
@@ -15,7 +15,7 @@ var _chunk3GQAWCBQjs = require('./chunk-3GQAWCBQ.js');
|
|
|
15
15
|
var _defu = require('defu');
|
|
16
16
|
var _jiti = require('jiti');
|
|
17
17
|
async function unbuildExecutorFn(options, context, config) {
|
|
18
|
-
|
|
18
|
+
_chunkZQPK5G4Ujs.writeInfo.call(void 0, "\u{1F4E6} Running Storm Unbuild executor on the workspace", config);
|
|
19
19
|
if (!_optionalChain([context, 'access', _ => _.projectsConfigurations, 'optionalAccess', _2 => _2.projects]) || !context.projectName || !context.projectsConfigurations.projects[context.projectName]) {
|
|
20
20
|
throw new Error("The Build process failed because the context is not valid. Please run this command from a workspace root directory.");
|
|
21
21
|
}
|
|
@@ -26,7 +26,7 @@ async function unbuildExecutorFn(options, context, config) {
|
|
|
26
26
|
throw new Error("The Build process failed because the project's source root is not valid. Please run this command from a workspace root directory.");
|
|
27
27
|
}
|
|
28
28
|
const jiti = _jiti.createJiti.call(void 0, config.workspaceRoot, {
|
|
29
|
-
fsCache: config.skipCache ? false :
|
|
29
|
+
fsCache: config.skipCache ? false : _chunkJTAXCQX6js.joinPaths.call(void 0, config.workspaceRoot, config.directories.cache || "node_modules/.cache/storm", "jiti"),
|
|
30
30
|
interopDefault: true
|
|
31
31
|
});
|
|
32
32
|
const stormUnbuild = await jiti.import(jiti.esmResolve("@storm-software/unbuild/build"));
|
|
@@ -39,7 +39,7 @@ async function unbuildExecutorFn(options, context, config) {
|
|
|
39
39
|
}, {
|
|
40
40
|
stubOptions: {
|
|
41
41
|
jiti: {
|
|
42
|
-
fsCache: config.skipCache ? false :
|
|
42
|
+
fsCache: config.skipCache ? false : _chunkJTAXCQX6js.joinPaths.call(void 0, config.workspaceRoot, config.directories.cache || "node_modules/.cache/storm", "jiti")
|
|
43
43
|
}
|
|
44
44
|
},
|
|
45
45
|
rollup: {
|
|
@@ -63,7 +63,7 @@ async function unbuildExecutorFn(options, context, config) {
|
|
|
63
63
|
};
|
|
64
64
|
}
|
|
65
65
|
_chunk3GQAWCBQjs.__name.call(void 0, unbuildExecutorFn, "unbuildExecutorFn");
|
|
66
|
-
var executor_default =
|
|
66
|
+
var executor_default = _chunkAY5HELLNjs.withRunExecutor.call(void 0, "TypeScript Unbuild build", unbuildExecutorFn, {
|
|
67
67
|
skipReadingConfig: false,
|
|
68
68
|
hooks: {
|
|
69
69
|
applyDefaultOptions: /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, async (options, config) => {
|
|
@@ -8,10 +8,10 @@ import {
|
|
|
8
8
|
getEntryPoints,
|
|
9
9
|
getEnv,
|
|
10
10
|
getOutExtension
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-BBRVJL4A.mjs";
|
|
12
12
|
import {
|
|
13
13
|
withRunExecutor
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-AQLXZBXJ.mjs";
|
|
15
15
|
import {
|
|
16
16
|
getConfig,
|
|
17
17
|
getStopwatch,
|
|
@@ -23,10 +23,10 @@ import {
|
|
|
23
23
|
writeSuccess,
|
|
24
24
|
writeTrace,
|
|
25
25
|
writeWarning
|
|
26
|
-
} from "./chunk-
|
|
26
|
+
} from "./chunk-2AKLJNKO.mjs";
|
|
27
27
|
import {
|
|
28
28
|
joinPaths
|
|
29
|
-
} from "./chunk-
|
|
29
|
+
} from "./chunk-NCFX2MWO.mjs";
|
|
30
30
|
import {
|
|
31
31
|
__dirname,
|
|
32
32
|
__name,
|
|
@@ -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(); } } 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 _chunk6V5GP3U4js = require('./chunk-6V5GP3U4.js');
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
|
|
7
|
-
var
|
|
7
|
+
var _chunkJTAXCQX6js = require('./chunk-JTAXCQX6.js');
|
|
8
8
|
|
|
9
9
|
|
|
10
10
|
var _chunk3GQAWCBQjs = require('./chunk-3GQAWCBQ.js');
|
|
@@ -244,9 +244,9 @@ var getDefaultConfig = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, asyn
|
|
|
244
244
|
let name = void 0;
|
|
245
245
|
let namespace = void 0;
|
|
246
246
|
let repository = void 0;
|
|
247
|
-
const workspaceRoot =
|
|
247
|
+
const workspaceRoot = _chunk6V5GP3U4js.findWorkspaceRoot.call(void 0, root);
|
|
248
248
|
if (_fs.existsSync.call(void 0, _path.join.call(void 0, workspaceRoot, "package.json"))) {
|
|
249
|
-
const file = await _promises.readFile.call(void 0,
|
|
249
|
+
const file = await _promises.readFile.call(void 0, _chunkJTAXCQX6js.joinPaths.call(void 0, workspaceRoot, "package.json"), "utf8");
|
|
250
250
|
if (file) {
|
|
251
251
|
const packageJson = JSON.parse(file);
|
|
252
252
|
if (packageJson.name) {
|
|
@@ -511,7 +511,7 @@ var _defu = require('defu'); var _defu2 = _interopRequireDefault(_defu);
|
|
|
511
511
|
var _c12 = require('c12');
|
|
512
512
|
|
|
513
513
|
var getConfigFileByName = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, async (fileName, filePath, options = {}) => {
|
|
514
|
-
const workspacePath = filePath ||
|
|
514
|
+
const workspacePath = filePath || _chunk6V5GP3U4js.findWorkspaceRoot.call(void 0, filePath);
|
|
515
515
|
const configs = await Promise.all([
|
|
516
516
|
_c12.loadConfig.call(void 0, {
|
|
517
517
|
cwd: workspacePath,
|
|
@@ -520,7 +520,7 @@ var getConfigFileByName = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, a
|
|
|
520
520
|
envName: _optionalChain([fileName, 'optionalAccess', _26 => _26.toUpperCase, 'call', _27 => _27()]),
|
|
521
521
|
jitiOptions: {
|
|
522
522
|
debug: false,
|
|
523
|
-
fsCache: process.env.STORM_SKIP_CACHE === "true" ? false :
|
|
523
|
+
fsCache: process.env.STORM_SKIP_CACHE === "true" ? false : _chunkJTAXCQX6js.joinPaths.call(void 0, process.env.STORM_CACHE_DIR || "node_modules/.cache/storm", "jiti")
|
|
524
524
|
},
|
|
525
525
|
...options
|
|
526
526
|
}),
|
|
@@ -531,7 +531,7 @@ var getConfigFileByName = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, a
|
|
|
531
531
|
envName: _optionalChain([fileName, 'optionalAccess', _28 => _28.toUpperCase, 'call', _29 => _29()]),
|
|
532
532
|
jitiOptions: {
|
|
533
533
|
debug: false,
|
|
534
|
-
fsCache: process.env.STORM_SKIP_CACHE === "true" ? false :
|
|
534
|
+
fsCache: process.env.STORM_SKIP_CACHE === "true" ? false : _chunkJTAXCQX6js.joinPaths.call(void 0, process.env.STORM_CACHE_DIR || "node_modules/.cache/storm", "jiti")
|
|
535
535
|
},
|
|
536
536
|
configFile: fileName,
|
|
537
537
|
...options
|
|
@@ -540,7 +540,7 @@ var getConfigFileByName = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, a
|
|
|
540
540
|
return _defu2.default.call(void 0, _nullishCoalesce(configs[0], () => ( {})), _nullishCoalesce(configs[1], () => ( {})));
|
|
541
541
|
}, "getConfigFileByName");
|
|
542
542
|
var getConfigFile = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, async (filePath, additionalFileNames = []) => {
|
|
543
|
-
const workspacePath = filePath ? filePath :
|
|
543
|
+
const workspacePath = filePath ? filePath : _chunk6V5GP3U4js.findWorkspaceRoot.call(void 0, filePath);
|
|
544
544
|
const result = await getConfigFileByName("storm", workspacePath);
|
|
545
545
|
let config = result.config;
|
|
546
546
|
const configFile = result.configFile;
|
|
@@ -597,15 +597,15 @@ var getConfigEnv = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, () => {
|
|
|
597
597
|
licensing: process.env[`${prefix}LICENSING`] || void 0,
|
|
598
598
|
timezone: process.env[`${prefix}TIMEZONE`] || process.env.TZ || void 0,
|
|
599
599
|
locale: process.env[`${prefix}LOCALE`] || process.env.LOCALE || void 0,
|
|
600
|
-
configFile: process.env[`${prefix}CONFIG_FILE`] ?
|
|
601
|
-
workspaceRoot: process.env[`${prefix}WORKSPACE_ROOT`] ?
|
|
600
|
+
configFile: process.env[`${prefix}CONFIG_FILE`] ? _chunkJTAXCQX6js.correctPaths.call(void 0, process.env[`${prefix}CONFIG_FILE`]) : void 0,
|
|
601
|
+
workspaceRoot: process.env[`${prefix}WORKSPACE_ROOT`] ? _chunkJTAXCQX6js.correctPaths.call(void 0, process.env[`${prefix}WORKSPACE_ROOT`]) : void 0,
|
|
602
602
|
directories: {
|
|
603
|
-
cache: process.env[`${prefix}CACHE_DIR`] ?
|
|
604
|
-
data: process.env[`${prefix}DATA_DIR`] ?
|
|
605
|
-
config: process.env[`${prefix}CONFIG_DIR`] ?
|
|
606
|
-
temp: process.env[`${prefix}TEMP_DIR`] ?
|
|
607
|
-
log: process.env[`${prefix}LOG_DIR`] ?
|
|
608
|
-
build: process.env[`${prefix}BUILD_DIR`] ?
|
|
603
|
+
cache: process.env[`${prefix}CACHE_DIR`] ? _chunkJTAXCQX6js.correctPaths.call(void 0, process.env[`${prefix}CACHE_DIR`]) : void 0,
|
|
604
|
+
data: process.env[`${prefix}DATA_DIR`] ? _chunkJTAXCQX6js.correctPaths.call(void 0, process.env[`${prefix}DATA_DIR`]) : void 0,
|
|
605
|
+
config: process.env[`${prefix}CONFIG_DIR`] ? _chunkJTAXCQX6js.correctPaths.call(void 0, process.env[`${prefix}CONFIG_DIR`]) : void 0,
|
|
606
|
+
temp: process.env[`${prefix}TEMP_DIR`] ? _chunkJTAXCQX6js.correctPaths.call(void 0, process.env[`${prefix}TEMP_DIR`]) : void 0,
|
|
607
|
+
log: process.env[`${prefix}LOG_DIR`] ? _chunkJTAXCQX6js.correctPaths.call(void 0, process.env[`${prefix}LOG_DIR`]) : void 0,
|
|
608
|
+
build: process.env[`${prefix}BUILD_DIR`] ? _chunkJTAXCQX6js.correctPaths.call(void 0, process.env[`${prefix}BUILD_DIR`]) : void 0
|
|
609
609
|
},
|
|
610
610
|
skipCache: process.env[`${prefix}SKIP_CACHE`] !== void 0 ? Boolean(process.env[`${prefix}SKIP_CACHE`]) : void 0,
|
|
611
611
|
env: (_nullishCoalesce(_nullishCoalesce(process.env[`${prefix}ENV`], () => ( process.env.NODE_ENV)), () => ( process.env.ENVIRONMENT))) || void 0,
|
|
@@ -782,31 +782,31 @@ var setConfigEnv = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, (config)
|
|
|
782
782
|
process.env.LANG = config.locale ? `${config.locale.replaceAll("-", "_")}.UTF-8` : "en_US.UTF-8";
|
|
783
783
|
}
|
|
784
784
|
if (config.configFile) {
|
|
785
|
-
process.env[`${prefix}CONFIG_FILE`] =
|
|
785
|
+
process.env[`${prefix}CONFIG_FILE`] = _chunkJTAXCQX6js.correctPaths.call(void 0, config.configFile);
|
|
786
786
|
}
|
|
787
787
|
if (config.workspaceRoot) {
|
|
788
|
-
process.env[`${prefix}WORKSPACE_ROOT`] =
|
|
789
|
-
process.env.NX_WORKSPACE_ROOT =
|
|
790
|
-
process.env.NX_WORKSPACE_ROOT_PATH =
|
|
788
|
+
process.env[`${prefix}WORKSPACE_ROOT`] = _chunkJTAXCQX6js.correctPaths.call(void 0, config.workspaceRoot);
|
|
789
|
+
process.env.NX_WORKSPACE_ROOT = _chunkJTAXCQX6js.correctPaths.call(void 0, config.workspaceRoot);
|
|
790
|
+
process.env.NX_WORKSPACE_ROOT_PATH = _chunkJTAXCQX6js.correctPaths.call(void 0, config.workspaceRoot);
|
|
791
791
|
}
|
|
792
792
|
if (config.directories) {
|
|
793
793
|
if (!config.skipCache && config.directories.cache) {
|
|
794
|
-
process.env[`${prefix}CACHE_DIR`] =
|
|
794
|
+
process.env[`${prefix}CACHE_DIR`] = _chunkJTAXCQX6js.correctPaths.call(void 0, config.directories.cache);
|
|
795
795
|
}
|
|
796
796
|
if (config.directories.data) {
|
|
797
|
-
process.env[`${prefix}DATA_DIR`] =
|
|
797
|
+
process.env[`${prefix}DATA_DIR`] = _chunkJTAXCQX6js.correctPaths.call(void 0, config.directories.data);
|
|
798
798
|
}
|
|
799
799
|
if (config.directories.config) {
|
|
800
|
-
process.env[`${prefix}CONFIG_DIR`] =
|
|
800
|
+
process.env[`${prefix}CONFIG_DIR`] = _chunkJTAXCQX6js.correctPaths.call(void 0, config.directories.config);
|
|
801
801
|
}
|
|
802
802
|
if (config.directories.temp) {
|
|
803
|
-
process.env[`${prefix}TEMP_DIR`] =
|
|
803
|
+
process.env[`${prefix}TEMP_DIR`] = _chunkJTAXCQX6js.correctPaths.call(void 0, config.directories.temp);
|
|
804
804
|
}
|
|
805
805
|
if (config.directories.log) {
|
|
806
|
-
process.env[`${prefix}LOG_DIR`] =
|
|
806
|
+
process.env[`${prefix}LOG_DIR`] = _chunkJTAXCQX6js.correctPaths.call(void 0, config.directories.log);
|
|
807
807
|
}
|
|
808
808
|
if (config.directories.build) {
|
|
809
|
-
process.env[`${prefix}BUILD_DIR`] =
|
|
809
|
+
process.env[`${prefix}BUILD_DIR`] = _chunkJTAXCQX6js.correctPaths.call(void 0, config.directories.build);
|
|
810
810
|
}
|
|
811
811
|
}
|
|
812
812
|
if (config.skipCache !== void 0) {
|
|
@@ -974,7 +974,7 @@ var createStormConfig = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, asy
|
|
|
974
974
|
if (!_optionalChain([_static_cache, 'optionalAccess', _54 => _54.data]) || !_optionalChain([_static_cache, 'optionalAccess', _55 => _55.timestamp]) || _static_cache.timestamp < Date.now() - 8e3) {
|
|
975
975
|
let _workspaceRoot = workspaceRoot;
|
|
976
976
|
if (!_workspaceRoot) {
|
|
977
|
-
_workspaceRoot =
|
|
977
|
+
_workspaceRoot = _chunk6V5GP3U4js.findWorkspaceRoot.call(void 0, );
|
|
978
978
|
}
|
|
979
979
|
const configEnv = getConfigEnv();
|
|
980
980
|
const defaultConfig = await getDefaultConfig(_workspaceRoot);
|