@storm-software/esbuild 0.28.2 → 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/assets/cjs_shims.js +11 -0
- package/assets/esm_shims.js +9 -0
- package/bin/esbuild.cjs +5 -75
- 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 +8 -8
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 -->
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
// Shim globals in cjs bundle
|
|
2
|
+
// There's a weird bug that esbuild will always inject importMetaUrl
|
|
3
|
+
// if we export it as `const importMetaUrl = ... __filename ...`
|
|
4
|
+
// But using a function will not cause this issue
|
|
5
|
+
|
|
6
|
+
const getImportMetaUrl = () =>
|
|
7
|
+
typeof document === "undefined"
|
|
8
|
+
? new URL(`file:${__filename}`).href
|
|
9
|
+
: document.currentScript?.src || new URL("main.js", document.baseURI).href;
|
|
10
|
+
|
|
11
|
+
export const importMetaUrl = /* @__PURE__ */ getImportMetaUrl();
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
// Shim globals in esm bundle
|
|
2
|
+
import path from "node:path";
|
|
3
|
+
import { fileURLToPath } from "node:url";
|
|
4
|
+
|
|
5
|
+
const getFilename = () => fileURLToPath(import.meta.url);
|
|
6
|
+
const getDirname = () => path.dirname(getFilename());
|
|
7
|
+
|
|
8
|
+
export const __dirname = /* @__PURE__ */ getDirname();
|
|
9
|
+
export const __filename = /* @__PURE__ */ getFilename();
|
package/bin/esbuild.cjs
CHANGED
|
@@ -38,79 +38,7 @@ var import_console2 = require("@storm-software/config-tools/logger/console");
|
|
|
38
38
|
var import_get_log_level = require("@storm-software/config-tools/logger/get-log-level");
|
|
39
39
|
var import_correct_paths2 = require("@storm-software/config-tools/utilities/correct-paths");
|
|
40
40
|
var import_chokidar = require("chokidar");
|
|
41
|
-
|
|
42
|
-
// ../../node_modules/.pnpm/defu@6.1.4/node_modules/defu/dist/defu.mjs
|
|
43
|
-
function isPlainObject(value) {
|
|
44
|
-
if (value === null || typeof value !== "object") {
|
|
45
|
-
return false;
|
|
46
|
-
}
|
|
47
|
-
const prototype = Object.getPrototypeOf(value);
|
|
48
|
-
if (prototype !== null && prototype !== Object.prototype && Object.getPrototypeOf(prototype) !== null) {
|
|
49
|
-
return false;
|
|
50
|
-
}
|
|
51
|
-
if (Symbol.iterator in value) {
|
|
52
|
-
return false;
|
|
53
|
-
}
|
|
54
|
-
if (Symbol.toStringTag in value) {
|
|
55
|
-
return Object.prototype.toString.call(value) === "[object Module]";
|
|
56
|
-
}
|
|
57
|
-
return true;
|
|
58
|
-
}
|
|
59
|
-
__name(isPlainObject, "isPlainObject");
|
|
60
|
-
function _defu(baseObject, defaults, namespace = ".", merger) {
|
|
61
|
-
if (!isPlainObject(defaults)) {
|
|
62
|
-
return _defu(baseObject, {}, namespace, merger);
|
|
63
|
-
}
|
|
64
|
-
const object = Object.assign({}, defaults);
|
|
65
|
-
for (const key in baseObject) {
|
|
66
|
-
if (key === "__proto__" || key === "constructor") {
|
|
67
|
-
continue;
|
|
68
|
-
}
|
|
69
|
-
const value = baseObject[key];
|
|
70
|
-
if (value === null || value === void 0) {
|
|
71
|
-
continue;
|
|
72
|
-
}
|
|
73
|
-
if (merger && merger(object, key, value, namespace)) {
|
|
74
|
-
continue;
|
|
75
|
-
}
|
|
76
|
-
if (Array.isArray(value) && Array.isArray(object[key])) {
|
|
77
|
-
object[key] = [...value, ...object[key]];
|
|
78
|
-
} else if (isPlainObject(value) && isPlainObject(object[key])) {
|
|
79
|
-
object[key] = _defu(
|
|
80
|
-
value,
|
|
81
|
-
object[key],
|
|
82
|
-
(namespace ? `${namespace}.` : "") + key.toString(),
|
|
83
|
-
merger
|
|
84
|
-
);
|
|
85
|
-
} else {
|
|
86
|
-
object[key] = value;
|
|
87
|
-
}
|
|
88
|
-
}
|
|
89
|
-
return object;
|
|
90
|
-
}
|
|
91
|
-
__name(_defu, "_defu");
|
|
92
|
-
function createDefu(merger) {
|
|
93
|
-
return (...arguments_) => (
|
|
94
|
-
// eslint-disable-next-line unicorn/no-array-reduce
|
|
95
|
-
arguments_.reduce((p, c) => _defu(p, c, "", merger), {})
|
|
96
|
-
);
|
|
97
|
-
}
|
|
98
|
-
__name(createDefu, "createDefu");
|
|
99
|
-
var defu = createDefu();
|
|
100
|
-
var defuFn = createDefu((object, key, currentValue) => {
|
|
101
|
-
if (object[key] !== void 0 && typeof currentValue === "function") {
|
|
102
|
-
object[key] = currentValue(object[key]);
|
|
103
|
-
return true;
|
|
104
|
-
}
|
|
105
|
-
});
|
|
106
|
-
var defuArrayFn = createDefu((object, key, currentValue) => {
|
|
107
|
-
if (Array.isArray(object[key]) && typeof currentValue === "function") {
|
|
108
|
-
object[key] = currentValue(object[key]);
|
|
109
|
-
return true;
|
|
110
|
-
}
|
|
111
|
-
});
|
|
112
|
-
|
|
113
|
-
// src/build.ts
|
|
41
|
+
var import_defu = __toESM(require("defu"), 1);
|
|
114
42
|
var import_es_toolkit = require("es-toolkit");
|
|
115
43
|
var import_compat = require("es-toolkit/compat");
|
|
116
44
|
var esbuild2 = __toESM(require("esbuild"), 1);
|
|
@@ -797,7 +725,7 @@ var resolveOptions = /* @__PURE__ */ __name(async (userOptions) => {
|
|
|
797
725
|
if (!projectConfigurations?.projects?.[projectName]) {
|
|
798
726
|
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.");
|
|
799
727
|
}
|
|
800
|
-
const options =
|
|
728
|
+
const options = (0, import_defu.default)(userOptions, DEFAULT_BUILD_OPTIONS);
|
|
801
729
|
options.name ??= `${projectName}-${options.format}`;
|
|
802
730
|
options.target ??= import_build_tools.DEFAULT_TARGET;
|
|
803
731
|
const packageJsonPath = (0, import_correct_paths2.joinPaths)(workspaceRoot.dir, options.projectRoot, "package.json");
|
|
@@ -826,7 +754,7 @@ var resolveOptions = /* @__PURE__ */ __name(async (userOptions) => {
|
|
|
826
754
|
format: options.format || "cjs",
|
|
827
755
|
entryPoints: await (0, import_build_tools.getEntryPoints)(config, projectRoot, projectJson.sourceRoot, userOptions.entry || [
|
|
828
756
|
"./src/index.ts"
|
|
829
|
-
], userOptions.emitOnAll),
|
|
757
|
+
], userOptions.emitOnAll === true),
|
|
830
758
|
outdir: userOptions.outputPath || (0, import_correct_paths2.joinPaths)("dist", projectRoot),
|
|
831
759
|
plugins: [],
|
|
832
760
|
name: userOptions.name || projectName,
|
|
@@ -983,6 +911,8 @@ async function executeEsBuild(context2) {
|
|
|
983
911
|
delete options.renderers;
|
|
984
912
|
delete options.config;
|
|
985
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);
|
|
986
916
|
const result = await esbuild2.build(options);
|
|
987
917
|
if (result.metafile) {
|
|
988
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";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@storm-software/esbuild",
|
|
3
|
-
"version": "0.28.
|
|
3
|
+
"version": "0.28.4",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "A package containing `esbuild` utilities for building Storm Software libraries and applications",
|
|
6
6
|
"repository": {
|
|
@@ -125,7 +125,7 @@
|
|
|
125
125
|
}
|
|
126
126
|
},
|
|
127
127
|
"types": "./dist/index.d.ts",
|
|
128
|
-
"files": ["dist/**/*"],
|
|
128
|
+
"files": ["assets/**/*", "bin/**/*", "dist/**/*"],
|
|
129
129
|
"keywords": [
|
|
130
130
|
"esbuild",
|
|
131
131
|
"monorepo",
|
|
@@ -140,7 +140,7 @@
|
|
|
140
140
|
"@nx/js": "^20.3.1",
|
|
141
141
|
"@storm-software/build-tools": "workspace:*",
|
|
142
142
|
"@storm-software/config-tools": "workspace:*",
|
|
143
|
-
"esbuild": "^0.
|
|
143
|
+
"esbuild": "^0.25.0",
|
|
144
144
|
"spdx-exceptions": "^2.5.0",
|
|
145
145
|
"spdx-license-ids": "^3.0.20"
|
|
146
146
|
},
|
|
@@ -157,7 +157,9 @@
|
|
|
157
157
|
"dependencies": {
|
|
158
158
|
"chokidar": "^4.0.3",
|
|
159
159
|
"commander": "^12.1.0",
|
|
160
|
+
"defu": "6.1.4",
|
|
160
161
|
"es-toolkit": "^1.30.1",
|
|
162
|
+
"esbuild": "^0.25.0",
|
|
161
163
|
"globby": "^14.0.2",
|
|
162
164
|
"nx": "^20.3.1",
|
|
163
165
|
"prettier-plugin-organize-imports": "^4.0.0",
|
|
@@ -170,12 +172,10 @@
|
|
|
170
172
|
"@microsoft/api-extractor": "^7.48.1",
|
|
171
173
|
"@nx/devkit": "^20.3.1",
|
|
172
174
|
"@nx/js": "^20.3.1",
|
|
173
|
-
"@storm-software/build-tools": "
|
|
174
|
-
"@storm-software/config": "
|
|
175
|
-
"@storm-software/config-tools": "
|
|
175
|
+
"@storm-software/build-tools": "workspace:*",
|
|
176
|
+
"@storm-software/config": "workspace:*",
|
|
177
|
+
"@storm-software/config-tools": "workspace:*",
|
|
176
178
|
"@types/node": "^22.10.2",
|
|
177
|
-
"defu": "6.1.4",
|
|
178
|
-
"esbuild": "^0.24.0",
|
|
179
179
|
"rollup": "4.29.1",
|
|
180
180
|
"spdx-exceptions": "^2.5.0",
|
|
181
181
|
"spdx-license-ids": "^3.0.20"
|