pinme 1.2.2-alpha.1 → 1.2.2-alpha.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +1144 -1545
- package/package.json +1 -1
- package/dist/utils/getDeviceId.js +0 -61
package/dist/index.js
CHANGED
|
@@ -8,10 +8,6 @@ var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
|
8
8
|
var __commonJS = (cb, mod) => function __require() {
|
|
9
9
|
return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
|
|
10
10
|
};
|
|
11
|
-
var __export = (target, all3) => {
|
|
12
|
-
for (var name in all3)
|
|
13
|
-
__defProp(target, name, { get: all3[name], enumerable: true });
|
|
14
|
-
};
|
|
15
11
|
var __copyProps = (to, from, except, desc) => {
|
|
16
12
|
if (from && typeof from === "object" || typeof from === "function") {
|
|
17
13
|
for (let key of __getOwnPropNames(from))
|
|
@@ -29,9 +25,9 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
29
25
|
mod
|
|
30
26
|
));
|
|
31
27
|
|
|
32
|
-
// node_modules/dotenv/package.json
|
|
28
|
+
// node_modules/.pnpm/dotenv@16.5.0/node_modules/dotenv/package.json
|
|
33
29
|
var require_package = __commonJS({
|
|
34
|
-
"node_modules/dotenv/package.json"(exports2, module2) {
|
|
30
|
+
"node_modules/.pnpm/dotenv@16.5.0/node_modules/dotenv/package.json"(exports2, module2) {
|
|
35
31
|
module2.exports = {
|
|
36
32
|
name: "dotenv",
|
|
37
33
|
version: "16.5.0",
|
|
@@ -97,13 +93,13 @@ var require_package = __commonJS({
|
|
|
97
93
|
}
|
|
98
94
|
});
|
|
99
95
|
|
|
100
|
-
// node_modules/dotenv/lib/main.js
|
|
96
|
+
// node_modules/.pnpm/dotenv@16.5.0/node_modules/dotenv/lib/main.js
|
|
101
97
|
var require_main = __commonJS({
|
|
102
|
-
"node_modules/dotenv/lib/main.js"(exports2, module2) {
|
|
103
|
-
var
|
|
104
|
-
var
|
|
105
|
-
var
|
|
106
|
-
var
|
|
98
|
+
"node_modules/.pnpm/dotenv@16.5.0/node_modules/dotenv/lib/main.js"(exports2, module2) {
|
|
99
|
+
var fs9 = require("fs");
|
|
100
|
+
var path9 = require("path");
|
|
101
|
+
var os5 = require("os");
|
|
102
|
+
var crypto2 = require("crypto");
|
|
107
103
|
var packageJson = require_package();
|
|
108
104
|
var version2 = packageJson.version;
|
|
109
105
|
var LINE = /(?:^|^)\s*(?:export\s+)?([\w.-]+)(?:\s*=\s*?|:\s+?)(\s*'(?:\\'|[^'])*'|\s*"(?:\\"|[^"])*"|\s*`(?:\\`|[^`])*`|[^#\r\n]+)?\s*(?:#.*)?(?:$|$)/mg;
|
|
@@ -204,7 +200,7 @@ var require_main = __commonJS({
|
|
|
204
200
|
if (options && options.path && options.path.length > 0) {
|
|
205
201
|
if (Array.isArray(options.path)) {
|
|
206
202
|
for (const filepath of options.path) {
|
|
207
|
-
if (
|
|
203
|
+
if (fs9.existsSync(filepath)) {
|
|
208
204
|
possibleVaultPath = filepath.endsWith(".vault") ? filepath : `${filepath}.vault`;
|
|
209
205
|
}
|
|
210
206
|
}
|
|
@@ -212,15 +208,15 @@ var require_main = __commonJS({
|
|
|
212
208
|
possibleVaultPath = options.path.endsWith(".vault") ? options.path : `${options.path}.vault`;
|
|
213
209
|
}
|
|
214
210
|
} else {
|
|
215
|
-
possibleVaultPath =
|
|
211
|
+
possibleVaultPath = path9.resolve(process.cwd(), ".env.vault");
|
|
216
212
|
}
|
|
217
|
-
if (
|
|
213
|
+
if (fs9.existsSync(possibleVaultPath)) {
|
|
218
214
|
return possibleVaultPath;
|
|
219
215
|
}
|
|
220
216
|
return null;
|
|
221
217
|
}
|
|
222
218
|
function _resolveHome(envPath) {
|
|
223
|
-
return envPath[0] === "~" ?
|
|
219
|
+
return envPath[0] === "~" ? path9.join(os5.homedir(), envPath.slice(1)) : envPath;
|
|
224
220
|
}
|
|
225
221
|
function _configVault(options) {
|
|
226
222
|
const debug = Boolean(options && options.debug);
|
|
@@ -236,7 +232,7 @@ var require_main = __commonJS({
|
|
|
236
232
|
return { parsed };
|
|
237
233
|
}
|
|
238
234
|
function configDotenv(options) {
|
|
239
|
-
const dotenvPath =
|
|
235
|
+
const dotenvPath = path9.resolve(process.cwd(), ".env");
|
|
240
236
|
let encoding = "utf8";
|
|
241
237
|
const debug = Boolean(options && options.debug);
|
|
242
238
|
if (options && options.encoding) {
|
|
@@ -259,13 +255,13 @@ var require_main = __commonJS({
|
|
|
259
255
|
}
|
|
260
256
|
let lastError;
|
|
261
257
|
const parsedAll = {};
|
|
262
|
-
for (const
|
|
258
|
+
for (const path10 of optionPaths) {
|
|
263
259
|
try {
|
|
264
|
-
const parsed = DotenvModule.parse(
|
|
260
|
+
const parsed = DotenvModule.parse(fs9.readFileSync(path10, { encoding }));
|
|
265
261
|
DotenvModule.populate(parsedAll, parsed, options);
|
|
266
262
|
} catch (e) {
|
|
267
263
|
if (debug) {
|
|
268
|
-
_debug(`Failed to load ${
|
|
264
|
+
_debug(`Failed to load ${path10} ${e.message}`);
|
|
269
265
|
}
|
|
270
266
|
lastError = e;
|
|
271
267
|
}
|
|
@@ -299,7 +295,7 @@ var require_main = __commonJS({
|
|
|
299
295
|
const authTag = ciphertext.subarray(-16);
|
|
300
296
|
ciphertext = ciphertext.subarray(12, -16);
|
|
301
297
|
try {
|
|
302
|
-
const aesgcm =
|
|
298
|
+
const aesgcm = crypto2.createDecipheriv("aes-256-gcm", key, nonce);
|
|
303
299
|
aesgcm.setAuthTag(authTag);
|
|
304
300
|
return `${aesgcm.update(ciphertext)}${aesgcm.final()}`;
|
|
305
301
|
} catch (error) {
|
|
@@ -364,9 +360,9 @@ var require_main = __commonJS({
|
|
|
364
360
|
}
|
|
365
361
|
});
|
|
366
362
|
|
|
367
|
-
// node_modules/proxy-from-env/index.js
|
|
363
|
+
// node_modules/.pnpm/proxy-from-env@1.1.0/node_modules/proxy-from-env/index.js
|
|
368
364
|
var require_proxy_from_env = __commonJS({
|
|
369
|
-
"node_modules/proxy-from-env/index.js"(exports2) {
|
|
365
|
+
"node_modules/.pnpm/proxy-from-env@1.1.0/node_modules/proxy-from-env/index.js"(exports2) {
|
|
370
366
|
"use strict";
|
|
371
367
|
var parseUrl = require("url").parse;
|
|
372
368
|
var DEFAULT_PORTS = {
|
|
@@ -380,7 +376,7 @@ var require_proxy_from_env = __commonJS({
|
|
|
380
376
|
var stringEndsWith = String.prototype.endsWith || function(s) {
|
|
381
377
|
return s.length <= this.length && this.indexOf(s, this.length - s.length) !== -1;
|
|
382
378
|
};
|
|
383
|
-
function
|
|
379
|
+
function getProxyForUrl2(url2) {
|
|
384
380
|
var parsedUrl = typeof url2 === "string" ? parseUrl(url2) : url2 || {};
|
|
385
381
|
var proto = parsedUrl.protocol;
|
|
386
382
|
var hostname = parsedUrl.host;
|
|
@@ -430,13 +426,13 @@ var require_proxy_from_env = __commonJS({
|
|
|
430
426
|
function getEnv(key) {
|
|
431
427
|
return process.env[key.toLowerCase()] || process.env[key.toUpperCase()] || "";
|
|
432
428
|
}
|
|
433
|
-
exports2.getProxyForUrl =
|
|
429
|
+
exports2.getProxyForUrl = getProxyForUrl2;
|
|
434
430
|
}
|
|
435
431
|
});
|
|
436
432
|
|
|
437
|
-
// node_modules/ms/index.js
|
|
433
|
+
// node_modules/.pnpm/ms@2.1.2/node_modules/ms/index.js
|
|
438
434
|
var require_ms = __commonJS({
|
|
439
|
-
"node_modules/ms/index.js"(exports2, module2) {
|
|
435
|
+
"node_modules/.pnpm/ms@2.1.2/node_modules/ms/index.js"(exports2, module2) {
|
|
440
436
|
var s = 1e3;
|
|
441
437
|
var m = s * 60;
|
|
442
438
|
var h = m * 60;
|
|
@@ -550,9 +546,10 @@ var require_ms = __commonJS({
|
|
|
550
546
|
}
|
|
551
547
|
});
|
|
552
548
|
|
|
553
|
-
// node_modules/debug/src/common.js
|
|
549
|
+
// node_modules/.pnpm/debug@3.2.7/node_modules/debug/src/common.js
|
|
554
550
|
var require_common = __commonJS({
|
|
555
|
-
"node_modules/debug/src/common.js"(exports2, module2) {
|
|
551
|
+
"node_modules/.pnpm/debug@3.2.7/node_modules/debug/src/common.js"(exports2, module2) {
|
|
552
|
+
"use strict";
|
|
556
553
|
function setup(env) {
|
|
557
554
|
createDebug.debug = createDebug;
|
|
558
555
|
createDebug.default = createDebug;
|
|
@@ -561,16 +558,16 @@ var require_common = __commonJS({
|
|
|
561
558
|
createDebug.enable = enable;
|
|
562
559
|
createDebug.enabled = enabled;
|
|
563
560
|
createDebug.humanize = require_ms();
|
|
564
|
-
|
|
565
|
-
Object.keys(env).forEach((key) => {
|
|
561
|
+
Object.keys(env).forEach(function(key) {
|
|
566
562
|
createDebug[key] = env[key];
|
|
567
563
|
});
|
|
564
|
+
createDebug.instances = [];
|
|
568
565
|
createDebug.names = [];
|
|
569
566
|
createDebug.skips = [];
|
|
570
567
|
createDebug.formatters = {};
|
|
571
568
|
function selectColor(namespace) {
|
|
572
|
-
|
|
573
|
-
for (
|
|
569
|
+
var hash = 0;
|
|
570
|
+
for (var i = 0; i < namespace.length; i++) {
|
|
574
571
|
hash = (hash << 5) - hash + namespace.charCodeAt(i);
|
|
575
572
|
hash |= 0;
|
|
576
573
|
}
|
|
@@ -578,17 +575,17 @@ var require_common = __commonJS({
|
|
|
578
575
|
}
|
|
579
576
|
createDebug.selectColor = selectColor;
|
|
580
577
|
function createDebug(namespace) {
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
let namespacesCache;
|
|
584
|
-
let enabledCache;
|
|
585
|
-
function debug(...args) {
|
|
578
|
+
var prevTime;
|
|
579
|
+
function debug() {
|
|
586
580
|
if (!debug.enabled) {
|
|
587
581
|
return;
|
|
588
582
|
}
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
583
|
+
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
584
|
+
args[_key] = arguments[_key];
|
|
585
|
+
}
|
|
586
|
+
var self2 = debug;
|
|
587
|
+
var curr = Number(/* @__PURE__ */ new Date());
|
|
588
|
+
var ms = curr - (prevTime || curr);
|
|
592
589
|
self2.diff = ms;
|
|
593
590
|
self2.prev = prevTime;
|
|
594
591
|
self2.curr = curr;
|
|
@@ -597,15 +594,15 @@ var require_common = __commonJS({
|
|
|
597
594
|
if (typeof args[0] !== "string") {
|
|
598
595
|
args.unshift("%O");
|
|
599
596
|
}
|
|
600
|
-
|
|
601
|
-
args[0] = args[0].replace(/%([a-zA-Z%])/g, (match, format)
|
|
597
|
+
var index = 0;
|
|
598
|
+
args[0] = args[0].replace(/%([a-zA-Z%])/g, function(match, format) {
|
|
602
599
|
if (match === "%%") {
|
|
603
|
-
return
|
|
600
|
+
return match;
|
|
604
601
|
}
|
|
605
602
|
index++;
|
|
606
|
-
|
|
603
|
+
var formatter = createDebug.formatters[format];
|
|
607
604
|
if (typeof formatter === "function") {
|
|
608
|
-
|
|
605
|
+
var val = args[index];
|
|
609
606
|
match = formatter.call(self2, val);
|
|
610
607
|
args.splice(index, 1);
|
|
611
608
|
index--;
|
|
@@ -613,99 +610,71 @@ var require_common = __commonJS({
|
|
|
613
610
|
return match;
|
|
614
611
|
});
|
|
615
612
|
createDebug.formatArgs.call(self2, args);
|
|
616
|
-
|
|
613
|
+
var logFn = self2.log || createDebug.log;
|
|
617
614
|
logFn.apply(self2, args);
|
|
618
615
|
}
|
|
619
616
|
debug.namespace = namespace;
|
|
617
|
+
debug.enabled = createDebug.enabled(namespace);
|
|
620
618
|
debug.useColors = createDebug.useColors();
|
|
621
|
-
debug.color =
|
|
619
|
+
debug.color = selectColor(namespace);
|
|
620
|
+
debug.destroy = destroy;
|
|
622
621
|
debug.extend = extend2;
|
|
623
|
-
debug.destroy = createDebug.destroy;
|
|
624
|
-
Object.defineProperty(debug, "enabled", {
|
|
625
|
-
enumerable: true,
|
|
626
|
-
configurable: false,
|
|
627
|
-
get: () => {
|
|
628
|
-
if (enableOverride !== null) {
|
|
629
|
-
return enableOverride;
|
|
630
|
-
}
|
|
631
|
-
if (namespacesCache !== createDebug.namespaces) {
|
|
632
|
-
namespacesCache = createDebug.namespaces;
|
|
633
|
-
enabledCache = createDebug.enabled(namespace);
|
|
634
|
-
}
|
|
635
|
-
return enabledCache;
|
|
636
|
-
},
|
|
637
|
-
set: (v) => {
|
|
638
|
-
enableOverride = v;
|
|
639
|
-
}
|
|
640
|
-
});
|
|
641
622
|
if (typeof createDebug.init === "function") {
|
|
642
623
|
createDebug.init(debug);
|
|
643
624
|
}
|
|
625
|
+
createDebug.instances.push(debug);
|
|
644
626
|
return debug;
|
|
645
627
|
}
|
|
628
|
+
function destroy() {
|
|
629
|
+
var index = createDebug.instances.indexOf(this);
|
|
630
|
+
if (index !== -1) {
|
|
631
|
+
createDebug.instances.splice(index, 1);
|
|
632
|
+
return true;
|
|
633
|
+
}
|
|
634
|
+
return false;
|
|
635
|
+
}
|
|
646
636
|
function extend2(namespace, delimiter) {
|
|
647
|
-
|
|
648
|
-
newDebug.log = this.log;
|
|
649
|
-
return newDebug;
|
|
637
|
+
return createDebug(this.namespace + (typeof delimiter === "undefined" ? ":" : delimiter) + namespace);
|
|
650
638
|
}
|
|
651
639
|
function enable(namespaces) {
|
|
652
640
|
createDebug.save(namespaces);
|
|
653
|
-
createDebug.namespaces = namespaces;
|
|
654
641
|
createDebug.names = [];
|
|
655
642
|
createDebug.skips = [];
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
643
|
+
var i;
|
|
644
|
+
var split = (typeof namespaces === "string" ? namespaces : "").split(/[\s,]+/);
|
|
645
|
+
var len = split.length;
|
|
646
|
+
for (i = 0; i < len; i++) {
|
|
647
|
+
if (!split[i]) {
|
|
648
|
+
continue;
|
|
662
649
|
}
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
let searchIndex = 0;
|
|
667
|
-
let templateIndex = 0;
|
|
668
|
-
let starIndex = -1;
|
|
669
|
-
let matchIndex = 0;
|
|
670
|
-
while (searchIndex < search.length) {
|
|
671
|
-
if (templateIndex < template.length && (template[templateIndex] === search[searchIndex] || template[templateIndex] === "*")) {
|
|
672
|
-
if (template[templateIndex] === "*") {
|
|
673
|
-
starIndex = templateIndex;
|
|
674
|
-
matchIndex = searchIndex;
|
|
675
|
-
templateIndex++;
|
|
676
|
-
} else {
|
|
677
|
-
searchIndex++;
|
|
678
|
-
templateIndex++;
|
|
679
|
-
}
|
|
680
|
-
} else if (starIndex !== -1) {
|
|
681
|
-
templateIndex = starIndex + 1;
|
|
682
|
-
matchIndex++;
|
|
683
|
-
searchIndex = matchIndex;
|
|
650
|
+
namespaces = split[i].replace(/\*/g, ".*?");
|
|
651
|
+
if (namespaces[0] === "-") {
|
|
652
|
+
createDebug.skips.push(new RegExp("^" + namespaces.substr(1) + "$"));
|
|
684
653
|
} else {
|
|
685
|
-
|
|
654
|
+
createDebug.names.push(new RegExp("^" + namespaces + "$"));
|
|
686
655
|
}
|
|
687
656
|
}
|
|
688
|
-
|
|
689
|
-
|
|
657
|
+
for (i = 0; i < createDebug.instances.length; i++) {
|
|
658
|
+
var instance = createDebug.instances[i];
|
|
659
|
+
instance.enabled = createDebug.enabled(instance.namespace);
|
|
690
660
|
}
|
|
691
|
-
return templateIndex === template.length;
|
|
692
661
|
}
|
|
693
662
|
function disable() {
|
|
694
|
-
const namespaces = [
|
|
695
|
-
...createDebug.names,
|
|
696
|
-
...createDebug.skips.map((namespace) => "-" + namespace)
|
|
697
|
-
].join(",");
|
|
698
663
|
createDebug.enable("");
|
|
699
|
-
return namespaces;
|
|
700
664
|
}
|
|
701
665
|
function enabled(name) {
|
|
702
|
-
|
|
703
|
-
|
|
666
|
+
if (name[name.length - 1] === "*") {
|
|
667
|
+
return true;
|
|
668
|
+
}
|
|
669
|
+
var i;
|
|
670
|
+
var len;
|
|
671
|
+
for (i = 0, len = createDebug.skips.length; i < len; i++) {
|
|
672
|
+
if (createDebug.skips[i].test(name)) {
|
|
704
673
|
return false;
|
|
705
674
|
}
|
|
706
675
|
}
|
|
707
|
-
for (
|
|
708
|
-
if (
|
|
676
|
+
for (i = 0, len = createDebug.names.length; i < len; i++) {
|
|
677
|
+
if (createDebug.names[i].test(name)) {
|
|
709
678
|
return true;
|
|
710
679
|
}
|
|
711
680
|
}
|
|
@@ -717,9 +686,6 @@ var require_common = __commonJS({
|
|
|
717
686
|
}
|
|
718
687
|
return val;
|
|
719
688
|
}
|
|
720
|
-
function destroy() {
|
|
721
|
-
console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.");
|
|
722
|
-
}
|
|
723
689
|
createDebug.enable(createDebug.load());
|
|
724
690
|
return createDebug;
|
|
725
691
|
}
|
|
@@ -727,101 +693,29 @@ var require_common = __commonJS({
|
|
|
727
693
|
}
|
|
728
694
|
});
|
|
729
695
|
|
|
730
|
-
// node_modules/debug/src/browser.js
|
|
696
|
+
// node_modules/.pnpm/debug@3.2.7/node_modules/debug/src/browser.js
|
|
731
697
|
var require_browser = __commonJS({
|
|
732
|
-
"node_modules/debug/src/browser.js"(exports2, module2) {
|
|
698
|
+
"node_modules/.pnpm/debug@3.2.7/node_modules/debug/src/browser.js"(exports2, module2) {
|
|
699
|
+
"use strict";
|
|
700
|
+
function _typeof(obj) {
|
|
701
|
+
if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") {
|
|
702
|
+
_typeof = function _typeof2(obj2) {
|
|
703
|
+
return typeof obj2;
|
|
704
|
+
};
|
|
705
|
+
} else {
|
|
706
|
+
_typeof = function _typeof2(obj2) {
|
|
707
|
+
return obj2 && typeof Symbol === "function" && obj2.constructor === Symbol && obj2 !== Symbol.prototype ? "symbol" : typeof obj2;
|
|
708
|
+
};
|
|
709
|
+
}
|
|
710
|
+
return _typeof(obj);
|
|
711
|
+
}
|
|
712
|
+
exports2.log = log;
|
|
733
713
|
exports2.formatArgs = formatArgs;
|
|
734
714
|
exports2.save = save;
|
|
735
715
|
exports2.load = load;
|
|
736
716
|
exports2.useColors = useColors;
|
|
737
717
|
exports2.storage = localstorage();
|
|
738
|
-
exports2.
|
|
739
|
-
let warned = false;
|
|
740
|
-
return () => {
|
|
741
|
-
if (!warned) {
|
|
742
|
-
warned = true;
|
|
743
|
-
console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.");
|
|
744
|
-
}
|
|
745
|
-
};
|
|
746
|
-
})();
|
|
747
|
-
exports2.colors = [
|
|
748
|
-
"#0000CC",
|
|
749
|
-
"#0000FF",
|
|
750
|
-
"#0033CC",
|
|
751
|
-
"#0033FF",
|
|
752
|
-
"#0066CC",
|
|
753
|
-
"#0066FF",
|
|
754
|
-
"#0099CC",
|
|
755
|
-
"#0099FF",
|
|
756
|
-
"#00CC00",
|
|
757
|
-
"#00CC33",
|
|
758
|
-
"#00CC66",
|
|
759
|
-
"#00CC99",
|
|
760
|
-
"#00CCCC",
|
|
761
|
-
"#00CCFF",
|
|
762
|
-
"#3300CC",
|
|
763
|
-
"#3300FF",
|
|
764
|
-
"#3333CC",
|
|
765
|
-
"#3333FF",
|
|
766
|
-
"#3366CC",
|
|
767
|
-
"#3366FF",
|
|
768
|
-
"#3399CC",
|
|
769
|
-
"#3399FF",
|
|
770
|
-
"#33CC00",
|
|
771
|
-
"#33CC33",
|
|
772
|
-
"#33CC66",
|
|
773
|
-
"#33CC99",
|
|
774
|
-
"#33CCCC",
|
|
775
|
-
"#33CCFF",
|
|
776
|
-
"#6600CC",
|
|
777
|
-
"#6600FF",
|
|
778
|
-
"#6633CC",
|
|
779
|
-
"#6633FF",
|
|
780
|
-
"#66CC00",
|
|
781
|
-
"#66CC33",
|
|
782
|
-
"#9900CC",
|
|
783
|
-
"#9900FF",
|
|
784
|
-
"#9933CC",
|
|
785
|
-
"#9933FF",
|
|
786
|
-
"#99CC00",
|
|
787
|
-
"#99CC33",
|
|
788
|
-
"#CC0000",
|
|
789
|
-
"#CC0033",
|
|
790
|
-
"#CC0066",
|
|
791
|
-
"#CC0099",
|
|
792
|
-
"#CC00CC",
|
|
793
|
-
"#CC00FF",
|
|
794
|
-
"#CC3300",
|
|
795
|
-
"#CC3333",
|
|
796
|
-
"#CC3366",
|
|
797
|
-
"#CC3399",
|
|
798
|
-
"#CC33CC",
|
|
799
|
-
"#CC33FF",
|
|
800
|
-
"#CC6600",
|
|
801
|
-
"#CC6633",
|
|
802
|
-
"#CC9900",
|
|
803
|
-
"#CC9933",
|
|
804
|
-
"#CCCC00",
|
|
805
|
-
"#CCCC33",
|
|
806
|
-
"#FF0000",
|
|
807
|
-
"#FF0033",
|
|
808
|
-
"#FF0066",
|
|
809
|
-
"#FF0099",
|
|
810
|
-
"#FF00CC",
|
|
811
|
-
"#FF00FF",
|
|
812
|
-
"#FF3300",
|
|
813
|
-
"#FF3333",
|
|
814
|
-
"#FF3366",
|
|
815
|
-
"#FF3399",
|
|
816
|
-
"#FF33CC",
|
|
817
|
-
"#FF33FF",
|
|
818
|
-
"#FF6600",
|
|
819
|
-
"#FF6633",
|
|
820
|
-
"#FF9900",
|
|
821
|
-
"#FF9933",
|
|
822
|
-
"#FFCC00",
|
|
823
|
-
"#FFCC33"
|
|
824
|
-
];
|
|
718
|
+
exports2.colors = ["#0000CC", "#0000FF", "#0033CC", "#0033FF", "#0066CC", "#0066FF", "#0099CC", "#0099FF", "#00CC00", "#00CC33", "#00CC66", "#00CC99", "#00CCCC", "#00CCFF", "#3300CC", "#3300FF", "#3333CC", "#3333FF", "#3366CC", "#3366FF", "#3399CC", "#3399FF", "#33CC00", "#33CC33", "#33CC66", "#33CC99", "#33CCCC", "#33CCFF", "#6600CC", "#6600FF", "#6633CC", "#6633FF", "#66CC00", "#66CC33", "#9900CC", "#9900FF", "#9933CC", "#9933FF", "#99CC00", "#99CC33", "#CC0000", "#CC0033", "#CC0066", "#CC0099", "#CC00CC", "#CC00FF", "#CC3300", "#CC3333", "#CC3366", "#CC3399", "#CC33CC", "#CC33FF", "#CC6600", "#CC6633", "#CC9900", "#CC9933", "#CCCC00", "#CCCC33", "#FF0000", "#FF0033", "#FF0066", "#FF0099", "#FF00CC", "#FF00FF", "#FF3300", "#FF3333", "#FF3366", "#FF3399", "#FF33CC", "#FF33FF", "#FF6600", "#FF6633", "#FF9900", "#FF9933", "#FFCC00", "#FFCC33"];
|
|
825
719
|
function useColors() {
|
|
826
720
|
if (typeof window !== "undefined" && window.process && (window.process.type === "renderer" || window.process.__nwjs)) {
|
|
827
721
|
return true;
|
|
@@ -829,11 +723,10 @@ var require_browser = __commonJS({
|
|
|
829
723
|
if (typeof navigator !== "undefined" && navigator.userAgent && navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/)) {
|
|
830
724
|
return false;
|
|
831
725
|
}
|
|
832
|
-
let m;
|
|
833
726
|
return typeof document !== "undefined" && document.documentElement && document.documentElement.style && document.documentElement.style.WebkitAppearance || // Is firebug? http://stackoverflow.com/a/398120/376773
|
|
834
727
|
typeof window !== "undefined" && window.console && (window.console.firebug || window.console.exception && window.console.table) || // Is firefox >= v31?
|
|
835
728
|
// https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages
|
|
836
|
-
typeof navigator !== "undefined" && navigator.userAgent &&
|
|
729
|
+
typeof navigator !== "undefined" && navigator.userAgent && navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/) && parseInt(RegExp.$1, 10) >= 31 || // Double check webkit in userAgent just in case we are in a worker
|
|
837
730
|
typeof navigator !== "undefined" && navigator.userAgent && navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/);
|
|
838
731
|
}
|
|
839
732
|
function formatArgs(args) {
|
|
@@ -841,11 +734,11 @@ var require_browser = __commonJS({
|
|
|
841
734
|
if (!this.useColors) {
|
|
842
735
|
return;
|
|
843
736
|
}
|
|
844
|
-
|
|
737
|
+
var c = "color: " + this.color;
|
|
845
738
|
args.splice(1, 0, c, "color: inherit");
|
|
846
|
-
|
|
847
|
-
|
|
848
|
-
args[0].replace(/%[a-zA-Z%]/g, (match)
|
|
739
|
+
var index = 0;
|
|
740
|
+
var lastC = 0;
|
|
741
|
+
args[0].replace(/%[a-zA-Z%]/g, function(match) {
|
|
849
742
|
if (match === "%%") {
|
|
850
743
|
return;
|
|
851
744
|
}
|
|
@@ -856,8 +749,10 @@ var require_browser = __commonJS({
|
|
|
856
749
|
});
|
|
857
750
|
args.splice(lastC, 0, c);
|
|
858
751
|
}
|
|
859
|
-
|
|
860
|
-
|
|
752
|
+
function log() {
|
|
753
|
+
var _console;
|
|
754
|
+
return (typeof console === "undefined" ? "undefined" : _typeof(console)) === "object" && console.log && (_console = console).log.apply(_console, arguments);
|
|
755
|
+
}
|
|
861
756
|
function save(namespaces) {
|
|
862
757
|
try {
|
|
863
758
|
if (namespaces) {
|
|
@@ -869,9 +764,9 @@ var require_browser = __commonJS({
|
|
|
869
764
|
}
|
|
870
765
|
}
|
|
871
766
|
function load() {
|
|
872
|
-
|
|
767
|
+
var r;
|
|
873
768
|
try {
|
|
874
|
-
r = exports2.storage.getItem("debug")
|
|
769
|
+
r = exports2.storage.getItem("debug");
|
|
875
770
|
} catch (error) {
|
|
876
771
|
}
|
|
877
772
|
if (!r && typeof process !== "undefined" && "env" in process) {
|
|
@@ -886,7 +781,7 @@ var require_browser = __commonJS({
|
|
|
886
781
|
}
|
|
887
782
|
}
|
|
888
783
|
module2.exports = require_common()(exports2);
|
|
889
|
-
var
|
|
784
|
+
var formatters = module2.exports.formatters;
|
|
890
785
|
formatters.j = function(v) {
|
|
891
786
|
try {
|
|
892
787
|
return JSON.stringify(v);
|
|
@@ -897,9 +792,9 @@ var require_browser = __commonJS({
|
|
|
897
792
|
}
|
|
898
793
|
});
|
|
899
794
|
|
|
900
|
-
// node_modules/has-flag/index.js
|
|
795
|
+
// node_modules/.pnpm/has-flag@3.0.0/node_modules/has-flag/index.js
|
|
901
796
|
var require_has_flag = __commonJS({
|
|
902
|
-
"node_modules/has-flag/index.js"(exports2, module2) {
|
|
797
|
+
"node_modules/.pnpm/has-flag@3.0.0/node_modules/has-flag/index.js"(exports2, module2) {
|
|
903
798
|
"use strict";
|
|
904
799
|
module2.exports = (flag, argv) => {
|
|
905
800
|
argv = argv || process.argv;
|
|
@@ -911,11 +806,11 @@ var require_has_flag = __commonJS({
|
|
|
911
806
|
}
|
|
912
807
|
});
|
|
913
808
|
|
|
914
|
-
// node_modules/supports-color/index.js
|
|
809
|
+
// node_modules/.pnpm/supports-color@5.5.0/node_modules/supports-color/index.js
|
|
915
810
|
var require_supports_color = __commonJS({
|
|
916
|
-
"node_modules/supports-color/index.js"(exports2, module2) {
|
|
811
|
+
"node_modules/.pnpm/supports-color@5.5.0/node_modules/supports-color/index.js"(exports2, module2) {
|
|
917
812
|
"use strict";
|
|
918
|
-
var
|
|
813
|
+
var os5 = require("os");
|
|
919
814
|
var hasFlag = require_has_flag();
|
|
920
815
|
var env = process.env;
|
|
921
816
|
var forceColor;
|
|
@@ -953,7 +848,7 @@ var require_supports_color = __commonJS({
|
|
|
953
848
|
}
|
|
954
849
|
const min = forceColor ? 1 : 0;
|
|
955
850
|
if (process.platform === "win32") {
|
|
956
|
-
const osRelease =
|
|
851
|
+
const osRelease = os5.release().split(".");
|
|
957
852
|
if (Number(process.versions.node.split(".")[0]) >= 8 && Number(osRelease[0]) >= 10 && Number(osRelease[2]) >= 10586) {
|
|
958
853
|
return Number(osRelease[2]) >= 14931 ? 3 : 2;
|
|
959
854
|
}
|
|
@@ -1006,114 +901,34 @@ var require_supports_color = __commonJS({
|
|
|
1006
901
|
}
|
|
1007
902
|
});
|
|
1008
903
|
|
|
1009
|
-
// node_modules/debug/src/node.js
|
|
904
|
+
// node_modules/.pnpm/debug@3.2.7/node_modules/debug/src/node.js
|
|
1010
905
|
var require_node = __commonJS({
|
|
1011
|
-
"node_modules/debug/src/node.js"(exports2, module2) {
|
|
906
|
+
"node_modules/.pnpm/debug@3.2.7/node_modules/debug/src/node.js"(exports2, module2) {
|
|
907
|
+
"use strict";
|
|
1012
908
|
var tty = require("tty");
|
|
1013
|
-
var
|
|
909
|
+
var util2 = require("util");
|
|
1014
910
|
exports2.init = init;
|
|
1015
911
|
exports2.log = log;
|
|
1016
912
|
exports2.formatArgs = formatArgs;
|
|
1017
913
|
exports2.save = save;
|
|
1018
914
|
exports2.load = load;
|
|
1019
915
|
exports2.useColors = useColors;
|
|
1020
|
-
exports2.destroy = util3.deprecate(
|
|
1021
|
-
() => {
|
|
1022
|
-
},
|
|
1023
|
-
"Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."
|
|
1024
|
-
);
|
|
1025
916
|
exports2.colors = [6, 2, 3, 4, 5, 1];
|
|
1026
917
|
try {
|
|
1027
|
-
|
|
918
|
+
supportsColor = require_supports_color();
|
|
1028
919
|
if (supportsColor && (supportsColor.stderr || supportsColor).level >= 2) {
|
|
1029
|
-
exports2.colors = [
|
|
1030
|
-
20,
|
|
1031
|
-
21,
|
|
1032
|
-
26,
|
|
1033
|
-
27,
|
|
1034
|
-
32,
|
|
1035
|
-
33,
|
|
1036
|
-
38,
|
|
1037
|
-
39,
|
|
1038
|
-
40,
|
|
1039
|
-
41,
|
|
1040
|
-
42,
|
|
1041
|
-
43,
|
|
1042
|
-
44,
|
|
1043
|
-
45,
|
|
1044
|
-
56,
|
|
1045
|
-
57,
|
|
1046
|
-
62,
|
|
1047
|
-
63,
|
|
1048
|
-
68,
|
|
1049
|
-
69,
|
|
1050
|
-
74,
|
|
1051
|
-
75,
|
|
1052
|
-
76,
|
|
1053
|
-
77,
|
|
1054
|
-
78,
|
|
1055
|
-
79,
|
|
1056
|
-
80,
|
|
1057
|
-
81,
|
|
1058
|
-
92,
|
|
1059
|
-
93,
|
|
1060
|
-
98,
|
|
1061
|
-
99,
|
|
1062
|
-
112,
|
|
1063
|
-
113,
|
|
1064
|
-
128,
|
|
1065
|
-
129,
|
|
1066
|
-
134,
|
|
1067
|
-
135,
|
|
1068
|
-
148,
|
|
1069
|
-
149,
|
|
1070
|
-
160,
|
|
1071
|
-
161,
|
|
1072
|
-
162,
|
|
1073
|
-
163,
|
|
1074
|
-
164,
|
|
1075
|
-
165,
|
|
1076
|
-
166,
|
|
1077
|
-
167,
|
|
1078
|
-
168,
|
|
1079
|
-
169,
|
|
1080
|
-
170,
|
|
1081
|
-
171,
|
|
1082
|
-
172,
|
|
1083
|
-
173,
|
|
1084
|
-
178,
|
|
1085
|
-
179,
|
|
1086
|
-
184,
|
|
1087
|
-
185,
|
|
1088
|
-
196,
|
|
1089
|
-
197,
|
|
1090
|
-
198,
|
|
1091
|
-
199,
|
|
1092
|
-
200,
|
|
1093
|
-
201,
|
|
1094
|
-
202,
|
|
1095
|
-
203,
|
|
1096
|
-
204,
|
|
1097
|
-
205,
|
|
1098
|
-
206,
|
|
1099
|
-
207,
|
|
1100
|
-
208,
|
|
1101
|
-
209,
|
|
1102
|
-
214,
|
|
1103
|
-
215,
|
|
1104
|
-
220,
|
|
1105
|
-
221
|
|
1106
|
-
];
|
|
920
|
+
exports2.colors = [20, 21, 26, 27, 32, 33, 38, 39, 40, 41, 42, 43, 44, 45, 56, 57, 62, 63, 68, 69, 74, 75, 76, 77, 78, 79, 80, 81, 92, 93, 98, 99, 112, 113, 128, 129, 134, 135, 148, 149, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 178, 179, 184, 185, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 214, 215, 220, 221];
|
|
1107
921
|
}
|
|
1108
922
|
} catch (error) {
|
|
1109
923
|
}
|
|
1110
|
-
|
|
924
|
+
var supportsColor;
|
|
925
|
+
exports2.inspectOpts = Object.keys(process.env).filter(function(key) {
|
|
1111
926
|
return /^debug_/i.test(key);
|
|
1112
|
-
}).reduce((obj, key)
|
|
1113
|
-
|
|
927
|
+
}).reduce(function(obj, key) {
|
|
928
|
+
var prop = key.substring(6).toLowerCase().replace(/_([a-z])/g, function(_, k) {
|
|
1114
929
|
return k.toUpperCase();
|
|
1115
930
|
});
|
|
1116
|
-
|
|
931
|
+
var val = process.env[key];
|
|
1117
932
|
if (/^(yes|on|true|enabled)$/i.test(val)) {
|
|
1118
933
|
val = true;
|
|
1119
934
|
} else if (/^(no|off|false|disabled)$/i.test(val)) {
|
|
@@ -1130,11 +945,11 @@ var require_node = __commonJS({
|
|
|
1130
945
|
return "colors" in exports2.inspectOpts ? Boolean(exports2.inspectOpts.colors) : tty.isatty(process.stderr.fd);
|
|
1131
946
|
}
|
|
1132
947
|
function formatArgs(args) {
|
|
1133
|
-
|
|
948
|
+
var name = this.namespace, useColors2 = this.useColors;
|
|
1134
949
|
if (useColors2) {
|
|
1135
|
-
|
|
1136
|
-
|
|
1137
|
-
|
|
950
|
+
var c = this.color;
|
|
951
|
+
var colorCode = "\x1B[3" + (c < 8 ? c : "8;5;" + c);
|
|
952
|
+
var prefix = " ".concat(colorCode, ";1m").concat(name, " \x1B[0m");
|
|
1138
953
|
args[0] = prefix + args[0].split("\n").join("\n" + prefix);
|
|
1139
954
|
args.push(colorCode + "m+" + module2.exports.humanize(this.diff) + "\x1B[0m");
|
|
1140
955
|
} else {
|
|
@@ -1147,8 +962,8 @@ var require_node = __commonJS({
|
|
|
1147
962
|
}
|
|
1148
963
|
return (/* @__PURE__ */ new Date()).toISOString() + " ";
|
|
1149
964
|
}
|
|
1150
|
-
function log(
|
|
1151
|
-
return process.stderr.write(
|
|
965
|
+
function log() {
|
|
966
|
+
return process.stderr.write(util2.format.apply(util2, arguments) + "\n");
|
|
1152
967
|
}
|
|
1153
968
|
function save(namespaces) {
|
|
1154
969
|
if (namespaces) {
|
|
@@ -1162,27 +977,30 @@ var require_node = __commonJS({
|
|
|
1162
977
|
}
|
|
1163
978
|
function init(debug) {
|
|
1164
979
|
debug.inspectOpts = {};
|
|
1165
|
-
|
|
1166
|
-
for (
|
|
980
|
+
var keys = Object.keys(exports2.inspectOpts);
|
|
981
|
+
for (var i = 0; i < keys.length; i++) {
|
|
1167
982
|
debug.inspectOpts[keys[i]] = exports2.inspectOpts[keys[i]];
|
|
1168
983
|
}
|
|
1169
984
|
}
|
|
1170
985
|
module2.exports = require_common()(exports2);
|
|
1171
|
-
var
|
|
986
|
+
var formatters = module2.exports.formatters;
|
|
1172
987
|
formatters.o = function(v) {
|
|
1173
988
|
this.inspectOpts.colors = this.useColors;
|
|
1174
|
-
return
|
|
989
|
+
return util2.inspect(v, this.inspectOpts).split("\n").map(function(str) {
|
|
990
|
+
return str.trim();
|
|
991
|
+
}).join(" ");
|
|
1175
992
|
};
|
|
1176
993
|
formatters.O = function(v) {
|
|
1177
994
|
this.inspectOpts.colors = this.useColors;
|
|
1178
|
-
return
|
|
995
|
+
return util2.inspect(v, this.inspectOpts);
|
|
1179
996
|
};
|
|
1180
997
|
}
|
|
1181
998
|
});
|
|
1182
999
|
|
|
1183
|
-
// node_modules/debug/src/index.js
|
|
1000
|
+
// node_modules/.pnpm/debug@3.2.7/node_modules/debug/src/index.js
|
|
1184
1001
|
var require_src = __commonJS({
|
|
1185
|
-
"node_modules/debug/src/index.js"(exports2, module2) {
|
|
1002
|
+
"node_modules/.pnpm/debug@3.2.7/node_modules/debug/src/index.js"(exports2, module2) {
|
|
1003
|
+
"use strict";
|
|
1186
1004
|
if (typeof process === "undefined" || process.type === "renderer" || process.browser === true || process.__nwjs) {
|
|
1187
1005
|
module2.exports = require_browser();
|
|
1188
1006
|
} else {
|
|
@@ -1191,9 +1009,9 @@ var require_src = __commonJS({
|
|
|
1191
1009
|
}
|
|
1192
1010
|
});
|
|
1193
1011
|
|
|
1194
|
-
// node_modules/follow-redirects/debug.js
|
|
1012
|
+
// node_modules/.pnpm/follow-redirects@1.15.2/node_modules/follow-redirects/debug.js
|
|
1195
1013
|
var require_debug = __commonJS({
|
|
1196
|
-
"node_modules/follow-redirects/debug.js"(exports2, module2) {
|
|
1014
|
+
"node_modules/.pnpm/follow-redirects@1.15.2/node_modules/follow-redirects/debug.js"(exports2, module2) {
|
|
1197
1015
|
var debug;
|
|
1198
1016
|
module2.exports = function() {
|
|
1199
1017
|
if (!debug) {
|
|
@@ -1211,9 +1029,9 @@ var require_debug = __commonJS({
|
|
|
1211
1029
|
}
|
|
1212
1030
|
});
|
|
1213
1031
|
|
|
1214
|
-
// node_modules/follow-redirects/index.js
|
|
1032
|
+
// node_modules/.pnpm/follow-redirects@1.15.2/node_modules/follow-redirects/index.js
|
|
1215
1033
|
var require_follow_redirects = __commonJS({
|
|
1216
|
-
"node_modules/follow-redirects/index.js"(exports2, module2) {
|
|
1034
|
+
"node_modules/.pnpm/follow-redirects@1.15.2/node_modules/follow-redirects/index.js"(exports2, module2) {
|
|
1217
1035
|
var url2 = require("url");
|
|
1218
1036
|
var URL4 = url2.URL;
|
|
1219
1037
|
var http2 = require("http");
|
|
@@ -1221,33 +1039,6 @@ var require_follow_redirects = __commonJS({
|
|
|
1221
1039
|
var Writable = require("stream").Writable;
|
|
1222
1040
|
var assert = require("assert");
|
|
1223
1041
|
var debug = require_debug();
|
|
1224
|
-
(function detectUnsupportedEnvironment() {
|
|
1225
|
-
var looksLikeNode = typeof process !== "undefined";
|
|
1226
|
-
var looksLikeBrowser = typeof window !== "undefined" && typeof document !== "undefined";
|
|
1227
|
-
var looksLikeV8 = isFunction2(Error.captureStackTrace);
|
|
1228
|
-
if (!looksLikeNode && (looksLikeBrowser || !looksLikeV8)) {
|
|
1229
|
-
console.warn("The follow-redirects package should be excluded from browser builds.");
|
|
1230
|
-
}
|
|
1231
|
-
})();
|
|
1232
|
-
var useNativeURL = false;
|
|
1233
|
-
try {
|
|
1234
|
-
assert(new URL4(""));
|
|
1235
|
-
} catch (error) {
|
|
1236
|
-
useNativeURL = error.code === "ERR_INVALID_URL";
|
|
1237
|
-
}
|
|
1238
|
-
var preservedUrlFields = [
|
|
1239
|
-
"auth",
|
|
1240
|
-
"host",
|
|
1241
|
-
"hostname",
|
|
1242
|
-
"href",
|
|
1243
|
-
"path",
|
|
1244
|
-
"pathname",
|
|
1245
|
-
"port",
|
|
1246
|
-
"protocol",
|
|
1247
|
-
"query",
|
|
1248
|
-
"search",
|
|
1249
|
-
"hash"
|
|
1250
|
-
];
|
|
1251
1042
|
var events = ["abort", "aborted", "connect", "error", "socket", "timeout"];
|
|
1252
1043
|
var eventHandlers = /* @__PURE__ */ Object.create(null);
|
|
1253
1044
|
events.forEach(function(event) {
|
|
@@ -1266,8 +1057,7 @@ var require_follow_redirects = __commonJS({
|
|
|
1266
1057
|
);
|
|
1267
1058
|
var TooManyRedirectsError = createErrorType(
|
|
1268
1059
|
"ERR_FR_TOO_MANY_REDIRECTS",
|
|
1269
|
-
"Maximum number of redirects exceeded"
|
|
1270
|
-
RedirectionError
|
|
1060
|
+
"Maximum number of redirects exceeded"
|
|
1271
1061
|
);
|
|
1272
1062
|
var MaxBodyLengthExceededError = createErrorType(
|
|
1273
1063
|
"ERR_FR_MAX_BODY_LENGTH_EXCEEDED",
|
|
@@ -1277,7 +1067,6 @@ var require_follow_redirects = __commonJS({
|
|
|
1277
1067
|
"ERR_STREAM_WRITE_AFTER_END",
|
|
1278
1068
|
"write after end"
|
|
1279
1069
|
);
|
|
1280
|
-
var destroy = Writable.prototype.destroy || noop2;
|
|
1281
1070
|
function RedirectableRequest(options, responseCallback) {
|
|
1282
1071
|
Writable.call(this);
|
|
1283
1072
|
this._sanitizeOptions(options);
|
|
@@ -1293,25 +1082,15 @@ var require_follow_redirects = __commonJS({
|
|
|
1293
1082
|
}
|
|
1294
1083
|
var self2 = this;
|
|
1295
1084
|
this._onNativeResponse = function(response) {
|
|
1296
|
-
|
|
1297
|
-
self2._processResponse(response);
|
|
1298
|
-
} catch (cause) {
|
|
1299
|
-
self2.emit("error", cause instanceof RedirectionError ? cause : new RedirectionError({ cause }));
|
|
1300
|
-
}
|
|
1085
|
+
self2._processResponse(response);
|
|
1301
1086
|
};
|
|
1302
1087
|
this._performRequest();
|
|
1303
1088
|
}
|
|
1304
1089
|
RedirectableRequest.prototype = Object.create(Writable.prototype);
|
|
1305
1090
|
RedirectableRequest.prototype.abort = function() {
|
|
1306
|
-
|
|
1307
|
-
this._currentRequest.abort();
|
|
1091
|
+
abortRequest(this._currentRequest);
|
|
1308
1092
|
this.emit("abort");
|
|
1309
1093
|
};
|
|
1310
|
-
RedirectableRequest.prototype.destroy = function(error) {
|
|
1311
|
-
destroyRequest(this._currentRequest, error);
|
|
1312
|
-
destroy.call(this, error);
|
|
1313
|
-
return this;
|
|
1314
|
-
};
|
|
1315
1094
|
RedirectableRequest.prototype.write = function(data, encoding, callback) {
|
|
1316
1095
|
if (this._ending) {
|
|
1317
1096
|
throw new WriteAfterEndError();
|
|
@@ -1392,7 +1171,6 @@ var require_follow_redirects = __commonJS({
|
|
|
1392
1171
|
self2.removeListener("abort", clearTimer);
|
|
1393
1172
|
self2.removeListener("error", clearTimer);
|
|
1394
1173
|
self2.removeListener("response", clearTimer);
|
|
1395
|
-
self2.removeListener("close", clearTimer);
|
|
1396
1174
|
if (callback) {
|
|
1397
1175
|
self2.removeListener("timeout", callback);
|
|
1398
1176
|
}
|
|
@@ -1412,7 +1190,6 @@ var require_follow_redirects = __commonJS({
|
|
|
1412
1190
|
this.on("abort", clearTimer);
|
|
1413
1191
|
this.on("error", clearTimer);
|
|
1414
1192
|
this.on("response", clearTimer);
|
|
1415
|
-
this.on("close", clearTimer);
|
|
1416
1193
|
return this;
|
|
1417
1194
|
};
|
|
1418
1195
|
[
|
|
@@ -1456,7 +1233,8 @@ var require_follow_redirects = __commonJS({
|
|
|
1456
1233
|
var protocol = this._options.protocol;
|
|
1457
1234
|
var nativeProtocol = this._options.nativeProtocols[protocol];
|
|
1458
1235
|
if (!nativeProtocol) {
|
|
1459
|
-
|
|
1236
|
+
this.emit("error", new TypeError("Unsupported protocol " + protocol));
|
|
1237
|
+
return;
|
|
1460
1238
|
}
|
|
1461
1239
|
if (this._options.agents) {
|
|
1462
1240
|
var scheme = protocol.slice(0, -1);
|
|
@@ -1509,10 +1287,11 @@ var require_follow_redirects = __commonJS({
|
|
|
1509
1287
|
this._requestBodyBuffers = [];
|
|
1510
1288
|
return;
|
|
1511
1289
|
}
|
|
1512
|
-
|
|
1290
|
+
abortRequest(this._currentRequest);
|
|
1513
1291
|
response.destroy();
|
|
1514
1292
|
if (++this._redirectCount > this._options.maxRedirects) {
|
|
1515
|
-
|
|
1293
|
+
this.emit("error", new TooManyRedirectsError());
|
|
1294
|
+
return;
|
|
1516
1295
|
}
|
|
1517
1296
|
var requestHeaders;
|
|
1518
1297
|
var beforeRedirect = this._options.beforeRedirect;
|
|
@@ -1533,15 +1312,22 @@ var require_follow_redirects = __commonJS({
|
|
|
1533
1312
|
removeMatchingHeaders(/^content-/i, this._options.headers);
|
|
1534
1313
|
}
|
|
1535
1314
|
var currentHostHeader = removeMatchingHeaders(/^host$/i, this._options.headers);
|
|
1536
|
-
var currentUrlParts =
|
|
1315
|
+
var currentUrlParts = url2.parse(this._currentUrl);
|
|
1537
1316
|
var currentHost = currentHostHeader || currentUrlParts.host;
|
|
1538
1317
|
var currentUrl = /^\w+:/.test(location) ? this._currentUrl : url2.format(Object.assign(currentUrlParts, { host: currentHost }));
|
|
1539
|
-
var redirectUrl
|
|
1540
|
-
|
|
1318
|
+
var redirectUrl;
|
|
1319
|
+
try {
|
|
1320
|
+
redirectUrl = url2.resolve(currentUrl, location);
|
|
1321
|
+
} catch (cause) {
|
|
1322
|
+
this.emit("error", new RedirectionError({ cause }));
|
|
1323
|
+
return;
|
|
1324
|
+
}
|
|
1325
|
+
debug("redirecting to", redirectUrl);
|
|
1541
1326
|
this._isRedirect = true;
|
|
1542
|
-
|
|
1543
|
-
|
|
1544
|
-
|
|
1327
|
+
var redirectUrlParts = url2.parse(redirectUrl);
|
|
1328
|
+
Object.assign(this._options, redirectUrlParts);
|
|
1329
|
+
if (redirectUrlParts.protocol !== currentUrlParts.protocol && redirectUrlParts.protocol !== "https:" || redirectUrlParts.host !== currentHost && !isSubdomain(redirectUrlParts.host, currentHost)) {
|
|
1330
|
+
removeMatchingHeaders(/^(?:authorization|cookie)$/i, this._options.headers);
|
|
1545
1331
|
}
|
|
1546
1332
|
if (isFunction2(beforeRedirect)) {
|
|
1547
1333
|
var responseDetails = {
|
|
@@ -1553,10 +1339,19 @@ var require_follow_redirects = __commonJS({
|
|
|
1553
1339
|
method,
|
|
1554
1340
|
headers: requestHeaders
|
|
1555
1341
|
};
|
|
1556
|
-
|
|
1342
|
+
try {
|
|
1343
|
+
beforeRedirect(this._options, responseDetails, requestDetails);
|
|
1344
|
+
} catch (err) {
|
|
1345
|
+
this.emit("error", err);
|
|
1346
|
+
return;
|
|
1347
|
+
}
|
|
1557
1348
|
this._sanitizeOptions(this._options);
|
|
1558
1349
|
}
|
|
1559
|
-
|
|
1350
|
+
try {
|
|
1351
|
+
this._performRequest();
|
|
1352
|
+
} catch (cause) {
|
|
1353
|
+
this.emit("error", new RedirectionError({ cause }));
|
|
1354
|
+
}
|
|
1560
1355
|
};
|
|
1561
1356
|
function wrap(protocols) {
|
|
1562
1357
|
var exports3 = {
|
|
@@ -1569,13 +1364,22 @@ var require_follow_redirects = __commonJS({
|
|
|
1569
1364
|
var nativeProtocol = nativeProtocols[protocol] = protocols[scheme];
|
|
1570
1365
|
var wrappedProtocol = exports3[scheme] = Object.create(nativeProtocol);
|
|
1571
1366
|
function request(input, options, callback) {
|
|
1572
|
-
if (
|
|
1573
|
-
|
|
1574
|
-
|
|
1575
|
-
|
|
1367
|
+
if (isString2(input)) {
|
|
1368
|
+
var parsed;
|
|
1369
|
+
try {
|
|
1370
|
+
parsed = urlToOptions(new URL4(input));
|
|
1371
|
+
} catch (err) {
|
|
1372
|
+
parsed = url2.parse(input);
|
|
1373
|
+
}
|
|
1374
|
+
if (!isString2(parsed.protocol)) {
|
|
1375
|
+
throw new InvalidUrlError({ input });
|
|
1376
|
+
}
|
|
1377
|
+
input = parsed;
|
|
1378
|
+
} else if (URL4 && input instanceof URL4) {
|
|
1379
|
+
input = urlToOptions(input);
|
|
1576
1380
|
} else {
|
|
1577
1381
|
callback = options;
|
|
1578
|
-
options =
|
|
1382
|
+
options = input;
|
|
1579
1383
|
input = { protocol };
|
|
1580
1384
|
}
|
|
1581
1385
|
if (isFunction2(options)) {
|
|
@@ -1608,43 +1412,23 @@ var require_follow_redirects = __commonJS({
|
|
|
1608
1412
|
}
|
|
1609
1413
|
function noop2() {
|
|
1610
1414
|
}
|
|
1611
|
-
function
|
|
1612
|
-
var
|
|
1613
|
-
|
|
1614
|
-
|
|
1615
|
-
|
|
1616
|
-
|
|
1617
|
-
|
|
1618
|
-
|
|
1619
|
-
|
|
1620
|
-
|
|
1621
|
-
|
|
1622
|
-
|
|
1623
|
-
|
|
1624
|
-
|
|
1625
|
-
|
|
1626
|
-
function validateUrl(input) {
|
|
1627
|
-
if (/^\[/.test(input.hostname) && !/^\[[:0-9a-f]+\]$/i.test(input.hostname)) {
|
|
1628
|
-
throw new InvalidUrlError({ input: input.href || input });
|
|
1629
|
-
}
|
|
1630
|
-
if (/^\[/.test(input.host) && !/^\[[:0-9a-f]+\](:\d+)?$/i.test(input.host)) {
|
|
1631
|
-
throw new InvalidUrlError({ input: input.href || input });
|
|
1632
|
-
}
|
|
1633
|
-
return input;
|
|
1634
|
-
}
|
|
1635
|
-
function spreadUrlObject(urlObject, target) {
|
|
1636
|
-
var spread3 = target || {};
|
|
1637
|
-
for (var key of preservedUrlFields) {
|
|
1638
|
-
spread3[key] = urlObject[key];
|
|
1639
|
-
}
|
|
1640
|
-
if (spread3.hostname.startsWith("[")) {
|
|
1641
|
-
spread3.hostname = spread3.hostname.slice(1, -1);
|
|
1642
|
-
}
|
|
1643
|
-
if (spread3.port !== "") {
|
|
1644
|
-
spread3.port = Number(spread3.port);
|
|
1415
|
+
function urlToOptions(urlObject) {
|
|
1416
|
+
var options = {
|
|
1417
|
+
protocol: urlObject.protocol,
|
|
1418
|
+
hostname: urlObject.hostname.startsWith("[") ? (
|
|
1419
|
+
/* istanbul ignore next */
|
|
1420
|
+
urlObject.hostname.slice(1, -1)
|
|
1421
|
+
) : urlObject.hostname,
|
|
1422
|
+
hash: urlObject.hash,
|
|
1423
|
+
search: urlObject.search,
|
|
1424
|
+
pathname: urlObject.pathname,
|
|
1425
|
+
path: urlObject.pathname + urlObject.search,
|
|
1426
|
+
href: urlObject.href
|
|
1427
|
+
};
|
|
1428
|
+
if (urlObject.port !== "") {
|
|
1429
|
+
options.port = Number(urlObject.port);
|
|
1645
1430
|
}
|
|
1646
|
-
|
|
1647
|
-
return spread3;
|
|
1431
|
+
return options;
|
|
1648
1432
|
}
|
|
1649
1433
|
function removeMatchingHeaders(regex, headers) {
|
|
1650
1434
|
var lastValue;
|
|
@@ -1658,32 +1442,22 @@ var require_follow_redirects = __commonJS({
|
|
|
1658
1442
|
}
|
|
1659
1443
|
function createErrorType(code, message, baseClass) {
|
|
1660
1444
|
function CustomError(properties) {
|
|
1661
|
-
|
|
1662
|
-
Error.captureStackTrace(this, this.constructor);
|
|
1663
|
-
}
|
|
1445
|
+
Error.captureStackTrace(this, this.constructor);
|
|
1664
1446
|
Object.assign(this, properties || {});
|
|
1665
1447
|
this.code = code;
|
|
1666
1448
|
this.message = this.cause ? message + ": " + this.cause.message : message;
|
|
1667
1449
|
}
|
|
1668
1450
|
CustomError.prototype = new (baseClass || Error)();
|
|
1669
|
-
|
|
1670
|
-
|
|
1671
|
-
value: CustomError,
|
|
1672
|
-
enumerable: false
|
|
1673
|
-
},
|
|
1674
|
-
name: {
|
|
1675
|
-
value: "Error [" + code + "]",
|
|
1676
|
-
enumerable: false
|
|
1677
|
-
}
|
|
1678
|
-
});
|
|
1451
|
+
CustomError.prototype.constructor = CustomError;
|
|
1452
|
+
CustomError.prototype.name = "Error [" + code + "]";
|
|
1679
1453
|
return CustomError;
|
|
1680
1454
|
}
|
|
1681
|
-
function
|
|
1455
|
+
function abortRequest(request) {
|
|
1682
1456
|
for (var event of events) {
|
|
1683
1457
|
request.removeListener(event, eventHandlers[event]);
|
|
1684
1458
|
}
|
|
1685
1459
|
request.on("error", noop2);
|
|
1686
|
-
request.
|
|
1460
|
+
request.abort();
|
|
1687
1461
|
}
|
|
1688
1462
|
function isSubdomain(subdomain, domain) {
|
|
1689
1463
|
assert(isString2(subdomain) && isString2(domain));
|
|
@@ -1699,9 +1473,6 @@ var require_follow_redirects = __commonJS({
|
|
|
1699
1473
|
function isBuffer2(value) {
|
|
1700
1474
|
return typeof value === "object" && "length" in value;
|
|
1701
1475
|
}
|
|
1702
|
-
function isURL(value) {
|
|
1703
|
-
return URL4 && value instanceof URL4;
|
|
1704
|
-
}
|
|
1705
1476
|
module2.exports = wrap({ http: http2, https: https2 });
|
|
1706
1477
|
module2.exports.wrap = wrap;
|
|
1707
1478
|
}
|
|
@@ -1748,11 +1519,11 @@ function checkNodeVersion() {
|
|
|
1748
1519
|
|
|
1749
1520
|
// bin/index.ts
|
|
1750
1521
|
var import_commander = require("commander");
|
|
1751
|
-
var
|
|
1752
|
-
var
|
|
1522
|
+
var import_chalk13 = __toESM(require("chalk"));
|
|
1523
|
+
var import_figlet5 = __toESM(require("figlet"));
|
|
1753
1524
|
|
|
1754
1525
|
// package.json
|
|
1755
|
-
var version = "1.2.2-alpha.
|
|
1526
|
+
var version = "1.2.2-alpha.3";
|
|
1756
1527
|
|
|
1757
1528
|
// bin/upload.ts
|
|
1758
1529
|
var import_path6 = __toESM(require("path"));
|
|
@@ -1760,17 +1531,16 @@ var import_chalk4 = __toESM(require("chalk"));
|
|
|
1760
1531
|
var import_inquirer = __toESM(require("inquirer"));
|
|
1761
1532
|
var import_figlet = __toESM(require("figlet"));
|
|
1762
1533
|
|
|
1763
|
-
// node_modules/axios/lib/helpers/bind.js
|
|
1534
|
+
// node_modules/.pnpm/axios@1.3.2/node_modules/axios/lib/helpers/bind.js
|
|
1764
1535
|
function bind(fn, thisArg) {
|
|
1765
1536
|
return function wrap() {
|
|
1766
1537
|
return fn.apply(thisArg, arguments);
|
|
1767
1538
|
};
|
|
1768
1539
|
}
|
|
1769
1540
|
|
|
1770
|
-
// node_modules/axios/lib/utils.js
|
|
1541
|
+
// node_modules/.pnpm/axios@1.3.2/node_modules/axios/lib/utils.js
|
|
1771
1542
|
var { toString } = Object.prototype;
|
|
1772
1543
|
var { getPrototypeOf } = Object;
|
|
1773
|
-
var { iterator, toStringTag } = Symbol;
|
|
1774
1544
|
var kindOf = /* @__PURE__ */ ((cache) => (thing) => {
|
|
1775
1545
|
const str = toString.call(thing);
|
|
1776
1546
|
return cache[str] || (cache[str] = str.slice(8, -1).toLowerCase());
|
|
@@ -1805,7 +1575,7 @@ var isPlainObject = (val) => {
|
|
|
1805
1575
|
return false;
|
|
1806
1576
|
}
|
|
1807
1577
|
const prototype3 = getPrototypeOf(val);
|
|
1808
|
-
return (prototype3 === null || prototype3 === Object.prototype || Object.getPrototypeOf(prototype3) === null) && !(toStringTag in val) && !(iterator in val);
|
|
1578
|
+
return (prototype3 === null || prototype3 === Object.prototype || Object.getPrototypeOf(prototype3) === null) && !(Symbol.toStringTag in val) && !(Symbol.iterator in val);
|
|
1809
1579
|
};
|
|
1810
1580
|
var isDate = kindOfTest("Date");
|
|
1811
1581
|
var isFile = kindOfTest("File");
|
|
@@ -1813,12 +1583,10 @@ var isBlob = kindOfTest("Blob");
|
|
|
1813
1583
|
var isFileList = kindOfTest("FileList");
|
|
1814
1584
|
var isStream = (val) => isObject(val) && isFunction(val.pipe);
|
|
1815
1585
|
var isFormData = (thing) => {
|
|
1816
|
-
|
|
1817
|
-
return thing && (typeof FormData === "function" && thing instanceof FormData ||
|
|
1818
|
-
kind === "object" && isFunction(thing.toString) && thing.toString() === "[object FormData]"));
|
|
1586
|
+
const pattern = "[object FormData]";
|
|
1587
|
+
return thing && (typeof FormData === "function" && thing instanceof FormData || toString.call(thing) === pattern || isFunction(thing.toString) && thing.toString() === pattern);
|
|
1819
1588
|
};
|
|
1820
1589
|
var isURLSearchParams = kindOfTest("URLSearchParams");
|
|
1821
|
-
var [isReadableStream, isRequest, isResponse, isHeaders] = ["ReadableStream", "Request", "Response", "Headers"].map(kindOfTest);
|
|
1822
1590
|
var trim = (str) => str.trim ? str.trim() : str.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, "");
|
|
1823
1591
|
function forEach(obj, fn, { allOwnKeys = false } = {}) {
|
|
1824
1592
|
if (obj === null || typeof obj === "undefined") {
|
|
@@ -1952,10 +1720,10 @@ var isTypedArray = /* @__PURE__ */ ((TypedArray) => {
|
|
|
1952
1720
|
};
|
|
1953
1721
|
})(typeof Uint8Array !== "undefined" && getPrototypeOf(Uint8Array));
|
|
1954
1722
|
var forEachEntry = (obj, fn) => {
|
|
1955
|
-
const generator = obj && obj[iterator];
|
|
1956
|
-
const
|
|
1723
|
+
const generator = obj && obj[Symbol.iterator];
|
|
1724
|
+
const iterator = generator.call(obj);
|
|
1957
1725
|
let result;
|
|
1958
|
-
while ((result =
|
|
1726
|
+
while ((result = iterator.next()) && !result.done) {
|
|
1959
1727
|
const pair = result.value;
|
|
1960
1728
|
fn.call(obj, pair[0], pair[1]);
|
|
1961
1729
|
}
|
|
@@ -1983,9 +1751,8 @@ var reduceDescriptors = (obj, reducer) => {
|
|
|
1983
1751
|
const descriptors2 = Object.getOwnPropertyDescriptors(obj);
|
|
1984
1752
|
const reducedDescriptors = {};
|
|
1985
1753
|
forEach(descriptors2, (descriptor, name) => {
|
|
1986
|
-
|
|
1987
|
-
|
|
1988
|
-
reducedDescriptors[name] = ret || descriptor;
|
|
1754
|
+
if (reducer(descriptor, name, obj) !== false) {
|
|
1755
|
+
reducedDescriptors[name] = descriptor;
|
|
1989
1756
|
}
|
|
1990
1757
|
});
|
|
1991
1758
|
Object.defineProperties(obj, reducedDescriptors);
|
|
@@ -2022,10 +1789,26 @@ var toObjectSet = (arrayOrString, delimiter) => {
|
|
|
2022
1789
|
var noop = () => {
|
|
2023
1790
|
};
|
|
2024
1791
|
var toFiniteNumber = (value, defaultValue) => {
|
|
2025
|
-
|
|
1792
|
+
value = +value;
|
|
1793
|
+
return Number.isFinite(value) ? value : defaultValue;
|
|
1794
|
+
};
|
|
1795
|
+
var ALPHA = "abcdefghijklmnopqrstuvwxyz";
|
|
1796
|
+
var DIGIT = "0123456789";
|
|
1797
|
+
var ALPHABET = {
|
|
1798
|
+
DIGIT,
|
|
1799
|
+
ALPHA,
|
|
1800
|
+
ALPHA_DIGIT: ALPHA + ALPHA.toUpperCase() + DIGIT
|
|
1801
|
+
};
|
|
1802
|
+
var generateString = (size = 16, alphabet = ALPHABET.ALPHA_DIGIT) => {
|
|
1803
|
+
let str = "";
|
|
1804
|
+
const { length } = alphabet;
|
|
1805
|
+
while (size--) {
|
|
1806
|
+
str += alphabet[Math.random() * length | 0];
|
|
1807
|
+
}
|
|
1808
|
+
return str;
|
|
2026
1809
|
};
|
|
2027
1810
|
function isSpecCompliantForm(thing) {
|
|
2028
|
-
return !!(thing && isFunction(thing.append) && thing[toStringTag] === "FormData" && thing[iterator]);
|
|
1811
|
+
return !!(thing && isFunction(thing.append) && thing[Symbol.toStringTag] === "FormData" && thing[Symbol.iterator]);
|
|
2029
1812
|
}
|
|
2030
1813
|
var toJSONObject = (obj) => {
|
|
2031
1814
|
const stack = new Array(10);
|
|
@@ -2049,29 +1832,6 @@ var toJSONObject = (obj) => {
|
|
|
2049
1832
|
};
|
|
2050
1833
|
return visit(obj, 0);
|
|
2051
1834
|
};
|
|
2052
|
-
var isAsyncFn = kindOfTest("AsyncFunction");
|
|
2053
|
-
var isThenable = (thing) => thing && (isObject(thing) || isFunction(thing)) && isFunction(thing.then) && isFunction(thing.catch);
|
|
2054
|
-
var _setImmediate = ((setImmediateSupported, postMessageSupported) => {
|
|
2055
|
-
if (setImmediateSupported) {
|
|
2056
|
-
return setImmediate;
|
|
2057
|
-
}
|
|
2058
|
-
return postMessageSupported ? ((token, callbacks) => {
|
|
2059
|
-
_global.addEventListener("message", ({ source, data }) => {
|
|
2060
|
-
if (source === _global && data === token) {
|
|
2061
|
-
callbacks.length && callbacks.shift()();
|
|
2062
|
-
}
|
|
2063
|
-
}, false);
|
|
2064
|
-
return (cb) => {
|
|
2065
|
-
callbacks.push(cb);
|
|
2066
|
-
_global.postMessage(token, "*");
|
|
2067
|
-
};
|
|
2068
|
-
})(`axios@${Math.random()}`, []) : (cb) => setTimeout(cb);
|
|
2069
|
-
})(
|
|
2070
|
-
typeof setImmediate === "function",
|
|
2071
|
-
isFunction(_global.postMessage)
|
|
2072
|
-
);
|
|
2073
|
-
var asap = typeof queueMicrotask !== "undefined" ? queueMicrotask.bind(_global) : typeof process !== "undefined" && process.nextTick || _setImmediate;
|
|
2074
|
-
var isIterable = (thing) => thing != null && isFunction(thing[iterator]);
|
|
2075
1835
|
var utils_default = {
|
|
2076
1836
|
isArray,
|
|
2077
1837
|
isArrayBuffer,
|
|
@@ -2083,10 +1843,6 @@ var utils_default = {
|
|
|
2083
1843
|
isBoolean,
|
|
2084
1844
|
isObject,
|
|
2085
1845
|
isPlainObject,
|
|
2086
|
-
isReadableStream,
|
|
2087
|
-
isRequest,
|
|
2088
|
-
isResponse,
|
|
2089
|
-
isHeaders,
|
|
2090
1846
|
isUndefined,
|
|
2091
1847
|
isDate,
|
|
2092
1848
|
isFile,
|
|
@@ -2123,16 +1879,13 @@ var utils_default = {
|
|
|
2123
1879
|
findKey,
|
|
2124
1880
|
global: _global,
|
|
2125
1881
|
isContextDefined,
|
|
1882
|
+
ALPHABET,
|
|
1883
|
+
generateString,
|
|
2126
1884
|
isSpecCompliantForm,
|
|
2127
|
-
toJSONObject
|
|
2128
|
-
isAsyncFn,
|
|
2129
|
-
isThenable,
|
|
2130
|
-
setImmediate: _setImmediate,
|
|
2131
|
-
asap,
|
|
2132
|
-
isIterable
|
|
1885
|
+
toJSONObject
|
|
2133
1886
|
};
|
|
2134
1887
|
|
|
2135
|
-
// node_modules/axios/lib/core/AxiosError.js
|
|
1888
|
+
// node_modules/.pnpm/axios@1.3.2/node_modules/axios/lib/core/AxiosError.js
|
|
2136
1889
|
function AxiosError(message, code, config, request, response) {
|
|
2137
1890
|
Error.call(this);
|
|
2138
1891
|
if (Error.captureStackTrace) {
|
|
@@ -2145,10 +1898,7 @@ function AxiosError(message, code, config, request, response) {
|
|
|
2145
1898
|
code && (this.code = code);
|
|
2146
1899
|
config && (this.config = config);
|
|
2147
1900
|
request && (this.request = request);
|
|
2148
|
-
|
|
2149
|
-
this.response = response;
|
|
2150
|
-
this.status = response.status ? response.status : null;
|
|
2151
|
-
}
|
|
1901
|
+
response && (this.response = response);
|
|
2152
1902
|
}
|
|
2153
1903
|
utils_default.inherits(AxiosError, Error, {
|
|
2154
1904
|
toJSON: function toJSON() {
|
|
@@ -2167,7 +1917,7 @@ utils_default.inherits(AxiosError, Error, {
|
|
|
2167
1917
|
// Axios
|
|
2168
1918
|
config: utils_default.toJSONObject(this.config),
|
|
2169
1919
|
code: this.code,
|
|
2170
|
-
status: this.status
|
|
1920
|
+
status: this.response && this.response.status ? this.response.status : null
|
|
2171
1921
|
};
|
|
2172
1922
|
}
|
|
2173
1923
|
});
|
|
@@ -2207,20 +1957,20 @@ AxiosError.from = (error, code, config, request, response, customProps) => {
|
|
|
2207
1957
|
};
|
|
2208
1958
|
var AxiosError_default = AxiosError;
|
|
2209
1959
|
|
|
2210
|
-
// node_modules/axios/lib/platform/node/classes/FormData.js
|
|
1960
|
+
// node_modules/.pnpm/axios@1.3.2/node_modules/axios/lib/platform/node/classes/FormData.js
|
|
2211
1961
|
var import_form_data = __toESM(require("form-data"), 1);
|
|
2212
1962
|
var FormData_default = import_form_data.default;
|
|
2213
1963
|
|
|
2214
|
-
// node_modules/axios/lib/helpers/toFormData.js
|
|
1964
|
+
// node_modules/.pnpm/axios@1.3.2/node_modules/axios/lib/helpers/toFormData.js
|
|
2215
1965
|
function isVisitable(thing) {
|
|
2216
1966
|
return utils_default.isPlainObject(thing) || utils_default.isArray(thing);
|
|
2217
1967
|
}
|
|
2218
1968
|
function removeBrackets(key) {
|
|
2219
1969
|
return utils_default.endsWith(key, "[]") ? key.slice(0, -2) : key;
|
|
2220
1970
|
}
|
|
2221
|
-
function renderKey(
|
|
2222
|
-
if (!
|
|
2223
|
-
return
|
|
1971
|
+
function renderKey(path9, key, dots) {
|
|
1972
|
+
if (!path9) return key;
|
|
1973
|
+
return path9.concat(key).map(function each(token, i) {
|
|
2224
1974
|
token = removeBrackets(token);
|
|
2225
1975
|
return !dots && i ? "[" + token + "]" : token;
|
|
2226
1976
|
}).join(dots ? "." : "");
|
|
@@ -2265,9 +2015,9 @@ function toFormData(obj, formData, options) {
|
|
|
2265
2015
|
}
|
|
2266
2016
|
return value;
|
|
2267
2017
|
}
|
|
2268
|
-
function defaultVisitor(value, key,
|
|
2018
|
+
function defaultVisitor(value, key, path9) {
|
|
2269
2019
|
let arr = value;
|
|
2270
|
-
if (value && !
|
|
2020
|
+
if (value && !path9 && typeof value === "object") {
|
|
2271
2021
|
if (utils_default.endsWith(key, "{}")) {
|
|
2272
2022
|
key = metaTokens ? key : key.slice(0, -2);
|
|
2273
2023
|
value = JSON.stringify(value);
|
|
@@ -2286,7 +2036,7 @@ function toFormData(obj, formData, options) {
|
|
|
2286
2036
|
if (isVisitable(value)) {
|
|
2287
2037
|
return true;
|
|
2288
2038
|
}
|
|
2289
|
-
formData.append(renderKey(
|
|
2039
|
+
formData.append(renderKey(path9, key, dots), convertValue(value));
|
|
2290
2040
|
return false;
|
|
2291
2041
|
}
|
|
2292
2042
|
const stack = [];
|
|
@@ -2295,10 +2045,10 @@ function toFormData(obj, formData, options) {
|
|
|
2295
2045
|
convertValue,
|
|
2296
2046
|
isVisitable
|
|
2297
2047
|
});
|
|
2298
|
-
function build(value,
|
|
2048
|
+
function build(value, path9) {
|
|
2299
2049
|
if (utils_default.isUndefined(value)) return;
|
|
2300
2050
|
if (stack.indexOf(value) !== -1) {
|
|
2301
|
-
throw Error("Circular reference detected in " +
|
|
2051
|
+
throw Error("Circular reference detected in " + path9.join("."));
|
|
2302
2052
|
}
|
|
2303
2053
|
stack.push(value);
|
|
2304
2054
|
utils_default.forEach(value, function each(el, key) {
|
|
@@ -2306,11 +2056,11 @@ function toFormData(obj, formData, options) {
|
|
|
2306
2056
|
formData,
|
|
2307
2057
|
el,
|
|
2308
2058
|
utils_default.isString(key) ? key.trim() : key,
|
|
2309
|
-
|
|
2059
|
+
path9,
|
|
2310
2060
|
exposedHelpers
|
|
2311
2061
|
);
|
|
2312
2062
|
if (result === true) {
|
|
2313
|
-
build(el,
|
|
2063
|
+
build(el, path9 ? path9.concat(key) : [key]);
|
|
2314
2064
|
}
|
|
2315
2065
|
});
|
|
2316
2066
|
stack.pop();
|
|
@@ -2323,7 +2073,7 @@ function toFormData(obj, formData, options) {
|
|
|
2323
2073
|
}
|
|
2324
2074
|
var toFormData_default = toFormData;
|
|
2325
2075
|
|
|
2326
|
-
// node_modules/axios/lib/helpers/AxiosURLSearchParams.js
|
|
2076
|
+
// node_modules/.pnpm/axios@1.3.2/node_modules/axios/lib/helpers/AxiosURLSearchParams.js
|
|
2327
2077
|
function encode(str) {
|
|
2328
2078
|
const charMap = {
|
|
2329
2079
|
"!": "%21",
|
|
@@ -2356,7 +2106,7 @@ prototype2.toString = function toString2(encoder) {
|
|
|
2356
2106
|
};
|
|
2357
2107
|
var AxiosURLSearchParams_default = AxiosURLSearchParams;
|
|
2358
2108
|
|
|
2359
|
-
// node_modules/axios/lib/helpers/buildURL.js
|
|
2109
|
+
// node_modules/.pnpm/axios@1.3.2/node_modules/axios/lib/helpers/buildURL.js
|
|
2360
2110
|
function encode2(val) {
|
|
2361
2111
|
return encodeURIComponent(val).replace(/%3A/gi, ":").replace(/%24/g, "$").replace(/%2C/gi, ",").replace(/%20/g, "+").replace(/%5B/gi, "[").replace(/%5D/gi, "]");
|
|
2362
2112
|
}
|
|
@@ -2365,11 +2115,6 @@ function buildURL(url2, params, options) {
|
|
|
2365
2115
|
return url2;
|
|
2366
2116
|
}
|
|
2367
2117
|
const _encode = options && options.encode || encode2;
|
|
2368
|
-
if (utils_default.isFunction(options)) {
|
|
2369
|
-
options = {
|
|
2370
|
-
serialize: options
|
|
2371
|
-
};
|
|
2372
|
-
}
|
|
2373
2118
|
const serializeFn = options && options.serialize;
|
|
2374
2119
|
let serializedParams;
|
|
2375
2120
|
if (serializeFn) {
|
|
@@ -2387,7 +2132,7 @@ function buildURL(url2, params, options) {
|
|
|
2387
2132
|
return url2;
|
|
2388
2133
|
}
|
|
2389
2134
|
|
|
2390
|
-
// node_modules/axios/lib/core/InterceptorManager.js
|
|
2135
|
+
// node_modules/.pnpm/axios@1.3.2/node_modules/axios/lib/core/InterceptorManager.js
|
|
2391
2136
|
var InterceptorManager = class {
|
|
2392
2137
|
constructor() {
|
|
2393
2138
|
this.handlers = [];
|
|
@@ -2451,38 +2196,18 @@ var InterceptorManager = class {
|
|
|
2451
2196
|
};
|
|
2452
2197
|
var InterceptorManager_default = InterceptorManager;
|
|
2453
2198
|
|
|
2454
|
-
// node_modules/axios/lib/defaults/transitional.js
|
|
2199
|
+
// node_modules/.pnpm/axios@1.3.2/node_modules/axios/lib/defaults/transitional.js
|
|
2455
2200
|
var transitional_default = {
|
|
2456
2201
|
silentJSONParsing: true,
|
|
2457
2202
|
forcedJSONParsing: true,
|
|
2458
2203
|
clarifyTimeoutError: false
|
|
2459
2204
|
};
|
|
2460
2205
|
|
|
2461
|
-
// node_modules/axios/lib/platform/node/
|
|
2462
|
-
var import_crypto = __toESM(require("crypto"), 1);
|
|
2463
|
-
|
|
2464
|
-
// node_modules/axios/lib/platform/node/classes/URLSearchParams.js
|
|
2206
|
+
// node_modules/.pnpm/axios@1.3.2/node_modules/axios/lib/platform/node/classes/URLSearchParams.js
|
|
2465
2207
|
var import_url = __toESM(require("url"), 1);
|
|
2466
2208
|
var URLSearchParams_default = import_url.default.URLSearchParams;
|
|
2467
2209
|
|
|
2468
|
-
// node_modules/axios/lib/platform/node/index.js
|
|
2469
|
-
var ALPHA = "abcdefghijklmnopqrstuvwxyz";
|
|
2470
|
-
var DIGIT = "0123456789";
|
|
2471
|
-
var ALPHABET = {
|
|
2472
|
-
DIGIT,
|
|
2473
|
-
ALPHA,
|
|
2474
|
-
ALPHA_DIGIT: ALPHA + ALPHA.toUpperCase() + DIGIT
|
|
2475
|
-
};
|
|
2476
|
-
var generateString = (size = 16, alphabet = ALPHABET.ALPHA_DIGIT) => {
|
|
2477
|
-
let str = "";
|
|
2478
|
-
const { length } = alphabet;
|
|
2479
|
-
const randomValues = new Uint32Array(size);
|
|
2480
|
-
import_crypto.default.randomFillSync(randomValues);
|
|
2481
|
-
for (let i = 0; i < size; i++) {
|
|
2482
|
-
str += alphabet[randomValues[i] % length];
|
|
2483
|
-
}
|
|
2484
|
-
return str;
|
|
2485
|
-
};
|
|
2210
|
+
// node_modules/.pnpm/axios@1.3.2/node_modules/axios/lib/platform/node/index.js
|
|
2486
2211
|
var node_default = {
|
|
2487
2212
|
isNode: true,
|
|
2488
2213
|
classes: {
|
|
@@ -2490,40 +2215,14 @@ var node_default = {
|
|
|
2490
2215
|
FormData: FormData_default,
|
|
2491
2216
|
Blob: typeof Blob !== "undefined" && Blob || null
|
|
2492
2217
|
},
|
|
2493
|
-
ALPHABET,
|
|
2494
|
-
generateString,
|
|
2495
2218
|
protocols: ["http", "https", "file", "data"]
|
|
2496
2219
|
};
|
|
2497
2220
|
|
|
2498
|
-
// node_modules/axios/lib/
|
|
2499
|
-
var utils_exports = {};
|
|
2500
|
-
__export(utils_exports, {
|
|
2501
|
-
hasBrowserEnv: () => hasBrowserEnv,
|
|
2502
|
-
hasStandardBrowserEnv: () => hasStandardBrowserEnv,
|
|
2503
|
-
hasStandardBrowserWebWorkerEnv: () => hasStandardBrowserWebWorkerEnv,
|
|
2504
|
-
navigator: () => _navigator,
|
|
2505
|
-
origin: () => origin
|
|
2506
|
-
});
|
|
2507
|
-
var hasBrowserEnv = typeof window !== "undefined" && typeof document !== "undefined";
|
|
2508
|
-
var _navigator = typeof navigator === "object" && navigator || void 0;
|
|
2509
|
-
var hasStandardBrowserEnv = hasBrowserEnv && (!_navigator || ["ReactNative", "NativeScript", "NS"].indexOf(_navigator.product) < 0);
|
|
2510
|
-
var hasStandardBrowserWebWorkerEnv = (() => {
|
|
2511
|
-
return typeof WorkerGlobalScope !== "undefined" && // eslint-disable-next-line no-undef
|
|
2512
|
-
self instanceof WorkerGlobalScope && typeof self.importScripts === "function";
|
|
2513
|
-
})();
|
|
2514
|
-
var origin = hasBrowserEnv && window.location.href || "http://localhost";
|
|
2515
|
-
|
|
2516
|
-
// node_modules/axios/lib/platform/index.js
|
|
2517
|
-
var platform_default = {
|
|
2518
|
-
...utils_exports,
|
|
2519
|
-
...node_default
|
|
2520
|
-
};
|
|
2521
|
-
|
|
2522
|
-
// node_modules/axios/lib/helpers/toURLEncodedForm.js
|
|
2221
|
+
// node_modules/.pnpm/axios@1.3.2/node_modules/axios/lib/helpers/toURLEncodedForm.js
|
|
2523
2222
|
function toURLEncodedForm(data, options) {
|
|
2524
|
-
return toFormData_default(data, new
|
|
2525
|
-
visitor: function(value, key,
|
|
2526
|
-
if (
|
|
2223
|
+
return toFormData_default(data, new node_default.classes.URLSearchParams(), Object.assign({
|
|
2224
|
+
visitor: function(value, key, path9, helpers) {
|
|
2225
|
+
if (node_default.isNode && utils_default.isBuffer(value)) {
|
|
2527
2226
|
this.append(key, value.toString("base64"));
|
|
2528
2227
|
return false;
|
|
2529
2228
|
}
|
|
@@ -2532,7 +2231,7 @@ function toURLEncodedForm(data, options) {
|
|
|
2532
2231
|
}, options));
|
|
2533
2232
|
}
|
|
2534
2233
|
|
|
2535
|
-
// node_modules/axios/lib/helpers/formDataToJSON.js
|
|
2234
|
+
// node_modules/.pnpm/axios@1.3.2/node_modules/axios/lib/helpers/formDataToJSON.js
|
|
2536
2235
|
function parsePropPath(name) {
|
|
2537
2236
|
return utils_default.matchAll(/\w+|\[(\w*)]/g, name).map((match) => {
|
|
2538
2237
|
return match[0] === "[]" ? "" : match[1] || match[0];
|
|
@@ -2551,11 +2250,10 @@ function arrayToObject(arr) {
|
|
|
2551
2250
|
return obj;
|
|
2552
2251
|
}
|
|
2553
2252
|
function formDataToJSON(formData) {
|
|
2554
|
-
function buildPath(
|
|
2555
|
-
let name =
|
|
2556
|
-
if (name === "__proto__") return true;
|
|
2253
|
+
function buildPath(path9, value, target, index) {
|
|
2254
|
+
let name = path9[index++];
|
|
2557
2255
|
const isNumericKey = Number.isFinite(+name);
|
|
2558
|
-
const isLast = index >=
|
|
2256
|
+
const isLast = index >= path9.length;
|
|
2559
2257
|
name = !name && utils_default.isArray(target) ? target.length : name;
|
|
2560
2258
|
if (isLast) {
|
|
2561
2259
|
if (utils_default.hasOwnProp(target, name)) {
|
|
@@ -2568,7 +2266,7 @@ function formDataToJSON(formData) {
|
|
|
2568
2266
|
if (!target[name] || !utils_default.isObject(target[name])) {
|
|
2569
2267
|
target[name] = [];
|
|
2570
2268
|
}
|
|
2571
|
-
const result = buildPath(
|
|
2269
|
+
const result = buildPath(path9, value, target[name], index);
|
|
2572
2270
|
if (result && utils_default.isArray(target[name])) {
|
|
2573
2271
|
target[name] = arrayToObject(target[name]);
|
|
2574
2272
|
}
|
|
@@ -2585,7 +2283,10 @@ function formDataToJSON(formData) {
|
|
|
2585
2283
|
}
|
|
2586
2284
|
var formDataToJSON_default = formDataToJSON;
|
|
2587
2285
|
|
|
2588
|
-
// node_modules/axios/lib/defaults/index.js
|
|
2286
|
+
// node_modules/.pnpm/axios@1.3.2/node_modules/axios/lib/defaults/index.js
|
|
2287
|
+
var DEFAULT_CONTENT_TYPE = {
|
|
2288
|
+
"Content-Type": void 0
|
|
2289
|
+
};
|
|
2589
2290
|
function stringifySafely(rawValue, parser, encoder) {
|
|
2590
2291
|
if (utils_default.isString(rawValue)) {
|
|
2591
2292
|
try {
|
|
@@ -2601,7 +2302,7 @@ function stringifySafely(rawValue, parser, encoder) {
|
|
|
2601
2302
|
}
|
|
2602
2303
|
var defaults = {
|
|
2603
2304
|
transitional: transitional_default,
|
|
2604
|
-
adapter: ["xhr", "http"
|
|
2305
|
+
adapter: ["xhr", "http"],
|
|
2605
2306
|
transformRequest: [function transformRequest(data, headers) {
|
|
2606
2307
|
const contentType = headers.getContentType() || "";
|
|
2607
2308
|
const hasJSONContentType = contentType.indexOf("application/json") > -1;
|
|
@@ -2611,9 +2312,12 @@ var defaults = {
|
|
|
2611
2312
|
}
|
|
2612
2313
|
const isFormData2 = utils_default.isFormData(data);
|
|
2613
2314
|
if (isFormData2) {
|
|
2315
|
+
if (!hasJSONContentType) {
|
|
2316
|
+
return data;
|
|
2317
|
+
}
|
|
2614
2318
|
return hasJSONContentType ? JSON.stringify(formDataToJSON_default(data)) : data;
|
|
2615
2319
|
}
|
|
2616
|
-
if (utils_default.isArrayBuffer(data) || utils_default.isBuffer(data) || utils_default.isStream(data) || utils_default.isFile(data) || utils_default.isBlob(data)
|
|
2320
|
+
if (utils_default.isArrayBuffer(data) || utils_default.isBuffer(data) || utils_default.isStream(data) || utils_default.isFile(data) || utils_default.isBlob(data)) {
|
|
2617
2321
|
return data;
|
|
2618
2322
|
}
|
|
2619
2323
|
if (utils_default.isArrayBufferView(data)) {
|
|
@@ -2647,9 +2351,6 @@ var defaults = {
|
|
|
2647
2351
|
const transitional2 = this.transitional || defaults.transitional;
|
|
2648
2352
|
const forcedJSONParsing = transitional2 && transitional2.forcedJSONParsing;
|
|
2649
2353
|
const JSONRequested = this.responseType === "json";
|
|
2650
|
-
if (utils_default.isResponse(data) || utils_default.isReadableStream(data)) {
|
|
2651
|
-
return data;
|
|
2652
|
-
}
|
|
2653
2354
|
if (data && utils_default.isString(data) && (forcedJSONParsing && !this.responseType || JSONRequested)) {
|
|
2654
2355
|
const silentJSONParsing = transitional2 && transitional2.silentJSONParsing;
|
|
2655
2356
|
const strictJSONParsing = !silentJSONParsing && JSONRequested;
|
|
@@ -2676,25 +2377,27 @@ var defaults = {
|
|
|
2676
2377
|
maxContentLength: -1,
|
|
2677
2378
|
maxBodyLength: -1,
|
|
2678
2379
|
env: {
|
|
2679
|
-
FormData:
|
|
2680
|
-
Blob:
|
|
2380
|
+
FormData: node_default.classes.FormData,
|
|
2381
|
+
Blob: node_default.classes.Blob
|
|
2681
2382
|
},
|
|
2682
2383
|
validateStatus: function validateStatus(status) {
|
|
2683
2384
|
return status >= 200 && status < 300;
|
|
2684
2385
|
},
|
|
2685
2386
|
headers: {
|
|
2686
2387
|
common: {
|
|
2687
|
-
"Accept": "application/json, text/plain, */*"
|
|
2688
|
-
"Content-Type": void 0
|
|
2388
|
+
"Accept": "application/json, text/plain, */*"
|
|
2689
2389
|
}
|
|
2690
2390
|
}
|
|
2691
2391
|
};
|
|
2692
|
-
utils_default.forEach(["delete", "get", "head",
|
|
2392
|
+
utils_default.forEach(["delete", "get", "head"], function forEachMethodNoData(method) {
|
|
2693
2393
|
defaults.headers[method] = {};
|
|
2694
2394
|
});
|
|
2395
|
+
utils_default.forEach(["post", "put", "patch"], function forEachMethodWithData(method) {
|
|
2396
|
+
defaults.headers[method] = utils_default.merge(DEFAULT_CONTENT_TYPE);
|
|
2397
|
+
});
|
|
2695
2398
|
var defaults_default = defaults;
|
|
2696
2399
|
|
|
2697
|
-
// node_modules/axios/lib/helpers/parseHeaders.js
|
|
2400
|
+
// node_modules/.pnpm/axios@1.3.2/node_modules/axios/lib/helpers/parseHeaders.js
|
|
2698
2401
|
var ignoreDuplicateOf = utils_default.toObjectSet([
|
|
2699
2402
|
"age",
|
|
2700
2403
|
"authorization",
|
|
@@ -2739,7 +2442,7 @@ var parseHeaders_default = (rawHeaders) => {
|
|
|
2739
2442
|
return parsed;
|
|
2740
2443
|
};
|
|
2741
2444
|
|
|
2742
|
-
// node_modules/axios/lib/core/AxiosHeaders.js
|
|
2445
|
+
// node_modules/.pnpm/axios@1.3.2/node_modules/axios/lib/core/AxiosHeaders.js
|
|
2743
2446
|
var $internals = Symbol("internals");
|
|
2744
2447
|
function normalizeHeader(header) {
|
|
2745
2448
|
return header && String(header).trim().toLowerCase();
|
|
@@ -2759,14 +2462,13 @@ function parseTokens(str) {
|
|
|
2759
2462
|
}
|
|
2760
2463
|
return tokens;
|
|
2761
2464
|
}
|
|
2762
|
-
|
|
2763
|
-
|
|
2465
|
+
function isValidHeaderName(str) {
|
|
2466
|
+
return /^[-_a-zA-Z]+$/.test(str.trim());
|
|
2467
|
+
}
|
|
2468
|
+
function matchHeaderValue(context, value, header, filter2) {
|
|
2764
2469
|
if (utils_default.isFunction(filter2)) {
|
|
2765
2470
|
return filter2.call(this, value, header);
|
|
2766
2471
|
}
|
|
2767
|
-
if (isHeaderNameFilter) {
|
|
2768
|
-
value = header;
|
|
2769
|
-
}
|
|
2770
2472
|
if (!utils_default.isString(value)) return;
|
|
2771
2473
|
if (utils_default.isString(filter2)) {
|
|
2772
2474
|
return value.indexOf(filter2) !== -1;
|
|
@@ -2812,15 +2514,6 @@ var AxiosHeaders = class {
|
|
|
2812
2514
|
setHeaders(header, valueOrRewrite);
|
|
2813
2515
|
} else if (utils_default.isString(header) && (header = header.trim()) && !isValidHeaderName(header)) {
|
|
2814
2516
|
setHeaders(parseHeaders_default(header), valueOrRewrite);
|
|
2815
|
-
} else if (utils_default.isObject(header) && utils_default.isIterable(header)) {
|
|
2816
|
-
let obj = {}, dest, key;
|
|
2817
|
-
for (const entry of header) {
|
|
2818
|
-
if (!utils_default.isArray(entry)) {
|
|
2819
|
-
throw TypeError("Object iterator must return a key-value pair");
|
|
2820
|
-
}
|
|
2821
|
-
obj[key = entry[0]] = (dest = obj[key]) ? utils_default.isArray(dest) ? [...dest, entry[1]] : [dest, entry[1]] : entry[1];
|
|
2822
|
-
}
|
|
2823
|
-
setHeaders(obj, valueOrRewrite);
|
|
2824
2517
|
} else {
|
|
2825
2518
|
header != null && setHeader(valueOrRewrite, header, rewrite);
|
|
2826
2519
|
}
|
|
@@ -2882,7 +2575,7 @@ var AxiosHeaders = class {
|
|
|
2882
2575
|
let deleted = false;
|
|
2883
2576
|
while (i--) {
|
|
2884
2577
|
const key = keys[i];
|
|
2885
|
-
if (!matcher || matchHeaderValue(this, this[key], key, matcher
|
|
2578
|
+
if (!matcher || matchHeaderValue(this, this[key], key, matcher)) {
|
|
2886
2579
|
delete this[key];
|
|
2887
2580
|
deleted = true;
|
|
2888
2581
|
}
|
|
@@ -2924,9 +2617,6 @@ var AxiosHeaders = class {
|
|
|
2924
2617
|
toString() {
|
|
2925
2618
|
return Object.entries(this.toJSON()).map(([header, value]) => header + ": " + value).join("\n");
|
|
2926
2619
|
}
|
|
2927
|
-
getSetCookie() {
|
|
2928
|
-
return this.get("set-cookie") || [];
|
|
2929
|
-
}
|
|
2930
2620
|
get [Symbol.toStringTag]() {
|
|
2931
2621
|
return "AxiosHeaders";
|
|
2932
2622
|
}
|
|
@@ -2956,19 +2646,11 @@ var AxiosHeaders = class {
|
|
|
2956
2646
|
}
|
|
2957
2647
|
};
|
|
2958
2648
|
AxiosHeaders.accessor(["Content-Type", "Content-Length", "Accept", "Accept-Encoding", "User-Agent", "Authorization"]);
|
|
2959
|
-
utils_default.
|
|
2960
|
-
let mapped = key[0].toUpperCase() + key.slice(1);
|
|
2961
|
-
return {
|
|
2962
|
-
get: () => value,
|
|
2963
|
-
set(headerValue) {
|
|
2964
|
-
this[mapped] = headerValue;
|
|
2965
|
-
}
|
|
2966
|
-
};
|
|
2967
|
-
});
|
|
2649
|
+
utils_default.freezeMethods(AxiosHeaders.prototype);
|
|
2968
2650
|
utils_default.freezeMethods(AxiosHeaders);
|
|
2969
2651
|
var AxiosHeaders_default = AxiosHeaders;
|
|
2970
2652
|
|
|
2971
|
-
// node_modules/axios/lib/core/transformData.js
|
|
2653
|
+
// node_modules/.pnpm/axios@1.3.2/node_modules/axios/lib/core/transformData.js
|
|
2972
2654
|
function transformData(fns, response) {
|
|
2973
2655
|
const config = this || defaults_default;
|
|
2974
2656
|
const context = response || config;
|
|
@@ -2981,12 +2663,12 @@ function transformData(fns, response) {
|
|
|
2981
2663
|
return data;
|
|
2982
2664
|
}
|
|
2983
2665
|
|
|
2984
|
-
// node_modules/axios/lib/cancel/isCancel.js
|
|
2666
|
+
// node_modules/.pnpm/axios@1.3.2/node_modules/axios/lib/cancel/isCancel.js
|
|
2985
2667
|
function isCancel(value) {
|
|
2986
2668
|
return !!(value && value.__CANCEL__);
|
|
2987
2669
|
}
|
|
2988
2670
|
|
|
2989
|
-
// node_modules/axios/lib/cancel/CanceledError.js
|
|
2671
|
+
// node_modules/.pnpm/axios@1.3.2/node_modules/axios/lib/cancel/CanceledError.js
|
|
2990
2672
|
function CanceledError(message, config, request) {
|
|
2991
2673
|
AxiosError_default.call(this, message == null ? "canceled" : message, AxiosError_default.ERR_CANCELED, config, request);
|
|
2992
2674
|
this.name = "CanceledError";
|
|
@@ -2996,7 +2678,7 @@ utils_default.inherits(CanceledError, AxiosError_default, {
|
|
|
2996
2678
|
});
|
|
2997
2679
|
var CanceledError_default = CanceledError;
|
|
2998
2680
|
|
|
2999
|
-
// node_modules/axios/lib/core/settle.js
|
|
2681
|
+
// node_modules/.pnpm/axios@1.3.2/node_modules/axios/lib/core/settle.js
|
|
3000
2682
|
function settle(resolve, reject, response) {
|
|
3001
2683
|
const validateStatus2 = response.config.validateStatus;
|
|
3002
2684
|
if (!response.status || !validateStatus2 || validateStatus2(response.status)) {
|
|
@@ -3012,26 +2694,25 @@ function settle(resolve, reject, response) {
|
|
|
3012
2694
|
}
|
|
3013
2695
|
}
|
|
3014
2696
|
|
|
3015
|
-
// node_modules/axios/lib/helpers/isAbsoluteURL.js
|
|
2697
|
+
// node_modules/.pnpm/axios@1.3.2/node_modules/axios/lib/helpers/isAbsoluteURL.js
|
|
3016
2698
|
function isAbsoluteURL(url2) {
|
|
3017
2699
|
return /^([a-z][a-z\d+\-.]*:)?\/\//i.test(url2);
|
|
3018
2700
|
}
|
|
3019
2701
|
|
|
3020
|
-
// node_modules/axios/lib/helpers/combineURLs.js
|
|
2702
|
+
// node_modules/.pnpm/axios@1.3.2/node_modules/axios/lib/helpers/combineURLs.js
|
|
3021
2703
|
function combineURLs(baseURL, relativeURL) {
|
|
3022
|
-
return relativeURL ? baseURL.replace(
|
|
2704
|
+
return relativeURL ? baseURL.replace(/\/+$/, "") + "/" + relativeURL.replace(/^\/+/, "") : baseURL;
|
|
3023
2705
|
}
|
|
3024
2706
|
|
|
3025
|
-
// node_modules/axios/lib/core/buildFullPath.js
|
|
3026
|
-
function buildFullPath(baseURL, requestedURL
|
|
3027
|
-
|
|
3028
|
-
if (baseURL && (isRelativeUrl || allowAbsoluteUrls == false)) {
|
|
2707
|
+
// node_modules/.pnpm/axios@1.3.2/node_modules/axios/lib/core/buildFullPath.js
|
|
2708
|
+
function buildFullPath(baseURL, requestedURL) {
|
|
2709
|
+
if (baseURL && !isAbsoluteURL(requestedURL)) {
|
|
3029
2710
|
return combineURLs(baseURL, requestedURL);
|
|
3030
2711
|
}
|
|
3031
2712
|
return requestedURL;
|
|
3032
2713
|
}
|
|
3033
2714
|
|
|
3034
|
-
// node_modules/axios/lib/adapters/http.js
|
|
2715
|
+
// node_modules/.pnpm/axios@1.3.2/node_modules/axios/lib/adapters/http.js
|
|
3035
2716
|
var import_proxy_from_env = __toESM(require_proxy_from_env(), 1);
|
|
3036
2717
|
var import_http = __toESM(require("http"), 1);
|
|
3037
2718
|
var import_https = __toESM(require("https"), 1);
|
|
@@ -3039,19 +2720,19 @@ var import_util2 = __toESM(require("util"), 1);
|
|
|
3039
2720
|
var import_follow_redirects = __toESM(require_follow_redirects(), 1);
|
|
3040
2721
|
var import_zlib = __toESM(require("zlib"), 1);
|
|
3041
2722
|
|
|
3042
|
-
// node_modules/axios/lib/env/data.js
|
|
3043
|
-
var VERSION = "1.
|
|
2723
|
+
// node_modules/.pnpm/axios@1.3.2/node_modules/axios/lib/env/data.js
|
|
2724
|
+
var VERSION = "1.3.2";
|
|
3044
2725
|
|
|
3045
|
-
// node_modules/axios/lib/helpers/parseProtocol.js
|
|
2726
|
+
// node_modules/.pnpm/axios@1.3.2/node_modules/axios/lib/helpers/parseProtocol.js
|
|
3046
2727
|
function parseProtocol(url2) {
|
|
3047
2728
|
const match = /^([-+\w]{1,25})(:?\/\/|:)/.exec(url2);
|
|
3048
2729
|
return match && match[1] || "";
|
|
3049
2730
|
}
|
|
3050
2731
|
|
|
3051
|
-
// node_modules/axios/lib/helpers/fromDataURI.js
|
|
2732
|
+
// node_modules/.pnpm/axios@1.3.2/node_modules/axios/lib/helpers/fromDataURI.js
|
|
3052
2733
|
var DATA_URL_PATTERN = /^(?:([^;]+);)?(?:[^;]+;)?(base64|),([\s\S]*)$/;
|
|
3053
2734
|
function fromDataURI(uri, asBlob, options) {
|
|
3054
|
-
const _Blob = options && options.Blob ||
|
|
2735
|
+
const _Blob = options && options.Blob || node_default.classes.Blob;
|
|
3055
2736
|
const protocol = parseProtocol(uri);
|
|
3056
2737
|
if (asBlob === void 0 && _Blob) {
|
|
3057
2738
|
asBlob = true;
|
|
@@ -3077,11 +2758,75 @@ function fromDataURI(uri, asBlob, options) {
|
|
|
3077
2758
|
throw new AxiosError_default("Unsupported protocol " + protocol, AxiosError_default.ERR_NOT_SUPPORT);
|
|
3078
2759
|
}
|
|
3079
2760
|
|
|
3080
|
-
// node_modules/axios/lib/adapters/http.js
|
|
2761
|
+
// node_modules/.pnpm/axios@1.3.2/node_modules/axios/lib/adapters/http.js
|
|
3081
2762
|
var import_stream4 = __toESM(require("stream"), 1);
|
|
3082
2763
|
|
|
3083
|
-
// node_modules/axios/lib/helpers/AxiosTransformStream.js
|
|
2764
|
+
// node_modules/.pnpm/axios@1.3.2/node_modules/axios/lib/helpers/AxiosTransformStream.js
|
|
3084
2765
|
var import_stream = __toESM(require("stream"), 1);
|
|
2766
|
+
|
|
2767
|
+
// node_modules/.pnpm/axios@1.3.2/node_modules/axios/lib/helpers/throttle.js
|
|
2768
|
+
function throttle(fn, freq) {
|
|
2769
|
+
let timestamp = 0;
|
|
2770
|
+
const threshold = 1e3 / freq;
|
|
2771
|
+
let timer = null;
|
|
2772
|
+
return function throttled(force, args) {
|
|
2773
|
+
const now = Date.now();
|
|
2774
|
+
if (force || now - timestamp > threshold) {
|
|
2775
|
+
if (timer) {
|
|
2776
|
+
clearTimeout(timer);
|
|
2777
|
+
timer = null;
|
|
2778
|
+
}
|
|
2779
|
+
timestamp = now;
|
|
2780
|
+
return fn.apply(null, args);
|
|
2781
|
+
}
|
|
2782
|
+
if (!timer) {
|
|
2783
|
+
timer = setTimeout(() => {
|
|
2784
|
+
timer = null;
|
|
2785
|
+
timestamp = Date.now();
|
|
2786
|
+
return fn.apply(null, args);
|
|
2787
|
+
}, threshold - (now - timestamp));
|
|
2788
|
+
}
|
|
2789
|
+
};
|
|
2790
|
+
}
|
|
2791
|
+
var throttle_default = throttle;
|
|
2792
|
+
|
|
2793
|
+
// node_modules/.pnpm/axios@1.3.2/node_modules/axios/lib/helpers/speedometer.js
|
|
2794
|
+
function speedometer(samplesCount, min) {
|
|
2795
|
+
samplesCount = samplesCount || 10;
|
|
2796
|
+
const bytes = new Array(samplesCount);
|
|
2797
|
+
const timestamps = new Array(samplesCount);
|
|
2798
|
+
let head = 0;
|
|
2799
|
+
let tail = 0;
|
|
2800
|
+
let firstSampleTS;
|
|
2801
|
+
min = min !== void 0 ? min : 1e3;
|
|
2802
|
+
return function push(chunkLength) {
|
|
2803
|
+
const now = Date.now();
|
|
2804
|
+
const startedAt = timestamps[tail];
|
|
2805
|
+
if (!firstSampleTS) {
|
|
2806
|
+
firstSampleTS = now;
|
|
2807
|
+
}
|
|
2808
|
+
bytes[head] = chunkLength;
|
|
2809
|
+
timestamps[head] = now;
|
|
2810
|
+
let i = tail;
|
|
2811
|
+
let bytesCount = 0;
|
|
2812
|
+
while (i !== head) {
|
|
2813
|
+
bytesCount += bytes[i++];
|
|
2814
|
+
i = i % samplesCount;
|
|
2815
|
+
}
|
|
2816
|
+
head = (head + 1) % samplesCount;
|
|
2817
|
+
if (head === tail) {
|
|
2818
|
+
tail = (tail + 1) % samplesCount;
|
|
2819
|
+
}
|
|
2820
|
+
if (now - firstSampleTS < min) {
|
|
2821
|
+
return;
|
|
2822
|
+
}
|
|
2823
|
+
const passed = startedAt && now - startedAt;
|
|
2824
|
+
return passed ? Math.round(bytesCount * 1e3 / passed) : void 0;
|
|
2825
|
+
};
|
|
2826
|
+
}
|
|
2827
|
+
var speedometer_default = speedometer;
|
|
2828
|
+
|
|
2829
|
+
// node_modules/.pnpm/axios@1.3.2/node_modules/axios/lib/helpers/AxiosTransformStream.js
|
|
3085
2830
|
var kInternals = Symbol("internals");
|
|
3086
2831
|
var AxiosTransformStream = class extends import_stream.default.Transform {
|
|
3087
2832
|
constructor(options) {
|
|
@@ -3098,8 +2843,11 @@ var AxiosTransformStream = class extends import_stream.default.Transform {
|
|
|
3098
2843
|
super({
|
|
3099
2844
|
readableHighWaterMark: options.chunkSize
|
|
3100
2845
|
});
|
|
2846
|
+
const self2 = this;
|
|
3101
2847
|
const internals = this[kInternals] = {
|
|
2848
|
+
length: options.length,
|
|
3102
2849
|
timeWindow: options.timeWindow,
|
|
2850
|
+
ticksRate: options.ticksRate,
|
|
3103
2851
|
chunkSize: options.chunkSize,
|
|
3104
2852
|
maxRate: options.maxRate,
|
|
3105
2853
|
minChunkSize: options.minChunkSize,
|
|
@@ -3110,6 +2858,7 @@ var AxiosTransformStream = class extends import_stream.default.Transform {
|
|
|
3110
2858
|
bytes: 0,
|
|
3111
2859
|
onReadCallback: null
|
|
3112
2860
|
};
|
|
2861
|
+
const _speedometer = speedometer_default(internals.ticksRate * options.samplesCount, internals.timeWindow);
|
|
3113
2862
|
this.on("newListener", (event) => {
|
|
3114
2863
|
if (event === "progress") {
|
|
3115
2864
|
if (!internals.isCaptured) {
|
|
@@ -3117,6 +2866,30 @@ var AxiosTransformStream = class extends import_stream.default.Transform {
|
|
|
3117
2866
|
}
|
|
3118
2867
|
}
|
|
3119
2868
|
});
|
|
2869
|
+
let bytesNotified = 0;
|
|
2870
|
+
internals.updateProgress = throttle_default(function throttledHandler() {
|
|
2871
|
+
const totalBytes = internals.length;
|
|
2872
|
+
const bytesTransferred = internals.bytesSeen;
|
|
2873
|
+
const progressBytes = bytesTransferred - bytesNotified;
|
|
2874
|
+
if (!progressBytes || self2.destroyed) return;
|
|
2875
|
+
const rate = _speedometer(progressBytes);
|
|
2876
|
+
bytesNotified = bytesTransferred;
|
|
2877
|
+
process.nextTick(() => {
|
|
2878
|
+
self2.emit("progress", {
|
|
2879
|
+
"loaded": bytesTransferred,
|
|
2880
|
+
"total": totalBytes,
|
|
2881
|
+
"progress": totalBytes ? bytesTransferred / totalBytes : void 0,
|
|
2882
|
+
"bytes": progressBytes,
|
|
2883
|
+
"rate": rate ? rate : void 0,
|
|
2884
|
+
"estimated": rate && totalBytes && bytesTransferred <= totalBytes ? (totalBytes - bytesTransferred) / rate : void 0
|
|
2885
|
+
});
|
|
2886
|
+
});
|
|
2887
|
+
}, internals.ticksRate);
|
|
2888
|
+
const onFinish = () => {
|
|
2889
|
+
internals.updateProgress(true);
|
|
2890
|
+
};
|
|
2891
|
+
this.once("end", onFinish);
|
|
2892
|
+
this.once("error", onFinish);
|
|
3120
2893
|
}
|
|
3121
2894
|
_read(size) {
|
|
3122
2895
|
const internals = this[kInternals];
|
|
@@ -3126,6 +2899,7 @@ var AxiosTransformStream = class extends import_stream.default.Transform {
|
|
|
3126
2899
|
return super._read(size);
|
|
3127
2900
|
}
|
|
3128
2901
|
_transform(chunk, encoding, callback) {
|
|
2902
|
+
const self2 = this;
|
|
3129
2903
|
const internals = this[kInternals];
|
|
3130
2904
|
const maxRate = internals.maxRate;
|
|
3131
2905
|
const readableHighWaterMark = this.readableHighWaterMark;
|
|
@@ -3133,12 +2907,14 @@ var AxiosTransformStream = class extends import_stream.default.Transform {
|
|
|
3133
2907
|
const divider = 1e3 / timeWindow;
|
|
3134
2908
|
const bytesThreshold = maxRate / divider;
|
|
3135
2909
|
const minChunkSize = internals.minChunkSize !== false ? Math.max(internals.minChunkSize, bytesThreshold * 0.01) : 0;
|
|
3136
|
-
|
|
2910
|
+
function pushChunk(_chunk, _callback) {
|
|
3137
2911
|
const bytes = Buffer.byteLength(_chunk);
|
|
3138
2912
|
internals.bytesSeen += bytes;
|
|
3139
2913
|
internals.bytes += bytes;
|
|
3140
|
-
|
|
3141
|
-
|
|
2914
|
+
if (internals.isCaptured) {
|
|
2915
|
+
internals.updateProgress();
|
|
2916
|
+
}
|
|
2917
|
+
if (self2.push(_chunk)) {
|
|
3142
2918
|
process.nextTick(_callback);
|
|
3143
2919
|
} else {
|
|
3144
2920
|
internals.onReadCallback = () => {
|
|
@@ -3146,7 +2922,7 @@ var AxiosTransformStream = class extends import_stream.default.Transform {
|
|
|
3146
2922
|
process.nextTick(_callback);
|
|
3147
2923
|
};
|
|
3148
2924
|
}
|
|
3149
|
-
}
|
|
2925
|
+
}
|
|
3150
2926
|
const transformChunk = (_chunk, _callback) => {
|
|
3151
2927
|
const chunkSize = Buffer.byteLength(_chunk);
|
|
3152
2928
|
let chunkRemainder = null;
|
|
@@ -3192,17 +2968,21 @@ var AxiosTransformStream = class extends import_stream.default.Transform {
|
|
|
3192
2968
|
}
|
|
3193
2969
|
});
|
|
3194
2970
|
}
|
|
2971
|
+
setLength(length) {
|
|
2972
|
+
this[kInternals].length = +length;
|
|
2973
|
+
return this;
|
|
2974
|
+
}
|
|
3195
2975
|
};
|
|
3196
2976
|
var AxiosTransformStream_default = AxiosTransformStream;
|
|
3197
2977
|
|
|
3198
|
-
// node_modules/axios/lib/adapters/http.js
|
|
3199
|
-
var import_events = require("events");
|
|
2978
|
+
// node_modules/.pnpm/axios@1.3.2/node_modules/axios/lib/adapters/http.js
|
|
2979
|
+
var import_events = __toESM(require("events"), 1);
|
|
3200
2980
|
|
|
3201
|
-
// node_modules/axios/lib/helpers/formDataToStream.js
|
|
3202
|
-
var import_util =
|
|
2981
|
+
// node_modules/.pnpm/axios@1.3.2/node_modules/axios/lib/helpers/formDataToStream.js
|
|
2982
|
+
var import_util = require("util");
|
|
3203
2983
|
var import_stream2 = require("stream");
|
|
3204
2984
|
|
|
3205
|
-
// node_modules/axios/lib/helpers/readBlob.js
|
|
2985
|
+
// node_modules/.pnpm/axios@1.3.2/node_modules/axios/lib/helpers/readBlob.js
|
|
3206
2986
|
var { asyncIterator } = Symbol;
|
|
3207
2987
|
var readBlob = async function* (blob) {
|
|
3208
2988
|
if (blob.stream) {
|
|
@@ -3217,9 +2997,9 @@ var readBlob = async function* (blob) {
|
|
|
3217
2997
|
};
|
|
3218
2998
|
var readBlob_default = readBlob;
|
|
3219
2999
|
|
|
3220
|
-
// node_modules/axios/lib/helpers/formDataToStream.js
|
|
3221
|
-
var BOUNDARY_ALPHABET =
|
|
3222
|
-
var textEncoder =
|
|
3000
|
+
// node_modules/.pnpm/axios@1.3.2/node_modules/axios/lib/helpers/formDataToStream.js
|
|
3001
|
+
var BOUNDARY_ALPHABET = utils_default.ALPHABET.ALPHA_DIGIT + "-_";
|
|
3002
|
+
var textEncoder = new import_util.TextEncoder();
|
|
3223
3003
|
var CRLF = "\r\n";
|
|
3224
3004
|
var CRLF_BYTES = textEncoder.encode(CRLF);
|
|
3225
3005
|
var CRLF_BYTES_COUNT = 2;
|
|
@@ -3261,7 +3041,7 @@ var formDataToStream = (form, headersHandler, options) => {
|
|
|
3261
3041
|
const {
|
|
3262
3042
|
tag = "form-data-boundary",
|
|
3263
3043
|
size = 25,
|
|
3264
|
-
boundary = tag + "-" +
|
|
3044
|
+
boundary = tag + "-" + utils_default.generateString(size, BOUNDARY_ALPHABET)
|
|
3265
3045
|
} = options || {};
|
|
3266
3046
|
if (!utils_default.isFormData(form)) {
|
|
3267
3047
|
throw TypeError("FormData instance required");
|
|
@@ -3270,7 +3050,7 @@ var formDataToStream = (form, headersHandler, options) => {
|
|
|
3270
3050
|
throw Error("boundary must be 10-70 characters long");
|
|
3271
3051
|
}
|
|
3272
3052
|
const boundaryBytes = textEncoder.encode("--" + boundary + CRLF);
|
|
3273
|
-
const footerBytes = textEncoder.encode("--" + boundary + "--" + CRLF);
|
|
3053
|
+
const footerBytes = textEncoder.encode("--" + boundary + "--" + CRLF + CRLF);
|
|
3274
3054
|
let contentLength = footerBytes.byteLength;
|
|
3275
3055
|
const parts = Array.from(form.entries()).map(([name, value]) => {
|
|
3276
3056
|
const part = new FormDataPart(name, value);
|
|
@@ -3296,7 +3076,7 @@ var formDataToStream = (form, headersHandler, options) => {
|
|
|
3296
3076
|
};
|
|
3297
3077
|
var formDataToStream_default = formDataToStream;
|
|
3298
3078
|
|
|
3299
|
-
// node_modules/axios/lib/helpers/ZlibHeaderTransformStream.js
|
|
3079
|
+
// node_modules/.pnpm/axios@1.3.2/node_modules/axios/lib/helpers/ZlibHeaderTransformStream.js
|
|
3300
3080
|
var import_stream3 = __toESM(require("stream"), 1);
|
|
3301
3081
|
var ZlibHeaderTransformStream = class extends import_stream3.default.Transform {
|
|
3302
3082
|
__transform(chunk, encoding, callback) {
|
|
@@ -3318,172 +3098,47 @@ var ZlibHeaderTransformStream = class extends import_stream3.default.Transform {
|
|
|
3318
3098
|
};
|
|
3319
3099
|
var ZlibHeaderTransformStream_default = ZlibHeaderTransformStream;
|
|
3320
3100
|
|
|
3321
|
-
// node_modules/axios/lib/
|
|
3322
|
-
var
|
|
3323
|
-
|
|
3324
|
-
|
|
3325
|
-
fn.apply(this, args).then((value) => {
|
|
3326
|
-
try {
|
|
3327
|
-
reducer ? cb(null, ...reducer(value)) : cb(null, value);
|
|
3328
|
-
} catch (err) {
|
|
3329
|
-
cb(err);
|
|
3330
|
-
}
|
|
3331
|
-
}, cb);
|
|
3332
|
-
} : fn;
|
|
3101
|
+
// node_modules/.pnpm/axios@1.3.2/node_modules/axios/lib/adapters/http.js
|
|
3102
|
+
var zlibOptions = {
|
|
3103
|
+
flush: import_zlib.default.constants.Z_SYNC_FLUSH,
|
|
3104
|
+
finishFlush: import_zlib.default.constants.Z_SYNC_FLUSH
|
|
3333
3105
|
};
|
|
3334
|
-
var
|
|
3335
|
-
|
|
3336
|
-
|
|
3337
|
-
|
|
3338
|
-
|
|
3339
|
-
|
|
3340
|
-
|
|
3341
|
-
|
|
3342
|
-
|
|
3343
|
-
|
|
3344
|
-
|
|
3345
|
-
|
|
3346
|
-
|
|
3347
|
-
|
|
3348
|
-
|
|
3349
|
-
|
|
3350
|
-
|
|
3351
|
-
|
|
3352
|
-
|
|
3353
|
-
|
|
3354
|
-
|
|
3355
|
-
|
|
3356
|
-
|
|
3357
|
-
|
|
3106
|
+
var brotliOptions = {
|
|
3107
|
+
flush: import_zlib.default.constants.BROTLI_OPERATION_FLUSH,
|
|
3108
|
+
finishFlush: import_zlib.default.constants.BROTLI_OPERATION_FLUSH
|
|
3109
|
+
};
|
|
3110
|
+
var isBrotliSupported = utils_default.isFunction(import_zlib.default.createBrotliDecompress);
|
|
3111
|
+
var { http: httpFollow, https: httpsFollow } = import_follow_redirects.default;
|
|
3112
|
+
var isHttps = /https:?/;
|
|
3113
|
+
var supportedProtocols = node_default.protocols.map((protocol) => {
|
|
3114
|
+
return protocol + ":";
|
|
3115
|
+
});
|
|
3116
|
+
function dispatchBeforeRedirect(options) {
|
|
3117
|
+
if (options.beforeRedirects.proxy) {
|
|
3118
|
+
options.beforeRedirects.proxy(options);
|
|
3119
|
+
}
|
|
3120
|
+
if (options.beforeRedirects.config) {
|
|
3121
|
+
options.beforeRedirects.config(options);
|
|
3122
|
+
}
|
|
3123
|
+
}
|
|
3124
|
+
function setProxy(options, configProxy, location) {
|
|
3125
|
+
let proxy = configProxy;
|
|
3126
|
+
if (!proxy && proxy !== false) {
|
|
3127
|
+
const proxyUrl = (0, import_proxy_from_env.getProxyForUrl)(location);
|
|
3128
|
+
if (proxyUrl) {
|
|
3129
|
+
proxy = new URL(proxyUrl);
|
|
3358
3130
|
}
|
|
3359
|
-
|
|
3360
|
-
|
|
3361
|
-
|
|
3131
|
+
}
|
|
3132
|
+
if (proxy) {
|
|
3133
|
+
if (proxy.username) {
|
|
3134
|
+
proxy.auth = (proxy.username || "") + ":" + (proxy.password || "");
|
|
3362
3135
|
}
|
|
3363
|
-
if (
|
|
3364
|
-
|
|
3365
|
-
|
|
3366
|
-
|
|
3367
|
-
|
|
3368
|
-
|
|
3369
|
-
}
|
|
3370
|
-
var speedometer_default = speedometer;
|
|
3371
|
-
|
|
3372
|
-
// node_modules/axios/lib/helpers/throttle.js
|
|
3373
|
-
function throttle(fn, freq) {
|
|
3374
|
-
let timestamp = 0;
|
|
3375
|
-
let threshold = 1e3 / freq;
|
|
3376
|
-
let lastArgs;
|
|
3377
|
-
let timer;
|
|
3378
|
-
const invoke = (args, now = Date.now()) => {
|
|
3379
|
-
timestamp = now;
|
|
3380
|
-
lastArgs = null;
|
|
3381
|
-
if (timer) {
|
|
3382
|
-
clearTimeout(timer);
|
|
3383
|
-
timer = null;
|
|
3384
|
-
}
|
|
3385
|
-
fn.apply(null, args);
|
|
3386
|
-
};
|
|
3387
|
-
const throttled = (...args) => {
|
|
3388
|
-
const now = Date.now();
|
|
3389
|
-
const passed = now - timestamp;
|
|
3390
|
-
if (passed >= threshold) {
|
|
3391
|
-
invoke(args, now);
|
|
3392
|
-
} else {
|
|
3393
|
-
lastArgs = args;
|
|
3394
|
-
if (!timer) {
|
|
3395
|
-
timer = setTimeout(() => {
|
|
3396
|
-
timer = null;
|
|
3397
|
-
invoke(lastArgs);
|
|
3398
|
-
}, threshold - passed);
|
|
3399
|
-
}
|
|
3400
|
-
}
|
|
3401
|
-
};
|
|
3402
|
-
const flush = () => lastArgs && invoke(lastArgs);
|
|
3403
|
-
return [throttled, flush];
|
|
3404
|
-
}
|
|
3405
|
-
var throttle_default = throttle;
|
|
3406
|
-
|
|
3407
|
-
// node_modules/axios/lib/helpers/progressEventReducer.js
|
|
3408
|
-
var progressEventReducer = (listener, isDownloadStream, freq = 3) => {
|
|
3409
|
-
let bytesNotified = 0;
|
|
3410
|
-
const _speedometer = speedometer_default(50, 250);
|
|
3411
|
-
return throttle_default((e) => {
|
|
3412
|
-
const loaded = e.loaded;
|
|
3413
|
-
const total = e.lengthComputable ? e.total : void 0;
|
|
3414
|
-
const progressBytes = loaded - bytesNotified;
|
|
3415
|
-
const rate = _speedometer(progressBytes);
|
|
3416
|
-
const inRange = loaded <= total;
|
|
3417
|
-
bytesNotified = loaded;
|
|
3418
|
-
const data = {
|
|
3419
|
-
loaded,
|
|
3420
|
-
total,
|
|
3421
|
-
progress: total ? loaded / total : void 0,
|
|
3422
|
-
bytes: progressBytes,
|
|
3423
|
-
rate: rate ? rate : void 0,
|
|
3424
|
-
estimated: rate && total && inRange ? (total - loaded) / rate : void 0,
|
|
3425
|
-
event: e,
|
|
3426
|
-
lengthComputable: total != null,
|
|
3427
|
-
[isDownloadStream ? "download" : "upload"]: true
|
|
3428
|
-
};
|
|
3429
|
-
listener(data);
|
|
3430
|
-
}, freq);
|
|
3431
|
-
};
|
|
3432
|
-
var progressEventDecorator = (total, throttled) => {
|
|
3433
|
-
const lengthComputable = total != null;
|
|
3434
|
-
return [(loaded) => throttled[0]({
|
|
3435
|
-
lengthComputable,
|
|
3436
|
-
total,
|
|
3437
|
-
loaded
|
|
3438
|
-
}), throttled[1]];
|
|
3439
|
-
};
|
|
3440
|
-
var asyncDecorator = (fn) => (...args) => utils_default.asap(() => fn(...args));
|
|
3441
|
-
|
|
3442
|
-
// node_modules/axios/lib/adapters/http.js
|
|
3443
|
-
var zlibOptions = {
|
|
3444
|
-
flush: import_zlib.default.constants.Z_SYNC_FLUSH,
|
|
3445
|
-
finishFlush: import_zlib.default.constants.Z_SYNC_FLUSH
|
|
3446
|
-
};
|
|
3447
|
-
var brotliOptions = {
|
|
3448
|
-
flush: import_zlib.default.constants.BROTLI_OPERATION_FLUSH,
|
|
3449
|
-
finishFlush: import_zlib.default.constants.BROTLI_OPERATION_FLUSH
|
|
3450
|
-
};
|
|
3451
|
-
var isBrotliSupported = utils_default.isFunction(import_zlib.default.createBrotliDecompress);
|
|
3452
|
-
var { http: httpFollow, https: httpsFollow } = import_follow_redirects.default;
|
|
3453
|
-
var isHttps = /https:?/;
|
|
3454
|
-
var supportedProtocols = platform_default.protocols.map((protocol) => {
|
|
3455
|
-
return protocol + ":";
|
|
3456
|
-
});
|
|
3457
|
-
var flushOnFinish = (stream4, [throttled, flush]) => {
|
|
3458
|
-
stream4.on("end", flush).on("error", flush);
|
|
3459
|
-
return throttled;
|
|
3460
|
-
};
|
|
3461
|
-
function dispatchBeforeRedirect(options, responseDetails) {
|
|
3462
|
-
if (options.beforeRedirects.proxy) {
|
|
3463
|
-
options.beforeRedirects.proxy(options);
|
|
3464
|
-
}
|
|
3465
|
-
if (options.beforeRedirects.config) {
|
|
3466
|
-
options.beforeRedirects.config(options, responseDetails);
|
|
3467
|
-
}
|
|
3468
|
-
}
|
|
3469
|
-
function setProxy(options, configProxy, location) {
|
|
3470
|
-
let proxy = configProxy;
|
|
3471
|
-
if (!proxy && proxy !== false) {
|
|
3472
|
-
const proxyUrl = import_proxy_from_env.default.getProxyForUrl(location);
|
|
3473
|
-
if (proxyUrl) {
|
|
3474
|
-
proxy = new URL(proxyUrl);
|
|
3475
|
-
}
|
|
3476
|
-
}
|
|
3477
|
-
if (proxy) {
|
|
3478
|
-
if (proxy.username) {
|
|
3479
|
-
proxy.auth = (proxy.username || "") + ":" + (proxy.password || "");
|
|
3480
|
-
}
|
|
3481
|
-
if (proxy.auth) {
|
|
3482
|
-
if (proxy.auth.username || proxy.auth.password) {
|
|
3483
|
-
proxy.auth = (proxy.auth.username || "") + ":" + (proxy.auth.password || "");
|
|
3484
|
-
}
|
|
3485
|
-
const base64 = Buffer.from(proxy.auth, "utf8").toString("base64");
|
|
3486
|
-
options.headers["Proxy-Authorization"] = "Basic " + base64;
|
|
3136
|
+
if (proxy.auth) {
|
|
3137
|
+
if (proxy.auth.username || proxy.auth.password) {
|
|
3138
|
+
proxy.auth = (proxy.auth.username || "") + ":" + (proxy.auth.password || "");
|
|
3139
|
+
}
|
|
3140
|
+
const base64 = Buffer.from(proxy.auth, "utf8").toString("base64");
|
|
3141
|
+
options.headers["Proxy-Authorization"] = "Basic " + base64;
|
|
3487
3142
|
}
|
|
3488
3143
|
options.headers.host = options.hostname + (options.port ? ":" + options.port : "");
|
|
3489
3144
|
const proxyHost = proxy.hostname || proxy.host;
|
|
@@ -3500,58 +3155,20 @@ function setProxy(options, configProxy, location) {
|
|
|
3500
3155
|
};
|
|
3501
3156
|
}
|
|
3502
3157
|
var isHttpAdapterSupported = typeof process !== "undefined" && utils_default.kindOf(process) === "process";
|
|
3503
|
-
var wrapAsync = (asyncExecutor) => {
|
|
3504
|
-
return new Promise((resolve, reject) => {
|
|
3505
|
-
let onDone;
|
|
3506
|
-
let isDone;
|
|
3507
|
-
const done = (value, isRejected) => {
|
|
3508
|
-
if (isDone) return;
|
|
3509
|
-
isDone = true;
|
|
3510
|
-
onDone && onDone(value, isRejected);
|
|
3511
|
-
};
|
|
3512
|
-
const _resolve = (value) => {
|
|
3513
|
-
done(value);
|
|
3514
|
-
resolve(value);
|
|
3515
|
-
};
|
|
3516
|
-
const _reject = (reason) => {
|
|
3517
|
-
done(reason, true);
|
|
3518
|
-
reject(reason);
|
|
3519
|
-
};
|
|
3520
|
-
asyncExecutor(_resolve, _reject, (onDoneHandler) => onDone = onDoneHandler).catch(_reject);
|
|
3521
|
-
});
|
|
3522
|
-
};
|
|
3523
|
-
var resolveFamily = ({ address, family }) => {
|
|
3524
|
-
if (!utils_default.isString(address)) {
|
|
3525
|
-
throw TypeError("address must be a string");
|
|
3526
|
-
}
|
|
3527
|
-
return {
|
|
3528
|
-
address,
|
|
3529
|
-
family: family || (address.indexOf(".") < 0 ? 6 : 4)
|
|
3530
|
-
};
|
|
3531
|
-
};
|
|
3532
|
-
var buildAddressEntry = (address, family) => resolveFamily(utils_default.isObject(address) ? address : { address, family });
|
|
3533
3158
|
var http_default = isHttpAdapterSupported && function httpAdapter(config) {
|
|
3534
|
-
return
|
|
3535
|
-
let
|
|
3536
|
-
const
|
|
3159
|
+
return new Promise(async function dispatchHttpRequest(resolvePromise, rejectPromise) {
|
|
3160
|
+
let data = config.data;
|
|
3161
|
+
const responseType = config.responseType;
|
|
3162
|
+
const responseEncoding = config.responseEncoding;
|
|
3537
3163
|
const method = config.method.toUpperCase();
|
|
3164
|
+
let isFinished;
|
|
3538
3165
|
let isDone;
|
|
3539
3166
|
let rejected = false;
|
|
3540
3167
|
let req;
|
|
3541
|
-
|
|
3542
|
-
|
|
3543
|
-
|
|
3544
|
-
|
|
3545
|
-
if (err) {
|
|
3546
|
-
return cb(err);
|
|
3547
|
-
}
|
|
3548
|
-
const addresses = utils_default.isArray(arg0) ? arg0.map((addr) => buildAddressEntry(addr)) : [buildAddressEntry(arg0, arg1)];
|
|
3549
|
-
opt.all ? cb(err, addresses) : cb(err, addresses[0].address, addresses[0].family);
|
|
3550
|
-
});
|
|
3551
|
-
};
|
|
3552
|
-
}
|
|
3553
|
-
const emitter = new import_events.EventEmitter();
|
|
3554
|
-
const onFinished = () => {
|
|
3168
|
+
const emitter = new import_events.default();
|
|
3169
|
+
function onFinished() {
|
|
3170
|
+
if (isFinished) return;
|
|
3171
|
+
isFinished = true;
|
|
3555
3172
|
if (config.cancelToken) {
|
|
3556
3173
|
config.cancelToken.unsubscribe(abort);
|
|
3557
3174
|
}
|
|
@@ -3559,14 +3176,22 @@ var http_default = isHttpAdapterSupported && function httpAdapter(config) {
|
|
|
3559
3176
|
config.signal.removeEventListener("abort", abort);
|
|
3560
3177
|
}
|
|
3561
3178
|
emitter.removeAllListeners();
|
|
3562
|
-
}
|
|
3563
|
-
|
|
3179
|
+
}
|
|
3180
|
+
function done(value, isRejected) {
|
|
3181
|
+
if (isDone) return;
|
|
3564
3182
|
isDone = true;
|
|
3565
3183
|
if (isRejected) {
|
|
3566
3184
|
rejected = true;
|
|
3567
3185
|
onFinished();
|
|
3568
3186
|
}
|
|
3569
|
-
|
|
3187
|
+
isRejected ? rejectPromise(value) : resolvePromise(value);
|
|
3188
|
+
}
|
|
3189
|
+
const resolve = function resolve2(value) {
|
|
3190
|
+
done(value);
|
|
3191
|
+
};
|
|
3192
|
+
const reject = function reject2(value) {
|
|
3193
|
+
done(value, true);
|
|
3194
|
+
};
|
|
3570
3195
|
function abort(reason) {
|
|
3571
3196
|
emitter.emit("abort", !reason || reason.type ? new CanceledError_default(null, config, req) : reason);
|
|
3572
3197
|
}
|
|
@@ -3577,8 +3202,8 @@ var http_default = isHttpAdapterSupported && function httpAdapter(config) {
|
|
|
3577
3202
|
config.signal.aborted ? abort() : config.signal.addEventListener("abort", abort);
|
|
3578
3203
|
}
|
|
3579
3204
|
}
|
|
3580
|
-
const fullPath = buildFullPath(config.baseURL, config.url
|
|
3581
|
-
const parsed = new URL(fullPath,
|
|
3205
|
+
const fullPath = buildFullPath(config.baseURL, config.url);
|
|
3206
|
+
const parsed = new URL(fullPath, "http://localhost");
|
|
3582
3207
|
const protocol = parsed.protocol || supportedProtocols[0];
|
|
3583
3208
|
if (protocol === "data:") {
|
|
3584
3209
|
let convertedData;
|
|
@@ -3622,7 +3247,8 @@ var http_default = isHttpAdapterSupported && function httpAdapter(config) {
|
|
|
3622
3247
|
}
|
|
3623
3248
|
const headers = AxiosHeaders_default.from(config.headers).normalize();
|
|
3624
3249
|
headers.set("User-Agent", "axios/" + VERSION, false);
|
|
3625
|
-
const
|
|
3250
|
+
const onDownloadProgress = config.onDownloadProgress;
|
|
3251
|
+
const onUploadProgress = config.onUploadProgress;
|
|
3626
3252
|
const maxRate = config.maxRate;
|
|
3627
3253
|
let maxUploadRate = void 0;
|
|
3628
3254
|
let maxDownloadRate = void 0;
|
|
@@ -3639,11 +3265,11 @@ var http_default = isHttpAdapterSupported && function httpAdapter(config) {
|
|
|
3639
3265
|
if (!headers.hasContentLength()) {
|
|
3640
3266
|
try {
|
|
3641
3267
|
const knownLength = await import_util2.default.promisify(data.getLength).call(data);
|
|
3642
|
-
|
|
3268
|
+
headers.setContentLength(knownLength);
|
|
3643
3269
|
} catch (e) {
|
|
3644
3270
|
}
|
|
3645
3271
|
}
|
|
3646
|
-
} else if (utils_default.isBlob(data)
|
|
3272
|
+
} else if (utils_default.isBlob(data)) {
|
|
3647
3273
|
data.size && headers.setContentType(data.type || "application/octet-stream");
|
|
3648
3274
|
headers.setContentLength(data.size || 0);
|
|
3649
3275
|
data = import_stream4.default.Readable.from(readBlob_default(data));
|
|
@@ -3681,15 +3307,14 @@ var http_default = isHttpAdapterSupported && function httpAdapter(config) {
|
|
|
3681
3307
|
data = import_stream4.default.Readable.from(data, { objectMode: false });
|
|
3682
3308
|
}
|
|
3683
3309
|
data = import_stream4.default.pipeline([data, new AxiosTransformStream_default({
|
|
3310
|
+
length: contentLength,
|
|
3684
3311
|
maxRate: utils_default.toFiniteNumber(maxUploadRate)
|
|
3685
3312
|
})], utils_default.noop);
|
|
3686
|
-
onUploadProgress && data.on("progress",
|
|
3687
|
-
|
|
3688
|
-
|
|
3689
|
-
|
|
3690
|
-
|
|
3691
|
-
)
|
|
3692
|
-
));
|
|
3313
|
+
onUploadProgress && data.on("progress", (progress) => {
|
|
3314
|
+
onUploadProgress(Object.assign(progress, {
|
|
3315
|
+
upload: true
|
|
3316
|
+
}));
|
|
3317
|
+
});
|
|
3693
3318
|
}
|
|
3694
3319
|
let auth = void 0;
|
|
3695
3320
|
if (config.auth) {
|
|
@@ -3703,9 +3328,9 @@ var http_default = isHttpAdapterSupported && function httpAdapter(config) {
|
|
|
3703
3328
|
auth = urlUsername + ":" + urlPassword;
|
|
3704
3329
|
}
|
|
3705
3330
|
auth && headers.delete("authorization");
|
|
3706
|
-
let
|
|
3331
|
+
let path9;
|
|
3707
3332
|
try {
|
|
3708
|
-
|
|
3333
|
+
path9 = buildURL(
|
|
3709
3334
|
parsed.pathname + parsed.search,
|
|
3710
3335
|
config.params,
|
|
3711
3336
|
config.paramsSerializer
|
|
@@ -3723,21 +3348,19 @@ var http_default = isHttpAdapterSupported && function httpAdapter(config) {
|
|
|
3723
3348
|
false
|
|
3724
3349
|
);
|
|
3725
3350
|
const options = {
|
|
3726
|
-
path:
|
|
3351
|
+
path: path9,
|
|
3727
3352
|
method,
|
|
3728
3353
|
headers: headers.toJSON(),
|
|
3729
3354
|
agents: { http: config.httpAgent, https: config.httpsAgent },
|
|
3730
3355
|
auth,
|
|
3731
3356
|
protocol,
|
|
3732
|
-
family,
|
|
3733
3357
|
beforeRedirect: dispatchBeforeRedirect,
|
|
3734
3358
|
beforeRedirects: {}
|
|
3735
3359
|
};
|
|
3736
|
-
!utils_default.isUndefined(lookup) && (options.lookup = lookup);
|
|
3737
3360
|
if (config.socketPath) {
|
|
3738
3361
|
options.socketPath = config.socketPath;
|
|
3739
3362
|
} else {
|
|
3740
|
-
options.hostname = parsed.hostname
|
|
3363
|
+
options.hostname = parsed.hostname;
|
|
3741
3364
|
options.port = parsed.port;
|
|
3742
3365
|
setProxy(options, config.proxy, protocol + "//" + parsed.hostname + (parsed.port ? ":" + parsed.port : "") + options.path);
|
|
3743
3366
|
}
|
|
@@ -3769,17 +3392,16 @@ var http_default = isHttpAdapterSupported && function httpAdapter(config) {
|
|
|
3769
3392
|
if (req.destroyed) return;
|
|
3770
3393
|
const streams = [res];
|
|
3771
3394
|
const responseLength = +res.headers["content-length"];
|
|
3772
|
-
if (onDownloadProgress
|
|
3395
|
+
if (onDownloadProgress) {
|
|
3773
3396
|
const transformStream = new AxiosTransformStream_default({
|
|
3397
|
+
length: utils_default.toFiniteNumber(responseLength),
|
|
3774
3398
|
maxRate: utils_default.toFiniteNumber(maxDownloadRate)
|
|
3775
3399
|
});
|
|
3776
|
-
onDownloadProgress && transformStream.on("progress",
|
|
3777
|
-
|
|
3778
|
-
|
|
3779
|
-
|
|
3780
|
-
|
|
3781
|
-
)
|
|
3782
|
-
));
|
|
3400
|
+
onDownloadProgress && transformStream.on("progress", (progress) => {
|
|
3401
|
+
onDownloadProgress(Object.assign(progress, {
|
|
3402
|
+
download: true
|
|
3403
|
+
}));
|
|
3404
|
+
});
|
|
3783
3405
|
streams.push(transformStream);
|
|
3784
3406
|
}
|
|
3785
3407
|
let responseStream = res;
|
|
@@ -3788,7 +3410,7 @@ var http_default = isHttpAdapterSupported && function httpAdapter(config) {
|
|
|
3788
3410
|
if (method === "HEAD" || res.statusCode === 204) {
|
|
3789
3411
|
delete res.headers["content-encoding"];
|
|
3790
3412
|
}
|
|
3791
|
-
switch (
|
|
3413
|
+
switch (res.headers["content-encoding"]) {
|
|
3792
3414
|
/*eslint default-case:0*/
|
|
3793
3415
|
case "gzip":
|
|
3794
3416
|
case "x-gzip":
|
|
@@ -3846,7 +3468,7 @@ var http_default = isHttpAdapterSupported && function httpAdapter(config) {
|
|
|
3846
3468
|
return;
|
|
3847
3469
|
}
|
|
3848
3470
|
const err = new AxiosError_default(
|
|
3849
|
-
"
|
|
3471
|
+
"maxContentLength size of " + config.maxContentLength + " exceeded",
|
|
3850
3472
|
AxiosError_default.ERR_BAD_RESPONSE,
|
|
3851
3473
|
config,
|
|
3852
3474
|
lastRequest
|
|
@@ -3869,7 +3491,7 @@ var http_default = isHttpAdapterSupported && function httpAdapter(config) {
|
|
|
3869
3491
|
}
|
|
3870
3492
|
response.data = responseData;
|
|
3871
3493
|
} catch (err) {
|
|
3872
|
-
|
|
3494
|
+
reject(AxiosError_default.from(err, null, config, response.request, response));
|
|
3873
3495
|
}
|
|
3874
3496
|
settle(resolve, reject, response);
|
|
3875
3497
|
});
|
|
@@ -3893,7 +3515,7 @@ var http_default = isHttpAdapterSupported && function httpAdapter(config) {
|
|
|
3893
3515
|
});
|
|
3894
3516
|
if (config.timeout) {
|
|
3895
3517
|
const timeout = parseInt(config.timeout, 10);
|
|
3896
|
-
if (
|
|
3518
|
+
if (isNaN(timeout)) {
|
|
3897
3519
|
reject(new AxiosError_default(
|
|
3898
3520
|
"error trying to parse `config.timeout` to int",
|
|
3899
3521
|
AxiosError_default.ERR_BAD_OPTION_VALUE,
|
|
@@ -3940,181 +3562,144 @@ var http_default = isHttpAdapterSupported && function httpAdapter(config) {
|
|
|
3940
3562
|
});
|
|
3941
3563
|
};
|
|
3942
3564
|
|
|
3943
|
-
// node_modules/axios/lib/helpers/
|
|
3944
|
-
var
|
|
3945
|
-
url2 = new URL(url2, platform_default.origin);
|
|
3946
|
-
return origin2.protocol === url2.protocol && origin2.host === url2.host && (isMSIE || origin2.port === url2.port);
|
|
3947
|
-
})(
|
|
3948
|
-
new URL(platform_default.origin),
|
|
3949
|
-
platform_default.navigator && /(msie|trident)/i.test(platform_default.navigator.userAgent)
|
|
3950
|
-
) : () => true;
|
|
3951
|
-
|
|
3952
|
-
// node_modules/axios/lib/helpers/cookies.js
|
|
3953
|
-
var cookies_default = platform_default.hasStandardBrowserEnv ? (
|
|
3565
|
+
// node_modules/.pnpm/axios@1.3.2/node_modules/axios/lib/helpers/cookies.js
|
|
3566
|
+
var cookies_default = node_default.isStandardBrowserEnv ? (
|
|
3954
3567
|
// Standard browser envs support document.cookie
|
|
3955
|
-
{
|
|
3956
|
-
|
|
3957
|
-
|
|
3958
|
-
|
|
3959
|
-
|
|
3960
|
-
|
|
3961
|
-
|
|
3962
|
-
|
|
3963
|
-
|
|
3964
|
-
|
|
3965
|
-
|
|
3966
|
-
|
|
3967
|
-
|
|
3968
|
-
|
|
3969
|
-
|
|
3970
|
-
|
|
3971
|
-
|
|
3568
|
+
/* @__PURE__ */ function standardBrowserEnv() {
|
|
3569
|
+
return {
|
|
3570
|
+
write: function write(name, value, expires, path9, domain, secure) {
|
|
3571
|
+
const cookie = [];
|
|
3572
|
+
cookie.push(name + "=" + encodeURIComponent(value));
|
|
3573
|
+
if (utils_default.isNumber(expires)) {
|
|
3574
|
+
cookie.push("expires=" + new Date(expires).toGMTString());
|
|
3575
|
+
}
|
|
3576
|
+
if (utils_default.isString(path9)) {
|
|
3577
|
+
cookie.push("path=" + path9);
|
|
3578
|
+
}
|
|
3579
|
+
if (utils_default.isString(domain)) {
|
|
3580
|
+
cookie.push("domain=" + domain);
|
|
3581
|
+
}
|
|
3582
|
+
if (secure === true) {
|
|
3583
|
+
cookie.push("secure");
|
|
3584
|
+
}
|
|
3585
|
+
document.cookie = cookie.join("; ");
|
|
3586
|
+
},
|
|
3587
|
+
read: function read(name) {
|
|
3588
|
+
const match = document.cookie.match(new RegExp("(^|;\\s*)(" + name + ")=([^;]*)"));
|
|
3589
|
+
return match ? decodeURIComponent(match[3]) : null;
|
|
3590
|
+
},
|
|
3591
|
+
remove: function remove(name) {
|
|
3592
|
+
this.write(name, "", Date.now() - 864e5);
|
|
3593
|
+
}
|
|
3594
|
+
};
|
|
3595
|
+
}()
|
|
3972
3596
|
) : (
|
|
3973
|
-
// Non
|
|
3974
|
-
{
|
|
3975
|
-
|
|
3976
|
-
|
|
3977
|
-
|
|
3978
|
-
|
|
3979
|
-
|
|
3980
|
-
|
|
3981
|
-
|
|
3982
|
-
|
|
3597
|
+
// Non standard browser env (web workers, react-native) lack needed support.
|
|
3598
|
+
/* @__PURE__ */ function nonStandardBrowserEnv() {
|
|
3599
|
+
return {
|
|
3600
|
+
write: function write() {
|
|
3601
|
+
},
|
|
3602
|
+
read: function read() {
|
|
3603
|
+
return null;
|
|
3604
|
+
},
|
|
3605
|
+
remove: function remove() {
|
|
3606
|
+
}
|
|
3607
|
+
};
|
|
3608
|
+
}()
|
|
3983
3609
|
);
|
|
3984
3610
|
|
|
3985
|
-
// node_modules/axios/lib/
|
|
3986
|
-
var
|
|
3987
|
-
|
|
3988
|
-
|
|
3989
|
-
|
|
3990
|
-
|
|
3991
|
-
|
|
3992
|
-
|
|
3993
|
-
|
|
3994
|
-
|
|
3995
|
-
|
|
3996
|
-
|
|
3997
|
-
|
|
3998
|
-
|
|
3999
|
-
|
|
4000
|
-
|
|
4001
|
-
|
|
4002
|
-
|
|
4003
|
-
|
|
4004
|
-
|
|
4005
|
-
|
|
4006
|
-
|
|
4007
|
-
|
|
4008
|
-
|
|
4009
|
-
|
|
4010
|
-
}
|
|
4011
|
-
}
|
|
4012
|
-
function defaultToConfig2(a, b) {
|
|
4013
|
-
if (!utils_default.isUndefined(b)) {
|
|
4014
|
-
return getMergedValue(void 0, b);
|
|
4015
|
-
} else if (!utils_default.isUndefined(a)) {
|
|
4016
|
-
return getMergedValue(void 0, a);
|
|
4017
|
-
}
|
|
4018
|
-
}
|
|
4019
|
-
function mergeDirectKeys(a, b, prop) {
|
|
4020
|
-
if (prop in config2) {
|
|
4021
|
-
return getMergedValue(a, b);
|
|
4022
|
-
} else if (prop in config1) {
|
|
4023
|
-
return getMergedValue(void 0, a);
|
|
3611
|
+
// node_modules/.pnpm/axios@1.3.2/node_modules/axios/lib/helpers/isURLSameOrigin.js
|
|
3612
|
+
var isURLSameOrigin_default = node_default.isStandardBrowserEnv ? (
|
|
3613
|
+
// Standard browser envs have full support of the APIs needed to test
|
|
3614
|
+
// whether the request URL is of the same origin as current location.
|
|
3615
|
+
function standardBrowserEnv2() {
|
|
3616
|
+
const msie = /(msie|trident)/i.test(navigator.userAgent);
|
|
3617
|
+
const urlParsingNode = document.createElement("a");
|
|
3618
|
+
let originURL;
|
|
3619
|
+
function resolveURL(url2) {
|
|
3620
|
+
let href = url2;
|
|
3621
|
+
if (msie) {
|
|
3622
|
+
urlParsingNode.setAttribute("href", href);
|
|
3623
|
+
href = urlParsingNode.href;
|
|
3624
|
+
}
|
|
3625
|
+
urlParsingNode.setAttribute("href", href);
|
|
3626
|
+
return {
|
|
3627
|
+
href: urlParsingNode.href,
|
|
3628
|
+
protocol: urlParsingNode.protocol ? urlParsingNode.protocol.replace(/:$/, "") : "",
|
|
3629
|
+
host: urlParsingNode.host,
|
|
3630
|
+
search: urlParsingNode.search ? urlParsingNode.search.replace(/^\?/, "") : "",
|
|
3631
|
+
hash: urlParsingNode.hash ? urlParsingNode.hash.replace(/^#/, "") : "",
|
|
3632
|
+
hostname: urlParsingNode.hostname,
|
|
3633
|
+
port: urlParsingNode.port,
|
|
3634
|
+
pathname: urlParsingNode.pathname.charAt(0) === "/" ? urlParsingNode.pathname : "/" + urlParsingNode.pathname
|
|
3635
|
+
};
|
|
4024
3636
|
}
|
|
4025
|
-
|
|
4026
|
-
|
|
4027
|
-
|
|
4028
|
-
|
|
4029
|
-
|
|
4030
|
-
|
|
4031
|
-
|
|
4032
|
-
|
|
4033
|
-
|
|
4034
|
-
|
|
4035
|
-
|
|
4036
|
-
|
|
4037
|
-
|
|
4038
|
-
|
|
4039
|
-
|
|
4040
|
-
|
|
4041
|
-
|
|
4042
|
-
|
|
4043
|
-
|
|
4044
|
-
|
|
4045
|
-
|
|
4046
|
-
|
|
4047
|
-
|
|
4048
|
-
|
|
4049
|
-
|
|
4050
|
-
|
|
4051
|
-
|
|
4052
|
-
|
|
4053
|
-
|
|
4054
|
-
|
|
4055
|
-
|
|
3637
|
+
originURL = resolveURL(window.location.href);
|
|
3638
|
+
return function isURLSameOrigin(requestURL) {
|
|
3639
|
+
const parsed = utils_default.isString(requestURL) ? resolveURL(requestURL) : requestURL;
|
|
3640
|
+
return parsed.protocol === originURL.protocol && parsed.host === originURL.host;
|
|
3641
|
+
};
|
|
3642
|
+
}()
|
|
3643
|
+
) : (
|
|
3644
|
+
// Non standard browser envs (web workers, react-native) lack needed support.
|
|
3645
|
+
/* @__PURE__ */ function nonStandardBrowserEnv2() {
|
|
3646
|
+
return function isURLSameOrigin() {
|
|
3647
|
+
return true;
|
|
3648
|
+
};
|
|
3649
|
+
}()
|
|
3650
|
+
);
|
|
3651
|
+
|
|
3652
|
+
// node_modules/.pnpm/axios@1.3.2/node_modules/axios/lib/adapters/xhr.js
|
|
3653
|
+
function progressEventReducer(listener, isDownloadStream) {
|
|
3654
|
+
let bytesNotified = 0;
|
|
3655
|
+
const _speedometer = speedometer_default(50, 250);
|
|
3656
|
+
return (e) => {
|
|
3657
|
+
const loaded = e.loaded;
|
|
3658
|
+
const total = e.lengthComputable ? e.total : void 0;
|
|
3659
|
+
const progressBytes = loaded - bytesNotified;
|
|
3660
|
+
const rate = _speedometer(progressBytes);
|
|
3661
|
+
const inRange = loaded <= total;
|
|
3662
|
+
bytesNotified = loaded;
|
|
3663
|
+
const data = {
|
|
3664
|
+
loaded,
|
|
3665
|
+
total,
|
|
3666
|
+
progress: total ? loaded / total : void 0,
|
|
3667
|
+
bytes: progressBytes,
|
|
3668
|
+
rate: rate ? rate : void 0,
|
|
3669
|
+
estimated: rate && total && inRange ? (total - loaded) / rate : void 0,
|
|
3670
|
+
event: e
|
|
3671
|
+
};
|
|
3672
|
+
data[isDownloadStream ? "download" : "upload"] = true;
|
|
3673
|
+
listener(data);
|
|
4056
3674
|
};
|
|
4057
|
-
utils_default.forEach(Object.keys(Object.assign({}, config1, config2)), function computeConfigValue(prop) {
|
|
4058
|
-
const merge2 = mergeMap[prop] || mergeDeepProperties;
|
|
4059
|
-
const configValue = merge2(config1[prop], config2[prop], prop);
|
|
4060
|
-
utils_default.isUndefined(configValue) && merge2 !== mergeDirectKeys || (config[prop] = configValue);
|
|
4061
|
-
});
|
|
4062
|
-
return config;
|
|
4063
3675
|
}
|
|
4064
|
-
|
|
4065
|
-
// node_modules/axios/lib/helpers/resolveConfig.js
|
|
4066
|
-
var resolveConfig_default = (config) => {
|
|
4067
|
-
const newConfig = mergeConfig({}, config);
|
|
4068
|
-
let { data, withXSRFToken, xsrfHeaderName, xsrfCookieName, headers, auth } = newConfig;
|
|
4069
|
-
newConfig.headers = headers = AxiosHeaders_default.from(headers);
|
|
4070
|
-
newConfig.url = buildURL(buildFullPath(newConfig.baseURL, newConfig.url, newConfig.allowAbsoluteUrls), config.params, config.paramsSerializer);
|
|
4071
|
-
if (auth) {
|
|
4072
|
-
headers.set(
|
|
4073
|
-
"Authorization",
|
|
4074
|
-
"Basic " + btoa((auth.username || "") + ":" + (auth.password ? unescape(encodeURIComponent(auth.password)) : ""))
|
|
4075
|
-
);
|
|
4076
|
-
}
|
|
4077
|
-
let contentType;
|
|
4078
|
-
if (utils_default.isFormData(data)) {
|
|
4079
|
-
if (platform_default.hasStandardBrowserEnv || platform_default.hasStandardBrowserWebWorkerEnv) {
|
|
4080
|
-
headers.setContentType(void 0);
|
|
4081
|
-
} else if ((contentType = headers.getContentType()) !== false) {
|
|
4082
|
-
const [type, ...tokens] = contentType ? contentType.split(";").map((token) => token.trim()).filter(Boolean) : [];
|
|
4083
|
-
headers.setContentType([type || "multipart/form-data", ...tokens].join("; "));
|
|
4084
|
-
}
|
|
4085
|
-
}
|
|
4086
|
-
if (platform_default.hasStandardBrowserEnv) {
|
|
4087
|
-
withXSRFToken && utils_default.isFunction(withXSRFToken) && (withXSRFToken = withXSRFToken(newConfig));
|
|
4088
|
-
if (withXSRFToken || withXSRFToken !== false && isURLSameOrigin_default(newConfig.url)) {
|
|
4089
|
-
const xsrfValue = xsrfHeaderName && xsrfCookieName && cookies_default.read(xsrfCookieName);
|
|
4090
|
-
if (xsrfValue) {
|
|
4091
|
-
headers.set(xsrfHeaderName, xsrfValue);
|
|
4092
|
-
}
|
|
4093
|
-
}
|
|
4094
|
-
}
|
|
4095
|
-
return newConfig;
|
|
4096
|
-
};
|
|
4097
|
-
|
|
4098
|
-
// node_modules/axios/lib/adapters/xhr.js
|
|
4099
3676
|
var isXHRAdapterSupported = typeof XMLHttpRequest !== "undefined";
|
|
4100
3677
|
var xhr_default = isXHRAdapterSupported && function(config) {
|
|
4101
3678
|
return new Promise(function dispatchXhrRequest(resolve, reject) {
|
|
4102
|
-
|
|
4103
|
-
|
|
4104
|
-
const
|
|
4105
|
-
let { responseType, onUploadProgress, onDownloadProgress } = _config;
|
|
3679
|
+
let requestData = config.data;
|
|
3680
|
+
const requestHeaders = AxiosHeaders_default.from(config.headers).normalize();
|
|
3681
|
+
const responseType = config.responseType;
|
|
4106
3682
|
let onCanceled;
|
|
4107
|
-
let uploadThrottled, downloadThrottled;
|
|
4108
|
-
let flushUpload, flushDownload;
|
|
4109
3683
|
function done() {
|
|
4110
|
-
|
|
4111
|
-
|
|
4112
|
-
|
|
4113
|
-
|
|
3684
|
+
if (config.cancelToken) {
|
|
3685
|
+
config.cancelToken.unsubscribe(onCanceled);
|
|
3686
|
+
}
|
|
3687
|
+
if (config.signal) {
|
|
3688
|
+
config.signal.removeEventListener("abort", onCanceled);
|
|
3689
|
+
}
|
|
3690
|
+
}
|
|
3691
|
+
if (utils_default.isFormData(requestData) && (node_default.isStandardBrowserEnv || node_default.isStandardBrowserWebWorkerEnv)) {
|
|
3692
|
+
requestHeaders.setContentType(false);
|
|
4114
3693
|
}
|
|
4115
3694
|
let request = new XMLHttpRequest();
|
|
4116
|
-
|
|
4117
|
-
|
|
3695
|
+
if (config.auth) {
|
|
3696
|
+
const username = config.auth.username || "";
|
|
3697
|
+
const password = config.auth.password ? unescape(encodeURIComponent(config.auth.password)) : "";
|
|
3698
|
+
requestHeaders.set("Authorization", "Basic " + btoa(username + ":" + password));
|
|
3699
|
+
}
|
|
3700
|
+
const fullPath = buildFullPath(config.baseURL, config.url);
|
|
3701
|
+
request.open(config.method.toUpperCase(), buildURL(fullPath, config.params, config.paramsSerializer), true);
|
|
3702
|
+
request.timeout = config.timeout;
|
|
4118
3703
|
function onloadend() {
|
|
4119
3704
|
if (!request) {
|
|
4120
3705
|
return;
|
|
@@ -4165,10 +3750,10 @@ var xhr_default = isXHRAdapterSupported && function(config) {
|
|
|
4165
3750
|
request = null;
|
|
4166
3751
|
};
|
|
4167
3752
|
request.ontimeout = function handleTimeout() {
|
|
4168
|
-
let timeoutErrorMessage =
|
|
4169
|
-
const transitional2 =
|
|
4170
|
-
if (
|
|
4171
|
-
timeoutErrorMessage =
|
|
3753
|
+
let timeoutErrorMessage = config.timeout ? "timeout of " + config.timeout + "ms exceeded" : "timeout exceeded";
|
|
3754
|
+
const transitional2 = config.transitional || transitional_default;
|
|
3755
|
+
if (config.timeoutErrorMessage) {
|
|
3756
|
+
timeoutErrorMessage = config.timeoutErrorMessage;
|
|
4172
3757
|
}
|
|
4173
3758
|
reject(new AxiosError_default(
|
|
4174
3759
|
timeoutErrorMessage,
|
|
@@ -4178,332 +3763,57 @@ var xhr_default = isXHRAdapterSupported && function(config) {
|
|
|
4178
3763
|
));
|
|
4179
3764
|
request = null;
|
|
4180
3765
|
};
|
|
3766
|
+
if (node_default.isStandardBrowserEnv) {
|
|
3767
|
+
const xsrfValue = (config.withCredentials || isURLSameOrigin_default(fullPath)) && config.xsrfCookieName && cookies_default.read(config.xsrfCookieName);
|
|
3768
|
+
if (xsrfValue) {
|
|
3769
|
+
requestHeaders.set(config.xsrfHeaderName, xsrfValue);
|
|
3770
|
+
}
|
|
3771
|
+
}
|
|
4181
3772
|
requestData === void 0 && requestHeaders.setContentType(null);
|
|
4182
3773
|
if ("setRequestHeader" in request) {
|
|
4183
3774
|
utils_default.forEach(requestHeaders.toJSON(), function setRequestHeader(val, key) {
|
|
4184
3775
|
request.setRequestHeader(key, val);
|
|
4185
3776
|
});
|
|
4186
3777
|
}
|
|
4187
|
-
if (!utils_default.isUndefined(
|
|
4188
|
-
request.withCredentials = !!
|
|
3778
|
+
if (!utils_default.isUndefined(config.withCredentials)) {
|
|
3779
|
+
request.withCredentials = !!config.withCredentials;
|
|
4189
3780
|
}
|
|
4190
3781
|
if (responseType && responseType !== "json") {
|
|
4191
|
-
request.responseType =
|
|
4192
|
-
}
|
|
4193
|
-
if (onDownloadProgress) {
|
|
4194
|
-
[downloadThrottled, flushDownload] = progressEventReducer(onDownloadProgress, true);
|
|
4195
|
-
request.addEventListener("progress", downloadThrottled);
|
|
3782
|
+
request.responseType = config.responseType;
|
|
4196
3783
|
}
|
|
4197
|
-
if (
|
|
4198
|
-
|
|
4199
|
-
request.upload.addEventListener("progress", uploadThrottled);
|
|
4200
|
-
request.upload.addEventListener("loadend", flushUpload);
|
|
3784
|
+
if (typeof config.onDownloadProgress === "function") {
|
|
3785
|
+
request.addEventListener("progress", progressEventReducer(config.onDownloadProgress, true));
|
|
4201
3786
|
}
|
|
4202
|
-
if (
|
|
4203
|
-
|
|
4204
|
-
if (!request) {
|
|
4205
|
-
return;
|
|
4206
|
-
}
|
|
4207
|
-
reject(!cancel || cancel.type ? new CanceledError_default(null, config, request) : cancel);
|
|
4208
|
-
request.abort();
|
|
4209
|
-
request = null;
|
|
4210
|
-
};
|
|
4211
|
-
_config.cancelToken && _config.cancelToken.subscribe(onCanceled);
|
|
4212
|
-
if (_config.signal) {
|
|
4213
|
-
_config.signal.aborted ? onCanceled() : _config.signal.addEventListener("abort", onCanceled);
|
|
4214
|
-
}
|
|
4215
|
-
}
|
|
4216
|
-
const protocol = parseProtocol(_config.url);
|
|
4217
|
-
if (protocol && platform_default.protocols.indexOf(protocol) === -1) {
|
|
4218
|
-
reject(new AxiosError_default("Unsupported protocol " + protocol + ":", AxiosError_default.ERR_BAD_REQUEST, config));
|
|
4219
|
-
return;
|
|
4220
|
-
}
|
|
4221
|
-
request.send(requestData || null);
|
|
4222
|
-
});
|
|
4223
|
-
};
|
|
4224
|
-
|
|
4225
|
-
// node_modules/axios/lib/helpers/composeSignals.js
|
|
4226
|
-
var composeSignals = (signals, timeout) => {
|
|
4227
|
-
const { length } = signals = signals ? signals.filter(Boolean) : [];
|
|
4228
|
-
if (timeout || length) {
|
|
4229
|
-
let controller = new AbortController();
|
|
4230
|
-
let aborted;
|
|
4231
|
-
const onabort = function(reason) {
|
|
4232
|
-
if (!aborted) {
|
|
4233
|
-
aborted = true;
|
|
4234
|
-
unsubscribe();
|
|
4235
|
-
const err = reason instanceof Error ? reason : this.reason;
|
|
4236
|
-
controller.abort(err instanceof AxiosError_default ? err : new CanceledError_default(err instanceof Error ? err.message : err));
|
|
4237
|
-
}
|
|
4238
|
-
};
|
|
4239
|
-
let timer = timeout && setTimeout(() => {
|
|
4240
|
-
timer = null;
|
|
4241
|
-
onabort(new AxiosError_default(`timeout ${timeout} of ms exceeded`, AxiosError_default.ETIMEDOUT));
|
|
4242
|
-
}, timeout);
|
|
4243
|
-
const unsubscribe = () => {
|
|
4244
|
-
if (signals) {
|
|
4245
|
-
timer && clearTimeout(timer);
|
|
4246
|
-
timer = null;
|
|
4247
|
-
signals.forEach((signal2) => {
|
|
4248
|
-
signal2.unsubscribe ? signal2.unsubscribe(onabort) : signal2.removeEventListener("abort", onabort);
|
|
4249
|
-
});
|
|
4250
|
-
signals = null;
|
|
4251
|
-
}
|
|
4252
|
-
};
|
|
4253
|
-
signals.forEach((signal2) => signal2.addEventListener("abort", onabort));
|
|
4254
|
-
const { signal } = controller;
|
|
4255
|
-
signal.unsubscribe = () => utils_default.asap(unsubscribe);
|
|
4256
|
-
return signal;
|
|
4257
|
-
}
|
|
4258
|
-
};
|
|
4259
|
-
var composeSignals_default = composeSignals;
|
|
4260
|
-
|
|
4261
|
-
// node_modules/axios/lib/helpers/trackStream.js
|
|
4262
|
-
var streamChunk = function* (chunk, chunkSize) {
|
|
4263
|
-
let len = chunk.byteLength;
|
|
4264
|
-
if (!chunkSize || len < chunkSize) {
|
|
4265
|
-
yield chunk;
|
|
4266
|
-
return;
|
|
4267
|
-
}
|
|
4268
|
-
let pos = 0;
|
|
4269
|
-
let end;
|
|
4270
|
-
while (pos < len) {
|
|
4271
|
-
end = pos + chunkSize;
|
|
4272
|
-
yield chunk.slice(pos, end);
|
|
4273
|
-
pos = end;
|
|
4274
|
-
}
|
|
4275
|
-
};
|
|
4276
|
-
var readBytes = async function* (iterable, chunkSize) {
|
|
4277
|
-
for await (const chunk of readStream(iterable)) {
|
|
4278
|
-
yield* streamChunk(chunk, chunkSize);
|
|
4279
|
-
}
|
|
4280
|
-
};
|
|
4281
|
-
var readStream = async function* (stream4) {
|
|
4282
|
-
if (stream4[Symbol.asyncIterator]) {
|
|
4283
|
-
yield* stream4;
|
|
4284
|
-
return;
|
|
4285
|
-
}
|
|
4286
|
-
const reader = stream4.getReader();
|
|
4287
|
-
try {
|
|
4288
|
-
for (; ; ) {
|
|
4289
|
-
const { done, value } = await reader.read();
|
|
4290
|
-
if (done) {
|
|
4291
|
-
break;
|
|
4292
|
-
}
|
|
4293
|
-
yield value;
|
|
4294
|
-
}
|
|
4295
|
-
} finally {
|
|
4296
|
-
await reader.cancel();
|
|
4297
|
-
}
|
|
4298
|
-
};
|
|
4299
|
-
var trackStream = (stream4, chunkSize, onProgress, onFinish) => {
|
|
4300
|
-
const iterator2 = readBytes(stream4, chunkSize);
|
|
4301
|
-
let bytes = 0;
|
|
4302
|
-
let done;
|
|
4303
|
-
let _onFinish = (e) => {
|
|
4304
|
-
if (!done) {
|
|
4305
|
-
done = true;
|
|
4306
|
-
onFinish && onFinish(e);
|
|
4307
|
-
}
|
|
4308
|
-
};
|
|
4309
|
-
return new ReadableStream({
|
|
4310
|
-
async pull(controller) {
|
|
4311
|
-
try {
|
|
4312
|
-
const { done: done2, value } = await iterator2.next();
|
|
4313
|
-
if (done2) {
|
|
4314
|
-
_onFinish();
|
|
4315
|
-
controller.close();
|
|
4316
|
-
return;
|
|
4317
|
-
}
|
|
4318
|
-
let len = value.byteLength;
|
|
4319
|
-
if (onProgress) {
|
|
4320
|
-
let loadedBytes = bytes += len;
|
|
4321
|
-
onProgress(loadedBytes);
|
|
4322
|
-
}
|
|
4323
|
-
controller.enqueue(new Uint8Array(value));
|
|
4324
|
-
} catch (err) {
|
|
4325
|
-
_onFinish(err);
|
|
4326
|
-
throw err;
|
|
4327
|
-
}
|
|
4328
|
-
},
|
|
4329
|
-
cancel(reason) {
|
|
4330
|
-
_onFinish(reason);
|
|
4331
|
-
return iterator2.return();
|
|
4332
|
-
}
|
|
4333
|
-
}, {
|
|
4334
|
-
highWaterMark: 2
|
|
4335
|
-
});
|
|
4336
|
-
};
|
|
4337
|
-
|
|
4338
|
-
// node_modules/axios/lib/adapters/fetch.js
|
|
4339
|
-
var isFetchSupported = typeof fetch === "function" && typeof Request === "function" && typeof Response === "function";
|
|
4340
|
-
var isReadableStreamSupported = isFetchSupported && typeof ReadableStream === "function";
|
|
4341
|
-
var encodeText = isFetchSupported && (typeof TextEncoder === "function" ? /* @__PURE__ */ ((encoder) => (str) => encoder.encode(str))(new TextEncoder()) : async (str) => new Uint8Array(await new Response(str).arrayBuffer()));
|
|
4342
|
-
var test = (fn, ...args) => {
|
|
4343
|
-
try {
|
|
4344
|
-
return !!fn(...args);
|
|
4345
|
-
} catch (e) {
|
|
4346
|
-
return false;
|
|
4347
|
-
}
|
|
4348
|
-
};
|
|
4349
|
-
var supportsRequestStream = isReadableStreamSupported && test(() => {
|
|
4350
|
-
let duplexAccessed = false;
|
|
4351
|
-
const hasContentType = new Request(platform_default.origin, {
|
|
4352
|
-
body: new ReadableStream(),
|
|
4353
|
-
method: "POST",
|
|
4354
|
-
get duplex() {
|
|
4355
|
-
duplexAccessed = true;
|
|
4356
|
-
return "half";
|
|
4357
|
-
}
|
|
4358
|
-
}).headers.has("Content-Type");
|
|
4359
|
-
return duplexAccessed && !hasContentType;
|
|
4360
|
-
});
|
|
4361
|
-
var DEFAULT_CHUNK_SIZE = 64 * 1024;
|
|
4362
|
-
var supportsResponseStream = isReadableStreamSupported && test(() => utils_default.isReadableStream(new Response("").body));
|
|
4363
|
-
var resolvers = {
|
|
4364
|
-
stream: supportsResponseStream && ((res) => res.body)
|
|
4365
|
-
};
|
|
4366
|
-
isFetchSupported && ((res) => {
|
|
4367
|
-
["text", "arrayBuffer", "blob", "formData", "stream"].forEach((type) => {
|
|
4368
|
-
!resolvers[type] && (resolvers[type] = utils_default.isFunction(res[type]) ? (res2) => res2[type]() : (_, config) => {
|
|
4369
|
-
throw new AxiosError_default(`Response type '${type}' is not supported`, AxiosError_default.ERR_NOT_SUPPORT, config);
|
|
4370
|
-
});
|
|
4371
|
-
});
|
|
4372
|
-
})(new Response());
|
|
4373
|
-
var getBodyLength = async (body) => {
|
|
4374
|
-
if (body == null) {
|
|
4375
|
-
return 0;
|
|
4376
|
-
}
|
|
4377
|
-
if (utils_default.isBlob(body)) {
|
|
4378
|
-
return body.size;
|
|
4379
|
-
}
|
|
4380
|
-
if (utils_default.isSpecCompliantForm(body)) {
|
|
4381
|
-
const _request = new Request(platform_default.origin, {
|
|
4382
|
-
method: "POST",
|
|
4383
|
-
body
|
|
4384
|
-
});
|
|
4385
|
-
return (await _request.arrayBuffer()).byteLength;
|
|
4386
|
-
}
|
|
4387
|
-
if (utils_default.isArrayBufferView(body) || utils_default.isArrayBuffer(body)) {
|
|
4388
|
-
return body.byteLength;
|
|
4389
|
-
}
|
|
4390
|
-
if (utils_default.isURLSearchParams(body)) {
|
|
4391
|
-
body = body + "";
|
|
4392
|
-
}
|
|
4393
|
-
if (utils_default.isString(body)) {
|
|
4394
|
-
return (await encodeText(body)).byteLength;
|
|
4395
|
-
}
|
|
4396
|
-
};
|
|
4397
|
-
var resolveBodyLength = async (headers, body) => {
|
|
4398
|
-
const length = utils_default.toFiniteNumber(headers.getContentLength());
|
|
4399
|
-
return length == null ? getBodyLength(body) : length;
|
|
4400
|
-
};
|
|
4401
|
-
var fetch_default = isFetchSupported && (async (config) => {
|
|
4402
|
-
let {
|
|
4403
|
-
url: url2,
|
|
4404
|
-
method,
|
|
4405
|
-
data,
|
|
4406
|
-
signal,
|
|
4407
|
-
cancelToken,
|
|
4408
|
-
timeout,
|
|
4409
|
-
onDownloadProgress,
|
|
4410
|
-
onUploadProgress,
|
|
4411
|
-
responseType,
|
|
4412
|
-
headers,
|
|
4413
|
-
withCredentials = "same-origin",
|
|
4414
|
-
fetchOptions
|
|
4415
|
-
} = resolveConfig_default(config);
|
|
4416
|
-
responseType = responseType ? (responseType + "").toLowerCase() : "text";
|
|
4417
|
-
let composedSignal = composeSignals_default([signal, cancelToken && cancelToken.toAbortSignal()], timeout);
|
|
4418
|
-
let request;
|
|
4419
|
-
const unsubscribe = composedSignal && composedSignal.unsubscribe && (() => {
|
|
4420
|
-
composedSignal.unsubscribe();
|
|
4421
|
-
});
|
|
4422
|
-
let requestContentLength;
|
|
4423
|
-
try {
|
|
4424
|
-
if (onUploadProgress && supportsRequestStream && method !== "get" && method !== "head" && (requestContentLength = await resolveBodyLength(headers, data)) !== 0) {
|
|
4425
|
-
let _request = new Request(url2, {
|
|
4426
|
-
method: "POST",
|
|
4427
|
-
body: data,
|
|
4428
|
-
duplex: "half"
|
|
4429
|
-
});
|
|
4430
|
-
let contentTypeHeader;
|
|
4431
|
-
if (utils_default.isFormData(data) && (contentTypeHeader = _request.headers.get("content-type"))) {
|
|
4432
|
-
headers.setContentType(contentTypeHeader);
|
|
4433
|
-
}
|
|
4434
|
-
if (_request.body) {
|
|
4435
|
-
const [onProgress, flush] = progressEventDecorator(
|
|
4436
|
-
requestContentLength,
|
|
4437
|
-
progressEventReducer(asyncDecorator(onUploadProgress))
|
|
4438
|
-
);
|
|
4439
|
-
data = trackStream(_request.body, DEFAULT_CHUNK_SIZE, onProgress, flush);
|
|
4440
|
-
}
|
|
4441
|
-
}
|
|
4442
|
-
if (!utils_default.isString(withCredentials)) {
|
|
4443
|
-
withCredentials = withCredentials ? "include" : "omit";
|
|
4444
|
-
}
|
|
4445
|
-
const isCredentialsSupported = "credentials" in Request.prototype;
|
|
4446
|
-
request = new Request(url2, {
|
|
4447
|
-
...fetchOptions,
|
|
4448
|
-
signal: composedSignal,
|
|
4449
|
-
method: method.toUpperCase(),
|
|
4450
|
-
headers: headers.normalize().toJSON(),
|
|
4451
|
-
body: data,
|
|
4452
|
-
duplex: "half",
|
|
4453
|
-
credentials: isCredentialsSupported ? withCredentials : void 0
|
|
4454
|
-
});
|
|
4455
|
-
let response = await fetch(request);
|
|
4456
|
-
const isStreamResponse = supportsResponseStream && (responseType === "stream" || responseType === "response");
|
|
4457
|
-
if (supportsResponseStream && (onDownloadProgress || isStreamResponse && unsubscribe)) {
|
|
4458
|
-
const options = {};
|
|
4459
|
-
["status", "statusText", "headers"].forEach((prop) => {
|
|
4460
|
-
options[prop] = response[prop];
|
|
4461
|
-
});
|
|
4462
|
-
const responseContentLength = utils_default.toFiniteNumber(response.headers.get("content-length"));
|
|
4463
|
-
const [onProgress, flush] = onDownloadProgress && progressEventDecorator(
|
|
4464
|
-
responseContentLength,
|
|
4465
|
-
progressEventReducer(asyncDecorator(onDownloadProgress), true)
|
|
4466
|
-
) || [];
|
|
4467
|
-
response = new Response(
|
|
4468
|
-
trackStream(response.body, DEFAULT_CHUNK_SIZE, onProgress, () => {
|
|
4469
|
-
flush && flush();
|
|
4470
|
-
unsubscribe && unsubscribe();
|
|
4471
|
-
}),
|
|
4472
|
-
options
|
|
4473
|
-
);
|
|
3787
|
+
if (typeof config.onUploadProgress === "function" && request.upload) {
|
|
3788
|
+
request.upload.addEventListener("progress", progressEventReducer(config.onUploadProgress));
|
|
4474
3789
|
}
|
|
4475
|
-
|
|
4476
|
-
|
|
4477
|
-
|
|
4478
|
-
|
|
4479
|
-
settle(resolve, reject, {
|
|
4480
|
-
data: responseData,
|
|
4481
|
-
headers: AxiosHeaders_default.from(response.headers),
|
|
4482
|
-
status: response.status,
|
|
4483
|
-
statusText: response.statusText,
|
|
4484
|
-
config,
|
|
4485
|
-
request
|
|
4486
|
-
});
|
|
4487
|
-
});
|
|
4488
|
-
} catch (err) {
|
|
4489
|
-
unsubscribe && unsubscribe();
|
|
4490
|
-
if (err && err.name === "TypeError" && /Load failed|fetch/i.test(err.message)) {
|
|
4491
|
-
throw Object.assign(
|
|
4492
|
-
new AxiosError_default("Network Error", AxiosError_default.ERR_NETWORK, config, request),
|
|
4493
|
-
{
|
|
4494
|
-
cause: err.cause || err
|
|
3790
|
+
if (config.cancelToken || config.signal) {
|
|
3791
|
+
onCanceled = (cancel) => {
|
|
3792
|
+
if (!request) {
|
|
3793
|
+
return;
|
|
4495
3794
|
}
|
|
4496
|
-
|
|
3795
|
+
reject(!cancel || cancel.type ? new CanceledError_default(null, config, request) : cancel);
|
|
3796
|
+
request.abort();
|
|
3797
|
+
request = null;
|
|
3798
|
+
};
|
|
3799
|
+
config.cancelToken && config.cancelToken.subscribe(onCanceled);
|
|
3800
|
+
if (config.signal) {
|
|
3801
|
+
config.signal.aborted ? onCanceled() : config.signal.addEventListener("abort", onCanceled);
|
|
3802
|
+
}
|
|
4497
3803
|
}
|
|
4498
|
-
|
|
4499
|
-
|
|
4500
|
-
|
|
3804
|
+
const protocol = parseProtocol(fullPath);
|
|
3805
|
+
if (protocol && node_default.protocols.indexOf(protocol) === -1) {
|
|
3806
|
+
reject(new AxiosError_default("Unsupported protocol " + protocol + ":", AxiosError_default.ERR_BAD_REQUEST, config));
|
|
3807
|
+
return;
|
|
3808
|
+
}
|
|
3809
|
+
request.send(requestData || null);
|
|
3810
|
+
});
|
|
3811
|
+
};
|
|
4501
3812
|
|
|
4502
|
-
// node_modules/axios/lib/adapters/adapters.js
|
|
3813
|
+
// node_modules/.pnpm/axios@1.3.2/node_modules/axios/lib/adapters/adapters.js
|
|
4503
3814
|
var knownAdapters = {
|
|
4504
3815
|
http: http_default,
|
|
4505
|
-
xhr: xhr_default
|
|
4506
|
-
fetch: fetch_default
|
|
3816
|
+
xhr: xhr_default
|
|
4507
3817
|
};
|
|
4508
3818
|
utils_default.forEach(knownAdapters, (fn, value) => {
|
|
4509
3819
|
if (fn) {
|
|
@@ -4514,46 +3824,38 @@ utils_default.forEach(knownAdapters, (fn, value) => {
|
|
|
4514
3824
|
Object.defineProperty(fn, "adapterName", { value });
|
|
4515
3825
|
}
|
|
4516
3826
|
});
|
|
4517
|
-
var renderReason = (reason) => `- ${reason}`;
|
|
4518
|
-
var isResolvedHandle = (adapter) => utils_default.isFunction(adapter) || adapter === null || adapter === false;
|
|
4519
3827
|
var adapters_default = {
|
|
4520
3828
|
getAdapter: (adapters) => {
|
|
4521
3829
|
adapters = utils_default.isArray(adapters) ? adapters : [adapters];
|
|
4522
3830
|
const { length } = adapters;
|
|
4523
3831
|
let nameOrAdapter;
|
|
4524
3832
|
let adapter;
|
|
4525
|
-
const rejectedReasons = {};
|
|
4526
3833
|
for (let i = 0; i < length; i++) {
|
|
4527
3834
|
nameOrAdapter = adapters[i];
|
|
4528
|
-
|
|
4529
|
-
adapter = nameOrAdapter;
|
|
4530
|
-
if (!isResolvedHandle(nameOrAdapter)) {
|
|
4531
|
-
adapter = knownAdapters[(id = String(nameOrAdapter)).toLowerCase()];
|
|
4532
|
-
if (adapter === void 0) {
|
|
4533
|
-
throw new AxiosError_default(`Unknown adapter '${id}'`);
|
|
4534
|
-
}
|
|
4535
|
-
}
|
|
4536
|
-
if (adapter) {
|
|
3835
|
+
if (adapter = utils_default.isString(nameOrAdapter) ? knownAdapters[nameOrAdapter.toLowerCase()] : nameOrAdapter) {
|
|
4537
3836
|
break;
|
|
4538
3837
|
}
|
|
4539
|
-
rejectedReasons[id || "#" + i] = adapter;
|
|
4540
3838
|
}
|
|
4541
3839
|
if (!adapter) {
|
|
4542
|
-
|
|
4543
|
-
|
|
4544
|
-
|
|
4545
|
-
|
|
4546
|
-
|
|
4547
|
-
|
|
4548
|
-
|
|
3840
|
+
if (adapter === false) {
|
|
3841
|
+
throw new AxiosError_default(
|
|
3842
|
+
`Adapter ${nameOrAdapter} is not supported by the environment`,
|
|
3843
|
+
"ERR_NOT_SUPPORT"
|
|
3844
|
+
);
|
|
3845
|
+
}
|
|
3846
|
+
throw new Error(
|
|
3847
|
+
utils_default.hasOwnProp(knownAdapters, nameOrAdapter) ? `Adapter '${nameOrAdapter}' is not available in the build` : `Unknown adapter '${nameOrAdapter}'`
|
|
4549
3848
|
);
|
|
4550
3849
|
}
|
|
3850
|
+
if (!utils_default.isFunction(adapter)) {
|
|
3851
|
+
throw new TypeError("adapter is not a function");
|
|
3852
|
+
}
|
|
4551
3853
|
return adapter;
|
|
4552
3854
|
},
|
|
4553
3855
|
adapters: knownAdapters
|
|
4554
3856
|
};
|
|
4555
3857
|
|
|
4556
|
-
// node_modules/axios/lib/core/dispatchRequest.js
|
|
3858
|
+
// node_modules/.pnpm/axios@1.3.2/node_modules/axios/lib/core/dispatchRequest.js
|
|
4557
3859
|
function throwIfCancellationRequested(config) {
|
|
4558
3860
|
if (config.cancelToken) {
|
|
4559
3861
|
config.cancelToken.throwIfRequested();
|
|
@@ -4598,7 +3900,86 @@ function dispatchRequest(config) {
|
|
|
4598
3900
|
});
|
|
4599
3901
|
}
|
|
4600
3902
|
|
|
4601
|
-
// node_modules/axios/lib/
|
|
3903
|
+
// node_modules/.pnpm/axios@1.3.2/node_modules/axios/lib/core/mergeConfig.js
|
|
3904
|
+
var headersToObject = (thing) => thing instanceof AxiosHeaders_default ? thing.toJSON() : thing;
|
|
3905
|
+
function mergeConfig(config1, config2) {
|
|
3906
|
+
config2 = config2 || {};
|
|
3907
|
+
const config = {};
|
|
3908
|
+
function getMergedValue(target, source, caseless) {
|
|
3909
|
+
if (utils_default.isPlainObject(target) && utils_default.isPlainObject(source)) {
|
|
3910
|
+
return utils_default.merge.call({ caseless }, target, source);
|
|
3911
|
+
} else if (utils_default.isPlainObject(source)) {
|
|
3912
|
+
return utils_default.merge({}, source);
|
|
3913
|
+
} else if (utils_default.isArray(source)) {
|
|
3914
|
+
return source.slice();
|
|
3915
|
+
}
|
|
3916
|
+
return source;
|
|
3917
|
+
}
|
|
3918
|
+
function mergeDeepProperties(a, b, caseless) {
|
|
3919
|
+
if (!utils_default.isUndefined(b)) {
|
|
3920
|
+
return getMergedValue(a, b, caseless);
|
|
3921
|
+
} else if (!utils_default.isUndefined(a)) {
|
|
3922
|
+
return getMergedValue(void 0, a, caseless);
|
|
3923
|
+
}
|
|
3924
|
+
}
|
|
3925
|
+
function valueFromConfig2(a, b) {
|
|
3926
|
+
if (!utils_default.isUndefined(b)) {
|
|
3927
|
+
return getMergedValue(void 0, b);
|
|
3928
|
+
}
|
|
3929
|
+
}
|
|
3930
|
+
function defaultToConfig2(a, b) {
|
|
3931
|
+
if (!utils_default.isUndefined(b)) {
|
|
3932
|
+
return getMergedValue(void 0, b);
|
|
3933
|
+
} else if (!utils_default.isUndefined(a)) {
|
|
3934
|
+
return getMergedValue(void 0, a);
|
|
3935
|
+
}
|
|
3936
|
+
}
|
|
3937
|
+
function mergeDirectKeys(a, b, prop) {
|
|
3938
|
+
if (prop in config2) {
|
|
3939
|
+
return getMergedValue(a, b);
|
|
3940
|
+
} else if (prop in config1) {
|
|
3941
|
+
return getMergedValue(void 0, a);
|
|
3942
|
+
}
|
|
3943
|
+
}
|
|
3944
|
+
const mergeMap = {
|
|
3945
|
+
url: valueFromConfig2,
|
|
3946
|
+
method: valueFromConfig2,
|
|
3947
|
+
data: valueFromConfig2,
|
|
3948
|
+
baseURL: defaultToConfig2,
|
|
3949
|
+
transformRequest: defaultToConfig2,
|
|
3950
|
+
transformResponse: defaultToConfig2,
|
|
3951
|
+
paramsSerializer: defaultToConfig2,
|
|
3952
|
+
timeout: defaultToConfig2,
|
|
3953
|
+
timeoutMessage: defaultToConfig2,
|
|
3954
|
+
withCredentials: defaultToConfig2,
|
|
3955
|
+
adapter: defaultToConfig2,
|
|
3956
|
+
responseType: defaultToConfig2,
|
|
3957
|
+
xsrfCookieName: defaultToConfig2,
|
|
3958
|
+
xsrfHeaderName: defaultToConfig2,
|
|
3959
|
+
onUploadProgress: defaultToConfig2,
|
|
3960
|
+
onDownloadProgress: defaultToConfig2,
|
|
3961
|
+
decompress: defaultToConfig2,
|
|
3962
|
+
maxContentLength: defaultToConfig2,
|
|
3963
|
+
maxBodyLength: defaultToConfig2,
|
|
3964
|
+
beforeRedirect: defaultToConfig2,
|
|
3965
|
+
transport: defaultToConfig2,
|
|
3966
|
+
httpAgent: defaultToConfig2,
|
|
3967
|
+
httpsAgent: defaultToConfig2,
|
|
3968
|
+
cancelToken: defaultToConfig2,
|
|
3969
|
+
socketPath: defaultToConfig2,
|
|
3970
|
+
responseEncoding: defaultToConfig2,
|
|
3971
|
+
validateStatus: mergeDirectKeys,
|
|
3972
|
+
headers: (a, b) => mergeDeepProperties(headersToObject(a), headersToObject(b), true)
|
|
3973
|
+
};
|
|
3974
|
+
utils_default.forEach(Object.keys(config1).concat(Object.keys(config2)), function computeConfigValue(prop) {
|
|
3975
|
+
const merge2 = mergeMap[prop] || mergeDeepProperties;
|
|
3976
|
+
const configValue = merge2(config1[prop], config2[prop], prop);
|
|
3977
|
+
utils_default.isUndefined(configValue) && merge2 !== mergeDirectKeys || (config[prop] = configValue);
|
|
3978
|
+
});
|
|
3979
|
+
return config;
|
|
3980
|
+
}
|
|
3981
|
+
|
|
3982
|
+
// node_modules/.pnpm/axios@1.3.2/node_modules/axios/lib/helpers/validator.js
|
|
4602
3983
|
var validators = {};
|
|
4603
3984
|
["object", "boolean", "number", "function", "string", "symbol"].forEach((type, i) => {
|
|
4604
3985
|
validators[type] = function validator(thing) {
|
|
@@ -4629,12 +4010,6 @@ validators.transitional = function transitional(validator, version2, message) {
|
|
|
4629
4010
|
return validator ? validator(value, opt, opts) : true;
|
|
4630
4011
|
};
|
|
4631
4012
|
};
|
|
4632
|
-
validators.spelling = function spelling(correctSpelling) {
|
|
4633
|
-
return (value, opt) => {
|
|
4634
|
-
console.warn(`${opt} is likely a misspelling of ${correctSpelling}`);
|
|
4635
|
-
return true;
|
|
4636
|
-
};
|
|
4637
|
-
};
|
|
4638
4013
|
function assertOptions(options, schema, allowUnknown) {
|
|
4639
4014
|
if (typeof options !== "object") {
|
|
4640
4015
|
throw new AxiosError_default("options must be an object", AxiosError_default.ERR_BAD_OPTION_VALUE);
|
|
@@ -4662,11 +4037,11 @@ var validator_default = {
|
|
|
4662
4037
|
validators
|
|
4663
4038
|
};
|
|
4664
4039
|
|
|
4665
|
-
// node_modules/axios/lib/core/Axios.js
|
|
4040
|
+
// node_modules/.pnpm/axios@1.3.2/node_modules/axios/lib/core/Axios.js
|
|
4666
4041
|
var validators2 = validator_default.validators;
|
|
4667
4042
|
var Axios = class {
|
|
4668
4043
|
constructor(instanceConfig) {
|
|
4669
|
-
this.defaults = instanceConfig
|
|
4044
|
+
this.defaults = instanceConfig;
|
|
4670
4045
|
this.interceptors = {
|
|
4671
4046
|
request: new InterceptorManager_default(),
|
|
4672
4047
|
response: new InterceptorManager_default()
|
|
@@ -4680,27 +4055,7 @@ var Axios = class {
|
|
|
4680
4055
|
*
|
|
4681
4056
|
* @returns {Promise} The Promise to be fulfilled
|
|
4682
4057
|
*/
|
|
4683
|
-
|
|
4684
|
-
try {
|
|
4685
|
-
return await this._request(configOrUrl, config);
|
|
4686
|
-
} catch (err) {
|
|
4687
|
-
if (err instanceof Error) {
|
|
4688
|
-
let dummy = {};
|
|
4689
|
-
Error.captureStackTrace ? Error.captureStackTrace(dummy) : dummy = new Error();
|
|
4690
|
-
const stack = dummy.stack ? dummy.stack.replace(/^.+\n/, "") : "";
|
|
4691
|
-
try {
|
|
4692
|
-
if (!err.stack) {
|
|
4693
|
-
err.stack = stack;
|
|
4694
|
-
} else if (stack && !String(err.stack).endsWith(stack.replace(/^.+\n.+\n/, ""))) {
|
|
4695
|
-
err.stack += "\n" + stack;
|
|
4696
|
-
}
|
|
4697
|
-
} catch (e) {
|
|
4698
|
-
}
|
|
4699
|
-
}
|
|
4700
|
-
throw err;
|
|
4701
|
-
}
|
|
4702
|
-
}
|
|
4703
|
-
_request(configOrUrl, config) {
|
|
4058
|
+
request(configOrUrl, config) {
|
|
4704
4059
|
if (typeof configOrUrl === "string") {
|
|
4705
4060
|
config = config || {};
|
|
4706
4061
|
config.url = configOrUrl;
|
|
@@ -4716,34 +4071,19 @@ var Axios = class {
|
|
|
4716
4071
|
clarifyTimeoutError: validators2.transitional(validators2.boolean)
|
|
4717
4072
|
}, false);
|
|
4718
4073
|
}
|
|
4719
|
-
if (paramsSerializer
|
|
4720
|
-
|
|
4721
|
-
|
|
4722
|
-
|
|
4723
|
-
|
|
4724
|
-
} else {
|
|
4725
|
-
validator_default.assertOptions(paramsSerializer, {
|
|
4726
|
-
encode: validators2.function,
|
|
4727
|
-
serialize: validators2.function
|
|
4728
|
-
}, true);
|
|
4729
|
-
}
|
|
4730
|
-
}
|
|
4731
|
-
if (config.allowAbsoluteUrls !== void 0) {
|
|
4732
|
-
} else if (this.defaults.allowAbsoluteUrls !== void 0) {
|
|
4733
|
-
config.allowAbsoluteUrls = this.defaults.allowAbsoluteUrls;
|
|
4734
|
-
} else {
|
|
4735
|
-
config.allowAbsoluteUrls = true;
|
|
4074
|
+
if (paramsSerializer !== void 0) {
|
|
4075
|
+
validator_default.assertOptions(paramsSerializer, {
|
|
4076
|
+
encode: validators2.function,
|
|
4077
|
+
serialize: validators2.function
|
|
4078
|
+
}, true);
|
|
4736
4079
|
}
|
|
4737
|
-
validator_default.assertOptions(config, {
|
|
4738
|
-
baseUrl: validators2.spelling("baseURL"),
|
|
4739
|
-
withXsrfToken: validators2.spelling("withXSRFToken")
|
|
4740
|
-
}, true);
|
|
4741
4080
|
config.method = (config.method || this.defaults.method || "get").toLowerCase();
|
|
4742
|
-
let contextHeaders
|
|
4081
|
+
let contextHeaders;
|
|
4082
|
+
contextHeaders = headers && utils_default.merge(
|
|
4743
4083
|
headers.common,
|
|
4744
4084
|
headers[config.method]
|
|
4745
4085
|
);
|
|
4746
|
-
|
|
4086
|
+
contextHeaders && utils_default.forEach(
|
|
4747
4087
|
["delete", "get", "head", "post", "put", "patch", "common"],
|
|
4748
4088
|
(method) => {
|
|
4749
4089
|
delete headers[method];
|
|
@@ -4804,11 +4144,11 @@ var Axios = class {
|
|
|
4804
4144
|
}
|
|
4805
4145
|
getUri(config) {
|
|
4806
4146
|
config = mergeConfig(this.defaults, config);
|
|
4807
|
-
const fullPath = buildFullPath(config.baseURL, config.url
|
|
4147
|
+
const fullPath = buildFullPath(config.baseURL, config.url);
|
|
4808
4148
|
return buildURL(fullPath, config.params, config.paramsSerializer);
|
|
4809
4149
|
}
|
|
4810
4150
|
};
|
|
4811
|
-
utils_default.forEach(["delete", "get", "head", "options"], function
|
|
4151
|
+
utils_default.forEach(["delete", "get", "head", "options"], function forEachMethodNoData2(method) {
|
|
4812
4152
|
Axios.prototype[method] = function(url2, config) {
|
|
4813
4153
|
return this.request(mergeConfig(config || {}, {
|
|
4814
4154
|
method,
|
|
@@ -4817,7 +4157,7 @@ utils_default.forEach(["delete", "get", "head", "options"], function forEachMeth
|
|
|
4817
4157
|
}));
|
|
4818
4158
|
};
|
|
4819
4159
|
});
|
|
4820
|
-
utils_default.forEach(["post", "put", "patch"], function
|
|
4160
|
+
utils_default.forEach(["post", "put", "patch"], function forEachMethodWithData2(method) {
|
|
4821
4161
|
function generateHTTPMethod(isForm) {
|
|
4822
4162
|
return function httpMethod(url2, data, config) {
|
|
4823
4163
|
return this.request(mergeConfig(config || {}, {
|
|
@@ -4835,7 +4175,7 @@ utils_default.forEach(["post", "put", "patch"], function forEachMethodWithData(m
|
|
|
4835
4175
|
});
|
|
4836
4176
|
var Axios_default = Axios;
|
|
4837
4177
|
|
|
4838
|
-
// node_modules/axios/lib/cancel/CancelToken.js
|
|
4178
|
+
// node_modules/.pnpm/axios@1.3.2/node_modules/axios/lib/cancel/CancelToken.js
|
|
4839
4179
|
var CancelToken = class _CancelToken {
|
|
4840
4180
|
constructor(executor) {
|
|
4841
4181
|
if (typeof executor !== "function") {
|
|
@@ -4907,15 +4247,6 @@ var CancelToken = class _CancelToken {
|
|
|
4907
4247
|
this._listeners.splice(index, 1);
|
|
4908
4248
|
}
|
|
4909
4249
|
}
|
|
4910
|
-
toAbortSignal() {
|
|
4911
|
-
const controller = new AbortController();
|
|
4912
|
-
const abort = (err) => {
|
|
4913
|
-
controller.abort(err);
|
|
4914
|
-
};
|
|
4915
|
-
this.subscribe(abort);
|
|
4916
|
-
controller.signal.unsubscribe = () => this.unsubscribe(abort);
|
|
4917
|
-
return controller.signal;
|
|
4918
|
-
}
|
|
4919
4250
|
/**
|
|
4920
4251
|
* Returns an object that contains a new `CancelToken` and a function that, when called,
|
|
4921
4252
|
* cancels the `CancelToken`.
|
|
@@ -4933,19 +4264,19 @@ var CancelToken = class _CancelToken {
|
|
|
4933
4264
|
};
|
|
4934
4265
|
var CancelToken_default = CancelToken;
|
|
4935
4266
|
|
|
4936
|
-
// node_modules/axios/lib/helpers/spread.js
|
|
4267
|
+
// node_modules/.pnpm/axios@1.3.2/node_modules/axios/lib/helpers/spread.js
|
|
4937
4268
|
function spread(callback) {
|
|
4938
4269
|
return function wrap(arr) {
|
|
4939
4270
|
return callback.apply(null, arr);
|
|
4940
4271
|
};
|
|
4941
4272
|
}
|
|
4942
4273
|
|
|
4943
|
-
// node_modules/axios/lib/helpers/isAxiosError.js
|
|
4274
|
+
// node_modules/.pnpm/axios@1.3.2/node_modules/axios/lib/helpers/isAxiosError.js
|
|
4944
4275
|
function isAxiosError(payload) {
|
|
4945
4276
|
return utils_default.isObject(payload) && payload.isAxiosError === true;
|
|
4946
4277
|
}
|
|
4947
4278
|
|
|
4948
|
-
// node_modules/axios/lib/helpers/HttpStatusCode.js
|
|
4279
|
+
// node_modules/.pnpm/axios@1.3.2/node_modules/axios/lib/helpers/HttpStatusCode.js
|
|
4949
4280
|
var HttpStatusCode = {
|
|
4950
4281
|
Continue: 100,
|
|
4951
4282
|
SwitchingProtocols: 101,
|
|
@@ -5016,7 +4347,7 @@ Object.entries(HttpStatusCode).forEach(([key, value]) => {
|
|
|
5016
4347
|
});
|
|
5017
4348
|
var HttpStatusCode_default = HttpStatusCode;
|
|
5018
4349
|
|
|
5019
|
-
// node_modules/axios/lib/axios.js
|
|
4350
|
+
// node_modules/.pnpm/axios@1.3.2/node_modules/axios/lib/axios.js
|
|
5020
4351
|
function createInstance(defaultConfig) {
|
|
5021
4352
|
const context = new Axios_default(defaultConfig);
|
|
5022
4353
|
const instance = bind(Axios_default.prototype.request, context);
|
|
@@ -5044,12 +4375,11 @@ axios.isAxiosError = isAxiosError;
|
|
|
5044
4375
|
axios.mergeConfig = mergeConfig;
|
|
5045
4376
|
axios.AxiosHeaders = AxiosHeaders_default;
|
|
5046
4377
|
axios.formToJSON = (thing) => formDataToJSON_default(utils_default.isHTMLForm(thing) ? new FormData(thing) : thing);
|
|
5047
|
-
axios.getAdapter = adapters_default.getAdapter;
|
|
5048
4378
|
axios.HttpStatusCode = HttpStatusCode_default;
|
|
5049
4379
|
axios.default = axios;
|
|
5050
4380
|
var axios_default = axios;
|
|
5051
4381
|
|
|
5052
|
-
// node_modules/axios/index.js
|
|
4382
|
+
// node_modules/.pnpm/axios@1.3.2/node_modules/axios/index.js
|
|
5053
4383
|
var {
|
|
5054
4384
|
Axios: Axios2,
|
|
5055
4385
|
AxiosError: AxiosError2,
|
|
@@ -5065,7 +4395,6 @@ var {
|
|
|
5065
4395
|
AxiosHeaders: AxiosHeaders2,
|
|
5066
4396
|
HttpStatusCode: HttpStatusCode2,
|
|
5067
4397
|
formToJSON,
|
|
5068
|
-
getAdapter,
|
|
5069
4398
|
mergeConfig: mergeConfig2
|
|
5070
4399
|
} = axios_default;
|
|
5071
4400
|
|
|
@@ -5074,7 +4403,7 @@ var import_fs_extra4 = __toESM(require("fs-extra"));
|
|
|
5074
4403
|
var import_path5 = __toESM(require("path"));
|
|
5075
4404
|
var import_form_data2 = __toESM(require("form-data"));
|
|
5076
4405
|
var import_ora = __toESM(require("ora"));
|
|
5077
|
-
var
|
|
4406
|
+
var crypto = __toESM(require("crypto"));
|
|
5078
4407
|
|
|
5079
4408
|
// bin/utils/uploadLimits.ts
|
|
5080
4409
|
var import_fs = __toESM(require("fs"));
|
|
@@ -5408,7 +4737,7 @@ var StepProgressBar = class {
|
|
|
5408
4737
|
};
|
|
5409
4738
|
async function calculateMD5(filePath) {
|
|
5410
4739
|
return new Promise((resolve, reject) => {
|
|
5411
|
-
const hash =
|
|
4740
|
+
const hash = crypto.createHash("md5");
|
|
5412
4741
|
const stream4 = import_fs_extra4.default.createReadStream(filePath);
|
|
5413
4742
|
stream4.on("data", hash.update.bind(hash));
|
|
5414
4743
|
stream4.on("end", () => resolve(hash.digest("hex")));
|
|
@@ -5887,6 +5216,66 @@ async function getMyDomains() {
|
|
|
5887
5216
|
}
|
|
5888
5217
|
return [];
|
|
5889
5218
|
}
|
|
5219
|
+
var CAR_API_BASE = process.env.CAR_API_BASE || process.env.PINME_API_BASE || "http://ipfs-proxy.opena.chat/api/v3";
|
|
5220
|
+
function createCarClient() {
|
|
5221
|
+
let headers = {};
|
|
5222
|
+
try {
|
|
5223
|
+
headers = getAuthHeaders();
|
|
5224
|
+
} catch (e) {
|
|
5225
|
+
}
|
|
5226
|
+
return axios_default.create({
|
|
5227
|
+
baseURL: CAR_API_BASE,
|
|
5228
|
+
timeout: 2e4,
|
|
5229
|
+
headers: {
|
|
5230
|
+
...headers,
|
|
5231
|
+
Accept: "*/*",
|
|
5232
|
+
"Content-Type": "application/json",
|
|
5233
|
+
"User-Agent": "Pinme-CLI",
|
|
5234
|
+
Connection: "keep-alive"
|
|
5235
|
+
}
|
|
5236
|
+
});
|
|
5237
|
+
}
|
|
5238
|
+
async function requestCarExport(cid, uid) {
|
|
5239
|
+
var _a, _b;
|
|
5240
|
+
try {
|
|
5241
|
+
const client = createCarClient();
|
|
5242
|
+
const { data } = await client.post("/car/export", null, {
|
|
5243
|
+
params: {
|
|
5244
|
+
cid,
|
|
5245
|
+
uid
|
|
5246
|
+
}
|
|
5247
|
+
});
|
|
5248
|
+
if ((data == null ? void 0 : data.code) === 200 && (data == null ? void 0 : data.data)) {
|
|
5249
|
+
return data.data;
|
|
5250
|
+
}
|
|
5251
|
+
throw new Error((data == null ? void 0 : data.msg) || "Failed to request CAR export");
|
|
5252
|
+
} catch (e) {
|
|
5253
|
+
if ((_b = (_a = e.response) == null ? void 0 : _a.data) == null ? void 0 : _b.msg) {
|
|
5254
|
+
throw new Error(e.response.data.msg);
|
|
5255
|
+
}
|
|
5256
|
+
throw new Error(`Failed to request CAR export: ${(e == null ? void 0 : e.message) || e}`);
|
|
5257
|
+
}
|
|
5258
|
+
}
|
|
5259
|
+
async function checkCarExportStatus(taskId) {
|
|
5260
|
+
var _a, _b;
|
|
5261
|
+
try {
|
|
5262
|
+
const client = createCarClient();
|
|
5263
|
+
const { data } = await client.get("/car/export/status", {
|
|
5264
|
+
params: {
|
|
5265
|
+
task_id: taskId
|
|
5266
|
+
}
|
|
5267
|
+
});
|
|
5268
|
+
if ((data == null ? void 0 : data.code) === 200 && (data == null ? void 0 : data.data)) {
|
|
5269
|
+
return data.data;
|
|
5270
|
+
}
|
|
5271
|
+
throw new Error((data == null ? void 0 : data.msg) || "Failed to check export status");
|
|
5272
|
+
} catch (e) {
|
|
5273
|
+
if ((_b = (_a = e.response) == null ? void 0 : _a.data) == null ? void 0 : _b.msg) {
|
|
5274
|
+
throw new Error(e.response.data.msg);
|
|
5275
|
+
}
|
|
5276
|
+
throw new Error(`Failed to check export status: ${(e == null ? void 0 : e.message) || e}`);
|
|
5277
|
+
}
|
|
5278
|
+
}
|
|
5890
5279
|
|
|
5891
5280
|
// bin/upload.ts
|
|
5892
5281
|
var URL2 = "https://pinme.eth.limo/#/preview/";
|
|
@@ -6064,7 +5453,7 @@ var upload_default = async (options) => {
|
|
|
6064
5453
|
}
|
|
6065
5454
|
};
|
|
6066
5455
|
|
|
6067
|
-
// bin/
|
|
5456
|
+
// bin/importCar.ts
|
|
6068
5457
|
var import_path7 = __toESM(require("path"));
|
|
6069
5458
|
var import_chalk5 = __toESM(require("chalk"));
|
|
6070
5459
|
var import_inquirer2 = __toESM(require("inquirer"));
|
|
@@ -6115,7 +5504,7 @@ function getUid2() {
|
|
|
6115
5504
|
}
|
|
6116
5505
|
return getDeviceId();
|
|
6117
5506
|
}
|
|
6118
|
-
var
|
|
5507
|
+
var importCar_default = async (options) => {
|
|
6119
5508
|
try {
|
|
6120
5509
|
console.log(
|
|
6121
5510
|
import_figlet2.default.textSync("PINME IMPORT", {
|
|
@@ -6229,18 +5618,226 @@ var import_default = async (options) => {
|
|
|
6229
5618
|
}
|
|
6230
5619
|
};
|
|
6231
5620
|
|
|
6232
|
-
// bin/
|
|
6233
|
-
var
|
|
5621
|
+
// bin/exportCar.ts
|
|
5622
|
+
var import_path8 = __toESM(require("path"));
|
|
5623
|
+
var import_os4 = __toESM(require("os"));
|
|
5624
|
+
var import_chalk6 = __toESM(require("chalk"));
|
|
6234
5625
|
var import_inquirer3 = __toESM(require("inquirer"));
|
|
6235
5626
|
var import_figlet3 = __toESM(require("figlet"));
|
|
5627
|
+
var import_fs4 = __toESM(require("fs"));
|
|
5628
|
+
var import_ora2 = __toESM(require("ora"));
|
|
5629
|
+
checkNodeVersion();
|
|
5630
|
+
var POLL_INTERVAL2 = 5e3;
|
|
5631
|
+
var MAX_POLL_TIME2 = 30 * 60 * 1e3;
|
|
5632
|
+
async function pollExportStatus(taskId, cid, spinner, startTime) {
|
|
5633
|
+
while (Date.now() - startTime < MAX_POLL_TIME2) {
|
|
5634
|
+
try {
|
|
5635
|
+
const status = await checkCarExportStatus(taskId);
|
|
5636
|
+
if (status.status === "completed" && status.download_url) {
|
|
5637
|
+
spinner.succeed(`Export completed for CID: ${cid}`);
|
|
5638
|
+
return status.download_url;
|
|
5639
|
+
} else if (status.status === "failed") {
|
|
5640
|
+
spinner.fail(`Export failed for CID: ${cid}`);
|
|
5641
|
+
return null;
|
|
5642
|
+
} else if (status.status === "processing") {
|
|
5643
|
+
const elapsed = Math.floor((Date.now() - startTime) / 1e3);
|
|
5644
|
+
const minutes = Math.floor(elapsed / 60);
|
|
5645
|
+
const seconds = elapsed % 60;
|
|
5646
|
+
spinner.text = `Exporting CAR file... (${minutes}m ${seconds}s)`;
|
|
5647
|
+
}
|
|
5648
|
+
} catch (error) {
|
|
5649
|
+
console.log(import_chalk6.default.yellow(`Polling error: ${error.message}`));
|
|
5650
|
+
}
|
|
5651
|
+
await new Promise((resolve) => setTimeout(resolve, POLL_INTERVAL2));
|
|
5652
|
+
}
|
|
5653
|
+
const maxPollTimeMinutes = Math.floor(MAX_POLL_TIME2 / (60 * 1e3));
|
|
5654
|
+
spinner.fail(`Export timeout after ${maxPollTimeMinutes} minutes`);
|
|
5655
|
+
return null;
|
|
5656
|
+
}
|
|
5657
|
+
async function downloadCarFile(downloadUrl, outputPath) {
|
|
5658
|
+
try {
|
|
5659
|
+
const spinner = (0, import_ora2.default)(`Downloading CAR file to ${outputPath}...`).start();
|
|
5660
|
+
const response = await axios_default({
|
|
5661
|
+
method: "GET",
|
|
5662
|
+
url: downloadUrl,
|
|
5663
|
+
responseType: "stream",
|
|
5664
|
+
timeout: 18e5
|
|
5665
|
+
// 30 minutes timeout
|
|
5666
|
+
});
|
|
5667
|
+
const writer = import_fs4.default.createWriteStream(outputPath);
|
|
5668
|
+
let downloadedBytes = 0;
|
|
5669
|
+
const totalBytes = parseInt(response.headers["content-length"] || "0", 10);
|
|
5670
|
+
response.data.on("data", (chunk) => {
|
|
5671
|
+
downloadedBytes += chunk.length;
|
|
5672
|
+
if (totalBytes > 0) {
|
|
5673
|
+
const progress = downloadedBytes / totalBytes * 100;
|
|
5674
|
+
spinner.text = `Downloading CAR file... ${progress.toFixed(1)}%`;
|
|
5675
|
+
}
|
|
5676
|
+
});
|
|
5677
|
+
response.data.pipe(writer);
|
|
5678
|
+
return new Promise((resolve, reject) => {
|
|
5679
|
+
writer.on("finish", () => {
|
|
5680
|
+
spinner.succeed(`CAR file downloaded successfully: ${outputPath}`);
|
|
5681
|
+
resolve(true);
|
|
5682
|
+
});
|
|
5683
|
+
writer.on("error", (error) => {
|
|
5684
|
+
spinner.fail(`Download failed: ${error.message}`);
|
|
5685
|
+
reject(error);
|
|
5686
|
+
});
|
|
5687
|
+
});
|
|
5688
|
+
} catch (error) {
|
|
5689
|
+
console.error(import_chalk6.default.red(`Download error: ${error.message}`));
|
|
5690
|
+
return false;
|
|
5691
|
+
}
|
|
5692
|
+
}
|
|
5693
|
+
function isValidCID(cid) {
|
|
5694
|
+
return /^(Qm|bafy|bafk|bafz)/.test(cid);
|
|
5695
|
+
}
|
|
5696
|
+
function getCidFromArgs() {
|
|
5697
|
+
const args = process.argv.slice(2);
|
|
5698
|
+
const cidIdx = args.findIndex((a) => a === "export") + 1;
|
|
5699
|
+
if (cidIdx > 0 && args[cidIdx] && !args[cidIdx].startsWith("-")) {
|
|
5700
|
+
return args[cidIdx].trim();
|
|
5701
|
+
}
|
|
5702
|
+
return null;
|
|
5703
|
+
}
|
|
5704
|
+
function getDownloadsDirectory() {
|
|
5705
|
+
const homeDir = import_os4.default.homedir();
|
|
5706
|
+
return import_path8.default.join(homeDir, "Downloads");
|
|
5707
|
+
}
|
|
5708
|
+
function getOutputPathFromArgs() {
|
|
5709
|
+
const args = process.argv.slice(2);
|
|
5710
|
+
const outputIdx = args.findIndex((a) => a === "--output" || a === "-o");
|
|
5711
|
+
if (outputIdx >= 0 && args[outputIdx + 1] && !args[outputIdx + 1].startsWith("-")) {
|
|
5712
|
+
return String(args[outputIdx + 1]).trim();
|
|
5713
|
+
}
|
|
5714
|
+
return null;
|
|
5715
|
+
}
|
|
5716
|
+
var exportCar_default = async () => {
|
|
5717
|
+
try {
|
|
5718
|
+
console.log(
|
|
5719
|
+
import_figlet3.default.textSync("PINME EXPORT", {
|
|
5720
|
+
font: "Standard",
|
|
5721
|
+
horizontalLayout: "default",
|
|
5722
|
+
verticalLayout: "default",
|
|
5723
|
+
width: 180,
|
|
5724
|
+
whitespaceBreak: true
|
|
5725
|
+
})
|
|
5726
|
+
);
|
|
5727
|
+
let cid = getCidFromArgs();
|
|
5728
|
+
if (!cid) {
|
|
5729
|
+
const answer = await import_inquirer3.default.prompt([
|
|
5730
|
+
{
|
|
5731
|
+
type: "input",
|
|
5732
|
+
name: "cid",
|
|
5733
|
+
message: "Enter CID to export: ",
|
|
5734
|
+
validate: (input) => {
|
|
5735
|
+
if (!input.trim()) {
|
|
5736
|
+
return "CID cannot be empty";
|
|
5737
|
+
}
|
|
5738
|
+
if (!isValidCID(input.trim())) {
|
|
5739
|
+
return "Invalid CID format. CID should start with Qm, bafy, bafk, or bafz";
|
|
5740
|
+
}
|
|
5741
|
+
return true;
|
|
5742
|
+
}
|
|
5743
|
+
}
|
|
5744
|
+
]);
|
|
5745
|
+
cid = answer.cid.trim();
|
|
5746
|
+
}
|
|
5747
|
+
if (!cid || !isValidCID(cid)) {
|
|
5748
|
+
console.log(import_chalk6.default.red("Invalid CID format. CID should start with Qm, bafy, bafk, or bafz"));
|
|
5749
|
+
return;
|
|
5750
|
+
}
|
|
5751
|
+
let outputPath = getOutputPathFromArgs();
|
|
5752
|
+
if (!outputPath) {
|
|
5753
|
+
const downloadsDir = getDownloadsDirectory();
|
|
5754
|
+
const defaultFileName = `${cid}.car`;
|
|
5755
|
+
const defaultPath = import_path8.default.join(downloadsDir, defaultFileName);
|
|
5756
|
+
const answer = await import_inquirer3.default.prompt([
|
|
5757
|
+
{
|
|
5758
|
+
type: "input",
|
|
5759
|
+
name: "output",
|
|
5760
|
+
message: `Output file path (default: ${defaultPath}): `,
|
|
5761
|
+
default: defaultPath
|
|
5762
|
+
}
|
|
5763
|
+
]);
|
|
5764
|
+
outputPath = answer.output.trim() || defaultPath;
|
|
5765
|
+
}
|
|
5766
|
+
outputPath = import_path8.default.resolve(outputPath);
|
|
5767
|
+
const outputDir = import_path8.default.dirname(outputPath);
|
|
5768
|
+
if (!import_fs4.default.existsSync(outputDir)) {
|
|
5769
|
+
import_fs4.default.mkdirSync(outputDir, { recursive: true });
|
|
5770
|
+
}
|
|
5771
|
+
if (import_fs4.default.existsSync(outputPath)) {
|
|
5772
|
+
const answer = await import_inquirer3.default.prompt([
|
|
5773
|
+
{
|
|
5774
|
+
type: "confirm",
|
|
5775
|
+
name: "overwrite",
|
|
5776
|
+
message: `File ${outputPath} already exists. Overwrite?`,
|
|
5777
|
+
default: false
|
|
5778
|
+
}
|
|
5779
|
+
]);
|
|
5780
|
+
if (!answer.overwrite) {
|
|
5781
|
+
console.log(import_chalk6.default.blue("Export cancelled."));
|
|
5782
|
+
return;
|
|
5783
|
+
}
|
|
5784
|
+
}
|
|
5785
|
+
const uid = getUid();
|
|
5786
|
+
const spinner = (0, import_ora2.default)(`Requesting CAR export for CID: ${cid}...`).start();
|
|
5787
|
+
try {
|
|
5788
|
+
const exportResponse = await requestCarExport(cid, uid);
|
|
5789
|
+
spinner.succeed(`Export task created: ${exportResponse.task_id}`);
|
|
5790
|
+
const pollSpinner = (0, import_ora2.default)("Waiting for export to complete...").start();
|
|
5791
|
+
const startTime = Date.now();
|
|
5792
|
+
const downloadUrl = await pollExportStatus(
|
|
5793
|
+
exportResponse.task_id,
|
|
5794
|
+
cid,
|
|
5795
|
+
pollSpinner,
|
|
5796
|
+
startTime
|
|
5797
|
+
);
|
|
5798
|
+
if (!downloadUrl) {
|
|
5799
|
+
console.log(import_chalk6.default.red("Export failed or timed out."));
|
|
5800
|
+
return;
|
|
5801
|
+
}
|
|
5802
|
+
const success = await downloadCarFile(downloadUrl, outputPath);
|
|
5803
|
+
if (success) {
|
|
5804
|
+
const fileSize = import_fs4.default.statSync(outputPath).size;
|
|
5805
|
+
const fileSizeMB = (fileSize / (1024 * 1024)).toFixed(2);
|
|
5806
|
+
console.log(
|
|
5807
|
+
import_chalk6.default.cyan(
|
|
5808
|
+
import_figlet3.default.textSync("Successful", { horizontalLayout: "full" })
|
|
5809
|
+
)
|
|
5810
|
+
);
|
|
5811
|
+
console.log(import_chalk6.default.green(`
|
|
5812
|
+
\u{1F389} Export successful!`));
|
|
5813
|
+
console.log(import_chalk6.default.cyan(`File: ${outputPath}`));
|
|
5814
|
+
console.log(import_chalk6.default.cyan(`Size: ${fileSizeMB} MB`));
|
|
5815
|
+
console.log(import_chalk6.default.cyan(`CID: ${cid}`));
|
|
5816
|
+
} else {
|
|
5817
|
+
console.log(import_chalk6.default.red("Download failed."));
|
|
5818
|
+
}
|
|
5819
|
+
} catch (error) {
|
|
5820
|
+
spinner.fail(`Error: ${error.message}`);
|
|
5821
|
+
console.error(import_chalk6.default.red(`Export error: ${error.message}`));
|
|
5822
|
+
}
|
|
5823
|
+
} catch (error) {
|
|
5824
|
+
console.error(import_chalk6.default.red(`error executing: ${error.message}`));
|
|
5825
|
+
console.error(error.stack);
|
|
5826
|
+
}
|
|
5827
|
+
};
|
|
5828
|
+
|
|
5829
|
+
// bin/remove.ts
|
|
5830
|
+
var import_chalk8 = __toESM(require("chalk"));
|
|
5831
|
+
var import_inquirer4 = __toESM(require("inquirer"));
|
|
5832
|
+
var import_figlet4 = __toESM(require("figlet"));
|
|
6236
5833
|
|
|
6237
5834
|
// bin/utils/removeFromIpfs.ts
|
|
6238
|
-
var
|
|
5835
|
+
var import_chalk7 = __toESM(require("chalk"));
|
|
6239
5836
|
var ipfsApiUrl = "https://pinme.dev/api/v3";
|
|
6240
5837
|
async function removeFromIpfs(value, type = "hash") {
|
|
6241
5838
|
try {
|
|
6242
5839
|
const uid = getUid();
|
|
6243
|
-
console.log(
|
|
5840
|
+
console.log(import_chalk7.default.blue(`Removing content from IPFS: ${value}...`));
|
|
6244
5841
|
const queryParams = new URLSearchParams({
|
|
6245
5842
|
uid
|
|
6246
5843
|
});
|
|
@@ -6258,49 +5855,49 @@ async function removeFromIpfs(value, type = "hash") {
|
|
|
6258
5855
|
);
|
|
6259
5856
|
const { code, msg, data } = response.data;
|
|
6260
5857
|
if (code === 200) {
|
|
6261
|
-
console.log(
|
|
5858
|
+
console.log(import_chalk7.default.green("\u2713 Removal successful!"));
|
|
6262
5859
|
console.log(
|
|
6263
|
-
|
|
5860
|
+
import_chalk7.default.cyan(
|
|
6264
5861
|
`Content ${type}: ${value} has been removed from IPFS network`
|
|
6265
5862
|
)
|
|
6266
5863
|
);
|
|
6267
5864
|
return true;
|
|
6268
5865
|
} else {
|
|
6269
|
-
console.log(
|
|
6270
|
-
console.log(
|
|
5866
|
+
console.log(import_chalk7.default.red("\u2717 Removal failed"));
|
|
5867
|
+
console.log(import_chalk7.default.red(`Error: ${msg || "Unknown error occurred"}`));
|
|
6271
5868
|
return false;
|
|
6272
5869
|
}
|
|
6273
5870
|
} catch (error) {
|
|
6274
|
-
console.log(
|
|
5871
|
+
console.log(import_chalk7.default.red("\u2717 Removal failed", error));
|
|
6275
5872
|
if (error.response) {
|
|
6276
5873
|
const { status, data } = error.response;
|
|
6277
5874
|
console.log(
|
|
6278
|
-
|
|
5875
|
+
import_chalk7.default.red(`HTTP Error ${status}: ${(data == null ? void 0 : data.msg) || "Server error"}`)
|
|
6279
5876
|
);
|
|
6280
5877
|
if (status === 404) {
|
|
6281
5878
|
console.log(
|
|
6282
|
-
|
|
5879
|
+
import_chalk7.default.yellow("Content not found on the network or already removed")
|
|
6283
5880
|
);
|
|
6284
5881
|
} else if (status === 403) {
|
|
6285
5882
|
console.log(
|
|
6286
|
-
|
|
5883
|
+
import_chalk7.default.yellow(
|
|
6287
5884
|
"Permission denied - you may not have access to remove this content"
|
|
6288
5885
|
)
|
|
6289
5886
|
);
|
|
6290
5887
|
} else if (status === 500) {
|
|
6291
5888
|
console.log(
|
|
6292
|
-
|
|
5889
|
+
import_chalk7.default.yellow("Server internal error - please try again later")
|
|
6293
5890
|
);
|
|
6294
5891
|
}
|
|
6295
5892
|
} else if (error.request) {
|
|
6296
5893
|
console.log(
|
|
6297
|
-
|
|
5894
|
+
import_chalk7.default.red("Network error: Unable to connect to IPFS service")
|
|
6298
5895
|
);
|
|
6299
5896
|
console.log(
|
|
6300
|
-
|
|
5897
|
+
import_chalk7.default.yellow("Please check your internet connection and try again")
|
|
6301
5898
|
);
|
|
6302
5899
|
} else {
|
|
6303
|
-
console.log(
|
|
5900
|
+
console.log(import_chalk7.default.red(`Error: ${error.message}`));
|
|
6304
5901
|
}
|
|
6305
5902
|
return false;
|
|
6306
5903
|
}
|
|
@@ -6348,7 +5945,7 @@ function parseInput(input) {
|
|
|
6348
5945
|
var remove_default = async (options) => {
|
|
6349
5946
|
try {
|
|
6350
5947
|
console.log(
|
|
6351
|
-
|
|
5948
|
+
import_figlet4.default.textSync("PINME", {
|
|
6352
5949
|
font: "Standard",
|
|
6353
5950
|
horizontalLayout: "default",
|
|
6354
5951
|
verticalLayout: "default",
|
|
@@ -6360,32 +5957,32 @@ var remove_default = async (options) => {
|
|
|
6360
5957
|
if (argHash && !argHash.startsWith("-")) {
|
|
6361
5958
|
const parsedInput = parseInput(argHash);
|
|
6362
5959
|
if (!parsedInput) {
|
|
6363
|
-
console.log(
|
|
6364
|
-
console.log(
|
|
6365
|
-
console.log(
|
|
6366
|
-
console.log(
|
|
6367
|
-
console.log(
|
|
6368
|
-
console.log(
|
|
5960
|
+
console.log(import_chalk8.default.red(`Invalid input format: ${argHash}`));
|
|
5961
|
+
console.log(import_chalk8.default.yellow("Supported formats:"));
|
|
5962
|
+
console.log(import_chalk8.default.yellow(" - IPFS hash: bafybeig..."));
|
|
5963
|
+
console.log(import_chalk8.default.yellow(" - Full URL: https://bafybeig....pinme.dev"));
|
|
5964
|
+
console.log(import_chalk8.default.yellow(" - Subname: 3abt6ztu"));
|
|
5965
|
+
console.log(import_chalk8.default.yellow(" - Subname URL: https://3abt6ztu.pinit.eth.limo"));
|
|
6369
5966
|
return;
|
|
6370
5967
|
}
|
|
6371
5968
|
try {
|
|
6372
5969
|
const success = await removeFromIpfs(parsedInput.value, parsedInput.type);
|
|
6373
5970
|
if (success) {
|
|
6374
5971
|
console.log(
|
|
6375
|
-
|
|
6376
|
-
|
|
5972
|
+
import_chalk8.default.cyan(
|
|
5973
|
+
import_figlet4.default.textSync("Successful", { horizontalLayout: "full" })
|
|
6377
5974
|
)
|
|
6378
5975
|
);
|
|
6379
5976
|
}
|
|
6380
5977
|
} catch (error) {
|
|
6381
|
-
console.error(
|
|
5978
|
+
console.error(import_chalk8.default.red(`Error: ${error.message}`));
|
|
6382
5979
|
}
|
|
6383
5980
|
return;
|
|
6384
5981
|
}
|
|
6385
|
-
console.log(
|
|
6386
|
-
console.log(
|
|
5982
|
+
console.log(import_chalk8.default.yellow("\u26A0\uFE0F Warning: This action will permanently remove the content from IPFS network"));
|
|
5983
|
+
console.log(import_chalk8.default.yellow("\u26A0\uFE0F Make sure you have the correct IPFS hash"));
|
|
6387
5984
|
console.log("");
|
|
6388
|
-
const confirmAnswer = await
|
|
5985
|
+
const confirmAnswer = await import_inquirer4.default.prompt([
|
|
6389
5986
|
{
|
|
6390
5987
|
type: "confirm",
|
|
6391
5988
|
name: "confirm",
|
|
@@ -6394,10 +5991,10 @@ var remove_default = async (options) => {
|
|
|
6394
5991
|
}
|
|
6395
5992
|
]);
|
|
6396
5993
|
if (!confirmAnswer.confirm) {
|
|
6397
|
-
console.log(
|
|
5994
|
+
console.log(import_chalk8.default.yellow("Operation cancelled"));
|
|
6398
5995
|
return;
|
|
6399
5996
|
}
|
|
6400
|
-
const answer = await
|
|
5997
|
+
const answer = await import_inquirer4.default.prompt([
|
|
6401
5998
|
{
|
|
6402
5999
|
type: "input",
|
|
6403
6000
|
name: "input",
|
|
@@ -6417,10 +6014,10 @@ var remove_default = async (options) => {
|
|
|
6417
6014
|
if (answer.input) {
|
|
6418
6015
|
const parsedInput = parseInput(answer.input.trim());
|
|
6419
6016
|
if (!parsedInput) {
|
|
6420
|
-
console.log(
|
|
6017
|
+
console.log(import_chalk8.default.red("Invalid input format"));
|
|
6421
6018
|
return;
|
|
6422
6019
|
}
|
|
6423
|
-
const finalConfirm = await
|
|
6020
|
+
const finalConfirm = await import_inquirer4.default.prompt([
|
|
6424
6021
|
{
|
|
6425
6022
|
type: "confirm",
|
|
6426
6023
|
name: "confirm",
|
|
@@ -6429,37 +6026,37 @@ var remove_default = async (options) => {
|
|
|
6429
6026
|
}
|
|
6430
6027
|
]);
|
|
6431
6028
|
if (!finalConfirm.confirm) {
|
|
6432
|
-
console.log(
|
|
6029
|
+
console.log(import_chalk8.default.yellow("Operation cancelled"));
|
|
6433
6030
|
return;
|
|
6434
6031
|
}
|
|
6435
6032
|
try {
|
|
6436
6033
|
const success = await removeFromIpfs(parsedInput.value, parsedInput.type);
|
|
6437
6034
|
if (success) {
|
|
6438
6035
|
console.log(
|
|
6439
|
-
|
|
6440
|
-
|
|
6036
|
+
import_chalk8.default.cyan(
|
|
6037
|
+
import_figlet4.default.textSync("Successful", { horizontalLayout: "full" })
|
|
6441
6038
|
)
|
|
6442
6039
|
);
|
|
6443
6040
|
}
|
|
6444
6041
|
} catch (error) {
|
|
6445
|
-
console.error(
|
|
6042
|
+
console.error(import_chalk8.default.red(`Error: ${error.message}`));
|
|
6446
6043
|
}
|
|
6447
6044
|
}
|
|
6448
6045
|
} catch (error) {
|
|
6449
|
-
console.error(
|
|
6046
|
+
console.error(import_chalk8.default.red(`Error executing remove command: ${error.message}`));
|
|
6450
6047
|
console.error(error.stack);
|
|
6451
6048
|
}
|
|
6452
6049
|
};
|
|
6453
6050
|
|
|
6454
6051
|
// bin/set-appkey.ts
|
|
6455
|
-
var
|
|
6456
|
-
var
|
|
6052
|
+
var import_chalk9 = __toESM(require("chalk"));
|
|
6053
|
+
var import_inquirer5 = __toESM(require("inquirer"));
|
|
6457
6054
|
async function setAppKeyCmd() {
|
|
6458
6055
|
try {
|
|
6459
6056
|
const argAppKey = process.argv[3];
|
|
6460
6057
|
let appKey = argAppKey;
|
|
6461
6058
|
if (!appKey) {
|
|
6462
|
-
const ans = await
|
|
6059
|
+
const ans = await import_inquirer5.default.prompt([
|
|
6463
6060
|
{
|
|
6464
6061
|
type: "input",
|
|
6465
6062
|
name: "appKey",
|
|
@@ -6469,34 +6066,34 @@ async function setAppKeyCmd() {
|
|
|
6469
6066
|
appKey = ans.appKey;
|
|
6470
6067
|
}
|
|
6471
6068
|
if (!appKey) {
|
|
6472
|
-
console.log(
|
|
6069
|
+
console.log(import_chalk9.default.red("AppKey not provided."));
|
|
6473
6070
|
return;
|
|
6474
6071
|
}
|
|
6475
6072
|
const saved = setAuthToken(appKey);
|
|
6476
|
-
console.log(
|
|
6073
|
+
console.log(import_chalk9.default.green(`Auth set for address: ${saved.address}`));
|
|
6477
6074
|
const deviceId = getDeviceId();
|
|
6478
6075
|
const ok = await bindAnonymousDevice(deviceId);
|
|
6479
6076
|
if (ok) {
|
|
6480
|
-
console.log(
|
|
6077
|
+
console.log(import_chalk9.default.green("Anonymous history merged to current account."));
|
|
6481
6078
|
} else {
|
|
6482
|
-
console.log(
|
|
6079
|
+
console.log(import_chalk9.default.yellow("Anonymous history merge not confirmed. You may retry later."));
|
|
6483
6080
|
}
|
|
6484
6081
|
} catch (e) {
|
|
6485
|
-
console.log(
|
|
6082
|
+
console.log(import_chalk9.default.red(`Failed to set AppKey: ${(e == null ? void 0 : e.message) || e}`));
|
|
6486
6083
|
}
|
|
6487
6084
|
}
|
|
6488
6085
|
|
|
6489
6086
|
// bin/logout.ts
|
|
6490
|
-
var
|
|
6491
|
-
var
|
|
6087
|
+
var import_chalk10 = __toESM(require("chalk"));
|
|
6088
|
+
var import_inquirer6 = __toESM(require("inquirer"));
|
|
6492
6089
|
async function logoutCmd() {
|
|
6493
6090
|
try {
|
|
6494
6091
|
const auth = getAuthConfig();
|
|
6495
6092
|
if (!auth) {
|
|
6496
|
-
console.log(
|
|
6093
|
+
console.log(import_chalk10.default.yellow("No active session found. You are already logged out."));
|
|
6497
6094
|
return;
|
|
6498
6095
|
}
|
|
6499
|
-
const answer = await
|
|
6096
|
+
const answer = await import_inquirer6.default.prompt([
|
|
6500
6097
|
{
|
|
6501
6098
|
type: "confirm",
|
|
6502
6099
|
name: "confirm",
|
|
@@ -6505,74 +6102,74 @@ async function logoutCmd() {
|
|
|
6505
6102
|
}
|
|
6506
6103
|
]);
|
|
6507
6104
|
if (!answer.confirm) {
|
|
6508
|
-
console.log(
|
|
6105
|
+
console.log(import_chalk10.default.blue("Logout cancelled."));
|
|
6509
6106
|
return;
|
|
6510
6107
|
}
|
|
6511
6108
|
clearAuthToken();
|
|
6512
|
-
console.log(
|
|
6513
|
-
console.log(
|
|
6109
|
+
console.log(import_chalk10.default.green("Successfully logged out."));
|
|
6110
|
+
console.log(import_chalk10.default.gray(`Address ${auth.address} has been removed from local storage.`));
|
|
6514
6111
|
} catch (e) {
|
|
6515
|
-
console.log(
|
|
6112
|
+
console.log(import_chalk10.default.red(`Failed to logout: ${(e == null ? void 0 : e.message) || e}`));
|
|
6516
6113
|
}
|
|
6517
6114
|
}
|
|
6518
6115
|
|
|
6519
6116
|
// bin/show-appkey.ts
|
|
6520
|
-
var
|
|
6117
|
+
var import_chalk11 = __toESM(require("chalk"));
|
|
6521
6118
|
function showAppKeyCmd() {
|
|
6522
6119
|
try {
|
|
6523
6120
|
const auth = getAuthConfig();
|
|
6524
6121
|
if (!auth) {
|
|
6525
|
-
console.log(
|
|
6526
|
-
console.log(
|
|
6122
|
+
console.log(import_chalk11.default.yellow("No AppKey found. Please set your AppKey first."));
|
|
6123
|
+
console.log(import_chalk11.default.gray("Run: pinme set-appkey <AppKey>"));
|
|
6527
6124
|
return;
|
|
6528
6125
|
}
|
|
6529
|
-
console.log(
|
|
6530
|
-
console.log(
|
|
6126
|
+
console.log(import_chalk11.default.green("Current AppKey Information:"));
|
|
6127
|
+
console.log(import_chalk11.default.cyan(` Address: ${auth.address}`));
|
|
6531
6128
|
const token = auth.token;
|
|
6532
6129
|
if (token.length > 12) {
|
|
6533
6130
|
const maskedToken = `${token.substring(0, 8)}${"*".repeat(token.length - 12)}${token.substring(token.length - 4)}`;
|
|
6534
|
-
console.log(
|
|
6131
|
+
console.log(import_chalk11.default.cyan(` Token: ${maskedToken}`));
|
|
6535
6132
|
} else {
|
|
6536
|
-
console.log(
|
|
6133
|
+
console.log(import_chalk11.default.cyan(` Token: ${"*".repeat(token.length)}`));
|
|
6537
6134
|
}
|
|
6538
6135
|
const combined = `${auth.address}-${auth.token}`;
|
|
6539
6136
|
if (combined.length > 20) {
|
|
6540
6137
|
const maskedAppKey = `${combined.substring(0, 12)}${"*".repeat(combined.length - 16)}${combined.substring(combined.length - 4)}`;
|
|
6541
|
-
console.log(
|
|
6138
|
+
console.log(import_chalk11.default.cyan(` AppKey: ${maskedAppKey}`));
|
|
6542
6139
|
} else {
|
|
6543
|
-
console.log(
|
|
6140
|
+
console.log(import_chalk11.default.cyan(` AppKey: ${"*".repeat(combined.length)}`));
|
|
6544
6141
|
}
|
|
6545
6142
|
} catch (e) {
|
|
6546
|
-
console.log(
|
|
6143
|
+
console.log(import_chalk11.default.red(`Failed to show AppKey: ${(e == null ? void 0 : e.message) || e}`));
|
|
6547
6144
|
}
|
|
6548
6145
|
}
|
|
6549
6146
|
|
|
6550
6147
|
// bin/my-domains.ts
|
|
6551
|
-
var
|
|
6148
|
+
var import_chalk12 = __toESM(require("chalk"));
|
|
6552
6149
|
var import_dayjs2 = __toESM(require("dayjs"));
|
|
6553
6150
|
async function myDomainsCmd() {
|
|
6554
6151
|
try {
|
|
6555
6152
|
const list = await getMyDomains();
|
|
6556
6153
|
if (!list.length) {
|
|
6557
|
-
console.log(
|
|
6154
|
+
console.log(import_chalk12.default.yellow("No bound domains found."));
|
|
6558
6155
|
return;
|
|
6559
6156
|
}
|
|
6560
|
-
console.log(
|
|
6561
|
-
console.log(
|
|
6157
|
+
console.log(import_chalk12.default.cyan("My domains:"));
|
|
6158
|
+
console.log(import_chalk12.default.cyan("-".repeat(80)));
|
|
6562
6159
|
list.forEach((item, i) => {
|
|
6563
|
-
console.log(
|
|
6564
|
-
console.log(
|
|
6160
|
+
console.log(import_chalk12.default.green(`${i + 1}. ${item.domain_name}`));
|
|
6161
|
+
console.log(import_chalk12.default.white(` Type: ${item.domain_type}`));
|
|
6565
6162
|
if (item.bind_time) {
|
|
6566
|
-
console.log(
|
|
6163
|
+
console.log(import_chalk12.default.white(` Bind time: ${(0, import_dayjs2.default)(item.bind_time * 1e3).format("YYYY-MM-DD HH:mm:ss")}`));
|
|
6567
6164
|
}
|
|
6568
6165
|
if (typeof item.expire_time === "number") {
|
|
6569
6166
|
const label = item.expire_time === 0 ? "Never" : (0, import_dayjs2.default)(item.expire_time * 1e3).format("YYYY-MM-DD HH:mm:ss");
|
|
6570
|
-
console.log(
|
|
6167
|
+
console.log(import_chalk12.default.white(` Expire time: ${label}`));
|
|
6571
6168
|
}
|
|
6572
|
-
console.log(
|
|
6169
|
+
console.log(import_chalk12.default.cyan("-".repeat(80)));
|
|
6573
6170
|
});
|
|
6574
6171
|
} catch (e) {
|
|
6575
|
-
console.log(
|
|
6172
|
+
console.log(import_chalk12.default.red(`Failed to fetch domains: ${(e == null ? void 0 : e.message) || e}`));
|
|
6576
6173
|
}
|
|
6577
6174
|
}
|
|
6578
6175
|
|
|
@@ -6581,16 +6178,17 @@ import_dotenv.default.config();
|
|
|
6581
6178
|
checkNodeVersion();
|
|
6582
6179
|
function showBanner() {
|
|
6583
6180
|
console.log(
|
|
6584
|
-
|
|
6181
|
+
import_chalk13.default.cyan(import_figlet5.default.textSync("Pinme", { horizontalLayout: "full" }))
|
|
6585
6182
|
);
|
|
6586
|
-
console.log(
|
|
6183
|
+
console.log(import_chalk13.default.cyan("A command-line tool for uploading files to IPFS\n"));
|
|
6587
6184
|
}
|
|
6588
6185
|
var program = new import_commander.Command();
|
|
6589
6186
|
program.name("pinme").version(version).option("-v, --version", "output the current version");
|
|
6590
6187
|
program.command("upload").description(
|
|
6591
6188
|
"upload a file or directory to IPFS. Supports --domain to bind after upload"
|
|
6592
6189
|
).option("-d, --domain <name>", "Pinme subdomain").action(() => upload_default());
|
|
6593
|
-
program.command("import").description("import a CAR file to IPFS. Supports --domain to bind after import").option("-d, --domain <name>", "Pinme subdomain").action(() =>
|
|
6190
|
+
program.command("import").description("import a CAR file to IPFS. Supports --domain to bind after import").option("-d, --domain <name>", "Pinme subdomain").action(() => importCar_default());
|
|
6191
|
+
program.command("export").description("export IPFS content as CAR file").option("-o, --output <path>", "output file path for CAR file").action(() => exportCar_default());
|
|
6594
6192
|
program.command("rm").description("remove a file from IPFS network").action(() => remove_default());
|
|
6595
6193
|
program.command("set-appkey").description(
|
|
6596
6194
|
"Set AppKey for authentication, and auto-merge anonymous history"
|
|
@@ -6632,6 +6230,7 @@ program.on("--help", () => {
|
|
|
6632
6230
|
console.log(" $ pinme upload <path> --domain <name>");
|
|
6633
6231
|
console.log(" $ pinme import");
|
|
6634
6232
|
console.log(" $ pinme import <path> --domain <name>");
|
|
6233
|
+
console.log(" $ pinme export <cid> --output <path>");
|
|
6635
6234
|
console.log(" $ pinme rm <hash>");
|
|
6636
6235
|
console.log(" $ pinme set-appkey <AppKey>");
|
|
6637
6236
|
console.log(" $ pinme show-appkey");
|