appwrite-cli 15.0.0 → 16.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 +14 -0
- package/README.md +3 -3
- package/cli.ts +2 -0
- package/dist/bundle-win-arm64.mjs +1387 -1087
- package/dist/cli.cjs +1331 -1031
- package/dist/index.cjs +987 -943
- package/dist/index.js +1043 -999
- 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/services/functions.d.ts.map +1 -1
- package/dist/lib/commands/services/sites.d.ts.map +1 -1
- package/dist/lib/commands/services/storage.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 +5 -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/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/services/functions.ts +2 -1
- package/lib/commands/services/projects.ts +0 -100
- package/lib/commands/services/sites.ts +2 -1
- package/lib/commands/services/storage.ts +2 -1
- package/lib/commands/services/webhooks.ts +134 -0
- package/lib/commands/utils/deployment.ts +31 -7
- package/lib/constants.ts +1 -1
- package/lib/parser.ts +1 -0
- 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
|
@@ -102,7 +102,7 @@ var require_main = __commonJS({
|
|
|
102
102
|
"node_modules/dotenv/lib/main.js"(exports2, module2) {
|
|
103
103
|
var fs9 = require("fs");
|
|
104
104
|
var path7 = require("path");
|
|
105
|
-
var
|
|
105
|
+
var os6 = require("os");
|
|
106
106
|
var crypto2 = require("crypto");
|
|
107
107
|
var packageJson = require_package();
|
|
108
108
|
var version2 = packageJson.version;
|
|
@@ -225,7 +225,7 @@ var require_main = __commonJS({
|
|
|
225
225
|
return null;
|
|
226
226
|
}
|
|
227
227
|
function _resolveHome(envPath) {
|
|
228
|
-
return envPath[0] === "~" ? path7.join(
|
|
228
|
+
return envPath[0] === "~" ? path7.join(os6.homedir(), envPath.slice(1)) : envPath;
|
|
229
229
|
}
|
|
230
230
|
function _configVault(options) {
|
|
231
231
|
const debug = Boolean(options && options.debug);
|
|
@@ -1505,7 +1505,7 @@ var require_has_flag = __commonJS({
|
|
|
1505
1505
|
var require_supports_color = __commonJS({
|
|
1506
1506
|
"node_modules/supports-color/index.js"(exports2, module2) {
|
|
1507
1507
|
"use strict";
|
|
1508
|
-
var
|
|
1508
|
+
var os6 = require("os");
|
|
1509
1509
|
var tty = require("tty");
|
|
1510
1510
|
var hasFlag = require_has_flag();
|
|
1511
1511
|
var { env } = process;
|
|
@@ -1553,7 +1553,7 @@ var require_supports_color = __commonJS({
|
|
|
1553
1553
|
return min;
|
|
1554
1554
|
}
|
|
1555
1555
|
if (process.platform === "win32") {
|
|
1556
|
-
const osRelease =
|
|
1556
|
+
const osRelease = os6.release().split(".");
|
|
1557
1557
|
if (Number(osRelease[0]) >= 10 && Number(osRelease[2]) >= 10586) {
|
|
1558
1558
|
return Number(osRelease[2]) >= 14931 ? 3 : 2;
|
|
1559
1559
|
}
|
|
@@ -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;
|
|
@@ -55545,7 +55545,7 @@ var require_has_flag2 = __commonJS({
|
|
|
55545
55545
|
var require_supports_colors = __commonJS({
|
|
55546
55546
|
"node_modules/@colors/colors/lib/system/supports-colors.js"(exports2, module2) {
|
|
55547
55547
|
"use strict";
|
|
55548
|
-
var
|
|
55548
|
+
var os6 = require("os");
|
|
55549
55549
|
var hasFlag = require_has_flag2();
|
|
55550
55550
|
var env = process.env;
|
|
55551
55551
|
var forceColor = void 0;
|
|
@@ -55583,7 +55583,7 @@ var require_supports_colors = __commonJS({
|
|
|
55583
55583
|
}
|
|
55584
55584
|
var min = forceColor ? 1 : 0;
|
|
55585
55585
|
if (process.platform === "win32") {
|
|
55586
|
-
var osRelease =
|
|
55586
|
+
var osRelease = os6.release().split(".");
|
|
55587
55587
|
if (Number(process.versions.node.split(".")[0]) >= 8 && Number(osRelease[0]) >= 10 && Number(osRelease[2]) >= 10586) {
|
|
55588
55588
|
return Number(osRelease[2]) >= 14931 ? 3 : 2;
|
|
55589
55589
|
}
|
|
@@ -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 = "16.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";
|
|
@@ -78144,6 +78144,7 @@ async function paginate(action, args = {}, limit = 100, wrapper = "", queries =
|
|
|
78144
78144
|
|
|
78145
78145
|
// lib/commands/utils/deployment.ts
|
|
78146
78146
|
var import_fs6 = __toESM(require("fs"), 1);
|
|
78147
|
+
var import_os3 = __toESM(require("os"), 1);
|
|
78147
78148
|
var import_path5 = __toESM(require("path"), 1);
|
|
78148
78149
|
|
|
78149
78150
|
// node_modules/tar/dist/esm/index.min.js
|
|
@@ -78158,7 +78159,7 @@ var import_path2 = require("path");
|
|
|
78158
78159
|
var import_events2 = require("events");
|
|
78159
78160
|
var import_assert = __toESM(require("assert"), 1);
|
|
78160
78161
|
var import_buffer = require("buffer");
|
|
78161
|
-
var
|
|
78162
|
+
var ks = __toESM(require("zlib"), 1);
|
|
78162
78163
|
var import_zlib = __toESM(require("zlib"), 1);
|
|
78163
78164
|
var import_node_path2 = require("node:path");
|
|
78164
78165
|
var import_node_path3 = require("node:path");
|
|
@@ -78181,51 +78182,51 @@ var import_node_path7 = __toESM(require("node:path"), 1);
|
|
|
78181
78182
|
var import_node_path8 = require("node:path");
|
|
78182
78183
|
var import_node_fs6 = __toESM(require("node:fs"), 1);
|
|
78183
78184
|
var import_node_path9 = __toESM(require("node:path"), 1);
|
|
78184
|
-
var
|
|
78185
|
+
var Nr = Object.defineProperty;
|
|
78185
78186
|
var Ar = (s3, t) => {
|
|
78186
|
-
for (var e in t)
|
|
78187
|
+
for (var e in t) Nr(s3, e, { get: t[e], enumerable: true });
|
|
78187
78188
|
};
|
|
78188
|
-
var
|
|
78189
|
-
var
|
|
78190
|
-
var
|
|
78191
|
-
var
|
|
78189
|
+
var Os = typeof process == "object" && process ? process : { stdout: null, stderr: null };
|
|
78190
|
+
var Ir = (s3) => !!s3 && typeof s3 == "object" && (s3 instanceof D || s3 instanceof import_node_stream.default || Cr(s3) || Fr(s3));
|
|
78191
|
+
var Cr = (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 Fr = (s3) => !!s3 && typeof s3 == "object" && s3 instanceof import_node_events.EventEmitter && typeof s3.write == "function" && typeof s3.end == "function";
|
|
78192
78193
|
var q = /* @__PURE__ */ Symbol("EOF");
|
|
78193
78194
|
var j = /* @__PURE__ */ Symbol("maybeEmitEnd");
|
|
78194
78195
|
var rt = /* @__PURE__ */ Symbol("emittedEnd");
|
|
78195
|
-
var
|
|
78196
|
+
var Le = /* @__PURE__ */ Symbol("emittingEnd");
|
|
78196
78197
|
var jt = /* @__PURE__ */ Symbol("emittedError");
|
|
78197
|
-
var
|
|
78198
|
-
var
|
|
78199
|
-
var
|
|
78200
|
-
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");
|
|
78201
78202
|
var z3 = /* @__PURE__ */ Symbol("encoding");
|
|
78202
78203
|
var Mt = /* @__PURE__ */ Symbol("decoder");
|
|
78203
78204
|
var b = /* @__PURE__ */ Symbol("flowing");
|
|
78204
78205
|
var Qt = /* @__PURE__ */ Symbol("paused");
|
|
78205
78206
|
var Bt = /* @__PURE__ */ Symbol("resume");
|
|
78206
|
-
var
|
|
78207
|
-
var
|
|
78208
|
-
var
|
|
78209
|
-
var
|
|
78207
|
+
var _ = /* @__PURE__ */ Symbol("buffer");
|
|
78208
|
+
var A = /* @__PURE__ */ Symbol("pipes");
|
|
78209
|
+
var g = /* @__PURE__ */ Symbol("bufferLength");
|
|
78210
|
+
var yi = /* @__PURE__ */ Symbol("bufferPush");
|
|
78210
78211
|
var De = /* @__PURE__ */ Symbol("bufferShift");
|
|
78211
78212
|
var L = /* @__PURE__ */ Symbol("objectMode");
|
|
78212
78213
|
var w = /* @__PURE__ */ Symbol("destroyed");
|
|
78213
|
-
var
|
|
78214
|
-
var
|
|
78215
|
-
var
|
|
78216
|
-
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");
|
|
78217
78218
|
var Z = /* @__PURE__ */ Symbol("async");
|
|
78218
78219
|
var gi = /* @__PURE__ */ Symbol("abort");
|
|
78219
|
-
var
|
|
78220
|
+
var Ie = /* @__PURE__ */ Symbol("aborted");
|
|
78220
78221
|
var Jt = /* @__PURE__ */ Symbol("signal");
|
|
78221
78222
|
var yt = /* @__PURE__ */ Symbol("dataListeners");
|
|
78222
78223
|
var C = /* @__PURE__ */ Symbol("discarded");
|
|
78223
78224
|
var te = (s3) => Promise.resolve().then(s3);
|
|
78224
|
-
var
|
|
78225
|
-
var
|
|
78226
|
-
var
|
|
78227
|
-
var
|
|
78228
|
-
var
|
|
78225
|
+
var kr = (s3) => s3();
|
|
78226
|
+
var vr = (s3) => s3 === "end" || s3 === "finish" || s3 === "prefinish";
|
|
78227
|
+
var Mr = (s3) => s3 instanceof ArrayBuffer || !!s3 && typeof s3 == "object" && s3.constructor && s3.constructor.name === "ArrayBuffer" && s3.byteLength >= 0;
|
|
78228
|
+
var Br = (s3) => !Buffer.isBuffer(s3) && ArrayBuffer.isView(s3);
|
|
78229
|
+
var Ce = class {
|
|
78229
78230
|
src;
|
|
78230
78231
|
dest;
|
|
78231
78232
|
opts;
|
|
@@ -78242,7 +78243,7 @@ var Ie = class {
|
|
|
78242
78243
|
this.unpipe(), this.opts.end && this.dest.end();
|
|
78243
78244
|
}
|
|
78244
78245
|
};
|
|
78245
|
-
var
|
|
78246
|
+
var Oi = class extends Ce {
|
|
78246
78247
|
unpipe() {
|
|
78247
78248
|
this.src.removeListener("error", this.proxyErrors), super.unpipe();
|
|
78248
78249
|
}
|
|
@@ -78250,26 +78251,26 @@ var _i = class extends Ie {
|
|
|
78250
78251
|
super(t, e, i), this.proxyErrors = (r) => this.dest.emit("error", r), t.on("error", this.proxyErrors);
|
|
78251
78252
|
}
|
|
78252
78253
|
};
|
|
78253
|
-
var
|
|
78254
|
-
var
|
|
78255
|
-
var
|
|
78254
|
+
var Pr = (s3) => !!s3.objectMode;
|
|
78255
|
+
var zr = (s3) => !s3.objectMode && !!s3.encoding && s3.encoding !== "buffer";
|
|
78256
|
+
var D = class extends import_node_events.EventEmitter {
|
|
78256
78257
|
[b] = false;
|
|
78257
78258
|
[Qt] = false;
|
|
78258
|
-
[
|
|
78259
|
-
[
|
|
78259
|
+
[A] = [];
|
|
78260
|
+
[_] = [];
|
|
78260
78261
|
[L];
|
|
78261
78262
|
[z3];
|
|
78262
78263
|
[Z];
|
|
78263
78264
|
[Mt];
|
|
78264
78265
|
[q] = false;
|
|
78265
78266
|
[rt] = false;
|
|
78266
|
-
[xe] = false;
|
|
78267
78267
|
[Le] = false;
|
|
78268
|
+
[Ne] = false;
|
|
78268
78269
|
[jt] = null;
|
|
78269
|
-
[
|
|
78270
|
+
[g] = 0;
|
|
78270
78271
|
[w] = false;
|
|
78271
78272
|
[Jt];
|
|
78272
|
-
[
|
|
78273
|
+
[Ie] = false;
|
|
78273
78274
|
[yt] = 0;
|
|
78274
78275
|
[C] = false;
|
|
78275
78276
|
writable = true;
|
|
@@ -78277,12 +78278,12 @@ var A = class extends import_node_events.EventEmitter {
|
|
|
78277
78278
|
constructor(...t) {
|
|
78278
78279
|
let e = t[0] || {};
|
|
78279
78280
|
if (super(), e.objectMode && typeof e.encoding == "string") throw new TypeError("Encoding and objectMode may not be used together");
|
|
78280
|
-
|
|
78281
|
+
Pr(e) ? (this[L] = true, this[z3] = null) : zr(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] });
|
|
78281
78282
|
let { signal: i } = e;
|
|
78282
78283
|
i && (this[Jt] = i, i.aborted ? this[gi]() : i.addEventListener("abort", () => this[gi]()));
|
|
78283
78284
|
}
|
|
78284
78285
|
get bufferLength() {
|
|
78285
|
-
return this[
|
|
78286
|
+
return this[g];
|
|
78286
78287
|
}
|
|
78287
78288
|
get encoding() {
|
|
78288
78289
|
return this[z3];
|
|
@@ -78306,46 +78307,46 @@ var A = class extends import_node_events.EventEmitter {
|
|
|
78306
78307
|
this[Z] = this[Z] || !!t;
|
|
78307
78308
|
}
|
|
78308
78309
|
[gi]() {
|
|
78309
|
-
this[
|
|
78310
|
+
this[Ie] = true, this.emit("abort", this[Jt]?.reason), this.destroy(this[Jt]?.reason);
|
|
78310
78311
|
}
|
|
78311
78312
|
get aborted() {
|
|
78312
|
-
return this[
|
|
78313
|
+
return this[Ie];
|
|
78313
78314
|
}
|
|
78314
78315
|
set aborted(t) {
|
|
78315
78316
|
}
|
|
78316
78317
|
write(t, e, i) {
|
|
78317
|
-
if (this[
|
|
78318
|
+
if (this[Ie]) return false;
|
|
78318
78319
|
if (this[q]) throw new Error("write after end");
|
|
78319
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;
|
|
78320
78321
|
typeof e == "function" && (i = e, e = "utf8"), e || (e = "utf8");
|
|
78321
|
-
let r = this[Z] ? te :
|
|
78322
|
+
let r = this[Z] ? te : kr;
|
|
78322
78323
|
if (!this[L] && !Buffer.isBuffer(t)) {
|
|
78323
|
-
if (
|
|
78324
|
-
else if (
|
|
78324
|
+
if (Br(t)) t = Buffer.from(t.buffer, t.byteOffset, t.byteLength);
|
|
78325
|
+
else if (Mr(t)) t = Buffer.from(t);
|
|
78325
78326
|
else if (typeof t != "string") throw new Error("Non-contiguous data written to non-objectMode stream");
|
|
78326
78327
|
}
|
|
78327
|
-
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]);
|
|
78328
78329
|
}
|
|
78329
78330
|
read(t) {
|
|
78330
78331
|
if (this[w]) return null;
|
|
78331
|
-
if (this[C] = false, this[
|
|
78332
|
-
this[L] && (t = null), this[
|
|
78333
|
-
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]);
|
|
78334
78335
|
return this[j](), e;
|
|
78335
78336
|
}
|
|
78336
|
-
[
|
|
78337
|
+
[Ts](t, e) {
|
|
78337
78338
|
if (this[L]) this[De]();
|
|
78338
78339
|
else {
|
|
78339
78340
|
let i = e;
|
|
78340
|
-
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);
|
|
78341
78342
|
}
|
|
78342
|
-
return this.emit("data", e), !this[
|
|
78343
|
+
return this.emit("data", e), !this[_].length && !this[q] && this.emit("drain"), e;
|
|
78343
78344
|
}
|
|
78344
78345
|
end(t, e, i) {
|
|
78345
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;
|
|
78346
78347
|
}
|
|
78347
78348
|
[Bt]() {
|
|
78348
|
-
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"));
|
|
78349
78350
|
}
|
|
78350
78351
|
resume() {
|
|
78351
78352
|
return this[Bt]();
|
|
@@ -78362,39 +78363,39 @@ var A = class extends import_node_events.EventEmitter {
|
|
|
78362
78363
|
get paused() {
|
|
78363
78364
|
return this[Qt];
|
|
78364
78365
|
}
|
|
78365
|
-
[
|
|
78366
|
-
this[L] ? this[
|
|
78366
|
+
[yi](t) {
|
|
78367
|
+
this[L] ? this[g] += 1 : this[g] += t.length, this[_].push(t);
|
|
78367
78368
|
}
|
|
78368
78369
|
[De]() {
|
|
78369
|
-
return this[L] ? this[
|
|
78370
|
+
return this[L] ? this[g] -= 1 : this[g] -= this[_][0].length, this[_].shift();
|
|
78370
78371
|
}
|
|
78371
|
-
[
|
|
78372
|
+
[Ae](t = false) {
|
|
78372
78373
|
do
|
|
78373
78374
|
;
|
|
78374
|
-
while (this[
|
|
78375
|
-
!t && !this[
|
|
78375
|
+
while (this[xs](this[De]()) && this[_].length);
|
|
78376
|
+
!t && !this[_].length && !this[q] && this.emit("drain");
|
|
78376
78377
|
}
|
|
78377
|
-
[
|
|
78378
|
+
[xs](t) {
|
|
78378
78379
|
return this.emit("data", t), this[b];
|
|
78379
78380
|
}
|
|
78380
78381
|
pipe(t, e) {
|
|
78381
78382
|
if (this[w]) return t;
|
|
78382
78383
|
this[C] = false;
|
|
78383
78384
|
let i = this[rt];
|
|
78384
|
-
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;
|
|
78385
78386
|
}
|
|
78386
78387
|
unpipe(t) {
|
|
78387
|
-
let e = this[
|
|
78388
|
-
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());
|
|
78389
78390
|
}
|
|
78390
78391
|
addListener(t, e) {
|
|
78391
78392
|
return this.on(t, e);
|
|
78392
78393
|
}
|
|
78393
78394
|
on(t, e) {
|
|
78394
78395
|
let i = super.on(t, e);
|
|
78395
|
-
if (t === "data") this[C] = false, this[yt]++, !this[
|
|
78396
|
-
else if (t === "readable" && this[
|
|
78397
|
-
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 (vr(t) && this[rt]) super.emit(t), this.removeAllListeners(t);
|
|
78398
78399
|
else if (t === "error" && this[jt]) {
|
|
78399
78400
|
let r = e;
|
|
78400
78401
|
this[Z] ? te(() => r.call(this, this[jt])) : r.call(this, this[jt]);
|
|
@@ -78406,29 +78407,29 @@ var A = class extends import_node_events.EventEmitter {
|
|
|
78406
78407
|
}
|
|
78407
78408
|
off(t, e) {
|
|
78408
78409
|
let i = super.off(t, e);
|
|
78409
|
-
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;
|
|
78410
78411
|
}
|
|
78411
78412
|
removeAllListeners(t) {
|
|
78412
78413
|
let e = super.removeAllListeners(t);
|
|
78413
|
-
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;
|
|
78414
78415
|
}
|
|
78415
78416
|
get emittedEnd() {
|
|
78416
78417
|
return this[rt];
|
|
78417
78418
|
}
|
|
78418
78419
|
[j]() {
|
|
78419
|
-
!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);
|
|
78420
78421
|
}
|
|
78421
78422
|
emit(t, ...e) {
|
|
78422
78423
|
let i = e[0];
|
|
78423
78424
|
if (t !== "error" && t !== "close" && t !== w && this[w]) return false;
|
|
78424
|
-
if (t === "data") return !this[L] && !i ? false : this[Z] ? (te(() => this[
|
|
78425
|
-
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]();
|
|
78426
78427
|
if (t === "close") {
|
|
78427
|
-
if (this[
|
|
78428
|
+
if (this[Ne] = true, !this[rt] && !this[w]) return false;
|
|
78428
78429
|
let n = super.emit("close");
|
|
78429
78430
|
return this.removeAllListeners("close"), n;
|
|
78430
78431
|
} else if (t === "error") {
|
|
78431
|
-
this[jt] = i, super.emit(
|
|
78432
|
+
this[jt] = i, super.emit(Ri, i);
|
|
78432
78433
|
let n = !this[Jt] || this.listeners("error").length ? super.emit("error", i) : false;
|
|
78433
78434
|
return this[j](), n;
|
|
78434
78435
|
} else if (t === "resume") {
|
|
@@ -78441,23 +78442,23 @@ var A = class extends import_node_events.EventEmitter {
|
|
|
78441
78442
|
let r = super.emit(t, ...e);
|
|
78442
78443
|
return this[j](), r;
|
|
78443
78444
|
}
|
|
78444
|
-
[
|
|
78445
|
-
for (let i of this[
|
|
78445
|
+
[bi](t) {
|
|
78446
|
+
for (let i of this[A]) i.dest.write(t) === false && this.pause();
|
|
78446
78447
|
let e = this[C] ? false : super.emit("data", t);
|
|
78447
78448
|
return this[j](), e;
|
|
78448
78449
|
}
|
|
78449
|
-
[
|
|
78450
|
-
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]());
|
|
78451
78452
|
}
|
|
78452
|
-
[
|
|
78453
|
+
[_i]() {
|
|
78453
78454
|
if (this[Mt]) {
|
|
78454
78455
|
let e = this[Mt].end();
|
|
78455
78456
|
if (e) {
|
|
78456
|
-
for (let i of this[
|
|
78457
|
+
for (let i of this[A]) i.dest.write(e);
|
|
78457
78458
|
this[C] || super.emit("data", e);
|
|
78458
78459
|
}
|
|
78459
78460
|
}
|
|
78460
|
-
for (let e of this[
|
|
78461
|
+
for (let e of this[A]) e.end();
|
|
78461
78462
|
let t = super.emit("end");
|
|
78462
78463
|
return this.removeAllListeners("end"), t;
|
|
78463
78464
|
}
|
|
@@ -78504,67 +78505,67 @@ var A = class extends import_node_events.EventEmitter {
|
|
|
78504
78505
|
}
|
|
78505
78506
|
[Symbol.iterator]() {
|
|
78506
78507
|
this[C] = false;
|
|
78507
|
-
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 = () => {
|
|
78508
78509
|
if (t) return e();
|
|
78509
78510
|
let r = this.read();
|
|
78510
78511
|
return r === null ? e() : { done: false, value: r };
|
|
78511
78512
|
};
|
|
78512
|
-
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]() {
|
|
78513
78514
|
return this;
|
|
78514
78515
|
}, [Symbol.dispose]: () => {
|
|
78515
78516
|
} };
|
|
78516
78517
|
}
|
|
78517
78518
|
destroy(t) {
|
|
78518
78519
|
if (this[w]) return t ? this.emit("error", t) : this.emit(w), this;
|
|
78519
|
-
this[w] = true, this[C] = true, this[
|
|
78520
|
+
this[w] = true, this[C] = true, this[_].length = 0, this[g] = 0;
|
|
78520
78521
|
let e = this;
|
|
78521
|
-
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;
|
|
78522
78523
|
}
|
|
78523
78524
|
static get isStream() {
|
|
78524
|
-
return
|
|
78525
|
+
return Ir;
|
|
78525
78526
|
}
|
|
78526
78527
|
};
|
|
78527
|
-
var
|
|
78528
|
+
var Hr = import_fs2.default.writev;
|
|
78528
78529
|
var ot = /* @__PURE__ */ Symbol("_autoClose");
|
|
78529
78530
|
var H = /* @__PURE__ */ Symbol("_close");
|
|
78530
78531
|
var ee = /* @__PURE__ */ Symbol("_ended");
|
|
78531
78532
|
var m = /* @__PURE__ */ Symbol("_fd");
|
|
78532
|
-
var
|
|
78533
|
+
var xi = /* @__PURE__ */ Symbol("_finished");
|
|
78533
78534
|
var J = /* @__PURE__ */ Symbol("_flags");
|
|
78534
|
-
var
|
|
78535
|
-
var
|
|
78536
|
-
var
|
|
78535
|
+
var Li = /* @__PURE__ */ Symbol("_flush");
|
|
78536
|
+
var Ii = /* @__PURE__ */ Symbol("_handleChunk");
|
|
78537
|
+
var Ci = /* @__PURE__ */ Symbol("_makeBuf");
|
|
78537
78538
|
var se = /* @__PURE__ */ Symbol("_mode");
|
|
78538
|
-
var
|
|
78539
|
+
var Fe = /* @__PURE__ */ Symbol("_needDrain");
|
|
78539
78540
|
var Ut = /* @__PURE__ */ Symbol("_onerror");
|
|
78540
78541
|
var Ht = /* @__PURE__ */ Symbol("_onopen");
|
|
78541
|
-
var
|
|
78542
|
+
var Ni = /* @__PURE__ */ Symbol("_onread");
|
|
78542
78543
|
var Pt = /* @__PURE__ */ Symbol("_onwrite");
|
|
78543
78544
|
var ht = /* @__PURE__ */ Symbol("_open");
|
|
78544
78545
|
var U = /* @__PURE__ */ Symbol("_path");
|
|
78545
78546
|
var nt = /* @__PURE__ */ Symbol("_pos");
|
|
78546
78547
|
var Y = /* @__PURE__ */ Symbol("_queue");
|
|
78547
78548
|
var zt = /* @__PURE__ */ Symbol("_read");
|
|
78548
|
-
var
|
|
78549
|
+
var Ai = /* @__PURE__ */ Symbol("_readSize");
|
|
78549
78550
|
var Q = /* @__PURE__ */ Symbol("_reading");
|
|
78550
78551
|
var ie = /* @__PURE__ */ Symbol("_remain");
|
|
78551
78552
|
var Di = /* @__PURE__ */ Symbol("_size");
|
|
78552
|
-
var
|
|
78553
|
+
var ke = /* @__PURE__ */ Symbol("_write");
|
|
78553
78554
|
var Rt = /* @__PURE__ */ Symbol("_writing");
|
|
78554
|
-
var
|
|
78555
|
+
var ve = /* @__PURE__ */ Symbol("_defaultFlag");
|
|
78555
78556
|
var bt = /* @__PURE__ */ Symbol("_errored");
|
|
78556
|
-
var
|
|
78557
|
+
var _t = class extends D {
|
|
78557
78558
|
[bt] = false;
|
|
78558
78559
|
[m];
|
|
78559
78560
|
[U];
|
|
78560
|
-
[
|
|
78561
|
+
[Ai];
|
|
78561
78562
|
[Q] = false;
|
|
78562
78563
|
[Di];
|
|
78563
78564
|
[ie];
|
|
78564
78565
|
[ot];
|
|
78565
78566
|
constructor(t, e) {
|
|
78566
78567
|
if (e = e || {}, super(e), this.readable = true, this.writable = false, typeof t != "string") throw new TypeError("path must be a string");
|
|
78567
|
-
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]();
|
|
78568
78569
|
}
|
|
78569
78570
|
get fd() {
|
|
78570
78571
|
return this[m];
|
|
@@ -78584,19 +78585,19 @@ var gt = class extends A {
|
|
|
78584
78585
|
[Ht](t, e) {
|
|
78585
78586
|
t ? this[Ut](t) : (this[m] = e, this.emit("open", e), this[zt]());
|
|
78586
78587
|
}
|
|
78587
|
-
[
|
|
78588
|
-
return Buffer.allocUnsafe(Math.min(this[
|
|
78588
|
+
[Ci]() {
|
|
78589
|
+
return Buffer.allocUnsafe(Math.min(this[Ai], this[ie]));
|
|
78589
78590
|
}
|
|
78590
78591
|
[zt]() {
|
|
78591
78592
|
if (!this[Q]) {
|
|
78592
78593
|
this[Q] = true;
|
|
78593
|
-
let t = this[
|
|
78594
|
-
if (t.length === 0) return process.nextTick(() => this[
|
|
78595
|
-
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));
|
|
78596
78597
|
}
|
|
78597
78598
|
}
|
|
78598
|
-
[
|
|
78599
|
-
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]();
|
|
78600
78601
|
}
|
|
78601
78602
|
[H]() {
|
|
78602
78603
|
if (this[ot] && typeof this[m] == "number") {
|
|
@@ -78607,7 +78608,7 @@ var gt = class extends A {
|
|
|
78607
78608
|
[Ut](t) {
|
|
78608
78609
|
this[Q] = true, this[H](), this.emit("error", t);
|
|
78609
78610
|
}
|
|
78610
|
-
[
|
|
78611
|
+
[Ii](t, e) {
|
|
78611
78612
|
let i = false;
|
|
78612
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;
|
|
78613
78614
|
}
|
|
@@ -78625,7 +78626,7 @@ var gt = class extends A {
|
|
|
78625
78626
|
}
|
|
78626
78627
|
}
|
|
78627
78628
|
};
|
|
78628
|
-
var
|
|
78629
|
+
var Me = class extends _t {
|
|
78629
78630
|
[ht]() {
|
|
78630
78631
|
let t = true;
|
|
78631
78632
|
try {
|
|
@@ -78640,8 +78641,8 @@ var ve = class extends gt {
|
|
|
78640
78641
|
if (!this[Q]) {
|
|
78641
78642
|
this[Q] = true;
|
|
78642
78643
|
do {
|
|
78643
|
-
let e = this[
|
|
78644
|
-
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;
|
|
78645
78646
|
} while (true);
|
|
78646
78647
|
this[Q] = false;
|
|
78647
78648
|
}
|
|
@@ -78664,19 +78665,19 @@ var tt = class extends import_events.default {
|
|
|
78664
78665
|
[Rt] = false;
|
|
78665
78666
|
[ee] = false;
|
|
78666
78667
|
[Y] = [];
|
|
78667
|
-
[
|
|
78668
|
+
[Fe] = false;
|
|
78668
78669
|
[U];
|
|
78669
78670
|
[se];
|
|
78670
78671
|
[ot];
|
|
78671
78672
|
[m];
|
|
78672
|
-
[
|
|
78673
|
+
[ve];
|
|
78673
78674
|
[J];
|
|
78674
|
-
[
|
|
78675
|
+
[xi] = false;
|
|
78675
78676
|
[nt];
|
|
78676
78677
|
constructor(t, e) {
|
|
78677
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;
|
|
78678
78679
|
let i = this[nt] !== void 0 ? "r+" : "w";
|
|
78679
|
-
this[
|
|
78680
|
+
this[ve] = e.flags === void 0, this[J] = e.flags === void 0 ? i : e.flags, this[m] === void 0 && this[ht]();
|
|
78680
78681
|
}
|
|
78681
78682
|
emit(t, ...e) {
|
|
78682
78683
|
if (t === "error") {
|
|
@@ -78698,26 +78699,26 @@ var tt = class extends import_events.default {
|
|
|
78698
78699
|
import_fs2.default.open(this[U], this[J], this[se], (t, e) => this[Ht](t, e));
|
|
78699
78700
|
}
|
|
78700
78701
|
[Ht](t, e) {
|
|
78701
|
-
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]());
|
|
78702
78703
|
}
|
|
78703
78704
|
end(t, e) {
|
|
78704
78705
|
return t && this.write(t, e), this[ee] = true, !this[Rt] && !this[Y].length && typeof this[m] == "number" && this[Pt](null, 0), this;
|
|
78705
78706
|
}
|
|
78706
78707
|
write(t, e) {
|
|
78707
|
-
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);
|
|
78708
78709
|
}
|
|
78709
|
-
[
|
|
78710
|
+
[ke](t) {
|
|
78710
78711
|
import_fs2.default.write(this[m], t, 0, t.length, this[nt], (e, i) => this[Pt](e, i));
|
|
78711
78712
|
}
|
|
78712
78713
|
[Pt](t, e) {
|
|
78713
|
-
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"))));
|
|
78714
78715
|
}
|
|
78715
|
-
[
|
|
78716
|
+
[Li]() {
|
|
78716
78717
|
if (this[Y].length === 0) this[ee] && this[Pt](null, 0);
|
|
78717
|
-
else if (this[Y].length === 1) this[
|
|
78718
|
+
else if (this[Y].length === 1) this[ke](this[Y].pop());
|
|
78718
78719
|
else {
|
|
78719
78720
|
let t = this[Y];
|
|
78720
|
-
this[Y] = [],
|
|
78721
|
+
this[Y] = [], Hr(this[m], t, this[nt], (e, i) => this[Pt](e, i));
|
|
78721
78722
|
}
|
|
78722
78723
|
}
|
|
78723
78724
|
[H]() {
|
|
@@ -78730,7 +78731,7 @@ var tt = class extends import_events.default {
|
|
|
78730
78731
|
var Wt = class extends tt {
|
|
78731
78732
|
[ht]() {
|
|
78732
78733
|
let t;
|
|
78733
|
-
if (this[
|
|
78734
|
+
if (this[ve] && this[J] === "r+") try {
|
|
78734
78735
|
t = import_fs2.default.openSync(this[U], this[J], this[se]);
|
|
78735
78736
|
} catch (e) {
|
|
78736
78737
|
if (e?.code === "ENOENT") return this[J] = "w", this[ht]();
|
|
@@ -78745,7 +78746,7 @@ var Wt = class extends tt {
|
|
|
78745
78746
|
this[m] = void 0, import_fs2.default.closeSync(t), this.emit("close");
|
|
78746
78747
|
}
|
|
78747
78748
|
}
|
|
78748
|
-
[
|
|
78749
|
+
[ke](t) {
|
|
78749
78750
|
let e = true;
|
|
78750
78751
|
try {
|
|
78751
78752
|
this[Pt](null, import_fs2.default.writeSync(this[m], t, 0, t.length, this[nt])), e = false;
|
|
@@ -78757,49 +78758,50 @@ var Wt = class extends tt {
|
|
|
78757
78758
|
}
|
|
78758
78759
|
}
|
|
78759
78760
|
};
|
|
78760
|
-
var
|
|
78761
|
+
var Wr = /* @__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"]]);
|
|
78761
78762
|
var As = (s3) => !!s3.sync && !!s3.file;
|
|
78762
|
-
var
|
|
78763
|
-
var
|
|
78764
|
-
var
|
|
78765
|
-
var
|
|
78766
|
-
var
|
|
78767
|
-
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 Gr = (s3) => {
|
|
78768
|
+
let t = Wr.get(s3);
|
|
78768
78769
|
return t || s3;
|
|
78769
78770
|
};
|
|
78770
78771
|
var re = (s3 = {}) => {
|
|
78771
78772
|
if (!s3) return {};
|
|
78772
78773
|
let t = {};
|
|
78773
78774
|
for (let [e, i] of Object.entries(s3)) {
|
|
78774
|
-
let r =
|
|
78775
|
+
let r = Gr(e);
|
|
78775
78776
|
t[r] = i;
|
|
78776
78777
|
}
|
|
78777
78778
|
return t.chmod === void 0 && t.noChmod === false && (t.chmod = true), delete t.noChmod, t;
|
|
78778
78779
|
};
|
|
78779
78780
|
var K = (s3, t, e, i, r) => Object.assign((n = [], o, h) => {
|
|
78780
|
-
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) : [];
|
|
78781
78782
|
let a = re(n);
|
|
78782
78783
|
if (r?.(a, o), As(a)) {
|
|
78783
78784
|
if (typeof h == "function") throw new TypeError("callback not supported for sync tar functions");
|
|
78784
78785
|
return s3(a, o);
|
|
78786
|
+
} else if (Ds(a)) {
|
|
78787
|
+
let l = t(a, o);
|
|
78788
|
+
return h ? l.then(() => h(), h) : l;
|
|
78785
78789
|
} else if (Is(a)) {
|
|
78786
|
-
let l = t(a, o), c = h || void 0;
|
|
78787
|
-
return c ? l.then(() => c(), c) : l;
|
|
78788
|
-
} else if (Cs(a)) {
|
|
78789
78790
|
if (typeof h == "function") throw new TypeError("callback not supported for sync tar functions");
|
|
78790
78791
|
return e(a, o);
|
|
78791
|
-
} else if (
|
|
78792
|
+
} else if (Cs(a)) {
|
|
78792
78793
|
if (typeof h == "function") throw new TypeError("callback only supported with file option");
|
|
78793
78794
|
return i(a, o);
|
|
78794
|
-
}
|
|
78795
|
+
}
|
|
78796
|
+
throw new Error("impossible options??");
|
|
78795
78797
|
}, { syncFile: s3, asyncFile: t, syncNoFile: e, asyncNoFile: i, validate: r });
|
|
78796
|
-
var
|
|
78797
|
-
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 },
|
|
78798
|
-
var
|
|
78799
|
-
var
|
|
78800
|
-
var
|
|
78801
|
-
var
|
|
78802
|
-
import_buffer.Buffer.concat = s3 ?
|
|
78798
|
+
var Yr = 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 }, Yr));
|
|
78800
|
+
var Kr = import_buffer.Buffer.concat;
|
|
78801
|
+
var vs = Object.getOwnPropertyDescriptor(import_buffer.Buffer, "concat");
|
|
78802
|
+
var Vr = (s3) => s3;
|
|
78803
|
+
var ki = vs?.writable === true || vs?.set !== void 0 ? (s3) => {
|
|
78804
|
+
import_buffer.Buffer.concat = s3 ? Vr : Kr;
|
|
78803
78805
|
} : (s3) => {
|
|
78804
78806
|
};
|
|
78805
78807
|
var Ot = /* @__PURE__ */ Symbol("_superWrite");
|
|
@@ -78813,8 +78815,8 @@ var Gt = class extends Error {
|
|
|
78813
78815
|
return "ZlibError";
|
|
78814
78816
|
}
|
|
78815
78817
|
};
|
|
78816
|
-
var
|
|
78817
|
-
var ne = class extends
|
|
78818
|
+
var vi = /* @__PURE__ */ Symbol("flushFlag");
|
|
78819
|
+
var ne = class extends D {
|
|
78818
78820
|
#t = false;
|
|
78819
78821
|
#i = false;
|
|
78820
78822
|
#s;
|
|
@@ -78833,9 +78835,9 @@ var ne = class extends A {
|
|
|
78833
78835
|
}
|
|
78834
78836
|
constructor(t, e) {
|
|
78835
78837
|
if (!t || typeof t != "object") throw new TypeError("invalid options for ZlibBase constructor");
|
|
78836
|
-
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);
|
|
78837
78839
|
try {
|
|
78838
|
-
this.#e = new
|
|
78840
|
+
this.#e = new ks[e](t);
|
|
78839
78841
|
} catch (i) {
|
|
78840
78842
|
throw new Gt(i, this.constructor);
|
|
78841
78843
|
}
|
|
@@ -78850,7 +78852,7 @@ var ne = class extends A {
|
|
|
78850
78852
|
if (!this.#t) return (0, import_assert.default)(this.#e, "zlib binding closed"), this.#e.reset?.();
|
|
78851
78853
|
}
|
|
78852
78854
|
flush(t) {
|
|
78853
|
-
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 })));
|
|
78854
78856
|
}
|
|
78855
78857
|
end(t, e, i) {
|
|
78856
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);
|
|
@@ -78869,13 +78871,13 @@ var ne = class extends A {
|
|
|
78869
78871
|
};
|
|
78870
78872
|
let o = this.#e.close;
|
|
78871
78873
|
this.#e.close = () => {
|
|
78872
|
-
},
|
|
78874
|
+
}, ki(true);
|
|
78873
78875
|
let h;
|
|
78874
78876
|
try {
|
|
78875
|
-
let l = typeof t[
|
|
78876
|
-
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);
|
|
78877
78879
|
} catch (l) {
|
|
78878
|
-
|
|
78880
|
+
ki(false), this.#o(new Gt(l, this.write));
|
|
78879
78881
|
} finally {
|
|
78880
78882
|
this.#e && (this.#e._handle = r, r.close = n, this.#e.close = o, this.#e.removeAllListeners("error"));
|
|
78881
78883
|
}
|
|
@@ -78889,7 +78891,7 @@ var ne = class extends A {
|
|
|
78889
78891
|
return i && i(), a;
|
|
78890
78892
|
}
|
|
78891
78893
|
};
|
|
78892
|
-
var
|
|
78894
|
+
var Be = class extends ne {
|
|
78893
78895
|
#t;
|
|
78894
78896
|
#i;
|
|
78895
78897
|
constructor(t, e) {
|
|
@@ -78915,7 +78917,7 @@ var Me = class extends ne {
|
|
|
78915
78917
|
}
|
|
78916
78918
|
}
|
|
78917
78919
|
};
|
|
78918
|
-
var
|
|
78920
|
+
var Pe = class extends Be {
|
|
78919
78921
|
#t;
|
|
78920
78922
|
constructor(t) {
|
|
78921
78923
|
super(t, "Gzip"), this.#t = t && !!t.portable;
|
|
@@ -78924,87 +78926,87 @@ var Be = class extends Me {
|
|
|
78924
78926
|
return this.#t ? (this.#t = false, t[9] = 255, super[Ot](t)) : super[Ot](t);
|
|
78925
78927
|
}
|
|
78926
78928
|
};
|
|
78927
|
-
var
|
|
78929
|
+
var ze = class extends Be {
|
|
78928
78930
|
constructor(t) {
|
|
78929
78931
|
super(t, "Unzip");
|
|
78930
78932
|
}
|
|
78931
78933
|
};
|
|
78932
|
-
var
|
|
78934
|
+
var Ue = class extends ne {
|
|
78933
78935
|
constructor(t, e) {
|
|
78934
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);
|
|
78935
78937
|
}
|
|
78936
78938
|
};
|
|
78937
|
-
var
|
|
78939
|
+
var He = class extends Ue {
|
|
78938
78940
|
constructor(t) {
|
|
78939
78941
|
super(t, "BrotliCompress");
|
|
78940
78942
|
}
|
|
78941
78943
|
};
|
|
78942
|
-
var
|
|
78944
|
+
var We = class extends Ue {
|
|
78943
78945
|
constructor(t) {
|
|
78944
78946
|
super(t, "BrotliDecompress");
|
|
78945
78947
|
}
|
|
78946
78948
|
};
|
|
78947
|
-
var
|
|
78949
|
+
var Ge = class extends ne {
|
|
78948
78950
|
constructor(t, e) {
|
|
78949
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);
|
|
78950
78952
|
}
|
|
78951
78953
|
};
|
|
78952
|
-
var
|
|
78954
|
+
var Ze = class extends Ge {
|
|
78953
78955
|
constructor(t) {
|
|
78954
78956
|
super(t, "ZstdCompress");
|
|
78955
78957
|
}
|
|
78956
78958
|
};
|
|
78957
|
-
var
|
|
78959
|
+
var Ye = class extends Ge {
|
|
78958
78960
|
constructor(t) {
|
|
78959
78961
|
super(t, "ZstdDecompress");
|
|
78960
78962
|
}
|
|
78961
78963
|
};
|
|
78962
|
-
var
|
|
78963
|
-
if (Number.isSafeInteger(s3)) s3 < 0 ?
|
|
78964
|
+
var Ms = (s3, t) => {
|
|
78965
|
+
if (Number.isSafeInteger(s3)) s3 < 0 ? qr(s3, t) : Xr(s3, t);
|
|
78964
78966
|
else throw Error("cannot encode number outside of javascript safe integer range");
|
|
78965
78967
|
return t;
|
|
78966
78968
|
};
|
|
78967
|
-
var
|
|
78969
|
+
var Xr = (s3, t) => {
|
|
78968
78970
|
t[0] = 128;
|
|
78969
78971
|
for (var e = t.length; e > 1; e--) t[e - 1] = s3 & 255, s3 = Math.floor(s3 / 256);
|
|
78970
78972
|
};
|
|
78971
|
-
var
|
|
78973
|
+
var qr = (s3, t) => {
|
|
78972
78974
|
t[0] = 255;
|
|
78973
78975
|
var e = false;
|
|
78974
78976
|
s3 = s3 * -1;
|
|
78975
78977
|
for (var i = t.length; i > 1; i--) {
|
|
78976
78978
|
var r = s3 & 255;
|
|
78977
|
-
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));
|
|
78978
78980
|
}
|
|
78979
78981
|
};
|
|
78980
|
-
var
|
|
78981
|
-
let t = s3[0], e = t === 128 ?
|
|
78982
|
+
var Bs = (s3) => {
|
|
78983
|
+
let t = s3[0], e = t === 128 ? Qr(s3.subarray(1, s3.length)) : t === 255 ? jr(s3) : null;
|
|
78982
78984
|
if (e === null) throw Error("invalid base256 encoding");
|
|
78983
78985
|
if (!Number.isSafeInteger(e)) throw Error("parsed number outside of javascript safe integer range");
|
|
78984
78986
|
return e;
|
|
78985
78987
|
};
|
|
78986
|
-
var
|
|
78988
|
+
var jr = (s3) => {
|
|
78987
78989
|
for (var t = s3.length, e = 0, i = false, r = t - 1; r > -1; r--) {
|
|
78988
78990
|
var n = Number(s3[r]), o;
|
|
78989
|
-
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));
|
|
78990
78992
|
}
|
|
78991
78993
|
return e;
|
|
78992
78994
|
};
|
|
78993
|
-
var
|
|
78995
|
+
var Qr = (s3) => {
|
|
78994
78996
|
for (var t = s3.length, e = 0, i = t - 1; i > -1; i--) {
|
|
78995
78997
|
var r = Number(s3[i]);
|
|
78996
78998
|
r !== 0 && (e += r * Math.pow(256, t - i - 1));
|
|
78997
78999
|
}
|
|
78998
79000
|
return e;
|
|
78999
79001
|
};
|
|
79000
|
-
var
|
|
79001
|
-
var
|
|
79002
|
-
var
|
|
79003
|
-
Ar(
|
|
79002
|
+
var Ps = (s3) => (255 ^ s3) & 255;
|
|
79003
|
+
var zs = (s3) => (255 ^ s3) + 1 & 255;
|
|
79004
|
+
var Bi = {};
|
|
79005
|
+
Ar(Bi, { code: () => Ke, isCode: () => oe, isName: () => tn, name: () => he });
|
|
79004
79006
|
var oe = (s3) => he.has(s3);
|
|
79005
|
-
var
|
|
79007
|
+
var tn = (s3) => Ke.has(s3);
|
|
79006
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"]]);
|
|
79007
|
-
var
|
|
79009
|
+
var Ke = new Map(Array.from(he).map((s3) => [s3[1], s3[0]]));
|
|
79008
79010
|
var F = class {
|
|
79009
79011
|
cksumValid = false;
|
|
79010
79012
|
needPax = false;
|
|
@@ -79032,14 +79034,14 @@ var F = class {
|
|
|
79032
79034
|
}
|
|
79033
79035
|
decode(t, e, i, r) {
|
|
79034
79036
|
if (e || (e = 0), !t || !(t.length >= e + 512)) throw new Error("need 512 bytes for header");
|
|
79035
|
-
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);
|
|
79036
79038
|
let n = Tt(t, e + 156, 1);
|
|
79037
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) {
|
|
79038
79040
|
let h = Tt(t, e + 345, 155);
|
|
79039
79041
|
this.path = h + "/" + this.path;
|
|
79040
79042
|
} else {
|
|
79041
79043
|
let h = Tt(t, e + 345, 130);
|
|
79042
|
-
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);
|
|
79043
79045
|
}
|
|
79044
79046
|
let o = 256;
|
|
79045
79047
|
for (let h = e; h < e + 148; h++) o += t[h];
|
|
@@ -79051,8 +79053,8 @@ var F = class {
|
|
|
79051
79053
|
}
|
|
79052
79054
|
encode(t, e = 0) {
|
|
79053
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");
|
|
79054
|
-
let i = this.ctime || this.atime ? 130 : 155, r =
|
|
79055
|
-
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 = en(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);
|
|
79056
79058
|
let h = 256;
|
|
79057
79059
|
for (let a = e; a < e + 148; a++) h += t[a];
|
|
79058
79060
|
for (let a = e + 156; a < e + 512; a++) h += t[a];
|
|
@@ -79065,13 +79067,13 @@ var F = class {
|
|
|
79065
79067
|
return this.#t;
|
|
79066
79068
|
}
|
|
79067
79069
|
set type(t) {
|
|
79068
|
-
let e = String(
|
|
79070
|
+
let e = String(Ke.get(t));
|
|
79069
79071
|
if (oe(e) || e === "Unsupported") this.#t = e;
|
|
79070
79072
|
else if (oe(t)) this.#t = t;
|
|
79071
79073
|
else throw new TypeError("invalid entry type: " + t);
|
|
79072
79074
|
}
|
|
79073
79075
|
};
|
|
79074
|
-
var
|
|
79076
|
+
var en = (s3, t) => {
|
|
79075
79077
|
let i = s3, r = "", n, o = import_node_path2.posix.parse(s3).root || ".";
|
|
79076
79078
|
if (Buffer.byteLength(i) < 100) n = [i, r, false];
|
|
79077
79079
|
else {
|
|
@@ -79084,19 +79086,19 @@ var sn = (s3, t) => {
|
|
|
79084
79086
|
return n;
|
|
79085
79087
|
};
|
|
79086
79088
|
var Tt = (s3, t, e) => s3.subarray(t, t + e).toString("utf8").replace(/\0.*/, "");
|
|
79087
|
-
var
|
|
79088
|
-
var
|
|
79089
|
-
var at = (s3, t, e) => Number(s3[t]) & 128 ?
|
|
79090
|
-
var
|
|
79091
|
-
var
|
|
79092
|
-
var
|
|
79093
|
-
var lt = (s3, t, e, i) => i === void 0 ? false : i >
|
|
79094
|
-
var
|
|
79095
|
-
var
|
|
79096
|
-
var
|
|
79097
|
-
var
|
|
79098
|
-
var
|
|
79099
|
-
var xt = (s3, t, e, i) => i === void 0 ? false : (s3.write(i +
|
|
79089
|
+
var Pi = (s3, t, e) => sn(at(s3, t, e));
|
|
79090
|
+
var sn = (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)) : nn(s3, t, e);
|
|
79092
|
+
var rn = (s3) => isNaN(s3) ? void 0 : s3;
|
|
79093
|
+
var nn = (s3, t, e) => rn(parseInt(s3.subarray(t, t + e).toString("utf8").replace(/\0.*$/, "").trim(), 8));
|
|
79094
|
+
var on = { 12: 8589934591, 8: 2097151 };
|
|
79095
|
+
var lt = (s3, t, e, i) => i === void 0 ? false : i > on[e] || i < 0 ? (Ms(i, s3.subarray(t, t + e)), true) : (hn(s3, t, e, i), false);
|
|
79096
|
+
var hn = (s3, t, e, i) => s3.write(an(i, e), t, e, "ascii");
|
|
79097
|
+
var an = (s3, t) => ln(Math.floor(s3).toString(8), t);
|
|
79098
|
+
var ln = (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 cn = new Array(156).join("\0");
|
|
79101
|
+
var xt = (s3, t, e, i) => i === void 0 ? false : (s3.write(i + cn, t, e, "utf8"), i.length !== Buffer.byteLength(i) || i.length > e);
|
|
79100
79102
|
var ct = class s {
|
|
79101
79103
|
atime;
|
|
79102
79104
|
mtime;
|
|
@@ -79137,13 +79139,13 @@ var ct = class s {
|
|
|
79137
79139
|
return n + o >= Math.pow(10, o) && (o += 1), o + n + r;
|
|
79138
79140
|
}
|
|
79139
79141
|
static parse(t, e, i = false) {
|
|
79140
|
-
return new s(un(
|
|
79142
|
+
return new s(dn(un(t), e), i);
|
|
79141
79143
|
}
|
|
79142
79144
|
};
|
|
79143
|
-
var
|
|
79144
|
-
var
|
|
79145
|
-
`).reduce(
|
|
79146
|
-
var
|
|
79145
|
+
var dn = (s3, t) => t ? Object.assign({}, t, s3) : s3;
|
|
79146
|
+
var un = (s3) => s3.replace(/\n$/, "").split(`
|
|
79147
|
+
`).reduce(mn, /* @__PURE__ */ Object.create(null));
|
|
79148
|
+
var mn = (s3, t) => {
|
|
79147
79149
|
let e = parseInt(t, 10);
|
|
79148
79150
|
if (e !== Buffer.byteLength(t) + 1) return s3;
|
|
79149
79151
|
t = t.slice((e + " ").length);
|
|
@@ -79152,9 +79154,9 @@ var pn = (s3, t) => {
|
|
|
79152
79154
|
let n = r.replace(/^SCHILY\.(dev|ino|nlink)/, "$1"), o = i.join("=");
|
|
79153
79155
|
return s3[n] = /^([A-Z]+\.)?([mac]|birth|creation)time$/.test(n) ? new Date(Number(o) * 1e3) : /^[0-9]+$/.test(o) ? +o : o, s3;
|
|
79154
79156
|
};
|
|
79155
|
-
var
|
|
79156
|
-
var f =
|
|
79157
|
-
var Yt = class extends
|
|
79157
|
+
var pn = process.env.TESTING_TAR_FAKE_PLATFORM || process.platform;
|
|
79158
|
+
var f = pn !== "win32" ? (s3) => s3 : (s3) => s3 && s3.replaceAll(/\\/g, "/");
|
|
79159
|
+
var Yt = class extends D {
|
|
79158
79160
|
extended;
|
|
79159
79161
|
globalExtended;
|
|
79160
79162
|
header;
|
|
@@ -79221,41 +79223,41 @@ var Yt = class extends A {
|
|
|
79221
79223
|
var Lt = (s3, t, e, i = {}) => {
|
|
79222
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));
|
|
79223
79225
|
};
|
|
79224
|
-
var
|
|
79225
|
-
var
|
|
79226
|
-
var
|
|
79227
|
-
var
|
|
79226
|
+
var wn = 1024 * 1024;
|
|
79227
|
+
var Zi = Buffer.from([31, 139]);
|
|
79228
|
+
var Yi = Buffer.from([40, 181, 47, 253]);
|
|
79229
|
+
var Sn = Math.max(Zi.length, Yi.length);
|
|
79228
79230
|
var B = /* @__PURE__ */ Symbol("state");
|
|
79229
79231
|
var Nt = /* @__PURE__ */ Symbol("writeEntry");
|
|
79230
79232
|
var et = /* @__PURE__ */ Symbol("readEntry");
|
|
79231
|
-
var
|
|
79232
|
-
var
|
|
79233
|
+
var Ui = /* @__PURE__ */ Symbol("nextEntry");
|
|
79234
|
+
var Us = /* @__PURE__ */ Symbol("processEntry");
|
|
79233
79235
|
var V = /* @__PURE__ */ Symbol("extendedHeader");
|
|
79234
79236
|
var ae = /* @__PURE__ */ Symbol("globalExtendedHeader");
|
|
79235
79237
|
var ft = /* @__PURE__ */ Symbol("meta");
|
|
79236
|
-
var
|
|
79238
|
+
var Hs = /* @__PURE__ */ Symbol("emitMeta");
|
|
79237
79239
|
var p = /* @__PURE__ */ Symbol("buffer");
|
|
79238
79240
|
var it = /* @__PURE__ */ Symbol("queue");
|
|
79239
79241
|
var dt = /* @__PURE__ */ Symbol("ended");
|
|
79240
|
-
var
|
|
79241
|
-
var
|
|
79242
|
+
var Hi = /* @__PURE__ */ Symbol("emittedEnd");
|
|
79243
|
+
var At = /* @__PURE__ */ Symbol("emit");
|
|
79242
79244
|
var y = /* @__PURE__ */ Symbol("unzip");
|
|
79243
|
-
var
|
|
79244
|
-
var
|
|
79245
|
-
var
|
|
79246
|
-
var
|
|
79247
|
-
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");
|
|
79248
79250
|
var le = /* @__PURE__ */ Symbol("consuming");
|
|
79249
|
-
var
|
|
79250
|
-
var
|
|
79251
|
+
var Gi = /* @__PURE__ */ Symbol("bufferConcat");
|
|
79252
|
+
var Xe = /* @__PURE__ */ Symbol("maybeEnd");
|
|
79251
79253
|
var Kt = /* @__PURE__ */ Symbol("writing");
|
|
79252
79254
|
var ut = /* @__PURE__ */ Symbol("aborted");
|
|
79253
|
-
var
|
|
79254
|
-
var
|
|
79255
|
-
var
|
|
79256
|
-
var
|
|
79257
|
-
var
|
|
79258
|
-
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 yn = () => true;
|
|
79259
79261
|
var st = class extends import_events2.EventEmitter {
|
|
79260
79262
|
file;
|
|
79261
79263
|
strict;
|
|
@@ -79276,36 +79278,36 @@ var st = class extends import_events2.EventEmitter {
|
|
|
79276
79278
|
[dt] = false;
|
|
79277
79279
|
[y];
|
|
79278
79280
|
[ut] = false;
|
|
79279
|
-
[
|
|
79280
|
-
[qe] = false;
|
|
79281
|
+
[Dt];
|
|
79281
79282
|
[je] = false;
|
|
79283
|
+
[Qe] = false;
|
|
79282
79284
|
[Kt] = false;
|
|
79283
79285
|
[le] = false;
|
|
79284
|
-
[
|
|
79286
|
+
[Hi] = false;
|
|
79285
79287
|
constructor(t = {}) {
|
|
79286
|
-
super(), this.file = t.file || "", this.on(
|
|
79287
|
-
(this[B] === "begin" || this[
|
|
79288
|
-
}), 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, () => {
|
|
79289
79291
|
this.emit("prefinish"), this.emit("finish"), this.emit("end");
|
|
79290
|
-
}), this.strict = !!t.strict, this.maxMetaEntrySize = t.maxMetaEntrySize ||
|
|
79292
|
+
}), this.strict = !!t.strict, this.maxMetaEntrySize = t.maxMetaEntrySize || wn, this.filter = typeof t.filter == "function" ? t.filter : yn;
|
|
79291
79293
|
let e = t.file && (t.file.endsWith(".tar.br") || t.file.endsWith(".tbr"));
|
|
79292
79294
|
this.brotli = !(t.gzip || t.zstd) && t.brotli !== void 0 ? t.brotli : e ? void 0 : false;
|
|
79293
79295
|
let i = t.file && (t.file.endsWith(".tar.zst") || t.file.endsWith(".tzst"));
|
|
79294
|
-
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);
|
|
79295
79297
|
}
|
|
79296
79298
|
warn(t, e, i = {}) {
|
|
79297
79299
|
Lt(this, t, e, i);
|
|
79298
79300
|
}
|
|
79299
|
-
[
|
|
79300
|
-
this[
|
|
79301
|
+
[Gs](t, e) {
|
|
79302
|
+
this[Dt] === void 0 && (this[Dt] = false);
|
|
79301
79303
|
let i;
|
|
79302
79304
|
try {
|
|
79303
79305
|
i = new F(t, e, this[V], this[ae]);
|
|
79304
79306
|
} catch (r) {
|
|
79305
79307
|
return this.warn("TAR_ENTRY_INVALID", r);
|
|
79306
79308
|
}
|
|
79307
|
-
if (i.nullBlock) this[
|
|
79308
|
-
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 });
|
|
79309
79311
|
else if (!i.path) this.warn("TAR_ENTRY_INVALID", "path is required", { header: i });
|
|
79310
79312
|
else {
|
|
79311
79313
|
let r = i.type;
|
|
@@ -79313,52 +79315,52 @@ var st = class extends import_events2.EventEmitter {
|
|
|
79313
79315
|
else if (!/^(Symbolic)?Link$/.test(r) && !/^(Global)?ExtendedHeader$/.test(r) && i.linkpath) this.warn("TAR_ENTRY_INVALID", "linkpath forbidden", { header: i });
|
|
79314
79316
|
else {
|
|
79315
79317
|
let n = this[Nt] = new Yt(i, this[V], this[ae]);
|
|
79316
|
-
if (!this[
|
|
79318
|
+
if (!this[Dt]) if (n.remain) {
|
|
79317
79319
|
let o = () => {
|
|
79318
|
-
n.invalid || (this[
|
|
79320
|
+
n.invalid || (this[Dt] = true);
|
|
79319
79321
|
};
|
|
79320
79322
|
n.on("end", o);
|
|
79321
|
-
} else this[
|
|
79322
|
-
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]())));
|
|
79323
79325
|
}
|
|
79324
79326
|
}
|
|
79325
79327
|
}
|
|
79326
|
-
[
|
|
79328
|
+
[Zs]() {
|
|
79327
79329
|
queueMicrotask(() => this.emit("close"));
|
|
79328
79330
|
}
|
|
79329
|
-
[
|
|
79331
|
+
[Us](t) {
|
|
79330
79332
|
let e = true;
|
|
79331
79333
|
if (!t) this[et] = void 0, e = false;
|
|
79332
79334
|
else if (Array.isArray(t)) {
|
|
79333
79335
|
let [i, ...r] = t;
|
|
79334
79336
|
this.emit(i, ...r);
|
|
79335
|
-
} 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);
|
|
79336
79338
|
return e;
|
|
79337
79339
|
}
|
|
79338
|
-
[
|
|
79340
|
+
[Ui]() {
|
|
79339
79341
|
do
|
|
79340
79342
|
;
|
|
79341
|
-
while (this[
|
|
79342
|
-
if (
|
|
79343
|
+
while (this[Us](this[it].shift()));
|
|
79344
|
+
if (this[it].length === 0) {
|
|
79343
79345
|
let t = this[et];
|
|
79344
79346
|
!t || t.flowing || t.size === t.remain ? this[Kt] || this.emit("drain") : t.once("drain", () => this.emit("drain"));
|
|
79345
79347
|
}
|
|
79346
79348
|
}
|
|
79347
|
-
[
|
|
79349
|
+
[Wi](t, e) {
|
|
79348
79350
|
let i = this[Nt];
|
|
79349
79351
|
if (!i) throw new Error("attempt to consume body without entry??");
|
|
79350
79352
|
let r = i.blockRemain ?? 0, n = r >= t.length && e === 0 ? t : t.subarray(e, e + r);
|
|
79351
79353
|
return i.write(n), i.blockRemain || (this[B] = "header", this[Nt] = void 0, i.end()), n.length;
|
|
79352
79354
|
}
|
|
79353
|
-
[
|
|
79354
|
-
let i = this[Nt], r = this[
|
|
79355
|
-
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;
|
|
79356
79358
|
}
|
|
79357
|
-
[
|
|
79358
|
-
|
|
79359
|
+
[At](t, e, i) {
|
|
79360
|
+
this[it].length === 0 && !this[et] ? this.emit(t, e, i) : this[it].push([t, e, i]);
|
|
79359
79361
|
}
|
|
79360
|
-
[
|
|
79361
|
-
switch (this[
|
|
79362
|
+
[Hs](t) {
|
|
79363
|
+
switch (this[At]("meta", this[ft]), t.type) {
|
|
79362
79364
|
case "ExtendedHeader":
|
|
79363
79365
|
case "OldExtendedHeader":
|
|
79364
79366
|
this[V] = ct.parse(this[ft], this[V], false);
|
|
@@ -79387,12 +79389,12 @@ var st = class extends import_events2.EventEmitter {
|
|
|
79387
79389
|
write(t, e, i) {
|
|
79388
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;
|
|
79389
79391
|
if ((this[y] === void 0 || this.brotli === void 0 && this[y] === false) && t) {
|
|
79390
|
-
if (this[p] && (t = Buffer.concat([this[p], t]), this[p] = void 0), t.length <
|
|
79391
|
-
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 < Sn) 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);
|
|
79392
79394
|
let o = false;
|
|
79393
79395
|
if (this[y] === false && this.zstd !== false) {
|
|
79394
79396
|
o = true;
|
|
79395
|
-
for (let a = 0; a <
|
|
79397
|
+
for (let a = 0; a < Yi.length; a++) if (t[a] !== Yi[a]) {
|
|
79396
79398
|
o = false;
|
|
79397
79399
|
break;
|
|
79398
79400
|
}
|
|
@@ -79407,69 +79409,69 @@ var st = class extends import_events2.EventEmitter {
|
|
|
79407
79409
|
}
|
|
79408
79410
|
if (this[y] === void 0 || this[y] === false && (this.brotli || o)) {
|
|
79409
79411
|
let a = this[dt];
|
|
79410
|
-
this[dt] = false, this[y] = this[y] === void 0 ? new
|
|
79411
|
-
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]();
|
|
79412
79414
|
}), this[Kt] = true;
|
|
79413
79415
|
let l = !!this[y][a ? "end" : "write"](t);
|
|
79414
79416
|
return this[Kt] = false, i?.(), l;
|
|
79415
79417
|
}
|
|
79416
79418
|
}
|
|
79417
|
-
this[Kt] = true, this[y] ? this[y].write(t) : this[
|
|
79418
|
-
let n = this[it].length ? false : this[et] ? this[et].flowing : true;
|
|
79419
|
-
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;
|
|
79420
79422
|
}
|
|
79421
|
-
[
|
|
79423
|
+
[Gi](t) {
|
|
79422
79424
|
t && !this[ut] && (this[p] = this[p] ? Buffer.concat([this[p], t]) : t);
|
|
79423
79425
|
}
|
|
79424
|
-
[
|
|
79425
|
-
if (this[dt] && !this[
|
|
79426
|
-
this[
|
|
79426
|
+
[Xe]() {
|
|
79427
|
+
if (this[dt] && !this[Hi] && !this[ut] && !this[le]) {
|
|
79428
|
+
this[Hi] = true;
|
|
79427
79429
|
let t = this[Nt];
|
|
79428
79430
|
if (t && t.blockRemain) {
|
|
79429
79431
|
let e = this[p] ? this[p].length : 0;
|
|
79430
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();
|
|
79431
79433
|
}
|
|
79432
|
-
this[
|
|
79434
|
+
this[At](qe);
|
|
79433
79435
|
}
|
|
79434
79436
|
}
|
|
79435
|
-
[
|
|
79436
|
-
if (this[le] && t) this[
|
|
79437
|
-
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]();
|
|
79438
79440
|
else if (t) {
|
|
79439
79441
|
if (this[le] = true, this[p]) {
|
|
79440
|
-
this[
|
|
79442
|
+
this[Gi](t);
|
|
79441
79443
|
let e = this[p];
|
|
79442
|
-
this[p] = void 0, this[
|
|
79443
|
-
} else this[
|
|
79444
|
-
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]; ) {
|
|
79445
79447
|
let e = this[p];
|
|
79446
|
-
this[p] = void 0, this[
|
|
79448
|
+
this[p] = void 0, this[$e](e);
|
|
79447
79449
|
}
|
|
79448
79450
|
this[le] = false;
|
|
79449
79451
|
}
|
|
79450
|
-
(!this[p] || this[dt]) && this[
|
|
79452
|
+
(!this[p] || this[dt]) && this[Xe]();
|
|
79451
79453
|
}
|
|
79452
|
-
[
|
|
79454
|
+
[$e](t) {
|
|
79453
79455
|
let e = 0, i = t.length;
|
|
79454
|
-
for (; e + 512 <= i && !this[ut] && !this[
|
|
79456
|
+
for (; e + 512 <= i && !this[ut] && !this[Qe]; ) switch (this[B]) {
|
|
79455
79457
|
case "begin":
|
|
79456
79458
|
case "header":
|
|
79457
|
-
this[
|
|
79459
|
+
this[Gs](t, e), e += 512;
|
|
79458
79460
|
break;
|
|
79459
79461
|
case "ignore":
|
|
79460
79462
|
case "body":
|
|
79461
|
-
e += this[
|
|
79463
|
+
e += this[Wi](t, e);
|
|
79462
79464
|
break;
|
|
79463
79465
|
case "meta":
|
|
79464
|
-
e += this[
|
|
79466
|
+
e += this[Ws](t, e);
|
|
79465
79467
|
break;
|
|
79466
79468
|
default:
|
|
79467
79469
|
throw new Error("invalid state: " + this[B]);
|
|
79468
79470
|
}
|
|
79469
|
-
e < i && (this[p]
|
|
79471
|
+
e < i && (this[p] = this[p] ? Buffer.concat([t.subarray(e), this[p]]) : t.subarray(e));
|
|
79470
79472
|
}
|
|
79471
79473
|
end(t, e, i) {
|
|
79472
|
-
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;
|
|
79473
79475
|
}
|
|
79474
79476
|
};
|
|
79475
79477
|
var mt = (s3) => {
|
|
@@ -79483,19 +79485,19 @@ var _n = (s3) => {
|
|
|
79483
79485
|
t(e), e.resume();
|
|
79484
79486
|
} : (e) => e.resume();
|
|
79485
79487
|
};
|
|
79486
|
-
var
|
|
79488
|
+
var Ki = (s3, t) => {
|
|
79487
79489
|
let e = new Map(t.map((n) => [mt(n), true])), i = s3.filter, r = (n, o = "") => {
|
|
79488
79490
|
let h = o || (0, import_path2.parse)(n).root || ".", a;
|
|
79489
79491
|
if (n === h) a = false;
|
|
79490
79492
|
else {
|
|
79491
79493
|
let l = e.get(n);
|
|
79492
|
-
l !== void 0 ?
|
|
79494
|
+
a = l !== void 0 ? l : r((0, import_path2.dirname)(n), h);
|
|
79493
79495
|
}
|
|
79494
79496
|
return e.set(n, a), a;
|
|
79495
79497
|
};
|
|
79496
79498
|
s3.filter = i ? (n, o) => i(n, o) && r(mt(n)) : (n) => r(mt(n));
|
|
79497
79499
|
};
|
|
79498
|
-
var
|
|
79500
|
+
var gn = (s3) => {
|
|
79499
79501
|
let t = new st(s3), e = s3.file, i;
|
|
79500
79502
|
try {
|
|
79501
79503
|
i = import_node_fs.default.openSync(e, "r");
|
|
@@ -79519,58 +79521,58 @@ var On = (s3) => {
|
|
|
79519
79521
|
}
|
|
79520
79522
|
}
|
|
79521
79523
|
};
|
|
79522
|
-
var
|
|
79524
|
+
var On = (s3, t) => {
|
|
79523
79525
|
let e = new st(s3), i = s3.maxReadSize || 16 * 1024 * 1024, r = s3.file;
|
|
79524
79526
|
return new Promise((o, h) => {
|
|
79525
79527
|
e.on("error", h), e.on("end", o), import_node_fs.default.stat(r, (a, l) => {
|
|
79526
79528
|
if (a) h(a);
|
|
79527
79529
|
else {
|
|
79528
|
-
let c = new
|
|
79530
|
+
let c = new _t(r, { readSize: i, size: l.size });
|
|
79529
79531
|
c.on("error", h), c.pipe(e);
|
|
79530
79532
|
}
|
|
79531
79533
|
});
|
|
79532
79534
|
});
|
|
79533
79535
|
};
|
|
79534
|
-
var It = K(
|
|
79535
|
-
t?.length &&
|
|
79536
|
+
var It = K(gn, On, (s3) => new st(s3), (s3) => new st(s3), (s3, t) => {
|
|
79537
|
+
t?.length && Ki(s3, t), s3.noResume || _n(s3);
|
|
79536
79538
|
});
|
|
79537
|
-
var
|
|
79538
|
-
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: xn, parse: Ys } = import_node_path4.win32;
|
|
79539
79541
|
var ce = (s3) => {
|
|
79540
|
-
let t = "", e =
|
|
79541
|
-
for (;
|
|
79542
|
+
let t = "", e = Ys(s3);
|
|
79543
|
+
for (; xn(s3) || e.root; ) {
|
|
79542
79544
|
let i = s3.charAt(0) === "/" && s3.slice(0, 4) !== "//?/" ? "/" : e.root;
|
|
79543
|
-
s3 = s3.slice(i.length), t += i, e =
|
|
79545
|
+
s3 = s3.slice(i.length), t += i, e = Ys(s3);
|
|
79544
79546
|
}
|
|
79545
79547
|
return [t, s3];
|
|
79546
79548
|
};
|
|
79547
|
-
var
|
|
79548
|
-
var
|
|
79549
|
-
var
|
|
79550
|
-
var
|
|
79551
|
-
var
|
|
79552
|
-
var
|
|
79553
|
-
var
|
|
79549
|
+
var Je = ["|", "<", ">", "?", ":"];
|
|
79550
|
+
var $i = Je.map((s3) => String.fromCodePoint(61440 + Number(s3.codePointAt(0))));
|
|
79551
|
+
var Ln = new Map(Je.map((s3, t) => [s3, $i[t]]));
|
|
79552
|
+
var Nn = new Map($i.map((s3, t) => [s3, Je[t]]));
|
|
79553
|
+
var Xi = (s3) => Je.reduce((t, e) => t.split(e).join(Ln.get(e)), s3);
|
|
79554
|
+
var Ks = (s3) => $i.reduce((t, e) => t.split(e).join(Nn.get(e)), s3);
|
|
79555
|
+
var Js = (s3, t) => t ? (s3 = f(s3).replace(/^\.(\/|$)/, ""), mt(t) + "/" + s3) : f(s3);
|
|
79554
79556
|
var An = 16 * 1024 * 1024;
|
|
79555
|
-
var
|
|
79556
|
-
var
|
|
79557
|
-
var
|
|
79558
|
-
var
|
|
79559
|
-
var
|
|
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");
|
|
79560
79562
|
var fe = /* @__PURE__ */ Symbol("header");
|
|
79561
|
-
var
|
|
79562
|
-
var
|
|
79563
|
-
var
|
|
79564
|
-
var
|
|
79565
|
-
var
|
|
79566
|
-
var
|
|
79567
|
-
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");
|
|
79568
79570
|
var pt = /* @__PURE__ */ Symbol("close");
|
|
79569
|
-
var
|
|
79570
|
-
var
|
|
79571
|
-
var
|
|
79571
|
+
var ii = /* @__PURE__ */ Symbol("mode");
|
|
79572
|
+
var ss = /* @__PURE__ */ Symbol("awaitDrain");
|
|
79573
|
+
var qi = /* @__PURE__ */ Symbol("ondrain");
|
|
79572
79574
|
var X = /* @__PURE__ */ Symbol("prefix");
|
|
79573
|
-
var de = class extends
|
|
79575
|
+
var de = class extends D {
|
|
79574
79576
|
path;
|
|
79575
79577
|
portable;
|
|
79576
79578
|
myuid = process.getuid && process.getuid() || 0;
|
|
@@ -79609,9 +79611,9 @@ var de = class extends A {
|
|
|
79609
79611
|
let [o, h] = ce(this.path);
|
|
79610
79612
|
o && typeof h == "string" && (this.path = h, r = o);
|
|
79611
79613
|
}
|
|
79612
|
-
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 });
|
|
79613
79615
|
let n = this.statCache.get(this.absolute);
|
|
79614
|
-
n ? this[
|
|
79616
|
+
n ? this[ei](n) : this[Qi]();
|
|
79615
79617
|
}
|
|
79616
79618
|
warn(t, e, i = {}) {
|
|
79617
79619
|
return Lt(this, t, e, i);
|
|
@@ -79619,93 +79621,93 @@ var de = class extends A {
|
|
|
79619
79621
|
emit(t, ...e) {
|
|
79620
79622
|
return t === "error" && (this.#t = true), super.emit(t, ...e);
|
|
79621
79623
|
}
|
|
79622
|
-
[
|
|
79624
|
+
[Qi]() {
|
|
79623
79625
|
import_fs4.default.lstat(this.absolute, (t, e) => {
|
|
79624
79626
|
if (t) return this.emit("error", t);
|
|
79625
|
-
this[
|
|
79627
|
+
this[ei](e);
|
|
79626
79628
|
});
|
|
79627
79629
|
}
|
|
79628
|
-
[
|
|
79629
|
-
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 = Dn(t), this.emit("stat", t), this[Xs]();
|
|
79630
79632
|
}
|
|
79631
|
-
[
|
|
79633
|
+
[Xs]() {
|
|
79632
79634
|
switch (this.type) {
|
|
79633
79635
|
case "File":
|
|
79634
|
-
return this[
|
|
79636
|
+
return this[qs]();
|
|
79635
79637
|
case "Directory":
|
|
79636
|
-
return this[
|
|
79638
|
+
return this[js]();
|
|
79637
79639
|
case "SymbolicLink":
|
|
79638
|
-
return this[
|
|
79640
|
+
return this[ji]();
|
|
79639
79641
|
default:
|
|
79640
79642
|
return this.end();
|
|
79641
79643
|
}
|
|
79642
79644
|
}
|
|
79643
|
-
[
|
|
79644
|
-
return
|
|
79645
|
+
[ii](t) {
|
|
79646
|
+
return Vi(t, this.type === "Directory", this.portable);
|
|
79645
79647
|
}
|
|
79646
79648
|
[X](t) {
|
|
79647
|
-
return
|
|
79649
|
+
return Js(t, this.prefix);
|
|
79648
79650
|
}
|
|
79649
79651
|
[fe]() {
|
|
79650
79652
|
if (!this.stat) throw new Error("cannot write header before stat");
|
|
79651
|
-
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());
|
|
79652
79654
|
let t = this.header?.block;
|
|
79653
79655
|
if (!t) throw new Error("failed to encode header");
|
|
79654
79656
|
super.write(t);
|
|
79655
79657
|
}
|
|
79656
|
-
[
|
|
79658
|
+
[js]() {
|
|
79657
79659
|
if (!this.stat) throw new Error("cannot create directory entry without stat");
|
|
79658
79660
|
this.path.slice(-1) !== "/" && (this.path += "/"), this.stat.size = 0, this[fe](), this.end();
|
|
79659
79661
|
}
|
|
79660
|
-
[
|
|
79662
|
+
[ji]() {
|
|
79661
79663
|
import_fs4.default.readlink(this.absolute, (t, e) => {
|
|
79662
79664
|
if (t) return this.emit("error", t);
|
|
79663
|
-
this[
|
|
79665
|
+
this[ts](e);
|
|
79664
79666
|
});
|
|
79665
79667
|
}
|
|
79666
|
-
[
|
|
79668
|
+
[ts](t) {
|
|
79667
79669
|
this.linkpath = f(t), this[fe](), this.end();
|
|
79668
79670
|
}
|
|
79669
|
-
[
|
|
79671
|
+
[Qs](t) {
|
|
79670
79672
|
if (!this.stat) throw new Error("cannot create link entry without stat");
|
|
79671
79673
|
this.type = "Link", this.linkpath = f(import_path3.default.relative(this.cwd, t)), this.stat.size = 0, this[fe](), this.end();
|
|
79672
79674
|
}
|
|
79673
|
-
[
|
|
79675
|
+
[qs]() {
|
|
79674
79676
|
if (!this.stat) throw new Error("cannot create file entry without stat");
|
|
79675
79677
|
if (this.stat.nlink > 1) {
|
|
79676
79678
|
let t = `${this.stat.dev}:${this.stat.ino}`, e = this.linkCache.get(t);
|
|
79677
|
-
if (e?.indexOf(this.cwd) === 0) return this[
|
|
79679
|
+
if (e?.indexOf(this.cwd) === 0) return this[Qs](e);
|
|
79678
79680
|
this.linkCache.set(t, this.absolute);
|
|
79679
79681
|
}
|
|
79680
79682
|
if (this[fe](), this.stat.size === 0) return this.end();
|
|
79681
|
-
this[
|
|
79683
|
+
this[es]();
|
|
79682
79684
|
}
|
|
79683
|
-
[
|
|
79685
|
+
[es]() {
|
|
79684
79686
|
import_fs4.default.open(this.absolute, "r", (t, e) => {
|
|
79685
79687
|
if (t) return this.emit("error", t);
|
|
79686
|
-
this[
|
|
79688
|
+
this[is](e);
|
|
79687
79689
|
});
|
|
79688
79690
|
}
|
|
79689
|
-
[
|
|
79691
|
+
[is](t) {
|
|
79690
79692
|
if (this.fd = t, this.#t) return this[pt]();
|
|
79691
79693
|
if (!this.stat) throw new Error("should stat before calling onopenfile");
|
|
79692
79694
|
this.blockLen = 512 * Math.ceil(this.stat.size / 512), this.blockRemain = this.blockLen;
|
|
79693
79695
|
let e = Math.min(this.blockLen, this.maxReadSize);
|
|
79694
|
-
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]();
|
|
79695
79697
|
}
|
|
79696
|
-
[
|
|
79698
|
+
[ti]() {
|
|
79697
79699
|
let { fd: t, buf: e, offset: i, length: r, pos: n } = this;
|
|
79698
79700
|
if (t === void 0 || e === void 0) throw new Error("cannot read file without first opening");
|
|
79699
79701
|
import_fs4.default.read(t, e, i, r, n, (o, h) => {
|
|
79700
79702
|
if (o) return this[pt](() => this.emit("error", o));
|
|
79701
|
-
this[
|
|
79703
|
+
this[Ji](h);
|
|
79702
79704
|
});
|
|
79703
79705
|
}
|
|
79704
79706
|
[pt](t = () => {
|
|
79705
79707
|
}) {
|
|
79706
79708
|
this.fd !== void 0 && import_fs4.default.close(this.fd, t);
|
|
79707
79709
|
}
|
|
79708
|
-
[
|
|
79710
|
+
[Ji](t) {
|
|
79709
79711
|
if (t <= 0 && this.remain > 0) {
|
|
79710
79712
|
let r = Object.assign(new Error("encountered unexpected EOF"), { path: this.absolute, syscall: "read", code: "EOF" });
|
|
79711
79713
|
return this[pt](() => this.emit("error", r));
|
|
@@ -79717,9 +79719,9 @@ var de = class extends A {
|
|
|
79717
79719
|
if (!this.buf) throw new Error("should have created buffer prior to reading");
|
|
79718
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++;
|
|
79719
79721
|
let e = this.offset === 0 && t === this.buf.length ? this.buf : this.buf.subarray(this.offset, this.offset + t);
|
|
79720
|
-
this.write(e) ? this[
|
|
79722
|
+
this.write(e) ? this[qi]() : this[ss](() => this[qi]());
|
|
79721
79723
|
}
|
|
79722
|
-
[
|
|
79724
|
+
[ss](t) {
|
|
79723
79725
|
this.once("drain", t);
|
|
79724
79726
|
}
|
|
79725
79727
|
write(t, e, i) {
|
|
@@ -79729,30 +79731,30 @@ var de = class extends A {
|
|
|
79729
79731
|
}
|
|
79730
79732
|
return this.remain -= t.length, this.blockRemain -= t.length, this.pos += t.length, this.offset += t.length, super.write(t, null, i);
|
|
79731
79733
|
}
|
|
79732
|
-
[
|
|
79734
|
+
[qi]() {
|
|
79733
79735
|
if (!this.remain) return this.blockRemain && super.write(Buffer.alloc(this.blockRemain)), this[pt]((t) => t ? this.emit("error", t) : this.end());
|
|
79734
79736
|
if (!this.buf) throw new Error("buffer lost somehow in ONDRAIN");
|
|
79735
|
-
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]();
|
|
79736
79738
|
}
|
|
79737
79739
|
};
|
|
79738
|
-
var
|
|
79740
|
+
var si = class extends de {
|
|
79739
79741
|
sync = true;
|
|
79740
|
-
[
|
|
79741
|
-
this[
|
|
79742
|
+
[Qi]() {
|
|
79743
|
+
this[ei](import_fs4.default.lstatSync(this.absolute));
|
|
79742
79744
|
}
|
|
79743
|
-
[
|
|
79744
|
-
this[
|
|
79745
|
+
[ji]() {
|
|
79746
|
+
this[ts](import_fs4.default.readlinkSync(this.absolute));
|
|
79745
79747
|
}
|
|
79746
|
-
[
|
|
79747
|
-
this[
|
|
79748
|
+
[es]() {
|
|
79749
|
+
this[is](import_fs4.default.openSync(this.absolute, "r"));
|
|
79748
79750
|
}
|
|
79749
|
-
[
|
|
79751
|
+
[ti]() {
|
|
79750
79752
|
let t = true;
|
|
79751
79753
|
try {
|
|
79752
79754
|
let { fd: e, buf: i, offset: r, length: n, pos: o } = this;
|
|
79753
79755
|
if (e === void 0 || i === void 0) throw new Error("fd and buf must be set in READ method");
|
|
79754
79756
|
let h = import_fs4.default.readSync(e, i, r, n, o);
|
|
79755
|
-
this[
|
|
79757
|
+
this[Ji](h), t = false;
|
|
79756
79758
|
} finally {
|
|
79757
79759
|
if (t) try {
|
|
79758
79760
|
this[pt](() => {
|
|
@@ -79761,7 +79763,7 @@ var ii = class extends de {
|
|
|
79761
79763
|
}
|
|
79762
79764
|
}
|
|
79763
79765
|
}
|
|
79764
|
-
[
|
|
79766
|
+
[ss](t) {
|
|
79765
79767
|
t();
|
|
79766
79768
|
}
|
|
79767
79769
|
[pt](t = () => {
|
|
@@ -79769,7 +79771,7 @@ var ii = class extends de {
|
|
|
79769
79771
|
this.fd !== void 0 && import_fs4.default.closeSync(this.fd), t();
|
|
79770
79772
|
}
|
|
79771
79773
|
};
|
|
79772
|
-
var
|
|
79774
|
+
var ri = class extends D {
|
|
79773
79775
|
blockLen = 0;
|
|
79774
79776
|
blockRemain = 0;
|
|
79775
79777
|
buf = 0;
|
|
@@ -79805,7 +79807,7 @@ var si = class extends A {
|
|
|
79805
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;
|
|
79806
79808
|
let { type: r } = t;
|
|
79807
79809
|
if (r === "Unsupported") throw new Error("writing entry that should be ignored");
|
|
79808
|
-
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);
|
|
79809
79811
|
let n = false;
|
|
79810
79812
|
if (!this.preservePaths) {
|
|
79811
79813
|
let [h, a] = ce(this.path);
|
|
@@ -79817,10 +79819,10 @@ var si = class extends A {
|
|
|
79817
79819
|
super.write(o), t.pipe(this);
|
|
79818
79820
|
}
|
|
79819
79821
|
[X](t) {
|
|
79820
|
-
return
|
|
79822
|
+
return Js(t, this.prefix);
|
|
79821
79823
|
}
|
|
79822
|
-
[
|
|
79823
|
-
return
|
|
79824
|
+
[ii](t) {
|
|
79825
|
+
return Vi(t, this.type === "Directory", this.portable);
|
|
79824
79826
|
}
|
|
79825
79827
|
write(t, e, i) {
|
|
79826
79828
|
typeof e == "function" && (i = e, e = void 0), typeof t == "string" && (t = Buffer.from(t, typeof e == "string" ? e : "utf8"));
|
|
@@ -79832,8 +79834,8 @@ var si = class extends A {
|
|
|
79832
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;
|
|
79833
79835
|
}
|
|
79834
79836
|
};
|
|
79835
|
-
var
|
|
79836
|
-
var
|
|
79837
|
+
var Dn = (s3) => s3.isFile() ? "File" : s3.isDirectory() ? "Directory" : s3.isSymbolicLink() ? "SymbolicLink" : "Unsupported";
|
|
79838
|
+
var ni = class s2 {
|
|
79837
79839
|
tail;
|
|
79838
79840
|
head;
|
|
79839
79841
|
length = 0;
|
|
@@ -79864,11 +79866,11 @@ var ri = class s2 {
|
|
|
79864
79866
|
t.list = this, t.prev = e, e && (e.next = t), this.tail = t, this.head || (this.head = t), this.length++;
|
|
79865
79867
|
}
|
|
79866
79868
|
push(...t) {
|
|
79867
|
-
for (let e = 0, i = t.length; e < i; e++)
|
|
79869
|
+
for (let e = 0, i = t.length; e < i; e++) Cn(this, t[e]);
|
|
79868
79870
|
return this.length;
|
|
79869
79871
|
}
|
|
79870
79872
|
unshift(...t) {
|
|
79871
|
-
for (var e = 0, i = t.length; e < i; e++)
|
|
79873
|
+
for (var e = 0, i = t.length; e < i; e++) Fn(this, t[e]);
|
|
79872
79874
|
return this.length;
|
|
79873
79875
|
}
|
|
79874
79876
|
pop() {
|
|
@@ -79964,7 +79966,7 @@ var ri = class s2 {
|
|
|
79964
79966
|
let n = [];
|
|
79965
79967
|
for (let o = 0; r && o < e; o++) n.push(r.value), r = this.removeNode(r);
|
|
79966
79968
|
r ? r !== this.tail && (r = r.prev) : r = this.tail;
|
|
79967
|
-
for (let o of i) r =
|
|
79969
|
+
for (let o of i) r = In(this, r, o);
|
|
79968
79970
|
return n;
|
|
79969
79971
|
}
|
|
79970
79972
|
reverse() {
|
|
@@ -79976,14 +79978,14 @@ var ri = class s2 {
|
|
|
79976
79978
|
return this.head = e, this.tail = t, this;
|
|
79977
79979
|
}
|
|
79978
79980
|
};
|
|
79979
|
-
function
|
|
79981
|
+
function In(s3, t, e) {
|
|
79980
79982
|
let i = t, r = t ? t.next : s3.head, n = new ue(e, i, r, s3);
|
|
79981
79983
|
return n.next === void 0 && (s3.tail = n), n.prev === void 0 && (s3.head = n), s3.length++, n;
|
|
79982
79984
|
}
|
|
79983
|
-
function
|
|
79985
|
+
function Cn(s3, t) {
|
|
79984
79986
|
s3.tail = new ue(t, s3.tail, void 0, s3), s3.head || (s3.head = s3.tail), s3.length++;
|
|
79985
79987
|
}
|
|
79986
|
-
function
|
|
79988
|
+
function Fn(s3, t) {
|
|
79987
79989
|
s3.head = new ue(t, void 0, s3.head, s3), s3.tail || (s3.tail = s3.head), s3.length++;
|
|
79988
79990
|
}
|
|
79989
79991
|
var ue = class {
|
|
@@ -79995,7 +79997,7 @@ var ue = class {
|
|
|
79995
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;
|
|
79996
79998
|
}
|
|
79997
79999
|
};
|
|
79998
|
-
var
|
|
80000
|
+
var di = class {
|
|
79999
80001
|
path;
|
|
80000
80002
|
absolute;
|
|
80001
80003
|
entry;
|
|
@@ -80008,28 +80010,28 @@ var fi = class {
|
|
|
80008
80010
|
this.path = t || "./", this.absolute = e;
|
|
80009
80011
|
}
|
|
80010
80012
|
};
|
|
80011
|
-
var
|
|
80012
|
-
var
|
|
80013
|
+
var tr = Buffer.alloc(1024);
|
|
80014
|
+
var oi = /* @__PURE__ */ Symbol("onStat");
|
|
80013
80015
|
var me = /* @__PURE__ */ Symbol("ended");
|
|
80014
80016
|
var W = /* @__PURE__ */ Symbol("queue");
|
|
80015
80017
|
var Ct = /* @__PURE__ */ Symbol("current");
|
|
80016
80018
|
var Ft = /* @__PURE__ */ Symbol("process");
|
|
80017
80019
|
var pe = /* @__PURE__ */ Symbol("processing");
|
|
80018
|
-
var
|
|
80020
|
+
var rs = /* @__PURE__ */ Symbol("processJob");
|
|
80019
80021
|
var G = /* @__PURE__ */ Symbol("jobs");
|
|
80020
|
-
var
|
|
80021
|
-
var
|
|
80022
|
-
var
|
|
80023
|
-
var
|
|
80024
|
-
var
|
|
80025
|
-
var
|
|
80026
|
-
var
|
|
80027
|
-
var
|
|
80028
|
-
var
|
|
80029
|
-
var
|
|
80030
|
-
var
|
|
80031
|
-
var
|
|
80032
|
-
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 {
|
|
80033
80035
|
sync = false;
|
|
80034
80036
|
opt;
|
|
80035
80037
|
cwd;
|
|
@@ -80050,22 +80052,22 @@ var Et = class extends A {
|
|
|
80050
80052
|
mtime;
|
|
80051
80053
|
filter;
|
|
80052
80054
|
jobs;
|
|
80053
|
-
[
|
|
80055
|
+
[ci];
|
|
80054
80056
|
onWriteEntry;
|
|
80055
80057
|
[W];
|
|
80056
80058
|
[G] = 0;
|
|
80057
80059
|
[pe] = false;
|
|
80058
80060
|
[me] = false;
|
|
80059
80061
|
constructor(t = {}) {
|
|
80060
|
-
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) {
|
|
80061
80063
|
if ((t.gzip ? 1 : 0) + (t.brotli ? 1 : 0) + (t.zstd ? 1 : 0) > 1) throw new TypeError("gzip, brotli, zstd are mutually exclusive");
|
|
80062
|
-
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");
|
|
80063
80065
|
let e = this.zip;
|
|
80064
|
-
e.on("data", (i) => super.write(i)), e.on("end", () => super.end()), e.on("drain", () => this[
|
|
80065
|
-
} else this.on("drain", this[
|
|
80066
|
-
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;
|
|
80067
80069
|
}
|
|
80068
|
-
[
|
|
80070
|
+
[rr](t) {
|
|
80069
80071
|
return super.write(t);
|
|
80070
80072
|
}
|
|
80071
80073
|
add(t) {
|
|
@@ -80076,97 +80078,97 @@ var Et = class extends A {
|
|
|
80076
80078
|
}
|
|
80077
80079
|
write(t) {
|
|
80078
80080
|
if (this[me]) throw new Error("write after end");
|
|
80079
|
-
return t instanceof Yt ? this[
|
|
80081
|
+
return t instanceof Yt ? this[er](t) : this[hi](t), this.flowing;
|
|
80080
80082
|
}
|
|
80081
|
-
[
|
|
80083
|
+
[er](t) {
|
|
80082
80084
|
let e = f(import_path4.default.resolve(this.cwd, t.path));
|
|
80083
80085
|
if (!this.filter(t.path, t)) t.resume();
|
|
80084
80086
|
else {
|
|
80085
|
-
let i = new
|
|
80086
|
-
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);
|
|
80087
80089
|
}
|
|
80088
80090
|
this[Ft]();
|
|
80089
80091
|
}
|
|
80090
|
-
[
|
|
80092
|
+
[hi](t) {
|
|
80091
80093
|
let e = f(import_path4.default.resolve(this.cwd, t));
|
|
80092
|
-
this[W].push(new
|
|
80094
|
+
this[W].push(new di(t, e)), this[Ft]();
|
|
80093
80095
|
}
|
|
80094
|
-
[
|
|
80096
|
+
[as](t) {
|
|
80095
80097
|
t.pending = true, this[G] += 1;
|
|
80096
80098
|
let e = this.follow ? "stat" : "lstat";
|
|
80097
80099
|
import_fs3.default[e](t.absolute, (i, r) => {
|
|
80098
|
-
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);
|
|
80099
80101
|
});
|
|
80100
80102
|
}
|
|
80101
|
-
[
|
|
80102
|
-
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]();
|
|
80103
80105
|
}
|
|
80104
|
-
[
|
|
80106
|
+
[ls](t) {
|
|
80105
80107
|
t.pending = true, this[G] += 1, import_fs3.default.readdir(t.absolute, (e, i) => {
|
|
80106
80108
|
if (t.pending = false, this[G] -= 1, e) return this.emit("error", e);
|
|
80107
|
-
this[
|
|
80109
|
+
this[ai](t, i);
|
|
80108
80110
|
});
|
|
80109
80111
|
}
|
|
80110
|
-
[
|
|
80112
|
+
[ai](t, e) {
|
|
80111
80113
|
this.readdirCache.set(t.absolute, e), t.readdir = e, this[Ft]();
|
|
80112
80114
|
}
|
|
80113
80115
|
[Ft]() {
|
|
80114
80116
|
if (!this[pe]) {
|
|
80115
80117
|
this[pe] = true;
|
|
80116
|
-
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) {
|
|
80117
80119
|
let e = t.next;
|
|
80118
80120
|
this[W].removeNode(t), t.next = e;
|
|
80119
80121
|
}
|
|
80120
|
-
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()));
|
|
80121
80123
|
}
|
|
80122
80124
|
}
|
|
80123
80125
|
get [Ct]() {
|
|
80124
80126
|
return this[W] && this[W].head && this[W].head.value;
|
|
80125
80127
|
}
|
|
80126
|
-
[
|
|
80128
|
+
[ns](t) {
|
|
80127
80129
|
this[W].shift(), this[G] -= 1, this[Ft]();
|
|
80128
80130
|
}
|
|
80129
|
-
[
|
|
80131
|
+
[rs](t) {
|
|
80130
80132
|
if (!t.pending) {
|
|
80131
80133
|
if (t.entry) {
|
|
80132
|
-
t === this[Ct] && !t.piped && this[
|
|
80134
|
+
t === this[Ct] && !t.piped && this[li](t);
|
|
80133
80135
|
return;
|
|
80134
80136
|
}
|
|
80135
80137
|
if (!t.stat) {
|
|
80136
80138
|
let e = this.statCache.get(t.absolute);
|
|
80137
|
-
e ? this[
|
|
80139
|
+
e ? this[oi](t, e) : this[as](t);
|
|
80138
80140
|
}
|
|
80139
80141
|
if (t.stat && !t.ignore) {
|
|
80140
80142
|
if (!this.noDirRecurse && t.stat.isDirectory() && !t.readdir) {
|
|
80141
80143
|
let e = this.readdirCache.get(t.absolute);
|
|
80142
|
-
if (e ? this[
|
|
80144
|
+
if (e ? this[ai](t, e) : this[ls](t), !t.readdir) return;
|
|
80143
80145
|
}
|
|
80144
|
-
if (t.entry = this[
|
|
80146
|
+
if (t.entry = this[ir](t), !t.entry) {
|
|
80145
80147
|
t.ignore = true;
|
|
80146
80148
|
return;
|
|
80147
80149
|
}
|
|
80148
|
-
t === this[Ct] && !t.piped && this[
|
|
80150
|
+
t === this[Ct] && !t.piped && this[li](t);
|
|
80149
80151
|
}
|
|
80150
80152
|
}
|
|
80151
80153
|
}
|
|
80152
|
-
[
|
|
80154
|
+
[os2](t) {
|
|
80153
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 };
|
|
80154
80156
|
}
|
|
80155
|
-
[
|
|
80157
|
+
[ir](t) {
|
|
80156
80158
|
this[G] += 1;
|
|
80157
80159
|
try {
|
|
80158
|
-
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));
|
|
80159
80161
|
} catch (e) {
|
|
80160
80162
|
this.emit("error", e);
|
|
80161
80163
|
}
|
|
80162
80164
|
}
|
|
80163
|
-
[
|
|
80165
|
+
[hs]() {
|
|
80164
80166
|
this[Ct] && this[Ct].entry && this[Ct].entry.resume();
|
|
80165
80167
|
}
|
|
80166
|
-
[
|
|
80168
|
+
[li](t) {
|
|
80167
80169
|
t.piped = true, t.readdir && t.readdir.forEach((r) => {
|
|
80168
80170
|
let n = t.path, o = n === "./" ? "" : n.replace(/\/*$/, "/");
|
|
80169
|
-
this[
|
|
80171
|
+
this[hi](o + r);
|
|
80170
80172
|
});
|
|
80171
80173
|
let e = t.entry, i = this.zip;
|
|
80172
80174
|
if (!e) throw new Error("cannot pipe without source");
|
|
@@ -80186,131 +80188,128 @@ var Et = class extends A {
|
|
|
80186
80188
|
var kt = class extends Et {
|
|
80187
80189
|
sync = true;
|
|
80188
80190
|
constructor(t) {
|
|
80189
|
-
super(t), this[
|
|
80191
|
+
super(t), this[ci] = si;
|
|
80190
80192
|
}
|
|
80191
80193
|
pause() {
|
|
80192
80194
|
}
|
|
80193
80195
|
resume() {
|
|
80194
80196
|
}
|
|
80195
|
-
[
|
|
80197
|
+
[as](t) {
|
|
80196
80198
|
let e = this.follow ? "statSync" : "lstatSync";
|
|
80197
|
-
this[
|
|
80199
|
+
this[oi](t, import_fs3.default[e](t.absolute));
|
|
80198
80200
|
}
|
|
80199
|
-
[
|
|
80200
|
-
this[
|
|
80201
|
+
[ls](t) {
|
|
80202
|
+
this[ai](t, import_fs3.default.readdirSync(t.absolute));
|
|
80201
80203
|
}
|
|
80202
|
-
[
|
|
80204
|
+
[li](t) {
|
|
80203
80205
|
let e = t.entry, i = this.zip;
|
|
80204
80206
|
if (t.readdir && t.readdir.forEach((r) => {
|
|
80205
80207
|
let n = t.path, o = n === "./" ? "" : n.replace(/\/*$/, "/");
|
|
80206
|
-
this[
|
|
80208
|
+
this[hi](o + r);
|
|
80207
80209
|
}), !e) throw new Error("Cannot pipe without source");
|
|
80208
80210
|
i ? e.on("data", (r) => {
|
|
80209
80211
|
i.write(r);
|
|
80210
80212
|
}) : e.on("data", (r) => {
|
|
80211
|
-
super[
|
|
80213
|
+
super[rr](r);
|
|
80212
80214
|
});
|
|
80213
80215
|
}
|
|
80214
80216
|
};
|
|
80215
|
-
var
|
|
80217
|
+
var kn = (s3, t) => {
|
|
80216
80218
|
let e = new kt(s3), i = new Wt(s3.file, { mode: s3.mode || 438 });
|
|
80217
|
-
e.pipe(i),
|
|
80219
|
+
e.pipe(i), or(e, t);
|
|
80218
80220
|
};
|
|
80219
|
-
var
|
|
80221
|
+
var vn = (s3, t) => {
|
|
80220
80222
|
let e = new Et(s3), i = new tt(s3.file, { mode: s3.mode || 438 });
|
|
80221
80223
|
e.pipe(i);
|
|
80222
80224
|
let r = new Promise((n, o) => {
|
|
80223
80225
|
i.on("error", o), i.on("close", n), e.on("error", o);
|
|
80224
80226
|
});
|
|
80225
|
-
return
|
|
80227
|
+
return hr(e, t).catch((n) => e.emit("error", n)), r;
|
|
80226
80228
|
};
|
|
80227
|
-
var
|
|
80229
|
+
var or = (s3, t) => {
|
|
80228
80230
|
t.forEach((e) => {
|
|
80229
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);
|
|
80230
80232
|
}), s3.end();
|
|
80231
80233
|
};
|
|
80232
|
-
var
|
|
80233
|
-
for (let e
|
|
80234
|
-
|
|
80235
|
-
|
|
80236
|
-
s3.add(r);
|
|
80237
|
-
} }) : s3.add(i);
|
|
80238
|
-
}
|
|
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);
|
|
80239
80238
|
s3.end();
|
|
80240
80239
|
};
|
|
80241
|
-
var
|
|
80240
|
+
var Mn = (s3, t) => {
|
|
80242
80241
|
let e = new kt(s3);
|
|
80243
|
-
return
|
|
80242
|
+
return or(e, t), e;
|
|
80244
80243
|
};
|
|
80245
|
-
var
|
|
80244
|
+
var Bn = (s3, t) => {
|
|
80246
80245
|
let e = new Et(s3);
|
|
80247
|
-
return
|
|
80246
|
+
return hr(e, t).catch((i) => e.emit("error", i)), e;
|
|
80248
80247
|
};
|
|
80249
|
-
var
|
|
80248
|
+
var Pn = K(kn, vn, Mn, Bn, (s3, t) => {
|
|
80250
80249
|
if (!t?.length) throw new TypeError("no paths specified to add to archive");
|
|
80251
80250
|
});
|
|
80252
|
-
var
|
|
80253
|
-
var
|
|
80254
|
-
var { O_CREAT:
|
|
80255
|
-
var
|
|
80256
|
-
var
|
|
80257
|
-
var
|
|
80258
|
-
var
|
|
80259
|
-
var
|
|
80260
|
-
var
|
|
80251
|
+
var zn = process.env.__FAKE_PLATFORM__ || process.platform;
|
|
80252
|
+
var Un = zn === "win32";
|
|
80253
|
+
var { O_CREAT: Hn, O_TRUNC: Wn, O_WRONLY: Gn } = import_fs5.default.constants;
|
|
80254
|
+
var lr = Number(process.env.__FAKE_FS_O_FILENAME__) || import_fs5.default.constants.UV_FS_O_FILEMAP || 0;
|
|
80255
|
+
var Zn = Un && !!lr;
|
|
80256
|
+
var Yn = 512 * 1024;
|
|
80257
|
+
var Kn = lr | Wn | Hn | Gn;
|
|
80258
|
+
var cs = Zn ? (s3) => s3 < Yn ? Kn : "w" : () => "w";
|
|
80259
|
+
var fs2 = (s3, t, e) => {
|
|
80261
80260
|
try {
|
|
80262
80261
|
return import_node_fs4.default.lchownSync(s3, t, e);
|
|
80263
80262
|
} catch (i) {
|
|
80264
80263
|
if (i?.code !== "ENOENT") throw i;
|
|
80265
80264
|
}
|
|
80266
80265
|
};
|
|
80267
|
-
var
|
|
80266
|
+
var ui = (s3, t, e, i) => {
|
|
80268
80267
|
import_node_fs4.default.lchown(s3, t, e, (r) => {
|
|
80269
80268
|
i(r && r?.code !== "ENOENT" ? r : null);
|
|
80270
80269
|
});
|
|
80271
80270
|
};
|
|
80272
|
-
var
|
|
80273
|
-
if (t.isDirectory())
|
|
80271
|
+
var Vn = (s3, t, e, i, r) => {
|
|
80272
|
+
if (t.isDirectory()) ds(import_node_path6.default.resolve(s3, t.name), e, i, (n) => {
|
|
80274
80273
|
if (n) return r(n);
|
|
80275
80274
|
let o = import_node_path6.default.resolve(s3, t.name);
|
|
80276
|
-
|
|
80275
|
+
ui(o, e, i, r);
|
|
80277
80276
|
});
|
|
80278
80277
|
else {
|
|
80279
80278
|
let n = import_node_path6.default.resolve(s3, t.name);
|
|
80280
|
-
|
|
80279
|
+
ui(n, e, i, r);
|
|
80281
80280
|
}
|
|
80282
80281
|
};
|
|
80283
|
-
var
|
|
80282
|
+
var ds = (s3, t, e, i) => {
|
|
80284
80283
|
import_node_fs4.default.readdir(s3, { withFileTypes: true }, (r, n) => {
|
|
80285
80284
|
if (r) {
|
|
80286
80285
|
if (r.code === "ENOENT") return i();
|
|
80287
80286
|
if (r.code !== "ENOTDIR" && r.code !== "ENOTSUP") return i(r);
|
|
80288
80287
|
}
|
|
80289
|
-
if (r || !n.length) return
|
|
80288
|
+
if (r || !n.length) return ui(s3, t, e, i);
|
|
80290
80289
|
let o = n.length, h = null, a = (l) => {
|
|
80291
80290
|
if (!h) {
|
|
80292
80291
|
if (l) return i(h = l);
|
|
80293
|
-
if (--o === 0) return
|
|
80292
|
+
if (--o === 0) return ui(s3, t, e, i);
|
|
80294
80293
|
}
|
|
80295
80294
|
};
|
|
80296
|
-
for (let l of n)
|
|
80295
|
+
for (let l of n) Vn(s3, l, t, e, a);
|
|
80297
80296
|
});
|
|
80298
80297
|
};
|
|
80299
|
-
var
|
|
80300
|
-
t.isDirectory() &&
|
|
80298
|
+
var $n = (s3, t, e, i) => {
|
|
80299
|
+
t.isDirectory() && us(import_node_path6.default.resolve(s3, t.name), e, i), fs2(import_node_path6.default.resolve(s3, t.name), e, i);
|
|
80301
80300
|
};
|
|
80302
|
-
var
|
|
80301
|
+
var us = (s3, t, e) => {
|
|
80303
80302
|
let i;
|
|
80304
80303
|
try {
|
|
80305
80304
|
i = import_node_fs4.default.readdirSync(s3, { withFileTypes: true });
|
|
80306
80305
|
} catch (r) {
|
|
80307
80306
|
let n = r;
|
|
80308
80307
|
if (n?.code === "ENOENT") return;
|
|
80309
|
-
if (n?.code === "ENOTDIR" || n?.code === "ENOTSUP") return
|
|
80308
|
+
if (n?.code === "ENOTDIR" || n?.code === "ENOTSUP") return fs2(s3, t, e);
|
|
80310
80309
|
throw n;
|
|
80311
80310
|
}
|
|
80312
|
-
for (let r of i)
|
|
80313
|
-
return
|
|
80311
|
+
for (let r of i) $n(s3, r, t, e);
|
|
80312
|
+
return fs2(s3, t, e);
|
|
80314
80313
|
};
|
|
80315
80314
|
var we = class extends Error {
|
|
80316
80315
|
path;
|
|
@@ -80335,41 +80334,41 @@ var wt = class extends Error {
|
|
|
80335
80334
|
return "SymlinkError";
|
|
80336
80335
|
}
|
|
80337
80336
|
};
|
|
80338
|
-
var
|
|
80337
|
+
var qn = (s3, t) => {
|
|
80339
80338
|
import_node_fs5.default.stat(s3, (e, i) => {
|
|
80340
80339
|
(e || !i.isDirectory()) && (e = new we(s3, e?.code || "ENOTDIR")), t(e);
|
|
80341
80340
|
});
|
|
80342
80341
|
};
|
|
80343
|
-
var
|
|
80342
|
+
var cr = (s3, t, e) => {
|
|
80344
80343
|
s3 = f(s3);
|
|
80345
80344
|
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) => {
|
|
80346
|
-
E ? e(E) : x && a ?
|
|
80345
|
+
E ? e(E) : x && a ? ds(x, o, h, (xe) => S(xe)) : n ? import_node_fs5.default.chmod(s3, r, e) : e();
|
|
80347
80346
|
};
|
|
80348
|
-
if (s3 === d) return
|
|
80347
|
+
if (s3 === d) return qn(s3, S);
|
|
80349
80348
|
if (l) return import_promises.default.mkdir(s3, { mode: r, recursive: true }).then((E) => S(null, E ?? void 0), S);
|
|
80350
80349
|
let N = f(import_node_path7.default.relative(d, s3)).split("/");
|
|
80351
|
-
|
|
80350
|
+
ms(d, N, r, c, d, void 0, S);
|
|
80352
80351
|
};
|
|
80353
|
-
var
|
|
80354
|
-
if (
|
|
80352
|
+
var ms = (s3, t, e, i, r, n, o) => {
|
|
80353
|
+
if (t.length === 0) return o(null, n);
|
|
80355
80354
|
let h = t.shift(), a = f(import_node_path7.default.resolve(s3 + "/" + h));
|
|
80356
|
-
import_node_fs5.default.mkdir(a, e,
|
|
80355
|
+
import_node_fs5.default.mkdir(a, e, fr(a, t, e, i, r, n, o));
|
|
80357
80356
|
};
|
|
80358
|
-
var
|
|
80357
|
+
var fr = (s3, t, e, i, r, n, o) => (h) => {
|
|
80359
80358
|
h ? import_node_fs5.default.lstat(s3, (a, l) => {
|
|
80360
80359
|
if (a) a.path = a.path && f(a.path), o(a);
|
|
80361
|
-
else if (l.isDirectory())
|
|
80360
|
+
else if (l.isDirectory()) ms(s3, t, e, i, r, n, o);
|
|
80362
80361
|
else if (i) import_node_fs5.default.unlink(s3, (c) => {
|
|
80363
80362
|
if (c) return o(c);
|
|
80364
|
-
import_node_fs5.default.mkdir(s3, e,
|
|
80363
|
+
import_node_fs5.default.mkdir(s3, e, fr(s3, t, e, i, r, n, o));
|
|
80365
80364
|
});
|
|
80366
80365
|
else {
|
|
80367
80366
|
if (l.isSymbolicLink()) return o(new wt(s3, s3 + "/" + t.join("/")));
|
|
80368
80367
|
o(h);
|
|
80369
80368
|
}
|
|
80370
|
-
}) : (n = n || s3,
|
|
80369
|
+
}) : (n = n || s3, ms(s3, t, e, i, r, n, o));
|
|
80371
80370
|
};
|
|
80372
|
-
var
|
|
80371
|
+
var jn = (s3) => {
|
|
80373
80372
|
let t = false, e;
|
|
80374
80373
|
try {
|
|
80375
80374
|
t = import_node_fs5.default.statSync(s3).isDirectory();
|
|
@@ -80379,12 +80378,12 @@ var Qn = (s3) => {
|
|
|
80379
80378
|
if (!t) throw new we(s3, e ?? "ENOTDIR");
|
|
80380
80379
|
}
|
|
80381
80380
|
};
|
|
80382
|
-
var
|
|
80381
|
+
var dr = (s3, t) => {
|
|
80383
80382
|
s3 = f(s3);
|
|
80384
80383
|
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) => {
|
|
80385
|
-
E && h &&
|
|
80384
|
+
E && h && us(E, n, o), r && import_node_fs5.default.chmodSync(s3, i);
|
|
80386
80385
|
};
|
|
80387
|
-
if (s3 === c) return
|
|
80386
|
+
if (s3 === c) return jn(c), d();
|
|
80388
80387
|
if (a) return d(import_node_fs5.default.mkdirSync(s3, { mode: i, recursive: true }) ?? void 0);
|
|
80389
80388
|
let T = f(import_node_path7.default.relative(c, s3)).split("/"), N;
|
|
80390
80389
|
for (let E = T.shift(), x = c; E && (x += "/" + E); E = T.shift()) {
|
|
@@ -80392,40 +80391,40 @@ var ur = (s3, t) => {
|
|
|
80392
80391
|
try {
|
|
80393
80392
|
import_node_fs5.default.mkdirSync(x, i), N = N || x;
|
|
80394
80393
|
} catch {
|
|
80395
|
-
let
|
|
80396
|
-
if (
|
|
80394
|
+
let xe = import_node_fs5.default.lstatSync(x);
|
|
80395
|
+
if (xe.isDirectory()) continue;
|
|
80397
80396
|
if (l) {
|
|
80398
80397
|
import_node_fs5.default.unlinkSync(x), import_node_fs5.default.mkdirSync(x, i), N = N || x;
|
|
80399
80398
|
continue;
|
|
80400
|
-
} else if (
|
|
80399
|
+
} else if (xe.isSymbolicLink()) return new wt(x, x + "/" + T.join("/"));
|
|
80401
80400
|
}
|
|
80402
80401
|
}
|
|
80403
80402
|
return d(N);
|
|
80404
80403
|
};
|
|
80405
|
-
var
|
|
80406
|
-
var
|
|
80404
|
+
var ps = /* @__PURE__ */ Object.create(null);
|
|
80405
|
+
var ur = 1e4;
|
|
80407
80406
|
var $t = /* @__PURE__ */ new Set();
|
|
80408
|
-
var
|
|
80409
|
-
$t.has(s3) ? $t.delete(s3) :
|
|
80410
|
-
let t =
|
|
80411
|
-
if (e >
|
|
80412
|
-
for (let i of $t) if ($t.delete(i), delete
|
|
80407
|
+
var mr = (s3) => {
|
|
80408
|
+
$t.has(s3) ? $t.delete(s3) : ps[s3] = s3.normalize("NFD").toLocaleLowerCase("en").toLocaleUpperCase("en"), $t.add(s3);
|
|
80409
|
+
let t = ps[s3], e = $t.size - ur;
|
|
80410
|
+
if (e > ur / 10) {
|
|
80411
|
+
for (let i of $t) if ($t.delete(i), delete ps[i], --e <= 0) break;
|
|
80413
80412
|
}
|
|
80414
80413
|
return t;
|
|
80415
80414
|
};
|
|
80416
|
-
var
|
|
80417
|
-
var
|
|
80418
|
-
var
|
|
80419
|
-
let r = e
|
|
80415
|
+
var Qn = process.env.TESTING_TAR_FAKE_PLATFORM || process.platform;
|
|
80416
|
+
var Jn = Qn === "win32";
|
|
80417
|
+
var to = (s3) => s3.split("/").slice(0, -1).reduce((e, i) => {
|
|
80418
|
+
let r = e.at(-1);
|
|
80420
80419
|
return r !== void 0 && (i = (0, import_node_path8.join)(r, i)), e.push(i || "/"), e;
|
|
80421
80420
|
}, []);
|
|
80422
|
-
var
|
|
80421
|
+
var Ei = class {
|
|
80423
80422
|
#t = /* @__PURE__ */ new Map();
|
|
80424
80423
|
#i = /* @__PURE__ */ new Map();
|
|
80425
80424
|
#s = /* @__PURE__ */ new Set();
|
|
80426
80425
|
reserve(t, e) {
|
|
80427
|
-
t =
|
|
80428
|
-
let i = new Set(t.map((r) =>
|
|
80426
|
+
t = Jn ? ["win32 parallelization disabled"] : t.map((r) => mt((0, import_node_path8.join)(mr(r))));
|
|
80427
|
+
let i = new Set(t.map((r) => to(r)).reduce((r, n) => r.concat(n)));
|
|
80429
80428
|
this.#i.set(e, { dirs: i, paths: t });
|
|
80430
80429
|
for (let r of t) {
|
|
80431
80430
|
let n = this.#t.get(r);
|
|
@@ -80435,7 +80434,7 @@ var pi = class {
|
|
|
80435
80434
|
let n = this.#t.get(r);
|
|
80436
80435
|
if (!n) this.#t.set(r, [/* @__PURE__ */ new Set([e])]);
|
|
80437
80436
|
else {
|
|
80438
|
-
let o = n
|
|
80437
|
+
let o = n.at(-1);
|
|
80439
80438
|
o instanceof Set ? o.add(e) : n.push(/* @__PURE__ */ new Set([e]));
|
|
80440
80439
|
}
|
|
80441
80440
|
}
|
|
@@ -80483,37 +80482,37 @@ var pi = class {
|
|
|
80483
80482
|
return this.#s.delete(t), n.forEach((o) => this.#r(o)), true;
|
|
80484
80483
|
}
|
|
80485
80484
|
};
|
|
80486
|
-
var
|
|
80487
|
-
var
|
|
80488
|
-
var
|
|
80489
|
-
var
|
|
80490
|
-
var
|
|
80485
|
+
var Er = () => process.umask();
|
|
80486
|
+
var wr = /* @__PURE__ */ Symbol("onEntry");
|
|
80487
|
+
var ys = /* @__PURE__ */ Symbol("checkFs");
|
|
80488
|
+
var Sr = /* @__PURE__ */ Symbol("checkFs2");
|
|
80489
|
+
var Rs = /* @__PURE__ */ Symbol("isReusable");
|
|
80491
80490
|
var P = /* @__PURE__ */ Symbol("makeFs");
|
|
80492
|
-
var
|
|
80493
|
-
var
|
|
80494
|
-
var
|
|
80495
|
-
var
|
|
80496
|
-
var
|
|
80491
|
+
var bs = /* @__PURE__ */ Symbol("file");
|
|
80492
|
+
var _s = /* @__PURE__ */ Symbol("directory");
|
|
80493
|
+
var Si = /* @__PURE__ */ Symbol("link");
|
|
80494
|
+
var yr = /* @__PURE__ */ Symbol("symlink");
|
|
80495
|
+
var Rr = /* @__PURE__ */ Symbol("hardlink");
|
|
80497
80496
|
var ye = /* @__PURE__ */ Symbol("ensureNoSymlink");
|
|
80498
|
-
var
|
|
80497
|
+
var br = /* @__PURE__ */ Symbol("unsupported");
|
|
80499
80498
|
var _r = /* @__PURE__ */ Symbol("checkPath");
|
|
80500
|
-
var
|
|
80499
|
+
var Es = /* @__PURE__ */ Symbol("stripAbsolutePath");
|
|
80501
80500
|
var St = /* @__PURE__ */ Symbol("mkdir");
|
|
80502
80501
|
var O = /* @__PURE__ */ Symbol("onError");
|
|
80503
|
-
var
|
|
80504
|
-
var
|
|
80502
|
+
var wi = /* @__PURE__ */ Symbol("pending");
|
|
80503
|
+
var gr = /* @__PURE__ */ Symbol("pend");
|
|
80505
80504
|
var Xt = /* @__PURE__ */ Symbol("unpend");
|
|
80506
|
-
var
|
|
80507
|
-
var
|
|
80505
|
+
var ws = /* @__PURE__ */ Symbol("ended");
|
|
80506
|
+
var Ss = /* @__PURE__ */ Symbol("maybeClose");
|
|
80508
80507
|
var gs = /* @__PURE__ */ Symbol("skip");
|
|
80509
80508
|
var Re = /* @__PURE__ */ Symbol("doChown");
|
|
80510
80509
|
var be = /* @__PURE__ */ Symbol("uid");
|
|
80511
|
-
var
|
|
80512
|
-
var
|
|
80513
|
-
var
|
|
80514
|
-
var Oe =
|
|
80515
|
-
var
|
|
80516
|
-
var
|
|
80510
|
+
var _e = /* @__PURE__ */ Symbol("gid");
|
|
80511
|
+
var ge = /* @__PURE__ */ Symbol("checkedCwd");
|
|
80512
|
+
var io = process.env.TESTING_TAR_FAKE_PLATFORM || process.platform;
|
|
80513
|
+
var Oe = io === "win32";
|
|
80514
|
+
var so = 1024;
|
|
80515
|
+
var ro = (s3, t) => {
|
|
80517
80516
|
if (!Oe) return import_node_fs3.default.unlink(s3, t);
|
|
80518
80517
|
let e = s3 + ".DELETE." + (0, import_node_crypto.randomBytes)(16).toString("hex");
|
|
80519
80518
|
import_node_fs3.default.rename(s3, e, (i) => {
|
|
@@ -80521,17 +80520,17 @@ var no = (s3, t) => {
|
|
|
80521
80520
|
import_node_fs3.default.unlink(e, t);
|
|
80522
80521
|
});
|
|
80523
80522
|
};
|
|
80524
|
-
var
|
|
80523
|
+
var no = (s3) => {
|
|
80525
80524
|
if (!Oe) return import_node_fs3.default.unlinkSync(s3);
|
|
80526
80525
|
let t = s3 + ".DELETE." + (0, import_node_crypto.randomBytes)(16).toString("hex");
|
|
80527
80526
|
import_node_fs3.default.renameSync(s3, t), import_node_fs3.default.unlinkSync(t);
|
|
80528
80527
|
};
|
|
80529
|
-
var
|
|
80528
|
+
var Or = (s3, t, e) => s3 !== void 0 && s3 === s3 >>> 0 ? s3 : t !== void 0 && t === t >>> 0 ? t : e;
|
|
80530
80529
|
var qt = class extends st {
|
|
80531
|
-
[
|
|
80532
|
-
[
|
|
80533
|
-
[
|
|
80534
|
-
reservations = new
|
|
80530
|
+
[ws] = false;
|
|
80531
|
+
[ge] = false;
|
|
80532
|
+
[wi] = 0;
|
|
80533
|
+
reservations = new Ei();
|
|
80535
80534
|
transform;
|
|
80536
80535
|
writable = true;
|
|
80537
80536
|
readable = false;
|
|
@@ -80558,30 +80557,28 @@ var qt = class extends st {
|
|
|
80558
80557
|
chmod;
|
|
80559
80558
|
constructor(t = {}) {
|
|
80560
80559
|
if (t.ondone = () => {
|
|
80561
|
-
this[
|
|
80560
|
+
this[ws] = true, this[Ss]();
|
|
80562
80561
|
}, super(t), this.transform = t.transform, this.chmod = !!t.chmod, typeof t.uid == "number" || typeof t.gid == "number") {
|
|
80563
80562
|
if (typeof t.uid != "number" || typeof t.gid != "number") throw new TypeError("cannot set owner without number uid and gid");
|
|
80564
80563
|
if (t.preserveOwner) throw new TypeError("cannot preserve owner in archive and also set owner explicitly");
|
|
80565
80564
|
this.uid = t.uid, this.gid = t.gid, this.setOwner = true;
|
|
80566
80565
|
} else this.uid = void 0, this.gid = void 0, this.setOwner = false;
|
|
80567
|
-
t.preserveOwner === void 0 && typeof t.uid != "number" ?
|
|
80566
|
+
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 : so, 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 : Er() : 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[wr](e));
|
|
80568
80567
|
}
|
|
80569
80568
|
warn(t, e, i = {}) {
|
|
80570
80569
|
return (t === "TAR_BAD_ARCHIVE" || t === "TAR_ABORT") && (i.recoverable = false), super.warn(t, e, i);
|
|
80571
80570
|
}
|
|
80572
|
-
[
|
|
80573
|
-
this[
|
|
80571
|
+
[Ss]() {
|
|
80572
|
+
this[ws] && this[wi] === 0 && (this.emit("prefinish"), this.emit("finish"), this.emit("end"));
|
|
80574
80573
|
}
|
|
80575
|
-
[
|
|
80574
|
+
[Es](t, e) {
|
|
80576
80575
|
let i = t[e], { type: r } = t;
|
|
80577
80576
|
if (!i || this.preservePaths) return true;
|
|
80578
|
-
let [n, o] = ce(i), h = o.
|
|
80577
|
+
let [n, o] = ce(i), h = o.replaceAll(/\\/g, "/").split("/");
|
|
80579
80578
|
if (h.includes("..") || Oe && /^[a-z]:\.\.$/i.test(h[0] ?? "")) {
|
|
80580
80579
|
if (e === "path" || r === "Link") return this.warn("TAR_ENTRY_ERROR", `${e} contains '..'`, { entry: t, [e]: i }), false;
|
|
80581
|
-
|
|
80582
|
-
|
|
80583
|
-
if (l.startsWith("../") || l === "..") return this.warn("TAR_ENTRY_ERROR", `${e} escapes extraction directory`, { entry: t, [e]: i }), false;
|
|
80584
|
-
}
|
|
80580
|
+
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("/")));
|
|
80581
|
+
if (l.startsWith("../") || l === "..") return this.warn("TAR_ENTRY_ERROR", `${e} escapes extraction directory`, { entry: t, [e]: i }), false;
|
|
80585
80582
|
}
|
|
80586
80583
|
return n && (t[e] = String(o), this.warn("TAR_ENTRY_INFO", `stripping ${n} from absolute ${e}`, { entry: t, [e]: i })), true;
|
|
80587
80584
|
}
|
|
@@ -80597,18 +80594,18 @@ var qt = class extends st {
|
|
|
80597
80594
|
i.splice(0, this.strip), t.path = i.join("/");
|
|
80598
80595
|
}
|
|
80599
80596
|
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;
|
|
80600
|
-
if (!this[
|
|
80601
|
-
if (import_node_path5.default.isAbsolute(t.path) ?
|
|
80597
|
+
if (!this[Es](t, "path") || !this[Es](t, "linkpath")) return false;
|
|
80598
|
+
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;
|
|
80602
80599
|
if (t.absolute === this.cwd && t.type !== "Directory" && t.type !== "GNUDumpDir") return false;
|
|
80603
80600
|
if (this.win32) {
|
|
80604
80601
|
let { root: r } = import_node_path5.default.win32.parse(String(t.absolute));
|
|
80605
|
-
t.absolute = r +
|
|
80602
|
+
t.absolute = r + Xi(String(t.absolute).slice(r.length));
|
|
80606
80603
|
let { root: n } = import_node_path5.default.win32.parse(t.path);
|
|
80607
|
-
t.path = n +
|
|
80604
|
+
t.path = n + Xi(t.path.slice(n.length));
|
|
80608
80605
|
}
|
|
80609
80606
|
return true;
|
|
80610
80607
|
}
|
|
80611
|
-
[
|
|
80608
|
+
[wr](t) {
|
|
80612
80609
|
if (!this[_r](t)) return t.resume();
|
|
80613
80610
|
switch (import_node_assert.default.equal(typeof t.absolute, "string"), t.type) {
|
|
80614
80611
|
case "Directory":
|
|
@@ -80619,28 +80616,28 @@ var qt = class extends st {
|
|
|
80619
80616
|
case "ContiguousFile":
|
|
80620
80617
|
case "Link":
|
|
80621
80618
|
case "SymbolicLink":
|
|
80622
|
-
return this[
|
|
80619
|
+
return this[ys](t);
|
|
80623
80620
|
default:
|
|
80624
|
-
return this[
|
|
80621
|
+
return this[br](t);
|
|
80625
80622
|
}
|
|
80626
80623
|
}
|
|
80627
80624
|
[O](t, e) {
|
|
80628
80625
|
t.name === "CwdError" ? this.emit("error", t) : (this.warn("TAR_ENTRY_ERROR", t, { entry: e }), this[Xt](), e.resume());
|
|
80629
80626
|
}
|
|
80630
80627
|
[St](t, e, i) {
|
|
80631
|
-
|
|
80628
|
+
cr(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);
|
|
80632
80629
|
}
|
|
80633
80630
|
[Re](t) {
|
|
80634
80631
|
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;
|
|
80635
80632
|
}
|
|
80636
80633
|
[be](t) {
|
|
80637
|
-
return
|
|
80634
|
+
return Or(this.uid, t.uid, this.processUid);
|
|
80638
80635
|
}
|
|
80639
|
-
[
|
|
80640
|
-
return
|
|
80636
|
+
[_e](t) {
|
|
80637
|
+
return Or(this.gid, t.gid, this.processGid);
|
|
80641
80638
|
}
|
|
80642
|
-
[
|
|
80643
|
-
let i = typeof t.mode == "number" ? t.mode & 4095 : this.fmode, r = new tt(String(t.absolute), { flags:
|
|
80639
|
+
[bs](t, e) {
|
|
80640
|
+
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 });
|
|
80644
80641
|
r.on("error", (a) => {
|
|
80645
80642
|
r.fd && import_node_fs3.default.close(r.fd, () => {
|
|
80646
80643
|
}), r.write = () => true, this[O](a, t), e();
|
|
@@ -80664,7 +80661,7 @@ var qt = class extends st {
|
|
|
80664
80661
|
}
|
|
80665
80662
|
if (typeof l == "number" && this[Re](t)) {
|
|
80666
80663
|
n++;
|
|
80667
|
-
let c = this[be](t), d = this[
|
|
80664
|
+
let c = this[be](t), d = this[_e](t);
|
|
80668
80665
|
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());
|
|
80669
80666
|
}
|
|
80670
80667
|
o();
|
|
@@ -80674,7 +80671,7 @@ var qt = class extends st {
|
|
|
80674
80671
|
this[O](a, t), e();
|
|
80675
80672
|
}), t.pipe(h)), h.pipe(r);
|
|
80676
80673
|
}
|
|
80677
|
-
[
|
|
80674
|
+
[_s](t, e) {
|
|
80678
80675
|
let i = typeof t.mode == "number" ? t.mode & 4095 : this.dmode;
|
|
80679
80676
|
this[St](String(t.absolute), i, (r) => {
|
|
80680
80677
|
if (r) {
|
|
@@ -80684,21 +80681,21 @@ var qt = class extends st {
|
|
|
80684
80681
|
let n = 1, o = () => {
|
|
80685
80682
|
--n === 0 && (e(), this[Xt](), t.resume());
|
|
80686
80683
|
};
|
|
80687
|
-
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[
|
|
80684
|
+
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();
|
|
80688
80685
|
});
|
|
80689
80686
|
}
|
|
80690
|
-
[
|
|
80687
|
+
[br](t) {
|
|
80691
80688
|
t.unsupported = true, this.warn("TAR_ENTRY_UNSUPPORTED", `unsupported entry type: ${t.type}`, { entry: t }), t.resume();
|
|
80692
80689
|
}
|
|
80693
|
-
[
|
|
80690
|
+
[yr](t, e) {
|
|
80694
80691
|
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("/");
|
|
80695
|
-
this[ye](t, this.cwd, i, () => this[
|
|
80692
|
+
this[ye](t, this.cwd, i, () => this[Si](t, String(t.linkpath), "symlink", e), (r) => {
|
|
80696
80693
|
this[O](r, t), e();
|
|
80697
80694
|
});
|
|
80698
80695
|
}
|
|
80699
|
-
[
|
|
80696
|
+
[Rr](t, e) {
|
|
80700
80697
|
let i = f(import_node_path5.default.resolve(this.cwd, String(t.linkpath))), r = f(String(t.linkpath)).split("/");
|
|
80701
|
-
this[ye](t, this.cwd, r, () => this[
|
|
80698
|
+
this[ye](t, this.cwd, r, () => this[Si](t, i, "link", e), (n) => {
|
|
80702
80699
|
this[O](n, t), e();
|
|
80703
80700
|
});
|
|
80704
80701
|
}
|
|
@@ -80712,24 +80709,24 @@ var qt = class extends st {
|
|
|
80712
80709
|
this[ye](t, h, i, r, n);
|
|
80713
80710
|
});
|
|
80714
80711
|
}
|
|
80715
|
-
[
|
|
80716
|
-
this[
|
|
80712
|
+
[gr]() {
|
|
80713
|
+
this[wi]++;
|
|
80717
80714
|
}
|
|
80718
80715
|
[Xt]() {
|
|
80719
|
-
this[
|
|
80716
|
+
this[wi]--, this[Ss]();
|
|
80720
80717
|
}
|
|
80721
80718
|
[gs](t) {
|
|
80722
80719
|
this[Xt](), t.resume();
|
|
80723
80720
|
}
|
|
80724
|
-
[
|
|
80721
|
+
[Rs](t, e) {
|
|
80725
80722
|
return t.type === "File" && !this.unlink && e.isFile() && e.nlink <= 1 && !Oe;
|
|
80726
80723
|
}
|
|
80727
|
-
[
|
|
80728
|
-
this[
|
|
80724
|
+
[ys](t) {
|
|
80725
|
+
this[gr]();
|
|
80729
80726
|
let e = [t.path];
|
|
80730
|
-
t.linkpath && e.push(t.linkpath), this.reservations.reserve(e, (i) => this[
|
|
80727
|
+
t.linkpath && e.push(t.linkpath), this.reservations.reserve(e, (i) => this[Sr](t, i));
|
|
80731
80728
|
}
|
|
80732
|
-
[
|
|
80729
|
+
[Sr](t, e) {
|
|
80733
80730
|
let i = (h) => {
|
|
80734
80731
|
e(h);
|
|
80735
80732
|
}, r = () => {
|
|
@@ -80738,7 +80735,7 @@ var qt = class extends st {
|
|
|
80738
80735
|
this[O](h, t), i();
|
|
80739
80736
|
return;
|
|
80740
80737
|
}
|
|
80741
|
-
this[
|
|
80738
|
+
this[ge] = true, n();
|
|
80742
80739
|
});
|
|
80743
80740
|
}, n = () => {
|
|
80744
80741
|
if (t.absolute !== this.cwd) {
|
|
@@ -80758,7 +80755,7 @@ var qt = class extends st {
|
|
|
80758
80755
|
this[gs](t), i();
|
|
80759
80756
|
return;
|
|
80760
80757
|
}
|
|
80761
|
-
if (h || this[
|
|
80758
|
+
if (h || this[Rs](t, a)) return this[P](null, t, i);
|
|
80762
80759
|
if (a.isDirectory()) {
|
|
80763
80760
|
if (t.type === "Directory") {
|
|
80764
80761
|
let l = this.chmod && t.mode && (a.mode & 4095) !== t.mode, c = (d) => this[P](d ?? null, t, i);
|
|
@@ -80767,10 +80764,10 @@ var qt = class extends st {
|
|
|
80767
80764
|
if (t.absolute !== this.cwd) return import_node_fs3.default.rmdir(String(t.absolute), (l) => this[P](l ?? null, t, i));
|
|
80768
80765
|
}
|
|
80769
80766
|
if (t.absolute === this.cwd) return this[P](null, t, i);
|
|
80770
|
-
|
|
80767
|
+
ro(String(t.absolute), (l) => this[P](l ?? null, t, i));
|
|
80771
80768
|
});
|
|
80772
80769
|
};
|
|
80773
|
-
this[
|
|
80770
|
+
this[ge] ? n() : r();
|
|
80774
80771
|
}
|
|
80775
80772
|
[P](t, e, i) {
|
|
80776
80773
|
if (t) {
|
|
@@ -80781,17 +80778,17 @@ var qt = class extends st {
|
|
|
80781
80778
|
case "File":
|
|
80782
80779
|
case "OldFile":
|
|
80783
80780
|
case "ContiguousFile":
|
|
80784
|
-
return this[
|
|
80781
|
+
return this[bs](e, i);
|
|
80785
80782
|
case "Link":
|
|
80786
|
-
return this[br](e, i);
|
|
80787
|
-
case "SymbolicLink":
|
|
80788
80783
|
return this[Rr](e, i);
|
|
80784
|
+
case "SymbolicLink":
|
|
80785
|
+
return this[yr](e, i);
|
|
80789
80786
|
case "Directory":
|
|
80790
80787
|
case "GNUDumpDir":
|
|
80791
|
-
return this[
|
|
80788
|
+
return this[_s](e, i);
|
|
80792
80789
|
}
|
|
80793
80790
|
}
|
|
80794
|
-
[
|
|
80791
|
+
[Si](t, e, i, r) {
|
|
80795
80792
|
import_node_fs3.default[i](e, String(t.absolute), (n) => {
|
|
80796
80793
|
n ? this[O](n, t) : (this[Xt](), t.resume()), r();
|
|
80797
80794
|
});
|
|
@@ -80810,11 +80807,11 @@ var Te = class extends qt {
|
|
|
80810
80807
|
return super[P](t, e, () => {
|
|
80811
80808
|
});
|
|
80812
80809
|
}
|
|
80813
|
-
[
|
|
80814
|
-
if (!this[
|
|
80810
|
+
[ys](t) {
|
|
80811
|
+
if (!this[ge]) {
|
|
80815
80812
|
let n = this[St](this.cwd, this.dmode);
|
|
80816
80813
|
if (n) return this[O](n, t);
|
|
80817
|
-
this[
|
|
80814
|
+
this[ge] = true;
|
|
80818
80815
|
}
|
|
80819
80816
|
if (t.absolute !== this.cwd) {
|
|
80820
80817
|
let n = f(import_node_path5.default.dirname(String(t.absolute)));
|
|
@@ -80825,7 +80822,7 @@ var Te = class extends qt {
|
|
|
80825
80822
|
}
|
|
80826
80823
|
let [e, i] = Se(() => import_node_fs3.default.lstatSync(String(t.absolute)));
|
|
80827
80824
|
if (i && (this.keep || this.newer && i.mtime > (t.mtime ?? i.mtime))) return this[gs](t);
|
|
80828
|
-
if (e || this[
|
|
80825
|
+
if (e || this[Rs](t, i)) return this[P](null, t);
|
|
80829
80826
|
if (i.isDirectory()) {
|
|
80830
80827
|
if (t.type === "Directory") {
|
|
80831
80828
|
let o = this.chmod && t.mode && (i.mode & 4095) !== t.mode, [h] = o ? Se(() => {
|
|
@@ -80836,10 +80833,10 @@ var Te = class extends qt {
|
|
|
80836
80833
|
let [n] = Se(() => import_node_fs3.default.rmdirSync(String(t.absolute)));
|
|
80837
80834
|
this[P](n, t);
|
|
80838
80835
|
}
|
|
80839
|
-
let [r] = t.absolute === this.cwd ? [] : Se(() =>
|
|
80836
|
+
let [r] = t.absolute === this.cwd ? [] : Se(() => no(String(t.absolute)));
|
|
80840
80837
|
this[P](r, t);
|
|
80841
80838
|
}
|
|
80842
|
-
[
|
|
80839
|
+
[bs](t, e) {
|
|
80843
80840
|
let i = typeof t.mode == "number" ? t.mode & 4095 : this.fmode, r = (h) => {
|
|
80844
80841
|
let a;
|
|
80845
80842
|
try {
|
|
@@ -80850,7 +80847,7 @@ var Te = class extends qt {
|
|
|
80850
80847
|
(h || a) && this[O](h || a, t), e();
|
|
80851
80848
|
}, n;
|
|
80852
80849
|
try {
|
|
80853
|
-
n = import_node_fs3.default.openSync(String(t.absolute),
|
|
80850
|
+
n = import_node_fs3.default.openSync(String(t.absolute), cs(t.size), i);
|
|
80854
80851
|
} catch (h) {
|
|
80855
80852
|
return r(h);
|
|
80856
80853
|
}
|
|
@@ -80876,7 +80873,7 @@ var Te = class extends qt {
|
|
|
80876
80873
|
}
|
|
80877
80874
|
}
|
|
80878
80875
|
if (this[Re](t)) {
|
|
80879
|
-
let a = this[be](t), l = this[
|
|
80876
|
+
let a = this[be](t), l = this[_e](t);
|
|
80880
80877
|
try {
|
|
80881
80878
|
import_node_fs3.default.fchownSync(n, Number(a), Number(l));
|
|
80882
80879
|
} catch (c) {
|
|
@@ -80890,7 +80887,7 @@ var Te = class extends qt {
|
|
|
80890
80887
|
r(h);
|
|
80891
80888
|
});
|
|
80892
80889
|
}
|
|
80893
|
-
[
|
|
80890
|
+
[_s](t, e) {
|
|
80894
80891
|
let i = typeof t.mode == "number" ? t.mode & 4095 : this.dmode, r = this[St](String(t.absolute), i);
|
|
80895
80892
|
if (r) {
|
|
80896
80893
|
this[O](r, t), e();
|
|
@@ -80901,20 +80898,20 @@ var Te = class extends qt {
|
|
|
80901
80898
|
} catch {
|
|
80902
80899
|
}
|
|
80903
80900
|
if (this[Re](t)) try {
|
|
80904
|
-
import_node_fs3.default.chownSync(String(t.absolute), Number(this[be](t)), Number(this[
|
|
80901
|
+
import_node_fs3.default.chownSync(String(t.absolute), Number(this[be](t)), Number(this[_e](t)));
|
|
80905
80902
|
} catch {
|
|
80906
80903
|
}
|
|
80907
80904
|
e(), t.resume();
|
|
80908
80905
|
}
|
|
80909
80906
|
[St](t, e) {
|
|
80910
80907
|
try {
|
|
80911
|
-
return
|
|
80908
|
+
return dr(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 });
|
|
80912
80909
|
} catch (i) {
|
|
80913
80910
|
return i;
|
|
80914
80911
|
}
|
|
80915
80912
|
}
|
|
80916
80913
|
[ye](t, e, i, r, n) {
|
|
80917
|
-
if (this.preservePaths ||
|
|
80914
|
+
if (this.preservePaths || i.length === 0) return r();
|
|
80918
80915
|
let o = e;
|
|
80919
80916
|
for (let h of i) {
|
|
80920
80917
|
o = import_node_path5.default.resolve(o, h);
|
|
@@ -80924,7 +80921,7 @@ var Te = class extends qt {
|
|
|
80924
80921
|
}
|
|
80925
80922
|
r();
|
|
80926
80923
|
}
|
|
80927
|
-
[
|
|
80924
|
+
[Si](t, e, i, r) {
|
|
80928
80925
|
let n = `${i}Sync`;
|
|
80929
80926
|
try {
|
|
80930
80927
|
import_node_fs3.default[n](e, String(t.absolute)), r(), t.resume();
|
|
@@ -80933,26 +80930,26 @@ var Te = class extends qt {
|
|
|
80933
80930
|
}
|
|
80934
80931
|
}
|
|
80935
80932
|
};
|
|
80936
|
-
var
|
|
80933
|
+
var oo = (s3) => {
|
|
80937
80934
|
let t = new Te(s3), e = s3.file, i = import_node_fs2.default.statSync(e), r = s3.maxReadSize || 16 * 1024 * 1024;
|
|
80938
|
-
new
|
|
80935
|
+
new Me(e, { readSize: r, size: i.size }).pipe(t);
|
|
80939
80936
|
};
|
|
80940
|
-
var
|
|
80937
|
+
var ho = (s3, t) => {
|
|
80941
80938
|
let e = new qt(s3), i = s3.maxReadSize || 16 * 1024 * 1024, r = s3.file;
|
|
80942
80939
|
return new Promise((o, h) => {
|
|
80943
80940
|
e.on("error", h), e.on("close", o), import_node_fs2.default.stat(r, (a, l) => {
|
|
80944
80941
|
if (a) h(a);
|
|
80945
80942
|
else {
|
|
80946
|
-
let c = new
|
|
80943
|
+
let c = new _t(r, { readSize: i, size: l.size });
|
|
80947
80944
|
c.on("error", h), c.pipe(e);
|
|
80948
80945
|
}
|
|
80949
80946
|
});
|
|
80950
80947
|
});
|
|
80951
80948
|
};
|
|
80952
|
-
var
|
|
80953
|
-
t?.length &&
|
|
80949
|
+
var ao = K(oo, ho, (s3) => new Te(s3), (s3) => new qt(s3), (s3, t) => {
|
|
80950
|
+
t?.length && Ki(s3, t);
|
|
80954
80951
|
});
|
|
80955
|
-
var
|
|
80952
|
+
var lo = (s3, t) => {
|
|
80956
80953
|
let e = new kt(s3), i = true, r, n;
|
|
80957
80954
|
try {
|
|
80958
80955
|
try {
|
|
@@ -80973,7 +80970,7 @@ var co = (s3, t) => {
|
|
|
80973
80970
|
if (n + l + 512 > o.size) break;
|
|
80974
80971
|
n += l, s3.mtimeCache && a.mtime && s3.mtimeCache.set(String(a.path), a.mtime);
|
|
80975
80972
|
}
|
|
80976
|
-
i = false,
|
|
80973
|
+
i = false, co(s3, e, n, r, t);
|
|
80977
80974
|
} finally {
|
|
80978
80975
|
if (i) try {
|
|
80979
80976
|
import_node_fs6.default.closeSync(r);
|
|
@@ -80981,11 +80978,11 @@ var co = (s3, t) => {
|
|
|
80981
80978
|
}
|
|
80982
80979
|
}
|
|
80983
80980
|
};
|
|
80984
|
-
var
|
|
80981
|
+
var co = (s3, t, e, i, r) => {
|
|
80985
80982
|
let n = new Wt(s3.file, { fd: i, start: e });
|
|
80986
|
-
t.pipe(n),
|
|
80983
|
+
t.pipe(n), uo(t, r);
|
|
80987
80984
|
};
|
|
80988
|
-
var
|
|
80985
|
+
var fo = (s3, t) => {
|
|
80989
80986
|
t = Array.from(t);
|
|
80990
80987
|
let e = new Et(s3), i = (n, o, h) => {
|
|
80991
80988
|
let a = (T, N) => {
|
|
@@ -80993,7 +80990,7 @@ var uo = (s3, t) => {
|
|
|
80993
80990
|
}, l = 0;
|
|
80994
80991
|
if (o === 0) return a(null, 0);
|
|
80995
80992
|
let c = 0, d = Buffer.alloc(512), S = (T, N) => {
|
|
80996
|
-
if (T ||
|
|
80993
|
+
if (T || N === void 0) return a(T);
|
|
80997
80994
|
if (c += N, c < 512 && N) return import_node_fs6.default.read(n, d, c, d.length - c, l + c, S);
|
|
80998
80995
|
if (l === 0 && d[0] === 31 && d[1] === 139) return a(new Error("cannot append to compressed archives"));
|
|
80999
80996
|
if (c < 512) return a(null, l);
|
|
@@ -81015,38 +81012,35 @@ var uo = (s3, t) => {
|
|
|
81015
81012
|
i(c, S.size, (T, N) => {
|
|
81016
81013
|
if (T) return o(T);
|
|
81017
81014
|
let E = new tt(s3.file, { fd: c, start: N });
|
|
81018
|
-
e.pipe(E), E.on("error", o), E.on("close", n),
|
|
81015
|
+
e.pipe(E), E.on("error", o), E.on("close", n), mo(e, t);
|
|
81019
81016
|
});
|
|
81020
81017
|
});
|
|
81021
81018
|
};
|
|
81022
81019
|
import_node_fs6.default.open(s3.file, h, a);
|
|
81023
81020
|
});
|
|
81024
81021
|
};
|
|
81025
|
-
var
|
|
81022
|
+
var uo = (s3, t) => {
|
|
81026
81023
|
t.forEach((e) => {
|
|
81027
81024
|
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);
|
|
81028
81025
|
}), s3.end();
|
|
81029
81026
|
};
|
|
81030
|
-
var
|
|
81031
|
-
for (let e
|
|
81032
|
-
let i = String(t[e]);
|
|
81033
|
-
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);
|
|
81034
|
-
}
|
|
81027
|
+
var mo = async (s3, t) => {
|
|
81028
|
+
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);
|
|
81035
81029
|
s3.end();
|
|
81036
81030
|
};
|
|
81037
|
-
var vt = K(
|
|
81031
|
+
var vt = K(lo, fo, () => {
|
|
81038
81032
|
throw new TypeError("file is required");
|
|
81039
81033
|
}, () => {
|
|
81040
81034
|
throw new TypeError("file is required");
|
|
81041
81035
|
}, (s3, t) => {
|
|
81042
|
-
if (!
|
|
81036
|
+
if (!Fs(s3)) throw new TypeError("file is required");
|
|
81043
81037
|
if (s3.gzip || s3.brotli || s3.zstd || s3.file.endsWith(".br") || s3.file.endsWith(".tbr")) throw new TypeError("cannot append to compressed archives");
|
|
81044
81038
|
if (!t?.length) throw new TypeError("no paths specified to add/replace");
|
|
81045
81039
|
});
|
|
81046
|
-
var
|
|
81047
|
-
vt.validate?.(s3, t),
|
|
81040
|
+
var po = K(vt.syncFile, vt.asyncFile, vt.syncNoFile, vt.asyncNoFile, (s3, t = []) => {
|
|
81041
|
+
vt.validate?.(s3, t), Eo(s3);
|
|
81048
81042
|
});
|
|
81049
|
-
var
|
|
81043
|
+
var Eo = (s3) => {
|
|
81050
81044
|
let t = s3.filter;
|
|
81051
81045
|
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));
|
|
81052
81046
|
};
|
|
@@ -81237,7 +81231,7 @@ var Client = class _Client {
|
|
|
81237
81231
|
"x-sdk-name": "Console",
|
|
81238
81232
|
"x-sdk-platform": "console",
|
|
81239
81233
|
"x-sdk-language": "web",
|
|
81240
|
-
"x-sdk-version": "
|
|
81234
|
+
"x-sdk-version": "6.0.0",
|
|
81241
81235
|
"X-Appwrite-Response-Format": "1.8.0"
|
|
81242
81236
|
};
|
|
81243
81237
|
this.realtime = {
|
|
@@ -92636,247 +92630,6 @@ var Projects = class {
|
|
|
92636
92630
|
};
|
|
92637
92631
|
return this.client.call("delete", uri, apiHeaders, payload);
|
|
92638
92632
|
}
|
|
92639
|
-
listWebhooks(paramsOrFirst, ...rest) {
|
|
92640
|
-
let params;
|
|
92641
|
-
if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
|
|
92642
|
-
params = paramsOrFirst || {};
|
|
92643
|
-
} else {
|
|
92644
|
-
params = {
|
|
92645
|
-
projectId: paramsOrFirst,
|
|
92646
|
-
total: rest[0]
|
|
92647
|
-
};
|
|
92648
|
-
}
|
|
92649
|
-
const projectId = params.projectId;
|
|
92650
|
-
const total = params.total;
|
|
92651
|
-
if (typeof projectId === "undefined") {
|
|
92652
|
-
throw new AppwriteException('Missing required parameter: "projectId"');
|
|
92653
|
-
}
|
|
92654
|
-
const apiPath = "/projects/{projectId}/webhooks".replace("{projectId}", projectId);
|
|
92655
|
-
const payload = {};
|
|
92656
|
-
if (typeof total !== "undefined") {
|
|
92657
|
-
payload["total"] = total;
|
|
92658
|
-
}
|
|
92659
|
-
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
92660
|
-
const apiHeaders = {};
|
|
92661
|
-
return this.client.call("get", uri, apiHeaders, payload);
|
|
92662
|
-
}
|
|
92663
|
-
createWebhook(paramsOrFirst, ...rest) {
|
|
92664
|
-
let params;
|
|
92665
|
-
if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
|
|
92666
|
-
params = paramsOrFirst || {};
|
|
92667
|
-
} else {
|
|
92668
|
-
params = {
|
|
92669
|
-
projectId: paramsOrFirst,
|
|
92670
|
-
name: rest[0],
|
|
92671
|
-
events: rest[1],
|
|
92672
|
-
url: rest[2],
|
|
92673
|
-
security: rest[3],
|
|
92674
|
-
enabled: rest[4],
|
|
92675
|
-
httpUser: rest[5],
|
|
92676
|
-
httpPass: rest[6]
|
|
92677
|
-
};
|
|
92678
|
-
}
|
|
92679
|
-
const projectId = params.projectId;
|
|
92680
|
-
const name = params.name;
|
|
92681
|
-
const events = params.events;
|
|
92682
|
-
const url2 = params.url;
|
|
92683
|
-
const security = params.security;
|
|
92684
|
-
const enabled = params.enabled;
|
|
92685
|
-
const httpUser = params.httpUser;
|
|
92686
|
-
const httpPass = params.httpPass;
|
|
92687
|
-
if (typeof projectId === "undefined") {
|
|
92688
|
-
throw new AppwriteException('Missing required parameter: "projectId"');
|
|
92689
|
-
}
|
|
92690
|
-
if (typeof name === "undefined") {
|
|
92691
|
-
throw new AppwriteException('Missing required parameter: "name"');
|
|
92692
|
-
}
|
|
92693
|
-
if (typeof events === "undefined") {
|
|
92694
|
-
throw new AppwriteException('Missing required parameter: "events"');
|
|
92695
|
-
}
|
|
92696
|
-
if (typeof url2 === "undefined") {
|
|
92697
|
-
throw new AppwriteException('Missing required parameter: "url"');
|
|
92698
|
-
}
|
|
92699
|
-
if (typeof security === "undefined") {
|
|
92700
|
-
throw new AppwriteException('Missing required parameter: "security"');
|
|
92701
|
-
}
|
|
92702
|
-
const apiPath = "/projects/{projectId}/webhooks".replace("{projectId}", projectId);
|
|
92703
|
-
const payload = {};
|
|
92704
|
-
if (typeof name !== "undefined") {
|
|
92705
|
-
payload["name"] = name;
|
|
92706
|
-
}
|
|
92707
|
-
if (typeof enabled !== "undefined") {
|
|
92708
|
-
payload["enabled"] = enabled;
|
|
92709
|
-
}
|
|
92710
|
-
if (typeof events !== "undefined") {
|
|
92711
|
-
payload["events"] = events;
|
|
92712
|
-
}
|
|
92713
|
-
if (typeof url2 !== "undefined") {
|
|
92714
|
-
payload["url"] = url2;
|
|
92715
|
-
}
|
|
92716
|
-
if (typeof security !== "undefined") {
|
|
92717
|
-
payload["security"] = security;
|
|
92718
|
-
}
|
|
92719
|
-
if (typeof httpUser !== "undefined") {
|
|
92720
|
-
payload["httpUser"] = httpUser;
|
|
92721
|
-
}
|
|
92722
|
-
if (typeof httpPass !== "undefined") {
|
|
92723
|
-
payload["httpPass"] = httpPass;
|
|
92724
|
-
}
|
|
92725
|
-
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
92726
|
-
const apiHeaders = {
|
|
92727
|
-
"content-type": "application/json"
|
|
92728
|
-
};
|
|
92729
|
-
return this.client.call("post", uri, apiHeaders, payload);
|
|
92730
|
-
}
|
|
92731
|
-
getWebhook(paramsOrFirst, ...rest) {
|
|
92732
|
-
let params;
|
|
92733
|
-
if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
|
|
92734
|
-
params = paramsOrFirst || {};
|
|
92735
|
-
} else {
|
|
92736
|
-
params = {
|
|
92737
|
-
projectId: paramsOrFirst,
|
|
92738
|
-
webhookId: rest[0]
|
|
92739
|
-
};
|
|
92740
|
-
}
|
|
92741
|
-
const projectId = params.projectId;
|
|
92742
|
-
const webhookId = params.webhookId;
|
|
92743
|
-
if (typeof projectId === "undefined") {
|
|
92744
|
-
throw new AppwriteException('Missing required parameter: "projectId"');
|
|
92745
|
-
}
|
|
92746
|
-
if (typeof webhookId === "undefined") {
|
|
92747
|
-
throw new AppwriteException('Missing required parameter: "webhookId"');
|
|
92748
|
-
}
|
|
92749
|
-
const apiPath = "/projects/{projectId}/webhooks/{webhookId}".replace("{projectId}", projectId).replace("{webhookId}", webhookId);
|
|
92750
|
-
const payload = {};
|
|
92751
|
-
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
92752
|
-
const apiHeaders = {};
|
|
92753
|
-
return this.client.call("get", uri, apiHeaders, payload);
|
|
92754
|
-
}
|
|
92755
|
-
updateWebhook(paramsOrFirst, ...rest) {
|
|
92756
|
-
let params;
|
|
92757
|
-
if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
|
|
92758
|
-
params = paramsOrFirst || {};
|
|
92759
|
-
} else {
|
|
92760
|
-
params = {
|
|
92761
|
-
projectId: paramsOrFirst,
|
|
92762
|
-
webhookId: rest[0],
|
|
92763
|
-
name: rest[1],
|
|
92764
|
-
events: rest[2],
|
|
92765
|
-
url: rest[3],
|
|
92766
|
-
security: rest[4],
|
|
92767
|
-
enabled: rest[5],
|
|
92768
|
-
httpUser: rest[6],
|
|
92769
|
-
httpPass: rest[7]
|
|
92770
|
-
};
|
|
92771
|
-
}
|
|
92772
|
-
const projectId = params.projectId;
|
|
92773
|
-
const webhookId = params.webhookId;
|
|
92774
|
-
const name = params.name;
|
|
92775
|
-
const events = params.events;
|
|
92776
|
-
const url2 = params.url;
|
|
92777
|
-
const security = params.security;
|
|
92778
|
-
const enabled = params.enabled;
|
|
92779
|
-
const httpUser = params.httpUser;
|
|
92780
|
-
const httpPass = params.httpPass;
|
|
92781
|
-
if (typeof projectId === "undefined") {
|
|
92782
|
-
throw new AppwriteException('Missing required parameter: "projectId"');
|
|
92783
|
-
}
|
|
92784
|
-
if (typeof webhookId === "undefined") {
|
|
92785
|
-
throw new AppwriteException('Missing required parameter: "webhookId"');
|
|
92786
|
-
}
|
|
92787
|
-
if (typeof name === "undefined") {
|
|
92788
|
-
throw new AppwriteException('Missing required parameter: "name"');
|
|
92789
|
-
}
|
|
92790
|
-
if (typeof events === "undefined") {
|
|
92791
|
-
throw new AppwriteException('Missing required parameter: "events"');
|
|
92792
|
-
}
|
|
92793
|
-
if (typeof url2 === "undefined") {
|
|
92794
|
-
throw new AppwriteException('Missing required parameter: "url"');
|
|
92795
|
-
}
|
|
92796
|
-
if (typeof security === "undefined") {
|
|
92797
|
-
throw new AppwriteException('Missing required parameter: "security"');
|
|
92798
|
-
}
|
|
92799
|
-
const apiPath = "/projects/{projectId}/webhooks/{webhookId}".replace("{projectId}", projectId).replace("{webhookId}", webhookId);
|
|
92800
|
-
const payload = {};
|
|
92801
|
-
if (typeof name !== "undefined") {
|
|
92802
|
-
payload["name"] = name;
|
|
92803
|
-
}
|
|
92804
|
-
if (typeof enabled !== "undefined") {
|
|
92805
|
-
payload["enabled"] = enabled;
|
|
92806
|
-
}
|
|
92807
|
-
if (typeof events !== "undefined") {
|
|
92808
|
-
payload["events"] = events;
|
|
92809
|
-
}
|
|
92810
|
-
if (typeof url2 !== "undefined") {
|
|
92811
|
-
payload["url"] = url2;
|
|
92812
|
-
}
|
|
92813
|
-
if (typeof security !== "undefined") {
|
|
92814
|
-
payload["security"] = security;
|
|
92815
|
-
}
|
|
92816
|
-
if (typeof httpUser !== "undefined") {
|
|
92817
|
-
payload["httpUser"] = httpUser;
|
|
92818
|
-
}
|
|
92819
|
-
if (typeof httpPass !== "undefined") {
|
|
92820
|
-
payload["httpPass"] = httpPass;
|
|
92821
|
-
}
|
|
92822
|
-
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
92823
|
-
const apiHeaders = {
|
|
92824
|
-
"content-type": "application/json"
|
|
92825
|
-
};
|
|
92826
|
-
return this.client.call("put", uri, apiHeaders, payload);
|
|
92827
|
-
}
|
|
92828
|
-
deleteWebhook(paramsOrFirst, ...rest) {
|
|
92829
|
-
let params;
|
|
92830
|
-
if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
|
|
92831
|
-
params = paramsOrFirst || {};
|
|
92832
|
-
} else {
|
|
92833
|
-
params = {
|
|
92834
|
-
projectId: paramsOrFirst,
|
|
92835
|
-
webhookId: rest[0]
|
|
92836
|
-
};
|
|
92837
|
-
}
|
|
92838
|
-
const projectId = params.projectId;
|
|
92839
|
-
const webhookId = params.webhookId;
|
|
92840
|
-
if (typeof projectId === "undefined") {
|
|
92841
|
-
throw new AppwriteException('Missing required parameter: "projectId"');
|
|
92842
|
-
}
|
|
92843
|
-
if (typeof webhookId === "undefined") {
|
|
92844
|
-
throw new AppwriteException('Missing required parameter: "webhookId"');
|
|
92845
|
-
}
|
|
92846
|
-
const apiPath = "/projects/{projectId}/webhooks/{webhookId}".replace("{projectId}", projectId).replace("{webhookId}", webhookId);
|
|
92847
|
-
const payload = {};
|
|
92848
|
-
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
92849
|
-
const apiHeaders = {
|
|
92850
|
-
"content-type": "application/json"
|
|
92851
|
-
};
|
|
92852
|
-
return this.client.call("delete", uri, apiHeaders, payload);
|
|
92853
|
-
}
|
|
92854
|
-
updateWebhookSignature(paramsOrFirst, ...rest) {
|
|
92855
|
-
let params;
|
|
92856
|
-
if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
|
|
92857
|
-
params = paramsOrFirst || {};
|
|
92858
|
-
} else {
|
|
92859
|
-
params = {
|
|
92860
|
-
projectId: paramsOrFirst,
|
|
92861
|
-
webhookId: rest[0]
|
|
92862
|
-
};
|
|
92863
|
-
}
|
|
92864
|
-
const projectId = params.projectId;
|
|
92865
|
-
const webhookId = params.webhookId;
|
|
92866
|
-
if (typeof projectId === "undefined") {
|
|
92867
|
-
throw new AppwriteException('Missing required parameter: "projectId"');
|
|
92868
|
-
}
|
|
92869
|
-
if (typeof webhookId === "undefined") {
|
|
92870
|
-
throw new AppwriteException('Missing required parameter: "webhookId"');
|
|
92871
|
-
}
|
|
92872
|
-
const apiPath = "/projects/{projectId}/webhooks/{webhookId}/signature".replace("{projectId}", projectId).replace("{webhookId}", webhookId);
|
|
92873
|
-
const payload = {};
|
|
92874
|
-
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
92875
|
-
const apiHeaders = {
|
|
92876
|
-
"content-type": "application/json"
|
|
92877
|
-
};
|
|
92878
|
-
return this.client.call("patch", uri, apiHeaders, payload);
|
|
92879
|
-
}
|
|
92880
92633
|
};
|
|
92881
92634
|
var Proxy2 = class {
|
|
92882
92635
|
constructor(client) {
|
|
@@ -98668,6 +98421,8 @@ var Scopes;
|
|
|
98668
98421
|
Scopes2["AssistantRead"] = "assistant.read";
|
|
98669
98422
|
Scopes2["TokensRead"] = "tokens.read";
|
|
98670
98423
|
Scopes2["TokensWrite"] = "tokens.write";
|
|
98424
|
+
Scopes2["WebhooksRead"] = "webhooks.read";
|
|
98425
|
+
Scopes2["WebhooksWrite"] = "webhooks.write";
|
|
98671
98426
|
Scopes2["PoliciesWrite"] = "policies.write";
|
|
98672
98427
|
Scopes2["PoliciesRead"] = "policies.read";
|
|
98673
98428
|
Scopes2["ArchivesRead"] = "archives.read";
|
|
@@ -99517,9 +99272,6 @@ var Runtime;
|
|
|
99517
99272
|
Runtime2["Pythonml311"] = "python-ml-3.11";
|
|
99518
99273
|
Runtime2["Pythonml312"] = "python-ml-3.12";
|
|
99519
99274
|
Runtime2["Pythonml313"] = "python-ml-3.13";
|
|
99520
|
-
Runtime2["Deno121"] = "deno-1.21";
|
|
99521
|
-
Runtime2["Deno124"] = "deno-1.24";
|
|
99522
|
-
Runtime2["Deno135"] = "deno-1.35";
|
|
99523
99275
|
Runtime2["Deno140"] = "deno-1.40";
|
|
99524
99276
|
Runtime2["Deno146"] = "deno-1.46";
|
|
99525
99277
|
Runtime2["Deno20"] = "deno-2.0";
|
|
@@ -99575,6 +99327,92 @@ var Runtime;
|
|
|
99575
99327
|
Runtime2["Flutter332"] = "flutter-3.32";
|
|
99576
99328
|
Runtime2["Flutter335"] = "flutter-3.35";
|
|
99577
99329
|
Runtime2["Flutter338"] = "flutter-3.38";
|
|
99330
|
+
Runtime2["Node145rc"] = "node-14.5-rc";
|
|
99331
|
+
Runtime2["Node160rc"] = "node-16.0-rc";
|
|
99332
|
+
Runtime2["Node180rc"] = "node-18.0-rc";
|
|
99333
|
+
Runtime2["Node190rc"] = "node-19.0-rc";
|
|
99334
|
+
Runtime2["Node200rc"] = "node-20.0-rc";
|
|
99335
|
+
Runtime2["Node210rc"] = "node-21.0-rc";
|
|
99336
|
+
Runtime2["Node22rc"] = "node-22-rc";
|
|
99337
|
+
Runtime2["Node23rc"] = "node-23-rc";
|
|
99338
|
+
Runtime2["Node24rc"] = "node-24-rc";
|
|
99339
|
+
Runtime2["Node25rc"] = "node-25-rc";
|
|
99340
|
+
Runtime2["Php80rc"] = "php-8.0-rc";
|
|
99341
|
+
Runtime2["Php81rc"] = "php-8.1-rc";
|
|
99342
|
+
Runtime2["Php82rc"] = "php-8.2-rc";
|
|
99343
|
+
Runtime2["Php83rc"] = "php-8.3-rc";
|
|
99344
|
+
Runtime2["Php84rc"] = "php-8.4-rc";
|
|
99345
|
+
Runtime2["Ruby30rc"] = "ruby-3.0-rc";
|
|
99346
|
+
Runtime2["Ruby31rc"] = "ruby-3.1-rc";
|
|
99347
|
+
Runtime2["Ruby32rc"] = "ruby-3.2-rc";
|
|
99348
|
+
Runtime2["Ruby33rc"] = "ruby-3.3-rc";
|
|
99349
|
+
Runtime2["Ruby34rc"] = "ruby-3.4-rc";
|
|
99350
|
+
Runtime2["Ruby40rc"] = "ruby-4.0-rc";
|
|
99351
|
+
Runtime2["Python38rc"] = "python-3.8-rc";
|
|
99352
|
+
Runtime2["Python39rc"] = "python-3.9-rc";
|
|
99353
|
+
Runtime2["Python310rc"] = "python-3.10-rc";
|
|
99354
|
+
Runtime2["Python311rc"] = "python-3.11-rc";
|
|
99355
|
+
Runtime2["Python312rc"] = "python-3.12-rc";
|
|
99356
|
+
Runtime2["Python313rc"] = "python-3.13-rc";
|
|
99357
|
+
Runtime2["Python314rc"] = "python-3.14-rc";
|
|
99358
|
+
Runtime2["Pythonml311rc"] = "python-ml-3.11-rc";
|
|
99359
|
+
Runtime2["Pythonml312rc"] = "python-ml-3.12-rc";
|
|
99360
|
+
Runtime2["Pythonml313rc"] = "python-ml-3.13-rc";
|
|
99361
|
+
Runtime2["Deno140rc"] = "deno-1.40-rc";
|
|
99362
|
+
Runtime2["Deno146rc"] = "deno-1.46-rc";
|
|
99363
|
+
Runtime2["Deno20rc"] = "deno-2.0-rc";
|
|
99364
|
+
Runtime2["Deno25rc"] = "deno-2.5-rc";
|
|
99365
|
+
Runtime2["Deno26rc"] = "deno-2.6-rc";
|
|
99366
|
+
Runtime2["Dart215rc"] = "dart-2.15-rc";
|
|
99367
|
+
Runtime2["Dart216rc"] = "dart-2.16-rc";
|
|
99368
|
+
Runtime2["Dart217rc"] = "dart-2.17-rc";
|
|
99369
|
+
Runtime2["Dart218rc"] = "dart-2.18-rc";
|
|
99370
|
+
Runtime2["Dart219rc"] = "dart-2.19-rc";
|
|
99371
|
+
Runtime2["Dart30rc"] = "dart-3.0-rc";
|
|
99372
|
+
Runtime2["Dart31rc"] = "dart-3.1-rc";
|
|
99373
|
+
Runtime2["Dart33rc"] = "dart-3.3-rc";
|
|
99374
|
+
Runtime2["Dart35rc"] = "dart-3.5-rc";
|
|
99375
|
+
Runtime2["Dart38rc"] = "dart-3.8-rc";
|
|
99376
|
+
Runtime2["Dart39rc"] = "dart-3.9-rc";
|
|
99377
|
+
Runtime2["Dart310rc"] = "dart-3.10-rc";
|
|
99378
|
+
Runtime2["Dotnet60rc"] = "dotnet-6.0-rc";
|
|
99379
|
+
Runtime2["Dotnet70rc"] = "dotnet-7.0-rc";
|
|
99380
|
+
Runtime2["Dotnet80rc"] = "dotnet-8.0-rc";
|
|
99381
|
+
Runtime2["Dotnet10rc"] = "dotnet-10-rc";
|
|
99382
|
+
Runtime2["Java80rc"] = "java-8.0-rc";
|
|
99383
|
+
Runtime2["Java110rc"] = "java-11.0-rc";
|
|
99384
|
+
Runtime2["Java170rc"] = "java-17.0-rc";
|
|
99385
|
+
Runtime2["Java180rc"] = "java-18.0-rc";
|
|
99386
|
+
Runtime2["Java210rc"] = "java-21.0-rc";
|
|
99387
|
+
Runtime2["Java22rc"] = "java-22-rc";
|
|
99388
|
+
Runtime2["Java25rc"] = "java-25-rc";
|
|
99389
|
+
Runtime2["Swift55rc"] = "swift-5.5-rc";
|
|
99390
|
+
Runtime2["Swift58rc"] = "swift-5.8-rc";
|
|
99391
|
+
Runtime2["Swift59rc"] = "swift-5.9-rc";
|
|
99392
|
+
Runtime2["Swift510rc"] = "swift-5.10-rc";
|
|
99393
|
+
Runtime2["Swift62rc"] = "swift-6.2-rc";
|
|
99394
|
+
Runtime2["Kotlin16rc"] = "kotlin-1.6-rc";
|
|
99395
|
+
Runtime2["Kotlin18rc"] = "kotlin-1.8-rc";
|
|
99396
|
+
Runtime2["Kotlin19rc"] = "kotlin-1.9-rc";
|
|
99397
|
+
Runtime2["Kotlin20rc"] = "kotlin-2.0-rc";
|
|
99398
|
+
Runtime2["Kotlin23rc"] = "kotlin-2.3-rc";
|
|
99399
|
+
Runtime2["Cpp17rc"] = "cpp-17-rc";
|
|
99400
|
+
Runtime2["Cpp20rc"] = "cpp-20-rc";
|
|
99401
|
+
Runtime2["Bun10rc"] = "bun-1.0-rc";
|
|
99402
|
+
Runtime2["Bun11rc"] = "bun-1.1-rc";
|
|
99403
|
+
Runtime2["Bun12rc"] = "bun-1.2-rc";
|
|
99404
|
+
Runtime2["Bun13rc"] = "bun-1.3-rc";
|
|
99405
|
+
Runtime2["Go123rc"] = "go-1.23-rc";
|
|
99406
|
+
Runtime2["Go124rc"] = "go-1.24-rc";
|
|
99407
|
+
Runtime2["Go125rc"] = "go-1.25-rc";
|
|
99408
|
+
Runtime2["Go126rc"] = "go-1.26-rc";
|
|
99409
|
+
Runtime2["Static1rc"] = "static-1-rc";
|
|
99410
|
+
Runtime2["Flutter324rc"] = "flutter-3.24-rc";
|
|
99411
|
+
Runtime2["Flutter327rc"] = "flutter-3.27-rc";
|
|
99412
|
+
Runtime2["Flutter329rc"] = "flutter-3.29-rc";
|
|
99413
|
+
Runtime2["Flutter332rc"] = "flutter-3.32-rc";
|
|
99414
|
+
Runtime2["Flutter335rc"] = "flutter-3.35-rc";
|
|
99415
|
+
Runtime2["Flutter338rc"] = "flutter-3.38-rc";
|
|
99578
99416
|
})(Runtime || (Runtime = {}));
|
|
99579
99417
|
var Runtimes;
|
|
99580
99418
|
(function(Runtimes2) {
|
|
@@ -99609,9 +99447,6 @@ var Runtimes;
|
|
|
99609
99447
|
Runtimes2["Pythonml311"] = "python-ml-3.11";
|
|
99610
99448
|
Runtimes2["Pythonml312"] = "python-ml-3.12";
|
|
99611
99449
|
Runtimes2["Pythonml313"] = "python-ml-3.13";
|
|
99612
|
-
Runtimes2["Deno121"] = "deno-1.21";
|
|
99613
|
-
Runtimes2["Deno124"] = "deno-1.24";
|
|
99614
|
-
Runtimes2["Deno135"] = "deno-1.35";
|
|
99615
99450
|
Runtimes2["Deno140"] = "deno-1.40";
|
|
99616
99451
|
Runtimes2["Deno146"] = "deno-1.46";
|
|
99617
99452
|
Runtimes2["Deno20"] = "deno-2.0";
|
|
@@ -99667,6 +99502,92 @@ var Runtimes;
|
|
|
99667
99502
|
Runtimes2["Flutter332"] = "flutter-3.32";
|
|
99668
99503
|
Runtimes2["Flutter335"] = "flutter-3.35";
|
|
99669
99504
|
Runtimes2["Flutter338"] = "flutter-3.38";
|
|
99505
|
+
Runtimes2["Node145rc"] = "node-14.5-rc";
|
|
99506
|
+
Runtimes2["Node160rc"] = "node-16.0-rc";
|
|
99507
|
+
Runtimes2["Node180rc"] = "node-18.0-rc";
|
|
99508
|
+
Runtimes2["Node190rc"] = "node-19.0-rc";
|
|
99509
|
+
Runtimes2["Node200rc"] = "node-20.0-rc";
|
|
99510
|
+
Runtimes2["Node210rc"] = "node-21.0-rc";
|
|
99511
|
+
Runtimes2["Node22rc"] = "node-22-rc";
|
|
99512
|
+
Runtimes2["Node23rc"] = "node-23-rc";
|
|
99513
|
+
Runtimes2["Node24rc"] = "node-24-rc";
|
|
99514
|
+
Runtimes2["Node25rc"] = "node-25-rc";
|
|
99515
|
+
Runtimes2["Php80rc"] = "php-8.0-rc";
|
|
99516
|
+
Runtimes2["Php81rc"] = "php-8.1-rc";
|
|
99517
|
+
Runtimes2["Php82rc"] = "php-8.2-rc";
|
|
99518
|
+
Runtimes2["Php83rc"] = "php-8.3-rc";
|
|
99519
|
+
Runtimes2["Php84rc"] = "php-8.4-rc";
|
|
99520
|
+
Runtimes2["Ruby30rc"] = "ruby-3.0-rc";
|
|
99521
|
+
Runtimes2["Ruby31rc"] = "ruby-3.1-rc";
|
|
99522
|
+
Runtimes2["Ruby32rc"] = "ruby-3.2-rc";
|
|
99523
|
+
Runtimes2["Ruby33rc"] = "ruby-3.3-rc";
|
|
99524
|
+
Runtimes2["Ruby34rc"] = "ruby-3.4-rc";
|
|
99525
|
+
Runtimes2["Ruby40rc"] = "ruby-4.0-rc";
|
|
99526
|
+
Runtimes2["Python38rc"] = "python-3.8-rc";
|
|
99527
|
+
Runtimes2["Python39rc"] = "python-3.9-rc";
|
|
99528
|
+
Runtimes2["Python310rc"] = "python-3.10-rc";
|
|
99529
|
+
Runtimes2["Python311rc"] = "python-3.11-rc";
|
|
99530
|
+
Runtimes2["Python312rc"] = "python-3.12-rc";
|
|
99531
|
+
Runtimes2["Python313rc"] = "python-3.13-rc";
|
|
99532
|
+
Runtimes2["Python314rc"] = "python-3.14-rc";
|
|
99533
|
+
Runtimes2["Pythonml311rc"] = "python-ml-3.11-rc";
|
|
99534
|
+
Runtimes2["Pythonml312rc"] = "python-ml-3.12-rc";
|
|
99535
|
+
Runtimes2["Pythonml313rc"] = "python-ml-3.13-rc";
|
|
99536
|
+
Runtimes2["Deno140rc"] = "deno-1.40-rc";
|
|
99537
|
+
Runtimes2["Deno146rc"] = "deno-1.46-rc";
|
|
99538
|
+
Runtimes2["Deno20rc"] = "deno-2.0-rc";
|
|
99539
|
+
Runtimes2["Deno25rc"] = "deno-2.5-rc";
|
|
99540
|
+
Runtimes2["Deno26rc"] = "deno-2.6-rc";
|
|
99541
|
+
Runtimes2["Dart215rc"] = "dart-2.15-rc";
|
|
99542
|
+
Runtimes2["Dart216rc"] = "dart-2.16-rc";
|
|
99543
|
+
Runtimes2["Dart217rc"] = "dart-2.17-rc";
|
|
99544
|
+
Runtimes2["Dart218rc"] = "dart-2.18-rc";
|
|
99545
|
+
Runtimes2["Dart219rc"] = "dart-2.19-rc";
|
|
99546
|
+
Runtimes2["Dart30rc"] = "dart-3.0-rc";
|
|
99547
|
+
Runtimes2["Dart31rc"] = "dart-3.1-rc";
|
|
99548
|
+
Runtimes2["Dart33rc"] = "dart-3.3-rc";
|
|
99549
|
+
Runtimes2["Dart35rc"] = "dart-3.5-rc";
|
|
99550
|
+
Runtimes2["Dart38rc"] = "dart-3.8-rc";
|
|
99551
|
+
Runtimes2["Dart39rc"] = "dart-3.9-rc";
|
|
99552
|
+
Runtimes2["Dart310rc"] = "dart-3.10-rc";
|
|
99553
|
+
Runtimes2["Dotnet60rc"] = "dotnet-6.0-rc";
|
|
99554
|
+
Runtimes2["Dotnet70rc"] = "dotnet-7.0-rc";
|
|
99555
|
+
Runtimes2["Dotnet80rc"] = "dotnet-8.0-rc";
|
|
99556
|
+
Runtimes2["Dotnet10rc"] = "dotnet-10-rc";
|
|
99557
|
+
Runtimes2["Java80rc"] = "java-8.0-rc";
|
|
99558
|
+
Runtimes2["Java110rc"] = "java-11.0-rc";
|
|
99559
|
+
Runtimes2["Java170rc"] = "java-17.0-rc";
|
|
99560
|
+
Runtimes2["Java180rc"] = "java-18.0-rc";
|
|
99561
|
+
Runtimes2["Java210rc"] = "java-21.0-rc";
|
|
99562
|
+
Runtimes2["Java22rc"] = "java-22-rc";
|
|
99563
|
+
Runtimes2["Java25rc"] = "java-25-rc";
|
|
99564
|
+
Runtimes2["Swift55rc"] = "swift-5.5-rc";
|
|
99565
|
+
Runtimes2["Swift58rc"] = "swift-5.8-rc";
|
|
99566
|
+
Runtimes2["Swift59rc"] = "swift-5.9-rc";
|
|
99567
|
+
Runtimes2["Swift510rc"] = "swift-5.10-rc";
|
|
99568
|
+
Runtimes2["Swift62rc"] = "swift-6.2-rc";
|
|
99569
|
+
Runtimes2["Kotlin16rc"] = "kotlin-1.6-rc";
|
|
99570
|
+
Runtimes2["Kotlin18rc"] = "kotlin-1.8-rc";
|
|
99571
|
+
Runtimes2["Kotlin19rc"] = "kotlin-1.9-rc";
|
|
99572
|
+
Runtimes2["Kotlin20rc"] = "kotlin-2.0-rc";
|
|
99573
|
+
Runtimes2["Kotlin23rc"] = "kotlin-2.3-rc";
|
|
99574
|
+
Runtimes2["Cpp17rc"] = "cpp-17-rc";
|
|
99575
|
+
Runtimes2["Cpp20rc"] = "cpp-20-rc";
|
|
99576
|
+
Runtimes2["Bun10rc"] = "bun-1.0-rc";
|
|
99577
|
+
Runtimes2["Bun11rc"] = "bun-1.1-rc";
|
|
99578
|
+
Runtimes2["Bun12rc"] = "bun-1.2-rc";
|
|
99579
|
+
Runtimes2["Bun13rc"] = "bun-1.3-rc";
|
|
99580
|
+
Runtimes2["Go123rc"] = "go-1.23-rc";
|
|
99581
|
+
Runtimes2["Go124rc"] = "go-1.24-rc";
|
|
99582
|
+
Runtimes2["Go125rc"] = "go-1.25-rc";
|
|
99583
|
+
Runtimes2["Go126rc"] = "go-1.26-rc";
|
|
99584
|
+
Runtimes2["Static1rc"] = "static-1-rc";
|
|
99585
|
+
Runtimes2["Flutter324rc"] = "flutter-3.24-rc";
|
|
99586
|
+
Runtimes2["Flutter327rc"] = "flutter-3.27-rc";
|
|
99587
|
+
Runtimes2["Flutter329rc"] = "flutter-3.29-rc";
|
|
99588
|
+
Runtimes2["Flutter332rc"] = "flutter-3.32-rc";
|
|
99589
|
+
Runtimes2["Flutter335rc"] = "flutter-3.35-rc";
|
|
99590
|
+
Runtimes2["Flutter338rc"] = "flutter-3.38-rc";
|
|
99670
99591
|
})(Runtimes || (Runtimes = {}));
|
|
99671
99592
|
var UseCases;
|
|
99672
99593
|
(function(UseCases2) {
|
|
@@ -100229,9 +100150,6 @@ var BuildRuntime;
|
|
|
100229
100150
|
BuildRuntime2["Pythonml311"] = "python-ml-3.11";
|
|
100230
100151
|
BuildRuntime2["Pythonml312"] = "python-ml-3.12";
|
|
100231
100152
|
BuildRuntime2["Pythonml313"] = "python-ml-3.13";
|
|
100232
|
-
BuildRuntime2["Deno121"] = "deno-1.21";
|
|
100233
|
-
BuildRuntime2["Deno124"] = "deno-1.24";
|
|
100234
|
-
BuildRuntime2["Deno135"] = "deno-1.35";
|
|
100235
100153
|
BuildRuntime2["Deno140"] = "deno-1.40";
|
|
100236
100154
|
BuildRuntime2["Deno146"] = "deno-1.46";
|
|
100237
100155
|
BuildRuntime2["Deno20"] = "deno-2.0";
|
|
@@ -100287,6 +100205,92 @@ var BuildRuntime;
|
|
|
100287
100205
|
BuildRuntime2["Flutter332"] = "flutter-3.32";
|
|
100288
100206
|
BuildRuntime2["Flutter335"] = "flutter-3.35";
|
|
100289
100207
|
BuildRuntime2["Flutter338"] = "flutter-3.38";
|
|
100208
|
+
BuildRuntime2["Node145rc"] = "node-14.5-rc";
|
|
100209
|
+
BuildRuntime2["Node160rc"] = "node-16.0-rc";
|
|
100210
|
+
BuildRuntime2["Node180rc"] = "node-18.0-rc";
|
|
100211
|
+
BuildRuntime2["Node190rc"] = "node-19.0-rc";
|
|
100212
|
+
BuildRuntime2["Node200rc"] = "node-20.0-rc";
|
|
100213
|
+
BuildRuntime2["Node210rc"] = "node-21.0-rc";
|
|
100214
|
+
BuildRuntime2["Node22rc"] = "node-22-rc";
|
|
100215
|
+
BuildRuntime2["Node23rc"] = "node-23-rc";
|
|
100216
|
+
BuildRuntime2["Node24rc"] = "node-24-rc";
|
|
100217
|
+
BuildRuntime2["Node25rc"] = "node-25-rc";
|
|
100218
|
+
BuildRuntime2["Php80rc"] = "php-8.0-rc";
|
|
100219
|
+
BuildRuntime2["Php81rc"] = "php-8.1-rc";
|
|
100220
|
+
BuildRuntime2["Php82rc"] = "php-8.2-rc";
|
|
100221
|
+
BuildRuntime2["Php83rc"] = "php-8.3-rc";
|
|
100222
|
+
BuildRuntime2["Php84rc"] = "php-8.4-rc";
|
|
100223
|
+
BuildRuntime2["Ruby30rc"] = "ruby-3.0-rc";
|
|
100224
|
+
BuildRuntime2["Ruby31rc"] = "ruby-3.1-rc";
|
|
100225
|
+
BuildRuntime2["Ruby32rc"] = "ruby-3.2-rc";
|
|
100226
|
+
BuildRuntime2["Ruby33rc"] = "ruby-3.3-rc";
|
|
100227
|
+
BuildRuntime2["Ruby34rc"] = "ruby-3.4-rc";
|
|
100228
|
+
BuildRuntime2["Ruby40rc"] = "ruby-4.0-rc";
|
|
100229
|
+
BuildRuntime2["Python38rc"] = "python-3.8-rc";
|
|
100230
|
+
BuildRuntime2["Python39rc"] = "python-3.9-rc";
|
|
100231
|
+
BuildRuntime2["Python310rc"] = "python-3.10-rc";
|
|
100232
|
+
BuildRuntime2["Python311rc"] = "python-3.11-rc";
|
|
100233
|
+
BuildRuntime2["Python312rc"] = "python-3.12-rc";
|
|
100234
|
+
BuildRuntime2["Python313rc"] = "python-3.13-rc";
|
|
100235
|
+
BuildRuntime2["Python314rc"] = "python-3.14-rc";
|
|
100236
|
+
BuildRuntime2["Pythonml311rc"] = "python-ml-3.11-rc";
|
|
100237
|
+
BuildRuntime2["Pythonml312rc"] = "python-ml-3.12-rc";
|
|
100238
|
+
BuildRuntime2["Pythonml313rc"] = "python-ml-3.13-rc";
|
|
100239
|
+
BuildRuntime2["Deno140rc"] = "deno-1.40-rc";
|
|
100240
|
+
BuildRuntime2["Deno146rc"] = "deno-1.46-rc";
|
|
100241
|
+
BuildRuntime2["Deno20rc"] = "deno-2.0-rc";
|
|
100242
|
+
BuildRuntime2["Deno25rc"] = "deno-2.5-rc";
|
|
100243
|
+
BuildRuntime2["Deno26rc"] = "deno-2.6-rc";
|
|
100244
|
+
BuildRuntime2["Dart215rc"] = "dart-2.15-rc";
|
|
100245
|
+
BuildRuntime2["Dart216rc"] = "dart-2.16-rc";
|
|
100246
|
+
BuildRuntime2["Dart217rc"] = "dart-2.17-rc";
|
|
100247
|
+
BuildRuntime2["Dart218rc"] = "dart-2.18-rc";
|
|
100248
|
+
BuildRuntime2["Dart219rc"] = "dart-2.19-rc";
|
|
100249
|
+
BuildRuntime2["Dart30rc"] = "dart-3.0-rc";
|
|
100250
|
+
BuildRuntime2["Dart31rc"] = "dart-3.1-rc";
|
|
100251
|
+
BuildRuntime2["Dart33rc"] = "dart-3.3-rc";
|
|
100252
|
+
BuildRuntime2["Dart35rc"] = "dart-3.5-rc";
|
|
100253
|
+
BuildRuntime2["Dart38rc"] = "dart-3.8-rc";
|
|
100254
|
+
BuildRuntime2["Dart39rc"] = "dart-3.9-rc";
|
|
100255
|
+
BuildRuntime2["Dart310rc"] = "dart-3.10-rc";
|
|
100256
|
+
BuildRuntime2["Dotnet60rc"] = "dotnet-6.0-rc";
|
|
100257
|
+
BuildRuntime2["Dotnet70rc"] = "dotnet-7.0-rc";
|
|
100258
|
+
BuildRuntime2["Dotnet80rc"] = "dotnet-8.0-rc";
|
|
100259
|
+
BuildRuntime2["Dotnet10rc"] = "dotnet-10-rc";
|
|
100260
|
+
BuildRuntime2["Java80rc"] = "java-8.0-rc";
|
|
100261
|
+
BuildRuntime2["Java110rc"] = "java-11.0-rc";
|
|
100262
|
+
BuildRuntime2["Java170rc"] = "java-17.0-rc";
|
|
100263
|
+
BuildRuntime2["Java180rc"] = "java-18.0-rc";
|
|
100264
|
+
BuildRuntime2["Java210rc"] = "java-21.0-rc";
|
|
100265
|
+
BuildRuntime2["Java22rc"] = "java-22-rc";
|
|
100266
|
+
BuildRuntime2["Java25rc"] = "java-25-rc";
|
|
100267
|
+
BuildRuntime2["Swift55rc"] = "swift-5.5-rc";
|
|
100268
|
+
BuildRuntime2["Swift58rc"] = "swift-5.8-rc";
|
|
100269
|
+
BuildRuntime2["Swift59rc"] = "swift-5.9-rc";
|
|
100270
|
+
BuildRuntime2["Swift510rc"] = "swift-5.10-rc";
|
|
100271
|
+
BuildRuntime2["Swift62rc"] = "swift-6.2-rc";
|
|
100272
|
+
BuildRuntime2["Kotlin16rc"] = "kotlin-1.6-rc";
|
|
100273
|
+
BuildRuntime2["Kotlin18rc"] = "kotlin-1.8-rc";
|
|
100274
|
+
BuildRuntime2["Kotlin19rc"] = "kotlin-1.9-rc";
|
|
100275
|
+
BuildRuntime2["Kotlin20rc"] = "kotlin-2.0-rc";
|
|
100276
|
+
BuildRuntime2["Kotlin23rc"] = "kotlin-2.3-rc";
|
|
100277
|
+
BuildRuntime2["Cpp17rc"] = "cpp-17-rc";
|
|
100278
|
+
BuildRuntime2["Cpp20rc"] = "cpp-20-rc";
|
|
100279
|
+
BuildRuntime2["Bun10rc"] = "bun-1.0-rc";
|
|
100280
|
+
BuildRuntime2["Bun11rc"] = "bun-1.1-rc";
|
|
100281
|
+
BuildRuntime2["Bun12rc"] = "bun-1.2-rc";
|
|
100282
|
+
BuildRuntime2["Bun13rc"] = "bun-1.3-rc";
|
|
100283
|
+
BuildRuntime2["Go123rc"] = "go-1.23-rc";
|
|
100284
|
+
BuildRuntime2["Go124rc"] = "go-1.24-rc";
|
|
100285
|
+
BuildRuntime2["Go125rc"] = "go-1.25-rc";
|
|
100286
|
+
BuildRuntime2["Go126rc"] = "go-1.26-rc";
|
|
100287
|
+
BuildRuntime2["Static1rc"] = "static-1-rc";
|
|
100288
|
+
BuildRuntime2["Flutter324rc"] = "flutter-3.24-rc";
|
|
100289
|
+
BuildRuntime2["Flutter327rc"] = "flutter-3.27-rc";
|
|
100290
|
+
BuildRuntime2["Flutter329rc"] = "flutter-3.29-rc";
|
|
100291
|
+
BuildRuntime2["Flutter332rc"] = "flutter-3.32-rc";
|
|
100292
|
+
BuildRuntime2["Flutter335rc"] = "flutter-3.35-rc";
|
|
100293
|
+
BuildRuntime2["Flutter338rc"] = "flutter-3.38-rc";
|
|
100290
100294
|
})(BuildRuntime || (BuildRuntime = {}));
|
|
100291
100295
|
var Adapter;
|
|
100292
100296
|
(function(Adapter2) {
|
|
@@ -100443,28 +100447,24 @@ var BillingPlanGroup;
|
|
|
100443
100447
|
BillingPlanGroup2["Pro"] = "pro";
|
|
100444
100448
|
BillingPlanGroup2["Scale"] = "scale";
|
|
100445
100449
|
})(BillingPlanGroup || (BillingPlanGroup = {}));
|
|
100446
|
-
var
|
|
100447
|
-
(function(
|
|
100448
|
-
|
|
100449
|
-
|
|
100450
|
-
|
|
100451
|
-
|
|
100452
|
-
|
|
100453
|
-
|
|
100454
|
-
|
|
100455
|
-
|
|
100456
|
-
})(
|
|
100457
|
-
var
|
|
100458
|
-
(function(
|
|
100459
|
-
|
|
100460
|
-
|
|
100461
|
-
|
|
100462
|
-
|
|
100463
|
-
|
|
100464
|
-
DomainTransferStatusStatus2["Completed"] = "completed";
|
|
100465
|
-
DomainTransferStatusStatus2["Cancelled"] = "cancelled";
|
|
100466
|
-
DomainTransferStatusStatus2["ServiceUnavailable"] = "service_unavailable";
|
|
100467
|
-
})(DomainTransferStatusStatus || (DomainTransferStatusStatus = {}));
|
|
100450
|
+
var DomainTransferStatusEnum;
|
|
100451
|
+
(function(DomainTransferStatusEnum2) {
|
|
100452
|
+
DomainTransferStatusEnum2["Transferrable"] = "transferrable";
|
|
100453
|
+
DomainTransferStatusEnum2["NotTransferrable"] = "not_transferrable";
|
|
100454
|
+
DomainTransferStatusEnum2["PendingOwner"] = "pending_owner";
|
|
100455
|
+
DomainTransferStatusEnum2["PendingAdmin"] = "pending_admin";
|
|
100456
|
+
DomainTransferStatusEnum2["PendingRegistry"] = "pending_registry";
|
|
100457
|
+
DomainTransferStatusEnum2["Completed"] = "completed";
|
|
100458
|
+
DomainTransferStatusEnum2["Cancelled"] = "cancelled";
|
|
100459
|
+
DomainTransferStatusEnum2["ServiceUnavailable"] = "service_unavailable";
|
|
100460
|
+
})(DomainTransferStatusEnum || (DomainTransferStatusEnum = {}));
|
|
100461
|
+
var DomainPurchaseStatus;
|
|
100462
|
+
(function(DomainPurchaseStatus2) {
|
|
100463
|
+
DomainPurchaseStatus2["Pending"] = "pending";
|
|
100464
|
+
DomainPurchaseStatus2["Succeeded"] = "succeeded";
|
|
100465
|
+
DomainPurchaseStatus2["Failed"] = "failed";
|
|
100466
|
+
DomainPurchaseStatus2["Cancelled"] = "cancelled";
|
|
100467
|
+
})(DomainPurchaseStatus || (DomainPurchaseStatus = {}));
|
|
100468
100468
|
|
|
100469
100469
|
// lib/parser.ts
|
|
100470
100470
|
var import_chalk2 = __toESM(require_source(), 1);
|
|
@@ -100476,7 +100476,7 @@ var package_default = {
|
|
|
100476
100476
|
type: "module",
|
|
100477
100477
|
homepage: "https://appwrite.io/support",
|
|
100478
100478
|
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",
|
|
100479
|
-
version: "
|
|
100479
|
+
version: "16.0.0",
|
|
100480
100480
|
license: "BSD-3-Clause",
|
|
100481
100481
|
main: "dist/index.cjs",
|
|
100482
100482
|
module: "dist/index.js",
|
|
@@ -100520,7 +100520,7 @@ var package_default = {
|
|
|
100520
100520
|
"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"
|
|
100521
100521
|
},
|
|
100522
100522
|
dependencies: {
|
|
100523
|
-
"@appwrite.io/console": "
|
|
100523
|
+
"@appwrite.io/console": "*",
|
|
100524
100524
|
chalk: "4.1.2",
|
|
100525
100525
|
chokidar: "^3.6.0",
|
|
100526
100526
|
"cli-progress": "^3.12.0",
|
|
@@ -100771,14 +100771,18 @@ var commandDescriptions = {
|
|
|
100771
100771
|
messaging: `The messaging command allows you to manage topics and targets and send messages.`,
|
|
100772
100772
|
migrations: `The migrations command allows you to migrate data between services.`,
|
|
100773
100773
|
vcs: `The vcs command allows you to interact with VCS providers and manage your code repositories.`,
|
|
100774
|
+
webhooks: `The webhooks command allows you to manage your project webhooks.`,
|
|
100774
100775
|
main: import_chalk2.default.redBright(`${logo}${description}`)
|
|
100775
100776
|
};
|
|
100776
100777
|
|
|
100777
100778
|
// lib/commands/utils/deployment.ts
|
|
100778
100779
|
var POLL_DEBOUNCE = 2e3;
|
|
100779
100780
|
async function packageDirectory(dirPath) {
|
|
100780
|
-
const tempFile =
|
|
100781
|
-
|
|
100781
|
+
const tempFile = import_path5.default.join(
|
|
100782
|
+
import_os3.default.tmpdir(),
|
|
100783
|
+
`appwrite-deploy-${Date.now()}.tar.gz`
|
|
100784
|
+
);
|
|
100785
|
+
await Pn(
|
|
100782
100786
|
{
|
|
100783
100787
|
gzip: true,
|
|
100784
100788
|
file: tempFile,
|
|
@@ -100786,11 +100790,16 @@ async function packageDirectory(dirPath) {
|
|
|
100786
100790
|
},
|
|
100787
100791
|
["."]
|
|
100788
100792
|
);
|
|
100789
|
-
|
|
100790
|
-
|
|
100791
|
-
|
|
100792
|
-
|
|
100793
|
-
|
|
100793
|
+
try {
|
|
100794
|
+
const buffer = import_fs6.default.readFileSync(tempFile);
|
|
100795
|
+
return new File([buffer], import_path5.default.basename(tempFile), {
|
|
100796
|
+
type: "application/gzip"
|
|
100797
|
+
});
|
|
100798
|
+
} finally {
|
|
100799
|
+
if (import_fs6.default.existsSync(tempFile)) {
|
|
100800
|
+
import_fs6.default.unlinkSync(tempFile);
|
|
100801
|
+
}
|
|
100802
|
+
}
|
|
100794
100803
|
}
|
|
100795
100804
|
async function downloadDeploymentCode(params) {
|
|
100796
100805
|
const {
|
|
@@ -100842,7 +100851,7 @@ async function downloadDeploymentCode(params) {
|
|
|
100842
100851
|
`Failed to write deployment archive to "${compressedFileName}": ${message}`
|
|
100843
100852
|
);
|
|
100844
100853
|
}
|
|
100845
|
-
|
|
100854
|
+
ao({
|
|
100846
100855
|
sync: true,
|
|
100847
100856
|
cwd: resourcePath,
|
|
100848
100857
|
file: compressedFileName,
|
|
@@ -100901,7 +100910,7 @@ async function pushDeployment(params) {
|
|
|
100901
100910
|
var import_chalk3 = __toESM(require_source(), 1);
|
|
100902
100911
|
|
|
100903
100912
|
// lib/sdks.ts
|
|
100904
|
-
var
|
|
100913
|
+
var import_os4 = __toESM(require("os"), 1);
|
|
100905
100914
|
var sdkForConsole = async (requiresAuth = true) => {
|
|
100906
100915
|
const client = new Client();
|
|
100907
100916
|
const endpoint = globalConfig2.getEndpoint() || DEFAULT_ENDPOINT;
|
|
@@ -100918,7 +100927,7 @@ var sdkForConsole = async (requiresAuth = true) => {
|
|
|
100918
100927
|
"x-sdk-platform": "console",
|
|
100919
100928
|
"x-sdk-language": "cli",
|
|
100920
100929
|
"x-sdk-version": SDK_VERSION,
|
|
100921
|
-
"user-agent": `AppwriteCLI/${SDK_VERSION} (${
|
|
100930
|
+
"user-agent": `AppwriteCLI/${SDK_VERSION} (${import_os4.default.type()} ${import_os4.default.version()}; ${import_os4.default.arch()})`
|
|
100922
100931
|
};
|
|
100923
100932
|
client.setEndpoint(endpoint).setProject("console").setCookie(cookie).setSelfSigned(selfSigned).setLocale("en-US");
|
|
100924
100933
|
return client;
|
|
@@ -100941,7 +100950,7 @@ var sdkForProject = async () => {
|
|
|
100941
100950
|
"x-sdk-platform": "console",
|
|
100942
100951
|
"x-sdk-language": "cli",
|
|
100943
100952
|
"x-sdk-version": SDK_VERSION,
|
|
100944
|
-
"user-agent": `AppwriteCLI/${SDK_VERSION} (${
|
|
100953
|
+
"user-agent": `AppwriteCLI/${SDK_VERSION} (${import_os4.default.type()} ${import_os4.default.version()}; ${import_os4.default.arch()})`
|
|
100945
100954
|
};
|
|
100946
100955
|
client.setEndpoint(endpoint).setProject(project).setSelfSigned(selfSigned).setLocale("en-US");
|
|
100947
100956
|
if (cookie) {
|
|
@@ -104850,7 +104859,7 @@ var Pull = class {
|
|
|
104850
104859
|
return [];
|
|
104851
104860
|
}
|
|
104852
104861
|
const { functions: allFunctions } = await paginate(
|
|
104853
|
-
async () => new Functions(this.projectClient).list(),
|
|
104862
|
+
async (args) => new Functions(this.projectClient).list(args.queries),
|
|
104854
104863
|
{},
|
|
104855
104864
|
100,
|
|
104856
104865
|
"functions"
|
|
@@ -104934,7 +104943,7 @@ var Pull = class {
|
|
|
104934
104943
|
return [];
|
|
104935
104944
|
}
|
|
104936
104945
|
const { sites: fetchedSites } = await paginate(
|
|
104937
|
-
async () => new Sites(this.projectClient).list(),
|
|
104946
|
+
async (args) => new Sites(this.projectClient).list(args.queries),
|
|
104938
104947
|
{},
|
|
104939
104948
|
100,
|
|
104940
104949
|
"sites"
|
|
@@ -105012,7 +105021,7 @@ var Pull = class {
|
|
|
105012
105021
|
return { databases: [], collections: [] };
|
|
105013
105022
|
}
|
|
105014
105023
|
const { databases } = await paginate(
|
|
105015
|
-
async () => new Databases(this.projectClient).list(),
|
|
105024
|
+
async (args) => new Databases(this.projectClient).list(args.queries),
|
|
105016
105025
|
{},
|
|
105017
105026
|
100,
|
|
105018
105027
|
"databases"
|
|
@@ -105025,7 +105034,10 @@ var Pull = class {
|
|
|
105025
105034
|
);
|
|
105026
105035
|
allDatabases.push(database);
|
|
105027
105036
|
const { collections } = await paginate(
|
|
105028
|
-
async () => new Databases(this.projectClient).listCollections(
|
|
105037
|
+
async (args) => new Databases(this.projectClient).listCollections(
|
|
105038
|
+
database.$id,
|
|
105039
|
+
args.queries
|
|
105040
|
+
),
|
|
105029
105041
|
{},
|
|
105030
105042
|
100,
|
|
105031
105043
|
"collections"
|
|
@@ -105063,7 +105075,9 @@ var Pull = class {
|
|
|
105063
105075
|
return { databases: [], tables: [] };
|
|
105064
105076
|
}
|
|
105065
105077
|
const { databases } = await paginate(
|
|
105066
|
-
async () => new TablesDB(this.projectClient).list(
|
|
105078
|
+
async (args) => new TablesDB(this.projectClient).list({
|
|
105079
|
+
queries: args.queries
|
|
105080
|
+
}),
|
|
105067
105081
|
{},
|
|
105068
105082
|
100,
|
|
105069
105083
|
"databases"
|
|
@@ -105076,7 +105090,10 @@ var Pull = class {
|
|
|
105076
105090
|
);
|
|
105077
105091
|
allDatabases.push(filterBySchema(database, DatabaseSchema));
|
|
105078
105092
|
const { tables } = await paginate(
|
|
105079
|
-
async () => new TablesDB(this.projectClient).listTables(
|
|
105093
|
+
async (args) => new TablesDB(this.projectClient).listTables({
|
|
105094
|
+
databaseId: database.$id,
|
|
105095
|
+
queries: args.queries
|
|
105096
|
+
}),
|
|
105080
105097
|
{},
|
|
105081
105098
|
100,
|
|
105082
105099
|
"tables"
|
|
@@ -105118,7 +105135,7 @@ var Pull = class {
|
|
|
105118
105135
|
return [];
|
|
105119
105136
|
}
|
|
105120
105137
|
const { buckets } = await paginate(
|
|
105121
|
-
async () => new Storage(this.projectClient).listBuckets(),
|
|
105138
|
+
async (args) => new Storage(this.projectClient).listBuckets(args.queries),
|
|
105122
105139
|
{},
|
|
105123
105140
|
100,
|
|
105124
105141
|
"buckets"
|
|
@@ -105148,7 +105165,7 @@ var Pull = class {
|
|
|
105148
105165
|
return [];
|
|
105149
105166
|
}
|
|
105150
105167
|
const { teams } = await paginate(
|
|
105151
|
-
async () => new Teams(this.projectClient).list(),
|
|
105168
|
+
async (args) => new Teams(this.projectClient).list(args.queries),
|
|
105152
105169
|
{},
|
|
105153
105170
|
100,
|
|
105154
105171
|
"teams"
|
|
@@ -105174,7 +105191,7 @@ var Pull = class {
|
|
|
105174
105191
|
return [];
|
|
105175
105192
|
}
|
|
105176
105193
|
const { topics } = await paginate(
|
|
105177
|
-
async () => new Messaging(this.projectClient).listTopics(),
|
|
105194
|
+
async (args) => new Messaging(this.projectClient).listTopics(args.queries),
|
|
105178
105195
|
{},
|
|
105179
105196
|
100,
|
|
105180
105197
|
"topics"
|
|
@@ -105246,7 +105263,7 @@ var pullFunctions = async ({
|
|
|
105246
105263
|
return;
|
|
105247
105264
|
}
|
|
105248
105265
|
const functionsToCheck = cliConfig.all ? (await paginate(
|
|
105249
|
-
async () => (await getFunctionsService()).list(),
|
|
105266
|
+
async (args) => (await getFunctionsService()).list(args.queries),
|
|
105250
105267
|
{},
|
|
105251
105268
|
100,
|
|
105252
105269
|
"functions"
|
|
@@ -105284,7 +105301,7 @@ var pullSites = async ({
|
|
|
105284
105301
|
return;
|
|
105285
105302
|
}
|
|
105286
105303
|
const sitesToCheck = cliConfig.all ? (await paginate(
|
|
105287
|
-
async () => (await getSitesService()).list(),
|
|
105304
|
+
async (args) => (await getSitesService()).list(args.queries),
|
|
105288
105305
|
{},
|
|
105289
105306
|
100,
|
|
105290
105307
|
"sites"
|
|
@@ -106043,13 +106060,33 @@ ${supportsServerSide ? ` create: (databaseId: string, name: string, options?: {
|
|
|
106043
106060
|
requiresApiKey: supportsServerSide
|
|
106044
106061
|
});
|
|
106045
106062
|
}
|
|
106063
|
+
/**
|
|
106064
|
+
* Deduplicate entities by composite key ($id + databaseId).
|
|
106065
|
+
* Keeps the last occurrence to match addTable/addCollection semantics.
|
|
106066
|
+
*/
|
|
106067
|
+
dedupeEntities(entities) {
|
|
106068
|
+
const seen = /* @__PURE__ */ new Map();
|
|
106069
|
+
for (const entity of entities) {
|
|
106070
|
+
seen.set(`${entity.databaseId}:${entity.$id}`, entity);
|
|
106071
|
+
}
|
|
106072
|
+
return Array.from(seen.values());
|
|
106073
|
+
}
|
|
106046
106074
|
async generate(config2, options) {
|
|
106047
106075
|
if (!config2.projectId) {
|
|
106048
106076
|
throw new Error("Project ID is required in configuration");
|
|
106049
106077
|
}
|
|
106050
106078
|
const appwriteDep = options?.appwriteImportSource ?? getAppwriteDependency();
|
|
106051
106079
|
const importExt = options?.importExtension ?? detectImportExtension();
|
|
106052
|
-
const
|
|
106080
|
+
const dedupedConfig = { ...config2 };
|
|
106081
|
+
if (dedupedConfig.tables && dedupedConfig.tables.length > 0) {
|
|
106082
|
+
dedupedConfig.tables = this.dedupeEntities(dedupedConfig.tables);
|
|
106083
|
+
}
|
|
106084
|
+
if (dedupedConfig.collections && dedupedConfig.collections.length > 0) {
|
|
106085
|
+
dedupedConfig.collections = this.dedupeEntities(
|
|
106086
|
+
dedupedConfig.collections
|
|
106087
|
+
);
|
|
106088
|
+
}
|
|
106089
|
+
const hasEntities = dedupedConfig.tables && dedupedConfig.tables.length > 0 || dedupedConfig.collections && dedupedConfig.collections.length > 0;
|
|
106053
106090
|
if (!hasEntities) {
|
|
106054
106091
|
console.log(
|
|
106055
106092
|
"No tables or collections found in configuration. Skipping database generation."
|
|
@@ -106058,14 +106095,21 @@ ${supportsServerSide ? ` create: (databaseId: string, name: string, options?: {
|
|
|
106058
106095
|
dbContent: "// No tables or collections found in configuration\n",
|
|
106059
106096
|
typesContent: "// No tables or collections found in configuration\n",
|
|
106060
106097
|
indexContent: this.generateIndexFile(importExt),
|
|
106061
|
-
constantsContent: this.generateConstantsFile(
|
|
106098
|
+
constantsContent: this.generateConstantsFile(
|
|
106099
|
+
dedupedConfig,
|
|
106100
|
+
appwriteDep
|
|
106101
|
+
)
|
|
106062
106102
|
};
|
|
106063
106103
|
}
|
|
106064
106104
|
return {
|
|
106065
|
-
dbContent: this.generateDatabasesFile(
|
|
106066
|
-
|
|
106105
|
+
dbContent: this.generateDatabasesFile(
|
|
106106
|
+
dedupedConfig,
|
|
106107
|
+
importExt,
|
|
106108
|
+
appwriteDep
|
|
106109
|
+
),
|
|
106110
|
+
typesContent: this.generateTypesFile(dedupedConfig, appwriteDep),
|
|
106067
106111
|
indexContent: this.generateIndexFile(importExt),
|
|
106068
|
-
constantsContent: this.generateConstantsFile(
|
|
106112
|
+
constantsContent: this.generateConstantsFile(dedupedConfig, appwriteDep)
|
|
106069
106113
|
};
|
|
106070
106114
|
}
|
|
106071
106115
|
};
|