@storm-software/esbuild 0.35.2 → 0.35.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/assets.cjs +6 -5
- package/dist/assets.js +5 -4
- package/dist/build.cjs +14 -13
- package/dist/build.js +13 -12
- package/dist/{chunk-PTHYT3U2.cjs → chunk-2CJUAFMG.cjs} +163 -154
- package/dist/{chunk-G66JI4BS.cjs → chunk-3ER3O2N3.cjs} +9 -5
- package/dist/chunk-3HCV5NMP.js +6 -0
- package/dist/chunk-72DS7WUW.js +56 -0
- package/dist/{chunk-EVDNG72R.cjs → chunk-CJBZHSAG.cjs} +65 -35
- package/dist/{chunk-VTBMJYSM.cjs → chunk-GJI5FYRO.cjs} +8 -6
- package/dist/{chunk-2CM3VAO5.cjs → chunk-GPSIB7RA.cjs} +16 -12
- package/dist/{chunk-SLSBBNRF.cjs → chunk-HLE5J5AB.cjs} +7 -3
- package/dist/{chunk-NJJBR57W.js → chunk-IEJ6BIBN.js} +47 -3
- package/dist/chunk-IM7Z56V7.cjs +6 -0
- package/dist/{chunk-EBTMX5WL.js → chunk-JRKB3XC2.js} +11 -9
- package/dist/{chunk-DNZNN5SK.js → chunk-L7EGMPJS.js} +5 -3
- package/dist/{chunk-ABRK5MYP.js → chunk-LWQT37TY.js} +6 -2
- package/dist/{chunk-EDLA3ZZN.js → chunk-MIE6K233.js} +6 -4
- package/dist/{chunk-4D6ICA75.js → chunk-OGJYKJUE.js} +5 -36
- package/dist/{chunk-ECCVVXNX.js → chunk-QKGOTZZN.js} +10 -6
- package/dist/{chunk-YHMM6RY5.cjs → chunk-QU4XYXHY.cjs} +11 -42
- package/dist/{chunk-QWTKBUQW.js → chunk-QZO37X4D.js} +13 -3
- package/dist/{chunk-R2KKGNQL.js → chunk-RJOHRX3W.js} +8 -4
- package/dist/{chunk-CVOQEYHW.cjs → chunk-SBOWWDIH.cjs} +29 -27
- package/dist/{chunk-WXURMFT7.js → chunk-SLL6OQKH.js} +5 -1
- package/dist/chunk-TJGIVJ4K.cjs +49 -0
- package/dist/{chunk-RK34D7S5.cjs → chunk-U5I2425O.cjs} +8 -6
- package/dist/{chunk-TSQT5MWW.js → chunk-UUHNTIEX.js} +32 -2
- package/dist/{chunk-OCDIIBBZ.js → chunk-VCOHFFZB.js} +5 -3
- package/dist/{chunk-QVMJLFU5.cjs → chunk-VQ54NALW.cjs} +9 -7
- package/dist/{chunk-WLJT52I3.cjs → chunk-WLEC2JTG.cjs} +21 -17
- package/dist/{chunk-FQQYNAPT.cjs → chunk-ZMGVM7NZ.cjs} +126 -82
- package/dist/clean.cjs +5 -4
- package/dist/clean.js +4 -3
- package/dist/config.cjs +6 -5
- package/dist/config.js +5 -4
- package/dist/context.cjs +8 -7
- package/dist/context.js +7 -6
- package/dist/index.cjs +20 -14
- package/dist/index.js +19 -13
- package/dist/package-json.cjs +6 -5
- package/dist/package-json.js +5 -4
- package/dist/plugins/deps-check.cjs +5 -4
- package/dist/plugins/deps-check.js +4 -3
- package/dist/plugins/resolve-paths.cjs +4 -3
- package/dist/plugins/resolve-paths.js +3 -2
- package/dist/tsup.cjs +5 -4
- package/dist/tsup.js +4 -3
- package/dist/types.cjs +2 -1
- package/dist/types.js +2 -1
- package/dist/watch.cjs +15 -11
- package/dist/watch.js +7 -3
- package/package.json +4 -4
- package/dist/chunk-GGNOJ77I.js +0 -0
- package/dist/chunk-SFZRYJZ2.cjs +0 -1
|
@@ -1,10 +1,17 @@
|
|
|
1
1
|
import {
|
|
2
|
-
__name,
|
|
3
2
|
correctPaths,
|
|
4
3
|
joinPaths
|
|
5
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-OGJYKJUE.js";
|
|
5
|
+
import {
|
|
6
|
+
__name,
|
|
7
|
+
init_esm_shims
|
|
8
|
+
} from "./chunk-72DS7WUW.js";
|
|
9
|
+
|
|
10
|
+
// ../config-tools/src/logger/console.ts
|
|
11
|
+
init_esm_shims();
|
|
6
12
|
|
|
7
13
|
// ../config-tools/src/types.ts
|
|
14
|
+
init_esm_shims();
|
|
8
15
|
var LogLevel = {
|
|
9
16
|
SILENT: 0,
|
|
10
17
|
FATAL: 10,
|
|
@@ -28,7 +35,14 @@ var LogLevelLabel = {
|
|
|
28
35
|
ALL: "all"
|
|
29
36
|
};
|
|
30
37
|
|
|
38
|
+
// ../config-tools/src/utilities/get-default-config.ts
|
|
39
|
+
init_esm_shims();
|
|
40
|
+
|
|
41
|
+
// ../config/src/index.ts
|
|
42
|
+
init_esm_shims();
|
|
43
|
+
|
|
31
44
|
// ../config/src/constants.ts
|
|
45
|
+
init_esm_shims();
|
|
32
46
|
var STORM_DEFAULT_DOCS = "https://docs.stormsoftware.com";
|
|
33
47
|
var STORM_DEFAULT_HOMEPAGE = "https://stormsoftware.com";
|
|
34
48
|
var STORM_DEFAULT_CONTACT = "https://stormsoftware.com/contact";
|
|
@@ -50,7 +64,11 @@ If this sounds interesting, and you would like to help us in creating the next g
|
|
|
50
64
|
`;
|
|
51
65
|
var STORM_DEFAULT_ERROR_CODES_FILE = "tools/errors/codes.json";
|
|
52
66
|
|
|
67
|
+
// ../config/src/define-config.ts
|
|
68
|
+
init_esm_shims();
|
|
69
|
+
|
|
53
70
|
// ../config/src/schema.ts
|
|
71
|
+
init_esm_shims();
|
|
54
72
|
import z from "zod";
|
|
55
73
|
var DarkColorSchema = z.string().trim().toLowerCase().regex(/^#([0-9a-f]{3}){1,2}$/i).length(7).default("#1d1e22").describe("The dark background color of the workspace");
|
|
56
74
|
var LightColorSchema = z.string().trim().toLowerCase().regex(/^#([0-9a-f]{3}){1,2}$/i).length(7).default("#f4f4f5").describe("The light background color of the workspace");
|
|
@@ -219,6 +237,7 @@ var stormWorkspaceConfigSchema = z.object({
|
|
|
219
237
|
}).describe("Storm Workspace config values used during various dev-ops processes. This type is a combination of the StormPackageConfig and StormProject types. It represents the config of the entire monorepo.");
|
|
220
238
|
|
|
221
239
|
// ../config/src/types.ts
|
|
240
|
+
init_esm_shims();
|
|
222
241
|
var COLOR_KEYS = [
|
|
223
242
|
"dark",
|
|
224
243
|
"light",
|
|
@@ -242,7 +261,11 @@ import { existsSync as existsSync2 } from "node:fs";
|
|
|
242
261
|
import { readFile } from "node:fs/promises";
|
|
243
262
|
import { join as join2 } from "node:path";
|
|
244
263
|
|
|
264
|
+
// ../config-tools/src/utilities/find-workspace-root.ts
|
|
265
|
+
init_esm_shims();
|
|
266
|
+
|
|
245
267
|
// ../config-tools/src/utilities/find-up.ts
|
|
268
|
+
init_esm_shims();
|
|
246
269
|
import { existsSync } from "node:fs";
|
|
247
270
|
import { join } from "node:path";
|
|
248
271
|
var MAX_PATH_SEARCH_DEPTH = 30;
|
|
@@ -401,6 +424,7 @@ var getDefaultConfig = /* @__PURE__ */ __name(async (root) => {
|
|
|
401
424
|
}, "getDefaultConfig");
|
|
402
425
|
|
|
403
426
|
// ../config-tools/src/logger/chalk.ts
|
|
427
|
+
init_esm_shims();
|
|
404
428
|
import chalk from "chalk";
|
|
405
429
|
var chalkDefault = {
|
|
406
430
|
hex: /* @__PURE__ */ __name((_) => (message) => message, "hex"),
|
|
@@ -429,7 +453,11 @@ var getChalk = /* @__PURE__ */ __name(() => {
|
|
|
429
453
|
return _chalk;
|
|
430
454
|
}, "getChalk");
|
|
431
455
|
|
|
456
|
+
// ../config-tools/src/logger/console-icons.ts
|
|
457
|
+
init_esm_shims();
|
|
458
|
+
|
|
432
459
|
// ../config-tools/src/logger/is-unicode-supported.ts
|
|
460
|
+
init_esm_shims();
|
|
433
461
|
function isUnicodeSupported() {
|
|
434
462
|
if (process.platform !== "win32") {
|
|
435
463
|
return process.env.TERM !== "linux";
|
|
@@ -455,11 +483,13 @@ var CONSOLE_ICONS = {
|
|
|
455
483
|
};
|
|
456
484
|
|
|
457
485
|
// ../config-tools/src/logger/format-timestamp.ts
|
|
486
|
+
init_esm_shims();
|
|
458
487
|
var formatTimestamp = /* @__PURE__ */ __name((date = /* @__PURE__ */ new Date()) => {
|
|
459
488
|
return `${date.toLocaleDateString()} ${date.toLocaleTimeString()}`;
|
|
460
489
|
}, "formatTimestamp");
|
|
461
490
|
|
|
462
491
|
// ../config-tools/src/logger/get-log-level.ts
|
|
492
|
+
init_esm_shims();
|
|
463
493
|
var getLogLevel = /* @__PURE__ */ __name((label) => {
|
|
464
494
|
switch (label) {
|
|
465
495
|
case "all":
|
|
@@ -1,13 +1,15 @@
|
|
|
1
1
|
import {
|
|
2
2
|
writeError,
|
|
3
3
|
writeWarning
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-UUHNTIEX.js";
|
|
5
5
|
import {
|
|
6
6
|
__name,
|
|
7
|
-
__require
|
|
8
|
-
|
|
7
|
+
__require,
|
|
8
|
+
init_esm_shims
|
|
9
|
+
} from "./chunk-72DS7WUW.js";
|
|
9
10
|
|
|
10
11
|
// src/plugins/deps-check.ts
|
|
12
|
+
init_esm_shims();
|
|
11
13
|
import { builtinModules } from "node:module";
|
|
12
14
|
import path from "node:path";
|
|
13
15
|
var unusedIgnore = [
|
|
@@ -1,25 +1,27 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); 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 _chunkZMGVM7NZcjs = require('./chunk-ZMGVM7NZ.cjs');
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
|
|
7
|
-
var
|
|
7
|
+
var _chunkCJBZHSAGcjs = require('./chunk-CJBZHSAG.cjs');
|
|
8
8
|
|
|
9
9
|
|
|
10
|
-
|
|
10
|
+
|
|
11
|
+
var _chunkTJGIVJ4Kcjs = require('./chunk-TJGIVJ4K.cjs');
|
|
11
12
|
|
|
12
13
|
// src/assets.ts
|
|
14
|
+
_chunkTJGIVJ4Kcjs.init_cjs_shims.call(void 0, );
|
|
13
15
|
async function copyBuildAssets(context) {
|
|
14
16
|
if (_optionalChain([context, 'access', _ => _.result, 'optionalAccess', _2 => _2.errors, 'access', _3 => _3.length]) === 0) {
|
|
15
|
-
|
|
16
|
-
const stopwatch =
|
|
17
|
-
await
|
|
17
|
+
_chunkCJBZHSAGcjs.writeDebug.call(void 0, ` \u{1F4CB} Copying asset files to output directory: ${context.outputPath}`, context.workspaceConfig);
|
|
18
|
+
const stopwatch = _chunkCJBZHSAGcjs.getStopwatch.call(void 0, `${context.options.name} asset copy`);
|
|
19
|
+
await _chunkZMGVM7NZcjs.copyAssets.call(void 0, context.workspaceConfig, _nullishCoalesce(context.options.assets, () => ( [])), context.outputPath, context.options.projectRoot, context.sourceRoot, true, false);
|
|
18
20
|
stopwatch();
|
|
19
21
|
}
|
|
20
22
|
return context;
|
|
21
23
|
}
|
|
22
|
-
|
|
24
|
+
_chunkTJGIVJ4Kcjs.__name.call(void 0, copyBuildAssets, "copyBuildAssets");
|
|
23
25
|
|
|
24
26
|
|
|
25
27
|
|
|
@@ -1,23 +1,27 @@
|
|
|
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 _chunk3ER3O2N3cjs = require('./chunk-3ER3O2N3.cjs');
|
|
4
4
|
|
|
5
5
|
|
|
6
|
-
var
|
|
6
|
+
var _chunkHLE5J5ABcjs = require('./chunk-HLE5J5AB.cjs');
|
|
7
7
|
|
|
8
8
|
|
|
9
9
|
|
|
10
|
-
var
|
|
10
|
+
var _chunkZMGVM7NZcjs = require('./chunk-ZMGVM7NZ.cjs');
|
|
11
11
|
|
|
12
12
|
|
|
13
13
|
|
|
14
|
-
var
|
|
14
|
+
var _chunkCJBZHSAGcjs = require('./chunk-CJBZHSAG.cjs');
|
|
15
15
|
|
|
16
16
|
|
|
17
|
+
var _chunkQU4XYXHYcjs = require('./chunk-QU4XYXHY.cjs');
|
|
17
18
|
|
|
18
|
-
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
var _chunkTJGIVJ4Kcjs = require('./chunk-TJGIVJ4K.cjs');
|
|
19
22
|
|
|
20
23
|
// src/context.ts
|
|
24
|
+
_chunkTJGIVJ4Kcjs.init_cjs_shims.call(void 0, );
|
|
21
25
|
var _devkit = require('@nx/devkit');
|
|
22
26
|
var _defu = require('defu'); var _defu2 = _interopRequireDefault(_defu);
|
|
23
27
|
var _fs = require('fs');
|
|
@@ -29,15 +33,15 @@ async function resolveContext(userOptions) {
|
|
|
29
33
|
if (!workspaceRoot) {
|
|
30
34
|
throw new Error("Cannot find Nx workspace root");
|
|
31
35
|
}
|
|
32
|
-
const workspaceConfig = await
|
|
36
|
+
const workspaceConfig = await _chunkZMGVM7NZcjs.getWorkspaceConfig.call(void 0, true, {
|
|
33
37
|
workspaceRoot: workspaceRoot.dir
|
|
34
38
|
});
|
|
35
|
-
|
|
36
|
-
const stopwatch =
|
|
39
|
+
_chunkCJBZHSAGcjs.writeDebug.call(void 0, " \u2699\uFE0F Resolving build options", workspaceConfig);
|
|
40
|
+
const stopwatch = _chunkCJBZHSAGcjs.getStopwatch.call(void 0, "Build options resolution");
|
|
37
41
|
const projectGraph = await _devkit.createProjectGraphAsync.call(void 0, {
|
|
38
42
|
exitOnError: true
|
|
39
43
|
});
|
|
40
|
-
const projectJsonPath =
|
|
44
|
+
const projectJsonPath = _chunkQU4XYXHYcjs.joinPaths.call(void 0, workspaceRoot.dir, projectRoot, "project.json");
|
|
41
45
|
if (!_fs.existsSync.call(void 0, projectJsonPath)) {
|
|
42
46
|
throw new Error("Cannot find project.json configuration");
|
|
43
47
|
}
|
|
@@ -48,17 +52,17 @@ async function resolveContext(userOptions) {
|
|
|
48
52
|
if (!_optionalChain([projectConfigurations, 'optionalAccess', _ => _.projects, 'optionalAccess', _2 => _2[projectName]])) {
|
|
49
53
|
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.");
|
|
50
54
|
}
|
|
51
|
-
const options = _defu2.default.call(void 0, userOptions,
|
|
55
|
+
const options = _defu2.default.call(void 0, userOptions, _chunkHLE5J5ABcjs.DEFAULT_BUILD_OPTIONS);
|
|
52
56
|
options.name ??= projectName;
|
|
53
|
-
const packageJsonPath =
|
|
57
|
+
const packageJsonPath = _chunkQU4XYXHYcjs.joinPaths.call(void 0, workspaceRoot.dir, options.projectRoot, "package.json");
|
|
54
58
|
if (!_fs.existsSync.call(void 0, packageJsonPath)) {
|
|
55
59
|
throw new Error("Cannot find package.json configuration");
|
|
56
60
|
}
|
|
57
|
-
const env =
|
|
61
|
+
const env = _chunkZMGVM7NZcjs.getEnv.call(void 0, "esbuild", options);
|
|
58
62
|
const define = _defu2.default.call(void 0, _nullishCoalesce(options.define, () => ( {})), _nullishCoalesce(env, () => ( {})));
|
|
59
63
|
const resolvedOptions = {
|
|
60
64
|
...options,
|
|
61
|
-
tsconfig:
|
|
65
|
+
tsconfig: _chunkQU4XYXHYcjs.joinPaths.call(void 0, projectRoot, userOptions.tsconfig ? userOptions.tsconfig.replace(projectRoot, "") : "tsconfig.json"),
|
|
62
66
|
metafile: userOptions.mode === "development",
|
|
63
67
|
clean: false,
|
|
64
68
|
env,
|
|
@@ -83,17 +87,17 @@ async function resolveContext(userOptions) {
|
|
|
83
87
|
projectConfigurations,
|
|
84
88
|
projectName,
|
|
85
89
|
projectGraph,
|
|
86
|
-
sourceRoot: resolvedOptions.sourceRoot || projectJson.sourceRoot ||
|
|
87
|
-
outputPath: resolvedOptions.outputPath ||
|
|
90
|
+
sourceRoot: resolvedOptions.sourceRoot || projectJson.sourceRoot || _chunkQU4XYXHYcjs.joinPaths.call(void 0, resolvedOptions.projectRoot, "src"),
|
|
91
|
+
outputPath: resolvedOptions.outputPath || _chunkQU4XYXHYcjs.joinPaths.call(void 0, workspaceConfig.workspaceRoot, "dist", resolvedOptions.projectRoot),
|
|
88
92
|
minify: resolvedOptions.minify || resolvedOptions.mode === "production"
|
|
89
93
|
};
|
|
90
94
|
context.options.esbuildPlugins = [
|
|
91
|
-
|
|
95
|
+
_chunk3ER3O2N3cjs.resolvePathsPlugin.call(void 0, context),
|
|
92
96
|
..._nullishCoalesce(context.options.esbuildPlugins, () => ( []))
|
|
93
97
|
];
|
|
94
98
|
return context;
|
|
95
99
|
}
|
|
96
|
-
|
|
100
|
+
_chunkTJGIVJ4Kcjs.__name.call(void 0, resolveContext, "resolveContext");
|
|
97
101
|
|
|
98
102
|
|
|
99
103
|
|