@zuplo/cli 6.70.70 → 6.71.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/node_modules/@types/node/README.md +1 -1
- package/node_modules/@types/node/http2.d.ts +1 -0
- package/node_modules/@types/node/package.json +2 -2
- package/node_modules/@zuplo/core/package.json +1 -1
- package/node_modules/@zuplo/graphql/package.json +1 -1
- package/node_modules/@zuplo/openapi-tools/package.json +1 -1
- package/node_modules/@zuplo/otel/package.json +1 -1
- package/node_modules/@zuplo/runtime/out/esm/{chunk-GEVKFSKR.js → chunk-AZIRK6TC.js} +1 -1
- package/node_modules/@zuplo/runtime/out/esm/{chunk-GEVKFSKR.js.map → chunk-AZIRK6TC.js.map} +1 -1
- package/node_modules/@zuplo/runtime/out/esm/{chunk-MJPI3GFA.js → chunk-E7U425SB.js} +72 -72
- package/node_modules/@zuplo/runtime/out/esm/chunk-E7U425SB.js.map +1 -0
- package/node_modules/@zuplo/runtime/out/esm/index.js +1 -1
- package/node_modules/@zuplo/runtime/out/esm/index.js.map +1 -1
- package/node_modules/@zuplo/runtime/out/esm/mcp-gateway/index.js +7 -7
- package/node_modules/@zuplo/runtime/out/esm/mcp-gateway/index.js.map +1 -1
- package/node_modules/@zuplo/runtime/out/esm/mocks/index.js +1 -1
- package/node_modules/@zuplo/runtime/out/types/index.d.ts +61 -0
- package/node_modules/@zuplo/runtime/package.json +1 -1
- package/node_modules/acorn/CHANGELOG.md +14 -0
- package/node_modules/acorn/README.md +3 -0
- package/node_modules/acorn/dist/acorn.d.mts +6 -0
- package/node_modules/acorn/dist/acorn.d.ts +6 -0
- package/node_modules/acorn/dist/acorn.js +87 -49
- package/node_modules/acorn/dist/acorn.mjs +87 -49
- package/node_modules/acorn/package.json +2 -2
- package/node_modules/axios/CHANGELOG.md +52 -1
- package/node_modules/axios/README.md +30 -2
- package/node_modules/axios/dist/axios.js +350 -134
- package/node_modules/axios/dist/axios.min.js +3 -3
- package/node_modules/axios/dist/axios.min.js.map +1 -1
- package/node_modules/axios/dist/browser/axios.cjs +355 -90
- package/node_modules/axios/dist/esm/axios.js +355 -90
- package/node_modules/axios/dist/esm/axios.min.js +2 -2
- package/node_modules/axios/dist/esm/axios.min.js.map +1 -1
- package/node_modules/axios/dist/node/axios.cjs +399 -104
- package/node_modules/axios/index.d.cts +2 -0
- package/node_modules/axios/index.d.ts +2 -0
- package/node_modules/axios/lib/adapters/fetch.js +113 -37
- package/node_modules/axios/lib/adapters/http.js +132 -43
- package/node_modules/axios/lib/core/Axios.js +3 -2
- package/node_modules/axios/lib/core/AxiosHeaders.js +10 -7
- package/node_modules/axios/lib/core/buildFullPath.js +29 -1
- package/node_modules/axios/lib/core/mergeConfig.js +34 -0
- package/node_modules/axios/lib/defaults/transitional.js +1 -0
- package/node_modules/axios/lib/env/data.js +1 -1
- package/node_modules/axios/lib/helpers/buildURL.js +5 -3
- package/node_modules/axios/lib/helpers/estimateDataURLDecodedBytes.js +16 -11
- package/node_modules/axios/lib/helpers/formDataToJSON.js +25 -3
- package/node_modules/axios/lib/helpers/resolveConfig.js +5 -3
- package/node_modules/axios/lib/helpers/shouldBypassProxy.js +33 -1
- package/node_modules/axios/lib/helpers/toFormData.js +40 -10
- package/node_modules/axios/lib/utils.js +75 -11
- package/node_modules/axios/package.json +1 -1
- package/node_modules/form-data/CHANGELOG.md +29 -2
- package/node_modules/form-data/README.md +4 -4
- package/node_modules/form-data/lib/form_data.js +14 -2
- package/node_modules/form-data/package.json +7 -7
- package/node_modules/protobufjs/dist/light/protobuf.js +145 -188
- package/node_modules/protobufjs/dist/light/protobuf.js.map +1 -1
- package/node_modules/protobufjs/dist/light/protobuf.min.js +3 -3
- package/node_modules/protobufjs/dist/light/protobuf.min.js.map +1 -1
- package/node_modules/protobufjs/dist/minimal/protobuf.js +33 -76
- package/node_modules/protobufjs/dist/minimal/protobuf.js.map +1 -1
- package/node_modules/protobufjs/dist/minimal/protobuf.min.js +3 -3
- package/node_modules/protobufjs/dist/minimal/protobuf.min.js.map +1 -1
- package/node_modules/protobufjs/dist/protobuf.js +165 -208
- package/node_modules/protobufjs/dist/protobuf.js.map +1 -1
- package/node_modules/protobufjs/dist/protobuf.min.js +3 -3
- package/node_modules/protobufjs/dist/protobuf.min.js.map +1 -1
- package/node_modules/protobufjs/index.d.ts +0 -8
- package/node_modules/protobufjs/package.json +2 -3
- package/node_modules/protobufjs/src/util/minimal.js +0 -3
- package/package.json +6 -6
- package/node_modules/@protobufjs/inquire/CHANGELOG.md +0 -8
- package/node_modules/@protobufjs/inquire/LICENSE +0 -26
- package/node_modules/@protobufjs/inquire/README.md +0 -13
- package/node_modules/@protobufjs/inquire/index.d.ts +0 -10
- package/node_modules/@protobufjs/inquire/index.js +0 -38
- package/node_modules/@protobufjs/inquire/package.json +0 -21
- package/node_modules/@protobufjs/inquire/tests/data/array.js +0 -1
- package/node_modules/@protobufjs/inquire/tests/data/emptyArray.js +0 -1
- package/node_modules/@protobufjs/inquire/tests/data/emptyObject.js +0 -1
- package/node_modules/@protobufjs/inquire/tests/data/object.js +0 -1
- package/node_modules/@protobufjs/inquire/tests/index.js +0 -20
- package/node_modules/@zuplo/runtime/out/esm/chunk-MJPI3GFA.js.map +0 -1
- /package/node_modules/@zuplo/runtime/out/esm/{chunk-MJPI3GFA.js.LEGAL.txt → chunk-E7U425SB.js.LEGAL.txt} +0 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! Axios v1.
|
|
1
|
+
/*! Axios v1.18.0 Copyright (c) 2026 Matt Zabriskie and contributors */
|
|
2
2
|
(function (global, factory) {
|
|
3
3
|
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
|
|
4
4
|
typeof define === 'function' && define.amd ? define(factory) :
|
|
@@ -463,55 +463,42 @@
|
|
|
463
463
|
};
|
|
464
464
|
}
|
|
465
465
|
function AsyncGenerator(e) {
|
|
466
|
-
var
|
|
467
|
-
function resume(
|
|
466
|
+
var t, n;
|
|
467
|
+
function resume(t, n) {
|
|
468
468
|
try {
|
|
469
|
-
var
|
|
470
|
-
o =
|
|
469
|
+
var r = e[t](n),
|
|
470
|
+
o = r.value,
|
|
471
471
|
u = o instanceof _OverloadYield;
|
|
472
|
-
Promise.resolve(u ? o.v : o).then(function (
|
|
472
|
+
Promise.resolve(u ? o.v : o).then(function (n) {
|
|
473
473
|
if (u) {
|
|
474
|
-
var i = "return" ===
|
|
475
|
-
if (!o.k ||
|
|
476
|
-
|
|
474
|
+
var i = "return" === t && o.k ? t : "next";
|
|
475
|
+
if (!o.k || n.done) return resume(i, n);
|
|
476
|
+
n = e[i](n).value;
|
|
477
477
|
}
|
|
478
|
-
settle(
|
|
478
|
+
settle(!!r.done, n);
|
|
479
479
|
}, function (e) {
|
|
480
480
|
resume("throw", e);
|
|
481
481
|
});
|
|
482
482
|
} catch (e) {
|
|
483
|
-
settle(
|
|
483
|
+
settle(2, e);
|
|
484
484
|
}
|
|
485
485
|
}
|
|
486
|
-
function settle(e,
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
done: true
|
|
492
|
-
});
|
|
493
|
-
break;
|
|
494
|
-
case "throw":
|
|
495
|
-
r.reject(n);
|
|
496
|
-
break;
|
|
497
|
-
default:
|
|
498
|
-
r.resolve({
|
|
499
|
-
value: n,
|
|
500
|
-
done: false
|
|
501
|
-
});
|
|
502
|
-
}
|
|
503
|
-
(r = r.next) ? resume(r.key, r.arg) : t = null;
|
|
486
|
+
function settle(e, r) {
|
|
487
|
+
2 === e ? t.reject(r) : t.resolve({
|
|
488
|
+
value: r,
|
|
489
|
+
done: e
|
|
490
|
+
}), (t = t.next) ? resume(t.key, t.arg) : n = null;
|
|
504
491
|
}
|
|
505
|
-
this._invoke = function (e,
|
|
492
|
+
this._invoke = function (e, r) {
|
|
506
493
|
return new Promise(function (o, u) {
|
|
507
494
|
var i = {
|
|
508
495
|
key: e,
|
|
509
|
-
arg:
|
|
496
|
+
arg: r,
|
|
510
497
|
resolve: o,
|
|
511
498
|
reject: u,
|
|
512
499
|
next: null
|
|
513
500
|
};
|
|
514
|
-
|
|
501
|
+
n ? n = n.next = i : (t = n = i, resume(e, r));
|
|
515
502
|
});
|
|
516
503
|
}, "function" != typeof e.return && (this.return = void 0);
|
|
517
504
|
}
|
|
@@ -566,6 +553,57 @@
|
|
|
566
553
|
var getPrototypeOf = Object.getPrototypeOf;
|
|
567
554
|
var iterator = Symbol.iterator,
|
|
568
555
|
toStringTag = Symbol.toStringTag;
|
|
556
|
+
|
|
557
|
+
/* Creating a function that will check if an object has a property. */
|
|
558
|
+
var hasOwnProperty = function (_ref) {
|
|
559
|
+
var hasOwnProperty = _ref.hasOwnProperty;
|
|
560
|
+
return function (obj, prop) {
|
|
561
|
+
return hasOwnProperty.call(obj, prop);
|
|
562
|
+
};
|
|
563
|
+
}(Object.prototype);
|
|
564
|
+
|
|
565
|
+
/**
|
|
566
|
+
* Walk the prototype chain (excluding the shared Object.prototype) looking for
|
|
567
|
+
* an own `prop`. This distinguishes genuine own/inherited members — including
|
|
568
|
+
* class accessors and template prototypes — from members injected via
|
|
569
|
+
* Object.prototype pollution (e.g. `Object.prototype.username = '...'`), which
|
|
570
|
+
* live on Object.prototype itself and are therefore never matched.
|
|
571
|
+
*
|
|
572
|
+
* @param {*} thing The value whose chain to inspect
|
|
573
|
+
* @param {string|symbol} prop The property key to look for
|
|
574
|
+
*
|
|
575
|
+
* @returns {boolean} True when `prop` is owned below Object.prototype
|
|
576
|
+
*/
|
|
577
|
+
var hasOwnInPrototypeChain = function hasOwnInPrototypeChain(thing, prop) {
|
|
578
|
+
var obj = thing;
|
|
579
|
+
var seen = [];
|
|
580
|
+
while (obj != null && obj !== Object.prototype) {
|
|
581
|
+
if (seen.indexOf(obj) !== -1) {
|
|
582
|
+
return false;
|
|
583
|
+
}
|
|
584
|
+
seen.push(obj);
|
|
585
|
+
if (hasOwnProperty(obj, prop)) {
|
|
586
|
+
return true;
|
|
587
|
+
}
|
|
588
|
+
obj = getPrototypeOf(obj);
|
|
589
|
+
}
|
|
590
|
+
return false;
|
|
591
|
+
};
|
|
592
|
+
|
|
593
|
+
/**
|
|
594
|
+
* Read `obj[prop]` only when it is safe from Object.prototype pollution. Own
|
|
595
|
+
* properties and members inherited from a non-Object.prototype source (a class
|
|
596
|
+
* instance or template object) are honored; a value reachable only through a
|
|
597
|
+
* polluted Object.prototype is ignored and `undefined` is returned.
|
|
598
|
+
*
|
|
599
|
+
* @param {*} obj The source object
|
|
600
|
+
* @param {string|symbol} prop The property key to read
|
|
601
|
+
*
|
|
602
|
+
* @returns {*} The resolved value, or undefined when unsafe/absent
|
|
603
|
+
*/
|
|
604
|
+
var getSafeProp = function getSafeProp(obj, prop) {
|
|
605
|
+
return obj != null && hasOwnInPrototypeChain(obj, prop) ? obj[prop] : undefined;
|
|
606
|
+
};
|
|
569
607
|
var kindOf = function (cache) {
|
|
570
608
|
return function (thing) {
|
|
571
609
|
var str = toString.call(thing);
|
|
@@ -694,11 +732,15 @@
|
|
|
694
732
|
* @returns {boolean} True if value is a plain Object, otherwise false
|
|
695
733
|
*/
|
|
696
734
|
var isPlainObject = function isPlainObject(val) {
|
|
697
|
-
if (
|
|
735
|
+
if (!isObject(val)) {
|
|
698
736
|
return false;
|
|
699
737
|
}
|
|
700
738
|
var prototype = getPrototypeOf(val);
|
|
701
|
-
return (prototype === null || prototype === Object.prototype ||
|
|
739
|
+
return (prototype === null || prototype === Object.prototype || getPrototypeOf(prototype) === null) &&
|
|
740
|
+
// Treat any genuine (non-Object.prototype-polluted) Symbol.toStringTag or
|
|
741
|
+
// Symbol.iterator as evidence the value is a tagged/iterable type rather
|
|
742
|
+
// than a plain object, while ignoring keys injected onto Object.prototype.
|
|
743
|
+
!hasOwnInPrototypeChain(val, toStringTag) && !hasOwnInPrototypeChain(val, iterator);
|
|
702
744
|
};
|
|
703
745
|
|
|
704
746
|
/**
|
|
@@ -866,9 +908,9 @@
|
|
|
866
908
|
* @returns {any}
|
|
867
909
|
*/
|
|
868
910
|
function forEach(obj, fn) {
|
|
869
|
-
var
|
|
870
|
-
|
|
871
|
-
allOwnKeys =
|
|
911
|
+
var _ref2 = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {},
|
|
912
|
+
_ref2$allOwnKeys = _ref2.allOwnKeys,
|
|
913
|
+
allOwnKeys = _ref2$allOwnKeys === void 0 ? false : _ref2$allOwnKeys;
|
|
872
914
|
// Don't bother if no value provided
|
|
873
915
|
if (obj === null || typeof obj === 'undefined') {
|
|
874
916
|
return;
|
|
@@ -955,9 +997,9 @@
|
|
|
955
997
|
* @returns {Object} Result of all merge properties
|
|
956
998
|
*/
|
|
957
999
|
function merge() {
|
|
958
|
-
var
|
|
959
|
-
caseless =
|
|
960
|
-
skipUndefined =
|
|
1000
|
+
var _ref3 = isContextDefined(this) && this || {},
|
|
1001
|
+
caseless = _ref3.caseless,
|
|
1002
|
+
skipUndefined = _ref3.skipUndefined;
|
|
961
1003
|
var result = {};
|
|
962
1004
|
var assignValue = function assignValue(val, key) {
|
|
963
1005
|
// Skip dangerous property names to prevent prototype pollution
|
|
@@ -1014,8 +1056,8 @@
|
|
|
1014
1056
|
* @returns {Object} The resulting value of object a
|
|
1015
1057
|
*/
|
|
1016
1058
|
var extend = function extend(a, b, thisArg) {
|
|
1017
|
-
var
|
|
1018
|
-
allOwnKeys =
|
|
1059
|
+
var _ref4 = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {},
|
|
1060
|
+
allOwnKeys = _ref4.allOwnKeys;
|
|
1019
1061
|
forEach(b, function (val, key) {
|
|
1020
1062
|
if (thisArg && isFunction$1(val)) {
|
|
1021
1063
|
Object.defineProperty(a, key, {
|
|
@@ -1209,14 +1251,6 @@
|
|
|
1209
1251
|
return p1.toUpperCase() + p2;
|
|
1210
1252
|
});
|
|
1211
1253
|
};
|
|
1212
|
-
|
|
1213
|
-
/* Creating a function that will check if an object has a property. */
|
|
1214
|
-
var hasOwnProperty = function (_ref4) {
|
|
1215
|
-
var hasOwnProperty = _ref4.hasOwnProperty;
|
|
1216
|
-
return function (obj, prop) {
|
|
1217
|
-
return hasOwnProperty.call(obj, prop);
|
|
1218
|
-
};
|
|
1219
|
-
}(Object.prototype);
|
|
1220
1254
|
var propertyIsEnumerable = Object.prototype.propertyIsEnumerable;
|
|
1221
1255
|
|
|
1222
1256
|
/**
|
|
@@ -1397,6 +1431,21 @@
|
|
|
1397
1431
|
var isIterable = function isIterable(thing) {
|
|
1398
1432
|
return thing != null && isFunction$1(thing[iterator]);
|
|
1399
1433
|
};
|
|
1434
|
+
|
|
1435
|
+
/**
|
|
1436
|
+
* Determine if a value is iterable via an iterator that is NOT sourced solely
|
|
1437
|
+
* from a polluted Object.prototype. Use this instead of `isIterable` whenever
|
|
1438
|
+
* the iterable comes from untrusted input (e.g. user-supplied header sources),
|
|
1439
|
+
* so `Object.prototype[Symbol.iterator] = ...` cannot turn an ordinary object
|
|
1440
|
+
* into an attacker-controlled entries iterator.
|
|
1441
|
+
*
|
|
1442
|
+
* @param {*} thing The value to test
|
|
1443
|
+
*
|
|
1444
|
+
* @returns {boolean} True if value has a non-polluted iterator
|
|
1445
|
+
*/
|
|
1446
|
+
var isSafeIterable = function isSafeIterable(thing) {
|
|
1447
|
+
return thing != null && hasOwnInPrototypeChain(thing, iterator) && isIterable(thing);
|
|
1448
|
+
};
|
|
1400
1449
|
var utils$1 = {
|
|
1401
1450
|
isArray: isArray,
|
|
1402
1451
|
isArrayBuffer: isArrayBuffer,
|
|
@@ -1442,6 +1491,8 @@
|
|
|
1442
1491
|
hasOwnProperty: hasOwnProperty,
|
|
1443
1492
|
hasOwnProp: hasOwnProperty,
|
|
1444
1493
|
// an alias to avoid ESLint no-prototype-builtins detection
|
|
1494
|
+
hasOwnInPrototypeChain: hasOwnInPrototypeChain,
|
|
1495
|
+
getSafeProp: getSafeProp,
|
|
1445
1496
|
reduceDescriptors: reduceDescriptors,
|
|
1446
1497
|
freezeMethods: freezeMethods,
|
|
1447
1498
|
toObjectSet: toObjectSet,
|
|
@@ -1457,7 +1508,8 @@
|
|
|
1457
1508
|
isThenable: isThenable,
|
|
1458
1509
|
setImmediate: _setImmediate,
|
|
1459
1510
|
asap: asap,
|
|
1460
|
-
isIterable: isIterable
|
|
1511
|
+
isIterable: isIterable,
|
|
1512
|
+
isSafeIterable: isSafeIterable
|
|
1461
1513
|
};
|
|
1462
1514
|
|
|
1463
1515
|
// RawAxiosHeaders whose duplicates are ignored by node
|
|
@@ -1634,8 +1686,8 @@
|
|
|
1634
1686
|
setHeaders(header, valueOrRewrite);
|
|
1635
1687
|
} else if (utils$1.isString(header) && (header = header.trim()) && !isValidHeaderName(header)) {
|
|
1636
1688
|
setHeaders(parseHeaders(header), valueOrRewrite);
|
|
1637
|
-
} else if (utils$1.isObject(header) && utils$1.
|
|
1638
|
-
var obj =
|
|
1689
|
+
} else if (utils$1.isObject(header) && utils$1.isSafeIterable(header)) {
|
|
1690
|
+
var obj = Object.create(null),
|
|
1639
1691
|
dest,
|
|
1640
1692
|
key;
|
|
1641
1693
|
var _iterator = _createForOfIteratorHelper(header),
|
|
@@ -1646,7 +1698,13 @@
|
|
|
1646
1698
|
if (!utils$1.isArray(entry)) {
|
|
1647
1699
|
throw new TypeError('Object iterator must return a key-value pair');
|
|
1648
1700
|
}
|
|
1649
|
-
|
|
1701
|
+
key = entry[0];
|
|
1702
|
+
if (utils$1.hasOwnProp(obj, key)) {
|
|
1703
|
+
dest = obj[key];
|
|
1704
|
+
obj[key] = utils$1.isArray(dest) ? [].concat(_toConsumableArray(dest), [entry[1]]) : [dest, entry[1]];
|
|
1705
|
+
} else {
|
|
1706
|
+
obj[key] = entry[1];
|
|
1707
|
+
}
|
|
1650
1708
|
}
|
|
1651
1709
|
} catch (err) {
|
|
1652
1710
|
_iterator.e(err);
|
|
@@ -2012,6 +2070,10 @@
|
|
|
2012
2070
|
// eslint-disable-next-line strict
|
|
2013
2071
|
var httpAdapter = null;
|
|
2014
2072
|
|
|
2073
|
+
// Default nesting limit shared with the inverse transform (formDataToJSON) so
|
|
2074
|
+
// the FormData <-> JSON round-trip stays symmetric.
|
|
2075
|
+
var DEFAULT_FORM_DATA_MAX_DEPTH = 100;
|
|
2076
|
+
|
|
2015
2077
|
/**
|
|
2016
2078
|
* Determines if the given thing is a array or js object.
|
|
2017
2079
|
*
|
|
@@ -2112,8 +2174,9 @@
|
|
|
2112
2174
|
var dots = options.dots;
|
|
2113
2175
|
var indexes = options.indexes;
|
|
2114
2176
|
var _Blob = options.Blob || typeof Blob !== 'undefined' && Blob;
|
|
2115
|
-
var maxDepth = options.maxDepth === undefined ?
|
|
2177
|
+
var maxDepth = options.maxDepth === undefined ? DEFAULT_FORM_DATA_MAX_DEPTH : options.maxDepth;
|
|
2116
2178
|
var useBlob = _Blob && utils$1.isSpecCompliantForm(formData);
|
|
2179
|
+
var stack = [];
|
|
2117
2180
|
if (!utils$1.isFunction(visitor)) {
|
|
2118
2181
|
throw new TypeError('visitor must be a function');
|
|
2119
2182
|
}
|
|
@@ -2133,6 +2196,28 @@
|
|
|
2133
2196
|
}
|
|
2134
2197
|
return value;
|
|
2135
2198
|
}
|
|
2199
|
+
function throwIfMaxDepthExceeded(depth) {
|
|
2200
|
+
if (depth > maxDepth) {
|
|
2201
|
+
throw new AxiosError('Object is too deeply nested (' + depth + ' levels). Max depth: ' + maxDepth, AxiosError.ERR_FORM_DATA_DEPTH_EXCEEDED);
|
|
2202
|
+
}
|
|
2203
|
+
}
|
|
2204
|
+
function stringifyWithDepthLimit(value, depth) {
|
|
2205
|
+
if (maxDepth === Infinity) {
|
|
2206
|
+
return JSON.stringify(value);
|
|
2207
|
+
}
|
|
2208
|
+
var ancestors = [];
|
|
2209
|
+
return JSON.stringify(value, function limitDepth(_key, currentValue) {
|
|
2210
|
+
if (!utils$1.isObject(currentValue)) {
|
|
2211
|
+
return currentValue;
|
|
2212
|
+
}
|
|
2213
|
+
while (ancestors.length && ancestors[ancestors.length - 1] !== this) {
|
|
2214
|
+
ancestors.pop();
|
|
2215
|
+
}
|
|
2216
|
+
ancestors.push(currentValue);
|
|
2217
|
+
throwIfMaxDepthExceeded(depth + ancestors.length - 1);
|
|
2218
|
+
return currentValue;
|
|
2219
|
+
});
|
|
2220
|
+
}
|
|
2136
2221
|
|
|
2137
2222
|
/**
|
|
2138
2223
|
* Default visitor.
|
|
@@ -2155,7 +2240,7 @@
|
|
|
2155
2240
|
// eslint-disable-next-line no-param-reassign
|
|
2156
2241
|
key = metaTokens ? key : key.slice(0, -2);
|
|
2157
2242
|
// eslint-disable-next-line no-param-reassign
|
|
2158
|
-
value =
|
|
2243
|
+
value = stringifyWithDepthLimit(value, 1);
|
|
2159
2244
|
} else if (utils$1.isArray(value) && isFlatArray(value) || (utils$1.isFileList(value) || utils$1.endsWith(key, '[]')) && (arr = utils$1.toArray(value))) {
|
|
2160
2245
|
// eslint-disable-next-line no-param-reassign
|
|
2161
2246
|
key = removeBrackets(key);
|
|
@@ -2173,7 +2258,6 @@
|
|
|
2173
2258
|
formData.append(renderKey(path, key, dots), convertValue(value));
|
|
2174
2259
|
return false;
|
|
2175
2260
|
}
|
|
2176
|
-
var stack = [];
|
|
2177
2261
|
var exposedHelpers = Object.assign(predicates, {
|
|
2178
2262
|
defaultVisitor: defaultVisitor,
|
|
2179
2263
|
convertValue: convertValue,
|
|
@@ -2182,9 +2266,7 @@
|
|
|
2182
2266
|
function build(value, path) {
|
|
2183
2267
|
var depth = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 0;
|
|
2184
2268
|
if (utils$1.isUndefined(value)) return;
|
|
2185
|
-
|
|
2186
|
-
throw new AxiosError('Object is too deeply nested (' + depth + ' levels). Max depth: ' + maxDepth, AxiosError.ERR_FORM_DATA_DEPTH_EXCEEDED);
|
|
2187
|
-
}
|
|
2269
|
+
throwIfMaxDepthExceeded(depth);
|
|
2188
2270
|
if (stack.indexOf(value) !== -1) {
|
|
2189
2271
|
throw new Error('Circular reference detected in ' + path.join('.'));
|
|
2190
2272
|
}
|
|
@@ -2276,11 +2358,15 @@
|
|
|
2276
2358
|
if (!params) {
|
|
2277
2359
|
return url;
|
|
2278
2360
|
}
|
|
2279
|
-
var _encode = options && options.encode || encode;
|
|
2280
2361
|
var _options = utils$1.isFunction(options) ? {
|
|
2281
2362
|
serialize: options
|
|
2282
2363
|
} : options;
|
|
2283
|
-
|
|
2364
|
+
|
|
2365
|
+
// Read serializer options pollution-safely: own properties and methods on a
|
|
2366
|
+
// class/template prototype are honored, but values injected onto a polluted
|
|
2367
|
+
// Object.prototype are ignored.
|
|
2368
|
+
var _encode = utils$1.getSafeProp(_options, 'encode') || encode;
|
|
2369
|
+
var serializeFn = utils$1.getSafeProp(_options, 'serialize');
|
|
2284
2370
|
var serializedParams;
|
|
2285
2371
|
if (serializeFn) {
|
|
2286
2372
|
serializedParams = serializeFn(params, _options);
|
|
@@ -2379,7 +2465,8 @@
|
|
|
2379
2465
|
forcedJSONParsing: true,
|
|
2380
2466
|
clarifyTimeoutError: false,
|
|
2381
2467
|
legacyInterceptorReqResOrdering: true,
|
|
2382
|
-
advertiseZstdAcceptEncoding: false
|
|
2468
|
+
advertiseZstdAcceptEncoding: false,
|
|
2469
|
+
validateStatusUndefinedResolves: true
|
|
2383
2470
|
};
|
|
2384
2471
|
|
|
2385
2472
|
var URLSearchParams$1 = typeof URLSearchParams !== 'undefined' ? URLSearchParams : AxiosURLSearchParams;
|
|
@@ -2459,6 +2546,13 @@
|
|
|
2459
2546
|
}, options));
|
|
2460
2547
|
}
|
|
2461
2548
|
|
|
2549
|
+
var MAX_DEPTH = DEFAULT_FORM_DATA_MAX_DEPTH;
|
|
2550
|
+
function throwIfDepthExceeded(index) {
|
|
2551
|
+
if (index > MAX_DEPTH) {
|
|
2552
|
+
throw new AxiosError('FormData field is too deeply nested (' + index + ' levels). Max depth: ' + MAX_DEPTH, AxiosError.ERR_FORM_DATA_DEPTH_EXCEEDED);
|
|
2553
|
+
}
|
|
2554
|
+
}
|
|
2555
|
+
|
|
2462
2556
|
/**
|
|
2463
2557
|
* It takes a string like `foo[x][y][z]` and returns an array like `['foo', 'x', 'y', 'z']
|
|
2464
2558
|
*
|
|
@@ -2471,9 +2565,14 @@
|
|
|
2471
2565
|
// foo.x.y.z
|
|
2472
2566
|
// foo-x-y-z
|
|
2473
2567
|
// foo x y z
|
|
2474
|
-
|
|
2475
|
-
|
|
2476
|
-
|
|
2568
|
+
var path = [];
|
|
2569
|
+
var pattern = /\w+|\[(\w*)]/g;
|
|
2570
|
+
var match;
|
|
2571
|
+
while ((match = pattern.exec(name)) !== null) {
|
|
2572
|
+
throwIfDepthExceeded(path.length);
|
|
2573
|
+
path.push(match[0] === '[]' ? '' : match[1] || match[0]);
|
|
2574
|
+
}
|
|
2575
|
+
return path;
|
|
2477
2576
|
}
|
|
2478
2577
|
|
|
2479
2578
|
/**
|
|
@@ -2505,6 +2604,7 @@
|
|
|
2505
2604
|
*/
|
|
2506
2605
|
function formDataToJSON(formData) {
|
|
2507
2606
|
function buildPath(path, value, target, index) {
|
|
2607
|
+
throwIfDepthExceeded(index);
|
|
2508
2608
|
var name = path[index++];
|
|
2509
2609
|
if (name === '__proto__') return true;
|
|
2510
2610
|
var isNumericKey = Number.isFinite(+name);
|
|
@@ -2952,6 +3052,24 @@
|
|
|
2952
3052
|
return relativeURL ? baseURL.replace(/\/?\/$/, '') + '/' + relativeURL.replace(/^\/+/, '') : baseURL;
|
|
2953
3053
|
}
|
|
2954
3054
|
|
|
3055
|
+
var malformedHttpProtocol = /^https?:(?!\/\/)/i;
|
|
3056
|
+
var httpProtocolControlCharacters = /[\t\n\r]/g;
|
|
3057
|
+
function stripLeadingC0ControlOrSpace(url) {
|
|
3058
|
+
var i = 0;
|
|
3059
|
+
while (i < url.length && url.charCodeAt(i) <= 0x20) {
|
|
3060
|
+
i++;
|
|
3061
|
+
}
|
|
3062
|
+
return url.slice(i);
|
|
3063
|
+
}
|
|
3064
|
+
function normalizeURLForProtocolCheck(url) {
|
|
3065
|
+
return stripLeadingC0ControlOrSpace(url).replace(httpProtocolControlCharacters, '');
|
|
3066
|
+
}
|
|
3067
|
+
function assertValidHttpProtocolURL(url, config) {
|
|
3068
|
+
if (typeof url === 'string' && malformedHttpProtocol.test(normalizeURLForProtocolCheck(url))) {
|
|
3069
|
+
throw new AxiosError('Invalid URL: missing "//" after protocol', AxiosError.ERR_INVALID_URL, config);
|
|
3070
|
+
}
|
|
3071
|
+
}
|
|
3072
|
+
|
|
2955
3073
|
/**
|
|
2956
3074
|
* Creates a new URL by combining the baseURL with the requestedURL,
|
|
2957
3075
|
* only when the requestedURL is not already an absolute URL.
|
|
@@ -2962,9 +3080,11 @@
|
|
|
2962
3080
|
*
|
|
2963
3081
|
* @returns {string} The combined full path
|
|
2964
3082
|
*/
|
|
2965
|
-
function buildFullPath(baseURL, requestedURL, allowAbsoluteUrls) {
|
|
3083
|
+
function buildFullPath(baseURL, requestedURL, allowAbsoluteUrls, config) {
|
|
3084
|
+
assertValidHttpProtocolURL(requestedURL, config);
|
|
2966
3085
|
var isRelativeUrl = !isAbsoluteURL(requestedURL);
|
|
2967
3086
|
if (baseURL && (isRelativeUrl || allowAbsoluteUrls === false)) {
|
|
3087
|
+
assertValidHttpProtocolURL(baseURL, config);
|
|
2968
3088
|
return combineURLs(baseURL, requestedURL);
|
|
2969
3089
|
}
|
|
2970
3090
|
return requestedURL;
|
|
@@ -3036,6 +3156,23 @@
|
|
|
3036
3156
|
return getMergedValue(undefined, a);
|
|
3037
3157
|
}
|
|
3038
3158
|
}
|
|
3159
|
+
function getMergedTransitionalOption(prop) {
|
|
3160
|
+
var transitional2 = utils$1.hasOwnProp(config2, 'transitional') ? config2.transitional : undefined;
|
|
3161
|
+
if (!utils$1.isUndefined(transitional2)) {
|
|
3162
|
+
if (utils$1.isPlainObject(transitional2)) {
|
|
3163
|
+
if (utils$1.hasOwnProp(transitional2, prop)) {
|
|
3164
|
+
return transitional2[prop];
|
|
3165
|
+
}
|
|
3166
|
+
} else {
|
|
3167
|
+
return undefined;
|
|
3168
|
+
}
|
|
3169
|
+
}
|
|
3170
|
+
var transitional1 = utils$1.hasOwnProp(config1, 'transitional') ? config1.transitional : undefined;
|
|
3171
|
+
if (utils$1.isPlainObject(transitional1) && utils$1.hasOwnProp(transitional1, prop)) {
|
|
3172
|
+
return transitional1[prop];
|
|
3173
|
+
}
|
|
3174
|
+
return undefined;
|
|
3175
|
+
}
|
|
3039
3176
|
|
|
3040
3177
|
// eslint-disable-next-line consistent-return
|
|
3041
3178
|
function mergeDirectKeys(a, b, prop) {
|
|
@@ -3087,6 +3224,13 @@
|
|
|
3087
3224
|
var configValue = merge(a, b, prop);
|
|
3088
3225
|
utils$1.isUndefined(configValue) && merge !== mergeDirectKeys || (config[prop] = configValue);
|
|
3089
3226
|
});
|
|
3227
|
+
if (utils$1.hasOwnProp(config2, 'validateStatus') && utils$1.isUndefined(config2.validateStatus) && getMergedTransitionalOption('validateStatusUndefinedResolves') === false) {
|
|
3228
|
+
if (utils$1.hasOwnProp(config1, 'validateStatus')) {
|
|
3229
|
+
config.validateStatus = getMergedValue(undefined, config1.validateStatus);
|
|
3230
|
+
} else {
|
|
3231
|
+
delete config.validateStatus;
|
|
3232
|
+
}
|
|
3233
|
+
}
|
|
3090
3234
|
return config;
|
|
3091
3235
|
}
|
|
3092
3236
|
|
|
@@ -3137,11 +3281,13 @@
|
|
|
3137
3281
|
var allowAbsoluteUrls = own('allowAbsoluteUrls');
|
|
3138
3282
|
var url = own('url');
|
|
3139
3283
|
newConfig.headers = headers = AxiosHeaders.from(headers);
|
|
3140
|
-
newConfig.url = buildURL(buildFullPath(baseURL, url, allowAbsoluteUrls), own('params'), own('paramsSerializer'));
|
|
3284
|
+
newConfig.url = buildURL(buildFullPath(baseURL, url, allowAbsoluteUrls, newConfig), own('params'), own('paramsSerializer'));
|
|
3141
3285
|
|
|
3142
3286
|
// HTTP basic authentication
|
|
3143
3287
|
if (auth) {
|
|
3144
|
-
|
|
3288
|
+
var username = utils$1.getSafeProp(auth, 'username') || '';
|
|
3289
|
+
var password = utils$1.getSafeProp(auth, 'password') || '';
|
|
3290
|
+
headers.set('Authorization', 'Basic ' + btoa(username + ':' + (password ? encodeUTF8$1(password) : '')));
|
|
3145
3291
|
}
|
|
3146
3292
|
if (utils$1.isFormData(data)) {
|
|
3147
3293
|
if (platform.hasStandardBrowserEnv || platform.hasStandardBrowserWebWorkerEnv || utils$1.isReactNative(data)) {
|
|
@@ -3601,11 +3747,17 @@
|
|
|
3601
3747
|
* Estimate decoded byte length of a data:// URL *without* allocating large buffers.
|
|
3602
3748
|
* - For base64: compute exact decoded size using length and padding;
|
|
3603
3749
|
* handle %XX at the character-count level (no string allocation).
|
|
3604
|
-
* - For non-base64:
|
|
3750
|
+
* - For non-base64: compute the exact percent-decoded UTF-8 byte length.
|
|
3605
3751
|
*
|
|
3606
3752
|
* @param {string} url
|
|
3607
3753
|
* @returns {number}
|
|
3608
3754
|
*/
|
|
3755
|
+
var isHexDigit = function isHexDigit(charCode) {
|
|
3756
|
+
return charCode >= 48 && charCode <= 57 || charCode >= 65 && charCode <= 70 || charCode >= 97 && charCode <= 102;
|
|
3757
|
+
};
|
|
3758
|
+
var isPercentEncodedByte = function isPercentEncodedByte(str, i, len) {
|
|
3759
|
+
return i + 2 < len && isHexDigit(str.charCodeAt(i + 1)) && isHexDigit(str.charCodeAt(i + 2));
|
|
3760
|
+
};
|
|
3609
3761
|
function estimateDataURLDecodedBytes(url) {
|
|
3610
3762
|
if (!url || typeof url !== 'string') return 0;
|
|
3611
3763
|
if (!url.startsWith('data:')) return 0;
|
|
@@ -3622,7 +3774,7 @@
|
|
|
3622
3774
|
if (body.charCodeAt(i) === 37 /* '%' */ && i + 2 < len) {
|
|
3623
3775
|
var a = body.charCodeAt(i + 1);
|
|
3624
3776
|
var b = body.charCodeAt(i + 2);
|
|
3625
|
-
var isHex = (a
|
|
3777
|
+
var isHex = isHexDigit(a) && isHexDigit(b);
|
|
3626
3778
|
if (isHex) {
|
|
3627
3779
|
effectiveLen -= 2;
|
|
3628
3780
|
i += 2;
|
|
@@ -3659,18 +3811,18 @@
|
|
|
3659
3811
|
var _bytes = groups * 3 - (pad || 0);
|
|
3660
3812
|
return _bytes > 0 ? _bytes : 0;
|
|
3661
3813
|
}
|
|
3662
|
-
if (typeof Buffer !== 'undefined' && typeof Buffer.byteLength === 'function') {
|
|
3663
|
-
return Buffer.byteLength(body, 'utf8');
|
|
3664
|
-
}
|
|
3665
3814
|
|
|
3666
3815
|
// Compute UTF-8 byte length directly from UTF-16 code units without allocating
|
|
3667
3816
|
// a byte buffer (TextEncoder.encode would defeat the DoS guard on large bodies).
|
|
3668
|
-
//
|
|
3669
|
-
//
|
|
3817
|
+
// Valid %XX triplets count as one decoded byte; this matches the bytes that
|
|
3818
|
+
// decodeURIComponent(body) would produce before Buffer re-encodes the string.
|
|
3670
3819
|
var bytes = 0;
|
|
3671
3820
|
for (var _i = 0, _len = body.length; _i < _len; _i++) {
|
|
3672
3821
|
var c = body.charCodeAt(_i);
|
|
3673
|
-
if (c
|
|
3822
|
+
if (c === 37 /* '%' */ && isPercentEncodedByte(body, _i, _len)) {
|
|
3823
|
+
bytes += 1;
|
|
3824
|
+
_i += 2;
|
|
3825
|
+
} else if (c < 0x80) {
|
|
3674
3826
|
bytes += 1;
|
|
3675
3827
|
} else if (c < 0x800) {
|
|
3676
3828
|
bytes += 2;
|
|
@@ -3689,7 +3841,7 @@
|
|
|
3689
3841
|
return bytes;
|
|
3690
3842
|
}
|
|
3691
3843
|
|
|
3692
|
-
var VERSION = "1.
|
|
3844
|
+
var VERSION = "1.18.0";
|
|
3693
3845
|
|
|
3694
3846
|
var DEFAULT_CHUNK_SIZE = 64 * 1024;
|
|
3695
3847
|
var isFunction = utils$1.isFunction;
|
|
@@ -3893,7 +4045,7 @@
|
|
|
3893
4045
|
}();
|
|
3894
4046
|
return /*#__PURE__*/function () {
|
|
3895
4047
|
var _ref4 = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee4(config) {
|
|
3896
|
-
var _resolveConfig, url, method, data, signal, cancelToken, timeout, onDownloadProgress, onUploadProgress, responseType, headers, _resolveConfig$withCr, withCredentials, fetchOptions, maxContentLength, maxBodyLength, hasMaxContentLength, hasMaxBodyLength, own, _fetch, composedSignal, request, unsubscribe, requestContentLength, auth, configAuth, username, password, parsedURL, urlUsername, urlPassword, estimated, outboundLength, _request, contentTypeHeader,
|
|
4048
|
+
var _resolveConfig, url, method, data, signal, cancelToken, timeout, onDownloadProgress, onUploadProgress, responseType, headers, _resolveConfig$withCr, withCredentials, fetchOptions, maxContentLength, maxBodyLength, hasMaxContentLength, hasMaxBodyLength, own, _fetch, composedSignal, request, unsubscribe, requestContentLength, pendingBodyError, maxBodyLengthError, auth, configAuth, username, password, parsedURL, urlUsername, urlPassword, estimated, outboundLength, mustEnforceStreamBody, trackRequestStream, _request, contentTypeHeader, _ref5, _ref6, onProgress, flush, isCredentialsSupported, contentType, resolvedOptions, response, responseHeaders, declaredLength, isStreamResponse, options, responseContentLength, _ref7, _ref8, _onProgress, _flush, bytesRead, onChunkProgress, responseData, materializedSize, canceledError, _t3, _t4;
|
|
3897
4049
|
return _regenerator().w(function (_context4) {
|
|
3898
4050
|
while (1) switch (_context4.p = _context4.n) {
|
|
3899
4051
|
case 0:
|
|
@@ -3910,13 +4062,21 @@
|
|
|
3910
4062
|
unsubscribe = composedSignal && composedSignal.unsubscribe && function () {
|
|
3911
4063
|
composedSignal.unsubscribe();
|
|
3912
4064
|
};
|
|
4065
|
+
// AxiosError we raise while the request body is being streamed. Captured
|
|
4066
|
+
// by identity so the catch block can surface it directly, regardless of
|
|
4067
|
+
// how the runtime wraps the resulting fetch rejection (undici exposes it
|
|
4068
|
+
// as `err.cause`; some browsers drop the original error entirely).
|
|
4069
|
+
pendingBodyError = null;
|
|
4070
|
+
maxBodyLengthError = function maxBodyLengthError() {
|
|
4071
|
+
return new AxiosError('Request body larger than maxBodyLength limit', AxiosError.ERR_BAD_REQUEST, config, request);
|
|
4072
|
+
};
|
|
3913
4073
|
_context4.p = 1;
|
|
3914
4074
|
// HTTP basic authentication
|
|
3915
4075
|
auth = undefined;
|
|
3916
4076
|
configAuth = own('auth');
|
|
3917
4077
|
if (configAuth) {
|
|
3918
|
-
username = configAuth
|
|
3919
|
-
password = configAuth
|
|
4078
|
+
username = utils$1.getSafeProp(configAuth, 'username') || '';
|
|
4079
|
+
password = utils$1.getSafeProp(configAuth, 'password') || '';
|
|
3920
4080
|
auth = {
|
|
3921
4081
|
username: username,
|
|
3922
4082
|
password: password
|
|
@@ -3962,43 +4122,82 @@
|
|
|
3962
4122
|
break;
|
|
3963
4123
|
}
|
|
3964
4124
|
_context4.n = 3;
|
|
3965
|
-
return
|
|
4125
|
+
return getBodyLength(data);
|
|
3966
4126
|
case 3:
|
|
3967
4127
|
outboundLength = _context4.v;
|
|
3968
|
-
if (!(typeof outboundLength === 'number' && isFinite(outboundLength)
|
|
4128
|
+
if (!(typeof outboundLength === 'number' && isFinite(outboundLength))) {
|
|
3969
4129
|
_context4.n = 4;
|
|
3970
4130
|
break;
|
|
3971
4131
|
}
|
|
3972
|
-
|
|
4132
|
+
requestContentLength = outboundLength;
|
|
4133
|
+
if (!(outboundLength > maxBodyLength)) {
|
|
4134
|
+
_context4.n = 4;
|
|
4135
|
+
break;
|
|
4136
|
+
}
|
|
4137
|
+
throw maxBodyLengthError();
|
|
3973
4138
|
case 4:
|
|
3974
|
-
|
|
3975
|
-
|
|
4139
|
+
// A streamed body under maxBodyLength must be counted as fetch consumes
|
|
4140
|
+
// it; its size is never trusted from a caller-declared Content-Length.
|
|
4141
|
+
mustEnforceStreamBody = hasMaxBodyLength && (utils$1.isReadableStream(data) || utils$1.isStream(data));
|
|
4142
|
+
trackRequestStream = function trackRequestStream(stream, onProgress, flush) {
|
|
4143
|
+
return trackStream(stream, DEFAULT_CHUNK_SIZE, function (loadedBytes) {
|
|
4144
|
+
if (hasMaxBodyLength && loadedBytes > maxBodyLength) {
|
|
4145
|
+
throw pendingBodyError = maxBodyLengthError();
|
|
4146
|
+
}
|
|
4147
|
+
onProgress && onProgress(loadedBytes);
|
|
4148
|
+
}, flush);
|
|
4149
|
+
};
|
|
4150
|
+
if (!(supportsRequestStream && method !== 'get' && method !== 'head' && (onUploadProgress || mustEnforceStreamBody))) {
|
|
4151
|
+
_context4.n = 8;
|
|
4152
|
+
break;
|
|
4153
|
+
}
|
|
4154
|
+
if (!(requestContentLength == null)) {
|
|
3976
4155
|
_context4.n = 6;
|
|
3977
4156
|
break;
|
|
3978
4157
|
}
|
|
3979
4158
|
_context4.n = 5;
|
|
3980
4159
|
return resolveBodyLength(headers, data);
|
|
3981
4160
|
case 5:
|
|
3982
|
-
|
|
3983
|
-
|
|
4161
|
+
_t3 = _context4.v;
|
|
4162
|
+
_context4.n = 7;
|
|
4163
|
+
break;
|
|
3984
4164
|
case 6:
|
|
3985
|
-
|
|
3986
|
-
|
|
3987
|
-
|
|
4165
|
+
_t3 = requestContentLength;
|
|
4166
|
+
case 7:
|
|
4167
|
+
requestContentLength = _t3;
|
|
4168
|
+
// A declared length of 0 is only trusted to skip the wrap when we are
|
|
4169
|
+
// not enforcing a stream limit (which must not rely on that header).
|
|
4170
|
+
if (requestContentLength !== 0 || mustEnforceStreamBody) {
|
|
4171
|
+
_request = new Request(url, {
|
|
4172
|
+
method: 'POST',
|
|
4173
|
+
body: data,
|
|
4174
|
+
duplex: 'half'
|
|
4175
|
+
});
|
|
4176
|
+
if (utils$1.isFormData(data) && (contentTypeHeader = _request.headers.get('content-type'))) {
|
|
4177
|
+
headers.setContentType(contentTypeHeader);
|
|
4178
|
+
}
|
|
4179
|
+
if (_request.body) {
|
|
4180
|
+
_ref5 = onUploadProgress && progressEventDecorator(requestContentLength, progressEventReducer(asyncDecorator(onUploadProgress))) || [], _ref6 = _slicedToArray(_ref5, 2), onProgress = _ref6[0], flush = _ref6[1];
|
|
4181
|
+
data = trackRequestStream(_request.body, onProgress, flush);
|
|
4182
|
+
}
|
|
3988
4183
|
}
|
|
3989
|
-
|
|
3990
|
-
|
|
3991
|
-
|
|
3992
|
-
|
|
3993
|
-
|
|
3994
|
-
|
|
3995
|
-
headers.setContentType(contentTypeHeader);
|
|
4184
|
+
_context4.n = 10;
|
|
4185
|
+
break;
|
|
4186
|
+
case 8:
|
|
4187
|
+
if (!(mustEnforceStreamBody && !isRequestSupported && isReadableStreamSupported && method !== 'get' && method !== 'head')) {
|
|
4188
|
+
_context4.n = 9;
|
|
4189
|
+
break;
|
|
3996
4190
|
}
|
|
3997
|
-
|
|
3998
|
-
|
|
3999
|
-
|
|
4191
|
+
data = trackRequestStream(data);
|
|
4192
|
+
_context4.n = 10;
|
|
4193
|
+
break;
|
|
4194
|
+
case 9:
|
|
4195
|
+
if (!(mustEnforceStreamBody && isRequestSupported && !supportsRequestStream && method !== 'get' && method !== 'head')) {
|
|
4196
|
+
_context4.n = 10;
|
|
4197
|
+
break;
|
|
4000
4198
|
}
|
|
4001
|
-
|
|
4199
|
+
throw new AxiosError('Stream request bodies are not supported by the current fetch implementation', AxiosError.ERR_NOT_SUPPORT, config, request);
|
|
4200
|
+
case 10:
|
|
4002
4201
|
if (!utils$1.isString(withCredentials)) {
|
|
4003
4202
|
withCredentials = withCredentials ? 'include' : 'omit';
|
|
4004
4203
|
}
|
|
@@ -4025,29 +4224,31 @@
|
|
|
4025
4224
|
credentials: isCredentialsSupported ? withCredentials : undefined
|
|
4026
4225
|
});
|
|
4027
4226
|
request = isRequestSupported && new Request(url, resolvedOptions);
|
|
4028
|
-
_context4.n =
|
|
4227
|
+
_context4.n = 11;
|
|
4029
4228
|
return isRequestSupported ? _fetch(request, fetchOptions) : _fetch(url, resolvedOptions);
|
|
4030
|
-
case
|
|
4229
|
+
case 11:
|
|
4031
4230
|
response = _context4.v;
|
|
4231
|
+
responseHeaders = AxiosHeaders.from(response.headers); // Cheap pre-check: if the server honestly declares a content-length that
|
|
4232
|
+
// already exceeds the cap, reject before we start streaming.
|
|
4032
4233
|
if (!hasMaxContentLength) {
|
|
4033
|
-
_context4.n =
|
|
4234
|
+
_context4.n = 12;
|
|
4034
4235
|
break;
|
|
4035
4236
|
}
|
|
4036
|
-
declaredLength = utils$1.toFiniteNumber(
|
|
4237
|
+
declaredLength = utils$1.toFiniteNumber(responseHeaders.getContentLength());
|
|
4037
4238
|
if (!(declaredLength != null && declaredLength > maxContentLength)) {
|
|
4038
|
-
_context4.n =
|
|
4239
|
+
_context4.n = 12;
|
|
4039
4240
|
break;
|
|
4040
4241
|
}
|
|
4041
4242
|
throw new AxiosError('maxContentLength size of ' + maxContentLength + ' exceeded', AxiosError.ERR_BAD_RESPONSE, config, request);
|
|
4042
|
-
case
|
|
4243
|
+
case 12:
|
|
4043
4244
|
isStreamResponse = supportsResponseStream && (responseType === 'stream' || responseType === 'response');
|
|
4044
4245
|
if (supportsResponseStream && response.body && (onDownloadProgress || hasMaxContentLength || isStreamResponse && unsubscribe)) {
|
|
4045
4246
|
options = {};
|
|
4046
4247
|
['status', 'statusText', 'headers'].forEach(function (prop) {
|
|
4047
4248
|
options[prop] = response[prop];
|
|
4048
4249
|
});
|
|
4049
|
-
responseContentLength = utils$1.toFiniteNumber(
|
|
4050
|
-
|
|
4250
|
+
responseContentLength = utils$1.toFiniteNumber(responseHeaders.getContentLength());
|
|
4251
|
+
_ref7 = onDownloadProgress && progressEventDecorator(responseContentLength, progressEventReducer(asyncDecorator(onDownloadProgress), true)) || [], _ref8 = _slicedToArray(_ref7, 2), _onProgress = _ref8[0], _flush = _ref8[1];
|
|
4051
4252
|
bytesRead = 0;
|
|
4052
4253
|
onChunkProgress = function onChunkProgress(loadedBytes) {
|
|
4053
4254
|
if (hasMaxContentLength) {
|
|
@@ -4064,12 +4265,12 @@
|
|
|
4064
4265
|
}), options);
|
|
4065
4266
|
}
|
|
4066
4267
|
responseType = responseType || 'text';
|
|
4067
|
-
_context4.n =
|
|
4268
|
+
_context4.n = 13;
|
|
4068
4269
|
return resolvers[utils$1.findKey(resolvers, responseType) || 'text'](response, config);
|
|
4069
|
-
case
|
|
4270
|
+
case 13:
|
|
4070
4271
|
responseData = _context4.v;
|
|
4071
4272
|
if (!(hasMaxContentLength && !supportsResponseStream && !isStreamResponse)) {
|
|
4072
|
-
_context4.n =
|
|
4273
|
+
_context4.n = 14;
|
|
4073
4274
|
break;
|
|
4074
4275
|
}
|
|
4075
4276
|
if (responseData != null) {
|
|
@@ -4082,13 +4283,13 @@
|
|
|
4082
4283
|
}
|
|
4083
4284
|
}
|
|
4084
4285
|
if (!(typeof materializedSize === 'number' && materializedSize > maxContentLength)) {
|
|
4085
|
-
_context4.n =
|
|
4286
|
+
_context4.n = 14;
|
|
4086
4287
|
break;
|
|
4087
4288
|
}
|
|
4088
4289
|
throw new AxiosError('maxContentLength size of ' + maxContentLength + ' exceeded', AxiosError.ERR_BAD_RESPONSE, config, request);
|
|
4089
|
-
case
|
|
4290
|
+
case 14:
|
|
4090
4291
|
!isStreamResponse && unsubscribe && unsubscribe();
|
|
4091
|
-
_context4.n =
|
|
4292
|
+
_context4.n = 15;
|
|
4092
4293
|
return new Promise(function (resolve, reject) {
|
|
4093
4294
|
settle(resolve, reject, {
|
|
4094
4295
|
data: responseData,
|
|
@@ -4099,39 +4300,53 @@
|
|
|
4099
4300
|
request: request
|
|
4100
4301
|
});
|
|
4101
4302
|
});
|
|
4102
|
-
case
|
|
4303
|
+
case 15:
|
|
4103
4304
|
return _context4.a(2, _context4.v);
|
|
4104
|
-
case
|
|
4105
|
-
_context4.p =
|
|
4106
|
-
|
|
4305
|
+
case 16:
|
|
4306
|
+
_context4.p = 16;
|
|
4307
|
+
_t4 = _context4.v;
|
|
4107
4308
|
unsubscribe && unsubscribe();
|
|
4108
4309
|
|
|
4109
4310
|
// Safari can surface fetch aborts as a DOMException-like object whose
|
|
4110
4311
|
// branded getters throw. Prefer our composed signal reason before reading
|
|
4111
4312
|
// the caught error, preserving timeout vs cancellation semantics.
|
|
4112
4313
|
if (!(composedSignal && composedSignal.aborted && composedSignal.reason instanceof AxiosError)) {
|
|
4113
|
-
_context4.n =
|
|
4314
|
+
_context4.n = 17;
|
|
4114
4315
|
break;
|
|
4115
4316
|
}
|
|
4116
4317
|
canceledError = composedSignal.reason;
|
|
4117
4318
|
canceledError.config = config;
|
|
4118
4319
|
request && (canceledError.request = request);
|
|
4119
|
-
|
|
4320
|
+
_t4 !== canceledError && (canceledError.cause = _t4);
|
|
4120
4321
|
throw canceledError;
|
|
4121
|
-
case
|
|
4122
|
-
if (!
|
|
4123
|
-
_context4.n =
|
|
4322
|
+
case 17:
|
|
4323
|
+
if (!pendingBodyError) {
|
|
4324
|
+
_context4.n = 18;
|
|
4325
|
+
break;
|
|
4326
|
+
}
|
|
4327
|
+
request && !pendingBodyError.request && (pendingBodyError.request = request);
|
|
4328
|
+
throw pendingBodyError;
|
|
4329
|
+
case 18:
|
|
4330
|
+
if (!(_t4 instanceof AxiosError)) {
|
|
4331
|
+
_context4.n = 19;
|
|
4124
4332
|
break;
|
|
4125
4333
|
}
|
|
4126
|
-
|
|
4127
|
-
|
|
4334
|
+
request && !_t4.request && (_t4.request = request);
|
|
4335
|
+
throw _t4;
|
|
4336
|
+
case 19:
|
|
4337
|
+
if (!(_t4 && _t4.name === 'TypeError' && /Load failed|fetch/i.test(_t4.message))) {
|
|
4338
|
+
_context4.n = 20;
|
|
4339
|
+
break;
|
|
4340
|
+
}
|
|
4341
|
+
throw Object.assign(new AxiosError('Network Error', AxiosError.ERR_NETWORK, config, request, _t4 && _t4.response), {
|
|
4342
|
+
cause: _t4.cause || _t4
|
|
4128
4343
|
});
|
|
4129
|
-
case
|
|
4130
|
-
throw AxiosError.from(
|
|
4131
|
-
case
|
|
4344
|
+
case 20:
|
|
4345
|
+
throw AxiosError.from(_t4, _t4 && _t4.code, config, request, _t4 && _t4.response);
|
|
4346
|
+
case 21:
|
|
4132
4347
|
return _context4.a(2);
|
|
4133
4348
|
}
|
|
4134
|
-
}, _callee4, null, [[1,
|
|
4349
|
+
}, _callee4, null, [[1, 16]]);
|
|
4135
4350
|
}));
|
|
4136
4351
|
return function (_x5) {
|
|
4137
4352
|
return _ref4.apply(this, arguments);
|
|
@@ -4532,7 +4747,8 @@
|
|
|
4532
4747
|
forcedJSONParsing: validators.transitional(validators["boolean"]),
|
|
4533
4748
|
clarifyTimeoutError: validators.transitional(validators["boolean"]),
|
|
4534
4749
|
legacyInterceptorReqResOrdering: validators.transitional(validators["boolean"]),
|
|
4535
|
-
advertiseZstdAcceptEncoding: validators.transitional(validators["boolean"])
|
|
4750
|
+
advertiseZstdAcceptEncoding: validators.transitional(validators["boolean"]),
|
|
4751
|
+
validateStatusUndefinedResolves: validators.transitional(validators["boolean"])
|
|
4536
4752
|
}, false);
|
|
4537
4753
|
}
|
|
4538
4754
|
if (paramsSerializer != null) {
|
|
@@ -4631,7 +4847,7 @@
|
|
|
4631
4847
|
key: "getUri",
|
|
4632
4848
|
value: function getUri(config) {
|
|
4633
4849
|
config = mergeConfig(this.defaults, config);
|
|
4634
|
-
var fullPath = buildFullPath(config.baseURL, config.url, config.allowAbsoluteUrls);
|
|
4850
|
+
var fullPath = buildFullPath(config.baseURL, config.url, config.allowAbsoluteUrls, config);
|
|
4635
4851
|
return buildURL(fullPath, config.params, config.paramsSerializer);
|
|
4636
4852
|
}
|
|
4637
4853
|
}]);
|
|
@@ -4642,7 +4858,7 @@
|
|
|
4642
4858
|
return this.request(mergeConfig(config || {}, {
|
|
4643
4859
|
method: method,
|
|
4644
4860
|
url: url,
|
|
4645
|
-
data: (config
|
|
4861
|
+
data: config && utils$1.hasOwnProp(config, 'data') ? config.data : undefined
|
|
4646
4862
|
}));
|
|
4647
4863
|
};
|
|
4648
4864
|
});
|