@storm-software/esbuild 0.35.11 → 0.35.13
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 -2
- package/bin/esbuild.cjs +1225 -2788
- package/dist/assets.cjs +6 -6
- package/dist/assets.js +5 -5
- package/dist/build.cjs +13 -14
- package/dist/build.js +12 -13
- package/dist/{chunk-C5UZWWWR.js → chunk-2LYIFO7K.js} +3 -9
- package/dist/{chunk-KXCV2R7J.cjs → chunk-55UPQQ65.cjs} +288 -179
- package/dist/{chunk-INQXL7FE.js → chunk-72UBXZRO.js} +4 -6
- package/dist/{chunk-RMRB7CWQ.js → chunk-7KIT5JE6.js} +36 -30
- package/dist/{chunk-OHH3RWRK.cjs → chunk-B3MHVZOK.cjs} +10 -12
- package/dist/{chunk-NNO5TTNR.cjs → chunk-BK5GLVSJ.cjs} +47 -21
- package/dist/{chunk-J3XDBU5Z.cjs → chunk-BWMW4ZUS.cjs} +46 -40
- package/dist/{chunk-VITVYHJG.cjs → chunk-C25ALB4J.cjs} +975 -1209
- package/dist/chunk-CEJM5IFH.js +37 -0
- package/dist/{chunk-ICKIIBXC.js → chunk-FHHEEOIV.js} +2 -2
- package/dist/{chunk-PHC57UZZ.cjs → chunk-H7NSISN4.cjs} +33 -24
- package/dist/{chunk-QAYURSX7.cjs → chunk-IULOZ7MO.cjs} +5 -5
- package/dist/{chunk-QTR5272S.cjs → chunk-JCICRU7K.cjs} +3 -5
- package/dist/{chunk-OZEWXLIK.js → chunk-KV6GNLVF.js} +8 -10
- package/dist/{chunk-TULJZS5M.js → chunk-KXZCIMKJ.js} +149 -265
- package/dist/{chunk-T4UMKHLQ.cjs → chunk-LBRDOW2V.cjs} +18 -9
- package/dist/{chunk-5P6GWVMJ.js → chunk-NACKZM5D.js} +189 -116
- package/dist/chunk-NLIYZM5H.cjs +25 -0
- package/dist/{chunk-WHHAD2OY.js → chunk-Q3WZPCLD.js} +232 -123
- package/dist/{chunk-7ESNPD46.js → chunk-QOTJTLX7.js} +1 -1
- package/dist/{chunk-J5J57SEI.cjs → chunk-RBXXACL5.cjs} +204 -131
- package/dist/{chunk-KYRZY7X7.js → chunk-RNXNYWO3.js} +28 -19
- package/dist/{chunk-H35FAHLW.cjs → chunk-T4N45NGL.cjs} +17 -26
- package/dist/{chunk-66VO6PT4.js → chunk-VLK67MTI.js} +43 -17
- package/dist/{chunk-SR4MG2LN.js → chunk-VNLMOUVN.js} +15 -24
- package/dist/chunk-XHTD4QDZ.cjs +6 -0
- 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 -8
- package/dist/context.js +6 -7
- package/dist/index.cjs +15 -16
- package/dist/index.js +13 -14
- 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 +82 -5
- package/dist/plugins/resolve-paths.js +81 -4
- 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 +19 -29
- package/dist/watch.js +15 -25
- package/package.json +4 -4
- package/dist/chunk-AF5YHP7E.cjs +0 -57
- package/dist/chunk-BWCGRWHA.cjs +0 -6
- package/dist/chunk-ELF4S3RR.cjs +0 -31
- package/dist/chunk-IL6FCY37.js +0 -57
- package/dist/chunk-LQIX6FZY.js +0 -28
|
@@ -1,8 +1,85 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
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 _chunkAF5YHP7Ecjs = require('../chunk-AF5YHP7E.cjs');
|
|
4
|
-
require('../chunk-OHH3RWRK.cjs');
|
|
5
|
-
require('../chunk-QTR5272S.cjs');
|
|
6
3
|
|
|
4
|
+
var _chunkB3MHVZOKcjs = require('../chunk-B3MHVZOK.cjs');
|
|
7
5
|
|
|
8
|
-
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
var _chunkJCICRU7Kcjs = require('../chunk-JCICRU7K.cjs');
|
|
9
|
+
|
|
10
|
+
// src/plugins/resolve-paths.ts
|
|
11
|
+
_chunkJCICRU7Kcjs.init_cjs_shims.call(void 0, );
|
|
12
|
+
|
|
13
|
+
// ../config-tools/src/utilities/file-path-utils.ts
|
|
14
|
+
_chunkJCICRU7Kcjs.init_cjs_shims.call(void 0, );
|
|
15
|
+
function findFileName(filePath, { requireExtension, withExtension } = {}) {
|
|
16
|
+
const result = _nullishCoalesce(_optionalChain([_chunkB3MHVZOKcjs.normalizeWindowsPath.call(void 0, filePath), 'optionalAccess', _ => _.split, 'call', _2 => _2(_optionalChain([filePath, 'optionalAccess', _3 => _3.includes, 'call', _4 => _4("\\")]) ? "\\" : "/"), 'optionalAccess', _5 => _5.pop, 'call', _6 => _6()]), () => ( ""));
|
|
17
|
+
if (requireExtension === true && !result.includes(".")) {
|
|
18
|
+
return "";
|
|
19
|
+
}
|
|
20
|
+
if (withExtension === false && result.includes(".")) {
|
|
21
|
+
return result.split(".").slice(-1).join(".") || "";
|
|
22
|
+
}
|
|
23
|
+
return result;
|
|
24
|
+
}
|
|
25
|
+
function findFilePath(filePath) {
|
|
26
|
+
const normalizedPath = _chunkB3MHVZOKcjs.normalizeWindowsPath.call(void 0, filePath);
|
|
27
|
+
return normalizedPath.replace(
|
|
28
|
+
findFileName(normalizedPath, { requireExtension: true }),
|
|
29
|
+
""
|
|
30
|
+
);
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
// src/plugins/resolve-paths.ts
|
|
34
|
+
var _path = require('path'); var _path2 = _interopRequireDefault(_path);
|
|
35
|
+
function resolvePathsConfig(options, cwd, projectRoot) {
|
|
36
|
+
if (_optionalChain([options, 'optionalAccess', _7 => _7.compilerOptions, 'optionalAccess', _8 => _8.paths])) {
|
|
37
|
+
const paths = Object.entries(options.compilerOptions.paths);
|
|
38
|
+
const resolvedPaths = paths.map(([key, paths2]) => {
|
|
39
|
+
return [key, paths2.map((v) => _path2.default.resolve(cwd, v))];
|
|
40
|
+
});
|
|
41
|
+
return Object.fromEntries(resolvedPaths);
|
|
42
|
+
}
|
|
43
|
+
if (options.extends) {
|
|
44
|
+
const extendsPath = _path2.default.resolve(
|
|
45
|
+
projectRoot ? _chunkB3MHVZOKcjs.joinPaths.call(void 0, cwd, projectRoot, options.extends) : _chunkB3MHVZOKcjs.joinPaths.call(void 0, cwd, options.extends)
|
|
46
|
+
);
|
|
47
|
+
const extendsDir = _path2.default.dirname(extendsPath);
|
|
48
|
+
const extendsConfig = _chunkJCICRU7Kcjs.__require.call(void 0, extendsPath);
|
|
49
|
+
return resolvePathsConfig(extendsConfig, extendsDir);
|
|
50
|
+
}
|
|
51
|
+
return [];
|
|
52
|
+
}
|
|
53
|
+
var resolvePathsPlugin = (context) => ({
|
|
54
|
+
name: "storm:resolve-paths",
|
|
55
|
+
setup(build) {
|
|
56
|
+
const parentTsConfig = build.initialOptions.tsconfig ? _chunkJCICRU7Kcjs.__require.call(void 0, _chunkB3MHVZOKcjs.joinPaths.call(void 0,
|
|
57
|
+
context.workspaceConfig.workspaceRoot,
|
|
58
|
+
build.initialOptions.tsconfig.replace(
|
|
59
|
+
context.workspaceConfig.workspaceRoot,
|
|
60
|
+
""
|
|
61
|
+
)
|
|
62
|
+
)) : _chunkJCICRU7Kcjs.__require.call(void 0, _chunkB3MHVZOKcjs.joinPaths.call(void 0, context.workspaceConfig.workspaceRoot, "tsconfig.json"));
|
|
63
|
+
const resolvedTsPaths = resolvePathsConfig(
|
|
64
|
+
parentTsConfig,
|
|
65
|
+
context.workspaceConfig.workspaceRoot,
|
|
66
|
+
context.options.projectRoot
|
|
67
|
+
);
|
|
68
|
+
const packagesRegex = new RegExp(
|
|
69
|
+
`^(${Object.keys(resolvedTsPaths).join("|")})$`
|
|
70
|
+
);
|
|
71
|
+
build.onResolve({ filter: packagesRegex }, (args) => {
|
|
72
|
+
if (_optionalChain([build, 'access', _9 => _9.initialOptions, 'access', _10 => _10.external, 'optionalAccess', _11 => _11.includes, 'call', _12 => _12(args.path)])) {
|
|
73
|
+
return { path: args.path, external: true };
|
|
74
|
+
}
|
|
75
|
+
let resolvedPath = resolvedTsPaths[args.path][0];
|
|
76
|
+
if (resolvedPath.endsWith(".ts") || resolvedPath.endsWith(".tsx")) {
|
|
77
|
+
resolvedPath = findFilePath(resolvedPath);
|
|
78
|
+
}
|
|
79
|
+
return { path: _chunkB3MHVZOKcjs.joinPaths.call(void 0, resolvedPath, "index.ts") };
|
|
80
|
+
});
|
|
81
|
+
}
|
|
82
|
+
});
|
|
83
|
+
|
|
84
|
+
|
|
85
|
+
exports.resolvePathsPlugin = resolvePathsPlugin;
|
|
@@ -1,8 +1,85 @@
|
|
|
1
1
|
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
import
|
|
2
|
+
joinPaths,
|
|
3
|
+
normalizeWindowsPath
|
|
4
|
+
} from "../chunk-KV6GNLVF.js";
|
|
5
|
+
import {
|
|
6
|
+
__require,
|
|
7
|
+
init_esm_shims
|
|
8
|
+
} from "../chunk-72UBXZRO.js";
|
|
9
|
+
|
|
10
|
+
// src/plugins/resolve-paths.ts
|
|
11
|
+
init_esm_shims();
|
|
12
|
+
|
|
13
|
+
// ../config-tools/src/utilities/file-path-utils.ts
|
|
14
|
+
init_esm_shims();
|
|
15
|
+
function findFileName(filePath, { requireExtension, withExtension } = {}) {
|
|
16
|
+
const result = normalizeWindowsPath(filePath)?.split(filePath?.includes("\\") ? "\\" : "/")?.pop() ?? "";
|
|
17
|
+
if (requireExtension === true && !result.includes(".")) {
|
|
18
|
+
return "";
|
|
19
|
+
}
|
|
20
|
+
if (withExtension === false && result.includes(".")) {
|
|
21
|
+
return result.split(".").slice(-1).join(".") || "";
|
|
22
|
+
}
|
|
23
|
+
return result;
|
|
24
|
+
}
|
|
25
|
+
function findFilePath(filePath) {
|
|
26
|
+
const normalizedPath = normalizeWindowsPath(filePath);
|
|
27
|
+
return normalizedPath.replace(
|
|
28
|
+
findFileName(normalizedPath, { requireExtension: true }),
|
|
29
|
+
""
|
|
30
|
+
);
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
// src/plugins/resolve-paths.ts
|
|
34
|
+
import path from "node:path";
|
|
35
|
+
function resolvePathsConfig(options, cwd, projectRoot) {
|
|
36
|
+
if (options?.compilerOptions?.paths) {
|
|
37
|
+
const paths = Object.entries(options.compilerOptions.paths);
|
|
38
|
+
const resolvedPaths = paths.map(([key, paths2]) => {
|
|
39
|
+
return [key, paths2.map((v) => path.resolve(cwd, v))];
|
|
40
|
+
});
|
|
41
|
+
return Object.fromEntries(resolvedPaths);
|
|
42
|
+
}
|
|
43
|
+
if (options.extends) {
|
|
44
|
+
const extendsPath = path.resolve(
|
|
45
|
+
projectRoot ? joinPaths(cwd, projectRoot, options.extends) : joinPaths(cwd, options.extends)
|
|
46
|
+
);
|
|
47
|
+
const extendsDir = path.dirname(extendsPath);
|
|
48
|
+
const extendsConfig = __require(extendsPath);
|
|
49
|
+
return resolvePathsConfig(extendsConfig, extendsDir);
|
|
50
|
+
}
|
|
51
|
+
return [];
|
|
52
|
+
}
|
|
53
|
+
var resolvePathsPlugin = (context) => ({
|
|
54
|
+
name: "storm:resolve-paths",
|
|
55
|
+
setup(build) {
|
|
56
|
+
const parentTsConfig = build.initialOptions.tsconfig ? __require(joinPaths(
|
|
57
|
+
context.workspaceConfig.workspaceRoot,
|
|
58
|
+
build.initialOptions.tsconfig.replace(
|
|
59
|
+
context.workspaceConfig.workspaceRoot,
|
|
60
|
+
""
|
|
61
|
+
)
|
|
62
|
+
)) : __require(joinPaths(context.workspaceConfig.workspaceRoot, "tsconfig.json"));
|
|
63
|
+
const resolvedTsPaths = resolvePathsConfig(
|
|
64
|
+
parentTsConfig,
|
|
65
|
+
context.workspaceConfig.workspaceRoot,
|
|
66
|
+
context.options.projectRoot
|
|
67
|
+
);
|
|
68
|
+
const packagesRegex = new RegExp(
|
|
69
|
+
`^(${Object.keys(resolvedTsPaths).join("|")})$`
|
|
70
|
+
);
|
|
71
|
+
build.onResolve({ filter: packagesRegex }, (args) => {
|
|
72
|
+
if (build.initialOptions.external?.includes(args.path)) {
|
|
73
|
+
return { path: args.path, external: true };
|
|
74
|
+
}
|
|
75
|
+
let resolvedPath = resolvedTsPaths[args.path][0];
|
|
76
|
+
if (resolvedPath.endsWith(".ts") || resolvedPath.endsWith(".tsx")) {
|
|
77
|
+
resolvedPath = findFilePath(resolvedPath);
|
|
78
|
+
}
|
|
79
|
+
return { path: joinPaths(resolvedPath, "index.ts") };
|
|
80
|
+
});
|
|
81
|
+
}
|
|
82
|
+
});
|
|
6
83
|
export {
|
|
7
84
|
resolvePathsPlugin
|
|
8
85
|
};
|
package/dist/tsup.cjs
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
require('./chunk-
|
|
5
|
-
require('./chunk-
|
|
6
|
-
require('./chunk-
|
|
3
|
+
var _chunkC25ALB4Jcjs = require('./chunk-C25ALB4J.cjs');
|
|
4
|
+
require('./chunk-RBXXACL5.cjs');
|
|
5
|
+
require('./chunk-B3MHVZOK.cjs');
|
|
6
|
+
require('./chunk-JCICRU7K.cjs');
|
|
7
7
|
|
|
8
8
|
|
|
9
|
-
exports.executeTsup =
|
|
9
|
+
exports.executeTsup = _chunkC25ALB4Jcjs.executeTsup;
|
package/dist/tsup.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
executeTsup
|
|
3
|
-
} from "./chunk-
|
|
4
|
-
import "./chunk-
|
|
5
|
-
import "./chunk-
|
|
6
|
-
import "./chunk-
|
|
3
|
+
} from "./chunk-KXZCIMKJ.js";
|
|
4
|
+
import "./chunk-NACKZM5D.js";
|
|
5
|
+
import "./chunk-KV6GNLVF.js";
|
|
6
|
+
import "./chunk-72UBXZRO.js";
|
|
7
7
|
export {
|
|
8
8
|
executeTsup
|
|
9
9
|
};
|
package/dist/types.cjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";require('./chunk-
|
|
2
|
-
require('./chunk-
|
|
1
|
+
"use strict";require('./chunk-XHTD4QDZ.cjs');
|
|
2
|
+
require('./chunk-JCICRU7K.cjs');
|
package/dist/types.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import "./chunk-
|
|
2
|
-
import "./chunk-
|
|
1
|
+
import "./chunk-QOTJTLX7.js";
|
|
2
|
+
import "./chunk-72UBXZRO.js";
|
package/dist/watch.cjs
CHANGED
|
@@ -1,20 +1,19 @@
|
|
|
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
3
|
|
|
4
|
-
var
|
|
5
|
-
require('./chunk-
|
|
4
|
+
var _chunkRBXXACL5cjs = require('./chunk-RBXXACL5.cjs');
|
|
5
|
+
require('./chunk-B3MHVZOK.cjs');
|
|
6
6
|
|
|
7
7
|
|
|
8
|
-
|
|
9
|
-
var _chunkQTR5272Scjs = require('./chunk-QTR5272S.cjs');
|
|
8
|
+
var _chunkJCICRU7Kcjs = require('./chunk-JCICRU7K.cjs');
|
|
10
9
|
|
|
11
10
|
// src/watch.ts
|
|
12
|
-
|
|
11
|
+
_chunkJCICRU7Kcjs.init_cjs_shims.call(void 0, );
|
|
13
12
|
var _chokidar = require('chokidar');
|
|
14
13
|
var _estoolkit = require('es-toolkit');
|
|
15
14
|
|
|
16
15
|
// src/utilities/helpers.ts
|
|
17
|
-
|
|
16
|
+
_chunkJCICRU7Kcjs.init_cjs_shims.call(void 0, );
|
|
18
17
|
function handleSync(fn) {
|
|
19
18
|
try {
|
|
20
19
|
return fn();
|
|
@@ -22,7 +21,6 @@ function handleSync(fn) {
|
|
|
22
21
|
return error_;
|
|
23
22
|
}
|
|
24
23
|
}
|
|
25
|
-
_chunkQTR5272Scjs.__name.call(void 0, handleSync, "handleSync");
|
|
26
24
|
async function handleAsync(fn) {
|
|
27
25
|
try {
|
|
28
26
|
return await fn();
|
|
@@ -30,7 +28,6 @@ async function handleAsync(fn) {
|
|
|
30
28
|
return error_;
|
|
31
29
|
}
|
|
32
30
|
}
|
|
33
|
-
_chunkQTR5272Scjs.__name.call(void 0, handleAsync, "handleAsync");
|
|
34
31
|
var handle = handleSync;
|
|
35
32
|
handle.async = handleAsync;
|
|
36
33
|
var skip = Symbol("skip");
|
|
@@ -44,18 +41,18 @@ function transduceSync(list, transformer) {
|
|
|
44
41
|
}
|
|
45
42
|
return transduced;
|
|
46
43
|
}
|
|
47
|
-
_chunkQTR5272Scjs.__name.call(void 0, transduceSync, "transduceSync");
|
|
48
44
|
async function transduceAsync(list, transformer) {
|
|
49
45
|
const transduced = [];
|
|
50
|
-
await Promise.all(
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
46
|
+
await Promise.all(
|
|
47
|
+
list.entries().map(async ([i, element_]) => {
|
|
48
|
+
const transformed = await transformer(element_, i);
|
|
49
|
+
if (transformed !== skip) {
|
|
50
|
+
transduced[transduced.length] = transformed;
|
|
51
|
+
}
|
|
52
|
+
})
|
|
53
|
+
);
|
|
56
54
|
return transduced;
|
|
57
55
|
}
|
|
58
|
-
_chunkQTR5272Scjs.__name.call(void 0, transduceAsync, "transduceAsync");
|
|
59
56
|
var transduce = transduceSync;
|
|
60
57
|
transduce.async = transduceAsync;
|
|
61
58
|
function pipeSync(fn, ...fns) {
|
|
@@ -67,7 +64,6 @@ function pipeSync(fn, ...fns) {
|
|
|
67
64
|
return result;
|
|
68
65
|
};
|
|
69
66
|
}
|
|
70
|
-
_chunkQTR5272Scjs.__name.call(void 0, pipeSync, "pipeSync");
|
|
71
67
|
function pipeAsync(fn, ...fns) {
|
|
72
68
|
return async (...args) => {
|
|
73
69
|
let result = await fn(...args);
|
|
@@ -77,39 +73,33 @@ function pipeAsync(fn, ...fns) {
|
|
|
77
73
|
return result;
|
|
78
74
|
};
|
|
79
75
|
}
|
|
80
|
-
_chunkQTR5272Scjs.__name.call(void 0, pipeAsync, "pipeAsync");
|
|
81
76
|
var pipe = pipeSync;
|
|
82
77
|
pipe.async = pipeAsync;
|
|
83
78
|
|
|
84
79
|
// src/watch.ts
|
|
85
|
-
var watch =
|
|
80
|
+
var watch = (context, options) => {
|
|
86
81
|
if (!options.watch) {
|
|
87
82
|
return context;
|
|
88
83
|
}
|
|
89
84
|
const config = {
|
|
90
85
|
ignoreInitial: true,
|
|
91
86
|
useFsEvents: true,
|
|
92
|
-
ignored: [
|
|
93
|
-
"./src/__tests__/**/*",
|
|
94
|
-
"./package.json"
|
|
95
|
-
]
|
|
87
|
+
ignored: ["./src/__tests__/**/*", "./package.json"]
|
|
96
88
|
};
|
|
97
|
-
const changeWatcher = _chokidar.watch.call(void 0, [
|
|
98
|
-
"./src/**/*"
|
|
99
|
-
], config);
|
|
89
|
+
const changeWatcher = _chokidar.watch.call(void 0, ["./src/**/*"], config);
|
|
100
90
|
const fastRebuild = _estoolkit.debounce.call(void 0, async () => {
|
|
101
91
|
const timeBefore = Date.now();
|
|
102
92
|
const rebuildResult = await handle.async(() => {
|
|
103
93
|
return context.rebuild();
|
|
104
94
|
});
|
|
105
95
|
if (rebuildResult instanceof Error) {
|
|
106
|
-
|
|
96
|
+
_chunkRBXXACL5cjs.writeError.call(void 0, rebuildResult.message);
|
|
107
97
|
}
|
|
108
|
-
|
|
98
|
+
_chunkRBXXACL5cjs.writeTrace.call(void 0, `${Date.now() - timeBefore}ms [${_nullishCoalesce(options.name, () => ( ""))}]`);
|
|
109
99
|
}, 10);
|
|
110
100
|
changeWatcher.on("change", fastRebuild);
|
|
111
101
|
return void 0;
|
|
112
|
-
}
|
|
102
|
+
};
|
|
113
103
|
|
|
114
104
|
|
|
115
105
|
exports.watch = watch;
|
package/dist/watch.js
CHANGED
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
import {
|
|
2
2
|
writeError,
|
|
3
3
|
writeTrace
|
|
4
|
-
} from "./chunk-
|
|
5
|
-
import "./chunk-
|
|
4
|
+
} from "./chunk-NACKZM5D.js";
|
|
5
|
+
import "./chunk-KV6GNLVF.js";
|
|
6
6
|
import {
|
|
7
|
-
__name,
|
|
8
7
|
init_esm_shims
|
|
9
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-72UBXZRO.js";
|
|
10
9
|
|
|
11
10
|
// src/watch.ts
|
|
12
11
|
init_esm_shims();
|
|
@@ -22,7 +21,6 @@ function handleSync(fn) {
|
|
|
22
21
|
return error_;
|
|
23
22
|
}
|
|
24
23
|
}
|
|
25
|
-
__name(handleSync, "handleSync");
|
|
26
24
|
async function handleAsync(fn) {
|
|
27
25
|
try {
|
|
28
26
|
return await fn();
|
|
@@ -30,7 +28,6 @@ async function handleAsync(fn) {
|
|
|
30
28
|
return error_;
|
|
31
29
|
}
|
|
32
30
|
}
|
|
33
|
-
__name(handleAsync, "handleAsync");
|
|
34
31
|
var handle = handleSync;
|
|
35
32
|
handle.async = handleAsync;
|
|
36
33
|
var skip = Symbol("skip");
|
|
@@ -44,18 +41,18 @@ function transduceSync(list, transformer) {
|
|
|
44
41
|
}
|
|
45
42
|
return transduced;
|
|
46
43
|
}
|
|
47
|
-
__name(transduceSync, "transduceSync");
|
|
48
44
|
async function transduceAsync(list, transformer) {
|
|
49
45
|
const transduced = [];
|
|
50
|
-
await Promise.all(
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
46
|
+
await Promise.all(
|
|
47
|
+
list.entries().map(async ([i, element_]) => {
|
|
48
|
+
const transformed = await transformer(element_, i);
|
|
49
|
+
if (transformed !== skip) {
|
|
50
|
+
transduced[transduced.length] = transformed;
|
|
51
|
+
}
|
|
52
|
+
})
|
|
53
|
+
);
|
|
56
54
|
return transduced;
|
|
57
55
|
}
|
|
58
|
-
__name(transduceAsync, "transduceAsync");
|
|
59
56
|
var transduce = transduceSync;
|
|
60
57
|
transduce.async = transduceAsync;
|
|
61
58
|
function pipeSync(fn, ...fns) {
|
|
@@ -67,7 +64,6 @@ function pipeSync(fn, ...fns) {
|
|
|
67
64
|
return result;
|
|
68
65
|
};
|
|
69
66
|
}
|
|
70
|
-
__name(pipeSync, "pipeSync");
|
|
71
67
|
function pipeAsync(fn, ...fns) {
|
|
72
68
|
return async (...args) => {
|
|
73
69
|
let result = await fn(...args);
|
|
@@ -77,26 +73,20 @@ function pipeAsync(fn, ...fns) {
|
|
|
77
73
|
return result;
|
|
78
74
|
};
|
|
79
75
|
}
|
|
80
|
-
__name(pipeAsync, "pipeAsync");
|
|
81
76
|
var pipe = pipeSync;
|
|
82
77
|
pipe.async = pipeAsync;
|
|
83
78
|
|
|
84
79
|
// src/watch.ts
|
|
85
|
-
var watch =
|
|
80
|
+
var watch = (context, options) => {
|
|
86
81
|
if (!options.watch) {
|
|
87
82
|
return context;
|
|
88
83
|
}
|
|
89
84
|
const config = {
|
|
90
85
|
ignoreInitial: true,
|
|
91
86
|
useFsEvents: true,
|
|
92
|
-
ignored: [
|
|
93
|
-
"./src/__tests__/**/*",
|
|
94
|
-
"./package.json"
|
|
95
|
-
]
|
|
87
|
+
ignored: ["./src/__tests__/**/*", "./package.json"]
|
|
96
88
|
};
|
|
97
|
-
const changeWatcher = createWatcher([
|
|
98
|
-
"./src/**/*"
|
|
99
|
-
], config);
|
|
89
|
+
const changeWatcher = createWatcher(["./src/**/*"], config);
|
|
100
90
|
const fastRebuild = debounce(async () => {
|
|
101
91
|
const timeBefore = Date.now();
|
|
102
92
|
const rebuildResult = await handle.async(() => {
|
|
@@ -109,7 +99,7 @@ var watch = /* @__PURE__ */ __name((context, options) => {
|
|
|
109
99
|
}, 10);
|
|
110
100
|
changeWatcher.on("change", fastRebuild);
|
|
111
101
|
return void 0;
|
|
112
|
-
}
|
|
102
|
+
};
|
|
113
103
|
export {
|
|
114
104
|
watch
|
|
115
105
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@storm-software/esbuild",
|
|
3
|
-
"version": "0.35.
|
|
3
|
+
"version": "0.35.13",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "A package containing `esbuild` utilities for building Storm Software libraries and applications",
|
|
6
6
|
"repository": {
|
|
@@ -186,9 +186,9 @@
|
|
|
186
186
|
"dependencies": {
|
|
187
187
|
"@nx/devkit": "20.8.0",
|
|
188
188
|
"@nx/js": "20.8.0",
|
|
189
|
-
"@storm-software/build-tools": "0.144.
|
|
190
|
-
"@storm-software/config": "1.113.
|
|
191
|
-
"@storm-software/config-tools": "1.163.
|
|
189
|
+
"@storm-software/build-tools": "0.144.22",
|
|
190
|
+
"@storm-software/config": "1.113.26",
|
|
191
|
+
"@storm-software/config-tools": "1.163.27",
|
|
192
192
|
"chokidar": "^4.0.3",
|
|
193
193
|
"commander": "^12.1.0",
|
|
194
194
|
"defu": "6.1.4",
|
package/dist/chunk-AF5YHP7E.cjs
DELETED
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } 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
|
-
|
|
3
|
-
var _chunkOHH3RWRKcjs = require('./chunk-OHH3RWRK.cjs');
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
var _chunkQTR5272Scjs = require('./chunk-QTR5272S.cjs');
|
|
9
|
-
|
|
10
|
-
// src/plugins/resolve-paths.ts
|
|
11
|
-
_chunkQTR5272Scjs.init_cjs_shims.call(void 0, );
|
|
12
|
-
var _path = require('path'); var _path2 = _interopRequireDefault(_path);
|
|
13
|
-
function resolvePathsConfig(options, cwd, projectRoot) {
|
|
14
|
-
if (_optionalChain([options, 'optionalAccess', _ => _.compilerOptions, 'optionalAccess', _2 => _2.paths])) {
|
|
15
|
-
const paths = Object.entries(options.compilerOptions.paths);
|
|
16
|
-
const resolvedPaths = paths.map(([key, paths2]) => {
|
|
17
|
-
return [
|
|
18
|
-
key,
|
|
19
|
-
paths2.map((v) => _path2.default.resolve(cwd, v))
|
|
20
|
-
];
|
|
21
|
-
});
|
|
22
|
-
return Object.fromEntries(resolvedPaths);
|
|
23
|
-
}
|
|
24
|
-
if (options.extends) {
|
|
25
|
-
const extendsPath = _path2.default.resolve(projectRoot ? _chunkOHH3RWRKcjs.joinPaths.call(void 0, cwd, projectRoot, options.extends) : _chunkOHH3RWRKcjs.joinPaths.call(void 0, cwd, options.extends));
|
|
26
|
-
const extendsDir = _path2.default.dirname(extendsPath);
|
|
27
|
-
const extendsConfig = _chunkQTR5272Scjs.__require.call(void 0, extendsPath);
|
|
28
|
-
return resolvePathsConfig(extendsConfig, extendsDir);
|
|
29
|
-
}
|
|
30
|
-
return [];
|
|
31
|
-
}
|
|
32
|
-
_chunkQTR5272Scjs.__name.call(void 0, resolvePathsConfig, "resolvePathsConfig");
|
|
33
|
-
var resolvePathsPlugin = /* @__PURE__ */ _chunkQTR5272Scjs.__name.call(void 0, (context) => ({
|
|
34
|
-
name: "storm:resolve-paths",
|
|
35
|
-
setup(build) {
|
|
36
|
-
const parentTsConfig = build.initialOptions.tsconfig ? _chunkQTR5272Scjs.__require.call(void 0, _chunkOHH3RWRKcjs.joinPaths.call(void 0, context.workspaceConfig.workspaceRoot, build.initialOptions.tsconfig.replace(context.workspaceConfig.workspaceRoot, ""))) : _chunkQTR5272Scjs.__require.call(void 0, _chunkOHH3RWRKcjs.joinPaths.call(void 0, context.workspaceConfig.workspaceRoot, "tsconfig.json"));
|
|
37
|
-
const resolvedTsPaths = resolvePathsConfig(parentTsConfig, context.workspaceConfig.workspaceRoot, context.options.projectRoot);
|
|
38
|
-
const packagesRegex = new RegExp(`^(${Object.keys(resolvedTsPaths).join("|")})$`);
|
|
39
|
-
build.onResolve({
|
|
40
|
-
filter: packagesRegex
|
|
41
|
-
}, (args) => {
|
|
42
|
-
if (_optionalChain([build, 'access', _3 => _3.initialOptions, 'access', _4 => _4.external, 'optionalAccess', _5 => _5.includes, 'call', _6 => _6(args.path)])) {
|
|
43
|
-
return {
|
|
44
|
-
path: args.path,
|
|
45
|
-
external: true
|
|
46
|
-
};
|
|
47
|
-
}
|
|
48
|
-
return {
|
|
49
|
-
path: `${resolvedTsPaths[args.path][0]}/index.ts`
|
|
50
|
-
};
|
|
51
|
-
});
|
|
52
|
-
}
|
|
53
|
-
}), "resolvePathsPlugin");
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
exports.resolvePathsPlugin = resolvePathsPlugin;
|
package/dist/chunk-BWCGRWHA.cjs
DELETED
package/dist/chunk-ELF4S3RR.cjs
DELETED
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
var _chunkJ5J57SEIcjs = require('./chunk-J5J57SEI.cjs');
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
var _chunkQTR5272Scjs = require('./chunk-QTR5272S.cjs');
|
|
9
|
-
|
|
10
|
-
// src/clean.ts
|
|
11
|
-
_chunkQTR5272Scjs.init_cjs_shims.call(void 0, );
|
|
12
|
-
var _promises = require('fs/promises');
|
|
13
|
-
async function clean(name = "ESBuild", directory, config) {
|
|
14
|
-
_chunkJ5J57SEIcjs.writeDebug.call(void 0, ` \u{1F9F9} Cleaning ${name} output path: ${directory}`, config);
|
|
15
|
-
const stopwatch = _chunkJ5J57SEIcjs.getStopwatch.call(void 0, `${name} output clean`);
|
|
16
|
-
await cleanDirectories(directory);
|
|
17
|
-
stopwatch();
|
|
18
|
-
}
|
|
19
|
-
_chunkQTR5272Scjs.__name.call(void 0, clean, "clean");
|
|
20
|
-
async function cleanDirectories(directory) {
|
|
21
|
-
await _promises.rm.call(void 0, directory, {
|
|
22
|
-
recursive: true,
|
|
23
|
-
force: true
|
|
24
|
-
});
|
|
25
|
-
}
|
|
26
|
-
_chunkQTR5272Scjs.__name.call(void 0, cleanDirectories, "cleanDirectories");
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
exports.clean = clean; exports.cleanDirectories = cleanDirectories;
|
package/dist/chunk-IL6FCY37.js
DELETED
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
joinPaths
|
|
3
|
-
} from "./chunk-OZEWXLIK.js";
|
|
4
|
-
import {
|
|
5
|
-
__name,
|
|
6
|
-
__require,
|
|
7
|
-
init_esm_shims
|
|
8
|
-
} from "./chunk-INQXL7FE.js";
|
|
9
|
-
|
|
10
|
-
// src/plugins/resolve-paths.ts
|
|
11
|
-
init_esm_shims();
|
|
12
|
-
import path from "node:path";
|
|
13
|
-
function resolvePathsConfig(options, cwd, projectRoot) {
|
|
14
|
-
if (options?.compilerOptions?.paths) {
|
|
15
|
-
const paths = Object.entries(options.compilerOptions.paths);
|
|
16
|
-
const resolvedPaths = paths.map(([key, paths2]) => {
|
|
17
|
-
return [
|
|
18
|
-
key,
|
|
19
|
-
paths2.map((v) => path.resolve(cwd, v))
|
|
20
|
-
];
|
|
21
|
-
});
|
|
22
|
-
return Object.fromEntries(resolvedPaths);
|
|
23
|
-
}
|
|
24
|
-
if (options.extends) {
|
|
25
|
-
const extendsPath = path.resolve(projectRoot ? joinPaths(cwd, projectRoot, options.extends) : joinPaths(cwd, options.extends));
|
|
26
|
-
const extendsDir = path.dirname(extendsPath);
|
|
27
|
-
const extendsConfig = __require(extendsPath);
|
|
28
|
-
return resolvePathsConfig(extendsConfig, extendsDir);
|
|
29
|
-
}
|
|
30
|
-
return [];
|
|
31
|
-
}
|
|
32
|
-
__name(resolvePathsConfig, "resolvePathsConfig");
|
|
33
|
-
var resolvePathsPlugin = /* @__PURE__ */ __name((context) => ({
|
|
34
|
-
name: "storm:resolve-paths",
|
|
35
|
-
setup(build) {
|
|
36
|
-
const parentTsConfig = build.initialOptions.tsconfig ? __require(joinPaths(context.workspaceConfig.workspaceRoot, build.initialOptions.tsconfig.replace(context.workspaceConfig.workspaceRoot, ""))) : __require(joinPaths(context.workspaceConfig.workspaceRoot, "tsconfig.json"));
|
|
37
|
-
const resolvedTsPaths = resolvePathsConfig(parentTsConfig, context.workspaceConfig.workspaceRoot, context.options.projectRoot);
|
|
38
|
-
const packagesRegex = new RegExp(`^(${Object.keys(resolvedTsPaths).join("|")})$`);
|
|
39
|
-
build.onResolve({
|
|
40
|
-
filter: packagesRegex
|
|
41
|
-
}, (args) => {
|
|
42
|
-
if (build.initialOptions.external?.includes(args.path)) {
|
|
43
|
-
return {
|
|
44
|
-
path: args.path,
|
|
45
|
-
external: true
|
|
46
|
-
};
|
|
47
|
-
}
|
|
48
|
-
return {
|
|
49
|
-
path: `${resolvedTsPaths[args.path][0]}/index.ts`
|
|
50
|
-
};
|
|
51
|
-
});
|
|
52
|
-
}
|
|
53
|
-
}), "resolvePathsPlugin");
|
|
54
|
-
|
|
55
|
-
export {
|
|
56
|
-
resolvePathsPlugin
|
|
57
|
-
};
|
package/dist/chunk-LQIX6FZY.js
DELETED
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
copyAssets
|
|
3
|
-
} from "./chunk-WHHAD2OY.js";
|
|
4
|
-
import {
|
|
5
|
-
getStopwatch,
|
|
6
|
-
writeDebug
|
|
7
|
-
} from "./chunk-5P6GWVMJ.js";
|
|
8
|
-
import {
|
|
9
|
-
__name,
|
|
10
|
-
init_esm_shims
|
|
11
|
-
} from "./chunk-INQXL7FE.js";
|
|
12
|
-
|
|
13
|
-
// src/assets.ts
|
|
14
|
-
init_esm_shims();
|
|
15
|
-
async function copyBuildAssets(context) {
|
|
16
|
-
if (context.result?.errors.length === 0) {
|
|
17
|
-
writeDebug(` \u{1F4CB} Copying asset files to output directory: ${context.outputPath}`, context.workspaceConfig);
|
|
18
|
-
const stopwatch = getStopwatch(`${context.options.name} asset copy`);
|
|
19
|
-
await copyAssets(context.workspaceConfig, context.options.assets ?? [], context.outputPath, context.options.projectRoot, context.sourceRoot, true, false);
|
|
20
|
-
stopwatch();
|
|
21
|
-
}
|
|
22
|
-
return context;
|
|
23
|
-
}
|
|
24
|
-
__name(copyBuildAssets, "copyBuildAssets");
|
|
25
|
-
|
|
26
|
-
export {
|
|
27
|
-
copyBuildAssets
|
|
28
|
-
};
|