storybook 9.0.0-alpha.7 → 9.0.0-alpha.9
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/dist/bin/index.cjs +63 -63
- package/dist/bin/index.js +63 -63
- package/dist/cli/bin/index.cjs +1 -1
- package/dist/cli/bin/index.js +1 -1
- package/dist/common/index.cjs +146 -132
- package/dist/common/index.d.ts +2 -1
- package/dist/common/index.js +146 -132
- package/dist/core-server/index.cjs +1412 -1390
- package/dist/core-server/index.js +1833 -1812
- package/dist/instrumenter/index.cjs +7 -4
- package/dist/instrumenter/index.js +7 -4
- package/dist/manager/globals-runtime.js +8 -5
- package/dist/manager-api/index.cjs +1 -1
- package/dist/manager-api/index.js +1 -1
- package/dist/preview/runtime.js +7 -4
- package/dist/telemetry/index.cjs +1050 -1977
- package/dist/telemetry/index.d.ts +25 -4
- package/dist/telemetry/index.js +1085 -2008
- package/dist/types/index.d.ts +0 -4
- package/package.json +2 -2
package/dist/telemetry/index.js
CHANGED
|
@@ -4,48 +4,48 @@ import { dirname as ESM_COMPAT_dirname } from 'node:path';
|
|
|
4
4
|
const __filename = ESM_COMPAT_fileURLToPath(import.meta.url);
|
|
5
5
|
const __dirname = ESM_COMPAT_dirname(__filename);
|
|
6
6
|
const require = ESM_COMPAT_Module.createRequire(import.meta.url);
|
|
7
|
-
var
|
|
8
|
-
var
|
|
9
|
-
var
|
|
10
|
-
var
|
|
11
|
-
var
|
|
12
|
-
var o = (e, t) =>
|
|
7
|
+
var ao = Object.create;
|
|
8
|
+
var ke = Object.defineProperty;
|
|
9
|
+
var co = Object.getOwnPropertyDescriptor;
|
|
10
|
+
var uo = Object.getOwnPropertyNames;
|
|
11
|
+
var fo = Object.getPrototypeOf, lo = Object.prototype.hasOwnProperty;
|
|
12
|
+
var o = (e, t) => ke(e, "name", { value: t, configurable: !0 }), S = /* @__PURE__ */ ((e) => typeof require < "u" ? require : typeof Proxy <
|
|
13
13
|
"u" ? new Proxy(e, {
|
|
14
14
|
get: (t, r) => (typeof require < "u" ? require : t)[r]
|
|
15
15
|
}) : e)(function(e) {
|
|
16
16
|
if (typeof require < "u") return require.apply(this, arguments);
|
|
17
17
|
throw Error('Dynamic require of "' + e + '" is not supported');
|
|
18
18
|
});
|
|
19
|
-
var
|
|
20
|
-
var
|
|
19
|
+
var x = (e, t) => () => (t || e((t = { exports: {} }).exports, t), t.exports);
|
|
20
|
+
var po = (e, t, r, n) => {
|
|
21
21
|
if (t && typeof t == "object" || typeof t == "function")
|
|
22
|
-
for (let i of
|
|
23
|
-
!
|
|
22
|
+
for (let i of uo(t))
|
|
23
|
+
!lo.call(e, i) && i !== r && ke(e, i, { get: () => t[i], enumerable: !(n = co(t, i)) || n.enumerable });
|
|
24
24
|
return e;
|
|
25
25
|
};
|
|
26
|
-
var
|
|
26
|
+
var A = (e, t, r) => (r = e != null ? ao(fo(e)) : {}, po(
|
|
27
27
|
// If the importer is in node compatibility mode or this is not an ESM
|
|
28
28
|
// file that has been converted to a CommonJS file using a Babel-
|
|
29
29
|
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
30
30
|
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
31
|
-
t || !e || !e.__esModule ?
|
|
31
|
+
t || !e || !e.__esModule ? ke(r, "default", { value: e, enumerable: !0 }) : r,
|
|
32
32
|
e
|
|
33
33
|
));
|
|
34
34
|
|
|
35
35
|
// ../node_modules/picocolors/picocolors.js
|
|
36
|
-
var
|
|
37
|
-
var
|
|
38
|
-
|
|
36
|
+
var vt = x((ja, Ee) => {
|
|
37
|
+
var q = process || {}, Et = q.argv || [], V = q.env || {}, mo = !(V.NO_COLOR || Et.includes("--no-color")) && (!!V.FORCE_COLOR || Et.includes(
|
|
38
|
+
"--color") || q.platform === "win32" || (q.stdout || {}).isTTY && V.TERM !== "dumb" || !!V.CI), yo = /* @__PURE__ */ o((e, t, r = e) => (n) => {
|
|
39
39
|
let i = "" + n, s = i.indexOf(t, e.length);
|
|
40
|
-
return ~s ? e +
|
|
41
|
-
}, "formatter"),
|
|
40
|
+
return ~s ? e + ho(i, t, r, s) + t : e + i + t;
|
|
41
|
+
}, "formatter"), ho = /* @__PURE__ */ o((e, t, r, n) => {
|
|
42
42
|
let i = "", s = 0;
|
|
43
43
|
do
|
|
44
44
|
i += e.substring(s, n) + r, s = n + t.length, n = e.indexOf(t, s);
|
|
45
45
|
while (~n);
|
|
46
46
|
return i + e.substring(s);
|
|
47
|
-
}, "replaceClose"),
|
|
48
|
-
let t = e ?
|
|
47
|
+
}, "replaceClose"), Pt = /* @__PURE__ */ o((e = mo) => {
|
|
48
|
+
let t = e ? yo : () => String;
|
|
49
49
|
return {
|
|
50
50
|
isColorSupported: e,
|
|
51
51
|
reset: t("\x1B[0m", "\x1B[0m"),
|
|
@@ -91,16 +91,33 @@ var dr = p((Dl, tt) => {
|
|
|
91
91
|
bgWhiteBright: t("\x1B[107m", "\x1B[49m")
|
|
92
92
|
};
|
|
93
93
|
}, "createColors");
|
|
94
|
-
|
|
95
|
-
|
|
94
|
+
Ee.exports = Pt();
|
|
95
|
+
Ee.exports.createColors = Pt;
|
|
96
|
+
});
|
|
97
|
+
|
|
98
|
+
// ../node_modules/walk-up-path/dist/cjs/index.js
|
|
99
|
+
var Nt = x((K) => {
|
|
100
|
+
"use strict";
|
|
101
|
+
Object.defineProperty(K, "__esModule", { value: !0 });
|
|
102
|
+
K.walkUp = void 0;
|
|
103
|
+
var Rt = S("path"), go = /* @__PURE__ */ o(function* (e) {
|
|
104
|
+
for (e = (0, Rt.resolve)(e); e; ) {
|
|
105
|
+
yield e;
|
|
106
|
+
let t = (0, Rt.dirname)(e);
|
|
107
|
+
if (t === e)
|
|
108
|
+
break;
|
|
109
|
+
e = t;
|
|
110
|
+
}
|
|
111
|
+
}, "walkUp");
|
|
112
|
+
K.walkUp = go;
|
|
96
113
|
});
|
|
97
114
|
|
|
98
115
|
// ../node_modules/isexe/windows.js
|
|
99
|
-
var
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
var
|
|
103
|
-
function
|
|
116
|
+
var Wt = x((ac, $t) => {
|
|
117
|
+
$t.exports = Ut;
|
|
118
|
+
Ut.sync = Io;
|
|
119
|
+
var Bt = S("fs");
|
|
120
|
+
function Co(e, t) {
|
|
104
121
|
var r = t.pathExt !== void 0 ? t.pathExt : process.env.PATHEXT;
|
|
105
122
|
if (!r || (r = r.split(";"), r.indexOf("") !== -1))
|
|
106
123
|
return !0;
|
|
@@ -111,134 +128,134 @@ var Er = p((Hl, Pr) => {
|
|
|
111
128
|
}
|
|
112
129
|
return !1;
|
|
113
130
|
}
|
|
114
|
-
o(
|
|
115
|
-
function
|
|
116
|
-
return !e.isSymbolicLink() && !e.isFile() ? !1 :
|
|
131
|
+
o(Co, "checkPathExt");
|
|
132
|
+
function Gt(e, t, r) {
|
|
133
|
+
return !e.isSymbolicLink() && !e.isFile() ? !1 : Co(t, r);
|
|
117
134
|
}
|
|
118
|
-
o(
|
|
119
|
-
function
|
|
120
|
-
|
|
121
|
-
r(n, n ? !1 :
|
|
135
|
+
o(Gt, "checkStat");
|
|
136
|
+
function Ut(e, t, r) {
|
|
137
|
+
Bt.stat(e, function(n, i) {
|
|
138
|
+
r(n, n ? !1 : Gt(i, e, t));
|
|
122
139
|
});
|
|
123
140
|
}
|
|
124
|
-
o(
|
|
125
|
-
function
|
|
126
|
-
return
|
|
141
|
+
o(Ut, "isexe");
|
|
142
|
+
function Io(e, t) {
|
|
143
|
+
return Gt(Bt.statSync(e), e, t);
|
|
127
144
|
}
|
|
128
|
-
o(
|
|
145
|
+
o(Io, "sync");
|
|
129
146
|
});
|
|
130
147
|
|
|
131
148
|
// ../node_modules/isexe/mode.js
|
|
132
|
-
var
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
var
|
|
136
|
-
function
|
|
137
|
-
|
|
138
|
-
r(n, n ? !1 :
|
|
149
|
+
var zt = x((uc, qt) => {
|
|
150
|
+
qt.exports = Jt;
|
|
151
|
+
Jt.sync = Ao;
|
|
152
|
+
var Ht = S("fs");
|
|
153
|
+
function Jt(e, t, r) {
|
|
154
|
+
Ht.stat(e, function(n, i) {
|
|
155
|
+
r(n, n ? !1 : Vt(i, t));
|
|
139
156
|
});
|
|
140
157
|
}
|
|
141
|
-
o(
|
|
142
|
-
function
|
|
143
|
-
return
|
|
158
|
+
o(Jt, "isexe");
|
|
159
|
+
function Ao(e, t) {
|
|
160
|
+
return Vt(Ht.statSync(e), t);
|
|
144
161
|
}
|
|
145
|
-
o(
|
|
146
|
-
function
|
|
147
|
-
return e.isFile() &&
|
|
162
|
+
o(Ao, "sync");
|
|
163
|
+
function Vt(e, t) {
|
|
164
|
+
return e.isFile() && Oo(e, t);
|
|
148
165
|
}
|
|
149
|
-
o(
|
|
150
|
-
function
|
|
166
|
+
o(Vt, "checkStat");
|
|
167
|
+
function Oo(e, t) {
|
|
151
168
|
var r = e.mode, n = e.uid, i = e.gid, s = t.uid !== void 0 ? t.uid : process.getuid && process.getuid(), a = t.gid !== void 0 ? t.gid : process.
|
|
152
|
-
getgid && process.getgid(), c = parseInt("100", 8), u = parseInt("010", 8),
|
|
153
|
-
a || r & c && n === s || r &
|
|
154
|
-
return
|
|
169
|
+
getgid && process.getgid(), c = parseInt("100", 8), u = parseInt("010", 8), f = parseInt("001", 8), l = c | u, d = r & f || r & u && i ===
|
|
170
|
+
a || r & c && n === s || r & l && s === 0;
|
|
171
|
+
return d;
|
|
155
172
|
}
|
|
156
|
-
o(
|
|
173
|
+
o(Oo, "checkMode");
|
|
157
174
|
});
|
|
158
175
|
|
|
159
176
|
// ../node_modules/isexe/index.js
|
|
160
|
-
var
|
|
161
|
-
var
|
|
162
|
-
process.platform === "win32" || global.TESTING_WINDOWS ?
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
function
|
|
177
|
+
var Kt = x((pc, Yt) => {
|
|
178
|
+
var lc = S("fs"), X;
|
|
179
|
+
process.platform === "win32" || global.TESTING_WINDOWS ? X = Wt() : X = zt();
|
|
180
|
+
Yt.exports = Ae;
|
|
181
|
+
Ae.sync = jo;
|
|
182
|
+
function Ae(e, t, r) {
|
|
166
183
|
if (typeof t == "function" && (r = t, t = {}), !r) {
|
|
167
184
|
if (typeof Promise != "function")
|
|
168
185
|
throw new TypeError("callback not provided");
|
|
169
186
|
return new Promise(function(n, i) {
|
|
170
|
-
|
|
187
|
+
Ae(e, t || {}, function(s, a) {
|
|
171
188
|
s ? i(s) : n(a);
|
|
172
189
|
});
|
|
173
190
|
});
|
|
174
191
|
}
|
|
175
|
-
|
|
192
|
+
X(e, t || {}, function(n, i) {
|
|
176
193
|
n && (n.code === "EACCES" || t && t.ignoreErrors) && (n = null, i = !1), r(n, i);
|
|
177
194
|
});
|
|
178
195
|
}
|
|
179
|
-
o(
|
|
180
|
-
function
|
|
196
|
+
o(Ae, "isexe");
|
|
197
|
+
function jo(e, t) {
|
|
181
198
|
try {
|
|
182
|
-
return
|
|
199
|
+
return X.sync(e, t || {});
|
|
183
200
|
} catch (r) {
|
|
184
201
|
if (t && t.ignoreErrors || r.code === "EACCES")
|
|
185
202
|
return !1;
|
|
186
203
|
throw r;
|
|
187
204
|
}
|
|
188
205
|
}
|
|
189
|
-
o(
|
|
206
|
+
o(jo, "sync");
|
|
190
207
|
});
|
|
191
208
|
|
|
192
209
|
// ../node_modules/cross-spawn/node_modules/which/which.js
|
|
193
|
-
var
|
|
194
|
-
var
|
|
195
|
-
:",
|
|
210
|
+
var nr = x((dc, rr) => {
|
|
211
|
+
var j = process.platform === "win32" || process.env.OSTYPE === "cygwin" || process.env.OSTYPE === "msys", Xt = S("path"), Ro = j ? ";" : "\
|
|
212
|
+
:", Qt = Kt(), Zt = /* @__PURE__ */ o((e) => Object.assign(new Error(`not found: ${e}`), { code: "ENOENT" }), "getNotFoundError"), er = /* @__PURE__ */ o(
|
|
196
213
|
(e, t) => {
|
|
197
|
-
let r = t.colon ||
|
|
214
|
+
let r = t.colon || Ro, n = e.match(/\//) || j && e.match(/\\/) ? [""] : [
|
|
198
215
|
// windows always checks the cwd first
|
|
199
|
-
...
|
|
216
|
+
...j ? [process.cwd()] : [],
|
|
200
217
|
...(t.path || process.env.PATH || /* istanbul ignore next: very unusual */
|
|
201
218
|
"").split(r)
|
|
202
|
-
], i =
|
|
203
|
-
return
|
|
219
|
+
], i = j ? t.pathExt || process.env.PATHEXT || ".EXE;.CMD;.BAT;.COM" : "", s = j ? i.split(r) : [""];
|
|
220
|
+
return j && e.indexOf(".") !== -1 && s[0] !== "" && s.unshift(""), {
|
|
204
221
|
pathEnv: n,
|
|
205
222
|
pathExt: s,
|
|
206
223
|
pathExtExe: i
|
|
207
224
|
};
|
|
208
|
-
}, "getPathInfo"),
|
|
225
|
+
}, "getPathInfo"), tr = /* @__PURE__ */ o((e, t, r) => {
|
|
209
226
|
typeof t == "function" && (r = t, t = {}), t || (t = {});
|
|
210
|
-
let { pathEnv: n, pathExt: i, pathExtExe: s } =
|
|
211
|
-
if (
|
|
212
|
-
return t.all && a.length ?
|
|
213
|
-
let
|
|
214
|
-
|
|
215
|
-
}), "step"), u = /* @__PURE__ */ o((
|
|
216
|
-
if (
|
|
217
|
-
return
|
|
218
|
-
let
|
|
219
|
-
|
|
220
|
-
if (!
|
|
227
|
+
let { pathEnv: n, pathExt: i, pathExtExe: s } = er(e, t), a = [], c = /* @__PURE__ */ o((f) => new Promise((l, d) => {
|
|
228
|
+
if (f === n.length)
|
|
229
|
+
return t.all && a.length ? l(a) : d(Zt(e));
|
|
230
|
+
let h = n[f], y = /^".*"$/.test(h) ? h.slice(1, -1) : h, g = Xt.join(y, e), m = !y && /^\.[\\\/]/.test(e) ? e.slice(0, 2) + g : g;
|
|
231
|
+
l(u(m, f, 0));
|
|
232
|
+
}), "step"), u = /* @__PURE__ */ o((f, l, d) => new Promise((h, y) => {
|
|
233
|
+
if (d === i.length)
|
|
234
|
+
return h(c(l + 1));
|
|
235
|
+
let g = i[d];
|
|
236
|
+
Qt(f + g, { pathExt: s }, (m, b) => {
|
|
237
|
+
if (!m && b)
|
|
221
238
|
if (t.all)
|
|
222
|
-
a.push(
|
|
239
|
+
a.push(f + g);
|
|
223
240
|
else
|
|
224
|
-
return
|
|
225
|
-
return
|
|
241
|
+
return h(f + g);
|
|
242
|
+
return h(u(f, l, d + 1));
|
|
226
243
|
});
|
|
227
244
|
}), "subStep");
|
|
228
|
-
return r ? c(0).then((
|
|
229
|
-
}, "which"),
|
|
245
|
+
return r ? c(0).then((f) => r(null, f), r) : c(0);
|
|
246
|
+
}, "which"), No = /* @__PURE__ */ o((e, t) => {
|
|
230
247
|
t = t || {};
|
|
231
|
-
let { pathEnv: r, pathExt: n, pathExtExe: i } =
|
|
248
|
+
let { pathEnv: r, pathExt: n, pathExtExe: i } = er(e, t), s = [];
|
|
232
249
|
for (let a = 0; a < r.length; a++) {
|
|
233
|
-
let c = r[a], u = /^".*"$/.test(c) ? c.slice(1, -1) : c,
|
|
234
|
-
for (let
|
|
235
|
-
let
|
|
250
|
+
let c = r[a], u = /^".*"$/.test(c) ? c.slice(1, -1) : c, f = Xt.join(u, e), l = !u && /^\.[\\\/]/.test(e) ? e.slice(0, 2) + f : f;
|
|
251
|
+
for (let d = 0; d < n.length; d++) {
|
|
252
|
+
let h = l + n[d];
|
|
236
253
|
try {
|
|
237
|
-
if (
|
|
254
|
+
if (Qt.sync(h, { pathExt: i }))
|
|
238
255
|
if (t.all)
|
|
239
|
-
s.push(
|
|
256
|
+
s.push(h);
|
|
240
257
|
else
|
|
241
|
-
return
|
|
258
|
+
return h;
|
|
242
259
|
} catch {
|
|
243
260
|
}
|
|
244
261
|
}
|
|
@@ -247,28 +264,28 @@ var Mr = p((Ql, Dr) => {
|
|
|
247
264
|
return s;
|
|
248
265
|
if (t.nothrow)
|
|
249
266
|
return null;
|
|
250
|
-
throw
|
|
267
|
+
throw Zt(e);
|
|
251
268
|
}, "whichSync");
|
|
252
|
-
|
|
253
|
-
|
|
269
|
+
rr.exports = tr;
|
|
270
|
+
tr.sync = No;
|
|
254
271
|
});
|
|
255
272
|
|
|
256
273
|
// ../node_modules/path-key/index.js
|
|
257
|
-
var
|
|
274
|
+
var ir = x((hc, Oe) => {
|
|
258
275
|
"use strict";
|
|
259
|
-
var
|
|
276
|
+
var or = /* @__PURE__ */ o((e = {}) => {
|
|
260
277
|
let t = e.env || process.env;
|
|
261
278
|
return (e.platform || process.platform) !== "win32" ? "PATH" : Object.keys(t).reverse().find((n) => n.toUpperCase() === "PATH") || "Path";
|
|
262
279
|
}, "pathKey");
|
|
263
|
-
|
|
264
|
-
|
|
280
|
+
Oe.exports = or;
|
|
281
|
+
Oe.exports.default = or;
|
|
265
282
|
});
|
|
266
283
|
|
|
267
284
|
// ../node_modules/cross-spawn/lib/util/resolveCommand.js
|
|
268
|
-
var
|
|
285
|
+
var ur = x((bc, cr) => {
|
|
269
286
|
"use strict";
|
|
270
|
-
var
|
|
271
|
-
function
|
|
287
|
+
var sr = S("path"), Do = nr(), _o = ir();
|
|
288
|
+
function ar(e, t) {
|
|
272
289
|
let r = e.options.env || process.env, n = process.cwd(), i = e.options.cwd != null, s = i && process.chdir !== void 0 && !process.chdir.
|
|
273
290
|
disabled;
|
|
274
291
|
if (s)
|
|
@@ -278,53 +295,53 @@ var qr = p((rf, $r) => {
|
|
|
278
295
|
}
|
|
279
296
|
let a;
|
|
280
297
|
try {
|
|
281
|
-
a =
|
|
282
|
-
path: r[
|
|
283
|
-
pathExt: t ?
|
|
298
|
+
a = Do.sync(e.command, {
|
|
299
|
+
path: r[_o({ env: r })],
|
|
300
|
+
pathExt: t ? sr.delimiter : void 0
|
|
284
301
|
});
|
|
285
302
|
} catch {
|
|
286
303
|
} finally {
|
|
287
304
|
s && process.chdir(n);
|
|
288
305
|
}
|
|
289
|
-
return a && (a =
|
|
306
|
+
return a && (a = sr.resolve(i ? e.options.cwd : "", a)), a;
|
|
290
307
|
}
|
|
291
|
-
o(
|
|
292
|
-
function
|
|
293
|
-
return
|
|
308
|
+
o(ar, "resolveCommandAttempt");
|
|
309
|
+
function Mo(e) {
|
|
310
|
+
return ar(e) || ar(e, !0);
|
|
294
311
|
}
|
|
295
|
-
o(
|
|
296
|
-
|
|
312
|
+
o(Mo, "resolveCommand");
|
|
313
|
+
cr.exports = Mo;
|
|
297
314
|
});
|
|
298
315
|
|
|
299
316
|
// ../node_modules/cross-spawn/lib/util/escape.js
|
|
300
|
-
var
|
|
317
|
+
var fr = x((wc, Re) => {
|
|
301
318
|
"use strict";
|
|
302
|
-
var
|
|
303
|
-
function
|
|
304
|
-
return e = e.replace(
|
|
305
|
-
}
|
|
306
|
-
o(
|
|
307
|
-
function
|
|
308
|
-
return e = `${e}`, e = e.replace(/(\\*)"/g, '$1$1\\"'), e = e.replace(/(\\*)$/, "$1$1"), e = `"${e}"`, e = e.replace(
|
|
309
|
-
e.replace(
|
|
310
|
-
}
|
|
311
|
-
o(
|
|
312
|
-
|
|
313
|
-
|
|
319
|
+
var je = /([()\][%!^"`<>&|;, *?])/g;
|
|
320
|
+
function Lo(e) {
|
|
321
|
+
return e = e.replace(je, "^$1"), e;
|
|
322
|
+
}
|
|
323
|
+
o(Lo, "escapeCommand");
|
|
324
|
+
function Fo(e, t) {
|
|
325
|
+
return e = `${e}`, e = e.replace(/(\\*)"/g, '$1$1\\"'), e = e.replace(/(\\*)$/, "$1$1"), e = `"${e}"`, e = e.replace(je, "^$1"), t && (e =
|
|
326
|
+
e.replace(je, "^$1")), e;
|
|
327
|
+
}
|
|
328
|
+
o(Fo, "escapeArgument");
|
|
329
|
+
Re.exports.command = Lo;
|
|
330
|
+
Re.exports.argument = Fo;
|
|
314
331
|
});
|
|
315
332
|
|
|
316
333
|
// ../node_modules/shebang-regex/index.js
|
|
317
|
-
var
|
|
334
|
+
var pr = x((kc, lr) => {
|
|
318
335
|
"use strict";
|
|
319
|
-
|
|
336
|
+
lr.exports = /^#!(.*)/;
|
|
320
337
|
});
|
|
321
338
|
|
|
322
339
|
// ../node_modules/shebang-command/index.js
|
|
323
|
-
var
|
|
340
|
+
var dr = x((Ec, mr) => {
|
|
324
341
|
"use strict";
|
|
325
|
-
var
|
|
326
|
-
|
|
327
|
-
let t = e.match(
|
|
342
|
+
var Bo = pr();
|
|
343
|
+
mr.exports = (e = "") => {
|
|
344
|
+
let t = e.match(Bo);
|
|
328
345
|
if (!t)
|
|
329
346
|
return null;
|
|
330
347
|
let [r, n] = t[0].replace(/#! ?/, "").split(" "), i = r.split("/").pop();
|
|
@@ -333,45 +350,45 @@ var Jr = p((cf, zr) => {
|
|
|
333
350
|
});
|
|
334
351
|
|
|
335
352
|
// ../node_modules/cross-spawn/lib/util/readShebang.js
|
|
336
|
-
var
|
|
353
|
+
var hr = x((Pc, yr) => {
|
|
337
354
|
"use strict";
|
|
338
|
-
var
|
|
339
|
-
function
|
|
355
|
+
var Ne = S("fs"), Go = dr();
|
|
356
|
+
function Uo(e) {
|
|
340
357
|
let r = Buffer.alloc(150), n;
|
|
341
358
|
try {
|
|
342
|
-
n =
|
|
359
|
+
n = Ne.openSync(e, "r"), Ne.readSync(n, r, 0, 150, 0), Ne.closeSync(n);
|
|
343
360
|
} catch {
|
|
344
361
|
}
|
|
345
|
-
return
|
|
362
|
+
return Go(r.toString());
|
|
346
363
|
}
|
|
347
|
-
o(
|
|
348
|
-
|
|
364
|
+
o(Uo, "readShebang");
|
|
365
|
+
yr.exports = Uo;
|
|
349
366
|
});
|
|
350
367
|
|
|
351
368
|
// ../node_modules/cross-spawn/lib/parse.js
|
|
352
|
-
var
|
|
369
|
+
var wr = x((Tc, xr) => {
|
|
353
370
|
"use strict";
|
|
354
|
-
var
|
|
355
|
-
function
|
|
356
|
-
e.file =
|
|
357
|
-
let t = e.file &&
|
|
358
|
-
return t ? (e.args.unshift(e.file), e.command = t,
|
|
359
|
-
}
|
|
360
|
-
o(
|
|
361
|
-
function
|
|
362
|
-
if (!
|
|
371
|
+
var $o = S("path"), gr = ur(), br = fr(), Wo = hr(), Ho = process.platform === "win32", Jo = /\.(?:com|exe)$/i, Vo = /node_modules[\\/].bin[\\/][^\\/]+\.cmd$/i;
|
|
372
|
+
function qo(e) {
|
|
373
|
+
e.file = gr(e);
|
|
374
|
+
let t = e.file && Wo(e.file);
|
|
375
|
+
return t ? (e.args.unshift(e.file), e.command = t, gr(e)) : e.file;
|
|
376
|
+
}
|
|
377
|
+
o(qo, "detectShebang");
|
|
378
|
+
function zo(e) {
|
|
379
|
+
if (!Ho)
|
|
363
380
|
return e;
|
|
364
|
-
let t =
|
|
381
|
+
let t = qo(e), r = !Jo.test(t);
|
|
365
382
|
if (e.options.forceShell || r) {
|
|
366
|
-
let n =
|
|
367
|
-
e.command =
|
|
383
|
+
let n = Vo.test(t);
|
|
384
|
+
e.command = $o.normalize(e.command), e.command = br.command(e.command), e.args = e.args.map((s) => br.argument(s, n));
|
|
368
385
|
let i = [e.command].concat(e.args).join(" ");
|
|
369
386
|
e.args = ["/d", "/s", "/c", `"${i}"`], e.command = process.env.comspec || "cmd.exe", e.options.windowsVerbatimArguments = !0;
|
|
370
387
|
}
|
|
371
388
|
return e;
|
|
372
389
|
}
|
|
373
|
-
o(
|
|
374
|
-
function
|
|
390
|
+
o(zo, "parseNonShell");
|
|
391
|
+
function Yo(e, t, r) {
|
|
375
392
|
t && !Array.isArray(t) && (r = t, t = null), t = t ? t.slice(0) : [], r = Object.assign({}, r);
|
|
376
393
|
let n = {
|
|
377
394
|
command: e,
|
|
@@ -383,17 +400,17 @@ var en = p((ff, Zr) => {
|
|
|
383
400
|
args: t
|
|
384
401
|
}
|
|
385
402
|
};
|
|
386
|
-
return r.shell ? n :
|
|
403
|
+
return r.shell ? n : zo(n);
|
|
387
404
|
}
|
|
388
|
-
o(
|
|
389
|
-
|
|
405
|
+
o(Yo, "parse");
|
|
406
|
+
xr.exports = Yo;
|
|
390
407
|
});
|
|
391
408
|
|
|
392
409
|
// ../node_modules/cross-spawn/lib/enoent.js
|
|
393
|
-
var
|
|
410
|
+
var Er = x((Ic, kr) => {
|
|
394
411
|
"use strict";
|
|
395
|
-
var
|
|
396
|
-
function
|
|
412
|
+
var De = process.platform === "win32";
|
|
413
|
+
function _e(e, t) {
|
|
397
414
|
return Object.assign(new Error(`${t} ${e.command} ENOENT`), {
|
|
398
415
|
code: "ENOENT",
|
|
399
416
|
errno: "ENOENT",
|
|
@@ -402,781 +419,64 @@ var nn = p((df, rn) => {
|
|
|
402
419
|
spawnargs: e.args
|
|
403
420
|
});
|
|
404
421
|
}
|
|
405
|
-
o(
|
|
406
|
-
function
|
|
407
|
-
if (!
|
|
422
|
+
o(_e, "notFoundError");
|
|
423
|
+
function Ko(e, t) {
|
|
424
|
+
if (!De)
|
|
408
425
|
return;
|
|
409
426
|
let r = e.emit;
|
|
410
427
|
e.emit = function(n, i) {
|
|
411
428
|
if (n === "exit") {
|
|
412
|
-
let s =
|
|
429
|
+
let s = Sr(i, t, "spawn");
|
|
413
430
|
if (s)
|
|
414
431
|
return r.call(e, "error", s);
|
|
415
432
|
}
|
|
416
433
|
return r.apply(e, arguments);
|
|
417
434
|
};
|
|
418
435
|
}
|
|
419
|
-
o(
|
|
420
|
-
function
|
|
421
|
-
return
|
|
436
|
+
o(Ko, "hookChildProcess");
|
|
437
|
+
function Sr(e, t) {
|
|
438
|
+
return De && e === 1 && !t.file ? _e(t.original, "spawn") : null;
|
|
422
439
|
}
|
|
423
|
-
o(
|
|
424
|
-
function
|
|
425
|
-
return
|
|
440
|
+
o(Sr, "verifyENOENT");
|
|
441
|
+
function Xo(e, t) {
|
|
442
|
+
return De && e === 1 && !t.file ? _e(t.original, "spawnSync") : null;
|
|
426
443
|
}
|
|
427
|
-
o(
|
|
428
|
-
|
|
429
|
-
hookChildProcess:
|
|
430
|
-
verifyENOENT:
|
|
431
|
-
verifyENOENTSync:
|
|
432
|
-
notFoundError:
|
|
444
|
+
o(Xo, "verifyENOENTSync");
|
|
445
|
+
kr.exports = {
|
|
446
|
+
hookChildProcess: Ko,
|
|
447
|
+
verifyENOENT: Sr,
|
|
448
|
+
verifyENOENTSync: Xo,
|
|
449
|
+
notFoundError: _e
|
|
433
450
|
};
|
|
434
451
|
});
|
|
435
452
|
|
|
436
453
|
// ../node_modules/cross-spawn/index.js
|
|
437
|
-
var
|
|
438
|
-
"use strict";
|
|
439
|
-
var on = b("child_process"), lt = en(), ft = nn();
|
|
440
|
-
function sn(e, t, r) {
|
|
441
|
-
let n = lt(e, t, r), i = on.spawn(n.command, n.args, n.options);
|
|
442
|
-
return ft.hookChildProcess(i, n), i;
|
|
443
|
-
}
|
|
444
|
-
o(sn, "spawn");
|
|
445
|
-
function vs(e, t, r) {
|
|
446
|
-
let n = lt(e, t, r), i = on.spawnSync(n.command, n.args, n.options);
|
|
447
|
-
return i.error = i.error || ft.verifyENOENTSync(i.status, n), i;
|
|
448
|
-
}
|
|
449
|
-
o(vs, "spawnSync");
|
|
450
|
-
L.exports = sn;
|
|
451
|
-
L.exports.spawn = sn;
|
|
452
|
-
L.exports.sync = vs;
|
|
453
|
-
L.exports._parse = lt;
|
|
454
|
-
L.exports._enoent = ft;
|
|
455
|
-
});
|
|
456
|
-
|
|
457
|
-
// ../node_modules/execa/node_modules/strip-final-newline/index.js
|
|
458
|
-
var cn = p((gf, an) => {
|
|
459
|
-
"use strict";
|
|
460
|
-
an.exports = (e) => {
|
|
461
|
-
let t = typeof e == "string" ? `
|
|
462
|
-
` : 10, r = typeof e == "string" ? "\r" : 13;
|
|
463
|
-
return e[e.length - 1] === t && (e = e.slice(0, e.length - 1)), e[e.length - 1] === r && (e = e.slice(0, e.length - 1)), e;
|
|
464
|
-
};
|
|
465
|
-
});
|
|
466
|
-
|
|
467
|
-
// ../node_modules/npm-run-path/index.js
|
|
468
|
-
var fn = p((bf, K) => {
|
|
469
|
-
"use strict";
|
|
470
|
-
var J = b("path"), un = ot(), ln = /* @__PURE__ */ o((e) => {
|
|
471
|
-
e = {
|
|
472
|
-
cwd: process.cwd(),
|
|
473
|
-
path: process.env[un()],
|
|
474
|
-
execPath: process.execPath,
|
|
475
|
-
...e
|
|
476
|
-
};
|
|
477
|
-
let t, r = J.resolve(e.cwd), n = [];
|
|
478
|
-
for (; t !== r; )
|
|
479
|
-
n.push(J.join(r, "node_modules/.bin")), t = r, r = J.resolve(r, "..");
|
|
480
|
-
let i = J.resolve(e.cwd, e.execPath, "..");
|
|
481
|
-
return n.push(i), n.concat(e.path).join(J.delimiter);
|
|
482
|
-
}, "npmRunPath");
|
|
483
|
-
K.exports = ln;
|
|
484
|
-
K.exports.default = ln;
|
|
485
|
-
K.exports.env = (e) => {
|
|
486
|
-
e = {
|
|
487
|
-
env: process.env,
|
|
488
|
-
...e
|
|
489
|
-
};
|
|
490
|
-
let t = { ...e.env }, r = un({ env: t });
|
|
491
|
-
return e.path = t[r], t[r] = K.exports(e), t;
|
|
492
|
-
};
|
|
493
|
-
});
|
|
494
|
-
|
|
495
|
-
// ../node_modules/mimic-fn/index.js
|
|
496
|
-
var dn = p((Sf, dt) => {
|
|
497
|
-
"use strict";
|
|
498
|
-
var pn = /* @__PURE__ */ o((e, t) => {
|
|
499
|
-
for (let r of Reflect.ownKeys(t))
|
|
500
|
-
Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r));
|
|
501
|
-
return e;
|
|
502
|
-
}, "mimicFn");
|
|
503
|
-
dt.exports = pn;
|
|
504
|
-
dt.exports.default = pn;
|
|
505
|
-
});
|
|
506
|
-
|
|
507
|
-
// ../node_modules/onetime/index.js
|
|
508
|
-
var hn = p((vf, me) => {
|
|
509
|
-
"use strict";
|
|
510
|
-
var Ps = dn(), de = /* @__PURE__ */ new WeakMap(), mn = /* @__PURE__ */ o((e, t = {}) => {
|
|
511
|
-
if (typeof e != "function")
|
|
512
|
-
throw new TypeError("Expected a function");
|
|
513
|
-
let r, n = 0, i = e.displayName || e.name || "<anonymous>", s = /* @__PURE__ */ o(function(...a) {
|
|
514
|
-
if (de.set(s, ++n), n === 1)
|
|
515
|
-
r = e.apply(this, a), e = null;
|
|
516
|
-
else if (t.throw === !0)
|
|
517
|
-
throw new Error(`Function \`${i}\` can only be called once`);
|
|
518
|
-
return r;
|
|
519
|
-
}, "onetime");
|
|
520
|
-
return Ps(s, e), de.set(s, n), s;
|
|
521
|
-
}, "onetime");
|
|
522
|
-
me.exports = mn;
|
|
523
|
-
me.exports.default = mn;
|
|
524
|
-
me.exports.callCount = (e) => {
|
|
525
|
-
if (!de.has(e))
|
|
526
|
-
throw new Error(`The given function \`${e.name}\` is not wrapped by the \`onetime\` package`);
|
|
527
|
-
return de.get(e);
|
|
528
|
-
};
|
|
529
|
-
});
|
|
530
|
-
|
|
531
|
-
// ../node_modules/execa/node_modules/human-signals/build/src/core.js
|
|
532
|
-
var yn = p((he) => {
|
|
533
|
-
"use strict";
|
|
534
|
-
Object.defineProperty(he, "__esModule", { value: !0 });
|
|
535
|
-
he.SIGNALS = void 0;
|
|
536
|
-
var Es = [
|
|
537
|
-
{
|
|
538
|
-
name: "SIGHUP",
|
|
539
|
-
number: 1,
|
|
540
|
-
action: "terminate",
|
|
541
|
-
description: "Terminal closed",
|
|
542
|
-
standard: "posix"
|
|
543
|
-
},
|
|
544
|
-
{
|
|
545
|
-
name: "SIGINT",
|
|
546
|
-
number: 2,
|
|
547
|
-
action: "terminate",
|
|
548
|
-
description: "User interruption with CTRL-C",
|
|
549
|
-
standard: "ansi"
|
|
550
|
-
},
|
|
551
|
-
{
|
|
552
|
-
name: "SIGQUIT",
|
|
553
|
-
number: 3,
|
|
554
|
-
action: "core",
|
|
555
|
-
description: "User interruption with CTRL-\\",
|
|
556
|
-
standard: "posix"
|
|
557
|
-
},
|
|
558
|
-
{
|
|
559
|
-
name: "SIGILL",
|
|
560
|
-
number: 4,
|
|
561
|
-
action: "core",
|
|
562
|
-
description: "Invalid machine instruction",
|
|
563
|
-
standard: "ansi"
|
|
564
|
-
},
|
|
565
|
-
{
|
|
566
|
-
name: "SIGTRAP",
|
|
567
|
-
number: 5,
|
|
568
|
-
action: "core",
|
|
569
|
-
description: "Debugger breakpoint",
|
|
570
|
-
standard: "posix"
|
|
571
|
-
},
|
|
572
|
-
{
|
|
573
|
-
name: "SIGABRT",
|
|
574
|
-
number: 6,
|
|
575
|
-
action: "core",
|
|
576
|
-
description: "Aborted",
|
|
577
|
-
standard: "ansi"
|
|
578
|
-
},
|
|
579
|
-
{
|
|
580
|
-
name: "SIGIOT",
|
|
581
|
-
number: 6,
|
|
582
|
-
action: "core",
|
|
583
|
-
description: "Aborted",
|
|
584
|
-
standard: "bsd"
|
|
585
|
-
},
|
|
586
|
-
{
|
|
587
|
-
name: "SIGBUS",
|
|
588
|
-
number: 7,
|
|
589
|
-
action: "core",
|
|
590
|
-
description: "Bus error due to misaligned, non-existing address or paging error",
|
|
591
|
-
standard: "bsd"
|
|
592
|
-
},
|
|
593
|
-
{
|
|
594
|
-
name: "SIGEMT",
|
|
595
|
-
number: 7,
|
|
596
|
-
action: "terminate",
|
|
597
|
-
description: "Command should be emulated but is not implemented",
|
|
598
|
-
standard: "other"
|
|
599
|
-
},
|
|
600
|
-
{
|
|
601
|
-
name: "SIGFPE",
|
|
602
|
-
number: 8,
|
|
603
|
-
action: "core",
|
|
604
|
-
description: "Floating point arithmetic error",
|
|
605
|
-
standard: "ansi"
|
|
606
|
-
},
|
|
607
|
-
{
|
|
608
|
-
name: "SIGKILL",
|
|
609
|
-
number: 9,
|
|
610
|
-
action: "terminate",
|
|
611
|
-
description: "Forced termination",
|
|
612
|
-
standard: "posix",
|
|
613
|
-
forced: !0
|
|
614
|
-
},
|
|
615
|
-
{
|
|
616
|
-
name: "SIGUSR1",
|
|
617
|
-
number: 10,
|
|
618
|
-
action: "terminate",
|
|
619
|
-
description: "Application-specific signal",
|
|
620
|
-
standard: "posix"
|
|
621
|
-
},
|
|
622
|
-
{
|
|
623
|
-
name: "SIGSEGV",
|
|
624
|
-
number: 11,
|
|
625
|
-
action: "core",
|
|
626
|
-
description: "Segmentation fault",
|
|
627
|
-
standard: "ansi"
|
|
628
|
-
},
|
|
629
|
-
{
|
|
630
|
-
name: "SIGUSR2",
|
|
631
|
-
number: 12,
|
|
632
|
-
action: "terminate",
|
|
633
|
-
description: "Application-specific signal",
|
|
634
|
-
standard: "posix"
|
|
635
|
-
},
|
|
636
|
-
{
|
|
637
|
-
name: "SIGPIPE",
|
|
638
|
-
number: 13,
|
|
639
|
-
action: "terminate",
|
|
640
|
-
description: "Broken pipe or socket",
|
|
641
|
-
standard: "posix"
|
|
642
|
-
},
|
|
643
|
-
{
|
|
644
|
-
name: "SIGALRM",
|
|
645
|
-
number: 14,
|
|
646
|
-
action: "terminate",
|
|
647
|
-
description: "Timeout or timer",
|
|
648
|
-
standard: "posix"
|
|
649
|
-
},
|
|
650
|
-
{
|
|
651
|
-
name: "SIGTERM",
|
|
652
|
-
number: 15,
|
|
653
|
-
action: "terminate",
|
|
654
|
-
description: "Termination",
|
|
655
|
-
standard: "ansi"
|
|
656
|
-
},
|
|
657
|
-
{
|
|
658
|
-
name: "SIGSTKFLT",
|
|
659
|
-
number: 16,
|
|
660
|
-
action: "terminate",
|
|
661
|
-
description: "Stack is empty or overflowed",
|
|
662
|
-
standard: "other"
|
|
663
|
-
},
|
|
664
|
-
{
|
|
665
|
-
name: "SIGCHLD",
|
|
666
|
-
number: 17,
|
|
667
|
-
action: "ignore",
|
|
668
|
-
description: "Child process terminated, paused or unpaused",
|
|
669
|
-
standard: "posix"
|
|
670
|
-
},
|
|
671
|
-
{
|
|
672
|
-
name: "SIGCLD",
|
|
673
|
-
number: 17,
|
|
674
|
-
action: "ignore",
|
|
675
|
-
description: "Child process terminated, paused or unpaused",
|
|
676
|
-
standard: "other"
|
|
677
|
-
},
|
|
678
|
-
{
|
|
679
|
-
name: "SIGCONT",
|
|
680
|
-
number: 18,
|
|
681
|
-
action: "unpause",
|
|
682
|
-
description: "Unpaused",
|
|
683
|
-
standard: "posix",
|
|
684
|
-
forced: !0
|
|
685
|
-
},
|
|
686
|
-
{
|
|
687
|
-
name: "SIGSTOP",
|
|
688
|
-
number: 19,
|
|
689
|
-
action: "pause",
|
|
690
|
-
description: "Paused",
|
|
691
|
-
standard: "posix",
|
|
692
|
-
forced: !0
|
|
693
|
-
},
|
|
694
|
-
{
|
|
695
|
-
name: "SIGTSTP",
|
|
696
|
-
number: 20,
|
|
697
|
-
action: "pause",
|
|
698
|
-
description: 'Paused using CTRL-Z or "suspend"',
|
|
699
|
-
standard: "posix"
|
|
700
|
-
},
|
|
701
|
-
{
|
|
702
|
-
name: "SIGTTIN",
|
|
703
|
-
number: 21,
|
|
704
|
-
action: "pause",
|
|
705
|
-
description: "Background process cannot read terminal input",
|
|
706
|
-
standard: "posix"
|
|
707
|
-
},
|
|
708
|
-
{
|
|
709
|
-
name: "SIGBREAK",
|
|
710
|
-
number: 21,
|
|
711
|
-
action: "terminate",
|
|
712
|
-
description: "User interruption with CTRL-BREAK",
|
|
713
|
-
standard: "other"
|
|
714
|
-
},
|
|
715
|
-
{
|
|
716
|
-
name: "SIGTTOU",
|
|
717
|
-
number: 22,
|
|
718
|
-
action: "pause",
|
|
719
|
-
description: "Background process cannot write to terminal output",
|
|
720
|
-
standard: "posix"
|
|
721
|
-
},
|
|
722
|
-
{
|
|
723
|
-
name: "SIGURG",
|
|
724
|
-
number: 23,
|
|
725
|
-
action: "ignore",
|
|
726
|
-
description: "Socket received out-of-band data",
|
|
727
|
-
standard: "bsd"
|
|
728
|
-
},
|
|
729
|
-
{
|
|
730
|
-
name: "SIGXCPU",
|
|
731
|
-
number: 24,
|
|
732
|
-
action: "core",
|
|
733
|
-
description: "Process timed out",
|
|
734
|
-
standard: "bsd"
|
|
735
|
-
},
|
|
736
|
-
{
|
|
737
|
-
name: "SIGXFSZ",
|
|
738
|
-
number: 25,
|
|
739
|
-
action: "core",
|
|
740
|
-
description: "File too big",
|
|
741
|
-
standard: "bsd"
|
|
742
|
-
},
|
|
743
|
-
{
|
|
744
|
-
name: "SIGVTALRM",
|
|
745
|
-
number: 26,
|
|
746
|
-
action: "terminate",
|
|
747
|
-
description: "Timeout or timer",
|
|
748
|
-
standard: "bsd"
|
|
749
|
-
},
|
|
750
|
-
{
|
|
751
|
-
name: "SIGPROF",
|
|
752
|
-
number: 27,
|
|
753
|
-
action: "terminate",
|
|
754
|
-
description: "Timeout or timer",
|
|
755
|
-
standard: "bsd"
|
|
756
|
-
},
|
|
757
|
-
{
|
|
758
|
-
name: "SIGWINCH",
|
|
759
|
-
number: 28,
|
|
760
|
-
action: "ignore",
|
|
761
|
-
description: "Terminal window size changed",
|
|
762
|
-
standard: "bsd"
|
|
763
|
-
},
|
|
764
|
-
{
|
|
765
|
-
name: "SIGIO",
|
|
766
|
-
number: 29,
|
|
767
|
-
action: "terminate",
|
|
768
|
-
description: "I/O is available",
|
|
769
|
-
standard: "other"
|
|
770
|
-
},
|
|
771
|
-
{
|
|
772
|
-
name: "SIGPOLL",
|
|
773
|
-
number: 29,
|
|
774
|
-
action: "terminate",
|
|
775
|
-
description: "Watched event",
|
|
776
|
-
standard: "other"
|
|
777
|
-
},
|
|
778
|
-
{
|
|
779
|
-
name: "SIGINFO",
|
|
780
|
-
number: 29,
|
|
781
|
-
action: "ignore",
|
|
782
|
-
description: "Request for process information",
|
|
783
|
-
standard: "other"
|
|
784
|
-
},
|
|
785
|
-
{
|
|
786
|
-
name: "SIGPWR",
|
|
787
|
-
number: 30,
|
|
788
|
-
action: "terminate",
|
|
789
|
-
description: "Device running out of power",
|
|
790
|
-
standard: "systemv"
|
|
791
|
-
},
|
|
792
|
-
{
|
|
793
|
-
name: "SIGSYS",
|
|
794
|
-
number: 31,
|
|
795
|
-
action: "core",
|
|
796
|
-
description: "Invalid system call",
|
|
797
|
-
standard: "other"
|
|
798
|
-
},
|
|
799
|
-
{
|
|
800
|
-
name: "SIGUNUSED",
|
|
801
|
-
number: 31,
|
|
802
|
-
action: "terminate",
|
|
803
|
-
description: "Invalid system call",
|
|
804
|
-
standard: "other"
|
|
805
|
-
}
|
|
806
|
-
];
|
|
807
|
-
he.SIGNALS = Es;
|
|
808
|
-
});
|
|
809
|
-
|
|
810
|
-
// ../node_modules/execa/node_modules/human-signals/build/src/realtime.js
|
|
811
|
-
var mt = p((F) => {
|
|
812
|
-
"use strict";
|
|
813
|
-
Object.defineProperty(F, "__esModule", { value: !0 });
|
|
814
|
-
F.SIGRTMAX = F.getRealtimeSignals = void 0;
|
|
815
|
-
var Ts = /* @__PURE__ */ o(function() {
|
|
816
|
-
let e = bn - gn + 1;
|
|
817
|
-
return Array.from({ length: e }, ks);
|
|
818
|
-
}, "getRealtimeSignals");
|
|
819
|
-
F.getRealtimeSignals = Ts;
|
|
820
|
-
var ks = /* @__PURE__ */ o(function(e, t) {
|
|
821
|
-
return {
|
|
822
|
-
name: `SIGRT${t + 1}`,
|
|
823
|
-
number: gn + t,
|
|
824
|
-
action: "terminate",
|
|
825
|
-
description: "Application-specific signal (realtime)",
|
|
826
|
-
standard: "posix"
|
|
827
|
-
};
|
|
828
|
-
}, "getRealtimeSignal"), gn = 34, bn = 64;
|
|
829
|
-
F.SIGRTMAX = bn;
|
|
830
|
-
});
|
|
831
|
-
|
|
832
|
-
// ../node_modules/execa/node_modules/human-signals/build/src/signals.js
|
|
833
|
-
var xn = p((ye) => {
|
|
834
|
-
"use strict";
|
|
835
|
-
Object.defineProperty(ye, "__esModule", { value: !0 });
|
|
836
|
-
ye.getSignals = void 0;
|
|
837
|
-
var Is = b("os"), Cs = yn(), Os = mt(), As = /* @__PURE__ */ o(function() {
|
|
838
|
-
let e = (0, Os.getRealtimeSignals)();
|
|
839
|
-
return [...Cs.SIGNALS, ...e].map(Rs);
|
|
840
|
-
}, "getSignals");
|
|
841
|
-
ye.getSignals = As;
|
|
842
|
-
var Rs = /* @__PURE__ */ o(function({
|
|
843
|
-
name: e,
|
|
844
|
-
number: t,
|
|
845
|
-
description: r,
|
|
846
|
-
action: n,
|
|
847
|
-
forced: i = !1,
|
|
848
|
-
standard: s
|
|
849
|
-
}) {
|
|
850
|
-
let {
|
|
851
|
-
signals: { [e]: a }
|
|
852
|
-
} = Is.constants, c = a !== void 0;
|
|
853
|
-
return { name: e, number: c ? a : t, description: r, supported: c, action: n, forced: i, standard: s };
|
|
854
|
-
}, "normalizeSignal");
|
|
855
|
-
});
|
|
856
|
-
|
|
857
|
-
// ../node_modules/execa/node_modules/human-signals/build/src/main.js
|
|
858
|
-
var wn = p((U) => {
|
|
859
|
-
"use strict";
|
|
860
|
-
Object.defineProperty(U, "__esModule", { value: !0 });
|
|
861
|
-
U.signalsByNumber = U.signalsByName = void 0;
|
|
862
|
-
var _s = b("os"), Sn = xn(), Gs = mt(), js = /* @__PURE__ */ o(function() {
|
|
863
|
-
return (0, Sn.getSignals)().reduce(Ns, {});
|
|
864
|
-
}, "getSignalsByName"), Ns = /* @__PURE__ */ o(function(e, { name: t, number: r, description: n, supported: i, action: s, forced: a, standard: c }) {
|
|
865
|
-
return {
|
|
866
|
-
...e,
|
|
867
|
-
[t]: { name: t, number: r, description: n, supported: i, action: s, forced: a, standard: c }
|
|
868
|
-
};
|
|
869
|
-
}, "getSignalByName"), Bs = js();
|
|
870
|
-
U.signalsByName = Bs;
|
|
871
|
-
var Ds = /* @__PURE__ */ o(function() {
|
|
872
|
-
let e = (0, Sn.getSignals)(), t = Gs.SIGRTMAX + 1, r = Array.from({ length: t }, (n, i) => Ms(i, e));
|
|
873
|
-
return Object.assign({}, ...r);
|
|
874
|
-
}, "getSignalsByNumber"), Ms = /* @__PURE__ */ o(function(e, t) {
|
|
875
|
-
let r = Ls(e, t);
|
|
876
|
-
if (r === void 0)
|
|
877
|
-
return {};
|
|
878
|
-
let { name: n, description: i, supported: s, action: a, forced: c, standard: u } = r;
|
|
879
|
-
return {
|
|
880
|
-
[e]: {
|
|
881
|
-
name: n,
|
|
882
|
-
number: e,
|
|
883
|
-
description: i,
|
|
884
|
-
supported: s,
|
|
885
|
-
action: a,
|
|
886
|
-
forced: c,
|
|
887
|
-
standard: u
|
|
888
|
-
}
|
|
889
|
-
};
|
|
890
|
-
}, "getSignalByNumber"), Ls = /* @__PURE__ */ o(function(e, t) {
|
|
891
|
-
let r = t.find(({ name: n }) => _s.constants.signals[n] === e);
|
|
892
|
-
return r !== void 0 ? r : t.find((n) => n.number === e);
|
|
893
|
-
}, "findSignalByNumber"), Fs = Ds();
|
|
894
|
-
U.signalsByNumber = Fs;
|
|
895
|
-
});
|
|
896
|
-
|
|
897
|
-
// ../node_modules/execa/lib/error.js
|
|
898
|
-
var Pn = p((Rf, vn) => {
|
|
899
|
-
"use strict";
|
|
900
|
-
var { signalsByName: Us } = wn(), $s = /* @__PURE__ */ o(({ timedOut: e, timeout: t, errorCode: r, signal: n, signalDescription: i, exitCode: s,
|
|
901
|
-
isCanceled: a }) => e ? `timed out after ${t} milliseconds` : a ? "was canceled" : r !== void 0 ? `failed with ${r}` : n !== void 0 ? `was\
|
|
902
|
-
killed with ${n} (${i})` : s !== void 0 ? `failed with exit code ${s}` : "failed", "getErrorPrefix"), qs = /* @__PURE__ */ o(({
|
|
903
|
-
stdout: e,
|
|
904
|
-
stderr: t,
|
|
905
|
-
all: r,
|
|
906
|
-
error: n,
|
|
907
|
-
signal: i,
|
|
908
|
-
exitCode: s,
|
|
909
|
-
command: a,
|
|
910
|
-
escapedCommand: c,
|
|
911
|
-
timedOut: u,
|
|
912
|
-
isCanceled: l,
|
|
913
|
-
killed: f,
|
|
914
|
-
parsed: { options: { timeout: x } }
|
|
915
|
-
}) => {
|
|
916
|
-
s = s === null ? void 0 : s, i = i === null ? void 0 : i;
|
|
917
|
-
let g = i === void 0 ? void 0 : Us[i].description, m = n && n.code, h = `Command ${$s({ timedOut: u, timeout: x, errorCode: m, signal: i,
|
|
918
|
-
signalDescription: g, exitCode: s, isCanceled: l })}: ${a}`, S = Object.prototype.toString.call(n) === "[object Error]", T = S ? `${h}
|
|
919
|
-
${n.message}` : h, E = [T, t, e].filter(Boolean).join(`
|
|
920
|
-
`);
|
|
921
|
-
return S ? (n.originalMessage = n.message, n.message = E) : n = new Error(E), n.shortMessage = T, n.command = a, n.escapedCommand = c, n.
|
|
922
|
-
exitCode = s, n.signal = i, n.signalDescription = g, n.stdout = e, n.stderr = t, r !== void 0 && (n.all = r), "bufferedData" in n && delete n.
|
|
923
|
-
bufferedData, n.failed = !0, n.timedOut = !!u, n.isCanceled = l, n.killed = f && !u, n;
|
|
924
|
-
}, "makeError");
|
|
925
|
-
vn.exports = qs;
|
|
926
|
-
});
|
|
927
|
-
|
|
928
|
-
// ../node_modules/execa/lib/stdio.js
|
|
929
|
-
var Tn = p((Gf, ht) => {
|
|
930
|
-
"use strict";
|
|
931
|
-
var ge = ["stdin", "stdout", "stderr"], Ws = /* @__PURE__ */ o((e) => ge.some((t) => e[t] !== void 0), "hasAlias"), En = /* @__PURE__ */ o(
|
|
932
|
-
(e) => {
|
|
933
|
-
if (!e)
|
|
934
|
-
return;
|
|
935
|
-
let { stdio: t } = e;
|
|
936
|
-
if (t === void 0)
|
|
937
|
-
return ge.map((n) => e[n]);
|
|
938
|
-
if (Ws(e))
|
|
939
|
-
throw new Error(`It's not possible to provide \`stdio\` in combination with one of ${ge.map((n) => `\`${n}\``).join(", ")}`);
|
|
940
|
-
if (typeof t == "string")
|
|
941
|
-
return t;
|
|
942
|
-
if (!Array.isArray(t))
|
|
943
|
-
throw new TypeError(`Expected \`stdio\` to be of type \`string\` or \`Array\`, got \`${typeof t}\``);
|
|
944
|
-
let r = Math.max(t.length, ge.length);
|
|
945
|
-
return Array.from({ length: r }, (n, i) => t[i]);
|
|
946
|
-
}, "normalizeStdio");
|
|
947
|
-
ht.exports = En;
|
|
948
|
-
ht.exports.node = (e) => {
|
|
949
|
-
let t = En(e);
|
|
950
|
-
return t === "ipc" ? "ipc" : t === void 0 || typeof t == "string" ? [t, t, t, "ipc"] : t.includes("ipc") ? t : [...t, "ipc"];
|
|
951
|
-
};
|
|
952
|
-
});
|
|
953
|
-
|
|
954
|
-
// ../node_modules/signal-exit/signals.js
|
|
955
|
-
var kn = p((Nf, be) => {
|
|
956
|
-
be.exports = [
|
|
957
|
-
"SIGABRT",
|
|
958
|
-
"SIGALRM",
|
|
959
|
-
"SIGHUP",
|
|
960
|
-
"SIGINT",
|
|
961
|
-
"SIGTERM"
|
|
962
|
-
];
|
|
963
|
-
process.platform !== "win32" && be.exports.push(
|
|
964
|
-
"SIGVTALRM",
|
|
965
|
-
"SIGXCPU",
|
|
966
|
-
"SIGXFSZ",
|
|
967
|
-
"SIGUSR2",
|
|
968
|
-
"SIGTRAP",
|
|
969
|
-
"SIGSYS",
|
|
970
|
-
"SIGQUIT",
|
|
971
|
-
"SIGIOT"
|
|
972
|
-
// should detect profiler and enable/disable accordingly.
|
|
973
|
-
// see #21
|
|
974
|
-
// 'SIGPROF'
|
|
975
|
-
);
|
|
976
|
-
process.platform === "linux" && be.exports.push(
|
|
977
|
-
"SIGIO",
|
|
978
|
-
"SIGPOLL",
|
|
979
|
-
"SIGPWR",
|
|
980
|
-
"SIGSTKFLT",
|
|
981
|
-
"SIGUNUSED"
|
|
982
|
-
);
|
|
983
|
-
});
|
|
984
|
-
|
|
985
|
-
// ../node_modules/signal-exit/index.js
|
|
986
|
-
var Rn = p((Bf, W) => {
|
|
987
|
-
var w = global.process, _ = /* @__PURE__ */ o(function(e) {
|
|
988
|
-
return e && typeof e == "object" && typeof e.removeListener == "function" && typeof e.emit == "function" && typeof e.reallyExit == "func\
|
|
989
|
-
tion" && typeof e.listeners == "function" && typeof e.kill == "function" && typeof e.pid == "number" && typeof e.on == "function";
|
|
990
|
-
}, "processOk");
|
|
991
|
-
_(w) ? (In = b("assert"), $ = kn(), Cn = /^win/i.test(w.platform), Y = b("events"), typeof Y != "function" && (Y = Y.EventEmitter), w.__signal_exit_emitter__ ?
|
|
992
|
-
P = w.__signal_exit_emitter__ : (P = w.__signal_exit_emitter__ = new Y(), P.count = 0, P.emitted = {}), P.infinite || (P.setMaxListeners(1 / 0),
|
|
993
|
-
P.infinite = !0), W.exports = function(e, t) {
|
|
994
|
-
if (!_(global.process))
|
|
995
|
-
return function() {
|
|
996
|
-
};
|
|
997
|
-
In.equal(typeof e, "function", "a callback must be provided for exit handler"), q === !1 && yt();
|
|
998
|
-
var r = "exit";
|
|
999
|
-
t && t.alwaysLast && (r = "afterexit");
|
|
1000
|
-
var n = /* @__PURE__ */ o(function() {
|
|
1001
|
-
P.removeListener(r, e), P.listeners("exit").length === 0 && P.listeners("afterexit").length === 0 && xe();
|
|
1002
|
-
}, "remove");
|
|
1003
|
-
return P.on(r, e), n;
|
|
1004
|
-
}, xe = /* @__PURE__ */ o(function() {
|
|
1005
|
-
!q || !_(global.process) || (q = !1, $.forEach(function(t) {
|
|
1006
|
-
try {
|
|
1007
|
-
w.removeListener(t, Se[t]);
|
|
1008
|
-
} catch {
|
|
1009
|
-
}
|
|
1010
|
-
}), w.emit = we, w.reallyExit = gt, P.count -= 1);
|
|
1011
|
-
}, "unload"), W.exports.unload = xe, G = /* @__PURE__ */ o(function(t, r, n) {
|
|
1012
|
-
P.emitted[t] || (P.emitted[t] = !0, P.emit(t, r, n));
|
|
1013
|
-
}, "emit"), Se = {}, $.forEach(function(e) {
|
|
1014
|
-
Se[e] = /* @__PURE__ */ o(function() {
|
|
1015
|
-
if (_(global.process)) {
|
|
1016
|
-
var r = w.listeners(e);
|
|
1017
|
-
r.length === P.count && (xe(), G("exit", null, e), G("afterexit", null, e), Cn && e === "SIGHUP" && (e = "SIGINT"), w.kill(w.pid, e));
|
|
1018
|
-
}
|
|
1019
|
-
}, "listener");
|
|
1020
|
-
}), W.exports.signals = function() {
|
|
1021
|
-
return $;
|
|
1022
|
-
}, q = !1, yt = /* @__PURE__ */ o(function() {
|
|
1023
|
-
q || !_(global.process) || (q = !0, P.count += 1, $ = $.filter(function(t) {
|
|
1024
|
-
try {
|
|
1025
|
-
return w.on(t, Se[t]), !0;
|
|
1026
|
-
} catch {
|
|
1027
|
-
return !1;
|
|
1028
|
-
}
|
|
1029
|
-
}), w.emit = An, w.reallyExit = On);
|
|
1030
|
-
}, "load"), W.exports.load = yt, gt = w.reallyExit, On = /* @__PURE__ */ o(function(t) {
|
|
1031
|
-
_(global.process) && (w.exitCode = t || /* istanbul ignore next */
|
|
1032
|
-
0, G("exit", w.exitCode, null), G("afterexit", w.exitCode, null), gt.call(w, w.exitCode));
|
|
1033
|
-
}, "processReallyExit"), we = w.emit, An = /* @__PURE__ */ o(function(t, r) {
|
|
1034
|
-
if (t === "exit" && _(global.process)) {
|
|
1035
|
-
r !== void 0 && (w.exitCode = r);
|
|
1036
|
-
var n = we.apply(this, arguments);
|
|
1037
|
-
return G("exit", w.exitCode, null), G("afterexit", w.exitCode, null), n;
|
|
1038
|
-
} else
|
|
1039
|
-
return we.apply(this, arguments);
|
|
1040
|
-
}, "processEmit")) : W.exports = function() {
|
|
1041
|
-
return function() {
|
|
1042
|
-
};
|
|
1043
|
-
};
|
|
1044
|
-
var In, $, Cn, Y, P, xe, G, Se, q, yt, gt, On, we, An;
|
|
1045
|
-
});
|
|
1046
|
-
|
|
1047
|
-
// ../node_modules/execa/lib/kill.js
|
|
1048
|
-
var Gn = p((Mf, _n) => {
|
|
1049
|
-
"use strict";
|
|
1050
|
-
var Hs = b("os"), Vs = Rn(), zs = 1e3 * 5, Js = /* @__PURE__ */ o((e, t = "SIGTERM", r = {}) => {
|
|
1051
|
-
let n = e(t);
|
|
1052
|
-
return Ks(e, t, r, n), n;
|
|
1053
|
-
}, "spawnedKill"), Ks = /* @__PURE__ */ o((e, t, r, n) => {
|
|
1054
|
-
if (!Ys(t, r, n))
|
|
1055
|
-
return;
|
|
1056
|
-
let i = Qs(r), s = setTimeout(() => {
|
|
1057
|
-
e("SIGKILL");
|
|
1058
|
-
}, i);
|
|
1059
|
-
s.unref && s.unref();
|
|
1060
|
-
}, "setKillTimeout"), Ys = /* @__PURE__ */ o((e, { forceKillAfterTimeout: t }, r) => Xs(e) && t !== !1 && r, "shouldForceKill"), Xs = /* @__PURE__ */ o(
|
|
1061
|
-
(e) => e === Hs.constants.signals.SIGTERM || typeof e == "string" && e.toUpperCase() === "SIGTERM", "isSigterm"), Qs = /* @__PURE__ */ o(({
|
|
1062
|
-
forceKillAfterTimeout: e = !0 }) => {
|
|
1063
|
-
if (e === !0)
|
|
1064
|
-
return zs;
|
|
1065
|
-
if (!Number.isFinite(e) || e < 0)
|
|
1066
|
-
throw new TypeError(`Expected the \`forceKillAfterTimeout\` option to be a non-negative integer, got \`${e}\` (${typeof e})`);
|
|
1067
|
-
return e;
|
|
1068
|
-
}, "getForceKillAfterTimeout"), Zs = /* @__PURE__ */ o((e, t) => {
|
|
1069
|
-
e.kill() && (t.isCanceled = !0);
|
|
1070
|
-
}, "spawnedCancel"), ea = /* @__PURE__ */ o((e, t, r) => {
|
|
1071
|
-
e.kill(t), r(Object.assign(new Error("Timed out"), { timedOut: !0, signal: t }));
|
|
1072
|
-
}, "timeoutKill"), ta = /* @__PURE__ */ o((e, { timeout: t, killSignal: r = "SIGTERM" }, n) => {
|
|
1073
|
-
if (t === 0 || t === void 0)
|
|
1074
|
-
return n;
|
|
1075
|
-
let i, s = new Promise((c, u) => {
|
|
1076
|
-
i = setTimeout(() => {
|
|
1077
|
-
ea(e, r, u);
|
|
1078
|
-
}, t);
|
|
1079
|
-
}), a = n.finally(() => {
|
|
1080
|
-
clearTimeout(i);
|
|
1081
|
-
});
|
|
1082
|
-
return Promise.race([s, a]);
|
|
1083
|
-
}, "setupTimeout"), ra = /* @__PURE__ */ o(({ timeout: e }) => {
|
|
1084
|
-
if (e !== void 0 && (!Number.isFinite(e) || e < 0))
|
|
1085
|
-
throw new TypeError(`Expected the \`timeout\` option to be a non-negative integer, got \`${e}\` (${typeof e})`);
|
|
1086
|
-
}, "validateTimeout"), na = /* @__PURE__ */ o(async (e, { cleanup: t, detached: r }, n) => {
|
|
1087
|
-
if (!t || r)
|
|
1088
|
-
return n;
|
|
1089
|
-
let i = Vs(() => {
|
|
1090
|
-
e.kill();
|
|
1091
|
-
});
|
|
1092
|
-
return n.finally(() => {
|
|
1093
|
-
i();
|
|
1094
|
-
});
|
|
1095
|
-
}, "setExitHandler");
|
|
1096
|
-
_n.exports = {
|
|
1097
|
-
spawnedKill: Js,
|
|
1098
|
-
spawnedCancel: Zs,
|
|
1099
|
-
setupTimeout: ta,
|
|
1100
|
-
validateTimeout: ra,
|
|
1101
|
-
setExitHandler: na
|
|
1102
|
-
};
|
|
1103
|
-
});
|
|
1104
|
-
|
|
1105
|
-
// ../node_modules/is-stream/index.js
|
|
1106
|
-
var Nn = p((Ff, jn) => {
|
|
1107
|
-
"use strict";
|
|
1108
|
-
var k = /* @__PURE__ */ o((e) => e !== null && typeof e == "object" && typeof e.pipe == "function", "isStream");
|
|
1109
|
-
k.writable = (e) => k(e) && e.writable !== !1 && typeof e._write == "function" && typeof e._writableState == "object";
|
|
1110
|
-
k.readable = (e) => k(e) && e.readable !== !1 && typeof e._read == "function" && typeof e._readableState == "object";
|
|
1111
|
-
k.duplex = (e) => k.writable(e) && k.readable(e);
|
|
1112
|
-
k.transform = (e) => k.duplex(e) && typeof e._transform == "function";
|
|
1113
|
-
jn.exports = k;
|
|
1114
|
-
});
|
|
1115
|
-
|
|
1116
|
-
// ../node_modules/get-stream/buffer-stream.js
|
|
1117
|
-
var Dn = p(($f, Bn) => {
|
|
1118
|
-
"use strict";
|
|
1119
|
-
var { PassThrough: oa } = b("stream");
|
|
1120
|
-
Bn.exports = (e) => {
|
|
1121
|
-
e = { ...e };
|
|
1122
|
-
let { array: t } = e, { encoding: r } = e, n = r === "buffer", i = !1;
|
|
1123
|
-
t ? i = !(r || n) : r = r || "utf8", n && (r = null);
|
|
1124
|
-
let s = new oa({ objectMode: i });
|
|
1125
|
-
r && s.setEncoding(r);
|
|
1126
|
-
let a = 0, c = [];
|
|
1127
|
-
return s.on("data", (u) => {
|
|
1128
|
-
c.push(u), i ? a = c.length : a += u.length;
|
|
1129
|
-
}), s.getBufferedValue = () => t ? c : n ? Buffer.concat(c, a) : c.join(""), s.getBufferedLength = () => a, s;
|
|
1130
|
-
};
|
|
1131
|
-
});
|
|
1132
|
-
|
|
1133
|
-
// ../node_modules/get-stream/index.js
|
|
1134
|
-
var Mn = p((qf, X) => {
|
|
454
|
+
var Tr = x((Oc, R) => {
|
|
1135
455
|
"use strict";
|
|
1136
|
-
var
|
|
1137
|
-
|
|
1138
|
-
|
|
1139
|
-
|
|
1140
|
-
|
|
1141
|
-
|
|
1142
|
-
|
|
1143
|
-
|
|
1144
|
-
|
|
1145
|
-
|
|
1146
|
-
|
|
1147
|
-
|
|
1148
|
-
|
|
1149
|
-
|
|
1150
|
-
|
|
1151
|
-
|
|
1152
|
-
return await new Promise((i, s) => {
|
|
1153
|
-
let a = /* @__PURE__ */ o((c) => {
|
|
1154
|
-
c && n.getBufferedLength() <= ia.MAX_LENGTH && (c.bufferedData = n.getBufferedValue()), s(c);
|
|
1155
|
-
}, "rejectPromise");
|
|
1156
|
-
(async () => {
|
|
1157
|
-
try {
|
|
1158
|
-
await ua(e, n), i();
|
|
1159
|
-
} catch (c) {
|
|
1160
|
-
a(c);
|
|
1161
|
-
}
|
|
1162
|
-
})(), n.on("data", () => {
|
|
1163
|
-
n.getBufferedLength() > r && a(new ve());
|
|
1164
|
-
});
|
|
1165
|
-
}), n.getBufferedValue();
|
|
1166
|
-
}
|
|
1167
|
-
o(bt, "getStream");
|
|
1168
|
-
X.exports = bt;
|
|
1169
|
-
X.exports.buffer = (e, t) => bt(e, { ...t, encoding: "buffer" });
|
|
1170
|
-
X.exports.array = (e, t) => bt(e, { ...t, array: !0 });
|
|
1171
|
-
X.exports.MaxBufferError = ve;
|
|
456
|
+
var Pr = S("child_process"), Me = wr(), Le = Er();
|
|
457
|
+
function vr(e, t, r) {
|
|
458
|
+
let n = Me(e, t, r), i = Pr.spawn(n.command, n.args, n.options);
|
|
459
|
+
return Le.hookChildProcess(i, n), i;
|
|
460
|
+
}
|
|
461
|
+
o(vr, "spawn");
|
|
462
|
+
function Qo(e, t, r) {
|
|
463
|
+
let n = Me(e, t, r), i = Pr.spawnSync(n.command, n.args, n.options);
|
|
464
|
+
return i.error = i.error || Le.verifyENOENTSync(i.status, n), i;
|
|
465
|
+
}
|
|
466
|
+
o(Qo, "spawnSync");
|
|
467
|
+
R.exports = vr;
|
|
468
|
+
R.exports.spawn = vr;
|
|
469
|
+
R.exports.sync = Qo;
|
|
470
|
+
R.exports._parse = Me;
|
|
471
|
+
R.exports._enoent = Le;
|
|
1172
472
|
});
|
|
1173
473
|
|
|
1174
474
|
// ../node_modules/merge-stream/index.js
|
|
1175
|
-
var
|
|
475
|
+
var Qr = x((rf, Xr) => {
|
|
1176
476
|
"use strict";
|
|
1177
|
-
var { PassThrough:
|
|
1178
|
-
|
|
1179
|
-
var e = [], t = new
|
|
477
|
+
var { PassThrough: Yi } = S("stream");
|
|
478
|
+
Xr.exports = function() {
|
|
479
|
+
var e = [], t = new Yi({ objectMode: !0 });
|
|
1180
480
|
return t.setMaxListeners(0), t.add = r, t.isEmpty = n, t.on("unpipe", i), Array.prototype.slice.call(arguments).forEach(r), t;
|
|
1181
481
|
function r(s) {
|
|
1182
482
|
return Array.isArray(s) ? (s.forEach(r), this) : (e.push(s), s.once("end", i.bind(null, s)), s.once("error", t.emit.bind(t, "error")),
|
|
@@ -1196,383 +496,24 @@ var xt = p((Hf, Ln) => {
|
|
|
1196
496
|
};
|
|
1197
497
|
});
|
|
1198
498
|
|
|
1199
|
-
// ../node_modules/execa/lib/stream.js
|
|
1200
|
-
var qn = p((zf, $n) => {
|
|
1201
|
-
"use strict";
|
|
1202
|
-
var Un = Nn(), Fn = Mn(), fa = xt(), pa = /* @__PURE__ */ o((e, t) => {
|
|
1203
|
-
t === void 0 || e.stdin === void 0 || (Un(t) ? t.pipe(e.stdin) : e.stdin.end(t));
|
|
1204
|
-
}, "handleInput"), da = /* @__PURE__ */ o((e, { all: t }) => {
|
|
1205
|
-
if (!t || !e.stdout && !e.stderr)
|
|
1206
|
-
return;
|
|
1207
|
-
let r = fa();
|
|
1208
|
-
return e.stdout && r.add(e.stdout), e.stderr && r.add(e.stderr), r;
|
|
1209
|
-
}, "makeAllStream"), St = /* @__PURE__ */ o(async (e, t) => {
|
|
1210
|
-
if (e) {
|
|
1211
|
-
e.destroy();
|
|
1212
|
-
try {
|
|
1213
|
-
return await t;
|
|
1214
|
-
} catch (r) {
|
|
1215
|
-
return r.bufferedData;
|
|
1216
|
-
}
|
|
1217
|
-
}
|
|
1218
|
-
}, "getBufferedData"), wt = /* @__PURE__ */ o((e, { encoding: t, buffer: r, maxBuffer: n }) => {
|
|
1219
|
-
if (!(!e || !r))
|
|
1220
|
-
return t ? Fn(e, { encoding: t, maxBuffer: n }) : Fn.buffer(e, { maxBuffer: n });
|
|
1221
|
-
}, "getStreamPromise"), ma = /* @__PURE__ */ o(async ({ stdout: e, stderr: t, all: r }, { encoding: n, buffer: i, maxBuffer: s }, a) => {
|
|
1222
|
-
let c = wt(e, { encoding: n, buffer: i, maxBuffer: s }), u = wt(t, { encoding: n, buffer: i, maxBuffer: s }), l = wt(r, { encoding: n, buffer: i,
|
|
1223
|
-
maxBuffer: s * 2 });
|
|
1224
|
-
try {
|
|
1225
|
-
return await Promise.all([a, c, u, l]);
|
|
1226
|
-
} catch (f) {
|
|
1227
|
-
return Promise.all([
|
|
1228
|
-
{ error: f, signal: f.signal, timedOut: f.timedOut },
|
|
1229
|
-
St(e, c),
|
|
1230
|
-
St(t, u),
|
|
1231
|
-
St(r, l)
|
|
1232
|
-
]);
|
|
1233
|
-
}
|
|
1234
|
-
}, "getSpawnedResult"), ha = /* @__PURE__ */ o(({ input: e }) => {
|
|
1235
|
-
if (Un(e))
|
|
1236
|
-
throw new TypeError("The `input` option cannot be a stream in sync mode");
|
|
1237
|
-
}, "validateInputSync");
|
|
1238
|
-
$n.exports = {
|
|
1239
|
-
handleInput: pa,
|
|
1240
|
-
makeAllStream: da,
|
|
1241
|
-
getSpawnedResult: ma,
|
|
1242
|
-
validateInputSync: ha
|
|
1243
|
-
};
|
|
1244
|
-
});
|
|
1245
|
-
|
|
1246
|
-
// ../node_modules/execa/lib/promise.js
|
|
1247
|
-
var Hn = p((Kf, Wn) => {
|
|
1248
|
-
"use strict";
|
|
1249
|
-
var ya = (async () => {
|
|
1250
|
-
})().constructor.prototype, ga = ["then", "catch", "finally"].map((e) => [
|
|
1251
|
-
e,
|
|
1252
|
-
Reflect.getOwnPropertyDescriptor(ya, e)
|
|
1253
|
-
]), ba = /* @__PURE__ */ o((e, t) => {
|
|
1254
|
-
for (let [r, n] of ga) {
|
|
1255
|
-
let i = typeof t == "function" ? (...s) => Reflect.apply(n.value, t(), s) : n.value.bind(t);
|
|
1256
|
-
Reflect.defineProperty(e, r, { ...n, value: i });
|
|
1257
|
-
}
|
|
1258
|
-
return e;
|
|
1259
|
-
}, "mergePromise"), xa = /* @__PURE__ */ o((e) => new Promise((t, r) => {
|
|
1260
|
-
e.on("exit", (n, i) => {
|
|
1261
|
-
t({ exitCode: n, signal: i });
|
|
1262
|
-
}), e.on("error", (n) => {
|
|
1263
|
-
r(n);
|
|
1264
|
-
}), e.stdin && e.stdin.on("error", (n) => {
|
|
1265
|
-
r(n);
|
|
1266
|
-
});
|
|
1267
|
-
}), "getSpawnedPromise");
|
|
1268
|
-
Wn.exports = {
|
|
1269
|
-
mergePromise: ba,
|
|
1270
|
-
getSpawnedPromise: xa
|
|
1271
|
-
};
|
|
1272
|
-
});
|
|
1273
|
-
|
|
1274
|
-
// ../node_modules/execa/lib/command.js
|
|
1275
|
-
var Jn = p((Xf, zn) => {
|
|
1276
|
-
"use strict";
|
|
1277
|
-
var Vn = /* @__PURE__ */ o((e, t = []) => Array.isArray(t) ? [e, ...t] : [e], "normalizeArgs"), Sa = /^[\w.-]+$/, wa = /"/g, va = /* @__PURE__ */ o(
|
|
1278
|
-
(e) => typeof e != "string" || Sa.test(e) ? e : `"${e.replace(wa, '\\"')}"`, "escapeArg"), Pa = /* @__PURE__ */ o((e, t) => Vn(e, t).join(
|
|
1279
|
-
" "), "joinCommand"), Ea = /* @__PURE__ */ o((e, t) => Vn(e, t).map((r) => va(r)).join(" "), "getEscapedCommand"), Ta = / +/g, ka = /* @__PURE__ */ o(
|
|
1280
|
-
(e) => {
|
|
1281
|
-
let t = [];
|
|
1282
|
-
for (let r of e.trim().split(Ta)) {
|
|
1283
|
-
let n = t[t.length - 1];
|
|
1284
|
-
n && n.endsWith("\\") ? t[t.length - 1] = `${n.slice(0, -1)} ${r}` : t.push(r);
|
|
1285
|
-
}
|
|
1286
|
-
return t;
|
|
1287
|
-
}, "parseCommand");
|
|
1288
|
-
zn.exports = {
|
|
1289
|
-
joinCommand: Pa,
|
|
1290
|
-
getEscapedCommand: Ea,
|
|
1291
|
-
parseCommand: ka
|
|
1292
|
-
};
|
|
1293
|
-
});
|
|
1294
|
-
|
|
1295
|
-
// ../node_modules/execa/index.js
|
|
1296
|
-
var to = p((Zf, H) => {
|
|
1297
|
-
"use strict";
|
|
1298
|
-
var Ia = b("path"), vt = b("child_process"), Ca = pt(), Oa = cn(), Aa = fn(), Ra = hn(), Pe = Pn(), Yn = Tn(), { spawnedKill: _a, spawnedCancel: Ga,
|
|
1299
|
-
setupTimeout: ja, validateTimeout: Na, setExitHandler: Ba } = Gn(), { handleInput: Da, getSpawnedResult: Ma, makeAllStream: La, validateInputSync: Fa } = qn(),
|
|
1300
|
-
{ mergePromise: Kn, getSpawnedPromise: Ua } = Hn(), { joinCommand: Xn, parseCommand: Qn, getEscapedCommand: Zn } = Jn(), $a = 1e3 * 1e3 * 100,
|
|
1301
|
-
qa = /* @__PURE__ */ o(({ env: e, extendEnv: t, preferLocal: r, localDir: n, execPath: i }) => {
|
|
1302
|
-
let s = t ? { ...process.env, ...e } : e;
|
|
1303
|
-
return r ? Aa.env({ env: s, cwd: n, execPath: i }) : s;
|
|
1304
|
-
}, "getEnv"), eo = /* @__PURE__ */ o((e, t, r = {}) => {
|
|
1305
|
-
let n = Ca._parse(e, t, r);
|
|
1306
|
-
return e = n.command, t = n.args, r = n.options, r = {
|
|
1307
|
-
maxBuffer: $a,
|
|
1308
|
-
buffer: !0,
|
|
1309
|
-
stripFinalNewline: !0,
|
|
1310
|
-
extendEnv: !0,
|
|
1311
|
-
preferLocal: !1,
|
|
1312
|
-
localDir: r.cwd || process.cwd(),
|
|
1313
|
-
execPath: process.execPath,
|
|
1314
|
-
encoding: "utf8",
|
|
1315
|
-
reject: !0,
|
|
1316
|
-
cleanup: !0,
|
|
1317
|
-
all: !1,
|
|
1318
|
-
windowsHide: !0,
|
|
1319
|
-
...r
|
|
1320
|
-
}, r.env = qa(r), r.stdio = Yn(r), process.platform === "win32" && Ia.basename(e, ".exe") === "cmd" && t.unshift("/q"), { file: e, args: t,
|
|
1321
|
-
options: r, parsed: n };
|
|
1322
|
-
}, "handleArguments"), Q = /* @__PURE__ */ o((e, t, r) => typeof t != "string" && !Buffer.isBuffer(t) ? r === void 0 ? void 0 : "" : e.stripFinalNewline ?
|
|
1323
|
-
Oa(t) : t, "handleOutput"), Ee = /* @__PURE__ */ o((e, t, r) => {
|
|
1324
|
-
let n = eo(e, t, r), i = Xn(e, t), s = Zn(e, t);
|
|
1325
|
-
Na(n.options);
|
|
1326
|
-
let a;
|
|
1327
|
-
try {
|
|
1328
|
-
a = vt.spawn(n.file, n.args, n.options);
|
|
1329
|
-
} catch (m) {
|
|
1330
|
-
let y = new vt.ChildProcess(), h = Promise.reject(Pe({
|
|
1331
|
-
error: m,
|
|
1332
|
-
stdout: "",
|
|
1333
|
-
stderr: "",
|
|
1334
|
-
all: "",
|
|
1335
|
-
command: i,
|
|
1336
|
-
escapedCommand: s,
|
|
1337
|
-
parsed: n,
|
|
1338
|
-
timedOut: !1,
|
|
1339
|
-
isCanceled: !1,
|
|
1340
|
-
killed: !1
|
|
1341
|
-
}));
|
|
1342
|
-
return Kn(y, h);
|
|
1343
|
-
}
|
|
1344
|
-
let c = Ua(a), u = ja(a, n.options, c), l = Ba(a, n.options, u), f = { isCanceled: !1 };
|
|
1345
|
-
a.kill = _a.bind(null, a.kill.bind(a)), a.cancel = Ga.bind(null, a, f);
|
|
1346
|
-
let g = Ra(/* @__PURE__ */ o(async () => {
|
|
1347
|
-
let [{ error: m, exitCode: y, signal: h, timedOut: S }, T, E, I] = await Ma(a, n.options, l), O = Q(n.options, T), A = Q(n.options, E),
|
|
1348
|
-
d = Q(n.options, I);
|
|
1349
|
-
if (m || y !== 0 || h !== null) {
|
|
1350
|
-
let v = Pe({
|
|
1351
|
-
error: m,
|
|
1352
|
-
exitCode: y,
|
|
1353
|
-
signal: h,
|
|
1354
|
-
stdout: O,
|
|
1355
|
-
stderr: A,
|
|
1356
|
-
all: d,
|
|
1357
|
-
command: i,
|
|
1358
|
-
escapedCommand: s,
|
|
1359
|
-
parsed: n,
|
|
1360
|
-
timedOut: S,
|
|
1361
|
-
isCanceled: f.isCanceled,
|
|
1362
|
-
killed: a.killed
|
|
1363
|
-
});
|
|
1364
|
-
if (!n.options.reject)
|
|
1365
|
-
return v;
|
|
1366
|
-
throw v;
|
|
1367
|
-
}
|
|
1368
|
-
return {
|
|
1369
|
-
command: i,
|
|
1370
|
-
escapedCommand: s,
|
|
1371
|
-
exitCode: 0,
|
|
1372
|
-
stdout: O,
|
|
1373
|
-
stderr: A,
|
|
1374
|
-
all: d,
|
|
1375
|
-
failed: !1,
|
|
1376
|
-
timedOut: !1,
|
|
1377
|
-
isCanceled: !1,
|
|
1378
|
-
killed: !1
|
|
1379
|
-
};
|
|
1380
|
-
}, "handlePromise"));
|
|
1381
|
-
return Da(a, n.options.input), a.all = La(a, n.options), Kn(a, g);
|
|
1382
|
-
}, "execa");
|
|
1383
|
-
H.exports = Ee;
|
|
1384
|
-
H.exports.sync = (e, t, r) => {
|
|
1385
|
-
let n = eo(e, t, r), i = Xn(e, t), s = Zn(e, t);
|
|
1386
|
-
Fa(n.options);
|
|
1387
|
-
let a;
|
|
1388
|
-
try {
|
|
1389
|
-
a = vt.spawnSync(n.file, n.args, n.options);
|
|
1390
|
-
} catch (l) {
|
|
1391
|
-
throw Pe({
|
|
1392
|
-
error: l,
|
|
1393
|
-
stdout: "",
|
|
1394
|
-
stderr: "",
|
|
1395
|
-
all: "",
|
|
1396
|
-
command: i,
|
|
1397
|
-
escapedCommand: s,
|
|
1398
|
-
parsed: n,
|
|
1399
|
-
timedOut: !1,
|
|
1400
|
-
isCanceled: !1,
|
|
1401
|
-
killed: !1
|
|
1402
|
-
});
|
|
1403
|
-
}
|
|
1404
|
-
let c = Q(n.options, a.stdout, a.error), u = Q(n.options, a.stderr, a.error);
|
|
1405
|
-
if (a.error || a.status !== 0 || a.signal !== null) {
|
|
1406
|
-
let l = Pe({
|
|
1407
|
-
stdout: c,
|
|
1408
|
-
stderr: u,
|
|
1409
|
-
error: a.error,
|
|
1410
|
-
signal: a.signal,
|
|
1411
|
-
exitCode: a.status,
|
|
1412
|
-
command: i,
|
|
1413
|
-
escapedCommand: s,
|
|
1414
|
-
parsed: n,
|
|
1415
|
-
timedOut: a.error && a.error.code === "ETIMEDOUT",
|
|
1416
|
-
isCanceled: !1,
|
|
1417
|
-
killed: a.signal !== null
|
|
1418
|
-
});
|
|
1419
|
-
if (!n.options.reject)
|
|
1420
|
-
return l;
|
|
1421
|
-
throw l;
|
|
1422
|
-
}
|
|
1423
|
-
return {
|
|
1424
|
-
command: i,
|
|
1425
|
-
escapedCommand: s,
|
|
1426
|
-
exitCode: 0,
|
|
1427
|
-
stdout: c,
|
|
1428
|
-
stderr: u,
|
|
1429
|
-
failed: !1,
|
|
1430
|
-
timedOut: !1,
|
|
1431
|
-
isCanceled: !1,
|
|
1432
|
-
killed: !1
|
|
1433
|
-
};
|
|
1434
|
-
};
|
|
1435
|
-
H.exports.command = (e, t) => {
|
|
1436
|
-
let [r, ...n] = Qn(e);
|
|
1437
|
-
return Ee(r, n, t);
|
|
1438
|
-
};
|
|
1439
|
-
H.exports.commandSync = (e, t) => {
|
|
1440
|
-
let [r, ...n] = Qn(e);
|
|
1441
|
-
return Ee.sync(r, n, t);
|
|
1442
|
-
};
|
|
1443
|
-
H.exports.node = (e, t, r = {}) => {
|
|
1444
|
-
t && !Array.isArray(t) && typeof t == "object" && (r = t, t = []);
|
|
1445
|
-
let n = Yn.node(r), i = process.execArgv.filter((c) => !c.startsWith("--inspect")), {
|
|
1446
|
-
nodePath: s = process.execPath,
|
|
1447
|
-
nodeOptions: a = i
|
|
1448
|
-
} = r;
|
|
1449
|
-
return Ee(
|
|
1450
|
-
s,
|
|
1451
|
-
[
|
|
1452
|
-
...a,
|
|
1453
|
-
e,
|
|
1454
|
-
...Array.isArray(t) ? t : []
|
|
1455
|
-
],
|
|
1456
|
-
{
|
|
1457
|
-
...r,
|
|
1458
|
-
stdin: void 0,
|
|
1459
|
-
stdout: void 0,
|
|
1460
|
-
stderr: void 0,
|
|
1461
|
-
stdio: n,
|
|
1462
|
-
shell: !1
|
|
1463
|
-
}
|
|
1464
|
-
);
|
|
1465
|
-
};
|
|
1466
|
-
});
|
|
1467
|
-
|
|
1468
|
-
// ../node_modules/detect-package-manager/dist/index.js
|
|
1469
|
-
var io = p((oo) => {
|
|
1470
|
-
var Wa = Object.create, Ie = Object.defineProperty, Ha = Object.getOwnPropertyDescriptor, Va = Object.getOwnPropertyNames, za = Object.getPrototypeOf,
|
|
1471
|
-
Ja = Object.prototype.hasOwnProperty, ro = /* @__PURE__ */ o((e) => Ie(e, "__esModule", { value: !0 }), "__markAsModule"), Ka = /* @__PURE__ */ o(
|
|
1472
|
-
(e, t) => {
|
|
1473
|
-
ro(e);
|
|
1474
|
-
for (var r in t)
|
|
1475
|
-
Ie(e, r, { get: t[r], enumerable: !0 });
|
|
1476
|
-
}, "__export"), Ya = /* @__PURE__ */ o((e, t, r) => {
|
|
1477
|
-
if (t && typeof t == "object" || typeof t == "function")
|
|
1478
|
-
for (let n of Va(t))
|
|
1479
|
-
!Ja.call(e, n) && n !== "default" && Ie(e, n, { get: /* @__PURE__ */ o(() => t[n], "get"), enumerable: !(r = Ha(t, n)) || r.enumerable });
|
|
1480
|
-
return e;
|
|
1481
|
-
}, "__reExport"), Et = /* @__PURE__ */ o((e) => Ya(ro(Ie(e != null ? Wa(za(e)) : {}, "default", e && e.__esModule && "default" in e ? { get: /* @__PURE__ */ o(
|
|
1482
|
-
() => e.default, "get"), enumerable: !0 } : { value: e, enumerable: !0 })), e), "__toModule");
|
|
1483
|
-
Ka(oo, {
|
|
1484
|
-
clearCache: /* @__PURE__ */ o(() => tc, "clearCache"),
|
|
1485
|
-
detect: /* @__PURE__ */ o(() => Za, "detect"),
|
|
1486
|
-
getNpmVersion: /* @__PURE__ */ o(() => ec, "getNpmVersion")
|
|
1487
|
-
});
|
|
1488
|
-
var Xa = Et(b("fs")), Te = Et(b("path")), no = Et(to());
|
|
1489
|
-
async function ke(e) {
|
|
1490
|
-
try {
|
|
1491
|
-
return await Xa.promises.access(e), !0;
|
|
1492
|
-
} catch {
|
|
1493
|
-
return !1;
|
|
1494
|
-
}
|
|
1495
|
-
}
|
|
1496
|
-
o(ke, "pathExists");
|
|
1497
|
-
var j = /* @__PURE__ */ new Map();
|
|
1498
|
-
function Pt(e) {
|
|
1499
|
-
let t = `has_global_${e}`;
|
|
1500
|
-
return j.has(t) ? Promise.resolve(j.get(t)) : (0, no.default)(e, ["--version"]).then((r) => /^\d+.\d+.\d+$/.test(r.stdout)).then((r) => (j.
|
|
1501
|
-
set(t, r), r)).catch(() => !1);
|
|
1502
|
-
}
|
|
1503
|
-
o(Pt, "hasGlobalInstallation");
|
|
1504
|
-
function Qa(e = ".") {
|
|
1505
|
-
let t = `lockfile_${e}`;
|
|
1506
|
-
return j.has(t) ? Promise.resolve(j.get(t)) : Promise.all([
|
|
1507
|
-
ke((0, Te.resolve)(e, "yarn.lock")),
|
|
1508
|
-
ke((0, Te.resolve)(e, "package-lock.json")),
|
|
1509
|
-
ke((0, Te.resolve)(e, "pnpm-lock.yaml")),
|
|
1510
|
-
ke((0, Te.resolve)(e, "bun.lockb"))
|
|
1511
|
-
]).then(([r, n, i, s]) => {
|
|
1512
|
-
let a = null;
|
|
1513
|
-
return r ? a = "yarn" : i ? a = "pnpm" : s ? a = "bun" : n && (a = "npm"), j.set(t, a), a;
|
|
1514
|
-
});
|
|
1515
|
-
}
|
|
1516
|
-
o(Qa, "getTypeofLockFile");
|
|
1517
|
-
var Za = /* @__PURE__ */ o(async ({
|
|
1518
|
-
cwd: e,
|
|
1519
|
-
includeGlobalBun: t
|
|
1520
|
-
} = {}) => {
|
|
1521
|
-
let r = await Qa(e);
|
|
1522
|
-
if (r)
|
|
1523
|
-
return r;
|
|
1524
|
-
let [n, i, s] = await Promise.all([
|
|
1525
|
-
Pt("yarn"),
|
|
1526
|
-
Pt("pnpm"),
|
|
1527
|
-
t && Pt("bun")
|
|
1528
|
-
]);
|
|
1529
|
-
return n ? "yarn" : i ? "pnpm" : s ? "bun" : "npm";
|
|
1530
|
-
}, "detect");
|
|
1531
|
-
function ec(e) {
|
|
1532
|
-
return (0, no.default)(e || "npm", ["--version"]).then((t) => t.stdout);
|
|
1533
|
-
}
|
|
1534
|
-
o(ec, "getNpmVersion");
|
|
1535
|
-
function tc() {
|
|
1536
|
-
return j.clear();
|
|
1537
|
-
}
|
|
1538
|
-
o(tc, "clearCache");
|
|
1539
|
-
});
|
|
1540
|
-
|
|
1541
|
-
// ../node_modules/walk-up-path/dist/cjs/index.js
|
|
1542
|
-
var ao = p((Ce) => {
|
|
1543
|
-
"use strict";
|
|
1544
|
-
Object.defineProperty(Ce, "__esModule", { value: !0 });
|
|
1545
|
-
Ce.walkUp = void 0;
|
|
1546
|
-
var so = b("path"), rc = /* @__PURE__ */ o(function* (e) {
|
|
1547
|
-
for (e = (0, so.resolve)(e); e; ) {
|
|
1548
|
-
yield e;
|
|
1549
|
-
let t = (0, so.dirname)(e);
|
|
1550
|
-
if (t === e)
|
|
1551
|
-
break;
|
|
1552
|
-
e = t;
|
|
1553
|
-
}
|
|
1554
|
-
}, "walkUp");
|
|
1555
|
-
Ce.walkUp = rc;
|
|
1556
|
-
});
|
|
1557
|
-
|
|
1558
499
|
// ../node_modules/common-path-prefix/index.js
|
|
1559
|
-
var
|
|
500
|
+
var vn = x((Zf, Pn) => {
|
|
1560
501
|
"use strict";
|
|
1561
|
-
var { sep:
|
|
502
|
+
var { sep: vs } = S("path"), Ts = /* @__PURE__ */ o((e) => {
|
|
1562
503
|
for (let t of e) {
|
|
1563
504
|
let r = /(\/|\\)/.exec(t);
|
|
1564
505
|
if (r !== null) return r[0];
|
|
1565
506
|
}
|
|
1566
|
-
return
|
|
507
|
+
return vs;
|
|
1567
508
|
}, "determineSeparator");
|
|
1568
|
-
|
|
509
|
+
Pn.exports = /* @__PURE__ */ o(function(t, r = Ts(t)) {
|
|
1569
510
|
let [n = "", ...i] = t;
|
|
1570
511
|
if (n === "" || i.length === 0) return "";
|
|
1571
512
|
let s = n.split(r), a = s.length;
|
|
1572
513
|
for (let u of i) {
|
|
1573
|
-
let
|
|
1574
|
-
for (let
|
|
1575
|
-
l
|
|
514
|
+
let f = u.split(r);
|
|
515
|
+
for (let l = 0; l < a; l++)
|
|
516
|
+
f[l] !== s[l] && (a = l);
|
|
1576
517
|
if (a === 0) return "";
|
|
1577
518
|
}
|
|
1578
519
|
let c = s.slice(0, a).join(r);
|
|
@@ -1581,19 +522,19 @@ var si = p((Am, ii) => {
|
|
|
1581
522
|
});
|
|
1582
523
|
|
|
1583
524
|
// ../node_modules/fetch-retry/index.js
|
|
1584
|
-
var
|
|
525
|
+
var Yn = x((Tm, zn) => {
|
|
1585
526
|
"use strict";
|
|
1586
|
-
|
|
527
|
+
zn.exports = function(e, t) {
|
|
1587
528
|
if (t = t || {}, typeof e != "function")
|
|
1588
|
-
throw new
|
|
529
|
+
throw new E("fetch must be a function");
|
|
1589
530
|
if (typeof t != "object")
|
|
1590
|
-
throw new
|
|
1591
|
-
if (t.retries !== void 0 && !
|
|
1592
|
-
throw new
|
|
1593
|
-
if (t.retryDelay !== void 0 && !
|
|
1594
|
-
throw new
|
|
531
|
+
throw new E("defaults must be an object");
|
|
532
|
+
if (t.retries !== void 0 && !xe(t.retries))
|
|
533
|
+
throw new E("retries must be a positive integer");
|
|
534
|
+
if (t.retryDelay !== void 0 && !xe(t.retryDelay) && typeof t.retryDelay != "function")
|
|
535
|
+
throw new E("retryDelay must be a positive integer or a function returning a positive integer");
|
|
1595
536
|
if (t.retryOn !== void 0 && !Array.isArray(t.retryOn) && typeof t.retryOn != "function")
|
|
1596
|
-
throw new
|
|
537
|
+
throw new E("retryOn property expects an array or function");
|
|
1597
538
|
var r = {
|
|
1598
539
|
retries: 3,
|
|
1599
540
|
retryDelay: 1e3,
|
|
@@ -1602,296 +543,423 @@ var Ai = p((rg, Oi) => {
|
|
|
1602
543
|
return t = Object.assign(r, t), /* @__PURE__ */ o(function(i, s) {
|
|
1603
544
|
var a = t.retries, c = t.retryDelay, u = t.retryOn;
|
|
1604
545
|
if (s && s.retries !== void 0)
|
|
1605
|
-
if (
|
|
546
|
+
if (xe(s.retries))
|
|
1606
547
|
a = s.retries;
|
|
1607
548
|
else
|
|
1608
|
-
throw new
|
|
549
|
+
throw new E("retries must be a positive integer");
|
|
1609
550
|
if (s && s.retryDelay !== void 0)
|
|
1610
|
-
if (
|
|
551
|
+
if (xe(s.retryDelay) || typeof s.retryDelay == "function")
|
|
1611
552
|
c = s.retryDelay;
|
|
1612
553
|
else
|
|
1613
|
-
throw new
|
|
554
|
+
throw new E("retryDelay must be a positive integer or a function returning a positive integer");
|
|
1614
555
|
if (s && s.retryOn)
|
|
1615
556
|
if (Array.isArray(s.retryOn) || typeof s.retryOn == "function")
|
|
1616
557
|
u = s.retryOn;
|
|
1617
558
|
else
|
|
1618
|
-
throw new
|
|
1619
|
-
return new Promise(function(
|
|
1620
|
-
var
|
|
1621
|
-
var
|
|
1622
|
-
e(
|
|
1623
|
-
if (Array.isArray(u) && u.indexOf(
|
|
1624
|
-
|
|
559
|
+
throw new E("retryOn property expects an array or function");
|
|
560
|
+
return new Promise(function(f, l) {
|
|
561
|
+
var d = /* @__PURE__ */ o(function(y) {
|
|
562
|
+
var g = typeof Request < "u" && i instanceof Request ? i.clone() : i;
|
|
563
|
+
e(g, s).then(function(m) {
|
|
564
|
+
if (Array.isArray(u) && u.indexOf(m.status) === -1)
|
|
565
|
+
f(m);
|
|
1625
566
|
else if (typeof u == "function")
|
|
1626
567
|
try {
|
|
1627
|
-
return Promise.resolve(u(
|
|
1628
|
-
|
|
1629
|
-
}).catch(
|
|
1630
|
-
} catch (
|
|
1631
|
-
|
|
568
|
+
return Promise.resolve(u(y, null, m)).then(function(b) {
|
|
569
|
+
b ? h(y, null, m) : f(m);
|
|
570
|
+
}).catch(l);
|
|
571
|
+
} catch (b) {
|
|
572
|
+
l(b);
|
|
1632
573
|
}
|
|
1633
574
|
else
|
|
1634
|
-
|
|
1635
|
-
}).catch(function(
|
|
575
|
+
y < a ? h(y, null, m) : f(m);
|
|
576
|
+
}).catch(function(m) {
|
|
1636
577
|
if (typeof u == "function")
|
|
1637
578
|
try {
|
|
1638
|
-
Promise.resolve(u(
|
|
1639
|
-
|
|
1640
|
-
}).catch(function(
|
|
1641
|
-
|
|
579
|
+
Promise.resolve(u(y, m, null)).then(function(b) {
|
|
580
|
+
b ? h(y, m, null) : l(m);
|
|
581
|
+
}).catch(function(b) {
|
|
582
|
+
l(b);
|
|
1642
583
|
});
|
|
1643
|
-
} catch (
|
|
1644
|
-
|
|
584
|
+
} catch (b) {
|
|
585
|
+
l(b);
|
|
1645
586
|
}
|
|
1646
|
-
else
|
|
587
|
+
else y < a ? h(y, m, null) : l(m);
|
|
1647
588
|
});
|
|
1648
589
|
}, "wrappedFetch");
|
|
1649
|
-
function
|
|
1650
|
-
var
|
|
590
|
+
function h(y, g, m) {
|
|
591
|
+
var b = typeof c == "function" ? c(y, g, m) : c;
|
|
1651
592
|
setTimeout(function() {
|
|
1652
|
-
|
|
1653
|
-
},
|
|
593
|
+
d(++y);
|
|
594
|
+
}, b);
|
|
1654
595
|
}
|
|
1655
|
-
o(
|
|
596
|
+
o(h, "retry"), d(0);
|
|
1656
597
|
});
|
|
1657
598
|
}, "fetchRetry");
|
|
1658
599
|
};
|
|
1659
|
-
function
|
|
600
|
+
function xe(e) {
|
|
1660
601
|
return Number.isInteger(e) && e >= 0;
|
|
1661
602
|
}
|
|
1662
|
-
o(
|
|
1663
|
-
function
|
|
603
|
+
o(xe, "isPositiveInteger");
|
|
604
|
+
function E(e) {
|
|
1664
605
|
this.name = "ArgumentError", this.message = e;
|
|
1665
606
|
}
|
|
1666
|
-
o(
|
|
607
|
+
o(E, "ArgumentError");
|
|
1667
608
|
});
|
|
1668
609
|
|
|
1669
610
|
// src/telemetry/index.ts
|
|
1670
|
-
import { logger as
|
|
611
|
+
import { logger as so } from "storybook/internal/node-logger";
|
|
1671
612
|
|
|
1672
613
|
// src/telemetry/notify.ts
|
|
1673
|
-
var
|
|
1674
|
-
import { cache as
|
|
1675
|
-
var
|
|
1676
|
-
await
|
|
1677
|
-
`${
|
|
1678
|
-
|
|
614
|
+
var z = A(vt(), 1);
|
|
615
|
+
import { cache as Tt } from "storybook/internal/common";
|
|
616
|
+
var Ct = "telemetry-notification-date", O = console, It = /* @__PURE__ */ o(async () => {
|
|
617
|
+
await Tt.get(Ct, null) || (Tt.set(Ct, Date.now()), O.log(), O.log(
|
|
618
|
+
`${z.default.magenta(
|
|
619
|
+
z.default.bold("attention")
|
|
1679
620
|
)} => Storybook now collects completely anonymous telemetry regarding usage.`
|
|
1680
|
-
),
|
|
621
|
+
), O.log("This information is used to shape Storybook's roadmap and prioritize features."), O.log(
|
|
1681
622
|
"You can learn more, including how to opt-out if you'd not like to participate in this anonymous program, by visiting the following URL:"
|
|
1682
|
-
),
|
|
623
|
+
), O.log(z.default.cyan("https://storybook.js.org/telemetry")), O.log());
|
|
1683
624
|
}, "notify");
|
|
1684
625
|
|
|
1685
626
|
// src/telemetry/sanitize.ts
|
|
1686
|
-
import
|
|
1687
|
-
function
|
|
627
|
+
import jt from "node:path";
|
|
628
|
+
function At(e) {
|
|
1688
629
|
return e.replace(/[-[/{}()*+?.\\^$|]/g, "\\$&");
|
|
1689
630
|
}
|
|
1690
|
-
o(
|
|
1691
|
-
function
|
|
631
|
+
o(At, "regexpEscape");
|
|
632
|
+
function Ot(e = "") {
|
|
1692
633
|
return e.replace(/\u001B\[[0-9;]*m/g, "");
|
|
1693
634
|
}
|
|
1694
|
-
o(
|
|
1695
|
-
function
|
|
635
|
+
o(Ot, "removeAnsiEscapeCodes");
|
|
636
|
+
function D(e, t = jt.sep) {
|
|
1696
637
|
if (!e)
|
|
1697
638
|
return e;
|
|
1698
639
|
let r = process.cwd().split(t);
|
|
1699
640
|
for (; r.length > 1; ) {
|
|
1700
|
-
let n = r.join(t), i = new RegExp(
|
|
641
|
+
let n = r.join(t), i = new RegExp(At(n), "gi");
|
|
1701
642
|
e = e.replace(i, "$SNIP");
|
|
1702
|
-
let s = r.join(t + t), a = new RegExp(
|
|
643
|
+
let s = r.join(t + t), a = new RegExp(At(s), "gi");
|
|
1703
644
|
e = e.replace(a, "$SNIP"), r.pop();
|
|
1704
645
|
}
|
|
1705
646
|
return e;
|
|
1706
647
|
}
|
|
1707
|
-
o(
|
|
1708
|
-
function
|
|
648
|
+
o(D, "cleanPaths");
|
|
649
|
+
function Y(e, t = jt.sep) {
|
|
1709
650
|
try {
|
|
1710
651
|
e = {
|
|
1711
652
|
...JSON.parse(JSON.stringify(e)),
|
|
1712
|
-
message:
|
|
1713
|
-
stack:
|
|
653
|
+
message: Ot(e.message),
|
|
654
|
+
stack: Ot(e.stack),
|
|
1714
655
|
cause: e.cause,
|
|
1715
656
|
name: e.name
|
|
1716
657
|
};
|
|
1717
|
-
let r =
|
|
658
|
+
let r = D(JSON.stringify(e), t);
|
|
1718
659
|
return JSON.parse(r);
|
|
1719
660
|
} catch (r) {
|
|
1720
661
|
return `Sanitization error: ${r?.message}`;
|
|
1721
662
|
}
|
|
1722
663
|
}
|
|
1723
|
-
o(
|
|
664
|
+
o(Y, "sanitizeError");
|
|
1724
665
|
|
|
1725
666
|
// src/telemetry/storybook-metadata.ts
|
|
1726
|
-
|
|
1727
|
-
import { dirname as ul } from "node:path";
|
|
667
|
+
import { dirname as ra } from "node:path";
|
|
1728
668
|
import {
|
|
1729
|
-
getProjectRoot as
|
|
1730
|
-
getStorybookConfiguration as
|
|
1731
|
-
getStorybookInfo as
|
|
1732
|
-
loadMainConfig as
|
|
669
|
+
getProjectRoot as na,
|
|
670
|
+
getStorybookConfiguration as oa,
|
|
671
|
+
getStorybookInfo as ia,
|
|
672
|
+
loadMainConfig as sa,
|
|
673
|
+
versions as aa
|
|
1733
674
|
} from "storybook/internal/common";
|
|
1734
|
-
import { readConfig as
|
|
675
|
+
import { readConfig as ca } from "storybook/internal/csf-tools";
|
|
1735
676
|
|
|
1736
677
|
// ../node_modules/fd-package-json/dist/esm/main.js
|
|
1737
|
-
var
|
|
1738
|
-
import { resolve as
|
|
1739
|
-
import { stat as
|
|
1740
|
-
import { statSync as
|
|
1741
|
-
async function
|
|
678
|
+
var Dt = A(Nt(), 1);
|
|
679
|
+
import { resolve as bo } from "node:path";
|
|
680
|
+
import { stat as xo, readFile as wo } from "node:fs/promises";
|
|
681
|
+
import { statSync as Ha, readFileSync as Ja } from "node:fs";
|
|
682
|
+
async function So(e) {
|
|
1742
683
|
try {
|
|
1743
|
-
return (await
|
|
684
|
+
return (await xo(e)).isFile();
|
|
1744
685
|
} catch {
|
|
1745
686
|
return !1;
|
|
1746
687
|
}
|
|
1747
688
|
}
|
|
1748
|
-
o(
|
|
1749
|
-
async function
|
|
1750
|
-
for (let t of (0,
|
|
1751
|
-
let r =
|
|
1752
|
-
if (await
|
|
689
|
+
o(So, "fileExists");
|
|
690
|
+
async function Pe(e) {
|
|
691
|
+
for (let t of (0, Dt.walkUp)(e)) {
|
|
692
|
+
let r = bo(t, "package.json");
|
|
693
|
+
if (await So(r))
|
|
1753
694
|
return r;
|
|
1754
695
|
}
|
|
1755
696
|
return null;
|
|
1756
697
|
}
|
|
1757
|
-
o(
|
|
1758
|
-
async function
|
|
1759
|
-
let t = await
|
|
698
|
+
o(Pe, "findPackagePath");
|
|
699
|
+
async function _t(e) {
|
|
700
|
+
let t = await Pe(e);
|
|
1760
701
|
if (!t)
|
|
1761
702
|
return null;
|
|
1762
703
|
try {
|
|
1763
|
-
let r = await
|
|
704
|
+
let r = await wo(t, { encoding: "utf8" });
|
|
1764
705
|
return JSON.parse(r);
|
|
1765
706
|
} catch {
|
|
1766
707
|
return null;
|
|
1767
708
|
}
|
|
1768
709
|
}
|
|
1769
|
-
o(
|
|
710
|
+
o(_t, "findPackage");
|
|
711
|
+
|
|
712
|
+
// ../node_modules/package-manager-detector/dist/constants.mjs
|
|
713
|
+
var Mt = [
|
|
714
|
+
"npm",
|
|
715
|
+
"yarn",
|
|
716
|
+
"yarn@berry",
|
|
717
|
+
"pnpm",
|
|
718
|
+
"pnpm@6",
|
|
719
|
+
"bun",
|
|
720
|
+
"deno"
|
|
721
|
+
], ve = {
|
|
722
|
+
"bun.lock": "bun",
|
|
723
|
+
"bun.lockb": "bun",
|
|
724
|
+
"deno.lock": "deno",
|
|
725
|
+
"pnpm-lock.yaml": "pnpm",
|
|
726
|
+
"yarn.lock": "yarn",
|
|
727
|
+
"package-lock.json": "npm",
|
|
728
|
+
"npm-shrinkwrap.json": "npm"
|
|
729
|
+
}, Te = {
|
|
730
|
+
"node_modules/.deno/": "deno",
|
|
731
|
+
"node_modules/.pnpm/": "pnpm",
|
|
732
|
+
"node_modules/.yarn-state.yml": "yarn",
|
|
733
|
+
// yarn v2+ (node-modules)
|
|
734
|
+
"node_modules/.yarn_integrity": "yarn",
|
|
735
|
+
// yarn v1
|
|
736
|
+
"node_modules/.package-lock.json": "npm",
|
|
737
|
+
".pnp.cjs": "yarn",
|
|
738
|
+
// yarn v3+ (pnp)
|
|
739
|
+
".pnp.js": "yarn",
|
|
740
|
+
// yarn v2 (pnp)
|
|
741
|
+
"bun.lock": "bun",
|
|
742
|
+
"bun.lockb": "bun"
|
|
743
|
+
};
|
|
744
|
+
|
|
745
|
+
// ../node_modules/package-manager-detector/dist/detect.mjs
|
|
746
|
+
import Ft from "node:fs/promises";
|
|
747
|
+
import P from "node:path";
|
|
748
|
+
import ko from "node:process";
|
|
749
|
+
async function Ce(e, t) {
|
|
750
|
+
try {
|
|
751
|
+
let r = await Ft.stat(e);
|
|
752
|
+
return t === "file" ? r.isFile() : r.isDirectory();
|
|
753
|
+
} catch {
|
|
754
|
+
return !1;
|
|
755
|
+
}
|
|
756
|
+
}
|
|
757
|
+
o(Ce, "pathExists");
|
|
758
|
+
function* Eo(e = ko.cwd()) {
|
|
759
|
+
let t = P.resolve(e), { root: r } = P.parse(t);
|
|
760
|
+
for (; t && t !== r; )
|
|
761
|
+
yield t, t = P.dirname(t);
|
|
762
|
+
}
|
|
763
|
+
o(Eo, "lookup");
|
|
764
|
+
async function Lt(e, t) {
|
|
765
|
+
return !e || !Ce(e, "file") ? null : await vo(e, t);
|
|
766
|
+
}
|
|
767
|
+
o(Lt, "parsePackageJson");
|
|
768
|
+
async function Ie(e = {}) {
|
|
769
|
+
let { cwd: t, strategies: r = ["lockfile", "packageManager-field", "devEngines-field"], onUnknown: n } = e;
|
|
770
|
+
for (let i of Eo(t))
|
|
771
|
+
for (let s of r)
|
|
772
|
+
switch (s) {
|
|
773
|
+
case "lockfile": {
|
|
774
|
+
for (let a of Object.keys(ve))
|
|
775
|
+
if (await Ce(P.join(i, a), "file")) {
|
|
776
|
+
let c = ve[a], u = await Lt(P.join(i, "package.json"), n);
|
|
777
|
+
return u || { name: c, agent: c };
|
|
778
|
+
}
|
|
779
|
+
break;
|
|
780
|
+
}
|
|
781
|
+
case "packageManager-field":
|
|
782
|
+
case "devEngines-field": {
|
|
783
|
+
let a = await Lt(P.join(i, "package.json"), n);
|
|
784
|
+
if (a)
|
|
785
|
+
return a;
|
|
786
|
+
break;
|
|
787
|
+
}
|
|
788
|
+
case "install-metadata": {
|
|
789
|
+
for (let a of Object.keys(Te)) {
|
|
790
|
+
let c = a.endsWith("/") ? "dir" : "file";
|
|
791
|
+
if (await Ce(P.join(i, a), c)) {
|
|
792
|
+
let u = Te[a], f = u === "yarn" ? To(a) ? "yarn" : "yarn@berry" : u;
|
|
793
|
+
return { name: u, agent: f };
|
|
794
|
+
}
|
|
795
|
+
}
|
|
796
|
+
break;
|
|
797
|
+
}
|
|
798
|
+
}
|
|
799
|
+
return null;
|
|
800
|
+
}
|
|
801
|
+
o(Ie, "detect");
|
|
802
|
+
function Po(e) {
|
|
803
|
+
let t = /* @__PURE__ */ o((r) => r?.match(/\d+(\.\d+){0,2}/)?.[0] ?? r, "handelVer");
|
|
804
|
+
if (typeof e.packageManager == "string") {
|
|
805
|
+
let [r, n] = e.packageManager.replace(/^\^/, "").split("@");
|
|
806
|
+
return { name: r, ver: t(n) };
|
|
807
|
+
}
|
|
808
|
+
if (typeof e.devEngines?.packageManager?.name == "string")
|
|
809
|
+
return {
|
|
810
|
+
name: e.devEngines.packageManager.name,
|
|
811
|
+
ver: t(e.devEngines.packageManager.version)
|
|
812
|
+
};
|
|
813
|
+
}
|
|
814
|
+
o(Po, "getNameAndVer");
|
|
815
|
+
async function vo(e, t) {
|
|
816
|
+
try {
|
|
817
|
+
let r = JSON.parse(await Ft.readFile(e, "utf8")), n, i = Po(r);
|
|
818
|
+
if (i) {
|
|
819
|
+
let s = i.name, a = i.ver, c = a;
|
|
820
|
+
return s === "yarn" && a && Number.parseInt(a) > 1 ? (n = "yarn@berry", c = "berry", { name: s, agent: n, version: c }) : s === "pnpm" &&
|
|
821
|
+
a && Number.parseInt(a) < 7 ? (n = "pnpm@6", { name: s, agent: n, version: c }) : Mt.includes(s) ? (n = s, { name: s, agent: n, version: c }) :
|
|
822
|
+
t?.(r.packageManager) ?? null;
|
|
823
|
+
}
|
|
824
|
+
} catch {
|
|
825
|
+
}
|
|
826
|
+
return null;
|
|
827
|
+
}
|
|
828
|
+
o(vo, "handlePackageManager");
|
|
829
|
+
function To(e) {
|
|
830
|
+
return e.endsWith(".yarn_integrity");
|
|
831
|
+
}
|
|
832
|
+
o(To, "isMetadataYarnClassic");
|
|
833
|
+
|
|
834
|
+
// ../node_modules/package-manager-detector/dist/index.mjs
|
|
835
|
+
import "node:fs/promises";
|
|
836
|
+
import "node:path";
|
|
837
|
+
import "node:process";
|
|
1770
838
|
|
|
1771
839
|
// src/telemetry/get-application-file-count.ts
|
|
1772
|
-
import { sep as
|
|
840
|
+
import { sep as Us } from "node:path";
|
|
1773
841
|
|
|
1774
842
|
// src/telemetry/exec-command-count-lines.ts
|
|
1775
|
-
import { createInterface as
|
|
843
|
+
import { createInterface as bs } from "node:readline";
|
|
1776
844
|
|
|
1777
845
|
// node_modules/execa/index.js
|
|
1778
|
-
var
|
|
1779
|
-
import { Buffer as
|
|
1780
|
-
import
|
|
1781
|
-
import
|
|
1782
|
-
import
|
|
846
|
+
var dn = A(Tr(), 1);
|
|
847
|
+
import { Buffer as ps } from "node:buffer";
|
|
848
|
+
import ms from "node:path";
|
|
849
|
+
import ct from "node:child_process";
|
|
850
|
+
import le from "node:process";
|
|
1783
851
|
|
|
1784
852
|
// ../node_modules/strip-final-newline/index.js
|
|
1785
|
-
function
|
|
853
|
+
function Fe(e) {
|
|
1786
854
|
let t = typeof e == "string" ? `
|
|
1787
855
|
` : 10, r = typeof e == "string" ? "\r" : 13;
|
|
1788
856
|
return e[e.length - 1] === t && (e = e.slice(0, -1)), e[e.length - 1] === r && (e = e.slice(0, -1)), e;
|
|
1789
857
|
}
|
|
1790
|
-
o(
|
|
858
|
+
o(Fe, "stripFinalNewline");
|
|
1791
859
|
|
|
1792
860
|
// node_modules/npm-run-path/index.js
|
|
1793
|
-
import
|
|
1794
|
-
import
|
|
1795
|
-
import
|
|
861
|
+
import Z from "node:process";
|
|
862
|
+
import _ from "node:path";
|
|
863
|
+
import Zo from "node:url";
|
|
1796
864
|
|
|
1797
865
|
// node_modules/path-key/index.js
|
|
1798
|
-
function
|
|
866
|
+
function Q(e = {}) {
|
|
1799
867
|
let {
|
|
1800
868
|
env: t = process.env,
|
|
1801
869
|
platform: r = process.platform
|
|
1802
870
|
} = e;
|
|
1803
871
|
return r !== "win32" ? "PATH" : Object.keys(t).reverse().find((n) => n.toUpperCase() === "PATH") || "Path";
|
|
1804
872
|
}
|
|
1805
|
-
o(
|
|
873
|
+
o(Q, "pathKey");
|
|
1806
874
|
|
|
1807
875
|
// node_modules/npm-run-path/index.js
|
|
1808
|
-
function
|
|
876
|
+
function ei(e = {}) {
|
|
1809
877
|
let {
|
|
1810
|
-
cwd: t =
|
|
1811
|
-
path: r =
|
|
1812
|
-
execPath: n =
|
|
1813
|
-
} = e, i, s = t instanceof URL ?
|
|
878
|
+
cwd: t = Z.cwd(),
|
|
879
|
+
path: r = Z.env[Q()],
|
|
880
|
+
execPath: n = Z.execPath
|
|
881
|
+
} = e, i, s = t instanceof URL ? Zo.fileURLToPath(t) : t, a = _.resolve(s), c = [];
|
|
1814
882
|
for (; i !== a; )
|
|
1815
|
-
c.push(
|
|
1816
|
-
return c.push(
|
|
883
|
+
c.push(_.join(a, "node_modules/.bin")), i = a, a = _.resolve(a, "..");
|
|
884
|
+
return c.push(_.resolve(s, n, "..")), [...c, r].join(_.delimiter);
|
|
1817
885
|
}
|
|
1818
|
-
o(
|
|
1819
|
-
function
|
|
886
|
+
o(ei, "npmRunPath");
|
|
887
|
+
function Cr({ env: e = Z.env, ...t } = {}) {
|
|
1820
888
|
e = { ...e };
|
|
1821
|
-
let r =
|
|
1822
|
-
return t.path = e[r], e[r] =
|
|
889
|
+
let r = Q({ env: e });
|
|
890
|
+
return t.path = e[r], e[r] = ei(t), e;
|
|
1823
891
|
}
|
|
1824
|
-
o(
|
|
892
|
+
o(Cr, "npmRunPathEnv");
|
|
1825
893
|
|
|
1826
894
|
// node_modules/mimic-fn/index.js
|
|
1827
|
-
var
|
|
895
|
+
var ti = /* @__PURE__ */ o((e, t, r, n) => {
|
|
1828
896
|
if (r === "length" || r === "prototype" || r === "arguments" || r === "caller")
|
|
1829
897
|
return;
|
|
1830
898
|
let i = Object.getOwnPropertyDescriptor(e, r), s = Object.getOwnPropertyDescriptor(t, r);
|
|
1831
|
-
!
|
|
1832
|
-
}, "copyProperty"),
|
|
899
|
+
!ri(i, s) && n || Object.defineProperty(e, r, s);
|
|
900
|
+
}, "copyProperty"), ri = /* @__PURE__ */ o(function(e, t) {
|
|
1833
901
|
return e === void 0 || e.configurable || e.writable === t.writable && e.enumerable === t.enumerable && e.configurable === t.configurable &&
|
|
1834
902
|
(e.writable || e.value === t.value);
|
|
1835
|
-
}, "canCopyProperty"),
|
|
903
|
+
}, "canCopyProperty"), ni = /* @__PURE__ */ o((e, t) => {
|
|
1836
904
|
let r = Object.getPrototypeOf(t);
|
|
1837
905
|
r !== Object.getPrototypeOf(e) && Object.setPrototypeOf(e, r);
|
|
1838
|
-
}, "changePrototype"),
|
|
1839
|
-
${t}`, "wrappedToString"),
|
|
1840
|
-
prototype.toString, "name"),
|
|
1841
|
-
let n = r === "" ? "" : `with ${r.trim()}() `, i =
|
|
1842
|
-
Object.defineProperty(i, "name",
|
|
906
|
+
}, "changePrototype"), oi = /* @__PURE__ */ o((e, t) => `/* Wrapped ${e}*/
|
|
907
|
+
${t}`, "wrappedToString"), ii = Object.getOwnPropertyDescriptor(Function.prototype, "toString"), si = Object.getOwnPropertyDescriptor(Function.
|
|
908
|
+
prototype.toString, "name"), ai = /* @__PURE__ */ o((e, t, r) => {
|
|
909
|
+
let n = r === "" ? "" : `with ${r.trim()}() `, i = oi.bind(null, n, t.toString());
|
|
910
|
+
Object.defineProperty(i, "name", si), Object.defineProperty(e, "toString", { ...ii, value: i });
|
|
1843
911
|
}, "changeToString");
|
|
1844
|
-
function
|
|
912
|
+
function Be(e, t, { ignoreNonConfigurable: r = !1 } = {}) {
|
|
1845
913
|
let { name: n } = e;
|
|
1846
914
|
for (let i of Reflect.ownKeys(t))
|
|
1847
|
-
|
|
1848
|
-
return
|
|
915
|
+
ti(e, t, i, r);
|
|
916
|
+
return ni(e, t), ai(e, t, n), e;
|
|
1849
917
|
}
|
|
1850
|
-
o(
|
|
918
|
+
o(Be, "mimicFunction");
|
|
1851
919
|
|
|
1852
920
|
// node_modules/onetime/index.js
|
|
1853
|
-
var
|
|
921
|
+
var ee = /* @__PURE__ */ new WeakMap(), Ir = /* @__PURE__ */ o((e, t = {}) => {
|
|
1854
922
|
if (typeof e != "function")
|
|
1855
923
|
throw new TypeError("Expected a function");
|
|
1856
924
|
let r, n = 0, i = e.displayName || e.name || "<anonymous>", s = /* @__PURE__ */ o(function(...a) {
|
|
1857
|
-
if (
|
|
925
|
+
if (ee.set(s, ++n), n === 1)
|
|
1858
926
|
r = e.apply(this, a), e = null;
|
|
1859
927
|
else if (t.throw === !0)
|
|
1860
928
|
throw new Error(`Function \`${i}\` can only be called once`);
|
|
1861
929
|
return r;
|
|
1862
930
|
}, "onetime");
|
|
1863
|
-
return
|
|
931
|
+
return Be(s, e), ee.set(s, n), s;
|
|
1864
932
|
}, "onetime");
|
|
1865
|
-
|
|
1866
|
-
if (!
|
|
933
|
+
Ir.callCount = (e) => {
|
|
934
|
+
if (!ee.has(e))
|
|
1867
935
|
throw new Error(`The given function \`${e.name}\` is not wrapped by the \`onetime\` package`);
|
|
1868
|
-
return
|
|
936
|
+
return ee.get(e);
|
|
1869
937
|
};
|
|
1870
|
-
var
|
|
938
|
+
var Ar = Ir;
|
|
1871
939
|
|
|
1872
940
|
// node_modules/execa/lib/error.js
|
|
1873
|
-
import
|
|
941
|
+
import gi from "node:process";
|
|
1874
942
|
|
|
1875
943
|
// node_modules/human-signals/build/src/main.js
|
|
1876
|
-
import { constants as
|
|
944
|
+
import { constants as li } from "node:os";
|
|
1877
945
|
|
|
1878
946
|
// node_modules/human-signals/build/src/realtime.js
|
|
1879
|
-
var
|
|
1880
|
-
let e =
|
|
1881
|
-
return Array.from({ length: e },
|
|
1882
|
-
}, "getRealtimeSignals"),
|
|
947
|
+
var Or = /* @__PURE__ */ o(() => {
|
|
948
|
+
let e = Ge - jr + 1;
|
|
949
|
+
return Array.from({ length: e }, ci);
|
|
950
|
+
}, "getRealtimeSignals"), ci = /* @__PURE__ */ o((e, t) => ({
|
|
1883
951
|
name: `SIGRT${t + 1}`,
|
|
1884
|
-
number:
|
|
952
|
+
number: jr + t,
|
|
1885
953
|
action: "terminate",
|
|
1886
954
|
description: "Application-specific signal (realtime)",
|
|
1887
955
|
standard: "posix"
|
|
1888
|
-
}), "getRealtimeSignal"),
|
|
956
|
+
}), "getRealtimeSignal"), jr = 34, Ge = 64;
|
|
1889
957
|
|
|
1890
958
|
// node_modules/human-signals/build/src/signals.js
|
|
1891
|
-
import { constants as
|
|
959
|
+
import { constants as ui } from "node:os";
|
|
1892
960
|
|
|
1893
961
|
// node_modules/human-signals/build/src/core.js
|
|
1894
|
-
var
|
|
962
|
+
var Rr = [
|
|
1895
963
|
{
|
|
1896
964
|
name: "SIGHUP",
|
|
1897
965
|
number: 1,
|
|
@@ -2164,10 +1232,10 @@ var yo = [
|
|
|
2164
1232
|
];
|
|
2165
1233
|
|
|
2166
1234
|
// node_modules/human-signals/build/src/signals.js
|
|
2167
|
-
var
|
|
2168
|
-
let e =
|
|
2169
|
-
return [...
|
|
2170
|
-
}, "getSignals"),
|
|
1235
|
+
var Ue = /* @__PURE__ */ o(() => {
|
|
1236
|
+
let e = Or();
|
|
1237
|
+
return [...Rr, ...e].map(fi);
|
|
1238
|
+
}, "getSignals"), fi = /* @__PURE__ */ o(({
|
|
2171
1239
|
name: e,
|
|
2172
1240
|
number: t,
|
|
2173
1241
|
description: r,
|
|
@@ -2177,15 +1245,15 @@ var Ot = /* @__PURE__ */ o(() => {
|
|
|
2177
1245
|
}) => {
|
|
2178
1246
|
let {
|
|
2179
1247
|
signals: { [e]: a }
|
|
2180
|
-
} =
|
|
1248
|
+
} = ui, c = a !== void 0;
|
|
2181
1249
|
return { name: e, number: c ? a : t, description: r, supported: c, action: n, forced: i, standard: s };
|
|
2182
1250
|
}, "normalizeSignal");
|
|
2183
1251
|
|
|
2184
1252
|
// node_modules/human-signals/build/src/main.js
|
|
2185
|
-
var
|
|
2186
|
-
let e =
|
|
2187
|
-
return Object.fromEntries(e.map(
|
|
2188
|
-
}, "getSignalsByName"),
|
|
1253
|
+
var pi = /* @__PURE__ */ o(() => {
|
|
1254
|
+
let e = Ue();
|
|
1255
|
+
return Object.fromEntries(e.map(mi));
|
|
1256
|
+
}, "getSignalsByName"), mi = /* @__PURE__ */ o(({
|
|
2189
1257
|
name: e,
|
|
2190
1258
|
number: t,
|
|
2191
1259
|
description: r,
|
|
@@ -2193,15 +1261,15 @@ var Sc = /* @__PURE__ */ o(() => {
|
|
|
2193
1261
|
action: i,
|
|
2194
1262
|
forced: s,
|
|
2195
1263
|
standard: a
|
|
2196
|
-
}) => [e, { name: e, number: t, description: r, supported: n, action: i, forced: s, standard: a }], "getSignalByName"),
|
|
1264
|
+
}) => [e, { name: e, number: t, description: r, supported: n, action: i, forced: s, standard: a }], "getSignalByName"), Nr = pi(), di = /* @__PURE__ */ o(
|
|
2197
1265
|
() => {
|
|
2198
|
-
let e =
|
|
1266
|
+
let e = Ue(), t = Ge + 1, r = Array.from(
|
|
2199
1267
|
{ length: t },
|
|
2200
|
-
(n, i) =>
|
|
1268
|
+
(n, i) => yi(i, e)
|
|
2201
1269
|
);
|
|
2202
1270
|
return Object.assign({}, ...r);
|
|
2203
|
-
}, "getSignalsByNumber"),
|
|
2204
|
-
let r =
|
|
1271
|
+
}, "getSignalsByNumber"), yi = /* @__PURE__ */ o((e, t) => {
|
|
1272
|
+
let r = hi(e, t);
|
|
2205
1273
|
if (r === void 0)
|
|
2206
1274
|
return {};
|
|
2207
1275
|
let { name: n, description: i, supported: s, action: a, forced: c, standard: u } = r;
|
|
@@ -2216,15 +1284,15 @@ var Sc = /* @__PURE__ */ o(() => {
|
|
|
2216
1284
|
standard: u
|
|
2217
1285
|
}
|
|
2218
1286
|
};
|
|
2219
|
-
}, "getSignalByNumber"),
|
|
2220
|
-
let r = t.find(({ name: n }) =>
|
|
1287
|
+
}, "getSignalByNumber"), hi = /* @__PURE__ */ o((e, t) => {
|
|
1288
|
+
let r = t.find(({ name: n }) => li.signals[n] === e);
|
|
2221
1289
|
return r !== void 0 ? r : t.find((n) => n.number === e);
|
|
2222
|
-
}, "findSignalByNumber"),
|
|
1290
|
+
}, "findSignalByNumber"), ou = di();
|
|
2223
1291
|
|
|
2224
1292
|
// node_modules/execa/lib/error.js
|
|
2225
|
-
var
|
|
1293
|
+
var bi = /* @__PURE__ */ o(({ timedOut: e, timeout: t, errorCode: r, signal: n, signalDescription: i, exitCode: s, isCanceled: a }) => e ? `\
|
|
2226
1294
|
timed out after ${t} milliseconds` : a ? "was canceled" : r !== void 0 ? `failed with ${r}` : n !== void 0 ? `was killed with ${n} (${i})` :
|
|
2227
|
-
s !== void 0 ? `failed with exit code ${s}` : "failed", "getErrorPrefix"),
|
|
1295
|
+
s !== void 0 ? `failed with exit code ${s}` : "failed", "getErrorPrefix"), M = /* @__PURE__ */ o(({
|
|
2228
1296
|
stdout: e,
|
|
2229
1297
|
stderr: t,
|
|
2230
1298
|
all: r,
|
|
@@ -2234,44 +1302,44 @@ s !== void 0 ? `failed with exit code ${s}` : "failed", "getErrorPrefix"), ee =
|
|
|
2234
1302
|
command: a,
|
|
2235
1303
|
escapedCommand: c,
|
|
2236
1304
|
timedOut: u,
|
|
2237
|
-
isCanceled:
|
|
2238
|
-
killed:
|
|
2239
|
-
parsed: { options: { timeout:
|
|
1305
|
+
isCanceled: f,
|
|
1306
|
+
killed: l,
|
|
1307
|
+
parsed: { options: { timeout: d, cwd: h = gi.cwd() } }
|
|
2240
1308
|
}) => {
|
|
2241
1309
|
s = s === null ? void 0 : s, i = i === null ? void 0 : i;
|
|
2242
|
-
let
|
|
2243
|
-
exitCode: s, isCanceled:
|
|
2244
|
-
${n.message}` :
|
|
1310
|
+
let y = i === void 0 ? void 0 : Nr[i].description, g = n && n.code, b = `Command ${bi({ timedOut: u, timeout: d, errorCode: g, signal: i, signalDescription: y,
|
|
1311
|
+
exitCode: s, isCanceled: f })}: ${a}`, C = Object.prototype.toString.call(n) === "[object Error]", k = C ? `${b}
|
|
1312
|
+
${n.message}` : b, I = [k, t, e].filter(Boolean).join(`
|
|
2245
1313
|
`);
|
|
2246
|
-
return
|
|
2247
|
-
s, n.signal = i, n.signalDescription =
|
|
2248
|
-
bufferedData, n.failed = !0, n.timedOut = !!u, n.isCanceled =
|
|
1314
|
+
return C ? (n.originalMessage = n.message, n.message = I) : n = new Error(I), n.shortMessage = k, n.command = a, n.escapedCommand = c, n.exitCode =
|
|
1315
|
+
s, n.signal = i, n.signalDescription = y, n.stdout = e, n.stderr = t, n.cwd = h, r !== void 0 && (n.all = r), "bufferedData" in n && delete n.
|
|
1316
|
+
bufferedData, n.failed = !0, n.timedOut = !!u, n.isCanceled = f, n.killed = l && !u, n;
|
|
2249
1317
|
}, "makeError");
|
|
2250
1318
|
|
|
2251
1319
|
// node_modules/execa/lib/stdio.js
|
|
2252
|
-
var
|
|
1320
|
+
var te = ["stdin", "stdout", "stderr"], xi = /* @__PURE__ */ o((e) => te.some((t) => e[t] !== void 0), "hasAlias"), Dr = /* @__PURE__ */ o((e) => {
|
|
2253
1321
|
if (!e)
|
|
2254
1322
|
return;
|
|
2255
1323
|
let { stdio: t } = e;
|
|
2256
1324
|
if (t === void 0)
|
|
2257
|
-
return
|
|
2258
|
-
if (
|
|
2259
|
-
throw new Error(`It's not possible to provide \`stdio\` in combination with one of ${
|
|
1325
|
+
return te.map((n) => e[n]);
|
|
1326
|
+
if (xi(e))
|
|
1327
|
+
throw new Error(`It's not possible to provide \`stdio\` in combination with one of ${te.map((n) => `\`${n}\``).join(", ")}`);
|
|
2260
1328
|
if (typeof t == "string")
|
|
2261
1329
|
return t;
|
|
2262
1330
|
if (!Array.isArray(t))
|
|
2263
1331
|
throw new TypeError(`Expected \`stdio\` to be of type \`string\` or \`Array\`, got \`${typeof t}\``);
|
|
2264
|
-
let r = Math.max(t.length,
|
|
1332
|
+
let r = Math.max(t.length, te.length);
|
|
2265
1333
|
return Array.from({ length: r }, (n, i) => t[i]);
|
|
2266
1334
|
}, "normalizeStdio");
|
|
2267
1335
|
|
|
2268
1336
|
// node_modules/execa/lib/kill.js
|
|
2269
|
-
import
|
|
1337
|
+
import ki from "node:os";
|
|
2270
1338
|
|
|
2271
1339
|
// node_modules/signal-exit/dist/mjs/signals.js
|
|
2272
|
-
var
|
|
2273
|
-
|
|
2274
|
-
process.platform !== "win32" &&
|
|
1340
|
+
var v = [];
|
|
1341
|
+
v.push("SIGHUP", "SIGINT", "SIGTERM");
|
|
1342
|
+
process.platform !== "win32" && v.push(
|
|
2275
1343
|
"SIGALRM",
|
|
2276
1344
|
"SIGABRT",
|
|
2277
1345
|
"SIGVTALRM",
|
|
@@ -2286,12 +1354,12 @@ process.platform !== "win32" && N.push(
|
|
|
2286
1354
|
// see #21
|
|
2287
1355
|
// 'SIGPROF'
|
|
2288
1356
|
);
|
|
2289
|
-
process.platform === "linux" &&
|
|
1357
|
+
process.platform === "linux" && v.push("SIGIO", "SIGPOLL", "SIGPWR", "SIGSTKFLT");
|
|
2290
1358
|
|
|
2291
1359
|
// node_modules/signal-exit/dist/mjs/index.js
|
|
2292
|
-
var
|
|
1360
|
+
var re = /* @__PURE__ */ o((e) => !!e && typeof e == "object" && typeof e.removeListener == "function" && typeof e.emit == "function" && typeof e.
|
|
2293
1361
|
reallyExit == "function" && typeof e.listeners == "function" && typeof e.kill == "function" && typeof e.pid == "number" && typeof e.on == "f\
|
|
2294
|
-
unction", "processOk"),
|
|
1362
|
+
unction", "processOk"), $e = Symbol.for("signal-exit emitter"), We = globalThis, wi = Object.defineProperty.bind(Object), He = class {
|
|
2295
1363
|
static {
|
|
2296
1364
|
o(this, "Emitter");
|
|
2297
1365
|
}
|
|
@@ -2306,9 +1374,9 @@ unction", "processOk"), At = Symbol.for("signal-exit emitter"), Rt = globalThis,
|
|
|
2306
1374
|
count = 0;
|
|
2307
1375
|
id = Math.random();
|
|
2308
1376
|
constructor() {
|
|
2309
|
-
if (
|
|
2310
|
-
return
|
|
2311
|
-
|
|
1377
|
+
if (We[$e])
|
|
1378
|
+
return We[$e];
|
|
1379
|
+
wi(We, $e, {
|
|
2312
1380
|
value: this,
|
|
2313
1381
|
writable: !1,
|
|
2314
1382
|
enumerable: !1,
|
|
@@ -2331,11 +1399,11 @@ unction", "processOk"), At = Symbol.for("signal-exit emitter"), Rt = globalThis,
|
|
|
2331
1399
|
i = s(r, n) === !0 || i;
|
|
2332
1400
|
return t === "exit" && (i = this.emit("afterExit", r, n) || i), i;
|
|
2333
1401
|
}
|
|
2334
|
-
},
|
|
1402
|
+
}, ne = class {
|
|
2335
1403
|
static {
|
|
2336
1404
|
o(this, "SignalExitBase");
|
|
2337
1405
|
}
|
|
2338
|
-
},
|
|
1406
|
+
}, Si = /* @__PURE__ */ o((e) => ({
|
|
2339
1407
|
onExit(t, r) {
|
|
2340
1408
|
return e.onExit(t, r);
|
|
2341
1409
|
},
|
|
@@ -2345,7 +1413,7 @@ unction", "processOk"), At = Symbol.for("signal-exit emitter"), Rt = globalThis,
|
|
|
2345
1413
|
unload() {
|
|
2346
1414
|
return e.unload();
|
|
2347
1415
|
}
|
|
2348
|
-
}), "signalExitWrap"),
|
|
1416
|
+
}), "signalExitWrap"), Je = class extends ne {
|
|
2349
1417
|
static {
|
|
2350
1418
|
o(this, "SignalExitFallback");
|
|
2351
1419
|
}
|
|
@@ -2357,16 +1425,16 @@ unction", "processOk"), At = Symbol.for("signal-exit emitter"), Rt = globalThis,
|
|
|
2357
1425
|
}
|
|
2358
1426
|
unload() {
|
|
2359
1427
|
}
|
|
2360
|
-
},
|
|
1428
|
+
}, Ve = class extends ne {
|
|
2361
1429
|
static {
|
|
2362
1430
|
o(this, "SignalExit");
|
|
2363
1431
|
}
|
|
2364
1432
|
// "SIGHUP" throws an `ENOSYS` error on Windows,
|
|
2365
1433
|
// so use a supported signal instead
|
|
2366
1434
|
/* c8 ignore start */
|
|
2367
|
-
#s =
|
|
1435
|
+
#s = qe.platform === "win32" ? "SIGINT" : "SIGHUP";
|
|
2368
1436
|
/* c8 ignore stop */
|
|
2369
|
-
#t = new
|
|
1437
|
+
#t = new He();
|
|
2370
1438
|
#e;
|
|
2371
1439
|
#o;
|
|
2372
1440
|
#i;
|
|
@@ -2374,7 +1442,7 @@ unction", "processOk"), At = Symbol.for("signal-exit emitter"), Rt = globalThis,
|
|
|
2374
1442
|
#r = !1;
|
|
2375
1443
|
constructor(t) {
|
|
2376
1444
|
super(), this.#e = t, this.#n = {};
|
|
2377
|
-
for (let r of
|
|
1445
|
+
for (let r of v)
|
|
2378
1446
|
this.#n[r] = () => {
|
|
2379
1447
|
let n = this.#e.listeners(r), { count: i } = this.#t, s = t;
|
|
2380
1448
|
if (typeof s.__signal_exit_emitter__ == "object" && typeof s.__signal_exit_emitter__.count == "number" && (i += s.__signal_exit_emitter__.
|
|
@@ -2387,7 +1455,7 @@ unction", "processOk"), At = Symbol.for("signal-exit emitter"), Rt = globalThis,
|
|
|
2387
1455
|
this.#i = t.reallyExit, this.#o = t.emit;
|
|
2388
1456
|
}
|
|
2389
1457
|
onExit(t, r) {
|
|
2390
|
-
if (!
|
|
1458
|
+
if (!re(this.#e))
|
|
2391
1459
|
return () => {
|
|
2392
1460
|
};
|
|
2393
1461
|
this.#r === !1 && this.load();
|
|
@@ -2399,7 +1467,7 @@ unction", "processOk"), At = Symbol.for("signal-exit emitter"), Rt = globalThis,
|
|
|
2399
1467
|
load() {
|
|
2400
1468
|
if (!this.#r) {
|
|
2401
1469
|
this.#r = !0, this.#t.count += 1;
|
|
2402
|
-
for (let t of
|
|
1470
|
+
for (let t of v)
|
|
2403
1471
|
try {
|
|
2404
1472
|
let r = this.#n[t];
|
|
2405
1473
|
r && this.#e.on(t, r);
|
|
@@ -2409,7 +1477,7 @@ unction", "processOk"), At = Symbol.for("signal-exit emitter"), Rt = globalThis,
|
|
|
2409
1477
|
}
|
|
2410
1478
|
}
|
|
2411
1479
|
unload() {
|
|
2412
|
-
this.#r && (this.#r = !1,
|
|
1480
|
+
this.#r && (this.#r = !1, v.forEach((t) => {
|
|
2413
1481
|
let r = this.#n[t];
|
|
2414
1482
|
if (!r)
|
|
2415
1483
|
throw new Error("Listener not defined for signal: " + t);
|
|
@@ -2420,19 +1488,19 @@ unction", "processOk"), At = Symbol.for("signal-exit emitter"), Rt = globalThis,
|
|
|
2420
1488
|
}), this.#e.emit = this.#o, this.#e.reallyExit = this.#i, this.#t.count -= 1);
|
|
2421
1489
|
}
|
|
2422
1490
|
#a(t) {
|
|
2423
|
-
return
|
|
1491
|
+
return re(this.#e) ? (this.#e.exitCode = t || 0, this.#t.emit("exit", this.#e.exitCode, null), this.#i.call(this.#e, this.#e.exitCode)) :
|
|
2424
1492
|
0;
|
|
2425
1493
|
}
|
|
2426
1494
|
#c(t, ...r) {
|
|
2427
1495
|
let n = this.#o;
|
|
2428
|
-
if (t === "exit" &&
|
|
1496
|
+
if (t === "exit" && re(this.#e)) {
|
|
2429
1497
|
typeof r[0] == "number" && (this.#e.exitCode = r[0]);
|
|
2430
1498
|
let i = n.call(this.#e, t, ...r);
|
|
2431
1499
|
return this.#t.emit("exit", this.#e.exitCode, null), i;
|
|
2432
1500
|
} else
|
|
2433
1501
|
return n.call(this.#e, t, ...r);
|
|
2434
1502
|
}
|
|
2435
|
-
},
|
|
1503
|
+
}, qe = globalThis.process, {
|
|
2436
1504
|
/**
|
|
2437
1505
|
* Called when the process is exiting, whether via signal, explicit
|
|
2438
1506
|
* exit, or running out of stuff to do.
|
|
@@ -2442,7 +1510,7 @@ unction", "processOk"), At = Symbol.for("signal-exit emitter"), Rt = globalThis,
|
|
|
2442
1510
|
*
|
|
2443
1511
|
* Returns a function that may be used to unload signal-exit.
|
|
2444
1512
|
*/
|
|
2445
|
-
onExit:
|
|
1513
|
+
onExit: _r,
|
|
2446
1514
|
/**
|
|
2447
1515
|
* Load the listeners. Likely you never need to call this, unless
|
|
2448
1516
|
* doing a rather deep integration with signal-exit functionality.
|
|
@@ -2450,7 +1518,7 @@ unction", "processOk"), At = Symbol.for("signal-exit emitter"), Rt = globalThis,
|
|
|
2450
1518
|
*
|
|
2451
1519
|
* @internal
|
|
2452
1520
|
*/
|
|
2453
|
-
load:
|
|
1521
|
+
load: yu,
|
|
2454
1522
|
/**
|
|
2455
1523
|
* Unload the listeners. Likely you never need to call this, unless
|
|
2456
1524
|
* doing a rather deep integration with signal-exit functionality.
|
|
@@ -2458,49 +1526,49 @@ unction", "processOk"), At = Symbol.for("signal-exit emitter"), Rt = globalThis,
|
|
|
2458
1526
|
*
|
|
2459
1527
|
* @internal
|
|
2460
1528
|
*/
|
|
2461
|
-
unload:
|
|
2462
|
-
} =
|
|
1529
|
+
unload: hu
|
|
1530
|
+
} = Si(re(qe) ? new Ve(qe) : new Je());
|
|
2463
1531
|
|
|
2464
1532
|
// node_modules/execa/lib/kill.js
|
|
2465
|
-
var
|
|
1533
|
+
var Ei = 1e3 * 5, Mr = /* @__PURE__ */ o((e, t = "SIGTERM", r = {}) => {
|
|
2466
1534
|
let n = e(t);
|
|
2467
|
-
return
|
|
2468
|
-
}, "spawnedKill"),
|
|
2469
|
-
if (!
|
|
1535
|
+
return Pi(e, t, r, n), n;
|
|
1536
|
+
}, "spawnedKill"), Pi = /* @__PURE__ */ o((e, t, r, n) => {
|
|
1537
|
+
if (!vi(t, r, n))
|
|
2470
1538
|
return;
|
|
2471
|
-
let i =
|
|
1539
|
+
let i = Ci(r), s = setTimeout(() => {
|
|
2472
1540
|
e("SIGKILL");
|
|
2473
1541
|
}, i);
|
|
2474
1542
|
s.unref && s.unref();
|
|
2475
|
-
}, "setKillTimeout"),
|
|
2476
|
-
(e) => e ===
|
|
1543
|
+
}, "setKillTimeout"), vi = /* @__PURE__ */ o((e, { forceKillAfterTimeout: t }, r) => Ti(e) && t !== !1 && r, "shouldForceKill"), Ti = /* @__PURE__ */ o(
|
|
1544
|
+
(e) => e === ki.constants.signals.SIGTERM || typeof e == "string" && e.toUpperCase() === "SIGTERM", "isSigterm"), Ci = /* @__PURE__ */ o(({ forceKillAfterTimeout: e = !0 }) => {
|
|
2477
1545
|
if (e === !0)
|
|
2478
|
-
return
|
|
1546
|
+
return Ei;
|
|
2479
1547
|
if (!Number.isFinite(e) || e < 0)
|
|
2480
1548
|
throw new TypeError(`Expected the \`forceKillAfterTimeout\` option to be a non-negative integer, got \`${e}\` (${typeof e})`);
|
|
2481
1549
|
return e;
|
|
2482
|
-
}, "getForceKillAfterTimeout"),
|
|
1550
|
+
}, "getForceKillAfterTimeout"), Lr = /* @__PURE__ */ o((e, t) => {
|
|
2483
1551
|
e.kill() && (t.isCanceled = !0);
|
|
2484
|
-
}, "spawnedCancel"),
|
|
1552
|
+
}, "spawnedCancel"), Ii = /* @__PURE__ */ o((e, t, r) => {
|
|
2485
1553
|
e.kill(t), r(Object.assign(new Error("Timed out"), { timedOut: !0, signal: t }));
|
|
2486
|
-
}, "timeoutKill"),
|
|
1554
|
+
}, "timeoutKill"), Fr = /* @__PURE__ */ o((e, { timeout: t, killSignal: r = "SIGTERM" }, n) => {
|
|
2487
1555
|
if (t === 0 || t === void 0)
|
|
2488
1556
|
return n;
|
|
2489
1557
|
let i, s = new Promise((c, u) => {
|
|
2490
1558
|
i = setTimeout(() => {
|
|
2491
|
-
|
|
1559
|
+
Ii(e, r, u);
|
|
2492
1560
|
}, t);
|
|
2493
1561
|
}), a = n.finally(() => {
|
|
2494
1562
|
clearTimeout(i);
|
|
2495
1563
|
});
|
|
2496
1564
|
return Promise.race([s, a]);
|
|
2497
|
-
}, "setupTimeout"),
|
|
1565
|
+
}, "setupTimeout"), Br = /* @__PURE__ */ o(({ timeout: e }) => {
|
|
2498
1566
|
if (e !== void 0 && (!Number.isFinite(e) || e < 0))
|
|
2499
1567
|
throw new TypeError(`Expected the \`timeout\` option to be a non-negative integer, got \`${e}\` (${typeof e})`);
|
|
2500
|
-
}, "validateTimeout"),
|
|
1568
|
+
}, "validateTimeout"), Gr = /* @__PURE__ */ o(async (e, { cleanup: t, detached: r }, n) => {
|
|
2501
1569
|
if (!t || r)
|
|
2502
1570
|
return n;
|
|
2503
|
-
let i =
|
|
1571
|
+
let i = _r(() => {
|
|
2504
1572
|
e.kill();
|
|
2505
1573
|
});
|
|
2506
1574
|
return n.finally(() => {
|
|
@@ -2509,70 +1577,70 @@ var Rc = 1e3 * 5, So = /* @__PURE__ */ o((e, t = "SIGTERM", r = {}) => {
|
|
|
2509
1577
|
}, "setExitHandler");
|
|
2510
1578
|
|
|
2511
1579
|
// node_modules/execa/lib/pipe.js
|
|
2512
|
-
import { createWriteStream as
|
|
2513
|
-
import { ChildProcess as
|
|
1580
|
+
import { createWriteStream as Ai } from "node:fs";
|
|
1581
|
+
import { ChildProcess as Oi } from "node:child_process";
|
|
2514
1582
|
|
|
2515
1583
|
// node_modules/is-stream/index.js
|
|
2516
|
-
function
|
|
1584
|
+
function oe(e) {
|
|
2517
1585
|
return e !== null && typeof e == "object" && typeof e.pipe == "function";
|
|
2518
1586
|
}
|
|
2519
|
-
o(
|
|
2520
|
-
function
|
|
2521
|
-
return
|
|
1587
|
+
o(oe, "isStream");
|
|
1588
|
+
function ze(e) {
|
|
1589
|
+
return oe(e) && e.writable !== !1 && typeof e._write == "function" && typeof e._writableState == "object";
|
|
2522
1590
|
}
|
|
2523
|
-
o(
|
|
1591
|
+
o(ze, "isWritableStream");
|
|
2524
1592
|
|
|
2525
1593
|
// node_modules/execa/lib/pipe.js
|
|
2526
|
-
var
|
|
1594
|
+
var ji = /* @__PURE__ */ o((e) => e instanceof Oi && typeof e.then == "function", "isExecaChildProcess"), Ye = /* @__PURE__ */ o((e, t, r) => {
|
|
2527
1595
|
if (typeof r == "string")
|
|
2528
|
-
return e[t].pipe(
|
|
2529
|
-
if (
|
|
1596
|
+
return e[t].pipe(Ai(r)), e;
|
|
1597
|
+
if (ze(r))
|
|
2530
1598
|
return e[t].pipe(r), e;
|
|
2531
|
-
if (!
|
|
1599
|
+
if (!ji(r))
|
|
2532
1600
|
throw new TypeError("The second argument must be a string, a stream or an Execa child process.");
|
|
2533
|
-
if (!
|
|
1601
|
+
if (!ze(r.stdin))
|
|
2534
1602
|
throw new TypeError("The target child process's stdin must be available.");
|
|
2535
1603
|
return e[t].pipe(r.stdin), r;
|
|
2536
|
-
}, "pipeToTarget"),
|
|
2537
|
-
e.stdout !== null && (e.pipeStdout =
|
|
2538
|
-
all !== void 0 && (e.pipeAll =
|
|
1604
|
+
}, "pipeToTarget"), Ur = /* @__PURE__ */ o((e) => {
|
|
1605
|
+
e.stdout !== null && (e.pipeStdout = Ye.bind(void 0, e, "stdout")), e.stderr !== null && (e.pipeStderr = Ye.bind(void 0, e, "stderr")), e.
|
|
1606
|
+
all !== void 0 && (e.pipeAll = Ye.bind(void 0, e, "all"));
|
|
2539
1607
|
}, "addPipeMethods");
|
|
2540
1608
|
|
|
2541
1609
|
// node_modules/execa/lib/stream.js
|
|
2542
|
-
import { createReadStream as
|
|
2543
|
-
import { setTimeout as
|
|
1610
|
+
import { createReadStream as Ki, readFileSync as Xi } from "node:fs";
|
|
1611
|
+
import { setTimeout as Qi } from "node:timers/promises";
|
|
2544
1612
|
|
|
2545
1613
|
// node_modules/get-stream/source/contents.js
|
|
2546
|
-
var
|
|
1614
|
+
var L = /* @__PURE__ */ o(async (e, { init: t, convertChunk: r, getSize: n, truncateChunk: i, addChunk: s, getFinalChunk: a, finalize: c }, {
|
|
2547
1615
|
maxBuffer: u = Number.POSITIVE_INFINITY } = {}) => {
|
|
2548
|
-
if (!
|
|
1616
|
+
if (!Ni(e))
|
|
2549
1617
|
throw new Error("The first argument must be a Readable, a ReadableStream, or an async iterable.");
|
|
2550
|
-
let
|
|
2551
|
-
|
|
1618
|
+
let f = t();
|
|
1619
|
+
f.length = 0;
|
|
2552
1620
|
try {
|
|
2553
|
-
for await (let
|
|
2554
|
-
let
|
|
2555
|
-
|
|
1621
|
+
for await (let l of e) {
|
|
1622
|
+
let d = Di(l), h = r[d](l, f);
|
|
1623
|
+
Hr({ convertedChunk: h, state: f, getSize: n, truncateChunk: i, addChunk: s, maxBuffer: u });
|
|
2556
1624
|
}
|
|
2557
|
-
return
|
|
2558
|
-
} catch (
|
|
2559
|
-
throw
|
|
1625
|
+
return Ri({ state: f, convertChunk: r, getSize: n, truncateChunk: i, addChunk: s, getFinalChunk: a, maxBuffer: u }), c(f);
|
|
1626
|
+
} catch (l) {
|
|
1627
|
+
throw l.bufferedData = c(f), l;
|
|
2560
1628
|
}
|
|
2561
|
-
}, "getStreamContents"),
|
|
1629
|
+
}, "getStreamContents"), Ri = /* @__PURE__ */ o(({ state: e, getSize: t, truncateChunk: r, addChunk: n, getFinalChunk: i, maxBuffer: s }) => {
|
|
2562
1630
|
let a = i(e);
|
|
2563
|
-
a !== void 0 &&
|
|
2564
|
-
}, "appendFinalChunk"),
|
|
1631
|
+
a !== void 0 && Hr({ convertedChunk: a, state: e, getSize: t, truncateChunk: r, addChunk: n, maxBuffer: s });
|
|
1632
|
+
}, "appendFinalChunk"), Hr = /* @__PURE__ */ o(({ convertedChunk: e, state: t, getSize: r, truncateChunk: n, addChunk: i, maxBuffer: s }) => {
|
|
2565
1633
|
let a = r(e), c = t.length + a;
|
|
2566
1634
|
if (c <= s) {
|
|
2567
|
-
|
|
1635
|
+
$r(e, t, i, c);
|
|
2568
1636
|
return;
|
|
2569
1637
|
}
|
|
2570
1638
|
let u = n(e, s - t.length);
|
|
2571
|
-
throw u !== void 0 &&
|
|
2572
|
-
}, "appendChunk"),
|
|
1639
|
+
throw u !== void 0 && $r(u, t, i, s), new ie();
|
|
1640
|
+
}, "appendChunk"), $r = /* @__PURE__ */ o((e, t, r, n) => {
|
|
2573
1641
|
t.contents = r(e, t, n), t.length = n;
|
|
2574
|
-
}, "addNewChunk"),
|
|
2575
|
-
cIterable"),
|
|
1642
|
+
}, "addNewChunk"), Ni = /* @__PURE__ */ o((e) => typeof e == "object" && e !== null && typeof e[Symbol.asyncIterator] == "function", "isAsyn\
|
|
1643
|
+
cIterable"), Di = /* @__PURE__ */ o((e) => {
|
|
2576
1644
|
let t = typeof e;
|
|
2577
1645
|
if (t === "string")
|
|
2578
1646
|
return "string";
|
|
@@ -2580,10 +1648,10 @@ cIterable"), $c = /* @__PURE__ */ o((e) => {
|
|
|
2580
1648
|
return "others";
|
|
2581
1649
|
if (globalThis.Buffer?.isBuffer(e))
|
|
2582
1650
|
return "buffer";
|
|
2583
|
-
let r =
|
|
1651
|
+
let r = Wr.call(e);
|
|
2584
1652
|
return r === "[object ArrayBuffer]" ? "arrayBuffer" : r === "[object DataView]" ? "dataView" : Number.isInteger(e.byteLength) && Number.isInteger(
|
|
2585
|
-
e.byteOffset) &&
|
|
2586
|
-
}, "getChunkType"), { toString:
|
|
1653
|
+
e.byteOffset) && Wr.call(e.buffer) === "[object ArrayBuffer]" ? "typedArray" : "others";
|
|
1654
|
+
}, "getChunkType"), { toString: Wr } = Object.prototype, ie = class extends Error {
|
|
2587
1655
|
static {
|
|
2588
1656
|
o(this, "MaxBufferError");
|
|
2589
1657
|
}
|
|
@@ -2594,150 +1662,150 @@ cIterable"), $c = /* @__PURE__ */ o((e) => {
|
|
|
2594
1662
|
};
|
|
2595
1663
|
|
|
2596
1664
|
// node_modules/get-stream/source/utils.js
|
|
2597
|
-
var
|
|
2598
|
-
}, "noop"),
|
|
1665
|
+
var Ke = /* @__PURE__ */ o((e) => e, "identity"), Xe = /* @__PURE__ */ o(() => {
|
|
1666
|
+
}, "noop"), Qe = /* @__PURE__ */ o(({ contents: e }) => e, "getContentsProp"), se = /* @__PURE__ */ o((e) => {
|
|
2599
1667
|
throw new Error(`Streams in object mode are not supported: ${String(e)}`);
|
|
2600
|
-
}, "throwObjectStream"),
|
|
1668
|
+
}, "throwObjectStream"), ae = /* @__PURE__ */ o((e) => e.length, "getLengthProp");
|
|
2601
1669
|
|
|
2602
1670
|
// node_modules/get-stream/source/array-buffer.js
|
|
2603
|
-
async function
|
|
2604
|
-
return
|
|
1671
|
+
async function Ze(e, t) {
|
|
1672
|
+
return L(e, Wi, t);
|
|
2605
1673
|
}
|
|
2606
|
-
o(
|
|
2607
|
-
var
|
|
2608
|
-
tEncoder"),
|
|
2609
|
-
e.buffer, e.byteOffset, e.byteLength), "useUint8ArrayWithOffset"),
|
|
2610
|
-
|
|
2611
|
-
let i =
|
|
1674
|
+
o(Ze, "getStreamAsArrayBuffer");
|
|
1675
|
+
var _i = /* @__PURE__ */ o(() => ({ contents: new ArrayBuffer(0) }), "initArrayBuffer"), Mi = /* @__PURE__ */ o((e) => Li.encode(e), "useTex\
|
|
1676
|
+
tEncoder"), Li = new TextEncoder(), Jr = /* @__PURE__ */ o((e) => new Uint8Array(e), "useUint8Array"), Vr = /* @__PURE__ */ o((e) => new Uint8Array(
|
|
1677
|
+
e.buffer, e.byteOffset, e.byteLength), "useUint8ArrayWithOffset"), Fi = /* @__PURE__ */ o((e, t) => e.slice(0, t), "truncateArrayBufferChunk"),
|
|
1678
|
+
Bi = /* @__PURE__ */ o((e, { contents: t, length: r }, n) => {
|
|
1679
|
+
let i = Yr() ? Ui(t, n) : Gi(t, n);
|
|
2612
1680
|
return new Uint8Array(i).set(e, r), i;
|
|
2613
|
-
}, "addArrayBufferChunk"),
|
|
1681
|
+
}, "addArrayBufferChunk"), Gi = /* @__PURE__ */ o((e, t) => {
|
|
2614
1682
|
if (t <= e.byteLength)
|
|
2615
1683
|
return e;
|
|
2616
|
-
let r = new ArrayBuffer(
|
|
1684
|
+
let r = new ArrayBuffer(zr(t));
|
|
2617
1685
|
return new Uint8Array(r).set(new Uint8Array(e), 0), r;
|
|
2618
|
-
}, "resizeArrayBufferSlow"),
|
|
1686
|
+
}, "resizeArrayBufferSlow"), Ui = /* @__PURE__ */ o((e, t) => {
|
|
2619
1687
|
if (t <= e.maxByteLength)
|
|
2620
1688
|
return e.resize(t), e;
|
|
2621
|
-
let r = new ArrayBuffer(t, { maxByteLength:
|
|
1689
|
+
let r = new ArrayBuffer(t, { maxByteLength: zr(t) });
|
|
2622
1690
|
return new Uint8Array(r).set(new Uint8Array(e), 0), r;
|
|
2623
|
-
}, "resizeArrayBuffer"),
|
|
2624
|
-
({ contents: e, length: t }) =>
|
|
2625
|
-
"hasArrayBufferResize"),
|
|
2626
|
-
init:
|
|
1691
|
+
}, "resizeArrayBuffer"), zr = /* @__PURE__ */ o((e) => qr ** Math.ceil(Math.log(e) / Math.log(qr)), "getNewContentsLength"), qr = 2, $i = /* @__PURE__ */ o(
|
|
1692
|
+
({ contents: e, length: t }) => Yr() ? e : e.slice(0, t), "finalizeArrayBuffer"), Yr = /* @__PURE__ */ o(() => "resize" in ArrayBuffer.prototype,
|
|
1693
|
+
"hasArrayBufferResize"), Wi = {
|
|
1694
|
+
init: _i,
|
|
2627
1695
|
convertChunk: {
|
|
2628
|
-
string:
|
|
2629
|
-
buffer:
|
|
2630
|
-
arrayBuffer:
|
|
2631
|
-
dataView:
|
|
2632
|
-
typedArray:
|
|
2633
|
-
others:
|
|
1696
|
+
string: Mi,
|
|
1697
|
+
buffer: Jr,
|
|
1698
|
+
arrayBuffer: Jr,
|
|
1699
|
+
dataView: Vr,
|
|
1700
|
+
typedArray: Vr,
|
|
1701
|
+
others: se
|
|
2634
1702
|
},
|
|
2635
|
-
getSize:
|
|
2636
|
-
truncateChunk:
|
|
2637
|
-
addChunk:
|
|
2638
|
-
getFinalChunk:
|
|
2639
|
-
finalize:
|
|
1703
|
+
getSize: ae,
|
|
1704
|
+
truncateChunk: Fi,
|
|
1705
|
+
addChunk: Bi,
|
|
1706
|
+
getFinalChunk: Xe,
|
|
1707
|
+
finalize: $i
|
|
2640
1708
|
};
|
|
2641
1709
|
|
|
2642
1710
|
// node_modules/get-stream/source/buffer.js
|
|
2643
|
-
async function
|
|
1711
|
+
async function ce(e, t) {
|
|
2644
1712
|
if (!("Buffer" in globalThis))
|
|
2645
1713
|
throw new Error("getStreamAsBuffer() is only supported in Node.js");
|
|
2646
1714
|
try {
|
|
2647
|
-
return
|
|
1715
|
+
return Kr(await Ze(e, t));
|
|
2648
1716
|
} catch (r) {
|
|
2649
|
-
throw r.bufferedData !== void 0 && (r.bufferedData =
|
|
1717
|
+
throw r.bufferedData !== void 0 && (r.bufferedData = Kr(r.bufferedData)), r;
|
|
2650
1718
|
}
|
|
2651
1719
|
}
|
|
2652
|
-
o(
|
|
2653
|
-
var
|
|
1720
|
+
o(ce, "getStreamAsBuffer");
|
|
1721
|
+
var Kr = /* @__PURE__ */ o((e) => globalThis.Buffer.from(e), "arrayBufferToNodeBuffer");
|
|
2654
1722
|
|
|
2655
1723
|
// node_modules/get-stream/source/string.js
|
|
2656
|
-
async function
|
|
2657
|
-
return
|
|
1724
|
+
async function et(e, t) {
|
|
1725
|
+
return L(e, zi, t);
|
|
2658
1726
|
}
|
|
2659
|
-
o(
|
|
2660
|
-
var
|
|
2661
|
-
decode(e, { stream: !0 }), "useTextDecoder"),
|
|
2662
|
-
(e, t) => e.slice(0, t), "truncateStringChunk"),
|
|
1727
|
+
o(et, "getStreamAsString");
|
|
1728
|
+
var Hi = /* @__PURE__ */ o(() => ({ contents: "", textDecoder: new TextDecoder() }), "initString"), ue = /* @__PURE__ */ o((e, { textDecoder: t }) => t.
|
|
1729
|
+
decode(e, { stream: !0 }), "useTextDecoder"), Ji = /* @__PURE__ */ o((e, { contents: t }) => t + e, "addStringChunk"), Vi = /* @__PURE__ */ o(
|
|
1730
|
+
(e, t) => e.slice(0, t), "truncateStringChunk"), qi = /* @__PURE__ */ o(({ textDecoder: e }) => {
|
|
2663
1731
|
let t = e.decode();
|
|
2664
1732
|
return t === "" ? void 0 : t;
|
|
2665
|
-
}, "getFinalStringChunk"),
|
|
2666
|
-
init:
|
|
1733
|
+
}, "getFinalStringChunk"), zi = {
|
|
1734
|
+
init: Hi,
|
|
2667
1735
|
convertChunk: {
|
|
2668
|
-
string:
|
|
2669
|
-
buffer:
|
|
2670
|
-
arrayBuffer:
|
|
2671
|
-
dataView:
|
|
2672
|
-
typedArray:
|
|
2673
|
-
others:
|
|
1736
|
+
string: Ke,
|
|
1737
|
+
buffer: ue,
|
|
1738
|
+
arrayBuffer: ue,
|
|
1739
|
+
dataView: ue,
|
|
1740
|
+
typedArray: ue,
|
|
1741
|
+
others: se
|
|
2674
1742
|
},
|
|
2675
|
-
getSize:
|
|
2676
|
-
truncateChunk:
|
|
2677
|
-
addChunk:
|
|
2678
|
-
getFinalChunk:
|
|
2679
|
-
finalize:
|
|
1743
|
+
getSize: ae,
|
|
1744
|
+
truncateChunk: Vi,
|
|
1745
|
+
addChunk: Ji,
|
|
1746
|
+
getFinalChunk: qi,
|
|
1747
|
+
finalize: Qe
|
|
2680
1748
|
};
|
|
2681
1749
|
|
|
2682
1750
|
// node_modules/execa/lib/stream.js
|
|
2683
|
-
var
|
|
2684
|
-
var
|
|
1751
|
+
var Zr = A(Qr(), 1);
|
|
1752
|
+
var en = /* @__PURE__ */ o((e) => {
|
|
2685
1753
|
if (e !== void 0)
|
|
2686
1754
|
throw new TypeError("The `input` and `inputFile` options cannot be both set.");
|
|
2687
|
-
}, "validateInputOptions"),
|
|
2688
|
-
|
|
2689
|
-
let t =
|
|
2690
|
-
if (
|
|
1755
|
+
}, "validateInputOptions"), Zi = /* @__PURE__ */ o(({ input: e, inputFile: t }) => typeof t != "string" ? e : (en(e), Xi(t)), "getInputSync"),
|
|
1756
|
+
tn = /* @__PURE__ */ o((e) => {
|
|
1757
|
+
let t = Zi(e);
|
|
1758
|
+
if (oe(t))
|
|
2691
1759
|
throw new TypeError("The `input` option cannot be a stream in sync mode");
|
|
2692
1760
|
return t;
|
|
2693
|
-
}, "handleInputSync"),
|
|
1761
|
+
}, "handleInputSync"), es = /* @__PURE__ */ o(({ input: e, inputFile: t }) => typeof t != "string" ? e : (en(e), Ki(t)), "getInput"), rn = /* @__PURE__ */ o(
|
|
2694
1762
|
(e, t) => {
|
|
2695
|
-
let r =
|
|
2696
|
-
r !== void 0 && (
|
|
2697
|
-
}, "handleInput"),
|
|
1763
|
+
let r = es(t);
|
|
1764
|
+
r !== void 0 && (oe(r) ? r.pipe(e.stdin) : e.stdin.end(r));
|
|
1765
|
+
}, "handleInput"), nn = /* @__PURE__ */ o((e, { all: t }) => {
|
|
2698
1766
|
if (!t || !e.stdout && !e.stderr)
|
|
2699
1767
|
return;
|
|
2700
|
-
let r = (0,
|
|
1768
|
+
let r = (0, Zr.default)();
|
|
2701
1769
|
return e.stdout && r.add(e.stdout), e.stderr && r.add(e.stderr), r;
|
|
2702
|
-
}, "makeAllStream"),
|
|
1770
|
+
}, "makeAllStream"), tt = /* @__PURE__ */ o(async (e, t) => {
|
|
2703
1771
|
if (!(!e || t === void 0)) {
|
|
2704
|
-
await
|
|
1772
|
+
await Qi(0), e.destroy();
|
|
2705
1773
|
try {
|
|
2706
1774
|
return await t;
|
|
2707
1775
|
} catch (r) {
|
|
2708
1776
|
return r.bufferedData;
|
|
2709
1777
|
}
|
|
2710
1778
|
}
|
|
2711
|
-
}, "getBufferedData"),
|
|
1779
|
+
}, "getBufferedData"), rt = /* @__PURE__ */ o((e, { encoding: t, buffer: r, maxBuffer: n }) => {
|
|
2712
1780
|
if (!(!e || !r))
|
|
2713
|
-
return t === "utf8" || t === "utf-8" ?
|
|
2714
|
-
}, "getStreamPromise"),
|
|
1781
|
+
return t === "utf8" || t === "utf-8" ? et(e, { maxBuffer: n }) : t === null || t === "buffer" ? ce(e, { maxBuffer: n }) : ts(e, n, t);
|
|
1782
|
+
}, "getStreamPromise"), ts = /* @__PURE__ */ o(async (e, t, r) => (await ce(e, { maxBuffer: t })).toString(r), "applyEncoding"), on = /* @__PURE__ */ o(
|
|
2715
1783
|
async ({ stdout: e, stderr: t, all: r }, { encoding: n, buffer: i, maxBuffer: s }, a) => {
|
|
2716
|
-
let c =
|
|
1784
|
+
let c = rt(e, { encoding: n, buffer: i, maxBuffer: s }), u = rt(t, { encoding: n, buffer: i, maxBuffer: s }), f = rt(r, { encoding: n, buffer: i,
|
|
2717
1785
|
maxBuffer: s * 2 });
|
|
2718
1786
|
try {
|
|
2719
|
-
return await Promise.all([a, c, u,
|
|
2720
|
-
} catch (
|
|
1787
|
+
return await Promise.all([a, c, u, f]);
|
|
1788
|
+
} catch (l) {
|
|
2721
1789
|
return Promise.all([
|
|
2722
|
-
{ error:
|
|
2723
|
-
|
|
2724
|
-
|
|
2725
|
-
|
|
1790
|
+
{ error: l, signal: l.signal, timedOut: l.timedOut },
|
|
1791
|
+
tt(e, c),
|
|
1792
|
+
tt(t, u),
|
|
1793
|
+
tt(r, f)
|
|
2726
1794
|
]);
|
|
2727
1795
|
}
|
|
2728
1796
|
}, "getSpawnedResult");
|
|
2729
1797
|
|
|
2730
1798
|
// node_modules/execa/lib/promise.js
|
|
2731
|
-
var
|
|
2732
|
-
})().constructor.prototype,
|
|
1799
|
+
var rs = (async () => {
|
|
1800
|
+
})().constructor.prototype, ns = ["then", "catch", "finally"].map((e) => [
|
|
2733
1801
|
e,
|
|
2734
|
-
Reflect.getOwnPropertyDescriptor(
|
|
2735
|
-
]),
|
|
2736
|
-
for (let [r, n] of
|
|
1802
|
+
Reflect.getOwnPropertyDescriptor(rs, e)
|
|
1803
|
+
]), nt = /* @__PURE__ */ o((e, t) => {
|
|
1804
|
+
for (let [r, n] of ns) {
|
|
2737
1805
|
let i = typeof t == "function" ? (...s) => Reflect.apply(n.value, t(), s) : n.value.bind(t);
|
|
2738
1806
|
Reflect.defineProperty(e, r, { ...n, value: i });
|
|
2739
1807
|
}
|
|
2740
|
-
}, "mergePromise"),
|
|
1808
|
+
}, "mergePromise"), sn = /* @__PURE__ */ o((e) => new Promise((t, r) => {
|
|
2741
1809
|
e.on("exit", (n, i) => {
|
|
2742
1810
|
t({ exitCode: n, signal: i });
|
|
2743
1811
|
}), e.on("error", (n) => {
|
|
@@ -2748,102 +1816,102 @@ var uu = (async () => {
|
|
|
2748
1816
|
}), "getSpawnedPromise");
|
|
2749
1817
|
|
|
2750
1818
|
// node_modules/execa/lib/command.js
|
|
2751
|
-
import { Buffer as
|
|
2752
|
-
import { ChildProcess as
|
|
2753
|
-
var
|
|
2754
|
-
"string" ||
|
|
2755
|
-
d"),
|
|
1819
|
+
import { Buffer as os } from "node:buffer";
|
|
1820
|
+
import { ChildProcess as is } from "node:child_process";
|
|
1821
|
+
var un = /* @__PURE__ */ o((e, t = []) => Array.isArray(t) ? [e, ...t] : [e], "normalizeArgs"), ss = /^[\w.-]+$/, as = /* @__PURE__ */ o((e) => typeof e !=
|
|
1822
|
+
"string" || ss.test(e) ? e : `"${e.replaceAll('"', '\\"')}"`, "escapeArg"), ot = /* @__PURE__ */ o((e, t) => un(e, t).join(" "), "joinComman\
|
|
1823
|
+
d"), it = /* @__PURE__ */ o((e, t) => un(e, t).map((r) => as(r)).join(" "), "getEscapedCommand"), fn = / +/g, ln = /* @__PURE__ */ o((e) => {
|
|
2756
1824
|
let t = [];
|
|
2757
|
-
for (let r of e.trim().split(
|
|
1825
|
+
for (let r of e.trim().split(fn)) {
|
|
2758
1826
|
let n = t.at(-1);
|
|
2759
1827
|
n && n.endsWith("\\") ? t[t.length - 1] = `${n.slice(0, -1)} ${r}` : t.push(r);
|
|
2760
1828
|
}
|
|
2761
1829
|
return t;
|
|
2762
|
-
}, "parseCommand"),
|
|
1830
|
+
}, "parseCommand"), an = /* @__PURE__ */ o((e) => {
|
|
2763
1831
|
let t = typeof e;
|
|
2764
1832
|
if (t === "string")
|
|
2765
1833
|
return e;
|
|
2766
1834
|
if (t === "number")
|
|
2767
1835
|
return String(e);
|
|
2768
|
-
if (t === "object" && e !== null && !(e instanceof
|
|
1836
|
+
if (t === "object" && e !== null && !(e instanceof is) && "stdout" in e) {
|
|
2769
1837
|
let r = typeof e.stdout;
|
|
2770
1838
|
if (r === "string")
|
|
2771
1839
|
return e.stdout;
|
|
2772
|
-
if (
|
|
1840
|
+
if (os.isBuffer(e.stdout))
|
|
2773
1841
|
return e.stdout.toString();
|
|
2774
1842
|
throw new TypeError(`Unexpected "${r}" stdout in template expression`);
|
|
2775
1843
|
}
|
|
2776
1844
|
throw new TypeError(`Unexpected "${t}" in template expression`);
|
|
2777
|
-
}, "parseExpression"),
|
|
1845
|
+
}, "parseExpression"), cn = /* @__PURE__ */ o((e, t, r) => r || e.length === 0 || t.length === 0 ? [...e, ...t] : [
|
|
2778
1846
|
...e.slice(0, -1),
|
|
2779
1847
|
`${e.at(-1)}${t[0]}`,
|
|
2780
1848
|
...t.slice(1)
|
|
2781
|
-
], "concatTokens"),
|
|
2782
|
-
let s = i ?? e.raw[n], a = s.split(
|
|
1849
|
+
], "concatTokens"), cs = /* @__PURE__ */ o(({ templates: e, expressions: t, tokens: r, index: n, template: i }) => {
|
|
1850
|
+
let s = i ?? e.raw[n], a = s.split(fn).filter(Boolean), c = cn(
|
|
2783
1851
|
r,
|
|
2784
1852
|
a,
|
|
2785
1853
|
s.startsWith(" ")
|
|
2786
1854
|
);
|
|
2787
1855
|
if (n === t.length)
|
|
2788
1856
|
return c;
|
|
2789
|
-
let u = t[n],
|
|
2790
|
-
return
|
|
1857
|
+
let u = t[n], f = Array.isArray(u) ? u.map((l) => an(l)) : [an(u)];
|
|
1858
|
+
return cn(
|
|
2791
1859
|
c,
|
|
2792
|
-
|
|
1860
|
+
f,
|
|
2793
1861
|
s.endsWith(" ")
|
|
2794
1862
|
);
|
|
2795
|
-
}, "parseTemplate"),
|
|
1863
|
+
}, "parseTemplate"), st = /* @__PURE__ */ o((e, t) => {
|
|
2796
1864
|
let r = [];
|
|
2797
1865
|
for (let [n, i] of e.entries())
|
|
2798
|
-
r =
|
|
1866
|
+
r = cs({ templates: e, expressions: t, tokens: r, index: n, template: i });
|
|
2799
1867
|
return r;
|
|
2800
1868
|
}, "parseTemplates");
|
|
2801
1869
|
|
|
2802
1870
|
// node_modules/execa/lib/verbose.js
|
|
2803
|
-
import { debuglog as
|
|
2804
|
-
import
|
|
2805
|
-
var
|
|
1871
|
+
import { debuglog as us } from "node:util";
|
|
1872
|
+
import fs from "node:process";
|
|
1873
|
+
var pn = us("execa").enabled, fe = /* @__PURE__ */ o((e, t) => String(e).padStart(t, "0"), "padField"), ls = /* @__PURE__ */ o(() => {
|
|
2806
1874
|
let e = /* @__PURE__ */ new Date();
|
|
2807
|
-
return `${
|
|
2808
|
-
}, "getTimestamp"),
|
|
2809
|
-
t &&
|
|
1875
|
+
return `${fe(e.getHours(), 2)}:${fe(e.getMinutes(), 2)}:${fe(e.getSeconds(), 2)}.${fe(e.getMilliseconds(), 3)}`;
|
|
1876
|
+
}, "getTimestamp"), at = /* @__PURE__ */ o((e, { verbose: t }) => {
|
|
1877
|
+
t && fs.stderr.write(`[${ls()}] ${e}
|
|
2810
1878
|
`);
|
|
2811
1879
|
}, "logCommand");
|
|
2812
1880
|
|
|
2813
1881
|
// node_modules/execa/index.js
|
|
2814
|
-
var
|
|
2815
|
-
let s = t ? {
|
|
2816
|
-
return r ?
|
|
2817
|
-
}, "getEnv"),
|
|
2818
|
-
let n =
|
|
1882
|
+
var ds = 1e3 * 1e3 * 100, ys = /* @__PURE__ */ o(({ env: e, extendEnv: t, preferLocal: r, localDir: n, execPath: i }) => {
|
|
1883
|
+
let s = t ? { ...le.env, ...e } : e;
|
|
1884
|
+
return r ? Cr({ env: s, cwd: n, execPath: i }) : s;
|
|
1885
|
+
}, "getEnv"), yn = /* @__PURE__ */ o((e, t, r = {}) => {
|
|
1886
|
+
let n = dn.default._parse(e, t, r);
|
|
2819
1887
|
return e = n.command, t = n.args, r = n.options, r = {
|
|
2820
|
-
maxBuffer:
|
|
1888
|
+
maxBuffer: ds,
|
|
2821
1889
|
buffer: !0,
|
|
2822
1890
|
stripFinalNewline: !0,
|
|
2823
1891
|
extendEnv: !0,
|
|
2824
1892
|
preferLocal: !1,
|
|
2825
|
-
localDir: r.cwd ||
|
|
2826
|
-
execPath:
|
|
1893
|
+
localDir: r.cwd || le.cwd(),
|
|
1894
|
+
execPath: le.execPath,
|
|
2827
1895
|
encoding: "utf8",
|
|
2828
1896
|
reject: !0,
|
|
2829
1897
|
cleanup: !0,
|
|
2830
1898
|
all: !1,
|
|
2831
1899
|
windowsHide: !0,
|
|
2832
|
-
verbose:
|
|
1900
|
+
verbose: pn,
|
|
2833
1901
|
...r
|
|
2834
|
-
}, r.env =
|
|
1902
|
+
}, r.env = ys(r), r.stdio = Dr(r), le.platform === "win32" && ms.basename(e, ".exe") === "cmd" && t.unshift("/q"), { file: e, args: t, options: r,
|
|
2835
1903
|
parsed: n };
|
|
2836
|
-
}, "handleArguments"),
|
|
2837
|
-
|
|
2838
|
-
function
|
|
2839
|
-
let n =
|
|
2840
|
-
|
|
1904
|
+
}, "handleArguments"), F = /* @__PURE__ */ o((e, t, r) => typeof t != "string" && !ps.isBuffer(t) ? r === void 0 ? void 0 : "" : e.stripFinalNewline ?
|
|
1905
|
+
Fe(t) : t, "handleOutput");
|
|
1906
|
+
function hn(e, t, r) {
|
|
1907
|
+
let n = yn(e, t, r), i = ot(e, t), s = it(e, t);
|
|
1908
|
+
at(s, n.options), Br(n.options);
|
|
2841
1909
|
let a;
|
|
2842
1910
|
try {
|
|
2843
|
-
a =
|
|
2844
|
-
} catch (
|
|
2845
|
-
let
|
|
2846
|
-
error:
|
|
1911
|
+
a = ct.spawn(n.file, n.args, n.options);
|
|
1912
|
+
} catch (y) {
|
|
1913
|
+
let g = new ct.ChildProcess(), m = Promise.reject(M({
|
|
1914
|
+
error: y,
|
|
2847
1915
|
stdout: "",
|
|
2848
1916
|
stderr: "",
|
|
2849
1917
|
all: "",
|
|
@@ -2854,57 +1922,57 @@ function Xo(e, t, r) {
|
|
|
2854
1922
|
isCanceled: !1,
|
|
2855
1923
|
killed: !1
|
|
2856
1924
|
}));
|
|
2857
|
-
return
|
|
2858
|
-
}
|
|
2859
|
-
let c =
|
|
2860
|
-
a.kill =
|
|
2861
|
-
let
|
|
2862
|
-
let [{ error:
|
|
2863
|
-
|
|
2864
|
-
if (
|
|
2865
|
-
let
|
|
2866
|
-
error:
|
|
2867
|
-
exitCode:
|
|
2868
|
-
signal:
|
|
2869
|
-
stdout:
|
|
2870
|
-
stderr:
|
|
2871
|
-
all:
|
|
1925
|
+
return nt(g, m), g;
|
|
1926
|
+
}
|
|
1927
|
+
let c = sn(a), u = Fr(a, n.options, c), f = Gr(a, n.options, u), l = { isCanceled: !1 };
|
|
1928
|
+
a.kill = Mr.bind(null, a.kill.bind(a)), a.cancel = Lr.bind(null, a, l);
|
|
1929
|
+
let h = Ar(/* @__PURE__ */ o(async () => {
|
|
1930
|
+
let [{ error: y, exitCode: g, signal: m, timedOut: b }, C, k, I] = await on(a, n.options, f), W = F(n.options, C), H = F(n.options, k), p = F(
|
|
1931
|
+
n.options, I);
|
|
1932
|
+
if (y || g !== 0 || m !== null) {
|
|
1933
|
+
let w = M({
|
|
1934
|
+
error: y,
|
|
1935
|
+
exitCode: g,
|
|
1936
|
+
signal: m,
|
|
1937
|
+
stdout: W,
|
|
1938
|
+
stderr: H,
|
|
1939
|
+
all: p,
|
|
2872
1940
|
command: i,
|
|
2873
1941
|
escapedCommand: s,
|
|
2874
1942
|
parsed: n,
|
|
2875
|
-
timedOut:
|
|
2876
|
-
isCanceled:
|
|
1943
|
+
timedOut: b,
|
|
1944
|
+
isCanceled: l.isCanceled || (n.options.signal ? n.options.signal.aborted : !1),
|
|
2877
1945
|
killed: a.killed
|
|
2878
1946
|
});
|
|
2879
1947
|
if (!n.options.reject)
|
|
2880
|
-
return
|
|
2881
|
-
throw
|
|
1948
|
+
return w;
|
|
1949
|
+
throw w;
|
|
2882
1950
|
}
|
|
2883
1951
|
return {
|
|
2884
1952
|
command: i,
|
|
2885
1953
|
escapedCommand: s,
|
|
2886
1954
|
exitCode: 0,
|
|
2887
|
-
stdout:
|
|
2888
|
-
stderr:
|
|
2889
|
-
all:
|
|
1955
|
+
stdout: W,
|
|
1956
|
+
stderr: H,
|
|
1957
|
+
all: p,
|
|
2890
1958
|
failed: !1,
|
|
2891
1959
|
timedOut: !1,
|
|
2892
1960
|
isCanceled: !1,
|
|
2893
1961
|
killed: !1
|
|
2894
1962
|
};
|
|
2895
1963
|
}, "handlePromise"));
|
|
2896
|
-
return
|
|
1964
|
+
return rn(a, n.options), a.all = nn(a, n.options), Ur(a), nt(a, h), a;
|
|
2897
1965
|
}
|
|
2898
|
-
o(
|
|
2899
|
-
function
|
|
2900
|
-
let n =
|
|
2901
|
-
|
|
2902
|
-
let a =
|
|
1966
|
+
o(hn, "execa");
|
|
1967
|
+
function hs(e, t, r) {
|
|
1968
|
+
let n = yn(e, t, r), i = ot(e, t), s = it(e, t);
|
|
1969
|
+
at(s, n.options);
|
|
1970
|
+
let a = tn(n.options), c;
|
|
2903
1971
|
try {
|
|
2904
|
-
c =
|
|
2905
|
-
} catch (
|
|
2906
|
-
throw
|
|
2907
|
-
error:
|
|
1972
|
+
c = ct.spawnSync(n.file, n.args, { ...n.options, input: a });
|
|
1973
|
+
} catch (l) {
|
|
1974
|
+
throw M({
|
|
1975
|
+
error: l,
|
|
2908
1976
|
stdout: "",
|
|
2909
1977
|
stderr: "",
|
|
2910
1978
|
all: "",
|
|
@@ -2916,11 +1984,11 @@ function Pu(e, t, r) {
|
|
|
2916
1984
|
killed: !1
|
|
2917
1985
|
});
|
|
2918
1986
|
}
|
|
2919
|
-
let u =
|
|
1987
|
+
let u = F(n.options, c.stdout, c.error), f = F(n.options, c.stderr, c.error);
|
|
2920
1988
|
if (c.error || c.status !== 0 || c.signal !== null) {
|
|
2921
|
-
let
|
|
1989
|
+
let l = M({
|
|
2922
1990
|
stdout: u,
|
|
2923
|
-
stderr:
|
|
1991
|
+
stderr: f,
|
|
2924
1992
|
error: c.error,
|
|
2925
1993
|
signal: c.signal,
|
|
2926
1994
|
exitCode: c.status,
|
|
@@ -2932,84 +2000,84 @@ function Pu(e, t, r) {
|
|
|
2932
2000
|
killed: c.signal !== null
|
|
2933
2001
|
});
|
|
2934
2002
|
if (!n.options.reject)
|
|
2935
|
-
return
|
|
2936
|
-
throw
|
|
2003
|
+
return l;
|
|
2004
|
+
throw l;
|
|
2937
2005
|
}
|
|
2938
2006
|
return {
|
|
2939
2007
|
command: i,
|
|
2940
2008
|
escapedCommand: s,
|
|
2941
2009
|
exitCode: 0,
|
|
2942
2010
|
stdout: u,
|
|
2943
|
-
stderr:
|
|
2011
|
+
stderr: f,
|
|
2944
2012
|
failed: !1,
|
|
2945
2013
|
timedOut: !1,
|
|
2946
2014
|
isCanceled: !1,
|
|
2947
2015
|
killed: !1
|
|
2948
2016
|
};
|
|
2949
2017
|
}
|
|
2950
|
-
o(
|
|
2951
|
-
var
|
|
2952
|
-
"normalizeScriptStdin"),
|
|
2018
|
+
o(hs, "execaSync");
|
|
2019
|
+
var gs = /* @__PURE__ */ o(({ input: e, inputFile: t, stdio: r }) => e === void 0 && t === void 0 && r === void 0 ? { stdin: "inherit" } : {},
|
|
2020
|
+
"normalizeScriptStdin"), mn = /* @__PURE__ */ o((e = {}) => ({
|
|
2953
2021
|
preferLocal: !0,
|
|
2954
|
-
...
|
|
2022
|
+
...gs(e),
|
|
2955
2023
|
...e
|
|
2956
2024
|
}), "normalizeScriptOptions");
|
|
2957
|
-
function
|
|
2025
|
+
function gn(e) {
|
|
2958
2026
|
function t(r, ...n) {
|
|
2959
2027
|
if (!Array.isArray(r))
|
|
2960
|
-
return
|
|
2961
|
-
let [i, ...s] =
|
|
2962
|
-
return
|
|
2028
|
+
return gn({ ...e, ...r });
|
|
2029
|
+
let [i, ...s] = st(r, n);
|
|
2030
|
+
return hn(i, s, mn(e));
|
|
2963
2031
|
}
|
|
2964
2032
|
return o(t, "$"), t.sync = (r, ...n) => {
|
|
2965
2033
|
if (!Array.isArray(r))
|
|
2966
2034
|
throw new TypeError("Please use $(options).sync`command` instead of $.sync(options)`command`.");
|
|
2967
|
-
let [i, ...s] =
|
|
2968
|
-
return
|
|
2035
|
+
let [i, ...s] = st(r, n);
|
|
2036
|
+
return hs(i, s, mn(e));
|
|
2969
2037
|
}, t;
|
|
2970
2038
|
}
|
|
2971
|
-
o(
|
|
2972
|
-
var
|
|
2973
|
-
function
|
|
2974
|
-
let [r, ...n] =
|
|
2975
|
-
return
|
|
2039
|
+
o(gn, "create$");
|
|
2040
|
+
var Lf = gn();
|
|
2041
|
+
function bn(e, t) {
|
|
2042
|
+
let [r, ...n] = ln(e);
|
|
2043
|
+
return hn(r, n, t);
|
|
2976
2044
|
}
|
|
2977
|
-
o(
|
|
2045
|
+
o(bn, "execaCommand");
|
|
2978
2046
|
|
|
2979
2047
|
// src/telemetry/exec-command-count-lines.ts
|
|
2980
|
-
async function
|
|
2981
|
-
let r =
|
|
2048
|
+
async function pe(e, t) {
|
|
2049
|
+
let r = bn(e, { shell: !0, buffer: !1, ...t });
|
|
2982
2050
|
if (!r.stdout)
|
|
2983
2051
|
throw new Error("Unexpected missing stdout");
|
|
2984
|
-
let n = 0, i =
|
|
2052
|
+
let n = 0, i = bs(r.stdout);
|
|
2985
2053
|
return i.on("line", () => {
|
|
2986
2054
|
n += 1;
|
|
2987
2055
|
}), await r, i.close(), n;
|
|
2988
2056
|
}
|
|
2989
|
-
o(
|
|
2057
|
+
o(pe, "execCommandCountLines");
|
|
2990
2058
|
|
|
2991
2059
|
// ../node_modules/slash/index.js
|
|
2992
|
-
function
|
|
2060
|
+
function ut(e) {
|
|
2993
2061
|
return e.startsWith("\\\\?\\") ? e : e.replace(/\\/g, "/");
|
|
2994
2062
|
}
|
|
2995
|
-
o(
|
|
2063
|
+
o(ut, "slash");
|
|
2996
2064
|
|
|
2997
2065
|
// src/common/utils/file-cache.ts
|
|
2998
|
-
import { createHash as
|
|
2999
|
-
import { mkdirSync as
|
|
3000
|
-
import { readFile as
|
|
3001
|
-
import { tmpdir as
|
|
3002
|
-
import { join as
|
|
3003
|
-
var
|
|
2066
|
+
import { createHash as xn, randomBytes as xs } from "node:crypto";
|
|
2067
|
+
import { mkdirSync as ft, readFileSync as ws, readdirSync as Ss, rmSync as wn, writeFileSync as ks } from "node:fs";
|
|
2068
|
+
import { readFile as Sn, readdir as kn, rm as En, writeFile as Es } from "node:fs/promises";
|
|
2069
|
+
import { tmpdir as Ps } from "node:os";
|
|
2070
|
+
import { join as B } from "node:path";
|
|
2071
|
+
var me = class {
|
|
3004
2072
|
static {
|
|
3005
2073
|
o(this, "FileSystemCache");
|
|
3006
2074
|
}
|
|
3007
2075
|
constructor(t = {}) {
|
|
3008
|
-
this.prefix = (t.ns || t.prefix || "") + "-", this.hash_alg = t.hash_alg || "md5", this.cache_dir = t.basePath ||
|
|
3009
|
-
"base64").replace(/\//g, "-")), this.ttl = t.ttl || 0,
|
|
2076
|
+
this.prefix = (t.ns || t.prefix || "") + "-", this.hash_alg = t.hash_alg || "md5", this.cache_dir = t.basePath || B(Ps(), xs(15).toString(
|
|
2077
|
+
"base64").replace(/\//g, "-")), this.ttl = t.ttl || 0, xn(this.hash_alg), ft(this.cache_dir, { recursive: !0 });
|
|
3010
2078
|
}
|
|
3011
2079
|
generateHash(t) {
|
|
3012
|
-
return
|
|
2080
|
+
return B(this.cache_dir, this.prefix + xn(this.hash_alg).update(t).digest("hex"));
|
|
3013
2081
|
}
|
|
3014
2082
|
isExpired(t, r) {
|
|
3015
2083
|
return t.ttl != null && r > t.ttl;
|
|
@@ -3024,7 +2092,7 @@ var We = class {
|
|
|
3024
2092
|
}
|
|
3025
2093
|
async get(t, r) {
|
|
3026
2094
|
try {
|
|
3027
|
-
let n = await
|
|
2095
|
+
let n = await Sn(this.generateHash(t), "utf8");
|
|
3028
2096
|
return this.parseCacheData(n, r);
|
|
3029
2097
|
} catch {
|
|
3030
2098
|
return r;
|
|
@@ -3032,7 +2100,7 @@ var We = class {
|
|
|
3032
2100
|
}
|
|
3033
2101
|
getSync(t, r) {
|
|
3034
2102
|
try {
|
|
3035
|
-
let n =
|
|
2103
|
+
let n = ws(this.generateHash(t), "utf8");
|
|
3036
2104
|
return this.parseCacheData(n, r);
|
|
3037
2105
|
} catch {
|
|
3038
2106
|
return r;
|
|
@@ -3040,13 +2108,13 @@ var We = class {
|
|
|
3040
2108
|
}
|
|
3041
2109
|
async set(t, r, n = {}) {
|
|
3042
2110
|
let i = typeof n == "number" ? { ttl: n } : n;
|
|
3043
|
-
|
|
2111
|
+
ft(this.cache_dir, { recursive: !0 }), await Es(this.generateHash(t), this.parseSetData(t, r, i), {
|
|
3044
2112
|
encoding: i.encoding || "utf8"
|
|
3045
2113
|
});
|
|
3046
2114
|
}
|
|
3047
2115
|
setSync(t, r, n = {}) {
|
|
3048
2116
|
let i = typeof n == "number" ? { ttl: n } : n;
|
|
3049
|
-
|
|
2117
|
+
ft(this.cache_dir, { recursive: !0 }), ks(this.generateHash(t), this.parseSetData(t, r, i), {
|
|
3050
2118
|
encoding: i.encoding || "utf8"
|
|
3051
2119
|
});
|
|
3052
2120
|
}
|
|
@@ -3057,24 +2125,24 @@ var We = class {
|
|
|
3057
2125
|
t.forEach((n) => this.setSync(n.key, n.content ?? n.value, r));
|
|
3058
2126
|
}
|
|
3059
2127
|
async remove(t) {
|
|
3060
|
-
await
|
|
2128
|
+
await En(this.generateHash(t), { force: !0 });
|
|
3061
2129
|
}
|
|
3062
2130
|
removeSync(t) {
|
|
3063
|
-
|
|
2131
|
+
wn(this.generateHash(t), { force: !0 });
|
|
3064
2132
|
}
|
|
3065
2133
|
async clear() {
|
|
3066
|
-
let t = await
|
|
2134
|
+
let t = await kn(this.cache_dir);
|
|
3067
2135
|
await Promise.all(
|
|
3068
|
-
t.filter((r) => r.startsWith(this.prefix)).map((r) =>
|
|
2136
|
+
t.filter((r) => r.startsWith(this.prefix)).map((r) => En(B(this.cache_dir, r), { force: !0 }))
|
|
3069
2137
|
);
|
|
3070
2138
|
}
|
|
3071
2139
|
clearSync() {
|
|
3072
|
-
|
|
2140
|
+
Ss(this.cache_dir).filter((t) => t.startsWith(this.prefix)).forEach((t) => wn(B(this.cache_dir, t), { force: !0 }));
|
|
3073
2141
|
}
|
|
3074
2142
|
async getAll() {
|
|
3075
|
-
let t = Date.now(), r = await
|
|
2143
|
+
let t = Date.now(), r = await kn(this.cache_dir);
|
|
3076
2144
|
return (await Promise.all(
|
|
3077
|
-
r.filter((i) => i.startsWith(this.prefix)).map((i) =>
|
|
2145
|
+
r.filter((i) => i.startsWith(this.prefix)).map((i) => Sn(B(this.cache_dir, i), "utf8"))
|
|
3078
2146
|
)).map((i) => JSON.parse(i)).filter((i) => i.content && !this.isExpired(i, t));
|
|
3079
2147
|
}
|
|
3080
2148
|
async load() {
|
|
@@ -3087,186 +2155,186 @@ var We = class {
|
|
|
3087
2155
|
};
|
|
3088
2156
|
}
|
|
3089
2157
|
};
|
|
3090
|
-
function
|
|
3091
|
-
return new
|
|
2158
|
+
function lt(e) {
|
|
2159
|
+
return new me(e);
|
|
3092
2160
|
}
|
|
3093
|
-
o(
|
|
2161
|
+
o(lt, "createFileSystemCache");
|
|
3094
2162
|
|
|
3095
2163
|
// src/common/utils/resolve-path-in-sb-cache.ts
|
|
3096
|
-
import { join as
|
|
2164
|
+
import { join as Nn } from "node:path";
|
|
3097
2165
|
|
|
3098
2166
|
// ../node_modules/find-cache-dir/index.js
|
|
3099
|
-
var
|
|
3100
|
-
import
|
|
3101
|
-
import
|
|
3102
|
-
import
|
|
2167
|
+
var Rn = A(vn(), 1);
|
|
2168
|
+
import Fs from "node:process";
|
|
2169
|
+
import G from "node:path";
|
|
2170
|
+
import ye from "node:fs";
|
|
3103
2171
|
|
|
3104
2172
|
// ../node_modules/pkg-dir/index.js
|
|
3105
|
-
import
|
|
2173
|
+
import Ls from "node:path";
|
|
3106
2174
|
|
|
3107
2175
|
// ../node_modules/pkg-dir/node_modules/find-up/index.js
|
|
3108
|
-
import
|
|
3109
|
-
import { fileURLToPath as
|
|
2176
|
+
import de from "node:path";
|
|
2177
|
+
import { fileURLToPath as Ns } from "node:url";
|
|
3110
2178
|
|
|
3111
2179
|
// ../node_modules/locate-path/index.js
|
|
3112
|
-
import
|
|
3113
|
-
import
|
|
3114
|
-
import
|
|
3115
|
-
import { fileURLToPath as
|
|
3116
|
-
var
|
|
2180
|
+
import Cs from "node:process";
|
|
2181
|
+
import Is from "node:path";
|
|
2182
|
+
import Tn, { promises as ll } from "node:fs";
|
|
2183
|
+
import { fileURLToPath as As } from "node:url";
|
|
2184
|
+
var Cn = {
|
|
3117
2185
|
directory: "isDirectory",
|
|
3118
2186
|
file: "isFile"
|
|
3119
2187
|
};
|
|
3120
|
-
function
|
|
3121
|
-
if (!Object.hasOwnProperty.call(
|
|
2188
|
+
function Os(e) {
|
|
2189
|
+
if (!Object.hasOwnProperty.call(Cn, e))
|
|
3122
2190
|
throw new Error(`Invalid type specified: ${e}`);
|
|
3123
2191
|
}
|
|
3124
|
-
o(
|
|
3125
|
-
var
|
|
3126
|
-
function
|
|
3127
|
-
cwd: t =
|
|
2192
|
+
o(Os, "checkType");
|
|
2193
|
+
var js = /* @__PURE__ */ o((e, t) => t[Cn[e]](), "matchType"), Rs = /* @__PURE__ */ o((e) => e instanceof URL ? As(e) : e, "toPath");
|
|
2194
|
+
function pt(e, {
|
|
2195
|
+
cwd: t = Cs.cwd(),
|
|
3128
2196
|
type: r = "file",
|
|
3129
2197
|
allowSymlinks: n = !0
|
|
3130
2198
|
} = {}) {
|
|
3131
|
-
|
|
3132
|
-
let i = n ?
|
|
2199
|
+
Os(r), t = Rs(t);
|
|
2200
|
+
let i = n ? Tn.statSync : Tn.lstatSync;
|
|
3133
2201
|
for (let s of e)
|
|
3134
2202
|
try {
|
|
3135
|
-
let a = i(
|
|
2203
|
+
let a = i(Is.resolve(t, s), {
|
|
3136
2204
|
throwIfNoEntry: !1
|
|
3137
2205
|
});
|
|
3138
2206
|
if (!a)
|
|
3139
2207
|
continue;
|
|
3140
|
-
if (
|
|
2208
|
+
if (js(r, a))
|
|
3141
2209
|
return s;
|
|
3142
2210
|
} catch {
|
|
3143
2211
|
}
|
|
3144
2212
|
}
|
|
3145
|
-
o(
|
|
2213
|
+
o(pt, "locatePathSync");
|
|
3146
2214
|
|
|
3147
2215
|
// ../node_modules/pkg-dir/node_modules/path-exists/index.js
|
|
3148
|
-
import
|
|
2216
|
+
import gl, { promises as bl } from "node:fs";
|
|
3149
2217
|
|
|
3150
2218
|
// ../node_modules/pkg-dir/node_modules/find-up/index.js
|
|
3151
|
-
var
|
|
3152
|
-
function
|
|
3153
|
-
let r =
|
|
3154
|
-
c = /* @__PURE__ */ o((
|
|
2219
|
+
var Ds = /* @__PURE__ */ o((e) => e instanceof URL ? Ns(e) : e, "toPath"), _s = Symbol("findUpStop");
|
|
2220
|
+
function Ms(e, t = {}) {
|
|
2221
|
+
let r = de.resolve(Ds(t.cwd) || ""), { root: n } = de.parse(r), i = t.stopAt || n, s = t.limit || Number.POSITIVE_INFINITY, a = [e].flat(),
|
|
2222
|
+
c = /* @__PURE__ */ o((f) => {
|
|
3155
2223
|
if (typeof e != "function")
|
|
3156
|
-
return
|
|
3157
|
-
let
|
|
3158
|
-
return typeof
|
|
2224
|
+
return pt(a, f);
|
|
2225
|
+
let l = e(f.cwd);
|
|
2226
|
+
return typeof l == "string" ? pt([l], f) : l;
|
|
3159
2227
|
}, "runMatcher"), u = [];
|
|
3160
2228
|
for (; ; ) {
|
|
3161
|
-
let
|
|
3162
|
-
if (
|
|
2229
|
+
let f = c({ ...t, cwd: r });
|
|
2230
|
+
if (f === _s || (f && u.push(de.resolve(r, f)), r === i || u.length >= s))
|
|
3163
2231
|
break;
|
|
3164
|
-
r =
|
|
2232
|
+
r = de.dirname(r);
|
|
3165
2233
|
}
|
|
3166
2234
|
return u;
|
|
3167
2235
|
}
|
|
3168
|
-
o(
|
|
3169
|
-
function
|
|
3170
|
-
return
|
|
2236
|
+
o(Ms, "findUpMultipleSync");
|
|
2237
|
+
function In(e, t = {}) {
|
|
2238
|
+
return Ms(e, { ...t, limit: 1 })[0];
|
|
3171
2239
|
}
|
|
3172
|
-
o(
|
|
2240
|
+
o(In, "findUpSync");
|
|
3173
2241
|
|
|
3174
2242
|
// ../node_modules/pkg-dir/index.js
|
|
3175
|
-
function
|
|
3176
|
-
let t =
|
|
3177
|
-
return t &&
|
|
2243
|
+
function An({ cwd: e } = {}) {
|
|
2244
|
+
let t = In("package.json", { cwd: e });
|
|
2245
|
+
return t && Ls.dirname(t);
|
|
3178
2246
|
}
|
|
3179
|
-
o(
|
|
2247
|
+
o(An, "packageDirectorySync");
|
|
3180
2248
|
|
|
3181
2249
|
// ../node_modules/find-cache-dir/index.js
|
|
3182
|
-
var { env:
|
|
2250
|
+
var { env: mt, cwd: Bs } = Fs, On = /* @__PURE__ */ o((e) => {
|
|
3183
2251
|
try {
|
|
3184
|
-
return
|
|
2252
|
+
return ye.accessSync(e, ye.constants.W_OK), !0;
|
|
3185
2253
|
} catch {
|
|
3186
2254
|
return !1;
|
|
3187
2255
|
}
|
|
3188
2256
|
}, "isWritable");
|
|
3189
|
-
function
|
|
3190
|
-
return t.create &&
|
|
2257
|
+
function jn(e, t) {
|
|
2258
|
+
return t.create && ye.mkdirSync(e, { recursive: !0 }), e;
|
|
3191
2259
|
}
|
|
3192
|
-
o(
|
|
3193
|
-
function
|
|
3194
|
-
let t =
|
|
3195
|
-
if (!(!
|
|
2260
|
+
o(jn, "useDirectory");
|
|
2261
|
+
function Gs(e) {
|
|
2262
|
+
let t = G.join(e, "node_modules");
|
|
2263
|
+
if (!(!On(t) && (ye.existsSync(t) || !On(G.join(e)))))
|
|
3196
2264
|
return t;
|
|
3197
2265
|
}
|
|
3198
|
-
o(
|
|
3199
|
-
function
|
|
3200
|
-
if (
|
|
3201
|
-
return
|
|
3202
|
-
let { cwd: t =
|
|
2266
|
+
o(Gs, "getNodeModuleDirectory");
|
|
2267
|
+
function dt(e = {}) {
|
|
2268
|
+
if (mt.CACHE_DIR && !["true", "false", "1", "0"].includes(mt.CACHE_DIR))
|
|
2269
|
+
return jn(G.join(mt.CACHE_DIR, e.name), e);
|
|
2270
|
+
let { cwd: t = Bs(), files: r } = e;
|
|
3203
2271
|
if (r) {
|
|
3204
2272
|
if (!Array.isArray(r))
|
|
3205
2273
|
throw new TypeError(`Expected \`files\` option to be an array, got \`${typeof r}\`.`);
|
|
3206
|
-
t = (0,
|
|
2274
|
+
t = (0, Rn.default)(r.map((i) => G.resolve(t, i)));
|
|
3207
2275
|
}
|
|
3208
|
-
if (t =
|
|
3209
|
-
return
|
|
2276
|
+
if (t = An({ cwd: t }), !(!t || !Gs(t)))
|
|
2277
|
+
return jn(G.join(t, "node_modules", ".cache", e.name), e);
|
|
3210
2278
|
}
|
|
3211
|
-
o(
|
|
2279
|
+
o(dt, "findCacheDirectory");
|
|
3212
2280
|
|
|
3213
2281
|
// src/common/utils/resolve-path-in-sb-cache.ts
|
|
3214
|
-
function
|
|
3215
|
-
let r =
|
|
3216
|
-
return r ||=
|
|
2282
|
+
function Dn(e, t = "default") {
|
|
2283
|
+
let r = dt({ name: "storybook" });
|
|
2284
|
+
return r ||= Nn(process.cwd(), "node_modules", ".cache", "storybook"), Nn(r, t, e);
|
|
3217
2285
|
}
|
|
3218
|
-
o(
|
|
2286
|
+
o(Dn, "resolvePathInStorybookCache");
|
|
3219
2287
|
|
|
3220
2288
|
// src/telemetry/run-telemetry-operation.ts
|
|
3221
|
-
var
|
|
3222
|
-
basePath:
|
|
2289
|
+
var _n = lt({
|
|
2290
|
+
basePath: Dn("telemetry"),
|
|
3223
2291
|
ns: "storybook",
|
|
3224
2292
|
ttl: 24 * 60 * 60 * 1e3
|
|
3225
2293
|
// 24h
|
|
3226
|
-
}),
|
|
3227
|
-
let r = await
|
|
3228
|
-
return r === void 0 && (r = await t(), r !== void 0 && await
|
|
2294
|
+
}), he = /* @__PURE__ */ o(async (e, t) => {
|
|
2295
|
+
let r = await _n.get(e);
|
|
2296
|
+
return r === void 0 && (r = await t(), r !== void 0 && await _n.set(e, r)), r;
|
|
3229
2297
|
}, "runTelemetryOperation");
|
|
3230
2298
|
|
|
3231
2299
|
// src/telemetry/get-application-file-count.ts
|
|
3232
|
-
var
|
|
3233
|
-
let r =
|
|
2300
|
+
var $s = ["page", "screen"], Ws = ["js", "jsx", "ts", "tsx"], Hs = /* @__PURE__ */ o(async (e) => {
|
|
2301
|
+
let r = $s.flatMap((n) => [
|
|
3234
2302
|
n,
|
|
3235
2303
|
[n[0].toUpperCase(), ...n.slice(1)].join("")
|
|
3236
2304
|
]).flatMap(
|
|
3237
|
-
(n) =>
|
|
2305
|
+
(n) => Ws.map((i) => `"${e}${Us}*${n}*.${i}"`)
|
|
3238
2306
|
);
|
|
3239
2307
|
try {
|
|
3240
2308
|
let n = `git ls-files -- ${r.join(" ")}`;
|
|
3241
|
-
return await
|
|
2309
|
+
return await pe(n);
|
|
3242
2310
|
} catch {
|
|
3243
2311
|
return;
|
|
3244
2312
|
}
|
|
3245
|
-
}, "getApplicationFilesCountUncached"),
|
|
2313
|
+
}, "getApplicationFilesCountUncached"), Mn = /* @__PURE__ */ o(async (e) => he(
|
|
3246
2314
|
"applicationFiles",
|
|
3247
|
-
async () =>
|
|
2315
|
+
async () => Hs(e)
|
|
3248
2316
|
), "getApplicationFileCount");
|
|
3249
2317
|
|
|
3250
2318
|
// src/telemetry/get-chromatic-version.ts
|
|
3251
|
-
function
|
|
2319
|
+
function Ln(e) {
|
|
3252
2320
|
let t = e.dependencies?.chromatic || e.devDependencies?.chromatic || e.peerDependencies?.chromatic;
|
|
3253
2321
|
return t || (e.scripts && Object.values(e.scripts).find((r) => r?.match(/chromatic/)) ? "latest" : void 0);
|
|
3254
2322
|
}
|
|
3255
|
-
o(
|
|
2323
|
+
o(Ln, "getChromaticVersionSpecifier");
|
|
3256
2324
|
|
|
3257
2325
|
// src/telemetry/get-framework-info.ts
|
|
3258
|
-
import { normalize as
|
|
3259
|
-
import { frameworkPackages as
|
|
2326
|
+
import { normalize as qs } from "node:path";
|
|
2327
|
+
import { frameworkPackages as zs } from "storybook/internal/common";
|
|
3260
2328
|
|
|
3261
2329
|
// src/telemetry/package-json.ts
|
|
3262
|
-
import { readFile as
|
|
3263
|
-
import { join as
|
|
3264
|
-
var
|
|
2330
|
+
import { readFile as Js } from "node:fs/promises";
|
|
2331
|
+
import { join as Vs } from "node:path";
|
|
2332
|
+
var yt = /* @__PURE__ */ o(async (e) => {
|
|
3265
2333
|
let t = Object.keys(e);
|
|
3266
|
-
return Promise.all(t.map(
|
|
3267
|
-
}, "getActualPackageVersions"),
|
|
2334
|
+
return Promise.all(t.map(ge));
|
|
2335
|
+
}, "getActualPackageVersions"), ge = /* @__PURE__ */ o(async (e) => {
|
|
3268
2336
|
try {
|
|
3269
|
-
let t = await
|
|
2337
|
+
let t = await ht(e);
|
|
3270
2338
|
return {
|
|
3271
2339
|
name: e,
|
|
3272
2340
|
version: t.version
|
|
@@ -3274,15 +2342,15 @@ var nr = /* @__PURE__ */ o(async (e) => {
|
|
|
3274
2342
|
} catch {
|
|
3275
2343
|
return { name: e, version: null };
|
|
3276
2344
|
}
|
|
3277
|
-
}, "getActualPackageVersion"),
|
|
3278
|
-
let t =
|
|
2345
|
+
}, "getActualPackageVersion"), ht = /* @__PURE__ */ o(async (e) => {
|
|
2346
|
+
let t = S.resolve(Vs(e, "package.json"), {
|
|
3279
2347
|
paths: [process.cwd()]
|
|
3280
2348
|
});
|
|
3281
|
-
return JSON.parse(await
|
|
2349
|
+
return JSON.parse(await Js(t, { encoding: "utf8" }));
|
|
3282
2350
|
}, "getActualPackageJson");
|
|
3283
2351
|
|
|
3284
2352
|
// src/telemetry/get-framework-info.ts
|
|
3285
|
-
var
|
|
2353
|
+
var Ys = [
|
|
3286
2354
|
"html",
|
|
3287
2355
|
"react",
|
|
3288
2356
|
"svelte",
|
|
@@ -3293,8 +2361,8 @@ var rl = [
|
|
|
3293
2361
|
"web-components",
|
|
3294
2362
|
"angular",
|
|
3295
2363
|
"ember"
|
|
3296
|
-
],
|
|
3297
|
-
function
|
|
2364
|
+
], Ks = ["builder-webpack5", "builder-vite"];
|
|
2365
|
+
function Fn(e, t) {
|
|
3298
2366
|
let { name: r = "", version: n, dependencies: i, devDependencies: s, peerDependencies: a } = e, c = {
|
|
3299
2367
|
// We include the framework itself because it may be a renderer too (e.g. angular)
|
|
3300
2368
|
[r]: n,
|
|
@@ -3304,21 +2372,21 @@ function xi(e, t) {
|
|
|
3304
2372
|
};
|
|
3305
2373
|
return t.map((u) => `@storybook/${u}`).find((u) => c[u]);
|
|
3306
2374
|
}
|
|
3307
|
-
o(
|
|
3308
|
-
var
|
|
3309
|
-
let t =
|
|
3310
|
-
return Object.keys(
|
|
2375
|
+
o(Fn, "findMatchingPackage");
|
|
2376
|
+
var Xs = /* @__PURE__ */ o((e) => {
|
|
2377
|
+
let t = qs(e).replace(new RegExp(/\\/, "g"), "/");
|
|
2378
|
+
return Object.keys(zs).find((n) => t.endsWith(n)) || D(e).replace(/.*node_modules[\\/]/, "");
|
|
3311
2379
|
}, "getFrameworkPackageName");
|
|
3312
|
-
async function
|
|
2380
|
+
async function Bn(e) {
|
|
3313
2381
|
if (!e?.framework)
|
|
3314
2382
|
return {};
|
|
3315
2383
|
let t = typeof e.framework == "string" ? e.framework : e.framework?.name;
|
|
3316
2384
|
if (!t)
|
|
3317
2385
|
return {};
|
|
3318
|
-
let r = await
|
|
2386
|
+
let r = await ht(t);
|
|
3319
2387
|
if (!r)
|
|
3320
2388
|
return {};
|
|
3321
|
-
let n =
|
|
2389
|
+
let n = Fn(r, Ks), i = Fn(r, Ys), s = Xs(t), a = typeof e.framework == "object" ? e.framework.options : {};
|
|
3322
2390
|
return {
|
|
3323
2391
|
framework: {
|
|
3324
2392
|
name: s,
|
|
@@ -3328,10 +2396,10 @@ async function Si(e) {
|
|
|
3328
2396
|
renderer: i
|
|
3329
2397
|
};
|
|
3330
2398
|
}
|
|
3331
|
-
o(
|
|
2399
|
+
o(Bn, "getFrameworkInfo");
|
|
3332
2400
|
|
|
3333
2401
|
// src/telemetry/get-has-router-package.ts
|
|
3334
|
-
var
|
|
2402
|
+
var Qs = /* @__PURE__ */ new Set([
|
|
3335
2403
|
"react-router",
|
|
3336
2404
|
"react-router-dom",
|
|
3337
2405
|
"remix",
|
|
@@ -3354,56 +2422,56 @@ var il = /* @__PURE__ */ new Set([
|
|
|
3354
2422
|
"nuxt",
|
|
3355
2423
|
"@sveltejs/kit"
|
|
3356
2424
|
]);
|
|
3357
|
-
function
|
|
2425
|
+
function Gn(e) {
|
|
3358
2426
|
return Object.keys(e?.dependencies ?? {}).some(
|
|
3359
|
-
(t) =>
|
|
2427
|
+
(t) => Qs.has(t)
|
|
3360
2428
|
);
|
|
3361
2429
|
}
|
|
3362
|
-
o(
|
|
2430
|
+
o(Gn, "getHasRouterPackage");
|
|
3363
2431
|
|
|
3364
2432
|
// src/telemetry/get-monorepo-type.ts
|
|
3365
|
-
import { existsSync as
|
|
3366
|
-
import { join as
|
|
3367
|
-
import { getProjectRoot as
|
|
3368
|
-
var
|
|
2433
|
+
import { existsSync as Un, readFileSync as Zs } from "node:fs";
|
|
2434
|
+
import { join as gt } from "node:path";
|
|
2435
|
+
import { getProjectRoot as ea } from "storybook/internal/common";
|
|
2436
|
+
var $n = {
|
|
3369
2437
|
Nx: "nx.json",
|
|
3370
2438
|
Turborepo: "turbo.json",
|
|
3371
2439
|
Lerna: "lerna.json",
|
|
3372
2440
|
Rush: "rush.json",
|
|
3373
2441
|
Lage: "lage.config.json"
|
|
3374
|
-
},
|
|
3375
|
-
let e =
|
|
2442
|
+
}, Wn = /* @__PURE__ */ o(() => {
|
|
2443
|
+
let e = ea();
|
|
3376
2444
|
if (!e)
|
|
3377
2445
|
return;
|
|
3378
|
-
let r = Object.keys(
|
|
3379
|
-
let s =
|
|
3380
|
-
return
|
|
2446
|
+
let r = Object.keys($n).find((i) => {
|
|
2447
|
+
let s = gt(e, $n[i]);
|
|
2448
|
+
return Un(s);
|
|
3381
2449
|
});
|
|
3382
2450
|
if (r)
|
|
3383
2451
|
return r;
|
|
3384
|
-
if (!
|
|
2452
|
+
if (!Un(gt(e, "package.json")))
|
|
3385
2453
|
return;
|
|
3386
2454
|
if (JSON.parse(
|
|
3387
|
-
|
|
2455
|
+
Zs(gt(e, "package.json"), { encoding: "utf8" })
|
|
3388
2456
|
)?.workspaces)
|
|
3389
2457
|
return "Workspaces";
|
|
3390
2458
|
}, "getMonorepoType");
|
|
3391
2459
|
|
|
3392
2460
|
// src/telemetry/get-portable-stories-usage.ts
|
|
3393
|
-
var
|
|
2461
|
+
var ta = /* @__PURE__ */ o(async (e) => {
|
|
3394
2462
|
try {
|
|
3395
2463
|
let t = "git grep -l composeStor" + (e ? ` -- ${e}` : "");
|
|
3396
|
-
return await
|
|
2464
|
+
return await pe(t);
|
|
3397
2465
|
} catch (t) {
|
|
3398
2466
|
return t.exitCode === 1 ? 0 : void 0;
|
|
3399
2467
|
}
|
|
3400
|
-
}, "getPortableStoriesFileCountUncached"),
|
|
2468
|
+
}, "getPortableStoriesFileCountUncached"), Hn = /* @__PURE__ */ o(async (e) => he(
|
|
3401
2469
|
"portableStories",
|
|
3402
|
-
async () =>
|
|
2470
|
+
async () => ta(e)
|
|
3403
2471
|
), "getPortableStoriesFileCount");
|
|
3404
2472
|
|
|
3405
2473
|
// src/telemetry/storybook-metadata.ts
|
|
3406
|
-
var
|
|
2474
|
+
var Jn = {
|
|
3407
2475
|
next: "Next",
|
|
3408
2476
|
"react-scripts": "CRA",
|
|
3409
2477
|
gatsby: "Gatsby",
|
|
@@ -3411,8 +2479,8 @@ var ki = {
|
|
|
3411
2479
|
"@nrwl/storybook": "nx",
|
|
3412
2480
|
"@vue/cli-service": "vue-cli",
|
|
3413
2481
|
"@sveltejs/kit": "sveltekit"
|
|
3414
|
-
},
|
|
3415
|
-
"").replace(/\/preset$/, ""), "sanitizeAddonName"),
|
|
2482
|
+
}, Vn = /* @__PURE__ */ o((e) => D(e).replace(/\/dist\/.*/, "").replace(/\.[mc]?[tj]?s[x]?$/, "").replace(/\/register$/, "").replace(/\/manager$/,
|
|
2483
|
+
"").replace(/\/preset$/, ""), "sanitizeAddonName"), ua = /* @__PURE__ */ o(async ({
|
|
3416
2484
|
packageJsonPath: e,
|
|
3417
2485
|
packageJson: t,
|
|
3418
2486
|
mainConfig: r
|
|
@@ -3428,13 +2496,13 @@ var ki = {
|
|
|
3428
2496
|
...t?.dependencies,
|
|
3429
2497
|
...t?.devDependencies,
|
|
3430
2498
|
...t?.peerDependencies
|
|
3431
|
-
}, s = Object.keys(i).find((
|
|
2499
|
+
}, s = Object.keys(i).find((p) => !!Jn[p]);
|
|
3432
2500
|
if (s) {
|
|
3433
|
-
let { version:
|
|
2501
|
+
let { version: p } = await ge(s);
|
|
3434
2502
|
n.metaFramework = {
|
|
3435
|
-
name:
|
|
2503
|
+
name: Jn[s],
|
|
3436
2504
|
packageName: s,
|
|
3437
|
-
version:
|
|
2505
|
+
version: p
|
|
3438
2506
|
};
|
|
3439
2507
|
}
|
|
3440
2508
|
let a = [
|
|
@@ -3456,160 +2524,169 @@ var ki = {
|
|
|
3456
2524
|
"miragejs",
|
|
3457
2525
|
"sinon"
|
|
3458
2526
|
], c = Object.keys(i).filter(
|
|
3459
|
-
(
|
|
2527
|
+
(p) => a.find((w) => p.includes(w))
|
|
3460
2528
|
);
|
|
3461
2529
|
n.testPackages = Object.fromEntries(
|
|
3462
2530
|
await Promise.all(
|
|
3463
|
-
c.map(async (
|
|
2531
|
+
c.map(async (p) => [p, (await ge(p))?.version])
|
|
3464
2532
|
)
|
|
3465
|
-
), n.hasRouterPackage =
|
|
3466
|
-
let u =
|
|
2533
|
+
), n.hasRouterPackage = Gn(t);
|
|
2534
|
+
let u = Wn();
|
|
3467
2535
|
u && (n.monorepo = u);
|
|
3468
2536
|
try {
|
|
3469
|
-
let
|
|
3470
|
-
n.packageManager = {
|
|
3471
|
-
type:
|
|
3472
|
-
version:
|
|
3473
|
-
|
|
2537
|
+
let p = await Ie({ cwd: na() });
|
|
2538
|
+
p && (n.packageManager = {
|
|
2539
|
+
type: p.name,
|
|
2540
|
+
version: p.version,
|
|
2541
|
+
agent: p.agent
|
|
2542
|
+
});
|
|
3474
2543
|
} catch {
|
|
3475
2544
|
}
|
|
2545
|
+
let f = i.typescript ? "typescript" : "javascript";
|
|
2546
|
+
if (!r)
|
|
2547
|
+
return {
|
|
2548
|
+
...n,
|
|
2549
|
+
storybookVersionSpecifier: aa.storybook,
|
|
2550
|
+
language: f
|
|
2551
|
+
};
|
|
3476
2552
|
n.hasCustomBabel = !!r.babel, n.hasCustomWebpack = !!r.webpackFinal, n.hasStaticDirs = !!r.staticDirs, typeof r.typescript == "object" && (n.
|
|
3477
2553
|
typescriptOptions = r.typescript);
|
|
3478
|
-
let l = await
|
|
2554
|
+
let l = await Bn(r);
|
|
3479
2555
|
typeof r.refs == "object" && (n.refCount = Object.keys(r.refs).length), typeof r.features == "object" && (n.features = r.features);
|
|
3480
|
-
let
|
|
3481
|
-
r.addons && r.addons.forEach((
|
|
3482
|
-
let
|
|
3483
|
-
typeof
|
|
3484
|
-
options:
|
|
2556
|
+
let d = {};
|
|
2557
|
+
r.addons && r.addons.forEach((p) => {
|
|
2558
|
+
let w, J;
|
|
2559
|
+
typeof p == "string" ? w = Vn(p) : (p.name.includes("addon-essentials") && (J = p.options), w = Vn(p.name)), d[w] = {
|
|
2560
|
+
options: J,
|
|
3485
2561
|
version: void 0
|
|
3486
2562
|
};
|
|
3487
2563
|
});
|
|
3488
|
-
let
|
|
3489
|
-
|
|
2564
|
+
let h = Ln(t);
|
|
2565
|
+
h && (d.chromatic = {
|
|
3490
2566
|
version: void 0,
|
|
3491
|
-
versionSpecifier:
|
|
2567
|
+
versionSpecifier: h,
|
|
3492
2568
|
options: void 0
|
|
3493
|
-
}), (await
|
|
3494
|
-
|
|
2569
|
+
}), (await yt(d)).forEach(({ name: p, version: w }) => {
|
|
2570
|
+
d[p].version = w;
|
|
3495
2571
|
});
|
|
3496
|
-
let
|
|
3497
|
-
...
|
|
3498
|
-
[
|
|
2572
|
+
let g = Object.keys(d), m = Object.keys(i).filter((p) => p.includes("storybook") && !g.includes(p)).reduce((p, w) => ({
|
|
2573
|
+
...p,
|
|
2574
|
+
[w]: { version: void 0 }
|
|
3499
2575
|
}), {});
|
|
3500
|
-
(await
|
|
3501
|
-
|
|
2576
|
+
(await yt(m)).forEach(({ name: p, version: w }) => {
|
|
2577
|
+
m[p].version = w;
|
|
3502
2578
|
});
|
|
3503
|
-
let
|
|
2579
|
+
let C = !!i["eslint-plugin-storybook"], k = ia(t);
|
|
3504
2580
|
try {
|
|
3505
|
-
let { previewConfig:
|
|
3506
|
-
if (
|
|
3507
|
-
let
|
|
3508
|
-
n.preview = { ...n.preview, usesGlobals:
|
|
2581
|
+
let { previewConfig: p } = k;
|
|
2582
|
+
if (p) {
|
|
2583
|
+
let w = await ca(p), J = !!(w.getFieldNode(["globals"]) || w.getFieldNode(["globalTypes"]));
|
|
2584
|
+
n.preview = { ...n.preview, usesGlobals: J };
|
|
3509
2585
|
}
|
|
3510
2586
|
} catch {
|
|
3511
2587
|
}
|
|
3512
|
-
let I =
|
|
2588
|
+
let I = m[k.frameworkPackage]?.version, W = await Hn(), H = await Mn(ra(e));
|
|
3513
2589
|
return {
|
|
3514
2590
|
...n,
|
|
3515
2591
|
...l,
|
|
3516
|
-
portableStoriesFileCount:
|
|
3517
|
-
applicationFileCount:
|
|
2592
|
+
portableStoriesFileCount: W,
|
|
2593
|
+
applicationFileCount: H,
|
|
3518
2594
|
storybookVersion: I,
|
|
3519
|
-
storybookVersionSpecifier:
|
|
3520
|
-
language:
|
|
3521
|
-
storybookPackages:
|
|
3522
|
-
addons:
|
|
3523
|
-
hasStorybookEslint:
|
|
2595
|
+
storybookVersionSpecifier: k.version,
|
|
2596
|
+
language: f,
|
|
2597
|
+
storybookPackages: m,
|
|
2598
|
+
addons: d,
|
|
2599
|
+
hasStorybookEslint: C
|
|
3524
2600
|
};
|
|
3525
2601
|
}, "computeStorybookMetadata");
|
|
3526
|
-
async function
|
|
3527
|
-
let e = await
|
|
2602
|
+
async function fa() {
|
|
2603
|
+
let e = await Pe(process.cwd());
|
|
3528
2604
|
return e ? {
|
|
3529
2605
|
packageJsonPath: e,
|
|
3530
|
-
packageJson: await
|
|
2606
|
+
packageJson: await _t(e) || {}
|
|
3531
2607
|
} : {
|
|
3532
2608
|
packageJsonPath: process.cwd(),
|
|
3533
2609
|
packageJson: {}
|
|
3534
2610
|
};
|
|
3535
2611
|
}
|
|
3536
|
-
o(
|
|
3537
|
-
var
|
|
3538
|
-
if (
|
|
3539
|
-
return
|
|
3540
|
-
let { packageJson: t, packageJsonPath: r } = await
|
|
2612
|
+
o(fa, "getPackageJsonDetails");
|
|
2613
|
+
var be, qn = /* @__PURE__ */ o(async (e) => {
|
|
2614
|
+
if (be)
|
|
2615
|
+
return be;
|
|
2616
|
+
let { packageJson: t, packageJsonPath: r } = await fa(), n = (e || oa(
|
|
3541
2617
|
String(t?.scripts?.storybook || ""),
|
|
3542
2618
|
"-c",
|
|
3543
2619
|
"--config-dir"
|
|
3544
|
-
)) ?? ".storybook", i = await
|
|
3545
|
-
|
|
2620
|
+
)) ?? ".storybook", i = await sa({ configDir: n }).catch(() => {
|
|
2621
|
+
});
|
|
2622
|
+
return be = await ua({ mainConfig: i, packageJson: t, packageJsonPath: r }), be;
|
|
3546
2623
|
}, "getStorybookMetadata");
|
|
3547
2624
|
|
|
3548
2625
|
// src/telemetry/telemetry.ts
|
|
3549
|
-
var
|
|
3550
|
-
import * as
|
|
2626
|
+
var oo = A(Yn(), 1);
|
|
2627
|
+
import * as no from "node:os";
|
|
3551
2628
|
|
|
3552
2629
|
// ../node_modules/nanoid/index.js
|
|
3553
|
-
import { randomFillSync as
|
|
2630
|
+
import { randomFillSync as Xn } from "crypto";
|
|
3554
2631
|
|
|
3555
2632
|
// ../node_modules/nanoid/url-alphabet/index.js
|
|
3556
|
-
var
|
|
2633
|
+
var Kn = "useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict";
|
|
3557
2634
|
|
|
3558
2635
|
// ../node_modules/nanoid/index.js
|
|
3559
|
-
var
|
|
3560
|
-
!
|
|
2636
|
+
var la = 128, T, N, pa = /* @__PURE__ */ o((e) => {
|
|
2637
|
+
!T || T.length < e ? (T = Buffer.allocUnsafe(e * la), Xn(T), N = 0) : N + e > T.length && (Xn(T), N = 0), N += e;
|
|
3561
2638
|
}, "fillPool");
|
|
3562
|
-
var
|
|
3563
|
-
|
|
2639
|
+
var U = /* @__PURE__ */ o((e = 21) => {
|
|
2640
|
+
pa(e -= 0);
|
|
3564
2641
|
let t = "";
|
|
3565
|
-
for (let r =
|
|
3566
|
-
t +=
|
|
2642
|
+
for (let r = N - e; r < N; r++)
|
|
2643
|
+
t += Kn[T[r] & 63];
|
|
3567
2644
|
return t;
|
|
3568
2645
|
}, "nanoid");
|
|
3569
2646
|
|
|
3570
2647
|
// src/telemetry/anonymous-id.ts
|
|
3571
|
-
import { relative as
|
|
3572
|
-
import { getProjectRoot as
|
|
3573
|
-
import { execSync as
|
|
2648
|
+
import { relative as da } from "node:path";
|
|
2649
|
+
import { getProjectRoot as ya } from "storybook/internal/common";
|
|
2650
|
+
import { execSync as ha } from "child_process";
|
|
3574
2651
|
|
|
3575
2652
|
// src/telemetry/one-way-hash.ts
|
|
3576
|
-
import { createHash as
|
|
3577
|
-
var
|
|
3578
|
-
let t =
|
|
2653
|
+
import { createHash as ma } from "crypto";
|
|
2654
|
+
var bt = /* @__PURE__ */ o((e) => {
|
|
2655
|
+
let t = ma("sha256");
|
|
3579
2656
|
return t.update("storybook-telemetry-salt"), t.update(e), t.digest("hex");
|
|
3580
2657
|
}, "oneWayHash");
|
|
3581
2658
|
|
|
3582
2659
|
// src/telemetry/anonymous-id.ts
|
|
3583
|
-
function
|
|
2660
|
+
function ga(e) {
|
|
3584
2661
|
let n = e.trim().replace(/#.*$/, "").replace(/^.*@/, "").replace(/^.*\/\//, "");
|
|
3585
2662
|
return (n.endsWith(".git") ? n : `${n}.git`).replace(":", "/");
|
|
3586
2663
|
}
|
|
3587
|
-
o(
|
|
3588
|
-
function
|
|
3589
|
-
return `${
|
|
2664
|
+
o(ga, "normalizeGitUrl");
|
|
2665
|
+
function ba(e, t) {
|
|
2666
|
+
return `${ga(e)}${ut(t)}`;
|
|
3590
2667
|
}
|
|
3591
|
-
o(
|
|
3592
|
-
var
|
|
3593
|
-
if (
|
|
3594
|
-
return
|
|
2668
|
+
o(ba, "unhashedProjectId");
|
|
2669
|
+
var we, Qn = /* @__PURE__ */ o(() => {
|
|
2670
|
+
if (we)
|
|
2671
|
+
return we;
|
|
3595
2672
|
try {
|
|
3596
|
-
let e =
|
|
2673
|
+
let e = ya(), t = da(e, process.cwd()), r = ha("git config --local --get remote.origin.url", {
|
|
3597
2674
|
timeout: 1e3,
|
|
3598
2675
|
stdio: "pipe"
|
|
3599
2676
|
});
|
|
3600
|
-
|
|
2677
|
+
we = bt(ba(String(r), t));
|
|
3601
2678
|
} catch {
|
|
3602
2679
|
}
|
|
3603
|
-
return
|
|
2680
|
+
return we;
|
|
3604
2681
|
}, "getAnonymousProjectId");
|
|
3605
2682
|
|
|
3606
2683
|
// src/telemetry/event-cache.ts
|
|
3607
|
-
import { cache as
|
|
3608
|
-
var
|
|
3609
|
-
let r = await
|
|
3610
|
-
r[e] = { body: t, timestamp: Date.now() }, await
|
|
3611
|
-
}, "setHelper"),
|
|
3612
|
-
var
|
|
2684
|
+
import { cache as wt } from "storybook/internal/common";
|
|
2685
|
+
var xt = Promise.resolve(), xa = /* @__PURE__ */ o(async (e, t) => {
|
|
2686
|
+
let r = await wt.get("lastEvents") || {};
|
|
2687
|
+
r[e] = { body: t, timestamp: Date.now() }, await wt.set("lastEvents", r);
|
|
2688
|
+
}, "setHelper"), eo = /* @__PURE__ */ o(async (e, t) => (await xt, xt = xa(e, t), xt), "set");
|
|
2689
|
+
var wa = /* @__PURE__ */ o((e) => {
|
|
3613
2690
|
let { body: t, timestamp: r } = e;
|
|
3614
2691
|
return {
|
|
3615
2692
|
timestamp: r,
|
|
@@ -3617,104 +2694,104 @@ var kl = /* @__PURE__ */ o((e) => {
|
|
|
3617
2694
|
eventId: t?.eventId,
|
|
3618
2695
|
sessionId: t?.sessionId
|
|
3619
2696
|
};
|
|
3620
|
-
}, "upgradeFields"),
|
|
2697
|
+
}, "upgradeFields"), Sa = ["init", "upgrade"], ka = ["build", "dev", "error"], Zn = /* @__PURE__ */ o((e, t) => {
|
|
3621
2698
|
let r = t.map((n) => e?.[n]).filter(Boolean).sort((n, i) => i.timestamp - n.timestamp);
|
|
3622
2699
|
return r.length > 0 ? r[0] : void 0;
|
|
3623
|
-
}, "lastEvent"),
|
|
3624
|
-
let t = e || await
|
|
2700
|
+
}, "lastEvent"), Ea = /* @__PURE__ */ o(async (e = void 0) => {
|
|
2701
|
+
let t = e || await wt.get("lastEvents") || {}, r = Zn(t, Sa), n = Zn(t, ka);
|
|
3625
2702
|
if (r)
|
|
3626
|
-
return !n?.timestamp || r.timestamp > n.timestamp ?
|
|
2703
|
+
return !n?.timestamp || r.timestamp > n.timestamp ? wa(r) : void 0;
|
|
3627
2704
|
}, "getPrecedingUpgrade");
|
|
3628
2705
|
|
|
3629
2706
|
// src/telemetry/fetch.ts
|
|
3630
|
-
var
|
|
2707
|
+
var to = global.fetch;
|
|
3631
2708
|
|
|
3632
2709
|
// src/telemetry/session-id.ts
|
|
3633
|
-
import { cache as
|
|
3634
|
-
var
|
|
3635
|
-
var
|
|
2710
|
+
import { cache as ro } from "storybook/internal/common";
|
|
2711
|
+
var Pa = 1e3 * 60 * 60 * 2, $;
|
|
2712
|
+
var St = /* @__PURE__ */ o(async () => {
|
|
3636
2713
|
let e = Date.now();
|
|
3637
|
-
if (
|
|
3638
|
-
let t = await
|
|
3639
|
-
t && t.lastUsed >= e -
|
|
2714
|
+
if (!$) {
|
|
2715
|
+
let t = await ro.get("session");
|
|
2716
|
+
t && t.lastUsed >= e - Pa ? $ = t.id : $ = U();
|
|
3640
2717
|
}
|
|
3641
|
-
return await
|
|
2718
|
+
return await ro.set("session", { id: $, lastUsed: e }), $;
|
|
3642
2719
|
}, "getSessionId");
|
|
3643
2720
|
|
|
3644
2721
|
// src/telemetry/telemetry.ts
|
|
3645
|
-
var
|
|
2722
|
+
var va = (0, oo.default)(to), Ta = process.env.STORYBOOK_TELEMETRY_URL || "https://storybook.js.org/event-log", Se = [], Ca = /* @__PURE__ */ o(
|
|
3646
2723
|
(e, t) => {
|
|
3647
|
-
|
|
3648
|
-
}, "addToGlobalContext"),
|
|
2724
|
+
kt[e] = t;
|
|
2725
|
+
}, "addToGlobalContext"), Ia = /* @__PURE__ */ o(() => {
|
|
3649
2726
|
try {
|
|
3650
|
-
let e =
|
|
2727
|
+
let e = no.platform();
|
|
3651
2728
|
return e === "win32" ? "Windows" : e === "darwin" ? "macOS" : e === "linux" ? "Linux" : `Other: ${e}`;
|
|
3652
2729
|
} catch {
|
|
3653
2730
|
return "Unknown";
|
|
3654
2731
|
}
|
|
3655
|
-
}, "getOperatingSystem"),
|
|
2732
|
+
}, "getOperatingSystem"), kt = {
|
|
3656
2733
|
inCI: !!process.env.CI,
|
|
3657
2734
|
isTTY: process.stdout.isTTY,
|
|
3658
|
-
platform:
|
|
2735
|
+
platform: Ia(),
|
|
3659
2736
|
nodeVersion: process.versions.node
|
|
3660
|
-
},
|
|
3661
|
-
let { eventType: n, payload: i, metadata: s, ...a } = e, c = await
|
|
2737
|
+
}, Aa = /* @__PURE__ */ o(async (e, t, r) => {
|
|
2738
|
+
let { eventType: n, payload: i, metadata: s, ...a } = e, c = await St(), u = U(), f = { ...a, eventType: n, eventId: u, sessionId: c, metadata: s,
|
|
3662
2739
|
payload: i, context: t };
|
|
3663
|
-
return
|
|
2740
|
+
return va(Ta, {
|
|
3664
2741
|
method: "post",
|
|
3665
|
-
body: JSON.stringify(
|
|
2742
|
+
body: JSON.stringify(f),
|
|
3666
2743
|
headers: { "Content-Type": "application/json" },
|
|
3667
2744
|
retries: 3,
|
|
3668
2745
|
retryOn: [503, 504],
|
|
3669
|
-
retryDelay: /* @__PURE__ */ o((
|
|
2746
|
+
retryDelay: /* @__PURE__ */ o((l) => 2 ** l * (typeof r?.retryDelay == "number" && !Number.isNaN(r?.retryDelay) ? r.retryDelay : 1e3), "\
|
|
3670
2747
|
retryDelay")
|
|
3671
2748
|
});
|
|
3672
2749
|
}, "prepareRequest");
|
|
3673
|
-
async function
|
|
3674
|
-
let { eventType: r, payload: n, metadata: i, ...s } = e, a = t.stripMetadata ?
|
|
3675
|
-
...
|
|
3676
|
-
anonymousId:
|
|
2750
|
+
async function io(e, t = { retryDelay: 1e3, immediate: !1 }) {
|
|
2751
|
+
let { eventType: r, payload: n, metadata: i, ...s } = e, a = t.stripMetadata ? kt : {
|
|
2752
|
+
...kt,
|
|
2753
|
+
anonymousId: Qn()
|
|
3677
2754
|
}, c;
|
|
3678
2755
|
try {
|
|
3679
|
-
c =
|
|
3680
|
-
let u = await
|
|
3681
|
-
await
|
|
2756
|
+
c = Aa(e, a, t), Se.push(c), t.immediate ? await Promise.all(Se) : await c;
|
|
2757
|
+
let u = await St(), f = U(), l = { ...s, eventType: r, eventId: f, sessionId: u, metadata: i, payload: n, context: a };
|
|
2758
|
+
await eo(r, l);
|
|
3682
2759
|
} catch {
|
|
3683
2760
|
} finally {
|
|
3684
|
-
|
|
2761
|
+
Se = Se.filter((u) => u !== c);
|
|
3685
2762
|
}
|
|
3686
2763
|
}
|
|
3687
|
-
o(
|
|
2764
|
+
o(io, "sendTelemetry");
|
|
3688
2765
|
|
|
3689
2766
|
// src/telemetry/index.ts
|
|
3690
|
-
var
|
|
3691
|
-
sExampleStoryId"),
|
|
3692
|
-
e !== "boot" && r.notify !== !1 && await
|
|
2767
|
+
var ud = /* @__PURE__ */ o((e) => e.startsWith("example-button--") || e.startsWith("example-header--") || e.startsWith("example-page--"), "i\
|
|
2768
|
+
sExampleStoryId"), fd = /* @__PURE__ */ o(async (e, t = {}, r = {}) => {
|
|
2769
|
+
e !== "boot" && r.notify !== !1 && await It();
|
|
3693
2770
|
let n = {
|
|
3694
2771
|
eventType: e,
|
|
3695
2772
|
payload: t
|
|
3696
2773
|
};
|
|
3697
2774
|
try {
|
|
3698
|
-
r?.stripMetadata || (n.metadata = await
|
|
2775
|
+
r?.stripMetadata || (n.metadata = await qn(r?.configDir));
|
|
3699
2776
|
} catch (i) {
|
|
3700
|
-
n.payload.metadataErrorMessage =
|
|
2777
|
+
n.payload.metadataErrorMessage = Y(i).message, r?.enableCrashReports && (n.payload.metadataError = Y(i));
|
|
3701
2778
|
} finally {
|
|
3702
2779
|
let { error: i } = n.payload;
|
|
3703
|
-
i && (n.payload.error =
|
|
3704
|
-
[telemetry]`),
|
|
2780
|
+
i && (n.payload.error = Y(i)), (!n.payload.error || r?.enableCrashReports) && (process.env?.STORYBOOK_TELEMETRY_DEBUG && (so.info(`
|
|
2781
|
+
[telemetry]`), so.info(JSON.stringify(n, null, 2))), await io(n, r));
|
|
3705
2782
|
}
|
|
3706
2783
|
}, "telemetry");
|
|
3707
2784
|
export {
|
|
3708
|
-
|
|
3709
|
-
|
|
3710
|
-
|
|
3711
|
-
|
|
3712
|
-
|
|
3713
|
-
|
|
3714
|
-
|
|
3715
|
-
|
|
3716
|
-
|
|
3717
|
-
|
|
3718
|
-
|
|
3719
|
-
|
|
2785
|
+
Ca as addToGlobalContext,
|
|
2786
|
+
D as cleanPaths,
|
|
2787
|
+
ua as computeStorybookMetadata,
|
|
2788
|
+
Ea as getPrecedingUpgrade,
|
|
2789
|
+
qn as getStorybookMetadata,
|
|
2790
|
+
ud as isExampleStoryId,
|
|
2791
|
+
Jn as metaFrameworks,
|
|
2792
|
+
bt as oneWayHash,
|
|
2793
|
+
Ot as removeAnsiEscapeCodes,
|
|
2794
|
+
Vn as sanitizeAddonName,
|
|
2795
|
+
Y as sanitizeError,
|
|
2796
|
+
fd as telemetry
|
|
3720
2797
|
};
|