@storm-software/esbuild 0.34.0 → 0.34.2
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 +5 -5
- package/dist/build.cjs +15 -15
- package/dist/build.d.cts +1 -1
- package/dist/build.d.ts +1 -1
- package/dist/build.js +14 -14
- package/dist/{chunk-WRBUO7H6.cjs → chunk-27VOV3G4.cjs} +2 -2
- package/dist/{chunk-GWG4HOQ6.js → chunk-2TG2H4XL.js} +1 -1
- package/dist/{chunk-XEGYFRBF.js → chunk-2X5ZMEAN.js} +2 -2
- package/dist/{chunk-35YNFZCF.js → chunk-3PF5YMWK.js} +2 -2
- package/dist/{chunk-S2P6KHZV.js → chunk-3QHFCKSI.js} +3 -3
- package/dist/{chunk-RGWII6NP.js → chunk-5RVOO3YF.js} +2 -2
- package/dist/{chunk-LYDEMC26.js → chunk-AZON722Q.js} +1 -1
- package/dist/chunk-B4CUDMY2.cjs +39 -0
- package/dist/{chunk-MWGFCZF4.cjs → chunk-BNPCRQK4.cjs} +6 -6
- package/dist/{chunk-K6QIYIIY.cjs → chunk-BOFHC4OE.cjs} +4 -4
- package/dist/{chunk-IO2TXOKO.js → chunk-BWSIRV3D.js} +2 -2
- package/dist/chunk-CCEWV2BR.js +39 -0
- package/dist/{chunk-ETTFFUNG.cjs → chunk-CGMLIVTB.cjs} +12 -12
- package/dist/chunk-DPRINYB6.js +2939 -0
- package/dist/{chunk-Y3LXNK5C.cjs → chunk-GJHRTQAS.cjs} +36 -36
- package/dist/{chunk-EZGTDCYM.cjs → chunk-ILJQ4NCE.cjs} +4 -4
- package/dist/chunk-M3AOQRGN.cjs +2939 -0
- package/dist/{chunk-IMVMVEQS.cjs → chunk-N62ZR7UV.cjs} +17 -17
- package/dist/{chunk-4TQE46SC.cjs → chunk-QKJ7KLDL.cjs} +6 -6
- package/dist/{chunk-GQCYZOAM.cjs → chunk-RLQJRD62.cjs} +2 -2
- package/dist/{chunk-KGKL7VDG.js → chunk-SKJRUPDP.js} +11 -10
- package/dist/{chunk-IX6DNVUR.js → chunk-STCE44IS.js} +2 -2
- package/dist/{chunk-AXEZCHZS.cjs → chunk-TDBBRZTC.cjs} +99 -98
- package/dist/{chunk-Y4XWI6JJ.cjs → chunk-TH2QFJHI.cjs} +6 -6
- package/dist/{chunk-T5272PC2.js → chunk-UYE6LM4C.js} +1 -1
- package/dist/{chunk-XITTOHOG.cjs → chunk-VPTKC3UK.cjs} +6 -6
- package/dist/{chunk-2IGRKQGI.js → chunk-VQHKIS7J.js} +2 -2
- package/dist/{chunk-HXMVEX3P.js → chunk-XLUZXKDY.js} +1 -1
- package/dist/{chunk-S6M44SSZ.cjs → chunk-Y5SBBYX3.cjs} +3 -3
- package/dist/{chunk-YMTDVMD6.js → chunk-Y7JBB452.js} +1 -1
- package/dist/clean.cjs +5 -5
- package/dist/clean.d.cts +1 -1
- package/dist/clean.d.ts +1 -1
- package/dist/clean.js +4 -4
- package/dist/config.cjs +12 -12
- package/dist/config.d.cts +2 -2
- package/dist/config.d.ts +2 -2
- package/dist/config.js +11 -11
- package/dist/index.cjs +16 -16
- package/dist/index.d.cts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +15 -15
- package/dist/plugins/deps-check.cjs +5 -5
- package/dist/plugins/deps-check.js +4 -4
- package/dist/plugins/esm-split-code-to-cjs.cjs +3 -3
- package/dist/plugins/esm-split-code-to-cjs.d.cts +1 -1
- package/dist/plugins/esm-split-code-to-cjs.d.ts +1 -1
- package/dist/plugins/esm-split-code-to-cjs.js +2 -2
- package/dist/plugins/fix-imports.cjs +3 -3
- package/dist/plugins/fix-imports.d.cts +1 -1
- package/dist/plugins/fix-imports.d.ts +1 -1
- package/dist/plugins/fix-imports.js +2 -2
- package/dist/plugins/native-node-module.cjs +3 -3
- package/dist/plugins/native-node-module.d.cts +1 -1
- package/dist/plugins/native-node-module.d.ts +1 -1
- package/dist/plugins/native-node-module.js +2 -2
- package/dist/plugins/node-protocol.cjs +3 -3
- package/dist/plugins/node-protocol.d.cts +1 -1
- package/dist/plugins/node-protocol.d.ts +1 -1
- package/dist/plugins/node-protocol.js +2 -2
- package/dist/plugins/on-error.cjs +5 -5
- package/dist/plugins/on-error.d.cts +1 -1
- package/dist/plugins/on-error.d.ts +1 -1
- package/dist/plugins/on-error.js +4 -4
- package/dist/plugins/resolve-paths.cjs +4 -4
- package/dist/plugins/resolve-paths.d.cts +1 -1
- package/dist/plugins/resolve-paths.d.ts +1 -1
- package/dist/plugins/resolve-paths.js +3 -3
- package/dist/plugins/tsc.cjs +5 -5
- package/dist/plugins/tsc.d.cts +1 -1
- package/dist/plugins/tsc.d.ts +1 -1
- package/dist/plugins/tsc.js +4 -4
- package/dist/tsc.cjs +5 -5
- package/dist/tsc.d.cts +1 -1
- package/dist/tsc.d.ts +1 -1
- package/dist/tsc.js +4 -4
- package/dist/{types-DwxFThZu.d.ts → types-B4jbZA4j.d.cts} +14 -14
- package/dist/{types-DwxFThZu.d.cts → types-B4jbZA4j.d.ts} +14 -14
- package/dist/types.d.cts +1 -1
- package/dist/types.d.ts +1 -1
- package/package.json +1 -1
- package/dist/chunk-3GQAWCBQ.js +0 -13
- package/dist/chunk-BGYQAVKQ.cjs +0 -13
- package/dist/chunk-E5AAO2PH.cjs +0 -422
- package/dist/chunk-X6OXFNDR.js +0 -422
|
@@ -1,13 +1,13 @@
|
|
|
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 _chunkGJHRTQAScjs = require('./chunk-GJHRTQAS.cjs');
|
|
4
4
|
|
|
5
5
|
|
|
6
|
-
var
|
|
6
|
+
var _chunkVPTKC3UKcjs = require('./chunk-VPTKC3UK.cjs');
|
|
7
7
|
|
|
8
8
|
|
|
9
9
|
|
|
10
|
-
var
|
|
10
|
+
var _chunkB4CUDMY2cjs = require('./chunk-B4CUDMY2.cjs');
|
|
11
11
|
|
|
12
12
|
// src/plugins/tsc.ts
|
|
13
13
|
var _apiextractor = require('@microsoft/api-extractor');
|
|
@@ -15,7 +15,7 @@ var _apiextractor = require('@microsoft/api-extractor');
|
|
|
15
15
|
// ../config-tools/src/utilities/run.ts
|
|
16
16
|
var _child_process = require('child_process');
|
|
17
17
|
var LARGE_BUFFER = 1024 * 1e6;
|
|
18
|
-
var run = /* @__PURE__ */
|
|
18
|
+
var run = /* @__PURE__ */ _chunkB4CUDMY2cjs.__name.call(void 0, (config, command, cwd = _nullishCoalesce(config.workspaceRoot, () => ( process.cwd())), stdio = "inherit", env = process.env) => {
|
|
19
19
|
return _child_process.execSync.call(void 0, command, {
|
|
20
20
|
cwd,
|
|
21
21
|
env: {
|
|
@@ -35,7 +35,7 @@ var run = /* @__PURE__ */ _chunkBGYQAVKQcjs.__name.call(void 0, (config, command
|
|
|
35
35
|
var _fs = require('fs');
|
|
36
36
|
var _promises = require('fs/promises'); var _promises2 = _interopRequireDefault(_promises);
|
|
37
37
|
function bundleTypeDefinitions(filename, outfile, context) {
|
|
38
|
-
const { dependencies, peerDependencies, devDependencies } =
|
|
38
|
+
const { dependencies, peerDependencies, devDependencies } = _chunkB4CUDMY2cjs.__require.call(void 0, _chunkVPTKC3UKcjs.joinPaths.call(void 0, context.workspaceConfig.workspaceRoot, "package.json"));
|
|
39
39
|
const dependenciesKeys = Object.keys(_nullishCoalesce(dependencies, () => ( {}))).flatMap((p) => [
|
|
40
40
|
p,
|
|
41
41
|
getTypeDependencyPackageName(p)
|
|
@@ -71,13 +71,13 @@ function bundleTypeDefinitions(filename, outfile, context) {
|
|
|
71
71
|
},
|
|
72
72
|
dtsRollup: {
|
|
73
73
|
enabled: true,
|
|
74
|
-
untrimmedFilePath:
|
|
74
|
+
untrimmedFilePath: _chunkVPTKC3UKcjs.joinPaths.call(void 0, context.workspaceConfig.workspaceRoot, `${outfile}.d.ts`)
|
|
75
75
|
},
|
|
76
76
|
tsdocMetadata: {
|
|
77
77
|
enabled: false
|
|
78
78
|
}
|
|
79
79
|
},
|
|
80
|
-
packageJsonFullPath:
|
|
80
|
+
packageJsonFullPath: _chunkVPTKC3UKcjs.joinPaths.call(void 0, context.workspaceConfig.workspaceRoot, "package.json"),
|
|
81
81
|
configObjectFullPath: void 0
|
|
82
82
|
});
|
|
83
83
|
const extractorResult = _apiextractor.Extractor.invoke(extractorConfig, {
|
|
@@ -85,12 +85,12 @@ function bundleTypeDefinitions(filename, outfile, context) {
|
|
|
85
85
|
localBuild: true
|
|
86
86
|
});
|
|
87
87
|
if (extractorResult.succeeded === false) {
|
|
88
|
-
|
|
88
|
+
_chunkGJHRTQAScjs.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
|
}
|
|
92
|
-
|
|
93
|
-
var tscPlugin = /* @__PURE__ */
|
|
92
|
+
_chunkB4CUDMY2cjs.__name.call(void 0, bundleTypeDefinitions, "bundleTypeDefinitions");
|
|
93
|
+
var tscPlugin = /* @__PURE__ */ _chunkB4CUDMY2cjs.__name.call(void 0, (context) => ({
|
|
94
94
|
name: "storm:tsc",
|
|
95
95
|
setup(build) {
|
|
96
96
|
if (context.options.dts === false) {
|
|
@@ -102,16 +102,16 @@ var tscPlugin = /* @__PURE__ */ _chunkBGYQAVKQcjs.__name.call(void 0, (context)
|
|
|
102
102
|
}
|
|
103
103
|
if (context.options.bundle && context.options.entry) {
|
|
104
104
|
const sourceRoot = context.sourceRoot.replaceAll(context.options.projectRoot, "");
|
|
105
|
-
const typeOutDir = context.options.outputPath ||
|
|
105
|
+
const typeOutDir = context.options.outputPath || _chunkVPTKC3UKcjs.joinPaths.call(void 0, context.workspaceConfig.workspaceRoot, "dist", context.options.projectRoot);
|
|
106
106
|
const entries = Array.isArray(context.options.entry) ? context.options.entry : Object.values(context.options.entry);
|
|
107
107
|
for (const entry of entries) {
|
|
108
108
|
const entryPoint = entry.replace(sourceRoot, "").replace(/\.ts$/, "");
|
|
109
|
-
const bundlePath =
|
|
109
|
+
const bundlePath = _chunkVPTKC3UKcjs.joinPaths.call(void 0, typeOutDir, entryPoint);
|
|
110
110
|
let dtsPath;
|
|
111
|
-
if (_fs.existsSync.call(void 0,
|
|
112
|
-
dtsPath =
|
|
113
|
-
} else if (_fs.existsSync.call(void 0,
|
|
114
|
-
dtsPath =
|
|
111
|
+
if (_fs.existsSync.call(void 0, _chunkVPTKC3UKcjs.joinPaths.call(void 0, context.workspaceConfig.workspaceRoot, typeOutDir, `${entryPoint}.d.ts`))) {
|
|
112
|
+
dtsPath = _chunkVPTKC3UKcjs.joinPaths.call(void 0, context.workspaceConfig.workspaceRoot, typeOutDir, `${entryPoint}.d.ts`);
|
|
113
|
+
} else if (_fs.existsSync.call(void 0, _chunkVPTKC3UKcjs.joinPaths.call(void 0, context.workspaceConfig.workspaceRoot, typeOutDir, `${entryPoint.replace(/^src\//, "")}.d.ts`))) {
|
|
114
|
+
dtsPath = _chunkVPTKC3UKcjs.joinPaths.call(void 0, context.workspaceConfig.workspaceRoot, typeOutDir, `${entryPoint.replace(/^src\//, "")}.d.ts`);
|
|
115
115
|
}
|
|
116
116
|
const ext = (Array.isArray(context.options.format) ? _optionalChain([context, 'access', _ => _.options, 'access', _2 => _2.format, 'optionalAccess', _3 => _3.some, 'call', _4 => _4((format) => format === "esm")]) : context.options.format === "esm") ? "d.mts" : "d.ts";
|
|
117
117
|
if (process.env.WATCH !== "true" && process.env.DEV !== "true") {
|
|
@@ -133,7 +133,7 @@ function getTypeDependencyPackageName(npmPackage) {
|
|
|
133
133
|
}
|
|
134
134
|
return `@types/${npmPackage}`;
|
|
135
135
|
}
|
|
136
|
-
|
|
136
|
+
_chunkB4CUDMY2cjs.__name.call(void 0, getTypeDependencyPackageName, "getTypeDependencyPackageName");
|
|
137
137
|
|
|
138
138
|
|
|
139
139
|
|
|
@@ -1,10 +1,10 @@
|
|
|
1
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
2
|
|
|
3
|
-
var
|
|
3
|
+
var _chunkVPTKC3UKcjs = require('./chunk-VPTKC3UK.cjs');
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
|
|
7
|
-
var
|
|
7
|
+
var _chunkB4CUDMY2cjs = require('./chunk-B4CUDMY2.cjs');
|
|
8
8
|
|
|
9
9
|
// src/plugins/resolve-paths.ts
|
|
10
10
|
var _path = require('path'); var _path2 = _interopRequireDefault(_path);
|
|
@@ -22,16 +22,16 @@ function resolvePathsConfig(options, cwd) {
|
|
|
22
22
|
if (options.extends) {
|
|
23
23
|
const extendsPath = _path2.default.resolve(cwd, options.extends);
|
|
24
24
|
const extendsDir = _path2.default.dirname(extendsPath);
|
|
25
|
-
const extendsConfig =
|
|
25
|
+
const extendsConfig = _chunkB4CUDMY2cjs.__require.call(void 0, extendsPath);
|
|
26
26
|
return resolvePathsConfig(extendsConfig, extendsDir);
|
|
27
27
|
}
|
|
28
28
|
return [];
|
|
29
29
|
}
|
|
30
|
-
|
|
31
|
-
var resolvePathsPlugin = /* @__PURE__ */
|
|
30
|
+
_chunkB4CUDMY2cjs.__name.call(void 0, resolvePathsConfig, "resolvePathsConfig");
|
|
31
|
+
var resolvePathsPlugin = /* @__PURE__ */ _chunkB4CUDMY2cjs.__name.call(void 0, (context) => ({
|
|
32
32
|
name: "storm:resolve-paths",
|
|
33
33
|
setup(build) {
|
|
34
|
-
const parentTsConfig = build.initialOptions.tsconfig ?
|
|
34
|
+
const parentTsConfig = build.initialOptions.tsconfig ? _chunkB4CUDMY2cjs.__require.call(void 0, _chunkVPTKC3UKcjs.joinPaths.call(void 0, context.workspaceConfig.workspaceRoot, build.initialOptions.tsconfig)) : _chunkB4CUDMY2cjs.__require.call(void 0, _chunkVPTKC3UKcjs.joinPaths.call(void 0, context.workspaceConfig.workspaceRoot, "tsconfig.json"));
|
|
35
35
|
const resolvedTsPaths = resolvePathsConfig(parentTsConfig, context.workspaceConfig.workspaceRoot);
|
|
36
36
|
const packagesRegex = new RegExp(`^(${Object.keys(resolvedTsPaths).join("|")})$`);
|
|
37
37
|
build.onResolve({
|
|
@@ -1,10 +1,10 @@
|
|
|
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 _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 _chunkB4CUDMY2cjs = require('./chunk-B4CUDMY2.cjs');
|
|
4
4
|
|
|
5
5
|
// src/plugins/esm-split-code-to-cjs.ts
|
|
6
6
|
var _esbuild = require('esbuild'); var esbuild = _interopRequireWildcard(_esbuild);
|
|
7
|
-
var esmSplitCodeToCjsPlugin = /* @__PURE__ */
|
|
7
|
+
var esmSplitCodeToCjsPlugin = /* @__PURE__ */ _chunkB4CUDMY2cjs.__name.call(void 0, (options, resolvedOptions) => ({
|
|
8
8
|
name: "storm:esm-split-code-to-cjs",
|
|
9
9
|
setup(build2) {
|
|
10
10
|
build2.onEnd(async (result) => {
|
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
import {
|
|
2
2
|
fixImportsPlugin
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-2TG2H4XL.js";
|
|
4
4
|
import {
|
|
5
5
|
nativeNodeModulesPlugin
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-UYE6LM4C.js";
|
|
7
7
|
import {
|
|
8
8
|
nodeProtocolPlugin
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-AZON722Q.js";
|
|
10
10
|
import {
|
|
11
11
|
onErrorPlugin
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-BWSIRV3D.js";
|
|
13
13
|
import {
|
|
14
14
|
resolvePathsPlugin
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-5RVOO3YF.js";
|
|
16
16
|
import {
|
|
17
17
|
tscPlugin
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-3QHFCKSI.js";
|
|
19
19
|
import {
|
|
20
20
|
COLOR_KEYS,
|
|
21
21
|
LogLevel,
|
|
@@ -31,17 +31,17 @@ import {
|
|
|
31
31
|
writeDebug,
|
|
32
32
|
writeTrace,
|
|
33
33
|
writeWarning
|
|
34
|
-
} from "./chunk-
|
|
34
|
+
} from "./chunk-VQHKIS7J.js";
|
|
35
35
|
import {
|
|
36
36
|
correctPaths,
|
|
37
37
|
joinPaths
|
|
38
|
-
} from "./chunk-
|
|
38
|
+
} from "./chunk-Y7JBB452.js";
|
|
39
39
|
import {
|
|
40
40
|
esmSplitCodeToCjsPlugin
|
|
41
|
-
} from "./chunk-
|
|
41
|
+
} from "./chunk-XLUZXKDY.js";
|
|
42
42
|
import {
|
|
43
43
|
__name
|
|
44
|
-
} from "./chunk-
|
|
44
|
+
} from "./chunk-CCEWV2BR.js";
|
|
45
45
|
|
|
46
46
|
// ../build-tools/src/config.ts
|
|
47
47
|
var DEFAULT_COMPILED_BANNER = `/*****************************************
|
|
@@ -886,6 +886,7 @@ var DEFAULT_BUILD_OPTIONS = {
|
|
|
886
886
|
keepNames: true,
|
|
887
887
|
metafile: false,
|
|
888
888
|
treeshake: true,
|
|
889
|
+
splitting: true,
|
|
889
890
|
shims: false,
|
|
890
891
|
watch: false,
|
|
891
892
|
bundle: true,
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import {
|
|
2
2
|
writeError,
|
|
3
3
|
writeWarning
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-VQHKIS7J.js";
|
|
5
5
|
import {
|
|
6
6
|
__name,
|
|
7
7
|
__require
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-CCEWV2BR.js";
|
|
9
9
|
|
|
10
10
|
// src/plugins/deps-check.ts
|
|
11
11
|
import { builtinModules } from "node:module";
|