appwrite-cli 15.1.0 → 17.0.0
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/CHANGELOG.md +17 -0
- package/README.md +4 -4
- package/cli.ts +2 -0
- package/dist/bundle-win-arm64.mjs +1785 -1288
- package/dist/cli.cjs +1729 -1232
- package/dist/index.cjs +836 -994
- package/dist/index.js +892 -1050
- package/dist/lib/commands/generators/typescript/databases.d.ts +5 -0
- package/dist/lib/commands/generators/typescript/databases.d.ts.map +1 -1
- package/dist/lib/commands/pull.d.ts.map +1 -1
- package/dist/lib/commands/push.d.ts.map +1 -1
- package/dist/lib/commands/run.d.ts.map +1 -1
- package/dist/lib/commands/services/webhooks.d.ts +3 -0
- package/dist/lib/commands/services/webhooks.d.ts.map +1 -0
- package/dist/lib/commands/utils/deployment.d.ts.map +1 -1
- package/dist/lib/constants.d.ts +1 -1
- package/dist/lib/parser.d.ts.map +1 -1
- package/dist/lib/questions.d.ts.map +1 -1
- package/docs/examples/project/create-variable.md +1 -0
- package/docs/examples/project/update-variable.md +1 -2
- package/docs/examples/users/update-impersonator.md +5 -0
- package/docs/examples/webhooks/create.md +7 -0
- package/docs/examples/webhooks/delete.md +4 -0
- package/docs/examples/webhooks/get.md +4 -0
- package/docs/examples/webhooks/list.md +3 -0
- package/docs/examples/webhooks/update-signature.md +4 -0
- package/docs/examples/webhooks/update.md +7 -0
- package/install.ps1 +2 -2
- package/install.sh +1 -1
- package/lib/commands/generators/typescript/databases.ts +36 -6
- package/lib/commands/pull.ts +30 -12
- package/lib/commands/push.ts +6 -24
- package/lib/commands/run.ts +5 -7
- package/lib/commands/services/account.ts +0 -169
- package/lib/commands/services/health.ts +0 -68
- package/lib/commands/services/project.ts +21 -12
- package/lib/commands/services/projects.ts +0 -112
- package/lib/commands/services/users.ts +14 -1
- package/lib/commands/services/webhooks.ts +134 -0
- package/lib/commands/utils/deployment.ts +4 -1
- package/lib/constants.ts +1 -1
- package/lib/parser.ts +1 -0
- package/lib/questions.ts +13 -7
- package/package.json +2 -2
- package/scoop/appwrite.config.json +3 -3
- package/docs/examples/projects/create-webhook.md +0 -8
- package/docs/examples/projects/delete-webhook.md +0 -5
- package/docs/examples/projects/get-webhook.md +0 -5
- package/docs/examples/projects/list-webhooks.md +0 -4
- package/docs/examples/projects/update-webhook-signature.md +0 -5
- package/docs/examples/projects/update-webhook.md +0 -9
package/dist/index.cjs
CHANGED
|
@@ -11200,16 +11200,16 @@ var require_share = __commonJS({
|
|
|
11200
11200
|
};
|
|
11201
11201
|
}
|
|
11202
11202
|
exports2.share = share;
|
|
11203
|
-
function handleReset(reset,
|
|
11203
|
+
function handleReset(reset, on) {
|
|
11204
11204
|
var args = [];
|
|
11205
11205
|
for (var _i2 = 2; _i2 < arguments.length; _i2++) {
|
|
11206
11206
|
args[_i2 - 2] = arguments[_i2];
|
|
11207
11207
|
}
|
|
11208
|
-
if (
|
|
11208
|
+
if (on === true) {
|
|
11209
11209
|
reset();
|
|
11210
11210
|
return;
|
|
11211
11211
|
}
|
|
11212
|
-
if (
|
|
11212
|
+
if (on === false) {
|
|
11213
11213
|
return;
|
|
11214
11214
|
}
|
|
11215
11215
|
var onSubscriber = new Subscriber_1.SafeSubscriber({
|
|
@@ -11218,7 +11218,7 @@ var require_share = __commonJS({
|
|
|
11218
11218
|
reset();
|
|
11219
11219
|
}
|
|
11220
11220
|
});
|
|
11221
|
-
return innerFrom_1.innerFrom(
|
|
11221
|
+
return innerFrom_1.innerFrom(on.apply(void 0, __spreadArray([], __read(args)))).subscribe(onSubscriber);
|
|
11222
11222
|
}
|
|
11223
11223
|
}
|
|
11224
11224
|
});
|
|
@@ -19581,9 +19581,9 @@ var require_stream_duplex = __commonJS({
|
|
|
19581
19581
|
}
|
|
19582
19582
|
});
|
|
19583
19583
|
|
|
19584
|
-
// node_modules/safe-buffer/index.js
|
|
19584
|
+
// node_modules/string_decoder/node_modules/safe-buffer/index.js
|
|
19585
19585
|
var require_safe_buffer = __commonJS({
|
|
19586
|
-
"node_modules/safe-buffer/index.js"(exports2, module2) {
|
|
19586
|
+
"node_modules/string_decoder/node_modules/safe-buffer/index.js"(exports2, module2) {
|
|
19587
19587
|
var buffer = require("buffer");
|
|
19588
19588
|
var Buffer2 = buffer.Buffer;
|
|
19589
19589
|
function copyProps(src, dst) {
|
|
@@ -53488,8 +53488,8 @@ var require_bignumber = __commonJS({
|
|
|
53488
53488
|
y2.s = -b2;
|
|
53489
53489
|
return x.plus(y2);
|
|
53490
53490
|
}
|
|
53491
|
-
var
|
|
53492
|
-
if (!
|
|
53491
|
+
var xe = x.e / LOG_BASE, ye2 = y2.e / LOG_BASE, xc = x.c, yc = y2.c;
|
|
53492
|
+
if (!xe || !ye2) {
|
|
53493
53493
|
if (!xc || !yc) return xc ? (y2.s = -b2, y2) : new BigNumber2(yc ? x : NaN);
|
|
53494
53494
|
if (!xc[0] || !yc[0]) {
|
|
53495
53495
|
return yc[0] ? (y2.s = -b2, y2) : new BigNumber2(xc[0] ? x : (
|
|
@@ -53498,15 +53498,15 @@ var require_bignumber = __commonJS({
|
|
|
53498
53498
|
));
|
|
53499
53499
|
}
|
|
53500
53500
|
}
|
|
53501
|
-
|
|
53501
|
+
xe = bitFloor(xe);
|
|
53502
53502
|
ye2 = bitFloor(ye2);
|
|
53503
53503
|
xc = xc.slice();
|
|
53504
|
-
if (a =
|
|
53504
|
+
if (a = xe - ye2) {
|
|
53505
53505
|
if (xLTy = a < 0) {
|
|
53506
53506
|
a = -a;
|
|
53507
53507
|
t = xc;
|
|
53508
53508
|
} else {
|
|
53509
|
-
ye2 =
|
|
53509
|
+
ye2 = xe;
|
|
53510
53510
|
t = yc;
|
|
53511
53511
|
}
|
|
53512
53512
|
t.reverse();
|
|
@@ -53633,17 +53633,17 @@ var require_bignumber = __commonJS({
|
|
|
53633
53633
|
y2.s = -b2;
|
|
53634
53634
|
return x.minus(y2);
|
|
53635
53635
|
}
|
|
53636
|
-
var
|
|
53637
|
-
if (!
|
|
53636
|
+
var xe = x.e / LOG_BASE, ye2 = y2.e / LOG_BASE, xc = x.c, yc = y2.c;
|
|
53637
|
+
if (!xe || !ye2) {
|
|
53638
53638
|
if (!xc || !yc) return new BigNumber2(a / 0);
|
|
53639
53639
|
if (!xc[0] || !yc[0]) return yc[0] ? y2 : new BigNumber2(xc[0] ? x : a * 0);
|
|
53640
53640
|
}
|
|
53641
|
-
|
|
53641
|
+
xe = bitFloor(xe);
|
|
53642
53642
|
ye2 = bitFloor(ye2);
|
|
53643
53643
|
xc = xc.slice();
|
|
53644
|
-
if (a =
|
|
53644
|
+
if (a = xe - ye2) {
|
|
53645
53645
|
if (a > 0) {
|
|
53646
|
-
ye2 =
|
|
53646
|
+
ye2 = xe;
|
|
53647
53647
|
t = yc;
|
|
53648
53648
|
} else {
|
|
53649
53649
|
a = -a;
|
|
@@ -55200,12 +55200,12 @@ var require_utils4 = __commonJS({
|
|
|
55200
55200
|
return str;
|
|
55201
55201
|
}
|
|
55202
55202
|
var codeCache = {};
|
|
55203
|
-
function addToCodeCache(name,
|
|
55204
|
-
|
|
55203
|
+
function addToCodeCache(name, on, off) {
|
|
55204
|
+
on = "\x1B[" + on + "m";
|
|
55205
55205
|
off = "\x1B[" + off + "m";
|
|
55206
|
-
codeCache[
|
|
55206
|
+
codeCache[on] = { set: name, to: true };
|
|
55207
55207
|
codeCache[off] = { set: name, to: false };
|
|
55208
|
-
codeCache[name] = { on
|
|
55208
|
+
codeCache[name] = { on, off };
|
|
55209
55209
|
}
|
|
55210
55210
|
addToCodeCache("bold", 1, 22);
|
|
55211
55211
|
addToCodeCache("italics", 3, 23);
|
|
@@ -62747,7 +62747,7 @@ var id_default = ID;
|
|
|
62747
62747
|
// lib/constants.ts
|
|
62748
62748
|
var SDK_TITLE = "Appwrite";
|
|
62749
62749
|
var SDK_TITLE_LOWER = "appwrite";
|
|
62750
|
-
var SDK_VERSION = "
|
|
62750
|
+
var SDK_VERSION = "17.0.0";
|
|
62751
62751
|
var SDK_LOGO = "\n _ _ _ ___ __ _____\n /_\\ _ __ _ ____ ___ __(_) |_ ___ / __\\ / / \\_ \\\n //_\\\\| '_ \\| '_ \\ \\ /\\ / / '__| | __/ _ \\ / / / / / /\\/\n / _ \\ |_) | |_) \\ V V /| | | | || __/ / /___/ /___/\\/ /_\n \\_/ \\_/ .__/| .__/ \\_/\\_/ |_| |_|\\__\\___| \\____/\\____/\\____/\n |_| |_|\n\n";
|
|
62752
62752
|
var EXECUTABLE_NAME = "appwrite";
|
|
62753
62753
|
var NPM_PACKAGE_NAME = "appwrite-cli";
|
|
@@ -78159,7 +78159,7 @@ var import_path2 = require("path");
|
|
|
78159
78159
|
var import_events2 = require("events");
|
|
78160
78160
|
var import_assert = __toESM(require("assert"), 1);
|
|
78161
78161
|
var import_buffer = require("buffer");
|
|
78162
|
-
var
|
|
78162
|
+
var ks = __toESM(require("zlib"), 1);
|
|
78163
78163
|
var import_zlib = __toESM(require("zlib"), 1);
|
|
78164
78164
|
var import_node_path2 = require("node:path");
|
|
78165
78165
|
var import_node_path3 = require("node:path");
|
|
@@ -78182,51 +78182,51 @@ var import_node_path7 = __toESM(require("node:path"), 1);
|
|
|
78182
78182
|
var import_node_path8 = require("node:path");
|
|
78183
78183
|
var import_node_fs6 = __toESM(require("node:fs"), 1);
|
|
78184
78184
|
var import_node_path9 = __toESM(require("node:path"), 1);
|
|
78185
|
-
var
|
|
78186
|
-
var
|
|
78187
|
-
for (var e in t)
|
|
78185
|
+
var kr = Object.defineProperty;
|
|
78186
|
+
var vr = (s3, t) => {
|
|
78187
|
+
for (var e in t) kr(s3, e, { get: t[e], enumerable: true });
|
|
78188
78188
|
};
|
|
78189
|
-
var
|
|
78190
|
-
var
|
|
78191
|
-
var
|
|
78192
|
-
var
|
|
78189
|
+
var Os = typeof process == "object" && process ? process : { stdout: null, stderr: null };
|
|
78190
|
+
var Br = (s3) => !!s3 && typeof s3 == "object" && (s3 instanceof D || s3 instanceof import_node_stream.default || Pr(s3) || zr(s3));
|
|
78191
|
+
var Pr = (s3) => !!s3 && typeof s3 == "object" && s3 instanceof import_node_events.EventEmitter && typeof s3.pipe == "function" && s3.pipe !== import_node_stream.default.Writable.prototype.pipe;
|
|
78192
|
+
var zr = (s3) => !!s3 && typeof s3 == "object" && s3 instanceof import_node_events.EventEmitter && typeof s3.write == "function" && typeof s3.end == "function";
|
|
78193
78193
|
var q = /* @__PURE__ */ Symbol("EOF");
|
|
78194
78194
|
var j = /* @__PURE__ */ Symbol("maybeEmitEnd");
|
|
78195
78195
|
var rt = /* @__PURE__ */ Symbol("emittedEnd");
|
|
78196
|
-
var
|
|
78196
|
+
var Le = /* @__PURE__ */ Symbol("emittingEnd");
|
|
78197
78197
|
var jt = /* @__PURE__ */ Symbol("emittedError");
|
|
78198
|
-
var
|
|
78199
|
-
var
|
|
78200
|
-
var
|
|
78201
|
-
var
|
|
78198
|
+
var Ne = /* @__PURE__ */ Symbol("closed");
|
|
78199
|
+
var Ts = /* @__PURE__ */ Symbol("read");
|
|
78200
|
+
var Ae = /* @__PURE__ */ Symbol("flush");
|
|
78201
|
+
var xs = /* @__PURE__ */ Symbol("flushChunk");
|
|
78202
78202
|
var z3 = /* @__PURE__ */ Symbol("encoding");
|
|
78203
78203
|
var Mt = /* @__PURE__ */ Symbol("decoder");
|
|
78204
78204
|
var b = /* @__PURE__ */ Symbol("flowing");
|
|
78205
78205
|
var Qt = /* @__PURE__ */ Symbol("paused");
|
|
78206
78206
|
var Bt = /* @__PURE__ */ Symbol("resume");
|
|
78207
|
-
var
|
|
78208
|
-
var
|
|
78209
|
-
var
|
|
78210
|
-
var
|
|
78207
|
+
var _ = /* @__PURE__ */ Symbol("buffer");
|
|
78208
|
+
var A = /* @__PURE__ */ Symbol("pipes");
|
|
78209
|
+
var g = /* @__PURE__ */ Symbol("bufferLength");
|
|
78210
|
+
var yi = /* @__PURE__ */ Symbol("bufferPush");
|
|
78211
78211
|
var De = /* @__PURE__ */ Symbol("bufferShift");
|
|
78212
78212
|
var L = /* @__PURE__ */ Symbol("objectMode");
|
|
78213
78213
|
var w = /* @__PURE__ */ Symbol("destroyed");
|
|
78214
|
-
var
|
|
78215
|
-
var
|
|
78216
|
-
var
|
|
78217
|
-
var
|
|
78214
|
+
var Ri = /* @__PURE__ */ Symbol("error");
|
|
78215
|
+
var bi = /* @__PURE__ */ Symbol("emitData");
|
|
78216
|
+
var Ls = /* @__PURE__ */ Symbol("emitEnd");
|
|
78217
|
+
var _i = /* @__PURE__ */ Symbol("emitEnd2");
|
|
78218
78218
|
var Z = /* @__PURE__ */ Symbol("async");
|
|
78219
78219
|
var gi = /* @__PURE__ */ Symbol("abort");
|
|
78220
|
-
var
|
|
78220
|
+
var Ie = /* @__PURE__ */ Symbol("aborted");
|
|
78221
78221
|
var Jt = /* @__PURE__ */ Symbol("signal");
|
|
78222
78222
|
var yt = /* @__PURE__ */ Symbol("dataListeners");
|
|
78223
78223
|
var C = /* @__PURE__ */ Symbol("discarded");
|
|
78224
78224
|
var te = (s3) => Promise.resolve().then(s3);
|
|
78225
|
-
var
|
|
78226
|
-
var
|
|
78227
|
-
var
|
|
78228
|
-
var
|
|
78229
|
-
var
|
|
78225
|
+
var Ur = (s3) => s3();
|
|
78226
|
+
var Hr = (s3) => s3 === "end" || s3 === "finish" || s3 === "prefinish";
|
|
78227
|
+
var Wr = (s3) => s3 instanceof ArrayBuffer || !!s3 && typeof s3 == "object" && s3.constructor && s3.constructor.name === "ArrayBuffer" && s3.byteLength >= 0;
|
|
78228
|
+
var Gr = (s3) => !Buffer.isBuffer(s3) && ArrayBuffer.isView(s3);
|
|
78229
|
+
var Ce = class {
|
|
78230
78230
|
src;
|
|
78231
78231
|
dest;
|
|
78232
78232
|
opts;
|
|
@@ -78243,7 +78243,7 @@ var Ie = class {
|
|
|
78243
78243
|
this.unpipe(), this.opts.end && this.dest.end();
|
|
78244
78244
|
}
|
|
78245
78245
|
};
|
|
78246
|
-
var
|
|
78246
|
+
var Oi = class extends Ce {
|
|
78247
78247
|
unpipe() {
|
|
78248
78248
|
this.src.removeListener("error", this.proxyErrors), super.unpipe();
|
|
78249
78249
|
}
|
|
@@ -78251,26 +78251,26 @@ var _i = class extends Ie {
|
|
|
78251
78251
|
super(t, e, i), this.proxyErrors = (r) => this.dest.emit("error", r), t.on("error", this.proxyErrors);
|
|
78252
78252
|
}
|
|
78253
78253
|
};
|
|
78254
|
-
var
|
|
78255
|
-
var
|
|
78256
|
-
var
|
|
78254
|
+
var Zr = (s3) => !!s3.objectMode;
|
|
78255
|
+
var Yr = (s3) => !s3.objectMode && !!s3.encoding && s3.encoding !== "buffer";
|
|
78256
|
+
var D = class extends import_node_events.EventEmitter {
|
|
78257
78257
|
[b] = false;
|
|
78258
78258
|
[Qt] = false;
|
|
78259
|
-
[
|
|
78260
|
-
[
|
|
78259
|
+
[A] = [];
|
|
78260
|
+
[_] = [];
|
|
78261
78261
|
[L];
|
|
78262
78262
|
[z3];
|
|
78263
78263
|
[Z];
|
|
78264
78264
|
[Mt];
|
|
78265
78265
|
[q] = false;
|
|
78266
78266
|
[rt] = false;
|
|
78267
|
-
[xe] = false;
|
|
78268
78267
|
[Le] = false;
|
|
78268
|
+
[Ne] = false;
|
|
78269
78269
|
[jt] = null;
|
|
78270
|
-
[
|
|
78270
|
+
[g] = 0;
|
|
78271
78271
|
[w] = false;
|
|
78272
78272
|
[Jt];
|
|
78273
|
-
[
|
|
78273
|
+
[Ie] = false;
|
|
78274
78274
|
[yt] = 0;
|
|
78275
78275
|
[C] = false;
|
|
78276
78276
|
writable = true;
|
|
@@ -78278,12 +78278,12 @@ var A = class extends import_node_events.EventEmitter {
|
|
|
78278
78278
|
constructor(...t) {
|
|
78279
78279
|
let e = t[0] || {};
|
|
78280
78280
|
if (super(), e.objectMode && typeof e.encoding == "string") throw new TypeError("Encoding and objectMode may not be used together");
|
|
78281
|
-
|
|
78281
|
+
Zr(e) ? (this[L] = true, this[z3] = null) : Yr(e) ? (this[z3] = e.encoding, this[L] = false) : (this[L] = false, this[z3] = null), this[Z] = !!e.async, this[Mt] = this[z3] ? new import_node_string_decoder.StringDecoder(this[z3]) : null, e && e.debugExposeBuffer === true && Object.defineProperty(this, "buffer", { get: () => this[_] }), e && e.debugExposePipes === true && Object.defineProperty(this, "pipes", { get: () => this[A] });
|
|
78282
78282
|
let { signal: i } = e;
|
|
78283
78283
|
i && (this[Jt] = i, i.aborted ? this[gi]() : i.addEventListener("abort", () => this[gi]()));
|
|
78284
78284
|
}
|
|
78285
78285
|
get bufferLength() {
|
|
78286
|
-
return this[
|
|
78286
|
+
return this[g];
|
|
78287
78287
|
}
|
|
78288
78288
|
get encoding() {
|
|
78289
78289
|
return this[z3];
|
|
@@ -78307,46 +78307,46 @@ var A = class extends import_node_events.EventEmitter {
|
|
|
78307
78307
|
this[Z] = this[Z] || !!t;
|
|
78308
78308
|
}
|
|
78309
78309
|
[gi]() {
|
|
78310
|
-
this[
|
|
78310
|
+
this[Ie] = true, this.emit("abort", this[Jt]?.reason), this.destroy(this[Jt]?.reason);
|
|
78311
78311
|
}
|
|
78312
78312
|
get aborted() {
|
|
78313
|
-
return this[
|
|
78313
|
+
return this[Ie];
|
|
78314
78314
|
}
|
|
78315
78315
|
set aborted(t) {
|
|
78316
78316
|
}
|
|
78317
78317
|
write(t, e, i) {
|
|
78318
|
-
if (this[
|
|
78318
|
+
if (this[Ie]) return false;
|
|
78319
78319
|
if (this[q]) throw new Error("write after end");
|
|
78320
78320
|
if (this[w]) return this.emit("error", Object.assign(new Error("Cannot call write after a stream was destroyed"), { code: "ERR_STREAM_DESTROYED" })), true;
|
|
78321
78321
|
typeof e == "function" && (i = e, e = "utf8"), e || (e = "utf8");
|
|
78322
|
-
let r = this[Z] ? te :
|
|
78322
|
+
let r = this[Z] ? te : Ur;
|
|
78323
78323
|
if (!this[L] && !Buffer.isBuffer(t)) {
|
|
78324
|
-
if (
|
|
78325
|
-
else if (
|
|
78324
|
+
if (Gr(t)) t = Buffer.from(t.buffer, t.byteOffset, t.byteLength);
|
|
78325
|
+
else if (Wr(t)) t = Buffer.from(t);
|
|
78326
78326
|
else if (typeof t != "string") throw new Error("Non-contiguous data written to non-objectMode stream");
|
|
78327
78327
|
}
|
|
78328
|
-
return this[L] ? (this[b] && this[
|
|
78328
|
+
return this[L] ? (this[b] && this[g] !== 0 && this[Ae](true), this[b] ? this.emit("data", t) : this[yi](t), this[g] !== 0 && this.emit("readable"), i && r(i), this[b]) : t.length ? (typeof t == "string" && !(e === this[z3] && !this[Mt]?.lastNeed) && (t = Buffer.from(t, e)), Buffer.isBuffer(t) && this[z3] && (t = this[Mt].write(t)), this[b] && this[g] !== 0 && this[Ae](true), this[b] ? this.emit("data", t) : this[yi](t), this[g] !== 0 && this.emit("readable"), i && r(i), this[b]) : (this[g] !== 0 && this.emit("readable"), i && r(i), this[b]);
|
|
78329
78329
|
}
|
|
78330
78330
|
read(t) {
|
|
78331
78331
|
if (this[w]) return null;
|
|
78332
|
-
if (this[C] = false, this[
|
|
78333
|
-
this[L] && (t = null), this[
|
|
78334
|
-
let e = this[
|
|
78332
|
+
if (this[C] = false, this[g] === 0 || t === 0 || t && t > this[g]) return this[j](), null;
|
|
78333
|
+
this[L] && (t = null), this[_].length > 1 && !this[L] && (this[_] = [this[z3] ? this[_].join("") : Buffer.concat(this[_], this[g])]);
|
|
78334
|
+
let e = this[Ts](t || null, this[_][0]);
|
|
78335
78335
|
return this[j](), e;
|
|
78336
78336
|
}
|
|
78337
|
-
[
|
|
78337
|
+
[Ts](t, e) {
|
|
78338
78338
|
if (this[L]) this[De]();
|
|
78339
78339
|
else {
|
|
78340
78340
|
let i = e;
|
|
78341
|
-
t === i.length || t === null ? this[De]() : typeof i == "string" ? (this[
|
|
78341
|
+
t === i.length || t === null ? this[De]() : typeof i == "string" ? (this[_][0] = i.slice(t), e = i.slice(0, t), this[g] -= t) : (this[_][0] = i.subarray(t), e = i.subarray(0, t), this[g] -= t);
|
|
78342
78342
|
}
|
|
78343
|
-
return this.emit("data", e), !this[
|
|
78343
|
+
return this.emit("data", e), !this[_].length && !this[q] && this.emit("drain"), e;
|
|
78344
78344
|
}
|
|
78345
78345
|
end(t, e, i) {
|
|
78346
78346
|
return typeof t == "function" && (i = t, t = void 0), typeof e == "function" && (i = e, e = "utf8"), t !== void 0 && this.write(t, e), i && this.once("end", i), this[q] = true, this.writable = false, (this[b] || !this[Qt]) && this[j](), this;
|
|
78347
78347
|
}
|
|
78348
78348
|
[Bt]() {
|
|
78349
|
-
this[w] || (!this[yt] && !this[
|
|
78349
|
+
this[w] || (!this[yt] && !this[A].length && (this[C] = true), this[Qt] = false, this[b] = true, this.emit("resume"), this[_].length ? this[Ae]() : this[q] ? this[j]() : this.emit("drain"));
|
|
78350
78350
|
}
|
|
78351
78351
|
resume() {
|
|
78352
78352
|
return this[Bt]();
|
|
@@ -78363,39 +78363,39 @@ var A = class extends import_node_events.EventEmitter {
|
|
|
78363
78363
|
get paused() {
|
|
78364
78364
|
return this[Qt];
|
|
78365
78365
|
}
|
|
78366
|
-
[
|
|
78367
|
-
this[L] ? this[
|
|
78366
|
+
[yi](t) {
|
|
78367
|
+
this[L] ? this[g] += 1 : this[g] += t.length, this[_].push(t);
|
|
78368
78368
|
}
|
|
78369
78369
|
[De]() {
|
|
78370
|
-
return this[L] ? this[
|
|
78370
|
+
return this[L] ? this[g] -= 1 : this[g] -= this[_][0].length, this[_].shift();
|
|
78371
78371
|
}
|
|
78372
|
-
[
|
|
78372
|
+
[Ae](t = false) {
|
|
78373
78373
|
do
|
|
78374
78374
|
;
|
|
78375
|
-
while (this[
|
|
78376
|
-
!t && !this[
|
|
78375
|
+
while (this[xs](this[De]()) && this[_].length);
|
|
78376
|
+
!t && !this[_].length && !this[q] && this.emit("drain");
|
|
78377
78377
|
}
|
|
78378
|
-
[
|
|
78378
|
+
[xs](t) {
|
|
78379
78379
|
return this.emit("data", t), this[b];
|
|
78380
78380
|
}
|
|
78381
78381
|
pipe(t, e) {
|
|
78382
78382
|
if (this[w]) return t;
|
|
78383
78383
|
this[C] = false;
|
|
78384
78384
|
let i = this[rt];
|
|
78385
|
-
return e = e || {}, t ===
|
|
78385
|
+
return e = e || {}, t === Os.stdout || t === Os.stderr ? e.end = false : e.end = e.end !== false, e.proxyErrors = !!e.proxyErrors, i ? e.end && t.end() : (this[A].push(e.proxyErrors ? new Oi(this, t, e) : new Ce(this, t, e)), this[Z] ? te(() => this[Bt]()) : this[Bt]()), t;
|
|
78386
78386
|
}
|
|
78387
78387
|
unpipe(t) {
|
|
78388
|
-
let e = this[
|
|
78389
|
-
e && (this[
|
|
78388
|
+
let e = this[A].find((i) => i.dest === t);
|
|
78389
|
+
e && (this[A].length === 1 ? (this[b] && this[yt] === 0 && (this[b] = false), this[A] = []) : this[A].splice(this[A].indexOf(e), 1), e.unpipe());
|
|
78390
78390
|
}
|
|
78391
78391
|
addListener(t, e) {
|
|
78392
78392
|
return this.on(t, e);
|
|
78393
78393
|
}
|
|
78394
78394
|
on(t, e) {
|
|
78395
78395
|
let i = super.on(t, e);
|
|
78396
|
-
if (t === "data") this[C] = false, this[yt]++, !this[
|
|
78397
|
-
else if (t === "readable" && this[
|
|
78398
|
-
else if (
|
|
78396
|
+
if (t === "data") this[C] = false, this[yt]++, !this[A].length && !this[b] && this[Bt]();
|
|
78397
|
+
else if (t === "readable" && this[g] !== 0) super.emit("readable");
|
|
78398
|
+
else if (Hr(t) && this[rt]) super.emit(t), this.removeAllListeners(t);
|
|
78399
78399
|
else if (t === "error" && this[jt]) {
|
|
78400
78400
|
let r = e;
|
|
78401
78401
|
this[Z] ? te(() => r.call(this, this[jt])) : r.call(this, this[jt]);
|
|
@@ -78407,29 +78407,29 @@ var A = class extends import_node_events.EventEmitter {
|
|
|
78407
78407
|
}
|
|
78408
78408
|
off(t, e) {
|
|
78409
78409
|
let i = super.off(t, e);
|
|
78410
|
-
return t === "data" && (this[yt] = this.listeners("data").length, this[yt] === 0 && !this[C] && !this[
|
|
78410
|
+
return t === "data" && (this[yt] = this.listeners("data").length, this[yt] === 0 && !this[C] && !this[A].length && (this[b] = false)), i;
|
|
78411
78411
|
}
|
|
78412
78412
|
removeAllListeners(t) {
|
|
78413
78413
|
let e = super.removeAllListeners(t);
|
|
78414
|
-
return (t === "data" || t === void 0) && (this[yt] = 0, !this[C] && !this[
|
|
78414
|
+
return (t === "data" || t === void 0) && (this[yt] = 0, !this[C] && !this[A].length && (this[b] = false)), e;
|
|
78415
78415
|
}
|
|
78416
78416
|
get emittedEnd() {
|
|
78417
78417
|
return this[rt];
|
|
78418
78418
|
}
|
|
78419
78419
|
[j]() {
|
|
78420
|
-
!this[
|
|
78420
|
+
!this[Le] && !this[rt] && !this[w] && this[_].length === 0 && this[q] && (this[Le] = true, this.emit("end"), this.emit("prefinish"), this.emit("finish"), this[Ne] && this.emit("close"), this[Le] = false);
|
|
78421
78421
|
}
|
|
78422
78422
|
emit(t, ...e) {
|
|
78423
78423
|
let i = e[0];
|
|
78424
78424
|
if (t !== "error" && t !== "close" && t !== w && this[w]) return false;
|
|
78425
|
-
if (t === "data") return !this[L] && !i ? false : this[Z] ? (te(() => this[
|
|
78426
|
-
if (t === "end") return this[
|
|
78425
|
+
if (t === "data") return !this[L] && !i ? false : this[Z] ? (te(() => this[bi](i)), true) : this[bi](i);
|
|
78426
|
+
if (t === "end") return this[Ls]();
|
|
78427
78427
|
if (t === "close") {
|
|
78428
|
-
if (this[
|
|
78428
|
+
if (this[Ne] = true, !this[rt] && !this[w]) return false;
|
|
78429
78429
|
let n = super.emit("close");
|
|
78430
78430
|
return this.removeAllListeners("close"), n;
|
|
78431
78431
|
} else if (t === "error") {
|
|
78432
|
-
this[jt] = i, super.emit(
|
|
78432
|
+
this[jt] = i, super.emit(Ri, i);
|
|
78433
78433
|
let n = !this[Jt] || this.listeners("error").length ? super.emit("error", i) : false;
|
|
78434
78434
|
return this[j](), n;
|
|
78435
78435
|
} else if (t === "resume") {
|
|
@@ -78442,23 +78442,23 @@ var A = class extends import_node_events.EventEmitter {
|
|
|
78442
78442
|
let r = super.emit(t, ...e);
|
|
78443
78443
|
return this[j](), r;
|
|
78444
78444
|
}
|
|
78445
|
-
[
|
|
78446
|
-
for (let i of this[
|
|
78445
|
+
[bi](t) {
|
|
78446
|
+
for (let i of this[A]) i.dest.write(t) === false && this.pause();
|
|
78447
78447
|
let e = this[C] ? false : super.emit("data", t);
|
|
78448
78448
|
return this[j](), e;
|
|
78449
78449
|
}
|
|
78450
|
-
[
|
|
78451
|
-
return this[rt] ? false : (this[rt] = true, this.readable = false, this[Z] ? (te(() => this[
|
|
78450
|
+
[Ls]() {
|
|
78451
|
+
return this[rt] ? false : (this[rt] = true, this.readable = false, this[Z] ? (te(() => this[_i]()), true) : this[_i]());
|
|
78452
78452
|
}
|
|
78453
|
-
[
|
|
78453
|
+
[_i]() {
|
|
78454
78454
|
if (this[Mt]) {
|
|
78455
78455
|
let e = this[Mt].end();
|
|
78456
78456
|
if (e) {
|
|
78457
|
-
for (let i of this[
|
|
78457
|
+
for (let i of this[A]) i.dest.write(e);
|
|
78458
78458
|
this[C] || super.emit("data", e);
|
|
78459
78459
|
}
|
|
78460
78460
|
}
|
|
78461
|
-
for (let e of this[
|
|
78461
|
+
for (let e of this[A]) e.end();
|
|
78462
78462
|
let t = super.emit("end");
|
|
78463
78463
|
return this.removeAllListeners("end"), t;
|
|
78464
78464
|
}
|
|
@@ -78505,67 +78505,67 @@ var A = class extends import_node_events.EventEmitter {
|
|
|
78505
78505
|
}
|
|
78506
78506
|
[Symbol.iterator]() {
|
|
78507
78507
|
this[C] = false;
|
|
78508
|
-
let t = false, e = () => (this.pause(), this.off(
|
|
78508
|
+
let t = false, e = () => (this.pause(), this.off(Ri, e), this.off(w, e), this.off("end", e), t = true, { done: true, value: void 0 }), i = () => {
|
|
78509
78509
|
if (t) return e();
|
|
78510
78510
|
let r = this.read();
|
|
78511
78511
|
return r === null ? e() : { done: false, value: r };
|
|
78512
78512
|
};
|
|
78513
|
-
return this.once("end", e), this.once(
|
|
78513
|
+
return this.once("end", e), this.once(Ri, e), this.once(w, e), { next: i, throw: e, return: e, [Symbol.iterator]() {
|
|
78514
78514
|
return this;
|
|
78515
78515
|
}, [Symbol.dispose]: () => {
|
|
78516
78516
|
} };
|
|
78517
78517
|
}
|
|
78518
78518
|
destroy(t) {
|
|
78519
78519
|
if (this[w]) return t ? this.emit("error", t) : this.emit(w), this;
|
|
78520
|
-
this[w] = true, this[C] = true, this[
|
|
78520
|
+
this[w] = true, this[C] = true, this[_].length = 0, this[g] = 0;
|
|
78521
78521
|
let e = this;
|
|
78522
|
-
return typeof e.close == "function" && !this[
|
|
78522
|
+
return typeof e.close == "function" && !this[Ne] && e.close(), t ? this.emit("error", t) : this.emit(w), this;
|
|
78523
78523
|
}
|
|
78524
78524
|
static get isStream() {
|
|
78525
|
-
return
|
|
78525
|
+
return Br;
|
|
78526
78526
|
}
|
|
78527
78527
|
};
|
|
78528
|
-
var
|
|
78528
|
+
var Vr = import_fs2.default.writev;
|
|
78529
78529
|
var ot = /* @__PURE__ */ Symbol("_autoClose");
|
|
78530
78530
|
var H = /* @__PURE__ */ Symbol("_close");
|
|
78531
78531
|
var ee = /* @__PURE__ */ Symbol("_ended");
|
|
78532
78532
|
var m = /* @__PURE__ */ Symbol("_fd");
|
|
78533
|
-
var
|
|
78533
|
+
var xi = /* @__PURE__ */ Symbol("_finished");
|
|
78534
78534
|
var J = /* @__PURE__ */ Symbol("_flags");
|
|
78535
|
-
var
|
|
78536
|
-
var
|
|
78537
|
-
var
|
|
78535
|
+
var Li = /* @__PURE__ */ Symbol("_flush");
|
|
78536
|
+
var Ii = /* @__PURE__ */ Symbol("_handleChunk");
|
|
78537
|
+
var Ci = /* @__PURE__ */ Symbol("_makeBuf");
|
|
78538
78538
|
var se = /* @__PURE__ */ Symbol("_mode");
|
|
78539
|
-
var
|
|
78539
|
+
var Fe = /* @__PURE__ */ Symbol("_needDrain");
|
|
78540
78540
|
var Ut = /* @__PURE__ */ Symbol("_onerror");
|
|
78541
78541
|
var Ht = /* @__PURE__ */ Symbol("_onopen");
|
|
78542
|
-
var
|
|
78542
|
+
var Ni = /* @__PURE__ */ Symbol("_onread");
|
|
78543
78543
|
var Pt = /* @__PURE__ */ Symbol("_onwrite");
|
|
78544
78544
|
var ht = /* @__PURE__ */ Symbol("_open");
|
|
78545
78545
|
var U = /* @__PURE__ */ Symbol("_path");
|
|
78546
78546
|
var nt = /* @__PURE__ */ Symbol("_pos");
|
|
78547
78547
|
var Y = /* @__PURE__ */ Symbol("_queue");
|
|
78548
78548
|
var zt = /* @__PURE__ */ Symbol("_read");
|
|
78549
|
-
var
|
|
78549
|
+
var Ai = /* @__PURE__ */ Symbol("_readSize");
|
|
78550
78550
|
var Q = /* @__PURE__ */ Symbol("_reading");
|
|
78551
78551
|
var ie = /* @__PURE__ */ Symbol("_remain");
|
|
78552
78552
|
var Di = /* @__PURE__ */ Symbol("_size");
|
|
78553
|
-
var
|
|
78553
|
+
var ke = /* @__PURE__ */ Symbol("_write");
|
|
78554
78554
|
var Rt = /* @__PURE__ */ Symbol("_writing");
|
|
78555
|
-
var
|
|
78555
|
+
var ve = /* @__PURE__ */ Symbol("_defaultFlag");
|
|
78556
78556
|
var bt = /* @__PURE__ */ Symbol("_errored");
|
|
78557
|
-
var
|
|
78557
|
+
var _t = class extends D {
|
|
78558
78558
|
[bt] = false;
|
|
78559
78559
|
[m];
|
|
78560
78560
|
[U];
|
|
78561
|
-
[
|
|
78561
|
+
[Ai];
|
|
78562
78562
|
[Q] = false;
|
|
78563
78563
|
[Di];
|
|
78564
78564
|
[ie];
|
|
78565
78565
|
[ot];
|
|
78566
78566
|
constructor(t, e) {
|
|
78567
78567
|
if (e = e || {}, super(e), this.readable = true, this.writable = false, typeof t != "string") throw new TypeError("path must be a string");
|
|
78568
|
-
this[bt] = false, this[m] = typeof e.fd == "number" ? e.fd : void 0, this[U] = t, this[
|
|
78568
|
+
this[bt] = false, this[m] = typeof e.fd == "number" ? e.fd : void 0, this[U] = t, this[Ai] = e.readSize || 16 * 1024 * 1024, this[Q] = false, this[Di] = typeof e.size == "number" ? e.size : 1 / 0, this[ie] = this[Di], this[ot] = typeof e.autoClose == "boolean" ? e.autoClose : true, typeof this[m] == "number" ? this[zt]() : this[ht]();
|
|
78569
78569
|
}
|
|
78570
78570
|
get fd() {
|
|
78571
78571
|
return this[m];
|
|
@@ -78585,19 +78585,19 @@ var gt = class extends A {
|
|
|
78585
78585
|
[Ht](t, e) {
|
|
78586
78586
|
t ? this[Ut](t) : (this[m] = e, this.emit("open", e), this[zt]());
|
|
78587
78587
|
}
|
|
78588
|
-
[
|
|
78589
|
-
return Buffer.allocUnsafe(Math.min(this[
|
|
78588
|
+
[Ci]() {
|
|
78589
|
+
return Buffer.allocUnsafe(Math.min(this[Ai], this[ie]));
|
|
78590
78590
|
}
|
|
78591
78591
|
[zt]() {
|
|
78592
78592
|
if (!this[Q]) {
|
|
78593
78593
|
this[Q] = true;
|
|
78594
|
-
let t = this[
|
|
78595
|
-
if (t.length === 0) return process.nextTick(() => this[
|
|
78596
|
-
import_fs2.default.read(this[m], t, 0, t.length, null, (e, i, r) => this[
|
|
78594
|
+
let t = this[Ci]();
|
|
78595
|
+
if (t.length === 0) return process.nextTick(() => this[Ni](null, 0, t));
|
|
78596
|
+
import_fs2.default.read(this[m], t, 0, t.length, null, (e, i, r) => this[Ni](e, i, r));
|
|
78597
78597
|
}
|
|
78598
78598
|
}
|
|
78599
|
-
[
|
|
78600
|
-
this[Q] = false, t ? this[Ut](t) : this[
|
|
78599
|
+
[Ni](t, e, i) {
|
|
78600
|
+
this[Q] = false, t ? this[Ut](t) : this[Ii](e, i) && this[zt]();
|
|
78601
78601
|
}
|
|
78602
78602
|
[H]() {
|
|
78603
78603
|
if (this[ot] && typeof this[m] == "number") {
|
|
@@ -78608,7 +78608,7 @@ var gt = class extends A {
|
|
|
78608
78608
|
[Ut](t) {
|
|
78609
78609
|
this[Q] = true, this[H](), this.emit("error", t);
|
|
78610
78610
|
}
|
|
78611
|
-
[
|
|
78611
|
+
[Ii](t, e) {
|
|
78612
78612
|
let i = false;
|
|
78613
78613
|
return this[ie] -= t, t > 0 && (i = super.write(t < e.length ? e.subarray(0, t) : e)), (t === 0 || this[ie] <= 0) && (i = false, this[H](), super.end()), i;
|
|
78614
78614
|
}
|
|
@@ -78626,7 +78626,7 @@ var gt = class extends A {
|
|
|
78626
78626
|
}
|
|
78627
78627
|
}
|
|
78628
78628
|
};
|
|
78629
|
-
var
|
|
78629
|
+
var Me = class extends _t {
|
|
78630
78630
|
[ht]() {
|
|
78631
78631
|
let t = true;
|
|
78632
78632
|
try {
|
|
@@ -78641,8 +78641,8 @@ var ve = class extends gt {
|
|
|
78641
78641
|
if (!this[Q]) {
|
|
78642
78642
|
this[Q] = true;
|
|
78643
78643
|
do {
|
|
78644
|
-
let e = this[
|
|
78645
|
-
if (!this[
|
|
78644
|
+
let e = this[Ci](), i = e.length === 0 ? 0 : import_fs2.default.readSync(this[m], e, 0, e.length, null);
|
|
78645
|
+
if (!this[Ii](i, e)) break;
|
|
78646
78646
|
} while (true);
|
|
78647
78647
|
this[Q] = false;
|
|
78648
78648
|
}
|
|
@@ -78665,19 +78665,19 @@ var tt = class extends import_events.default {
|
|
|
78665
78665
|
[Rt] = false;
|
|
78666
78666
|
[ee] = false;
|
|
78667
78667
|
[Y] = [];
|
|
78668
|
-
[
|
|
78668
|
+
[Fe] = false;
|
|
78669
78669
|
[U];
|
|
78670
78670
|
[se];
|
|
78671
78671
|
[ot];
|
|
78672
78672
|
[m];
|
|
78673
|
-
[
|
|
78673
|
+
[ve];
|
|
78674
78674
|
[J];
|
|
78675
|
-
[
|
|
78675
|
+
[xi] = false;
|
|
78676
78676
|
[nt];
|
|
78677
78677
|
constructor(t, e) {
|
|
78678
78678
|
e = e || {}, super(e), this[U] = t, this[m] = typeof e.fd == "number" ? e.fd : void 0, this[se] = e.mode === void 0 ? 438 : e.mode, this[nt] = typeof e.start == "number" ? e.start : void 0, this[ot] = typeof e.autoClose == "boolean" ? e.autoClose : true;
|
|
78679
78679
|
let i = this[nt] !== void 0 ? "r+" : "w";
|
|
78680
|
-
this[
|
|
78680
|
+
this[ve] = e.flags === void 0, this[J] = e.flags === void 0 ? i : e.flags, this[m] === void 0 && this[ht]();
|
|
78681
78681
|
}
|
|
78682
78682
|
emit(t, ...e) {
|
|
78683
78683
|
if (t === "error") {
|
|
@@ -78699,26 +78699,26 @@ var tt = class extends import_events.default {
|
|
|
78699
78699
|
import_fs2.default.open(this[U], this[J], this[se], (t, e) => this[Ht](t, e));
|
|
78700
78700
|
}
|
|
78701
78701
|
[Ht](t, e) {
|
|
78702
|
-
this[
|
|
78702
|
+
this[ve] && this[J] === "r+" && t && t.code === "ENOENT" ? (this[J] = "w", this[ht]()) : t ? this[Ut](t) : (this[m] = e, this.emit("open", e), this[Rt] || this[Li]());
|
|
78703
78703
|
}
|
|
78704
78704
|
end(t, e) {
|
|
78705
78705
|
return t && this.write(t, e), this[ee] = true, !this[Rt] && !this[Y].length && typeof this[m] == "number" && this[Pt](null, 0), this;
|
|
78706
78706
|
}
|
|
78707
78707
|
write(t, e) {
|
|
78708
|
-
return typeof t == "string" && (t = Buffer.from(t, e)), this[ee] ? (this.emit("error", new Error("write() after end()")), false) : this[m] === void 0 || this[Rt] || this[Y].length ? (this[Y].push(t), this[
|
|
78708
|
+
return typeof t == "string" && (t = Buffer.from(t, e)), this[ee] ? (this.emit("error", new Error("write() after end()")), false) : this[m] === void 0 || this[Rt] || this[Y].length ? (this[Y].push(t), this[Fe] = true, false) : (this[Rt] = true, this[ke](t), true);
|
|
78709
78709
|
}
|
|
78710
|
-
[
|
|
78710
|
+
[ke](t) {
|
|
78711
78711
|
import_fs2.default.write(this[m], t, 0, t.length, this[nt], (e, i) => this[Pt](e, i));
|
|
78712
78712
|
}
|
|
78713
78713
|
[Pt](t, e) {
|
|
78714
|
-
t ? this[Ut](t) : (this[nt] !== void 0 && typeof e == "number" && (this[nt] += e), this[Y].length ? this[
|
|
78714
|
+
t ? this[Ut](t) : (this[nt] !== void 0 && typeof e == "number" && (this[nt] += e), this[Y].length ? this[Li]() : (this[Rt] = false, this[ee] && !this[xi] ? (this[xi] = true, this[H](), this.emit("finish")) : this[Fe] && (this[Fe] = false, this.emit("drain"))));
|
|
78715
78715
|
}
|
|
78716
|
-
[
|
|
78716
|
+
[Li]() {
|
|
78717
78717
|
if (this[Y].length === 0) this[ee] && this[Pt](null, 0);
|
|
78718
|
-
else if (this[Y].length === 1) this[
|
|
78718
|
+
else if (this[Y].length === 1) this[ke](this[Y].pop());
|
|
78719
78719
|
else {
|
|
78720
78720
|
let t = this[Y];
|
|
78721
|
-
this[Y] = [],
|
|
78721
|
+
this[Y] = [], Vr(this[m], t, this[nt], (e, i) => this[Pt](e, i));
|
|
78722
78722
|
}
|
|
78723
78723
|
}
|
|
78724
78724
|
[H]() {
|
|
@@ -78731,7 +78731,7 @@ var tt = class extends import_events.default {
|
|
|
78731
78731
|
var Wt = class extends tt {
|
|
78732
78732
|
[ht]() {
|
|
78733
78733
|
let t;
|
|
78734
|
-
if (this[
|
|
78734
|
+
if (this[ve] && this[J] === "r+") try {
|
|
78735
78735
|
t = import_fs2.default.openSync(this[U], this[J], this[se]);
|
|
78736
78736
|
} catch (e) {
|
|
78737
78737
|
if (e?.code === "ENOENT") return this[J] = "w", this[ht]();
|
|
@@ -78746,7 +78746,7 @@ var Wt = class extends tt {
|
|
|
78746
78746
|
this[m] = void 0, import_fs2.default.closeSync(t), this.emit("close");
|
|
78747
78747
|
}
|
|
78748
78748
|
}
|
|
78749
|
-
[
|
|
78749
|
+
[ke](t) {
|
|
78750
78750
|
let e = true;
|
|
78751
78751
|
try {
|
|
78752
78752
|
this[Pt](null, import_fs2.default.writeSync(this[m], t, 0, t.length, this[nt])), e = false;
|
|
@@ -78758,49 +78758,50 @@ var Wt = class extends tt {
|
|
|
78758
78758
|
}
|
|
78759
78759
|
}
|
|
78760
78760
|
};
|
|
78761
|
-
var
|
|
78761
|
+
var $r = /* @__PURE__ */ new Map([["C", "cwd"], ["f", "file"], ["z", "gzip"], ["P", "preservePaths"], ["U", "unlink"], ["strip-components", "strip"], ["stripComponents", "strip"], ["keep-newer", "newer"], ["keepNewer", "newer"], ["keep-newer-files", "newer"], ["keepNewerFiles", "newer"], ["k", "keep"], ["keep-existing", "keep"], ["keepExisting", "keep"], ["m", "noMtime"], ["no-mtime", "noMtime"], ["p", "preserveOwner"], ["L", "follow"], ["h", "follow"], ["onentry", "onReadEntry"]]);
|
|
78762
78762
|
var As = (s3) => !!s3.sync && !!s3.file;
|
|
78763
|
-
var
|
|
78764
|
-
var
|
|
78765
|
-
var
|
|
78766
|
-
var
|
|
78767
|
-
var
|
|
78768
|
-
let t =
|
|
78763
|
+
var Ds = (s3) => !s3.sync && !!s3.file;
|
|
78764
|
+
var Is = (s3) => !!s3.sync && !s3.file;
|
|
78765
|
+
var Cs = (s3) => !s3.sync && !s3.file;
|
|
78766
|
+
var Fs = (s3) => !!s3.file;
|
|
78767
|
+
var Xr = (s3) => {
|
|
78768
|
+
let t = $r.get(s3);
|
|
78769
78769
|
return t || s3;
|
|
78770
78770
|
};
|
|
78771
78771
|
var re = (s3 = {}) => {
|
|
78772
78772
|
if (!s3) return {};
|
|
78773
78773
|
let t = {};
|
|
78774
78774
|
for (let [e, i] of Object.entries(s3)) {
|
|
78775
|
-
let r =
|
|
78775
|
+
let r = Xr(e);
|
|
78776
78776
|
t[r] = i;
|
|
78777
78777
|
}
|
|
78778
78778
|
return t.chmod === void 0 && t.noChmod === false && (t.chmod = true), delete t.noChmod, t;
|
|
78779
78779
|
};
|
|
78780
78780
|
var K = (s3, t, e, i, r) => Object.assign((n = [], o, h) => {
|
|
78781
|
-
Array.isArray(n) && (o = n, n = {}), typeof o == "function" && (h = o, o = void 0), o
|
|
78781
|
+
Array.isArray(n) && (o = n, n = {}), typeof o == "function" && (h = o, o = void 0), o = o ? Array.from(o) : [];
|
|
78782
78782
|
let a = re(n);
|
|
78783
78783
|
if (r?.(a, o), As(a)) {
|
|
78784
78784
|
if (typeof h == "function") throw new TypeError("callback not supported for sync tar functions");
|
|
78785
78785
|
return s3(a, o);
|
|
78786
|
+
} else if (Ds(a)) {
|
|
78787
|
+
let l = t(a, o);
|
|
78788
|
+
return h ? l.then(() => h(), h) : l;
|
|
78786
78789
|
} else if (Is(a)) {
|
|
78787
|
-
let l = t(a, o), c = h || void 0;
|
|
78788
|
-
return c ? l.then(() => c(), c) : l;
|
|
78789
|
-
} else if (Cs(a)) {
|
|
78790
78790
|
if (typeof h == "function") throw new TypeError("callback not supported for sync tar functions");
|
|
78791
78791
|
return e(a, o);
|
|
78792
|
-
} else if (
|
|
78792
|
+
} else if (Cs(a)) {
|
|
78793
78793
|
if (typeof h == "function") throw new TypeError("callback only supported with file option");
|
|
78794
78794
|
return i(a, o);
|
|
78795
|
-
}
|
|
78795
|
+
}
|
|
78796
|
+
throw new Error("impossible options??");
|
|
78796
78797
|
}, { syncFile: s3, asyncFile: t, syncNoFile: e, asyncNoFile: i, validate: r });
|
|
78797
|
-
var
|
|
78798
|
-
var M = Object.freeze(Object.assign(/* @__PURE__ */ Object.create(null), { Z_NO_FLUSH: 0, Z_PARTIAL_FLUSH: 1, Z_SYNC_FLUSH: 2, Z_FULL_FLUSH: 3, Z_FINISH: 4, Z_BLOCK: 5, Z_OK: 0, Z_STREAM_END: 1, Z_NEED_DICT: 2, Z_ERRNO: -1, Z_STREAM_ERROR: -2, Z_DATA_ERROR: -3, Z_MEM_ERROR: -4, Z_BUF_ERROR: -5, Z_VERSION_ERROR: -6, Z_NO_COMPRESSION: 0, Z_BEST_SPEED: 1, Z_BEST_COMPRESSION: 9, Z_DEFAULT_COMPRESSION: -1, Z_FILTERED: 1, Z_HUFFMAN_ONLY: 2, Z_RLE: 3, Z_FIXED: 4, Z_DEFAULT_STRATEGY: 0, DEFLATE: 1, INFLATE: 2, GZIP: 3, GUNZIP: 4, DEFLATERAW: 5, INFLATERAW: 6, UNZIP: 7, BROTLI_DECODE: 8, BROTLI_ENCODE: 9, Z_MIN_WINDOWBITS: 8, Z_MAX_WINDOWBITS: 15, Z_DEFAULT_WINDOWBITS: 15, Z_MIN_CHUNK: 64, Z_MAX_CHUNK: 1 / 0, Z_DEFAULT_CHUNK: 16384, Z_MIN_MEMLEVEL: 1, Z_MAX_MEMLEVEL: 9, Z_DEFAULT_MEMLEVEL: 8, Z_MIN_LEVEL: -1, Z_MAX_LEVEL: 9, Z_DEFAULT_LEVEL: -1, BROTLI_OPERATION_PROCESS: 0, BROTLI_OPERATION_FLUSH: 1, BROTLI_OPERATION_FINISH: 2, BROTLI_OPERATION_EMIT_METADATA: 3, BROTLI_MODE_GENERIC: 0, BROTLI_MODE_TEXT: 1, BROTLI_MODE_FONT: 2, BROTLI_DEFAULT_MODE: 0, BROTLI_MIN_QUALITY: 0, BROTLI_MAX_QUALITY: 11, BROTLI_DEFAULT_QUALITY: 11, BROTLI_MIN_WINDOW_BITS: 10, BROTLI_MAX_WINDOW_BITS: 24, BROTLI_LARGE_MAX_WINDOW_BITS: 30, BROTLI_DEFAULT_WINDOW: 22, BROTLI_MIN_INPUT_BLOCK_BITS: 16, BROTLI_MAX_INPUT_BLOCK_BITS: 24, BROTLI_PARAM_MODE: 0, BROTLI_PARAM_QUALITY: 1, BROTLI_PARAM_LGWIN: 2, BROTLI_PARAM_LGBLOCK: 3, BROTLI_PARAM_DISABLE_LITERAL_CONTEXT_MODELING: 4, BROTLI_PARAM_SIZE_HINT: 5, BROTLI_PARAM_LARGE_WINDOW: 6, BROTLI_PARAM_NPOSTFIX: 7, BROTLI_PARAM_NDIRECT: 8, BROTLI_DECODER_RESULT_ERROR: 0, BROTLI_DECODER_RESULT_SUCCESS: 1, BROTLI_DECODER_RESULT_NEEDS_MORE_INPUT: 2, BROTLI_DECODER_RESULT_NEEDS_MORE_OUTPUT: 3, BROTLI_DECODER_PARAM_DISABLE_RING_BUFFER_REALLOCATION: 0, BROTLI_DECODER_PARAM_LARGE_WINDOW: 1, BROTLI_DECODER_NO_ERROR: 0, BROTLI_DECODER_SUCCESS: 1, BROTLI_DECODER_NEEDS_MORE_INPUT: 2, BROTLI_DECODER_NEEDS_MORE_OUTPUT: 3, BROTLI_DECODER_ERROR_FORMAT_EXUBERANT_NIBBLE: -1, BROTLI_DECODER_ERROR_FORMAT_RESERVED: -2, BROTLI_DECODER_ERROR_FORMAT_EXUBERANT_META_NIBBLE: -3, BROTLI_DECODER_ERROR_FORMAT_SIMPLE_HUFFMAN_ALPHABET: -4, BROTLI_DECODER_ERROR_FORMAT_SIMPLE_HUFFMAN_SAME: -5, BROTLI_DECODER_ERROR_FORMAT_CL_SPACE: -6, BROTLI_DECODER_ERROR_FORMAT_HUFFMAN_SPACE: -7, BROTLI_DECODER_ERROR_FORMAT_CONTEXT_MAP_REPEAT: -8, BROTLI_DECODER_ERROR_FORMAT_BLOCK_LENGTH_1: -9, BROTLI_DECODER_ERROR_FORMAT_BLOCK_LENGTH_2: -10, BROTLI_DECODER_ERROR_FORMAT_TRANSFORM: -11, BROTLI_DECODER_ERROR_FORMAT_DICTIONARY: -12, BROTLI_DECODER_ERROR_FORMAT_WINDOW_BITS: -13, BROTLI_DECODER_ERROR_FORMAT_PADDING_1: -14, BROTLI_DECODER_ERROR_FORMAT_PADDING_2: -15, BROTLI_DECODER_ERROR_FORMAT_DISTANCE: -16, BROTLI_DECODER_ERROR_DICTIONARY_NOT_SET: -19, BROTLI_DECODER_ERROR_INVALID_ARGUMENTS: -20, BROTLI_DECODER_ERROR_ALLOC_CONTEXT_MODES: -21, BROTLI_DECODER_ERROR_ALLOC_TREE_GROUPS: -22, BROTLI_DECODER_ERROR_ALLOC_CONTEXT_MAP: -25, BROTLI_DECODER_ERROR_ALLOC_RING_BUFFER_1: -26, BROTLI_DECODER_ERROR_ALLOC_RING_BUFFER_2: -27, BROTLI_DECODER_ERROR_ALLOC_BLOCK_TYPE_TREES: -30, BROTLI_DECODER_ERROR_UNREACHABLE: -31 },
|
|
78799
|
-
var
|
|
78800
|
-
var
|
|
78801
|
-
var
|
|
78802
|
-
var
|
|
78803
|
-
import_buffer.Buffer.concat = s3 ?
|
|
78798
|
+
var jr = import_zlib.default.constants || { ZLIB_VERNUM: 4736 };
|
|
78799
|
+
var M = Object.freeze(Object.assign(/* @__PURE__ */ Object.create(null), { Z_NO_FLUSH: 0, Z_PARTIAL_FLUSH: 1, Z_SYNC_FLUSH: 2, Z_FULL_FLUSH: 3, Z_FINISH: 4, Z_BLOCK: 5, Z_OK: 0, Z_STREAM_END: 1, Z_NEED_DICT: 2, Z_ERRNO: -1, Z_STREAM_ERROR: -2, Z_DATA_ERROR: -3, Z_MEM_ERROR: -4, Z_BUF_ERROR: -5, Z_VERSION_ERROR: -6, Z_NO_COMPRESSION: 0, Z_BEST_SPEED: 1, Z_BEST_COMPRESSION: 9, Z_DEFAULT_COMPRESSION: -1, Z_FILTERED: 1, Z_HUFFMAN_ONLY: 2, Z_RLE: 3, Z_FIXED: 4, Z_DEFAULT_STRATEGY: 0, DEFLATE: 1, INFLATE: 2, GZIP: 3, GUNZIP: 4, DEFLATERAW: 5, INFLATERAW: 6, UNZIP: 7, BROTLI_DECODE: 8, BROTLI_ENCODE: 9, Z_MIN_WINDOWBITS: 8, Z_MAX_WINDOWBITS: 15, Z_DEFAULT_WINDOWBITS: 15, Z_MIN_CHUNK: 64, Z_MAX_CHUNK: 1 / 0, Z_DEFAULT_CHUNK: 16384, Z_MIN_MEMLEVEL: 1, Z_MAX_MEMLEVEL: 9, Z_DEFAULT_MEMLEVEL: 8, Z_MIN_LEVEL: -1, Z_MAX_LEVEL: 9, Z_DEFAULT_LEVEL: -1, BROTLI_OPERATION_PROCESS: 0, BROTLI_OPERATION_FLUSH: 1, BROTLI_OPERATION_FINISH: 2, BROTLI_OPERATION_EMIT_METADATA: 3, BROTLI_MODE_GENERIC: 0, BROTLI_MODE_TEXT: 1, BROTLI_MODE_FONT: 2, BROTLI_DEFAULT_MODE: 0, BROTLI_MIN_QUALITY: 0, BROTLI_MAX_QUALITY: 11, BROTLI_DEFAULT_QUALITY: 11, BROTLI_MIN_WINDOW_BITS: 10, BROTLI_MAX_WINDOW_BITS: 24, BROTLI_LARGE_MAX_WINDOW_BITS: 30, BROTLI_DEFAULT_WINDOW: 22, BROTLI_MIN_INPUT_BLOCK_BITS: 16, BROTLI_MAX_INPUT_BLOCK_BITS: 24, BROTLI_PARAM_MODE: 0, BROTLI_PARAM_QUALITY: 1, BROTLI_PARAM_LGWIN: 2, BROTLI_PARAM_LGBLOCK: 3, BROTLI_PARAM_DISABLE_LITERAL_CONTEXT_MODELING: 4, BROTLI_PARAM_SIZE_HINT: 5, BROTLI_PARAM_LARGE_WINDOW: 6, BROTLI_PARAM_NPOSTFIX: 7, BROTLI_PARAM_NDIRECT: 8, BROTLI_DECODER_RESULT_ERROR: 0, BROTLI_DECODER_RESULT_SUCCESS: 1, BROTLI_DECODER_RESULT_NEEDS_MORE_INPUT: 2, BROTLI_DECODER_RESULT_NEEDS_MORE_OUTPUT: 3, BROTLI_DECODER_PARAM_DISABLE_RING_BUFFER_REALLOCATION: 0, BROTLI_DECODER_PARAM_LARGE_WINDOW: 1, BROTLI_DECODER_NO_ERROR: 0, BROTLI_DECODER_SUCCESS: 1, BROTLI_DECODER_NEEDS_MORE_INPUT: 2, BROTLI_DECODER_NEEDS_MORE_OUTPUT: 3, BROTLI_DECODER_ERROR_FORMAT_EXUBERANT_NIBBLE: -1, BROTLI_DECODER_ERROR_FORMAT_RESERVED: -2, BROTLI_DECODER_ERROR_FORMAT_EXUBERANT_META_NIBBLE: -3, BROTLI_DECODER_ERROR_FORMAT_SIMPLE_HUFFMAN_ALPHABET: -4, BROTLI_DECODER_ERROR_FORMAT_SIMPLE_HUFFMAN_SAME: -5, BROTLI_DECODER_ERROR_FORMAT_CL_SPACE: -6, BROTLI_DECODER_ERROR_FORMAT_HUFFMAN_SPACE: -7, BROTLI_DECODER_ERROR_FORMAT_CONTEXT_MAP_REPEAT: -8, BROTLI_DECODER_ERROR_FORMAT_BLOCK_LENGTH_1: -9, BROTLI_DECODER_ERROR_FORMAT_BLOCK_LENGTH_2: -10, BROTLI_DECODER_ERROR_FORMAT_TRANSFORM: -11, BROTLI_DECODER_ERROR_FORMAT_DICTIONARY: -12, BROTLI_DECODER_ERROR_FORMAT_WINDOW_BITS: -13, BROTLI_DECODER_ERROR_FORMAT_PADDING_1: -14, BROTLI_DECODER_ERROR_FORMAT_PADDING_2: -15, BROTLI_DECODER_ERROR_FORMAT_DISTANCE: -16, BROTLI_DECODER_ERROR_DICTIONARY_NOT_SET: -19, BROTLI_DECODER_ERROR_INVALID_ARGUMENTS: -20, BROTLI_DECODER_ERROR_ALLOC_CONTEXT_MODES: -21, BROTLI_DECODER_ERROR_ALLOC_TREE_GROUPS: -22, BROTLI_DECODER_ERROR_ALLOC_CONTEXT_MAP: -25, BROTLI_DECODER_ERROR_ALLOC_RING_BUFFER_1: -26, BROTLI_DECODER_ERROR_ALLOC_RING_BUFFER_2: -27, BROTLI_DECODER_ERROR_ALLOC_BLOCK_TYPE_TREES: -30, BROTLI_DECODER_ERROR_UNREACHABLE: -31 }, jr));
|
|
78800
|
+
var Qr = import_buffer.Buffer.concat;
|
|
78801
|
+
var vs = Object.getOwnPropertyDescriptor(import_buffer.Buffer, "concat");
|
|
78802
|
+
var Jr = (s3) => s3;
|
|
78803
|
+
var ki = vs?.writable === true || vs?.set !== void 0 ? (s3) => {
|
|
78804
|
+
import_buffer.Buffer.concat = s3 ? Jr : Qr;
|
|
78804
78805
|
} : (s3) => {
|
|
78805
78806
|
};
|
|
78806
78807
|
var Ot = /* @__PURE__ */ Symbol("_superWrite");
|
|
@@ -78814,8 +78815,8 @@ var Gt = class extends Error {
|
|
|
78814
78815
|
return "ZlibError";
|
|
78815
78816
|
}
|
|
78816
78817
|
};
|
|
78817
|
-
var
|
|
78818
|
-
var ne = class extends
|
|
78818
|
+
var vi = /* @__PURE__ */ Symbol("flushFlag");
|
|
78819
|
+
var ne = class extends D {
|
|
78819
78820
|
#t = false;
|
|
78820
78821
|
#i = false;
|
|
78821
78822
|
#s;
|
|
@@ -78834,9 +78835,9 @@ var ne = class extends A {
|
|
|
78834
78835
|
}
|
|
78835
78836
|
constructor(t, e) {
|
|
78836
78837
|
if (!t || typeof t != "object") throw new TypeError("invalid options for ZlibBase constructor");
|
|
78837
|
-
if (super(t), this.#s = t.flush ?? 0, this.#n = t.finishFlush ?? 0, this.#r = t.fullFlushFlag ?? 0, typeof
|
|
78838
|
+
if (super(t), this.#s = t.flush ?? 0, this.#n = t.finishFlush ?? 0, this.#r = t.fullFlushFlag ?? 0, typeof ks[e] != "function") throw new TypeError("Compression method not supported: " + e);
|
|
78838
78839
|
try {
|
|
78839
|
-
this.#e = new
|
|
78840
|
+
this.#e = new ks[e](t);
|
|
78840
78841
|
} catch (i) {
|
|
78841
78842
|
throw new Gt(i, this.constructor);
|
|
78842
78843
|
}
|
|
@@ -78851,7 +78852,7 @@ var ne = class extends A {
|
|
|
78851
78852
|
if (!this.#t) return (0, import_assert.default)(this.#e, "zlib binding closed"), this.#e.reset?.();
|
|
78852
78853
|
}
|
|
78853
78854
|
flush(t) {
|
|
78854
|
-
this.ended || (typeof t != "number" && (t = this.#r), this.write(Object.assign(import_buffer.Buffer.alloc(0), { [
|
|
78855
|
+
this.ended || (typeof t != "number" && (t = this.#r), this.write(Object.assign(import_buffer.Buffer.alloc(0), { [vi]: t })));
|
|
78855
78856
|
}
|
|
78856
78857
|
end(t, e, i) {
|
|
78857
78858
|
return typeof t == "function" && (i = t, e = void 0, t = void 0), typeof e == "function" && (i = e, e = void 0), t && (e ? this.write(t, e) : this.write(t)), this.flush(this.#n), this.#i = true, super.end(i);
|
|
@@ -78870,13 +78871,13 @@ var ne = class extends A {
|
|
|
78870
78871
|
};
|
|
78871
78872
|
let o = this.#e.close;
|
|
78872
78873
|
this.#e.close = () => {
|
|
78873
|
-
},
|
|
78874
|
+
}, ki(true);
|
|
78874
78875
|
let h;
|
|
78875
78876
|
try {
|
|
78876
|
-
let l = typeof t[
|
|
78877
|
-
h = this.#e._processChunk(t, l),
|
|
78877
|
+
let l = typeof t[vi] == "number" ? t[vi] : this.#s;
|
|
78878
|
+
h = this.#e._processChunk(t, l), ki(false);
|
|
78878
78879
|
} catch (l) {
|
|
78879
|
-
|
|
78880
|
+
ki(false), this.#o(new Gt(l, this.write));
|
|
78880
78881
|
} finally {
|
|
78881
78882
|
this.#e && (this.#e._handle = r, r.close = n, this.#e.close = o, this.#e.removeAllListeners("error"));
|
|
78882
78883
|
}
|
|
@@ -78890,7 +78891,7 @@ var ne = class extends A {
|
|
|
78890
78891
|
return i && i(), a;
|
|
78891
78892
|
}
|
|
78892
78893
|
};
|
|
78893
|
-
var
|
|
78894
|
+
var Be = class extends ne {
|
|
78894
78895
|
#t;
|
|
78895
78896
|
#i;
|
|
78896
78897
|
constructor(t, e) {
|
|
@@ -78916,7 +78917,7 @@ var Me = class extends ne {
|
|
|
78916
78917
|
}
|
|
78917
78918
|
}
|
|
78918
78919
|
};
|
|
78919
|
-
var
|
|
78920
|
+
var Pe = class extends Be {
|
|
78920
78921
|
#t;
|
|
78921
78922
|
constructor(t) {
|
|
78922
78923
|
super(t, "Gzip"), this.#t = t && !!t.portable;
|
|
@@ -78925,87 +78926,87 @@ var Be = class extends Me {
|
|
|
78925
78926
|
return this.#t ? (this.#t = false, t[9] = 255, super[Ot](t)) : super[Ot](t);
|
|
78926
78927
|
}
|
|
78927
78928
|
};
|
|
78928
|
-
var
|
|
78929
|
+
var ze = class extends Be {
|
|
78929
78930
|
constructor(t) {
|
|
78930
78931
|
super(t, "Unzip");
|
|
78931
78932
|
}
|
|
78932
78933
|
};
|
|
78933
|
-
var
|
|
78934
|
+
var Ue = class extends ne {
|
|
78934
78935
|
constructor(t, e) {
|
|
78935
78936
|
t = t || {}, t.flush = t.flush || M.BROTLI_OPERATION_PROCESS, t.finishFlush = t.finishFlush || M.BROTLI_OPERATION_FINISH, t.fullFlushFlag = M.BROTLI_OPERATION_FLUSH, super(t, e);
|
|
78936
78937
|
}
|
|
78937
78938
|
};
|
|
78938
|
-
var
|
|
78939
|
+
var He = class extends Ue {
|
|
78939
78940
|
constructor(t) {
|
|
78940
78941
|
super(t, "BrotliCompress");
|
|
78941
78942
|
}
|
|
78942
78943
|
};
|
|
78943
|
-
var
|
|
78944
|
+
var We = class extends Ue {
|
|
78944
78945
|
constructor(t) {
|
|
78945
78946
|
super(t, "BrotliDecompress");
|
|
78946
78947
|
}
|
|
78947
78948
|
};
|
|
78948
|
-
var
|
|
78949
|
+
var Ge = class extends ne {
|
|
78949
78950
|
constructor(t, e) {
|
|
78950
78951
|
t = t || {}, t.flush = t.flush || M.ZSTD_e_continue, t.finishFlush = t.finishFlush || M.ZSTD_e_end, t.fullFlushFlag = M.ZSTD_e_flush, super(t, e);
|
|
78951
78952
|
}
|
|
78952
78953
|
};
|
|
78953
|
-
var
|
|
78954
|
+
var Ze = class extends Ge {
|
|
78954
78955
|
constructor(t) {
|
|
78955
78956
|
super(t, "ZstdCompress");
|
|
78956
78957
|
}
|
|
78957
78958
|
};
|
|
78958
|
-
var
|
|
78959
|
+
var Ye = class extends Ge {
|
|
78959
78960
|
constructor(t) {
|
|
78960
78961
|
super(t, "ZstdDecompress");
|
|
78961
78962
|
}
|
|
78962
78963
|
};
|
|
78963
|
-
var
|
|
78964
|
-
if (Number.isSafeInteger(s3)) s3 < 0 ?
|
|
78964
|
+
var Ms = (s3, t) => {
|
|
78965
|
+
if (Number.isSafeInteger(s3)) s3 < 0 ? sn(s3, t) : en(s3, t);
|
|
78965
78966
|
else throw Error("cannot encode number outside of javascript safe integer range");
|
|
78966
78967
|
return t;
|
|
78967
78968
|
};
|
|
78968
|
-
var
|
|
78969
|
+
var en = (s3, t) => {
|
|
78969
78970
|
t[0] = 128;
|
|
78970
78971
|
for (var e = t.length; e > 1; e--) t[e - 1] = s3 & 255, s3 = Math.floor(s3 / 256);
|
|
78971
78972
|
};
|
|
78972
|
-
var
|
|
78973
|
+
var sn = (s3, t) => {
|
|
78973
78974
|
t[0] = 255;
|
|
78974
78975
|
var e = false;
|
|
78975
78976
|
s3 = s3 * -1;
|
|
78976
78977
|
for (var i = t.length; i > 1; i--) {
|
|
78977
78978
|
var r = s3 & 255;
|
|
78978
|
-
s3 = Math.floor(s3 / 256), e ? t[i - 1] =
|
|
78979
|
+
s3 = Math.floor(s3 / 256), e ? t[i - 1] = Ps(r) : r === 0 ? t[i - 1] = 0 : (e = true, t[i - 1] = zs(r));
|
|
78979
78980
|
}
|
|
78980
78981
|
};
|
|
78981
|
-
var
|
|
78982
|
-
let t = s3[0], e = t === 128 ?
|
|
78982
|
+
var Bs = (s3) => {
|
|
78983
|
+
let t = s3[0], e = t === 128 ? nn(s3.subarray(1, s3.length)) : t === 255 ? rn(s3) : null;
|
|
78983
78984
|
if (e === null) throw Error("invalid base256 encoding");
|
|
78984
78985
|
if (!Number.isSafeInteger(e)) throw Error("parsed number outside of javascript safe integer range");
|
|
78985
78986
|
return e;
|
|
78986
78987
|
};
|
|
78987
|
-
var
|
|
78988
|
+
var rn = (s3) => {
|
|
78988
78989
|
for (var t = s3.length, e = 0, i = false, r = t - 1; r > -1; r--) {
|
|
78989
78990
|
var n = Number(s3[r]), o;
|
|
78990
|
-
i ? o =
|
|
78991
|
+
i ? o = Ps(n) : n === 0 ? o = n : (i = true, o = zs(n)), o !== 0 && (e -= o * Math.pow(256, t - r - 1));
|
|
78991
78992
|
}
|
|
78992
78993
|
return e;
|
|
78993
78994
|
};
|
|
78994
|
-
var
|
|
78995
|
+
var nn = (s3) => {
|
|
78995
78996
|
for (var t = s3.length, e = 0, i = t - 1; i > -1; i--) {
|
|
78996
78997
|
var r = Number(s3[i]);
|
|
78997
78998
|
r !== 0 && (e += r * Math.pow(256, t - i - 1));
|
|
78998
78999
|
}
|
|
78999
79000
|
return e;
|
|
79000
79001
|
};
|
|
79001
|
-
var
|
|
79002
|
-
var
|
|
79003
|
-
var
|
|
79004
|
-
|
|
79002
|
+
var Ps = (s3) => (255 ^ s3) & 255;
|
|
79003
|
+
var zs = (s3) => (255 ^ s3) + 1 & 255;
|
|
79004
|
+
var Bi = {};
|
|
79005
|
+
vr(Bi, { code: () => Ke, isCode: () => oe, isName: () => hn, name: () => he });
|
|
79005
79006
|
var oe = (s3) => he.has(s3);
|
|
79006
|
-
var
|
|
79007
|
+
var hn = (s3) => Ke.has(s3);
|
|
79007
79008
|
var he = /* @__PURE__ */ new Map([["0", "File"], ["", "OldFile"], ["1", "Link"], ["2", "SymbolicLink"], ["3", "CharacterDevice"], ["4", "BlockDevice"], ["5", "Directory"], ["6", "FIFO"], ["7", "ContiguousFile"], ["g", "GlobalExtendedHeader"], ["x", "ExtendedHeader"], ["A", "SolarisACL"], ["D", "GNUDumpDir"], ["I", "Inode"], ["K", "NextFileHasLongLinkpath"], ["L", "NextFileHasLongPath"], ["M", "ContinuationFile"], ["N", "OldGnuLongPath"], ["S", "SparseFile"], ["V", "TapeVolumeHeader"], ["X", "OldExtendedHeader"]]);
|
|
79008
|
-
var
|
|
79009
|
+
var Ke = new Map(Array.from(he).map((s3) => [s3[1], s3[0]]));
|
|
79009
79010
|
var F = class {
|
|
79010
79011
|
cksumValid = false;
|
|
79011
79012
|
needPax = false;
|
|
@@ -79033,14 +79034,14 @@ var F = class {
|
|
|
79033
79034
|
}
|
|
79034
79035
|
decode(t, e, i, r) {
|
|
79035
79036
|
if (e || (e = 0), !t || !(t.length >= e + 512)) throw new Error("need 512 bytes for header");
|
|
79036
|
-
this.path = i?.path ?? Tt(t, e, 100), this.mode = i?.mode ?? r?.mode ?? at(t, e + 100, 8), this.uid = i?.uid ?? r?.uid ?? at(t, e + 108, 8), this.gid = i?.gid ?? r?.gid ?? at(t, e + 116, 8), this.size = i?.size ?? r?.size ?? at(t, e + 124, 12), this.mtime = i?.mtime ?? r?.mtime ??
|
|
79037
|
+
this.path = i?.path ?? Tt(t, e, 100), this.mode = i?.mode ?? r?.mode ?? at(t, e + 100, 8), this.uid = i?.uid ?? r?.uid ?? at(t, e + 108, 8), this.gid = i?.gid ?? r?.gid ?? at(t, e + 116, 8), this.size = i?.size ?? r?.size ?? at(t, e + 124, 12), this.mtime = i?.mtime ?? r?.mtime ?? Pi(t, e + 136, 12), this.cksum = at(t, e + 148, 12), r && this.#i(r, true), i && this.#i(i);
|
|
79037
79038
|
let n = Tt(t, e + 156, 1);
|
|
79038
79039
|
if (oe(n) && (this.#t = n || "0"), this.#t === "0" && this.path.slice(-1) === "/" && (this.#t = "5"), this.#t === "5" && (this.size = 0), this.linkpath = Tt(t, e + 157, 100), t.subarray(e + 257, e + 265).toString() === "ustar\x0000") if (this.uname = i?.uname ?? r?.uname ?? Tt(t, e + 265, 32), this.gname = i?.gname ?? r?.gname ?? Tt(t, e + 297, 32), this.devmaj = i?.devmaj ?? r?.devmaj ?? at(t, e + 329, 8) ?? 0, this.devmin = i?.devmin ?? r?.devmin ?? at(t, e + 337, 8) ?? 0, t[e + 475] !== 0) {
|
|
79039
79040
|
let h = Tt(t, e + 345, 155);
|
|
79040
79041
|
this.path = h + "/" + this.path;
|
|
79041
79042
|
} else {
|
|
79042
79043
|
let h = Tt(t, e + 345, 130);
|
|
79043
|
-
h && (this.path = h + "/" + this.path), this.atime = i?.atime ?? r?.atime ??
|
|
79044
|
+
h && (this.path = h + "/" + this.path), this.atime = i?.atime ?? r?.atime ?? Pi(t, e + 476, 12), this.ctime = i?.ctime ?? r?.ctime ?? Pi(t, e + 488, 12);
|
|
79044
79045
|
}
|
|
79045
79046
|
let o = 256;
|
|
79046
79047
|
for (let h = e; h < e + 148; h++) o += t[h];
|
|
@@ -79052,8 +79053,8 @@ var F = class {
|
|
|
79052
79053
|
}
|
|
79053
79054
|
encode(t, e = 0) {
|
|
79054
79055
|
if (t || (t = this.block = Buffer.alloc(512)), this.#t === "Unsupported" && (this.#t = "0"), !(t.length >= e + 512)) throw new Error("need 512 bytes for header");
|
|
79055
|
-
let i = this.ctime || this.atime ? 130 : 155, r =
|
|
79056
|
-
this.needPax = !!r[2], this.needPax = xt(t, e, 100, n) || this.needPax, this.needPax = lt(t, e + 100, 8, this.mode) || this.needPax, this.needPax = lt(t, e + 108, 8, this.uid) || this.needPax, this.needPax = lt(t, e + 116, 8, this.gid) || this.needPax, this.needPax = lt(t, e + 124, 12, this.size) || this.needPax, this.needPax =
|
|
79056
|
+
let i = this.ctime || this.atime ? 130 : 155, r = an(this.path || "", i), n = r[0], o = r[1];
|
|
79057
|
+
this.needPax = !!r[2], this.needPax = xt(t, e, 100, n) || this.needPax, this.needPax = lt(t, e + 100, 8, this.mode) || this.needPax, this.needPax = lt(t, e + 108, 8, this.uid) || this.needPax, this.needPax = lt(t, e + 116, 8, this.gid) || this.needPax, this.needPax = lt(t, e + 124, 12, this.size) || this.needPax, this.needPax = zi(t, e + 136, 12, this.mtime) || this.needPax, t[e + 156] = Number(this.#t.codePointAt(0)), this.needPax = xt(t, e + 157, 100, this.linkpath) || this.needPax, t.write("ustar\x0000", e + 257, 8), this.needPax = xt(t, e + 265, 32, this.uname) || this.needPax, this.needPax = xt(t, e + 297, 32, this.gname) || this.needPax, this.needPax = lt(t, e + 329, 8, this.devmaj) || this.needPax, this.needPax = lt(t, e + 337, 8, this.devmin) || this.needPax, this.needPax = xt(t, e + 345, i, o) || this.needPax, t[e + 475] !== 0 ? this.needPax = xt(t, e + 345, 155, o) || this.needPax : (this.needPax = xt(t, e + 345, 130, o) || this.needPax, this.needPax = zi(t, e + 476, 12, this.atime) || this.needPax, this.needPax = zi(t, e + 488, 12, this.ctime) || this.needPax);
|
|
79057
79058
|
let h = 256;
|
|
79058
79059
|
for (let a = e; a < e + 148; a++) h += t[a];
|
|
79059
79060
|
for (let a = e + 156; a < e + 512; a++) h += t[a];
|
|
@@ -79066,13 +79067,13 @@ var F = class {
|
|
|
79066
79067
|
return this.#t;
|
|
79067
79068
|
}
|
|
79068
79069
|
set type(t) {
|
|
79069
|
-
let e = String(
|
|
79070
|
+
let e = String(Ke.get(t));
|
|
79070
79071
|
if (oe(e) || e === "Unsupported") this.#t = e;
|
|
79071
79072
|
else if (oe(t)) this.#t = t;
|
|
79072
79073
|
else throw new TypeError("invalid entry type: " + t);
|
|
79073
79074
|
}
|
|
79074
79075
|
};
|
|
79075
|
-
var
|
|
79076
|
+
var an = (s3, t) => {
|
|
79076
79077
|
let i = s3, r = "", n, o = import_node_path2.posix.parse(s3).root || ".";
|
|
79077
79078
|
if (Buffer.byteLength(i) < 100) n = [i, r, false];
|
|
79078
79079
|
else {
|
|
@@ -79085,19 +79086,19 @@ var sn = (s3, t) => {
|
|
|
79085
79086
|
return n;
|
|
79086
79087
|
};
|
|
79087
79088
|
var Tt = (s3, t, e) => s3.subarray(t, t + e).toString("utf8").replace(/\0.*/, "");
|
|
79088
|
-
var
|
|
79089
|
-
var
|
|
79090
|
-
var at = (s3, t, e) => Number(s3[t]) & 128 ?
|
|
79091
|
-
var
|
|
79092
|
-
var
|
|
79093
|
-
var
|
|
79094
|
-
var lt = (s3, t, e, i) => i === void 0 ? false : i >
|
|
79095
|
-
var
|
|
79096
|
-
var
|
|
79097
|
-
var
|
|
79098
|
-
var
|
|
79099
|
-
var
|
|
79100
|
-
var xt = (s3, t, e, i) => i === void 0 ? false : (s3.write(i +
|
|
79089
|
+
var Pi = (s3, t, e) => ln(at(s3, t, e));
|
|
79090
|
+
var ln = (s3) => s3 === void 0 ? void 0 : new Date(s3 * 1e3);
|
|
79091
|
+
var at = (s3, t, e) => Number(s3[t]) & 128 ? Bs(s3.subarray(t, t + e)) : fn(s3, t, e);
|
|
79092
|
+
var cn = (s3) => isNaN(s3) ? void 0 : s3;
|
|
79093
|
+
var fn = (s3, t, e) => cn(parseInt(s3.subarray(t, t + e).toString("utf8").replace(/\0.*$/, "").trim(), 8));
|
|
79094
|
+
var dn = { 12: 8589934591, 8: 2097151 };
|
|
79095
|
+
var lt = (s3, t, e, i) => i === void 0 ? false : i > dn[e] || i < 0 ? (Ms(i, s3.subarray(t, t + e)), true) : (un(s3, t, e, i), false);
|
|
79096
|
+
var un = (s3, t, e, i) => s3.write(mn(i, e), t, e, "ascii");
|
|
79097
|
+
var mn = (s3, t) => pn(Math.floor(s3).toString(8), t);
|
|
79098
|
+
var pn = (s3, t) => (s3.length === t - 1 ? s3 : new Array(t - s3.length - 1).join("0") + s3 + " ") + "\0";
|
|
79099
|
+
var zi = (s3, t, e, i) => i === void 0 ? false : lt(s3, t, e, i.getTime() / 1e3);
|
|
79100
|
+
var En = new Array(156).join("\0");
|
|
79101
|
+
var xt = (s3, t, e, i) => i === void 0 ? false : (s3.write(i + En, t, e, "utf8"), i.length !== Buffer.byteLength(i) || i.length > e);
|
|
79101
79102
|
var ct = class s {
|
|
79102
79103
|
atime;
|
|
79103
79104
|
mtime;
|
|
@@ -79138,13 +79139,13 @@ var ct = class s {
|
|
|
79138
79139
|
return n + o >= Math.pow(10, o) && (o += 1), o + n + r;
|
|
79139
79140
|
}
|
|
79140
79141
|
static parse(t, e, i = false) {
|
|
79141
|
-
return new s(
|
|
79142
|
+
return new s(Sn(yn(t), e), i);
|
|
79142
79143
|
}
|
|
79143
79144
|
};
|
|
79144
|
-
var
|
|
79145
|
-
var
|
|
79146
|
-
`).reduce(
|
|
79147
|
-
var
|
|
79145
|
+
var Sn = (s3, t) => t ? Object.assign({}, t, s3) : s3;
|
|
79146
|
+
var yn = (s3) => s3.replace(/\n$/, "").split(`
|
|
79147
|
+
`).reduce(Rn, /* @__PURE__ */ Object.create(null));
|
|
79148
|
+
var Rn = (s3, t) => {
|
|
79148
79149
|
let e = parseInt(t, 10);
|
|
79149
79150
|
if (e !== Buffer.byteLength(t) + 1) return s3;
|
|
79150
79151
|
t = t.slice((e + " ").length);
|
|
@@ -79153,9 +79154,9 @@ var pn = (s3, t) => {
|
|
|
79153
79154
|
let n = r.replace(/^SCHILY\.(dev|ino|nlink)/, "$1"), o = i.join("=");
|
|
79154
79155
|
return s3[n] = /^([A-Z]+\.)?([mac]|birth|creation)time$/.test(n) ? new Date(Number(o) * 1e3) : /^[0-9]+$/.test(o) ? +o : o, s3;
|
|
79155
79156
|
};
|
|
79156
|
-
var
|
|
79157
|
-
var f =
|
|
79158
|
-
var Yt = class extends
|
|
79157
|
+
var bn = process.env.TESTING_TAR_FAKE_PLATFORM || process.platform;
|
|
79158
|
+
var f = bn !== "win32" ? (s3) => s3 : (s3) => s3 && s3.replaceAll(/\\/g, "/");
|
|
79159
|
+
var Yt = class extends D {
|
|
79159
79160
|
extended;
|
|
79160
79161
|
globalExtended;
|
|
79161
79162
|
header;
|
|
@@ -79222,41 +79223,41 @@ var Yt = class extends A {
|
|
|
79222
79223
|
var Lt = (s3, t, e, i = {}) => {
|
|
79223
79224
|
s3.file && (i.file = s3.file), s3.cwd && (i.cwd = s3.cwd), i.code = e instanceof Error && e.code || t, i.tarCode = t, !s3.strict && i.recoverable !== false ? (e instanceof Error && (i = Object.assign(e, i), e = e.message), s3.emit("warn", t, e, i)) : e instanceof Error ? s3.emit("error", Object.assign(e, i)) : s3.emit("error", Object.assign(new Error(`${t}: ${e}`), i));
|
|
79224
79225
|
};
|
|
79225
|
-
var
|
|
79226
|
-
var
|
|
79227
|
-
var
|
|
79228
|
-
var
|
|
79226
|
+
var gn = 1024 * 1024;
|
|
79227
|
+
var Zi = Buffer.from([31, 139]);
|
|
79228
|
+
var Yi = Buffer.from([40, 181, 47, 253]);
|
|
79229
|
+
var On = Math.max(Zi.length, Yi.length);
|
|
79229
79230
|
var B = /* @__PURE__ */ Symbol("state");
|
|
79230
79231
|
var Nt = /* @__PURE__ */ Symbol("writeEntry");
|
|
79231
79232
|
var et = /* @__PURE__ */ Symbol("readEntry");
|
|
79232
|
-
var
|
|
79233
|
-
var
|
|
79233
|
+
var Ui = /* @__PURE__ */ Symbol("nextEntry");
|
|
79234
|
+
var Us = /* @__PURE__ */ Symbol("processEntry");
|
|
79234
79235
|
var V = /* @__PURE__ */ Symbol("extendedHeader");
|
|
79235
79236
|
var ae = /* @__PURE__ */ Symbol("globalExtendedHeader");
|
|
79236
79237
|
var ft = /* @__PURE__ */ Symbol("meta");
|
|
79237
|
-
var
|
|
79238
|
+
var Hs = /* @__PURE__ */ Symbol("emitMeta");
|
|
79238
79239
|
var p = /* @__PURE__ */ Symbol("buffer");
|
|
79239
79240
|
var it = /* @__PURE__ */ Symbol("queue");
|
|
79240
79241
|
var dt = /* @__PURE__ */ Symbol("ended");
|
|
79241
|
-
var
|
|
79242
|
-
var
|
|
79242
|
+
var Hi = /* @__PURE__ */ Symbol("emittedEnd");
|
|
79243
|
+
var At = /* @__PURE__ */ Symbol("emit");
|
|
79243
79244
|
var y = /* @__PURE__ */ Symbol("unzip");
|
|
79244
|
-
var
|
|
79245
|
-
var
|
|
79246
|
-
var
|
|
79247
|
-
var
|
|
79248
|
-
var
|
|
79245
|
+
var Ve = /* @__PURE__ */ Symbol("consumeChunk");
|
|
79246
|
+
var $e = /* @__PURE__ */ Symbol("consumeChunkSub");
|
|
79247
|
+
var Wi = /* @__PURE__ */ Symbol("consumeBody");
|
|
79248
|
+
var Ws = /* @__PURE__ */ Symbol("consumeMeta");
|
|
79249
|
+
var Gs = /* @__PURE__ */ Symbol("consumeHeader");
|
|
79249
79250
|
var le = /* @__PURE__ */ Symbol("consuming");
|
|
79250
|
-
var
|
|
79251
|
-
var
|
|
79251
|
+
var Gi = /* @__PURE__ */ Symbol("bufferConcat");
|
|
79252
|
+
var Xe = /* @__PURE__ */ Symbol("maybeEnd");
|
|
79252
79253
|
var Kt = /* @__PURE__ */ Symbol("writing");
|
|
79253
79254
|
var ut = /* @__PURE__ */ Symbol("aborted");
|
|
79254
|
-
var
|
|
79255
|
-
var
|
|
79256
|
-
var
|
|
79257
|
-
var
|
|
79258
|
-
var
|
|
79259
|
-
var
|
|
79255
|
+
var qe = /* @__PURE__ */ Symbol("onDone");
|
|
79256
|
+
var Dt = /* @__PURE__ */ Symbol("sawValidEntry");
|
|
79257
|
+
var je = /* @__PURE__ */ Symbol("sawNullBlock");
|
|
79258
|
+
var Qe = /* @__PURE__ */ Symbol("sawEOF");
|
|
79259
|
+
var Zs = /* @__PURE__ */ Symbol("closeStream");
|
|
79260
|
+
var Tn = () => true;
|
|
79260
79261
|
var st = class extends import_events2.EventEmitter {
|
|
79261
79262
|
file;
|
|
79262
79263
|
strict;
|
|
@@ -79277,36 +79278,36 @@ var st = class extends import_events2.EventEmitter {
|
|
|
79277
79278
|
[dt] = false;
|
|
79278
79279
|
[y];
|
|
79279
79280
|
[ut] = false;
|
|
79280
|
-
[
|
|
79281
|
-
[qe] = false;
|
|
79281
|
+
[Dt];
|
|
79282
79282
|
[je] = false;
|
|
79283
|
+
[Qe] = false;
|
|
79283
79284
|
[Kt] = false;
|
|
79284
79285
|
[le] = false;
|
|
79285
|
-
[
|
|
79286
|
+
[Hi] = false;
|
|
79286
79287
|
constructor(t = {}) {
|
|
79287
|
-
super(), this.file = t.file || "", this.on(
|
|
79288
|
-
(this[B] === "begin" || this[
|
|
79289
|
-
}), t.ondone ? this.on(
|
|
79288
|
+
super(), this.file = t.file || "", this.on(qe, () => {
|
|
79289
|
+
(this[B] === "begin" || this[Dt] === false) && this.warn("TAR_BAD_ARCHIVE", "Unrecognized archive format");
|
|
79290
|
+
}), t.ondone ? this.on(qe, t.ondone) : this.on(qe, () => {
|
|
79290
79291
|
this.emit("prefinish"), this.emit("finish"), this.emit("end");
|
|
79291
|
-
}), this.strict = !!t.strict, this.maxMetaEntrySize = t.maxMetaEntrySize ||
|
|
79292
|
+
}), this.strict = !!t.strict, this.maxMetaEntrySize = t.maxMetaEntrySize || gn, this.filter = typeof t.filter == "function" ? t.filter : Tn;
|
|
79292
79293
|
let e = t.file && (t.file.endsWith(".tar.br") || t.file.endsWith(".tbr"));
|
|
79293
79294
|
this.brotli = !(t.gzip || t.zstd) && t.brotli !== void 0 ? t.brotli : e ? void 0 : false;
|
|
79294
79295
|
let i = t.file && (t.file.endsWith(".tar.zst") || t.file.endsWith(".tzst"));
|
|
79295
|
-
this.zstd = !(t.gzip || t.brotli) && t.zstd !== void 0 ? t.zstd : i ? true : void 0, this.on("end", () => this[
|
|
79296
|
+
this.zstd = !(t.gzip || t.brotli) && t.zstd !== void 0 ? t.zstd : i ? true : void 0, this.on("end", () => this[Zs]()), typeof t.onwarn == "function" && this.on("warn", t.onwarn), typeof t.onReadEntry == "function" && this.on("entry", t.onReadEntry);
|
|
79296
79297
|
}
|
|
79297
79298
|
warn(t, e, i = {}) {
|
|
79298
79299
|
Lt(this, t, e, i);
|
|
79299
79300
|
}
|
|
79300
|
-
[
|
|
79301
|
-
this[
|
|
79301
|
+
[Gs](t, e) {
|
|
79302
|
+
this[Dt] === void 0 && (this[Dt] = false);
|
|
79302
79303
|
let i;
|
|
79303
79304
|
try {
|
|
79304
79305
|
i = new F(t, e, this[V], this[ae]);
|
|
79305
79306
|
} catch (r) {
|
|
79306
79307
|
return this.warn("TAR_ENTRY_INVALID", r);
|
|
79307
79308
|
}
|
|
79308
|
-
if (i.nullBlock) this[
|
|
79309
|
-
else if (this[
|
|
79309
|
+
if (i.nullBlock) this[je] ? (this[Qe] = true, this[B] === "begin" && (this[B] = "header"), this[At]("eof")) : (this[je] = true, this[At]("nullBlock"));
|
|
79310
|
+
else if (this[je] = false, !i.cksumValid) this.warn("TAR_ENTRY_INVALID", "checksum failure", { header: i });
|
|
79310
79311
|
else if (!i.path) this.warn("TAR_ENTRY_INVALID", "path is required", { header: i });
|
|
79311
79312
|
else {
|
|
79312
79313
|
let r = i.type;
|
|
@@ -79314,52 +79315,52 @@ var st = class extends import_events2.EventEmitter {
|
|
|
79314
79315
|
else if (!/^(Symbolic)?Link$/.test(r) && !/^(Global)?ExtendedHeader$/.test(r) && i.linkpath) this.warn("TAR_ENTRY_INVALID", "linkpath forbidden", { header: i });
|
|
79315
79316
|
else {
|
|
79316
79317
|
let n = this[Nt] = new Yt(i, this[V], this[ae]);
|
|
79317
|
-
if (!this[
|
|
79318
|
+
if (!this[Dt]) if (n.remain) {
|
|
79318
79319
|
let o = () => {
|
|
79319
|
-
n.invalid || (this[
|
|
79320
|
+
n.invalid || (this[Dt] = true);
|
|
79320
79321
|
};
|
|
79321
79322
|
n.on("end", o);
|
|
79322
|
-
} else this[
|
|
79323
|
-
n.meta ? n.size > this.maxMetaEntrySize ? (n.ignore = true, this[
|
|
79323
|
+
} else this[Dt] = true;
|
|
79324
|
+
n.meta ? n.size > this.maxMetaEntrySize ? (n.ignore = true, this[At]("ignoredEntry", n), this[B] = "ignore", n.resume()) : n.size > 0 && (this[ft] = "", n.on("data", (o) => this[ft] += o), this[B] = "meta") : (this[V] = void 0, n.ignore = n.ignore || !this.filter(n.path, n), n.ignore ? (this[At]("ignoredEntry", n), this[B] = n.remain ? "ignore" : "header", n.resume()) : (n.remain ? this[B] = "body" : (this[B] = "header", n.end()), this[et] ? this[it].push(n) : (this[it].push(n), this[Ui]())));
|
|
79324
79325
|
}
|
|
79325
79326
|
}
|
|
79326
79327
|
}
|
|
79327
|
-
[
|
|
79328
|
+
[Zs]() {
|
|
79328
79329
|
queueMicrotask(() => this.emit("close"));
|
|
79329
79330
|
}
|
|
79330
|
-
[
|
|
79331
|
+
[Us](t) {
|
|
79331
79332
|
let e = true;
|
|
79332
79333
|
if (!t) this[et] = void 0, e = false;
|
|
79333
79334
|
else if (Array.isArray(t)) {
|
|
79334
79335
|
let [i, ...r] = t;
|
|
79335
79336
|
this.emit(i, ...r);
|
|
79336
|
-
} else this[et] = t, this.emit("entry", t), t.emittedEnd || (t.on("end", () => this[
|
|
79337
|
+
} else this[et] = t, this.emit("entry", t), t.emittedEnd || (t.on("end", () => this[Ui]()), e = false);
|
|
79337
79338
|
return e;
|
|
79338
79339
|
}
|
|
79339
|
-
[
|
|
79340
|
+
[Ui]() {
|
|
79340
79341
|
do
|
|
79341
79342
|
;
|
|
79342
|
-
while (this[
|
|
79343
|
-
if (
|
|
79343
|
+
while (this[Us](this[it].shift()));
|
|
79344
|
+
if (this[it].length === 0) {
|
|
79344
79345
|
let t = this[et];
|
|
79345
79346
|
!t || t.flowing || t.size === t.remain ? this[Kt] || this.emit("drain") : t.once("drain", () => this.emit("drain"));
|
|
79346
79347
|
}
|
|
79347
79348
|
}
|
|
79348
|
-
[
|
|
79349
|
+
[Wi](t, e) {
|
|
79349
79350
|
let i = this[Nt];
|
|
79350
79351
|
if (!i) throw new Error("attempt to consume body without entry??");
|
|
79351
79352
|
let r = i.blockRemain ?? 0, n = r >= t.length && e === 0 ? t : t.subarray(e, e + r);
|
|
79352
79353
|
return i.write(n), i.blockRemain || (this[B] = "header", this[Nt] = void 0, i.end()), n.length;
|
|
79353
79354
|
}
|
|
79354
|
-
[
|
|
79355
|
-
let i = this[Nt], r = this[
|
|
79356
|
-
return !this[Nt] && i && this[
|
|
79355
|
+
[Ws](t, e) {
|
|
79356
|
+
let i = this[Nt], r = this[Wi](t, e);
|
|
79357
|
+
return !this[Nt] && i && this[Hs](i), r;
|
|
79357
79358
|
}
|
|
79358
|
-
[
|
|
79359
|
-
|
|
79359
|
+
[At](t, e, i) {
|
|
79360
|
+
this[it].length === 0 && !this[et] ? this.emit(t, e, i) : this[it].push([t, e, i]);
|
|
79360
79361
|
}
|
|
79361
|
-
[
|
|
79362
|
-
switch (this[
|
|
79362
|
+
[Hs](t) {
|
|
79363
|
+
switch (this[At]("meta", this[ft]), t.type) {
|
|
79363
79364
|
case "ExtendedHeader":
|
|
79364
79365
|
case "OldExtendedHeader":
|
|
79365
79366
|
this[V] = ct.parse(this[ft], this[V], false);
|
|
@@ -79388,12 +79389,12 @@ var st = class extends import_events2.EventEmitter {
|
|
|
79388
79389
|
write(t, e, i) {
|
|
79389
79390
|
if (typeof e == "function" && (i = e, e = void 0), typeof t == "string" && (t = Buffer.from(t, typeof e == "string" ? e : "utf8")), this[ut]) return i?.(), false;
|
|
79390
79391
|
if ((this[y] === void 0 || this.brotli === void 0 && this[y] === false) && t) {
|
|
79391
|
-
if (this[p] && (t = Buffer.concat([this[p], t]), this[p] = void 0), t.length <
|
|
79392
|
-
for (let a = 0; this[y] === void 0 && a <
|
|
79392
|
+
if (this[p] && (t = Buffer.concat([this[p], t]), this[p] = void 0), t.length < On) return this[p] = t, i?.(), true;
|
|
79393
|
+
for (let a = 0; this[y] === void 0 && a < Zi.length; a++) t[a] !== Zi[a] && (this[y] = false);
|
|
79393
79394
|
let o = false;
|
|
79394
79395
|
if (this[y] === false && this.zstd !== false) {
|
|
79395
79396
|
o = true;
|
|
79396
|
-
for (let a = 0; a <
|
|
79397
|
+
for (let a = 0; a < Yi.length; a++) if (t[a] !== Yi[a]) {
|
|
79397
79398
|
o = false;
|
|
79398
79399
|
break;
|
|
79399
79400
|
}
|
|
@@ -79408,69 +79409,69 @@ var st = class extends import_events2.EventEmitter {
|
|
|
79408
79409
|
}
|
|
79409
79410
|
if (this[y] === void 0 || this[y] === false && (this.brotli || o)) {
|
|
79410
79411
|
let a = this[dt];
|
|
79411
|
-
this[dt] = false, this[y] = this[y] === void 0 ? new
|
|
79412
|
-
this[dt] = true, this[
|
|
79412
|
+
this[dt] = false, this[y] = this[y] === void 0 ? new ze({}) : o ? new Ye({}) : new We({}), this[y].on("data", (c) => this[Ve](c)), this[y].on("error", (c) => this.abort(c)), this[y].on("end", () => {
|
|
79413
|
+
this[dt] = true, this[Ve]();
|
|
79413
79414
|
}), this[Kt] = true;
|
|
79414
79415
|
let l = !!this[y][a ? "end" : "write"](t);
|
|
79415
79416
|
return this[Kt] = false, i?.(), l;
|
|
79416
79417
|
}
|
|
79417
79418
|
}
|
|
79418
|
-
this[Kt] = true, this[y] ? this[y].write(t) : this[
|
|
79419
|
-
let n = this[it].length ? false : this[et] ? this[et].flowing : true;
|
|
79420
|
-
return !n &&
|
|
79419
|
+
this[Kt] = true, this[y] ? this[y].write(t) : this[Ve](t), this[Kt] = false;
|
|
79420
|
+
let n = this[it].length > 0 ? false : this[et] ? this[et].flowing : true;
|
|
79421
|
+
return !n && this[it].length === 0 && this[et]?.once("drain", () => this.emit("drain")), i?.(), n;
|
|
79421
79422
|
}
|
|
79422
|
-
[
|
|
79423
|
+
[Gi](t) {
|
|
79423
79424
|
t && !this[ut] && (this[p] = this[p] ? Buffer.concat([this[p], t]) : t);
|
|
79424
79425
|
}
|
|
79425
|
-
[
|
|
79426
|
-
if (this[dt] && !this[
|
|
79427
|
-
this[
|
|
79426
|
+
[Xe]() {
|
|
79427
|
+
if (this[dt] && !this[Hi] && !this[ut] && !this[le]) {
|
|
79428
|
+
this[Hi] = true;
|
|
79428
79429
|
let t = this[Nt];
|
|
79429
79430
|
if (t && t.blockRemain) {
|
|
79430
79431
|
let e = this[p] ? this[p].length : 0;
|
|
79431
79432
|
this.warn("TAR_BAD_ARCHIVE", `Truncated input (needed ${t.blockRemain} more bytes, only ${e} available)`, { entry: t }), this[p] && t.write(this[p]), t.end();
|
|
79432
79433
|
}
|
|
79433
|
-
this[
|
|
79434
|
+
this[At](qe);
|
|
79434
79435
|
}
|
|
79435
79436
|
}
|
|
79436
|
-
[
|
|
79437
|
-
if (this[le] && t) this[
|
|
79438
|
-
else if (!t && !this[p]) this[
|
|
79437
|
+
[Ve](t) {
|
|
79438
|
+
if (this[le] && t) this[Gi](t);
|
|
79439
|
+
else if (!t && !this[p]) this[Xe]();
|
|
79439
79440
|
else if (t) {
|
|
79440
79441
|
if (this[le] = true, this[p]) {
|
|
79441
|
-
this[
|
|
79442
|
+
this[Gi](t);
|
|
79442
79443
|
let e = this[p];
|
|
79443
|
-
this[p] = void 0, this[
|
|
79444
|
-
} else this[
|
|
79445
|
-
for (; this[p] && this[p]?.length >= 512 && !this[ut] && !this[
|
|
79444
|
+
this[p] = void 0, this[$e](e);
|
|
79445
|
+
} else this[$e](t);
|
|
79446
|
+
for (; this[p] && this[p]?.length >= 512 && !this[ut] && !this[Qe]; ) {
|
|
79446
79447
|
let e = this[p];
|
|
79447
|
-
this[p] = void 0, this[
|
|
79448
|
+
this[p] = void 0, this[$e](e);
|
|
79448
79449
|
}
|
|
79449
79450
|
this[le] = false;
|
|
79450
79451
|
}
|
|
79451
|
-
(!this[p] || this[dt]) && this[
|
|
79452
|
+
(!this[p] || this[dt]) && this[Xe]();
|
|
79452
79453
|
}
|
|
79453
|
-
[
|
|
79454
|
+
[$e](t) {
|
|
79454
79455
|
let e = 0, i = t.length;
|
|
79455
|
-
for (; e + 512 <= i && !this[ut] && !this[
|
|
79456
|
+
for (; e + 512 <= i && !this[ut] && !this[Qe]; ) switch (this[B]) {
|
|
79456
79457
|
case "begin":
|
|
79457
79458
|
case "header":
|
|
79458
|
-
this[
|
|
79459
|
+
this[Gs](t, e), e += 512;
|
|
79459
79460
|
break;
|
|
79460
79461
|
case "ignore":
|
|
79461
79462
|
case "body":
|
|
79462
|
-
e += this[
|
|
79463
|
+
e += this[Wi](t, e);
|
|
79463
79464
|
break;
|
|
79464
79465
|
case "meta":
|
|
79465
|
-
e += this[
|
|
79466
|
+
e += this[Ws](t, e);
|
|
79466
79467
|
break;
|
|
79467
79468
|
default:
|
|
79468
79469
|
throw new Error("invalid state: " + this[B]);
|
|
79469
79470
|
}
|
|
79470
|
-
e < i && (this[p]
|
|
79471
|
+
e < i && (this[p] = this[p] ? Buffer.concat([t.subarray(e), this[p]]) : t.subarray(e));
|
|
79471
79472
|
}
|
|
79472
79473
|
end(t, e, i) {
|
|
79473
|
-
return typeof t == "function" && (i = t, e = void 0, t = void 0), typeof e == "function" && (i = e, e = void 0), typeof t == "string" && (t = Buffer.from(t, e)), i && this.once("finish", i), this[ut] || (this[y] ? (t && this[y].write(t), this[y].end()) : (this[dt] = true, (this.brotli === void 0 || this.zstd === void 0) && (t = t || Buffer.alloc(0)), t && this.write(t), this[
|
|
79474
|
+
return typeof t == "function" && (i = t, e = void 0, t = void 0), typeof e == "function" && (i = e, e = void 0), typeof t == "string" && (t = Buffer.from(t, e)), i && this.once("finish", i), this[ut] || (this[y] ? (t && this[y].write(t), this[y].end()) : (this[dt] = true, (this.brotli === void 0 || this.zstd === void 0) && (t = t || Buffer.alloc(0)), t && this.write(t), this[Xe]())), this;
|
|
79474
79475
|
}
|
|
79475
79476
|
};
|
|
79476
79477
|
var mt = (s3) => {
|
|
@@ -79478,25 +79479,25 @@ var mt = (s3) => {
|
|
|
79478
79479
|
for (; t > -1 && s3.charAt(t) === "/"; ) e = t, t--;
|
|
79479
79480
|
return e === -1 ? s3 : s3.slice(0, e);
|
|
79480
79481
|
};
|
|
79481
|
-
var
|
|
79482
|
+
var Nn = (s3) => {
|
|
79482
79483
|
let t = s3.onReadEntry;
|
|
79483
79484
|
s3.onReadEntry = t ? (e) => {
|
|
79484
79485
|
t(e), e.resume();
|
|
79485
79486
|
} : (e) => e.resume();
|
|
79486
79487
|
};
|
|
79487
|
-
var
|
|
79488
|
+
var Ki = (s3, t) => {
|
|
79488
79489
|
let e = new Map(t.map((n) => [mt(n), true])), i = s3.filter, r = (n, o = "") => {
|
|
79489
79490
|
let h = o || (0, import_path2.parse)(n).root || ".", a;
|
|
79490
79491
|
if (n === h) a = false;
|
|
79491
79492
|
else {
|
|
79492
79493
|
let l = e.get(n);
|
|
79493
|
-
l !== void 0 ?
|
|
79494
|
+
a = l !== void 0 ? l : r((0, import_path2.dirname)(n), h);
|
|
79494
79495
|
}
|
|
79495
79496
|
return e.set(n, a), a;
|
|
79496
79497
|
};
|
|
79497
79498
|
s3.filter = i ? (n, o) => i(n, o) && r(mt(n)) : (n) => r(mt(n));
|
|
79498
79499
|
};
|
|
79499
|
-
var
|
|
79500
|
+
var An = (s3) => {
|
|
79500
79501
|
let t = new st(s3), e = s3.file, i;
|
|
79501
79502
|
try {
|
|
79502
79503
|
i = import_node_fs.default.openSync(e, "r");
|
|
@@ -79520,58 +79521,58 @@ var On = (s3) => {
|
|
|
79520
79521
|
}
|
|
79521
79522
|
}
|
|
79522
79523
|
};
|
|
79523
|
-
var
|
|
79524
|
+
var Dn = (s3, t) => {
|
|
79524
79525
|
let e = new st(s3), i = s3.maxReadSize || 16 * 1024 * 1024, r = s3.file;
|
|
79525
79526
|
return new Promise((o, h) => {
|
|
79526
79527
|
e.on("error", h), e.on("end", o), import_node_fs.default.stat(r, (a, l) => {
|
|
79527
79528
|
if (a) h(a);
|
|
79528
79529
|
else {
|
|
79529
|
-
let c = new
|
|
79530
|
+
let c = new _t(r, { readSize: i, size: l.size });
|
|
79530
79531
|
c.on("error", h), c.pipe(e);
|
|
79531
79532
|
}
|
|
79532
79533
|
});
|
|
79533
79534
|
});
|
|
79534
79535
|
};
|
|
79535
|
-
var It = K(
|
|
79536
|
-
t?.length &&
|
|
79536
|
+
var It = K(An, Dn, (s3) => new st(s3), (s3) => new st(s3), (s3, t) => {
|
|
79537
|
+
t?.length && Ki(s3, t), s3.noResume || Nn(s3);
|
|
79537
79538
|
});
|
|
79538
|
-
var
|
|
79539
|
-
var { isAbsolute:
|
|
79539
|
+
var Vi = (s3, t, e) => (s3 &= 4095, e && (s3 = (s3 | 384) & -19), t && (s3 & 256 && (s3 |= 64), s3 & 32 && (s3 |= 8), s3 & 4 && (s3 |= 1)), s3);
|
|
79540
|
+
var { isAbsolute: Cn, parse: Ys } = import_node_path4.win32;
|
|
79540
79541
|
var ce = (s3) => {
|
|
79541
|
-
let t = "", e =
|
|
79542
|
-
for (;
|
|
79542
|
+
let t = "", e = Ys(s3);
|
|
79543
|
+
for (; Cn(s3) || e.root; ) {
|
|
79543
79544
|
let i = s3.charAt(0) === "/" && s3.slice(0, 4) !== "//?/" ? "/" : e.root;
|
|
79544
|
-
s3 = s3.slice(i.length), t += i, e =
|
|
79545
|
+
s3 = s3.slice(i.length), t += i, e = Ys(s3);
|
|
79545
79546
|
}
|
|
79546
79547
|
return [t, s3];
|
|
79547
79548
|
};
|
|
79548
|
-
var
|
|
79549
|
-
var
|
|
79550
|
-
var
|
|
79551
|
-
var
|
|
79552
|
-
var
|
|
79553
|
-
var
|
|
79554
|
-
var
|
|
79555
|
-
var
|
|
79556
|
-
var
|
|
79557
|
-
var
|
|
79558
|
-
var
|
|
79559
|
-
var
|
|
79560
|
-
var
|
|
79549
|
+
var Je = ["|", "<", ">", "?", ":"];
|
|
79550
|
+
var $i = Je.map((s3) => String.fromCodePoint(61440 + Number(s3.codePointAt(0))));
|
|
79551
|
+
var Fn = new Map(Je.map((s3, t) => [s3, $i[t]]));
|
|
79552
|
+
var kn = new Map($i.map((s3, t) => [s3, Je[t]]));
|
|
79553
|
+
var Xi = (s3) => Je.reduce((t, e) => t.split(e).join(Fn.get(e)), s3);
|
|
79554
|
+
var Ks = (s3) => $i.reduce((t, e) => t.split(e).join(kn.get(e)), s3);
|
|
79555
|
+
var Js = (s3, t) => t ? (s3 = f(s3).replace(/^\.(\/|$)/, ""), mt(t) + "/" + s3) : f(s3);
|
|
79556
|
+
var vn = 16 * 1024 * 1024;
|
|
79557
|
+
var Xs = /* @__PURE__ */ Symbol("process");
|
|
79558
|
+
var qs = /* @__PURE__ */ Symbol("file");
|
|
79559
|
+
var js = /* @__PURE__ */ Symbol("directory");
|
|
79560
|
+
var ji = /* @__PURE__ */ Symbol("symlink");
|
|
79561
|
+
var Qs = /* @__PURE__ */ Symbol("hardlink");
|
|
79561
79562
|
var fe = /* @__PURE__ */ Symbol("header");
|
|
79562
|
-
var
|
|
79563
|
-
var
|
|
79564
|
-
var
|
|
79565
|
-
var
|
|
79566
|
-
var
|
|
79567
|
-
var
|
|
79568
|
-
var
|
|
79563
|
+
var ti = /* @__PURE__ */ Symbol("read");
|
|
79564
|
+
var Qi = /* @__PURE__ */ Symbol("lstat");
|
|
79565
|
+
var ei = /* @__PURE__ */ Symbol("onlstat");
|
|
79566
|
+
var Ji = /* @__PURE__ */ Symbol("onread");
|
|
79567
|
+
var ts = /* @__PURE__ */ Symbol("onreadlink");
|
|
79568
|
+
var es = /* @__PURE__ */ Symbol("openfile");
|
|
79569
|
+
var is = /* @__PURE__ */ Symbol("onopenfile");
|
|
79569
79570
|
var pt = /* @__PURE__ */ Symbol("close");
|
|
79570
|
-
var
|
|
79571
|
-
var
|
|
79572
|
-
var
|
|
79571
|
+
var ii = /* @__PURE__ */ Symbol("mode");
|
|
79572
|
+
var ss = /* @__PURE__ */ Symbol("awaitDrain");
|
|
79573
|
+
var qi = /* @__PURE__ */ Symbol("ondrain");
|
|
79573
79574
|
var X = /* @__PURE__ */ Symbol("prefix");
|
|
79574
|
-
var de = class extends
|
|
79575
|
+
var de = class extends D {
|
|
79575
79576
|
path;
|
|
79576
79577
|
portable;
|
|
79577
79578
|
myuid = process.getuid && process.getuid() || 0;
|
|
@@ -79604,15 +79605,15 @@ var de = class extends A {
|
|
|
79604
79605
|
#t = false;
|
|
79605
79606
|
constructor(t, e = {}) {
|
|
79606
79607
|
let i = re(e);
|
|
79607
|
-
super(), this.path = f(t), this.portable = !!i.portable, this.maxReadSize = i.maxReadSize ||
|
|
79608
|
+
super(), this.path = f(t), this.portable = !!i.portable, this.maxReadSize = i.maxReadSize || vn, this.linkCache = i.linkCache || /* @__PURE__ */ new Map(), this.statCache = i.statCache || /* @__PURE__ */ new Map(), this.preservePaths = !!i.preservePaths, this.cwd = f(i.cwd || process.cwd()), this.strict = !!i.strict, this.noPax = !!i.noPax, this.noMtime = !!i.noMtime, this.mtime = i.mtime, this.prefix = i.prefix ? f(i.prefix) : void 0, this.onWriteEntry = i.onWriteEntry, typeof i.onwarn == "function" && this.on("warn", i.onwarn);
|
|
79608
79609
|
let r = false;
|
|
79609
79610
|
if (!this.preservePaths) {
|
|
79610
79611
|
let [o, h] = ce(this.path);
|
|
79611
79612
|
o && typeof h == "string" && (this.path = h, r = o);
|
|
79612
79613
|
}
|
|
79613
|
-
this.win32 = !!i.win32 || process.platform === "win32", this.win32 && (this.path =
|
|
79614
|
+
this.win32 = !!i.win32 || process.platform === "win32", this.win32 && (this.path = Ks(this.path.replaceAll(/\\/g, "/")), t = t.replaceAll(/\\/g, "/")), this.absolute = f(i.absolute || import_path3.default.resolve(this.cwd, t)), this.path === "" && (this.path = "./"), r && this.warn("TAR_ENTRY_INFO", `stripping ${r} from absolute path`, { entry: this, path: r + this.path });
|
|
79614
79615
|
let n = this.statCache.get(this.absolute);
|
|
79615
|
-
n ? this[
|
|
79616
|
+
n ? this[ei](n) : this[Qi]();
|
|
79616
79617
|
}
|
|
79617
79618
|
warn(t, e, i = {}) {
|
|
79618
79619
|
return Lt(this, t, e, i);
|
|
@@ -79620,93 +79621,93 @@ var de = class extends A {
|
|
|
79620
79621
|
emit(t, ...e) {
|
|
79621
79622
|
return t === "error" && (this.#t = true), super.emit(t, ...e);
|
|
79622
79623
|
}
|
|
79623
|
-
[
|
|
79624
|
+
[Qi]() {
|
|
79624
79625
|
import_fs4.default.lstat(this.absolute, (t, e) => {
|
|
79625
79626
|
if (t) return this.emit("error", t);
|
|
79626
|
-
this[
|
|
79627
|
+
this[ei](e);
|
|
79627
79628
|
});
|
|
79628
79629
|
}
|
|
79629
|
-
[
|
|
79630
|
-
this.statCache.set(this.absolute, t), this.stat = t, t.isFile() || (t.size = 0), this.type =
|
|
79630
|
+
[ei](t) {
|
|
79631
|
+
this.statCache.set(this.absolute, t), this.stat = t, t.isFile() || (t.size = 0), this.type = Mn(t), this.emit("stat", t), this[Xs]();
|
|
79631
79632
|
}
|
|
79632
|
-
[
|
|
79633
|
+
[Xs]() {
|
|
79633
79634
|
switch (this.type) {
|
|
79634
79635
|
case "File":
|
|
79635
|
-
return this[
|
|
79636
|
+
return this[qs]();
|
|
79636
79637
|
case "Directory":
|
|
79637
|
-
return this[
|
|
79638
|
+
return this[js]();
|
|
79638
79639
|
case "SymbolicLink":
|
|
79639
|
-
return this[
|
|
79640
|
+
return this[ji]();
|
|
79640
79641
|
default:
|
|
79641
79642
|
return this.end();
|
|
79642
79643
|
}
|
|
79643
79644
|
}
|
|
79644
|
-
[
|
|
79645
|
-
return
|
|
79645
|
+
[ii](t) {
|
|
79646
|
+
return Vi(t, this.type === "Directory", this.portable);
|
|
79646
79647
|
}
|
|
79647
79648
|
[X](t) {
|
|
79648
|
-
return
|
|
79649
|
+
return Js(t, this.prefix);
|
|
79649
79650
|
}
|
|
79650
79651
|
[fe]() {
|
|
79651
79652
|
if (!this.stat) throw new Error("cannot write header before stat");
|
|
79652
|
-
this.type === "Directory" && this.portable && (this.noMtime = true), this.onWriteEntry?.(this), this.header = new F({ path: this[X](this.path), linkpath: this.type === "Link" && this.linkpath !== void 0 ? this[X](this.linkpath) : this.linkpath, mode: this[
|
|
79653
|
+
this.type === "Directory" && this.portable && (this.noMtime = true), this.onWriteEntry?.(this), this.header = new F({ path: this[X](this.path), linkpath: this.type === "Link" && this.linkpath !== void 0 ? this[X](this.linkpath) : this.linkpath, mode: this[ii](this.stat.mode), uid: this.portable ? void 0 : this.stat.uid, gid: this.portable ? void 0 : this.stat.gid, size: this.stat.size, mtime: this.noMtime ? void 0 : this.mtime || this.stat.mtime, type: this.type === "Unsupported" ? void 0 : this.type, uname: this.portable ? void 0 : this.stat.uid === this.myuid ? this.myuser : "", atime: this.portable ? void 0 : this.stat.atime, ctime: this.portable ? void 0 : this.stat.ctime }), this.header.encode() && !this.noPax && super.write(new ct({ atime: this.portable ? void 0 : this.header.atime, ctime: this.portable ? void 0 : this.header.ctime, gid: this.portable ? void 0 : this.header.gid, mtime: this.noMtime ? void 0 : this.mtime || this.header.mtime, path: this[X](this.path), linkpath: this.type === "Link" && this.linkpath !== void 0 ? this[X](this.linkpath) : this.linkpath, size: this.header.size, uid: this.portable ? void 0 : this.header.uid, uname: this.portable ? void 0 : this.header.uname, dev: this.portable ? void 0 : this.stat.dev, ino: this.portable ? void 0 : this.stat.ino, nlink: this.portable ? void 0 : this.stat.nlink }).encode());
|
|
79653
79654
|
let t = this.header?.block;
|
|
79654
79655
|
if (!t) throw new Error("failed to encode header");
|
|
79655
79656
|
super.write(t);
|
|
79656
79657
|
}
|
|
79657
|
-
[
|
|
79658
|
+
[js]() {
|
|
79658
79659
|
if (!this.stat) throw new Error("cannot create directory entry without stat");
|
|
79659
79660
|
this.path.slice(-1) !== "/" && (this.path += "/"), this.stat.size = 0, this[fe](), this.end();
|
|
79660
79661
|
}
|
|
79661
|
-
[
|
|
79662
|
+
[ji]() {
|
|
79662
79663
|
import_fs4.default.readlink(this.absolute, (t, e) => {
|
|
79663
79664
|
if (t) return this.emit("error", t);
|
|
79664
|
-
this[
|
|
79665
|
+
this[ts](e);
|
|
79665
79666
|
});
|
|
79666
79667
|
}
|
|
79667
|
-
[
|
|
79668
|
+
[ts](t) {
|
|
79668
79669
|
this.linkpath = f(t), this[fe](), this.end();
|
|
79669
79670
|
}
|
|
79670
|
-
[
|
|
79671
|
+
[Qs](t) {
|
|
79671
79672
|
if (!this.stat) throw new Error("cannot create link entry without stat");
|
|
79672
79673
|
this.type = "Link", this.linkpath = f(import_path3.default.relative(this.cwd, t)), this.stat.size = 0, this[fe](), this.end();
|
|
79673
79674
|
}
|
|
79674
|
-
[
|
|
79675
|
+
[qs]() {
|
|
79675
79676
|
if (!this.stat) throw new Error("cannot create file entry without stat");
|
|
79676
79677
|
if (this.stat.nlink > 1) {
|
|
79677
79678
|
let t = `${this.stat.dev}:${this.stat.ino}`, e = this.linkCache.get(t);
|
|
79678
|
-
if (e?.indexOf(this.cwd) === 0) return this[
|
|
79679
|
+
if (e?.indexOf(this.cwd) === 0) return this[Qs](e);
|
|
79679
79680
|
this.linkCache.set(t, this.absolute);
|
|
79680
79681
|
}
|
|
79681
79682
|
if (this[fe](), this.stat.size === 0) return this.end();
|
|
79682
|
-
this[
|
|
79683
|
+
this[es]();
|
|
79683
79684
|
}
|
|
79684
|
-
[
|
|
79685
|
+
[es]() {
|
|
79685
79686
|
import_fs4.default.open(this.absolute, "r", (t, e) => {
|
|
79686
79687
|
if (t) return this.emit("error", t);
|
|
79687
|
-
this[
|
|
79688
|
+
this[is](e);
|
|
79688
79689
|
});
|
|
79689
79690
|
}
|
|
79690
|
-
[
|
|
79691
|
+
[is](t) {
|
|
79691
79692
|
if (this.fd = t, this.#t) return this[pt]();
|
|
79692
79693
|
if (!this.stat) throw new Error("should stat before calling onopenfile");
|
|
79693
79694
|
this.blockLen = 512 * Math.ceil(this.stat.size / 512), this.blockRemain = this.blockLen;
|
|
79694
79695
|
let e = Math.min(this.blockLen, this.maxReadSize);
|
|
79695
|
-
this.buf = Buffer.allocUnsafe(e), this.offset = 0, this.pos = 0, this.remain = this.stat.size, this.length = this.buf.length, this[
|
|
79696
|
+
this.buf = Buffer.allocUnsafe(e), this.offset = 0, this.pos = 0, this.remain = this.stat.size, this.length = this.buf.length, this[ti]();
|
|
79696
79697
|
}
|
|
79697
|
-
[
|
|
79698
|
+
[ti]() {
|
|
79698
79699
|
let { fd: t, buf: e, offset: i, length: r, pos: n } = this;
|
|
79699
79700
|
if (t === void 0 || e === void 0) throw new Error("cannot read file without first opening");
|
|
79700
79701
|
import_fs4.default.read(t, e, i, r, n, (o, h) => {
|
|
79701
79702
|
if (o) return this[pt](() => this.emit("error", o));
|
|
79702
|
-
this[
|
|
79703
|
+
this[Ji](h);
|
|
79703
79704
|
});
|
|
79704
79705
|
}
|
|
79705
79706
|
[pt](t = () => {
|
|
79706
79707
|
}) {
|
|
79707
79708
|
this.fd !== void 0 && import_fs4.default.close(this.fd, t);
|
|
79708
79709
|
}
|
|
79709
|
-
[
|
|
79710
|
+
[Ji](t) {
|
|
79710
79711
|
if (t <= 0 && this.remain > 0) {
|
|
79711
79712
|
let r = Object.assign(new Error("encountered unexpected EOF"), { path: this.absolute, syscall: "read", code: "EOF" });
|
|
79712
79713
|
return this[pt](() => this.emit("error", r));
|
|
@@ -79718,9 +79719,9 @@ var de = class extends A {
|
|
|
79718
79719
|
if (!this.buf) throw new Error("should have created buffer prior to reading");
|
|
79719
79720
|
if (t === this.remain) for (let r = t; r < this.length && t < this.blockRemain; r++) this.buf[r + this.offset] = 0, t++, this.remain++;
|
|
79720
79721
|
let e = this.offset === 0 && t === this.buf.length ? this.buf : this.buf.subarray(this.offset, this.offset + t);
|
|
79721
|
-
this.write(e) ? this[
|
|
79722
|
+
this.write(e) ? this[qi]() : this[ss](() => this[qi]());
|
|
79722
79723
|
}
|
|
79723
|
-
[
|
|
79724
|
+
[ss](t) {
|
|
79724
79725
|
this.once("drain", t);
|
|
79725
79726
|
}
|
|
79726
79727
|
write(t, e, i) {
|
|
@@ -79730,30 +79731,30 @@ var de = class extends A {
|
|
|
79730
79731
|
}
|
|
79731
79732
|
return this.remain -= t.length, this.blockRemain -= t.length, this.pos += t.length, this.offset += t.length, super.write(t, null, i);
|
|
79732
79733
|
}
|
|
79733
|
-
[
|
|
79734
|
+
[qi]() {
|
|
79734
79735
|
if (!this.remain) return this.blockRemain && super.write(Buffer.alloc(this.blockRemain)), this[pt]((t) => t ? this.emit("error", t) : this.end());
|
|
79735
79736
|
if (!this.buf) throw new Error("buffer lost somehow in ONDRAIN");
|
|
79736
|
-
this.offset >= this.length && (this.buf = Buffer.allocUnsafe(Math.min(this.blockRemain, this.buf.length)), this.offset = 0), this.length = this.buf.length - this.offset, this[
|
|
79737
|
+
this.offset >= this.length && (this.buf = Buffer.allocUnsafe(Math.min(this.blockRemain, this.buf.length)), this.offset = 0), this.length = this.buf.length - this.offset, this[ti]();
|
|
79737
79738
|
}
|
|
79738
79739
|
};
|
|
79739
|
-
var
|
|
79740
|
+
var si = class extends de {
|
|
79740
79741
|
sync = true;
|
|
79741
|
-
[
|
|
79742
|
-
this[
|
|
79742
|
+
[Qi]() {
|
|
79743
|
+
this[ei](import_fs4.default.lstatSync(this.absolute));
|
|
79743
79744
|
}
|
|
79744
|
-
[
|
|
79745
|
-
this[
|
|
79745
|
+
[ji]() {
|
|
79746
|
+
this[ts](import_fs4.default.readlinkSync(this.absolute));
|
|
79746
79747
|
}
|
|
79747
|
-
[
|
|
79748
|
-
this[
|
|
79748
|
+
[es]() {
|
|
79749
|
+
this[is](import_fs4.default.openSync(this.absolute, "r"));
|
|
79749
79750
|
}
|
|
79750
|
-
[
|
|
79751
|
+
[ti]() {
|
|
79751
79752
|
let t = true;
|
|
79752
79753
|
try {
|
|
79753
79754
|
let { fd: e, buf: i, offset: r, length: n, pos: o } = this;
|
|
79754
79755
|
if (e === void 0 || i === void 0) throw new Error("fd and buf must be set in READ method");
|
|
79755
79756
|
let h = import_fs4.default.readSync(e, i, r, n, o);
|
|
79756
|
-
this[
|
|
79757
|
+
this[Ji](h), t = false;
|
|
79757
79758
|
} finally {
|
|
79758
79759
|
if (t) try {
|
|
79759
79760
|
this[pt](() => {
|
|
@@ -79762,7 +79763,7 @@ var ii = class extends de {
|
|
|
79762
79763
|
}
|
|
79763
79764
|
}
|
|
79764
79765
|
}
|
|
79765
|
-
[
|
|
79766
|
+
[ss](t) {
|
|
79766
79767
|
t();
|
|
79767
79768
|
}
|
|
79768
79769
|
[pt](t = () => {
|
|
@@ -79770,7 +79771,7 @@ var ii = class extends de {
|
|
|
79770
79771
|
this.fd !== void 0 && import_fs4.default.closeSync(this.fd), t();
|
|
79771
79772
|
}
|
|
79772
79773
|
};
|
|
79773
|
-
var
|
|
79774
|
+
var ri = class extends D {
|
|
79774
79775
|
blockLen = 0;
|
|
79775
79776
|
blockRemain = 0;
|
|
79776
79777
|
buf = 0;
|
|
@@ -79806,7 +79807,7 @@ var si = class extends A {
|
|
|
79806
79807
|
super(), this.preservePaths = !!i.preservePaths, this.portable = !!i.portable, this.strict = !!i.strict, this.noPax = !!i.noPax, this.noMtime = !!i.noMtime, this.onWriteEntry = i.onWriteEntry, this.readEntry = t;
|
|
79807
79808
|
let { type: r } = t;
|
|
79808
79809
|
if (r === "Unsupported") throw new Error("writing entry that should be ignored");
|
|
79809
|
-
this.type = r, this.type === "Directory" && this.portable && (this.noMtime = true), this.prefix = i.prefix, this.path = f(t.path), this.mode = t.mode !== void 0 ? this[
|
|
79810
|
+
this.type = r, this.type === "Directory" && this.portable && (this.noMtime = true), this.prefix = i.prefix, this.path = f(t.path), this.mode = t.mode !== void 0 ? this[ii](t.mode) : void 0, this.uid = this.portable ? void 0 : t.uid, this.gid = this.portable ? void 0 : t.gid, this.uname = this.portable ? void 0 : t.uname, this.gname = this.portable ? void 0 : t.gname, this.size = t.size, this.mtime = this.noMtime ? void 0 : i.mtime || t.mtime, this.atime = this.portable ? void 0 : t.atime, this.ctime = this.portable ? void 0 : t.ctime, this.linkpath = t.linkpath !== void 0 ? f(t.linkpath) : void 0, typeof i.onwarn == "function" && this.on("warn", i.onwarn);
|
|
79810
79811
|
let n = false;
|
|
79811
79812
|
if (!this.preservePaths) {
|
|
79812
79813
|
let [h, a] = ce(this.path);
|
|
@@ -79818,10 +79819,10 @@ var si = class extends A {
|
|
|
79818
79819
|
super.write(o), t.pipe(this);
|
|
79819
79820
|
}
|
|
79820
79821
|
[X](t) {
|
|
79821
|
-
return
|
|
79822
|
+
return Js(t, this.prefix);
|
|
79822
79823
|
}
|
|
79823
|
-
[
|
|
79824
|
-
return
|
|
79824
|
+
[ii](t) {
|
|
79825
|
+
return Vi(t, this.type === "Directory", this.portable);
|
|
79825
79826
|
}
|
|
79826
79827
|
write(t, e, i) {
|
|
79827
79828
|
typeof e == "function" && (i = e, e = void 0), typeof t == "string" && (t = Buffer.from(t, typeof e == "string" ? e : "utf8"));
|
|
@@ -79833,8 +79834,8 @@ var si = class extends A {
|
|
|
79833
79834
|
return this.blockRemain && super.write(Buffer.alloc(this.blockRemain)), typeof t == "function" && (i = t, e = void 0, t = void 0), typeof e == "function" && (i = e, e = void 0), typeof t == "string" && (t = Buffer.from(t, e ?? "utf8")), i && this.once("finish", i), t ? super.end(t, i) : super.end(i), this;
|
|
79834
79835
|
}
|
|
79835
79836
|
};
|
|
79836
|
-
var
|
|
79837
|
-
var
|
|
79837
|
+
var Mn = (s3) => s3.isFile() ? "File" : s3.isDirectory() ? "Directory" : s3.isSymbolicLink() ? "SymbolicLink" : "Unsupported";
|
|
79838
|
+
var ni = class s2 {
|
|
79838
79839
|
tail;
|
|
79839
79840
|
head;
|
|
79840
79841
|
length = 0;
|
|
@@ -79865,11 +79866,11 @@ var ri = class s2 {
|
|
|
79865
79866
|
t.list = this, t.prev = e, e && (e.next = t), this.tail = t, this.head || (this.head = t), this.length++;
|
|
79866
79867
|
}
|
|
79867
79868
|
push(...t) {
|
|
79868
|
-
for (let e = 0, i = t.length; e < i; e++)
|
|
79869
|
+
for (let e = 0, i = t.length; e < i; e++) Pn(this, t[e]);
|
|
79869
79870
|
return this.length;
|
|
79870
79871
|
}
|
|
79871
79872
|
unshift(...t) {
|
|
79872
|
-
for (var e = 0, i = t.length; e < i; e++)
|
|
79873
|
+
for (var e = 0, i = t.length; e < i; e++) zn(this, t[e]);
|
|
79873
79874
|
return this.length;
|
|
79874
79875
|
}
|
|
79875
79876
|
pop() {
|
|
@@ -79965,7 +79966,7 @@ var ri = class s2 {
|
|
|
79965
79966
|
let n = [];
|
|
79966
79967
|
for (let o = 0; r && o < e; o++) n.push(r.value), r = this.removeNode(r);
|
|
79967
79968
|
r ? r !== this.tail && (r = r.prev) : r = this.tail;
|
|
79968
|
-
for (let o of i) r =
|
|
79969
|
+
for (let o of i) r = Bn(this, r, o);
|
|
79969
79970
|
return n;
|
|
79970
79971
|
}
|
|
79971
79972
|
reverse() {
|
|
@@ -79977,14 +79978,14 @@ var ri = class s2 {
|
|
|
79977
79978
|
return this.head = e, this.tail = t, this;
|
|
79978
79979
|
}
|
|
79979
79980
|
};
|
|
79980
|
-
function
|
|
79981
|
+
function Bn(s3, t, e) {
|
|
79981
79982
|
let i = t, r = t ? t.next : s3.head, n = new ue(e, i, r, s3);
|
|
79982
79983
|
return n.next === void 0 && (s3.tail = n), n.prev === void 0 && (s3.head = n), s3.length++, n;
|
|
79983
79984
|
}
|
|
79984
|
-
function
|
|
79985
|
+
function Pn(s3, t) {
|
|
79985
79986
|
s3.tail = new ue(t, s3.tail, void 0, s3), s3.head || (s3.head = s3.tail), s3.length++;
|
|
79986
79987
|
}
|
|
79987
|
-
function
|
|
79988
|
+
function zn(s3, t) {
|
|
79988
79989
|
s3.head = new ue(t, void 0, s3.head, s3), s3.tail || (s3.tail = s3.head), s3.length++;
|
|
79989
79990
|
}
|
|
79990
79991
|
var ue = class {
|
|
@@ -79996,7 +79997,7 @@ var ue = class {
|
|
|
79996
79997
|
this.list = r, this.value = t, e ? (e.next = this, this.prev = e) : this.prev = void 0, i ? (i.prev = this, this.next = i) : this.next = void 0;
|
|
79997
79998
|
}
|
|
79998
79999
|
};
|
|
79999
|
-
var
|
|
80000
|
+
var di = class {
|
|
80000
80001
|
path;
|
|
80001
80002
|
absolute;
|
|
80002
80003
|
entry;
|
|
@@ -80009,28 +80010,28 @@ var fi = class {
|
|
|
80009
80010
|
this.path = t || "./", this.absolute = e;
|
|
80010
80011
|
}
|
|
80011
80012
|
};
|
|
80012
|
-
var
|
|
80013
|
-
var
|
|
80013
|
+
var tr = Buffer.alloc(1024);
|
|
80014
|
+
var oi = /* @__PURE__ */ Symbol("onStat");
|
|
80014
80015
|
var me = /* @__PURE__ */ Symbol("ended");
|
|
80015
80016
|
var W = /* @__PURE__ */ Symbol("queue");
|
|
80016
80017
|
var Ct = /* @__PURE__ */ Symbol("current");
|
|
80017
80018
|
var Ft = /* @__PURE__ */ Symbol("process");
|
|
80018
80019
|
var pe = /* @__PURE__ */ Symbol("processing");
|
|
80019
|
-
var
|
|
80020
|
+
var rs = /* @__PURE__ */ Symbol("processJob");
|
|
80020
80021
|
var G = /* @__PURE__ */ Symbol("jobs");
|
|
80021
|
-
var
|
|
80022
|
-
var
|
|
80023
|
-
var
|
|
80024
|
-
var
|
|
80025
|
-
var
|
|
80026
|
-
var
|
|
80027
|
-
var
|
|
80028
|
-
var
|
|
80029
|
-
var
|
|
80030
|
-
var
|
|
80031
|
-
var
|
|
80032
|
-
var
|
|
80033
|
-
var Et = class extends
|
|
80022
|
+
var ns = /* @__PURE__ */ Symbol("jobDone");
|
|
80023
|
+
var hi = /* @__PURE__ */ Symbol("addFSEntry");
|
|
80024
|
+
var er = /* @__PURE__ */ Symbol("addTarEntry");
|
|
80025
|
+
var as = /* @__PURE__ */ Symbol("stat");
|
|
80026
|
+
var ls = /* @__PURE__ */ Symbol("readdir");
|
|
80027
|
+
var ai = /* @__PURE__ */ Symbol("onreaddir");
|
|
80028
|
+
var li = /* @__PURE__ */ Symbol("pipe");
|
|
80029
|
+
var ir = /* @__PURE__ */ Symbol("entry");
|
|
80030
|
+
var os2 = /* @__PURE__ */ Symbol("entryOpt");
|
|
80031
|
+
var ci = /* @__PURE__ */ Symbol("writeEntryClass");
|
|
80032
|
+
var rr = /* @__PURE__ */ Symbol("write");
|
|
80033
|
+
var hs = /* @__PURE__ */ Symbol("ondrain");
|
|
80034
|
+
var Et = class extends D {
|
|
80034
80035
|
sync = false;
|
|
80035
80036
|
opt;
|
|
80036
80037
|
cwd;
|
|
@@ -80051,22 +80052,22 @@ var Et = class extends A {
|
|
|
80051
80052
|
mtime;
|
|
80052
80053
|
filter;
|
|
80053
80054
|
jobs;
|
|
80054
|
-
[
|
|
80055
|
+
[ci];
|
|
80055
80056
|
onWriteEntry;
|
|
80056
80057
|
[W];
|
|
80057
80058
|
[G] = 0;
|
|
80058
80059
|
[pe] = false;
|
|
80059
80060
|
[me] = false;
|
|
80060
80061
|
constructor(t = {}) {
|
|
80061
|
-
if (super(), this.opt = t, this.file = t.file || "", this.cwd = t.cwd || process.cwd(), this.maxReadSize = t.maxReadSize, this.preservePaths = !!t.preservePaths, this.strict = !!t.strict, this.noPax = !!t.noPax, this.prefix = f(t.prefix || ""), this.linkCache = t.linkCache || /* @__PURE__ */ new Map(), this.statCache = t.statCache || /* @__PURE__ */ new Map(), this.readdirCache = t.readdirCache || /* @__PURE__ */ new Map(), this.onWriteEntry = t.onWriteEntry, this[
|
|
80062
|
+
if (super(), this.opt = t, this.file = t.file || "", this.cwd = t.cwd || process.cwd(), this.maxReadSize = t.maxReadSize, this.preservePaths = !!t.preservePaths, this.strict = !!t.strict, this.noPax = !!t.noPax, this.prefix = f(t.prefix || ""), this.linkCache = t.linkCache || /* @__PURE__ */ new Map(), this.statCache = t.statCache || /* @__PURE__ */ new Map(), this.readdirCache = t.readdirCache || /* @__PURE__ */ new Map(), this.onWriteEntry = t.onWriteEntry, this[ci] = de, typeof t.onwarn == "function" && this.on("warn", t.onwarn), this.portable = !!t.portable, t.gzip || t.brotli || t.zstd) {
|
|
80062
80063
|
if ((t.gzip ? 1 : 0) + (t.brotli ? 1 : 0) + (t.zstd ? 1 : 0) > 1) throw new TypeError("gzip, brotli, zstd are mutually exclusive");
|
|
80063
|
-
if (t.gzip && (typeof t.gzip != "object" && (t.gzip = {}), this.portable && (t.gzip.portable = true), this.zip = new
|
|
80064
|
+
if (t.gzip && (typeof t.gzip != "object" && (t.gzip = {}), this.portable && (t.gzip.portable = true), this.zip = new Pe(t.gzip)), t.brotli && (typeof t.brotli != "object" && (t.brotli = {}), this.zip = new He(t.brotli)), t.zstd && (typeof t.zstd != "object" && (t.zstd = {}), this.zip = new Ze(t.zstd)), !this.zip) throw new Error("impossible");
|
|
80064
80065
|
let e = this.zip;
|
|
80065
|
-
e.on("data", (i) => super.write(i)), e.on("end", () => super.end()), e.on("drain", () => this[
|
|
80066
|
-
} else this.on("drain", this[
|
|
80067
|
-
this.noDirRecurse = !!t.noDirRecurse, this.follow = !!t.follow, this.noMtime = !!t.noMtime, t.mtime && (this.mtime = t.mtime), this.filter = typeof t.filter == "function" ? t.filter : () => true, this[W] = new
|
|
80066
|
+
e.on("data", (i) => super.write(i)), e.on("end", () => super.end()), e.on("drain", () => this[hs]()), this.on("resume", () => e.resume());
|
|
80067
|
+
} else this.on("drain", this[hs]);
|
|
80068
|
+
this.noDirRecurse = !!t.noDirRecurse, this.follow = !!t.follow, this.noMtime = !!t.noMtime, t.mtime && (this.mtime = t.mtime), this.filter = typeof t.filter == "function" ? t.filter : () => true, this[W] = new ni(), this[G] = 0, this.jobs = Number(t.jobs) || 4, this[pe] = false, this[me] = false;
|
|
80068
80069
|
}
|
|
80069
|
-
[
|
|
80070
|
+
[rr](t) {
|
|
80070
80071
|
return super.write(t);
|
|
80071
80072
|
}
|
|
80072
80073
|
add(t) {
|
|
@@ -80077,97 +80078,97 @@ var Et = class extends A {
|
|
|
80077
80078
|
}
|
|
80078
80079
|
write(t) {
|
|
80079
80080
|
if (this[me]) throw new Error("write after end");
|
|
80080
|
-
return t instanceof Yt ? this[
|
|
80081
|
+
return t instanceof Yt ? this[er](t) : this[hi](t), this.flowing;
|
|
80081
80082
|
}
|
|
80082
|
-
[
|
|
80083
|
+
[er](t) {
|
|
80083
80084
|
let e = f(import_path4.default.resolve(this.cwd, t.path));
|
|
80084
80085
|
if (!this.filter(t.path, t)) t.resume();
|
|
80085
80086
|
else {
|
|
80086
|
-
let i = new
|
|
80087
|
-
i.entry = new
|
|
80087
|
+
let i = new di(t.path, e);
|
|
80088
|
+
i.entry = new ri(t, this[os2](i)), i.entry.on("end", () => this[ns](i)), this[G] += 1, this[W].push(i);
|
|
80088
80089
|
}
|
|
80089
80090
|
this[Ft]();
|
|
80090
80091
|
}
|
|
80091
|
-
[
|
|
80092
|
+
[hi](t) {
|
|
80092
80093
|
let e = f(import_path4.default.resolve(this.cwd, t));
|
|
80093
|
-
this[W].push(new
|
|
80094
|
+
this[W].push(new di(t, e)), this[Ft]();
|
|
80094
80095
|
}
|
|
80095
|
-
[
|
|
80096
|
+
[as](t) {
|
|
80096
80097
|
t.pending = true, this[G] += 1;
|
|
80097
80098
|
let e = this.follow ? "stat" : "lstat";
|
|
80098
80099
|
import_fs3.default[e](t.absolute, (i, r) => {
|
|
80099
|
-
t.pending = false, this[G] -= 1, i ? this.emit("error", i) : this[
|
|
80100
|
+
t.pending = false, this[G] -= 1, i ? this.emit("error", i) : this[oi](t, r);
|
|
80100
80101
|
});
|
|
80101
80102
|
}
|
|
80102
|
-
[
|
|
80103
|
-
this.statCache.set(t.absolute, e), t.stat = e, this.filter(t.path, e) ? e.isFile() && e.nlink > 1 && t === this[Ct] && !this.linkCache.get(`${e.dev}:${e.ino}`) && !this.sync && this[
|
|
80103
|
+
[oi](t, e) {
|
|
80104
|
+
this.statCache.set(t.absolute, e), t.stat = e, this.filter(t.path, e) ? e.isFile() && e.nlink > 1 && t === this[Ct] && !this.linkCache.get(`${e.dev}:${e.ino}`) && !this.sync && this[rs](t) : t.ignore = true, this[Ft]();
|
|
80104
80105
|
}
|
|
80105
|
-
[
|
|
80106
|
+
[ls](t) {
|
|
80106
80107
|
t.pending = true, this[G] += 1, import_fs3.default.readdir(t.absolute, (e, i) => {
|
|
80107
80108
|
if (t.pending = false, this[G] -= 1, e) return this.emit("error", e);
|
|
80108
|
-
this[
|
|
80109
|
+
this[ai](t, i);
|
|
80109
80110
|
});
|
|
80110
80111
|
}
|
|
80111
|
-
[
|
|
80112
|
+
[ai](t, e) {
|
|
80112
80113
|
this.readdirCache.set(t.absolute, e), t.readdir = e, this[Ft]();
|
|
80113
80114
|
}
|
|
80114
80115
|
[Ft]() {
|
|
80115
80116
|
if (!this[pe]) {
|
|
80116
80117
|
this[pe] = true;
|
|
80117
|
-
for (let t = this[W].head; t && this[G] < this.jobs; t = t.next) if (this[
|
|
80118
|
+
for (let t = this[W].head; t && this[G] < this.jobs; t = t.next) if (this[rs](t.value), t.value.ignore) {
|
|
80118
80119
|
let e = t.next;
|
|
80119
80120
|
this[W].removeNode(t), t.next = e;
|
|
80120
80121
|
}
|
|
80121
|
-
this[pe] = false, this[me] &&
|
|
80122
|
+
this[pe] = false, this[me] && this[W].length === 0 && this[G] === 0 && (this.zip ? this.zip.end(tr) : (super.write(tr), super.end()));
|
|
80122
80123
|
}
|
|
80123
80124
|
}
|
|
80124
80125
|
get [Ct]() {
|
|
80125
80126
|
return this[W] && this[W].head && this[W].head.value;
|
|
80126
80127
|
}
|
|
80127
|
-
[
|
|
80128
|
+
[ns](t) {
|
|
80128
80129
|
this[W].shift(), this[G] -= 1, this[Ft]();
|
|
80129
80130
|
}
|
|
80130
|
-
[
|
|
80131
|
+
[rs](t) {
|
|
80131
80132
|
if (!t.pending) {
|
|
80132
80133
|
if (t.entry) {
|
|
80133
|
-
t === this[Ct] && !t.piped && this[
|
|
80134
|
+
t === this[Ct] && !t.piped && this[li](t);
|
|
80134
80135
|
return;
|
|
80135
80136
|
}
|
|
80136
80137
|
if (!t.stat) {
|
|
80137
80138
|
let e = this.statCache.get(t.absolute);
|
|
80138
|
-
e ? this[
|
|
80139
|
+
e ? this[oi](t, e) : this[as](t);
|
|
80139
80140
|
}
|
|
80140
80141
|
if (t.stat && !t.ignore) {
|
|
80141
80142
|
if (!this.noDirRecurse && t.stat.isDirectory() && !t.readdir) {
|
|
80142
80143
|
let e = this.readdirCache.get(t.absolute);
|
|
80143
|
-
if (e ? this[
|
|
80144
|
+
if (e ? this[ai](t, e) : this[ls](t), !t.readdir) return;
|
|
80144
80145
|
}
|
|
80145
|
-
if (t.entry = this[
|
|
80146
|
+
if (t.entry = this[ir](t), !t.entry) {
|
|
80146
80147
|
t.ignore = true;
|
|
80147
80148
|
return;
|
|
80148
80149
|
}
|
|
80149
|
-
t === this[Ct] && !t.piped && this[
|
|
80150
|
+
t === this[Ct] && !t.piped && this[li](t);
|
|
80150
80151
|
}
|
|
80151
80152
|
}
|
|
80152
80153
|
}
|
|
80153
|
-
[
|
|
80154
|
+
[os2](t) {
|
|
80154
80155
|
return { onwarn: (e, i, r) => this.warn(e, i, r), noPax: this.noPax, cwd: this.cwd, absolute: t.absolute, preservePaths: this.preservePaths, maxReadSize: this.maxReadSize, strict: this.strict, portable: this.portable, linkCache: this.linkCache, statCache: this.statCache, noMtime: this.noMtime, mtime: this.mtime, prefix: this.prefix, onWriteEntry: this.onWriteEntry };
|
|
80155
80156
|
}
|
|
80156
|
-
[
|
|
80157
|
+
[ir](t) {
|
|
80157
80158
|
this[G] += 1;
|
|
80158
80159
|
try {
|
|
80159
|
-
return new this[
|
|
80160
|
+
return new this[ci](t.path, this[os2](t)).on("end", () => this[ns](t)).on("error", (i) => this.emit("error", i));
|
|
80160
80161
|
} catch (e) {
|
|
80161
80162
|
this.emit("error", e);
|
|
80162
80163
|
}
|
|
80163
80164
|
}
|
|
80164
|
-
[
|
|
80165
|
+
[hs]() {
|
|
80165
80166
|
this[Ct] && this[Ct].entry && this[Ct].entry.resume();
|
|
80166
80167
|
}
|
|
80167
|
-
[
|
|
80168
|
+
[li](t) {
|
|
80168
80169
|
t.piped = true, t.readdir && t.readdir.forEach((r) => {
|
|
80169
80170
|
let n = t.path, o = n === "./" ? "" : n.replace(/\/*$/, "/");
|
|
80170
|
-
this[
|
|
80171
|
+
this[hi](o + r);
|
|
80171
80172
|
});
|
|
80172
80173
|
let e = t.entry, i = this.zip;
|
|
80173
80174
|
if (!e) throw new Error("cannot pipe without source");
|
|
@@ -80187,131 +80188,129 @@ var Et = class extends A {
|
|
|
80187
80188
|
var kt = class extends Et {
|
|
80188
80189
|
sync = true;
|
|
80189
80190
|
constructor(t) {
|
|
80190
|
-
super(t), this[
|
|
80191
|
+
super(t), this[ci] = si;
|
|
80191
80192
|
}
|
|
80192
80193
|
pause() {
|
|
80193
80194
|
}
|
|
80194
80195
|
resume() {
|
|
80195
80196
|
}
|
|
80196
|
-
[
|
|
80197
|
+
[as](t) {
|
|
80197
80198
|
let e = this.follow ? "statSync" : "lstatSync";
|
|
80198
|
-
this[
|
|
80199
|
+
this[oi](t, import_fs3.default[e](t.absolute));
|
|
80199
80200
|
}
|
|
80200
|
-
[
|
|
80201
|
-
this[
|
|
80201
|
+
[ls](t) {
|
|
80202
|
+
this[ai](t, import_fs3.default.readdirSync(t.absolute));
|
|
80202
80203
|
}
|
|
80203
|
-
[
|
|
80204
|
+
[li](t) {
|
|
80204
80205
|
let e = t.entry, i = this.zip;
|
|
80205
80206
|
if (t.readdir && t.readdir.forEach((r) => {
|
|
80206
80207
|
let n = t.path, o = n === "./" ? "" : n.replace(/\/*$/, "/");
|
|
80207
|
-
this[
|
|
80208
|
+
this[hi](o + r);
|
|
80208
80209
|
}), !e) throw new Error("Cannot pipe without source");
|
|
80209
80210
|
i ? e.on("data", (r) => {
|
|
80210
80211
|
i.write(r);
|
|
80211
80212
|
}) : e.on("data", (r) => {
|
|
80212
|
-
super[
|
|
80213
|
+
super[rr](r);
|
|
80213
80214
|
});
|
|
80214
80215
|
}
|
|
80215
80216
|
};
|
|
80216
|
-
var
|
|
80217
|
+
var Un = (s3, t) => {
|
|
80217
80218
|
let e = new kt(s3), i = new Wt(s3.file, { mode: s3.mode || 438 });
|
|
80218
|
-
e.pipe(i),
|
|
80219
|
+
e.pipe(i), or(e, t);
|
|
80219
80220
|
};
|
|
80220
|
-
var
|
|
80221
|
+
var Hn = (s3, t) => {
|
|
80221
80222
|
let e = new Et(s3), i = new tt(s3.file, { mode: s3.mode || 438 });
|
|
80222
80223
|
e.pipe(i);
|
|
80223
80224
|
let r = new Promise((n, o) => {
|
|
80224
80225
|
i.on("error", o), i.on("close", n), e.on("error", o);
|
|
80225
80226
|
});
|
|
80226
|
-
return
|
|
80227
|
+
return hr(e, t).catch((n) => e.emit("error", n)), r;
|
|
80227
80228
|
};
|
|
80228
|
-
var
|
|
80229
|
+
var or = (s3, t) => {
|
|
80229
80230
|
t.forEach((e) => {
|
|
80230
80231
|
e.charAt(0) === "@" ? It({ file: import_node_path.default.resolve(s3.cwd, e.slice(1)), sync: true, noResume: true, onReadEntry: (i) => s3.add(i) }) : s3.add(e);
|
|
80231
80232
|
}), s3.end();
|
|
80232
80233
|
};
|
|
80233
|
-
var
|
|
80234
|
-
for (let e
|
|
80235
|
-
|
|
80236
|
-
|
|
80237
|
-
s3.add(r);
|
|
80238
|
-
} }) : s3.add(i);
|
|
80239
|
-
}
|
|
80234
|
+
var hr = async (s3, t) => {
|
|
80235
|
+
for (let e of t) e.charAt(0) === "@" ? await It({ file: import_node_path.default.resolve(String(s3.cwd), e.slice(1)), noResume: true, onReadEntry: (i) => {
|
|
80236
|
+
s3.add(i);
|
|
80237
|
+
} }) : s3.add(e);
|
|
80240
80238
|
s3.end();
|
|
80241
80239
|
};
|
|
80242
|
-
var
|
|
80240
|
+
var Wn = (s3, t) => {
|
|
80243
80241
|
let e = new kt(s3);
|
|
80244
|
-
return
|
|
80242
|
+
return or(e, t), e;
|
|
80245
80243
|
};
|
|
80246
|
-
var
|
|
80244
|
+
var Gn = (s3, t) => {
|
|
80247
80245
|
let e = new Et(s3);
|
|
80248
|
-
return
|
|
80246
|
+
return hr(e, t).catch((i) => e.emit("error", i)), e;
|
|
80249
80247
|
};
|
|
80250
|
-
var
|
|
80248
|
+
var Zn = K(Un, Hn, Wn, Gn, (s3, t) => {
|
|
80251
80249
|
if (!t?.length) throw new TypeError("no paths specified to add to archive");
|
|
80252
80250
|
});
|
|
80253
|
-
var
|
|
80254
|
-
var
|
|
80255
|
-
var { O_CREAT:
|
|
80256
|
-
var
|
|
80257
|
-
var
|
|
80258
|
-
var
|
|
80259
|
-
var
|
|
80260
|
-
var
|
|
80261
|
-
var cs = (s3
|
|
80251
|
+
var Yn = process.env.__FAKE_PLATFORM__ || process.platform;
|
|
80252
|
+
var fr = Yn === "win32";
|
|
80253
|
+
var { O_CREAT: dr, O_NOFOLLOW: ar, O_TRUNC: ur, O_WRONLY: mr } = import_fs5.default.constants;
|
|
80254
|
+
var pr = Number(process.env.__FAKE_FS_O_FILENAME__) || import_fs5.default.constants.UV_FS_O_FILEMAP || 0;
|
|
80255
|
+
var Kn = fr && !!pr;
|
|
80256
|
+
var Vn = 512 * 1024;
|
|
80257
|
+
var $n = pr | ur | dr | mr;
|
|
80258
|
+
var lr = !fr && typeof ar == "number" ? ar | ur | dr | mr : null;
|
|
80259
|
+
var cs = lr !== null ? () => lr : Kn ? (s3) => s3 < Vn ? $n : "w" : () => "w";
|
|
80260
|
+
var fs2 = (s3, t, e) => {
|
|
80262
80261
|
try {
|
|
80263
80262
|
return import_node_fs4.default.lchownSync(s3, t, e);
|
|
80264
80263
|
} catch (i) {
|
|
80265
80264
|
if (i?.code !== "ENOENT") throw i;
|
|
80266
80265
|
}
|
|
80267
80266
|
};
|
|
80268
|
-
var
|
|
80267
|
+
var ui = (s3, t, e, i) => {
|
|
80269
80268
|
import_node_fs4.default.lchown(s3, t, e, (r) => {
|
|
80270
80269
|
i(r && r?.code !== "ENOENT" ? r : null);
|
|
80271
80270
|
});
|
|
80272
80271
|
};
|
|
80273
|
-
var
|
|
80274
|
-
if (t.isDirectory())
|
|
80272
|
+
var Xn = (s3, t, e, i, r) => {
|
|
80273
|
+
if (t.isDirectory()) ds(import_node_path6.default.resolve(s3, t.name), e, i, (n) => {
|
|
80275
80274
|
if (n) return r(n);
|
|
80276
80275
|
let o = import_node_path6.default.resolve(s3, t.name);
|
|
80277
|
-
|
|
80276
|
+
ui(o, e, i, r);
|
|
80278
80277
|
});
|
|
80279
80278
|
else {
|
|
80280
80279
|
let n = import_node_path6.default.resolve(s3, t.name);
|
|
80281
|
-
|
|
80280
|
+
ui(n, e, i, r);
|
|
80282
80281
|
}
|
|
80283
80282
|
};
|
|
80284
|
-
var
|
|
80283
|
+
var ds = (s3, t, e, i) => {
|
|
80285
80284
|
import_node_fs4.default.readdir(s3, { withFileTypes: true }, (r, n) => {
|
|
80286
80285
|
if (r) {
|
|
80287
80286
|
if (r.code === "ENOENT") return i();
|
|
80288
80287
|
if (r.code !== "ENOTDIR" && r.code !== "ENOTSUP") return i(r);
|
|
80289
80288
|
}
|
|
80290
|
-
if (r || !n.length) return
|
|
80289
|
+
if (r || !n.length) return ui(s3, t, e, i);
|
|
80291
80290
|
let o = n.length, h = null, a = (l) => {
|
|
80292
80291
|
if (!h) {
|
|
80293
80292
|
if (l) return i(h = l);
|
|
80294
|
-
if (--o === 0) return
|
|
80293
|
+
if (--o === 0) return ui(s3, t, e, i);
|
|
80295
80294
|
}
|
|
80296
80295
|
};
|
|
80297
|
-
for (let l of n)
|
|
80296
|
+
for (let l of n) Xn(s3, l, t, e, a);
|
|
80298
80297
|
});
|
|
80299
80298
|
};
|
|
80300
|
-
var
|
|
80301
|
-
t.isDirectory() &&
|
|
80299
|
+
var qn = (s3, t, e, i) => {
|
|
80300
|
+
t.isDirectory() && us(import_node_path6.default.resolve(s3, t.name), e, i), fs2(import_node_path6.default.resolve(s3, t.name), e, i);
|
|
80302
80301
|
};
|
|
80303
|
-
var
|
|
80302
|
+
var us = (s3, t, e) => {
|
|
80304
80303
|
let i;
|
|
80305
80304
|
try {
|
|
80306
80305
|
i = import_node_fs4.default.readdirSync(s3, { withFileTypes: true });
|
|
80307
80306
|
} catch (r) {
|
|
80308
80307
|
let n = r;
|
|
80309
80308
|
if (n?.code === "ENOENT") return;
|
|
80310
|
-
if (n?.code === "ENOTDIR" || n?.code === "ENOTSUP") return
|
|
80309
|
+
if (n?.code === "ENOTDIR" || n?.code === "ENOTSUP") return fs2(s3, t, e);
|
|
80311
80310
|
throw n;
|
|
80312
80311
|
}
|
|
80313
|
-
for (let r of i)
|
|
80314
|
-
return
|
|
80312
|
+
for (let r of i) qn(s3, r, t, e);
|
|
80313
|
+
return fs2(s3, t, e);
|
|
80315
80314
|
};
|
|
80316
80315
|
var we = class extends Error {
|
|
80317
80316
|
path;
|
|
@@ -80336,41 +80335,41 @@ var wt = class extends Error {
|
|
|
80336
80335
|
return "SymlinkError";
|
|
80337
80336
|
}
|
|
80338
80337
|
};
|
|
80339
|
-
var
|
|
80338
|
+
var Qn = (s3, t) => {
|
|
80340
80339
|
import_node_fs5.default.stat(s3, (e, i) => {
|
|
80341
80340
|
(e || !i.isDirectory()) && (e = new we(s3, e?.code || "ENOTDIR")), t(e);
|
|
80342
80341
|
});
|
|
80343
80342
|
};
|
|
80344
|
-
var
|
|
80343
|
+
var Er = (s3, t, e) => {
|
|
80345
80344
|
s3 = f(s3);
|
|
80346
80345
|
let i = t.umask ?? 18, r = t.mode | 448, n = (r & i) !== 0, o = t.uid, h = t.gid, a = typeof o == "number" && typeof h == "number" && (o !== t.processUid || h !== t.processGid), l = t.preserve, c = t.unlink, d = f(t.cwd), S = (E, x) => {
|
|
80347
|
-
E ? e(E) : x && a ?
|
|
80346
|
+
E ? e(E) : x && a ? ds(x, o, h, (xe) => S(xe)) : n ? import_node_fs5.default.chmod(s3, r, e) : e();
|
|
80348
80347
|
};
|
|
80349
|
-
if (s3 === d) return
|
|
80348
|
+
if (s3 === d) return Qn(s3, S);
|
|
80350
80349
|
if (l) return import_promises.default.mkdir(s3, { mode: r, recursive: true }).then((E) => S(null, E ?? void 0), S);
|
|
80351
80350
|
let N = f(import_node_path7.default.relative(d, s3)).split("/");
|
|
80352
|
-
|
|
80351
|
+
ms(d, N, r, c, d, void 0, S);
|
|
80353
80352
|
};
|
|
80354
|
-
var
|
|
80355
|
-
if (
|
|
80353
|
+
var ms = (s3, t, e, i, r, n, o) => {
|
|
80354
|
+
if (t.length === 0) return o(null, n);
|
|
80356
80355
|
let h = t.shift(), a = f(import_node_path7.default.resolve(s3 + "/" + h));
|
|
80357
|
-
import_node_fs5.default.mkdir(a, e,
|
|
80356
|
+
import_node_fs5.default.mkdir(a, e, wr(a, t, e, i, r, n, o));
|
|
80358
80357
|
};
|
|
80359
|
-
var
|
|
80358
|
+
var wr = (s3, t, e, i, r, n, o) => (h) => {
|
|
80360
80359
|
h ? import_node_fs5.default.lstat(s3, (a, l) => {
|
|
80361
80360
|
if (a) a.path = a.path && f(a.path), o(a);
|
|
80362
|
-
else if (l.isDirectory())
|
|
80361
|
+
else if (l.isDirectory()) ms(s3, t, e, i, r, n, o);
|
|
80363
80362
|
else if (i) import_node_fs5.default.unlink(s3, (c) => {
|
|
80364
80363
|
if (c) return o(c);
|
|
80365
|
-
import_node_fs5.default.mkdir(s3, e,
|
|
80364
|
+
import_node_fs5.default.mkdir(s3, e, wr(s3, t, e, i, r, n, o));
|
|
80366
80365
|
});
|
|
80367
80366
|
else {
|
|
80368
80367
|
if (l.isSymbolicLink()) return o(new wt(s3, s3 + "/" + t.join("/")));
|
|
80369
80368
|
o(h);
|
|
80370
80369
|
}
|
|
80371
|
-
}) : (n = n || s3,
|
|
80370
|
+
}) : (n = n || s3, ms(s3, t, e, i, r, n, o));
|
|
80372
80371
|
};
|
|
80373
|
-
var
|
|
80372
|
+
var Jn = (s3) => {
|
|
80374
80373
|
let t = false, e;
|
|
80375
80374
|
try {
|
|
80376
80375
|
t = import_node_fs5.default.statSync(s3).isDirectory();
|
|
@@ -80380,12 +80379,12 @@ var Qn = (s3) => {
|
|
|
80380
80379
|
if (!t) throw new we(s3, e ?? "ENOTDIR");
|
|
80381
80380
|
}
|
|
80382
80381
|
};
|
|
80383
|
-
var
|
|
80382
|
+
var Sr = (s3, t) => {
|
|
80384
80383
|
s3 = f(s3);
|
|
80385
80384
|
let e = t.umask ?? 18, i = t.mode | 448, r = (i & e) !== 0, n = t.uid, o = t.gid, h = typeof n == "number" && typeof o == "number" && (n !== t.processUid || o !== t.processGid), a = t.preserve, l = t.unlink, c = f(t.cwd), d = (E) => {
|
|
80386
|
-
E && h &&
|
|
80385
|
+
E && h && us(E, n, o), r && import_node_fs5.default.chmodSync(s3, i);
|
|
80387
80386
|
};
|
|
80388
|
-
if (s3 === c) return
|
|
80387
|
+
if (s3 === c) return Jn(c), d();
|
|
80389
80388
|
if (a) return d(import_node_fs5.default.mkdirSync(s3, { mode: i, recursive: true }) ?? void 0);
|
|
80390
80389
|
let T = f(import_node_path7.default.relative(c, s3)).split("/"), N;
|
|
80391
80390
|
for (let E = T.shift(), x = c; E && (x += "/" + E); E = T.shift()) {
|
|
@@ -80393,40 +80392,40 @@ var ur = (s3, t) => {
|
|
|
80393
80392
|
try {
|
|
80394
80393
|
import_node_fs5.default.mkdirSync(x, i), N = N || x;
|
|
80395
80394
|
} catch {
|
|
80396
|
-
let
|
|
80397
|
-
if (
|
|
80395
|
+
let xe = import_node_fs5.default.lstatSync(x);
|
|
80396
|
+
if (xe.isDirectory()) continue;
|
|
80398
80397
|
if (l) {
|
|
80399
80398
|
import_node_fs5.default.unlinkSync(x), import_node_fs5.default.mkdirSync(x, i), N = N || x;
|
|
80400
80399
|
continue;
|
|
80401
|
-
} else if (
|
|
80400
|
+
} else if (xe.isSymbolicLink()) return new wt(x, x + "/" + T.join("/"));
|
|
80402
80401
|
}
|
|
80403
80402
|
}
|
|
80404
80403
|
return d(N);
|
|
80405
80404
|
};
|
|
80406
|
-
var
|
|
80407
|
-
var
|
|
80405
|
+
var ps = /* @__PURE__ */ Object.create(null);
|
|
80406
|
+
var yr = 1e4;
|
|
80408
80407
|
var $t = /* @__PURE__ */ new Set();
|
|
80409
|
-
var
|
|
80410
|
-
$t.has(s3) ? $t.delete(s3) :
|
|
80411
|
-
let t =
|
|
80412
|
-
if (e >
|
|
80413
|
-
for (let i of $t) if ($t.delete(i), delete
|
|
80408
|
+
var Rr = (s3) => {
|
|
80409
|
+
$t.has(s3) ? $t.delete(s3) : ps[s3] = s3.normalize("NFD").toLocaleLowerCase("en").toLocaleUpperCase("en"), $t.add(s3);
|
|
80410
|
+
let t = ps[s3], e = $t.size - yr;
|
|
80411
|
+
if (e > yr / 10) {
|
|
80412
|
+
for (let i of $t) if ($t.delete(i), delete ps[i], --e <= 0) break;
|
|
80414
80413
|
}
|
|
80415
80414
|
return t;
|
|
80416
80415
|
};
|
|
80417
|
-
var
|
|
80418
|
-
var
|
|
80419
|
-
var
|
|
80420
|
-
let r = e
|
|
80416
|
+
var to = process.env.TESTING_TAR_FAKE_PLATFORM || process.platform;
|
|
80417
|
+
var eo = to === "win32";
|
|
80418
|
+
var io = (s3) => s3.split("/").slice(0, -1).reduce((e, i) => {
|
|
80419
|
+
let r = e.at(-1);
|
|
80421
80420
|
return r !== void 0 && (i = (0, import_node_path8.join)(r, i)), e.push(i || "/"), e;
|
|
80422
80421
|
}, []);
|
|
80423
|
-
var
|
|
80422
|
+
var Ei = class {
|
|
80424
80423
|
#t = /* @__PURE__ */ new Map();
|
|
80425
80424
|
#i = /* @__PURE__ */ new Map();
|
|
80426
80425
|
#s = /* @__PURE__ */ new Set();
|
|
80427
80426
|
reserve(t, e) {
|
|
80428
|
-
t =
|
|
80429
|
-
let i = new Set(t.map((r) =>
|
|
80427
|
+
t = eo ? ["win32 parallelization disabled"] : t.map((r) => mt((0, import_node_path8.join)(Rr(r))));
|
|
80428
|
+
let i = new Set(t.map((r) => io(r)).reduce((r, n) => r.concat(n)));
|
|
80430
80429
|
this.#i.set(e, { dirs: i, paths: t });
|
|
80431
80430
|
for (let r of t) {
|
|
80432
80431
|
let n = this.#t.get(r);
|
|
@@ -80436,7 +80435,7 @@ var pi = class {
|
|
|
80436
80435
|
let n = this.#t.get(r);
|
|
80437
80436
|
if (!n) this.#t.set(r, [/* @__PURE__ */ new Set([e])]);
|
|
80438
80437
|
else {
|
|
80439
|
-
let o = n
|
|
80438
|
+
let o = n.at(-1);
|
|
80440
80439
|
o instanceof Set ? o.add(e) : n.push(/* @__PURE__ */ new Set([e]));
|
|
80441
80440
|
}
|
|
80442
80441
|
}
|
|
@@ -80484,37 +80483,37 @@ var pi = class {
|
|
|
80484
80483
|
return this.#s.delete(t), n.forEach((o) => this.#r(o)), true;
|
|
80485
80484
|
}
|
|
80486
80485
|
};
|
|
80487
|
-
var
|
|
80488
|
-
var
|
|
80489
|
-
var
|
|
80490
|
-
var
|
|
80491
|
-
var
|
|
80486
|
+
var _r = () => process.umask();
|
|
80487
|
+
var gr = /* @__PURE__ */ Symbol("onEntry");
|
|
80488
|
+
var ys = /* @__PURE__ */ Symbol("checkFs");
|
|
80489
|
+
var Or = /* @__PURE__ */ Symbol("checkFs2");
|
|
80490
|
+
var Rs = /* @__PURE__ */ Symbol("isReusable");
|
|
80492
80491
|
var P = /* @__PURE__ */ Symbol("makeFs");
|
|
80493
|
-
var
|
|
80494
|
-
var
|
|
80495
|
-
var
|
|
80496
|
-
var
|
|
80497
|
-
var
|
|
80492
|
+
var bs = /* @__PURE__ */ Symbol("file");
|
|
80493
|
+
var _s = /* @__PURE__ */ Symbol("directory");
|
|
80494
|
+
var Si = /* @__PURE__ */ Symbol("link");
|
|
80495
|
+
var Tr = /* @__PURE__ */ Symbol("symlink");
|
|
80496
|
+
var xr = /* @__PURE__ */ Symbol("hardlink");
|
|
80498
80497
|
var ye = /* @__PURE__ */ Symbol("ensureNoSymlink");
|
|
80499
|
-
var
|
|
80500
|
-
var
|
|
80501
|
-
var
|
|
80498
|
+
var Lr = /* @__PURE__ */ Symbol("unsupported");
|
|
80499
|
+
var Nr = /* @__PURE__ */ Symbol("checkPath");
|
|
80500
|
+
var Es = /* @__PURE__ */ Symbol("stripAbsolutePath");
|
|
80502
80501
|
var St = /* @__PURE__ */ Symbol("mkdir");
|
|
80503
80502
|
var O = /* @__PURE__ */ Symbol("onError");
|
|
80504
|
-
var
|
|
80505
|
-
var
|
|
80503
|
+
var wi = /* @__PURE__ */ Symbol("pending");
|
|
80504
|
+
var Ar = /* @__PURE__ */ Symbol("pend");
|
|
80506
80505
|
var Xt = /* @__PURE__ */ Symbol("unpend");
|
|
80507
|
-
var
|
|
80508
|
-
var
|
|
80506
|
+
var ws = /* @__PURE__ */ Symbol("ended");
|
|
80507
|
+
var Ss = /* @__PURE__ */ Symbol("maybeClose");
|
|
80509
80508
|
var gs = /* @__PURE__ */ Symbol("skip");
|
|
80510
80509
|
var Re = /* @__PURE__ */ Symbol("doChown");
|
|
80511
80510
|
var be = /* @__PURE__ */ Symbol("uid");
|
|
80512
|
-
var
|
|
80513
|
-
var
|
|
80514
|
-
var
|
|
80515
|
-
var Oe =
|
|
80516
|
-
var
|
|
80517
|
-
var
|
|
80511
|
+
var _e = /* @__PURE__ */ Symbol("gid");
|
|
80512
|
+
var ge = /* @__PURE__ */ Symbol("checkedCwd");
|
|
80513
|
+
var ro = process.env.TESTING_TAR_FAKE_PLATFORM || process.platform;
|
|
80514
|
+
var Oe = ro === "win32";
|
|
80515
|
+
var no = 1024;
|
|
80516
|
+
var oo = (s3, t) => {
|
|
80518
80517
|
if (!Oe) return import_node_fs3.default.unlink(s3, t);
|
|
80519
80518
|
let e = s3 + ".DELETE." + (0, import_node_crypto.randomBytes)(16).toString("hex");
|
|
80520
80519
|
import_node_fs3.default.rename(s3, e, (i) => {
|
|
@@ -80522,17 +80521,17 @@ var no = (s3, t) => {
|
|
|
80522
80521
|
import_node_fs3.default.unlink(e, t);
|
|
80523
80522
|
});
|
|
80524
80523
|
};
|
|
80525
|
-
var
|
|
80524
|
+
var ho = (s3) => {
|
|
80526
80525
|
if (!Oe) return import_node_fs3.default.unlinkSync(s3);
|
|
80527
80526
|
let t = s3 + ".DELETE." + (0, import_node_crypto.randomBytes)(16).toString("hex");
|
|
80528
80527
|
import_node_fs3.default.renameSync(s3, t), import_node_fs3.default.unlinkSync(t);
|
|
80529
80528
|
};
|
|
80530
|
-
var
|
|
80529
|
+
var Dr = (s3, t, e) => s3 !== void 0 && s3 === s3 >>> 0 ? s3 : t !== void 0 && t === t >>> 0 ? t : e;
|
|
80531
80530
|
var qt = class extends st {
|
|
80532
|
-
[
|
|
80533
|
-
[
|
|
80534
|
-
[
|
|
80535
|
-
reservations = new
|
|
80531
|
+
[ws] = false;
|
|
80532
|
+
[ge] = false;
|
|
80533
|
+
[wi] = 0;
|
|
80534
|
+
reservations = new Ei();
|
|
80536
80535
|
transform;
|
|
80537
80536
|
writable = true;
|
|
80538
80537
|
readable = false;
|
|
@@ -80559,34 +80558,32 @@ var qt = class extends st {
|
|
|
80559
80558
|
chmod;
|
|
80560
80559
|
constructor(t = {}) {
|
|
80561
80560
|
if (t.ondone = () => {
|
|
80562
|
-
this[
|
|
80561
|
+
this[ws] = true, this[Ss]();
|
|
80563
80562
|
}, super(t), this.transform = t.transform, this.chmod = !!t.chmod, typeof t.uid == "number" || typeof t.gid == "number") {
|
|
80564
80563
|
if (typeof t.uid != "number" || typeof t.gid != "number") throw new TypeError("cannot set owner without number uid and gid");
|
|
80565
80564
|
if (t.preserveOwner) throw new TypeError("cannot preserve owner in archive and also set owner explicitly");
|
|
80566
80565
|
this.uid = t.uid, this.gid = t.gid, this.setOwner = true;
|
|
80567
80566
|
} else this.uid = void 0, this.gid = void 0, this.setOwner = false;
|
|
80568
|
-
t.preserveOwner === void 0 && typeof t.uid != "number" ?
|
|
80567
|
+
this.preserveOwner = t.preserveOwner === void 0 && typeof t.uid != "number" ? !!(process.getuid && process.getuid() === 0) : !!t.preserveOwner, this.processUid = (this.preserveOwner || this.setOwner) && process.getuid ? process.getuid() : void 0, this.processGid = (this.preserveOwner || this.setOwner) && process.getgid ? process.getgid() : void 0, this.maxDepth = typeof t.maxDepth == "number" ? t.maxDepth : no, this.forceChown = t.forceChown === true, this.win32 = !!t.win32 || Oe, this.newer = !!t.newer, this.keep = !!t.keep, this.noMtime = !!t.noMtime, this.preservePaths = !!t.preservePaths, this.unlink = !!t.unlink, this.cwd = f(import_node_path5.default.resolve(t.cwd || process.cwd())), this.strip = Number(t.strip) || 0, this.processUmask = this.chmod ? typeof t.processUmask == "number" ? t.processUmask : _r() : 0, this.umask = typeof t.umask == "number" ? t.umask : this.processUmask, this.dmode = t.dmode || 511 & ~this.umask, this.fmode = t.fmode || 438 & ~this.umask, this.on("entry", (e) => this[gr](e));
|
|
80569
80568
|
}
|
|
80570
80569
|
warn(t, e, i = {}) {
|
|
80571
80570
|
return (t === "TAR_BAD_ARCHIVE" || t === "TAR_ABORT") && (i.recoverable = false), super.warn(t, e, i);
|
|
80572
80571
|
}
|
|
80573
|
-
[
|
|
80574
|
-
this[
|
|
80572
|
+
[Ss]() {
|
|
80573
|
+
this[ws] && this[wi] === 0 && (this.emit("prefinish"), this.emit("finish"), this.emit("end"));
|
|
80575
80574
|
}
|
|
80576
|
-
[
|
|
80575
|
+
[Es](t, e) {
|
|
80577
80576
|
let i = t[e], { type: r } = t;
|
|
80578
80577
|
if (!i || this.preservePaths) return true;
|
|
80579
|
-
let [n, o] = ce(i), h = o.
|
|
80578
|
+
let [n, o] = ce(i), h = o.replaceAll(/\\/g, "/").split("/");
|
|
80580
80579
|
if (h.includes("..") || Oe && /^[a-z]:\.\.$/i.test(h[0] ?? "")) {
|
|
80581
80580
|
if (e === "path" || r === "Link") return this.warn("TAR_ENTRY_ERROR", `${e} contains '..'`, { entry: t, [e]: i }), false;
|
|
80582
|
-
|
|
80583
|
-
|
|
80584
|
-
if (l.startsWith("../") || l === "..") return this.warn("TAR_ENTRY_ERROR", `${e} escapes extraction directory`, { entry: t, [e]: i }), false;
|
|
80585
|
-
}
|
|
80581
|
+
let a = import_node_path5.default.posix.dirname(t.path), l = import_node_path5.default.posix.normalize(import_node_path5.default.posix.join(a, h.join("/")));
|
|
80582
|
+
if (l.startsWith("../") || l === "..") return this.warn("TAR_ENTRY_ERROR", `${e} escapes extraction directory`, { entry: t, [e]: i }), false;
|
|
80586
80583
|
}
|
|
80587
80584
|
return n && (t[e] = String(o), this.warn("TAR_ENTRY_INFO", `stripping ${n} from absolute ${e}`, { entry: t, [e]: i })), true;
|
|
80588
80585
|
}
|
|
80589
|
-
[
|
|
80586
|
+
[Nr](t) {
|
|
80590
80587
|
let e = f(t.path), i = e.split("/");
|
|
80591
80588
|
if (this.strip) {
|
|
80592
80589
|
if (i.length < this.strip) return false;
|
|
@@ -80598,19 +80595,19 @@ var qt = class extends st {
|
|
|
80598
80595
|
i.splice(0, this.strip), t.path = i.join("/");
|
|
80599
80596
|
}
|
|
80600
80597
|
if (isFinite(this.maxDepth) && i.length > this.maxDepth) return this.warn("TAR_ENTRY_ERROR", "path excessively deep", { entry: t, path: e, depth: i.length, maxDepth: this.maxDepth }), false;
|
|
80601
|
-
if (!this[
|
|
80602
|
-
if (import_node_path5.default.isAbsolute(t.path) ?
|
|
80598
|
+
if (!this[Es](t, "path") || !this[Es](t, "linkpath")) return false;
|
|
80599
|
+
if (t.absolute = import_node_path5.default.isAbsolute(t.path) ? f(import_node_path5.default.resolve(t.path)) : f(import_node_path5.default.resolve(this.cwd, t.path)), !this.preservePaths && typeof t.absolute == "string" && t.absolute.indexOf(this.cwd + "/") !== 0 && t.absolute !== this.cwd) return this.warn("TAR_ENTRY_ERROR", "path escaped extraction target", { entry: t, path: f(t.path), resolvedPath: t.absolute, cwd: this.cwd }), false;
|
|
80603
80600
|
if (t.absolute === this.cwd && t.type !== "Directory" && t.type !== "GNUDumpDir") return false;
|
|
80604
80601
|
if (this.win32) {
|
|
80605
80602
|
let { root: r } = import_node_path5.default.win32.parse(String(t.absolute));
|
|
80606
|
-
t.absolute = r +
|
|
80603
|
+
t.absolute = r + Xi(String(t.absolute).slice(r.length));
|
|
80607
80604
|
let { root: n } = import_node_path5.default.win32.parse(t.path);
|
|
80608
|
-
t.path = n +
|
|
80605
|
+
t.path = n + Xi(t.path.slice(n.length));
|
|
80609
80606
|
}
|
|
80610
80607
|
return true;
|
|
80611
80608
|
}
|
|
80612
|
-
[
|
|
80613
|
-
if (!this[
|
|
80609
|
+
[gr](t) {
|
|
80610
|
+
if (!this[Nr](t)) return t.resume();
|
|
80614
80611
|
switch (import_node_assert.default.equal(typeof t.absolute, "string"), t.type) {
|
|
80615
80612
|
case "Directory":
|
|
80616
80613
|
case "GNUDumpDir":
|
|
@@ -80620,28 +80617,28 @@ var qt = class extends st {
|
|
|
80620
80617
|
case "ContiguousFile":
|
|
80621
80618
|
case "Link":
|
|
80622
80619
|
case "SymbolicLink":
|
|
80623
|
-
return this[
|
|
80620
|
+
return this[ys](t);
|
|
80624
80621
|
default:
|
|
80625
|
-
return this[
|
|
80622
|
+
return this[Lr](t);
|
|
80626
80623
|
}
|
|
80627
80624
|
}
|
|
80628
80625
|
[O](t, e) {
|
|
80629
80626
|
t.name === "CwdError" ? this.emit("error", t) : (this.warn("TAR_ENTRY_ERROR", t, { entry: e }), this[Xt](), e.resume());
|
|
80630
80627
|
}
|
|
80631
80628
|
[St](t, e, i) {
|
|
80632
|
-
|
|
80629
|
+
Er(f(t), { uid: this.uid, gid: this.gid, processUid: this.processUid, processGid: this.processGid, umask: this.processUmask, preserve: this.preservePaths, unlink: this.unlink, cwd: this.cwd, mode: e }, i);
|
|
80633
80630
|
}
|
|
80634
80631
|
[Re](t) {
|
|
80635
80632
|
return this.forceChown || this.preserveOwner && (typeof t.uid == "number" && t.uid !== this.processUid || typeof t.gid == "number" && t.gid !== this.processGid) || typeof this.uid == "number" && this.uid !== this.processUid || typeof this.gid == "number" && this.gid !== this.processGid;
|
|
80636
80633
|
}
|
|
80637
80634
|
[be](t) {
|
|
80638
|
-
return
|
|
80635
|
+
return Dr(this.uid, t.uid, this.processUid);
|
|
80639
80636
|
}
|
|
80640
|
-
[
|
|
80641
|
-
return
|
|
80637
|
+
[_e](t) {
|
|
80638
|
+
return Dr(this.gid, t.gid, this.processGid);
|
|
80642
80639
|
}
|
|
80643
|
-
[
|
|
80644
|
-
let i = typeof t.mode == "number" ? t.mode & 4095 : this.fmode, r = new tt(String(t.absolute), { flags:
|
|
80640
|
+
[bs](t, e) {
|
|
80641
|
+
let i = typeof t.mode == "number" ? t.mode & 4095 : this.fmode, r = new tt(String(t.absolute), { flags: cs(t.size), mode: i, autoClose: false });
|
|
80645
80642
|
r.on("error", (a) => {
|
|
80646
80643
|
r.fd && import_node_fs3.default.close(r.fd, () => {
|
|
80647
80644
|
}), r.write = () => true, this[O](a, t), e();
|
|
@@ -80665,7 +80662,7 @@ var qt = class extends st {
|
|
|
80665
80662
|
}
|
|
80666
80663
|
if (typeof l == "number" && this[Re](t)) {
|
|
80667
80664
|
n++;
|
|
80668
|
-
let c = this[be](t), d = this[
|
|
80665
|
+
let c = this[be](t), d = this[_e](t);
|
|
80669
80666
|
typeof c == "number" && typeof d == "number" && import_node_fs3.default.fchown(l, c, d, (S) => S ? import_node_fs3.default.chown(a, c, d, (T) => o(T && S)) : o());
|
|
80670
80667
|
}
|
|
80671
80668
|
o();
|
|
@@ -80675,7 +80672,7 @@ var qt = class extends st {
|
|
|
80675
80672
|
this[O](a, t), e();
|
|
80676
80673
|
}), t.pipe(h)), h.pipe(r);
|
|
80677
80674
|
}
|
|
80678
|
-
[
|
|
80675
|
+
[_s](t, e) {
|
|
80679
80676
|
let i = typeof t.mode == "number" ? t.mode & 4095 : this.dmode;
|
|
80680
80677
|
this[St](String(t.absolute), i, (r) => {
|
|
80681
80678
|
if (r) {
|
|
@@ -80685,21 +80682,21 @@ var qt = class extends st {
|
|
|
80685
80682
|
let n = 1, o = () => {
|
|
80686
80683
|
--n === 0 && (e(), this[Xt](), t.resume());
|
|
80687
80684
|
};
|
|
80688
|
-
t.mtime && !this.noMtime && (n++, import_node_fs3.default.utimes(String(t.absolute), t.atime || /* @__PURE__ */ new Date(), t.mtime, o)), this[Re](t) && (n++, import_node_fs3.default.chown(String(t.absolute), Number(this[be](t)), Number(this[
|
|
80685
|
+
t.mtime && !this.noMtime && (n++, import_node_fs3.default.utimes(String(t.absolute), t.atime || /* @__PURE__ */ new Date(), t.mtime, o)), this[Re](t) && (n++, import_node_fs3.default.chown(String(t.absolute), Number(this[be](t)), Number(this[_e](t)), o)), o();
|
|
80689
80686
|
});
|
|
80690
80687
|
}
|
|
80691
|
-
[
|
|
80688
|
+
[Lr](t) {
|
|
80692
80689
|
t.unsupported = true, this.warn("TAR_ENTRY_UNSUPPORTED", `unsupported entry type: ${t.type}`, { entry: t }), t.resume();
|
|
80693
80690
|
}
|
|
80694
|
-
[
|
|
80691
|
+
[Tr](t, e) {
|
|
80695
80692
|
let i = f(import_node_path5.default.relative(this.cwd, import_node_path5.default.resolve(import_node_path5.default.dirname(String(t.absolute)), String(t.linkpath)))).split("/");
|
|
80696
|
-
this[ye](t, this.cwd, i, () => this[
|
|
80693
|
+
this[ye](t, this.cwd, i, () => this[Si](t, String(t.linkpath), "symlink", e), (r) => {
|
|
80697
80694
|
this[O](r, t), e();
|
|
80698
80695
|
});
|
|
80699
80696
|
}
|
|
80700
|
-
[
|
|
80697
|
+
[xr](t, e) {
|
|
80701
80698
|
let i = f(import_node_path5.default.resolve(this.cwd, String(t.linkpath))), r = f(String(t.linkpath)).split("/");
|
|
80702
|
-
this[ye](t, this.cwd, r, () => this[
|
|
80699
|
+
this[ye](t, this.cwd, r, () => this[Si](t, i, "link", e), (n) => {
|
|
80703
80700
|
this[O](n, t), e();
|
|
80704
80701
|
});
|
|
80705
80702
|
}
|
|
@@ -80713,24 +80710,24 @@ var qt = class extends st {
|
|
|
80713
80710
|
this[ye](t, h, i, r, n);
|
|
80714
80711
|
});
|
|
80715
80712
|
}
|
|
80716
|
-
[
|
|
80717
|
-
this[
|
|
80713
|
+
[Ar]() {
|
|
80714
|
+
this[wi]++;
|
|
80718
80715
|
}
|
|
80719
80716
|
[Xt]() {
|
|
80720
|
-
this[
|
|
80717
|
+
this[wi]--, this[Ss]();
|
|
80721
80718
|
}
|
|
80722
80719
|
[gs](t) {
|
|
80723
80720
|
this[Xt](), t.resume();
|
|
80724
80721
|
}
|
|
80725
|
-
[
|
|
80722
|
+
[Rs](t, e) {
|
|
80726
80723
|
return t.type === "File" && !this.unlink && e.isFile() && e.nlink <= 1 && !Oe;
|
|
80727
80724
|
}
|
|
80728
|
-
[
|
|
80729
|
-
this[
|
|
80725
|
+
[ys](t) {
|
|
80726
|
+
this[Ar]();
|
|
80730
80727
|
let e = [t.path];
|
|
80731
|
-
t.linkpath && e.push(t.linkpath), this.reservations.reserve(e, (i) => this[
|
|
80728
|
+
t.linkpath && e.push(t.linkpath), this.reservations.reserve(e, (i) => this[Or](t, i));
|
|
80732
80729
|
}
|
|
80733
|
-
[
|
|
80730
|
+
[Or](t, e) {
|
|
80734
80731
|
let i = (h) => {
|
|
80735
80732
|
e(h);
|
|
80736
80733
|
}, r = () => {
|
|
@@ -80739,7 +80736,7 @@ var qt = class extends st {
|
|
|
80739
80736
|
this[O](h, t), i();
|
|
80740
80737
|
return;
|
|
80741
80738
|
}
|
|
80742
|
-
this[
|
|
80739
|
+
this[ge] = true, n();
|
|
80743
80740
|
});
|
|
80744
80741
|
}, n = () => {
|
|
80745
80742
|
if (t.absolute !== this.cwd) {
|
|
@@ -80759,7 +80756,7 @@ var qt = class extends st {
|
|
|
80759
80756
|
this[gs](t), i();
|
|
80760
80757
|
return;
|
|
80761
80758
|
}
|
|
80762
|
-
if (h || this[
|
|
80759
|
+
if (h || this[Rs](t, a)) return this[P](null, t, i);
|
|
80763
80760
|
if (a.isDirectory()) {
|
|
80764
80761
|
if (t.type === "Directory") {
|
|
80765
80762
|
let l = this.chmod && t.mode && (a.mode & 4095) !== t.mode, c = (d) => this[P](d ?? null, t, i);
|
|
@@ -80768,10 +80765,10 @@ var qt = class extends st {
|
|
|
80768
80765
|
if (t.absolute !== this.cwd) return import_node_fs3.default.rmdir(String(t.absolute), (l) => this[P](l ?? null, t, i));
|
|
80769
80766
|
}
|
|
80770
80767
|
if (t.absolute === this.cwd) return this[P](null, t, i);
|
|
80771
|
-
|
|
80768
|
+
oo(String(t.absolute), (l) => this[P](l ?? null, t, i));
|
|
80772
80769
|
});
|
|
80773
80770
|
};
|
|
80774
|
-
this[
|
|
80771
|
+
this[ge] ? n() : r();
|
|
80775
80772
|
}
|
|
80776
80773
|
[P](t, e, i) {
|
|
80777
80774
|
if (t) {
|
|
@@ -80782,17 +80779,17 @@ var qt = class extends st {
|
|
|
80782
80779
|
case "File":
|
|
80783
80780
|
case "OldFile":
|
|
80784
80781
|
case "ContiguousFile":
|
|
80785
|
-
return this[
|
|
80782
|
+
return this[bs](e, i);
|
|
80786
80783
|
case "Link":
|
|
80787
|
-
return this[
|
|
80784
|
+
return this[xr](e, i);
|
|
80788
80785
|
case "SymbolicLink":
|
|
80789
|
-
return this[
|
|
80786
|
+
return this[Tr](e, i);
|
|
80790
80787
|
case "Directory":
|
|
80791
80788
|
case "GNUDumpDir":
|
|
80792
|
-
return this[
|
|
80789
|
+
return this[_s](e, i);
|
|
80793
80790
|
}
|
|
80794
80791
|
}
|
|
80795
|
-
[
|
|
80792
|
+
[Si](t, e, i, r) {
|
|
80796
80793
|
import_node_fs3.default[i](e, String(t.absolute), (n) => {
|
|
80797
80794
|
n ? this[O](n, t) : (this[Xt](), t.resume()), r();
|
|
80798
80795
|
});
|
|
@@ -80811,11 +80808,11 @@ var Te = class extends qt {
|
|
|
80811
80808
|
return super[P](t, e, () => {
|
|
80812
80809
|
});
|
|
80813
80810
|
}
|
|
80814
|
-
[
|
|
80815
|
-
if (!this[
|
|
80811
|
+
[ys](t) {
|
|
80812
|
+
if (!this[ge]) {
|
|
80816
80813
|
let n = this[St](this.cwd, this.dmode);
|
|
80817
80814
|
if (n) return this[O](n, t);
|
|
80818
|
-
this[
|
|
80815
|
+
this[ge] = true;
|
|
80819
80816
|
}
|
|
80820
80817
|
if (t.absolute !== this.cwd) {
|
|
80821
80818
|
let n = f(import_node_path5.default.dirname(String(t.absolute)));
|
|
@@ -80826,7 +80823,7 @@ var Te = class extends qt {
|
|
|
80826
80823
|
}
|
|
80827
80824
|
let [e, i] = Se(() => import_node_fs3.default.lstatSync(String(t.absolute)));
|
|
80828
80825
|
if (i && (this.keep || this.newer && i.mtime > (t.mtime ?? i.mtime))) return this[gs](t);
|
|
80829
|
-
if (e || this[
|
|
80826
|
+
if (e || this[Rs](t, i)) return this[P](null, t);
|
|
80830
80827
|
if (i.isDirectory()) {
|
|
80831
80828
|
if (t.type === "Directory") {
|
|
80832
80829
|
let o = this.chmod && t.mode && (i.mode & 4095) !== t.mode, [h] = o ? Se(() => {
|
|
@@ -80837,10 +80834,10 @@ var Te = class extends qt {
|
|
|
80837
80834
|
let [n] = Se(() => import_node_fs3.default.rmdirSync(String(t.absolute)));
|
|
80838
80835
|
this[P](n, t);
|
|
80839
80836
|
}
|
|
80840
|
-
let [r] = t.absolute === this.cwd ? [] : Se(() =>
|
|
80837
|
+
let [r] = t.absolute === this.cwd ? [] : Se(() => ho(String(t.absolute)));
|
|
80841
80838
|
this[P](r, t);
|
|
80842
80839
|
}
|
|
80843
|
-
[
|
|
80840
|
+
[bs](t, e) {
|
|
80844
80841
|
let i = typeof t.mode == "number" ? t.mode & 4095 : this.fmode, r = (h) => {
|
|
80845
80842
|
let a;
|
|
80846
80843
|
try {
|
|
@@ -80851,7 +80848,7 @@ var Te = class extends qt {
|
|
|
80851
80848
|
(h || a) && this[O](h || a, t), e();
|
|
80852
80849
|
}, n;
|
|
80853
80850
|
try {
|
|
80854
|
-
n = import_node_fs3.default.openSync(String(t.absolute),
|
|
80851
|
+
n = import_node_fs3.default.openSync(String(t.absolute), cs(t.size), i);
|
|
80855
80852
|
} catch (h) {
|
|
80856
80853
|
return r(h);
|
|
80857
80854
|
}
|
|
@@ -80877,7 +80874,7 @@ var Te = class extends qt {
|
|
|
80877
80874
|
}
|
|
80878
80875
|
}
|
|
80879
80876
|
if (this[Re](t)) {
|
|
80880
|
-
let a = this[be](t), l = this[
|
|
80877
|
+
let a = this[be](t), l = this[_e](t);
|
|
80881
80878
|
try {
|
|
80882
80879
|
import_node_fs3.default.fchownSync(n, Number(a), Number(l));
|
|
80883
80880
|
} catch (c) {
|
|
@@ -80891,7 +80888,7 @@ var Te = class extends qt {
|
|
|
80891
80888
|
r(h);
|
|
80892
80889
|
});
|
|
80893
80890
|
}
|
|
80894
|
-
[
|
|
80891
|
+
[_s](t, e) {
|
|
80895
80892
|
let i = typeof t.mode == "number" ? t.mode & 4095 : this.dmode, r = this[St](String(t.absolute), i);
|
|
80896
80893
|
if (r) {
|
|
80897
80894
|
this[O](r, t), e();
|
|
@@ -80902,20 +80899,20 @@ var Te = class extends qt {
|
|
|
80902
80899
|
} catch {
|
|
80903
80900
|
}
|
|
80904
80901
|
if (this[Re](t)) try {
|
|
80905
|
-
import_node_fs3.default.chownSync(String(t.absolute), Number(this[be](t)), Number(this[
|
|
80902
|
+
import_node_fs3.default.chownSync(String(t.absolute), Number(this[be](t)), Number(this[_e](t)));
|
|
80906
80903
|
} catch {
|
|
80907
80904
|
}
|
|
80908
80905
|
e(), t.resume();
|
|
80909
80906
|
}
|
|
80910
80907
|
[St](t, e) {
|
|
80911
80908
|
try {
|
|
80912
|
-
return
|
|
80909
|
+
return Sr(f(t), { uid: this.uid, gid: this.gid, processUid: this.processUid, processGid: this.processGid, umask: this.processUmask, preserve: this.preservePaths, unlink: this.unlink, cwd: this.cwd, mode: e });
|
|
80913
80910
|
} catch (i) {
|
|
80914
80911
|
return i;
|
|
80915
80912
|
}
|
|
80916
80913
|
}
|
|
80917
80914
|
[ye](t, e, i, r, n) {
|
|
80918
|
-
if (this.preservePaths ||
|
|
80915
|
+
if (this.preservePaths || i.length === 0) return r();
|
|
80919
80916
|
let o = e;
|
|
80920
80917
|
for (let h of i) {
|
|
80921
80918
|
o = import_node_path5.default.resolve(o, h);
|
|
@@ -80925,7 +80922,7 @@ var Te = class extends qt {
|
|
|
80925
80922
|
}
|
|
80926
80923
|
r();
|
|
80927
80924
|
}
|
|
80928
|
-
[
|
|
80925
|
+
[Si](t, e, i, r) {
|
|
80929
80926
|
let n = `${i}Sync`;
|
|
80930
80927
|
try {
|
|
80931
80928
|
import_node_fs3.default[n](e, String(t.absolute)), r(), t.resume();
|
|
@@ -80934,26 +80931,26 @@ var Te = class extends qt {
|
|
|
80934
80931
|
}
|
|
80935
80932
|
}
|
|
80936
80933
|
};
|
|
80937
|
-
var
|
|
80934
|
+
var ao = (s3) => {
|
|
80938
80935
|
let t = new Te(s3), e = s3.file, i = import_node_fs2.default.statSync(e), r = s3.maxReadSize || 16 * 1024 * 1024;
|
|
80939
|
-
new
|
|
80936
|
+
new Me(e, { readSize: r, size: i.size }).pipe(t);
|
|
80940
80937
|
};
|
|
80941
|
-
var
|
|
80938
|
+
var lo = (s3, t) => {
|
|
80942
80939
|
let e = new qt(s3), i = s3.maxReadSize || 16 * 1024 * 1024, r = s3.file;
|
|
80943
80940
|
return new Promise((o, h) => {
|
|
80944
80941
|
e.on("error", h), e.on("close", o), import_node_fs2.default.stat(r, (a, l) => {
|
|
80945
80942
|
if (a) h(a);
|
|
80946
80943
|
else {
|
|
80947
|
-
let c = new
|
|
80944
|
+
let c = new _t(r, { readSize: i, size: l.size });
|
|
80948
80945
|
c.on("error", h), c.pipe(e);
|
|
80949
80946
|
}
|
|
80950
80947
|
});
|
|
80951
80948
|
});
|
|
80952
80949
|
};
|
|
80953
|
-
var
|
|
80954
|
-
t?.length &&
|
|
80950
|
+
var co = K(ao, lo, (s3) => new Te(s3), (s3) => new qt(s3), (s3, t) => {
|
|
80951
|
+
t?.length && Ki(s3, t);
|
|
80955
80952
|
});
|
|
80956
|
-
var
|
|
80953
|
+
var fo = (s3, t) => {
|
|
80957
80954
|
let e = new kt(s3), i = true, r, n;
|
|
80958
80955
|
try {
|
|
80959
80956
|
try {
|
|
@@ -80974,7 +80971,7 @@ var co = (s3, t) => {
|
|
|
80974
80971
|
if (n + l + 512 > o.size) break;
|
|
80975
80972
|
n += l, s3.mtimeCache && a.mtime && s3.mtimeCache.set(String(a.path), a.mtime);
|
|
80976
80973
|
}
|
|
80977
|
-
i = false,
|
|
80974
|
+
i = false, uo(s3, e, n, r, t);
|
|
80978
80975
|
} finally {
|
|
80979
80976
|
if (i) try {
|
|
80980
80977
|
import_node_fs6.default.closeSync(r);
|
|
@@ -80982,11 +80979,11 @@ var co = (s3, t) => {
|
|
|
80982
80979
|
}
|
|
80983
80980
|
}
|
|
80984
80981
|
};
|
|
80985
|
-
var
|
|
80982
|
+
var uo = (s3, t, e, i, r) => {
|
|
80986
80983
|
let n = new Wt(s3.file, { fd: i, start: e });
|
|
80987
|
-
t.pipe(n),
|
|
80984
|
+
t.pipe(n), po(t, r);
|
|
80988
80985
|
};
|
|
80989
|
-
var
|
|
80986
|
+
var mo = (s3, t) => {
|
|
80990
80987
|
t = Array.from(t);
|
|
80991
80988
|
let e = new Et(s3), i = (n, o, h) => {
|
|
80992
80989
|
let a = (T, N) => {
|
|
@@ -80994,7 +80991,7 @@ var uo = (s3, t) => {
|
|
|
80994
80991
|
}, l = 0;
|
|
80995
80992
|
if (o === 0) return a(null, 0);
|
|
80996
80993
|
let c = 0, d = Buffer.alloc(512), S = (T, N) => {
|
|
80997
|
-
if (T ||
|
|
80994
|
+
if (T || N === void 0) return a(T);
|
|
80998
80995
|
if (c += N, c < 512 && N) return import_node_fs6.default.read(n, d, c, d.length - c, l + c, S);
|
|
80999
80996
|
if (l === 0 && d[0] === 31 && d[1] === 139) return a(new Error("cannot append to compressed archives"));
|
|
81000
80997
|
if (c < 512) return a(null, l);
|
|
@@ -81016,38 +81013,35 @@ var uo = (s3, t) => {
|
|
|
81016
81013
|
i(c, S.size, (T, N) => {
|
|
81017
81014
|
if (T) return o(T);
|
|
81018
81015
|
let E = new tt(s3.file, { fd: c, start: N });
|
|
81019
|
-
e.pipe(E), E.on("error", o), E.on("close", n),
|
|
81016
|
+
e.pipe(E), E.on("error", o), E.on("close", n), Eo(e, t);
|
|
81020
81017
|
});
|
|
81021
81018
|
});
|
|
81022
81019
|
};
|
|
81023
81020
|
import_node_fs6.default.open(s3.file, h, a);
|
|
81024
81021
|
});
|
|
81025
81022
|
};
|
|
81026
|
-
var
|
|
81023
|
+
var po = (s3, t) => {
|
|
81027
81024
|
t.forEach((e) => {
|
|
81028
81025
|
e.charAt(0) === "@" ? It({ file: import_node_path9.default.resolve(s3.cwd, e.slice(1)), sync: true, noResume: true, onReadEntry: (i) => s3.add(i) }) : s3.add(e);
|
|
81029
81026
|
}), s3.end();
|
|
81030
81027
|
};
|
|
81031
|
-
var
|
|
81032
|
-
for (let e
|
|
81033
|
-
let i = String(t[e]);
|
|
81034
|
-
i.charAt(0) === "@" ? await It({ file: import_node_path9.default.resolve(String(s3.cwd), i.slice(1)), noResume: true, onReadEntry: (r) => s3.add(r) }) : s3.add(i);
|
|
81035
|
-
}
|
|
81028
|
+
var Eo = async (s3, t) => {
|
|
81029
|
+
for (let e of t) e.charAt(0) === "@" ? await It({ file: import_node_path9.default.resolve(String(s3.cwd), e.slice(1)), noResume: true, onReadEntry: (i) => s3.add(i) }) : s3.add(e);
|
|
81036
81030
|
s3.end();
|
|
81037
81031
|
};
|
|
81038
|
-
var vt = K(
|
|
81032
|
+
var vt = K(fo, mo, () => {
|
|
81039
81033
|
throw new TypeError("file is required");
|
|
81040
81034
|
}, () => {
|
|
81041
81035
|
throw new TypeError("file is required");
|
|
81042
81036
|
}, (s3, t) => {
|
|
81043
|
-
if (!
|
|
81037
|
+
if (!Fs(s3)) throw new TypeError("file is required");
|
|
81044
81038
|
if (s3.gzip || s3.brotli || s3.zstd || s3.file.endsWith(".br") || s3.file.endsWith(".tbr")) throw new TypeError("cannot append to compressed archives");
|
|
81045
81039
|
if (!t?.length) throw new TypeError("no paths specified to add/replace");
|
|
81046
81040
|
});
|
|
81047
|
-
var
|
|
81048
|
-
vt.validate?.(s3, t),
|
|
81041
|
+
var wo = K(vt.syncFile, vt.asyncFile, vt.syncNoFile, vt.asyncNoFile, (s3, t = []) => {
|
|
81042
|
+
vt.validate?.(s3, t), So(s3);
|
|
81049
81043
|
});
|
|
81050
|
-
var
|
|
81044
|
+
var So = (s3) => {
|
|
81051
81045
|
let t = s3.filter;
|
|
81052
81046
|
s3.mtimeCache || (s3.mtimeCache = /* @__PURE__ */ new Map()), s3.filter = t ? (e, i) => t(e, i) && !((s3.mtimeCache?.get(e) ?? i.mtime ?? 0) > (i.mtime ?? 0)) : (e, i) => !((s3.mtimeCache?.get(e) ?? i.mtime ?? 0) > (i.mtime ?? 0));
|
|
81053
81047
|
};
|
|
@@ -81230,6 +81224,9 @@ var Client = class _Client {
|
|
|
81230
81224
|
locale: "",
|
|
81231
81225
|
mode: "",
|
|
81232
81226
|
cookie: "",
|
|
81227
|
+
impersonateuserid: "",
|
|
81228
|
+
impersonateuseremail: "",
|
|
81229
|
+
impersonateuserphone: "",
|
|
81233
81230
|
platform: "",
|
|
81234
81231
|
selfSigned: false,
|
|
81235
81232
|
session: void 0
|
|
@@ -81238,8 +81235,8 @@ var Client = class _Client {
|
|
|
81238
81235
|
"x-sdk-name": "Console",
|
|
81239
81236
|
"x-sdk-platform": "console",
|
|
81240
81237
|
"x-sdk-language": "web",
|
|
81241
|
-
"x-sdk-version": "
|
|
81242
|
-
"X-Appwrite-Response-Format": "1.
|
|
81238
|
+
"x-sdk-version": "8.0.0",
|
|
81239
|
+
"X-Appwrite-Response-Format": "1.9.0"
|
|
81243
81240
|
};
|
|
81244
81241
|
this.realtime = {
|
|
81245
81242
|
socket: void 0,
|
|
@@ -81562,6 +81559,48 @@ var Client = class _Client {
|
|
|
81562
81559
|
this.config.cookie = value;
|
|
81563
81560
|
return this;
|
|
81564
81561
|
}
|
|
81562
|
+
/**
|
|
81563
|
+
* Set ImpersonateUserId
|
|
81564
|
+
*
|
|
81565
|
+
* Impersonate a user by ID on an already user-authenticated request. Requires the current request to be authenticated as a user with impersonator capability; X-Appwrite-Key alone is not sufficient. Impersonator users are intentionally granted users.read so they can discover a target before impersonation begins. Internal audit logs still attribute actions to the original impersonator and record the impersonated target only in internal audit payload data.
|
|
81566
|
+
*
|
|
81567
|
+
* @param value string
|
|
81568
|
+
*
|
|
81569
|
+
* @return {this}
|
|
81570
|
+
*/
|
|
81571
|
+
setImpersonateUserId(value) {
|
|
81572
|
+
this.headers["X-Appwrite-Impersonate-User-Id"] = value;
|
|
81573
|
+
this.config.impersonateuserid = value;
|
|
81574
|
+
return this;
|
|
81575
|
+
}
|
|
81576
|
+
/**
|
|
81577
|
+
* Set ImpersonateUserEmail
|
|
81578
|
+
*
|
|
81579
|
+
* Impersonate a user by email on an already user-authenticated request. Requires the current request to be authenticated as a user with impersonator capability; X-Appwrite-Key alone is not sufficient. Impersonator users are intentionally granted users.read so they can discover a target before impersonation begins. Internal audit logs still attribute actions to the original impersonator and record the impersonated target only in internal audit payload data.
|
|
81580
|
+
*
|
|
81581
|
+
* @param value string
|
|
81582
|
+
*
|
|
81583
|
+
* @return {this}
|
|
81584
|
+
*/
|
|
81585
|
+
setImpersonateUserEmail(value) {
|
|
81586
|
+
this.headers["X-Appwrite-Impersonate-User-Email"] = value;
|
|
81587
|
+
this.config.impersonateuseremail = value;
|
|
81588
|
+
return this;
|
|
81589
|
+
}
|
|
81590
|
+
/**
|
|
81591
|
+
* Set ImpersonateUserPhone
|
|
81592
|
+
*
|
|
81593
|
+
* Impersonate a user by phone on an already user-authenticated request. Requires the current request to be authenticated as a user with impersonator capability; X-Appwrite-Key alone is not sufficient. Impersonator users are intentionally granted users.read so they can discover a target before impersonation begins. Internal audit logs still attribute actions to the original impersonator and record the impersonated target only in internal audit payload data.
|
|
81594
|
+
*
|
|
81595
|
+
* @param value string
|
|
81596
|
+
*
|
|
81597
|
+
* @return {this}
|
|
81598
|
+
*/
|
|
81599
|
+
setImpersonateUserPhone(value) {
|
|
81600
|
+
this.headers["X-Appwrite-Impersonate-User-Phone"] = value;
|
|
81601
|
+
this.config.impersonateuserphone = value;
|
|
81602
|
+
return this;
|
|
81603
|
+
}
|
|
81565
81604
|
/**
|
|
81566
81605
|
* Set Platform
|
|
81567
81606
|
*
|
|
@@ -81683,9 +81722,9 @@ var Client = class _Client {
|
|
|
81683
81722
|
}
|
|
81684
81723
|
return { uri: url2.toString(), options };
|
|
81685
81724
|
}
|
|
81686
|
-
chunkedUpload(
|
|
81687
|
-
|
|
81688
|
-
|
|
81725
|
+
chunkedUpload(method_1, url_1) {
|
|
81726
|
+
return __awaiter(this, arguments, void 0, function* (method, url2, headers = {}, originalPayload = {}, onProgress) {
|
|
81727
|
+
var _a3;
|
|
81689
81728
|
const [fileParam, file2] = (_a3 = Object.entries(originalPayload).find(([_2, value]) => value instanceof File)) !== null && _a3 !== void 0 ? _a3 : [];
|
|
81690
81729
|
if (!file2 || !fileParam) {
|
|
81691
81730
|
throw new Error("File not found in payload");
|
|
@@ -81727,9 +81766,9 @@ var Client = class _Client {
|
|
|
81727
81766
|
return this.call("GET", new URL(this.config.endpoint + "/ping"));
|
|
81728
81767
|
});
|
|
81729
81768
|
}
|
|
81730
|
-
call(
|
|
81731
|
-
|
|
81732
|
-
|
|
81769
|
+
call(method_1, url_1) {
|
|
81770
|
+
return __awaiter(this, arguments, void 0, function* (method, url2, headers = {}, params = {}, responseType = "json") {
|
|
81771
|
+
var _a3, _b;
|
|
81733
81772
|
const { uri, options } = this.prepareRequest(method, url2, headers, params);
|
|
81734
81773
|
let data = null;
|
|
81735
81774
|
const response = yield fetch(uri, options);
|
|
@@ -92637,247 +92676,6 @@ var Projects = class {
|
|
|
92637
92676
|
};
|
|
92638
92677
|
return this.client.call("delete", uri, apiHeaders, payload);
|
|
92639
92678
|
}
|
|
92640
|
-
listWebhooks(paramsOrFirst, ...rest) {
|
|
92641
|
-
let params;
|
|
92642
|
-
if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
|
|
92643
|
-
params = paramsOrFirst || {};
|
|
92644
|
-
} else {
|
|
92645
|
-
params = {
|
|
92646
|
-
projectId: paramsOrFirst,
|
|
92647
|
-
total: rest[0]
|
|
92648
|
-
};
|
|
92649
|
-
}
|
|
92650
|
-
const projectId = params.projectId;
|
|
92651
|
-
const total = params.total;
|
|
92652
|
-
if (typeof projectId === "undefined") {
|
|
92653
|
-
throw new AppwriteException('Missing required parameter: "projectId"');
|
|
92654
|
-
}
|
|
92655
|
-
const apiPath = "/projects/{projectId}/webhooks".replace("{projectId}", projectId);
|
|
92656
|
-
const payload = {};
|
|
92657
|
-
if (typeof total !== "undefined") {
|
|
92658
|
-
payload["total"] = total;
|
|
92659
|
-
}
|
|
92660
|
-
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
92661
|
-
const apiHeaders = {};
|
|
92662
|
-
return this.client.call("get", uri, apiHeaders, payload);
|
|
92663
|
-
}
|
|
92664
|
-
createWebhook(paramsOrFirst, ...rest) {
|
|
92665
|
-
let params;
|
|
92666
|
-
if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
|
|
92667
|
-
params = paramsOrFirst || {};
|
|
92668
|
-
} else {
|
|
92669
|
-
params = {
|
|
92670
|
-
projectId: paramsOrFirst,
|
|
92671
|
-
name: rest[0],
|
|
92672
|
-
events: rest[1],
|
|
92673
|
-
url: rest[2],
|
|
92674
|
-
security: rest[3],
|
|
92675
|
-
enabled: rest[4],
|
|
92676
|
-
httpUser: rest[5],
|
|
92677
|
-
httpPass: rest[6]
|
|
92678
|
-
};
|
|
92679
|
-
}
|
|
92680
|
-
const projectId = params.projectId;
|
|
92681
|
-
const name = params.name;
|
|
92682
|
-
const events = params.events;
|
|
92683
|
-
const url2 = params.url;
|
|
92684
|
-
const security = params.security;
|
|
92685
|
-
const enabled = params.enabled;
|
|
92686
|
-
const httpUser = params.httpUser;
|
|
92687
|
-
const httpPass = params.httpPass;
|
|
92688
|
-
if (typeof projectId === "undefined") {
|
|
92689
|
-
throw new AppwriteException('Missing required parameter: "projectId"');
|
|
92690
|
-
}
|
|
92691
|
-
if (typeof name === "undefined") {
|
|
92692
|
-
throw new AppwriteException('Missing required parameter: "name"');
|
|
92693
|
-
}
|
|
92694
|
-
if (typeof events === "undefined") {
|
|
92695
|
-
throw new AppwriteException('Missing required parameter: "events"');
|
|
92696
|
-
}
|
|
92697
|
-
if (typeof url2 === "undefined") {
|
|
92698
|
-
throw new AppwriteException('Missing required parameter: "url"');
|
|
92699
|
-
}
|
|
92700
|
-
if (typeof security === "undefined") {
|
|
92701
|
-
throw new AppwriteException('Missing required parameter: "security"');
|
|
92702
|
-
}
|
|
92703
|
-
const apiPath = "/projects/{projectId}/webhooks".replace("{projectId}", projectId);
|
|
92704
|
-
const payload = {};
|
|
92705
|
-
if (typeof name !== "undefined") {
|
|
92706
|
-
payload["name"] = name;
|
|
92707
|
-
}
|
|
92708
|
-
if (typeof enabled !== "undefined") {
|
|
92709
|
-
payload["enabled"] = enabled;
|
|
92710
|
-
}
|
|
92711
|
-
if (typeof events !== "undefined") {
|
|
92712
|
-
payload["events"] = events;
|
|
92713
|
-
}
|
|
92714
|
-
if (typeof url2 !== "undefined") {
|
|
92715
|
-
payload["url"] = url2;
|
|
92716
|
-
}
|
|
92717
|
-
if (typeof security !== "undefined") {
|
|
92718
|
-
payload["security"] = security;
|
|
92719
|
-
}
|
|
92720
|
-
if (typeof httpUser !== "undefined") {
|
|
92721
|
-
payload["httpUser"] = httpUser;
|
|
92722
|
-
}
|
|
92723
|
-
if (typeof httpPass !== "undefined") {
|
|
92724
|
-
payload["httpPass"] = httpPass;
|
|
92725
|
-
}
|
|
92726
|
-
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
92727
|
-
const apiHeaders = {
|
|
92728
|
-
"content-type": "application/json"
|
|
92729
|
-
};
|
|
92730
|
-
return this.client.call("post", uri, apiHeaders, payload);
|
|
92731
|
-
}
|
|
92732
|
-
getWebhook(paramsOrFirst, ...rest) {
|
|
92733
|
-
let params;
|
|
92734
|
-
if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
|
|
92735
|
-
params = paramsOrFirst || {};
|
|
92736
|
-
} else {
|
|
92737
|
-
params = {
|
|
92738
|
-
projectId: paramsOrFirst,
|
|
92739
|
-
webhookId: rest[0]
|
|
92740
|
-
};
|
|
92741
|
-
}
|
|
92742
|
-
const projectId = params.projectId;
|
|
92743
|
-
const webhookId = params.webhookId;
|
|
92744
|
-
if (typeof projectId === "undefined") {
|
|
92745
|
-
throw new AppwriteException('Missing required parameter: "projectId"');
|
|
92746
|
-
}
|
|
92747
|
-
if (typeof webhookId === "undefined") {
|
|
92748
|
-
throw new AppwriteException('Missing required parameter: "webhookId"');
|
|
92749
|
-
}
|
|
92750
|
-
const apiPath = "/projects/{projectId}/webhooks/{webhookId}".replace("{projectId}", projectId).replace("{webhookId}", webhookId);
|
|
92751
|
-
const payload = {};
|
|
92752
|
-
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
92753
|
-
const apiHeaders = {};
|
|
92754
|
-
return this.client.call("get", uri, apiHeaders, payload);
|
|
92755
|
-
}
|
|
92756
|
-
updateWebhook(paramsOrFirst, ...rest) {
|
|
92757
|
-
let params;
|
|
92758
|
-
if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
|
|
92759
|
-
params = paramsOrFirst || {};
|
|
92760
|
-
} else {
|
|
92761
|
-
params = {
|
|
92762
|
-
projectId: paramsOrFirst,
|
|
92763
|
-
webhookId: rest[0],
|
|
92764
|
-
name: rest[1],
|
|
92765
|
-
events: rest[2],
|
|
92766
|
-
url: rest[3],
|
|
92767
|
-
security: rest[4],
|
|
92768
|
-
enabled: rest[5],
|
|
92769
|
-
httpUser: rest[6],
|
|
92770
|
-
httpPass: rest[7]
|
|
92771
|
-
};
|
|
92772
|
-
}
|
|
92773
|
-
const projectId = params.projectId;
|
|
92774
|
-
const webhookId = params.webhookId;
|
|
92775
|
-
const name = params.name;
|
|
92776
|
-
const events = params.events;
|
|
92777
|
-
const url2 = params.url;
|
|
92778
|
-
const security = params.security;
|
|
92779
|
-
const enabled = params.enabled;
|
|
92780
|
-
const httpUser = params.httpUser;
|
|
92781
|
-
const httpPass = params.httpPass;
|
|
92782
|
-
if (typeof projectId === "undefined") {
|
|
92783
|
-
throw new AppwriteException('Missing required parameter: "projectId"');
|
|
92784
|
-
}
|
|
92785
|
-
if (typeof webhookId === "undefined") {
|
|
92786
|
-
throw new AppwriteException('Missing required parameter: "webhookId"');
|
|
92787
|
-
}
|
|
92788
|
-
if (typeof name === "undefined") {
|
|
92789
|
-
throw new AppwriteException('Missing required parameter: "name"');
|
|
92790
|
-
}
|
|
92791
|
-
if (typeof events === "undefined") {
|
|
92792
|
-
throw new AppwriteException('Missing required parameter: "events"');
|
|
92793
|
-
}
|
|
92794
|
-
if (typeof url2 === "undefined") {
|
|
92795
|
-
throw new AppwriteException('Missing required parameter: "url"');
|
|
92796
|
-
}
|
|
92797
|
-
if (typeof security === "undefined") {
|
|
92798
|
-
throw new AppwriteException('Missing required parameter: "security"');
|
|
92799
|
-
}
|
|
92800
|
-
const apiPath = "/projects/{projectId}/webhooks/{webhookId}".replace("{projectId}", projectId).replace("{webhookId}", webhookId);
|
|
92801
|
-
const payload = {};
|
|
92802
|
-
if (typeof name !== "undefined") {
|
|
92803
|
-
payload["name"] = name;
|
|
92804
|
-
}
|
|
92805
|
-
if (typeof enabled !== "undefined") {
|
|
92806
|
-
payload["enabled"] = enabled;
|
|
92807
|
-
}
|
|
92808
|
-
if (typeof events !== "undefined") {
|
|
92809
|
-
payload["events"] = events;
|
|
92810
|
-
}
|
|
92811
|
-
if (typeof url2 !== "undefined") {
|
|
92812
|
-
payload["url"] = url2;
|
|
92813
|
-
}
|
|
92814
|
-
if (typeof security !== "undefined") {
|
|
92815
|
-
payload["security"] = security;
|
|
92816
|
-
}
|
|
92817
|
-
if (typeof httpUser !== "undefined") {
|
|
92818
|
-
payload["httpUser"] = httpUser;
|
|
92819
|
-
}
|
|
92820
|
-
if (typeof httpPass !== "undefined") {
|
|
92821
|
-
payload["httpPass"] = httpPass;
|
|
92822
|
-
}
|
|
92823
|
-
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
92824
|
-
const apiHeaders = {
|
|
92825
|
-
"content-type": "application/json"
|
|
92826
|
-
};
|
|
92827
|
-
return this.client.call("put", uri, apiHeaders, payload);
|
|
92828
|
-
}
|
|
92829
|
-
deleteWebhook(paramsOrFirst, ...rest) {
|
|
92830
|
-
let params;
|
|
92831
|
-
if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
|
|
92832
|
-
params = paramsOrFirst || {};
|
|
92833
|
-
} else {
|
|
92834
|
-
params = {
|
|
92835
|
-
projectId: paramsOrFirst,
|
|
92836
|
-
webhookId: rest[0]
|
|
92837
|
-
};
|
|
92838
|
-
}
|
|
92839
|
-
const projectId = params.projectId;
|
|
92840
|
-
const webhookId = params.webhookId;
|
|
92841
|
-
if (typeof projectId === "undefined") {
|
|
92842
|
-
throw new AppwriteException('Missing required parameter: "projectId"');
|
|
92843
|
-
}
|
|
92844
|
-
if (typeof webhookId === "undefined") {
|
|
92845
|
-
throw new AppwriteException('Missing required parameter: "webhookId"');
|
|
92846
|
-
}
|
|
92847
|
-
const apiPath = "/projects/{projectId}/webhooks/{webhookId}".replace("{projectId}", projectId).replace("{webhookId}", webhookId);
|
|
92848
|
-
const payload = {};
|
|
92849
|
-
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
92850
|
-
const apiHeaders = {
|
|
92851
|
-
"content-type": "application/json"
|
|
92852
|
-
};
|
|
92853
|
-
return this.client.call("delete", uri, apiHeaders, payload);
|
|
92854
|
-
}
|
|
92855
|
-
updateWebhookSignature(paramsOrFirst, ...rest) {
|
|
92856
|
-
let params;
|
|
92857
|
-
if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
|
|
92858
|
-
params = paramsOrFirst || {};
|
|
92859
|
-
} else {
|
|
92860
|
-
params = {
|
|
92861
|
-
projectId: paramsOrFirst,
|
|
92862
|
-
webhookId: rest[0]
|
|
92863
|
-
};
|
|
92864
|
-
}
|
|
92865
|
-
const projectId = params.projectId;
|
|
92866
|
-
const webhookId = params.webhookId;
|
|
92867
|
-
if (typeof projectId === "undefined") {
|
|
92868
|
-
throw new AppwriteException('Missing required parameter: "projectId"');
|
|
92869
|
-
}
|
|
92870
|
-
if (typeof webhookId === "undefined") {
|
|
92871
|
-
throw new AppwriteException('Missing required parameter: "webhookId"');
|
|
92872
|
-
}
|
|
92873
|
-
const apiPath = "/projects/{projectId}/webhooks/{webhookId}/signature".replace("{projectId}", projectId).replace("{webhookId}", webhookId);
|
|
92874
|
-
const payload = {};
|
|
92875
|
-
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
92876
|
-
const apiHeaders = {
|
|
92877
|
-
"content-type": "application/json"
|
|
92878
|
-
};
|
|
92879
|
-
return this.client.call("patch", uri, apiHeaders, payload);
|
|
92880
|
-
}
|
|
92881
92679
|
};
|
|
92882
92680
|
var Proxy2 = class {
|
|
92883
92681
|
constructor(client) {
|
|
@@ -98442,7 +98240,7 @@ Permission.delete = (role) => {
|
|
|
98442
98240
|
};
|
|
98443
98241
|
var _a2;
|
|
98444
98242
|
var _ID_hexTimestamp;
|
|
98445
|
-
var ID2 = class
|
|
98243
|
+
var ID2 = class {
|
|
98446
98244
|
/**
|
|
98447
98245
|
* Uses the provided ID as the ID for the resource.
|
|
98448
98246
|
*
|
|
@@ -98459,7 +98257,7 @@ var ID2 = class _ID {
|
|
|
98459
98257
|
* @returns {string}
|
|
98460
98258
|
*/
|
|
98461
98259
|
static unique(padding = 7) {
|
|
98462
|
-
const baseId = __classPrivateFieldGet(
|
|
98260
|
+
const baseId = __classPrivateFieldGet(_a2, _a2, "m", _ID_hexTimestamp).call(_a2);
|
|
98463
98261
|
let randomPadding = "";
|
|
98464
98262
|
for (let i = 0; i < padding; i++) {
|
|
98465
98263
|
const randomHexDigit = Math.floor(Math.random() * 16).toString(16);
|
|
@@ -98612,11 +98410,12 @@ Operator.dateSubDays = (days) => new Operator("dateSubDays", [days]).toString();
|
|
|
98612
98410
|
Operator.dateSetNow = () => new Operator("dateSetNow", []).toString();
|
|
98613
98411
|
var Scopes;
|
|
98614
98412
|
(function(Scopes2) {
|
|
98413
|
+
Scopes2["Account"] = "account";
|
|
98414
|
+
Scopes2["TeamsRead"] = "teams.read";
|
|
98415
|
+
Scopes2["TeamsWrite"] = "teams.write";
|
|
98615
98416
|
Scopes2["SessionsWrite"] = "sessions.write";
|
|
98616
98417
|
Scopes2["UsersRead"] = "users.read";
|
|
98617
98418
|
Scopes2["UsersWrite"] = "users.write";
|
|
98618
|
-
Scopes2["TeamsRead"] = "teams.read";
|
|
98619
|
-
Scopes2["TeamsWrite"] = "teams.write";
|
|
98620
98419
|
Scopes2["DatabasesRead"] = "databases.read";
|
|
98621
98420
|
Scopes2["DatabasesWrite"] = "databases.write";
|
|
98622
98421
|
Scopes2["CollectionsRead"] = "collections.read";
|
|
@@ -98669,6 +98468,10 @@ var Scopes;
|
|
|
98669
98468
|
Scopes2["AssistantRead"] = "assistant.read";
|
|
98670
98469
|
Scopes2["TokensRead"] = "tokens.read";
|
|
98671
98470
|
Scopes2["TokensWrite"] = "tokens.write";
|
|
98471
|
+
Scopes2["WebhooksRead"] = "webhooks.read";
|
|
98472
|
+
Scopes2["WebhooksWrite"] = "webhooks.write";
|
|
98473
|
+
Scopes2["ProjectRead"] = "project.read";
|
|
98474
|
+
Scopes2["ProjectWrite"] = "project.write";
|
|
98672
98475
|
Scopes2["PoliciesWrite"] = "policies.write";
|
|
98673
98476
|
Scopes2["PoliciesRead"] = "policies.read";
|
|
98674
98477
|
Scopes2["ArchivesRead"] = "archives.read";
|
|
@@ -98678,6 +98481,14 @@ var Scopes;
|
|
|
98678
98481
|
Scopes2["DomainsRead"] = "domains.read";
|
|
98679
98482
|
Scopes2["DomainsWrite"] = "domains.write";
|
|
98680
98483
|
Scopes2["EventsRead"] = "events.read";
|
|
98484
|
+
Scopes2["PlatformsRead"] = "platforms.read";
|
|
98485
|
+
Scopes2["PlatformsWrite"] = "platforms.write";
|
|
98486
|
+
Scopes2["ProjectsRead"] = "projects.read";
|
|
98487
|
+
Scopes2["ProjectsWrite"] = "projects.write";
|
|
98488
|
+
Scopes2["KeysRead"] = "keys.read";
|
|
98489
|
+
Scopes2["KeysWrite"] = "keys.write";
|
|
98490
|
+
Scopes2["DevKeysRead"] = "devKeys.read";
|
|
98491
|
+
Scopes2["DevKeysWrite"] = "devKeys.write";
|
|
98681
98492
|
})(Scopes || (Scopes = {}));
|
|
98682
98493
|
var AuthenticatorType;
|
|
98683
98494
|
(function(AuthenticatorType2) {
|
|
@@ -99430,6 +99241,9 @@ var ImageFormat;
|
|
|
99430
99241
|
var BackupServices;
|
|
99431
99242
|
(function(BackupServices2) {
|
|
99432
99243
|
BackupServices2["Databases"] = "databases";
|
|
99244
|
+
BackupServices2["Tablesdb"] = "tablesdb";
|
|
99245
|
+
BackupServices2["Documentsdb"] = "documentsdb";
|
|
99246
|
+
BackupServices2["Vectorsdb"] = "vectorsdb";
|
|
99433
99247
|
BackupServices2["Functions"] = "functions";
|
|
99434
99248
|
BackupServices2["Storage"] = "storage";
|
|
99435
99249
|
})(BackupServices || (BackupServices = {}));
|
|
@@ -99461,13 +99275,13 @@ var RelationMutate;
|
|
|
99461
99275
|
RelationMutate2["Restrict"] = "restrict";
|
|
99462
99276
|
RelationMutate2["SetNull"] = "setNull";
|
|
99463
99277
|
})(RelationMutate || (RelationMutate = {}));
|
|
99464
|
-
var
|
|
99465
|
-
(function(
|
|
99466
|
-
|
|
99467
|
-
|
|
99468
|
-
|
|
99469
|
-
|
|
99470
|
-
})(
|
|
99278
|
+
var DatabasesIndexType;
|
|
99279
|
+
(function(DatabasesIndexType2) {
|
|
99280
|
+
DatabasesIndexType2["Key"] = "key";
|
|
99281
|
+
DatabasesIndexType2["Fulltext"] = "fulltext";
|
|
99282
|
+
DatabasesIndexType2["Unique"] = "unique";
|
|
99283
|
+
DatabasesIndexType2["Spatial"] = "spatial";
|
|
99284
|
+
})(DatabasesIndexType || (DatabasesIndexType = {}));
|
|
99471
99285
|
var OrderBy;
|
|
99472
99286
|
(function(OrderBy2) {
|
|
99473
99287
|
OrderBy2["Asc"] = "asc";
|
|
@@ -99518,9 +99332,6 @@ var Runtime;
|
|
|
99518
99332
|
Runtime2["Pythonml311"] = "python-ml-3.11";
|
|
99519
99333
|
Runtime2["Pythonml312"] = "python-ml-3.12";
|
|
99520
99334
|
Runtime2["Pythonml313"] = "python-ml-3.13";
|
|
99521
|
-
Runtime2["Deno121"] = "deno-1.21";
|
|
99522
|
-
Runtime2["Deno124"] = "deno-1.24";
|
|
99523
|
-
Runtime2["Deno135"] = "deno-1.35";
|
|
99524
99335
|
Runtime2["Deno140"] = "deno-1.40";
|
|
99525
99336
|
Runtime2["Deno146"] = "deno-1.46";
|
|
99526
99337
|
Runtime2["Deno20"] = "deno-2.0";
|
|
@@ -99610,9 +99421,6 @@ var Runtimes;
|
|
|
99610
99421
|
Runtimes2["Pythonml311"] = "python-ml-3.11";
|
|
99611
99422
|
Runtimes2["Pythonml312"] = "python-ml-3.12";
|
|
99612
99423
|
Runtimes2["Pythonml313"] = "python-ml-3.13";
|
|
99613
|
-
Runtimes2["Deno121"] = "deno-1.21";
|
|
99614
|
-
Runtimes2["Deno124"] = "deno-1.24";
|
|
99615
|
-
Runtimes2["Deno135"] = "deno-1.35";
|
|
99616
99424
|
Runtimes2["Deno140"] = "deno-1.40";
|
|
99617
99425
|
Runtimes2["Deno146"] = "deno-1.46";
|
|
99618
99426
|
Runtimes2["Deno20"] = "deno-2.0";
|
|
@@ -99671,20 +99479,25 @@ var Runtimes;
|
|
|
99671
99479
|
})(Runtimes || (Runtimes = {}));
|
|
99672
99480
|
var UseCases;
|
|
99673
99481
|
(function(UseCases2) {
|
|
99674
|
-
UseCases2["Portfolio"] = "portfolio";
|
|
99675
99482
|
UseCases2["Starter"] = "starter";
|
|
99483
|
+
UseCases2["Databases"] = "databases";
|
|
99484
|
+
UseCases2["Ai"] = "ai";
|
|
99485
|
+
UseCases2["Messaging"] = "messaging";
|
|
99486
|
+
UseCases2["Utilities"] = "utilities";
|
|
99487
|
+
UseCases2["Devtools"] = "dev-tools";
|
|
99488
|
+
UseCases2["Auth"] = "auth";
|
|
99489
|
+
UseCases2["Portfolio"] = "portfolio";
|
|
99676
99490
|
UseCases2["Events"] = "events";
|
|
99677
99491
|
UseCases2["Ecommerce"] = "ecommerce";
|
|
99678
99492
|
UseCases2["Documentation"] = "documentation";
|
|
99679
99493
|
UseCases2["Blog"] = "blog";
|
|
99680
|
-
UseCases2["Ai"] = "ai";
|
|
99681
99494
|
UseCases2["Forms"] = "forms";
|
|
99682
99495
|
UseCases2["Dashboard"] = "dashboard";
|
|
99683
99496
|
})(UseCases || (UseCases = {}));
|
|
99684
99497
|
var TemplateReferenceType;
|
|
99685
99498
|
(function(TemplateReferenceType2) {
|
|
99686
|
-
TemplateReferenceType2["Branch"] = "branch";
|
|
99687
99499
|
TemplateReferenceType2["Commit"] = "commit";
|
|
99500
|
+
TemplateReferenceType2["Branch"] = "branch";
|
|
99688
99501
|
TemplateReferenceType2["Tag"] = "tag";
|
|
99689
99502
|
})(TemplateReferenceType || (TemplateReferenceType = {}));
|
|
99690
99503
|
var VCSReferenceType;
|
|
@@ -99748,6 +99561,8 @@ var AppwriteMigrationResource;
|
|
|
99748
99561
|
AppwriteMigrationResource2["Document"] = "document";
|
|
99749
99562
|
AppwriteMigrationResource2["Attribute"] = "attribute";
|
|
99750
99563
|
AppwriteMigrationResource2["Collection"] = "collection";
|
|
99564
|
+
AppwriteMigrationResource2["Documentsdb"] = "documentsdb";
|
|
99565
|
+
AppwriteMigrationResource2["Vectorsdb"] = "vectorsdb";
|
|
99751
99566
|
AppwriteMigrationResource2["Bucket"] = "bucket";
|
|
99752
99567
|
AppwriteMigrationResource2["File"] = "file";
|
|
99753
99568
|
AppwriteMigrationResource2["Function"] = "function";
|
|
@@ -100230,9 +100045,6 @@ var BuildRuntime;
|
|
|
100230
100045
|
BuildRuntime2["Pythonml311"] = "python-ml-3.11";
|
|
100231
100046
|
BuildRuntime2["Pythonml312"] = "python-ml-3.12";
|
|
100232
100047
|
BuildRuntime2["Pythonml313"] = "python-ml-3.13";
|
|
100233
|
-
BuildRuntime2["Deno121"] = "deno-1.21";
|
|
100234
|
-
BuildRuntime2["Deno124"] = "deno-1.24";
|
|
100235
|
-
BuildRuntime2["Deno135"] = "deno-1.35";
|
|
100236
100048
|
BuildRuntime2["Deno140"] = "deno-1.40";
|
|
100237
100049
|
BuildRuntime2["Deno146"] = "deno-1.46";
|
|
100238
100050
|
BuildRuntime2["Deno20"] = "deno-2.0";
|
|
@@ -100330,6 +100142,13 @@ var ImageGravity;
|
|
|
100330
100142
|
ImageGravity2["Bottom"] = "bottom";
|
|
100331
100143
|
ImageGravity2["Bottomright"] = "bottom-right";
|
|
100332
100144
|
})(ImageGravity || (ImageGravity = {}));
|
|
100145
|
+
var TablesDBIndexType;
|
|
100146
|
+
(function(TablesDBIndexType2) {
|
|
100147
|
+
TablesDBIndexType2["Key"] = "key";
|
|
100148
|
+
TablesDBIndexType2["Fulltext"] = "fulltext";
|
|
100149
|
+
TablesDBIndexType2["Unique"] = "unique";
|
|
100150
|
+
TablesDBIndexType2["Spatial"] = "spatial";
|
|
100151
|
+
})(TablesDBIndexType || (TablesDBIndexType = {}));
|
|
100333
100152
|
var PasswordHash;
|
|
100334
100153
|
(function(PasswordHash2) {
|
|
100335
100154
|
PasswordHash2["Sha1"] = "sha1";
|
|
@@ -100359,6 +100178,8 @@ var DatabaseType;
|
|
|
100359
100178
|
(function(DatabaseType2) {
|
|
100360
100179
|
DatabaseType2["Legacy"] = "legacy";
|
|
100361
100180
|
DatabaseType2["Tablesdb"] = "tablesdb";
|
|
100181
|
+
DatabaseType2["Documentsdb"] = "documentsdb";
|
|
100182
|
+
DatabaseType2["Vectorsdb"] = "vectorsdb";
|
|
100362
100183
|
})(DatabaseType || (DatabaseType = {}));
|
|
100363
100184
|
var AttributeStatus;
|
|
100364
100185
|
(function(AttributeStatus2) {
|
|
@@ -100444,28 +100265,24 @@ var BillingPlanGroup;
|
|
|
100444
100265
|
BillingPlanGroup2["Pro"] = "pro";
|
|
100445
100266
|
BillingPlanGroup2["Scale"] = "scale";
|
|
100446
100267
|
})(BillingPlanGroup || (BillingPlanGroup = {}));
|
|
100447
|
-
var
|
|
100448
|
-
(function(
|
|
100449
|
-
|
|
100450
|
-
|
|
100451
|
-
|
|
100452
|
-
|
|
100453
|
-
|
|
100454
|
-
|
|
100455
|
-
|
|
100456
|
-
|
|
100457
|
-
})(
|
|
100458
|
-
var
|
|
100459
|
-
(function(
|
|
100460
|
-
|
|
100461
|
-
|
|
100462
|
-
|
|
100463
|
-
|
|
100464
|
-
|
|
100465
|
-
DomainTransferStatusStatus2["Completed"] = "completed";
|
|
100466
|
-
DomainTransferStatusStatus2["Cancelled"] = "cancelled";
|
|
100467
|
-
DomainTransferStatusStatus2["ServiceUnavailable"] = "service_unavailable";
|
|
100468
|
-
})(DomainTransferStatusStatus || (DomainTransferStatusStatus = {}));
|
|
100268
|
+
var DomainTransferStatusEnum;
|
|
100269
|
+
(function(DomainTransferStatusEnum2) {
|
|
100270
|
+
DomainTransferStatusEnum2["Transferrable"] = "transferrable";
|
|
100271
|
+
DomainTransferStatusEnum2["NotTransferrable"] = "not_transferrable";
|
|
100272
|
+
DomainTransferStatusEnum2["PendingOwner"] = "pending_owner";
|
|
100273
|
+
DomainTransferStatusEnum2["PendingAdmin"] = "pending_admin";
|
|
100274
|
+
DomainTransferStatusEnum2["PendingRegistry"] = "pending_registry";
|
|
100275
|
+
DomainTransferStatusEnum2["Completed"] = "completed";
|
|
100276
|
+
DomainTransferStatusEnum2["Cancelled"] = "cancelled";
|
|
100277
|
+
DomainTransferStatusEnum2["ServiceUnavailable"] = "service_unavailable";
|
|
100278
|
+
})(DomainTransferStatusEnum || (DomainTransferStatusEnum = {}));
|
|
100279
|
+
var DomainPurchaseStatus;
|
|
100280
|
+
(function(DomainPurchaseStatus2) {
|
|
100281
|
+
DomainPurchaseStatus2["Pending"] = "pending";
|
|
100282
|
+
DomainPurchaseStatus2["Succeeded"] = "succeeded";
|
|
100283
|
+
DomainPurchaseStatus2["Failed"] = "failed";
|
|
100284
|
+
DomainPurchaseStatus2["Cancelled"] = "cancelled";
|
|
100285
|
+
})(DomainPurchaseStatus || (DomainPurchaseStatus = {}));
|
|
100469
100286
|
|
|
100470
100287
|
// lib/parser.ts
|
|
100471
100288
|
var import_chalk2 = __toESM(require_source(), 1);
|
|
@@ -100477,7 +100294,7 @@ var package_default = {
|
|
|
100477
100294
|
type: "module",
|
|
100478
100295
|
homepage: "https://appwrite.io/support",
|
|
100479
100296
|
description: "Appwrite is an open-source self-hosted backend server that abstracts and simplifies complex and repetitive development tasks behind a very simple REST API",
|
|
100480
|
-
version: "
|
|
100297
|
+
version: "17.0.0",
|
|
100481
100298
|
license: "BSD-3-Clause",
|
|
100482
100299
|
main: "dist/index.cjs",
|
|
100483
100300
|
module: "dist/index.js",
|
|
@@ -100521,7 +100338,7 @@ var package_default = {
|
|
|
100521
100338
|
"windows-arm64": "esbuild cli.ts --bundle --loader:.hbs=text --platform=node --target=node18 --format=esm --external:fsevents --outfile=dist/bundle-win-arm64.mjs && pkg dist/bundle-win-arm64.mjs -t node18-win-arm64 -o build/appwrite-cli-win-arm64.exe"
|
|
100522
100339
|
},
|
|
100523
100340
|
dependencies: {
|
|
100524
|
-
"@appwrite.io/console": "
|
|
100341
|
+
"@appwrite.io/console": "*",
|
|
100525
100342
|
chalk: "4.1.2",
|
|
100526
100343
|
chokidar: "^3.6.0",
|
|
100527
100344
|
"cli-progress": "^3.12.0",
|
|
@@ -100772,14 +100589,18 @@ var commandDescriptions = {
|
|
|
100772
100589
|
messaging: `The messaging command allows you to manage topics and targets and send messages.`,
|
|
100773
100590
|
migrations: `The migrations command allows you to migrate data between services.`,
|
|
100774
100591
|
vcs: `The vcs command allows you to interact with VCS providers and manage your code repositories.`,
|
|
100592
|
+
webhooks: `The webhooks command allows you to manage your project webhooks.`,
|
|
100775
100593
|
main: import_chalk2.default.redBright(`${logo}${description}`)
|
|
100776
100594
|
};
|
|
100777
100595
|
|
|
100778
100596
|
// lib/commands/utils/deployment.ts
|
|
100779
100597
|
var POLL_DEBOUNCE = 2e3;
|
|
100780
100598
|
async function packageDirectory(dirPath) {
|
|
100781
|
-
const tempFile = import_path5.default.join(
|
|
100782
|
-
|
|
100599
|
+
const tempFile = import_path5.default.join(
|
|
100600
|
+
import_os3.default.tmpdir(),
|
|
100601
|
+
`appwrite-deploy-${Date.now()}.tar.gz`
|
|
100602
|
+
);
|
|
100603
|
+
await Zn(
|
|
100783
100604
|
{
|
|
100784
100605
|
gzip: true,
|
|
100785
100606
|
file: tempFile,
|
|
@@ -100848,7 +100669,7 @@ async function downloadDeploymentCode(params) {
|
|
|
100848
100669
|
`Failed to write deployment archive to "${compressedFileName}": ${message}`
|
|
100849
100670
|
);
|
|
100850
100671
|
}
|
|
100851
|
-
|
|
100672
|
+
co({
|
|
100852
100673
|
sync: true,
|
|
100853
100674
|
cwd: resourcePath,
|
|
100854
100675
|
file: compressedFileName,
|
|
@@ -101055,12 +100876,16 @@ var questionsInitProject = [
|
|
|
101055
100876
|
choices: async () => {
|
|
101056
100877
|
const client = await sdkForConsole(true);
|
|
101057
100878
|
const { teams } = isCloud() ? await paginate(
|
|
101058
|
-
async (
|
|
100879
|
+
async (args) => (await getOrganizationsService(args.sdk)).list({
|
|
100880
|
+
queries: args.queries
|
|
100881
|
+
}),
|
|
101059
100882
|
{ sdk: client },
|
|
101060
100883
|
100,
|
|
101061
100884
|
"teams"
|
|
101062
100885
|
) : await paginate(
|
|
101063
|
-
async (
|
|
100886
|
+
async (args) => (await getTeamsService(args.sdk)).list({
|
|
100887
|
+
queries: args.queries
|
|
100888
|
+
}),
|
|
101064
100889
|
{ parseOutput: false, sdk: client },
|
|
101065
100890
|
100,
|
|
101066
100891
|
"teams"
|
|
@@ -101108,7 +100933,7 @@ var questionsInitProject = [
|
|
|
101108
100933
|
JSON.stringify({ method: "orderDesc", attribute: "$id" })
|
|
101109
100934
|
];
|
|
101110
100935
|
const { projects } = await paginate(
|
|
101111
|
-
async () => (await getProjectsService()).list(queries),
|
|
100936
|
+
async (args) => (await getProjectsService()).list(args.queries),
|
|
101112
100937
|
{ parseOutput: false },
|
|
101113
100938
|
100,
|
|
101114
100939
|
"projects",
|
|
@@ -101188,7 +101013,7 @@ var questionsPullFunctions = [
|
|
|
101188
101013
|
validate: (value) => validateRequired("function", value),
|
|
101189
101014
|
choices: async () => {
|
|
101190
101015
|
const { functions } = await paginate(
|
|
101191
|
-
async () => (await getFunctionsService()).list(),
|
|
101016
|
+
async (args) => (await getFunctionsService()).list(args.queries),
|
|
101192
101017
|
{ parseOutput: false },
|
|
101193
101018
|
100,
|
|
101194
101019
|
"functions"
|
|
@@ -101227,7 +101052,7 @@ var questionsPullSites = [
|
|
|
101227
101052
|
validate: (value) => validateRequired("site", value),
|
|
101228
101053
|
choices: async () => {
|
|
101229
101054
|
const { sites } = await paginate(
|
|
101230
|
-
async () => (await getSitesService()).list(),
|
|
101055
|
+
async (args) => (await getSitesService()).list(args.queries),
|
|
101231
101056
|
{ parseOutput: false },
|
|
101232
101057
|
100,
|
|
101233
101058
|
"sites"
|
|
@@ -103175,18 +103000,9 @@ var Push = class {
|
|
|
103175
103000
|
const functionsServiceForVars = await getFunctionsService(
|
|
103176
103001
|
this.projectClient
|
|
103177
103002
|
);
|
|
103178
|
-
const { variables } = await
|
|
103179
|
-
|
|
103180
|
-
|
|
103181
|
-
functionId: args.functionId
|
|
103182
|
-
});
|
|
103183
|
-
},
|
|
103184
|
-
{
|
|
103185
|
-
functionId: func["$id"]
|
|
103186
|
-
},
|
|
103187
|
-
100,
|
|
103188
|
-
"variables"
|
|
103189
|
-
);
|
|
103003
|
+
const { variables } = await functionsServiceForVars.listVariables({
|
|
103004
|
+
functionId: func["$id"]
|
|
103005
|
+
});
|
|
103190
103006
|
await Promise.all(
|
|
103191
103007
|
variables.map(async (variable) => {
|
|
103192
103008
|
const functionsServiceDel = await getFunctionsService(
|
|
@@ -103480,18 +103296,9 @@ var Push = class {
|
|
|
103480
103296
|
if (withVariables) {
|
|
103481
103297
|
updaterRow.update({ status: "Creating variables" }).replaceSpinner(SPINNER_DOTS);
|
|
103482
103298
|
const sitesServiceForVars = await getSitesService(this.projectClient);
|
|
103483
|
-
const { variables } = await
|
|
103484
|
-
|
|
103485
|
-
|
|
103486
|
-
siteId: args.siteId
|
|
103487
|
-
});
|
|
103488
|
-
},
|
|
103489
|
-
{
|
|
103490
|
-
siteId: site["$id"]
|
|
103491
|
-
},
|
|
103492
|
-
100,
|
|
103493
|
-
"variables"
|
|
103494
|
-
);
|
|
103299
|
+
const { variables } = await sitesServiceForVars.listVariables({
|
|
103300
|
+
siteId: site["$id"]
|
|
103301
|
+
});
|
|
103495
103302
|
await Promise.all(
|
|
103496
103303
|
variables.map(async (variable) => {
|
|
103497
103304
|
const sitesServiceDel = await getSitesService(this.projectClient);
|
|
@@ -104856,7 +104663,7 @@ var Pull = class {
|
|
|
104856
104663
|
return [];
|
|
104857
104664
|
}
|
|
104858
104665
|
const { functions: allFunctions } = await paginate(
|
|
104859
|
-
async () => new Functions(this.projectClient).list(),
|
|
104666
|
+
async (args) => new Functions(this.projectClient).list(args.queries),
|
|
104860
104667
|
{},
|
|
104861
104668
|
100,
|
|
104862
104669
|
"functions"
|
|
@@ -104940,7 +104747,7 @@ var Pull = class {
|
|
|
104940
104747
|
return [];
|
|
104941
104748
|
}
|
|
104942
104749
|
const { sites: fetchedSites } = await paginate(
|
|
104943
|
-
async () => new Sites(this.projectClient).list(),
|
|
104750
|
+
async (args) => new Sites(this.projectClient).list(args.queries),
|
|
104944
104751
|
{},
|
|
104945
104752
|
100,
|
|
104946
104753
|
"sites"
|
|
@@ -105018,7 +104825,7 @@ var Pull = class {
|
|
|
105018
104825
|
return { databases: [], collections: [] };
|
|
105019
104826
|
}
|
|
105020
104827
|
const { databases } = await paginate(
|
|
105021
|
-
async () => new Databases(this.projectClient).list(),
|
|
104828
|
+
async (args) => new Databases(this.projectClient).list(args.queries),
|
|
105022
104829
|
{},
|
|
105023
104830
|
100,
|
|
105024
104831
|
"databases"
|
|
@@ -105031,7 +104838,10 @@ var Pull = class {
|
|
|
105031
104838
|
);
|
|
105032
104839
|
allDatabases.push(database);
|
|
105033
104840
|
const { collections } = await paginate(
|
|
105034
|
-
async () => new Databases(this.projectClient).listCollections(
|
|
104841
|
+
async (args) => new Databases(this.projectClient).listCollections(
|
|
104842
|
+
database.$id,
|
|
104843
|
+
args.queries
|
|
104844
|
+
),
|
|
105035
104845
|
{},
|
|
105036
104846
|
100,
|
|
105037
104847
|
"collections"
|
|
@@ -105069,7 +104879,9 @@ var Pull = class {
|
|
|
105069
104879
|
return { databases: [], tables: [] };
|
|
105070
104880
|
}
|
|
105071
104881
|
const { databases } = await paginate(
|
|
105072
|
-
async () => new TablesDB(this.projectClient).list(
|
|
104882
|
+
async (args) => new TablesDB(this.projectClient).list({
|
|
104883
|
+
queries: args.queries
|
|
104884
|
+
}),
|
|
105073
104885
|
{},
|
|
105074
104886
|
100,
|
|
105075
104887
|
"databases"
|
|
@@ -105082,7 +104894,10 @@ var Pull = class {
|
|
|
105082
104894
|
);
|
|
105083
104895
|
allDatabases.push(filterBySchema(database, DatabaseSchema));
|
|
105084
104896
|
const { tables } = await paginate(
|
|
105085
|
-
async () => new TablesDB(this.projectClient).listTables(
|
|
104897
|
+
async (args) => new TablesDB(this.projectClient).listTables({
|
|
104898
|
+
databaseId: database.$id,
|
|
104899
|
+
queries: args.queries
|
|
104900
|
+
}),
|
|
105086
104901
|
{},
|
|
105087
104902
|
100,
|
|
105088
104903
|
"tables"
|
|
@@ -105124,7 +104939,7 @@ var Pull = class {
|
|
|
105124
104939
|
return [];
|
|
105125
104940
|
}
|
|
105126
104941
|
const { buckets } = await paginate(
|
|
105127
|
-
async () => new Storage(this.projectClient).listBuckets(),
|
|
104942
|
+
async (args) => new Storage(this.projectClient).listBuckets(args.queries),
|
|
105128
104943
|
{},
|
|
105129
104944
|
100,
|
|
105130
104945
|
"buckets"
|
|
@@ -105154,7 +104969,7 @@ var Pull = class {
|
|
|
105154
104969
|
return [];
|
|
105155
104970
|
}
|
|
105156
104971
|
const { teams } = await paginate(
|
|
105157
|
-
async () => new Teams(this.projectClient).list(),
|
|
104972
|
+
async (args) => new Teams(this.projectClient).list(args.queries),
|
|
105158
104973
|
{},
|
|
105159
104974
|
100,
|
|
105160
104975
|
"teams"
|
|
@@ -105180,7 +104995,7 @@ var Pull = class {
|
|
|
105180
104995
|
return [];
|
|
105181
104996
|
}
|
|
105182
104997
|
const { topics } = await paginate(
|
|
105183
|
-
async () => new Messaging(this.projectClient).listTopics(),
|
|
104998
|
+
async (args) => new Messaging(this.projectClient).listTopics(args.queries),
|
|
105184
104999
|
{},
|
|
105185
105000
|
100,
|
|
105186
105001
|
"topics"
|
|
@@ -105252,7 +105067,7 @@ var pullFunctions = async ({
|
|
|
105252
105067
|
return;
|
|
105253
105068
|
}
|
|
105254
105069
|
const functionsToCheck = cliConfig.all ? (await paginate(
|
|
105255
|
-
async () => (await getFunctionsService()).list(),
|
|
105070
|
+
async (args) => (await getFunctionsService()).list(args.queries),
|
|
105256
105071
|
{},
|
|
105257
105072
|
100,
|
|
105258
105073
|
"functions"
|
|
@@ -105290,7 +105105,7 @@ var pullSites = async ({
|
|
|
105290
105105
|
return;
|
|
105291
105106
|
}
|
|
105292
105107
|
const sitesToCheck = cliConfig.all ? (await paginate(
|
|
105293
|
-
async () => (await getSitesService()).list(),
|
|
105108
|
+
async (args) => (await getSitesService()).list(args.queries),
|
|
105294
105109
|
{},
|
|
105295
105110
|
100,
|
|
105296
105111
|
"sites"
|
|
@@ -106049,13 +105864,33 @@ ${supportsServerSide ? ` create: (databaseId: string, name: string, options?: {
|
|
|
106049
105864
|
requiresApiKey: supportsServerSide
|
|
106050
105865
|
});
|
|
106051
105866
|
}
|
|
105867
|
+
/**
|
|
105868
|
+
* Deduplicate entities by composite key ($id + databaseId).
|
|
105869
|
+
* Keeps the last occurrence to match addTable/addCollection semantics.
|
|
105870
|
+
*/
|
|
105871
|
+
dedupeEntities(entities) {
|
|
105872
|
+
const seen = /* @__PURE__ */ new Map();
|
|
105873
|
+
for (const entity of entities) {
|
|
105874
|
+
seen.set(`${entity.databaseId}:${entity.$id}`, entity);
|
|
105875
|
+
}
|
|
105876
|
+
return Array.from(seen.values());
|
|
105877
|
+
}
|
|
106052
105878
|
async generate(config2, options) {
|
|
106053
105879
|
if (!config2.projectId) {
|
|
106054
105880
|
throw new Error("Project ID is required in configuration");
|
|
106055
105881
|
}
|
|
106056
105882
|
const appwriteDep = options?.appwriteImportSource ?? getAppwriteDependency();
|
|
106057
105883
|
const importExt = options?.importExtension ?? detectImportExtension();
|
|
106058
|
-
const
|
|
105884
|
+
const dedupedConfig = { ...config2 };
|
|
105885
|
+
if (dedupedConfig.tables && dedupedConfig.tables.length > 0) {
|
|
105886
|
+
dedupedConfig.tables = this.dedupeEntities(dedupedConfig.tables);
|
|
105887
|
+
}
|
|
105888
|
+
if (dedupedConfig.collections && dedupedConfig.collections.length > 0) {
|
|
105889
|
+
dedupedConfig.collections = this.dedupeEntities(
|
|
105890
|
+
dedupedConfig.collections
|
|
105891
|
+
);
|
|
105892
|
+
}
|
|
105893
|
+
const hasEntities = dedupedConfig.tables && dedupedConfig.tables.length > 0 || dedupedConfig.collections && dedupedConfig.collections.length > 0;
|
|
106059
105894
|
if (!hasEntities) {
|
|
106060
105895
|
console.log(
|
|
106061
105896
|
"No tables or collections found in configuration. Skipping database generation."
|
|
@@ -106064,14 +105899,21 @@ ${supportsServerSide ? ` create: (databaseId: string, name: string, options?: {
|
|
|
106064
105899
|
dbContent: "// No tables or collections found in configuration\n",
|
|
106065
105900
|
typesContent: "// No tables or collections found in configuration\n",
|
|
106066
105901
|
indexContent: this.generateIndexFile(importExt),
|
|
106067
|
-
constantsContent: this.generateConstantsFile(
|
|
105902
|
+
constantsContent: this.generateConstantsFile(
|
|
105903
|
+
dedupedConfig,
|
|
105904
|
+
appwriteDep
|
|
105905
|
+
)
|
|
106068
105906
|
};
|
|
106069
105907
|
}
|
|
106070
105908
|
return {
|
|
106071
|
-
dbContent: this.generateDatabasesFile(
|
|
106072
|
-
|
|
105909
|
+
dbContent: this.generateDatabasesFile(
|
|
105910
|
+
dedupedConfig,
|
|
105911
|
+
importExt,
|
|
105912
|
+
appwriteDep
|
|
105913
|
+
),
|
|
105914
|
+
typesContent: this.generateTypesFile(dedupedConfig, appwriteDep),
|
|
106073
105915
|
indexContent: this.generateIndexFile(importExt),
|
|
106074
|
-
constantsContent: this.generateConstantsFile(
|
|
105916
|
+
constantsContent: this.generateConstantsFile(dedupedConfig, appwriteDep)
|
|
106075
105917
|
};
|
|
106076
105918
|
}
|
|
106077
105919
|
};
|