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
|
@@ -3886,7 +3886,7 @@ var require_has_flag = __commonJS({
|
|
|
3886
3886
|
var require_supports_color = __commonJS({
|
|
3887
3887
|
"node_modules/supports-color/index.js"(exports, module) {
|
|
3888
3888
|
"use strict";
|
|
3889
|
-
var
|
|
3889
|
+
var os7 = __require("os");
|
|
3890
3890
|
var tty = __require("tty");
|
|
3891
3891
|
var hasFlag = require_has_flag();
|
|
3892
3892
|
var { env } = process;
|
|
@@ -3934,7 +3934,7 @@ var require_supports_color = __commonJS({
|
|
|
3934
3934
|
return min;
|
|
3935
3935
|
}
|
|
3936
3936
|
if (process.platform === "win32") {
|
|
3937
|
-
const osRelease =
|
|
3937
|
+
const osRelease = os7.release().split(".");
|
|
3938
3938
|
if (Number(osRelease[0]) >= 10 && Number(osRelease[2]) >= 10586) {
|
|
3939
3939
|
return Number(osRelease[2]) >= 14931 ? 3 : 2;
|
|
3940
3940
|
}
|
|
@@ -21962,9 +21962,9 @@ var require_stream_duplex = __commonJS({
|
|
|
21962
21962
|
}
|
|
21963
21963
|
});
|
|
21964
21964
|
|
|
21965
|
-
// node_modules/safe-buffer/index.js
|
|
21965
|
+
// node_modules/string_decoder/node_modules/safe-buffer/index.js
|
|
21966
21966
|
var require_safe_buffer = __commonJS({
|
|
21967
|
-
"node_modules/safe-buffer/index.js"(exports, module) {
|
|
21967
|
+
"node_modules/string_decoder/node_modules/safe-buffer/index.js"(exports, module) {
|
|
21968
21968
|
var buffer = __require("buffer");
|
|
21969
21969
|
var Buffer2 = buffer.Buffer;
|
|
21970
21970
|
function copyProps(src, dst) {
|
|
@@ -24524,16 +24524,16 @@ var require_base = __commonJS({
|
|
|
24524
24524
|
}),
|
|
24525
24525
|
share()
|
|
24526
24526
|
);
|
|
24527
|
-
const
|
|
24527
|
+
const success21 = validation.pipe(
|
|
24528
24528
|
filter((state) => state.isValid === true),
|
|
24529
24529
|
take(1)
|
|
24530
24530
|
);
|
|
24531
24531
|
const error49 = validation.pipe(
|
|
24532
24532
|
filter((state) => state.isValid !== true),
|
|
24533
|
-
takeUntil(
|
|
24533
|
+
takeUntil(success21)
|
|
24534
24534
|
);
|
|
24535
24535
|
return {
|
|
24536
|
-
success:
|
|
24536
|
+
success: success21,
|
|
24537
24537
|
error: error49
|
|
24538
24538
|
};
|
|
24539
24539
|
}
|
|
@@ -35908,7 +35908,7 @@ var require_has_flag2 = __commonJS({
|
|
|
35908
35908
|
var require_supports_colors = __commonJS({
|
|
35909
35909
|
"node_modules/@colors/colors/lib/system/supports-colors.js"(exports, module) {
|
|
35910
35910
|
"use strict";
|
|
35911
|
-
var
|
|
35911
|
+
var os7 = __require("os");
|
|
35912
35912
|
var hasFlag = require_has_flag2();
|
|
35913
35913
|
var env = process.env;
|
|
35914
35914
|
var forceColor = void 0;
|
|
@@ -35946,7 +35946,7 @@ var require_supports_colors = __commonJS({
|
|
|
35946
35946
|
}
|
|
35947
35947
|
var min = forceColor ? 1 : 0;
|
|
35948
35948
|
if (process.platform === "win32") {
|
|
35949
|
-
var osRelease =
|
|
35949
|
+
var osRelease = os7.release().split(".");
|
|
35950
35950
|
if (Number(process.versions.node.split(".")[0]) >= 8 && Number(osRelease[0]) >= 10 && Number(osRelease[2]) >= 10586) {
|
|
35951
35951
|
return Number(osRelease[2]) >= 14931 ? 3 : 2;
|
|
35952
35952
|
}
|
|
@@ -54838,8 +54838,8 @@ var require_bignumber = __commonJS({
|
|
|
54838
54838
|
y2.s = -b2;
|
|
54839
54839
|
return x.plus(y2);
|
|
54840
54840
|
}
|
|
54841
|
-
var
|
|
54842
|
-
if (!
|
|
54841
|
+
var xe = x.e / LOG_BASE, ye2 = y2.e / LOG_BASE, xc = x.c, yc = y2.c;
|
|
54842
|
+
if (!xe || !ye2) {
|
|
54843
54843
|
if (!xc || !yc) return xc ? (y2.s = -b2, y2) : new BigNumber2(yc ? x : NaN);
|
|
54844
54844
|
if (!xc[0] || !yc[0]) {
|
|
54845
54845
|
return yc[0] ? (y2.s = -b2, y2) : new BigNumber2(xc[0] ? x : (
|
|
@@ -54848,15 +54848,15 @@ var require_bignumber = __commonJS({
|
|
|
54848
54848
|
));
|
|
54849
54849
|
}
|
|
54850
54850
|
}
|
|
54851
|
-
|
|
54851
|
+
xe = bitFloor(xe);
|
|
54852
54852
|
ye2 = bitFloor(ye2);
|
|
54853
54853
|
xc = xc.slice();
|
|
54854
|
-
if (a =
|
|
54854
|
+
if (a = xe - ye2) {
|
|
54855
54855
|
if (xLTy = a < 0) {
|
|
54856
54856
|
a = -a;
|
|
54857
54857
|
t = xc;
|
|
54858
54858
|
} else {
|
|
54859
|
-
ye2 =
|
|
54859
|
+
ye2 = xe;
|
|
54860
54860
|
t = yc;
|
|
54861
54861
|
}
|
|
54862
54862
|
t.reverse();
|
|
@@ -54983,17 +54983,17 @@ var require_bignumber = __commonJS({
|
|
|
54983
54983
|
y2.s = -b2;
|
|
54984
54984
|
return x.minus(y2);
|
|
54985
54985
|
}
|
|
54986
|
-
var
|
|
54987
|
-
if (!
|
|
54986
|
+
var xe = x.e / LOG_BASE, ye2 = y2.e / LOG_BASE, xc = x.c, yc = y2.c;
|
|
54987
|
+
if (!xe || !ye2) {
|
|
54988
54988
|
if (!xc || !yc) return new BigNumber2(a / 0);
|
|
54989
54989
|
if (!xc[0] || !yc[0]) return yc[0] ? y2 : new BigNumber2(xc[0] ? x : a * 0);
|
|
54990
54990
|
}
|
|
54991
|
-
|
|
54991
|
+
xe = bitFloor(xe);
|
|
54992
54992
|
ye2 = bitFloor(ye2);
|
|
54993
54993
|
xc = xc.slice();
|
|
54994
|
-
if (a =
|
|
54994
|
+
if (a = xe - ye2) {
|
|
54995
54995
|
if (a > 0) {
|
|
54996
|
-
ye2 =
|
|
54996
|
+
ye2 = xe;
|
|
54997
54997
|
t = yc;
|
|
54998
54998
|
} else {
|
|
54999
54999
|
a = -a;
|
|
@@ -62387,7 +62387,7 @@ var require_has_flag3 = __commonJS({
|
|
|
62387
62387
|
var require_supports_color2 = __commonJS({
|
|
62388
62388
|
"node_modules/inquirer-search-list/node_modules/chalk/node_modules/supports-color/index.js"(exports, module) {
|
|
62389
62389
|
"use strict";
|
|
62390
|
-
var
|
|
62390
|
+
var os7 = __require("os");
|
|
62391
62391
|
var hasFlag = require_has_flag3();
|
|
62392
62392
|
var env = process.env;
|
|
62393
62393
|
var forceColor;
|
|
@@ -62425,7 +62425,7 @@ var require_supports_color2 = __commonJS({
|
|
|
62425
62425
|
}
|
|
62426
62426
|
const min = forceColor ? 1 : 0;
|
|
62427
62427
|
if (process.platform === "win32") {
|
|
62428
|
-
const osRelease =
|
|
62428
|
+
const osRelease = os7.release().split(".");
|
|
62429
62429
|
if (Number(process.versions.node.split(".")[0]) >= 8 && Number(osRelease[0]) >= 10 && Number(osRelease[2]) >= 10586) {
|
|
62430
62430
|
return Number(osRelease[2]) >= 14931 ? 3 : 2;
|
|
62431
62431
|
}
|
|
@@ -63459,14 +63459,14 @@ var require_base2 = __commonJS({
|
|
|
63459
63459
|
return { isValid: err };
|
|
63460
63460
|
});
|
|
63461
63461
|
}).share();
|
|
63462
|
-
var
|
|
63462
|
+
var success21 = validation.filter(function(state) {
|
|
63463
63463
|
return state.isValid === true;
|
|
63464
63464
|
}).take(1);
|
|
63465
63465
|
var error49 = validation.filter(function(state) {
|
|
63466
63466
|
return state.isValid !== true;
|
|
63467
|
-
}).takeUntil(
|
|
63467
|
+
}).takeUntil(success21);
|
|
63468
63468
|
return {
|
|
63469
|
-
success:
|
|
63469
|
+
success: success21,
|
|
63470
63470
|
error: error49
|
|
63471
63471
|
};
|
|
63472
63472
|
};
|
|
@@ -68582,8 +68582,8 @@ var require_rx_lite = __commonJS({
|
|
|
68582
68582
|
checkDisposed(this);
|
|
68583
68583
|
if (!this.isStopped) {
|
|
68584
68584
|
this.isStopped = true;
|
|
68585
|
-
for (var i = 0,
|
|
68586
|
-
|
|
68585
|
+
for (var i = 0, os7 = cloneArray(this.observers), len = os7.length; i < len; i++) {
|
|
68586
|
+
os7[i].onCompleted();
|
|
68587
68587
|
}
|
|
68588
68588
|
this.observers.length = 0;
|
|
68589
68589
|
}
|
|
@@ -68598,8 +68598,8 @@ var require_rx_lite = __commonJS({
|
|
|
68598
68598
|
this.isStopped = true;
|
|
68599
68599
|
this.error = error49;
|
|
68600
68600
|
this.hasError = true;
|
|
68601
|
-
for (var i = 0,
|
|
68602
|
-
|
|
68601
|
+
for (var i = 0, os7 = cloneArray(this.observers), len = os7.length; i < len; i++) {
|
|
68602
|
+
os7[i].onError(error49);
|
|
68603
68603
|
}
|
|
68604
68604
|
this.observers.length = 0;
|
|
68605
68605
|
}
|
|
@@ -68611,8 +68611,8 @@ var require_rx_lite = __commonJS({
|
|
|
68611
68611
|
onNext: function(value) {
|
|
68612
68612
|
checkDisposed(this);
|
|
68613
68613
|
if (!this.isStopped) {
|
|
68614
|
-
for (var i = 0,
|
|
68615
|
-
|
|
68614
|
+
for (var i = 0, os7 = cloneArray(this.observers), len = os7.length; i < len; i++) {
|
|
68615
|
+
os7[i].onNext(value);
|
|
68616
68616
|
}
|
|
68617
68617
|
}
|
|
68618
68618
|
},
|
|
@@ -68672,16 +68672,16 @@ var require_rx_lite = __commonJS({
|
|
|
68672
68672
|
checkDisposed(this);
|
|
68673
68673
|
if (!this.isStopped) {
|
|
68674
68674
|
this.isStopped = true;
|
|
68675
|
-
var
|
|
68675
|
+
var os7 = cloneArray(this.observers), len = os7.length;
|
|
68676
68676
|
if (this.hasValue) {
|
|
68677
68677
|
for (i = 0; i < len; i++) {
|
|
68678
|
-
var o =
|
|
68678
|
+
var o = os7[i];
|
|
68679
68679
|
o.onNext(this.value);
|
|
68680
68680
|
o.onCompleted();
|
|
68681
68681
|
}
|
|
68682
68682
|
} else {
|
|
68683
68683
|
for (i = 0; i < len; i++) {
|
|
68684
|
-
|
|
68684
|
+
os7[i].onCompleted();
|
|
68685
68685
|
}
|
|
68686
68686
|
}
|
|
68687
68687
|
this.observers.length = 0;
|
|
@@ -68697,8 +68697,8 @@ var require_rx_lite = __commonJS({
|
|
|
68697
68697
|
this.isStopped = true;
|
|
68698
68698
|
this.hasError = true;
|
|
68699
68699
|
this.error = error49;
|
|
68700
|
-
for (var i = 0,
|
|
68701
|
-
|
|
68700
|
+
for (var i = 0, os7 = cloneArray(this.observers), len = os7.length; i < len; i++) {
|
|
68701
|
+
os7[i].onError(error49);
|
|
68702
68702
|
}
|
|
68703
68703
|
this.observers.length = 0;
|
|
68704
68704
|
}
|
|
@@ -68806,8 +68806,8 @@ var require_rx_lite = __commonJS({
|
|
|
68806
68806
|
return;
|
|
68807
68807
|
}
|
|
68808
68808
|
this.isStopped = true;
|
|
68809
|
-
for (var i = 0,
|
|
68810
|
-
|
|
68809
|
+
for (var i = 0, os7 = cloneArray(this.observers), len = os7.length; i < len; i++) {
|
|
68810
|
+
os7[i].onCompleted();
|
|
68811
68811
|
}
|
|
68812
68812
|
this.observers.length = 0;
|
|
68813
68813
|
},
|
|
@@ -68823,8 +68823,8 @@ var require_rx_lite = __commonJS({
|
|
|
68823
68823
|
this.isStopped = true;
|
|
68824
68824
|
this.hasError = true;
|
|
68825
68825
|
this.error = error49;
|
|
68826
|
-
for (var i = 0,
|
|
68827
|
-
|
|
68826
|
+
for (var i = 0, os7 = cloneArray(this.observers), len = os7.length; i < len; i++) {
|
|
68827
|
+
os7[i].onError(error49);
|
|
68828
68828
|
}
|
|
68829
68829
|
this.observers.length = 0;
|
|
68830
68830
|
},
|
|
@@ -68838,8 +68838,8 @@ var require_rx_lite = __commonJS({
|
|
|
68838
68838
|
return;
|
|
68839
68839
|
}
|
|
68840
68840
|
this.value = value;
|
|
68841
|
-
for (var i = 0,
|
|
68842
|
-
|
|
68841
|
+
for (var i = 0, os7 = cloneArray(this.observers), len = os7.length; i < len; i++) {
|
|
68842
|
+
os7[i].onNext(value);
|
|
68843
68843
|
}
|
|
68844
68844
|
},
|
|
68845
68845
|
/**
|
|
@@ -68920,8 +68920,8 @@ var require_rx_lite = __commonJS({
|
|
|
68920
68920
|
var now = this.scheduler.now();
|
|
68921
68921
|
this.q.push({ interval: now, value });
|
|
68922
68922
|
this._trim(now);
|
|
68923
|
-
for (var i = 0,
|
|
68924
|
-
var observer =
|
|
68923
|
+
for (var i = 0, os7 = cloneArray(this.observers), len = os7.length; i < len; i++) {
|
|
68924
|
+
var observer = os7[i];
|
|
68925
68925
|
observer.onNext(value);
|
|
68926
68926
|
observer.ensureActive();
|
|
68927
68927
|
}
|
|
@@ -68940,8 +68940,8 @@ var require_rx_lite = __commonJS({
|
|
|
68940
68940
|
this.hasError = true;
|
|
68941
68941
|
var now = this.scheduler.now();
|
|
68942
68942
|
this._trim(now);
|
|
68943
|
-
for (var i = 0,
|
|
68944
|
-
var observer =
|
|
68943
|
+
for (var i = 0, os7 = cloneArray(this.observers), len = os7.length; i < len; i++) {
|
|
68944
|
+
var observer = os7[i];
|
|
68945
68945
|
observer.onError(error49);
|
|
68946
68946
|
observer.ensureActive();
|
|
68947
68947
|
}
|
|
@@ -68958,8 +68958,8 @@ var require_rx_lite = __commonJS({
|
|
|
68958
68958
|
this.isStopped = true;
|
|
68959
68959
|
var now = this.scheduler.now();
|
|
68960
68960
|
this._trim(now);
|
|
68961
|
-
for (var i = 0,
|
|
68962
|
-
var observer =
|
|
68961
|
+
for (var i = 0, os7 = cloneArray(this.observers), len = os7.length; i < len; i++) {
|
|
68962
|
+
var observer = os7[i];
|
|
68963
68963
|
observer.onCompleted();
|
|
68964
68964
|
observer.ensureActive();
|
|
68965
68965
|
}
|
|
@@ -71506,7 +71506,7 @@ var require_main2 = __commonJS({
|
|
|
71506
71506
|
"node_modules/dotenv/lib/main.js"(exports, module) {
|
|
71507
71507
|
var fs20 = __require("fs");
|
|
71508
71508
|
var path16 = __require("path");
|
|
71509
|
-
var
|
|
71509
|
+
var os7 = __require("os");
|
|
71510
71510
|
var crypto2 = __require("crypto");
|
|
71511
71511
|
var packageJson = require_package2();
|
|
71512
71512
|
var version4 = packageJson.version;
|
|
@@ -71629,7 +71629,7 @@ var require_main2 = __commonJS({
|
|
|
71629
71629
|
return null;
|
|
71630
71630
|
}
|
|
71631
71631
|
function _resolveHome(envPath) {
|
|
71632
|
-
return envPath[0] === "~" ? path16.join(
|
|
71632
|
+
return envPath[0] === "~" ? path16.join(os7.homedir(), envPath.slice(1)) : envPath;
|
|
71633
71633
|
}
|
|
71634
71634
|
function _configVault(options) {
|
|
71635
71635
|
const debug = Boolean(options && options.debug);
|
|
@@ -77144,7 +77144,7 @@ var require_constants9 = __commonJS({
|
|
|
77144
77144
|
"use strict";
|
|
77145
77145
|
var { sep } = __require("path");
|
|
77146
77146
|
var { platform } = process;
|
|
77147
|
-
var
|
|
77147
|
+
var os7 = __require("os");
|
|
77148
77148
|
exports.EV_ALL = "all";
|
|
77149
77149
|
exports.EV_READY = "ready";
|
|
77150
77150
|
exports.EV_ADD = "add";
|
|
@@ -77198,7 +77198,7 @@ var require_constants9 = __commonJS({
|
|
|
77198
77198
|
exports.isWindows = platform === "win32";
|
|
77199
77199
|
exports.isMacos = platform === "darwin";
|
|
77200
77200
|
exports.isLinux = platform === "linux";
|
|
77201
|
-
exports.isIBMi =
|
|
77201
|
+
exports.isIBMi = os7.type() === "OS400";
|
|
77202
77202
|
}
|
|
77203
77203
|
});
|
|
77204
77204
|
|
|
@@ -85465,7 +85465,7 @@ var package_default = {
|
|
|
85465
85465
|
type: "module",
|
|
85466
85466
|
homepage: "https://appwrite.io/support",
|
|
85467
85467
|
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",
|
|
85468
|
-
version: "
|
|
85468
|
+
version: "16.0.0",
|
|
85469
85469
|
license: "BSD-3-Clause",
|
|
85470
85470
|
main: "dist/index.cjs",
|
|
85471
85471
|
module: "dist/index.js",
|
|
@@ -85509,7 +85509,7 @@ var package_default = {
|
|
|
85509
85509
|
"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"
|
|
85510
85510
|
},
|
|
85511
85511
|
dependencies: {
|
|
85512
|
-
"@appwrite.io/console": "
|
|
85512
|
+
"@appwrite.io/console": "*",
|
|
85513
85513
|
chalk: "4.1.2",
|
|
85514
85514
|
chokidar: "^3.6.0",
|
|
85515
85515
|
"cli-progress": "^3.12.0",
|
|
@@ -99753,7 +99753,7 @@ import childProcess from "child_process";
|
|
|
99753
99753
|
// lib/constants.ts
|
|
99754
99754
|
var SDK_TITLE = "Appwrite";
|
|
99755
99755
|
var SDK_TITLE_LOWER = "appwrite";
|
|
99756
|
-
var SDK_VERSION = "
|
|
99756
|
+
var SDK_VERSION = "16.0.0";
|
|
99757
99757
|
var SDK_NAME = "Command Line";
|
|
99758
99758
|
var SDK_PLATFORM = "console";
|
|
99759
99759
|
var SDK_LANGUAGE = "cli";
|
|
@@ -100792,7 +100792,7 @@ var Client = class _Client {
|
|
|
100792
100792
|
"x-sdk-name": "Console",
|
|
100793
100793
|
"x-sdk-platform": "console",
|
|
100794
100794
|
"x-sdk-language": "web",
|
|
100795
|
-
"x-sdk-version": "
|
|
100795
|
+
"x-sdk-version": "6.0.0",
|
|
100796
100796
|
"X-Appwrite-Response-Format": "1.8.0"
|
|
100797
100797
|
};
|
|
100798
100798
|
this.realtime = {
|
|
@@ -102791,7 +102791,7 @@ var Account = class {
|
|
|
102791
102791
|
};
|
|
102792
102792
|
}
|
|
102793
102793
|
const provider = params.provider;
|
|
102794
|
-
const
|
|
102794
|
+
const success21 = params.success;
|
|
102795
102795
|
const failure = params.failure;
|
|
102796
102796
|
const scopes = params.scopes;
|
|
102797
102797
|
if (typeof provider === "undefined") {
|
|
@@ -102799,8 +102799,8 @@ var Account = class {
|
|
|
102799
102799
|
}
|
|
102800
102800
|
const apiPath = "/account/sessions/oauth2/{provider}".replace("{provider}", provider);
|
|
102801
102801
|
const payload = {};
|
|
102802
|
-
if (typeof
|
|
102803
|
-
payload["success"] =
|
|
102802
|
+
if (typeof success21 !== "undefined") {
|
|
102803
|
+
payload["success"] = success21;
|
|
102804
102804
|
}
|
|
102805
102805
|
if (typeof failure !== "undefined") {
|
|
102806
102806
|
payload["failure"] = failure;
|
|
@@ -103139,7 +103139,7 @@ var Account = class {
|
|
|
103139
103139
|
};
|
|
103140
103140
|
}
|
|
103141
103141
|
const provider = params.provider;
|
|
103142
|
-
const
|
|
103142
|
+
const success21 = params.success;
|
|
103143
103143
|
const failure = params.failure;
|
|
103144
103144
|
const scopes = params.scopes;
|
|
103145
103145
|
if (typeof provider === "undefined") {
|
|
@@ -103147,8 +103147,8 @@ var Account = class {
|
|
|
103147
103147
|
}
|
|
103148
103148
|
const apiPath = "/account/tokens/oauth2/{provider}".replace("{provider}", provider);
|
|
103149
103149
|
const payload = {};
|
|
103150
|
-
if (typeof
|
|
103151
|
-
payload["success"] =
|
|
103150
|
+
if (typeof success21 !== "undefined") {
|
|
103151
|
+
payload["success"] = success21;
|
|
103152
103152
|
}
|
|
103153
103153
|
if (typeof failure !== "undefined") {
|
|
103154
103154
|
payload["failure"] = failure;
|
|
@@ -116084,247 +116084,6 @@ var Projects = class {
|
|
|
116084
116084
|
};
|
|
116085
116085
|
return this.client.call("delete", uri, apiHeaders, payload);
|
|
116086
116086
|
}
|
|
116087
|
-
listWebhooks(paramsOrFirst, ...rest) {
|
|
116088
|
-
let params;
|
|
116089
|
-
if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
|
|
116090
|
-
params = paramsOrFirst || {};
|
|
116091
|
-
} else {
|
|
116092
|
-
params = {
|
|
116093
|
-
projectId: paramsOrFirst,
|
|
116094
|
-
total: rest[0]
|
|
116095
|
-
};
|
|
116096
|
-
}
|
|
116097
|
-
const projectId = params.projectId;
|
|
116098
|
-
const total = params.total;
|
|
116099
|
-
if (typeof projectId === "undefined") {
|
|
116100
|
-
throw new AppwriteException('Missing required parameter: "projectId"');
|
|
116101
|
-
}
|
|
116102
|
-
const apiPath = "/projects/{projectId}/webhooks".replace("{projectId}", projectId);
|
|
116103
|
-
const payload = {};
|
|
116104
|
-
if (typeof total !== "undefined") {
|
|
116105
|
-
payload["total"] = total;
|
|
116106
|
-
}
|
|
116107
|
-
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
116108
|
-
const apiHeaders = {};
|
|
116109
|
-
return this.client.call("get", uri, apiHeaders, payload);
|
|
116110
|
-
}
|
|
116111
|
-
createWebhook(paramsOrFirst, ...rest) {
|
|
116112
|
-
let params;
|
|
116113
|
-
if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
|
|
116114
|
-
params = paramsOrFirst || {};
|
|
116115
|
-
} else {
|
|
116116
|
-
params = {
|
|
116117
|
-
projectId: paramsOrFirst,
|
|
116118
|
-
name: rest[0],
|
|
116119
|
-
events: rest[1],
|
|
116120
|
-
url: rest[2],
|
|
116121
|
-
security: rest[3],
|
|
116122
|
-
enabled: rest[4],
|
|
116123
|
-
httpUser: rest[5],
|
|
116124
|
-
httpPass: rest[6]
|
|
116125
|
-
};
|
|
116126
|
-
}
|
|
116127
|
-
const projectId = params.projectId;
|
|
116128
|
-
const name = params.name;
|
|
116129
|
-
const events = params.events;
|
|
116130
|
-
const url2 = params.url;
|
|
116131
|
-
const security = params.security;
|
|
116132
|
-
const enabled = params.enabled;
|
|
116133
|
-
const httpUser = params.httpUser;
|
|
116134
|
-
const httpPass = params.httpPass;
|
|
116135
|
-
if (typeof projectId === "undefined") {
|
|
116136
|
-
throw new AppwriteException('Missing required parameter: "projectId"');
|
|
116137
|
-
}
|
|
116138
|
-
if (typeof name === "undefined") {
|
|
116139
|
-
throw new AppwriteException('Missing required parameter: "name"');
|
|
116140
|
-
}
|
|
116141
|
-
if (typeof events === "undefined") {
|
|
116142
|
-
throw new AppwriteException('Missing required parameter: "events"');
|
|
116143
|
-
}
|
|
116144
|
-
if (typeof url2 === "undefined") {
|
|
116145
|
-
throw new AppwriteException('Missing required parameter: "url"');
|
|
116146
|
-
}
|
|
116147
|
-
if (typeof security === "undefined") {
|
|
116148
|
-
throw new AppwriteException('Missing required parameter: "security"');
|
|
116149
|
-
}
|
|
116150
|
-
const apiPath = "/projects/{projectId}/webhooks".replace("{projectId}", projectId);
|
|
116151
|
-
const payload = {};
|
|
116152
|
-
if (typeof name !== "undefined") {
|
|
116153
|
-
payload["name"] = name;
|
|
116154
|
-
}
|
|
116155
|
-
if (typeof enabled !== "undefined") {
|
|
116156
|
-
payload["enabled"] = enabled;
|
|
116157
|
-
}
|
|
116158
|
-
if (typeof events !== "undefined") {
|
|
116159
|
-
payload["events"] = events;
|
|
116160
|
-
}
|
|
116161
|
-
if (typeof url2 !== "undefined") {
|
|
116162
|
-
payload["url"] = url2;
|
|
116163
|
-
}
|
|
116164
|
-
if (typeof security !== "undefined") {
|
|
116165
|
-
payload["security"] = security;
|
|
116166
|
-
}
|
|
116167
|
-
if (typeof httpUser !== "undefined") {
|
|
116168
|
-
payload["httpUser"] = httpUser;
|
|
116169
|
-
}
|
|
116170
|
-
if (typeof httpPass !== "undefined") {
|
|
116171
|
-
payload["httpPass"] = httpPass;
|
|
116172
|
-
}
|
|
116173
|
-
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
116174
|
-
const apiHeaders = {
|
|
116175
|
-
"content-type": "application/json"
|
|
116176
|
-
};
|
|
116177
|
-
return this.client.call("post", uri, apiHeaders, payload);
|
|
116178
|
-
}
|
|
116179
|
-
getWebhook(paramsOrFirst, ...rest) {
|
|
116180
|
-
let params;
|
|
116181
|
-
if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
|
|
116182
|
-
params = paramsOrFirst || {};
|
|
116183
|
-
} else {
|
|
116184
|
-
params = {
|
|
116185
|
-
projectId: paramsOrFirst,
|
|
116186
|
-
webhookId: rest[0]
|
|
116187
|
-
};
|
|
116188
|
-
}
|
|
116189
|
-
const projectId = params.projectId;
|
|
116190
|
-
const webhookId = params.webhookId;
|
|
116191
|
-
if (typeof projectId === "undefined") {
|
|
116192
|
-
throw new AppwriteException('Missing required parameter: "projectId"');
|
|
116193
|
-
}
|
|
116194
|
-
if (typeof webhookId === "undefined") {
|
|
116195
|
-
throw new AppwriteException('Missing required parameter: "webhookId"');
|
|
116196
|
-
}
|
|
116197
|
-
const apiPath = "/projects/{projectId}/webhooks/{webhookId}".replace("{projectId}", projectId).replace("{webhookId}", webhookId);
|
|
116198
|
-
const payload = {};
|
|
116199
|
-
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
116200
|
-
const apiHeaders = {};
|
|
116201
|
-
return this.client.call("get", uri, apiHeaders, payload);
|
|
116202
|
-
}
|
|
116203
|
-
updateWebhook(paramsOrFirst, ...rest) {
|
|
116204
|
-
let params;
|
|
116205
|
-
if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
|
|
116206
|
-
params = paramsOrFirst || {};
|
|
116207
|
-
} else {
|
|
116208
|
-
params = {
|
|
116209
|
-
projectId: paramsOrFirst,
|
|
116210
|
-
webhookId: rest[0],
|
|
116211
|
-
name: rest[1],
|
|
116212
|
-
events: rest[2],
|
|
116213
|
-
url: rest[3],
|
|
116214
|
-
security: rest[4],
|
|
116215
|
-
enabled: rest[5],
|
|
116216
|
-
httpUser: rest[6],
|
|
116217
|
-
httpPass: rest[7]
|
|
116218
|
-
};
|
|
116219
|
-
}
|
|
116220
|
-
const projectId = params.projectId;
|
|
116221
|
-
const webhookId = params.webhookId;
|
|
116222
|
-
const name = params.name;
|
|
116223
|
-
const events = params.events;
|
|
116224
|
-
const url2 = params.url;
|
|
116225
|
-
const security = params.security;
|
|
116226
|
-
const enabled = params.enabled;
|
|
116227
|
-
const httpUser = params.httpUser;
|
|
116228
|
-
const httpPass = params.httpPass;
|
|
116229
|
-
if (typeof projectId === "undefined") {
|
|
116230
|
-
throw new AppwriteException('Missing required parameter: "projectId"');
|
|
116231
|
-
}
|
|
116232
|
-
if (typeof webhookId === "undefined") {
|
|
116233
|
-
throw new AppwriteException('Missing required parameter: "webhookId"');
|
|
116234
|
-
}
|
|
116235
|
-
if (typeof name === "undefined") {
|
|
116236
|
-
throw new AppwriteException('Missing required parameter: "name"');
|
|
116237
|
-
}
|
|
116238
|
-
if (typeof events === "undefined") {
|
|
116239
|
-
throw new AppwriteException('Missing required parameter: "events"');
|
|
116240
|
-
}
|
|
116241
|
-
if (typeof url2 === "undefined") {
|
|
116242
|
-
throw new AppwriteException('Missing required parameter: "url"');
|
|
116243
|
-
}
|
|
116244
|
-
if (typeof security === "undefined") {
|
|
116245
|
-
throw new AppwriteException('Missing required parameter: "security"');
|
|
116246
|
-
}
|
|
116247
|
-
const apiPath = "/projects/{projectId}/webhooks/{webhookId}".replace("{projectId}", projectId).replace("{webhookId}", webhookId);
|
|
116248
|
-
const payload = {};
|
|
116249
|
-
if (typeof name !== "undefined") {
|
|
116250
|
-
payload["name"] = name;
|
|
116251
|
-
}
|
|
116252
|
-
if (typeof enabled !== "undefined") {
|
|
116253
|
-
payload["enabled"] = enabled;
|
|
116254
|
-
}
|
|
116255
|
-
if (typeof events !== "undefined") {
|
|
116256
|
-
payload["events"] = events;
|
|
116257
|
-
}
|
|
116258
|
-
if (typeof url2 !== "undefined") {
|
|
116259
|
-
payload["url"] = url2;
|
|
116260
|
-
}
|
|
116261
|
-
if (typeof security !== "undefined") {
|
|
116262
|
-
payload["security"] = security;
|
|
116263
|
-
}
|
|
116264
|
-
if (typeof httpUser !== "undefined") {
|
|
116265
|
-
payload["httpUser"] = httpUser;
|
|
116266
|
-
}
|
|
116267
|
-
if (typeof httpPass !== "undefined") {
|
|
116268
|
-
payload["httpPass"] = httpPass;
|
|
116269
|
-
}
|
|
116270
|
-
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
116271
|
-
const apiHeaders = {
|
|
116272
|
-
"content-type": "application/json"
|
|
116273
|
-
};
|
|
116274
|
-
return this.client.call("put", uri, apiHeaders, payload);
|
|
116275
|
-
}
|
|
116276
|
-
deleteWebhook(paramsOrFirst, ...rest) {
|
|
116277
|
-
let params;
|
|
116278
|
-
if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
|
|
116279
|
-
params = paramsOrFirst || {};
|
|
116280
|
-
} else {
|
|
116281
|
-
params = {
|
|
116282
|
-
projectId: paramsOrFirst,
|
|
116283
|
-
webhookId: rest[0]
|
|
116284
|
-
};
|
|
116285
|
-
}
|
|
116286
|
-
const projectId = params.projectId;
|
|
116287
|
-
const webhookId = params.webhookId;
|
|
116288
|
-
if (typeof projectId === "undefined") {
|
|
116289
|
-
throw new AppwriteException('Missing required parameter: "projectId"');
|
|
116290
|
-
}
|
|
116291
|
-
if (typeof webhookId === "undefined") {
|
|
116292
|
-
throw new AppwriteException('Missing required parameter: "webhookId"');
|
|
116293
|
-
}
|
|
116294
|
-
const apiPath = "/projects/{projectId}/webhooks/{webhookId}".replace("{projectId}", projectId).replace("{webhookId}", webhookId);
|
|
116295
|
-
const payload = {};
|
|
116296
|
-
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
116297
|
-
const apiHeaders = {
|
|
116298
|
-
"content-type": "application/json"
|
|
116299
|
-
};
|
|
116300
|
-
return this.client.call("delete", uri, apiHeaders, payload);
|
|
116301
|
-
}
|
|
116302
|
-
updateWebhookSignature(paramsOrFirst, ...rest) {
|
|
116303
|
-
let params;
|
|
116304
|
-
if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
|
|
116305
|
-
params = paramsOrFirst || {};
|
|
116306
|
-
} else {
|
|
116307
|
-
params = {
|
|
116308
|
-
projectId: paramsOrFirst,
|
|
116309
|
-
webhookId: rest[0]
|
|
116310
|
-
};
|
|
116311
|
-
}
|
|
116312
|
-
const projectId = params.projectId;
|
|
116313
|
-
const webhookId = params.webhookId;
|
|
116314
|
-
if (typeof projectId === "undefined") {
|
|
116315
|
-
throw new AppwriteException('Missing required parameter: "projectId"');
|
|
116316
|
-
}
|
|
116317
|
-
if (typeof webhookId === "undefined") {
|
|
116318
|
-
throw new AppwriteException('Missing required parameter: "webhookId"');
|
|
116319
|
-
}
|
|
116320
|
-
const apiPath = "/projects/{projectId}/webhooks/{webhookId}/signature".replace("{projectId}", projectId).replace("{webhookId}", webhookId);
|
|
116321
|
-
const payload = {};
|
|
116322
|
-
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
116323
|
-
const apiHeaders = {
|
|
116324
|
-
"content-type": "application/json"
|
|
116325
|
-
};
|
|
116326
|
-
return this.client.call("patch", uri, apiHeaders, payload);
|
|
116327
|
-
}
|
|
116328
116087
|
};
|
|
116329
116088
|
var Proxy2 = class {
|
|
116330
116089
|
constructor(client2) {
|
|
@@ -123819,6 +123578,229 @@ var Vcs = class {
|
|
|
123819
123578
|
return this.client.call("delete", uri, apiHeaders, payload);
|
|
123820
123579
|
}
|
|
123821
123580
|
};
|
|
123581
|
+
var Webhooks = class {
|
|
123582
|
+
constructor(client2) {
|
|
123583
|
+
this.client = client2;
|
|
123584
|
+
}
|
|
123585
|
+
list(paramsOrFirst, ...rest) {
|
|
123586
|
+
let params;
|
|
123587
|
+
if (!paramsOrFirst || paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
|
|
123588
|
+
params = paramsOrFirst || {};
|
|
123589
|
+
} else {
|
|
123590
|
+
params = {
|
|
123591
|
+
queries: paramsOrFirst,
|
|
123592
|
+
total: rest[0]
|
|
123593
|
+
};
|
|
123594
|
+
}
|
|
123595
|
+
const queries = params.queries;
|
|
123596
|
+
const total = params.total;
|
|
123597
|
+
const apiPath = "/webhooks";
|
|
123598
|
+
const payload = {};
|
|
123599
|
+
if (typeof queries !== "undefined") {
|
|
123600
|
+
payload["queries"] = queries;
|
|
123601
|
+
}
|
|
123602
|
+
if (typeof total !== "undefined") {
|
|
123603
|
+
payload["total"] = total;
|
|
123604
|
+
}
|
|
123605
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
123606
|
+
const apiHeaders = {};
|
|
123607
|
+
return this.client.call("get", uri, apiHeaders, payload);
|
|
123608
|
+
}
|
|
123609
|
+
create(paramsOrFirst, ...rest) {
|
|
123610
|
+
let params;
|
|
123611
|
+
if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
|
|
123612
|
+
params = paramsOrFirst || {};
|
|
123613
|
+
} else {
|
|
123614
|
+
params = {
|
|
123615
|
+
webhookId: paramsOrFirst,
|
|
123616
|
+
url: rest[0],
|
|
123617
|
+
name: rest[1],
|
|
123618
|
+
events: rest[2],
|
|
123619
|
+
enabled: rest[3],
|
|
123620
|
+
security: rest[4],
|
|
123621
|
+
httpUser: rest[5],
|
|
123622
|
+
httpPass: rest[6]
|
|
123623
|
+
};
|
|
123624
|
+
}
|
|
123625
|
+
const webhookId = params.webhookId;
|
|
123626
|
+
const url2 = params.url;
|
|
123627
|
+
const name = params.name;
|
|
123628
|
+
const events = params.events;
|
|
123629
|
+
const enabled = params.enabled;
|
|
123630
|
+
const security = params.security;
|
|
123631
|
+
const httpUser = params.httpUser;
|
|
123632
|
+
const httpPass = params.httpPass;
|
|
123633
|
+
if (typeof webhookId === "undefined") {
|
|
123634
|
+
throw new AppwriteException('Missing required parameter: "webhookId"');
|
|
123635
|
+
}
|
|
123636
|
+
if (typeof url2 === "undefined") {
|
|
123637
|
+
throw new AppwriteException('Missing required parameter: "url"');
|
|
123638
|
+
}
|
|
123639
|
+
if (typeof name === "undefined") {
|
|
123640
|
+
throw new AppwriteException('Missing required parameter: "name"');
|
|
123641
|
+
}
|
|
123642
|
+
if (typeof events === "undefined") {
|
|
123643
|
+
throw new AppwriteException('Missing required parameter: "events"');
|
|
123644
|
+
}
|
|
123645
|
+
const apiPath = "/webhooks";
|
|
123646
|
+
const payload = {};
|
|
123647
|
+
if (typeof webhookId !== "undefined") {
|
|
123648
|
+
payload["webhookId"] = webhookId;
|
|
123649
|
+
}
|
|
123650
|
+
if (typeof url2 !== "undefined") {
|
|
123651
|
+
payload["url"] = url2;
|
|
123652
|
+
}
|
|
123653
|
+
if (typeof name !== "undefined") {
|
|
123654
|
+
payload["name"] = name;
|
|
123655
|
+
}
|
|
123656
|
+
if (typeof events !== "undefined") {
|
|
123657
|
+
payload["events"] = events;
|
|
123658
|
+
}
|
|
123659
|
+
if (typeof enabled !== "undefined") {
|
|
123660
|
+
payload["enabled"] = enabled;
|
|
123661
|
+
}
|
|
123662
|
+
if (typeof security !== "undefined") {
|
|
123663
|
+
payload["security"] = security;
|
|
123664
|
+
}
|
|
123665
|
+
if (typeof httpUser !== "undefined") {
|
|
123666
|
+
payload["httpUser"] = httpUser;
|
|
123667
|
+
}
|
|
123668
|
+
if (typeof httpPass !== "undefined") {
|
|
123669
|
+
payload["httpPass"] = httpPass;
|
|
123670
|
+
}
|
|
123671
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
123672
|
+
const apiHeaders = {
|
|
123673
|
+
"content-type": "application/json"
|
|
123674
|
+
};
|
|
123675
|
+
return this.client.call("post", uri, apiHeaders, payload);
|
|
123676
|
+
}
|
|
123677
|
+
get(paramsOrFirst) {
|
|
123678
|
+
let params;
|
|
123679
|
+
if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
|
|
123680
|
+
params = paramsOrFirst || {};
|
|
123681
|
+
} else {
|
|
123682
|
+
params = {
|
|
123683
|
+
webhookId: paramsOrFirst
|
|
123684
|
+
};
|
|
123685
|
+
}
|
|
123686
|
+
const webhookId = params.webhookId;
|
|
123687
|
+
if (typeof webhookId === "undefined") {
|
|
123688
|
+
throw new AppwriteException('Missing required parameter: "webhookId"');
|
|
123689
|
+
}
|
|
123690
|
+
const apiPath = "/webhooks/{webhookId}".replace("{webhookId}", webhookId);
|
|
123691
|
+
const payload = {};
|
|
123692
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
123693
|
+
const apiHeaders = {};
|
|
123694
|
+
return this.client.call("get", uri, apiHeaders, payload);
|
|
123695
|
+
}
|
|
123696
|
+
update(paramsOrFirst, ...rest) {
|
|
123697
|
+
let params;
|
|
123698
|
+
if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
|
|
123699
|
+
params = paramsOrFirst || {};
|
|
123700
|
+
} else {
|
|
123701
|
+
params = {
|
|
123702
|
+
webhookId: paramsOrFirst,
|
|
123703
|
+
name: rest[0],
|
|
123704
|
+
url: rest[1],
|
|
123705
|
+
events: rest[2],
|
|
123706
|
+
enabled: rest[3],
|
|
123707
|
+
security: rest[4],
|
|
123708
|
+
httpUser: rest[5],
|
|
123709
|
+
httpPass: rest[6]
|
|
123710
|
+
};
|
|
123711
|
+
}
|
|
123712
|
+
const webhookId = params.webhookId;
|
|
123713
|
+
const name = params.name;
|
|
123714
|
+
const url2 = params.url;
|
|
123715
|
+
const events = params.events;
|
|
123716
|
+
const enabled = params.enabled;
|
|
123717
|
+
const security = params.security;
|
|
123718
|
+
const httpUser = params.httpUser;
|
|
123719
|
+
const httpPass = params.httpPass;
|
|
123720
|
+
if (typeof webhookId === "undefined") {
|
|
123721
|
+
throw new AppwriteException('Missing required parameter: "webhookId"');
|
|
123722
|
+
}
|
|
123723
|
+
if (typeof name === "undefined") {
|
|
123724
|
+
throw new AppwriteException('Missing required parameter: "name"');
|
|
123725
|
+
}
|
|
123726
|
+
if (typeof url2 === "undefined") {
|
|
123727
|
+
throw new AppwriteException('Missing required parameter: "url"');
|
|
123728
|
+
}
|
|
123729
|
+
if (typeof events === "undefined") {
|
|
123730
|
+
throw new AppwriteException('Missing required parameter: "events"');
|
|
123731
|
+
}
|
|
123732
|
+
const apiPath = "/webhooks/{webhookId}".replace("{webhookId}", webhookId);
|
|
123733
|
+
const payload = {};
|
|
123734
|
+
if (typeof name !== "undefined") {
|
|
123735
|
+
payload["name"] = name;
|
|
123736
|
+
}
|
|
123737
|
+
if (typeof url2 !== "undefined") {
|
|
123738
|
+
payload["url"] = url2;
|
|
123739
|
+
}
|
|
123740
|
+
if (typeof events !== "undefined") {
|
|
123741
|
+
payload["events"] = events;
|
|
123742
|
+
}
|
|
123743
|
+
if (typeof enabled !== "undefined") {
|
|
123744
|
+
payload["enabled"] = enabled;
|
|
123745
|
+
}
|
|
123746
|
+
if (typeof security !== "undefined") {
|
|
123747
|
+
payload["security"] = security;
|
|
123748
|
+
}
|
|
123749
|
+
if (typeof httpUser !== "undefined") {
|
|
123750
|
+
payload["httpUser"] = httpUser;
|
|
123751
|
+
}
|
|
123752
|
+
if (typeof httpPass !== "undefined") {
|
|
123753
|
+
payload["httpPass"] = httpPass;
|
|
123754
|
+
}
|
|
123755
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
123756
|
+
const apiHeaders = {
|
|
123757
|
+
"content-type": "application/json"
|
|
123758
|
+
};
|
|
123759
|
+
return this.client.call("put", uri, apiHeaders, payload);
|
|
123760
|
+
}
|
|
123761
|
+
delete(paramsOrFirst) {
|
|
123762
|
+
let params;
|
|
123763
|
+
if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
|
|
123764
|
+
params = paramsOrFirst || {};
|
|
123765
|
+
} else {
|
|
123766
|
+
params = {
|
|
123767
|
+
webhookId: paramsOrFirst
|
|
123768
|
+
};
|
|
123769
|
+
}
|
|
123770
|
+
const webhookId = params.webhookId;
|
|
123771
|
+
if (typeof webhookId === "undefined") {
|
|
123772
|
+
throw new AppwriteException('Missing required parameter: "webhookId"');
|
|
123773
|
+
}
|
|
123774
|
+
const apiPath = "/webhooks/{webhookId}".replace("{webhookId}", webhookId);
|
|
123775
|
+
const payload = {};
|
|
123776
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
123777
|
+
const apiHeaders = {
|
|
123778
|
+
"content-type": "application/json"
|
|
123779
|
+
};
|
|
123780
|
+
return this.client.call("delete", uri, apiHeaders, payload);
|
|
123781
|
+
}
|
|
123782
|
+
updateSignature(paramsOrFirst) {
|
|
123783
|
+
let params;
|
|
123784
|
+
if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
|
|
123785
|
+
params = paramsOrFirst || {};
|
|
123786
|
+
} else {
|
|
123787
|
+
params = {
|
|
123788
|
+
webhookId: paramsOrFirst
|
|
123789
|
+
};
|
|
123790
|
+
}
|
|
123791
|
+
const webhookId = params.webhookId;
|
|
123792
|
+
if (typeof webhookId === "undefined") {
|
|
123793
|
+
throw new AppwriteException('Missing required parameter: "webhookId"');
|
|
123794
|
+
}
|
|
123795
|
+
const apiPath = "/webhooks/{webhookId}/signature".replace("{webhookId}", webhookId);
|
|
123796
|
+
const payload = {};
|
|
123797
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
123798
|
+
const apiHeaders = {
|
|
123799
|
+
"content-type": "application/json"
|
|
123800
|
+
};
|
|
123801
|
+
return this.client.call("patch", uri, apiHeaders, payload);
|
|
123802
|
+
}
|
|
123803
|
+
};
|
|
123822
123804
|
var RealtimeCode;
|
|
123823
123805
|
(function(RealtimeCode2) {
|
|
123824
123806
|
RealtimeCode2[RealtimeCode2["NORMAL_CLOSURE"] = 1e3] = "NORMAL_CLOSURE";
|
|
@@ -124071,6 +124053,8 @@ var Scopes;
|
|
|
124071
124053
|
Scopes3["AssistantRead"] = "assistant.read";
|
|
124072
124054
|
Scopes3["TokensRead"] = "tokens.read";
|
|
124073
124055
|
Scopes3["TokensWrite"] = "tokens.write";
|
|
124056
|
+
Scopes3["WebhooksRead"] = "webhooks.read";
|
|
124057
|
+
Scopes3["WebhooksWrite"] = "webhooks.write";
|
|
124074
124058
|
Scopes3["PoliciesWrite"] = "policies.write";
|
|
124075
124059
|
Scopes3["PoliciesRead"] = "policies.read";
|
|
124076
124060
|
Scopes3["ArchivesRead"] = "archives.read";
|
|
@@ -124920,9 +124904,6 @@ var Runtime;
|
|
|
124920
124904
|
Runtime2["Pythonml311"] = "python-ml-3.11";
|
|
124921
124905
|
Runtime2["Pythonml312"] = "python-ml-3.12";
|
|
124922
124906
|
Runtime2["Pythonml313"] = "python-ml-3.13";
|
|
124923
|
-
Runtime2["Deno121"] = "deno-1.21";
|
|
124924
|
-
Runtime2["Deno124"] = "deno-1.24";
|
|
124925
|
-
Runtime2["Deno135"] = "deno-1.35";
|
|
124926
124907
|
Runtime2["Deno140"] = "deno-1.40";
|
|
124927
124908
|
Runtime2["Deno146"] = "deno-1.46";
|
|
124928
124909
|
Runtime2["Deno20"] = "deno-2.0";
|
|
@@ -124978,6 +124959,92 @@ var Runtime;
|
|
|
124978
124959
|
Runtime2["Flutter332"] = "flutter-3.32";
|
|
124979
124960
|
Runtime2["Flutter335"] = "flutter-3.35";
|
|
124980
124961
|
Runtime2["Flutter338"] = "flutter-3.38";
|
|
124962
|
+
Runtime2["Node145rc"] = "node-14.5-rc";
|
|
124963
|
+
Runtime2["Node160rc"] = "node-16.0-rc";
|
|
124964
|
+
Runtime2["Node180rc"] = "node-18.0-rc";
|
|
124965
|
+
Runtime2["Node190rc"] = "node-19.0-rc";
|
|
124966
|
+
Runtime2["Node200rc"] = "node-20.0-rc";
|
|
124967
|
+
Runtime2["Node210rc"] = "node-21.0-rc";
|
|
124968
|
+
Runtime2["Node22rc"] = "node-22-rc";
|
|
124969
|
+
Runtime2["Node23rc"] = "node-23-rc";
|
|
124970
|
+
Runtime2["Node24rc"] = "node-24-rc";
|
|
124971
|
+
Runtime2["Node25rc"] = "node-25-rc";
|
|
124972
|
+
Runtime2["Php80rc"] = "php-8.0-rc";
|
|
124973
|
+
Runtime2["Php81rc"] = "php-8.1-rc";
|
|
124974
|
+
Runtime2["Php82rc"] = "php-8.2-rc";
|
|
124975
|
+
Runtime2["Php83rc"] = "php-8.3-rc";
|
|
124976
|
+
Runtime2["Php84rc"] = "php-8.4-rc";
|
|
124977
|
+
Runtime2["Ruby30rc"] = "ruby-3.0-rc";
|
|
124978
|
+
Runtime2["Ruby31rc"] = "ruby-3.1-rc";
|
|
124979
|
+
Runtime2["Ruby32rc"] = "ruby-3.2-rc";
|
|
124980
|
+
Runtime2["Ruby33rc"] = "ruby-3.3-rc";
|
|
124981
|
+
Runtime2["Ruby34rc"] = "ruby-3.4-rc";
|
|
124982
|
+
Runtime2["Ruby40rc"] = "ruby-4.0-rc";
|
|
124983
|
+
Runtime2["Python38rc"] = "python-3.8-rc";
|
|
124984
|
+
Runtime2["Python39rc"] = "python-3.9-rc";
|
|
124985
|
+
Runtime2["Python310rc"] = "python-3.10-rc";
|
|
124986
|
+
Runtime2["Python311rc"] = "python-3.11-rc";
|
|
124987
|
+
Runtime2["Python312rc"] = "python-3.12-rc";
|
|
124988
|
+
Runtime2["Python313rc"] = "python-3.13-rc";
|
|
124989
|
+
Runtime2["Python314rc"] = "python-3.14-rc";
|
|
124990
|
+
Runtime2["Pythonml311rc"] = "python-ml-3.11-rc";
|
|
124991
|
+
Runtime2["Pythonml312rc"] = "python-ml-3.12-rc";
|
|
124992
|
+
Runtime2["Pythonml313rc"] = "python-ml-3.13-rc";
|
|
124993
|
+
Runtime2["Deno140rc"] = "deno-1.40-rc";
|
|
124994
|
+
Runtime2["Deno146rc"] = "deno-1.46-rc";
|
|
124995
|
+
Runtime2["Deno20rc"] = "deno-2.0-rc";
|
|
124996
|
+
Runtime2["Deno25rc"] = "deno-2.5-rc";
|
|
124997
|
+
Runtime2["Deno26rc"] = "deno-2.6-rc";
|
|
124998
|
+
Runtime2["Dart215rc"] = "dart-2.15-rc";
|
|
124999
|
+
Runtime2["Dart216rc"] = "dart-2.16-rc";
|
|
125000
|
+
Runtime2["Dart217rc"] = "dart-2.17-rc";
|
|
125001
|
+
Runtime2["Dart218rc"] = "dart-2.18-rc";
|
|
125002
|
+
Runtime2["Dart219rc"] = "dart-2.19-rc";
|
|
125003
|
+
Runtime2["Dart30rc"] = "dart-3.0-rc";
|
|
125004
|
+
Runtime2["Dart31rc"] = "dart-3.1-rc";
|
|
125005
|
+
Runtime2["Dart33rc"] = "dart-3.3-rc";
|
|
125006
|
+
Runtime2["Dart35rc"] = "dart-3.5-rc";
|
|
125007
|
+
Runtime2["Dart38rc"] = "dart-3.8-rc";
|
|
125008
|
+
Runtime2["Dart39rc"] = "dart-3.9-rc";
|
|
125009
|
+
Runtime2["Dart310rc"] = "dart-3.10-rc";
|
|
125010
|
+
Runtime2["Dotnet60rc"] = "dotnet-6.0-rc";
|
|
125011
|
+
Runtime2["Dotnet70rc"] = "dotnet-7.0-rc";
|
|
125012
|
+
Runtime2["Dotnet80rc"] = "dotnet-8.0-rc";
|
|
125013
|
+
Runtime2["Dotnet10rc"] = "dotnet-10-rc";
|
|
125014
|
+
Runtime2["Java80rc"] = "java-8.0-rc";
|
|
125015
|
+
Runtime2["Java110rc"] = "java-11.0-rc";
|
|
125016
|
+
Runtime2["Java170rc"] = "java-17.0-rc";
|
|
125017
|
+
Runtime2["Java180rc"] = "java-18.0-rc";
|
|
125018
|
+
Runtime2["Java210rc"] = "java-21.0-rc";
|
|
125019
|
+
Runtime2["Java22rc"] = "java-22-rc";
|
|
125020
|
+
Runtime2["Java25rc"] = "java-25-rc";
|
|
125021
|
+
Runtime2["Swift55rc"] = "swift-5.5-rc";
|
|
125022
|
+
Runtime2["Swift58rc"] = "swift-5.8-rc";
|
|
125023
|
+
Runtime2["Swift59rc"] = "swift-5.9-rc";
|
|
125024
|
+
Runtime2["Swift510rc"] = "swift-5.10-rc";
|
|
125025
|
+
Runtime2["Swift62rc"] = "swift-6.2-rc";
|
|
125026
|
+
Runtime2["Kotlin16rc"] = "kotlin-1.6-rc";
|
|
125027
|
+
Runtime2["Kotlin18rc"] = "kotlin-1.8-rc";
|
|
125028
|
+
Runtime2["Kotlin19rc"] = "kotlin-1.9-rc";
|
|
125029
|
+
Runtime2["Kotlin20rc"] = "kotlin-2.0-rc";
|
|
125030
|
+
Runtime2["Kotlin23rc"] = "kotlin-2.3-rc";
|
|
125031
|
+
Runtime2["Cpp17rc"] = "cpp-17-rc";
|
|
125032
|
+
Runtime2["Cpp20rc"] = "cpp-20-rc";
|
|
125033
|
+
Runtime2["Bun10rc"] = "bun-1.0-rc";
|
|
125034
|
+
Runtime2["Bun11rc"] = "bun-1.1-rc";
|
|
125035
|
+
Runtime2["Bun12rc"] = "bun-1.2-rc";
|
|
125036
|
+
Runtime2["Bun13rc"] = "bun-1.3-rc";
|
|
125037
|
+
Runtime2["Go123rc"] = "go-1.23-rc";
|
|
125038
|
+
Runtime2["Go124rc"] = "go-1.24-rc";
|
|
125039
|
+
Runtime2["Go125rc"] = "go-1.25-rc";
|
|
125040
|
+
Runtime2["Go126rc"] = "go-1.26-rc";
|
|
125041
|
+
Runtime2["Static1rc"] = "static-1-rc";
|
|
125042
|
+
Runtime2["Flutter324rc"] = "flutter-3.24-rc";
|
|
125043
|
+
Runtime2["Flutter327rc"] = "flutter-3.27-rc";
|
|
125044
|
+
Runtime2["Flutter329rc"] = "flutter-3.29-rc";
|
|
125045
|
+
Runtime2["Flutter332rc"] = "flutter-3.32-rc";
|
|
125046
|
+
Runtime2["Flutter335rc"] = "flutter-3.35-rc";
|
|
125047
|
+
Runtime2["Flutter338rc"] = "flutter-3.38-rc";
|
|
124981
125048
|
})(Runtime || (Runtime = {}));
|
|
124982
125049
|
var Runtimes;
|
|
124983
125050
|
(function(Runtimes2) {
|
|
@@ -125012,9 +125079,6 @@ var Runtimes;
|
|
|
125012
125079
|
Runtimes2["Pythonml311"] = "python-ml-3.11";
|
|
125013
125080
|
Runtimes2["Pythonml312"] = "python-ml-3.12";
|
|
125014
125081
|
Runtimes2["Pythonml313"] = "python-ml-3.13";
|
|
125015
|
-
Runtimes2["Deno121"] = "deno-1.21";
|
|
125016
|
-
Runtimes2["Deno124"] = "deno-1.24";
|
|
125017
|
-
Runtimes2["Deno135"] = "deno-1.35";
|
|
125018
125082
|
Runtimes2["Deno140"] = "deno-1.40";
|
|
125019
125083
|
Runtimes2["Deno146"] = "deno-1.46";
|
|
125020
125084
|
Runtimes2["Deno20"] = "deno-2.0";
|
|
@@ -125070,6 +125134,92 @@ var Runtimes;
|
|
|
125070
125134
|
Runtimes2["Flutter332"] = "flutter-3.32";
|
|
125071
125135
|
Runtimes2["Flutter335"] = "flutter-3.35";
|
|
125072
125136
|
Runtimes2["Flutter338"] = "flutter-3.38";
|
|
125137
|
+
Runtimes2["Node145rc"] = "node-14.5-rc";
|
|
125138
|
+
Runtimes2["Node160rc"] = "node-16.0-rc";
|
|
125139
|
+
Runtimes2["Node180rc"] = "node-18.0-rc";
|
|
125140
|
+
Runtimes2["Node190rc"] = "node-19.0-rc";
|
|
125141
|
+
Runtimes2["Node200rc"] = "node-20.0-rc";
|
|
125142
|
+
Runtimes2["Node210rc"] = "node-21.0-rc";
|
|
125143
|
+
Runtimes2["Node22rc"] = "node-22-rc";
|
|
125144
|
+
Runtimes2["Node23rc"] = "node-23-rc";
|
|
125145
|
+
Runtimes2["Node24rc"] = "node-24-rc";
|
|
125146
|
+
Runtimes2["Node25rc"] = "node-25-rc";
|
|
125147
|
+
Runtimes2["Php80rc"] = "php-8.0-rc";
|
|
125148
|
+
Runtimes2["Php81rc"] = "php-8.1-rc";
|
|
125149
|
+
Runtimes2["Php82rc"] = "php-8.2-rc";
|
|
125150
|
+
Runtimes2["Php83rc"] = "php-8.3-rc";
|
|
125151
|
+
Runtimes2["Php84rc"] = "php-8.4-rc";
|
|
125152
|
+
Runtimes2["Ruby30rc"] = "ruby-3.0-rc";
|
|
125153
|
+
Runtimes2["Ruby31rc"] = "ruby-3.1-rc";
|
|
125154
|
+
Runtimes2["Ruby32rc"] = "ruby-3.2-rc";
|
|
125155
|
+
Runtimes2["Ruby33rc"] = "ruby-3.3-rc";
|
|
125156
|
+
Runtimes2["Ruby34rc"] = "ruby-3.4-rc";
|
|
125157
|
+
Runtimes2["Ruby40rc"] = "ruby-4.0-rc";
|
|
125158
|
+
Runtimes2["Python38rc"] = "python-3.8-rc";
|
|
125159
|
+
Runtimes2["Python39rc"] = "python-3.9-rc";
|
|
125160
|
+
Runtimes2["Python310rc"] = "python-3.10-rc";
|
|
125161
|
+
Runtimes2["Python311rc"] = "python-3.11-rc";
|
|
125162
|
+
Runtimes2["Python312rc"] = "python-3.12-rc";
|
|
125163
|
+
Runtimes2["Python313rc"] = "python-3.13-rc";
|
|
125164
|
+
Runtimes2["Python314rc"] = "python-3.14-rc";
|
|
125165
|
+
Runtimes2["Pythonml311rc"] = "python-ml-3.11-rc";
|
|
125166
|
+
Runtimes2["Pythonml312rc"] = "python-ml-3.12-rc";
|
|
125167
|
+
Runtimes2["Pythonml313rc"] = "python-ml-3.13-rc";
|
|
125168
|
+
Runtimes2["Deno140rc"] = "deno-1.40-rc";
|
|
125169
|
+
Runtimes2["Deno146rc"] = "deno-1.46-rc";
|
|
125170
|
+
Runtimes2["Deno20rc"] = "deno-2.0-rc";
|
|
125171
|
+
Runtimes2["Deno25rc"] = "deno-2.5-rc";
|
|
125172
|
+
Runtimes2["Deno26rc"] = "deno-2.6-rc";
|
|
125173
|
+
Runtimes2["Dart215rc"] = "dart-2.15-rc";
|
|
125174
|
+
Runtimes2["Dart216rc"] = "dart-2.16-rc";
|
|
125175
|
+
Runtimes2["Dart217rc"] = "dart-2.17-rc";
|
|
125176
|
+
Runtimes2["Dart218rc"] = "dart-2.18-rc";
|
|
125177
|
+
Runtimes2["Dart219rc"] = "dart-2.19-rc";
|
|
125178
|
+
Runtimes2["Dart30rc"] = "dart-3.0-rc";
|
|
125179
|
+
Runtimes2["Dart31rc"] = "dart-3.1-rc";
|
|
125180
|
+
Runtimes2["Dart33rc"] = "dart-3.3-rc";
|
|
125181
|
+
Runtimes2["Dart35rc"] = "dart-3.5-rc";
|
|
125182
|
+
Runtimes2["Dart38rc"] = "dart-3.8-rc";
|
|
125183
|
+
Runtimes2["Dart39rc"] = "dart-3.9-rc";
|
|
125184
|
+
Runtimes2["Dart310rc"] = "dart-3.10-rc";
|
|
125185
|
+
Runtimes2["Dotnet60rc"] = "dotnet-6.0-rc";
|
|
125186
|
+
Runtimes2["Dotnet70rc"] = "dotnet-7.0-rc";
|
|
125187
|
+
Runtimes2["Dotnet80rc"] = "dotnet-8.0-rc";
|
|
125188
|
+
Runtimes2["Dotnet10rc"] = "dotnet-10-rc";
|
|
125189
|
+
Runtimes2["Java80rc"] = "java-8.0-rc";
|
|
125190
|
+
Runtimes2["Java110rc"] = "java-11.0-rc";
|
|
125191
|
+
Runtimes2["Java170rc"] = "java-17.0-rc";
|
|
125192
|
+
Runtimes2["Java180rc"] = "java-18.0-rc";
|
|
125193
|
+
Runtimes2["Java210rc"] = "java-21.0-rc";
|
|
125194
|
+
Runtimes2["Java22rc"] = "java-22-rc";
|
|
125195
|
+
Runtimes2["Java25rc"] = "java-25-rc";
|
|
125196
|
+
Runtimes2["Swift55rc"] = "swift-5.5-rc";
|
|
125197
|
+
Runtimes2["Swift58rc"] = "swift-5.8-rc";
|
|
125198
|
+
Runtimes2["Swift59rc"] = "swift-5.9-rc";
|
|
125199
|
+
Runtimes2["Swift510rc"] = "swift-5.10-rc";
|
|
125200
|
+
Runtimes2["Swift62rc"] = "swift-6.2-rc";
|
|
125201
|
+
Runtimes2["Kotlin16rc"] = "kotlin-1.6-rc";
|
|
125202
|
+
Runtimes2["Kotlin18rc"] = "kotlin-1.8-rc";
|
|
125203
|
+
Runtimes2["Kotlin19rc"] = "kotlin-1.9-rc";
|
|
125204
|
+
Runtimes2["Kotlin20rc"] = "kotlin-2.0-rc";
|
|
125205
|
+
Runtimes2["Kotlin23rc"] = "kotlin-2.3-rc";
|
|
125206
|
+
Runtimes2["Cpp17rc"] = "cpp-17-rc";
|
|
125207
|
+
Runtimes2["Cpp20rc"] = "cpp-20-rc";
|
|
125208
|
+
Runtimes2["Bun10rc"] = "bun-1.0-rc";
|
|
125209
|
+
Runtimes2["Bun11rc"] = "bun-1.1-rc";
|
|
125210
|
+
Runtimes2["Bun12rc"] = "bun-1.2-rc";
|
|
125211
|
+
Runtimes2["Bun13rc"] = "bun-1.3-rc";
|
|
125212
|
+
Runtimes2["Go123rc"] = "go-1.23-rc";
|
|
125213
|
+
Runtimes2["Go124rc"] = "go-1.24-rc";
|
|
125214
|
+
Runtimes2["Go125rc"] = "go-1.25-rc";
|
|
125215
|
+
Runtimes2["Go126rc"] = "go-1.26-rc";
|
|
125216
|
+
Runtimes2["Static1rc"] = "static-1-rc";
|
|
125217
|
+
Runtimes2["Flutter324rc"] = "flutter-3.24-rc";
|
|
125218
|
+
Runtimes2["Flutter327rc"] = "flutter-3.27-rc";
|
|
125219
|
+
Runtimes2["Flutter329rc"] = "flutter-3.29-rc";
|
|
125220
|
+
Runtimes2["Flutter332rc"] = "flutter-3.32-rc";
|
|
125221
|
+
Runtimes2["Flutter335rc"] = "flutter-3.35-rc";
|
|
125222
|
+
Runtimes2["Flutter338rc"] = "flutter-3.38-rc";
|
|
125073
125223
|
})(Runtimes || (Runtimes = {}));
|
|
125074
125224
|
var UseCases;
|
|
125075
125225
|
(function(UseCases2) {
|
|
@@ -125632,9 +125782,6 @@ var BuildRuntime;
|
|
|
125632
125782
|
BuildRuntime2["Pythonml311"] = "python-ml-3.11";
|
|
125633
125783
|
BuildRuntime2["Pythonml312"] = "python-ml-3.12";
|
|
125634
125784
|
BuildRuntime2["Pythonml313"] = "python-ml-3.13";
|
|
125635
|
-
BuildRuntime2["Deno121"] = "deno-1.21";
|
|
125636
|
-
BuildRuntime2["Deno124"] = "deno-1.24";
|
|
125637
|
-
BuildRuntime2["Deno135"] = "deno-1.35";
|
|
125638
125785
|
BuildRuntime2["Deno140"] = "deno-1.40";
|
|
125639
125786
|
BuildRuntime2["Deno146"] = "deno-1.46";
|
|
125640
125787
|
BuildRuntime2["Deno20"] = "deno-2.0";
|
|
@@ -125690,6 +125837,92 @@ var BuildRuntime;
|
|
|
125690
125837
|
BuildRuntime2["Flutter332"] = "flutter-3.32";
|
|
125691
125838
|
BuildRuntime2["Flutter335"] = "flutter-3.35";
|
|
125692
125839
|
BuildRuntime2["Flutter338"] = "flutter-3.38";
|
|
125840
|
+
BuildRuntime2["Node145rc"] = "node-14.5-rc";
|
|
125841
|
+
BuildRuntime2["Node160rc"] = "node-16.0-rc";
|
|
125842
|
+
BuildRuntime2["Node180rc"] = "node-18.0-rc";
|
|
125843
|
+
BuildRuntime2["Node190rc"] = "node-19.0-rc";
|
|
125844
|
+
BuildRuntime2["Node200rc"] = "node-20.0-rc";
|
|
125845
|
+
BuildRuntime2["Node210rc"] = "node-21.0-rc";
|
|
125846
|
+
BuildRuntime2["Node22rc"] = "node-22-rc";
|
|
125847
|
+
BuildRuntime2["Node23rc"] = "node-23-rc";
|
|
125848
|
+
BuildRuntime2["Node24rc"] = "node-24-rc";
|
|
125849
|
+
BuildRuntime2["Node25rc"] = "node-25-rc";
|
|
125850
|
+
BuildRuntime2["Php80rc"] = "php-8.0-rc";
|
|
125851
|
+
BuildRuntime2["Php81rc"] = "php-8.1-rc";
|
|
125852
|
+
BuildRuntime2["Php82rc"] = "php-8.2-rc";
|
|
125853
|
+
BuildRuntime2["Php83rc"] = "php-8.3-rc";
|
|
125854
|
+
BuildRuntime2["Php84rc"] = "php-8.4-rc";
|
|
125855
|
+
BuildRuntime2["Ruby30rc"] = "ruby-3.0-rc";
|
|
125856
|
+
BuildRuntime2["Ruby31rc"] = "ruby-3.1-rc";
|
|
125857
|
+
BuildRuntime2["Ruby32rc"] = "ruby-3.2-rc";
|
|
125858
|
+
BuildRuntime2["Ruby33rc"] = "ruby-3.3-rc";
|
|
125859
|
+
BuildRuntime2["Ruby34rc"] = "ruby-3.4-rc";
|
|
125860
|
+
BuildRuntime2["Ruby40rc"] = "ruby-4.0-rc";
|
|
125861
|
+
BuildRuntime2["Python38rc"] = "python-3.8-rc";
|
|
125862
|
+
BuildRuntime2["Python39rc"] = "python-3.9-rc";
|
|
125863
|
+
BuildRuntime2["Python310rc"] = "python-3.10-rc";
|
|
125864
|
+
BuildRuntime2["Python311rc"] = "python-3.11-rc";
|
|
125865
|
+
BuildRuntime2["Python312rc"] = "python-3.12-rc";
|
|
125866
|
+
BuildRuntime2["Python313rc"] = "python-3.13-rc";
|
|
125867
|
+
BuildRuntime2["Python314rc"] = "python-3.14-rc";
|
|
125868
|
+
BuildRuntime2["Pythonml311rc"] = "python-ml-3.11-rc";
|
|
125869
|
+
BuildRuntime2["Pythonml312rc"] = "python-ml-3.12-rc";
|
|
125870
|
+
BuildRuntime2["Pythonml313rc"] = "python-ml-3.13-rc";
|
|
125871
|
+
BuildRuntime2["Deno140rc"] = "deno-1.40-rc";
|
|
125872
|
+
BuildRuntime2["Deno146rc"] = "deno-1.46-rc";
|
|
125873
|
+
BuildRuntime2["Deno20rc"] = "deno-2.0-rc";
|
|
125874
|
+
BuildRuntime2["Deno25rc"] = "deno-2.5-rc";
|
|
125875
|
+
BuildRuntime2["Deno26rc"] = "deno-2.6-rc";
|
|
125876
|
+
BuildRuntime2["Dart215rc"] = "dart-2.15-rc";
|
|
125877
|
+
BuildRuntime2["Dart216rc"] = "dart-2.16-rc";
|
|
125878
|
+
BuildRuntime2["Dart217rc"] = "dart-2.17-rc";
|
|
125879
|
+
BuildRuntime2["Dart218rc"] = "dart-2.18-rc";
|
|
125880
|
+
BuildRuntime2["Dart219rc"] = "dart-2.19-rc";
|
|
125881
|
+
BuildRuntime2["Dart30rc"] = "dart-3.0-rc";
|
|
125882
|
+
BuildRuntime2["Dart31rc"] = "dart-3.1-rc";
|
|
125883
|
+
BuildRuntime2["Dart33rc"] = "dart-3.3-rc";
|
|
125884
|
+
BuildRuntime2["Dart35rc"] = "dart-3.5-rc";
|
|
125885
|
+
BuildRuntime2["Dart38rc"] = "dart-3.8-rc";
|
|
125886
|
+
BuildRuntime2["Dart39rc"] = "dart-3.9-rc";
|
|
125887
|
+
BuildRuntime2["Dart310rc"] = "dart-3.10-rc";
|
|
125888
|
+
BuildRuntime2["Dotnet60rc"] = "dotnet-6.0-rc";
|
|
125889
|
+
BuildRuntime2["Dotnet70rc"] = "dotnet-7.0-rc";
|
|
125890
|
+
BuildRuntime2["Dotnet80rc"] = "dotnet-8.0-rc";
|
|
125891
|
+
BuildRuntime2["Dotnet10rc"] = "dotnet-10-rc";
|
|
125892
|
+
BuildRuntime2["Java80rc"] = "java-8.0-rc";
|
|
125893
|
+
BuildRuntime2["Java110rc"] = "java-11.0-rc";
|
|
125894
|
+
BuildRuntime2["Java170rc"] = "java-17.0-rc";
|
|
125895
|
+
BuildRuntime2["Java180rc"] = "java-18.0-rc";
|
|
125896
|
+
BuildRuntime2["Java210rc"] = "java-21.0-rc";
|
|
125897
|
+
BuildRuntime2["Java22rc"] = "java-22-rc";
|
|
125898
|
+
BuildRuntime2["Java25rc"] = "java-25-rc";
|
|
125899
|
+
BuildRuntime2["Swift55rc"] = "swift-5.5-rc";
|
|
125900
|
+
BuildRuntime2["Swift58rc"] = "swift-5.8-rc";
|
|
125901
|
+
BuildRuntime2["Swift59rc"] = "swift-5.9-rc";
|
|
125902
|
+
BuildRuntime2["Swift510rc"] = "swift-5.10-rc";
|
|
125903
|
+
BuildRuntime2["Swift62rc"] = "swift-6.2-rc";
|
|
125904
|
+
BuildRuntime2["Kotlin16rc"] = "kotlin-1.6-rc";
|
|
125905
|
+
BuildRuntime2["Kotlin18rc"] = "kotlin-1.8-rc";
|
|
125906
|
+
BuildRuntime2["Kotlin19rc"] = "kotlin-1.9-rc";
|
|
125907
|
+
BuildRuntime2["Kotlin20rc"] = "kotlin-2.0-rc";
|
|
125908
|
+
BuildRuntime2["Kotlin23rc"] = "kotlin-2.3-rc";
|
|
125909
|
+
BuildRuntime2["Cpp17rc"] = "cpp-17-rc";
|
|
125910
|
+
BuildRuntime2["Cpp20rc"] = "cpp-20-rc";
|
|
125911
|
+
BuildRuntime2["Bun10rc"] = "bun-1.0-rc";
|
|
125912
|
+
BuildRuntime2["Bun11rc"] = "bun-1.1-rc";
|
|
125913
|
+
BuildRuntime2["Bun12rc"] = "bun-1.2-rc";
|
|
125914
|
+
BuildRuntime2["Bun13rc"] = "bun-1.3-rc";
|
|
125915
|
+
BuildRuntime2["Go123rc"] = "go-1.23-rc";
|
|
125916
|
+
BuildRuntime2["Go124rc"] = "go-1.24-rc";
|
|
125917
|
+
BuildRuntime2["Go125rc"] = "go-1.25-rc";
|
|
125918
|
+
BuildRuntime2["Go126rc"] = "go-1.26-rc";
|
|
125919
|
+
BuildRuntime2["Static1rc"] = "static-1-rc";
|
|
125920
|
+
BuildRuntime2["Flutter324rc"] = "flutter-3.24-rc";
|
|
125921
|
+
BuildRuntime2["Flutter327rc"] = "flutter-3.27-rc";
|
|
125922
|
+
BuildRuntime2["Flutter329rc"] = "flutter-3.29-rc";
|
|
125923
|
+
BuildRuntime2["Flutter332rc"] = "flutter-3.32-rc";
|
|
125924
|
+
BuildRuntime2["Flutter335rc"] = "flutter-3.35-rc";
|
|
125925
|
+
BuildRuntime2["Flutter338rc"] = "flutter-3.38-rc";
|
|
125693
125926
|
})(BuildRuntime || (BuildRuntime = {}));
|
|
125694
125927
|
var Adapter;
|
|
125695
125928
|
(function(Adapter2) {
|
|
@@ -125846,28 +126079,24 @@ var BillingPlanGroup;
|
|
|
125846
126079
|
BillingPlanGroup2["Pro"] = "pro";
|
|
125847
126080
|
BillingPlanGroup2["Scale"] = "scale";
|
|
125848
126081
|
})(BillingPlanGroup || (BillingPlanGroup = {}));
|
|
125849
|
-
var
|
|
125850
|
-
(function(
|
|
125851
|
-
|
|
125852
|
-
|
|
125853
|
-
|
|
125854
|
-
|
|
125855
|
-
|
|
125856
|
-
|
|
125857
|
-
|
|
125858
|
-
|
|
125859
|
-
})(
|
|
125860
|
-
var
|
|
125861
|
-
(function(
|
|
125862
|
-
|
|
125863
|
-
|
|
125864
|
-
|
|
125865
|
-
|
|
125866
|
-
|
|
125867
|
-
DomainTransferStatusStatus2["Completed"] = "completed";
|
|
125868
|
-
DomainTransferStatusStatus2["Cancelled"] = "cancelled";
|
|
125869
|
-
DomainTransferStatusStatus2["ServiceUnavailable"] = "service_unavailable";
|
|
125870
|
-
})(DomainTransferStatusStatus || (DomainTransferStatusStatus = {}));
|
|
126082
|
+
var DomainTransferStatusEnum;
|
|
126083
|
+
(function(DomainTransferStatusEnum2) {
|
|
126084
|
+
DomainTransferStatusEnum2["Transferrable"] = "transferrable";
|
|
126085
|
+
DomainTransferStatusEnum2["NotTransferrable"] = "not_transferrable";
|
|
126086
|
+
DomainTransferStatusEnum2["PendingOwner"] = "pending_owner";
|
|
126087
|
+
DomainTransferStatusEnum2["PendingAdmin"] = "pending_admin";
|
|
126088
|
+
DomainTransferStatusEnum2["PendingRegistry"] = "pending_registry";
|
|
126089
|
+
DomainTransferStatusEnum2["Completed"] = "completed";
|
|
126090
|
+
DomainTransferStatusEnum2["Cancelled"] = "cancelled";
|
|
126091
|
+
DomainTransferStatusEnum2["ServiceUnavailable"] = "service_unavailable";
|
|
126092
|
+
})(DomainTransferStatusEnum || (DomainTransferStatusEnum = {}));
|
|
126093
|
+
var DomainPurchaseStatus;
|
|
126094
|
+
(function(DomainPurchaseStatus2) {
|
|
126095
|
+
DomainPurchaseStatus2["Pending"] = "pending";
|
|
126096
|
+
DomainPurchaseStatus2["Succeeded"] = "succeeded";
|
|
126097
|
+
DomainPurchaseStatus2["Failed"] = "failed";
|
|
126098
|
+
DomainPurchaseStatus2["Cancelled"] = "cancelled";
|
|
126099
|
+
})(DomainPurchaseStatus || (DomainPurchaseStatus = {}));
|
|
125871
126100
|
|
|
125872
126101
|
// lib/parser.ts
|
|
125873
126102
|
var { description } = package_default;
|
|
@@ -126115,6 +126344,7 @@ var commandDescriptions = {
|
|
|
126115
126344
|
messaging: `The messaging command allows you to manage topics and targets and send messages.`,
|
|
126116
126345
|
migrations: `The migrations command allows you to migrate data between services.`,
|
|
126117
126346
|
vcs: `The vcs command allows you to interact with VCS providers and manage your code repositories.`,
|
|
126347
|
+
webhooks: `The webhooks command allows you to manage your project webhooks.`,
|
|
126118
126348
|
main: import_chalk.default.redBright(`${logo}${description}`)
|
|
126119
126349
|
};
|
|
126120
126350
|
|
|
@@ -128025,88 +128255,89 @@ var ProjectNotInitializedError = class _ProjectNotInitializedError extends Error
|
|
|
128025
128255
|
|
|
128026
128256
|
// lib/commands/utils/deployment.ts
|
|
128027
128257
|
import fs4 from "fs";
|
|
128258
|
+
import os6 from "os";
|
|
128028
128259
|
import path2 from "path";
|
|
128029
128260
|
|
|
128030
128261
|
// node_modules/tar/dist/esm/index.min.js
|
|
128031
|
-
import
|
|
128262
|
+
import Ur from "events";
|
|
128032
128263
|
import I from "fs";
|
|
128033
|
-
import { EventEmitter as
|
|
128034
|
-
import
|
|
128035
|
-
import { StringDecoder as
|
|
128036
|
-
import
|
|
128264
|
+
import { EventEmitter as Ti } from "node:events";
|
|
128265
|
+
import Ns from "node:stream";
|
|
128266
|
+
import { StringDecoder as Dr } from "node:string_decoder";
|
|
128267
|
+
import nr from "node:path";
|
|
128037
128268
|
import Vt from "node:fs";
|
|
128038
|
-
import { dirname as
|
|
128039
|
-
import { EventEmitter as
|
|
128040
|
-
import
|
|
128041
|
-
import { Buffer as
|
|
128042
|
-
import * as
|
|
128043
|
-
import
|
|
128269
|
+
import { dirname as Rn, parse as bn } from "path";
|
|
128270
|
+
import { EventEmitter as En } from "events";
|
|
128271
|
+
import Mi from "assert";
|
|
128272
|
+
import { Buffer as gt } from "buffer";
|
|
128273
|
+
import * as ks from "zlib";
|
|
128274
|
+
import Zr from "zlib";
|
|
128044
128275
|
import { posix as Zt } from "node:path";
|
|
128045
|
-
import { basename as
|
|
128046
|
-
import
|
|
128276
|
+
import { basename as fn } from "node:path";
|
|
128277
|
+
import fi from "fs";
|
|
128047
128278
|
import $ from "fs";
|
|
128048
|
-
import
|
|
128049
|
-
import { win32 as
|
|
128050
|
-
import
|
|
128051
|
-
import
|
|
128052
|
-
import
|
|
128053
|
-
import { randomBytes as
|
|
128279
|
+
import $s from "path";
|
|
128280
|
+
import { win32 as Tn } from "node:path";
|
|
128281
|
+
import sr from "path";
|
|
128282
|
+
import xr from "node:fs";
|
|
128283
|
+
import eo from "node:assert";
|
|
128284
|
+
import { randomBytes as Tr } from "node:crypto";
|
|
128054
128285
|
import u from "node:fs";
|
|
128055
128286
|
import R from "node:path";
|
|
128056
|
-
import
|
|
128057
|
-
import
|
|
128287
|
+
import ar from "fs";
|
|
128288
|
+
import mi from "node:fs";
|
|
128058
128289
|
import Ee from "node:path";
|
|
128059
128290
|
import k from "node:fs";
|
|
128060
|
-
import
|
|
128061
|
-
import
|
|
128062
|
-
import { join as
|
|
128291
|
+
import Xn from "node:fs/promises";
|
|
128292
|
+
import pi from "node:path";
|
|
128293
|
+
import { join as pr } from "node:path";
|
|
128063
128294
|
import v from "node:fs";
|
|
128064
|
-
import
|
|
128065
|
-
var
|
|
128295
|
+
import Lr from "node:path";
|
|
128296
|
+
var Nr = Object.defineProperty;
|
|
128066
128297
|
var Ar = (s3, t) => {
|
|
128067
|
-
for (var e in t)
|
|
128298
|
+
for (var e in t) Nr(s3, e, { get: t[e], enumerable: true });
|
|
128068
128299
|
};
|
|
128069
|
-
var
|
|
128070
|
-
var
|
|
128071
|
-
var
|
|
128072
|
-
var
|
|
128300
|
+
var Os = typeof process == "object" && process ? process : { stdout: null, stderr: null };
|
|
128301
|
+
var Ir = (s3) => !!s3 && typeof s3 == "object" && (s3 instanceof D || s3 instanceof Ns || Cr(s3) || Fr(s3));
|
|
128302
|
+
var Cr = (s3) => !!s3 && typeof s3 == "object" && s3 instanceof Ti && typeof s3.pipe == "function" && s3.pipe !== Ns.Writable.prototype.pipe;
|
|
128303
|
+
var Fr = (s3) => !!s3 && typeof s3 == "object" && s3 instanceof Ti && typeof s3.write == "function" && typeof s3.end == "function";
|
|
128073
128304
|
var q = /* @__PURE__ */ Symbol("EOF");
|
|
128074
128305
|
var j = /* @__PURE__ */ Symbol("maybeEmitEnd");
|
|
128075
128306
|
var rt = /* @__PURE__ */ Symbol("emittedEnd");
|
|
128076
|
-
var
|
|
128307
|
+
var Le = /* @__PURE__ */ Symbol("emittingEnd");
|
|
128077
128308
|
var jt = /* @__PURE__ */ Symbol("emittedError");
|
|
128078
|
-
var
|
|
128079
|
-
var
|
|
128080
|
-
var
|
|
128081
|
-
var
|
|
128309
|
+
var Ne = /* @__PURE__ */ Symbol("closed");
|
|
128310
|
+
var Ts = /* @__PURE__ */ Symbol("read");
|
|
128311
|
+
var Ae = /* @__PURE__ */ Symbol("flush");
|
|
128312
|
+
var xs = /* @__PURE__ */ Symbol("flushChunk");
|
|
128082
128313
|
var z2 = /* @__PURE__ */ Symbol("encoding");
|
|
128083
128314
|
var Mt = /* @__PURE__ */ Symbol("decoder");
|
|
128084
128315
|
var b = /* @__PURE__ */ Symbol("flowing");
|
|
128085
128316
|
var Qt = /* @__PURE__ */ Symbol("paused");
|
|
128086
128317
|
var Bt = /* @__PURE__ */ Symbol("resume");
|
|
128087
|
-
var
|
|
128088
|
-
var
|
|
128089
|
-
var
|
|
128090
|
-
var
|
|
128318
|
+
var _ = /* @__PURE__ */ Symbol("buffer");
|
|
128319
|
+
var A = /* @__PURE__ */ Symbol("pipes");
|
|
128320
|
+
var g = /* @__PURE__ */ Symbol("bufferLength");
|
|
128321
|
+
var yi = /* @__PURE__ */ Symbol("bufferPush");
|
|
128091
128322
|
var De = /* @__PURE__ */ Symbol("bufferShift");
|
|
128092
128323
|
var L = /* @__PURE__ */ Symbol("objectMode");
|
|
128093
128324
|
var w = /* @__PURE__ */ Symbol("destroyed");
|
|
128094
|
-
var
|
|
128095
|
-
var
|
|
128096
|
-
var
|
|
128097
|
-
var
|
|
128325
|
+
var Ri = /* @__PURE__ */ Symbol("error");
|
|
128326
|
+
var bi = /* @__PURE__ */ Symbol("emitData");
|
|
128327
|
+
var Ls = /* @__PURE__ */ Symbol("emitEnd");
|
|
128328
|
+
var _i = /* @__PURE__ */ Symbol("emitEnd2");
|
|
128098
128329
|
var Z = /* @__PURE__ */ Symbol("async");
|
|
128099
128330
|
var gi = /* @__PURE__ */ Symbol("abort");
|
|
128100
|
-
var
|
|
128331
|
+
var Ie = /* @__PURE__ */ Symbol("aborted");
|
|
128101
128332
|
var Jt = /* @__PURE__ */ Symbol("signal");
|
|
128102
128333
|
var yt = /* @__PURE__ */ Symbol("dataListeners");
|
|
128103
128334
|
var C = /* @__PURE__ */ Symbol("discarded");
|
|
128104
128335
|
var te = (s3) => Promise.resolve().then(s3);
|
|
128105
|
-
var
|
|
128106
|
-
var
|
|
128107
|
-
var
|
|
128108
|
-
var
|
|
128109
|
-
var
|
|
128336
|
+
var kr = (s3) => s3();
|
|
128337
|
+
var vr = (s3) => s3 === "end" || s3 === "finish" || s3 === "prefinish";
|
|
128338
|
+
var Mr = (s3) => s3 instanceof ArrayBuffer || !!s3 && typeof s3 == "object" && s3.constructor && s3.constructor.name === "ArrayBuffer" && s3.byteLength >= 0;
|
|
128339
|
+
var Br = (s3) => !Buffer.isBuffer(s3) && ArrayBuffer.isView(s3);
|
|
128340
|
+
var Ce = class {
|
|
128110
128341
|
src;
|
|
128111
128342
|
dest;
|
|
128112
128343
|
opts;
|
|
@@ -128123,7 +128354,7 @@ var Ie = class {
|
|
|
128123
128354
|
this.unpipe(), this.opts.end && this.dest.end();
|
|
128124
128355
|
}
|
|
128125
128356
|
};
|
|
128126
|
-
var
|
|
128357
|
+
var Oi = class extends Ce {
|
|
128127
128358
|
unpipe() {
|
|
128128
128359
|
this.src.removeListener("error", this.proxyErrors), super.unpipe();
|
|
128129
128360
|
}
|
|
@@ -128131,26 +128362,26 @@ var _i = class extends Ie {
|
|
|
128131
128362
|
super(t, e, i), this.proxyErrors = (r) => this.dest.emit("error", r), t.on("error", this.proxyErrors);
|
|
128132
128363
|
}
|
|
128133
128364
|
};
|
|
128134
|
-
var
|
|
128135
|
-
var
|
|
128136
|
-
var
|
|
128365
|
+
var Pr = (s3) => !!s3.objectMode;
|
|
128366
|
+
var zr = (s3) => !s3.objectMode && !!s3.encoding && s3.encoding !== "buffer";
|
|
128367
|
+
var D = class extends Ti {
|
|
128137
128368
|
[b] = false;
|
|
128138
128369
|
[Qt] = false;
|
|
128139
|
-
[
|
|
128140
|
-
[
|
|
128370
|
+
[A] = [];
|
|
128371
|
+
[_] = [];
|
|
128141
128372
|
[L];
|
|
128142
128373
|
[z2];
|
|
128143
128374
|
[Z];
|
|
128144
128375
|
[Mt];
|
|
128145
128376
|
[q] = false;
|
|
128146
128377
|
[rt] = false;
|
|
128147
|
-
[xe] = false;
|
|
128148
128378
|
[Le] = false;
|
|
128379
|
+
[Ne] = false;
|
|
128149
128380
|
[jt] = null;
|
|
128150
|
-
[
|
|
128381
|
+
[g] = 0;
|
|
128151
128382
|
[w] = false;
|
|
128152
128383
|
[Jt];
|
|
128153
|
-
[
|
|
128384
|
+
[Ie] = false;
|
|
128154
128385
|
[yt] = 0;
|
|
128155
128386
|
[C] = false;
|
|
128156
128387
|
writable = true;
|
|
@@ -128158,12 +128389,12 @@ var A = class extends Oi {
|
|
|
128158
128389
|
constructor(...t) {
|
|
128159
128390
|
let e = t[0] || {};
|
|
128160
128391
|
if (super(), e.objectMode && typeof e.encoding == "string") throw new TypeError("Encoding and objectMode may not be used together");
|
|
128161
|
-
|
|
128392
|
+
Pr(e) ? (this[L] = true, this[z2] = null) : zr(e) ? (this[z2] = e.encoding, this[L] = false) : (this[L] = false, this[z2] = null), this[Z] = !!e.async, this[Mt] = this[z2] ? new Dr(this[z2]) : null, e && e.debugExposeBuffer === true && Object.defineProperty(this, "buffer", { get: () => this[_] }), e && e.debugExposePipes === true && Object.defineProperty(this, "pipes", { get: () => this[A] });
|
|
128162
128393
|
let { signal: i } = e;
|
|
128163
128394
|
i && (this[Jt] = i, i.aborted ? this[gi]() : i.addEventListener("abort", () => this[gi]()));
|
|
128164
128395
|
}
|
|
128165
128396
|
get bufferLength() {
|
|
128166
|
-
return this[
|
|
128397
|
+
return this[g];
|
|
128167
128398
|
}
|
|
128168
128399
|
get encoding() {
|
|
128169
128400
|
return this[z2];
|
|
@@ -128187,46 +128418,46 @@ var A = class extends Oi {
|
|
|
128187
128418
|
this[Z] = this[Z] || !!t;
|
|
128188
128419
|
}
|
|
128189
128420
|
[gi]() {
|
|
128190
|
-
this[
|
|
128421
|
+
this[Ie] = true, this.emit("abort", this[Jt]?.reason), this.destroy(this[Jt]?.reason);
|
|
128191
128422
|
}
|
|
128192
128423
|
get aborted() {
|
|
128193
|
-
return this[
|
|
128424
|
+
return this[Ie];
|
|
128194
128425
|
}
|
|
128195
128426
|
set aborted(t) {
|
|
128196
128427
|
}
|
|
128197
128428
|
write(t, e, i) {
|
|
128198
|
-
if (this[
|
|
128429
|
+
if (this[Ie]) return false;
|
|
128199
128430
|
if (this[q]) throw new Error("write after end");
|
|
128200
128431
|
if (this[w]) return this.emit("error", Object.assign(new Error("Cannot call write after a stream was destroyed"), { code: "ERR_STREAM_DESTROYED" })), true;
|
|
128201
128432
|
typeof e == "function" && (i = e, e = "utf8"), e || (e = "utf8");
|
|
128202
|
-
let r = this[Z] ? te :
|
|
128433
|
+
let r = this[Z] ? te : kr;
|
|
128203
128434
|
if (!this[L] && !Buffer.isBuffer(t)) {
|
|
128204
|
-
if (
|
|
128205
|
-
else if (
|
|
128435
|
+
if (Br(t)) t = Buffer.from(t.buffer, t.byteOffset, t.byteLength);
|
|
128436
|
+
else if (Mr(t)) t = Buffer.from(t);
|
|
128206
128437
|
else if (typeof t != "string") throw new Error("Non-contiguous data written to non-objectMode stream");
|
|
128207
128438
|
}
|
|
128208
|
-
return this[L] ? (this[b] && this[
|
|
128439
|
+
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[z2] && !this[Mt]?.lastNeed) && (t = Buffer.from(t, e)), Buffer.isBuffer(t) && this[z2] && (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]);
|
|
128209
128440
|
}
|
|
128210
128441
|
read(t) {
|
|
128211
128442
|
if (this[w]) return null;
|
|
128212
|
-
if (this[C] = false, this[
|
|
128213
|
-
this[L] && (t = null), this[
|
|
128214
|
-
let e = this[
|
|
128443
|
+
if (this[C] = false, this[g] === 0 || t === 0 || t && t > this[g]) return this[j](), null;
|
|
128444
|
+
this[L] && (t = null), this[_].length > 1 && !this[L] && (this[_] = [this[z2] ? this[_].join("") : Buffer.concat(this[_], this[g])]);
|
|
128445
|
+
let e = this[Ts](t || null, this[_][0]);
|
|
128215
128446
|
return this[j](), e;
|
|
128216
128447
|
}
|
|
128217
|
-
[
|
|
128448
|
+
[Ts](t, e) {
|
|
128218
128449
|
if (this[L]) this[De]();
|
|
128219
128450
|
else {
|
|
128220
128451
|
let i = e;
|
|
128221
|
-
t === i.length || t === null ? this[De]() : typeof i == "string" ? (this[
|
|
128452
|
+
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);
|
|
128222
128453
|
}
|
|
128223
|
-
return this.emit("data", e), !this[
|
|
128454
|
+
return this.emit("data", e), !this[_].length && !this[q] && this.emit("drain"), e;
|
|
128224
128455
|
}
|
|
128225
128456
|
end(t, e, i) {
|
|
128226
128457
|
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;
|
|
128227
128458
|
}
|
|
128228
128459
|
[Bt]() {
|
|
128229
|
-
this[w] || (!this[yt] && !this[
|
|
128460
|
+
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"));
|
|
128230
128461
|
}
|
|
128231
128462
|
resume() {
|
|
128232
128463
|
return this[Bt]();
|
|
@@ -128243,39 +128474,39 @@ var A = class extends Oi {
|
|
|
128243
128474
|
get paused() {
|
|
128244
128475
|
return this[Qt];
|
|
128245
128476
|
}
|
|
128246
|
-
[
|
|
128247
|
-
this[L] ? this[
|
|
128477
|
+
[yi](t) {
|
|
128478
|
+
this[L] ? this[g] += 1 : this[g] += t.length, this[_].push(t);
|
|
128248
128479
|
}
|
|
128249
128480
|
[De]() {
|
|
128250
|
-
return this[L] ? this[
|
|
128481
|
+
return this[L] ? this[g] -= 1 : this[g] -= this[_][0].length, this[_].shift();
|
|
128251
128482
|
}
|
|
128252
|
-
[
|
|
128483
|
+
[Ae](t = false) {
|
|
128253
128484
|
do
|
|
128254
128485
|
;
|
|
128255
|
-
while (this[
|
|
128256
|
-
!t && !this[
|
|
128486
|
+
while (this[xs](this[De]()) && this[_].length);
|
|
128487
|
+
!t && !this[_].length && !this[q] && this.emit("drain");
|
|
128257
128488
|
}
|
|
128258
|
-
[
|
|
128489
|
+
[xs](t) {
|
|
128259
128490
|
return this.emit("data", t), this[b];
|
|
128260
128491
|
}
|
|
128261
128492
|
pipe(t, e) {
|
|
128262
128493
|
if (this[w]) return t;
|
|
128263
128494
|
this[C] = false;
|
|
128264
128495
|
let i = this[rt];
|
|
128265
|
-
return e = e || {}, t ===
|
|
128496
|
+
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;
|
|
128266
128497
|
}
|
|
128267
128498
|
unpipe(t) {
|
|
128268
|
-
let e = this[
|
|
128269
|
-
e && (this[
|
|
128499
|
+
let e = this[A].find((i) => i.dest === t);
|
|
128500
|
+
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());
|
|
128270
128501
|
}
|
|
128271
128502
|
addListener(t, e) {
|
|
128272
128503
|
return this.on(t, e);
|
|
128273
128504
|
}
|
|
128274
128505
|
on(t, e) {
|
|
128275
128506
|
let i = super.on(t, e);
|
|
128276
|
-
if (t === "data") this[C] = false, this[yt]++, !this[
|
|
128277
|
-
else if (t === "readable" && this[
|
|
128278
|
-
else if (
|
|
128507
|
+
if (t === "data") this[C] = false, this[yt]++, !this[A].length && !this[b] && this[Bt]();
|
|
128508
|
+
else if (t === "readable" && this[g] !== 0) super.emit("readable");
|
|
128509
|
+
else if (vr(t) && this[rt]) super.emit(t), this.removeAllListeners(t);
|
|
128279
128510
|
else if (t === "error" && this[jt]) {
|
|
128280
128511
|
let r = e;
|
|
128281
128512
|
this[Z] ? te(() => r.call(this, this[jt])) : r.call(this, this[jt]);
|
|
@@ -128287,29 +128518,29 @@ var A = class extends Oi {
|
|
|
128287
128518
|
}
|
|
128288
128519
|
off(t, e) {
|
|
128289
128520
|
let i = super.off(t, e);
|
|
128290
|
-
return t === "data" && (this[yt] = this.listeners("data").length, this[yt] === 0 && !this[C] && !this[
|
|
128521
|
+
return t === "data" && (this[yt] = this.listeners("data").length, this[yt] === 0 && !this[C] && !this[A].length && (this[b] = false)), i;
|
|
128291
128522
|
}
|
|
128292
128523
|
removeAllListeners(t) {
|
|
128293
128524
|
let e = super.removeAllListeners(t);
|
|
128294
|
-
return (t === "data" || t === void 0) && (this[yt] = 0, !this[C] && !this[
|
|
128525
|
+
return (t === "data" || t === void 0) && (this[yt] = 0, !this[C] && !this[A].length && (this[b] = false)), e;
|
|
128295
128526
|
}
|
|
128296
128527
|
get emittedEnd() {
|
|
128297
128528
|
return this[rt];
|
|
128298
128529
|
}
|
|
128299
128530
|
[j]() {
|
|
128300
|
-
!this[
|
|
128531
|
+
!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);
|
|
128301
128532
|
}
|
|
128302
128533
|
emit(t, ...e) {
|
|
128303
128534
|
let i = e[0];
|
|
128304
128535
|
if (t !== "error" && t !== "close" && t !== w && this[w]) return false;
|
|
128305
|
-
if (t === "data") return !this[L] && !i ? false : this[Z] ? (te(() => this[
|
|
128306
|
-
if (t === "end") return this[
|
|
128536
|
+
if (t === "data") return !this[L] && !i ? false : this[Z] ? (te(() => this[bi](i)), true) : this[bi](i);
|
|
128537
|
+
if (t === "end") return this[Ls]();
|
|
128307
128538
|
if (t === "close") {
|
|
128308
|
-
if (this[
|
|
128539
|
+
if (this[Ne] = true, !this[rt] && !this[w]) return false;
|
|
128309
128540
|
let n = super.emit("close");
|
|
128310
128541
|
return this.removeAllListeners("close"), n;
|
|
128311
128542
|
} else if (t === "error") {
|
|
128312
|
-
this[jt] = i, super.emit(
|
|
128543
|
+
this[jt] = i, super.emit(Ri, i);
|
|
128313
128544
|
let n = !this[Jt] || this.listeners("error").length ? super.emit("error", i) : false;
|
|
128314
128545
|
return this[j](), n;
|
|
128315
128546
|
} else if (t === "resume") {
|
|
@@ -128322,23 +128553,23 @@ var A = class extends Oi {
|
|
|
128322
128553
|
let r = super.emit(t, ...e);
|
|
128323
128554
|
return this[j](), r;
|
|
128324
128555
|
}
|
|
128325
|
-
[
|
|
128326
|
-
for (let i of this[
|
|
128556
|
+
[bi](t) {
|
|
128557
|
+
for (let i of this[A]) i.dest.write(t) === false && this.pause();
|
|
128327
128558
|
let e = this[C] ? false : super.emit("data", t);
|
|
128328
128559
|
return this[j](), e;
|
|
128329
128560
|
}
|
|
128330
|
-
[
|
|
128331
|
-
return this[rt] ? false : (this[rt] = true, this.readable = false, this[Z] ? (te(() => this[
|
|
128561
|
+
[Ls]() {
|
|
128562
|
+
return this[rt] ? false : (this[rt] = true, this.readable = false, this[Z] ? (te(() => this[_i]()), true) : this[_i]());
|
|
128332
128563
|
}
|
|
128333
|
-
[
|
|
128564
|
+
[_i]() {
|
|
128334
128565
|
if (this[Mt]) {
|
|
128335
128566
|
let e = this[Mt].end();
|
|
128336
128567
|
if (e) {
|
|
128337
|
-
for (let i of this[
|
|
128568
|
+
for (let i of this[A]) i.dest.write(e);
|
|
128338
128569
|
this[C] || super.emit("data", e);
|
|
128339
128570
|
}
|
|
128340
128571
|
}
|
|
128341
|
-
for (let e of this[
|
|
128572
|
+
for (let e of this[A]) e.end();
|
|
128342
128573
|
let t = super.emit("end");
|
|
128343
128574
|
return this.removeAllListeners("end"), t;
|
|
128344
128575
|
}
|
|
@@ -128385,67 +128616,67 @@ var A = class extends Oi {
|
|
|
128385
128616
|
}
|
|
128386
128617
|
[Symbol.iterator]() {
|
|
128387
128618
|
this[C] = false;
|
|
128388
|
-
let t = false, e = () => (this.pause(), this.off(
|
|
128619
|
+
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 = () => {
|
|
128389
128620
|
if (t) return e();
|
|
128390
128621
|
let r = this.read();
|
|
128391
128622
|
return r === null ? e() : { done: false, value: r };
|
|
128392
128623
|
};
|
|
128393
|
-
return this.once("end", e), this.once(
|
|
128624
|
+
return this.once("end", e), this.once(Ri, e), this.once(w, e), { next: i, throw: e, return: e, [Symbol.iterator]() {
|
|
128394
128625
|
return this;
|
|
128395
128626
|
}, [Symbol.dispose]: () => {
|
|
128396
128627
|
} };
|
|
128397
128628
|
}
|
|
128398
128629
|
destroy(t) {
|
|
128399
128630
|
if (this[w]) return t ? this.emit("error", t) : this.emit(w), this;
|
|
128400
|
-
this[w] = true, this[C] = true, this[
|
|
128631
|
+
this[w] = true, this[C] = true, this[_].length = 0, this[g] = 0;
|
|
128401
128632
|
let e = this;
|
|
128402
|
-
return typeof e.close == "function" && !this[
|
|
128633
|
+
return typeof e.close == "function" && !this[Ne] && e.close(), t ? this.emit("error", t) : this.emit(w), this;
|
|
128403
128634
|
}
|
|
128404
128635
|
static get isStream() {
|
|
128405
|
-
return
|
|
128636
|
+
return Ir;
|
|
128406
128637
|
}
|
|
128407
128638
|
};
|
|
128408
|
-
var
|
|
128639
|
+
var Hr = I.writev;
|
|
128409
128640
|
var ot = /* @__PURE__ */ Symbol("_autoClose");
|
|
128410
128641
|
var H = /* @__PURE__ */ Symbol("_close");
|
|
128411
128642
|
var ee = /* @__PURE__ */ Symbol("_ended");
|
|
128412
128643
|
var m = /* @__PURE__ */ Symbol("_fd");
|
|
128413
|
-
var
|
|
128644
|
+
var xi = /* @__PURE__ */ Symbol("_finished");
|
|
128414
128645
|
var J = /* @__PURE__ */ Symbol("_flags");
|
|
128415
|
-
var
|
|
128416
|
-
var
|
|
128417
|
-
var
|
|
128646
|
+
var Li = /* @__PURE__ */ Symbol("_flush");
|
|
128647
|
+
var Ii = /* @__PURE__ */ Symbol("_handleChunk");
|
|
128648
|
+
var Ci = /* @__PURE__ */ Symbol("_makeBuf");
|
|
128418
128649
|
var se = /* @__PURE__ */ Symbol("_mode");
|
|
128419
|
-
var
|
|
128650
|
+
var Fe = /* @__PURE__ */ Symbol("_needDrain");
|
|
128420
128651
|
var Ut = /* @__PURE__ */ Symbol("_onerror");
|
|
128421
128652
|
var Ht = /* @__PURE__ */ Symbol("_onopen");
|
|
128422
|
-
var
|
|
128653
|
+
var Ni = /* @__PURE__ */ Symbol("_onread");
|
|
128423
128654
|
var Pt = /* @__PURE__ */ Symbol("_onwrite");
|
|
128424
128655
|
var ht = /* @__PURE__ */ Symbol("_open");
|
|
128425
128656
|
var U = /* @__PURE__ */ Symbol("_path");
|
|
128426
128657
|
var nt = /* @__PURE__ */ Symbol("_pos");
|
|
128427
128658
|
var Y = /* @__PURE__ */ Symbol("_queue");
|
|
128428
128659
|
var zt = /* @__PURE__ */ Symbol("_read");
|
|
128429
|
-
var
|
|
128660
|
+
var Ai = /* @__PURE__ */ Symbol("_readSize");
|
|
128430
128661
|
var Q = /* @__PURE__ */ Symbol("_reading");
|
|
128431
128662
|
var ie = /* @__PURE__ */ Symbol("_remain");
|
|
128432
128663
|
var Di = /* @__PURE__ */ Symbol("_size");
|
|
128433
|
-
var
|
|
128664
|
+
var ke = /* @__PURE__ */ Symbol("_write");
|
|
128434
128665
|
var Rt = /* @__PURE__ */ Symbol("_writing");
|
|
128435
|
-
var
|
|
128666
|
+
var ve = /* @__PURE__ */ Symbol("_defaultFlag");
|
|
128436
128667
|
var bt = /* @__PURE__ */ Symbol("_errored");
|
|
128437
|
-
var
|
|
128668
|
+
var _t = class extends D {
|
|
128438
128669
|
[bt] = false;
|
|
128439
128670
|
[m];
|
|
128440
128671
|
[U];
|
|
128441
|
-
[
|
|
128672
|
+
[Ai];
|
|
128442
128673
|
[Q] = false;
|
|
128443
128674
|
[Di];
|
|
128444
128675
|
[ie];
|
|
128445
128676
|
[ot];
|
|
128446
128677
|
constructor(t, e) {
|
|
128447
128678
|
if (e = e || {}, super(e), this.readable = true, this.writable = false, typeof t != "string") throw new TypeError("path must be a string");
|
|
128448
|
-
this[bt] = false, this[m] = typeof e.fd == "number" ? e.fd : void 0, this[U] = t, this[
|
|
128679
|
+
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]();
|
|
128449
128680
|
}
|
|
128450
128681
|
get fd() {
|
|
128451
128682
|
return this[m];
|
|
@@ -128465,19 +128696,19 @@ var gt = class extends A {
|
|
|
128465
128696
|
[Ht](t, e) {
|
|
128466
128697
|
t ? this[Ut](t) : (this[m] = e, this.emit("open", e), this[zt]());
|
|
128467
128698
|
}
|
|
128468
|
-
[
|
|
128469
|
-
return Buffer.allocUnsafe(Math.min(this[
|
|
128699
|
+
[Ci]() {
|
|
128700
|
+
return Buffer.allocUnsafe(Math.min(this[Ai], this[ie]));
|
|
128470
128701
|
}
|
|
128471
128702
|
[zt]() {
|
|
128472
128703
|
if (!this[Q]) {
|
|
128473
128704
|
this[Q] = true;
|
|
128474
|
-
let t = this[
|
|
128475
|
-
if (t.length === 0) return process.nextTick(() => this[
|
|
128476
|
-
I.read(this[m], t, 0, t.length, null, (e, i, r) => this[
|
|
128705
|
+
let t = this[Ci]();
|
|
128706
|
+
if (t.length === 0) return process.nextTick(() => this[Ni](null, 0, t));
|
|
128707
|
+
I.read(this[m], t, 0, t.length, null, (e, i, r) => this[Ni](e, i, r));
|
|
128477
128708
|
}
|
|
128478
128709
|
}
|
|
128479
|
-
[
|
|
128480
|
-
this[Q] = false, t ? this[Ut](t) : this[
|
|
128710
|
+
[Ni](t, e, i) {
|
|
128711
|
+
this[Q] = false, t ? this[Ut](t) : this[Ii](e, i) && this[zt]();
|
|
128481
128712
|
}
|
|
128482
128713
|
[H]() {
|
|
128483
128714
|
if (this[ot] && typeof this[m] == "number") {
|
|
@@ -128488,7 +128719,7 @@ var gt = class extends A {
|
|
|
128488
128719
|
[Ut](t) {
|
|
128489
128720
|
this[Q] = true, this[H](), this.emit("error", t);
|
|
128490
128721
|
}
|
|
128491
|
-
[
|
|
128722
|
+
[Ii](t, e) {
|
|
128492
128723
|
let i = false;
|
|
128493
128724
|
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;
|
|
128494
128725
|
}
|
|
@@ -128506,7 +128737,7 @@ var gt = class extends A {
|
|
|
128506
128737
|
}
|
|
128507
128738
|
}
|
|
128508
128739
|
};
|
|
128509
|
-
var
|
|
128740
|
+
var Me = class extends _t {
|
|
128510
128741
|
[ht]() {
|
|
128511
128742
|
let t = true;
|
|
128512
128743
|
try {
|
|
@@ -128521,8 +128752,8 @@ var ve = class extends gt {
|
|
|
128521
128752
|
if (!this[Q]) {
|
|
128522
128753
|
this[Q] = true;
|
|
128523
128754
|
do {
|
|
128524
|
-
let e = this[
|
|
128525
|
-
if (!this[
|
|
128755
|
+
let e = this[Ci](), i = e.length === 0 ? 0 : I.readSync(this[m], e, 0, e.length, null);
|
|
128756
|
+
if (!this[Ii](i, e)) break;
|
|
128526
128757
|
} while (true);
|
|
128527
128758
|
this[Q] = false;
|
|
128528
128759
|
}
|
|
@@ -128538,26 +128769,26 @@ var ve = class extends gt {
|
|
|
128538
128769
|
}
|
|
128539
128770
|
}
|
|
128540
128771
|
};
|
|
128541
|
-
var tt = class extends
|
|
128772
|
+
var tt = class extends Ur {
|
|
128542
128773
|
readable = false;
|
|
128543
128774
|
writable = true;
|
|
128544
128775
|
[bt] = false;
|
|
128545
128776
|
[Rt] = false;
|
|
128546
128777
|
[ee] = false;
|
|
128547
128778
|
[Y] = [];
|
|
128548
|
-
[
|
|
128779
|
+
[Fe] = false;
|
|
128549
128780
|
[U];
|
|
128550
128781
|
[se];
|
|
128551
128782
|
[ot];
|
|
128552
128783
|
[m];
|
|
128553
|
-
[
|
|
128784
|
+
[ve];
|
|
128554
128785
|
[J];
|
|
128555
|
-
[
|
|
128786
|
+
[xi] = false;
|
|
128556
128787
|
[nt];
|
|
128557
128788
|
constructor(t, e) {
|
|
128558
128789
|
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;
|
|
128559
128790
|
let i = this[nt] !== void 0 ? "r+" : "w";
|
|
128560
|
-
this[
|
|
128791
|
+
this[ve] = e.flags === void 0, this[J] = e.flags === void 0 ? i : e.flags, this[m] === void 0 && this[ht]();
|
|
128561
128792
|
}
|
|
128562
128793
|
emit(t, ...e) {
|
|
128563
128794
|
if (t === "error") {
|
|
@@ -128579,26 +128810,26 @@ var tt = class extends Hr {
|
|
|
128579
128810
|
I.open(this[U], this[J], this[se], (t, e) => this[Ht](t, e));
|
|
128580
128811
|
}
|
|
128581
128812
|
[Ht](t, e) {
|
|
128582
|
-
this[
|
|
128813
|
+
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]());
|
|
128583
128814
|
}
|
|
128584
128815
|
end(t, e) {
|
|
128585
128816
|
return t && this.write(t, e), this[ee] = true, !this[Rt] && !this[Y].length && typeof this[m] == "number" && this[Pt](null, 0), this;
|
|
128586
128817
|
}
|
|
128587
128818
|
write(t, e) {
|
|
128588
|
-
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[
|
|
128819
|
+
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);
|
|
128589
128820
|
}
|
|
128590
|
-
[
|
|
128821
|
+
[ke](t) {
|
|
128591
128822
|
I.write(this[m], t, 0, t.length, this[nt], (e, i) => this[Pt](e, i));
|
|
128592
128823
|
}
|
|
128593
128824
|
[Pt](t, e) {
|
|
128594
|
-
t ? this[Ut](t) : (this[nt] !== void 0 && typeof e == "number" && (this[nt] += e), this[Y].length ? this[
|
|
128825
|
+
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"))));
|
|
128595
128826
|
}
|
|
128596
|
-
[
|
|
128827
|
+
[Li]() {
|
|
128597
128828
|
if (this[Y].length === 0) this[ee] && this[Pt](null, 0);
|
|
128598
|
-
else if (this[Y].length === 1) this[
|
|
128829
|
+
else if (this[Y].length === 1) this[ke](this[Y].pop());
|
|
128599
128830
|
else {
|
|
128600
128831
|
let t = this[Y];
|
|
128601
|
-
this[Y] = [],
|
|
128832
|
+
this[Y] = [], Hr(this[m], t, this[nt], (e, i) => this[Pt](e, i));
|
|
128602
128833
|
}
|
|
128603
128834
|
}
|
|
128604
128835
|
[H]() {
|
|
@@ -128611,7 +128842,7 @@ var tt = class extends Hr {
|
|
|
128611
128842
|
var Wt = class extends tt {
|
|
128612
128843
|
[ht]() {
|
|
128613
128844
|
let t;
|
|
128614
|
-
if (this[
|
|
128845
|
+
if (this[ve] && this[J] === "r+") try {
|
|
128615
128846
|
t = I.openSync(this[U], this[J], this[se]);
|
|
128616
128847
|
} catch (e) {
|
|
128617
128848
|
if (e?.code === "ENOENT") return this[J] = "w", this[ht]();
|
|
@@ -128626,7 +128857,7 @@ var Wt = class extends tt {
|
|
|
128626
128857
|
this[m] = void 0, I.closeSync(t), this.emit("close");
|
|
128627
128858
|
}
|
|
128628
128859
|
}
|
|
128629
|
-
[
|
|
128860
|
+
[ke](t) {
|
|
128630
128861
|
let e = true;
|
|
128631
128862
|
try {
|
|
128632
128863
|
this[Pt](null, I.writeSync(this[m], t, 0, t.length, this[nt])), e = false;
|
|
@@ -128638,49 +128869,50 @@ var Wt = class extends tt {
|
|
|
128638
128869
|
}
|
|
128639
128870
|
}
|
|
128640
128871
|
};
|
|
128641
|
-
var
|
|
128872
|
+
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"]]);
|
|
128642
128873
|
var As = (s3) => !!s3.sync && !!s3.file;
|
|
128643
|
-
var
|
|
128644
|
-
var
|
|
128645
|
-
var
|
|
128646
|
-
var
|
|
128647
|
-
var
|
|
128648
|
-
let t =
|
|
128874
|
+
var Ds = (s3) => !s3.sync && !!s3.file;
|
|
128875
|
+
var Is = (s3) => !!s3.sync && !s3.file;
|
|
128876
|
+
var Cs = (s3) => !s3.sync && !s3.file;
|
|
128877
|
+
var Fs = (s3) => !!s3.file;
|
|
128878
|
+
var Gr = (s3) => {
|
|
128879
|
+
let t = Wr.get(s3);
|
|
128649
128880
|
return t || s3;
|
|
128650
128881
|
};
|
|
128651
128882
|
var re = (s3 = {}) => {
|
|
128652
128883
|
if (!s3) return {};
|
|
128653
128884
|
let t = {};
|
|
128654
128885
|
for (let [e, i] of Object.entries(s3)) {
|
|
128655
|
-
let r =
|
|
128886
|
+
let r = Gr(e);
|
|
128656
128887
|
t[r] = i;
|
|
128657
128888
|
}
|
|
128658
128889
|
return t.chmod === void 0 && t.noChmod === false && (t.chmod = true), delete t.noChmod, t;
|
|
128659
128890
|
};
|
|
128660
128891
|
var K = (s3, t, e, i, r) => Object.assign((n = [], o, h) => {
|
|
128661
|
-
Array.isArray(n) && (o = n, n = {}), typeof o == "function" && (h = o, o = void 0), o
|
|
128892
|
+
Array.isArray(n) && (o = n, n = {}), typeof o == "function" && (h = o, o = void 0), o = o ? Array.from(o) : [];
|
|
128662
128893
|
let a = re(n);
|
|
128663
128894
|
if (r?.(a, o), As(a)) {
|
|
128664
128895
|
if (typeof h == "function") throw new TypeError("callback not supported for sync tar functions");
|
|
128665
128896
|
return s3(a, o);
|
|
128897
|
+
} else if (Ds(a)) {
|
|
128898
|
+
let l = t(a, o);
|
|
128899
|
+
return h ? l.then(() => h(), h) : l;
|
|
128666
128900
|
} else if (Is(a)) {
|
|
128667
|
-
let l = t(a, o), c = h || void 0;
|
|
128668
|
-
return c ? l.then(() => c(), c) : l;
|
|
128669
|
-
} else if (Cs(a)) {
|
|
128670
128901
|
if (typeof h == "function") throw new TypeError("callback not supported for sync tar functions");
|
|
128671
128902
|
return e(a, o);
|
|
128672
|
-
} else if (
|
|
128903
|
+
} else if (Cs(a)) {
|
|
128673
128904
|
if (typeof h == "function") throw new TypeError("callback only supported with file option");
|
|
128674
128905
|
return i(a, o);
|
|
128675
|
-
}
|
|
128906
|
+
}
|
|
128907
|
+
throw new Error("impossible options??");
|
|
128676
128908
|
}, { syncFile: s3, asyncFile: t, syncNoFile: e, asyncNoFile: i, validate: r });
|
|
128677
|
-
var
|
|
128678
|
-
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 },
|
|
128679
|
-
var
|
|
128680
|
-
var
|
|
128681
|
-
var
|
|
128682
|
-
var
|
|
128683
|
-
|
|
128909
|
+
var Yr = Zr.constants || { ZLIB_VERNUM: 4736 };
|
|
128910
|
+
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));
|
|
128911
|
+
var Kr = gt.concat;
|
|
128912
|
+
var vs = Object.getOwnPropertyDescriptor(gt, "concat");
|
|
128913
|
+
var Vr = (s3) => s3;
|
|
128914
|
+
var ki = vs?.writable === true || vs?.set !== void 0 ? (s3) => {
|
|
128915
|
+
gt.concat = s3 ? Vr : Kr;
|
|
128684
128916
|
} : (s3) => {
|
|
128685
128917
|
};
|
|
128686
128918
|
var Ot = /* @__PURE__ */ Symbol("_superWrite");
|
|
@@ -128694,8 +128926,8 @@ var Gt = class extends Error {
|
|
|
128694
128926
|
return "ZlibError";
|
|
128695
128927
|
}
|
|
128696
128928
|
};
|
|
128697
|
-
var
|
|
128698
|
-
var ne = class extends
|
|
128929
|
+
var vi = /* @__PURE__ */ Symbol("flushFlag");
|
|
128930
|
+
var ne = class extends D {
|
|
128699
128931
|
#t = false;
|
|
128700
128932
|
#i = false;
|
|
128701
128933
|
#s;
|
|
@@ -128714,9 +128946,9 @@ var ne = class extends A {
|
|
|
128714
128946
|
}
|
|
128715
128947
|
constructor(t, e) {
|
|
128716
128948
|
if (!t || typeof t != "object") throw new TypeError("invalid options for ZlibBase constructor");
|
|
128717
|
-
if (super(t), this.#s = t.flush ?? 0, this.#n = t.finishFlush ?? 0, this.#r = t.fullFlushFlag ?? 0, typeof
|
|
128949
|
+
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);
|
|
128718
128950
|
try {
|
|
128719
|
-
this.#e = new
|
|
128951
|
+
this.#e = new ks[e](t);
|
|
128720
128952
|
} catch (i) {
|
|
128721
128953
|
throw new Gt(i, this.constructor);
|
|
128722
128954
|
}
|
|
@@ -128728,10 +128960,10 @@ var ne = class extends A {
|
|
|
128728
128960
|
this.#e && (this.#e.close(), this.#e = void 0, this.emit("close"));
|
|
128729
128961
|
}
|
|
128730
128962
|
reset() {
|
|
128731
|
-
if (!this.#t) return
|
|
128963
|
+
if (!this.#t) return Mi(this.#e, "zlib binding closed"), this.#e.reset?.();
|
|
128732
128964
|
}
|
|
128733
128965
|
flush(t) {
|
|
128734
|
-
this.ended || (typeof t != "number" && (t = this.#r), this.write(Object.assign(
|
|
128966
|
+
this.ended || (typeof t != "number" && (t = this.#r), this.write(Object.assign(gt.alloc(0), { [vi]: t })));
|
|
128735
128967
|
}
|
|
128736
128968
|
end(t, e, i) {
|
|
128737
128969
|
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);
|
|
@@ -128743,20 +128975,20 @@ var ne = class extends A {
|
|
|
128743
128975
|
return super.write(t);
|
|
128744
128976
|
}
|
|
128745
128977
|
write(t, e, i) {
|
|
128746
|
-
if (typeof e == "function" && (i = e, e = "utf8"), typeof t == "string" && (t =
|
|
128747
|
-
|
|
128978
|
+
if (typeof e == "function" && (i = e, e = "utf8"), typeof t == "string" && (t = gt.from(t, e)), this.#t) return;
|
|
128979
|
+
Mi(this.#e, "zlib binding closed");
|
|
128748
128980
|
let r = this.#e._handle, n = r.close;
|
|
128749
128981
|
r.close = () => {
|
|
128750
128982
|
};
|
|
128751
128983
|
let o = this.#e.close;
|
|
128752
128984
|
this.#e.close = () => {
|
|
128753
|
-
},
|
|
128985
|
+
}, ki(true);
|
|
128754
128986
|
let h;
|
|
128755
128987
|
try {
|
|
128756
|
-
let l = typeof t[
|
|
128757
|
-
h = this.#e._processChunk(t, l),
|
|
128988
|
+
let l = typeof t[vi] == "number" ? t[vi] : this.#s;
|
|
128989
|
+
h = this.#e._processChunk(t, l), ki(false);
|
|
128758
128990
|
} catch (l) {
|
|
128759
|
-
|
|
128991
|
+
ki(false), this.#o(new Gt(l, this.write));
|
|
128760
128992
|
} finally {
|
|
128761
128993
|
this.#e && (this.#e._handle = r, r.close = n, this.#e.close = o, this.#e.removeAllListeners("error"));
|
|
128762
128994
|
}
|
|
@@ -128764,13 +128996,13 @@ var ne = class extends A {
|
|
|
128764
128996
|
let a;
|
|
128765
128997
|
if (h) if (Array.isArray(h) && h.length > 0) {
|
|
128766
128998
|
let l = h[0];
|
|
128767
|
-
a = this[Ot](
|
|
128999
|
+
a = this[Ot](gt.from(l));
|
|
128768
129000
|
for (let c = 1; c < h.length; c++) a = this[Ot](h[c]);
|
|
128769
|
-
} else a = this[Ot](
|
|
129001
|
+
} else a = this[Ot](gt.from(h));
|
|
128770
129002
|
return i && i(), a;
|
|
128771
129003
|
}
|
|
128772
129004
|
};
|
|
128773
|
-
var
|
|
129005
|
+
var Be = class extends ne {
|
|
128774
129006
|
#t;
|
|
128775
129007
|
#i;
|
|
128776
129008
|
constructor(t, e) {
|
|
@@ -128781,7 +129013,7 @@ var Me = class extends ne {
|
|
|
128781
129013
|
if (!this.handle) throw new Error("cannot switch params when binding is closed");
|
|
128782
129014
|
if (!this.handle.params) throw new Error("not supported in this implementation");
|
|
128783
129015
|
if (this.#t !== t || this.#i !== e) {
|
|
128784
|
-
this.flush(M.Z_SYNC_FLUSH),
|
|
129016
|
+
this.flush(M.Z_SYNC_FLUSH), Mi(this.handle, "zlib binding closed");
|
|
128785
129017
|
let i = this.handle.flush;
|
|
128786
129018
|
this.handle.flush = (r, n) => {
|
|
128787
129019
|
typeof r == "function" && (n = r, r = this.flushFlag), this.flush(r), n?.();
|
|
@@ -128796,7 +129028,7 @@ var Me = class extends ne {
|
|
|
128796
129028
|
}
|
|
128797
129029
|
}
|
|
128798
129030
|
};
|
|
128799
|
-
var
|
|
129031
|
+
var Pe = class extends Be {
|
|
128800
129032
|
#t;
|
|
128801
129033
|
constructor(t) {
|
|
128802
129034
|
super(t, "Gzip"), this.#t = t && !!t.portable;
|
|
@@ -128805,87 +129037,87 @@ var Be = class extends Me {
|
|
|
128805
129037
|
return this.#t ? (this.#t = false, t[9] = 255, super[Ot](t)) : super[Ot](t);
|
|
128806
129038
|
}
|
|
128807
129039
|
};
|
|
128808
|
-
var
|
|
129040
|
+
var ze = class extends Be {
|
|
128809
129041
|
constructor(t) {
|
|
128810
129042
|
super(t, "Unzip");
|
|
128811
129043
|
}
|
|
128812
129044
|
};
|
|
128813
|
-
var
|
|
129045
|
+
var Ue = class extends ne {
|
|
128814
129046
|
constructor(t, e) {
|
|
128815
129047
|
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);
|
|
128816
129048
|
}
|
|
128817
129049
|
};
|
|
128818
|
-
var
|
|
129050
|
+
var He = class extends Ue {
|
|
128819
129051
|
constructor(t) {
|
|
128820
129052
|
super(t, "BrotliCompress");
|
|
128821
129053
|
}
|
|
128822
129054
|
};
|
|
128823
|
-
var
|
|
129055
|
+
var We = class extends Ue {
|
|
128824
129056
|
constructor(t) {
|
|
128825
129057
|
super(t, "BrotliDecompress");
|
|
128826
129058
|
}
|
|
128827
129059
|
};
|
|
128828
|
-
var
|
|
129060
|
+
var Ge = class extends ne {
|
|
128829
129061
|
constructor(t, e) {
|
|
128830
129062
|
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);
|
|
128831
129063
|
}
|
|
128832
129064
|
};
|
|
128833
|
-
var
|
|
129065
|
+
var Ze = class extends Ge {
|
|
128834
129066
|
constructor(t) {
|
|
128835
129067
|
super(t, "ZstdCompress");
|
|
128836
129068
|
}
|
|
128837
129069
|
};
|
|
128838
|
-
var
|
|
129070
|
+
var Ye = class extends Ge {
|
|
128839
129071
|
constructor(t) {
|
|
128840
129072
|
super(t, "ZstdDecompress");
|
|
128841
129073
|
}
|
|
128842
129074
|
};
|
|
128843
|
-
var
|
|
128844
|
-
if (Number.isSafeInteger(s3)) s3 < 0 ?
|
|
129075
|
+
var Ms = (s3, t) => {
|
|
129076
|
+
if (Number.isSafeInteger(s3)) s3 < 0 ? qr(s3, t) : Xr(s3, t);
|
|
128845
129077
|
else throw Error("cannot encode number outside of javascript safe integer range");
|
|
128846
129078
|
return t;
|
|
128847
129079
|
};
|
|
128848
|
-
var
|
|
129080
|
+
var Xr = (s3, t) => {
|
|
128849
129081
|
t[0] = 128;
|
|
128850
129082
|
for (var e = t.length; e > 1; e--) t[e - 1] = s3 & 255, s3 = Math.floor(s3 / 256);
|
|
128851
129083
|
};
|
|
128852
|
-
var
|
|
129084
|
+
var qr = (s3, t) => {
|
|
128853
129085
|
t[0] = 255;
|
|
128854
129086
|
var e = false;
|
|
128855
129087
|
s3 = s3 * -1;
|
|
128856
129088
|
for (var i = t.length; i > 1; i--) {
|
|
128857
129089
|
var r = s3 & 255;
|
|
128858
|
-
s3 = Math.floor(s3 / 256), e ? t[i - 1] =
|
|
129090
|
+
s3 = Math.floor(s3 / 256), e ? t[i - 1] = Ps(r) : r === 0 ? t[i - 1] = 0 : (e = true, t[i - 1] = zs(r));
|
|
128859
129091
|
}
|
|
128860
129092
|
};
|
|
128861
|
-
var
|
|
128862
|
-
let t = s3[0], e = t === 128 ?
|
|
129093
|
+
var Bs = (s3) => {
|
|
129094
|
+
let t = s3[0], e = t === 128 ? Qr(s3.subarray(1, s3.length)) : t === 255 ? jr(s3) : null;
|
|
128863
129095
|
if (e === null) throw Error("invalid base256 encoding");
|
|
128864
129096
|
if (!Number.isSafeInteger(e)) throw Error("parsed number outside of javascript safe integer range");
|
|
128865
129097
|
return e;
|
|
128866
129098
|
};
|
|
128867
|
-
var
|
|
129099
|
+
var jr = (s3) => {
|
|
128868
129100
|
for (var t = s3.length, e = 0, i = false, r = t - 1; r > -1; r--) {
|
|
128869
129101
|
var n = Number(s3[r]), o;
|
|
128870
|
-
i ? o =
|
|
129102
|
+
i ? o = Ps(n) : n === 0 ? o = n : (i = true, o = zs(n)), o !== 0 && (e -= o * Math.pow(256, t - r - 1));
|
|
128871
129103
|
}
|
|
128872
129104
|
return e;
|
|
128873
129105
|
};
|
|
128874
|
-
var
|
|
129106
|
+
var Qr = (s3) => {
|
|
128875
129107
|
for (var t = s3.length, e = 0, i = t - 1; i > -1; i--) {
|
|
128876
129108
|
var r = Number(s3[i]);
|
|
128877
129109
|
r !== 0 && (e += r * Math.pow(256, t - i - 1));
|
|
128878
129110
|
}
|
|
128879
129111
|
return e;
|
|
128880
129112
|
};
|
|
128881
|
-
var
|
|
128882
|
-
var
|
|
128883
|
-
var
|
|
128884
|
-
Ar(
|
|
129113
|
+
var Ps = (s3) => (255 ^ s3) & 255;
|
|
129114
|
+
var zs = (s3) => (255 ^ s3) + 1 & 255;
|
|
129115
|
+
var Bi = {};
|
|
129116
|
+
Ar(Bi, { code: () => Ke, isCode: () => oe, isName: () => tn, name: () => he });
|
|
128885
129117
|
var oe = (s3) => he.has(s3);
|
|
128886
|
-
var
|
|
129118
|
+
var tn = (s3) => Ke.has(s3);
|
|
128887
129119
|
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"]]);
|
|
128888
|
-
var
|
|
129120
|
+
var Ke = new Map(Array.from(he).map((s3) => [s3[1], s3[0]]));
|
|
128889
129121
|
var F = class {
|
|
128890
129122
|
cksumValid = false;
|
|
128891
129123
|
needPax = false;
|
|
@@ -128913,14 +129145,14 @@ var F = class {
|
|
|
128913
129145
|
}
|
|
128914
129146
|
decode(t, e, i, r) {
|
|
128915
129147
|
if (e || (e = 0), !t || !(t.length >= e + 512)) throw new Error("need 512 bytes for header");
|
|
128916
|
-
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 ??
|
|
129148
|
+
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);
|
|
128917
129149
|
let n = Tt(t, e + 156, 1);
|
|
128918
129150
|
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) {
|
|
128919
129151
|
let h = Tt(t, e + 345, 155);
|
|
128920
129152
|
this.path = h + "/" + this.path;
|
|
128921
129153
|
} else {
|
|
128922
129154
|
let h = Tt(t, e + 345, 130);
|
|
128923
|
-
h && (this.path = h + "/" + this.path), this.atime = i?.atime ?? r?.atime ??
|
|
129155
|
+
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);
|
|
128924
129156
|
}
|
|
128925
129157
|
let o = 256;
|
|
128926
129158
|
for (let h = e; h < e + 148; h++) o += t[h];
|
|
@@ -128932,8 +129164,8 @@ var F = class {
|
|
|
128932
129164
|
}
|
|
128933
129165
|
encode(t, e = 0) {
|
|
128934
129166
|
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");
|
|
128935
|
-
let i = this.ctime || this.atime ? 130 : 155, r =
|
|
128936
|
-
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 =
|
|
129167
|
+
let i = this.ctime || this.atime ? 130 : 155, r = en(this.path || "", i), n = r[0], o = r[1];
|
|
129168
|
+
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);
|
|
128937
129169
|
let h = 256;
|
|
128938
129170
|
for (let a = e; a < e + 148; a++) h += t[a];
|
|
128939
129171
|
for (let a = e + 156; a < e + 512; a++) h += t[a];
|
|
@@ -128946,13 +129178,13 @@ var F = class {
|
|
|
128946
129178
|
return this.#t;
|
|
128947
129179
|
}
|
|
128948
129180
|
set type(t) {
|
|
128949
|
-
let e = String(
|
|
129181
|
+
let e = String(Ke.get(t));
|
|
128950
129182
|
if (oe(e) || e === "Unsupported") this.#t = e;
|
|
128951
129183
|
else if (oe(t)) this.#t = t;
|
|
128952
129184
|
else throw new TypeError("invalid entry type: " + t);
|
|
128953
129185
|
}
|
|
128954
129186
|
};
|
|
128955
|
-
var
|
|
129187
|
+
var en = (s3, t) => {
|
|
128956
129188
|
let i = s3, r = "", n, o = Zt.parse(s3).root || ".";
|
|
128957
129189
|
if (Buffer.byteLength(i) < 100) n = [i, r, false];
|
|
128958
129190
|
else {
|
|
@@ -128965,19 +129197,19 @@ var sn = (s3, t) => {
|
|
|
128965
129197
|
return n;
|
|
128966
129198
|
};
|
|
128967
129199
|
var Tt = (s3, t, e) => s3.subarray(t, t + e).toString("utf8").replace(/\0.*/, "");
|
|
128968
|
-
var
|
|
128969
|
-
var
|
|
128970
|
-
var at = (s3, t, e) => Number(s3[t]) & 128 ?
|
|
128971
|
-
var
|
|
128972
|
-
var
|
|
128973
|
-
var
|
|
128974
|
-
var lt = (s3, t, e, i) => i === void 0 ? false : i >
|
|
128975
|
-
var
|
|
128976
|
-
var
|
|
128977
|
-
var
|
|
128978
|
-
var
|
|
128979
|
-
var
|
|
128980
|
-
var xt = (s3, t, e, i) => i === void 0 ? false : (s3.write(i +
|
|
129200
|
+
var Pi = (s3, t, e) => sn(at(s3, t, e));
|
|
129201
|
+
var sn = (s3) => s3 === void 0 ? void 0 : new Date(s3 * 1e3);
|
|
129202
|
+
var at = (s3, t, e) => Number(s3[t]) & 128 ? Bs(s3.subarray(t, t + e)) : nn(s3, t, e);
|
|
129203
|
+
var rn = (s3) => isNaN(s3) ? void 0 : s3;
|
|
129204
|
+
var nn = (s3, t, e) => rn(parseInt(s3.subarray(t, t + e).toString("utf8").replace(/\0.*$/, "").trim(), 8));
|
|
129205
|
+
var on = { 12: 8589934591, 8: 2097151 };
|
|
129206
|
+
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);
|
|
129207
|
+
var hn = (s3, t, e, i) => s3.write(an(i, e), t, e, "ascii");
|
|
129208
|
+
var an = (s3, t) => ln(Math.floor(s3).toString(8), t);
|
|
129209
|
+
var ln = (s3, t) => (s3.length === t - 1 ? s3 : new Array(t - s3.length - 1).join("0") + s3 + " ") + "\0";
|
|
129210
|
+
var zi = (s3, t, e, i) => i === void 0 ? false : lt(s3, t, e, i.getTime() / 1e3);
|
|
129211
|
+
var cn = new Array(156).join("\0");
|
|
129212
|
+
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);
|
|
128981
129213
|
var ct = class s {
|
|
128982
129214
|
atime;
|
|
128983
129215
|
mtime;
|
|
@@ -129004,7 +129236,7 @@ var ct = class s {
|
|
|
129004
129236
|
if (t === "") return Buffer.allocUnsafe(0);
|
|
129005
129237
|
let e = Buffer.byteLength(t), i = 512 * Math.ceil(1 + e / 512), r = Buffer.allocUnsafe(i);
|
|
129006
129238
|
for (let n = 0; n < 512; n++) r[n] = 0;
|
|
129007
|
-
new F({ path: ("PaxHeader/" +
|
|
129239
|
+
new F({ path: ("PaxHeader/" + fn(this.path ?? "")).slice(0, 99), mode: this.mode || 420, uid: this.uid, gid: this.gid, size: e, mtime: this.mtime, type: this.global ? "GlobalExtendedHeader" : "ExtendedHeader", linkpath: "", uname: this.uname || "", gname: this.gname || "", devmaj: 0, devmin: 0, atime: this.atime, ctime: this.ctime }).encode(r), r.write(t, 512, e, "utf8");
|
|
129008
129240
|
for (let n = e + 512; n < r.length; n++) r[n] = 0;
|
|
129009
129241
|
return r;
|
|
129010
129242
|
}
|
|
@@ -129018,13 +129250,13 @@ var ct = class s {
|
|
|
129018
129250
|
return n + o >= Math.pow(10, o) && (o += 1), o + n + r;
|
|
129019
129251
|
}
|
|
129020
129252
|
static parse(t, e, i = false) {
|
|
129021
|
-
return new s(un(
|
|
129253
|
+
return new s(dn(un(t), e), i);
|
|
129022
129254
|
}
|
|
129023
129255
|
};
|
|
129024
|
-
var
|
|
129025
|
-
var
|
|
129026
|
-
`).reduce(
|
|
129027
|
-
var
|
|
129256
|
+
var dn = (s3, t) => t ? Object.assign({}, t, s3) : s3;
|
|
129257
|
+
var un = (s3) => s3.replace(/\n$/, "").split(`
|
|
129258
|
+
`).reduce(mn, /* @__PURE__ */ Object.create(null));
|
|
129259
|
+
var mn = (s3, t) => {
|
|
129028
129260
|
let e = parseInt(t, 10);
|
|
129029
129261
|
if (e !== Buffer.byteLength(t) + 1) return s3;
|
|
129030
129262
|
t = t.slice((e + " ").length);
|
|
@@ -129033,9 +129265,9 @@ var pn = (s3, t) => {
|
|
|
129033
129265
|
let n = r.replace(/^SCHILY\.(dev|ino|nlink)/, "$1"), o = i.join("=");
|
|
129034
129266
|
return s3[n] = /^([A-Z]+\.)?([mac]|birth|creation)time$/.test(n) ? new Date(Number(o) * 1e3) : /^[0-9]+$/.test(o) ? +o : o, s3;
|
|
129035
129267
|
};
|
|
129036
|
-
var
|
|
129037
|
-
var f =
|
|
129038
|
-
var Yt = class extends
|
|
129268
|
+
var pn = process.env.TESTING_TAR_FAKE_PLATFORM || process.platform;
|
|
129269
|
+
var f = pn !== "win32" ? (s3) => s3 : (s3) => s3 && s3.replaceAll(/\\/g, "/");
|
|
129270
|
+
var Yt = class extends D {
|
|
129039
129271
|
extended;
|
|
129040
129272
|
globalExtended;
|
|
129041
129273
|
header;
|
|
@@ -129102,42 +129334,42 @@ var Yt = class extends A {
|
|
|
129102
129334
|
var Lt = (s3, t, e, i = {}) => {
|
|
129103
129335
|
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));
|
|
129104
129336
|
};
|
|
129105
|
-
var
|
|
129106
|
-
var
|
|
129107
|
-
var
|
|
129108
|
-
var
|
|
129337
|
+
var wn = 1024 * 1024;
|
|
129338
|
+
var Zi = Buffer.from([31, 139]);
|
|
129339
|
+
var Yi = Buffer.from([40, 181, 47, 253]);
|
|
129340
|
+
var Sn = Math.max(Zi.length, Yi.length);
|
|
129109
129341
|
var B = /* @__PURE__ */ Symbol("state");
|
|
129110
129342
|
var Nt = /* @__PURE__ */ Symbol("writeEntry");
|
|
129111
129343
|
var et = /* @__PURE__ */ Symbol("readEntry");
|
|
129112
|
-
var
|
|
129113
|
-
var
|
|
129344
|
+
var Ui = /* @__PURE__ */ Symbol("nextEntry");
|
|
129345
|
+
var Us = /* @__PURE__ */ Symbol("processEntry");
|
|
129114
129346
|
var V = /* @__PURE__ */ Symbol("extendedHeader");
|
|
129115
129347
|
var ae = /* @__PURE__ */ Symbol("globalExtendedHeader");
|
|
129116
129348
|
var ft = /* @__PURE__ */ Symbol("meta");
|
|
129117
|
-
var
|
|
129349
|
+
var Hs = /* @__PURE__ */ Symbol("emitMeta");
|
|
129118
129350
|
var p = /* @__PURE__ */ Symbol("buffer");
|
|
129119
129351
|
var it = /* @__PURE__ */ Symbol("queue");
|
|
129120
129352
|
var dt = /* @__PURE__ */ Symbol("ended");
|
|
129121
|
-
var
|
|
129122
|
-
var
|
|
129353
|
+
var Hi = /* @__PURE__ */ Symbol("emittedEnd");
|
|
129354
|
+
var At = /* @__PURE__ */ Symbol("emit");
|
|
129123
129355
|
var y = /* @__PURE__ */ Symbol("unzip");
|
|
129124
|
-
var
|
|
129125
|
-
var
|
|
129126
|
-
var
|
|
129127
|
-
var
|
|
129128
|
-
var
|
|
129356
|
+
var Ve = /* @__PURE__ */ Symbol("consumeChunk");
|
|
129357
|
+
var $e = /* @__PURE__ */ Symbol("consumeChunkSub");
|
|
129358
|
+
var Wi = /* @__PURE__ */ Symbol("consumeBody");
|
|
129359
|
+
var Ws = /* @__PURE__ */ Symbol("consumeMeta");
|
|
129360
|
+
var Gs = /* @__PURE__ */ Symbol("consumeHeader");
|
|
129129
129361
|
var le = /* @__PURE__ */ Symbol("consuming");
|
|
129130
|
-
var
|
|
129131
|
-
var
|
|
129362
|
+
var Gi = /* @__PURE__ */ Symbol("bufferConcat");
|
|
129363
|
+
var Xe = /* @__PURE__ */ Symbol("maybeEnd");
|
|
129132
129364
|
var Kt = /* @__PURE__ */ Symbol("writing");
|
|
129133
129365
|
var ut = /* @__PURE__ */ Symbol("aborted");
|
|
129134
|
-
var
|
|
129135
|
-
var
|
|
129136
|
-
var
|
|
129137
|
-
var
|
|
129138
|
-
var
|
|
129139
|
-
var
|
|
129140
|
-
var st = class extends
|
|
129366
|
+
var qe = /* @__PURE__ */ Symbol("onDone");
|
|
129367
|
+
var Dt = /* @__PURE__ */ Symbol("sawValidEntry");
|
|
129368
|
+
var je = /* @__PURE__ */ Symbol("sawNullBlock");
|
|
129369
|
+
var Qe = /* @__PURE__ */ Symbol("sawEOF");
|
|
129370
|
+
var Zs = /* @__PURE__ */ Symbol("closeStream");
|
|
129371
|
+
var yn = () => true;
|
|
129372
|
+
var st = class extends En {
|
|
129141
129373
|
file;
|
|
129142
129374
|
strict;
|
|
129143
129375
|
maxMetaEntrySize;
|
|
@@ -129157,36 +129389,36 @@ var st = class extends wn {
|
|
|
129157
129389
|
[dt] = false;
|
|
129158
129390
|
[y];
|
|
129159
129391
|
[ut] = false;
|
|
129160
|
-
[
|
|
129161
|
-
[qe] = false;
|
|
129392
|
+
[Dt];
|
|
129162
129393
|
[je] = false;
|
|
129394
|
+
[Qe] = false;
|
|
129163
129395
|
[Kt] = false;
|
|
129164
129396
|
[le] = false;
|
|
129165
|
-
[
|
|
129397
|
+
[Hi] = false;
|
|
129166
129398
|
constructor(t = {}) {
|
|
129167
|
-
super(), this.file = t.file || "", this.on(
|
|
129168
|
-
(this[B] === "begin" || this[
|
|
129169
|
-
}), t.ondone ? this.on(
|
|
129399
|
+
super(), this.file = t.file || "", this.on(qe, () => {
|
|
129400
|
+
(this[B] === "begin" || this[Dt] === false) && this.warn("TAR_BAD_ARCHIVE", "Unrecognized archive format");
|
|
129401
|
+
}), t.ondone ? this.on(qe, t.ondone) : this.on(qe, () => {
|
|
129170
129402
|
this.emit("prefinish"), this.emit("finish"), this.emit("end");
|
|
129171
|
-
}), this.strict = !!t.strict, this.maxMetaEntrySize = t.maxMetaEntrySize ||
|
|
129403
|
+
}), this.strict = !!t.strict, this.maxMetaEntrySize = t.maxMetaEntrySize || wn, this.filter = typeof t.filter == "function" ? t.filter : yn;
|
|
129172
129404
|
let e = t.file && (t.file.endsWith(".tar.br") || t.file.endsWith(".tbr"));
|
|
129173
129405
|
this.brotli = !(t.gzip || t.zstd) && t.brotli !== void 0 ? t.brotli : e ? void 0 : false;
|
|
129174
129406
|
let i = t.file && (t.file.endsWith(".tar.zst") || t.file.endsWith(".tzst"));
|
|
129175
|
-
this.zstd = !(t.gzip || t.brotli) && t.zstd !== void 0 ? t.zstd : i ? true : void 0, this.on("end", () => this[
|
|
129407
|
+
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);
|
|
129176
129408
|
}
|
|
129177
129409
|
warn(t, e, i = {}) {
|
|
129178
129410
|
Lt(this, t, e, i);
|
|
129179
129411
|
}
|
|
129180
|
-
[
|
|
129181
|
-
this[
|
|
129412
|
+
[Gs](t, e) {
|
|
129413
|
+
this[Dt] === void 0 && (this[Dt] = false);
|
|
129182
129414
|
let i;
|
|
129183
129415
|
try {
|
|
129184
129416
|
i = new F(t, e, this[V], this[ae]);
|
|
129185
129417
|
} catch (r) {
|
|
129186
129418
|
return this.warn("TAR_ENTRY_INVALID", r);
|
|
129187
129419
|
}
|
|
129188
|
-
if (i.nullBlock) this[
|
|
129189
|
-
else if (this[
|
|
129420
|
+
if (i.nullBlock) this[je] ? (this[Qe] = true, this[B] === "begin" && (this[B] = "header"), this[At]("eof")) : (this[je] = true, this[At]("nullBlock"));
|
|
129421
|
+
else if (this[je] = false, !i.cksumValid) this.warn("TAR_ENTRY_INVALID", "checksum failure", { header: i });
|
|
129190
129422
|
else if (!i.path) this.warn("TAR_ENTRY_INVALID", "path is required", { header: i });
|
|
129191
129423
|
else {
|
|
129192
129424
|
let r = i.type;
|
|
@@ -129194,52 +129426,52 @@ var st = class extends wn {
|
|
|
129194
129426
|
else if (!/^(Symbolic)?Link$/.test(r) && !/^(Global)?ExtendedHeader$/.test(r) && i.linkpath) this.warn("TAR_ENTRY_INVALID", "linkpath forbidden", { header: i });
|
|
129195
129427
|
else {
|
|
129196
129428
|
let n = this[Nt] = new Yt(i, this[V], this[ae]);
|
|
129197
|
-
if (!this[
|
|
129429
|
+
if (!this[Dt]) if (n.remain) {
|
|
129198
129430
|
let o = () => {
|
|
129199
|
-
n.invalid || (this[
|
|
129431
|
+
n.invalid || (this[Dt] = true);
|
|
129200
129432
|
};
|
|
129201
129433
|
n.on("end", o);
|
|
129202
|
-
} else this[
|
|
129203
|
-
n.meta ? n.size > this.maxMetaEntrySize ? (n.ignore = true, this[
|
|
129434
|
+
} else this[Dt] = true;
|
|
129435
|
+
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]())));
|
|
129204
129436
|
}
|
|
129205
129437
|
}
|
|
129206
129438
|
}
|
|
129207
|
-
[
|
|
129439
|
+
[Zs]() {
|
|
129208
129440
|
queueMicrotask(() => this.emit("close"));
|
|
129209
129441
|
}
|
|
129210
|
-
[
|
|
129442
|
+
[Us](t) {
|
|
129211
129443
|
let e = true;
|
|
129212
129444
|
if (!t) this[et] = void 0, e = false;
|
|
129213
129445
|
else if (Array.isArray(t)) {
|
|
129214
129446
|
let [i, ...r] = t;
|
|
129215
129447
|
this.emit(i, ...r);
|
|
129216
|
-
} else this[et] = t, this.emit("entry", t), t.emittedEnd || (t.on("end", () => this[
|
|
129448
|
+
} else this[et] = t, this.emit("entry", t), t.emittedEnd || (t.on("end", () => this[Ui]()), e = false);
|
|
129217
129449
|
return e;
|
|
129218
129450
|
}
|
|
129219
|
-
[
|
|
129451
|
+
[Ui]() {
|
|
129220
129452
|
do
|
|
129221
129453
|
;
|
|
129222
|
-
while (this[
|
|
129223
|
-
if (
|
|
129454
|
+
while (this[Us](this[it].shift()));
|
|
129455
|
+
if (this[it].length === 0) {
|
|
129224
129456
|
let t = this[et];
|
|
129225
129457
|
!t || t.flowing || t.size === t.remain ? this[Kt] || this.emit("drain") : t.once("drain", () => this.emit("drain"));
|
|
129226
129458
|
}
|
|
129227
129459
|
}
|
|
129228
|
-
[
|
|
129460
|
+
[Wi](t, e) {
|
|
129229
129461
|
let i = this[Nt];
|
|
129230
129462
|
if (!i) throw new Error("attempt to consume body without entry??");
|
|
129231
129463
|
let r = i.blockRemain ?? 0, n = r >= t.length && e === 0 ? t : t.subarray(e, e + r);
|
|
129232
129464
|
return i.write(n), i.blockRemain || (this[B] = "header", this[Nt] = void 0, i.end()), n.length;
|
|
129233
129465
|
}
|
|
129234
|
-
[
|
|
129235
|
-
let i = this[Nt], r = this[
|
|
129236
|
-
return !this[Nt] && i && this[
|
|
129466
|
+
[Ws](t, e) {
|
|
129467
|
+
let i = this[Nt], r = this[Wi](t, e);
|
|
129468
|
+
return !this[Nt] && i && this[Hs](i), r;
|
|
129237
129469
|
}
|
|
129238
|
-
[
|
|
129239
|
-
|
|
129470
|
+
[At](t, e, i) {
|
|
129471
|
+
this[it].length === 0 && !this[et] ? this.emit(t, e, i) : this[it].push([t, e, i]);
|
|
129240
129472
|
}
|
|
129241
|
-
[
|
|
129242
|
-
switch (this[
|
|
129473
|
+
[Hs](t) {
|
|
129474
|
+
switch (this[At]("meta", this[ft]), t.type) {
|
|
129243
129475
|
case "ExtendedHeader":
|
|
129244
129476
|
case "OldExtendedHeader":
|
|
129245
129477
|
this[V] = ct.parse(this[ft], this[V], false);
|
|
@@ -129268,12 +129500,12 @@ var st = class extends wn {
|
|
|
129268
129500
|
write(t, e, i) {
|
|
129269
129501
|
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;
|
|
129270
129502
|
if ((this[y] === void 0 || this.brotli === void 0 && this[y] === false) && t) {
|
|
129271
|
-
if (this[p] && (t = Buffer.concat([this[p], t]), this[p] = void 0), t.length <
|
|
129272
|
-
for (let a = 0; this[y] === void 0 && a <
|
|
129503
|
+
if (this[p] && (t = Buffer.concat([this[p], t]), this[p] = void 0), t.length < Sn) return this[p] = t, i?.(), true;
|
|
129504
|
+
for (let a = 0; this[y] === void 0 && a < Zi.length; a++) t[a] !== Zi[a] && (this[y] = false);
|
|
129273
129505
|
let o = false;
|
|
129274
129506
|
if (this[y] === false && this.zstd !== false) {
|
|
129275
129507
|
o = true;
|
|
129276
|
-
for (let a = 0; a <
|
|
129508
|
+
for (let a = 0; a < Yi.length; a++) if (t[a] !== Yi[a]) {
|
|
129277
129509
|
o = false;
|
|
129278
129510
|
break;
|
|
129279
129511
|
}
|
|
@@ -129288,69 +129520,69 @@ var st = class extends wn {
|
|
|
129288
129520
|
}
|
|
129289
129521
|
if (this[y] === void 0 || this[y] === false && (this.brotli || o)) {
|
|
129290
129522
|
let a = this[dt];
|
|
129291
|
-
this[dt] = false, this[y] = this[y] === void 0 ? new
|
|
129292
|
-
this[dt] = true, this[
|
|
129523
|
+
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", () => {
|
|
129524
|
+
this[dt] = true, this[Ve]();
|
|
129293
129525
|
}), this[Kt] = true;
|
|
129294
129526
|
let l = !!this[y][a ? "end" : "write"](t);
|
|
129295
129527
|
return this[Kt] = false, i?.(), l;
|
|
129296
129528
|
}
|
|
129297
129529
|
}
|
|
129298
|
-
this[Kt] = true, this[y] ? this[y].write(t) : this[
|
|
129299
|
-
let n = this[it].length ? false : this[et] ? this[et].flowing : true;
|
|
129300
|
-
return !n &&
|
|
129530
|
+
this[Kt] = true, this[y] ? this[y].write(t) : this[Ve](t), this[Kt] = false;
|
|
129531
|
+
let n = this[it].length > 0 ? false : this[et] ? this[et].flowing : true;
|
|
129532
|
+
return !n && this[it].length === 0 && this[et]?.once("drain", () => this.emit("drain")), i?.(), n;
|
|
129301
129533
|
}
|
|
129302
|
-
[
|
|
129534
|
+
[Gi](t) {
|
|
129303
129535
|
t && !this[ut] && (this[p] = this[p] ? Buffer.concat([this[p], t]) : t);
|
|
129304
129536
|
}
|
|
129305
|
-
[
|
|
129306
|
-
if (this[dt] && !this[
|
|
129307
|
-
this[
|
|
129537
|
+
[Xe]() {
|
|
129538
|
+
if (this[dt] && !this[Hi] && !this[ut] && !this[le]) {
|
|
129539
|
+
this[Hi] = true;
|
|
129308
129540
|
let t = this[Nt];
|
|
129309
129541
|
if (t && t.blockRemain) {
|
|
129310
129542
|
let e = this[p] ? this[p].length : 0;
|
|
129311
129543
|
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();
|
|
129312
129544
|
}
|
|
129313
|
-
this[
|
|
129545
|
+
this[At](qe);
|
|
129314
129546
|
}
|
|
129315
129547
|
}
|
|
129316
|
-
[
|
|
129317
|
-
if (this[le] && t) this[
|
|
129318
|
-
else if (!t && !this[p]) this[
|
|
129548
|
+
[Ve](t) {
|
|
129549
|
+
if (this[le] && t) this[Gi](t);
|
|
129550
|
+
else if (!t && !this[p]) this[Xe]();
|
|
129319
129551
|
else if (t) {
|
|
129320
129552
|
if (this[le] = true, this[p]) {
|
|
129321
|
-
this[
|
|
129553
|
+
this[Gi](t);
|
|
129322
129554
|
let e = this[p];
|
|
129323
|
-
this[p] = void 0, this[
|
|
129324
|
-
} else this[
|
|
129325
|
-
for (; this[p] && this[p]?.length >= 512 && !this[ut] && !this[
|
|
129555
|
+
this[p] = void 0, this[$e](e);
|
|
129556
|
+
} else this[$e](t);
|
|
129557
|
+
for (; this[p] && this[p]?.length >= 512 && !this[ut] && !this[Qe]; ) {
|
|
129326
129558
|
let e = this[p];
|
|
129327
|
-
this[p] = void 0, this[
|
|
129559
|
+
this[p] = void 0, this[$e](e);
|
|
129328
129560
|
}
|
|
129329
129561
|
this[le] = false;
|
|
129330
129562
|
}
|
|
129331
|
-
(!this[p] || this[dt]) && this[
|
|
129563
|
+
(!this[p] || this[dt]) && this[Xe]();
|
|
129332
129564
|
}
|
|
129333
|
-
[
|
|
129565
|
+
[$e](t) {
|
|
129334
129566
|
let e = 0, i = t.length;
|
|
129335
|
-
for (; e + 512 <= i && !this[ut] && !this[
|
|
129567
|
+
for (; e + 512 <= i && !this[ut] && !this[Qe]; ) switch (this[B]) {
|
|
129336
129568
|
case "begin":
|
|
129337
129569
|
case "header":
|
|
129338
|
-
this[
|
|
129570
|
+
this[Gs](t, e), e += 512;
|
|
129339
129571
|
break;
|
|
129340
129572
|
case "ignore":
|
|
129341
129573
|
case "body":
|
|
129342
|
-
e += this[
|
|
129574
|
+
e += this[Wi](t, e);
|
|
129343
129575
|
break;
|
|
129344
129576
|
case "meta":
|
|
129345
|
-
e += this[
|
|
129577
|
+
e += this[Ws](t, e);
|
|
129346
129578
|
break;
|
|
129347
129579
|
default:
|
|
129348
129580
|
throw new Error("invalid state: " + this[B]);
|
|
129349
129581
|
}
|
|
129350
|
-
e < i && (this[p]
|
|
129582
|
+
e < i && (this[p] = this[p] ? Buffer.concat([t.subarray(e), this[p]]) : t.subarray(e));
|
|
129351
129583
|
}
|
|
129352
129584
|
end(t, e, i) {
|
|
129353
|
-
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[
|
|
129585
|
+
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;
|
|
129354
129586
|
}
|
|
129355
129587
|
};
|
|
129356
129588
|
var mt = (s3) => {
|
|
@@ -129364,19 +129596,19 @@ var _n = (s3) => {
|
|
|
129364
129596
|
t(e), e.resume();
|
|
129365
129597
|
} : (e) => e.resume();
|
|
129366
129598
|
};
|
|
129367
|
-
var
|
|
129599
|
+
var Ki = (s3, t) => {
|
|
129368
129600
|
let e = new Map(t.map((n) => [mt(n), true])), i = s3.filter, r = (n, o = "") => {
|
|
129369
|
-
let h = o ||
|
|
129601
|
+
let h = o || bn(n).root || ".", a;
|
|
129370
129602
|
if (n === h) a = false;
|
|
129371
129603
|
else {
|
|
129372
129604
|
let l = e.get(n);
|
|
129373
|
-
l !== void 0 ?
|
|
129605
|
+
a = l !== void 0 ? l : r(Rn(n), h);
|
|
129374
129606
|
}
|
|
129375
129607
|
return e.set(n, a), a;
|
|
129376
129608
|
};
|
|
129377
129609
|
s3.filter = i ? (n, o) => i(n, o) && r(mt(n)) : (n) => r(mt(n));
|
|
129378
129610
|
};
|
|
129379
|
-
var
|
|
129611
|
+
var gn = (s3) => {
|
|
129380
129612
|
let t = new st(s3), e = s3.file, i;
|
|
129381
129613
|
try {
|
|
129382
129614
|
i = Vt.openSync(e, "r");
|
|
@@ -129400,58 +129632,58 @@ var On = (s3) => {
|
|
|
129400
129632
|
}
|
|
129401
129633
|
}
|
|
129402
129634
|
};
|
|
129403
|
-
var
|
|
129635
|
+
var On = (s3, t) => {
|
|
129404
129636
|
let e = new st(s3), i = s3.maxReadSize || 16 * 1024 * 1024, r = s3.file;
|
|
129405
129637
|
return new Promise((o, h) => {
|
|
129406
129638
|
e.on("error", h), e.on("end", o), Vt.stat(r, (a, l) => {
|
|
129407
129639
|
if (a) h(a);
|
|
129408
129640
|
else {
|
|
129409
|
-
let c = new
|
|
129641
|
+
let c = new _t(r, { readSize: i, size: l.size });
|
|
129410
129642
|
c.on("error", h), c.pipe(e);
|
|
129411
129643
|
}
|
|
129412
129644
|
});
|
|
129413
129645
|
});
|
|
129414
129646
|
};
|
|
129415
|
-
var It = K(
|
|
129416
|
-
t?.length &&
|
|
129647
|
+
var It = K(gn, On, (s3) => new st(s3), (s3) => new st(s3), (s3, t) => {
|
|
129648
|
+
t?.length && Ki(s3, t), s3.noResume || _n(s3);
|
|
129417
129649
|
});
|
|
129418
|
-
var
|
|
129419
|
-
var { isAbsolute:
|
|
129650
|
+
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);
|
|
129651
|
+
var { isAbsolute: xn, parse: Ys } = Tn;
|
|
129420
129652
|
var ce = (s3) => {
|
|
129421
|
-
let t = "", e =
|
|
129422
|
-
for (;
|
|
129653
|
+
let t = "", e = Ys(s3);
|
|
129654
|
+
for (; xn(s3) || e.root; ) {
|
|
129423
129655
|
let i = s3.charAt(0) === "/" && s3.slice(0, 4) !== "//?/" ? "/" : e.root;
|
|
129424
|
-
s3 = s3.slice(i.length), t += i, e =
|
|
129656
|
+
s3 = s3.slice(i.length), t += i, e = Ys(s3);
|
|
129425
129657
|
}
|
|
129426
129658
|
return [t, s3];
|
|
129427
129659
|
};
|
|
129428
|
-
var
|
|
129429
|
-
var
|
|
129430
|
-
var
|
|
129431
|
-
var
|
|
129432
|
-
var
|
|
129433
|
-
var
|
|
129434
|
-
var
|
|
129660
|
+
var Je = ["|", "<", ">", "?", ":"];
|
|
129661
|
+
var $i = Je.map((s3) => String.fromCodePoint(61440 + Number(s3.codePointAt(0))));
|
|
129662
|
+
var Ln = new Map(Je.map((s3, t) => [s3, $i[t]]));
|
|
129663
|
+
var Nn = new Map($i.map((s3, t) => [s3, Je[t]]));
|
|
129664
|
+
var Xi = (s3) => Je.reduce((t, e) => t.split(e).join(Ln.get(e)), s3);
|
|
129665
|
+
var Ks = (s3) => $i.reduce((t, e) => t.split(e).join(Nn.get(e)), s3);
|
|
129666
|
+
var Js = (s3, t) => t ? (s3 = f(s3).replace(/^\.(\/|$)/, ""), mt(t) + "/" + s3) : f(s3);
|
|
129435
129667
|
var An = 16 * 1024 * 1024;
|
|
129436
|
-
var
|
|
129437
|
-
var
|
|
129438
|
-
var
|
|
129439
|
-
var
|
|
129440
|
-
var
|
|
129668
|
+
var Xs = /* @__PURE__ */ Symbol("process");
|
|
129669
|
+
var qs = /* @__PURE__ */ Symbol("file");
|
|
129670
|
+
var js = /* @__PURE__ */ Symbol("directory");
|
|
129671
|
+
var ji = /* @__PURE__ */ Symbol("symlink");
|
|
129672
|
+
var Qs = /* @__PURE__ */ Symbol("hardlink");
|
|
129441
129673
|
var fe = /* @__PURE__ */ Symbol("header");
|
|
129442
|
-
var
|
|
129443
|
-
var
|
|
129444
|
-
var
|
|
129445
|
-
var
|
|
129446
|
-
var
|
|
129447
|
-
var
|
|
129448
|
-
var
|
|
129674
|
+
var ti = /* @__PURE__ */ Symbol("read");
|
|
129675
|
+
var Qi = /* @__PURE__ */ Symbol("lstat");
|
|
129676
|
+
var ei = /* @__PURE__ */ Symbol("onlstat");
|
|
129677
|
+
var Ji = /* @__PURE__ */ Symbol("onread");
|
|
129678
|
+
var ts = /* @__PURE__ */ Symbol("onreadlink");
|
|
129679
|
+
var es = /* @__PURE__ */ Symbol("openfile");
|
|
129680
|
+
var is = /* @__PURE__ */ Symbol("onopenfile");
|
|
129449
129681
|
var pt = /* @__PURE__ */ Symbol("close");
|
|
129450
|
-
var
|
|
129451
|
-
var
|
|
129452
|
-
var
|
|
129682
|
+
var ii = /* @__PURE__ */ Symbol("mode");
|
|
129683
|
+
var ss = /* @__PURE__ */ Symbol("awaitDrain");
|
|
129684
|
+
var qi = /* @__PURE__ */ Symbol("ondrain");
|
|
129453
129685
|
var X = /* @__PURE__ */ Symbol("prefix");
|
|
129454
|
-
var de = class extends
|
|
129686
|
+
var de = class extends D {
|
|
129455
129687
|
path;
|
|
129456
129688
|
portable;
|
|
129457
129689
|
myuid = process.getuid && process.getuid() || 0;
|
|
@@ -129490,9 +129722,9 @@ var de = class extends A {
|
|
|
129490
129722
|
let [o, h] = ce(this.path);
|
|
129491
129723
|
o && typeof h == "string" && (this.path = h, r = o);
|
|
129492
129724
|
}
|
|
129493
|
-
this.win32 = !!i.win32 || process.platform === "win32", this.win32 && (this.path =
|
|
129725
|
+
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 || $s.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 });
|
|
129494
129726
|
let n = this.statCache.get(this.absolute);
|
|
129495
|
-
n ? this[
|
|
129727
|
+
n ? this[ei](n) : this[Qi]();
|
|
129496
129728
|
}
|
|
129497
129729
|
warn(t, e, i = {}) {
|
|
129498
129730
|
return Lt(this, t, e, i);
|
|
@@ -129500,93 +129732,93 @@ var de = class extends A {
|
|
|
129500
129732
|
emit(t, ...e) {
|
|
129501
129733
|
return t === "error" && (this.#t = true), super.emit(t, ...e);
|
|
129502
129734
|
}
|
|
129503
|
-
[
|
|
129735
|
+
[Qi]() {
|
|
129504
129736
|
$.lstat(this.absolute, (t, e) => {
|
|
129505
129737
|
if (t) return this.emit("error", t);
|
|
129506
|
-
this[
|
|
129738
|
+
this[ei](e);
|
|
129507
129739
|
});
|
|
129508
129740
|
}
|
|
129509
|
-
[
|
|
129510
|
-
this.statCache.set(this.absolute, t), this.stat = t, t.isFile() || (t.size = 0), this.type =
|
|
129741
|
+
[ei](t) {
|
|
129742
|
+
this.statCache.set(this.absolute, t), this.stat = t, t.isFile() || (t.size = 0), this.type = Dn(t), this.emit("stat", t), this[Xs]();
|
|
129511
129743
|
}
|
|
129512
|
-
[
|
|
129744
|
+
[Xs]() {
|
|
129513
129745
|
switch (this.type) {
|
|
129514
129746
|
case "File":
|
|
129515
|
-
return this[
|
|
129747
|
+
return this[qs]();
|
|
129516
129748
|
case "Directory":
|
|
129517
|
-
return this[
|
|
129749
|
+
return this[js]();
|
|
129518
129750
|
case "SymbolicLink":
|
|
129519
|
-
return this[
|
|
129751
|
+
return this[ji]();
|
|
129520
129752
|
default:
|
|
129521
129753
|
return this.end();
|
|
129522
129754
|
}
|
|
129523
129755
|
}
|
|
129524
|
-
[
|
|
129525
|
-
return
|
|
129756
|
+
[ii](t) {
|
|
129757
|
+
return Vi(t, this.type === "Directory", this.portable);
|
|
129526
129758
|
}
|
|
129527
129759
|
[X](t) {
|
|
129528
|
-
return
|
|
129760
|
+
return Js(t, this.prefix);
|
|
129529
129761
|
}
|
|
129530
129762
|
[fe]() {
|
|
129531
129763
|
if (!this.stat) throw new Error("cannot write header before stat");
|
|
129532
|
-
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[
|
|
129764
|
+
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());
|
|
129533
129765
|
let t = this.header?.block;
|
|
129534
129766
|
if (!t) throw new Error("failed to encode header");
|
|
129535
129767
|
super.write(t);
|
|
129536
129768
|
}
|
|
129537
|
-
[
|
|
129769
|
+
[js]() {
|
|
129538
129770
|
if (!this.stat) throw new Error("cannot create directory entry without stat");
|
|
129539
129771
|
this.path.slice(-1) !== "/" && (this.path += "/"), this.stat.size = 0, this[fe](), this.end();
|
|
129540
129772
|
}
|
|
129541
|
-
[
|
|
129773
|
+
[ji]() {
|
|
129542
129774
|
$.readlink(this.absolute, (t, e) => {
|
|
129543
129775
|
if (t) return this.emit("error", t);
|
|
129544
|
-
this[
|
|
129776
|
+
this[ts](e);
|
|
129545
129777
|
});
|
|
129546
129778
|
}
|
|
129547
|
-
[
|
|
129779
|
+
[ts](t) {
|
|
129548
129780
|
this.linkpath = f(t), this[fe](), this.end();
|
|
129549
129781
|
}
|
|
129550
|
-
[
|
|
129782
|
+
[Qs](t) {
|
|
129551
129783
|
if (!this.stat) throw new Error("cannot create link entry without stat");
|
|
129552
|
-
this.type = "Link", this.linkpath = f(
|
|
129784
|
+
this.type = "Link", this.linkpath = f($s.relative(this.cwd, t)), this.stat.size = 0, this[fe](), this.end();
|
|
129553
129785
|
}
|
|
129554
|
-
[
|
|
129786
|
+
[qs]() {
|
|
129555
129787
|
if (!this.stat) throw new Error("cannot create file entry without stat");
|
|
129556
129788
|
if (this.stat.nlink > 1) {
|
|
129557
129789
|
let t = `${this.stat.dev}:${this.stat.ino}`, e = this.linkCache.get(t);
|
|
129558
|
-
if (e?.indexOf(this.cwd) === 0) return this[
|
|
129790
|
+
if (e?.indexOf(this.cwd) === 0) return this[Qs](e);
|
|
129559
129791
|
this.linkCache.set(t, this.absolute);
|
|
129560
129792
|
}
|
|
129561
129793
|
if (this[fe](), this.stat.size === 0) return this.end();
|
|
129562
|
-
this[
|
|
129794
|
+
this[es]();
|
|
129563
129795
|
}
|
|
129564
|
-
[
|
|
129796
|
+
[es]() {
|
|
129565
129797
|
$.open(this.absolute, "r", (t, e) => {
|
|
129566
129798
|
if (t) return this.emit("error", t);
|
|
129567
|
-
this[
|
|
129799
|
+
this[is](e);
|
|
129568
129800
|
});
|
|
129569
129801
|
}
|
|
129570
|
-
[
|
|
129802
|
+
[is](t) {
|
|
129571
129803
|
if (this.fd = t, this.#t) return this[pt]();
|
|
129572
129804
|
if (!this.stat) throw new Error("should stat before calling onopenfile");
|
|
129573
129805
|
this.blockLen = 512 * Math.ceil(this.stat.size / 512), this.blockRemain = this.blockLen;
|
|
129574
129806
|
let e = Math.min(this.blockLen, this.maxReadSize);
|
|
129575
|
-
this.buf = Buffer.allocUnsafe(e), this.offset = 0, this.pos = 0, this.remain = this.stat.size, this.length = this.buf.length, this[
|
|
129807
|
+
this.buf = Buffer.allocUnsafe(e), this.offset = 0, this.pos = 0, this.remain = this.stat.size, this.length = this.buf.length, this[ti]();
|
|
129576
129808
|
}
|
|
129577
|
-
[
|
|
129809
|
+
[ti]() {
|
|
129578
129810
|
let { fd: t, buf: e, offset: i, length: r, pos: n } = this;
|
|
129579
129811
|
if (t === void 0 || e === void 0) throw new Error("cannot read file without first opening");
|
|
129580
129812
|
$.read(t, e, i, r, n, (o, h) => {
|
|
129581
129813
|
if (o) return this[pt](() => this.emit("error", o));
|
|
129582
|
-
this[
|
|
129814
|
+
this[Ji](h);
|
|
129583
129815
|
});
|
|
129584
129816
|
}
|
|
129585
129817
|
[pt](t = () => {
|
|
129586
129818
|
}) {
|
|
129587
129819
|
this.fd !== void 0 && $.close(this.fd, t);
|
|
129588
129820
|
}
|
|
129589
|
-
[
|
|
129821
|
+
[Ji](t) {
|
|
129590
129822
|
if (t <= 0 && this.remain > 0) {
|
|
129591
129823
|
let r = Object.assign(new Error("encountered unexpected EOF"), { path: this.absolute, syscall: "read", code: "EOF" });
|
|
129592
129824
|
return this[pt](() => this.emit("error", r));
|
|
@@ -129598,9 +129830,9 @@ var de = class extends A {
|
|
|
129598
129830
|
if (!this.buf) throw new Error("should have created buffer prior to reading");
|
|
129599
129831
|
if (t === this.remain) for (let r = t; r < this.length && t < this.blockRemain; r++) this.buf[r + this.offset] = 0, t++, this.remain++;
|
|
129600
129832
|
let e = this.offset === 0 && t === this.buf.length ? this.buf : this.buf.subarray(this.offset, this.offset + t);
|
|
129601
|
-
this.write(e) ? this[
|
|
129833
|
+
this.write(e) ? this[qi]() : this[ss](() => this[qi]());
|
|
129602
129834
|
}
|
|
129603
|
-
[
|
|
129835
|
+
[ss](t) {
|
|
129604
129836
|
this.once("drain", t);
|
|
129605
129837
|
}
|
|
129606
129838
|
write(t, e, i) {
|
|
@@ -129610,30 +129842,30 @@ var de = class extends A {
|
|
|
129610
129842
|
}
|
|
129611
129843
|
return this.remain -= t.length, this.blockRemain -= t.length, this.pos += t.length, this.offset += t.length, super.write(t, null, i);
|
|
129612
129844
|
}
|
|
129613
|
-
[
|
|
129845
|
+
[qi]() {
|
|
129614
129846
|
if (!this.remain) return this.blockRemain && super.write(Buffer.alloc(this.blockRemain)), this[pt]((t) => t ? this.emit("error", t) : this.end());
|
|
129615
129847
|
if (!this.buf) throw new Error("buffer lost somehow in ONDRAIN");
|
|
129616
|
-
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[
|
|
129848
|
+
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]();
|
|
129617
129849
|
}
|
|
129618
129850
|
};
|
|
129619
|
-
var
|
|
129851
|
+
var si = class extends de {
|
|
129620
129852
|
sync = true;
|
|
129621
|
-
[
|
|
129622
|
-
this[
|
|
129853
|
+
[Qi]() {
|
|
129854
|
+
this[ei]($.lstatSync(this.absolute));
|
|
129623
129855
|
}
|
|
129624
|
-
[
|
|
129625
|
-
this[
|
|
129856
|
+
[ji]() {
|
|
129857
|
+
this[ts]($.readlinkSync(this.absolute));
|
|
129626
129858
|
}
|
|
129627
|
-
[
|
|
129628
|
-
this[
|
|
129859
|
+
[es]() {
|
|
129860
|
+
this[is]($.openSync(this.absolute, "r"));
|
|
129629
129861
|
}
|
|
129630
|
-
[
|
|
129862
|
+
[ti]() {
|
|
129631
129863
|
let t = true;
|
|
129632
129864
|
try {
|
|
129633
129865
|
let { fd: e, buf: i, offset: r, length: n, pos: o } = this;
|
|
129634
129866
|
if (e === void 0 || i === void 0) throw new Error("fd and buf must be set in READ method");
|
|
129635
129867
|
let h = $.readSync(e, i, r, n, o);
|
|
129636
|
-
this[
|
|
129868
|
+
this[Ji](h), t = false;
|
|
129637
129869
|
} finally {
|
|
129638
129870
|
if (t) try {
|
|
129639
129871
|
this[pt](() => {
|
|
@@ -129642,7 +129874,7 @@ var ii = class extends de {
|
|
|
129642
129874
|
}
|
|
129643
129875
|
}
|
|
129644
129876
|
}
|
|
129645
|
-
[
|
|
129877
|
+
[ss](t) {
|
|
129646
129878
|
t();
|
|
129647
129879
|
}
|
|
129648
129880
|
[pt](t = () => {
|
|
@@ -129650,7 +129882,7 @@ var ii = class extends de {
|
|
|
129650
129882
|
this.fd !== void 0 && $.closeSync(this.fd), t();
|
|
129651
129883
|
}
|
|
129652
129884
|
};
|
|
129653
|
-
var
|
|
129885
|
+
var ri = class extends D {
|
|
129654
129886
|
blockLen = 0;
|
|
129655
129887
|
blockRemain = 0;
|
|
129656
129888
|
buf = 0;
|
|
@@ -129686,7 +129918,7 @@ var si = class extends A {
|
|
|
129686
129918
|
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;
|
|
129687
129919
|
let { type: r } = t;
|
|
129688
129920
|
if (r === "Unsupported") throw new Error("writing entry that should be ignored");
|
|
129689
|
-
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[
|
|
129921
|
+
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);
|
|
129690
129922
|
let n = false;
|
|
129691
129923
|
if (!this.preservePaths) {
|
|
129692
129924
|
let [h, a] = ce(this.path);
|
|
@@ -129698,10 +129930,10 @@ var si = class extends A {
|
|
|
129698
129930
|
super.write(o), t.pipe(this);
|
|
129699
129931
|
}
|
|
129700
129932
|
[X](t) {
|
|
129701
|
-
return
|
|
129933
|
+
return Js(t, this.prefix);
|
|
129702
129934
|
}
|
|
129703
|
-
[
|
|
129704
|
-
return
|
|
129935
|
+
[ii](t) {
|
|
129936
|
+
return Vi(t, this.type === "Directory", this.portable);
|
|
129705
129937
|
}
|
|
129706
129938
|
write(t, e, i) {
|
|
129707
129939
|
typeof e == "function" && (i = e, e = void 0), typeof t == "string" && (t = Buffer.from(t, typeof e == "string" ? e : "utf8"));
|
|
@@ -129713,8 +129945,8 @@ var si = class extends A {
|
|
|
129713
129945
|
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;
|
|
129714
129946
|
}
|
|
129715
129947
|
};
|
|
129716
|
-
var
|
|
129717
|
-
var
|
|
129948
|
+
var Dn = (s3) => s3.isFile() ? "File" : s3.isDirectory() ? "Directory" : s3.isSymbolicLink() ? "SymbolicLink" : "Unsupported";
|
|
129949
|
+
var ni = class s2 {
|
|
129718
129950
|
tail;
|
|
129719
129951
|
head;
|
|
129720
129952
|
length = 0;
|
|
@@ -129745,11 +129977,11 @@ var ri = class s2 {
|
|
|
129745
129977
|
t.list = this, t.prev = e, e && (e.next = t), this.tail = t, this.head || (this.head = t), this.length++;
|
|
129746
129978
|
}
|
|
129747
129979
|
push(...t) {
|
|
129748
|
-
for (let e = 0, i = t.length; e < i; e++)
|
|
129980
|
+
for (let e = 0, i = t.length; e < i; e++) Cn(this, t[e]);
|
|
129749
129981
|
return this.length;
|
|
129750
129982
|
}
|
|
129751
129983
|
unshift(...t) {
|
|
129752
|
-
for (var e = 0, i = t.length; e < i; e++)
|
|
129984
|
+
for (var e = 0, i = t.length; e < i; e++) Fn(this, t[e]);
|
|
129753
129985
|
return this.length;
|
|
129754
129986
|
}
|
|
129755
129987
|
pop() {
|
|
@@ -129845,7 +130077,7 @@ var ri = class s2 {
|
|
|
129845
130077
|
let n = [];
|
|
129846
130078
|
for (let o = 0; r && o < e; o++) n.push(r.value), r = this.removeNode(r);
|
|
129847
130079
|
r ? r !== this.tail && (r = r.prev) : r = this.tail;
|
|
129848
|
-
for (let o of i) r =
|
|
130080
|
+
for (let o of i) r = In(this, r, o);
|
|
129849
130081
|
return n;
|
|
129850
130082
|
}
|
|
129851
130083
|
reverse() {
|
|
@@ -129857,14 +130089,14 @@ var ri = class s2 {
|
|
|
129857
130089
|
return this.head = e, this.tail = t, this;
|
|
129858
130090
|
}
|
|
129859
130091
|
};
|
|
129860
|
-
function
|
|
130092
|
+
function In(s3, t, e) {
|
|
129861
130093
|
let i = t, r = t ? t.next : s3.head, n = new ue(e, i, r, s3);
|
|
129862
130094
|
return n.next === void 0 && (s3.tail = n), n.prev === void 0 && (s3.head = n), s3.length++, n;
|
|
129863
130095
|
}
|
|
129864
|
-
function
|
|
130096
|
+
function Cn(s3, t) {
|
|
129865
130097
|
s3.tail = new ue(t, s3.tail, void 0, s3), s3.head || (s3.head = s3.tail), s3.length++;
|
|
129866
130098
|
}
|
|
129867
|
-
function
|
|
130099
|
+
function Fn(s3, t) {
|
|
129868
130100
|
s3.head = new ue(t, void 0, s3.head, s3), s3.tail || (s3.tail = s3.head), s3.length++;
|
|
129869
130101
|
}
|
|
129870
130102
|
var ue = class {
|
|
@@ -129876,7 +130108,7 @@ var ue = class {
|
|
|
129876
130108
|
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;
|
|
129877
130109
|
}
|
|
129878
130110
|
};
|
|
129879
|
-
var
|
|
130111
|
+
var di = class {
|
|
129880
130112
|
path;
|
|
129881
130113
|
absolute;
|
|
129882
130114
|
entry;
|
|
@@ -129889,28 +130121,28 @@ var fi = class {
|
|
|
129889
130121
|
this.path = t || "./", this.absolute = e;
|
|
129890
130122
|
}
|
|
129891
130123
|
};
|
|
129892
|
-
var
|
|
129893
|
-
var
|
|
130124
|
+
var tr = Buffer.alloc(1024);
|
|
130125
|
+
var oi = /* @__PURE__ */ Symbol("onStat");
|
|
129894
130126
|
var me = /* @__PURE__ */ Symbol("ended");
|
|
129895
130127
|
var W = /* @__PURE__ */ Symbol("queue");
|
|
129896
130128
|
var Ct = /* @__PURE__ */ Symbol("current");
|
|
129897
130129
|
var Ft = /* @__PURE__ */ Symbol("process");
|
|
129898
130130
|
var pe = /* @__PURE__ */ Symbol("processing");
|
|
129899
|
-
var
|
|
130131
|
+
var rs = /* @__PURE__ */ Symbol("processJob");
|
|
129900
130132
|
var G = /* @__PURE__ */ Symbol("jobs");
|
|
129901
|
-
var
|
|
129902
|
-
var
|
|
129903
|
-
var
|
|
129904
|
-
var
|
|
129905
|
-
var
|
|
129906
|
-
var
|
|
129907
|
-
var
|
|
129908
|
-
var
|
|
129909
|
-
var
|
|
129910
|
-
var
|
|
129911
|
-
var
|
|
129912
|
-
var
|
|
129913
|
-
var Et = class extends
|
|
130133
|
+
var ns = /* @__PURE__ */ Symbol("jobDone");
|
|
130134
|
+
var hi = /* @__PURE__ */ Symbol("addFSEntry");
|
|
130135
|
+
var er = /* @__PURE__ */ Symbol("addTarEntry");
|
|
130136
|
+
var as = /* @__PURE__ */ Symbol("stat");
|
|
130137
|
+
var ls = /* @__PURE__ */ Symbol("readdir");
|
|
130138
|
+
var ai = /* @__PURE__ */ Symbol("onreaddir");
|
|
130139
|
+
var li = /* @__PURE__ */ Symbol("pipe");
|
|
130140
|
+
var ir = /* @__PURE__ */ Symbol("entry");
|
|
130141
|
+
var os5 = /* @__PURE__ */ Symbol("entryOpt");
|
|
130142
|
+
var ci = /* @__PURE__ */ Symbol("writeEntryClass");
|
|
130143
|
+
var rr = /* @__PURE__ */ Symbol("write");
|
|
130144
|
+
var hs = /* @__PURE__ */ Symbol("ondrain");
|
|
130145
|
+
var Et = class extends D {
|
|
129914
130146
|
sync = false;
|
|
129915
130147
|
opt;
|
|
129916
130148
|
cwd;
|
|
@@ -129931,22 +130163,22 @@ var Et = class extends A {
|
|
|
129931
130163
|
mtime;
|
|
129932
130164
|
filter;
|
|
129933
130165
|
jobs;
|
|
129934
|
-
[
|
|
130166
|
+
[ci];
|
|
129935
130167
|
onWriteEntry;
|
|
129936
130168
|
[W];
|
|
129937
130169
|
[G] = 0;
|
|
129938
130170
|
[pe] = false;
|
|
129939
130171
|
[me] = false;
|
|
129940
130172
|
constructor(t = {}) {
|
|
129941
|
-
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[
|
|
130173
|
+
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) {
|
|
129942
130174
|
if ((t.gzip ? 1 : 0) + (t.brotli ? 1 : 0) + (t.zstd ? 1 : 0) > 1) throw new TypeError("gzip, brotli, zstd are mutually exclusive");
|
|
129943
|
-
if (t.gzip && (typeof t.gzip != "object" && (t.gzip = {}), this.portable && (t.gzip.portable = true), this.zip = new
|
|
130175
|
+
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");
|
|
129944
130176
|
let e = this.zip;
|
|
129945
|
-
e.on("data", (i) => super.write(i)), e.on("end", () => super.end()), e.on("drain", () => this[
|
|
129946
|
-
} else this.on("drain", this[
|
|
129947
|
-
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
|
|
130177
|
+
e.on("data", (i) => super.write(i)), e.on("end", () => super.end()), e.on("drain", () => this[hs]()), this.on("resume", () => e.resume());
|
|
130178
|
+
} else this.on("drain", this[hs]);
|
|
130179
|
+
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;
|
|
129948
130180
|
}
|
|
129949
|
-
[
|
|
130181
|
+
[rr](t) {
|
|
129950
130182
|
return super.write(t);
|
|
129951
130183
|
}
|
|
129952
130184
|
add(t) {
|
|
@@ -129957,97 +130189,97 @@ var Et = class extends A {
|
|
|
129957
130189
|
}
|
|
129958
130190
|
write(t) {
|
|
129959
130191
|
if (this[me]) throw new Error("write after end");
|
|
129960
|
-
return t instanceof Yt ? this[
|
|
130192
|
+
return t instanceof Yt ? this[er](t) : this[hi](t), this.flowing;
|
|
129961
130193
|
}
|
|
129962
|
-
[
|
|
129963
|
-
let e = f(
|
|
130194
|
+
[er](t) {
|
|
130195
|
+
let e = f(sr.resolve(this.cwd, t.path));
|
|
129964
130196
|
if (!this.filter(t.path, t)) t.resume();
|
|
129965
130197
|
else {
|
|
129966
|
-
let i = new
|
|
129967
|
-
i.entry = new
|
|
130198
|
+
let i = new di(t.path, e);
|
|
130199
|
+
i.entry = new ri(t, this[os5](i)), i.entry.on("end", () => this[ns](i)), this[G] += 1, this[W].push(i);
|
|
129968
130200
|
}
|
|
129969
130201
|
this[Ft]();
|
|
129970
130202
|
}
|
|
129971
|
-
[
|
|
129972
|
-
let e = f(
|
|
129973
|
-
this[W].push(new
|
|
130203
|
+
[hi](t) {
|
|
130204
|
+
let e = f(sr.resolve(this.cwd, t));
|
|
130205
|
+
this[W].push(new di(t, e)), this[Ft]();
|
|
129974
130206
|
}
|
|
129975
|
-
[
|
|
130207
|
+
[as](t) {
|
|
129976
130208
|
t.pending = true, this[G] += 1;
|
|
129977
130209
|
let e = this.follow ? "stat" : "lstat";
|
|
129978
|
-
|
|
129979
|
-
t.pending = false, this[G] -= 1, i ? this.emit("error", i) : this[
|
|
130210
|
+
fi[e](t.absolute, (i, r) => {
|
|
130211
|
+
t.pending = false, this[G] -= 1, i ? this.emit("error", i) : this[oi](t, r);
|
|
129980
130212
|
});
|
|
129981
130213
|
}
|
|
129982
|
-
[
|
|
129983
|
-
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[
|
|
130214
|
+
[oi](t, e) {
|
|
130215
|
+
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]();
|
|
129984
130216
|
}
|
|
129985
|
-
[
|
|
129986
|
-
t.pending = true, this[G] += 1,
|
|
130217
|
+
[ls](t) {
|
|
130218
|
+
t.pending = true, this[G] += 1, fi.readdir(t.absolute, (e, i) => {
|
|
129987
130219
|
if (t.pending = false, this[G] -= 1, e) return this.emit("error", e);
|
|
129988
|
-
this[
|
|
130220
|
+
this[ai](t, i);
|
|
129989
130221
|
});
|
|
129990
130222
|
}
|
|
129991
|
-
[
|
|
130223
|
+
[ai](t, e) {
|
|
129992
130224
|
this.readdirCache.set(t.absolute, e), t.readdir = e, this[Ft]();
|
|
129993
130225
|
}
|
|
129994
130226
|
[Ft]() {
|
|
129995
130227
|
if (!this[pe]) {
|
|
129996
130228
|
this[pe] = true;
|
|
129997
|
-
for (let t = this[W].head; t && this[G] < this.jobs; t = t.next) if (this[
|
|
130229
|
+
for (let t = this[W].head; t && this[G] < this.jobs; t = t.next) if (this[rs](t.value), t.value.ignore) {
|
|
129998
130230
|
let e = t.next;
|
|
129999
130231
|
this[W].removeNode(t), t.next = e;
|
|
130000
130232
|
}
|
|
130001
|
-
this[pe] = false, this[me] &&
|
|
130233
|
+
this[pe] = false, this[me] && this[W].length === 0 && this[G] === 0 && (this.zip ? this.zip.end(tr) : (super.write(tr), super.end()));
|
|
130002
130234
|
}
|
|
130003
130235
|
}
|
|
130004
130236
|
get [Ct]() {
|
|
130005
130237
|
return this[W] && this[W].head && this[W].head.value;
|
|
130006
130238
|
}
|
|
130007
|
-
[
|
|
130239
|
+
[ns](t) {
|
|
130008
130240
|
this[W].shift(), this[G] -= 1, this[Ft]();
|
|
130009
130241
|
}
|
|
130010
|
-
[
|
|
130242
|
+
[rs](t) {
|
|
130011
130243
|
if (!t.pending) {
|
|
130012
130244
|
if (t.entry) {
|
|
130013
|
-
t === this[Ct] && !t.piped && this[
|
|
130245
|
+
t === this[Ct] && !t.piped && this[li](t);
|
|
130014
130246
|
return;
|
|
130015
130247
|
}
|
|
130016
130248
|
if (!t.stat) {
|
|
130017
130249
|
let e = this.statCache.get(t.absolute);
|
|
130018
|
-
e ? this[
|
|
130250
|
+
e ? this[oi](t, e) : this[as](t);
|
|
130019
130251
|
}
|
|
130020
130252
|
if (t.stat && !t.ignore) {
|
|
130021
130253
|
if (!this.noDirRecurse && t.stat.isDirectory() && !t.readdir) {
|
|
130022
130254
|
let e = this.readdirCache.get(t.absolute);
|
|
130023
|
-
if (e ? this[
|
|
130255
|
+
if (e ? this[ai](t, e) : this[ls](t), !t.readdir) return;
|
|
130024
130256
|
}
|
|
130025
|
-
if (t.entry = this[
|
|
130257
|
+
if (t.entry = this[ir](t), !t.entry) {
|
|
130026
130258
|
t.ignore = true;
|
|
130027
130259
|
return;
|
|
130028
130260
|
}
|
|
130029
|
-
t === this[Ct] && !t.piped && this[
|
|
130261
|
+
t === this[Ct] && !t.piped && this[li](t);
|
|
130030
130262
|
}
|
|
130031
130263
|
}
|
|
130032
130264
|
}
|
|
130033
|
-
[
|
|
130265
|
+
[os5](t) {
|
|
130034
130266
|
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 };
|
|
130035
130267
|
}
|
|
130036
|
-
[
|
|
130268
|
+
[ir](t) {
|
|
130037
130269
|
this[G] += 1;
|
|
130038
130270
|
try {
|
|
130039
|
-
return new this[
|
|
130271
|
+
return new this[ci](t.path, this[os5](t)).on("end", () => this[ns](t)).on("error", (i) => this.emit("error", i));
|
|
130040
130272
|
} catch (e) {
|
|
130041
130273
|
this.emit("error", e);
|
|
130042
130274
|
}
|
|
130043
130275
|
}
|
|
130044
|
-
[
|
|
130276
|
+
[hs]() {
|
|
130045
130277
|
this[Ct] && this[Ct].entry && this[Ct].entry.resume();
|
|
130046
130278
|
}
|
|
130047
|
-
[
|
|
130279
|
+
[li](t) {
|
|
130048
130280
|
t.piped = true, t.readdir && t.readdir.forEach((r) => {
|
|
130049
130281
|
let n = t.path, o = n === "./" ? "" : n.replace(/\/*$/, "/");
|
|
130050
|
-
this[
|
|
130282
|
+
this[hi](o + r);
|
|
130051
130283
|
});
|
|
130052
130284
|
let e = t.entry, i = this.zip;
|
|
130053
130285
|
if (!e) throw new Error("cannot pipe without source");
|
|
@@ -130067,131 +130299,128 @@ var Et = class extends A {
|
|
|
130067
130299
|
var kt = class extends Et {
|
|
130068
130300
|
sync = true;
|
|
130069
130301
|
constructor(t) {
|
|
130070
|
-
super(t), this[
|
|
130302
|
+
super(t), this[ci] = si;
|
|
130071
130303
|
}
|
|
130072
130304
|
pause() {
|
|
130073
130305
|
}
|
|
130074
130306
|
resume() {
|
|
130075
130307
|
}
|
|
130076
|
-
[
|
|
130308
|
+
[as](t) {
|
|
130077
130309
|
let e = this.follow ? "statSync" : "lstatSync";
|
|
130078
|
-
this[
|
|
130310
|
+
this[oi](t, fi[e](t.absolute));
|
|
130079
130311
|
}
|
|
130080
|
-
[
|
|
130081
|
-
this[
|
|
130312
|
+
[ls](t) {
|
|
130313
|
+
this[ai](t, fi.readdirSync(t.absolute));
|
|
130082
130314
|
}
|
|
130083
|
-
[
|
|
130315
|
+
[li](t) {
|
|
130084
130316
|
let e = t.entry, i = this.zip;
|
|
130085
130317
|
if (t.readdir && t.readdir.forEach((r) => {
|
|
130086
130318
|
let n = t.path, o = n === "./" ? "" : n.replace(/\/*$/, "/");
|
|
130087
|
-
this[
|
|
130319
|
+
this[hi](o + r);
|
|
130088
130320
|
}), !e) throw new Error("Cannot pipe without source");
|
|
130089
130321
|
i ? e.on("data", (r) => {
|
|
130090
130322
|
i.write(r);
|
|
130091
130323
|
}) : e.on("data", (r) => {
|
|
130092
|
-
super[
|
|
130324
|
+
super[rr](r);
|
|
130093
130325
|
});
|
|
130094
130326
|
}
|
|
130095
130327
|
};
|
|
130096
|
-
var
|
|
130328
|
+
var kn = (s3, t) => {
|
|
130097
130329
|
let e = new kt(s3), i = new Wt(s3.file, { mode: s3.mode || 438 });
|
|
130098
|
-
e.pipe(i),
|
|
130330
|
+
e.pipe(i), or(e, t);
|
|
130099
130331
|
};
|
|
130100
|
-
var
|
|
130332
|
+
var vn = (s3, t) => {
|
|
130101
130333
|
let e = new Et(s3), i = new tt(s3.file, { mode: s3.mode || 438 });
|
|
130102
130334
|
e.pipe(i);
|
|
130103
130335
|
let r = new Promise((n, o) => {
|
|
130104
130336
|
i.on("error", o), i.on("close", n), e.on("error", o);
|
|
130105
130337
|
});
|
|
130106
|
-
return
|
|
130338
|
+
return hr(e, t).catch((n) => e.emit("error", n)), r;
|
|
130107
130339
|
};
|
|
130108
|
-
var
|
|
130340
|
+
var or = (s3, t) => {
|
|
130109
130341
|
t.forEach((e) => {
|
|
130110
|
-
e.charAt(0) === "@" ? It({ file:
|
|
130342
|
+
e.charAt(0) === "@" ? It({ file: nr.resolve(s3.cwd, e.slice(1)), sync: true, noResume: true, onReadEntry: (i) => s3.add(i) }) : s3.add(e);
|
|
130111
130343
|
}), s3.end();
|
|
130112
130344
|
};
|
|
130113
|
-
var
|
|
130114
|
-
for (let e
|
|
130115
|
-
|
|
130116
|
-
|
|
130117
|
-
s3.add(r);
|
|
130118
|
-
} }) : s3.add(i);
|
|
130119
|
-
}
|
|
130345
|
+
var hr = async (s3, t) => {
|
|
130346
|
+
for (let e of t) e.charAt(0) === "@" ? await It({ file: nr.resolve(String(s3.cwd), e.slice(1)), noResume: true, onReadEntry: (i) => {
|
|
130347
|
+
s3.add(i);
|
|
130348
|
+
} }) : s3.add(e);
|
|
130120
130349
|
s3.end();
|
|
130121
130350
|
};
|
|
130122
|
-
var
|
|
130351
|
+
var Mn = (s3, t) => {
|
|
130123
130352
|
let e = new kt(s3);
|
|
130124
|
-
return
|
|
130353
|
+
return or(e, t), e;
|
|
130125
130354
|
};
|
|
130126
|
-
var
|
|
130355
|
+
var Bn = (s3, t) => {
|
|
130127
130356
|
let e = new Et(s3);
|
|
130128
|
-
return
|
|
130357
|
+
return hr(e, t).catch((i) => e.emit("error", i)), e;
|
|
130129
130358
|
};
|
|
130130
|
-
var
|
|
130359
|
+
var Pn = K(kn, vn, Mn, Bn, (s3, t) => {
|
|
130131
130360
|
if (!t?.length) throw new TypeError("no paths specified to add to archive");
|
|
130132
130361
|
});
|
|
130133
|
-
var
|
|
130134
|
-
var
|
|
130135
|
-
var { O_CREAT:
|
|
130136
|
-
var
|
|
130137
|
-
var
|
|
130138
|
-
var
|
|
130139
|
-
var
|
|
130140
|
-
var
|
|
130141
|
-
var
|
|
130362
|
+
var zn = process.env.__FAKE_PLATFORM__ || process.platform;
|
|
130363
|
+
var Un = zn === "win32";
|
|
130364
|
+
var { O_CREAT: Hn, O_TRUNC: Wn, O_WRONLY: Gn } = ar.constants;
|
|
130365
|
+
var lr = Number(process.env.__FAKE_FS_O_FILENAME__) || ar.constants.UV_FS_O_FILEMAP || 0;
|
|
130366
|
+
var Zn = Un && !!lr;
|
|
130367
|
+
var Yn = 512 * 1024;
|
|
130368
|
+
var Kn = lr | Wn | Hn | Gn;
|
|
130369
|
+
var cs = Zn ? (s3) => s3 < Yn ? Kn : "w" : () => "w";
|
|
130370
|
+
var fs3 = (s3, t, e) => {
|
|
130142
130371
|
try {
|
|
130143
|
-
return
|
|
130372
|
+
return mi.lchownSync(s3, t, e);
|
|
130144
130373
|
} catch (i) {
|
|
130145
130374
|
if (i?.code !== "ENOENT") throw i;
|
|
130146
130375
|
}
|
|
130147
130376
|
};
|
|
130148
|
-
var
|
|
130149
|
-
|
|
130377
|
+
var ui = (s3, t, e, i) => {
|
|
130378
|
+
mi.lchown(s3, t, e, (r) => {
|
|
130150
130379
|
i(r && r?.code !== "ENOENT" ? r : null);
|
|
130151
130380
|
});
|
|
130152
130381
|
};
|
|
130153
|
-
var
|
|
130154
|
-
if (t.isDirectory())
|
|
130382
|
+
var Vn = (s3, t, e, i, r) => {
|
|
130383
|
+
if (t.isDirectory()) ds(Ee.resolve(s3, t.name), e, i, (n) => {
|
|
130155
130384
|
if (n) return r(n);
|
|
130156
130385
|
let o = Ee.resolve(s3, t.name);
|
|
130157
|
-
|
|
130386
|
+
ui(o, e, i, r);
|
|
130158
130387
|
});
|
|
130159
130388
|
else {
|
|
130160
130389
|
let n = Ee.resolve(s3, t.name);
|
|
130161
|
-
|
|
130390
|
+
ui(n, e, i, r);
|
|
130162
130391
|
}
|
|
130163
130392
|
};
|
|
130164
|
-
var
|
|
130165
|
-
|
|
130393
|
+
var ds = (s3, t, e, i) => {
|
|
130394
|
+
mi.readdir(s3, { withFileTypes: true }, (r, n) => {
|
|
130166
130395
|
if (r) {
|
|
130167
130396
|
if (r.code === "ENOENT") return i();
|
|
130168
130397
|
if (r.code !== "ENOTDIR" && r.code !== "ENOTSUP") return i(r);
|
|
130169
130398
|
}
|
|
130170
|
-
if (r || !n.length) return
|
|
130399
|
+
if (r || !n.length) return ui(s3, t, e, i);
|
|
130171
130400
|
let o = n.length, h = null, a = (l) => {
|
|
130172
130401
|
if (!h) {
|
|
130173
130402
|
if (l) return i(h = l);
|
|
130174
|
-
if (--o === 0) return
|
|
130403
|
+
if (--o === 0) return ui(s3, t, e, i);
|
|
130175
130404
|
}
|
|
130176
130405
|
};
|
|
130177
|
-
for (let l of n)
|
|
130406
|
+
for (let l of n) Vn(s3, l, t, e, a);
|
|
130178
130407
|
});
|
|
130179
130408
|
};
|
|
130180
|
-
var
|
|
130181
|
-
t.isDirectory() &&
|
|
130409
|
+
var $n = (s3, t, e, i) => {
|
|
130410
|
+
t.isDirectory() && us(Ee.resolve(s3, t.name), e, i), fs3(Ee.resolve(s3, t.name), e, i);
|
|
130182
130411
|
};
|
|
130183
|
-
var
|
|
130412
|
+
var us = (s3, t, e) => {
|
|
130184
130413
|
let i;
|
|
130185
130414
|
try {
|
|
130186
|
-
i =
|
|
130415
|
+
i = mi.readdirSync(s3, { withFileTypes: true });
|
|
130187
130416
|
} catch (r) {
|
|
130188
130417
|
let n = r;
|
|
130189
130418
|
if (n?.code === "ENOENT") return;
|
|
130190
|
-
if (n?.code === "ENOTDIR" || n?.code === "ENOTSUP") return
|
|
130419
|
+
if (n?.code === "ENOTDIR" || n?.code === "ENOTSUP") return fs3(s3, t, e);
|
|
130191
130420
|
throw n;
|
|
130192
130421
|
}
|
|
130193
|
-
for (let r of i)
|
|
130194
|
-
return
|
|
130422
|
+
for (let r of i) $n(s3, r, t, e);
|
|
130423
|
+
return fs3(s3, t, e);
|
|
130195
130424
|
};
|
|
130196
130425
|
var we = class extends Error {
|
|
130197
130426
|
path;
|
|
@@ -130216,41 +130445,41 @@ var wt = class extends Error {
|
|
|
130216
130445
|
return "SymlinkError";
|
|
130217
130446
|
}
|
|
130218
130447
|
};
|
|
130219
|
-
var
|
|
130448
|
+
var qn = (s3, t) => {
|
|
130220
130449
|
k.stat(s3, (e, i) => {
|
|
130221
130450
|
(e || !i.isDirectory()) && (e = new we(s3, e?.code || "ENOTDIR")), t(e);
|
|
130222
130451
|
});
|
|
130223
130452
|
};
|
|
130224
|
-
var
|
|
130453
|
+
var cr = (s3, t, e) => {
|
|
130225
130454
|
s3 = f(s3);
|
|
130226
130455
|
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) => {
|
|
130227
|
-
E ? e(E) : x && a ?
|
|
130456
|
+
E ? e(E) : x && a ? ds(x, o, h, (xe) => S(xe)) : n ? k.chmod(s3, r, e) : e();
|
|
130228
130457
|
};
|
|
130229
|
-
if (s3 === d) return
|
|
130230
|
-
if (l) return
|
|
130231
|
-
let N = f(
|
|
130232
|
-
|
|
130458
|
+
if (s3 === d) return qn(s3, S);
|
|
130459
|
+
if (l) return Xn.mkdir(s3, { mode: r, recursive: true }).then((E) => S(null, E ?? void 0), S);
|
|
130460
|
+
let N = f(pi.relative(d, s3)).split("/");
|
|
130461
|
+
ms(d, N, r, c, d, void 0, S);
|
|
130233
130462
|
};
|
|
130234
|
-
var
|
|
130235
|
-
if (
|
|
130236
|
-
let h = t.shift(), a = f(
|
|
130237
|
-
k.mkdir(a, e,
|
|
130463
|
+
var ms = (s3, t, e, i, r, n, o) => {
|
|
130464
|
+
if (t.length === 0) return o(null, n);
|
|
130465
|
+
let h = t.shift(), a = f(pi.resolve(s3 + "/" + h));
|
|
130466
|
+
k.mkdir(a, e, fr(a, t, e, i, r, n, o));
|
|
130238
130467
|
};
|
|
130239
|
-
var
|
|
130468
|
+
var fr = (s3, t, e, i, r, n, o) => (h) => {
|
|
130240
130469
|
h ? k.lstat(s3, (a, l) => {
|
|
130241
130470
|
if (a) a.path = a.path && f(a.path), o(a);
|
|
130242
|
-
else if (l.isDirectory())
|
|
130471
|
+
else if (l.isDirectory()) ms(s3, t, e, i, r, n, o);
|
|
130243
130472
|
else if (i) k.unlink(s3, (c) => {
|
|
130244
130473
|
if (c) return o(c);
|
|
130245
|
-
k.mkdir(s3, e,
|
|
130474
|
+
k.mkdir(s3, e, fr(s3, t, e, i, r, n, o));
|
|
130246
130475
|
});
|
|
130247
130476
|
else {
|
|
130248
130477
|
if (l.isSymbolicLink()) return o(new wt(s3, s3 + "/" + t.join("/")));
|
|
130249
130478
|
o(h);
|
|
130250
130479
|
}
|
|
130251
|
-
}) : (n = n || s3,
|
|
130480
|
+
}) : (n = n || s3, ms(s3, t, e, i, r, n, o));
|
|
130252
130481
|
};
|
|
130253
|
-
var
|
|
130482
|
+
var jn = (s3) => {
|
|
130254
130483
|
let t = false, e;
|
|
130255
130484
|
try {
|
|
130256
130485
|
t = k.statSync(s3).isDirectory();
|
|
@@ -130260,53 +130489,53 @@ var Qn = (s3) => {
|
|
|
130260
130489
|
if (!t) throw new we(s3, e ?? "ENOTDIR");
|
|
130261
130490
|
}
|
|
130262
130491
|
};
|
|
130263
|
-
var
|
|
130492
|
+
var dr = (s3, t) => {
|
|
130264
130493
|
s3 = f(s3);
|
|
130265
130494
|
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) => {
|
|
130266
|
-
E && h &&
|
|
130495
|
+
E && h && us(E, n, o), r && k.chmodSync(s3, i);
|
|
130267
130496
|
};
|
|
130268
|
-
if (s3 === c) return
|
|
130497
|
+
if (s3 === c) return jn(c), d();
|
|
130269
130498
|
if (a) return d(k.mkdirSync(s3, { mode: i, recursive: true }) ?? void 0);
|
|
130270
|
-
let T = f(
|
|
130499
|
+
let T = f(pi.relative(c, s3)).split("/"), N;
|
|
130271
130500
|
for (let E = T.shift(), x = c; E && (x += "/" + E); E = T.shift()) {
|
|
130272
|
-
x = f(
|
|
130501
|
+
x = f(pi.resolve(x));
|
|
130273
130502
|
try {
|
|
130274
130503
|
k.mkdirSync(x, i), N = N || x;
|
|
130275
130504
|
} catch {
|
|
130276
|
-
let
|
|
130277
|
-
if (
|
|
130505
|
+
let xe = k.lstatSync(x);
|
|
130506
|
+
if (xe.isDirectory()) continue;
|
|
130278
130507
|
if (l) {
|
|
130279
130508
|
k.unlinkSync(x), k.mkdirSync(x, i), N = N || x;
|
|
130280
130509
|
continue;
|
|
130281
|
-
} else if (
|
|
130510
|
+
} else if (xe.isSymbolicLink()) return new wt(x, x + "/" + T.join("/"));
|
|
130282
130511
|
}
|
|
130283
130512
|
}
|
|
130284
130513
|
return d(N);
|
|
130285
130514
|
};
|
|
130286
|
-
var
|
|
130287
|
-
var
|
|
130515
|
+
var ps = /* @__PURE__ */ Object.create(null);
|
|
130516
|
+
var ur = 1e4;
|
|
130288
130517
|
var $t = /* @__PURE__ */ new Set();
|
|
130289
|
-
var
|
|
130290
|
-
$t.has(s3) ? $t.delete(s3) :
|
|
130291
|
-
let t =
|
|
130292
|
-
if (e >
|
|
130293
|
-
for (let i of $t) if ($t.delete(i), delete
|
|
130518
|
+
var mr = (s3) => {
|
|
130519
|
+
$t.has(s3) ? $t.delete(s3) : ps[s3] = s3.normalize("NFD").toLocaleLowerCase("en").toLocaleUpperCase("en"), $t.add(s3);
|
|
130520
|
+
let t = ps[s3], e = $t.size - ur;
|
|
130521
|
+
if (e > ur / 10) {
|
|
130522
|
+
for (let i of $t) if ($t.delete(i), delete ps[i], --e <= 0) break;
|
|
130294
130523
|
}
|
|
130295
130524
|
return t;
|
|
130296
130525
|
};
|
|
130297
|
-
var
|
|
130298
|
-
var
|
|
130299
|
-
var
|
|
130300
|
-
let r = e
|
|
130301
|
-
return r !== void 0 && (i =
|
|
130526
|
+
var Qn = process.env.TESTING_TAR_FAKE_PLATFORM || process.platform;
|
|
130527
|
+
var Jn = Qn === "win32";
|
|
130528
|
+
var to = (s3) => s3.split("/").slice(0, -1).reduce((e, i) => {
|
|
130529
|
+
let r = e.at(-1);
|
|
130530
|
+
return r !== void 0 && (i = pr(r, i)), e.push(i || "/"), e;
|
|
130302
130531
|
}, []);
|
|
130303
|
-
var
|
|
130532
|
+
var Ei = class {
|
|
130304
130533
|
#t = /* @__PURE__ */ new Map();
|
|
130305
130534
|
#i = /* @__PURE__ */ new Map();
|
|
130306
130535
|
#s = /* @__PURE__ */ new Set();
|
|
130307
130536
|
reserve(t, e) {
|
|
130308
|
-
t =
|
|
130309
|
-
let i = new Set(t.map((r) =>
|
|
130537
|
+
t = Jn ? ["win32 parallelization disabled"] : t.map((r) => mt(pr(mr(r))));
|
|
130538
|
+
let i = new Set(t.map((r) => to(r)).reduce((r, n) => r.concat(n)));
|
|
130310
130539
|
this.#i.set(e, { dirs: i, paths: t });
|
|
130311
130540
|
for (let r of t) {
|
|
130312
130541
|
let n = this.#t.get(r);
|
|
@@ -130316,7 +130545,7 @@ var pi = class {
|
|
|
130316
130545
|
let n = this.#t.get(r);
|
|
130317
130546
|
if (!n) this.#t.set(r, [/* @__PURE__ */ new Set([e])]);
|
|
130318
130547
|
else {
|
|
130319
|
-
let o = n
|
|
130548
|
+
let o = n.at(-1);
|
|
130320
130549
|
o instanceof Set ? o.add(e) : n.push(/* @__PURE__ */ new Set([e]));
|
|
130321
130550
|
}
|
|
130322
130551
|
}
|
|
@@ -130364,55 +130593,55 @@ var pi = class {
|
|
|
130364
130593
|
return this.#s.delete(t), n.forEach((o) => this.#r(o)), true;
|
|
130365
130594
|
}
|
|
130366
130595
|
};
|
|
130367
|
-
var
|
|
130368
|
-
var
|
|
130369
|
-
var
|
|
130370
|
-
var
|
|
130371
|
-
var
|
|
130596
|
+
var Er = () => process.umask();
|
|
130597
|
+
var wr = /* @__PURE__ */ Symbol("onEntry");
|
|
130598
|
+
var ys = /* @__PURE__ */ Symbol("checkFs");
|
|
130599
|
+
var Sr = /* @__PURE__ */ Symbol("checkFs2");
|
|
130600
|
+
var Rs = /* @__PURE__ */ Symbol("isReusable");
|
|
130372
130601
|
var P = /* @__PURE__ */ Symbol("makeFs");
|
|
130373
|
-
var
|
|
130374
|
-
var
|
|
130375
|
-
var
|
|
130376
|
-
var
|
|
130377
|
-
var
|
|
130602
|
+
var bs = /* @__PURE__ */ Symbol("file");
|
|
130603
|
+
var _s = /* @__PURE__ */ Symbol("directory");
|
|
130604
|
+
var Si = /* @__PURE__ */ Symbol("link");
|
|
130605
|
+
var yr = /* @__PURE__ */ Symbol("symlink");
|
|
130606
|
+
var Rr = /* @__PURE__ */ Symbol("hardlink");
|
|
130378
130607
|
var ye = /* @__PURE__ */ Symbol("ensureNoSymlink");
|
|
130379
|
-
var
|
|
130608
|
+
var br = /* @__PURE__ */ Symbol("unsupported");
|
|
130380
130609
|
var _r = /* @__PURE__ */ Symbol("checkPath");
|
|
130381
|
-
var
|
|
130610
|
+
var Es = /* @__PURE__ */ Symbol("stripAbsolutePath");
|
|
130382
130611
|
var St = /* @__PURE__ */ Symbol("mkdir");
|
|
130383
130612
|
var O = /* @__PURE__ */ Symbol("onError");
|
|
130384
|
-
var
|
|
130385
|
-
var
|
|
130613
|
+
var wi = /* @__PURE__ */ Symbol("pending");
|
|
130614
|
+
var gr = /* @__PURE__ */ Symbol("pend");
|
|
130386
130615
|
var Xt = /* @__PURE__ */ Symbol("unpend");
|
|
130387
|
-
var
|
|
130388
|
-
var
|
|
130616
|
+
var ws = /* @__PURE__ */ Symbol("ended");
|
|
130617
|
+
var Ss = /* @__PURE__ */ Symbol("maybeClose");
|
|
130389
130618
|
var gs = /* @__PURE__ */ Symbol("skip");
|
|
130390
130619
|
var Re = /* @__PURE__ */ Symbol("doChown");
|
|
130391
130620
|
var be = /* @__PURE__ */ Symbol("uid");
|
|
130392
|
-
var
|
|
130393
|
-
var
|
|
130394
|
-
var
|
|
130395
|
-
var Oe =
|
|
130396
|
-
var
|
|
130397
|
-
var
|
|
130621
|
+
var _e = /* @__PURE__ */ Symbol("gid");
|
|
130622
|
+
var ge = /* @__PURE__ */ Symbol("checkedCwd");
|
|
130623
|
+
var io = process.env.TESTING_TAR_FAKE_PLATFORM || process.platform;
|
|
130624
|
+
var Oe = io === "win32";
|
|
130625
|
+
var so = 1024;
|
|
130626
|
+
var ro = (s3, t) => {
|
|
130398
130627
|
if (!Oe) return u.unlink(s3, t);
|
|
130399
|
-
let e = s3 + ".DELETE." +
|
|
130628
|
+
let e = s3 + ".DELETE." + Tr(16).toString("hex");
|
|
130400
130629
|
u.rename(s3, e, (i) => {
|
|
130401
130630
|
if (i) return t(i);
|
|
130402
130631
|
u.unlink(e, t);
|
|
130403
130632
|
});
|
|
130404
130633
|
};
|
|
130405
|
-
var
|
|
130634
|
+
var no = (s3) => {
|
|
130406
130635
|
if (!Oe) return u.unlinkSync(s3);
|
|
130407
|
-
let t = s3 + ".DELETE." +
|
|
130636
|
+
let t = s3 + ".DELETE." + Tr(16).toString("hex");
|
|
130408
130637
|
u.renameSync(s3, t), u.unlinkSync(t);
|
|
130409
130638
|
};
|
|
130410
|
-
var
|
|
130639
|
+
var Or = (s3, t, e) => s3 !== void 0 && s3 === s3 >>> 0 ? s3 : t !== void 0 && t === t >>> 0 ? t : e;
|
|
130411
130640
|
var qt = class extends st {
|
|
130412
|
-
[
|
|
130413
|
-
[
|
|
130414
|
-
[
|
|
130415
|
-
reservations = new
|
|
130641
|
+
[ws] = false;
|
|
130642
|
+
[ge] = false;
|
|
130643
|
+
[wi] = 0;
|
|
130644
|
+
reservations = new Ei();
|
|
130416
130645
|
transform;
|
|
130417
130646
|
writable = true;
|
|
130418
130647
|
readable = false;
|
|
@@ -130439,30 +130668,28 @@ var qt = class extends st {
|
|
|
130439
130668
|
chmod;
|
|
130440
130669
|
constructor(t = {}) {
|
|
130441
130670
|
if (t.ondone = () => {
|
|
130442
|
-
this[
|
|
130671
|
+
this[ws] = true, this[Ss]();
|
|
130443
130672
|
}, super(t), this.transform = t.transform, this.chmod = !!t.chmod, typeof t.uid == "number" || typeof t.gid == "number") {
|
|
130444
130673
|
if (typeof t.uid != "number" || typeof t.gid != "number") throw new TypeError("cannot set owner without number uid and gid");
|
|
130445
130674
|
if (t.preserveOwner) throw new TypeError("cannot preserve owner in archive and also set owner explicitly");
|
|
130446
130675
|
this.uid = t.uid, this.gid = t.gid, this.setOwner = true;
|
|
130447
130676
|
} else this.uid = void 0, this.gid = void 0, this.setOwner = false;
|
|
130448
|
-
t.preserveOwner === void 0 && typeof t.uid != "number" ?
|
|
130677
|
+
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(R.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));
|
|
130449
130678
|
}
|
|
130450
130679
|
warn(t, e, i = {}) {
|
|
130451
130680
|
return (t === "TAR_BAD_ARCHIVE" || t === "TAR_ABORT") && (i.recoverable = false), super.warn(t, e, i);
|
|
130452
130681
|
}
|
|
130453
|
-
[
|
|
130454
|
-
this[
|
|
130682
|
+
[Ss]() {
|
|
130683
|
+
this[ws] && this[wi] === 0 && (this.emit("prefinish"), this.emit("finish"), this.emit("end"));
|
|
130455
130684
|
}
|
|
130456
|
-
[
|
|
130685
|
+
[Es](t, e) {
|
|
130457
130686
|
let i = t[e], { type: r } = t;
|
|
130458
130687
|
if (!i || this.preservePaths) return true;
|
|
130459
|
-
let [n, o] = ce(i), h = o.
|
|
130688
|
+
let [n, o] = ce(i), h = o.replaceAll(/\\/g, "/").split("/");
|
|
130460
130689
|
if (h.includes("..") || Oe && /^[a-z]:\.\.$/i.test(h[0] ?? "")) {
|
|
130461
130690
|
if (e === "path" || r === "Link") return this.warn("TAR_ENTRY_ERROR", `${e} contains '..'`, { entry: t, [e]: i }), false;
|
|
130462
|
-
|
|
130463
|
-
|
|
130464
|
-
if (l.startsWith("../") || l === "..") return this.warn("TAR_ENTRY_ERROR", `${e} escapes extraction directory`, { entry: t, [e]: i }), false;
|
|
130465
|
-
}
|
|
130691
|
+
let a = R.posix.dirname(t.path), l = R.posix.normalize(R.posix.join(a, h.join("/")));
|
|
130692
|
+
if (l.startsWith("../") || l === "..") return this.warn("TAR_ENTRY_ERROR", `${e} escapes extraction directory`, { entry: t, [e]: i }), false;
|
|
130466
130693
|
}
|
|
130467
130694
|
return n && (t[e] = String(o), this.warn("TAR_ENTRY_INFO", `stripping ${n} from absolute ${e}`, { entry: t, [e]: i })), true;
|
|
130468
130695
|
}
|
|
@@ -130478,20 +130705,20 @@ var qt = class extends st {
|
|
|
130478
130705
|
i.splice(0, this.strip), t.path = i.join("/");
|
|
130479
130706
|
}
|
|
130480
130707
|
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;
|
|
130481
|
-
if (!this[
|
|
130482
|
-
if (R.isAbsolute(t.path) ?
|
|
130708
|
+
if (!this[Es](t, "path") || !this[Es](t, "linkpath")) return false;
|
|
130709
|
+
if (t.absolute = R.isAbsolute(t.path) ? f(R.resolve(t.path)) : f(R.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;
|
|
130483
130710
|
if (t.absolute === this.cwd && t.type !== "Directory" && t.type !== "GNUDumpDir") return false;
|
|
130484
130711
|
if (this.win32) {
|
|
130485
130712
|
let { root: r } = R.win32.parse(String(t.absolute));
|
|
130486
|
-
t.absolute = r +
|
|
130713
|
+
t.absolute = r + Xi(String(t.absolute).slice(r.length));
|
|
130487
130714
|
let { root: n } = R.win32.parse(t.path);
|
|
130488
|
-
t.path = n +
|
|
130715
|
+
t.path = n + Xi(t.path.slice(n.length));
|
|
130489
130716
|
}
|
|
130490
130717
|
return true;
|
|
130491
130718
|
}
|
|
130492
|
-
[
|
|
130719
|
+
[wr](t) {
|
|
130493
130720
|
if (!this[_r](t)) return t.resume();
|
|
130494
|
-
switch (
|
|
130721
|
+
switch (eo.equal(typeof t.absolute, "string"), t.type) {
|
|
130495
130722
|
case "Directory":
|
|
130496
130723
|
case "GNUDumpDir":
|
|
130497
130724
|
t.mode && (t.mode = t.mode | 448);
|
|
@@ -130500,28 +130727,28 @@ var qt = class extends st {
|
|
|
130500
130727
|
case "ContiguousFile":
|
|
130501
130728
|
case "Link":
|
|
130502
130729
|
case "SymbolicLink":
|
|
130503
|
-
return this[
|
|
130730
|
+
return this[ys](t);
|
|
130504
130731
|
default:
|
|
130505
|
-
return this[
|
|
130732
|
+
return this[br](t);
|
|
130506
130733
|
}
|
|
130507
130734
|
}
|
|
130508
130735
|
[O](t, e) {
|
|
130509
130736
|
t.name === "CwdError" ? this.emit("error", t) : (this.warn("TAR_ENTRY_ERROR", t, { entry: e }), this[Xt](), e.resume());
|
|
130510
130737
|
}
|
|
130511
130738
|
[St](t, e, i) {
|
|
130512
|
-
|
|
130739
|
+
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);
|
|
130513
130740
|
}
|
|
130514
130741
|
[Re](t) {
|
|
130515
130742
|
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;
|
|
130516
130743
|
}
|
|
130517
130744
|
[be](t) {
|
|
130518
|
-
return
|
|
130745
|
+
return Or(this.uid, t.uid, this.processUid);
|
|
130519
130746
|
}
|
|
130520
|
-
[
|
|
130521
|
-
return
|
|
130747
|
+
[_e](t) {
|
|
130748
|
+
return Or(this.gid, t.gid, this.processGid);
|
|
130522
130749
|
}
|
|
130523
|
-
[
|
|
130524
|
-
let i = typeof t.mode == "number" ? t.mode & 4095 : this.fmode, r = new tt(String(t.absolute), { flags:
|
|
130750
|
+
[bs](t, e) {
|
|
130751
|
+
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 });
|
|
130525
130752
|
r.on("error", (a) => {
|
|
130526
130753
|
r.fd && u.close(r.fd, () => {
|
|
130527
130754
|
}), r.write = () => true, this[O](a, t), e();
|
|
@@ -130545,7 +130772,7 @@ var qt = class extends st {
|
|
|
130545
130772
|
}
|
|
130546
130773
|
if (typeof l == "number" && this[Re](t)) {
|
|
130547
130774
|
n++;
|
|
130548
|
-
let c = this[be](t), d = this[
|
|
130775
|
+
let c = this[be](t), d = this[_e](t);
|
|
130549
130776
|
typeof c == "number" && typeof d == "number" && u.fchown(l, c, d, (S) => S ? u.chown(a, c, d, (T) => o(T && S)) : o());
|
|
130550
130777
|
}
|
|
130551
130778
|
o();
|
|
@@ -130555,7 +130782,7 @@ var qt = class extends st {
|
|
|
130555
130782
|
this[O](a, t), e();
|
|
130556
130783
|
}), t.pipe(h)), h.pipe(r);
|
|
130557
130784
|
}
|
|
130558
|
-
[
|
|
130785
|
+
[_s](t, e) {
|
|
130559
130786
|
let i = typeof t.mode == "number" ? t.mode & 4095 : this.dmode;
|
|
130560
130787
|
this[St](String(t.absolute), i, (r) => {
|
|
130561
130788
|
if (r) {
|
|
@@ -130565,21 +130792,21 @@ var qt = class extends st {
|
|
|
130565
130792
|
let n = 1, o = () => {
|
|
130566
130793
|
--n === 0 && (e(), this[Xt](), t.resume());
|
|
130567
130794
|
};
|
|
130568
|
-
t.mtime && !this.noMtime && (n++, u.utimes(String(t.absolute), t.atime || /* @__PURE__ */ new Date(), t.mtime, o)), this[Re](t) && (n++, u.chown(String(t.absolute), Number(this[be](t)), Number(this[
|
|
130795
|
+
t.mtime && !this.noMtime && (n++, u.utimes(String(t.absolute), t.atime || /* @__PURE__ */ new Date(), t.mtime, o)), this[Re](t) && (n++, u.chown(String(t.absolute), Number(this[be](t)), Number(this[_e](t)), o)), o();
|
|
130569
130796
|
});
|
|
130570
130797
|
}
|
|
130571
|
-
[
|
|
130798
|
+
[br](t) {
|
|
130572
130799
|
t.unsupported = true, this.warn("TAR_ENTRY_UNSUPPORTED", `unsupported entry type: ${t.type}`, { entry: t }), t.resume();
|
|
130573
130800
|
}
|
|
130574
|
-
[
|
|
130801
|
+
[yr](t, e) {
|
|
130575
130802
|
let i = f(R.relative(this.cwd, R.resolve(R.dirname(String(t.absolute)), String(t.linkpath)))).split("/");
|
|
130576
|
-
this[ye](t, this.cwd, i, () => this[
|
|
130803
|
+
this[ye](t, this.cwd, i, () => this[Si](t, String(t.linkpath), "symlink", e), (r) => {
|
|
130577
130804
|
this[O](r, t), e();
|
|
130578
130805
|
});
|
|
130579
130806
|
}
|
|
130580
|
-
[
|
|
130807
|
+
[Rr](t, e) {
|
|
130581
130808
|
let i = f(R.resolve(this.cwd, String(t.linkpath))), r = f(String(t.linkpath)).split("/");
|
|
130582
|
-
this[ye](t, this.cwd, r, () => this[
|
|
130809
|
+
this[ye](t, this.cwd, r, () => this[Si](t, i, "link", e), (n) => {
|
|
130583
130810
|
this[O](n, t), e();
|
|
130584
130811
|
});
|
|
130585
130812
|
}
|
|
@@ -130593,24 +130820,24 @@ var qt = class extends st {
|
|
|
130593
130820
|
this[ye](t, h, i, r, n);
|
|
130594
130821
|
});
|
|
130595
130822
|
}
|
|
130596
|
-
[
|
|
130597
|
-
this[
|
|
130823
|
+
[gr]() {
|
|
130824
|
+
this[wi]++;
|
|
130598
130825
|
}
|
|
130599
130826
|
[Xt]() {
|
|
130600
|
-
this[
|
|
130827
|
+
this[wi]--, this[Ss]();
|
|
130601
130828
|
}
|
|
130602
130829
|
[gs](t) {
|
|
130603
130830
|
this[Xt](), t.resume();
|
|
130604
130831
|
}
|
|
130605
|
-
[
|
|
130832
|
+
[Rs](t, e) {
|
|
130606
130833
|
return t.type === "File" && !this.unlink && e.isFile() && e.nlink <= 1 && !Oe;
|
|
130607
130834
|
}
|
|
130608
|
-
[
|
|
130609
|
-
this[
|
|
130835
|
+
[ys](t) {
|
|
130836
|
+
this[gr]();
|
|
130610
130837
|
let e = [t.path];
|
|
130611
|
-
t.linkpath && e.push(t.linkpath), this.reservations.reserve(e, (i) => this[
|
|
130838
|
+
t.linkpath && e.push(t.linkpath), this.reservations.reserve(e, (i) => this[Sr](t, i));
|
|
130612
130839
|
}
|
|
130613
|
-
[
|
|
130840
|
+
[Sr](t, e) {
|
|
130614
130841
|
let i = (h) => {
|
|
130615
130842
|
e(h);
|
|
130616
130843
|
}, r = () => {
|
|
@@ -130619,7 +130846,7 @@ var qt = class extends st {
|
|
|
130619
130846
|
this[O](h, t), i();
|
|
130620
130847
|
return;
|
|
130621
130848
|
}
|
|
130622
|
-
this[
|
|
130849
|
+
this[ge] = true, n();
|
|
130623
130850
|
});
|
|
130624
130851
|
}, n = () => {
|
|
130625
130852
|
if (t.absolute !== this.cwd) {
|
|
@@ -130639,7 +130866,7 @@ var qt = class extends st {
|
|
|
130639
130866
|
this[gs](t), i();
|
|
130640
130867
|
return;
|
|
130641
130868
|
}
|
|
130642
|
-
if (h || this[
|
|
130869
|
+
if (h || this[Rs](t, a)) return this[P](null, t, i);
|
|
130643
130870
|
if (a.isDirectory()) {
|
|
130644
130871
|
if (t.type === "Directory") {
|
|
130645
130872
|
let l = this.chmod && t.mode && (a.mode & 4095) !== t.mode, c = (d) => this[P](d ?? null, t, i);
|
|
@@ -130648,10 +130875,10 @@ var qt = class extends st {
|
|
|
130648
130875
|
if (t.absolute !== this.cwd) return u.rmdir(String(t.absolute), (l) => this[P](l ?? null, t, i));
|
|
130649
130876
|
}
|
|
130650
130877
|
if (t.absolute === this.cwd) return this[P](null, t, i);
|
|
130651
|
-
|
|
130878
|
+
ro(String(t.absolute), (l) => this[P](l ?? null, t, i));
|
|
130652
130879
|
});
|
|
130653
130880
|
};
|
|
130654
|
-
this[
|
|
130881
|
+
this[ge] ? n() : r();
|
|
130655
130882
|
}
|
|
130656
130883
|
[P](t, e, i) {
|
|
130657
130884
|
if (t) {
|
|
@@ -130662,17 +130889,17 @@ var qt = class extends st {
|
|
|
130662
130889
|
case "File":
|
|
130663
130890
|
case "OldFile":
|
|
130664
130891
|
case "ContiguousFile":
|
|
130665
|
-
return this[
|
|
130892
|
+
return this[bs](e, i);
|
|
130666
130893
|
case "Link":
|
|
130667
|
-
return this[br](e, i);
|
|
130668
|
-
case "SymbolicLink":
|
|
130669
130894
|
return this[Rr](e, i);
|
|
130895
|
+
case "SymbolicLink":
|
|
130896
|
+
return this[yr](e, i);
|
|
130670
130897
|
case "Directory":
|
|
130671
130898
|
case "GNUDumpDir":
|
|
130672
|
-
return this[
|
|
130899
|
+
return this[_s](e, i);
|
|
130673
130900
|
}
|
|
130674
130901
|
}
|
|
130675
|
-
[
|
|
130902
|
+
[Si](t, e, i, r) {
|
|
130676
130903
|
u[i](e, String(t.absolute), (n) => {
|
|
130677
130904
|
n ? this[O](n, t) : (this[Xt](), t.resume()), r();
|
|
130678
130905
|
});
|
|
@@ -130691,11 +130918,11 @@ var Te = class extends qt {
|
|
|
130691
130918
|
return super[P](t, e, () => {
|
|
130692
130919
|
});
|
|
130693
130920
|
}
|
|
130694
|
-
[
|
|
130695
|
-
if (!this[
|
|
130921
|
+
[ys](t) {
|
|
130922
|
+
if (!this[ge]) {
|
|
130696
130923
|
let n = this[St](this.cwd, this.dmode);
|
|
130697
130924
|
if (n) return this[O](n, t);
|
|
130698
|
-
this[
|
|
130925
|
+
this[ge] = true;
|
|
130699
130926
|
}
|
|
130700
130927
|
if (t.absolute !== this.cwd) {
|
|
130701
130928
|
let n = f(R.dirname(String(t.absolute)));
|
|
@@ -130706,7 +130933,7 @@ var Te = class extends qt {
|
|
|
130706
130933
|
}
|
|
130707
130934
|
let [e, i] = Se(() => u.lstatSync(String(t.absolute)));
|
|
130708
130935
|
if (i && (this.keep || this.newer && i.mtime > (t.mtime ?? i.mtime))) return this[gs](t);
|
|
130709
|
-
if (e || this[
|
|
130936
|
+
if (e || this[Rs](t, i)) return this[P](null, t);
|
|
130710
130937
|
if (i.isDirectory()) {
|
|
130711
130938
|
if (t.type === "Directory") {
|
|
130712
130939
|
let o = this.chmod && t.mode && (i.mode & 4095) !== t.mode, [h] = o ? Se(() => {
|
|
@@ -130717,10 +130944,10 @@ var Te = class extends qt {
|
|
|
130717
130944
|
let [n] = Se(() => u.rmdirSync(String(t.absolute)));
|
|
130718
130945
|
this[P](n, t);
|
|
130719
130946
|
}
|
|
130720
|
-
let [r] = t.absolute === this.cwd ? [] : Se(() =>
|
|
130947
|
+
let [r] = t.absolute === this.cwd ? [] : Se(() => no(String(t.absolute)));
|
|
130721
130948
|
this[P](r, t);
|
|
130722
130949
|
}
|
|
130723
|
-
[
|
|
130950
|
+
[bs](t, e) {
|
|
130724
130951
|
let i = typeof t.mode == "number" ? t.mode & 4095 : this.fmode, r = (h) => {
|
|
130725
130952
|
let a;
|
|
130726
130953
|
try {
|
|
@@ -130731,7 +130958,7 @@ var Te = class extends qt {
|
|
|
130731
130958
|
(h || a) && this[O](h || a, t), e();
|
|
130732
130959
|
}, n;
|
|
130733
130960
|
try {
|
|
130734
|
-
n = u.openSync(String(t.absolute),
|
|
130961
|
+
n = u.openSync(String(t.absolute), cs(t.size), i);
|
|
130735
130962
|
} catch (h) {
|
|
130736
130963
|
return r(h);
|
|
130737
130964
|
}
|
|
@@ -130757,7 +130984,7 @@ var Te = class extends qt {
|
|
|
130757
130984
|
}
|
|
130758
130985
|
}
|
|
130759
130986
|
if (this[Re](t)) {
|
|
130760
|
-
let a = this[be](t), l = this[
|
|
130987
|
+
let a = this[be](t), l = this[_e](t);
|
|
130761
130988
|
try {
|
|
130762
130989
|
u.fchownSync(n, Number(a), Number(l));
|
|
130763
130990
|
} catch (c) {
|
|
@@ -130771,7 +130998,7 @@ var Te = class extends qt {
|
|
|
130771
130998
|
r(h);
|
|
130772
130999
|
});
|
|
130773
131000
|
}
|
|
130774
|
-
[
|
|
131001
|
+
[_s](t, e) {
|
|
130775
131002
|
let i = typeof t.mode == "number" ? t.mode & 4095 : this.dmode, r = this[St](String(t.absolute), i);
|
|
130776
131003
|
if (r) {
|
|
130777
131004
|
this[O](r, t), e();
|
|
@@ -130782,20 +131009,20 @@ var Te = class extends qt {
|
|
|
130782
131009
|
} catch {
|
|
130783
131010
|
}
|
|
130784
131011
|
if (this[Re](t)) try {
|
|
130785
|
-
u.chownSync(String(t.absolute), Number(this[be](t)), Number(this[
|
|
131012
|
+
u.chownSync(String(t.absolute), Number(this[be](t)), Number(this[_e](t)));
|
|
130786
131013
|
} catch {
|
|
130787
131014
|
}
|
|
130788
131015
|
e(), t.resume();
|
|
130789
131016
|
}
|
|
130790
131017
|
[St](t, e) {
|
|
130791
131018
|
try {
|
|
130792
|
-
return
|
|
131019
|
+
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 });
|
|
130793
131020
|
} catch (i) {
|
|
130794
131021
|
return i;
|
|
130795
131022
|
}
|
|
130796
131023
|
}
|
|
130797
131024
|
[ye](t, e, i, r, n) {
|
|
130798
|
-
if (this.preservePaths ||
|
|
131025
|
+
if (this.preservePaths || i.length === 0) return r();
|
|
130799
131026
|
let o = e;
|
|
130800
131027
|
for (let h of i) {
|
|
130801
131028
|
o = R.resolve(o, h);
|
|
@@ -130805,7 +131032,7 @@ var Te = class extends qt {
|
|
|
130805
131032
|
}
|
|
130806
131033
|
r();
|
|
130807
131034
|
}
|
|
130808
|
-
[
|
|
131035
|
+
[Si](t, e, i, r) {
|
|
130809
131036
|
let n = `${i}Sync`;
|
|
130810
131037
|
try {
|
|
130811
131038
|
u[n](e, String(t.absolute)), r(), t.resume();
|
|
@@ -130814,26 +131041,26 @@ var Te = class extends qt {
|
|
|
130814
131041
|
}
|
|
130815
131042
|
}
|
|
130816
131043
|
};
|
|
130817
|
-
var
|
|
130818
|
-
let t = new Te(s3), e = s3.file, i =
|
|
130819
|
-
new
|
|
131044
|
+
var oo = (s3) => {
|
|
131045
|
+
let t = new Te(s3), e = s3.file, i = xr.statSync(e), r = s3.maxReadSize || 16 * 1024 * 1024;
|
|
131046
|
+
new Me(e, { readSize: r, size: i.size }).pipe(t);
|
|
130820
131047
|
};
|
|
130821
|
-
var
|
|
131048
|
+
var ho = (s3, t) => {
|
|
130822
131049
|
let e = new qt(s3), i = s3.maxReadSize || 16 * 1024 * 1024, r = s3.file;
|
|
130823
131050
|
return new Promise((o, h) => {
|
|
130824
|
-
e.on("error", h), e.on("close", o),
|
|
131051
|
+
e.on("error", h), e.on("close", o), xr.stat(r, (a, l) => {
|
|
130825
131052
|
if (a) h(a);
|
|
130826
131053
|
else {
|
|
130827
|
-
let c = new
|
|
131054
|
+
let c = new _t(r, { readSize: i, size: l.size });
|
|
130828
131055
|
c.on("error", h), c.pipe(e);
|
|
130829
131056
|
}
|
|
130830
131057
|
});
|
|
130831
131058
|
});
|
|
130832
131059
|
};
|
|
130833
|
-
var
|
|
130834
|
-
t?.length &&
|
|
131060
|
+
var ao = K(oo, ho, (s3) => new Te(s3), (s3) => new qt(s3), (s3, t) => {
|
|
131061
|
+
t?.length && Ki(s3, t);
|
|
130835
131062
|
});
|
|
130836
|
-
var
|
|
131063
|
+
var lo = (s3, t) => {
|
|
130837
131064
|
let e = new kt(s3), i = true, r, n;
|
|
130838
131065
|
try {
|
|
130839
131066
|
try {
|
|
@@ -130854,7 +131081,7 @@ var co = (s3, t) => {
|
|
|
130854
131081
|
if (n + l + 512 > o.size) break;
|
|
130855
131082
|
n += l, s3.mtimeCache && a.mtime && s3.mtimeCache.set(String(a.path), a.mtime);
|
|
130856
131083
|
}
|
|
130857
|
-
i = false,
|
|
131084
|
+
i = false, co(s3, e, n, r, t);
|
|
130858
131085
|
} finally {
|
|
130859
131086
|
if (i) try {
|
|
130860
131087
|
v.closeSync(r);
|
|
@@ -130862,11 +131089,11 @@ var co = (s3, t) => {
|
|
|
130862
131089
|
}
|
|
130863
131090
|
}
|
|
130864
131091
|
};
|
|
130865
|
-
var
|
|
131092
|
+
var co = (s3, t, e, i, r) => {
|
|
130866
131093
|
let n = new Wt(s3.file, { fd: i, start: e });
|
|
130867
|
-
t.pipe(n),
|
|
131094
|
+
t.pipe(n), uo(t, r);
|
|
130868
131095
|
};
|
|
130869
|
-
var
|
|
131096
|
+
var fo = (s3, t) => {
|
|
130870
131097
|
t = Array.from(t);
|
|
130871
131098
|
let e = new Et(s3), i = (n, o, h) => {
|
|
130872
131099
|
let a = (T, N) => {
|
|
@@ -130874,7 +131101,7 @@ var uo = (s3, t) => {
|
|
|
130874
131101
|
}, l = 0;
|
|
130875
131102
|
if (o === 0) return a(null, 0);
|
|
130876
131103
|
let c = 0, d = Buffer.alloc(512), S = (T, N) => {
|
|
130877
|
-
if (T ||
|
|
131104
|
+
if (T || N === void 0) return a(T);
|
|
130878
131105
|
if (c += N, c < 512 && N) return v.read(n, d, c, d.length - c, l + c, S);
|
|
130879
131106
|
if (l === 0 && d[0] === 31 && d[1] === 139) return a(new Error("cannot append to compressed archives"));
|
|
130880
131107
|
if (c < 512) return a(null, l);
|
|
@@ -130896,38 +131123,35 @@ var uo = (s3, t) => {
|
|
|
130896
131123
|
i(c, S.size, (T, N) => {
|
|
130897
131124
|
if (T) return o(T);
|
|
130898
131125
|
let E = new tt(s3.file, { fd: c, start: N });
|
|
130899
|
-
e.pipe(E), E.on("error", o), E.on("close", n),
|
|
131126
|
+
e.pipe(E), E.on("error", o), E.on("close", n), mo(e, t);
|
|
130900
131127
|
});
|
|
130901
131128
|
});
|
|
130902
131129
|
};
|
|
130903
131130
|
v.open(s3.file, h, a);
|
|
130904
131131
|
});
|
|
130905
131132
|
};
|
|
130906
|
-
var
|
|
131133
|
+
var uo = (s3, t) => {
|
|
130907
131134
|
t.forEach((e) => {
|
|
130908
|
-
e.charAt(0) === "@" ? It({ file:
|
|
131135
|
+
e.charAt(0) === "@" ? It({ file: Lr.resolve(s3.cwd, e.slice(1)), sync: true, noResume: true, onReadEntry: (i) => s3.add(i) }) : s3.add(e);
|
|
130909
131136
|
}), s3.end();
|
|
130910
131137
|
};
|
|
130911
|
-
var
|
|
130912
|
-
for (let e
|
|
130913
|
-
let i = String(t[e]);
|
|
130914
|
-
i.charAt(0) === "@" ? await It({ file: Nr.resolve(String(s3.cwd), i.slice(1)), noResume: true, onReadEntry: (r) => s3.add(r) }) : s3.add(i);
|
|
130915
|
-
}
|
|
131138
|
+
var mo = async (s3, t) => {
|
|
131139
|
+
for (let e of t) e.charAt(0) === "@" ? await It({ file: Lr.resolve(String(s3.cwd), e.slice(1)), noResume: true, onReadEntry: (i) => s3.add(i) }) : s3.add(e);
|
|
130916
131140
|
s3.end();
|
|
130917
131141
|
};
|
|
130918
|
-
var vt = K(
|
|
131142
|
+
var vt = K(lo, fo, () => {
|
|
130919
131143
|
throw new TypeError("file is required");
|
|
130920
131144
|
}, () => {
|
|
130921
131145
|
throw new TypeError("file is required");
|
|
130922
131146
|
}, (s3, t) => {
|
|
130923
|
-
if (!
|
|
131147
|
+
if (!Fs(s3)) throw new TypeError("file is required");
|
|
130924
131148
|
if (s3.gzip || s3.brotli || s3.zstd || s3.file.endsWith(".br") || s3.file.endsWith(".tbr")) throw new TypeError("cannot append to compressed archives");
|
|
130925
131149
|
if (!t?.length) throw new TypeError("no paths specified to add/replace");
|
|
130926
131150
|
});
|
|
130927
|
-
var
|
|
130928
|
-
vt.validate?.(s3, t),
|
|
131151
|
+
var po = K(vt.syncFile, vt.asyncFile, vt.syncNoFile, vt.asyncNoFile, (s3, t = []) => {
|
|
131152
|
+
vt.validate?.(s3, t), Eo(s3);
|
|
130929
131153
|
});
|
|
130930
|
-
var
|
|
131154
|
+
var Eo = (s3) => {
|
|
130931
131155
|
let t = s3.filter;
|
|
130932
131156
|
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));
|
|
130933
131157
|
};
|
|
@@ -130935,8 +131159,11 @@ var wo = (s3) => {
|
|
|
130935
131159
|
// lib/commands/utils/deployment.ts
|
|
130936
131160
|
var POLL_DEBOUNCE = 2e3;
|
|
130937
131161
|
async function packageDirectory(dirPath) {
|
|
130938
|
-
const tempFile =
|
|
130939
|
-
|
|
131162
|
+
const tempFile = path2.join(
|
|
131163
|
+
os6.tmpdir(),
|
|
131164
|
+
`appwrite-deploy-${Date.now()}.tar.gz`
|
|
131165
|
+
);
|
|
131166
|
+
await Pn(
|
|
130940
131167
|
{
|
|
130941
131168
|
gzip: true,
|
|
130942
131169
|
file: tempFile,
|
|
@@ -130944,11 +131171,28 @@ async function packageDirectory(dirPath) {
|
|
|
130944
131171
|
},
|
|
130945
131172
|
["."]
|
|
130946
131173
|
);
|
|
130947
|
-
|
|
130948
|
-
|
|
130949
|
-
|
|
130950
|
-
|
|
130951
|
-
|
|
131174
|
+
try {
|
|
131175
|
+
const buffer = fs4.readFileSync(tempFile);
|
|
131176
|
+
return new File([buffer], path2.basename(tempFile), {
|
|
131177
|
+
type: "application/gzip"
|
|
131178
|
+
});
|
|
131179
|
+
} finally {
|
|
131180
|
+
if (fs4.existsSync(tempFile)) {
|
|
131181
|
+
fs4.unlinkSync(tempFile);
|
|
131182
|
+
}
|
|
131183
|
+
}
|
|
131184
|
+
}
|
|
131185
|
+
async function resolveFileParam(filePath) {
|
|
131186
|
+
const resolved = path2.resolve(filePath);
|
|
131187
|
+
if (!fs4.existsSync(resolved)) {
|
|
131188
|
+
throw new Error(`File or directory not found: ${resolved}`);
|
|
131189
|
+
}
|
|
131190
|
+
const stat = fs4.statSync(resolved);
|
|
131191
|
+
if (stat.isDirectory()) {
|
|
131192
|
+
return packageDirectory(resolved);
|
|
131193
|
+
}
|
|
131194
|
+
const buffer = fs4.readFileSync(resolved);
|
|
131195
|
+
return new File([buffer], path2.basename(resolved));
|
|
130952
131196
|
}
|
|
130953
131197
|
async function downloadDeploymentCode(params) {
|
|
130954
131198
|
const {
|
|
@@ -131000,7 +131244,7 @@ async function downloadDeploymentCode(params) {
|
|
|
131000
131244
|
`Failed to write deployment archive to "${compressedFileName}": ${message}`
|
|
131001
131245
|
);
|
|
131002
131246
|
}
|
|
131003
|
-
|
|
131247
|
+
ao({
|
|
131004
131248
|
sync: true,
|
|
131005
131249
|
cwd: resourcePath,
|
|
131006
131250
|
file: compressedFileName,
|
|
@@ -131316,7 +131560,7 @@ var Pull = class {
|
|
|
131316
131560
|
return [];
|
|
131317
131561
|
}
|
|
131318
131562
|
const { functions: allFunctions } = await paginate(
|
|
131319
|
-
async () => new Functions(this.projectClient).list(),
|
|
131563
|
+
async (args) => new Functions(this.projectClient).list(args.queries),
|
|
131320
131564
|
{},
|
|
131321
131565
|
100,
|
|
131322
131566
|
"functions"
|
|
@@ -131400,7 +131644,7 @@ var Pull = class {
|
|
|
131400
131644
|
return [];
|
|
131401
131645
|
}
|
|
131402
131646
|
const { sites: fetchedSites } = await paginate(
|
|
131403
|
-
async () => new Sites(this.projectClient).list(),
|
|
131647
|
+
async (args) => new Sites(this.projectClient).list(args.queries),
|
|
131404
131648
|
{},
|
|
131405
131649
|
100,
|
|
131406
131650
|
"sites"
|
|
@@ -131478,7 +131722,7 @@ var Pull = class {
|
|
|
131478
131722
|
return { databases: [], collections: [] };
|
|
131479
131723
|
}
|
|
131480
131724
|
const { databases: databases2 } = await paginate(
|
|
131481
|
-
async () => new Databases(this.projectClient).list(),
|
|
131725
|
+
async (args) => new Databases(this.projectClient).list(args.queries),
|
|
131482
131726
|
{},
|
|
131483
131727
|
100,
|
|
131484
131728
|
"databases"
|
|
@@ -131491,7 +131735,10 @@ var Pull = class {
|
|
|
131491
131735
|
);
|
|
131492
131736
|
allDatabases.push(database);
|
|
131493
131737
|
const { collections } = await paginate(
|
|
131494
|
-
async () => new Databases(this.projectClient).listCollections(
|
|
131738
|
+
async (args) => new Databases(this.projectClient).listCollections(
|
|
131739
|
+
database.$id,
|
|
131740
|
+
args.queries
|
|
131741
|
+
),
|
|
131495
131742
|
{},
|
|
131496
131743
|
100,
|
|
131497
131744
|
"collections"
|
|
@@ -131529,7 +131776,9 @@ var Pull = class {
|
|
|
131529
131776
|
return { databases: [], tables: [] };
|
|
131530
131777
|
}
|
|
131531
131778
|
const { databases: databases2 } = await paginate(
|
|
131532
|
-
async () => new TablesDB(this.projectClient).list(
|
|
131779
|
+
async (args) => new TablesDB(this.projectClient).list({
|
|
131780
|
+
queries: args.queries
|
|
131781
|
+
}),
|
|
131533
131782
|
{},
|
|
131534
131783
|
100,
|
|
131535
131784
|
"databases"
|
|
@@ -131542,7 +131791,10 @@ var Pull = class {
|
|
|
131542
131791
|
);
|
|
131543
131792
|
allDatabases.push(filterBySchema(database, DatabaseSchema));
|
|
131544
131793
|
const { tables } = await paginate(
|
|
131545
|
-
async () => new TablesDB(this.projectClient).listTables(
|
|
131794
|
+
async (args) => new TablesDB(this.projectClient).listTables({
|
|
131795
|
+
databaseId: database.$id,
|
|
131796
|
+
queries: args.queries
|
|
131797
|
+
}),
|
|
131546
131798
|
{},
|
|
131547
131799
|
100,
|
|
131548
131800
|
"tables"
|
|
@@ -131584,7 +131836,7 @@ var Pull = class {
|
|
|
131584
131836
|
return [];
|
|
131585
131837
|
}
|
|
131586
131838
|
const { buckets } = await paginate(
|
|
131587
|
-
async () => new Storage(this.projectClient).listBuckets(),
|
|
131839
|
+
async (args) => new Storage(this.projectClient).listBuckets(args.queries),
|
|
131588
131840
|
{},
|
|
131589
131841
|
100,
|
|
131590
131842
|
"buckets"
|
|
@@ -131614,7 +131866,7 @@ var Pull = class {
|
|
|
131614
131866
|
return [];
|
|
131615
131867
|
}
|
|
131616
131868
|
const { teams: teams2 } = await paginate(
|
|
131617
|
-
async () => new Teams(this.projectClient).list(),
|
|
131869
|
+
async (args) => new Teams(this.projectClient).list(args.queries),
|
|
131618
131870
|
{},
|
|
131619
131871
|
100,
|
|
131620
131872
|
"teams"
|
|
@@ -131640,7 +131892,7 @@ var Pull = class {
|
|
|
131640
131892
|
return [];
|
|
131641
131893
|
}
|
|
131642
131894
|
const { topics } = await paginate(
|
|
131643
|
-
async () => new Messaging(this.projectClient).listTopics(),
|
|
131895
|
+
async (args) => new Messaging(this.projectClient).listTopics(args.queries),
|
|
131644
131896
|
{},
|
|
131645
131897
|
100,
|
|
131646
131898
|
"topics"
|
|
@@ -131712,7 +131964,7 @@ var pullFunctions = async ({
|
|
|
131712
131964
|
return;
|
|
131713
131965
|
}
|
|
131714
131966
|
const functionsToCheck = cliConfig.all ? (await paginate(
|
|
131715
|
-
async () => (await getFunctionsService()).list(),
|
|
131967
|
+
async (args) => (await getFunctionsService()).list(args.queries),
|
|
131716
131968
|
{},
|
|
131717
131969
|
100,
|
|
131718
131970
|
"functions"
|
|
@@ -131750,7 +132002,7 @@ var pullSites = async ({
|
|
|
131750
132002
|
return;
|
|
131751
132003
|
}
|
|
131752
132004
|
const sitesToCheck = cliConfig.all ? (await paginate(
|
|
131753
|
-
async () => (await getSitesService()).list(),
|
|
132005
|
+
async (args) => (await getSitesService()).list(args.queries),
|
|
131754
132006
|
{},
|
|
131755
132007
|
100,
|
|
131756
132008
|
"sites"
|
|
@@ -134602,7 +134854,7 @@ var runFunction = async ({
|
|
|
134602
134854
|
fs13.rmSync(hotSwapPath, { recursive: true, force: true });
|
|
134603
134855
|
fs13.mkdirSync(hotSwapPath, { recursive: true });
|
|
134604
134856
|
}
|
|
134605
|
-
await
|
|
134857
|
+
await ao({
|
|
134606
134858
|
keep: true,
|
|
134607
134859
|
sync: true,
|
|
134608
134860
|
cwd: hotSwapPath,
|
|
@@ -134630,7 +134882,7 @@ var runFunction = async ({
|
|
|
134630
134882
|
const sourcePath = path11.join(functionPath, f2);
|
|
134631
134883
|
fs13.copyFileSync(sourcePath, filePath);
|
|
134632
134884
|
}
|
|
134633
|
-
await
|
|
134885
|
+
await Pn(
|
|
134634
134886
|
{
|
|
134635
134887
|
gzip: true,
|
|
134636
134888
|
sync: true,
|
|
@@ -138829,13 +139081,33 @@ ${supportsServerSide ? ` create: (databaseId: string, name: string, options?: {
|
|
|
138829
139081
|
requiresApiKey: supportsServerSide
|
|
138830
139082
|
});
|
|
138831
139083
|
}
|
|
139084
|
+
/**
|
|
139085
|
+
* Deduplicate entities by composite key ($id + databaseId).
|
|
139086
|
+
* Keeps the last occurrence to match addTable/addCollection semantics.
|
|
139087
|
+
*/
|
|
139088
|
+
dedupeEntities(entities) {
|
|
139089
|
+
const seen = /* @__PURE__ */ new Map();
|
|
139090
|
+
for (const entity of entities) {
|
|
139091
|
+
seen.set(`${entity.databaseId}:${entity.$id}`, entity);
|
|
139092
|
+
}
|
|
139093
|
+
return Array.from(seen.values());
|
|
139094
|
+
}
|
|
138832
139095
|
async generate(config2, options) {
|
|
138833
139096
|
if (!config2.projectId) {
|
|
138834
139097
|
throw new Error("Project ID is required in configuration");
|
|
138835
139098
|
}
|
|
138836
139099
|
const appwriteDep = options?.appwriteImportSource ?? getAppwriteDependency();
|
|
138837
139100
|
const importExt = options?.importExtension ?? detectImportExtension();
|
|
138838
|
-
const
|
|
139101
|
+
const dedupedConfig = { ...config2 };
|
|
139102
|
+
if (dedupedConfig.tables && dedupedConfig.tables.length > 0) {
|
|
139103
|
+
dedupedConfig.tables = this.dedupeEntities(dedupedConfig.tables);
|
|
139104
|
+
}
|
|
139105
|
+
if (dedupedConfig.collections && dedupedConfig.collections.length > 0) {
|
|
139106
|
+
dedupedConfig.collections = this.dedupeEntities(
|
|
139107
|
+
dedupedConfig.collections
|
|
139108
|
+
);
|
|
139109
|
+
}
|
|
139110
|
+
const hasEntities = dedupedConfig.tables && dedupedConfig.tables.length > 0 || dedupedConfig.collections && dedupedConfig.collections.length > 0;
|
|
138839
139111
|
if (!hasEntities) {
|
|
138840
139112
|
console.log(
|
|
138841
139113
|
"No tables or collections found in configuration. Skipping database generation."
|
|
@@ -138844,14 +139116,21 @@ ${supportsServerSide ? ` create: (databaseId: string, name: string, options?: {
|
|
|
138844
139116
|
dbContent: "// No tables or collections found in configuration\n",
|
|
138845
139117
|
typesContent: "// No tables or collections found in configuration\n",
|
|
138846
139118
|
indexContent: this.generateIndexFile(importExt),
|
|
138847
|
-
constantsContent: this.generateConstantsFile(
|
|
139119
|
+
constantsContent: this.generateConstantsFile(
|
|
139120
|
+
dedupedConfig,
|
|
139121
|
+
appwriteDep
|
|
139122
|
+
)
|
|
138848
139123
|
};
|
|
138849
139124
|
}
|
|
138850
139125
|
return {
|
|
138851
|
-
dbContent: this.generateDatabasesFile(
|
|
138852
|
-
|
|
139126
|
+
dbContent: this.generateDatabasesFile(
|
|
139127
|
+
dedupedConfig,
|
|
139128
|
+
importExt,
|
|
139129
|
+
appwriteDep
|
|
139130
|
+
),
|
|
139131
|
+
typesContent: this.generateTypesFile(dedupedConfig, appwriteDep),
|
|
138853
139132
|
indexContent: this.generateIndexFile(importExt),
|
|
138854
|
-
constantsContent: this.generateConstantsFile(
|
|
139133
|
+
constantsContent: this.generateConstantsFile(dedupedConfig, appwriteDep)
|
|
138855
139134
|
};
|
|
138856
139135
|
}
|
|
138857
139136
|
};
|
|
@@ -139313,8 +139592,8 @@ If there is already an active session, the new session will be attached to the l
|
|
|
139313
139592
|
A user is limited to 10 active sessions at a time by default. [Learn more about session limits](https://appwrite.io/docs/authentication-security#limits).
|
|
139314
139593
|
`).requiredOption(`--provider <provider>`, `OAuth2 Provider. Currently, supported providers are: amazon, apple, auth0, authentik, autodesk, bitbucket, bitly, box, dailymotion, discord, disqus, dropbox, etsy, facebook, figma, github, gitlab, google, linkedin, microsoft, notion, oidc, okta, paypal, paypalSandbox, podio, salesforce, slack, spotify, stripe, tradeshift, tradeshiftBox, twitch, wordpress, yahoo, yammer, yandex, zoho, zoom.`).option(`--success <success>`, `URL to redirect back to your app after a successful login attempt. Only URLs from hostnames in your project's platform list are allowed. This requirement helps to prevent an [open redirect](https://cheatsheetseries.owasp.org/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html) attack against your project API.`).option(`--failure <failure>`, `URL to redirect back to your app after a failed login attempt. Only URLs from hostnames in your project's platform list are allowed. This requirement helps to prevent an [open redirect](https://cheatsheetseries.owasp.org/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html) attack against your project API.`).option(`--scopes [scopes...]`, `A list of custom OAuth2 scopes. Check each provider internal docs for a list of supported scopes. Maximum of 100 scopes are allowed, each 4096 characters long.`).action(
|
|
139315
139594
|
actionRunner(
|
|
139316
|
-
async ({ provider, success:
|
|
139317
|
-
const url2 = (await getAccountClient()).createOAuth2Session(provider,
|
|
139595
|
+
async ({ provider, success: success21, failure, scopes }) => {
|
|
139596
|
+
const url2 = (await getAccountClient()).createOAuth2Session(provider, success21, failure, scopes);
|
|
139318
139597
|
if (url2) console.log(url2);
|
|
139319
139598
|
}
|
|
139320
139599
|
)
|
|
@@ -139394,8 +139673,8 @@ If authentication succeeds, \`userId\` and \`secret\` of a token will be appende
|
|
|
139394
139673
|
|
|
139395
139674
|
A user is limited to 10 active sessions at a time by default. [Learn more about session limits](https://appwrite.io/docs/authentication-security#limits).`).requiredOption(`--provider <provider>`, `OAuth2 Provider. Currently, supported providers are: amazon, apple, auth0, authentik, autodesk, bitbucket, bitly, box, dailymotion, discord, disqus, dropbox, etsy, facebook, figma, github, gitlab, google, linkedin, microsoft, notion, oidc, okta, paypal, paypalSandbox, podio, salesforce, slack, spotify, stripe, tradeshift, tradeshiftBox, twitch, wordpress, yahoo, yammer, yandex, zoho, zoom.`).option(`--success <success>`, `URL to redirect back to your app after a successful login attempt. Only URLs from hostnames in your project's platform list are allowed. This requirement helps to prevent an [open redirect](https://cheatsheetseries.owasp.org/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html) attack against your project API.`).option(`--failure <failure>`, `URL to redirect back to your app after a failed login attempt. Only URLs from hostnames in your project's platform list are allowed. This requirement helps to prevent an [open redirect](https://cheatsheetseries.owasp.org/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html) attack against your project API.`).option(`--scopes [scopes...]`, `A list of custom OAuth2 scopes. Check each provider internal docs for a list of supported scopes. Maximum of 100 scopes are allowed, each 4096 characters long.`).action(
|
|
139396
139675
|
actionRunner(
|
|
139397
|
-
async ({ provider, success:
|
|
139398
|
-
const url2 = (await getAccountClient()).createOAuth2Token(provider,
|
|
139676
|
+
async ({ provider, success: success21, failure, scopes }) => {
|
|
139677
|
+
const url2 = (await getAccountClient()).createOAuth2Token(provider, success21, failure, scopes);
|
|
139399
139678
|
if (url2) console.log(url2);
|
|
139400
139679
|
}
|
|
139401
139680
|
)
|
|
@@ -140212,7 +140491,7 @@ This endpoint accepts a tar.gz file compressed with your code. Make sure to incl
|
|
|
140212
140491
|
|
|
140213
140492
|
Use the "command" param to set the entrypoint used to execute your code.`).requiredOption(`--function-id <function-id>`, `Function ID.`).requiredOption(`--code <code>`, `Gzip file with your code package. When used with the Appwrite CLI, pass the path to your code directory, and the CLI will automatically package your code. Use a path that is within the current directory.`).requiredOption(`--activate <activate>`, `Automatically activate the deployment when it is finished building.`, parseBool).option(`--entrypoint <entrypoint>`, `Entrypoint File.`).option(`--commands <commands>`, `Build Commands.`).action(
|
|
140214
140493
|
actionRunner(
|
|
140215
|
-
async ({ functionId, code, activate, entrypoint, commands }) => parse3(await (await getFunctionsClient()).createDeployment(functionId, code, activate, entrypoint, commands))
|
|
140494
|
+
async ({ functionId, code, activate, entrypoint, commands }) => parse3(await (await getFunctionsClient()).createDeployment(functionId, code !== void 0 ? await resolveFileParam(code) : void 0, activate, entrypoint, commands))
|
|
140216
140495
|
)
|
|
140217
140496
|
);
|
|
140218
140497
|
functions.command(`create-duplicate-deployment`).description(`Create a new build for an existing function deployment. This endpoint allows you to rebuild a deployment with the updated function configuration, including its entrypoint and build commands if they have been modified. The build process will be queued and executed asynchronously. The original deployment's code will be preserved and used for the new build.`).requiredOption(`--function-id <function-id>`, `Function ID.`).requiredOption(`--deployment-id <deployment-id>`, `Deployment ID.`).option(`--build-id <build-id>`, `Build unique ID.`).action(
|
|
@@ -141478,48 +141757,6 @@ projects.command(`delete-sms-template`).description(`Reset a custom SMS template
|
|
|
141478
141757
|
async ({ projectId, type, locale: locale2 }) => parse3(await (await getProjectsClient()).deleteSmsTemplate(projectId, type, locale2))
|
|
141479
141758
|
)
|
|
141480
141759
|
);
|
|
141481
|
-
projects.command(`list-webhooks`).description(`Get a list of all webhooks belonging to the project. You can use the query params to filter your results. `).requiredOption(`--project-id <project-id>`, `Project unique ID.`).option(
|
|
141482
|
-
`--total [value]`,
|
|
141483
|
-
`When set to false, the total count returned will be 0 and will not be calculated.`,
|
|
141484
|
-
(value) => value === void 0 ? true : parseBool(value)
|
|
141485
|
-
).action(
|
|
141486
|
-
actionRunner(
|
|
141487
|
-
async ({ projectId, total }) => parse3(await (await getProjectsClient()).listWebhooks(projectId, total))
|
|
141488
|
-
)
|
|
141489
|
-
);
|
|
141490
|
-
projects.command(`create-webhook`).description(`Create a new webhook. Use this endpoint to configure a URL that will receive events from Appwrite when specific events occur. `).requiredOption(`--project-id <project-id>`, `Project unique ID.`).requiredOption(`--name <name>`, `Webhook name. Max length: 128 chars.`).requiredOption(`--events [events...]`, `Events list. Maximum of 100 events are allowed.`).requiredOption(`--url <url>`, `Webhook URL.`).requiredOption(`--security <security>`, `Certificate verification, false for disabled or true for enabled.`, parseBool).option(
|
|
141491
|
-
`--enabled [value]`,
|
|
141492
|
-
`Enable or disable a webhook.`,
|
|
141493
|
-
(value) => value === void 0 ? true : parseBool(value)
|
|
141494
|
-
).option(`--http-user <http-user>`, `Webhook HTTP user. Max length: 256 chars.`).option(`--http-pass <http-pass>`, `Webhook HTTP password. Max length: 256 chars.`).action(
|
|
141495
|
-
actionRunner(
|
|
141496
|
-
async ({ projectId, name, events, url: url2, security, enabled, httpUser, httpPass }) => parse3(await (await getProjectsClient()).createWebhook(projectId, name, events, url2, security, enabled, httpUser, httpPass))
|
|
141497
|
-
)
|
|
141498
|
-
);
|
|
141499
|
-
projects.command(`get-webhook`).description(`Get a webhook by its unique ID. This endpoint returns details about a specific webhook configured for a project. `).requiredOption(`--project-id <project-id>`, `Project unique ID.`).requiredOption(`--webhook-id <webhook-id>`, `Webhook unique ID.`).action(
|
|
141500
|
-
actionRunner(
|
|
141501
|
-
async ({ projectId, webhookId }) => parse3(await (await getProjectsClient()).getWebhook(projectId, webhookId))
|
|
141502
|
-
)
|
|
141503
|
-
);
|
|
141504
|
-
projects.command(`update-webhook`).description(`Update a webhook by its unique ID. Use this endpoint to update the URL, events, or status of an existing webhook. `).requiredOption(`--project-id <project-id>`, `Project unique ID.`).requiredOption(`--webhook-id <webhook-id>`, `Webhook unique ID.`).requiredOption(`--name <name>`, `Webhook name. Max length: 128 chars.`).requiredOption(`--events [events...]`, `Events list. Maximum of 100 events are allowed.`).requiredOption(`--url <url>`, `Webhook URL.`).requiredOption(`--security <security>`, `Certificate verification, false for disabled or true for enabled.`, parseBool).option(
|
|
141505
|
-
`--enabled [value]`,
|
|
141506
|
-
`Enable or disable a webhook.`,
|
|
141507
|
-
(value) => value === void 0 ? true : parseBool(value)
|
|
141508
|
-
).option(`--http-user <http-user>`, `Webhook HTTP user. Max length: 256 chars.`).option(`--http-pass <http-pass>`, `Webhook HTTP password. Max length: 256 chars.`).action(
|
|
141509
|
-
actionRunner(
|
|
141510
|
-
async ({ projectId, webhookId, name, events, url: url2, security, enabled, httpUser, httpPass }) => parse3(await (await getProjectsClient()).updateWebhook(projectId, webhookId, name, events, url2, security, enabled, httpUser, httpPass))
|
|
141511
|
-
)
|
|
141512
|
-
);
|
|
141513
|
-
projects.command(`delete-webhook`).description(`Delete a webhook by its unique ID. Once deleted, the webhook will no longer receive project events. `).requiredOption(`--project-id <project-id>`, `Project unique ID.`).requiredOption(`--webhook-id <webhook-id>`, `Webhook unique ID.`).action(
|
|
141514
|
-
actionRunner(
|
|
141515
|
-
async ({ projectId, webhookId }) => parse3(await (await getProjectsClient()).deleteWebhook(projectId, webhookId))
|
|
141516
|
-
)
|
|
141517
|
-
);
|
|
141518
|
-
projects.command(`update-webhook-signature`).description(`Update the webhook signature key. This endpoint can be used to regenerate the signature key used to sign and validate payload deliveries for a specific webhook. `).requiredOption(`--project-id <project-id>`, `Project unique ID.`).requiredOption(`--webhook-id <webhook-id>`, `Webhook unique ID.`).action(
|
|
141519
|
-
actionRunner(
|
|
141520
|
-
async ({ projectId, webhookId }) => parse3(await (await getProjectsClient()).updateWebhookSignature(projectId, webhookId))
|
|
141521
|
-
)
|
|
141522
|
-
);
|
|
141523
141760
|
|
|
141524
141761
|
// lib/commands/services/proxy.ts
|
|
141525
141762
|
var proxyClient = null;
|
|
@@ -141689,7 +141926,7 @@ sites.command(`create-deployment`).description(`Create a new site code deploymen
|
|
|
141689
141926
|
(value) => value === void 0 ? true : parseBool(value)
|
|
141690
141927
|
).action(
|
|
141691
141928
|
actionRunner(
|
|
141692
|
-
async ({ siteId, code, installCommand, buildCommand, outputDirectory, activate }) => parse3(await (await getSitesClient()).createDeployment(siteId, code, installCommand, buildCommand, outputDirectory, activate))
|
|
141929
|
+
async ({ siteId, code, installCommand, buildCommand, outputDirectory, activate }) => parse3(await (await getSitesClient()).createDeployment(siteId, code !== void 0 ? await resolveFileParam(code) : void 0, installCommand, buildCommand, outputDirectory, activate))
|
|
141693
141930
|
)
|
|
141694
141931
|
);
|
|
141695
141932
|
sites.command(`create-duplicate-deployment`).description(`Create a new build for an existing site deployment. This endpoint allows you to rebuild a deployment with the updated site configuration, including its commands and output directory if they have been modified. The build process will be queued and executed asynchronously. The original deployment's code will be preserved and used for the new build.`).requiredOption(`--site-id <site-id>`, `Site ID.`).requiredOption(`--deployment-id <deployment-id>`, `Deployment ID.`).action(
|
|
@@ -141903,7 +142140,7 @@ When the first request is sent, the server will return the **File** object, and
|
|
|
141903
142140
|
If you're creating a new file using one of the Appwrite SDKs, all the chunking logic will be managed by the SDK internally.
|
|
141904
142141
|
`).requiredOption(`--bucket-id <bucket-id>`, `Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](https://appwrite.io/docs/server/storage#createBucket).`).requiredOption(`--file-id <file-id>`, `File ID. Choose a custom ID or generate a random ID with \`ID.unique()\`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.`).requiredOption(`--file <file>`, `Binary file. Appwrite SDKs provide helpers to handle file input. [Learn about file input](https://appwrite.io/docs/products/storage/upload-download#input-file).`).option(`--permissions [permissions...]`, `An array of permission strings. By default, only the current user is granted all permissions. [Learn more about permissions](https://appwrite.io/docs/permissions).`).action(
|
|
141905
142142
|
actionRunner(
|
|
141906
|
-
async ({ bucketId, fileId, file: file2, permissions }) => parse3(await (await getStorageClient()).createFile(bucketId, fileId, file2, permissions))
|
|
142143
|
+
async ({ bucketId, fileId, file: file2, permissions }) => parse3(await (await getStorageClient()).createFile(bucketId, fileId, file2 !== void 0 ? await resolveFileParam(file2) : void 0, permissions))
|
|
141907
142144
|
)
|
|
141908
142145
|
);
|
|
141909
142146
|
storage.command(`get-file`).description(`Get a file by its unique ID. This endpoint response returns a JSON object with the file metadata.`).requiredOption(`--bucket-id <bucket-id>`, `Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](https://appwrite.io/docs/server/storage#createBucket).`).requiredOption(`--file-id <file-id>`, `File ID.`).action(
|
|
@@ -142984,6 +143221,69 @@ vcs.command(`delete-installation`).description(`Delete a VCS installation by its
|
|
|
142984
143221
|
)
|
|
142985
143222
|
);
|
|
142986
143223
|
|
|
143224
|
+
// lib/commands/services/webhooks.ts
|
|
143225
|
+
var webhooksClient = null;
|
|
143226
|
+
var getWebhooksClient = async () => {
|
|
143227
|
+
if (!webhooksClient) {
|
|
143228
|
+
const sdkClient = await sdkForProject();
|
|
143229
|
+
webhooksClient = new Webhooks(sdkClient);
|
|
143230
|
+
}
|
|
143231
|
+
return webhooksClient;
|
|
143232
|
+
};
|
|
143233
|
+
var webhooks = new Command("webhooks").description(commandDescriptions["webhooks"] ?? "").configureHelp({
|
|
143234
|
+
helpWidth: process.stdout.columns || 80
|
|
143235
|
+
});
|
|
143236
|
+
webhooks.command(`list`).description(`Get a list of all webhooks belonging to the project. You can use the query params to filter your results.`).option(`--queries [queries...]`, `Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name, url, httpUser, security, events, enabled, logs, attempts`).option(
|
|
143237
|
+
`--total [value]`,
|
|
143238
|
+
`When set to false, the total count returned will be 0 and will not be calculated.`,
|
|
143239
|
+
(value) => value === void 0 ? true : parseBool(value)
|
|
143240
|
+
).action(
|
|
143241
|
+
actionRunner(
|
|
143242
|
+
async ({ queries, total }) => parse3(await (await getWebhooksClient()).list(queries, total))
|
|
143243
|
+
)
|
|
143244
|
+
);
|
|
143245
|
+
webhooks.command(`create`).description(`Create a new webhook. Use this endpoint to configure a URL that will receive events from Appwrite when specific events occur.`).requiredOption(`--webhook-id <webhook-id>`, `Webhook ID. Choose a custom ID or generate a random ID with \`ID.unique()\`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.`).requiredOption(`--url <url>`, `Webhook URL.`).requiredOption(`--name <name>`, `Webhook name. Max length: 128 chars.`).requiredOption(`--events [events...]`, `Events list. Maximum of 100 events are allowed.`).option(
|
|
143246
|
+
`--enabled [value]`,
|
|
143247
|
+
`Enable or disable a webhook.`,
|
|
143248
|
+
(value) => value === void 0 ? true : parseBool(value)
|
|
143249
|
+
).option(
|
|
143250
|
+
`--security [value]`,
|
|
143251
|
+
`Certificate verification, false for disabled or true for enabled.`,
|
|
143252
|
+
(value) => value === void 0 ? true : parseBool(value)
|
|
143253
|
+
).option(`--http-user <http-user>`, `Webhook HTTP user. Max length: 256 chars.`).option(`--http-pass <http-pass>`, `Webhook HTTP password. Max length: 256 chars.`).action(
|
|
143254
|
+
actionRunner(
|
|
143255
|
+
async ({ webhookId, url: url2, name, events, enabled, security, httpUser, httpPass }) => parse3(await (await getWebhooksClient()).create(webhookId, url2, name, events, enabled, security, httpUser, httpPass))
|
|
143256
|
+
)
|
|
143257
|
+
);
|
|
143258
|
+
webhooks.command(`get`).description(`Get a webhook by its unique ID. This endpoint returns details about a specific webhook configured for a project. `).requiredOption(`--webhook-id <webhook-id>`, `Webhook ID.`).action(
|
|
143259
|
+
actionRunner(
|
|
143260
|
+
async ({ webhookId }) => parse3(await (await getWebhooksClient()).get(webhookId))
|
|
143261
|
+
)
|
|
143262
|
+
);
|
|
143263
|
+
webhooks.command(`update`).description(`Update a webhook by its unique ID. Use this endpoint to update the URL, events, or status of an existing webhook.`).requiredOption(`--webhook-id <webhook-id>`, `Webhook ID.`).requiredOption(`--name <name>`, `Webhook name. Max length: 128 chars.`).requiredOption(`--url <url>`, `Webhook URL.`).requiredOption(`--events [events...]`, `Events list. Maximum of 100 events are allowed.`).option(
|
|
143264
|
+
`--enabled [value]`,
|
|
143265
|
+
`Enable or disable a webhook.`,
|
|
143266
|
+
(value) => value === void 0 ? true : parseBool(value)
|
|
143267
|
+
).option(
|
|
143268
|
+
`--security [value]`,
|
|
143269
|
+
`Certificate verification, false for disabled or true for enabled.`,
|
|
143270
|
+
(value) => value === void 0 ? true : parseBool(value)
|
|
143271
|
+
).option(`--http-user <http-user>`, `Webhook HTTP user. Max length: 256 chars.`).option(`--http-pass <http-pass>`, `Webhook HTTP password. Max length: 256 chars.`).action(
|
|
143272
|
+
actionRunner(
|
|
143273
|
+
async ({ webhookId, name, url: url2, events, enabled, security, httpUser, httpPass }) => parse3(await (await getWebhooksClient()).update(webhookId, name, url2, events, enabled, security, httpUser, httpPass))
|
|
143274
|
+
)
|
|
143275
|
+
);
|
|
143276
|
+
webhooks.command(`delete`).description(`Delete a webhook by its unique ID. Once deleted, the webhook will no longer receive project events. `).requiredOption(`--webhook-id <webhook-id>`, `Webhook ID.`).action(
|
|
143277
|
+
actionRunner(
|
|
143278
|
+
async ({ webhookId }) => parse3(await (await getWebhooksClient()).delete(webhookId))
|
|
143279
|
+
)
|
|
143280
|
+
);
|
|
143281
|
+
webhooks.command(`update-signature`).description(`Update the webhook signature key. This endpoint can be used to regenerate the signature key used to sign and validate payload deliveries for a specific webhook.`).requiredOption(`--webhook-id <webhook-id>`, `Webhook ID.`).action(
|
|
143282
|
+
actionRunner(
|
|
143283
|
+
async ({ webhookId }) => parse3(await (await getWebhooksClient()).updateSignature(webhookId))
|
|
143284
|
+
)
|
|
143285
|
+
);
|
|
143286
|
+
|
|
142987
143287
|
// cli.ts
|
|
142988
143288
|
var oldWidth = process.stdout.columns;
|
|
142989
143289
|
process.stdout.columns = 100;
|
|
@@ -143035,7 +143335,7 @@ if (process.argv.includes("-v") || process.argv.includes("--version")) {
|
|
|
143035
143335
|
cliConfig.all = true;
|
|
143036
143336
|
}).on("option:id", function() {
|
|
143037
143337
|
cliConfig.ids = this.opts().id;
|
|
143038
|
-
}).showSuggestionAfterError().addCommand(whoami).addCommand(register).addCommand(login).addCommand(init).addCommand(pull).addCommand(push).addCommand(types).addCommand(deploy).addCommand(run).addCommand(update).addCommand(generate).addCommand(logout).addCommand(account).addCommand(activities).addCommand(backups).addCommand(databases).addCommand(functions).addCommand(graphql).addCommand(health).addCommand(locale).addCommand(messaging).addCommand(migrations).addCommand(project).addCommand(projects).addCommand(proxy).addCommand(sites).addCommand(storage).addCommand(tablesDB).addCommand(teams).addCommand(tokens).addCommand(users).addCommand(vcs).addCommand(client).parse(process.argv);
|
|
143338
|
+
}).showSuggestionAfterError().addCommand(whoami).addCommand(register).addCommand(login).addCommand(init).addCommand(pull).addCommand(push).addCommand(types).addCommand(deploy).addCommand(run).addCommand(update).addCommand(generate).addCommand(logout).addCommand(account).addCommand(activities).addCommand(backups).addCommand(databases).addCommand(functions).addCommand(graphql).addCommand(health).addCommand(locale).addCommand(messaging).addCommand(migrations).addCommand(project).addCommand(projects).addCommand(proxy).addCommand(sites).addCommand(storage).addCommand(tablesDB).addCommand(teams).addCommand(tokens).addCommand(users).addCommand(vcs).addCommand(webhooks).addCommand(client).parse(process.argv);
|
|
143039
143339
|
process.stdout.columns = oldWidth;
|
|
143040
143340
|
}
|
|
143041
143341
|
/*! Bundled license information:
|