@storm-software/esbuild 0.31.28 → 0.31.30
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/bin/esbuild.cjs +9 -6
- package/dist/build.cjs +8 -8
- package/dist/build.js +7 -7
- package/dist/{chunk-NR55GSOK.js → chunk-4F2UUEOG.js} +1 -1
- package/dist/{chunk-A3LV5XYV.cjs → chunk-4I65QR6D.cjs} +43 -41
- package/dist/{chunk-YK3LK2JZ.cjs → chunk-6D27C2MD.cjs} +2 -2
- package/dist/{chunk-QJ5VE3PG.js → chunk-DJBLQVO3.js} +1 -1
- package/dist/{chunk-LYGJRBW3.js → chunk-F55MDH52.js} +14 -15
- package/dist/{chunk-MP6USOJU.js → chunk-LTXLRCFK.js} +1 -1
- package/dist/{chunk-EBJG5FWJ.cjs → chunk-MECU4TGM.cjs} +41 -42
- package/dist/{chunk-EMOTV6ML.js → chunk-O2DGD74J.js} +11 -9
- package/dist/{chunk-SGTMRJLZ.js → chunk-OS6IORPL.js} +2 -2
- package/dist/{chunk-UONT522M.cjs → chunk-QICNNYHX.cjs} +2 -2
- package/dist/{chunk-FY4GMRVA.cjs → chunk-S2QQQQC4.cjs} +3 -3
- package/dist/{chunk-IQNPH4CN.cjs → chunk-UFNNCUFM.cjs} +2 -2
- package/dist/{chunk-ATQXZL2N.cjs → chunk-XF4W7Y5G.cjs} +3 -3
- package/dist/{chunk-ILLWUPTW.js → chunk-YSMZ4KXD.js} +1 -1
- package/dist/clean.cjs +3 -3
- package/dist/clean.d.cts +36 -20
- package/dist/clean.d.ts +36 -20
- 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/dist/types.d.cts +3 -3
- package/dist/types.d.ts +3 -3
- package/package.json +4 -4
package/bin/esbuild.cjs
CHANGED
|
@@ -759,7 +759,7 @@ var resolveOptions = /* @__PURE__ */ __name(async (userOptions) => {
|
|
|
759
759
|
...userOptions,
|
|
760
760
|
tsconfig: (0, import_correct_paths2.joinPaths)(projectRoot, userOptions.tsconfig ? userOptions.tsconfig.replace(projectRoot, "") : "tsconfig.json"),
|
|
761
761
|
format: options.format || "cjs",
|
|
762
|
-
entryPoints: await (0, import_build_tools.getEntryPoints)(config, projectRoot, projectJson.sourceRoot, userOptions.entry ?? "./src/index.ts",
|
|
762
|
+
entryPoints: await (0, import_build_tools.getEntryPoints)(config, projectRoot, projectJson.sourceRoot, userOptions.entry ?? "./src/index.ts", false),
|
|
763
763
|
outdir: userOptions.outputPath || (0, import_correct_paths2.joinPaths)("dist", projectRoot),
|
|
764
764
|
distDir: userOptions.distDir || "dist",
|
|
765
765
|
plugins: [],
|
|
@@ -774,7 +774,6 @@ var resolveOptions = /* @__PURE__ */ __name(async (userOptions) => {
|
|
|
774
774
|
metafile: userOptions.metafile !== false,
|
|
775
775
|
generatePackageJson: userOptions.generatePackageJson !== false,
|
|
776
776
|
clean: userOptions.clean !== false,
|
|
777
|
-
emitOnAll: userOptions.emitOnAll === true,
|
|
778
777
|
assets: userOptions.assets ?? [],
|
|
779
778
|
injectShims: userOptions.injectShims !== true,
|
|
780
779
|
bundle: userOptions.bundle !== false,
|
|
@@ -851,7 +850,7 @@ async function generatePackageJson(context2) {
|
|
|
851
850
|
if (Array.isArray(context2.options.entryPoints)) {
|
|
852
851
|
entryPoints = context2.options.entryPoints.map((entryPoint) => typeof entryPoint === "string" ? {
|
|
853
852
|
in: entryPoint,
|
|
854
|
-
out: entryPoint
|
|
853
|
+
out: (0, import_correct_paths2.correctPaths)(entryPoint.replaceAll((0, import_correct_paths2.correctPaths)(context2.options.config.workspaceRoot), "").replaceAll((0, import_correct_paths2.correctPaths)(context2.options.projectRoot), ""))
|
|
855
854
|
} : entryPoint);
|
|
856
855
|
}
|
|
857
856
|
for (const entryPoint of entryPoints) {
|
|
@@ -922,7 +921,6 @@ async function executeEsBuild(context2) {
|
|
|
922
921
|
delete options.clean;
|
|
923
922
|
delete options.debug;
|
|
924
923
|
delete options.generatePackageJson;
|
|
925
|
-
delete options.emitOnAll;
|
|
926
924
|
delete options.distDir;
|
|
927
925
|
delete options.includeSrc;
|
|
928
926
|
delete options.verbose;
|
|
@@ -935,7 +933,10 @@ async function executeEsBuild(context2) {
|
|
|
935
933
|
delete options.injectShims;
|
|
936
934
|
delete options.external;
|
|
937
935
|
(0, import_console2.writeTrace)(`Run esbuild (${context2.options.name}) with the following options:
|
|
938
|
-
${(0, import_console2.formatLogMessage)(
|
|
936
|
+
${(0, import_console2.formatLogMessage)({
|
|
937
|
+
...options,
|
|
938
|
+
define: "<Hidden>"
|
|
939
|
+
})}`, context2.options.config);
|
|
939
940
|
const result = await esbuild2.build(options);
|
|
940
941
|
await esbuild2.stop();
|
|
941
942
|
if (result.metafile) {
|
|
@@ -1062,7 +1063,9 @@ async function createProgram(config) {
|
|
|
1062
1063
|
const root = (0, import_find_workspace_root2.findWorkspaceRootSafe)();
|
|
1063
1064
|
process.env.STORM_WORKSPACE_ROOT ??= root;
|
|
1064
1065
|
process.env.NX_WORKSPACE_ROOT_PATH ??= root;
|
|
1065
|
-
|
|
1066
|
+
if (root) {
|
|
1067
|
+
process.chdir(root);
|
|
1068
|
+
}
|
|
1066
1069
|
const program = new import_commander.Command("storm-esbuild");
|
|
1067
1070
|
program.version("1.0.0", "-v --version", "display CLI version");
|
|
1068
1071
|
program.description("\u26A1 Run the Storm ESBuild pipeline").showHelpAfterError().showSuggestionAfterError();
|
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 _chunk4I65QR6Dcjs = require('./chunk-4I65QR6D.cjs');
|
|
5
|
+
require('./chunk-XF4W7Y5G.cjs');
|
|
6
|
+
require('./chunk-MECU4TGM.cjs');
|
|
7
7
|
require('./chunk-S6M44SSZ.cjs');
|
|
8
8
|
require('./chunk-WRBUO7H6.cjs');
|
|
9
|
-
require('./chunk-
|
|
9
|
+
require('./chunk-QICNNYHX.cjs');
|
|
10
10
|
require('./chunk-SSEYS7LI.cjs');
|
|
11
|
-
require('./chunk-
|
|
12
|
-
require('./chunk-
|
|
13
|
-
require('./chunk-
|
|
11
|
+
require('./chunk-6D27C2MD.cjs');
|
|
12
|
+
require('./chunk-S2QQQQC4.cjs');
|
|
13
|
+
require('./chunk-UFNNCUFM.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 = _chunk4I65QR6Dcjs.build; exports.cleanOutputPath = _chunk4I65QR6Dcjs.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-O2DGD74J.js";
|
|
5
|
+
import "./chunk-DJBLQVO3.js";
|
|
6
|
+
import "./chunk-F55MDH52.js";
|
|
7
7
|
import "./chunk-T5272PC2.js";
|
|
8
8
|
import "./chunk-LYDEMC26.js";
|
|
9
|
-
import "./chunk-
|
|
9
|
+
import "./chunk-LTXLRCFK.js";
|
|
10
10
|
import "./chunk-Q3LOGZKI.js";
|
|
11
|
-
import "./chunk-
|
|
12
|
-
import "./chunk-
|
|
13
|
-
import "./chunk-
|
|
11
|
+
import "./chunk-4F2UUEOG.js";
|
|
12
|
+
import "./chunk-YSMZ4KXD.js";
|
|
13
|
+
import "./chunk-OS6IORPL.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 _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 _chunkXF4W7Y5Gcjs = require('./chunk-XF4W7Y5G.cjs');
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
|
|
@@ -12,10 +12,10 @@ var _chunkATQXZL2Ncjs = require('./chunk-ATQXZL2N.cjs');
|
|
|
12
12
|
|
|
13
13
|
|
|
14
14
|
|
|
15
|
-
var
|
|
15
|
+
var _chunkMECU4TGMcjs = require('./chunk-MECU4TGM.cjs');
|
|
16
16
|
|
|
17
17
|
|
|
18
|
-
var
|
|
18
|
+
var _chunkS2QQQQC4cjs = require('./chunk-S2QQQQC4.cjs');
|
|
19
19
|
|
|
20
20
|
|
|
21
21
|
|
|
@@ -26,7 +26,8 @@ var _chunkFY4GMRVAcjs = require('./chunk-FY4GMRVA.cjs');
|
|
|
26
26
|
|
|
27
27
|
|
|
28
28
|
|
|
29
|
-
var
|
|
29
|
+
var _chunkUFNNCUFMcjs = require('./chunk-UFNNCUFM.cjs');
|
|
30
|
+
|
|
30
31
|
|
|
31
32
|
|
|
32
33
|
var _chunkXITTOHOGcjs = require('./chunk-XITTOHOG.cjs');
|
|
@@ -277,9 +278,9 @@ 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
|
-
|
|
282
|
-
const stopwatch =
|
|
281
|
+
const config = await _chunkMECU4TGMcjs.getConfig.call(void 0, workspaceRoot.dir);
|
|
282
|
+
_chunkUFNNCUFMcjs.writeDebug.call(void 0, " \u2699\uFE0F Resolving build options", config);
|
|
283
|
+
const stopwatch = _chunkUFNNCUFMcjs.getStopwatch.call(void 0, "Build options resolution");
|
|
283
284
|
const projectGraph = await _devkit.createProjectGraphAsync.call(void 0, {
|
|
284
285
|
exitOnError: true
|
|
285
286
|
});
|
|
@@ -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, _chunkMECU4TGMcjs.DEFAULT_BUILD_OPTIONS);
|
|
298
299
|
options.name ??= `${projectName}-${options.format}`;
|
|
299
|
-
options.target ??=
|
|
300
|
+
options.target ??= _chunkMECU4TGMcjs.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 = _chunkMECU4TGMcjs.getEnv.call(void 0, "esbuild", options);
|
|
305
306
|
const result = {
|
|
306
307
|
...options,
|
|
307
308
|
config,
|
|
@@ -316,7 +317,7 @@ var resolveOptions = /* @__PURE__ */ _chunkBGYQAVKQcjs.__name.call(void 0, async
|
|
|
316
317
|
...userOptions,
|
|
317
318
|
tsconfig: _chunkXITTOHOGcjs.joinPaths.call(void 0, projectRoot, userOptions.tsconfig ? userOptions.tsconfig.replace(projectRoot, "") : "tsconfig.json"),
|
|
318
319
|
format: options.format || "cjs",
|
|
319
|
-
entryPoints: await
|
|
320
|
+
entryPoints: await _chunkMECU4TGMcjs.getEntryPoints.call(void 0, config, projectRoot, projectJson.sourceRoot, _nullishCoalesce(userOptions.entry, () => ( "./src/index.ts")), false),
|
|
320
321
|
outdir: userOptions.outputPath || _chunkXITTOHOGcjs.joinPaths.call(void 0, "dist", projectRoot),
|
|
321
322
|
distDir: userOptions.distDir || "dist",
|
|
322
323
|
plugins: [],
|
|
@@ -326,12 +327,11 @@ var resolveOptions = /* @__PURE__ */ _chunkBGYQAVKQcjs.__name.call(void 0, async
|
|
|
326
327
|
projectGraph,
|
|
327
328
|
sourceRoot: userOptions.sourceRoot || projectJson.sourceRoot || _chunkXITTOHOGcjs.joinPaths.call(void 0, projectRoot, "src"),
|
|
328
329
|
minify: userOptions.minify || !userOptions.debug,
|
|
329
|
-
verbose: userOptions.verbose ||
|
|
330
|
+
verbose: userOptions.verbose || _chunkUFNNCUFMcjs.isVerbose.call(void 0, ) || userOptions.debug === true,
|
|
330
331
|
includeSrc: userOptions.includeSrc === true,
|
|
331
332
|
metafile: userOptions.metafile !== false,
|
|
332
333
|
generatePackageJson: userOptions.generatePackageJson !== false,
|
|
333
334
|
clean: userOptions.clean !== false,
|
|
334
|
-
emitOnAll: userOptions.emitOnAll === true,
|
|
335
335
|
assets: _nullishCoalesce(userOptions.assets, () => ( [])),
|
|
336
336
|
injectShims: userOptions.injectShims !== true,
|
|
337
337
|
bundle: userOptions.bundle !== false,
|
|
@@ -339,8 +339,8 @@ var resolveOptions = /* @__PURE__ */ _chunkBGYQAVKQcjs.__name.call(void 0, async
|
|
|
339
339
|
watch: userOptions.watch === true,
|
|
340
340
|
footer: userOptions.footer,
|
|
341
341
|
banner: {
|
|
342
|
-
js: options.banner ||
|
|
343
|
-
css: options.banner ||
|
|
342
|
+
js: options.banner || _chunkMECU4TGMcjs.DEFAULT_COMPILED_BANNER,
|
|
343
|
+
css: options.banner || _chunkMECU4TGMcjs.DEFAULT_COMPILED_BANNER
|
|
344
344
|
},
|
|
345
345
|
splitting: options.format === "iife" ? false : typeof options.splitting === "boolean" ? options.splitting : options.format === "esm",
|
|
346
346
|
treeShaking: options.format === "esm",
|
|
@@ -366,7 +366,7 @@ var resolveOptions = /* @__PURE__ */ _chunkBGYQAVKQcjs.__name.call(void 0, async
|
|
|
366
366
|
options.format === "esm" && options.injectShims && options.platform === "node" ? _chunkXITTOHOGcjs.joinPaths.call(void 0, __dirname, "../assets/esm_shims.js") : void 0
|
|
367
367
|
].filter(Boolean)
|
|
368
368
|
};
|
|
369
|
-
result.plugins = _nullishCoalesce(userOptions.plugins, () => (
|
|
369
|
+
result.plugins = _nullishCoalesce(userOptions.plugins, () => ( _chunkMECU4TGMcjs.getDefaultBuildPlugins.call(void 0, userOptions, result)));
|
|
370
370
|
if (options.inject && Array.isArray(options.inject) && options.inject.length > 0) {
|
|
371
371
|
result.inject = options.inject.reduce((ret, inj) => {
|
|
372
372
|
if (inj && typeof inj === "string" && ret.includes(inj)) {
|
|
@@ -382,8 +382,8 @@ var resolveOptions = /* @__PURE__ */ _chunkBGYQAVKQcjs.__name.call(void 0, async
|
|
|
382
382
|
}, "resolveOptions");
|
|
383
383
|
async function generatePackageJson(context2) {
|
|
384
384
|
if (context2.options.generatePackageJson !== false && _fs.existsSync.call(void 0, _chunkXITTOHOGcjs.joinPaths.call(void 0, context2.options.projectRoot, "package.json"))) {
|
|
385
|
-
|
|
386
|
-
const stopwatch =
|
|
385
|
+
_chunkUFNNCUFMcjs.writeDebug.call(void 0, " \u270D\uFE0F Writing package.json file", context2.options.config);
|
|
386
|
+
const stopwatch = _chunkUFNNCUFMcjs.getStopwatch.call(void 0, "Write package.json file");
|
|
387
387
|
const packageJsonPath = _chunkXITTOHOGcjs.joinPaths.call(void 0, context2.options.projectRoot, "project.json");
|
|
388
388
|
if (!_fs.existsSync.call(void 0, packageJsonPath)) {
|
|
389
389
|
throw new Error("Cannot find package.json configuration");
|
|
@@ -393,8 +393,8 @@ async function generatePackageJson(context2) {
|
|
|
393
393
|
if (!packageJson) {
|
|
394
394
|
throw new Error("Cannot find package.json configuration file");
|
|
395
395
|
}
|
|
396
|
-
packageJson = await
|
|
397
|
-
packageJson = await
|
|
396
|
+
packageJson = await _chunkMECU4TGMcjs.addPackageDependencies.call(void 0, context2.options.config.workspaceRoot, context2.options.projectRoot, context2.options.projectName, packageJson);
|
|
397
|
+
packageJson = await _chunkMECU4TGMcjs.addWorkspacePackageJsonFields.call(void 0, context2.options.config, context2.options.projectRoot, context2.options.sourceRoot, context2.options.projectName, false, packageJson);
|
|
398
398
|
packageJson.exports ??= {};
|
|
399
399
|
packageJson.exports["./package.json"] ??= "./package.json";
|
|
400
400
|
packageJson.exports["."] ??= `.${context2.options.distDir ? `/${context2.options.distDir}` : ""}/index.js`;
|
|
@@ -408,7 +408,7 @@ async function generatePackageJson(context2) {
|
|
|
408
408
|
if (Array.isArray(context2.options.entryPoints)) {
|
|
409
409
|
entryPoints = context2.options.entryPoints.map((entryPoint) => typeof entryPoint === "string" ? {
|
|
410
410
|
in: entryPoint,
|
|
411
|
-
out: entryPoint
|
|
411
|
+
out: _chunkXITTOHOGcjs.correctPaths.call(void 0, entryPoint.replaceAll(_chunkXITTOHOGcjs.correctPaths.call(void 0, context2.options.config.workspaceRoot), "").replaceAll(_chunkXITTOHOGcjs.correctPaths.call(void 0, context2.options.projectRoot), ""))
|
|
412
412
|
} : entryPoint);
|
|
413
413
|
}
|
|
414
414
|
for (const entryPoint of entryPoints) {
|
|
@@ -456,8 +456,8 @@ async function generateContext(getOptions) {
|
|
|
456
456
|
}
|
|
457
457
|
_chunkBGYQAVKQcjs.__name.call(void 0, generateContext, "generateContext");
|
|
458
458
|
async function executeEsBuild(context2) {
|
|
459
|
-
|
|
460
|
-
const stopwatch =
|
|
459
|
+
_chunkUFNNCUFMcjs.writeDebug.call(void 0, ` \u{1F680} Running ${context2.options.name} build`, context2.options.config);
|
|
460
|
+
const stopwatch = _chunkUFNNCUFMcjs.getStopwatch.call(void 0, `${context2.options.name} build`);
|
|
461
461
|
if (process.env.STORM_WATCH) {
|
|
462
462
|
const ctx = await esbuild.context(context2.options);
|
|
463
463
|
watch(ctx, context2.options);
|
|
@@ -479,7 +479,6 @@ async function executeEsBuild(context2) {
|
|
|
479
479
|
delete options.clean;
|
|
480
480
|
delete options.debug;
|
|
481
481
|
delete options.generatePackageJson;
|
|
482
|
-
delete options.emitOnAll;
|
|
483
482
|
delete options.distDir;
|
|
484
483
|
delete options.includeSrc;
|
|
485
484
|
delete options.verbose;
|
|
@@ -491,8 +490,11 @@ async function executeEsBuild(context2) {
|
|
|
491
490
|
delete options.config;
|
|
492
491
|
delete options.injectShims;
|
|
493
492
|
delete options.external;
|
|
494
|
-
|
|
495
|
-
${
|
|
493
|
+
_chunkUFNNCUFMcjs.writeTrace.call(void 0, `Run esbuild (${context2.options.name}) with the following options:
|
|
494
|
+
${_chunkUFNNCUFMcjs.formatLogMessage.call(void 0, {
|
|
495
|
+
...options,
|
|
496
|
+
define: "<Hidden>"
|
|
497
|
+
})}`, context2.options.config);
|
|
496
498
|
const result = await esbuild.build(options);
|
|
497
499
|
await esbuild.stop();
|
|
498
500
|
if (result.metafile) {
|
|
@@ -505,9 +507,9 @@ ${_chunkIQNPH4CNcjs.formatLogMessage.call(void 0, options)}`, context2.options.c
|
|
|
505
507
|
_chunkBGYQAVKQcjs.__name.call(void 0, executeEsBuild, "executeEsBuild");
|
|
506
508
|
async function copyBuildAssets(context2) {
|
|
507
509
|
if (_optionalChain([context2, 'access', _16 => _16.result, 'optionalAccess', _17 => _17.errors, 'access', _18 => _18.length]) === 0) {
|
|
508
|
-
|
|
509
|
-
const stopwatch =
|
|
510
|
-
await
|
|
510
|
+
_chunkUFNNCUFMcjs.writeDebug.call(void 0, ` \u{1F4CB} Copying asset files to output directory: ${context2.options.outdir}`, context2.options.config);
|
|
511
|
+
const stopwatch = _chunkUFNNCUFMcjs.getStopwatch.call(void 0, `${context2.options.name} asset copy`);
|
|
512
|
+
await _chunkMECU4TGMcjs.copyAssets.call(void 0, context2.options.config, _nullishCoalesce(context2.options.assets, () => ( [])), context2.options.outdir, context2.options.projectRoot, context2.options.sourceRoot, true, false);
|
|
511
513
|
stopwatch();
|
|
512
514
|
}
|
|
513
515
|
return context2;
|
|
@@ -516,9 +518,9 @@ _chunkBGYQAVKQcjs.__name.call(void 0, copyBuildAssets, "copyBuildAssets");
|
|
|
516
518
|
async function reportResults(context2) {
|
|
517
519
|
if (_optionalChain([context2, 'access', _19 => _19.result, 'optionalAccess', _20 => _20.errors, 'access', _21 => _21.length]) === 0) {
|
|
518
520
|
if (context2.result.warnings.length > 0) {
|
|
519
|
-
|
|
521
|
+
_chunkUFNNCUFMcjs.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);
|
|
520
522
|
}
|
|
521
|
-
|
|
523
|
+
_chunkUFNNCUFMcjs.writeSuccess.call(void 0, ` \u{1F4E6} The ${context2.options.name} build completed successfully`, context2.options.config);
|
|
522
524
|
}
|
|
523
525
|
}
|
|
524
526
|
_chunkBGYQAVKQcjs.__name.call(void 0, reportResults, "reportResults");
|
|
@@ -544,7 +546,7 @@ async function dependencyCheck(options) {
|
|
|
544
546
|
write: false,
|
|
545
547
|
outdir: "out",
|
|
546
548
|
plugins: [
|
|
547
|
-
|
|
549
|
+
_chunkS2QQQQC4cjs.depsCheckPlugin.call(void 0, options.bundle)
|
|
548
550
|
]
|
|
549
551
|
});
|
|
550
552
|
await buildPromise.catch(() => {
|
|
@@ -554,17 +556,17 @@ async function dependencyCheck(options) {
|
|
|
554
556
|
_chunkBGYQAVKQcjs.__name.call(void 0, dependencyCheck, "dependencyCheck");
|
|
555
557
|
async function cleanOutputPath(context2) {
|
|
556
558
|
if (context2.options.clean !== false && context2.options.outdir) {
|
|
557
|
-
|
|
558
|
-
const stopwatch =
|
|
559
|
-
await
|
|
559
|
+
_chunkUFNNCUFMcjs.writeDebug.call(void 0, ` \u{1F9F9} Cleaning ${context2.options.name} output path: ${context2.options.outdir}`, context2.options.config);
|
|
560
|
+
const stopwatch = _chunkUFNNCUFMcjs.getStopwatch.call(void 0, `${context2.options.name} output clean`);
|
|
561
|
+
await _chunkXF4W7Y5Gcjs.cleanDirectories.call(void 0, context2.options.name, context2.options.outdir, context2.options.config);
|
|
560
562
|
stopwatch();
|
|
561
563
|
}
|
|
562
564
|
return context2;
|
|
563
565
|
}
|
|
564
566
|
_chunkBGYQAVKQcjs.__name.call(void 0, cleanOutputPath, "cleanOutputPath");
|
|
565
567
|
async function build2(options) {
|
|
566
|
-
|
|
567
|
-
const stopwatch =
|
|
568
|
+
_chunkUFNNCUFMcjs.writeDebug.call(void 0, ` \u26A1 Executing Storm ESBuild pipeline`);
|
|
569
|
+
const stopwatch = _chunkUFNNCUFMcjs.getStopwatch.call(void 0, "ESBuild pipeline");
|
|
568
570
|
try {
|
|
569
571
|
const opts = Array.isArray(options) ? options : [
|
|
570
572
|
options
|
|
@@ -574,9 +576,9 @@ async function build2(options) {
|
|
|
574
576
|
}
|
|
575
577
|
void transduce.async(opts, dependencyCheck);
|
|
576
578
|
await transduce.async(await createOptions(opts), pipe.async(generateContext, cleanOutputPath, generatePackageJson, executeEsBuild, copyBuildAssets, reportResults));
|
|
577
|
-
|
|
579
|
+
_chunkUFNNCUFMcjs.writeSuccess.call(void 0, " \u{1F3C1} ESBuild pipeline build completed successfully");
|
|
578
580
|
} catch (error) {
|
|
579
|
-
|
|
581
|
+
_chunkUFNNCUFMcjs.writeFatal.call(void 0, "Fatal errors that the build process could not recover from have occured. The build process has been terminated.");
|
|
580
582
|
throw error;
|
|
581
583
|
} finally {
|
|
582
584
|
stopwatch();
|
|
@@ -604,9 +606,9 @@ var watch = /* @__PURE__ */ _chunkBGYQAVKQcjs.__name.call(void 0, (context2, opt
|
|
|
604
606
|
return context2.rebuild();
|
|
605
607
|
});
|
|
606
608
|
if (rebuildResult instanceof Error) {
|
|
607
|
-
|
|
609
|
+
_chunkUFNNCUFMcjs.writeError.call(void 0, rebuildResult.message);
|
|
608
610
|
}
|
|
609
|
-
|
|
611
|
+
_chunkUFNNCUFMcjs.writeTrace.call(void 0, `${Date.now() - timeBefore}ms [${_nullishCoalesce(options.name, () => ( ""))}]`);
|
|
610
612
|
}, 10);
|
|
611
613
|
changeWatcher.on("change", fastRebuild);
|
|
612
614
|
return void 0;
|
|
@@ -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 _chunkUFNNCUFMcjs = require('./chunk-UFNNCUFM.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
|
+
_chunkUFNNCUFMcjs.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
|
}
|
|
@@ -6,29 +6,29 @@ import {
|
|
|
6
6
|
} from "./chunk-LYDEMC26.js";
|
|
7
7
|
import {
|
|
8
8
|
onErrorPlugin
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-LTXLRCFK.js";
|
|
10
10
|
import {
|
|
11
11
|
resolvePathsPlugin
|
|
12
12
|
} from "./chunk-Q3LOGZKI.js";
|
|
13
13
|
import {
|
|
14
14
|
tscPlugin
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-4F2UUEOG.js";
|
|
16
16
|
import {
|
|
17
17
|
COLOR_KEYS,
|
|
18
18
|
LogLevel,
|
|
19
19
|
STORM_DEFAULT_DOCS,
|
|
20
20
|
STORM_DEFAULT_HOMEPAGE,
|
|
21
21
|
STORM_DEFAULT_LICENSING,
|
|
22
|
-
StormConfigSchema,
|
|
23
22
|
findWorkspaceRoot,
|
|
24
23
|
formatLogMessage,
|
|
25
24
|
getDefaultConfig,
|
|
26
25
|
getLogLevel,
|
|
27
26
|
getLogLevelLabel,
|
|
27
|
+
stormWorkspaceConfigSchema,
|
|
28
28
|
writeDebug,
|
|
29
29
|
writeTrace,
|
|
30
30
|
writeWarning
|
|
31
|
-
} from "./chunk-
|
|
31
|
+
} from "./chunk-OS6IORPL.js";
|
|
32
32
|
import {
|
|
33
33
|
correctPaths,
|
|
34
34
|
joinPaths
|
|
@@ -745,7 +745,7 @@ var setBaseThemeColorConfigEnv = /* @__PURE__ */ __name((prefix, config) => {
|
|
|
745
745
|
// ../config-tools/src/create-storm-config.ts
|
|
746
746
|
var _extension_cache = /* @__PURE__ */ new WeakMap();
|
|
747
747
|
var _static_cache = void 0;
|
|
748
|
-
var
|
|
748
|
+
var createStormWorkspaceConfig = /* @__PURE__ */ __name(async (extensionName, schema, workspaceRoot, skipLogs = false) => {
|
|
749
749
|
let result;
|
|
750
750
|
if (!_static_cache?.data || !_static_cache?.timestamp || _static_cache.timestamp < Date.now() - 8e3) {
|
|
751
751
|
let _workspaceRoot = workspaceRoot;
|
|
@@ -760,7 +760,7 @@ var createStormConfig = /* @__PURE__ */ __name(async (extensionName, schema, wor
|
|
|
760
760
|
logLevel: "all"
|
|
761
761
|
});
|
|
762
762
|
}
|
|
763
|
-
result = await
|
|
763
|
+
result = await stormWorkspaceConfigSchema.parseAsync(defu2(configEnv, configFile, defaultConfig));
|
|
764
764
|
result.workspaceRoot ??= _workspaceRoot;
|
|
765
765
|
} else {
|
|
766
766
|
result = _static_cache.data;
|
|
@@ -776,7 +776,7 @@ var createStormConfig = /* @__PURE__ */ __name(async (extensionName, schema, wor
|
|
|
776
776
|
data: result
|
|
777
777
|
};
|
|
778
778
|
return result;
|
|
779
|
-
}, "
|
|
779
|
+
}, "createStormWorkspaceConfig");
|
|
780
780
|
var createConfigExtension = /* @__PURE__ */ __name((extensionName, schema) => {
|
|
781
781
|
const extension_cache_key = {
|
|
782
782
|
extensionName
|
|
@@ -791,19 +791,19 @@ var createConfigExtension = /* @__PURE__ */ __name((extensionName, schema) => {
|
|
|
791
791
|
_extension_cache.set(extension_cache_key, extension);
|
|
792
792
|
return extension;
|
|
793
793
|
}, "createConfigExtension");
|
|
794
|
-
var
|
|
795
|
-
const config = await
|
|
794
|
+
var loadStormWorkspaceConfig = /* @__PURE__ */ __name(async (workspaceRoot, skipLogs = false) => {
|
|
795
|
+
const config = await createStormWorkspaceConfig(void 0, void 0, workspaceRoot, skipLogs);
|
|
796
796
|
setConfigEnv(config);
|
|
797
797
|
if (!skipLogs && !config.skipConfigLogging) {
|
|
798
798
|
writeTrace(`\u2699\uFE0F Using Storm Workspace configuration:
|
|
799
799
|
${formatLogMessage(config)}`, config);
|
|
800
800
|
}
|
|
801
801
|
return config;
|
|
802
|
-
}, "
|
|
802
|
+
}, "loadStormWorkspaceConfig");
|
|
803
803
|
|
|
804
804
|
// ../config-tools/src/get-config.ts
|
|
805
805
|
var getConfig = /* @__PURE__ */ __name((workspaceRoot, skipLogs = false) => {
|
|
806
|
-
return
|
|
806
|
+
return loadStormWorkspaceConfig(workspaceRoot, skipLogs);
|
|
807
807
|
}, "getConfig");
|
|
808
808
|
|
|
809
809
|
// ../build-tools/src/utilities/get-entry-points.ts
|
|
@@ -843,10 +843,9 @@ var getEntryPoints = /* @__PURE__ */ __name(async (config, projectRoot, sourceRo
|
|
|
843
843
|
return ret;
|
|
844
844
|
}, []));
|
|
845
845
|
} else {
|
|
846
|
-
|
|
847
|
-
|
|
848
|
-
|
|
849
|
-
paths.push(result);
|
|
846
|
+
writeDebug(`Trying to add entry point ${entryPoint}"`, config);
|
|
847
|
+
if (!paths.includes(entryPoint)) {
|
|
848
|
+
paths.push(entryPoint);
|
|
850
849
|
}
|
|
851
850
|
}
|
|
852
851
|
return paths;
|