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