updates 16.7.2 → 16.7.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 +3 -1
- package/dist/index.d.ts +8 -6
- package/dist/index.js +88 -4212
- package/package.json +11 -13
- package/dist/index.d.ts.map +0 -1
package/dist/index.js
CHANGED
|
@@ -1,4065 +1,92 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
import ce from "path";
|
|
9
|
-
import Pi from "constants";
|
|
10
|
-
import oi from "stream";
|
|
11
|
-
import xi from "util";
|
|
12
|
-
import ji from "assert";
|
|
13
|
-
import Ci from "events";
|
|
14
|
-
import ai from "url";
|
|
15
|
-
import qi from "http";
|
|
16
|
-
import Fi from "os";
|
|
17
|
-
import { rootCertificates as Di } from "node:tls";
|
|
18
|
-
import { availableParallelism as Bi, cpus as ki } from "node:os";
|
|
19
|
-
var ke = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
|
|
20
|
-
function sr(e) {
|
|
21
|
-
return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
|
|
22
|
-
}
|
|
23
|
-
var Ge, wr;
|
|
24
|
-
function ci() {
|
|
25
|
-
if (wr) return Ge;
|
|
26
|
-
wr = 1;
|
|
27
|
-
function e(i, o) {
|
|
28
|
-
var a = i;
|
|
29
|
-
o.slice(0, -1).forEach(function(s) {
|
|
30
|
-
a = a[s] || {};
|
|
31
|
-
});
|
|
32
|
-
var n = o[o.length - 1];
|
|
33
|
-
return n in a;
|
|
34
|
-
}
|
|
35
|
-
function t(i) {
|
|
36
|
-
return typeof i == "number" || /^0x[0-9a-f]+$/i.test(i) ? !0 : /^[-+]?(?:\d+(?:\.\d*)?|\.\d+)(e[-+]?\d+)?$/.test(i);
|
|
37
|
-
}
|
|
38
|
-
function r(i, o) {
|
|
39
|
-
return o === "constructor" && typeof i[o] == "function" || o === "__proto__";
|
|
40
|
-
}
|
|
41
|
-
return Ge = function(i, o) {
|
|
42
|
-
o || (o = {});
|
|
43
|
-
var a = {
|
|
44
|
-
bools: {},
|
|
45
|
-
strings: {},
|
|
46
|
-
unknownFn: null
|
|
47
|
-
};
|
|
48
|
-
typeof o.unknown == "function" && (a.unknownFn = o.unknown), typeof o.boolean == "boolean" && o.boolean ? a.allBools = !0 : [].concat(o.boolean).filter(Boolean).forEach(function(_) {
|
|
49
|
-
a.bools[_] = !0;
|
|
50
|
-
});
|
|
51
|
-
var n = {};
|
|
52
|
-
function s(_) {
|
|
53
|
-
return n[_].some(function(b) {
|
|
54
|
-
return a.bools[b];
|
|
55
|
-
});
|
|
56
|
-
}
|
|
57
|
-
Object.keys(o.alias || {}).forEach(function(_) {
|
|
58
|
-
n[_] = [].concat(o.alias[_]), n[_].forEach(function(b) {
|
|
59
|
-
n[b] = [_].concat(n[_].filter(function(G) {
|
|
60
|
-
return b !== G;
|
|
61
|
-
}));
|
|
62
|
-
});
|
|
63
|
-
}), [].concat(o.string).filter(Boolean).forEach(function(_) {
|
|
64
|
-
a.strings[_] = !0, n[_] && [].concat(n[_]).forEach(function(b) {
|
|
65
|
-
a.strings[b] = !0;
|
|
66
|
-
});
|
|
67
|
-
});
|
|
68
|
-
var u = o.default || {}, l = { _: [] };
|
|
69
|
-
function c(_, b) {
|
|
70
|
-
return a.allBools && /^--[^=]+$/.test(b) || a.strings[_] || a.bools[_] || n[_];
|
|
71
|
-
}
|
|
72
|
-
function m(_, b, G) {
|
|
73
|
-
for (var x = _, te = 0; te < b.length - 1; te++) {
|
|
74
|
-
var V = b[te];
|
|
75
|
-
if (r(x, V))
|
|
76
|
-
return;
|
|
77
|
-
x[V] === void 0 && (x[V] = {}), (x[V] === Object.prototype || x[V] === Number.prototype || x[V] === String.prototype) && (x[V] = {}), x[V] === Array.prototype && (x[V] = []), x = x[V];
|
|
78
|
-
}
|
|
79
|
-
var X = b[b.length - 1];
|
|
80
|
-
r(x, X) || ((x === Object.prototype || x === Number.prototype || x === String.prototype) && (x = {}), x === Array.prototype && (x = []), x[X] === void 0 || a.bools[X] || typeof x[X] == "boolean" ? x[X] = G : Array.isArray(x[X]) ? x[X].push(G) : x[X] = [x[X], G]);
|
|
81
|
-
}
|
|
82
|
-
function p(_, b, G) {
|
|
83
|
-
if (!(G && a.unknownFn && !c(_, G) && a.unknownFn(G) === !1)) {
|
|
84
|
-
var x = !a.strings[_] && t(b) ? Number(b) : b;
|
|
85
|
-
m(l, _.split("."), x), (n[_] || []).forEach(function(te) {
|
|
86
|
-
m(l, te.split("."), x);
|
|
87
|
-
});
|
|
88
|
-
}
|
|
89
|
-
}
|
|
90
|
-
Object.keys(a.bools).forEach(function(_) {
|
|
91
|
-
p(_, u[_] === void 0 ? !1 : u[_]);
|
|
92
|
-
});
|
|
93
|
-
var h = [];
|
|
94
|
-
i.indexOf("--") !== -1 && (h = i.slice(i.indexOf("--") + 1), i = i.slice(0, i.indexOf("--")));
|
|
95
|
-
for (var g = 0; g < i.length; g++) {
|
|
96
|
-
var d = i[g], f, v;
|
|
97
|
-
if (/^--.+=/.test(d)) {
|
|
98
|
-
var E = d.match(/^--([^=]+)=([\s\S]*)$/);
|
|
99
|
-
f = E[1];
|
|
100
|
-
var y = E[2];
|
|
101
|
-
a.bools[f] && (y = y !== "false"), p(f, y, d);
|
|
102
|
-
} else if (/^--no-.+/.test(d))
|
|
103
|
-
f = d.match(/^--no-(.+)/)[1], p(f, !1, d);
|
|
104
|
-
else if (/^--.+/.test(d))
|
|
105
|
-
f = d.match(/^--(.+)/)[1], v = i[g + 1], v !== void 0 && !/^(-|--)[^-]/.test(v) && !a.bools[f] && !a.allBools && (!n[f] || !s(f)) ? (p(f, v, d), g += 1) : /^(true|false)$/.test(v) ? (p(f, v === "true", d), g += 1) : p(f, a.strings[f] ? "" : !0, d);
|
|
106
|
-
else if (/^-[^-]+/.test(d)) {
|
|
107
|
-
for (var $ = d.slice(1, -1).split(""), L = !1, N = 0; N < $.length; N++) {
|
|
108
|
-
if (v = d.slice(N + 2), v === "-") {
|
|
109
|
-
p($[N], v, d);
|
|
110
|
-
continue;
|
|
111
|
-
}
|
|
112
|
-
if (/[A-Za-z]/.test($[N]) && v[0] === "=") {
|
|
113
|
-
p($[N], v.slice(1), d), L = !0;
|
|
114
|
-
break;
|
|
115
|
-
}
|
|
116
|
-
if (/[A-Za-z]/.test($[N]) && /-?\d+(\.\d*)?(e-?\d+)?$/.test(v)) {
|
|
117
|
-
p($[N], v, d), L = !0;
|
|
118
|
-
break;
|
|
119
|
-
}
|
|
120
|
-
if ($[N + 1] && $[N + 1].match(/\W/)) {
|
|
121
|
-
p($[N], d.slice(N + 2), d), L = !0;
|
|
122
|
-
break;
|
|
123
|
-
} else
|
|
124
|
-
p($[N], a.strings[$[N]] ? "" : !0, d);
|
|
125
|
-
}
|
|
126
|
-
f = d.slice(-1)[0], !L && f !== "-" && (i[g + 1] && !/^(-|--)[^-]/.test(i[g + 1]) && !a.bools[f] && (!n[f] || !s(f)) ? (p(f, i[g + 1], d), g += 1) : i[g + 1] && /^(true|false)$/.test(i[g + 1]) ? (p(f, i[g + 1] === "true", d), g += 1) : p(f, a.strings[f] ? "" : !0, d));
|
|
127
|
-
} else if ((!a.unknownFn || a.unknownFn(d) !== !1) && l._.push(a.strings._ || !t(d) ? d : Number(d)), o.stopEarly) {
|
|
128
|
-
l._.push.apply(l._, i.slice(g + 1));
|
|
129
|
-
break;
|
|
130
|
-
}
|
|
131
|
-
}
|
|
132
|
-
return Object.keys(u).forEach(function(_) {
|
|
133
|
-
e(l, _.split(".")) || (m(l, _.split("."), u[_]), (n[_] || []).forEach(function(b) {
|
|
134
|
-
m(l, b.split("."), u[_]);
|
|
135
|
-
}));
|
|
136
|
-
}), o["--"] ? l["--"] = h.slice() : h.forEach(function(_) {
|
|
137
|
-
l._.push(_);
|
|
138
|
-
}), l;
|
|
139
|
-
}, Ge;
|
|
140
|
-
}
|
|
141
|
-
var Gi = ci();
|
|
142
|
-
const Ui = /* @__PURE__ */ sr(Gi);
|
|
143
|
-
class Mi extends Error {
|
|
144
|
-
constructor(t) {
|
|
145
|
-
super(), this.name = "AbortError", this.message = t;
|
|
146
|
-
}
|
|
147
|
-
}
|
|
148
|
-
const $r = (e) => globalThis.DOMException === void 0 ? new Mi(e) : new DOMException(e), Rr = (e) => {
|
|
149
|
-
const t = e.reason === void 0 ? $r("This operation was aborted.") : e.reason;
|
|
150
|
-
return t instanceof Error ? t : $r(t);
|
|
151
|
-
};
|
|
152
|
-
async function Vi(e, t, {
|
|
153
|
-
concurrency: r = Number.POSITIVE_INFINITY,
|
|
154
|
-
stopOnError: i = !0,
|
|
155
|
-
signal: o
|
|
156
|
-
} = {}) {
|
|
157
|
-
return new Promise((a, n) => {
|
|
158
|
-
if (e[Symbol.iterator] === void 0 && e[Symbol.asyncIterator] === void 0)
|
|
159
|
-
throw new TypeError(`Expected \`input\` to be either an \`Iterable\` or \`AsyncIterable\`, got (${typeof e})`);
|
|
160
|
-
if (typeof t != "function")
|
|
161
|
-
throw new TypeError("Mapper function is required");
|
|
162
|
-
if (!((Number.isSafeInteger(r) || r === Number.POSITIVE_INFINITY) && r >= 1))
|
|
163
|
-
throw new TypeError(`Expected \`concurrency\` to be an integer from 1 and up or \`Infinity\`, got \`${r}\` (${typeof r})`);
|
|
164
|
-
const s = [], u = [], l = /* @__PURE__ */ new Map();
|
|
165
|
-
let c = !1, m = !1, p = !1, h = 0, g = 0;
|
|
166
|
-
const d = e[Symbol.iterator] === void 0 ? e[Symbol.asyncIterator]() : e[Symbol.iterator](), f = (E) => {
|
|
167
|
-
c = !0, m = !0, n(E);
|
|
168
|
-
};
|
|
169
|
-
o && (o.aborted && f(Rr(o)), o.addEventListener("abort", () => {
|
|
170
|
-
f(Rr(o));
|
|
171
|
-
}));
|
|
172
|
-
const v = async () => {
|
|
173
|
-
if (m)
|
|
174
|
-
return;
|
|
175
|
-
const E = await d.next(), y = g;
|
|
176
|
-
if (g++, E.done) {
|
|
177
|
-
if (p = !0, h === 0 && !m) {
|
|
178
|
-
if (!i && u.length > 0) {
|
|
179
|
-
f(new AggregateError(u));
|
|
180
|
-
return;
|
|
181
|
-
}
|
|
182
|
-
if (m = !0, l.size === 0) {
|
|
183
|
-
a(s);
|
|
184
|
-
return;
|
|
185
|
-
}
|
|
186
|
-
const $ = [];
|
|
187
|
-
for (const [L, N] of s.entries())
|
|
188
|
-
l.get(L) !== Sr && $.push(N);
|
|
189
|
-
a($);
|
|
190
|
-
}
|
|
191
|
-
return;
|
|
192
|
-
}
|
|
193
|
-
h++, (async () => {
|
|
194
|
-
try {
|
|
195
|
-
const $ = await E.value;
|
|
196
|
-
if (m)
|
|
197
|
-
return;
|
|
198
|
-
const L = await t($, y);
|
|
199
|
-
L === Sr && l.set(y, L), s[y] = L, h--, await v();
|
|
200
|
-
} catch ($) {
|
|
201
|
-
if (i)
|
|
202
|
-
f($);
|
|
203
|
-
else {
|
|
204
|
-
u.push($), h--;
|
|
205
|
-
try {
|
|
206
|
-
await v();
|
|
207
|
-
} catch (L) {
|
|
208
|
-
f(L);
|
|
209
|
-
}
|
|
210
|
-
}
|
|
211
|
-
}
|
|
212
|
-
})();
|
|
213
|
-
};
|
|
214
|
-
(async () => {
|
|
215
|
-
for (let E = 0; E < r; E++) {
|
|
216
|
-
try {
|
|
217
|
-
await v();
|
|
218
|
-
} catch (y) {
|
|
219
|
-
f(y);
|
|
220
|
-
break;
|
|
221
|
-
}
|
|
222
|
-
if (p || c)
|
|
223
|
-
break;
|
|
224
|
-
}
|
|
225
|
-
})();
|
|
226
|
-
});
|
|
227
|
-
}
|
|
228
|
-
const Sr = Symbol("skip");
|
|
229
|
-
async function Or(e, t) {
|
|
230
|
-
return Vi(e, (r) => r(), t);
|
|
231
|
-
}
|
|
232
|
-
const Xi = "16.7.2", Wi = {
|
|
233
|
-
version: Xi
|
|
234
|
-
};
|
|
235
|
-
var ue = {}, oe = {}, br;
|
|
236
|
-
function li() {
|
|
237
|
-
if (br) return oe;
|
|
238
|
-
br = 1, oe.parse = oe.decode = i, oe.stringify = oe.encode = t, oe.safe = a, oe.unsafe = n;
|
|
239
|
-
var e = typeof process < "u" && process.platform === "win32" ? `\r
|
|
240
|
-
` : `
|
|
241
|
-
`;
|
|
242
|
-
function t(s, u) {
|
|
243
|
-
var l = [], c = "";
|
|
244
|
-
typeof u == "string" ? u = {
|
|
245
|
-
section: u,
|
|
246
|
-
whitespace: !1
|
|
247
|
-
} : (u = u || {}, u.whitespace = u.whitespace === !0);
|
|
248
|
-
var m = u.whitespace ? " = " : "=";
|
|
249
|
-
return Object.keys(s).forEach(function(p, h, g) {
|
|
250
|
-
var d = s[p];
|
|
251
|
-
d && Array.isArray(d) ? d.forEach(function(f) {
|
|
252
|
-
c += a(p + "[]") + m + a(f) + `
|
|
253
|
-
`;
|
|
254
|
-
}) : d && typeof d == "object" ? l.push(p) : c += a(p) + m + a(d) + e;
|
|
255
|
-
}), u.section && c.length && (c = "[" + a(u.section) + "]" + e + c), l.forEach(function(p, h, g) {
|
|
256
|
-
var d = r(p).join("\\."), f = (u.section ? u.section + "." : "") + d, v = t(s[p], {
|
|
257
|
-
section: f,
|
|
258
|
-
whitespace: u.whitespace
|
|
259
|
-
});
|
|
260
|
-
c.length && v.length && (c += e), c += v;
|
|
261
|
-
}), c;
|
|
262
|
-
}
|
|
263
|
-
function r(s) {
|
|
264
|
-
return s.replace(/\1/g, "LITERAL\\1LITERAL").replace(/\\\./g, "").split(/\./).map(function(u) {
|
|
265
|
-
return u.replace(/\1/g, "\\.").replace(/\2LITERAL\\1LITERAL\2/g, "");
|
|
266
|
-
});
|
|
267
|
-
}
|
|
268
|
-
function i(s) {
|
|
269
|
-
var u = {}, l = u, c = null, m = /^\[([^\]]*)\]$|^([^=]+)(=(.*))?$/i, p = s.split(/[\r\n]+/g);
|
|
270
|
-
return p.forEach(function(h, g, d) {
|
|
271
|
-
if (!(!h || h.match(/^\s*[;#]/))) {
|
|
272
|
-
var f = h.match(m);
|
|
273
|
-
if (f) {
|
|
274
|
-
if (f[1] !== void 0) {
|
|
275
|
-
if (c = n(f[1]), c === "__proto__") {
|
|
276
|
-
l = {};
|
|
277
|
-
return;
|
|
278
|
-
}
|
|
279
|
-
l = u[c] = u[c] || {};
|
|
280
|
-
return;
|
|
281
|
-
}
|
|
282
|
-
var v = n(f[2]);
|
|
283
|
-
if (v !== "__proto__") {
|
|
284
|
-
var E = f[3] ? n(f[4]) : !0;
|
|
285
|
-
switch (E) {
|
|
286
|
-
case "true":
|
|
287
|
-
case "false":
|
|
288
|
-
case "null":
|
|
289
|
-
E = JSON.parse(E);
|
|
290
|
-
}
|
|
291
|
-
if (v.length > 2 && v.slice(-2) === "[]") {
|
|
292
|
-
if (v = v.substring(0, v.length - 2), v === "__proto__")
|
|
293
|
-
return;
|
|
294
|
-
l[v] ? Array.isArray(l[v]) || (l[v] = [l[v]]) : l[v] = [];
|
|
295
|
-
}
|
|
296
|
-
Array.isArray(l[v]) ? l[v].push(E) : l[v] = E;
|
|
297
|
-
}
|
|
298
|
-
}
|
|
299
|
-
}
|
|
300
|
-
}), Object.keys(u).filter(function(h, g, d) {
|
|
301
|
-
if (!u[h] || typeof u[h] != "object" || Array.isArray(u[h]))
|
|
302
|
-
return !1;
|
|
303
|
-
var f = r(h), v = u, E = f.pop(), y = E.replace(/\\\./g, ".");
|
|
304
|
-
return f.forEach(function($, L, N) {
|
|
305
|
-
$ !== "__proto__" && ((!v[$] || typeof v[$] != "object") && (v[$] = {}), v = v[$]);
|
|
306
|
-
}), v === u && y === E ? !1 : (v[y] = u[h], !0);
|
|
307
|
-
}).forEach(function(h, g, d) {
|
|
308
|
-
delete u[h];
|
|
309
|
-
}), u;
|
|
310
|
-
}
|
|
311
|
-
function o(s) {
|
|
312
|
-
return s.charAt(0) === '"' && s.slice(-1) === '"' || s.charAt(0) === "'" && s.slice(-1) === "'";
|
|
313
|
-
}
|
|
314
|
-
function a(s) {
|
|
315
|
-
return typeof s != "string" || s.match(/[=\r\n]/) || s.match(/^\[/) || s.length > 1 && o(s) || s !== s.trim() ? JSON.stringify(s) : s.replace(/;/g, "\\;").replace(/#/g, "\\#");
|
|
316
|
-
}
|
|
317
|
-
function n(s, u) {
|
|
318
|
-
if (s = (s || "").trim(), o(s)) {
|
|
319
|
-
s.charAt(0) === "'" && (s = s.substr(1, s.length - 2));
|
|
320
|
-
try {
|
|
321
|
-
s = JSON.parse(s);
|
|
322
|
-
} catch {
|
|
323
|
-
}
|
|
324
|
-
} else {
|
|
325
|
-
for (var l = !1, c = "", m = 0, p = s.length; m < p; m++) {
|
|
326
|
-
var h = s.charAt(m);
|
|
327
|
-
if (l)
|
|
328
|
-
"\\;#".indexOf(h) !== -1 ? c += h : c += "\\" + h, l = !1;
|
|
329
|
-
else {
|
|
330
|
-
if (";#".indexOf(h) !== -1)
|
|
331
|
-
break;
|
|
332
|
-
h === "\\" ? l = !0 : c += h;
|
|
333
|
-
}
|
|
334
|
-
}
|
|
335
|
-
return l && (c += "\\"), c.trim();
|
|
336
|
-
}
|
|
337
|
-
return s;
|
|
338
|
-
}
|
|
339
|
-
return oe;
|
|
340
|
-
}
|
|
341
|
-
var Ue, Ir;
|
|
342
|
-
function Hi() {
|
|
343
|
-
if (Ir) return Ue;
|
|
344
|
-
Ir = 1;
|
|
345
|
-
var e = 1, t = 2;
|
|
346
|
-
function r() {
|
|
347
|
-
return "";
|
|
348
|
-
}
|
|
349
|
-
function i(o, a, n) {
|
|
350
|
-
return o.slice(a, n).replace(/\S/g, " ");
|
|
351
|
-
}
|
|
352
|
-
return Ue = function(o, a) {
|
|
353
|
-
a = a || {};
|
|
354
|
-
for (var n, s, u = !1, l = !1, c = 0, m = "", p = a.whitespace === !1 ? r : i, h = 0; h < o.length; h++) {
|
|
355
|
-
if (n = o[h], s = o[h + 1], !l && n === '"') {
|
|
356
|
-
var g = o[h - 1] === "\\" && o[h - 2] !== "\\";
|
|
357
|
-
g || (u = !u);
|
|
358
|
-
}
|
|
359
|
-
if (!u) {
|
|
360
|
-
if (!l && n + s === "//")
|
|
361
|
-
m += o.slice(c, h), c = h, l = e, h++;
|
|
362
|
-
else if (l === e && n + s === `\r
|
|
363
|
-
`) {
|
|
364
|
-
h++, l = !1, m += p(o, c, h), c = h;
|
|
365
|
-
continue;
|
|
366
|
-
} else if (l === e && n === `
|
|
367
|
-
`)
|
|
368
|
-
l = !1, m += p(o, c, h), c = h;
|
|
369
|
-
else if (!l && n + s === "/*") {
|
|
370
|
-
m += o.slice(c, h), c = h, l = t, h++;
|
|
371
|
-
continue;
|
|
372
|
-
} else if (l === t && n + s === "*/") {
|
|
373
|
-
h++, l = !1, m += p(o, c, h + 1), c = h + 1;
|
|
374
|
-
continue;
|
|
375
|
-
}
|
|
376
|
-
}
|
|
377
|
-
}
|
|
378
|
-
return m + (l ? p(o.substr(c)) : o.substr(c));
|
|
379
|
-
}, Ue;
|
|
380
|
-
}
|
|
381
|
-
var _r;
|
|
382
|
-
function zi() {
|
|
383
|
-
if (_r) return ue;
|
|
384
|
-
_r = 1;
|
|
385
|
-
var e = Se, t = li(), r = ce, i = Hi(), o = ue.parse = function(n) {
|
|
386
|
-
return /^\s*{/.test(n) ? JSON.parse(i(n)) : t.parse(n);
|
|
387
|
-
}, a = ue.file = function() {
|
|
388
|
-
var n = [].slice.call(arguments).filter(function(l) {
|
|
389
|
-
return l != null;
|
|
390
|
-
});
|
|
391
|
-
for (var s in n)
|
|
392
|
-
if (typeof n[s] != "string")
|
|
393
|
-
return;
|
|
394
|
-
var u = r.join.apply(null, n);
|
|
395
|
-
try {
|
|
396
|
-
return e.readFileSync(u, "utf-8");
|
|
397
|
-
} catch {
|
|
398
|
-
return;
|
|
399
|
-
}
|
|
400
|
-
};
|
|
401
|
-
return ue.json = function() {
|
|
402
|
-
var n = a.apply(null, arguments);
|
|
403
|
-
return n ? o(n) : null;
|
|
404
|
-
}, ue.env = function(n, s) {
|
|
405
|
-
s = s || process.env;
|
|
406
|
-
var u = {}, l = n.length;
|
|
407
|
-
for (var c in s)
|
|
408
|
-
if (c.toLowerCase().indexOf(n.toLowerCase()) === 0) {
|
|
409
|
-
for (var m = c.substring(l).split("__"), p; (p = m.indexOf("")) > -1; )
|
|
410
|
-
m.splice(p, 1);
|
|
411
|
-
var h = u;
|
|
412
|
-
m.forEach(function(d, f) {
|
|
413
|
-
!d || typeof h != "object" || (f === m.length - 1 && (h[d] = s[c]), h[d] === void 0 && (h[d] = {}), h = h[d]);
|
|
414
|
-
});
|
|
415
|
-
}
|
|
416
|
-
return u;
|
|
417
|
-
}, ue.find = function() {
|
|
418
|
-
var n = r.join.apply(null, [].slice.call(arguments));
|
|
419
|
-
function s(u, l) {
|
|
420
|
-
var c = r.join(u, l);
|
|
421
|
-
try {
|
|
422
|
-
return e.statSync(c), c;
|
|
423
|
-
} catch {
|
|
424
|
-
if (r.dirname(u) !== u)
|
|
425
|
-
return s(r.dirname(u), l);
|
|
426
|
-
}
|
|
427
|
-
}
|
|
428
|
-
return s(process.cwd(), n);
|
|
429
|
-
}, ue;
|
|
430
|
-
}
|
|
431
|
-
var Me = { exports: {} };
|
|
432
|
-
var Nr;
|
|
433
|
-
function Ki() {
|
|
434
|
-
if (Nr) return Me.exports;
|
|
435
|
-
Nr = 1;
|
|
436
|
-
function e(a) {
|
|
437
|
-
return a instanceof Buffer || a instanceof Date || a instanceof RegExp;
|
|
438
|
-
}
|
|
439
|
-
function t(a) {
|
|
440
|
-
if (a instanceof Buffer) {
|
|
441
|
-
var n = Buffer.alloc ? Buffer.alloc(a.length) : new Buffer(a.length);
|
|
442
|
-
return a.copy(n), n;
|
|
443
|
-
} else {
|
|
444
|
-
if (a instanceof Date)
|
|
445
|
-
return new Date(a.getTime());
|
|
446
|
-
if (a instanceof RegExp)
|
|
447
|
-
return new RegExp(a);
|
|
448
|
-
throw new Error("Unexpected situation");
|
|
449
|
-
}
|
|
450
|
-
}
|
|
451
|
-
function r(a) {
|
|
452
|
-
var n = [];
|
|
453
|
-
return a.forEach(function(s, u) {
|
|
454
|
-
typeof s == "object" && s !== null ? Array.isArray(s) ? n[u] = r(s) : e(s) ? n[u] = t(s) : n[u] = o({}, s) : n[u] = s;
|
|
455
|
-
}), n;
|
|
456
|
-
}
|
|
457
|
-
function i(a, n) {
|
|
458
|
-
return n === "__proto__" ? void 0 : a[n];
|
|
459
|
-
}
|
|
460
|
-
var o = Me.exports = function() {
|
|
461
|
-
if (arguments.length < 1 || typeof arguments[0] != "object")
|
|
462
|
-
return !1;
|
|
463
|
-
if (arguments.length < 2)
|
|
464
|
-
return arguments[0];
|
|
465
|
-
var a = arguments[0], n = Array.prototype.slice.call(arguments, 1), s, u;
|
|
466
|
-
return n.forEach(function(l) {
|
|
467
|
-
typeof l != "object" || l === null || Array.isArray(l) || Object.keys(l).forEach(function(c) {
|
|
468
|
-
if (u = i(a, c), s = i(l, c), s !== a)
|
|
469
|
-
if (typeof s != "object" || s === null) {
|
|
470
|
-
a[c] = s;
|
|
471
|
-
return;
|
|
472
|
-
} else if (Array.isArray(s)) {
|
|
473
|
-
a[c] = r(s);
|
|
474
|
-
return;
|
|
475
|
-
} else if (e(s)) {
|
|
476
|
-
a[c] = t(s);
|
|
477
|
-
return;
|
|
478
|
-
} else if (typeof u != "object" || u === null || Array.isArray(u)) {
|
|
479
|
-
a[c] = o({}, s);
|
|
480
|
-
return;
|
|
481
|
-
} else {
|
|
482
|
-
a[c] = o(u, s);
|
|
483
|
-
return;
|
|
484
|
-
}
|
|
485
|
-
});
|
|
486
|
-
}), a;
|
|
487
|
-
};
|
|
488
|
-
return Me.exports;
|
|
489
|
-
}
|
|
490
|
-
var Ve, Ar;
|
|
491
|
-
function Yi() {
|
|
492
|
-
if (Ar) return Ve;
|
|
493
|
-
Ar = 1;
|
|
494
|
-
var e = zi(), t = ce.join, r = Ki(), i = "/etc", o = process.platform === "win32", a = o ? process.env.USERPROFILE : process.env.HOME;
|
|
495
|
-
return Ve = function(n, s, u, l) {
|
|
496
|
-
if (typeof n != "string")
|
|
497
|
-
throw new Error("rc(name): name *must* be string");
|
|
498
|
-
u || (u = ci()(process.argv.slice(2))), s = (typeof s == "string" ? e.json(s) : s) || {}, l = l || e.parse;
|
|
499
|
-
var c = e.env(n + "_"), m = [s], p = [];
|
|
500
|
-
function h(g) {
|
|
501
|
-
if (!(p.indexOf(g) >= 0)) {
|
|
502
|
-
var d = e.file(g);
|
|
503
|
-
d && (m.push(l(d)), p.push(g));
|
|
504
|
-
}
|
|
505
|
-
}
|
|
506
|
-
return o || [
|
|
507
|
-
t(i, n, "config"),
|
|
508
|
-
t(i, n + "rc")
|
|
509
|
-
].forEach(h), a && [
|
|
510
|
-
t(a, ".config", n, "config"),
|
|
511
|
-
t(a, ".config", n),
|
|
512
|
-
t(a, "." + n, "config"),
|
|
513
|
-
t(a, "." + n + "rc")
|
|
514
|
-
].forEach(h), h(e.find("." + n + "rc")), c.config && h(c.config), u.config && h(u.config), r.apply(null, m.concat([
|
|
515
|
-
c,
|
|
516
|
-
u,
|
|
517
|
-
p.length ? { configs: p, config: p[p.length - 1] } : void 0
|
|
518
|
-
]));
|
|
519
|
-
}, Ve;
|
|
520
|
-
}
|
|
521
|
-
var Ji = Yi();
|
|
522
|
-
const Zi = /* @__PURE__ */ sr(Ji);
|
|
523
|
-
var Xe = { exports: {} }, fe = {}, pe = {}, We, Tr;
|
|
524
|
-
function Qi() {
|
|
525
|
-
if (Tr) return We;
|
|
526
|
-
Tr = 1;
|
|
527
|
-
var e = Pi, t = process.cwd, r = null, i = process.env.GRACEFUL_FS_PLATFORM || process.platform;
|
|
528
|
-
process.cwd = function() {
|
|
529
|
-
return r || (r = t.call(process)), r;
|
|
530
|
-
};
|
|
531
|
-
try {
|
|
532
|
-
process.cwd();
|
|
533
|
-
} catch {
|
|
534
|
-
}
|
|
535
|
-
if (typeof process.chdir == "function") {
|
|
536
|
-
var o = process.chdir;
|
|
537
|
-
process.chdir = function(n) {
|
|
538
|
-
r = null, o.call(process, n);
|
|
539
|
-
}, Object.setPrototypeOf && Object.setPrototypeOf(process.chdir, o);
|
|
540
|
-
}
|
|
541
|
-
We = a;
|
|
542
|
-
function a(n) {
|
|
543
|
-
e.hasOwnProperty("O_SYMLINK") && process.version.match(/^v0\.6\.[0-2]|^v0\.5\./) && s(n), n.lutimes || u(n), n.chown = m(n.chown), n.fchown = m(n.fchown), n.lchown = m(n.lchown), n.chmod = l(n.chmod), n.fchmod = l(n.fchmod), n.lchmod = l(n.lchmod), n.chownSync = p(n.chownSync), n.fchownSync = p(n.fchownSync), n.lchownSync = p(n.lchownSync), n.chmodSync = c(n.chmodSync), n.fchmodSync = c(n.fchmodSync), n.lchmodSync = c(n.lchmodSync), n.stat = h(n.stat), n.fstat = h(n.fstat), n.lstat = h(n.lstat), n.statSync = g(n.statSync), n.fstatSync = g(n.fstatSync), n.lstatSync = g(n.lstatSync), n.chmod && !n.lchmod && (n.lchmod = function(f, v, E) {
|
|
544
|
-
E && process.nextTick(E);
|
|
545
|
-
}, n.lchmodSync = function() {
|
|
546
|
-
}), n.chown && !n.lchown && (n.lchown = function(f, v, E, y) {
|
|
547
|
-
y && process.nextTick(y);
|
|
548
|
-
}, n.lchownSync = function() {
|
|
549
|
-
}), i === "win32" && (n.rename = typeof n.rename != "function" ? n.rename : (function(f) {
|
|
550
|
-
function v(E, y, $) {
|
|
551
|
-
var L = Date.now(), N = 0;
|
|
552
|
-
f(E, y, function _(b) {
|
|
553
|
-
if (b && (b.code === "EACCES" || b.code === "EPERM") && Date.now() - L < 6e4) {
|
|
554
|
-
setTimeout(function() {
|
|
555
|
-
n.stat(y, function(G, x) {
|
|
556
|
-
G && G.code === "ENOENT" ? f(E, y, _) : $(b);
|
|
557
|
-
});
|
|
558
|
-
}, N), N < 100 && (N += 10);
|
|
559
|
-
return;
|
|
560
|
-
}
|
|
561
|
-
$ && $(b);
|
|
562
|
-
});
|
|
563
|
-
}
|
|
564
|
-
return Object.setPrototypeOf && Object.setPrototypeOf(v, f), v;
|
|
565
|
-
})(n.rename)), n.read = typeof n.read != "function" ? n.read : (function(f) {
|
|
566
|
-
function v(E, y, $, L, N, _) {
|
|
567
|
-
var b;
|
|
568
|
-
if (_ && typeof _ == "function") {
|
|
569
|
-
var G = 0;
|
|
570
|
-
b = function(x, te, V) {
|
|
571
|
-
if (x && x.code === "EAGAIN" && G < 10)
|
|
572
|
-
return G++, f.call(n, E, y, $, L, N, b);
|
|
573
|
-
_.apply(this, arguments);
|
|
574
|
-
};
|
|
575
|
-
}
|
|
576
|
-
return f.call(n, E, y, $, L, N, b);
|
|
577
|
-
}
|
|
578
|
-
return Object.setPrototypeOf && Object.setPrototypeOf(v, f), v;
|
|
579
|
-
})(n.read), n.readSync = typeof n.readSync != "function" ? n.readSync : /* @__PURE__ */ (function(f) {
|
|
580
|
-
return function(v, E, y, $, L) {
|
|
581
|
-
for (var N = 0; ; )
|
|
582
|
-
try {
|
|
583
|
-
return f.call(n, v, E, y, $, L);
|
|
584
|
-
} catch (_) {
|
|
585
|
-
if (_.code === "EAGAIN" && N < 10) {
|
|
586
|
-
N++;
|
|
587
|
-
continue;
|
|
588
|
-
}
|
|
589
|
-
throw _;
|
|
590
|
-
}
|
|
591
|
-
};
|
|
592
|
-
})(n.readSync);
|
|
593
|
-
function s(f) {
|
|
594
|
-
f.lchmod = function(v, E, y) {
|
|
595
|
-
f.open(
|
|
596
|
-
v,
|
|
597
|
-
e.O_WRONLY | e.O_SYMLINK,
|
|
598
|
-
E,
|
|
599
|
-
function($, L) {
|
|
600
|
-
if ($) {
|
|
601
|
-
y && y($);
|
|
602
|
-
return;
|
|
603
|
-
}
|
|
604
|
-
f.fchmod(L, E, function(N) {
|
|
605
|
-
f.close(L, function(_) {
|
|
606
|
-
y && y(N || _);
|
|
607
|
-
});
|
|
608
|
-
});
|
|
609
|
-
}
|
|
610
|
-
);
|
|
611
|
-
}, f.lchmodSync = function(v, E) {
|
|
612
|
-
var y = f.openSync(v, e.O_WRONLY | e.O_SYMLINK, E), $ = !0, L;
|
|
613
|
-
try {
|
|
614
|
-
L = f.fchmodSync(y, E), $ = !1;
|
|
615
|
-
} finally {
|
|
616
|
-
if ($)
|
|
617
|
-
try {
|
|
618
|
-
f.closeSync(y);
|
|
619
|
-
} catch {
|
|
620
|
-
}
|
|
621
|
-
else
|
|
622
|
-
f.closeSync(y);
|
|
623
|
-
}
|
|
624
|
-
return L;
|
|
625
|
-
};
|
|
626
|
-
}
|
|
627
|
-
function u(f) {
|
|
628
|
-
e.hasOwnProperty("O_SYMLINK") && f.futimes ? (f.lutimes = function(v, E, y, $) {
|
|
629
|
-
f.open(v, e.O_SYMLINK, function(L, N) {
|
|
630
|
-
if (L) {
|
|
631
|
-
$ && $(L);
|
|
632
|
-
return;
|
|
633
|
-
}
|
|
634
|
-
f.futimes(N, E, y, function(_) {
|
|
635
|
-
f.close(N, function(b) {
|
|
636
|
-
$ && $(_ || b);
|
|
637
|
-
});
|
|
638
|
-
});
|
|
639
|
-
});
|
|
640
|
-
}, f.lutimesSync = function(v, E, y) {
|
|
641
|
-
var $ = f.openSync(v, e.O_SYMLINK), L, N = !0;
|
|
642
|
-
try {
|
|
643
|
-
L = f.futimesSync($, E, y), N = !1;
|
|
644
|
-
} finally {
|
|
645
|
-
if (N)
|
|
646
|
-
try {
|
|
647
|
-
f.closeSync($);
|
|
648
|
-
} catch {
|
|
649
|
-
}
|
|
650
|
-
else
|
|
651
|
-
f.closeSync($);
|
|
652
|
-
}
|
|
653
|
-
return L;
|
|
654
|
-
}) : f.futimes && (f.lutimes = function(v, E, y, $) {
|
|
655
|
-
$ && process.nextTick($);
|
|
656
|
-
}, f.lutimesSync = function() {
|
|
657
|
-
});
|
|
658
|
-
}
|
|
659
|
-
function l(f) {
|
|
660
|
-
return f && function(v, E, y) {
|
|
661
|
-
return f.call(n, v, E, function($) {
|
|
662
|
-
d($) && ($ = null), y && y.apply(this, arguments);
|
|
663
|
-
});
|
|
664
|
-
};
|
|
665
|
-
}
|
|
666
|
-
function c(f) {
|
|
667
|
-
return f && function(v, E) {
|
|
668
|
-
try {
|
|
669
|
-
return f.call(n, v, E);
|
|
670
|
-
} catch (y) {
|
|
671
|
-
if (!d(y)) throw y;
|
|
672
|
-
}
|
|
673
|
-
};
|
|
674
|
-
}
|
|
675
|
-
function m(f) {
|
|
676
|
-
return f && function(v, E, y, $) {
|
|
677
|
-
return f.call(n, v, E, y, function(L) {
|
|
678
|
-
d(L) && (L = null), $ && $.apply(this, arguments);
|
|
679
|
-
});
|
|
680
|
-
};
|
|
681
|
-
}
|
|
682
|
-
function p(f) {
|
|
683
|
-
return f && function(v, E, y) {
|
|
684
|
-
try {
|
|
685
|
-
return f.call(n, v, E, y);
|
|
686
|
-
} catch ($) {
|
|
687
|
-
if (!d($)) throw $;
|
|
688
|
-
}
|
|
689
|
-
};
|
|
690
|
-
}
|
|
691
|
-
function h(f) {
|
|
692
|
-
return f && function(v, E, y) {
|
|
693
|
-
typeof E == "function" && (y = E, E = null);
|
|
694
|
-
function $(L, N) {
|
|
695
|
-
N && (N.uid < 0 && (N.uid += 4294967296), N.gid < 0 && (N.gid += 4294967296)), y && y.apply(this, arguments);
|
|
696
|
-
}
|
|
697
|
-
return E ? f.call(n, v, E, $) : f.call(n, v, $);
|
|
698
|
-
};
|
|
699
|
-
}
|
|
700
|
-
function g(f) {
|
|
701
|
-
return f && function(v, E) {
|
|
702
|
-
var y = E ? f.call(n, v, E) : f.call(n, v);
|
|
703
|
-
return y && (y.uid < 0 && (y.uid += 4294967296), y.gid < 0 && (y.gid += 4294967296)), y;
|
|
704
|
-
};
|
|
705
|
-
}
|
|
706
|
-
function d(f) {
|
|
707
|
-
if (!f || f.code === "ENOSYS")
|
|
708
|
-
return !0;
|
|
709
|
-
var v = !process.getuid || process.getuid() !== 0;
|
|
710
|
-
return !!(v && (f.code === "EINVAL" || f.code === "EPERM"));
|
|
711
|
-
}
|
|
712
|
-
}
|
|
713
|
-
return We;
|
|
714
|
-
}
|
|
715
|
-
var He, Lr;
|
|
716
|
-
function es() {
|
|
717
|
-
if (Lr) return He;
|
|
718
|
-
Lr = 1;
|
|
719
|
-
var e = oi.Stream;
|
|
720
|
-
He = t;
|
|
721
|
-
function t(r) {
|
|
722
|
-
return {
|
|
723
|
-
ReadStream: i,
|
|
724
|
-
WriteStream: o
|
|
725
|
-
};
|
|
726
|
-
function i(a, n) {
|
|
727
|
-
if (!(this instanceof i)) return new i(a, n);
|
|
728
|
-
e.call(this);
|
|
729
|
-
var s = this;
|
|
730
|
-
this.path = a, this.fd = null, this.readable = !0, this.paused = !1, this.flags = "r", this.mode = 438, this.bufferSize = 64 * 1024, n = n || {};
|
|
731
|
-
for (var u = Object.keys(n), l = 0, c = u.length; l < c; l++) {
|
|
732
|
-
var m = u[l];
|
|
733
|
-
this[m] = n[m];
|
|
734
|
-
}
|
|
735
|
-
if (this.encoding && this.setEncoding(this.encoding), this.start !== void 0) {
|
|
736
|
-
if (typeof this.start != "number")
|
|
737
|
-
throw TypeError("start must be a Number");
|
|
738
|
-
if (this.end === void 0)
|
|
739
|
-
this.end = 1 / 0;
|
|
740
|
-
else if (typeof this.end != "number")
|
|
741
|
-
throw TypeError("end must be a Number");
|
|
742
|
-
if (this.start > this.end)
|
|
743
|
-
throw new Error("start must be <= end");
|
|
744
|
-
this.pos = this.start;
|
|
745
|
-
}
|
|
746
|
-
if (this.fd !== null) {
|
|
747
|
-
process.nextTick(function() {
|
|
748
|
-
s._read();
|
|
749
|
-
});
|
|
750
|
-
return;
|
|
751
|
-
}
|
|
752
|
-
r.open(this.path, this.flags, this.mode, function(p, h) {
|
|
753
|
-
if (p) {
|
|
754
|
-
s.emit("error", p), s.readable = !1;
|
|
755
|
-
return;
|
|
756
|
-
}
|
|
757
|
-
s.fd = h, s.emit("open", h), s._read();
|
|
758
|
-
});
|
|
759
|
-
}
|
|
760
|
-
function o(a, n) {
|
|
761
|
-
if (!(this instanceof o)) return new o(a, n);
|
|
762
|
-
e.call(this), this.path = a, this.fd = null, this.writable = !0, this.flags = "w", this.encoding = "binary", this.mode = 438, this.bytesWritten = 0, n = n || {};
|
|
763
|
-
for (var s = Object.keys(n), u = 0, l = s.length; u < l; u++) {
|
|
764
|
-
var c = s[u];
|
|
765
|
-
this[c] = n[c];
|
|
766
|
-
}
|
|
767
|
-
if (this.start !== void 0) {
|
|
768
|
-
if (typeof this.start != "number")
|
|
769
|
-
throw TypeError("start must be a Number");
|
|
770
|
-
if (this.start < 0)
|
|
771
|
-
throw new Error("start must be >= zero");
|
|
772
|
-
this.pos = this.start;
|
|
773
|
-
}
|
|
774
|
-
this.busy = !1, this._queue = [], this.fd === null && (this._open = r.open, this._queue.push([this._open, this.path, this.flags, this.mode, void 0]), this.flush());
|
|
775
|
-
}
|
|
776
|
-
}
|
|
777
|
-
return He;
|
|
778
|
-
}
|
|
779
|
-
var ze, Pr;
|
|
780
|
-
function ts() {
|
|
781
|
-
if (Pr) return ze;
|
|
782
|
-
Pr = 1, ze = t;
|
|
783
|
-
var e = Object.getPrototypeOf || function(r) {
|
|
784
|
-
return r.__proto__;
|
|
785
|
-
};
|
|
786
|
-
function t(r) {
|
|
787
|
-
if (r === null || typeof r != "object")
|
|
788
|
-
return r;
|
|
789
|
-
if (r instanceof Object)
|
|
790
|
-
var i = { __proto__: e(r) };
|
|
791
|
-
else
|
|
792
|
-
var i = /* @__PURE__ */ Object.create(null);
|
|
793
|
-
return Object.getOwnPropertyNames(r).forEach(function(o) {
|
|
794
|
-
Object.defineProperty(i, o, Object.getOwnPropertyDescriptor(r, o));
|
|
795
|
-
}), i;
|
|
796
|
-
}
|
|
797
|
-
return ze;
|
|
798
|
-
}
|
|
799
|
-
var _e, xr;
|
|
800
|
-
function rs() {
|
|
801
|
-
if (xr) return _e;
|
|
802
|
-
xr = 1;
|
|
803
|
-
var e = Se, t = Qi(), r = es(), i = ts(), o = xi, a, n;
|
|
804
|
-
typeof Symbol == "function" && typeof Symbol.for == "function" ? (a = Symbol.for("graceful-fs.queue"), n = Symbol.for("graceful-fs.previous")) : (a = "___graceful-fs.queue", n = "___graceful-fs.previous");
|
|
805
|
-
function s() {
|
|
806
|
-
}
|
|
807
|
-
function u(f, v) {
|
|
808
|
-
Object.defineProperty(f, a, {
|
|
809
|
-
get: function() {
|
|
810
|
-
return v;
|
|
811
|
-
}
|
|
812
|
-
});
|
|
813
|
-
}
|
|
814
|
-
var l = s;
|
|
815
|
-
if (o.debuglog ? l = o.debuglog("gfs4") : /\bgfs4\b/i.test(process.env.NODE_DEBUG || "") && (l = function() {
|
|
816
|
-
var f = o.format.apply(o, arguments);
|
|
817
|
-
f = "GFS4: " + f.split(/\n/).join(`
|
|
818
|
-
GFS4: `), console.error(f);
|
|
819
|
-
}), !e[a]) {
|
|
820
|
-
var c = ke[a] || [];
|
|
821
|
-
u(e, c), e.close = (function(f) {
|
|
822
|
-
function v(E, y) {
|
|
823
|
-
return f.call(e, E, function($) {
|
|
824
|
-
$ || g(), typeof y == "function" && y.apply(this, arguments);
|
|
825
|
-
});
|
|
826
|
-
}
|
|
827
|
-
return Object.defineProperty(v, n, {
|
|
828
|
-
value: f
|
|
829
|
-
}), v;
|
|
830
|
-
})(e.close), e.closeSync = (function(f) {
|
|
831
|
-
function v(E) {
|
|
832
|
-
f.apply(e, arguments), g();
|
|
833
|
-
}
|
|
834
|
-
return Object.defineProperty(v, n, {
|
|
835
|
-
value: f
|
|
836
|
-
}), v;
|
|
837
|
-
})(e.closeSync), /\bgfs4\b/i.test(process.env.NODE_DEBUG || "") && process.on("exit", function() {
|
|
838
|
-
l(e[a]), ji.equal(e[a].length, 0);
|
|
839
|
-
});
|
|
840
|
-
}
|
|
841
|
-
ke[a] || u(ke, e[a]), _e = m(i(e)), process.env.TEST_GRACEFUL_FS_GLOBAL_PATCH && !e.__patched && (_e = m(e), e.__patched = !0);
|
|
842
|
-
function m(f) {
|
|
843
|
-
t(f), f.gracefulify = m, f.createReadStream = D, f.createWriteStream = j;
|
|
844
|
-
var v = f.readFile;
|
|
845
|
-
f.readFile = E;
|
|
846
|
-
function E(T, q, C) {
|
|
847
|
-
return typeof q == "function" && (C = q, q = null), K(T, q, C);
|
|
848
|
-
function K(H, Z, z, Y) {
|
|
849
|
-
return v(H, Z, function(M) {
|
|
850
|
-
M && (M.code === "EMFILE" || M.code === "ENFILE") ? p([K, [H, Z, z], M, Y || Date.now(), Date.now()]) : typeof z == "function" && z.apply(this, arguments);
|
|
851
|
-
});
|
|
852
|
-
}
|
|
853
|
-
}
|
|
854
|
-
var y = f.writeFile;
|
|
855
|
-
f.writeFile = $;
|
|
856
|
-
function $(T, q, C, K) {
|
|
857
|
-
return typeof C == "function" && (K = C, C = null), H(T, q, C, K);
|
|
858
|
-
function H(Z, z, Y, M, Q) {
|
|
859
|
-
return y(Z, z, Y, function(W) {
|
|
860
|
-
W && (W.code === "EMFILE" || W.code === "ENFILE") ? p([H, [Z, z, Y, M], W, Q || Date.now(), Date.now()]) : typeof M == "function" && M.apply(this, arguments);
|
|
861
|
-
});
|
|
862
|
-
}
|
|
863
|
-
}
|
|
864
|
-
var L = f.appendFile;
|
|
865
|
-
L && (f.appendFile = N);
|
|
866
|
-
function N(T, q, C, K) {
|
|
867
|
-
return typeof C == "function" && (K = C, C = null), H(T, q, C, K);
|
|
868
|
-
function H(Z, z, Y, M, Q) {
|
|
869
|
-
return L(Z, z, Y, function(W) {
|
|
870
|
-
W && (W.code === "EMFILE" || W.code === "ENFILE") ? p([H, [Z, z, Y, M], W, Q || Date.now(), Date.now()]) : typeof M == "function" && M.apply(this, arguments);
|
|
871
|
-
});
|
|
872
|
-
}
|
|
873
|
-
}
|
|
874
|
-
var _ = f.copyFile;
|
|
875
|
-
_ && (f.copyFile = b);
|
|
876
|
-
function b(T, q, C, K) {
|
|
877
|
-
return typeof C == "function" && (K = C, C = 0), H(T, q, C, K);
|
|
878
|
-
function H(Z, z, Y, M, Q) {
|
|
879
|
-
return _(Z, z, Y, function(W) {
|
|
880
|
-
W && (W.code === "EMFILE" || W.code === "ENFILE") ? p([H, [Z, z, Y, M], W, Q || Date.now(), Date.now()]) : typeof M == "function" && M.apply(this, arguments);
|
|
881
|
-
});
|
|
882
|
-
}
|
|
883
|
-
}
|
|
884
|
-
var G = f.readdir;
|
|
885
|
-
f.readdir = te;
|
|
886
|
-
var x = /^v[0-5]\./;
|
|
887
|
-
function te(T, q, C) {
|
|
888
|
-
typeof q == "function" && (C = q, q = null);
|
|
889
|
-
var K = x.test(process.version) ? function(z, Y, M, Q) {
|
|
890
|
-
return G(z, H(
|
|
891
|
-
z,
|
|
892
|
-
Y,
|
|
893
|
-
M,
|
|
894
|
-
Q
|
|
895
|
-
));
|
|
896
|
-
} : function(z, Y, M, Q) {
|
|
897
|
-
return G(z, Y, H(
|
|
898
|
-
z,
|
|
899
|
-
Y,
|
|
900
|
-
M,
|
|
901
|
-
Q
|
|
902
|
-
));
|
|
903
|
-
};
|
|
904
|
-
return K(T, q, C);
|
|
905
|
-
function H(Z, z, Y, M) {
|
|
906
|
-
return function(Q, W) {
|
|
907
|
-
Q && (Q.code === "EMFILE" || Q.code === "ENFILE") ? p([
|
|
908
|
-
K,
|
|
909
|
-
[Z, z, Y],
|
|
910
|
-
Q,
|
|
911
|
-
M || Date.now(),
|
|
912
|
-
Date.now()
|
|
913
|
-
]) : (W && W.sort && W.sort(), typeof Y == "function" && Y.call(this, Q, W));
|
|
914
|
-
};
|
|
915
|
-
}
|
|
916
|
-
}
|
|
917
|
-
if (process.version.substr(0, 4) === "v0.8") {
|
|
918
|
-
var V = r(f);
|
|
919
|
-
S = V.ReadStream, R = V.WriteStream;
|
|
920
|
-
}
|
|
921
|
-
var X = f.ReadStream;
|
|
922
|
-
X && (S.prototype = Object.create(X.prototype), S.prototype.open = O);
|
|
923
|
-
var A = f.WriteStream;
|
|
924
|
-
A && (R.prototype = Object.create(A.prototype), R.prototype.open = P), Object.defineProperty(f, "ReadStream", {
|
|
925
|
-
get: function() {
|
|
926
|
-
return S;
|
|
927
|
-
},
|
|
928
|
-
set: function(T) {
|
|
929
|
-
S = T;
|
|
930
|
-
},
|
|
931
|
-
enumerable: !0,
|
|
932
|
-
configurable: !0
|
|
933
|
-
}), Object.defineProperty(f, "WriteStream", {
|
|
934
|
-
get: function() {
|
|
935
|
-
return R;
|
|
936
|
-
},
|
|
937
|
-
set: function(T) {
|
|
938
|
-
R = T;
|
|
939
|
-
},
|
|
940
|
-
enumerable: !0,
|
|
941
|
-
configurable: !0
|
|
942
|
-
});
|
|
943
|
-
var I = S;
|
|
944
|
-
Object.defineProperty(f, "FileReadStream", {
|
|
945
|
-
get: function() {
|
|
946
|
-
return I;
|
|
947
|
-
},
|
|
948
|
-
set: function(T) {
|
|
949
|
-
I = T;
|
|
950
|
-
},
|
|
951
|
-
enumerable: !0,
|
|
952
|
-
configurable: !0
|
|
953
|
-
});
|
|
954
|
-
var w = R;
|
|
955
|
-
Object.defineProperty(f, "FileWriteStream", {
|
|
956
|
-
get: function() {
|
|
957
|
-
return w;
|
|
958
|
-
},
|
|
959
|
-
set: function(T) {
|
|
960
|
-
w = T;
|
|
961
|
-
},
|
|
962
|
-
enumerable: !0,
|
|
963
|
-
configurable: !0
|
|
964
|
-
});
|
|
965
|
-
function S(T, q) {
|
|
966
|
-
return this instanceof S ? (X.apply(this, arguments), this) : S.apply(Object.create(S.prototype), arguments);
|
|
967
|
-
}
|
|
968
|
-
function O() {
|
|
969
|
-
var T = this;
|
|
970
|
-
U(T.path, T.flags, T.mode, function(q, C) {
|
|
971
|
-
q ? (T.autoClose && T.destroy(), T.emit("error", q)) : (T.fd = C, T.emit("open", C), T.read());
|
|
972
|
-
});
|
|
973
|
-
}
|
|
974
|
-
function R(T, q) {
|
|
975
|
-
return this instanceof R ? (A.apply(this, arguments), this) : R.apply(Object.create(R.prototype), arguments);
|
|
976
|
-
}
|
|
977
|
-
function P() {
|
|
978
|
-
var T = this;
|
|
979
|
-
U(T.path, T.flags, T.mode, function(q, C) {
|
|
980
|
-
q ? (T.destroy(), T.emit("error", q)) : (T.fd = C, T.emit("open", C));
|
|
981
|
-
});
|
|
982
|
-
}
|
|
983
|
-
function D(T, q) {
|
|
984
|
-
return new f.ReadStream(T, q);
|
|
985
|
-
}
|
|
986
|
-
function j(T, q) {
|
|
987
|
-
return new f.WriteStream(T, q);
|
|
988
|
-
}
|
|
989
|
-
var B = f.open;
|
|
990
|
-
f.open = U;
|
|
991
|
-
function U(T, q, C, K) {
|
|
992
|
-
return typeof C == "function" && (K = C, C = null), H(T, q, C, K);
|
|
993
|
-
function H(Z, z, Y, M, Q) {
|
|
994
|
-
return B(Z, z, Y, function(W, Ho) {
|
|
995
|
-
W && (W.code === "EMFILE" || W.code === "ENFILE") ? p([H, [Z, z, Y, M], W, Q || Date.now(), Date.now()]) : typeof M == "function" && M.apply(this, arguments);
|
|
996
|
-
});
|
|
997
|
-
}
|
|
998
|
-
}
|
|
999
|
-
return f;
|
|
1000
|
-
}
|
|
1001
|
-
function p(f) {
|
|
1002
|
-
l("ENQUEUE", f[0].name, f[1]), e[a].push(f), d();
|
|
1003
|
-
}
|
|
1004
|
-
var h;
|
|
1005
|
-
function g() {
|
|
1006
|
-
for (var f = Date.now(), v = 0; v < e[a].length; ++v)
|
|
1007
|
-
e[a][v].length > 2 && (e[a][v][3] = f, e[a][v][4] = f);
|
|
1008
|
-
d();
|
|
1009
|
-
}
|
|
1010
|
-
function d() {
|
|
1011
|
-
if (clearTimeout(h), h = void 0, e[a].length !== 0) {
|
|
1012
|
-
var f = e[a].shift(), v = f[0], E = f[1], y = f[2], $ = f[3], L = f[4];
|
|
1013
|
-
if ($ === void 0)
|
|
1014
|
-
l("RETRY", v.name, E), v.apply(null, E);
|
|
1015
|
-
else if (Date.now() - $ >= 6e4) {
|
|
1016
|
-
l("TIMEOUT", v.name, E);
|
|
1017
|
-
var N = E.pop();
|
|
1018
|
-
typeof N == "function" && N.call(null, y);
|
|
1019
|
-
} else {
|
|
1020
|
-
var _ = Date.now() - L, b = Math.max(L - $, 1), G = Math.min(b * 1.2, 100);
|
|
1021
|
-
_ >= G ? (l("RETRY", v.name, E), v.apply(null, E.concat([$]))) : e[a].push(f);
|
|
1022
|
-
}
|
|
1023
|
-
h === void 0 && (h = setTimeout(d, 0));
|
|
1024
|
-
}
|
|
1025
|
-
}
|
|
1026
|
-
return _e;
|
|
1027
|
-
}
|
|
1028
|
-
var jr;
|
|
1029
|
-
function ns() {
|
|
1030
|
-
if (jr) return pe;
|
|
1031
|
-
jr = 1;
|
|
1032
|
-
var e = pe && pe.__importDefault || function(i) {
|
|
1033
|
-
return i && i.__esModule ? i : { default: i };
|
|
1034
|
-
};
|
|
1035
|
-
Object.defineProperty(pe, "__esModule", { value: !0 }), pe.readCAFileSync = void 0;
|
|
1036
|
-
const t = e(rs());
|
|
1037
|
-
function r(i) {
|
|
1038
|
-
try {
|
|
1039
|
-
const o = t.default.readFileSync(i, "utf8"), a = "-----END CERTIFICATE-----";
|
|
1040
|
-
return o.split(a).filter((s) => !!s.trim()).map((s) => `${s.trimLeft()}${a}`);
|
|
1041
|
-
} catch (o) {
|
|
1042
|
-
if (o.code === "ENOENT")
|
|
1043
|
-
return;
|
|
1044
|
-
throw o;
|
|
1045
|
-
}
|
|
1046
|
-
}
|
|
1047
|
-
return pe.readCAFileSync = r, pe;
|
|
1048
|
-
}
|
|
1049
|
-
var Cr;
|
|
1050
|
-
function is() {
|
|
1051
|
-
return Cr || (Cr = 1, (function(e) {
|
|
1052
|
-
var t = fe && fe.__createBinding || (Object.create ? (function(i, o, a, n) {
|
|
1053
|
-
n === void 0 && (n = a);
|
|
1054
|
-
var s = Object.getOwnPropertyDescriptor(o, a);
|
|
1055
|
-
(!s || ("get" in s ? !o.__esModule : s.writable || s.configurable)) && (s = { enumerable: !0, get: function() {
|
|
1056
|
-
return o[a];
|
|
1057
|
-
} }), Object.defineProperty(i, n, s);
|
|
1058
|
-
}) : (function(i, o, a, n) {
|
|
1059
|
-
n === void 0 && (n = a), i[n] = o[a];
|
|
1060
|
-
})), r = fe && fe.__exportStar || function(i, o) {
|
|
1061
|
-
for (var a in i) a !== "default" && !Object.prototype.hasOwnProperty.call(o, a) && t(o, i, a);
|
|
1062
|
-
};
|
|
1063
|
-
Object.defineProperty(e, "__esModule", { value: !0 }), r(ns(), e);
|
|
1064
|
-
})(fe)), fe;
|
|
1065
|
-
}
|
|
1066
|
-
var Ke = { exports: {} }, Ye, qr;
|
|
1067
|
-
function ss() {
|
|
1068
|
-
if (qr) return Ye;
|
|
1069
|
-
qr = 1, Ye = t;
|
|
1070
|
-
function e(r, i) {
|
|
1071
|
-
if (typeof Object.setPrototypeOf == "function")
|
|
1072
|
-
return Object.setPrototypeOf(r, i);
|
|
1073
|
-
r.__proto__ = i;
|
|
1074
|
-
}
|
|
1075
|
-
function t() {
|
|
1076
|
-
this.list = [];
|
|
1077
|
-
var r = null;
|
|
1078
|
-
Object.defineProperty(this, "root", {
|
|
1079
|
-
get: function() {
|
|
1080
|
-
return r;
|
|
1081
|
-
},
|
|
1082
|
-
set: function(i) {
|
|
1083
|
-
r = i, this.list.length && e(this.list[this.list.length - 1], i);
|
|
1084
|
-
},
|
|
1085
|
-
enumerable: !0,
|
|
1086
|
-
configurable: !0
|
|
1087
|
-
});
|
|
1088
|
-
}
|
|
1089
|
-
return t.prototype = {
|
|
1090
|
-
get length() {
|
|
1091
|
-
return this.list.length;
|
|
1092
|
-
},
|
|
1093
|
-
get keys() {
|
|
1094
|
-
var r = [];
|
|
1095
|
-
for (var i in this.list[0]) r.push(i);
|
|
1096
|
-
return r;
|
|
1097
|
-
},
|
|
1098
|
-
get snapshot() {
|
|
1099
|
-
var r = {};
|
|
1100
|
-
return this.keys.forEach(function(i) {
|
|
1101
|
-
r[i] = this.get(i);
|
|
1102
|
-
}, this), r;
|
|
1103
|
-
},
|
|
1104
|
-
get store() {
|
|
1105
|
-
return this.list[0];
|
|
1106
|
-
},
|
|
1107
|
-
push: function(r) {
|
|
1108
|
-
return typeof r != "object" && (r = { valueOf: r }), this.list.length >= 1 && e(this.list[this.list.length - 1], r), e(r, this.root), this.list.push(r);
|
|
1109
|
-
},
|
|
1110
|
-
pop: function() {
|
|
1111
|
-
return this.list.length >= 2 && e(this.list[this.list.length - 2], this.root), this.list.pop();
|
|
1112
|
-
},
|
|
1113
|
-
unshift: function(r) {
|
|
1114
|
-
return e(r, this.list[0] || this.root), this.list.unshift(r);
|
|
1115
|
-
},
|
|
1116
|
-
shift: function() {
|
|
1117
|
-
return this.list.length === 1 && e(this.list[0], this.root), this.list.shift();
|
|
1118
|
-
},
|
|
1119
|
-
get: function(r) {
|
|
1120
|
-
return this.list[0][r];
|
|
1121
|
-
},
|
|
1122
|
-
set: function(r, i, o) {
|
|
1123
|
-
return this.length || this.push({}), o && this.list[0].hasOwnProperty(r) && this.push({}), this.list[0][r] = i;
|
|
1124
|
-
},
|
|
1125
|
-
forEach: function(r, i) {
|
|
1126
|
-
for (var o in this.list[0]) r.call(i, o, this.list[0][o]);
|
|
1127
|
-
},
|
|
1128
|
-
slice: function() {
|
|
1129
|
-
return this.list.slice.apply(this.list, arguments);
|
|
1130
|
-
},
|
|
1131
|
-
splice: function() {
|
|
1132
|
-
for (var r = this.list.splice.apply(this.list, arguments), i = 0, o = this.list.length; i < o; i++)
|
|
1133
|
-
e(this.list[i], this.list[i + 1] || this.root);
|
|
1134
|
-
return r;
|
|
1135
|
-
}
|
|
1136
|
-
}, Ye;
|
|
1137
|
-
}
|
|
1138
|
-
var Fr;
|
|
1139
|
-
function os() {
|
|
1140
|
-
if (Fr) return Ke.exports;
|
|
1141
|
-
Fr = 1;
|
|
1142
|
-
var e = ss(), t = ce, r = Se, i = li(), o = Ci.EventEmitter, a = ai, n = qi, s = Ke.exports = function() {
|
|
1143
|
-
for (var p = [].slice.call(arguments), h = new c(); p.length; ) {
|
|
1144
|
-
var g = p.shift();
|
|
1145
|
-
g && h.push(typeof g == "string" ? l(g) : g);
|
|
1146
|
-
}
|
|
1147
|
-
return h;
|
|
1148
|
-
};
|
|
1149
|
-
s.find = function() {
|
|
1150
|
-
var p = t.join.apply(null, [].slice.call(arguments));
|
|
1151
|
-
function h(g, d) {
|
|
1152
|
-
var f = t.join(g, d);
|
|
1153
|
-
try {
|
|
1154
|
-
return r.statSync(f), f;
|
|
1155
|
-
} catch {
|
|
1156
|
-
if (t.dirname(g) !== g)
|
|
1157
|
-
return h(t.dirname(g), d);
|
|
1158
|
-
}
|
|
1159
|
-
}
|
|
1160
|
-
return h(__dirname, p);
|
|
1161
|
-
};
|
|
1162
|
-
var u = s.parse = function(p, h, g) {
|
|
1163
|
-
if (p = "" + p, g)
|
|
1164
|
-
if (g === "json")
|
|
1165
|
-
if (this.emit)
|
|
1166
|
-
try {
|
|
1167
|
-
return JSON.parse(p);
|
|
1168
|
-
} catch (d) {
|
|
1169
|
-
this.emit("error", d);
|
|
1170
|
-
}
|
|
1171
|
-
else
|
|
1172
|
-
return JSON.parse(p);
|
|
1173
|
-
else
|
|
1174
|
-
return i.parse(p);
|
|
1175
|
-
else try {
|
|
1176
|
-
return JSON.parse(p);
|
|
1177
|
-
} catch {
|
|
1178
|
-
return i.parse(p);
|
|
1179
|
-
}
|
|
1180
|
-
}, l = s.json = function() {
|
|
1181
|
-
var p = [].slice.call(arguments).filter(function(d) {
|
|
1182
|
-
return d != null;
|
|
1183
|
-
}), h = t.join.apply(null, p), g;
|
|
1184
|
-
try {
|
|
1185
|
-
g = r.readFileSync(h, "utf-8");
|
|
1186
|
-
} catch {
|
|
1187
|
-
return;
|
|
1188
|
-
}
|
|
1189
|
-
return u(g, h, "json");
|
|
1190
|
-
};
|
|
1191
|
-
s.env = function(p, h) {
|
|
1192
|
-
h = h || process.env;
|
|
1193
|
-
var g = {}, d = p.length;
|
|
1194
|
-
for (var f in h)
|
|
1195
|
-
f.indexOf(p) === 0 && (g[f.substring(d)] = h[f]);
|
|
1196
|
-
return g;
|
|
1197
|
-
}, s.ConfigChain = c;
|
|
1198
|
-
function c() {
|
|
1199
|
-
o.apply(this), e.apply(this, arguments), this._awaiting = 0, this._saving = 0, this.sources = {};
|
|
1200
|
-
}
|
|
1201
|
-
var m = {
|
|
1202
|
-
constructor: { value: c }
|
|
1203
|
-
};
|
|
1204
|
-
return Object.keys(o.prototype).forEach(function(p) {
|
|
1205
|
-
m[p] = Object.getOwnPropertyDescriptor(o.prototype, p);
|
|
1206
|
-
}), c.prototype = Object.create(e.prototype, m), c.prototype.del = function(p, h) {
|
|
1207
|
-
if (h) {
|
|
1208
|
-
var g = this.sources[h];
|
|
1209
|
-
if (g = g && g.data, !g)
|
|
1210
|
-
return this.emit("error", new Error("not found " + h));
|
|
1211
|
-
delete g[p];
|
|
1212
|
-
} else
|
|
1213
|
-
for (var d = 0, f = this.list.length; d < f; d++)
|
|
1214
|
-
delete this.list[d][p];
|
|
1215
|
-
return this;
|
|
1216
|
-
}, c.prototype.set = function(p, h, g) {
|
|
1217
|
-
var d;
|
|
1218
|
-
if (g) {
|
|
1219
|
-
if (d = this.sources[g], d = d && d.data, !d)
|
|
1220
|
-
return this.emit("error", new Error("not found " + g));
|
|
1221
|
-
} else if (d = this.list[0], !d)
|
|
1222
|
-
return this.emit("error", new Error("cannot set, no confs!"));
|
|
1223
|
-
return d[p] = h, this;
|
|
1224
|
-
}, c.prototype.get = function(p, h) {
|
|
1225
|
-
return h ? (h = this.sources[h], h && (h = h.data), h && Object.hasOwnProperty.call(h, p) ? h[p] : void 0) : this.list[0][p];
|
|
1226
|
-
}, c.prototype.save = function(p, v, g) {
|
|
1227
|
-
typeof v == "function" && (g = v, v = null);
|
|
1228
|
-
var d = this.sources[p];
|
|
1229
|
-
if (!d || !(d.path || d.source) || !d.data)
|
|
1230
|
-
return this.emit("error", new Error("bad save target: " + p));
|
|
1231
|
-
if (d.source) {
|
|
1232
|
-
var f = d.prefix || "";
|
|
1233
|
-
return Object.keys(d.data).forEach(function(y) {
|
|
1234
|
-
d.source[f + y] = d.data[y];
|
|
1235
|
-
}), this;
|
|
1236
|
-
}
|
|
1237
|
-
var v = v || d.type, E = d.data;
|
|
1238
|
-
return d.type === "json" ? E = JSON.stringify(E) : E = i.stringify(E), this._saving++, r.writeFile(d.path, E, "utf8", function(y) {
|
|
1239
|
-
if (this._saving--, y)
|
|
1240
|
-
return g ? g(y) : this.emit("error", y);
|
|
1241
|
-
this._saving === 0 && (g && g(), this.emit("save"));
|
|
1242
|
-
}.bind(this)), this;
|
|
1243
|
-
}, c.prototype.addFile = function(p, h, g) {
|
|
1244
|
-
g = g || p;
|
|
1245
|
-
var d = { __source__: g };
|
|
1246
|
-
return this.sources[g] = { path: p, type: h }, this.push(d), this._await(), r.readFile(p, "utf8", function(f, v) {
|
|
1247
|
-
f && this.emit("error", f), this.addString(v, p, h, d);
|
|
1248
|
-
}.bind(this)), this;
|
|
1249
|
-
}, c.prototype.addEnv = function(p, h, g) {
|
|
1250
|
-
g = g || "env";
|
|
1251
|
-
var d = s.env(p, h);
|
|
1252
|
-
return this.sources[g] = { data: d, source: h, prefix: p }, this.add(d, g);
|
|
1253
|
-
}, c.prototype.addUrl = function(p, h, g) {
|
|
1254
|
-
this._await();
|
|
1255
|
-
var d = a.format(p);
|
|
1256
|
-
g = g || d;
|
|
1257
|
-
var f = { __source__: g };
|
|
1258
|
-
return this.sources[g] = { href: d, type: h }, this.push(f), n.request(p, function(v) {
|
|
1259
|
-
var E = [], y = v.headers["content-type"];
|
|
1260
|
-
h || (h = y.indexOf("json") !== -1 ? "json" : y.indexOf("ini") !== -1 ? "ini" : d.match(/\.json$/) ? "json" : d.match(/\.ini$/) ? "ini" : null, f.type = h), v.on("data", E.push.bind(E)).on("end", function() {
|
|
1261
|
-
this.addString(Buffer.concat(E), d, h, f);
|
|
1262
|
-
}.bind(this)).on("error", this.emit.bind(this, "error"));
|
|
1263
|
-
}.bind(this)).on("error", this.emit.bind(this, "error")).end(), this;
|
|
1264
|
-
}, c.prototype.addString = function(p, h, g, d) {
|
|
1265
|
-
return p = this.parse(p, h, g), this.add(p, d), this;
|
|
1266
|
-
}, c.prototype.add = function(p, h) {
|
|
1267
|
-
if (h && typeof h == "object") {
|
|
1268
|
-
var g = this.list.indexOf(h);
|
|
1269
|
-
if (g === -1)
|
|
1270
|
-
return this.emit("error", new Error("bad marker"));
|
|
1271
|
-
this.splice(g, 1, p), h = h.__source__, this.sources[h] = this.sources[h] || {}, this.sources[h].data = p, this._resolve();
|
|
1272
|
-
} else
|
|
1273
|
-
typeof h == "string" && (this.sources[h] = this.sources[h] || {}, this.sources[h].data = p), this._await(), this.push(p), process.nextTick(this._resolve.bind(this));
|
|
1274
|
-
return this;
|
|
1275
|
-
}, c.prototype.parse = s.parse, c.prototype._await = function() {
|
|
1276
|
-
this._awaiting++;
|
|
1277
|
-
}, c.prototype._resolve = function() {
|
|
1278
|
-
this._awaiting--, this._awaiting === 0 && this.emit("load", this);
|
|
1279
|
-
}, Ke.exports;
|
|
1280
|
-
}
|
|
1281
|
-
var Je, Dr;
|
|
1282
|
-
function as() {
|
|
1283
|
-
if (Dr) return Je;
|
|
1284
|
-
Dr = 1, Je = function(t) {
|
|
1285
|
-
const r = t.indexOf(":");
|
|
1286
|
-
if (r === -1)
|
|
1287
|
-
return e(t);
|
|
1288
|
-
const i = t.substr(0, r), o = t.substr(r + 1);
|
|
1289
|
-
return `${e(i)}:${e(o)}`;
|
|
1290
|
-
};
|
|
1291
|
-
function e(t) {
|
|
1292
|
-
if (t = t.toLowerCase(), t === "_authtoken") return "_authToken";
|
|
1293
|
-
let r = t[0];
|
|
1294
|
-
for (let i = 1; i < t.length; i++)
|
|
1295
|
-
r += t[i] === "_" ? "-" : t[i];
|
|
1296
|
-
return r;
|
|
1297
|
-
}
|
|
1298
|
-
return Je;
|
|
1299
|
-
}
|
|
1300
|
-
var me = {}, Ze = {}, we = {}, Br;
|
|
1301
|
-
function cs() {
|
|
1302
|
-
if (Br) return we;
|
|
1303
|
-
Br = 1, Object.defineProperty(we, "__esModule", { value: !0 }), we.envReplace = void 0;
|
|
1304
|
-
const e = /(?<!\\)(\\*)\$\{([^${}]+)\}/g;
|
|
1305
|
-
function t(a, n) {
|
|
1306
|
-
return a.replace(e, r.bind(null, n));
|
|
1307
|
-
}
|
|
1308
|
-
we.envReplace = t;
|
|
1309
|
-
function r(a, n, s, u) {
|
|
1310
|
-
if (s.length % 2)
|
|
1311
|
-
return n.slice((s.length + 1) / 2);
|
|
1312
|
-
const l = o(a, u);
|
|
1313
|
-
if (l === void 0)
|
|
1314
|
-
throw new Error(`Failed to replace env in config: ${n}`);
|
|
1315
|
-
return `${s.slice(s.length / 2)}${l}`;
|
|
1316
|
-
}
|
|
1317
|
-
const i = /([^:-]+)(:?)-(.+)/;
|
|
1318
|
-
function o(a, n) {
|
|
1319
|
-
const s = n.match(i);
|
|
1320
|
-
if (!s)
|
|
1321
|
-
return a[n];
|
|
1322
|
-
const [, u, l, c] = s;
|
|
1323
|
-
return Object.prototype.hasOwnProperty.call(a, u) ? !a[u] && l ? c : a[u] : c;
|
|
1324
|
-
}
|
|
1325
|
-
return we;
|
|
1326
|
-
}
|
|
1327
|
-
var kr;
|
|
1328
|
-
function ls() {
|
|
1329
|
-
return kr || (kr = 1, (function(e) {
|
|
1330
|
-
Object.defineProperty(e, "__esModule", { value: !0 }), e.envReplace = void 0;
|
|
1331
|
-
var t = cs();
|
|
1332
|
-
Object.defineProperty(e, "envReplace", { enumerable: !0, get: function() {
|
|
1333
|
-
return t.envReplace;
|
|
1334
|
-
} });
|
|
1335
|
-
})(Ze)), Ze;
|
|
1336
|
-
}
|
|
1337
|
-
var Gr;
|
|
1338
|
-
function us() {
|
|
1339
|
-
if (Gr) return me;
|
|
1340
|
-
Gr = 1;
|
|
1341
|
-
const e = Se, t = ce, { envReplace: r } = ls(), i = (n) => typeof n != "string" ? n : r(n, process.env), o = (n, s, u) => {
|
|
1342
|
-
if (typeof s != "string")
|
|
1343
|
-
return s;
|
|
1344
|
-
const l = [].concat(n[u]), c = l.indexOf(t) !== -1, m = l.indexOf(Boolean) !== -1, p = l.indexOf(String) !== -1, h = l.indexOf(Number) !== -1;
|
|
1345
|
-
if (s = `${s}`.trim(), /^".*"$/.test(s))
|
|
1346
|
-
try {
|
|
1347
|
-
s = JSON.parse(s);
|
|
1348
|
-
} catch {
|
|
1349
|
-
throw new Error(`Failed parsing JSON config key ${u}: ${s}`);
|
|
1350
|
-
}
|
|
1351
|
-
if (m && !p && s === "")
|
|
1352
|
-
return !0;
|
|
1353
|
-
switch (s) {
|
|
1354
|
-
// eslint-disable-line default-case
|
|
1355
|
-
case "true":
|
|
1356
|
-
return !0;
|
|
1357
|
-
case "false":
|
|
1358
|
-
return !1;
|
|
1359
|
-
case "null":
|
|
1360
|
-
return null;
|
|
1361
|
-
case "undefined":
|
|
1362
|
-
return;
|
|
1363
|
-
}
|
|
1364
|
-
return s = r(s, process.env), c && ((process.platform === "win32" ? /^~(\/|\\)/ : /^~\//).test(s) && process.env.HOME && (s = t.resolve(process.env.HOME, s.substr(2))), s = t.resolve(s)), h && !isNaN(s) && (s = Number(s)), s;
|
|
1365
|
-
}, a = (n) => {
|
|
1366
|
-
n = t.resolve(n);
|
|
1367
|
-
let s = !1;
|
|
1368
|
-
for (; t.basename(n) === "node_modules"; )
|
|
1369
|
-
n = t.dirname(n), s = !0;
|
|
1370
|
-
if (s)
|
|
1371
|
-
return n;
|
|
1372
|
-
const u = (l, c) => {
|
|
1373
|
-
const m = /^[a-zA-Z]:(\\|\/)?$/;
|
|
1374
|
-
if (l === "/" || process.platform === "win32" && m.test(l))
|
|
1375
|
-
return c;
|
|
1376
|
-
try {
|
|
1377
|
-
const p = e.readdirSync(l);
|
|
1378
|
-
if (p.includes("node_modules") || p.includes("package.json") || p.includes("package.json5") || p.includes("package.yaml") || p.includes("pnpm-workspace.yaml"))
|
|
1379
|
-
return l;
|
|
1380
|
-
const h = t.dirname(l);
|
|
1381
|
-
return h === l ? c : u(h, c);
|
|
1382
|
-
} catch (p) {
|
|
1383
|
-
if (l === c) {
|
|
1384
|
-
if (p.code === "ENOENT")
|
|
1385
|
-
return c;
|
|
1386
|
-
throw p;
|
|
1387
|
-
}
|
|
1388
|
-
return c;
|
|
1389
|
-
}
|
|
1390
|
-
};
|
|
1391
|
-
return u(n, n);
|
|
1392
|
-
};
|
|
1393
|
-
return me.envReplace = r, me.findPrefix = a, me.parseField = o, me.parseKey = i, me;
|
|
1394
|
-
}
|
|
1395
|
-
var Qe = {}, Ur;
|
|
1396
|
-
function fs() {
|
|
1397
|
-
if (Ur) return Qe;
|
|
1398
|
-
Ur = 1;
|
|
1399
|
-
const e = ce, t = oi.Stream, r = ai, i = () => {
|
|
1400
|
-
}, o = () => [], a = () => {
|
|
1401
|
-
};
|
|
1402
|
-
return Qe.types = {
|
|
1403
|
-
access: [null, "restricted", "public"],
|
|
1404
|
-
"allow-same-version": Boolean,
|
|
1405
|
-
"always-auth": Boolean,
|
|
1406
|
-
also: [null, "dev", "development"],
|
|
1407
|
-
audit: Boolean,
|
|
1408
|
-
"auth-type": ["legacy", "sso", "saml", "oauth"],
|
|
1409
|
-
"bin-links": Boolean,
|
|
1410
|
-
browser: [null, String],
|
|
1411
|
-
ca: [null, String, Array],
|
|
1412
|
-
cafile: e,
|
|
1413
|
-
cache: e,
|
|
1414
|
-
"cache-lock-stale": Number,
|
|
1415
|
-
"cache-lock-retries": Number,
|
|
1416
|
-
"cache-lock-wait": Number,
|
|
1417
|
-
"cache-max": Number,
|
|
1418
|
-
"cache-min": Number,
|
|
1419
|
-
cert: [null, String],
|
|
1420
|
-
cidr: [null, String, Array],
|
|
1421
|
-
color: ["always", Boolean],
|
|
1422
|
-
depth: Number,
|
|
1423
|
-
description: Boolean,
|
|
1424
|
-
dev: Boolean,
|
|
1425
|
-
"dry-run": Boolean,
|
|
1426
|
-
editor: String,
|
|
1427
|
-
"engine-strict": Boolean,
|
|
1428
|
-
force: Boolean,
|
|
1429
|
-
"fetch-retries": Number,
|
|
1430
|
-
"fetch-retry-factor": Number,
|
|
1431
|
-
"fetch-retry-mintimeout": Number,
|
|
1432
|
-
"fetch-retry-maxtimeout": Number,
|
|
1433
|
-
git: String,
|
|
1434
|
-
"git-tag-version": Boolean,
|
|
1435
|
-
"commit-hooks": Boolean,
|
|
1436
|
-
global: Boolean,
|
|
1437
|
-
globalconfig: e,
|
|
1438
|
-
"global-style": Boolean,
|
|
1439
|
-
group: [Number, String],
|
|
1440
|
-
"https-proxy": [null, r],
|
|
1441
|
-
"user-agent": String,
|
|
1442
|
-
"ham-it-up": Boolean,
|
|
1443
|
-
heading: String,
|
|
1444
|
-
"if-present": Boolean,
|
|
1445
|
-
"ignore-prepublish": Boolean,
|
|
1446
|
-
"ignore-scripts": Boolean,
|
|
1447
|
-
"init-module": e,
|
|
1448
|
-
"init-author-name": String,
|
|
1449
|
-
"init-author-email": String,
|
|
1450
|
-
"init-author-url": ["", r],
|
|
1451
|
-
"init-license": String,
|
|
1452
|
-
"init-version": a,
|
|
1453
|
-
json: Boolean,
|
|
1454
|
-
key: [null, String],
|
|
1455
|
-
"legacy-bundling": Boolean,
|
|
1456
|
-
link: Boolean,
|
|
1457
|
-
// local-address must be listed as an IP for a local network interface
|
|
1458
|
-
// must be IPv4 due to node bug
|
|
1459
|
-
"local-address": o(),
|
|
1460
|
-
loglevel: ["silent", "error", "warn", "notice", "http", "timing", "info", "verbose", "silly"],
|
|
1461
|
-
logstream: t,
|
|
1462
|
-
"logs-max": Number,
|
|
1463
|
-
long: Boolean,
|
|
1464
|
-
maxsockets: Number,
|
|
1465
|
-
message: String,
|
|
1466
|
-
"metrics-registry": [null, String],
|
|
1467
|
-
"node-options": [null, String],
|
|
1468
|
-
"node-version": [null, a],
|
|
1469
|
-
"no-proxy": [null, String, Array],
|
|
1470
|
-
offline: Boolean,
|
|
1471
|
-
"onload-script": [null, String],
|
|
1472
|
-
only: [null, "dev", "development", "prod", "production"],
|
|
1473
|
-
optional: Boolean,
|
|
1474
|
-
"package-lock": Boolean,
|
|
1475
|
-
otp: [null, String],
|
|
1476
|
-
"package-lock-only": Boolean,
|
|
1477
|
-
parseable: Boolean,
|
|
1478
|
-
"prefer-offline": Boolean,
|
|
1479
|
-
"prefer-online": Boolean,
|
|
1480
|
-
prefix: e,
|
|
1481
|
-
production: Boolean,
|
|
1482
|
-
progress: Boolean,
|
|
1483
|
-
proxy: [null, !1, r],
|
|
1484
|
-
provenance: Boolean,
|
|
1485
|
-
// allow proxy to be disabled explicitly
|
|
1486
|
-
"read-only": Boolean,
|
|
1487
|
-
"rebuild-bundle": Boolean,
|
|
1488
|
-
registry: [null, r],
|
|
1489
|
-
rollback: Boolean,
|
|
1490
|
-
save: Boolean,
|
|
1491
|
-
"save-bundle": Boolean,
|
|
1492
|
-
"save-dev": Boolean,
|
|
1493
|
-
"save-exact": Boolean,
|
|
1494
|
-
"save-optional": Boolean,
|
|
1495
|
-
"save-prefix": String,
|
|
1496
|
-
"save-prod": Boolean,
|
|
1497
|
-
scope: String,
|
|
1498
|
-
"script-shell": [null, String],
|
|
1499
|
-
"scripts-prepend-node-path": [!1, !0, "auto", "warn-only"],
|
|
1500
|
-
searchopts: String,
|
|
1501
|
-
searchexclude: [null, String],
|
|
1502
|
-
searchlimit: Number,
|
|
1503
|
-
searchstaleness: Number,
|
|
1504
|
-
"send-metrics": Boolean,
|
|
1505
|
-
shell: String,
|
|
1506
|
-
shrinkwrap: Boolean,
|
|
1507
|
-
"sign-git-tag": Boolean,
|
|
1508
|
-
"sso-poll-frequency": Number,
|
|
1509
|
-
"sso-type": [null, "oauth", "saml"],
|
|
1510
|
-
"strict-ssl": Boolean,
|
|
1511
|
-
tag: String,
|
|
1512
|
-
timing: Boolean,
|
|
1513
|
-
tmp: e,
|
|
1514
|
-
unicode: Boolean,
|
|
1515
|
-
"unsafe-perm": Boolean,
|
|
1516
|
-
usage: Boolean,
|
|
1517
|
-
user: [Number, String],
|
|
1518
|
-
userconfig: e,
|
|
1519
|
-
umask: i,
|
|
1520
|
-
version: Boolean,
|
|
1521
|
-
"tag-version-prefix": String,
|
|
1522
|
-
versions: Boolean,
|
|
1523
|
-
viewer: String,
|
|
1524
|
-
_exit: Boolean
|
|
1525
|
-
}, Qe;
|
|
1526
|
-
}
|
|
1527
|
-
var et, Mr;
|
|
1528
|
-
function ps() {
|
|
1529
|
-
if (Mr) return et;
|
|
1530
|
-
Mr = 1;
|
|
1531
|
-
const { readCAFileSync: e } = is(), t = Se, r = ce, { ConfigChain: i } = os(), o = as(), a = us();
|
|
1532
|
-
class n extends i {
|
|
1533
|
-
// https://github.com/npm/cli/blob/latest/lib/config/core.js#L203-L217
|
|
1534
|
-
constructor(l, c) {
|
|
1535
|
-
super(l), this.root = l, this._parseField = a.parseField.bind(null, c || fs());
|
|
1536
|
-
}
|
|
1537
|
-
// https://github.com/npm/cli/blob/latest/lib/config/core.js#L326-L338
|
|
1538
|
-
add(l, c) {
|
|
1539
|
-
try {
|
|
1540
|
-
for (const [m, p] of Object.entries(l)) {
|
|
1541
|
-
const h = a.parseKey(m);
|
|
1542
|
-
h !== m && delete l[m], l[h] = this._parseField(p, h);
|
|
1543
|
-
}
|
|
1544
|
-
} catch (m) {
|
|
1545
|
-
throw m;
|
|
1546
|
-
}
|
|
1547
|
-
return super.add(l, c);
|
|
1548
|
-
}
|
|
1549
|
-
// https://github.com/npm/cli/blob/latest/lib/config/core.js#L306-L319
|
|
1550
|
-
addFile(l, c) {
|
|
1551
|
-
c = c || l;
|
|
1552
|
-
const m = { __source__: c };
|
|
1553
|
-
this.sources[c] = { path: l, type: "ini" }, this.push(m), this._await();
|
|
1554
|
-
try {
|
|
1555
|
-
const p = t.readFileSync(l, "utf8");
|
|
1556
|
-
this.addString(p, l, "ini", m);
|
|
1557
|
-
} catch (p) {
|
|
1558
|
-
if (p.code === "ENOENT")
|
|
1559
|
-
this.add({}, m);
|
|
1560
|
-
else if (p.code !== "EISDIR")
|
|
1561
|
-
return `Issue while reading "${l}". ${p.message}`;
|
|
1562
|
-
}
|
|
1563
|
-
}
|
|
1564
|
-
// https://github.com/npm/cli/blob/latest/lib/config/core.js#L341-L357
|
|
1565
|
-
addEnv(l) {
|
|
1566
|
-
l = l || process.env;
|
|
1567
|
-
const c = {};
|
|
1568
|
-
return Object.keys(l).filter((m) => /^npm_config_/i.test(m)).forEach((m) => {
|
|
1569
|
-
if (!l[m])
|
|
1570
|
-
return;
|
|
1571
|
-
const p = o(m.substr(11)), h = l[m];
|
|
1572
|
-
c[p] = s(p, h);
|
|
1573
|
-
}), super.addEnv("", c, "env");
|
|
1574
|
-
}
|
|
1575
|
-
// https://github.com/npm/cli/blob/latest/lib/config/load-prefix.js
|
|
1576
|
-
loadPrefix() {
|
|
1577
|
-
const l = this.list[0];
|
|
1578
|
-
Object.defineProperty(this, "prefix", {
|
|
1579
|
-
enumerable: !0,
|
|
1580
|
-
set: (m) => {
|
|
1581
|
-
const p = this.get("global");
|
|
1582
|
-
this[p ? "globalPrefix" : "localPrefix"] = m;
|
|
1583
|
-
},
|
|
1584
|
-
get: () => this.get("global") ? this.globalPrefix : this.localPrefix
|
|
1585
|
-
}), Object.defineProperty(this, "globalPrefix", {
|
|
1586
|
-
enumerable: !0,
|
|
1587
|
-
set: (m) => {
|
|
1588
|
-
this.set("prefix", m);
|
|
1589
|
-
},
|
|
1590
|
-
get: () => r.resolve(this.get("prefix"))
|
|
1591
|
-
});
|
|
1592
|
-
let c;
|
|
1593
|
-
if (Object.defineProperty(this, "localPrefix", {
|
|
1594
|
-
enumerable: !0,
|
|
1595
|
-
set: (m) => {
|
|
1596
|
-
c = m;
|
|
1597
|
-
},
|
|
1598
|
-
get: () => c
|
|
1599
|
-
}), Object.prototype.hasOwnProperty.call(l, "prefix"))
|
|
1600
|
-
c = r.resolve(l.prefix);
|
|
1601
|
-
else
|
|
1602
|
-
try {
|
|
1603
|
-
c = a.findPrefix(process.cwd());
|
|
1604
|
-
} catch (m) {
|
|
1605
|
-
throw m;
|
|
1606
|
-
}
|
|
1607
|
-
return c;
|
|
1608
|
-
}
|
|
1609
|
-
// https://github.com/npm/cli/blob/latest/lib/config/load-cafile.js
|
|
1610
|
-
loadCAFile(l) {
|
|
1611
|
-
if (!l)
|
|
1612
|
-
return;
|
|
1613
|
-
const c = e(l);
|
|
1614
|
-
c && this.set("ca", c);
|
|
1615
|
-
}
|
|
1616
|
-
// https://github.com/npm/cli/blob/latest/lib/config/set-user.js
|
|
1617
|
-
loadUser() {
|
|
1618
|
-
const l = this.root;
|
|
1619
|
-
if (this.get("global"))
|
|
1620
|
-
return;
|
|
1621
|
-
if (process.env.SUDO_UID) {
|
|
1622
|
-
l.user = Number(process.env.SUDO_UID);
|
|
1623
|
-
return;
|
|
1624
|
-
}
|
|
1625
|
-
const c = r.resolve(this.get("prefix"));
|
|
1626
|
-
try {
|
|
1627
|
-
const m = t.statSync(c);
|
|
1628
|
-
l.user = m.uid;
|
|
1629
|
-
} catch (m) {
|
|
1630
|
-
if (m.code === "ENOENT")
|
|
1631
|
-
return;
|
|
1632
|
-
throw m;
|
|
1633
|
-
}
|
|
1634
|
-
}
|
|
1635
|
-
}
|
|
1636
|
-
function s(u, l) {
|
|
1637
|
-
function c(m) {
|
|
1638
|
-
return m.indexOf(`
|
|
2
|
+
import{createRequire as e}from"node:module";import{argv as t,cwd as n,env as r,exit as i,platform as a,stderr as o,stdout as s,versions as c}from"node:process";import{basename as l,dirname as u,join as d,resolve as f}from"node:path";import{accessSync as p,lstatSync as m,readFileSync as h,truncateSync as g,writeFileSync as _}from"node:fs";import{stripVTControlCharacters as v,styleText as y}from"node:util";import{execFileSync as b}from"node:child_process";import{rootCertificates as x}from"node:tls";import{availableParallelism as S,cpus as C}from"node:os";var w=Object.create,T=Object.defineProperty,E=Object.getOwnPropertyDescriptor,D=Object.getOwnPropertyNames,O=Object.getPrototypeOf,ee=Object.prototype.hasOwnProperty,k=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),te=(e,t,n,r)=>{if(t&&typeof t==`object`||typeof t==`function`)for(var i=D(t),a=0,o=i.length,s;a<o;a++)s=i[a],!ee.call(e,s)&&s!==n&&T(e,s,{get:(e=>t[e]).bind(null,s),enumerable:!(r=E(t,s))||r.enumerable});return e},A=(e,t,n)=>(n=e==null?{}:w(O(e)),te(t||!e||!e.__esModule?T(n,`default`,{value:e,enumerable:!0}):n,e)),j=e(import.meta.url),ne=k(((exports,t)=>{function n(e,t){var n=e;return t.slice(0,-1).forEach(function(e){n=n[e]||{}}),t[t.length-1]in n}function r(e){return typeof e==`number`||/^0x[0-9a-f]+$/i.test(e)?!0:/^[-+]?(?:\d+(?:\.\d*)?|\.\d+)(e[-+]?\d+)?$/.test(e)}function i(e,t){return t===`constructor`&&typeof e[t]==`function`||t===`__proto__`}t.exports=function(e,t){t||={};var a={bools:{},strings:{},unknownFn:null};typeof t.unknown==`function`&&(a.unknownFn=t.unknown),typeof t.boolean==`boolean`&&t.boolean?a.allBools=!0:[].concat(t.boolean).filter(Boolean).forEach(function(e){a.bools[e]=!0});var o={};function s(e){return o[e].some(function(e){return a.bools[e]})}Object.keys(t.alias||{}).forEach(function(e){o[e]=[].concat(t.alias[e]),o[e].forEach(function(t){o[t]=[e].concat(o[e].filter(function(e){return t!==e}))})}),[].concat(t.string).filter(Boolean).forEach(function(e){a.strings[e]=!0,o[e]&&[].concat(o[e]).forEach(function(e){a.strings[e]=!0})});var c=t.default||{},l={_:[]};function u(e,t){return a.allBools&&/^--[^=]+$/.test(t)||a.strings[e]||a.bools[e]||o[e]}function d(e,t,n){for(var r=e,o=0;o<t.length-1;o++){var s=t[o];if(i(r,s))return;r[s]===void 0&&(r[s]={}),(r[s]===Object.prototype||r[s]===Number.prototype||r[s]===String.prototype)&&(r[s]={}),r[s]===Array.prototype&&(r[s]=[]),r=r[s]}var c=t[t.length-1];i(r,c)||((r===Object.prototype||r===Number.prototype||r===String.prototype)&&(r={}),r===Array.prototype&&(r=[]),r[c]===void 0||a.bools[c]||typeof r[c]==`boolean`?r[c]=n:Array.isArray(r[c])?r[c].push(n):r[c]=[r[c],n])}function f(e,t,n){if(!(n&&a.unknownFn&&!u(e,n)&&a.unknownFn(n)===!1)){var i=!a.strings[e]&&r(t)?Number(t):t;d(l,e.split(`.`),i),(o[e]||[]).forEach(function(e){d(l,e.split(`.`),i)})}}Object.keys(a.bools).forEach(function(e){f(e,c[e]===void 0?!1:c[e])});var p=[];e.indexOf(`--`)!==-1&&(p=e.slice(e.indexOf(`--`)+1),e=e.slice(0,e.indexOf(`--`)));for(var m=0;m<e.length;m++){var h=e[m],g,_;if(/^--.+=/.test(h)){var v=h.match(/^--([^=]+)=([\s\S]*)$/);g=v[1];var y=v[2];a.bools[g]&&(y=y!==`false`),f(g,y,h)}else if(/^--no-.+/.test(h))g=h.match(/^--no-(.+)/)[1],f(g,!1,h);else if(/^--.+/.test(h))g=h.match(/^--(.+)/)[1],_=e[m+1],_!==void 0&&!/^(-|--)[^-]/.test(_)&&!a.bools[g]&&!a.allBools&&(!o[g]||!s(g))?(f(g,_,h),m+=1):/^(true|false)$/.test(_)?(f(g,_===`true`,h),m+=1):f(g,a.strings[g]?``:!0,h);else if(/^-[^-]+/.test(h)){for(var b=h.slice(1,-1).split(``),x=!1,S=0;S<b.length;S++){if(_=h.slice(S+2),_===`-`){f(b[S],_,h);continue}if(/[A-Za-z]/.test(b[S])&&_[0]===`=`){f(b[S],_.slice(1),h),x=!0;break}if(/[A-Za-z]/.test(b[S])&&/-?\d+(\.\d*)?(e-?\d+)?$/.test(_)){f(b[S],_,h),x=!0;break}if(b[S+1]&&b[S+1].match(/\W/)){f(b[S],h.slice(S+2),h),x=!0;break}else f(b[S],a.strings[b[S]]?``:!0,h)}g=h.slice(-1)[0],!x&&g!==`-`&&(e[m+1]&&!/^(-|--)[^-]/.test(e[m+1])&&!a.bools[g]&&(!o[g]||!s(g))?(f(g,e[m+1],h),m+=1):e[m+1]&&/^(true|false)$/.test(e[m+1])?(f(g,e[m+1]===`true`,h),m+=1):f(g,a.strings[g]?``:!0,h))}else if((!a.unknownFn||a.unknownFn(h)!==!1)&&l._.push(a.strings._||!r(h)?h:Number(h)),t.stopEarly){l._.push.apply(l._,e.slice(m+1));break}}return Object.keys(c).forEach(function(e){n(l,e.split(`.`))||(d(l,e.split(`.`),c[e]),(o[e]||[]).forEach(function(t){d(l,t.split(`.`),c[e])}))}),t[`--`]?l[`--`]=p.slice():p.forEach(function(e){l._.push(e)}),l}})),re=A(ne(),1),ie=class extends Error{constructor(e){super(),this.name=`AbortError`,this.message=e}};const ae=e=>globalThis.DOMException===void 0?new ie(e):new DOMException(e),oe=e=>{let t=e.reason===void 0?ae(`This operation was aborted.`):e.reason;return t instanceof Error?t:ae(t)};async function se(e,t,{concurrency:n=1/0,stopOnError:r=!0,signal:i}={}){return new Promise((a,o)=>{if(e[Symbol.iterator]===void 0&&e[Symbol.asyncIterator]===void 0)throw TypeError(`Expected \`input\` to be either an \`Iterable\` or \`AsyncIterable\`, got (${typeof e})`);if(typeof t!=`function`)throw TypeError(`Mapper function is required`);if(!((Number.isSafeInteger(n)||n===1/0)&&n>=1))throw TypeError(`Expected \`concurrency\` to be an integer from 1 and up or \`Infinity\`, got \`${n}\` (${typeof n})`);let s=[],c=[],l=new Map,u=!1,d=!1,f=!1,p=0,m=0,h=e[Symbol.iterator]===void 0?e[Symbol.asyncIterator]():e[Symbol.iterator](),g=e=>{u=!0,d=!0,o(e)};i&&(i.aborted&&g(oe(i)),i.addEventListener(`abort`,()=>{g(oe(i))}));let _=async()=>{if(d)return;let e=await h.next(),n=m;if(m++,e.done){if(f=!0,p===0&&!d){if(!r&&c.length>0){g(AggregateError(c));return}if(d=!0,l.size===0){a(s);return}let e=[];for(let[t,n]of s.entries()){if(l.get(t)===ce)continue;e.push(n)}a(e)}return}p++,(async()=>{try{let r=await e.value;if(d)return;let i=await t(r,n);i===ce&&l.set(n,i),s[n]=i,p--,await _()}catch(e){if(r)g(e);else{c.push(e),p--;try{await _()}catch(e){g(e)}}}})()};(async()=>{for(let e=0;e<n;e++){try{await _()}catch(e){g(e);break}if(f||u)break}})()})}const ce=Symbol(`skip`);async function le(e,t){return se(e,e=>e(),t)}var ue={name:`updates`,version:`16.7.3`,description:`Flexible npm and poetry dependency update tool`,author:`silverwind`,repository:`silverwind/updates`,license:`BSD-2-Clause`,bin:`dist/index.js`,types:`dist/index.d.ts`,type:`module`,sideEffects:!1,files:[`dist`],engines:{node:`>=20`},devDependencies:{"@types/minimist":`1.2.5`,"@types/node":`24.5.2`,"@types/rc":`1.2.4`,"@types/semver":`7.7.1`,eslint:`9.36.0`,"eslint-config-silverwind":`105.2.1`,minimist:`1.2.8`,"nano-spawn":`1.0.3`,"p-all":`5.0.1`,rc:`1.2.8`,"registry-auth-token":`5.1.0`,restana:`5.1.0`,semver:`7.7.2`,"smol-toml":`1.4.2`,timerel:`5.8.2`,tsdown:`0.15.5`,"tsdown-config-silverwind":`1.2.1`,typescript:`5.9.2`,"typescript-config-silverwind":`10.0.2`,versions:`13.1.2`,vitest:`3.2.4`,"vitest-config-silverwind":`10.2.0`}},de=k((exports=>{exports.parse=exports.decode=i,exports.stringify=exports.encode=n,exports.safe=o,exports.unsafe=s;var t=typeof process<`u`&&process.platform===`win32`?`\r
|
|
3
|
+
`:`
|
|
4
|
+
`;function n(e,i){var a=[],s=``;typeof i==`string`?i={section:i,whitespace:!1}:(i||={},i.whitespace=i.whitespace===!0);var c=i.whitespace?` = `:`=`;return Object.keys(e).forEach(function(n,r,i){var l=e[n];l&&Array.isArray(l)?l.forEach(function(e){s+=o(n+`[]`)+c+o(e)+`
|
|
5
|
+
`}):l&&typeof l==`object`?a.push(n):s+=o(n)+c+o(l)+t}),i.section&&s.length&&(s=`[`+o(i.section)+`]`+t+s),a.forEach(function(a,o,c){var l=r(a).join(`\\.`),u=(i.section?i.section+`.`:``)+l,d=n(e[a],{section:u,whitespace:i.whitespace});s.length&&d.length&&(s+=t),s+=d}),s}function r(e){return e.replace(/\1/g,`LITERAL\\1LITERAL`).replace(/\\\./g,``).split(/\./).map(function(e){return e.replace(/\1/g,`\\.`).replace(/\2LITERAL\\1LITERAL\2/g,``)})}function i(e){var t={},n=t,i=null,a=/^\[([^\]]*)\]$|^([^=]+)(=(.*))?$/i;return e.split(/[\r\n]+/g).forEach(function(e,r,o){if(!(!e||e.match(/^\s*[;#]/))){var c=e.match(a);if(c){if(c[1]!==void 0){if(i=s(c[1]),i===`__proto__`){n={};return}n=t[i]=t[i]||{};return}var l=s(c[2]);if(l!==`__proto__`){var u=c[3]?s(c[4]):!0;switch(u){case`true`:case`false`:case`null`:u=JSON.parse(u)}if(l.length>2&&l.slice(-2)===`[]`){if(l=l.substring(0,l.length-2),l===`__proto__`)return;n[l]?Array.isArray(n[l])||(n[l]=[n[l]]):n[l]=[]}Array.isArray(n[l])?n[l].push(u):n[l]=u}}}}),Object.keys(t).filter(function(e,n,i){if(!t[e]||typeof t[e]!=`object`||Array.isArray(t[e]))return!1;var a=r(e),o=t,s=a.pop(),c=s.replace(/\\\./g,`.`);return a.forEach(function(e,t,n){e!==`__proto__`&&((!o[e]||typeof o[e]!=`object`)&&(o[e]={}),o=o[e])}),o===t&&c===s?!1:(o[c]=t[e],!0)}).forEach(function(e,n,r){delete t[e]}),t}function a(e){return e.charAt(0)===`"`&&e.slice(-1)===`"`||e.charAt(0)===`'`&&e.slice(-1)===`'`}function o(e){return typeof e!=`string`||e.match(/[=\r\n]/)||e.match(/^\[/)||e.length>1&&a(e)||e!==e.trim()?JSON.stringify(e):e.replace(/;/g,`\\;`).replace(/#/g,`\\#`)}function s(e,t){if(e=(e||``).trim(),a(e)){e.charAt(0)===`'`&&(e=e.substr(1,e.length-2));try{e=JSON.parse(e)}catch{}}else{for(var n=!1,r=``,i=0,o=e.length;i<o;i++){var s=e.charAt(i);if(n)`\\;#`.indexOf(s)===-1?r+=`\\`+s:r+=s,n=!1;else if(`;#`.indexOf(s)!==-1)break;else s===`\\`?n=!0:r+=s}return n&&(r+=`\\`),r.trim()}return e}})),fe=k(((exports,t)=>{var n=1,r=2;function i(){return``}function a(e,t,n){return e.slice(t,n).replace(/\S/g,` `)}t.exports=function(e,t){t||={};for(var o,s,c=!1,l=!1,u=0,d=``,f=t.whitespace===!1?i:a,p=0;p<e.length;p++)if(o=e[p],s=e[p+1],!l&&o===`"`&&(e[p-1]===`\\`&&e[p-2]!==`\\`||(c=!c)),!c){if(!l&&o+s===`//`)d+=e.slice(u,p),u=p,l=n,p++;else if(l===n&&o+s===`\r
|
|
6
|
+
`){p++,l=!1,d+=f(e,u,p),u=p;continue}else if(l===n&&o===`
|
|
7
|
+
`)l=!1,d+=f(e,u,p),u=p;else if(!l&&o+s===`/*`){d+=e.slice(u,p),u=p,l=r,p++;continue}else if(l===r&&o+s===`*/`){p++,l=!1,d+=f(e,u,p+1),u=p+1;continue}}return d+(l?f(e.substr(u)):e.substr(u))}})),pe=k((exports=>{var t=j(`fs`),n=de(),r=j(`path`),i=fe(),a=exports.parse=function(e){return/^\s*{/.test(e)?JSON.parse(i(e)):n.parse(e)},o=exports.file=function(){var e=[].slice.call(arguments).filter(function(e){return e!=null});for(var n in e)if(typeof e[n]!=`string`)return;var i=r.join.apply(null,e);try{return t.readFileSync(i,`utf-8`)}catch{return}};exports.json=function(){var e=o.apply(null,arguments);return e?a(e):null},exports.env=function(e,t){t||=process.env;var n={},r=e.length;for(var i in t)if(i.toLowerCase().indexOf(e.toLowerCase())===0){for(var a=i.substring(r).split(`__`),o;(o=a.indexOf(``))>-1;)a.splice(o,1);var s=n;a.forEach(function(e,n){!e||typeof s!=`object`||(n===a.length-1&&(s[e]=t[i]),s[e]===void 0&&(s[e]={}),s=s[e])})}return n},exports.find=function(){var e=r.join.apply(null,[].slice.call(arguments));function n(e,i){var a=r.join(e,i);try{return t.statSync(a),a}catch{if(r.dirname(e)!==e)return n(r.dirname(e),i)}}return n(process.cwd(),e)}})),me=k(((exports,t)=>{function n(e){return e instanceof Buffer||e instanceof Date||e instanceof RegExp}function r(e){if(e instanceof Buffer){var t=Buffer.alloc?Buffer.alloc(e.length):new Buffer(e.length);return e.copy(t),t}else if(e instanceof Date)return new Date(e.getTime());else if(e instanceof RegExp)return new RegExp(e);else throw Error(`Unexpected situation`)}function i(e){var t=[];return e.forEach(function(e,a){typeof e==`object`&&e?Array.isArray(e)?t[a]=i(e):n(e)?t[a]=r(e):t[a]=o({},e):t[a]=e}),t}function a(e,t){return t===`__proto__`?void 0:e[t]}var o=t.exports=function(){if(arguments.length<1||typeof arguments[0]!=`object`)return!1;if(arguments.length<2)return arguments[0];var e=arguments[0],t=Array.prototype.slice.call(arguments,1),s,c;return t.forEach(function(t){typeof t!=`object`||!t||Array.isArray(t)||Object.keys(t).forEach(function(l){if(c=a(e,l),s=a(t,l),s!==e)if(typeof s!=`object`||!s){e[l]=s;return}else if(Array.isArray(s)){e[l]=i(s);return}else if(n(s)){e[l]=r(s);return}else if(typeof c!=`object`||!c||Array.isArray(c)){e[l]=o({},s);return}else{e[l]=o(c,s);return}})}),e}})),he=k(((exports,t)=>{var n=pe(),r=j(`path`).join,i=me(),a=`/etc`,o=process.platform===`win32`,s=o?process.env.USERPROFILE:process.env.HOME;t.exports=function(e,t,c,l){if(typeof e!=`string`)throw Error(`rc(name): name *must* be string`);c||=ne()(process.argv.slice(2)),t=(typeof t==`string`?n.json(t):t)||{},l||=n.parse;var u=n.env(e+`_`),d=[t],f=[];function p(e){if(!(f.indexOf(e)>=0)){var t=n.file(e);t&&(d.push(l(t)),f.push(e))}}return o||[r(a,e,`config`),r(a,e+`rc`)].forEach(p),s&&[r(s,`.config`,e,`config`),r(s,`.config`,e),r(s,`.`+e,`config`),r(s,`.`+e+`rc`)].forEach(p),p(n.find(`.`+e+`rc`)),u.config&&p(u.config),c.config&&p(c.config),i.apply(null,d.concat([u,c,f.length?{configs:f,config:f[f.length-1]}:void 0]))}})),ge=k(((exports,t)=>{var n=j(`constants`),r=process.cwd,i=null,a=process.env.GRACEFUL_FS_PLATFORM||process.platform;process.cwd=function(){return i||=r.call(process),i};try{process.cwd()}catch{}if(typeof process.chdir==`function`){var o=process.chdir;process.chdir=function(e){i=null,o.call(process,e)},Object.setPrototypeOf&&Object.setPrototypeOf(process.chdir,o)}t.exports=s;function s(e){n.hasOwnProperty(`O_SYMLINK`)&&process.version.match(/^v0\.6\.[0-2]|^v0\.5\./)&&t(e),e.lutimes||r(e),e.chown=s(e.chown),e.fchown=s(e.fchown),e.lchown=s(e.lchown),e.chmod=i(e.chmod),e.fchmod=i(e.fchmod),e.lchmod=i(e.lchmod),e.chownSync=c(e.chownSync),e.fchownSync=c(e.fchownSync),e.lchownSync=c(e.lchownSync),e.chmodSync=o(e.chmodSync),e.fchmodSync=o(e.fchmodSync),e.lchmodSync=o(e.lchmodSync),e.stat=l(e.stat),e.fstat=l(e.fstat),e.lstat=l(e.lstat),e.statSync=u(e.statSync),e.fstatSync=u(e.fstatSync),e.lstatSync=u(e.lstatSync),e.chmod&&!e.lchmod&&(e.lchmod=function(e,t,n){n&&process.nextTick(n)},e.lchmodSync=function(){}),e.chown&&!e.lchown&&(e.lchown=function(e,t,n,r){r&&process.nextTick(r)},e.lchownSync=function(){}),a===`win32`&&(e.rename=typeof e.rename==`function`?(function(t){function n(n,r,i){var a=Date.now(),o=0;t(n,r,function s(c){if(c&&(c.code===`EACCES`||c.code===`EPERM`)&&Date.now()-a<6e4){setTimeout(function(){e.stat(r,function(e,a){e&&e.code===`ENOENT`?t(n,r,s):i(c)})},o),o<100&&(o+=10);return}i&&i(c)})}return Object.setPrototypeOf&&Object.setPrototypeOf(n,t),n})(e.rename):e.rename),e.read=typeof e.read==`function`?(function(t){function n(n,r,i,a,o,s){var c;if(s&&typeof s==`function`){var l=0;c=function(u,d,f){if(u&&u.code===`EAGAIN`&&l<10)return l++,t.call(e,n,r,i,a,o,c);s.apply(this,arguments)}}return t.call(e,n,r,i,a,o,c)}return Object.setPrototypeOf&&Object.setPrototypeOf(n,t),n})(e.read):e.read,e.readSync=typeof e.readSync==`function`?(function(t){return function(n,r,i,a,o){for(var s=0;;)try{return t.call(e,n,r,i,a,o)}catch(e){if(e.code===`EAGAIN`&&s<10){s++;continue}throw e}}})(e.readSync):e.readSync;function t(e){e.lchmod=function(t,r,i){e.open(t,n.O_WRONLY|n.O_SYMLINK,r,function(t,n){if(t){i&&i(t);return}e.fchmod(n,r,function(t){e.close(n,function(e){i&&i(t||e)})})})},e.lchmodSync=function(t,r){var i=e.openSync(t,n.O_WRONLY|n.O_SYMLINK,r),a=!0,o;try{o=e.fchmodSync(i,r),a=!1}finally{if(a)try{e.closeSync(i)}catch{}else e.closeSync(i)}return o}}function r(e){n.hasOwnProperty(`O_SYMLINK`)&&e.futimes?(e.lutimes=function(t,r,i,a){e.open(t,n.O_SYMLINK,function(t,n){if(t){a&&a(t);return}e.futimes(n,r,i,function(t){e.close(n,function(e){a&&a(t||e)})})})},e.lutimesSync=function(t,r,i){var a=e.openSync(t,n.O_SYMLINK),o,s=!0;try{o=e.futimesSync(a,r,i),s=!1}finally{if(s)try{e.closeSync(a)}catch{}else e.closeSync(a)}return o}):e.futimes&&(e.lutimes=function(e,t,n,r){r&&process.nextTick(r)},e.lutimesSync=function(){})}function i(t){return t&&function(n,r,i){return t.call(e,n,r,function(e){d(e)&&(e=null),i&&i.apply(this,arguments)})}}function o(t){return t&&function(n,r){try{return t.call(e,n,r)}catch(e){if(!d(e))throw e}}}function s(t){return t&&function(n,r,i,a){return t.call(e,n,r,i,function(e){d(e)&&(e=null),a&&a.apply(this,arguments)})}}function c(t){return t&&function(n,r,i){try{return t.call(e,n,r,i)}catch(e){if(!d(e))throw e}}}function l(t){return t&&function(n,r,i){typeof r==`function`&&(i=r,r=null);function a(e,t){t&&(t.uid<0&&(t.uid+=4294967296),t.gid<0&&(t.gid+=4294967296)),i&&i.apply(this,arguments)}return r?t.call(e,n,r,a):t.call(e,n,a)}}function u(t){return t&&function(n,r){var i=r?t.call(e,n,r):t.call(e,n);return i&&(i.uid<0&&(i.uid+=4294967296),i.gid<0&&(i.gid+=4294967296)),i}}function d(e){return!e||e.code===`ENOSYS`||(!process.getuid||process.getuid()!==0)&&(e.code===`EINVAL`||e.code===`EPERM`)}}})),_e=k(((exports,t)=>{var n=j(`stream`).Stream;t.exports=r;function r(e){return{ReadStream:t,WriteStream:r};function t(r,i){if(!(this instanceof t))return new t(r,i);n.call(this);var a=this;this.path=r,this.fd=null,this.readable=!0,this.paused=!1,this.flags=`r`,this.mode=438,this.bufferSize=64*1024,i||={};for(var o=Object.keys(i),s=0,c=o.length;s<c;s++){var l=o[s];this[l]=i[l]}if(this.encoding&&this.setEncoding(this.encoding),this.start!==void 0){if(typeof this.start!=`number`)throw TypeError(`start must be a Number`);if(this.end===void 0)this.end=1/0;else if(typeof this.end!=`number`)throw TypeError(`end must be a Number`);if(this.start>this.end)throw Error(`start must be <= end`);this.pos=this.start}if(this.fd!==null){process.nextTick(function(){a._read()});return}e.open(this.path,this.flags,this.mode,function(e,t){if(e){a.emit(`error`,e),a.readable=!1;return}a.fd=t,a.emit(`open`,t),a._read()})}function r(t,i){if(!(this instanceof r))return new r(t,i);n.call(this),this.path=t,this.fd=null,this.writable=!0,this.flags=`w`,this.encoding=`binary`,this.mode=438,this.bytesWritten=0,i||={};for(var a=Object.keys(i),o=0,s=a.length;o<s;o++){var c=a[o];this[c]=i[c]}if(this.start!==void 0){if(typeof this.start!=`number`)throw TypeError(`start must be a Number`);if(this.start<0)throw Error(`start must be >= zero`);this.pos=this.start}this.busy=!1,this._queue=[],this.fd===null&&(this._open=e.open,this._queue.push([this._open,this.path,this.flags,this.mode,void 0]),this.flush())}}})),ve=k(((exports,t)=>{t.exports=r;var n=Object.getPrototypeOf||function(e){return e.__proto__};function r(e){if(typeof e!=`object`||!e)return e;if(e instanceof Object)var t={__proto__:n(e)};else var t=Object.create(null);return Object.getOwnPropertyNames(e).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(e,n))}),t}})),ye=k(((exports,t)=>{var n=j(`fs`),r=ge(),i=_e(),a=ve(),o=j(`util`),s,c;typeof Symbol==`function`&&typeof Symbol.for==`function`?(s=Symbol.for(`graceful-fs.queue`),c=Symbol.for(`graceful-fs.previous`)):(s=`___graceful-fs.queue`,c=`___graceful-fs.previous`);function l(){}function u(e,t){Object.defineProperty(e,s,{get:function(){return t}})}var d=l;if(o.debuglog?d=o.debuglog(`gfs4`):/\bgfs4\b/i.test(process.env.NODE_DEBUG||``)&&(d=function(){var e=o.format.apply(o,arguments);e=`GFS4: `+e.split(/\n/).join(`
|
|
8
|
+
GFS4: `),console.error(e)}),!n[s]){var f=global[s]||[];u(n,f),n.close=(function(e){function t(t,r){return e.call(n,t,function(e){e||g(),typeof r==`function`&&r.apply(this,arguments)})}return Object.defineProperty(t,c,{value:e}),t})(n.close),n.closeSync=(function(e){function t(t){e.apply(n,arguments),g()}return Object.defineProperty(t,c,{value:e}),t})(n.closeSync),/\bgfs4\b/i.test(process.env.NODE_DEBUG||``)&&process.on(`exit`,function(){d(n[s]),j(`assert`).equal(n[s].length,0)})}global[s]||u(global,n[s]),t.exports=p(a(n)),process.env.TEST_GRACEFUL_FS_GLOBAL_PATCH&&!n.__patched&&(t.exports=p(n),n.__patched=!0);function p(e){r(e),e.gracefulify=p,e.createReadStream=T,e.createWriteStream=E;var t=e.readFile;e.readFile=n;function n(e,n,r){return typeof n==`function`&&(r=n,n=null),i(e,n,r);function i(e,n,r,a){return t(e,n,function(t){t&&(t.code===`EMFILE`||t.code===`ENFILE`)?m([i,[e,n,r],t,a||Date.now(),Date.now()]):typeof r==`function`&&r.apply(this,arguments)})}}var a=e.writeFile;e.writeFile=o;function o(e,t,n,r){return typeof n==`function`&&(r=n,n=null),i(e,t,n,r);function i(e,t,n,r,o){return a(e,t,n,function(a){a&&(a.code===`EMFILE`||a.code===`ENFILE`)?m([i,[e,t,n,r],a,o||Date.now(),Date.now()]):typeof r==`function`&&r.apply(this,arguments)})}}var s=e.appendFile;s&&(e.appendFile=c);function c(e,t,n,r){return typeof n==`function`&&(r=n,n=null),i(e,t,n,r);function i(e,t,n,r,a){return s(e,t,n,function(o){o&&(o.code===`EMFILE`||o.code===`ENFILE`)?m([i,[e,t,n,r],o,a||Date.now(),Date.now()]):typeof r==`function`&&r.apply(this,arguments)})}}var l=e.copyFile;l&&(e.copyFile=u);function u(e,t,n,r){return typeof n==`function`&&(r=n,n=0),i(e,t,n,r);function i(e,t,n,r,a){return l(e,t,n,function(o){o&&(o.code===`EMFILE`||o.code===`ENFILE`)?m([i,[e,t,n,r],o,a||Date.now(),Date.now()]):typeof r==`function`&&r.apply(this,arguments)})}}var d=e.readdir;e.readdir=h;var f=/^v[0-5]\./;function h(e,t,n){typeof t==`function`&&(n=t,t=null);var r=f.test(process.version)?function(e,t,n,r){return d(e,i(e,t,n,r))}:function(e,t,n,r){return d(e,t,i(e,t,n,r))};return r(e,t,n);function i(e,t,n,i){return function(a,o){a&&(a.code===`EMFILE`||a.code===`ENFILE`)?m([r,[e,t,n],a,i||Date.now(),Date.now()]):(o&&o.sort&&o.sort(),typeof n==`function`&&n.call(this,a,o))}}}if(process.version.substr(0,4)===`v0.8`){var g=i(e);x=g.ReadStream,C=g.WriteStream}var _=e.ReadStream;_&&(x.prototype=Object.create(_.prototype),x.prototype.open=S);var v=e.WriteStream;v&&(C.prototype=Object.create(v.prototype),C.prototype.open=w),Object.defineProperty(e,`ReadStream`,{get:function(){return x},set:function(e){x=e},enumerable:!0,configurable:!0}),Object.defineProperty(e,`WriteStream`,{get:function(){return C},set:function(e){C=e},enumerable:!0,configurable:!0});var y=x;Object.defineProperty(e,`FileReadStream`,{get:function(){return y},set:function(e){y=e},enumerable:!0,configurable:!0});var b=C;Object.defineProperty(e,`FileWriteStream`,{get:function(){return b},set:function(e){b=e},enumerable:!0,configurable:!0});function x(e,t){return this instanceof x?(_.apply(this,arguments),this):x.apply(Object.create(x.prototype),arguments)}function S(){var e=this;O(e.path,e.flags,e.mode,function(t,n){t?(e.autoClose&&e.destroy(),e.emit(`error`,t)):(e.fd=n,e.emit(`open`,n),e.read())})}function C(e,t){return this instanceof C?(v.apply(this,arguments),this):C.apply(Object.create(C.prototype),arguments)}function w(){var e=this;O(e.path,e.flags,e.mode,function(t,n){t?(e.destroy(),e.emit(`error`,t)):(e.fd=n,e.emit(`open`,n))})}function T(t,n){return new e.ReadStream(t,n)}function E(t,n){return new e.WriteStream(t,n)}var D=e.open;e.open=O;function O(e,t,n,r){return typeof n==`function`&&(r=n,n=null),i(e,t,n,r);function i(e,t,n,r,a){return D(e,t,n,function(o,s){o&&(o.code===`EMFILE`||o.code===`ENFILE`)?m([i,[e,t,n,r],o,a||Date.now(),Date.now()]):typeof r==`function`&&r.apply(this,arguments)})}}return e}function m(e){d(`ENQUEUE`,e[0].name,e[1]),n[s].push(e),_()}var h;function g(){for(var e=Date.now(),t=0;t<n[s].length;++t)n[s][t].length>2&&(n[s][t][3]=e,n[s][t][4]=e);_()}function _(){if(clearTimeout(h),h=void 0,n[s].length!==0){var e=n[s].shift(),t=e[0],r=e[1],i=e[2],a=e[3],o=e[4];if(a===void 0)d(`RETRY`,t.name,r),t.apply(null,r);else if(Date.now()-a>=6e4){d(`TIMEOUT`,t.name,r);var c=r.pop();typeof c==`function`&&c.call(null,i)}else{var l=Date.now()-o,u=Math.max(o-a,1),f=Math.min(u*1.2,100);l>=f?(d(`RETRY`,t.name,r),t.apply(null,r.concat([a]))):n[s].push(e)}h===void 0&&(h=setTimeout(_,0))}}})),be=k((exports=>{var t=exports&&exports.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(exports,`__esModule`,{value:!0});let n=t(ye());function r(e){try{let t=n.default.readFileSync(e,`utf8`),r=`-----END CERTIFICATE-----`;return t.split(r).filter(e=>!!e.trim()).map(e=>`${e.trimLeft()}${r}`)}catch(e){if(e.code===`ENOENT`)return;throw e}}exports.readCAFileSync=r})),xe=k((exports=>{var t=exports&&exports.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);(!i||(`get`in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),n=exports&&exports.__exportStar||function(e,n){for(var r in e)r!==`default`&&!Object.prototype.hasOwnProperty.call(n,r)&&t(n,e,r)};Object.defineProperty(exports,`__esModule`,{value:!0}),n(be(),exports)})),Se=k(((exports,t)=>{t.exports=r;function n(e,t){if(typeof Object.setPrototypeOf==`function`)return Object.setPrototypeOf(e,t);e.__proto__=t}function r(){this.list=[];var e=null;Object.defineProperty(this,`root`,{get:function(){return e},set:function(t){e=t,this.list.length&&n(this.list[this.list.length-1],t)},enumerable:!0,configurable:!0})}r.prototype={get length(){return this.list.length},get keys(){var e=[];for(var t in this.list[0])e.push(t);return e},get snapshot(){var e={};return this.keys.forEach(function(t){e[t]=this.get(t)},this),e},get store(){return this.list[0]},push:function(e){return typeof e!=`object`&&(e={valueOf:e}),this.list.length>=1&&n(this.list[this.list.length-1],e),n(e,this.root),this.list.push(e)},pop:function(){return this.list.length>=2&&n(this.list[this.list.length-2],this.root),this.list.pop()},unshift:function(e){return n(e,this.list[0]||this.root),this.list.unshift(e)},shift:function(){return this.list.length===1&&n(this.list[0],this.root),this.list.shift()},get:function(e){return this.list[0][e]},set:function(e,t,n){return this.length||this.push({}),n&&this.list[0].hasOwnProperty(e)&&this.push({}),this.list[0][e]=t},forEach:function(e,t){for(var n in this.list[0])e.call(t,n,this.list[0][n])},slice:function(){return this.list.slice.apply(this.list,arguments)},splice:function(){for(var e=this.list.splice.apply(this.list,arguments),t=0,r=this.list.length;t<r;t++)n(this.list[t],this.list[t+1]||this.root);return e}}})),Ce=k(((exports,t)=>{var n=Se(),r=j(`path`),i=j(`fs`),a=de(),o=j(`events`).EventEmitter,s=j(`url`),c=j(`http`),l=t.exports=function(){for(var e=[].slice.call(arguments),t=new f;e.length;){var n=e.shift();n&&t.push(typeof n==`string`?d(n):n)}return t};l.find=function(){var e=r.join.apply(null,[].slice.call(arguments));function t(e,n){var a=r.join(e,n);try{return i.statSync(a),a}catch{if(r.dirname(e)!==e)return t(r.dirname(e),n)}}return t(__dirname,e)};var u=l.parse=function(e,t,n){if(e=``+e,n)if(n===`json`)if(this.emit)try{return JSON.parse(e)}catch(e){this.emit(`error`,e)}else return JSON.parse(e);else return a.parse(e);else try{return JSON.parse(e)}catch{return a.parse(e)}},d=l.json=function(){var e=[].slice.call(arguments).filter(function(e){return e!=null}),t=r.join.apply(null,e),n;try{n=i.readFileSync(t,`utf-8`)}catch{return}return u(n,t,`json`)};l.env=function(e,t){t||=process.env;var n={},r=e.length;for(var i in t)i.indexOf(e)===0&&(n[i.substring(r)]=t[i]);return n},l.ConfigChain=f;function f(){o.apply(this),n.apply(this,arguments),this._awaiting=0,this._saving=0,this.sources={}}var p={constructor:{value:f}};Object.keys(o.prototype).forEach(function(e){p[e]=Object.getOwnPropertyDescriptor(o.prototype,e)}),f.prototype=Object.create(n.prototype,p),f.prototype.del=function(e,t){if(t){var n=this.sources[t];if(n&&=n.data,!n)return this.emit(`error`,Error(`not found `+t));delete n[e]}else for(var r=0,i=this.list.length;r<i;r++)delete this.list[r][e];return this},f.prototype.set=function(e,t,n){var r;if(n){if(r=this.sources[n],r&&=r.data,!r)return this.emit(`error`,Error(`not found `+n))}else if(r=this.list[0],!r)return this.emit(`error`,Error(`cannot set, no confs!`));return r[e]=t,this},f.prototype.get=function(e,t){return t?(t=this.sources[t],t&&=t.data,t&&Object.hasOwnProperty.call(t,e)?t[e]:void 0):this.list[0][e]},f.prototype.save=function(e,t,n){typeof t==`function`&&(n=t,t=null);var r=this.sources[e];if(!r||!(r.path||r.source)||!r.data)return this.emit(`error`,Error(`bad save target: `+e));if(r.source){var o=r.prefix||``;return Object.keys(r.data).forEach(function(e){r.source[o+e]=r.data[e]}),this}var t=t||r.type,s=r.data;return s=r.type===`json`?JSON.stringify(s):a.stringify(s),this._saving++,i.writeFile(r.path,s,`utf8`,function(e){if(this._saving--,e)return n?n(e):this.emit(`error`,e);this._saving===0&&(n&&n(),this.emit(`save`))}.bind(this)),this},f.prototype.addFile=function(e,t,n){n||=e;var r={__source__:n};return this.sources[n]={path:e,type:t},this.push(r),this._await(),i.readFile(e,`utf8`,function(n,i){n&&this.emit(`error`,n),this.addString(i,e,t,r)}.bind(this)),this},f.prototype.addEnv=function(e,t,n){n||=`env`;var r=l.env(e,t);return this.sources[n]={data:r,source:t,prefix:e},this.add(r,n)},f.prototype.addUrl=function(e,t,n){this._await();var r=s.format(e);n||=r;var i={__source__:n};return this.sources[n]={href:r,type:t},this.push(i),c.request(e,function(e){var n=[],a=e.headers[`content-type`];t||(t=a.indexOf(`json`)===-1?a.indexOf(`ini`)===-1?r.match(/\.json$/)?`json`:r.match(/\.ini$/)?`ini`:null:`ini`:`json`,i.type=t),e.on(`data`,n.push.bind(n)).on(`end`,function(){this.addString(Buffer.concat(n),r,t,i)}.bind(this)).on(`error`,this.emit.bind(this,`error`))}.bind(this)).on(`error`,this.emit.bind(this,`error`)).end(),this},f.prototype.addString=function(e,t,n,r){return e=this.parse(e,t,n),this.add(e,r),this},f.prototype.add=function(e,t){if(t&&typeof t==`object`){var n=this.list.indexOf(t);if(n===-1)return this.emit(`error`,Error(`bad marker`));this.splice(n,1,e),t=t.__source__,this.sources[t]=this.sources[t]||{},this.sources[t].data=e,this._resolve()}else typeof t==`string`&&(this.sources[t]=this.sources[t]||{},this.sources[t].data=e),this._await(),this.push(e),process.nextTick(this._resolve.bind(this));return this},f.prototype.parse=l.parse,f.prototype._await=function(){this._awaiting++},f.prototype._resolve=function(){this._awaiting--,this._awaiting===0&&this.emit(`load`,this)}})),we=k(((exports,t)=>{t.exports=function(e){let t=e.indexOf(`:`);if(t===-1)return n(e);let r=e.substr(0,t),i=e.substr(t+1);return`${n(r)}:${n(i)}`};function n(e){if(e=e.toLowerCase(),e===`_authtoken`)return`_authToken`;let t=e[0];for(let n=1;n<e.length;n++)t+=e[n]===`_`?`-`:e[n];return t}})),Te=k((exports=>{Object.defineProperty(exports,`__esModule`,{value:!0});let t=/(?<!\\)(\\*)\$\{([^${}]+)\}/g;function n(e,n){return e.replace(t,r.bind(null,n))}exports.envReplace=n;function r(e,t,n,r){if(n.length%2)return t.slice((n.length+1)/2);let i=a(e,r);if(i===void 0)throw Error(`Failed to replace env in config: ${t}`);return`${n.slice(n.length/2)}${i}`}let i=/([^:-]+)(:?)-(.+)/;function a(e,t){let n=t.match(i);if(!n)return e[t];let[,r,a,o]=n;return Object.prototype.hasOwnProperty.call(e,r)?!e[r]&&a?o:e[r]:o}})),Ee=k((exports=>{Object.defineProperty(exports,`__esModule`,{value:!0}),exports.envReplace=void 0;var t=Te();Object.defineProperty(exports,`envReplace`,{enumerable:!0,get:function(){return t.envReplace}})})),De=k((exports=>{let t=j(`fs`),n=j(`path`),{envReplace:r}=Ee();exports.envReplace=r,exports.findPrefix=e=>{e=n.resolve(e);let r=!1;for(;n.basename(e)===`node_modules`;)e=n.dirname(e),r=!0;if(r)return e;let i=(e,r)=>{if(e===`/`||process.platform===`win32`&&/^[a-zA-Z]:(\\|\/)?$/.test(e))return r;try{let a=t.readdirSync(e);if(a.includes(`node_modules`)||a.includes(`package.json`)||a.includes(`package.json5`)||a.includes(`package.yaml`)||a.includes(`pnpm-workspace.yaml`))return e;let o=n.dirname(e);return o===e?r:i(o,r)}catch(t){if(e===r){if(t.code===`ENOENT`)return r;throw t}return r}};return i(e,e)},exports.parseField=(e,t,i)=>{if(typeof t!=`string`)return t;let a=[].concat(e[i]),o=a.indexOf(n)!==-1,s=a.indexOf(Boolean)!==-1,c=a.indexOf(String)!==-1,l=a.indexOf(Number)!==-1;if(t=`${t}`.trim(),/^".*"$/.test(t))try{t=JSON.parse(t)}catch{throw Error(`Failed parsing JSON config key ${i}: ${t}`)}if(s&&!c&&t===``)return!0;switch(t){case`true`:return!0;case`false`:return!1;case`null`:return null;case`undefined`:return}return t=r(t,process.env),o&&((process.platform===`win32`?/^~(\/|\\)/:/^~\//).test(t)&&process.env.HOME&&(t=n.resolve(process.env.HOME,t.substr(2))),t=n.resolve(t)),l&&!isNaN(t)&&(t=Number(t)),t},exports.parseKey=e=>typeof e==`string`?r(e,process.env):e})),Oe=k((exports=>{let t=j(`path`),n=j(`stream`).Stream,r=j(`url`),i=()=>{},a=()=>[],o=()=>{};exports.types={access:[null,`restricted`,`public`],"allow-same-version":Boolean,"always-auth":Boolean,also:[null,`dev`,`development`],audit:Boolean,"auth-type":[`legacy`,`sso`,`saml`,`oauth`],"bin-links":Boolean,browser:[null,String],ca:[null,String,Array],cafile:t,cache:t,"cache-lock-stale":Number,"cache-lock-retries":Number,"cache-lock-wait":Number,"cache-max":Number,"cache-min":Number,cert:[null,String],cidr:[null,String,Array],color:[`always`,Boolean],depth:Number,description:Boolean,dev:Boolean,"dry-run":Boolean,editor:String,"engine-strict":Boolean,force:Boolean,"fetch-retries":Number,"fetch-retry-factor":Number,"fetch-retry-mintimeout":Number,"fetch-retry-maxtimeout":Number,git:String,"git-tag-version":Boolean,"commit-hooks":Boolean,global:Boolean,globalconfig:t,"global-style":Boolean,group:[Number,String],"https-proxy":[null,r],"user-agent":String,"ham-it-up":Boolean,heading:String,"if-present":Boolean,"ignore-prepublish":Boolean,"ignore-scripts":Boolean,"init-module":t,"init-author-name":String,"init-author-email":String,"init-author-url":[``,r],"init-license":String,"init-version":o,json:Boolean,key:[null,String],"legacy-bundling":Boolean,link:Boolean,"local-address":a(),loglevel:[`silent`,`error`,`warn`,`notice`,`http`,`timing`,`info`,`verbose`,`silly`],logstream:n,"logs-max":Number,long:Boolean,maxsockets:Number,message:String,"metrics-registry":[null,String],"node-options":[null,String],"node-version":[null,o],"no-proxy":[null,String,Array],offline:Boolean,"onload-script":[null,String],only:[null,`dev`,`development`,`prod`,`production`],optional:Boolean,"package-lock":Boolean,otp:[null,String],"package-lock-only":Boolean,parseable:Boolean,"prefer-offline":Boolean,"prefer-online":Boolean,prefix:t,production:Boolean,progress:Boolean,proxy:[null,!1,r],provenance:Boolean,"read-only":Boolean,"rebuild-bundle":Boolean,registry:[null,r],rollback:Boolean,save:Boolean,"save-bundle":Boolean,"save-dev":Boolean,"save-exact":Boolean,"save-optional":Boolean,"save-prefix":String,"save-prod":Boolean,scope:String,"script-shell":[null,String],"scripts-prepend-node-path":[!1,!0,`auto`,`warn-only`],searchopts:String,searchexclude:[null,String],searchlimit:Number,searchstaleness:Number,"send-metrics":Boolean,shell:String,shrinkwrap:Boolean,"sign-git-tag":Boolean,"sso-poll-frequency":Number,"sso-type":[null,`oauth`,`saml`],"strict-ssl":Boolean,tag:String,timing:Boolean,tmp:t,unicode:Boolean,"unsafe-perm":Boolean,usage:Boolean,user:[Number,String],userconfig:t,umask:i,version:Boolean,"tag-version-prefix":String,versions:Boolean,viewer:String,_exit:Boolean}})),ke=k(((exports,t)=>{let{readCAFileSync:n}=xe(),r=j(`fs`),i=j(`path`),{ConfigChain:a}=Ce(),o=we(),s=De();var c=class extends a{constructor(e,t){super(e),this.root=e,this._parseField=s.parseField.bind(null,t||Oe())}add(e,t){try{for(let[t,n]of Object.entries(e)){let r=s.parseKey(t);r!==t&&delete e[t],e[r]=this._parseField(n,r)}}catch(e){throw e}return super.add(e,t)}addFile(e,t){t||=e;let n={__source__:t};this.sources[t]={path:e,type:`ini`},this.push(n),this._await();try{let t=r.readFileSync(e,`utf8`);this.addString(t,e,`ini`,n)}catch(t){if(t.code===`ENOENT`)this.add({},n);else if(t.code!==`EISDIR`)return`Issue while reading "${e}". ${t.message}`}}addEnv(e){e||=process.env;let t={};return Object.keys(e).filter(e=>/^npm_config_/i.test(e)).forEach(n=>{if(!e[n])return;let r=o(n.substr(11)),i=e[n];t[r]=l(r,i)}),super.addEnv(``,t,`env`)}loadPrefix(){let e=this.list[0];Object.defineProperty(this,`prefix`,{enumerable:!0,set:e=>{let t=this.get(`global`);this[t?`globalPrefix`:`localPrefix`]=e},get:()=>this.get(`global`)?this.globalPrefix:this.localPrefix}),Object.defineProperty(this,`globalPrefix`,{enumerable:!0,set:e=>{this.set(`prefix`,e)},get:()=>i.resolve(this.get(`prefix`))});let t;if(Object.defineProperty(this,`localPrefix`,{enumerable:!0,set:e=>{t=e},get:()=>t}),Object.prototype.hasOwnProperty.call(e,`prefix`))t=i.resolve(e.prefix);else try{t=s.findPrefix(process.cwd())}catch(e){throw e}return t}loadCAFile(e){if(!e)return;let t=n(e);t&&this.set(`ca`,t)}loadUser(){let e=this.root;if(this.get(`global`))return;if(process.env.SUDO_UID){e.user=Number(process.env.SUDO_UID);return}let t=i.resolve(this.get(`prefix`));try{e.user=r.statSync(t).uid}catch(e){if(e.code===`ENOENT`)return;throw e}}};function l(e,t){function n(e){return e.indexOf(`
|
|
1639
9
|
|
|
1640
|
-
`)
|
|
10
|
+
`)?e.split(`
|
|
1641
11
|
|
|
1642
|
-
`) : m.
|
|
1643
|
-
|
|
1644
|
-
|
|
1645
|
-
|
|
1646
|
-
|
|
1647
|
-
|
|
1648
|
-
|
|
1649
|
-
|
|
1650
|
-
|
|
1651
|
-
|
|
1652
|
-
|
|
1653
|
-
|
|
1654
|
-
|
|
1655
|
-
|
|
1656
|
-
|
|
1657
|
-
|
|
1658
|
-
|
|
1659
|
-
|
|
1660
|
-
|
|
1661
|
-
|
|
1662
|
-
|
|
1663
|
-
|
|
1664
|
-
|
|
1665
|
-
|
|
1666
|
-
|
|
1667
|
-
|
|
1668
|
-
|
|
1669
|
-
|
|
1670
|
-
|
|
1671
|
-
|
|
1672
|
-
|
|
1673
|
-
|
|
1674
|
-
|
|
1675
|
-
|
|
1676
|
-
|
|
1677
|
-
|
|
1678
|
-
|
|
1679
|
-
|
|
1680
|
-
|
|
1681
|
-
|
|
1682
|
-
|
|
1683
|
-
|
|
1684
|
-
|
|
1685
|
-
|
|
1686
|
-
|
|
1687
|
-
|
|
1688
|
-
|
|
1689
|
-
|
|
1690
|
-
|
|
1691
|
-
|
|
1692
|
-
|
|
1693
|
-
|
|
1694
|
-
|
|
1695
|
-
|
|
1696
|
-
|
|
1697
|
-
|
|
1698
|
-
|
|
1699
|
-
|
|
1700
|
-
|
|
1701
|
-
|
|
1702
|
-
|
|
1703
|
-
|
|
1704
|
-
|
|
1705
|
-
|
|
1706
|
-
|
|
1707
|
-
|
|
1708
|
-
|
|
1709
|
-
|
|
1710
|
-
|
|
1711
|
-
|
|
1712
|
-
|
|
1713
|
-
|
|
1714
|
-
|
|
1715
|
-
|
|
1716
|
-
|
|
1717
|
-
|
|
1718
|
-
key: null,
|
|
1719
|
-
|
|
1720
|
-
link: !1,
|
|
1721
|
-
"local-address": void 0,
|
|
1722
|
-
loglevel: "notice",
|
|
1723
|
-
logstream: process.stderr,
|
|
1724
|
-
"logs-max": 10,
|
|
1725
|
-
long: !1,
|
|
1726
|
-
maxsockets: 50,
|
|
1727
|
-
message: "%s",
|
|
1728
|
-
"metrics-registry": null,
|
|
1729
|
-
"node-options": null,
|
|
1730
|
-
// We remove node-version to fix the issue described here: https://github.com/pnpm/pnpm/issues/4203#issuecomment-1133872769
|
|
1731
|
-
offline: !1,
|
|
1732
|
-
"onload-script": !1,
|
|
1733
|
-
only: null,
|
|
1734
|
-
optional: !0,
|
|
1735
|
-
otp: null,
|
|
1736
|
-
"package-lock": !0,
|
|
1737
|
-
"package-lock-only": !1,
|
|
1738
|
-
parseable: !1,
|
|
1739
|
-
"prefer-offline": !1,
|
|
1740
|
-
"prefer-online": !1,
|
|
1741
|
-
prefix: g,
|
|
1742
|
-
production: process.env.NODE_ENV === "production",
|
|
1743
|
-
progress: !process.env.TRAVIS && !process.env.CI,
|
|
1744
|
-
provenance: !1,
|
|
1745
|
-
proxy: null,
|
|
1746
|
-
"https-proxy": null,
|
|
1747
|
-
"no-proxy": null,
|
|
1748
|
-
"user-agent": "npm/{npm-version} node/{node-version} {platform} {arch}",
|
|
1749
|
-
"read-only": !1,
|
|
1750
|
-
"rebuild-bundle": !0,
|
|
1751
|
-
registry: "https://registry.npmjs.org/",
|
|
1752
|
-
rollback: !0,
|
|
1753
|
-
save: !0,
|
|
1754
|
-
"save-bundle": !1,
|
|
1755
|
-
"save-dev": !1,
|
|
1756
|
-
"save-exact": !1,
|
|
1757
|
-
"save-optional": !1,
|
|
1758
|
-
"save-prefix": "^",
|
|
1759
|
-
"save-prod": !1,
|
|
1760
|
-
scope: "",
|
|
1761
|
-
"script-shell": null,
|
|
1762
|
-
"scripts-prepend-node-path": "warn-only",
|
|
1763
|
-
searchopts: "",
|
|
1764
|
-
searchexclude: null,
|
|
1765
|
-
searchlimit: 20,
|
|
1766
|
-
searchstaleness: 900,
|
|
1767
|
-
"send-metrics": !1,
|
|
1768
|
-
shell: s.shell(),
|
|
1769
|
-
shrinkwrap: !0,
|
|
1770
|
-
"sign-git-tag": !1,
|
|
1771
|
-
"sso-poll-frequency": 500,
|
|
1772
|
-
"sso-type": "oauth",
|
|
1773
|
-
"strict-ssl": !0,
|
|
1774
|
-
tag: "latest",
|
|
1775
|
-
"tag-version-prefix": "v",
|
|
1776
|
-
timing: !1,
|
|
1777
|
-
tmp: i,
|
|
1778
|
-
unicode: a(),
|
|
1779
|
-
"unsafe-perm": process.platform === "win32" || process.platform === "cygwin" || !(process.getuid && process.setuid && process.getgid && process.setgid) || process.getuid() !== 0,
|
|
1780
|
-
usage: !1,
|
|
1781
|
-
user: process.platform === "win32" ? 0 : "nobody",
|
|
1782
|
-
userconfig: r.resolve(l, ".npmrc"),
|
|
1783
|
-
umask: process.umask ? process.umask() : u.fromString("022"),
|
|
1784
|
-
version: !1,
|
|
1785
|
-
versions: !1,
|
|
1786
|
-
viewer: process.platform === "win32" ? "browser" : "man",
|
|
1787
|
-
_exit: !0
|
|
1788
|
-
}, h);
|
|
1789
|
-
}
|
|
1790
|
-
});
|
|
1791
|
-
})(tt)), tt;
|
|
1792
|
-
}
|
|
1793
|
-
var Xr;
|
|
1794
|
-
function ds() {
|
|
1795
|
-
return Xr || (Xr = 1, (function(e) {
|
|
1796
|
-
const t = ce, r = ps(), i = hs();
|
|
1797
|
-
e.exports = (o, a, n) => {
|
|
1798
|
-
const s = new r(Object.assign({}, i.defaults, n), a);
|
|
1799
|
-
s.add(Object.assign({}, o), "cli");
|
|
1800
|
-
const u = [];
|
|
1801
|
-
let l = !1;
|
|
1802
|
-
if (require.resolve.paths) {
|
|
1803
|
-
const h = require.resolve.paths("npm");
|
|
1804
|
-
let g;
|
|
1805
|
-
try {
|
|
1806
|
-
g = require.resolve("npm", { paths: h.slice(-1) });
|
|
1807
|
-
} catch {
|
|
1808
|
-
l = !0;
|
|
1809
|
-
}
|
|
1810
|
-
g && u.push(s.addFile(t.resolve(t.dirname(g), "..", "npmrc"), "builtin"));
|
|
1811
|
-
}
|
|
1812
|
-
s.addEnv(), s.loadPrefix();
|
|
1813
|
-
const c = t.resolve(s.localPrefix, ".npmrc"), m = s.get("userconfig");
|
|
1814
|
-
if (!s.get("global") && c !== m ? u.push(s.addFile(c, "project")) : s.add({}, "project"), s.get("workspace-prefix") && s.get("workspace-prefix") !== c) {
|
|
1815
|
-
const h = t.resolve(s.get("workspace-prefix"), ".npmrc");
|
|
1816
|
-
u.push(s.addFile(h, "workspace"));
|
|
1817
|
-
}
|
|
1818
|
-
if (u.push(s.addFile(s.get("userconfig"), "user")), s.get("prefix")) {
|
|
1819
|
-
const h = t.resolve(s.get("prefix"), "etc");
|
|
1820
|
-
s.root.globalconfig = t.resolve(h, "npmrc"), s.root.globalignorefile = t.resolve(h, "npmignore");
|
|
1821
|
-
}
|
|
1822
|
-
u.push(s.addFile(s.get("globalconfig"), "global")), s.loadUser();
|
|
1823
|
-
const p = s.get("cafile");
|
|
1824
|
-
return p && s.loadCAFile(p), {
|
|
1825
|
-
config: s,
|
|
1826
|
-
warnings: u.filter(Boolean),
|
|
1827
|
-
failedToLoadBuiltInConfig: l
|
|
1828
|
-
};
|
|
1829
|
-
}, Object.defineProperty(e.exports, "defaults", {
|
|
1830
|
-
get() {
|
|
1831
|
-
return i.defaults;
|
|
1832
|
-
},
|
|
1833
|
-
enumerable: !0
|
|
1834
|
-
});
|
|
1835
|
-
})(Xe)), Xe.exports;
|
|
1836
|
-
}
|
|
1837
|
-
var rt, Wr;
|
|
1838
|
-
function ms() {
|
|
1839
|
-
if (Wr) return rt;
|
|
1840
|
-
Wr = 1;
|
|
1841
|
-
const e = ds(), t = ":_authToken", r = ":_auth", i = ":username", o = ":_password";
|
|
1842
|
-
rt = function() {
|
|
1843
|
-
let d, f;
|
|
1844
|
-
arguments.length >= 2 ? (d = arguments[0], f = Object.assign({}, arguments[1])) : typeof arguments[0] == "string" ? d = arguments[0] : f = Object.assign({}, arguments[0]), f = f || {};
|
|
1845
|
-
const v = f.npmrc;
|
|
1846
|
-
return f.npmrc = (f.npmrc ? {
|
|
1847
|
-
config: {
|
|
1848
|
-
get: (E) => v[E]
|
|
1849
|
-
}
|
|
1850
|
-
} : e()).config, d = d || f.npmrc.get("registry") || e.defaults.registry, n(d, f) || s(f.npmrc);
|
|
1851
|
-
};
|
|
1852
|
-
function a(g, d) {
|
|
1853
|
-
const f = new URL(d, new URL(g.startsWith("//") ? `./${g}` : g, "resolve://"));
|
|
1854
|
-
if (f.protocol === "resolve:") {
|
|
1855
|
-
const { pathname: v, search: E, hash: y } = f;
|
|
1856
|
-
return v + E + y;
|
|
1857
|
-
}
|
|
1858
|
-
return f.toString();
|
|
1859
|
-
}
|
|
1860
|
-
function n(g, d) {
|
|
1861
|
-
let f = g instanceof URL ? g : new URL(g.startsWith("//") ? `http:${g}` : g), v;
|
|
1862
|
-
for (; v !== "/" && f.pathname !== v; ) {
|
|
1863
|
-
v = f.pathname || "/";
|
|
1864
|
-
const E = "//" + f.host + v.replace(/\/$/, ""), y = l(E, d.npmrc);
|
|
1865
|
-
if (y)
|
|
1866
|
-
return y;
|
|
1867
|
-
if (!d.recursive)
|
|
1868
|
-
return /\/$/.test(g) ? void 0 : n(new URL("./", f), d);
|
|
1869
|
-
f.pathname = a(u(v), "..") || "/";
|
|
1870
|
-
}
|
|
1871
|
-
}
|
|
1872
|
-
function s(g) {
|
|
1873
|
-
return g.get("_auth") ? { token: c(g.get("_auth")), type: "Basic" } : void 0;
|
|
1874
|
-
}
|
|
1875
|
-
function u(g) {
|
|
1876
|
-
return g[g.length - 1] === "/" ? g : g + "/";
|
|
1877
|
-
}
|
|
1878
|
-
function l(g, d) {
|
|
1879
|
-
const f = m(d.get(g + t) || d.get(g + "/" + t));
|
|
1880
|
-
if (f)
|
|
1881
|
-
return f;
|
|
1882
|
-
const v = d.get(g + i) || d.get(g + "/" + i), E = d.get(g + o) || d.get(g + "/" + o), y = p(v, E);
|
|
1883
|
-
if (y)
|
|
1884
|
-
return y;
|
|
1885
|
-
const $ = h(d.get(g + r) || d.get(g + "/" + r));
|
|
1886
|
-
if ($)
|
|
1887
|
-
return $;
|
|
1888
|
-
}
|
|
1889
|
-
function c(g) {
|
|
1890
|
-
return g.replace(/^\$\{?([^}]*)\}?$/, function(d, f) {
|
|
1891
|
-
return process.env[f];
|
|
1892
|
-
});
|
|
1893
|
-
}
|
|
1894
|
-
function m(g) {
|
|
1895
|
-
return g ? { token: c(g), type: "Bearer" } : void 0;
|
|
1896
|
-
}
|
|
1897
|
-
function p(g, d) {
|
|
1898
|
-
if (!g || !d)
|
|
1899
|
-
return;
|
|
1900
|
-
const f = Buffer.from(c(d), "base64").toString("utf8");
|
|
1901
|
-
return {
|
|
1902
|
-
token: Buffer.from(g + ":" + f, "utf8").toString("base64"),
|
|
1903
|
-
type: "Basic",
|
|
1904
|
-
password: f,
|
|
1905
|
-
username: g
|
|
1906
|
-
};
|
|
1907
|
-
}
|
|
1908
|
-
function h(g) {
|
|
1909
|
-
return g ? { token: c(g), type: "Basic" } : void 0;
|
|
1910
|
-
}
|
|
1911
|
-
return rt;
|
|
1912
|
-
}
|
|
1913
|
-
var gs = ms();
|
|
1914
|
-
const nt = /* @__PURE__ */ sr(gs);
|
|
1915
|
-
function vs(e, t) {
|
|
1916
|
-
let r = e.slice(0, t).split(/\r\n|\n|\r/g);
|
|
1917
|
-
return [r.length, r.pop().length + 1];
|
|
1918
|
-
}
|
|
1919
|
-
function ys(e, t, r) {
|
|
1920
|
-
let i = e.split(/\r\n|\n|\r/g), o = "", a = (Math.log10(t + 1) | 0) + 1;
|
|
1921
|
-
for (let n = t - 1; n <= t + 1; n++) {
|
|
1922
|
-
let s = i[n - 1];
|
|
1923
|
-
s && (o += n.toString().padEnd(a, " "), o += ": ", o += s, o += `
|
|
1924
|
-
`, n === t && (o += " ".repeat(a + r + 2), o += `^
|
|
1925
|
-
`));
|
|
1926
|
-
}
|
|
1927
|
-
return o;
|
|
1928
|
-
}
|
|
1929
|
-
class F extends Error {
|
|
1930
|
-
line;
|
|
1931
|
-
column;
|
|
1932
|
-
codeblock;
|
|
1933
|
-
constructor(t, r) {
|
|
1934
|
-
const [i, o] = vs(r.toml, r.ptr), a = ys(r.toml, i, o);
|
|
1935
|
-
super(`Invalid TOML document: ${t}
|
|
1936
|
-
|
|
1937
|
-
${a}`, r), this.line = i, this.column = o, this.codeblock = a;
|
|
1938
|
-
}
|
|
1939
|
-
}
|
|
1940
|
-
function Es(e, t) {
|
|
1941
|
-
let r = 0;
|
|
1942
|
-
for (; e[t - ++r] === "\\"; )
|
|
1943
|
-
;
|
|
1944
|
-
return --r && r % 2;
|
|
1945
|
-
}
|
|
1946
|
-
function Pe(e, t = 0, r = e.length) {
|
|
1947
|
-
let i = e.indexOf(`
|
|
1948
|
-
`, t);
|
|
1949
|
-
return e[i - 1] === "\r" && i--, i <= r ? i : -1;
|
|
1950
|
-
}
|
|
1951
|
-
function or(e, t) {
|
|
1952
|
-
for (let r = t; r < e.length; r++) {
|
|
1953
|
-
let i = e[r];
|
|
1954
|
-
if (i === `
|
|
1955
|
-
`)
|
|
1956
|
-
return r;
|
|
1957
|
-
if (i === "\r" && e[r + 1] === `
|
|
1958
|
-
`)
|
|
1959
|
-
return r + 1;
|
|
1960
|
-
if (i < " " && i !== " " || i === "")
|
|
1961
|
-
throw new F("control characters are not allowed in comments", {
|
|
1962
|
-
toml: e,
|
|
1963
|
-
ptr: t
|
|
1964
|
-
});
|
|
1965
|
-
}
|
|
1966
|
-
return e.length;
|
|
1967
|
-
}
|
|
1968
|
-
function se(e, t, r, i) {
|
|
1969
|
-
let o;
|
|
1970
|
-
for (; (o = e[t]) === " " || o === " " || !r && (o === `
|
|
1971
|
-
` || o === "\r" && e[t + 1] === `
|
|
1972
|
-
`); )
|
|
1973
|
-
t++;
|
|
1974
|
-
return i || o !== "#" ? t : se(e, or(e, t), r);
|
|
1975
|
-
}
|
|
1976
|
-
function Hr(e, t, r, i, o = !1) {
|
|
1977
|
-
if (!i)
|
|
1978
|
-
return t = Pe(e, t), t < 0 ? e.length : t;
|
|
1979
|
-
for (let a = t; a < e.length; a++) {
|
|
1980
|
-
let n = e[a];
|
|
1981
|
-
if (n === "#")
|
|
1982
|
-
a = Pe(e, a);
|
|
1983
|
-
else {
|
|
1984
|
-
if (n === r)
|
|
1985
|
-
return a + 1;
|
|
1986
|
-
if (n === i || o && (n === `
|
|
1987
|
-
` || n === "\r" && e[a + 1] === `
|
|
1988
|
-
`))
|
|
1989
|
-
return a;
|
|
1990
|
-
}
|
|
1991
|
-
}
|
|
1992
|
-
throw new F("cannot find end of structure", {
|
|
1993
|
-
toml: e,
|
|
1994
|
-
ptr: t
|
|
1995
|
-
});
|
|
1996
|
-
}
|
|
1997
|
-
function ui(e, t) {
|
|
1998
|
-
let r = e[t], i = r === e[t + 1] && e[t + 1] === e[t + 2] ? e.slice(t, t + 3) : r;
|
|
1999
|
-
t += i.length - 1;
|
|
2000
|
-
do
|
|
2001
|
-
t = e.indexOf(i, ++t);
|
|
2002
|
-
while (t > -1 && r !== "'" && Es(e, t));
|
|
2003
|
-
return t > -1 && (t += i.length, i.length > 1 && (e[t] === r && t++, e[t] === r && t++)), t;
|
|
2004
|
-
}
|
|
2005
|
-
let ws = /^(\d{4}-\d{2}-\d{2})?[T ]?(?:(\d{2}):\d{2}:\d{2}(?:\.\d+)?)?(Z|[-+]\d{2}:\d{2})?$/i;
|
|
2006
|
-
class ve extends Date {
|
|
2007
|
-
#t = !1;
|
|
2008
|
-
#r = !1;
|
|
2009
|
-
#e = null;
|
|
2010
|
-
constructor(t) {
|
|
2011
|
-
let r = !0, i = !0, o = "Z";
|
|
2012
|
-
if (typeof t == "string") {
|
|
2013
|
-
let a = t.match(ws);
|
|
2014
|
-
a ? (a[1] || (r = !1, t = `0000-01-01T${t}`), i = !!a[2], i && t[10] === " " && (t = t.replace(" ", "T")), a[2] && +a[2] > 23 ? t = "" : (o = a[3] || null, t = t.toUpperCase(), !o && i && (t += "Z"))) : t = "";
|
|
2015
|
-
}
|
|
2016
|
-
super(t), isNaN(this.getTime()) || (this.#t = r, this.#r = i, this.#e = o);
|
|
2017
|
-
}
|
|
2018
|
-
isDateTime() {
|
|
2019
|
-
return this.#t && this.#r;
|
|
2020
|
-
}
|
|
2021
|
-
isLocal() {
|
|
2022
|
-
return !this.#t || !this.#r || !this.#e;
|
|
2023
|
-
}
|
|
2024
|
-
isDate() {
|
|
2025
|
-
return this.#t && !this.#r;
|
|
2026
|
-
}
|
|
2027
|
-
isTime() {
|
|
2028
|
-
return this.#r && !this.#t;
|
|
2029
|
-
}
|
|
2030
|
-
isValid() {
|
|
2031
|
-
return this.#t || this.#r;
|
|
2032
|
-
}
|
|
2033
|
-
toISOString() {
|
|
2034
|
-
let t = super.toISOString();
|
|
2035
|
-
if (this.isDate())
|
|
2036
|
-
return t.slice(0, 10);
|
|
2037
|
-
if (this.isTime())
|
|
2038
|
-
return t.slice(11, 23);
|
|
2039
|
-
if (this.#e === null)
|
|
2040
|
-
return t.slice(0, -1);
|
|
2041
|
-
if (this.#e === "Z")
|
|
2042
|
-
return t;
|
|
2043
|
-
let r = +this.#e.slice(1, 3) * 60 + +this.#e.slice(4, 6);
|
|
2044
|
-
return r = this.#e[0] === "-" ? r : -r, new Date(this.getTime() - r * 6e4).toISOString().slice(0, -1) + this.#e;
|
|
2045
|
-
}
|
|
2046
|
-
static wrapAsOffsetDateTime(t, r = "Z") {
|
|
2047
|
-
let i = new ve(t);
|
|
2048
|
-
return i.#e = r, i;
|
|
2049
|
-
}
|
|
2050
|
-
static wrapAsLocalDateTime(t) {
|
|
2051
|
-
let r = new ve(t);
|
|
2052
|
-
return r.#e = null, r;
|
|
2053
|
-
}
|
|
2054
|
-
static wrapAsLocalDate(t) {
|
|
2055
|
-
let r = new ve(t);
|
|
2056
|
-
return r.#r = !1, r.#e = null, r;
|
|
2057
|
-
}
|
|
2058
|
-
static wrapAsLocalTime(t) {
|
|
2059
|
-
let r = new ve(t);
|
|
2060
|
-
return r.#t = !1, r.#e = null, r;
|
|
2061
|
-
}
|
|
2062
|
-
}
|
|
2063
|
-
let $s = /^((0x[0-9a-fA-F](_?[0-9a-fA-F])*)|(([+-]|0[ob])?\d(_?\d)*))$/, Rs = /^[+-]?\d(_?\d)*(\.\d(_?\d)*)?([eE][+-]?\d(_?\d)*)?$/, Ss = /^[+-]?0[0-9_]/, Os = /^[0-9a-f]{4,8}$/i, zr = {
|
|
2064
|
-
b: "\b",
|
|
2065
|
-
t: " ",
|
|
2066
|
-
n: `
|
|
2067
|
-
`,
|
|
2068
|
-
f: "\f",
|
|
2069
|
-
r: "\r",
|
|
2070
|
-
'"': '"',
|
|
2071
|
-
"\\": "\\"
|
|
2072
|
-
};
|
|
2073
|
-
function fi(e, t = 0, r = e.length) {
|
|
2074
|
-
let i = e[t] === "'", o = e[t++] === e[t] && e[t] === e[t + 1];
|
|
2075
|
-
o && (r -= 2, e[t += 2] === "\r" && t++, e[t] === `
|
|
2076
|
-
` && t++);
|
|
2077
|
-
let a = 0, n, s = "", u = t;
|
|
2078
|
-
for (; t < r - 1; ) {
|
|
2079
|
-
let l = e[t++];
|
|
2080
|
-
if (l === `
|
|
2081
|
-
` || l === "\r" && e[t] === `
|
|
2082
|
-
`) {
|
|
2083
|
-
if (!o)
|
|
2084
|
-
throw new F("newlines are not allowed in strings", {
|
|
2085
|
-
toml: e,
|
|
2086
|
-
ptr: t - 1
|
|
2087
|
-
});
|
|
2088
|
-
} else if (l < " " && l !== " " || l === "")
|
|
2089
|
-
throw new F("control characters are not allowed in strings", {
|
|
2090
|
-
toml: e,
|
|
2091
|
-
ptr: t - 1
|
|
2092
|
-
});
|
|
2093
|
-
if (n) {
|
|
2094
|
-
if (n = !1, l === "u" || l === "U") {
|
|
2095
|
-
let c = e.slice(t, t += l === "u" ? 4 : 8);
|
|
2096
|
-
if (!Os.test(c))
|
|
2097
|
-
throw new F("invalid unicode escape", {
|
|
2098
|
-
toml: e,
|
|
2099
|
-
ptr: a
|
|
2100
|
-
});
|
|
2101
|
-
try {
|
|
2102
|
-
s += String.fromCodePoint(parseInt(c, 16));
|
|
2103
|
-
} catch {
|
|
2104
|
-
throw new F("invalid unicode escape", {
|
|
2105
|
-
toml: e,
|
|
2106
|
-
ptr: a
|
|
2107
|
-
});
|
|
2108
|
-
}
|
|
2109
|
-
} else if (o && (l === `
|
|
2110
|
-
` || l === " " || l === " " || l === "\r")) {
|
|
2111
|
-
if (t = se(e, t - 1, !0), e[t] !== `
|
|
2112
|
-
` && e[t] !== "\r")
|
|
2113
|
-
throw new F("invalid escape: only line-ending whitespace may be escaped", {
|
|
2114
|
-
toml: e,
|
|
2115
|
-
ptr: a
|
|
2116
|
-
});
|
|
2117
|
-
t = se(e, t);
|
|
2118
|
-
} else if (l in zr)
|
|
2119
|
-
s += zr[l];
|
|
2120
|
-
else
|
|
2121
|
-
throw new F("unrecognized escape sequence", {
|
|
2122
|
-
toml: e,
|
|
2123
|
-
ptr: a
|
|
2124
|
-
});
|
|
2125
|
-
u = t;
|
|
2126
|
-
} else !i && l === "\\" && (a = t - 1, n = !0, s += e.slice(u, a));
|
|
2127
|
-
}
|
|
2128
|
-
return s + e.slice(u, r - 1);
|
|
2129
|
-
}
|
|
2130
|
-
function bs(e, t, r, i) {
|
|
2131
|
-
if (e === "true")
|
|
2132
|
-
return !0;
|
|
2133
|
-
if (e === "false")
|
|
2134
|
-
return !1;
|
|
2135
|
-
if (e === "-inf")
|
|
2136
|
-
return -1 / 0;
|
|
2137
|
-
if (e === "inf" || e === "+inf")
|
|
2138
|
-
return 1 / 0;
|
|
2139
|
-
if (e === "nan" || e === "+nan" || e === "-nan")
|
|
2140
|
-
return NaN;
|
|
2141
|
-
if (e === "-0")
|
|
2142
|
-
return i ? 0n : 0;
|
|
2143
|
-
let o = $s.test(e);
|
|
2144
|
-
if (o || Rs.test(e)) {
|
|
2145
|
-
if (Ss.test(e))
|
|
2146
|
-
throw new F("leading zeroes are not allowed", {
|
|
2147
|
-
toml: t,
|
|
2148
|
-
ptr: r
|
|
2149
|
-
});
|
|
2150
|
-
e = e.replace(/_/g, "");
|
|
2151
|
-
let n = +e;
|
|
2152
|
-
if (isNaN(n))
|
|
2153
|
-
throw new F("invalid number", {
|
|
2154
|
-
toml: t,
|
|
2155
|
-
ptr: r
|
|
2156
|
-
});
|
|
2157
|
-
if (o) {
|
|
2158
|
-
if ((o = !Number.isSafeInteger(n)) && !i)
|
|
2159
|
-
throw new F("integer value cannot be represented losslessly", {
|
|
2160
|
-
toml: t,
|
|
2161
|
-
ptr: r
|
|
2162
|
-
});
|
|
2163
|
-
(o || i === !0) && (n = BigInt(e));
|
|
2164
|
-
}
|
|
2165
|
-
return n;
|
|
2166
|
-
}
|
|
2167
|
-
const a = new ve(e);
|
|
2168
|
-
if (!a.isValid())
|
|
2169
|
-
throw new F("invalid value", {
|
|
2170
|
-
toml: t,
|
|
2171
|
-
ptr: r
|
|
2172
|
-
});
|
|
2173
|
-
return a;
|
|
2174
|
-
}
|
|
2175
|
-
function Is(e, t, r, i) {
|
|
2176
|
-
let o = e.slice(t, r), a = o.indexOf("#");
|
|
2177
|
-
a > -1 && (or(e, a), o = o.slice(0, a));
|
|
2178
|
-
let n = o.trimEnd();
|
|
2179
|
-
if (!i) {
|
|
2180
|
-
let s = o.indexOf(`
|
|
2181
|
-
`, n.length);
|
|
2182
|
-
if (s > -1)
|
|
2183
|
-
throw new F("newlines are not allowed in inline tables", {
|
|
2184
|
-
toml: e,
|
|
2185
|
-
ptr: t + s
|
|
2186
|
-
});
|
|
2187
|
-
}
|
|
2188
|
-
return [n, a];
|
|
2189
|
-
}
|
|
2190
|
-
function ar(e, t, r, i, o) {
|
|
2191
|
-
if (i === 0)
|
|
2192
|
-
throw new F("document contains excessively nested structures. aborting.", {
|
|
2193
|
-
toml: e,
|
|
2194
|
-
ptr: t
|
|
2195
|
-
});
|
|
2196
|
-
let a = e[t];
|
|
2197
|
-
if (a === "[" || a === "{") {
|
|
2198
|
-
let [u, l] = a === "[" ? As(e, t, i, o) : Ns(e, t, i, o), c = r ? Hr(e, l, ",", r) : l;
|
|
2199
|
-
if (l - c && r === "}") {
|
|
2200
|
-
let m = Pe(e, l, c);
|
|
2201
|
-
if (m > -1)
|
|
2202
|
-
throw new F("newlines are not allowed in inline tables", {
|
|
2203
|
-
toml: e,
|
|
2204
|
-
ptr: m
|
|
2205
|
-
});
|
|
2206
|
-
}
|
|
2207
|
-
return [u, c];
|
|
2208
|
-
}
|
|
2209
|
-
let n;
|
|
2210
|
-
if (a === '"' || a === "'") {
|
|
2211
|
-
n = ui(e, t);
|
|
2212
|
-
let u = fi(e, t, n);
|
|
2213
|
-
if (r) {
|
|
2214
|
-
if (n = se(e, n, r !== "]"), e[n] && e[n] !== "," && e[n] !== r && e[n] !== `
|
|
2215
|
-
` && e[n] !== "\r")
|
|
2216
|
-
throw new F("unexpected character encountered", {
|
|
2217
|
-
toml: e,
|
|
2218
|
-
ptr: n
|
|
2219
|
-
});
|
|
2220
|
-
n += +(e[n] === ",");
|
|
2221
|
-
}
|
|
2222
|
-
return [u, n];
|
|
2223
|
-
}
|
|
2224
|
-
n = Hr(e, t, ",", r);
|
|
2225
|
-
let s = Is(e, t, n - +(e[n - 1] === ","), r === "]");
|
|
2226
|
-
if (!s[0])
|
|
2227
|
-
throw new F("incomplete key-value declaration: no value specified", {
|
|
2228
|
-
toml: e,
|
|
2229
|
-
ptr: t
|
|
2230
|
-
});
|
|
2231
|
-
return r && s[1] > -1 && (n = se(e, t + s[1]), n += +(e[n] === ",")), [
|
|
2232
|
-
bs(s[0], e, t, o),
|
|
2233
|
-
n
|
|
2234
|
-
];
|
|
2235
|
-
}
|
|
2236
|
-
let _s = /^[a-zA-Z0-9-_]+[ \t]*$/;
|
|
2237
|
-
function Qt(e, t, r = "=") {
|
|
2238
|
-
let i = t - 1, o = [], a = e.indexOf(r, t);
|
|
2239
|
-
if (a < 0)
|
|
2240
|
-
throw new F("incomplete key-value: cannot find end of key", {
|
|
2241
|
-
toml: e,
|
|
2242
|
-
ptr: t
|
|
2243
|
-
});
|
|
2244
|
-
do {
|
|
2245
|
-
let n = e[t = ++i];
|
|
2246
|
-
if (n !== " " && n !== " ")
|
|
2247
|
-
if (n === '"' || n === "'") {
|
|
2248
|
-
if (n === e[t + 1] && n === e[t + 2])
|
|
2249
|
-
throw new F("multiline strings are not allowed in keys", {
|
|
2250
|
-
toml: e,
|
|
2251
|
-
ptr: t
|
|
2252
|
-
});
|
|
2253
|
-
let s = ui(e, t);
|
|
2254
|
-
if (s < 0)
|
|
2255
|
-
throw new F("unfinished string encountered", {
|
|
2256
|
-
toml: e,
|
|
2257
|
-
ptr: t
|
|
2258
|
-
});
|
|
2259
|
-
i = e.indexOf(".", s);
|
|
2260
|
-
let u = e.slice(s, i < 0 || i > a ? a : i), l = Pe(u);
|
|
2261
|
-
if (l > -1)
|
|
2262
|
-
throw new F("newlines are not allowed in keys", {
|
|
2263
|
-
toml: e,
|
|
2264
|
-
ptr: t + i + l
|
|
2265
|
-
});
|
|
2266
|
-
if (u.trimStart())
|
|
2267
|
-
throw new F("found extra tokens after the string part", {
|
|
2268
|
-
toml: e,
|
|
2269
|
-
ptr: s
|
|
2270
|
-
});
|
|
2271
|
-
if (a < s && (a = e.indexOf(r, s), a < 0))
|
|
2272
|
-
throw new F("incomplete key-value: cannot find end of key", {
|
|
2273
|
-
toml: e,
|
|
2274
|
-
ptr: t
|
|
2275
|
-
});
|
|
2276
|
-
o.push(fi(e, t, s));
|
|
2277
|
-
} else {
|
|
2278
|
-
i = e.indexOf(".", t);
|
|
2279
|
-
let s = e.slice(t, i < 0 || i > a ? a : i);
|
|
2280
|
-
if (!_s.test(s))
|
|
2281
|
-
throw new F("only letter, numbers, dashes and underscores are allowed in keys", {
|
|
2282
|
-
toml: e,
|
|
2283
|
-
ptr: t
|
|
2284
|
-
});
|
|
2285
|
-
o.push(s.trimEnd());
|
|
2286
|
-
}
|
|
2287
|
-
} while (i + 1 && i < a);
|
|
2288
|
-
return [o, se(e, a + 1, !0, !0)];
|
|
2289
|
-
}
|
|
2290
|
-
function Ns(e, t, r, i) {
|
|
2291
|
-
let o = {}, a = /* @__PURE__ */ new Set(), n, s = 0;
|
|
2292
|
-
for (t++; (n = e[t++]) !== "}" && n; ) {
|
|
2293
|
-
let u = { toml: e, ptr: t - 1 };
|
|
2294
|
-
if (n === `
|
|
2295
|
-
`)
|
|
2296
|
-
throw new F("newlines are not allowed in inline tables", u);
|
|
2297
|
-
if (n === "#")
|
|
2298
|
-
throw new F("inline tables cannot contain comments", u);
|
|
2299
|
-
if (n === ",")
|
|
2300
|
-
throw new F("expected key-value, found comma", u);
|
|
2301
|
-
if (n !== " " && n !== " ") {
|
|
2302
|
-
let l, c = o, m = !1, [p, h] = Qt(e, t - 1);
|
|
2303
|
-
for (let f = 0; f < p.length; f++) {
|
|
2304
|
-
if (f && (c = m ? c[l] : c[l] = {}), l = p[f], (m = Object.hasOwn(c, l)) && (typeof c[l] != "object" || a.has(c[l])))
|
|
2305
|
-
throw new F("trying to redefine an already defined value", {
|
|
2306
|
-
toml: e,
|
|
2307
|
-
ptr: t
|
|
2308
|
-
});
|
|
2309
|
-
!m && l === "__proto__" && Object.defineProperty(c, l, { enumerable: !0, configurable: !0, writable: !0 });
|
|
2310
|
-
}
|
|
2311
|
-
if (m)
|
|
2312
|
-
throw new F("trying to redefine an already defined value", {
|
|
2313
|
-
toml: e,
|
|
2314
|
-
ptr: t
|
|
2315
|
-
});
|
|
2316
|
-
let [g, d] = ar(e, h, "}", r - 1, i);
|
|
2317
|
-
a.add(g), c[l] = g, t = d, s = e[t - 1] === "," ? t - 1 : 0;
|
|
2318
|
-
}
|
|
2319
|
-
}
|
|
2320
|
-
if (s)
|
|
2321
|
-
throw new F("trailing commas are not allowed in inline tables", {
|
|
2322
|
-
toml: e,
|
|
2323
|
-
ptr: s
|
|
2324
|
-
});
|
|
2325
|
-
if (!n)
|
|
2326
|
-
throw new F("unfinished table encountered", {
|
|
2327
|
-
toml: e,
|
|
2328
|
-
ptr: t
|
|
2329
|
-
});
|
|
2330
|
-
return [o, t];
|
|
2331
|
-
}
|
|
2332
|
-
function As(e, t, r, i) {
|
|
2333
|
-
let o = [], a;
|
|
2334
|
-
for (t++; (a = e[t++]) !== "]" && a; ) {
|
|
2335
|
-
if (a === ",")
|
|
2336
|
-
throw new F("expected value, found comma", {
|
|
2337
|
-
toml: e,
|
|
2338
|
-
ptr: t - 1
|
|
2339
|
-
});
|
|
2340
|
-
if (a === "#")
|
|
2341
|
-
t = or(e, t);
|
|
2342
|
-
else if (a !== " " && a !== " " && a !== `
|
|
2343
|
-
` && a !== "\r") {
|
|
2344
|
-
let n = ar(e, t - 1, "]", r - 1, i);
|
|
2345
|
-
o.push(n[0]), t = n[1];
|
|
2346
|
-
}
|
|
2347
|
-
}
|
|
2348
|
-
if (!a)
|
|
2349
|
-
throw new F("unfinished array encountered", {
|
|
2350
|
-
toml: e,
|
|
2351
|
-
ptr: t
|
|
2352
|
-
});
|
|
2353
|
-
return [o, t];
|
|
2354
|
-
}
|
|
2355
|
-
function Kr(e, t, r, i) {
|
|
2356
|
-
let o = t, a = r, n, s = !1, u;
|
|
2357
|
-
for (let l = 0; l < e.length; l++) {
|
|
2358
|
-
if (l) {
|
|
2359
|
-
if (o = s ? o[n] : o[n] = {}, a = (u = a[n]).c, i === 0 && (u.t === 1 || u.t === 2))
|
|
2360
|
-
return null;
|
|
2361
|
-
if (u.t === 2) {
|
|
2362
|
-
let c = o.length - 1;
|
|
2363
|
-
o = o[c], a = a[c].c;
|
|
2364
|
-
}
|
|
2365
|
-
}
|
|
2366
|
-
if (n = e[l], (s = Object.hasOwn(o, n)) && a[n]?.t === 0 && a[n]?.d)
|
|
2367
|
-
return null;
|
|
2368
|
-
s || (n === "__proto__" && (Object.defineProperty(o, n, { enumerable: !0, configurable: !0, writable: !0 }), Object.defineProperty(a, n, { enumerable: !0, configurable: !0, writable: !0 })), a[n] = {
|
|
2369
|
-
t: l < e.length - 1 && i === 2 ? 3 : i,
|
|
2370
|
-
d: !1,
|
|
2371
|
-
i: 0,
|
|
2372
|
-
c: {}
|
|
2373
|
-
});
|
|
2374
|
-
}
|
|
2375
|
-
if (u = a[n], u.t !== i && !(i === 1 && u.t === 3) || (i === 2 && (u.d || (u.d = !0, o[n] = []), o[n].push(o = {}), u.c[u.i++] = u = { t: 1, d: !1, i: 0, c: {} }), u.d))
|
|
2376
|
-
return null;
|
|
2377
|
-
if (u.d = !0, i === 1)
|
|
2378
|
-
o = s ? o[n] : o[n] = {};
|
|
2379
|
-
else if (i === 0 && s)
|
|
2380
|
-
return null;
|
|
2381
|
-
return [n, o, u.c];
|
|
2382
|
-
}
|
|
2383
|
-
function Ts(e, { maxDepth: t = 1e3, integersAsBigInt: r } = {}) {
|
|
2384
|
-
let i = {}, o = {}, a = i, n = o;
|
|
2385
|
-
for (let s = se(e, 0); s < e.length; ) {
|
|
2386
|
-
if (e[s] === "[") {
|
|
2387
|
-
let u = e[++s] === "[", l = Qt(e, s += +u, "]");
|
|
2388
|
-
if (u) {
|
|
2389
|
-
if (e[l[1] - 1] !== "]")
|
|
2390
|
-
throw new F("expected end of table declaration", {
|
|
2391
|
-
toml: e,
|
|
2392
|
-
ptr: l[1] - 1
|
|
2393
|
-
});
|
|
2394
|
-
l[1]++;
|
|
2395
|
-
}
|
|
2396
|
-
let c = Kr(
|
|
2397
|
-
l[0],
|
|
2398
|
-
i,
|
|
2399
|
-
o,
|
|
2400
|
-
u ? 2 : 1
|
|
2401
|
-
/* Type.EXPLICIT */
|
|
2402
|
-
);
|
|
2403
|
-
if (!c)
|
|
2404
|
-
throw new F("trying to redefine an already defined table or value", {
|
|
2405
|
-
toml: e,
|
|
2406
|
-
ptr: s
|
|
2407
|
-
});
|
|
2408
|
-
n = c[2], a = c[1], s = l[1];
|
|
2409
|
-
} else {
|
|
2410
|
-
let u = Qt(e, s), l = Kr(
|
|
2411
|
-
u[0],
|
|
2412
|
-
a,
|
|
2413
|
-
n,
|
|
2414
|
-
0
|
|
2415
|
-
/* Type.DOTTED */
|
|
2416
|
-
);
|
|
2417
|
-
if (!l)
|
|
2418
|
-
throw new F("trying to redefine an already defined table or value", {
|
|
2419
|
-
toml: e,
|
|
2420
|
-
ptr: s
|
|
2421
|
-
});
|
|
2422
|
-
let c = ar(e, u[1], void 0, t, r);
|
|
2423
|
-
l[1][l[0]] = c[0], s = c[1];
|
|
2424
|
-
}
|
|
2425
|
-
if (s = se(e, s, !0), e[s] && e[s] !== `
|
|
2426
|
-
` && e[s] !== "\r")
|
|
2427
|
-
throw new F("each key-value declaration must be followed by an end-of-line", {
|
|
2428
|
-
toml: e,
|
|
2429
|
-
ptr: s
|
|
2430
|
-
});
|
|
2431
|
-
s = se(e, s);
|
|
2432
|
-
}
|
|
2433
|
-
return i;
|
|
2434
|
-
}
|
|
2435
|
-
var Ne = { exports: {} }, it, Yr;
|
|
2436
|
-
function je() {
|
|
2437
|
-
if (Yr) return it;
|
|
2438
|
-
Yr = 1;
|
|
2439
|
-
const e = "2.0.0", t = 256, r = Number.MAX_SAFE_INTEGER || /* istanbul ignore next */
|
|
2440
|
-
9007199254740991, i = 16, o = t - 6;
|
|
2441
|
-
return it = {
|
|
2442
|
-
MAX_LENGTH: t,
|
|
2443
|
-
MAX_SAFE_COMPONENT_LENGTH: i,
|
|
2444
|
-
MAX_SAFE_BUILD_LENGTH: o,
|
|
2445
|
-
MAX_SAFE_INTEGER: r,
|
|
2446
|
-
RELEASE_TYPES: [
|
|
2447
|
-
"major",
|
|
2448
|
-
"premajor",
|
|
2449
|
-
"minor",
|
|
2450
|
-
"preminor",
|
|
2451
|
-
"patch",
|
|
2452
|
-
"prepatch",
|
|
2453
|
-
"prerelease"
|
|
2454
|
-
],
|
|
2455
|
-
SEMVER_SPEC_VERSION: e,
|
|
2456
|
-
FLAG_INCLUDE_PRERELEASE: 1,
|
|
2457
|
-
FLAG_LOOSE: 2
|
|
2458
|
-
}, it;
|
|
2459
|
-
}
|
|
2460
|
-
var st, Jr;
|
|
2461
|
-
function Ce() {
|
|
2462
|
-
return Jr || (Jr = 1, st = typeof process == "object" && process.env && process.env.NODE_DEBUG && /\bsemver\b/i.test(process.env.NODE_DEBUG) ? (...t) => console.error("SEMVER", ...t) : () => {
|
|
2463
|
-
}), st;
|
|
2464
|
-
}
|
|
2465
|
-
var Zr;
|
|
2466
|
-
function Oe() {
|
|
2467
|
-
return Zr || (Zr = 1, (function(e, t) {
|
|
2468
|
-
const {
|
|
2469
|
-
MAX_SAFE_COMPONENT_LENGTH: r,
|
|
2470
|
-
MAX_SAFE_BUILD_LENGTH: i,
|
|
2471
|
-
MAX_LENGTH: o
|
|
2472
|
-
} = je(), a = Ce();
|
|
2473
|
-
t = e.exports = {};
|
|
2474
|
-
const n = t.re = [], s = t.safeRe = [], u = t.src = [], l = t.safeSrc = [], c = t.t = {};
|
|
2475
|
-
let m = 0;
|
|
2476
|
-
const p = "[a-zA-Z0-9-]", h = [
|
|
2477
|
-
["\\s", 1],
|
|
2478
|
-
["\\d", o],
|
|
2479
|
-
[p, i]
|
|
2480
|
-
], g = (f) => {
|
|
2481
|
-
for (const [v, E] of h)
|
|
2482
|
-
f = f.split(`${v}*`).join(`${v}{0,${E}}`).split(`${v}+`).join(`${v}{1,${E}}`);
|
|
2483
|
-
return f;
|
|
2484
|
-
}, d = (f, v, E) => {
|
|
2485
|
-
const y = g(v), $ = m++;
|
|
2486
|
-
a(f, $, v), c[f] = $, u[$] = v, l[$] = y, n[$] = new RegExp(v, E ? "g" : void 0), s[$] = new RegExp(y, E ? "g" : void 0);
|
|
2487
|
-
};
|
|
2488
|
-
d("NUMERICIDENTIFIER", "0|[1-9]\\d*"), d("NUMERICIDENTIFIERLOOSE", "\\d+"), d("NONNUMERICIDENTIFIER", `\\d*[a-zA-Z-]${p}*`), d("MAINVERSION", `(${u[c.NUMERICIDENTIFIER]})\\.(${u[c.NUMERICIDENTIFIER]})\\.(${u[c.NUMERICIDENTIFIER]})`), d("MAINVERSIONLOOSE", `(${u[c.NUMERICIDENTIFIERLOOSE]})\\.(${u[c.NUMERICIDENTIFIERLOOSE]})\\.(${u[c.NUMERICIDENTIFIERLOOSE]})`), d("PRERELEASEIDENTIFIER", `(?:${u[c.NONNUMERICIDENTIFIER]}|${u[c.NUMERICIDENTIFIER]})`), d("PRERELEASEIDENTIFIERLOOSE", `(?:${u[c.NONNUMERICIDENTIFIER]}|${u[c.NUMERICIDENTIFIERLOOSE]})`), d("PRERELEASE", `(?:-(${u[c.PRERELEASEIDENTIFIER]}(?:\\.${u[c.PRERELEASEIDENTIFIER]})*))`), d("PRERELEASELOOSE", `(?:-?(${u[c.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${u[c.PRERELEASEIDENTIFIERLOOSE]})*))`), d("BUILDIDENTIFIER", `${p}+`), d("BUILD", `(?:\\+(${u[c.BUILDIDENTIFIER]}(?:\\.${u[c.BUILDIDENTIFIER]})*))`), d("FULLPLAIN", `v?${u[c.MAINVERSION]}${u[c.PRERELEASE]}?${u[c.BUILD]}?`), d("FULL", `^${u[c.FULLPLAIN]}$`), d("LOOSEPLAIN", `[v=\\s]*${u[c.MAINVERSIONLOOSE]}${u[c.PRERELEASELOOSE]}?${u[c.BUILD]}?`), d("LOOSE", `^${u[c.LOOSEPLAIN]}$`), d("GTLT", "((?:<|>)?=?)"), d("XRANGEIDENTIFIERLOOSE", `${u[c.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`), d("XRANGEIDENTIFIER", `${u[c.NUMERICIDENTIFIER]}|x|X|\\*`), d("XRANGEPLAIN", `[v=\\s]*(${u[c.XRANGEIDENTIFIER]})(?:\\.(${u[c.XRANGEIDENTIFIER]})(?:\\.(${u[c.XRANGEIDENTIFIER]})(?:${u[c.PRERELEASE]})?${u[c.BUILD]}?)?)?`), d("XRANGEPLAINLOOSE", `[v=\\s]*(${u[c.XRANGEIDENTIFIERLOOSE]})(?:\\.(${u[c.XRANGEIDENTIFIERLOOSE]})(?:\\.(${u[c.XRANGEIDENTIFIERLOOSE]})(?:${u[c.PRERELEASELOOSE]})?${u[c.BUILD]}?)?)?`), d("XRANGE", `^${u[c.GTLT]}\\s*${u[c.XRANGEPLAIN]}$`), d("XRANGELOOSE", `^${u[c.GTLT]}\\s*${u[c.XRANGEPLAINLOOSE]}$`), d("COERCEPLAIN", `(^|[^\\d])(\\d{1,${r}})(?:\\.(\\d{1,${r}}))?(?:\\.(\\d{1,${r}}))?`), d("COERCE", `${u[c.COERCEPLAIN]}(?:$|[^\\d])`), d("COERCEFULL", u[c.COERCEPLAIN] + `(?:${u[c.PRERELEASE]})?(?:${u[c.BUILD]})?(?:$|[^\\d])`), d("COERCERTL", u[c.COERCE], !0), d("COERCERTLFULL", u[c.COERCEFULL], !0), d("LONETILDE", "(?:~>?)"), d("TILDETRIM", `(\\s*)${u[c.LONETILDE]}\\s+`, !0), t.tildeTrimReplace = "$1~", d("TILDE", `^${u[c.LONETILDE]}${u[c.XRANGEPLAIN]}$`), d("TILDELOOSE", `^${u[c.LONETILDE]}${u[c.XRANGEPLAINLOOSE]}$`), d("LONECARET", "(?:\\^)"), d("CARETTRIM", `(\\s*)${u[c.LONECARET]}\\s+`, !0), t.caretTrimReplace = "$1^", d("CARET", `^${u[c.LONECARET]}${u[c.XRANGEPLAIN]}$`), d("CARETLOOSE", `^${u[c.LONECARET]}${u[c.XRANGEPLAINLOOSE]}$`), d("COMPARATORLOOSE", `^${u[c.GTLT]}\\s*(${u[c.LOOSEPLAIN]})$|^$`), d("COMPARATOR", `^${u[c.GTLT]}\\s*(${u[c.FULLPLAIN]})$|^$`), d("COMPARATORTRIM", `(\\s*)${u[c.GTLT]}\\s*(${u[c.LOOSEPLAIN]}|${u[c.XRANGEPLAIN]})`, !0), t.comparatorTrimReplace = "$1$2$3", d("HYPHENRANGE", `^\\s*(${u[c.XRANGEPLAIN]})\\s+-\\s+(${u[c.XRANGEPLAIN]})\\s*$`), d("HYPHENRANGELOOSE", `^\\s*(${u[c.XRANGEPLAINLOOSE]})\\s+-\\s+(${u[c.XRANGEPLAINLOOSE]})\\s*$`), d("STAR", "(<|>)?=?\\s*\\*"), d("GTE0", "^\\s*>=\\s*0\\.0\\.0\\s*$"), d("GTE0PRE", "^\\s*>=\\s*0\\.0\\.0-0\\s*$");
|
|
2489
|
-
})(Ne, Ne.exports)), Ne.exports;
|
|
2490
|
-
}
|
|
2491
|
-
var ot, Qr;
|
|
2492
|
-
function cr() {
|
|
2493
|
-
if (Qr) return ot;
|
|
2494
|
-
Qr = 1;
|
|
2495
|
-
const e = Object.freeze({ loose: !0 }), t = Object.freeze({});
|
|
2496
|
-
return ot = (i) => i ? typeof i != "object" ? e : i : t, ot;
|
|
2497
|
-
}
|
|
2498
|
-
var at, en;
|
|
2499
|
-
function pi() {
|
|
2500
|
-
if (en) return at;
|
|
2501
|
-
en = 1;
|
|
2502
|
-
const e = /^[0-9]+$/, t = (i, o) => {
|
|
2503
|
-
const a = e.test(i), n = e.test(o);
|
|
2504
|
-
return a && n && (i = +i, o = +o), i === o ? 0 : a && !n ? -1 : n && !a ? 1 : i < o ? -1 : 1;
|
|
2505
|
-
};
|
|
2506
|
-
return at = {
|
|
2507
|
-
compareIdentifiers: t,
|
|
2508
|
-
rcompareIdentifiers: (i, o) => t(o, i)
|
|
2509
|
-
}, at;
|
|
2510
|
-
}
|
|
2511
|
-
var ct, tn;
|
|
2512
|
-
function ee() {
|
|
2513
|
-
if (tn) return ct;
|
|
2514
|
-
tn = 1;
|
|
2515
|
-
const e = Ce(), { MAX_LENGTH: t, MAX_SAFE_INTEGER: r } = je(), { safeRe: i, t: o } = Oe(), a = cr(), { compareIdentifiers: n } = pi();
|
|
2516
|
-
class s {
|
|
2517
|
-
constructor(l, c) {
|
|
2518
|
-
if (c = a(c), l instanceof s) {
|
|
2519
|
-
if (l.loose === !!c.loose && l.includePrerelease === !!c.includePrerelease)
|
|
2520
|
-
return l;
|
|
2521
|
-
l = l.version;
|
|
2522
|
-
} else if (typeof l != "string")
|
|
2523
|
-
throw new TypeError(`Invalid version. Must be a string. Got type "${typeof l}".`);
|
|
2524
|
-
if (l.length > t)
|
|
2525
|
-
throw new TypeError(
|
|
2526
|
-
`version is longer than ${t} characters`
|
|
2527
|
-
);
|
|
2528
|
-
e("SemVer", l, c), this.options = c, this.loose = !!c.loose, this.includePrerelease = !!c.includePrerelease;
|
|
2529
|
-
const m = l.trim().match(c.loose ? i[o.LOOSE] : i[o.FULL]);
|
|
2530
|
-
if (!m)
|
|
2531
|
-
throw new TypeError(`Invalid Version: ${l}`);
|
|
2532
|
-
if (this.raw = l, this.major = +m[1], this.minor = +m[2], this.patch = +m[3], this.major > r || this.major < 0)
|
|
2533
|
-
throw new TypeError("Invalid major version");
|
|
2534
|
-
if (this.minor > r || this.minor < 0)
|
|
2535
|
-
throw new TypeError("Invalid minor version");
|
|
2536
|
-
if (this.patch > r || this.patch < 0)
|
|
2537
|
-
throw new TypeError("Invalid patch version");
|
|
2538
|
-
m[4] ? this.prerelease = m[4].split(".").map((p) => {
|
|
2539
|
-
if (/^[0-9]+$/.test(p)) {
|
|
2540
|
-
const h = +p;
|
|
2541
|
-
if (h >= 0 && h < r)
|
|
2542
|
-
return h;
|
|
2543
|
-
}
|
|
2544
|
-
return p;
|
|
2545
|
-
}) : this.prerelease = [], this.build = m[5] ? m[5].split(".") : [], this.format();
|
|
2546
|
-
}
|
|
2547
|
-
format() {
|
|
2548
|
-
return this.version = `${this.major}.${this.minor}.${this.patch}`, this.prerelease.length && (this.version += `-${this.prerelease.join(".")}`), this.version;
|
|
2549
|
-
}
|
|
2550
|
-
toString() {
|
|
2551
|
-
return this.version;
|
|
2552
|
-
}
|
|
2553
|
-
compare(l) {
|
|
2554
|
-
if (e("SemVer.compare", this.version, this.options, l), !(l instanceof s)) {
|
|
2555
|
-
if (typeof l == "string" && l === this.version)
|
|
2556
|
-
return 0;
|
|
2557
|
-
l = new s(l, this.options);
|
|
2558
|
-
}
|
|
2559
|
-
return l.version === this.version ? 0 : this.compareMain(l) || this.comparePre(l);
|
|
2560
|
-
}
|
|
2561
|
-
compareMain(l) {
|
|
2562
|
-
return l instanceof s || (l = new s(l, this.options)), n(this.major, l.major) || n(this.minor, l.minor) || n(this.patch, l.patch);
|
|
2563
|
-
}
|
|
2564
|
-
comparePre(l) {
|
|
2565
|
-
if (l instanceof s || (l = new s(l, this.options)), this.prerelease.length && !l.prerelease.length)
|
|
2566
|
-
return -1;
|
|
2567
|
-
if (!this.prerelease.length && l.prerelease.length)
|
|
2568
|
-
return 1;
|
|
2569
|
-
if (!this.prerelease.length && !l.prerelease.length)
|
|
2570
|
-
return 0;
|
|
2571
|
-
let c = 0;
|
|
2572
|
-
do {
|
|
2573
|
-
const m = this.prerelease[c], p = l.prerelease[c];
|
|
2574
|
-
if (e("prerelease compare", c, m, p), m === void 0 && p === void 0)
|
|
2575
|
-
return 0;
|
|
2576
|
-
if (p === void 0)
|
|
2577
|
-
return 1;
|
|
2578
|
-
if (m === void 0)
|
|
2579
|
-
return -1;
|
|
2580
|
-
if (m === p)
|
|
2581
|
-
continue;
|
|
2582
|
-
return n(m, p);
|
|
2583
|
-
} while (++c);
|
|
2584
|
-
}
|
|
2585
|
-
compareBuild(l) {
|
|
2586
|
-
l instanceof s || (l = new s(l, this.options));
|
|
2587
|
-
let c = 0;
|
|
2588
|
-
do {
|
|
2589
|
-
const m = this.build[c], p = l.build[c];
|
|
2590
|
-
if (e("build compare", c, m, p), m === void 0 && p === void 0)
|
|
2591
|
-
return 0;
|
|
2592
|
-
if (p === void 0)
|
|
2593
|
-
return 1;
|
|
2594
|
-
if (m === void 0)
|
|
2595
|
-
return -1;
|
|
2596
|
-
if (m === p)
|
|
2597
|
-
continue;
|
|
2598
|
-
return n(m, p);
|
|
2599
|
-
} while (++c);
|
|
2600
|
-
}
|
|
2601
|
-
// preminor will bump the version up to the next minor release, and immediately
|
|
2602
|
-
// down to pre-release. premajor and prepatch work the same way.
|
|
2603
|
-
inc(l, c, m) {
|
|
2604
|
-
if (l.startsWith("pre")) {
|
|
2605
|
-
if (!c && m === !1)
|
|
2606
|
-
throw new Error("invalid increment argument: identifier is empty");
|
|
2607
|
-
if (c) {
|
|
2608
|
-
const p = `-${c}`.match(this.options.loose ? i[o.PRERELEASELOOSE] : i[o.PRERELEASE]);
|
|
2609
|
-
if (!p || p[1] !== c)
|
|
2610
|
-
throw new Error(`invalid identifier: ${c}`);
|
|
2611
|
-
}
|
|
2612
|
-
}
|
|
2613
|
-
switch (l) {
|
|
2614
|
-
case "premajor":
|
|
2615
|
-
this.prerelease.length = 0, this.patch = 0, this.minor = 0, this.major++, this.inc("pre", c, m);
|
|
2616
|
-
break;
|
|
2617
|
-
case "preminor":
|
|
2618
|
-
this.prerelease.length = 0, this.patch = 0, this.minor++, this.inc("pre", c, m);
|
|
2619
|
-
break;
|
|
2620
|
-
case "prepatch":
|
|
2621
|
-
this.prerelease.length = 0, this.inc("patch", c, m), this.inc("pre", c, m);
|
|
2622
|
-
break;
|
|
2623
|
-
// If the input is a non-prerelease version, this acts the same as
|
|
2624
|
-
// prepatch.
|
|
2625
|
-
case "prerelease":
|
|
2626
|
-
this.prerelease.length === 0 && this.inc("patch", c, m), this.inc("pre", c, m);
|
|
2627
|
-
break;
|
|
2628
|
-
case "release":
|
|
2629
|
-
if (this.prerelease.length === 0)
|
|
2630
|
-
throw new Error(`version ${this.raw} is not a prerelease`);
|
|
2631
|
-
this.prerelease.length = 0;
|
|
2632
|
-
break;
|
|
2633
|
-
case "major":
|
|
2634
|
-
(this.minor !== 0 || this.patch !== 0 || this.prerelease.length === 0) && this.major++, this.minor = 0, this.patch = 0, this.prerelease = [];
|
|
2635
|
-
break;
|
|
2636
|
-
case "minor":
|
|
2637
|
-
(this.patch !== 0 || this.prerelease.length === 0) && this.minor++, this.patch = 0, this.prerelease = [];
|
|
2638
|
-
break;
|
|
2639
|
-
case "patch":
|
|
2640
|
-
this.prerelease.length === 0 && this.patch++, this.prerelease = [];
|
|
2641
|
-
break;
|
|
2642
|
-
// This probably shouldn't be used publicly.
|
|
2643
|
-
// 1.0.0 'pre' would become 1.0.0-0 which is the wrong direction.
|
|
2644
|
-
case "pre": {
|
|
2645
|
-
const p = Number(m) ? 1 : 0;
|
|
2646
|
-
if (this.prerelease.length === 0)
|
|
2647
|
-
this.prerelease = [p];
|
|
2648
|
-
else {
|
|
2649
|
-
let h = this.prerelease.length;
|
|
2650
|
-
for (; --h >= 0; )
|
|
2651
|
-
typeof this.prerelease[h] == "number" && (this.prerelease[h]++, h = -2);
|
|
2652
|
-
if (h === -1) {
|
|
2653
|
-
if (c === this.prerelease.join(".") && m === !1)
|
|
2654
|
-
throw new Error("invalid increment argument: identifier already exists");
|
|
2655
|
-
this.prerelease.push(p);
|
|
2656
|
-
}
|
|
2657
|
-
}
|
|
2658
|
-
if (c) {
|
|
2659
|
-
let h = [c, p];
|
|
2660
|
-
m === !1 && (h = [c]), n(this.prerelease[0], c) === 0 ? isNaN(this.prerelease[1]) && (this.prerelease = h) : this.prerelease = h;
|
|
2661
|
-
}
|
|
2662
|
-
break;
|
|
2663
|
-
}
|
|
2664
|
-
default:
|
|
2665
|
-
throw new Error(`invalid increment argument: ${l}`);
|
|
2666
|
-
}
|
|
2667
|
-
return this.raw = this.format(), this.build.length && (this.raw += `+${this.build.join(".")}`), this;
|
|
2668
|
-
}
|
|
2669
|
-
}
|
|
2670
|
-
return ct = s, ct;
|
|
2671
|
-
}
|
|
2672
|
-
var lt, rn;
|
|
2673
|
-
function Ee() {
|
|
2674
|
-
if (rn) return lt;
|
|
2675
|
-
rn = 1;
|
|
2676
|
-
const e = ee();
|
|
2677
|
-
return lt = (r, i, o = !1) => {
|
|
2678
|
-
if (r instanceof e)
|
|
2679
|
-
return r;
|
|
2680
|
-
try {
|
|
2681
|
-
return new e(r, i);
|
|
2682
|
-
} catch (a) {
|
|
2683
|
-
if (!o)
|
|
2684
|
-
return null;
|
|
2685
|
-
throw a;
|
|
2686
|
-
}
|
|
2687
|
-
}, lt;
|
|
2688
|
-
}
|
|
2689
|
-
var ut, nn;
|
|
2690
|
-
function Ls() {
|
|
2691
|
-
if (nn) return ut;
|
|
2692
|
-
nn = 1;
|
|
2693
|
-
const e = Ee();
|
|
2694
|
-
return ut = (r, i) => {
|
|
2695
|
-
const o = e(r, i);
|
|
2696
|
-
return o ? o.version : null;
|
|
2697
|
-
}, ut;
|
|
2698
|
-
}
|
|
2699
|
-
var ft, sn;
|
|
2700
|
-
function Ps() {
|
|
2701
|
-
if (sn) return ft;
|
|
2702
|
-
sn = 1;
|
|
2703
|
-
const e = Ee();
|
|
2704
|
-
return ft = (r, i) => {
|
|
2705
|
-
const o = e(r.trim().replace(/^[=v]+/, ""), i);
|
|
2706
|
-
return o ? o.version : null;
|
|
2707
|
-
}, ft;
|
|
2708
|
-
}
|
|
2709
|
-
var pt, on;
|
|
2710
|
-
function xs() {
|
|
2711
|
-
if (on) return pt;
|
|
2712
|
-
on = 1;
|
|
2713
|
-
const e = ee();
|
|
2714
|
-
return pt = (r, i, o, a, n) => {
|
|
2715
|
-
typeof o == "string" && (n = a, a = o, o = void 0);
|
|
2716
|
-
try {
|
|
2717
|
-
return new e(
|
|
2718
|
-
r instanceof e ? r.version : r,
|
|
2719
|
-
o
|
|
2720
|
-
).inc(i, a, n).version;
|
|
2721
|
-
} catch {
|
|
2722
|
-
return null;
|
|
2723
|
-
}
|
|
2724
|
-
}, pt;
|
|
2725
|
-
}
|
|
2726
|
-
var ht, an;
|
|
2727
|
-
function js() {
|
|
2728
|
-
if (an) return ht;
|
|
2729
|
-
an = 1;
|
|
2730
|
-
const e = Ee();
|
|
2731
|
-
return ht = (r, i) => {
|
|
2732
|
-
const o = e(r, null, !0), a = e(i, null, !0), n = o.compare(a);
|
|
2733
|
-
if (n === 0)
|
|
2734
|
-
return null;
|
|
2735
|
-
const s = n > 0, u = s ? o : a, l = s ? a : o, c = !!u.prerelease.length;
|
|
2736
|
-
if (!!l.prerelease.length && !c) {
|
|
2737
|
-
if (!l.patch && !l.minor)
|
|
2738
|
-
return "major";
|
|
2739
|
-
if (l.compareMain(u) === 0)
|
|
2740
|
-
return l.minor && !l.patch ? "minor" : "patch";
|
|
2741
|
-
}
|
|
2742
|
-
const p = c ? "pre" : "";
|
|
2743
|
-
return o.major !== a.major ? p + "major" : o.minor !== a.minor ? p + "minor" : o.patch !== a.patch ? p + "patch" : "prerelease";
|
|
2744
|
-
}, ht;
|
|
2745
|
-
}
|
|
2746
|
-
var dt, cn;
|
|
2747
|
-
function Cs() {
|
|
2748
|
-
if (cn) return dt;
|
|
2749
|
-
cn = 1;
|
|
2750
|
-
const e = ee();
|
|
2751
|
-
return dt = (r, i) => new e(r, i).major, dt;
|
|
2752
|
-
}
|
|
2753
|
-
var mt, ln;
|
|
2754
|
-
function qs() {
|
|
2755
|
-
if (ln) return mt;
|
|
2756
|
-
ln = 1;
|
|
2757
|
-
const e = ee();
|
|
2758
|
-
return mt = (r, i) => new e(r, i).minor, mt;
|
|
2759
|
-
}
|
|
2760
|
-
var gt, un;
|
|
2761
|
-
function Fs() {
|
|
2762
|
-
if (un) return gt;
|
|
2763
|
-
un = 1;
|
|
2764
|
-
const e = ee();
|
|
2765
|
-
return gt = (r, i) => new e(r, i).patch, gt;
|
|
2766
|
-
}
|
|
2767
|
-
var vt, fn;
|
|
2768
|
-
function Ds() {
|
|
2769
|
-
if (fn) return vt;
|
|
2770
|
-
fn = 1;
|
|
2771
|
-
const e = Ee();
|
|
2772
|
-
return vt = (r, i) => {
|
|
2773
|
-
const o = e(r, i);
|
|
2774
|
-
return o && o.prerelease.length ? o.prerelease : null;
|
|
2775
|
-
}, vt;
|
|
2776
|
-
}
|
|
2777
|
-
var yt, pn;
|
|
2778
|
-
function ne() {
|
|
2779
|
-
if (pn) return yt;
|
|
2780
|
-
pn = 1;
|
|
2781
|
-
const e = ee();
|
|
2782
|
-
return yt = (r, i, o) => new e(r, o).compare(new e(i, o)), yt;
|
|
2783
|
-
}
|
|
2784
|
-
var Et, hn;
|
|
2785
|
-
function Bs() {
|
|
2786
|
-
if (hn) return Et;
|
|
2787
|
-
hn = 1;
|
|
2788
|
-
const e = ne();
|
|
2789
|
-
return Et = (r, i, o) => e(i, r, o), Et;
|
|
2790
|
-
}
|
|
2791
|
-
var wt, dn;
|
|
2792
|
-
function ks() {
|
|
2793
|
-
if (dn) return wt;
|
|
2794
|
-
dn = 1;
|
|
2795
|
-
const e = ne();
|
|
2796
|
-
return wt = (r, i) => e(r, i, !0), wt;
|
|
2797
|
-
}
|
|
2798
|
-
var $t, mn;
|
|
2799
|
-
function lr() {
|
|
2800
|
-
if (mn) return $t;
|
|
2801
|
-
mn = 1;
|
|
2802
|
-
const e = ee();
|
|
2803
|
-
return $t = (r, i, o) => {
|
|
2804
|
-
const a = new e(r, o), n = new e(i, o);
|
|
2805
|
-
return a.compare(n) || a.compareBuild(n);
|
|
2806
|
-
}, $t;
|
|
2807
|
-
}
|
|
2808
|
-
var Rt, gn;
|
|
2809
|
-
function Gs() {
|
|
2810
|
-
if (gn) return Rt;
|
|
2811
|
-
gn = 1;
|
|
2812
|
-
const e = lr();
|
|
2813
|
-
return Rt = (r, i) => r.sort((o, a) => e(o, a, i)), Rt;
|
|
2814
|
-
}
|
|
2815
|
-
var St, vn;
|
|
2816
|
-
function Us() {
|
|
2817
|
-
if (vn) return St;
|
|
2818
|
-
vn = 1;
|
|
2819
|
-
const e = lr();
|
|
2820
|
-
return St = (r, i) => r.sort((o, a) => e(a, o, i)), St;
|
|
2821
|
-
}
|
|
2822
|
-
var Ot, yn;
|
|
2823
|
-
function qe() {
|
|
2824
|
-
if (yn) return Ot;
|
|
2825
|
-
yn = 1;
|
|
2826
|
-
const e = ne();
|
|
2827
|
-
return Ot = (r, i, o) => e(r, i, o) > 0, Ot;
|
|
2828
|
-
}
|
|
2829
|
-
var bt, En;
|
|
2830
|
-
function ur() {
|
|
2831
|
-
if (En) return bt;
|
|
2832
|
-
En = 1;
|
|
2833
|
-
const e = ne();
|
|
2834
|
-
return bt = (r, i, o) => e(r, i, o) < 0, bt;
|
|
2835
|
-
}
|
|
2836
|
-
var It, wn;
|
|
2837
|
-
function hi() {
|
|
2838
|
-
if (wn) return It;
|
|
2839
|
-
wn = 1;
|
|
2840
|
-
const e = ne();
|
|
2841
|
-
return It = (r, i, o) => e(r, i, o) === 0, It;
|
|
2842
|
-
}
|
|
2843
|
-
var _t, $n;
|
|
2844
|
-
function di() {
|
|
2845
|
-
if ($n) return _t;
|
|
2846
|
-
$n = 1;
|
|
2847
|
-
const e = ne();
|
|
2848
|
-
return _t = (r, i, o) => e(r, i, o) !== 0, _t;
|
|
2849
|
-
}
|
|
2850
|
-
var Nt, Rn;
|
|
2851
|
-
function fr() {
|
|
2852
|
-
if (Rn) return Nt;
|
|
2853
|
-
Rn = 1;
|
|
2854
|
-
const e = ne();
|
|
2855
|
-
return Nt = (r, i, o) => e(r, i, o) >= 0, Nt;
|
|
2856
|
-
}
|
|
2857
|
-
var At, Sn;
|
|
2858
|
-
function pr() {
|
|
2859
|
-
if (Sn) return At;
|
|
2860
|
-
Sn = 1;
|
|
2861
|
-
const e = ne();
|
|
2862
|
-
return At = (r, i, o) => e(r, i, o) <= 0, At;
|
|
2863
|
-
}
|
|
2864
|
-
var Tt, On;
|
|
2865
|
-
function mi() {
|
|
2866
|
-
if (On) return Tt;
|
|
2867
|
-
On = 1;
|
|
2868
|
-
const e = hi(), t = di(), r = qe(), i = fr(), o = ur(), a = pr();
|
|
2869
|
-
return Tt = (s, u, l, c) => {
|
|
2870
|
-
switch (u) {
|
|
2871
|
-
case "===":
|
|
2872
|
-
return typeof s == "object" && (s = s.version), typeof l == "object" && (l = l.version), s === l;
|
|
2873
|
-
case "!==":
|
|
2874
|
-
return typeof s == "object" && (s = s.version), typeof l == "object" && (l = l.version), s !== l;
|
|
2875
|
-
case "":
|
|
2876
|
-
case "=":
|
|
2877
|
-
case "==":
|
|
2878
|
-
return e(s, l, c);
|
|
2879
|
-
case "!=":
|
|
2880
|
-
return t(s, l, c);
|
|
2881
|
-
case ">":
|
|
2882
|
-
return r(s, l, c);
|
|
2883
|
-
case ">=":
|
|
2884
|
-
return i(s, l, c);
|
|
2885
|
-
case "<":
|
|
2886
|
-
return o(s, l, c);
|
|
2887
|
-
case "<=":
|
|
2888
|
-
return a(s, l, c);
|
|
2889
|
-
default:
|
|
2890
|
-
throw new TypeError(`Invalid operator: ${u}`);
|
|
2891
|
-
}
|
|
2892
|
-
}, Tt;
|
|
2893
|
-
}
|
|
2894
|
-
var Lt, bn;
|
|
2895
|
-
function Ms() {
|
|
2896
|
-
if (bn) return Lt;
|
|
2897
|
-
bn = 1;
|
|
2898
|
-
const e = ee(), t = Ee(), { safeRe: r, t: i } = Oe();
|
|
2899
|
-
return Lt = (a, n) => {
|
|
2900
|
-
if (a instanceof e)
|
|
2901
|
-
return a;
|
|
2902
|
-
if (typeof a == "number" && (a = String(a)), typeof a != "string")
|
|
2903
|
-
return null;
|
|
2904
|
-
n = n || {};
|
|
2905
|
-
let s = null;
|
|
2906
|
-
if (!n.rtl)
|
|
2907
|
-
s = a.match(n.includePrerelease ? r[i.COERCEFULL] : r[i.COERCE]);
|
|
2908
|
-
else {
|
|
2909
|
-
const h = n.includePrerelease ? r[i.COERCERTLFULL] : r[i.COERCERTL];
|
|
2910
|
-
let g;
|
|
2911
|
-
for (; (g = h.exec(a)) && (!s || s.index + s[0].length !== a.length); )
|
|
2912
|
-
(!s || g.index + g[0].length !== s.index + s[0].length) && (s = g), h.lastIndex = g.index + g[1].length + g[2].length;
|
|
2913
|
-
h.lastIndex = -1;
|
|
2914
|
-
}
|
|
2915
|
-
if (s === null)
|
|
2916
|
-
return null;
|
|
2917
|
-
const u = s[2], l = s[3] || "0", c = s[4] || "0", m = n.includePrerelease && s[5] ? `-${s[5]}` : "", p = n.includePrerelease && s[6] ? `+${s[6]}` : "";
|
|
2918
|
-
return t(`${u}.${l}.${c}${m}${p}`, n);
|
|
2919
|
-
}, Lt;
|
|
2920
|
-
}
|
|
2921
|
-
var Pt, In;
|
|
2922
|
-
function Vs() {
|
|
2923
|
-
if (In) return Pt;
|
|
2924
|
-
In = 1;
|
|
2925
|
-
class e {
|
|
2926
|
-
constructor() {
|
|
2927
|
-
this.max = 1e3, this.map = /* @__PURE__ */ new Map();
|
|
2928
|
-
}
|
|
2929
|
-
get(r) {
|
|
2930
|
-
const i = this.map.get(r);
|
|
2931
|
-
if (i !== void 0)
|
|
2932
|
-
return this.map.delete(r), this.map.set(r, i), i;
|
|
2933
|
-
}
|
|
2934
|
-
delete(r) {
|
|
2935
|
-
return this.map.delete(r);
|
|
2936
|
-
}
|
|
2937
|
-
set(r, i) {
|
|
2938
|
-
if (!this.delete(r) && i !== void 0) {
|
|
2939
|
-
if (this.map.size >= this.max) {
|
|
2940
|
-
const a = this.map.keys().next().value;
|
|
2941
|
-
this.delete(a);
|
|
2942
|
-
}
|
|
2943
|
-
this.map.set(r, i);
|
|
2944
|
-
}
|
|
2945
|
-
return this;
|
|
2946
|
-
}
|
|
2947
|
-
}
|
|
2948
|
-
return Pt = e, Pt;
|
|
2949
|
-
}
|
|
2950
|
-
var xt, _n;
|
|
2951
|
-
function ie() {
|
|
2952
|
-
if (_n) return xt;
|
|
2953
|
-
_n = 1;
|
|
2954
|
-
const e = /\s+/g;
|
|
2955
|
-
class t {
|
|
2956
|
-
constructor(I, w) {
|
|
2957
|
-
if (w = o(w), I instanceof t)
|
|
2958
|
-
return I.loose === !!w.loose && I.includePrerelease === !!w.includePrerelease ? I : new t(I.raw, w);
|
|
2959
|
-
if (I instanceof a)
|
|
2960
|
-
return this.raw = I.value, this.set = [[I]], this.formatted = void 0, this;
|
|
2961
|
-
if (this.options = w, this.loose = !!w.loose, this.includePrerelease = !!w.includePrerelease, this.raw = I.trim().replace(e, " "), this.set = this.raw.split("||").map((S) => this.parseRange(S.trim())).filter((S) => S.length), !this.set.length)
|
|
2962
|
-
throw new TypeError(`Invalid SemVer Range: ${this.raw}`);
|
|
2963
|
-
if (this.set.length > 1) {
|
|
2964
|
-
const S = this.set[0];
|
|
2965
|
-
if (this.set = this.set.filter((O) => !d(O[0])), this.set.length === 0)
|
|
2966
|
-
this.set = [S];
|
|
2967
|
-
else if (this.set.length > 1) {
|
|
2968
|
-
for (const O of this.set)
|
|
2969
|
-
if (O.length === 1 && f(O[0])) {
|
|
2970
|
-
this.set = [O];
|
|
2971
|
-
break;
|
|
2972
|
-
}
|
|
2973
|
-
}
|
|
2974
|
-
}
|
|
2975
|
-
this.formatted = void 0;
|
|
2976
|
-
}
|
|
2977
|
-
get range() {
|
|
2978
|
-
if (this.formatted === void 0) {
|
|
2979
|
-
this.formatted = "";
|
|
2980
|
-
for (let I = 0; I < this.set.length; I++) {
|
|
2981
|
-
I > 0 && (this.formatted += "||");
|
|
2982
|
-
const w = this.set[I];
|
|
2983
|
-
for (let S = 0; S < w.length; S++)
|
|
2984
|
-
S > 0 && (this.formatted += " "), this.formatted += w[S].toString().trim();
|
|
2985
|
-
}
|
|
2986
|
-
}
|
|
2987
|
-
return this.formatted;
|
|
2988
|
-
}
|
|
2989
|
-
format() {
|
|
2990
|
-
return this.range;
|
|
2991
|
-
}
|
|
2992
|
-
toString() {
|
|
2993
|
-
return this.range;
|
|
2994
|
-
}
|
|
2995
|
-
parseRange(I) {
|
|
2996
|
-
const S = ((this.options.includePrerelease && h) | (this.options.loose && g)) + ":" + I, O = i.get(S);
|
|
2997
|
-
if (O)
|
|
2998
|
-
return O;
|
|
2999
|
-
const R = this.options.loose, P = R ? u[l.HYPHENRANGELOOSE] : u[l.HYPHENRANGE];
|
|
3000
|
-
I = I.replace(P, V(this.options.includePrerelease)), n("hyphen replace", I), I = I.replace(u[l.COMPARATORTRIM], c), n("comparator trim", I), I = I.replace(u[l.TILDETRIM], m), n("tilde trim", I), I = I.replace(u[l.CARETTRIM], p), n("caret trim", I);
|
|
3001
|
-
let D = I.split(" ").map((T) => E(T, this.options)).join(" ").split(/\s+/).map((T) => te(T, this.options));
|
|
3002
|
-
R && (D = D.filter((T) => (n("loose invalid filter", T, this.options), !!T.match(u[l.COMPARATORLOOSE])))), n("range list", D);
|
|
3003
|
-
const j = /* @__PURE__ */ new Map(), B = D.map((T) => new a(T, this.options));
|
|
3004
|
-
for (const T of B) {
|
|
3005
|
-
if (d(T))
|
|
3006
|
-
return [T];
|
|
3007
|
-
j.set(T.value, T);
|
|
3008
|
-
}
|
|
3009
|
-
j.size > 1 && j.has("") && j.delete("");
|
|
3010
|
-
const U = [...j.values()];
|
|
3011
|
-
return i.set(S, U), U;
|
|
3012
|
-
}
|
|
3013
|
-
intersects(I, w) {
|
|
3014
|
-
if (!(I instanceof t))
|
|
3015
|
-
throw new TypeError("a Range is required");
|
|
3016
|
-
return this.set.some((S) => v(S, w) && I.set.some((O) => v(O, w) && S.every((R) => O.every((P) => R.intersects(P, w)))));
|
|
3017
|
-
}
|
|
3018
|
-
// if ANY of the sets match ALL of its comparators, then pass
|
|
3019
|
-
test(I) {
|
|
3020
|
-
if (!I)
|
|
3021
|
-
return !1;
|
|
3022
|
-
if (typeof I == "string")
|
|
3023
|
-
try {
|
|
3024
|
-
I = new s(I, this.options);
|
|
3025
|
-
} catch {
|
|
3026
|
-
return !1;
|
|
3027
|
-
}
|
|
3028
|
-
for (let w = 0; w < this.set.length; w++)
|
|
3029
|
-
if (X(this.set[w], I, this.options))
|
|
3030
|
-
return !0;
|
|
3031
|
-
return !1;
|
|
3032
|
-
}
|
|
3033
|
-
}
|
|
3034
|
-
xt = t;
|
|
3035
|
-
const r = Vs(), i = new r(), o = cr(), a = Fe(), n = Ce(), s = ee(), {
|
|
3036
|
-
safeRe: u,
|
|
3037
|
-
t: l,
|
|
3038
|
-
comparatorTrimReplace: c,
|
|
3039
|
-
tildeTrimReplace: m,
|
|
3040
|
-
caretTrimReplace: p
|
|
3041
|
-
} = Oe(), { FLAG_INCLUDE_PRERELEASE: h, FLAG_LOOSE: g } = je(), d = (A) => A.value === "<0.0.0-0", f = (A) => A.value === "", v = (A, I) => {
|
|
3042
|
-
let w = !0;
|
|
3043
|
-
const S = A.slice();
|
|
3044
|
-
let O = S.pop();
|
|
3045
|
-
for (; w && S.length; )
|
|
3046
|
-
w = S.every((R) => O.intersects(R, I)), O = S.pop();
|
|
3047
|
-
return w;
|
|
3048
|
-
}, E = (A, I) => (n("comp", A, I), A = N(A, I), n("caret", A), A = $(A, I), n("tildes", A), A = b(A, I), n("xrange", A), A = x(A, I), n("stars", A), A), y = (A) => !A || A.toLowerCase() === "x" || A === "*", $ = (A, I) => A.trim().split(/\s+/).map((w) => L(w, I)).join(" "), L = (A, I) => {
|
|
3049
|
-
const w = I.loose ? u[l.TILDELOOSE] : u[l.TILDE];
|
|
3050
|
-
return A.replace(w, (S, O, R, P, D) => {
|
|
3051
|
-
n("tilde", A, S, O, R, P, D);
|
|
3052
|
-
let j;
|
|
3053
|
-
return y(O) ? j = "" : y(R) ? j = `>=${O}.0.0 <${+O + 1}.0.0-0` : y(P) ? j = `>=${O}.${R}.0 <${O}.${+R + 1}.0-0` : D ? (n("replaceTilde pr", D), j = `>=${O}.${R}.${P}-${D} <${O}.${+R + 1}.0-0`) : j = `>=${O}.${R}.${P} <${O}.${+R + 1}.0-0`, n("tilde return", j), j;
|
|
3054
|
-
});
|
|
3055
|
-
}, N = (A, I) => A.trim().split(/\s+/).map((w) => _(w, I)).join(" "), _ = (A, I) => {
|
|
3056
|
-
n("caret", A, I);
|
|
3057
|
-
const w = I.loose ? u[l.CARETLOOSE] : u[l.CARET], S = I.includePrerelease ? "-0" : "";
|
|
3058
|
-
return A.replace(w, (O, R, P, D, j) => {
|
|
3059
|
-
n("caret", A, O, R, P, D, j);
|
|
3060
|
-
let B;
|
|
3061
|
-
return y(R) ? B = "" : y(P) ? B = `>=${R}.0.0${S} <${+R + 1}.0.0-0` : y(D) ? R === "0" ? B = `>=${R}.${P}.0${S} <${R}.${+P + 1}.0-0` : B = `>=${R}.${P}.0${S} <${+R + 1}.0.0-0` : j ? (n("replaceCaret pr", j), R === "0" ? P === "0" ? B = `>=${R}.${P}.${D}-${j} <${R}.${P}.${+D + 1}-0` : B = `>=${R}.${P}.${D}-${j} <${R}.${+P + 1}.0-0` : B = `>=${R}.${P}.${D}-${j} <${+R + 1}.0.0-0`) : (n("no pr"), R === "0" ? P === "0" ? B = `>=${R}.${P}.${D}${S} <${R}.${P}.${+D + 1}-0` : B = `>=${R}.${P}.${D}${S} <${R}.${+P + 1}.0-0` : B = `>=${R}.${P}.${D} <${+R + 1}.0.0-0`), n("caret return", B), B;
|
|
3062
|
-
});
|
|
3063
|
-
}, b = (A, I) => (n("replaceXRanges", A, I), A.split(/\s+/).map((w) => G(w, I)).join(" ")), G = (A, I) => {
|
|
3064
|
-
A = A.trim();
|
|
3065
|
-
const w = I.loose ? u[l.XRANGELOOSE] : u[l.XRANGE];
|
|
3066
|
-
return A.replace(w, (S, O, R, P, D, j) => {
|
|
3067
|
-
n("xRange", A, S, O, R, P, D, j);
|
|
3068
|
-
const B = y(R), U = B || y(P), T = U || y(D), q = T;
|
|
3069
|
-
return O === "=" && q && (O = ""), j = I.includePrerelease ? "-0" : "", B ? O === ">" || O === "<" ? S = "<0.0.0-0" : S = "*" : O && q ? (U && (P = 0), D = 0, O === ">" ? (O = ">=", U ? (R = +R + 1, P = 0, D = 0) : (P = +P + 1, D = 0)) : O === "<=" && (O = "<", U ? R = +R + 1 : P = +P + 1), O === "<" && (j = "-0"), S = `${O + R}.${P}.${D}${j}`) : U ? S = `>=${R}.0.0${j} <${+R + 1}.0.0-0` : T && (S = `>=${R}.${P}.0${j} <${R}.${+P + 1}.0-0`), n("xRange return", S), S;
|
|
3070
|
-
});
|
|
3071
|
-
}, x = (A, I) => (n("replaceStars", A, I), A.trim().replace(u[l.STAR], "")), te = (A, I) => (n("replaceGTE0", A, I), A.trim().replace(u[I.includePrerelease ? l.GTE0PRE : l.GTE0], "")), V = (A) => (I, w, S, O, R, P, D, j, B, U, T, q) => (y(S) ? w = "" : y(O) ? w = `>=${S}.0.0${A ? "-0" : ""}` : y(R) ? w = `>=${S}.${O}.0${A ? "-0" : ""}` : P ? w = `>=${w}` : w = `>=${w}${A ? "-0" : ""}`, y(B) ? j = "" : y(U) ? j = `<${+B + 1}.0.0-0` : y(T) ? j = `<${B}.${+U + 1}.0-0` : q ? j = `<=${B}.${U}.${T}-${q}` : A ? j = `<${B}.${U}.${+T + 1}-0` : j = `<=${j}`, `${w} ${j}`.trim()), X = (A, I, w) => {
|
|
3072
|
-
for (let S = 0; S < A.length; S++)
|
|
3073
|
-
if (!A[S].test(I))
|
|
3074
|
-
return !1;
|
|
3075
|
-
if (I.prerelease.length && !w.includePrerelease) {
|
|
3076
|
-
for (let S = 0; S < A.length; S++)
|
|
3077
|
-
if (n(A[S].semver), A[S].semver !== a.ANY && A[S].semver.prerelease.length > 0) {
|
|
3078
|
-
const O = A[S].semver;
|
|
3079
|
-
if (O.major === I.major && O.minor === I.minor && O.patch === I.patch)
|
|
3080
|
-
return !0;
|
|
3081
|
-
}
|
|
3082
|
-
return !1;
|
|
3083
|
-
}
|
|
3084
|
-
return !0;
|
|
3085
|
-
};
|
|
3086
|
-
return xt;
|
|
3087
|
-
}
|
|
3088
|
-
var jt, Nn;
|
|
3089
|
-
function Fe() {
|
|
3090
|
-
if (Nn) return jt;
|
|
3091
|
-
Nn = 1;
|
|
3092
|
-
const e = Symbol("SemVer ANY");
|
|
3093
|
-
class t {
|
|
3094
|
-
static get ANY() {
|
|
3095
|
-
return e;
|
|
3096
|
-
}
|
|
3097
|
-
constructor(c, m) {
|
|
3098
|
-
if (m = r(m), c instanceof t) {
|
|
3099
|
-
if (c.loose === !!m.loose)
|
|
3100
|
-
return c;
|
|
3101
|
-
c = c.value;
|
|
3102
|
-
}
|
|
3103
|
-
c = c.trim().split(/\s+/).join(" "), n("comparator", c, m), this.options = m, this.loose = !!m.loose, this.parse(c), this.semver === e ? this.value = "" : this.value = this.operator + this.semver.version, n("comp", this);
|
|
3104
|
-
}
|
|
3105
|
-
parse(c) {
|
|
3106
|
-
const m = this.options.loose ? i[o.COMPARATORLOOSE] : i[o.COMPARATOR], p = c.match(m);
|
|
3107
|
-
if (!p)
|
|
3108
|
-
throw new TypeError(`Invalid comparator: ${c}`);
|
|
3109
|
-
this.operator = p[1] !== void 0 ? p[1] : "", this.operator === "=" && (this.operator = ""), p[2] ? this.semver = new s(p[2], this.options.loose) : this.semver = e;
|
|
3110
|
-
}
|
|
3111
|
-
toString() {
|
|
3112
|
-
return this.value;
|
|
3113
|
-
}
|
|
3114
|
-
test(c) {
|
|
3115
|
-
if (n("Comparator.test", c, this.options.loose), this.semver === e || c === e)
|
|
3116
|
-
return !0;
|
|
3117
|
-
if (typeof c == "string")
|
|
3118
|
-
try {
|
|
3119
|
-
c = new s(c, this.options);
|
|
3120
|
-
} catch {
|
|
3121
|
-
return !1;
|
|
3122
|
-
}
|
|
3123
|
-
return a(c, this.operator, this.semver, this.options);
|
|
3124
|
-
}
|
|
3125
|
-
intersects(c, m) {
|
|
3126
|
-
if (!(c instanceof t))
|
|
3127
|
-
throw new TypeError("a Comparator is required");
|
|
3128
|
-
return this.operator === "" ? this.value === "" ? !0 : new u(c.value, m).test(this.value) : c.operator === "" ? c.value === "" ? !0 : new u(this.value, m).test(c.semver) : (m = r(m), m.includePrerelease && (this.value === "<0.0.0-0" || c.value === "<0.0.0-0") || !m.includePrerelease && (this.value.startsWith("<0.0.0") || c.value.startsWith("<0.0.0")) ? !1 : !!(this.operator.startsWith(">") && c.operator.startsWith(">") || this.operator.startsWith("<") && c.operator.startsWith("<") || this.semver.version === c.semver.version && this.operator.includes("=") && c.operator.includes("=") || a(this.semver, "<", c.semver, m) && this.operator.startsWith(">") && c.operator.startsWith("<") || a(this.semver, ">", c.semver, m) && this.operator.startsWith("<") && c.operator.startsWith(">")));
|
|
3129
|
-
}
|
|
3130
|
-
}
|
|
3131
|
-
jt = t;
|
|
3132
|
-
const r = cr(), { safeRe: i, t: o } = Oe(), a = mi(), n = Ce(), s = ee(), u = ie();
|
|
3133
|
-
return jt;
|
|
3134
|
-
}
|
|
3135
|
-
var Ct, An;
|
|
3136
|
-
function De() {
|
|
3137
|
-
if (An) return Ct;
|
|
3138
|
-
An = 1;
|
|
3139
|
-
const e = ie();
|
|
3140
|
-
return Ct = (r, i, o) => {
|
|
3141
|
-
try {
|
|
3142
|
-
i = new e(i, o);
|
|
3143
|
-
} catch {
|
|
3144
|
-
return !1;
|
|
3145
|
-
}
|
|
3146
|
-
return i.test(r);
|
|
3147
|
-
}, Ct;
|
|
3148
|
-
}
|
|
3149
|
-
var qt, Tn;
|
|
3150
|
-
function Xs() {
|
|
3151
|
-
if (Tn) return qt;
|
|
3152
|
-
Tn = 1;
|
|
3153
|
-
const e = ie();
|
|
3154
|
-
return qt = (r, i) => new e(r, i).set.map((o) => o.map((a) => a.value).join(" ").trim().split(" ")), qt;
|
|
3155
|
-
}
|
|
3156
|
-
var Ft, Ln;
|
|
3157
|
-
function Ws() {
|
|
3158
|
-
if (Ln) return Ft;
|
|
3159
|
-
Ln = 1;
|
|
3160
|
-
const e = ee(), t = ie();
|
|
3161
|
-
return Ft = (i, o, a) => {
|
|
3162
|
-
let n = null, s = null, u = null;
|
|
3163
|
-
try {
|
|
3164
|
-
u = new t(o, a);
|
|
3165
|
-
} catch {
|
|
3166
|
-
return null;
|
|
3167
|
-
}
|
|
3168
|
-
return i.forEach((l) => {
|
|
3169
|
-
u.test(l) && (!n || s.compare(l) === -1) && (n = l, s = new e(n, a));
|
|
3170
|
-
}), n;
|
|
3171
|
-
}, Ft;
|
|
3172
|
-
}
|
|
3173
|
-
var Dt, Pn;
|
|
3174
|
-
function Hs() {
|
|
3175
|
-
if (Pn) return Dt;
|
|
3176
|
-
Pn = 1;
|
|
3177
|
-
const e = ee(), t = ie();
|
|
3178
|
-
return Dt = (i, o, a) => {
|
|
3179
|
-
let n = null, s = null, u = null;
|
|
3180
|
-
try {
|
|
3181
|
-
u = new t(o, a);
|
|
3182
|
-
} catch {
|
|
3183
|
-
return null;
|
|
3184
|
-
}
|
|
3185
|
-
return i.forEach((l) => {
|
|
3186
|
-
u.test(l) && (!n || s.compare(l) === 1) && (n = l, s = new e(n, a));
|
|
3187
|
-
}), n;
|
|
3188
|
-
}, Dt;
|
|
3189
|
-
}
|
|
3190
|
-
var Bt, xn;
|
|
3191
|
-
function zs() {
|
|
3192
|
-
if (xn) return Bt;
|
|
3193
|
-
xn = 1;
|
|
3194
|
-
const e = ee(), t = ie(), r = qe();
|
|
3195
|
-
return Bt = (o, a) => {
|
|
3196
|
-
o = new t(o, a);
|
|
3197
|
-
let n = new e("0.0.0");
|
|
3198
|
-
if (o.test(n) || (n = new e("0.0.0-0"), o.test(n)))
|
|
3199
|
-
return n;
|
|
3200
|
-
n = null;
|
|
3201
|
-
for (let s = 0; s < o.set.length; ++s) {
|
|
3202
|
-
const u = o.set[s];
|
|
3203
|
-
let l = null;
|
|
3204
|
-
u.forEach((c) => {
|
|
3205
|
-
const m = new e(c.semver.version);
|
|
3206
|
-
switch (c.operator) {
|
|
3207
|
-
case ">":
|
|
3208
|
-
m.prerelease.length === 0 ? m.patch++ : m.prerelease.push(0), m.raw = m.format();
|
|
3209
|
-
/* fallthrough */
|
|
3210
|
-
case "":
|
|
3211
|
-
case ">=":
|
|
3212
|
-
(!l || r(m, l)) && (l = m);
|
|
3213
|
-
break;
|
|
3214
|
-
case "<":
|
|
3215
|
-
case "<=":
|
|
3216
|
-
break;
|
|
3217
|
-
/* istanbul ignore next */
|
|
3218
|
-
default:
|
|
3219
|
-
throw new Error(`Unexpected operation: ${c.operator}`);
|
|
3220
|
-
}
|
|
3221
|
-
}), l && (!n || r(n, l)) && (n = l);
|
|
3222
|
-
}
|
|
3223
|
-
return n && o.test(n) ? n : null;
|
|
3224
|
-
}, Bt;
|
|
3225
|
-
}
|
|
3226
|
-
var kt, jn;
|
|
3227
|
-
function Ks() {
|
|
3228
|
-
if (jn) return kt;
|
|
3229
|
-
jn = 1;
|
|
3230
|
-
const e = ie();
|
|
3231
|
-
return kt = (r, i) => {
|
|
3232
|
-
try {
|
|
3233
|
-
return new e(r, i).range || "*";
|
|
3234
|
-
} catch {
|
|
3235
|
-
return null;
|
|
3236
|
-
}
|
|
3237
|
-
}, kt;
|
|
3238
|
-
}
|
|
3239
|
-
var Gt, Cn;
|
|
3240
|
-
function hr() {
|
|
3241
|
-
if (Cn) return Gt;
|
|
3242
|
-
Cn = 1;
|
|
3243
|
-
const e = ee(), t = Fe(), { ANY: r } = t, i = ie(), o = De(), a = qe(), n = ur(), s = pr(), u = fr();
|
|
3244
|
-
return Gt = (c, m, p, h) => {
|
|
3245
|
-
c = new e(c, h), m = new i(m, h);
|
|
3246
|
-
let g, d, f, v, E;
|
|
3247
|
-
switch (p) {
|
|
3248
|
-
case ">":
|
|
3249
|
-
g = a, d = s, f = n, v = ">", E = ">=";
|
|
3250
|
-
break;
|
|
3251
|
-
case "<":
|
|
3252
|
-
g = n, d = u, f = a, v = "<", E = "<=";
|
|
3253
|
-
break;
|
|
3254
|
-
default:
|
|
3255
|
-
throw new TypeError('Must provide a hilo val of "<" or ">"');
|
|
3256
|
-
}
|
|
3257
|
-
if (o(c, m, h))
|
|
3258
|
-
return !1;
|
|
3259
|
-
for (let y = 0; y < m.set.length; ++y) {
|
|
3260
|
-
const $ = m.set[y];
|
|
3261
|
-
let L = null, N = null;
|
|
3262
|
-
if ($.forEach((_) => {
|
|
3263
|
-
_.semver === r && (_ = new t(">=0.0.0")), L = L || _, N = N || _, g(_.semver, L.semver, h) ? L = _ : f(_.semver, N.semver, h) && (N = _);
|
|
3264
|
-
}), L.operator === v || L.operator === E || (!N.operator || N.operator === v) && d(c, N.semver))
|
|
3265
|
-
return !1;
|
|
3266
|
-
if (N.operator === E && f(c, N.semver))
|
|
3267
|
-
return !1;
|
|
3268
|
-
}
|
|
3269
|
-
return !0;
|
|
3270
|
-
}, Gt;
|
|
3271
|
-
}
|
|
3272
|
-
var Ut, qn;
|
|
3273
|
-
function Ys() {
|
|
3274
|
-
if (qn) return Ut;
|
|
3275
|
-
qn = 1;
|
|
3276
|
-
const e = hr();
|
|
3277
|
-
return Ut = (r, i, o) => e(r, i, ">", o), Ut;
|
|
3278
|
-
}
|
|
3279
|
-
var Mt, Fn;
|
|
3280
|
-
function Js() {
|
|
3281
|
-
if (Fn) return Mt;
|
|
3282
|
-
Fn = 1;
|
|
3283
|
-
const e = hr();
|
|
3284
|
-
return Mt = (r, i, o) => e(r, i, "<", o), Mt;
|
|
3285
|
-
}
|
|
3286
|
-
var Vt, Dn;
|
|
3287
|
-
function Zs() {
|
|
3288
|
-
if (Dn) return Vt;
|
|
3289
|
-
Dn = 1;
|
|
3290
|
-
const e = ie();
|
|
3291
|
-
return Vt = (r, i, o) => (r = new e(r, o), i = new e(i, o), r.intersects(i, o)), Vt;
|
|
3292
|
-
}
|
|
3293
|
-
var Xt, Bn;
|
|
3294
|
-
function Qs() {
|
|
3295
|
-
if (Bn) return Xt;
|
|
3296
|
-
Bn = 1;
|
|
3297
|
-
const e = De(), t = ne();
|
|
3298
|
-
return Xt = (r, i, o) => {
|
|
3299
|
-
const a = [];
|
|
3300
|
-
let n = null, s = null;
|
|
3301
|
-
const u = r.sort((p, h) => t(p, h, o));
|
|
3302
|
-
for (const p of u)
|
|
3303
|
-
e(p, i, o) ? (s = p, n || (n = p)) : (s && a.push([n, s]), s = null, n = null);
|
|
3304
|
-
n && a.push([n, null]);
|
|
3305
|
-
const l = [];
|
|
3306
|
-
for (const [p, h] of a)
|
|
3307
|
-
p === h ? l.push(p) : !h && p === u[0] ? l.push("*") : h ? p === u[0] ? l.push(`<=${h}`) : l.push(`${p} - ${h}`) : l.push(`>=${p}`);
|
|
3308
|
-
const c = l.join(" || "), m = typeof i.raw == "string" ? i.raw : String(i);
|
|
3309
|
-
return c.length < m.length ? c : i;
|
|
3310
|
-
}, Xt;
|
|
3311
|
-
}
|
|
3312
|
-
var Wt, kn;
|
|
3313
|
-
function eo() {
|
|
3314
|
-
if (kn) return Wt;
|
|
3315
|
-
kn = 1;
|
|
3316
|
-
const e = ie(), t = Fe(), { ANY: r } = t, i = De(), o = ne(), a = (m, p, h = {}) => {
|
|
3317
|
-
if (m === p)
|
|
3318
|
-
return !0;
|
|
3319
|
-
m = new e(m, h), p = new e(p, h);
|
|
3320
|
-
let g = !1;
|
|
3321
|
-
e: for (const d of m.set) {
|
|
3322
|
-
for (const f of p.set) {
|
|
3323
|
-
const v = u(d, f, h);
|
|
3324
|
-
if (g = g || v !== null, v)
|
|
3325
|
-
continue e;
|
|
3326
|
-
}
|
|
3327
|
-
if (g)
|
|
3328
|
-
return !1;
|
|
3329
|
-
}
|
|
3330
|
-
return !0;
|
|
3331
|
-
}, n = [new t(">=0.0.0-0")], s = [new t(">=0.0.0")], u = (m, p, h) => {
|
|
3332
|
-
if (m === p)
|
|
3333
|
-
return !0;
|
|
3334
|
-
if (m.length === 1 && m[0].semver === r) {
|
|
3335
|
-
if (p.length === 1 && p[0].semver === r)
|
|
3336
|
-
return !0;
|
|
3337
|
-
h.includePrerelease ? m = n : m = s;
|
|
3338
|
-
}
|
|
3339
|
-
if (p.length === 1 && p[0].semver === r) {
|
|
3340
|
-
if (h.includePrerelease)
|
|
3341
|
-
return !0;
|
|
3342
|
-
p = s;
|
|
3343
|
-
}
|
|
3344
|
-
const g = /* @__PURE__ */ new Set();
|
|
3345
|
-
let d, f;
|
|
3346
|
-
for (const b of m)
|
|
3347
|
-
b.operator === ">" || b.operator === ">=" ? d = l(d, b, h) : b.operator === "<" || b.operator === "<=" ? f = c(f, b, h) : g.add(b.semver);
|
|
3348
|
-
if (g.size > 1)
|
|
3349
|
-
return null;
|
|
3350
|
-
let v;
|
|
3351
|
-
if (d && f) {
|
|
3352
|
-
if (v = o(d.semver, f.semver, h), v > 0)
|
|
3353
|
-
return null;
|
|
3354
|
-
if (v === 0 && (d.operator !== ">=" || f.operator !== "<="))
|
|
3355
|
-
return null;
|
|
3356
|
-
}
|
|
3357
|
-
for (const b of g) {
|
|
3358
|
-
if (d && !i(b, String(d), h) || f && !i(b, String(f), h))
|
|
3359
|
-
return null;
|
|
3360
|
-
for (const G of p)
|
|
3361
|
-
if (!i(b, String(G), h))
|
|
3362
|
-
return !1;
|
|
3363
|
-
return !0;
|
|
3364
|
-
}
|
|
3365
|
-
let E, y, $, L, N = f && !h.includePrerelease && f.semver.prerelease.length ? f.semver : !1, _ = d && !h.includePrerelease && d.semver.prerelease.length ? d.semver : !1;
|
|
3366
|
-
N && N.prerelease.length === 1 && f.operator === "<" && N.prerelease[0] === 0 && (N = !1);
|
|
3367
|
-
for (const b of p) {
|
|
3368
|
-
if (L = L || b.operator === ">" || b.operator === ">=", $ = $ || b.operator === "<" || b.operator === "<=", d) {
|
|
3369
|
-
if (_ && b.semver.prerelease && b.semver.prerelease.length && b.semver.major === _.major && b.semver.minor === _.minor && b.semver.patch === _.patch && (_ = !1), b.operator === ">" || b.operator === ">=") {
|
|
3370
|
-
if (E = l(d, b, h), E === b && E !== d)
|
|
3371
|
-
return !1;
|
|
3372
|
-
} else if (d.operator === ">=" && !i(d.semver, String(b), h))
|
|
3373
|
-
return !1;
|
|
3374
|
-
}
|
|
3375
|
-
if (f) {
|
|
3376
|
-
if (N && b.semver.prerelease && b.semver.prerelease.length && b.semver.major === N.major && b.semver.minor === N.minor && b.semver.patch === N.patch && (N = !1), b.operator === "<" || b.operator === "<=") {
|
|
3377
|
-
if (y = c(f, b, h), y === b && y !== f)
|
|
3378
|
-
return !1;
|
|
3379
|
-
} else if (f.operator === "<=" && !i(f.semver, String(b), h))
|
|
3380
|
-
return !1;
|
|
3381
|
-
}
|
|
3382
|
-
if (!b.operator && (f || d) && v !== 0)
|
|
3383
|
-
return !1;
|
|
3384
|
-
}
|
|
3385
|
-
return !(d && $ && !f && v !== 0 || f && L && !d && v !== 0 || _ || N);
|
|
3386
|
-
}, l = (m, p, h) => {
|
|
3387
|
-
if (!m)
|
|
3388
|
-
return p;
|
|
3389
|
-
const g = o(m.semver, p.semver, h);
|
|
3390
|
-
return g > 0 ? m : g < 0 || p.operator === ">" && m.operator === ">=" ? p : m;
|
|
3391
|
-
}, c = (m, p, h) => {
|
|
3392
|
-
if (!m)
|
|
3393
|
-
return p;
|
|
3394
|
-
const g = o(m.semver, p.semver, h);
|
|
3395
|
-
return g < 0 ? m : g > 0 || p.operator === "<" && m.operator === "<=" ? p : m;
|
|
3396
|
-
};
|
|
3397
|
-
return Wt = a, Wt;
|
|
3398
|
-
}
|
|
3399
|
-
var Ht, Gn;
|
|
3400
|
-
function to() {
|
|
3401
|
-
if (Gn) return Ht;
|
|
3402
|
-
Gn = 1;
|
|
3403
|
-
const e = Oe(), t = je(), r = ee(), i = pi(), o = Ee(), a = Ls(), n = Ps(), s = xs(), u = js(), l = Cs(), c = qs(), m = Fs(), p = Ds(), h = ne(), g = Bs(), d = ks(), f = lr(), v = Gs(), E = Us(), y = qe(), $ = ur(), L = hi(), N = di(), _ = fr(), b = pr(), G = mi(), x = Ms(), te = Fe(), V = ie(), X = De(), A = Xs(), I = Ws(), w = Hs(), S = zs(), O = Ks(), R = hr(), P = Ys(), D = Js(), j = Zs(), B = Qs(), U = eo();
|
|
3404
|
-
return Ht = {
|
|
3405
|
-
parse: o,
|
|
3406
|
-
valid: a,
|
|
3407
|
-
clean: n,
|
|
3408
|
-
inc: s,
|
|
3409
|
-
diff: u,
|
|
3410
|
-
major: l,
|
|
3411
|
-
minor: c,
|
|
3412
|
-
patch: m,
|
|
3413
|
-
prerelease: p,
|
|
3414
|
-
compare: h,
|
|
3415
|
-
rcompare: g,
|
|
3416
|
-
compareLoose: d,
|
|
3417
|
-
compareBuild: f,
|
|
3418
|
-
sort: v,
|
|
3419
|
-
rsort: E,
|
|
3420
|
-
gt: y,
|
|
3421
|
-
lt: $,
|
|
3422
|
-
eq: L,
|
|
3423
|
-
neq: N,
|
|
3424
|
-
gte: _,
|
|
3425
|
-
lte: b,
|
|
3426
|
-
cmp: G,
|
|
3427
|
-
coerce: x,
|
|
3428
|
-
Comparator: te,
|
|
3429
|
-
Range: V,
|
|
3430
|
-
satisfies: X,
|
|
3431
|
-
toComparators: A,
|
|
3432
|
-
maxSatisfying: I,
|
|
3433
|
-
minSatisfying: w,
|
|
3434
|
-
minVersion: S,
|
|
3435
|
-
validRange: O,
|
|
3436
|
-
outside: R,
|
|
3437
|
-
gtr: P,
|
|
3438
|
-
ltr: D,
|
|
3439
|
-
intersects: j,
|
|
3440
|
-
simplifyRange: B,
|
|
3441
|
-
subset: U,
|
|
3442
|
-
SemVer: r,
|
|
3443
|
-
re: e.re,
|
|
3444
|
-
src: e.src,
|
|
3445
|
-
tokens: e.t,
|
|
3446
|
-
SEMVER_SPEC_VERSION: t.SEMVER_SPEC_VERSION,
|
|
3447
|
-
RELEASE_TYPES: t.RELEASE_TYPES,
|
|
3448
|
-
compareIdentifiers: i.compareIdentifiers,
|
|
3449
|
-
rcompareIdentifiers: i.rcompareIdentifiers
|
|
3450
|
-
}, Ht;
|
|
3451
|
-
}
|
|
3452
|
-
var J = to();
|
|
3453
|
-
const ro = [
|
|
3454
|
-
[1e3, 6e4, "sec"],
|
|
3455
|
-
[6e4, 36e5, "min"],
|
|
3456
|
-
[36e5, 864e5, "hour"],
|
|
3457
|
-
[864e5, 6048e5, "day"],
|
|
3458
|
-
[6048e5, 2628e6, "week"],
|
|
3459
|
-
[2628e6, 31536e6, "month"],
|
|
3460
|
-
[31536e6, 1 / 0, "year"]
|
|
3461
|
-
], no = {
|
|
3462
|
-
"1 day ago": "yesterday",
|
|
3463
|
-
"1 week ago": "last week",
|
|
3464
|
-
"1 month ago": "last month",
|
|
3465
|
-
"1 year ago": "last year",
|
|
3466
|
-
"in 1 day": "tomorrow",
|
|
3467
|
-
"in 1 week": "next week",
|
|
3468
|
-
"in 1 month": "next month",
|
|
3469
|
-
"in 1 year": "next year"
|
|
3470
|
-
}, io = {
|
|
3471
|
-
sec: "second",
|
|
3472
|
-
min: "minute"
|
|
3473
|
-
};
|
|
3474
|
-
function Un(e) {
|
|
3475
|
-
return e instanceof Date ? e.getTime() : typeof e == "string" ? Date.parse(e) : e;
|
|
3476
|
-
}
|
|
3477
|
-
function Mn(e, { now: t, noAffix: r = !1, times: i = ro, nowThreshold: o = 2e3, nowString: a = "now", unknownString: n = "", aliases: s = !1, aliasesMap: u = no, longUnits: l = !1 } = {}) {
|
|
3478
|
-
const c = Un(e);
|
|
3479
|
-
if (t = t !== void 0 ? Un(t) : Date.now(), Number.isNaN(c)) return n || String(e);
|
|
3480
|
-
let m = !1, p = t - c;
|
|
3481
|
-
if (p < 0 && (m = !0, p = Math.abs(p)), p < o) return a;
|
|
3482
|
-
let h = 0, g = "";
|
|
3483
|
-
for (let f = 0, v = i.length; f < v; f++) {
|
|
3484
|
-
const E = i[f];
|
|
3485
|
-
if (!(p >= E[1])) {
|
|
3486
|
-
h = Math.floor(p / E[0]), g = (l && io[E[2]] || E[2]) + (h > 1 ? "s" : "");
|
|
3487
|
-
break;
|
|
3488
|
-
}
|
|
3489
|
-
}
|
|
3490
|
-
const d = `${m && !r ? "in " : ""}${h} ${g}${!m && !r ? " ago" : ""}`;
|
|
3491
|
-
return s ? u[d] ?? d : d;
|
|
3492
|
-
}
|
|
3493
|
-
function so(e) {
|
|
3494
|
-
const t = [];
|
|
3495
|
-
for (const r of e) {
|
|
3496
|
-
const [i, o] = r.replaceAll(/\s+/g, "").split(/[<>=~]+/);
|
|
3497
|
-
i && /^[0-9.a-z]+$/.test(o) && t.push({ name: i, version: o });
|
|
3498
|
-
}
|
|
3499
|
-
return t;
|
|
3500
|
-
}
|
|
3501
|
-
const oo = [
|
|
3502
|
-
"dependencies",
|
|
3503
|
-
"devDependencies",
|
|
3504
|
-
"peerDependencies",
|
|
3505
|
-
"optionalDependencies",
|
|
3506
|
-
"resolutions"
|
|
3507
|
-
], ao = [
|
|
3508
|
-
"tool.poetry.dependencies",
|
|
3509
|
-
"tool.poetry.dev-dependencies",
|
|
3510
|
-
"tool.poetry.test-dependencies",
|
|
3511
|
-
"tool.poetry.group.dev.dependencies",
|
|
3512
|
-
"tool.poetry.group.test.dependencies"
|
|
3513
|
-
], co = [
|
|
3514
|
-
"project.dependencies",
|
|
3515
|
-
"project.optional-dependencies",
|
|
3516
|
-
"dependency-groups.dev",
|
|
3517
|
-
"dependency-groups.lint",
|
|
3518
|
-
"dependency-groups.test"
|
|
3519
|
-
], Vn = [
|
|
3520
|
-
"deps"
|
|
3521
|
-
], Xn = Bi?.() ?? ki().length ?? 4;
|
|
3522
|
-
si?.uv && Xn > 4 && (ae.UV_THREADPOOL_SIZE = String(Xn));
|
|
3523
|
-
const lo = /^.*?:\/\/(.*?@)?(github\.com[:/])/i, uo = /^([^/]+)\/([^/#]+)?.*?\/([0-9a-f]+|v?[0-9]+\.[0-9]+\.[0-9]+)$/i, er = /^[0-9a-f]{7,}$/i, Wn = /[0-9]+(\.[0-9]+)?(\.[0-9]+)?/g, fo = /[0-9]+\.[0-9]+\.[0-9]+(-.+)?/g, de = (e) => e.replace(/[|\\{}()[\]^$+*?.-]/g, "\\$&"), be = (e) => e.endsWith("/") ? e.substring(0, e.length - 1) : e, gi = Wi.version, re = "\0", tr = {
|
|
3524
|
-
"package.json": "npm",
|
|
3525
|
-
"pyproject.toml": "pypi",
|
|
3526
|
-
"go.mod": "go"
|
|
3527
|
-
}, k = Ui(Ri.slice(2), {
|
|
3528
|
-
boolean: [
|
|
3529
|
-
"E",
|
|
3530
|
-
"error-on-outdated",
|
|
3531
|
-
"U",
|
|
3532
|
-
"error-on-unchanged",
|
|
3533
|
-
"h",
|
|
3534
|
-
"help",
|
|
3535
|
-
"j",
|
|
3536
|
-
"json",
|
|
3537
|
-
"n",
|
|
3538
|
-
"no-color",
|
|
3539
|
-
"u",
|
|
3540
|
-
"update",
|
|
3541
|
-
"v",
|
|
3542
|
-
"version",
|
|
3543
|
-
"V",
|
|
3544
|
-
"verbose"
|
|
3545
|
-
],
|
|
3546
|
-
string: [
|
|
3547
|
-
"d",
|
|
3548
|
-
"allow-downgrade",
|
|
3549
|
-
"f",
|
|
3550
|
-
"file",
|
|
3551
|
-
"g",
|
|
3552
|
-
"greatest",
|
|
3553
|
-
"m",
|
|
3554
|
-
"minor",
|
|
3555
|
-
"M",
|
|
3556
|
-
"modes",
|
|
3557
|
-
"P",
|
|
3558
|
-
"patch",
|
|
3559
|
-
"p",
|
|
3560
|
-
"prerelease",
|
|
3561
|
-
"R",
|
|
3562
|
-
"release",
|
|
3563
|
-
"r",
|
|
3564
|
-
"registry",
|
|
3565
|
-
"t",
|
|
3566
|
-
"types",
|
|
3567
|
-
"githubapi",
|
|
3568
|
-
// undocumented, only for tests
|
|
3569
|
-
"pypiapi",
|
|
3570
|
-
// undocumented, only for tests
|
|
3571
|
-
"goproxy"
|
|
3572
|
-
// undocumented, only for tests
|
|
3573
|
-
],
|
|
3574
|
-
alias: {
|
|
3575
|
-
d: "allow-downgrade",
|
|
3576
|
-
E: "error-on-outdated",
|
|
3577
|
-
U: "error-on-unchanged",
|
|
3578
|
-
e: "exclude",
|
|
3579
|
-
f: "file",
|
|
3580
|
-
g: "greatest",
|
|
3581
|
-
h: "help",
|
|
3582
|
-
i: "include",
|
|
3583
|
-
j: "json",
|
|
3584
|
-
m: "minor",
|
|
3585
|
-
M: "modes",
|
|
3586
|
-
n: "no-color",
|
|
3587
|
-
P: "patch",
|
|
3588
|
-
p: "prerelease",
|
|
3589
|
-
r: "registry",
|
|
3590
|
-
R: "release",
|
|
3591
|
-
s: "semver",
|
|
3592
|
-
S: "sockets",
|
|
3593
|
-
t: "types",
|
|
3594
|
-
u: "update",
|
|
3595
|
-
v: "version",
|
|
3596
|
-
V: "verbose"
|
|
3597
|
-
}
|
|
3598
|
-
}), [po, xe, dr] = ["magenta", "red", "green"].map((e) => k["no-color"] ? String : (t) => Ai(e, String(t))), ge = Ie(le(k.greatest)), zt = Ie(le(k.prerelease)), Kt = Ie(le(k.release)), Hn = Ie(le(k.patch)), zn = Ie(le(k.minor)), Kn = le(k["allow-downgrade"]), ho = le(k.modes) || /* @__PURE__ */ new Set(["npm", "pypi"]), vi = k.githubapi ? be(k.githubapi) : "https://api.github.com", Yn = k.pypiapi ? be(k.pypiapi) : "https://pypi.org", mo = "https://proxy.golang.org", yi = k.goproxy ? [be(k.goproxy)] : vo(), ye = (e) => e.replace(/^v/, "");
|
|
3599
|
-
function he(e, t) {
|
|
3600
|
-
for (const r of t instanceof Set ? t : [])
|
|
3601
|
-
if (r.test(e)) return !0;
|
|
3602
|
-
return !1;
|
|
3603
|
-
}
|
|
3604
|
-
function go(e, t) {
|
|
3605
|
-
const r = t[`${e}:registry`] || t.registry;
|
|
3606
|
-
return r.endsWith("/") ? r : `${r}/`;
|
|
3607
|
-
}
|
|
3608
|
-
function vo() {
|
|
3609
|
-
return ae.GOPROXY ? ae.GOPROXY.split(/[,|]/).map((e) => e.trim()).filter((e) => !!e && e !== "direct") : [mo];
|
|
3610
|
-
}
|
|
3611
|
-
function yo(e, t) {
|
|
3612
|
-
return t.split(".").reduce((r, i) => r?.[i] ?? null, e);
|
|
3613
|
-
}
|
|
3614
|
-
function Le(e) {
|
|
3615
|
-
return e.split(",").filter(Boolean);
|
|
3616
|
-
}
|
|
3617
|
-
function Ei(e, t) {
|
|
3618
|
-
const r = ir(t, e);
|
|
3619
|
-
try {
|
|
3620
|
-
return Ni(r), r;
|
|
3621
|
-
} catch {
|
|
3622
|
-
}
|
|
3623
|
-
const i = nr(t);
|
|
3624
|
-
return i === t ? null : Ei(e, i);
|
|
3625
|
-
}
|
|
3626
|
-
function Eo(e, t, r, i) {
|
|
3627
|
-
if (e.startsWith("@")) {
|
|
3628
|
-
const o = (/@[a-z0-9][\w-.]+/.exec(e) || [""])[0], a = be(go(o, i));
|
|
3629
|
-
if (a !== t)
|
|
3630
|
-
try {
|
|
3631
|
-
const n = nt(a, r);
|
|
3632
|
-
if (n?.token) return { auth: n, registry: a };
|
|
3633
|
-
} catch {
|
|
3634
|
-
}
|
|
3635
|
-
return { auth: nt(t, r), registry: t };
|
|
3636
|
-
} else
|
|
3637
|
-
return { auth: nt(t, r), registry: t };
|
|
3638
|
-
}
|
|
3639
|
-
function mr(e, t, r) {
|
|
3640
|
-
return {
|
|
3641
|
-
...Object.keys(e).length && { agentOpts: e },
|
|
3642
|
-
headers: {
|
|
3643
|
-
"user-agent": `updates/${gi}`,
|
|
3644
|
-
...r && { Authorization: `${t} ${r}` }
|
|
3645
|
-
}
|
|
3646
|
-
};
|
|
3647
|
-
}
|
|
3648
|
-
function wo() {
|
|
3649
|
-
const e = /* @__PURE__ */ new Date();
|
|
3650
|
-
return [
|
|
3651
|
-
e.getFullYear(),
|
|
3652
|
-
"-",
|
|
3653
|
-
String(e.getMonth() + 1).padStart(2, "0"),
|
|
3654
|
-
"-",
|
|
3655
|
-
String(e.getDate()).padStart(2, "0"),
|
|
3656
|
-
" ",
|
|
3657
|
-
String(e.getHours()).padStart(2, "0"),
|
|
3658
|
-
":",
|
|
3659
|
-
String(e.getMinutes()).padStart(2, "0"),
|
|
3660
|
-
":",
|
|
3661
|
-
String(e.getSeconds()).padStart(2, "0")
|
|
3662
|
-
].join("");
|
|
3663
|
-
}
|
|
3664
|
-
function Jn(e) {
|
|
3665
|
-
console.error(`${wo()} ${e}`);
|
|
3666
|
-
}
|
|
3667
|
-
async function Be(e, t) {
|
|
3668
|
-
k.verbose && Jn(`${po("fetch")} ${e}`);
|
|
3669
|
-
const r = await fetch(e, t);
|
|
3670
|
-
return k.verbose && Jn(`${r.ok ? dr(r.status) : xe(r.status)} ${e}`), r;
|
|
3671
|
-
}
|
|
3672
|
-
async function $o(e, t, r, i, o, a) {
|
|
3673
|
-
const { auth: n, registry: s } = Eo(e, r, o, a), u = t === "resolutions" ? Te(e) : e, l = `${s}/${u.replace(/\//g, "%2f")}`, c = await Be(l, mr(i, n?.type, n?.token));
|
|
3674
|
-
if (c?.ok)
|
|
3675
|
-
return [await c.json(), t, s, e];
|
|
3676
|
-
throw c?.status && c?.statusText ? new Error(`Received ${c.status} ${c.statusText} from ${l}`) : new Error(`Unable to fetch ${e} from ${s}`);
|
|
3677
|
-
}
|
|
3678
|
-
async function Ro(e, t, r) {
|
|
3679
|
-
const i = `${Yn}/pypi/${e}/json`, o = await Be(i, mr(r));
|
|
3680
|
-
if (o?.ok)
|
|
3681
|
-
return [await o.json(), t, null, e];
|
|
3682
|
-
throw o?.status && o?.statusText ? new Error(`Received ${o.status} ${o.statusText} from ${i}`) : new Error(`Unable to fetch ${e} from ${Yn}`);
|
|
3683
|
-
}
|
|
3684
|
-
function So(e) {
|
|
3685
|
-
return e.split(/\r?\n/).map((t) => t.trim()).filter(Boolean);
|
|
3686
|
-
}
|
|
3687
|
-
async function gr(e, t, r, i) {
|
|
3688
|
-
const o = i.shift();
|
|
3689
|
-
if (!o)
|
|
3690
|
-
throw new Error("No more go proxies available");
|
|
3691
|
-
const a = `${o}/${e.toLowerCase()}/@latest`;
|
|
3692
|
-
let n = null, s = !1;
|
|
3693
|
-
try {
|
|
3694
|
-
if (n = await Be(a, {
|
|
3695
|
-
...mr(r),
|
|
3696
|
-
// proxy.golang.org takes 5+ seconds to answer requests for unknown packages with an error. If it
|
|
3697
|
-
// takes longer, it's likely going to fail. Subsequent requests are faster apparently as it caches.
|
|
3698
|
-
signal: AbortSignal.timeout(1e4)
|
|
3699
|
-
}), n?.ok)
|
|
3700
|
-
return await n.json();
|
|
3701
|
-
s = [404, 410].includes(n.status) && !!i.length;
|
|
3702
|
-
} catch (u) {
|
|
3703
|
-
u.name === "TimeoutError" && (s = !!i.length);
|
|
3704
|
-
}
|
|
3705
|
-
if (s)
|
|
3706
|
-
return gr(e, t, r, i);
|
|
3707
|
-
throw n?.status && n?.statusText ? new Error(`Received ${n.status} ${n.statusText} from ${a}`) : new Error(`Unable to fetch ${e} from ${o}`);
|
|
3708
|
-
}
|
|
3709
|
-
async function Oo(e, t) {
|
|
3710
|
-
let r = null, i = e;
|
|
3711
|
-
for (; ; ) {
|
|
3712
|
-
if (/\/v[0-9]+$/.test(i)) {
|
|
3713
|
-
const o = Number(i.split("/").at(-1).substring(1)) + 1;
|
|
3714
|
-
i = i.replace(/\/v[0-9]+$/, `/${`v${o}`}`);
|
|
3715
|
-
} else
|
|
3716
|
-
i = `${i}/v2`;
|
|
3717
|
-
try {
|
|
3718
|
-
const o = await gr(i, "latest", t, Array.from(yi));
|
|
3719
|
-
if (o === null)
|
|
3720
|
-
break;
|
|
3721
|
-
if (o?.Version) {
|
|
3722
|
-
r = o;
|
|
3723
|
-
continue;
|
|
3724
|
-
}
|
|
3725
|
-
} catch {
|
|
3726
|
-
break;
|
|
3727
|
-
}
|
|
3728
|
-
}
|
|
3729
|
-
return r;
|
|
3730
|
-
}
|
|
3731
|
-
function bo(e) {
|
|
3732
|
-
return e = e.replace("git@", "").replace(/.+?\/\//, "https://").replace(/\.git$/, ""), /^[a-z]+:[a-z0-9-]\/[a-z0-9-]$/.test(e) ? e.replace(/^(.+?):/, (t, r) => `https://${r}.com/`) : /^[a-z0-9-]\/[a-z0-9-]$/.test(e) ? `https://github.com/${e}` : e;
|
|
3733
|
-
}
|
|
3734
|
-
function Io(e) {
|
|
3735
|
-
return e.startsWith("https://bitbucket.org") ? "src/HEAD" : "tree/HEAD";
|
|
3736
|
-
}
|
|
3737
|
-
function Zn({ repository: e, homepage: t, info: r }, i, o) {
|
|
3738
|
-
r && (e = r.project_urls.repository || r.project_urls.Repository || r.project_urls.repo || r.project_urls.Repo || r.project_urls.source || r.project_urls.Source || r.project_urls["source code"] || r.project_urls["Source code"] || r.project_urls["Source Code"] || r.project_urls.homepage || r.project_urls.Homepage || `https://pypi.org/project/${o}/`);
|
|
3739
|
-
let a = "";
|
|
3740
|
-
if (i === "https://npm.pkg.github.com")
|
|
3741
|
-
return `https://github.com/${o.replace(/^@/, "")}`;
|
|
3742
|
-
if (e) {
|
|
3743
|
-
const n = typeof e == "string" ? e : e.url;
|
|
3744
|
-
a = bo(n), a && typeof e != "string" && e.directory && (a = `${a}/${Io(a)}/${e.directory}`);
|
|
3745
|
-
}
|
|
3746
|
-
return a || t || "";
|
|
3747
|
-
}
|
|
3748
|
-
async function Qn(e) {
|
|
3749
|
-
console.info(k.json ? JSON.stringify({ message: e }) : e), await $e();
|
|
3750
|
-
}
|
|
3751
|
-
async function $e(e, t) {
|
|
3752
|
-
if (e) {
|
|
3753
|
-
const r = e.stack ?? e.message, i = e.cause;
|
|
3754
|
-
k.json ? console.info(JSON.stringify({ error: r, cause: i })) : (console.info(xe(r)), i && console.info(xe(`Caused by: ${i}`)));
|
|
3755
|
-
}
|
|
3756
|
-
Zt === "win32" && Number(si?.node?.split(".")[0]) >= 23 && await new Promise((r) => setTimeout(r, 50)), Oi(t || e ? 1 : 0);
|
|
3757
|
-
}
|
|
3758
|
-
function _o(e = {}) {
|
|
3759
|
-
for (const r of Object.keys(e))
|
|
3760
|
-
for (const i of Object.values(e[r]))
|
|
3761
|
-
typeof i.oldPrint == "string" && (i.old = i.oldPrint, delete i.oldPrint), typeof i.newPrint == "string" && (i.new = i.newPrint, delete i.newPrint), typeof i.oldOriginal == "string" && (i.old = i.oldOriginal, delete i.oldOriginal);
|
|
3762
|
-
let t = 0;
|
|
3763
|
-
for (const r of Object.keys(e))
|
|
3764
|
-
t += Object.keys(e[r]).length;
|
|
3765
|
-
if (k.json) {
|
|
3766
|
-
const r = { results: {} };
|
|
3767
|
-
for (const i of Object.keys(e))
|
|
3768
|
-
for (const [o, a] of Object.entries(e[i])) {
|
|
3769
|
-
const [n, s] = o.split(re);
|
|
3770
|
-
r.results[i] || (r.results[i] = {}), r.results[i][n] || (r.results[i][n] = {}), r.results[i][n][s] = a;
|
|
3771
|
-
}
|
|
3772
|
-
console.info(JSON.stringify(r));
|
|
3773
|
-
} else t && console.info(Lo(e));
|
|
3774
|
-
return k["error-on-outdated"] ? t ? 2 : 0 : k["error-on-unchanged"] ? t ? 0 : 2 : 0;
|
|
3775
|
-
}
|
|
3776
|
-
function No(e, t) {
|
|
3777
|
-
Zt === "win32" && Ii(e, 0), _i(e, t, Zt === "win32" ? { flag: "r+" } : void 0);
|
|
3778
|
-
}
|
|
3779
|
-
function ei(e, t, r) {
|
|
3780
|
-
if (e === t) return e;
|
|
3781
|
-
const i = e.split(/\./), o = t.split(/\./), a = /^[0-9a-zA-Z-.]+$/;
|
|
3782
|
-
let n = "";
|
|
3783
|
-
for (let s = 0; s < i.length; s++)
|
|
3784
|
-
if (i[s] !== o[s]) {
|
|
3785
|
-
a.test(i[s]) ? n += r(i.slice(s).join(".")) : n += i[s].split("").map((u) => a.test(u) ? r(u) : u).join("") + r(`.${i.slice(s + 1).join(".")}`.replace(/\.$/, ""));
|
|
3786
|
-
break;
|
|
3787
|
-
} else
|
|
3788
|
-
n += `${i[s]}.`;
|
|
3789
|
-
return n.replace(/\.$/, "");
|
|
3790
|
-
}
|
|
3791
|
-
const ti = (e) => Ti(e).length;
|
|
3792
|
-
function Ao(e, t = " ") {
|
|
3793
|
-
let r = "";
|
|
3794
|
-
const i = new Array(e[0].length).fill(0);
|
|
3795
|
-
for (const o of e)
|
|
3796
|
-
for (const [a, n] of o.entries()) {
|
|
3797
|
-
const s = ti(n);
|
|
3798
|
-
s > i[a] && (i[a] = s);
|
|
3799
|
-
}
|
|
3800
|
-
for (const [o, a] of e.entries()) {
|
|
3801
|
-
for (const [n, s] of a.entries()) {
|
|
3802
|
-
n > 0 && (r += t);
|
|
3803
|
-
const u = " ".repeat(i[n] - ti(s));
|
|
3804
|
-
r += s + (n === a.length - 1 ? "" : u);
|
|
3805
|
-
}
|
|
3806
|
-
o < e.length - 1 && (r += `
|
|
3807
|
-
`);
|
|
3808
|
-
}
|
|
3809
|
-
return r;
|
|
3810
|
-
}
|
|
3811
|
-
function To(e) {
|
|
3812
|
-
return /\/v[0-9]$/.test(e) && (e = nr(e)), e;
|
|
3813
|
-
}
|
|
3814
|
-
function Lo(e) {
|
|
3815
|
-
const t = [["NAME", "OLD", "NEW", "AGE", "INFO"]], r = /* @__PURE__ */ new Set();
|
|
3816
|
-
for (const i of Object.keys(e))
|
|
3817
|
-
for (const [o, a] of Object.entries(e[i])) {
|
|
3818
|
-
const n = o.split(re)[1], s = `${i}|${n}`;
|
|
3819
|
-
r.has(s) || (r.add(s), t.push([
|
|
3820
|
-
i === "go" ? To(n) : n,
|
|
3821
|
-
ei(a.old, a.new, xe),
|
|
3822
|
-
ei(a.new, a.old, dr),
|
|
3823
|
-
a.age || "",
|
|
3824
|
-
a.info || ""
|
|
3825
|
-
]));
|
|
3826
|
-
}
|
|
3827
|
-
return Ao(t);
|
|
3828
|
-
}
|
|
3829
|
-
function Po(e, t) {
|
|
3830
|
-
let r = e;
|
|
3831
|
-
for (const i of Object.keys(t)) {
|
|
3832
|
-
const o = i.split(re)[1], a = t[i].oldOriginal || t[i].old, n = new RegExp(`"${de(o)}": *"${de(a)}"`, "g");
|
|
3833
|
-
r = r.replace(n, `"${o}": "${t[i].new}"`);
|
|
3834
|
-
}
|
|
3835
|
-
return r;
|
|
3836
|
-
}
|
|
3837
|
-
function xo(e, t) {
|
|
3838
|
-
let r = e;
|
|
3839
|
-
for (const i of Object.keys(t)) {
|
|
3840
|
-
const o = i.split(re)[1], a = t[i].oldOriginal || t[i].old;
|
|
3841
|
-
r = r.replace(
|
|
3842
|
-
// poetry
|
|
3843
|
-
new RegExp(`${de(o)} *= *"${de(a)}"`, "g"),
|
|
3844
|
-
`${o} = "${t[i].new}"`
|
|
3845
|
-
), r = r.replace(
|
|
3846
|
-
// uv
|
|
3847
|
-
new RegExp(`("${de(o)} *[<>=~]+ *)${de(a)}(")`, "g"),
|
|
3848
|
-
(n, s, u) => `${s}${t[i].new}${u}`
|
|
3849
|
-
);
|
|
3850
|
-
}
|
|
3851
|
-
return r;
|
|
3852
|
-
}
|
|
3853
|
-
function jo(e, t, r) {
|
|
3854
|
-
let i = e.replace(fo, t);
|
|
3855
|
-
if (r && r !== e && /^[\^~]/.test(i)) {
|
|
3856
|
-
const o = r.substring(1).split("."), a = i.substring(1).split(".");
|
|
3857
|
-
o.length !== a.length && (i = `${i[0]}${a.slice(0, o.length).join(".")}`);
|
|
3858
|
-
}
|
|
3859
|
-
return i;
|
|
3860
|
-
}
|
|
3861
|
-
function Yt(e) {
|
|
3862
|
-
const t = J.parse(e);
|
|
3863
|
-
return t ? !!t.prerelease.length : !1;
|
|
3864
|
-
}
|
|
3865
|
-
function wi(e) {
|
|
3866
|
-
return /[0-9]+\.[0-9]+\.[0-9]+-.+/.test(e);
|
|
3867
|
-
}
|
|
3868
|
-
function Re(e) {
|
|
3869
|
-
try {
|
|
3870
|
-
return J.coerce(e)?.version ?? "";
|
|
3871
|
-
} catch {
|
|
3872
|
-
return "";
|
|
3873
|
-
}
|
|
3874
|
-
}
|
|
3875
|
-
function Co(e, t, { range: r, semvers: i, usePre: o, useRel: a, useGreatest: n }) {
|
|
3876
|
-
let s = Re(r), u = 0;
|
|
3877
|
-
o = wi(r) || o, o && (i.add("prerelease"), i.has("patch") && i.add("prepatch"), i.has("minor") && i.add("preminor"), i.has("major") && i.add("premajor"));
|
|
3878
|
-
for (const l of t) {
|
|
3879
|
-
const c = J.parse(l);
|
|
3880
|
-
if (!c || !s || c.prerelease.length && (!o || a)) continue;
|
|
3881
|
-
const m = J.diff(s, c.version);
|
|
3882
|
-
if (!(!m || !i.has(m)))
|
|
3883
|
-
if (n || !("time" in e))
|
|
3884
|
-
J.gte(Re(c?.version), s) && (s = c.version);
|
|
3885
|
-
else {
|
|
3886
|
-
const p = new Date(e.time[l]).getTime();
|
|
3887
|
-
p >= 0 && p > u && (s = c.version, u = p);
|
|
3888
|
-
}
|
|
3889
|
-
}
|
|
3890
|
-
return s || null;
|
|
3891
|
-
}
|
|
3892
|
-
function qo(e, { mode: t, range: r, useGreatest: i, useRel: o, usePre: a, semvers: n }) {
|
|
3893
|
-
if (t === "go")
|
|
3894
|
-
return J.gt(ye(e.Version), ye(r)) ? e.Version : null;
|
|
3895
|
-
if (r === "*" || r.includes("||")) return null;
|
|
3896
|
-
let s = [];
|
|
3897
|
-
t === "pypi" ? s = Object.keys(e.releases).filter((l) => J.valid(l)) : t === "npm" && (s = Object.keys(e.versions).filter((l) => J.valid(l)));
|
|
3898
|
-
const u = Co(e, s, { range: r, semvers: n, usePre: a, useRel: o, useGreatest: i });
|
|
3899
|
-
if (!u) return null;
|
|
3900
|
-
if (i)
|
|
3901
|
-
return u;
|
|
3902
|
-
{
|
|
3903
|
-
let l = "", c = "";
|
|
3904
|
-
t === "pypi" ? (c = e.info.version, l = Re(e.info.version)) : l = e["dist-tags"].latest;
|
|
3905
|
-
const m = Re(r), p = wi(r), h = Yt(u), g = Yt(l), d = J.gt(u, m);
|
|
3906
|
-
if (!o && a || p && h || o && !d && p && !h || p && !h && d)
|
|
3907
|
-
return u;
|
|
3908
|
-
if (p && !h && !d)
|
|
3909
|
-
return null;
|
|
3910
|
-
const f = J.diff(m, l);
|
|
3911
|
-
return f && f !== "prerelease" && !n.has(f.replace(/^pre/, "")) || o && Yt(l) ? u : J.lt(l, m) && !g ? Kn === !0 || he(e.name, Kn) ? l : null : c || l;
|
|
3912
|
-
}
|
|
3913
|
-
}
|
|
3914
|
-
function $i(e) {
|
|
3915
|
-
const t = {}, r = ae.UPDATES_GITHUB_API_TOKEN || ae.GITHUB_API_TOKEN || ae.GH_TOKEN || ae.GITHUB_TOKEN || ae.HOMEBREW_GITHUB_API_TOKEN;
|
|
3916
|
-
return r && (t.headers = { Authorization: `Bearer ${r}` }), Be(e, t);
|
|
3917
|
-
}
|
|
3918
|
-
async function Fo(e, t) {
|
|
3919
|
-
const r = `${vi}/repos/${e}/${t}/commits`, i = await $i(r);
|
|
3920
|
-
if (!i?.ok) return { hash: "", commit: {} };
|
|
3921
|
-
const o = await i.json(), { sha: a, commit: n } = o[0];
|
|
3922
|
-
return { hash: a, commit: n };
|
|
3923
|
-
}
|
|
3924
|
-
async function Do(e, t) {
|
|
3925
|
-
const r = await $i(`${vi}/repos/${e}/${t}/git/refs/tags`);
|
|
3926
|
-
return r?.ok ? (await r.json()).map((a) => a.ref.replace(/^refs\/tags\//, "")) : [];
|
|
3927
|
-
}
|
|
3928
|
-
function Bo(e, t, r) {
|
|
3929
|
-
const i = ye(t);
|
|
3930
|
-
if (J.valid(i))
|
|
3931
|
-
if (r) {
|
|
3932
|
-
let o = t, a = ye(t);
|
|
3933
|
-
for (const n of e) {
|
|
3934
|
-
const s = ye(n);
|
|
3935
|
-
J.valid(s) && (!o || J.gt(s, a)) && (o = n, a = s);
|
|
3936
|
-
}
|
|
3937
|
-
if (J.neq(i, a))
|
|
3938
|
-
return o;
|
|
3939
|
-
} else {
|
|
3940
|
-
const o = e.at(-1);
|
|
3941
|
-
if (!o) return;
|
|
3942
|
-
const a = ye(o);
|
|
3943
|
-
if (!J.valid(a)) return;
|
|
3944
|
-
if (J.neq(i, a))
|
|
3945
|
-
return o;
|
|
3946
|
-
}
|
|
3947
|
-
}
|
|
3948
|
-
async function ko(e, t, r) {
|
|
3949
|
-
const i = t.old.replace(lo, ""), [o, a, n, s] = uo.exec(i) || [];
|
|
3950
|
-
if (!(!a || !n || !s))
|
|
3951
|
-
if (er.test(s)) {
|
|
3952
|
-
const { hash: u, commit: l } = await Fo(a, n);
|
|
3953
|
-
if (!u) return;
|
|
3954
|
-
const c = l?.committer?.date ?? l?.author?.date, m = u.substring(0, s.length);
|
|
3955
|
-
if (s !== m) {
|
|
3956
|
-
const p = t.old.replace(s, m);
|
|
3957
|
-
return { key: e, newRange: p, user: a, repo: n, oldRef: s, newRef: m, newDate: c };
|
|
3958
|
-
}
|
|
3959
|
-
} else {
|
|
3960
|
-
const u = await Do(a, n), l = Bo(u, s, r);
|
|
3961
|
-
if (l)
|
|
3962
|
-
return { key: e, newRange: l, user: a, repo: n, oldRef: s, newRef: l };
|
|
3963
|
-
}
|
|
3964
|
-
}
|
|
3965
|
-
function Go(e) {
|
|
3966
|
-
return e.replace(/-.*/, "");
|
|
3967
|
-
}
|
|
3968
|
-
function ri(e) {
|
|
3969
|
-
const t = e.match(Wn);
|
|
3970
|
-
return t?.length !== 1 ? e : e.replace(Wn, Re(t[0]));
|
|
3971
|
-
}
|
|
3972
|
-
function le(e) {
|
|
3973
|
-
return e === void 0 ? !1 : e === "" ? !0 : typeof e == "string" ? e.includes(",") ? new Set(Le(e)) : /* @__PURE__ */ new Set([e]) : Array.isArray(e) ? new Set(e) : !1;
|
|
3974
|
-
}
|
|
3975
|
-
function Uo(e) {
|
|
3976
|
-
return Array.from(e.matchAll(/(----BEGIN CERT[^]+?IFICATE----)/g), (t) => t[0]);
|
|
3977
|
-
}
|
|
3978
|
-
function Mo(e) {
|
|
3979
|
-
return Array.from(e.matchAll(/(----BEGIN [^]+?PRIVATE KEY----)/g), (t) => t[0]);
|
|
3980
|
-
}
|
|
3981
|
-
function ni(e, t) {
|
|
3982
|
-
return new RegExp(`^${de(e).replaceAll("\\*", ".*")}$`, t ? "i" : "");
|
|
3983
|
-
}
|
|
3984
|
-
function rr(e, t, r) {
|
|
3985
|
-
return t && typeof e == "string" ? /\/.+\//.test(e) ? new RegExp(e.slice(1, -1)) : ni(e, r) : e instanceof RegExp ? e : ni(e, r);
|
|
3986
|
-
}
|
|
3987
|
-
function Ie(e) {
|
|
3988
|
-
if (e instanceof Set) {
|
|
3989
|
-
const t = /* @__PURE__ */ new Set();
|
|
3990
|
-
for (const r of e)
|
|
3991
|
-
t.add(rr(r, !0, !1));
|
|
3992
|
-
return t;
|
|
3993
|
-
}
|
|
3994
|
-
return e;
|
|
3995
|
-
}
|
|
3996
|
-
function ii(e, t) {
|
|
3997
|
-
const r = /* @__PURE__ */ new Set();
|
|
3998
|
-
for (const i of e || [])
|
|
3999
|
-
r.add(rr(i, !0, !0));
|
|
4000
|
-
for (const i of t || [])
|
|
4001
|
-
r.add(rr(i, !1, !0));
|
|
4002
|
-
return r;
|
|
4003
|
-
}
|
|
4004
|
-
function Jt(e, t, r, i) {
|
|
4005
|
-
if (t === "pypi" && e === "python") return !1;
|
|
4006
|
-
if (!r.size && !i.size) return !0;
|
|
4007
|
-
for (const o of i)
|
|
4008
|
-
if (o.test(e)) return !1;
|
|
4009
|
-
for (const o of r)
|
|
4010
|
-
if (o.test(e)) return !0;
|
|
4011
|
-
return !r.size;
|
|
4012
|
-
}
|
|
4013
|
-
function Vo(e) {
|
|
4014
|
-
const t = /* @__PURE__ */ new Set(), r = /* @__PURE__ */ new Set();
|
|
4015
|
-
if (e)
|
|
4016
|
-
for (const i of e) {
|
|
4017
|
-
let o;
|
|
4018
|
-
try {
|
|
4019
|
-
o = Er(i);
|
|
4020
|
-
} catch (a) {
|
|
4021
|
-
throw new Error(`Unable to open ${i}: ${a.message}`);
|
|
4022
|
-
}
|
|
4023
|
-
if (o?.isFile()) {
|
|
4024
|
-
const a = Ae(i);
|
|
4025
|
-
t.add(a), r.add(a);
|
|
4026
|
-
} else if (o?.isDirectory())
|
|
4027
|
-
for (const a of Object.keys(tr)) {
|
|
4028
|
-
const n = ir(i, a);
|
|
4029
|
-
let s = null;
|
|
4030
|
-
try {
|
|
4031
|
-
s = Er(n);
|
|
4032
|
-
} catch {
|
|
4033
|
-
}
|
|
4034
|
-
s?.isFile() && t.add(Ae(n));
|
|
4035
|
-
}
|
|
4036
|
-
else
|
|
4037
|
-
throw new Error(`${i} is neither a file nor directory`);
|
|
4038
|
-
}
|
|
4039
|
-
else
|
|
4040
|
-
for (const i of Object.keys(tr)) {
|
|
4041
|
-
const o = Ei(i, bi());
|
|
4042
|
-
o && t.add(Ae(o));
|
|
4043
|
-
}
|
|
4044
|
-
return [t, r];
|
|
4045
|
-
}
|
|
4046
|
-
async function Xo(e) {
|
|
4047
|
-
const t = [];
|
|
4048
|
-
for (const i of ["", ".config/"])
|
|
4049
|
-
for (const o of ["js", "ts", "mjs", "mts"])
|
|
4050
|
-
t.push(`${i}updates${i ? "" : ".config"}.${o}`);
|
|
4051
|
-
let r = {};
|
|
4052
|
-
try {
|
|
4053
|
-
({ default: r } = await Promise.any(t.map((i) => import(ir(e, ...i.split("/"))))));
|
|
4054
|
-
} catch {
|
|
4055
|
-
}
|
|
4056
|
-
return r;
|
|
4057
|
-
}
|
|
4058
|
-
async function Wo() {
|
|
4059
|
-
for (const f of [vr, Si])
|
|
4060
|
-
f?._handle?.setBlocking?.(!0);
|
|
4061
|
-
const e = 96, t = typeof k.sockets == "number" ? k.sockets : e, { help: r, version: i, file: o, types: a, update: n } = k;
|
|
4062
|
-
r && (vr.write(`usage: updates [options]
|
|
12
|
+
`):e.split(`,`)}switch(e){case`hoist-pattern`:case`public-hoist-pattern`:return n(t)}return t}t.exports=c})),Ae=k((exports=>{let t=j(`os`),n=j(`path`),r=t.tmpdir(),i=process.getuid?process.getuid():process.pid,a=()=>!0,o=process.platform===`win32`,s={editor:()=>process.env.EDITOR||process.env.VISUAL||(o?`notepad.exe`:`vi`),shell:()=>o?process.env.COMSPEC||`cmd.exe`:process.env.SHELL||`/bin/bash`},c={fromString:()=>process.umask()},l=t.homedir();l?process.env.HOME=l:l=n.resolve(r,`npm-`+i);let u=process.platform===`win32`?`npm-cache`:`.npm`,d=process.platform===`win32`&&process.env.APPDATA||l,f=n.resolve(d,u),p,m;Object.defineProperty(exports,`defaults`,{get:function(){return p||(process.env.PREFIX?m=process.env.PREFIX:process.platform===`win32`?m=n.dirname(process.execPath):(m=n.dirname(n.dirname(process.execPath)),process.env.DESTDIR&&(m=n.join(process.env.DESTDIR,m))),p={access:null,"allow-same-version":!1,"always-auth":!1,also:null,audit:!0,"auth-type":`legacy`,"bin-links":!0,browser:null,ca:null,cafile:null,cache:f,"cache-lock-stale":6e4,"cache-lock-retries":10,"cache-lock-wait":1e4,"cache-max":1/0,"cache-min":10,cert:null,cidr:null,color:process.env.NO_COLOR==null,depth:1/0,description:!0,dev:!1,"dry-run":!1,editor:s.editor(),"engine-strict":!1,force:!1,"fetch-retries":2,"fetch-retry-factor":10,"fetch-retry-mintimeout":1e4,"fetch-retry-maxtimeout":6e4,git:`git`,"git-tag-version":!0,"commit-hooks":!0,global:!1,globalconfig:n.resolve(m,`etc`,`npmrc`),"global-style":!1,group:process.platform===`win32`?0:process.env.SUDO_GID||process.getgid&&process.getgid(),"ham-it-up":!1,heading:`npm`,"if-present":!1,"ignore-prepublish":!1,"ignore-scripts":!1,"init-module":n.resolve(l,`.npm-init.js`),"init-author-name":``,"init-author-email":``,"init-author-url":``,"init-version":`1.0.0`,"init-license":`ISC`,json:!1,key:null,"legacy-bundling":!1,link:!1,"local-address":void 0,loglevel:`notice`,logstream:process.stderr,"logs-max":10,long:!1,maxsockets:50,message:`%s`,"metrics-registry":null,"node-options":null,offline:!1,"onload-script":!1,only:null,optional:!0,otp:null,"package-lock":!0,"package-lock-only":!1,parseable:!1,"prefer-offline":!1,"prefer-online":!1,prefix:m,production:process.env.NODE_ENV===`production`,progress:!process.env.TRAVIS&&!process.env.CI,provenance:!1,proxy:null,"https-proxy":null,"no-proxy":null,"user-agent":`npm/{npm-version} node/{node-version} {platform} {arch}`,"read-only":!1,"rebuild-bundle":!0,registry:`https://registry.npmjs.org/`,rollback:!0,save:!0,"save-bundle":!1,"save-dev":!1,"save-exact":!1,"save-optional":!1,"save-prefix":`^`,"save-prod":!1,scope:``,"script-shell":null,"scripts-prepend-node-path":`warn-only`,searchopts:``,searchexclude:null,searchlimit:20,searchstaleness:900,"send-metrics":!1,shell:s.shell(),shrinkwrap:!0,"sign-git-tag":!1,"sso-poll-frequency":500,"sso-type":`oauth`,"strict-ssl":!0,tag:`latest`,"tag-version-prefix":`v`,timing:!1,tmp:r,unicode:a(),"unsafe-perm":process.platform===`win32`||process.platform===`cygwin`||!(process.getuid&&process.setuid&&process.getgid&&process.setgid)||process.getuid()!==0,usage:!1,user:process.platform===`win32`?0:`nobody`,userconfig:n.resolve(l,`.npmrc`),umask:process.umask?process.umask():c.fromString(`022`),version:!1,versions:!1,viewer:process.platform===`win32`?`browser`:`man`,_exit:!0},p)}})})),je=k(((exports,t)=>{let n=j(`path`),r=ke(),i=Ae();t.exports=(e,t,a)=>{let o=new r(Object.assign({},i.defaults,a),t);o.add(Object.assign({},e),`cli`);let s=[],c=!1;if(j.resolve.paths){let e=j.resolve.paths(`npm`),t;try{t=j.resolve(`npm`,{paths:e.slice(-1)})}catch{c=!0}t&&s.push(o.addFile(n.resolve(n.dirname(t),`..`,`npmrc`),`builtin`))}o.addEnv(),o.loadPrefix();let l=n.resolve(o.localPrefix,`.npmrc`),u=o.get(`userconfig`);if(!o.get(`global`)&&l!==u?s.push(o.addFile(l,`project`)):o.add({},`project`),o.get(`workspace-prefix`)&&o.get(`workspace-prefix`)!==l){let e=n.resolve(o.get(`workspace-prefix`),`.npmrc`);s.push(o.addFile(e,`workspace`))}if(s.push(o.addFile(o.get(`userconfig`),`user`)),o.get(`prefix`)){let e=n.resolve(o.get(`prefix`),`etc`);o.root.globalconfig=n.resolve(e,`npmrc`),o.root.globalignorefile=n.resolve(e,`npmignore`)}s.push(o.addFile(o.get(`globalconfig`),`global`)),o.loadUser();let d=o.get(`cafile`);return d&&o.loadCAFile(d),{config:o,warnings:s.filter(Boolean),failedToLoadBuiltInConfig:c}},Object.defineProperty(t.exports,`defaults`,{get(){return i.defaults},enumerable:!0})})),Me=k(((exports,t)=>{let n=je();t.exports=function(){let e,t;arguments.length>=2?(e=arguments[0],t=Object.assign({},arguments[1])):typeof arguments[0]==`string`?e=arguments[0]:t=Object.assign({},arguments[0]),t||={};let r=t.npmrc;return t.npmrc=(t.npmrc?{config:{get:e=>r[e]}}:n()).config,e=e||t.npmrc.get(`registry`)||n.defaults.registry,i(e,t)||a(t.npmrc)};function r(e,t){let n=new URL(t,new URL(e.startsWith(`//`)?`./${e}`:e,`resolve://`));if(n.protocol===`resolve:`){let{pathname:e,search:t,hash:r}=n;return e+t+r}return n.toString()}function i(e,t){let n=e instanceof URL?e:new URL(e.startsWith(`//`)?`http:${e}`:e),a;for(;a!==`/`&&n.pathname!==a;){a=n.pathname||`/`;let c=`//`+n.host+a.replace(/\/$/,``),l=s(c,t.npmrc);if(l)return l;if(!t.recursive)return/\/$/.test(e)?void 0:i(new URL(`./`,n),t);n.pathname=r(o(a),`..`)||`/`}}function a(e){if(e.get(`_auth`))return{token:c(e.get(`_auth`)),type:`Basic`}}function o(e){return e[e.length-1]===`/`?e:e+`/`}function s(e,t){let n=l(t.get(e+`:_authToken`)||t.get(e+`/:_authToken`));if(n)return n;let r=t.get(e+`:username`)||t.get(e+`/:username`),i=t.get(e+`:_password`)||t.get(e+`/:_password`),a=u(r,i);if(a)return a;let o=d(t.get(e+`:_auth`)||t.get(e+`/:_auth`));if(o)return o}function c(e){return e.replace(/^\$\{?([^}]*)\}?$/,function(e,t){return process.env[t]})}function l(e){if(e)return{token:c(e),type:`Bearer`}}function u(e,t){if(!e||!t)return;let n=Buffer.from(c(t),`base64`).toString(`utf8`);return{token:Buffer.from(e+`:`+n,`utf8`).toString(`base64`),type:`Basic`,password:n,username:e}}function d(e){if(e)return{token:c(e),type:`Basic`}}}));
|
|
13
|
+
/*!
|
|
14
|
+
* Copyright (c) Squirrel Chat et al., All rights reserved.
|
|
15
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
16
|
+
*
|
|
17
|
+
* Redistribution and use in source and binary forms, with or without
|
|
18
|
+
* modification, are permitted provided that the following conditions are met:
|
|
19
|
+
*
|
|
20
|
+
* 1. Redistributions of source code must retain the above copyright notice, this
|
|
21
|
+
* list of conditions and the following disclaimer.
|
|
22
|
+
* 2. Redistributions in binary form must reproduce the above copyright notice,
|
|
23
|
+
* this list of conditions and the following disclaimer in the
|
|
24
|
+
* documentation and/or other materials provided with the distribution.
|
|
25
|
+
* 3. Neither the name of the copyright holder nor the names of its contributors
|
|
26
|
+
* may be used to endorse or promote products derived from this software without
|
|
27
|
+
* specific prior written permission.
|
|
28
|
+
*
|
|
29
|
+
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
|
30
|
+
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
|
31
|
+
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
|
32
|
+
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
|
|
33
|
+
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
|
34
|
+
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
|
35
|
+
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
|
36
|
+
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
|
37
|
+
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
|
38
|
+
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
39
|
+
*/
|
|
40
|
+
function Ne(e,t){let n=e.slice(0,t).split(/\r\n|\n|\r/g);return[n.length,n.pop().length+1]}function Pe(e,t,n){let r=e.split(/\r\n|\n|\r/g),i=``,a=(Math.log10(t+1)|0)+1;for(let e=t-1;e<=t+1;e++){let o=r[e-1];o&&(i+=e.toString().padEnd(a,` `),i+=`: `,i+=o,i+=`
|
|
41
|
+
`,e===t&&(i+=` `.repeat(a+n+2),i+=`^
|
|
42
|
+
`))}return i}var M=class extends Error{line;column;codeblock;constructor(e,t){let[n,r]=Ne(t.toml,t.ptr),i=Pe(t.toml,n,r);super(`Invalid TOML document: ${e}\n\n${i}`,t),this.line=n,this.column=r,this.codeblock=i}};function Fe(e,t){let n=0;for(;e[t-++n]===`\\`;);return--n&&n%2}function N(e,t=0,n=e.length){let r=e.indexOf(`
|
|
43
|
+
`,t);return e[r-1]===`\r`&&r--,r<=n?r:-1}function Ie(e,t){for(let n=t;n<e.length;n++){let r=e[n];if(r===`
|
|
44
|
+
`)return n;if(r===`\r`&&e[n+1]===`
|
|
45
|
+
`)return n+1;if(r<` `&&r!==` `||r===``)throw new M(`control characters are not allowed in comments`,{toml:e,ptr:t})}return e.length}function P(e,t,n,r){let i;for(;(i=e[t])===` `||i===` `||!n&&(i===`
|
|
46
|
+
`||i===`\r`&&e[t+1]===`
|
|
47
|
+
`);)t++;return r||i!==`#`?t:P(e,Ie(e,t),n)}function Le(e,t,n,r,i=!1){if(!r)return t=N(e,t),t<0?e.length:t;for(let a=t;a<e.length;a++){let t=e[a];if(t===`#`)a=N(e,a);else if(t===n)return a+1;else if(t===r||i&&(t===`
|
|
48
|
+
`||t===`\r`&&e[a+1]===`
|
|
49
|
+
`))return a}throw new M(`cannot find end of structure`,{toml:e,ptr:t})}function Re(e,t){let n=e[t],r=n===e[t+1]&&e[t+1]===e[t+2]?e.slice(t,t+3):n;t+=r.length-1;do t=e.indexOf(r,++t);while(t>-1&&n!==`'`&&Fe(e,t));return t>-1&&(t+=r.length,r.length>1&&(e[t]===n&&t++,e[t]===n&&t++)),t}
|
|
50
|
+
/*!
|
|
51
|
+
* Copyright (c) Squirrel Chat et al., All rights reserved.
|
|
52
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
53
|
+
*
|
|
54
|
+
* Redistribution and use in source and binary forms, with or without
|
|
55
|
+
* modification, are permitted provided that the following conditions are met:
|
|
56
|
+
*
|
|
57
|
+
* 1. Redistributions of source code must retain the above copyright notice, this
|
|
58
|
+
* list of conditions and the following disclaimer.
|
|
59
|
+
* 2. Redistributions in binary form must reproduce the above copyright notice,
|
|
60
|
+
* this list of conditions and the following disclaimer in the
|
|
61
|
+
* documentation and/or other materials provided with the distribution.
|
|
62
|
+
* 3. Neither the name of the copyright holder nor the names of its contributors
|
|
63
|
+
* may be used to endorse or promote products derived from this software without
|
|
64
|
+
* specific prior written permission.
|
|
65
|
+
*
|
|
66
|
+
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
|
67
|
+
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
|
68
|
+
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
|
69
|
+
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
|
|
70
|
+
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
|
71
|
+
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
|
72
|
+
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
|
73
|
+
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
|
74
|
+
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
|
75
|
+
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
76
|
+
*/
|
|
77
|
+
let ze=/^(\d{4}-\d{2}-\d{2})?[T ]?(?:(\d{2}):\d{2}:\d{2}(?:\.\d+)?)?(Z|[-+]\d{2}:\d{2})?$/i;var Be=class e extends Date{#hasDate=!1;#hasTime=!1;#offset=null;constructor(e){let t=!0,n=!0,r=`Z`;if(typeof e==`string`){let i=e.match(ze);i?(i[1]||(t=!1,e=`0000-01-01T${e}`),n=!!i[2],n&&e[10]===` `&&(e=e.replace(` `,`T`)),i[2]&&+i[2]>23?e=``:(r=i[3]||null,e=e.toUpperCase(),!r&&n&&(e+=`Z`))):e=``}super(e),isNaN(this.getTime())||(this.#hasDate=t,this.#hasTime=n,this.#offset=r)}isDateTime(){return this.#hasDate&&this.#hasTime}isLocal(){return!this.#hasDate||!this.#hasTime||!this.#offset}isDate(){return this.#hasDate&&!this.#hasTime}isTime(){return this.#hasTime&&!this.#hasDate}isValid(){return this.#hasDate||this.#hasTime}toISOString(){let e=super.toISOString();if(this.isDate())return e.slice(0,10);if(this.isTime())return e.slice(11,23);if(this.#offset===null)return e.slice(0,-1);if(this.#offset===`Z`)return e;let t=this.#offset.slice(1,3)*60+ +this.#offset.slice(4,6);return t=this.#offset[0]===`-`?t:-t,new Date(this.getTime()-t*6e4).toISOString().slice(0,-1)+this.#offset}static wrapAsOffsetDateTime(t,n=`Z`){let r=new e(t);return r.#offset=n,r}static wrapAsLocalDateTime(t){let n=new e(t);return n.#offset=null,n}static wrapAsLocalDate(t){let n=new e(t);return n.#hasTime=!1,n.#offset=null,n}static wrapAsLocalTime(t){let n=new e(t);return n.#hasDate=!1,n.#offset=null,n}};let Ve=/^((0x[0-9a-fA-F](_?[0-9a-fA-F])*)|(([+-]|0[ob])?\d(_?\d)*))$/,He=/^[+-]?\d(_?\d)*(\.\d(_?\d)*)?([eE][+-]?\d(_?\d)*)?$/,Ue=/^[+-]?0[0-9_]/,We=/^[0-9a-f]{4,8}$/i,Ge={b:`\b`,t:` `,n:`
|
|
78
|
+
`,f:`\f`,r:`\r`,'"':`"`,"\\":`\\`};function Ke(e,t=0,n=e.length){let r=e[t]===`'`,i=e[t++]===e[t]&&e[t]===e[t+1];i&&(n-=2,e[t+=2]===`\r`&&t++,e[t]===`
|
|
79
|
+
`&&t++);let a=0,o,s=``,c=t;for(;t<n-1;){let n=e[t++];if(n===`
|
|
80
|
+
`||n===`\r`&&e[t]===`
|
|
81
|
+
`){if(!i)throw new M(`newlines are not allowed in strings`,{toml:e,ptr:t-1})}else if(n<` `&&n!==` `||n===``)throw new M(`control characters are not allowed in strings`,{toml:e,ptr:t-1});if(o){if(o=!1,n===`u`||n===`U`){let r=e.slice(t,t+=n===`u`?4:8);if(!We.test(r))throw new M(`invalid unicode escape`,{toml:e,ptr:a});try{s+=String.fromCodePoint(parseInt(r,16))}catch{throw new M(`invalid unicode escape`,{toml:e,ptr:a})}}else if(i&&(n===`
|
|
82
|
+
`||n===` `||n===` `||n===`\r`)){if(t=P(e,t-1,!0),e[t]!==`
|
|
83
|
+
`&&e[t]!==`\r`)throw new M(`invalid escape: only line-ending whitespace may be escaped`,{toml:e,ptr:a});t=P(e,t)}else if(n in Ge)s+=Ge[n];else throw new M(`unrecognized escape sequence`,{toml:e,ptr:a});c=t}else !r&&n===`\\`&&(a=t-1,o=!0,s+=e.slice(c,a))}return s+e.slice(c,n-1)}function qe(e,t,n,r){if(e===`true`)return!0;if(e===`false`)return!1;if(e===`-inf`)return-1/0;if(e===`inf`||e===`+inf`)return 1/0;if(e===`nan`||e===`+nan`||e===`-nan`)return NaN;if(e===`-0`)return r?0n:0;let i=Ve.test(e);if(i||He.test(e)){if(Ue.test(e))throw new M(`leading zeroes are not allowed`,{toml:t,ptr:n});e=e.replace(/_/g,``);let a=+e;if(isNaN(a))throw new M(`invalid number`,{toml:t,ptr:n});if(i){if((i=!Number.isSafeInteger(a))&&!r)throw new M(`integer value cannot be represented losslessly`,{toml:t,ptr:n});(i||r===!0)&&(a=BigInt(e))}return a}let a=new Be(e);if(!a.isValid())throw new M(`invalid value`,{toml:t,ptr:n});return a}function Je(e,t,n,r){let i=e.slice(t,n),a=i.indexOf(`#`);a>-1&&(Ie(e,a),i=i.slice(0,a));let o=i.trimEnd();if(!r){let n=i.indexOf(`
|
|
84
|
+
`,o.length);if(n>-1)throw new M(`newlines are not allowed in inline tables`,{toml:e,ptr:t+n})}return[o,a]}function Ye(e,t,n,r,i){if(r===0)throw new M(`document contains excessively nested structures. aborting.`,{toml:e,ptr:t});let a=e[t];if(a===`[`||a===`{`){let[o,s]=a===`[`?$e(e,t,r,i):Qe(e,t,r,i),c=n?Le(e,s,`,`,n):s;if(s-c&&n===`}`){let t=N(e,s,c);if(t>-1)throw new M(`newlines are not allowed in inline tables`,{toml:e,ptr:t})}return[o,c]}let o;if(a===`"`||a===`'`){o=Re(e,t);let r=Ke(e,t,o);if(n){if(o=P(e,o,n!==`]`),e[o]&&e[o]!==`,`&&e[o]!==n&&e[o]!==`
|
|
85
|
+
`&&e[o]!==`\r`)throw new M(`unexpected character encountered`,{toml:e,ptr:o});o+=+(e[o]===`,`)}return[r,o]}o=Le(e,t,`,`,n);let s=Je(e,t,o-+(e[o-1]===`,`),n===`]`);if(!s[0])throw new M(`incomplete key-value declaration: no value specified`,{toml:e,ptr:t});return n&&s[1]>-1&&(o=P(e,t+s[1]),o+=+(e[o]===`,`)),[qe(s[0],e,t,i),o]}let Xe=/^[a-zA-Z0-9-_]+[ \t]*$/;function Ze(e,t,n=`=`){let r=t-1,i=[],a=e.indexOf(n,t);if(a<0)throw new M(`incomplete key-value: cannot find end of key`,{toml:e,ptr:t});do{let o=e[t=++r];if(o!==` `&&o!==` `)if(o===`"`||o===`'`){if(o===e[t+1]&&o===e[t+2])throw new M(`multiline strings are not allowed in keys`,{toml:e,ptr:t});let s=Re(e,t);if(s<0)throw new M(`unfinished string encountered`,{toml:e,ptr:t});r=e.indexOf(`.`,s);let c=e.slice(s,r<0||r>a?a:r),l=N(c);if(l>-1)throw new M(`newlines are not allowed in keys`,{toml:e,ptr:t+r+l});if(c.trimStart())throw new M(`found extra tokens after the string part`,{toml:e,ptr:s});if(a<s&&(a=e.indexOf(n,s),a<0))throw new M(`incomplete key-value: cannot find end of key`,{toml:e,ptr:t});i.push(Ke(e,t,s))}else{r=e.indexOf(`.`,t);let n=e.slice(t,r<0||r>a?a:r);if(!Xe.test(n))throw new M(`only letter, numbers, dashes and underscores are allowed in keys`,{toml:e,ptr:t});i.push(n.trimEnd())}}while(r+1&&r<a);return[i,P(e,a+1,!0,!0)]}function Qe(e,t,n,r){let i={},a=new Set,o,s=0;for(t++;(o=e[t++])!==`}`&&o;){let c={toml:e,ptr:t-1};if(o===`
|
|
86
|
+
`)throw new M(`newlines are not allowed in inline tables`,c);if(o===`#`)throw new M(`inline tables cannot contain comments`,c);if(o===`,`)throw new M(`expected key-value, found comma`,c);if(o!==` `&&o!==` `){let o,c=i,l=!1,[u,d]=Ze(e,t-1);for(let n=0;n<u.length;n++){if(n&&(c=l?c[o]:c[o]={}),o=u[n],(l=Object.hasOwn(c,o))&&(typeof c[o]!=`object`||a.has(c[o])))throw new M(`trying to redefine an already defined value`,{toml:e,ptr:t});!l&&o===`__proto__`&&Object.defineProperty(c,o,{enumerable:!0,configurable:!0,writable:!0})}if(l)throw new M(`trying to redefine an already defined value`,{toml:e,ptr:t});let[f,p]=Ye(e,d,`}`,n-1,r);a.add(f),c[o]=f,t=p,s=e[t-1]===`,`?t-1:0}}if(s)throw new M(`trailing commas are not allowed in inline tables`,{toml:e,ptr:s});if(!o)throw new M(`unfinished table encountered`,{toml:e,ptr:t});return[i,t]}function $e(e,t,n,r){let i=[],a;for(t++;(a=e[t++])!==`]`&&a;)if(a===`,`)throw new M(`expected value, found comma`,{toml:e,ptr:t-1});else if(a===`#`)t=Ie(e,t);else if(a!==` `&&a!==` `&&a!==`
|
|
87
|
+
`&&a!==`\r`){let a=Ye(e,t-1,`]`,n-1,r);i.push(a[0]),t=a[1]}if(!a)throw new M(`unfinished array encountered`,{toml:e,ptr:t});return[i,t]}function et(e,t,n,r){let i=t,a=n,o,s=!1,c;for(let t=0;t<e.length;t++){if(t){if(i=s?i[o]:i[o]={},a=(c=a[o]).c,r===0&&(c.t===1||c.t===2))return null;if(c.t===2){let e=i.length-1;i=i[e],a=a[e].c}}if(o=e[t],(s=Object.hasOwn(i,o))&&a[o]?.t===0&&a[o]?.d)return null;s||(o===`__proto__`&&(Object.defineProperty(i,o,{enumerable:!0,configurable:!0,writable:!0}),Object.defineProperty(a,o,{enumerable:!0,configurable:!0,writable:!0})),a[o]={t:t<e.length-1&&r===2?3:r,d:!1,i:0,c:{}})}if(c=a[o],c.t!==r&&!(r===1&&c.t===3)||(r===2&&(c.d||(c.d=!0,i[o]=[]),i[o].push(i={}),c.c[c.i++]=c={t:1,d:!1,i:0,c:{}}),c.d))return null;if(c.d=!0,r===1)i=s?i[o]:i[o]={};else if(r===0&&s)return null;return[o,i,c.c]}function tt(e,{maxDepth:t=1e3,integersAsBigInt:n}={}){let r={},i={},a=r,o=i;for(let s=P(e,0);s<e.length;){if(e[s]===`[`){let t=e[++s]===`[`,n=Ze(e,s+=+t,`]`);if(t){if(e[n[1]-1]!==`]`)throw new M(`expected end of table declaration`,{toml:e,ptr:n[1]-1});n[1]++}let c=et(n[0],r,i,t?2:1);if(!c)throw new M(`trying to redefine an already defined table or value`,{toml:e,ptr:s});o=c[2],a=c[1],s=n[1]}else{let r=Ze(e,s),i=et(r[0],a,o,0);if(!i)throw new M(`trying to redefine an already defined table or value`,{toml:e,ptr:s});let c=Ye(e,r[1],void 0,t,n);i[1][i[0]]=c[0],s=c[1]}if(s=P(e,s,!0),e[s]&&e[s]!==`
|
|
88
|
+
`&&e[s]!==`\r`)throw new M(`each key-value declaration must be followed by an end-of-line`,{toml:e,ptr:s});s=P(e,s)}return r}var F=k(((exports,t)=>{t.exports={MAX_LENGTH:256,MAX_SAFE_COMPONENT_LENGTH:16,MAX_SAFE_BUILD_LENGTH:250,MAX_SAFE_INTEGER:2**53-1||9007199254740991,RELEASE_TYPES:[`major`,`premajor`,`minor`,`preminor`,`patch`,`prepatch`,`prerelease`],SEMVER_SPEC_VERSION:`2.0.0`,FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2}})),nt=k(((exports,t)=>{t.exports=typeof process==`object`&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?(...e)=>console.error(`SEMVER`,...e):()=>{}})),I=k(((exports,t)=>{let{MAX_SAFE_COMPONENT_LENGTH:n,MAX_SAFE_BUILD_LENGTH:r,MAX_LENGTH:i}=F(),a=nt();exports=t.exports={};let o=exports.re=[],s=exports.safeRe=[],c=exports.src=[],l=exports.safeSrc=[],u=exports.t={},d=0,f=`[a-zA-Z0-9-]`,p=[[`\\s`,1],[`\\d`,i],[f,r]],m=e=>{for(let[t,n]of p)e=e.split(`${t}*`).join(`${t}{0,${n}}`).split(`${t}+`).join(`${t}{1,${n}}`);return e},h=(e,t,n)=>{let r=m(t),i=d++;a(e,i,t),u[e]=i,c[i]=t,l[i]=r,o[i]=new RegExp(t,n?`g`:void 0),s[i]=new RegExp(r,n?`g`:void 0)};h(`NUMERICIDENTIFIER`,`0|[1-9]\\d*`),h(`NUMERICIDENTIFIERLOOSE`,`\\d+`),h(`NONNUMERICIDENTIFIER`,`\\d*[a-zA-Z-]${f}*`),h(`MAINVERSION`,`(${c[u.NUMERICIDENTIFIER]})\\.(${c[u.NUMERICIDENTIFIER]})\\.(${c[u.NUMERICIDENTIFIER]})`),h(`MAINVERSIONLOOSE`,`(${c[u.NUMERICIDENTIFIERLOOSE]})\\.(${c[u.NUMERICIDENTIFIERLOOSE]})\\.(${c[u.NUMERICIDENTIFIERLOOSE]})`),h(`PRERELEASEIDENTIFIER`,`(?:${c[u.NONNUMERICIDENTIFIER]}|${c[u.NUMERICIDENTIFIER]})`),h(`PRERELEASEIDENTIFIERLOOSE`,`(?:${c[u.NONNUMERICIDENTIFIER]}|${c[u.NUMERICIDENTIFIERLOOSE]})`),h(`PRERELEASE`,`(?:-(${c[u.PRERELEASEIDENTIFIER]}(?:\\.${c[u.PRERELEASEIDENTIFIER]})*))`),h(`PRERELEASELOOSE`,`(?:-?(${c[u.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${c[u.PRERELEASEIDENTIFIERLOOSE]})*))`),h(`BUILDIDENTIFIER`,`${f}+`),h(`BUILD`,`(?:\\+(${c[u.BUILDIDENTIFIER]}(?:\\.${c[u.BUILDIDENTIFIER]})*))`),h(`FULLPLAIN`,`v?${c[u.MAINVERSION]}${c[u.PRERELEASE]}?${c[u.BUILD]}?`),h(`FULL`,`^${c[u.FULLPLAIN]}$`),h(`LOOSEPLAIN`,`[v=\\s]*${c[u.MAINVERSIONLOOSE]}${c[u.PRERELEASELOOSE]}?${c[u.BUILD]}?`),h(`LOOSE`,`^${c[u.LOOSEPLAIN]}$`),h(`GTLT`,`((?:<|>)?=?)`),h(`XRANGEIDENTIFIERLOOSE`,`${c[u.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`),h(`XRANGEIDENTIFIER`,`${c[u.NUMERICIDENTIFIER]}|x|X|\\*`),h(`XRANGEPLAIN`,`[v=\\s]*(${c[u.XRANGEIDENTIFIER]})(?:\\.(${c[u.XRANGEIDENTIFIER]})(?:\\.(${c[u.XRANGEIDENTIFIER]})(?:${c[u.PRERELEASE]})?${c[u.BUILD]}?)?)?`),h(`XRANGEPLAINLOOSE`,`[v=\\s]*(${c[u.XRANGEIDENTIFIERLOOSE]})(?:\\.(${c[u.XRANGEIDENTIFIERLOOSE]})(?:\\.(${c[u.XRANGEIDENTIFIERLOOSE]})(?:${c[u.PRERELEASELOOSE]})?${c[u.BUILD]}?)?)?`),h(`XRANGE`,`^${c[u.GTLT]}\\s*${c[u.XRANGEPLAIN]}$`),h(`XRANGELOOSE`,`^${c[u.GTLT]}\\s*${c[u.XRANGEPLAINLOOSE]}$`),h(`COERCEPLAIN`,`(^|[^\\d])(\\d{1,${n}})(?:\\.(\\d{1,${n}}))?(?:\\.(\\d{1,${n}}))?`),h(`COERCE`,`${c[u.COERCEPLAIN]}(?:$|[^\\d])`),h(`COERCEFULL`,c[u.COERCEPLAIN]+`(?:${c[u.PRERELEASE]})?(?:${c[u.BUILD]})?(?:$|[^\\d])`),h(`COERCERTL`,c[u.COERCE],!0),h(`COERCERTLFULL`,c[u.COERCEFULL],!0),h(`LONETILDE`,`(?:~>?)`),h(`TILDETRIM`,`(\\s*)${c[u.LONETILDE]}\\s+`,!0),exports.tildeTrimReplace=`$1~`,h(`TILDE`,`^${c[u.LONETILDE]}${c[u.XRANGEPLAIN]}$`),h(`TILDELOOSE`,`^${c[u.LONETILDE]}${c[u.XRANGEPLAINLOOSE]}$`),h(`LONECARET`,`(?:\\^)`),h(`CARETTRIM`,`(\\s*)${c[u.LONECARET]}\\s+`,!0),exports.caretTrimReplace=`$1^`,h(`CARET`,`^${c[u.LONECARET]}${c[u.XRANGEPLAIN]}$`),h(`CARETLOOSE`,`^${c[u.LONECARET]}${c[u.XRANGEPLAINLOOSE]}$`),h(`COMPARATORLOOSE`,`^${c[u.GTLT]}\\s*(${c[u.LOOSEPLAIN]})$|^$`),h(`COMPARATOR`,`^${c[u.GTLT]}\\s*(${c[u.FULLPLAIN]})$|^$`),h(`COMPARATORTRIM`,`(\\s*)${c[u.GTLT]}\\s*(${c[u.LOOSEPLAIN]}|${c[u.XRANGEPLAIN]})`,!0),exports.comparatorTrimReplace=`$1$2$3`,h(`HYPHENRANGE`,`^\\s*(${c[u.XRANGEPLAIN]})\\s+-\\s+(${c[u.XRANGEPLAIN]})\\s*$`),h(`HYPHENRANGELOOSE`,`^\\s*(${c[u.XRANGEPLAINLOOSE]})\\s+-\\s+(${c[u.XRANGEPLAINLOOSE]})\\s*$`),h(`STAR`,`(<|>)?=?\\s*\\*`),h(`GTE0`,`^\\s*>=\\s*0\\.0\\.0\\s*$`),h(`GTE0PRE`,`^\\s*>=\\s*0\\.0\\.0-0\\s*$`)})),rt=k(((exports,t)=>{let n=Object.freeze({loose:!0}),r=Object.freeze({});t.exports=e=>e?typeof e==`object`?e:n:r})),it=k(((exports,t)=>{let n=/^[0-9]+$/,r=(e,t)=>{let r=n.test(e),i=n.test(t);return r&&i&&(e=+e,t=+t),e===t?0:r&&!i?-1:i&&!r?1:e<t?-1:1};t.exports={compareIdentifiers:r,rcompareIdentifiers:(e,t)=>r(t,e)}})),L=k(((exports,t)=>{let n=nt(),{MAX_LENGTH:r,MAX_SAFE_INTEGER:i}=F(),{safeRe:a,t:o}=I(),s=rt(),{compareIdentifiers:c}=it();t.exports=class e{constructor(t,c){if(c=s(c),t instanceof e){if(t.loose===!!c.loose&&t.includePrerelease===!!c.includePrerelease)return t;t=t.version}else if(typeof t!=`string`)throw TypeError(`Invalid version. Must be a string. Got type "${typeof t}".`);if(t.length>r)throw TypeError(`version is longer than ${r} characters`);n(`SemVer`,t,c),this.options=c,this.loose=!!c.loose,this.includePrerelease=!!c.includePrerelease;let l=t.trim().match(c.loose?a[o.LOOSE]:a[o.FULL]);if(!l)throw TypeError(`Invalid Version: ${t}`);if(this.raw=t,this.major=+l[1],this.minor=+l[2],this.patch=+l[3],this.major>i||this.major<0)throw TypeError(`Invalid major version`);if(this.minor>i||this.minor<0)throw TypeError(`Invalid minor version`);if(this.patch>i||this.patch<0)throw TypeError(`Invalid patch version`);l[4]?this.prerelease=l[4].split(`.`).map(e=>{if(/^[0-9]+$/.test(e)){let t=+e;if(t>=0&&t<i)return t}return e}):this.prerelease=[],this.build=l[5]?l[5].split(`.`):[],this.format()}format(){return this.version=`${this.major}.${this.minor}.${this.patch}`,this.prerelease.length&&(this.version+=`-${this.prerelease.join(`.`)}`),this.version}toString(){return this.version}compare(t){if(n(`SemVer.compare`,this.version,this.options,t),!(t instanceof e)){if(typeof t==`string`&&t===this.version)return 0;t=new e(t,this.options)}return t.version===this.version?0:this.compareMain(t)||this.comparePre(t)}compareMain(t){return t instanceof e||(t=new e(t,this.options)),c(this.major,t.major)||c(this.minor,t.minor)||c(this.patch,t.patch)}comparePre(t){if(t instanceof e||(t=new e(t,this.options)),this.prerelease.length&&!t.prerelease.length)return-1;if(!this.prerelease.length&&t.prerelease.length)return 1;if(!this.prerelease.length&&!t.prerelease.length)return 0;let r=0;do{let e=this.prerelease[r],i=t.prerelease[r];if(n(`prerelease compare`,r,e,i),e===void 0&&i===void 0)return 0;if(i===void 0)return 1;if(e===void 0)return-1;if(e===i)continue;return c(e,i)}while(++r)}compareBuild(t){t instanceof e||(t=new e(t,this.options));let r=0;do{let e=this.build[r],i=t.build[r];if(n(`build compare`,r,e,i),e===void 0&&i===void 0)return 0;if(i===void 0)return 1;if(e===void 0)return-1;if(e===i)continue;return c(e,i)}while(++r)}inc(e,t,n){if(e.startsWith(`pre`)){if(!t&&n===!1)throw Error(`invalid increment argument: identifier is empty`);if(t){let e=`-${t}`.match(this.options.loose?a[o.PRERELEASELOOSE]:a[o.PRERELEASE]);if(!e||e[1]!==t)throw Error(`invalid identifier: ${t}`)}}switch(e){case`premajor`:this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc(`pre`,t,n);break;case`preminor`:this.prerelease.length=0,this.patch=0,this.minor++,this.inc(`pre`,t,n);break;case`prepatch`:this.prerelease.length=0,this.inc(`patch`,t,n),this.inc(`pre`,t,n);break;case`prerelease`:this.prerelease.length===0&&this.inc(`patch`,t,n),this.inc(`pre`,t,n);break;case`release`:if(this.prerelease.length===0)throw Error(`version ${this.raw} is not a prerelease`);this.prerelease.length=0;break;case`major`:(this.minor!==0||this.patch!==0||this.prerelease.length===0)&&this.major++,this.minor=0,this.patch=0,this.prerelease=[];break;case`minor`:(this.patch!==0||this.prerelease.length===0)&&this.minor++,this.patch=0,this.prerelease=[];break;case`patch`:this.prerelease.length===0&&this.patch++,this.prerelease=[];break;case`pre`:{let e=Number(n)?1:0;if(this.prerelease.length===0)this.prerelease=[e];else{let r=this.prerelease.length;for(;--r>=0;)typeof this.prerelease[r]==`number`&&(this.prerelease[r]++,r=-2);if(r===-1){if(t===this.prerelease.join(`.`)&&n===!1)throw Error(`invalid increment argument: identifier already exists`);this.prerelease.push(e)}}if(t){let r=[t,e];n===!1&&(r=[t]),c(this.prerelease[0],t)===0?isNaN(this.prerelease[1])&&(this.prerelease=r):this.prerelease=r}break}default:throw Error(`invalid increment argument: ${e}`)}return this.raw=this.format(),this.build.length&&(this.raw+=`+${this.build.join(`.`)}`),this}}})),R=k(((exports,t)=>{let n=L();t.exports=(e,t,r=!1)=>{if(e instanceof n)return e;try{return new n(e,t)}catch(e){if(!r)return null;throw e}}})),at=k(((exports,t)=>{let n=R();t.exports=(e,t)=>{let r=n(e,t);return r?r.version:null}})),ot=k(((exports,t)=>{let n=R();t.exports=(e,t)=>{let r=n(e.trim().replace(/^[=v]+/,``),t);return r?r.version:null}})),st=k(((exports,t)=>{let n=L();t.exports=(e,t,r,i,a)=>{typeof r==`string`&&(a=i,i=r,r=void 0);try{return new n(e instanceof n?e.version:e,r).inc(t,i,a).version}catch{return null}}})),ct=k(((exports,t)=>{let n=R();t.exports=(e,t)=>{let r=n(e,null,!0),i=n(t,null,!0),a=r.compare(i);if(a===0)return null;let o=a>0,s=o?r:i,c=o?i:r,l=!!s.prerelease.length;if(c.prerelease.length&&!l){if(!c.patch&&!c.minor)return`major`;if(c.compareMain(s)===0)return c.minor&&!c.patch?`minor`:`patch`}let u=l?`pre`:``;return r.major===i.major?r.minor===i.minor?r.patch===i.patch?`prerelease`:u+`patch`:u+`minor`:u+`major`}})),lt=k(((exports,t)=>{let n=L();t.exports=(e,t)=>new n(e,t).major})),ut=k(((exports,t)=>{let n=L();t.exports=(e,t)=>new n(e,t).minor})),dt=k(((exports,t)=>{let n=L();t.exports=(e,t)=>new n(e,t).patch})),ft=k(((exports,t)=>{let n=R();t.exports=(e,t)=>{let r=n(e,t);return r&&r.prerelease.length?r.prerelease:null}})),z=k(((exports,t)=>{let n=L();t.exports=(e,t,r)=>new n(e,r).compare(new n(t,r))})),pt=k(((exports,t)=>{let n=z();t.exports=(e,t,r)=>n(t,e,r)})),mt=k(((exports,t)=>{let n=z();t.exports=(e,t)=>n(e,t,!0)})),ht=k(((exports,t)=>{let n=L();t.exports=(e,t,r)=>{let i=new n(e,r),a=new n(t,r);return i.compare(a)||i.compareBuild(a)}})),gt=k(((exports,t)=>{let n=ht();t.exports=(e,t)=>e.sort((e,r)=>n(e,r,t))})),_t=k(((exports,t)=>{let n=ht();t.exports=(e,t)=>e.sort((e,r)=>n(r,e,t))})),vt=k(((exports,t)=>{let n=z();t.exports=(e,t,r)=>n(e,t,r)>0})),yt=k(((exports,t)=>{let n=z();t.exports=(e,t,r)=>n(e,t,r)<0})),bt=k(((exports,t)=>{let n=z();t.exports=(e,t,r)=>n(e,t,r)===0})),xt=k(((exports,t)=>{let n=z();t.exports=(e,t,r)=>n(e,t,r)!==0})),St=k(((exports,t)=>{let n=z();t.exports=(e,t,r)=>n(e,t,r)>=0})),Ct=k(((exports,t)=>{let n=z();t.exports=(e,t,r)=>n(e,t,r)<=0})),wt=k(((exports,t)=>{let n=bt(),r=xt(),i=vt(),a=St(),o=yt(),s=Ct();t.exports=(e,t,c,l)=>{switch(t){case`===`:return typeof e==`object`&&(e=e.version),typeof c==`object`&&(c=c.version),e===c;case`!==`:return typeof e==`object`&&(e=e.version),typeof c==`object`&&(c=c.version),e!==c;case``:case`=`:case`==`:return n(e,c,l);case`!=`:return r(e,c,l);case`>`:return i(e,c,l);case`>=`:return a(e,c,l);case`<`:return o(e,c,l);case`<=`:return s(e,c,l);default:throw TypeError(`Invalid operator: ${t}`)}}})),Tt=k(((exports,t)=>{let n=L(),r=R(),{safeRe:i,t:a}=I();t.exports=(e,t)=>{if(e instanceof n)return e;if(typeof e==`number`&&(e=String(e)),typeof e!=`string`)return null;t||={};let o=null;if(!t.rtl)o=e.match(t.includePrerelease?i[a.COERCEFULL]:i[a.COERCE]);else{let n=t.includePrerelease?i[a.COERCERTLFULL]:i[a.COERCERTL],r;for(;(r=n.exec(e))&&(!o||o.index+o[0].length!==e.length);)(!o||r.index+r[0].length!==o.index+o[0].length)&&(o=r),n.lastIndex=r.index+r[1].length+r[2].length;n.lastIndex=-1}if(o===null)return null;let s=o[2],c=o[3]||`0`,l=o[4]||`0`,u=t.includePrerelease&&o[5]?`-${o[5]}`:``,d=t.includePrerelease&&o[6]?`+${o[6]}`:``;return r(`${s}.${c}.${l}${u}${d}`,t)}})),Et=k(((exports,t)=>{t.exports=class{constructor(){this.max=1e3,this.map=new Map}get(e){let t=this.map.get(e);if(t!==void 0)return this.map.delete(e),this.map.set(e,t),t}delete(e){return this.map.delete(e)}set(e,t){if(!this.delete(e)&&t!==void 0){if(this.map.size>=this.max){let e=this.map.keys().next().value;this.delete(e)}this.map.set(e,t)}return this}}})),B=k(((exports,t)=>{let n=/\s+/g;t.exports=class e{constructor(t,r){if(r=i(r),t instanceof e)return t.loose===!!r.loose&&t.includePrerelease===!!r.includePrerelease?t:new e(t.raw,r);if(t instanceof a)return this.raw=t.value,this.set=[[t]],this.formatted=void 0,this;if(this.options=r,this.loose=!!r.loose,this.includePrerelease=!!r.includePrerelease,this.raw=t.trim().replace(n,` `),this.set=this.raw.split(`||`).map(e=>this.parseRange(e.trim())).filter(e=>e.length),!this.set.length)throw TypeError(`Invalid SemVer Range: ${this.raw}`);if(this.set.length>1){let e=this.set[0];if(this.set=this.set.filter(e=>!h(e[0])),this.set.length===0)this.set=[e];else if(this.set.length>1){for(let e of this.set)if(e.length===1&&g(e[0])){this.set=[e];break}}}this.formatted=void 0}get range(){if(this.formatted===void 0){this.formatted=``;for(let e=0;e<this.set.length;e++){e>0&&(this.formatted+=`||`);let t=this.set[e];for(let e=0;e<t.length;e++)e>0&&(this.formatted+=` `),this.formatted+=t[e].toString().trim()}}return this.formatted}format(){return this.range}toString(){return this.range}parseRange(e){let t=((this.options.includePrerelease&&p)|(this.options.loose&&m))+`:`+e,n=r.get(t);if(n)return n;let i=this.options.loose,s=i?c[l.HYPHENRANGELOOSE]:c[l.HYPHENRANGE];e=e.replace(s,O(this.options.includePrerelease)),o(`hyphen replace`,e),e=e.replace(c[l.COMPARATORTRIM],u),o(`comparator trim`,e),e=e.replace(c[l.TILDETRIM],d),o(`tilde trim`,e),e=e.replace(c[l.CARETTRIM],f),o(`caret trim`,e);let g=e.split(` `).map(e=>v(e,this.options)).join(` `).split(/\s+/).map(e=>D(e,this.options));i&&(g=g.filter(e=>(o(`loose invalid filter`,e,this.options),!!e.match(c[l.COMPARATORLOOSE])))),o(`range list`,g);let _=new Map,y=g.map(e=>new a(e,this.options));for(let e of y){if(h(e))return[e];_.set(e.value,e)}_.size>1&&_.has(``)&&_.delete(``);let b=[..._.values()];return r.set(t,b),b}intersects(t,n){if(!(t instanceof e))throw TypeError(`a Range is required`);return this.set.some(e=>_(e,n)&&t.set.some(t=>_(t,n)&&e.every(e=>t.every(t=>e.intersects(t,n)))))}test(e){if(!e)return!1;if(typeof e==`string`)try{e=new s(e,this.options)}catch{return!1}for(let t=0;t<this.set.length;t++)if(ee(this.set[t],e,this.options))return!0;return!1}};let r=new(Et()),i=rt(),a=V(),o=nt(),s=L(),{safeRe:c,t:l,comparatorTrimReplace:u,tildeTrimReplace:d,caretTrimReplace:f}=I(),{FLAG_INCLUDE_PRERELEASE:p,FLAG_LOOSE:m}=F(),h=e=>e.value===`<0.0.0-0`,g=e=>e.value===``,_=(e,t)=>{let n=!0,r=e.slice(),i=r.pop();for(;n&&r.length;)n=r.every(e=>i.intersects(e,t)),i=r.pop();return n},v=(e,t)=>(o(`comp`,e,t),e=S(e,t),o(`caret`,e),e=b(e,t),o(`tildes`,e),e=w(e,t),o(`xrange`,e),e=E(e,t),o(`stars`,e),e),y=e=>!e||e.toLowerCase()===`x`||e===`*`,b=(e,t)=>e.trim().split(/\s+/).map(e=>x(e,t)).join(` `),x=(e,t)=>{let n=t.loose?c[l.TILDELOOSE]:c[l.TILDE];return e.replace(n,(t,n,r,i,a)=>{o(`tilde`,e,t,n,r,i,a);let s;return y(n)?s=``:y(r)?s=`>=${n}.0.0 <${+n+1}.0.0-0`:y(i)?s=`>=${n}.${r}.0 <${n}.${+r+1}.0-0`:a?(o(`replaceTilde pr`,a),s=`>=${n}.${r}.${i}-${a} <${n}.${+r+1}.0-0`):s=`>=${n}.${r}.${i} <${n}.${+r+1}.0-0`,o(`tilde return`,s),s})},S=(e,t)=>e.trim().split(/\s+/).map(e=>C(e,t)).join(` `),C=(e,t)=>{o(`caret`,e,t);let n=t.loose?c[l.CARETLOOSE]:c[l.CARET],r=t.includePrerelease?`-0`:``;return e.replace(n,(t,n,i,a,s)=>{o(`caret`,e,t,n,i,a,s);let c;return y(n)?c=``:y(i)?c=`>=${n}.0.0${r} <${+n+1}.0.0-0`:y(a)?c=n===`0`?`>=${n}.${i}.0${r} <${n}.${+i+1}.0-0`:`>=${n}.${i}.0${r} <${+n+1}.0.0-0`:s?(o(`replaceCaret pr`,s),c=n===`0`?i===`0`?`>=${n}.${i}.${a}-${s} <${n}.${i}.${+a+1}-0`:`>=${n}.${i}.${a}-${s} <${n}.${+i+1}.0-0`:`>=${n}.${i}.${a}-${s} <${+n+1}.0.0-0`):(o(`no pr`),c=n===`0`?i===`0`?`>=${n}.${i}.${a}${r} <${n}.${i}.${+a+1}-0`:`>=${n}.${i}.${a}${r} <${n}.${+i+1}.0-0`:`>=${n}.${i}.${a} <${+n+1}.0.0-0`),o(`caret return`,c),c})},w=(e,t)=>(o(`replaceXRanges`,e,t),e.split(/\s+/).map(e=>T(e,t)).join(` `)),T=(e,t)=>{e=e.trim();let n=t.loose?c[l.XRANGELOOSE]:c[l.XRANGE];return e.replace(n,(n,r,i,a,s,c)=>{o(`xRange`,e,n,r,i,a,s,c);let l=y(i),u=l||y(a),d=u||y(s),f=d;return r===`=`&&f&&(r=``),c=t.includePrerelease?`-0`:``,l?n=r===`>`||r===`<`?`<0.0.0-0`:`*`:r&&f?(u&&(a=0),s=0,r===`>`?(r=`>=`,u?(i=+i+1,a=0,s=0):(a=+a+1,s=0)):r===`<=`&&(r=`<`,u?i=+i+1:a=+a+1),r===`<`&&(c=`-0`),n=`${r+i}.${a}.${s}${c}`):u?n=`>=${i}.0.0${c} <${+i+1}.0.0-0`:d&&(n=`>=${i}.${a}.0${c} <${i}.${+a+1}.0-0`),o(`xRange return`,n),n})},E=(e,t)=>(o(`replaceStars`,e,t),e.trim().replace(c[l.STAR],``)),D=(e,t)=>(o(`replaceGTE0`,e,t),e.trim().replace(c[t.includePrerelease?l.GTE0PRE:l.GTE0],``)),O=e=>(t,n,r,i,a,o,s,c,l,u,d,f)=>(n=y(r)?``:y(i)?`>=${r}.0.0${e?`-0`:``}`:y(a)?`>=${r}.${i}.0${e?`-0`:``}`:o?`>=${n}`:`>=${n}${e?`-0`:``}`,c=y(l)?``:y(u)?`<${+l+1}.0.0-0`:y(d)?`<${l}.${+u+1}.0-0`:f?`<=${l}.${u}.${d}-${f}`:e?`<${l}.${u}.${+d+1}-0`:`<=${c}`,`${n} ${c}`.trim()),ee=(e,t,n)=>{for(let n=0;n<e.length;n++)if(!e[n].test(t))return!1;if(t.prerelease.length&&!n.includePrerelease){for(let n=0;n<e.length;n++)if(o(e[n].semver),e[n].semver!==a.ANY&&e[n].semver.prerelease.length>0){let r=e[n].semver;if(r.major===t.major&&r.minor===t.minor&&r.patch===t.patch)return!0}return!1}return!0}})),V=k(((exports,t)=>{let n=Symbol(`SemVer ANY`);t.exports=class e{static get ANY(){return n}constructor(t,i){if(i=r(i),t instanceof e){if(t.loose===!!i.loose)return t;t=t.value}t=t.trim().split(/\s+/).join(` `),s(`comparator`,t,i),this.options=i,this.loose=!!i.loose,this.parse(t),this.semver===n?this.value=``:this.value=this.operator+this.semver.version,s(`comp`,this)}parse(e){let t=this.options.loose?i[a.COMPARATORLOOSE]:i[a.COMPARATOR],r=e.match(t);if(!r)throw TypeError(`Invalid comparator: ${e}`);this.operator=r[1]===void 0?``:r[1],this.operator===`=`&&(this.operator=``),r[2]?this.semver=new c(r[2],this.options.loose):this.semver=n}toString(){return this.value}test(e){if(s(`Comparator.test`,e,this.options.loose),this.semver===n||e===n)return!0;if(typeof e==`string`)try{e=new c(e,this.options)}catch{return!1}return o(e,this.operator,this.semver,this.options)}intersects(t,n){if(!(t instanceof e))throw TypeError(`a Comparator is required`);return this.operator===``?this.value===``?!0:new l(t.value,n).test(this.value):t.operator===``?t.value===``?!0:new l(this.value,n).test(t.semver):(n=r(n),n.includePrerelease&&(this.value===`<0.0.0-0`||t.value===`<0.0.0-0`)||!n.includePrerelease&&(this.value.startsWith(`<0.0.0`)||t.value.startsWith(`<0.0.0`))?!1:!!(this.operator.startsWith(`>`)&&t.operator.startsWith(`>`)||this.operator.startsWith(`<`)&&t.operator.startsWith(`<`)||this.semver.version===t.semver.version&&this.operator.includes(`=`)&&t.operator.includes(`=`)||o(this.semver,`<`,t.semver,n)&&this.operator.startsWith(`>`)&&t.operator.startsWith(`<`)||o(this.semver,`>`,t.semver,n)&&this.operator.startsWith(`<`)&&t.operator.startsWith(`>`)))}};let r=rt(),{safeRe:i,t:a}=I(),o=wt(),s=nt(),c=L(),l=B()})),H=k(((exports,t)=>{let n=B();t.exports=(e,t,r)=>{try{t=new n(t,r)}catch{return!1}return t.test(e)}})),Dt=k(((exports,t)=>{let n=B();t.exports=(e,t)=>new n(e,t).set.map(e=>e.map(e=>e.value).join(` `).trim().split(` `))})),Ot=k(((exports,t)=>{let n=L(),r=B();t.exports=(e,t,i)=>{let a=null,o=null,s=null;try{s=new r(t,i)}catch{return null}return e.forEach(e=>{s.test(e)&&(!a||o.compare(e)===-1)&&(a=e,o=new n(a,i))}),a}})),kt=k(((exports,t)=>{let n=L(),r=B();t.exports=(e,t,i)=>{let a=null,o=null,s=null;try{s=new r(t,i)}catch{return null}return e.forEach(e=>{s.test(e)&&(!a||o.compare(e)===1)&&(a=e,o=new n(a,i))}),a}})),At=k(((exports,t)=>{let n=L(),r=B(),i=vt();t.exports=(e,t)=>{e=new r(e,t);let a=new n(`0.0.0`);if(e.test(a)||(a=new n(`0.0.0-0`),e.test(a)))return a;a=null;for(let t=0;t<e.set.length;++t){let r=e.set[t],o=null;r.forEach(e=>{let t=new n(e.semver.version);switch(e.operator){case`>`:t.prerelease.length===0?t.patch++:t.prerelease.push(0),t.raw=t.format();case``:case`>=`:(!o||i(t,o))&&(o=t);break;case`<`:case`<=`:break;default:throw Error(`Unexpected operation: ${e.operator}`)}}),o&&(!a||i(a,o))&&(a=o)}return a&&e.test(a)?a:null}})),jt=k(((exports,t)=>{let n=B();t.exports=(e,t)=>{try{return new n(e,t).range||`*`}catch{return null}}})),Mt=k(((exports,t)=>{let n=L(),r=V(),{ANY:i}=r,a=B(),o=H(),s=vt(),c=yt(),l=Ct(),u=St();t.exports=(e,t,d,f)=>{e=new n(e,f),t=new a(t,f);let p,m,h,g,_;switch(d){case`>`:p=s,m=l,h=c,g=`>`,_=`>=`;break;case`<`:p=c,m=u,h=s,g=`<`,_=`<=`;break;default:throw TypeError(`Must provide a hilo val of "<" or ">"`)}if(o(e,t,f))return!1;for(let n=0;n<t.set.length;++n){let a=t.set[n],o=null,s=null;if(a.forEach(e=>{e.semver===i&&(e=new r(`>=0.0.0`)),o||=e,s||=e,p(e.semver,o.semver,f)?o=e:h(e.semver,s.semver,f)&&(s=e)}),o.operator===g||o.operator===_||(!s.operator||s.operator===g)&&m(e,s.semver)||s.operator===_&&h(e,s.semver))return!1}return!0}})),Nt=k(((exports,t)=>{let n=Mt();t.exports=(e,t,r)=>n(e,t,`>`,r)})),Pt=k(((exports,t)=>{let n=Mt();t.exports=(e,t,r)=>n(e,t,`<`,r)})),Ft=k(((exports,t)=>{let n=B();t.exports=(e,t,r)=>(e=new n(e,r),t=new n(t,r),e.intersects(t,r))})),It=k(((exports,t)=>{let n=H(),r=z();t.exports=(e,t,i)=>{let a=[],o=null,s=null,c=e.sort((e,t)=>r(e,t,i));for(let e of c)n(e,t,i)?(s=e,o||=e):(s&&a.push([o,s]),s=null,o=null);o&&a.push([o,null]);let l=[];for(let[e,t]of a)e===t?l.push(e):!t&&e===c[0]?l.push(`*`):t?e===c[0]?l.push(`<=${t}`):l.push(`${e} - ${t}`):l.push(`>=${e}`);let u=l.join(` || `),d=typeof t.raw==`string`?t.raw:String(t);return u.length<d.length?u:t}})),Lt=k(((exports,t)=>{let n=B(),r=V(),{ANY:i}=r,a=H(),o=z(),s=(e,t,r={})=>{if(e===t)return!0;e=new n(e,r),t=new n(t,r);let i=!1;OUTER:for(let n of e.set){for(let e of t.set){let t=u(n,e,r);if(i||=t!==null,t)continue OUTER}if(i)return!1}return!0},c=[new r(`>=0.0.0-0`)],l=[new r(`>=0.0.0`)],u=(e,t,n)=>{if(e===t)return!0;if(e.length===1&&e[0].semver===i){if(t.length===1&&t[0].semver===i)return!0;e=n.includePrerelease?c:l}if(t.length===1&&t[0].semver===i){if(n.includePrerelease)return!0;t=l}let r=new Set,s,u;for(let t of e)t.operator===`>`||t.operator===`>=`?s=d(s,t,n):t.operator===`<`||t.operator===`<=`?u=f(u,t,n):r.add(t.semver);if(r.size>1)return null;let p;if(s&&u&&(p=o(s.semver,u.semver,n),p>0||p===0&&(s.operator!==`>=`||u.operator!==`<=`)))return null;for(let e of r){if(s&&!a(e,String(s),n)||u&&!a(e,String(u),n))return null;for(let r of t)if(!a(e,String(r),n))return!1;return!0}let m,h,g,_,v=u&&!n.includePrerelease&&u.semver.prerelease.length?u.semver:!1,y=s&&!n.includePrerelease&&s.semver.prerelease.length?s.semver:!1;v&&v.prerelease.length===1&&u.operator===`<`&&v.prerelease[0]===0&&(v=!1);for(let e of t){if(_=_||e.operator===`>`||e.operator===`>=`,g=g||e.operator===`<`||e.operator===`<=`,s){if(y&&e.semver.prerelease&&e.semver.prerelease.length&&e.semver.major===y.major&&e.semver.minor===y.minor&&e.semver.patch===y.patch&&(y=!1),e.operator===`>`||e.operator===`>=`){if(m=d(s,e,n),m===e&&m!==s)return!1}else if(s.operator===`>=`&&!a(s.semver,String(e),n))return!1}if(u){if(v&&e.semver.prerelease&&e.semver.prerelease.length&&e.semver.major===v.major&&e.semver.minor===v.minor&&e.semver.patch===v.patch&&(v=!1),e.operator===`<`||e.operator===`<=`){if(h=f(u,e,n),h===e&&h!==u)return!1}else if(u.operator===`<=`&&!a(u.semver,String(e),n))return!1}if(!e.operator&&(u||s)&&p!==0)return!1}return!(s&&g&&!u&&p!==0||u&&_&&!s&&p!==0||y||v)},d=(e,t,n)=>{if(!e)return t;let r=o(e.semver,t.semver,n);return r>0?e:r<0||t.operator===`>`&&e.operator===`>=`?t:e},f=(e,t,n)=>{if(!e)return t;let r=o(e.semver,t.semver,n);return r<0?e:r>0||t.operator===`<`&&e.operator===`<=`?t:e};t.exports=s})),U=A(k(((exports,t)=>{let n=I(),r=F(),i=L(),a=it(),o=R(),s=at(),c=ot(),l=st(),u=ct(),d=lt(),f=ut(),p=dt(),m=ft(),h=z(),g=pt(),_=mt(),v=ht(),y=gt(),b=_t(),x=vt(),S=yt(),C=bt(),w=xt(),T=St(),E=Ct(),D=wt(),O=Tt(),ee=V(),k=B(),te=H(),A=Dt(),j=Ot(),ne=kt(),re=At(),ie=jt(),ae=Mt(),oe=Nt(),se=Pt(),ce=Ft(),le=It(),ue=Lt();t.exports={parse:o,valid:s,clean:c,inc:l,diff:u,major:d,minor:f,patch:p,prerelease:m,compare:h,rcompare:g,compareLoose:_,compareBuild:v,sort:y,rsort:b,gt:x,lt:S,eq:C,neq:w,gte:T,lte:E,cmp:D,coerce:O,Comparator:ee,Range:k,satisfies:te,toComparators:A,maxSatisfying:j,minSatisfying:ne,minVersion:re,validRange:ie,outside:ae,gtr:oe,ltr:se,intersects:ce,simplifyRange:le,subset:ue,SemVer:i,re:n.re,src:n.src,tokens:n.t,SEMVER_SPEC_VERSION:r.SEMVER_SPEC_VERSION,RELEASE_TYPES:r.RELEASE_TYPES,compareIdentifiers:a.compareIdentifiers,rcompareIdentifiers:a.rcompareIdentifiers}}))(),1),Rt=A(Me(),1),zt=A(he(),1);const Bt=[[1e3,6e4,`sec`],[6e4,36e5,`min`],[36e5,864e5,`hour`],[864e5,6048e5,`day`],[6048e5,2628e6,`week`],[2628e6,31536e6,`month`],[31536e6,1/0,`year`]],Vt={"1 day ago":`yesterday`,"1 week ago":`last week`,"1 month ago":`last month`,"1 year ago":`last year`,"in 1 day":`tomorrow`,"in 1 week":`next week`,"in 1 month":`next month`,"in 1 year":`next year`},Ht={sec:`second`,min:`minute`};function Ut(e){return e instanceof Date?e.getTime():typeof e==`string`?Date.parse(e):e}function Wt(e,{now:t,noAffix:n=!1,times:r=Bt,nowThreshold:i=2e3,nowString:a=`now`,unknownString:o=``,aliases:s=!1,aliasesMap:c=Vt,longUnits:l=!1}={}){let u=Ut(e);if(t=t===void 0?Date.now():Ut(t),Number.isNaN(u))return o||String(e);let d=!1,f=t-u;if(f<0&&(d=!0,f=Math.abs(f)),f<i)return a;let p=0,m=``;for(let e=0,t=r.length;e<t;e++){let t=r[e];if(!(f>=t[1])){p=Math.floor(f/t[0]),m=(l&&Ht[t[2]]||t[2])+(p>1?`s`:``);break}}let h=`${d&&!n?`in `:``}${p} ${m}${!d&&!n?` ago`:``}`;return s?c[h]??h:h}function Gt(e){let t=[];for(let n of e){let[e,r]=n.replaceAll(/\s+/g,``).split(/[<>=~]+/);e&&/^[0-9.a-z]+$/.test(r)&&t.push({name:e,version:r})}return t}const Kt=[`dependencies`,`devDependencies`,`peerDependencies`,`optionalDependencies`,`resolutions`],qt=[`tool.poetry.dependencies`,`tool.poetry.dev-dependencies`,`tool.poetry.test-dependencies`,`tool.poetry.group.dev.dependencies`,`tool.poetry.group.test.dependencies`],Jt=[`project.dependencies`,`project.optional-dependencies`,`dependency-groups.dev`,`dependency-groups.lint`,`dependency-groups.test`],Yt=[`deps`],Xt=S?.()??C().length??4;c?.uv&&Xt>4&&(r.UV_THREADPOOL_SIZE=String(Xt));const Zt=/^.*?:\/\/(.*?@)?(github\.com[:/])/i,Qt=/^([^/]+)\/([^/#]+)?.*?\/([0-9a-f]+|v?[0-9]+\.[0-9]+\.[0-9]+)$/i,$t=/^[0-9a-f]{7,}$/i,en=/[0-9]+(\.[0-9]+)?(\.[0-9]+)?/g,tn=/[0-9]+\.[0-9]+\.[0-9]+(-.+)?/g,W=e=>e.replace(/[|\\{}()[\]^$+*?.-]/g,`\\$&`),G=e=>e.endsWith(`/`)?e.substring(0,e.length-1):e,nn=ue.version||`0.0.0`,rn={"package.json":`npm`,"pyproject.toml":`pypi`,"go.mod":`go`},K=(0,re.default)(t.slice(2),{boolean:[`E`,`error-on-outdated`,`U`,`error-on-unchanged`,`h`,`help`,`j`,`json`,`n`,`no-color`,`u`,`update`,`v`,`version`,`V`,`verbose`],string:[`d`,`allow-downgrade`,`f`,`file`,`g`,`greatest`,`m`,`minor`,`M`,`modes`,`P`,`patch`,`p`,`prerelease`,`R`,`release`,`r`,`registry`,`t`,`types`,`githubapi`,`pypiapi`,`goproxy`],alias:{d:`allow-downgrade`,E:`error-on-outdated`,U:`error-on-unchanged`,e:`exclude`,f:`file`,g:`greatest`,h:`help`,i:`include`,j:`json`,m:`minor`,M:`modes`,n:`no-color`,P:`patch`,p:`prerelease`,r:`registry`,R:`release`,s:`semver`,S:`sockets`,t:`types`,u:`update`,v:`version`,V:`verbose`}}),[an,on,sn]=[`magenta`,`red`,`green`].map(e=>K[`no-color`]?String:t=>y(e,String(t))),q=$(Q(K.greatest)),cn=$(Q(K.prerelease)),ln=$(Q(K.release)),un=$(Q(K.patch)),dn=$(Q(K.minor)),fn=Q(K[`allow-downgrade`]),pn=Q(K.modes)||new Set([`npm`,`pypi`]),mn=K.githubapi?G(K.githubapi):`https://api.github.com`,hn=K.pypiapi?G(K.pypiapi):`https://pypi.org`,gn=K.goproxy?[G(K.goproxy)]:vn(),J=e=>e.replace(/^v/,``);function Y(e,t){for(let n of t instanceof Set?t:[])if(n.test(e))return!0;return!1}function _n(e,t){let n=t[`${e}:registry`]||t.registry;return n.endsWith(`/`)?n:`${n}/`}function vn(){return r.GOPROXY?r.GOPROXY.split(/[,|]/).map(e=>e.trim()).filter(e=>!!e&&e!==`direct`):[`https://proxy.golang.org`]}function yn(e,t){return t.split(`.`).reduce((e,t)=>e?.[t]??null,e)}function bn(e){return e.split(`,`).filter(Boolean)}function xn(e,t){let n=d(t,e);try{return p(n),n}catch{}let r=u(t);return r===t?null:xn(e,r)}function Sn(e,t,n,r){if(e.startsWith(`@`)){let i=(/@[a-z0-9][\w-.]+/.exec(e)||[``])[0],a=G(_n(i,r));if(a!==t)try{let e=(0,Rt.default)(a,n);if(e?.token)return{auth:e,registry:a}}catch{}return{auth:(0,Rt.default)(t,n),registry:t}}else return{auth:(0,Rt.default)(t,n),registry:t}}function Cn(e,t,n){return{...Object.keys(e).length&&{agentOpts:e},headers:{"user-agent":`updates/${nn}`,...n&&{Authorization:`${t} ${n}`}}}}function wn(){let e=new Date;return[e.getFullYear(),`-`,String(e.getMonth()+1).padStart(2,`0`),`-`,String(e.getDate()).padStart(2,`0`),` `,String(e.getHours()).padStart(2,`0`),`:`,String(e.getMinutes()).padStart(2,`0`),`:`,String(e.getSeconds()).padStart(2,`0`)].join(``)}function Tn(e){console.error(`${wn()} ${e}`)}async function En(e,t){K.verbose&&Tn(`${an(`fetch`)} ${e}`);let n=await fetch(e,t);return K.verbose&&Tn(`${n.ok?sn(n.status):on(n.status)} ${e}`),n}async function Dn(e,t,n,r,i,a){let{auth:o,registry:s}=Sn(e,n,i,a),c=t===`resolutions`?l(e):e,u=`${s}/${c.replace(/\//g,`%2f`)}`,d=await En(u,Cn(r,o?.type,o?.token));if(d?.ok)return[await d.json(),t,s,e];throw d?.status&&d?.statusText?Error(`Received ${d.status} ${d.statusText} from ${u}`):Error(`Unable to fetch ${e} from ${s}`)}async function On(e,t,n){let r=`${hn}/pypi/${e}/json`,i=await En(r,Cn(n));if(i?.ok)return[await i.json(),t,null,e];throw i?.status&&i?.statusText?Error(`Received ${i.status} ${i.statusText} from ${r}`):Error(`Unable to fetch ${e} from ${hn}`)}function kn(e){return e.split(/\r?\n/).map(e=>e.trim()).filter(Boolean)}async function An(e,t,n,r){let i=r.shift();if(!i)throw Error(`No more go proxies available`);let a=`${i}/${e.toLowerCase()}/${t===`latest`?`@latest`:`@v/${t}.info`}`,o=null,s=!1;try{if(o=await En(a,{...Cn(n),signal:AbortSignal.timeout(1e4)}),o?.ok)return await o.json();s=[404,410].includes(o.status)&&!!r.length}catch(e){e.name===`TimeoutError`&&(s=!!r.length)}if(s)return An(e,t,n,r);throw o?.status&&o?.statusText?Error(`Received ${o.status} ${o.statusText} from ${a}`):Error(`Unable to fetch ${e} from ${i}`)}async function jn(e,t){let n=null,r=e;for(;;){if(/\/v[0-9]+$/.test(r)){let e=Number(r.split(`/`).at(-1).substring(1))+1;r=r.replace(/\/v[0-9]+$/,`/${`v${e}`}`)}else r=`${r}/v2`;try{let e=await An(r,`latest`,t,Array.from(gn));if(e===null)break;if(e?.Version){n=e;continue}}catch{break}}return n}function Mn(e){return e=e.replace(`git@`,``).replace(/.+?\/\//,`https://`).replace(/\.git$/,``),/^[a-z]+:[a-z0-9-]\/[a-z0-9-]$/.test(e)?e.replace(/^(.+?):/,(e,t)=>`https://${t}.com/`):/^[a-z0-9-]\/[a-z0-9-]$/.test(e)?`https://github.com/${e}`:e}function Nn(e){return e.startsWith(`https://bitbucket.org`)?`src/HEAD`:`tree/HEAD`}function Pn({repository:e,homepage:t,info:n},r,i){n&&(e=n.project_urls.repository||n.project_urls.Repository||n.project_urls.repo||n.project_urls.Repo||n.project_urls.source||n.project_urls.Source||n.project_urls[`source code`]||n.project_urls[`Source code`]||n.project_urls[`Source Code`]||n.project_urls.homepage||n.project_urls.Homepage||`https://pypi.org/project/${i}/`);let a=``;if(r===`https://npm.pkg.github.com`)return`https://github.com/${i.replace(/^@/,``)}`;if(e){let t=typeof e==`string`?e:e.url;a=Mn(t),a&&typeof e!=`string`&&e.directory&&(a=`${a}/${Nn(a)}/${e.directory}`)}return a||t||``}async function Fn(e){console.info(K.json?JSON.stringify({message:e}):e),await X()}async function X(e,t){if(e){let t=e.stack??e.message,n=e.cause;K.json?console.info(JSON.stringify({error:t,cause:n})):(console.info(on(t)),n&&console.info(on(`Caused by: ${n}`)))}a===`win32`&&Number(c?.node?.split(`.`)[0])>=23&&await new Promise(e=>setTimeout(e,50)),i(t||e?1:0)}function In(e={}){for(let t of Object.keys(e))for(let n of Object.values(e[t]))typeof n.oldPrint==`string`&&(n.old=n.oldPrint,delete n.oldPrint),typeof n.newPrint==`string`&&(n.new=n.newPrint,delete n.newPrint),typeof n.oldOriginal==`string`&&(n.old=n.oldOriginal,delete n.oldOriginal);let t=0;for(let n of Object.keys(e))t+=Object.keys(e[n]).length;if(K.json){let t={results:{}};for(let n of Object.keys(e))for(let[r,i]of Object.entries(e[n])){let[e,a]=r.split(`\0`);t.results[n]||(t.results[n]={}),t.results[n][e]||(t.results[n][e]={}),t.results[n][e][a]=i}console.info(JSON.stringify(t))}else t&&console.info(Hn(e));return K[`error-on-outdated`]?t?2:0:K[`error-on-unchanged`]?t?0:2:0}function Ln(e,t){a===`win32`&&g(e,0),_(e,t,a===`win32`?{flag:`r+`}:void 0)}function Rn(e,t,n){if(e===t)return e;let r=e.split(/\./),i=t.split(/\./),a=/^[0-9a-zA-Z-.]+$/,o=``;for(let e=0;e<r.length;e++)if(r[e]!==i[e]){a.test(r[e])?o+=n(r.slice(e).join(`.`)):o+=r[e].split(``).map(e=>a.test(e)?n(e):e).join(``)+n(`.${r.slice(e+1).join(`.`)}`.replace(/\.$/,``));break}else o+=`${r[e]}.`;return o.replace(/\.$/,``)}const zn=e=>v(e).length;function Bn(e,t=` `){let n=``,r=Array(e[0].length).fill(0);for(let t of e)for(let[e,n]of t.entries()){let t=zn(n);t>r[e]&&(r[e]=t)}for(let[i,a]of e.entries()){for(let[e,i]of a.entries()){e>0&&(n+=t);let o=` `.repeat(r[e]-zn(i));n+=i+(e===a.length-1?``:o)}i<e.length-1&&(n+=`
|
|
89
|
+
`)}return n}function Vn(e){return/\/v[0-9]$/.test(e)&&(e=u(e)),e}function Hn(e){let t=[[`NAME`,`OLD`,`NEW`,`AGE`,`INFO`]],n=new Set;for(let r of Object.keys(e))for(let[i,a]of Object.entries(e[r])){let e=i.split(`\0`)[1],o=`${r}|${e}`;if(n.has(o))continue;n.add(o),t.push([r===`go`?Vn(e):e,Rn(a.old,a.new,on),Rn(a.new,a.old,sn),a.age||``,a.info||``])}return Bn(t)}function Un(e,t){let n=e;for(let e of Object.keys(t)){let r=e.split(`\0`)[1],i=t[e].oldOriginal||t[e].old,a=RegExp(`"${W(r)}": *"${W(i)}"`,`g`);n=n.replace(a,`"${r}": "${t[e].new}"`)}return n}function Wn(e,t){let n=e;for(let e of Object.keys(t)){let r=e.split(`\0`)[1],i=t[e].oldOriginal||t[e].old;n=n.replace(RegExp(`${W(r)} *= *"${W(i)}"`,`g`),`${r} = "${t[e].new}"`),n=n.replace(RegExp(`("${W(r)} *[<>=~]+ *)${W(i)}(")`,`g`),(n,r,i)=>`${r}${t[e].new}${i}`)}return n}function Gn(e,t,n){let r=e.replace(tn,t);if(n&&n!==e&&/^[\^~]/.test(r)){let e=n.substring(1).split(`.`),t=r.substring(1).split(`.`);e.length!==t.length&&(r=`${r[0]}${t.slice(0,e.length).join(`.`)}`)}return r}function Kn(e){let t=(0,U.parse)(e);return t?!!t.prerelease.length:!1}function qn(e){return/[0-9]+\.[0-9]+\.[0-9]+-.+/.test(e)}function Z(e){try{return(0,U.coerce)(e)?.version??``}catch{return``}}function Jn(e,t,{range:n,semvers:r,usePre:i,useRel:a,useGreatest:o}){let s=Z(n);if(!s)return s;i=qn(n)||i,i&&(r.add(`prerelease`),r.has(`patch`)&&r.add(`prepatch`),r.has(`minor`)&&r.add(`preminor`),r.has(`major`)&&r.add(`premajor`));let c=0,l=s;for(let n of t){let t=(0,U.parse)(n);if(!t?.version||t.prerelease.length&&(!i||a))continue;let s=t.version,u=(0,U.diff)(l,s);if(!u||!r.has(u))continue;if(o||!(`time`in e))(0,U.gte)(Z(s),l)&&(l=s);else{let t=new Date(e.time[n]).getTime();t>=0&&t>c&&(l=s,c=t)}}return l||null}function Yn(e,{mode:t,range:n,useGreatest:r,useRel:i,usePre:a,semvers:o}){if(t===`go`)return(0,U.gt)(J(e.Version),J(n))?e.Version:null;if(n===`*`||n.includes(`||`))return null;let s=[];t===`pypi`?s=Object.keys(e.releases).filter(e=>(0,U.valid)(e)):t===`npm`&&(s=Object.keys(e.versions).filter(e=>(0,U.valid)(e)));let c=Jn(e,s,{range:n,semvers:o,usePre:a,useRel:i,useGreatest:r});if(!c)return null;if(r)return c;{let r=``,s=``;t===`pypi`?(s=e.info.version,r=Z(e.info.version)):r=e[`dist-tags`].latest;let l=Z(n),u=qn(n),d=Kn(c),f=Kn(r),p=(0,U.gt)(c,l);if(!i&&a||u&&d||i&&!p&&u&&!d||u&&!d&&p)return c;if(u&&!d&&!p)return null;let m=(0,U.diff)(l,r);return m&&m!==`prerelease`&&!o.has(m.replace(/^pre/,``))||i&&Kn(r)?c:(0,U.lt)(r,l)&&!f?fn===!0||Y(e.name,fn)?r:null:s||r}}function Xn(e){let t={},n=r.UPDATES_GITHUB_API_TOKEN||r.GITHUB_API_TOKEN||r.GH_TOKEN||r.GITHUB_TOKEN||r.HOMEBREW_GITHUB_API_TOKEN;return n&&(t.headers={Authorization:`Bearer ${n}`}),En(e,t)}async function Zn(e,t){let n=`${mn}/repos/${e}/${t}/commits`,r=await Xn(n);if(!r?.ok)return{hash:``,commit:{}};let{sha:i,commit:a}=(await r.json())[0];return{hash:i,commit:a}}async function Qn(e,t){let n=await Xn(`${mn}/repos/${e}/${t}/git/refs/tags`);return n?.ok?(await n.json()).map(e=>e.ref.replace(/^refs\/tags\//,``)):[]}function $n(e,t,n){let r=J(t);if((0,U.valid)(r))if(n){let n=t,i=J(t);for(let t of e){let e=J(t);if(!(0,U.valid)(e))continue;(!n||(0,U.gt)(e,i))&&(n=t,i=e)}if((0,U.neq)(r,i))return n}else{let t=e.at(-1);if(!t)return;let n=J(t);if(!(0,U.valid)(n))return;if((0,U.neq)(r,n))return t}}async function er(e,t,n){let r=t.old.replace(Zt,``),[i,a,o,s]=Qt.exec(r)||[];if(!(!a||!o||!s))if($t.test(s)){let{hash:n,commit:r}=await Zn(a,o);if(!n)return;let i=r?.committer?.date??r?.author?.date,c=n.substring(0,s.length);if(s!==c){let n=t.old.replace(s,c);return{key:e,newRange:n,user:a,repo:o,oldRef:s,newRef:c,newDate:i}}}else{let t=await Qn(a,o),r=$n(t,s,n);if(r)return{key:e,newRange:r,user:a,repo:o,oldRef:s,newRef:r}}}function tr(e){return e.replace(/-.*/,``)}function nr(e){let t=e.match(en);return t?.length===1?e.replace(en,Z(t[0])):e}function Q(e){return e===void 0?!1:e===``?!0:typeof e==`string`?e.includes(`,`)?new Set(bn(e)):new Set([e]):Array.isArray(e)?new Set(e):!1}function rr(e){return Array.from(e.matchAll(/(----BEGIN CERT[^]+?IFICATE----)/g),e=>e[0])}function ir(e){return Array.from(e.matchAll(/(----BEGIN [^]+?PRIVATE KEY----)/g),e=>e[0])}function ar(e,t){return RegExp(`^${W(e).replaceAll(`\\*`,`.*`)}$`,t?`i`:``)}function or(e,t,n){return t&&typeof e==`string`?/\/.+\//.test(e)?new RegExp(e.slice(1,-1)):ar(e,n):e instanceof RegExp?e:ar(e,n)}function $(e){if(e instanceof Set){let t=new Set;for(let n of e)t.add(or(n,!0,!1));return t}return e}function sr(e,t){let n=new Set;for(let t of e||[])n.add(or(t,!0,!0));for(let e of t||[])n.add(or(e,!1,!0));return n}function cr(e,t,n,r){if(t===`pypi`&&e===`python`)return!1;if(!n.size&&!r.size)return!0;for(let t of r)if(t.test(e))return!1;for(let t of n)if(t.test(e))return!0;return!n.size}function lr(e){let t=new Set,r=new Set;if(e)for(let n of e){let e;try{e=m(n)}catch(e){throw Error(`Unable to open ${n}: ${e.message}`)}if(e?.isFile()){let e=f(n);t.add(e),r.add(e)}else if(e?.isDirectory())for(let e of Object.keys(rn)){let r=d(n,e),i=null;try{i=m(r)}catch{}i?.isFile()&&t.add(f(r))}else throw Error(`${n} is neither a file nor directory`)}else for(let e of Object.keys(rn)){let r=xn(e,n());r&&t.add(f(r))}return[t,r]}async function ur(e){let t=[];for(let e of[``,`.config/`])for(let n of[`js`,`ts`,`mjs`,`mts`])t.push(`${e}updates${e?``:`.config`}.${n}`);let n={};try{({default:n}=await Promise.any(t.map(t=>import(d(e,...t.split(`/`))))))}catch{}return n}async function dr(){for(let e of[s,o])e?._handle?.setBlocking?.(!0);let e=typeof K.sockets==`number`?K.sockets:96,{help:t,version:n,file:r,types:i,update:a}=K;t&&(s.write(`usage: updates [options]
|
|
4063
90
|
|
|
4064
91
|
Options:
|
|
4065
92
|
-u, --update Update versions and write package file
|
|
@@ -4076,7 +103,7 @@ async function Wo() {
|
|
|
4076
103
|
-E, --error-on-outdated Exit with code 2 when updates are available and 0 when not
|
|
4077
104
|
-U, --error-on-unchanged Exit with code 0 when updates are available and 2 when not
|
|
4078
105
|
-r, --registry <url> Override npm registry URL
|
|
4079
|
-
-S, --sockets <num> Maximum number of parallel HTTP sockets opened. Default:
|
|
106
|
+
-S, --sockets <num> Maximum number of parallel HTTP sockets opened. Default: 96
|
|
4080
107
|
-M, --modes <mode,...> Which modes to enable. Either npm,pypi,go. Default: npm,pypi
|
|
4081
108
|
-j, --json Output a JSON object
|
|
4082
109
|
-n, --no-color Disable color output
|
|
@@ -4091,155 +118,4 @@ async function Wo() {
|
|
|
4091
118
|
$ updates -e '/^react-(dom)?/'
|
|
4092
119
|
$ updates -f package.json
|
|
4093
120
|
$ updates -f pyproject.toml
|
|
4094
|
-
`), await $e()), i && (
|
|
4095
|
-
const s = {}, u = {}, l = {}, c = {};
|
|
4096
|
-
let m = 0;
|
|
4097
|
-
const [p, h] = Vo(le(o));
|
|
4098
|
-
for (const f of p) {
|
|
4099
|
-
const v = nr(Ae(f)), E = Te(f), y = tr[E];
|
|
4100
|
-
if (!ho.has(y) && !h.has(f)) continue;
|
|
4101
|
-
c[y] = f, s[y] || (s[y] = {});
|
|
4102
|
-
const $ = await Xo(v);
|
|
4103
|
-
let L = [], N = [];
|
|
4104
|
-
k.include && k.include !== !0 && (L = (Array.isArray(k.include) ? k.include : [k.include]).flatMap((w) => Le(w))), k.exclude && k.exclude !== !0 && (N = (Array.isArray(k.exclude) ? k.exclude : [k.exclude]).flatMap((w) => Le(w)));
|
|
4105
|
-
const _ = ii(L, $?.include ?? []), b = ii(N, $?.exclude ?? []), G = {}, x = Zi("npm", { registry: "https://registry.npmjs.org" }) || {}, te = { npmrc: x, recursive: !0 };
|
|
4106
|
-
if (y === "npm") {
|
|
4107
|
-
x["strict-ssl"] === !1 && (G.rejectUnauthorized = !1);
|
|
4108
|
-
for (const w of ["cert", "ca", "key"]) {
|
|
4109
|
-
const S = w === "key" ? Mo : Uo;
|
|
4110
|
-
let O = [];
|
|
4111
|
-
x[w] && (O = (Array.isArray(x[w]) ? x[w] : [x[w]]).flatMap((R) => S(R))), x[`${w}file`] && (O = Array.from(S(yr(x[`opt${f}`], "utf8")))), O.length && (G[w] = w === "ca" ? [...Di, ...O] : O);
|
|
4112
|
-
}
|
|
4113
|
-
}
|
|
4114
|
-
let V = [];
|
|
4115
|
-
a ? V = Array.isArray(a) ? a : Le(a) : "types" in $ && Array.isArray($.types) ? V = $.types : y === "npm" ? V = oo : y === "pypi" ? V = [...co, ...ao] : y === "go" && (V = Array.from(Vn));
|
|
4116
|
-
let X = {};
|
|
4117
|
-
if (y === "go")
|
|
4118
|
-
l[y] = Li("go", [
|
|
4119
|
-
"list",
|
|
4120
|
-
"-m",
|
|
4121
|
-
"-f",
|
|
4122
|
-
"{{if not .Indirect}}{{.Path}}@{{.Version}}{{end}}",
|
|
4123
|
-
"all"
|
|
4124
|
-
], { stdio: "pipe", encoding: "utf8", cwd: v });
|
|
4125
|
-
else
|
|
4126
|
-
try {
|
|
4127
|
-
l[y] = yr(f, "utf8");
|
|
4128
|
-
} catch (w) {
|
|
4129
|
-
throw new Error(`Unable to open ${f}: ${w.message}`);
|
|
4130
|
-
}
|
|
4131
|
-
try {
|
|
4132
|
-
if (y === "npm")
|
|
4133
|
-
X = JSON.parse(l[y]);
|
|
4134
|
-
else if (y === "pypi")
|
|
4135
|
-
X = Ts(l[y]);
|
|
4136
|
-
else {
|
|
4137
|
-
X.deps = {};
|
|
4138
|
-
for (const w of So(l[y])) {
|
|
4139
|
-
const [S, O] = w.split("@");
|
|
4140
|
-
O && (X.deps[S] = O);
|
|
4141
|
-
}
|
|
4142
|
-
}
|
|
4143
|
-
} catch (w) {
|
|
4144
|
-
throw new Error(`Error parsing ${f}: ${w.message}`);
|
|
4145
|
-
}
|
|
4146
|
-
for (const w of V) {
|
|
4147
|
-
let S;
|
|
4148
|
-
if (y === "npm" || y === "go" ? S = X[w] || {} : S = yo(X, w) || {}, Array.isArray(S) && y === "pypi")
|
|
4149
|
-
for (const { name: O, version: R } of so(S))
|
|
4150
|
-
Jt(O, y, _, b) && (s[y][`${w}${re}${O}`] = {
|
|
4151
|
-
old: ri(R),
|
|
4152
|
-
oldOriginal: R
|
|
4153
|
-
});
|
|
4154
|
-
else
|
|
4155
|
-
for (const [O, R] of Object.entries(S))
|
|
4156
|
-
y !== "go" && J.validRange(R) && Jt(O, y, _, b) ? s[y][`${w}${re}${O}`] = {
|
|
4157
|
-
old: ri(R),
|
|
4158
|
-
oldOriginal: R
|
|
4159
|
-
} : y === "npm" && Jt(O, y, _, b) ? u[`${w}${re}${O}`] = {
|
|
4160
|
-
old: R
|
|
4161
|
-
} : y === "go" && (s[y][`${w}${re}${O}`] = {
|
|
4162
|
-
old: Go(R),
|
|
4163
|
-
oldOriginal: R
|
|
4164
|
-
});
|
|
4165
|
-
}
|
|
4166
|
-
if (m += Object.keys(s[y]).length + Object.keys(u).length, !m) continue;
|
|
4167
|
-
let A;
|
|
4168
|
-
y === "npm" && (A = be(k.registry || $.registry || x.registry));
|
|
4169
|
-
const I = await Or(Object.keys(s[y]).map((w) => async () => {
|
|
4170
|
-
const [S, O] = w.split(re);
|
|
4171
|
-
if (y === "npm")
|
|
4172
|
-
return $o(O, S, A, G, te, x);
|
|
4173
|
-
if (y === "pypi")
|
|
4174
|
-
return Ro(O, S, G);
|
|
4175
|
-
{
|
|
4176
|
-
let R = await gr(O, "latest", G, Array.from(yi));
|
|
4177
|
-
const P = await Oo(O, G);
|
|
4178
|
-
return P && R && J.gt(P.Version.substring(1), R.Version.substring(1)) && (R = P), [R, Vn[0], null, O];
|
|
4179
|
-
}
|
|
4180
|
-
}), { concurrency: t });
|
|
4181
|
-
for (const [w, S, O, R] of I) {
|
|
4182
|
-
if (w?.error) throw new Error(w.error);
|
|
4183
|
-
const P = typeof ge == "boolean" ? ge : he(w.name, ge), D = typeof zt == "boolean" ? zt : he(w.name, zt), j = typeof Kt == "boolean" ? Kt : he(w.name, Kt);
|
|
4184
|
-
let B;
|
|
4185
|
-
Hn === !0 || he(w.name, Hn) ? B = /* @__PURE__ */ new Set(["patch"]) : zn === !0 || he(w.name, zn) ? B = /* @__PURE__ */ new Set(["patch", "minor"]) : B = /* @__PURE__ */ new Set(["patch", "minor", "major"]);
|
|
4186
|
-
const U = `${S}${re}${R}`, T = s[y][U].old, q = s[y][U].oldOriginal, C = qo(w, {
|
|
4187
|
-
usePre: D,
|
|
4188
|
-
useRel: j,
|
|
4189
|
-
useGreatest: P,
|
|
4190
|
-
semvers: B,
|
|
4191
|
-
range: T,
|
|
4192
|
-
mode: y
|
|
4193
|
-
});
|
|
4194
|
-
let K = "";
|
|
4195
|
-
if (["go", "pypi"].includes(y) && C ? K = C : C && (K = jo(T, C, q)), !C || q && q === K)
|
|
4196
|
-
delete s[y][U];
|
|
4197
|
-
else {
|
|
4198
|
-
s[y][U].new = K, y === "npm" ? s[y][U].info = Zn(w?.versions?.[C], O, w.name) : y === "pypi" ? s[y][U].info = Zn(w, O, w.info.name) : s[y][U].info = w?.Origin?.URL ?? `https://${R}`;
|
|
4199
|
-
let H = "";
|
|
4200
|
-
y === "npm" && w.time?.[C] ? H = w.time[C] : y === "pypi" && w.releases?.[C]?.[0]?.upload_time_iso_8601 ? H = w.releases[C][0].upload_time_iso_8601 : y === "go" && w.Time && (H = w.Time), H && (s[y][U].age = Mn(H, { noAffix: !0 }));
|
|
4201
|
-
}
|
|
4202
|
-
}
|
|
4203
|
-
if (Object.keys(u).length) {
|
|
4204
|
-
const w = (await Or(Object.entries(u).map(([S, O]) => () => {
|
|
4205
|
-
const R = S.split(re)[1], P = typeof ge == "boolean" ? ge : he(R, ge);
|
|
4206
|
-
return ko(S, O, P);
|
|
4207
|
-
}), { concurrency: t })).filter((S) => S !== void 0);
|
|
4208
|
-
for (const S of w) {
|
|
4209
|
-
const { key: O, newRange: R, user: P, repo: D, oldRef: j, newRef: B, newDate: U } = S;
|
|
4210
|
-
s[y][O] = {
|
|
4211
|
-
old: u[O].old,
|
|
4212
|
-
new: R,
|
|
4213
|
-
oldPrint: er.test(j) ? j.substring(0, 7) : j,
|
|
4214
|
-
newPrint: er.test(B) ? B.substring(0, 7) : B,
|
|
4215
|
-
info: `https://github.com/${P}/${D}`,
|
|
4216
|
-
...U ? { age: Mn(U, { noAffix: !0 }) } : {}
|
|
4217
|
-
};
|
|
4218
|
-
}
|
|
4219
|
-
}
|
|
4220
|
-
}
|
|
4221
|
-
m === 0 && Qn("No dependencies found, nothing to do.");
|
|
4222
|
-
let g = 0;
|
|
4223
|
-
for (const f of Object.keys(s))
|
|
4224
|
-
g += Object.keys(s[f]).length;
|
|
4225
|
-
g || Qn("All dependencies are up to date.");
|
|
4226
|
-
const d = _o(s);
|
|
4227
|
-
if (n) {
|
|
4228
|
-
for (const f of Object.keys(s))
|
|
4229
|
-
if (Object.keys(s[f]).length) {
|
|
4230
|
-
try {
|
|
4231
|
-
const v = f === "npm" ? Po : xo;
|
|
4232
|
-
No(c[f], v(l[f], s[f]));
|
|
4233
|
-
} catch (v) {
|
|
4234
|
-
throw new Error(`Error writing ${Te(c[f])}: ${v.message}`);
|
|
4235
|
-
}
|
|
4236
|
-
console.info(dr(`✨ ${Te(c[f])} updated`));
|
|
4237
|
-
}
|
|
4238
|
-
}
|
|
4239
|
-
await $e(void 0, d);
|
|
4240
|
-
}
|
|
4241
|
-
try {
|
|
4242
|
-
await Wo();
|
|
4243
|
-
} catch (e) {
|
|
4244
|
-
await $e(e);
|
|
4245
|
-
}
|
|
121
|
+
`),await X()),n&&(console.info(nn),await X());let c={},d={},p={},m={},g=0,[_,v]=lr(Q(r));for(let t of _){let n=u(f(t)),r=l(t),a=rn[r];if(!pn.has(a)&&!v.has(t))continue;m[a]=t,c[a]||(c[a]={});let o=await ur(n),s=[],_=[];K.include&&K.include!==!0&&(s=(Array.isArray(K.include)?K.include:[K.include]).flatMap(e=>bn(e))),K.exclude&&K.exclude!==!0&&(_=(Array.isArray(K.exclude)?K.exclude:[K.exclude]).flatMap(e=>bn(e)));let y=sr(s,o?.include??[]),S=sr(_,o?.exclude??[]),C={},w=(0,zt.default)(`npm`,{registry:`https://registry.npmjs.org`})||{},T={npmrc:w,recursive:!0};if(a===`npm`){w[`strict-ssl`]===!1&&(C.rejectUnauthorized=!1);for(let e of[`cert`,`ca`,`key`]){let n=e===`key`?ir:rr,r=[];w[e]&&(r=(Array.isArray(w[e])?w[e]:[w[e]]).flatMap(e=>n(e))),w[`${e}file`]&&(r=Array.from(n(h(w[`opt${t}`],`utf8`)))),r.length&&(C[e]=e===`ca`?[...x,...r]:r)}}let E=[];i?E=Array.isArray(i)?i:bn(i):`types`in o&&Array.isArray(o.types)?E=o.types:a===`npm`?E=Kt:a===`pypi`?E=[...Jt,...qt]:a===`go`&&(E=Array.from(Yt));let D={};if(a===`go`)p[a]=b(`go`,[`list`,`-m`,`-f`,`{{if not .Indirect}}{{.Path}}@{{.Version}}{{end}}`,`all`],{stdio:`pipe`,encoding:`utf8`,cwd:n});else try{p[a]=h(t,`utf8`)}catch(e){throw Error(`Unable to open ${t}: ${e.message}`)}try{if(a===`npm`)D=JSON.parse(p[a]);else if(a===`pypi`)D=tt(p[a]);else{D.deps={};for(let e of kn(p[a])){let[t,n]=e.split(`@`);n&&(D.deps[t]=n)}}}catch(e){throw Error(`Error parsing ${t}: ${e.message}`)}for(let e of E){let t;if(t=a===`npm`||a===`go`?D[e]||{}:yn(D,e)||{},Array.isArray(t)&&a===`pypi`)for(let{name:n,version:r}of Gt(t))cr(n,a,y,S)&&(c[a][`${e}${n}`]={old:nr(r),oldOriginal:r});else for(let[n,r]of Object.entries(t))a!==`go`&&(0,U.validRange)(r)&&cr(n,a,y,S)?c[a][`${e}${n}`]={old:nr(r),oldOriginal:r}:a===`npm`&&cr(n,a,y,S)?d[`${e}${n}`]={old:r}:a===`go`&&(c[a][`${e}${n}`]={old:tr(r),oldOriginal:r})}if(g+=Object.keys(c[a]).length+Object.keys(d).length,!g)continue;let O;a===`npm`&&(O=G(K.registry||o.registry||w.registry));let ee=await le(Object.keys(c[a]).map(e=>async()=>{let[t,n]=e.split(`\0`);if(a===`npm`)return Dn(n,t,O,C,T,w);if(a===`pypi`)return On(n,t,C);{let e=await An(n,`latest`,C,Array.from(gn)),t=await jn(n,C);return t&&e&&(0,U.gt)(t.Version.substring(1),e.Version.substring(1))&&(e=t),[e,Yt[0],null,n]}}),{concurrency:e});for(let[e,t,n,r]of ee){if(e?.error)throw Error(e.error);let i=typeof q==`boolean`?q:Y(e.name,q),o=typeof cn==`boolean`?cn:Y(e.name,cn),s=typeof ln==`boolean`?ln:Y(e.name,ln),l;l=un===!0||Y(e.name,un)?new Set([`patch`]):dn===!0||Y(e.name,dn)?new Set([`patch`,`minor`]):new Set([`patch`,`minor`,`major`]);let u=`${t}${r}`,d=c[a][u].old,f=c[a][u].oldOriginal,p=Yn(e,{usePre:o,useRel:s,useGreatest:i,semvers:l,range:d,mode:a}),m=``;if([`go`,`pypi`].includes(a)&&p?m=p:p&&(m=Gn(d,p,f)),!p||f&&f===m)delete c[a][u];else{c[a][u].new=m,a===`npm`?c[a][u].info=Pn(e?.versions?.[p],n,e.name):a===`pypi`?c[a][u].info=Pn(e,n,e.info.name):c[a][u].info=e?.Origin?.URL??`https://${r}`;let t=``;a===`npm`&&e.time?.[p]?t=e.time[p]:a===`pypi`&&e.releases?.[p]?.[0]?.upload_time_iso_8601?t=e.releases[p][0].upload_time_iso_8601:a===`go`&&e.Time&&(t=e.Time),t&&(c[a][u].age=Wt(t,{noAffix:!0}))}}if(Object.keys(d).length){let t=(await le(Object.entries(d).map(([e,t])=>()=>{let n=e.split(`\0`)[1],r=typeof q==`boolean`?q:Y(n,q);return er(e,t,r)}),{concurrency:e})).filter(e=>e!==void 0);for(let e of t){let{key:t,newRange:n,user:r,repo:i,oldRef:o,newRef:s,newDate:l}=e;c[a][t]={old:d[t].old,new:n,oldPrint:$t.test(o)?o.substring(0,7):o,newPrint:$t.test(s)?s.substring(0,7):s,info:`https://github.com/${r}/${i}`,...l?{age:Wt(l,{noAffix:!0})}:{}}}}}g===0&&Fn(`No dependencies found, nothing to do.`);let y=0;for(let e of Object.keys(c))y+=Object.keys(c[e]).length;y||Fn(`All dependencies are up to date.`);let S=In(c);if(a)for(let e of Object.keys(c)){if(!Object.keys(c[e]).length)continue;try{let t=e===`npm`?Un:Wn;Ln(m[e],t(p[e],c[e]))}catch(t){throw Error(`Error writing ${l(m[e])}: ${t.message}`)}console.info(sn(`✨ ${l(m[e])} updated`))}await X(void 0,S)}try{await dr()}catch(e){await X(e)}export{};
|