@storm-software/esbuild 0.31.55 → 0.32.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/README.md +1 -1
- package/dist/build.cjs +9 -9
- package/dist/build.js +8 -8
- package/dist/{chunk-OFHMWQZF.cjs → chunk-5LN4W7RS.cjs} +1 -1
- package/dist/{chunk-LRVWPYIC.cjs → chunk-63NDGTHK.cjs} +2 -2
- package/dist/{chunk-CEE2QW7F.js → chunk-A6VGGOSN.js} +5 -5
- package/dist/{chunk-KYYHVNV4.cjs → chunk-BFF4J5BM.cjs} +2 -2
- package/dist/{chunk-CJ75TYKD.cjs → chunk-DQKNCLPI.cjs} +45 -45
- package/dist/{chunk-E2ITHLMT.js → chunk-EQ6TXPLW.js} +1 -1
- package/dist/{chunk-ASASYO7N.cjs → chunk-FYFB2IQY.cjs} +3 -3
- package/dist/{chunk-6OP2VX6Y.js → chunk-IY7XC4HQ.js} +1 -1
- package/dist/{chunk-CFK6TJYF.js → chunk-LOXSNNRO.js} +17 -12
- package/dist/{chunk-6AQHAXIU.js → chunk-M4O2EJ6Z.js} +1 -1
- package/dist/{chunk-QYSYE4DQ.cjs → chunk-PKPG6XXP.cjs} +42 -37
- package/dist/{chunk-E4SGSVQK.js → chunk-UAKT6QUX.js} +1 -1
- package/dist/{chunk-SLCDPX5I.js → chunk-V3JNF263.js} +1 -1
- package/dist/{chunk-HTG42YEH.cjs → chunk-VFORKCNS.cjs} +3 -3
- package/dist/{chunk-OPVRR2SU.cjs → chunk-VK6V4C6A.cjs} +2 -2
- package/dist/{chunk-A6P3N2E2.js → chunk-YXPXX5XP.js} +1 -1
- package/dist/clean.cjs +3 -3
- package/dist/clean.d.cts +1 -1
- package/dist/clean.d.ts +1 -1
- package/dist/clean.js +2 -2
- package/dist/config.cjs +5 -5
- package/dist/config.js +4 -4
- package/dist/index.cjs +9 -9
- package/dist/index.d.cts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +8 -8
- 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/dist/tsc.cjs +3 -3
- package/dist/tsc.d.cts +1 -1
- package/dist/tsc.d.ts +1 -1
- package/dist/tsc.js +2 -2
- package/dist/{types-BVD_-NDh.d.cts → types-B4jbZA4j.d.cts} +14 -14
- package/dist/{types-BVD_-NDh.d.ts → types-B4jbZA4j.d.ts} +14 -14
- package/package.json +5 -5
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,22 +1,22 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
3
|
|
|
4
|
-
var
|
|
5
|
-
require('./chunk-
|
|
6
|
-
require('./chunk-
|
|
4
|
+
var _chunkDQKNCLPIcjs = require('./chunk-DQKNCLPI.cjs');
|
|
5
|
+
require('./chunk-VFORKCNS.cjs');
|
|
6
|
+
require('./chunk-PKPG6XXP.cjs');
|
|
7
7
|
require('./chunk-EZGTDCYM.cjs');
|
|
8
8
|
require('./chunk-S6M44SSZ.cjs');
|
|
9
9
|
require('./chunk-WRBUO7H6.cjs');
|
|
10
|
-
require('./chunk-
|
|
10
|
+
require('./chunk-BFF4J5BM.cjs');
|
|
11
11
|
require('./chunk-SSEYS7LI.cjs');
|
|
12
|
-
require('./chunk-
|
|
13
|
-
require('./chunk-
|
|
14
|
-
require('./chunk-
|
|
15
|
-
require('./chunk-
|
|
12
|
+
require('./chunk-63NDGTHK.cjs');
|
|
13
|
+
require('./chunk-VK6V4C6A.cjs');
|
|
14
|
+
require('./chunk-FYFB2IQY.cjs');
|
|
15
|
+
require('./chunk-5LN4W7RS.cjs');
|
|
16
16
|
require('./chunk-XITTOHOG.cjs');
|
|
17
17
|
require('./chunk-CGFDQ5AJ.cjs');
|
|
18
18
|
require('./chunk-BGYQAVKQ.cjs');
|
|
19
19
|
|
|
20
20
|
|
|
21
21
|
|
|
22
|
-
exports.build =
|
|
22
|
+
exports.build = _chunkDQKNCLPIcjs.build; exports.cleanOutputPath = _chunkDQKNCLPIcjs.cleanOutputPath;
|
package/dist/build.js
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import {
|
|
2
2
|
build,
|
|
3
3
|
cleanOutputPath
|
|
4
|
-
} from "./chunk-
|
|
5
|
-
import "./chunk-
|
|
6
|
-
import "./chunk-
|
|
4
|
+
} from "./chunk-A6VGGOSN.js";
|
|
5
|
+
import "./chunk-M4O2EJ6Z.js";
|
|
6
|
+
import "./chunk-LOXSNNRO.js";
|
|
7
7
|
import "./chunk-GWG4HOQ6.js";
|
|
8
8
|
import "./chunk-T5272PC2.js";
|
|
9
9
|
import "./chunk-LYDEMC26.js";
|
|
10
|
-
import "./chunk-
|
|
10
|
+
import "./chunk-UAKT6QUX.js";
|
|
11
11
|
import "./chunk-Q3LOGZKI.js";
|
|
12
|
-
import "./chunk-
|
|
13
|
-
import "./chunk-
|
|
14
|
-
import "./chunk-
|
|
15
|
-
import "./chunk-
|
|
12
|
+
import "./chunk-IY7XC4HQ.js";
|
|
13
|
+
import "./chunk-YXPXX5XP.js";
|
|
14
|
+
import "./chunk-V3JNF263.js";
|
|
15
|
+
import "./chunk-EQ6TXPLW.js";
|
|
16
16
|
import "./chunk-YMTDVMD6.js";
|
|
17
17
|
import "./chunk-YNQ45EAM.js";
|
|
18
18
|
import "./chunk-3GQAWCBQ.js";
|
|
@@ -245,7 +245,7 @@ var stormWorkspaceConfigSchema = _zod2.default.object({
|
|
|
245
245
|
"staging",
|
|
246
246
|
"production"
|
|
247
247
|
]).default("production").describe("The current runtime environment mode for the package"),
|
|
248
|
-
workspaceRoot: _zod2.default.string().trim().
|
|
248
|
+
workspaceRoot: _zod2.default.string().trim().describe("The root directory of the workspace"),
|
|
249
249
|
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"),
|
|
250
250
|
skipCache: _zod2.default.boolean().default(false).describe("Should all known types of workspace caching be skipped?"),
|
|
251
251
|
directories: WorkspaceDirectoryConfigSchema,
|
|
@@ -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 _chunk5LN4W7RScjs = require('./chunk-5LN4W7RS.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
|
+
_chunk5LN4W7RScjs.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
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
cleanDirectories
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-M4O2EJ6Z.js";
|
|
4
4
|
import {
|
|
5
5
|
DEFAULT_BUILD_OPTIONS,
|
|
6
6
|
DEFAULT_COMPILED_BANNER,
|
|
@@ -11,13 +11,13 @@ import {
|
|
|
11
11
|
getConfig,
|
|
12
12
|
getDefaultBuildPlugins,
|
|
13
13
|
getEnv
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-LOXSNNRO.js";
|
|
15
15
|
import {
|
|
16
16
|
emitDts
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-YXPXX5XP.js";
|
|
18
18
|
import {
|
|
19
19
|
depsCheckPlugin
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-V3JNF263.js";
|
|
21
21
|
import {
|
|
22
22
|
findWorkspaceRoot,
|
|
23
23
|
formatLogMessage,
|
|
@@ -29,7 +29,7 @@ import {
|
|
|
29
29
|
writeSuccess,
|
|
30
30
|
writeTrace,
|
|
31
31
|
writeWarning
|
|
32
|
-
} from "./chunk-
|
|
32
|
+
} from "./chunk-EQ6TXPLW.js";
|
|
33
33
|
import {
|
|
34
34
|
correctPaths,
|
|
35
35
|
joinPaths
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var _chunk5LN4W7RScjs = require('./chunk-5LN4W7RS.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
|
+
_chunk5LN4W7RScjs.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);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
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; }
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var _chunkVFORKCNScjs = require('./chunk-VFORKCNS.cjs');
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
|
|
@@ -11,13 +11,13 @@ var _chunkHTG42YEHcjs = require('./chunk-HTG42YEH.cjs');
|
|
|
11
11
|
|
|
12
12
|
|
|
13
13
|
|
|
14
|
-
var
|
|
14
|
+
var _chunkPKPG6XXPcjs = require('./chunk-PKPG6XXP.cjs');
|
|
15
15
|
|
|
16
16
|
|
|
17
|
-
var
|
|
17
|
+
var _chunkVK6V4C6Acjs = require('./chunk-VK6V4C6A.cjs');
|
|
18
18
|
|
|
19
19
|
|
|
20
|
-
var
|
|
20
|
+
var _chunkFYFB2IQYcjs = require('./chunk-FYFB2IQY.cjs');
|
|
21
21
|
|
|
22
22
|
|
|
23
23
|
|
|
@@ -29,7 +29,7 @@ var _chunkASASYO7Ncjs = require('./chunk-ASASYO7N.cjs');
|
|
|
29
29
|
|
|
30
30
|
|
|
31
31
|
|
|
32
|
-
var
|
|
32
|
+
var _chunk5LN4W7RScjs = require('./chunk-5LN4W7RS.cjs');
|
|
33
33
|
|
|
34
34
|
|
|
35
35
|
|
|
@@ -204,7 +204,7 @@ var shebangRenderer = {
|
|
|
204
204
|
// src/utilities/get-entry-points.ts
|
|
205
205
|
var _glob = require('glob');
|
|
206
206
|
var getEntryPoints = /* @__PURE__ */ _chunkBGYQAVKQcjs.__name.call(void 0, async (config, projectRoot, sourceRoot, entry, emitOnAll = false) => {
|
|
207
|
-
const workspaceRoot = config.workspaceRoot ||
|
|
207
|
+
const workspaceRoot = config.workspaceRoot || _chunk5LN4W7RScjs.findWorkspaceRoot.call(void 0, );
|
|
208
208
|
const entryPoints = [];
|
|
209
209
|
if (entry) {
|
|
210
210
|
if (typeof entry === "string") {
|
|
@@ -251,7 +251,7 @@ var getEntryPoints = /* @__PURE__ */ _chunkBGYQAVKQcjs.__name.call(void 0, async
|
|
|
251
251
|
paths.push(...files.reduce((ret, filePath) => {
|
|
252
252
|
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), ""));
|
|
253
253
|
if (result) {
|
|
254
|
-
|
|
254
|
+
_chunk5LN4W7RScjs.writeDebug.call(void 0, `Trying to add entry point ${result} at "${_chunkXITTOHOGcjs.joinPaths.call(void 0, filePath.path, filePath.name)}"`, config);
|
|
255
255
|
if (!paths.some((p) => p.in === result)) {
|
|
256
256
|
paths.push({
|
|
257
257
|
in: result,
|
|
@@ -262,7 +262,7 @@ var getEntryPoints = /* @__PURE__ */ _chunkBGYQAVKQcjs.__name.call(void 0, async
|
|
|
262
262
|
return ret;
|
|
263
263
|
}, []));
|
|
264
264
|
} else {
|
|
265
|
-
|
|
265
|
+
_chunk5LN4W7RScjs.writeDebug.call(void 0, `Adding ESBuild entry point
|
|
266
266
|
- Input: ${entryPoint.in}
|
|
267
267
|
- Output: ${entryPoint.out}`, config);
|
|
268
268
|
if (!paths.some((p) => p.out === entryPoint.out)) {
|
|
@@ -361,9 +361,9 @@ var resolveOptions = /* @__PURE__ */ _chunkBGYQAVKQcjs.__name.call(void 0, async
|
|
|
361
361
|
if (!workspaceRoot) {
|
|
362
362
|
throw new Error("Cannot find Nx workspace root");
|
|
363
363
|
}
|
|
364
|
-
const config = await
|
|
365
|
-
|
|
366
|
-
const stopwatch =
|
|
364
|
+
const config = await _chunkPKPG6XXPcjs.getConfig.call(void 0, workspaceRoot.dir);
|
|
365
|
+
_chunk5LN4W7RScjs.writeDebug.call(void 0, " \u2699\uFE0F Resolving build options", config);
|
|
366
|
+
const stopwatch = _chunk5LN4W7RScjs.getStopwatch.call(void 0, "Build options resolution");
|
|
367
367
|
const projectGraph = await _devkit.createProjectGraphAsync.call(void 0, {
|
|
368
368
|
exitOnError: true
|
|
369
369
|
});
|
|
@@ -378,14 +378,14 @@ var resolveOptions = /* @__PURE__ */ _chunkBGYQAVKQcjs.__name.call(void 0, async
|
|
|
378
378
|
if (!_optionalChain([projectConfigurations, 'optionalAccess', _14 => _14.projects, 'optionalAccess', _15 => _15[projectName]])) {
|
|
379
379
|
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.");
|
|
380
380
|
}
|
|
381
|
-
const options = _defu2.default.call(void 0, userOptions,
|
|
381
|
+
const options = _defu2.default.call(void 0, userOptions, _chunkPKPG6XXPcjs.DEFAULT_BUILD_OPTIONS);
|
|
382
382
|
options.name ??= `${projectName}-${options.format}`;
|
|
383
|
-
options.target ??=
|
|
383
|
+
options.target ??= _chunkPKPG6XXPcjs.DEFAULT_TARGET;
|
|
384
384
|
const packageJsonPath = _chunkXITTOHOGcjs.joinPaths.call(void 0, workspaceRoot.dir, options.projectRoot, "package.json");
|
|
385
385
|
if (!_fs.existsSync.call(void 0, packageJsonPath)) {
|
|
386
386
|
throw new Error("Cannot find package.json configuration");
|
|
387
387
|
}
|
|
388
|
-
const env =
|
|
388
|
+
const env = _chunkPKPG6XXPcjs.getEnv.call(void 0, "esbuild", options);
|
|
389
389
|
const result = {
|
|
390
390
|
...options,
|
|
391
391
|
config,
|
|
@@ -410,7 +410,7 @@ var resolveOptions = /* @__PURE__ */ _chunkBGYQAVKQcjs.__name.call(void 0, async
|
|
|
410
410
|
projectGraph,
|
|
411
411
|
sourceRoot: userOptions.sourceRoot || projectJson.sourceRoot || _chunkXITTOHOGcjs.joinPaths.call(void 0, projectRoot, "src"),
|
|
412
412
|
minify: userOptions.minify || !userOptions.debug,
|
|
413
|
-
verbose: userOptions.verbose ||
|
|
413
|
+
verbose: userOptions.verbose || _chunk5LN4W7RScjs.isVerbose.call(void 0, ) || userOptions.debug === true,
|
|
414
414
|
includeSrc: userOptions.includeSrc === true,
|
|
415
415
|
metafile: userOptions.metafile !== false,
|
|
416
416
|
generatePackageJson: userOptions.generatePackageJson !== false,
|
|
@@ -422,8 +422,8 @@ var resolveOptions = /* @__PURE__ */ _chunkBGYQAVKQcjs.__name.call(void 0, async
|
|
|
422
422
|
watch: userOptions.watch === true,
|
|
423
423
|
footer: userOptions.footer,
|
|
424
424
|
banner: {
|
|
425
|
-
js: options.banner ||
|
|
426
|
-
css: options.banner ||
|
|
425
|
+
js: options.banner || _chunkPKPG6XXPcjs.DEFAULT_COMPILED_BANNER,
|
|
426
|
+
css: options.banner || _chunkPKPG6XXPcjs.DEFAULT_COMPILED_BANNER
|
|
427
427
|
},
|
|
428
428
|
splitting: options.format === "iife" ? false : typeof options.splitting === "boolean" ? options.splitting : options.format === "esm",
|
|
429
429
|
treeShaking: options.format === "esm",
|
|
@@ -449,7 +449,7 @@ var resolveOptions = /* @__PURE__ */ _chunkBGYQAVKQcjs.__name.call(void 0, async
|
|
|
449
449
|
options.format === "esm" && options.injectShims && options.platform === "node" ? _chunkXITTOHOGcjs.joinPaths.call(void 0, __dirname, "../assets/esm_shims.js") : void 0
|
|
450
450
|
].filter(Boolean)
|
|
451
451
|
};
|
|
452
|
-
result.plugins = _nullishCoalesce(userOptions.plugins, () => (
|
|
452
|
+
result.plugins = _nullishCoalesce(userOptions.plugins, () => ( _chunkPKPG6XXPcjs.getDefaultBuildPlugins.call(void 0, userOptions, result)));
|
|
453
453
|
if (options.inject && Array.isArray(options.inject) && options.inject.length > 0) {
|
|
454
454
|
result.inject = options.inject.reduce((ret, inj) => {
|
|
455
455
|
if (inj && typeof inj === "string" && ret.includes(inj)) {
|
|
@@ -465,8 +465,8 @@ var resolveOptions = /* @__PURE__ */ _chunkBGYQAVKQcjs.__name.call(void 0, async
|
|
|
465
465
|
}, "resolveOptions");
|
|
466
466
|
async function generatePackageJson(context2) {
|
|
467
467
|
if (context2.options.generatePackageJson !== false && _fs.existsSync.call(void 0, _chunkXITTOHOGcjs.joinPaths.call(void 0, context2.options.projectRoot, "package.json"))) {
|
|
468
|
-
|
|
469
|
-
const stopwatch =
|
|
468
|
+
_chunk5LN4W7RScjs.writeDebug.call(void 0, " \u270D\uFE0F Writing package.json file", context2.options.config);
|
|
469
|
+
const stopwatch = _chunk5LN4W7RScjs.getStopwatch.call(void 0, "Write package.json file");
|
|
470
470
|
const packageJsonPath = _chunkXITTOHOGcjs.joinPaths.call(void 0, context2.options.projectRoot, "project.json");
|
|
471
471
|
if (!_fs.existsSync.call(void 0, packageJsonPath)) {
|
|
472
472
|
throw new Error("Cannot find package.json configuration");
|
|
@@ -476,8 +476,8 @@ async function generatePackageJson(context2) {
|
|
|
476
476
|
if (!packageJson) {
|
|
477
477
|
throw new Error("Cannot find package.json configuration file");
|
|
478
478
|
}
|
|
479
|
-
packageJson = await
|
|
480
|
-
packageJson = await
|
|
479
|
+
packageJson = await _chunkPKPG6XXPcjs.addPackageDependencies.call(void 0, context2.options.config.workspaceRoot, context2.options.projectRoot, context2.options.projectName, packageJson);
|
|
480
|
+
packageJson = await _chunkPKPG6XXPcjs.addWorkspacePackageJsonFields.call(void 0, context2.options.config, context2.options.projectRoot, context2.options.sourceRoot, context2.options.projectName, false, packageJson);
|
|
481
481
|
packageJson.exports ??= {};
|
|
482
482
|
packageJson.exports["./package.json"] ??= "./package.json";
|
|
483
483
|
packageJson.exports["."] ??= `.${context2.options.distDir ? `/${context2.options.distDir}` : ""}/index.js`;
|
|
@@ -525,8 +525,8 @@ async function generateContext(getOptions) {
|
|
|
525
525
|
}
|
|
526
526
|
_chunkBGYQAVKQcjs.__name.call(void 0, generateContext, "generateContext");
|
|
527
527
|
async function executeEsBuild(context2) {
|
|
528
|
-
|
|
529
|
-
const stopwatch =
|
|
528
|
+
_chunk5LN4W7RScjs.writeDebug.call(void 0, ` \u{1F680} Running ${context2.options.name} build`, context2.options.config);
|
|
529
|
+
const stopwatch = _chunk5LN4W7RScjs.getStopwatch.call(void 0, `${context2.options.name} build`);
|
|
530
530
|
if (process.env.STORM_WATCH) {
|
|
531
531
|
const ctx = await esbuild.context(context2.options);
|
|
532
532
|
watch(ctx, context2.options);
|
|
@@ -560,8 +560,8 @@ async function executeEsBuild(context2) {
|
|
|
560
560
|
delete options.config;
|
|
561
561
|
delete options.injectShims;
|
|
562
562
|
delete options.external;
|
|
563
|
-
|
|
564
|
-
${
|
|
563
|
+
_chunk5LN4W7RScjs.writeTrace.call(void 0, `Run esbuild (${context2.options.name}) with the following options:
|
|
564
|
+
${_chunk5LN4W7RScjs.formatLogMessage.call(void 0, {
|
|
565
565
|
...options,
|
|
566
566
|
define: "<Hidden>"
|
|
567
567
|
})}`, context2.options.config);
|
|
@@ -577,9 +577,9 @@ ${_chunkOFHMWQZFcjs.formatLogMessage.call(void 0, {
|
|
|
577
577
|
_chunkBGYQAVKQcjs.__name.call(void 0, executeEsBuild, "executeEsBuild");
|
|
578
578
|
async function executeTypescript(context2) {
|
|
579
579
|
if (_optionalChain([context2, 'access', _16 => _16.result, 'optionalAccess', _17 => _17.errors, 'access', _18 => _18.length]) === 0 && context2.options.dts) {
|
|
580
|
-
|
|
581
|
-
const stopwatch =
|
|
582
|
-
await
|
|
580
|
+
_chunk5LN4W7RScjs.writeDebug.call(void 0, ` \u{1F4CB} Running TypeScript Compiler for ${context2.options.name}`, context2.options.config);
|
|
581
|
+
const stopwatch = _chunk5LN4W7RScjs.getStopwatch.call(void 0, `${context2.options.name} asset copy`);
|
|
582
|
+
await _chunkVK6V4C6Acjs.emitDts.call(void 0, context2.options.config, context2.options.tsconfig, context2.options.tsconfigRaw, true);
|
|
583
583
|
stopwatch();
|
|
584
584
|
}
|
|
585
585
|
return context2;
|
|
@@ -587,9 +587,9 @@ async function executeTypescript(context2) {
|
|
|
587
587
|
_chunkBGYQAVKQcjs.__name.call(void 0, executeTypescript, "executeTypescript");
|
|
588
588
|
async function copyBuildAssets(context2) {
|
|
589
589
|
if (_optionalChain([context2, 'access', _19 => _19.result, 'optionalAccess', _20 => _20.errors, 'access', _21 => _21.length]) === 0) {
|
|
590
|
-
|
|
591
|
-
const stopwatch =
|
|
592
|
-
await
|
|
590
|
+
_chunk5LN4W7RScjs.writeDebug.call(void 0, ` \u{1F4CB} Copying asset files to output directory: ${context2.options.outdir}`, context2.options.config);
|
|
591
|
+
const stopwatch = _chunk5LN4W7RScjs.getStopwatch.call(void 0, `${context2.options.name} asset copy`);
|
|
592
|
+
await _chunkPKPG6XXPcjs.copyAssets.call(void 0, context2.options.config, _nullishCoalesce(context2.options.assets, () => ( [])), context2.options.outdir, context2.options.projectRoot, context2.options.sourceRoot, true, false);
|
|
593
593
|
stopwatch();
|
|
594
594
|
}
|
|
595
595
|
return context2;
|
|
@@ -598,11 +598,11 @@ _chunkBGYQAVKQcjs.__name.call(void 0, copyBuildAssets, "copyBuildAssets");
|
|
|
598
598
|
async function reportResults(context2) {
|
|
599
599
|
if (_optionalChain([context2, 'access', _22 => _22.result, 'optionalAccess', _23 => _23.errors, 'access', _24 => _24.length]) === 0) {
|
|
600
600
|
if (context2.result.warnings.length > 0) {
|
|
601
|
-
|
|
601
|
+
_chunk5LN4W7RScjs.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);
|
|
602
602
|
}
|
|
603
|
-
|
|
603
|
+
_chunk5LN4W7RScjs.writeSuccess.call(void 0, ` \u{1F4E6} The ${context2.options.name} build completed successfully`, context2.options.config);
|
|
604
604
|
} else if (_optionalChain([context2, 'access', _25 => _25.result, 'optionalAccess', _26 => _26.errors]) && _optionalChain([context2, 'access', _27 => _27.result, 'optionalAccess', _28 => _28.errors, 'access', _29 => _29.length]) > 0) {
|
|
605
|
-
|
|
605
|
+
_chunk5LN4W7RScjs.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);
|
|
606
606
|
throw new Error(`The ${context2.options.name} build failed with the following errors: ${context2.result.errors.map((error) => error.text).join("\n")}`);
|
|
607
607
|
}
|
|
608
608
|
}
|
|
@@ -629,7 +629,7 @@ async function dependencyCheck(options) {
|
|
|
629
629
|
write: false,
|
|
630
630
|
outdir: "out",
|
|
631
631
|
plugins: [
|
|
632
|
-
|
|
632
|
+
_chunkFYFB2IQYcjs.depsCheckPlugin.call(void 0, options.bundle)
|
|
633
633
|
]
|
|
634
634
|
});
|
|
635
635
|
await buildPromise.catch(() => {
|
|
@@ -639,17 +639,17 @@ async function dependencyCheck(options) {
|
|
|
639
639
|
_chunkBGYQAVKQcjs.__name.call(void 0, dependencyCheck, "dependencyCheck");
|
|
640
640
|
async function cleanOutputPath(context2) {
|
|
641
641
|
if (context2.options.clean !== false && context2.options.outdir) {
|
|
642
|
-
|
|
643
|
-
const stopwatch =
|
|
644
|
-
await
|
|
642
|
+
_chunk5LN4W7RScjs.writeDebug.call(void 0, ` \u{1F9F9} Cleaning ${context2.options.name} output path: ${context2.options.outdir}`, context2.options.config);
|
|
643
|
+
const stopwatch = _chunk5LN4W7RScjs.getStopwatch.call(void 0, `${context2.options.name} output clean`);
|
|
644
|
+
await _chunkVFORKCNScjs.cleanDirectories.call(void 0, context2.options.name, context2.options.outdir, context2.options.config);
|
|
645
645
|
stopwatch();
|
|
646
646
|
}
|
|
647
647
|
return context2;
|
|
648
648
|
}
|
|
649
649
|
_chunkBGYQAVKQcjs.__name.call(void 0, cleanOutputPath, "cleanOutputPath");
|
|
650
650
|
async function build2(options) {
|
|
651
|
-
|
|
652
|
-
const stopwatch =
|
|
651
|
+
_chunk5LN4W7RScjs.writeDebug.call(void 0, ` \u26A1 Executing Storm ESBuild pipeline`);
|
|
652
|
+
const stopwatch = _chunk5LN4W7RScjs.getStopwatch.call(void 0, "ESBuild pipeline");
|
|
653
653
|
try {
|
|
654
654
|
const opts = Array.isArray(options) ? options : [
|
|
655
655
|
options
|
|
@@ -659,9 +659,9 @@ async function build2(options) {
|
|
|
659
659
|
}
|
|
660
660
|
void transduce.async(opts, dependencyCheck);
|
|
661
661
|
await transduce.async(await createOptions(opts), pipe.async(generateContext, cleanOutputPath, generatePackageJson, executeTypescript, executeEsBuild, copyBuildAssets, reportResults));
|
|
662
|
-
|
|
662
|
+
_chunk5LN4W7RScjs.writeSuccess.call(void 0, " \u{1F3C1} ESBuild pipeline build completed successfully");
|
|
663
663
|
} catch (error) {
|
|
664
|
-
|
|
664
|
+
_chunk5LN4W7RScjs.writeFatal.call(void 0, "Fatal errors that the build process could not recover from have occured. The build process has been terminated.");
|
|
665
665
|
throw error;
|
|
666
666
|
} finally {
|
|
667
667
|
stopwatch();
|
|
@@ -689,9 +689,9 @@ var watch = /* @__PURE__ */ _chunkBGYQAVKQcjs.__name.call(void 0, (context2, opt
|
|
|
689
689
|
return context2.rebuild();
|
|
690
690
|
});
|
|
691
691
|
if (rebuildResult instanceof Error) {
|
|
692
|
-
|
|
692
|
+
_chunk5LN4W7RScjs.writeError.call(void 0, rebuildResult.message);
|
|
693
693
|
}
|
|
694
|
-
|
|
694
|
+
_chunk5LN4W7RScjs.writeTrace.call(void 0, `${Date.now() - timeBefore}ms [${_nullishCoalesce(options.name, () => ( ""))}]`);
|
|
695
695
|
}, 10);
|
|
696
696
|
changeWatcher.on("change", fastRebuild);
|
|
697
697
|
return void 0;
|
|
@@ -245,7 +245,7 @@ var stormWorkspaceConfigSchema = z.object({
|
|
|
245
245
|
"staging",
|
|
246
246
|
"production"
|
|
247
247
|
]).default("production").describe("The current runtime environment mode for the package"),
|
|
248
|
-
workspaceRoot: z.string().trim().
|
|
248
|
+
workspaceRoot: z.string().trim().describe("The root directory of the workspace"),
|
|
249
249
|
externalPackagePatterns: z.array(z.string()).default([]).describe("The build will use these package patterns to determine if they should be external to the bundle"),
|
|
250
250
|
skipCache: z.boolean().default(false).describe("Should all known types of workspace caching be skipped?"),
|
|
251
251
|
directories: WorkspaceDirectoryConfigSchema,
|
|
@@ -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 _chunk5LN4W7RScjs = require('./chunk-5LN4W7RS.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
|
+
_chunk5LN4W7RScjs.writeWarning.call(void 0, `Unused Dependencies: ${JSON.stringify(filteredUnusedDeps)}`);
|
|
90
|
+
_chunk5LN4W7RScjs.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)}
|
|
@@ -9,13 +9,13 @@ import {
|
|
|
9
9
|
} from "./chunk-LYDEMC26.js";
|
|
10
10
|
import {
|
|
11
11
|
onErrorPlugin
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-UAKT6QUX.js";
|
|
13
13
|
import {
|
|
14
14
|
resolvePathsPlugin
|
|
15
15
|
} from "./chunk-Q3LOGZKI.js";
|
|
16
16
|
import {
|
|
17
17
|
tscPlugin
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-IY7XC4HQ.js";
|
|
19
19
|
import {
|
|
20
20
|
COLOR_KEYS,
|
|
21
21
|
LogLevel,
|
|
@@ -31,7 +31,7 @@ import {
|
|
|
31
31
|
writeDebug,
|
|
32
32
|
writeTrace,
|
|
33
33
|
writeWarning
|
|
34
|
-
} from "./chunk-
|
|
34
|
+
} from "./chunk-EQ6TXPLW.js";
|
|
35
35
|
import {
|
|
36
36
|
correctPaths,
|
|
37
37
|
joinPaths
|
|
@@ -175,7 +175,7 @@ var addPackageDependencies = /* @__PURE__ */ __name(async (workspaceRoot, projec
|
|
|
175
175
|
}, packageJson.dependencies ?? {});
|
|
176
176
|
packageJson.devDependencies = localPackages.reduce((ret, localPackage) => {
|
|
177
177
|
if (!ret[localPackage.name] && implicitDependencies?.includes(localPackage.name) && packageJson.dependencies?.[localPackage.name] === void 0) {
|
|
178
|
-
ret[localPackage.name] = localPackage.version || "0.0.1"
|
|
178
|
+
ret[localPackage.name] = `^${localPackage.version || "0.0.1"}`;
|
|
179
179
|
}
|
|
180
180
|
return ret;
|
|
181
181
|
}, packageJson.devDependencies ?? {});
|
|
@@ -285,7 +285,7 @@ var getConfigFile = /* @__PURE__ */ __name(async (filePath, additionalFileNames
|
|
|
285
285
|
}
|
|
286
286
|
}
|
|
287
287
|
}
|
|
288
|
-
if (!config) {
|
|
288
|
+
if (!config || Object.keys(config).length === 0) {
|
|
289
289
|
return void 0;
|
|
290
290
|
}
|
|
291
291
|
config.configFile = configFile;
|
|
@@ -759,7 +759,7 @@ var setBaseThemeColorConfigEnv = /* @__PURE__ */ __name((prefix, config) => {
|
|
|
759
759
|
// ../config-tools/src/create-storm-config.ts
|
|
760
760
|
var _extension_cache = /* @__PURE__ */ new WeakMap();
|
|
761
761
|
var _static_cache = void 0;
|
|
762
|
-
var createStormWorkspaceConfig = /* @__PURE__ */ __name(async (extensionName, schema, workspaceRoot, skipLogs = false) => {
|
|
762
|
+
var createStormWorkspaceConfig = /* @__PURE__ */ __name(async (extensionName, schema, workspaceRoot, skipLogs = false, useDefault = true) => {
|
|
763
763
|
let result;
|
|
764
764
|
if (!_static_cache?.data || !_static_cache?.timestamp || _static_cache.timestamp < Date.now() - 8e3) {
|
|
765
765
|
let _workspaceRoot = workspaceRoot;
|
|
@@ -767,13 +767,18 @@ var createStormWorkspaceConfig = /* @__PURE__ */ __name(async (extensionName, sc
|
|
|
767
767
|
_workspaceRoot = findWorkspaceRoot();
|
|
768
768
|
}
|
|
769
769
|
const configEnv = getConfigEnv();
|
|
770
|
-
const defaultConfig = await getDefaultConfig(_workspaceRoot);
|
|
771
770
|
const configFile = await getConfigFile(_workspaceRoot);
|
|
772
|
-
if (!configFile
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
|
|
771
|
+
if (!configFile) {
|
|
772
|
+
if (!skipLogs) {
|
|
773
|
+
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", {
|
|
774
|
+
logLevel: "all"
|
|
775
|
+
});
|
|
776
|
+
}
|
|
777
|
+
if (useDefault === false) {
|
|
778
|
+
return void 0;
|
|
779
|
+
}
|
|
776
780
|
}
|
|
781
|
+
const defaultConfig = await getDefaultConfig(_workspaceRoot);
|
|
777
782
|
result = await stormWorkspaceConfigSchema.parseAsync(defu2(configEnv, configFile, defaultConfig));
|
|
778
783
|
result.workspaceRoot ??= _workspaceRoot;
|
|
779
784
|
} else {
|
|
@@ -806,7 +811,7 @@ var createConfigExtension = /* @__PURE__ */ __name((extensionName, schema) => {
|
|
|
806
811
|
return extension;
|
|
807
812
|
}, "createConfigExtension");
|
|
808
813
|
var loadStormWorkspaceConfig = /* @__PURE__ */ __name(async (workspaceRoot, skipLogs = false) => {
|
|
809
|
-
const config = await createStormWorkspaceConfig(void 0, void 0, workspaceRoot, skipLogs);
|
|
814
|
+
const config = await createStormWorkspaceConfig(void 0, void 0, workspaceRoot, skipLogs, true);
|
|
810
815
|
setConfigEnv(config);
|
|
811
816
|
if (!skipLogs && !config.skipConfigLogging) {
|
|
812
817
|
writeTrace(`\u2699\uFE0F Using Storm Workspace configuration:
|