@storm-software/workspace-tools 1.266.4 → 1.266.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +7 -0
- package/README.md +1 -1
- package/dist/{chunk-EXQMY7WD.mjs → chunk-335UGATU.mjs} +2 -2
- package/dist/{chunk-LBWGCRH2.mjs → chunk-4U2EPXAU.mjs} +1 -1
- package/dist/{chunk-TCG7CFMK.js → chunk-5F2CURZV.js} +2 -2
- package/dist/{chunk-24FSFLEJ.mjs → chunk-5HQ2CJGY.mjs} +2 -2
- package/dist/{chunk-MHTKV6DY.mjs → chunk-63HRVALY.mjs} +1 -1
- package/dist/{chunk-N5N2BZHB.mjs → chunk-6FPBRF77.mjs} +14 -9
- package/dist/{chunk-OFA5UEOD.js → chunk-7NGXSGS5.js} +5 -5
- package/dist/{chunk-TEHJDKUJ.mjs → chunk-7Z2ULC65.mjs} +1 -1
- package/dist/{chunk-56NOEAUZ.mjs → chunk-AUSTHLXU.mjs} +1 -1
- package/dist/{chunk-XFBY2IVQ.js → chunk-BJ6UNKNM.js} +9 -9
- package/dist/{chunk-POI2YR4E.js → chunk-BMKYESA4.js} +11 -11
- package/dist/{chunk-IOYD4LKE.mjs → chunk-CI6WHE7R.mjs} +2 -2
- package/dist/{chunk-3FIZEIEU.mjs → chunk-DCDL5X62.mjs} +1 -1
- package/dist/{chunk-HAUXJ6F2.mjs → chunk-DPAEB5AE.mjs} +1 -1
- package/dist/{chunk-BAJ3JRJC.js → chunk-EDK24SJW.js} +20 -20
- package/dist/{chunk-KE7BLB2Y.mjs → chunk-EDTGMFRL.mjs} +2 -2
- package/dist/{chunk-NY3AXYUD.js → chunk-F2MPINGT.js} +2 -2
- package/dist/{chunk-UQTVXA7T.mjs → chunk-HTDWHJOR.mjs} +1 -1
- package/dist/{chunk-CXXOP7P6.js → chunk-HYRQEEMO.js} +2 -2
- package/dist/{chunk-6YRWQ3TB.mjs → chunk-I5EWTUBR.mjs} +1 -1
- package/dist/{chunk-BP5OIRQR.js → chunk-LQRTSQDP.js} +5 -5
- package/dist/{chunk-W2AFUJ7A.js → chunk-MKHDCU77.js} +211 -48
- package/dist/{chunk-SN7IJGEE.js → chunk-MP2P2MGP.js} +14 -9
- package/dist/{chunk-CSGLVAIK.js → chunk-N2ASVLIK.js} +2 -2
- package/dist/{chunk-JOA2AXGF.js → chunk-NCV26VAW.js} +15 -15
- package/dist/{chunk-OCJK2N3G.js → chunk-PTJZKLHO.js} +2 -2
- package/dist/{chunk-5UUINVQE.mjs → chunk-R3GMLI4Z.mjs} +1 -1
- package/dist/{chunk-LKNIQZ3B.mjs → chunk-RLOOI5TH.mjs} +175 -12
- package/dist/{chunk-CGGBNNFN.mjs → chunk-SDDKJY7U.mjs} +1 -1
- package/dist/{chunk-ZV2PR5R3.mjs → chunk-SWHFMF2Z.mjs} +1 -1
- package/dist/{chunk-HVOODRL3.js → chunk-TPWVZZWY.js} +2 -2
- package/dist/{chunk-JADXJLCF.js → chunk-UWVKS62B.js} +4 -4
- package/dist/{chunk-7F4BVKX3.js → chunk-YT3ECNTF.js} +2 -2
- package/dist/{chunk-AKADBPPT.js → chunk-YXMSMPZL.js} +2 -2
- package/dist/{chunk-PYR5LR3M.js → chunk-Z255YQZR.js} +2 -2
- package/dist/{chunk-KLY4F7KE.mjs → chunk-ZQESJHZL.mjs} +1 -1
- package/dist/{executor-CsTGaThv.d.mts → executor-B64kh1oi.d.mts} +1 -1
- package/dist/{executor-Xwofymys.d.mts → executor-BB2ETtRv.d.mts} +1 -1
- package/dist/{executor-2Oxd-ew3.d.ts → executor-BoDeD560.d.ts} +1 -1
- package/dist/{executor-BvnlpAbd.d.ts → executor-DGI7S1K6.d.ts} +1 -1
- package/dist/{executor-CLYItx2J.d.ts → executor-DJnjBsHi.d.ts} +1 -1
- package/dist/{executor-DpaKJJUo.d.mts → executor-DQYta-Bm.d.mts} +1 -1
- package/dist/{executor-BD4gkr4O.d.ts → executor-DweIL90b.d.ts} +1 -1
- package/dist/{executor-FYb5cygt.d.mts → executor-iAEPRwdw.d.mts} +1 -1
- package/dist/executors.d.mts +5 -5
- package/dist/executors.d.ts +5 -5
- package/dist/executors.js +14 -14
- package/dist/executors.mjs +17 -17
- package/dist/{generator-BXJFXwbk.d.ts → generator-BHwTuGoc.d.ts} +2 -2
- package/dist/{generator-CLFmsVdh.d.ts → generator-Bjo526Ot.d.ts} +1 -1
- package/dist/{generator-gUQuyamW.d.mts → generator-BqKMXZ9U.d.mts} +2 -2
- package/dist/{generator-D3Kl6o6G.d.mts → generator-DK9vOp3f.d.mts} +2 -2
- package/dist/{generator-BPz6wkk9.d.mts → generator-DMoR2v0k.d.mts} +2 -2
- package/dist/{generator-BMY6LGPc.d.ts → generator-DRa-qwNt.d.ts} +1 -1
- package/dist/{generator-Bw4on8nq.d.mts → generator-Dgh8EO8f.d.mts} +2 -2
- package/dist/{generator-D7pW3Ag7.d.mts → generator-Di06Xw7z.d.mts} +1 -1
- package/dist/{generator-DPRJ4mde.d.ts → generator-DkZ7aOcA.d.ts} +2 -2
- package/dist/{generator-D4IATDWn.d.ts → generator-PTy4kTc1.d.ts} +2 -2
- package/dist/{generator-UekCwik8.d.mts → generator-iNjBgmgt.d.mts} +1 -1
- package/dist/{generator-EapPsEII.d.ts → generator-qr528Z40.d.ts} +2 -2
- package/dist/generators.d.mts +8 -8
- package/dist/generators.d.ts +8 -8
- package/dist/generators.js +9 -9
- package/dist/generators.mjs +8 -8
- package/dist/index.d.mts +12 -12
- package/dist/index.d.ts +12 -12
- package/dist/index.js +21 -21
- 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 +3 -3
- package/dist/src/base/base-executor.mjs +2 -2
- package/dist/src/base/base-generator.d.mts +2 -2
- package/dist/src/base/base-generator.d.ts +2 -2
- package/dist/src/base/base-generator.js +3 -3
- package/dist/src/base/base-generator.mjs +2 -2
- package/dist/src/base/index.d.mts +2 -2
- package/dist/src/base/index.d.ts +2 -2
- package/dist/src/base/index.js +4 -4
- package/dist/src/base/index.mjs +3 -3
- package/dist/src/executors/cargo-build/executor.js +4 -4
- package/dist/src/executors/cargo-build/executor.mjs +3 -3
- package/dist/src/executors/cargo-check/executor.js +4 -4
- package/dist/src/executors/cargo-check/executor.mjs +3 -3
- package/dist/src/executors/cargo-clippy/executor.js +4 -4
- package/dist/src/executors/cargo-clippy/executor.mjs +3 -3
- package/dist/src/executors/cargo-doc/executor.js +4 -4
- package/dist/src/executors/cargo-doc/executor.mjs +3 -3
- package/dist/src/executors/cargo-format/executor.js +4 -4
- package/dist/src/executors/cargo-format/executor.mjs +3 -3
- package/dist/src/executors/clean-package/executor.d.mts +1 -1
- package/dist/src/executors/clean-package/executor.d.ts +1 -1
- package/dist/src/executors/clean-package/executor.js +5 -5
- package/dist/src/executors/clean-package/executor.mjs +2 -2
- package/dist/src/executors/esbuild/executor.d.mts +2 -2
- package/dist/src/executors/esbuild/executor.d.ts +2 -2
- package/dist/src/executors/esbuild/executor.js +4 -4
- package/dist/src/executors/esbuild/executor.mjs +3 -3
- package/dist/src/executors/size-limit/executor.d.mts +2 -2
- package/dist/src/executors/size-limit/executor.d.ts +2 -2
- package/dist/src/executors/size-limit/executor.js +4 -4
- package/dist/src/executors/size-limit/executor.mjs +3 -3
- package/dist/src/executors/typia/executor.d.mts +2 -2
- package/dist/src/executors/typia/executor.d.ts +2 -2
- package/dist/src/executors/typia/executor.js +4 -4
- package/dist/src/executors/typia/executor.mjs +3 -3
- package/dist/src/executors/unbuild/executor.d.mts +2 -2
- package/dist/src/executors/unbuild/executor.d.ts +2 -2
- package/dist/src/executors/unbuild/executor.js +4 -4
- package/dist/src/executors/unbuild/executor.mjs +3 -3
- package/dist/src/generators/browser-library/generator.d.mts +3 -3
- package/dist/src/generators/browser-library/generator.d.ts +3 -3
- package/dist/src/generators/browser-library/generator.js +4 -4
- package/dist/src/generators/browser-library/generator.mjs +3 -3
- package/dist/src/generators/config-schema/generator.d.mts +3 -3
- package/dist/src/generators/config-schema/generator.d.ts +3 -3
- package/dist/src/generators/config-schema/generator.js +4 -4
- package/dist/src/generators/config-schema/generator.mjs +3 -3
- package/dist/src/generators/neutral-library/generator.d.mts +3 -3
- package/dist/src/generators/neutral-library/generator.d.ts +3 -3
- package/dist/src/generators/neutral-library/generator.js +4 -4
- package/dist/src/generators/neutral-library/generator.mjs +3 -3
- package/dist/src/generators/node-library/generator.d.mts +3 -3
- package/dist/src/generators/node-library/generator.d.ts +3 -3
- package/dist/src/generators/node-library/generator.js +4 -4
- package/dist/src/generators/node-library/generator.mjs +3 -3
- package/dist/src/generators/preset/generator.d.mts +3 -3
- package/dist/src/generators/preset/generator.d.ts +3 -3
- package/dist/src/generators/preset/generator.js +4 -4
- package/dist/src/generators/preset/generator.mjs +3 -3
- package/dist/src/generators/release-version/generator.d.mts +2 -2
- package/dist/src/generators/release-version/generator.d.ts +2 -2
- package/dist/src/generators/release-version/generator.js +3 -3
- package/dist/src/generators/release-version/generator.mjs +2 -2
- package/dist/src/types.d.mts +2 -2
- package/dist/src/types.d.ts +2 -2
- package/dist/src/utils/apply-workspace-tokens.d.mts +1 -1
- package/dist/src/utils/apply-workspace-tokens.d.ts +1 -1
- package/dist/src/utils/index.d.mts +2 -2
- package/dist/src/utils/index.d.ts +2 -2
- package/dist/src/utils/project-tags.d.mts +2 -2
- package/dist/src/utils/project-tags.d.ts +2 -2
- package/dist/{types-CUnUfpKk.d.ts → types-DrIOVAV9.d.ts} +1 -1
- package/dist/{types-dNjhGseA.d.mts → types-J0DsoZaH.d.mts} +1 -1
- package/dist/{types-C3URiht7.d.ts → types-TCjBSz49.d.mts} +2 -2
- package/dist/{types-C3URiht7.d.mts → types-TCjBSz49.d.ts} +2 -2
- package/package.json +1 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { newObj[key] = obj[key]; } } } newObj.default = obj; return newObj; } } function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } 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; }
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { newObj[key] = obj[key]; } } } newObj.default = obj; return newObj; } } function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } 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; } var _class;
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var _chunkEDK24SJWjs = require('./chunk-EDK24SJW.js');
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
|
|
@@ -13,7 +13,7 @@ var _chunkBAJ3JRJCjs = require('./chunk-BAJ3JRJC.js');
|
|
|
13
13
|
|
|
14
14
|
|
|
15
15
|
|
|
16
|
-
var
|
|
16
|
+
var _chunkMP2P2MGPjs = require('./chunk-MP2P2MGP.js');
|
|
17
17
|
|
|
18
18
|
|
|
19
19
|
var _chunk4JOIS7WWjs = require('./chunk-4JOIS7WW.js');
|
|
@@ -83,7 +83,7 @@ var copyAssets = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, async (con
|
|
|
83
83
|
output: "src/"
|
|
84
84
|
});
|
|
85
85
|
}
|
|
86
|
-
|
|
86
|
+
_chunkMP2P2MGPjs.writeTrace.call(void 0, `\u{1F4DD} Copying the following assets to the output directory:
|
|
87
87
|
${pendingAssets.map((pendingAsset) => typeof pendingAsset === "string" ? ` - ${pendingAsset} -> ${outputPath}` : ` - ${pendingAsset.input}/${pendingAsset.glob} -> ${_chunkJTAXCQX6js.joinPaths.call(void 0, outputPath, pendingAsset.output)}`).join("\n")}`, config);
|
|
88
88
|
const assetHandler = new (0, _copyassetshandler.CopyAssetsHandler)({
|
|
89
89
|
projectDir: projectRoot,
|
|
@@ -93,7 +93,7 @@ ${pendingAssets.map((pendingAsset) => typeof pendingAsset === "string" ? ` - ${p
|
|
|
93
93
|
});
|
|
94
94
|
await assetHandler.processAllAssetsOnce();
|
|
95
95
|
if (includeSrc === true) {
|
|
96
|
-
|
|
96
|
+
_chunkMP2P2MGPjs.writeDebug.call(void 0, `\u{1F4DD} Adding banner and writing source files: ${_chunkJTAXCQX6js.joinPaths.call(void 0, outputPath, "src")}`, config);
|
|
97
97
|
const files = await _glob.glob.call(void 0, [
|
|
98
98
|
_chunkJTAXCQX6js.joinPaths.call(void 0, config.workspaceRoot, outputPath, "src/**/*.ts"),
|
|
99
99
|
_chunkJTAXCQX6js.joinPaths.call(void 0, config.workspaceRoot, outputPath, "src/**/*.tsx"),
|
|
@@ -132,7 +132,7 @@ var addPackageDependencies = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0
|
|
|
132
132
|
}
|
|
133
133
|
}
|
|
134
134
|
if (localPackages.length > 0) {
|
|
135
|
-
|
|
135
|
+
_chunkMP2P2MGPjs.writeTrace.call(void 0, `\u{1F4E6} Adding local packages to package.json: ${localPackages.map((p) => p.name).join(", ")}`);
|
|
136
136
|
const projectJsonFile = await _promises.readFile.call(void 0, _chunkJTAXCQX6js.joinPaths.call(void 0, projectRoot, "project.json"), "utf8");
|
|
137
137
|
const projectJson = JSON.parse(projectJsonFile);
|
|
138
138
|
const projectName2 = projectJson.name;
|
|
@@ -166,7 +166,7 @@ var addPackageDependencies = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0
|
|
|
166
166
|
return ret;
|
|
167
167
|
}, _nullishCoalesce(packageJson.devDependencies, () => ( {})));
|
|
168
168
|
} else {
|
|
169
|
-
|
|
169
|
+
_chunkMP2P2MGPjs.writeTrace.call(void 0, "\u{1F4E6} No local packages dependencies to add to package.json");
|
|
170
170
|
}
|
|
171
171
|
return packageJson;
|
|
172
172
|
}, "addPackageDependencies");
|
|
@@ -536,7 +536,7 @@ var onErrorPlugin = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, (option
|
|
|
536
536
|
setup(build4) {
|
|
537
537
|
build4.onEnd((result) => {
|
|
538
538
|
if (result.errors.length > 0 && process.env.WATCH !== "true") {
|
|
539
|
-
|
|
539
|
+
_chunkMP2P2MGPjs.writeError.call(void 0, `The following errors occurred during the build:
|
|
540
540
|
${result.errors.map((error) => error.text).join("\n")}
|
|
541
541
|
|
|
542
542
|
`, resolvedOptions.config);
|
|
@@ -645,7 +645,7 @@ function bundleTypeDefinitions(filename, outfile, externals, options) {
|
|
|
645
645
|
localBuild: true
|
|
646
646
|
});
|
|
647
647
|
if (extractorResult.succeeded === false) {
|
|
648
|
-
|
|
648
|
+
_chunkMP2P2MGPjs.writeError.call(void 0, `API Extractor completed with ${extractorResult.errorCount} ${extractorResult.errorCount === 1 ? "error" : "errors"}`);
|
|
649
649
|
throw new Error("API Extractor completed with errors");
|
|
650
650
|
}
|
|
651
651
|
}
|
|
@@ -653,7 +653,7 @@ _chunk3GQAWCBQjs.__name.call(void 0, bundleTypeDefinitions, "bundleTypeDefinitio
|
|
|
653
653
|
var tscPlugin = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, (options, resolvedOptions) => ({
|
|
654
654
|
name: "storm:tsc",
|
|
655
655
|
setup(build4) {
|
|
656
|
-
if (options.
|
|
656
|
+
if (options.dts === false) {
|
|
657
657
|
return;
|
|
658
658
|
}
|
|
659
659
|
build4.onStart(async () => {
|
|
@@ -705,7 +705,7 @@ var getDefaultBuildPlugins = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0
|
|
|
705
705
|
var DEFAULT_BUILD_OPTIONS = {
|
|
706
706
|
platform: "node",
|
|
707
707
|
target: "node22",
|
|
708
|
-
format: "
|
|
708
|
+
format: "esm",
|
|
709
709
|
external: [],
|
|
710
710
|
logLevel: "error",
|
|
711
711
|
tsconfig: "tsconfig.json",
|
|
@@ -833,8 +833,8 @@ var depsCheckPlugin = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, (bund
|
|
|
833
833
|
const filteredMissingDeps = missingDependencies.filter((dep) => {
|
|
834
834
|
return !missingIgnore.some((pattern) => dep.match(pattern)) && !peerDependencies.includes(dep);
|
|
835
835
|
});
|
|
836
|
-
|
|
837
|
-
|
|
836
|
+
_chunkMP2P2MGPjs.writeWarning.call(void 0, `Unused Dependencies: ${JSON.stringify(filteredUnusedDeps)}`);
|
|
837
|
+
_chunkMP2P2MGPjs.writeError.call(void 0, `Missing Dependencies: ${JSON.stringify(filteredMissingDeps)}`);
|
|
838
838
|
if (filteredMissingDeps.length > 0) {
|
|
839
839
|
throw new Error(`Missing dependencies detected - please install them:
|
|
840
840
|
${JSON.stringify(filteredMissingDeps)}
|
|
@@ -854,6 +854,155 @@ var shebangRenderer = {
|
|
|
854
854
|
}
|
|
855
855
|
};
|
|
856
856
|
|
|
857
|
+
// ../esbuild/src/tsc.ts
|
|
858
|
+
var _bundlerequire = require('bundle-require');
|
|
859
|
+
|
|
860
|
+
|
|
861
|
+
|
|
862
|
+
var _typescript = require('typescript'); var _typescript2 = _interopRequireDefault(_typescript);
|
|
863
|
+
function ensureTempDeclarationDir(workspaceConfig) {
|
|
864
|
+
const root = workspaceConfig.directories.temp || _path.join.call(void 0, workspaceConfig.workspaceRoot, "tmp");
|
|
865
|
+
const dirPath = _path.join.call(void 0, root, ".tsc", "declaration");
|
|
866
|
+
if (_fs.existsSync.call(void 0, dirPath)) {
|
|
867
|
+
return dirPath;
|
|
868
|
+
}
|
|
869
|
+
_fs.mkdirSync.call(void 0, dirPath, {
|
|
870
|
+
recursive: true
|
|
871
|
+
});
|
|
872
|
+
const gitIgnorePath = _path.join.call(void 0, root, ".tsc", ".gitignore");
|
|
873
|
+
_fs.writeFileSync.call(void 0, gitIgnorePath, "**/*\n");
|
|
874
|
+
return dirPath;
|
|
875
|
+
}
|
|
876
|
+
_chunk3GQAWCBQjs.__name.call(void 0, ensureTempDeclarationDir, "ensureTempDeclarationDir");
|
|
877
|
+
function slash(path6) {
|
|
878
|
+
const isExtendedLengthPath = path6.startsWith("\\\\?\\");
|
|
879
|
+
if (isExtendedLengthPath) {
|
|
880
|
+
return path6;
|
|
881
|
+
}
|
|
882
|
+
return path6.replace(/\\/g, "/");
|
|
883
|
+
}
|
|
884
|
+
_chunk3GQAWCBQjs.__name.call(void 0, slash, "slash");
|
|
885
|
+
function toAbsolutePath(workspaceConfig, p, cwd) {
|
|
886
|
+
if (_path.isAbsolute.call(void 0, p)) {
|
|
887
|
+
return p;
|
|
888
|
+
}
|
|
889
|
+
return slash(_path.normalize.call(void 0, _path.join.call(void 0, cwd || workspaceConfig.workspaceRoot, p)));
|
|
890
|
+
}
|
|
891
|
+
_chunk3GQAWCBQjs.__name.call(void 0, toAbsolutePath, "toAbsolutePath");
|
|
892
|
+
var AliasPool = (_class = class AliasPool2 {constructor() { _class.prototype.__init.call(this); }
|
|
893
|
+
static {
|
|
894
|
+
_chunk3GQAWCBQjs.__name.call(void 0, this, "AliasPool");
|
|
895
|
+
}
|
|
896
|
+
__init() {this.seen = /* @__PURE__ */ new Set()}
|
|
897
|
+
assign(name) {
|
|
898
|
+
let suffix = 0;
|
|
899
|
+
let alias = name === "default" ? "default_alias" : name;
|
|
900
|
+
while (this.seen.has(alias)) {
|
|
901
|
+
alias = `${name}_alias_${++suffix}`;
|
|
902
|
+
if (suffix >= 1e3) {
|
|
903
|
+
throw new Error("Alias generation exceeded limit. Possible infinite loop detected.");
|
|
904
|
+
}
|
|
905
|
+
}
|
|
906
|
+
this.seen.add(alias);
|
|
907
|
+
return alias;
|
|
908
|
+
}
|
|
909
|
+
}, _class);
|
|
910
|
+
function getExports(workspaceConfig, program, fileMapping) {
|
|
911
|
+
const checker = program.getTypeChecker();
|
|
912
|
+
const aliasPool = new AliasPool();
|
|
913
|
+
const assignAlias = aliasPool.assign.bind(aliasPool);
|
|
914
|
+
function extractExports(sourceFileName) {
|
|
915
|
+
const cwd = program.getCurrentDirectory();
|
|
916
|
+
sourceFileName = toAbsolutePath(workspaceConfig, sourceFileName, cwd);
|
|
917
|
+
const sourceFile = program.getSourceFile(sourceFileName);
|
|
918
|
+
if (!sourceFile) {
|
|
919
|
+
return [];
|
|
920
|
+
}
|
|
921
|
+
const destFileName = fileMapping.get(sourceFileName);
|
|
922
|
+
if (!destFileName) {
|
|
923
|
+
return [];
|
|
924
|
+
}
|
|
925
|
+
const moduleSymbol = checker.getSymbolAtLocation(sourceFile);
|
|
926
|
+
if (!moduleSymbol) {
|
|
927
|
+
return [];
|
|
928
|
+
}
|
|
929
|
+
const exports = [];
|
|
930
|
+
const exportSymbols = checker.getExportsOfModule(moduleSymbol);
|
|
931
|
+
exportSymbols.forEach((symbol) => {
|
|
932
|
+
const name = symbol.getName();
|
|
933
|
+
exports.push({
|
|
934
|
+
kind: "named",
|
|
935
|
+
sourceFileName,
|
|
936
|
+
destFileName,
|
|
937
|
+
name,
|
|
938
|
+
alias: assignAlias(name),
|
|
939
|
+
isTypeOnly: false
|
|
940
|
+
});
|
|
941
|
+
});
|
|
942
|
+
return exports;
|
|
943
|
+
}
|
|
944
|
+
_chunk3GQAWCBQjs.__name.call(void 0, extractExports, "extractExports");
|
|
945
|
+
return program.getRootFileNames().flatMap(extractExports);
|
|
946
|
+
}
|
|
947
|
+
_chunk3GQAWCBQjs.__name.call(void 0, getExports, "getExports");
|
|
948
|
+
function emitDtsFiles(workspaceConfig, program, host, emitOnlyDtsFiles = true, customTransformers) {
|
|
949
|
+
const fileMapping = /* @__PURE__ */ new Map();
|
|
950
|
+
const writeFile2 = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, (fileName, text, writeByteOrderMark, onError, sourceFiles, data) => {
|
|
951
|
+
const sourceFile = _optionalChain([sourceFiles, 'optionalAccess', _46 => _46[0]]);
|
|
952
|
+
const sourceFileName = _optionalChain([sourceFile, 'optionalAccess', _47 => _47.fileName]);
|
|
953
|
+
if (sourceFileName && !fileName.endsWith(".map")) {
|
|
954
|
+
const cwd = program.getCurrentDirectory();
|
|
955
|
+
fileMapping.set(toAbsolutePath(workspaceConfig, sourceFileName, cwd), toAbsolutePath(workspaceConfig, fileName, cwd));
|
|
956
|
+
}
|
|
957
|
+
return host.writeFile(fileName, text, writeByteOrderMark, onError, sourceFiles, data);
|
|
958
|
+
}, "writeFile");
|
|
959
|
+
const emitResult = program.emit(void 0, writeFile2, void 0, emitOnlyDtsFiles, customTransformers);
|
|
960
|
+
const diagnostics = _typescript2.default.getPreEmitDiagnostics(program).concat(emitResult.diagnostics);
|
|
961
|
+
const diagnosticMessages = [];
|
|
962
|
+
diagnostics.forEach((diagnostic) => {
|
|
963
|
+
if (diagnostic.file) {
|
|
964
|
+
const { line, character } = _typescript2.default.getLineAndCharacterOfPosition(diagnostic.file, diagnostic.start);
|
|
965
|
+
const message = _typescript2.default.flattenDiagnosticMessageText(diagnostic.messageText, "\n");
|
|
966
|
+
diagnosticMessages.push(`${diagnostic.file.fileName} (${line + 1},${character + 1}): ${message}`);
|
|
967
|
+
} else {
|
|
968
|
+
const message = _typescript2.default.flattenDiagnosticMessageText(diagnostic.messageText, "\n");
|
|
969
|
+
diagnosticMessages.push(message);
|
|
970
|
+
}
|
|
971
|
+
});
|
|
972
|
+
const diagnosticMessage = diagnosticMessages.join("\n");
|
|
973
|
+
if (diagnosticMessage) {
|
|
974
|
+
_chunkMP2P2MGPjs.writeError.call(void 0, `Failed to emit declaration files.
|
|
975
|
+
|
|
976
|
+
${diagnosticMessage}`, workspaceConfig);
|
|
977
|
+
throw new Error("TypeScript compilation failed");
|
|
978
|
+
}
|
|
979
|
+
return fileMapping;
|
|
980
|
+
}
|
|
981
|
+
_chunk3GQAWCBQjs.__name.call(void 0, emitDtsFiles, "emitDtsFiles");
|
|
982
|
+
function emitDts(workspaceConfig, tsconfig, tsconfigRaw, emitOnlyDtsFiles = true, customTransformers) {
|
|
983
|
+
const rawTsconfig = _bundlerequire.loadTsConfig.call(void 0, workspaceConfig.workspaceRoot, tsconfig);
|
|
984
|
+
if (!rawTsconfig) {
|
|
985
|
+
throw new Error(`Unable to find ${tsconfig || "tsconfig.json"} in ${workspaceConfig.workspaceRoot}`);
|
|
986
|
+
}
|
|
987
|
+
const declarationDir = ensureTempDeclarationDir(workspaceConfig);
|
|
988
|
+
const parsedTsconfig = _typescript2.default.parseJsonConfigFileContent(_defu2.default.call(void 0, {
|
|
989
|
+
compilerOptions: {
|
|
990
|
+
// Enable declaration emit and disable javascript emit
|
|
991
|
+
noEmit: false,
|
|
992
|
+
declaration: true,
|
|
993
|
+
declarationMap: true,
|
|
994
|
+
declarationDir,
|
|
995
|
+
emitDeclarationOnly: true
|
|
996
|
+
}
|
|
997
|
+
}, _nullishCoalesce(_optionalChain([tsconfigRaw, 'optionalAccess', _48 => _48.compilerOptions]), () => ( {})), _nullishCoalesce(rawTsconfig.data, () => ( {}))), _typescript2.default.sys, tsconfig ? _path.dirname.call(void 0, tsconfig) : "./");
|
|
998
|
+
const options = parsedTsconfig.options;
|
|
999
|
+
const host = _typescript2.default.createCompilerHost(options);
|
|
1000
|
+
const program = _typescript2.default.createProgram(parsedTsconfig.fileNames, options, host);
|
|
1001
|
+
const fileMapping = emitDtsFiles(workspaceConfig, program, host, emitOnlyDtsFiles, customTransformers);
|
|
1002
|
+
return getExports(workspaceConfig, program, fileMapping);
|
|
1003
|
+
}
|
|
1004
|
+
_chunk3GQAWCBQjs.__name.call(void 0, emitDts, "emitDts");
|
|
1005
|
+
|
|
857
1006
|
// ../esbuild/src/utilities/get-entry-points.ts
|
|
858
1007
|
|
|
859
1008
|
var getEntryPoints = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, async (config, projectRoot, sourceRoot, entry, emitOnAll = false) => {
|
|
@@ -904,7 +1053,7 @@ var getEntryPoints = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, async
|
|
|
904
1053
|
paths.push(...files.reduce((ret, filePath) => {
|
|
905
1054
|
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), ""));
|
|
906
1055
|
if (result) {
|
|
907
|
-
|
|
1056
|
+
_chunkMP2P2MGPjs.writeDebug.call(void 0, `Trying to add entry point ${result} at "${_chunkJTAXCQX6js.joinPaths.call(void 0, filePath.path, filePath.name)}"`, config);
|
|
908
1057
|
if (!paths.some((p) => p.in === result)) {
|
|
909
1058
|
paths.push({
|
|
910
1059
|
in: result,
|
|
@@ -915,7 +1064,7 @@ var getEntryPoints = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, async
|
|
|
915
1064
|
return ret;
|
|
916
1065
|
}, []));
|
|
917
1066
|
} else {
|
|
918
|
-
|
|
1067
|
+
_chunkMP2P2MGPjs.writeDebug.call(void 0, `Adding ESBuild entry point
|
|
919
1068
|
- Input: ${entryPoint.in}
|
|
920
1069
|
- Output: ${entryPoint.out}`, config);
|
|
921
1070
|
if (!paths.some((p) => p.out === entryPoint.out)) {
|
|
@@ -982,7 +1131,7 @@ function pipeSync(fn, ...fns) {
|
|
|
982
1131
|
return (...args) => {
|
|
983
1132
|
let result = fn(...args);
|
|
984
1133
|
for (let i = 0; result !== skip && i < fns.length; ++i) {
|
|
985
|
-
result = _optionalChain([fns, 'access',
|
|
1134
|
+
result = _optionalChain([fns, 'access', _49 => _49[i], 'optionalCall', _50 => _50(result)]);
|
|
986
1135
|
}
|
|
987
1136
|
return result;
|
|
988
1137
|
};
|
|
@@ -992,7 +1141,7 @@ function pipeAsync(fn, ...fns) {
|
|
|
992
1141
|
return async (...args) => {
|
|
993
1142
|
let result = await fn(...args);
|
|
994
1143
|
for (let i = 0; result !== skip && i < fns.length; ++i) {
|
|
995
|
-
result = await _optionalChain([fns, 'access',
|
|
1144
|
+
result = await _optionalChain([fns, 'access', _51 => _51[i], 'optionalCall', _52 => _52(result)]);
|
|
996
1145
|
}
|
|
997
1146
|
return result;
|
|
998
1147
|
};
|
|
@@ -1008,9 +1157,9 @@ var resolveOptions = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, async
|
|
|
1008
1157
|
if (!workspaceRoot) {
|
|
1009
1158
|
throw new Error("Cannot find Nx workspace root");
|
|
1010
1159
|
}
|
|
1011
|
-
const config = await
|
|
1012
|
-
|
|
1013
|
-
const stopwatch =
|
|
1160
|
+
const config = await _chunkMP2P2MGPjs.getConfig.call(void 0, workspaceRoot.dir);
|
|
1161
|
+
_chunkMP2P2MGPjs.writeDebug.call(void 0, " \u2699\uFE0F Resolving build options", config);
|
|
1162
|
+
const stopwatch = _chunkMP2P2MGPjs.getStopwatch.call(void 0, "Build options resolution");
|
|
1014
1163
|
const projectGraph = await _devkit.createProjectGraphAsync.call(void 0, {
|
|
1015
1164
|
exitOnError: true
|
|
1016
1165
|
});
|
|
@@ -1022,7 +1171,7 @@ var resolveOptions = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, async
|
|
|
1022
1171
|
const projectJson = JSON.parse(projectJsonFile);
|
|
1023
1172
|
const projectName = projectJson.name;
|
|
1024
1173
|
const projectConfigurations = _devkit.readProjectsConfigurationFromProjectGraph.call(void 0, projectGraph);
|
|
1025
|
-
if (!_optionalChain([projectConfigurations, 'optionalAccess',
|
|
1174
|
+
if (!_optionalChain([projectConfigurations, 'optionalAccess', _53 => _53.projects, 'optionalAccess', _54 => _54[projectName]])) {
|
|
1026
1175
|
throw new Error("The Build process failed because the project does not have a valid configuration in the project.json file. Check if the file exists in the root of the project.");
|
|
1027
1176
|
}
|
|
1028
1177
|
const options = _defu2.default.call(void 0, userOptions, DEFAULT_BUILD_OPTIONS);
|
|
@@ -1057,7 +1206,7 @@ var resolveOptions = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, async
|
|
|
1057
1206
|
projectGraph,
|
|
1058
1207
|
sourceRoot: userOptions.sourceRoot || projectJson.sourceRoot || _chunkJTAXCQX6js.joinPaths.call(void 0, projectRoot, "src"),
|
|
1059
1208
|
minify: userOptions.minify || !userOptions.debug,
|
|
1060
|
-
verbose: userOptions.verbose ||
|
|
1209
|
+
verbose: userOptions.verbose || _chunkMP2P2MGPjs.isVerbose.call(void 0, ) || userOptions.debug === true,
|
|
1061
1210
|
includeSrc: userOptions.includeSrc === true,
|
|
1062
1211
|
metafile: userOptions.metafile !== false,
|
|
1063
1212
|
generatePackageJson: userOptions.generatePackageJson !== false,
|
|
@@ -1112,8 +1261,8 @@ var resolveOptions = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, async
|
|
|
1112
1261
|
}, "resolveOptions");
|
|
1113
1262
|
async function generatePackageJson(context2) {
|
|
1114
1263
|
if (context2.options.generatePackageJson !== false && _fs.existsSync.call(void 0, _chunkJTAXCQX6js.joinPaths.call(void 0, context2.options.projectRoot, "package.json"))) {
|
|
1115
|
-
|
|
1116
|
-
const stopwatch =
|
|
1264
|
+
_chunkMP2P2MGPjs.writeDebug.call(void 0, " \u270D\uFE0F Writing package.json file", context2.options.config);
|
|
1265
|
+
const stopwatch = _chunkMP2P2MGPjs.getStopwatch.call(void 0, "Write package.json file");
|
|
1117
1266
|
const packageJsonPath = _chunkJTAXCQX6js.joinPaths.call(void 0, context2.options.projectRoot, "project.json");
|
|
1118
1267
|
if (!_fs.existsSync.call(void 0, packageJsonPath)) {
|
|
1119
1268
|
throw new Error("Cannot find package.json configuration");
|
|
@@ -1172,8 +1321,8 @@ async function generateContext(getOptions) {
|
|
|
1172
1321
|
}
|
|
1173
1322
|
_chunk3GQAWCBQjs.__name.call(void 0, generateContext, "generateContext");
|
|
1174
1323
|
async function executeEsBuild(context2) {
|
|
1175
|
-
|
|
1176
|
-
const stopwatch =
|
|
1324
|
+
_chunkMP2P2MGPjs.writeDebug.call(void 0, ` \u{1F680} Running ${context2.options.name} build`, context2.options.config);
|
|
1325
|
+
const stopwatch = _chunkMP2P2MGPjs.getStopwatch.call(void 0, `${context2.options.name} build`);
|
|
1177
1326
|
if (process.env.STORM_WATCH) {
|
|
1178
1327
|
const ctx = await esbuild2.context(context2.options);
|
|
1179
1328
|
watch(ctx, context2.options);
|
|
@@ -1186,6 +1335,7 @@ async function executeEsBuild(context2) {
|
|
|
1186
1335
|
options.inject === {}) {
|
|
1187
1336
|
delete options.inject;
|
|
1188
1337
|
}
|
|
1338
|
+
delete options.dts;
|
|
1189
1339
|
delete options.env;
|
|
1190
1340
|
delete options.name;
|
|
1191
1341
|
delete options.assets;
|
|
@@ -1206,8 +1356,8 @@ async function executeEsBuild(context2) {
|
|
|
1206
1356
|
delete options.config;
|
|
1207
1357
|
delete options.injectShims;
|
|
1208
1358
|
delete options.external;
|
|
1209
|
-
|
|
1210
|
-
${
|
|
1359
|
+
_chunkMP2P2MGPjs.writeTrace.call(void 0, `Run esbuild (${context2.options.name}) with the following options:
|
|
1360
|
+
${_chunkMP2P2MGPjs.formatLogMessage.call(void 0, {
|
|
1211
1361
|
...options,
|
|
1212
1362
|
define: "<Hidden>"
|
|
1213
1363
|
})}`, context2.options.config);
|
|
@@ -1221,10 +1371,20 @@ ${_chunkSN7IJGEEjs.formatLogMessage.call(void 0, {
|
|
|
1221
1371
|
return context2;
|
|
1222
1372
|
}
|
|
1223
1373
|
_chunk3GQAWCBQjs.__name.call(void 0, executeEsBuild, "executeEsBuild");
|
|
1374
|
+
async function executeTypescript(context2) {
|
|
1375
|
+
if (_optionalChain([context2, 'access', _55 => _55.result, 'optionalAccess', _56 => _56.errors, 'access', _57 => _57.length]) === 0 && context2.options.dts) {
|
|
1376
|
+
_chunkMP2P2MGPjs.writeDebug.call(void 0, ` \u{1F4CB} Running TypeScript Compiler for ${context2.options.name}`, context2.options.config);
|
|
1377
|
+
const stopwatch = _chunkMP2P2MGPjs.getStopwatch.call(void 0, `${context2.options.name} asset copy`);
|
|
1378
|
+
await emitDts(context2.options.config, context2.options.tsconfig, context2.options.tsconfigRaw, true);
|
|
1379
|
+
stopwatch();
|
|
1380
|
+
}
|
|
1381
|
+
return context2;
|
|
1382
|
+
}
|
|
1383
|
+
_chunk3GQAWCBQjs.__name.call(void 0, executeTypescript, "executeTypescript");
|
|
1224
1384
|
async function copyBuildAssets(context2) {
|
|
1225
|
-
if (_optionalChain([context2, 'access',
|
|
1226
|
-
|
|
1227
|
-
const stopwatch =
|
|
1385
|
+
if (_optionalChain([context2, 'access', _58 => _58.result, 'optionalAccess', _59 => _59.errors, 'access', _60 => _60.length]) === 0) {
|
|
1386
|
+
_chunkMP2P2MGPjs.writeDebug.call(void 0, ` \u{1F4CB} Copying asset files to output directory: ${context2.options.outdir}`, context2.options.config);
|
|
1387
|
+
const stopwatch = _chunkMP2P2MGPjs.getStopwatch.call(void 0, `${context2.options.name} asset copy`);
|
|
1228
1388
|
await copyAssets(context2.options.config, _nullishCoalesce(context2.options.assets, () => ( [])), context2.options.outdir, context2.options.projectRoot, context2.options.sourceRoot, true, false);
|
|
1229
1389
|
stopwatch();
|
|
1230
1390
|
}
|
|
@@ -1232,11 +1392,14 @@ async function copyBuildAssets(context2) {
|
|
|
1232
1392
|
}
|
|
1233
1393
|
_chunk3GQAWCBQjs.__name.call(void 0, copyBuildAssets, "copyBuildAssets");
|
|
1234
1394
|
async function reportResults(context2) {
|
|
1235
|
-
if (_optionalChain([context2, 'access',
|
|
1395
|
+
if (_optionalChain([context2, 'access', _61 => _61.result, 'optionalAccess', _62 => _62.errors, 'access', _63 => _63.length]) === 0) {
|
|
1236
1396
|
if (context2.result.warnings.length > 0) {
|
|
1237
|
-
|
|
1397
|
+
_chunkMP2P2MGPjs.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);
|
|
1238
1398
|
}
|
|
1239
|
-
|
|
1399
|
+
_chunkMP2P2MGPjs.writeSuccess.call(void 0, ` \u{1F4E6} The ${context2.options.name} build completed successfully`, context2.options.config);
|
|
1400
|
+
} else if (_optionalChain([context2, 'access', _64 => _64.result, 'optionalAccess', _65 => _65.errors]) && _optionalChain([context2, 'access', _66 => _66.result, 'optionalAccess', _67 => _67.errors, 'access', _68 => _68.length]) > 0) {
|
|
1401
|
+
_chunkMP2P2MGPjs.writeError.call(void 0, ` \u274C The ${context2.options.name} build failed with the following errors: ${context2.result.errors.map((error) => error.text).join("\n")}`, context2.options.config);
|
|
1402
|
+
throw new Error(`The ${context2.options.name} build failed with the following errors: ${context2.result.errors.map((error) => error.text).join("\n")}`);
|
|
1240
1403
|
}
|
|
1241
1404
|
}
|
|
1242
1405
|
_chunk3GQAWCBQjs.__name.call(void 0, reportResults, "reportResults");
|
|
@@ -1272,8 +1435,8 @@ async function dependencyCheck(options) {
|
|
|
1272
1435
|
_chunk3GQAWCBQjs.__name.call(void 0, dependencyCheck, "dependencyCheck");
|
|
1273
1436
|
async function cleanOutputPath(context2) {
|
|
1274
1437
|
if (context2.options.clean !== false && context2.options.outdir) {
|
|
1275
|
-
|
|
1276
|
-
const stopwatch =
|
|
1438
|
+
_chunkMP2P2MGPjs.writeDebug.call(void 0, ` \u{1F9F9} Cleaning ${context2.options.name} output path: ${context2.options.outdir}`, context2.options.config);
|
|
1439
|
+
const stopwatch = _chunkMP2P2MGPjs.getStopwatch.call(void 0, `${context2.options.name} output clean`);
|
|
1277
1440
|
await cleanDirectories(context2.options.name, context2.options.outdir, context2.options.config);
|
|
1278
1441
|
stopwatch();
|
|
1279
1442
|
}
|
|
@@ -1281,8 +1444,8 @@ async function cleanOutputPath(context2) {
|
|
|
1281
1444
|
}
|
|
1282
1445
|
_chunk3GQAWCBQjs.__name.call(void 0, cleanOutputPath, "cleanOutputPath");
|
|
1283
1446
|
async function build3(options) {
|
|
1284
|
-
|
|
1285
|
-
const stopwatch =
|
|
1447
|
+
_chunkMP2P2MGPjs.writeDebug.call(void 0, ` \u26A1 Executing Storm ESBuild pipeline`);
|
|
1448
|
+
const stopwatch = _chunkMP2P2MGPjs.getStopwatch.call(void 0, "ESBuild pipeline");
|
|
1286
1449
|
try {
|
|
1287
1450
|
const opts = Array.isArray(options) ? options : [
|
|
1288
1451
|
options
|
|
@@ -1291,10 +1454,10 @@ async function build3(options) {
|
|
|
1291
1454
|
throw new Error("No build options were provided");
|
|
1292
1455
|
}
|
|
1293
1456
|
void transduce.async(opts, dependencyCheck);
|
|
1294
|
-
await transduce.async(await createOptions(opts), pipe.async(generateContext, cleanOutputPath, generatePackageJson, executeEsBuild, copyBuildAssets, reportResults));
|
|
1295
|
-
|
|
1457
|
+
await transduce.async(await createOptions(opts), pipe.async(generateContext, cleanOutputPath, generatePackageJson, executeTypescript, executeEsBuild, copyBuildAssets, reportResults));
|
|
1458
|
+
_chunkMP2P2MGPjs.writeSuccess.call(void 0, " \u{1F3C1} ESBuild pipeline build completed successfully");
|
|
1296
1459
|
} catch (error) {
|
|
1297
|
-
|
|
1460
|
+
_chunkMP2P2MGPjs.writeFatal.call(void 0, "Fatal errors that the build process could not recover from have occured. The build process has been terminated.");
|
|
1298
1461
|
throw error;
|
|
1299
1462
|
} finally {
|
|
1300
1463
|
stopwatch();
|
|
@@ -1322,9 +1485,9 @@ var watch = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, (context2, opti
|
|
|
1322
1485
|
return context2.rebuild();
|
|
1323
1486
|
});
|
|
1324
1487
|
if (rebuildResult instanceof Error) {
|
|
1325
|
-
|
|
1488
|
+
_chunkMP2P2MGPjs.writeError.call(void 0, rebuildResult.message);
|
|
1326
1489
|
}
|
|
1327
|
-
|
|
1490
|
+
_chunkMP2P2MGPjs.writeTrace.call(void 0, `${Date.now() - timeBefore}ms [${_nullishCoalesce(options.name, () => ( ""))}]`);
|
|
1328
1491
|
}, 10);
|
|
1329
1492
|
changeWatcher.on("change", fastRebuild);
|
|
1330
1493
|
return void 0;
|
|
@@ -1332,15 +1495,15 @@ var watch = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, (context2, opti
|
|
|
1332
1495
|
|
|
1333
1496
|
// src/executors/esbuild/executor.ts
|
|
1334
1497
|
async function esbuildExecutorFn(options, context2, config) {
|
|
1335
|
-
|
|
1336
|
-
if (!_optionalChain([context2, 'access',
|
|
1498
|
+
_chunkMP2P2MGPjs.writeInfo.call(void 0, "\u{1F4E6} Running Storm ESBuild executor on the workspace", config);
|
|
1499
|
+
if (!_optionalChain([context2, 'access', _69 => _69.projectsConfigurations, 'optionalAccess', _70 => _70.projects]) || !context2.projectName || !context2.projectsConfigurations.projects[context2.projectName] || !_optionalChain([context2, 'access', _71 => _71.projectsConfigurations, 'access', _72 => _72.projects, 'access', _73 => _73[context2.projectName], 'optionalAccess', _74 => _74.root])) {
|
|
1337
1500
|
throw new Error("The Build process failed because the context is not valid. Please run this command from a workspace.");
|
|
1338
1501
|
}
|
|
1339
1502
|
await build3({
|
|
1340
1503
|
...options,
|
|
1341
|
-
projectRoot: _optionalChain([context2, 'access',
|
|
1504
|
+
projectRoot: _optionalChain([context2, 'access', _75 => _75.projectsConfigurations, 'access', _76 => _76.projects, 'optionalAccess', _77 => _77[context2.projectName], 'access', _78 => _78.root]),
|
|
1342
1505
|
projectName: context2.projectName,
|
|
1343
|
-
sourceRoot: _optionalChain([context2, 'access',
|
|
1506
|
+
sourceRoot: _optionalChain([context2, 'access', _79 => _79.projectsConfigurations, 'access', _80 => _80.projects, 'optionalAccess', _81 => _81[context2.projectName], 'optionalAccess', _82 => _82.sourceRoot]),
|
|
1344
1507
|
format: options.format,
|
|
1345
1508
|
platform: options.format
|
|
1346
1509
|
});
|
|
@@ -1349,7 +1512,7 @@ async function esbuildExecutorFn(options, context2, config) {
|
|
|
1349
1512
|
};
|
|
1350
1513
|
}
|
|
1351
1514
|
_chunk3GQAWCBQjs.__name.call(void 0, esbuildExecutorFn, "esbuildExecutorFn");
|
|
1352
|
-
var executor_default =
|
|
1515
|
+
var executor_default = _chunkEDK24SJWjs.withRunExecutor.call(void 0, "Storm ESBuild build", esbuildExecutorFn, {
|
|
1353
1516
|
skipReadingConfig: false,
|
|
1354
1517
|
hooks: {
|
|
1355
1518
|
applyDefaultOptions: /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, async (options, config) => {
|
|
@@ -171,7 +171,7 @@ var stormWorkspaceConfigSchema = _zod2.default.object({
|
|
|
171
171
|
"staging",
|
|
172
172
|
"production"
|
|
173
173
|
]).default("production").describe("The current runtime environment mode for the package"),
|
|
174
|
-
workspaceRoot: _zod2.default.string().trim().
|
|
174
|
+
workspaceRoot: _zod2.default.string().trim().describe("The root directory of the workspace"),
|
|
175
175
|
externalPackagePatterns: _zod2.default.array(_zod2.default.string()).default([]).describe("The build will use these package patterns to determine if they should be external to the bundle"),
|
|
176
176
|
skipCache: _zod2.default.boolean().default(false).describe("Should all known types of workspace caching be skipped?"),
|
|
177
177
|
directories: WorkspaceDirectoryConfigSchema,
|
|
@@ -599,7 +599,7 @@ var getConfigFile = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, async (
|
|
|
599
599
|
}
|
|
600
600
|
}
|
|
601
601
|
}
|
|
602
|
-
if (!config) {
|
|
602
|
+
if (!config || Object.keys(config).length === 0) {
|
|
603
603
|
return void 0;
|
|
604
604
|
}
|
|
605
605
|
config.configFile = configFile;
|
|
@@ -1070,7 +1070,7 @@ var setBaseThemeColorConfigEnv = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(vo
|
|
|
1070
1070
|
// ../config-tools/src/create-storm-config.ts
|
|
1071
1071
|
var _extension_cache = /* @__PURE__ */ new WeakMap();
|
|
1072
1072
|
var _static_cache = void 0;
|
|
1073
|
-
var createStormWorkspaceConfig = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, async (extensionName, schema, workspaceRoot, skipLogs = false) => {
|
|
1073
|
+
var createStormWorkspaceConfig = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, async (extensionName, schema, workspaceRoot, skipLogs = false, useDefault = true) => {
|
|
1074
1074
|
let result;
|
|
1075
1075
|
if (!_optionalChain([_static_cache, 'optionalAccess', _54 => _54.data]) || !_optionalChain([_static_cache, 'optionalAccess', _55 => _55.timestamp]) || _static_cache.timestamp < Date.now() - 8e3) {
|
|
1076
1076
|
let _workspaceRoot = workspaceRoot;
|
|
@@ -1078,13 +1078,18 @@ var createStormWorkspaceConfig = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(vo
|
|
|
1078
1078
|
_workspaceRoot = _chunk4JOIS7WWjs.findWorkspaceRoot.call(void 0, );
|
|
1079
1079
|
}
|
|
1080
1080
|
const configEnv = getConfigEnv();
|
|
1081
|
-
const defaultConfig = await getDefaultConfig(_workspaceRoot);
|
|
1082
1081
|
const configFile = await getConfigFile(_workspaceRoot);
|
|
1083
|
-
if (!configFile
|
|
1084
|
-
|
|
1085
|
-
|
|
1086
|
-
|
|
1082
|
+
if (!configFile) {
|
|
1083
|
+
if (!skipLogs) {
|
|
1084
|
+
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", {
|
|
1085
|
+
logLevel: "all"
|
|
1086
|
+
});
|
|
1087
|
+
}
|
|
1088
|
+
if (useDefault === false) {
|
|
1089
|
+
return void 0;
|
|
1090
|
+
}
|
|
1087
1091
|
}
|
|
1092
|
+
const defaultConfig = await getDefaultConfig(_workspaceRoot);
|
|
1088
1093
|
result = await stormWorkspaceConfigSchema.parseAsync(_defu2.default.call(void 0, configEnv, configFile, defaultConfig));
|
|
1089
1094
|
result.workspaceRoot ??= _workspaceRoot;
|
|
1090
1095
|
} else {
|
|
@@ -1117,7 +1122,7 @@ var createConfigExtension = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0,
|
|
|
1117
1122
|
return extension;
|
|
1118
1123
|
}, "createConfigExtension");
|
|
1119
1124
|
var loadStormWorkspaceConfig = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, async (workspaceRoot, skipLogs = false) => {
|
|
1120
|
-
const config = await createStormWorkspaceConfig(void 0, void 0, workspaceRoot, skipLogs);
|
|
1125
|
+
const config = await createStormWorkspaceConfig(void 0, void 0, workspaceRoot, skipLogs, true);
|
|
1121
1126
|
setConfigEnv(config);
|
|
1122
1127
|
if (!skipLogs && !config.skipConfigLogging) {
|
|
1123
1128
|
writeTrace(`\u2699\uFE0F Using Storm Workspace configuration:
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
var _chunkULBTYC2Bjs = require('./chunk-ULBTYC2B.js');
|
|
5
5
|
|
|
6
6
|
|
|
7
|
-
var
|
|
7
|
+
var _chunkEDK24SJWjs = require('./chunk-EDK24SJW.js');
|
|
8
8
|
|
|
9
9
|
|
|
10
10
|
var _chunk3GQAWCBQjs = require('./chunk-3GQAWCBQ.js');
|
|
@@ -15,7 +15,7 @@ async function cargoCheckExecutor(options, context) {
|
|
|
15
15
|
return await _chunkULBTYC2Bjs.cargoCommand.call(void 0, ...command);
|
|
16
16
|
}
|
|
17
17
|
_chunk3GQAWCBQjs.__name.call(void 0, cargoCheckExecutor, "cargoCheckExecutor");
|
|
18
|
-
var executor_default =
|
|
18
|
+
var executor_default = _chunkEDK24SJWjs.withRunExecutor.call(void 0, "Cargo Check", cargoCheckExecutor, {
|
|
19
19
|
skipReadingConfig: false,
|
|
20
20
|
hooks: {
|
|
21
21
|
applyDefaultOptions: /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, (options) => {
|
|
@@ -11,7 +11,7 @@ var _chunkUALZJZUKjs = require('./chunk-UALZJZUK.js');
|
|
|
11
11
|
|
|
12
12
|
|
|
13
13
|
|
|
14
|
-
var
|
|
14
|
+
var _chunkMP2P2MGPjs = require('./chunk-MP2P2MGP.js');
|
|
15
15
|
|
|
16
16
|
|
|
17
17
|
var _chunk4JOIS7WWjs = require('./chunk-4JOIS7WW.js');
|
|
@@ -23,34 +23,34 @@ var _chunk3GQAWCBQjs = require('./chunk-3GQAWCBQ.js');
|
|
|
23
23
|
var withRunGenerator = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, (name, generatorFn, generatorOptions = {
|
|
24
24
|
skipReadingConfig: false
|
|
25
25
|
}) => async (tree, _options) => {
|
|
26
|
-
const stopwatch =
|
|
26
|
+
const stopwatch = _chunkMP2P2MGPjs.getStopwatch.call(void 0, name);
|
|
27
27
|
let options = _options;
|
|
28
28
|
let config;
|
|
29
29
|
try {
|
|
30
|
-
|
|
30
|
+
_chunkMP2P2MGPjs.writeInfo.call(void 0, `\u26A1 Running the ${name} generator...
|
|
31
31
|
|
|
32
32
|
`, config);
|
|
33
33
|
const workspaceRoot = _chunk4JOIS7WWjs.findWorkspaceRoot.call(void 0, );
|
|
34
34
|
if (!generatorOptions.skipReadingConfig) {
|
|
35
|
-
|
|
35
|
+
_chunkMP2P2MGPjs.writeDebug.call(void 0, `Loading the Storm Config from environment variables and storm.config.js file...
|
|
36
36
|
- workspaceRoot: ${workspaceRoot}`, config);
|
|
37
|
-
config = await
|
|
37
|
+
config = await _chunkMP2P2MGPjs.getConfig.call(void 0, workspaceRoot);
|
|
38
38
|
}
|
|
39
39
|
if (_optionalChain([generatorOptions, 'optionalAccess', _ => _.hooks, 'optionalAccess', _2 => _2.applyDefaultOptions])) {
|
|
40
|
-
|
|
40
|
+
_chunkMP2P2MGPjs.writeDebug.call(void 0, "Running the applyDefaultOptions hook...", config);
|
|
41
41
|
options = await Promise.resolve(generatorOptions.hooks.applyDefaultOptions(options, config));
|
|
42
|
-
|
|
42
|
+
_chunkMP2P2MGPjs.writeDebug.call(void 0, "Completed the applyDefaultOptions hook", config);
|
|
43
43
|
}
|
|
44
|
-
|
|
44
|
+
_chunkMP2P2MGPjs.writeTrace.call(void 0, `Generator schema options \u2699\uFE0F
|
|
45
45
|
${Object.keys(_nullishCoalesce(options, () => ( {}))).map((key) => ` - ${key}=${JSON.stringify(options[key])}`).join("\n")}`, config);
|
|
46
46
|
const tokenized = await _chunkUALZJZUKjs.applyWorkspaceTokens.call(void 0, options, {
|
|
47
47
|
workspaceRoot: tree.root,
|
|
48
48
|
config
|
|
49
49
|
}, _chunkUALZJZUKjs.applyWorkspaceBaseTokens);
|
|
50
50
|
if (_optionalChain([generatorOptions, 'optionalAccess', _3 => _3.hooks, 'optionalAccess', _4 => _4.preProcess])) {
|
|
51
|
-
|
|
51
|
+
_chunkMP2P2MGPjs.writeDebug.call(void 0, "Running the preProcess hook...", config);
|
|
52
52
|
await Promise.resolve(generatorOptions.hooks.preProcess(tokenized, config));
|
|
53
|
-
|
|
53
|
+
_chunkMP2P2MGPjs.writeDebug.call(void 0, "Completed the preProcess hook", config);
|
|
54
54
|
}
|
|
55
55
|
const result = await Promise.resolve(generatorFn(tree, tokenized, config));
|
|
56
56
|
if (result) {
|
|
@@ -63,18 +63,18 @@ ${Object.keys(_nullishCoalesce(options, () => ( {}))).map((key) => ` - ${key}=${
|
|
|
63
63
|
}
|
|
64
64
|
}
|
|
65
65
|
if (_optionalChain([generatorOptions, 'optionalAccess', _14 => _14.hooks, 'optionalAccess', _15 => _15.postProcess])) {
|
|
66
|
-
|
|
66
|
+
_chunkMP2P2MGPjs.writeDebug.call(void 0, "Running the postProcess hook...", config);
|
|
67
67
|
await Promise.resolve(generatorOptions.hooks.postProcess(config));
|
|
68
|
-
|
|
68
|
+
_chunkMP2P2MGPjs.writeDebug.call(void 0, "Completed the postProcess hook", config);
|
|
69
69
|
}
|
|
70
70
|
return () => {
|
|
71
|
-
|
|
71
|
+
_chunkMP2P2MGPjs.writeSuccess.call(void 0, `Completed running the ${name} generator!
|
|
72
72
|
`, config);
|
|
73
73
|
};
|
|
74
74
|
} catch (error) {
|
|
75
75
|
return () => {
|
|
76
|
-
|
|
77
|
-
|
|
76
|
+
_chunkMP2P2MGPjs.writeFatal.call(void 0, "A fatal error occurred while running the generator - the process was forced to terminate", config);
|
|
77
|
+
_chunkMP2P2MGPjs.writeError.call(void 0, `An exception was thrown in the generator's process
|
|
78
78
|
- Details: ${error.message}
|
|
79
79
|
- Stacktrace: ${error.stack}`, config);
|
|
80
80
|
};
|