@storm-software/esbuild 0.31.29 → 0.31.31
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 +6 -5
- package/dist/build.cjs +8 -8
- package/dist/build.js +7 -7
- package/dist/{chunk-OS6IORPL.js → chunk-CMVUI2JL.js} +9 -1
- package/dist/{chunk-6D27C2MD.cjs → chunk-JLPAYWVX.cjs} +2 -2
- package/dist/{chunk-6ESUOJS3.js → chunk-MJLJTLYN.js} +15 -8
- package/dist/{chunk-LTXLRCFK.js → chunk-NECSRTH6.js} +1 -1
- package/dist/{chunk-S2QQQQC4.cjs → chunk-OYFVAL4X.cjs} +3 -3
- package/dist/{chunk-AY3TWHXS.cjs → chunk-P3WA6JHH.cjs} +43 -41
- package/dist/{chunk-UFNNCUFM.cjs → chunk-QVWQRHQZ.cjs} +9 -1
- package/dist/{chunk-XF4W7Y5G.cjs → chunk-TPPC2KGE.cjs} +3 -3
- package/dist/{chunk-4F2UUEOG.js → chunk-U6XRGLIE.js} +1 -1
- package/dist/{chunk-QICNNYHX.cjs → chunk-UM3465YR.cjs} +2 -2
- package/dist/{chunk-DJBLQVO3.js → chunk-VA5LCHQG.js} +1 -1
- package/dist/{chunk-YSMZ4KXD.js → chunk-VLJIDKWJ.js} +1 -1
- package/dist/{chunk-C53X3QIN.cjs → chunk-X3ZTLBTA.cjs} +44 -37
- package/dist/{chunk-CCHSZBIJ.js → chunk-Y2IWVWKY.js} +11 -9
- package/dist/clean.cjs +3 -3
- package/dist/clean.d.cts +30 -12
- package/dist/clean.d.ts +30 -12
- 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 +3 -3
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) {
|
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 _chunkP3WA6JHHcjs = require('./chunk-P3WA6JHH.cjs');
|
|
5
|
+
require('./chunk-TPPC2KGE.cjs');
|
|
6
|
+
require('./chunk-X3ZTLBTA.cjs');
|
|
7
7
|
require('./chunk-S6M44SSZ.cjs');
|
|
8
8
|
require('./chunk-WRBUO7H6.cjs');
|
|
9
|
-
require('./chunk-
|
|
9
|
+
require('./chunk-UM3465YR.cjs');
|
|
10
10
|
require('./chunk-SSEYS7LI.cjs');
|
|
11
|
-
require('./chunk-
|
|
12
|
-
require('./chunk-
|
|
13
|
-
require('./chunk-
|
|
11
|
+
require('./chunk-JLPAYWVX.cjs');
|
|
12
|
+
require('./chunk-OYFVAL4X.cjs');
|
|
13
|
+
require('./chunk-QVWQRHQZ.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 = _chunkP3WA6JHHcjs.build; exports.cleanOutputPath = _chunkP3WA6JHHcjs.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-Y2IWVWKY.js";
|
|
5
|
+
import "./chunk-VA5LCHQG.js";
|
|
6
|
+
import "./chunk-MJLJTLYN.js";
|
|
7
7
|
import "./chunk-T5272PC2.js";
|
|
8
8
|
import "./chunk-LYDEMC26.js";
|
|
9
|
-
import "./chunk-
|
|
9
|
+
import "./chunk-NECSRTH6.js";
|
|
10
10
|
import "./chunk-Q3LOGZKI.js";
|
|
11
|
-
import "./chunk-
|
|
12
|
-
import "./chunk-
|
|
13
|
-
import "./chunk-
|
|
11
|
+
import "./chunk-U6XRGLIE.js";
|
|
12
|
+
import "./chunk-VLJIDKWJ.js";
|
|
13
|
+
import "./chunk-CMVUI2JL.js";
|
|
14
14
|
import "./chunk-YMTDVMD6.js";
|
|
15
15
|
import "./chunk-YNQ45EAM.js";
|
|
16
16
|
import "./chunk-GWG4HOQ6.js";
|
|
@@ -216,6 +216,10 @@ var WorkspaceDirectoryConfigSchema = z.object({
|
|
|
216
216
|
log: z.string().trim().optional().describe("The directory used to store the environment's temp files"),
|
|
217
217
|
build: z.string().trim().default("dist").describe("The directory used to store the workspace's distributable files after a build (relative to the workspace root)")
|
|
218
218
|
}).describe("Various directories used by the workspace to store data, cache, and configuration files");
|
|
219
|
+
var errorConfigSchema = z.object({
|
|
220
|
+
codesFile: z.string().trim().default(STORM_DEFAULT_RELEASE_BANNER).describe("The path to the workspace's error codes JSON file"),
|
|
221
|
+
url: z.string().trim().url().optional().describe("A URL to a page that looks up the workspace's error messages given a specific error code")
|
|
222
|
+
}).describe("The workspace's error config used during the error process");
|
|
219
223
|
var stormWorkspaceConfigSchema = z.object({
|
|
220
224
|
$schema: z.string().trim().default("https://cdn.jsdelivr.net/npm/@storm-software/config/schemas/storm-workspace.schema.json").optional().nullish().describe("The URL to the JSON schema file that describes the Storm configuration file"),
|
|
221
225
|
extends: ExtendsSchema.optional(),
|
|
@@ -234,6 +238,7 @@ var stormWorkspaceConfigSchema = z.object({
|
|
|
234
238
|
bot: WorkspaceBotConfigSchema,
|
|
235
239
|
release: WorkspaceReleaseConfigSchema,
|
|
236
240
|
account: WorkspaceAccountConfigSchema,
|
|
241
|
+
error: errorConfigSchema,
|
|
237
242
|
mode: z.enum([
|
|
238
243
|
"development",
|
|
239
244
|
"staging",
|
|
@@ -444,7 +449,10 @@ var getDefaultConfig = /* @__PURE__ */ __name(async (root) => {
|
|
|
444
449
|
license,
|
|
445
450
|
homepage,
|
|
446
451
|
docs: `${homepage || STORM_DEFAULT_HOMEPAGE}/docs`,
|
|
447
|
-
licensing: `${homepage || STORM_DEFAULT_HOMEPAGE}/license
|
|
452
|
+
licensing: `${homepage || STORM_DEFAULT_HOMEPAGE}/license`,
|
|
453
|
+
error: {
|
|
454
|
+
url: `${homepage || STORM_DEFAULT_HOMEPAGE}/errors`
|
|
455
|
+
}
|
|
448
456
|
};
|
|
449
457
|
}, "getDefaultConfig");
|
|
450
458
|
|
|
@@ -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 _chunkQVWQRHQZcjs = require('./chunk-QVWQRHQZ.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
|
+
_chunkQVWQRHQZcjs.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,13 +6,13 @@ import {
|
|
|
6
6
|
} from "./chunk-LYDEMC26.js";
|
|
7
7
|
import {
|
|
8
8
|
onErrorPlugin
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-NECSRTH6.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-U6XRGLIE.js";
|
|
16
16
|
import {
|
|
17
17
|
COLOR_KEYS,
|
|
18
18
|
LogLevel,
|
|
@@ -28,7 +28,7 @@ import {
|
|
|
28
28
|
writeDebug,
|
|
29
29
|
writeTrace,
|
|
30
30
|
writeWarning
|
|
31
|
-
} from "./chunk-
|
|
31
|
+
} from "./chunk-CMVUI2JL.js";
|
|
32
32
|
import {
|
|
33
33
|
correctPaths,
|
|
34
34
|
joinPaths
|
|
@@ -322,6 +322,10 @@ var getConfigEnv = /* @__PURE__ */ __name(() => {
|
|
|
322
322
|
header: process.env[`${prefix}RELEASE_HEADER`] || void 0,
|
|
323
323
|
footer: process.env[`${prefix}RELEASE_FOOTER`] || void 0
|
|
324
324
|
},
|
|
325
|
+
error: {
|
|
326
|
+
codesFile: process.env[`${prefix}ERROR_CODES_FILE`] || void 0,
|
|
327
|
+
url: process.env[`${prefix}ERROR_URL`] || void 0
|
|
328
|
+
},
|
|
325
329
|
account: {
|
|
326
330
|
twitter: process.env[`${prefix}ACCOUNT_TWITTER`] || void 0,
|
|
327
331
|
discord: process.env[`${prefix}ACCOUNT_DISCORD`] || void 0,
|
|
@@ -495,6 +499,10 @@ var setConfigEnv = /* @__PURE__ */ __name((config) => {
|
|
|
495
499
|
process.env[`${prefix}BOT_NAME`] = config.bot.name;
|
|
496
500
|
process.env[`${prefix}BOT_EMAIL`] = config.bot.email;
|
|
497
501
|
}
|
|
502
|
+
if (config.error) {
|
|
503
|
+
process.env[`${prefix}ERROR_CODES_FILE`] = config.error.codesFile;
|
|
504
|
+
process.env[`${prefix}ERROR_URL`] = config.error.url;
|
|
505
|
+
}
|
|
498
506
|
if (config.release) {
|
|
499
507
|
process.env[`${prefix}RELEASE_BANNER`] = config.release.banner;
|
|
500
508
|
process.env[`${prefix}RELEASE_HEADER`] = config.release.header;
|
|
@@ -625,7 +633,7 @@ var setConfigEnv = /* @__PURE__ */ __name((config) => {
|
|
|
625
633
|
process.env[`${prefix}REGISTRY_CYCLONE`] = String(config.registry.cyclone);
|
|
626
634
|
}
|
|
627
635
|
if (config.registry.container) {
|
|
628
|
-
process.env[`${prefix}REGISTRY_CONTAINER`] = String(config.registry.
|
|
636
|
+
process.env[`${prefix}REGISTRY_CONTAINER`] = String(config.registry.container);
|
|
629
637
|
}
|
|
630
638
|
}
|
|
631
639
|
if (config.logLevel) {
|
|
@@ -843,10 +851,9 @@ var getEntryPoints = /* @__PURE__ */ __name(async (config, projectRoot, sourceRo
|
|
|
843
851
|
return ret;
|
|
844
852
|
}, []));
|
|
845
853
|
} else {
|
|
846
|
-
|
|
847
|
-
|
|
848
|
-
|
|
849
|
-
paths.push(result);
|
|
854
|
+
writeDebug(`Trying to add entry point ${entryPoint}"`, config);
|
|
855
|
+
if (!paths.includes(entryPoint)) {
|
|
856
|
+
paths.push(entryPoint);
|
|
850
857
|
}
|
|
851
858
|
}
|
|
852
859
|
return paths;
|
|
@@ -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 _chunkQVWQRHQZcjs = require('./chunk-QVWQRHQZ.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
|
+
_chunkQVWQRHQZcjs.writeWarning.call(void 0, `Unused Dependencies: ${JSON.stringify(filteredUnusedDeps)}`);
|
|
90
|
+
_chunkQVWQRHQZcjs.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)}
|
|
@@ -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 _chunkTPPC2KGEcjs = require('./chunk-TPPC2KGE.cjs');
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
|
|
@@ -12,10 +12,10 @@ var _chunkXF4W7Y5Gcjs = require('./chunk-XF4W7Y5G.cjs');
|
|
|
12
12
|
|
|
13
13
|
|
|
14
14
|
|
|
15
|
-
var
|
|
15
|
+
var _chunkX3ZTLBTAcjs = require('./chunk-X3ZTLBTA.cjs');
|
|
16
16
|
|
|
17
17
|
|
|
18
|
-
var
|
|
18
|
+
var _chunkOYFVAL4Xcjs = require('./chunk-OYFVAL4X.cjs');
|
|
19
19
|
|
|
20
20
|
|
|
21
21
|
|
|
@@ -26,7 +26,8 @@ var _chunkS2QQQQC4cjs = require('./chunk-S2QQQQC4.cjs');
|
|
|
26
26
|
|
|
27
27
|
|
|
28
28
|
|
|
29
|
-
var
|
|
29
|
+
var _chunkQVWQRHQZcjs = require('./chunk-QVWQRHQZ.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 _chunkX3ZTLBTAcjs.getConfig.call(void 0, workspaceRoot.dir);
|
|
282
|
+
_chunkQVWQRHQZcjs.writeDebug.call(void 0, " \u2699\uFE0F Resolving build options", config);
|
|
283
|
+
const stopwatch = _chunkQVWQRHQZcjs.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, _chunkX3ZTLBTAcjs.DEFAULT_BUILD_OPTIONS);
|
|
298
299
|
options.name ??= `${projectName}-${options.format}`;
|
|
299
|
-
options.target ??=
|
|
300
|
+
options.target ??= _chunkX3ZTLBTAcjs.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 = _chunkX3ZTLBTAcjs.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 _chunkX3ZTLBTAcjs.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 || _chunkQVWQRHQZcjs.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 || _chunkX3ZTLBTAcjs.DEFAULT_COMPILED_BANNER,
|
|
343
|
+
css: options.banner || _chunkX3ZTLBTAcjs.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, () => ( _chunkX3ZTLBTAcjs.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
|
+
_chunkQVWQRHQZcjs.writeDebug.call(void 0, " \u270D\uFE0F Writing package.json file", context2.options.config);
|
|
386
|
+
const stopwatch = _chunkQVWQRHQZcjs.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 _chunkX3ZTLBTAcjs.addPackageDependencies.call(void 0, context2.options.config.workspaceRoot, context2.options.projectRoot, context2.options.projectName, packageJson);
|
|
397
|
+
packageJson = await _chunkX3ZTLBTAcjs.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
|
+
_chunkQVWQRHQZcjs.writeDebug.call(void 0, ` \u{1F680} Running ${context2.options.name} build`, context2.options.config);
|
|
460
|
+
const stopwatch = _chunkQVWQRHQZcjs.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
|
+
_chunkQVWQRHQZcjs.writeTrace.call(void 0, `Run esbuild (${context2.options.name}) with the following options:
|
|
494
|
+
${_chunkQVWQRHQZcjs.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 @@ ${_chunkUFNNCUFMcjs.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
|
+
_chunkQVWQRHQZcjs.writeDebug.call(void 0, ` \u{1F4CB} Copying asset files to output directory: ${context2.options.outdir}`, context2.options.config);
|
|
511
|
+
const stopwatch = _chunkQVWQRHQZcjs.getStopwatch.call(void 0, `${context2.options.name} asset copy`);
|
|
512
|
+
await _chunkX3ZTLBTAcjs.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
|
+
_chunkQVWQRHQZcjs.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
|
+
_chunkQVWQRHQZcjs.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
|
+
_chunkOYFVAL4Xcjs.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
|
+
_chunkQVWQRHQZcjs.writeDebug.call(void 0, ` \u{1F9F9} Cleaning ${context2.options.name} output path: ${context2.options.outdir}`, context2.options.config);
|
|
560
|
+
const stopwatch = _chunkQVWQRHQZcjs.getStopwatch.call(void 0, `${context2.options.name} output clean`);
|
|
561
|
+
await _chunkTPPC2KGEcjs.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
|
+
_chunkQVWQRHQZcjs.writeDebug.call(void 0, ` \u26A1 Executing Storm ESBuild pipeline`);
|
|
569
|
+
const stopwatch = _chunkQVWQRHQZcjs.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
|
+
_chunkQVWQRHQZcjs.writeSuccess.call(void 0, " \u{1F3C1} ESBuild pipeline build completed successfully");
|
|
578
580
|
} catch (error) {
|
|
579
|
-
|
|
581
|
+
_chunkQVWQRHQZcjs.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
|
+
_chunkQVWQRHQZcjs.writeError.call(void 0, rebuildResult.message);
|
|
608
610
|
}
|
|
609
|
-
|
|
611
|
+
_chunkQVWQRHQZcjs.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;
|
|
@@ -216,6 +216,10 @@ var WorkspaceDirectoryConfigSchema = _zod2.default.object({
|
|
|
216
216
|
log: _zod2.default.string().trim().optional().describe("The directory used to store the environment's temp files"),
|
|
217
217
|
build: _zod2.default.string().trim().default("dist").describe("The directory used to store the workspace's distributable files after a build (relative to the workspace root)")
|
|
218
218
|
}).describe("Various directories used by the workspace to store data, cache, and configuration files");
|
|
219
|
+
var errorConfigSchema = _zod2.default.object({
|
|
220
|
+
codesFile: _zod2.default.string().trim().default(STORM_DEFAULT_RELEASE_BANNER).describe("The path to the workspace's error codes JSON file"),
|
|
221
|
+
url: _zod2.default.string().trim().url().optional().describe("A URL to a page that looks up the workspace's error messages given a specific error code")
|
|
222
|
+
}).describe("The workspace's error config used during the error process");
|
|
219
223
|
var stormWorkspaceConfigSchema = _zod2.default.object({
|
|
220
224
|
$schema: _zod2.default.string().trim().default("https://cdn.jsdelivr.net/npm/@storm-software/config/schemas/storm-workspace.schema.json").optional().nullish().describe("The URL to the JSON schema file that describes the Storm configuration file"),
|
|
221
225
|
extends: ExtendsSchema.optional(),
|
|
@@ -234,6 +238,7 @@ var stormWorkspaceConfigSchema = _zod2.default.object({
|
|
|
234
238
|
bot: WorkspaceBotConfigSchema,
|
|
235
239
|
release: WorkspaceReleaseConfigSchema,
|
|
236
240
|
account: WorkspaceAccountConfigSchema,
|
|
241
|
+
error: errorConfigSchema,
|
|
237
242
|
mode: _zod2.default.enum([
|
|
238
243
|
"development",
|
|
239
244
|
"staging",
|
|
@@ -444,7 +449,10 @@ var getDefaultConfig = /* @__PURE__ */ _chunkBGYQAVKQcjs.__name.call(void 0, asy
|
|
|
444
449
|
license,
|
|
445
450
|
homepage,
|
|
446
451
|
docs: `${homepage || STORM_DEFAULT_HOMEPAGE}/docs`,
|
|
447
|
-
licensing: `${homepage || STORM_DEFAULT_HOMEPAGE}/license
|
|
452
|
+
licensing: `${homepage || STORM_DEFAULT_HOMEPAGE}/license`,
|
|
453
|
+
error: {
|
|
454
|
+
url: `${homepage || STORM_DEFAULT_HOMEPAGE}/errors`
|
|
455
|
+
}
|
|
448
456
|
};
|
|
449
457
|
}, "getDefaultConfig");
|
|
450
458
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
3
|
|
|
4
|
-
var
|
|
4
|
+
var _chunkQVWQRHQZcjs = require('./chunk-QVWQRHQZ.cjs');
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
var _chunkBGYQAVKQcjs = require('./chunk-BGYQAVKQ.cjs');
|
|
@@ -9,8 +9,8 @@ var _chunkBGYQAVKQcjs = require('./chunk-BGYQAVKQ.cjs');
|
|
|
9
9
|
// src/clean.ts
|
|
10
10
|
var _promises = require('fs/promises');
|
|
11
11
|
async function clean(name = "ESBuild", directory, config) {
|
|
12
|
-
|
|
13
|
-
const stopwatch =
|
|
12
|
+
_chunkQVWQRHQZcjs.writeDebug.call(void 0, ` \u{1F9F9} Cleaning ${name} output path: ${directory}`, config);
|
|
13
|
+
const stopwatch = _chunkQVWQRHQZcjs.getStopwatch.call(void 0, `${name} output clean`);
|
|
14
14
|
await cleanDirectories(name, directory, config);
|
|
15
15
|
stopwatch();
|
|
16
16
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var _chunkQVWQRHQZcjs = require('./chunk-QVWQRHQZ.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
|
+
_chunkQVWQRHQZcjs.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);
|