@storm-software/esbuild 0.31.17 → 0.31.18
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/build.cjs +8 -8
- package/dist/build.js +7 -7
- package/dist/{chunk-CGC754NO.cjs → chunk-27CI4FOR.cjs} +2 -2
- package/dist/{chunk-7O55IAQT.cjs → chunk-4DMUOH4Z.cjs} +14 -0
- package/dist/{chunk-RPASR3EH.cjs → chunk-5OVF7G64.cjs} +3 -3
- package/dist/{chunk-JIM5EHQS.js → chunk-BBZUTQQO.js} +1 -1
- package/dist/{chunk-23BWXS7W.cjs → chunk-BLWAYYW3.cjs} +2 -2
- package/dist/{chunk-GKES5W75.cjs → chunk-CWE2DVRL.cjs} +59 -47
- package/dist/{chunk-FHHDOIZH.cjs → chunk-HGSRUTIH.cjs} +3 -3
- package/dist/{chunk-MBZHX2SL.cjs → chunk-J7UVXBZR.cjs} +38 -38
- package/dist/{chunk-ZI5KMS75.js → chunk-K5P4LJKO.js} +4 -4
- package/dist/{chunk-JZMOPFOH.js → chunk-KDIEZDDV.js} +1 -1
- package/dist/{chunk-DXIR35ET.js → chunk-MQOPCGJB.js} +1 -1
- package/dist/{chunk-WDK7RJAQ.js → chunk-RBERCPFK.js} +1 -1
- package/dist/{chunk-544OYWSQ.js → chunk-VILSJXYM.js} +14 -0
- package/dist/{chunk-LYZEF7N4.js → chunk-XKWAVCXW.js} +17 -5
- package/dist/clean.cjs +3 -3
- package/dist/clean.d.cts +23 -0
- package/dist/clean.d.ts +23 -0
- package/dist/clean.js +2 -2
- package/dist/config.cjs +5 -5
- package/dist/config.js +4 -4
- package/dist/index.cjs +8 -8
- package/dist/index.js +7 -7
- package/dist/plugins/deps-check.cjs +3 -3
- package/dist/plugins/deps-check.js +2 -2
- package/dist/plugins/on-error.cjs +3 -3
- package/dist/plugins/on-error.js +2 -2
- package/dist/plugins/tsc.cjs +3 -3
- package/dist/plugins/tsc.js +2 -2
- package/package.json +9 -9
package/README.md
CHANGED
|
@@ -21,7 +21,7 @@ This package is part of the <b>⚡Storm-Ops</b> monorepo. The Storm-Ops packages
|
|
|
21
21
|
|
|
22
22
|
<h3 align="center">💻 Visit <a href="https://stormsoftware.com" target="_blank">stormsoftware.com</a> to stay up to date with this developer</h3><br />
|
|
23
23
|
|
|
24
|
-
[](https://prettier.io/) [](http://nx.dev/) [](https://nextjs.org/) [](http://commitizen.github.io/cz-cli/)  [](https://fumadocs.vercel.app/) 
|
|
25
25
|
|
|
26
26
|
<!-- prettier-ignore-start -->
|
|
27
27
|
<!-- markdownlint-disable -->
|
package/dist/build.cjs
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
3
|
|
|
4
|
-
var
|
|
5
|
-
require('./chunk-
|
|
6
|
-
require('./chunk-
|
|
4
|
+
var _chunkJ7UVXBZRcjs = require('./chunk-J7UVXBZR.cjs');
|
|
5
|
+
require('./chunk-5OVF7G64.cjs');
|
|
6
|
+
require('./chunk-CWE2DVRL.cjs');
|
|
7
7
|
require('./chunk-S6M44SSZ.cjs');
|
|
8
8
|
require('./chunk-WRBUO7H6.cjs');
|
|
9
|
-
require('./chunk-
|
|
9
|
+
require('./chunk-BLWAYYW3.cjs');
|
|
10
10
|
require('./chunk-SSEYS7LI.cjs');
|
|
11
|
-
require('./chunk-
|
|
12
|
-
require('./chunk-
|
|
13
|
-
require('./chunk-
|
|
11
|
+
require('./chunk-27CI4FOR.cjs');
|
|
12
|
+
require('./chunk-HGSRUTIH.cjs');
|
|
13
|
+
require('./chunk-4DMUOH4Z.cjs');
|
|
14
14
|
require('./chunk-XITTOHOG.cjs');
|
|
15
15
|
require('./chunk-CGFDQ5AJ.cjs');
|
|
16
16
|
require('./chunk-EZGTDCYM.cjs');
|
|
@@ -18,4 +18,4 @@ require('./chunk-BGYQAVKQ.cjs');
|
|
|
18
18
|
|
|
19
19
|
|
|
20
20
|
|
|
21
|
-
exports.build =
|
|
21
|
+
exports.build = _chunkJ7UVXBZRcjs.build; exports.cleanOutputPath = _chunkJ7UVXBZRcjs.cleanOutputPath;
|
package/dist/build.js
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import {
|
|
2
2
|
build,
|
|
3
3
|
cleanOutputPath
|
|
4
|
-
} from "./chunk-
|
|
5
|
-
import "./chunk-
|
|
6
|
-
import "./chunk-
|
|
4
|
+
} from "./chunk-K5P4LJKO.js";
|
|
5
|
+
import "./chunk-MQOPCGJB.js";
|
|
6
|
+
import "./chunk-XKWAVCXW.js";
|
|
7
7
|
import "./chunk-T5272PC2.js";
|
|
8
8
|
import "./chunk-LYDEMC26.js";
|
|
9
|
-
import "./chunk-
|
|
9
|
+
import "./chunk-BBZUTQQO.js";
|
|
10
10
|
import "./chunk-Q3LOGZKI.js";
|
|
11
|
-
import "./chunk-
|
|
12
|
-
import "./chunk-
|
|
13
|
-
import "./chunk-
|
|
11
|
+
import "./chunk-RBERCPFK.js";
|
|
12
|
+
import "./chunk-KDIEZDDV.js";
|
|
13
|
+
import "./chunk-VILSJXYM.js";
|
|
14
14
|
import "./chunk-YMTDVMD6.js";
|
|
15
15
|
import "./chunk-YNQ45EAM.js";
|
|
16
16
|
import "./chunk-GWG4HOQ6.js";
|
|
@@ -1,6 +1,6 @@
|
|
|
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 _chunk4DMUOH4Zcjs = require('./chunk-4DMUOH4Z.cjs');
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
var _chunkXITTOHOGcjs = require('./chunk-XITTOHOG.cjs');
|
|
@@ -85,7 +85,7 @@ function bundleTypeDefinitions(filename, outfile, externals, options) {
|
|
|
85
85
|
localBuild: true
|
|
86
86
|
});
|
|
87
87
|
if (extractorResult.succeeded === false) {
|
|
88
|
-
|
|
88
|
+
_chunk4DMUOH4Zcjs.writeError.call(void 0, `API Extractor completed with ${extractorResult.errorCount} ${extractorResult.errorCount === 1 ? "error" : "errors"}`);
|
|
89
89
|
throw new Error("API Extractor completed with errors");
|
|
90
90
|
}
|
|
91
91
|
}
|
|
@@ -90,6 +90,14 @@ var STORM_DEFAULT_DOCS = "https://docs.stormsoftware.com";
|
|
|
90
90
|
var STORM_DEFAULT_HOMEPAGE = "https://stormsoftware.com";
|
|
91
91
|
var STORM_DEFAULT_LICENSING = "https://license.stormsoftware.com";
|
|
92
92
|
var STORM_DEFAULT_LICENSE = "Apache-2.0";
|
|
93
|
+
var STORM_DEFAULT_RELEASE_BANNER = "https://public.storm-cdn.com/logo-banner.png";
|
|
94
|
+
var STORM_DEFAULT_RELEASE_FOOTER = `
|
|
95
|
+
[Storm Software](https://stormsoftware.com) is an open source software development organization with the mission is to make software development more accessible. Our ideal future is one where anyone can create software without years of prior development experience serving as a barrier to entry. We hope to achieve this via LLMs, Generative AI, and intuitive, high-level data modeling/programming languages.
|
|
96
|
+
|
|
97
|
+
Join us on [Discord](https://discord.gg/MQ6YVzakM5) to chat with the team, receive release notifications, ask questions, and get involved.
|
|
98
|
+
|
|
99
|
+
If this sounds interesting, and you would like to help us in creating the next generation of development tools, please reach out on our [website](https://stormsoftware.com/contact) or join our [Slack](https://join.slack.com/t/storm-software/shared_invite/zt-2gsmk04hs-i6yhK_r6urq0dkZYAwq2pA) channel!
|
|
100
|
+
`;
|
|
93
101
|
|
|
94
102
|
// ../config/src/schema.ts
|
|
95
103
|
var _zod = require('zod'); var _zod2 = _interopRequireDefault(_zod);
|
|
@@ -180,6 +188,11 @@ var WorkspaceBotConfigSchema = _zod2.default.object({
|
|
|
180
188
|
name: _zod2.default.string().trim().default("stormie-bot").describe("The workspace bot user's name (this is the bot that will be used to perform various tasks)"),
|
|
181
189
|
email: _zod2.default.string().trim().email().default("bot@stormsoftware.com").describe("The email of the workspace bot")
|
|
182
190
|
}).describe("The workspace's bot user's config used to automated various operations tasks");
|
|
191
|
+
var WorkspaceReleaseConfigSchema = _zod2.default.object({
|
|
192
|
+
banner: _zod2.default.string().trim().default(STORM_DEFAULT_RELEASE_BANNER).describe("A URL to a banner image used to display the workspace's release"),
|
|
193
|
+
header: _zod2.default.string().trim().optional().describe("A header message appended to the start of the workspace's release notes"),
|
|
194
|
+
footer: _zod2.default.string().trim().default(STORM_DEFAULT_RELEASE_FOOTER).describe("A footer message appended to the end of the workspace's release notes")
|
|
195
|
+
}).describe("The workspace's release config used during the release process");
|
|
183
196
|
var WorkspaceDirectoryConfigSchema = _zod2.default.object({
|
|
184
197
|
cache: _zod2.default.string().trim().optional().describe("The directory used to store the environment's cached file data"),
|
|
185
198
|
data: _zod2.default.string().trim().optional().describe("The directory used to store the environment's data files"),
|
|
@@ -203,6 +216,7 @@ var StormConfigSchema = _zod2.default.object({
|
|
|
203
216
|
preid: _zod2.default.string().optional().describe("A tag specifying the version pre-release identifier"),
|
|
204
217
|
owner: _zod2.default.string().trim().default("@storm-software/admin").describe("The owner of the package"),
|
|
205
218
|
bot: WorkspaceBotConfigSchema,
|
|
219
|
+
release: WorkspaceReleaseConfigSchema,
|
|
206
220
|
mode: _zod2.default.enum([
|
|
207
221
|
"development",
|
|
208
222
|
"staging",
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
3
|
|
|
4
|
-
var
|
|
4
|
+
var _chunk4DMUOH4Zcjs = require('./chunk-4DMUOH4Z.cjs');
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
var _chunkBGYQAVKQcjs = require('./chunk-BGYQAVKQ.cjs');
|
|
@@ -9,8 +9,8 @@ var _chunkBGYQAVKQcjs = require('./chunk-BGYQAVKQ.cjs');
|
|
|
9
9
|
// src/clean.ts
|
|
10
10
|
var _promises = require('fs/promises');
|
|
11
11
|
async function clean(name = "ESBuild", directory, config) {
|
|
12
|
-
|
|
13
|
-
const stopwatch =
|
|
12
|
+
_chunk4DMUOH4Zcjs.writeDebug.call(void 0, ` \u{1F9F9} Cleaning ${name} output path: ${directory}`, config);
|
|
13
|
+
const stopwatch = _chunk4DMUOH4Zcjs.getStopwatch.call(void 0, `${name} output clean`);
|
|
14
14
|
await cleanDirectories(name, directory, config);
|
|
15
15
|
stopwatch();
|
|
16
16
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var _chunk4DMUOH4Zcjs = require('./chunk-4DMUOH4Z.cjs');
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
var _chunkBGYQAVKQcjs = require('./chunk-BGYQAVKQ.cjs');
|
|
@@ -11,7 +11,7 @@ var onErrorPlugin = /* @__PURE__ */ _chunkBGYQAVKQcjs.__name.call(void 0, (optio
|
|
|
11
11
|
setup(build) {
|
|
12
12
|
build.onEnd((result) => {
|
|
13
13
|
if (result.errors.length > 0 && process.env.WATCH !== "true") {
|
|
14
|
-
|
|
14
|
+
_chunk4DMUOH4Zcjs.writeError.call(void 0, `The following errors occurred during the build:
|
|
15
15
|
${result.errors.map((error) => error.text).join("\n")}
|
|
16
16
|
|
|
17
17
|
`, resolvedOptions.config);
|
|
@@ -6,13 +6,13 @@ var _chunkS6M44SSZcjs = require('./chunk-S6M44SSZ.cjs');
|
|
|
6
6
|
var _chunkWRBUO7H6cjs = require('./chunk-WRBUO7H6.cjs');
|
|
7
7
|
|
|
8
8
|
|
|
9
|
-
var
|
|
9
|
+
var _chunkBLWAYYW3cjs = require('./chunk-BLWAYYW3.cjs');
|
|
10
10
|
|
|
11
11
|
|
|
12
12
|
var _chunkSSEYS7LIcjs = require('./chunk-SSEYS7LI.cjs');
|
|
13
13
|
|
|
14
14
|
|
|
15
|
-
var
|
|
15
|
+
var _chunk27CI4FORcjs = require('./chunk-27CI4FOR.cjs');
|
|
16
16
|
|
|
17
17
|
|
|
18
18
|
|
|
@@ -28,7 +28,7 @@ var _chunkCGC754NOcjs = require('./chunk-CGC754NO.cjs');
|
|
|
28
28
|
|
|
29
29
|
|
|
30
30
|
|
|
31
|
-
var
|
|
31
|
+
var _chunk4DMUOH4Zcjs = require('./chunk-4DMUOH4Z.cjs');
|
|
32
32
|
|
|
33
33
|
|
|
34
34
|
|
|
@@ -97,7 +97,7 @@ var copyAssets = /* @__PURE__ */ _chunkBGYQAVKQcjs.__name.call(void 0, async (co
|
|
|
97
97
|
output: "src/"
|
|
98
98
|
});
|
|
99
99
|
}
|
|
100
|
-
|
|
100
|
+
_chunk4DMUOH4Zcjs.writeTrace.call(void 0, `\u{1F4DD} Copying the following assets to the output directory:
|
|
101
101
|
${pendingAssets.map((pendingAsset) => typeof pendingAsset === "string" ? ` - ${pendingAsset} -> ${outputPath}` : ` - ${pendingAsset.input}/${pendingAsset.glob} -> ${_chunkXITTOHOGcjs.joinPaths.call(void 0, outputPath, pendingAsset.output)}`).join("\n")}`, config);
|
|
102
102
|
const assetHandler = new (0, _copyassetshandler.CopyAssetsHandler)({
|
|
103
103
|
projectDir: projectRoot,
|
|
@@ -107,7 +107,7 @@ ${pendingAssets.map((pendingAsset) => typeof pendingAsset === "string" ? ` - ${p
|
|
|
107
107
|
});
|
|
108
108
|
await assetHandler.processAllAssetsOnce();
|
|
109
109
|
if (includeSrc === true) {
|
|
110
|
-
|
|
110
|
+
_chunk4DMUOH4Zcjs.writeDebug.call(void 0, `\u{1F4DD} Adding banner and writing source files: ${_chunkXITTOHOGcjs.joinPaths.call(void 0, outputPath, "src")}`, config);
|
|
111
111
|
const files = await _glob.glob.call(void 0, [
|
|
112
112
|
_chunkXITTOHOGcjs.joinPaths.call(void 0, config.workspaceRoot, outputPath, "src/**/*.ts"),
|
|
113
113
|
_chunkXITTOHOGcjs.joinPaths.call(void 0, config.workspaceRoot, outputPath, "src/**/*.tsx"),
|
|
@@ -132,7 +132,7 @@ var addPackageDependencies = /* @__PURE__ */ _chunkBGYQAVKQcjs.__name.call(void
|
|
|
132
132
|
const projectGraph = _projectgraph.readCachedProjectGraph.call(void 0, );
|
|
133
133
|
const projectDependencies = _buildablelibsutils.calculateProjectBuildableDependencies.call(void 0, void 0, projectGraph, workspaceRoot, projectName, process.env.NX_TASK_TARGET_TARGET || "build", process.env.NX_TASK_TARGET_CONFIGURATION || "production", true);
|
|
134
134
|
const localPackages = [];
|
|
135
|
-
for (const project of projectDependencies.dependencies.filter((dep) => dep.node.type === "lib" && dep.node.data.root !== projectRoot && dep.node.data.root !== workspaceRoot)) {
|
|
135
|
+
for (const project of projectDependencies.dependencies.filter((dep) => dep.node.type === "lib" && _optionalChain([dep, 'access', _ => _.node, 'access', _2 => _2.data, 'optionalAccess', _3 => _3.root]) !== projectRoot && _optionalChain([dep, 'access', _4 => _4.node, 'access', _5 => _5.data, 'optionalAccess', _6 => _6.root]) !== workspaceRoot)) {
|
|
136
136
|
const projectNode = project.node;
|
|
137
137
|
if (projectNode.data.root) {
|
|
138
138
|
const projectPackageJsonPath = _chunkXITTOHOGcjs.joinPaths.call(void 0, workspaceRoot, projectNode.data.root, "package.json");
|
|
@@ -146,16 +146,16 @@ var addPackageDependencies = /* @__PURE__ */ _chunkBGYQAVKQcjs.__name.call(void
|
|
|
146
146
|
}
|
|
147
147
|
}
|
|
148
148
|
if (localPackages.length > 0) {
|
|
149
|
-
|
|
149
|
+
_chunk4DMUOH4Zcjs.writeTrace.call(void 0, `\u{1F4E6} Adding local packages to package.json: ${localPackages.map((p) => p.name).join(", ")}`);
|
|
150
150
|
const projectJsonFile = await _promises.readFile.call(void 0, _chunkXITTOHOGcjs.joinPaths.call(void 0, projectRoot, "project.json"), "utf8");
|
|
151
151
|
const projectJson = JSON.parse(projectJsonFile);
|
|
152
152
|
const projectName2 = projectJson.name;
|
|
153
153
|
const projectConfigurations = _projectgraph.readProjectsConfigurationFromProjectGraph.call(void 0, projectGraph);
|
|
154
|
-
if (!_optionalChain([projectConfigurations, 'optionalAccess',
|
|
154
|
+
if (!_optionalChain([projectConfigurations, 'optionalAccess', _7 => _7.projects, 'optionalAccess', _8 => _8[projectName2]])) {
|
|
155
155
|
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.");
|
|
156
156
|
}
|
|
157
|
-
const implicitDependencies = _optionalChain([projectConfigurations, 'access',
|
|
158
|
-
if (_optionalChain([projectConfigurations, 'access',
|
|
157
|
+
const implicitDependencies = _optionalChain([projectConfigurations, 'access', _9 => _9.projects, 'optionalAccess', _10 => _10[projectName2], 'access', _11 => _11.implicitDependencies, 'optionalAccess', _12 => _12.reduce, 'call', _13 => _13((ret, dep) => {
|
|
158
|
+
if (_optionalChain([projectConfigurations, 'access', _14 => _14.projects, 'optionalAccess', _15 => _15[dep]])) {
|
|
159
159
|
const depPackageJsonPath = _chunkXITTOHOGcjs.joinPaths.call(void 0, workspaceRoot, projectConfigurations.projects[dep].root, "package.json");
|
|
160
160
|
if (_fs.existsSync.call(void 0, depPackageJsonPath)) {
|
|
161
161
|
const depPackageJsonContent = _fs.readFileSync.call(void 0, depPackageJsonPath, "utf8");
|
|
@@ -168,24 +168,24 @@ var addPackageDependencies = /* @__PURE__ */ _chunkBGYQAVKQcjs.__name.call(void
|
|
|
168
168
|
return ret;
|
|
169
169
|
}, [])]);
|
|
170
170
|
packageJson.dependencies = localPackages.reduce((ret, localPackage) => {
|
|
171
|
-
if (!ret[localPackage.name] && !_optionalChain([implicitDependencies, 'optionalAccess',
|
|
171
|
+
if (!ret[localPackage.name] && !_optionalChain([implicitDependencies, 'optionalAccess', _16 => _16.includes, 'call', _17 => _17(localPackage.name)])) {
|
|
172
172
|
ret[localPackage.name] = `>=${localPackage.version || "0.0.1"}`;
|
|
173
173
|
}
|
|
174
174
|
return ret;
|
|
175
175
|
}, _nullishCoalesce(packageJson.dependencies, () => ( {})));
|
|
176
176
|
packageJson.devDependencies = localPackages.reduce((ret, localPackage) => {
|
|
177
|
-
if (!ret[localPackage.name] && _optionalChain([implicitDependencies, 'optionalAccess',
|
|
177
|
+
if (!ret[localPackage.name] && _optionalChain([implicitDependencies, 'optionalAccess', _18 => _18.includes, 'call', _19 => _19(localPackage.name)])) {
|
|
178
178
|
ret[localPackage.name] = localPackage.version || "0.0.1";
|
|
179
179
|
}
|
|
180
180
|
return ret;
|
|
181
181
|
}, _nullishCoalesce(packageJson.devDependencies, () => ( {})));
|
|
182
182
|
} else {
|
|
183
|
-
|
|
183
|
+
_chunk4DMUOH4Zcjs.writeTrace.call(void 0, "\u{1F4E6} No local packages dependencies to add to package.json");
|
|
184
184
|
}
|
|
185
185
|
return packageJson;
|
|
186
186
|
}, "addPackageDependencies");
|
|
187
187
|
var addWorkspacePackageJsonFields = /* @__PURE__ */ _chunkBGYQAVKQcjs.__name.call(void 0, async (config, projectRoot, sourceRoot, projectName, includeSrc = false, packageJson) => {
|
|
188
|
-
const workspaceRoot = config.workspaceRoot ? config.workspaceRoot :
|
|
188
|
+
const workspaceRoot = config.workspaceRoot ? config.workspaceRoot : _chunk4DMUOH4Zcjs.findWorkspaceRoot.call(void 0, );
|
|
189
189
|
const workspacePackageJsonContent = await _promises.readFile.call(void 0, _chunkXITTOHOGcjs.joinPaths.call(void 0, workspaceRoot, "package.json"), "utf8");
|
|
190
190
|
const workspacePackageJson = JSON.parse(workspacePackageJsonContent);
|
|
191
191
|
packageJson.type ??= "module";
|
|
@@ -234,13 +234,13 @@ var addWorkspacePackageJsonFields = /* @__PURE__ */ _chunkBGYQAVKQcjs.__name.cal
|
|
|
234
234
|
var _c12 = require('c12');
|
|
235
235
|
var _defu = require('defu'); var _defu2 = _interopRequireDefault(_defu);
|
|
236
236
|
var getConfigFileByName = /* @__PURE__ */ _chunkBGYQAVKQcjs.__name.call(void 0, async (fileName, filePath, options = {}) => {
|
|
237
|
-
const workspacePath = filePath ||
|
|
237
|
+
const workspacePath = filePath || _chunk4DMUOH4Zcjs.findWorkspaceRoot.call(void 0, filePath);
|
|
238
238
|
const configs = await Promise.all([
|
|
239
239
|
_c12.loadConfig.call(void 0, {
|
|
240
240
|
cwd: workspacePath,
|
|
241
241
|
packageJson: true,
|
|
242
242
|
name: fileName,
|
|
243
|
-
envName: _optionalChain([fileName, 'optionalAccess',
|
|
243
|
+
envName: _optionalChain([fileName, 'optionalAccess', _20 => _20.toUpperCase, 'call', _21 => _21()]),
|
|
244
244
|
jitiOptions: {
|
|
245
245
|
debug: false,
|
|
246
246
|
fsCache: process.env.STORM_SKIP_CACHE === "true" ? false : _chunkXITTOHOGcjs.joinPaths.call(void 0, process.env.STORM_CACHE_DIR || "node_modules/.cache/storm", "jiti")
|
|
@@ -251,7 +251,7 @@ var getConfigFileByName = /* @__PURE__ */ _chunkBGYQAVKQcjs.__name.call(void 0,
|
|
|
251
251
|
cwd: workspacePath,
|
|
252
252
|
packageJson: true,
|
|
253
253
|
name: fileName,
|
|
254
|
-
envName: _optionalChain([fileName, 'optionalAccess',
|
|
254
|
+
envName: _optionalChain([fileName, 'optionalAccess', _22 => _22.toUpperCase, 'call', _23 => _23()]),
|
|
255
255
|
jitiOptions: {
|
|
256
256
|
debug: false,
|
|
257
257
|
fsCache: process.env.STORM_SKIP_CACHE === "true" ? false : _chunkXITTOHOGcjs.joinPaths.call(void 0, process.env.STORM_CACHE_DIR || "node_modules/.cache/storm", "jiti")
|
|
@@ -263,21 +263,21 @@ var getConfigFileByName = /* @__PURE__ */ _chunkBGYQAVKQcjs.__name.call(void 0,
|
|
|
263
263
|
return _defu2.default.call(void 0, _nullishCoalesce(configs[0], () => ( {})), _nullishCoalesce(configs[1], () => ( {})));
|
|
264
264
|
}, "getConfigFileByName");
|
|
265
265
|
var getConfigFile = /* @__PURE__ */ _chunkBGYQAVKQcjs.__name.call(void 0, async (filePath, additionalFileNames = []) => {
|
|
266
|
-
const workspacePath = filePath ? filePath :
|
|
266
|
+
const workspacePath = filePath ? filePath : _chunk4DMUOH4Zcjs.findWorkspaceRoot.call(void 0, filePath);
|
|
267
267
|
const result = await getConfigFileByName("storm-workspace", workspacePath);
|
|
268
268
|
let config = result.config;
|
|
269
269
|
const configFile = result.configFile;
|
|
270
270
|
if (config && configFile && Object.keys(config).length > 0 && !config.skipConfigLogging) {
|
|
271
|
-
|
|
271
|
+
_chunk4DMUOH4Zcjs.writeTrace.call(void 0, `Found Storm configuration file "${configFile.includes(`${workspacePath}/`) ? configFile.replace(`${workspacePath}/`, "") : configFile}" at "${workspacePath}"`, {
|
|
272
272
|
logLevel: "all"
|
|
273
273
|
});
|
|
274
274
|
}
|
|
275
275
|
if (additionalFileNames && additionalFileNames.length > 0) {
|
|
276
276
|
const results = await Promise.all(additionalFileNames.map((fileName) => getConfigFileByName(fileName, workspacePath)));
|
|
277
277
|
for (const result2 of results) {
|
|
278
|
-
if (_optionalChain([result2, 'optionalAccess',
|
|
278
|
+
if (_optionalChain([result2, 'optionalAccess', _24 => _24.config]) && _optionalChain([result2, 'optionalAccess', _25 => _25.configFile]) && Object.keys(result2.config).length > 0) {
|
|
279
279
|
if (!config.skipConfigLogging && !result2.config.skipConfigLogging) {
|
|
280
|
-
|
|
280
|
+
_chunk4DMUOH4Zcjs.writeTrace.call(void 0, `Found alternative configuration file "${result2.configFile.includes(`${workspacePath}/`) ? result2.configFile.replace(`${workspacePath}/`, "") : result2.configFile}" at "${workspacePath}"`, {
|
|
281
281
|
logLevel: "all"
|
|
282
282
|
});
|
|
283
283
|
}
|
|
@@ -317,6 +317,11 @@ var getConfigEnv = /* @__PURE__ */ _chunkBGYQAVKQcjs.__name.call(void 0, () => {
|
|
|
317
317
|
name: process.env[`${prefix}BOT_NAME`] || void 0,
|
|
318
318
|
email: process.env[`${prefix}BOT_EMAIL`] || void 0
|
|
319
319
|
},
|
|
320
|
+
release: {
|
|
321
|
+
banner: process.env[`${prefix}RELEASE_BANNER`] || void 0,
|
|
322
|
+
header: process.env[`${prefix}RELEASE_HEADER`] || void 0,
|
|
323
|
+
footer: process.env[`${prefix}RELEASE_FOOTER`] || void 0
|
|
324
|
+
},
|
|
320
325
|
organization: process.env[`${prefix}ORGANIZATION`] || void 0,
|
|
321
326
|
packageManager: process.env[`${prefix}PACKAGE_MANAGER`] || void 0,
|
|
322
327
|
license: process.env[`${prefix}LICENSE`] || void 0,
|
|
@@ -356,24 +361,24 @@ var getConfigEnv = /* @__PURE__ */ _chunkBGYQAVKQcjs.__name.call(void 0, () => {
|
|
|
356
361
|
cyclone: process.env[`${prefix}REGISTRY_CYCLONE`] || void 0,
|
|
357
362
|
container: process.env[`${prefix}REGISTRY_CONTAINER`] || void 0
|
|
358
363
|
},
|
|
359
|
-
logLevel: process.env[`${prefix}LOG_LEVEL`] !== null && process.env[`${prefix}LOG_LEVEL`] !== void 0 ? process.env[`${prefix}LOG_LEVEL`] && Number.isSafeInteger(Number.parseInt(process.env[`${prefix}LOG_LEVEL`])) ?
|
|
364
|
+
logLevel: process.env[`${prefix}LOG_LEVEL`] !== null && process.env[`${prefix}LOG_LEVEL`] !== void 0 ? process.env[`${prefix}LOG_LEVEL`] && Number.isSafeInteger(Number.parseInt(process.env[`${prefix}LOG_LEVEL`])) ? _chunk4DMUOH4Zcjs.getLogLevelLabel.call(void 0, Number.parseInt(process.env[`${prefix}LOG_LEVEL`])) : process.env[`${prefix}LOG_LEVEL`] : void 0,
|
|
360
365
|
skipConfigLogging: process.env[`${prefix}SKIP_CONFIG_LOGGING`] !== void 0 ? Boolean(process.env[`${prefix}SKIP_CONFIG_LOGGING`]) : void 0
|
|
361
366
|
};
|
|
362
|
-
const themeNames = Object.keys(process.env).filter((envKey) => envKey.startsWith(`${prefix}COLOR_`) &&
|
|
367
|
+
const themeNames = Object.keys(process.env).filter((envKey) => envKey.startsWith(`${prefix}COLOR_`) && _chunk4DMUOH4Zcjs.COLOR_KEYS.every((colorKey) => !envKey.startsWith(`${prefix}COLOR_LIGHT_${colorKey}`) && !envKey.startsWith(`${prefix}COLOR_DARK_${colorKey}`)));
|
|
363
368
|
config.colors = themeNames.length > 0 ? themeNames.reduce((ret, themeName) => {
|
|
364
369
|
ret[themeName] = getThemeColorConfigEnv(prefix, themeName);
|
|
365
370
|
return ret;
|
|
366
371
|
}, {}) : getThemeColorConfigEnv(prefix);
|
|
367
|
-
if (config.docs ===
|
|
368
|
-
if (config.homepage ===
|
|
369
|
-
config.docs = `${
|
|
372
|
+
if (config.docs === _chunk4DMUOH4Zcjs.STORM_DEFAULT_DOCS) {
|
|
373
|
+
if (config.homepage === _chunk4DMUOH4Zcjs.STORM_DEFAULT_HOMEPAGE) {
|
|
374
|
+
config.docs = `${_chunk4DMUOH4Zcjs.STORM_DEFAULT_HOMEPAGE}/projects/${config.name}/docs`;
|
|
370
375
|
} else {
|
|
371
376
|
config.docs = `${config.homepage}/docs`;
|
|
372
377
|
}
|
|
373
378
|
}
|
|
374
|
-
if (config.licensing ===
|
|
375
|
-
if (config.homepage ===
|
|
376
|
-
config.licensing = `${
|
|
379
|
+
if (config.licensing === _chunk4DMUOH4Zcjs.STORM_DEFAULT_LICENSING) {
|
|
380
|
+
if (config.homepage === _chunk4DMUOH4Zcjs.STORM_DEFAULT_HOMEPAGE) {
|
|
381
|
+
config.licensing = `${_chunk4DMUOH4Zcjs.STORM_DEFAULT_HOMEPAGE}/projects/${config.name}/licensing`;
|
|
377
382
|
} else {
|
|
378
383
|
config.licensing = `${config.homepage}/docs`;
|
|
379
384
|
}
|
|
@@ -447,13 +452,13 @@ var getBaseThemeColorConfigEnv = /* @__PURE__ */ _chunkBGYQAVKQcjs.__name.call(v
|
|
|
447
452
|
var setExtensionEnv = /* @__PURE__ */ _chunkBGYQAVKQcjs.__name.call(void 0, (extensionName, extension) => {
|
|
448
453
|
for (const key of Object.keys(_nullishCoalesce(extension, () => ( {})))) {
|
|
449
454
|
if (extension[key]) {
|
|
450
|
-
const result = _nullishCoalesce(_optionalChain([key, 'optionalAccess',
|
|
455
|
+
const result = _nullishCoalesce(_optionalChain([key, 'optionalAccess', _26 => _26.replace, 'call', _27 => _27(/([A-Z])+/g, (input) => input ? _optionalChain([input, 'access', _28 => _28[0], 'optionalAccess', _29 => _29.toUpperCase, 'call', _30 => _30()]) + input.slice(1) : ""), 'access', _31 => _31.split, 'call', _32 => _32(/(?=[A-Z])|[.\-\s_]/), 'access', _33 => _33.map, 'call', _34 => _34((x) => x.toLowerCase())]), () => ( []));
|
|
451
456
|
let extensionKey;
|
|
452
457
|
if (result.length === 0) {
|
|
453
458
|
return;
|
|
454
459
|
}
|
|
455
460
|
if (result.length === 1) {
|
|
456
|
-
extensionKey = _nullishCoalesce(_optionalChain([result, 'access',
|
|
461
|
+
extensionKey = _nullishCoalesce(_optionalChain([result, 'access', _35 => _35[0], 'optionalAccess', _36 => _36.toUpperCase, 'call', _37 => _37()]), () => ( ""));
|
|
457
462
|
} else {
|
|
458
463
|
extensionKey = result.reduce((ret, part) => {
|
|
459
464
|
return `${ret}_${part.toLowerCase()}`;
|
|
@@ -481,6 +486,11 @@ var setConfigEnv = /* @__PURE__ */ _chunkBGYQAVKQcjs.__name.call(void 0, (config
|
|
|
481
486
|
process.env[`${prefix}BOT_NAME`] = config.bot.name;
|
|
482
487
|
process.env[`${prefix}BOT_EMAIL`] = config.bot.email;
|
|
483
488
|
}
|
|
489
|
+
if (config.release) {
|
|
490
|
+
process.env[`${prefix}RELEASE_BANNER`] = config.release.banner;
|
|
491
|
+
process.env[`${prefix}RELEASE_HEADER`] = config.release.header;
|
|
492
|
+
process.env[`${prefix}RELEASE_FOOTER`] = config.release.footer;
|
|
493
|
+
}
|
|
484
494
|
if (config.organization) {
|
|
485
495
|
process.env[`${prefix}ORGANIZATION`] = config.organization;
|
|
486
496
|
}
|
|
@@ -550,7 +560,7 @@ var setConfigEnv = /* @__PURE__ */ _chunkBGYQAVKQcjs.__name.call(void 0, (config
|
|
|
550
560
|
process.env.NODE_ENV = config.mode;
|
|
551
561
|
process.env.ENVIRONMENT = config.mode;
|
|
552
562
|
}
|
|
553
|
-
if (_optionalChain([config, 'access',
|
|
563
|
+
if (_optionalChain([config, 'access', _38 => _38.colors, 'optionalAccess', _39 => _39.base, 'optionalAccess', _40 => _40.light]) || _optionalChain([config, 'access', _41 => _41.colors, 'optionalAccess', _42 => _42.base, 'optionalAccess', _43 => _43.dark])) {
|
|
554
564
|
for (const key of Object.keys(config.colors)) {
|
|
555
565
|
setThemeColorConfigEnv(`${prefix}COLOR_${key}_`, config.colors[key]);
|
|
556
566
|
}
|
|
@@ -589,19 +599,21 @@ var setConfigEnv = /* @__PURE__ */ _chunkBGYQAVKQcjs.__name.call(void 0, (config
|
|
|
589
599
|
if (config.logLevel) {
|
|
590
600
|
process.env[`${prefix}LOG_LEVEL`] = String(config.logLevel);
|
|
591
601
|
process.env.LOG_LEVEL = String(config.logLevel);
|
|
592
|
-
process.env.NX_VERBOSE_LOGGING = String(
|
|
593
|
-
process.env.RUST_BACKTRACE =
|
|
602
|
+
process.env.NX_VERBOSE_LOGGING = String(_chunk4DMUOH4Zcjs.getLogLevel.call(void 0, config.logLevel) >= _chunk4DMUOH4Zcjs.LogLevel.DEBUG ? true : false);
|
|
603
|
+
process.env.RUST_BACKTRACE = _chunk4DMUOH4Zcjs.getLogLevel.call(void 0, config.logLevel) >= _chunk4DMUOH4Zcjs.LogLevel.DEBUG ? "full" : "none";
|
|
594
604
|
}
|
|
595
605
|
if (config.skipConfigLogging !== void 0) {
|
|
596
606
|
process.env[`${prefix}SKIP_CONFIG_LOGGING`] = String(config.skipConfigLogging);
|
|
597
607
|
}
|
|
598
608
|
process.env[`${prefix}CONFIG`] = JSON.stringify(config);
|
|
599
609
|
for (const key of Object.keys(_nullishCoalesce(config.extensions, () => ( {})))) {
|
|
600
|
-
config.extensions[key] && Object.keys(config.extensions[key])
|
|
610
|
+
if (config.extensions[key] && Object.keys(config.extensions[key])) {
|
|
611
|
+
setExtensionEnv(key, config.extensions[key]);
|
|
612
|
+
}
|
|
601
613
|
}
|
|
602
614
|
}, "setConfigEnv");
|
|
603
615
|
var setThemeColorConfigEnv = /* @__PURE__ */ _chunkBGYQAVKQcjs.__name.call(void 0, (prefix, config) => {
|
|
604
|
-
return _optionalChain([config, 'optionalAccess',
|
|
616
|
+
return _optionalChain([config, 'optionalAccess', _44 => _44.light, 'optionalAccess', _45 => _45.brand]) || _optionalChain([config, 'optionalAccess', _46 => _46.dark, 'optionalAccess', _47 => _47.brand]) ? setMultiThemeColorConfigEnv(prefix, config) : setSingleThemeColorConfigEnv(prefix, config);
|
|
605
617
|
}, "setThemeColorConfigEnv");
|
|
606
618
|
var setSingleThemeColorConfigEnv = /* @__PURE__ */ _chunkBGYQAVKQcjs.__name.call(void 0, (prefix, config) => {
|
|
607
619
|
if (config.dark) {
|
|
@@ -703,20 +715,20 @@ var _extension_cache = /* @__PURE__ */ new WeakMap();
|
|
|
703
715
|
var _static_cache = void 0;
|
|
704
716
|
var createStormConfig = /* @__PURE__ */ _chunkBGYQAVKQcjs.__name.call(void 0, async (extensionName, schema, workspaceRoot, skipLogs = false) => {
|
|
705
717
|
let result;
|
|
706
|
-
if (!_optionalChain([_static_cache, 'optionalAccess',
|
|
718
|
+
if (!_optionalChain([_static_cache, 'optionalAccess', _48 => _48.data]) || !_optionalChain([_static_cache, 'optionalAccess', _49 => _49.timestamp]) || _static_cache.timestamp < Date.now() - 8e3) {
|
|
707
719
|
let _workspaceRoot = workspaceRoot;
|
|
708
720
|
if (!_workspaceRoot) {
|
|
709
|
-
_workspaceRoot =
|
|
721
|
+
_workspaceRoot = _chunk4DMUOH4Zcjs.findWorkspaceRoot.call(void 0, );
|
|
710
722
|
}
|
|
711
723
|
const configEnv = getConfigEnv();
|
|
712
|
-
const defaultConfig = await
|
|
724
|
+
const defaultConfig = await _chunk4DMUOH4Zcjs.getDefaultConfig.call(void 0, _workspaceRoot);
|
|
713
725
|
const configFile = await getConfigFile(_workspaceRoot);
|
|
714
726
|
if (!configFile && !skipLogs) {
|
|
715
|
-
|
|
727
|
+
_chunk4DMUOH4Zcjs.writeWarning.call(void 0, "No Storm Workspace configuration file found in the current repository. Please ensure this is the expected behavior - you can add a `storm-workspace.json` file to the root of your workspace if it is not.\n", {
|
|
716
728
|
logLevel: "all"
|
|
717
729
|
});
|
|
718
730
|
}
|
|
719
|
-
result = await
|
|
731
|
+
result = await _chunk4DMUOH4Zcjs.StormConfigSchema.parseAsync(_defu2.default.call(void 0, configEnv, configFile, defaultConfig));
|
|
720
732
|
result.workspaceRoot ??= _workspaceRoot;
|
|
721
733
|
} else {
|
|
722
734
|
result = _static_cache.data;
|
|
@@ -751,8 +763,8 @@ var loadStormConfig = /* @__PURE__ */ _chunkBGYQAVKQcjs.__name.call(void 0, asyn
|
|
|
751
763
|
const config = await createStormConfig(void 0, void 0, workspaceRoot, skipLogs);
|
|
752
764
|
setConfigEnv(config);
|
|
753
765
|
if (!skipLogs && !config.skipConfigLogging) {
|
|
754
|
-
|
|
755
|
-
${
|
|
766
|
+
_chunk4DMUOH4Zcjs.writeTrace.call(void 0, `\u2699\uFE0F Using Storm Workspace configuration:
|
|
767
|
+
${_chunk4DMUOH4Zcjs.formatLogMessage.call(void 0, config)}`, config);
|
|
756
768
|
}
|
|
757
769
|
return config;
|
|
758
770
|
}, "loadStormConfig");
|
|
@@ -765,7 +777,7 @@ var getConfig = /* @__PURE__ */ _chunkBGYQAVKQcjs.__name.call(void 0, (workspace
|
|
|
765
777
|
// ../build-tools/src/utilities/get-entry-points.ts
|
|
766
778
|
|
|
767
779
|
var getEntryPoints = /* @__PURE__ */ _chunkBGYQAVKQcjs.__name.call(void 0, async (config, projectRoot, sourceRoot, entry, emitOnAll = false) => {
|
|
768
|
-
const workspaceRoot = config.workspaceRoot ||
|
|
780
|
+
const workspaceRoot = config.workspaceRoot || _chunk4DMUOH4Zcjs.findWorkspaceRoot.call(void 0, );
|
|
769
781
|
const entryPoints = [];
|
|
770
782
|
if (entry) {
|
|
771
783
|
if (typeof entry === "string") {
|
|
@@ -791,7 +803,7 @@ var getEntryPoints = /* @__PURE__ */ _chunkBGYQAVKQcjs.__name.call(void 0, async
|
|
|
791
803
|
paths.push(...files.reduce((ret, filePath) => {
|
|
792
804
|
const result = _chunkXITTOHOGcjs.correctPaths.call(void 0, _chunkXITTOHOGcjs.joinPaths.call(void 0, filePath.path, filePath.name).replaceAll(_chunkXITTOHOGcjs.correctPaths.call(void 0, workspaceRoot), "").replaceAll(_chunkXITTOHOGcjs.correctPaths.call(void 0, projectRoot), ""));
|
|
793
805
|
if (result) {
|
|
794
|
-
|
|
806
|
+
_chunk4DMUOH4Zcjs.writeDebug.call(void 0, `Trying to add entry point ${result} at "${_chunkXITTOHOGcjs.joinPaths.call(void 0, filePath.path, filePath.name)}"`, config);
|
|
795
807
|
if (!paths.includes(result)) {
|
|
796
808
|
paths.push(result);
|
|
797
809
|
}
|
|
@@ -841,8 +853,8 @@ var getDefaultBuildPlugins = /* @__PURE__ */ _chunkBGYQAVKQcjs.__name.call(void
|
|
|
841
853
|
_chunkEZGTDCYMcjs.fixImportsPlugin.call(void 0, options, resolvedOptions),
|
|
842
854
|
_chunkS6M44SSZcjs.nativeNodeModulesPlugin.call(void 0, options, resolvedOptions),
|
|
843
855
|
_chunkCGFDQ5AJcjs.esmSplitCodeToCjsPlugin.call(void 0, options, resolvedOptions),
|
|
844
|
-
|
|
845
|
-
|
|
856
|
+
_chunk27CI4FORcjs.tscPlugin.call(void 0, options, resolvedOptions),
|
|
857
|
+
_chunkBLWAYYW3cjs.onErrorPlugin.call(void 0, options, resolvedOptions)
|
|
846
858
|
], "getDefaultBuildPlugins");
|
|
847
859
|
var DEFAULT_BUILD_OPTIONS = {
|
|
848
860
|
platform: "node",
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } }
|
|
2
2
|
|
|
3
3
|
|
|
4
|
-
var
|
|
4
|
+
var _chunk4DMUOH4Zcjs = require('./chunk-4DMUOH4Z.cjs');
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
|
|
@@ -86,8 +86,8 @@ var depsCheckPlugin = /* @__PURE__ */ _chunkBGYQAVKQcjs.__name.call(void 0, (bun
|
|
|
86
86
|
const filteredMissingDeps = missingDependencies.filter((dep) => {
|
|
87
87
|
return !missingIgnore.some((pattern) => dep.match(pattern)) && !peerDependencies.includes(dep);
|
|
88
88
|
});
|
|
89
|
-
|
|
90
|
-
|
|
89
|
+
_chunk4DMUOH4Zcjs.writeWarning.call(void 0, `Unused Dependencies: ${JSON.stringify(filteredUnusedDeps)}`);
|
|
90
|
+
_chunk4DMUOH4Zcjs.writeError.call(void 0, `Missing Dependencies: ${JSON.stringify(filteredMissingDeps)}`);
|
|
91
91
|
if (filteredMissingDeps.length > 0) {
|
|
92
92
|
throw new Error(`Missing dependencies detected - please install them:
|
|
93
93
|
${JSON.stringify(filteredMissingDeps)}
|