@storm-software/esbuild 0.34.2 → 0.34.3
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 +2 -1
- package/bin/esbuild.cjs +12143 -158
- package/dist/assets.cjs +9 -0
- package/dist/assets.d.cts +16 -0
- package/dist/assets.d.ts +16 -0
- package/dist/assets.js +9 -0
- package/dist/build.cjs +13 -17
- package/dist/build.d.cts +3 -13
- package/dist/build.d.ts +3 -13
- package/dist/build.js +14 -18
- package/dist/chunk-2CM3VAO5.cjs +119 -0
- package/dist/{chunk-Y7JBB452.js → chunk-4D6ICA75.js} +36 -3
- package/dist/{chunk-5RVOO3YF.js → chunk-ABRK5MYP.js} +3 -5
- package/dist/chunk-CVOQEYHW.cjs +117 -0
- package/dist/{chunk-3PF5YMWK.js → chunk-DNZNN5SK.js} +2 -2
- package/dist/chunk-EBTMX5WL.js +117 -0
- package/dist/chunk-ECCVVXNX.js +100 -0
- package/dist/chunk-EDLA3ZZN.js +26 -0
- package/dist/{chunk-GJHRTQAS.cjs → chunk-EVDNG72R.cjs} +35 -37
- package/dist/{chunk-TDBBRZTC.cjs → chunk-FQQYNAPT.cjs} +111 -189
- package/dist/{chunk-QKJ7KLDL.cjs → chunk-G66JI4BS.cjs} +5 -7
- package/dist/{chunk-SKJRUPDP.js → chunk-NJJBR57W.js} +24 -102
- package/dist/{chunk-STCE44IS.js → chunk-OCDIIBBZ.js} +2 -2
- package/dist/{chunk-M3AOQRGN.cjs → chunk-PTHYT3U2.cjs} +188 -582
- package/dist/chunk-QVMJLFU5.cjs +26 -0
- package/dist/{chunk-DPRINYB6.js → chunk-QWTKBUQW.js} +40 -434
- package/dist/chunk-R2KKGNQL.js +119 -0
- package/dist/{chunk-TH2QFJHI.cjs → chunk-RK34D7S5.cjs} +6 -6
- package/dist/chunk-SLSBBNRF.cjs +52 -0
- package/dist/{chunk-VQHKIS7J.js → chunk-TSQT5MWW.js} +2 -4
- package/dist/{chunk-BNPCRQK4.cjs → chunk-VTBMJYSM.cjs} +6 -6
- package/dist/chunk-WLJT52I3.cjs +100 -0
- package/dist/chunk-WXURMFT7.js +52 -0
- package/dist/{chunk-VPTKC3UK.cjs → chunk-YHMM6RY5.cjs} +42 -9
- package/dist/clean.cjs +4 -5
- package/dist/clean.d.cts +1 -2
- package/dist/clean.d.ts +1 -2
- package/dist/clean.js +3 -4
- package/dist/config.cjs +5 -14
- package/dist/config.d.cts +4 -6
- package/dist/config.d.ts +4 -6
- package/dist/config.js +6 -15
- package/dist/context.cjs +11 -0
- package/dist/context.d.cts +16 -0
- package/dist/context.d.ts +16 -0
- package/dist/context.js +11 -0
- package/dist/index.cjs +14 -52
- package/dist/index.d.cts +3 -216
- package/dist/index.d.ts +3 -216
- package/dist/index.js +15 -53
- package/dist/package-json.cjs +9 -0
- package/dist/package-json.d.cts +16 -0
- package/dist/package-json.d.ts +16 -0
- package/dist/package-json.js +9 -0
- package/dist/plugins/deps-check.cjs +4 -5
- package/dist/plugins/deps-check.js +3 -4
- package/dist/plugins/resolve-paths.cjs +3 -4
- package/dist/plugins/resolve-paths.d.cts +3 -4
- package/dist/plugins/resolve-paths.d.ts +3 -4
- package/dist/plugins/resolve-paths.js +2 -3
- package/dist/tsup.cjs +8 -0
- package/dist/tsup.d.cts +16 -0
- package/dist/tsup.d.ts +16 -0
- package/dist/tsup.js +8 -0
- package/dist/types.d.cts +1 -2
- package/dist/types.d.ts +1 -2
- package/dist/watch.cjs +111 -0
- package/dist/watch.d.cts +18 -0
- package/dist/watch.d.ts +18 -0
- package/dist/watch.js +111 -0
- package/package.json +59 -38
- package/dist/chunk-27VOV3G4.cjs +0 -23
- package/dist/chunk-2TG2H4XL.js +0 -29
- package/dist/chunk-2X5ZMEAN.js +0 -167
- package/dist/chunk-3QHFCKSI.js +0 -140
- package/dist/chunk-AZON722Q.js +0 -23
- package/dist/chunk-B4CUDMY2.cjs +0 -39
- package/dist/chunk-BOFHC4OE.cjs +0 -26
- package/dist/chunk-BWSIRV3D.js +0 -26
- package/dist/chunk-CCEWV2BR.js +0 -39
- package/dist/chunk-CGMLIVTB.cjs +0 -167
- package/dist/chunk-ILJQ4NCE.cjs +0 -29
- package/dist/chunk-N62ZR7UV.cjs +0 -140
- package/dist/chunk-RLQJRD62.cjs +0 -27
- package/dist/chunk-UYE6LM4C.js +0 -60
- package/dist/chunk-XLUZXKDY.js +0 -27
- package/dist/chunk-Y5SBBYX3.cjs +0 -60
- package/dist/plugins/esm-split-code-to-cjs.cjs +0 -7
- package/dist/plugins/esm-split-code-to-cjs.d.cts +0 -15
- package/dist/plugins/esm-split-code-to-cjs.d.ts +0 -15
- package/dist/plugins/esm-split-code-to-cjs.js +0 -7
- package/dist/plugins/fix-imports.cjs +0 -7
- package/dist/plugins/fix-imports.d.cts +0 -14
- package/dist/plugins/fix-imports.d.ts +0 -14
- package/dist/plugins/fix-imports.js +0 -7
- package/dist/plugins/native-node-module.cjs +0 -7
- package/dist/plugins/native-node-module.d.cts +0 -11
- package/dist/plugins/native-node-module.d.ts +0 -11
- package/dist/plugins/native-node-module.js +0 -7
- package/dist/plugins/node-protocol.cjs +0 -7
- package/dist/plugins/node-protocol.d.cts +0 -15
- package/dist/plugins/node-protocol.d.ts +0 -15
- package/dist/plugins/node-protocol.js +0 -7
- package/dist/plugins/on-error.cjs +0 -9
- package/dist/plugins/on-error.d.cts +0 -14
- package/dist/plugins/on-error.d.ts +0 -14
- package/dist/plugins/on-error.js +0 -9
- package/dist/plugins/tsc.cjs +0 -9
- package/dist/plugins/tsc.d.cts +0 -14
- package/dist/plugins/tsc.d.ts +0 -14
- package/dist/plugins/tsc.js +0 -9
- package/dist/tsc.cjs +0 -17
- package/dist/tsc.d.cts +0 -21
- package/dist/tsc.d.ts +0 -21
- package/dist/tsc.js +0 -17
- package/dist/types-B4jbZA4j.d.cts +0 -1286
- package/dist/types-B4jbZA4j.d.ts +0 -1286
|
@@ -1,38 +1,17 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _optionalChain2(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 _chunkTH2QFJHIcjs = require('./chunk-TH2QFJHI.cjs');
|
|
4
3
|
|
|
4
|
+
var _chunkEVDNG72Rcjs = require('./chunk-EVDNG72R.cjs');
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
|
|
8
8
|
|
|
9
9
|
|
|
10
10
|
|
|
11
|
-
var
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
var _chunkBNPCRQK4cjs = require('./chunk-BNPCRQK4.cjs');
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
var _chunkGJHRTQAScjs = require('./chunk-GJHRTQAS.cjs');
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
var _chunkVPTKC3UKcjs = require('./chunk-VPTKC3UK.cjs');
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
var _chunkB4CUDMY2cjs = require('./chunk-B4CUDMY2.cjs');
|
|
11
|
+
var _chunkYHMM6RY5cjs = require('./chunk-YHMM6RY5.cjs');
|
|
33
12
|
|
|
34
13
|
// ../../node_modules/.pnpm/tsup@8.4.0_patch_hash=6f5ec3d4990820b9e30a2e3135e1e171cde70966824e3b0ca9c0d2f02fc93f24__c75bd232a33dcb63ad2eb667808a0247/node_modules/tsup/dist/chunk-BYH4XDRH.js
|
|
35
|
-
var require_chunk_BYH4XDRH =
|
|
14
|
+
var require_chunk_BYH4XDRH = _chunkYHMM6RY5cjs.__commonJS.call(void 0, {
|
|
36
15
|
"../../node_modules/.pnpm/tsup@8.4.0_patch_hash=6f5ec3d4990820b9e30a2e3135e1e171cde70966824e3b0ca9c0d2f02fc93f24__c75bd232a33dcb63ad2eb667808a0247/node_modules/tsup/dist/chunk-BYH4XDRH.js"(exports) {
|
|
37
16
|
"use strict";
|
|
38
17
|
Object.defineProperty(exports, "__esModule", {
|
|
@@ -44,7 +23,7 @@ var require_chunk_BYH4XDRH = _chunkB4CUDMY2cjs.__commonJS.call(void 0, {
|
|
|
44
23
|
});
|
|
45
24
|
|
|
46
25
|
// ../../node_modules/.pnpm/tsup@8.4.0_patch_hash=6f5ec3d4990820b9e30a2e3135e1e171cde70966824e3b0ca9c0d2f02fc93f24__c75bd232a33dcb63ad2eb667808a0247/node_modules/tsup/dist/chunk-TWFEYLU4.js
|
|
47
|
-
var require_chunk_TWFEYLU4 =
|
|
26
|
+
var require_chunk_TWFEYLU4 = _chunkYHMM6RY5cjs.__commonJS.call(void 0, {
|
|
48
27
|
"../../node_modules/.pnpm/tsup@8.4.0_patch_hash=6f5ec3d4990820b9e30a2e3135e1e171cde70966824e3b0ca9c0d2f02fc93f24__c75bd232a33dcb63ad2eb667808a0247/node_modules/tsup/dist/chunk-TWFEYLU4.js"(exports) {
|
|
49
28
|
"use strict";
|
|
50
29
|
Object.defineProperty(exports, "__esModule", {
|
|
@@ -55,7 +34,7 @@ var require_chunk_TWFEYLU4 = _chunkB4CUDMY2cjs.__commonJS.call(void 0, {
|
|
|
55
34
|
default: obj
|
|
56
35
|
};
|
|
57
36
|
}
|
|
58
|
-
|
|
37
|
+
_chunkYHMM6RY5cjs.__name.call(void 0, _interopRequireDefault, "_interopRequireDefault");
|
|
59
38
|
function _optionalChain(ops) {
|
|
60
39
|
let lastAccessLHS = void 0;
|
|
61
40
|
let value = ops[0];
|
|
@@ -77,34 +56,34 @@ var require_chunk_TWFEYLU4 = _chunkB4CUDMY2cjs.__commonJS.call(void 0, {
|
|
|
77
56
|
}
|
|
78
57
|
return value;
|
|
79
58
|
}
|
|
80
|
-
|
|
59
|
+
_chunkYHMM6RY5cjs.__name.call(void 0, _optionalChain, "_optionalChain");
|
|
81
60
|
var __create = Object.create;
|
|
82
61
|
var __defProp = Object.defineProperty;
|
|
83
62
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
84
63
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
85
64
|
var __getProtoOf = Object.getPrototypeOf;
|
|
86
65
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
87
|
-
var __require2 = /* @__PURE__ */ ((x) => typeof
|
|
88
|
-
get: /* @__PURE__ */
|
|
66
|
+
var __require2 = /* @__PURE__ */ ((x) => typeof _chunkYHMM6RY5cjs.__require !== "undefined" ? _chunkYHMM6RY5cjs.__require : typeof Proxy !== "undefined" ? new Proxy(x, {
|
|
67
|
+
get: /* @__PURE__ */ _chunkYHMM6RY5cjs.__name.call(void 0, (a, b) => (typeof _chunkYHMM6RY5cjs.__require !== "undefined" ? _chunkYHMM6RY5cjs.__require : a)[b], "get")
|
|
89
68
|
}) : x)(function(x) {
|
|
90
|
-
if (typeof
|
|
69
|
+
if (typeof _chunkYHMM6RY5cjs.__require !== "undefined") return _chunkYHMM6RY5cjs.__require.apply(this, arguments);
|
|
91
70
|
throw Error('Dynamic require of "' + x + '" is not supported');
|
|
92
71
|
});
|
|
93
|
-
var __commonJS2 = /* @__PURE__ */
|
|
72
|
+
var __commonJS2 = /* @__PURE__ */ _chunkYHMM6RY5cjs.__name.call(void 0, (cb, mod) => /* @__PURE__ */ _chunkYHMM6RY5cjs.__name.call(void 0, function __require22() {
|
|
94
73
|
return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = {
|
|
95
74
|
exports: {}
|
|
96
75
|
}).exports, mod), mod.exports;
|
|
97
76
|
}, "__require2"), "__commonJS");
|
|
98
|
-
var __copyProps = /* @__PURE__ */
|
|
77
|
+
var __copyProps = /* @__PURE__ */ _chunkYHMM6RY5cjs.__name.call(void 0, (to, from, except, desc) => {
|
|
99
78
|
if (from && typeof from === "object" || typeof from === "function") {
|
|
100
79
|
for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
|
|
101
|
-
get: /* @__PURE__ */
|
|
80
|
+
get: /* @__PURE__ */ _chunkYHMM6RY5cjs.__name.call(void 0, () => from[key], "get"),
|
|
102
81
|
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
103
82
|
});
|
|
104
83
|
}
|
|
105
84
|
return to;
|
|
106
85
|
}, "__copyProps");
|
|
107
|
-
var __toESM2 = /* @__PURE__ */
|
|
86
|
+
var __toESM2 = /* @__PURE__ */ _chunkYHMM6RY5cjs.__name.call(void 0, (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
108
87
|
// If the importer is in node compatibility mode or this is not an ESM
|
|
109
88
|
// file that has been converted to a CommonJS file using a Babel-
|
|
110
89
|
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
@@ -115,17 +94,17 @@ var require_chunk_TWFEYLU4 = _chunkB4CUDMY2cjs.__commonJS.call(void 0, {
|
|
|
115
94
|
}) : target,
|
|
116
95
|
mod
|
|
117
96
|
)), "__toESM");
|
|
118
|
-
var _fs =
|
|
97
|
+
var _fs = _chunkYHMM6RY5cjs.__require.call(void 0, "fs");
|
|
119
98
|
var _fs2 = _interopRequireDefault(_fs);
|
|
120
|
-
var _path =
|
|
99
|
+
var _path = _chunkYHMM6RY5cjs.__require.call(void 0, "path");
|
|
121
100
|
var _path2 = _interopRequireDefault(_path);
|
|
122
|
-
var _resolvefrom =
|
|
101
|
+
var _resolvefrom = _chunkYHMM6RY5cjs.__require.call(void 0, "resolve-from");
|
|
123
102
|
var _resolvefrom2 = _interopRequireDefault(_resolvefrom);
|
|
124
103
|
var singleComment = Symbol("singleComment");
|
|
125
104
|
var multiComment = Symbol("multiComment");
|
|
126
|
-
var stripWithoutWhitespace = /* @__PURE__ */
|
|
127
|
-
var stripWithWhitespace = /* @__PURE__ */
|
|
128
|
-
var isEscaped = /* @__PURE__ */
|
|
105
|
+
var stripWithoutWhitespace = /* @__PURE__ */ _chunkYHMM6RY5cjs.__name.call(void 0, () => "", "stripWithoutWhitespace");
|
|
106
|
+
var stripWithWhitespace = /* @__PURE__ */ _chunkYHMM6RY5cjs.__name.call(void 0, (string, start, end) => string.slice(start, end).replace(/\S/g, " "), "stripWithWhitespace");
|
|
107
|
+
var isEscaped = /* @__PURE__ */ _chunkYHMM6RY5cjs.__name.call(void 0, (jsonString, quotePosition) => {
|
|
129
108
|
let index = quotePosition - 1;
|
|
130
109
|
let backslashCount = 0;
|
|
131
110
|
while (jsonString[index] === "\\") {
|
|
@@ -207,21 +186,21 @@ var require_chunk_TWFEYLU4 = _chunkB4CUDMY2cjs.__commonJS.call(void 0, {
|
|
|
207
186
|
}
|
|
208
187
|
return result + buffer + (isInsideComment ? strip(jsonString.slice(offset)) : jsonString.slice(offset));
|
|
209
188
|
}
|
|
210
|
-
|
|
211
|
-
var _tinyglobby =
|
|
189
|
+
_chunkYHMM6RY5cjs.__name.call(void 0, stripJsonComments, "stripJsonComments");
|
|
190
|
+
var _tinyglobby = _chunkYHMM6RY5cjs.__require.call(void 0, "tinyglobby");
|
|
212
191
|
function getPostcss() {
|
|
213
192
|
return localRequire("postcss");
|
|
214
193
|
}
|
|
215
|
-
|
|
194
|
+
_chunkYHMM6RY5cjs.__name.call(void 0, getPostcss, "getPostcss");
|
|
216
195
|
function getApiExtractor() {
|
|
217
196
|
return localRequire("@microsoft/api-extractor");
|
|
218
197
|
}
|
|
219
|
-
|
|
198
|
+
_chunkYHMM6RY5cjs.__name.call(void 0, getApiExtractor, "getApiExtractor");
|
|
220
199
|
function localRequire(moduleName) {
|
|
221
200
|
const p = _resolvefrom2.default.silent(process.cwd(), moduleName);
|
|
222
201
|
return p && __require2(p);
|
|
223
202
|
}
|
|
224
|
-
|
|
203
|
+
_chunkYHMM6RY5cjs.__name.call(void 0, localRequire, "localRequire");
|
|
225
204
|
async function removeFiles(patterns, dir) {
|
|
226
205
|
const files = await _tinyglobby.glob.call(void 0, patterns, {
|
|
227
206
|
cwd: dir,
|
|
@@ -229,14 +208,14 @@ var require_chunk_TWFEYLU4 = _chunkB4CUDMY2cjs.__commonJS.call(void 0, {
|
|
|
229
208
|
});
|
|
230
209
|
files.forEach((file) => _fs2.default.existsSync(file) && _fs2.default.unlinkSync(file));
|
|
231
210
|
}
|
|
232
|
-
|
|
211
|
+
_chunkYHMM6RY5cjs.__name.call(void 0, removeFiles, "removeFiles");
|
|
233
212
|
function debouncePromise(fn, delay, onError) {
|
|
234
213
|
let timeout;
|
|
235
214
|
let promiseInFly;
|
|
236
215
|
let callbackPending;
|
|
237
|
-
return /* @__PURE__ */
|
|
216
|
+
return /* @__PURE__ */ _chunkYHMM6RY5cjs.__name.call(void 0, function debounced(...args) {
|
|
238
217
|
if (promiseInFly) {
|
|
239
|
-
callbackPending = /* @__PURE__ */
|
|
218
|
+
callbackPending = /* @__PURE__ */ _chunkYHMM6RY5cjs.__name.call(void 0, () => {
|
|
240
219
|
debounced(...args);
|
|
241
220
|
callbackPending = void 0;
|
|
242
221
|
}, "callbackPending");
|
|
@@ -252,7 +231,7 @@ var require_chunk_TWFEYLU4 = _chunkB4CUDMY2cjs.__commonJS.call(void 0, {
|
|
|
252
231
|
}
|
|
253
232
|
}, "debounced");
|
|
254
233
|
}
|
|
255
|
-
|
|
234
|
+
_chunkYHMM6RY5cjs.__name.call(void 0, debouncePromise, "debouncePromise");
|
|
256
235
|
function slash(path2) {
|
|
257
236
|
const isExtendedLengthPath = path2.startsWith("\\\\?\\");
|
|
258
237
|
if (isExtendedLengthPath) {
|
|
@@ -260,11 +239,11 @@ var require_chunk_TWFEYLU4 = _chunkB4CUDMY2cjs.__commonJS.call(void 0, {
|
|
|
260
239
|
}
|
|
261
240
|
return path2.replace(/\\/g, "/");
|
|
262
241
|
}
|
|
263
|
-
|
|
242
|
+
_chunkYHMM6RY5cjs.__name.call(void 0, slash, "slash");
|
|
264
243
|
function truthy(value) {
|
|
265
244
|
return Boolean(value);
|
|
266
245
|
}
|
|
267
|
-
|
|
246
|
+
_chunkYHMM6RY5cjs.__name.call(void 0, truthy, "truthy");
|
|
268
247
|
function jsoncParse(data) {
|
|
269
248
|
try {
|
|
270
249
|
return new Function(`return ${stripJsonComments(data).trim()}`)();
|
|
@@ -272,7 +251,7 @@ var require_chunk_TWFEYLU4 = _chunkB4CUDMY2cjs.__commonJS.call(void 0, {
|
|
|
272
251
|
return {};
|
|
273
252
|
}
|
|
274
253
|
}
|
|
275
|
-
|
|
254
|
+
_chunkYHMM6RY5cjs.__name.call(void 0, jsoncParse, "jsoncParse");
|
|
276
255
|
function defaultOutExtension({ format, pkgType }) {
|
|
277
256
|
let jsExtension = ".js";
|
|
278
257
|
let dtsExtension = ".d.ts";
|
|
@@ -293,7 +272,7 @@ var require_chunk_TWFEYLU4 = _chunkB4CUDMY2cjs.__commonJS.call(void 0, {
|
|
|
293
272
|
dts: dtsExtension
|
|
294
273
|
};
|
|
295
274
|
}
|
|
296
|
-
|
|
275
|
+
_chunkYHMM6RY5cjs.__name.call(void 0, defaultOutExtension, "defaultOutExtension");
|
|
297
276
|
function ensureTempDeclarationDir(options2) {
|
|
298
277
|
const cwd = _optionalChain2([options2, 'access', _40 => _40.workspaceConfig, 'optionalAccess', _41 => _41.workspaceRoot]) || process.cwd();
|
|
299
278
|
const dirPath = _path2.default.join(cwd, ".tsup", "declaration");
|
|
@@ -307,8 +286,8 @@ var require_chunk_TWFEYLU4 = _chunkB4CUDMY2cjs.__commonJS.call(void 0, {
|
|
|
307
286
|
writeFileSync(gitIgnorePath, "**/*\n");
|
|
308
287
|
return dirPath;
|
|
309
288
|
}
|
|
310
|
-
|
|
311
|
-
var toObjectEntry = /* @__PURE__ */
|
|
289
|
+
_chunkYHMM6RY5cjs.__name.call(void 0, ensureTempDeclarationDir, "ensureTempDeclarationDir");
|
|
290
|
+
var toObjectEntry = /* @__PURE__ */ _chunkYHMM6RY5cjs.__name.call(void 0, (entry) => {
|
|
312
291
|
if (typeof entry === "string") {
|
|
313
292
|
entry = [
|
|
314
293
|
entry
|
|
@@ -327,7 +306,7 @@ var require_chunk_TWFEYLU4 = _chunkB4CUDMY2cjs.__commonJS.call(void 0, {
|
|
|
327
306
|
};
|
|
328
307
|
}, {});
|
|
329
308
|
}, "toObjectEntry");
|
|
330
|
-
var findLowestCommonAncestor = /* @__PURE__ */
|
|
309
|
+
var findLowestCommonAncestor = /* @__PURE__ */ _chunkYHMM6RY5cjs.__name.call(void 0, (filepaths) => {
|
|
331
310
|
if (filepaths.length <= 1) return "";
|
|
332
311
|
const [first, ...rest] = filepaths;
|
|
333
312
|
let ancestor = first.split("/");
|
|
@@ -352,14 +331,14 @@ var require_chunk_TWFEYLU4 = _chunkB4CUDMY2cjs.__commonJS.call(void 0, {
|
|
|
352
331
|
}
|
|
353
332
|
return slash(_path2.default.normalize(_path2.default.join(cwd || process.cwd(), p)));
|
|
354
333
|
}
|
|
355
|
-
|
|
334
|
+
_chunkYHMM6RY5cjs.__name.call(void 0, toAbsolutePath, "toAbsolutePath");
|
|
356
335
|
function writeFileSync(filePath, content) {
|
|
357
336
|
_fs2.default.mkdirSync(_path2.default.dirname(filePath), {
|
|
358
337
|
recursive: true
|
|
359
338
|
});
|
|
360
339
|
_fs2.default.writeFileSync(filePath, content);
|
|
361
340
|
}
|
|
362
|
-
|
|
341
|
+
_chunkYHMM6RY5cjs.__name.call(void 0, writeFileSync, "writeFileSync");
|
|
363
342
|
function replaceDtsWithJsExtensions(dtsFilePath) {
|
|
364
343
|
return dtsFilePath.replace(/\.d\.(ts|mts|cts)$/, (_, fileExtension) => {
|
|
365
344
|
switch (fileExtension) {
|
|
@@ -374,19 +353,19 @@ var require_chunk_TWFEYLU4 = _chunkB4CUDMY2cjs.__commonJS.call(void 0, {
|
|
|
374
353
|
}
|
|
375
354
|
});
|
|
376
355
|
}
|
|
377
|
-
|
|
378
|
-
var convertArrayEntriesToObjectEntries = /* @__PURE__ */
|
|
356
|
+
_chunkYHMM6RY5cjs.__name.call(void 0, replaceDtsWithJsExtensions, "replaceDtsWithJsExtensions");
|
|
357
|
+
var convertArrayEntriesToObjectEntries = /* @__PURE__ */ _chunkYHMM6RY5cjs.__name.call(void 0, (arrayOfEntries) => {
|
|
379
358
|
const objectEntries = Object.fromEntries(arrayOfEntries.map((entry) => [
|
|
380
359
|
_path2.default.posix.join(...entry.split(_path2.default.posix.sep).slice(1, -1).concat(_path2.default.parse(entry).name)),
|
|
381
360
|
entry
|
|
382
361
|
]));
|
|
383
362
|
return objectEntries;
|
|
384
363
|
}, "convertArrayEntriesToObjectEntries");
|
|
385
|
-
var resolveEntryPaths = /* @__PURE__ */
|
|
364
|
+
var resolveEntryPaths = /* @__PURE__ */ _chunkYHMM6RY5cjs.__name.call(void 0, async (entryPaths) => {
|
|
386
365
|
const resolvedEntryPaths = typeof entryPaths === "string" || Array.isArray(entryPaths) ? convertArrayEntriesToObjectEntries(await _tinyglobby.glob.call(void 0, entryPaths)) : entryPaths;
|
|
387
366
|
return resolvedEntryPaths;
|
|
388
367
|
}, "resolveEntryPaths");
|
|
389
|
-
var resolveExperimentalDtsConfig = /* @__PURE__ */
|
|
368
|
+
var resolveExperimentalDtsConfig = /* @__PURE__ */ _chunkYHMM6RY5cjs.__name.call(void 0, async (options2, tsconfig) => {
|
|
390
369
|
const resolvedEntryPaths = await resolveEntryPaths(_optionalChain([
|
|
391
370
|
options2,
|
|
392
371
|
"access",
|
|
@@ -410,7 +389,7 @@ var require_chunk_TWFEYLU4 = _chunkB4CUDMY2cjs.__commonJS.call(void 0, {
|
|
|
410
389
|
};
|
|
411
390
|
return normalizedExperimentalDtsConfig;
|
|
412
391
|
}, "resolveExperimentalDtsConfig");
|
|
413
|
-
var resolveInitialExperimentalDtsConfig = /* @__PURE__ */
|
|
392
|
+
var resolveInitialExperimentalDtsConfig = /* @__PURE__ */ _chunkYHMM6RY5cjs.__name.call(void 0, async (experimentalDts) => {
|
|
414
393
|
if (experimentalDts == null) {
|
|
415
394
|
return;
|
|
416
395
|
}
|
|
@@ -454,7 +433,7 @@ var require_chunk_TWFEYLU4 = _chunkB4CUDMY2cjs.__commonJS.call(void 0, {
|
|
|
454
433
|
});
|
|
455
434
|
|
|
456
435
|
// ../../node_modules/.pnpm/tsup@8.4.0_patch_hash=6f5ec3d4990820b9e30a2e3135e1e171cde70966824e3b0ca9c0d2f02fc93f24__c75bd232a33dcb63ad2eb667808a0247/node_modules/tsup/dist/chunk-VGC3FXLU.js
|
|
457
|
-
var require_chunk_VGC3FXLU =
|
|
436
|
+
var require_chunk_VGC3FXLU = _chunkYHMM6RY5cjs.__commonJS.call(void 0, {
|
|
458
437
|
"../../node_modules/.pnpm/tsup@8.4.0_patch_hash=6f5ec3d4990820b9e30a2e3135e1e171cde70966824e3b0ca9c0d2f02fc93f24__c75bd232a33dcb63ad2eb667808a0247/node_modules/tsup/dist/chunk-VGC3FXLU.js"(exports) {
|
|
459
438
|
"use strict";
|
|
460
439
|
Object.defineProperty(exports, "__esModule", {
|
|
@@ -465,7 +444,7 @@ var require_chunk_VGC3FXLU = _chunkB4CUDMY2cjs.__commonJS.call(void 0, {
|
|
|
465
444
|
default: obj
|
|
466
445
|
};
|
|
467
446
|
}
|
|
468
|
-
|
|
447
|
+
_chunkYHMM6RY5cjs.__name.call(void 0, _interopRequireDefault, "_interopRequireDefault");
|
|
469
448
|
function _optionalChain(ops) {
|
|
470
449
|
let lastAccessLHS = void 0;
|
|
471
450
|
let value = ops[0];
|
|
@@ -487,17 +466,17 @@ var require_chunk_VGC3FXLU = _chunkB4CUDMY2cjs.__commonJS.call(void 0, {
|
|
|
487
466
|
}
|
|
488
467
|
return value;
|
|
489
468
|
}
|
|
490
|
-
|
|
469
|
+
_chunkYHMM6RY5cjs.__name.call(void 0, _optionalChain, "_optionalChain");
|
|
491
470
|
var _chunkTWFEYLU4js = require_chunk_TWFEYLU4();
|
|
492
|
-
var _fs =
|
|
471
|
+
var _fs = _chunkYHMM6RY5cjs.__require.call(void 0, "fs");
|
|
493
472
|
var _fs2 = _interopRequireDefault(_fs);
|
|
494
|
-
var _path =
|
|
473
|
+
var _path = _chunkYHMM6RY5cjs.__require.call(void 0, "path");
|
|
495
474
|
var _path2 = _interopRequireDefault(_path);
|
|
496
|
-
var _joycon =
|
|
475
|
+
var _joycon = _chunkYHMM6RY5cjs.__require.call(void 0, "joycon");
|
|
497
476
|
var _joycon2 = _interopRequireDefault(_joycon);
|
|
498
|
-
var _bundlerequire =
|
|
477
|
+
var _bundlerequire = _chunkYHMM6RY5cjs.__require.call(void 0, "bundle-require");
|
|
499
478
|
var joycon = new (0, _joycon2.default)();
|
|
500
|
-
var loadJson = /* @__PURE__ */
|
|
479
|
+
var loadJson = /* @__PURE__ */ _chunkYHMM6RY5cjs.__name.call(void 0, async (filepath, options2) => {
|
|
501
480
|
try {
|
|
502
481
|
return _chunkTWFEYLU4js.jsoncParse.call(void 0, await _fs2.default.promises.readFile(filepath, "utf8"));
|
|
503
482
|
} catch (error) {
|
|
@@ -558,7 +537,7 @@ var require_chunk_VGC3FXLU = _chunkB4CUDMY2cjs.__commonJS.call(void 0, {
|
|
|
558
537
|
}
|
|
559
538
|
return {};
|
|
560
539
|
}
|
|
561
|
-
|
|
540
|
+
_chunkYHMM6RY5cjs.__name.call(void 0, loadTsupConfig, "loadTsupConfig");
|
|
562
541
|
async function loadPkg(cwd, clearCache = false) {
|
|
563
542
|
if (clearCache) {
|
|
564
543
|
joycon.clearCache();
|
|
@@ -568,7 +547,7 @@ var require_chunk_VGC3FXLU = _chunkB4CUDMY2cjs.__commonJS.call(void 0, {
|
|
|
568
547
|
], cwd, _path2.default.dirname(cwd));
|
|
569
548
|
return data || {};
|
|
570
549
|
}
|
|
571
|
-
|
|
550
|
+
_chunkYHMM6RY5cjs.__name.call(void 0, loadPkg, "loadPkg");
|
|
572
551
|
async function getProductionDeps(cwd, clearCache = false) {
|
|
573
552
|
const data = await loadPkg(cwd, clearCache);
|
|
574
553
|
const deps = Array.from(/* @__PURE__ */ new Set([
|
|
@@ -577,7 +556,7 @@ var require_chunk_VGC3FXLU = _chunkB4CUDMY2cjs.__commonJS.call(void 0, {
|
|
|
577
556
|
]));
|
|
578
557
|
return deps;
|
|
579
558
|
}
|
|
580
|
-
|
|
559
|
+
_chunkYHMM6RY5cjs.__name.call(void 0, getProductionDeps, "getProductionDeps");
|
|
581
560
|
async function getAllDepsHash(cwd) {
|
|
582
561
|
const data = await loadPkg(cwd, true);
|
|
583
562
|
return JSON.stringify({
|
|
@@ -586,18 +565,18 @@ var require_chunk_VGC3FXLU = _chunkB4CUDMY2cjs.__commonJS.call(void 0, {
|
|
|
586
565
|
...data.devDependencies
|
|
587
566
|
});
|
|
588
567
|
}
|
|
589
|
-
|
|
590
|
-
var _util =
|
|
568
|
+
_chunkYHMM6RY5cjs.__name.call(void 0, getAllDepsHash, "getAllDepsHash");
|
|
569
|
+
var _util = _chunkYHMM6RY5cjs.__require.call(void 0, "util");
|
|
591
570
|
var _util2 = _interopRequireDefault(_util);
|
|
592
|
-
var _worker_threads =
|
|
593
|
-
var _picocolors =
|
|
571
|
+
var _worker_threads = _chunkYHMM6RY5cjs.__require.call(void 0, "worker_threads");
|
|
572
|
+
var _picocolors = _chunkYHMM6RY5cjs.__require.call(void 0, "picocolors");
|
|
594
573
|
var _picocolors2 = _interopRequireDefault(_picocolors);
|
|
595
|
-
var colorize = /* @__PURE__ */
|
|
574
|
+
var colorize = /* @__PURE__ */ _chunkYHMM6RY5cjs.__name.call(void 0, (type, data, onlyImportant = false) => {
|
|
596
575
|
if (onlyImportant && (type === "info" || type === "success")) return data;
|
|
597
576
|
const color = type === "info" ? "blue" : type === "error" ? "red" : type === "warn" ? "yellow" : "green";
|
|
598
577
|
return _picocolors2.default[color](data);
|
|
599
578
|
}, "colorize");
|
|
600
|
-
var makeLabel = /* @__PURE__ */
|
|
579
|
+
var makeLabel = /* @__PURE__ */ _chunkYHMM6RY5cjs.__name.call(void 0, (name, input, type) => {
|
|
601
580
|
return [
|
|
602
581
|
name && `${_picocolors2.default.dim("[")}${name.toUpperCase()}${_picocolors2.default.dim("]")}`,
|
|
603
582
|
colorize(type, input.toUpperCase())
|
|
@@ -607,12 +586,12 @@ var require_chunk_VGC3FXLU = _chunkB4CUDMY2cjs.__commonJS.call(void 0, {
|
|
|
607
586
|
function setSilent(isSilent) {
|
|
608
587
|
silent = !!isSilent;
|
|
609
588
|
}
|
|
610
|
-
|
|
589
|
+
_chunkYHMM6RY5cjs.__name.call(void 0, setSilent, "setSilent");
|
|
611
590
|
function getSilent() {
|
|
612
591
|
return silent;
|
|
613
592
|
}
|
|
614
|
-
|
|
615
|
-
var createLogger = /* @__PURE__ */
|
|
593
|
+
_chunkYHMM6RY5cjs.__name.call(void 0, getSilent, "getSilent");
|
|
594
|
+
var createLogger = /* @__PURE__ */ _chunkYHMM6RY5cjs.__name.call(void 0, (name) => {
|
|
616
595
|
return {
|
|
617
596
|
setName(_name) {
|
|
618
597
|
name = _name;
|
|
@@ -671,7 +650,7 @@ var require_chunk_VGC3FXLU = _chunkB4CUDMY2cjs.__commonJS.call(void 0, {
|
|
|
671
650
|
}
|
|
672
651
|
};
|
|
673
652
|
}, "createLogger");
|
|
674
|
-
var prettyBytes = /* @__PURE__ */
|
|
653
|
+
var prettyBytes = /* @__PURE__ */ _chunkYHMM6RY5cjs.__name.call(void 0, (bytes) => {
|
|
675
654
|
if (bytes === 0) return "0 B";
|
|
676
655
|
const unit = [
|
|
677
656
|
"B",
|
|
@@ -687,15 +666,15 @@ var require_chunk_VGC3FXLU = _chunkB4CUDMY2cjs.__commonJS.call(void 0, {
|
|
|
687
666
|
const exp = Math.floor(Math.log(bytes) / Math.log(1024));
|
|
688
667
|
return `${(bytes / 1024 ** exp).toFixed(2)} ${unit[exp]}`;
|
|
689
668
|
}, "prettyBytes");
|
|
690
|
-
var getLengthOfLongestString = /* @__PURE__ */
|
|
669
|
+
var getLengthOfLongestString = /* @__PURE__ */ _chunkYHMM6RY5cjs.__name.call(void 0, (strings) => {
|
|
691
670
|
return strings.reduce((max, str) => {
|
|
692
671
|
return Math.max(max, str.length);
|
|
693
672
|
}, 0);
|
|
694
673
|
}, "getLengthOfLongestString");
|
|
695
|
-
var padRight = /* @__PURE__ */
|
|
674
|
+
var padRight = /* @__PURE__ */ _chunkYHMM6RY5cjs.__name.call(void 0, (str, maxLength) => {
|
|
696
675
|
return str + " ".repeat(maxLength - str.length);
|
|
697
676
|
}, "padRight");
|
|
698
|
-
var reportSize = /* @__PURE__ */
|
|
677
|
+
var reportSize = /* @__PURE__ */ _chunkYHMM6RY5cjs.__name.call(void 0, (logger, format, files) => {
|
|
699
678
|
const filenames = Object.keys(files);
|
|
700
679
|
const maxLength = getLengthOfLongestString(filenames) + 1;
|
|
701
680
|
for (const name of filenames) {
|
|
@@ -714,7 +693,7 @@ var require_chunk_VGC3FXLU = _chunkB4CUDMY2cjs.__commonJS.call(void 0, {
|
|
|
714
693
|
});
|
|
715
694
|
|
|
716
695
|
// ../../node_modules/.pnpm/tsup@8.4.0_patch_hash=6f5ec3d4990820b9e30a2e3135e1e171cde70966824e3b0ca9c0d2f02fc93f24__c75bd232a33dcb63ad2eb667808a0247/node_modules/tsup/dist/chunk-JZ25TPTY.js
|
|
717
|
-
var require_chunk_JZ25TPTY =
|
|
696
|
+
var require_chunk_JZ25TPTY = _chunkYHMM6RY5cjs.__commonJS.call(void 0, {
|
|
718
697
|
"../../node_modules/.pnpm/tsup@8.4.0_patch_hash=6f5ec3d4990820b9e30a2e3135e1e171cde70966824e3b0ca9c0d2f02fc93f24__c75bd232a33dcb63ad2eb667808a0247/node_modules/tsup/dist/chunk-JZ25TPTY.js"(exports) {
|
|
719
698
|
"use strict";
|
|
720
699
|
Object.defineProperty(exports, "__esModule", {
|
|
@@ -725,13 +704,13 @@ var require_chunk_JZ25TPTY = _chunkB4CUDMY2cjs.__commonJS.call(void 0, {
|
|
|
725
704
|
default: obj
|
|
726
705
|
};
|
|
727
706
|
}
|
|
728
|
-
|
|
729
|
-
var _worker_threads =
|
|
730
|
-
var _picocolors =
|
|
707
|
+
_chunkYHMM6RY5cjs.__name.call(void 0, _interopRequireDefault, "_interopRequireDefault");
|
|
708
|
+
var _worker_threads = _chunkYHMM6RY5cjs.__require.call(void 0, "worker_threads");
|
|
709
|
+
var _picocolors = _chunkYHMM6RY5cjs.__require.call(void 0, "picocolors");
|
|
731
710
|
var _picocolors2 = _interopRequireDefault(_picocolors);
|
|
732
711
|
var PrettyError = class extends Error {
|
|
733
712
|
static {
|
|
734
|
-
|
|
713
|
+
_chunkYHMM6RY5cjs.__name.call(void 0, this, "PrettyError");
|
|
735
714
|
}
|
|
736
715
|
constructor(message) {
|
|
737
716
|
super(message);
|
|
@@ -760,14 +739,14 @@ var require_chunk_JZ25TPTY = _chunkB4CUDMY2cjs.__commonJS.call(void 0, {
|
|
|
760
739
|
_worker_threads.parentPort.postMessage("error");
|
|
761
740
|
}
|
|
762
741
|
}
|
|
763
|
-
|
|
742
|
+
_chunkYHMM6RY5cjs.__name.call(void 0, handleError, "handleError");
|
|
764
743
|
exports.PrettyError = PrettyError;
|
|
765
744
|
exports.handleError = handleError;
|
|
766
745
|
}
|
|
767
746
|
});
|
|
768
747
|
|
|
769
748
|
// ../../node_modules/.pnpm/tsup@8.4.0_patch_hash=6f5ec3d4990820b9e30a2e3135e1e171cde70966824e3b0ca9c0d2f02fc93f24__c75bd232a33dcb63ad2eb667808a0247/node_modules/tsup/dist/index.js
|
|
770
|
-
var require_dist =
|
|
749
|
+
var require_dist = _chunkYHMM6RY5cjs.__commonJS.call(void 0, {
|
|
771
750
|
"../../node_modules/.pnpm/tsup@8.4.0_patch_hash=6f5ec3d4990820b9e30a2e3135e1e171cde70966824e3b0ca9c0d2f02fc93f24__c75bd232a33dcb63ad2eb667808a0247/node_modules/tsup/dist/index.js"(exports) {
|
|
772
751
|
"use strict";
|
|
773
752
|
Object.defineProperty(exports, "__esModule", {
|
|
@@ -789,13 +768,13 @@ var require_dist = _chunkB4CUDMY2cjs.__commonJS.call(void 0, {
|
|
|
789
768
|
return newObj;
|
|
790
769
|
}
|
|
791
770
|
}
|
|
792
|
-
|
|
771
|
+
_chunkYHMM6RY5cjs.__name.call(void 0, _interopRequireWildcard, "_interopRequireWildcard");
|
|
793
772
|
function _interopRequireDefault(obj) {
|
|
794
773
|
return obj && obj.__esModule ? obj : {
|
|
795
774
|
default: obj
|
|
796
775
|
};
|
|
797
776
|
}
|
|
798
|
-
|
|
777
|
+
_chunkYHMM6RY5cjs.__name.call(void 0, _interopRequireDefault, "_interopRequireDefault");
|
|
799
778
|
function _nullishCoalesce(lhs, rhsFn) {
|
|
800
779
|
if (lhs != null) {
|
|
801
780
|
return lhs;
|
|
@@ -803,7 +782,7 @@ var require_dist = _chunkB4CUDMY2cjs.__commonJS.call(void 0, {
|
|
|
803
782
|
return rhsFn();
|
|
804
783
|
}
|
|
805
784
|
}
|
|
806
|
-
|
|
785
|
+
_chunkYHMM6RY5cjs.__name.call(void 0, _nullishCoalesce, "_nullishCoalesce");
|
|
807
786
|
function _optionalChain(ops) {
|
|
808
787
|
let lastAccessLHS = void 0;
|
|
809
788
|
let value = ops[0];
|
|
@@ -825,26 +804,26 @@ var require_dist = _chunkB4CUDMY2cjs.__commonJS.call(void 0, {
|
|
|
825
804
|
}
|
|
826
805
|
return value;
|
|
827
806
|
}
|
|
828
|
-
|
|
807
|
+
_chunkYHMM6RY5cjs.__name.call(void 0, _optionalChain, "_optionalChain");
|
|
829
808
|
var _class;
|
|
830
809
|
var _chunkBYH4XDRHjs = require_chunk_BYH4XDRH();
|
|
831
810
|
var _chunkVGC3FXLUjs = require_chunk_VGC3FXLU();
|
|
832
811
|
var _chunkJZ25TPTYjs = require_chunk_JZ25TPTY();
|
|
833
812
|
var _chunkTWFEYLU4js = require_chunk_TWFEYLU4();
|
|
834
|
-
var _path =
|
|
813
|
+
var _path = _chunkYHMM6RY5cjs.__require.call(void 0, "path");
|
|
835
814
|
var _path2 = _interopRequireDefault(_path);
|
|
836
|
-
var _fs =
|
|
815
|
+
var _fs = _chunkYHMM6RY5cjs.__require.call(void 0, "fs");
|
|
837
816
|
var _fs2 = _interopRequireDefault(_fs);
|
|
838
|
-
var _worker_threads =
|
|
839
|
-
var _bundlerequire =
|
|
840
|
-
var _tinyexec =
|
|
841
|
-
var _tinyglobby =
|
|
842
|
-
var _treekill =
|
|
817
|
+
var _worker_threads = _chunkYHMM6RY5cjs.__require.call(void 0, "worker_threads");
|
|
818
|
+
var _bundlerequire = _chunkYHMM6RY5cjs.__require.call(void 0, "bundle-require");
|
|
819
|
+
var _tinyexec = _chunkYHMM6RY5cjs.__require.call(void 0, "tinyexec");
|
|
820
|
+
var _tinyglobby = _chunkYHMM6RY5cjs.__require.call(void 0, "tinyglobby");
|
|
821
|
+
var _treekill = _chunkYHMM6RY5cjs.__require.call(void 0, "tree-kill");
|
|
843
822
|
var _treekill2 = _interopRequireDefault(_treekill);
|
|
844
|
-
var _esbuild =
|
|
845
|
-
var _consola =
|
|
823
|
+
var _esbuild = _chunkYHMM6RY5cjs.__require.call(void 0, "esbuild");
|
|
824
|
+
var _consola = _chunkYHMM6RY5cjs.__require.call(void 0, "consola");
|
|
846
825
|
var _consola2 = _interopRequireDefault(_consola);
|
|
847
|
-
var nodeProtocolPlugin = /* @__PURE__ */
|
|
826
|
+
var nodeProtocolPlugin = /* @__PURE__ */ _chunkYHMM6RY5cjs.__name.call(void 0, () => {
|
|
848
827
|
const nodeProtocol = "node:";
|
|
849
828
|
return {
|
|
850
829
|
name: "node-protocol-plugin",
|
|
@@ -859,13 +838,13 @@ var require_dist = _chunkB4CUDMY2cjs.__commonJS.call(void 0, {
|
|
|
859
838
|
};
|
|
860
839
|
}, "nodeProtocolPlugin");
|
|
861
840
|
var NON_NODE_MODULE_RE = /^[A-Z]:[/\\]|^\.{0,2}\/|^\.{1,2}$/;
|
|
862
|
-
var externalPlugin = /* @__PURE__ */
|
|
841
|
+
var externalPlugin = /* @__PURE__ */ _chunkYHMM6RY5cjs.__name.call(void 0, ({ external, noExternal, skipNodeModulesBundle, tsconfigResolvePaths }) => {
|
|
863
842
|
return {
|
|
864
843
|
name: `external`,
|
|
865
|
-
setup(
|
|
844
|
+
setup(build2) {
|
|
866
845
|
if (skipNodeModulesBundle) {
|
|
867
846
|
const resolvePatterns = _bundlerequire.tsconfigPathsToRegExp.call(void 0, tsconfigResolvePaths || {});
|
|
868
|
-
|
|
847
|
+
build2.onResolve({
|
|
869
848
|
filter: /.*/
|
|
870
849
|
}, (args) => {
|
|
871
850
|
if (_bundlerequire.match.call(void 0, args.path, resolvePatterns)) {
|
|
@@ -887,7 +866,7 @@ var require_dist = _chunkB4CUDMY2cjs.__commonJS.call(void 0, {
|
|
|
887
866
|
}
|
|
888
867
|
});
|
|
889
868
|
} else {
|
|
890
|
-
|
|
869
|
+
build2.onResolve({
|
|
891
870
|
filter: /.*/
|
|
892
871
|
}, (args) => {
|
|
893
872
|
if (_bundlerequire.match.call(void 0, args.path, noExternal)) {
|
|
@@ -903,12 +882,12 @@ var require_dist = _chunkB4CUDMY2cjs.__commonJS.call(void 0, {
|
|
|
903
882
|
}
|
|
904
883
|
};
|
|
905
884
|
}, "externalPlugin");
|
|
906
|
-
var postcssPlugin = /* @__PURE__ */
|
|
885
|
+
var postcssPlugin = /* @__PURE__ */ _chunkYHMM6RY5cjs.__name.call(void 0, ({ options: options1, css, inject, cssLoader }) => {
|
|
907
886
|
return {
|
|
908
887
|
name: "postcss",
|
|
909
|
-
setup(
|
|
888
|
+
setup(build2) {
|
|
910
889
|
let configCache;
|
|
911
|
-
const getPostcssConfig = /* @__PURE__ */
|
|
890
|
+
const getPostcssConfig = /* @__PURE__ */ _chunkYHMM6RY5cjs.__name.call(void 0, async () => {
|
|
912
891
|
const loadConfig = _chunkTWFEYLU4js.__require.call(void 0, "postcss-load-config");
|
|
913
892
|
if (configCache) {
|
|
914
893
|
return configCache;
|
|
@@ -928,7 +907,7 @@ var require_dist = _chunkB4CUDMY2cjs.__commonJS.call(void 0, {
|
|
|
928
907
|
throw error;
|
|
929
908
|
}
|
|
930
909
|
}, "getPostcssConfig");
|
|
931
|
-
|
|
910
|
+
build2.onResolve({
|
|
932
911
|
filter: /^#style-inject$/
|
|
933
912
|
}, () => {
|
|
934
913
|
return {
|
|
@@ -936,7 +915,7 @@ var require_dist = _chunkB4CUDMY2cjs.__commonJS.call(void 0, {
|
|
|
936
915
|
namespace: "#style-inject"
|
|
937
916
|
};
|
|
938
917
|
});
|
|
939
|
-
|
|
918
|
+
build2.onLoad({
|
|
940
919
|
filter: /^#style-inject$/,
|
|
941
920
|
namespace: "#style-inject"
|
|
942
921
|
}, () => {
|
|
@@ -970,7 +949,7 @@ var require_dist = _chunkB4CUDMY2cjs.__commonJS.call(void 0, {
|
|
|
970
949
|
loader: "js"
|
|
971
950
|
};
|
|
972
951
|
});
|
|
973
|
-
|
|
952
|
+
build2.onLoad({
|
|
974
953
|
filter: /\.css$/
|
|
975
954
|
}, async (args) => {
|
|
976
955
|
let contents;
|
|
@@ -1009,11 +988,11 @@ var require_dist = _chunkB4CUDMY2cjs.__commonJS.call(void 0, {
|
|
|
1009
988
|
}
|
|
1010
989
|
if (inject) {
|
|
1011
990
|
contents = (await _esbuild.transform.call(void 0, contents, {
|
|
1012
|
-
minify:
|
|
1013
|
-
minifyIdentifiers:
|
|
1014
|
-
minifySyntax:
|
|
1015
|
-
minifyWhitespace:
|
|
1016
|
-
logLevel:
|
|
991
|
+
minify: build2.initialOptions.minify,
|
|
992
|
+
minifyIdentifiers: build2.initialOptions.minifyIdentifiers,
|
|
993
|
+
minifySyntax: build2.initialOptions.minifySyntax,
|
|
994
|
+
minifyWhitespace: build2.initialOptions.minifyWhitespace,
|
|
995
|
+
logLevel: build2.initialOptions.logLevel,
|
|
1017
996
|
loader: "css"
|
|
1018
997
|
})).code;
|
|
1019
998
|
contents = typeof inject === "function" ? await inject(JSON.stringify(contents), args.path) : `import styleInject from '#style-inject';styleInject(${JSON.stringify(contents)})`;
|
|
@@ -1030,14 +1009,14 @@ var require_dist = _chunkB4CUDMY2cjs.__commonJS.call(void 0, {
|
|
|
1030
1009
|
}
|
|
1031
1010
|
};
|
|
1032
1011
|
}, "postcssPlugin");
|
|
1033
|
-
var useSvelteCssExtension = /* @__PURE__ */
|
|
1034
|
-
var sveltePlugin = /* @__PURE__ */
|
|
1012
|
+
var useSvelteCssExtension = /* @__PURE__ */ _chunkYHMM6RY5cjs.__name.call(void 0, (p) => p.replace(/\.svelte$/, ".svelte.css"), "useSvelteCssExtension");
|
|
1013
|
+
var sveltePlugin = /* @__PURE__ */ _chunkYHMM6RY5cjs.__name.call(void 0, ({ css, options: options1 }) => {
|
|
1035
1014
|
return {
|
|
1036
1015
|
name: "svelte",
|
|
1037
|
-
setup(
|
|
1016
|
+
setup(build2) {
|
|
1038
1017
|
let svelte;
|
|
1039
1018
|
let sveltePreprocessor;
|
|
1040
|
-
|
|
1019
|
+
build2.onResolve({
|
|
1041
1020
|
filter: /\.svelte\.css$/
|
|
1042
1021
|
}, (args) => {
|
|
1043
1022
|
return {
|
|
@@ -1045,7 +1024,7 @@ var require_dist = _chunkB4CUDMY2cjs.__commonJS.call(void 0, {
|
|
|
1045
1024
|
namespace: "svelte-css"
|
|
1046
1025
|
};
|
|
1047
1026
|
});
|
|
1048
|
-
|
|
1027
|
+
build2.onLoad({
|
|
1049
1028
|
filter: /\.svelte$/
|
|
1050
1029
|
}, async (args) => {
|
|
1051
1030
|
svelte = svelte || _chunkTWFEYLU4js.localRequire.call(void 0, "svelte/compiler");
|
|
@@ -1059,7 +1038,7 @@ var require_dist = _chunkB4CUDMY2cjs.__commonJS.call(void 0, {
|
|
|
1059
1038
|
]
|
|
1060
1039
|
};
|
|
1061
1040
|
}
|
|
1062
|
-
const convertMessage = /* @__PURE__ */
|
|
1041
|
+
const convertMessage = /* @__PURE__ */ _chunkYHMM6RY5cjs.__name.call(void 0, ({ message, start, end }) => {
|
|
1063
1042
|
let location;
|
|
1064
1043
|
if (start && end) {
|
|
1065
1044
|
const lineText = source.split(/\r\n|\r|\n/g)[start.line - 1];
|
|
@@ -1101,7 +1080,7 @@ var require_dist = _chunkB4CUDMY2cjs.__commonJS.call(void 0, {
|
|
|
1101
1080
|
verbatimModuleSyntax: true
|
|
1102
1081
|
}
|
|
1103
1082
|
},
|
|
1104
|
-
logLevel:
|
|
1083
|
+
logLevel: build2.initialOptions.logLevel
|
|
1105
1084
|
});
|
|
1106
1085
|
return {
|
|
1107
1086
|
code,
|
|
@@ -1136,17 +1115,17 @@ var require_dist = _chunkB4CUDMY2cjs.__commonJS.call(void 0, {
|
|
|
1136
1115
|
}
|
|
1137
1116
|
};
|
|
1138
1117
|
}, "sveltePlugin");
|
|
1139
|
-
var swcPlugin = /* @__PURE__ */
|
|
1118
|
+
var swcPlugin = /* @__PURE__ */ _chunkYHMM6RY5cjs.__name.call(void 0, ({ logger: logger3 }) => {
|
|
1140
1119
|
return {
|
|
1141
1120
|
name: "swc",
|
|
1142
|
-
setup(
|
|
1121
|
+
setup(build2) {
|
|
1143
1122
|
const swc = _chunkTWFEYLU4js.localRequire.call(void 0, "@swc/core");
|
|
1144
1123
|
if (!swc) {
|
|
1145
|
-
logger3.warn(
|
|
1124
|
+
logger3.warn(build2.initialOptions.format, `You have emitDecoratorMetadata enabled but @swc/core was not installed, skipping swc plugin`);
|
|
1146
1125
|
return;
|
|
1147
1126
|
}
|
|
1148
|
-
|
|
1149
|
-
|
|
1127
|
+
build2.initialOptions.keepNames = true;
|
|
1128
|
+
build2.onLoad({
|
|
1150
1129
|
filter: /\.[jt]sx?$/
|
|
1151
1130
|
}, async (args) => {
|
|
1152
1131
|
const isTs = /\.tsx?$/.test(args.path);
|
|
@@ -1183,11 +1162,11 @@ var require_dist = _chunkB4CUDMY2cjs.__commonJS.call(void 0, {
|
|
|
1183
1162
|
}
|
|
1184
1163
|
};
|
|
1185
1164
|
}, "swcPlugin");
|
|
1186
|
-
var nativeNodeModulesPlugin = /* @__PURE__ */
|
|
1165
|
+
var nativeNodeModulesPlugin = /* @__PURE__ */ _chunkYHMM6RY5cjs.__name.call(void 0, () => {
|
|
1187
1166
|
return {
|
|
1188
1167
|
name: "native-node-modules",
|
|
1189
|
-
setup(
|
|
1190
|
-
|
|
1168
|
+
setup(build2) {
|
|
1169
|
+
build2.onResolve({
|
|
1191
1170
|
filter: /\.node$/,
|
|
1192
1171
|
namespace: "file"
|
|
1193
1172
|
}, (args) => {
|
|
@@ -1206,7 +1185,7 @@ var require_dist = _chunkB4CUDMY2cjs.__commonJS.call(void 0, {
|
|
|
1206
1185
|
path: resolvedId
|
|
1207
1186
|
};
|
|
1208
1187
|
});
|
|
1209
|
-
|
|
1188
|
+
build2.onLoad({
|
|
1210
1189
|
filter: /.*/,
|
|
1211
1190
|
namespace: "node-file"
|
|
1212
1191
|
}, (args) => {
|
|
@@ -1219,20 +1198,20 @@ var require_dist = _chunkB4CUDMY2cjs.__commonJS.call(void 0, {
|
|
|
1219
1198
|
resolveDir: _path2.default.dirname(args.path)
|
|
1220
1199
|
};
|
|
1221
1200
|
});
|
|
1222
|
-
|
|
1201
|
+
build2.onResolve({
|
|
1223
1202
|
filter: /\.node$/,
|
|
1224
1203
|
namespace: "node-file"
|
|
1225
1204
|
}, (args) => ({
|
|
1226
1205
|
path: args.path,
|
|
1227
1206
|
namespace: "file"
|
|
1228
1207
|
}));
|
|
1229
|
-
const opts =
|
|
1208
|
+
const opts = build2.initialOptions;
|
|
1230
1209
|
opts.loader = opts.loader || {};
|
|
1231
1210
|
opts.loader[".node"] = "file";
|
|
1232
1211
|
}
|
|
1233
1212
|
};
|
|
1234
1213
|
}, "nativeNodeModulesPlugin");
|
|
1235
|
-
var getOutputExtensionMap = /* @__PURE__ */
|
|
1214
|
+
var getOutputExtensionMap = /* @__PURE__ */ _chunkYHMM6RY5cjs.__name.call(void 0, (options1, format, pkgType) => {
|
|
1236
1215
|
const outExtension = options1.outExtension || _chunkTWFEYLU4js.defaultOutExtension;
|
|
1237
1216
|
const defaultExtension = _chunkTWFEYLU4js.defaultOutExtension.call(void 0, {
|
|
1238
1217
|
format,
|
|
@@ -1247,7 +1226,7 @@ var require_dist = _chunkB4CUDMY2cjs.__commonJS.call(void 0, {
|
|
|
1247
1226
|
".js": extension.js || defaultExtension.js
|
|
1248
1227
|
};
|
|
1249
1228
|
}, "getOutputExtensionMap");
|
|
1250
|
-
var generateExternal = /* @__PURE__ */
|
|
1229
|
+
var generateExternal = /* @__PURE__ */ _chunkYHMM6RY5cjs.__name.call(void 0, async (external) => {
|
|
1251
1230
|
const result = [];
|
|
1252
1231
|
for (const item of external) {
|
|
1253
1232
|
if (typeof item !== "string" || !item.endsWith("package.json")) {
|
|
@@ -1294,10 +1273,10 @@ var require_dist = _chunkB4CUDMY2cjs.__commonJS.call(void 0, {
|
|
|
1294
1273
|
format === "cjs" && options1.removeNodeProtocol && nodeProtocolPlugin(),
|
|
1295
1274
|
{
|
|
1296
1275
|
name: "modify-options",
|
|
1297
|
-
setup(
|
|
1298
|
-
pluginContainer.modifyEsbuildOptions(
|
|
1276
|
+
setup(build2) {
|
|
1277
|
+
pluginContainer.modifyEsbuildOptions(build2.initialOptions);
|
|
1299
1278
|
if (options1.esbuildOptions) {
|
|
1300
|
-
options1.esbuildOptions(
|
|
1279
|
+
options1.esbuildOptions(build2.initialOptions, {
|
|
1301
1280
|
format
|
|
1302
1281
|
});
|
|
1303
1282
|
}
|
|
@@ -1452,8 +1431,8 @@ var require_dist = _chunkB4CUDMY2cjs.__commonJS.call(void 0, {
|
|
|
1452
1431
|
}
|
|
1453
1432
|
}
|
|
1454
1433
|
}
|
|
1455
|
-
|
|
1456
|
-
var shebang = /* @__PURE__ */
|
|
1434
|
+
_chunkYHMM6RY5cjs.__name.call(void 0, runEsbuild, "runEsbuild");
|
|
1435
|
+
var shebang = /* @__PURE__ */ _chunkYHMM6RY5cjs.__name.call(void 0, () => {
|
|
1457
1436
|
return {
|
|
1458
1437
|
name: "shebang",
|
|
1459
1438
|
renderChunk(_, info) {
|
|
@@ -1463,7 +1442,7 @@ var require_dist = _chunkB4CUDMY2cjs.__commonJS.call(void 0, {
|
|
|
1463
1442
|
}
|
|
1464
1443
|
};
|
|
1465
1444
|
}, "shebang");
|
|
1466
|
-
var cjsSplitting = /* @__PURE__ */
|
|
1445
|
+
var cjsSplitting = /* @__PURE__ */ _chunkYHMM6RY5cjs.__name.call(void 0, () => {
|
|
1467
1446
|
return {
|
|
1468
1447
|
name: "cjs-splitting",
|
|
1469
1448
|
async renderChunk(code, info) {
|
|
@@ -1471,7 +1450,7 @@ var require_dist = _chunkB4CUDMY2cjs.__commonJS.call(void 0, {
|
|
|
1471
1450
|
this.format !== "cjs" || info.type !== "chunk" || !/\.(js|cjs)$/.test(info.path)) {
|
|
1472
1451
|
return;
|
|
1473
1452
|
}
|
|
1474
|
-
const { transform: transform3 } = await Promise.resolve().then(() => _interopRequireWildcard(
|
|
1453
|
+
const { transform: transform3 } = await Promise.resolve().then(() => _interopRequireWildcard(_chunkYHMM6RY5cjs.__require.call(void 0, "sucrase")));
|
|
1475
1454
|
const result = transform3(code, {
|
|
1476
1455
|
filePath: info.path,
|
|
1477
1456
|
transforms: [
|
|
@@ -1488,8 +1467,8 @@ var require_dist = _chunkB4CUDMY2cjs.__commonJS.call(void 0, {
|
|
|
1488
1467
|
}
|
|
1489
1468
|
};
|
|
1490
1469
|
}, "cjsSplitting");
|
|
1491
|
-
var _sourcemap =
|
|
1492
|
-
var outputFile = /* @__PURE__ */
|
|
1470
|
+
var _sourcemap = _chunkYHMM6RY5cjs.__require.call(void 0, "source-map");
|
|
1471
|
+
var outputFile = /* @__PURE__ */ _chunkYHMM6RY5cjs.__name.call(void 0, async (filepath, data, options1) => {
|
|
1493
1472
|
await _fs2.default.promises.mkdir(_path2.default.dirname(filepath), {
|
|
1494
1473
|
recursive: true
|
|
1495
1474
|
});
|
|
@@ -1514,15 +1493,15 @@ var require_dist = _chunkB4CUDMY2cjs.__commonJS.call(void 0, {
|
|
|
1514
1493
|
}
|
|
1515
1494
|
}
|
|
1516
1495
|
}
|
|
1517
|
-
|
|
1518
|
-
var parseSourceMap = /* @__PURE__ */
|
|
1496
|
+
_chunkYHMM6RY5cjs.__name.call(void 0, copyDirSync, "copyDirSync");
|
|
1497
|
+
var parseSourceMap = /* @__PURE__ */ _chunkYHMM6RY5cjs.__name.call(void 0, (map) => {
|
|
1519
1498
|
return typeof map === "string" ? JSON.parse(map) : map;
|
|
1520
1499
|
}, "parseSourceMap");
|
|
1521
|
-
var isJS = /* @__PURE__ */
|
|
1522
|
-
var isCSS = /* @__PURE__ */
|
|
1500
|
+
var isJS = /* @__PURE__ */ _chunkYHMM6RY5cjs.__name.call(void 0, (path12) => /\.(js|mjs|cjs)$/.test(path12), "isJS");
|
|
1501
|
+
var isCSS = /* @__PURE__ */ _chunkYHMM6RY5cjs.__name.call(void 0, (path12) => /\.css$/.test(path12), "isCSS");
|
|
1523
1502
|
var PluginContainer = class {
|
|
1524
1503
|
static {
|
|
1525
|
-
|
|
1504
|
+
_chunkYHMM6RY5cjs.__name.call(void 0, this, "PluginContainer");
|
|
1526
1505
|
}
|
|
1527
1506
|
constructor(plugins) {
|
|
1528
1507
|
this.plugins = plugins;
|
|
@@ -1652,7 +1631,7 @@ var require_dist = _chunkB4CUDMY2cjs.__commonJS.call(void 0, {
|
|
|
1652
1631
|
}
|
|
1653
1632
|
}
|
|
1654
1633
|
};
|
|
1655
|
-
var getSourcemapComment = /* @__PURE__ */
|
|
1634
|
+
var getSourcemapComment = /* @__PURE__ */ _chunkYHMM6RY5cjs.__name.call(void 0, (inline, map, filepath, isCssFile) => {
|
|
1656
1635
|
if (!map) return "";
|
|
1657
1636
|
const prefix = isCssFile ? "/*" : "//";
|
|
1658
1637
|
const suffix = isCssFile ? " */" : "";
|
|
@@ -1663,7 +1642,7 @@ var require_dist = _chunkB4CUDMY2cjs.__commonJS.call(void 0, {
|
|
|
1663
1642
|
"es5",
|
|
1664
1643
|
"es3"
|
|
1665
1644
|
];
|
|
1666
|
-
var swcTarget = /* @__PURE__ */
|
|
1645
|
+
var swcTarget = /* @__PURE__ */ _chunkYHMM6RY5cjs.__name.call(void 0, () => {
|
|
1667
1646
|
let enabled = false;
|
|
1668
1647
|
let target;
|
|
1669
1648
|
return {
|
|
@@ -1712,7 +1691,7 @@ var require_dist = _chunkB4CUDMY2cjs.__commonJS.call(void 0, {
|
|
|
1712
1691
|
}
|
|
1713
1692
|
};
|
|
1714
1693
|
}, "swcTarget");
|
|
1715
|
-
var sizeReporter = /* @__PURE__ */
|
|
1694
|
+
var sizeReporter = /* @__PURE__ */ _chunkYHMM6RY5cjs.__name.call(void 0, () => {
|
|
1716
1695
|
return {
|
|
1717
1696
|
name: "size-reporter",
|
|
1718
1697
|
buildEnd({ writtenFiles }) {
|
|
@@ -1725,8 +1704,8 @@ var require_dist = _chunkB4CUDMY2cjs.__commonJS.call(void 0, {
|
|
|
1725
1704
|
}
|
|
1726
1705
|
};
|
|
1727
1706
|
}, "sizeReporter");
|
|
1728
|
-
var _rollup =
|
|
1729
|
-
var treeShakingPlugin = /* @__PURE__ */
|
|
1707
|
+
var _rollup = _chunkYHMM6RY5cjs.__require.call(void 0, "rollup");
|
|
1708
|
+
var treeShakingPlugin = /* @__PURE__ */ _chunkYHMM6RY5cjs.__name.call(void 0, ({ treeshake, name, silent }) => {
|
|
1730
1709
|
return {
|
|
1731
1710
|
name: "tree-shaking",
|
|
1732
1711
|
async renderChunk(code, info) {
|
|
@@ -1775,16 +1754,16 @@ var require_dist = _chunkB4CUDMY2cjs.__commonJS.call(void 0, {
|
|
|
1775
1754
|
}
|
|
1776
1755
|
};
|
|
1777
1756
|
}, "treeShakingPlugin");
|
|
1778
|
-
var copyPublicDir = /* @__PURE__ */
|
|
1757
|
+
var copyPublicDir = /* @__PURE__ */ _chunkYHMM6RY5cjs.__name.call(void 0, (publicDir, outDir) => {
|
|
1779
1758
|
if (!publicDir) return;
|
|
1780
1759
|
copyDirSync(_path2.default.resolve(publicDir === true ? "public" : publicDir), outDir);
|
|
1781
1760
|
}, "copyPublicDir");
|
|
1782
|
-
var isInPublicDir = /* @__PURE__ */
|
|
1761
|
+
var isInPublicDir = /* @__PURE__ */ _chunkYHMM6RY5cjs.__name.call(void 0, (publicDir, filePath) => {
|
|
1783
1762
|
if (!publicDir) return false;
|
|
1784
1763
|
const publicPath = _chunkTWFEYLU4js.slash.call(void 0, _path2.default.resolve(publicDir === true ? "public" : publicDir));
|
|
1785
1764
|
return _chunkTWFEYLU4js.slash.call(void 0, _path2.default.resolve(filePath)).startsWith(`${publicPath}/`);
|
|
1786
1765
|
}, "isInPublicDir");
|
|
1787
|
-
var terserPlugin = /* @__PURE__ */
|
|
1766
|
+
var terserPlugin = /* @__PURE__ */ _chunkYHMM6RY5cjs.__name.call(void 0, ({ minifyOptions, format, terserOptions = {}, globalName, logger: logger3 }) => {
|
|
1788
1767
|
return {
|
|
1789
1768
|
name: "terser",
|
|
1790
1769
|
async renderChunk(code, info) {
|
|
@@ -1827,12 +1806,12 @@ var require_dist = _chunkB4CUDMY2cjs.__commonJS.call(void 0, {
|
|
|
1827
1806
|
}
|
|
1828
1807
|
};
|
|
1829
1808
|
}, "terserPlugin");
|
|
1830
|
-
var _typescript =
|
|
1809
|
+
var _typescript = _chunkYHMM6RY5cjs.__require.call(void 0, "typescript");
|
|
1831
1810
|
var _typescript2 = _interopRequireDefault(_typescript);
|
|
1832
1811
|
var logger = _chunkVGC3FXLUjs.createLogger.call(void 0);
|
|
1833
1812
|
var AliasPool = (_class = class {
|
|
1834
1813
|
static {
|
|
1835
|
-
|
|
1814
|
+
_chunkYHMM6RY5cjs.__name.call(void 0, this, "_class");
|
|
1836
1815
|
}
|
|
1837
1816
|
constructor() {
|
|
1838
1817
|
_class.prototype.__init.call(this);
|
|
@@ -1887,13 +1866,13 @@ var require_dist = _chunkB4CUDMY2cjs.__commonJS.call(void 0, {
|
|
|
1887
1866
|
});
|
|
1888
1867
|
return exports1;
|
|
1889
1868
|
}
|
|
1890
|
-
|
|
1869
|
+
_chunkYHMM6RY5cjs.__name.call(void 0, extractExports, "extractExports");
|
|
1891
1870
|
return program.getRootFileNames().flatMap(extractExports);
|
|
1892
1871
|
}
|
|
1893
|
-
|
|
1872
|
+
_chunkYHMM6RY5cjs.__name.call(void 0, getExports, "getExports");
|
|
1894
1873
|
function emitDtsFiles(program, host) {
|
|
1895
1874
|
const fileMapping = /* @__PURE__ */ new Map();
|
|
1896
|
-
const writeFile = /* @__PURE__ */
|
|
1875
|
+
const writeFile = /* @__PURE__ */ _chunkYHMM6RY5cjs.__name.call(void 0, (fileName, text, writeByteOrderMark, onError, sourceFiles, data) => {
|
|
1897
1876
|
const sourceFile = _optionalChain([
|
|
1898
1877
|
sourceFiles,
|
|
1899
1878
|
"optionalAccess",
|
|
@@ -1932,7 +1911,7 @@ ${diagnosticMessage}`);
|
|
|
1932
1911
|
}
|
|
1933
1912
|
return fileMapping;
|
|
1934
1913
|
}
|
|
1935
|
-
|
|
1914
|
+
_chunkYHMM6RY5cjs.__name.call(void 0, emitDtsFiles, "emitDtsFiles");
|
|
1936
1915
|
function emit(compilerOptions, tsconfig, _options) {
|
|
1937
1916
|
const cwd = _optionalChain2([_options, 'access', _62 => _62.workspaceConfig, 'optionalAccess', _63 => _63.workspaceRoot]) || process.cwd();
|
|
1938
1917
|
let rawTsconfig = _bundlerequire.loadTsConfig.call(void 0, cwd, tsconfig);
|
|
@@ -1968,11 +1947,11 @@ ${diagnosticMessage}`);
|
|
|
1968
1947
|
const fileMapping = emitDtsFiles(program, host);
|
|
1969
1948
|
return getExports(program, fileMapping);
|
|
1970
1949
|
}
|
|
1971
|
-
|
|
1950
|
+
_chunkYHMM6RY5cjs.__name.call(void 0, emit, "emit");
|
|
1972
1951
|
function runTypeScriptCompiler(options1) {
|
|
1973
1952
|
try {
|
|
1974
1953
|
const start = Date.now();
|
|
1975
|
-
const getDuration = /* @__PURE__ */
|
|
1954
|
+
const getDuration = /* @__PURE__ */ _chunkYHMM6RY5cjs.__name.call(void 0, () => {
|
|
1976
1955
|
return `${Math.floor(Date.now() - start)}ms`;
|
|
1977
1956
|
}, "getDuration");
|
|
1978
1957
|
logger.info("tsc", "Build start");
|
|
@@ -1985,7 +1964,7 @@ ${diagnosticMessage}`);
|
|
|
1985
1964
|
logger.error("tsc", "Build error");
|
|
1986
1965
|
}
|
|
1987
1966
|
}
|
|
1988
|
-
|
|
1967
|
+
_chunkYHMM6RY5cjs.__name.call(void 0, runTypeScriptCompiler, "runTypeScriptCompiler");
|
|
1989
1968
|
function formatAggregationExports(exports1, declarationDirPath) {
|
|
1990
1969
|
const lines = exports1.map((declaration) => formatAggregationExport(declaration, declarationDirPath)).filter(_chunkTWFEYLU4js.truthy);
|
|
1991
1970
|
if (lines.length === 0) {
|
|
@@ -1994,7 +1973,7 @@ ${diagnosticMessage}`);
|
|
|
1994
1973
|
return `${lines.join("\n")}
|
|
1995
1974
|
`;
|
|
1996
1975
|
}
|
|
1997
|
-
|
|
1976
|
+
_chunkYHMM6RY5cjs.__name.call(void 0, formatAggregationExports, "formatAggregationExports");
|
|
1998
1977
|
function formatAggregationExport(declaration, declarationDirPath) {
|
|
1999
1978
|
const dest = _chunkTWFEYLU4js.replaceDtsWithJsExtensions.call(void 0, `./${_path2.default.posix.normalize(_chunkTWFEYLU4js.slash.call(void 0, _path2.default.relative(declarationDirPath, declaration.destFileName)))}`);
|
|
2000
1979
|
if (declaration.kind === "module") {
|
|
@@ -2013,7 +1992,7 @@ ${diagnosticMessage}`);
|
|
|
2013
1992
|
throw new Error("Unknown declaration");
|
|
2014
1993
|
}
|
|
2015
1994
|
}
|
|
2016
|
-
|
|
1995
|
+
_chunkYHMM6RY5cjs.__name.call(void 0, formatAggregationExport, "formatAggregationExport");
|
|
2017
1996
|
function formatDistributionExports(exports1, fromFilePath, toFilePath) {
|
|
2018
1997
|
let importPath = _chunkTWFEYLU4js.replaceDtsWithJsExtensions.call(void 0, _path2.default.posix.relative(_path2.default.posix.dirname(_path2.default.posix.normalize(_chunkTWFEYLU4js.slash.call(void 0, fromFilePath))), _path2.default.posix.normalize(_chunkTWFEYLU4js.slash.call(void 0, toFilePath))));
|
|
2019
1998
|
if (!/^\.+\//.test(importPath)) {
|
|
@@ -2046,7 +2025,7 @@ ${diagnosticMessage}`);
|
|
|
2046
2025
|
return `${lines.join("\n")}
|
|
2047
2026
|
`;
|
|
2048
2027
|
}
|
|
2049
|
-
|
|
2028
|
+
_chunkYHMM6RY5cjs.__name.call(void 0, formatDistributionExports, "formatDistributionExports");
|
|
2050
2029
|
function formatDistributionExport(declaration, dest) {
|
|
2051
2030
|
if (declaration.kind === "named") {
|
|
2052
2031
|
return [
|
|
@@ -2063,7 +2042,7 @@ ${diagnosticMessage}`);
|
|
|
2063
2042
|
}
|
|
2064
2043
|
return "";
|
|
2065
2044
|
}
|
|
2066
|
-
|
|
2045
|
+
_chunkYHMM6RY5cjs.__name.call(void 0, formatDistributionExport, "formatDistributionExport");
|
|
2067
2046
|
var logger2 = _chunkVGC3FXLUjs.createLogger.call(void 0);
|
|
2068
2047
|
function rollupDtsFile(inputFilePath, outputFilePath, tsconfigFilePath, options1) {
|
|
2069
2048
|
const cwd = _optionalChain2([options1, 'access', _64 => _64.workspaceConfig, 'optionalAccess', _65 => _65.workspaceRoot]) || process.cwd();
|
|
@@ -2112,7 +2091,7 @@ ${diagnosticMessage}`);
|
|
|
2112
2091
|
throw new Error(`API Extractor completed with ${extractorResult.errorCount} errors and ${extractorResult.warningCount} warnings when processing ${inputFilePath}`);
|
|
2113
2092
|
}
|
|
2114
2093
|
}
|
|
2115
|
-
|
|
2094
|
+
_chunkYHMM6RY5cjs.__name.call(void 0, rollupDtsFile, "rollupDtsFile");
|
|
2116
2095
|
async function rollupDtsFiles(options1, exports1, format) {
|
|
2117
2096
|
if (!options1.experimentalDts || !_optionalChain([
|
|
2118
2097
|
options1,
|
|
@@ -2143,7 +2122,7 @@ ${diagnosticMessage}`);
|
|
|
2143
2122
|
_chunkTWFEYLU4js.writeFileSync.call(void 0, outFileName, formatDistributionExports(currentExports, outFileName, dtsOutputFilePath));
|
|
2144
2123
|
}
|
|
2145
2124
|
}
|
|
2146
|
-
|
|
2125
|
+
_chunkYHMM6RY5cjs.__name.call(void 0, rollupDtsFiles, "rollupDtsFiles");
|
|
2147
2126
|
async function cleanDtsFiles(options1) {
|
|
2148
2127
|
if (options1.clean) {
|
|
2149
2128
|
await _chunkTWFEYLU4js.removeFiles.call(void 0, [
|
|
@@ -2151,11 +2130,11 @@ ${diagnosticMessage}`);
|
|
|
2151
2130
|
], options1.outDir);
|
|
2152
2131
|
}
|
|
2153
2132
|
}
|
|
2154
|
-
|
|
2133
|
+
_chunkYHMM6RY5cjs.__name.call(void 0, cleanDtsFiles, "cleanDtsFiles");
|
|
2155
2134
|
async function runDtsRollup(options1, exports1) {
|
|
2156
2135
|
try {
|
|
2157
2136
|
const start = Date.now();
|
|
2158
|
-
const getDuration = /* @__PURE__ */
|
|
2137
|
+
const getDuration = /* @__PURE__ */ _chunkYHMM6RY5cjs.__name.call(void 0, () => {
|
|
2159
2138
|
return `${Math.floor(Date.now() - start)}ms`;
|
|
2160
2139
|
}, "getDuration");
|
|
2161
2140
|
logger2.info("dts", "Build start");
|
|
@@ -2172,8 +2151,8 @@ ${diagnosticMessage}`);
|
|
|
2172
2151
|
logger2.error("dts", "Build error");
|
|
2173
2152
|
}
|
|
2174
2153
|
}
|
|
2175
|
-
|
|
2176
|
-
var cjsInterop = /* @__PURE__ */
|
|
2154
|
+
_chunkYHMM6RY5cjs.__name.call(void 0, runDtsRollup, "runDtsRollup");
|
|
2155
|
+
var cjsInterop = /* @__PURE__ */ _chunkYHMM6RY5cjs.__name.call(void 0, () => {
|
|
2177
2156
|
return {
|
|
2178
2157
|
name: "cjs-interop",
|
|
2179
2158
|
renderChunk(code, info) {
|
|
@@ -2195,17 +2174,17 @@ module.exports = exports.default;
|
|
|
2195
2174
|
}
|
|
2196
2175
|
};
|
|
2197
2176
|
}, "cjsInterop");
|
|
2198
|
-
var defineConfig = /* @__PURE__ */
|
|
2199
|
-
var isTaskkillCmdProcessNotFoundError = /* @__PURE__ */
|
|
2177
|
+
var defineConfig = /* @__PURE__ */ _chunkYHMM6RY5cjs.__name.call(void 0, (options1) => options1, "defineConfig");
|
|
2178
|
+
var isTaskkillCmdProcessNotFoundError = /* @__PURE__ */ _chunkYHMM6RY5cjs.__name.call(void 0, (err) => {
|
|
2200
2179
|
return process.platform === "win32" && "cmd" in err && "code" in err && typeof err.cmd === "string" && err.cmd.startsWith("taskkill") && err.code === 128;
|
|
2201
2180
|
}, "isTaskkillCmdProcessNotFoundError");
|
|
2202
|
-
var killProcess = /* @__PURE__ */
|
|
2181
|
+
var killProcess = /* @__PURE__ */ _chunkYHMM6RY5cjs.__name.call(void 0, ({ pid, signal }) => new Promise((resolve, reject) => {
|
|
2203
2182
|
_treekill2.default.call(void 0, pid, signal, (err) => {
|
|
2204
2183
|
if (err && !isTaskkillCmdProcessNotFoundError(err)) return reject(err);
|
|
2205
2184
|
resolve();
|
|
2206
2185
|
});
|
|
2207
2186
|
}), "killProcess");
|
|
2208
|
-
var normalizeOptions = /* @__PURE__ */
|
|
2187
|
+
var normalizeOptions = /* @__PURE__ */ _chunkYHMM6RY5cjs.__name.call(void 0, async (logger3, optionsFromConfigFile, optionsOverride) => {
|
|
2209
2188
|
const _options = {
|
|
2210
2189
|
...optionsFromConfigFile,
|
|
2211
2190
|
...optionsOverride
|
|
@@ -2302,7 +2281,7 @@ module.exports = exports.default;
|
|
|
2302
2281
|
}
|
|
2303
2282
|
return options1;
|
|
2304
2283
|
}, "normalizeOptions");
|
|
2305
|
-
async function
|
|
2284
|
+
async function build(_options) {
|
|
2306
2285
|
const config = _options.config === false ? {} : await _chunkVGC3FXLUjs.loadTsupConfig.call(void 0, _optionalChain2([_options, 'access', _72 => _72.workspaceConfig, 'optionalAccess', _73 => _73.workspaceRoot]) || process.cwd(), _options.config === true ? void 0 : _options.config);
|
|
2307
2286
|
const configData = typeof config.data === "function" ? await config.data(_options) : config.data;
|
|
2308
2287
|
await Promise.all([
|
|
@@ -2323,13 +2302,13 @@ module.exports = exports.default;
|
|
|
2323
2302
|
if (options1.watch) {
|
|
2324
2303
|
logger3.info("CLI", "Running in watch mode");
|
|
2325
2304
|
}
|
|
2326
|
-
const experimentalDtsTask = /* @__PURE__ */
|
|
2305
|
+
const experimentalDtsTask = /* @__PURE__ */ _chunkYHMM6RY5cjs.__name.call(void 0, async () => {
|
|
2327
2306
|
if (!options1.dts && options1.experimentalDts) {
|
|
2328
2307
|
const exports1 = runTypeScriptCompiler(options1);
|
|
2329
2308
|
await runDtsRollup(options1, exports1);
|
|
2330
2309
|
}
|
|
2331
2310
|
}, "experimentalDtsTask");
|
|
2332
|
-
const dtsTask = /* @__PURE__ */
|
|
2311
|
+
const dtsTask = /* @__PURE__ */ _chunkYHMM6RY5cjs.__name.call(void 0, async () => {
|
|
2333
2312
|
if (options1.dts && options1.experimentalDts) {
|
|
2334
2313
|
throw new Error("You can't use both `dts` and `experimentalDts` at the same time");
|
|
2335
2314
|
}
|
|
@@ -2337,7 +2316,7 @@ module.exports = exports.default;
|
|
|
2337
2316
|
if (options1.dts) {
|
|
2338
2317
|
await new Promise((resolve, reject) => {
|
|
2339
2318
|
const worker = new (0, _worker_threads.Worker)(_path2.default.join(__dirname, "./rollup.js"));
|
|
2340
|
-
const terminateWorker = /* @__PURE__ */
|
|
2319
|
+
const terminateWorker = /* @__PURE__ */ _chunkYHMM6RY5cjs.__name.call(void 0, () => {
|
|
2341
2320
|
if (options1.watch) return;
|
|
2342
2321
|
worker.terminate();
|
|
2343
2322
|
}, "terminateWorker");
|
|
@@ -2380,7 +2359,7 @@ module.exports = exports.default;
|
|
|
2380
2359
|
});
|
|
2381
2360
|
}
|
|
2382
2361
|
}, "dtsTask");
|
|
2383
|
-
const mainTasks = /* @__PURE__ */
|
|
2362
|
+
const mainTasks = /* @__PURE__ */ _chunkYHMM6RY5cjs.__name.call(void 0, async () => {
|
|
2384
2363
|
if (!_optionalChain([
|
|
2385
2364
|
options1,
|
|
2386
2365
|
"access",
|
|
@@ -2392,7 +2371,7 @@ module.exports = exports.default;
|
|
|
2392
2371
|
let onSuccessCleanup;
|
|
2393
2372
|
const buildDependencies = /* @__PURE__ */ new Set();
|
|
2394
2373
|
let depsHash = await _chunkVGC3FXLUjs.getAllDepsHash.call(void 0, _optionalChain2([options1, 'access', _74 => _74.workspaceConfig, 'optionalAccess', _75 => _75.workspaceRoot]) || process.cwd());
|
|
2395
|
-
const doOnSuccessCleanup = /* @__PURE__ */
|
|
2374
|
+
const doOnSuccessCleanup = /* @__PURE__ */ _chunkYHMM6RY5cjs.__name.call(void 0, async () => {
|
|
2396
2375
|
if (onSuccessProcess) {
|
|
2397
2376
|
await killProcess({
|
|
2398
2377
|
pid: onSuccessProcess.pid,
|
|
@@ -2407,7 +2386,7 @@ module.exports = exports.default;
|
|
|
2407
2386
|
const debouncedBuildAll = _chunkTWFEYLU4js.debouncePromise.call(void 0, () => {
|
|
2408
2387
|
return buildAll();
|
|
2409
2388
|
}, 100, _chunkJZ25TPTYjs.handleError);
|
|
2410
|
-
const buildAll = /* @__PURE__ */
|
|
2389
|
+
const buildAll = /* @__PURE__ */ _chunkYHMM6RY5cjs.__name.call(void 0, async () => {
|
|
2411
2390
|
await doOnSuccessCleanup();
|
|
2412
2391
|
const previousBuildDependencies = new Set(buildDependencies);
|
|
2413
2392
|
buildDependencies.clear();
|
|
@@ -2483,9 +2462,9 @@ module.exports = exports.default;
|
|
|
2483
2462
|
}
|
|
2484
2463
|
}
|
|
2485
2464
|
}, "buildAll");
|
|
2486
|
-
const startWatcher = /* @__PURE__ */
|
|
2465
|
+
const startWatcher = /* @__PURE__ */ _chunkYHMM6RY5cjs.__name.call(void 0, async () => {
|
|
2487
2466
|
if (!options1.watch) return;
|
|
2488
|
-
const { watch
|
|
2467
|
+
const { watch } = await Promise.resolve().then(() => _interopRequireWildcard(_chunkYHMM6RY5cjs.__require.call(void 0, "chokidar")));
|
|
2489
2468
|
const customIgnores = options1.ignoreWatch ? Array.isArray(options1.ignoreWatch) ? options1.ignoreWatch : [
|
|
2490
2469
|
options1.ignoreWatch
|
|
2491
2470
|
] : [];
|
|
@@ -2497,10 +2476,10 @@ module.exports = exports.default;
|
|
|
2497
2476
|
const watchPaths = typeof options1.watch === "boolean" ? "." : Array.isArray(options1.watch) ? options1.watch.filter((path12) => typeof path12 === "string") : options1.watch;
|
|
2498
2477
|
logger3.info("CLI", `Watching for changes in ${Array.isArray(watchPaths) ? watchPaths.map((v) => `"${v}"`).join(" | ") : `"${watchPaths}"`}`);
|
|
2499
2478
|
logger3.info("CLI", `Ignoring changes in ${ignored.map((v) => `"${v}"`).join(" | ")}`);
|
|
2500
|
-
const watcher =
|
|
2479
|
+
const watcher = watch(await _tinyglobby.glob.call(void 0, watchPaths), {
|
|
2501
2480
|
ignoreInitial: true,
|
|
2502
2481
|
ignorePermissionErrors: true,
|
|
2503
|
-
ignored: /* @__PURE__ */
|
|
2482
|
+
ignored: /* @__PURE__ */ _chunkYHMM6RY5cjs.__name.call(void 0, (p) => _tinyglobby.globSync.call(void 0, p, {
|
|
2504
2483
|
ignore: ignored
|
|
2505
2484
|
}).length === 0, "ignored")
|
|
2506
2485
|
});
|
|
@@ -2540,400 +2519,27 @@ module.exports = exports.default;
|
|
|
2540
2519
|
]);
|
|
2541
2520
|
}));
|
|
2542
2521
|
}
|
|
2543
|
-
|
|
2544
|
-
exports.build =
|
|
2522
|
+
_chunkYHMM6RY5cjs.__name.call(void 0, build, "build");
|
|
2523
|
+
exports.build = build;
|
|
2545
2524
|
exports.defineConfig = defineConfig;
|
|
2546
2525
|
}
|
|
2547
2526
|
});
|
|
2548
2527
|
|
|
2549
|
-
// src/
|
|
2550
|
-
var
|
|
2551
|
-
var import_tsup = _chunkB4CUDMY2cjs.__toESM.call(void 0, require_dist(), 1);
|
|
2552
|
-
var _chokidar = require('chokidar');
|
|
2553
|
-
var _defu = require('defu'); var _defu2 = _interopRequireDefault2(_defu);
|
|
2554
|
-
var _estoolkit = require('es-toolkit');
|
|
2555
|
-
var _esbuild2 = require('esbuild'); var esbuild = _interopRequireWildcard2(_esbuild2);
|
|
2556
|
-
var _globby = require('globby');
|
|
2557
|
-
var _fs3 = require('fs');
|
|
2558
|
-
var _promises = require('fs/promises'); var _promises2 = _interopRequireDefault2(_promises);
|
|
2559
|
-
var _findworkspaceroot = require('nx/src/utils/find-workspace-root');
|
|
2560
|
-
|
|
2561
|
-
// src/utilities/helpers.ts
|
|
2562
|
-
function handleSync(fn) {
|
|
2563
|
-
try {
|
|
2564
|
-
return fn();
|
|
2565
|
-
} catch (error_) {
|
|
2566
|
-
return error_;
|
|
2567
|
-
}
|
|
2568
|
-
}
|
|
2569
|
-
_chunkB4CUDMY2cjs.__name.call(void 0, handleSync, "handleSync");
|
|
2570
|
-
async function handleAsync(fn) {
|
|
2571
|
-
try {
|
|
2572
|
-
return await fn();
|
|
2573
|
-
} catch (error_) {
|
|
2574
|
-
return error_;
|
|
2575
|
-
}
|
|
2576
|
-
}
|
|
2577
|
-
_chunkB4CUDMY2cjs.__name.call(void 0, handleAsync, "handleAsync");
|
|
2578
|
-
var handle = handleSync;
|
|
2579
|
-
handle.async = handleAsync;
|
|
2580
|
-
var skip = Symbol("skip");
|
|
2581
|
-
function transduceSync(list, transformer) {
|
|
2582
|
-
const transduced = [];
|
|
2583
|
-
for (const [i, element_] of list.entries()) {
|
|
2584
|
-
const transformed = transformer(element_, i);
|
|
2585
|
-
if (transformed !== skip) {
|
|
2586
|
-
transduced[transduced.length] = transformed;
|
|
2587
|
-
}
|
|
2588
|
-
}
|
|
2589
|
-
return transduced;
|
|
2590
|
-
}
|
|
2591
|
-
_chunkB4CUDMY2cjs.__name.call(void 0, transduceSync, "transduceSync");
|
|
2592
|
-
async function transduceAsync(list, transformer) {
|
|
2593
|
-
const transduced = [];
|
|
2594
|
-
await Promise.all(list.entries().map(async ([i, element_]) => {
|
|
2595
|
-
const transformed = await transformer(element_, i);
|
|
2596
|
-
if (transformed !== skip) {
|
|
2597
|
-
transduced[transduced.length] = transformed;
|
|
2598
|
-
}
|
|
2599
|
-
}));
|
|
2600
|
-
return transduced;
|
|
2601
|
-
}
|
|
2602
|
-
_chunkB4CUDMY2cjs.__name.call(void 0, transduceAsync, "transduceAsync");
|
|
2603
|
-
var Filter = /* @__PURE__ */ _chunkB4CUDMY2cjs.__name.call(void 0, (filter) => (item) => {
|
|
2604
|
-
return filter(item) ? item : skip;
|
|
2605
|
-
}, "Filter");
|
|
2606
|
-
var Mapper = /* @__PURE__ */ _chunkB4CUDMY2cjs.__name.call(void 0, (mapper) => (item) => {
|
|
2607
|
-
return mapper(item);
|
|
2608
|
-
}, "Mapper");
|
|
2609
|
-
var transduce = transduceSync;
|
|
2610
|
-
transduce.async = transduceAsync;
|
|
2611
|
-
function pipeSync(fn, ...fns) {
|
|
2612
|
-
return (...args) => {
|
|
2613
|
-
let result = fn(...args);
|
|
2614
|
-
for (let i = 0; result !== skip && i < fns.length; ++i) {
|
|
2615
|
-
result = _optionalChain2([fns, 'access', _78 => _78[i], 'optionalCall', _79 => _79(result)]);
|
|
2616
|
-
}
|
|
2617
|
-
return result;
|
|
2618
|
-
};
|
|
2619
|
-
}
|
|
2620
|
-
_chunkB4CUDMY2cjs.__name.call(void 0, pipeSync, "pipeSync");
|
|
2621
|
-
function pipeAsync(fn, ...fns) {
|
|
2622
|
-
return async (...args) => {
|
|
2623
|
-
let result = await fn(...args);
|
|
2624
|
-
for (let i = 0; result !== skip && i < fns.length; ++i) {
|
|
2625
|
-
result = await _optionalChain2([fns, 'access', _80 => _80[i], 'optionalCall', _81 => _81(result)]);
|
|
2626
|
-
}
|
|
2627
|
-
return result;
|
|
2628
|
-
};
|
|
2629
|
-
}
|
|
2630
|
-
_chunkB4CUDMY2cjs.__name.call(void 0, pipeAsync, "pipeAsync");
|
|
2631
|
-
var pipe = pipeSync;
|
|
2632
|
-
pipe.async = pipeAsync;
|
|
2633
|
-
|
|
2634
|
-
// src/build.ts
|
|
2635
|
-
async function resolveContext(userOptions) {
|
|
2636
|
-
const projectRoot = userOptions.projectRoot;
|
|
2637
|
-
const workspaceRoot = _findworkspaceroot.findWorkspaceRoot.call(void 0, projectRoot);
|
|
2638
|
-
if (!workspaceRoot) {
|
|
2639
|
-
throw new Error("Cannot find Nx workspace root");
|
|
2640
|
-
}
|
|
2641
|
-
const workspaceConfig = await _chunkTDBBRZTCcjs.getWorkspaceConfig.call(void 0, true, {
|
|
2642
|
-
workspaceRoot: workspaceRoot.dir
|
|
2643
|
-
});
|
|
2644
|
-
_chunkGJHRTQAScjs.writeDebug.call(void 0, " \u2699\uFE0F Resolving build options", workspaceConfig);
|
|
2645
|
-
const stopwatch = _chunkGJHRTQAScjs.getStopwatch.call(void 0, "Build options resolution");
|
|
2646
|
-
const projectGraph = await _devkit.createProjectGraphAsync.call(void 0, {
|
|
2647
|
-
exitOnError: true
|
|
2648
|
-
});
|
|
2649
|
-
const projectJsonPath = _chunkVPTKC3UKcjs.joinPaths.call(void 0, workspaceRoot.dir, projectRoot, "project.json");
|
|
2650
|
-
if (!_fs3.existsSync.call(void 0, projectJsonPath)) {
|
|
2651
|
-
throw new Error("Cannot find project.json configuration");
|
|
2652
|
-
}
|
|
2653
|
-
const projectJsonFile = await _promises2.default.readFile(projectJsonPath, "utf8");
|
|
2654
|
-
const projectJson = JSON.parse(projectJsonFile);
|
|
2655
|
-
const projectName = projectJson.name || userOptions.name;
|
|
2656
|
-
const projectConfigurations = _devkit.readProjectsConfigurationFromProjectGraph.call(void 0, projectGraph);
|
|
2657
|
-
if (!_optionalChain2([projectConfigurations, 'optionalAccess', _82 => _82.projects, 'optionalAccess', _83 => _83[projectName]])) {
|
|
2658
|
-
throw new Error("The Build process failed because the project does not have a valid configuration in the project.json file. Check if the file exists in the root of the project.");
|
|
2659
|
-
}
|
|
2660
|
-
const options2 = _defu2.default.call(void 0, userOptions, _chunkTDBBRZTCcjs.DEFAULT_BUILD_OPTIONS);
|
|
2661
|
-
options2.name ??= projectName;
|
|
2662
|
-
const packageJsonPath = _chunkVPTKC3UKcjs.joinPaths.call(void 0, workspaceRoot.dir, options2.projectRoot, "package.json");
|
|
2663
|
-
if (!_fs3.existsSync.call(void 0, packageJsonPath)) {
|
|
2664
|
-
throw new Error("Cannot find package.json configuration");
|
|
2665
|
-
}
|
|
2666
|
-
const env = _chunkTDBBRZTCcjs.getEnv.call(void 0, "esbuild", options2);
|
|
2667
|
-
const define = _defu2.default.call(void 0, _nullishCoalesce2(options2.define, () => ( {})), _nullishCoalesce2(env, () => ( {})));
|
|
2668
|
-
const resolvedOptions = {
|
|
2669
|
-
...options2,
|
|
2670
|
-
tsconfig: _chunkVPTKC3UKcjs.joinPaths.call(void 0, projectRoot, userOptions.tsconfig ? userOptions.tsconfig.replace(projectRoot, "") : "tsconfig.json"),
|
|
2671
|
-
metafile: userOptions.mode === "development",
|
|
2672
|
-
clean: false,
|
|
2673
|
-
env,
|
|
2674
|
-
define: {
|
|
2675
|
-
STORM_FORMAT: JSON.stringify(options2.format),
|
|
2676
|
-
...Object.keys(define).filter((key) => define[key] !== void 0).reduce((res, key) => {
|
|
2677
|
-
const value = JSON.stringify(define[key]);
|
|
2678
|
-
const safeKey = key.replaceAll("(", "").replaceAll(")", "");
|
|
2679
|
-
return {
|
|
2680
|
-
...res,
|
|
2681
|
-
[`process.env.${safeKey}`]: value,
|
|
2682
|
-
[`import.meta.env.${safeKey}`]: value
|
|
2683
|
-
};
|
|
2684
|
-
}, {})
|
|
2685
|
-
}
|
|
2686
|
-
};
|
|
2687
|
-
stopwatch();
|
|
2688
|
-
return {
|
|
2689
|
-
options: resolvedOptions,
|
|
2690
|
-
clean: userOptions.clean !== false,
|
|
2691
|
-
workspaceConfig,
|
|
2692
|
-
projectConfigurations,
|
|
2693
|
-
projectName,
|
|
2694
|
-
projectGraph,
|
|
2695
|
-
sourceRoot: resolvedOptions.sourceRoot || projectJson.sourceRoot || _chunkVPTKC3UKcjs.joinPaths.call(void 0, resolvedOptions.projectRoot, "src"),
|
|
2696
|
-
outputPath: resolvedOptions.outputPath || _chunkVPTKC3UKcjs.joinPaths.call(void 0, workspaceConfig.workspaceRoot, "dist", resolvedOptions.projectRoot),
|
|
2697
|
-
minify: resolvedOptions.minify || resolvedOptions.mode === "production"
|
|
2698
|
-
};
|
|
2699
|
-
}
|
|
2700
|
-
_chunkB4CUDMY2cjs.__name.call(void 0, resolveContext, "resolveContext");
|
|
2701
|
-
async function generatePackageJson(context) {
|
|
2702
|
-
if (context.options.generatePackageJson !== false && _fs3.existsSync.call(void 0, _chunkVPTKC3UKcjs.joinPaths.call(void 0, context.options.projectRoot, "package.json"))) {
|
|
2703
|
-
_chunkGJHRTQAScjs.writeDebug.call(void 0, " \u270D\uFE0F Writing package.json file", context.workspaceConfig);
|
|
2704
|
-
const stopwatch = _chunkGJHRTQAScjs.getStopwatch.call(void 0, "Write package.json file");
|
|
2705
|
-
const packageJsonPath = _chunkVPTKC3UKcjs.joinPaths.call(void 0, context.options.projectRoot, "project.json");
|
|
2706
|
-
if (!_fs3.existsSync.call(void 0, packageJsonPath)) {
|
|
2707
|
-
throw new Error("Cannot find package.json configuration");
|
|
2708
|
-
}
|
|
2709
|
-
const packageJsonFile = await _promises2.default.readFile(_chunkVPTKC3UKcjs.joinPaths.call(void 0, context.workspaceConfig.workspaceRoot, context.options.projectRoot, "package.json"), "utf8");
|
|
2710
|
-
let packageJson = JSON.parse(packageJsonFile);
|
|
2711
|
-
if (!packageJson) {
|
|
2712
|
-
throw new Error("Cannot find package.json configuration file");
|
|
2713
|
-
}
|
|
2714
|
-
packageJson = await _chunkTDBBRZTCcjs.addPackageDependencies.call(void 0, context.workspaceConfig.workspaceRoot, context.options.projectRoot, context.projectName, packageJson);
|
|
2715
|
-
packageJson = await _chunkTDBBRZTCcjs.addWorkspacePackageJsonFields.call(void 0, context.workspaceConfig, context.options.projectRoot, context.sourceRoot, context.projectName, false, packageJson);
|
|
2716
|
-
if (context.options.entry) {
|
|
2717
|
-
packageJson.exports ??= {};
|
|
2718
|
-
packageJson.exports["./package.json"] ??= "./package.json";
|
|
2719
|
-
const entryPoints = Array.isArray(context.options.entry) ? context.options.entry : Object.keys(context.options.entry);
|
|
2720
|
-
if (entryPoints.length > 0) {
|
|
2721
|
-
const defaultEntry = entryPoints.includes("index") ? `.${context.options.distDir ? `/${context.options.distDir}` : ""}/index` : `.${context.options.distDir ? `/${context.options.distDir}` : ""}/${entryPoints[0]}`;
|
|
2722
|
-
const isEsm = Array.isArray(context.options.format) ? context.options.format.includes("esm") : context.options.format === "esm";
|
|
2723
|
-
const isCjs = Array.isArray(context.options.format) ? context.options.format.includes("cjs") : context.options.format === "cjs";
|
|
2724
|
-
const isDts = context.options.dts || context.options.experimentalDts;
|
|
2725
|
-
packageJson.exports["."] ??= `${defaultEntry}.${isEsm ? "mjs" : isCjs ? "cjs" : "js"}`;
|
|
2726
|
-
for (const entryPoint of entryPoints) {
|
|
2727
|
-
packageJson.exports[`./${entryPoint}`] ??= {};
|
|
2728
|
-
if (isEsm) {
|
|
2729
|
-
if (isDts) {
|
|
2730
|
-
packageJson.exports[`./${entryPoint}`].import = {
|
|
2731
|
-
types: `./dist/${entryPoint}.d.mts`,
|
|
2732
|
-
default: `./dist/${entryPoint}.mjs`
|
|
2733
|
-
};
|
|
2734
|
-
} else {
|
|
2735
|
-
packageJson.exports[`./${entryPoint}`].import = `./dist/${entryPoint}.mjs`;
|
|
2736
|
-
}
|
|
2737
|
-
if (isDts) {
|
|
2738
|
-
packageJson.exports[`./${entryPoint}`].default = {
|
|
2739
|
-
types: `./dist/${entryPoint}.d.mts`,
|
|
2740
|
-
default: `./dist/${entryPoint}.mjs`
|
|
2741
|
-
};
|
|
2742
|
-
} else {
|
|
2743
|
-
packageJson.exports[`./${entryPoint}`].default = `./dist/${entryPoint}.mjs`;
|
|
2744
|
-
}
|
|
2745
|
-
}
|
|
2746
|
-
if (isCjs) {
|
|
2747
|
-
if (isDts) {
|
|
2748
|
-
packageJson.exports[`./${entryPoint}`].require = {
|
|
2749
|
-
types: `./dist/${entryPoint}.d.cts`,
|
|
2750
|
-
default: `./dist/${entryPoint}.cjs`
|
|
2751
|
-
};
|
|
2752
|
-
} else {
|
|
2753
|
-
packageJson.exports[`./${entryPoint}`].require = `./dist/${entryPoint}.cjs`;
|
|
2754
|
-
}
|
|
2755
|
-
if (!isEsm) {
|
|
2756
|
-
if (isDts) {
|
|
2757
|
-
packageJson.exports[`./${entryPoint}`].default = {
|
|
2758
|
-
types: `./dist/${entryPoint}.d.cts`,
|
|
2759
|
-
default: `./dist/${entryPoint}.cjs`
|
|
2760
|
-
};
|
|
2761
|
-
} else {
|
|
2762
|
-
packageJson.exports[`./${entryPoint}`].default = `./dist/${entryPoint}.cjs`;
|
|
2763
|
-
}
|
|
2764
|
-
}
|
|
2765
|
-
}
|
|
2766
|
-
if (!isEsm && !isCjs) {
|
|
2767
|
-
if (isDts) {
|
|
2768
|
-
packageJson.exports[`./${entryPoint}`].default = {
|
|
2769
|
-
types: `./dist/${entryPoint}.d.ts`,
|
|
2770
|
-
default: `./dist/${entryPoint}.js`
|
|
2771
|
-
};
|
|
2772
|
-
} else {
|
|
2773
|
-
packageJson.exports[`./${entryPoint}`].default = `./dist/${entryPoint}.js`;
|
|
2774
|
-
}
|
|
2775
|
-
}
|
|
2776
|
-
}
|
|
2777
|
-
if (isEsm) {
|
|
2778
|
-
packageJson.module = `${defaultEntry}.mjs`;
|
|
2779
|
-
} else {
|
|
2780
|
-
packageJson.main = `${defaultEntry}.cjs`;
|
|
2781
|
-
}
|
|
2782
|
-
if (isDts) {
|
|
2783
|
-
packageJson.types = `${defaultEntry}.d.${isEsm ? "mts" : isCjs ? "cts" : "ts"}`;
|
|
2784
|
-
}
|
|
2785
|
-
packageJson.exports = Object.keys(packageJson.exports).reduce((ret, key) => {
|
|
2786
|
-
if (key.endsWith("/index") && !ret[key.replace("/index", "")]) {
|
|
2787
|
-
ret[key.replace("/index", "")] = packageJson.exports[key];
|
|
2788
|
-
}
|
|
2789
|
-
return ret;
|
|
2790
|
-
}, packageJson.exports);
|
|
2791
|
-
}
|
|
2792
|
-
}
|
|
2793
|
-
await _devkit.writeJsonFile.call(void 0, _chunkVPTKC3UKcjs.joinPaths.call(void 0, context.outputPath, "package.json"), packageJson);
|
|
2794
|
-
stopwatch();
|
|
2795
|
-
}
|
|
2796
|
-
return context;
|
|
2797
|
-
}
|
|
2798
|
-
_chunkB4CUDMY2cjs.__name.call(void 0, generatePackageJson, "generatePackageJson");
|
|
2528
|
+
// src/tsup.ts
|
|
2529
|
+
var import_tsup = _chunkYHMM6RY5cjs.__toESM.call(void 0, require_dist(), 1);
|
|
2799
2530
|
async function executeTsup(context) {
|
|
2800
|
-
|
|
2801
|
-
const stopwatch =
|
|
2531
|
+
_chunkEVDNG72Rcjs.writeDebug.call(void 0, ` \u{1F680} Running ${context.options.name} build`, context.workspaceConfig);
|
|
2532
|
+
const stopwatch = _chunkEVDNG72Rcjs.getStopwatch.call(void 0, `${context.options.name} build`);
|
|
2802
2533
|
await (0, import_tsup.build)({
|
|
2803
2534
|
...context.options,
|
|
2804
|
-
outDir: context.options.distDir ?
|
|
2535
|
+
outDir: context.options.distDir ? _chunkYHMM6RY5cjs.joinPaths.call(void 0, context.outputPath, context.options.distDir) : context.outputPath,
|
|
2805
2536
|
workspaceConfig: context.workspaceConfig
|
|
2806
2537
|
});
|
|
2807
2538
|
stopwatch();
|
|
2808
2539
|
return context;
|
|
2809
2540
|
}
|
|
2810
|
-
|
|
2811
|
-
async function copyBuildAssets(context) {
|
|
2812
|
-
if (_optionalChain2([context, 'access', _84 => _84.result, 'optionalAccess', _85 => _85.errors, 'access', _86 => _86.length]) === 0) {
|
|
2813
|
-
_chunkGJHRTQAScjs.writeDebug.call(void 0, ` \u{1F4CB} Copying asset files to output directory: ${context.outputPath}`, context.workspaceConfig);
|
|
2814
|
-
const stopwatch = _chunkGJHRTQAScjs.getStopwatch.call(void 0, `${context.options.name} asset copy`);
|
|
2815
|
-
await _chunkTDBBRZTCcjs.copyAssets.call(void 0, context.workspaceConfig, _nullishCoalesce2(context.options.assets, () => ( [])), context.outputPath, context.options.projectRoot, context.sourceRoot, true, false);
|
|
2816
|
-
stopwatch();
|
|
2817
|
-
}
|
|
2818
|
-
return context;
|
|
2819
|
-
}
|
|
2820
|
-
_chunkB4CUDMY2cjs.__name.call(void 0, copyBuildAssets, "copyBuildAssets");
|
|
2821
|
-
async function reportResults(context) {
|
|
2822
|
-
if (_optionalChain2([context, 'access', _87 => _87.result, 'optionalAccess', _88 => _88.errors, 'access', _89 => _89.length]) === 0) {
|
|
2823
|
-
if (context.result.warnings.length > 0) {
|
|
2824
|
-
_chunkGJHRTQAScjs.writeWarning.call(void 0, ` \u{1F6A7} The following warnings occurred during the build: ${context.result.warnings.map((warning) => warning.text).join("\n")}`, context.workspaceConfig);
|
|
2825
|
-
}
|
|
2826
|
-
_chunkGJHRTQAScjs.writeSuccess.call(void 0, ` \u{1F4E6} The ${context.options.name} build completed successfully`, context.workspaceConfig);
|
|
2827
|
-
} else if (_optionalChain2([context, 'access', _90 => _90.result, 'optionalAccess', _91 => _91.errors]) && _optionalChain2([context, 'access', _92 => _92.result, 'optionalAccess', _93 => _93.errors, 'access', _94 => _94.length]) > 0) {
|
|
2828
|
-
_chunkGJHRTQAScjs.writeError.call(void 0, ` \u274C The ${context.options.name} build failed with the following errors: ${context.result.errors.map((error) => error.text).join("\n")}`, context.workspaceConfig);
|
|
2829
|
-
throw new Error(`The ${context.options.name} build failed with the following errors: ${context.result.errors.map((error) => error.text).join("\n")}`);
|
|
2830
|
-
}
|
|
2831
|
-
}
|
|
2832
|
-
_chunkB4CUDMY2cjs.__name.call(void 0, reportResults, "reportResults");
|
|
2833
|
-
async function dependencyCheck(options2) {
|
|
2834
|
-
if (process.env.DEV === "true") {
|
|
2835
|
-
return void 0;
|
|
2836
|
-
}
|
|
2837
|
-
if (process.env.CI && !process.env.BUILDKITE) {
|
|
2838
|
-
return void 0;
|
|
2839
|
-
}
|
|
2840
|
-
const buildPromise = esbuild.build({
|
|
2841
|
-
entryPoints: _globby.globbySync.call(void 0, "**/*.{j,t}s", {
|
|
2842
|
-
// We don't check dependencies in ecosystem tests because tests are isolated from the build.
|
|
2843
|
-
ignore: [
|
|
2844
|
-
"./src/__tests__/**/*",
|
|
2845
|
-
"./tests/e2e/**/*",
|
|
2846
|
-
"./dist/**/*"
|
|
2847
|
-
],
|
|
2848
|
-
gitignore: true
|
|
2849
|
-
}),
|
|
2850
|
-
logLevel: "silent",
|
|
2851
|
-
bundle: true,
|
|
2852
|
-
write: false,
|
|
2853
|
-
outdir: "out",
|
|
2854
|
-
plugins: [
|
|
2855
|
-
_chunkBNPCRQK4cjs.depsCheckPlugin.call(void 0, options2.bundle)
|
|
2856
|
-
]
|
|
2857
|
-
});
|
|
2858
|
-
await buildPromise.catch(() => {
|
|
2859
|
-
});
|
|
2860
|
-
return void 0;
|
|
2861
|
-
}
|
|
2862
|
-
_chunkB4CUDMY2cjs.__name.call(void 0, dependencyCheck, "dependencyCheck");
|
|
2863
|
-
async function cleanOutputPath(context) {
|
|
2864
|
-
if (context.clean !== false && context.outputPath) {
|
|
2865
|
-
_chunkGJHRTQAScjs.writeDebug.call(void 0, ` \u{1F9F9} Cleaning ${context.options.name} output path: ${context.outputPath}`, context.workspaceConfig);
|
|
2866
|
-
const stopwatch = _chunkGJHRTQAScjs.getStopwatch.call(void 0, `${context.options.name} output clean`);
|
|
2867
|
-
await _chunkTH2QFJHIcjs.cleanDirectories.call(void 0, context.outputPath);
|
|
2868
|
-
stopwatch();
|
|
2869
|
-
}
|
|
2870
|
-
return context;
|
|
2871
|
-
}
|
|
2872
|
-
_chunkB4CUDMY2cjs.__name.call(void 0, cleanOutputPath, "cleanOutputPath");
|
|
2873
|
-
async function build2(options2) {
|
|
2874
|
-
_chunkGJHRTQAScjs.writeDebug.call(void 0, ` \u26A1 Executing Storm ESBuild pipeline`);
|
|
2875
|
-
const stopwatch = _chunkGJHRTQAScjs.getStopwatch.call(void 0, "ESBuild pipeline");
|
|
2876
|
-
try {
|
|
2877
|
-
const opts = Array.isArray(options2) ? options2 : [
|
|
2878
|
-
options2
|
|
2879
|
-
];
|
|
2880
|
-
if (opts.length === 0) {
|
|
2881
|
-
throw new Error("No build options were provided");
|
|
2882
|
-
}
|
|
2883
|
-
const context = await resolveContext(options2);
|
|
2884
|
-
await cleanOutputPath(context);
|
|
2885
|
-
await Promise.all([
|
|
2886
|
-
dependencyCheck(context.options),
|
|
2887
|
-
generatePackageJson(context),
|
|
2888
|
-
copyBuildAssets(context),
|
|
2889
|
-
executeTsup(context)
|
|
2890
|
-
]);
|
|
2891
|
-
await reportResults(context);
|
|
2892
|
-
_chunkGJHRTQAScjs.writeSuccess.call(void 0, " \u{1F3C1} ESBuild pipeline build completed successfully");
|
|
2893
|
-
} catch (error) {
|
|
2894
|
-
_chunkGJHRTQAScjs.writeFatal.call(void 0, "Fatal errors that the build process could not recover from have occured. The build process has been terminated.");
|
|
2895
|
-
throw error;
|
|
2896
|
-
} finally {
|
|
2897
|
-
stopwatch();
|
|
2898
|
-
}
|
|
2899
|
-
}
|
|
2900
|
-
_chunkB4CUDMY2cjs.__name.call(void 0, build2, "build");
|
|
2901
|
-
var watch = /* @__PURE__ */ _chunkB4CUDMY2cjs.__name.call(void 0, (context, options2) => {
|
|
2902
|
-
if (!options2.watch) {
|
|
2903
|
-
return context;
|
|
2904
|
-
}
|
|
2905
|
-
const config = {
|
|
2906
|
-
ignoreInitial: true,
|
|
2907
|
-
useFsEvents: true,
|
|
2908
|
-
ignored: [
|
|
2909
|
-
"./src/__tests__/**/*",
|
|
2910
|
-
"./package.json"
|
|
2911
|
-
]
|
|
2912
|
-
};
|
|
2913
|
-
const changeWatcher = _chokidar.watch.call(void 0, [
|
|
2914
|
-
"./src/**/*"
|
|
2915
|
-
], config);
|
|
2916
|
-
const fastRebuild = _estoolkit.debounce.call(void 0, async () => {
|
|
2917
|
-
const timeBefore = Date.now();
|
|
2918
|
-
const rebuildResult = await handle.async(() => {
|
|
2919
|
-
return context.rebuild();
|
|
2920
|
-
});
|
|
2921
|
-
if (rebuildResult instanceof Error) {
|
|
2922
|
-
_chunkGJHRTQAScjs.writeError.call(void 0, rebuildResult.message);
|
|
2923
|
-
}
|
|
2924
|
-
_chunkGJHRTQAScjs.writeTrace.call(void 0, `${Date.now() - timeBefore}ms [${_nullishCoalesce2(options2.name, () => ( ""))}]`);
|
|
2925
|
-
}, 10);
|
|
2926
|
-
changeWatcher.on("change", fastRebuild);
|
|
2927
|
-
return void 0;
|
|
2928
|
-
}, "watch");
|
|
2929
|
-
|
|
2930
|
-
|
|
2931
|
-
|
|
2932
|
-
|
|
2933
|
-
|
|
2934
|
-
|
|
2935
|
-
|
|
2541
|
+
_chunkYHMM6RY5cjs.__name.call(void 0, executeTsup, "executeTsup");
|
|
2936
2542
|
|
|
2937
2543
|
|
|
2938
2544
|
|
|
2939
|
-
exports.
|
|
2545
|
+
exports.executeTsup = executeTsup;
|