@storm-software/esbuild 0.31.30 → 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/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-F55MDH52.js → chunk-MJLJTLYN.js} +12 -4
- package/dist/{chunk-LTXLRCFK.js → chunk-NECSRTH6.js} +1 -1
- package/dist/{chunk-S2QQQQC4.cjs → chunk-OYFVAL4X.cjs} +3 -3
- package/dist/{chunk-4I65QR6D.cjs → chunk-P3WA6JHH.cjs} +38 -38
- 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-MECU4TGM.cjs → chunk-X3ZTLBTA.cjs} +42 -34
- package/dist/{chunk-O2DGD74J.js → chunk-Y2IWVWKY.js} +4 -4
- 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/package.json +1 -1
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) {
|
|
@@ -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,7 @@ 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
|
|
|
@@ -278,9 +278,9 @@ var resolveOptions = /* @__PURE__ */ _chunkBGYQAVKQcjs.__name.call(void 0, async
|
|
|
278
278
|
if (!workspaceRoot) {
|
|
279
279
|
throw new Error("Cannot find Nx workspace root");
|
|
280
280
|
}
|
|
281
|
-
const config = await
|
|
282
|
-
|
|
283
|
-
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");
|
|
284
284
|
const projectGraph = await _devkit.createProjectGraphAsync.call(void 0, {
|
|
285
285
|
exitOnError: true
|
|
286
286
|
});
|
|
@@ -295,14 +295,14 @@ var resolveOptions = /* @__PURE__ */ _chunkBGYQAVKQcjs.__name.call(void 0, async
|
|
|
295
295
|
if (!_optionalChain([projectConfigurations, 'optionalAccess', _14 => _14.projects, 'optionalAccess', _15 => _15[projectName]])) {
|
|
296
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.");
|
|
297
297
|
}
|
|
298
|
-
const options = _defu2.default.call(void 0, userOptions,
|
|
298
|
+
const options = _defu2.default.call(void 0, userOptions, _chunkX3ZTLBTAcjs.DEFAULT_BUILD_OPTIONS);
|
|
299
299
|
options.name ??= `${projectName}-${options.format}`;
|
|
300
|
-
options.target ??=
|
|
300
|
+
options.target ??= _chunkX3ZTLBTAcjs.DEFAULT_TARGET;
|
|
301
301
|
const packageJsonPath = _chunkXITTOHOGcjs.joinPaths.call(void 0, workspaceRoot.dir, options.projectRoot, "package.json");
|
|
302
302
|
if (!_fs.existsSync.call(void 0, packageJsonPath)) {
|
|
303
303
|
throw new Error("Cannot find package.json configuration");
|
|
304
304
|
}
|
|
305
|
-
const env =
|
|
305
|
+
const env = _chunkX3ZTLBTAcjs.getEnv.call(void 0, "esbuild", options);
|
|
306
306
|
const result = {
|
|
307
307
|
...options,
|
|
308
308
|
config,
|
|
@@ -317,7 +317,7 @@ var resolveOptions = /* @__PURE__ */ _chunkBGYQAVKQcjs.__name.call(void 0, async
|
|
|
317
317
|
...userOptions,
|
|
318
318
|
tsconfig: _chunkXITTOHOGcjs.joinPaths.call(void 0, projectRoot, userOptions.tsconfig ? userOptions.tsconfig.replace(projectRoot, "") : "tsconfig.json"),
|
|
319
319
|
format: options.format || "cjs",
|
|
320
|
-
entryPoints: await
|
|
320
|
+
entryPoints: await _chunkX3ZTLBTAcjs.getEntryPoints.call(void 0, config, projectRoot, projectJson.sourceRoot, _nullishCoalesce(userOptions.entry, () => ( "./src/index.ts")), false),
|
|
321
321
|
outdir: userOptions.outputPath || _chunkXITTOHOGcjs.joinPaths.call(void 0, "dist", projectRoot),
|
|
322
322
|
distDir: userOptions.distDir || "dist",
|
|
323
323
|
plugins: [],
|
|
@@ -327,7 +327,7 @@ var resolveOptions = /* @__PURE__ */ _chunkBGYQAVKQcjs.__name.call(void 0, async
|
|
|
327
327
|
projectGraph,
|
|
328
328
|
sourceRoot: userOptions.sourceRoot || projectJson.sourceRoot || _chunkXITTOHOGcjs.joinPaths.call(void 0, projectRoot, "src"),
|
|
329
329
|
minify: userOptions.minify || !userOptions.debug,
|
|
330
|
-
verbose: userOptions.verbose ||
|
|
330
|
+
verbose: userOptions.verbose || _chunkQVWQRHQZcjs.isVerbose.call(void 0, ) || userOptions.debug === true,
|
|
331
331
|
includeSrc: userOptions.includeSrc === true,
|
|
332
332
|
metafile: userOptions.metafile !== false,
|
|
333
333
|
generatePackageJson: userOptions.generatePackageJson !== 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`;
|
|
@@ -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);
|
|
@@ -490,8 +490,8 @@ async function executeEsBuild(context2) {
|
|
|
490
490
|
delete options.config;
|
|
491
491
|
delete options.injectShims;
|
|
492
492
|
delete options.external;
|
|
493
|
-
|
|
494
|
-
${
|
|
493
|
+
_chunkQVWQRHQZcjs.writeTrace.call(void 0, `Run esbuild (${context2.options.name}) with the following options:
|
|
494
|
+
${_chunkQVWQRHQZcjs.formatLogMessage.call(void 0, {
|
|
495
495
|
...options,
|
|
496
496
|
define: "<Hidden>"
|
|
497
497
|
})}`, context2.options.config);
|
|
@@ -507,9 +507,9 @@ ${_chunkUFNNCUFMcjs.formatLogMessage.call(void 0, {
|
|
|
507
507
|
_chunkBGYQAVKQcjs.__name.call(void 0, executeEsBuild, "executeEsBuild");
|
|
508
508
|
async function copyBuildAssets(context2) {
|
|
509
509
|
if (_optionalChain([context2, 'access', _16 => _16.result, 'optionalAccess', _17 => _17.errors, 'access', _18 => _18.length]) === 0) {
|
|
510
|
-
|
|
511
|
-
const stopwatch =
|
|
512
|
-
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);
|
|
513
513
|
stopwatch();
|
|
514
514
|
}
|
|
515
515
|
return context2;
|
|
@@ -518,9 +518,9 @@ _chunkBGYQAVKQcjs.__name.call(void 0, copyBuildAssets, "copyBuildAssets");
|
|
|
518
518
|
async function reportResults(context2) {
|
|
519
519
|
if (_optionalChain([context2, 'access', _19 => _19.result, 'optionalAccess', _20 => _20.errors, 'access', _21 => _21.length]) === 0) {
|
|
520
520
|
if (context2.result.warnings.length > 0) {
|
|
521
|
-
|
|
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);
|
|
522
522
|
}
|
|
523
|
-
|
|
523
|
+
_chunkQVWQRHQZcjs.writeSuccess.call(void 0, ` \u{1F4E6} The ${context2.options.name} build completed successfully`, context2.options.config);
|
|
524
524
|
}
|
|
525
525
|
}
|
|
526
526
|
_chunkBGYQAVKQcjs.__name.call(void 0, reportResults, "reportResults");
|
|
@@ -546,7 +546,7 @@ async function dependencyCheck(options) {
|
|
|
546
546
|
write: false,
|
|
547
547
|
outdir: "out",
|
|
548
548
|
plugins: [
|
|
549
|
-
|
|
549
|
+
_chunkOYFVAL4Xcjs.depsCheckPlugin.call(void 0, options.bundle)
|
|
550
550
|
]
|
|
551
551
|
});
|
|
552
552
|
await buildPromise.catch(() => {
|
|
@@ -556,17 +556,17 @@ async function dependencyCheck(options) {
|
|
|
556
556
|
_chunkBGYQAVKQcjs.__name.call(void 0, dependencyCheck, "dependencyCheck");
|
|
557
557
|
async function cleanOutputPath(context2) {
|
|
558
558
|
if (context2.options.clean !== false && context2.options.outdir) {
|
|
559
|
-
|
|
560
|
-
const stopwatch =
|
|
561
|
-
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);
|
|
562
562
|
stopwatch();
|
|
563
563
|
}
|
|
564
564
|
return context2;
|
|
565
565
|
}
|
|
566
566
|
_chunkBGYQAVKQcjs.__name.call(void 0, cleanOutputPath, "cleanOutputPath");
|
|
567
567
|
async function build2(options) {
|
|
568
|
-
|
|
569
|
-
const stopwatch =
|
|
568
|
+
_chunkQVWQRHQZcjs.writeDebug.call(void 0, ` \u26A1 Executing Storm ESBuild pipeline`);
|
|
569
|
+
const stopwatch = _chunkQVWQRHQZcjs.getStopwatch.call(void 0, "ESBuild pipeline");
|
|
570
570
|
try {
|
|
571
571
|
const opts = Array.isArray(options) ? options : [
|
|
572
572
|
options
|
|
@@ -576,9 +576,9 @@ async function build2(options) {
|
|
|
576
576
|
}
|
|
577
577
|
void transduce.async(opts, dependencyCheck);
|
|
578
578
|
await transduce.async(await createOptions(opts), pipe.async(generateContext, cleanOutputPath, generatePackageJson, executeEsBuild, copyBuildAssets, reportResults));
|
|
579
|
-
|
|
579
|
+
_chunkQVWQRHQZcjs.writeSuccess.call(void 0, " \u{1F3C1} ESBuild pipeline build completed successfully");
|
|
580
580
|
} catch (error) {
|
|
581
|
-
|
|
581
|
+
_chunkQVWQRHQZcjs.writeFatal.call(void 0, "Fatal errors that the build process could not recover from have occured. The build process has been terminated.");
|
|
582
582
|
throw error;
|
|
583
583
|
} finally {
|
|
584
584
|
stopwatch();
|
|
@@ -606,9 +606,9 @@ var watch = /* @__PURE__ */ _chunkBGYQAVKQcjs.__name.call(void 0, (context2, opt
|
|
|
606
606
|
return context2.rebuild();
|
|
607
607
|
});
|
|
608
608
|
if (rebuildResult instanceof Error) {
|
|
609
|
-
|
|
609
|
+
_chunkQVWQRHQZcjs.writeError.call(void 0, rebuildResult.message);
|
|
610
610
|
}
|
|
611
|
-
|
|
611
|
+
_chunkQVWQRHQZcjs.writeTrace.call(void 0, `${Date.now() - timeBefore}ms [${_nullishCoalesce(options.name, () => ( ""))}]`);
|
|
612
612
|
}, 10);
|
|
613
613
|
changeWatcher.on("change", fastRebuild);
|
|
614
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);
|