@storm-software/esbuild 0.45.39 → 0.45.42
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/bin/esbuild.cjs +10 -10
- package/dist/assets.cjs +6 -6
- package/dist/assets.js +5 -5
- package/dist/build.cjs +13 -13
- package/dist/build.js +12 -12
- package/dist/{chunk-SWCTV2DK.cjs → chunk-AV5VL6UU.cjs} +5 -5
- package/dist/{chunk-MRIDIQ2W.cjs → chunk-DDXSMCAA.cjs} +7 -7
- package/dist/{chunk-NCT2EP5O.js → chunk-E6CKMNGC.js} +2 -2
- package/dist/{chunk-BQ33KBRQ.cjs → chunk-FPFKMRM6.cjs} +87 -87
- package/dist/{chunk-JORVCKLB.js → chunk-G5KD2O7B.js} +15 -15
- package/dist/{chunk-V7ZGKCVF.js → chunk-GJF63C63.js} +3 -3
- package/dist/{chunk-A4LWMXTM.cjs → chunk-HLWSFXL3.cjs} +18 -18
- package/dist/{chunk-BIPRSTGN.js → chunk-J2AX7MJ4.js} +5 -5
- package/dist/{chunk-PWU5KHZ3.js → chunk-J3KLRQQ7.js} +4 -4
- package/dist/{chunk-GA7R4R4C.js → chunk-JCF2DBYT.js} +2 -2
- package/dist/{chunk-GL7N7ANS.js → chunk-LPLBICCB.js} +2 -2
- package/dist/{chunk-E4TFSQTB.js → chunk-MGFCZLVU.js} +3 -3
- package/dist/{chunk-A7I6K5HC.js → chunk-OY5J4Y6B.js} +1 -1
- package/dist/{chunk-ZJLSRWHA.js → chunk-QLV7CIMC.js} +2 -2
- package/dist/{chunk-REAX6FSO.cjs → chunk-QTAPBA6I.cjs} +2 -2
- package/dist/{chunk-LTXK327P.cjs → chunk-SD2XHXFF.cjs} +6 -6
- package/dist/{chunk-AZ3OSORH.js → chunk-UA2U62ZU.js} +8 -8
- package/dist/{chunk-JWTWXWTB.cjs → chunk-UEVFPRFX.cjs} +30 -26
- package/dist/chunk-UFAYYIKW.cjs +6 -0
- package/dist/{chunk-4ICWACJM.cjs → chunk-ULCERLBZ.cjs} +2 -2
- package/dist/{chunk-IUSRMZEQ.cjs → chunk-WNYDGEOU.cjs} +24 -24
- package/dist/{chunk-45F6WZFO.js → chunk-XD6PXEYI.js} +1 -1
- package/dist/{chunk-LUCA5GLQ.cjs → chunk-XXI7CNAU.cjs} +5 -5
- package/dist/{chunk-GLIXM3DE.js → chunk-ZBPXG3UG.js} +10 -6
- package/dist/{chunk-LG6G5Y7K.cjs → chunk-ZQE3MQST.cjs} +64 -64
- package/dist/{chunk-7BBQDOAK.cjs → chunk-ZVT7P5YK.cjs} +13 -13
- package/dist/clean.cjs +5 -5
- package/dist/clean.js +4 -4
- package/dist/config.cjs +6 -6
- package/dist/config.js +5 -5
- package/dist/context.cjs +7 -7
- package/dist/context.js +6 -6
- package/dist/index.cjs +15 -15
- package/dist/index.js +13 -13
- package/dist/package-json.cjs +6 -6
- package/dist/package-json.js +5 -5
- package/dist/plugins/deps-check.cjs +5 -5
- package/dist/plugins/deps-check.js +4 -4
- package/dist/plugins/resolve-paths.cjs +11 -11
- package/dist/plugins/resolve-paths.js +2 -2
- package/dist/tsup.cjs +5 -5
- package/dist/tsup.js +4 -4
- package/dist/types.cjs +2 -2
- package/dist/types.js +2 -2
- package/dist/watch.cjs +7 -7
- package/dist/watch.js +3 -3
- package/package.json +13 -9
- package/dist/chunk-JCXAR46G.cjs +0 -6
|
@@ -1,24 +1,24 @@
|
|
|
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 _chunkXXI7CNAUcjs = require('./chunk-XXI7CNAU.cjs');
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
|
|
7
|
-
var
|
|
7
|
+
var _chunkFPFKMRM6cjs = require('./chunk-FPFKMRM6.cjs');
|
|
8
8
|
|
|
9
9
|
|
|
10
10
|
|
|
11
11
|
|
|
12
|
-
var
|
|
12
|
+
var _chunkUEVFPRFXcjs = require('./chunk-UEVFPRFX.cjs');
|
|
13
13
|
|
|
14
14
|
|
|
15
|
-
var
|
|
15
|
+
var _chunkQTAPBA6Icjs = require('./chunk-QTAPBA6I.cjs');
|
|
16
16
|
|
|
17
17
|
|
|
18
|
-
var
|
|
18
|
+
var _chunkULCERLBZcjs = require('./chunk-ULCERLBZ.cjs');
|
|
19
19
|
|
|
20
20
|
// src/context.ts
|
|
21
|
-
|
|
21
|
+
_chunkULCERLBZcjs.init_cjs_shims.call(void 0, );
|
|
22
22
|
|
|
23
23
|
|
|
24
24
|
|
|
@@ -33,15 +33,15 @@ async function resolveContext(userOptions) {
|
|
|
33
33
|
if (!workspaceRoot) {
|
|
34
34
|
throw new Error("Cannot find Nx workspace root");
|
|
35
35
|
}
|
|
36
|
-
const workspaceConfig = await
|
|
36
|
+
const workspaceConfig = await _chunkFPFKMRM6cjs.getWorkspaceConfig.call(void 0, true, {
|
|
37
37
|
workspaceRoot: workspaceRoot.dir
|
|
38
38
|
});
|
|
39
|
-
|
|
40
|
-
const stopwatch =
|
|
39
|
+
_chunkUEVFPRFXcjs.writeDebug.call(void 0, " \u2699\uFE0F Resolving build options", workspaceConfig);
|
|
40
|
+
const stopwatch = _chunkUEVFPRFXcjs.getStopwatch.call(void 0, "Build options resolution");
|
|
41
41
|
const projectGraph = await _devkit.createProjectGraphAsync.call(void 0, {
|
|
42
42
|
exitOnError: true
|
|
43
43
|
});
|
|
44
|
-
const projectJsonPath =
|
|
44
|
+
const projectJsonPath = _chunkQTAPBA6Icjs.joinPaths.call(void 0,
|
|
45
45
|
workspaceRoot.dir,
|
|
46
46
|
projectRoot,
|
|
47
47
|
"project.json"
|
|
@@ -58,9 +58,9 @@ async function resolveContext(userOptions) {
|
|
|
58
58
|
"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."
|
|
59
59
|
);
|
|
60
60
|
}
|
|
61
|
-
const options = _defu2.default.call(void 0, userOptions,
|
|
61
|
+
const options = _defu2.default.call(void 0, userOptions, _chunkXXI7CNAUcjs.DEFAULT_BUILD_OPTIONS);
|
|
62
62
|
options.name ??= projectName;
|
|
63
|
-
const packageJsonPath =
|
|
63
|
+
const packageJsonPath = _chunkQTAPBA6Icjs.joinPaths.call(void 0,
|
|
64
64
|
workspaceRoot.dir,
|
|
65
65
|
options.projectRoot,
|
|
66
66
|
"package.json"
|
|
@@ -68,11 +68,11 @@ async function resolveContext(userOptions) {
|
|
|
68
68
|
if (!_fs.existsSync.call(void 0, packageJsonPath)) {
|
|
69
69
|
throw new Error("Cannot find package.json configuration");
|
|
70
70
|
}
|
|
71
|
-
const env =
|
|
71
|
+
const env = _chunkFPFKMRM6cjs.getEnv.call(void 0, "esbuild", options);
|
|
72
72
|
const define = _defu2.default.call(void 0, _nullishCoalesce(options.define, () => ( {})), _nullishCoalesce(env, () => ( {})));
|
|
73
73
|
const resolvedOptions = {
|
|
74
74
|
...options,
|
|
75
|
-
tsconfig: userOptions.tsconfig === null ? void 0 : userOptions.tsconfig ? userOptions.tsconfig :
|
|
75
|
+
tsconfig: userOptions.tsconfig === null ? void 0 : userOptions.tsconfig ? userOptions.tsconfig : _chunkQTAPBA6Icjs.joinPaths.call(void 0, workspaceRoot.dir, projectRoot, "tsconfig.json"),
|
|
76
76
|
metafile: userOptions.mode === "development",
|
|
77
77
|
clean: false,
|
|
78
78
|
env,
|
|
@@ -97,8 +97,8 @@ async function resolveContext(userOptions) {
|
|
|
97
97
|
projectConfigurations,
|
|
98
98
|
projectName,
|
|
99
99
|
projectGraph,
|
|
100
|
-
sourceRoot: resolvedOptions.sourceRoot || projectJson.sourceRoot ||
|
|
101
|
-
outputPath: resolvedOptions.outputPath ||
|
|
100
|
+
sourceRoot: resolvedOptions.sourceRoot || projectJson.sourceRoot || _chunkQTAPBA6Icjs.joinPaths.call(void 0, resolvedOptions.projectRoot, "src"),
|
|
101
|
+
outputPath: resolvedOptions.outputPath || _chunkQTAPBA6Icjs.joinPaths.call(void 0,
|
|
102
102
|
workspaceConfig.workspaceRoot,
|
|
103
103
|
"dist",
|
|
104
104
|
resolvedOptions.projectRoot
|
|
@@ -107,10 +107,10 @@ async function resolveContext(userOptions) {
|
|
|
107
107
|
};
|
|
108
108
|
context.options.esbuildPlugins = [..._nullishCoalesce(context.options.esbuildPlugins, () => ( []))];
|
|
109
109
|
if (context.options.verbose) {
|
|
110
|
-
|
|
110
|
+
_chunkUEVFPRFXcjs.writeDebug.call(void 0,
|
|
111
111
|
` \u2699\uFE0F Build options resolved:
|
|
112
112
|
|
|
113
|
-
${
|
|
113
|
+
${_chunkUEVFPRFXcjs.formatLogMessage.call(void 0, context.options)}`,
|
|
114
114
|
workspaceConfig
|
|
115
115
|
);
|
|
116
116
|
}
|
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
import {
|
|
2
2
|
DEFAULT_BUILD_OPTIONS
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-QLV7CIMC.js";
|
|
4
4
|
import {
|
|
5
5
|
getEnv,
|
|
6
6
|
getWorkspaceConfig
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-MGFCZLVU.js";
|
|
8
8
|
import {
|
|
9
9
|
formatLogMessage,
|
|
10
10
|
getStopwatch,
|
|
11
11
|
writeDebug
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-ZBPXG3UG.js";
|
|
13
13
|
import {
|
|
14
14
|
joinPaths
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-OY5J4Y6B.js";
|
|
16
16
|
import {
|
|
17
17
|
init_esm_shims
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-LPLBICCB.js";
|
|
19
19
|
|
|
20
20
|
// src/context.ts
|
|
21
21
|
init_esm_shims();
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import {
|
|
2
2
|
addPackageDependencies,
|
|
3
3
|
addWorkspacePackageJsonFields
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-MGFCZLVU.js";
|
|
5
5
|
import {
|
|
6
6
|
getStopwatch,
|
|
7
7
|
writeDebug
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-ZBPXG3UG.js";
|
|
9
9
|
import {
|
|
10
10
|
joinPaths
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-OY5J4Y6B.js";
|
|
12
12
|
import {
|
|
13
13
|
init_esm_shims
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-LPLBICCB.js";
|
|
15
15
|
|
|
16
16
|
// src/package-json.ts
|
|
17
17
|
init_esm_shims();
|
|
@@ -33,12 +33,12 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
33
33
|
mod
|
|
34
34
|
));
|
|
35
35
|
|
|
36
|
-
// ../../node_modules/.pnpm/tsup@8.4.0_patch_hash=
|
|
36
|
+
// ../../node_modules/.pnpm/tsup@8.4.0_patch_hash=751a554d775c3572381af4e7e5fa22eeda6dd6856012fb1cf521d6806eb2dc74__5124c89d5ddc703660a0f3c7db432ab1/node_modules/tsup/assets/esm_shims.js
|
|
37
37
|
import { fileURLToPath } from "url";
|
|
38
38
|
import path from "path";
|
|
39
39
|
var getFilename, getDirname, __dirname;
|
|
40
40
|
var init_esm_shims = __esm({
|
|
41
|
-
"../../node_modules/.pnpm/tsup@8.4.0_patch_hash=
|
|
41
|
+
"../../node_modules/.pnpm/tsup@8.4.0_patch_hash=751a554d775c3572381af4e7e5fa22eeda6dd6856012fb1cf521d6806eb2dc74__5124c89d5ddc703660a0f3c7db432ab1/node_modules/tsup/assets/esm_shims.js"() {
|
|
42
42
|
getFilename = () => fileURLToPath(import.meta.url);
|
|
43
43
|
getDirname = () => path.dirname(getFilename());
|
|
44
44
|
__dirname = /* @__PURE__ */ getDirname();
|
|
@@ -14,14 +14,14 @@ import {
|
|
|
14
14
|
writeDebug,
|
|
15
15
|
writeTrace,
|
|
16
16
|
writeWarning
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-ZBPXG3UG.js";
|
|
18
18
|
import {
|
|
19
19
|
correctPaths,
|
|
20
20
|
joinPaths
|
|
21
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-OY5J4Y6B.js";
|
|
22
22
|
import {
|
|
23
23
|
init_esm_shims
|
|
24
|
-
} from "./chunk-
|
|
24
|
+
} from "./chunk-LPLBICCB.js";
|
|
25
25
|
|
|
26
26
|
// ../build-tools/src/config.ts
|
|
27
27
|
init_esm_shims();
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var _chunkULCERLBZcjs = require('./chunk-ULCERLBZ.cjs');
|
|
4
4
|
|
|
5
5
|
// ../config-tools/src/utilities/correct-paths.ts
|
|
6
|
-
|
|
6
|
+
_chunkULCERLBZcjs.init_cjs_shims.call(void 0, );
|
|
7
7
|
var _DRIVE_LETTER_START_RE = /^[A-Za-z]:\//;
|
|
8
8
|
function normalizeWindowsPath(input = "") {
|
|
9
9
|
if (!input) {
|
|
@@ -1,14 +1,14 @@
|
|
|
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 _chunkUEVFPRFXcjs = require('./chunk-UEVFPRFX.cjs');
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
|
|
8
|
-
var
|
|
8
|
+
var _chunkULCERLBZcjs = require('./chunk-ULCERLBZ.cjs');
|
|
9
9
|
|
|
10
10
|
// src/plugins/deps-check.ts
|
|
11
|
-
|
|
11
|
+
_chunkULCERLBZcjs.init_cjs_shims.call(void 0, );
|
|
12
12
|
var _module = require('module');
|
|
13
13
|
var _path = require('path'); var _path2 = _interopRequireDefault(_path);
|
|
14
14
|
var unusedIgnore = [
|
|
@@ -40,7 +40,7 @@ var depsCheckPlugin = (bundle) => ({
|
|
|
40
40
|
name: "storm:deps-check",
|
|
41
41
|
setup(build) {
|
|
42
42
|
const pkgJsonPath = _path2.default.join(process.cwd(), "package.json");
|
|
43
|
-
const pkgContents =
|
|
43
|
+
const pkgContents = _chunkULCERLBZcjs.__require.call(void 0, pkgJsonPath);
|
|
44
44
|
const regDependencies = Object.keys(_nullishCoalesce(pkgContents["dependencies"], () => ( {})));
|
|
45
45
|
const devDependencies = Object.keys(_nullishCoalesce(pkgContents["devDependencies"], () => ( {})));
|
|
46
46
|
const peerDependencies = Object.keys(_nullishCoalesce(pkgContents["peerDependencies"], () => ( {})));
|
|
@@ -75,10 +75,10 @@ var depsCheckPlugin = (bundle) => ({
|
|
|
75
75
|
const filteredMissingDeps = missingDependencies.filter((dep) => {
|
|
76
76
|
return !missingIgnore.some((pattern) => dep.match(pattern)) && !peerDependencies.includes(dep);
|
|
77
77
|
});
|
|
78
|
-
|
|
78
|
+
_chunkUEVFPRFXcjs.writeWarning.call(void 0,
|
|
79
79
|
`Unused Dependencies: ${JSON.stringify(filteredUnusedDeps)}`
|
|
80
80
|
);
|
|
81
|
-
|
|
81
|
+
_chunkUEVFPRFXcjs.writeError.call(void 0,
|
|
82
82
|
`Missing Dependencies: ${JSON.stringify(filteredMissingDeps)}`
|
|
83
83
|
);
|
|
84
84
|
if (filteredMissingDeps.length > 0) {
|
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
import {
|
|
2
2
|
depsCheckPlugin
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-E6CKMNGC.js";
|
|
4
4
|
import {
|
|
5
5
|
copyBuildAssets
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-GJF63C63.js";
|
|
7
7
|
import {
|
|
8
8
|
cleanDirectories
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-JCF2DBYT.js";
|
|
10
10
|
import {
|
|
11
11
|
resolveContext
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-J2AX7MJ4.js";
|
|
13
13
|
import {
|
|
14
14
|
generatePackageJson
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-J3KLRQQ7.js";
|
|
16
16
|
import {
|
|
17
17
|
executeTsup
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-G5KD2O7B.js";
|
|
19
19
|
import {
|
|
20
20
|
getStopwatch,
|
|
21
21
|
writeDebug,
|
|
@@ -23,10 +23,10 @@ import {
|
|
|
23
23
|
writeFatal,
|
|
24
24
|
writeSuccess,
|
|
25
25
|
writeWarning
|
|
26
|
-
} from "./chunk-
|
|
26
|
+
} from "./chunk-ZBPXG3UG.js";
|
|
27
27
|
import {
|
|
28
28
|
init_esm_shims
|
|
29
|
-
} from "./chunk-
|
|
29
|
+
} from "./chunk-LPLBICCB.js";
|
|
30
30
|
|
|
31
31
|
// src/build.ts
|
|
32
32
|
init_esm_shims();
|
|
@@ -1,16 +1,16 @@
|
|
|
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
3
|
|
|
4
|
-
var
|
|
4
|
+
var _chunkQTAPBA6Icjs = require('./chunk-QTAPBA6I.cjs');
|
|
5
5
|
|
|
6
6
|
|
|
7
|
-
var
|
|
7
|
+
var _chunkULCERLBZcjs = require('./chunk-ULCERLBZ.cjs');
|
|
8
8
|
|
|
9
9
|
// ../config-tools/src/logger/console.ts
|
|
10
|
-
|
|
10
|
+
_chunkULCERLBZcjs.init_cjs_shims.call(void 0, );
|
|
11
11
|
|
|
12
12
|
// ../config-tools/src/types.ts
|
|
13
|
-
|
|
13
|
+
_chunkULCERLBZcjs.init_cjs_shims.call(void 0, );
|
|
14
14
|
var LogLevel = {
|
|
15
15
|
SILENT: 0,
|
|
16
16
|
FATAL: 10,
|
|
@@ -35,13 +35,13 @@ var LogLevelLabel = {
|
|
|
35
35
|
};
|
|
36
36
|
|
|
37
37
|
// ../config-tools/src/utilities/get-default-config.ts
|
|
38
|
-
|
|
38
|
+
_chunkULCERLBZcjs.init_cjs_shims.call(void 0, );
|
|
39
39
|
|
|
40
40
|
// ../config/src/index.ts
|
|
41
|
-
|
|
41
|
+
_chunkULCERLBZcjs.init_cjs_shims.call(void 0, );
|
|
42
42
|
|
|
43
43
|
// ../config/src/constants.ts
|
|
44
|
-
|
|
44
|
+
_chunkULCERLBZcjs.init_cjs_shims.call(void 0, );
|
|
45
45
|
var STORM_DEFAULT_DOCS = "https://docs.stormsoftware.com";
|
|
46
46
|
var STORM_DEFAULT_HOMEPAGE = "https://stormsoftware.com";
|
|
47
47
|
var STORM_DEFAULT_CONTACT = "https://stormsoftware.com/contact";
|
|
@@ -63,10 +63,10 @@ If this sounds interesting, and you would like to help us in creating the next g
|
|
|
63
63
|
var STORM_DEFAULT_ERROR_CODES_FILE = "tools/errors/codes.json";
|
|
64
64
|
|
|
65
65
|
// ../config/src/define-config.ts
|
|
66
|
-
|
|
66
|
+
_chunkULCERLBZcjs.init_cjs_shims.call(void 0, );
|
|
67
67
|
|
|
68
68
|
// ../config/src/schema.ts
|
|
69
|
-
|
|
69
|
+
_chunkULCERLBZcjs.init_cjs_shims.call(void 0, );
|
|
70
70
|
var _zod = require('zod'); var z = _interopRequireWildcard(_zod);
|
|
71
71
|
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");
|
|
72
72
|
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");
|
|
@@ -286,7 +286,7 @@ var stormWorkspaceConfigSchema = z.object({
|
|
|
286
286
|
);
|
|
287
287
|
|
|
288
288
|
// ../config/src/types.ts
|
|
289
|
-
|
|
289
|
+
_chunkULCERLBZcjs.init_cjs_shims.call(void 0, );
|
|
290
290
|
var COLOR_KEYS = [
|
|
291
291
|
"dark",
|
|
292
292
|
"light",
|
|
@@ -311,10 +311,10 @@ var _promises = require('fs/promises');
|
|
|
311
311
|
var _path = require('path');
|
|
312
312
|
|
|
313
313
|
// ../config-tools/src/utilities/find-workspace-root.ts
|
|
314
|
-
|
|
314
|
+
_chunkULCERLBZcjs.init_cjs_shims.call(void 0, );
|
|
315
315
|
|
|
316
316
|
// ../config-tools/src/utilities/find-up.ts
|
|
317
|
-
|
|
317
|
+
_chunkULCERLBZcjs.init_cjs_shims.call(void 0, );
|
|
318
318
|
|
|
319
319
|
|
|
320
320
|
var MAX_PATH_SEARCH_DEPTH = 30;
|
|
@@ -383,11 +383,11 @@ var rootDirectories = [
|
|
|
383
383
|
];
|
|
384
384
|
function findWorkspaceRootSafe(pathInsideMonorepo) {
|
|
385
385
|
if (process.env.STORM_WORKSPACE_ROOT || process.env.NX_WORKSPACE_ROOT_PATH) {
|
|
386
|
-
return
|
|
386
|
+
return _chunkQTAPBA6Icjs.correctPaths.call(void 0,
|
|
387
387
|
_nullishCoalesce(process.env.STORM_WORKSPACE_ROOT, () => ( process.env.NX_WORKSPACE_ROOT_PATH))
|
|
388
388
|
);
|
|
389
389
|
}
|
|
390
|
-
return
|
|
390
|
+
return _chunkQTAPBA6Icjs.correctPaths.call(void 0,
|
|
391
391
|
findFolderUp(
|
|
392
392
|
_nullishCoalesce(pathInsideMonorepo, () => ( process.cwd())),
|
|
393
393
|
rootFiles,
|
|
@@ -448,7 +448,7 @@ async function getPackageJsonConfig(root) {
|
|
|
448
448
|
const workspaceRoot = findWorkspaceRoot(root);
|
|
449
449
|
if (_fs.existsSync.call(void 0, _path.join.call(void 0, workspaceRoot, "package.json"))) {
|
|
450
450
|
const file = await _promises.readFile.call(void 0,
|
|
451
|
-
|
|
451
|
+
_chunkQTAPBA6Icjs.joinPaths.call(void 0, workspaceRoot, "package.json"),
|
|
452
452
|
"utf8"
|
|
453
453
|
);
|
|
454
454
|
if (file) {
|
|
@@ -522,21 +522,25 @@ function applyDefaultConfig(config) {
|
|
|
522
522
|
}
|
|
523
523
|
|
|
524
524
|
// ../config-tools/src/logger/chalk.ts
|
|
525
|
-
|
|
525
|
+
_chunkULCERLBZcjs.init_cjs_shims.call(void 0, );
|
|
526
526
|
var _chalk2 = require('chalk'); var _chalk3 = _interopRequireDefault(_chalk2);
|
|
527
527
|
var chalkDefault = {
|
|
528
528
|
hex: (_) => (message) => message,
|
|
529
529
|
bgHex: (_) => ({
|
|
530
|
-
whiteBright: (message) => message
|
|
530
|
+
whiteBright: (message) => message,
|
|
531
|
+
white: (message) => message
|
|
531
532
|
}),
|
|
533
|
+
white: (message) => message,
|
|
532
534
|
whiteBright: (message) => message,
|
|
533
535
|
gray: (message) => message,
|
|
534
536
|
bold: {
|
|
535
537
|
hex: (_) => (message) => message,
|
|
536
538
|
bgHex: (_) => ({
|
|
537
|
-
whiteBright: (message) => message
|
|
539
|
+
whiteBright: (message) => message,
|
|
540
|
+
white: (message) => message
|
|
538
541
|
}),
|
|
539
|
-
whiteBright: (message) => message
|
|
542
|
+
whiteBright: (message) => message,
|
|
543
|
+
white: (message) => message
|
|
540
544
|
},
|
|
541
545
|
dim: {
|
|
542
546
|
hex: (_) => (message) => message,
|
|
@@ -545,17 +549,17 @@ var chalkDefault = {
|
|
|
545
549
|
};
|
|
546
550
|
var getChalk = () => {
|
|
547
551
|
let _chalk = _chalk3.default;
|
|
548
|
-
if (!_optionalChain([_chalk, 'optionalAccess', _6 => _6.hex]) || !_optionalChain([_chalk, 'optionalAccess', _7 => _7.bold, 'optionalAccess', _8 => _8.hex]) || !_optionalChain([_chalk, 'optionalAccess', _9 => _9.bgHex]) || !_optionalChain([_chalk, 'optionalAccess', _10 => _10.whiteBright])) {
|
|
552
|
+
if (!_optionalChain([_chalk, 'optionalAccess', _6 => _6.hex]) || !_optionalChain([_chalk, 'optionalAccess', _7 => _7.bold, 'optionalAccess', _8 => _8.hex]) || !_optionalChain([_chalk, 'optionalAccess', _9 => _9.bgHex]) || !_optionalChain([_chalk, 'optionalAccess', _10 => _10.whiteBright]) || !_optionalChain([_chalk, 'optionalAccess', _11 => _11.white])) {
|
|
549
553
|
_chalk = chalkDefault;
|
|
550
554
|
}
|
|
551
555
|
return _chalk;
|
|
552
556
|
};
|
|
553
557
|
|
|
554
558
|
// ../config-tools/src/logger/console-icons.ts
|
|
555
|
-
|
|
559
|
+
_chunkULCERLBZcjs.init_cjs_shims.call(void 0, );
|
|
556
560
|
|
|
557
561
|
// ../config-tools/src/logger/is-unicode-supported.ts
|
|
558
|
-
|
|
562
|
+
_chunkULCERLBZcjs.init_cjs_shims.call(void 0, );
|
|
559
563
|
function isUnicodeSupported() {
|
|
560
564
|
if (process.platform !== "win32") {
|
|
561
565
|
return process.env.TERM !== "linux";
|
|
@@ -580,13 +584,13 @@ var CONSOLE_ICONS = {
|
|
|
580
584
|
};
|
|
581
585
|
|
|
582
586
|
// ../config-tools/src/logger/format-timestamp.ts
|
|
583
|
-
|
|
587
|
+
_chunkULCERLBZcjs.init_cjs_shims.call(void 0, );
|
|
584
588
|
var formatTimestamp = (date = /* @__PURE__ */ new Date()) => {
|
|
585
589
|
return `${date.toLocaleDateString()} ${date.toLocaleTimeString()}`;
|
|
586
590
|
};
|
|
587
591
|
|
|
588
592
|
// ../config-tools/src/logger/get-log-level.ts
|
|
589
|
-
|
|
593
|
+
_chunkULCERLBZcjs.init_cjs_shims.call(void 0, );
|
|
590
594
|
var getLogLevel = (label) => {
|
|
591
595
|
switch (label) {
|
|
592
596
|
case "all":
|
|
@@ -639,7 +643,7 @@ var getLogLevelLabel = (logLevel = LogLevel.INFO) => {
|
|
|
639
643
|
|
|
640
644
|
// ../config-tools/src/logger/console.ts
|
|
641
645
|
var getLogFn = (logLevel = LogLevel.INFO, config = {}, _chalk = getChalk()) => {
|
|
642
|
-
const colors = !_optionalChain([config, 'access',
|
|
646
|
+
const colors = !_optionalChain([config, 'access', _12 => _12.colors, 'optionalAccess', _13 => _13.dark]) && !_optionalChain([config, 'access', _14 => _14.colors, 'optionalAccess', _15 => _15["base"]]) && !_optionalChain([config, 'access', _16 => _16.colors, 'optionalAccess', _17 => _17["base"], 'optionalAccess', _18 => _18.dark]) ? DEFAULT_COLOR_CONFIG : _optionalChain([config, 'access', _19 => _19.colors, 'optionalAccess', _20 => _20.dark]) && typeof config.colors.dark === "string" ? config.colors : _optionalChain([config, 'access', _21 => _21.colors, 'optionalAccess', _22 => _22["base"], 'optionalAccess', _23 => _23.dark]) && typeof config.colors["base"].dark === "string" ? config.colors["base"].dark : _optionalChain([config, 'access', _24 => _24.colors, 'optionalAccess', _25 => _25["base"]]) ? _optionalChain([config, 'access', _26 => _26.colors, 'optionalAccess', _27 => _27["base"]]) : DEFAULT_COLOR_CONFIG;
|
|
643
647
|
const configLogLevel = config.logLevel || process.env.STORM_LOG_LEVEL || LogLevelLabel.INFO;
|
|
644
648
|
if (logLevel > getLogLevel(configLogLevel) || logLevel <= LogLevel.SILENT || getLogLevel(configLogLevel) <= LogLevel.SILENT) {
|
|
645
649
|
return (_) => {
|
|
@@ -754,7 +758,7 @@ ${Object.keys(message).filter((key) => !skip.includes(key)).map(
|
|
|
754
758
|
};
|
|
755
759
|
var _isFunction = (value) => {
|
|
756
760
|
try {
|
|
757
|
-
return value instanceof Function || typeof value === "function" || !!(_optionalChain([value, 'optionalAccess',
|
|
761
|
+
return value instanceof Function || typeof value === "function" || !!(_optionalChain([value, 'optionalAccess', _28 => _28.constructor]) && _optionalChain([value, 'optionalAccess', _29 => _29.call]) && _optionalChain([value, 'optionalAccess', _30 => _30.apply]));
|
|
758
762
|
} catch (e) {
|
|
759
763
|
return false;
|
|
760
764
|
}
|
|
@@ -33,9 +33,9 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
33
33
|
mod
|
|
34
34
|
));
|
|
35
35
|
|
|
36
|
-
// ../../node_modules/.pnpm/tsup@8.4.0_patch_hash=
|
|
36
|
+
// ../../node_modules/.pnpm/tsup@8.4.0_patch_hash=751a554d775c3572381af4e7e5fa22eeda6dd6856012fb1cf521d6806eb2dc74__5124c89d5ddc703660a0f3c7db432ab1/node_modules/tsup/assets/cjs_shims.js
|
|
37
37
|
var init_cjs_shims = __esm({
|
|
38
|
-
"../../node_modules/.pnpm/tsup@8.4.0_patch_hash=
|
|
38
|
+
"../../node_modules/.pnpm/tsup@8.4.0_patch_hash=751a554d775c3572381af4e7e5fa22eeda6dd6856012fb1cf521d6806eb2dc74__5124c89d5ddc703660a0f3c7db432ab1/node_modules/tsup/assets/cjs_shims.js"() {
|
|
39
39
|
}
|
|
40
40
|
});
|
|
41
41
|
|
|
@@ -1,21 +1,21 @@
|
|
|
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 _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 _chunkSD2XHXFFcjs = require('./chunk-SD2XHXFF.cjs');
|
|
4
4
|
|
|
5
5
|
|
|
6
|
-
var
|
|
6
|
+
var _chunkDDXSMCAAcjs = require('./chunk-DDXSMCAA.cjs');
|
|
7
7
|
|
|
8
8
|
|
|
9
|
-
var
|
|
9
|
+
var _chunkAV5VL6UUcjs = require('./chunk-AV5VL6UU.cjs');
|
|
10
10
|
|
|
11
11
|
|
|
12
|
-
var
|
|
12
|
+
var _chunkHLWSFXL3cjs = require('./chunk-HLWSFXL3.cjs');
|
|
13
13
|
|
|
14
14
|
|
|
15
|
-
var
|
|
15
|
+
var _chunkZVT7P5YKcjs = require('./chunk-ZVT7P5YK.cjs');
|
|
16
16
|
|
|
17
17
|
|
|
18
|
-
var
|
|
18
|
+
var _chunkZQE3MQSTcjs = require('./chunk-ZQE3MQST.cjs');
|
|
19
19
|
|
|
20
20
|
|
|
21
21
|
|
|
@@ -23,29 +23,29 @@ var _chunkLG6G5Y7Kcjs = require('./chunk-LG6G5Y7K.cjs');
|
|
|
23
23
|
|
|
24
24
|
|
|
25
25
|
|
|
26
|
-
var
|
|
26
|
+
var _chunkUEVFPRFXcjs = require('./chunk-UEVFPRFX.cjs');
|
|
27
27
|
|
|
28
28
|
|
|
29
|
-
var
|
|
29
|
+
var _chunkULCERLBZcjs = require('./chunk-ULCERLBZ.cjs');
|
|
30
30
|
|
|
31
31
|
// src/build.ts
|
|
32
|
-
|
|
32
|
+
_chunkULCERLBZcjs.init_cjs_shims.call(void 0, );
|
|
33
33
|
var _esbuild = require('esbuild'); var esbuild = _interopRequireWildcard(_esbuild);
|
|
34
34
|
var _globby = require('globby');
|
|
35
35
|
async function reportResults(context) {
|
|
36
36
|
if (_optionalChain([context, 'access', _ => _.result, 'optionalAccess', _2 => _2.errors, 'access', _3 => _3.length]) === 0) {
|
|
37
37
|
if (context.result.warnings.length > 0) {
|
|
38
|
-
|
|
38
|
+
_chunkUEVFPRFXcjs.writeWarning.call(void 0,
|
|
39
39
|
` \u{1F6A7} The following warnings occurred during the build: ${context.result.warnings.map((warning) => warning.text).join("\n")}`,
|
|
40
40
|
context.workspaceConfig
|
|
41
41
|
);
|
|
42
42
|
}
|
|
43
|
-
|
|
43
|
+
_chunkUEVFPRFXcjs.writeSuccess.call(void 0,
|
|
44
44
|
` \u{1F4E6} The ${context.options.name} build completed successfully`,
|
|
45
45
|
context.workspaceConfig
|
|
46
46
|
);
|
|
47
47
|
} else if (_optionalChain([context, 'access', _4 => _4.result, 'optionalAccess', _5 => _5.errors]) && _optionalChain([context, 'access', _6 => _6.result, 'optionalAccess', _7 => _7.errors, 'access', _8 => _8.length]) > 0) {
|
|
48
|
-
|
|
48
|
+
_chunkUEVFPRFXcjs.writeError.call(void 0,
|
|
49
49
|
` \u274C The ${context.options.name} build failed with the following errors: ${context.result.errors.map((error) => error.text).join("\n")}`,
|
|
50
50
|
context.workspaceConfig
|
|
51
51
|
);
|
|
@@ -74,7 +74,7 @@ async function dependencyCheck(options) {
|
|
|
74
74
|
write: false,
|
|
75
75
|
// no need to write for analysis
|
|
76
76
|
outdir: "out",
|
|
77
|
-
plugins: [
|
|
77
|
+
plugins: [_chunkSD2XHXFFcjs.depsCheckPlugin.call(void 0, options.bundle)]
|
|
78
78
|
});
|
|
79
79
|
await buildPromise.catch(() => {
|
|
80
80
|
});
|
|
@@ -82,36 +82,36 @@ async function dependencyCheck(options) {
|
|
|
82
82
|
}
|
|
83
83
|
async function cleanOutputPath(context) {
|
|
84
84
|
if (context.clean !== false && context.outputPath) {
|
|
85
|
-
|
|
85
|
+
_chunkUEVFPRFXcjs.writeDebug.call(void 0,
|
|
86
86
|
` \u{1F9F9} Cleaning ${context.options.name} output path: ${context.outputPath}`,
|
|
87
87
|
context.workspaceConfig
|
|
88
88
|
);
|
|
89
|
-
const stopwatch =
|
|
90
|
-
await
|
|
89
|
+
const stopwatch = _chunkUEVFPRFXcjs.getStopwatch.call(void 0, `${context.options.name} output clean`);
|
|
90
|
+
await _chunkAV5VL6UUcjs.cleanDirectories.call(void 0, context.outputPath);
|
|
91
91
|
stopwatch();
|
|
92
92
|
}
|
|
93
93
|
return context;
|
|
94
94
|
}
|
|
95
95
|
async function build2(options) {
|
|
96
|
-
|
|
97
|
-
const stopwatch =
|
|
96
|
+
_chunkUEVFPRFXcjs.writeDebug.call(void 0, ` \u26A1 Executing Storm ESBuild pipeline`);
|
|
97
|
+
const stopwatch = _chunkUEVFPRFXcjs.getStopwatch.call(void 0, "ESBuild pipeline");
|
|
98
98
|
try {
|
|
99
99
|
const opts = Array.isArray(options) ? options : [options];
|
|
100
100
|
if (opts.length === 0) {
|
|
101
101
|
throw new Error("No build options were provided");
|
|
102
102
|
}
|
|
103
|
-
const context = await
|
|
103
|
+
const context = await _chunkHLWSFXL3cjs.resolveContext.call(void 0, options);
|
|
104
104
|
await cleanOutputPath(context);
|
|
105
105
|
await Promise.all([
|
|
106
106
|
dependencyCheck(context.options),
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
107
|
+
_chunkZVT7P5YKcjs.generatePackageJson.call(void 0, context),
|
|
108
|
+
_chunkDDXSMCAAcjs.copyBuildAssets.call(void 0, context),
|
|
109
|
+
_chunkZQE3MQSTcjs.executeTsup.call(void 0, context)
|
|
110
110
|
]);
|
|
111
111
|
await reportResults(context);
|
|
112
|
-
|
|
112
|
+
_chunkUEVFPRFXcjs.writeSuccess.call(void 0, " \u{1F3C1} ESBuild pipeline build completed successfully");
|
|
113
113
|
} catch (error) {
|
|
114
|
-
|
|
114
|
+
_chunkUEVFPRFXcjs.writeFatal.call(void 0,
|
|
115
115
|
"Fatal errors that the build process could not recover from have occured. The build process has been terminated."
|
|
116
116
|
);
|
|
117
117
|
throw error;
|