@storm-software/esbuild 0.28.3 → 0.28.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/bin/esbuild.cjs +3 -1
- package/dist/build.cjs +3 -3
- package/dist/build.js +2 -2
- package/dist/{chunk-ZKTWGDCF.js → chunk-23MR4ZYO.js} +5 -2
- package/dist/{chunk-VZIK4SOK.js → chunk-TAPLEBNA.js} +4 -4
- package/dist/{chunk-5F7O7BRG.cjs → chunk-WL47LVKQ.cjs} +4 -4
- package/dist/{chunk-PLWHYEXL.cjs → chunk-WZSN6LWV.cjs} +18 -15
- package/dist/config.cjs +2 -2
- package/dist/config.js +1 -1
- package/dist/index.cjs +3 -3
- package/dist/index.js +2 -2
- package/package.json +1 -1
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/bin/esbuild.cjs
CHANGED
|
@@ -754,7 +754,7 @@ var resolveOptions = /* @__PURE__ */ __name(async (userOptions) => {
|
|
|
754
754
|
format: options.format || "cjs",
|
|
755
755
|
entryPoints: await (0, import_build_tools.getEntryPoints)(config, projectRoot, projectJson.sourceRoot, userOptions.entry || [
|
|
756
756
|
"./src/index.ts"
|
|
757
|
-
], userOptions.emitOnAll),
|
|
757
|
+
], userOptions.emitOnAll === true),
|
|
758
758
|
outdir: userOptions.outputPath || (0, import_correct_paths2.joinPaths)("dist", projectRoot),
|
|
759
759
|
plugins: [],
|
|
760
760
|
name: userOptions.name || projectName,
|
|
@@ -911,6 +911,8 @@ async function executeEsBuild(context2) {
|
|
|
911
911
|
delete options.renderers;
|
|
912
912
|
delete options.config;
|
|
913
913
|
delete options.injectShims;
|
|
914
|
+
(0, import_console2.writeTrace)(`Run esbuild (${context2.options.name}) with the following options:
|
|
915
|
+
${(0, import_console2.formatLogMessage)(options)}`, context2.options.config);
|
|
914
916
|
const result = await esbuild2.build(options);
|
|
915
917
|
if (result.metafile) {
|
|
916
918
|
const metafilePath = `${context2.options.outdir}/${context2.options.name}.meta.json`;
|
package/dist/build.cjs
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
3
|
|
|
4
|
-
var
|
|
4
|
+
var _chunkWZSN6LWVcjs = require('./chunk-WZSN6LWV.cjs');
|
|
5
5
|
require('./chunk-DITM26C7.cjs');
|
|
6
|
-
require('./chunk-
|
|
6
|
+
require('./chunk-WL47LVKQ.cjs');
|
|
7
7
|
require('./chunk-S6M44SSZ.cjs');
|
|
8
8
|
require('./chunk-WRBUO7H6.cjs');
|
|
9
9
|
require('./chunk-I2FH4C27.cjs');
|
|
@@ -18,4 +18,4 @@ require('./chunk-BGYQAVKQ.cjs');
|
|
|
18
18
|
|
|
19
19
|
|
|
20
20
|
|
|
21
|
-
exports.build =
|
|
21
|
+
exports.build = _chunkWZSN6LWVcjs.build; exports.cleanOutputPath = _chunkWZSN6LWVcjs.cleanOutputPath;
|
package/dist/build.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
build,
|
|
3
3
|
cleanOutputPath
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-23MR4ZYO.js";
|
|
5
5
|
import "./chunk-TUAAYWUJ.js";
|
|
6
|
-
import "./chunk-
|
|
6
|
+
import "./chunk-TAPLEBNA.js";
|
|
7
7
|
import "./chunk-T5272PC2.js";
|
|
8
8
|
import "./chunk-LYDEMC26.js";
|
|
9
9
|
import "./chunk-YWKYHSIN.js";
|
|
@@ -13,11 +13,12 @@ import {
|
|
|
13
13
|
getDefaultBuildPlugins,
|
|
14
14
|
getEntryPoints,
|
|
15
15
|
getEnv
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-TAPLEBNA.js";
|
|
17
17
|
import {
|
|
18
18
|
depsCheckPlugin
|
|
19
19
|
} from "./chunk-NCMOSDGN.js";
|
|
20
20
|
import {
|
|
21
|
+
formatLogMessage,
|
|
21
22
|
getStopwatch,
|
|
22
23
|
isVerbose,
|
|
23
24
|
writeDebug,
|
|
@@ -323,7 +324,7 @@ var resolveOptions = /* @__PURE__ */ __name(async (userOptions) => {
|
|
|
323
324
|
format: options.format || "cjs",
|
|
324
325
|
entryPoints: await getEntryPoints(config, projectRoot, projectJson.sourceRoot, userOptions.entry || [
|
|
325
326
|
"./src/index.ts"
|
|
326
|
-
], userOptions.emitOnAll),
|
|
327
|
+
], userOptions.emitOnAll === true),
|
|
327
328
|
outdir: userOptions.outputPath || joinPaths("dist", projectRoot),
|
|
328
329
|
plugins: [],
|
|
329
330
|
name: userOptions.name || projectName,
|
|
@@ -480,6 +481,8 @@ async function executeEsBuild(context2) {
|
|
|
480
481
|
delete options.renderers;
|
|
481
482
|
delete options.config;
|
|
482
483
|
delete options.injectShims;
|
|
484
|
+
writeTrace(`Run esbuild (${context2.options.name}) with the following options:
|
|
485
|
+
${formatLogMessage(options)}`, context2.options.config);
|
|
483
486
|
const result = await esbuild.build(options);
|
|
484
487
|
if (result.metafile) {
|
|
485
488
|
const metafilePath = `${context2.options.outdir}/${context2.options.name}.meta.json`;
|
|
@@ -785,13 +785,13 @@ var getConfig = /* @__PURE__ */ __name((workspaceRoot, skipLogs = false) => {
|
|
|
785
785
|
// ../build-tools/src/utilities/get-entry-points.ts
|
|
786
786
|
import { glob as glob2 } from "glob";
|
|
787
787
|
var getEntryPoints = /* @__PURE__ */ __name(async (config, projectRoot, sourceRoot, entry, emitOnAll = false) => {
|
|
788
|
-
const workspaceRoot = config.workspaceRoot
|
|
788
|
+
const workspaceRoot = config.workspaceRoot || findWorkspaceRoot();
|
|
789
789
|
const entryPoints = [];
|
|
790
790
|
if (entry) {
|
|
791
|
-
if (
|
|
792
|
-
entryPoints.push(...entry);
|
|
793
|
-
} else if (typeof entry === "string") {
|
|
791
|
+
if (typeof entry === "string") {
|
|
794
792
|
entryPoints.push(entry);
|
|
793
|
+
} else if (Array.isArray(entry)) {
|
|
794
|
+
entryPoints.push(...entry);
|
|
795
795
|
} else {
|
|
796
796
|
entryPoints.push(...Object.values(entry));
|
|
797
797
|
}
|
|
@@ -785,13 +785,13 @@ var getConfig = /* @__PURE__ */ _chunkBGYQAVKQcjs.__name.call(void 0, (workspace
|
|
|
785
785
|
// ../build-tools/src/utilities/get-entry-points.ts
|
|
786
786
|
|
|
787
787
|
var getEntryPoints = /* @__PURE__ */ _chunkBGYQAVKQcjs.__name.call(void 0, async (config, projectRoot, sourceRoot, entry, emitOnAll = false) => {
|
|
788
|
-
const workspaceRoot = config.workspaceRoot
|
|
788
|
+
const workspaceRoot = config.workspaceRoot || _chunkF665CCSScjs.findWorkspaceRoot.call(void 0, );
|
|
789
789
|
const entryPoints = [];
|
|
790
790
|
if (entry) {
|
|
791
|
-
if (
|
|
792
|
-
entryPoints.push(...entry);
|
|
793
|
-
} else if (typeof entry === "string") {
|
|
791
|
+
if (typeof entry === "string") {
|
|
794
792
|
entryPoints.push(entry);
|
|
793
|
+
} else if (Array.isArray(entry)) {
|
|
794
|
+
entryPoints.push(...entry);
|
|
795
795
|
} else {
|
|
796
796
|
entryPoints.push(...Object.values(entry));
|
|
797
797
|
}
|
|
@@ -13,7 +13,7 @@ var _chunkDITM26C7cjs = require('./chunk-DITM26C7.cjs');
|
|
|
13
13
|
|
|
14
14
|
|
|
15
15
|
|
|
16
|
-
var
|
|
16
|
+
var _chunkWL47LVKQcjs = require('./chunk-WL47LVKQ.cjs');
|
|
17
17
|
|
|
18
18
|
|
|
19
19
|
var _chunkDEO4HWIAcjs = require('./chunk-DEO4HWIA.cjs');
|
|
@@ -26,6 +26,7 @@ var _chunkDEO4HWIAcjs = require('./chunk-DEO4HWIA.cjs');
|
|
|
26
26
|
|
|
27
27
|
|
|
28
28
|
|
|
29
|
+
|
|
29
30
|
var _chunkF665CCSScjs = require('./chunk-F665CCSS.cjs');
|
|
30
31
|
|
|
31
32
|
|
|
@@ -277,7 +278,7 @@ var resolveOptions = /* @__PURE__ */ _chunkBGYQAVKQcjs.__name.call(void 0, async
|
|
|
277
278
|
if (!workspaceRoot) {
|
|
278
279
|
throw new Error("Cannot find Nx workspace root");
|
|
279
280
|
}
|
|
280
|
-
const config = await
|
|
281
|
+
const config = await _chunkWL47LVKQcjs.getConfig.call(void 0, workspaceRoot.dir);
|
|
281
282
|
_chunkF665CCSScjs.writeDebug.call(void 0, " \u2699\uFE0F Resolving build options", config);
|
|
282
283
|
const stopwatch = _chunkF665CCSScjs.getStopwatch.call(void 0, "Build options resolution");
|
|
283
284
|
const projectGraph = await _devkit.createProjectGraphAsync.call(void 0, {
|
|
@@ -294,14 +295,14 @@ var resolveOptions = /* @__PURE__ */ _chunkBGYQAVKQcjs.__name.call(void 0, async
|
|
|
294
295
|
if (!_optionalChain([projectConfigurations, 'optionalAccess', _14 => _14.projects, 'optionalAccess', _15 => _15[projectName]])) {
|
|
295
296
|
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.");
|
|
296
297
|
}
|
|
297
|
-
const options = _defu2.default.call(void 0, userOptions,
|
|
298
|
+
const options = _defu2.default.call(void 0, userOptions, _chunkWL47LVKQcjs.DEFAULT_BUILD_OPTIONS);
|
|
298
299
|
options.name ??= `${projectName}-${options.format}`;
|
|
299
|
-
options.target ??=
|
|
300
|
+
options.target ??= _chunkWL47LVKQcjs.DEFAULT_TARGET;
|
|
300
301
|
const packageJsonPath = _chunkXITTOHOGcjs.joinPaths.call(void 0, workspaceRoot.dir, options.projectRoot, "package.json");
|
|
301
302
|
if (!_fs.existsSync.call(void 0, packageJsonPath)) {
|
|
302
303
|
throw new Error("Cannot find package.json configuration");
|
|
303
304
|
}
|
|
304
|
-
const env =
|
|
305
|
+
const env = _chunkWL47LVKQcjs.getEnv.call(void 0, "esbuild", options);
|
|
305
306
|
const result = {
|
|
306
307
|
...options,
|
|
307
308
|
config,
|
|
@@ -321,9 +322,9 @@ var resolveOptions = /* @__PURE__ */ _chunkBGYQAVKQcjs.__name.call(void 0, async
|
|
|
321
322
|
...userOptions,
|
|
322
323
|
tsconfig: _chunkXITTOHOGcjs.joinPaths.call(void 0, projectRoot, userOptions.tsconfig ? userOptions.tsconfig.replace(projectRoot, "") : "tsconfig.json"),
|
|
323
324
|
format: options.format || "cjs",
|
|
324
|
-
entryPoints: await
|
|
325
|
+
entryPoints: await _chunkWL47LVKQcjs.getEntryPoints.call(void 0, config, projectRoot, projectJson.sourceRoot, userOptions.entry || [
|
|
325
326
|
"./src/index.ts"
|
|
326
|
-
], userOptions.emitOnAll),
|
|
327
|
+
], userOptions.emitOnAll === true),
|
|
327
328
|
outdir: userOptions.outputPath || _chunkXITTOHOGcjs.joinPaths.call(void 0, "dist", projectRoot),
|
|
328
329
|
plugins: [],
|
|
329
330
|
name: userOptions.name || projectName,
|
|
@@ -345,8 +346,8 @@ var resolveOptions = /* @__PURE__ */ _chunkBGYQAVKQcjs.__name.call(void 0, async
|
|
|
345
346
|
watch: userOptions.watch === true,
|
|
346
347
|
footer: userOptions.footer,
|
|
347
348
|
banner: {
|
|
348
|
-
js: options.banner ||
|
|
349
|
-
css: options.banner ||
|
|
349
|
+
js: options.banner || _chunkWL47LVKQcjs.DEFAULT_COMPILED_BANNER,
|
|
350
|
+
css: options.banner || _chunkWL47LVKQcjs.DEFAULT_COMPILED_BANNER
|
|
350
351
|
},
|
|
351
352
|
splitting: options.format === "iife" ? false : typeof options.splitting === "boolean" ? options.splitting : options.format === "esm",
|
|
352
353
|
treeShaking: options.format === "esm",
|
|
@@ -373,7 +374,7 @@ var resolveOptions = /* @__PURE__ */ _chunkBGYQAVKQcjs.__name.call(void 0, async
|
|
|
373
374
|
..._nullishCoalesce(options.inject, () => ( []))
|
|
374
375
|
].filter(Boolean)
|
|
375
376
|
};
|
|
376
|
-
result.plugins = _nullishCoalesce(userOptions.plugins, () => (
|
|
377
|
+
result.plugins = _nullishCoalesce(userOptions.plugins, () => ( _chunkWL47LVKQcjs.getDefaultBuildPlugins.call(void 0, userOptions, result)));
|
|
377
378
|
delete result.entry;
|
|
378
379
|
delete result.outputPath;
|
|
379
380
|
stopwatch();
|
|
@@ -392,11 +393,11 @@ async function generatePackageJson(context2) {
|
|
|
392
393
|
if (!packageJson) {
|
|
393
394
|
throw new Error("Cannot find package.json configuration file");
|
|
394
395
|
}
|
|
395
|
-
packageJson = await
|
|
396
|
-
packageJson = await
|
|
396
|
+
packageJson = await _chunkWL47LVKQcjs.addPackageDependencies.call(void 0, context2.options.config.workspaceRoot, context2.options.projectRoot, context2.options.projectName, packageJson);
|
|
397
|
+
packageJson = await _chunkWL47LVKQcjs.addWorkspacePackageJsonFields.call(void 0, context2.options.config, context2.options.projectRoot, context2.options.sourceRoot, context2.options.projectName, false, packageJson);
|
|
397
398
|
packageJson.exports ??= {};
|
|
398
399
|
packageJson.exports["./package.json"] ??= "./package.json";
|
|
399
|
-
packageJson.exports["."] ??=
|
|
400
|
+
packageJson.exports["."] ??= _chunkWL47LVKQcjs.addPackageJsonExport.call(void 0, "index", packageJson.type, context2.options.sourceRoot);
|
|
400
401
|
let entryPoints = [
|
|
401
402
|
{
|
|
402
403
|
in: "./src/index.ts",
|
|
@@ -414,7 +415,7 @@ async function generatePackageJson(context2) {
|
|
|
414
415
|
const split = entryPoint.out.split(".");
|
|
415
416
|
split.pop();
|
|
416
417
|
const entry = split.join(".").replaceAll("\\", "/");
|
|
417
|
-
packageJson.exports[`./${entry}`] ??=
|
|
418
|
+
packageJson.exports[`./${entry}`] ??= _chunkWL47LVKQcjs.addPackageJsonExport.call(void 0, entry, packageJson.type, context2.options.sourceRoot);
|
|
418
419
|
}
|
|
419
420
|
}
|
|
420
421
|
packageJson.main = packageJson.type === "commonjs" ? "./dist/index.js" : "./dist/index.cjs";
|
|
@@ -480,6 +481,8 @@ async function executeEsBuild(context2) {
|
|
|
480
481
|
delete options.renderers;
|
|
481
482
|
delete options.config;
|
|
482
483
|
delete options.injectShims;
|
|
484
|
+
_chunkF665CCSScjs.writeTrace.call(void 0, `Run esbuild (${context2.options.name}) with the following options:
|
|
485
|
+
${_chunkF665CCSScjs.formatLogMessage.call(void 0, options)}`, context2.options.config);
|
|
483
486
|
const result = await esbuild.build(options);
|
|
484
487
|
if (result.metafile) {
|
|
485
488
|
const metafilePath = `${context2.options.outdir}/${context2.options.name}.meta.json`;
|
|
@@ -493,7 +496,7 @@ async function copyBuildAssets(context2) {
|
|
|
493
496
|
if (_optionalChain([context2, 'access', _16 => _16.result, 'optionalAccess', _17 => _17.errors, 'access', _18 => _18.length]) === 0) {
|
|
494
497
|
_chunkF665CCSScjs.writeDebug.call(void 0, ` \u{1F4CB} Copying asset files to output directory: ${context2.options.outdir}`, context2.options.config);
|
|
495
498
|
const stopwatch = _chunkF665CCSScjs.getStopwatch.call(void 0, `${context2.options.name} asset copy`);
|
|
496
|
-
await
|
|
499
|
+
await _chunkWL47LVKQcjs.copyAssets.call(void 0, context2.options.config, _nullishCoalesce(context2.options.assets, () => ( [])), context2.options.outdir, context2.options.projectRoot, context2.options.sourceRoot, true, false);
|
|
497
500
|
stopwatch();
|
|
498
501
|
}
|
|
499
502
|
return context2;
|
package/dist/config.cjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
3
|
|
|
4
|
-
var
|
|
4
|
+
var _chunkWL47LVKQcjs = require('./chunk-WL47LVKQ.cjs');
|
|
5
5
|
require('./chunk-S6M44SSZ.cjs');
|
|
6
6
|
require('./chunk-WRBUO7H6.cjs');
|
|
7
7
|
require('./chunk-I2FH4C27.cjs');
|
|
@@ -15,4 +15,4 @@ require('./chunk-BGYQAVKQ.cjs');
|
|
|
15
15
|
|
|
16
16
|
|
|
17
17
|
|
|
18
|
-
exports.DEFAULT_BUILD_OPTIONS =
|
|
18
|
+
exports.DEFAULT_BUILD_OPTIONS = _chunkWL47LVKQcjs.DEFAULT_BUILD_OPTIONS; exports.getDefaultBuildPlugins = _chunkWL47LVKQcjs.getDefaultBuildPlugins;
|
package/dist/config.js
CHANGED
package/dist/index.cjs
CHANGED
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
|
|
8
8
|
|
|
9
9
|
|
|
10
|
-
var
|
|
10
|
+
var _chunkWZSN6LWVcjs = require('./chunk-WZSN6LWV.cjs');
|
|
11
11
|
|
|
12
12
|
|
|
13
13
|
|
|
@@ -15,7 +15,7 @@ var _chunkDITM26C7cjs = require('./chunk-DITM26C7.cjs');
|
|
|
15
15
|
|
|
16
16
|
|
|
17
17
|
|
|
18
|
-
var
|
|
18
|
+
var _chunkWL47LVKQcjs = require('./chunk-WL47LVKQ.cjs');
|
|
19
19
|
require('./chunk-S6M44SSZ.cjs');
|
|
20
20
|
require('./chunk-WRBUO7H6.cjs');
|
|
21
21
|
require('./chunk-I2FH4C27.cjs');
|
|
@@ -41,4 +41,4 @@ require('./chunk-BGYQAVKQ.cjs');
|
|
|
41
41
|
|
|
42
42
|
|
|
43
43
|
|
|
44
|
-
exports.DEFAULT_BUILD_OPTIONS =
|
|
44
|
+
exports.DEFAULT_BUILD_OPTIONS = _chunkWL47LVKQcjs.DEFAULT_BUILD_OPTIONS; exports.Filter = _chunkWZSN6LWVcjs.Filter; exports.Mapper = _chunkWZSN6LWVcjs.Mapper; exports.build = _chunkWZSN6LWVcjs.build; exports.clean = _chunkDITM26C7cjs.clean; exports.cleanDirectories = _chunkDITM26C7cjs.cleanDirectories; exports.cleanOutputPath = _chunkWZSN6LWVcjs.cleanOutputPath; exports.getDefaultBuildPlugins = _chunkWL47LVKQcjs.getDefaultBuildPlugins; exports.handle = _chunkWZSN6LWVcjs.handle; exports.pipe = _chunkWZSN6LWVcjs.pipe; exports.skip = _chunkWZSN6LWVcjs.skip; exports.transduce = _chunkWZSN6LWVcjs.transduce;
|
package/dist/index.js
CHANGED
|
@@ -7,7 +7,7 @@ import {
|
|
|
7
7
|
pipe,
|
|
8
8
|
skip,
|
|
9
9
|
transduce
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-23MR4ZYO.js";
|
|
11
11
|
import {
|
|
12
12
|
clean,
|
|
13
13
|
cleanDirectories
|
|
@@ -15,7 +15,7 @@ import {
|
|
|
15
15
|
import {
|
|
16
16
|
DEFAULT_BUILD_OPTIONS,
|
|
17
17
|
getDefaultBuildPlugins
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-TAPLEBNA.js";
|
|
19
19
|
import "./chunk-T5272PC2.js";
|
|
20
20
|
import "./chunk-LYDEMC26.js";
|
|
21
21
|
import "./chunk-YWKYHSIN.js";
|