@storm-software/esbuild 0.35.10 → 0.35.12
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 +1194 -2706
- package/dist/assets.cjs +6 -6
- package/dist/assets.js +5 -5
- package/dist/build.cjs +14 -14
- package/dist/build.js +13 -13
- package/dist/{chunk-N6KCNJOR.cjs → chunk-42HYZLJH.cjs} +17 -26
- package/dist/{chunk-SAK5QFCE.js → chunk-47A73LZ7.js} +232 -123
- package/dist/{chunk-Q77NJNNL.cjs → chunk-4PZGT5BH.cjs} +8 -11
- package/dist/{chunk-CHAHHSIR.js → chunk-72UBXZRO.js} +4 -6
- package/dist/chunk-77TTTWKY.cjs +25 -0
- package/dist/{chunk-DU5R4RJA.js → chunk-77XQDMGA.js} +36 -30
- package/dist/{chunk-KK2BGIRB.cjs → chunk-7VE5Y757.cjs} +18 -9
- package/dist/{chunk-JHQYSHQ5.js → chunk-CV2AM72J.js} +28 -13
- package/dist/{chunk-3VHLCZ6F.js → chunk-EBH4ZCN5.js} +189 -116
- package/dist/{chunk-JS5GZ7ZE.cjs → chunk-EGUR2GEF.cjs} +46 -40
- package/dist/{chunk-QBMHS72C.js → chunk-F3R5ZFGB.js} +7 -10
- package/dist/{chunk-GZSSIGNC.js → chunk-GZSSIGNC.cjs} +2 -2
- package/dist/{chunk-ZS2HZUYH.cjs → chunk-HIO4TSG7.cjs} +976 -1206
- package/dist/{chunk-YXJYZG6O.cjs → chunk-HPZXWRI7.cjs} +28 -26
- package/dist/{chunk-TKNLZW4V.cjs → chunk-JCICRU7K.cjs} +3 -5
- package/dist/chunk-KR4NRRPF.js +59 -0
- package/dist/{chunk-JNDYTIRD.js → chunk-MAXDIXOQ.js} +2 -2
- package/dist/{chunk-B4NWTB7S.cjs → chunk-MYUKVBFG.cjs} +288 -179
- package/dist/{chunk-ZDMKNQUW.cjs → chunk-OV5OYAJ7.cjs} +5 -5
- package/dist/{chunk-JZBM4QKF.cjs → chunk-PB5XBFPA.cjs} +36 -21
- package/dist/{chunk-GWGBQKRY.js → chunk-PDYSQLJS.js} +15 -24
- package/dist/{chunk-5ZPCV2IJ.js → chunk-POMR4JSG.js} +154 -266
- package/dist/chunk-Q366M4DV.js +37 -0
- package/dist/{chunk-UA2A6OC6.js → chunk-QOTJTLX7.js} +1 -1
- package/dist/{chunk-EBZ4R3MW.js → chunk-SB2WRTQ2.js} +43 -17
- package/dist/{chunk-2NQYRZKO.cjs → chunk-UAPH32Y3.cjs} +204 -131
- package/dist/{chunk-VGC3FXLU.js → chunk-VGC3FXLU.cjs} +1 -1
- package/dist/{chunk-CY4KF2US.cjs → chunk-WQVSYEMN.cjs} +47 -21
- package/dist/chunk-XHTD4QDZ.cjs +6 -0
- package/dist/{chunk-GKAHDFNO.js → chunk-ZF7HGC35.js} +3 -9
- 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 +8 -8
- package/dist/context.js +7 -7
- package/dist/index.cjs +16 -16
- package/dist/index.js +14 -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 +4 -4
- package/dist/plugins/resolve-paths.js +3 -3
- package/dist/{rollup.js → rollup.cjs} +3 -3
- 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-5R3LX6E4.cjs +0 -6
- package/dist/chunk-CA7VVNV2.js +0 -28
- package/dist/chunk-IV2WE7RO.cjs +0 -31
- package/dist/chunk-ZILTNBKJ.js +0 -57
- /package/dist/{chunk-BYH4XDRH.js → chunk-BYH4XDRH.cjs} +0 -0
- /package/dist/{chunk-JZ25TPTY.js → chunk-JZ25TPTY.cjs} +0 -0
- /package/dist/{chunk-TWFEYLU4.js → chunk-TWFEYLU4.cjs} +0 -0
|
@@ -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 _chunk42HYZLJHcjs = require('./chunk-42HYZLJH.cjs');
|
|
4
4
|
|
|
5
5
|
|
|
6
|
-
var
|
|
6
|
+
var _chunk7VE5Y757cjs = require('./chunk-7VE5Y757.cjs');
|
|
7
7
|
|
|
8
8
|
|
|
9
|
-
var
|
|
9
|
+
var _chunk77TTTWKYcjs = require('./chunk-77TTTWKY.cjs');
|
|
10
10
|
|
|
11
11
|
|
|
12
|
-
var
|
|
12
|
+
var _chunkPB5XBFPAcjs = require('./chunk-PB5XBFPA.cjs');
|
|
13
13
|
|
|
14
14
|
|
|
15
|
-
var
|
|
15
|
+
var _chunkWQVSYEMNcjs = require('./chunk-WQVSYEMN.cjs');
|
|
16
16
|
|
|
17
17
|
|
|
18
|
-
var
|
|
18
|
+
var _chunkHIO4TSG7cjs = require('./chunk-HIO4TSG7.cjs');
|
|
19
19
|
|
|
20
20
|
|
|
21
21
|
|
|
@@ -23,28 +23,37 @@ var _chunkZS2HZUYHcjs = require('./chunk-ZS2HZUYH.cjs');
|
|
|
23
23
|
|
|
24
24
|
|
|
25
25
|
|
|
26
|
-
var
|
|
26
|
+
var _chunkUAPH32Y3cjs = require('./chunk-UAPH32Y3.cjs');
|
|
27
27
|
|
|
28
28
|
|
|
29
|
-
|
|
30
|
-
var _chunkTKNLZW4Vcjs = require('./chunk-TKNLZW4V.cjs');
|
|
29
|
+
var _chunkJCICRU7Kcjs = require('./chunk-JCICRU7K.cjs');
|
|
31
30
|
|
|
32
31
|
// src/build.ts
|
|
33
|
-
|
|
32
|
+
_chunkJCICRU7Kcjs.init_cjs_shims.call(void 0, );
|
|
34
33
|
var _esbuild = require('esbuild'); var esbuild = _interopRequireWildcard(_esbuild);
|
|
35
34
|
var _globby = require('globby');
|
|
36
35
|
async function reportResults(context) {
|
|
37
36
|
if (_optionalChain([context, 'access', _ => _.result, 'optionalAccess', _2 => _2.errors, 'access', _3 => _3.length]) === 0) {
|
|
38
37
|
if (context.result.warnings.length > 0) {
|
|
39
|
-
|
|
38
|
+
_chunkUAPH32Y3cjs.writeWarning.call(void 0,
|
|
39
|
+
` \u{1F6A7} The following warnings occurred during the build: ${context.result.warnings.map((warning) => warning.text).join("\n")}`,
|
|
40
|
+
context.workspaceConfig
|
|
41
|
+
);
|
|
40
42
|
}
|
|
41
|
-
|
|
43
|
+
_chunkUAPH32Y3cjs.writeSuccess.call(void 0,
|
|
44
|
+
` \u{1F4E6} The ${context.options.name} build completed successfully`,
|
|
45
|
+
context.workspaceConfig
|
|
46
|
+
);
|
|
42
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) {
|
|
43
|
-
|
|
44
|
-
|
|
48
|
+
_chunkUAPH32Y3cjs.writeError.call(void 0,
|
|
49
|
+
` \u274C The ${context.options.name} build failed with the following errors: ${context.result.errors.map((error) => error.text).join("\n")}`,
|
|
50
|
+
context.workspaceConfig
|
|
51
|
+
);
|
|
52
|
+
throw new Error(
|
|
53
|
+
`The ${context.options.name} build failed with the following errors: ${context.result.errors.map((error) => error.text).join("\n")}`
|
|
54
|
+
);
|
|
45
55
|
}
|
|
46
56
|
}
|
|
47
|
-
_chunkTKNLZW4Vcjs.__name.call(void 0, reportResults, "reportResults");
|
|
48
57
|
async function dependencyCheck(options) {
|
|
49
58
|
if (process.env.DEV === "true") {
|
|
50
59
|
return void 0;
|
|
@@ -55,64 +64,61 @@ async function dependencyCheck(options) {
|
|
|
55
64
|
const buildPromise = esbuild.build({
|
|
56
65
|
entryPoints: _globby.globbySync.call(void 0, "**/*.{j,t}s", {
|
|
57
66
|
// We don't check dependencies in ecosystem tests because tests are isolated from the build.
|
|
58
|
-
ignore: [
|
|
59
|
-
"./src/__tests__/**/*",
|
|
60
|
-
"./tests/e2e/**/*",
|
|
61
|
-
"./dist/**/*"
|
|
62
|
-
],
|
|
67
|
+
ignore: ["./src/__tests__/**/*", "./tests/e2e/**/*", "./dist/**/*"],
|
|
63
68
|
gitignore: true
|
|
64
69
|
}),
|
|
65
70
|
logLevel: "silent",
|
|
71
|
+
// there will be errors
|
|
66
72
|
bundle: true,
|
|
73
|
+
// we bundle to get everything
|
|
67
74
|
write: false,
|
|
75
|
+
// no need to write for analysis
|
|
68
76
|
outdir: "out",
|
|
69
|
-
plugins: [
|
|
70
|
-
_chunkN6KCNJORcjs.depsCheckPlugin.call(void 0, options.bundle)
|
|
71
|
-
]
|
|
77
|
+
plugins: [_chunk42HYZLJHcjs.depsCheckPlugin.call(void 0, options.bundle)]
|
|
72
78
|
});
|
|
73
79
|
await buildPromise.catch(() => {
|
|
74
80
|
});
|
|
75
81
|
return void 0;
|
|
76
82
|
}
|
|
77
|
-
_chunkTKNLZW4Vcjs.__name.call(void 0, dependencyCheck, "dependencyCheck");
|
|
78
83
|
async function cleanOutputPath(context) {
|
|
79
84
|
if (context.clean !== false && context.outputPath) {
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
85
|
+
_chunkUAPH32Y3cjs.writeDebug.call(void 0,
|
|
86
|
+
` \u{1F9F9} Cleaning ${context.options.name} output path: ${context.outputPath}`,
|
|
87
|
+
context.workspaceConfig
|
|
88
|
+
);
|
|
89
|
+
const stopwatch = _chunkUAPH32Y3cjs.getStopwatch.call(void 0, `${context.options.name} output clean`);
|
|
90
|
+
await _chunk77TTTWKYcjs.cleanDirectories.call(void 0, context.outputPath);
|
|
83
91
|
stopwatch();
|
|
84
92
|
}
|
|
85
93
|
return context;
|
|
86
94
|
}
|
|
87
|
-
_chunkTKNLZW4Vcjs.__name.call(void 0, cleanOutputPath, "cleanOutputPath");
|
|
88
95
|
async function build2(options) {
|
|
89
|
-
|
|
90
|
-
const stopwatch =
|
|
96
|
+
_chunkUAPH32Y3cjs.writeDebug.call(void 0, ` \u26A1 Executing Storm ESBuild pipeline`);
|
|
97
|
+
const stopwatch = _chunkUAPH32Y3cjs.getStopwatch.call(void 0, "ESBuild pipeline");
|
|
91
98
|
try {
|
|
92
|
-
const opts = Array.isArray(options) ? options : [
|
|
93
|
-
options
|
|
94
|
-
];
|
|
99
|
+
const opts = Array.isArray(options) ? options : [options];
|
|
95
100
|
if (opts.length === 0) {
|
|
96
101
|
throw new Error("No build options were provided");
|
|
97
102
|
}
|
|
98
|
-
const context = await
|
|
103
|
+
const context = await _chunkPB5XBFPAcjs.resolveContext.call(void 0, options);
|
|
99
104
|
await cleanOutputPath(context);
|
|
100
105
|
await Promise.all([
|
|
101
106
|
dependencyCheck(context.options),
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
107
|
+
_chunkWQVSYEMNcjs.generatePackageJson.call(void 0, context),
|
|
108
|
+
_chunk7VE5Y757cjs.copyBuildAssets.call(void 0, context),
|
|
109
|
+
_chunkHIO4TSG7cjs.executeTsup.call(void 0, context)
|
|
105
110
|
]);
|
|
106
111
|
await reportResults(context);
|
|
107
|
-
|
|
112
|
+
_chunkUAPH32Y3cjs.writeSuccess.call(void 0, " \u{1F3C1} ESBuild pipeline build completed successfully");
|
|
108
113
|
} catch (error) {
|
|
109
|
-
|
|
114
|
+
_chunkUAPH32Y3cjs.writeFatal.call(void 0,
|
|
115
|
+
"Fatal errors that the build process could not recover from have occured. The build process has been terminated."
|
|
116
|
+
);
|
|
110
117
|
throw error;
|
|
111
118
|
} finally {
|
|
112
119
|
stopwatch();
|
|
113
120
|
}
|
|
114
121
|
}
|
|
115
|
-
_chunkTKNLZW4Vcjs.__name.call(void 0, build2, "build");
|
|
116
122
|
|
|
117
123
|
|
|
118
124
|
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
|
-
__name,
|
|
3
2
|
init_esm_shims
|
|
4
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-72UBXZRO.js";
|
|
5
4
|
|
|
6
5
|
// ../config-tools/src/utilities/correct-paths.ts
|
|
7
6
|
init_esm_shims();
|
|
@@ -12,11 +11,10 @@ function normalizeWindowsPath(input = "") {
|
|
|
12
11
|
}
|
|
13
12
|
return input.replace(/\\/g, "/").replace(_DRIVE_LETTER_START_RE, (r) => r.toUpperCase());
|
|
14
13
|
}
|
|
15
|
-
__name(normalizeWindowsPath, "normalizeWindowsPath");
|
|
16
14
|
var _UNC_REGEX = /^[/\\]{2}/;
|
|
17
15
|
var _IS_ABSOLUTE_RE = /^[/\\](?![/\\])|^[/\\]{2}(?!\.)|^[A-Za-z]:[/\\]/;
|
|
18
16
|
var _DRIVE_LETTER_RE = /^[A-Za-z]:$/;
|
|
19
|
-
var correctPaths =
|
|
17
|
+
var correctPaths = function(path) {
|
|
20
18
|
if (!path || path.length === 0) {
|
|
21
19
|
return ".";
|
|
22
20
|
}
|
|
@@ -44,8 +42,8 @@ var correctPaths = /* @__PURE__ */ __name(function(path) {
|
|
|
44
42
|
return `//${path}`;
|
|
45
43
|
}
|
|
46
44
|
return isPathAbsolute && !isAbsolute(path) ? `/${path}` : path;
|
|
47
|
-
}
|
|
48
|
-
var joinPaths =
|
|
45
|
+
};
|
|
46
|
+
var joinPaths = function(...segments) {
|
|
49
47
|
let path = "";
|
|
50
48
|
for (const seg of segments) {
|
|
51
49
|
if (!seg) {
|
|
@@ -65,7 +63,7 @@ var joinPaths = /* @__PURE__ */ __name(function(...segments) {
|
|
|
65
63
|
}
|
|
66
64
|
}
|
|
67
65
|
return correctPaths(path);
|
|
68
|
-
}
|
|
66
|
+
};
|
|
69
67
|
function normalizeString(path, allowAboveRoot) {
|
|
70
68
|
let res = "";
|
|
71
69
|
let lastSegmentLength = 0;
|
|
@@ -126,10 +124,9 @@ function normalizeString(path, allowAboveRoot) {
|
|
|
126
124
|
}
|
|
127
125
|
return res;
|
|
128
126
|
}
|
|
129
|
-
|
|
130
|
-
var isAbsolute = /* @__PURE__ */ __name(function(p) {
|
|
127
|
+
var isAbsolute = function(p) {
|
|
131
128
|
return _IS_ABSOLUTE_RE.test(p);
|
|
132
|
-
}
|
|
129
|
+
};
|
|
133
130
|
|
|
134
131
|
export {
|
|
135
132
|
correctPaths,
|
|
@@ -1,9 +1,9 @@
|
|
|
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; } }
|
|
2
2
|
|
|
3
|
-
var _chunkBYH4XDRHjs = require('./chunk-BYH4XDRH.
|
|
3
|
+
var _chunkBYH4XDRHjs = require('./chunk-BYH4XDRH.cjs');
|
|
4
4
|
|
|
5
5
|
|
|
6
|
-
var _chunkTWFEYLU4js = require('./chunk-TWFEYLU4.
|
|
6
|
+
var _chunkTWFEYLU4js = require('./chunk-TWFEYLU4.cjs');
|
|
7
7
|
|
|
8
8
|
// src/cli-main.ts
|
|
9
9
|
var _cac = require('cac');
|