nitro-nightly 3.0.1-20260106-130706-e20c92d9 → 3.0.1-20260106-202835-5325b208
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/_build/rolldown.mjs +6 -14
- package/dist/_build/rollup.mjs +6 -41
- package/dist/_build/rollup2.mjs +56 -0
- package/dist/_build/shared.mjs +2 -1
- package/dist/_build/shared2.mjs +1 -1
- package/dist/_build/shared3.mjs +1 -1
- package/dist/_build/vite.build.mjs +1 -19
- package/dist/_dev.mjs +2 -1
- package/dist/_libs/@hiogawa/vite-plugin-fullstack.mjs +5 -1560
- package/dist/_libs/@jridgewell/gen-mapping.mjs +2 -304
- package/dist/_libs/@jridgewell/remapping.mjs +2 -1
- package/dist/_libs/@jridgewell/resolve-uri.mjs +166 -0
- package/dist/_libs/@jridgewell/sourcemap-codec.mjs +167 -0
- package/dist/_libs/@jridgewell/trace-mapping.mjs +141 -0
- package/dist/_libs/@rolldown/pluginutils.mjs +31 -0
- package/dist/_libs/@rollup/plugin-commonjs.mjs +33 -2636
- package/dist/_libs/@rollup/plugin-inject.mjs +3 -2
- package/dist/_libs/@rollup/plugin-json.mjs +1 -1
- package/dist/_libs/@rollup/plugin-node-resolve.mjs +7 -1111
- package/dist/_libs/@rollup/plugin-replace.mjs +2 -2
- package/dist/_libs/@rollup/pluginutils.mjs +241 -0
- package/dist/_libs/c12.mjs +63 -2513
- package/dist/_libs/chokidar.mjs +1 -234
- package/dist/_libs/commondir.mjs +22 -0
- package/dist/_libs/confbox.mjs +1102 -502
- package/dist/_libs/deepmerge.mjs +86 -0
- package/dist/_libs/dotenv.mjs +345 -0
- package/dist/_libs/estree-walker.mjs +144 -1
- package/dist/_libs/exsolve.mjs +1007 -0
- package/dist/_libs/fdir.mjs +514 -0
- package/dist/_libs/function-bind.mjs +63 -0
- package/dist/_libs/giget.mjs +1376 -2234
- package/dist/_libs/hasown.mjs +14 -0
- package/dist/_libs/is-core-module.mjs +220 -0
- package/dist/_libs/is-module.mjs +13 -0
- package/dist/_libs/is-reference.mjs +33 -0
- package/dist/_libs/js-tokens.mjs +382 -0
- package/dist/_libs/local-pkg.mjs +6 -1560
- package/dist/_libs/magic-string.mjs +939 -0
- package/dist/_libs/mlly.mjs +1415 -0
- package/dist/_libs/node-fetch-native.mjs +7 -0
- package/dist/_libs/nypm.mjs +239 -0
- package/dist/_libs/path-parse.mjs +47 -0
- package/dist/_libs/pathe.mjs +163 -2
- package/dist/_libs/perfect-debounce.mjs +89 -0
- package/dist/_libs/picomatch.mjs +1673 -0
- package/dist/_libs/pkg-types.mjs +197 -0
- package/dist/_libs/quansync.mjs +90 -0
- package/dist/_libs/rc9.mjs +136 -0
- package/dist/_libs/readdirp.mjs +237 -0
- package/dist/_libs/resolve.mjs +689 -0
- package/dist/_libs/strip-literal.mjs +51 -0
- package/dist/_libs/tinyexec.mjs +627 -0
- package/dist/_libs/tinyglobby.mjs +2 -1
- package/dist/_libs/unimport.mjs +42 -1575
- package/dist/_libs/unplugin-utils.mjs +61 -0
- package/dist/_libs/unplugin.mjs +1225 -0
- package/dist/_libs/unwasm.mjs +3 -2
- package/dist/_libs/webpack-virtual-modules.mjs +272 -0
- package/dist/_nitro.mjs +7 -4
- package/dist/_nitro2.mjs +3 -3
- package/dist/_presets.mjs +5 -3
- package/dist/builder.mjs +4 -4
- package/dist/cli/_chunks/{build.mjs → build2.mjs} +1 -1
- package/dist/cli/_chunks/dev.mjs +1 -1
- package/dist/cli/_chunks/list.mjs +1 -1
- package/dist/cli/_chunks/prepare.mjs +1 -1
- package/dist/cli/_chunks/run.mjs +1 -1
- package/dist/cli/index.mjs +1 -1
- package/dist/types/index.d.mts +4 -4
- package/dist/vite.mjs +1824 -19
- package/package.json +2 -2
- package/dist/_build/shared4.mjs +0 -1114
- package/dist/_build/vite.plugin.mjs +0 -712
package/dist/_libs/giget.mjs
CHANGED
|
@@ -1,19 +1,17 @@
|
|
|
1
1
|
import { n as __exportAll } from "../_rolldown.mjs";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
2
|
+
import { n as basename$1, r as dirname$1, u as resolve$1 } from "./pathe.mjs";
|
|
3
|
+
import { a as installDependencies } from "./nypm.mjs";
|
|
4
|
+
import { t as l$1 } from "./node-fetch-native.mjs";
|
|
4
5
|
import { createWriteStream, existsSync, readdirSync, renameSync } from "node:fs";
|
|
5
6
|
import nativeFs from "fs";
|
|
6
7
|
import path from "path";
|
|
7
8
|
import Ds from "crypto";
|
|
8
9
|
import { mkdir, readFile, rm, writeFile } from "node:fs/promises";
|
|
9
10
|
import { homedir, tmpdir } from "node:os";
|
|
10
|
-
import { delimiter, dirname as dirname$1, normalize as normalize$1, resolve as resolve$1 } from "node:path";
|
|
11
|
-
import { cwd } from "node:process";
|
|
12
11
|
import { promisify } from "node:util";
|
|
13
12
|
import { defu } from "defu";
|
|
14
|
-
import {
|
|
15
|
-
import
|
|
16
|
-
import { spawn } from "node:child_process";
|
|
13
|
+
import { pipeline } from "node:stream";
|
|
14
|
+
import "node:child_process";
|
|
17
15
|
import j$1 from "assert";
|
|
18
16
|
import nt from "events";
|
|
19
17
|
import ot from "stream";
|
|
@@ -22,867 +20,11 @@ import P from "buffer";
|
|
|
22
20
|
import O$2 from "zlib";
|
|
23
21
|
import nt$1 from "process";
|
|
24
22
|
import a$a from "util";
|
|
25
|
-
import c from "node:readline";
|
|
26
23
|
|
|
27
|
-
//#region node_modules/.pnpm/tinyexec@1.0.2/node_modules/tinyexec/dist/main.js
|
|
28
|
-
var l$2 = Object.create;
|
|
29
|
-
var u$5 = Object.defineProperty;
|
|
30
|
-
var d = Object.getOwnPropertyDescriptor;
|
|
31
|
-
var f$4 = Object.getOwnPropertyNames;
|
|
32
|
-
var p$1 = Object.getPrototypeOf;
|
|
33
|
-
var m$3 = Object.prototype.hasOwnProperty;
|
|
34
|
-
var h$1 = (e$7, t$7) => () => (t$7 || e$7((t$7 = { exports: {} }).exports, t$7), t$7.exports);
|
|
35
|
-
var g = (e$7, t$7, n$4, r) => {
|
|
36
|
-
if (t$7 && typeof t$7 === "object" || typeof t$7 === "function") for (var i$8 = f$4(t$7), a$11 = 0, o$6 = i$8.length, s$8; a$11 < o$6; a$11++) {
|
|
37
|
-
s$8 = i$8[a$11];
|
|
38
|
-
if (!m$3.call(e$7, s$8) && s$8 !== n$4) u$5(e$7, s$8, {
|
|
39
|
-
get: ((e$8) => t$7[e$8]).bind(null, s$8),
|
|
40
|
-
enumerable: !(r = d(t$7, s$8)) || r.enumerable
|
|
41
|
-
});
|
|
42
|
-
}
|
|
43
|
-
return e$7;
|
|
44
|
-
};
|
|
45
|
-
var _$1 = (e$7, t$7, n$4) => (n$4 = e$7 != null ? l$2(p$1(e$7)) : {}, g(t$7 || !e$7 || !e$7.__esModule ? u$5(n$4, "default", {
|
|
46
|
-
value: e$7,
|
|
47
|
-
enumerable: true
|
|
48
|
-
}) : n$4, e$7));
|
|
49
|
-
var v$2 = /* @__PURE__ */ createRequire$1(import.meta.url);
|
|
50
|
-
const y$3 = /^path$/i;
|
|
51
|
-
const b = {
|
|
52
|
-
key: "PATH",
|
|
53
|
-
value: ""
|
|
54
|
-
};
|
|
55
|
-
function x(e$7) {
|
|
56
|
-
for (const t$7 in e$7) {
|
|
57
|
-
if (!Object.prototype.hasOwnProperty.call(e$7, t$7) || !y$3.test(t$7)) continue;
|
|
58
|
-
const n$4 = e$7[t$7];
|
|
59
|
-
if (!n$4) return b;
|
|
60
|
-
return {
|
|
61
|
-
key: t$7,
|
|
62
|
-
value: n$4
|
|
63
|
-
};
|
|
64
|
-
}
|
|
65
|
-
return b;
|
|
66
|
-
}
|
|
67
|
-
function S$1(e$7, t$7) {
|
|
68
|
-
const i$8 = t$7.value.split(delimiter);
|
|
69
|
-
let o$6 = e$7;
|
|
70
|
-
let s$8;
|
|
71
|
-
do {
|
|
72
|
-
i$8.push(resolve$1(o$6, "node_modules", ".bin"));
|
|
73
|
-
s$8 = o$6;
|
|
74
|
-
o$6 = dirname$1(o$6);
|
|
75
|
-
} while (o$6 !== s$8);
|
|
76
|
-
return {
|
|
77
|
-
key: t$7.key,
|
|
78
|
-
value: i$8.join(delimiter)
|
|
79
|
-
};
|
|
80
|
-
}
|
|
81
|
-
function C$1(e$7, t$7) {
|
|
82
|
-
const n$4 = {
|
|
83
|
-
...process.env,
|
|
84
|
-
...t$7
|
|
85
|
-
};
|
|
86
|
-
const r = S$1(e$7, x(n$4));
|
|
87
|
-
n$4[r.key] = r.value;
|
|
88
|
-
return n$4;
|
|
89
|
-
}
|
|
90
|
-
const w$2 = (e$7) => {
|
|
91
|
-
let t$7 = e$7.length;
|
|
92
|
-
const n$4 = new PassThrough();
|
|
93
|
-
const r = () => {
|
|
94
|
-
if (--t$7 === 0) n$4.emit("end");
|
|
95
|
-
};
|
|
96
|
-
for (const t$8 of e$7) {
|
|
97
|
-
t$8.pipe(n$4, { end: false });
|
|
98
|
-
t$8.on("end", r);
|
|
99
|
-
}
|
|
100
|
-
return n$4;
|
|
101
|
-
};
|
|
102
|
-
var T$1 = h$1((exports, t$7) => {
|
|
103
|
-
t$7.exports = a$11;
|
|
104
|
-
a$11.sync = o$6;
|
|
105
|
-
var n$4 = v$2("fs");
|
|
106
|
-
function r(e$7, t$8) {
|
|
107
|
-
var n$5 = t$8.pathExt !== void 0 ? t$8.pathExt : process.env.PATHEXT;
|
|
108
|
-
if (!n$5) return true;
|
|
109
|
-
n$5 = n$5.split(";");
|
|
110
|
-
if (n$5.indexOf("") !== -1) return true;
|
|
111
|
-
for (var r$3 = 0; r$3 < n$5.length; r$3++) {
|
|
112
|
-
var i$9 = n$5[r$3].toLowerCase();
|
|
113
|
-
if (i$9 && e$7.substr(-i$9.length).toLowerCase() === i$9) return true;
|
|
114
|
-
}
|
|
115
|
-
return false;
|
|
116
|
-
}
|
|
117
|
-
function i$8(e$7, t$8, n$5) {
|
|
118
|
-
if (!e$7.isSymbolicLink() && !e$7.isFile()) return false;
|
|
119
|
-
return r(t$8, n$5);
|
|
120
|
-
}
|
|
121
|
-
function a$11(e$7, t$8, r$3) {
|
|
122
|
-
n$4.stat(e$7, function(n$5, a$12) {
|
|
123
|
-
r$3(n$5, n$5 ? false : i$8(a$12, e$7, t$8));
|
|
124
|
-
});
|
|
125
|
-
}
|
|
126
|
-
function o$6(e$7, t$8) {
|
|
127
|
-
return i$8(n$4.statSync(e$7), e$7, t$8);
|
|
128
|
-
}
|
|
129
|
-
});
|
|
130
|
-
var E$1 = h$1((exports, t$7) => {
|
|
131
|
-
t$7.exports = r;
|
|
132
|
-
r.sync = i$8;
|
|
133
|
-
var n$4 = v$2("fs");
|
|
134
|
-
function r(e$7, t$8, r$3) {
|
|
135
|
-
n$4.stat(e$7, function(e$8, n$5) {
|
|
136
|
-
r$3(e$8, e$8 ? false : a$11(n$5, t$8));
|
|
137
|
-
});
|
|
138
|
-
}
|
|
139
|
-
function i$8(e$7, t$8) {
|
|
140
|
-
return a$11(n$4.statSync(e$7), t$8);
|
|
141
|
-
}
|
|
142
|
-
function a$11(e$7, t$8) {
|
|
143
|
-
return e$7.isFile() && o$6(e$7, t$8);
|
|
144
|
-
}
|
|
145
|
-
function o$6(e$7, t$8) {
|
|
146
|
-
var n$5 = e$7.mode;
|
|
147
|
-
var r$3 = e$7.uid;
|
|
148
|
-
var i$9 = e$7.gid;
|
|
149
|
-
var a$12 = t$8.uid !== void 0 ? t$8.uid : process.getuid && process.getuid();
|
|
150
|
-
var o$7 = t$8.gid !== void 0 ? t$8.gid : process.getgid && process.getgid();
|
|
151
|
-
var s$8 = parseInt("100", 8);
|
|
152
|
-
var c$6 = parseInt("010", 8);
|
|
153
|
-
var l$3 = parseInt("001", 8);
|
|
154
|
-
var u$6 = s$8 | c$6;
|
|
155
|
-
return n$5 & l$3 || n$5 & c$6 && i$9 === o$7 || n$5 & s$8 && r$3 === a$12 || n$5 & u$6 && a$12 === 0;
|
|
156
|
-
}
|
|
157
|
-
});
|
|
158
|
-
var D = h$1((exports, t$7) => {
|
|
159
|
-
v$2("fs");
|
|
160
|
-
var r;
|
|
161
|
-
if (process.platform === "win32" || global.TESTING_WINDOWS) r = T$1();
|
|
162
|
-
else r = E$1();
|
|
163
|
-
t$7.exports = i$8;
|
|
164
|
-
i$8.sync = a$11;
|
|
165
|
-
function i$8(e$7, t$8, n$4) {
|
|
166
|
-
if (typeof t$8 === "function") {
|
|
167
|
-
n$4 = t$8;
|
|
168
|
-
t$8 = {};
|
|
169
|
-
}
|
|
170
|
-
if (!n$4) {
|
|
171
|
-
if (typeof Promise !== "function") throw new TypeError("callback not provided");
|
|
172
|
-
return new Promise(function(n$5, r$3) {
|
|
173
|
-
i$8(e$7, t$8 || {}, function(e$8, t$9) {
|
|
174
|
-
if (e$8) r$3(e$8);
|
|
175
|
-
else n$5(t$9);
|
|
176
|
-
});
|
|
177
|
-
});
|
|
178
|
-
}
|
|
179
|
-
r(e$7, t$8 || {}, function(e$8, r$3) {
|
|
180
|
-
if (e$8) {
|
|
181
|
-
if (e$8.code === "EACCES" || t$8 && t$8.ignoreErrors) {
|
|
182
|
-
e$8 = null;
|
|
183
|
-
r$3 = false;
|
|
184
|
-
}
|
|
185
|
-
}
|
|
186
|
-
n$4(e$8, r$3);
|
|
187
|
-
});
|
|
188
|
-
}
|
|
189
|
-
function a$11(e$7, t$8) {
|
|
190
|
-
try {
|
|
191
|
-
return r.sync(e$7, t$8 || {});
|
|
192
|
-
} catch (e$8) {
|
|
193
|
-
if (t$8 && t$8.ignoreErrors || e$8.code === "EACCES") return false;
|
|
194
|
-
else throw e$8;
|
|
195
|
-
}
|
|
196
|
-
}
|
|
197
|
-
});
|
|
198
|
-
var O$3 = h$1((exports, t$7) => {
|
|
199
|
-
const n$4 = process.platform === "win32" || process.env.OSTYPE === "cygwin" || process.env.OSTYPE === "msys";
|
|
200
|
-
const r = v$2("path");
|
|
201
|
-
const i$8 = n$4 ? ";" : ":";
|
|
202
|
-
const a$11 = D();
|
|
203
|
-
const o$6 = (e$7) => Object.assign(/* @__PURE__ */ new Error(`not found: ${e$7}`), { code: "ENOENT" });
|
|
204
|
-
const s$8 = (e$7, t$8) => {
|
|
205
|
-
const r$3 = t$8.colon || i$8;
|
|
206
|
-
const a$12 = e$7.match(/\//) || n$4 && e$7.match(/\\/) ? [""] : [...n$4 ? [process.cwd()] : [], ...(t$8.path || process.env.PATH || "").split(r$3)];
|
|
207
|
-
const o$7 = n$4 ? t$8.pathExt || process.env.PATHEXT || ".EXE;.CMD;.BAT;.COM" : "";
|
|
208
|
-
const s$9 = n$4 ? o$7.split(r$3) : [""];
|
|
209
|
-
if (n$4) {
|
|
210
|
-
if (e$7.indexOf(".") !== -1 && s$9[0] !== "") s$9.unshift("");
|
|
211
|
-
}
|
|
212
|
-
return {
|
|
213
|
-
pathEnv: a$12,
|
|
214
|
-
pathExt: s$9,
|
|
215
|
-
pathExtExe: o$7
|
|
216
|
-
};
|
|
217
|
-
};
|
|
218
|
-
const c$6 = (e$7, t$8, n$5) => {
|
|
219
|
-
if (typeof t$8 === "function") {
|
|
220
|
-
n$5 = t$8;
|
|
221
|
-
t$8 = {};
|
|
222
|
-
}
|
|
223
|
-
if (!t$8) t$8 = {};
|
|
224
|
-
const { pathEnv: i$9, pathExt: c$7, pathExtExe: l$4 } = s$8(e$7, t$8);
|
|
225
|
-
const u$6 = [];
|
|
226
|
-
const d$1 = (n$6) => new Promise((a$12, s$9) => {
|
|
227
|
-
if (n$6 === i$9.length) return t$8.all && u$6.length ? a$12(u$6) : s$9(o$6(e$7));
|
|
228
|
-
const c$8 = i$9[n$6];
|
|
229
|
-
const l$5 = /^".*"$/.test(c$8) ? c$8.slice(1, -1) : c$8;
|
|
230
|
-
const d$2 = r.join(l$5, e$7);
|
|
231
|
-
a$12(f$5(!l$5 && /^\.[\\\/]/.test(e$7) ? e$7.slice(0, 2) + d$2 : d$2, n$6, 0));
|
|
232
|
-
});
|
|
233
|
-
const f$5 = (e$8, n$6, r$3) => new Promise((i$10, o$7) => {
|
|
234
|
-
if (r$3 === c$7.length) return i$10(d$1(n$6 + 1));
|
|
235
|
-
const s$9 = c$7[r$3];
|
|
236
|
-
a$11(e$8 + s$9, { pathExt: l$4 }, (a$12, o$8) => {
|
|
237
|
-
if (!a$12 && o$8) if (t$8.all) u$6.push(e$8 + s$9);
|
|
238
|
-
else return i$10(e$8 + s$9);
|
|
239
|
-
return i$10(f$5(e$8, n$6, r$3 + 1));
|
|
240
|
-
});
|
|
241
|
-
});
|
|
242
|
-
return n$5 ? d$1(0).then((e$8) => n$5(null, e$8), n$5) : d$1(0);
|
|
243
|
-
};
|
|
244
|
-
const l$3 = (e$7, t$8) => {
|
|
245
|
-
t$8 = t$8 || {};
|
|
246
|
-
const { pathEnv: n$5, pathExt: i$9, pathExtExe: c$7 } = s$8(e$7, t$8);
|
|
247
|
-
const l$4 = [];
|
|
248
|
-
for (let o$7 = 0; o$7 < n$5.length; o$7++) {
|
|
249
|
-
const s$9 = n$5[o$7];
|
|
250
|
-
const u$6 = /^".*"$/.test(s$9) ? s$9.slice(1, -1) : s$9;
|
|
251
|
-
const d$1 = r.join(u$6, e$7);
|
|
252
|
-
const f$5 = !u$6 && /^\.[\\\/]/.test(e$7) ? e$7.slice(0, 2) + d$1 : d$1;
|
|
253
|
-
for (let e$8 = 0; e$8 < i$9.length; e$8++) {
|
|
254
|
-
const n$6 = f$5 + i$9[e$8];
|
|
255
|
-
try {
|
|
256
|
-
if (a$11.sync(n$6, { pathExt: c$7 })) if (t$8.all) l$4.push(n$6);
|
|
257
|
-
else return n$6;
|
|
258
|
-
} catch (e$9) {}
|
|
259
|
-
}
|
|
260
|
-
}
|
|
261
|
-
if (t$8.all && l$4.length) return l$4;
|
|
262
|
-
if (t$8.nothrow) return null;
|
|
263
|
-
throw o$6(e$7);
|
|
264
|
-
};
|
|
265
|
-
t$7.exports = c$6;
|
|
266
|
-
c$6.sync = l$3;
|
|
267
|
-
});
|
|
268
|
-
var k$1 = h$1((exports, t$7) => {
|
|
269
|
-
const n$4 = (e$7 = {}) => {
|
|
270
|
-
const t$8 = e$7.env || process.env;
|
|
271
|
-
if ((e$7.platform || process.platform) !== "win32") return "PATH";
|
|
272
|
-
return Object.keys(t$8).reverse().find((e$8) => e$8.toUpperCase() === "PATH") || "Path";
|
|
273
|
-
};
|
|
274
|
-
t$7.exports = n$4;
|
|
275
|
-
t$7.exports.default = n$4;
|
|
276
|
-
});
|
|
277
|
-
var A = h$1((exports, t$7) => {
|
|
278
|
-
const n$4 = v$2("path");
|
|
279
|
-
const r = O$3();
|
|
280
|
-
const i$8 = k$1();
|
|
281
|
-
function a$11(e$7, t$8) {
|
|
282
|
-
const a$12 = e$7.options.env || process.env;
|
|
283
|
-
const o$7 = process.cwd();
|
|
284
|
-
const s$8 = e$7.options.cwd != null;
|
|
285
|
-
const c$6 = s$8 && process.chdir !== void 0 && !process.chdir.disabled;
|
|
286
|
-
if (c$6) try {
|
|
287
|
-
process.chdir(e$7.options.cwd);
|
|
288
|
-
} catch (e$8) {}
|
|
289
|
-
let l$3;
|
|
290
|
-
try {
|
|
291
|
-
l$3 = r.sync(e$7.command, {
|
|
292
|
-
path: a$12[i$8({ env: a$12 })],
|
|
293
|
-
pathExt: t$8 ? n$4.delimiter : void 0
|
|
294
|
-
});
|
|
295
|
-
} catch (e$8) {} finally {
|
|
296
|
-
if (c$6) process.chdir(o$7);
|
|
297
|
-
}
|
|
298
|
-
if (l$3) l$3 = n$4.resolve(s$8 ? e$7.options.cwd : "", l$3);
|
|
299
|
-
return l$3;
|
|
300
|
-
}
|
|
301
|
-
function o$6(e$7) {
|
|
302
|
-
return a$11(e$7) || a$11(e$7, true);
|
|
303
|
-
}
|
|
304
|
-
t$7.exports = o$6;
|
|
305
|
-
});
|
|
306
|
-
var j$2 = h$1((exports, t$7) => {
|
|
307
|
-
const n$4 = /([()\][%!^"`<>&|;, *?])/g;
|
|
308
|
-
function r(e$7) {
|
|
309
|
-
e$7 = e$7.replace(n$4, "^$1");
|
|
310
|
-
return e$7;
|
|
311
|
-
}
|
|
312
|
-
function i$8(e$7, t$8) {
|
|
313
|
-
e$7 = `${e$7}`;
|
|
314
|
-
e$7 = e$7.replace(/(\\*)"/g, "$1$1\\\"");
|
|
315
|
-
e$7 = e$7.replace(/(\\*)$/, "$1$1");
|
|
316
|
-
e$7 = `"${e$7}"`;
|
|
317
|
-
e$7 = e$7.replace(n$4, "^$1");
|
|
318
|
-
if (t$8) e$7 = e$7.replace(n$4, "^$1");
|
|
319
|
-
return e$7;
|
|
320
|
-
}
|
|
321
|
-
t$7.exports.command = r;
|
|
322
|
-
t$7.exports.argument = i$8;
|
|
323
|
-
});
|
|
324
|
-
var M = h$1((exports, t$7) => {
|
|
325
|
-
t$7.exports = /^#!(.*)/;
|
|
326
|
-
});
|
|
327
|
-
var N = h$1((exports, t$7) => {
|
|
328
|
-
const n$4 = M();
|
|
329
|
-
t$7.exports = (e$7 = "") => {
|
|
330
|
-
const t$8 = e$7.match(n$4);
|
|
331
|
-
if (!t$8) return null;
|
|
332
|
-
const [r, i$8] = t$8[0].replace(/#! ?/, "").split(" ");
|
|
333
|
-
const a$11 = r.split("/").pop();
|
|
334
|
-
if (a$11 === "env") return i$8;
|
|
335
|
-
return i$8 ? `${a$11} ${i$8}` : a$11;
|
|
336
|
-
};
|
|
337
|
-
});
|
|
338
|
-
var P$1 = h$1((exports, t$7) => {
|
|
339
|
-
const n$4 = v$2("fs");
|
|
340
|
-
const r = N();
|
|
341
|
-
function i$8(e$7) {
|
|
342
|
-
const t$8 = 150;
|
|
343
|
-
const i$9 = Buffer.alloc(t$8);
|
|
344
|
-
let a$11;
|
|
345
|
-
try {
|
|
346
|
-
a$11 = n$4.openSync(e$7, "r");
|
|
347
|
-
n$4.readSync(a$11, i$9, 0, t$8, 0);
|
|
348
|
-
n$4.closeSync(a$11);
|
|
349
|
-
} catch (e$8) {}
|
|
350
|
-
return r(i$9.toString());
|
|
351
|
-
}
|
|
352
|
-
t$7.exports = i$8;
|
|
353
|
-
});
|
|
354
|
-
var F$3 = h$1((exports, t$7) => {
|
|
355
|
-
const n$4 = v$2("path");
|
|
356
|
-
const r = A();
|
|
357
|
-
const i$8 = j$2();
|
|
358
|
-
const a$11 = P$1();
|
|
359
|
-
const o$6 = process.platform === "win32";
|
|
360
|
-
const s$8 = /\.(?:com|exe)$/i;
|
|
361
|
-
const c$6 = /node_modules[\\/].bin[\\/][^\\/]+\.cmd$/i;
|
|
362
|
-
function l$3(e$7) {
|
|
363
|
-
e$7.file = r(e$7);
|
|
364
|
-
const t$8 = e$7.file && a$11(e$7.file);
|
|
365
|
-
if (t$8) {
|
|
366
|
-
e$7.args.unshift(e$7.file);
|
|
367
|
-
e$7.command = t$8;
|
|
368
|
-
return r(e$7);
|
|
369
|
-
}
|
|
370
|
-
return e$7.file;
|
|
371
|
-
}
|
|
372
|
-
function u$6(e$7) {
|
|
373
|
-
if (!o$6) return e$7;
|
|
374
|
-
const t$8 = l$3(e$7);
|
|
375
|
-
const r$3 = !s$8.test(t$8);
|
|
376
|
-
if (e$7.options.forceShell || r$3) {
|
|
377
|
-
const r$4 = c$6.test(t$8);
|
|
378
|
-
e$7.command = n$4.normalize(e$7.command);
|
|
379
|
-
e$7.command = i$8.command(e$7.command);
|
|
380
|
-
e$7.args = e$7.args.map((e$8) => i$8.argument(e$8, r$4));
|
|
381
|
-
e$7.args = [
|
|
382
|
-
"/d",
|
|
383
|
-
"/s",
|
|
384
|
-
"/c",
|
|
385
|
-
`"${[e$7.command].concat(e$7.args).join(" ")}"`
|
|
386
|
-
];
|
|
387
|
-
e$7.command = process.env.comspec || "cmd.exe";
|
|
388
|
-
e$7.options.windowsVerbatimArguments = true;
|
|
389
|
-
}
|
|
390
|
-
return e$7;
|
|
391
|
-
}
|
|
392
|
-
function d$1(e$7, t$8, n$5) {
|
|
393
|
-
if (t$8 && !Array.isArray(t$8)) {
|
|
394
|
-
n$5 = t$8;
|
|
395
|
-
t$8 = null;
|
|
396
|
-
}
|
|
397
|
-
t$8 = t$8 ? t$8.slice(0) : [];
|
|
398
|
-
n$5 = Object.assign({}, n$5);
|
|
399
|
-
const r$3 = {
|
|
400
|
-
command: e$7,
|
|
401
|
-
args: t$8,
|
|
402
|
-
options: n$5,
|
|
403
|
-
file: void 0,
|
|
404
|
-
original: {
|
|
405
|
-
command: e$7,
|
|
406
|
-
args: t$8
|
|
407
|
-
}
|
|
408
|
-
};
|
|
409
|
-
return n$5.shell ? r$3 : u$6(r$3);
|
|
410
|
-
}
|
|
411
|
-
t$7.exports = d$1;
|
|
412
|
-
});
|
|
413
|
-
var I = h$1((exports, t$7) => {
|
|
414
|
-
const n$4 = process.platform === "win32";
|
|
415
|
-
function r(e$7, t$8) {
|
|
416
|
-
return Object.assign(/* @__PURE__ */ new Error(`${t$8} ${e$7.command} ENOENT`), {
|
|
417
|
-
code: "ENOENT",
|
|
418
|
-
errno: "ENOENT",
|
|
419
|
-
syscall: `${t$8} ${e$7.command}`,
|
|
420
|
-
path: e$7.command,
|
|
421
|
-
spawnargs: e$7.args
|
|
422
|
-
});
|
|
423
|
-
}
|
|
424
|
-
function i$8(e$7, t$8) {
|
|
425
|
-
if (!n$4) return;
|
|
426
|
-
const r$3 = e$7.emit;
|
|
427
|
-
e$7.emit = function(n$5, i$9) {
|
|
428
|
-
if (n$5 === "exit") {
|
|
429
|
-
const n$6 = a$11(i$9, t$8, "spawn");
|
|
430
|
-
if (n$6) return r$3.call(e$7, "error", n$6);
|
|
431
|
-
}
|
|
432
|
-
return r$3.apply(e$7, arguments);
|
|
433
|
-
};
|
|
434
|
-
}
|
|
435
|
-
function a$11(e$7, t$8) {
|
|
436
|
-
if (n$4 && e$7 === 1 && !t$8.file) return r(t$8.original, "spawn");
|
|
437
|
-
return null;
|
|
438
|
-
}
|
|
439
|
-
function o$6(e$7, t$8) {
|
|
440
|
-
if (n$4 && e$7 === 1 && !t$8.file) return r(t$8.original, "spawnSync");
|
|
441
|
-
return null;
|
|
442
|
-
}
|
|
443
|
-
t$7.exports = {
|
|
444
|
-
hookChildProcess: i$8,
|
|
445
|
-
verifyENOENT: a$11,
|
|
446
|
-
verifyENOENTSync: o$6,
|
|
447
|
-
notFoundError: r
|
|
448
|
-
};
|
|
449
|
-
});
|
|
450
|
-
var R$2 = _$1(h$1((exports, t$7) => {
|
|
451
|
-
const n$4 = v$2("child_process");
|
|
452
|
-
const r = F$3();
|
|
453
|
-
const i$8 = I();
|
|
454
|
-
function a$11(e$7, t$8, a$12) {
|
|
455
|
-
const o$7 = r(e$7, t$8, a$12);
|
|
456
|
-
const s$8 = n$4.spawn(o$7.command, o$7.args, o$7.options);
|
|
457
|
-
i$8.hookChildProcess(s$8, o$7);
|
|
458
|
-
return s$8;
|
|
459
|
-
}
|
|
460
|
-
function o$6(e$7, t$8, a$12) {
|
|
461
|
-
const o$7 = r(e$7, t$8, a$12);
|
|
462
|
-
const s$8 = n$4.spawnSync(o$7.command, o$7.args, o$7.options);
|
|
463
|
-
s$8.error = s$8.error || i$8.verifyENOENTSync(s$8.status, o$7);
|
|
464
|
-
return s$8;
|
|
465
|
-
}
|
|
466
|
-
t$7.exports = a$11;
|
|
467
|
-
t$7.exports.spawn = a$11;
|
|
468
|
-
t$7.exports.sync = o$6;
|
|
469
|
-
t$7.exports._parse = r;
|
|
470
|
-
t$7.exports._enoent = i$8;
|
|
471
|
-
})(), 1);
|
|
472
|
-
var z$1 = class extends Error {
|
|
473
|
-
result;
|
|
474
|
-
output;
|
|
475
|
-
get exitCode() {
|
|
476
|
-
if (this.result.exitCode !== null) return this.result.exitCode;
|
|
477
|
-
}
|
|
478
|
-
constructor(e$7, t$7) {
|
|
479
|
-
super(`Process exited with non-zero status (${e$7.exitCode})`);
|
|
480
|
-
this.result = e$7;
|
|
481
|
-
this.output = t$7;
|
|
482
|
-
}
|
|
483
|
-
};
|
|
484
|
-
const B = {
|
|
485
|
-
timeout: void 0,
|
|
486
|
-
persist: false
|
|
487
|
-
};
|
|
488
|
-
const V = { windowsHide: true };
|
|
489
|
-
function H$2(e$7, t$7) {
|
|
490
|
-
return {
|
|
491
|
-
command: normalize$1(e$7),
|
|
492
|
-
args: t$7 ?? []
|
|
493
|
-
};
|
|
494
|
-
}
|
|
495
|
-
function U(e$7) {
|
|
496
|
-
const t$7 = new AbortController();
|
|
497
|
-
for (const n$4 of e$7) {
|
|
498
|
-
if (n$4.aborted) {
|
|
499
|
-
t$7.abort();
|
|
500
|
-
return n$4;
|
|
501
|
-
}
|
|
502
|
-
const e$8 = () => {
|
|
503
|
-
t$7.abort(n$4.reason);
|
|
504
|
-
};
|
|
505
|
-
n$4.addEventListener("abort", e$8, { signal: t$7.signal });
|
|
506
|
-
}
|
|
507
|
-
return t$7.signal;
|
|
508
|
-
}
|
|
509
|
-
async function W(e$7) {
|
|
510
|
-
let t$7 = "";
|
|
511
|
-
for await (const n$4 of e$7) t$7 += n$4.toString();
|
|
512
|
-
return t$7;
|
|
513
|
-
}
|
|
514
|
-
var G$1 = class {
|
|
515
|
-
_process;
|
|
516
|
-
_aborted = false;
|
|
517
|
-
_options;
|
|
518
|
-
_command;
|
|
519
|
-
_args;
|
|
520
|
-
_resolveClose;
|
|
521
|
-
_processClosed;
|
|
522
|
-
_thrownError;
|
|
523
|
-
get process() {
|
|
524
|
-
return this._process;
|
|
525
|
-
}
|
|
526
|
-
get pid() {
|
|
527
|
-
return this._process?.pid;
|
|
528
|
-
}
|
|
529
|
-
get exitCode() {
|
|
530
|
-
if (this._process && this._process.exitCode !== null) return this._process.exitCode;
|
|
531
|
-
}
|
|
532
|
-
constructor(e$7, t$7, n$4) {
|
|
533
|
-
this._options = {
|
|
534
|
-
...B,
|
|
535
|
-
...n$4
|
|
536
|
-
};
|
|
537
|
-
this._command = e$7;
|
|
538
|
-
this._args = t$7 ?? [];
|
|
539
|
-
this._processClosed = new Promise((e$8) => {
|
|
540
|
-
this._resolveClose = e$8;
|
|
541
|
-
});
|
|
542
|
-
}
|
|
543
|
-
kill(e$7) {
|
|
544
|
-
return this._process?.kill(e$7) === true;
|
|
545
|
-
}
|
|
546
|
-
get aborted() {
|
|
547
|
-
return this._aborted;
|
|
548
|
-
}
|
|
549
|
-
get killed() {
|
|
550
|
-
return this._process?.killed === true;
|
|
551
|
-
}
|
|
552
|
-
pipe(e$7, t$7, n$4) {
|
|
553
|
-
return q$1(e$7, t$7, {
|
|
554
|
-
...n$4,
|
|
555
|
-
stdin: this
|
|
556
|
-
});
|
|
557
|
-
}
|
|
558
|
-
async *[Symbol.asyncIterator]() {
|
|
559
|
-
const e$7 = this._process;
|
|
560
|
-
if (!e$7) return;
|
|
561
|
-
const t$7 = [];
|
|
562
|
-
if (this._streamErr) t$7.push(this._streamErr);
|
|
563
|
-
if (this._streamOut) t$7.push(this._streamOut);
|
|
564
|
-
const n$4 = w$2(t$7);
|
|
565
|
-
const r = c.createInterface({ input: n$4 });
|
|
566
|
-
for await (const e$8 of r) yield e$8.toString();
|
|
567
|
-
await this._processClosed;
|
|
568
|
-
e$7.removeAllListeners();
|
|
569
|
-
if (this._thrownError) throw this._thrownError;
|
|
570
|
-
if (this._options?.throwOnError && this.exitCode !== 0 && this.exitCode !== void 0) throw new z$1(this);
|
|
571
|
-
}
|
|
572
|
-
async _waitForOutput() {
|
|
573
|
-
const e$7 = this._process;
|
|
574
|
-
if (!e$7) throw new Error("No process was started");
|
|
575
|
-
const [t$7, n$4] = await Promise.all([this._streamOut ? W(this._streamOut) : "", this._streamErr ? W(this._streamErr) : ""]);
|
|
576
|
-
await this._processClosed;
|
|
577
|
-
if (this._options?.stdin) await this._options.stdin;
|
|
578
|
-
e$7.removeAllListeners();
|
|
579
|
-
if (this._thrownError) throw this._thrownError;
|
|
580
|
-
const r = {
|
|
581
|
-
stderr: n$4,
|
|
582
|
-
stdout: t$7,
|
|
583
|
-
exitCode: this.exitCode
|
|
584
|
-
};
|
|
585
|
-
if (this._options.throwOnError && this.exitCode !== 0 && this.exitCode !== void 0) throw new z$1(this, r);
|
|
586
|
-
return r;
|
|
587
|
-
}
|
|
588
|
-
then(e$7, t$7) {
|
|
589
|
-
return this._waitForOutput().then(e$7, t$7);
|
|
590
|
-
}
|
|
591
|
-
_streamOut;
|
|
592
|
-
_streamErr;
|
|
593
|
-
spawn() {
|
|
594
|
-
const e$7 = cwd();
|
|
595
|
-
const n$4 = this._options;
|
|
596
|
-
const r = {
|
|
597
|
-
...V,
|
|
598
|
-
...n$4.nodeOptions
|
|
599
|
-
};
|
|
600
|
-
const i$8 = [];
|
|
601
|
-
this._resetState();
|
|
602
|
-
if (n$4.timeout !== void 0) i$8.push(AbortSignal.timeout(n$4.timeout));
|
|
603
|
-
if (n$4.signal !== void 0) i$8.push(n$4.signal);
|
|
604
|
-
if (n$4.persist === true) r.detached = true;
|
|
605
|
-
if (i$8.length > 0) r.signal = U(i$8);
|
|
606
|
-
r.env = C$1(e$7, r.env);
|
|
607
|
-
const { command: a$11, args: s$8 } = H$2(this._command, this._args);
|
|
608
|
-
const c$6 = (0, R$2._parse)(a$11, s$8, r);
|
|
609
|
-
const l$3 = spawn(c$6.command, c$6.args, c$6.options);
|
|
610
|
-
if (l$3.stderr) this._streamErr = l$3.stderr;
|
|
611
|
-
if (l$3.stdout) this._streamOut = l$3.stdout;
|
|
612
|
-
this._process = l$3;
|
|
613
|
-
l$3.once("error", this._onError);
|
|
614
|
-
l$3.once("close", this._onClose);
|
|
615
|
-
if (n$4.stdin !== void 0 && l$3.stdin && n$4.stdin.process) {
|
|
616
|
-
const { stdout: e$8 } = n$4.stdin.process;
|
|
617
|
-
if (e$8) e$8.pipe(l$3.stdin);
|
|
618
|
-
}
|
|
619
|
-
}
|
|
620
|
-
_resetState() {
|
|
621
|
-
this._aborted = false;
|
|
622
|
-
this._processClosed = new Promise((e$7) => {
|
|
623
|
-
this._resolveClose = e$7;
|
|
624
|
-
});
|
|
625
|
-
this._thrownError = void 0;
|
|
626
|
-
}
|
|
627
|
-
_onError = (e$7) => {
|
|
628
|
-
if (e$7.name === "AbortError" && (!(e$7.cause instanceof Error) || e$7.cause.name !== "TimeoutError")) {
|
|
629
|
-
this._aborted = true;
|
|
630
|
-
return;
|
|
631
|
-
}
|
|
632
|
-
this._thrownError = e$7;
|
|
633
|
-
};
|
|
634
|
-
_onClose = () => {
|
|
635
|
-
if (this._resolveClose) this._resolveClose();
|
|
636
|
-
};
|
|
637
|
-
};
|
|
638
|
-
const K = (e$7, t$7, n$4) => {
|
|
639
|
-
const r = new G$1(e$7, t$7, n$4);
|
|
640
|
-
r.spawn();
|
|
641
|
-
return r;
|
|
642
|
-
};
|
|
643
|
-
const q$1 = K;
|
|
644
|
-
|
|
645
|
-
//#endregion
|
|
646
|
-
//#region node_modules/.pnpm/nypm@0.6.2/node_modules/nypm/dist/shared/nypm.CLjaS_sz.mjs
|
|
647
|
-
async function findup(cwd$1, match, options = {}) {
|
|
648
|
-
const segments = normalize$2(cwd$1).split("/");
|
|
649
|
-
while (segments.length > 0) {
|
|
650
|
-
const result = await match(segments.join("/") || "/");
|
|
651
|
-
if (result || !options.includeParentDirs) return result;
|
|
652
|
-
segments.pop();
|
|
653
|
-
}
|
|
654
|
-
}
|
|
655
|
-
function cached(fn) {
|
|
656
|
-
let v$3;
|
|
657
|
-
return () => {
|
|
658
|
-
if (v$3 === void 0) v$3 = fn().then((r) => {
|
|
659
|
-
v$3 = r;
|
|
660
|
-
return v$3;
|
|
661
|
-
});
|
|
662
|
-
return v$3;
|
|
663
|
-
};
|
|
664
|
-
}
|
|
665
|
-
const hasCorepack = cached(async () => {
|
|
666
|
-
if (globalThis.process?.versions?.webcontainer) return false;
|
|
667
|
-
try {
|
|
668
|
-
const { exitCode } = await K("corepack", ["--version"]);
|
|
669
|
-
return exitCode === 0;
|
|
670
|
-
} catch {
|
|
671
|
-
return false;
|
|
672
|
-
}
|
|
673
|
-
});
|
|
674
|
-
async function executeCommand(command, args, options = {}) {
|
|
675
|
-
const xArgs = command === "npm" || command === "bun" || command === "deno" || !await hasCorepack() ? [command, args] : ["corepack", [command, ...args]];
|
|
676
|
-
const { exitCode, stdout, stderr } = await K(xArgs[0], xArgs[1], { nodeOptions: {
|
|
677
|
-
cwd: resolve$2(options.cwd || process.cwd()),
|
|
678
|
-
env: options.env,
|
|
679
|
-
stdio: options.silent ? "pipe" : "inherit"
|
|
680
|
-
} });
|
|
681
|
-
if (exitCode !== 0) throw new Error(`\`${xArgs.flat().join(" ")}\` failed.${options.silent ? [
|
|
682
|
-
"",
|
|
683
|
-
stdout,
|
|
684
|
-
stderr
|
|
685
|
-
].join("\n") : ""}`);
|
|
686
|
-
}
|
|
687
|
-
const NO_PACKAGE_MANAGER_DETECTED_ERROR_MSG = "No package manager auto-detected.";
|
|
688
|
-
async function resolveOperationOptions(options = {}) {
|
|
689
|
-
const cwd$1 = options.cwd || process.cwd();
|
|
690
|
-
const env = {
|
|
691
|
-
...process.env,
|
|
692
|
-
...options.env
|
|
693
|
-
};
|
|
694
|
-
const packageManager = (typeof options.packageManager === "string" ? packageManagers.find((pm) => pm.name === options.packageManager) : options.packageManager) || await detectPackageManager(options.cwd || process.cwd());
|
|
695
|
-
if (!packageManager) throw new Error(NO_PACKAGE_MANAGER_DETECTED_ERROR_MSG);
|
|
696
|
-
return {
|
|
697
|
-
cwd: cwd$1,
|
|
698
|
-
env,
|
|
699
|
-
silent: options.silent ?? false,
|
|
700
|
-
packageManager,
|
|
701
|
-
dev: options.dev ?? false,
|
|
702
|
-
workspace: options.workspace,
|
|
703
|
-
global: options.global ?? false,
|
|
704
|
-
dry: options.dry ?? false
|
|
705
|
-
};
|
|
706
|
-
}
|
|
707
|
-
function getWorkspaceArgs(options) {
|
|
708
|
-
if (!options.workspace) return [];
|
|
709
|
-
const workspacePkg = typeof options.workspace === "string" && options.workspace !== "" ? options.workspace : void 0;
|
|
710
|
-
if (options.packageManager.name === "pnpm") return workspacePkg ? ["--filter", workspacePkg] : ["--workspace-root"];
|
|
711
|
-
if (options.packageManager.name === "npm") return workspacePkg ? ["-w", workspacePkg] : ["--workspaces"];
|
|
712
|
-
if (options.packageManager.name === "yarn") if (!options.packageManager.majorVersion || options.packageManager.majorVersion === "1") return workspacePkg ? ["--cwd", workspacePkg] : ["-W"];
|
|
713
|
-
else return workspacePkg ? ["workspace", workspacePkg] : [];
|
|
714
|
-
return [];
|
|
715
|
-
}
|
|
716
|
-
function parsePackageManagerField(packageManager) {
|
|
717
|
-
const [name, _version] = (packageManager || "").split("@");
|
|
718
|
-
const [version, buildMeta] = _version?.split("+") || [];
|
|
719
|
-
if (name && name !== "-" && /^(@[a-z0-9-~][a-z0-9-._~]*\/)?[a-z0-9-~][a-z0-9-._~]*$/.test(name)) return {
|
|
720
|
-
name,
|
|
721
|
-
version,
|
|
722
|
-
buildMeta
|
|
723
|
-
};
|
|
724
|
-
const sanitized = name.replace(/\W+/g, "");
|
|
725
|
-
return {
|
|
726
|
-
name: sanitized,
|
|
727
|
-
version,
|
|
728
|
-
buildMeta,
|
|
729
|
-
warnings: [`Abnormal characters found in \`packageManager\` field, sanitizing from \`${name}\` to \`${sanitized}\``]
|
|
730
|
-
};
|
|
731
|
-
}
|
|
732
|
-
const packageManagers = [
|
|
733
|
-
{
|
|
734
|
-
name: "npm",
|
|
735
|
-
command: "npm",
|
|
736
|
-
lockFile: "package-lock.json"
|
|
737
|
-
},
|
|
738
|
-
{
|
|
739
|
-
name: "pnpm",
|
|
740
|
-
command: "pnpm",
|
|
741
|
-
lockFile: "pnpm-lock.yaml",
|
|
742
|
-
files: ["pnpm-workspace.yaml"]
|
|
743
|
-
},
|
|
744
|
-
{
|
|
745
|
-
name: "bun",
|
|
746
|
-
command: "bun",
|
|
747
|
-
lockFile: ["bun.lockb", "bun.lock"]
|
|
748
|
-
},
|
|
749
|
-
{
|
|
750
|
-
name: "yarn",
|
|
751
|
-
command: "yarn",
|
|
752
|
-
lockFile: "yarn.lock",
|
|
753
|
-
files: [".yarnrc.yml"]
|
|
754
|
-
},
|
|
755
|
-
{
|
|
756
|
-
name: "deno",
|
|
757
|
-
command: "deno",
|
|
758
|
-
lockFile: "deno.lock",
|
|
759
|
-
files: ["deno.json"]
|
|
760
|
-
}
|
|
761
|
-
];
|
|
762
|
-
async function detectPackageManager(cwd$1, options = {}) {
|
|
763
|
-
const detected = await findup(resolve$2(cwd$1 || "."), async (path$2) => {
|
|
764
|
-
if (!options.ignorePackageJSON) {
|
|
765
|
-
const packageJSONPath = join$2(path$2, "package.json");
|
|
766
|
-
if (existsSync(packageJSONPath)) {
|
|
767
|
-
const packageJSON = JSON.parse(await readFile(packageJSONPath, "utf8"));
|
|
768
|
-
if (packageJSON?.packageManager) {
|
|
769
|
-
const { name, version = "0.0.0", buildMeta, warnings } = parsePackageManagerField(packageJSON.packageManager);
|
|
770
|
-
if (name) {
|
|
771
|
-
const majorVersion = version.split(".")[0];
|
|
772
|
-
const packageManager = packageManagers.find((pm) => pm.name === name && pm.majorVersion === majorVersion) || packageManagers.find((pm) => pm.name === name);
|
|
773
|
-
return {
|
|
774
|
-
name,
|
|
775
|
-
command: name,
|
|
776
|
-
version,
|
|
777
|
-
majorVersion,
|
|
778
|
-
buildMeta,
|
|
779
|
-
warnings,
|
|
780
|
-
files: packageManager?.files,
|
|
781
|
-
lockFile: packageManager?.lockFile
|
|
782
|
-
};
|
|
783
|
-
}
|
|
784
|
-
}
|
|
785
|
-
}
|
|
786
|
-
if (existsSync(join$2(path$2, "deno.json"))) return packageManagers.find((pm) => pm.name === "deno");
|
|
787
|
-
}
|
|
788
|
-
if (!options.ignoreLockFile) {
|
|
789
|
-
for (const packageManager of packageManagers) if ([packageManager.lockFile, packageManager.files].flat().filter(Boolean).some((file) => existsSync(resolve$2(path$2, file)))) return { ...packageManager };
|
|
790
|
-
}
|
|
791
|
-
}, { includeParentDirs: options.includeParentDirs ?? true });
|
|
792
|
-
if (!detected && !options.ignoreArgv) {
|
|
793
|
-
const scriptArg = process.argv[1];
|
|
794
|
-
if (scriptArg) {
|
|
795
|
-
for (const packageManager of packageManagers) if ((/* @__PURE__ */ new RegExp(`[/\\\\]\\.?${packageManager.command}`)).test(scriptArg)) return packageManager;
|
|
796
|
-
}
|
|
797
|
-
}
|
|
798
|
-
return detected;
|
|
799
|
-
}
|
|
800
|
-
async function installDependencies(options = {}) {
|
|
801
|
-
const resolvedOptions = await resolveOperationOptions(options);
|
|
802
|
-
const commandArgs = options.frozenLockFile ? {
|
|
803
|
-
npm: ["ci"],
|
|
804
|
-
yarn: ["install", "--immutable"],
|
|
805
|
-
bun: ["install", "--frozen-lockfile"],
|
|
806
|
-
pnpm: ["install", "--frozen-lockfile"],
|
|
807
|
-
deno: ["install", "--frozen"]
|
|
808
|
-
}[resolvedOptions.packageManager.name] : ["install"];
|
|
809
|
-
if (!resolvedOptions.dry) await executeCommand(resolvedOptions.packageManager.command, commandArgs, {
|
|
810
|
-
cwd: resolvedOptions.cwd,
|
|
811
|
-
silent: resolvedOptions.silent
|
|
812
|
-
});
|
|
813
|
-
return { exec: {
|
|
814
|
-
command: resolvedOptions.packageManager.command,
|
|
815
|
-
args: commandArgs
|
|
816
|
-
} };
|
|
817
|
-
}
|
|
818
|
-
async function addDependency(name, options = {}) {
|
|
819
|
-
const resolvedOptions = await resolveOperationOptions(options);
|
|
820
|
-
const names = Array.isArray(name) ? name : [name];
|
|
821
|
-
if (resolvedOptions.packageManager.name === "deno") {
|
|
822
|
-
for (let i$8 = 0; i$8 < names.length; i$8++) if (!/^(npm|jsr|file):.+$/.test(names[i$8])) names[i$8] = `npm:${names[i$8]}`;
|
|
823
|
-
}
|
|
824
|
-
if (names.length === 0) return {};
|
|
825
|
-
const args = (resolvedOptions.packageManager.name === "yarn" ? [
|
|
826
|
-
...getWorkspaceArgs(resolvedOptions),
|
|
827
|
-
resolvedOptions.global && resolvedOptions.packageManager.majorVersion === "1" ? "global" : "",
|
|
828
|
-
"add",
|
|
829
|
-
resolvedOptions.dev ? "-D" : "",
|
|
830
|
-
...names
|
|
831
|
-
] : [
|
|
832
|
-
resolvedOptions.packageManager.name === "npm" ? "install" : "add",
|
|
833
|
-
...getWorkspaceArgs(resolvedOptions),
|
|
834
|
-
resolvedOptions.dev ? "-D" : "",
|
|
835
|
-
resolvedOptions.global ? "-g" : "",
|
|
836
|
-
...names
|
|
837
|
-
]).filter(Boolean);
|
|
838
|
-
if (!resolvedOptions.dry) await executeCommand(resolvedOptions.packageManager.command, args, {
|
|
839
|
-
cwd: resolvedOptions.cwd,
|
|
840
|
-
silent: resolvedOptions.silent
|
|
841
|
-
});
|
|
842
|
-
if (!resolvedOptions.dry && options.installPeerDependencies) {
|
|
843
|
-
const existingPkg = await readPackageJSON(resolvedOptions.cwd);
|
|
844
|
-
const peerDeps = [];
|
|
845
|
-
const peerDevDeps = [];
|
|
846
|
-
for (const _name of names) {
|
|
847
|
-
const pkgName = _name.match(/^(.[^@]+)/)?.[0];
|
|
848
|
-
const pkg = await readPackageJSON(pkgName, { url: resolvedOptions.cwd }).catch(() => ({}));
|
|
849
|
-
if (!pkg.peerDependencies || pkg.name !== pkgName) continue;
|
|
850
|
-
for (const [peerDependency, version] of Object.entries(pkg.peerDependencies)) {
|
|
851
|
-
if (pkg.peerDependenciesMeta?.[peerDependency]?.optional) continue;
|
|
852
|
-
if (existingPkg.dependencies?.[peerDependency] || existingPkg.devDependencies?.[peerDependency]) continue;
|
|
853
|
-
(pkg.peerDependenciesMeta?.[peerDependency]?.dev ? peerDevDeps : peerDeps).push(`${peerDependency}@${version}`);
|
|
854
|
-
}
|
|
855
|
-
}
|
|
856
|
-
if (peerDeps.length > 0) await addDependency(peerDeps, { ...resolvedOptions });
|
|
857
|
-
if (peerDevDeps.length > 0) await addDevDependency(peerDevDeps, { ...resolvedOptions });
|
|
858
|
-
}
|
|
859
|
-
return { exec: {
|
|
860
|
-
command: resolvedOptions.packageManager.command,
|
|
861
|
-
args
|
|
862
|
-
} };
|
|
863
|
-
}
|
|
864
|
-
async function addDevDependency(name, options = {}) {
|
|
865
|
-
return await addDependency(name, {
|
|
866
|
-
...options,
|
|
867
|
-
dev: true
|
|
868
|
-
});
|
|
869
|
-
}
|
|
870
|
-
|
|
871
|
-
//#endregion
|
|
872
|
-
//#region node_modules/.pnpm/nypm@0.6.2/node_modules/nypm/dist/index.mjs
|
|
873
|
-
var dist_exports$1 = /* @__PURE__ */ __exportAll({ addDevDependency: () => addDevDependency });
|
|
874
|
-
|
|
875
|
-
//#endregion
|
|
876
|
-
//#region node_modules/.pnpm/node-fetch-native@1.6.7/node_modules/node-fetch-native/dist/native.mjs
|
|
877
|
-
const e$6 = globalThis.Blob, o$5 = globalThis.File, a$10 = globalThis.FormData, s$7 = globalThis.Headers, t$6 = globalThis.Request, h = globalThis.Response, i$7 = globalThis.AbortController, l$1 = globalThis.fetch || (() => {
|
|
878
|
-
throw new Error("[node-fetch-native] Failed to fetch: `globalThis.fetch` is not available!");
|
|
879
|
-
});
|
|
880
|
-
|
|
881
|
-
//#endregion
|
|
882
24
|
//#region node_modules/.pnpm/giget@2.0.0/node_modules/giget/dist/shared/giget.OCaTp9b-.mjs
|
|
883
25
|
var commonjsGlobal = typeof globalThis !== "undefined" ? globalThis : typeof window !== "undefined" ? window : typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : {};
|
|
884
|
-
function getDefaultExportFromCjs(x
|
|
885
|
-
return x
|
|
26
|
+
function getDefaultExportFromCjs(x) {
|
|
27
|
+
return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, "default") ? x["default"] : x;
|
|
886
28
|
}
|
|
887
29
|
var i$6, t$5;
|
|
888
30
|
function s$6() {
|
|
@@ -909,21 +51,21 @@ function s$6() {
|
|
|
909
51
|
["L", "follow"],
|
|
910
52
|
["h", "follow"]
|
|
911
53
|
]);
|
|
912
|
-
return i$6 = (r) => r ? Object.keys(r).map((e$
|
|
54
|
+
return i$6 = (r) => r ? Object.keys(r).map((e$6) => [n$4.has(e$6) ? n$4.get(e$6) : e$6, r[e$6]]).reduce((e$6, p$1) => (e$6[p$1[0]] = p$1[1], e$6), Object.create(null)) : {}, i$6;
|
|
913
55
|
}
|
|
914
56
|
var e$5, t$4;
|
|
915
57
|
function c$4() {
|
|
916
|
-
return t$4 || (t$4 = 1, e$5 = (o$
|
|
917
|
-
warn(n$4, i$
|
|
918
|
-
this.file && (r.file = this.file), this.cwd && (r.cwd = this.cwd), r.code = i$
|
|
58
|
+
return t$4 || (t$4 = 1, e$5 = (o$5) => class extends o$5 {
|
|
59
|
+
warn(n$4, i$7, r = {}) {
|
|
60
|
+
this.file && (r.file = this.file), this.cwd && (r.cwd = this.cwd), r.code = i$7 instanceof Error && i$7.code || n$4, r.tarCode = n$4, !this.strict && r.recoverable !== false ? (i$7 instanceof Error && (r = Object.assign(i$7, r), i$7 = i$7.message), this.emit("warn", r.tarCode, i$7, r)) : i$7 instanceof Error ? this.emit("error", Object.assign(i$7, r)) : this.emit("error", Object.assign(/* @__PURE__ */ new Error(`${n$4}: ${i$7}`), r));
|
|
919
61
|
}
|
|
920
62
|
}), e$5;
|
|
921
63
|
}
|
|
922
64
|
var e$4 = {};
|
|
923
65
|
var a$9;
|
|
924
66
|
function n$3() {
|
|
925
|
-
return a$9 ? e$4 : (a$9 = 1, function(e$
|
|
926
|
-
e$
|
|
67
|
+
return a$9 ? e$4 : (a$9 = 1, function(e$6) {
|
|
68
|
+
e$6.name = new Map([
|
|
927
69
|
["0", "File"],
|
|
928
70
|
["", "OldFile"],
|
|
929
71
|
["1", "Link"],
|
|
@@ -945,135 +87,135 @@ function n$3() {
|
|
|
945
87
|
["S", "SparseFile"],
|
|
946
88
|
["V", "TapeVolumeHeader"],
|
|
947
89
|
["X", "OldExtendedHeader"]
|
|
948
|
-
]), e$
|
|
90
|
+
]), e$6.code = new Map(Array.from(e$6.name).map((i$7) => [i$7[1], i$7[0]]));
|
|
949
91
|
}(e$4), e$4);
|
|
950
92
|
}
|
|
951
93
|
var f$3, i$5;
|
|
952
94
|
function w$1() {
|
|
953
95
|
if (i$5) return f$3;
|
|
954
96
|
i$5 = 1;
|
|
955
|
-
const v$
|
|
956
|
-
if (Number.isSafeInteger(e$
|
|
97
|
+
const v$2 = (e$6, r) => {
|
|
98
|
+
if (Number.isSafeInteger(e$6)) e$6 < 0 ? g(e$6, r) : p$1(e$6, r);
|
|
957
99
|
else throw Error("cannot encode number outside of javascript safe integer range");
|
|
958
100
|
return r;
|
|
959
|
-
}, p$
|
|
101
|
+
}, p$1 = (e$6, r) => {
|
|
960
102
|
r[0] = 128;
|
|
961
|
-
for (var o$
|
|
962
|
-
}, g
|
|
103
|
+
for (var o$5 = r.length; o$5 > 1; o$5--) r[o$5 - 1] = e$6 & 255, e$6 = Math.floor(e$6 / 256);
|
|
104
|
+
}, g = (e$6, r) => {
|
|
963
105
|
r[0] = 255;
|
|
964
|
-
var o$
|
|
965
|
-
e$
|
|
966
|
-
for (var s$
|
|
967
|
-
var a$
|
|
968
|
-
e$
|
|
969
|
-
}
|
|
970
|
-
}, h
|
|
971
|
-
const r = e$
|
|
972
|
-
if (o$
|
|
973
|
-
if (!Number.isSafeInteger(o$
|
|
974
|
-
return o$
|
|
975
|
-
}, x
|
|
976
|
-
for (var r = e$
|
|
977
|
-
var n$4 = e$
|
|
978
|
-
s$
|
|
979
|
-
}
|
|
980
|
-
return o$
|
|
981
|
-
}, d
|
|
982
|
-
for (var r = e$
|
|
983
|
-
var a$
|
|
984
|
-
a$
|
|
985
|
-
}
|
|
986
|
-
return o$
|
|
987
|
-
}, l$
|
|
106
|
+
var o$5 = false;
|
|
107
|
+
e$6 = e$6 * -1;
|
|
108
|
+
for (var s$7 = r.length; s$7 > 1; s$7--) {
|
|
109
|
+
var a$10 = e$6 & 255;
|
|
110
|
+
e$6 = Math.floor(e$6 / 256), o$5 ? r[s$7 - 1] = l$2(a$10) : a$10 === 0 ? r[s$7 - 1] = 0 : (o$5 = true, r[s$7 - 1] = c$5(a$10));
|
|
111
|
+
}
|
|
112
|
+
}, h = (e$6) => {
|
|
113
|
+
const r = e$6[0], o$5 = r === 128 ? d(e$6.slice(1, e$6.length)) : r === 255 ? x(e$6) : null;
|
|
114
|
+
if (o$5 === null) throw Error("invalid base256 encoding");
|
|
115
|
+
if (!Number.isSafeInteger(o$5)) throw Error("parsed number outside of javascript safe integer range");
|
|
116
|
+
return o$5;
|
|
117
|
+
}, x = (e$6) => {
|
|
118
|
+
for (var r = e$6.length, o$5 = 0, s$7 = false, a$10 = r - 1; a$10 > -1; a$10--) {
|
|
119
|
+
var n$4 = e$6[a$10], t$6;
|
|
120
|
+
s$7 ? t$6 = l$2(n$4) : n$4 === 0 ? t$6 = n$4 : (s$7 = true, t$6 = c$5(n$4)), t$6 !== 0 && (o$5 -= t$6 * Math.pow(256, r - a$10 - 1));
|
|
121
|
+
}
|
|
122
|
+
return o$5;
|
|
123
|
+
}, d = (e$6) => {
|
|
124
|
+
for (var r = e$6.length, o$5 = 0, s$7 = r - 1; s$7 > -1; s$7--) {
|
|
125
|
+
var a$10 = e$6[s$7];
|
|
126
|
+
a$10 !== 0 && (o$5 += a$10 * Math.pow(256, r - s$7 - 1));
|
|
127
|
+
}
|
|
128
|
+
return o$5;
|
|
129
|
+
}, l$2 = (e$6) => (255 ^ e$6) & 255, c$5 = (e$6) => (255 ^ e$6) + 1 & 255;
|
|
988
130
|
return f$3 = {
|
|
989
|
-
encode: v$
|
|
990
|
-
parse: h
|
|
131
|
+
encode: v$2,
|
|
132
|
+
parse: h
|
|
991
133
|
}, f$3;
|
|
992
134
|
}
|
|
993
135
|
var k, w;
|
|
994
136
|
function E() {
|
|
995
137
|
if (w) return k;
|
|
996
138
|
w = 1;
|
|
997
|
-
const u$
|
|
998
|
-
class B
|
|
999
|
-
constructor(e$
|
|
1000
|
-
this.cksumValid = false, this.needPax = false, this.nullBlock = false, this.block = null, this.path = null, this.mode = null, this.uid = null, this.gid = null, this.size = null, this.mtime = null, this.cksum = null, this[a$
|
|
1001
|
-
}
|
|
1002
|
-
decode(e$
|
|
1003
|
-
if (t$
|
|
1004
|
-
if (this.path = d
|
|
139
|
+
const u$5 = n$3(), x = path.posix, y$3 = w$1(), P$1 = Symbol("slurp"), a$10 = Symbol("type");
|
|
140
|
+
class B {
|
|
141
|
+
constructor(e$6, t$6, i$7, h) {
|
|
142
|
+
this.cksumValid = false, this.needPax = false, this.nullBlock = false, this.block = null, this.path = null, this.mode = null, this.uid = null, this.gid = null, this.size = null, this.mtime = null, this.cksum = null, this[a$10] = "0", this.linkpath = null, this.uname = null, this.gname = null, this.devmaj = 0, this.devmin = 0, this.atime = null, this.ctime = null, Buffer.isBuffer(e$6) ? this.decode(e$6, t$6 || 0, i$7, h) : e$6 && this.set(e$6);
|
|
143
|
+
}
|
|
144
|
+
decode(e$6, t$6, i$7, h) {
|
|
145
|
+
if (t$6 || (t$6 = 0), !e$6 || !(e$6.length >= t$6 + 512)) throw new Error("need 512 bytes for header");
|
|
146
|
+
if (this.path = d(e$6, t$6, 100), this.mode = r(e$6, t$6 + 100, 8), this.uid = r(e$6, t$6 + 108, 8), this.gid = r(e$6, t$6 + 116, 8), this.size = r(e$6, t$6 + 124, 12), this.mtime = o$5(e$6, t$6 + 136, 12), this.cksum = r(e$6, t$6 + 148, 12), this[P$1](i$7), this[P$1](h, true), this[a$10] = d(e$6, t$6 + 156, 1), this[a$10] === "" && (this[a$10] = "0"), this[a$10] === "0" && this.path.slice(-1) === "/" && (this[a$10] = "5"), this[a$10] === "5" && (this.size = 0), this.linkpath = d(e$6, t$6 + 157, 100), e$6.slice(t$6 + 257, t$6 + 265).toString() === "ustar\x0000") if (this.uname = d(e$6, t$6 + 265, 32), this.gname = d(e$6, t$6 + 297, 32), this.devmaj = r(e$6, t$6 + 329, 8), this.devmin = r(e$6, t$6 + 337, 8), e$6[t$6 + 475] !== 0) this.path = d(e$6, t$6 + 345, 155) + "/" + this.path;
|
|
1005
147
|
else {
|
|
1006
|
-
const n$4 = d
|
|
1007
|
-
n$4 && (this.path = n$4 + "/" + this.path), this.atime = o$
|
|
148
|
+
const n$4 = d(e$6, t$6 + 345, 130);
|
|
149
|
+
n$4 && (this.path = n$4 + "/" + this.path), this.atime = o$5(e$6, t$6 + 476, 12), this.ctime = o$5(e$6, t$6 + 488, 12);
|
|
1008
150
|
}
|
|
1009
|
-
let l$
|
|
1010
|
-
for (let n$4 = t$
|
|
1011
|
-
for (let n$4 = t$
|
|
1012
|
-
this.cksumValid = l$
|
|
1013
|
-
}
|
|
1014
|
-
[P$
|
|
1015
|
-
for (const i$
|
|
1016
|
-
}
|
|
1017
|
-
encode(e$
|
|
1018
|
-
if (e$
|
|
1019
|
-
const i$
|
|
1020
|
-
this.needPax = h
|
|
1021
|
-
let S$
|
|
1022
|
-
for (let p$
|
|
1023
|
-
for (let p$
|
|
1024
|
-
return this.cksum = S$
|
|
1025
|
-
}
|
|
1026
|
-
set(e$
|
|
1027
|
-
for (const t$
|
|
151
|
+
let l$2 = 256;
|
|
152
|
+
for (let n$4 = t$6; n$4 < t$6 + 148; n$4++) l$2 += e$6[n$4];
|
|
153
|
+
for (let n$4 = t$6 + 156; n$4 < t$6 + 512; n$4++) l$2 += e$6[n$4];
|
|
154
|
+
this.cksumValid = l$2 === this.cksum, this.cksum === null && l$2 === 256 && (this.nullBlock = true);
|
|
155
|
+
}
|
|
156
|
+
[P$1](e$6, t$6) {
|
|
157
|
+
for (const i$7 in e$6) e$6[i$7] !== null && e$6[i$7] !== void 0 && !(t$6 && i$7 === "path") && (this[i$7] = e$6[i$7]);
|
|
158
|
+
}
|
|
159
|
+
encode(e$6, t$6) {
|
|
160
|
+
if (e$6 || (e$6 = this.block = Buffer.alloc(512), t$6 = 0), t$6 || (t$6 = 0), !(e$6.length >= t$6 + 512)) throw new Error("need 512 bytes for header");
|
|
161
|
+
const i$7 = this.ctime || this.atime ? 130 : 155, h = L(this.path || "", i$7), l$2 = h[0], n$4 = h[1];
|
|
162
|
+
this.needPax = h[2], this.needPax = m$3(e$6, t$6, 100, l$2) || this.needPax, this.needPax = c$5(e$6, t$6 + 100, 8, this.mode) || this.needPax, this.needPax = c$5(e$6, t$6 + 108, 8, this.uid) || this.needPax, this.needPax = c$5(e$6, t$6 + 116, 8, this.gid) || this.needPax, this.needPax = c$5(e$6, t$6 + 124, 12, this.size) || this.needPax, this.needPax = g(e$6, t$6 + 136, 12, this.mtime) || this.needPax, e$6[t$6 + 156] = this[a$10].charCodeAt(0), this.needPax = m$3(e$6, t$6 + 157, 100, this.linkpath) || this.needPax, e$6.write("ustar\x0000", t$6 + 257, 8), this.needPax = m$3(e$6, t$6 + 265, 32, this.uname) || this.needPax, this.needPax = m$3(e$6, t$6 + 297, 32, this.gname) || this.needPax, this.needPax = c$5(e$6, t$6 + 329, 8, this.devmaj) || this.needPax, this.needPax = c$5(e$6, t$6 + 337, 8, this.devmin) || this.needPax, this.needPax = m$3(e$6, t$6 + 345, i$7, n$4) || this.needPax, e$6[t$6 + 475] !== 0 ? this.needPax = m$3(e$6, t$6 + 345, 155, n$4) || this.needPax : (this.needPax = m$3(e$6, t$6 + 345, 130, n$4) || this.needPax, this.needPax = g(e$6, t$6 + 476, 12, this.atime) || this.needPax, this.needPax = g(e$6, t$6 + 488, 12, this.ctime) || this.needPax);
|
|
163
|
+
let S$1 = 256;
|
|
164
|
+
for (let p$1 = t$6; p$1 < t$6 + 148; p$1++) S$1 += e$6[p$1];
|
|
165
|
+
for (let p$1 = t$6 + 156; p$1 < t$6 + 512; p$1++) S$1 += e$6[p$1];
|
|
166
|
+
return this.cksum = S$1, c$5(e$6, t$6 + 148, 8, this.cksum), this.cksumValid = true, this.needPax;
|
|
167
|
+
}
|
|
168
|
+
set(e$6) {
|
|
169
|
+
for (const t$6 in e$6) e$6[t$6] !== null && e$6[t$6] !== void 0 && (this[t$6] = e$6[t$6]);
|
|
1028
170
|
}
|
|
1029
171
|
get type() {
|
|
1030
|
-
return u$
|
|
172
|
+
return u$5.name.get(this[a$10]) || this[a$10];
|
|
1031
173
|
}
|
|
1032
174
|
get typeKey() {
|
|
1033
|
-
return this[a$
|
|
175
|
+
return this[a$10];
|
|
1034
176
|
}
|
|
1035
|
-
set type(e$
|
|
1036
|
-
u$
|
|
177
|
+
set type(e$6) {
|
|
178
|
+
u$5.code.has(e$6) ? this[a$10] = u$5.code.get(e$6) : this[a$10] = e$6;
|
|
1037
179
|
}
|
|
1038
180
|
}
|
|
1039
|
-
const L = (s$
|
|
1040
|
-
let i$
|
|
1041
|
-
const n$4 = x
|
|
1042
|
-
if (Buffer.byteLength(i$
|
|
1043
|
-
i$
|
|
1044
|
-
h
|
|
181
|
+
const L = (s$7, e$6) => {
|
|
182
|
+
let i$7 = s$7, h = "", l$2;
|
|
183
|
+
const n$4 = x.parse(s$7).root || ".";
|
|
184
|
+
if (Buffer.byteLength(i$7) < 100) l$2 = [
|
|
185
|
+
i$7,
|
|
186
|
+
h,
|
|
1045
187
|
false
|
|
1046
188
|
];
|
|
1047
189
|
else {
|
|
1048
|
-
h
|
|
190
|
+
h = x.dirname(i$7), i$7 = x.basename(i$7);
|
|
1049
191
|
do
|
|
1050
|
-
Buffer.byteLength(i$
|
|
1051
|
-
i$
|
|
1052
|
-
h
|
|
192
|
+
Buffer.byteLength(i$7) <= 100 && Buffer.byteLength(h) <= e$6 ? l$2 = [
|
|
193
|
+
i$7,
|
|
194
|
+
h,
|
|
1053
195
|
false
|
|
1054
|
-
] : Buffer.byteLength(i$
|
|
1055
|
-
i$
|
|
1056
|
-
h
|
|
196
|
+
] : Buffer.byteLength(i$7) > 100 && Buffer.byteLength(h) <= e$6 ? l$2 = [
|
|
197
|
+
i$7.slice(0, 99),
|
|
198
|
+
h,
|
|
1057
199
|
true
|
|
1058
|
-
] : (i$
|
|
1059
|
-
while (h
|
|
1060
|
-
l$
|
|
1061
|
-
s$
|
|
200
|
+
] : (i$7 = x.join(x.basename(h), i$7), h = x.dirname(h));
|
|
201
|
+
while (h !== n$4 && !l$2);
|
|
202
|
+
l$2 || (l$2 = [
|
|
203
|
+
s$7.slice(0, 99),
|
|
1062
204
|
"",
|
|
1063
205
|
true
|
|
1064
206
|
]);
|
|
1065
207
|
}
|
|
1066
|
-
return l$
|
|
1067
|
-
}, d
|
|
208
|
+
return l$2;
|
|
209
|
+
}, d = (s$7, e$6, t$6) => s$7.slice(e$6, e$6 + t$6).toString("utf8").replace(/\0.*/, ""), o$5 = (s$7, e$6, t$6) => N(r(s$7, e$6, t$6)), N = (s$7) => s$7 === null ? null : /* @__PURE__ */ new Date(s$7 * 1e3), r = (s$7, e$6, t$6) => s$7[e$6] & 128 ? y$3.parse(s$7.slice(e$6, e$6 + t$6)) : j$2(s$7, e$6, t$6), q$1 = (s$7) => isNaN(s$7) ? null : s$7, j$2 = (s$7, e$6, t$6) => q$1(parseInt(s$7.slice(e$6, e$6 + t$6).toString("utf8").replace(/\0.*$/, "").trim(), 8)), v$2 = {
|
|
1068
210
|
12: 8589934591,
|
|
1069
211
|
8: 2097151
|
|
1070
|
-
}, c$
|
|
1071
|
-
return k = B
|
|
212
|
+
}, c$5 = (s$7, e$6, t$6, i$7) => i$7 === null ? false : i$7 > v$2[t$6] || i$7 < 0 ? (y$3.encode(i$7, s$7.slice(e$6, e$6 + t$6)), true) : ($(s$7, e$6, t$6, i$7), false), $ = (s$7, e$6, t$6, i$7) => s$7.write(_$1(i$7, t$6), e$6, t$6, "ascii"), _$1 = (s$7, e$6) => z$1(Math.floor(s$7).toString(8), e$6), z$1 = (s$7, e$6) => (s$7.length === e$6 - 1 ? s$7 : new Array(e$6 - s$7.length - 1).join("0") + s$7 + " ") + "\0", g = (s$7, e$6, t$6, i$7) => i$7 === null ? false : c$5(s$7, e$6, t$6, i$7.getTime() / 1e3), A = new Array(156).join("\0"), m$3 = (s$7, e$6, t$6, i$7) => i$7 === null ? false : (s$7.write(i$7 + A, e$6, t$6, "utf8"), i$7.length !== Buffer.byteLength(i$7) || i$7.length > t$6);
|
|
213
|
+
return k = B, k;
|
|
1072
214
|
}
|
|
1073
215
|
var e$3, t$3;
|
|
1074
216
|
function i$4() {
|
|
1075
|
-
return t$3 || (t$3 = 1, e$3 = function(o$
|
|
1076
|
-
o$
|
|
217
|
+
return t$3 || (t$3 = 1, e$3 = function(o$5) {
|
|
218
|
+
o$5.prototype[Symbol.iterator] = function* () {
|
|
1077
219
|
for (let r = this.head; r; r = r.next) yield r.value;
|
|
1078
220
|
};
|
|
1079
221
|
}), e$3;
|
|
@@ -1081,130 +223,130 @@ function i$4() {
|
|
|
1081
223
|
var u$4, a$8;
|
|
1082
224
|
function c$3() {
|
|
1083
225
|
if (a$8) return u$4;
|
|
1084
|
-
a$8 = 1, u$4 = r, r.Node = s$
|
|
1085
|
-
function r(t$
|
|
1086
|
-
var i$
|
|
1087
|
-
if (i$
|
|
1088
|
-
i$
|
|
226
|
+
a$8 = 1, u$4 = r, r.Node = s$7, r.create = r;
|
|
227
|
+
function r(t$6) {
|
|
228
|
+
var i$7 = this;
|
|
229
|
+
if (i$7 instanceof r || (i$7 = new r()), i$7.tail = null, i$7.head = null, i$7.length = 0, t$6 && typeof t$6.forEach == "function") t$6.forEach(function(n$4) {
|
|
230
|
+
i$7.push(n$4);
|
|
1089
231
|
});
|
|
1090
|
-
else if (arguments.length > 0) for (var e$
|
|
1091
|
-
return i$
|
|
1092
|
-
}
|
|
1093
|
-
r.prototype.removeNode = function(t$
|
|
1094
|
-
if (t$
|
|
1095
|
-
var i$
|
|
1096
|
-
return i$
|
|
1097
|
-
}, r.prototype.unshiftNode = function(t$
|
|
1098
|
-
if (t$
|
|
1099
|
-
t$
|
|
1100
|
-
var i$
|
|
1101
|
-
t$
|
|
1102
|
-
}
|
|
1103
|
-
}, r.prototype.pushNode = function(t$
|
|
1104
|
-
if (t$
|
|
1105
|
-
t$
|
|
1106
|
-
var i$
|
|
1107
|
-
t$
|
|
232
|
+
else if (arguments.length > 0) for (var e$6 = 0, h = arguments.length; e$6 < h; e$6++) i$7.push(arguments[e$6]);
|
|
233
|
+
return i$7;
|
|
234
|
+
}
|
|
235
|
+
r.prototype.removeNode = function(t$6) {
|
|
236
|
+
if (t$6.list !== this) throw new Error("removing node which does not belong to this list");
|
|
237
|
+
var i$7 = t$6.next, e$6 = t$6.prev;
|
|
238
|
+
return i$7 && (i$7.prev = e$6), e$6 && (e$6.next = i$7), t$6 === this.head && (this.head = i$7), t$6 === this.tail && (this.tail = e$6), t$6.list.length--, t$6.next = null, t$6.prev = null, t$6.list = null, i$7;
|
|
239
|
+
}, r.prototype.unshiftNode = function(t$6) {
|
|
240
|
+
if (t$6 !== this.head) {
|
|
241
|
+
t$6.list && t$6.list.removeNode(t$6);
|
|
242
|
+
var i$7 = this.head;
|
|
243
|
+
t$6.list = this, t$6.next = i$7, i$7 && (i$7.prev = t$6), this.head = t$6, this.tail || (this.tail = t$6), this.length++;
|
|
244
|
+
}
|
|
245
|
+
}, r.prototype.pushNode = function(t$6) {
|
|
246
|
+
if (t$6 !== this.tail) {
|
|
247
|
+
t$6.list && t$6.list.removeNode(t$6);
|
|
248
|
+
var i$7 = this.tail;
|
|
249
|
+
t$6.list = this, t$6.prev = i$7, i$7 && (i$7.next = t$6), this.tail = t$6, this.head || (this.head = t$6), this.length++;
|
|
1108
250
|
}
|
|
1109
251
|
}, r.prototype.push = function() {
|
|
1110
|
-
for (var t$
|
|
252
|
+
for (var t$6 = 0, i$7 = arguments.length; t$6 < i$7; t$6++) f$4(this, arguments[t$6]);
|
|
1111
253
|
return this.length;
|
|
1112
254
|
}, r.prototype.unshift = function() {
|
|
1113
|
-
for (var t$
|
|
255
|
+
for (var t$6 = 0, i$7 = arguments.length; t$6 < i$7; t$6++) o$5(this, arguments[t$6]);
|
|
1114
256
|
return this.length;
|
|
1115
257
|
}, r.prototype.pop = function() {
|
|
1116
258
|
if (this.tail) {
|
|
1117
|
-
var t$
|
|
1118
|
-
return this.tail = this.tail.prev, this.tail ? this.tail.next = null : this.head = null, this.length--, t$
|
|
259
|
+
var t$6 = this.tail.value;
|
|
260
|
+
return this.tail = this.tail.prev, this.tail ? this.tail.next = null : this.head = null, this.length--, t$6;
|
|
1119
261
|
}
|
|
1120
262
|
}, r.prototype.shift = function() {
|
|
1121
263
|
if (this.head) {
|
|
1122
|
-
var t$
|
|
1123
|
-
return this.head = this.head.next, this.head ? this.head.prev = null : this.tail = null, this.length--, t$
|
|
1124
|
-
}
|
|
1125
|
-
}, r.prototype.forEach = function(t$
|
|
1126
|
-
i$
|
|
1127
|
-
for (var e$
|
|
1128
|
-
}, r.prototype.forEachReverse = function(t$
|
|
1129
|
-
i$
|
|
1130
|
-
for (var e$
|
|
1131
|
-
}, r.prototype.get = function(t$
|
|
1132
|
-
for (var i$
|
|
1133
|
-
if (i$
|
|
1134
|
-
}, r.prototype.getReverse = function(t$
|
|
1135
|
-
for (var i$
|
|
1136
|
-
if (i$
|
|
1137
|
-
}, r.prototype.map = function(t$
|
|
1138
|
-
i$
|
|
1139
|
-
for (var e$
|
|
1140
|
-
return e$
|
|
1141
|
-
}, r.prototype.mapReverse = function(t$
|
|
1142
|
-
i$
|
|
1143
|
-
for (var e$
|
|
1144
|
-
return e$
|
|
1145
|
-
}, r.prototype.reduce = function(t$
|
|
1146
|
-
var e$
|
|
1147
|
-
if (arguments.length > 1) e$
|
|
1148
|
-
else if (this.head) h
|
|
264
|
+
var t$6 = this.head.value;
|
|
265
|
+
return this.head = this.head.next, this.head ? this.head.prev = null : this.tail = null, this.length--, t$6;
|
|
266
|
+
}
|
|
267
|
+
}, r.prototype.forEach = function(t$6, i$7) {
|
|
268
|
+
i$7 = i$7 || this;
|
|
269
|
+
for (var e$6 = this.head, h = 0; e$6 !== null; h++) t$6.call(i$7, e$6.value, h, this), e$6 = e$6.next;
|
|
270
|
+
}, r.prototype.forEachReverse = function(t$6, i$7) {
|
|
271
|
+
i$7 = i$7 || this;
|
|
272
|
+
for (var e$6 = this.tail, h = this.length - 1; e$6 !== null; h--) t$6.call(i$7, e$6.value, h, this), e$6 = e$6.prev;
|
|
273
|
+
}, r.prototype.get = function(t$6) {
|
|
274
|
+
for (var i$7 = 0, e$6 = this.head; e$6 !== null && i$7 < t$6; i$7++) e$6 = e$6.next;
|
|
275
|
+
if (i$7 === t$6 && e$6 !== null) return e$6.value;
|
|
276
|
+
}, r.prototype.getReverse = function(t$6) {
|
|
277
|
+
for (var i$7 = 0, e$6 = this.tail; e$6 !== null && i$7 < t$6; i$7++) e$6 = e$6.prev;
|
|
278
|
+
if (i$7 === t$6 && e$6 !== null) return e$6.value;
|
|
279
|
+
}, r.prototype.map = function(t$6, i$7) {
|
|
280
|
+
i$7 = i$7 || this;
|
|
281
|
+
for (var e$6 = new r(), h = this.head; h !== null;) e$6.push(t$6.call(i$7, h.value, this)), h = h.next;
|
|
282
|
+
return e$6;
|
|
283
|
+
}, r.prototype.mapReverse = function(t$6, i$7) {
|
|
284
|
+
i$7 = i$7 || this;
|
|
285
|
+
for (var e$6 = new r(), h = this.tail; h !== null;) e$6.push(t$6.call(i$7, h.value, this)), h = h.prev;
|
|
286
|
+
return e$6;
|
|
287
|
+
}, r.prototype.reduce = function(t$6, i$7) {
|
|
288
|
+
var e$6, h = this.head;
|
|
289
|
+
if (arguments.length > 1) e$6 = i$7;
|
|
290
|
+
else if (this.head) h = this.head.next, e$6 = this.head.value;
|
|
1149
291
|
else throw new TypeError("Reduce of empty list with no initial value");
|
|
1150
|
-
for (var n$4 = 0; h
|
|
1151
|
-
return e$
|
|
1152
|
-
}, r.prototype.reduceReverse = function(t$
|
|
1153
|
-
var e$
|
|
1154
|
-
if (arguments.length > 1) e$
|
|
1155
|
-
else if (this.tail) h
|
|
292
|
+
for (var n$4 = 0; h !== null; n$4++) e$6 = t$6(e$6, h.value, n$4), h = h.next;
|
|
293
|
+
return e$6;
|
|
294
|
+
}, r.prototype.reduceReverse = function(t$6, i$7) {
|
|
295
|
+
var e$6, h = this.tail;
|
|
296
|
+
if (arguments.length > 1) e$6 = i$7;
|
|
297
|
+
else if (this.tail) h = this.tail.prev, e$6 = this.tail.value;
|
|
1156
298
|
else throw new TypeError("Reduce of empty list with no initial value");
|
|
1157
|
-
for (var n$4 = this.length - 1; h
|
|
1158
|
-
return e$
|
|
299
|
+
for (var n$4 = this.length - 1; h !== null; n$4--) e$6 = t$6(e$6, h.value, n$4), h = h.prev;
|
|
300
|
+
return e$6;
|
|
1159
301
|
}, r.prototype.toArray = function() {
|
|
1160
|
-
for (var t$
|
|
1161
|
-
return t$
|
|
302
|
+
for (var t$6 = new Array(this.length), i$7 = 0, e$6 = this.head; e$6 !== null; i$7++) t$6[i$7] = e$6.value, e$6 = e$6.next;
|
|
303
|
+
return t$6;
|
|
1162
304
|
}, r.prototype.toArrayReverse = function() {
|
|
1163
|
-
for (var t$
|
|
1164
|
-
return t$
|
|
1165
|
-
}, r.prototype.slice = function(t$
|
|
1166
|
-
i$
|
|
1167
|
-
var e$
|
|
1168
|
-
if (i$
|
|
1169
|
-
t$
|
|
1170
|
-
for (var h
|
|
1171
|
-
for (; n$4 !== null && h
|
|
1172
|
-
return e$
|
|
1173
|
-
}, r.prototype.sliceReverse = function(t$
|
|
1174
|
-
i$
|
|
1175
|
-
var e$
|
|
1176
|
-
if (i$
|
|
1177
|
-
t$
|
|
1178
|
-
for (var h
|
|
1179
|
-
for (; n$4 !== null && h
|
|
1180
|
-
return e$
|
|
1181
|
-
}, r.prototype.splice = function(t$
|
|
1182
|
-
t$
|
|
1183
|
-
for (var h
|
|
1184
|
-
for (var l$
|
|
305
|
+
for (var t$6 = new Array(this.length), i$7 = 0, e$6 = this.tail; e$6 !== null; i$7++) t$6[i$7] = e$6.value, e$6 = e$6.prev;
|
|
306
|
+
return t$6;
|
|
307
|
+
}, r.prototype.slice = function(t$6, i$7) {
|
|
308
|
+
i$7 = i$7 || this.length, i$7 < 0 && (i$7 += this.length), t$6 = t$6 || 0, t$6 < 0 && (t$6 += this.length);
|
|
309
|
+
var e$6 = new r();
|
|
310
|
+
if (i$7 < t$6 || i$7 < 0) return e$6;
|
|
311
|
+
t$6 < 0 && (t$6 = 0), i$7 > this.length && (i$7 = this.length);
|
|
312
|
+
for (var h = 0, n$4 = this.head; n$4 !== null && h < t$6; h++) n$4 = n$4.next;
|
|
313
|
+
for (; n$4 !== null && h < i$7; h++, n$4 = n$4.next) e$6.push(n$4.value);
|
|
314
|
+
return e$6;
|
|
315
|
+
}, r.prototype.sliceReverse = function(t$6, i$7) {
|
|
316
|
+
i$7 = i$7 || this.length, i$7 < 0 && (i$7 += this.length), t$6 = t$6 || 0, t$6 < 0 && (t$6 += this.length);
|
|
317
|
+
var e$6 = new r();
|
|
318
|
+
if (i$7 < t$6 || i$7 < 0) return e$6;
|
|
319
|
+
t$6 < 0 && (t$6 = 0), i$7 > this.length && (i$7 = this.length);
|
|
320
|
+
for (var h = this.length, n$4 = this.tail; n$4 !== null && h > i$7; h--) n$4 = n$4.prev;
|
|
321
|
+
for (; n$4 !== null && h > t$6; h--, n$4 = n$4.prev) e$6.push(n$4.value);
|
|
322
|
+
return e$6;
|
|
323
|
+
}, r.prototype.splice = function(t$6, i$7, ...e$6) {
|
|
324
|
+
t$6 > this.length && (t$6 = this.length - 1), t$6 < 0 && (t$6 = this.length + t$6);
|
|
325
|
+
for (var h = 0, n$4 = this.head; n$4 !== null && h < t$6; h++) n$4 = n$4.next;
|
|
326
|
+
for (var l$2 = [], h = 0; n$4 && h < i$7; h++) l$2.push(n$4.value), n$4 = this.removeNode(n$4);
|
|
1185
327
|
n$4 === null && (n$4 = this.tail), n$4 !== this.head && n$4 !== this.tail && (n$4 = n$4.prev);
|
|
1186
|
-
for (var h
|
|
1187
|
-
return l$
|
|
328
|
+
for (var h = 0; h < e$6.length; h++) n$4 = v$2(this, n$4, e$6[h]);
|
|
329
|
+
return l$2;
|
|
1188
330
|
}, r.prototype.reverse = function() {
|
|
1189
|
-
for (var t$
|
|
1190
|
-
var h
|
|
1191
|
-
e$
|
|
331
|
+
for (var t$6 = this.head, i$7 = this.tail, e$6 = t$6; e$6 !== null; e$6 = e$6.prev) {
|
|
332
|
+
var h = e$6.prev;
|
|
333
|
+
e$6.prev = e$6.next, e$6.next = h;
|
|
1192
334
|
}
|
|
1193
|
-
return this.head = i$
|
|
335
|
+
return this.head = i$7, this.tail = t$6, this;
|
|
1194
336
|
};
|
|
1195
|
-
function v$
|
|
1196
|
-
var h
|
|
1197
|
-
return h
|
|
337
|
+
function v$2(t$6, i$7, e$6) {
|
|
338
|
+
var h = i$7 === t$6.head ? new s$7(e$6, null, i$7, t$6) : new s$7(e$6, i$7, i$7.next, t$6);
|
|
339
|
+
return h.next === null && (t$6.tail = h), h.prev === null && (t$6.head = h), t$6.length++, h;
|
|
1198
340
|
}
|
|
1199
|
-
function f$
|
|
1200
|
-
t$
|
|
341
|
+
function f$4(t$6, i$7) {
|
|
342
|
+
t$6.tail = new s$7(i$7, t$6.tail, null, t$6), t$6.head || (t$6.head = t$6.tail), t$6.length++;
|
|
1201
343
|
}
|
|
1202
|
-
function o$
|
|
1203
|
-
t$
|
|
344
|
+
function o$5(t$6, i$7) {
|
|
345
|
+
t$6.head = new s$7(i$7, null, t$6.head, t$6), t$6.tail || (t$6.tail = t$6.head), t$6.length++;
|
|
1204
346
|
}
|
|
1205
|
-
function s$
|
|
1206
|
-
if (!(this instanceof s$
|
|
1207
|
-
this.list = h
|
|
347
|
+
function s$7(t$6, i$7, e$6, h) {
|
|
348
|
+
if (!(this instanceof s$7)) return new s$7(t$6, i$7, e$6, h);
|
|
349
|
+
this.list = h, this.value = t$6, i$7 ? (i$7.next = this, this.prev = i$7) : this.prev = null, e$6 ? (e$6.prev = this, this.next = e$6) : this.next = null;
|
|
1208
350
|
}
|
|
1209
351
|
try {
|
|
1210
352
|
i$4()(r);
|
|
@@ -1216,13 +358,13 @@ var X$1;
|
|
|
1216
358
|
function ft() {
|
|
1217
359
|
if (X$1) return s$5;
|
|
1218
360
|
X$1 = 1;
|
|
1219
|
-
const H$
|
|
361
|
+
const H$2 = typeof process == "object" && process ? process : {
|
|
1220
362
|
stdout: null,
|
|
1221
363
|
stderr: null
|
|
1222
|
-
}, Z = nt, q$
|
|
1223
|
-
class z$
|
|
1224
|
-
constructor(t$
|
|
1225
|
-
this.src = t$
|
|
364
|
+
}, Z = nt, q$1 = ot, G$1 = ht.StringDecoder, m$3 = Symbol("EOF"), d = Symbol("maybeEmitEnd"), y$3 = Symbol("emittedEnd"), R$2 = Symbol("emittingEnd"), g = Symbol("emittedError"), B = Symbol("closed"), Y = Symbol("read"), T$1 = Symbol("flush"), $ = Symbol("flushChunk"), f$4 = Symbol("encoding"), c$5 = Symbol("decoder"), M = Symbol("flowing"), S$1 = Symbol("paused"), b = Symbol("resume"), i$7 = Symbol("buffer"), a$10 = Symbol("pipes"), n$4 = Symbol("bufferLength"), j$2 = Symbol("bufferPush"), I = Symbol("bufferShift"), o$5 = Symbol("objectMode"), r = Symbol("destroyed"), P$1 = Symbol("error"), x = Symbol("emitData"), V = Symbol("emitEnd"), N = Symbol("emitEnd2"), p$1 = Symbol("async"), _$1 = Symbol("abort"), O$3 = Symbol("aborted"), E$1 = Symbol("signal"), w$2 = (h) => Promise.resolve().then(h), J$1 = commonjsGlobal._MP_NO_ITERATOR_SYMBOLS_ !== "1", K = J$1 && Symbol.asyncIterator || Symbol("asyncIterator not implemented"), W = J$1 && Symbol.iterator || Symbol("iterator not implemented"), k$1 = (h) => h === "end" || h === "finish" || h === "prefinish", tt$1 = (h) => h instanceof ArrayBuffer || typeof h == "object" && h.constructor && h.constructor.name === "ArrayBuffer" && h.byteLength >= 0, et = (h) => !Buffer.isBuffer(h) && ArrayBuffer.isView(h);
|
|
365
|
+
class z$1 {
|
|
366
|
+
constructor(t$6, e$6, s$7) {
|
|
367
|
+
this.src = t$6, this.dest = e$6, this.opts = s$7, this.ondrain = () => t$6[b](), e$6.on("drain", this.ondrain);
|
|
1226
368
|
}
|
|
1227
369
|
unpipe() {
|
|
1228
370
|
this.dest.removeListener("drain", this.ondrain);
|
|
@@ -1232,242 +374,242 @@ function ft() {
|
|
|
1232
374
|
this.unpipe(), this.opts.end && this.dest.end();
|
|
1233
375
|
}
|
|
1234
376
|
}
|
|
1235
|
-
class st extends z$
|
|
377
|
+
class st extends z$1 {
|
|
1236
378
|
unpipe() {
|
|
1237
379
|
this.src.removeListener("error", this.proxyErrors), super.unpipe();
|
|
1238
380
|
}
|
|
1239
|
-
constructor(t$
|
|
1240
|
-
super(t$
|
|
381
|
+
constructor(t$6, e$6, s$7) {
|
|
382
|
+
super(t$6, e$6, s$7), this.proxyErrors = (l$2) => e$6.emit("error", l$2), t$6.on("error", this.proxyErrors);
|
|
1241
383
|
}
|
|
1242
384
|
}
|
|
1243
|
-
class F$
|
|
1244
|
-
constructor(t$
|
|
1245
|
-
super(), this[M
|
|
385
|
+
class F$3 extends q$1 {
|
|
386
|
+
constructor(t$6) {
|
|
387
|
+
super(), this[M] = false, this[S$1] = false, this[a$10] = [], this[i$7] = [], this[o$5] = t$6 && t$6.objectMode || false, this[o$5] ? this[f$4] = null : this[f$4] = t$6 && t$6.encoding || null, this[f$4] === "buffer" && (this[f$4] = null), this[p$1] = t$6 && !!t$6.async || false, this[c$5] = this[f$4] ? new G$1(this[f$4]) : null, this[m$3] = false, this[y$3] = false, this[R$2] = false, this[B] = false, this[g] = null, this.writable = true, this.readable = true, this[n$4] = 0, this[r] = false, t$6 && t$6.debugExposeBuffer === true && Object.defineProperty(this, "buffer", { get: () => this[i$7] }), t$6 && t$6.debugExposePipes === true && Object.defineProperty(this, "pipes", { get: () => this[a$10] }), this[E$1] = t$6 && t$6.signal, this[O$3] = false, this[E$1] && (this[E$1].addEventListener("abort", () => this[_$1]()), this[E$1].aborted && this[_$1]());
|
|
1246
388
|
}
|
|
1247
389
|
get bufferLength() {
|
|
1248
390
|
return this[n$4];
|
|
1249
391
|
}
|
|
1250
392
|
get encoding() {
|
|
1251
|
-
return this[f$
|
|
393
|
+
return this[f$4];
|
|
1252
394
|
}
|
|
1253
|
-
set encoding(t$
|
|
1254
|
-
if (this[o$
|
|
1255
|
-
if (this[f$
|
|
1256
|
-
this[f$
|
|
395
|
+
set encoding(t$6) {
|
|
396
|
+
if (this[o$5]) throw new Error("cannot set encoding in objectMode");
|
|
397
|
+
if (this[f$4] && t$6 !== this[f$4] && (this[c$5] && this[c$5].lastNeed || this[n$4])) throw new Error("cannot change encoding");
|
|
398
|
+
this[f$4] !== t$6 && (this[c$5] = t$6 ? new G$1(t$6) : null, this[i$7].length && (this[i$7] = this[i$7].map((e$6) => this[c$5].write(e$6)))), this[f$4] = t$6;
|
|
1257
399
|
}
|
|
1258
|
-
setEncoding(t$
|
|
1259
|
-
this.encoding = t$
|
|
400
|
+
setEncoding(t$6) {
|
|
401
|
+
this.encoding = t$6;
|
|
1260
402
|
}
|
|
1261
403
|
get objectMode() {
|
|
1262
|
-
return this[o$
|
|
404
|
+
return this[o$5];
|
|
1263
405
|
}
|
|
1264
|
-
set objectMode(t$
|
|
1265
|
-
this[o$
|
|
406
|
+
set objectMode(t$6) {
|
|
407
|
+
this[o$5] = this[o$5] || !!t$6;
|
|
1266
408
|
}
|
|
1267
409
|
get async() {
|
|
1268
|
-
return this[p$
|
|
410
|
+
return this[p$1];
|
|
1269
411
|
}
|
|
1270
|
-
set async(t$
|
|
1271
|
-
this[p$
|
|
412
|
+
set async(t$6) {
|
|
413
|
+
this[p$1] = this[p$1] || !!t$6;
|
|
1272
414
|
}
|
|
1273
|
-
[_$
|
|
1274
|
-
this[O$
|
|
415
|
+
[_$1]() {
|
|
416
|
+
this[O$3] = true, this.emit("abort", this[E$1].reason), this.destroy(this[E$1].reason);
|
|
1275
417
|
}
|
|
1276
418
|
get aborted() {
|
|
1277
|
-
return this[O$
|
|
419
|
+
return this[O$3];
|
|
1278
420
|
}
|
|
1279
|
-
set aborted(t$
|
|
1280
|
-
write(t$
|
|
1281
|
-
if (this[O$
|
|
1282
|
-
if (this[m$
|
|
421
|
+
set aborted(t$6) {}
|
|
422
|
+
write(t$6, e$6, s$7) {
|
|
423
|
+
if (this[O$3]) return false;
|
|
424
|
+
if (this[m$3]) throw new Error("write after end");
|
|
1283
425
|
if (this[r]) return this.emit("error", Object.assign(/* @__PURE__ */ new Error("Cannot call write after a stream was destroyed"), { code: "ERR_STREAM_DESTROYED" })), true;
|
|
1284
|
-
typeof e$
|
|
1285
|
-
const l$
|
|
1286
|
-
return !this[o$
|
|
426
|
+
typeof e$6 == "function" && (s$7 = e$6, e$6 = "utf8"), e$6 || (e$6 = "utf8");
|
|
427
|
+
const l$2 = this[p$1] ? w$2 : (u$5) => u$5();
|
|
428
|
+
return !this[o$5] && !Buffer.isBuffer(t$6) && (et(t$6) ? t$6 = Buffer.from(t$6.buffer, t$6.byteOffset, t$6.byteLength) : tt$1(t$6) ? t$6 = Buffer.from(t$6) : typeof t$6 != "string" && (this.objectMode = true)), this[o$5] ? (this.flowing && this[n$4] !== 0 && this[T$1](true), this.flowing ? this.emit("data", t$6) : this[j$2](t$6), this[n$4] !== 0 && this.emit("readable"), s$7 && l$2(s$7), this.flowing) : t$6.length ? (typeof t$6 == "string" && !(e$6 === this[f$4] && !this[c$5].lastNeed) && (t$6 = Buffer.from(t$6, e$6)), Buffer.isBuffer(t$6) && this[f$4] && (t$6 = this[c$5].write(t$6)), this.flowing && this[n$4] !== 0 && this[T$1](true), this.flowing ? this.emit("data", t$6) : this[j$2](t$6), this[n$4] !== 0 && this.emit("readable"), s$7 && l$2(s$7), this.flowing) : (this[n$4] !== 0 && this.emit("readable"), s$7 && l$2(s$7), this.flowing);
|
|
1287
429
|
}
|
|
1288
|
-
read(t$
|
|
430
|
+
read(t$6) {
|
|
1289
431
|
if (this[r]) return null;
|
|
1290
|
-
if (this[n$4] === 0 || t$
|
|
1291
|
-
this[o$
|
|
1292
|
-
const e$
|
|
1293
|
-
return this[d
|
|
432
|
+
if (this[n$4] === 0 || t$6 === 0 || t$6 > this[n$4]) return this[d](), null;
|
|
433
|
+
this[o$5] && (t$6 = null), this[i$7].length > 1 && !this[o$5] && (this.encoding ? this[i$7] = [this[i$7].join("")] : this[i$7] = [Buffer.concat(this[i$7], this[n$4])]);
|
|
434
|
+
const e$6 = this[Y](t$6 || null, this[i$7][0]);
|
|
435
|
+
return this[d](), e$6;
|
|
1294
436
|
}
|
|
1295
|
-
[Y](t$
|
|
1296
|
-
return t$
|
|
437
|
+
[Y](t$6, e$6) {
|
|
438
|
+
return t$6 === e$6.length || t$6 === null ? this[I]() : (this[i$7][0] = e$6.slice(t$6), e$6 = e$6.slice(0, t$6), this[n$4] -= t$6), this.emit("data", e$6), !this[i$7].length && !this[m$3] && this.emit("drain"), e$6;
|
|
1297
439
|
}
|
|
1298
|
-
end(t$
|
|
1299
|
-
return typeof t$
|
|
440
|
+
end(t$6, e$6, s$7) {
|
|
441
|
+
return typeof t$6 == "function" && (s$7 = t$6, t$6 = null), typeof e$6 == "function" && (s$7 = e$6, e$6 = "utf8"), t$6 && this.write(t$6, e$6), s$7 && this.once("end", s$7), this[m$3] = true, this.writable = false, (this.flowing || !this[S$1]) && this[d](), this;
|
|
1300
442
|
}
|
|
1301
|
-
[b
|
|
1302
|
-
this[r] || (this[S$
|
|
443
|
+
[b]() {
|
|
444
|
+
this[r] || (this[S$1] = false, this[M] = true, this.emit("resume"), this[i$7].length ? this[T$1]() : this[m$3] ? this[d]() : this.emit("drain"));
|
|
1303
445
|
}
|
|
1304
446
|
resume() {
|
|
1305
|
-
return this[b
|
|
447
|
+
return this[b]();
|
|
1306
448
|
}
|
|
1307
449
|
pause() {
|
|
1308
|
-
this[M
|
|
450
|
+
this[M] = false, this[S$1] = true;
|
|
1309
451
|
}
|
|
1310
452
|
get destroyed() {
|
|
1311
453
|
return this[r];
|
|
1312
454
|
}
|
|
1313
455
|
get flowing() {
|
|
1314
|
-
return this[M
|
|
456
|
+
return this[M];
|
|
1315
457
|
}
|
|
1316
458
|
get paused() {
|
|
1317
|
-
return this[S$
|
|
459
|
+
return this[S$1];
|
|
1318
460
|
}
|
|
1319
|
-
[j$
|
|
1320
|
-
this[o$
|
|
461
|
+
[j$2](t$6) {
|
|
462
|
+
this[o$5] ? this[n$4] += 1 : this[n$4] += t$6.length, this[i$7].push(t$6);
|
|
1321
463
|
}
|
|
1322
|
-
[I
|
|
1323
|
-
return this[o$
|
|
464
|
+
[I]() {
|
|
465
|
+
return this[o$5] ? this[n$4] -= 1 : this[n$4] -= this[i$7][0].length, this[i$7].shift();
|
|
1324
466
|
}
|
|
1325
|
-
[T$
|
|
467
|
+
[T$1](t$6) {
|
|
1326
468
|
do ;
|
|
1327
|
-
while (this[$](this[I
|
|
1328
|
-
!t$
|
|
469
|
+
while (this[$](this[I]()) && this[i$7].length);
|
|
470
|
+
!t$6 && !this[i$7].length && !this[m$3] && this.emit("drain");
|
|
1329
471
|
}
|
|
1330
|
-
[$](t$
|
|
1331
|
-
return this.emit("data", t$
|
|
472
|
+
[$](t$6) {
|
|
473
|
+
return this.emit("data", t$6), this.flowing;
|
|
1332
474
|
}
|
|
1333
|
-
pipe(t$
|
|
475
|
+
pipe(t$6, e$6) {
|
|
1334
476
|
if (this[r]) return;
|
|
1335
|
-
const s$
|
|
1336
|
-
return e$
|
|
477
|
+
const s$7 = this[y$3];
|
|
478
|
+
return e$6 = e$6 || {}, t$6 === H$2.stdout || t$6 === H$2.stderr ? e$6.end = false : e$6.end = e$6.end !== false, e$6.proxyErrors = !!e$6.proxyErrors, s$7 ? e$6.end && t$6.end() : (this[a$10].push(e$6.proxyErrors ? new st(this, t$6, e$6) : new z$1(this, t$6, e$6)), this[p$1] ? w$2(() => this[b]()) : this[b]()), t$6;
|
|
1337
479
|
}
|
|
1338
|
-
unpipe(t$
|
|
1339
|
-
const e$
|
|
1340
|
-
e$
|
|
480
|
+
unpipe(t$6) {
|
|
481
|
+
const e$6 = this[a$10].find((s$7) => s$7.dest === t$6);
|
|
482
|
+
e$6 && (this[a$10].splice(this[a$10].indexOf(e$6), 1), e$6.unpipe());
|
|
1341
483
|
}
|
|
1342
|
-
addListener(t$
|
|
1343
|
-
return this.on(t$
|
|
484
|
+
addListener(t$6, e$6) {
|
|
485
|
+
return this.on(t$6, e$6);
|
|
1344
486
|
}
|
|
1345
|
-
on(t$
|
|
1346
|
-
const s$
|
|
1347
|
-
return t$
|
|
487
|
+
on(t$6, e$6) {
|
|
488
|
+
const s$7 = super.on(t$6, e$6);
|
|
489
|
+
return t$6 === "data" && !this[a$10].length && !this.flowing ? this[b]() : t$6 === "readable" && this[n$4] !== 0 ? super.emit("readable") : k$1(t$6) && this[y$3] ? (super.emit(t$6), this.removeAllListeners(t$6)) : t$6 === "error" && this[g] && (this[p$1] ? w$2(() => e$6.call(this, this[g])) : e$6.call(this, this[g])), s$7;
|
|
1348
490
|
}
|
|
1349
491
|
get emittedEnd() {
|
|
1350
|
-
return this[y$
|
|
1351
|
-
}
|
|
1352
|
-
[d
|
|
1353
|
-
!this[R$
|
|
1354
|
-
}
|
|
1355
|
-
emit(t$
|
|
1356
|
-
if (t$
|
|
1357
|
-
if (t$
|
|
1358
|
-
if (t$
|
|
1359
|
-
if (t$
|
|
1360
|
-
if (this[B
|
|
1361
|
-
const u$
|
|
1362
|
-
return this.removeAllListeners("close"), u$
|
|
1363
|
-
} else if (t$
|
|
1364
|
-
this[g
|
|
1365
|
-
const u$
|
|
1366
|
-
return this[d
|
|
1367
|
-
} else if (t$
|
|
1368
|
-
const u$
|
|
1369
|
-
return this[d
|
|
1370
|
-
} else if (t$
|
|
1371
|
-
const u$
|
|
1372
|
-
return this.removeAllListeners(t$
|
|
492
|
+
return this[y$3];
|
|
493
|
+
}
|
|
494
|
+
[d]() {
|
|
495
|
+
!this[R$2] && !this[y$3] && !this[r] && this[i$7].length === 0 && this[m$3] && (this[R$2] = true, this.emit("end"), this.emit("prefinish"), this.emit("finish"), this[B] && this.emit("close"), this[R$2] = false);
|
|
496
|
+
}
|
|
497
|
+
emit(t$6, e$6, ...s$7) {
|
|
498
|
+
if (t$6 !== "error" && t$6 !== "close" && t$6 !== r && this[r]) return;
|
|
499
|
+
if (t$6 === "data") return !this[o$5] && !e$6 ? false : this[p$1] ? w$2(() => this[x](e$6)) : this[x](e$6);
|
|
500
|
+
if (t$6 === "end") return this[V]();
|
|
501
|
+
if (t$6 === "close") {
|
|
502
|
+
if (this[B] = true, !this[y$3] && !this[r]) return;
|
|
503
|
+
const u$5 = super.emit("close");
|
|
504
|
+
return this.removeAllListeners("close"), u$5;
|
|
505
|
+
} else if (t$6 === "error") {
|
|
506
|
+
this[g] = e$6, super.emit(P$1, e$6);
|
|
507
|
+
const u$5 = !this[E$1] || this.listeners("error").length ? super.emit("error", e$6) : false;
|
|
508
|
+
return this[d](), u$5;
|
|
509
|
+
} else if (t$6 === "resume") {
|
|
510
|
+
const u$5 = super.emit("resume");
|
|
511
|
+
return this[d](), u$5;
|
|
512
|
+
} else if (t$6 === "finish" || t$6 === "prefinish") {
|
|
513
|
+
const u$5 = super.emit(t$6);
|
|
514
|
+
return this.removeAllListeners(t$6), u$5;
|
|
1373
515
|
}
|
|
1374
|
-
const l$
|
|
1375
|
-
return this[d
|
|
1376
|
-
}
|
|
1377
|
-
[x
|
|
1378
|
-
for (const s$
|
|
1379
|
-
const e$
|
|
1380
|
-
return this[d
|
|
1381
|
-
}
|
|
1382
|
-
[V
|
|
1383
|
-
this[y$
|
|
1384
|
-
}
|
|
1385
|
-
[N
|
|
1386
|
-
if (this[c$
|
|
1387
|
-
const e$
|
|
1388
|
-
if (e$
|
|
1389
|
-
for (const s$
|
|
1390
|
-
super.emit("data", e$
|
|
516
|
+
const l$2 = super.emit(t$6, e$6, ...s$7);
|
|
517
|
+
return this[d](), l$2;
|
|
518
|
+
}
|
|
519
|
+
[x](t$6) {
|
|
520
|
+
for (const s$7 of this[a$10]) s$7.dest.write(t$6) === false && this.pause();
|
|
521
|
+
const e$6 = super.emit("data", t$6);
|
|
522
|
+
return this[d](), e$6;
|
|
523
|
+
}
|
|
524
|
+
[V]() {
|
|
525
|
+
this[y$3] || (this[y$3] = true, this.readable = false, this[p$1] ? w$2(() => this[N]()) : this[N]());
|
|
526
|
+
}
|
|
527
|
+
[N]() {
|
|
528
|
+
if (this[c$5]) {
|
|
529
|
+
const e$6 = this[c$5].end();
|
|
530
|
+
if (e$6) {
|
|
531
|
+
for (const s$7 of this[a$10]) s$7.dest.write(e$6);
|
|
532
|
+
super.emit("data", e$6);
|
|
1391
533
|
}
|
|
1392
534
|
}
|
|
1393
|
-
for (const e$
|
|
1394
|
-
const t$
|
|
1395
|
-
return this.removeAllListeners("end"), t$
|
|
535
|
+
for (const e$6 of this[a$10]) e$6.end();
|
|
536
|
+
const t$6 = super.emit("end");
|
|
537
|
+
return this.removeAllListeners("end"), t$6;
|
|
1396
538
|
}
|
|
1397
539
|
collect() {
|
|
1398
|
-
const t$
|
|
1399
|
-
this[o$
|
|
1400
|
-
const e$
|
|
1401
|
-
return this.on("data", (s$
|
|
1402
|
-
t$
|
|
1403
|
-
}), e$
|
|
540
|
+
const t$6 = [];
|
|
541
|
+
this[o$5] || (t$6.dataLength = 0);
|
|
542
|
+
const e$6 = this.promise();
|
|
543
|
+
return this.on("data", (s$7) => {
|
|
544
|
+
t$6.push(s$7), this[o$5] || (t$6.dataLength += s$7.length);
|
|
545
|
+
}), e$6.then(() => t$6);
|
|
1404
546
|
}
|
|
1405
547
|
concat() {
|
|
1406
|
-
return this[o$
|
|
548
|
+
return this[o$5] ? Promise.reject(/* @__PURE__ */ new Error("cannot concat in objectMode")) : this.collect().then((t$6) => this[o$5] ? Promise.reject(/* @__PURE__ */ new Error("cannot concat in objectMode")) : this[f$4] ? t$6.join("") : Buffer.concat(t$6, t$6.dataLength));
|
|
1407
549
|
}
|
|
1408
550
|
promise() {
|
|
1409
|
-
return new Promise((t$
|
|
1410
|
-
this.on(r, () => e$
|
|
551
|
+
return new Promise((t$6, e$6) => {
|
|
552
|
+
this.on(r, () => e$6(/* @__PURE__ */ new Error("stream destroyed"))), this.on("error", (s$7) => e$6(s$7)), this.on("end", () => t$6());
|
|
1411
553
|
});
|
|
1412
554
|
}
|
|
1413
|
-
[K
|
|
1414
|
-
let t$
|
|
1415
|
-
const e$
|
|
555
|
+
[K]() {
|
|
556
|
+
let t$6 = false;
|
|
557
|
+
const e$6 = () => (this.pause(), t$6 = true, Promise.resolve({ done: true }));
|
|
1416
558
|
return {
|
|
1417
559
|
next: () => {
|
|
1418
|
-
if (t$
|
|
1419
|
-
const l$
|
|
1420
|
-
if (l$
|
|
560
|
+
if (t$6) return e$6();
|
|
561
|
+
const l$2 = this.read();
|
|
562
|
+
if (l$2 !== null) return Promise.resolve({
|
|
1421
563
|
done: false,
|
|
1422
|
-
value: l$
|
|
564
|
+
value: l$2
|
|
1423
565
|
});
|
|
1424
|
-
if (this[m$
|
|
1425
|
-
let u$
|
|
1426
|
-
const A
|
|
1427
|
-
this.removeListener("data", U
|
|
1428
|
-
}, U
|
|
1429
|
-
this.removeListener("error", A
|
|
566
|
+
if (this[m$3]) return e$6();
|
|
567
|
+
let u$5 = null, Q = null;
|
|
568
|
+
const A = (L) => {
|
|
569
|
+
this.removeListener("data", U), this.removeListener("end", C$1), this.removeListener(r, D), e$6(), Q(L);
|
|
570
|
+
}, U = (L) => {
|
|
571
|
+
this.removeListener("error", A), this.removeListener("end", C$1), this.removeListener(r, D), this.pause(), u$5({
|
|
1430
572
|
value: L,
|
|
1431
|
-
done: !!this[m$
|
|
573
|
+
done: !!this[m$3]
|
|
1432
574
|
});
|
|
1433
|
-
}, C$
|
|
1434
|
-
this.removeListener("error", A
|
|
1435
|
-
}, D
|
|
575
|
+
}, C$1 = () => {
|
|
576
|
+
this.removeListener("error", A), this.removeListener("data", U), this.removeListener(r, D), e$6(), u$5({ done: true });
|
|
577
|
+
}, D = () => A(/* @__PURE__ */ new Error("stream destroyed"));
|
|
1436
578
|
return new Promise((L, it) => {
|
|
1437
|
-
Q = it, u$
|
|
579
|
+
Q = it, u$5 = L, this.once(r, D), this.once("error", A), this.once("end", C$1), this.once("data", U);
|
|
1438
580
|
});
|
|
1439
581
|
},
|
|
1440
|
-
throw: e$
|
|
1441
|
-
return: e$
|
|
1442
|
-
[K
|
|
582
|
+
throw: e$6,
|
|
583
|
+
return: e$6,
|
|
584
|
+
[K]() {
|
|
1443
585
|
return this;
|
|
1444
586
|
}
|
|
1445
587
|
};
|
|
1446
588
|
}
|
|
1447
|
-
[W
|
|
1448
|
-
let t$
|
|
1449
|
-
const e$
|
|
1450
|
-
if (t$
|
|
1451
|
-
const l$
|
|
1452
|
-
return l$
|
|
589
|
+
[W]() {
|
|
590
|
+
let t$6 = false;
|
|
591
|
+
const e$6 = () => (this.pause(), this.removeListener(P$1, e$6), this.removeListener(r, e$6), this.removeListener("end", e$6), t$6 = true, { done: true }), s$7 = () => {
|
|
592
|
+
if (t$6) return e$6();
|
|
593
|
+
const l$2 = this.read();
|
|
594
|
+
return l$2 === null ? e$6() : { value: l$2 };
|
|
1453
595
|
};
|
|
1454
|
-
return this.once("end", e$
|
|
1455
|
-
next: s$
|
|
1456
|
-
throw: e$
|
|
1457
|
-
return: e$
|
|
1458
|
-
[W
|
|
596
|
+
return this.once("end", e$6), this.once(P$1, e$6), this.once(r, e$6), {
|
|
597
|
+
next: s$7,
|
|
598
|
+
throw: e$6,
|
|
599
|
+
return: e$6,
|
|
600
|
+
[W]() {
|
|
1459
601
|
return this;
|
|
1460
602
|
}
|
|
1461
603
|
};
|
|
1462
604
|
}
|
|
1463
|
-
destroy(t$
|
|
1464
|
-
return this[r] ? (t$
|
|
605
|
+
destroy(t$6) {
|
|
606
|
+
return this[r] ? (t$6 ? this.emit("error", t$6) : this.emit(r), this) : (this[r] = true, this[i$7].length = 0, this[n$4] = 0, typeof this.close == "function" && !this[B] && this.close(), t$6 ? this.emit("error", t$6) : this.emit(r), this);
|
|
1465
607
|
}
|
|
1466
|
-
static isStream(t$
|
|
1467
|
-
return !!t$
|
|
608
|
+
static isStream(t$6) {
|
|
609
|
+
return !!t$6 && (t$6 instanceof F$3 || t$6 instanceof q$1 || t$6 instanceof Z && (typeof t$6.pipe == "function" || typeof t$6.write == "function" && typeof t$6.end == "function"));
|
|
1468
610
|
}
|
|
1469
611
|
}
|
|
1470
|
-
return s$5.Minipass = F$
|
|
612
|
+
return s$5.Minipass = F$3, s$5;
|
|
1471
613
|
}
|
|
1472
614
|
var e$2, o$4;
|
|
1473
615
|
function a$7() {
|
|
@@ -1477,10 +619,10 @@ var n$2, a$6;
|
|
|
1477
619
|
function u$3() {
|
|
1478
620
|
if (a$6) return n$2;
|
|
1479
621
|
a$6 = 1;
|
|
1480
|
-
const { Minipass: o$
|
|
1481
|
-
return n$2 = class extends o$
|
|
1482
|
-
constructor(t$
|
|
1483
|
-
switch (super(), this.pause(), this.extended = e$
|
|
622
|
+
const { Minipass: o$5 } = ft(), s$7 = a$7(), r = Symbol("slurp");
|
|
623
|
+
return n$2 = class extends o$5 {
|
|
624
|
+
constructor(t$6, e$6, i$7) {
|
|
625
|
+
switch (super(), this.pause(), this.extended = e$6, this.globalExtended = i$7, this.header = t$6, this.startBlockSize = 512 * Math.ceil(t$6.size / 512), this.blockRemain = this.startBlockSize, this.remain = t$6.size, this.type = t$6.type, this.meta = false, this.ignore = false, this.type) {
|
|
1484
626
|
case "File":
|
|
1485
627
|
case "OldFile":
|
|
1486
628
|
case "Link":
|
|
@@ -1501,16 +643,16 @@ function u$3() {
|
|
|
1501
643
|
break;
|
|
1502
644
|
default: this.ignore = true;
|
|
1503
645
|
}
|
|
1504
|
-
this.path = s$
|
|
646
|
+
this.path = s$7(t$6.path), this.mode = t$6.mode, this.mode && (this.mode = this.mode & 4095), this.uid = t$6.uid, this.gid = t$6.gid, this.uname = t$6.uname, this.gname = t$6.gname, this.size = t$6.size, this.mtime = t$6.mtime, this.atime = t$6.atime, this.ctime = t$6.ctime, this.linkpath = s$7(t$6.linkpath), this.uname = t$6.uname, this.gname = t$6.gname, e$6 && this[r](e$6), i$7 && this[r](i$7, true);
|
|
1505
647
|
}
|
|
1506
|
-
write(t$
|
|
1507
|
-
const e$
|
|
1508
|
-
if (e$
|
|
1509
|
-
const i$
|
|
1510
|
-
return this.remain = Math.max(0, i$
|
|
648
|
+
write(t$6) {
|
|
649
|
+
const e$6 = t$6.length;
|
|
650
|
+
if (e$6 > this.blockRemain) throw new Error("writing more to entry than is appropriate");
|
|
651
|
+
const i$7 = this.remain, c$5 = this.blockRemain;
|
|
652
|
+
return this.remain = Math.max(0, i$7 - e$6), this.blockRemain = Math.max(0, c$5 - e$6), this.ignore ? true : i$7 >= e$6 ? super.write(t$6) : super.write(t$6.slice(0, i$7));
|
|
1511
653
|
}
|
|
1512
|
-
[r](t$
|
|
1513
|
-
for (const i$
|
|
654
|
+
[r](t$6, e$6) {
|
|
655
|
+
for (const i$7 in t$6) t$6[i$7] !== null && t$6[i$7] !== void 0 && !(e$6 && i$7 === "path") && (this[i$7] = i$7 === "path" || i$7 === "linkpath" ? s$7(t$6[i$7]) : t$6[i$7]);
|
|
1514
656
|
}
|
|
1515
657
|
}, n$2;
|
|
1516
658
|
}
|
|
@@ -1518,18 +660,18 @@ var r$2, a$5;
|
|
|
1518
660
|
function f$2() {
|
|
1519
661
|
if (a$5) return r$2;
|
|
1520
662
|
a$5 = 1;
|
|
1521
|
-
const c$
|
|
1522
|
-
class h
|
|
1523
|
-
constructor(e$
|
|
1524
|
-
this.atime = e$
|
|
663
|
+
const c$5 = E(), d = path;
|
|
664
|
+
class h {
|
|
665
|
+
constructor(e$6, n$4) {
|
|
666
|
+
this.atime = e$6.atime || null, this.charset = e$6.charset || null, this.comment = e$6.comment || null, this.ctime = e$6.ctime || null, this.gid = e$6.gid || null, this.gname = e$6.gname || null, this.linkpath = e$6.linkpath || null, this.mtime = e$6.mtime || null, this.path = e$6.path || null, this.size = e$6.size || null, this.uid = e$6.uid || null, this.uname = e$6.uname || null, this.dev = e$6.dev || null, this.ino = e$6.ino || null, this.nlink = e$6.nlink || null, this.global = n$4 || false;
|
|
1525
667
|
}
|
|
1526
668
|
encode() {
|
|
1527
|
-
const e$
|
|
1528
|
-
if (e$
|
|
1529
|
-
const n$4 = Buffer.byteLength(e$
|
|
1530
|
-
for (let t$
|
|
1531
|
-
new c$
|
|
1532
|
-
path: ("PaxHeader/" + d
|
|
669
|
+
const e$6 = this.encodeBody();
|
|
670
|
+
if (e$6 === "") return null;
|
|
671
|
+
const n$4 = Buffer.byteLength(e$6), l$2 = 512 * Math.ceil(1 + n$4 / 512), i$7 = Buffer.allocUnsafe(l$2);
|
|
672
|
+
for (let t$6 = 0; t$6 < 512; t$6++) i$7[t$6] = 0;
|
|
673
|
+
new c$5({
|
|
674
|
+
path: ("PaxHeader/" + d.basename(this.path)).slice(0, 99),
|
|
1533
675
|
mode: this.mode || 420,
|
|
1534
676
|
uid: this.uid || null,
|
|
1535
677
|
gid: this.gid || null,
|
|
@@ -1543,40 +685,40 @@ function f$2() {
|
|
|
1543
685
|
devmin: 0,
|
|
1544
686
|
atime: this.atime || null,
|
|
1545
687
|
ctime: this.ctime || null
|
|
1546
|
-
}).encode(i$
|
|
1547
|
-
for (let t$
|
|
1548
|
-
return i$
|
|
688
|
+
}).encode(i$7), i$7.write(e$6, 512, n$4, "utf8");
|
|
689
|
+
for (let t$6 = n$4 + 512; t$6 < i$7.length; t$6++) i$7[t$6] = 0;
|
|
690
|
+
return i$7;
|
|
1549
691
|
}
|
|
1550
692
|
encodeBody() {
|
|
1551
693
|
return this.encodeField("path") + this.encodeField("ctime") + this.encodeField("atime") + this.encodeField("dev") + this.encodeField("ino") + this.encodeField("nlink") + this.encodeField("charset") + this.encodeField("comment") + this.encodeField("gid") + this.encodeField("gname") + this.encodeField("linkpath") + this.encodeField("mtime") + this.encodeField("size") + this.encodeField("uid") + this.encodeField("uname");
|
|
1552
694
|
}
|
|
1553
|
-
encodeField(e$
|
|
1554
|
-
if (this[e$
|
|
1555
|
-
const n$4 = this[e$
|
|
1556
|
-
`, i$
|
|
1557
|
-
let t$
|
|
1558
|
-
return i$
|
|
1559
|
-
}
|
|
1560
|
-
}
|
|
1561
|
-
h
|
|
1562
|
-
const o$
|
|
1563
|
-
`).reduce(m$
|
|
1564
|
-
const n$4 = parseInt(e$
|
|
1565
|
-
if (n$4 !== Buffer.byteLength(e$
|
|
1566
|
-
e$
|
|
1567
|
-
const l$
|
|
1568
|
-
if (!i$
|
|
1569
|
-
const t$
|
|
1570
|
-
return s$
|
|
695
|
+
encodeField(e$6) {
|
|
696
|
+
if (this[e$6] === null || this[e$6] === void 0) return "";
|
|
697
|
+
const n$4 = this[e$6] instanceof Date ? this[e$6].getTime() / 1e3 : this[e$6], l$2 = " " + (e$6 === "dev" || e$6 === "ino" || e$6 === "nlink" ? "SCHILY." : "") + e$6 + "=" + n$4 + `
|
|
698
|
+
`, i$7 = Buffer.byteLength(l$2);
|
|
699
|
+
let t$6 = Math.floor(Math.log(i$7) / Math.log(10)) + 1;
|
|
700
|
+
return i$7 + t$6 >= Math.pow(10, t$6) && (t$6 += 1), t$6 + i$7 + l$2;
|
|
701
|
+
}
|
|
702
|
+
}
|
|
703
|
+
h.parse = (s$7, e$6, n$4) => new h(o$5(u$5(s$7), e$6), n$4);
|
|
704
|
+
const o$5 = (s$7, e$6) => e$6 ? Object.keys(s$7).reduce((n$4, l$2) => (n$4[l$2] = s$7[l$2], n$4), e$6) : s$7, u$5 = (s$7) => s$7.replace(/\n$/, "").split(`
|
|
705
|
+
`).reduce(m$3, Object.create(null)), m$3 = (s$7, e$6) => {
|
|
706
|
+
const n$4 = parseInt(e$6, 10);
|
|
707
|
+
if (n$4 !== Buffer.byteLength(e$6) + 1) return s$7;
|
|
708
|
+
e$6 = e$6.slice((n$4 + " ").length);
|
|
709
|
+
const l$2 = e$6.split("="), i$7 = l$2.shift().replace(/^SCHILY\.(dev|ino|nlink)/, "$1");
|
|
710
|
+
if (!i$7) return s$7;
|
|
711
|
+
const t$6 = l$2.join("=");
|
|
712
|
+
return s$7[i$7] = /^([A-Z]+\.)?([mac]|birth|creation)time$/.test(i$7) ? /* @__PURE__ */ new Date(t$6 * 1e3) : /^[0-9]+$/.test(t$6) ? +t$6 : t$6, s$7;
|
|
1571
713
|
};
|
|
1572
|
-
return r$2 = h
|
|
714
|
+
return r$2 = h, r$2;
|
|
1573
715
|
}
|
|
1574
716
|
var i$3 = {};
|
|
1575
717
|
var _, R$1;
|
|
1576
718
|
function T() {
|
|
1577
719
|
if (R$1) return _;
|
|
1578
720
|
R$1 = 1;
|
|
1579
|
-
const E$
|
|
721
|
+
const E$1 = O$2.constants || { ZLIB_VERNUM: 4736 };
|
|
1580
722
|
return _ = Object.freeze(Object.assign(Object.create(null), {
|
|
1581
723
|
Z_NO_FLUSH: 0,
|
|
1582
724
|
Z_PARTIAL_FLUSH: 1,
|
|
@@ -1684,19 +826,19 @@ function T() {
|
|
|
1684
826
|
BROTLI_DECODER_ERROR_ALLOC_RING_BUFFER_2: -27,
|
|
1685
827
|
BROTLI_DECODER_ERROR_ALLOC_BLOCK_TYPE_TREES: -30,
|
|
1686
828
|
BROTLI_DECODER_ERROR_UNREACHABLE: -31
|
|
1687
|
-
}, E$
|
|
829
|
+
}, E$1)), _;
|
|
1688
830
|
}
|
|
1689
831
|
var j, H$1;
|
|
1690
832
|
function tt() {
|
|
1691
833
|
if (H$1) return j;
|
|
1692
834
|
H$1 = 1;
|
|
1693
|
-
const I
|
|
835
|
+
const I = typeof process == "object" && process ? process : {
|
|
1694
836
|
stdout: null,
|
|
1695
837
|
stderr: null
|
|
1696
|
-
}, Y = nt, x
|
|
1697
|
-
class U
|
|
1698
|
-
constructor(t$
|
|
1699
|
-
this.src = t$
|
|
838
|
+
}, Y = nt, x = ot, N = ht.StringDecoder, u$5 = Symbol("EOF"), a$10 = Symbol("maybeEmitEnd"), c$5 = Symbol("emittedEnd"), S$1 = Symbol("emittingEnd"), E$1 = Symbol("emittedError"), w$2 = Symbol("closed"), P$1 = Symbol("read"), L = Symbol("flush"), _$1 = Symbol("flushChunk"), h = Symbol("encoding"), m$3 = Symbol("decoder"), M = Symbol("flowing"), y$3 = Symbol("paused"), p$1 = Symbol("resume"), s$7 = Symbol("bufferLength"), T$1 = Symbol("bufferPush"), B = Symbol("bufferShift"), r = Symbol("objectMode"), n$4 = Symbol("destroyed"), D = Symbol("emitData"), F$3 = Symbol("emitEnd"), R$2 = Symbol("emitEnd2"), d = Symbol("async"), b = (o$5) => Promise.resolve().then(o$5), C$1 = commonjsGlobal._MP_NO_ITERATOR_SYMBOLS_ !== "1", $ = C$1 && Symbol.asyncIterator || Symbol("asyncIterator not implemented"), G$1 = C$1 && Symbol.iterator || Symbol("iterator not implemented"), V = (o$5) => o$5 === "end" || o$5 === "finish" || o$5 === "prefinish", v$2 = (o$5) => o$5 instanceof ArrayBuffer || typeof o$5 == "object" && o$5.constructor && o$5.constructor.name === "ArrayBuffer" && o$5.byteLength >= 0, J$1 = (o$5) => !Buffer.isBuffer(o$5) && ArrayBuffer.isView(o$5);
|
|
839
|
+
class U {
|
|
840
|
+
constructor(t$6, e$6, i$7) {
|
|
841
|
+
this.src = t$6, this.dest = e$6, this.opts = i$7, this.ondrain = () => t$6[p$1](), e$6.on("drain", this.ondrain);
|
|
1700
842
|
}
|
|
1701
843
|
unpipe() {
|
|
1702
844
|
this.dest.removeListener("drain", this.ondrain);
|
|
@@ -1706,214 +848,214 @@ function tt() {
|
|
|
1706
848
|
this.unpipe(), this.opts.end && this.dest.end();
|
|
1707
849
|
}
|
|
1708
850
|
}
|
|
1709
|
-
class K
|
|
851
|
+
class K extends U {
|
|
1710
852
|
unpipe() {
|
|
1711
853
|
this.src.removeListener("error", this.proxyErrors), super.unpipe();
|
|
1712
854
|
}
|
|
1713
|
-
constructor(t$
|
|
1714
|
-
super(t$
|
|
855
|
+
constructor(t$6, e$6, i$7) {
|
|
856
|
+
super(t$6, e$6, i$7), this.proxyErrors = (l$2) => e$6.emit("error", l$2), t$6.on("error", this.proxyErrors);
|
|
1715
857
|
}
|
|
1716
858
|
}
|
|
1717
|
-
return j = class q$
|
|
1718
|
-
constructor(t$
|
|
1719
|
-
super(), this[M
|
|
859
|
+
return j = class q$1 extends x {
|
|
860
|
+
constructor(t$6) {
|
|
861
|
+
super(), this[M] = false, this[y$3] = false, this.pipes = [], this.buffer = [], this[r] = t$6 && t$6.objectMode || false, this[r] ? this[h] = null : this[h] = t$6 && t$6.encoding || null, this[h] === "buffer" && (this[h] = null), this[d] = t$6 && !!t$6.async || false, this[m$3] = this[h] ? new N(this[h]) : null, this[u$5] = false, this[c$5] = false, this[S$1] = false, this[w$2] = false, this[E$1] = null, this.writable = true, this.readable = true, this[s$7] = 0, this[n$4] = false;
|
|
1720
862
|
}
|
|
1721
863
|
get bufferLength() {
|
|
1722
|
-
return this[s$
|
|
864
|
+
return this[s$7];
|
|
1723
865
|
}
|
|
1724
866
|
get encoding() {
|
|
1725
|
-
return this[h
|
|
867
|
+
return this[h];
|
|
1726
868
|
}
|
|
1727
|
-
set encoding(t$
|
|
869
|
+
set encoding(t$6) {
|
|
1728
870
|
if (this[r]) throw new Error("cannot set encoding in objectMode");
|
|
1729
|
-
if (this[h
|
|
1730
|
-
this[h
|
|
871
|
+
if (this[h] && t$6 !== this[h] && (this[m$3] && this[m$3].lastNeed || this[s$7])) throw new Error("cannot change encoding");
|
|
872
|
+
this[h] !== t$6 && (this[m$3] = t$6 ? new N(t$6) : null, this.buffer.length && (this.buffer = this.buffer.map((e$6) => this[m$3].write(e$6)))), this[h] = t$6;
|
|
1731
873
|
}
|
|
1732
|
-
setEncoding(t$
|
|
1733
|
-
this.encoding = t$
|
|
874
|
+
setEncoding(t$6) {
|
|
875
|
+
this.encoding = t$6;
|
|
1734
876
|
}
|
|
1735
877
|
get objectMode() {
|
|
1736
878
|
return this[r];
|
|
1737
879
|
}
|
|
1738
|
-
set objectMode(t$
|
|
1739
|
-
this[r] = this[r] || !!t$
|
|
880
|
+
set objectMode(t$6) {
|
|
881
|
+
this[r] = this[r] || !!t$6;
|
|
1740
882
|
}
|
|
1741
883
|
get async() {
|
|
1742
|
-
return this[d
|
|
884
|
+
return this[d];
|
|
1743
885
|
}
|
|
1744
|
-
set async(t$
|
|
1745
|
-
this[d
|
|
886
|
+
set async(t$6) {
|
|
887
|
+
this[d] = this[d] || !!t$6;
|
|
1746
888
|
}
|
|
1747
|
-
write(t$
|
|
1748
|
-
if (this[u$
|
|
889
|
+
write(t$6, e$6, i$7) {
|
|
890
|
+
if (this[u$5]) throw new Error("write after end");
|
|
1749
891
|
if (this[n$4]) return this.emit("error", Object.assign(/* @__PURE__ */ new Error("Cannot call write after a stream was destroyed"), { code: "ERR_STREAM_DESTROYED" })), true;
|
|
1750
|
-
typeof e$
|
|
1751
|
-
const l$
|
|
1752
|
-
return !this[r] && !Buffer.isBuffer(t$
|
|
892
|
+
typeof e$6 == "function" && (i$7 = e$6, e$6 = "utf8"), e$6 || (e$6 = "utf8");
|
|
893
|
+
const l$2 = this[d] ? b : (f$4) => f$4();
|
|
894
|
+
return !this[r] && !Buffer.isBuffer(t$6) && (J$1(t$6) ? t$6 = Buffer.from(t$6.buffer, t$6.byteOffset, t$6.byteLength) : v$2(t$6) ? t$6 = Buffer.from(t$6) : typeof t$6 != "string" && (this.objectMode = true)), this[r] ? (this.flowing && this[s$7] !== 0 && this[L](true), this.flowing ? this.emit("data", t$6) : this[T$1](t$6), this[s$7] !== 0 && this.emit("readable"), i$7 && l$2(i$7), this.flowing) : t$6.length ? (typeof t$6 == "string" && !(e$6 === this[h] && !this[m$3].lastNeed) && (t$6 = Buffer.from(t$6, e$6)), Buffer.isBuffer(t$6) && this[h] && (t$6 = this[m$3].write(t$6)), this.flowing && this[s$7] !== 0 && this[L](true), this.flowing ? this.emit("data", t$6) : this[T$1](t$6), this[s$7] !== 0 && this.emit("readable"), i$7 && l$2(i$7), this.flowing) : (this[s$7] !== 0 && this.emit("readable"), i$7 && l$2(i$7), this.flowing);
|
|
1753
895
|
}
|
|
1754
|
-
read(t$
|
|
896
|
+
read(t$6) {
|
|
1755
897
|
if (this[n$4]) return null;
|
|
1756
|
-
if (this[s$
|
|
1757
|
-
this[r] && (t$
|
|
1758
|
-
const e$
|
|
1759
|
-
return this[a$
|
|
898
|
+
if (this[s$7] === 0 || t$6 === 0 || t$6 > this[s$7]) return this[a$10](), null;
|
|
899
|
+
this[r] && (t$6 = null), this.buffer.length > 1 && !this[r] && (this.encoding ? this.buffer = [this.buffer.join("")] : this.buffer = [Buffer.concat(this.buffer, this[s$7])]);
|
|
900
|
+
const e$6 = this[P$1](t$6 || null, this.buffer[0]);
|
|
901
|
+
return this[a$10](), e$6;
|
|
1760
902
|
}
|
|
1761
|
-
[P$
|
|
1762
|
-
return t$
|
|
903
|
+
[P$1](t$6, e$6) {
|
|
904
|
+
return t$6 === e$6.length || t$6 === null ? this[B]() : (this.buffer[0] = e$6.slice(t$6), e$6 = e$6.slice(0, t$6), this[s$7] -= t$6), this.emit("data", e$6), !this.buffer.length && !this[u$5] && this.emit("drain"), e$6;
|
|
1763
905
|
}
|
|
1764
|
-
end(t$
|
|
1765
|
-
return typeof t$
|
|
906
|
+
end(t$6, e$6, i$7) {
|
|
907
|
+
return typeof t$6 == "function" && (i$7 = t$6, t$6 = null), typeof e$6 == "function" && (i$7 = e$6, e$6 = "utf8"), t$6 && this.write(t$6, e$6), i$7 && this.once("end", i$7), this[u$5] = true, this.writable = false, (this.flowing || !this[y$3]) && this[a$10](), this;
|
|
1766
908
|
}
|
|
1767
|
-
[p$
|
|
1768
|
-
this[n$4] || (this[y$
|
|
909
|
+
[p$1]() {
|
|
910
|
+
this[n$4] || (this[y$3] = false, this[M] = true, this.emit("resume"), this.buffer.length ? this[L]() : this[u$5] ? this[a$10]() : this.emit("drain"));
|
|
1769
911
|
}
|
|
1770
912
|
resume() {
|
|
1771
|
-
return this[p$
|
|
913
|
+
return this[p$1]();
|
|
1772
914
|
}
|
|
1773
915
|
pause() {
|
|
1774
|
-
this[M
|
|
916
|
+
this[M] = false, this[y$3] = true;
|
|
1775
917
|
}
|
|
1776
918
|
get destroyed() {
|
|
1777
919
|
return this[n$4];
|
|
1778
920
|
}
|
|
1779
921
|
get flowing() {
|
|
1780
|
-
return this[M
|
|
922
|
+
return this[M];
|
|
1781
923
|
}
|
|
1782
924
|
get paused() {
|
|
1783
|
-
return this[y$
|
|
925
|
+
return this[y$3];
|
|
1784
926
|
}
|
|
1785
|
-
[T$
|
|
1786
|
-
this[r] ? this[s$
|
|
927
|
+
[T$1](t$6) {
|
|
928
|
+
this[r] ? this[s$7] += 1 : this[s$7] += t$6.length, this.buffer.push(t$6);
|
|
1787
929
|
}
|
|
1788
|
-
[B
|
|
1789
|
-
return this.buffer.length && (this[r] ? this[s$
|
|
930
|
+
[B]() {
|
|
931
|
+
return this.buffer.length && (this[r] ? this[s$7] -= 1 : this[s$7] -= this.buffer[0].length), this.buffer.shift();
|
|
1790
932
|
}
|
|
1791
|
-
[L](t$
|
|
933
|
+
[L](t$6) {
|
|
1792
934
|
do ;
|
|
1793
|
-
while (this[_$
|
|
1794
|
-
!t$
|
|
935
|
+
while (this[_$1](this[B]()));
|
|
936
|
+
!t$6 && !this.buffer.length && !this[u$5] && this.emit("drain");
|
|
1795
937
|
}
|
|
1796
|
-
[_$
|
|
1797
|
-
return t$
|
|
938
|
+
[_$1](t$6) {
|
|
939
|
+
return t$6 ? (this.emit("data", t$6), this.flowing) : false;
|
|
1798
940
|
}
|
|
1799
|
-
pipe(t$
|
|
941
|
+
pipe(t$6, e$6) {
|
|
1800
942
|
if (this[n$4]) return;
|
|
1801
|
-
const i$
|
|
1802
|
-
return e$
|
|
943
|
+
const i$7 = this[c$5];
|
|
944
|
+
return e$6 = e$6 || {}, t$6 === I.stdout || t$6 === I.stderr ? e$6.end = false : e$6.end = e$6.end !== false, e$6.proxyErrors = !!e$6.proxyErrors, i$7 ? e$6.end && t$6.end() : (this.pipes.push(e$6.proxyErrors ? new K(this, t$6, e$6) : new U(this, t$6, e$6)), this[d] ? b(() => this[p$1]()) : this[p$1]()), t$6;
|
|
1803
945
|
}
|
|
1804
|
-
unpipe(t$
|
|
1805
|
-
const e$
|
|
1806
|
-
e$
|
|
946
|
+
unpipe(t$6) {
|
|
947
|
+
const e$6 = this.pipes.find((i$7) => i$7.dest === t$6);
|
|
948
|
+
e$6 && (this.pipes.splice(this.pipes.indexOf(e$6), 1), e$6.unpipe());
|
|
1807
949
|
}
|
|
1808
|
-
addListener(t$
|
|
1809
|
-
return this.on(t$
|
|
950
|
+
addListener(t$6, e$6) {
|
|
951
|
+
return this.on(t$6, e$6);
|
|
1810
952
|
}
|
|
1811
|
-
on(t$
|
|
1812
|
-
const i$
|
|
1813
|
-
return t$
|
|
953
|
+
on(t$6, e$6) {
|
|
954
|
+
const i$7 = super.on(t$6, e$6);
|
|
955
|
+
return t$6 === "data" && !this.pipes.length && !this.flowing ? this[p$1]() : t$6 === "readable" && this[s$7] !== 0 ? super.emit("readable") : V(t$6) && this[c$5] ? (super.emit(t$6), this.removeAllListeners(t$6)) : t$6 === "error" && this[E$1] && (this[d] ? b(() => e$6.call(this, this[E$1])) : e$6.call(this, this[E$1])), i$7;
|
|
1814
956
|
}
|
|
1815
957
|
get emittedEnd() {
|
|
1816
|
-
return this[c$
|
|
1817
|
-
}
|
|
1818
|
-
[a$
|
|
1819
|
-
!this[S$
|
|
1820
|
-
}
|
|
1821
|
-
emit(t$
|
|
1822
|
-
if (t$
|
|
1823
|
-
if (t$
|
|
1824
|
-
if (t$
|
|
1825
|
-
if (t$
|
|
1826
|
-
if (this[w$
|
|
1827
|
-
const f$
|
|
1828
|
-
return this.removeAllListeners("close"), f$
|
|
1829
|
-
} else if (t$
|
|
1830
|
-
this[E$
|
|
1831
|
-
const f$
|
|
1832
|
-
return this[a$
|
|
1833
|
-
} else if (t$
|
|
1834
|
-
const f$
|
|
1835
|
-
return this[a$
|
|
1836
|
-
} else if (t$
|
|
1837
|
-
const f$
|
|
1838
|
-
return this.removeAllListeners(t$
|
|
958
|
+
return this[c$5];
|
|
959
|
+
}
|
|
960
|
+
[a$10]() {
|
|
961
|
+
!this[S$1] && !this[c$5] && !this[n$4] && this.buffer.length === 0 && this[u$5] && (this[S$1] = true, this.emit("end"), this.emit("prefinish"), this.emit("finish"), this[w$2] && this.emit("close"), this[S$1] = false);
|
|
962
|
+
}
|
|
963
|
+
emit(t$6, e$6, ...i$7) {
|
|
964
|
+
if (t$6 !== "error" && t$6 !== "close" && t$6 !== n$4 && this[n$4]) return;
|
|
965
|
+
if (t$6 === "data") return e$6 ? this[d] ? b(() => this[D](e$6)) : this[D](e$6) : false;
|
|
966
|
+
if (t$6 === "end") return this[F$3]();
|
|
967
|
+
if (t$6 === "close") {
|
|
968
|
+
if (this[w$2] = true, !this[c$5] && !this[n$4]) return;
|
|
969
|
+
const f$4 = super.emit("close");
|
|
970
|
+
return this.removeAllListeners("close"), f$4;
|
|
971
|
+
} else if (t$6 === "error") {
|
|
972
|
+
this[E$1] = e$6;
|
|
973
|
+
const f$4 = super.emit("error", e$6);
|
|
974
|
+
return this[a$10](), f$4;
|
|
975
|
+
} else if (t$6 === "resume") {
|
|
976
|
+
const f$4 = super.emit("resume");
|
|
977
|
+
return this[a$10](), f$4;
|
|
978
|
+
} else if (t$6 === "finish" || t$6 === "prefinish") {
|
|
979
|
+
const f$4 = super.emit(t$6);
|
|
980
|
+
return this.removeAllListeners(t$6), f$4;
|
|
1839
981
|
}
|
|
1840
|
-
const l$
|
|
1841
|
-
return this[a$
|
|
1842
|
-
}
|
|
1843
|
-
[D
|
|
1844
|
-
for (const i$
|
|
1845
|
-
const e$
|
|
1846
|
-
return this[a$
|
|
1847
|
-
}
|
|
1848
|
-
[F$
|
|
1849
|
-
this[c$
|
|
1850
|
-
}
|
|
1851
|
-
[R$
|
|
1852
|
-
if (this[m$
|
|
1853
|
-
const e$
|
|
1854
|
-
if (e$
|
|
1855
|
-
for (const i$
|
|
1856
|
-
super.emit("data", e$
|
|
982
|
+
const l$2 = super.emit(t$6, e$6, ...i$7);
|
|
983
|
+
return this[a$10](), l$2;
|
|
984
|
+
}
|
|
985
|
+
[D](t$6) {
|
|
986
|
+
for (const i$7 of this.pipes) i$7.dest.write(t$6) === false && this.pause();
|
|
987
|
+
const e$6 = super.emit("data", t$6);
|
|
988
|
+
return this[a$10](), e$6;
|
|
989
|
+
}
|
|
990
|
+
[F$3]() {
|
|
991
|
+
this[c$5] || (this[c$5] = true, this.readable = false, this[d] ? b(() => this[R$2]()) : this[R$2]());
|
|
992
|
+
}
|
|
993
|
+
[R$2]() {
|
|
994
|
+
if (this[m$3]) {
|
|
995
|
+
const e$6 = this[m$3].end();
|
|
996
|
+
if (e$6) {
|
|
997
|
+
for (const i$7 of this.pipes) i$7.dest.write(e$6);
|
|
998
|
+
super.emit("data", e$6);
|
|
1857
999
|
}
|
|
1858
1000
|
}
|
|
1859
|
-
for (const e$
|
|
1860
|
-
const t$
|
|
1861
|
-
return this.removeAllListeners("end"), t$
|
|
1001
|
+
for (const e$6 of this.pipes) e$6.end();
|
|
1002
|
+
const t$6 = super.emit("end");
|
|
1003
|
+
return this.removeAllListeners("end"), t$6;
|
|
1862
1004
|
}
|
|
1863
1005
|
collect() {
|
|
1864
|
-
const t$
|
|
1865
|
-
this[r] || (t$
|
|
1866
|
-
const e$
|
|
1867
|
-
return this.on("data", (i$
|
|
1868
|
-
t$
|
|
1869
|
-
}), e$
|
|
1006
|
+
const t$6 = [];
|
|
1007
|
+
this[r] || (t$6.dataLength = 0);
|
|
1008
|
+
const e$6 = this.promise();
|
|
1009
|
+
return this.on("data", (i$7) => {
|
|
1010
|
+
t$6.push(i$7), this[r] || (t$6.dataLength += i$7.length);
|
|
1011
|
+
}), e$6.then(() => t$6);
|
|
1870
1012
|
}
|
|
1871
1013
|
concat() {
|
|
1872
|
-
return this[r] ? Promise.reject(/* @__PURE__ */ new Error("cannot concat in objectMode")) : this.collect().then((t$
|
|
1014
|
+
return this[r] ? Promise.reject(/* @__PURE__ */ new Error("cannot concat in objectMode")) : this.collect().then((t$6) => this[r] ? Promise.reject(/* @__PURE__ */ new Error("cannot concat in objectMode")) : this[h] ? t$6.join("") : Buffer.concat(t$6, t$6.dataLength));
|
|
1873
1015
|
}
|
|
1874
1016
|
promise() {
|
|
1875
|
-
return new Promise((t$
|
|
1876
|
-
this.on(n$4, () => e$
|
|
1017
|
+
return new Promise((t$6, e$6) => {
|
|
1018
|
+
this.on(n$4, () => e$6(/* @__PURE__ */ new Error("stream destroyed"))), this.on("error", (i$7) => e$6(i$7)), this.on("end", () => t$6());
|
|
1877
1019
|
});
|
|
1878
1020
|
}
|
|
1879
1021
|
[$]() {
|
|
1880
1022
|
return { next: () => {
|
|
1881
|
-
const e$
|
|
1882
|
-
if (e$
|
|
1023
|
+
const e$6 = this.read();
|
|
1024
|
+
if (e$6 !== null) return Promise.resolve({
|
|
1883
1025
|
done: false,
|
|
1884
|
-
value: e$
|
|
1026
|
+
value: e$6
|
|
1885
1027
|
});
|
|
1886
|
-
if (this[u$
|
|
1887
|
-
let i$
|
|
1888
|
-
const f$
|
|
1889
|
-
this.removeListener("data", A
|
|
1890
|
-
}, A
|
|
1891
|
-
this.removeListener("error", f$
|
|
1892
|
-
value: g
|
|
1893
|
-
done: !!this[u$
|
|
1028
|
+
if (this[u$5]) return Promise.resolve({ done: true });
|
|
1029
|
+
let i$7 = null, l$2 = null;
|
|
1030
|
+
const f$4 = (g) => {
|
|
1031
|
+
this.removeListener("data", A), this.removeListener("end", O$3), l$2(g);
|
|
1032
|
+
}, A = (g) => {
|
|
1033
|
+
this.removeListener("error", f$4), this.removeListener("end", O$3), this.pause(), i$7({
|
|
1034
|
+
value: g,
|
|
1035
|
+
done: !!this[u$5]
|
|
1894
1036
|
});
|
|
1895
|
-
}, O$
|
|
1896
|
-
this.removeListener("error", f$
|
|
1897
|
-
}, W
|
|
1898
|
-
return new Promise((g
|
|
1899
|
-
l$
|
|
1037
|
+
}, O$3 = () => {
|
|
1038
|
+
this.removeListener("error", f$4), this.removeListener("data", A), i$7({ done: true });
|
|
1039
|
+
}, W = () => f$4(/* @__PURE__ */ new Error("stream destroyed"));
|
|
1040
|
+
return new Promise((g, z$1) => {
|
|
1041
|
+
l$2 = z$1, i$7 = g, this.once(n$4, W), this.once("error", f$4), this.once("end", O$3), this.once("data", A);
|
|
1900
1042
|
});
|
|
1901
1043
|
} };
|
|
1902
1044
|
}
|
|
1903
|
-
[G$
|
|
1045
|
+
[G$1]() {
|
|
1904
1046
|
return { next: () => {
|
|
1905
|
-
const e$
|
|
1047
|
+
const e$6 = this.read();
|
|
1906
1048
|
return {
|
|
1907
|
-
value: e$
|
|
1908
|
-
done: e$
|
|
1049
|
+
value: e$6,
|
|
1050
|
+
done: e$6 === null
|
|
1909
1051
|
};
|
|
1910
1052
|
} };
|
|
1911
1053
|
}
|
|
1912
|
-
destroy(t$
|
|
1913
|
-
return this[n$4] ? (t$
|
|
1054
|
+
destroy(t$6) {
|
|
1055
|
+
return this[n$4] ? (t$6 ? this.emit("error", t$6) : this.emit(n$4), this) : (this[n$4] = true, this.buffer.length = 0, this[s$7] = 0, typeof this.close == "function" && !this[w$2] && this.close(), t$6 ? this.emit("error", t$6) : this.emit(n$4), this);
|
|
1914
1056
|
}
|
|
1915
|
-
static isStream(t$
|
|
1916
|
-
return !!t$
|
|
1057
|
+
static isStream(t$6) {
|
|
1058
|
+
return !!t$6 && (t$6 instanceof q$1 || t$6 instanceof x || t$6 instanceof Y && (typeof t$6.pipe == "function" || typeof t$6.write == "function" && typeof t$6.end == "function"));
|
|
1917
1059
|
}
|
|
1918
1060
|
}, j;
|
|
1919
1061
|
}
|
|
@@ -1921,151 +1063,151 @@ var C;
|
|
|
1921
1063
|
function J() {
|
|
1922
1064
|
if (C) return i$3;
|
|
1923
1065
|
C = 1;
|
|
1924
|
-
const w$
|
|
1925
|
-
class d
|
|
1926
|
-
constructor(s$
|
|
1927
|
-
super("zlib: " + s$
|
|
1066
|
+
const w$2 = j$1, n$4 = P.Buffer, z$1 = O$2, u$5 = i$3.constants = T(), L = tt(), E$1 = n$4.concat, c$5 = Symbol("_superWrite");
|
|
1067
|
+
class d extends Error {
|
|
1068
|
+
constructor(s$7) {
|
|
1069
|
+
super("zlib: " + s$7.message), this.code = s$7.code, this.errno = s$7.errno, this.code || (this.code = "ZLIB_ERROR"), this.message = "zlib: " + s$7.message, Error.captureStackTrace(this, this.constructor);
|
|
1928
1070
|
}
|
|
1929
1071
|
get name() {
|
|
1930
1072
|
return "ZlibError";
|
|
1931
1073
|
}
|
|
1932
1074
|
}
|
|
1933
|
-
const Z = Symbol("opts"), p$
|
|
1934
|
-
class x
|
|
1935
|
-
constructor(s$
|
|
1936
|
-
if (!s$
|
|
1937
|
-
super(s$
|
|
1075
|
+
const Z = Symbol("opts"), p$1 = Symbol("flushFlag"), I = Symbol("finishFlushFlag"), y$3 = Symbol("fullFlushFlag"), t$6 = Symbol("handle"), _$1 = Symbol("onError"), f$4 = Symbol("sawError"), F$3 = Symbol("level"), S$1 = Symbol("strategy"), g = Symbol("ended");
|
|
1076
|
+
class x extends L {
|
|
1077
|
+
constructor(s$7, e$6) {
|
|
1078
|
+
if (!s$7 || typeof s$7 != "object") throw new TypeError("invalid options for ZlibBase constructor");
|
|
1079
|
+
super(s$7), this[f$4] = false, this[g] = false, this[Z] = s$7, this[p$1] = s$7.flush, this[I] = s$7.finishFlush;
|
|
1938
1080
|
try {
|
|
1939
|
-
this[t$
|
|
1940
|
-
} catch (i$
|
|
1941
|
-
throw new d
|
|
1081
|
+
this[t$6] = new z$1[e$6](s$7);
|
|
1082
|
+
} catch (i$7) {
|
|
1083
|
+
throw new d(i$7);
|
|
1942
1084
|
}
|
|
1943
|
-
this[_$
|
|
1944
|
-
this[f$
|
|
1945
|
-
}, this[t$
|
|
1085
|
+
this[_$1] = (i$7) => {
|
|
1086
|
+
this[f$4] || (this[f$4] = true, this.close(), this.emit("error", i$7));
|
|
1087
|
+
}, this[t$6].on("error", (i$7) => this[_$1](new d(i$7))), this.once("end", () => this.close);
|
|
1946
1088
|
}
|
|
1947
1089
|
close() {
|
|
1948
|
-
this[t$
|
|
1090
|
+
this[t$6] && (this[t$6].close(), this[t$6] = null, this.emit("close"));
|
|
1949
1091
|
}
|
|
1950
1092
|
reset() {
|
|
1951
|
-
if (!this[f$
|
|
1093
|
+
if (!this[f$4]) return w$2(this[t$6], "zlib binding closed"), this[t$6].reset();
|
|
1952
1094
|
}
|
|
1953
|
-
flush(s$
|
|
1954
|
-
this.ended || (typeof s$
|
|
1095
|
+
flush(s$7) {
|
|
1096
|
+
this.ended || (typeof s$7 != "number" && (s$7 = this[y$3]), this.write(Object.assign(n$4.alloc(0), { [p$1]: s$7 })));
|
|
1955
1097
|
}
|
|
1956
|
-
end(s$
|
|
1957
|
-
return s$
|
|
1098
|
+
end(s$7, e$6, i$7) {
|
|
1099
|
+
return s$7 && this.write(s$7, e$6), this.flush(this[I]), this[g] = true, super.end(null, null, i$7);
|
|
1958
1100
|
}
|
|
1959
1101
|
get ended() {
|
|
1960
|
-
return this[g
|
|
1961
|
-
}
|
|
1962
|
-
write(s$
|
|
1963
|
-
if (typeof e$
|
|
1964
|
-
w$
|
|
1965
|
-
const m$
|
|
1966
|
-
m$
|
|
1967
|
-
const G$
|
|
1968
|
-
this[t$
|
|
1969
|
-
let h
|
|
1102
|
+
return this[g];
|
|
1103
|
+
}
|
|
1104
|
+
write(s$7, e$6, i$7) {
|
|
1105
|
+
if (typeof e$6 == "function" && (i$7 = e$6, e$6 = "utf8"), typeof s$7 == "string" && (s$7 = n$4.from(s$7, e$6)), this[f$4]) return;
|
|
1106
|
+
w$2(this[t$6], "zlib binding closed");
|
|
1107
|
+
const m$3 = this[t$6]._handle, R$2 = m$3.close;
|
|
1108
|
+
m$3.close = () => {};
|
|
1109
|
+
const G$1 = this[t$6].close;
|
|
1110
|
+
this[t$6].close = () => {}, n$4.concat = (l$2) => l$2;
|
|
1111
|
+
let h;
|
|
1970
1112
|
try {
|
|
1971
|
-
const l$
|
|
1972
|
-
h
|
|
1973
|
-
} catch (l$
|
|
1974
|
-
n$4.concat = E$
|
|
1113
|
+
const l$2 = typeof s$7[p$1] == "number" ? s$7[p$1] : this[p$1];
|
|
1114
|
+
h = this[t$6]._processChunk(s$7, l$2), n$4.concat = E$1;
|
|
1115
|
+
} catch (l$2) {
|
|
1116
|
+
n$4.concat = E$1, this[_$1](new d(l$2));
|
|
1975
1117
|
} finally {
|
|
1976
|
-
this[t$
|
|
1118
|
+
this[t$6] && (this[t$6]._handle = m$3, m$3.close = R$2, this[t$6].close = G$1, this[t$6].removeAllListeners("error"));
|
|
1977
1119
|
}
|
|
1978
|
-
this[t$
|
|
1979
|
-
let b
|
|
1980
|
-
if (h
|
|
1981
|
-
b
|
|
1982
|
-
for (let l$
|
|
1983
|
-
} else b
|
|
1984
|
-
return i$
|
|
1985
|
-
}
|
|
1986
|
-
[c$
|
|
1987
|
-
return super.write(s$
|
|
1988
|
-
}
|
|
1989
|
-
}
|
|
1990
|
-
class a$
|
|
1991
|
-
constructor(s$
|
|
1992
|
-
s$
|
|
1993
|
-
}
|
|
1994
|
-
params(s$
|
|
1995
|
-
if (!this[f$
|
|
1996
|
-
if (!this[t$
|
|
1997
|
-
if (!this[t$
|
|
1998
|
-
if (this[F$
|
|
1999
|
-
this.flush(u$
|
|
2000
|
-
const i$
|
|
2001
|
-
this[t$
|
|
2002
|
-
this.flush(m$
|
|
1120
|
+
this[t$6] && this[t$6].on("error", (l$2) => this[_$1](new d(l$2)));
|
|
1121
|
+
let b;
|
|
1122
|
+
if (h) if (Array.isArray(h) && h.length > 0) {
|
|
1123
|
+
b = this[c$5](n$4.from(h[0]));
|
|
1124
|
+
for (let l$2 = 1; l$2 < h.length; l$2++) b = this[c$5](h[l$2]);
|
|
1125
|
+
} else b = this[c$5](n$4.from(h));
|
|
1126
|
+
return i$7 && i$7(), b;
|
|
1127
|
+
}
|
|
1128
|
+
[c$5](s$7) {
|
|
1129
|
+
return super.write(s$7);
|
|
1130
|
+
}
|
|
1131
|
+
}
|
|
1132
|
+
class a$10 extends x {
|
|
1133
|
+
constructor(s$7, e$6) {
|
|
1134
|
+
s$7 = s$7 || {}, s$7.flush = s$7.flush || u$5.Z_NO_FLUSH, s$7.finishFlush = s$7.finishFlush || u$5.Z_FINISH, super(s$7, e$6), this[y$3] = u$5.Z_FULL_FLUSH, this[F$3] = s$7.level, this[S$1] = s$7.strategy;
|
|
1135
|
+
}
|
|
1136
|
+
params(s$7, e$6) {
|
|
1137
|
+
if (!this[f$4]) {
|
|
1138
|
+
if (!this[t$6]) throw new Error("cannot switch params when binding is closed");
|
|
1139
|
+
if (!this[t$6].params) throw new Error("not supported in this implementation");
|
|
1140
|
+
if (this[F$3] !== s$7 || this[S$1] !== e$6) {
|
|
1141
|
+
this.flush(u$5.Z_SYNC_FLUSH), w$2(this[t$6], "zlib binding closed");
|
|
1142
|
+
const i$7 = this[t$6].flush;
|
|
1143
|
+
this[t$6].flush = (m$3, R$2) => {
|
|
1144
|
+
this.flush(m$3), R$2();
|
|
2003
1145
|
};
|
|
2004
1146
|
try {
|
|
2005
|
-
this[t$
|
|
1147
|
+
this[t$6].params(s$7, e$6);
|
|
2006
1148
|
} finally {
|
|
2007
|
-
this[t$
|
|
1149
|
+
this[t$6].flush = i$7;
|
|
2008
1150
|
}
|
|
2009
|
-
this[t$
|
|
1151
|
+
this[t$6] && (this[F$3] = s$7, this[S$1] = e$6);
|
|
2010
1152
|
}
|
|
2011
1153
|
}
|
|
2012
1154
|
}
|
|
2013
1155
|
}
|
|
2014
|
-
class q$
|
|
2015
|
-
constructor(s$
|
|
2016
|
-
super(s$
|
|
1156
|
+
class q$1 extends a$10 {
|
|
1157
|
+
constructor(s$7) {
|
|
1158
|
+
super(s$7, "Deflate");
|
|
2017
1159
|
}
|
|
2018
1160
|
}
|
|
2019
|
-
class D
|
|
2020
|
-
constructor(s$
|
|
2021
|
-
super(s$
|
|
1161
|
+
class D extends a$10 {
|
|
1162
|
+
constructor(s$7) {
|
|
1163
|
+
super(s$7, "Inflate");
|
|
2022
1164
|
}
|
|
2023
1165
|
}
|
|
2024
|
-
const B
|
|
2025
|
-
class $ extends a$
|
|
2026
|
-
constructor(s$
|
|
2027
|
-
super(s$
|
|
1166
|
+
const B = Symbol("_portable");
|
|
1167
|
+
class $ extends a$10 {
|
|
1168
|
+
constructor(s$7) {
|
|
1169
|
+
super(s$7, "Gzip"), this[B] = s$7 && !!s$7.portable;
|
|
2028
1170
|
}
|
|
2029
|
-
[c$
|
|
2030
|
-
return this[B
|
|
1171
|
+
[c$5](s$7) {
|
|
1172
|
+
return this[B] ? (this[B] = false, s$7[9] = 255, super[c$5](s$7)) : super[c$5](s$7);
|
|
2031
1173
|
}
|
|
2032
1174
|
}
|
|
2033
|
-
class N
|
|
2034
|
-
constructor(s$
|
|
2035
|
-
super(s$
|
|
1175
|
+
class N extends a$10 {
|
|
1176
|
+
constructor(s$7) {
|
|
1177
|
+
super(s$7, "Gunzip");
|
|
2036
1178
|
}
|
|
2037
1179
|
}
|
|
2038
|
-
class H$
|
|
2039
|
-
constructor(s$
|
|
2040
|
-
super(s$
|
|
1180
|
+
class H$2 extends a$10 {
|
|
1181
|
+
constructor(s$7) {
|
|
1182
|
+
super(s$7, "DeflateRaw");
|
|
2041
1183
|
}
|
|
2042
1184
|
}
|
|
2043
|
-
let T$1
|
|
2044
|
-
constructor(s$
|
|
2045
|
-
super(s$
|
|
1185
|
+
let T$1 = class T$2 extends a$10 {
|
|
1186
|
+
constructor(s$7) {
|
|
1187
|
+
super(s$7, "InflateRaw");
|
|
2046
1188
|
}
|
|
2047
1189
|
};
|
|
2048
|
-
class U
|
|
2049
|
-
constructor(s$
|
|
2050
|
-
super(s$
|
|
1190
|
+
class U extends a$10 {
|
|
1191
|
+
constructor(s$7) {
|
|
1192
|
+
super(s$7, "Unzip");
|
|
2051
1193
|
}
|
|
2052
1194
|
}
|
|
2053
|
-
class O$
|
|
2054
|
-
constructor(s$
|
|
2055
|
-
s$
|
|
1195
|
+
class O$3 extends x {
|
|
1196
|
+
constructor(s$7, e$6) {
|
|
1197
|
+
s$7 = s$7 || {}, s$7.flush = s$7.flush || u$5.BROTLI_OPERATION_PROCESS, s$7.finishFlush = s$7.finishFlush || u$5.BROTLI_OPERATION_FINISH, super(s$7, e$6), this[y$3] = u$5.BROTLI_OPERATION_FLUSH;
|
|
2056
1198
|
}
|
|
2057
1199
|
}
|
|
2058
|
-
class v$
|
|
2059
|
-
constructor(s$
|
|
2060
|
-
super(s$
|
|
1200
|
+
class v$2 extends O$3 {
|
|
1201
|
+
constructor(s$7) {
|
|
1202
|
+
super(s$7, "BrotliCompress");
|
|
2061
1203
|
}
|
|
2062
1204
|
}
|
|
2063
|
-
class A
|
|
2064
|
-
constructor(s$
|
|
2065
|
-
super(s$
|
|
1205
|
+
class A extends O$3 {
|
|
1206
|
+
constructor(s$7) {
|
|
1207
|
+
super(s$7, "BrotliDecompress");
|
|
2066
1208
|
}
|
|
2067
1209
|
}
|
|
2068
|
-
return i$3.Deflate = q$
|
|
1210
|
+
return i$3.Deflate = q$1, i$3.Inflate = D, i$3.Gzip = $, i$3.Gunzip = N, i$3.DeflateRaw = H$2, i$3.InflateRaw = T$1, i$3.Unzip = U, typeof z$1.BrotliCompress == "function" ? (i$3.BrotliCompress = v$2, i$3.BrotliDecompress = A) : i$3.BrotliCompress = i$3.BrotliDecompress = class {
|
|
2069
1211
|
constructor() {
|
|
2070
1212
|
throw new Error("Brotli is not supported in this version of Node.js");
|
|
2071
1213
|
}
|
|
@@ -2075,174 +1217,174 @@ var O$1, F$2;
|
|
|
2075
1217
|
function rt() {
|
|
2076
1218
|
if (F$2) return O$1;
|
|
2077
1219
|
F$2 = 1;
|
|
2078
|
-
const P$
|
|
2079
|
-
return O$1 = P$
|
|
2080
|
-
constructor(t$
|
|
2081
|
-
t$
|
|
2082
|
-
(this[h
|
|
2083
|
-
}), t$
|
|
1220
|
+
const P$1 = c$4(), $ = E(), v$2 = nt, W = c$3(), G$1 = 1024 * 1024, k$1 = u$3(), C$1 = f$2(), x = J(), { nextTick: j$2 } = nt$1, B = Buffer.from([31, 139]), h = Symbol("state"), d = Symbol("writeEntry"), a$10 = Symbol("readEntry"), I = Symbol("nextEntry"), U = Symbol("processEntry"), l$2 = Symbol("extendedHeader"), y$3 = Symbol("globalExtendedHeader"), c$5 = Symbol("meta"), H$2 = Symbol("emitMeta"), n$4 = Symbol("buffer"), f$4 = Symbol("queue"), u$5 = Symbol("ended"), L = Symbol("emittedEnd"), b = Symbol("emit"), r = Symbol("unzip"), _$1 = Symbol("consumeChunk"), g = Symbol("consumeChunkSub"), q$1 = Symbol("consumeBody"), z$1 = Symbol("consumeMeta"), Y = Symbol("consumeHeader"), N = Symbol("consuming"), D = Symbol("bufferConcat"), M = Symbol("maybeEnd"), S$1 = Symbol("writing"), m$3 = Symbol("aborted"), T$1 = Symbol("onDone"), E$1 = Symbol("sawValidEntry"), R$2 = Symbol("sawNullBlock"), A = Symbol("sawEOF"), V = Symbol("closeStream"), K = (X$2) => true;
|
|
1221
|
+
return O$1 = P$1(class extends v$2 {
|
|
1222
|
+
constructor(t$6) {
|
|
1223
|
+
t$6 = t$6 || {}, super(t$6), this.file = t$6.file || "", this[E$1] = null, this.on(T$1, (s$7) => {
|
|
1224
|
+
(this[h] === "begin" || this[E$1] === false) && this.warn("TAR_BAD_ARCHIVE", "Unrecognized archive format");
|
|
1225
|
+
}), t$6.ondone ? this.on(T$1, t$6.ondone) : this.on(T$1, (s$7) => {
|
|
2084
1226
|
this.emit("prefinish"), this.emit("finish"), this.emit("end");
|
|
2085
|
-
}), this.strict = !!t$
|
|
2086
|
-
const i$
|
|
2087
|
-
this.brotli = !t$
|
|
1227
|
+
}), this.strict = !!t$6.strict, this.maxMetaEntrySize = t$6.maxMetaEntrySize || G$1, this.filter = typeof t$6.filter == "function" ? t$6.filter : K;
|
|
1228
|
+
const i$7 = t$6.file && (t$6.file.endsWith(".tar.br") || t$6.file.endsWith(".tbr"));
|
|
1229
|
+
this.brotli = !t$6.gzip && t$6.brotli !== void 0 ? t$6.brotli : i$7 ? void 0 : false, this.writable = true, this.readable = false, this[f$4] = new W(), this[n$4] = null, this[a$10] = null, this[d] = null, this[h] = "begin", this[c$5] = "", this[l$2] = null, this[y$3] = null, this[u$5] = false, this[r] = null, this[m$3] = false, this[R$2] = false, this[A] = false, this.on("end", () => this[V]()), typeof t$6.onwarn == "function" && this.on("warn", t$6.onwarn), typeof t$6.onentry == "function" && this.on("entry", t$6.onentry);
|
|
2088
1230
|
}
|
|
2089
|
-
[Y](t$
|
|
2090
|
-
this[E$1
|
|
2091
|
-
let s$
|
|
1231
|
+
[Y](t$6, i$7) {
|
|
1232
|
+
this[E$1] === null && (this[E$1] = false);
|
|
1233
|
+
let s$7;
|
|
2092
1234
|
try {
|
|
2093
|
-
s$
|
|
2094
|
-
} catch (o$
|
|
2095
|
-
return this.warn("TAR_ENTRY_INVALID", o$
|
|
1235
|
+
s$7 = new $(t$6, i$7, this[l$2], this[y$3]);
|
|
1236
|
+
} catch (o$5) {
|
|
1237
|
+
return this.warn("TAR_ENTRY_INVALID", o$5);
|
|
2096
1238
|
}
|
|
2097
|
-
if (s$
|
|
2098
|
-
else if (this[R$
|
|
2099
|
-
else if (!s$
|
|
1239
|
+
if (s$7.nullBlock) this[R$2] ? (this[A] = true, this[h] === "begin" && (this[h] = "header"), this[b]("eof")) : (this[R$2] = true, this[b]("nullBlock"));
|
|
1240
|
+
else if (this[R$2] = false, !s$7.cksumValid) this.warn("TAR_ENTRY_INVALID", "checksum failure", { header: s$7 });
|
|
1241
|
+
else if (!s$7.path) this.warn("TAR_ENTRY_INVALID", "path is required", { header: s$7 });
|
|
2100
1242
|
else {
|
|
2101
|
-
const o$
|
|
2102
|
-
if (/^(Symbolic)?Link$/.test(o$
|
|
2103
|
-
else if (!/^(Symbolic)?Link$/.test(o$
|
|
1243
|
+
const o$5 = s$7.type;
|
|
1244
|
+
if (/^(Symbolic)?Link$/.test(o$5) && !s$7.linkpath) this.warn("TAR_ENTRY_INVALID", "linkpath required", { header: s$7 });
|
|
1245
|
+
else if (!/^(Symbolic)?Link$/.test(o$5) && s$7.linkpath) this.warn("TAR_ENTRY_INVALID", "linkpath forbidden", { header: s$7 });
|
|
2104
1246
|
else {
|
|
2105
|
-
const e$
|
|
2106
|
-
if (!this[E$1
|
|
2107
|
-
const w$
|
|
2108
|
-
e$
|
|
1247
|
+
const e$6 = this[d] = new k$1(s$7, this[l$2], this[y$3]);
|
|
1248
|
+
if (!this[E$1]) if (e$6.remain) {
|
|
1249
|
+
const w$2 = () => {
|
|
1250
|
+
e$6.invalid || (this[E$1] = true);
|
|
2109
1251
|
};
|
|
2110
|
-
e$
|
|
2111
|
-
} else this[E$1
|
|
2112
|
-
e$
|
|
1252
|
+
e$6.on("end", w$2);
|
|
1253
|
+
} else this[E$1] = true;
|
|
1254
|
+
e$6.meta ? e$6.size > this.maxMetaEntrySize ? (e$6.ignore = true, this[b]("ignoredEntry", e$6), this[h] = "ignore", e$6.resume()) : e$6.size > 0 && (this[c$5] = "", e$6.on("data", (w$2) => this[c$5] += w$2), this[h] = "meta") : (this[l$2] = null, e$6.ignore = e$6.ignore || !this.filter(e$6.path, e$6), e$6.ignore ? (this[b]("ignoredEntry", e$6), this[h] = e$6.remain ? "ignore" : "header", e$6.resume()) : (e$6.remain ? this[h] = "body" : (this[h] = "header", e$6.end()), this[a$10] ? this[f$4].push(e$6) : (this[f$4].push(e$6), this[I]())));
|
|
2113
1255
|
}
|
|
2114
1256
|
}
|
|
2115
1257
|
}
|
|
2116
|
-
[V
|
|
2117
|
-
j$
|
|
1258
|
+
[V]() {
|
|
1259
|
+
j$2(() => this.emit("close"));
|
|
2118
1260
|
}
|
|
2119
|
-
[U
|
|
2120
|
-
let i$
|
|
2121
|
-
return t$
|
|
1261
|
+
[U](t$6) {
|
|
1262
|
+
let i$7 = true;
|
|
1263
|
+
return t$6 ? Array.isArray(t$6) ? this.emit.apply(this, t$6) : (this[a$10] = t$6, this.emit("entry", t$6), t$6.emittedEnd || (t$6.on("end", (s$7) => this[I]()), i$7 = false)) : (this[a$10] = null, i$7 = false), i$7;
|
|
2122
1264
|
}
|
|
2123
|
-
[I
|
|
1265
|
+
[I]() {
|
|
2124
1266
|
do ;
|
|
2125
|
-
while (this[U
|
|
2126
|
-
if (!this[f$
|
|
2127
|
-
const t$
|
|
2128
|
-
!t$
|
|
1267
|
+
while (this[U](this[f$4].shift()));
|
|
1268
|
+
if (!this[f$4].length) {
|
|
1269
|
+
const t$6 = this[a$10];
|
|
1270
|
+
!t$6 || t$6.flowing || t$6.size === t$6.remain ? this[S$1] || this.emit("drain") : t$6.once("drain", (s$7) => this.emit("drain"));
|
|
2129
1271
|
}
|
|
2130
1272
|
}
|
|
2131
|
-
[q$
|
|
2132
|
-
const s$
|
|
2133
|
-
return s$
|
|
1273
|
+
[q$1](t$6, i$7) {
|
|
1274
|
+
const s$7 = this[d], o$5 = s$7.blockRemain, e$6 = o$5 >= t$6.length && i$7 === 0 ? t$6 : t$6.slice(i$7, i$7 + o$5);
|
|
1275
|
+
return s$7.write(e$6), s$7.blockRemain || (this[h] = "header", this[d] = null, s$7.end()), e$6.length;
|
|
2134
1276
|
}
|
|
2135
|
-
[z$
|
|
2136
|
-
const s$
|
|
2137
|
-
return this[d
|
|
1277
|
+
[z$1](t$6, i$7) {
|
|
1278
|
+
const s$7 = this[d], o$5 = this[q$1](t$6, i$7);
|
|
1279
|
+
return this[d] || this[H$2](s$7), o$5;
|
|
2138
1280
|
}
|
|
2139
|
-
[b
|
|
2140
|
-
!this[f$
|
|
2141
|
-
t$
|
|
2142
|
-
i$
|
|
2143
|
-
s$
|
|
1281
|
+
[b](t$6, i$7, s$7) {
|
|
1282
|
+
!this[f$4].length && !this[a$10] ? this.emit(t$6, i$7, s$7) : this[f$4].push([
|
|
1283
|
+
t$6,
|
|
1284
|
+
i$7,
|
|
1285
|
+
s$7
|
|
2144
1286
|
]);
|
|
2145
1287
|
}
|
|
2146
|
-
[H$
|
|
2147
|
-
switch (this[b
|
|
1288
|
+
[H$2](t$6) {
|
|
1289
|
+
switch (this[b]("meta", this[c$5]), t$6.type) {
|
|
2148
1290
|
case "ExtendedHeader":
|
|
2149
1291
|
case "OldExtendedHeader":
|
|
2150
|
-
this[l$
|
|
1292
|
+
this[l$2] = C$1.parse(this[c$5], this[l$2], false);
|
|
2151
1293
|
break;
|
|
2152
1294
|
case "GlobalExtendedHeader":
|
|
2153
|
-
this[y$
|
|
1295
|
+
this[y$3] = C$1.parse(this[c$5], this[y$3], true);
|
|
2154
1296
|
break;
|
|
2155
1297
|
case "NextFileHasLongPath":
|
|
2156
1298
|
case "OldGnuLongPath":
|
|
2157
|
-
this[l$
|
|
1299
|
+
this[l$2] = this[l$2] || Object.create(null), this[l$2].path = this[c$5].replace(/\0.*/, "");
|
|
2158
1300
|
break;
|
|
2159
1301
|
case "NextFileHasLongLinkpath":
|
|
2160
|
-
this[l$
|
|
1302
|
+
this[l$2] = this[l$2] || Object.create(null), this[l$2].linkpath = this[c$5].replace(/\0.*/, "");
|
|
2161
1303
|
break;
|
|
2162
|
-
default: throw new Error("unknown meta: " + t$
|
|
1304
|
+
default: throw new Error("unknown meta: " + t$6.type);
|
|
2163
1305
|
}
|
|
2164
1306
|
}
|
|
2165
|
-
abort(t$
|
|
2166
|
-
this[m$
|
|
2167
|
-
}
|
|
2168
|
-
write(t$
|
|
2169
|
-
if (this[m$
|
|
2170
|
-
if ((this[r] === null || this.brotli === void 0 && this[r] === false) && t$
|
|
2171
|
-
if (this[n$4] && (t$
|
|
2172
|
-
for (let e$
|
|
2173
|
-
const o$
|
|
2174
|
-
if (this[r] === false && o$
|
|
2175
|
-
else return this[n$4] = t$
|
|
1307
|
+
abort(t$6) {
|
|
1308
|
+
this[m$3] = true, this.emit("abort", t$6), this.warn("TAR_ABORT", t$6, { recoverable: false });
|
|
1309
|
+
}
|
|
1310
|
+
write(t$6) {
|
|
1311
|
+
if (this[m$3]) return;
|
|
1312
|
+
if ((this[r] === null || this.brotli === void 0 && this[r] === false) && t$6) {
|
|
1313
|
+
if (this[n$4] && (t$6 = Buffer.concat([this[n$4], t$6]), this[n$4] = null), t$6.length < B.length) return this[n$4] = t$6, true;
|
|
1314
|
+
for (let e$6 = 0; this[r] === null && e$6 < B.length; e$6++) t$6[e$6] !== B[e$6] && (this[r] = false);
|
|
1315
|
+
const o$5 = this.brotli === void 0;
|
|
1316
|
+
if (this[r] === false && o$5) if (t$6.length < 512) if (this[u$5]) this.brotli = true;
|
|
1317
|
+
else return this[n$4] = t$6, true;
|
|
2176
1318
|
else try {
|
|
2177
|
-
new $(t$
|
|
1319
|
+
new $(t$6.slice(0, 512)), this.brotli = !1;
|
|
2178
1320
|
} catch {
|
|
2179
1321
|
this.brotli = true;
|
|
2180
1322
|
}
|
|
2181
1323
|
if (this[r] === null || this[r] === false && this.brotli) {
|
|
2182
|
-
const e$
|
|
2183
|
-
this[u$
|
|
2184
|
-
this[u$
|
|
2185
|
-
}), this[S$
|
|
2186
|
-
const w$
|
|
2187
|
-
return this[S$
|
|
1324
|
+
const e$6 = this[u$5];
|
|
1325
|
+
this[u$5] = false, this[r] = this[r] === null ? new x.Unzip() : new x.BrotliDecompress(), this[r].on("data", (p$1) => this[_$1](p$1)), this[r].on("error", (p$1) => this.abort(p$1)), this[r].on("end", (p$1) => {
|
|
1326
|
+
this[u$5] = true, this[_$1]();
|
|
1327
|
+
}), this[S$1] = true;
|
|
1328
|
+
const w$2 = this[r][e$6 ? "end" : "write"](t$6);
|
|
1329
|
+
return this[S$1] = false, w$2;
|
|
2188
1330
|
}
|
|
2189
1331
|
}
|
|
2190
|
-
this[S$
|
|
2191
|
-
const s$
|
|
2192
|
-
return !s$
|
|
1332
|
+
this[S$1] = true, this[r] ? this[r].write(t$6) : this[_$1](t$6), this[S$1] = false;
|
|
1333
|
+
const s$7 = this[f$4].length ? false : this[a$10] ? this[a$10].flowing : true;
|
|
1334
|
+
return !s$7 && !this[f$4].length && this[a$10].once("drain", (o$5) => this.emit("drain")), s$7;
|
|
2193
1335
|
}
|
|
2194
|
-
[D
|
|
2195
|
-
t$
|
|
1336
|
+
[D](t$6) {
|
|
1337
|
+
t$6 && !this[m$3] && (this[n$4] = this[n$4] ? Buffer.concat([this[n$4], t$6]) : t$6);
|
|
2196
1338
|
}
|
|
2197
|
-
[M
|
|
2198
|
-
if (this[u$
|
|
1339
|
+
[M]() {
|
|
1340
|
+
if (this[u$5] && !this[L] && !this[m$3] && !this[N]) {
|
|
2199
1341
|
this[L] = true;
|
|
2200
|
-
const t$
|
|
2201
|
-
if (t$
|
|
2202
|
-
const i$
|
|
2203
|
-
this.warn("TAR_BAD_ARCHIVE", `Truncated input (needed ${t$
|
|
1342
|
+
const t$6 = this[d];
|
|
1343
|
+
if (t$6 && t$6.blockRemain) {
|
|
1344
|
+
const i$7 = this[n$4] ? this[n$4].length : 0;
|
|
1345
|
+
this.warn("TAR_BAD_ARCHIVE", `Truncated input (needed ${t$6.blockRemain} more bytes, only ${i$7} available)`, { entry: t$6 }), this[n$4] && t$6.write(this[n$4]), t$6.end();
|
|
2204
1346
|
}
|
|
2205
|
-
this[b
|
|
1347
|
+
this[b](T$1);
|
|
2206
1348
|
}
|
|
2207
1349
|
}
|
|
2208
|
-
[_$
|
|
2209
|
-
if (this[N
|
|
2210
|
-
else if (!t$
|
|
1350
|
+
[_$1](t$6) {
|
|
1351
|
+
if (this[N]) this[D](t$6);
|
|
1352
|
+
else if (!t$6 && !this[n$4]) this[M]();
|
|
2211
1353
|
else {
|
|
2212
|
-
if (this[N
|
|
2213
|
-
this[D
|
|
2214
|
-
const i$
|
|
2215
|
-
this[n$4] = null, this[g
|
|
2216
|
-
} else this[g
|
|
2217
|
-
for (; this[n$4] && this[n$4].length >= 512 && !this[m$
|
|
2218
|
-
const i$
|
|
2219
|
-
this[n$4] = null, this[g
|
|
1354
|
+
if (this[N] = true, this[n$4]) {
|
|
1355
|
+
this[D](t$6);
|
|
1356
|
+
const i$7 = this[n$4];
|
|
1357
|
+
this[n$4] = null, this[g](i$7);
|
|
1358
|
+
} else this[g](t$6);
|
|
1359
|
+
for (; this[n$4] && this[n$4].length >= 512 && !this[m$3] && !this[A];) {
|
|
1360
|
+
const i$7 = this[n$4];
|
|
1361
|
+
this[n$4] = null, this[g](i$7);
|
|
2220
1362
|
}
|
|
2221
|
-
this[N
|
|
1363
|
+
this[N] = false;
|
|
2222
1364
|
}
|
|
2223
|
-
(!this[n$4] || this[u$
|
|
1365
|
+
(!this[n$4] || this[u$5]) && this[M]();
|
|
2224
1366
|
}
|
|
2225
|
-
[g
|
|
2226
|
-
let i$
|
|
2227
|
-
const s$
|
|
2228
|
-
for (; i$
|
|
1367
|
+
[g](t$6) {
|
|
1368
|
+
let i$7 = 0;
|
|
1369
|
+
const s$7 = t$6.length;
|
|
1370
|
+
for (; i$7 + 512 <= s$7 && !this[m$3] && !this[A];) switch (this[h]) {
|
|
2229
1371
|
case "begin":
|
|
2230
1372
|
case "header":
|
|
2231
|
-
this[Y](t$
|
|
1373
|
+
this[Y](t$6, i$7), i$7 += 512;
|
|
2232
1374
|
break;
|
|
2233
1375
|
case "ignore":
|
|
2234
1376
|
case "body":
|
|
2235
|
-
i$
|
|
1377
|
+
i$7 += this[q$1](t$6, i$7);
|
|
2236
1378
|
break;
|
|
2237
1379
|
case "meta":
|
|
2238
|
-
i$
|
|
1380
|
+
i$7 += this[z$1](t$6, i$7);
|
|
2239
1381
|
break;
|
|
2240
|
-
default: throw new Error("invalid state: " + this[h
|
|
1382
|
+
default: throw new Error("invalid state: " + this[h]);
|
|
2241
1383
|
}
|
|
2242
|
-
i$
|
|
1384
|
+
i$7 < s$7 && (this[n$4] ? this[n$4] = Buffer.concat([t$6.slice(i$7), this[n$4]]) : this[n$4] = t$6.slice(i$7));
|
|
2243
1385
|
}
|
|
2244
|
-
end(t$
|
|
2245
|
-
this[m$
|
|
1386
|
+
end(t$6) {
|
|
1387
|
+
this[m$3] || (this[r] ? this[r].end(t$6) : (this[u$5] = true, this.brotli === void 0 && (t$6 = t$6 || Buffer.alloc(0)), this.write(t$6)));
|
|
2246
1388
|
}
|
|
2247
1389
|
}), O$1;
|
|
2248
1390
|
}
|
|
@@ -2251,26 +1393,26 @@ var v$1;
|
|
|
2251
1393
|
function X() {
|
|
2252
1394
|
if (v$1) return s$4;
|
|
2253
1395
|
v$1 = 1;
|
|
2254
|
-
const H$
|
|
2255
|
-
let R$
|
|
2256
|
-
if (!R$
|
|
2257
|
-
const c$
|
|
2258
|
-
R$
|
|
2259
|
-
const G$
|
|
2260
|
-
j$
|
|
1396
|
+
const H$2 = tt(), I = nt.EventEmitter, r = nativeFs;
|
|
1397
|
+
let R$2 = r.writev;
|
|
1398
|
+
if (!R$2) {
|
|
1399
|
+
const c$5 = process.binding("fs"), t$6 = c$5.FSReqWrap || c$5.FSReqCallback;
|
|
1400
|
+
R$2 = (e$6, i$7, $, A) => {
|
|
1401
|
+
const G$1 = (J$1, K) => A(J$1, K, i$7), j$2 = new t$6();
|
|
1402
|
+
j$2.oncomplete = G$1, c$5.writeBuffers(e$6, i$7, $, j$2);
|
|
2261
1403
|
};
|
|
2262
1404
|
}
|
|
2263
|
-
const m$
|
|
2264
|
-
class D
|
|
2265
|
-
constructor(t$
|
|
2266
|
-
if (e$
|
|
2267
|
-
this[p$
|
|
1405
|
+
const m$3 = Symbol("_autoClose"), h = Symbol("_close"), g = Symbol("_ended"), s$7 = Symbol("_fd"), B = Symbol("_finished"), o$5 = Symbol("_flags"), x = Symbol("_flush"), z$1 = Symbol("_handleChunk"), T$1 = Symbol("_makeBuf"), q$1 = Symbol("_mode"), E$1 = Symbol("_needDrain"), d = Symbol("_onerror"), y$3 = Symbol("_onopen"), W = Symbol("_onread"), _$1 = Symbol("_onwrite"), a$10 = Symbol("_open"), l$2 = Symbol("_path"), u$5 = Symbol("_pos"), n$4 = Symbol("_queue"), S$1 = Symbol("_read"), M = Symbol("_readSize"), f$4 = Symbol("_reading"), k$1 = Symbol("_remain"), N = Symbol("_size"), C$1 = Symbol("_write"), b = Symbol("_writing"), F$3 = Symbol("_defaultFlag"), p$1 = Symbol("_errored");
|
|
1406
|
+
class D extends H$2 {
|
|
1407
|
+
constructor(t$6, e$6) {
|
|
1408
|
+
if (e$6 = e$6 || {}, super(e$6), this.readable = true, this.writable = false, typeof t$6 != "string") throw new TypeError("path must be a string");
|
|
1409
|
+
this[p$1] = false, this[s$7] = typeof e$6.fd == "number" ? e$6.fd : null, this[l$2] = t$6, this[M] = e$6.readSize || 16 * 1024 * 1024, this[f$4] = false, this[N] = typeof e$6.size == "number" ? e$6.size : Infinity, this[k$1] = this[N], this[m$3] = typeof e$6.autoClose == "boolean" ? e$6.autoClose : true, typeof this[s$7] == "number" ? this[S$1]() : this[a$10]();
|
|
2268
1410
|
}
|
|
2269
1411
|
get fd() {
|
|
2270
|
-
return this[s$
|
|
1412
|
+
return this[s$7];
|
|
2271
1413
|
}
|
|
2272
1414
|
get path() {
|
|
2273
|
-
return this[l$
|
|
1415
|
+
return this[l$2];
|
|
2274
1416
|
}
|
|
2275
1417
|
write() {
|
|
2276
1418
|
throw new TypeError("this is a readable stream");
|
|
@@ -2278,210 +1420,210 @@ function X() {
|
|
|
2278
1420
|
end() {
|
|
2279
1421
|
throw new TypeError("this is a readable stream");
|
|
2280
1422
|
}
|
|
2281
|
-
[a$
|
|
2282
|
-
r.open(this[l$
|
|
1423
|
+
[a$10]() {
|
|
1424
|
+
r.open(this[l$2], "r", (t$6, e$6) => this[y$3](t$6, e$6));
|
|
2283
1425
|
}
|
|
2284
|
-
[y$
|
|
2285
|
-
t$
|
|
1426
|
+
[y$3](t$6, e$6) {
|
|
1427
|
+
t$6 ? this[d](t$6) : (this[s$7] = e$6, this.emit("open", e$6), this[S$1]());
|
|
2286
1428
|
}
|
|
2287
|
-
[T$
|
|
2288
|
-
return Buffer.allocUnsafe(Math.min(this[M
|
|
1429
|
+
[T$1]() {
|
|
1430
|
+
return Buffer.allocUnsafe(Math.min(this[M], this[k$1]));
|
|
2289
1431
|
}
|
|
2290
|
-
[S$
|
|
2291
|
-
if (!this[f$
|
|
2292
|
-
this[f$
|
|
2293
|
-
const t$
|
|
2294
|
-
if (t$
|
|
2295
|
-
r.read(this[s$
|
|
1432
|
+
[S$1]() {
|
|
1433
|
+
if (!this[f$4]) {
|
|
1434
|
+
this[f$4] = true;
|
|
1435
|
+
const t$6 = this[T$1]();
|
|
1436
|
+
if (t$6.length === 0) return process.nextTick(() => this[W](null, 0, t$6));
|
|
1437
|
+
r.read(this[s$7], t$6, 0, t$6.length, null, (e$6, i$7, $) => this[W](e$6, i$7, $));
|
|
2296
1438
|
}
|
|
2297
1439
|
}
|
|
2298
|
-
[W
|
|
2299
|
-
this[f$
|
|
1440
|
+
[W](t$6, e$6, i$7) {
|
|
1441
|
+
this[f$4] = false, t$6 ? this[d](t$6) : this[z$1](e$6, i$7) && this[S$1]();
|
|
2300
1442
|
}
|
|
2301
|
-
[h
|
|
2302
|
-
if (this[m$
|
|
2303
|
-
const t$
|
|
2304
|
-
this[s$
|
|
1443
|
+
[h]() {
|
|
1444
|
+
if (this[m$3] && typeof this[s$7] == "number") {
|
|
1445
|
+
const t$6 = this[s$7];
|
|
1446
|
+
this[s$7] = null, r.close(t$6, (e$6) => e$6 ? this.emit("error", e$6) : this.emit("close"));
|
|
2305
1447
|
}
|
|
2306
1448
|
}
|
|
2307
|
-
[d
|
|
2308
|
-
this[f$
|
|
1449
|
+
[d](t$6) {
|
|
1450
|
+
this[f$4] = true, this[h](), this.emit("error", t$6);
|
|
2309
1451
|
}
|
|
2310
|
-
[z$
|
|
2311
|
-
let i$
|
|
2312
|
-
return this[k$
|
|
1452
|
+
[z$1](t$6, e$6) {
|
|
1453
|
+
let i$7 = false;
|
|
1454
|
+
return this[k$1] -= t$6, t$6 > 0 && (i$7 = super.write(t$6 < e$6.length ? e$6.slice(0, t$6) : e$6)), (t$6 === 0 || this[k$1] <= 0) && (i$7 = false, this[h](), super.end()), i$7;
|
|
2313
1455
|
}
|
|
2314
|
-
emit(t$
|
|
2315
|
-
switch (t$
|
|
1456
|
+
emit(t$6, e$6) {
|
|
1457
|
+
switch (t$6) {
|
|
2316
1458
|
case "prefinish":
|
|
2317
1459
|
case "finish": break;
|
|
2318
1460
|
case "drain":
|
|
2319
|
-
typeof this[s$
|
|
1461
|
+
typeof this[s$7] == "number" && this[S$1]();
|
|
2320
1462
|
break;
|
|
2321
|
-
case "error": return this[p$
|
|
2322
|
-
default: return super.emit(t$
|
|
1463
|
+
case "error": return this[p$1] ? void 0 : (this[p$1] = true, super.emit(t$6, e$6));
|
|
1464
|
+
default: return super.emit(t$6, e$6);
|
|
2323
1465
|
}
|
|
2324
1466
|
}
|
|
2325
1467
|
}
|
|
2326
|
-
class P$
|
|
2327
|
-
[a$
|
|
2328
|
-
let t$
|
|
1468
|
+
class P$1 extends D {
|
|
1469
|
+
[a$10]() {
|
|
1470
|
+
let t$6 = true;
|
|
2329
1471
|
try {
|
|
2330
|
-
this[y$
|
|
1472
|
+
this[y$3](null, r.openSync(this[l$2], "r")), t$6 = !1;
|
|
2331
1473
|
} finally {
|
|
2332
|
-
t$
|
|
1474
|
+
t$6 && this[h]();
|
|
2333
1475
|
}
|
|
2334
1476
|
}
|
|
2335
|
-
[S$
|
|
2336
|
-
let t$
|
|
1477
|
+
[S$1]() {
|
|
1478
|
+
let t$6 = true;
|
|
2337
1479
|
try {
|
|
2338
|
-
if (!this[f$
|
|
2339
|
-
this[f$
|
|
1480
|
+
if (!this[f$4]) {
|
|
1481
|
+
this[f$4] = !0;
|
|
2340
1482
|
do {
|
|
2341
|
-
const e$
|
|
2342
|
-
if (!this[z$
|
|
1483
|
+
const e$6 = this[T$1](), i$7 = e$6.length === 0 ? 0 : r.readSync(this[s$7], e$6, 0, e$6.length, null);
|
|
1484
|
+
if (!this[z$1](i$7, e$6)) break;
|
|
2343
1485
|
} while (!0);
|
|
2344
|
-
this[f$
|
|
1486
|
+
this[f$4] = !1;
|
|
2345
1487
|
}
|
|
2346
|
-
t$
|
|
1488
|
+
t$6 = !1;
|
|
2347
1489
|
} finally {
|
|
2348
|
-
t$
|
|
1490
|
+
t$6 && this[h]();
|
|
2349
1491
|
}
|
|
2350
1492
|
}
|
|
2351
|
-
[h
|
|
2352
|
-
if (this[m$
|
|
2353
|
-
const t$
|
|
2354
|
-
this[s$
|
|
1493
|
+
[h]() {
|
|
1494
|
+
if (this[m$3] && typeof this[s$7] == "number") {
|
|
1495
|
+
const t$6 = this[s$7];
|
|
1496
|
+
this[s$7] = null, r.closeSync(t$6), this.emit("close");
|
|
2355
1497
|
}
|
|
2356
1498
|
}
|
|
2357
1499
|
}
|
|
2358
|
-
class O$
|
|
2359
|
-
constructor(t$
|
|
2360
|
-
e$
|
|
2361
|
-
const i$
|
|
2362
|
-
this[F$
|
|
2363
|
-
}
|
|
2364
|
-
emit(t$
|
|
2365
|
-
if (t$
|
|
2366
|
-
if (this[p$
|
|
2367
|
-
this[p$
|
|
1500
|
+
class O$3 extends I {
|
|
1501
|
+
constructor(t$6, e$6) {
|
|
1502
|
+
e$6 = e$6 || {}, super(e$6), this.readable = false, this.writable = true, this[p$1] = false, this[b] = false, this[g] = false, this[E$1] = false, this[n$4] = [], this[l$2] = t$6, this[s$7] = typeof e$6.fd == "number" ? e$6.fd : null, this[q$1] = e$6.mode === void 0 ? 438 : e$6.mode, this[u$5] = typeof e$6.start == "number" ? e$6.start : null, this[m$3] = typeof e$6.autoClose == "boolean" ? e$6.autoClose : true;
|
|
1503
|
+
const i$7 = this[u$5] !== null ? "r+" : "w";
|
|
1504
|
+
this[F$3] = e$6.flags === void 0, this[o$5] = this[F$3] ? i$7 : e$6.flags, this[s$7] === null && this[a$10]();
|
|
1505
|
+
}
|
|
1506
|
+
emit(t$6, e$6) {
|
|
1507
|
+
if (t$6 === "error") {
|
|
1508
|
+
if (this[p$1]) return;
|
|
1509
|
+
this[p$1] = true;
|
|
2368
1510
|
}
|
|
2369
|
-
return super.emit(t$
|
|
1511
|
+
return super.emit(t$6, e$6);
|
|
2370
1512
|
}
|
|
2371
1513
|
get fd() {
|
|
2372
|
-
return this[s$
|
|
1514
|
+
return this[s$7];
|
|
2373
1515
|
}
|
|
2374
1516
|
get path() {
|
|
2375
|
-
return this[l$
|
|
1517
|
+
return this[l$2];
|
|
2376
1518
|
}
|
|
2377
|
-
[d
|
|
2378
|
-
this[h
|
|
1519
|
+
[d](t$6) {
|
|
1520
|
+
this[h](), this[b] = true, this.emit("error", t$6);
|
|
2379
1521
|
}
|
|
2380
|
-
[a$
|
|
2381
|
-
r.open(this[l$
|
|
1522
|
+
[a$10]() {
|
|
1523
|
+
r.open(this[l$2], this[o$5], this[q$1], (t$6, e$6) => this[y$3](t$6, e$6));
|
|
2382
1524
|
}
|
|
2383
|
-
[y$
|
|
2384
|
-
this[F$
|
|
1525
|
+
[y$3](t$6, e$6) {
|
|
1526
|
+
this[F$3] && this[o$5] === "r+" && t$6 && t$6.code === "ENOENT" ? (this[o$5] = "w", this[a$10]()) : t$6 ? this[d](t$6) : (this[s$7] = e$6, this.emit("open", e$6), this[x]());
|
|
2385
1527
|
}
|
|
2386
|
-
end(t$
|
|
2387
|
-
return t$
|
|
1528
|
+
end(t$6, e$6) {
|
|
1529
|
+
return t$6 && this.write(t$6, e$6), this[g] = true, !this[b] && !this[n$4].length && typeof this[s$7] == "number" && this[_$1](null, 0), this;
|
|
2388
1530
|
}
|
|
2389
|
-
write(t$
|
|
2390
|
-
return typeof t$
|
|
1531
|
+
write(t$6, e$6) {
|
|
1532
|
+
return typeof t$6 == "string" && (t$6 = Buffer.from(t$6, e$6)), this[g] ? (this.emit("error", /* @__PURE__ */ new Error("write() after end()")), false) : this[s$7] === null || this[b] || this[n$4].length ? (this[n$4].push(t$6), this[E$1] = true, false) : (this[b] = true, this[C$1](t$6), true);
|
|
2391
1533
|
}
|
|
2392
|
-
[C$
|
|
2393
|
-
r.write(this[s$
|
|
1534
|
+
[C$1](t$6) {
|
|
1535
|
+
r.write(this[s$7], t$6, 0, t$6.length, this[u$5], (e$6, i$7) => this[_$1](e$6, i$7));
|
|
2394
1536
|
}
|
|
2395
|
-
[_$
|
|
2396
|
-
t$
|
|
1537
|
+
[_$1](t$6, e$6) {
|
|
1538
|
+
t$6 ? this[d](t$6) : (this[u$5] !== null && (this[u$5] += e$6), this[n$4].length ? this[x]() : (this[b] = false, this[g] && !this[B] ? (this[B] = true, this[h](), this.emit("finish")) : this[E$1] && (this[E$1] = false, this.emit("drain"))));
|
|
2397
1539
|
}
|
|
2398
|
-
[x
|
|
2399
|
-
if (this[n$4].length === 0) this[g
|
|
2400
|
-
else if (this[n$4].length === 1) this[C$
|
|
1540
|
+
[x]() {
|
|
1541
|
+
if (this[n$4].length === 0) this[g] && this[_$1](null, 0);
|
|
1542
|
+
else if (this[n$4].length === 1) this[C$1](this[n$4].pop());
|
|
2401
1543
|
else {
|
|
2402
|
-
const t$
|
|
2403
|
-
this[n$4] = [], R$
|
|
1544
|
+
const t$6 = this[n$4];
|
|
1545
|
+
this[n$4] = [], R$2(this[s$7], t$6, this[u$5], (e$6, i$7) => this[_$1](e$6, i$7));
|
|
2404
1546
|
}
|
|
2405
1547
|
}
|
|
2406
|
-
[h
|
|
2407
|
-
if (this[m$
|
|
2408
|
-
const t$
|
|
2409
|
-
this[s$
|
|
1548
|
+
[h]() {
|
|
1549
|
+
if (this[m$3] && typeof this[s$7] == "number") {
|
|
1550
|
+
const t$6 = this[s$7];
|
|
1551
|
+
this[s$7] = null, r.close(t$6, (e$6) => e$6 ? this.emit("error", e$6) : this.emit("close"));
|
|
2410
1552
|
}
|
|
2411
1553
|
}
|
|
2412
1554
|
}
|
|
2413
|
-
class U
|
|
2414
|
-
[a$
|
|
2415
|
-
let t$
|
|
2416
|
-
if (this[F$
|
|
2417
|
-
t$
|
|
2418
|
-
} catch (e$
|
|
2419
|
-
if (e$
|
|
2420
|
-
throw e$
|
|
1555
|
+
class U extends O$3 {
|
|
1556
|
+
[a$10]() {
|
|
1557
|
+
let t$6;
|
|
1558
|
+
if (this[F$3] && this[o$5] === "r+") try {
|
|
1559
|
+
t$6 = r.openSync(this[l$2], this[o$5], this[q$1]);
|
|
1560
|
+
} catch (e$6) {
|
|
1561
|
+
if (e$6.code === "ENOENT") return this[o$5] = "w", this[a$10]();
|
|
1562
|
+
throw e$6;
|
|
2421
1563
|
}
|
|
2422
|
-
else t$
|
|
2423
|
-
this[y$
|
|
1564
|
+
else t$6 = r.openSync(this[l$2], this[o$5], this[q$1]);
|
|
1565
|
+
this[y$3](null, t$6);
|
|
2424
1566
|
}
|
|
2425
|
-
[h
|
|
2426
|
-
if (this[m$
|
|
2427
|
-
const t$
|
|
2428
|
-
this[s$
|
|
1567
|
+
[h]() {
|
|
1568
|
+
if (this[m$3] && typeof this[s$7] == "number") {
|
|
1569
|
+
const t$6 = this[s$7];
|
|
1570
|
+
this[s$7] = null, r.closeSync(t$6), this.emit("close");
|
|
2429
1571
|
}
|
|
2430
1572
|
}
|
|
2431
|
-
[C$
|
|
2432
|
-
let e$
|
|
1573
|
+
[C$1](t$6) {
|
|
1574
|
+
let e$6 = true;
|
|
2433
1575
|
try {
|
|
2434
|
-
this[_$
|
|
1576
|
+
this[_$1](null, r.writeSync(this[s$7], t$6, 0, t$6.length, this[u$5])), e$6 = !1;
|
|
2435
1577
|
} finally {
|
|
2436
|
-
if (e$
|
|
2437
|
-
this[h
|
|
1578
|
+
if (e$6) try {
|
|
1579
|
+
this[h]();
|
|
2438
1580
|
} catch {}
|
|
2439
1581
|
}
|
|
2440
1582
|
}
|
|
2441
1583
|
}
|
|
2442
|
-
return s$4.ReadStream = D
|
|
1584
|
+
return s$4.ReadStream = D, s$4.ReadStreamSync = P$1, s$4.WriteStream = O$3, s$4.WriteStreamSync = U, s$4;
|
|
2443
1585
|
}
|
|
2444
1586
|
var r$1 = { exports: {} };
|
|
2445
1587
|
var i$2, m$2;
|
|
2446
1588
|
function t$2() {
|
|
2447
1589
|
if (m$2) return i$2;
|
|
2448
1590
|
m$2 = 1;
|
|
2449
|
-
const { promisify: n$4 } = a$a, e$
|
|
1591
|
+
const { promisify: n$4 } = a$a, e$6 = nativeFs;
|
|
2450
1592
|
return i$2 = (r) => {
|
|
2451
1593
|
if (!r) r = {
|
|
2452
1594
|
mode: 511,
|
|
2453
|
-
fs: e$
|
|
1595
|
+
fs: e$6
|
|
2454
1596
|
};
|
|
2455
1597
|
else if (typeof r == "object") r = {
|
|
2456
1598
|
mode: 511,
|
|
2457
|
-
fs: e$
|
|
1599
|
+
fs: e$6,
|
|
2458
1600
|
...r
|
|
2459
1601
|
};
|
|
2460
1602
|
else if (typeof r == "number") r = {
|
|
2461
1603
|
mode: r,
|
|
2462
|
-
fs: e$
|
|
1604
|
+
fs: e$6
|
|
2463
1605
|
};
|
|
2464
1606
|
else if (typeof r == "string") r = {
|
|
2465
1607
|
mode: parseInt(r, 8),
|
|
2466
|
-
fs: e$
|
|
1608
|
+
fs: e$6
|
|
2467
1609
|
};
|
|
2468
1610
|
else throw new TypeError("invalid options argument");
|
|
2469
|
-
return r.mkdir = r.mkdir || r.fs.mkdir || e$
|
|
1611
|
+
return r.mkdir = r.mkdir || r.fs.mkdir || e$6.mkdir, r.mkdirAsync = n$4(r.mkdir), r.stat = r.stat || r.fs.stat || e$6.stat, r.statAsync = n$4(r.stat), r.statSync = r.statSync || r.fs.statSync || e$6.statSync, r.mkdirSync = r.mkdirSync || r.fs.mkdirSync || e$6.mkdirSync, r;
|
|
2470
1612
|
}, i$2;
|
|
2471
1613
|
}
|
|
2472
1614
|
var e$1, t$1;
|
|
2473
1615
|
function u$2() {
|
|
2474
1616
|
if (t$1) return e$1;
|
|
2475
1617
|
t$1 = 1;
|
|
2476
|
-
const s$
|
|
1618
|
+
const s$7 = process.env.__TESTING_MKDIRP_PLATFORM__ || process.platform, { resolve: o$5, parse: n$4 } = path;
|
|
2477
1619
|
return e$1 = (r) => {
|
|
2478
1620
|
if (/\0/.test(r)) throw Object.assign(/* @__PURE__ */ new TypeError("path must be a string without null bytes"), {
|
|
2479
1621
|
path: r,
|
|
2480
1622
|
code: "ERR_INVALID_ARG_VALUE"
|
|
2481
1623
|
});
|
|
2482
|
-
if (r = o$
|
|
2483
|
-
const i$
|
|
2484
|
-
if (i$
|
|
1624
|
+
if (r = o$5(r), s$7 === "win32") {
|
|
1625
|
+
const i$7 = /[*|"<>?:]/, { root: a$10 } = n$4(r);
|
|
1626
|
+
if (i$7.test(r.substr(a$10.length))) throw Object.assign(/* @__PURE__ */ new Error("Illegal characters in path."), {
|
|
2485
1627
|
path: r,
|
|
2486
1628
|
code: "EINVAL"
|
|
2487
1629
|
});
|
|
@@ -2493,80 +1635,80 @@ var i$1, c$2;
|
|
|
2493
1635
|
function t() {
|
|
2494
1636
|
if (c$2) return i$1;
|
|
2495
1637
|
c$2 = 1;
|
|
2496
|
-
const { dirname: u$
|
|
2497
|
-
if (n$4 !== e$
|
|
2498
|
-
return r.statSync(e$
|
|
2499
|
-
} catch (d
|
|
2500
|
-
return d
|
|
1638
|
+
const { dirname: u$5 } = path, f$4 = (r, e$6, n$4 = void 0) => n$4 === e$6 ? Promise.resolve() : r.statAsync(e$6).then((d) => d.isDirectory() ? n$4 : void 0, (d) => d.code === "ENOENT" ? f$4(r, u$5(e$6), e$6) : void 0), o$5 = (r, e$6, n$4 = void 0) => {
|
|
1639
|
+
if (n$4 !== e$6) try {
|
|
1640
|
+
return r.statSync(e$6).isDirectory() ? n$4 : void 0;
|
|
1641
|
+
} catch (d) {
|
|
1642
|
+
return d.code === "ENOENT" ? o$5(r, u$5(e$6), e$6) : void 0;
|
|
2501
1643
|
}
|
|
2502
1644
|
};
|
|
2503
1645
|
return i$1 = {
|
|
2504
|
-
findMade: f$
|
|
2505
|
-
findMadeSync: o$
|
|
1646
|
+
findMade: f$4,
|
|
1647
|
+
findMadeSync: o$5
|
|
2506
1648
|
}, i$1;
|
|
2507
1649
|
}
|
|
2508
1650
|
var o$3, a$4;
|
|
2509
1651
|
function y$2() {
|
|
2510
1652
|
if (a$4) return o$3;
|
|
2511
1653
|
a$4 = 1;
|
|
2512
|
-
const { dirname: f$
|
|
2513
|
-
e$
|
|
2514
|
-
const i$
|
|
2515
|
-
return i$
|
|
1654
|
+
const { dirname: f$4 } = path, t$6 = (n$4, e$6, c$5) => {
|
|
1655
|
+
e$6.recursive = false;
|
|
1656
|
+
const i$7 = f$4(n$4);
|
|
1657
|
+
return i$7 === n$4 ? e$6.mkdirAsync(n$4, e$6).catch((r) => {
|
|
2516
1658
|
if (r.code !== "EISDIR") throw r;
|
|
2517
|
-
}) : e$
|
|
2518
|
-
if (r.code === "ENOENT") return t$
|
|
1659
|
+
}) : e$6.mkdirAsync(n$4, e$6).then(() => c$5 || n$4, (r) => {
|
|
1660
|
+
if (r.code === "ENOENT") return t$6(i$7, e$6).then((u$5) => t$6(n$4, e$6, u$5));
|
|
2519
1661
|
if (r.code !== "EEXIST" && r.code !== "EROFS") throw r;
|
|
2520
|
-
return e$
|
|
2521
|
-
if (u$
|
|
1662
|
+
return e$6.statAsync(n$4).then((u$5) => {
|
|
1663
|
+
if (u$5.isDirectory()) return c$5;
|
|
2522
1664
|
throw r;
|
|
2523
1665
|
}, () => {
|
|
2524
1666
|
throw r;
|
|
2525
1667
|
});
|
|
2526
1668
|
});
|
|
2527
|
-
}, d
|
|
2528
|
-
const i$
|
|
2529
|
-
if (e$
|
|
2530
|
-
return e$
|
|
1669
|
+
}, d = (n$4, e$6, c$5) => {
|
|
1670
|
+
const i$7 = f$4(n$4);
|
|
1671
|
+
if (e$6.recursive = false, i$7 === n$4) try {
|
|
1672
|
+
return e$6.mkdirSync(n$4, e$6);
|
|
2531
1673
|
} catch (r) {
|
|
2532
1674
|
if (r.code !== "EISDIR") throw r;
|
|
2533
1675
|
return;
|
|
2534
1676
|
}
|
|
2535
1677
|
try {
|
|
2536
|
-
return e$
|
|
1678
|
+
return e$6.mkdirSync(n$4, e$6), c$5 || n$4;
|
|
2537
1679
|
} catch (r) {
|
|
2538
|
-
if (r.code === "ENOENT") return d
|
|
1680
|
+
if (r.code === "ENOENT") return d(n$4, e$6, d(i$7, e$6, c$5));
|
|
2539
1681
|
if (r.code !== "EEXIST" && r.code !== "EROFS") throw r;
|
|
2540
1682
|
try {
|
|
2541
|
-
if (!e$
|
|
1683
|
+
if (!e$6.statSync(n$4).isDirectory()) throw r;
|
|
2542
1684
|
} catch {
|
|
2543
1685
|
throw r;
|
|
2544
1686
|
}
|
|
2545
1687
|
}
|
|
2546
1688
|
};
|
|
2547
1689
|
return o$3 = {
|
|
2548
|
-
mkdirpManual: t$
|
|
2549
|
-
mkdirpManualSync: d
|
|
1690
|
+
mkdirpManual: t$6,
|
|
1691
|
+
mkdirpManualSync: d
|
|
2550
1692
|
}, o$3;
|
|
2551
1693
|
}
|
|
2552
1694
|
var c$1, m$1;
|
|
2553
1695
|
function s$3() {
|
|
2554
1696
|
if (m$1) return c$1;
|
|
2555
1697
|
m$1 = 1;
|
|
2556
|
-
const { dirname: u$
|
|
1698
|
+
const { dirname: u$5 } = path, { findMade: d, findMadeSync: t$1$1 } = t(), { mkdirpManual: a$10, mkdirpManualSync: k$1 } = y$2();
|
|
2557
1699
|
return c$1 = {
|
|
2558
|
-
mkdirpNative: (e$
|
|
2559
|
-
if (i$
|
|
2560
|
-
throw i$
|
|
1700
|
+
mkdirpNative: (e$6, r) => (r.recursive = true, u$5(e$6) === e$6 ? r.mkdirAsync(e$6, r) : d(r, e$6).then((n$4) => r.mkdirAsync(e$6, r).then(() => n$4).catch((i$7) => {
|
|
1701
|
+
if (i$7.code === "ENOENT") return a$10(e$6, r);
|
|
1702
|
+
throw i$7;
|
|
2561
1703
|
}))),
|
|
2562
|
-
mkdirpNativeSync: (e$
|
|
2563
|
-
if (r.recursive = true, u$
|
|
2564
|
-
const n$4 = t$1$1(r, e$
|
|
1704
|
+
mkdirpNativeSync: (e$6, r) => {
|
|
1705
|
+
if (r.recursive = true, u$5(e$6) === e$6) return r.mkdirSync(e$6, r);
|
|
1706
|
+
const n$4 = t$1$1(r, e$6);
|
|
2565
1707
|
try {
|
|
2566
|
-
return r.mkdirSync(e$
|
|
2567
|
-
} catch (i$
|
|
2568
|
-
if (i$
|
|
2569
|
-
throw i$
|
|
1708
|
+
return r.mkdirSync(e$6, r), n$4;
|
|
1709
|
+
} catch (i$7) {
|
|
1710
|
+
if (i$7.code === "ENOENT") return k$1(e$6, r);
|
|
1711
|
+
throw i$7;
|
|
2570
1712
|
}
|
|
2571
1713
|
}
|
|
2572
1714
|
}, c$1;
|
|
@@ -2575,391 +1717,391 @@ var s$2, n$1;
|
|
|
2575
1717
|
function a$3() {
|
|
2576
1718
|
if (n$1) return s$2;
|
|
2577
1719
|
n$1 = 1;
|
|
2578
|
-
const i$
|
|
1720
|
+
const i$7 = nativeFs, e$6 = (process.env.__TESTING_MKDIRP_NODE_VERSION__ || process.version).replace(/^v/, "").split("."), t$6 = +e$6[0] > 10 || +e$6[0] == 10 && +e$6[1] >= 12;
|
|
2579
1721
|
return s$2 = {
|
|
2580
|
-
useNative: t$
|
|
2581
|
-
useNativeSync: t$
|
|
1722
|
+
useNative: t$6 ? (r) => r.mkdir === i$7.mkdir : () => false,
|
|
1723
|
+
useNativeSync: t$6 ? (r) => r.mkdirSync === i$7.mkdirSync : () => false
|
|
2582
1724
|
}, s$2;
|
|
2583
1725
|
}
|
|
2584
1726
|
var m, s$1;
|
|
2585
1727
|
function S() {
|
|
2586
1728
|
if (s$1) return m;
|
|
2587
1729
|
s$1 = 1;
|
|
2588
|
-
const i$
|
|
2589
|
-
return n$4.sync = d
|
|
1730
|
+
const i$7 = t$2(), u$5 = u$2(), { mkdirpNative: a$10, mkdirpNativeSync: c$5 } = s$3(), { mkdirpManual: o$5, mkdirpManualSync: q$1 } = y$2(), { useNative: t$6, useNativeSync: _$1 } = a$3(), n$4 = (e$6, r) => (e$6 = u$5(e$6), r = i$7(r), t$6(r) ? a$10(e$6, r) : o$5(e$6, r)), d = (e$6, r) => (e$6 = u$5(e$6), r = i$7(r), _$1(r) ? c$5(e$6, r) : q$1(e$6, r));
|
|
1731
|
+
return n$4.sync = d, n$4.native = (e$6, r) => a$10(u$5(e$6), i$7(r)), n$4.manual = (e$6, r) => o$5(u$5(e$6), i$7(r)), n$4.nativeSync = (e$6, r) => c$5(u$5(e$6), i$7(r)), n$4.manualSync = (e$6, r) => q$1(u$5(e$6), i$7(r)), m = n$4, m;
|
|
2590
1732
|
}
|
|
2591
1733
|
var y$1, O;
|
|
2592
1734
|
function F$1() {
|
|
2593
1735
|
if (O) return y$1;
|
|
2594
1736
|
O = 1;
|
|
2595
|
-
const c$
|
|
1737
|
+
const c$5 = nativeFs, a$10 = path, T$1 = c$5.lchown ? "lchown" : "chown", I = c$5.lchownSync ? "lchownSync" : "chownSync", i$7 = c$5.lchown && !process.version.match(/v1[1-9]+\./) && !process.version.match(/v10\.[6-9]/), u$5 = (r, e$6, n$4) => {
|
|
2596
1738
|
try {
|
|
2597
|
-
return c$
|
|
2598
|
-
} catch (t$
|
|
2599
|
-
if (t$
|
|
1739
|
+
return c$5[I](r, e$6, n$4);
|
|
1740
|
+
} catch (t$6) {
|
|
1741
|
+
if (t$6.code !== "ENOENT") throw t$6;
|
|
2600
1742
|
}
|
|
2601
|
-
}, D
|
|
1743
|
+
}, D = (r, e$6, n$4) => {
|
|
2602
1744
|
try {
|
|
2603
|
-
return c$
|
|
2604
|
-
} catch (t$
|
|
2605
|
-
if (t$
|
|
1745
|
+
return c$5.chownSync(r, e$6, n$4);
|
|
1746
|
+
} catch (t$6) {
|
|
1747
|
+
if (t$6.code !== "ENOENT") throw t$6;
|
|
2606
1748
|
}
|
|
2607
|
-
}, _$
|
|
2608
|
-
!o$
|
|
2609
|
-
} : (r, e$
|
|
1749
|
+
}, _$1 = i$7 ? (r, e$6, n$4, t$6) => (o$5) => {
|
|
1750
|
+
!o$5 || o$5.code !== "EISDIR" ? t$6(o$5) : c$5.chown(r, e$6, n$4, t$6);
|
|
1751
|
+
} : (r, e$6, n$4, t$6) => t$6, w$2 = i$7 ? (r, e$6, n$4) => {
|
|
2610
1752
|
try {
|
|
2611
|
-
return u$
|
|
2612
|
-
} catch (t$
|
|
2613
|
-
if (t$
|
|
2614
|
-
D
|
|
2615
|
-
}
|
|
2616
|
-
} : (r, e$
|
|
2617
|
-
let N
|
|
2618
|
-
/^v4\./.test(R$
|
|
2619
|
-
const h
|
|
2620
|
-
c$
|
|
2621
|
-
t$
|
|
1753
|
+
return u$5(r, e$6, n$4);
|
|
1754
|
+
} catch (t$6) {
|
|
1755
|
+
if (t$6.code !== "EISDIR") throw t$6;
|
|
1756
|
+
D(r, e$6, n$4);
|
|
1757
|
+
}
|
|
1758
|
+
} : (r, e$6, n$4) => u$5(r, e$6, n$4), R$2 = process.version;
|
|
1759
|
+
let N = (r, e$6, n$4) => c$5.readdir(r, e$6, n$4), q$1 = (r, e$6) => c$5.readdirSync(r, e$6);
|
|
1760
|
+
/^v4\./.test(R$2) && (N = (r, e$6, n$4) => c$5.readdir(r, n$4));
|
|
1761
|
+
const h = (r, e$6, n$4, t$6) => {
|
|
1762
|
+
c$5[T$1](r, e$6, n$4, _$1(r, e$6, n$4, (o$5) => {
|
|
1763
|
+
t$6(o$5 && o$5.code !== "ENOENT" ? o$5 : null);
|
|
2622
1764
|
}));
|
|
2623
|
-
}, S$
|
|
2624
|
-
if (typeof e$
|
|
2625
|
-
if (s$
|
|
2626
|
-
f$
|
|
1765
|
+
}, S$1 = (r, e$6, n$4, t$6, o$5) => {
|
|
1766
|
+
if (typeof e$6 == "string") return c$5.lstat(a$10.resolve(r, e$6), (s$7, f$4) => {
|
|
1767
|
+
if (s$7) return o$5(s$7.code !== "ENOENT" ? s$7 : null);
|
|
1768
|
+
f$4.name = e$6, S$1(r, f$4, n$4, t$6, o$5);
|
|
2627
1769
|
});
|
|
2628
|
-
if (e$
|
|
2629
|
-
if (s$
|
|
2630
|
-
h
|
|
1770
|
+
if (e$6.isDirectory()) E$1(a$10.resolve(r, e$6.name), n$4, t$6, (s$7) => {
|
|
1771
|
+
if (s$7) return o$5(s$7);
|
|
1772
|
+
h(a$10.resolve(r, e$6.name), n$4, t$6, o$5);
|
|
2631
1773
|
});
|
|
2632
|
-
else h
|
|
2633
|
-
}, E$
|
|
2634
|
-
N
|
|
2635
|
-
if (o$
|
|
2636
|
-
if (o$
|
|
2637
|
-
if (o$
|
|
1774
|
+
else h(a$10.resolve(r, e$6.name), n$4, t$6, o$5);
|
|
1775
|
+
}, E$1 = (r, e$6, n$4, t$6) => {
|
|
1776
|
+
N(r, { withFileTypes: true }, (o$5, s$7) => {
|
|
1777
|
+
if (o$5) {
|
|
1778
|
+
if (o$5.code === "ENOENT") return t$6();
|
|
1779
|
+
if (o$5.code !== "ENOTDIR" && o$5.code !== "ENOTSUP") return t$6(o$5);
|
|
2638
1780
|
}
|
|
2639
|
-
if (o$
|
|
2640
|
-
let f$
|
|
2641
|
-
const H$
|
|
2642
|
-
if (!v$
|
|
2643
|
-
if (l$
|
|
2644
|
-
if (--f$
|
|
1781
|
+
if (o$5 || !s$7.length) return h(r, e$6, n$4, t$6);
|
|
1782
|
+
let f$4 = s$7.length, v$2 = null;
|
|
1783
|
+
const H$2 = (l$2) => {
|
|
1784
|
+
if (!v$2) {
|
|
1785
|
+
if (l$2) return t$6(v$2 = l$2);
|
|
1786
|
+
if (--f$4 === 0) return h(r, e$6, n$4, t$6);
|
|
2645
1787
|
}
|
|
2646
1788
|
};
|
|
2647
|
-
s$
|
|
1789
|
+
s$7.forEach((l$2) => S$1(r, l$2, e$6, n$4, H$2));
|
|
2648
1790
|
});
|
|
2649
|
-
}, C$
|
|
2650
|
-
if (typeof e$
|
|
2651
|
-
const o$
|
|
2652
|
-
o$
|
|
2653
|
-
} catch (o$
|
|
2654
|
-
if (o$
|
|
2655
|
-
throw o$
|
|
2656
|
-
}
|
|
2657
|
-
e$
|
|
2658
|
-
}, m$
|
|
2659
|
-
let t$
|
|
1791
|
+
}, C$1 = (r, e$6, n$4, t$6) => {
|
|
1792
|
+
if (typeof e$6 == "string") try {
|
|
1793
|
+
const o$5 = c$5.lstatSync(a$10.resolve(r, e$6));
|
|
1794
|
+
o$5.name = e$6, e$6 = o$5;
|
|
1795
|
+
} catch (o$5) {
|
|
1796
|
+
if (o$5.code === "ENOENT") return;
|
|
1797
|
+
throw o$5;
|
|
1798
|
+
}
|
|
1799
|
+
e$6.isDirectory() && m$3(a$10.resolve(r, e$6.name), n$4, t$6), w$2(a$10.resolve(r, e$6.name), n$4, t$6);
|
|
1800
|
+
}, m$3 = (r, e$6, n$4) => {
|
|
1801
|
+
let t$6;
|
|
2660
1802
|
try {
|
|
2661
|
-
t$
|
|
2662
|
-
} catch (o$
|
|
2663
|
-
if (o$
|
|
2664
|
-
if (o$
|
|
2665
|
-
throw o$
|
|
1803
|
+
t$6 = q$1(r, { withFileTypes: !0 });
|
|
1804
|
+
} catch (o$5) {
|
|
1805
|
+
if (o$5.code === "ENOENT") return;
|
|
1806
|
+
if (o$5.code === "ENOTDIR" || o$5.code === "ENOTSUP") return w$2(r, e$6, n$4);
|
|
1807
|
+
throw o$5;
|
|
2666
1808
|
}
|
|
2667
|
-
return t$
|
|
1809
|
+
return t$6 && t$6.length && t$6.forEach((o$5) => C$1(r, o$5, e$6, n$4)), w$2(r, e$6, n$4);
|
|
2668
1810
|
};
|
|
2669
|
-
return y$1 = E$
|
|
1811
|
+
return y$1 = E$1, E$1.sync = m$3, y$1;
|
|
2670
1812
|
}
|
|
2671
1813
|
var R;
|
|
2672
1814
|
function H() {
|
|
2673
1815
|
if (R) return r$1.exports;
|
|
2674
1816
|
R = 1;
|
|
2675
|
-
const g
|
|
2676
|
-
class D
|
|
2677
|
-
constructor(e$
|
|
2678
|
-
super("Cannot extract through symbolic link"), this.path = s$
|
|
1817
|
+
const g = S(), l$2 = nativeFs, p$1 = path, x = F$1(), y$3 = a$7();
|
|
1818
|
+
class D extends Error {
|
|
1819
|
+
constructor(e$6, s$7) {
|
|
1820
|
+
super("Cannot extract through symbolic link"), this.path = s$7, this.symlink = e$6;
|
|
2679
1821
|
}
|
|
2680
1822
|
get name() {
|
|
2681
1823
|
return "SylinkError";
|
|
2682
1824
|
}
|
|
2683
1825
|
}
|
|
2684
|
-
class E$
|
|
2685
|
-
constructor(e$
|
|
2686
|
-
super(s$
|
|
1826
|
+
class E$1 extends Error {
|
|
1827
|
+
constructor(e$6, s$7) {
|
|
1828
|
+
super(s$7 + ": Cannot cd into '" + e$6 + "'"), this.path = e$6, this.code = s$7;
|
|
2687
1829
|
}
|
|
2688
1830
|
get name() {
|
|
2689
1831
|
return "CwdError";
|
|
2690
1832
|
}
|
|
2691
1833
|
}
|
|
2692
|
-
const v$
|
|
2693
|
-
l$
|
|
2694
|
-
(s$
|
|
1834
|
+
const v$2 = (n$4, e$6) => n$4.get(y$3(e$6)), q$1 = (n$4, e$6, s$7) => n$4.set(y$3(e$6), s$7), I = (n$4, e$6) => {
|
|
1835
|
+
l$2.stat(n$4, (s$7, r) => {
|
|
1836
|
+
(s$7 || !r.isDirectory()) && (s$7 = new E$1(n$4, s$7 && s$7.code || "ENOTDIR")), e$6(s$7);
|
|
2695
1837
|
});
|
|
2696
1838
|
};
|
|
2697
|
-
r$1.exports = (n$4, e$
|
|
2698
|
-
n$4 = y$
|
|
2699
|
-
const r = e$
|
|
2700
|
-
k$
|
|
1839
|
+
r$1.exports = (n$4, e$6, s$7) => {
|
|
1840
|
+
n$4 = y$3(n$4);
|
|
1841
|
+
const r = e$6.umask, c$5 = e$6.mode | 448, f$4 = (c$5 & r) !== 0, t$6 = e$6.uid, i$7 = e$6.gid, a$10 = typeof t$6 == "number" && typeof i$7 == "number" && (t$6 !== e$6.processUid || i$7 !== e$6.processGid), u$5 = e$6.preserve, m$3 = e$6.unlink, h = e$6.cache, d = y$3(e$6.cwd), w$2 = (k$1, o$5) => {
|
|
1842
|
+
k$1 ? s$7(k$1) : (q$1(h, n$4, true), o$5 && a$10 ? x(o$5, t$6, i$7, (G$1) => w$2(G$1)) : f$4 ? l$2.chmod(n$4, c$5, s$7) : s$7());
|
|
2701
1843
|
};
|
|
2702
|
-
if (h
|
|
2703
|
-
if (n$4 === d
|
|
2704
|
-
if (u$
|
|
2705
|
-
C$
|
|
1844
|
+
if (h && v$2(h, n$4) === true) return w$2();
|
|
1845
|
+
if (n$4 === d) return I(n$4, w$2);
|
|
1846
|
+
if (u$5) return g(n$4, { mode: c$5 }).then((k$1) => w$2(null, k$1), w$2);
|
|
1847
|
+
C$1(d, y$3(p$1.relative(d, n$4)).split("/"), c$5, h, m$3, d, null, w$2);
|
|
2706
1848
|
};
|
|
2707
|
-
const C$
|
|
2708
|
-
if (!e$
|
|
2709
|
-
const a$
|
|
2710
|
-
if (v$
|
|
2711
|
-
l$
|
|
2712
|
-
}, j$
|
|
2713
|
-
a$
|
|
2714
|
-
if (u$
|
|
2715
|
-
else if (m$
|
|
2716
|
-
else if (c$
|
|
2717
|
-
if (h
|
|
2718
|
-
l$
|
|
1849
|
+
const C$1 = (n$4, e$6, s$7, r, c$5, f$4, t$6, i$7) => {
|
|
1850
|
+
if (!e$6.length) return i$7(null, t$6);
|
|
1851
|
+
const a$10 = e$6.shift(), u$5 = y$3(p$1.resolve(n$4 + "/" + a$10));
|
|
1852
|
+
if (v$2(r, u$5)) return C$1(u$5, e$6, s$7, r, c$5, f$4, t$6, i$7);
|
|
1853
|
+
l$2.mkdir(u$5, s$7, j$2(u$5, e$6, s$7, r, c$5, f$4, t$6, i$7));
|
|
1854
|
+
}, j$2 = (n$4, e$6, s$7, r, c$5, f$4, t$6, i$7) => (a$10) => {
|
|
1855
|
+
a$10 ? l$2.lstat(n$4, (u$5, m$3) => {
|
|
1856
|
+
if (u$5) u$5.path = u$5.path && y$3(u$5.path), i$7(u$5);
|
|
1857
|
+
else if (m$3.isDirectory()) C$1(n$4, e$6, s$7, r, c$5, f$4, t$6, i$7);
|
|
1858
|
+
else if (c$5) l$2.unlink(n$4, (h) => {
|
|
1859
|
+
if (h) return i$7(h);
|
|
1860
|
+
l$2.mkdir(n$4, s$7, j$2(n$4, e$6, s$7, r, c$5, f$4, t$6, i$7));
|
|
2719
1861
|
});
|
|
2720
1862
|
else {
|
|
2721
|
-
if (m$
|
|
2722
|
-
i$
|
|
1863
|
+
if (m$3.isSymbolicLink()) return i$7(new D(n$4, n$4 + "/" + e$6.join("/")));
|
|
1864
|
+
i$7(a$10);
|
|
2723
1865
|
}
|
|
2724
|
-
}) : (t$
|
|
1866
|
+
}) : (t$6 = t$6 || n$4, C$1(n$4, e$6, s$7, r, c$5, f$4, t$6, i$7));
|
|
2725
1867
|
}, L = (n$4) => {
|
|
2726
|
-
let e$
|
|
1868
|
+
let e$6 = false, s$7 = "ENOTDIR";
|
|
2727
1869
|
try {
|
|
2728
|
-
e$
|
|
1870
|
+
e$6 = l$2.statSync(n$4).isDirectory();
|
|
2729
1871
|
} catch (r) {
|
|
2730
|
-
s$
|
|
1872
|
+
s$7 = r.code;
|
|
2731
1873
|
} finally {
|
|
2732
|
-
if (!e$
|
|
1874
|
+
if (!e$6) throw new E$1(n$4, s$7);
|
|
2733
1875
|
}
|
|
2734
1876
|
};
|
|
2735
|
-
return r$1.exports.sync = (n$4, e$
|
|
2736
|
-
n$4 = y$
|
|
2737
|
-
const s$
|
|
2738
|
-
q$
|
|
1877
|
+
return r$1.exports.sync = (n$4, e$6) => {
|
|
1878
|
+
n$4 = y$3(n$4);
|
|
1879
|
+
const s$7 = e$6.umask, r = e$6.mode | 448, c$5 = (r & s$7) !== 0, f$4 = e$6.uid, t$6 = e$6.gid, i$7 = typeof f$4 == "number" && typeof t$6 == "number" && (f$4 !== e$6.processUid || t$6 !== e$6.processGid), a$10 = e$6.preserve, u$5 = e$6.unlink, m$3 = e$6.cache, h = y$3(e$6.cwd), d = (k$1) => {
|
|
1880
|
+
q$1(m$3, n$4, true), k$1 && i$7 && x.sync(k$1, f$4, t$6), c$5 && l$2.chmodSync(n$4, r);
|
|
2739
1881
|
};
|
|
2740
|
-
if (m$
|
|
2741
|
-
if (n$4 === h
|
|
2742
|
-
if (a$
|
|
2743
|
-
const $ = y$
|
|
2744
|
-
let S$
|
|
2745
|
-
for (let k$
|
|
2746
|
-
l$
|
|
1882
|
+
if (m$3 && v$2(m$3, n$4) === true) return d();
|
|
1883
|
+
if (n$4 === h) return L(h), d();
|
|
1884
|
+
if (a$10) return d(g.sync(n$4, r));
|
|
1885
|
+
const $ = y$3(p$1.relative(h, n$4)).split("/");
|
|
1886
|
+
let S$1 = null;
|
|
1887
|
+
for (let k$1 = $.shift(), o$5 = h; k$1 && (o$5 += "/" + k$1); k$1 = $.shift()) if (o$5 = y$3(p$1.resolve(o$5)), !v$2(m$3, o$5)) try {
|
|
1888
|
+
l$2.mkdirSync(o$5, r), S$1 = S$1 || o$5, q$1(m$3, o$5, !0);
|
|
2747
1889
|
} catch {
|
|
2748
|
-
const M
|
|
2749
|
-
if (M
|
|
2750
|
-
q$
|
|
1890
|
+
const M = l$2.lstatSync(o$5);
|
|
1891
|
+
if (M.isDirectory()) {
|
|
1892
|
+
q$1(m$3, o$5, true);
|
|
2751
1893
|
continue;
|
|
2752
|
-
} else if (u$
|
|
2753
|
-
l$
|
|
1894
|
+
} else if (u$5) {
|
|
1895
|
+
l$2.unlinkSync(o$5), l$2.mkdirSync(o$5, r), S$1 = S$1 || o$5, q$1(m$3, o$5, true);
|
|
2754
1896
|
continue;
|
|
2755
|
-
} else if (M
|
|
1897
|
+
} else if (M.isSymbolicLink()) return new D(o$5, o$5 + "/" + $.join("/"));
|
|
2756
1898
|
}
|
|
2757
|
-
return d
|
|
1899
|
+
return d(S$1);
|
|
2758
1900
|
}, r$1.exports;
|
|
2759
1901
|
}
|
|
2760
1902
|
var a$2, i;
|
|
2761
1903
|
function p() {
|
|
2762
1904
|
if (i) return a$2;
|
|
2763
1905
|
i = 1;
|
|
2764
|
-
const o$
|
|
1906
|
+
const o$5 = [
|
|
2765
1907
|
"|",
|
|
2766
1908
|
"<",
|
|
2767
1909
|
">",
|
|
2768
1910
|
"?",
|
|
2769
1911
|
":"
|
|
2770
|
-
], t$
|
|
1912
|
+
], t$6 = o$5.map((e$6) => String.fromCharCode(61440 + e$6.charCodeAt(0))), s$7 = new Map(o$5.map((e$6, r) => [e$6, t$6[r]])), c$5 = new Map(t$6.map((e$6, r) => [e$6, o$5[r]]));
|
|
2771
1913
|
return a$2 = {
|
|
2772
|
-
encode: (e$
|
|
2773
|
-
decode: (e$
|
|
1914
|
+
encode: (e$6) => o$5.reduce((r, n$4) => r.split(n$4).join(s$7.get(n$4)), e$6),
|
|
1915
|
+
decode: (e$6) => t$6.reduce((r, n$4) => r.split(n$4).join(c$5.get(n$4)), e$6)
|
|
2774
1916
|
}, a$2;
|
|
2775
1917
|
}
|
|
2776
1918
|
var o$2, n;
|
|
2777
1919
|
function a$1() {
|
|
2778
1920
|
if (n) return o$2;
|
|
2779
1921
|
n = 1;
|
|
2780
|
-
const r = Object.create(null), { hasOwnProperty: i$
|
|
2781
|
-
return o$2 = (e$
|
|
1922
|
+
const r = Object.create(null), { hasOwnProperty: i$7 } = Object.prototype;
|
|
1923
|
+
return o$2 = (e$6) => (i$7.call(r, e$6) || (r[e$6] = e$6.normalize("NFD")), r[e$6]), o$2;
|
|
2782
1924
|
}
|
|
2783
1925
|
var a, l;
|
|
2784
1926
|
function s() {
|
|
2785
1927
|
return l || (l = 1, a = (r) => {
|
|
2786
|
-
let e$
|
|
2787
|
-
for (; e$
|
|
2788
|
-
return i$
|
|
1928
|
+
let e$6 = r.length - 1, i$7 = -1;
|
|
1929
|
+
for (; e$6 > -1 && r.charAt(e$6) === "/";) i$7 = e$6, e$6--;
|
|
1930
|
+
return i$7 === -1 ? r : r.slice(0, i$7);
|
|
2789
1931
|
}), a;
|
|
2790
1932
|
}
|
|
2791
1933
|
var u$1, f$1;
|
|
2792
1934
|
function z() {
|
|
2793
1935
|
if (f$1) return u$1;
|
|
2794
1936
|
f$1 = 1;
|
|
2795
|
-
const l$
|
|
1937
|
+
const l$2 = j$1, m$3 = a$1(), g = s(), { join: d } = path, q$1 = (process.env.TESTING_TAR_FAKE_PLATFORM || process.platform) === "win32";
|
|
2796
1938
|
return u$1 = () => {
|
|
2797
|
-
const i$
|
|
2798
|
-
const s$
|
|
2799
|
-
if (!s$
|
|
1939
|
+
const i$7 = /* @__PURE__ */ new Map(), c$5 = /* @__PURE__ */ new Map(), v$2 = (e$6) => e$6.split("/").slice(0, -1).reduce((o$5, r) => (o$5.length && (r = d(o$5[o$5.length - 1], r)), o$5.push(r || "/"), o$5), []), a$10 = /* @__PURE__ */ new Set(), w$2 = (e$6) => {
|
|
1940
|
+
const s$7 = c$5.get(e$6);
|
|
1941
|
+
if (!s$7) throw new Error("function does not have any path reservations");
|
|
2800
1942
|
return {
|
|
2801
|
-
paths: s$
|
|
2802
|
-
dirs: [...s$
|
|
1943
|
+
paths: s$7.paths.map((o$5) => i$7.get(o$5)),
|
|
1944
|
+
dirs: [...s$7.dirs].map((o$5) => i$7.get(o$5))
|
|
2803
1945
|
};
|
|
2804
|
-
}, h
|
|
2805
|
-
const { paths: s$
|
|
2806
|
-
return s$
|
|
2807
|
-
}, p$
|
|
2808
|
-
if (!a$
|
|
2809
|
-
const { paths: s$
|
|
2810
|
-
return s$
|
|
2811
|
-
const n$4 = i$
|
|
2812
|
-
l$
|
|
2813
|
-
}), o$
|
|
2814
|
-
const n$4 = i$
|
|
2815
|
-
l$
|
|
2816
|
-
}), a$
|
|
1946
|
+
}, h = (e$6) => {
|
|
1947
|
+
const { paths: s$7, dirs: o$5 } = w$2(e$6);
|
|
1948
|
+
return s$7.every((r) => r[0] === e$6) && o$5.every((r) => r[0] instanceof Set && r[0].has(e$6));
|
|
1949
|
+
}, p$1 = (e$6) => a$10.has(e$6) || !h(e$6) ? false : (a$10.add(e$6), e$6(() => S$1(e$6)), true), S$1 = (e$6) => {
|
|
1950
|
+
if (!a$10.has(e$6)) return false;
|
|
1951
|
+
const { paths: s$7, dirs: o$5 } = c$5.get(e$6), r = /* @__PURE__ */ new Set();
|
|
1952
|
+
return s$7.forEach((t$6) => {
|
|
1953
|
+
const n$4 = i$7.get(t$6);
|
|
1954
|
+
l$2.equal(n$4[0], e$6), n$4.length === 1 ? i$7.delete(t$6) : (n$4.shift(), typeof n$4[0] == "function" ? r.add(n$4[0]) : n$4[0].forEach((E$1) => r.add(E$1)));
|
|
1955
|
+
}), o$5.forEach((t$6) => {
|
|
1956
|
+
const n$4 = i$7.get(t$6);
|
|
1957
|
+
l$2(n$4[0] instanceof Set), n$4[0].size === 1 && n$4.length === 1 ? i$7.delete(t$6) : n$4[0].size === 1 ? (n$4.shift(), r.add(n$4[0])) : n$4[0].delete(e$6);
|
|
1958
|
+
}), a$10.delete(e$6), r.forEach((t$6) => p$1(t$6)), true;
|
|
2817
1959
|
};
|
|
2818
1960
|
return {
|
|
2819
|
-
check: h
|
|
2820
|
-
reserve: (e$
|
|
2821
|
-
e$
|
|
2822
|
-
const o$
|
|
2823
|
-
return c$
|
|
2824
|
-
dirs: o$
|
|
2825
|
-
paths: e$
|
|
2826
|
-
}), e$
|
|
2827
|
-
const t$
|
|
2828
|
-
t$
|
|
2829
|
-
}), o$
|
|
2830
|
-
const t$
|
|
2831
|
-
t$
|
|
2832
|
-
}), p$
|
|
1961
|
+
check: h,
|
|
1962
|
+
reserve: (e$6, s$7) => {
|
|
1963
|
+
e$6 = q$1 ? ["win32 parallelization disabled"] : e$6.map((r) => g(d(m$3(r))).toLowerCase());
|
|
1964
|
+
const o$5 = new Set(e$6.map((r) => v$2(r)).reduce((r, t$6) => r.concat(t$6)));
|
|
1965
|
+
return c$5.set(s$7, {
|
|
1966
|
+
dirs: o$5,
|
|
1967
|
+
paths: e$6
|
|
1968
|
+
}), e$6.forEach((r) => {
|
|
1969
|
+
const t$6 = i$7.get(r);
|
|
1970
|
+
t$6 ? t$6.push(s$7) : i$7.set(r, [s$7]);
|
|
1971
|
+
}), o$5.forEach((r) => {
|
|
1972
|
+
const t$6 = i$7.get(r);
|
|
1973
|
+
t$6 ? t$6[t$6.length - 1] instanceof Set ? t$6[t$6.length - 1].add(s$7) : t$6.push(new Set([s$7])) : i$7.set(r, [new Set([s$7])]);
|
|
1974
|
+
}), p$1(s$7);
|
|
2833
1975
|
}
|
|
2834
1976
|
};
|
|
2835
1977
|
}, u$1;
|
|
2836
1978
|
}
|
|
2837
1979
|
var o$1, u;
|
|
2838
|
-
function c
|
|
1980
|
+
function c() {
|
|
2839
1981
|
if (u) return o$1;
|
|
2840
1982
|
u = 1;
|
|
2841
|
-
const { isAbsolute: l$
|
|
1983
|
+
const { isAbsolute: l$2, parse: t$6 } = path.win32;
|
|
2842
1984
|
return o$1 = (r) => {
|
|
2843
|
-
let s$
|
|
2844
|
-
for (; l$
|
|
2845
|
-
const i$
|
|
2846
|
-
r = r.slice(i$
|
|
1985
|
+
let s$7 = "", e$6 = t$6(r);
|
|
1986
|
+
for (; l$2(r) || e$6.root;) {
|
|
1987
|
+
const i$7 = r.charAt(0) === "/" && r.slice(0, 4) !== "//?/" ? "/" : e$6.root;
|
|
1988
|
+
r = r.slice(i$7.length), s$7 += i$7, e$6 = t$6(r);
|
|
2847
1989
|
}
|
|
2848
|
-
return [s$
|
|
1990
|
+
return [s$7, r];
|
|
2849
1991
|
}, o$1;
|
|
2850
1992
|
}
|
|
2851
1993
|
var e, o;
|
|
2852
1994
|
function F() {
|
|
2853
1995
|
if (o) return e;
|
|
2854
1996
|
o = 1;
|
|
2855
|
-
const t$
|
|
2856
|
-
return e = c$
|
|
1997
|
+
const t$6 = process.env.__FAKE_PLATFORM__ || process.platform, s$7 = typeof Bun < "u" ? false : t$6 === "win32", { O_CREAT: _$1, O_TRUNC: a$10, O_WRONLY: i$7, UV_FS_O_FILEMAP: r = 0 } = (commonjsGlobal.__FAKE_TESTING_FS__ || nativeFs).constants, c$5 = s$7 && !!r, f$4 = 512 * 1024, p$1 = r | a$10 | _$1 | i$7;
|
|
1998
|
+
return e = c$5 ? (l$2) => l$2 < f$4 ? p$1 : "w" : () => "w", e;
|
|
2857
1999
|
}
|
|
2858
2000
|
var G, y;
|
|
2859
2001
|
function Os() {
|
|
2860
2002
|
if (y) return G;
|
|
2861
2003
|
y = 1;
|
|
2862
|
-
const ss = j$1, is = rt(), r = nativeFs, es = X(), w$
|
|
2863
|
-
if (!C$
|
|
2864
|
-
const i$
|
|
2865
|
-
r.rename(a$
|
|
2866
|
-
if (e$
|
|
2867
|
-
r.unlink(i$
|
|
2004
|
+
const ss = j$1, is = rt(), r = nativeFs, es = X(), w$2 = path, M = H(), K = p(), ts = z(), os$1 = c(), l$2 = a$7(), rs = s(), hs = a$1(), H$1$1 = Symbol("onEntry"), q$1 = Symbol("checkFs"), Y = Symbol("checkFs2"), v$2 = Symbol("pruneCache"), N = Symbol("isReusable"), d = Symbol("makeFs"), U = Symbol("file"), F$1$1 = Symbol("directory"), O$3 = Symbol("link"), B = Symbol("symlink"), z$1 = Symbol("hardlink"), W = Symbol("unsupported"), j$2 = Symbol("checkPath"), b = Symbol("mkdir"), m$3 = Symbol("onError"), $ = Symbol("pending"), V$1 = Symbol("pend"), S$1 = Symbol("unpend"), P$1 = Symbol("ended"), A = Symbol("maybeClose"), x = Symbol("skip"), E$1 = Symbol("doChown"), R$2 = Symbol("uid"), _$1 = Symbol("gid"), g = Symbol("checkedCwd"), X$1$1 = Ds, J$1 = F(), C$1 = (process.env.TESTING_TAR_FAKE_PLATFORM || process.platform) === "win32", cs = 1024, as = (a$10, s$7) => {
|
|
2005
|
+
if (!C$1) return r.unlink(a$10, s$7);
|
|
2006
|
+
const i$7 = a$10 + ".DELETE." + X$1$1.randomBytes(16).toString("hex");
|
|
2007
|
+
r.rename(a$10, i$7, (e$6) => {
|
|
2008
|
+
if (e$6) return s$7(e$6);
|
|
2009
|
+
r.unlink(i$7, s$7);
|
|
2868
2010
|
});
|
|
2869
|
-
}, us = (a$
|
|
2870
|
-
if (!C$
|
|
2871
|
-
const s$
|
|
2872
|
-
r.renameSync(a$
|
|
2873
|
-
}, Q = (a$
|
|
2874
|
-
s$
|
|
2875
|
-
for (const i$
|
|
2876
|
-
const e$
|
|
2877
|
-
(e$
|
|
2878
|
-
}
|
|
2879
|
-
}, ms = (a$
|
|
2880
|
-
for (const s$
|
|
2011
|
+
}, us = (a$10) => {
|
|
2012
|
+
if (!C$1) return r.unlinkSync(a$10);
|
|
2013
|
+
const s$7 = a$10 + ".DELETE." + X$1$1.randomBytes(16).toString("hex");
|
|
2014
|
+
r.renameSync(a$10, s$7), r.unlinkSync(s$7);
|
|
2015
|
+
}, Q = (a$10, s$7, i$7) => a$10 === a$10 >>> 0 ? a$10 : s$7 === s$7 >>> 0 ? s$7 : i$7, Z = (a$10) => rs(l$2(hs(a$10))).toLowerCase(), ns = (a$10, s$7) => {
|
|
2016
|
+
s$7 = Z(s$7);
|
|
2017
|
+
for (const i$7 of a$10.keys()) {
|
|
2018
|
+
const e$6 = Z(i$7);
|
|
2019
|
+
(e$6 === s$7 || e$6.indexOf(s$7 + "/") === 0) && a$10.delete(i$7);
|
|
2020
|
+
}
|
|
2021
|
+
}, ms = (a$10) => {
|
|
2022
|
+
for (const s$7 of a$10.keys()) a$10.delete(s$7);
|
|
2881
2023
|
};
|
|
2882
2024
|
class L extends is {
|
|
2883
|
-
constructor(s$
|
|
2884
|
-
if (s$
|
|
2885
|
-
this[P$
|
|
2886
|
-
}, super(s$
|
|
2887
|
-
if (typeof s$
|
|
2888
|
-
if (s$
|
|
2889
|
-
this.uid = s$
|
|
2025
|
+
constructor(s$7) {
|
|
2026
|
+
if (s$7 || (s$7 = {}), s$7.ondone = (i$7) => {
|
|
2027
|
+
this[P$1] = true, this[A]();
|
|
2028
|
+
}, super(s$7), this[g] = false, this.reservations = ts(), this.transform = typeof s$7.transform == "function" ? s$7.transform : null, this.writable = true, this.readable = false, this[$] = 0, this[P$1] = false, this.dirCache = s$7.dirCache || /* @__PURE__ */ new Map(), typeof s$7.uid == "number" || typeof s$7.gid == "number") {
|
|
2029
|
+
if (typeof s$7.uid != "number" || typeof s$7.gid != "number") throw new TypeError("cannot set owner without number uid and gid");
|
|
2030
|
+
if (s$7.preserveOwner) throw new TypeError("cannot preserve owner in archive and also set owner explicitly");
|
|
2031
|
+
this.uid = s$7.uid, this.gid = s$7.gid, this.setOwner = true;
|
|
2890
2032
|
} else this.uid = null, this.gid = null, this.setOwner = false;
|
|
2891
|
-
s$
|
|
2033
|
+
s$7.preserveOwner === void 0 && typeof s$7.uid != "number" ? this.preserveOwner = process.getuid && process.getuid() === 0 : this.preserveOwner = !!s$7.preserveOwner, this.processUid = (this.preserveOwner || this.setOwner) && process.getuid ? process.getuid() : null, this.processGid = (this.preserveOwner || this.setOwner) && process.getgid ? process.getgid() : null, this.maxDepth = typeof s$7.maxDepth == "number" ? s$7.maxDepth : cs, this.forceChown = s$7.forceChown === true, this.win32 = !!s$7.win32 || C$1, this.newer = !!s$7.newer, this.keep = !!s$7.keep, this.noMtime = !!s$7.noMtime, this.preservePaths = !!s$7.preservePaths, this.unlink = !!s$7.unlink, this.cwd = l$2(w$2.resolve(s$7.cwd || process.cwd())), this.strip = +s$7.strip || 0, this.processUmask = s$7.noChmod ? 0 : process.umask(), this.umask = typeof s$7.umask == "number" ? s$7.umask : this.processUmask, this.dmode = s$7.dmode || 511 & ~this.umask, this.fmode = s$7.fmode || 438 & ~this.umask, this.on("entry", (i$7) => this[H$1$1](i$7));
|
|
2892
2034
|
}
|
|
2893
|
-
warn(s$
|
|
2894
|
-
return (s$
|
|
2035
|
+
warn(s$7, i$7, e$6 = {}) {
|
|
2036
|
+
return (s$7 === "TAR_BAD_ARCHIVE" || s$7 === "TAR_ABORT") && (e$6.recoverable = false), super.warn(s$7, i$7, e$6);
|
|
2895
2037
|
}
|
|
2896
|
-
[A
|
|
2897
|
-
this[P$
|
|
2038
|
+
[A]() {
|
|
2039
|
+
this[P$1] && this[$] === 0 && (this.emit("prefinish"), this.emit("finish"), this.emit("end"));
|
|
2898
2040
|
}
|
|
2899
|
-
[j$
|
|
2900
|
-
const i$
|
|
2041
|
+
[j$2](s$7) {
|
|
2042
|
+
const i$7 = l$2(s$7.path), e$6 = i$7.split("/");
|
|
2901
2043
|
if (this.strip) {
|
|
2902
|
-
if (e$
|
|
2903
|
-
if (s$
|
|
2904
|
-
const t$
|
|
2905
|
-
if (t$
|
|
2044
|
+
if (e$6.length < this.strip) return false;
|
|
2045
|
+
if (s$7.type === "Link") {
|
|
2046
|
+
const t$6 = l$2(s$7.linkpath).split("/");
|
|
2047
|
+
if (t$6.length >= this.strip) s$7.linkpath = t$6.slice(this.strip).join("/");
|
|
2906
2048
|
else return false;
|
|
2907
2049
|
}
|
|
2908
|
-
e$
|
|
2050
|
+
e$6.splice(0, this.strip), s$7.path = e$6.join("/");
|
|
2909
2051
|
}
|
|
2910
|
-
if (isFinite(this.maxDepth) && e$
|
|
2911
|
-
entry: s$
|
|
2912
|
-
path: i$
|
|
2913
|
-
depth: e$
|
|
2052
|
+
if (isFinite(this.maxDepth) && e$6.length > this.maxDepth) return this.warn("TAR_ENTRY_ERROR", "path excessively deep", {
|
|
2053
|
+
entry: s$7,
|
|
2054
|
+
path: i$7,
|
|
2055
|
+
depth: e$6.length,
|
|
2914
2056
|
maxDepth: this.maxDepth
|
|
2915
2057
|
}), false;
|
|
2916
2058
|
if (!this.preservePaths) {
|
|
2917
|
-
if (e$
|
|
2918
|
-
entry: s$
|
|
2919
|
-
path: i$
|
|
2059
|
+
if (e$6.includes("..") || C$1 && /^[a-z]:\.\.$/i.test(e$6[0])) return this.warn("TAR_ENTRY_ERROR", "path contains '..'", {
|
|
2060
|
+
entry: s$7,
|
|
2061
|
+
path: i$7
|
|
2920
2062
|
}), false;
|
|
2921
|
-
const [t$
|
|
2922
|
-
t$
|
|
2923
|
-
entry: s$
|
|
2924
|
-
path: i$
|
|
2063
|
+
const [t$6, o$5] = os$1(i$7);
|
|
2064
|
+
t$6 && (s$7.path = o$5, this.warn("TAR_ENTRY_INFO", `stripping ${t$6} from absolute path`, {
|
|
2065
|
+
entry: s$7,
|
|
2066
|
+
path: i$7
|
|
2925
2067
|
}));
|
|
2926
2068
|
}
|
|
2927
|
-
if (w$
|
|
2928
|
-
entry: s$
|
|
2929
|
-
path: l$
|
|
2930
|
-
resolvedPath: s$
|
|
2069
|
+
if (w$2.isAbsolute(s$7.path) ? s$7.absolute = l$2(w$2.resolve(s$7.path)) : s$7.absolute = l$2(w$2.resolve(this.cwd, s$7.path)), !this.preservePaths && s$7.absolute.indexOf(this.cwd + "/") !== 0 && s$7.absolute !== this.cwd) return this.warn("TAR_ENTRY_ERROR", "path escaped extraction target", {
|
|
2070
|
+
entry: s$7,
|
|
2071
|
+
path: l$2(s$7.path),
|
|
2072
|
+
resolvedPath: s$7.absolute,
|
|
2931
2073
|
cwd: this.cwd
|
|
2932
2074
|
}), false;
|
|
2933
|
-
if (s$
|
|
2075
|
+
if (s$7.absolute === this.cwd && s$7.type !== "Directory" && s$7.type !== "GNUDumpDir") return false;
|
|
2934
2076
|
if (this.win32) {
|
|
2935
|
-
const { root: t$
|
|
2936
|
-
s$
|
|
2937
|
-
const { root: o$
|
|
2938
|
-
s$
|
|
2077
|
+
const { root: t$6 } = w$2.win32.parse(s$7.absolute);
|
|
2078
|
+
s$7.absolute = t$6 + K.encode(s$7.absolute.slice(t$6.length));
|
|
2079
|
+
const { root: o$5 } = w$2.win32.parse(s$7.path);
|
|
2080
|
+
s$7.path = o$5 + K.encode(s$7.path.slice(o$5.length));
|
|
2939
2081
|
}
|
|
2940
2082
|
return true;
|
|
2941
2083
|
}
|
|
2942
|
-
[H$1$1](s$
|
|
2943
|
-
if (!this[j$
|
|
2944
|
-
switch (ss.equal(typeof s$
|
|
2084
|
+
[H$1$1](s$7) {
|
|
2085
|
+
if (!this[j$2](s$7)) return s$7.resume();
|
|
2086
|
+
switch (ss.equal(typeof s$7.absolute, "string"), s$7.type) {
|
|
2945
2087
|
case "Directory":
|
|
2946
|
-
case "GNUDumpDir": s$
|
|
2088
|
+
case "GNUDumpDir": s$7.mode && (s$7.mode = s$7.mode | 448);
|
|
2947
2089
|
case "File":
|
|
2948
2090
|
case "OldFile":
|
|
2949
2091
|
case "ContiguousFile":
|
|
2950
2092
|
case "Link":
|
|
2951
|
-
case "SymbolicLink": return this[q$
|
|
2093
|
+
case "SymbolicLink": return this[q$1](s$7);
|
|
2952
2094
|
case "CharacterDevice":
|
|
2953
2095
|
case "BlockDevice":
|
|
2954
2096
|
case "FIFO":
|
|
2955
|
-
default: return this[W
|
|
2097
|
+
default: return this[W](s$7);
|
|
2956
2098
|
}
|
|
2957
2099
|
}
|
|
2958
|
-
[m$
|
|
2959
|
-
s$
|
|
2100
|
+
[m$3](s$7, i$7) {
|
|
2101
|
+
s$7.name === "CwdError" ? this.emit("error", s$7) : (this.warn("TAR_ENTRY_ERROR", s$7, { entry: i$7 }), this[S$1](), i$7.resume());
|
|
2960
2102
|
}
|
|
2961
|
-
[b
|
|
2962
|
-
M
|
|
2103
|
+
[b](s$7, i$7, e$6) {
|
|
2104
|
+
M(l$2(s$7), {
|
|
2963
2105
|
uid: this.uid,
|
|
2964
2106
|
gid: this.gid,
|
|
2965
2107
|
processUid: this.processUid,
|
|
@@ -2969,275 +2111,275 @@ function Os() {
|
|
|
2969
2111
|
unlink: this.unlink,
|
|
2970
2112
|
cache: this.dirCache,
|
|
2971
2113
|
cwd: this.cwd,
|
|
2972
|
-
mode: i$
|
|
2114
|
+
mode: i$7,
|
|
2973
2115
|
noChmod: this.noChmod
|
|
2974
|
-
}, e$
|
|
2116
|
+
}, e$6);
|
|
2975
2117
|
}
|
|
2976
|
-
[E$
|
|
2977
|
-
return this.forceChown || this.preserveOwner && (typeof s$
|
|
2118
|
+
[E$1](s$7) {
|
|
2119
|
+
return this.forceChown || this.preserveOwner && (typeof s$7.uid == "number" && s$7.uid !== this.processUid || typeof s$7.gid == "number" && s$7.gid !== this.processGid) || typeof this.uid == "number" && this.uid !== this.processUid || typeof this.gid == "number" && this.gid !== this.processGid;
|
|
2978
2120
|
}
|
|
2979
|
-
[R$
|
|
2980
|
-
return Q(this.uid, s$
|
|
2121
|
+
[R$2](s$7) {
|
|
2122
|
+
return Q(this.uid, s$7.uid, this.processUid);
|
|
2981
2123
|
}
|
|
2982
|
-
[_$
|
|
2983
|
-
return Q(this.gid, s$
|
|
2124
|
+
[_$1](s$7) {
|
|
2125
|
+
return Q(this.gid, s$7.gid, this.processGid);
|
|
2984
2126
|
}
|
|
2985
|
-
[U
|
|
2986
|
-
const e$
|
|
2987
|
-
flags: J$1(s$
|
|
2988
|
-
mode: e$
|
|
2127
|
+
[U](s$7, i$7) {
|
|
2128
|
+
const e$6 = s$7.mode & 4095 || this.fmode, t$6 = new es.WriteStream(s$7.absolute, {
|
|
2129
|
+
flags: J$1(s$7.size),
|
|
2130
|
+
mode: e$6,
|
|
2989
2131
|
autoClose: false
|
|
2990
2132
|
});
|
|
2991
|
-
t$
|
|
2992
|
-
t$
|
|
2133
|
+
t$6.on("error", (c$5) => {
|
|
2134
|
+
t$6.fd && r.close(t$6.fd, () => {}), t$6.write = () => true, this[m$3](c$5, s$7), i$7();
|
|
2993
2135
|
});
|
|
2994
|
-
let o$
|
|
2995
|
-
const u$
|
|
2996
|
-
if (c$
|
|
2997
|
-
t$
|
|
2136
|
+
let o$5 = 1;
|
|
2137
|
+
const u$5 = (c$5) => {
|
|
2138
|
+
if (c$5) {
|
|
2139
|
+
t$6.fd && r.close(t$6.fd, () => {}), this[m$3](c$5, s$7), i$7();
|
|
2998
2140
|
return;
|
|
2999
2141
|
}
|
|
3000
|
-
--o$
|
|
3001
|
-
n$4 ? this[m$
|
|
2142
|
+
--o$5 === 0 && r.close(t$6.fd, (n$4) => {
|
|
2143
|
+
n$4 ? this[m$3](n$4, s$7) : this[S$1](), i$7();
|
|
3002
2144
|
});
|
|
3003
2145
|
};
|
|
3004
|
-
t$
|
|
3005
|
-
const n$4 = s$
|
|
3006
|
-
if (s$
|
|
3007
|
-
o$
|
|
3008
|
-
const f$
|
|
3009
|
-
r.futimes(p$
|
|
2146
|
+
t$6.on("finish", (c$5) => {
|
|
2147
|
+
const n$4 = s$7.absolute, p$1 = t$6.fd;
|
|
2148
|
+
if (s$7.mtime && !this.noMtime) {
|
|
2149
|
+
o$5++;
|
|
2150
|
+
const f$4 = s$7.atime || /* @__PURE__ */ new Date(), k$1 = s$7.mtime;
|
|
2151
|
+
r.futimes(p$1, f$4, k$1, (D) => D ? r.utimes(n$4, f$4, k$1, (I) => u$5(I && D)) : u$5());
|
|
3010
2152
|
}
|
|
3011
|
-
if (this[E$
|
|
3012
|
-
o$
|
|
3013
|
-
const f$
|
|
3014
|
-
r.fchown(p$
|
|
2153
|
+
if (this[E$1](s$7)) {
|
|
2154
|
+
o$5++;
|
|
2155
|
+
const f$4 = this[R$2](s$7), k$1 = this[_$1](s$7);
|
|
2156
|
+
r.fchown(p$1, f$4, k$1, (D) => D ? r.chown(n$4, f$4, k$1, (I) => u$5(I && D)) : u$5());
|
|
3015
2157
|
}
|
|
3016
|
-
u$
|
|
2158
|
+
u$5();
|
|
3017
2159
|
});
|
|
3018
|
-
const h
|
|
3019
|
-
h
|
|
3020
|
-
this[m$
|
|
3021
|
-
}), s$
|
|
3022
|
-
}
|
|
3023
|
-
[F$1$1](s$
|
|
3024
|
-
const e$
|
|
3025
|
-
this[b
|
|
3026
|
-
if (t$
|
|
3027
|
-
this[m$
|
|
2160
|
+
const h = this.transform && this.transform(s$7) || s$7;
|
|
2161
|
+
h !== s$7 && (h.on("error", (c$5) => {
|
|
2162
|
+
this[m$3](c$5, s$7), i$7();
|
|
2163
|
+
}), s$7.pipe(h)), h.pipe(t$6);
|
|
2164
|
+
}
|
|
2165
|
+
[F$1$1](s$7, i$7) {
|
|
2166
|
+
const e$6 = s$7.mode & 4095 || this.dmode;
|
|
2167
|
+
this[b](s$7.absolute, e$6, (t$6) => {
|
|
2168
|
+
if (t$6) {
|
|
2169
|
+
this[m$3](t$6, s$7), i$7();
|
|
3028
2170
|
return;
|
|
3029
2171
|
}
|
|
3030
|
-
let o$
|
|
3031
|
-
const u$
|
|
3032
|
-
--o$
|
|
2172
|
+
let o$5 = 1;
|
|
2173
|
+
const u$5 = (h) => {
|
|
2174
|
+
--o$5 === 0 && (i$7(), this[S$1](), s$7.resume());
|
|
3033
2175
|
};
|
|
3034
|
-
s$
|
|
2176
|
+
s$7.mtime && !this.noMtime && (o$5++, r.utimes(s$7.absolute, s$7.atime || /* @__PURE__ */ new Date(), s$7.mtime, u$5)), this[E$1](s$7) && (o$5++, r.chown(s$7.absolute, this[R$2](s$7), this[_$1](s$7), u$5)), u$5();
|
|
3035
2177
|
});
|
|
3036
2178
|
}
|
|
3037
|
-
[W
|
|
3038
|
-
s$
|
|
2179
|
+
[W](s$7) {
|
|
2180
|
+
s$7.unsupported = true, this.warn("TAR_ENTRY_UNSUPPORTED", `unsupported entry type: ${s$7.type}`, { entry: s$7 }), s$7.resume();
|
|
3039
2181
|
}
|
|
3040
|
-
[B
|
|
3041
|
-
this[O$
|
|
2182
|
+
[B](s$7, i$7) {
|
|
2183
|
+
this[O$3](s$7, s$7.linkpath, "symlink", i$7);
|
|
3042
2184
|
}
|
|
3043
|
-
[z$1
|
|
3044
|
-
const e$
|
|
3045
|
-
this[O$
|
|
2185
|
+
[z$1](s$7, i$7) {
|
|
2186
|
+
const e$6 = l$2(w$2.resolve(this.cwd, s$7.linkpath));
|
|
2187
|
+
this[O$3](s$7, e$6, "link", i$7);
|
|
3046
2188
|
}
|
|
3047
2189
|
[V$1]() {
|
|
3048
2190
|
this[$]++;
|
|
3049
2191
|
}
|
|
3050
|
-
[S$
|
|
3051
|
-
this[$]--, this[A
|
|
2192
|
+
[S$1]() {
|
|
2193
|
+
this[$]--, this[A]();
|
|
3052
2194
|
}
|
|
3053
|
-
[x
|
|
3054
|
-
this[S$
|
|
2195
|
+
[x](s$7) {
|
|
2196
|
+
this[S$1](), s$7.resume();
|
|
3055
2197
|
}
|
|
3056
|
-
[N
|
|
3057
|
-
return s$
|
|
2198
|
+
[N](s$7, i$7) {
|
|
2199
|
+
return s$7.type === "File" && !this.unlink && i$7.isFile() && i$7.nlink <= 1 && !C$1;
|
|
3058
2200
|
}
|
|
3059
|
-
[q$
|
|
2201
|
+
[q$1](s$7) {
|
|
3060
2202
|
this[V$1]();
|
|
3061
|
-
const i$
|
|
3062
|
-
s$
|
|
3063
|
-
}
|
|
3064
|
-
[v$
|
|
3065
|
-
s$
|
|
3066
|
-
}
|
|
3067
|
-
[Y](s$
|
|
3068
|
-
this[v$
|
|
3069
|
-
const e$
|
|
3070
|
-
this[v$
|
|
3071
|
-
}, t$
|
|
3072
|
-
this[b
|
|
3073
|
-
if (h
|
|
3074
|
-
this[m$
|
|
2203
|
+
const i$7 = [s$7.path];
|
|
2204
|
+
s$7.linkpath && i$7.push(s$7.linkpath), this.reservations.reserve(i$7, (e$6) => this[Y](s$7, e$6));
|
|
2205
|
+
}
|
|
2206
|
+
[v$2](s$7) {
|
|
2207
|
+
s$7.type === "SymbolicLink" ? ms(this.dirCache) : s$7.type !== "Directory" && ns(this.dirCache, s$7.absolute);
|
|
2208
|
+
}
|
|
2209
|
+
[Y](s$7, i$7) {
|
|
2210
|
+
this[v$2](s$7);
|
|
2211
|
+
const e$6 = (h) => {
|
|
2212
|
+
this[v$2](s$7), i$7(h);
|
|
2213
|
+
}, t$6 = () => {
|
|
2214
|
+
this[b](this.cwd, this.dmode, (h) => {
|
|
2215
|
+
if (h) {
|
|
2216
|
+
this[m$3](h, s$7), e$6();
|
|
3075
2217
|
return;
|
|
3076
2218
|
}
|
|
3077
|
-
this[g
|
|
2219
|
+
this[g] = true, o$5();
|
|
3078
2220
|
});
|
|
3079
|
-
}, o$
|
|
3080
|
-
if (s$
|
|
3081
|
-
const h
|
|
3082
|
-
if (h
|
|
3083
|
-
if (c$
|
|
3084
|
-
this[m$
|
|
2221
|
+
}, o$5 = () => {
|
|
2222
|
+
if (s$7.absolute !== this.cwd) {
|
|
2223
|
+
const h = l$2(w$2.dirname(s$7.absolute));
|
|
2224
|
+
if (h !== this.cwd) return this[b](h, this.dmode, (c$5) => {
|
|
2225
|
+
if (c$5) {
|
|
2226
|
+
this[m$3](c$5, s$7), e$6();
|
|
3085
2227
|
return;
|
|
3086
2228
|
}
|
|
3087
|
-
u$
|
|
2229
|
+
u$5();
|
|
3088
2230
|
});
|
|
3089
2231
|
}
|
|
3090
|
-
u$
|
|
3091
|
-
}, u$
|
|
3092
|
-
r.lstat(s$
|
|
3093
|
-
if (c$
|
|
3094
|
-
this[x
|
|
2232
|
+
u$5();
|
|
2233
|
+
}, u$5 = () => {
|
|
2234
|
+
r.lstat(s$7.absolute, (h, c$5) => {
|
|
2235
|
+
if (c$5 && (this.keep || this.newer && c$5.mtime > s$7.mtime)) {
|
|
2236
|
+
this[x](s$7), e$6();
|
|
3095
2237
|
return;
|
|
3096
2238
|
}
|
|
3097
|
-
if (h
|
|
3098
|
-
if (c$
|
|
3099
|
-
if (s$
|
|
3100
|
-
const n$4 = !this.noChmod && s$
|
|
3101
|
-
return n$4 ? r.chmod(s$
|
|
2239
|
+
if (h || this[N](s$7, c$5)) return this[d](null, s$7, e$6);
|
|
2240
|
+
if (c$5.isDirectory()) {
|
|
2241
|
+
if (s$7.type === "Directory") {
|
|
2242
|
+
const n$4 = !this.noChmod && s$7.mode && (c$5.mode & 4095) !== s$7.mode, p$1 = (f$4) => this[d](f$4, s$7, e$6);
|
|
2243
|
+
return n$4 ? r.chmod(s$7.absolute, s$7.mode, p$1) : p$1();
|
|
3102
2244
|
}
|
|
3103
|
-
if (s$
|
|
2245
|
+
if (s$7.absolute !== this.cwd) return r.rmdir(s$7.absolute, (n$4) => this[d](n$4, s$7, e$6));
|
|
3104
2246
|
}
|
|
3105
|
-
if (s$
|
|
3106
|
-
as(s$
|
|
2247
|
+
if (s$7.absolute === this.cwd) return this[d](null, s$7, e$6);
|
|
2248
|
+
as(s$7.absolute, (n$4) => this[d](n$4, s$7, e$6));
|
|
3107
2249
|
});
|
|
3108
2250
|
};
|
|
3109
|
-
this[g
|
|
2251
|
+
this[g] ? o$5() : t$6();
|
|
3110
2252
|
}
|
|
3111
|
-
[d
|
|
3112
|
-
if (s$
|
|
3113
|
-
this[m$
|
|
2253
|
+
[d](s$7, i$7, e$6) {
|
|
2254
|
+
if (s$7) {
|
|
2255
|
+
this[m$3](s$7, i$7), e$6();
|
|
3114
2256
|
return;
|
|
3115
2257
|
}
|
|
3116
|
-
switch (i$
|
|
2258
|
+
switch (i$7.type) {
|
|
3117
2259
|
case "File":
|
|
3118
2260
|
case "OldFile":
|
|
3119
|
-
case "ContiguousFile": return this[U
|
|
3120
|
-
case "Link": return this[z$1
|
|
3121
|
-
case "SymbolicLink": return this[B
|
|
2261
|
+
case "ContiguousFile": return this[U](i$7, e$6);
|
|
2262
|
+
case "Link": return this[z$1](i$7, e$6);
|
|
2263
|
+
case "SymbolicLink": return this[B](i$7, e$6);
|
|
3122
2264
|
case "Directory":
|
|
3123
|
-
case "GNUDumpDir": return this[F$1$1](i$
|
|
2265
|
+
case "GNUDumpDir": return this[F$1$1](i$7, e$6);
|
|
3124
2266
|
}
|
|
3125
2267
|
}
|
|
3126
|
-
[O$
|
|
3127
|
-
r[e$
|
|
3128
|
-
o$
|
|
2268
|
+
[O$3](s$7, i$7, e$6, t$6) {
|
|
2269
|
+
r[e$6](i$7, s$7.absolute, (o$5) => {
|
|
2270
|
+
o$5 ? this[m$3](o$5, s$7) : (this[S$1](), s$7.resume()), t$6();
|
|
3129
2271
|
});
|
|
3130
2272
|
}
|
|
3131
2273
|
}
|
|
3132
|
-
const T$
|
|
2274
|
+
const T$1 = (a$10) => {
|
|
3133
2275
|
try {
|
|
3134
|
-
return [null, a$
|
|
3135
|
-
} catch (s$
|
|
3136
|
-
return [s$
|
|
2276
|
+
return [null, a$10()];
|
|
2277
|
+
} catch (s$7) {
|
|
2278
|
+
return [s$7, null];
|
|
3137
2279
|
}
|
|
3138
2280
|
};
|
|
3139
2281
|
class ls extends L {
|
|
3140
|
-
[d
|
|
3141
|
-
return super[d
|
|
3142
|
-
}
|
|
3143
|
-
[q$
|
|
3144
|
-
if (this[v$
|
|
3145
|
-
const o$
|
|
3146
|
-
if (o$
|
|
3147
|
-
this[g
|
|
2282
|
+
[d](s$7, i$7) {
|
|
2283
|
+
return super[d](s$7, i$7, () => {});
|
|
2284
|
+
}
|
|
2285
|
+
[q$1](s$7) {
|
|
2286
|
+
if (this[v$2](s$7), !this[g]) {
|
|
2287
|
+
const o$5 = this[b](this.cwd, this.dmode);
|
|
2288
|
+
if (o$5) return this[m$3](o$5, s$7);
|
|
2289
|
+
this[g] = true;
|
|
3148
2290
|
}
|
|
3149
|
-
if (s$
|
|
3150
|
-
const o$
|
|
3151
|
-
if (o$
|
|
3152
|
-
const u$
|
|
3153
|
-
if (u$
|
|
2291
|
+
if (s$7.absolute !== this.cwd) {
|
|
2292
|
+
const o$5 = l$2(w$2.dirname(s$7.absolute));
|
|
2293
|
+
if (o$5 !== this.cwd) {
|
|
2294
|
+
const u$5 = this[b](o$5, this.dmode);
|
|
2295
|
+
if (u$5) return this[m$3](u$5, s$7);
|
|
3154
2296
|
}
|
|
3155
2297
|
}
|
|
3156
|
-
const [i$
|
|
3157
|
-
if (e$
|
|
3158
|
-
if (i$
|
|
3159
|
-
if (e$
|
|
3160
|
-
if (s$
|
|
3161
|
-
const [h
|
|
3162
|
-
r.chmodSync(s$
|
|
2298
|
+
const [i$7, e$6] = T$1(() => r.lstatSync(s$7.absolute));
|
|
2299
|
+
if (e$6 && (this.keep || this.newer && e$6.mtime > s$7.mtime)) return this[x](s$7);
|
|
2300
|
+
if (i$7 || this[N](s$7, e$6)) return this[d](null, s$7);
|
|
2301
|
+
if (e$6.isDirectory()) {
|
|
2302
|
+
if (s$7.type === "Directory") {
|
|
2303
|
+
const [h] = !this.noChmod && s$7.mode && (e$6.mode & 4095) !== s$7.mode ? T$1(() => {
|
|
2304
|
+
r.chmodSync(s$7.absolute, s$7.mode);
|
|
3163
2305
|
}) : [];
|
|
3164
|
-
return this[d
|
|
2306
|
+
return this[d](h, s$7);
|
|
3165
2307
|
}
|
|
3166
|
-
const [o$
|
|
3167
|
-
this[d
|
|
2308
|
+
const [o$5] = T$1(() => r.rmdirSync(s$7.absolute));
|
|
2309
|
+
this[d](o$5, s$7);
|
|
3168
2310
|
}
|
|
3169
|
-
const [t$
|
|
3170
|
-
this[d
|
|
2311
|
+
const [t$6] = s$7.absolute === this.cwd ? [] : T$1(() => us(s$7.absolute));
|
|
2312
|
+
this[d](t$6, s$7);
|
|
3171
2313
|
}
|
|
3172
|
-
[U
|
|
3173
|
-
const e$
|
|
3174
|
-
let c$
|
|
2314
|
+
[U](s$7, i$7) {
|
|
2315
|
+
const e$6 = s$7.mode & 4095 || this.fmode, t$6 = (h) => {
|
|
2316
|
+
let c$5;
|
|
3175
2317
|
try {
|
|
3176
|
-
r.closeSync(o$
|
|
2318
|
+
r.closeSync(o$5);
|
|
3177
2319
|
} catch (n$4) {
|
|
3178
|
-
c$
|
|
2320
|
+
c$5 = n$4;
|
|
3179
2321
|
}
|
|
3180
|
-
(h
|
|
2322
|
+
(h || c$5) && this[m$3](h || c$5, s$7), i$7();
|
|
3181
2323
|
};
|
|
3182
|
-
let o$
|
|
2324
|
+
let o$5;
|
|
3183
2325
|
try {
|
|
3184
|
-
o$
|
|
3185
|
-
} catch (h
|
|
3186
|
-
return t$
|
|
2326
|
+
o$5 = r.openSync(s$7.absolute, J$1(s$7.size), e$6);
|
|
2327
|
+
} catch (h) {
|
|
2328
|
+
return t$6(h);
|
|
3187
2329
|
}
|
|
3188
|
-
const u$
|
|
3189
|
-
u$
|
|
2330
|
+
const u$5 = this.transform && this.transform(s$7) || s$7;
|
|
2331
|
+
u$5 !== s$7 && (u$5.on("error", (h) => this[m$3](h, s$7)), s$7.pipe(u$5)), u$5.on("data", (h) => {
|
|
3190
2332
|
try {
|
|
3191
|
-
r.writeSync(o$
|
|
3192
|
-
} catch (c$
|
|
3193
|
-
t$
|
|
2333
|
+
r.writeSync(o$5, h, 0, h.length);
|
|
2334
|
+
} catch (c$5) {
|
|
2335
|
+
t$6(c$5);
|
|
3194
2336
|
}
|
|
3195
|
-
}), u$
|
|
3196
|
-
let c$
|
|
3197
|
-
if (s$
|
|
3198
|
-
const n$4 = s$
|
|
2337
|
+
}), u$5.on("end", (h) => {
|
|
2338
|
+
let c$5 = null;
|
|
2339
|
+
if (s$7.mtime && !this.noMtime) {
|
|
2340
|
+
const n$4 = s$7.atime || /* @__PURE__ */ new Date(), p$1 = s$7.mtime;
|
|
3199
2341
|
try {
|
|
3200
|
-
r.futimesSync(o$
|
|
3201
|
-
} catch (f$
|
|
2342
|
+
r.futimesSync(o$5, n$4, p$1);
|
|
2343
|
+
} catch (f$4) {
|
|
3202
2344
|
try {
|
|
3203
|
-
r.utimesSync(s$
|
|
2345
|
+
r.utimesSync(s$7.absolute, n$4, p$1);
|
|
3204
2346
|
} catch {
|
|
3205
|
-
c$
|
|
2347
|
+
c$5 = f$4;
|
|
3206
2348
|
}
|
|
3207
2349
|
}
|
|
3208
2350
|
}
|
|
3209
|
-
if (this[E$
|
|
3210
|
-
const n$4 = this[R$
|
|
2351
|
+
if (this[E$1](s$7)) {
|
|
2352
|
+
const n$4 = this[R$2](s$7), p$1 = this[_$1](s$7);
|
|
3211
2353
|
try {
|
|
3212
|
-
r.fchownSync(o$
|
|
3213
|
-
} catch (f$
|
|
2354
|
+
r.fchownSync(o$5, n$4, p$1);
|
|
2355
|
+
} catch (f$4) {
|
|
3214
2356
|
try {
|
|
3215
|
-
r.chownSync(s$
|
|
2357
|
+
r.chownSync(s$7.absolute, n$4, p$1);
|
|
3216
2358
|
} catch {
|
|
3217
|
-
c$
|
|
2359
|
+
c$5 = c$5 || f$4;
|
|
3218
2360
|
}
|
|
3219
2361
|
}
|
|
3220
2362
|
}
|
|
3221
|
-
t$
|
|
2363
|
+
t$6(c$5);
|
|
3222
2364
|
});
|
|
3223
2365
|
}
|
|
3224
|
-
[F$1$1](s$
|
|
3225
|
-
const e$
|
|
3226
|
-
if (t$
|
|
3227
|
-
this[m$
|
|
2366
|
+
[F$1$1](s$7, i$7) {
|
|
2367
|
+
const e$6 = s$7.mode & 4095 || this.dmode, t$6 = this[b](s$7.absolute, e$6);
|
|
2368
|
+
if (t$6) {
|
|
2369
|
+
this[m$3](t$6, s$7), i$7();
|
|
3228
2370
|
return;
|
|
3229
2371
|
}
|
|
3230
|
-
if (s$
|
|
3231
|
-
r.utimesSync(s$
|
|
2372
|
+
if (s$7.mtime && !this.noMtime) try {
|
|
2373
|
+
r.utimesSync(s$7.absolute, s$7.atime || /* @__PURE__ */ new Date(), s$7.mtime);
|
|
3232
2374
|
} catch {}
|
|
3233
|
-
if (this[E$
|
|
3234
|
-
r.chownSync(s$
|
|
2375
|
+
if (this[E$1](s$7)) try {
|
|
2376
|
+
r.chownSync(s$7.absolute, this[R$2](s$7), this[_$1](s$7));
|
|
3235
2377
|
} catch {}
|
|
3236
|
-
i$
|
|
2378
|
+
i$7(), s$7.resume();
|
|
3237
2379
|
}
|
|
3238
|
-
[b
|
|
2380
|
+
[b](s$7, i$7) {
|
|
3239
2381
|
try {
|
|
3240
|
-
return M
|
|
2382
|
+
return M.sync(l$2(s$7), {
|
|
3241
2383
|
uid: this.uid,
|
|
3242
2384
|
gid: this.gid,
|
|
3243
2385
|
processUid: this.processUid,
|
|
@@ -3247,17 +2389,17 @@ function Os() {
|
|
|
3247
2389
|
unlink: this.unlink,
|
|
3248
2390
|
cache: this.dirCache,
|
|
3249
2391
|
cwd: this.cwd,
|
|
3250
|
-
mode: i$
|
|
2392
|
+
mode: i$7
|
|
3251
2393
|
});
|
|
3252
|
-
} catch (e$
|
|
3253
|
-
return e$
|
|
2394
|
+
} catch (e$6) {
|
|
2395
|
+
return e$6;
|
|
3254
2396
|
}
|
|
3255
2397
|
}
|
|
3256
|
-
[O$
|
|
2398
|
+
[O$3](s$7, i$7, e$6, t$6) {
|
|
3257
2399
|
try {
|
|
3258
|
-
r[e$
|
|
3259
|
-
} catch (o$
|
|
3260
|
-
return this[m$
|
|
2400
|
+
r[e$6 + "Sync"](i$7, s$7.absolute), t$6(), s$7.resume();
|
|
2401
|
+
} catch (o$5) {
|
|
2402
|
+
return this[m$3](o$5, s$7);
|
|
3261
2403
|
}
|
|
3262
2404
|
}
|
|
3263
2405
|
}
|
|
@@ -3267,41 +2409,41 @@ var f, q;
|
|
|
3267
2409
|
function v() {
|
|
3268
2410
|
if (q) return f;
|
|
3269
2411
|
q = 1;
|
|
3270
|
-
const w$
|
|
3271
|
-
f = (r, e$
|
|
3272
|
-
typeof r == "function" ? (o$
|
|
3273
|
-
const t$
|
|
3274
|
-
if (t$
|
|
3275
|
-
if (!t$
|
|
3276
|
-
return e$
|
|
2412
|
+
const w$2 = s$6(), u$5 = Os(), p$1 = nativeFs, y$3 = X(), l$2 = path, m$3 = s();
|
|
2413
|
+
f = (r, e$6, o$5) => {
|
|
2414
|
+
typeof r == "function" ? (o$5 = r, e$6 = null, r = {}) : Array.isArray(r) && (e$6 = r, r = {}), typeof e$6 == "function" && (o$5 = e$6, e$6 = null), e$6 ? e$6 = Array.from(e$6) : e$6 = [];
|
|
2415
|
+
const t$6 = w$2(r);
|
|
2416
|
+
if (t$6.sync && typeof o$5 == "function") throw new TypeError("callback not supported for sync tar functions");
|
|
2417
|
+
if (!t$6.file && typeof o$5 == "function") throw new TypeError("callback only supported with file option");
|
|
2418
|
+
return e$6.length && d(t$6, e$6), t$6.file && t$6.sync ? $(t$6) : t$6.file ? h(t$6, o$5) : t$6.sync ? x(t$6) : z$1(t$6);
|
|
3277
2419
|
};
|
|
3278
|
-
const d
|
|
3279
|
-
const o$
|
|
3280
|
-
const a$
|
|
3281
|
-
return o$
|
|
2420
|
+
const d = (r, e$6) => {
|
|
2421
|
+
const o$5 = new Map(e$6.map((n$4) => [m$3(n$4), true])), t$6 = r.filter, s$7 = (n$4, i$7) => {
|
|
2422
|
+
const a$10 = i$7 || l$2.parse(n$4).root || ".", c$5 = n$4 === a$10 ? false : o$5.has(n$4) ? o$5.get(n$4) : s$7(l$2.dirname(n$4), a$10);
|
|
2423
|
+
return o$5.set(n$4, c$5), c$5;
|
|
3282
2424
|
};
|
|
3283
|
-
r.filter = t$
|
|
2425
|
+
r.filter = t$6 ? (n$4, i$7) => t$6(n$4, i$7) && s$7(m$3(n$4)) : (n$4) => s$7(m$3(n$4));
|
|
3284
2426
|
}, $ = (r) => {
|
|
3285
|
-
const e$
|
|
3286
|
-
new y$
|
|
3287
|
-
readSize: s$
|
|
3288
|
-
size: t$
|
|
3289
|
-
}).pipe(e$
|
|
3290
|
-
}, h
|
|
3291
|
-
const o$
|
|
3292
|
-
o$
|
|
3293
|
-
if (c$
|
|
2427
|
+
const e$6 = new u$5.Sync(r), o$5 = r.file, t$6 = p$1.statSync(o$5), s$7 = r.maxReadSize || 16 * 1024 * 1024;
|
|
2428
|
+
new y$3.ReadStreamSync(o$5, {
|
|
2429
|
+
readSize: s$7,
|
|
2430
|
+
size: t$6.size
|
|
2431
|
+
}).pipe(e$6);
|
|
2432
|
+
}, h = (r, e$6) => {
|
|
2433
|
+
const o$5 = new u$5(r), t$6 = r.maxReadSize || 16 * 1024 * 1024, s$7 = r.file, n$4 = new Promise((i$7, a$10) => {
|
|
2434
|
+
o$5.on("error", a$10), o$5.on("close", i$7), p$1.stat(s$7, (c$5, R$2) => {
|
|
2435
|
+
if (c$5) a$10(c$5);
|
|
3294
2436
|
else {
|
|
3295
|
-
const S$
|
|
3296
|
-
readSize: t$
|
|
3297
|
-
size: R$
|
|
2437
|
+
const S$1 = new y$3.ReadStream(s$7, {
|
|
2438
|
+
readSize: t$6,
|
|
2439
|
+
size: R$2.size
|
|
3298
2440
|
});
|
|
3299
|
-
S$
|
|
2441
|
+
S$1.on("error", a$10), S$1.pipe(o$5);
|
|
3300
2442
|
}
|
|
3301
2443
|
});
|
|
3302
2444
|
});
|
|
3303
|
-
return e$
|
|
3304
|
-
}, x
|
|
2445
|
+
return e$6 ? n$4.then(e$6, e$6) : n$4;
|
|
2446
|
+
}, x = (r) => new u$5.Sync(r), z$1 = (r) => new u$5(r);
|
|
3305
2447
|
return f;
|
|
3306
2448
|
}
|
|
3307
2449
|
const tarExtract = getDefaultExportFromCjs(v());
|
|
@@ -3322,11 +2464,11 @@ async function download(url, filePath, options = {}) {
|
|
|
3322
2464
|
}
|
|
3323
2465
|
const inputRegex = /^(?<repo>[\w.-]+\/[\w.-]+)(?<subdir>[^#]+)?(?<ref>#[\w./@-]+)?/;
|
|
3324
2466
|
function parseGitURI(input) {
|
|
3325
|
-
const m$
|
|
2467
|
+
const m$3 = input.match(inputRegex)?.groups || {};
|
|
3326
2468
|
return {
|
|
3327
|
-
repo: m$
|
|
3328
|
-
subdir: m$
|
|
3329
|
-
ref: m$
|
|
2469
|
+
repo: m$3.repo,
|
|
2470
|
+
subdir: m$3.subdir || "/",
|
|
2471
|
+
ref: m$3.ref ? m$3.ref.slice(1) : "main"
|
|
3330
2472
|
};
|
|
3331
2473
|
}
|
|
3332
2474
|
function debug(...args) {
|
|
@@ -3344,9 +2486,9 @@ async function sendFetch(url, options = {}) {
|
|
|
3344
2486
|
return res;
|
|
3345
2487
|
}
|
|
3346
2488
|
function cacheDirectory() {
|
|
3347
|
-
const cacheDir = process.env.XDG_CACHE_HOME ? resolve$
|
|
2489
|
+
const cacheDir = process.env.XDG_CACHE_HOME ? resolve$1(process.env.XDG_CACHE_HOME, "giget") : resolve$1(homedir(), ".cache/giget");
|
|
3348
2490
|
if (process.platform === "win32") {
|
|
3349
|
-
const windowsCacheDir = resolve$
|
|
2491
|
+
const windowsCacheDir = resolve$1(tmpdir(), "giget");
|
|
3350
2492
|
if (!existsSync(windowsCacheDir) && existsSync(cacheDir)) try {
|
|
3351
2493
|
renameSync(cacheDir, windowsCacheDir);
|
|
3352
2494
|
} catch {}
|
|
@@ -3365,7 +2507,7 @@ function normalizeHeaders(headers = {}) {
|
|
|
3365
2507
|
const http = async (input, options) => {
|
|
3366
2508
|
if (input.endsWith(".json")) return await _httpJSON(input, options);
|
|
3367
2509
|
const url = new URL(input);
|
|
3368
|
-
let name = basename$
|
|
2510
|
+
let name = basename$1(url.pathname);
|
|
3369
2511
|
try {
|
|
3370
2512
|
const head = await sendFetch(url.href, {
|
|
3371
2513
|
method: "HEAD",
|
|
@@ -3493,10 +2635,10 @@ async function downloadTemplate(input, options = {}) {
|
|
|
3493
2635
|
if (!template) throw new Error(`Failed to resolve template from ${providerName}`);
|
|
3494
2636
|
template.name = (template.name || "template").replace(/[^\da-z-]/gi, "-");
|
|
3495
2637
|
template.defaultDir = (template.defaultDir || template.name).replace(/[^\da-z-]/gi, "-");
|
|
3496
|
-
const tarPath = resolve$
|
|
2638
|
+
const tarPath = resolve$1(resolve$1(cacheDirectory(), providerName, template.name), (template.version || template.name) + ".tar.gz");
|
|
3497
2639
|
if (options.preferOffline && existsSync(tarPath)) options.offline = true;
|
|
3498
2640
|
if (!options.offline) {
|
|
3499
|
-
await mkdir(dirname$
|
|
2641
|
+
await mkdir(dirname$1(tarPath), { recursive: true });
|
|
3500
2642
|
const s2 = Date.now();
|
|
3501
2643
|
await download(template.tar, tarPath, { headers: {
|
|
3502
2644
|
Authorization: options.auth ? `Bearer ${options.auth}` : void 0,
|
|
@@ -3509,14 +2651,14 @@ async function downloadTemplate(input, options = {}) {
|
|
|
3509
2651
|
debug(`Downloaded ${template.tar} to ${tarPath} in ${Date.now() - s2}ms`);
|
|
3510
2652
|
}
|
|
3511
2653
|
if (!existsSync(tarPath)) throw new Error(`Tarball not found: ${tarPath} (offline: ${options.offline})`);
|
|
3512
|
-
const extractPath = resolve$
|
|
2654
|
+
const extractPath = resolve$1(resolve$1(options.cwd || "."), options.dir || template.defaultDir);
|
|
3513
2655
|
if (options.forceClean) await rm(extractPath, {
|
|
3514
2656
|
recursive: true,
|
|
3515
2657
|
force: true
|
|
3516
2658
|
});
|
|
3517
2659
|
if (!options.force && existsSync(extractPath) && readdirSync(extractPath).length > 0) throw new Error(`Destination ${extractPath} already exists.`);
|
|
3518
2660
|
await mkdir(extractPath, { recursive: true });
|
|
3519
|
-
const s$
|
|
2661
|
+
const s$7 = Date.now();
|
|
3520
2662
|
const subdir = template.subdir?.replace(/^\//, "") || "";
|
|
3521
2663
|
await tarExtract({
|
|
3522
2664
|
file: tarPath,
|
|
@@ -3527,7 +2669,7 @@ async function downloadTemplate(input, options = {}) {
|
|
|
3527
2669
|
else entry.path = "";
|
|
3528
2670
|
}
|
|
3529
2671
|
});
|
|
3530
|
-
debug(`Extracted to ${extractPath} in ${Date.now() - s$
|
|
2672
|
+
debug(`Extracted to ${extractPath} in ${Date.now() - s$7}ms`);
|
|
3531
2673
|
if (options.install) {
|
|
3532
2674
|
debug("Installing dependencies...");
|
|
3533
2675
|
await installDependencies({
|
|
@@ -3547,4 +2689,4 @@ async function downloadTemplate(input, options = {}) {
|
|
|
3547
2689
|
var dist_exports = /* @__PURE__ */ __exportAll({ downloadTemplate: () => downloadTemplate });
|
|
3548
2690
|
|
|
3549
2691
|
//#endregion
|
|
3550
|
-
export {
|
|
2692
|
+
export { downloadTemplate as n, registryProvider as r, dist_exports as t };
|