@jentic/arazzo-resolver 1.0.0-alpha.30 → 1.0.0-alpha.31
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.
|
@@ -1715,13 +1715,14 @@ const dispatchPluginsSync = (element, plugins, options = {}) => {
|
|
|
1715
1715
|
const mergedOptions = (0,ramda__WEBPACK_IMPORTED_MODULE_1__["default"])(defaultDispatchPluginsOptions, options);
|
|
1716
1716
|
const {
|
|
1717
1717
|
toolboxCreator,
|
|
1718
|
-
visitorOptions
|
|
1718
|
+
visitorOptions,
|
|
1719
|
+
traverseOptions
|
|
1719
1720
|
} = mergedOptions;
|
|
1720
1721
|
const toolbox = toolboxCreator();
|
|
1721
1722
|
const pluginsSpecs = plugins.map(plugin => plugin(toolbox));
|
|
1722
1723
|
const mergedPluginsVisitor = (0,_speclynx_apidom_traverse__WEBPACK_IMPORTED_MODULE_0__.mergeVisitors)(pluginsSpecs.map((0,ramda__WEBPACK_IMPORTED_MODULE_2__["default"])({}, 'visitor')), visitorOptions);
|
|
1723
1724
|
pluginsSpecs.forEach((0,ramda_adjunct__WEBPACK_IMPORTED_MODULE_3__["default"])(['pre'], []));
|
|
1724
|
-
const newElement = (0,_speclynx_apidom_traverse__WEBPACK_IMPORTED_MODULE_0__.traverse)(element, mergedPluginsVisitor);
|
|
1725
|
+
const newElement = (0,_speclynx_apidom_traverse__WEBPACK_IMPORTED_MODULE_0__.traverse)(element, mergedPluginsVisitor, traverseOptions);
|
|
1725
1726
|
pluginsSpecs.forEach((0,ramda_adjunct__WEBPACK_IMPORTED_MODULE_3__["default"])(['post'], []));
|
|
1726
1727
|
return newElement;
|
|
1727
1728
|
};
|
|
@@ -1730,13 +1731,14 @@ const dispatchPluginsAsync = async (element, plugins, options = {}) => {
|
|
|
1730
1731
|
const mergedOptions = (0,ramda__WEBPACK_IMPORTED_MODULE_1__["default"])(defaultDispatchPluginsOptions, options);
|
|
1731
1732
|
const {
|
|
1732
1733
|
toolboxCreator,
|
|
1733
|
-
visitorOptions
|
|
1734
|
+
visitorOptions,
|
|
1735
|
+
traverseOptions
|
|
1734
1736
|
} = mergedOptions;
|
|
1735
1737
|
const toolbox = toolboxCreator();
|
|
1736
1738
|
const pluginsSpecs = plugins.map(plugin => plugin(toolbox));
|
|
1737
1739
|
const mergedPluginsVisitor = (0,_speclynx_apidom_traverse__WEBPACK_IMPORTED_MODULE_0__.mergeVisitorsAsync)(pluginsSpecs.map((0,ramda__WEBPACK_IMPORTED_MODULE_2__["default"])({}, 'visitor')), visitorOptions);
|
|
1738
1740
|
await Promise.allSettled(pluginsSpecs.map((0,ramda_adjunct__WEBPACK_IMPORTED_MODULE_3__["default"])(['pre'], [])));
|
|
1739
|
-
const newElement = await (0,_speclynx_apidom_traverse__WEBPACK_IMPORTED_MODULE_0__.traverseAsync)(element, mergedPluginsVisitor);
|
|
1741
|
+
const newElement = await (0,_speclynx_apidom_traverse__WEBPACK_IMPORTED_MODULE_0__.traverseAsync)(element, mergedPluginsVisitor, traverseOptions);
|
|
1740
1742
|
await Promise.allSettled(pluginsSpecs.map((0,ramda_adjunct__WEBPACK_IMPORTED_MODULE_3__["default"])(['post'], [])));
|
|
1741
1743
|
return newElement;
|
|
1742
1744
|
};
|
|
@@ -35905,24 +35907,26 @@ class DereferenceStrategy {
|
|
|
35905
35907
|
"use strict";
|
|
35906
35908
|
__webpack_require__.r(__webpack_exports__);
|
|
35907
35909
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
35908
|
-
/* harmony export */ Arazzo1DereferenceVisitor: () => (/* reexport safe */
|
|
35910
|
+
/* harmony export */ Arazzo1DereferenceVisitor: () => (/* reexport safe */ _visitor_mjs__WEBPACK_IMPORTED_MODULE_9__["default"]),
|
|
35909
35911
|
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__),
|
|
35910
|
-
/* harmony export */ dereferenceSourceDescriptions: () => (/* reexport safe */
|
|
35911
|
-
/* harmony export */ maybeRefractToJSONSchemaElement: () => (/* reexport safe */
|
|
35912
|
-
/* harmony export */ resolveSchema$idField: () => (/* reexport safe */
|
|
35913
|
-
/* harmony export */ resolveSchema$refField: () => (/* reexport safe */
|
|
35912
|
+
/* harmony export */ dereferenceSourceDescriptions: () => (/* reexport safe */ _source_descriptions_mjs__WEBPACK_IMPORTED_MODULE_10__.dereferenceSourceDescriptions),
|
|
35913
|
+
/* harmony export */ maybeRefractToJSONSchemaElement: () => (/* reexport safe */ _util_mjs__WEBPACK_IMPORTED_MODULE_11__.maybeRefractToJSONSchemaElement),
|
|
35914
|
+
/* harmony export */ resolveSchema$idField: () => (/* reexport safe */ _util_mjs__WEBPACK_IMPORTED_MODULE_12__.resolveSchema$idField),
|
|
35915
|
+
/* harmony export */ resolveSchema$refField: () => (/* reexport safe */ _util_mjs__WEBPACK_IMPORTED_MODULE_12__.resolveSchema$refField)
|
|
35914
35916
|
/* harmony export */ });
|
|
35915
|
-
/* harmony import */ var _speclynx_apidom_datamodel__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
|
|
35916
|
-
/* harmony import */ var
|
|
35917
|
-
/* harmony import */ var
|
|
35918
|
-
/* harmony import */ var
|
|
35919
|
-
/* harmony import */ var
|
|
35920
|
-
/* harmony import */ var
|
|
35921
|
-
/* harmony import */ var
|
|
35922
|
-
/* harmony import */ var
|
|
35923
|
-
/* harmony import */ var
|
|
35924
|
-
/* harmony import */ var
|
|
35925
|
-
/* harmony import */ var
|
|
35917
|
+
/* harmony import */ var _speclynx_apidom_datamodel__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(74918);
|
|
35918
|
+
/* harmony import */ var _speclynx_apidom_datamodel__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(76642);
|
|
35919
|
+
/* harmony import */ var _speclynx_apidom_datamodel__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(25035);
|
|
35920
|
+
/* harmony import */ var _speclynx_apidom_traverse__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(49943);
|
|
35921
|
+
/* harmony import */ var _speclynx_apidom_ns_arazzo_1__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(36298);
|
|
35922
|
+
/* harmony import */ var _speclynx_apidom_ns_arazzo_1__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(75728);
|
|
35923
|
+
/* harmony import */ var _DereferenceStrategy_mjs__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(72334);
|
|
35924
|
+
/* harmony import */ var _Reference_mjs__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(30683);
|
|
35925
|
+
/* harmony import */ var _ReferenceSet_mjs__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(7905);
|
|
35926
|
+
/* harmony import */ var _visitor_mjs__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(59711);
|
|
35927
|
+
/* harmony import */ var _source_descriptions_mjs__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(47624);
|
|
35928
|
+
/* harmony import */ var _util_mjs__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(37003);
|
|
35929
|
+
/* harmony import */ var _util_mjs__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(88958);
|
|
35926
35930
|
|
|
35927
35931
|
|
|
35928
35932
|
|
|
@@ -35937,7 +35941,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
35937
35941
|
/**
|
|
35938
35942
|
* @public
|
|
35939
35943
|
*/
|
|
35940
|
-
class Arazzo1DereferenceStrategy extends
|
|
35944
|
+
class Arazzo1DereferenceStrategy extends _DereferenceStrategy_mjs__WEBPACK_IMPORTED_MODULE_6__["default"] {
|
|
35941
35945
|
constructor(options) {
|
|
35942
35946
|
super({
|
|
35943
35947
|
...(options ?? {}),
|
|
@@ -35947,19 +35951,19 @@ class Arazzo1DereferenceStrategy extends _DereferenceStrategy_mjs__WEBPACK_IMPOR
|
|
|
35947
35951
|
canDereference(file) {
|
|
35948
35952
|
// assert by media type
|
|
35949
35953
|
if (file.mediaType !== 'text/plain') {
|
|
35950
|
-
return
|
|
35954
|
+
return _speclynx_apidom_ns_arazzo_1__WEBPACK_IMPORTED_MODULE_4__["default"].includes(file.mediaType);
|
|
35951
35955
|
}
|
|
35952
35956
|
|
|
35953
35957
|
// assert by inspecting ApiDOM
|
|
35954
|
-
return (0,
|
|
35958
|
+
return (0,_speclynx_apidom_ns_arazzo_1__WEBPACK_IMPORTED_MODULE_5__.isArazzoSpecification1Element)(file.parseResult?.result);
|
|
35955
35959
|
}
|
|
35956
35960
|
async dereference(file, options) {
|
|
35957
|
-
const immutableRefSet = options.dereference.refSet ?? new
|
|
35958
|
-
const mutableRefSet = new
|
|
35961
|
+
const immutableRefSet = options.dereference.refSet ?? new _ReferenceSet_mjs__WEBPACK_IMPORTED_MODULE_8__["default"]();
|
|
35962
|
+
const mutableRefSet = new _ReferenceSet_mjs__WEBPACK_IMPORTED_MODULE_8__["default"]();
|
|
35959
35963
|
let refSet = immutableRefSet;
|
|
35960
35964
|
let reference;
|
|
35961
35965
|
if (!immutableRefSet.has(file.uri)) {
|
|
35962
|
-
reference = new
|
|
35966
|
+
reference = new _Reference_mjs__WEBPACK_IMPORTED_MODULE_7__["default"]({
|
|
35963
35967
|
uri: file.uri,
|
|
35964
35968
|
value: file.parseResult
|
|
35965
35969
|
});
|
|
@@ -35974,19 +35978,23 @@ class Arazzo1DereferenceStrategy extends _DereferenceStrategy_mjs__WEBPACK_IMPOR
|
|
|
35974
35978
|
* We don't want to mutate the original refSet and the references.
|
|
35975
35979
|
*/
|
|
35976
35980
|
if (options.dereference.immutable) {
|
|
35977
|
-
immutableRefSet.refs.map(ref => new
|
|
35981
|
+
immutableRefSet.refs.map(ref => new _Reference_mjs__WEBPACK_IMPORTED_MODULE_7__["default"]({
|
|
35978
35982
|
...ref,
|
|
35979
|
-
value: (0,
|
|
35983
|
+
value: (0,_speclynx_apidom_datamodel__WEBPACK_IMPORTED_MODULE_1__.cloneDeep)(ref.value)
|
|
35980
35984
|
})).forEach(ref => mutableRefSet.add(ref));
|
|
35981
35985
|
reference = mutableRefSet.find(ref => ref.uri === file.uri);
|
|
35982
35986
|
refSet = mutableRefSet;
|
|
35983
35987
|
}
|
|
35984
|
-
const
|
|
35988
|
+
const shouldDetectCircular = ['error', 'replace'].includes(options.dereference.circular);
|
|
35989
|
+
const visitor = new _visitor_mjs__WEBPACK_IMPORTED_MODULE_9__["default"]({
|
|
35985
35990
|
reference,
|
|
35986
35991
|
options
|
|
35987
35992
|
});
|
|
35988
|
-
const dereferencedElement = await (0,
|
|
35989
|
-
mutable: true
|
|
35993
|
+
const dereferencedElement = await (0,_speclynx_apidom_traverse__WEBPACK_IMPORTED_MODULE_3__.traverseAsync)(refSet.rootRef.value, visitor, {
|
|
35994
|
+
mutable: true,
|
|
35995
|
+
...(shouldDetectCircular && {
|
|
35996
|
+
skipVisited: true
|
|
35997
|
+
})
|
|
35990
35998
|
});
|
|
35991
35999
|
|
|
35992
36000
|
/**
|
|
@@ -35994,15 +36002,20 @@ class Arazzo1DereferenceStrategy extends _DereferenceStrategy_mjs__WEBPACK_IMPOR
|
|
|
35994
36002
|
*/
|
|
35995
36003
|
const shouldDereferenceSourceDescriptions = options?.dereference?.strategyOpts?.[this.name]?.sourceDescriptions ?? options?.dereference?.strategyOpts?.sourceDescriptions;
|
|
35996
36004
|
if (shouldDereferenceSourceDescriptions) {
|
|
35997
|
-
const
|
|
35998
|
-
|
|
36005
|
+
const parseResult = dereferencedElement;
|
|
36006
|
+
|
|
36007
|
+
// drop any existing parse-phase source description results before pushing
|
|
36008
|
+
const cleaned = parseResult.reject(item => (0,_speclynx_apidom_datamodel__WEBPACK_IMPORTED_MODULE_0__.isParseResultElement)(item) && (0,_speclynx_apidom_datamodel__WEBPACK_IMPORTED_MODULE_2__.includesClasses)(item, ['source-description']));
|
|
36009
|
+
parseResult.content = cleaned.content;
|
|
36010
|
+
const sourceDescriptions = await (0,_source_descriptions_mjs__WEBPACK_IMPORTED_MODULE_10__.dereferenceSourceDescriptions)(parseResult, reference.uri, options, this.name);
|
|
36011
|
+
parseResult.push(...sourceDescriptions);
|
|
35999
36012
|
}
|
|
36000
36013
|
|
|
36001
36014
|
/**
|
|
36002
36015
|
* If immutable option is set, replay refs from the refSet.
|
|
36003
36016
|
*/
|
|
36004
36017
|
if (options.dereference.immutable) {
|
|
36005
|
-
mutableRefSet.refs.filter(ref => ref.uri.startsWith('immutable://')).map(ref => new
|
|
36018
|
+
mutableRefSet.refs.filter(ref => ref.uri.startsWith('immutable://')).map(ref => new _Reference_mjs__WEBPACK_IMPORTED_MODULE_7__["default"]({
|
|
36006
36019
|
...ref,
|
|
36007
36020
|
uri: ref.uri.replace(/^immutable:\/\//, '')
|
|
36008
36021
|
})).forEach(ref => immutableRefSet.add(ref));
|
|
@@ -36405,6 +36418,7 @@ class Arazzo1DereferenceVisitor {
|
|
|
36405
36418
|
indirections;
|
|
36406
36419
|
reference;
|
|
36407
36420
|
options;
|
|
36421
|
+
visited;
|
|
36408
36422
|
|
|
36409
36423
|
/**
|
|
36410
36424
|
* Tracks element ancestors across dive-deep traversal boundaries.
|
|
@@ -36416,12 +36430,14 @@ class Arazzo1DereferenceVisitor {
|
|
|
36416
36430
|
reference,
|
|
36417
36431
|
options,
|
|
36418
36432
|
indirections = [],
|
|
36419
|
-
ancestors = new _util_mjs__WEBPACK_IMPORTED_MODULE_26__.AncestorLineage()
|
|
36433
|
+
ancestors = new _util_mjs__WEBPACK_IMPORTED_MODULE_26__.AncestorLineage(),
|
|
36434
|
+
visited = new WeakSet()
|
|
36420
36435
|
}) {
|
|
36421
36436
|
this.indirections = indirections;
|
|
36422
36437
|
this.reference = reference;
|
|
36423
36438
|
this.options = options;
|
|
36424
36439
|
this.ancestors = new _util_mjs__WEBPACK_IMPORTED_MODULE_26__.AncestorLineage(...ancestors);
|
|
36440
|
+
this.visited = visited;
|
|
36425
36441
|
}
|
|
36426
36442
|
toAncestorLineage(path) {
|
|
36427
36443
|
const ancestorNodes = path.getAncestorNodes();
|
|
@@ -36635,6 +36651,7 @@ class Arazzo1DereferenceVisitor {
|
|
|
36635
36651
|
* Transclude referencing element with merged referenced element.
|
|
36636
36652
|
*/
|
|
36637
36653
|
path.replaceWith(mergedElement);
|
|
36654
|
+
path.skip();
|
|
36638
36655
|
}
|
|
36639
36656
|
async JSONSchemaElement(path) {
|
|
36640
36657
|
const referencingElement = path.node;
|
|
@@ -36795,6 +36812,7 @@ class Arazzo1DereferenceVisitor {
|
|
|
36795
36812
|
const replacer = this.options.dereference.strategyOpts['arazzo-1']?.circularReplacer ?? this.options.dereference.circularReplacer;
|
|
36796
36813
|
const replacement = replacer(refElement);
|
|
36797
36814
|
path.replaceWith(replacement);
|
|
36815
|
+
path.skip();
|
|
36798
36816
|
return;
|
|
36799
36817
|
}
|
|
36800
36818
|
}
|
|
@@ -36810,17 +36828,23 @@ class Arazzo1DereferenceVisitor {
|
|
|
36810
36828
|
*/
|
|
36811
36829
|
const isNonEntryDocument = _util_url_mjs__WEBPACK_IMPORTED_MODULE_22__.stripHash(reference.refSet.rootRef.uri) !== reference.uri;
|
|
36812
36830
|
const shouldDetectCircular = ['error', 'replace'].includes(this.options.dereference.circular);
|
|
36813
|
-
if ((isExternalReference || isNonEntryDocument || (0,_speclynx_apidom_ns_arazzo_1__WEBPACK_IMPORTED_MODULE_11__.isJSONSchemaElement)(referencedElement) && (0,_speclynx_apidom_datamodel__WEBPACK_IMPORTED_MODULE_2__.isStringElement)(referencedElement.$ref) || shouldDetectCircular) && !ancestorsLineage.includesCycle(referencedElement)) {
|
|
36831
|
+
if ((isExternalReference || isNonEntryDocument || (0,_speclynx_apidom_ns_arazzo_1__WEBPACK_IMPORTED_MODULE_11__.isJSONSchemaElement)(referencedElement) && (0,_speclynx_apidom_datamodel__WEBPACK_IMPORTED_MODULE_2__.isStringElement)(referencedElement.$ref) || shouldDetectCircular && !this.visited.has(referencedElement)) && !ancestorsLineage.includesCycle(referencedElement)) {
|
|
36832
|
+
if (shouldDetectCircular) {
|
|
36833
|
+
this.visited.add(referencedElement);
|
|
36834
|
+
}
|
|
36835
|
+
|
|
36814
36836
|
// append referencing reference to ancestors lineage
|
|
36815
36837
|
directAncestors.add(referencingElement);
|
|
36816
36838
|
const visitor = new Arazzo1DereferenceVisitor({
|
|
36817
36839
|
reference,
|
|
36818
36840
|
indirections: [...this.indirections],
|
|
36819
36841
|
options: this.options,
|
|
36842
|
+
visited: this.visited,
|
|
36820
36843
|
ancestors: ancestorsLineage
|
|
36821
36844
|
});
|
|
36822
36845
|
referencedElement = await (0,_speclynx_apidom_traverse__WEBPACK_IMPORTED_MODULE_8__.traverseAsync)(referencedElement, visitor, {
|
|
36823
|
-
mutable: true
|
|
36846
|
+
mutable: true,
|
|
36847
|
+
skipVisited: true
|
|
36824
36848
|
});
|
|
36825
36849
|
|
|
36826
36850
|
// remove referencing reference from ancestors lineage
|
|
@@ -36838,6 +36862,7 @@ class Arazzo1DereferenceVisitor {
|
|
|
36838
36862
|
booleanJsonSchemaElement.meta.set('ref-origin', reference.uri);
|
|
36839
36863
|
booleanJsonSchemaElement.meta.set('ref-type', referencingElement.element);
|
|
36840
36864
|
path.replaceWith(booleanJsonSchemaElement);
|
|
36865
|
+
path.skip();
|
|
36841
36866
|
return;
|
|
36842
36867
|
}
|
|
36843
36868
|
|
|
@@ -36951,12 +36976,16 @@ class OpenAPI2DereferenceStrategy extends _DereferenceStrategy_mjs__WEBPACK_IMPO
|
|
|
36951
36976
|
reference = mutableRefSet.find(ref => ref.uri === file.uri);
|
|
36952
36977
|
refSet = mutableRefSet;
|
|
36953
36978
|
}
|
|
36979
|
+
const shouldDetectCircular = ['error', 'replace'].includes(options.dereference.circular);
|
|
36954
36980
|
const visitor = new _visitor_mjs__WEBPACK_IMPORTED_MODULE_7__["default"]({
|
|
36955
36981
|
reference: reference,
|
|
36956
36982
|
options
|
|
36957
36983
|
});
|
|
36958
36984
|
const dereferencedElement = await (0,_speclynx_apidom_traverse__WEBPACK_IMPORTED_MODULE_3__.traverseAsync)(refSet.rootRef.value, visitor, {
|
|
36959
|
-
mutable: true
|
|
36985
|
+
mutable: true,
|
|
36986
|
+
...(shouldDetectCircular && {
|
|
36987
|
+
skipVisited: true
|
|
36988
|
+
})
|
|
36960
36989
|
});
|
|
36961
36990
|
|
|
36962
36991
|
/**
|
|
@@ -37043,6 +37072,7 @@ class OpenAPI2DereferenceVisitor {
|
|
|
37043
37072
|
reference;
|
|
37044
37073
|
options;
|
|
37045
37074
|
refractCache;
|
|
37075
|
+
visited;
|
|
37046
37076
|
|
|
37047
37077
|
/**
|
|
37048
37078
|
* Tracks element ancestors across dive-deep traversal boundaries.
|
|
@@ -37055,13 +37085,15 @@ class OpenAPI2DereferenceVisitor {
|
|
|
37055
37085
|
options,
|
|
37056
37086
|
indirections = [],
|
|
37057
37087
|
ancestors = new _util_mjs__WEBPACK_IMPORTED_MODULE_19__.AncestorLineage(),
|
|
37058
|
-
refractCache = new WeakMap()
|
|
37088
|
+
refractCache = new WeakMap(),
|
|
37089
|
+
visited = new WeakSet()
|
|
37059
37090
|
}) {
|
|
37060
37091
|
this.indirections = indirections;
|
|
37061
37092
|
this.reference = reference;
|
|
37062
37093
|
this.options = options;
|
|
37063
37094
|
this.refractCache = refractCache;
|
|
37064
37095
|
this.ancestors = new _util_mjs__WEBPACK_IMPORTED_MODULE_19__.AncestorLineage(...ancestors);
|
|
37096
|
+
this.visited = visited;
|
|
37065
37097
|
}
|
|
37066
37098
|
toAncestorLineage(path) {
|
|
37067
37099
|
const ancestorNodes = path.getAncestorNodes();
|
|
@@ -37294,6 +37326,7 @@ class OpenAPI2DereferenceVisitor {
|
|
|
37294
37326
|
const replacer = this.options.dereference.strategyOpts['openapi-2']?.circularReplacer ?? this.options.dereference.circularReplacer;
|
|
37295
37327
|
const replacement = replacer(refElement);
|
|
37296
37328
|
path.replaceWith(replacement);
|
|
37329
|
+
path.skip();
|
|
37297
37330
|
return;
|
|
37298
37331
|
}
|
|
37299
37332
|
}
|
|
@@ -37309,7 +37342,11 @@ class OpenAPI2DereferenceVisitor {
|
|
|
37309
37342
|
*/
|
|
37310
37343
|
const isNonEntryDocument = _util_url_mjs__WEBPACK_IMPORTED_MODULE_20__.stripHash(reference.refSet.rootRef.uri) !== reference.uri;
|
|
37311
37344
|
const shouldDetectCircular = ['error', 'replace'].includes(this.options.dereference.circular);
|
|
37312
|
-
if ((isExternalReference || isNonEntryDocument || (0,_speclynx_apidom_ns_openapi_2__WEBPACK_IMPORTED_MODULE_14__.isReferenceElement)(referencedElement) || shouldDetectCircular) && !ancestorsLineage.includesCycle(referencedElement)) {
|
|
37345
|
+
if ((isExternalReference || isNonEntryDocument || (0,_speclynx_apidom_ns_openapi_2__WEBPACK_IMPORTED_MODULE_14__.isReferenceElement)(referencedElement) || shouldDetectCircular && !this.visited.has(referencedElement)) && !ancestorsLineage.includesCycle(referencedElement)) {
|
|
37346
|
+
if (shouldDetectCircular) {
|
|
37347
|
+
this.visited.add(referencedElement);
|
|
37348
|
+
}
|
|
37349
|
+
|
|
37313
37350
|
// append referencing reference to ancestors lineage
|
|
37314
37351
|
directAncestors.add(referencingElement);
|
|
37315
37352
|
const visitor = new OpenAPI2DereferenceVisitor({
|
|
@@ -37317,10 +37354,12 @@ class OpenAPI2DereferenceVisitor {
|
|
|
37317
37354
|
indirections: [...this.indirections],
|
|
37318
37355
|
options: this.options,
|
|
37319
37356
|
refractCache: this.refractCache,
|
|
37357
|
+
visited: this.visited,
|
|
37320
37358
|
ancestors: ancestorsLineage
|
|
37321
37359
|
});
|
|
37322
37360
|
referencedElement = await (0,_speclynx_apidom_traverse__WEBPACK_IMPORTED_MODULE_7__.traverseAsync)(referencedElement, visitor, {
|
|
37323
|
-
mutable: true
|
|
37361
|
+
mutable: true,
|
|
37362
|
+
skipVisited: true
|
|
37324
37363
|
});
|
|
37325
37364
|
directAncestors.delete(referencingElement);
|
|
37326
37365
|
}
|
|
@@ -37341,6 +37380,7 @@ class OpenAPI2DereferenceVisitor {
|
|
|
37341
37380
|
* Transclude referencing element with merged referenced element.
|
|
37342
37381
|
*/
|
|
37343
37382
|
path.replaceWith(mergedElement);
|
|
37383
|
+
path.skip();
|
|
37344
37384
|
} catch (error) {
|
|
37345
37385
|
const $ref = (0,_speclynx_apidom_core__WEBPACK_IMPORTED_MODULE_4__["default"])(referencingElement.$ref);
|
|
37346
37386
|
this.handleError(`Error while dereferencing Reference Object. Cannot resolve $ref "${$ref}": ${error.message}`, error, referencingElement, '$ref', $ref, path);
|
|
@@ -37428,6 +37468,7 @@ class OpenAPI2DereferenceVisitor {
|
|
|
37428
37468
|
const replacer = this.options.dereference.strategyOpts['openapi-2']?.circularReplacer ?? this.options.dereference.circularReplacer;
|
|
37429
37469
|
const replacement = replacer(refElement);
|
|
37430
37470
|
path.replaceWith(replacement);
|
|
37471
|
+
path.skip();
|
|
37431
37472
|
return;
|
|
37432
37473
|
}
|
|
37433
37474
|
}
|
|
@@ -37443,7 +37484,11 @@ class OpenAPI2DereferenceVisitor {
|
|
|
37443
37484
|
*/
|
|
37444
37485
|
const isNonEntryDocument = _util_url_mjs__WEBPACK_IMPORTED_MODULE_20__.stripHash(reference.refSet.rootRef.uri) !== reference.uri;
|
|
37445
37486
|
const shouldDetectCircular = ['error', 'replace'].includes(this.options.dereference.circular);
|
|
37446
|
-
if ((isExternalReference || isNonEntryDocument || (0,_speclynx_apidom_ns_openapi_2__WEBPACK_IMPORTED_MODULE_14__.isPathItemElement)(referencedElement) && (0,_speclynx_apidom_datamodel__WEBPACK_IMPORTED_MODULE_1__.isStringElement)(referencedElement.$ref) || shouldDetectCircular) && !ancestorsLineage.includesCycle(referencedElement)) {
|
|
37487
|
+
if ((isExternalReference || isNonEntryDocument || (0,_speclynx_apidom_ns_openapi_2__WEBPACK_IMPORTED_MODULE_14__.isPathItemElement)(referencedElement) && (0,_speclynx_apidom_datamodel__WEBPACK_IMPORTED_MODULE_1__.isStringElement)(referencedElement.$ref) || shouldDetectCircular && !this.visited.has(referencedElement)) && !ancestorsLineage.includesCycle(referencedElement)) {
|
|
37488
|
+
if (shouldDetectCircular) {
|
|
37489
|
+
this.visited.add(referencedElement);
|
|
37490
|
+
}
|
|
37491
|
+
|
|
37447
37492
|
// append referencing reference to ancestors lineage
|
|
37448
37493
|
directAncestors.add(referencingElement);
|
|
37449
37494
|
const visitor = new OpenAPI2DereferenceVisitor({
|
|
@@ -37451,10 +37496,12 @@ class OpenAPI2DereferenceVisitor {
|
|
|
37451
37496
|
indirections: [...this.indirections],
|
|
37452
37497
|
options: this.options,
|
|
37453
37498
|
refractCache: this.refractCache,
|
|
37499
|
+
visited: this.visited,
|
|
37454
37500
|
ancestors: ancestorsLineage
|
|
37455
37501
|
});
|
|
37456
37502
|
referencedElement = await (0,_speclynx_apidom_traverse__WEBPACK_IMPORTED_MODULE_7__.traverseAsync)(referencedElement, visitor, {
|
|
37457
|
-
mutable: true
|
|
37503
|
+
mutable: true,
|
|
37504
|
+
skipVisited: true
|
|
37458
37505
|
});
|
|
37459
37506
|
|
|
37460
37507
|
// remove referencing reference from ancestors lineage
|
|
@@ -37582,6 +37629,7 @@ class OpenAPI2DereferenceVisitor {
|
|
|
37582
37629
|
const replacer = this.options.dereference.strategyOpts['openapi-2']?.circularReplacer ?? this.options.dereference.circularReplacer;
|
|
37583
37630
|
const replacement = replacer(refElement);
|
|
37584
37631
|
path.replaceWith(replacement);
|
|
37632
|
+
path.skip();
|
|
37585
37633
|
return;
|
|
37586
37634
|
}
|
|
37587
37635
|
}
|
|
@@ -37597,7 +37645,11 @@ class OpenAPI2DereferenceVisitor {
|
|
|
37597
37645
|
*/
|
|
37598
37646
|
const isNonEntryDocument = _util_url_mjs__WEBPACK_IMPORTED_MODULE_20__.stripHash(reference.refSet.rootRef.uri) !== reference.uri;
|
|
37599
37647
|
const shouldDetectCircular = ['error', 'replace'].includes(this.options.dereference.circular);
|
|
37600
|
-
if ((isExternalReference || isNonEntryDocument || (0,_speclynx_apidom_ns_openapi_2__WEBPACK_IMPORTED_MODULE_11__.isJSONReferenceElement)(referencedElement) || shouldDetectCircular) && !ancestorsLineage.includesCycle(referencedElement)) {
|
|
37648
|
+
if ((isExternalReference || isNonEntryDocument || (0,_speclynx_apidom_ns_openapi_2__WEBPACK_IMPORTED_MODULE_11__.isJSONReferenceElement)(referencedElement) || shouldDetectCircular && !this.visited.has(referencedElement)) && !ancestorsLineage.includesCycle(referencedElement)) {
|
|
37649
|
+
if (shouldDetectCircular) {
|
|
37650
|
+
this.visited.add(referencedElement);
|
|
37651
|
+
}
|
|
37652
|
+
|
|
37601
37653
|
// append referencing reference to ancestors lineage
|
|
37602
37654
|
directAncestors.add(referencingElement);
|
|
37603
37655
|
const visitor = new OpenAPI2DereferenceVisitor({
|
|
@@ -37605,10 +37657,12 @@ class OpenAPI2DereferenceVisitor {
|
|
|
37605
37657
|
indirections: [...this.indirections],
|
|
37606
37658
|
options: this.options,
|
|
37607
37659
|
refractCache: this.refractCache,
|
|
37660
|
+
visited: this.visited,
|
|
37608
37661
|
ancestors: ancestorsLineage
|
|
37609
37662
|
});
|
|
37610
37663
|
referencedElement = await (0,_speclynx_apidom_traverse__WEBPACK_IMPORTED_MODULE_7__.traverseAsync)(referencedElement, visitor, {
|
|
37611
|
-
mutable: true
|
|
37664
|
+
mutable: true,
|
|
37665
|
+
skipVisited: true
|
|
37612
37666
|
});
|
|
37613
37667
|
|
|
37614
37668
|
// remove referencing reference from ancestors lineage
|
|
@@ -37631,6 +37685,7 @@ class OpenAPI2DereferenceVisitor {
|
|
|
37631
37685
|
* Transclude referencing element with merged referenced element.
|
|
37632
37686
|
*/
|
|
37633
37687
|
path.replaceWith(mergedElement);
|
|
37688
|
+
path.skip();
|
|
37634
37689
|
} catch (error) {
|
|
37635
37690
|
const $ref = (0,_speclynx_apidom_core__WEBPACK_IMPORTED_MODULE_4__["default"])(referencingElement.$ref);
|
|
37636
37691
|
this.handleError(`Error while dereferencing JSON Reference Object. Cannot resolve $ref "${$ref}": ${error.message}`, error, referencingElement, '$ref', $ref, path);
|
|
@@ -37719,12 +37774,16 @@ class OpenAPI3_0DereferenceStrategy extends _DereferenceStrategy_mjs__WEBPACK_IM
|
|
|
37719
37774
|
reference = mutableRefSet.find(ref => ref.uri === file.uri);
|
|
37720
37775
|
refSet = mutableRefSet;
|
|
37721
37776
|
}
|
|
37777
|
+
const shouldDetectCircular = ['error', 'replace'].includes(options.dereference.circular);
|
|
37722
37778
|
const visitor = new _visitor_mjs__WEBPACK_IMPORTED_MODULE_7__["default"]({
|
|
37723
37779
|
reference: reference,
|
|
37724
37780
|
options
|
|
37725
37781
|
});
|
|
37726
37782
|
const dereferencedElement = await (0,_speclynx_apidom_traverse__WEBPACK_IMPORTED_MODULE_1__.traverseAsync)(refSet.rootRef.value, visitor, {
|
|
37727
|
-
mutable: true
|
|
37783
|
+
mutable: true,
|
|
37784
|
+
...(shouldDetectCircular && {
|
|
37785
|
+
skipVisited: true
|
|
37786
|
+
})
|
|
37728
37787
|
});
|
|
37729
37788
|
|
|
37730
37789
|
/**
|
|
@@ -37808,6 +37867,7 @@ class OpenAPI3_0DereferenceVisitor {
|
|
|
37808
37867
|
reference;
|
|
37809
37868
|
options;
|
|
37810
37869
|
refractCache;
|
|
37870
|
+
visited;
|
|
37811
37871
|
|
|
37812
37872
|
/**
|
|
37813
37873
|
* Tracks element ancestors across dive-deep traversal boundaries.
|
|
@@ -37820,13 +37880,15 @@ class OpenAPI3_0DereferenceVisitor {
|
|
|
37820
37880
|
options,
|
|
37821
37881
|
indirections = [],
|
|
37822
37882
|
ancestors = new _util_mjs__WEBPACK_IMPORTED_MODULE_20__.AncestorLineage(),
|
|
37823
|
-
refractCache = new WeakMap()
|
|
37883
|
+
refractCache = new WeakMap(),
|
|
37884
|
+
visited = new WeakSet()
|
|
37824
37885
|
}) {
|
|
37825
37886
|
this.indirections = indirections;
|
|
37826
37887
|
this.reference = reference;
|
|
37827
37888
|
this.options = options;
|
|
37828
37889
|
this.ancestors = new _util_mjs__WEBPACK_IMPORTED_MODULE_20__.AncestorLineage(...ancestors);
|
|
37829
37890
|
this.refractCache = refractCache;
|
|
37891
|
+
this.visited = visited;
|
|
37830
37892
|
}
|
|
37831
37893
|
toAncestorLineage(path) {
|
|
37832
37894
|
const ancestorNodes = path.getAncestorNodes();
|
|
@@ -38059,6 +38121,7 @@ class OpenAPI3_0DereferenceVisitor {
|
|
|
38059
38121
|
const replacer = this.options.dereference.strategyOpts['openapi-3-0']?.circularReplacer ?? this.options.dereference.circularReplacer;
|
|
38060
38122
|
const replacement = replacer(refElement);
|
|
38061
38123
|
path.replaceWith(replacement);
|
|
38124
|
+
path.skip();
|
|
38062
38125
|
return;
|
|
38063
38126
|
}
|
|
38064
38127
|
}
|
|
@@ -38074,7 +38137,11 @@ class OpenAPI3_0DereferenceVisitor {
|
|
|
38074
38137
|
*/
|
|
38075
38138
|
const isNonEntryDocument = _util_url_mjs__WEBPACK_IMPORTED_MODULE_17__.stripHash(reference.refSet.rootRef.uri) !== reference.uri;
|
|
38076
38139
|
const shouldDetectCircular = ['error', 'replace'].includes(this.options.dereference.circular);
|
|
38077
|
-
if ((isExternalReference || isNonEntryDocument || (0,_speclynx_apidom_ns_openapi_3_0__WEBPACK_IMPORTED_MODULE_12__.isReferenceElement)(referencedElement) || shouldDetectCircular) && !ancestorsLineage.includesCycle(referencedElement)) {
|
|
38140
|
+
if ((isExternalReference || isNonEntryDocument || (0,_speclynx_apidom_ns_openapi_3_0__WEBPACK_IMPORTED_MODULE_12__.isReferenceElement)(referencedElement) || shouldDetectCircular && !this.visited.has(referencedElement)) && !ancestorsLineage.includesCycle(referencedElement)) {
|
|
38141
|
+
if (shouldDetectCircular) {
|
|
38142
|
+
this.visited.add(referencedElement);
|
|
38143
|
+
}
|
|
38144
|
+
|
|
38078
38145
|
// append referencing reference to ancestors lineage
|
|
38079
38146
|
directAncestors.add(referencingElement);
|
|
38080
38147
|
const visitor = new OpenAPI3_0DereferenceVisitor({
|
|
@@ -38082,10 +38149,12 @@ class OpenAPI3_0DereferenceVisitor {
|
|
|
38082
38149
|
indirections: [...this.indirections],
|
|
38083
38150
|
options: this.options,
|
|
38084
38151
|
refractCache: this.refractCache,
|
|
38152
|
+
visited: this.visited,
|
|
38085
38153
|
ancestors: ancestorsLineage
|
|
38086
38154
|
});
|
|
38087
38155
|
referencedElement = await (0,_speclynx_apidom_traverse__WEBPACK_IMPORTED_MODULE_8__.traverseAsync)(referencedElement, visitor, {
|
|
38088
|
-
mutable: true
|
|
38156
|
+
mutable: true,
|
|
38157
|
+
skipVisited: true
|
|
38089
38158
|
});
|
|
38090
38159
|
|
|
38091
38160
|
// remove referencing reference from ancestors lineage
|
|
@@ -38108,6 +38177,7 @@ class OpenAPI3_0DereferenceVisitor {
|
|
|
38108
38177
|
* Transclude referencing element with merged referenced element.
|
|
38109
38178
|
*/
|
|
38110
38179
|
path.replaceWith(mergedElement);
|
|
38180
|
+
path.skip();
|
|
38111
38181
|
} catch (error) {
|
|
38112
38182
|
const $ref = (0,_speclynx_apidom_core__WEBPACK_IMPORTED_MODULE_5__["default"])(referencingElement.$ref);
|
|
38113
38183
|
this.handleError(`Error while dereferencing Reference Object. Cannot resolve $ref "${$ref}": ${error.message}`, error, referencingElement, '$ref', $ref, path);
|
|
@@ -38195,6 +38265,7 @@ class OpenAPI3_0DereferenceVisitor {
|
|
|
38195
38265
|
const replacer = this.options.dereference.strategyOpts['openapi-3-0']?.circularReplacer ?? this.options.dereference.circularReplacer;
|
|
38196
38266
|
const replacement = replacer(refElement);
|
|
38197
38267
|
path.replaceWith(replacement);
|
|
38268
|
+
path.skip();
|
|
38198
38269
|
return;
|
|
38199
38270
|
}
|
|
38200
38271
|
}
|
|
@@ -38210,7 +38281,11 @@ class OpenAPI3_0DereferenceVisitor {
|
|
|
38210
38281
|
*/
|
|
38211
38282
|
const isNonEntryDocument = _util_url_mjs__WEBPACK_IMPORTED_MODULE_17__.stripHash(reference.refSet.rootRef.uri) !== reference.uri;
|
|
38212
38283
|
const shouldDetectCircular = ['error', 'replace'].includes(this.options.dereference.circular);
|
|
38213
|
-
if ((isExternalReference || isNonEntryDocument || (0,_speclynx_apidom_ns_openapi_3_0__WEBPACK_IMPORTED_MODULE_12__.isPathItemElement)(referencedElement) && (0,_speclynx_apidom_datamodel__WEBPACK_IMPORTED_MODULE_2__.isStringElement)(referencedElement.$ref) || shouldDetectCircular) && !ancestorsLineage.includesCycle(referencedElement)) {
|
|
38284
|
+
if ((isExternalReference || isNonEntryDocument || (0,_speclynx_apidom_ns_openapi_3_0__WEBPACK_IMPORTED_MODULE_12__.isPathItemElement)(referencedElement) && (0,_speclynx_apidom_datamodel__WEBPACK_IMPORTED_MODULE_2__.isStringElement)(referencedElement.$ref) || shouldDetectCircular && !this.visited.has(referencedElement)) && !ancestorsLineage.includesCycle(referencedElement)) {
|
|
38285
|
+
if (shouldDetectCircular) {
|
|
38286
|
+
this.visited.add(referencedElement);
|
|
38287
|
+
}
|
|
38288
|
+
|
|
38214
38289
|
// append referencing reference to ancestors lineage
|
|
38215
38290
|
directAncestors.add(referencingElement);
|
|
38216
38291
|
const visitor = new OpenAPI3_0DereferenceVisitor({
|
|
@@ -38218,10 +38293,12 @@ class OpenAPI3_0DereferenceVisitor {
|
|
|
38218
38293
|
indirections: [...this.indirections],
|
|
38219
38294
|
options: this.options,
|
|
38220
38295
|
refractCache: this.refractCache,
|
|
38296
|
+
visited: this.visited,
|
|
38221
38297
|
ancestors: ancestorsLineage
|
|
38222
38298
|
});
|
|
38223
38299
|
referencedElement = await (0,_speclynx_apidom_traverse__WEBPACK_IMPORTED_MODULE_8__.traverseAsync)(referencedElement, visitor, {
|
|
38224
|
-
mutable: true
|
|
38300
|
+
mutable: true,
|
|
38301
|
+
skipVisited: true
|
|
38225
38302
|
});
|
|
38226
38303
|
|
|
38227
38304
|
// remove referencing reference from ancestors lineage
|
|
@@ -38480,12 +38557,16 @@ class OpenAPI3_1DereferenceStrategy extends _DereferenceStrategy_mjs__WEBPACK_IM
|
|
|
38480
38557
|
reference = mutableRefSet.find(ref => ref.uri === file.uri);
|
|
38481
38558
|
refSet = mutableRefSet;
|
|
38482
38559
|
}
|
|
38560
|
+
const shouldDetectCircular = ['error', 'replace'].includes(options.dereference.circular);
|
|
38483
38561
|
const visitor = new _visitor_mjs__WEBPACK_IMPORTED_MODULE_8__["default"]({
|
|
38484
38562
|
reference: reference,
|
|
38485
38563
|
options
|
|
38486
38564
|
});
|
|
38487
38565
|
const dereferencedElement = await (0,_speclynx_apidom_traverse__WEBPACK_IMPORTED_MODULE_2__.traverseAsync)(refSet.rootRef.value, visitor, {
|
|
38488
|
-
mutable: true
|
|
38566
|
+
mutable: true,
|
|
38567
|
+
...(shouldDetectCircular && {
|
|
38568
|
+
skipVisited: true
|
|
38569
|
+
})
|
|
38489
38570
|
});
|
|
38490
38571
|
|
|
38491
38572
|
/**
|
|
@@ -38806,6 +38887,7 @@ class OpenAPI3_1DereferenceVisitor {
|
|
|
38806
38887
|
reference;
|
|
38807
38888
|
options;
|
|
38808
38889
|
refractCache;
|
|
38890
|
+
visited;
|
|
38809
38891
|
|
|
38810
38892
|
/**
|
|
38811
38893
|
* Tracks element ancestors across dive-deep traversal boundaries.
|
|
@@ -38818,13 +38900,15 @@ class OpenAPI3_1DereferenceVisitor {
|
|
|
38818
38900
|
options,
|
|
38819
38901
|
indirections = [],
|
|
38820
38902
|
refractCache = new WeakMap(),
|
|
38821
|
-
ancestors = new _util_mjs__WEBPACK_IMPORTED_MODULE_28__.AncestorLineage()
|
|
38903
|
+
ancestors = new _util_mjs__WEBPACK_IMPORTED_MODULE_28__.AncestorLineage(),
|
|
38904
|
+
visited = new WeakSet()
|
|
38822
38905
|
}) {
|
|
38823
38906
|
this.indirections = indirections;
|
|
38824
38907
|
this.reference = reference;
|
|
38825
38908
|
this.options = options;
|
|
38826
38909
|
this.refractCache = refractCache;
|
|
38827
38910
|
this.ancestors = new _util_mjs__WEBPACK_IMPORTED_MODULE_28__.AncestorLineage(...ancestors);
|
|
38911
|
+
this.visited = visited;
|
|
38828
38912
|
}
|
|
38829
38913
|
toAncestorLineage(path) {
|
|
38830
38914
|
const ancestorNodes = path.getAncestorNodes();
|
|
@@ -39057,6 +39141,7 @@ class OpenAPI3_1DereferenceVisitor {
|
|
|
39057
39141
|
const replacer = this.options.dereference.strategyOpts['openapi-3-1']?.circularReplacer ?? this.options.dereference.circularReplacer;
|
|
39058
39142
|
const replacement = replacer(refElement);
|
|
39059
39143
|
path.replaceWith(replacement);
|
|
39144
|
+
path.skip();
|
|
39060
39145
|
return;
|
|
39061
39146
|
}
|
|
39062
39147
|
}
|
|
@@ -39072,17 +39157,22 @@ class OpenAPI3_1DereferenceVisitor {
|
|
|
39072
39157
|
*/
|
|
39073
39158
|
const isNonEntryDocument = _util_url_mjs__WEBPACK_IMPORTED_MODULE_23__.stripHash(reference.refSet.rootRef.uri) !== reference.uri;
|
|
39074
39159
|
const shouldDetectCircular = ['error', 'replace'].includes(this.options.dereference.circular);
|
|
39075
|
-
if ((isExternalReference || isNonEntryDocument || (0,_speclynx_apidom_ns_openapi_3_1__WEBPACK_IMPORTED_MODULE_16__.isReferenceElement)(referencedElement) || shouldDetectCircular) && !ancestorsLineage.includesCycle(referencedElement)) {
|
|
39160
|
+
if ((isExternalReference || isNonEntryDocument || (0,_speclynx_apidom_ns_openapi_3_1__WEBPACK_IMPORTED_MODULE_16__.isReferenceElement)(referencedElement) || shouldDetectCircular && !this.visited.has(referencedElement)) && !ancestorsLineage.includesCycle(referencedElement)) {
|
|
39161
|
+
if (shouldDetectCircular) {
|
|
39162
|
+
this.visited.add(referencedElement);
|
|
39163
|
+
}
|
|
39076
39164
|
directAncestors.add(referencingElement);
|
|
39077
39165
|
const visitor = new OpenAPI3_1DereferenceVisitor({
|
|
39078
39166
|
reference,
|
|
39079
39167
|
indirections: [...this.indirections],
|
|
39080
39168
|
options: this.options,
|
|
39081
39169
|
refractCache: this.refractCache,
|
|
39170
|
+
visited: this.visited,
|
|
39082
39171
|
ancestors: ancestorsLineage
|
|
39083
39172
|
});
|
|
39084
39173
|
referencedElement = await (0,_speclynx_apidom_traverse__WEBPACK_IMPORTED_MODULE_10__.traverseAsync)(referencedElement, visitor, {
|
|
39085
|
-
mutable: true
|
|
39174
|
+
mutable: true,
|
|
39175
|
+
skipVisited: true
|
|
39086
39176
|
});
|
|
39087
39177
|
directAncestors.delete(referencingElement);
|
|
39088
39178
|
}
|
|
@@ -39209,6 +39299,7 @@ class OpenAPI3_1DereferenceVisitor {
|
|
|
39209
39299
|
const replacer = this.options.dereference.strategyOpts['openapi-3-1']?.circularReplacer ?? this.options.dereference.circularReplacer;
|
|
39210
39300
|
const replacement = replacer(refElement);
|
|
39211
39301
|
path.replaceWith(replacement);
|
|
39302
|
+
path.skip();
|
|
39212
39303
|
return;
|
|
39213
39304
|
}
|
|
39214
39305
|
}
|
|
@@ -39224,17 +39315,22 @@ class OpenAPI3_1DereferenceVisitor {
|
|
|
39224
39315
|
*/
|
|
39225
39316
|
const isNonEntryDocument = _util_url_mjs__WEBPACK_IMPORTED_MODULE_23__.stripHash(reference.refSet.rootRef.uri) !== reference.uri;
|
|
39226
39317
|
const shouldDetectCircular = ['error', 'replace'].includes(this.options.dereference.circular);
|
|
39227
|
-
if ((isExternalReference || isNonEntryDocument || (0,_speclynx_apidom_ns_openapi_3_1__WEBPACK_IMPORTED_MODULE_16__.isPathItemElement)(referencedElement) && (0,_speclynx_apidom_datamodel__WEBPACK_IMPORTED_MODULE_3__.isStringElement)(referencedElement.$ref) || shouldDetectCircular) && !ancestorsLineage.includesCycle(referencedElement)) {
|
|
39318
|
+
if ((isExternalReference || isNonEntryDocument || (0,_speclynx_apidom_ns_openapi_3_1__WEBPACK_IMPORTED_MODULE_16__.isPathItemElement)(referencedElement) && (0,_speclynx_apidom_datamodel__WEBPACK_IMPORTED_MODULE_3__.isStringElement)(referencedElement.$ref) || shouldDetectCircular && !this.visited.has(referencedElement)) && !ancestorsLineage.includesCycle(referencedElement)) {
|
|
39319
|
+
if (shouldDetectCircular) {
|
|
39320
|
+
this.visited.add(referencedElement);
|
|
39321
|
+
}
|
|
39228
39322
|
directAncestors.add(referencingElement);
|
|
39229
39323
|
const visitor = new OpenAPI3_1DereferenceVisitor({
|
|
39230
39324
|
reference,
|
|
39231
39325
|
indirections: [...this.indirections],
|
|
39232
39326
|
options: this.options,
|
|
39233
39327
|
refractCache: this.refractCache,
|
|
39328
|
+
visited: this.visited,
|
|
39234
39329
|
ancestors: ancestorsLineage
|
|
39235
39330
|
});
|
|
39236
39331
|
referencedElement = await (0,_speclynx_apidom_traverse__WEBPACK_IMPORTED_MODULE_10__.traverseAsync)(referencedElement, visitor, {
|
|
39237
|
-
mutable: true
|
|
39332
|
+
mutable: true,
|
|
39333
|
+
skipVisited: true
|
|
39238
39334
|
});
|
|
39239
39335
|
directAncestors.delete(referencingElement);
|
|
39240
39336
|
}
|
|
@@ -39565,6 +39661,7 @@ class OpenAPI3_1DereferenceVisitor {
|
|
|
39565
39661
|
const replacer = this.options.dereference.strategyOpts['openapi-3-1']?.circularReplacer ?? this.options.dereference.circularReplacer;
|
|
39566
39662
|
const replacement = replacer(refElement);
|
|
39567
39663
|
path.replaceWith(replacement);
|
|
39664
|
+
path.skip();
|
|
39568
39665
|
return;
|
|
39569
39666
|
}
|
|
39570
39667
|
}
|
|
@@ -39580,17 +39677,22 @@ class OpenAPI3_1DereferenceVisitor {
|
|
|
39580
39677
|
*/
|
|
39581
39678
|
const isNonEntryDocument = _util_url_mjs__WEBPACK_IMPORTED_MODULE_23__.stripHash(reference.refSet.rootRef.uri) !== reference.uri;
|
|
39582
39679
|
const shouldDetectCircular = ['error', 'replace'].includes(this.options.dereference.circular);
|
|
39583
|
-
if ((isExternalReference || isNonEntryDocument || (0,_speclynx_apidom_ns_openapi_3_1__WEBPACK_IMPORTED_MODULE_16__.isSchemaElement)(referencedElement) && (0,_speclynx_apidom_datamodel__WEBPACK_IMPORTED_MODULE_3__.isStringElement)(referencedElement.$ref) || shouldDetectCircular) && !ancestorsLineage.includesCycle(referencedElement)) {
|
|
39680
|
+
if ((isExternalReference || isNonEntryDocument || (0,_speclynx_apidom_ns_openapi_3_1__WEBPACK_IMPORTED_MODULE_16__.isSchemaElement)(referencedElement) && (0,_speclynx_apidom_datamodel__WEBPACK_IMPORTED_MODULE_3__.isStringElement)(referencedElement.$ref) || shouldDetectCircular && !this.visited.has(referencedElement)) && !ancestorsLineage.includesCycle(referencedElement)) {
|
|
39681
|
+
if (shouldDetectCircular) {
|
|
39682
|
+
this.visited.add(referencedElement);
|
|
39683
|
+
}
|
|
39584
39684
|
directAncestors.add(referencingElement);
|
|
39585
39685
|
const visitor = new OpenAPI3_1DereferenceVisitor({
|
|
39586
39686
|
reference,
|
|
39587
39687
|
indirections: [...this.indirections],
|
|
39588
39688
|
options: this.options,
|
|
39589
39689
|
refractCache: this.refractCache,
|
|
39690
|
+
visited: this.visited,
|
|
39590
39691
|
ancestors: ancestorsLineage
|
|
39591
39692
|
});
|
|
39592
39693
|
referencedElement = await (0,_speclynx_apidom_traverse__WEBPACK_IMPORTED_MODULE_10__.traverseAsync)(referencedElement, visitor, {
|
|
39593
|
-
mutable: true
|
|
39694
|
+
mutable: true,
|
|
39695
|
+
skipVisited: true
|
|
39594
39696
|
});
|
|
39595
39697
|
directAncestors.delete(referencingElement);
|
|
39596
39698
|
}
|
|
@@ -39606,6 +39708,7 @@ class OpenAPI3_1DereferenceVisitor {
|
|
|
39606
39708
|
booleanJsonSchemaElement.meta.set('ref-origin', reference.uri);
|
|
39607
39709
|
booleanJsonSchemaElement.meta.set('ref-type', referencingElement.element);
|
|
39608
39710
|
path.replaceWith(booleanJsonSchemaElement);
|
|
39711
|
+
path.skip();
|
|
39609
39712
|
return;
|
|
39610
39713
|
}
|
|
39611
39714
|
|
|
@@ -43134,10 +43237,12 @@ function* traverseGenerator(root, visitor, options) {
|
|
|
43134
43237
|
nodePredicate,
|
|
43135
43238
|
nodeCloneFn,
|
|
43136
43239
|
detectCycles,
|
|
43240
|
+
skipVisited,
|
|
43137
43241
|
mutable,
|
|
43138
43242
|
mutationFn
|
|
43139
43243
|
} = options;
|
|
43140
43244
|
const keyMapIsFunction = typeof keyMap === 'function';
|
|
43245
|
+
const visitedNodes = skipVisited ? new WeakSet() : null;
|
|
43141
43246
|
let stack;
|
|
43142
43247
|
let inArray = Array.isArray(root);
|
|
43143
43248
|
let keys = [root];
|
|
@@ -43223,6 +43328,14 @@ function* traverseGenerator(root, visitor, options) {
|
|
|
43223
43328
|
continue;
|
|
43224
43329
|
}
|
|
43225
43330
|
|
|
43331
|
+
// Skip already-visited nodes (handles DAG structures from cloneShallow)
|
|
43332
|
+
if (skipVisited && !isLeaving) {
|
|
43333
|
+
if (visitedNodes.has(node)) {
|
|
43334
|
+
continue;
|
|
43335
|
+
}
|
|
43336
|
+
visitedNodes.add(node);
|
|
43337
|
+
}
|
|
43338
|
+
|
|
43226
43339
|
// Always create Path for the current node (needed for parentPath chain)
|
|
43227
43340
|
currentPath = new _Path_mjs__WEBPACK_IMPORTED_MODULE_2__.Path(node, parent, parentPath, key, inArray);
|
|
43228
43341
|
const visitFn = (0,_visitors_mjs__WEBPACK_IMPORTED_MODULE_3__.getVisitFn)(visitor, nodeTypeGetter(node), isLeaving);
|
|
@@ -43243,11 +43356,6 @@ function* traverseGenerator(root, visitor, options) {
|
|
|
43243
43356
|
if (currentPath.shouldStop) {
|
|
43244
43357
|
break;
|
|
43245
43358
|
}
|
|
43246
|
-
if (currentPath.shouldSkip) {
|
|
43247
|
-
if (!isLeaving) {
|
|
43248
|
-
continue;
|
|
43249
|
-
}
|
|
43250
|
-
}
|
|
43251
43359
|
if (currentPath.removed) {
|
|
43252
43360
|
edits.push([key, null]);
|
|
43253
43361
|
if (!isLeaving) {
|
|
@@ -43257,12 +43365,19 @@ function* traverseGenerator(root, visitor, options) {
|
|
|
43257
43365
|
const replacement = currentPath._getReplacementNode();
|
|
43258
43366
|
edits.push([key, replacement]);
|
|
43259
43367
|
if (!isLeaving) {
|
|
43368
|
+
if (currentPath.shouldSkip) {
|
|
43369
|
+
continue;
|
|
43370
|
+
}
|
|
43260
43371
|
if (nodePredicate(replacement)) {
|
|
43261
43372
|
node = replacement;
|
|
43262
43373
|
} else {
|
|
43263
43374
|
continue;
|
|
43264
43375
|
}
|
|
43265
43376
|
}
|
|
43377
|
+
} else if (currentPath.shouldSkip) {
|
|
43378
|
+
if (!isLeaving) {
|
|
43379
|
+
continue;
|
|
43380
|
+
}
|
|
43266
43381
|
} else if (result !== undefined) {
|
|
43267
43382
|
// Support return value replacement for backwards compatibility
|
|
43268
43383
|
edits.push([key, result]);
|
|
@@ -43364,6 +43479,7 @@ const traverse = (root, visitor, options = {}) => {
|
|
|
43364
43479
|
nodePredicate: options.nodePredicate ?? _visitors_mjs__WEBPACK_IMPORTED_MODULE_3__.isNode,
|
|
43365
43480
|
nodeCloneFn: options.nodeCloneFn ?? _visitors_mjs__WEBPACK_IMPORTED_MODULE_3__.cloneNode,
|
|
43366
43481
|
detectCycles: options.detectCycles ?? true,
|
|
43482
|
+
skipVisited: options.skipVisited ?? false,
|
|
43367
43483
|
mutable: options.mutable ?? false,
|
|
43368
43484
|
mutationFn: options.mutationFn ?? _visitors_mjs__WEBPACK_IMPORTED_MODULE_3__.mutateNode
|
|
43369
43485
|
};
|
|
@@ -43395,6 +43511,7 @@ const traverseAsync = async (root, visitor, options = {}) => {
|
|
|
43395
43511
|
nodePredicate: options.nodePredicate ?? _visitors_mjs__WEBPACK_IMPORTED_MODULE_3__.isNode,
|
|
43396
43512
|
nodeCloneFn: options.nodeCloneFn ?? _visitors_mjs__WEBPACK_IMPORTED_MODULE_3__.cloneNode,
|
|
43397
43513
|
detectCycles: options.detectCycles ?? true,
|
|
43514
|
+
skipVisited: options.skipVisited ?? false,
|
|
43398
43515
|
mutable: options.mutable ?? false,
|
|
43399
43516
|
mutationFn: options.mutationFn ?? _visitors_mjs__WEBPACK_IMPORTED_MODULE_3__.mutateNode
|
|
43400
43517
|
};
|
|
@@ -55143,11 +55260,13 @@ const knownAdapters = {
|
|
|
55143
55260
|
_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].forEach(knownAdapters, (fn, value) => {
|
|
55144
55261
|
if (fn) {
|
|
55145
55262
|
try {
|
|
55146
|
-
Object.
|
|
55263
|
+
// Null-proto descriptors so a polluted Object.prototype.get cannot turn
|
|
55264
|
+
// these data descriptors into accessor descriptors on the way in.
|
|
55265
|
+
Object.defineProperty(fn, 'name', { __proto__: null, value });
|
|
55147
55266
|
} catch (e) {
|
|
55148
55267
|
// eslint-disable-next-line no-empty
|
|
55149
55268
|
}
|
|
55150
|
-
Object.defineProperty(fn, 'adapterName', { value });
|
|
55269
|
+
Object.defineProperty(fn, 'adapterName', { __proto__: null, value });
|
|
55151
55270
|
}
|
|
55152
55271
|
});
|
|
55153
55272
|
|
|
@@ -55268,6 +55387,9 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
55268
55387
|
/* harmony import */ var _helpers_progressEventReducer_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(79194);
|
|
55269
55388
|
/* harmony import */ var _helpers_resolveConfig_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(28451);
|
|
55270
55389
|
/* harmony import */ var _core_settle_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(40788);
|
|
55390
|
+
/* harmony import */ var _helpers_estimateDataURLDecodedBytes_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(879);
|
|
55391
|
+
/* harmony import */ var _env_data_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(18679);
|
|
55392
|
+
/* harmony import */ var _helpers_sanitizeHeaderValue_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(51306);
|
|
55271
55393
|
|
|
55272
55394
|
|
|
55273
55395
|
|
|
@@ -55278,16 +55400,12 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
55278
55400
|
|
|
55279
55401
|
|
|
55280
55402
|
|
|
55281
|
-
const DEFAULT_CHUNK_SIZE = 64 * 1024;
|
|
55282
55403
|
|
|
55283
|
-
const { isFunction } = _utils_js__WEBPACK_IMPORTED_MODULE_1__["default"];
|
|
55284
55404
|
|
|
55285
|
-
const globalFetchAPI = (({ Request, Response }) => ({
|
|
55286
|
-
Request,
|
|
55287
|
-
Response,
|
|
55288
|
-
}))(_utils_js__WEBPACK_IMPORTED_MODULE_1__["default"].global);
|
|
55289
55405
|
|
|
55290
|
-
const
|
|
55406
|
+
const DEFAULT_CHUNK_SIZE = 64 * 1024;
|
|
55407
|
+
|
|
55408
|
+
const { isFunction } = _utils_js__WEBPACK_IMPORTED_MODULE_1__["default"];
|
|
55291
55409
|
|
|
55292
55410
|
const test = (fn, ...args) => {
|
|
55293
55411
|
try {
|
|
@@ -55298,11 +55416,20 @@ const test = (fn, ...args) => {
|
|
|
55298
55416
|
};
|
|
55299
55417
|
|
|
55300
55418
|
const factory = (env) => {
|
|
55419
|
+
const globalObject =
|
|
55420
|
+
_utils_js__WEBPACK_IMPORTED_MODULE_1__["default"].global !== undefined && _utils_js__WEBPACK_IMPORTED_MODULE_1__["default"].global !== null
|
|
55421
|
+
? _utils_js__WEBPACK_IMPORTED_MODULE_1__["default"].global
|
|
55422
|
+
: globalThis;
|
|
55423
|
+
const { ReadableStream, TextEncoder } = globalObject;
|
|
55424
|
+
|
|
55301
55425
|
env = _utils_js__WEBPACK_IMPORTED_MODULE_1__["default"].merge.call(
|
|
55302
55426
|
{
|
|
55303
55427
|
skipUndefined: true,
|
|
55304
55428
|
},
|
|
55305
|
-
|
|
55429
|
+
{
|
|
55430
|
+
Request: globalObject.Request,
|
|
55431
|
+
Response: globalObject.Response,
|
|
55432
|
+
},
|
|
55306
55433
|
env
|
|
55307
55434
|
);
|
|
55308
55435
|
|
|
@@ -55332,18 +55459,20 @@ const factory = (env) => {
|
|
|
55332
55459
|
test(() => {
|
|
55333
55460
|
let duplexAccessed = false;
|
|
55334
55461
|
|
|
55335
|
-
const
|
|
55336
|
-
|
|
55337
|
-
const hasContentType = new Request(_platform_index_js__WEBPACK_IMPORTED_MODULE_0__["default"].origin, {
|
|
55338
|
-
body,
|
|
55462
|
+
const request = new Request(_platform_index_js__WEBPACK_IMPORTED_MODULE_0__["default"].origin, {
|
|
55463
|
+
body: new ReadableStream(),
|
|
55339
55464
|
method: 'POST',
|
|
55340
55465
|
get duplex() {
|
|
55341
55466
|
duplexAccessed = true;
|
|
55342
55467
|
return 'half';
|
|
55343
55468
|
},
|
|
55344
|
-
})
|
|
55469
|
+
});
|
|
55470
|
+
|
|
55471
|
+
const hasContentType = request.headers.has('Content-Type');
|
|
55345
55472
|
|
|
55346
|
-
body
|
|
55473
|
+
if (request.body != null) {
|
|
55474
|
+
request.body.cancel();
|
|
55475
|
+
}
|
|
55347
55476
|
|
|
55348
55477
|
return duplexAccessed && !hasContentType;
|
|
55349
55478
|
});
|
|
@@ -55427,8 +55556,13 @@ const factory = (env) => {
|
|
|
55427
55556
|
headers,
|
|
55428
55557
|
withCredentials = 'same-origin',
|
|
55429
55558
|
fetchOptions,
|
|
55559
|
+
maxContentLength,
|
|
55560
|
+
maxBodyLength,
|
|
55430
55561
|
} = (0,_helpers_resolveConfig_js__WEBPACK_IMPORTED_MODULE_7__["default"])(config);
|
|
55431
55562
|
|
|
55563
|
+
const hasMaxContentLength = _utils_js__WEBPACK_IMPORTED_MODULE_1__["default"].isNumber(maxContentLength) && maxContentLength > -1;
|
|
55564
|
+
const hasMaxBodyLength = _utils_js__WEBPACK_IMPORTED_MODULE_1__["default"].isNumber(maxBodyLength) && maxBodyLength > -1;
|
|
55565
|
+
|
|
55432
55566
|
let _fetch = envFetch || fetch;
|
|
55433
55567
|
|
|
55434
55568
|
responseType = responseType ? (responseType + '').toLowerCase() : 'text';
|
|
@@ -55450,6 +55584,41 @@ const factory = (env) => {
|
|
|
55450
55584
|
let requestContentLength;
|
|
55451
55585
|
|
|
55452
55586
|
try {
|
|
55587
|
+
// Enforce maxContentLength for data: URLs up-front so we never materialize
|
|
55588
|
+
// an oversized payload. The HTTP adapter applies the same check (see http.js
|
|
55589
|
+
// "if (protocol === 'data:')" branch).
|
|
55590
|
+
if (hasMaxContentLength && typeof url === 'string' && url.startsWith('data:')) {
|
|
55591
|
+
const estimated = (0,_helpers_estimateDataURLDecodedBytes_js__WEBPACK_IMPORTED_MODULE_9__["default"])(url);
|
|
55592
|
+
if (estimated > maxContentLength) {
|
|
55593
|
+
throw new _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_2__["default"](
|
|
55594
|
+
'maxContentLength size of ' + maxContentLength + ' exceeded',
|
|
55595
|
+
_core_AxiosError_js__WEBPACK_IMPORTED_MODULE_2__["default"].ERR_BAD_RESPONSE,
|
|
55596
|
+
config,
|
|
55597
|
+
request
|
|
55598
|
+
);
|
|
55599
|
+
}
|
|
55600
|
+
}
|
|
55601
|
+
|
|
55602
|
+
// Enforce maxBodyLength against the outbound request body before dispatch.
|
|
55603
|
+
// Mirrors http.js behavior (ERR_BAD_REQUEST / 'Request body larger than
|
|
55604
|
+
// maxBodyLength limit'). Skip when the body length cannot be determined
|
|
55605
|
+
// (e.g. a live ReadableStream supplied by the caller).
|
|
55606
|
+
if (hasMaxBodyLength && method !== 'get' && method !== 'head') {
|
|
55607
|
+
const outboundLength = await resolveBodyLength(headers, data);
|
|
55608
|
+
if (
|
|
55609
|
+
typeof outboundLength === 'number' &&
|
|
55610
|
+
isFinite(outboundLength) &&
|
|
55611
|
+
outboundLength > maxBodyLength
|
|
55612
|
+
) {
|
|
55613
|
+
throw new _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_2__["default"](
|
|
55614
|
+
'Request body larger than maxBodyLength limit',
|
|
55615
|
+
_core_AxiosError_js__WEBPACK_IMPORTED_MODULE_2__["default"].ERR_BAD_REQUEST,
|
|
55616
|
+
config,
|
|
55617
|
+
request
|
|
55618
|
+
);
|
|
55619
|
+
}
|
|
55620
|
+
}
|
|
55621
|
+
|
|
55453
55622
|
if (
|
|
55454
55623
|
onUploadProgress &&
|
|
55455
55624
|
supportsRequestStream &&
|
|
@@ -55487,11 +55656,27 @@ const factory = (env) => {
|
|
|
55487
55656
|
// see https://github.com/cloudflare/workerd/issues/902
|
|
55488
55657
|
const isCredentialsSupported = isRequestSupported && 'credentials' in Request.prototype;
|
|
55489
55658
|
|
|
55659
|
+
// If data is FormData and Content-Type is multipart/form-data without boundary,
|
|
55660
|
+
// delete it so fetch can set it correctly with the boundary
|
|
55661
|
+
if (_utils_js__WEBPACK_IMPORTED_MODULE_1__["default"].isFormData(data)) {
|
|
55662
|
+
const contentType = headers.getContentType();
|
|
55663
|
+
if (
|
|
55664
|
+
contentType &&
|
|
55665
|
+
/^multipart\/form-data/i.test(contentType) &&
|
|
55666
|
+
!/boundary=/i.test(contentType)
|
|
55667
|
+
) {
|
|
55668
|
+
headers.delete('content-type');
|
|
55669
|
+
}
|
|
55670
|
+
}
|
|
55671
|
+
|
|
55672
|
+
// Set User-Agent header if not already set (fetch defaults to 'node' in Node.js)
|
|
55673
|
+
headers.set('User-Agent', 'axios/' + _env_data_js__WEBPACK_IMPORTED_MODULE_10__.VERSION, false);
|
|
55674
|
+
|
|
55490
55675
|
const resolvedOptions = {
|
|
55491
55676
|
...fetchOptions,
|
|
55492
55677
|
signal: composedSignal,
|
|
55493
55678
|
method: method.toUpperCase(),
|
|
55494
|
-
headers: headers.normalize()
|
|
55679
|
+
headers: (0,_helpers_sanitizeHeaderValue_js__WEBPACK_IMPORTED_MODULE_11__.toByteStringHeaderObject)(headers.normalize()),
|
|
55495
55680
|
body: data,
|
|
55496
55681
|
duplex: 'half',
|
|
55497
55682
|
credentials: isCredentialsSupported ? withCredentials : undefined,
|
|
@@ -55503,10 +55688,28 @@ const factory = (env) => {
|
|
|
55503
55688
|
? _fetch(request, fetchOptions)
|
|
55504
55689
|
: _fetch(url, resolvedOptions));
|
|
55505
55690
|
|
|
55691
|
+
// Cheap pre-check: if the server honestly declares a content-length that
|
|
55692
|
+
// already exceeds the cap, reject before we start streaming.
|
|
55693
|
+
if (hasMaxContentLength) {
|
|
55694
|
+
const declaredLength = _utils_js__WEBPACK_IMPORTED_MODULE_1__["default"].toFiniteNumber(response.headers.get('content-length'));
|
|
55695
|
+
if (declaredLength != null && declaredLength > maxContentLength) {
|
|
55696
|
+
throw new _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_2__["default"](
|
|
55697
|
+
'maxContentLength size of ' + maxContentLength + ' exceeded',
|
|
55698
|
+
_core_AxiosError_js__WEBPACK_IMPORTED_MODULE_2__["default"].ERR_BAD_RESPONSE,
|
|
55699
|
+
config,
|
|
55700
|
+
request
|
|
55701
|
+
);
|
|
55702
|
+
}
|
|
55703
|
+
}
|
|
55704
|
+
|
|
55506
55705
|
const isStreamResponse =
|
|
55507
55706
|
supportsResponseStream && (responseType === 'stream' || responseType === 'response');
|
|
55508
55707
|
|
|
55509
|
-
if (
|
|
55708
|
+
if (
|
|
55709
|
+
supportsResponseStream &&
|
|
55710
|
+
response.body &&
|
|
55711
|
+
(onDownloadProgress || hasMaxContentLength || (isStreamResponse && unsubscribe))
|
|
55712
|
+
) {
|
|
55510
55713
|
const options = {};
|
|
55511
55714
|
|
|
55512
55715
|
['status', 'statusText', 'headers'].forEach((prop) => {
|
|
@@ -55523,8 +55726,24 @@ const factory = (env) => {
|
|
|
55523
55726
|
)) ||
|
|
55524
55727
|
[];
|
|
55525
55728
|
|
|
55729
|
+
let bytesRead = 0;
|
|
55730
|
+
const onChunkProgress = (loadedBytes) => {
|
|
55731
|
+
if (hasMaxContentLength) {
|
|
55732
|
+
bytesRead = loadedBytes;
|
|
55733
|
+
if (bytesRead > maxContentLength) {
|
|
55734
|
+
throw new _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_2__["default"](
|
|
55735
|
+
'maxContentLength size of ' + maxContentLength + ' exceeded',
|
|
55736
|
+
_core_AxiosError_js__WEBPACK_IMPORTED_MODULE_2__["default"].ERR_BAD_RESPONSE,
|
|
55737
|
+
config,
|
|
55738
|
+
request
|
|
55739
|
+
);
|
|
55740
|
+
}
|
|
55741
|
+
}
|
|
55742
|
+
onProgress && onProgress(loadedBytes);
|
|
55743
|
+
};
|
|
55744
|
+
|
|
55526
55745
|
response = new Response(
|
|
55527
|
-
(0,_helpers_trackStream_js__WEBPACK_IMPORTED_MODULE_4__.trackStream)(response.body, DEFAULT_CHUNK_SIZE,
|
|
55746
|
+
(0,_helpers_trackStream_js__WEBPACK_IMPORTED_MODULE_4__.trackStream)(response.body, DEFAULT_CHUNK_SIZE, onChunkProgress, () => {
|
|
55528
55747
|
flush && flush();
|
|
55529
55748
|
unsubscribe && unsubscribe();
|
|
55530
55749
|
}),
|
|
@@ -55539,6 +55758,33 @@ const factory = (env) => {
|
|
|
55539
55758
|
config
|
|
55540
55759
|
);
|
|
55541
55760
|
|
|
55761
|
+
// Fallback enforcement for environments without ReadableStream support
|
|
55762
|
+
// (legacy runtimes). Detect materialized size from typed output; skip
|
|
55763
|
+
// streams/Response passthrough since the user will read those themselves.
|
|
55764
|
+
if (hasMaxContentLength && !supportsResponseStream && !isStreamResponse) {
|
|
55765
|
+
let materializedSize;
|
|
55766
|
+
if (responseData != null) {
|
|
55767
|
+
if (typeof responseData.byteLength === 'number') {
|
|
55768
|
+
materializedSize = responseData.byteLength;
|
|
55769
|
+
} else if (typeof responseData.size === 'number') {
|
|
55770
|
+
materializedSize = responseData.size;
|
|
55771
|
+
} else if (typeof responseData === 'string') {
|
|
55772
|
+
materializedSize =
|
|
55773
|
+
typeof TextEncoder === 'function'
|
|
55774
|
+
? new TextEncoder().encode(responseData).byteLength
|
|
55775
|
+
: responseData.length;
|
|
55776
|
+
}
|
|
55777
|
+
}
|
|
55778
|
+
if (typeof materializedSize === 'number' && materializedSize > maxContentLength) {
|
|
55779
|
+
throw new _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_2__["default"](
|
|
55780
|
+
'maxContentLength size of ' + maxContentLength + ' exceeded',
|
|
55781
|
+
_core_AxiosError_js__WEBPACK_IMPORTED_MODULE_2__["default"].ERR_BAD_RESPONSE,
|
|
55782
|
+
config,
|
|
55783
|
+
request
|
|
55784
|
+
);
|
|
55785
|
+
}
|
|
55786
|
+
}
|
|
55787
|
+
|
|
55542
55788
|
!isStreamResponse && unsubscribe && unsubscribe();
|
|
55543
55789
|
|
|
55544
55790
|
return await new Promise((resolve, reject) => {
|
|
@@ -55554,6 +55800,17 @@ const factory = (env) => {
|
|
|
55554
55800
|
} catch (err) {
|
|
55555
55801
|
unsubscribe && unsubscribe();
|
|
55556
55802
|
|
|
55803
|
+
// Safari can surface fetch aborts as a DOMException-like object whose
|
|
55804
|
+
// branded getters throw. Prefer our composed signal reason before reading
|
|
55805
|
+
// the caught error, preserving timeout vs cancellation semantics.
|
|
55806
|
+
if (composedSignal && composedSignal.aborted && composedSignal.reason instanceof _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_2__["default"]) {
|
|
55807
|
+
const canceledError = composedSignal.reason;
|
|
55808
|
+
canceledError.config = config;
|
|
55809
|
+
request && (canceledError.request = request);
|
|
55810
|
+
err !== canceledError && (canceledError.cause = err);
|
|
55811
|
+
throw canceledError;
|
|
55812
|
+
}
|
|
55813
|
+
|
|
55557
55814
|
if (err && err.name === 'TypeError' && /Load failed|fetch/i.test(err.message)) {
|
|
55558
55815
|
throw Object.assign(
|
|
55559
55816
|
new _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_2__["default"](
|
|
@@ -55624,6 +55881,8 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
55624
55881
|
/* harmony import */ var _core_AxiosHeaders_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(76487);
|
|
55625
55882
|
/* harmony import */ var _helpers_progressEventReducer_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(79194);
|
|
55626
55883
|
/* harmony import */ var _helpers_resolveConfig_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(28451);
|
|
55884
|
+
/* harmony import */ var _helpers_sanitizeHeaderValue_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(51306);
|
|
55885
|
+
|
|
55627
55886
|
|
|
55628
55887
|
|
|
55629
55888
|
|
|
@@ -55717,7 +55976,7 @@ const isXHRAdapterSupported = typeof XMLHttpRequest !== 'undefined';
|
|
|
55717
55976
|
// will return status as 0 even though it's a successful request
|
|
55718
55977
|
if (
|
|
55719
55978
|
request.status === 0 &&
|
|
55720
|
-
!(request.responseURL && request.responseURL.
|
|
55979
|
+
!(request.responseURL && request.responseURL.startsWith('file:'))
|
|
55721
55980
|
) {
|
|
55722
55981
|
return;
|
|
55723
55982
|
}
|
|
@@ -55734,6 +55993,7 @@ const isXHRAdapterSupported = typeof XMLHttpRequest !== 'undefined';
|
|
|
55734
55993
|
}
|
|
55735
55994
|
|
|
55736
55995
|
reject(new _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_3__["default"]('Request aborted', _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_3__["default"].ECONNABORTED, config, request));
|
|
55996
|
+
done();
|
|
55737
55997
|
|
|
55738
55998
|
// Clean up request
|
|
55739
55999
|
request = null;
|
|
@@ -55749,6 +56009,7 @@ const isXHRAdapterSupported = typeof XMLHttpRequest !== 'undefined';
|
|
|
55749
56009
|
// attach the underlying event for consumers who want details
|
|
55750
56010
|
err.event = event || null;
|
|
55751
56011
|
reject(err);
|
|
56012
|
+
done();
|
|
55752
56013
|
request = null;
|
|
55753
56014
|
};
|
|
55754
56015
|
|
|
@@ -55769,6 +56030,7 @@ const isXHRAdapterSupported = typeof XMLHttpRequest !== 'undefined';
|
|
|
55769
56030
|
request
|
|
55770
56031
|
)
|
|
55771
56032
|
);
|
|
56033
|
+
done();
|
|
55772
56034
|
|
|
55773
56035
|
// Clean up request
|
|
55774
56036
|
request = null;
|
|
@@ -55779,7 +56041,7 @@ const isXHRAdapterSupported = typeof XMLHttpRequest !== 'undefined';
|
|
|
55779
56041
|
|
|
55780
56042
|
// Add headers to the request
|
|
55781
56043
|
if ('setRequestHeader' in request) {
|
|
55782
|
-
_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].forEach(
|
|
56044
|
+
_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].forEach((0,_helpers_sanitizeHeaderValue_js__WEBPACK_IMPORTED_MODULE_10__.toByteStringHeaderObject)(requestHeaders), function setRequestHeader(val, key) {
|
|
55783
56045
|
request.setRequestHeader(key, val);
|
|
55784
56046
|
});
|
|
55785
56047
|
}
|
|
@@ -55818,6 +56080,7 @@ const isXHRAdapterSupported = typeof XMLHttpRequest !== 'undefined';
|
|
|
55818
56080
|
}
|
|
55819
56081
|
reject(!cancel || cancel.type ? new _cancel_CanceledError_js__WEBPACK_IMPORTED_MODULE_4__["default"](null, config, request) : cancel);
|
|
55820
56082
|
request.abort();
|
|
56083
|
+
done();
|
|
55821
56084
|
request = null;
|
|
55822
56085
|
};
|
|
55823
56086
|
|
|
@@ -55831,7 +56094,7 @@ const isXHRAdapterSupported = typeof XMLHttpRequest !== 'undefined';
|
|
|
55831
56094
|
|
|
55832
56095
|
const protocol = (0,_helpers_parseProtocol_js__WEBPACK_IMPORTED_MODULE_5__["default"])(_config.url);
|
|
55833
56096
|
|
|
55834
|
-
if (protocol && _platform_index_js__WEBPACK_IMPORTED_MODULE_6__["default"].protocols.
|
|
56097
|
+
if (protocol && !_platform_index_js__WEBPACK_IMPORTED_MODULE_6__["default"].protocols.includes(protocol)) {
|
|
55835
56098
|
reject(
|
|
55836
56099
|
new _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_3__["default"](
|
|
55837
56100
|
'Unsupported protocol ' + protocol + ':',
|
|
@@ -56233,13 +56496,29 @@ class Axios {
|
|
|
56233
56496
|
Error.captureStackTrace ? Error.captureStackTrace(dummy) : (dummy = new Error());
|
|
56234
56497
|
|
|
56235
56498
|
// slice off the Error: ... line
|
|
56236
|
-
const stack =
|
|
56499
|
+
const stack = (() => {
|
|
56500
|
+
if (!dummy.stack) {
|
|
56501
|
+
return '';
|
|
56502
|
+
}
|
|
56503
|
+
|
|
56504
|
+
const firstNewlineIndex = dummy.stack.indexOf('\n');
|
|
56505
|
+
|
|
56506
|
+
return firstNewlineIndex === -1 ? '' : dummy.stack.slice(firstNewlineIndex + 1);
|
|
56507
|
+
})();
|
|
56237
56508
|
try {
|
|
56238
56509
|
if (!err.stack) {
|
|
56239
56510
|
err.stack = stack;
|
|
56240
56511
|
// match without the 2 top stack lines
|
|
56241
|
-
} else if (stack
|
|
56242
|
-
|
|
56512
|
+
} else if (stack) {
|
|
56513
|
+
const firstNewlineIndex = stack.indexOf('\n');
|
|
56514
|
+
const secondNewlineIndex =
|
|
56515
|
+
firstNewlineIndex === -1 ? -1 : stack.indexOf('\n', firstNewlineIndex + 1);
|
|
56516
|
+
const stackWithoutTwoTopLines =
|
|
56517
|
+
secondNewlineIndex === -1 ? '' : stack.slice(secondNewlineIndex + 1);
|
|
56518
|
+
|
|
56519
|
+
if (!String(err.stack).endsWith(stackWithoutTwoTopLines)) {
|
|
56520
|
+
err.stack += '\n' + stack;
|
|
56521
|
+
}
|
|
56243
56522
|
}
|
|
56244
56523
|
} catch (e) {
|
|
56245
56524
|
// ignore the case where "stack" is an un-writable property
|
|
@@ -56319,7 +56598,7 @@ class Axios {
|
|
|
56319
56598
|
let contextHeaders = headers && _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].merge(headers.common, headers[config.method]);
|
|
56320
56599
|
|
|
56321
56600
|
headers &&
|
|
56322
|
-
_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].forEach(['delete', 'get', 'head', 'post', 'put', 'patch', 'common'], (method) => {
|
|
56601
|
+
_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].forEach(['delete', 'get', 'head', 'post', 'put', 'patch', 'query', 'common'], (method) => {
|
|
56323
56602
|
delete headers[method];
|
|
56324
56603
|
});
|
|
56325
56604
|
|
|
@@ -56422,7 +56701,7 @@ _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].forEach(['delete', 'get', 'hea
|
|
|
56422
56701
|
};
|
|
56423
56702
|
});
|
|
56424
56703
|
|
|
56425
|
-
_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].forEach(['post', 'put', 'patch'], function forEachMethodWithData(method) {
|
|
56704
|
+
_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].forEach(['post', 'put', 'patch', 'query'], function forEachMethodWithData(method) {
|
|
56426
56705
|
function generateHTTPMethod(isForm) {
|
|
56427
56706
|
return function httpMethod(url, data, config) {
|
|
56428
56707
|
return this.request(
|
|
@@ -56442,7 +56721,11 @@ _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].forEach(['post', 'put', 'patch
|
|
|
56442
56721
|
|
|
56443
56722
|
Axios.prototype[method] = generateHTTPMethod();
|
|
56444
56723
|
|
|
56445
|
-
|
|
56724
|
+
// QUERY is a safe/idempotent read method; multipart form bodies don't fit
|
|
56725
|
+
// its semantics, so no queryForm shorthand is generated.
|
|
56726
|
+
if (method !== 'query') {
|
|
56727
|
+
Axios.prototype[method + 'Form'] = generateHTTPMethod(true);
|
|
56728
|
+
}
|
|
56446
56729
|
});
|
|
56447
56730
|
|
|
56448
56731
|
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (Axios);
|
|
@@ -56459,10 +56742,81 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
56459
56742
|
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
56460
56743
|
/* harmony export */ });
|
|
56461
56744
|
/* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(68750);
|
|
56745
|
+
/* harmony import */ var _AxiosHeaders_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(76487);
|
|
56746
|
+
|
|
56462
56747
|
|
|
56463
56748
|
|
|
56464
56749
|
|
|
56465
56750
|
|
|
56751
|
+
const REDACTED = '[REDACTED ****]';
|
|
56752
|
+
|
|
56753
|
+
function hasOwnOrPrototypeToJSON(source) {
|
|
56754
|
+
if (_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].hasOwnProp(source, 'toJSON')) {
|
|
56755
|
+
return true;
|
|
56756
|
+
}
|
|
56757
|
+
|
|
56758
|
+
let prototype = Object.getPrototypeOf(source);
|
|
56759
|
+
|
|
56760
|
+
while (prototype && prototype !== Object.prototype) {
|
|
56761
|
+
if (_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].hasOwnProp(prototype, 'toJSON')) {
|
|
56762
|
+
return true;
|
|
56763
|
+
}
|
|
56764
|
+
|
|
56765
|
+
prototype = Object.getPrototypeOf(prototype);
|
|
56766
|
+
}
|
|
56767
|
+
|
|
56768
|
+
return false;
|
|
56769
|
+
}
|
|
56770
|
+
|
|
56771
|
+
// Build a plain-object snapshot of `config` and replace the value of any key
|
|
56772
|
+
// (case-insensitive) listed in `redactKeys` with REDACTED. Walks through arrays
|
|
56773
|
+
// and AxiosHeaders, and short-circuits on circular references.
|
|
56774
|
+
function redactConfig(config, redactKeys) {
|
|
56775
|
+
const lowerKeys = new Set(redactKeys.map((k) => String(k).toLowerCase()));
|
|
56776
|
+
const seen = [];
|
|
56777
|
+
|
|
56778
|
+
const visit = (source) => {
|
|
56779
|
+
if (source === null || typeof source !== 'object') return source;
|
|
56780
|
+
if (_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isBuffer(source)) return source;
|
|
56781
|
+
if (seen.indexOf(source) !== -1) return undefined;
|
|
56782
|
+
|
|
56783
|
+
if (source instanceof _AxiosHeaders_js__WEBPACK_IMPORTED_MODULE_1__["default"]) {
|
|
56784
|
+
source = source.toJSON();
|
|
56785
|
+
}
|
|
56786
|
+
|
|
56787
|
+
seen.push(source);
|
|
56788
|
+
|
|
56789
|
+
let result;
|
|
56790
|
+
if (_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isArray(source)) {
|
|
56791
|
+
result = [];
|
|
56792
|
+
source.forEach((v, i) => {
|
|
56793
|
+
const reducedValue = visit(v);
|
|
56794
|
+
if (!_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isUndefined(reducedValue)) {
|
|
56795
|
+
result[i] = reducedValue;
|
|
56796
|
+
}
|
|
56797
|
+
});
|
|
56798
|
+
} else {
|
|
56799
|
+
if (!_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isPlainObject(source) && hasOwnOrPrototypeToJSON(source)) {
|
|
56800
|
+
seen.pop();
|
|
56801
|
+
return source;
|
|
56802
|
+
}
|
|
56803
|
+
|
|
56804
|
+
result = Object.create(null);
|
|
56805
|
+
for (const [key, value] of Object.entries(source)) {
|
|
56806
|
+
const reducedValue = lowerKeys.has(key.toLowerCase()) ? REDACTED : visit(value);
|
|
56807
|
+
if (!_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isUndefined(reducedValue)) {
|
|
56808
|
+
result[key] = reducedValue;
|
|
56809
|
+
}
|
|
56810
|
+
}
|
|
56811
|
+
}
|
|
56812
|
+
|
|
56813
|
+
seen.pop();
|
|
56814
|
+
return result;
|
|
56815
|
+
};
|
|
56816
|
+
|
|
56817
|
+
return visit(config);
|
|
56818
|
+
}
|
|
56819
|
+
|
|
56466
56820
|
class AxiosError extends Error {
|
|
56467
56821
|
static from(error, code, config, request, response, customProps) {
|
|
56468
56822
|
const axiosError = new AxiosError(error.message, code || error.code, config, request, response);
|
|
@@ -56478,42 +56832,56 @@ class AxiosError extends Error {
|
|
|
56478
56832
|
return axiosError;
|
|
56479
56833
|
}
|
|
56480
56834
|
|
|
56481
|
-
|
|
56482
|
-
|
|
56483
|
-
|
|
56484
|
-
|
|
56485
|
-
|
|
56486
|
-
|
|
56487
|
-
|
|
56488
|
-
|
|
56489
|
-
|
|
56490
|
-
|
|
56491
|
-
|
|
56492
|
-
|
|
56493
|
-
|
|
56494
|
-
|
|
56495
|
-
|
|
56496
|
-
|
|
56497
|
-
|
|
56498
|
-
|
|
56499
|
-
|
|
56500
|
-
|
|
56501
|
-
|
|
56502
|
-
|
|
56503
|
-
|
|
56504
|
-
|
|
56505
|
-
|
|
56506
|
-
|
|
56507
|
-
|
|
56508
|
-
|
|
56509
|
-
|
|
56510
|
-
|
|
56511
|
-
|
|
56512
|
-
|
|
56513
|
-
|
|
56835
|
+
/**
|
|
56836
|
+
* Create an Error with the specified message, config, error code, request and response.
|
|
56837
|
+
*
|
|
56838
|
+
* @param {string} message The error message.
|
|
56839
|
+
* @param {string} [code] The error code (for example, 'ECONNABORTED').
|
|
56840
|
+
* @param {Object} [config] The config.
|
|
56841
|
+
* @param {Object} [request] The request.
|
|
56842
|
+
* @param {Object} [response] The response.
|
|
56843
|
+
*
|
|
56844
|
+
* @returns {Error} The created error.
|
|
56845
|
+
*/
|
|
56846
|
+
constructor(message, code, config, request, response) {
|
|
56847
|
+
super(message);
|
|
56848
|
+
|
|
56849
|
+
// Make message enumerable to maintain backward compatibility
|
|
56850
|
+
// The native Error constructor sets message as non-enumerable,
|
|
56851
|
+
// but axios < v1.13.3 had it as enumerable
|
|
56852
|
+
Object.defineProperty(this, 'message', {
|
|
56853
|
+
// Null-proto descriptor so a polluted Object.prototype.get cannot turn
|
|
56854
|
+
// this data descriptor into an accessor descriptor on the way in.
|
|
56855
|
+
__proto__: null,
|
|
56856
|
+
value: message,
|
|
56857
|
+
enumerable: true,
|
|
56858
|
+
writable: true,
|
|
56859
|
+
configurable: true,
|
|
56860
|
+
});
|
|
56861
|
+
|
|
56862
|
+
this.name = 'AxiosError';
|
|
56863
|
+
this.isAxiosError = true;
|
|
56864
|
+
code && (this.code = code);
|
|
56865
|
+
config && (this.config = config);
|
|
56866
|
+
request && (this.request = request);
|
|
56867
|
+
if (response) {
|
|
56868
|
+
this.response = response;
|
|
56869
|
+
this.status = response.status;
|
|
56514
56870
|
}
|
|
56871
|
+
}
|
|
56515
56872
|
|
|
56516
56873
|
toJSON() {
|
|
56874
|
+
// Opt-in redaction: when the request config carries a `redact` array, the
|
|
56875
|
+
// value of any matching key (case-insensitive, at any depth) is replaced
|
|
56876
|
+
// with REDACTED in the serialized snapshot. Undefined or empty leaves the
|
|
56877
|
+
// existing serialization behavior unchanged.
|
|
56878
|
+
const config = this.config;
|
|
56879
|
+
const redactKeys = config && _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].hasOwnProp(config, 'redact') ? config.redact : undefined;
|
|
56880
|
+
const serializedConfig =
|
|
56881
|
+
_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isArray(redactKeys) && redactKeys.length > 0
|
|
56882
|
+
? redactConfig(config, redactKeys)
|
|
56883
|
+
: _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].toJSONObject(config);
|
|
56884
|
+
|
|
56517
56885
|
return {
|
|
56518
56886
|
// Standard
|
|
56519
56887
|
message: this.message,
|
|
@@ -56527,7 +56895,7 @@ class AxiosError extends Error {
|
|
|
56527
56895
|
columnNumber: this.columnNumber,
|
|
56528
56896
|
stack: this.stack,
|
|
56529
56897
|
// Axios
|
|
56530
|
-
config:
|
|
56898
|
+
config: serializedConfig,
|
|
56531
56899
|
code: this.code,
|
|
56532
56900
|
status: this.status,
|
|
56533
56901
|
};
|
|
@@ -56539,6 +56907,7 @@ AxiosError.ERR_BAD_OPTION_VALUE = 'ERR_BAD_OPTION_VALUE';
|
|
|
56539
56907
|
AxiosError.ERR_BAD_OPTION = 'ERR_BAD_OPTION';
|
|
56540
56908
|
AxiosError.ECONNABORTED = 'ECONNABORTED';
|
|
56541
56909
|
AxiosError.ETIMEDOUT = 'ETIMEDOUT';
|
|
56910
|
+
AxiosError.ECONNREFUSED = 'ECONNREFUSED';
|
|
56542
56911
|
AxiosError.ERR_NETWORK = 'ERR_NETWORK';
|
|
56543
56912
|
AxiosError.ERR_FR_TOO_MANY_REDIRECTS = 'ERR_FR_TOO_MANY_REDIRECTS';
|
|
56544
56913
|
AxiosError.ERR_DEPRECATED = 'ERR_DEPRECATED';
|
|
@@ -56547,6 +56916,7 @@ AxiosError.ERR_BAD_REQUEST = 'ERR_BAD_REQUEST';
|
|
|
56547
56916
|
AxiosError.ERR_CANCELED = 'ERR_CANCELED';
|
|
56548
56917
|
AxiosError.ERR_NOT_SUPPORT = 'ERR_NOT_SUPPORT';
|
|
56549
56918
|
AxiosError.ERR_INVALID_URL = 'ERR_INVALID_URL';
|
|
56919
|
+
AxiosError.ERR_FORM_DATA_DEPTH_EXCEEDED = 'ERR_FORM_DATA_DEPTH_EXCEEDED';
|
|
56550
56920
|
|
|
56551
56921
|
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (AxiosError);
|
|
56552
56922
|
|
|
@@ -56563,6 +56933,8 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
56563
56933
|
/* harmony export */ });
|
|
56564
56934
|
/* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(68750);
|
|
56565
56935
|
/* harmony import */ var _helpers_parseHeaders_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(17026);
|
|
56936
|
+
/* harmony import */ var _helpers_sanitizeHeaderValue_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(51306);
|
|
56937
|
+
|
|
56566
56938
|
|
|
56567
56939
|
|
|
56568
56940
|
|
|
@@ -56579,9 +56951,7 @@ function normalizeValue(value) {
|
|
|
56579
56951
|
return value;
|
|
56580
56952
|
}
|
|
56581
56953
|
|
|
56582
|
-
return _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isArray(value)
|
|
56583
|
-
? value.map(normalizeValue)
|
|
56584
|
-
: String(value).replace(/[\r\n]+$/, '');
|
|
56954
|
+
return _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isArray(value) ? value.map(normalizeValue) : (0,_helpers_sanitizeHeaderValue_js__WEBPACK_IMPORTED_MODULE_2__.sanitizeHeaderValue)(String(value));
|
|
56585
56955
|
}
|
|
56586
56956
|
|
|
56587
56957
|
function parseTokens(str) {
|
|
@@ -56632,6 +57002,9 @@ function buildAccessors(obj, header) {
|
|
|
56632
57002
|
|
|
56633
57003
|
['get', 'set', 'has'].forEach((methodName) => {
|
|
56634
57004
|
Object.defineProperty(obj, methodName + accessorName, {
|
|
57005
|
+
// Null-proto descriptor so a polluted Object.prototype.get cannot turn
|
|
57006
|
+
// this data descriptor into an accessor descriptor on the way in.
|
|
57007
|
+
__proto__: null,
|
|
56635
57008
|
value: function (arg1, arg2, arg3) {
|
|
56636
57009
|
return this[methodName].call(this, header, arg1, arg2, arg3);
|
|
56637
57010
|
},
|
|
@@ -57025,7 +57398,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
57025
57398
|
*/
|
|
57026
57399
|
function buildFullPath(baseURL, requestedURL, allowAbsoluteUrls) {
|
|
57027
57400
|
let isRelativeUrl = !(0,_helpers_isAbsoluteURL_js__WEBPACK_IMPORTED_MODULE_0__["default"])(requestedURL);
|
|
57028
|
-
if (baseURL && (isRelativeUrl || allowAbsoluteUrls
|
|
57401
|
+
if (baseURL && (isRelativeUrl || allowAbsoluteUrls === false)) {
|
|
57029
57402
|
return (0,_helpers_combineURLs_js__WEBPACK_IMPORTED_MODULE_1__["default"])(baseURL, requestedURL);
|
|
57030
57403
|
}
|
|
57031
57404
|
return requestedURL;
|
|
@@ -57099,8 +57472,15 @@ function dispatchRequest(config) {
|
|
|
57099
57472
|
function onAdapterResolution(response) {
|
|
57100
57473
|
throwIfCancellationRequested(config);
|
|
57101
57474
|
|
|
57102
|
-
//
|
|
57103
|
-
|
|
57475
|
+
// Expose the current response on config so that transformResponse can
|
|
57476
|
+
// attach it to any AxiosError it throws (e.g. on JSON parse failure).
|
|
57477
|
+
// We clean it up afterwards to avoid polluting the config object.
|
|
57478
|
+
config.response = response;
|
|
57479
|
+
try {
|
|
57480
|
+
response.data = _transformData_js__WEBPACK_IMPORTED_MODULE_0__["default"].call(config, config.transformResponse, response);
|
|
57481
|
+
} finally {
|
|
57482
|
+
delete config.response;
|
|
57483
|
+
}
|
|
57104
57484
|
|
|
57105
57485
|
response.headers = _core_AxiosHeaders_js__WEBPACK_IMPORTED_MODULE_4__["default"].from(response.headers);
|
|
57106
57486
|
|
|
@@ -57112,11 +57492,16 @@ function dispatchRequest(config) {
|
|
|
57112
57492
|
|
|
57113
57493
|
// Transform response data
|
|
57114
57494
|
if (reason && reason.response) {
|
|
57115
|
-
|
|
57116
|
-
|
|
57117
|
-
|
|
57118
|
-
|
|
57119
|
-
|
|
57495
|
+
config.response = reason.response;
|
|
57496
|
+
try {
|
|
57497
|
+
reason.response.data = _transformData_js__WEBPACK_IMPORTED_MODULE_0__["default"].call(
|
|
57498
|
+
config,
|
|
57499
|
+
config.transformResponse,
|
|
57500
|
+
reason.response
|
|
57501
|
+
);
|
|
57502
|
+
} finally {
|
|
57503
|
+
delete config.response;
|
|
57504
|
+
}
|
|
57120
57505
|
reason.response.headers = _core_AxiosHeaders_js__WEBPACK_IMPORTED_MODULE_4__["default"].from(reason.response.headers);
|
|
57121
57506
|
}
|
|
57122
57507
|
}
|
|
@@ -57158,7 +57543,21 @@ const headersToObject = (thing) => (thing instanceof _AxiosHeaders_js__WEBPACK_I
|
|
|
57158
57543
|
function mergeConfig(config1, config2) {
|
|
57159
57544
|
// eslint-disable-next-line no-param-reassign
|
|
57160
57545
|
config2 = config2 || {};
|
|
57161
|
-
|
|
57546
|
+
|
|
57547
|
+
// Use a null-prototype object so that downstream reads such as `config.auth`
|
|
57548
|
+
// or `config.baseURL` cannot inherit polluted values from Object.prototype.
|
|
57549
|
+
// `hasOwnProperty` is restored as a non-enumerable own slot to preserve
|
|
57550
|
+
// ergonomics for user code that relies on it.
|
|
57551
|
+
const config = Object.create(null);
|
|
57552
|
+
Object.defineProperty(config, 'hasOwnProperty', {
|
|
57553
|
+
// Null-proto descriptor so a polluted Object.prototype.get cannot turn
|
|
57554
|
+
// this data descriptor into an accessor descriptor on the way in.
|
|
57555
|
+
__proto__: null,
|
|
57556
|
+
value: Object.prototype.hasOwnProperty,
|
|
57557
|
+
enumerable: false,
|
|
57558
|
+
writable: true,
|
|
57559
|
+
configurable: true,
|
|
57560
|
+
});
|
|
57162
57561
|
|
|
57163
57562
|
function getMergedValue(target, source, prop, caseless) {
|
|
57164
57563
|
if (_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isPlainObject(target) && _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isPlainObject(source)) {
|
|
@@ -57197,9 +57596,9 @@ function mergeConfig(config1, config2) {
|
|
|
57197
57596
|
|
|
57198
57597
|
// eslint-disable-next-line consistent-return
|
|
57199
57598
|
function mergeDirectKeys(a, b, prop) {
|
|
57200
|
-
if (prop
|
|
57599
|
+
if (_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].hasOwnProp(config2, prop)) {
|
|
57201
57600
|
return getMergedValue(a, b);
|
|
57202
|
-
} else if (prop
|
|
57601
|
+
} else if (_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].hasOwnProp(config1, prop)) {
|
|
57203
57602
|
return getMergedValue(undefined, a);
|
|
57204
57603
|
}
|
|
57205
57604
|
}
|
|
@@ -57231,6 +57630,7 @@ function mergeConfig(config1, config2) {
|
|
|
57231
57630
|
httpsAgent: defaultToConfig2,
|
|
57232
57631
|
cancelToken: defaultToConfig2,
|
|
57233
57632
|
socketPath: defaultToConfig2,
|
|
57633
|
+
allowedSocketPaths: defaultToConfig2,
|
|
57234
57634
|
responseEncoding: defaultToConfig2,
|
|
57235
57635
|
validateStatus: mergeDirectKeys,
|
|
57236
57636
|
headers: (a, b, prop) =>
|
|
@@ -57240,7 +57640,9 @@ function mergeConfig(config1, config2) {
|
|
|
57240
57640
|
_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].forEach(Object.keys({ ...config1, ...config2 }), function computeConfigValue(prop) {
|
|
57241
57641
|
if (prop === '__proto__' || prop === 'constructor' || prop === 'prototype') return;
|
|
57242
57642
|
const merge = _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].hasOwnProp(mergeMap, prop) ? mergeMap[prop] : mergeDeepProperties;
|
|
57243
|
-
const
|
|
57643
|
+
const a = _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].hasOwnProp(config1, prop) ? config1[prop] : undefined;
|
|
57644
|
+
const b = _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].hasOwnProp(config2, prop) ? config2[prop] : undefined;
|
|
57645
|
+
const configValue = merge(a, b, prop);
|
|
57244
57646
|
(_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isUndefined(configValue) && merge !== mergeDirectKeys) || (config[prop] = configValue);
|
|
57245
57647
|
});
|
|
57246
57648
|
|
|
@@ -57277,17 +57679,13 @@ function settle(resolve, reject, response) {
|
|
|
57277
57679
|
if (!response.status || !validateStatus || validateStatus(response.status)) {
|
|
57278
57680
|
resolve(response);
|
|
57279
57681
|
} else {
|
|
57280
|
-
reject(
|
|
57281
|
-
|
|
57282
|
-
|
|
57283
|
-
|
|
57284
|
-
|
|
57285
|
-
|
|
57286
|
-
|
|
57287
|
-
response.request,
|
|
57288
|
-
response
|
|
57289
|
-
)
|
|
57290
|
-
);
|
|
57682
|
+
reject(new _AxiosError_js__WEBPACK_IMPORTED_MODULE_0__["default"](
|
|
57683
|
+
'Request failed with status code ' + response.status,
|
|
57684
|
+
response.status >= 400 && response.status < 500 ? _AxiosError_js__WEBPACK_IMPORTED_MODULE_0__["default"].ERR_BAD_REQUEST : _AxiosError_js__WEBPACK_IMPORTED_MODULE_0__["default"].ERR_BAD_RESPONSE,
|
|
57685
|
+
response.config,
|
|
57686
|
+
response.request,
|
|
57687
|
+
response
|
|
57688
|
+
));
|
|
57291
57689
|
}
|
|
57292
57690
|
}
|
|
57293
57691
|
|
|
@@ -57362,6 +57760,8 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
57362
57760
|
|
|
57363
57761
|
|
|
57364
57762
|
|
|
57763
|
+
const own = (obj, key) => (obj != null && _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].hasOwnProp(obj, key) ? obj[key] : undefined);
|
|
57764
|
+
|
|
57365
57765
|
/**
|
|
57366
57766
|
* It takes a string, tries to parse it, and if it fails, it returns the stringified version
|
|
57367
57767
|
* of the input
|
|
@@ -57429,20 +57829,22 @@ const defaults = {
|
|
|
57429
57829
|
let isFileList;
|
|
57430
57830
|
|
|
57431
57831
|
if (isObjectPayload) {
|
|
57832
|
+
const formSerializer = own(this, 'formSerializer');
|
|
57432
57833
|
if (contentType.indexOf('application/x-www-form-urlencoded') > -1) {
|
|
57433
|
-
return (0,_helpers_toURLEncodedForm_js__WEBPACK_IMPORTED_MODULE_4__["default"])(data,
|
|
57834
|
+
return (0,_helpers_toURLEncodedForm_js__WEBPACK_IMPORTED_MODULE_4__["default"])(data, formSerializer).toString();
|
|
57434
57835
|
}
|
|
57435
57836
|
|
|
57436
57837
|
if (
|
|
57437
57838
|
(isFileList = _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isFileList(data)) ||
|
|
57438
57839
|
contentType.indexOf('multipart/form-data') > -1
|
|
57439
57840
|
) {
|
|
57440
|
-
const
|
|
57841
|
+
const env = own(this, 'env');
|
|
57842
|
+
const _FormData = env && env.FormData;
|
|
57441
57843
|
|
|
57442
57844
|
return (0,_helpers_toFormData_js__WEBPACK_IMPORTED_MODULE_3__["default"])(
|
|
57443
57845
|
isFileList ? { 'files[]': data } : data,
|
|
57444
57846
|
_FormData && new _FormData(),
|
|
57445
|
-
|
|
57847
|
+
formSerializer
|
|
57446
57848
|
);
|
|
57447
57849
|
}
|
|
57448
57850
|
}
|
|
@@ -57458,9 +57860,10 @@ const defaults = {
|
|
|
57458
57860
|
|
|
57459
57861
|
transformResponse: [
|
|
57460
57862
|
function transformResponse(data) {
|
|
57461
|
-
const transitional = this
|
|
57863
|
+
const transitional = own(this, 'transitional') || defaults.transitional;
|
|
57462
57864
|
const forcedJSONParsing = transitional && transitional.forcedJSONParsing;
|
|
57463
|
-
const
|
|
57865
|
+
const responseType = own(this, 'responseType');
|
|
57866
|
+
const JSONRequested = responseType === 'json';
|
|
57464
57867
|
|
|
57465
57868
|
if (_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isResponse(data) || _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isReadableStream(data)) {
|
|
57466
57869
|
return data;
|
|
@@ -57469,17 +57872,17 @@ const defaults = {
|
|
|
57469
57872
|
if (
|
|
57470
57873
|
data &&
|
|
57471
57874
|
_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isString(data) &&
|
|
57472
|
-
((forcedJSONParsing && !
|
|
57875
|
+
((forcedJSONParsing && !responseType) || JSONRequested)
|
|
57473
57876
|
) {
|
|
57474
57877
|
const silentJSONParsing = transitional && transitional.silentJSONParsing;
|
|
57475
57878
|
const strictJSONParsing = !silentJSONParsing && JSONRequested;
|
|
57476
57879
|
|
|
57477
57880
|
try {
|
|
57478
|
-
return JSON.parse(data, this
|
|
57881
|
+
return JSON.parse(data, own(this, 'parseReviver'));
|
|
57479
57882
|
} catch (e) {
|
|
57480
57883
|
if (strictJSONParsing) {
|
|
57481
57884
|
if (e.name === 'SyntaxError') {
|
|
57482
|
-
throw _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_1__["default"].from(e, _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_1__["default"].ERR_BAD_RESPONSE, this, null, this
|
|
57885
|
+
throw _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_1__["default"].from(e, _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_1__["default"].ERR_BAD_RESPONSE, this, null, own(this, 'response'));
|
|
57483
57886
|
}
|
|
57484
57887
|
throw e;
|
|
57485
57888
|
}
|
|
@@ -57519,7 +57922,7 @@ const defaults = {
|
|
|
57519
57922
|
},
|
|
57520
57923
|
};
|
|
57521
57924
|
|
|
57522
|
-
_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].forEach(['delete', 'get', 'head', 'post', 'put', 'patch'], (method) => {
|
|
57925
|
+
_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].forEach(['delete', 'get', 'head', 'post', 'put', 'patch', 'query'], (method) => {
|
|
57523
57926
|
defaults.headers[method] = {};
|
|
57524
57927
|
});
|
|
57525
57928
|
|
|
@@ -57556,7 +57959,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
57556
57959
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
57557
57960
|
/* harmony export */ VERSION: () => (/* binding */ VERSION)
|
|
57558
57961
|
/* harmony export */ });
|
|
57559
|
-
const VERSION = "1.
|
|
57962
|
+
const VERSION = "1.16.1";
|
|
57560
57963
|
|
|
57561
57964
|
/***/ },
|
|
57562
57965
|
|
|
@@ -57589,9 +57992,8 @@ function encode(str) {
|
|
|
57589
57992
|
')': '%29',
|
|
57590
57993
|
'~': '%7E',
|
|
57591
57994
|
'%20': '+',
|
|
57592
|
-
'%00': '\x00',
|
|
57593
57995
|
};
|
|
57594
|
-
return encodeURIComponent(str).replace(/[!'()~]|%20
|
|
57996
|
+
return encodeURIComponent(str).replace(/[!'()~]|%20/g, function replacer(match) {
|
|
57595
57997
|
return charMap[match];
|
|
57596
57998
|
});
|
|
57597
57999
|
}
|
|
@@ -57756,7 +58158,8 @@ function bind(fn, thisArg) {
|
|
|
57756
58158
|
"use strict";
|
|
57757
58159
|
__webpack_require__.r(__webpack_exports__);
|
|
57758
58160
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
57759
|
-
/* harmony export */ "default": () => (/* binding */ buildURL)
|
|
58161
|
+
/* harmony export */ "default": () => (/* binding */ buildURL),
|
|
58162
|
+
/* harmony export */ encode: () => (/* binding */ encode)
|
|
57760
58163
|
/* harmony export */ });
|
|
57761
58164
|
/* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(68750);
|
|
57762
58165
|
/* harmony import */ var _helpers_AxiosURLSearchParams_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(15720);
|
|
@@ -57873,54 +58276,55 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
57873
58276
|
|
|
57874
58277
|
|
|
57875
58278
|
const composeSignals = (signals, timeout) => {
|
|
57876
|
-
|
|
57877
|
-
|
|
57878
|
-
if (timeout || length) {
|
|
57879
|
-
let controller = new AbortController();
|
|
57880
|
-
|
|
57881
|
-
let aborted;
|
|
57882
|
-
|
|
57883
|
-
const onabort = function (reason) {
|
|
57884
|
-
if (!aborted) {
|
|
57885
|
-
aborted = true;
|
|
57886
|
-
unsubscribe();
|
|
57887
|
-
const err = reason instanceof Error ? reason : this.reason;
|
|
57888
|
-
controller.abort(
|
|
57889
|
-
err instanceof _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_1__["default"]
|
|
57890
|
-
? err
|
|
57891
|
-
: new _cancel_CanceledError_js__WEBPACK_IMPORTED_MODULE_0__["default"](err instanceof Error ? err.message : err)
|
|
57892
|
-
);
|
|
57893
|
-
}
|
|
57894
|
-
};
|
|
58279
|
+
signals = signals ? signals.filter(Boolean) : [];
|
|
57895
58280
|
|
|
57896
|
-
|
|
57897
|
-
|
|
57898
|
-
|
|
57899
|
-
timer = null;
|
|
57900
|
-
onabort(new _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_1__["default"](`timeout of ${timeout}ms exceeded`, _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_1__["default"].ETIMEDOUT));
|
|
57901
|
-
}, timeout);
|
|
57902
|
-
|
|
57903
|
-
const unsubscribe = () => {
|
|
57904
|
-
if (signals) {
|
|
57905
|
-
timer && clearTimeout(timer);
|
|
57906
|
-
timer = null;
|
|
57907
|
-
signals.forEach((signal) => {
|
|
57908
|
-
signal.unsubscribe
|
|
57909
|
-
? signal.unsubscribe(onabort)
|
|
57910
|
-
: signal.removeEventListener('abort', onabort);
|
|
57911
|
-
});
|
|
57912
|
-
signals = null;
|
|
57913
|
-
}
|
|
57914
|
-
};
|
|
58281
|
+
if (!timeout && !signals.length) {
|
|
58282
|
+
return;
|
|
58283
|
+
}
|
|
57915
58284
|
|
|
57916
|
-
|
|
58285
|
+
const controller = new AbortController();
|
|
57917
58286
|
|
|
57918
|
-
|
|
58287
|
+
let aborted = false;
|
|
57919
58288
|
|
|
57920
|
-
|
|
58289
|
+
const onabort = function (reason) {
|
|
58290
|
+
if (!aborted) {
|
|
58291
|
+
aborted = true;
|
|
58292
|
+
unsubscribe();
|
|
58293
|
+
const err = reason instanceof Error ? reason : this.reason;
|
|
58294
|
+
controller.abort(
|
|
58295
|
+
err instanceof _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_1__["default"]
|
|
58296
|
+
? err
|
|
58297
|
+
: new _cancel_CanceledError_js__WEBPACK_IMPORTED_MODULE_0__["default"](err instanceof Error ? err.message : err)
|
|
58298
|
+
);
|
|
58299
|
+
}
|
|
58300
|
+
};
|
|
57921
58301
|
|
|
57922
|
-
|
|
57923
|
-
|
|
58302
|
+
let timer =
|
|
58303
|
+
timeout &&
|
|
58304
|
+
setTimeout(() => {
|
|
58305
|
+
timer = null;
|
|
58306
|
+
onabort(new _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_1__["default"](`timeout of ${timeout}ms exceeded`, _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_1__["default"].ETIMEDOUT));
|
|
58307
|
+
}, timeout);
|
|
58308
|
+
|
|
58309
|
+
const unsubscribe = () => {
|
|
58310
|
+
if (!signals) { return; }
|
|
58311
|
+
timer && clearTimeout(timer);
|
|
58312
|
+
timer = null;
|
|
58313
|
+
signals.forEach((signal) => {
|
|
58314
|
+
signal.unsubscribe
|
|
58315
|
+
? signal.unsubscribe(onabort)
|
|
58316
|
+
: signal.removeEventListener('abort', onabort);
|
|
58317
|
+
});
|
|
58318
|
+
signals = null;
|
|
58319
|
+
};
|
|
58320
|
+
|
|
58321
|
+
signals.forEach((signal) => signal.addEventListener('abort', onabort));
|
|
58322
|
+
|
|
58323
|
+
const { signal } = controller;
|
|
58324
|
+
|
|
58325
|
+
signal.unsubscribe = () => _utils_js__WEBPACK_IMPORTED_MODULE_2__["default"].asap(unsubscribe);
|
|
58326
|
+
|
|
58327
|
+
return signal;
|
|
57924
58328
|
};
|
|
57925
58329
|
|
|
57926
58330
|
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (composeSignals);
|
|
@@ -57970,8 +58374,20 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
57970
58374
|
|
|
57971
58375
|
read(name) {
|
|
57972
58376
|
if (typeof document === 'undefined') return null;
|
|
57973
|
-
|
|
57974
|
-
|
|
58377
|
+
// Match name=value by splitting on the semicolon separator instead of building a
|
|
58378
|
+
// RegExp from `name` — interpolating an unescaped string into a RegExp would let
|
|
58379
|
+
// metacharacters (e.g. `.+?` in an attacker-influenced cookie name) cause ReDoS or
|
|
58380
|
+
// match the wrong cookie. Browsers may serialize cookie pairs as either ";" or
|
|
58381
|
+
// "; ", so ignore optional whitespace before each cookie name.
|
|
58382
|
+
const cookies = document.cookie.split(';');
|
|
58383
|
+
for (let i = 0; i < cookies.length; i++) {
|
|
58384
|
+
const cookie = cookies[i].replace(/^\s+/, '');
|
|
58385
|
+
const eq = cookie.indexOf('=');
|
|
58386
|
+
if (eq !== -1 && cookie.slice(0, eq) === name) {
|
|
58387
|
+
return decodeURIComponent(cookie.slice(eq + 1));
|
|
58388
|
+
}
|
|
58389
|
+
}
|
|
58390
|
+
return null;
|
|
57975
58391
|
},
|
|
57976
58392
|
|
|
57977
58393
|
remove(name) {
|
|
@@ -57988,6 +58404,118 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
57988
58404
|
});
|
|
57989
58405
|
|
|
57990
58406
|
|
|
58407
|
+
/***/ },
|
|
58408
|
+
|
|
58409
|
+
/***/ 879
|
|
58410
|
+
(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
|
|
58411
|
+
|
|
58412
|
+
"use strict";
|
|
58413
|
+
__webpack_require__.r(__webpack_exports__);
|
|
58414
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
58415
|
+
/* harmony export */ "default": () => (/* binding */ estimateDataURLDecodedBytes)
|
|
58416
|
+
/* harmony export */ });
|
|
58417
|
+
/**
|
|
58418
|
+
* Estimate decoded byte length of a data:// URL *without* allocating large buffers.
|
|
58419
|
+
* - For base64: compute exact decoded size using length and padding;
|
|
58420
|
+
* handle %XX at the character-count level (no string allocation).
|
|
58421
|
+
* - For non-base64: use UTF-8 byteLength of the encoded body as a safe upper bound.
|
|
58422
|
+
*
|
|
58423
|
+
* @param {string} url
|
|
58424
|
+
* @returns {number}
|
|
58425
|
+
*/
|
|
58426
|
+
function estimateDataURLDecodedBytes(url) {
|
|
58427
|
+
if (!url || typeof url !== 'string') return 0;
|
|
58428
|
+
if (!url.startsWith('data:')) return 0;
|
|
58429
|
+
|
|
58430
|
+
const comma = url.indexOf(',');
|
|
58431
|
+
if (comma < 0) return 0;
|
|
58432
|
+
|
|
58433
|
+
const meta = url.slice(5, comma);
|
|
58434
|
+
const body = url.slice(comma + 1);
|
|
58435
|
+
const isBase64 = /;base64/i.test(meta);
|
|
58436
|
+
|
|
58437
|
+
if (isBase64) {
|
|
58438
|
+
let effectiveLen = body.length;
|
|
58439
|
+
const len = body.length; // cache length
|
|
58440
|
+
|
|
58441
|
+
for (let i = 0; i < len; i++) {
|
|
58442
|
+
if (body.charCodeAt(i) === 37 /* '%' */ && i + 2 < len) {
|
|
58443
|
+
const a = body.charCodeAt(i + 1);
|
|
58444
|
+
const b = body.charCodeAt(i + 2);
|
|
58445
|
+
const isHex =
|
|
58446
|
+
((a >= 48 && a <= 57) || (a >= 65 && a <= 70) || (a >= 97 && a <= 102)) &&
|
|
58447
|
+
((b >= 48 && b <= 57) || (b >= 65 && b <= 70) || (b >= 97 && b <= 102));
|
|
58448
|
+
|
|
58449
|
+
if (isHex) {
|
|
58450
|
+
effectiveLen -= 2;
|
|
58451
|
+
i += 2;
|
|
58452
|
+
}
|
|
58453
|
+
}
|
|
58454
|
+
}
|
|
58455
|
+
|
|
58456
|
+
let pad = 0;
|
|
58457
|
+
let idx = len - 1;
|
|
58458
|
+
|
|
58459
|
+
const tailIsPct3D = (j) =>
|
|
58460
|
+
j >= 2 &&
|
|
58461
|
+
body.charCodeAt(j - 2) === 37 && // '%'
|
|
58462
|
+
body.charCodeAt(j - 1) === 51 && // '3'
|
|
58463
|
+
(body.charCodeAt(j) === 68 || body.charCodeAt(j) === 100); // 'D' or 'd'
|
|
58464
|
+
|
|
58465
|
+
if (idx >= 0) {
|
|
58466
|
+
if (body.charCodeAt(idx) === 61 /* '=' */) {
|
|
58467
|
+
pad++;
|
|
58468
|
+
idx--;
|
|
58469
|
+
} else if (tailIsPct3D(idx)) {
|
|
58470
|
+
pad++;
|
|
58471
|
+
idx -= 3;
|
|
58472
|
+
}
|
|
58473
|
+
}
|
|
58474
|
+
|
|
58475
|
+
if (pad === 1 && idx >= 0) {
|
|
58476
|
+
if (body.charCodeAt(idx) === 61 /* '=' */) {
|
|
58477
|
+
pad++;
|
|
58478
|
+
} else if (tailIsPct3D(idx)) {
|
|
58479
|
+
pad++;
|
|
58480
|
+
}
|
|
58481
|
+
}
|
|
58482
|
+
|
|
58483
|
+
const groups = Math.floor(effectiveLen / 4);
|
|
58484
|
+
const bytes = groups * 3 - (pad || 0);
|
|
58485
|
+
return bytes > 0 ? bytes : 0;
|
|
58486
|
+
}
|
|
58487
|
+
|
|
58488
|
+
if (typeof Buffer !== 'undefined' && typeof Buffer.byteLength === 'function') {
|
|
58489
|
+
return Buffer.byteLength(body, 'utf8');
|
|
58490
|
+
}
|
|
58491
|
+
|
|
58492
|
+
// Compute UTF-8 byte length directly from UTF-16 code units without allocating
|
|
58493
|
+
// a byte buffer (TextEncoder.encode would defeat the DoS guard on large bodies).
|
|
58494
|
+
// Using body.length here would undercount non-ASCII (e.g. '€' is 1 code unit
|
|
58495
|
+
// but 3 UTF-8 bytes).
|
|
58496
|
+
let bytes = 0;
|
|
58497
|
+
for (let i = 0, len = body.length; i < len; i++) {
|
|
58498
|
+
const c = body.charCodeAt(i);
|
|
58499
|
+
if (c < 0x80) {
|
|
58500
|
+
bytes += 1;
|
|
58501
|
+
} else if (c < 0x800) {
|
|
58502
|
+
bytes += 2;
|
|
58503
|
+
} else if (c >= 0xd800 && c <= 0xdbff && i + 1 < len) {
|
|
58504
|
+
const next = body.charCodeAt(i + 1);
|
|
58505
|
+
if (next >= 0xdc00 && next <= 0xdfff) {
|
|
58506
|
+
bytes += 4;
|
|
58507
|
+
i++;
|
|
58508
|
+
} else {
|
|
58509
|
+
bytes += 3;
|
|
58510
|
+
}
|
|
58511
|
+
} else {
|
|
58512
|
+
bytes += 3;
|
|
58513
|
+
}
|
|
58514
|
+
}
|
|
58515
|
+
return bytes;
|
|
58516
|
+
}
|
|
58517
|
+
|
|
58518
|
+
|
|
57991
58519
|
/***/ },
|
|
57992
58520
|
|
|
57993
58521
|
/***/ 66256
|
|
@@ -58059,7 +58587,9 @@ function formDataToJSON(formData) {
|
|
|
58059
58587
|
|
|
58060
58588
|
if (isLast) {
|
|
58061
58589
|
if (_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].hasOwnProp(target, name)) {
|
|
58062
|
-
target[name] = [target[name]
|
|
58590
|
+
target[name] = _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isArray(target[name])
|
|
58591
|
+
? target[name].concat(value)
|
|
58592
|
+
: [target[name], value];
|
|
58063
58593
|
} else {
|
|
58064
58594
|
target[name] = value;
|
|
58065
58595
|
}
|
|
@@ -58067,7 +58597,7 @@ function formDataToJSON(formData) {
|
|
|
58067
58597
|
return !isNumericKey;
|
|
58068
58598
|
}
|
|
58069
58599
|
|
|
58070
|
-
if (!
|
|
58600
|
+
if (!_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].hasOwnProp(target, name) || !_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isObject(target[name])) {
|
|
58071
58601
|
target[name] = [];
|
|
58072
58602
|
}
|
|
58073
58603
|
|
|
@@ -58292,7 +58822,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
58292
58822
|
|
|
58293
58823
|
|
|
58294
58824
|
function parseProtocol(url) {
|
|
58295
|
-
const match = /^([-+\w]{1,25})(
|
|
58825
|
+
const match = /^([-+\w]{1,25}):(?:\/\/)?/.exec(url);
|
|
58296
58826
|
return (match && match[1]) || '';
|
|
58297
58827
|
}
|
|
58298
58828
|
|
|
@@ -58321,13 +58851,16 @@ const progressEventReducer = (listener, isDownloadStream, freq = 3) => {
|
|
|
58321
58851
|
const _speedometer = (0,_speedometer_js__WEBPACK_IMPORTED_MODULE_0__["default"])(50, 250);
|
|
58322
58852
|
|
|
58323
58853
|
return (0,_throttle_js__WEBPACK_IMPORTED_MODULE_1__["default"])((e) => {
|
|
58324
|
-
|
|
58854
|
+
if (!e || typeof e.loaded !== 'number') {
|
|
58855
|
+
return;
|
|
58856
|
+
}
|
|
58857
|
+
const rawLoaded = e.loaded;
|
|
58325
58858
|
const total = e.lengthComputable ? e.total : undefined;
|
|
58326
|
-
const
|
|
58859
|
+
const loaded = total != null ? Math.min(rawLoaded, total) : rawLoaded;
|
|
58860
|
+
const progressBytes = Math.max(0, loaded - bytesNotified);
|
|
58327
58861
|
const rate = _speedometer(progressBytes);
|
|
58328
|
-
const inRange = loaded <= total;
|
|
58329
58862
|
|
|
58330
|
-
bytesNotified = loaded;
|
|
58863
|
+
bytesNotified = Math.max(bytesNotified, loaded);
|
|
58331
58864
|
|
|
58332
58865
|
const data = {
|
|
58333
58866
|
loaded,
|
|
@@ -58335,7 +58868,7 @@ const progressEventReducer = (listener, isDownloadStream, freq = 3) => {
|
|
|
58335
58868
|
progress: total ? loaded / total : undefined,
|
|
58336
58869
|
bytes: progressBytes,
|
|
58337
58870
|
rate: rate ? rate : undefined,
|
|
58338
|
-
estimated: rate && total
|
|
58871
|
+
estimated: rate && total ? (total - loaded) / rate : undefined,
|
|
58339
58872
|
event: e,
|
|
58340
58873
|
lengthComputable: total != null,
|
|
58341
58874
|
[isDownloadStream ? 'download' : 'upload']: true,
|
|
@@ -58392,15 +58925,55 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
58392
58925
|
|
|
58393
58926
|
|
|
58394
58927
|
|
|
58928
|
+
const FORM_DATA_CONTENT_HEADERS = ['content-type', 'content-length'];
|
|
58929
|
+
|
|
58930
|
+
function setFormDataHeaders(headers, formHeaders, policy) {
|
|
58931
|
+
if (policy !== 'content-only') {
|
|
58932
|
+
headers.set(formHeaders);
|
|
58933
|
+
return;
|
|
58934
|
+
}
|
|
58935
|
+
|
|
58936
|
+
Object.entries(formHeaders).forEach(([key, val]) => {
|
|
58937
|
+
if (FORM_DATA_CONTENT_HEADERS.includes(key.toLowerCase())) {
|
|
58938
|
+
headers.set(key, val);
|
|
58939
|
+
}
|
|
58940
|
+
});
|
|
58941
|
+
}
|
|
58942
|
+
|
|
58943
|
+
/**
|
|
58944
|
+
* Encode a UTF-8 string to a Latin-1 byte string for use with btoa().
|
|
58945
|
+
* This is a modern replacement for the deprecated unescape(encodeURIComponent(str)) pattern.
|
|
58946
|
+
*
|
|
58947
|
+
* @param {string} str The string to encode
|
|
58948
|
+
*
|
|
58949
|
+
* @returns {string} UTF-8 bytes as a Latin-1 string
|
|
58950
|
+
*/
|
|
58951
|
+
const encodeUTF8 = (str) =>
|
|
58952
|
+
encodeURIComponent(str).replace(/%([0-9A-F]{2})/gi, (_, hex) =>
|
|
58953
|
+
String.fromCharCode(parseInt(hex, 16))
|
|
58954
|
+
);
|
|
58955
|
+
|
|
58395
58956
|
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ((config) => {
|
|
58396
58957
|
const newConfig = (0,_core_mergeConfig_js__WEBPACK_IMPORTED_MODULE_5__["default"])({}, config);
|
|
58397
58958
|
|
|
58398
|
-
|
|
58959
|
+
// Read only own properties to prevent prototype pollution gadgets
|
|
58960
|
+
// (e.g. Object.prototype.baseURL = 'https://evil.com').
|
|
58961
|
+
const own = (key) => (_utils_js__WEBPACK_IMPORTED_MODULE_1__["default"].hasOwnProp(newConfig, key) ? newConfig[key] : undefined);
|
|
58962
|
+
|
|
58963
|
+
const data = own('data');
|
|
58964
|
+
let withXSRFToken = own('withXSRFToken');
|
|
58965
|
+
const xsrfHeaderName = own('xsrfHeaderName');
|
|
58966
|
+
const xsrfCookieName = own('xsrfCookieName');
|
|
58967
|
+
let headers = own('headers');
|
|
58968
|
+
const auth = own('auth');
|
|
58969
|
+
const baseURL = own('baseURL');
|
|
58970
|
+
const allowAbsoluteUrls = own('allowAbsoluteUrls');
|
|
58971
|
+
const url = own('url');
|
|
58399
58972
|
|
|
58400
58973
|
newConfig.headers = headers = _core_AxiosHeaders_js__WEBPACK_IMPORTED_MODULE_6__["default"].from(headers);
|
|
58401
58974
|
|
|
58402
58975
|
newConfig.url = (0,_buildURL_js__WEBPACK_IMPORTED_MODULE_7__["default"])(
|
|
58403
|
-
(0,_core_buildFullPath_js__WEBPACK_IMPORTED_MODULE_4__["default"])(
|
|
58976
|
+
(0,_core_buildFullPath_js__WEBPACK_IMPORTED_MODULE_4__["default"])(baseURL, url, allowAbsoluteUrls),
|
|
58404
58977
|
config.params,
|
|
58405
58978
|
config.paramsSerializer
|
|
58406
58979
|
);
|
|
@@ -58410,11 +58983,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
58410
58983
|
headers.set(
|
|
58411
58984
|
'Authorization',
|
|
58412
58985
|
'Basic ' +
|
|
58413
|
-
btoa(
|
|
58414
|
-
(auth.username || '') +
|
|
58415
|
-
':' +
|
|
58416
|
-
(auth.password ? unescape(encodeURIComponent(auth.password)) : '')
|
|
58417
|
-
)
|
|
58986
|
+
btoa((auth.username || '') + ':' + (auth.password ? encodeUTF8(auth.password) : ''))
|
|
58418
58987
|
);
|
|
58419
58988
|
}
|
|
58420
58989
|
|
|
@@ -58423,14 +58992,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
58423
58992
|
headers.setContentType(undefined); // browser handles it
|
|
58424
58993
|
} else if (_utils_js__WEBPACK_IMPORTED_MODULE_1__["default"].isFunction(data.getHeaders)) {
|
|
58425
58994
|
// Node.js FormData (like form-data package)
|
|
58426
|
-
|
|
58427
|
-
// Only set safe headers to avoid overwriting security headers
|
|
58428
|
-
const allowedHeaders = ['content-type', 'content-length'];
|
|
58429
|
-
Object.entries(formHeaders).forEach(([key, val]) => {
|
|
58430
|
-
if (allowedHeaders.includes(key.toLowerCase())) {
|
|
58431
|
-
headers.set(key, val);
|
|
58432
|
-
}
|
|
58433
|
-
});
|
|
58995
|
+
setFormDataHeaders(headers, data.getHeaders(), own('formDataHeaderPolicy'));
|
|
58434
58996
|
}
|
|
58435
58997
|
}
|
|
58436
58998
|
|
|
@@ -58439,10 +59001,17 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
58439
59001
|
// Specifically not if we're in a web worker, or react-native.
|
|
58440
59002
|
|
|
58441
59003
|
if (_platform_index_js__WEBPACK_IMPORTED_MODULE_0__["default"].hasStandardBrowserEnv) {
|
|
58442
|
-
|
|
59004
|
+
if (_utils_js__WEBPACK_IMPORTED_MODULE_1__["default"].isFunction(withXSRFToken)) {
|
|
59005
|
+
withXSRFToken = withXSRFToken(newConfig);
|
|
59006
|
+
}
|
|
58443
59007
|
|
|
58444
|
-
|
|
58445
|
-
|
|
59008
|
+
// Strict boolean check — prevents proto-pollution gadgets (e.g. Object.prototype.withXSRFToken = 1)
|
|
59009
|
+
// and misconfigurations (e.g. "false") from short-circuiting the same-origin check and leaking
|
|
59010
|
+
// the XSRF token cross-origin.
|
|
59011
|
+
const shouldSendXSRF =
|
|
59012
|
+
withXSRFToken === true || (withXSRFToken == null && (0,_isURLSameOrigin_js__WEBPACK_IMPORTED_MODULE_2__["default"])(newConfig.url));
|
|
59013
|
+
|
|
59014
|
+
if (shouldSendXSRF) {
|
|
58446
59015
|
const xsrfValue = xsrfHeaderName && xsrfCookieName && _cookies_js__WEBPACK_IMPORTED_MODULE_3__["default"].read(xsrfCookieName);
|
|
58447
59016
|
|
|
58448
59017
|
if (xsrfValue) {
|
|
@@ -58455,6 +59024,81 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
58455
59024
|
});
|
|
58456
59025
|
|
|
58457
59026
|
|
|
59027
|
+
/***/ },
|
|
59028
|
+
|
|
59029
|
+
/***/ 51306
|
|
59030
|
+
(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
|
|
59031
|
+
|
|
59032
|
+
"use strict";
|
|
59033
|
+
__webpack_require__.r(__webpack_exports__);
|
|
59034
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
59035
|
+
/* harmony export */ sanitizeByteStringHeaderValue: () => (/* binding */ sanitizeByteStringHeaderValue),
|
|
59036
|
+
/* harmony export */ sanitizeHeaderValue: () => (/* binding */ sanitizeHeaderValue),
|
|
59037
|
+
/* harmony export */ toByteStringHeaderObject: () => (/* binding */ toByteStringHeaderObject)
|
|
59038
|
+
/* harmony export */ });
|
|
59039
|
+
/* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(68750);
|
|
59040
|
+
|
|
59041
|
+
|
|
59042
|
+
|
|
59043
|
+
|
|
59044
|
+
function trimSPorHTAB(str) {
|
|
59045
|
+
let start = 0;
|
|
59046
|
+
let end = str.length;
|
|
59047
|
+
|
|
59048
|
+
while (start < end) {
|
|
59049
|
+
const code = str.charCodeAt(start);
|
|
59050
|
+
|
|
59051
|
+
if (code !== 0x09 && code !== 0x20) {
|
|
59052
|
+
break;
|
|
59053
|
+
}
|
|
59054
|
+
|
|
59055
|
+
start += 1;
|
|
59056
|
+
}
|
|
59057
|
+
|
|
59058
|
+
while (end > start) {
|
|
59059
|
+
const code = str.charCodeAt(end - 1);
|
|
59060
|
+
|
|
59061
|
+
if (code !== 0x09 && code !== 0x20) {
|
|
59062
|
+
break;
|
|
59063
|
+
}
|
|
59064
|
+
|
|
59065
|
+
end -= 1;
|
|
59066
|
+
}
|
|
59067
|
+
|
|
59068
|
+
return start === 0 && end === str.length ? str : str.slice(start, end);
|
|
59069
|
+
}
|
|
59070
|
+
|
|
59071
|
+
// The control-code ranges are intentional: header sanitization strips C0/DEL bytes.
|
|
59072
|
+
// eslint-disable-next-line no-control-regex
|
|
59073
|
+
const INVALID_UNICODE_HEADER_VALUE_CHARS = new RegExp('[\\u0000-\\u0008\\u000a-\\u001f\\u007f]+', 'g');
|
|
59074
|
+
// eslint-disable-next-line no-control-regex
|
|
59075
|
+
const INVALID_BYTE_STRING_HEADER_VALUE_CHARS = new RegExp('[^\\u0009\\u0020-\\u007e\\u0080-\\u00ff]+', 'g');
|
|
59076
|
+
|
|
59077
|
+
function sanitizeValue(value, invalidChars) {
|
|
59078
|
+
if (_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isArray(value)) {
|
|
59079
|
+
return value.map((item) => sanitizeValue(item, invalidChars));
|
|
59080
|
+
}
|
|
59081
|
+
|
|
59082
|
+
return trimSPorHTAB(String(value).replace(invalidChars, ''));
|
|
59083
|
+
}
|
|
59084
|
+
|
|
59085
|
+
const sanitizeHeaderValue = (value) =>
|
|
59086
|
+
sanitizeValue(value, INVALID_UNICODE_HEADER_VALUE_CHARS);
|
|
59087
|
+
|
|
59088
|
+
const sanitizeByteStringHeaderValue = (value) =>
|
|
59089
|
+
sanitizeValue(value, INVALID_BYTE_STRING_HEADER_VALUE_CHARS);
|
|
59090
|
+
|
|
59091
|
+
function toByteStringHeaderObject(headers) {
|
|
59092
|
+
const byteStringHeaders = Object.create(null);
|
|
59093
|
+
|
|
59094
|
+
_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].forEach(headers.toJSON(), (value, header) => {
|
|
59095
|
+
byteStringHeaders[header] = sanitizeByteStringHeaderValue(value);
|
|
59096
|
+
});
|
|
59097
|
+
|
|
59098
|
+
return byteStringHeaders;
|
|
59099
|
+
}
|
|
59100
|
+
|
|
59101
|
+
|
|
58458
59102
|
/***/ },
|
|
58459
59103
|
|
|
58460
59104
|
/***/ 87884
|
|
@@ -58748,6 +59392,7 @@ function toFormData(obj, formData, options) {
|
|
|
58748
59392
|
const dots = options.dots;
|
|
58749
59393
|
const indexes = options.indexes;
|
|
58750
59394
|
const _Blob = options.Blob || (typeof Blob !== 'undefined' && Blob);
|
|
59395
|
+
const maxDepth = options.maxDepth === undefined ? 100 : options.maxDepth;
|
|
58751
59396
|
const useBlob = _Blob && _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isSpecCompliantForm(formData);
|
|
58752
59397
|
|
|
58753
59398
|
if (!_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isFunction(visitor)) {
|
|
@@ -58840,9 +59485,16 @@ function toFormData(obj, formData, options) {
|
|
|
58840
59485
|
isVisitable,
|
|
58841
59486
|
});
|
|
58842
59487
|
|
|
58843
|
-
function build(value, path) {
|
|
59488
|
+
function build(value, path, depth = 0) {
|
|
58844
59489
|
if (_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isUndefined(value)) return;
|
|
58845
59490
|
|
|
59491
|
+
if (depth > maxDepth) {
|
|
59492
|
+
throw new _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_1__["default"](
|
|
59493
|
+
'Object is too deeply nested (' + depth + ' levels). Max depth: ' + maxDepth,
|
|
59494
|
+
_core_AxiosError_js__WEBPACK_IMPORTED_MODULE_1__["default"].ERR_FORM_DATA_DEPTH_EXCEEDED
|
|
59495
|
+
);
|
|
59496
|
+
}
|
|
59497
|
+
|
|
58846
59498
|
if (stack.indexOf(value) !== -1) {
|
|
58847
59499
|
throw Error('Circular reference detected in ' + path.join('.'));
|
|
58848
59500
|
}
|
|
@@ -58855,7 +59507,7 @@ function toFormData(obj, formData, options) {
|
|
|
58855
59507
|
visitor.call(formData, el, _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isString(key) ? key.trim() : key, path, exposedHelpers);
|
|
58856
59508
|
|
|
58857
59509
|
if (result === true) {
|
|
58858
|
-
build(el, path ? path.concat(key) : [key]);
|
|
59510
|
+
build(el, path ? path.concat(key) : [key], depth + 1);
|
|
58859
59511
|
}
|
|
58860
59512
|
});
|
|
58861
59513
|
|
|
@@ -59111,7 +59763,9 @@ function assertOptions(options, schema, allowUnknown) {
|
|
|
59111
59763
|
let i = keys.length;
|
|
59112
59764
|
while (i-- > 0) {
|
|
59113
59765
|
const opt = keys[i];
|
|
59114
|
-
|
|
59766
|
+
// Use hasOwnProperty so a polluted Object.prototype.<opt> cannot supply
|
|
59767
|
+
// a non-function validator and cause a TypeError.
|
|
59768
|
+
const validator = Object.prototype.hasOwnProperty.call(schema, opt) ? schema[opt] : undefined;
|
|
59115
59769
|
if (validator) {
|
|
59116
59770
|
const value = options[opt];
|
|
59117
59771
|
const result = value === undefined || validator(value, opt, options);
|
|
@@ -59498,21 +60152,21 @@ const isFile = kindOfTest('File');
|
|
|
59498
60152
|
* also have a `name` and `type` attribute to specify filename and content type
|
|
59499
60153
|
*
|
|
59500
60154
|
* @see https://github.com/facebook/react-native/blob/26684cf3adf4094eb6c405d345a75bf8c7c0bf88/Libraries/Network/FormData.js#L68-L71
|
|
59501
|
-
*
|
|
60155
|
+
*
|
|
59502
60156
|
* @param {*} value The value to test
|
|
59503
|
-
*
|
|
60157
|
+
*
|
|
59504
60158
|
* @returns {boolean} True if value is a React Native Blob, otherwise false
|
|
59505
60159
|
*/
|
|
59506
60160
|
const isReactNativeBlob = (value) => {
|
|
59507
60161
|
return !!(value && typeof value.uri !== 'undefined');
|
|
59508
|
-
}
|
|
60162
|
+
};
|
|
59509
60163
|
|
|
59510
60164
|
/**
|
|
59511
60165
|
* Determine if environment is React Native
|
|
59512
60166
|
* ReactNative `FormData` has a non-standard `getParts()` method
|
|
59513
|
-
*
|
|
60167
|
+
*
|
|
59514
60168
|
* @param {*} formData The formData to test
|
|
59515
|
-
*
|
|
60169
|
+
*
|
|
59516
60170
|
* @returns {boolean} True if environment is React Native, otherwise false
|
|
59517
60171
|
*/
|
|
59518
60172
|
const isReactNative = (formData) => formData && typeof formData.getParts !== 'undefined';
|
|
@@ -59531,7 +60185,7 @@ const isBlob = kindOfTest('Blob');
|
|
|
59531
60185
|
*
|
|
59532
60186
|
* @param {*} val The value to test
|
|
59533
60187
|
*
|
|
59534
|
-
* @returns {boolean} True if value is a
|
|
60188
|
+
* @returns {boolean} True if value is a FileList, otherwise false
|
|
59535
60189
|
*/
|
|
59536
60190
|
const isFileList = kindOfTest('FileList');
|
|
59537
60191
|
|
|
@@ -59563,15 +60217,17 @@ const G = getGlobal();
|
|
|
59563
60217
|
const FormDataCtor = typeof G.FormData !== 'undefined' ? G.FormData : undefined;
|
|
59564
60218
|
|
|
59565
60219
|
const isFormData = (thing) => {
|
|
59566
|
-
|
|
59567
|
-
|
|
59568
|
-
|
|
59569
|
-
|
|
59570
|
-
|
|
59571
|
-
|
|
59572
|
-
|
|
59573
|
-
|
|
59574
|
-
|
|
60220
|
+
if (!thing) return false;
|
|
60221
|
+
if (FormDataCtor && thing instanceof FormDataCtor) return true;
|
|
60222
|
+
// Reject plain objects inheriting directly from Object.prototype so prototype-pollution gadgets can't spoof FormData.
|
|
60223
|
+
const proto = getPrototypeOf(thing);
|
|
60224
|
+
if (!proto || proto === Object.prototype) return false;
|
|
60225
|
+
if (!isFunction(thing.append)) return false;
|
|
60226
|
+
const kind = kindOf(thing);
|
|
60227
|
+
return (
|
|
60228
|
+
kind === 'formdata' ||
|
|
60229
|
+
// detect form-data instance
|
|
60230
|
+
(kind === 'object' && isFunction(thing.toString) && thing.toString() === '[object FormData]')
|
|
59575
60231
|
);
|
|
59576
60232
|
};
|
|
59577
60233
|
|
|
@@ -59707,7 +60363,7 @@ const isContextDefined = (context) => !isUndefined(context) && context !== _glob
|
|
|
59707
60363
|
*
|
|
59708
60364
|
* @returns {Object} Result of all merge properties
|
|
59709
60365
|
*/
|
|
59710
|
-
function merge(
|
|
60366
|
+
function merge(...objs) {
|
|
59711
60367
|
const { caseless, skipUndefined } = (isContextDefined(this) && this) || {};
|
|
59712
60368
|
const result = {};
|
|
59713
60369
|
const assignValue = (val, key) => {
|
|
@@ -59717,8 +60373,12 @@ function merge(/* obj1, obj2, obj3, ... */) {
|
|
|
59717
60373
|
}
|
|
59718
60374
|
|
|
59719
60375
|
const targetKey = (caseless && findKey(result, key)) || key;
|
|
59720
|
-
|
|
59721
|
-
|
|
60376
|
+
// Read via own-prop only — a bare `result[targetKey]` walks the prototype
|
|
60377
|
+
// chain, so a polluted Object.prototype value could surface here and get
|
|
60378
|
+
// copied into the merged result.
|
|
60379
|
+
const existing = hasOwnProperty(result, targetKey) ? result[targetKey] : undefined;
|
|
60380
|
+
if (isPlainObject(existing) && isPlainObject(val)) {
|
|
60381
|
+
result[targetKey] = merge(existing, val);
|
|
59722
60382
|
} else if (isPlainObject(val)) {
|
|
59723
60383
|
result[targetKey] = merge({}, val);
|
|
59724
60384
|
} else if (isArray(val)) {
|
|
@@ -59728,8 +60388,8 @@ function merge(/* obj1, obj2, obj3, ... */) {
|
|
|
59728
60388
|
}
|
|
59729
60389
|
};
|
|
59730
60390
|
|
|
59731
|
-
for (let i = 0, l =
|
|
59732
|
-
|
|
60391
|
+
for (let i = 0, l = objs.length; i < l; i++) {
|
|
60392
|
+
objs[i] && forEach(objs[i], assignValue);
|
|
59733
60393
|
}
|
|
59734
60394
|
return result;
|
|
59735
60395
|
}
|
|
@@ -59751,6 +60411,9 @@ const extend = (a, b, thisArg, { allOwnKeys } = {}) => {
|
|
|
59751
60411
|
(val, key) => {
|
|
59752
60412
|
if (thisArg && isFunction(val)) {
|
|
59753
60413
|
Object.defineProperty(a, key, {
|
|
60414
|
+
// Null-proto descriptor so a polluted Object.prototype.get cannot
|
|
60415
|
+
// hijack defineProperty's accessor-vs-data resolution.
|
|
60416
|
+
__proto__: null,
|
|
59754
60417
|
value: (0,_helpers_bind_js__WEBPACK_IMPORTED_MODULE_0__["default"])(val, thisArg),
|
|
59755
60418
|
writable: true,
|
|
59756
60419
|
enumerable: true,
|
|
@@ -59758,6 +60421,7 @@ const extend = (a, b, thisArg, { allOwnKeys } = {}) => {
|
|
|
59758
60421
|
});
|
|
59759
60422
|
} else {
|
|
59760
60423
|
Object.defineProperty(a, key, {
|
|
60424
|
+
__proto__: null,
|
|
59761
60425
|
value: val,
|
|
59762
60426
|
writable: true,
|
|
59763
60427
|
enumerable: true,
|
|
@@ -59796,12 +60460,14 @@ const stripBOM = (content) => {
|
|
|
59796
60460
|
const inherits = (constructor, superConstructor, props, descriptors) => {
|
|
59797
60461
|
constructor.prototype = Object.create(superConstructor.prototype, descriptors);
|
|
59798
60462
|
Object.defineProperty(constructor.prototype, 'constructor', {
|
|
60463
|
+
__proto__: null,
|
|
59799
60464
|
value: constructor,
|
|
59800
60465
|
writable: true,
|
|
59801
60466
|
enumerable: false,
|
|
59802
60467
|
configurable: true,
|
|
59803
60468
|
});
|
|
59804
60469
|
Object.defineProperty(constructor, 'super', {
|
|
60470
|
+
__proto__: null,
|
|
59805
60471
|
value: superConstructor.prototype,
|
|
59806
60472
|
});
|
|
59807
60473
|
props && Object.assign(constructor.prototype, props);
|
|
@@ -59983,7 +60649,7 @@ const reduceDescriptors = (obj, reducer) => {
|
|
|
59983
60649
|
const freezeMethods = (obj) => {
|
|
59984
60650
|
reduceDescriptors(obj, (descriptor, name) => {
|
|
59985
60651
|
// skip restricted props in strict mode
|
|
59986
|
-
if (isFunction(obj) && ['arguments', 'caller', 'callee'].
|
|
60652
|
+
if (isFunction(obj) && ['arguments', 'caller', 'callee'].includes(name)) {
|
|
59987
60653
|
return false;
|
|
59988
60654
|
}
|
|
59989
60655
|
|
|
@@ -60057,11 +60723,11 @@ function isSpecCompliantForm(thing) {
|
|
|
60057
60723
|
* @returns {Object} The JSON-compatible object.
|
|
60058
60724
|
*/
|
|
60059
60725
|
const toJSONObject = (obj) => {
|
|
60060
|
-
const
|
|
60726
|
+
const visited = new WeakSet();
|
|
60061
60727
|
|
|
60062
|
-
const visit = (source
|
|
60728
|
+
const visit = (source) => {
|
|
60063
60729
|
if (isObject(source)) {
|
|
60064
|
-
if (
|
|
60730
|
+
if (visited.has(source)) {
|
|
60065
60731
|
return;
|
|
60066
60732
|
}
|
|
60067
60733
|
|
|
@@ -60071,15 +60737,16 @@ const toJSONObject = (obj) => {
|
|
|
60071
60737
|
}
|
|
60072
60738
|
|
|
60073
60739
|
if (!('toJSON' in source)) {
|
|
60074
|
-
|
|
60740
|
+
// add-on descent / delete-on-ascent: preserves path semantics, so DAG nodes serialise at every occurrence (see #7230).
|
|
60741
|
+
visited.add(source);
|
|
60075
60742
|
const target = isArray(source) ? [] : {};
|
|
60076
60743
|
|
|
60077
60744
|
forEach(source, (value, key) => {
|
|
60078
|
-
const reducedValue = visit(value
|
|
60745
|
+
const reducedValue = visit(value);
|
|
60079
60746
|
!isUndefined(reducedValue) && (target[key] = reducedValue);
|
|
60080
60747
|
});
|
|
60081
60748
|
|
|
60082
|
-
|
|
60749
|
+
visited.delete(source);
|
|
60083
60750
|
|
|
60084
60751
|
return target;
|
|
60085
60752
|
}
|
|
@@ -60088,7 +60755,7 @@ const toJSONObject = (obj) => {
|
|
|
60088
60755
|
return source;
|
|
60089
60756
|
};
|
|
60090
60757
|
|
|
60091
|
-
return visit(obj
|
|
60758
|
+
return visit(obj);
|
|
60092
60759
|
};
|
|
60093
60760
|
|
|
60094
60761
|
/**
|
|
@@ -73263,8 +73930,10 @@ class Composer {
|
|
|
73263
73930
|
}
|
|
73264
73931
|
}
|
|
73265
73932
|
if (afterDoc) {
|
|
73266
|
-
|
|
73267
|
-
|
|
73933
|
+
for (let i = 0; i < this.errors.length; ++i)
|
|
73934
|
+
doc.errors.push(this.errors[i]);
|
|
73935
|
+
for (let i = 0; i < this.warnings.length; ++i)
|
|
73936
|
+
doc.warnings.push(this.warnings[i]);
|
|
73268
73937
|
}
|
|
73269
73938
|
else {
|
|
73270
73939
|
doc.errors = this.errors;
|
|
@@ -74226,7 +74895,7 @@ function doubleQuotedValue(source, onError) {
|
|
|
74226
74895
|
next = source[++i + 1];
|
|
74227
74896
|
}
|
|
74228
74897
|
else if (next === 'x' || next === 'u' || next === 'U') {
|
|
74229
|
-
const length =
|
|
74898
|
+
const length = next === 'x' ? 2 : next === 'u' ? 4 : 8;
|
|
74230
74899
|
res += parseCharCode(source, i + 1, length, onError);
|
|
74231
74900
|
i += length;
|
|
74232
74901
|
}
|
|
@@ -74296,12 +74965,14 @@ function parseCharCode(source, offset, length, onError) {
|
|
|
74296
74965
|
const cc = source.substr(offset, length);
|
|
74297
74966
|
const ok = cc.length === length && /^[0-9a-fA-F]+$/.test(cc);
|
|
74298
74967
|
const code = ok ? parseInt(cc, 16) : NaN;
|
|
74299
|
-
|
|
74968
|
+
try {
|
|
74969
|
+
return String.fromCodePoint(code);
|
|
74970
|
+
}
|
|
74971
|
+
catch {
|
|
74300
74972
|
const raw = source.substr(offset - 2, length + 2);
|
|
74301
74973
|
onError(offset - 2, 'BAD_DQ_ESCAPE', `Invalid escape sequence ${raw}`);
|
|
74302
74974
|
return raw;
|
|
74303
74975
|
}
|
|
74304
|
-
return String.fromCodePoint(code);
|
|
74305
74976
|
}
|
|
74306
74977
|
|
|
74307
74978
|
|
|
@@ -75614,6 +76285,8 @@ class Alias extends _Node_js__WEBPACK_IMPORTED_MODULE_3__.NodeBase {
|
|
|
75614
76285
|
* instance of the `source` anchor before this node.
|
|
75615
76286
|
*/
|
|
75616
76287
|
resolve(doc, ctx) {
|
|
76288
|
+
if (ctx?.maxAliasCount === 0)
|
|
76289
|
+
throw new ReferenceError('Alias resolution is disabled');
|
|
75617
76290
|
let nodes;
|
|
75618
76291
|
if (ctx?.aliasResolveCache) {
|
|
75619
76292
|
nodes = ctx.aliasResolveCache;
|
|
@@ -77368,7 +78041,7 @@ class Lexer {
|
|
|
77368
78041
|
const n = (yield* this.pushCount(1)) + (yield* this.pushSpaces(true));
|
|
77369
78042
|
this.indentNext = this.indentValue + 1;
|
|
77370
78043
|
this.indentValue += n;
|
|
77371
|
-
return
|
|
78044
|
+
return 'block-start';
|
|
77372
78045
|
}
|
|
77373
78046
|
return 'doc';
|
|
77374
78047
|
}
|
|
@@ -77689,32 +78362,36 @@ class Lexer {
|
|
|
77689
78362
|
return 0;
|
|
77690
78363
|
}
|
|
77691
78364
|
*pushIndicators() {
|
|
77692
|
-
|
|
77693
|
-
|
|
77694
|
-
|
|
77695
|
-
|
|
77696
|
-
|
|
77697
|
-
|
|
77698
|
-
|
|
77699
|
-
|
|
77700
|
-
|
|
77701
|
-
|
|
77702
|
-
|
|
77703
|
-
|
|
77704
|
-
|
|
77705
|
-
|
|
77706
|
-
|
|
77707
|
-
|
|
77708
|
-
|
|
77709
|
-
|
|
77710
|
-
|
|
77711
|
-
|
|
77712
|
-
|
|
77713
|
-
|
|
78365
|
+
let n = 0;
|
|
78366
|
+
loop: while (true) {
|
|
78367
|
+
switch (this.charAt(0)) {
|
|
78368
|
+
case '!':
|
|
78369
|
+
n += yield* this.pushTag();
|
|
78370
|
+
n += yield* this.pushSpaces(true);
|
|
78371
|
+
continue loop;
|
|
78372
|
+
case '&':
|
|
78373
|
+
n += yield* this.pushUntil(isNotAnchorChar);
|
|
78374
|
+
n += yield* this.pushSpaces(true);
|
|
78375
|
+
continue loop;
|
|
78376
|
+
case '-': // this is an error
|
|
78377
|
+
case '?': // this is an error outside flow collections
|
|
78378
|
+
case ':': {
|
|
78379
|
+
const inFlow = this.flowLevel > 0;
|
|
78380
|
+
const ch1 = this.charAt(1);
|
|
78381
|
+
if (isEmpty(ch1) || (inFlow && flowIndicatorChars.has(ch1))) {
|
|
78382
|
+
if (!inFlow)
|
|
78383
|
+
this.indentNext = this.indentValue + 1;
|
|
78384
|
+
else if (this.flowKey)
|
|
78385
|
+
this.flowKey = false;
|
|
78386
|
+
n += yield* this.pushCount(1);
|
|
78387
|
+
n += yield* this.pushSpaces(true);
|
|
78388
|
+
continue loop;
|
|
78389
|
+
}
|
|
77714
78390
|
}
|
|
77715
78391
|
}
|
|
78392
|
+
break loop;
|
|
77716
78393
|
}
|
|
77717
|
-
return
|
|
78394
|
+
return n;
|
|
77718
78395
|
}
|
|
77719
78396
|
*pushTag() {
|
|
77720
78397
|
if (this.charAt(1) === '<') {
|
|
@@ -77907,6 +78584,14 @@ function getFirstKeyStartProps(prev) {
|
|
|
77907
78584
|
}
|
|
77908
78585
|
return prev.splice(i, prev.length);
|
|
77909
78586
|
}
|
|
78587
|
+
function arrayPushArray(target, source) {
|
|
78588
|
+
// May exhaust call stack with large `source` array
|
|
78589
|
+
if (source.length < 1e5)
|
|
78590
|
+
Array.prototype.push.apply(target, source);
|
|
78591
|
+
else
|
|
78592
|
+
for (let i = 0; i < source.length; ++i)
|
|
78593
|
+
target.push(source[i]);
|
|
78594
|
+
}
|
|
77910
78595
|
function fixFlowSeqItems(fc) {
|
|
77911
78596
|
if (fc.start.type === 'flow-seq-start') {
|
|
77912
78597
|
for (const it of fc.items) {
|
|
@@ -77919,12 +78604,12 @@ function fixFlowSeqItems(fc) {
|
|
|
77919
78604
|
delete it.key;
|
|
77920
78605
|
if (isFlowToken(it.value)) {
|
|
77921
78606
|
if (it.value.end)
|
|
77922
|
-
|
|
78607
|
+
arrayPushArray(it.value.end, it.sep);
|
|
77923
78608
|
else
|
|
77924
78609
|
it.value.end = it.sep;
|
|
77925
78610
|
}
|
|
77926
78611
|
else
|
|
77927
|
-
|
|
78612
|
+
arrayPushArray(it.start, it.sep);
|
|
77928
78613
|
delete it.sep;
|
|
77929
78614
|
}
|
|
77930
78615
|
}
|
|
@@ -78342,7 +79027,7 @@ class Parser {
|
|
|
78342
79027
|
const prev = map.items[map.items.length - 2];
|
|
78343
79028
|
const end = prev?.value?.end;
|
|
78344
79029
|
if (Array.isArray(end)) {
|
|
78345
|
-
|
|
79030
|
+
arrayPushArray(end, it.start);
|
|
78346
79031
|
end.push(this.sourceToken);
|
|
78347
79032
|
map.items.pop();
|
|
78348
79033
|
return;
|
|
@@ -78557,7 +79242,7 @@ class Parser {
|
|
|
78557
79242
|
const prev = seq.items[seq.items.length - 2];
|
|
78558
79243
|
const end = prev?.value?.end;
|
|
78559
79244
|
if (Array.isArray(end)) {
|
|
78560
|
-
|
|
79245
|
+
arrayPushArray(end, it.start);
|
|
78561
79246
|
end.push(this.sourceToken);
|
|
78562
79247
|
seq.items.pop();
|
|
78563
79248
|
return;
|
|
@@ -79793,18 +80478,18 @@ const isMergeKey = (ctx, key) => (merge.identify(key) ||
|
|
|
79793
80478
|
merge.identify(key.value))) &&
|
|
79794
80479
|
ctx?.doc.schema.tags.some(tag => tag.tag === merge.tag && tag.default);
|
|
79795
80480
|
function addMergeToJSMap(ctx, map, value) {
|
|
79796
|
-
|
|
79797
|
-
if ((0,_nodes_identity_js__WEBPACK_IMPORTED_MODULE_0__.isSeq)(
|
|
79798
|
-
for (const it of
|
|
80481
|
+
const source = resolveAliasValue(ctx, value);
|
|
80482
|
+
if ((0,_nodes_identity_js__WEBPACK_IMPORTED_MODULE_0__.isSeq)(source))
|
|
80483
|
+
for (const it of source.items)
|
|
79799
80484
|
mergeValue(ctx, map, it);
|
|
79800
|
-
else if (Array.isArray(
|
|
79801
|
-
for (const it of
|
|
80485
|
+
else if (Array.isArray(source))
|
|
80486
|
+
for (const it of source)
|
|
79802
80487
|
mergeValue(ctx, map, it);
|
|
79803
80488
|
else
|
|
79804
|
-
mergeValue(ctx, map,
|
|
80489
|
+
mergeValue(ctx, map, source);
|
|
79805
80490
|
}
|
|
79806
80491
|
function mergeValue(ctx, map, value) {
|
|
79807
|
-
const source = ctx
|
|
80492
|
+
const source = resolveAliasValue(ctx, value);
|
|
79808
80493
|
if (!(0,_nodes_identity_js__WEBPACK_IMPORTED_MODULE_0__.isMap)(source))
|
|
79809
80494
|
throw new Error('Merge sources must be maps or map aliases');
|
|
79810
80495
|
const srcMap = source.toJSON(null, ctx, Map);
|
|
@@ -79827,6 +80512,9 @@ function mergeValue(ctx, map, value) {
|
|
|
79827
80512
|
}
|
|
79828
80513
|
return map;
|
|
79829
80514
|
}
|
|
80515
|
+
function resolveAliasValue(ctx, value) {
|
|
80516
|
+
return ctx && (0,_nodes_identity_js__WEBPACK_IMPORTED_MODULE_0__.isAlias)(value) ? value.resolve(ctx.doc, ctx) : value;
|
|
80517
|
+
}
|
|
79830
80518
|
|
|
79831
80519
|
|
|
79832
80520
|
|
|
@@ -80937,7 +81625,8 @@ function stringifyNumber({ format, minFractionDigits, tag, value }) {
|
|
|
80937
81625
|
if (!format &&
|
|
80938
81626
|
minFractionDigits &&
|
|
80939
81627
|
(!tag || tag === 'tag:yaml.org,2002:float') &&
|
|
80940
|
-
|
|
81628
|
+
/^-?\d/.test(n) &&
|
|
81629
|
+
!n.includes('e')) {
|
|
80941
81630
|
let i = n.indexOf('.');
|
|
80942
81631
|
if (i < 0) {
|
|
80943
81632
|
i = n.length;
|