@speclynx/apidom-overlay 4.11.1 → 4.12.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +4 -0
- package/dist/apidom-overlay.browser.js +1413 -229
- package/dist/apidom-overlay.browser.min.js +1 -1
- package/package.json +9 -9
- package/src/apply/realms/apidom.cjs +3 -1
- package/src/apply/realms/pojo.cjs +3 -1
- package/src/apply/realms/uri.cjs +3 -1
- package/src/apply/trace/TraceBuilder.cjs +3 -1
- package/src/apply/trace/index.cjs +10 -4
- package/src/apply/trace/types.cjs +3 -1
- package/src/diff/index.cjs +28 -7
- package/src/diff/realms/apidom.cjs +3 -1
- package/src/diff/realms/pojo.cjs +3 -1
- package/src/diff/realms/uri.cjs +3 -1
- package/src/errors/OverlayError.cjs +3 -1
- package/src/index.cjs +76 -15
- package/src/validate.cjs +3 -1
|
@@ -85740,14 +85740,28 @@ const factory = (env) => {
|
|
|
85740
85740
|
|
|
85741
85741
|
let requestContentLength;
|
|
85742
85742
|
|
|
85743
|
+
// AxiosError we raise while the request body is being streamed. Captured
|
|
85744
|
+
// by identity so the catch block can surface it directly, regardless of
|
|
85745
|
+
// how the runtime wraps the resulting fetch rejection (undici exposes it
|
|
85746
|
+
// as `err.cause`; some browsers drop the original error entirely).
|
|
85747
|
+
let pendingBodyError = null;
|
|
85748
|
+
|
|
85749
|
+
const maxBodyLengthError = () =>
|
|
85750
|
+
new _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_2__["default"](
|
|
85751
|
+
'Request body larger than maxBodyLength limit',
|
|
85752
|
+
_core_AxiosError_js__WEBPACK_IMPORTED_MODULE_2__["default"].ERR_BAD_REQUEST,
|
|
85753
|
+
config,
|
|
85754
|
+
request
|
|
85755
|
+
);
|
|
85756
|
+
|
|
85743
85757
|
try {
|
|
85744
85758
|
// HTTP basic authentication
|
|
85745
85759
|
let auth = undefined;
|
|
85746
85760
|
const configAuth = own('auth');
|
|
85747
85761
|
|
|
85748
85762
|
if (configAuth) {
|
|
85749
|
-
const username = configAuth
|
|
85750
|
-
const password = configAuth
|
|
85763
|
+
const username = _utils_js__WEBPACK_IMPORTED_MODULE_1__["default"].getSafeProp(configAuth, 'username') || '';
|
|
85764
|
+
const password = _utils_js__WEBPACK_IMPORTED_MODULE_1__["default"].getSafeProp(configAuth, 'password') || '';
|
|
85751
85765
|
auth = {
|
|
85752
85766
|
username,
|
|
85753
85767
|
password
|
|
@@ -85796,53 +85810,96 @@ const factory = (env) => {
|
|
|
85796
85810
|
}
|
|
85797
85811
|
}
|
|
85798
85812
|
|
|
85799
|
-
// Enforce maxBodyLength against
|
|
85800
|
-
//
|
|
85801
|
-
//
|
|
85802
|
-
//
|
|
85813
|
+
// Enforce maxBodyLength against known-size bodies before dispatch using
|
|
85814
|
+
// the body's *actual* size — never a caller-declared Content-Length,
|
|
85815
|
+
// which could under-report to slip an oversized body past the check.
|
|
85816
|
+
// Unknown-size streams return undefined here and are counted per-chunk
|
|
85817
|
+
// below as fetch consumes them.
|
|
85803
85818
|
if (hasMaxBodyLength && method !== 'get' && method !== 'head') {
|
|
85804
|
-
const outboundLength = await
|
|
85805
|
-
if (
|
|
85806
|
-
|
|
85807
|
-
|
|
85808
|
-
|
|
85809
|
-
|
|
85810
|
-
throw new _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_2__["default"](
|
|
85811
|
-
'Request body larger than maxBodyLength limit',
|
|
85812
|
-
_core_AxiosError_js__WEBPACK_IMPORTED_MODULE_2__["default"].ERR_BAD_REQUEST,
|
|
85813
|
-
config,
|
|
85814
|
-
request
|
|
85815
|
-
);
|
|
85819
|
+
const outboundLength = await getBodyLength(data);
|
|
85820
|
+
if (typeof outboundLength === 'number' && isFinite(outboundLength)) {
|
|
85821
|
+
requestContentLength = outboundLength;
|
|
85822
|
+
if (outboundLength > maxBodyLength) {
|
|
85823
|
+
throw maxBodyLengthError();
|
|
85824
|
+
}
|
|
85816
85825
|
}
|
|
85817
85826
|
}
|
|
85818
85827
|
|
|
85828
|
+
// A streamed body under maxBodyLength must be counted as fetch consumes
|
|
85829
|
+
// it; its size is never trusted from a caller-declared Content-Length.
|
|
85830
|
+
const mustEnforceStreamBody =
|
|
85831
|
+
hasMaxBodyLength && (_utils_js__WEBPACK_IMPORTED_MODULE_1__["default"].isReadableStream(data) || _utils_js__WEBPACK_IMPORTED_MODULE_1__["default"].isStream(data));
|
|
85832
|
+
|
|
85833
|
+
const trackRequestStream = (stream, onProgress, flush) =>
|
|
85834
|
+
(0,_helpers_trackStream_js__WEBPACK_IMPORTED_MODULE_4__.trackStream)(
|
|
85835
|
+
stream,
|
|
85836
|
+
DEFAULT_CHUNK_SIZE,
|
|
85837
|
+
(loadedBytes) => {
|
|
85838
|
+
if (hasMaxBodyLength && loadedBytes > maxBodyLength) {
|
|
85839
|
+
throw (pendingBodyError = maxBodyLengthError());
|
|
85840
|
+
}
|
|
85841
|
+
onProgress && onProgress(loadedBytes);
|
|
85842
|
+
},
|
|
85843
|
+
flush
|
|
85844
|
+
);
|
|
85845
|
+
|
|
85819
85846
|
if (
|
|
85820
|
-
onUploadProgress &&
|
|
85821
85847
|
supportsRequestStream &&
|
|
85822
85848
|
method !== 'get' &&
|
|
85823
85849
|
method !== 'head' &&
|
|
85824
|
-
(
|
|
85850
|
+
(onUploadProgress || mustEnforceStreamBody)
|
|
85825
85851
|
) {
|
|
85826
|
-
|
|
85827
|
-
|
|
85828
|
-
|
|
85829
|
-
|
|
85830
|
-
|
|
85852
|
+
requestContentLength =
|
|
85853
|
+
requestContentLength == null ? await resolveBodyLength(headers, data) : requestContentLength;
|
|
85854
|
+
|
|
85855
|
+
// A declared length of 0 is only trusted to skip the wrap when we are
|
|
85856
|
+
// not enforcing a stream limit (which must not rely on that header).
|
|
85857
|
+
if (requestContentLength !== 0 || mustEnforceStreamBody) {
|
|
85858
|
+
let _request = new Request(url, {
|
|
85859
|
+
method: 'POST',
|
|
85860
|
+
body: data,
|
|
85861
|
+
duplex: 'half',
|
|
85862
|
+
});
|
|
85831
85863
|
|
|
85832
|
-
|
|
85864
|
+
let contentTypeHeader;
|
|
85833
85865
|
|
|
85834
|
-
|
|
85835
|
-
|
|
85836
|
-
|
|
85866
|
+
if (_utils_js__WEBPACK_IMPORTED_MODULE_1__["default"].isFormData(data) && (contentTypeHeader = _request.headers.get('content-type'))) {
|
|
85867
|
+
headers.setContentType(contentTypeHeader);
|
|
85868
|
+
}
|
|
85837
85869
|
|
|
85838
|
-
|
|
85839
|
-
|
|
85840
|
-
|
|
85841
|
-
|
|
85842
|
-
|
|
85870
|
+
if (_request.body) {
|
|
85871
|
+
const [onProgress, flush] =
|
|
85872
|
+
(onUploadProgress &&
|
|
85873
|
+
(0,_helpers_progressEventReducer_js__WEBPACK_IMPORTED_MODULE_6__.progressEventDecorator)(
|
|
85874
|
+
requestContentLength,
|
|
85875
|
+
(0,_helpers_progressEventReducer_js__WEBPACK_IMPORTED_MODULE_6__.progressEventReducer)((0,_helpers_progressEventReducer_js__WEBPACK_IMPORTED_MODULE_6__.asyncDecorator)(onUploadProgress))
|
|
85876
|
+
)) ||
|
|
85877
|
+
[];
|
|
85843
85878
|
|
|
85844
|
-
|
|
85879
|
+
data = trackRequestStream(_request.body, onProgress, flush);
|
|
85880
|
+
}
|
|
85845
85881
|
}
|
|
85882
|
+
} else if (
|
|
85883
|
+
mustEnforceStreamBody &&
|
|
85884
|
+
!isRequestSupported &&
|
|
85885
|
+
isReadableStreamSupported &&
|
|
85886
|
+
method !== 'get' &&
|
|
85887
|
+
method !== 'head'
|
|
85888
|
+
) {
|
|
85889
|
+
data = trackRequestStream(data);
|
|
85890
|
+
} else if (
|
|
85891
|
+
mustEnforceStreamBody &&
|
|
85892
|
+
isRequestSupported &&
|
|
85893
|
+
!supportsRequestStream &&
|
|
85894
|
+
method !== 'get' &&
|
|
85895
|
+
method !== 'head'
|
|
85896
|
+
) {
|
|
85897
|
+
throw new _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_2__["default"](
|
|
85898
|
+
'Stream request bodies are not supported by the current fetch implementation',
|
|
85899
|
+
_core_AxiosError_js__WEBPACK_IMPORTED_MODULE_2__["default"].ERR_NOT_SUPPORT,
|
|
85900
|
+
config,
|
|
85901
|
+
request
|
|
85902
|
+
);
|
|
85846
85903
|
}
|
|
85847
85904
|
|
|
85848
85905
|
if (!_utils_js__WEBPACK_IMPORTED_MODULE_1__["default"].isString(withCredentials)) {
|
|
@@ -85885,10 +85942,12 @@ const factory = (env) => {
|
|
|
85885
85942
|
? _fetch(request, fetchOptions)
|
|
85886
85943
|
: _fetch(url, resolvedOptions));
|
|
85887
85944
|
|
|
85945
|
+
const responseHeaders = _core_AxiosHeaders_js__WEBPACK_IMPORTED_MODULE_5__["default"].from(response.headers);
|
|
85946
|
+
|
|
85888
85947
|
// Cheap pre-check: if the server honestly declares a content-length that
|
|
85889
85948
|
// already exceeds the cap, reject before we start streaming.
|
|
85890
85949
|
if (hasMaxContentLength) {
|
|
85891
|
-
const declaredLength = _utils_js__WEBPACK_IMPORTED_MODULE_1__["default"].toFiniteNumber(
|
|
85950
|
+
const declaredLength = _utils_js__WEBPACK_IMPORTED_MODULE_1__["default"].toFiniteNumber(responseHeaders.getContentLength());
|
|
85892
85951
|
if (declaredLength != null && declaredLength > maxContentLength) {
|
|
85893
85952
|
throw new _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_2__["default"](
|
|
85894
85953
|
'maxContentLength size of ' + maxContentLength + ' exceeded',
|
|
@@ -85913,7 +85972,7 @@ const factory = (env) => {
|
|
|
85913
85972
|
options[prop] = response[prop];
|
|
85914
85973
|
});
|
|
85915
85974
|
|
|
85916
|
-
const responseContentLength = _utils_js__WEBPACK_IMPORTED_MODULE_1__["default"].toFiniteNumber(
|
|
85975
|
+
const responseContentLength = _utils_js__WEBPACK_IMPORTED_MODULE_1__["default"].toFiniteNumber(responseHeaders.getContentLength());
|
|
85917
85976
|
|
|
85918
85977
|
const [onProgress, flush] =
|
|
85919
85978
|
(onDownloadProgress &&
|
|
@@ -86008,6 +86067,23 @@ const factory = (env) => {
|
|
|
86008
86067
|
throw canceledError;
|
|
86009
86068
|
}
|
|
86010
86069
|
|
|
86070
|
+
// Surface a maxBodyLength violation we raised while the request body was
|
|
86071
|
+
// being streamed. Matching by identity (rather than reading
|
|
86072
|
+
// `err.cause.isAxiosError`) keeps the error deterministic across runtimes
|
|
86073
|
+
// and avoids both prototype-pollution reads and mis-attributing a foreign
|
|
86074
|
+
// AxiosError that merely happened to land in `err.cause`.
|
|
86075
|
+
if (pendingBodyError) {
|
|
86076
|
+
request && !pendingBodyError.request && (pendingBodyError.request = request);
|
|
86077
|
+
throw pendingBodyError;
|
|
86078
|
+
}
|
|
86079
|
+
|
|
86080
|
+
// Re-throw AxiosErrors we raised synchronously (data: URL / content-length
|
|
86081
|
+
// pre-checks, response size enforcement) without re-wrapping them.
|
|
86082
|
+
if (err instanceof _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_2__["default"]) {
|
|
86083
|
+
request && !err.request && (err.request = request);
|
|
86084
|
+
throw err;
|
|
86085
|
+
}
|
|
86086
|
+
|
|
86011
86087
|
if (err && err.name === 'TypeError' && /Load failed|fetch/i.test(err.message)) {
|
|
86012
86088
|
throw Object.assign(
|
|
86013
86089
|
new _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_2__["default"](
|
|
@@ -86749,6 +86825,7 @@ class Axios {
|
|
|
86749
86825
|
clarifyTimeoutError: validators.transitional(validators.boolean),
|
|
86750
86826
|
legacyInterceptorReqResOrdering: validators.transitional(validators.boolean),
|
|
86751
86827
|
advertiseZstdAcceptEncoding: validators.transitional(validators.boolean),
|
|
86828
|
+
validateStatusUndefinedResolves: validators.transitional(validators.boolean),
|
|
86752
86829
|
},
|
|
86753
86830
|
false
|
|
86754
86831
|
);
|
|
@@ -86880,7 +86957,7 @@ class Axios {
|
|
|
86880
86957
|
|
|
86881
86958
|
getUri(config) {
|
|
86882
86959
|
config = (0,_mergeConfig_js__WEBPACK_IMPORTED_MODULE_4__["default"])(this.defaults, config);
|
|
86883
|
-
const fullPath = (0,_buildFullPath_js__WEBPACK_IMPORTED_MODULE_5__["default"])(config.baseURL, config.url, config.allowAbsoluteUrls);
|
|
86960
|
+
const fullPath = (0,_buildFullPath_js__WEBPACK_IMPORTED_MODULE_5__["default"])(config.baseURL, config.url, config.allowAbsoluteUrls, config);
|
|
86884
86961
|
return (0,_helpers_buildURL_js__WEBPACK_IMPORTED_MODULE_1__["default"])(fullPath, config.params, config.paramsSerializer);
|
|
86885
86962
|
}
|
|
86886
86963
|
}
|
|
@@ -86893,7 +86970,7 @@ _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].forEach(['delete', 'get', 'hea
|
|
|
86893
86970
|
(0,_mergeConfig_js__WEBPACK_IMPORTED_MODULE_4__["default"])(config || {}, {
|
|
86894
86971
|
method,
|
|
86895
86972
|
url,
|
|
86896
|
-
data: (config
|
|
86973
|
+
data: config && _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].hasOwnProp(config, 'data') ? config.data : undefined,
|
|
86897
86974
|
})
|
|
86898
86975
|
);
|
|
86899
86976
|
};
|
|
@@ -87245,8 +87322,8 @@ class AxiosHeaders {
|
|
|
87245
87322
|
setHeaders(header, valueOrRewrite);
|
|
87246
87323
|
} else if (_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isString(header) && (header = header.trim()) && !isValidHeaderName(header)) {
|
|
87247
87324
|
setHeaders((0,_helpers_parseHeaders_js__WEBPACK_IMPORTED_MODULE_1__["default"])(header), valueOrRewrite);
|
|
87248
|
-
} else if (_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isObject(header) && _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].
|
|
87249
|
-
let obj =
|
|
87325
|
+
} else if (_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isObject(header) && _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isSafeIterable(header)) {
|
|
87326
|
+
let obj = Object.create(null),
|
|
87250
87327
|
dest,
|
|
87251
87328
|
key;
|
|
87252
87329
|
for (const entry of header) {
|
|
@@ -87254,11 +87331,14 @@ class AxiosHeaders {
|
|
|
87254
87331
|
throw new TypeError('Object iterator must return a key-value pair');
|
|
87255
87332
|
}
|
|
87256
87333
|
|
|
87257
|
-
|
|
87258
|
-
|
|
87259
|
-
|
|
87260
|
-
|
|
87261
|
-
: entry[1];
|
|
87334
|
+
key = entry[0];
|
|
87335
|
+
|
|
87336
|
+
if (_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].hasOwnProp(obj, key)) {
|
|
87337
|
+
dest = obj[key];
|
|
87338
|
+
obj[key] = _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isArray(dest) ? [...dest, entry[1]] : [dest, entry[1]];
|
|
87339
|
+
} else {
|
|
87340
|
+
obj[key] = entry[1];
|
|
87341
|
+
}
|
|
87262
87342
|
}
|
|
87263
87343
|
|
|
87264
87344
|
setHeaders(obj, valueOrRewrite);
|
|
@@ -87577,12 +87657,39 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
87577
87657
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
87578
87658
|
/* harmony export */ "default": () => (/* binding */ buildFullPath)
|
|
87579
87659
|
/* harmony export */ });
|
|
87580
|
-
/* harmony import */ var
|
|
87581
|
-
/* harmony import */ var
|
|
87660
|
+
/* harmony import */ var _AxiosError_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(28515);
|
|
87661
|
+
/* harmony import */ var _helpers_isAbsoluteURL_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(40623);
|
|
87662
|
+
/* harmony import */ var _helpers_combineURLs_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(48250);
|
|
87663
|
+
|
|
87664
|
+
|
|
87665
|
+
|
|
87666
|
+
|
|
87582
87667
|
|
|
87583
87668
|
|
|
87669
|
+
const malformedHttpProtocol = /^https?:(?!\/\/)/i;
|
|
87670
|
+
const httpProtocolControlCharacters = /[\t\n\r]/g;
|
|
87584
87671
|
|
|
87672
|
+
function stripLeadingC0ControlOrSpace(url) {
|
|
87673
|
+
let i = 0;
|
|
87674
|
+
while (i < url.length && url.charCodeAt(i) <= 0x20) {
|
|
87675
|
+
i++;
|
|
87676
|
+
}
|
|
87677
|
+
return url.slice(i);
|
|
87678
|
+
}
|
|
87679
|
+
|
|
87680
|
+
function normalizeURLForProtocolCheck(url) {
|
|
87681
|
+
return stripLeadingC0ControlOrSpace(url).replace(httpProtocolControlCharacters, '');
|
|
87682
|
+
}
|
|
87585
87683
|
|
|
87684
|
+
function assertValidHttpProtocolURL(url, config) {
|
|
87685
|
+
if (typeof url === 'string' && malformedHttpProtocol.test(normalizeURLForProtocolCheck(url))) {
|
|
87686
|
+
throw new _AxiosError_js__WEBPACK_IMPORTED_MODULE_0__["default"](
|
|
87687
|
+
'Invalid URL: missing "//" after protocol',
|
|
87688
|
+
_AxiosError_js__WEBPACK_IMPORTED_MODULE_0__["default"].ERR_INVALID_URL,
|
|
87689
|
+
config
|
|
87690
|
+
);
|
|
87691
|
+
}
|
|
87692
|
+
}
|
|
87586
87693
|
|
|
87587
87694
|
/**
|
|
87588
87695
|
* Creates a new URL by combining the baseURL with the requestedURL,
|
|
@@ -87594,10 +87701,12 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
87594
87701
|
*
|
|
87595
87702
|
* @returns {string} The combined full path
|
|
87596
87703
|
*/
|
|
87597
|
-
function buildFullPath(baseURL, requestedURL, allowAbsoluteUrls) {
|
|
87598
|
-
|
|
87704
|
+
function buildFullPath(baseURL, requestedURL, allowAbsoluteUrls, config) {
|
|
87705
|
+
assertValidHttpProtocolURL(requestedURL, config);
|
|
87706
|
+
let isRelativeUrl = !(0,_helpers_isAbsoluteURL_js__WEBPACK_IMPORTED_MODULE_1__["default"])(requestedURL);
|
|
87599
87707
|
if (baseURL && (isRelativeUrl || allowAbsoluteUrls === false)) {
|
|
87600
|
-
|
|
87708
|
+
assertValidHttpProtocolURL(baseURL, config);
|
|
87709
|
+
return (0,_helpers_combineURLs_js__WEBPACK_IMPORTED_MODULE_2__["default"])(baseURL, requestedURL);
|
|
87601
87710
|
}
|
|
87602
87711
|
return requestedURL;
|
|
87603
87712
|
}
|
|
@@ -87792,6 +87901,28 @@ function mergeConfig(config1, config2) {
|
|
|
87792
87901
|
}
|
|
87793
87902
|
}
|
|
87794
87903
|
|
|
87904
|
+
function getMergedTransitionalOption(prop) {
|
|
87905
|
+
const transitional2 = _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].hasOwnProp(config2, 'transitional') ? config2.transitional : undefined;
|
|
87906
|
+
|
|
87907
|
+
if (!_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isUndefined(transitional2)) {
|
|
87908
|
+
if (_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isPlainObject(transitional2)) {
|
|
87909
|
+
if (_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].hasOwnProp(transitional2, prop)) {
|
|
87910
|
+
return transitional2[prop];
|
|
87911
|
+
}
|
|
87912
|
+
} else {
|
|
87913
|
+
return undefined;
|
|
87914
|
+
}
|
|
87915
|
+
}
|
|
87916
|
+
|
|
87917
|
+
const transitional1 = _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].hasOwnProp(config1, 'transitional') ? config1.transitional : undefined;
|
|
87918
|
+
|
|
87919
|
+
if (_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isPlainObject(transitional1) && _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].hasOwnProp(transitional1, prop)) {
|
|
87920
|
+
return transitional1[prop];
|
|
87921
|
+
}
|
|
87922
|
+
|
|
87923
|
+
return undefined;
|
|
87924
|
+
}
|
|
87925
|
+
|
|
87795
87926
|
// eslint-disable-next-line consistent-return
|
|
87796
87927
|
function mergeDirectKeys(a, b, prop) {
|
|
87797
87928
|
if (_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].hasOwnProp(config2, prop)) {
|
|
@@ -87844,6 +87975,18 @@ function mergeConfig(config1, config2) {
|
|
|
87844
87975
|
(_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isUndefined(configValue) && merge !== mergeDirectKeys) || (config[prop] = configValue);
|
|
87845
87976
|
});
|
|
87846
87977
|
|
|
87978
|
+
if (
|
|
87979
|
+
_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].hasOwnProp(config2, 'validateStatus') &&
|
|
87980
|
+
_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isUndefined(config2.validateStatus) &&
|
|
87981
|
+
getMergedTransitionalOption('validateStatusUndefinedResolves') === false
|
|
87982
|
+
) {
|
|
87983
|
+
if (_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].hasOwnProp(config1, 'validateStatus')) {
|
|
87984
|
+
config.validateStatus = getMergedValue(undefined, config1.validateStatus);
|
|
87985
|
+
} else {
|
|
87986
|
+
delete config.validateStatus;
|
|
87987
|
+
}
|
|
87988
|
+
}
|
|
87989
|
+
|
|
87847
87990
|
return config;
|
|
87848
87991
|
}
|
|
87849
87992
|
|
|
@@ -88145,6 +88288,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
88145
88288
|
clarifyTimeoutError: false,
|
|
88146
88289
|
legacyInterceptorReqResOrdering: true,
|
|
88147
88290
|
advertiseZstdAcceptEncoding: false,
|
|
88291
|
+
validateStatusUndefinedResolves: true,
|
|
88148
88292
|
});
|
|
88149
88293
|
|
|
88150
88294
|
|
|
@@ -88158,7 +88302,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
88158
88302
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
88159
88303
|
/* harmony export */ VERSION: () => (/* binding */ VERSION)
|
|
88160
88304
|
/* harmony export */ });
|
|
88161
|
-
const VERSION = "1.
|
|
88305
|
+
const VERSION = "1.18.0";
|
|
88162
88306
|
|
|
88163
88307
|
/***/ },
|
|
88164
88308
|
|
|
@@ -88397,15 +88541,17 @@ function buildURL(url, params, options) {
|
|
|
88397
88541
|
return url;
|
|
88398
88542
|
}
|
|
88399
88543
|
|
|
88400
|
-
const _encode = (options && options.encode) || encode;
|
|
88401
|
-
|
|
88402
88544
|
const _options = _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isFunction(options)
|
|
88403
88545
|
? {
|
|
88404
88546
|
serialize: options,
|
|
88405
88547
|
}
|
|
88406
88548
|
: options;
|
|
88407
88549
|
|
|
88408
|
-
|
|
88550
|
+
// Read serializer options pollution-safely: own properties and methods on a
|
|
88551
|
+
// class/template prototype are honored, but values injected onto a polluted
|
|
88552
|
+
// Object.prototype are ignored.
|
|
88553
|
+
const _encode = _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].getSafeProp(_options, 'encode') || encode;
|
|
88554
|
+
const serializeFn = _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].getSafeProp(_options, 'serialize');
|
|
88409
88555
|
|
|
88410
88556
|
let serializedParams;
|
|
88411
88557
|
|
|
@@ -88617,11 +88763,19 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
88617
88763
|
* Estimate decoded byte length of a data:// URL *without* allocating large buffers.
|
|
88618
88764
|
* - For base64: compute exact decoded size using length and padding;
|
|
88619
88765
|
* handle %XX at the character-count level (no string allocation).
|
|
88620
|
-
* - For non-base64:
|
|
88766
|
+
* - For non-base64: compute the exact percent-decoded UTF-8 byte length.
|
|
88621
88767
|
*
|
|
88622
88768
|
* @param {string} url
|
|
88623
88769
|
* @returns {number}
|
|
88624
88770
|
*/
|
|
88771
|
+
const isHexDigit = (charCode) =>
|
|
88772
|
+
(charCode >= 48 && charCode <= 57) ||
|
|
88773
|
+
(charCode >= 65 && charCode <= 70) ||
|
|
88774
|
+
(charCode >= 97 && charCode <= 102);
|
|
88775
|
+
|
|
88776
|
+
const isPercentEncodedByte = (str, i, len) =>
|
|
88777
|
+
i + 2 < len && isHexDigit(str.charCodeAt(i + 1)) && isHexDigit(str.charCodeAt(i + 2));
|
|
88778
|
+
|
|
88625
88779
|
function estimateDataURLDecodedBytes(url) {
|
|
88626
88780
|
if (!url || typeof url !== 'string') return 0;
|
|
88627
88781
|
if (!url.startsWith('data:')) return 0;
|
|
@@ -88641,9 +88795,7 @@ function estimateDataURLDecodedBytes(url) {
|
|
|
88641
88795
|
if (body.charCodeAt(i) === 37 /* '%' */ && i + 2 < len) {
|
|
88642
88796
|
const a = body.charCodeAt(i + 1);
|
|
88643
88797
|
const b = body.charCodeAt(i + 2);
|
|
88644
|
-
const isHex =
|
|
88645
|
-
((a >= 48 && a <= 57) || (a >= 65 && a <= 70) || (a >= 97 && a <= 102)) &&
|
|
88646
|
-
((b >= 48 && b <= 57) || (b >= 65 && b <= 70) || (b >= 97 && b <= 102));
|
|
88798
|
+
const isHex = isHexDigit(a) && isHexDigit(b);
|
|
88647
88799
|
|
|
88648
88800
|
if (isHex) {
|
|
88649
88801
|
effectiveLen -= 2;
|
|
@@ -88684,18 +88836,17 @@ function estimateDataURLDecodedBytes(url) {
|
|
|
88684
88836
|
return bytes > 0 ? bytes : 0;
|
|
88685
88837
|
}
|
|
88686
88838
|
|
|
88687
|
-
if (typeof Buffer !== 'undefined' && typeof Buffer.byteLength === 'function') {
|
|
88688
|
-
return Buffer.byteLength(body, 'utf8');
|
|
88689
|
-
}
|
|
88690
|
-
|
|
88691
88839
|
// Compute UTF-8 byte length directly from UTF-16 code units without allocating
|
|
88692
88840
|
// a byte buffer (TextEncoder.encode would defeat the DoS guard on large bodies).
|
|
88693
|
-
//
|
|
88694
|
-
//
|
|
88841
|
+
// Valid %XX triplets count as one decoded byte; this matches the bytes that
|
|
88842
|
+
// decodeURIComponent(body) would produce before Buffer re-encodes the string.
|
|
88695
88843
|
let bytes = 0;
|
|
88696
88844
|
for (let i = 0, len = body.length; i < len; i++) {
|
|
88697
88845
|
const c = body.charCodeAt(i);
|
|
88698
|
-
if (c
|
|
88846
|
+
if (c === 37 /* '%' */ && isPercentEncodedByte(body, i, len)) {
|
|
88847
|
+
bytes += 1;
|
|
88848
|
+
i += 2;
|
|
88849
|
+
} else if (c < 0x80) {
|
|
88699
88850
|
bytes += 1;
|
|
88700
88851
|
} else if (c < 0x800) {
|
|
88701
88852
|
bytes += 2;
|
|
@@ -88726,9 +88877,24 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
88726
88877
|
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
88727
88878
|
/* harmony export */ });
|
|
88728
88879
|
/* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(56398);
|
|
88880
|
+
/* harmony import */ var _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(28515);
|
|
88881
|
+
/* harmony import */ var _toFormData_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(36422);
|
|
88882
|
+
|
|
88883
|
+
|
|
88884
|
+
|
|
88729
88885
|
|
|
88730
88886
|
|
|
88731
88887
|
|
|
88888
|
+
const MAX_DEPTH = _toFormData_js__WEBPACK_IMPORTED_MODULE_2__.DEFAULT_FORM_DATA_MAX_DEPTH;
|
|
88889
|
+
|
|
88890
|
+
function throwIfDepthExceeded(index) {
|
|
88891
|
+
if (index > MAX_DEPTH) {
|
|
88892
|
+
throw new _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_1__["default"](
|
|
88893
|
+
'FormData field is too deeply nested (' + index + ' levels). Max depth: ' + MAX_DEPTH,
|
|
88894
|
+
_core_AxiosError_js__WEBPACK_IMPORTED_MODULE_1__["default"].ERR_FORM_DATA_DEPTH_EXCEEDED
|
|
88895
|
+
);
|
|
88896
|
+
}
|
|
88897
|
+
}
|
|
88732
88898
|
|
|
88733
88899
|
/**
|
|
88734
88900
|
* It takes a string like `foo[x][y][z]` and returns an array like `['foo', 'x', 'y', 'z']
|
|
@@ -88742,9 +88908,16 @@ function parsePropPath(name) {
|
|
|
88742
88908
|
// foo.x.y.z
|
|
88743
88909
|
// foo-x-y-z
|
|
88744
88910
|
// foo x y z
|
|
88745
|
-
|
|
88746
|
-
|
|
88747
|
-
|
|
88911
|
+
const path = [];
|
|
88912
|
+
const pattern = /\w+|\[(\w*)]/g;
|
|
88913
|
+
let match;
|
|
88914
|
+
|
|
88915
|
+
while ((match = pattern.exec(name)) !== null) {
|
|
88916
|
+
throwIfDepthExceeded(path.length);
|
|
88917
|
+
path.push(match[0] === '[]' ? '' : match[1] || match[0]);
|
|
88918
|
+
}
|
|
88919
|
+
|
|
88920
|
+
return path;
|
|
88748
88921
|
}
|
|
88749
88922
|
|
|
88750
88923
|
/**
|
|
@@ -88776,6 +88949,8 @@ function arrayToObject(arr) {
|
|
|
88776
88949
|
*/
|
|
88777
88950
|
function formDataToJSON(formData) {
|
|
88778
88951
|
function buildPath(path, value, target, index) {
|
|
88952
|
+
throwIfDepthExceeded(index);
|
|
88953
|
+
|
|
88779
88954
|
let name = path[index++];
|
|
88780
88955
|
|
|
88781
88956
|
if (name === '__proto__') return true;
|
|
@@ -89172,17 +89347,19 @@ function resolveConfig(config) {
|
|
|
89172
89347
|
newConfig.headers = headers = _core_AxiosHeaders_js__WEBPACK_IMPORTED_MODULE_6__["default"].from(headers);
|
|
89173
89348
|
|
|
89174
89349
|
newConfig.url = (0,_buildURL_js__WEBPACK_IMPORTED_MODULE_7__["default"])(
|
|
89175
|
-
(0,_core_buildFullPath_js__WEBPACK_IMPORTED_MODULE_4__["default"])(baseURL, url, allowAbsoluteUrls),
|
|
89350
|
+
(0,_core_buildFullPath_js__WEBPACK_IMPORTED_MODULE_4__["default"])(baseURL, url, allowAbsoluteUrls, newConfig),
|
|
89176
89351
|
own('params'),
|
|
89177
89352
|
own('paramsSerializer')
|
|
89178
89353
|
);
|
|
89179
89354
|
|
|
89180
89355
|
// HTTP basic authentication
|
|
89181
89356
|
if (auth) {
|
|
89357
|
+
const username = _utils_js__WEBPACK_IMPORTED_MODULE_1__["default"].getSafeProp(auth, 'username') || '';
|
|
89358
|
+
const password = _utils_js__WEBPACK_IMPORTED_MODULE_1__["default"].getSafeProp(auth, 'password') || '';
|
|
89359
|
+
|
|
89182
89360
|
headers.set(
|
|
89183
89361
|
'Authorization',
|
|
89184
|
-
'Basic ' +
|
|
89185
|
-
btoa((auth.username || '') + ':' + (auth.password ? encodeUTF8(auth.password) : ''))
|
|
89362
|
+
'Basic ' + btoa(username + ':' + (password ? encodeUTF8(password) : ''))
|
|
89186
89363
|
);
|
|
89187
89364
|
}
|
|
89188
89365
|
|
|
@@ -89475,6 +89652,7 @@ function throttle(fn, freq) {
|
|
|
89475
89652
|
"use strict";
|
|
89476
89653
|
__webpack_require__.r(__webpack_exports__);
|
|
89477
89654
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
89655
|
+
/* harmony export */ DEFAULT_FORM_DATA_MAX_DEPTH: () => (/* binding */ DEFAULT_FORM_DATA_MAX_DEPTH),
|
|
89478
89656
|
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
89479
89657
|
/* harmony export */ });
|
|
89480
89658
|
/* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(56398);
|
|
@@ -89487,6 +89665,10 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
89487
89665
|
// temporary hotfix to avoid circular references until AxiosURLSearchParams is refactored
|
|
89488
89666
|
|
|
89489
89667
|
|
|
89668
|
+
// Default nesting limit shared with the inverse transform (formDataToJSON) so
|
|
89669
|
+
// the FormData <-> JSON round-trip stays symmetric.
|
|
89670
|
+
const DEFAULT_FORM_DATA_MAX_DEPTH = 100;
|
|
89671
|
+
|
|
89490
89672
|
/**
|
|
89491
89673
|
* Determines if the given thing is a array or js object.
|
|
89492
89674
|
*
|
|
@@ -89597,8 +89779,9 @@ function toFormData(obj, formData, options) {
|
|
|
89597
89779
|
const dots = options.dots;
|
|
89598
89780
|
const indexes = options.indexes;
|
|
89599
89781
|
const _Blob = options.Blob || (typeof Blob !== 'undefined' && Blob);
|
|
89600
|
-
const maxDepth = options.maxDepth === undefined ?
|
|
89782
|
+
const maxDepth = options.maxDepth === undefined ? DEFAULT_FORM_DATA_MAX_DEPTH : options.maxDepth;
|
|
89601
89783
|
const useBlob = _Blob && _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isSpecCompliantForm(formData);
|
|
89784
|
+
const stack = [];
|
|
89602
89785
|
|
|
89603
89786
|
if (!_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isFunction(visitor)) {
|
|
89604
89787
|
throw new TypeError('visitor must be a function');
|
|
@@ -89626,6 +89809,38 @@ function toFormData(obj, formData, options) {
|
|
|
89626
89809
|
return value;
|
|
89627
89810
|
}
|
|
89628
89811
|
|
|
89812
|
+
function throwIfMaxDepthExceeded(depth) {
|
|
89813
|
+
if (depth > maxDepth) {
|
|
89814
|
+
throw new _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_1__["default"](
|
|
89815
|
+
'Object is too deeply nested (' + depth + ' levels). Max depth: ' + maxDepth,
|
|
89816
|
+
_core_AxiosError_js__WEBPACK_IMPORTED_MODULE_1__["default"].ERR_FORM_DATA_DEPTH_EXCEEDED
|
|
89817
|
+
);
|
|
89818
|
+
}
|
|
89819
|
+
}
|
|
89820
|
+
|
|
89821
|
+
function stringifyWithDepthLimit(value, depth) {
|
|
89822
|
+
if (maxDepth === Infinity) {
|
|
89823
|
+
return JSON.stringify(value);
|
|
89824
|
+
}
|
|
89825
|
+
|
|
89826
|
+
const ancestors = [];
|
|
89827
|
+
|
|
89828
|
+
return JSON.stringify(value, function limitDepth(_key, currentValue) {
|
|
89829
|
+
if (!_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isObject(currentValue)) {
|
|
89830
|
+
return currentValue;
|
|
89831
|
+
}
|
|
89832
|
+
|
|
89833
|
+
while (ancestors.length && ancestors[ancestors.length - 1] !== this) {
|
|
89834
|
+
ancestors.pop();
|
|
89835
|
+
}
|
|
89836
|
+
|
|
89837
|
+
ancestors.push(currentValue);
|
|
89838
|
+
throwIfMaxDepthExceeded(depth + ancestors.length - 1);
|
|
89839
|
+
|
|
89840
|
+
return currentValue;
|
|
89841
|
+
});
|
|
89842
|
+
}
|
|
89843
|
+
|
|
89629
89844
|
/**
|
|
89630
89845
|
* Default visitor.
|
|
89631
89846
|
*
|
|
@@ -89649,7 +89864,7 @@ function toFormData(obj, formData, options) {
|
|
|
89649
89864
|
// eslint-disable-next-line no-param-reassign
|
|
89650
89865
|
key = metaTokens ? key : key.slice(0, -2);
|
|
89651
89866
|
// eslint-disable-next-line no-param-reassign
|
|
89652
|
-
value =
|
|
89867
|
+
value = stringifyWithDepthLimit(value, 1);
|
|
89653
89868
|
} else if (
|
|
89654
89869
|
(_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isArray(value) && isFlatArray(value)) ||
|
|
89655
89870
|
((_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isFileList(value) || _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].endsWith(key, '[]')) && (arr = _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].toArray(value)))
|
|
@@ -89682,8 +89897,6 @@ function toFormData(obj, formData, options) {
|
|
|
89682
89897
|
return false;
|
|
89683
89898
|
}
|
|
89684
89899
|
|
|
89685
|
-
const stack = [];
|
|
89686
|
-
|
|
89687
89900
|
const exposedHelpers = Object.assign(predicates, {
|
|
89688
89901
|
defaultVisitor,
|
|
89689
89902
|
convertValue,
|
|
@@ -89693,12 +89906,7 @@ function toFormData(obj, formData, options) {
|
|
|
89693
89906
|
function build(value, path, depth = 0) {
|
|
89694
89907
|
if (_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isUndefined(value)) return;
|
|
89695
89908
|
|
|
89696
|
-
|
|
89697
|
-
throw new _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_1__["default"](
|
|
89698
|
-
'Object is too deeply nested (' + depth + ' levels). Max depth: ' + maxDepth,
|
|
89699
|
-
_core_AxiosError_js__WEBPACK_IMPORTED_MODULE_1__["default"].ERR_FORM_DATA_DEPTH_EXCEEDED
|
|
89700
|
-
);
|
|
89701
|
-
}
|
|
89909
|
+
throwIfMaxDepthExceeded(depth);
|
|
89702
89910
|
|
|
89703
89911
|
if (stack.indexOf(value) !== -1) {
|
|
89704
89912
|
throw new Error('Circular reference detected in ' + path.join('.'));
|
|
@@ -90173,6 +90381,57 @@ const { toString } = Object.prototype;
|
|
|
90173
90381
|
const { getPrototypeOf } = Object;
|
|
90174
90382
|
const { iterator, toStringTag } = Symbol;
|
|
90175
90383
|
|
|
90384
|
+
/* Creating a function that will check if an object has a property. */
|
|
90385
|
+
const hasOwnProperty = (
|
|
90386
|
+
({ hasOwnProperty }) =>
|
|
90387
|
+
(obj, prop) =>
|
|
90388
|
+
hasOwnProperty.call(obj, prop)
|
|
90389
|
+
)(Object.prototype);
|
|
90390
|
+
|
|
90391
|
+
/**
|
|
90392
|
+
* Walk the prototype chain (excluding the shared Object.prototype) looking for
|
|
90393
|
+
* an own `prop`. This distinguishes genuine own/inherited members — including
|
|
90394
|
+
* class accessors and template prototypes — from members injected via
|
|
90395
|
+
* Object.prototype pollution (e.g. `Object.prototype.username = '...'`), which
|
|
90396
|
+
* live on Object.prototype itself and are therefore never matched.
|
|
90397
|
+
*
|
|
90398
|
+
* @param {*} thing The value whose chain to inspect
|
|
90399
|
+
* @param {string|symbol} prop The property key to look for
|
|
90400
|
+
*
|
|
90401
|
+
* @returns {boolean} True when `prop` is owned below Object.prototype
|
|
90402
|
+
*/
|
|
90403
|
+
const hasOwnInPrototypeChain = (thing, prop) => {
|
|
90404
|
+
let obj = thing;
|
|
90405
|
+
const seen = [];
|
|
90406
|
+
|
|
90407
|
+
while (obj != null && obj !== Object.prototype) {
|
|
90408
|
+
if (seen.indexOf(obj) !== -1) {
|
|
90409
|
+
return false;
|
|
90410
|
+
}
|
|
90411
|
+
seen.push(obj);
|
|
90412
|
+
|
|
90413
|
+
if (hasOwnProperty(obj, prop)) {
|
|
90414
|
+
return true;
|
|
90415
|
+
}
|
|
90416
|
+
obj = getPrototypeOf(obj);
|
|
90417
|
+
}
|
|
90418
|
+
return false;
|
|
90419
|
+
};
|
|
90420
|
+
|
|
90421
|
+
/**
|
|
90422
|
+
* Read `obj[prop]` only when it is safe from Object.prototype pollution. Own
|
|
90423
|
+
* properties and members inherited from a non-Object.prototype source (a class
|
|
90424
|
+
* instance or template object) are honored; a value reachable only through a
|
|
90425
|
+
* polluted Object.prototype is ignored and `undefined` is returned.
|
|
90426
|
+
*
|
|
90427
|
+
* @param {*} obj The source object
|
|
90428
|
+
* @param {string|symbol} prop The property key to read
|
|
90429
|
+
*
|
|
90430
|
+
* @returns {*} The resolved value, or undefined when unsafe/absent
|
|
90431
|
+
*/
|
|
90432
|
+
const getSafeProp = (obj, prop) =>
|
|
90433
|
+
obj != null && hasOwnInPrototypeChain(obj, prop) ? obj[prop] : undefined;
|
|
90434
|
+
|
|
90176
90435
|
const kindOf = ((cache) => (thing) => {
|
|
90177
90436
|
const str = toString.call(thing);
|
|
90178
90437
|
return cache[str] || (cache[str] = str.slice(8, -1).toLowerCase());
|
|
@@ -90298,7 +90557,7 @@ const isBoolean = (thing) => thing === true || thing === false;
|
|
|
90298
90557
|
* @returns {boolean} True if value is a plain Object, otherwise false
|
|
90299
90558
|
*/
|
|
90300
90559
|
const isPlainObject = (val) => {
|
|
90301
|
-
if (
|
|
90560
|
+
if (!isObject(val)) {
|
|
90302
90561
|
return false;
|
|
90303
90562
|
}
|
|
90304
90563
|
|
|
@@ -90306,9 +90565,12 @@ const isPlainObject = (val) => {
|
|
|
90306
90565
|
return (
|
|
90307
90566
|
(prototype === null ||
|
|
90308
90567
|
prototype === Object.prototype ||
|
|
90309
|
-
|
|
90310
|
-
|
|
90311
|
-
|
|
90568
|
+
getPrototypeOf(prototype) === null) &&
|
|
90569
|
+
// Treat any genuine (non-Object.prototype-polluted) Symbol.toStringTag or
|
|
90570
|
+
// Symbol.iterator as evidence the value is a tagged/iterable type rather
|
|
90571
|
+
// than a plain object, while ignoring keys injected onto Object.prototype.
|
|
90572
|
+
!hasOwnInPrototypeChain(val, toStringTag) &&
|
|
90573
|
+
!hasOwnInPrototypeChain(val, iterator)
|
|
90312
90574
|
);
|
|
90313
90575
|
};
|
|
90314
90576
|
|
|
@@ -90835,13 +91097,6 @@ const toCamelCase = (str) => {
|
|
|
90835
91097
|
});
|
|
90836
91098
|
};
|
|
90837
91099
|
|
|
90838
|
-
/* Creating a function that will check if an object has a property. */
|
|
90839
|
-
const hasOwnProperty = (
|
|
90840
|
-
({ hasOwnProperty }) =>
|
|
90841
|
-
(obj, prop) =>
|
|
90842
|
-
hasOwnProperty.call(obj, prop)
|
|
90843
|
-
)(Object.prototype);
|
|
90844
|
-
|
|
90845
91100
|
const { propertyIsEnumerable } = Object.prototype;
|
|
90846
91101
|
|
|
90847
91102
|
/**
|
|
@@ -91055,6 +91310,20 @@ const asap =
|
|
|
91055
91310
|
|
|
91056
91311
|
const isIterable = (thing) => thing != null && isFunction(thing[iterator]);
|
|
91057
91312
|
|
|
91313
|
+
/**
|
|
91314
|
+
* Determine if a value is iterable via an iterator that is NOT sourced solely
|
|
91315
|
+
* from a polluted Object.prototype. Use this instead of `isIterable` whenever
|
|
91316
|
+
* the iterable comes from untrusted input (e.g. user-supplied header sources),
|
|
91317
|
+
* so `Object.prototype[Symbol.iterator] = ...` cannot turn an ordinary object
|
|
91318
|
+
* into an attacker-controlled entries iterator.
|
|
91319
|
+
*
|
|
91320
|
+
* @param {*} thing The value to test
|
|
91321
|
+
*
|
|
91322
|
+
* @returns {boolean} True if value has a non-polluted iterator
|
|
91323
|
+
*/
|
|
91324
|
+
const isSafeIterable = (thing) =>
|
|
91325
|
+
thing != null && hasOwnInPrototypeChain(thing, iterator) && isIterable(thing);
|
|
91326
|
+
|
|
91058
91327
|
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({
|
|
91059
91328
|
isArray,
|
|
91060
91329
|
isArrayBuffer,
|
|
@@ -91099,6 +91368,8 @@ const isIterable = (thing) => thing != null && isFunction(thing[iterator]);
|
|
|
91099
91368
|
isHTMLForm,
|
|
91100
91369
|
hasOwnProperty,
|
|
91101
91370
|
hasOwnProp: hasOwnProperty, // an alias to avoid ESLint no-prototype-builtins detection
|
|
91371
|
+
hasOwnInPrototypeChain,
|
|
91372
|
+
getSafeProp,
|
|
91102
91373
|
reduceDescriptors,
|
|
91103
91374
|
freezeMethods,
|
|
91104
91375
|
toObjectSet,
|
|
@@ -91115,6 +91386,7 @@ const isIterable = (thing) => thing != null && isFunction(thing[iterator]);
|
|
|
91115
91386
|
setImmediate: _setImmediate,
|
|
91116
91387
|
asap,
|
|
91117
91388
|
isIterable,
|
|
91389
|
+
isSafeIterable,
|
|
91118
91390
|
});
|
|
91119
91391
|
|
|
91120
91392
|
|
|
@@ -91281,110 +91553,904 @@ class ReferenceSet {
|
|
|
91281
91553
|
this.rootRef = undefined;
|
|
91282
91554
|
this.refs.length = 0;
|
|
91283
91555
|
}
|
|
91284
|
-
}
|
|
91285
|
-
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (ReferenceSet);
|
|
91556
|
+
}
|
|
91557
|
+
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (ReferenceSet);
|
|
91558
|
+
|
|
91559
|
+
/***/ },
|
|
91560
|
+
|
|
91561
|
+
/***/ 76950
|
|
91562
|
+
(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
|
|
91563
|
+
|
|
91564
|
+
"use strict";
|
|
91565
|
+
__webpack_require__.r(__webpack_exports__);
|
|
91566
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
91567
|
+
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
91568
|
+
/* harmony export */ });
|
|
91569
|
+
/* harmony import */ var ramda__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(27694);
|
|
91570
|
+
/* harmony import */ var ramda__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(6352);
|
|
91571
|
+
/* harmony import */ var _File_mjs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(29217);
|
|
91572
|
+
/* harmony import */ var _util_plugins_mjs__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(51982);
|
|
91573
|
+
/* harmony import */ var _errors_UnmatchedBundleStrategyError_mjs__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(59135);
|
|
91574
|
+
/* harmony import */ var _errors_BundleError_mjs__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(89693);
|
|
91575
|
+
/* harmony import */ var _errors_UnresolvableReferenceError_mjs__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(34968);
|
|
91576
|
+
/* harmony import */ var _parse_index_mjs__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(85533);
|
|
91577
|
+
/* harmony import */ var _options_util_mjs__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(7778);
|
|
91578
|
+
/* harmony import */ var _util_url_mjs__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(18917);
|
|
91579
|
+
|
|
91580
|
+
|
|
91581
|
+
|
|
91582
|
+
|
|
91583
|
+
|
|
91584
|
+
|
|
91585
|
+
|
|
91586
|
+
|
|
91587
|
+
|
|
91588
|
+
/**
|
|
91589
|
+
* Bundle a file with all its external references to a compound document.
|
|
91590
|
+
*/
|
|
91591
|
+
const bundle = async (uri, options) => {
|
|
91592
|
+
const {
|
|
91593
|
+
refSet
|
|
91594
|
+
} = options.bundle;
|
|
91595
|
+
const sanitizedURI = _util_url_mjs__WEBPACK_IMPORTED_MODULE_9__.sanitize(uri);
|
|
91596
|
+
const mergedOptions = (0,_options_util_mjs__WEBPACK_IMPORTED_MODULE_8__.merge)(options, {
|
|
91597
|
+
resolve: {
|
|
91598
|
+
baseURI: sanitizedURI
|
|
91599
|
+
}
|
|
91600
|
+
});
|
|
91601
|
+
let parseResult;
|
|
91602
|
+
|
|
91603
|
+
// if refSet was provided, use it to avoid unnecessary parsing
|
|
91604
|
+
if (refSet !== null && refSet.has(sanitizedURI)) {
|
|
91605
|
+
// @ts-ignore
|
|
91606
|
+
({
|
|
91607
|
+
value: parseResult
|
|
91608
|
+
} = refSet.find((0,ramda__WEBPACK_IMPORTED_MODULE_1__["default"])(sanitizedURI, 'uri')));
|
|
91609
|
+
} else {
|
|
91610
|
+
parseResult = await (0,_parse_index_mjs__WEBPACK_IMPORTED_MODULE_7__["default"])(uri, mergedOptions);
|
|
91611
|
+
}
|
|
91612
|
+
const file = new _File_mjs__WEBPACK_IMPORTED_MODULE_2__["default"]({
|
|
91613
|
+
uri: mergedOptions.resolve.baseURI,
|
|
91614
|
+
parseResult,
|
|
91615
|
+
mediaType: mergedOptions.parse.mediaType
|
|
91616
|
+
});
|
|
91617
|
+
const bundleStrategies = await _util_plugins_mjs__WEBPACK_IMPORTED_MODULE_3__.filter('canBundle', [file, mergedOptions], mergedOptions.bundle.strategies);
|
|
91618
|
+
|
|
91619
|
+
// we couldn't find any bundle strategy for this File
|
|
91620
|
+
if ((0,ramda__WEBPACK_IMPORTED_MODULE_0__["default"])(bundleStrategies)) {
|
|
91621
|
+
throw new _errors_UnmatchedBundleStrategyError_mjs__WEBPACK_IMPORTED_MODULE_4__["default"](`Could not find a bundle strategy that can bundle the file "${file.uri}"`);
|
|
91622
|
+
}
|
|
91623
|
+
try {
|
|
91624
|
+
const {
|
|
91625
|
+
result
|
|
91626
|
+
} = await _util_plugins_mjs__WEBPACK_IMPORTED_MODULE_3__.run('bundle', [file, mergedOptions], bundleStrategies);
|
|
91627
|
+
return result;
|
|
91628
|
+
} catch (error) {
|
|
91629
|
+
// pass through errors that are already part of the bundle/resolution
|
|
91630
|
+
// taxonomy rather than nesting them inside another BundleError
|
|
91631
|
+
if (error instanceof _errors_BundleError_mjs__WEBPACK_IMPORTED_MODULE_5__["default"] || error instanceof _errors_UnresolvableReferenceError_mjs__WEBPACK_IMPORTED_MODULE_6__["default"]) {
|
|
91632
|
+
throw error;
|
|
91633
|
+
}
|
|
91634
|
+
throw new _errors_BundleError_mjs__WEBPACK_IMPORTED_MODULE_5__["default"](`Error while bundling file "${file.uri}"`, {
|
|
91635
|
+
cause: error
|
|
91636
|
+
});
|
|
91637
|
+
}
|
|
91638
|
+
};
|
|
91639
|
+
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (bundle);
|
|
91640
|
+
|
|
91641
|
+
/***/ },
|
|
91642
|
+
|
|
91643
|
+
/***/ 73723
|
|
91644
|
+
(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
|
|
91645
|
+
|
|
91646
|
+
"use strict";
|
|
91647
|
+
__webpack_require__.r(__webpack_exports__);
|
|
91648
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
91649
|
+
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
91650
|
+
/* harmony export */ });
|
|
91651
|
+
/**
|
|
91652
|
+
* @public
|
|
91653
|
+
*/
|
|
91654
|
+
|
|
91655
|
+
/**
|
|
91656
|
+
* @public
|
|
91657
|
+
*/
|
|
91658
|
+
class BundleStrategy {
|
|
91659
|
+
name;
|
|
91660
|
+
constructor({
|
|
91661
|
+
name
|
|
91662
|
+
}) {
|
|
91663
|
+
this.name = name;
|
|
91664
|
+
}
|
|
91665
|
+
}
|
|
91666
|
+
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (BundleStrategy);
|
|
91667
|
+
|
|
91668
|
+
/***/ },
|
|
91669
|
+
|
|
91670
|
+
/***/ 5138
|
|
91671
|
+
(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
|
|
91672
|
+
|
|
91673
|
+
"use strict";
|
|
91674
|
+
__webpack_require__.r(__webpack_exports__);
|
|
91675
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
91676
|
+
/* harmony export */ OpenAPI3_0BundleVisitor: () => (/* reexport safe */ _visitor_mjs__WEBPACK_IMPORTED_MODULE_7__["default"]),
|
|
91677
|
+
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
91678
|
+
/* harmony export */ });
|
|
91679
|
+
/* harmony import */ var _speclynx_apidom_datamodel__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(12111);
|
|
91680
|
+
/* harmony import */ var _speclynx_apidom_traverse__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(80796);
|
|
91681
|
+
/* harmony import */ var _speclynx_apidom_ns_openapi_3_0__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(43151);
|
|
91682
|
+
/* harmony import */ var _speclynx_apidom_ns_openapi_3_0__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(32131);
|
|
91683
|
+
/* harmony import */ var _Reference_mjs__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(82302);
|
|
91684
|
+
/* harmony import */ var _ReferenceSet_mjs__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(88526);
|
|
91685
|
+
/* harmony import */ var _BundleStrategy_mjs__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(73723);
|
|
91686
|
+
/* harmony import */ var _visitor_mjs__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(98968);
|
|
91687
|
+
|
|
91688
|
+
|
|
91689
|
+
|
|
91690
|
+
|
|
91691
|
+
|
|
91692
|
+
|
|
91693
|
+
|
|
91694
|
+
/**
|
|
91695
|
+
* @public
|
|
91696
|
+
*/
|
|
91697
|
+
/**
|
|
91698
|
+
* @public
|
|
91699
|
+
*/
|
|
91700
|
+
class OpenAPI3_0BundleStrategy extends _BundleStrategy_mjs__WEBPACK_IMPORTED_MODULE_6__["default"] {
|
|
91701
|
+
constructor(options) {
|
|
91702
|
+
super({
|
|
91703
|
+
...(options ?? {}),
|
|
91704
|
+
name: 'openapi-3-0'
|
|
91705
|
+
});
|
|
91706
|
+
}
|
|
91707
|
+
canBundle(file) {
|
|
91708
|
+
// assert by media type
|
|
91709
|
+
if (file.mediaType !== 'text/plain') {
|
|
91710
|
+
return _speclynx_apidom_ns_openapi_3_0__WEBPACK_IMPORTED_MODULE_2__["default"].includes(file.mediaType);
|
|
91711
|
+
}
|
|
91712
|
+
|
|
91713
|
+
// assert by inspecting ApiDOM
|
|
91714
|
+
return (0,_speclynx_apidom_ns_openapi_3_0__WEBPACK_IMPORTED_MODULE_3__.isOpenApi3_0Element)(file.parseResult?.result);
|
|
91715
|
+
}
|
|
91716
|
+
async bundle(file, options) {
|
|
91717
|
+
const immutableRefSet = options.bundle.refSet ?? new _ReferenceSet_mjs__WEBPACK_IMPORTED_MODULE_5__["default"]();
|
|
91718
|
+
const mutableRefSet = new _ReferenceSet_mjs__WEBPACK_IMPORTED_MODULE_5__["default"]();
|
|
91719
|
+
let refSet = immutableRefSet;
|
|
91720
|
+
let reference;
|
|
91721
|
+
|
|
91722
|
+
// determine the initial reference
|
|
91723
|
+
if (!immutableRefSet.has(file.uri)) {
|
|
91724
|
+
reference = new _Reference_mjs__WEBPACK_IMPORTED_MODULE_4__["default"]({
|
|
91725
|
+
uri: file.uri,
|
|
91726
|
+
value: file.parseResult
|
|
91727
|
+
});
|
|
91728
|
+
immutableRefSet.add(reference);
|
|
91729
|
+
} else {
|
|
91730
|
+
// pre-computed refSet was provided as configuration option
|
|
91731
|
+
reference = immutableRefSet.find(ref => ref.uri === file.uri);
|
|
91732
|
+
}
|
|
91733
|
+
|
|
91734
|
+
/**
|
|
91735
|
+
* Clone refSet due the bundling process being mutable.
|
|
91736
|
+
* We don't want to mutate the original refSet and the references.
|
|
91737
|
+
*/
|
|
91738
|
+
if (options.bundle.immutable) {
|
|
91739
|
+
immutableRefSet.refs.map(ref => new _Reference_mjs__WEBPACK_IMPORTED_MODULE_4__["default"]({
|
|
91740
|
+
...ref,
|
|
91741
|
+
value: (0,_speclynx_apidom_datamodel__WEBPACK_IMPORTED_MODULE_0__.cloneDeep)(ref.value)
|
|
91742
|
+
})).forEach(ref => mutableRefSet.add(ref));
|
|
91743
|
+
reference = mutableRefSet.find(ref => ref.uri === file.uri);
|
|
91744
|
+
refSet = mutableRefSet;
|
|
91745
|
+
}
|
|
91746
|
+
const visitor = new _visitor_mjs__WEBPACK_IMPORTED_MODULE_7__["default"]({
|
|
91747
|
+
reference: reference,
|
|
91748
|
+
options
|
|
91749
|
+
});
|
|
91750
|
+
await (0,_speclynx_apidom_traverse__WEBPACK_IMPORTED_MODULE_1__.traverseAsync)(refSet.rootRef.value, visitor, {
|
|
91751
|
+
mutable: true
|
|
91752
|
+
});
|
|
91753
|
+
const parseResult = reference.value;
|
|
91754
|
+
|
|
91755
|
+
/**
|
|
91756
|
+
* Release all memory if this refSet was not provided as a configuration option.
|
|
91757
|
+
* If provided as configuration option, then provider is responsible for cleanup.
|
|
91758
|
+
*/
|
|
91759
|
+
if (options.bundle.refSet === null) {
|
|
91760
|
+
immutableRefSet.clean();
|
|
91761
|
+
}
|
|
91762
|
+
mutableRefSet.clean();
|
|
91763
|
+
return parseResult;
|
|
91764
|
+
}
|
|
91765
|
+
}
|
|
91766
|
+
|
|
91767
|
+
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (OpenAPI3_0BundleStrategy);
|
|
91768
|
+
|
|
91769
|
+
/***/ },
|
|
91770
|
+
|
|
91771
|
+
/***/ 98968
|
|
91772
|
+
(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
|
|
91773
|
+
|
|
91774
|
+
"use strict";
|
|
91775
|
+
__webpack_require__.r(__webpack_exports__);
|
|
91776
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
91777
|
+
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
91778
|
+
/* harmony export */ });
|
|
91779
|
+
/* harmony import */ var ramda__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(6352);
|
|
91780
|
+
/* harmony import */ var _speclynx_apidom_datamodel__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(25162);
|
|
91781
|
+
/* harmony import */ var _speclynx_apidom_datamodel__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(12111);
|
|
91782
|
+
/* harmony import */ var _speclynx_apidom_datamodel__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(97071);
|
|
91783
|
+
/* harmony import */ var _speclynx_apidom_datamodel__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(84660);
|
|
91784
|
+
/* harmony import */ var _speclynx_apidom_core__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(37205);
|
|
91785
|
+
/* harmony import */ var _speclynx_apidom_core__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(44673);
|
|
91786
|
+
/* harmony import */ var _speclynx_apidom_core__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(16280);
|
|
91787
|
+
/* harmony import */ var _speclynx_apidom_error__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(44641);
|
|
91788
|
+
/* harmony import */ var _speclynx_apidom_traverse__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(80796);
|
|
91789
|
+
/* harmony import */ var _speclynx_apidom_json_pointer__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(12020);
|
|
91790
|
+
/* harmony import */ var _speclynx_apidom_json_pointer__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(61198);
|
|
91791
|
+
/* harmony import */ var _speclynx_apidom_ns_openapi_3_0__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(30609);
|
|
91792
|
+
/* harmony import */ var _speclynx_apidom_ns_openapi_3_0__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(64708);
|
|
91793
|
+
/* harmony import */ var _speclynx_apidom_ns_openapi_3_0__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(32131);
|
|
91794
|
+
/* harmony import */ var _speclynx_apidom_ns_openapi_3_0__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(21314);
|
|
91795
|
+
/* harmony import */ var _speclynx_apidom_ns_openapi_3_0__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(29881);
|
|
91796
|
+
/* harmony import */ var _speclynx_apidom_ns_openapi_3_0__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(23806);
|
|
91797
|
+
/* harmony import */ var _speclynx_apidom_ns_openapi_3_0__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(23031);
|
|
91798
|
+
/* harmony import */ var _speclynx_apidom_ns_openapi_3_0__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(63842);
|
|
91799
|
+
/* harmony import */ var _speclynx_apidom_ns_openapi_3_0__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(87455);
|
|
91800
|
+
/* harmony import */ var _speclynx_apidom_ns_openapi_3_0__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(55122);
|
|
91801
|
+
/* harmony import */ var _speclynx_apidom_ns_openapi_3_0__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(71117);
|
|
91802
|
+
/* harmony import */ var _speclynx_apidom_ns_openapi_3_0__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(72257);
|
|
91803
|
+
/* harmony import */ var _speclynx_apidom_ns_openapi_3_0__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(69511);
|
|
91804
|
+
/* harmony import */ var _errors_BundleError_mjs__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(89693);
|
|
91805
|
+
/* harmony import */ var _errors_UnresolvableReferenceError_mjs__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(34968);
|
|
91806
|
+
/* harmony import */ var _errors_MaximumBundleDepthError_mjs__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(55086);
|
|
91807
|
+
/* harmony import */ var _errors_MaximumResolveDepthError_mjs__WEBPACK_IMPORTED_MODULE_28__ = __webpack_require__(10476);
|
|
91808
|
+
/* harmony import */ var _util_url_mjs__WEBPACK_IMPORTED_MODULE_29__ = __webpack_require__(18917);
|
|
91809
|
+
/* harmony import */ var _parse_index_mjs__WEBPACK_IMPORTED_MODULE_30__ = __webpack_require__(85533);
|
|
91810
|
+
/* harmony import */ var _Reference_mjs__WEBPACK_IMPORTED_MODULE_31__ = __webpack_require__(82302);
|
|
91811
|
+
/* harmony import */ var _util_mjs__WEBPACK_IMPORTED_MODULE_32__ = __webpack_require__(78814);
|
|
91812
|
+
|
|
91813
|
+
|
|
91814
|
+
|
|
91815
|
+
|
|
91816
|
+
|
|
91817
|
+
|
|
91818
|
+
|
|
91819
|
+
|
|
91820
|
+
|
|
91821
|
+
|
|
91822
|
+
|
|
91823
|
+
|
|
91824
|
+
|
|
91825
|
+
|
|
91826
|
+
|
|
91827
|
+
/**
|
|
91828
|
+
* Maps the `referenced-element` meta value (set during refraction) to the
|
|
91829
|
+
* Components Object field where the referenced element should be hoisted.
|
|
91830
|
+
* Field names are sourced from the Components Object fixed fields so they
|
|
91831
|
+
* cannot drift from the namespace definition.
|
|
91832
|
+
*/
|
|
91833
|
+
const cf = (0,_speclynx_apidom_core__WEBPACK_IMPORTED_MODULE_5__.fixedFields)(_speclynx_apidom_ns_openapi_3_0__WEBPACK_IMPORTED_MODULE_12__["default"], {
|
|
91834
|
+
indexed: true
|
|
91835
|
+
});
|
|
91836
|
+
const componentFieldByReferencedElement = {
|
|
91837
|
+
schema: cf.schemas.name,
|
|
91838
|
+
response: cf.responses.name,
|
|
91839
|
+
parameter: cf.parameters.name,
|
|
91840
|
+
example: cf.examples.name,
|
|
91841
|
+
requestBody: cf.requestBodies.name,
|
|
91842
|
+
header: cf.headers.name,
|
|
91843
|
+
securityScheme: cf.securitySchemes.name,
|
|
91844
|
+
link: cf.links.name,
|
|
91845
|
+
callback: cf.callbacks.name
|
|
91846
|
+
};
|
|
91847
|
+
|
|
91848
|
+
/**
|
|
91849
|
+
* Maps a Components Object field to the named-content element the namespace
|
|
91850
|
+
* uses for it, so a bundle-created field matches a parsed/refracted one
|
|
91851
|
+
* (e.g. carries the `components-schemas` class) rather than being a generic
|
|
91852
|
+
* object.
|
|
91853
|
+
*/
|
|
91854
|
+
const componentFieldElementByField = {
|
|
91855
|
+
[cf.schemas.name]: _speclynx_apidom_ns_openapi_3_0__WEBPACK_IMPORTED_MODULE_23__["default"],
|
|
91856
|
+
[cf.responses.name]: _speclynx_apidom_ns_openapi_3_0__WEBPACK_IMPORTED_MODULE_22__["default"],
|
|
91857
|
+
[cf.parameters.name]: _speclynx_apidom_ns_openapi_3_0__WEBPACK_IMPORTED_MODULE_20__["default"],
|
|
91858
|
+
[cf.examples.name]: _speclynx_apidom_ns_openapi_3_0__WEBPACK_IMPORTED_MODULE_17__["default"],
|
|
91859
|
+
[cf.requestBodies.name]: _speclynx_apidom_ns_openapi_3_0__WEBPACK_IMPORTED_MODULE_21__["default"],
|
|
91860
|
+
[cf.headers.name]: _speclynx_apidom_ns_openapi_3_0__WEBPACK_IMPORTED_MODULE_18__["default"],
|
|
91861
|
+
[cf.securitySchemes.name]: _speclynx_apidom_ns_openapi_3_0__WEBPACK_IMPORTED_MODULE_24__["default"],
|
|
91862
|
+
[cf.links.name]: _speclynx_apidom_ns_openapi_3_0__WEBPACK_IMPORTED_MODULE_19__["default"],
|
|
91863
|
+
[cf.callbacks.name]: _speclynx_apidom_ns_openapi_3_0__WEBPACK_IMPORTED_MODULE_16__["default"]
|
|
91864
|
+
};
|
|
91865
|
+
|
|
91866
|
+
/**
|
|
91867
|
+
* @public
|
|
91868
|
+
*/
|
|
91869
|
+
|
|
91870
|
+
/**
|
|
91871
|
+
* @public
|
|
91872
|
+
*/
|
|
91873
|
+
class OpenAPI3_0BundleVisitor {
|
|
91874
|
+
reference;
|
|
91875
|
+
options;
|
|
91876
|
+
|
|
91877
|
+
/**
|
|
91878
|
+
* The base URI (without hash) of the entry document. A reference is
|
|
91879
|
+
* considered internal when it resolves to this URI and external otherwise.
|
|
91880
|
+
* Derived from the shared refSet's root reference.
|
|
91881
|
+
*/
|
|
91882
|
+
get entryURI() {
|
|
91883
|
+
return _util_url_mjs__WEBPACK_IMPORTED_MODULE_29__.stripHash(this.reference.refSet?.rootRef?.uri ?? '');
|
|
91884
|
+
}
|
|
91885
|
+
|
|
91886
|
+
/**
|
|
91887
|
+
* The entry parse result. Derived from the shared refSet's root reference.
|
|
91888
|
+
*/
|
|
91889
|
+
get entryParseResult() {
|
|
91890
|
+
return this.reference.refSet.rootRef.value;
|
|
91891
|
+
}
|
|
91892
|
+
|
|
91893
|
+
/**
|
|
91894
|
+
* The entry document element. Hoisted external fragments are placed into its
|
|
91895
|
+
* `components` object. The `canBundle` guard guarantees it is an
|
|
91896
|
+
* OpenApi3_0Element.
|
|
91897
|
+
*/
|
|
91898
|
+
get entryResult() {
|
|
91899
|
+
return this.entryParseResult.result;
|
|
91900
|
+
}
|
|
91901
|
+
|
|
91902
|
+
/**
|
|
91903
|
+
* Shared across the entry document and every external document visitor.
|
|
91904
|
+
* Guarantees each external fragment is hoisted exactly once and gives us a
|
|
91905
|
+
* stable internal pointer to rewrite every referencing element to.
|
|
91906
|
+
*/
|
|
91907
|
+
assignments;
|
|
91908
|
+
|
|
91909
|
+
/**
|
|
91910
|
+
* Component names already reserved per Components Object field. Reserved
|
|
91911
|
+
* before recursion so collision suffixing (`Pet`, `Pet-2`, ...) accounts for
|
|
91912
|
+
* components that are still being bundled.
|
|
91913
|
+
*/
|
|
91914
|
+
reservedNames;
|
|
91915
|
+
|
|
91916
|
+
/**
|
|
91917
|
+
* Caches refracted fragments keyed by source element and target element type.
|
|
91918
|
+
* The type is part of the key because the same source can be refracted into
|
|
91919
|
+
* different semantic elements depending on the referencing context (e.g. a
|
|
91920
|
+
* generic object referenced once as a Parameter and once as a Response).
|
|
91921
|
+
*/
|
|
91922
|
+
refractCache;
|
|
91923
|
+
|
|
91924
|
+
/**
|
|
91925
|
+
* Canonical URIs of Path Item Objects currently being inlined. Path Items
|
|
91926
|
+
* are not hoisted into Components Object (no `components.pathItems` in
|
|
91927
|
+
* OpenAPI 3.0), so the `assignments` map can't break their cycles. This
|
|
91928
|
+
* stack guards against circular external Path Item references.
|
|
91929
|
+
*/
|
|
91930
|
+
inlineStack;
|
|
91931
|
+
constructor({
|
|
91932
|
+
reference,
|
|
91933
|
+
options,
|
|
91934
|
+
assignments = new Map(),
|
|
91935
|
+
reservedNames = new Map(),
|
|
91936
|
+
refractCache = new WeakMap(),
|
|
91937
|
+
inlineStack = new Set()
|
|
91938
|
+
}) {
|
|
91939
|
+
this.reference = reference;
|
|
91940
|
+
this.options = options;
|
|
91941
|
+
this.inlineStack = inlineStack;
|
|
91942
|
+
this.assignments = assignments;
|
|
91943
|
+
this.reservedNames = reservedNames;
|
|
91944
|
+
this.refractCache = refractCache;
|
|
91945
|
+
}
|
|
91946
|
+
getRefracted(source, type) {
|
|
91947
|
+
return this.refractCache.get(source)?.get(type);
|
|
91948
|
+
}
|
|
91949
|
+
setRefracted(source, type, refracted) {
|
|
91950
|
+
let byType = this.refractCache.get(source);
|
|
91951
|
+
if (byType === undefined) {
|
|
91952
|
+
byType = new Map();
|
|
91953
|
+
this.refractCache.set(source, byType);
|
|
91954
|
+
}
|
|
91955
|
+
byType.set(type, refracted);
|
|
91956
|
+
}
|
|
91957
|
+
toBaseURI(uri) {
|
|
91958
|
+
return _util_url_mjs__WEBPACK_IMPORTED_MODULE_29__.resolve(this.reference.uri, _util_url_mjs__WEBPACK_IMPORTED_MODULE_29__.sanitize(_util_url_mjs__WEBPACK_IMPORTED_MODULE_29__.stripHash(uri)));
|
|
91959
|
+
}
|
|
91960
|
+
async toReference(uri) {
|
|
91961
|
+
// detect maximum depth of resolution
|
|
91962
|
+
if (this.reference.depth >= this.options.resolve.maxDepth) {
|
|
91963
|
+
throw new _errors_MaximumResolveDepthError_mjs__WEBPACK_IMPORTED_MODULE_28__["default"](`Maximum resolution depth of ${this.options.resolve.maxDepth} has been exceeded by file "${this.reference.uri}"`, {
|
|
91964
|
+
maxDepth: this.options.resolve.maxDepth,
|
|
91965
|
+
uri: this.reference.uri
|
|
91966
|
+
});
|
|
91967
|
+
}
|
|
91968
|
+
const baseURI = this.toBaseURI(uri);
|
|
91969
|
+
const {
|
|
91970
|
+
refSet
|
|
91971
|
+
} = this.reference;
|
|
91972
|
+
|
|
91973
|
+
// we've already processed this Reference in past
|
|
91974
|
+
if (refSet.has(baseURI)) {
|
|
91975
|
+
return refSet.find((0,ramda__WEBPACK_IMPORTED_MODULE_0__["default"])(baseURI, 'uri'));
|
|
91976
|
+
}
|
|
91977
|
+
const parseResult = await (0,_parse_index_mjs__WEBPACK_IMPORTED_MODULE_30__["default"])(_util_url_mjs__WEBPACK_IMPORTED_MODULE_29__.unsanitize(baseURI), {
|
|
91978
|
+
...this.options,
|
|
91979
|
+
parse: {
|
|
91980
|
+
...this.options.parse,
|
|
91981
|
+
mediaType: 'text/plain'
|
|
91982
|
+
}
|
|
91983
|
+
});
|
|
91984
|
+
const reference = new _Reference_mjs__WEBPACK_IMPORTED_MODULE_31__["default"]({
|
|
91985
|
+
uri: baseURI,
|
|
91986
|
+
value: parseResult,
|
|
91987
|
+
depth: this.reference.depth + 1
|
|
91988
|
+
});
|
|
91989
|
+
refSet.add(reference);
|
|
91990
|
+
return reference;
|
|
91991
|
+
}
|
|
91992
|
+
|
|
91993
|
+
/**
|
|
91994
|
+
* Normalizes a self-file reference (e.g. `./root.json#/components/schemas/Pet`)
|
|
91995
|
+
* to a bare fragment (`#/components/schemas/Pet`) so the bundled document stays
|
|
91996
|
+
* transferable. Bare fragments are returned unchanged.
|
|
91997
|
+
*/
|
|
91998
|
+
normalizeSelfFileRef(ref) {
|
|
91999
|
+
return ref.startsWith('#') ? ref : _util_url_mjs__WEBPACK_IMPORTED_MODULE_29__.getHash(ref);
|
|
92000
|
+
}
|
|
92001
|
+
|
|
92002
|
+
/**
|
|
92003
|
+
* Handles an error according to the `bundle.continueOnError` option.
|
|
92004
|
+
*
|
|
92005
|
+
* For new errors: wraps in UnresolvableReferenceError with structured
|
|
92006
|
+
* context. For errors already wrapped by a nested visitor: prepends the
|
|
92007
|
+
* current hop to the trace.
|
|
92008
|
+
*
|
|
92009
|
+
* Inner/intermediate visitors always throw to let the trace accumulate. Only
|
|
92010
|
+
* the entry document visitor respects continueOnError (callback/swallow/throw).
|
|
92011
|
+
*/
|
|
92012
|
+
handleError(message, error, referencingElement, refFieldName, refFieldValue, visitorPath) {
|
|
92013
|
+
// a collision reported as `error` is a deliberate hard stop with no
|
|
92014
|
+
// resolution-failure analog, so pass it through unchanged. A maxDepth
|
|
92015
|
+
// breach (MaximumBundleDepthError, which also extends BundleError) is a
|
|
92016
|
+
// resolution failure and flows through below — wrapped and subject to
|
|
92017
|
+
// continueOnError, like dereferencing.
|
|
92018
|
+
if (error instanceof _errors_BundleError_mjs__WEBPACK_IMPORTED_MODULE_25__["default"] && !(error instanceof _errors_MaximumBundleDepthError_mjs__WEBPACK_IMPORTED_MODULE_27__["default"])) {
|
|
92019
|
+
throw error;
|
|
92020
|
+
}
|
|
92021
|
+
const {
|
|
92022
|
+
continueOnError
|
|
92023
|
+
} = this.options.bundle;
|
|
92024
|
+
const isEntryDocument = _util_url_mjs__WEBPACK_IMPORTED_MODULE_29__.stripHash(this.reference.refSet?.rootRef?.uri ?? '') === this.reference.uri;
|
|
92025
|
+
const uri = this.reference.uri;
|
|
92026
|
+
const type = referencingElement.element;
|
|
92027
|
+
const codeFrame = (0,_speclynx_apidom_core__WEBPACK_IMPORTED_MODULE_7__["default"])(referencingElement);
|
|
92028
|
+
const location = visitorPath.formatPath();
|
|
92029
|
+
const hop = {
|
|
92030
|
+
uri,
|
|
92031
|
+
type,
|
|
92032
|
+
refFieldName,
|
|
92033
|
+
refFieldValue,
|
|
92034
|
+
location,
|
|
92035
|
+
codeFrame
|
|
92036
|
+
};
|
|
92037
|
+
let unresolvedError;
|
|
92038
|
+
if (error instanceof _errors_UnresolvableReferenceError_mjs__WEBPACK_IMPORTED_MODULE_26__["default"]) {
|
|
92039
|
+
// @ts-ignore
|
|
92040
|
+
error.trace = [hop, ...error.trace];
|
|
92041
|
+
unresolvedError = error;
|
|
92042
|
+
} else {
|
|
92043
|
+
unresolvedError = new _errors_UnresolvableReferenceError_mjs__WEBPACK_IMPORTED_MODULE_26__["default"](message, {
|
|
92044
|
+
cause: error,
|
|
92045
|
+
type,
|
|
92046
|
+
uri,
|
|
92047
|
+
location,
|
|
92048
|
+
codeFrame,
|
|
92049
|
+
refFieldName,
|
|
92050
|
+
refFieldValue,
|
|
92051
|
+
trace: []
|
|
92052
|
+
});
|
|
92053
|
+
}
|
|
92054
|
+
if (!isEntryDocument || continueOnError === false) throw unresolvedError;
|
|
92055
|
+
if (typeof continueOnError === 'function') continueOnError(unresolvedError);
|
|
92056
|
+
}
|
|
92057
|
+
|
|
92058
|
+
/**
|
|
92059
|
+
* Lazily creates the Components Object (and the requested field within it)
|
|
92060
|
+
* on the entry document, returning the field where a fragment is hoisted.
|
|
92061
|
+
*/
|
|
92062
|
+
ensureComponentsField(field) {
|
|
92063
|
+
const entryResult = this.entryResult;
|
|
92064
|
+
let components = entryResult.components;
|
|
92065
|
+
if (!(0,_speclynx_apidom_datamodel__WEBPACK_IMPORTED_MODULE_1__.isObjectElement)(components)) {
|
|
92066
|
+
components = new _speclynx_apidom_ns_openapi_3_0__WEBPACK_IMPORTED_MODULE_12__["default"]();
|
|
92067
|
+
entryResult.components = components;
|
|
92068
|
+
}
|
|
92069
|
+
let fieldElement = components.get(field);
|
|
92070
|
+
if (!(0,_speclynx_apidom_datamodel__WEBPACK_IMPORTED_MODULE_1__.isObjectElement)(fieldElement)) {
|
|
92071
|
+
const FieldElement = componentFieldElementByField[field] ?? _speclynx_apidom_datamodel__WEBPACK_IMPORTED_MODULE_3__["default"];
|
|
92072
|
+
fieldElement = new FieldElement();
|
|
92073
|
+
components.set(field, fieldElement);
|
|
92074
|
+
}
|
|
92075
|
+
return fieldElement;
|
|
92076
|
+
}
|
|
92077
|
+
|
|
92078
|
+
/**
|
|
92079
|
+
* Derives a component name from the referenced JSON Pointer's last token,
|
|
92080
|
+
* falling back to the referenced file's basename.
|
|
92081
|
+
*/
|
|
92082
|
+
basenameOf(jsonPointer, baseURI) {
|
|
92083
|
+
const tokens = (0,_speclynx_apidom_json_pointer__WEBPACK_IMPORTED_MODULE_11__.parse)(jsonPointer).tree;
|
|
92084
|
+
let candidate = tokens.length > 0 ? tokens[tokens.length - 1] : '';
|
|
92085
|
+
if (candidate === '') {
|
|
92086
|
+
const lastSlash = baseURI.lastIndexOf('/');
|
|
92087
|
+
const lastDot = baseURI.lastIndexOf('.');
|
|
92088
|
+
const fileName = baseURI.slice(lastSlash + 1);
|
|
92089
|
+
// strip the extension only when the last dot belongs to the file name
|
|
92090
|
+
candidate = lastDot > lastSlash ? baseURI.slice(lastSlash + 1, lastDot) : fileName;
|
|
92091
|
+
}
|
|
92092
|
+
if (candidate === '') candidate = 'Schema';
|
|
92093
|
+
return candidate;
|
|
92094
|
+
}
|
|
92095
|
+
|
|
92096
|
+
/**
|
|
92097
|
+
* Computes the base component name (before collision suffixing) according to
|
|
92098
|
+
* the configured naming strategy.
|
|
92099
|
+
*/
|
|
92100
|
+
baseName(element, field, jsonPointer, baseURI) {
|
|
92101
|
+
// strategy specific options take precedence over the top-level bundle options
|
|
92102
|
+
const componentNamesStrategy = this.options.bundle.strategyOpts['openapi-3-0']?.componentNamesStrategy ?? this.options.bundle.componentNamesStrategy;
|
|
92103
|
+
if (typeof componentNamesStrategy === 'function') {
|
|
92104
|
+
const resolved = componentNamesStrategy({
|
|
92105
|
+
element,
|
|
92106
|
+
field,
|
|
92107
|
+
jsonPointer,
|
|
92108
|
+
baseURI
|
|
92109
|
+
});
|
|
92110
|
+
if (typeof resolved === 'string' && resolved !== '') {
|
|
92111
|
+
return resolved;
|
|
92112
|
+
}
|
|
92113
|
+
return this.basenameOf(jsonPointer, baseURI);
|
|
92114
|
+
}
|
|
92115
|
+
if (componentNamesStrategy === 'title') {
|
|
92116
|
+
const title = (0,_speclynx_apidom_datamodel__WEBPACK_IMPORTED_MODULE_1__.isObjectElement)(element) ? (0,_speclynx_apidom_core__WEBPACK_IMPORTED_MODULE_6__["default"])(element.get('title')) : undefined;
|
|
92117
|
+
if (typeof title === 'string' && title.trim() !== '') {
|
|
92118
|
+
const name = (0,_util_mjs__WEBPACK_IMPORTED_MODULE_32__.sanitizeComponentName)((0,_util_mjs__WEBPACK_IMPORTED_MODULE_32__.toPascalCase)(title));
|
|
92119
|
+
if (name !== '') return name;
|
|
92120
|
+
}
|
|
92121
|
+
// fall back to basename when no usable title is present
|
|
92122
|
+
}
|
|
92123
|
+
return this.basenameOf(jsonPointer, baseURI);
|
|
92124
|
+
}
|
|
92125
|
+
|
|
92126
|
+
/**
|
|
92127
|
+
* Computes a collision-free component name within the target field. A name is
|
|
92128
|
+
* taken if it's already placed in components or reserved by a component that
|
|
92129
|
+
* is still being bundled (reserved before recursion).
|
|
92130
|
+
*/
|
|
92131
|
+
uniqueName(candidate, field) {
|
|
92132
|
+
const fieldElement = this.ensureComponentsField(field);
|
|
92133
|
+
const reserved = this.reservedNames.get(field) ?? new Set();
|
|
92134
|
+
return (0,_util_mjs__WEBPACK_IMPORTED_MODULE_32__.uniqueName)(candidate, name => fieldElement.hasKey(name) || reserved.has(name));
|
|
92135
|
+
}
|
|
92136
|
+
async ReferenceElement(path) {
|
|
92137
|
+
const referencingElement = path.node;
|
|
92138
|
+
const $ref = (0,_speclynx_apidom_core__WEBPACK_IMPORTED_MODULE_6__["default"])(referencingElement.$ref);
|
|
92139
|
+
const retrievalURI = this.toBaseURI($ref);
|
|
92140
|
+
const isInternalReference = this.entryURI === retrievalURI;
|
|
92141
|
+
const isExternalReference = !isInternalReference;
|
|
92142
|
+
if (isInternalReference) {
|
|
92143
|
+
// normalize self-file references to a bare fragment so the bundled
|
|
92144
|
+
// document stays transferable; bare fragments are left untouched
|
|
92145
|
+
referencingElement.set('$ref', this.normalizeSelfFileRef($ref));
|
|
92146
|
+
path.skip();
|
|
92147
|
+
return;
|
|
92148
|
+
}
|
|
91286
92149
|
|
|
91287
|
-
|
|
92150
|
+
// honor the resolve.external switch
|
|
92151
|
+
if (!this.options.resolve.external && isExternalReference) {
|
|
92152
|
+
path.skip();
|
|
92153
|
+
return;
|
|
92154
|
+
}
|
|
92155
|
+
const $refBaseURI = _util_url_mjs__WEBPACK_IMPORTED_MODULE_29__.resolve(retrievalURI, $ref);
|
|
92156
|
+
const jsonPointer = _speclynx_apidom_json_pointer__WEBPACK_IMPORTED_MODULE_11__.URIFragmentIdentifier.fromURIReference($refBaseURI);
|
|
91288
92157
|
|
|
91289
|
-
|
|
91290
|
-
|
|
92158
|
+
// the target bucket depends on the referencing context, so it's part of the
|
|
92159
|
+
// identity: the same external target referenced as e.g. both a parameter and
|
|
92160
|
+
// a response must be hoisted into both components fields. The refractor sets
|
|
92161
|
+
// `referenced-element` for every Reference Object position; the `schemas`
|
|
92162
|
+
// fallback is a defensive default for the (unexpected) untagged case.
|
|
92163
|
+
const referencedElementType = referencingElement.meta.get('referenced-element');
|
|
92164
|
+
const field = componentFieldByReferencedElement[referencedElementType] ?? componentFieldByReferencedElement.schema;
|
|
92165
|
+
const canonicalKey = `${field}\t${retrievalURI}#${jsonPointer}`;
|
|
91291
92166
|
|
|
91292
|
-
|
|
91293
|
-
|
|
91294
|
-
|
|
91295
|
-
|
|
91296
|
-
|
|
91297
|
-
|
|
91298
|
-
|
|
91299
|
-
|
|
91300
|
-
|
|
91301
|
-
|
|
91302
|
-
|
|
91303
|
-
|
|
91304
|
-
|
|
91305
|
-
|
|
92167
|
+
// already hoisted (or being hoisted) — just rewrite the pointer.
|
|
92168
|
+
//
|
|
92169
|
+
// this is also how circular references terminate: the assignment is
|
|
92170
|
+
// reserved BEFORE recursing into the fragment (see below), so a reference
|
|
92171
|
+
// that cycles back (directly or indirectly) finds its pointer already
|
|
92172
|
+
// reserved here and is rewritten without recursing. Cycles are deliberately
|
|
92173
|
+
// preserved as internal `$ref`s pointing at each other — that is valid,
|
|
92174
|
+
// serializable output; resolving the cycle (if desired) is dereferencing's
|
|
92175
|
+
// job, not bundling's.
|
|
92176
|
+
if (this.assignments.has(canonicalKey)) {
|
|
92177
|
+
referencingElement.set('$ref', this.assignments.get(canonicalKey));
|
|
92178
|
+
path.skip();
|
|
92179
|
+
return;
|
|
92180
|
+
}
|
|
92181
|
+
try {
|
|
92182
|
+
// detect maximum depth of bundling
|
|
92183
|
+
if (this.reference.depth >= this.options.bundle.maxDepth) {
|
|
92184
|
+
throw new _errors_MaximumBundleDepthError_mjs__WEBPACK_IMPORTED_MODULE_27__["default"](`Maximum bundle depth of "${this.options.bundle.maxDepth}" has been exceeded in file "${this.reference.uri}"`, {
|
|
92185
|
+
maxDepth: this.options.bundle.maxDepth,
|
|
92186
|
+
uri: this.reference.uri
|
|
92187
|
+
});
|
|
92188
|
+
}
|
|
92189
|
+
const reference = await this.toReference($ref);
|
|
92190
|
+
|
|
92191
|
+
// possibly non-semantic fragment
|
|
92192
|
+
let referencedElement = (0,_speclynx_apidom_json_pointer__WEBPACK_IMPORTED_MODULE_10__.evaluate)(reference.value.result, jsonPointer);
|
|
92193
|
+
|
|
92194
|
+
// apply semantics to the fragment so nested references become Reference Objects
|
|
92195
|
+
if (referencedElement.element !== referencedElementType && !(0,_speclynx_apidom_ns_openapi_3_0__WEBPACK_IMPORTED_MODULE_14__.isReferenceElement)(referencedElement)) {
|
|
92196
|
+
const cached = this.getRefracted(referencedElement, referencedElementType);
|
|
92197
|
+
if (cached !== undefined) {
|
|
92198
|
+
referencedElement = cached;
|
|
92199
|
+
} else if ((0,_speclynx_apidom_ns_openapi_3_0__WEBPACK_IMPORTED_MODULE_15__.isReferenceLikeElement)(referencedElement)) {
|
|
92200
|
+
const sourceElement = referencedElement;
|
|
92201
|
+
referencedElement = (0,_speclynx_apidom_ns_openapi_3_0__WEBPACK_IMPORTED_MODULE_13__.refractReference)(referencedElement);
|
|
92202
|
+
referencedElement.meta.set('referenced-element', referencedElementType);
|
|
92203
|
+
this.setRefracted(sourceElement, referencedElementType, referencedElement);
|
|
92204
|
+
} else {
|
|
92205
|
+
const sourceElement = referencedElement;
|
|
92206
|
+
referencedElement = (0,_speclynx_apidom_ns_openapi_3_0__WEBPACK_IMPORTED_MODULE_13__["default"])(referencedElement, {
|
|
92207
|
+
element: referencedElementType
|
|
92208
|
+
});
|
|
92209
|
+
this.setRefracted(sourceElement, referencedElementType, referencedElement);
|
|
92210
|
+
}
|
|
92211
|
+
}
|
|
92212
|
+
const preferredName = this.baseName(referencedElement, field, jsonPointer, retrievalURI);
|
|
92213
|
+
const componentName = this.uniqueName(preferredName, field);
|
|
92214
|
+
const internalPointer = `#/components/${field}/${(0,_speclynx_apidom_json_pointer__WEBPACK_IMPORTED_MODULE_11__.escape)(componentName)}`;
|
|
92215
|
+
|
|
92216
|
+
// a rename means two distinct targets resolved to the same name; each
|
|
92217
|
+
// keeps its own component (and origin), so report the rename per severity.
|
|
92218
|
+
// strategy specific options take precedence over the top-level bundle options
|
|
92219
|
+
const onComponentNameCollision = this.options.bundle.strategyOpts['openapi-3-0']?.onComponentNameCollision ?? this.options.bundle.onComponentNameCollision;
|
|
92220
|
+
if (componentName !== preferredName && onComponentNameCollision !== 'off') {
|
|
92221
|
+
const message = `Component "${preferredName}" in components/${field} is referenced with the same name but different content. Renamed to "${componentName}".`;
|
|
92222
|
+
if (onComponentNameCollision === 'error') {
|
|
92223
|
+
throw new _errors_BundleError_mjs__WEBPACK_IMPORTED_MODULE_25__["default"](message);
|
|
92224
|
+
}
|
|
92225
|
+
const annotation = new _speclynx_apidom_datamodel__WEBPACK_IMPORTED_MODULE_4__["default"](message);
|
|
92226
|
+
annotation.classes.push('warning');
|
|
92227
|
+
annotation.code = 'bundle-component-name-collision';
|
|
92228
|
+
// append (never prepend) so the result element stays ahead of annotations
|
|
92229
|
+
this.entryParseResult.content.push(annotation);
|
|
92230
|
+
}
|
|
91306
92231
|
|
|
92232
|
+
// reserve the assignment and component name before recursing so cyclic
|
|
92233
|
+
// references terminate
|
|
92234
|
+
this.assignments.set(canonicalKey, internalPointer);
|
|
92235
|
+
if (!this.reservedNames.has(field)) this.reservedNames.set(field, new Set());
|
|
92236
|
+
this.reservedNames.get(field).add(componentName);
|
|
92237
|
+
|
|
92238
|
+
// own a copy of the fragment and bundle its own external references
|
|
92239
|
+
const hoistedElement = (0,_speclynx_apidom_datamodel__WEBPACK_IMPORTED_MODULE_2__.cloneDeep)(referencedElement);
|
|
92240
|
+
const visitor = new OpenAPI3_0BundleVisitor({
|
|
92241
|
+
reference,
|
|
92242
|
+
options: this.options,
|
|
92243
|
+
assignments: this.assignments,
|
|
92244
|
+
reservedNames: this.reservedNames,
|
|
92245
|
+
refractCache: this.refractCache,
|
|
92246
|
+
inlineStack: this.inlineStack
|
|
92247
|
+
});
|
|
92248
|
+
const bundledElement = await (0,_speclynx_apidom_traverse__WEBPACK_IMPORTED_MODULE_9__.traverseAsync)(hoistedElement, visitor, {
|
|
92249
|
+
mutable: true
|
|
92250
|
+
});
|
|
91307
92251
|
|
|
92252
|
+
// annotate the hoisted fragment with info about its origin
|
|
92253
|
+
if ((0,_speclynx_apidom_datamodel__WEBPACK_IMPORTED_MODULE_1__.isElement)(bundledElement)) {
|
|
92254
|
+
bundledElement.meta.set('ref-origin', reference.uri);
|
|
92255
|
+
}
|
|
91308
92256
|
|
|
92257
|
+
// place the bundled fragment into the entry document's components
|
|
92258
|
+
this.ensureComponentsField(field).set(componentName, bundledElement);
|
|
91309
92259
|
|
|
92260
|
+
// rewrite the referencing element to point at the hoisted fragment
|
|
92261
|
+
referencingElement.set('$ref', internalPointer);
|
|
92262
|
+
path.skip();
|
|
92263
|
+
} catch (error) {
|
|
92264
|
+
this.handleError(`Error while bundling Reference Object. Cannot resolve $ref "${$ref}": ${error.message}`, error, referencingElement, '$ref', $ref, path);
|
|
92265
|
+
path.skip();
|
|
92266
|
+
}
|
|
92267
|
+
}
|
|
91310
92268
|
|
|
92269
|
+
/**
|
|
92270
|
+
* Path Item Object is not a Components Object field in OpenAPI 3.0
|
|
92271
|
+
* (unlike 3.1 which has `components.pathItems`). An external Path Item
|
|
92272
|
+
* reference therefore cannot be hoisted; it is inlined in place instead,
|
|
92273
|
+
* after bundling its own external references.
|
|
92274
|
+
*/
|
|
92275
|
+
async PathItemElement(path) {
|
|
92276
|
+
const pathItemElement = path.node;
|
|
91311
92277
|
|
|
92278
|
+
// ignore Path Item Objects without a $ref field
|
|
92279
|
+
if (!(0,_speclynx_apidom_datamodel__WEBPACK_IMPORTED_MODULE_1__.isStringElement)(pathItemElement.$ref)) {
|
|
92280
|
+
return;
|
|
92281
|
+
}
|
|
92282
|
+
const $ref = (0,_speclynx_apidom_core__WEBPACK_IMPORTED_MODULE_6__["default"])(pathItemElement.$ref);
|
|
92283
|
+
const retrievalURI = this.toBaseURI($ref);
|
|
92284
|
+
const isInternalReference = this.entryURI === retrievalURI;
|
|
92285
|
+
const isExternalReference = !isInternalReference;
|
|
92286
|
+
if (isInternalReference) {
|
|
92287
|
+
// normalize self-file references to a bare fragment so the bundled
|
|
92288
|
+
// document stays transferable; bare fragments are left untouched
|
|
92289
|
+
pathItemElement.set('$ref', this.normalizeSelfFileRef($ref));
|
|
92290
|
+
return;
|
|
92291
|
+
}
|
|
91312
92292
|
|
|
92293
|
+
// honor the resolve.external switch
|
|
92294
|
+
if (!this.options.resolve.external && isExternalReference) {
|
|
92295
|
+
return;
|
|
92296
|
+
}
|
|
92297
|
+
const $refBaseURI = _util_url_mjs__WEBPACK_IMPORTED_MODULE_29__.resolve(retrievalURI, $ref);
|
|
92298
|
+
const jsonPointer = _speclynx_apidom_json_pointer__WEBPACK_IMPORTED_MODULE_11__.URIFragmentIdentifier.fromURIReference($refBaseURI);
|
|
92299
|
+
const canonicalKey = `${retrievalURI}#${jsonPointer}`;
|
|
91313
92300
|
|
|
91314
|
-
|
|
91315
|
-
|
|
91316
|
-
|
|
91317
|
-
|
|
91318
|
-
const {
|
|
91319
|
-
refSet
|
|
91320
|
-
} = options.bundle;
|
|
91321
|
-
const sanitizedURI = _util_url_mjs__WEBPACK_IMPORTED_MODULE_8__.sanitize(uri);
|
|
91322
|
-
const mergedOptions = (0,_options_util_mjs__WEBPACK_IMPORTED_MODULE_7__.merge)(options, {
|
|
91323
|
-
resolve: {
|
|
91324
|
-
baseURI: sanitizedURI
|
|
92301
|
+
// a circular external Path Item reference cannot be inlined without
|
|
92302
|
+
// recursing forever; leave the $ref in place to break the cycle
|
|
92303
|
+
if (this.inlineStack.has(canonicalKey)) {
|
|
92304
|
+
return;
|
|
91325
92305
|
}
|
|
91326
|
-
|
|
91327
|
-
|
|
92306
|
+
try {
|
|
92307
|
+
// detect maximum depth of bundling
|
|
92308
|
+
if (this.reference.depth >= this.options.bundle.maxDepth) {
|
|
92309
|
+
throw new _errors_MaximumBundleDepthError_mjs__WEBPACK_IMPORTED_MODULE_27__["default"](`Maximum bundle depth of "${this.options.bundle.maxDepth}" has been exceeded in file "${this.reference.uri}"`, {
|
|
92310
|
+
maxDepth: this.options.bundle.maxDepth,
|
|
92311
|
+
uri: this.reference.uri
|
|
92312
|
+
});
|
|
92313
|
+
}
|
|
92314
|
+
const reference = await this.toReference($ref);
|
|
92315
|
+
let referencedElement = (0,_speclynx_apidom_json_pointer__WEBPACK_IMPORTED_MODULE_10__.evaluate)(reference.value.result, jsonPointer);
|
|
92316
|
+
|
|
92317
|
+
// apply Path Item semantics to the referenced fragment
|
|
92318
|
+
if (!(0,_speclynx_apidom_ns_openapi_3_0__WEBPACK_IMPORTED_MODULE_14__.isPathItemElement)(referencedElement)) {
|
|
92319
|
+
const cached = this.getRefracted(referencedElement, 'pathItem');
|
|
92320
|
+
if (cached !== undefined) {
|
|
92321
|
+
referencedElement = cached;
|
|
92322
|
+
} else {
|
|
92323
|
+
const sourceElement = referencedElement;
|
|
92324
|
+
referencedElement = (0,_speclynx_apidom_ns_openapi_3_0__WEBPACK_IMPORTED_MODULE_13__.refractPathItem)(referencedElement);
|
|
92325
|
+
this.setRefracted(sourceElement, 'pathItem', referencedElement);
|
|
92326
|
+
}
|
|
92327
|
+
}
|
|
91328
92328
|
|
|
91329
|
-
|
|
91330
|
-
|
|
91331
|
-
|
|
91332
|
-
|
|
91333
|
-
|
|
91334
|
-
|
|
91335
|
-
|
|
91336
|
-
|
|
91337
|
-
|
|
91338
|
-
|
|
91339
|
-
|
|
91340
|
-
|
|
91341
|
-
|
|
91342
|
-
|
|
91343
|
-
|
|
92329
|
+
// own a copy and bundle the external references it contains
|
|
92330
|
+
const inlinedElement = (0,_speclynx_apidom_datamodel__WEBPACK_IMPORTED_MODULE_2__.cloneDeep)(referencedElement);
|
|
92331
|
+
this.inlineStack.add(canonicalKey);
|
|
92332
|
+
const visitor = new OpenAPI3_0BundleVisitor({
|
|
92333
|
+
reference,
|
|
92334
|
+
options: this.options,
|
|
92335
|
+
assignments: this.assignments,
|
|
92336
|
+
reservedNames: this.reservedNames,
|
|
92337
|
+
refractCache: this.refractCache,
|
|
92338
|
+
inlineStack: this.inlineStack
|
|
92339
|
+
});
|
|
92340
|
+
let bundledElement;
|
|
92341
|
+
try {
|
|
92342
|
+
bundledElement = await (0,_speclynx_apidom_traverse__WEBPACK_IMPORTED_MODULE_9__.traverseAsync)(inlinedElement, visitor, {
|
|
92343
|
+
mutable: true
|
|
92344
|
+
});
|
|
92345
|
+
} finally {
|
|
92346
|
+
this.inlineStack.delete(canonicalKey);
|
|
92347
|
+
}
|
|
91344
92348
|
|
|
91345
|
-
|
|
91346
|
-
|
|
91347
|
-
|
|
92349
|
+
// merge sibling fields from the referencing Path Item over the referenced
|
|
92350
|
+
// one. The referencing `$ref` is being resolved away and is skipped; the
|
|
92351
|
+
// referenced element keeps its own `$ref` if one survived (i.e. it was
|
|
92352
|
+
// left in place to break a circular external Path Item chain).
|
|
92353
|
+
pathItemElement.forEach((_value, keyElement, item) => {
|
|
92354
|
+
const key = (0,_speclynx_apidom_core__WEBPACK_IMPORTED_MODULE_6__["default"])(keyElement);
|
|
92355
|
+
if (key === '$ref') return;
|
|
92356
|
+
bundledElement.remove(key);
|
|
92357
|
+
bundledElement.content.push(item);
|
|
92358
|
+
});
|
|
92359
|
+
bundledElement.meta.set('ref-origin', reference.uri);
|
|
92360
|
+
path.replaceWith(bundledElement);
|
|
92361
|
+
} catch (error) {
|
|
92362
|
+
this.handleError(`Error while bundling Path Item Object. Cannot resolve $ref "${$ref}": ${error.message}`, error, pathItemElement, '$ref', $ref, path);
|
|
92363
|
+
}
|
|
91348
92364
|
}
|
|
91349
|
-
|
|
91350
|
-
|
|
91351
|
-
|
|
91352
|
-
|
|
91353
|
-
|
|
91354
|
-
|
|
91355
|
-
|
|
91356
|
-
|
|
91357
|
-
|
|
92365
|
+
|
|
92366
|
+
/**
|
|
92367
|
+
* Example Object `externalValue` points at arbitrary external content that
|
|
92368
|
+
* has no place in the Components Object. The referenced value is inlined into
|
|
92369
|
+
* the Example's `value` field.
|
|
92370
|
+
*/
|
|
92371
|
+
async ExampleElement(path) {
|
|
92372
|
+
const exampleElement = path.node;
|
|
92373
|
+
|
|
92374
|
+
// ignore Example Objects without an externalValue field
|
|
92375
|
+
if (!(0,_speclynx_apidom_datamodel__WEBPACK_IMPORTED_MODULE_1__.isStringElement)(exampleElement.externalValue)) {
|
|
92376
|
+
return;
|
|
92377
|
+
}
|
|
92378
|
+
|
|
92379
|
+
// value and externalValue fields are mutually exclusive
|
|
92380
|
+
if (exampleElement.hasKey('value') && (0,_speclynx_apidom_datamodel__WEBPACK_IMPORTED_MODULE_1__.isStringElement)(exampleElement.externalValue)) {
|
|
92381
|
+
throw new _speclynx_apidom_error__WEBPACK_IMPORTED_MODULE_8__["default"]('ExampleElement value and externalValue fields are mutually exclusive', {
|
|
92382
|
+
value: (0,_speclynx_apidom_core__WEBPACK_IMPORTED_MODULE_6__["default"])(exampleElement.value),
|
|
92383
|
+
externalValue: (0,_speclynx_apidom_core__WEBPACK_IMPORTED_MODULE_6__["default"])(exampleElement.externalValue)
|
|
92384
|
+
});
|
|
92385
|
+
}
|
|
92386
|
+
const externalValue = (0,_speclynx_apidom_core__WEBPACK_IMPORTED_MODULE_6__["default"])(exampleElement.externalValue);
|
|
92387
|
+
const retrievalURI = this.toBaseURI(externalValue);
|
|
92388
|
+
const isInternalReference = this.entryURI === retrievalURI;
|
|
92389
|
+
const isExternalReference = !isInternalReference;
|
|
92390
|
+
|
|
92391
|
+
// honor the resolve.external switch
|
|
92392
|
+
if (!this.options.resolve.external && isExternalReference) {
|
|
92393
|
+
return;
|
|
92394
|
+
}
|
|
92395
|
+
try {
|
|
92396
|
+
const reference = await this.toReference(externalValue);
|
|
92397
|
+
const valueElement = (0,_speclynx_apidom_datamodel__WEBPACK_IMPORTED_MODULE_2__.cloneShallow)(reference.value.result);
|
|
92398
|
+
valueElement.meta.set('ref-origin', reference.uri);
|
|
92399
|
+
const exampleElementCopy = (0,_speclynx_apidom_datamodel__WEBPACK_IMPORTED_MODULE_2__.cloneShallow)(exampleElement);
|
|
92400
|
+
exampleElementCopy.value = valueElement;
|
|
92401
|
+
exampleElementCopy.remove('externalValue');
|
|
92402
|
+
path.replaceWith(exampleElementCopy);
|
|
92403
|
+
} catch (error) {
|
|
92404
|
+
this.handleError(`Error while bundling Example Object. Cannot resolve externalValue "${externalValue}": ${error.message}`, error, exampleElement, 'externalValue', externalValue, path);
|
|
92405
|
+
}
|
|
91358
92406
|
}
|
|
91359
|
-
};
|
|
91360
|
-
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (bundle);
|
|
91361
92407
|
|
|
91362
|
-
|
|
92408
|
+
/**
|
|
92409
|
+
* Link Object `operationRef` points at an Operation Object, which has no
|
|
92410
|
+
* Components Object field in OpenAPI 3.0 and therefore cannot be hoisted or
|
|
92411
|
+
* inlined. To keep the link resolvable from the bundled document, an external
|
|
92412
|
+
* `operationRef` is rewritten to its absolute URI. Internal `operationRef`
|
|
92413
|
+
* values and `operationId` links are left untouched.
|
|
92414
|
+
*/
|
|
92415
|
+
async LinkElement(path) {
|
|
92416
|
+
const linkElement = path.node;
|
|
91363
92417
|
|
|
91364
|
-
|
|
91365
|
-
(
|
|
92418
|
+
// operationRef and operationId fields are mutually exclusive
|
|
92419
|
+
if ((0,_speclynx_apidom_datamodel__WEBPACK_IMPORTED_MODULE_1__.isStringElement)(linkElement.operationRef) && (0,_speclynx_apidom_datamodel__WEBPACK_IMPORTED_MODULE_1__.isStringElement)(linkElement.operationId)) {
|
|
92420
|
+
throw new _speclynx_apidom_error__WEBPACK_IMPORTED_MODULE_8__["default"]('LinkElement operationRef and operationId fields are mutually exclusive', {
|
|
92421
|
+
operationRef: (0,_speclynx_apidom_core__WEBPACK_IMPORTED_MODULE_6__["default"])(linkElement.operationRef),
|
|
92422
|
+
operationId: (0,_speclynx_apidom_core__WEBPACK_IMPORTED_MODULE_6__["default"])(linkElement.operationId)
|
|
92423
|
+
});
|
|
92424
|
+
}
|
|
91366
92425
|
|
|
91367
|
-
|
|
91368
|
-
|
|
91369
|
-
|
|
91370
|
-
|
|
91371
|
-
|
|
91372
|
-
|
|
91373
|
-
|
|
91374
|
-
|
|
92426
|
+
// only external operationRef links need adjusting
|
|
92427
|
+
if (!(0,_speclynx_apidom_datamodel__WEBPACK_IMPORTED_MODULE_1__.isStringElement)(linkElement.operationRef)) {
|
|
92428
|
+
return;
|
|
92429
|
+
}
|
|
92430
|
+
const operationRef = (0,_speclynx_apidom_core__WEBPACK_IMPORTED_MODULE_6__["default"])(linkElement.operationRef);
|
|
92431
|
+
const retrievalURI = this.toBaseURI(operationRef);
|
|
92432
|
+
const isInternalReference = this.entryURI === retrievalURI;
|
|
92433
|
+
if (isInternalReference) {
|
|
92434
|
+
// normalize self-file operationRef to a bare fragment so the bundled
|
|
92435
|
+
// document stays transferable; bare fragments are left untouched
|
|
92436
|
+
linkElement.set('operationRef', this.normalizeSelfFileRef(operationRef));
|
|
92437
|
+
return;
|
|
92438
|
+
}
|
|
91375
92439
|
|
|
91376
|
-
|
|
91377
|
-
|
|
91378
|
-
|
|
91379
|
-
|
|
91380
|
-
|
|
91381
|
-
|
|
91382
|
-
|
|
91383
|
-
|
|
91384
|
-
|
|
92440
|
+
// honor the resolve.external switch
|
|
92441
|
+
if (!this.options.resolve.external) {
|
|
92442
|
+
return;
|
|
92443
|
+
}
|
|
92444
|
+
|
|
92445
|
+
// rewrite to an absolute URI so the link keeps resolving once the document
|
|
92446
|
+
// is treated as self-contained
|
|
92447
|
+
const absoluteURI = _util_url_mjs__WEBPACK_IMPORTED_MODULE_29__.resolve(this.reference.uri, operationRef);
|
|
92448
|
+
if (absoluteURI !== operationRef) {
|
|
92449
|
+
linkElement.set('operationRef', absoluteURI);
|
|
92450
|
+
}
|
|
91385
92451
|
}
|
|
91386
92452
|
}
|
|
91387
|
-
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (
|
|
92453
|
+
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (OpenAPI3_0BundleVisitor);
|
|
91388
92454
|
|
|
91389
92455
|
/***/ },
|
|
91390
92456
|
|
|
@@ -91431,54 +92497,100 @@ class OpenAPI3_1BundleStrategy extends _BundleStrategy_mjs__WEBPACK_IMPORTED_MOD
|
|
|
91431
92497
|
|
|
91432
92498
|
/***/ },
|
|
91433
92499
|
|
|
92500
|
+
/***/ 78814
|
|
92501
|
+
(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
|
|
92502
|
+
|
|
92503
|
+
"use strict";
|
|
92504
|
+
__webpack_require__.r(__webpack_exports__);
|
|
92505
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
92506
|
+
/* harmony export */ sanitizeComponentName: () => (/* binding */ sanitizeComponentName),
|
|
92507
|
+
/* harmony export */ toPascalCase: () => (/* binding */ toPascalCase),
|
|
92508
|
+
/* harmony export */ uniqueName: () => (/* binding */ uniqueName)
|
|
92509
|
+
/* harmony export */ });
|
|
92510
|
+
/**
|
|
92511
|
+
* Upper-cases the first letter of each whitespace-separated word and joins
|
|
92512
|
+
* them, e.g. `pet model` -> `PetModel`.
|
|
92513
|
+
*
|
|
92514
|
+
* @public
|
|
92515
|
+
*/
|
|
92516
|
+
const toPascalCase = value => value.trim().split(/\s+/).map(word => word.replace(/^[a-z]/, char => char.toUpperCase())).join('');
|
|
92517
|
+
|
|
92518
|
+
/**
|
|
92519
|
+
* Replaces characters that are invalid in a Components Object name with `-`,
|
|
92520
|
+
* then collapses repeated separators and trims leading/trailing ones.
|
|
92521
|
+
*
|
|
92522
|
+
* @public
|
|
92523
|
+
*/
|
|
92524
|
+
const sanitizeComponentName = value => value.replace(/[^a-zA-Z0-9.\-_]/g, '-').replace(/-+/g, '-').replace(/^-|-$/g, '');
|
|
92525
|
+
|
|
92526
|
+
/**
|
|
92527
|
+
* Returns a collision-free name by suffixing `-2`, `-3`, ... onto `candidate`
|
|
92528
|
+
* until `isTaken` reports it free. `isTaken` decides what counts as taken
|
|
92529
|
+
* (e.g. names already placed in or reserved for a Components Object field).
|
|
92530
|
+
*
|
|
92531
|
+
* @public
|
|
92532
|
+
*/
|
|
92533
|
+
const uniqueName = (candidate, isTaken) => {
|
|
92534
|
+
if (!isTaken(candidate)) {
|
|
92535
|
+
return candidate;
|
|
92536
|
+
}
|
|
92537
|
+
let counter = 2;
|
|
92538
|
+
while (isTaken(`${candidate}-${counter}`)) {
|
|
92539
|
+
counter += 1;
|
|
92540
|
+
}
|
|
92541
|
+
return `${candidate}-${counter}`;
|
|
92542
|
+
};
|
|
92543
|
+
|
|
92544
|
+
/***/ },
|
|
92545
|
+
|
|
91434
92546
|
/***/ 29807
|
|
91435
92547
|
(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
|
|
91436
92548
|
|
|
91437
92549
|
"use strict";
|
|
91438
92550
|
__webpack_require__.r(__webpack_exports__);
|
|
91439
92551
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
91440
|
-
/* harmony export */ BundleError: () => (/* reexport safe */
|
|
91441
|
-
/* harmony export */ BundleStrategy: () => (/* reexport safe */
|
|
91442
|
-
/* harmony export */ DereferenceAncestorLineage: () => (/* reexport safe */
|
|
91443
|
-
/* harmony export */ DereferenceError: () => (/* reexport safe */
|
|
91444
|
-
/* harmony export */ DereferenceStrategy: () => (/* reexport safe */
|
|
91445
|
-
/* harmony export */ EvaluationElementIdError: () => (/* reexport safe */
|
|
91446
|
-
/* harmony export */ EvaluationJsonSchema$anchorError: () => (/* reexport safe */
|
|
91447
|
-
/* harmony export */ EvaluationJsonSchemaUriError: () => (/* reexport safe */
|
|
91448
|
-
/* harmony export */ File: () => (/* reexport safe */
|
|
91449
|
-
/* harmony export */ HTTPResolver: () => (/* reexport safe */
|
|
91450
|
-
/* harmony export */ InvalidJsonSchema$anchorError: () => (/* reexport safe */
|
|
91451
|
-
/* harmony export */ JsonSchema$anchorError: () => (/* reexport safe */
|
|
91452
|
-
/* harmony export */ JsonSchemaURIError: () => (/* reexport safe */
|
|
91453
|
-
/* harmony export */ MaximumBundleDepthError: () => (/* reexport safe */
|
|
91454
|
-
/* harmony export */ MaximumDereferenceDepthError: () => (/* reexport safe */
|
|
91455
|
-
/* harmony export */ MaximumResolveDepthError: () => (/* reexport safe */
|
|
91456
|
-
/* harmony export */ ParseError: () => (/* reexport safe */
|
|
91457
|
-
/* harmony export */ Parser: () => (/* reexport safe */
|
|
91458
|
-
/* harmony export */ ParserError: () => (/* reexport safe */
|
|
91459
|
-
/* harmony export */ PluginError: () => (/* reexport safe */
|
|
91460
|
-
/* harmony export */ Reference: () => (/* reexport safe */
|
|
91461
|
-
/* harmony export */ ReferenceSet: () => (/* reexport safe */
|
|
91462
|
-
/* harmony export */ ResolveError: () => (/* reexport safe */
|
|
91463
|
-
/* harmony export */ ResolveStrategy: () => (/* reexport safe */
|
|
91464
|
-
/* harmony export */ Resolver: () => (/* reexport safe */
|
|
91465
|
-
/* harmony export */ ResolverError: () => (/* reexport safe */
|
|
91466
|
-
/* harmony export */ UnmatchedBundleStrategyError: () => (/* reexport safe */
|
|
91467
|
-
/* harmony export */ UnmatchedDereferenceStrategyError: () => (/* reexport safe */
|
|
91468
|
-
/* harmony export */ UnmatchedParserError: () => (/* reexport safe */
|
|
91469
|
-
/* harmony export */ UnmatchedResolveStrategyError: () => (/* reexport safe */
|
|
91470
|
-
/* harmony export */ UnmatchedResolverError: () => (/* reexport safe */
|
|
91471
|
-
/* harmony export */ UnresolvableReferenceError: () => (/* reexport safe */
|
|
91472
|
-
/* harmony export */ bundle: () => (/* reexport safe */
|
|
91473
|
-
/* harmony export */ dereference: () => (/* reexport safe */
|
|
91474
|
-
/* harmony export */ dereferenceApiDOM: () => (/* reexport safe */
|
|
91475
|
-
/* harmony export */ mergeOptions: () => (/* reexport safe */
|
|
91476
|
-
/* harmony export */ options: () => (/* reexport safe */
|
|
91477
|
-
/* harmony export */ parse: () => (/* reexport safe */
|
|
91478
|
-
/* harmony export */ readFile: () => (/* reexport safe */
|
|
91479
|
-
/* harmony export */ resolve: () => (/* reexport safe */
|
|
91480
|
-
/* harmony export */ resolveApiDOM: () => (/* reexport safe */
|
|
91481
|
-
/* harmony export */ url: () => (/* reexport safe */
|
|
92552
|
+
/* harmony export */ BundleError: () => (/* reexport safe */ _index_mjs__WEBPACK_IMPORTED_MODULE_35__.BundleError),
|
|
92553
|
+
/* harmony export */ BundleStrategy: () => (/* reexport safe */ _index_mjs__WEBPACK_IMPORTED_MODULE_35__.BundleStrategy),
|
|
92554
|
+
/* harmony export */ DereferenceAncestorLineage: () => (/* reexport safe */ _index_mjs__WEBPACK_IMPORTED_MODULE_35__.DereferenceAncestorLineage),
|
|
92555
|
+
/* harmony export */ DereferenceError: () => (/* reexport safe */ _index_mjs__WEBPACK_IMPORTED_MODULE_35__.DereferenceError),
|
|
92556
|
+
/* harmony export */ DereferenceStrategy: () => (/* reexport safe */ _index_mjs__WEBPACK_IMPORTED_MODULE_35__.DereferenceStrategy),
|
|
92557
|
+
/* harmony export */ EvaluationElementIdError: () => (/* reexport safe */ _index_mjs__WEBPACK_IMPORTED_MODULE_35__.EvaluationElementIdError),
|
|
92558
|
+
/* harmony export */ EvaluationJsonSchema$anchorError: () => (/* reexport safe */ _index_mjs__WEBPACK_IMPORTED_MODULE_35__.EvaluationJsonSchema$anchorError),
|
|
92559
|
+
/* harmony export */ EvaluationJsonSchemaUriError: () => (/* reexport safe */ _index_mjs__WEBPACK_IMPORTED_MODULE_35__.EvaluationJsonSchemaUriError),
|
|
92560
|
+
/* harmony export */ File: () => (/* reexport safe */ _index_mjs__WEBPACK_IMPORTED_MODULE_35__.File),
|
|
92561
|
+
/* harmony export */ HTTPResolver: () => (/* reexport safe */ _index_mjs__WEBPACK_IMPORTED_MODULE_35__.HTTPResolver),
|
|
92562
|
+
/* harmony export */ InvalidJsonSchema$anchorError: () => (/* reexport safe */ _index_mjs__WEBPACK_IMPORTED_MODULE_35__.InvalidJsonSchema$anchorError),
|
|
92563
|
+
/* harmony export */ JsonSchema$anchorError: () => (/* reexport safe */ _index_mjs__WEBPACK_IMPORTED_MODULE_35__.JsonSchema$anchorError),
|
|
92564
|
+
/* harmony export */ JsonSchemaURIError: () => (/* reexport safe */ _index_mjs__WEBPACK_IMPORTED_MODULE_35__.JsonSchemaURIError),
|
|
92565
|
+
/* harmony export */ MaximumBundleDepthError: () => (/* reexport safe */ _index_mjs__WEBPACK_IMPORTED_MODULE_35__.MaximumBundleDepthError),
|
|
92566
|
+
/* harmony export */ MaximumDereferenceDepthError: () => (/* reexport safe */ _index_mjs__WEBPACK_IMPORTED_MODULE_35__.MaximumDereferenceDepthError),
|
|
92567
|
+
/* harmony export */ MaximumResolveDepthError: () => (/* reexport safe */ _index_mjs__WEBPACK_IMPORTED_MODULE_35__.MaximumResolveDepthError),
|
|
92568
|
+
/* harmony export */ ParseError: () => (/* reexport safe */ _index_mjs__WEBPACK_IMPORTED_MODULE_35__.ParseError),
|
|
92569
|
+
/* harmony export */ Parser: () => (/* reexport safe */ _index_mjs__WEBPACK_IMPORTED_MODULE_35__.Parser),
|
|
92570
|
+
/* harmony export */ ParserError: () => (/* reexport safe */ _index_mjs__WEBPACK_IMPORTED_MODULE_35__.ParserError),
|
|
92571
|
+
/* harmony export */ PluginError: () => (/* reexport safe */ _index_mjs__WEBPACK_IMPORTED_MODULE_35__.PluginError),
|
|
92572
|
+
/* harmony export */ Reference: () => (/* reexport safe */ _index_mjs__WEBPACK_IMPORTED_MODULE_35__.Reference),
|
|
92573
|
+
/* harmony export */ ReferenceSet: () => (/* reexport safe */ _index_mjs__WEBPACK_IMPORTED_MODULE_35__.ReferenceSet),
|
|
92574
|
+
/* harmony export */ ResolveError: () => (/* reexport safe */ _index_mjs__WEBPACK_IMPORTED_MODULE_35__.ResolveError),
|
|
92575
|
+
/* harmony export */ ResolveStrategy: () => (/* reexport safe */ _index_mjs__WEBPACK_IMPORTED_MODULE_35__.ResolveStrategy),
|
|
92576
|
+
/* harmony export */ Resolver: () => (/* reexport safe */ _index_mjs__WEBPACK_IMPORTED_MODULE_35__.Resolver),
|
|
92577
|
+
/* harmony export */ ResolverError: () => (/* reexport safe */ _index_mjs__WEBPACK_IMPORTED_MODULE_35__.ResolverError),
|
|
92578
|
+
/* harmony export */ UnmatchedBundleStrategyError: () => (/* reexport safe */ _index_mjs__WEBPACK_IMPORTED_MODULE_35__.UnmatchedBundleStrategyError),
|
|
92579
|
+
/* harmony export */ UnmatchedDereferenceStrategyError: () => (/* reexport safe */ _index_mjs__WEBPACK_IMPORTED_MODULE_35__.UnmatchedDereferenceStrategyError),
|
|
92580
|
+
/* harmony export */ UnmatchedParserError: () => (/* reexport safe */ _index_mjs__WEBPACK_IMPORTED_MODULE_35__.UnmatchedParserError),
|
|
92581
|
+
/* harmony export */ UnmatchedResolveStrategyError: () => (/* reexport safe */ _index_mjs__WEBPACK_IMPORTED_MODULE_35__.UnmatchedResolveStrategyError),
|
|
92582
|
+
/* harmony export */ UnmatchedResolverError: () => (/* reexport safe */ _index_mjs__WEBPACK_IMPORTED_MODULE_35__.UnmatchedResolverError),
|
|
92583
|
+
/* harmony export */ UnresolvableReferenceError: () => (/* reexport safe */ _index_mjs__WEBPACK_IMPORTED_MODULE_35__.UnresolvableReferenceError),
|
|
92584
|
+
/* harmony export */ bundle: () => (/* reexport safe */ _index_mjs__WEBPACK_IMPORTED_MODULE_35__.bundle),
|
|
92585
|
+
/* harmony export */ dereference: () => (/* reexport safe */ _index_mjs__WEBPACK_IMPORTED_MODULE_35__.dereference),
|
|
92586
|
+
/* harmony export */ dereferenceApiDOM: () => (/* reexport safe */ _index_mjs__WEBPACK_IMPORTED_MODULE_35__.dereferenceApiDOM),
|
|
92587
|
+
/* harmony export */ mergeOptions: () => (/* reexport safe */ _index_mjs__WEBPACK_IMPORTED_MODULE_35__.mergeOptions),
|
|
92588
|
+
/* harmony export */ options: () => (/* reexport safe */ _index_mjs__WEBPACK_IMPORTED_MODULE_35__.options),
|
|
92589
|
+
/* harmony export */ parse: () => (/* reexport safe */ _index_mjs__WEBPACK_IMPORTED_MODULE_35__.parse),
|
|
92590
|
+
/* harmony export */ readFile: () => (/* reexport safe */ _index_mjs__WEBPACK_IMPORTED_MODULE_35__.readFile),
|
|
92591
|
+
/* harmony export */ resolve: () => (/* reexport safe */ _index_mjs__WEBPACK_IMPORTED_MODULE_35__.resolve),
|
|
92592
|
+
/* harmony export */ resolveApiDOM: () => (/* reexport safe */ _index_mjs__WEBPACK_IMPORTED_MODULE_35__.resolveApiDOM),
|
|
92593
|
+
/* harmony export */ url: () => (/* reexport safe */ _index_mjs__WEBPACK_IMPORTED_MODULE_35__.url)
|
|
91482
92594
|
/* harmony export */ });
|
|
91483
92595
|
/* harmony import */ var _resolve_resolvers_file_index_node_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(79948);
|
|
91484
92596
|
/* harmony import */ var _resolve_resolvers_http_axios_index_mjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(352);
|
|
@@ -91512,9 +92624,11 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
91512
92624
|
/* harmony import */ var _dereference_strategies_asyncapi_2_index_mjs__WEBPACK_IMPORTED_MODULE_29__ = __webpack_require__(35070);
|
|
91513
92625
|
/* harmony import */ var _dereference_strategies_arazzo_1_index_mjs__WEBPACK_IMPORTED_MODULE_30__ = __webpack_require__(880);
|
|
91514
92626
|
/* harmony import */ var _dereference_strategies_overlay_1_index_mjs__WEBPACK_IMPORTED_MODULE_31__ = __webpack_require__(67689);
|
|
91515
|
-
/* harmony import */ var
|
|
91516
|
-
/* harmony import */ var
|
|
91517
|
-
/* harmony import */ var _index_mjs__WEBPACK_IMPORTED_MODULE_34__ = __webpack_require__(
|
|
92627
|
+
/* harmony import */ var _bundle_strategies_openapi_3_0_index_mjs__WEBPACK_IMPORTED_MODULE_32__ = __webpack_require__(5138);
|
|
92628
|
+
/* harmony import */ var _bundle_strategies_openapi_3_1_index_mjs__WEBPACK_IMPORTED_MODULE_33__ = __webpack_require__(58091);
|
|
92629
|
+
/* harmony import */ var _index_mjs__WEBPACK_IMPORTED_MODULE_34__ = __webpack_require__(30306);
|
|
92630
|
+
/* harmony import */ var _index_mjs__WEBPACK_IMPORTED_MODULE_35__ = __webpack_require__(37013);
|
|
92631
|
+
|
|
91518
92632
|
|
|
91519
92633
|
|
|
91520
92634
|
|
|
@@ -91549,7 +92663,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
91549
92663
|
|
|
91550
92664
|
|
|
91551
92665
|
|
|
91552
|
-
|
|
92666
|
+
_index_mjs__WEBPACK_IMPORTED_MODULE_34__["default"].parse.parsers = [new _parse_parsers_openapi_json_2_index_mjs__WEBPACK_IMPORTED_MODULE_9__["default"]({
|
|
91553
92667
|
allowEmpty: true,
|
|
91554
92668
|
sourceMap: false
|
|
91555
92669
|
}), new _parse_parsers_openapi_yaml_2_index_mjs__WEBPACK_IMPORTED_MODULE_10__["default"]({
|
|
@@ -91597,14 +92711,14 @@ _index_mjs__WEBPACK_IMPORTED_MODULE_33__["default"].parse.parsers = [new _parse_
|
|
|
91597
92711
|
}), new _parse_parsers_binary_index_node_mjs__WEBPACK_IMPORTED_MODULE_24__["default"]({
|
|
91598
92712
|
allowEmpty: true
|
|
91599
92713
|
})];
|
|
91600
|
-
|
|
92714
|
+
_index_mjs__WEBPACK_IMPORTED_MODULE_34__["default"].resolve.resolvers = [new _resolve_resolvers_file_index_node_mjs__WEBPACK_IMPORTED_MODULE_0__["default"](), new _resolve_resolvers_http_axios_index_mjs__WEBPACK_IMPORTED_MODULE_1__["default"]({
|
|
91601
92715
|
timeout: 5000,
|
|
91602
92716
|
redirects: 5,
|
|
91603
92717
|
withCredentials: false
|
|
91604
92718
|
})];
|
|
91605
|
-
|
|
91606
|
-
|
|
91607
|
-
|
|
92719
|
+
_index_mjs__WEBPACK_IMPORTED_MODULE_34__["default"].resolve.strategies = [new _resolve_strategies_openapi_2_index_mjs__WEBPACK_IMPORTED_MODULE_2__["default"](), new _resolve_strategies_openapi_3_0_index_mjs__WEBPACK_IMPORTED_MODULE_3__["default"](), new _resolve_strategies_openapi_3_1_index_mjs__WEBPACK_IMPORTED_MODULE_4__["default"](), new _resolve_strategies_asyncapi_2_index_mjs__WEBPACK_IMPORTED_MODULE_5__["default"](), new _resolve_strategies_arazzo_1_index_mjs__WEBPACK_IMPORTED_MODULE_6__["default"](), new _resolve_strategies_overlay_1_index_mjs__WEBPACK_IMPORTED_MODULE_7__["default"](), new _resolve_strategies_apidom_index_mjs__WEBPACK_IMPORTED_MODULE_8__["default"]()];
|
|
92720
|
+
_index_mjs__WEBPACK_IMPORTED_MODULE_34__["default"].dereference.strategies = [new _dereference_strategies_openapi_2_index_mjs__WEBPACK_IMPORTED_MODULE_26__["default"](), new _dereference_strategies_openapi_3_0_index_mjs__WEBPACK_IMPORTED_MODULE_27__["default"](), new _dereference_strategies_openapi_3_1_index_mjs__WEBPACK_IMPORTED_MODULE_28__["default"](), new _dereference_strategies_asyncapi_2_index_mjs__WEBPACK_IMPORTED_MODULE_29__["default"](), new _dereference_strategies_arazzo_1_index_mjs__WEBPACK_IMPORTED_MODULE_30__["default"](), new _dereference_strategies_overlay_1_index_mjs__WEBPACK_IMPORTED_MODULE_31__["default"](), new _dereference_strategies_apidom_index_mjs__WEBPACK_IMPORTED_MODULE_25__["default"]()];
|
|
92721
|
+
_index_mjs__WEBPACK_IMPORTED_MODULE_34__["default"].bundle.strategies = [new _bundle_strategies_openapi_3_0_index_mjs__WEBPACK_IMPORTED_MODULE_32__["default"](), new _bundle_strategies_openapi_3_1_index_mjs__WEBPACK_IMPORTED_MODULE_33__["default"]()];
|
|
91608
92722
|
|
|
91609
92723
|
|
|
91610
92724
|
/***/ },
|
|
@@ -96955,7 +98069,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
96955
98069
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
96956
98070
|
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
96957
98071
|
/* harmony export */ });
|
|
96958
|
-
/* harmony import */ var _speclynx_apidom_error__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
|
|
98072
|
+
/* harmony import */ var _speclynx_apidom_error__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(44641);
|
|
96959
98073
|
|
|
96960
98074
|
|
|
96961
98075
|
/**
|
|
@@ -97353,12 +98467,15 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
97353
98467
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
97354
98468
|
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
97355
98469
|
/* harmony export */ });
|
|
97356
|
-
/* harmony import */ var
|
|
98470
|
+
/* harmony import */ var _ResolveError_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(65079);
|
|
97357
98471
|
|
|
97358
98472
|
/**
|
|
98473
|
+
* Thrown when a reference cannot be resolved. Resolution is shared by the
|
|
98474
|
+
* dereference and bundle components, so this error lives under `ResolveError`.
|
|
98475
|
+
*
|
|
97359
98476
|
* @public
|
|
97360
98477
|
*/
|
|
97361
|
-
class UnresolvableReferenceError extends
|
|
98478
|
+
class UnresolvableReferenceError extends _ResolveError_mjs__WEBPACK_IMPORTED_MODULE_0__["default"] {}
|
|
97362
98479
|
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (UnresolvableReferenceError);
|
|
97363
98480
|
|
|
97364
98481
|
/***/ },
|
|
@@ -97569,6 +98686,24 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
97569
98686
|
/* harmony import */ var ramda__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(57457);
|
|
97570
98687
|
|
|
97571
98688
|
|
|
98689
|
+
/**
|
|
98690
|
+
* @public
|
|
98691
|
+
*/
|
|
98692
|
+
|
|
98693
|
+
/**
|
|
98694
|
+
* @public
|
|
98695
|
+
*/
|
|
98696
|
+
|
|
98697
|
+
/**
|
|
98698
|
+
* @public
|
|
98699
|
+
*/
|
|
98700
|
+
|
|
98701
|
+
/**
|
|
98702
|
+
* Context passed to a custom component-name resolver.
|
|
98703
|
+
*
|
|
98704
|
+
* @public
|
|
98705
|
+
*/
|
|
98706
|
+
|
|
97572
98707
|
/**
|
|
97573
98708
|
* @public
|
|
97574
98709
|
*/
|
|
@@ -97736,6 +98871,13 @@ const defaultOptions = {
|
|
|
97736
98871
|
* your own implementation, or remove any bundle strategy by removing it from the list.
|
|
97737
98872
|
*/
|
|
97738
98873
|
strategies: [],
|
|
98874
|
+
/**
|
|
98875
|
+
* Determines strategy specific options. The key is the name of the strategy
|
|
98876
|
+
* (e.g. `openapi-3-0`) and the value is an object of options specific to
|
|
98877
|
+
* that strategy. Strategy specific options take precedence over the
|
|
98878
|
+
* top-level bundle options.
|
|
98879
|
+
*/
|
|
98880
|
+
strategyOpts: {},
|
|
97739
98881
|
/**
|
|
97740
98882
|
* This option accepts an instance of pre-computed ReferenceSet.
|
|
97741
98883
|
* If provided it will speed up the bundling significantly as the external
|
|
@@ -97754,7 +98896,49 @@ const defaultOptions = {
|
|
|
97754
98896
|
* The bundling should throw MaximumBundleDepthError if bundling depth
|
|
97755
98897
|
* is exceeded by this option.
|
|
97756
98898
|
*/
|
|
97757
|
-
maxDepth: +Infinity
|
|
98899
|
+
maxDepth: +Infinity,
|
|
98900
|
+
/**
|
|
98901
|
+
* Determines whether the bundling process will be immutable.
|
|
98902
|
+
* By default, the bundling process is immutable, which means that the original
|
|
98903
|
+
* ApiDOM (and any pre-computed refSet) is not mutated and a deep clone is bundled.
|
|
98904
|
+
*
|
|
98905
|
+
* true - the bundling process is immutable (deep cloning of ApiDOM is involved)
|
|
98906
|
+
* false - the bundling process is mutable (no deep cloning, faster, mutates input)
|
|
98907
|
+
*/
|
|
98908
|
+
immutable: true,
|
|
98909
|
+
/**
|
|
98910
|
+
* Determines how hoisted components are named.
|
|
98911
|
+
*
|
|
98912
|
+
* `basename` (default) - derive the name from the referenced JSON Pointer
|
|
98913
|
+
* (its last token), falling back to the referenced file's basename.
|
|
98914
|
+
* `title` - derive Schema Object names from their `title` field, falling
|
|
98915
|
+
* back to `basename` when no usable title is present.
|
|
98916
|
+
* A custom resolver function - receives the referenced element and reference
|
|
98917
|
+
* context and returns the base name; collision suffixing is still applied.
|
|
98918
|
+
*/
|
|
98919
|
+
componentNamesStrategy: 'basename',
|
|
98920
|
+
/**
|
|
98921
|
+
* Determines how a component rename forced by a name collision with
|
|
98922
|
+
* different content is reported.
|
|
98923
|
+
*
|
|
98924
|
+
* `warn` (default) - append a warning annotation to the parse result.
|
|
98925
|
+
* `off` - rename silently.
|
|
98926
|
+
* `error` - throw a BundleError instead of renaming.
|
|
98927
|
+
*/
|
|
98928
|
+
onComponentNameCollision: 'warn',
|
|
98929
|
+
/**
|
|
98930
|
+
* Determines how the bundling process behaves when a reference cannot be
|
|
98931
|
+
* resolved.
|
|
98932
|
+
*
|
|
98933
|
+
* Unlike dereferencing, a swallowed reference is left in place — so the
|
|
98934
|
+
* bundled document may still contain unresolved external references.
|
|
98935
|
+
*
|
|
98936
|
+
* false - fail fast, throw on first error (default)
|
|
98937
|
+
* true - skip unresolvable references silently, continue bundling
|
|
98938
|
+
* (error) => void - callback invoked for each error; if the callback
|
|
98939
|
+
* itself throws, bundling stops with that error
|
|
98940
|
+
*/
|
|
98941
|
+
continueOnError: false
|
|
97758
98942
|
}
|
|
97759
98943
|
};
|
|
97760
98944
|
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (defaultOptions);
|