swagger-client 3.28.1 → 3.28.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/swagger-client.browser.js +1340 -539
- package/dist/swagger-client.browser.min.js +1 -1
- package/dist/swagger-client.browser.min.js.map +1 -1
- package/es/execute/index.js +14 -18
- package/es/execute/oas3/build-request.js +1 -1
- package/es/resolver/index.js +1 -1
- package/es/resolver/strategies/generic/index.js +1 -3
- package/es/resolver/strategies/generic/resolve.js +11 -7
- package/es/resolver/strategies/openapi-2/index.js +2 -6
- package/es/resolver/strategies/openapi-3-0/index.js +2 -6
- package/es/resolver/strategies/openapi-3-1-apidom/index.js +15 -7
- package/es/resolver/strategies/openapi-3-1-apidom/normalize.js +11 -9
- package/es/resolver/strategies/openapi-3-1-apidom/resolve.js +4 -3
- package/es/subtree-resolver/index.js +5 -4
- package/lib/execute/index.js +14 -18
- package/lib/execute/oas3/build-request.js +2 -2
- package/lib/resolver/index.js +1 -1
- package/lib/resolver/strategies/generic/index.js +1 -3
- package/lib/resolver/strategies/generic/resolve.js +11 -8
- package/lib/resolver/strategies/openapi-2/index.js +2 -6
- package/lib/resolver/strategies/openapi-3-0/index.js +2 -6
- package/lib/resolver/strategies/openapi-3-1-apidom/index.js +15 -7
- package/lib/resolver/strategies/openapi-3-1-apidom/normalize.js +10 -8
- package/lib/resolver/strategies/openapi-3-1-apidom/resolve.js +4 -3
- package/lib/subtree-resolver/index.js +5 -4
- package/package.json +12 -12
|
@@ -41,20 +41,20 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
41
41
|
/* harmony export */ self: () => (/* binding */ self)
|
|
42
42
|
/* harmony export */ });
|
|
43
43
|
/* harmony import */ var cookie__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(57427);
|
|
44
|
-
/* harmony import */ var
|
|
45
|
-
/* harmony import */ var
|
|
46
|
-
/* harmony import */ var
|
|
44
|
+
/* harmony import */ var ramda_adjunct__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(24955);
|
|
45
|
+
/* harmony import */ var openapi_server_url_templating__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(29646);
|
|
46
|
+
/* harmony import */ var _swagger_api_apidom_error__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(19500);
|
|
47
47
|
/* harmony import */ var _swagger_api_apidom_reference_configuration_empty__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(83748);
|
|
48
|
-
/* harmony import */ var
|
|
49
|
-
/* harmony import */ var
|
|
50
|
-
/* harmony import */ var
|
|
51
|
-
/* harmony import */ var
|
|
52
|
-
/* harmony import */ var
|
|
53
|
-
/* harmony import */ var
|
|
54
|
-
/* harmony import */ var
|
|
55
|
-
/* harmony import */ var
|
|
56
|
-
/* harmony import */ var
|
|
57
|
-
/* harmony import */ var
|
|
48
|
+
/* harmony import */ var _constants_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(3832);
|
|
49
|
+
/* harmony import */ var _http_index_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(51670);
|
|
50
|
+
/* harmony import */ var _http_serializers_request_index_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(29382);
|
|
51
|
+
/* harmony import */ var _swagger2_parameter_builders_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(90520);
|
|
52
|
+
/* harmony import */ var _oas3_parameter_builders_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(42276);
|
|
53
|
+
/* harmony import */ var _oas3_build_request_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(53044);
|
|
54
|
+
/* harmony import */ var _swagger2_build_request_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(77768);
|
|
55
|
+
/* harmony import */ var _helpers_index_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(47555);
|
|
56
|
+
/* harmony import */ var _helpers_index_js__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(50324);
|
|
57
|
+
/* harmony import */ var _helpers_openapi_predicates_js__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(50918);
|
|
58
58
|
|
|
59
59
|
|
|
60
60
|
|
|
@@ -80,7 +80,7 @@ const parseURIReference = uriReference => {
|
|
|
80
80
|
try {
|
|
81
81
|
return new URL(uriReference);
|
|
82
82
|
} catch {
|
|
83
|
-
const parsedURL = new URL(uriReference,
|
|
83
|
+
const parsedURL = new URL(uriReference, _constants_js__WEBPACK_IMPORTED_MODULE_2__.DEFAULT_BASE_URL);
|
|
84
84
|
const pathname = String(uriReference).startsWith('/') ? parsedURL.pathname : parsedURL.pathname.substring(1);
|
|
85
85
|
return {
|
|
86
86
|
hash: parsedURL.hash,
|
|
@@ -97,7 +97,7 @@ const parseURIReference = uriReference => {
|
|
|
97
97
|
};
|
|
98
98
|
}
|
|
99
99
|
};
|
|
100
|
-
class OperationNotFoundError extends
|
|
100
|
+
class OperationNotFoundError extends _swagger_api_apidom_error__WEBPACK_IMPORTED_MODULE_9__["default"] {}
|
|
101
101
|
const findParametersWithName = (name, parameters) => parameters.filter(p => p.name === name);
|
|
102
102
|
|
|
103
103
|
// removes parameters that have duplicate 'in' and 'name' properties
|
|
@@ -138,10 +138,10 @@ function execute({
|
|
|
138
138
|
...extras
|
|
139
139
|
}) {
|
|
140
140
|
// Provide default fetch implementation
|
|
141
|
-
const http = userHttp || fetch ||
|
|
141
|
+
const http = userHttp || fetch || _http_index_js__WEBPACK_IMPORTED_MODULE_3__["default"]; // Default to _our_ http
|
|
142
142
|
|
|
143
143
|
if (pathName && method && !operationId) {
|
|
144
|
-
operationId = (0,
|
|
144
|
+
operationId = (0,_helpers_index_js__WEBPACK_IMPORTED_MODULE_10__["default"])(pathName, method);
|
|
145
145
|
}
|
|
146
146
|
const request = self.buildRequest({
|
|
147
147
|
spec,
|
|
@@ -151,7 +151,7 @@ function execute({
|
|
|
151
151
|
http,
|
|
152
152
|
...extras
|
|
153
153
|
});
|
|
154
|
-
if (request.body && ((0,
|
|
154
|
+
if (request.body && ((0,ramda_adjunct__WEBPACK_IMPORTED_MODULE_11__["default"])(request.body) || Array.isArray(request.body))) {
|
|
155
155
|
request.body = JSON.stringify(request.body);
|
|
156
156
|
}
|
|
157
157
|
|
|
@@ -179,13 +179,13 @@ function buildRequest(options) {
|
|
|
179
179
|
parameters,
|
|
180
180
|
parameterBuilders
|
|
181
181
|
} = options;
|
|
182
|
-
const specIsOAS3 = (0,
|
|
182
|
+
const specIsOAS3 = (0,_helpers_openapi_predicates_js__WEBPACK_IMPORTED_MODULE_12__.isOpenAPI3)(spec);
|
|
183
183
|
if (!parameterBuilders) {
|
|
184
184
|
// user did not provide custom parameter builders
|
|
185
185
|
if (specIsOAS3) {
|
|
186
|
-
parameterBuilders =
|
|
186
|
+
parameterBuilders = _oas3_parameter_builders_js__WEBPACK_IMPORTED_MODULE_6__;
|
|
187
187
|
} else {
|
|
188
|
-
parameterBuilders =
|
|
188
|
+
parameterBuilders = _swagger2_parameter_builders_js__WEBPACK_IMPORTED_MODULE_5__["default"];
|
|
189
189
|
}
|
|
190
190
|
}
|
|
191
191
|
|
|
@@ -211,7 +211,7 @@ function buildRequest(options) {
|
|
|
211
211
|
if (userFetch) {
|
|
212
212
|
req.userFetch = userFetch;
|
|
213
213
|
}
|
|
214
|
-
const operationRaw = (0,
|
|
214
|
+
const operationRaw = (0,_helpers_index_js__WEBPACK_IMPORTED_MODULE_13__["default"])(spec, operationId);
|
|
215
215
|
if (!operationRaw) {
|
|
216
216
|
throw new OperationNotFoundError(`Operation ${operationId} not found`);
|
|
217
217
|
}
|
|
@@ -304,10 +304,10 @@ function buildRequest(options) {
|
|
|
304
304
|
operation
|
|
305
305
|
};
|
|
306
306
|
if (specIsOAS3) {
|
|
307
|
-
req = (0,
|
|
307
|
+
req = (0,_oas3_build_request_js__WEBPACK_IMPORTED_MODULE_7__["default"])(versionSpecificOptions, req);
|
|
308
308
|
} else {
|
|
309
309
|
// If not OAS3, then treat as Swagger2.
|
|
310
|
-
req = (0,
|
|
310
|
+
req = (0,_swagger2_build_request_js__WEBPACK_IMPORTED_MODULE_8__["default"])(versionSpecificOptions, req);
|
|
311
311
|
}
|
|
312
312
|
|
|
313
313
|
// If the cookie convenience object exists in our request,
|
|
@@ -330,13 +330,13 @@ function buildRequest(options) {
|
|
|
330
330
|
|
|
331
331
|
// Will add the query object into the URL, if it exists
|
|
332
332
|
// ... will also create a FormData instance, if multipart/form-data (eg: a file)
|
|
333
|
-
return (0,
|
|
333
|
+
return (0,_http_serializers_request_index_js__WEBPACK_IMPORTED_MODULE_4__.serializeRequest)(req);
|
|
334
334
|
}
|
|
335
335
|
const stripNonAlpha = str => str ? str.replace(/\W/g, '') : null;
|
|
336
336
|
|
|
337
337
|
// be careful when modifying this! it is a publicly-exposed method.
|
|
338
338
|
function baseUrl(obj) {
|
|
339
|
-
const specIsOAS3 = (0,
|
|
339
|
+
const specIsOAS3 = (0,_helpers_openapi_predicates_js__WEBPACK_IMPORTED_MODULE_12__.isOpenAPI3)(obj.spec);
|
|
340
340
|
return specIsOAS3 ? oas3BaseUrl(obj) : swagger2BaseUrl(obj);
|
|
341
341
|
}
|
|
342
342
|
const isNonEmptyServerList = value => Array.isArray(value) && value.length > 0;
|
|
@@ -358,7 +358,7 @@ function oas3BaseUrl({
|
|
|
358
358
|
const rootLevelServers = spec?.servers;
|
|
359
359
|
servers = isNonEmptyServerList(operationLevelServers) // eslint-disable-line no-nested-ternary
|
|
360
360
|
? operationLevelServers : isNonEmptyServerList(pathItemLevelServers) // eslint-disable-line no-nested-ternary
|
|
361
|
-
? pathItemLevelServers : isNonEmptyServerList(rootLevelServers) ? rootLevelServers : [
|
|
361
|
+
? pathItemLevelServers : isNonEmptyServerList(rootLevelServers) ? rootLevelServers : [_constants_js__WEBPACK_IMPORTED_MODULE_2__.DEFAULT_OPENAPI_3_SERVER];
|
|
362
362
|
|
|
363
363
|
// pick the first server that matches the server url
|
|
364
364
|
if (server) {
|
|
@@ -371,17 +371,18 @@ function oas3BaseUrl({
|
|
|
371
371
|
[selectedServerObj] = servers;
|
|
372
372
|
selectedServerUrl = selectedServerObj.url;
|
|
373
373
|
}
|
|
374
|
-
if (
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
374
|
+
if ((0,openapi_server_url_templating__WEBPACK_IMPORTED_MODULE_1__.test)(selectedServerUrl, {
|
|
375
|
+
strict: true
|
|
376
|
+
})) {
|
|
377
|
+
const selectedServerVariables = Object.entries({
|
|
378
|
+
...selectedServerObj.variables
|
|
379
|
+
}).reduce((acc, [serverVariableName, serverVariable]) => {
|
|
380
|
+
acc[serverVariableName] = serverVariable.default;
|
|
381
|
+
return acc;
|
|
382
|
+
}, {});
|
|
383
|
+
selectedServerUrl = (0,openapi_server_url_templating__WEBPACK_IMPORTED_MODULE_1__.substitute)(selectedServerUrl, {
|
|
384
|
+
...selectedServerVariables,
|
|
385
|
+
...serverVariables
|
|
385
386
|
});
|
|
386
387
|
}
|
|
387
388
|
return buildOas3UrlWithContext(selectedServerUrl, contextUrl);
|
|
@@ -403,10 +404,6 @@ function buildOas3UrlWithContext(ourUrl = '', contextUrl = '') {
|
|
|
403
404
|
}
|
|
404
405
|
return res[res.length - 1] === '/' ? res.slice(0, -1) : res;
|
|
405
406
|
}
|
|
406
|
-
function extractServerVariableNames(serverURL) {
|
|
407
|
-
const match = serverURL.matchAll(/\{([^{}]+)}|([^{}]+)/g);
|
|
408
|
-
return Array.from(match, ([, variable]) => variable).filter(Boolean);
|
|
409
|
-
}
|
|
410
407
|
|
|
411
408
|
// Compose the baseUrl ( scheme + host + basePath )
|
|
412
409
|
function swagger2BaseUrl({
|
|
@@ -443,7 +440,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
443
440
|
/* harmony export */ applySecurities: () => (/* binding */ applySecurities),
|
|
444
441
|
/* harmony export */ "default": () => (/* binding */ buildRequest)
|
|
445
442
|
/* harmony export */ });
|
|
446
|
-
/* harmony import */ var
|
|
443
|
+
/* harmony import */ var ramda_adjunct__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(24955);
|
|
447
444
|
/* harmony import */ var _helpers_btoa_node_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(39687);
|
|
448
445
|
// This function runs after the common function,
|
|
449
446
|
// `src/execute/index.js#buildRequest`
|
|
@@ -489,7 +486,7 @@ function buildRequest(options, req) {
|
|
|
489
486
|
if (!options.responseContentType && operation.responses) {
|
|
490
487
|
const mediaTypes = Object.entries(operation.responses).filter(([key, value]) => {
|
|
491
488
|
const code = parseInt(key, 10);
|
|
492
|
-
return code >= 200 && code < 300 && (0,
|
|
489
|
+
return code >= 200 && code < 300 && (0,ramda_adjunct__WEBPACK_IMPORTED_MODULE_1__["default"])(value.content);
|
|
493
490
|
}).reduce((acc, [, value]) => acc.concat(Object.keys(value.content)), []);
|
|
494
491
|
if (mediaTypes.length > 0) {
|
|
495
492
|
req.headers.accept = mediaTypes.join(', ');
|
|
@@ -3801,7 +3798,7 @@ const resolve = async options => {
|
|
|
3801
3798
|
...options,
|
|
3802
3799
|
spec: retrievedSpec
|
|
3803
3800
|
};
|
|
3804
|
-
const strategy = options.strategies.find(strg => strg.match(
|
|
3801
|
+
const strategy = options.strategies.find(strg => strg.match(retrievedSpec));
|
|
3805
3802
|
return strategy.resolve(strategyOptions);
|
|
3806
3803
|
};
|
|
3807
3804
|
const makeResolve = defaultOptions => async options => {
|
|
@@ -5370,9 +5367,7 @@ const genericStrategy = {
|
|
|
5370
5367
|
match() {
|
|
5371
5368
|
return true;
|
|
5372
5369
|
},
|
|
5373
|
-
normalize({
|
|
5374
|
-
spec
|
|
5375
|
-
}) {
|
|
5370
|
+
normalize(spec) {
|
|
5376
5371
|
const {
|
|
5377
5372
|
spec: normalized
|
|
5378
5373
|
} = (0,_normalize_js__WEBPACK_IMPORTED_MODULE_2__["default"])({
|
|
@@ -5504,13 +5499,11 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
5504
5499
|
/* harmony export */ "default": () => (/* binding */ resolveGenericStrategy)
|
|
5505
5500
|
/* harmony export */ });
|
|
5506
5501
|
/* harmony import */ var _specmap_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(1704);
|
|
5507
|
-
/* harmony import */ var _normalize_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(12757);
|
|
5508
5502
|
/* harmony import */ var _utils_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(34242);
|
|
5509
5503
|
/* harmony import */ var _utils_options_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(40428);
|
|
5510
5504
|
|
|
5511
5505
|
|
|
5512
5506
|
|
|
5513
|
-
|
|
5514
5507
|
async function resolveGenericStrategy(options) {
|
|
5515
5508
|
const {
|
|
5516
5509
|
spec,
|
|
@@ -5521,13 +5514,15 @@ async function resolveGenericStrategy(options) {
|
|
|
5521
5514
|
parameterMacro,
|
|
5522
5515
|
requestInterceptor,
|
|
5523
5516
|
responseInterceptor,
|
|
5524
|
-
skipNormalization,
|
|
5525
|
-
useCircularStructures
|
|
5517
|
+
skipNormalization = false,
|
|
5518
|
+
useCircularStructures,
|
|
5519
|
+
strategies
|
|
5526
5520
|
} = options;
|
|
5527
5521
|
const retrievalURI = _utils_options_js__WEBPACK_IMPORTED_MODULE_2__.retrievalURI(options);
|
|
5528
5522
|
const httpClient = _utils_options_js__WEBPACK_IMPORTED_MODULE_2__.httpClient(options);
|
|
5523
|
+
const strategy = strategies.find(strg => strg.match(spec));
|
|
5529
5524
|
return doResolve(spec);
|
|
5530
|
-
function doResolve(_spec) {
|
|
5525
|
+
async function doResolve(_spec) {
|
|
5531
5526
|
if (retrievalURI) {
|
|
5532
5527
|
_specmap_index_js__WEBPACK_IMPORTED_MODULE_0__.plugins.refs.docCache[retrievalURI] = _spec;
|
|
5533
5528
|
}
|
|
@@ -5549,7 +5544,7 @@ async function resolveGenericStrategy(options) {
|
|
|
5549
5544
|
}
|
|
5550
5545
|
|
|
5551
5546
|
// mapSpec is where the hard work happens
|
|
5552
|
-
|
|
5547
|
+
const result = await (0,_specmap_index_js__WEBPACK_IMPORTED_MODULE_0__["default"])({
|
|
5553
5548
|
spec: _spec,
|
|
5554
5549
|
context: {
|
|
5555
5550
|
baseDoc: retrievalURI
|
|
@@ -5562,8 +5557,11 @@ async function resolveGenericStrategy(options) {
|
|
|
5562
5557
|
parameterMacro,
|
|
5563
5558
|
modelPropertyMacro,
|
|
5564
5559
|
useCircularStructures
|
|
5565
|
-
|
|
5566
|
-
|
|
5560
|
+
});
|
|
5561
|
+
if (!skipNormalization) {
|
|
5562
|
+
result.spec = strategy.normalize(result.spec);
|
|
5563
|
+
}
|
|
5564
|
+
return result;
|
|
5567
5565
|
}
|
|
5568
5566
|
}
|
|
5569
5567
|
|
|
@@ -5588,14 +5586,10 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
5588
5586
|
|
|
5589
5587
|
const openApi2Strategy = {
|
|
5590
5588
|
name: 'openapi-2',
|
|
5591
|
-
match({
|
|
5592
|
-
spec
|
|
5593
|
-
}) {
|
|
5589
|
+
match(spec) {
|
|
5594
5590
|
return (0,_helpers_openapi_predicates_js__WEBPACK_IMPORTED_MODULE_2__.isOpenAPI2)(spec);
|
|
5595
5591
|
},
|
|
5596
|
-
normalize({
|
|
5597
|
-
spec
|
|
5598
|
-
}) {
|
|
5592
|
+
normalize(spec) {
|
|
5599
5593
|
const {
|
|
5600
5594
|
spec: normalized
|
|
5601
5595
|
} = (0,_normalize_js__WEBPACK_IMPORTED_MODULE_3__["default"])({
|
|
@@ -5646,14 +5640,10 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
5646
5640
|
|
|
5647
5641
|
const openApi30Strategy = {
|
|
5648
5642
|
name: 'openapi-3-0',
|
|
5649
|
-
match({
|
|
5650
|
-
spec
|
|
5651
|
-
}) {
|
|
5643
|
+
match(spec) {
|
|
5652
5644
|
return (0,_helpers_openapi_predicates_js__WEBPACK_IMPORTED_MODULE_2__.isOpenAPI30)(spec);
|
|
5653
5645
|
},
|
|
5654
|
-
normalize({
|
|
5655
|
-
spec
|
|
5656
|
-
}) {
|
|
5646
|
+
normalize(spec) {
|
|
5657
5647
|
const {
|
|
5658
5648
|
spec: normalized
|
|
5659
5649
|
} = (0,_normalize_js__WEBPACK_IMPORTED_MODULE_3__["default"])({
|
|
@@ -5693,23 +5683,33 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
5693
5683
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
5694
5684
|
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
5695
5685
|
/* harmony export */ });
|
|
5686
|
+
/* harmony import */ var ramda_adjunct__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(24955);
|
|
5687
|
+
/* harmony import */ var _swagger_api_apidom_core__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(33501);
|
|
5696
5688
|
/* harmony import */ var _resolve_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(33272);
|
|
5697
5689
|
/* harmony import */ var _normalize_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(80947);
|
|
5698
5690
|
/* harmony import */ var _helpers_openapi_predicates_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(50918);
|
|
5699
5691
|
|
|
5700
5692
|
|
|
5701
5693
|
|
|
5694
|
+
|
|
5695
|
+
|
|
5702
5696
|
const openApi31ApiDOMStrategy = {
|
|
5703
5697
|
name: 'openapi-3-1-apidom',
|
|
5704
|
-
match({
|
|
5705
|
-
spec
|
|
5706
|
-
}) {
|
|
5698
|
+
match(spec) {
|
|
5707
5699
|
return (0,_helpers_openapi_predicates_js__WEBPACK_IMPORTED_MODULE_2__.isOpenAPI31)(spec);
|
|
5708
5700
|
},
|
|
5709
|
-
normalize({
|
|
5710
|
-
|
|
5711
|
-
|
|
5712
|
-
|
|
5701
|
+
normalize(spec) {
|
|
5702
|
+
// pre-normalization - happens only once before the first lazy dereferencing and in JavaScript context
|
|
5703
|
+
if (!(0,_swagger_api_apidom_core__WEBPACK_IMPORTED_MODULE_3__.isElement)(spec) && (0,ramda_adjunct__WEBPACK_IMPORTED_MODULE_4__["default"])(spec) && !spec.$$normalized) {
|
|
5704
|
+
const preNormalized = (0,_normalize_js__WEBPACK_IMPORTED_MODULE_1__.pojoAdapter)(_normalize_js__WEBPACK_IMPORTED_MODULE_1__["default"])(spec);
|
|
5705
|
+
preNormalized.$$normalized = true;
|
|
5706
|
+
return preNormalized;
|
|
5707
|
+
}
|
|
5708
|
+
// post-normalization - happens after each dereferencing and in ApiDOM context
|
|
5709
|
+
if ((0,_swagger_api_apidom_core__WEBPACK_IMPORTED_MODULE_3__.isElement)(spec)) {
|
|
5710
|
+
return (0,_normalize_js__WEBPACK_IMPORTED_MODULE_1__["default"])(spec);
|
|
5711
|
+
}
|
|
5712
|
+
return spec;
|
|
5713
5713
|
},
|
|
5714
5714
|
async resolve(options) {
|
|
5715
5715
|
return (0,_resolve_js__WEBPACK_IMPORTED_MODULE_0__["default"])(options);
|
|
@@ -5728,33 +5728,33 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
5728
5728
|
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__),
|
|
5729
5729
|
/* harmony export */ pojoAdapter: () => (/* binding */ pojoAdapter)
|
|
5730
5730
|
/* harmony export */ });
|
|
5731
|
-
/* harmony import */ var
|
|
5731
|
+
/* harmony import */ var _swagger_api_apidom_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(33501);
|
|
5732
5732
|
/* harmony import */ var _swagger_api_apidom_core__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(15922);
|
|
5733
5733
|
/* harmony import */ var _swagger_api_apidom_core__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(9999);
|
|
5734
|
-
/* harmony import */ var
|
|
5735
|
-
/* harmony import */ var
|
|
5736
|
-
/* harmony import */ var
|
|
5737
|
-
/* harmony import */ var _swagger_api_apidom_ns_openapi_3_1__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(69037);
|
|
5734
|
+
/* harmony import */ var _swagger_api_apidom_ns_openapi_3_1__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(3295);
|
|
5735
|
+
/* harmony import */ var _swagger_api_apidom_ns_openapi_3_1__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(91247);
|
|
5736
|
+
/* harmony import */ var _swagger_api_apidom_ns_openapi_3_1__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(59038);
|
|
5738
5737
|
/* harmony import */ var _swagger_api_apidom_ns_openapi_3_1__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(26876);
|
|
5739
|
-
/* harmony import */ var _swagger_api_apidom_ns_openapi_3_1__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(
|
|
5738
|
+
/* harmony import */ var _swagger_api_apidom_ns_openapi_3_1__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(65389);
|
|
5740
5739
|
/* harmony import */ var _swagger_api_apidom_ns_openapi_3_1__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(89643);
|
|
5741
5740
|
/* harmony import */ var _swagger_api_apidom_ns_openapi_3_1__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(66648);
|
|
5742
5741
|
/* harmony import */ var _swagger_api_apidom_ns_openapi_3_1__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(3117);
|
|
5743
|
-
/* harmony import */ var
|
|
5742
|
+
/* harmony import */ var _helpers_op_id_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(37896);
|
|
5743
|
+
/* harmony import */ var _resolve_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(33272);
|
|
5744
5744
|
/* eslint-disable camelcase */
|
|
5745
5745
|
|
|
5746
5746
|
|
|
5747
5747
|
|
|
5748
|
+
|
|
5748
5749
|
const normalize = element => {
|
|
5749
|
-
if (!(0,
|
|
5750
|
-
|
|
5751
|
-
|
|
5752
|
-
operationIdNormalizer: (operationId, path, method) => (0,_helpers_op_id_js__WEBPACK_IMPORTED_MODULE_2__["default"])({
|
|
5750
|
+
if (!(0,_swagger_api_apidom_core__WEBPACK_IMPORTED_MODULE_1__.isObjectElement)(element)) return element;
|
|
5751
|
+
const plugins = [(0,_swagger_api_apidom_ns_openapi_3_1__WEBPACK_IMPORTED_MODULE_2__["default"])({
|
|
5752
|
+
operationIdNormalizer: (operationId, path, method) => (0,_helpers_op_id_js__WEBPACK_IMPORTED_MODULE_3__["default"])({
|
|
5753
5753
|
operationId
|
|
5754
5754
|
}, path, method, {
|
|
5755
5755
|
v2OperationIdCompatibilityMode: false
|
|
5756
5756
|
})
|
|
5757
|
-
}), (0,
|
|
5757
|
+
}), (0,_swagger_api_apidom_ns_openapi_3_1__WEBPACK_IMPORTED_MODULE_4__["default"])(), (0,_swagger_api_apidom_ns_openapi_3_1__WEBPACK_IMPORTED_MODULE_5__["default"])(), (0,_swagger_api_apidom_ns_openapi_3_1__WEBPACK_IMPORTED_MODULE_6__["default"])(), (0,_swagger_api_apidom_ns_openapi_3_1__WEBPACK_IMPORTED_MODULE_7__["default"])()];
|
|
5758
5758
|
const normalized = (0,_swagger_api_apidom_core__WEBPACK_IMPORTED_MODULE_8__.dispatchPluginsSync)(element, plugins, {
|
|
5759
5759
|
toolboxCreator: _swagger_api_apidom_ns_openapi_3_1__WEBPACK_IMPORTED_MODULE_9__["default"],
|
|
5760
5760
|
visitorOptions: {
|
|
@@ -5762,7 +5762,6 @@ const normalize = element => {
|
|
|
5762
5762
|
nodeTypeGetter: _swagger_api_apidom_ns_openapi_3_1__WEBPACK_IMPORTED_MODULE_10__.getNodeType
|
|
5763
5763
|
}
|
|
5764
5764
|
});
|
|
5765
|
-
normalized.set('$$normalized', true);
|
|
5766
5765
|
return normalized;
|
|
5767
5766
|
};
|
|
5768
5767
|
|
|
@@ -5772,15 +5771,18 @@ const normalize = element => {
|
|
|
5772
5771
|
* Plain Old JavaScript Objects and returns Plain Old JavaScript Objects.
|
|
5773
5772
|
*/
|
|
5774
5773
|
const pojoAdapter = normalizeFn => spec => {
|
|
5775
|
-
if (spec?.$$normalized) return spec;
|
|
5776
|
-
if (pojoAdapter.cache.has(spec)) return pojoAdapter.cache.get(spec);
|
|
5777
5774
|
const openApiElement = _swagger_api_apidom_ns_openapi_3_1__WEBPACK_IMPORTED_MODULE_11__.OpenApi3_1Element.refract(spec);
|
|
5775
|
+
openApiElement.classes.push('result');
|
|
5778
5776
|
const normalized = normalizeFn(openApiElement);
|
|
5779
5777
|
const value = (0,_swagger_api_apidom_core__WEBPACK_IMPORTED_MODULE_12__["default"])(normalized);
|
|
5780
|
-
|
|
5781
|
-
|
|
5778
|
+
|
|
5779
|
+
/**
|
|
5780
|
+
* We're setting the cache here to avoid repeated refracting
|
|
5781
|
+
* in `openapi-3-1-apidom` strategy resolve method.
|
|
5782
|
+
*/
|
|
5783
|
+
_resolve_js__WEBPACK_IMPORTED_MODULE_0__["default"].cache.set(value, normalized);
|
|
5784
|
+
return (0,_swagger_api_apidom_core__WEBPACK_IMPORTED_MODULE_12__["default"])(normalized);
|
|
5782
5785
|
};
|
|
5783
|
-
pojoAdapter.cache = new WeakMap();
|
|
5784
5786
|
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (normalize);
|
|
5785
5787
|
/* eslint-enable camelcase */
|
|
5786
5788
|
|
|
@@ -5795,32 +5797,31 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
5795
5797
|
/* harmony export */ circularReplacer: () => (/* binding */ circularReplacer),
|
|
5796
5798
|
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
5797
5799
|
/* harmony export */ });
|
|
5798
|
-
/* harmony import */ var
|
|
5799
|
-
/* harmony import */ var
|
|
5800
|
-
/* harmony import */ var
|
|
5801
|
-
/* harmony import */ var
|
|
5802
|
-
/* harmony import */ var
|
|
5803
|
-
/* harmony import */ var
|
|
5804
|
-
/* harmony import */ var
|
|
5805
|
-
/* harmony import */ var
|
|
5806
|
-
/* harmony import */ var
|
|
5807
|
-
/* harmony import */ var
|
|
5808
|
-
/* harmony import */ var
|
|
5809
|
-
/* harmony import */ var
|
|
5810
|
-
/* harmony import */ var
|
|
5811
|
-
/* harmony import */ var
|
|
5812
|
-
/* harmony import */ var
|
|
5813
|
-
/* harmony import */ var
|
|
5814
|
-
/* harmony import */ var
|
|
5800
|
+
/* harmony import */ var _swagger_api_apidom_core__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(9999);
|
|
5801
|
+
/* harmony import */ var _swagger_api_apidom_core__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(44824);
|
|
5802
|
+
/* harmony import */ var _swagger_api_apidom_core__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(87024);
|
|
5803
|
+
/* harmony import */ var _swagger_api_apidom_core__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(65342);
|
|
5804
|
+
/* harmony import */ var _swagger_api_apidom_json_pointer__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(60672);
|
|
5805
|
+
/* harmony import */ var _swagger_api_apidom_json_pointer__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(18316);
|
|
5806
|
+
/* harmony import */ var _swagger_api_apidom_json_pointer__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(60489);
|
|
5807
|
+
/* harmony import */ var _swagger_api_apidom_json_pointer__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(64884);
|
|
5808
|
+
/* harmony import */ var _swagger_api_apidom_ns_openapi_3_1__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(3117);
|
|
5809
|
+
/* harmony import */ var _swagger_api_apidom_ns_openapi_3_1__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(94145);
|
|
5810
|
+
/* harmony import */ var _swagger_api_apidom_reference_configuration_empty__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(83748);
|
|
5811
|
+
/* harmony import */ var _swagger_api_apidom_reference_configuration_empty__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(12349);
|
|
5812
|
+
/* harmony import */ var _swagger_api_apidom_reference_configuration_empty__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(31387);
|
|
5813
|
+
/* harmony import */ var _swagger_api_apidom_reference_configuration_empty__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(71614);
|
|
5814
|
+
/* harmony import */ var _swagger_api_apidom_reference_configuration_empty__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(48097);
|
|
5815
|
+
/* harmony import */ var _swagger_api_apidom_reference_parse_parsers_binary__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(16960);
|
|
5816
|
+
/* harmony import */ var _swagger_api_apidom_reference_resolve_strategies_openapi_3_1__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(47724);
|
|
5815
5817
|
/* harmony import */ var _constants_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(3832);
|
|
5816
5818
|
/* harmony import */ var _utils_options_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(40428);
|
|
5817
|
-
/* harmony import */ var
|
|
5818
|
-
/* harmony import */ var
|
|
5819
|
-
/* harmony import */ var
|
|
5820
|
-
/* harmony import */ var
|
|
5821
|
-
/* harmony import */ var
|
|
5822
|
-
/* harmony import */ var
|
|
5823
|
-
/* harmony import */ var _apidom_reference_dereference_strategies_openapi_3_1_swagger_client_index_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(13764);
|
|
5819
|
+
/* harmony import */ var _apidom_reference_resolve_resolvers_http_swagger_client_index_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(636);
|
|
5820
|
+
/* harmony import */ var _apidom_reference_parse_parsers_json_index_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(92263);
|
|
5821
|
+
/* harmony import */ var _apidom_reference_parse_parsers_yaml_1_2_index_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(12787);
|
|
5822
|
+
/* harmony import */ var _apidom_reference_parse_parsers_openapi_json_3_1_index_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(89742);
|
|
5823
|
+
/* harmony import */ var _apidom_reference_parse_parsers_openapi_yaml_3_1_index_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(49575);
|
|
5824
|
+
/* harmony import */ var _apidom_reference_dereference_strategies_openapi_3_1_swagger_client_index_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(13764);
|
|
5824
5825
|
/* eslint-disable camelcase */
|
|
5825
5826
|
|
|
5826
5827
|
|
|
@@ -5836,18 +5837,17 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
5836
5837
|
|
|
5837
5838
|
|
|
5838
5839
|
|
|
5839
|
-
|
|
5840
5840
|
const circularReplacer = refElement => {
|
|
5841
|
-
const $refBaseURI = (0,
|
|
5841
|
+
const $refBaseURI = (0,_swagger_api_apidom_core__WEBPACK_IMPORTED_MODULE_8__["default"])(refElement.meta.get('baseURI'));
|
|
5842
5842
|
const referencingElement = refElement.meta.get('referencingElement');
|
|
5843
5843
|
|
|
5844
5844
|
/**
|
|
5845
5845
|
* Removing semantics from the absolutified referencing element by
|
|
5846
5846
|
* using generic ObjectElement to represent the reference.
|
|
5847
5847
|
*/
|
|
5848
|
-
return new
|
|
5848
|
+
return new _swagger_api_apidom_core__WEBPACK_IMPORTED_MODULE_9__.ObjectElement({
|
|
5849
5849
|
$ref: $refBaseURI
|
|
5850
|
-
}, (0,
|
|
5850
|
+
}, (0,_swagger_api_apidom_core__WEBPACK_IMPORTED_MODULE_10__.cloneDeep)(referencingElement.meta), (0,_swagger_api_apidom_core__WEBPACK_IMPORTED_MODULE_10__.cloneDeep)(referencingElement.attributes));
|
|
5851
5851
|
};
|
|
5852
5852
|
const resolveOpenAPI31Strategy = async options => {
|
|
5853
5853
|
const {
|
|
@@ -5862,40 +5862,42 @@ const resolveOpenAPI31Strategy = async options => {
|
|
|
5862
5862
|
skipNormalization = false,
|
|
5863
5863
|
parameterMacro = null,
|
|
5864
5864
|
modelPropertyMacro = null,
|
|
5865
|
-
mode = 'non-strict'
|
|
5865
|
+
mode = 'non-strict',
|
|
5866
|
+
strategies
|
|
5866
5867
|
} = options;
|
|
5867
5868
|
try {
|
|
5868
5869
|
const {
|
|
5869
5870
|
cache
|
|
5870
5871
|
} = resolveOpenAPI31Strategy;
|
|
5872
|
+
const strategy = strategies.find(strg => strg.match(spec));
|
|
5871
5873
|
|
|
5872
5874
|
// determining BaseURI
|
|
5873
|
-
const cwd =
|
|
5875
|
+
const cwd = _swagger_api_apidom_reference_configuration_empty__WEBPACK_IMPORTED_MODULE_11__.isHttpUrl(_swagger_api_apidom_reference_configuration_empty__WEBPACK_IMPORTED_MODULE_11__.cwd()) ? _swagger_api_apidom_reference_configuration_empty__WEBPACK_IMPORTED_MODULE_11__.cwd() : _constants_js__WEBPACK_IMPORTED_MODULE_0__.DEFAULT_BASE_URL;
|
|
5874
5876
|
const retrievalURI = _utils_options_js__WEBPACK_IMPORTED_MODULE_1__.retrievalURI(options);
|
|
5875
|
-
const baseURI =
|
|
5877
|
+
const baseURI = _swagger_api_apidom_reference_configuration_empty__WEBPACK_IMPORTED_MODULE_11__.resolve(cwd, retrievalURI);
|
|
5876
5878
|
|
|
5877
5879
|
// prepare spec for dereferencing
|
|
5878
5880
|
let openApiElement;
|
|
5879
5881
|
if (cache.has(spec)) {
|
|
5880
5882
|
openApiElement = cache.get(spec);
|
|
5881
5883
|
} else {
|
|
5882
|
-
openApiElement =
|
|
5884
|
+
openApiElement = _swagger_api_apidom_ns_openapi_3_1__WEBPACK_IMPORTED_MODULE_12__.OpenApi3_1Element.refract(spec);
|
|
5883
5885
|
openApiElement.classes.push('result');
|
|
5884
5886
|
cache.set(spec, openApiElement);
|
|
5885
5887
|
}
|
|
5886
|
-
const openApiParseResultElement = new
|
|
5888
|
+
const openApiParseResultElement = new _swagger_api_apidom_core__WEBPACK_IMPORTED_MODULE_9__.ParseResultElement([openApiElement]);
|
|
5887
5889
|
|
|
5888
5890
|
// prepare fragment for dereferencing
|
|
5889
|
-
const jsonPointer = (0,
|
|
5891
|
+
const jsonPointer = (0,_swagger_api_apidom_json_pointer__WEBPACK_IMPORTED_MODULE_13__["default"])(pathDiscriminator);
|
|
5890
5892
|
const jsonPointerURI = jsonPointer === '' ? '' : `#${jsonPointer}`;
|
|
5891
|
-
const fragmentElement = (0,
|
|
5893
|
+
const fragmentElement = (0,_swagger_api_apidom_json_pointer__WEBPACK_IMPORTED_MODULE_14__["default"])(jsonPointer, openApiElement);
|
|
5892
5894
|
|
|
5893
5895
|
// prepare reference set for dereferencing
|
|
5894
|
-
const openApiElementReference = new
|
|
5896
|
+
const openApiElementReference = new _swagger_api_apidom_reference_configuration_empty__WEBPACK_IMPORTED_MODULE_15__["default"]({
|
|
5895
5897
|
uri: baseURI,
|
|
5896
5898
|
value: openApiParseResultElement
|
|
5897
5899
|
});
|
|
5898
|
-
const refSet = new
|
|
5900
|
+
const refSet = new _swagger_api_apidom_reference_configuration_empty__WEBPACK_IMPORTED_MODULE_16__["default"]({
|
|
5899
5901
|
refs: [openApiElementReference]
|
|
5900
5902
|
});
|
|
5901
5903
|
if (jsonPointer !== '') refSet.rootRef = undefined; // reset root reference as we want fragment to become the root reference
|
|
@@ -5903,7 +5905,7 @@ const resolveOpenAPI31Strategy = async options => {
|
|
|
5903
5905
|
// prepare ancestors; needed for cases where fragment is not OpenAPI element
|
|
5904
5906
|
const ancestors = [new Set([fragmentElement])];
|
|
5905
5907
|
const errors = [];
|
|
5906
|
-
const dereferenced = await (0,
|
|
5908
|
+
const dereferenced = await (0,_swagger_api_apidom_reference_configuration_empty__WEBPACK_IMPORTED_MODULE_17__.dereferenceApiDOM)(fragmentElement, {
|
|
5907
5909
|
resolve: {
|
|
5908
5910
|
/**
|
|
5909
5911
|
* swagger-client only supports resolving HTTP(S) URLs or spec objects.
|
|
@@ -5912,7 +5914,7 @@ const resolveOpenAPI31Strategy = async options => {
|
|
|
5912
5914
|
* then below baseURI check will make sure that constant HTTPS URL is used as baseURI.
|
|
5913
5915
|
*/
|
|
5914
5916
|
baseURI: `${baseURI}${jsonPointerURI}`,
|
|
5915
|
-
resolvers: [new
|
|
5917
|
+
resolvers: [new _apidom_reference_resolve_resolvers_http_swagger_client_index_js__WEBPACK_IMPORTED_MODULE_2__["default"]({
|
|
5916
5918
|
timeout: timeout || 10000,
|
|
5917
5919
|
redirects: redirects || 10
|
|
5918
5920
|
})],
|
|
@@ -5922,30 +5924,30 @@ const resolveOpenAPI31Strategy = async options => {
|
|
|
5922
5924
|
responseInterceptor
|
|
5923
5925
|
}
|
|
5924
5926
|
},
|
|
5925
|
-
strategies: [new
|
|
5927
|
+
strategies: [new _swagger_api_apidom_reference_resolve_strategies_openapi_3_1__WEBPACK_IMPORTED_MODULE_18__["default"]()]
|
|
5926
5928
|
},
|
|
5927
5929
|
parse: {
|
|
5928
|
-
mediaType:
|
|
5929
|
-
parsers: [new
|
|
5930
|
+
mediaType: _swagger_api_apidom_ns_openapi_3_1__WEBPACK_IMPORTED_MODULE_19__["default"].latest(),
|
|
5931
|
+
parsers: [new _apidom_reference_parse_parsers_openapi_json_3_1_index_js__WEBPACK_IMPORTED_MODULE_5__["default"]({
|
|
5930
5932
|
allowEmpty: false,
|
|
5931
5933
|
sourceMap: false
|
|
5932
|
-
}), new
|
|
5934
|
+
}), new _apidom_reference_parse_parsers_openapi_yaml_3_1_index_js__WEBPACK_IMPORTED_MODULE_6__["default"]({
|
|
5933
5935
|
allowEmpty: false,
|
|
5934
5936
|
sourceMap: false
|
|
5935
|
-
}), new
|
|
5937
|
+
}), new _apidom_reference_parse_parsers_json_index_js__WEBPACK_IMPORTED_MODULE_3__["default"]({
|
|
5936
5938
|
allowEmpty: false,
|
|
5937
5939
|
sourceMap: false
|
|
5938
|
-
}), new
|
|
5940
|
+
}), new _apidom_reference_parse_parsers_yaml_1_2_index_js__WEBPACK_IMPORTED_MODULE_4__["default"]({
|
|
5939
5941
|
allowEmpty: false,
|
|
5940
5942
|
sourceMap: false
|
|
5941
|
-
}), new
|
|
5943
|
+
}), new _swagger_api_apidom_reference_parse_parsers_binary__WEBPACK_IMPORTED_MODULE_20__["default"]({
|
|
5942
5944
|
allowEmpty: false,
|
|
5943
5945
|
sourceMap: false
|
|
5944
5946
|
})]
|
|
5945
5947
|
},
|
|
5946
5948
|
dereference: {
|
|
5947
5949
|
maxDepth: 100,
|
|
5948
|
-
strategies: [new
|
|
5950
|
+
strategies: [new _apidom_reference_dereference_strategies_openapi_3_1_swagger_client_index_js__WEBPACK_IMPORTED_MODULE_7__["default"]({
|
|
5949
5951
|
allowMetaPatches,
|
|
5950
5952
|
useCircularStructures,
|
|
5951
5953
|
parameterMacro,
|
|
@@ -5959,17 +5961,17 @@ const resolveOpenAPI31Strategy = async options => {
|
|
|
5959
5961
|
},
|
|
5960
5962
|
immutable: false,
|
|
5961
5963
|
circular: useCircularStructures ? 'ignore' : 'replace',
|
|
5962
|
-
circularReplacer: useCircularStructures ?
|
|
5964
|
+
circularReplacer: useCircularStructures ? _swagger_api_apidom_reference_configuration_empty__WEBPACK_IMPORTED_MODULE_21__["default"].dereference.circularReplacer : circularReplacer
|
|
5963
5965
|
}
|
|
5964
5966
|
});
|
|
5965
|
-
const transcluded = (0,
|
|
5966
|
-
const normalized = skipNormalization ? transcluded : (
|
|
5967
|
+
const transcluded = (0,_swagger_api_apidom_core__WEBPACK_IMPORTED_MODULE_22__.transclude)(fragmentElement, dereferenced, openApiElement);
|
|
5968
|
+
const normalized = skipNormalization ? transcluded : strategy.normalize(transcluded);
|
|
5967
5969
|
return {
|
|
5968
|
-
spec: (0,
|
|
5970
|
+
spec: (0,_swagger_api_apidom_core__WEBPACK_IMPORTED_MODULE_8__["default"])(normalized),
|
|
5969
5971
|
errors
|
|
5970
5972
|
};
|
|
5971
5973
|
} catch (error) {
|
|
5972
|
-
if (error instanceof
|
|
5974
|
+
if (error instanceof _swagger_api_apidom_json_pointer__WEBPACK_IMPORTED_MODULE_23__["default"] || error instanceof _swagger_api_apidom_json_pointer__WEBPACK_IMPORTED_MODULE_24__["default"]) {
|
|
5973
5975
|
return {
|
|
5974
5976
|
spec: null,
|
|
5975
5977
|
errors: []
|
|
@@ -6070,6 +6072,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
6070
6072
|
/* harmony import */ var _resolver_strategies_generic_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(52398);
|
|
6071
6073
|
/* harmony import */ var _resolver_strategies_openapi_2_index_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(19096);
|
|
6072
6074
|
/* harmony import */ var _resolver_strategies_openapi_3_0_index_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(730);
|
|
6075
|
+
/* harmony import */ var _helpers_openapi_predicates_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(50918);
|
|
6073
6076
|
// The subtree resolver is a higher-level interface that allows you to
|
|
6074
6077
|
// get the same result that you would from `Swagger.resolve`, but focuses on
|
|
6075
6078
|
// a subtree of your object.
|
|
@@ -6096,6 +6099,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
6096
6099
|
|
|
6097
6100
|
|
|
6098
6101
|
|
|
6102
|
+
|
|
6099
6103
|
const resolveSubtree = async (obj, path, options = {}) => {
|
|
6100
6104
|
const {
|
|
6101
6105
|
returnEntireTree,
|
|
@@ -6118,13 +6122,13 @@ const resolveSubtree = async (obj, path, options = {}) => {
|
|
|
6118
6122
|
useCircularStructures,
|
|
6119
6123
|
strategies
|
|
6120
6124
|
};
|
|
6121
|
-
const strategy = strategies.find(strg => strg.match(
|
|
6122
|
-
const normalized = strategy.normalize(
|
|
6125
|
+
const strategy = strategies.find(strg => strg.match(obj));
|
|
6126
|
+
const normalized = strategy.normalize(obj);
|
|
6123
6127
|
const result = await (0,_resolver_index_js__WEBPACK_IMPORTED_MODULE_0__["default"])({
|
|
6124
|
-
...resolveOptions,
|
|
6125
6128
|
spec: normalized,
|
|
6129
|
+
...resolveOptions,
|
|
6126
6130
|
allowMetaPatches: true,
|
|
6127
|
-
skipNormalization:
|
|
6131
|
+
skipNormalization: !(0,_helpers_openapi_predicates_js__WEBPACK_IMPORTED_MODULE_4__.isOpenAPI31)(obj)
|
|
6128
6132
|
});
|
|
6129
6133
|
if (!returnEntireTree && Array.isArray(path) && path.length) {
|
|
6130
6134
|
result.spec = path.reduce((acc, pathSegment) => acc?.[pathSegment], result.spec) || null;
|
|
@@ -13949,6 +13953,7 @@ var defaults = {
|
|
|
13949
13953
|
parameterLimit: 1000,
|
|
13950
13954
|
parseArrays: true,
|
|
13951
13955
|
plainObjects: false,
|
|
13956
|
+
strictDepth: false,
|
|
13952
13957
|
strictNullHandling: false
|
|
13953
13958
|
};
|
|
13954
13959
|
|
|
@@ -13980,6 +13985,7 @@ var parseValues = function parseQueryStringValues(str, options) {
|
|
|
13980
13985
|
var obj = { __proto__: null };
|
|
13981
13986
|
|
|
13982
13987
|
var cleanStr = options.ignoreQueryPrefix ? str.replace(/^\?/, '') : str;
|
|
13988
|
+
cleanStr = cleanStr.replace(/%5B/gi, '[').replace(/%5D/gi, ']');
|
|
13983
13989
|
var limit = options.parameterLimit === Infinity ? undefined : options.parameterLimit;
|
|
13984
13990
|
var parts = cleanStr.split(options.delimiter, limit);
|
|
13985
13991
|
var skipIndex = -1; // Keep track of where the utf8 sentinel was found
|
|
@@ -14050,7 +14056,9 @@ var parseObject = function (chain, val, options, valuesParsed) {
|
|
|
14050
14056
|
var root = chain[i];
|
|
14051
14057
|
|
|
14052
14058
|
if (root === '[]' && options.parseArrays) {
|
|
14053
|
-
obj = options.allowEmptyArrays && leaf === ''
|
|
14059
|
+
obj = options.allowEmptyArrays && (leaf === '' || (options.strictNullHandling && leaf === null))
|
|
14060
|
+
? []
|
|
14061
|
+
: [].concat(leaf);
|
|
14054
14062
|
} else {
|
|
14055
14063
|
obj = options.plainObjects ? Object.create(null) : {};
|
|
14056
14064
|
var cleanRoot = root.charAt(0) === '[' && root.charAt(root.length - 1) === ']' ? root.slice(1, -1) : root;
|
|
@@ -14123,9 +14131,12 @@ var parseKeys = function parseQueryStringKeys(givenKey, val, options, valuesPars
|
|
|
14123
14131
|
keys.push(segment[1]);
|
|
14124
14132
|
}
|
|
14125
14133
|
|
|
14126
|
-
// If there's a remainder, just add whatever is left
|
|
14134
|
+
// If there's a remainder, check strictDepth option for throw, else just add whatever is left
|
|
14127
14135
|
|
|
14128
14136
|
if (segment) {
|
|
14137
|
+
if (options.strictDepth === true) {
|
|
14138
|
+
throw new RangeError('Input depth exceeded depth option of ' + options.depth + ' and strictDepth is true');
|
|
14139
|
+
}
|
|
14129
14140
|
keys.push('[' + key.slice(segment.index) + ']');
|
|
14130
14141
|
}
|
|
14131
14142
|
|
|
@@ -14182,6 +14193,7 @@ var normalizeParseOptions = function normalizeParseOptions(opts) {
|
|
|
14182
14193
|
parameterLimit: typeof opts.parameterLimit === 'number' ? opts.parameterLimit : defaults.parameterLimit,
|
|
14183
14194
|
parseArrays: opts.parseArrays !== false,
|
|
14184
14195
|
plainObjects: typeof opts.plainObjects === 'boolean' ? opts.plainObjects : defaults.plainObjects,
|
|
14196
|
+
strictDepth: typeof opts.strictDepth === 'boolean' ? !!opts.strictDepth : defaults.strictDepth,
|
|
14185
14197
|
strictNullHandling: typeof opts.strictNullHandling === 'boolean' ? opts.strictNullHandling : defaults.strictNullHandling
|
|
14186
14198
|
};
|
|
14187
14199
|
};
|
|
@@ -32778,7 +32790,54 @@ const createRefractor = specPath => (value, options = {}) => refract(value, {
|
|
|
32778
32790
|
|
|
32779
32791
|
/***/ }),
|
|
32780
32792
|
|
|
32781
|
-
/***/
|
|
32793
|
+
/***/ 56959:
|
|
32794
|
+
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
|
|
32795
|
+
|
|
32796
|
+
"use strict";
|
|
32797
|
+
__webpack_require__.r(__webpack_exports__);
|
|
32798
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
32799
|
+
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
32800
|
+
/* harmony export */ });
|
|
32801
|
+
/* harmony import */ var _swagger_api_apidom_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(33501);
|
|
32802
|
+
/* harmony import */ var _swagger_api_apidom_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(44824);
|
|
32803
|
+
|
|
32804
|
+
class NormalizeStorage {
|
|
32805
|
+
internalStore;
|
|
32806
|
+
constructor(storageElement, storageField, storageSubField) {
|
|
32807
|
+
this.storageElement = storageElement;
|
|
32808
|
+
this.storageField = storageField;
|
|
32809
|
+
this.storageSubField = storageSubField;
|
|
32810
|
+
}
|
|
32811
|
+
get store() {
|
|
32812
|
+
if (!this.internalStore) {
|
|
32813
|
+
let rootStore = this.storageElement.get(this.storageField);
|
|
32814
|
+
if (!(0,_swagger_api_apidom_core__WEBPACK_IMPORTED_MODULE_0__.isObjectElement)(rootStore)) {
|
|
32815
|
+
rootStore = new _swagger_api_apidom_core__WEBPACK_IMPORTED_MODULE_1__.ObjectElement();
|
|
32816
|
+
this.storageElement.set(this.storageField, rootStore);
|
|
32817
|
+
}
|
|
32818
|
+
let store = rootStore.get(this.storageSubField);
|
|
32819
|
+
if (!(0,_swagger_api_apidom_core__WEBPACK_IMPORTED_MODULE_0__.isArrayElement)(store)) {
|
|
32820
|
+
store = new _swagger_api_apidom_core__WEBPACK_IMPORTED_MODULE_1__.ArrayElement();
|
|
32821
|
+
rootStore.set(this.storageSubField, store);
|
|
32822
|
+
}
|
|
32823
|
+
this.internalStore = store;
|
|
32824
|
+
}
|
|
32825
|
+
return this.internalStore;
|
|
32826
|
+
}
|
|
32827
|
+
append(pointer) {
|
|
32828
|
+
if (!this.includes(pointer)) {
|
|
32829
|
+
this.store.push(pointer);
|
|
32830
|
+
}
|
|
32831
|
+
}
|
|
32832
|
+
includes(pointer) {
|
|
32833
|
+
return this.store.includes(pointer);
|
|
32834
|
+
}
|
|
32835
|
+
}
|
|
32836
|
+
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (NormalizeStorage);
|
|
32837
|
+
|
|
32838
|
+
/***/ }),
|
|
32839
|
+
|
|
32840
|
+
/***/ 65389:
|
|
32782
32841
|
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
|
|
32783
32842
|
|
|
32784
32843
|
"use strict";
|
|
@@ -32786,7 +32845,9 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
32786
32845
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
32787
32846
|
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
32788
32847
|
/* harmony export */ });
|
|
32789
|
-
/* harmony import */ var
|
|
32848
|
+
/* harmony import */ var _swagger_api_apidom_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(87024);
|
|
32849
|
+
/* harmony import */ var _NormalizeStorage_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(56959);
|
|
32850
|
+
|
|
32790
32851
|
|
|
32791
32852
|
/**
|
|
32792
32853
|
* Override of Schema.example and Schema.examples field inside the Header Objects.
|
|
@@ -32799,13 +32860,27 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
32799
32860
|
*
|
|
32800
32861
|
* The example value SHALL override the example provided by the schema.
|
|
32801
32862
|
* Furthermore, if referencing a schema that contains an example, the examples value SHALL override the example provided by the schema.
|
|
32863
|
+
*
|
|
32864
|
+
* NOTE: this plugin is idempotent
|
|
32802
32865
|
*/
|
|
32803
|
-
|
|
32804
|
-
|
|
32805
|
-
|
|
32806
|
-
|
|
32866
|
+
const plugin = ({
|
|
32867
|
+
storageField = 'x-normalized'
|
|
32868
|
+
} = {}) => toolbox => {
|
|
32869
|
+
const {
|
|
32870
|
+
predicates,
|
|
32871
|
+
ancestorLineageToJSONPointer
|
|
32872
|
+
} = toolbox;
|
|
32873
|
+
let storage;
|
|
32807
32874
|
return {
|
|
32808
32875
|
visitor: {
|
|
32876
|
+
OpenApi3_1Element: {
|
|
32877
|
+
enter(element) {
|
|
32878
|
+
storage = new _NormalizeStorage_mjs__WEBPACK_IMPORTED_MODULE_0__["default"](element, storageField, 'header-examples');
|
|
32879
|
+
},
|
|
32880
|
+
leave() {
|
|
32881
|
+
storage = undefined;
|
|
32882
|
+
}
|
|
32883
|
+
},
|
|
32809
32884
|
HeaderElement: {
|
|
32810
32885
|
leave(headerElement, key, parent, path, ancestors) {
|
|
32811
32886
|
var _headerElement$schema, _headerElement$schema2;
|
|
@@ -32822,6 +32897,12 @@ const plugin = () => ({
|
|
|
32822
32897
|
if (typeof ((_headerElement$schema = headerElement.schema) === null || _headerElement$schema === void 0 ? void 0 : _headerElement$schema.example) === 'undefined' && typeof ((_headerElement$schema2 = headerElement.schema) === null || _headerElement$schema2 === void 0 ? void 0 : _headerElement$schema2.examples) === 'undefined') {
|
|
32823
32898
|
return;
|
|
32824
32899
|
}
|
|
32900
|
+
const headerJSONPointer = ancestorLineageToJSONPointer([...ancestors, parent, headerElement]);
|
|
32901
|
+
|
|
32902
|
+
// skip visiting this Header Object if it's already normalized
|
|
32903
|
+
if (storage.includes(headerJSONPointer)) {
|
|
32904
|
+
return;
|
|
32905
|
+
}
|
|
32825
32906
|
|
|
32826
32907
|
/**
|
|
32827
32908
|
* Header.examples and Schema.examples have preferences over the older
|
|
@@ -32830,13 +32911,15 @@ const plugin = () => ({
|
|
|
32830
32911
|
if (typeof headerElement.examples !== 'undefined' && predicates.isObjectElement(headerElement.examples)) {
|
|
32831
32912
|
// @ts-ignore
|
|
32832
32913
|
const examples = headerElement.examples.map(example => {
|
|
32833
|
-
return
|
|
32914
|
+
return _swagger_api_apidom_core__WEBPACK_IMPORTED_MODULE_1__.cloneDeep.safe(example.value);
|
|
32834
32915
|
});
|
|
32835
32916
|
if (typeof headerElement.schema.examples !== 'undefined') {
|
|
32836
32917
|
headerElement.schema.set('examples', examples);
|
|
32918
|
+
storage.append(headerJSONPointer);
|
|
32837
32919
|
}
|
|
32838
32920
|
if (typeof headerElement.schema.example !== 'undefined') {
|
|
32839
|
-
headerElement.schema.set('example', examples);
|
|
32921
|
+
headerElement.schema.set('example', examples[0]);
|
|
32922
|
+
storage.append(headerJSONPointer);
|
|
32840
32923
|
}
|
|
32841
32924
|
return;
|
|
32842
32925
|
}
|
|
@@ -32846,10 +32929,12 @@ const plugin = () => ({
|
|
|
32846
32929
|
*/
|
|
32847
32930
|
if (typeof headerElement.example !== 'undefined') {
|
|
32848
32931
|
if (typeof headerElement.schema.examples !== 'undefined') {
|
|
32849
|
-
headerElement.schema.set('examples', [(0,
|
|
32932
|
+
headerElement.schema.set('examples', [(0,_swagger_api_apidom_core__WEBPACK_IMPORTED_MODULE_1__.cloneDeep)(headerElement.example)]);
|
|
32933
|
+
storage.append(headerJSONPointer);
|
|
32850
32934
|
}
|
|
32851
32935
|
if (typeof headerElement.schema.example !== 'undefined') {
|
|
32852
|
-
headerElement.schema.set('example', (0,
|
|
32936
|
+
headerElement.schema.set('example', (0,_swagger_api_apidom_core__WEBPACK_IMPORTED_MODULE_1__.cloneDeep)(headerElement.example));
|
|
32937
|
+
storage.append(headerJSONPointer);
|
|
32853
32938
|
}
|
|
32854
32939
|
}
|
|
32855
32940
|
}
|
|
@@ -32857,8 +32942,6 @@ const plugin = () => ({
|
|
|
32857
32942
|
}
|
|
32858
32943
|
};
|
|
32859
32944
|
};
|
|
32860
|
-
/* eslint-enable */
|
|
32861
|
-
|
|
32862
32945
|
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (plugin);
|
|
32863
32946
|
|
|
32864
32947
|
/***/ }),
|
|
@@ -32871,11 +32954,13 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
32871
32954
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
32872
32955
|
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
32873
32956
|
/* harmony export */ });
|
|
32874
|
-
/* harmony import */ var
|
|
32875
|
-
/* harmony import */ var
|
|
32876
|
-
/* harmony import */ var
|
|
32877
|
-
/* harmony import */ var
|
|
32878
|
-
/* harmony import */ var
|
|
32957
|
+
/* harmony import */ var ramda__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(82974);
|
|
32958
|
+
/* harmony import */ var ramda__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(37012);
|
|
32959
|
+
/* harmony import */ var ramda__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(43022);
|
|
32960
|
+
/* harmony import */ var _swagger_api_apidom_core__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(9999);
|
|
32961
|
+
/* harmony import */ var _swagger_api_apidom_core__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(87024);
|
|
32962
|
+
/* harmony import */ var _normalize_header_examples_NormalizeStorage_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(56959);
|
|
32963
|
+
|
|
32879
32964
|
|
|
32880
32965
|
|
|
32881
32966
|
const removeSpaces = operationId => {
|
|
@@ -32911,25 +32996,33 @@ const normalizeOperationId = (operationId, path, method) => {
|
|
|
32911
32996
|
* This plugin also guarantees the uniqueness of all defined Operation.operationId fields,
|
|
32912
32997
|
* and make sure Link.operationId fields are pointing to correct and normalized Operation.operationId fields.
|
|
32913
32998
|
*
|
|
32999
|
+
* NOTE: this plugin is idempotent
|
|
32914
33000
|
*/
|
|
32915
|
-
/* eslint-disable no-param-reassign */
|
|
32916
33001
|
|
|
33002
|
+
/* eslint-disable no-param-reassign */
|
|
32917
33003
|
const plugin = ({
|
|
33004
|
+
storageField = 'x-normalized',
|
|
32918
33005
|
operationIdNormalizer = normalizeOperationId
|
|
32919
|
-
} = {}) =>
|
|
32920
|
-
|
|
32921
|
-
|
|
32922
|
-
|
|
32923
|
-
|
|
33006
|
+
} = {}) => toolbox => {
|
|
33007
|
+
const {
|
|
33008
|
+
predicates,
|
|
33009
|
+
ancestorLineageToJSONPointer,
|
|
33010
|
+
namespace
|
|
33011
|
+
} = toolbox;
|
|
33012
|
+
const pathTemplates = [];
|
|
32924
33013
|
const normalizedOperations = [];
|
|
32925
33014
|
const links = [];
|
|
33015
|
+
let storage;
|
|
32926
33016
|
return {
|
|
32927
33017
|
visitor: {
|
|
32928
33018
|
OpenApi3_1Element: {
|
|
33019
|
+
enter(element) {
|
|
33020
|
+
storage = new _normalize_header_examples_NormalizeStorage_mjs__WEBPACK_IMPORTED_MODULE_0__["default"](element, storageField, 'operation-ids');
|
|
33021
|
+
},
|
|
32929
33022
|
leave() {
|
|
32930
33023
|
// group normalized operations by normalized operationId
|
|
32931
|
-
const normalizedOperationGroups = (0,
|
|
32932
|
-
return (0,
|
|
33024
|
+
const normalizedOperationGroups = (0,ramda__WEBPACK_IMPORTED_MODULE_1__["default"])(operationElement => {
|
|
33025
|
+
return (0,_swagger_api_apidom_core__WEBPACK_IMPORTED_MODULE_2__["default"])(operationElement.operationId);
|
|
32933
33026
|
}, normalizedOperations);
|
|
32934
33027
|
|
|
32935
33028
|
// append incremental numerical suffixes to identical operationIds
|
|
@@ -32946,15 +33039,15 @@ const plugin = ({
|
|
|
32946
33039
|
// rectify possibly broken Link.operationId fields
|
|
32947
33040
|
links.forEach(linkElement => {
|
|
32948
33041
|
if (typeof linkElement.operationId === 'undefined') return;
|
|
32949
|
-
const linkOperationId = String((0,
|
|
33042
|
+
const linkOperationId = String((0,_swagger_api_apidom_core__WEBPACK_IMPORTED_MODULE_2__["default"])(linkElement.operationId));
|
|
32950
33043
|
const operationElement = normalizedOperations.find(normalizedOperationElement => {
|
|
32951
|
-
const originalOperationId = (0,
|
|
33044
|
+
const originalOperationId = (0,_swagger_api_apidom_core__WEBPACK_IMPORTED_MODULE_2__["default"])(normalizedOperationElement.meta.get('originalOperationId'));
|
|
32952
33045
|
return originalOperationId === linkOperationId;
|
|
32953
33046
|
});
|
|
32954
33047
|
|
|
32955
33048
|
// Link Object doesn't need to be rectified
|
|
32956
33049
|
if (typeof operationElement === 'undefined') return;
|
|
32957
|
-
linkElement.operationId =
|
|
33050
|
+
linkElement.operationId = _swagger_api_apidom_core__WEBPACK_IMPORTED_MODULE_3__.cloneDeep.safe(operationElement.operationId);
|
|
32958
33051
|
linkElement.meta.set('originalOperationId', linkOperationId);
|
|
32959
33052
|
linkElement.set('__originalOperationId', linkOperationId);
|
|
32960
33053
|
});
|
|
@@ -32962,30 +33055,37 @@ const plugin = ({
|
|
|
32962
33055
|
// cleanup the references
|
|
32963
33056
|
normalizedOperations.length = 0;
|
|
32964
33057
|
links.length = 0;
|
|
33058
|
+
storage = undefined;
|
|
32965
33059
|
}
|
|
32966
33060
|
},
|
|
32967
33061
|
PathItemElement: {
|
|
32968
33062
|
enter(pathItemElement) {
|
|
32969
33063
|
// `path` meta may not be always available, e.g. in Callback Object or Components Object
|
|
32970
|
-
const
|
|
32971
|
-
|
|
33064
|
+
const pathTemplate = (0,ramda__WEBPACK_IMPORTED_MODULE_4__["default"])('path', (0,_swagger_api_apidom_core__WEBPACK_IMPORTED_MODULE_2__["default"])(pathItemElement.meta.get('path')));
|
|
33065
|
+
pathTemplates.push(pathTemplate);
|
|
32972
33066
|
},
|
|
32973
33067
|
leave() {
|
|
32974
|
-
|
|
33068
|
+
pathTemplates.pop();
|
|
32975
33069
|
}
|
|
32976
33070
|
},
|
|
32977
33071
|
OperationElement: {
|
|
32978
|
-
enter(operationElement) {
|
|
33072
|
+
enter(operationElement, key, parent, path, ancestors) {
|
|
32979
33073
|
// operationId field is undefined, needs no normalization
|
|
32980
33074
|
if (typeof operationElement.operationId === 'undefined') return;
|
|
33075
|
+
const operationJSONPointer = ancestorLineageToJSONPointer([...ancestors, parent, operationElement]);
|
|
33076
|
+
|
|
33077
|
+
// skip visiting this Operation Object if it's already normalized
|
|
33078
|
+
if (storage.includes(operationJSONPointer)) {
|
|
33079
|
+
return;
|
|
33080
|
+
}
|
|
32981
33081
|
|
|
32982
33082
|
// cast operationId to string type
|
|
32983
|
-
const originalOperationId = String((0,
|
|
33083
|
+
const originalOperationId = String((0,_swagger_api_apidom_core__WEBPACK_IMPORTED_MODULE_2__["default"])(operationElement.operationId));
|
|
32984
33084
|
// perform operationId normalization
|
|
32985
|
-
const
|
|
33085
|
+
const pathTemplate = (0,ramda__WEBPACK_IMPORTED_MODULE_5__["default"])(pathTemplates);
|
|
32986
33086
|
// `http-method` meta may not be always available, e.g. in Callback Object or Components Object
|
|
32987
|
-
const method = (0,
|
|
32988
|
-
const normalizedOperationId = operationIdNormalizer(originalOperationId,
|
|
33087
|
+
const method = (0,ramda__WEBPACK_IMPORTED_MODULE_4__["default"])('method', (0,_swagger_api_apidom_core__WEBPACK_IMPORTED_MODULE_2__["default"])(operationElement.meta.get('http-method')));
|
|
33088
|
+
const normalizedOperationId = operationIdNormalizer(originalOperationId, pathTemplate, method);
|
|
32989
33089
|
|
|
32990
33090
|
// normalization is not necessary
|
|
32991
33091
|
if (originalOperationId === normalizedOperationId) return;
|
|
@@ -32995,6 +33095,7 @@ const plugin = ({
|
|
|
32995
33095
|
operationElement.set('__originalOperationId', originalOperationId);
|
|
32996
33096
|
operationElement.meta.set('originalOperationId', originalOperationId);
|
|
32997
33097
|
normalizedOperations.push(operationElement);
|
|
33098
|
+
storage.append(operationJSONPointer);
|
|
32998
33099
|
}
|
|
32999
33100
|
},
|
|
33000
33101
|
LinkElement: {
|
|
@@ -33023,7 +33124,9 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
33023
33124
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
33024
33125
|
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
33025
33126
|
/* harmony export */ });
|
|
33026
|
-
/* harmony import */ var
|
|
33127
|
+
/* harmony import */ var _swagger_api_apidom_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(87024);
|
|
33128
|
+
/* harmony import */ var _normalize_header_examples_NormalizeStorage_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(56959);
|
|
33129
|
+
|
|
33027
33130
|
|
|
33028
33131
|
/**
|
|
33029
33132
|
* Override of Schema.example and Schema.examples field inside the Parameter Objects.
|
|
@@ -33036,13 +33139,27 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
33036
33139
|
*
|
|
33037
33140
|
* The example value SHALL override the example provided by the schema.
|
|
33038
33141
|
* Furthermore, if referencing a schema that contains an example, the examples value SHALL override the example provided by the schema.
|
|
33142
|
+
*
|
|
33143
|
+
* NOTE: this plugin is idempotent
|
|
33039
33144
|
*/
|
|
33040
|
-
|
|
33041
|
-
|
|
33042
|
-
|
|
33043
|
-
|
|
33145
|
+
const plugin = ({
|
|
33146
|
+
storageField = 'x-normalized'
|
|
33147
|
+
} = {}) => toolbox => {
|
|
33148
|
+
const {
|
|
33149
|
+
predicates,
|
|
33150
|
+
ancestorLineageToJSONPointer
|
|
33151
|
+
} = toolbox;
|
|
33152
|
+
let storage;
|
|
33044
33153
|
return {
|
|
33045
33154
|
visitor: {
|
|
33155
|
+
OpenApi3_1Element: {
|
|
33156
|
+
enter(element) {
|
|
33157
|
+
storage = new _normalize_header_examples_NormalizeStorage_mjs__WEBPACK_IMPORTED_MODULE_0__["default"](element, storageField, 'parameter-examples');
|
|
33158
|
+
},
|
|
33159
|
+
leave() {
|
|
33160
|
+
storage = undefined;
|
|
33161
|
+
}
|
|
33162
|
+
},
|
|
33046
33163
|
ParameterElement: {
|
|
33047
33164
|
leave(parameterElement, key, parent, path, ancestors) {
|
|
33048
33165
|
var _parameterElement$sch, _parameterElement$sch2;
|
|
@@ -33059,6 +33176,12 @@ const plugin = () => ({
|
|
|
33059
33176
|
if (typeof ((_parameterElement$sch = parameterElement.schema) === null || _parameterElement$sch === void 0 ? void 0 : _parameterElement$sch.example) === 'undefined' && typeof ((_parameterElement$sch2 = parameterElement.schema) === null || _parameterElement$sch2 === void 0 ? void 0 : _parameterElement$sch2.examples) === 'undefined') {
|
|
33060
33177
|
return;
|
|
33061
33178
|
}
|
|
33179
|
+
const parameterJSONPointer = ancestorLineageToJSONPointer([...ancestors, parent, parameterElement]);
|
|
33180
|
+
|
|
33181
|
+
// skip visiting this Parameter Object if it's already normalized
|
|
33182
|
+
if (storage.includes(parameterJSONPointer)) {
|
|
33183
|
+
return;
|
|
33184
|
+
}
|
|
33062
33185
|
|
|
33063
33186
|
/**
|
|
33064
33187
|
* Parameter.examples and Schema.examples have preferences over the older
|
|
@@ -33067,13 +33190,15 @@ const plugin = () => ({
|
|
|
33067
33190
|
if (typeof parameterElement.examples !== 'undefined' && predicates.isObjectElement(parameterElement.examples)) {
|
|
33068
33191
|
// @ts-ignore
|
|
33069
33192
|
const examples = parameterElement.examples.map(example => {
|
|
33070
|
-
return
|
|
33193
|
+
return _swagger_api_apidom_core__WEBPACK_IMPORTED_MODULE_1__.cloneDeep.safe(example.value);
|
|
33071
33194
|
});
|
|
33072
33195
|
if (typeof parameterElement.schema.examples !== 'undefined') {
|
|
33073
33196
|
parameterElement.schema.set('examples', examples);
|
|
33197
|
+
storage.append(parameterJSONPointer);
|
|
33074
33198
|
}
|
|
33075
33199
|
if (typeof parameterElement.schema.example !== 'undefined') {
|
|
33076
|
-
parameterElement.schema.set('example', examples);
|
|
33200
|
+
parameterElement.schema.set('example', examples[0]);
|
|
33201
|
+
storage.append(parameterJSONPointer);
|
|
33077
33202
|
}
|
|
33078
33203
|
return;
|
|
33079
33204
|
}
|
|
@@ -33083,10 +33208,12 @@ const plugin = () => ({
|
|
|
33083
33208
|
*/
|
|
33084
33209
|
if (typeof parameterElement.example !== 'undefined') {
|
|
33085
33210
|
if (typeof parameterElement.schema.examples !== 'undefined') {
|
|
33086
|
-
parameterElement.schema.set('examples', [(0,
|
|
33211
|
+
parameterElement.schema.set('examples', [(0,_swagger_api_apidom_core__WEBPACK_IMPORTED_MODULE_1__.cloneDeep)(parameterElement.example)]);
|
|
33212
|
+
storage.append(parameterJSONPointer);
|
|
33087
33213
|
}
|
|
33088
33214
|
if (typeof parameterElement.schema.example !== 'undefined') {
|
|
33089
|
-
parameterElement.schema.set('example', (0,
|
|
33215
|
+
parameterElement.schema.set('example', (0,_swagger_api_apidom_core__WEBPACK_IMPORTED_MODULE_1__.cloneDeep)(parameterElement.example));
|
|
33216
|
+
storage.append(parameterJSONPointer);
|
|
33090
33217
|
}
|
|
33091
33218
|
}
|
|
33092
33219
|
}
|
|
@@ -33094,8 +33221,6 @@ const plugin = () => ({
|
|
|
33094
33221
|
}
|
|
33095
33222
|
};
|
|
33096
33223
|
};
|
|
33097
|
-
/* eslint-enable */
|
|
33098
|
-
|
|
33099
33224
|
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (plugin);
|
|
33100
33225
|
|
|
33101
33226
|
/***/ }),
|
|
@@ -33108,11 +33233,13 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
33108
33233
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
33109
33234
|
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
33110
33235
|
/* harmony export */ });
|
|
33111
|
-
/* harmony import */ var
|
|
33112
|
-
/* harmony import */ var
|
|
33113
|
-
/* harmony import */ var
|
|
33236
|
+
/* harmony import */ var ramda__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(43022);
|
|
33237
|
+
/* harmony import */ var ramda__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(52220);
|
|
33238
|
+
/* harmony import */ var ramda__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(59307);
|
|
33114
33239
|
/* harmony import */ var _swagger_api_apidom_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(9999);
|
|
33115
|
-
/* harmony import */ var
|
|
33240
|
+
/* harmony import */ var _swagger_api_apidom_ns_openapi_3_0__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(58335);
|
|
33241
|
+
/* harmony import */ var _normalize_header_examples_NormalizeStorage_mjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(56959);
|
|
33242
|
+
|
|
33116
33243
|
|
|
33117
33244
|
|
|
33118
33245
|
|
|
@@ -33124,11 +33251,17 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
33124
33251
|
* A list of parameters that are applicable for this operation. If a parameter is already defined at the Path Item,
|
|
33125
33252
|
* the new definition will override it but can never remove it. The list MUST NOT include duplicated parameters.
|
|
33126
33253
|
* A unique parameter is defined by a combination of a name and location.
|
|
33254
|
+
*
|
|
33255
|
+
* NOTE: this plugin is idempotent
|
|
33127
33256
|
*/
|
|
33128
33257
|
/* eslint-disable no-param-reassign */
|
|
33129
|
-
const plugin = (
|
|
33130
|
-
|
|
33131
|
-
}) => {
|
|
33258
|
+
const plugin = ({
|
|
33259
|
+
storageField = 'x-normalized'
|
|
33260
|
+
} = {}) => toolbox => {
|
|
33261
|
+
const {
|
|
33262
|
+
predicates,
|
|
33263
|
+
ancestorLineageToJSONPointer
|
|
33264
|
+
} = toolbox;
|
|
33132
33265
|
/**
|
|
33133
33266
|
* Establishes identity between two Parameter Objects.
|
|
33134
33267
|
*
|
|
@@ -33144,8 +33277,17 @@ const plugin = () => ({
|
|
|
33144
33277
|
return (0,_swagger_api_apidom_core__WEBPACK_IMPORTED_MODULE_0__["default"])(parameter1.name) === (0,_swagger_api_apidom_core__WEBPACK_IMPORTED_MODULE_0__["default"])(parameter2.name) && (0,_swagger_api_apidom_core__WEBPACK_IMPORTED_MODULE_0__["default"])(parameter1.in) === (0,_swagger_api_apidom_core__WEBPACK_IMPORTED_MODULE_0__["default"])(parameter2.in);
|
|
33145
33278
|
};
|
|
33146
33279
|
const pathItemParameters = [];
|
|
33280
|
+
let storage;
|
|
33147
33281
|
return {
|
|
33148
33282
|
visitor: {
|
|
33283
|
+
OpenApi3_1Element: {
|
|
33284
|
+
enter(element) {
|
|
33285
|
+
storage = new _normalize_header_examples_NormalizeStorage_mjs__WEBPACK_IMPORTED_MODULE_1__["default"](element, storageField, 'parameters');
|
|
33286
|
+
},
|
|
33287
|
+
leave() {
|
|
33288
|
+
storage = undefined;
|
|
33289
|
+
}
|
|
33290
|
+
},
|
|
33149
33291
|
PathItemElement: {
|
|
33150
33292
|
enter(pathItemElement, key, parent, path, ancestors) {
|
|
33151
33293
|
// skip visiting this Path Item
|
|
@@ -33166,18 +33308,25 @@ const plugin = () => ({
|
|
|
33166
33308
|
}
|
|
33167
33309
|
},
|
|
33168
33310
|
OperationElement: {
|
|
33169
|
-
leave(operationElement) {
|
|
33170
|
-
const parentPathItemParameters = (0,
|
|
33311
|
+
leave(operationElement, key, parent, path, ancestors) {
|
|
33312
|
+
const parentPathItemParameters = (0,ramda__WEBPACK_IMPORTED_MODULE_2__["default"])(pathItemParameters);
|
|
33171
33313
|
|
|
33172
33314
|
// no Path Item Object parameters to inherit from
|
|
33173
33315
|
if (!Array.isArray(parentPathItemParameters) || parentPathItemParameters.length === 0) {
|
|
33174
33316
|
return;
|
|
33175
33317
|
}
|
|
33176
|
-
const
|
|
33318
|
+
const operationJSONPointer = ancestorLineageToJSONPointer([...ancestors, parent, operationElement]);
|
|
33319
|
+
|
|
33320
|
+
// skip visiting this Operation Object if it's already normalized
|
|
33321
|
+
if (storage.includes(operationJSONPointer)) {
|
|
33322
|
+
return;
|
|
33323
|
+
}
|
|
33324
|
+
const operationParameters = (0,ramda__WEBPACK_IMPORTED_MODULE_3__["default"])([], ['parameters', 'content'], operationElement);
|
|
33177
33325
|
|
|
33178
33326
|
// prefers the first item if two items compare equal based on the predicate
|
|
33179
|
-
const mergedParameters = (0,
|
|
33180
|
-
operationElement.parameters = new
|
|
33327
|
+
const mergedParameters = (0,ramda__WEBPACK_IMPORTED_MODULE_4__["default"])(parameterEquals, [...operationParameters, ...parentPathItemParameters]);
|
|
33328
|
+
operationElement.parameters = new _swagger_api_apidom_ns_openapi_3_0__WEBPACK_IMPORTED_MODULE_5__["default"](mergedParameters);
|
|
33329
|
+
storage.append(operationJSONPointer);
|
|
33181
33330
|
}
|
|
33182
33331
|
}
|
|
33183
33332
|
}
|
|
@@ -33197,7 +33346,9 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
33197
33346
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
33198
33347
|
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
33199
33348
|
/* harmony export */ });
|
|
33200
|
-
/* harmony import */ var
|
|
33349
|
+
/* harmony import */ var _swagger_api_apidom_ns_openapi_3_0__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(20673);
|
|
33350
|
+
/* harmony import */ var _normalize_header_examples_NormalizeStorage_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(56959);
|
|
33351
|
+
|
|
33201
33352
|
|
|
33202
33353
|
/**
|
|
33203
33354
|
* Override of Security Requirement Objects.
|
|
@@ -33208,22 +33359,30 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
33208
33359
|
* To remove a top-level security declaration, an empty array can be used.
|
|
33209
33360
|
* When a list of Security Requirement Objects is defined on the OpenAPI Object or Operation Object,
|
|
33210
33361
|
* only one of the Security Requirement Objects in the list needs to be satisfied to authorize the request.
|
|
33362
|
+
*
|
|
33363
|
+
* NOTE: this plugin is idempotent
|
|
33211
33364
|
*/
|
|
33212
|
-
|
|
33213
33365
|
/* eslint-disable no-param-reassign */
|
|
33214
|
-
const plugin = (
|
|
33215
|
-
|
|
33216
|
-
}) => {
|
|
33366
|
+
const plugin = ({
|
|
33367
|
+
storageField = 'x-normalized'
|
|
33368
|
+
} = {}) => toolbox => {
|
|
33369
|
+
const {
|
|
33370
|
+
predicates,
|
|
33371
|
+
ancestorLineageToJSONPointer
|
|
33372
|
+
} = toolbox;
|
|
33217
33373
|
let topLevelSecurity;
|
|
33374
|
+
let storage;
|
|
33218
33375
|
return {
|
|
33219
33376
|
visitor: {
|
|
33220
33377
|
OpenApi3_1Element: {
|
|
33221
33378
|
enter(openapiElement) {
|
|
33379
|
+
storage = new _normalize_header_examples_NormalizeStorage_mjs__WEBPACK_IMPORTED_MODULE_0__["default"](openapiElement, storageField, 'security-requirements');
|
|
33222
33380
|
if (predicates.isArrayElement(openapiElement.security)) {
|
|
33223
33381
|
topLevelSecurity = openapiElement.security;
|
|
33224
33382
|
}
|
|
33225
33383
|
},
|
|
33226
33384
|
leave() {
|
|
33385
|
+
storage = undefined;
|
|
33227
33386
|
topLevelSecurity = undefined;
|
|
33228
33387
|
}
|
|
33229
33388
|
},
|
|
@@ -33233,113 +33392,18 @@ const plugin = () => ({
|
|
|
33233
33392
|
if (ancestors.some(predicates.isComponentsElement)) {
|
|
33234
33393
|
return;
|
|
33235
33394
|
}
|
|
33395
|
+
const operationJSONPointer = ancestorLineageToJSONPointer([...ancestors, parent, operationElement]);
|
|
33396
|
+
|
|
33397
|
+
// skip visiting this Operation Object if it's already normalized
|
|
33398
|
+
if (storage.includes(operationJSONPointer)) {
|
|
33399
|
+
return;
|
|
33400
|
+
}
|
|
33236
33401
|
const missingOperationLevelSecurity = typeof operationElement.security === 'undefined';
|
|
33237
33402
|
const hasTopLevelSecurity = typeof topLevelSecurity !== 'undefined';
|
|
33238
33403
|
if (missingOperationLevelSecurity && hasTopLevelSecurity) {
|
|
33239
33404
|
var _topLevelSecurity;
|
|
33240
|
-
operationElement.security = new
|
|
33241
|
-
|
|
33242
|
-
}
|
|
33243
|
-
}
|
|
33244
|
-
}
|
|
33245
|
-
};
|
|
33246
|
-
};
|
|
33247
|
-
/* eslint-enable */
|
|
33248
|
-
|
|
33249
|
-
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (plugin);
|
|
33250
|
-
|
|
33251
|
-
/***/ }),
|
|
33252
|
-
|
|
33253
|
-
/***/ 69037:
|
|
33254
|
-
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
|
|
33255
|
-
|
|
33256
|
-
"use strict";
|
|
33257
|
-
__webpack_require__.r(__webpack_exports__);
|
|
33258
|
-
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
33259
|
-
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
33260
|
-
/* harmony export */ });
|
|
33261
|
-
/* harmony import */ var _swagger_api_apidom_ns_openapi_3_0__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(87204);
|
|
33262
|
-
/* harmony import */ var _swagger_api_apidom_ns_openapi_3_0__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(60748);
|
|
33263
|
-
/* harmony import */ var _swagger_api_apidom_ns_openapi_3_0__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(84253);
|
|
33264
|
-
|
|
33265
|
-
/**
|
|
33266
|
-
* Override of Server Objects.
|
|
33267
|
-
*
|
|
33268
|
-
* List of Server Objects can be defined in OpenAPI 3.1 on multiple levels:
|
|
33269
|
-
*
|
|
33270
|
-
* - OpenAPI.servers
|
|
33271
|
-
* - PathItem.servers
|
|
33272
|
-
* - Operation.servers
|
|
33273
|
-
*
|
|
33274
|
-
* If an alternative server object is specified at the Path Item Object level, it will override OpenAPI.servers.
|
|
33275
|
-
* If an alternative server object is specified at the Operation Object level, it will override PathItem.servers and OpenAPI.servers respectively.
|
|
33276
|
-
*/
|
|
33277
|
-
|
|
33278
|
-
/* eslint-disable no-param-reassign */
|
|
33279
|
-
const plugin = () => ({
|
|
33280
|
-
predicates,
|
|
33281
|
-
namespace
|
|
33282
|
-
}) => {
|
|
33283
|
-
return {
|
|
33284
|
-
visitor: {
|
|
33285
|
-
OpenApi3_1Element(openapiElement) {
|
|
33286
|
-
const isServersUndefined = typeof openapiElement.servers === 'undefined';
|
|
33287
|
-
const isServersArrayElement = predicates.isArrayElement(openapiElement.servers);
|
|
33288
|
-
const isServersEmpty = isServersArrayElement && openapiElement.servers.length === 0;
|
|
33289
|
-
// @ts-ignore
|
|
33290
|
-
const defaultServer = namespace.elements.Server.refract({
|
|
33291
|
-
url: '/'
|
|
33292
|
-
});
|
|
33293
|
-
if (isServersUndefined || !isServersArrayElement) {
|
|
33294
|
-
openapiElement.servers = new _swagger_api_apidom_ns_openapi_3_0__WEBPACK_IMPORTED_MODULE_0__["default"]([defaultServer]);
|
|
33295
|
-
} else if (isServersArrayElement && isServersEmpty) {
|
|
33296
|
-
openapiElement.servers.push(defaultServer);
|
|
33297
|
-
}
|
|
33298
|
-
},
|
|
33299
|
-
PathItemElement(pathItemElement, key, parent, path, ancestors) {
|
|
33300
|
-
// skip visiting this Path Item
|
|
33301
|
-
if (ancestors.some(predicates.isComponentsElement)) return;
|
|
33302
|
-
if (!ancestors.some(predicates.isOpenApi3_1Element)) return;
|
|
33303
|
-
const parentOpenapiElement = ancestors.find(predicates.isOpenApi3_1Element);
|
|
33304
|
-
const isServersUndefined = typeof pathItemElement.servers === 'undefined';
|
|
33305
|
-
const isServersArrayElement = predicates.isArrayElement(pathItemElement.servers);
|
|
33306
|
-
const isServersEmpty = isServersArrayElement && pathItemElement.servers.length === 0;
|
|
33307
|
-
|
|
33308
|
-
// duplicate OpenAPI.servers into this Path Item object
|
|
33309
|
-
if (predicates.isOpenApi3_1Element(parentOpenapiElement)) {
|
|
33310
|
-
var _parentOpenapiElement;
|
|
33311
|
-
const openapiServersContent = (_parentOpenapiElement = parentOpenapiElement.servers) === null || _parentOpenapiElement === void 0 ? void 0 : _parentOpenapiElement.content;
|
|
33312
|
-
const openapiServers = openapiServersContent !== null && openapiServersContent !== void 0 ? openapiServersContent : [];
|
|
33313
|
-
if (isServersUndefined || !isServersArrayElement) {
|
|
33314
|
-
pathItemElement.servers = new _swagger_api_apidom_ns_openapi_3_0__WEBPACK_IMPORTED_MODULE_1__["default"](openapiServers);
|
|
33315
|
-
} else if (isServersArrayElement && isServersEmpty) {
|
|
33316
|
-
openapiServers.forEach(server => {
|
|
33317
|
-
pathItemElement.servers.push(server);
|
|
33318
|
-
});
|
|
33319
|
-
}
|
|
33320
|
-
}
|
|
33321
|
-
},
|
|
33322
|
-
OperationElement(operationElement, key, parent, path, ancestors) {
|
|
33323
|
-
// skip visiting this Operation
|
|
33324
|
-
if (ancestors.some(predicates.isComponentsElement)) return;
|
|
33325
|
-
if (!ancestors.some(predicates.isOpenApi3_1Element)) return;
|
|
33326
|
-
|
|
33327
|
-
// @TODO(vladimir.gorej@gmail.com): can be replaced by Array.prototype.findLast in future
|
|
33328
|
-
const parentPathItemElement = [...ancestors].reverse().find(predicates.isPathItemElement);
|
|
33329
|
-
const isServersUndefined = typeof operationElement.servers === 'undefined';
|
|
33330
|
-
const isServersArrayElement = predicates.isArrayElement(operationElement.servers);
|
|
33331
|
-
const isServersEmpty = isServersArrayElement && operationElement.servers.length === 0;
|
|
33332
|
-
if (predicates.isPathItemElement(parentPathItemElement)) {
|
|
33333
|
-
var _parentPathItemElemen;
|
|
33334
|
-
const pathItemServersContent = (_parentPathItemElemen = parentPathItemElement.servers) === null || _parentPathItemElemen === void 0 ? void 0 : _parentPathItemElemen.content;
|
|
33335
|
-
const pathItemServers = pathItemServersContent !== null && pathItemServersContent !== void 0 ? pathItemServersContent : [];
|
|
33336
|
-
if (isServersUndefined || !isServersArrayElement) {
|
|
33337
|
-
// duplicate parent PathItem.servers into this Operation object
|
|
33338
|
-
operationElement.servers = new _swagger_api_apidom_ns_openapi_3_0__WEBPACK_IMPORTED_MODULE_2__["default"](pathItemServers);
|
|
33339
|
-
} else if (isServersArrayElement && isServersEmpty) {
|
|
33340
|
-
pathItemServers.forEach(server => {
|
|
33341
|
-
operationElement.servers.push(server);
|
|
33342
|
-
});
|
|
33405
|
+
operationElement.security = new _swagger_api_apidom_ns_openapi_3_0__WEBPACK_IMPORTED_MODULE_1__["default"]((_topLevelSecurity = topLevelSecurity) === null || _topLevelSecurity === void 0 ? void 0 : _topLevelSecurity.content);
|
|
33406
|
+
storage.append(operationJSONPointer);
|
|
33343
33407
|
}
|
|
33344
33408
|
}
|
|
33345
33409
|
}
|
|
@@ -34149,30 +34213,55 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
34149
34213
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
34150
34214
|
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
34151
34215
|
/* harmony export */ });
|
|
34152
|
-
/* harmony import */ var _swagger_api_apidom_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
|
|
34153
|
-
/* harmony import */ var
|
|
34154
|
-
/* harmony import */ var
|
|
34155
|
-
/* harmony import */ var
|
|
34156
|
-
/* harmony import */ var
|
|
34216
|
+
/* harmony import */ var _swagger_api_apidom_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(33501);
|
|
34217
|
+
/* harmony import */ var _swagger_api_apidom_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(9999);
|
|
34218
|
+
/* harmony import */ var _swagger_api_apidom_core__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(1667);
|
|
34219
|
+
/* harmony import */ var _swagger_api_apidom_json_pointer__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(60672);
|
|
34220
|
+
/* harmony import */ var _swagger_api_apidom_ns_openapi_3_0__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(85536);
|
|
34221
|
+
/* harmony import */ var _predicates_mjs__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(70281);
|
|
34222
|
+
/* harmony import */ var _namespace_mjs__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(41544);
|
|
34223
|
+
|
|
34157
34224
|
|
|
34158
34225
|
|
|
34159
34226
|
|
|
34160
34227
|
|
|
34228
|
+
/**
|
|
34229
|
+
* Translates visitor ancestor lineage to a JSON Pointer tokens.
|
|
34230
|
+
* Ancestor lineage is constructed of following visitor method arguments:
|
|
34231
|
+
*
|
|
34232
|
+
* - ancestors
|
|
34233
|
+
* - parent
|
|
34234
|
+
* - element
|
|
34235
|
+
*/
|
|
34236
|
+
const ancestorLineageToJSONPointer = elementPath => {
|
|
34237
|
+
const jsonPointerTokens = elementPath.reduce((path, element, index) => {
|
|
34238
|
+
if ((0,_swagger_api_apidom_core__WEBPACK_IMPORTED_MODULE_0__.isMemberElement)(element)) {
|
|
34239
|
+
const token = String((0,_swagger_api_apidom_core__WEBPACK_IMPORTED_MODULE_1__["default"])(element.key));
|
|
34240
|
+
path.push(token);
|
|
34241
|
+
} else if ((0,_swagger_api_apidom_core__WEBPACK_IMPORTED_MODULE_0__.isArrayElement)(elementPath[index - 2])) {
|
|
34242
|
+
const token = String(elementPath[index - 2].content.indexOf(element));
|
|
34243
|
+
path.push(token);
|
|
34244
|
+
}
|
|
34245
|
+
return path;
|
|
34246
|
+
}, []);
|
|
34247
|
+
return (0,_swagger_api_apidom_json_pointer__WEBPACK_IMPORTED_MODULE_2__["default"])(jsonPointerTokens);
|
|
34248
|
+
};
|
|
34161
34249
|
const createToolbox = () => {
|
|
34162
|
-
const namespace = (0,
|
|
34250
|
+
const namespace = (0,_swagger_api_apidom_core__WEBPACK_IMPORTED_MODULE_3__.createNamespace)(_namespace_mjs__WEBPACK_IMPORTED_MODULE_4__["default"]);
|
|
34163
34251
|
const predicates = {
|
|
34164
|
-
...
|
|
34165
|
-
isElement:
|
|
34166
|
-
isStringElement:
|
|
34167
|
-
isArrayElement:
|
|
34168
|
-
isObjectElement:
|
|
34169
|
-
isMemberElement:
|
|
34170
|
-
isServersElement:
|
|
34171
|
-
includesClasses:
|
|
34172
|
-
hasElementSourceMap:
|
|
34252
|
+
..._predicates_mjs__WEBPACK_IMPORTED_MODULE_5__,
|
|
34253
|
+
isElement: _swagger_api_apidom_core__WEBPACK_IMPORTED_MODULE_0__.isElement,
|
|
34254
|
+
isStringElement: _swagger_api_apidom_core__WEBPACK_IMPORTED_MODULE_0__.isStringElement,
|
|
34255
|
+
isArrayElement: _swagger_api_apidom_core__WEBPACK_IMPORTED_MODULE_0__.isArrayElement,
|
|
34256
|
+
isObjectElement: _swagger_api_apidom_core__WEBPACK_IMPORTED_MODULE_0__.isObjectElement,
|
|
34257
|
+
isMemberElement: _swagger_api_apidom_core__WEBPACK_IMPORTED_MODULE_0__.isMemberElement,
|
|
34258
|
+
isServersElement: _swagger_api_apidom_ns_openapi_3_0__WEBPACK_IMPORTED_MODULE_6__.isServersElement,
|
|
34259
|
+
includesClasses: _swagger_api_apidom_core__WEBPACK_IMPORTED_MODULE_0__.includesClasses,
|
|
34260
|
+
hasElementSourceMap: _swagger_api_apidom_core__WEBPACK_IMPORTED_MODULE_0__.hasElementSourceMap
|
|
34173
34261
|
};
|
|
34174
34262
|
return {
|
|
34175
34263
|
predicates,
|
|
34264
|
+
ancestorLineageToJSONPointer,
|
|
34176
34265
|
namespace
|
|
34177
34266
|
};
|
|
34178
34267
|
};
|
|
@@ -41071,52 +41160,6 @@ var PatchError = /** @class */ (function (_super) {
|
|
|
41071
41160
|
|
|
41072
41161
|
|
|
41073
41162
|
|
|
41074
|
-
/***/ }),
|
|
41075
|
-
|
|
41076
|
-
/***/ 58270:
|
|
41077
|
-
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
|
|
41078
|
-
|
|
41079
|
-
"use strict";
|
|
41080
|
-
__webpack_require__.r(__webpack_exports__);
|
|
41081
|
-
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
41082
|
-
/* harmony export */ isPlainObject: () => (/* binding */ isPlainObject)
|
|
41083
|
-
/* harmony export */ });
|
|
41084
|
-
/*!
|
|
41085
|
-
* is-plain-object <https://github.com/jonschlinkert/is-plain-object>
|
|
41086
|
-
*
|
|
41087
|
-
* Copyright (c) 2014-2017, Jon Schlinkert.
|
|
41088
|
-
* Released under the MIT License.
|
|
41089
|
-
*/
|
|
41090
|
-
|
|
41091
|
-
function isObject(o) {
|
|
41092
|
-
return Object.prototype.toString.call(o) === '[object Object]';
|
|
41093
|
-
}
|
|
41094
|
-
|
|
41095
|
-
function isPlainObject(o) {
|
|
41096
|
-
var ctor,prot;
|
|
41097
|
-
|
|
41098
|
-
if (isObject(o) === false) return false;
|
|
41099
|
-
|
|
41100
|
-
// If has modified constructor
|
|
41101
|
-
ctor = o.constructor;
|
|
41102
|
-
if (ctor === undefined) return true;
|
|
41103
|
-
|
|
41104
|
-
// If has modified prototype
|
|
41105
|
-
prot = ctor.prototype;
|
|
41106
|
-
if (isObject(prot) === false) return false;
|
|
41107
|
-
|
|
41108
|
-
// If constructor does not have an Object-specific method
|
|
41109
|
-
if (prot.hasOwnProperty('isPrototypeOf') === false) {
|
|
41110
|
-
return false;
|
|
41111
|
-
}
|
|
41112
|
-
|
|
41113
|
-
// Most likely a plain Object
|
|
41114
|
-
return true;
|
|
41115
|
-
}
|
|
41116
|
-
|
|
41117
|
-
|
|
41118
|
-
|
|
41119
|
-
|
|
41120
41163
|
/***/ }),
|
|
41121
41164
|
|
|
41122
41165
|
/***/ 20382:
|
|
@@ -45027,15 +45070,15 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
45027
45070
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
45028
45071
|
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
45029
45072
|
/* harmony export */ });
|
|
45030
|
-
/* harmony import */ var
|
|
45073
|
+
/* harmony import */ var apg_lite__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(16646);
|
|
45031
45074
|
|
|
45032
45075
|
const fragmentMarker = (state, chars, phraseIndex, phraseLength, data) => {
|
|
45033
|
-
if (state ===
|
|
45034
|
-
data.push(['fragment-marker',
|
|
45035
|
-
} else if (state ===
|
|
45076
|
+
if (state === apg_lite__WEBPACK_IMPORTED_MODULE_0__.identifiers.SEM_PRE) {
|
|
45077
|
+
data.push(['fragment-marker', apg_lite__WEBPACK_IMPORTED_MODULE_0__.utilities.charsToString(chars, phraseIndex, phraseLength)]);
|
|
45078
|
+
} else if (state === apg_lite__WEBPACK_IMPORTED_MODULE_0__.identifiers.SEM_POST) {
|
|
45036
45079
|
/* not used in this example */
|
|
45037
45080
|
}
|
|
45038
|
-
return
|
|
45081
|
+
return apg_lite__WEBPACK_IMPORTED_MODULE_0__.identifiers.SEM_OK;
|
|
45039
45082
|
};
|
|
45040
45083
|
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (fragmentMarker);
|
|
45041
45084
|
|
|
@@ -45049,15 +45092,15 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
45049
45092
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
45050
45093
|
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
45051
45094
|
/* harmony export */ });
|
|
45052
|
-
/* harmony import */ var
|
|
45095
|
+
/* harmony import */ var apg_lite__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(16646);
|
|
45053
45096
|
|
|
45054
45097
|
const fragment = (state, chars, phraseIndex, phraseLength, data) => {
|
|
45055
|
-
if (state ===
|
|
45056
|
-
data.push(['fragment',
|
|
45057
|
-
} else if (state ===
|
|
45098
|
+
if (state === apg_lite__WEBPACK_IMPORTED_MODULE_0__.identifiers.SEM_PRE) {
|
|
45099
|
+
data.push(['fragment', apg_lite__WEBPACK_IMPORTED_MODULE_0__.utilities.charsToString(chars, phraseIndex, phraseLength)]);
|
|
45100
|
+
} else if (state === apg_lite__WEBPACK_IMPORTED_MODULE_0__.identifiers.SEM_POST) {
|
|
45058
45101
|
/* not used in this example */
|
|
45059
45102
|
}
|
|
45060
|
-
return
|
|
45103
|
+
return apg_lite__WEBPACK_IMPORTED_MODULE_0__.identifiers.SEM_OK;
|
|
45061
45104
|
};
|
|
45062
45105
|
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (fragment);
|
|
45063
45106
|
|
|
@@ -45071,15 +45114,15 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
45071
45114
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
45072
45115
|
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
45073
45116
|
/* harmony export */ });
|
|
45074
|
-
/* harmony import */ var
|
|
45117
|
+
/* harmony import */ var apg_lite__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(16646);
|
|
45075
45118
|
|
|
45076
45119
|
const pathLiteral = (state, chars, phraseIndex, phraseLength, data) => {
|
|
45077
|
-
if (state ===
|
|
45078
|
-
data.push(['path-literal',
|
|
45079
|
-
} else if (state ===
|
|
45120
|
+
if (state === apg_lite__WEBPACK_IMPORTED_MODULE_0__.identifiers.SEM_PRE) {
|
|
45121
|
+
data.push(['path-literal', apg_lite__WEBPACK_IMPORTED_MODULE_0__.utilities.charsToString(chars, phraseIndex, phraseLength)]);
|
|
45122
|
+
} else if (state === apg_lite__WEBPACK_IMPORTED_MODULE_0__.identifiers.SEM_POST) {
|
|
45080
45123
|
/* not used in this example */
|
|
45081
45124
|
}
|
|
45082
|
-
return
|
|
45125
|
+
return apg_lite__WEBPACK_IMPORTED_MODULE_0__.identifiers.SEM_OK;
|
|
45083
45126
|
};
|
|
45084
45127
|
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (pathLiteral);
|
|
45085
45128
|
|
|
@@ -45093,16 +45136,16 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
45093
45136
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
45094
45137
|
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
45095
45138
|
/* harmony export */ });
|
|
45096
|
-
/* harmony import */ var
|
|
45139
|
+
/* harmony import */ var apg_lite__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(16646);
|
|
45097
45140
|
|
|
45098
45141
|
const pathTemplate = (state, chars, phraseIndex, phraseLength, data) => {
|
|
45099
|
-
if (state ===
|
|
45142
|
+
if (state === apg_lite__WEBPACK_IMPORTED_MODULE_0__.identifiers.SEM_PRE) {
|
|
45100
45143
|
if (Array.isArray(data) === false) {
|
|
45101
45144
|
throw new Error("parser's user data must be an array");
|
|
45102
45145
|
}
|
|
45103
|
-
data.push(['path-template',
|
|
45146
|
+
data.push(['path-template', apg_lite__WEBPACK_IMPORTED_MODULE_0__.utilities.charsToString(chars, phraseIndex, phraseLength)]);
|
|
45104
45147
|
}
|
|
45105
|
-
return
|
|
45148
|
+
return apg_lite__WEBPACK_IMPORTED_MODULE_0__.identifiers.SEM_OK;
|
|
45106
45149
|
};
|
|
45107
45150
|
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (pathTemplate);
|
|
45108
45151
|
|
|
@@ -45116,15 +45159,15 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
45116
45159
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
45117
45160
|
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
45118
45161
|
/* harmony export */ });
|
|
45119
|
-
/* harmony import */ var
|
|
45162
|
+
/* harmony import */ var apg_lite__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(16646);
|
|
45120
45163
|
|
|
45121
45164
|
const path = (state, chars, phraseIndex, phraseLength, data) => {
|
|
45122
|
-
if (state ===
|
|
45123
|
-
data.push(['path',
|
|
45124
|
-
} else if (state ===
|
|
45165
|
+
if (state === apg_lite__WEBPACK_IMPORTED_MODULE_0__.identifiers.SEM_PRE) {
|
|
45166
|
+
data.push(['path', apg_lite__WEBPACK_IMPORTED_MODULE_0__.utilities.charsToString(chars, phraseIndex, phraseLength)]);
|
|
45167
|
+
} else if (state === apg_lite__WEBPACK_IMPORTED_MODULE_0__.identifiers.SEM_POST) {
|
|
45125
45168
|
/* not used in this example */
|
|
45126
45169
|
}
|
|
45127
|
-
return
|
|
45170
|
+
return apg_lite__WEBPACK_IMPORTED_MODULE_0__.identifiers.SEM_OK;
|
|
45128
45171
|
};
|
|
45129
45172
|
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (path);
|
|
45130
45173
|
|
|
@@ -45138,15 +45181,15 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
45138
45181
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
45139
45182
|
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
45140
45183
|
/* harmony export */ });
|
|
45141
|
-
/* harmony import */ var
|
|
45184
|
+
/* harmony import */ var apg_lite__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(16646);
|
|
45142
45185
|
|
|
45143
45186
|
const queryMarker = (state, chars, phraseIndex, phraseLength, data) => {
|
|
45144
|
-
if (state ===
|
|
45145
|
-
data.push(['query-marker',
|
|
45146
|
-
} else if (state ===
|
|
45187
|
+
if (state === apg_lite__WEBPACK_IMPORTED_MODULE_0__.identifiers.SEM_PRE) {
|
|
45188
|
+
data.push(['query-marker', apg_lite__WEBPACK_IMPORTED_MODULE_0__.utilities.charsToString(chars, phraseIndex, phraseLength)]);
|
|
45189
|
+
} else if (state === apg_lite__WEBPACK_IMPORTED_MODULE_0__.identifiers.SEM_POST) {
|
|
45147
45190
|
/* not used in this example */
|
|
45148
45191
|
}
|
|
45149
|
-
return
|
|
45192
|
+
return apg_lite__WEBPACK_IMPORTED_MODULE_0__.identifiers.SEM_OK;
|
|
45150
45193
|
};
|
|
45151
45194
|
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (queryMarker);
|
|
45152
45195
|
|
|
@@ -45160,15 +45203,15 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
45160
45203
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
45161
45204
|
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
45162
45205
|
/* harmony export */ });
|
|
45163
|
-
/* harmony import */ var
|
|
45206
|
+
/* harmony import */ var apg_lite__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(16646);
|
|
45164
45207
|
|
|
45165
45208
|
const query = (state, chars, phraseIndex, phraseLength, data) => {
|
|
45166
|
-
if (state ===
|
|
45167
|
-
data.push(['query',
|
|
45168
|
-
} else if (state ===
|
|
45209
|
+
if (state === apg_lite__WEBPACK_IMPORTED_MODULE_0__.identifiers.SEM_PRE) {
|
|
45210
|
+
data.push(['query', apg_lite__WEBPACK_IMPORTED_MODULE_0__.utilities.charsToString(chars, phraseIndex, phraseLength)]);
|
|
45211
|
+
} else if (state === apg_lite__WEBPACK_IMPORTED_MODULE_0__.identifiers.SEM_POST) {
|
|
45169
45212
|
/* not used in this example */
|
|
45170
45213
|
}
|
|
45171
|
-
return
|
|
45214
|
+
return apg_lite__WEBPACK_IMPORTED_MODULE_0__.identifiers.SEM_OK;
|
|
45172
45215
|
};
|
|
45173
45216
|
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (query);
|
|
45174
45217
|
|
|
@@ -45182,15 +45225,15 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
45182
45225
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
45183
45226
|
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
45184
45227
|
/* harmony export */ });
|
|
45185
|
-
/* harmony import */ var
|
|
45228
|
+
/* harmony import */ var apg_lite__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(16646);
|
|
45186
45229
|
|
|
45187
45230
|
const slash = (state, chars, phraseIndex, phraseLength, data) => {
|
|
45188
|
-
if (state ===
|
|
45189
|
-
data.push(['slash',
|
|
45190
|
-
} else if (state ===
|
|
45231
|
+
if (state === apg_lite__WEBPACK_IMPORTED_MODULE_0__.identifiers.SEM_PRE) {
|
|
45232
|
+
data.push(['slash', apg_lite__WEBPACK_IMPORTED_MODULE_0__.utilities.charsToString(chars, phraseIndex, phraseLength)]);
|
|
45233
|
+
} else if (state === apg_lite__WEBPACK_IMPORTED_MODULE_0__.identifiers.SEM_POST) {
|
|
45191
45234
|
/* not used in this example */
|
|
45192
45235
|
}
|
|
45193
|
-
return
|
|
45236
|
+
return apg_lite__WEBPACK_IMPORTED_MODULE_0__.identifiers.SEM_OK;
|
|
45194
45237
|
};
|
|
45195
45238
|
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (slash);
|
|
45196
45239
|
|
|
@@ -45204,15 +45247,15 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
45204
45247
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
45205
45248
|
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
45206
45249
|
/* harmony export */ });
|
|
45207
|
-
/* harmony import */ var
|
|
45250
|
+
/* harmony import */ var apg_lite__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(16646);
|
|
45208
45251
|
|
|
45209
45252
|
const templateExpressionParamName = (state, chars, phraseIndex, phraseLength, data) => {
|
|
45210
|
-
if (state ===
|
|
45211
|
-
data.push(['template-expression-param-name',
|
|
45212
|
-
} else if (state ===
|
|
45253
|
+
if (state === apg_lite__WEBPACK_IMPORTED_MODULE_0__.identifiers.SEM_PRE) {
|
|
45254
|
+
data.push(['template-expression-param-name', apg_lite__WEBPACK_IMPORTED_MODULE_0__.utilities.charsToString(chars, phraseIndex, phraseLength)]);
|
|
45255
|
+
} else if (state === apg_lite__WEBPACK_IMPORTED_MODULE_0__.identifiers.SEM_POST) {
|
|
45213
45256
|
/* not used in this example */
|
|
45214
45257
|
}
|
|
45215
|
-
return
|
|
45258
|
+
return apg_lite__WEBPACK_IMPORTED_MODULE_0__.identifiers.SEM_OK;
|
|
45216
45259
|
};
|
|
45217
45260
|
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (templateExpressionParamName);
|
|
45218
45261
|
|
|
@@ -45226,15 +45269,15 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
45226
45269
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
45227
45270
|
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
45228
45271
|
/* harmony export */ });
|
|
45229
|
-
/* harmony import */ var
|
|
45272
|
+
/* harmony import */ var apg_lite__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(16646);
|
|
45230
45273
|
|
|
45231
45274
|
const templateExpression = (state, chars, phraseIndex, phraseLength, data) => {
|
|
45232
|
-
if (state ===
|
|
45233
|
-
data.push(['template-expression',
|
|
45234
|
-
} else if (state ===
|
|
45275
|
+
if (state === apg_lite__WEBPACK_IMPORTED_MODULE_0__.identifiers.SEM_PRE) {
|
|
45276
|
+
data.push(['template-expression', apg_lite__WEBPACK_IMPORTED_MODULE_0__.utilities.charsToString(chars, phraseIndex, phraseLength)]);
|
|
45277
|
+
} else if (state === apg_lite__WEBPACK_IMPORTED_MODULE_0__.identifiers.SEM_POST) {
|
|
45235
45278
|
/* not used in this example */
|
|
45236
45279
|
}
|
|
45237
|
-
return
|
|
45280
|
+
return apg_lite__WEBPACK_IMPORTED_MODULE_0__.identifiers.SEM_OK;
|
|
45238
45281
|
};
|
|
45239
45282
|
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (templateExpression);
|
|
45240
45283
|
|
|
@@ -45248,7 +45291,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
45248
45291
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
45249
45292
|
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
45250
45293
|
/* harmony export */ });
|
|
45251
|
-
/* harmony import */ var
|
|
45294
|
+
/* harmony import */ var apg_lite__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(16646);
|
|
45252
45295
|
/* harmony import */ var _path_templating_mjs__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(56167);
|
|
45253
45296
|
/* harmony import */ var _callbacks_slash_mjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(31696);
|
|
45254
45297
|
/* harmony import */ var _callbacks_path_template_mjs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(33659);
|
|
@@ -45273,9 +45316,9 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
45273
45316
|
|
|
45274
45317
|
|
|
45275
45318
|
const grammar = new _path_templating_mjs__WEBPACK_IMPORTED_MODULE_11__["default"]();
|
|
45276
|
-
const parse =
|
|
45277
|
-
const parser = new
|
|
45278
|
-
parser.ast = new
|
|
45319
|
+
const parse = pathTemplate => {
|
|
45320
|
+
const parser = new apg_lite__WEBPACK_IMPORTED_MODULE_0__.Parser();
|
|
45321
|
+
parser.ast = new apg_lite__WEBPACK_IMPORTED_MODULE_0__.Ast();
|
|
45279
45322
|
parser.ast.callbacks['path-template'] = _callbacks_path_template_mjs__WEBPACK_IMPORTED_MODULE_2__["default"];
|
|
45280
45323
|
parser.ast.callbacks['path'] = _callbacks_path_mjs__WEBPACK_IMPORTED_MODULE_3__["default"];
|
|
45281
45324
|
parser.ast.callbacks['query'] = _callbacks_query_mjs__WEBPACK_IMPORTED_MODULE_5__["default"];
|
|
@@ -45286,7 +45329,7 @@ const parse = str => {
|
|
|
45286
45329
|
parser.ast.callbacks['path-literal'] = _callbacks_path_literal_mjs__WEBPACK_IMPORTED_MODULE_4__["default"];
|
|
45287
45330
|
parser.ast.callbacks['template-expression'] = _callbacks_template_expression_mjs__WEBPACK_IMPORTED_MODULE_9__["default"];
|
|
45288
45331
|
parser.ast.callbacks['template-expression-param-name'] = _callbacks_template_expression_param_name_mjs__WEBPACK_IMPORTED_MODULE_10__["default"];
|
|
45289
|
-
const result = parser.parse(grammar, 'path-template',
|
|
45332
|
+
const result = parser.parse(grammar, 'path-template', pathTemplate);
|
|
45290
45333
|
return {
|
|
45291
45334
|
result,
|
|
45292
45335
|
ast: parser.ast
|
|
@@ -45311,15 +45354,15 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
45311
45354
|
function grammar() {
|
|
45312
45355
|
// ```
|
|
45313
45356
|
// SUMMARY
|
|
45314
|
-
// rules =
|
|
45357
|
+
// rules = 19
|
|
45315
45358
|
// udts = 0
|
|
45316
|
-
// opcodes =
|
|
45359
|
+
// opcodes = 102
|
|
45317
45360
|
// --- ABNF original opcodes
|
|
45318
|
-
// ALT =
|
|
45361
|
+
// ALT = 9
|
|
45319
45362
|
// CAT = 7
|
|
45320
45363
|
// REP = 11
|
|
45321
45364
|
// RNM = 31
|
|
45322
|
-
// TLS =
|
|
45365
|
+
// TLS = 41
|
|
45323
45366
|
// TBS = 0
|
|
45324
45367
|
// TRG = 3
|
|
45325
45368
|
// --- SABNF superset opcodes
|
|
@@ -45430,27 +45473,21 @@ function grammar() {
|
|
|
45430
45473
|
isBkr: false
|
|
45431
45474
|
};
|
|
45432
45475
|
this.rules[16] = {
|
|
45433
|
-
name: 'sub-delims-no-slash',
|
|
45434
|
-
lower: 'sub-delims-no-slash',
|
|
45435
|
-
index: 16,
|
|
45436
|
-
isBkr: false
|
|
45437
|
-
};
|
|
45438
|
-
this.rules[17] = {
|
|
45439
45476
|
name: 'ALPHA',
|
|
45440
45477
|
lower: 'alpha',
|
|
45441
|
-
index:
|
|
45478
|
+
index: 16,
|
|
45442
45479
|
isBkr: false
|
|
45443
45480
|
};
|
|
45444
|
-
this.rules[
|
|
45481
|
+
this.rules[17] = {
|
|
45445
45482
|
name: 'DIGIT',
|
|
45446
45483
|
lower: 'digit',
|
|
45447
|
-
index:
|
|
45484
|
+
index: 17,
|
|
45448
45485
|
isBkr: false
|
|
45449
45486
|
};
|
|
45450
|
-
this.rules[
|
|
45487
|
+
this.rules[18] = {
|
|
45451
45488
|
name: 'HEXDIG',
|
|
45452
45489
|
lower: 'hexdig',
|
|
45453
|
-
index:
|
|
45490
|
+
index: 18,
|
|
45454
45491
|
isBkr: false
|
|
45455
45492
|
};
|
|
45456
45493
|
|
|
@@ -45714,8 +45751,8 @@ function grammar() {
|
|
|
45714
45751
|
}; // RNM(pct-encoded)
|
|
45715
45752
|
this.rules[10].opcodes[4] = {
|
|
45716
45753
|
type: 4,
|
|
45717
|
-
index:
|
|
45718
|
-
}; // RNM(sub-delims
|
|
45754
|
+
index: 15
|
|
45755
|
+
}; // RNM(sub-delims)
|
|
45719
45756
|
this.rules[10].opcodes[5] = {
|
|
45720
45757
|
type: 7,
|
|
45721
45758
|
string: [58]
|
|
@@ -45765,8 +45802,8 @@ function grammar() {
|
|
|
45765
45802
|
}; // RNM(pct-encoded)
|
|
45766
45803
|
this.rules[12].opcodes[4] = {
|
|
45767
45804
|
type: 4,
|
|
45768
|
-
index:
|
|
45769
|
-
}; // RNM(sub-delims
|
|
45805
|
+
index: 15
|
|
45806
|
+
}; // RNM(sub-delims)
|
|
45770
45807
|
this.rules[12].opcodes[5] = {
|
|
45771
45808
|
type: 7,
|
|
45772
45809
|
string: [58]
|
|
@@ -45784,11 +45821,11 @@ function grammar() {
|
|
|
45784
45821
|
}; // ALT
|
|
45785
45822
|
this.rules[13].opcodes[1] = {
|
|
45786
45823
|
type: 4,
|
|
45787
|
-
index:
|
|
45824
|
+
index: 16
|
|
45788
45825
|
}; // RNM(ALPHA)
|
|
45789
45826
|
this.rules[13].opcodes[2] = {
|
|
45790
45827
|
type: 4,
|
|
45791
|
-
index:
|
|
45828
|
+
index: 17
|
|
45792
45829
|
}; // RNM(DIGIT)
|
|
45793
45830
|
this.rules[13].opcodes[3] = {
|
|
45794
45831
|
type: 7,
|
|
@@ -45819,11 +45856,11 @@ function grammar() {
|
|
|
45819
45856
|
}; // TLS
|
|
45820
45857
|
this.rules[14].opcodes[2] = {
|
|
45821
45858
|
type: 4,
|
|
45822
|
-
index:
|
|
45859
|
+
index: 18
|
|
45823
45860
|
}; // RNM(HEXDIG)
|
|
45824
45861
|
this.rules[14].opcodes[3] = {
|
|
45825
45862
|
type: 4,
|
|
45826
|
-
index:
|
|
45863
|
+
index: 18
|
|
45827
45864
|
}; // RNM(HEXDIG)
|
|
45828
45865
|
|
|
45829
45866
|
/* sub-delims */
|
|
@@ -45877,109 +45914,62 @@ function grammar() {
|
|
|
45877
45914
|
string: [61]
|
|
45878
45915
|
}; // TLS
|
|
45879
45916
|
|
|
45880
|
-
/*
|
|
45917
|
+
/* ALPHA */
|
|
45881
45918
|
this.rules[16].opcodes = [];
|
|
45882
45919
|
this.rules[16].opcodes[0] = {
|
|
45883
|
-
type: 1,
|
|
45884
|
-
children: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
|
|
45885
|
-
}; // ALT
|
|
45886
|
-
this.rules[16].opcodes[1] = {
|
|
45887
|
-
type: 7,
|
|
45888
|
-
string: [33]
|
|
45889
|
-
}; // TLS
|
|
45890
|
-
this.rules[16].opcodes[2] = {
|
|
45891
|
-
type: 7,
|
|
45892
|
-
string: [36]
|
|
45893
|
-
}; // TLS
|
|
45894
|
-
this.rules[16].opcodes[3] = {
|
|
45895
|
-
type: 7,
|
|
45896
|
-
string: [38]
|
|
45897
|
-
}; // TLS
|
|
45898
|
-
this.rules[16].opcodes[4] = {
|
|
45899
|
-
type: 7,
|
|
45900
|
-
string: [39]
|
|
45901
|
-
}; // TLS
|
|
45902
|
-
this.rules[16].opcodes[5] = {
|
|
45903
|
-
type: 7,
|
|
45904
|
-
string: [40]
|
|
45905
|
-
}; // TLS
|
|
45906
|
-
this.rules[16].opcodes[6] = {
|
|
45907
|
-
type: 7,
|
|
45908
|
-
string: [41]
|
|
45909
|
-
}; // TLS
|
|
45910
|
-
this.rules[16].opcodes[7] = {
|
|
45911
|
-
type: 7,
|
|
45912
|
-
string: [42]
|
|
45913
|
-
}; // TLS
|
|
45914
|
-
this.rules[16].opcodes[8] = {
|
|
45915
|
-
type: 7,
|
|
45916
|
-
string: [43]
|
|
45917
|
-
}; // TLS
|
|
45918
|
-
this.rules[16].opcodes[9] = {
|
|
45919
|
-
type: 7,
|
|
45920
|
-
string: [44]
|
|
45921
|
-
}; // TLS
|
|
45922
|
-
this.rules[16].opcodes[10] = {
|
|
45923
|
-
type: 7,
|
|
45924
|
-
string: [59]
|
|
45925
|
-
}; // TLS
|
|
45926
|
-
|
|
45927
|
-
/* ALPHA */
|
|
45928
|
-
this.rules[17].opcodes = [];
|
|
45929
|
-
this.rules[17].opcodes[0] = {
|
|
45930
45920
|
type: 1,
|
|
45931
45921
|
children: [1, 2]
|
|
45932
45922
|
}; // ALT
|
|
45933
|
-
this.rules[
|
|
45923
|
+
this.rules[16].opcodes[1] = {
|
|
45934
45924
|
type: 5,
|
|
45935
45925
|
min: 65,
|
|
45936
45926
|
max: 90
|
|
45937
45927
|
}; // TRG
|
|
45938
|
-
this.rules[
|
|
45928
|
+
this.rules[16].opcodes[2] = {
|
|
45939
45929
|
type: 5,
|
|
45940
45930
|
min: 97,
|
|
45941
45931
|
max: 122
|
|
45942
45932
|
}; // TRG
|
|
45943
45933
|
|
|
45944
45934
|
/* DIGIT */
|
|
45945
|
-
this.rules[
|
|
45946
|
-
this.rules[
|
|
45935
|
+
this.rules[17].opcodes = [];
|
|
45936
|
+
this.rules[17].opcodes[0] = {
|
|
45947
45937
|
type: 5,
|
|
45948
45938
|
min: 48,
|
|
45949
45939
|
max: 57
|
|
45950
45940
|
}; // TRG
|
|
45951
45941
|
|
|
45952
45942
|
/* HEXDIG */
|
|
45953
|
-
this.rules[
|
|
45954
|
-
this.rules[
|
|
45943
|
+
this.rules[18].opcodes = [];
|
|
45944
|
+
this.rules[18].opcodes[0] = {
|
|
45955
45945
|
type: 1,
|
|
45956
45946
|
children: [1, 2, 3, 4, 5, 6, 7]
|
|
45957
45947
|
}; // ALT
|
|
45958
|
-
this.rules[
|
|
45948
|
+
this.rules[18].opcodes[1] = {
|
|
45959
45949
|
type: 4,
|
|
45960
|
-
index:
|
|
45950
|
+
index: 17
|
|
45961
45951
|
}; // RNM(DIGIT)
|
|
45962
|
-
this.rules[
|
|
45952
|
+
this.rules[18].opcodes[2] = {
|
|
45963
45953
|
type: 7,
|
|
45964
45954
|
string: [97]
|
|
45965
45955
|
}; // TLS
|
|
45966
|
-
this.rules[
|
|
45956
|
+
this.rules[18].opcodes[3] = {
|
|
45967
45957
|
type: 7,
|
|
45968
45958
|
string: [98]
|
|
45969
45959
|
}; // TLS
|
|
45970
|
-
this.rules[
|
|
45960
|
+
this.rules[18].opcodes[4] = {
|
|
45971
45961
|
type: 7,
|
|
45972
45962
|
string: [99]
|
|
45973
45963
|
}; // TLS
|
|
45974
|
-
this.rules[
|
|
45964
|
+
this.rules[18].opcodes[5] = {
|
|
45975
45965
|
type: 7,
|
|
45976
45966
|
string: [100]
|
|
45977
45967
|
}; // TLS
|
|
45978
|
-
this.rules[
|
|
45968
|
+
this.rules[18].opcodes[6] = {
|
|
45979
45969
|
type: 7,
|
|
45980
45970
|
string: [101]
|
|
45981
45971
|
}; // TLS
|
|
45982
|
-
this.rules[
|
|
45972
|
+
this.rules[18].opcodes[7] = {
|
|
45983
45973
|
type: 7,
|
|
45984
45974
|
string: [102]
|
|
45985
45975
|
}; // TLS
|
|
@@ -45998,17 +45988,15 @@ function grammar() {
|
|
|
45998
45988
|
str += "fragment-literal = 1*( unreserved / pct-encoded / sub-delims / \":\" / \"@\" / \"/\" / \"?\" )\n";
|
|
45999
45989
|
str += "fragment-marker = \"#\"\n";
|
|
46000
45990
|
str += "slash = \"/\"\n";
|
|
46001
|
-
str += "path-literal = 1*( unreserved / pct-encoded / sub-delims
|
|
45991
|
+
str += "path-literal = 1*( unreserved / pct-encoded / sub-delims / \":\" / \"@\" )\n";
|
|
46002
45992
|
str += "template-expression = \"{\" template-expression-param-name \"}\"\n";
|
|
46003
|
-
str += "template-expression-param-name = 1*( unreserved / pct-encoded / sub-delims
|
|
45993
|
+
str += "template-expression-param-name = 1*( unreserved / pct-encoded / sub-delims / \":\" / \"@\" )\n";
|
|
46004
45994
|
str += "\n";
|
|
46005
45995
|
str += "; Characters definitions (from RFC 3986)\n";
|
|
46006
45996
|
str += "unreserved = ALPHA / DIGIT / \"-\" / \".\" / \"_\" / \"~\"\n";
|
|
46007
45997
|
str += "pct-encoded = \"%\" HEXDIG HEXDIG\n";
|
|
46008
45998
|
str += "sub-delims = \"!\" / \"$\" / \"&\" / \"'\" / \"(\" / \")\"\n";
|
|
46009
45999
|
str += " / \"*\" / \"+\" / \",\" / \";\" / \"=\"\n";
|
|
46010
|
-
str += "sub-delims-no-slash = \"!\" / \"$\" / \"&\" / \"'\" / \"(\" / \")\"\n";
|
|
46011
|
-
str += " / \"*\" / \"+\" / \",\" / \";\"\n";
|
|
46012
46000
|
str += "ALPHA = %x41-5A / %x61-7A ; A-Z / a-z\n";
|
|
46013
46001
|
str += "DIGIT = %x30-39 ; 0-9\n";
|
|
46014
46002
|
str += "HEXDIG = DIGIT / \"A\" / \"B\" / \"C\" / \"D\" / \"E\" / \"F\"\n";
|
|
@@ -46029,21 +46017,21 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
46029
46017
|
/* harmony export */ });
|
|
46030
46018
|
/* harmony import */ var _parse_index_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(10426);
|
|
46031
46019
|
|
|
46032
|
-
const isEncoded =
|
|
46020
|
+
const isEncoded = parameterValue => {
|
|
46033
46021
|
try {
|
|
46034
|
-
return typeof
|
|
46035
|
-
} catch
|
|
46022
|
+
return typeof parameterValue === 'string' && decodeURIComponent(parameterValue) !== parameterValue;
|
|
46023
|
+
} catch {
|
|
46036
46024
|
return false;
|
|
46037
46025
|
}
|
|
46038
46026
|
};
|
|
46039
|
-
const encodePathComponent =
|
|
46040
|
-
if (isEncoded(
|
|
46041
|
-
return
|
|
46027
|
+
const encodePathComponent = parameterValue => {
|
|
46028
|
+
if (isEncoded(parameterValue)) {
|
|
46029
|
+
return parameterValue;
|
|
46042
46030
|
}
|
|
46043
|
-
return encodeURIComponent(
|
|
46031
|
+
return encodeURIComponent(parameterValue).replace(/%5B/g, '[').replace(/%5D/g, ']');
|
|
46044
46032
|
};
|
|
46045
46033
|
const significantTypes = ['slash', 'path-literal', 'query-marker', 'query-literal', 'template-expression-param-name'];
|
|
46046
|
-
const resolve = (pathTemplate, parameters
|
|
46034
|
+
const resolve = (pathTemplate, parameters, options = {}) => {
|
|
46047
46035
|
const defaultOptions = {
|
|
46048
46036
|
encoder: encodePathComponent
|
|
46049
46037
|
};
|
|
@@ -46057,7 +46045,7 @@ const resolve = (pathTemplate, parameters = {}, options = {}) => {
|
|
|
46057
46045
|
parseResult.ast.translate(parts);
|
|
46058
46046
|
const resolvedParts = parts.filter(([type]) => significantTypes.includes(type)).map(([type, value]) => {
|
|
46059
46047
|
if (type === 'template-expression-param-name') {
|
|
46060
|
-
return Object.hasOwn(parameters, value) ? mergedOptions.encoder(parameters[value]) : `{${value}}`;
|
|
46048
|
+
return Object.hasOwn(parameters, value) ? mergedOptions.encoder(parameters[value], value) : `{${value}}`;
|
|
46061
46049
|
}
|
|
46062
46050
|
return value;
|
|
46063
46051
|
});
|
|
@@ -46080,16 +46068,16 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
46080
46068
|
/**
|
|
46081
46069
|
* Test if a string is a path template.
|
|
46082
46070
|
*
|
|
46083
|
-
* @param {string}
|
|
46071
|
+
* @param {string} pathTemplate
|
|
46084
46072
|
* @param {Object} [options={}] - An object.
|
|
46085
46073
|
* @param {boolean} [options.strict=true] - A boolean indicating presence of at least one `template-expression` AST node.
|
|
46086
46074
|
* @returns {boolean}
|
|
46087
46075
|
*/
|
|
46088
|
-
const test = (
|
|
46076
|
+
const test = (pathTemplate, {
|
|
46089
46077
|
strict = false
|
|
46090
46078
|
} = {}) => {
|
|
46091
46079
|
try {
|
|
46092
|
-
const parseResult = (0,_parse_index_mjs__WEBPACK_IMPORTED_MODULE_0__["default"])(
|
|
46080
|
+
const parseResult = (0,_parse_index_mjs__WEBPACK_IMPORTED_MODULE_0__["default"])(pathTemplate);
|
|
46093
46081
|
if (!parseResult.result.success) return false;
|
|
46094
46082
|
if (!strict) return true;
|
|
46095
46083
|
const parts = [];
|
|
@@ -46103,6 +46091,819 @@ const test = (str, {
|
|
|
46103
46091
|
|
|
46104
46092
|
/***/ }),
|
|
46105
46093
|
|
|
46094
|
+
/***/ 29646:
|
|
46095
|
+
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
|
|
46096
|
+
|
|
46097
|
+
"use strict";
|
|
46098
|
+
__webpack_require__.r(__webpack_exports__);
|
|
46099
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
46100
|
+
/* harmony export */ Grammar: () => (/* reexport safe */ _server_url_templating_mjs__WEBPACK_IMPORTED_MODULE_0__["default"]),
|
|
46101
|
+
/* harmony export */ encodeServerVariable: () => (/* reexport safe */ _substitute_mjs__WEBPACK_IMPORTED_MODULE_3__.encodeServerVariable),
|
|
46102
|
+
/* harmony export */ parse: () => (/* reexport safe */ _parse_index_mjs__WEBPACK_IMPORTED_MODULE_2__["default"]),
|
|
46103
|
+
/* harmony export */ substitute: () => (/* reexport safe */ _substitute_mjs__WEBPACK_IMPORTED_MODULE_3__["default"]),
|
|
46104
|
+
/* harmony export */ test: () => (/* reexport safe */ _test_mjs__WEBPACK_IMPORTED_MODULE_1__["default"])
|
|
46105
|
+
/* harmony export */ });
|
|
46106
|
+
/* harmony import */ var _server_url_templating_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(77527);
|
|
46107
|
+
/* harmony import */ var _test_mjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(3406);
|
|
46108
|
+
/* harmony import */ var _parse_index_mjs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(39790);
|
|
46109
|
+
/* harmony import */ var _substitute_mjs__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(16254);
|
|
46110
|
+
|
|
46111
|
+
|
|
46112
|
+
|
|
46113
|
+
|
|
46114
|
+
|
|
46115
|
+
/***/ }),
|
|
46116
|
+
|
|
46117
|
+
/***/ 31189:
|
|
46118
|
+
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
|
|
46119
|
+
|
|
46120
|
+
"use strict";
|
|
46121
|
+
__webpack_require__.r(__webpack_exports__);
|
|
46122
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
46123
|
+
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
46124
|
+
/* harmony export */ });
|
|
46125
|
+
/* harmony import */ var apg_lite__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(16646);
|
|
46126
|
+
|
|
46127
|
+
const literals = (state, chars, phraseIndex, phraseLength, data) => {
|
|
46128
|
+
if (state === apg_lite__WEBPACK_IMPORTED_MODULE_0__.identifiers.SEM_PRE) {
|
|
46129
|
+
if (Array.isArray(data) === false) {
|
|
46130
|
+
throw new Error("parser's user data must be an array");
|
|
46131
|
+
}
|
|
46132
|
+
data.push(['literals', apg_lite__WEBPACK_IMPORTED_MODULE_0__.utilities.charsToString(chars, phraseIndex, phraseLength)]);
|
|
46133
|
+
}
|
|
46134
|
+
return apg_lite__WEBPACK_IMPORTED_MODULE_0__.identifiers.SEM_OK;
|
|
46135
|
+
};
|
|
46136
|
+
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (literals);
|
|
46137
|
+
|
|
46138
|
+
/***/ }),
|
|
46139
|
+
|
|
46140
|
+
/***/ 20071:
|
|
46141
|
+
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
|
|
46142
|
+
|
|
46143
|
+
"use strict";
|
|
46144
|
+
__webpack_require__.r(__webpack_exports__);
|
|
46145
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
46146
|
+
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
46147
|
+
/* harmony export */ });
|
|
46148
|
+
/* harmony import */ var apg_lite__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(16646);
|
|
46149
|
+
|
|
46150
|
+
const serverUrlTemplate = (state, chars, phraseIndex, phraseLength, data) => {
|
|
46151
|
+
if (state === apg_lite__WEBPACK_IMPORTED_MODULE_0__.identifiers.SEM_PRE) {
|
|
46152
|
+
if (Array.isArray(data) === false) {
|
|
46153
|
+
throw new Error("parser's user data must be an array");
|
|
46154
|
+
}
|
|
46155
|
+
data.push(['server-url-template', apg_lite__WEBPACK_IMPORTED_MODULE_0__.utilities.charsToString(chars, phraseIndex, phraseLength)]);
|
|
46156
|
+
}
|
|
46157
|
+
return apg_lite__WEBPACK_IMPORTED_MODULE_0__.identifiers.SEM_OK;
|
|
46158
|
+
};
|
|
46159
|
+
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (serverUrlTemplate);
|
|
46160
|
+
|
|
46161
|
+
/***/ }),
|
|
46162
|
+
|
|
46163
|
+
/***/ 23859:
|
|
46164
|
+
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
|
|
46165
|
+
|
|
46166
|
+
"use strict";
|
|
46167
|
+
__webpack_require__.r(__webpack_exports__);
|
|
46168
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
46169
|
+
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
46170
|
+
/* harmony export */ });
|
|
46171
|
+
/* harmony import */ var apg_lite__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(16646);
|
|
46172
|
+
|
|
46173
|
+
const serverVariableName = (state, chars, phraseIndex, phraseLength, data) => {
|
|
46174
|
+
if (state === apg_lite__WEBPACK_IMPORTED_MODULE_0__.identifiers.SEM_PRE) {
|
|
46175
|
+
if (Array.isArray(data) === false) {
|
|
46176
|
+
throw new Error("parser's user data must be an array");
|
|
46177
|
+
}
|
|
46178
|
+
data.push(['server-variable-name', apg_lite__WEBPACK_IMPORTED_MODULE_0__.utilities.charsToString(chars, phraseIndex, phraseLength)]);
|
|
46179
|
+
}
|
|
46180
|
+
return apg_lite__WEBPACK_IMPORTED_MODULE_0__.identifiers.SEM_OK;
|
|
46181
|
+
};
|
|
46182
|
+
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (serverVariableName);
|
|
46183
|
+
|
|
46184
|
+
/***/ }),
|
|
46185
|
+
|
|
46186
|
+
/***/ 97837:
|
|
46187
|
+
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
|
|
46188
|
+
|
|
46189
|
+
"use strict";
|
|
46190
|
+
__webpack_require__.r(__webpack_exports__);
|
|
46191
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
46192
|
+
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
46193
|
+
/* harmony export */ });
|
|
46194
|
+
/* harmony import */ var apg_lite__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(16646);
|
|
46195
|
+
|
|
46196
|
+
const serverVariable = (state, chars, phraseIndex, phraseLength, data) => {
|
|
46197
|
+
if (state === apg_lite__WEBPACK_IMPORTED_MODULE_0__.identifiers.SEM_PRE) {
|
|
46198
|
+
if (Array.isArray(data) === false) {
|
|
46199
|
+
throw new Error("parser's user data must be an array");
|
|
46200
|
+
}
|
|
46201
|
+
data.push(['server-variable', apg_lite__WEBPACK_IMPORTED_MODULE_0__.utilities.charsToString(chars, phraseIndex, phraseLength)]);
|
|
46202
|
+
}
|
|
46203
|
+
return apg_lite__WEBPACK_IMPORTED_MODULE_0__.identifiers.SEM_OK;
|
|
46204
|
+
};
|
|
46205
|
+
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (serverVariable);
|
|
46206
|
+
|
|
46207
|
+
/***/ }),
|
|
46208
|
+
|
|
46209
|
+
/***/ 39790:
|
|
46210
|
+
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
|
|
46211
|
+
|
|
46212
|
+
"use strict";
|
|
46213
|
+
__webpack_require__.r(__webpack_exports__);
|
|
46214
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
46215
|
+
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
46216
|
+
/* harmony export */ });
|
|
46217
|
+
/* harmony import */ var apg_lite__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(16646);
|
|
46218
|
+
/* harmony import */ var _server_url_templating_mjs__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(77527);
|
|
46219
|
+
/* harmony import */ var _callbacks_server_url_template_mjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(20071);
|
|
46220
|
+
/* harmony import */ var _callbacks_server_variable_mjs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(97837);
|
|
46221
|
+
/* harmony import */ var _callbacks_server_variable_name_mjs__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(23859);
|
|
46222
|
+
/* harmony import */ var _callbacks_literals_mjs__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(31189);
|
|
46223
|
+
|
|
46224
|
+
|
|
46225
|
+
|
|
46226
|
+
|
|
46227
|
+
|
|
46228
|
+
|
|
46229
|
+
const grammar = new _server_url_templating_mjs__WEBPACK_IMPORTED_MODULE_5__["default"]();
|
|
46230
|
+
const parse = serverURLTemplate => {
|
|
46231
|
+
const parser = new apg_lite__WEBPACK_IMPORTED_MODULE_0__.Parser();
|
|
46232
|
+
parser.ast = new apg_lite__WEBPACK_IMPORTED_MODULE_0__.Ast();
|
|
46233
|
+
parser.ast.callbacks['server-url-template'] = _callbacks_server_url_template_mjs__WEBPACK_IMPORTED_MODULE_1__["default"];
|
|
46234
|
+
parser.ast.callbacks['server-variable'] = _callbacks_server_variable_mjs__WEBPACK_IMPORTED_MODULE_2__["default"];
|
|
46235
|
+
parser.ast.callbacks['server-variable-name'] = _callbacks_server_variable_name_mjs__WEBPACK_IMPORTED_MODULE_3__["default"];
|
|
46236
|
+
parser.ast.callbacks['literals'] = _callbacks_literals_mjs__WEBPACK_IMPORTED_MODULE_4__["default"];
|
|
46237
|
+
const result = parser.parse(grammar, 'server-url-template', serverURLTemplate);
|
|
46238
|
+
return {
|
|
46239
|
+
result,
|
|
46240
|
+
ast: parser.ast
|
|
46241
|
+
};
|
|
46242
|
+
};
|
|
46243
|
+
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (parse);
|
|
46244
|
+
|
|
46245
|
+
/***/ }),
|
|
46246
|
+
|
|
46247
|
+
/***/ 77527:
|
|
46248
|
+
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
|
|
46249
|
+
|
|
46250
|
+
"use strict";
|
|
46251
|
+
__webpack_require__.r(__webpack_exports__);
|
|
46252
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
46253
|
+
/* harmony export */ "default": () => (/* binding */ grammar)
|
|
46254
|
+
/* harmony export */ });
|
|
46255
|
+
// copyright: Copyright (c) 2024 Lowell D. Thomas, all rights reserved<br>
|
|
46256
|
+
// license: BSD-2-Clause (https://opensource.org/licenses/BSD-2-Clause)<br>
|
|
46257
|
+
//
|
|
46258
|
+
// Generated by apg-js, Version 4.4.0 [apg-js](https://github.com/ldthomas/apg-js)
|
|
46259
|
+
function grammar() {
|
|
46260
|
+
// ```
|
|
46261
|
+
// SUMMARY
|
|
46262
|
+
// rules = 12
|
|
46263
|
+
// udts = 0
|
|
46264
|
+
// opcodes = 87
|
|
46265
|
+
// --- ABNF original opcodes
|
|
46266
|
+
// ALT = 9
|
|
46267
|
+
// CAT = 2
|
|
46268
|
+
// REP = 3
|
|
46269
|
+
// RNM = 14
|
|
46270
|
+
// TLS = 26
|
|
46271
|
+
// TBS = 6
|
|
46272
|
+
// TRG = 27
|
|
46273
|
+
// --- SABNF superset opcodes
|
|
46274
|
+
// UDT = 0
|
|
46275
|
+
// AND = 0
|
|
46276
|
+
// NOT = 0
|
|
46277
|
+
// characters = [33 - 1114109]
|
|
46278
|
+
// ```
|
|
46279
|
+
/* OBJECT IDENTIFIER (for internal parser use) */
|
|
46280
|
+
this.grammarObject = 'grammarObject';
|
|
46281
|
+
|
|
46282
|
+
/* RULES */
|
|
46283
|
+
this.rules = [];
|
|
46284
|
+
this.rules[0] = {
|
|
46285
|
+
name: 'server-url-template',
|
|
46286
|
+
lower: 'server-url-template',
|
|
46287
|
+
index: 0,
|
|
46288
|
+
isBkr: false
|
|
46289
|
+
};
|
|
46290
|
+
this.rules[1] = {
|
|
46291
|
+
name: 'server-variable',
|
|
46292
|
+
lower: 'server-variable',
|
|
46293
|
+
index: 1,
|
|
46294
|
+
isBkr: false
|
|
46295
|
+
};
|
|
46296
|
+
this.rules[2] = {
|
|
46297
|
+
name: 'server-variable-name',
|
|
46298
|
+
lower: 'server-variable-name',
|
|
46299
|
+
index: 2,
|
|
46300
|
+
isBkr: false
|
|
46301
|
+
};
|
|
46302
|
+
this.rules[3] = {
|
|
46303
|
+
name: 'literals',
|
|
46304
|
+
lower: 'literals',
|
|
46305
|
+
index: 3,
|
|
46306
|
+
isBkr: false
|
|
46307
|
+
};
|
|
46308
|
+
this.rules[4] = {
|
|
46309
|
+
name: 'ALPHA',
|
|
46310
|
+
lower: 'alpha',
|
|
46311
|
+
index: 4,
|
|
46312
|
+
isBkr: false
|
|
46313
|
+
};
|
|
46314
|
+
this.rules[5] = {
|
|
46315
|
+
name: 'DIGIT',
|
|
46316
|
+
lower: 'digit',
|
|
46317
|
+
index: 5,
|
|
46318
|
+
isBkr: false
|
|
46319
|
+
};
|
|
46320
|
+
this.rules[6] = {
|
|
46321
|
+
name: 'HEXDIG',
|
|
46322
|
+
lower: 'hexdig',
|
|
46323
|
+
index: 6,
|
|
46324
|
+
isBkr: false
|
|
46325
|
+
};
|
|
46326
|
+
this.rules[7] = {
|
|
46327
|
+
name: 'pct-encoded',
|
|
46328
|
+
lower: 'pct-encoded',
|
|
46329
|
+
index: 7,
|
|
46330
|
+
isBkr: false
|
|
46331
|
+
};
|
|
46332
|
+
this.rules[8] = {
|
|
46333
|
+
name: 'unreserved',
|
|
46334
|
+
lower: 'unreserved',
|
|
46335
|
+
index: 8,
|
|
46336
|
+
isBkr: false
|
|
46337
|
+
};
|
|
46338
|
+
this.rules[9] = {
|
|
46339
|
+
name: 'sub-delims',
|
|
46340
|
+
lower: 'sub-delims',
|
|
46341
|
+
index: 9,
|
|
46342
|
+
isBkr: false
|
|
46343
|
+
};
|
|
46344
|
+
this.rules[10] = {
|
|
46345
|
+
name: 'ucschar',
|
|
46346
|
+
lower: 'ucschar',
|
|
46347
|
+
index: 10,
|
|
46348
|
+
isBkr: false
|
|
46349
|
+
};
|
|
46350
|
+
this.rules[11] = {
|
|
46351
|
+
name: 'iprivate',
|
|
46352
|
+
lower: 'iprivate',
|
|
46353
|
+
index: 11,
|
|
46354
|
+
isBkr: false
|
|
46355
|
+
};
|
|
46356
|
+
|
|
46357
|
+
/* UDTS */
|
|
46358
|
+
this.udts = [];
|
|
46359
|
+
|
|
46360
|
+
/* OPCODES */
|
|
46361
|
+
/* server-url-template */
|
|
46362
|
+
this.rules[0].opcodes = [];
|
|
46363
|
+
this.rules[0].opcodes[0] = {
|
|
46364
|
+
type: 3,
|
|
46365
|
+
min: 1,
|
|
46366
|
+
max: Infinity
|
|
46367
|
+
}; // REP
|
|
46368
|
+
this.rules[0].opcodes[1] = {
|
|
46369
|
+
type: 1,
|
|
46370
|
+
children: [2, 3]
|
|
46371
|
+
}; // ALT
|
|
46372
|
+
this.rules[0].opcodes[2] = {
|
|
46373
|
+
type: 4,
|
|
46374
|
+
index: 3
|
|
46375
|
+
}; // RNM(literals)
|
|
46376
|
+
this.rules[0].opcodes[3] = {
|
|
46377
|
+
type: 4,
|
|
46378
|
+
index: 1
|
|
46379
|
+
}; // RNM(server-variable)
|
|
46380
|
+
|
|
46381
|
+
/* server-variable */
|
|
46382
|
+
this.rules[1].opcodes = [];
|
|
46383
|
+
this.rules[1].opcodes[0] = {
|
|
46384
|
+
type: 2,
|
|
46385
|
+
children: [1, 2, 3]
|
|
46386
|
+
}; // CAT
|
|
46387
|
+
this.rules[1].opcodes[1] = {
|
|
46388
|
+
type: 7,
|
|
46389
|
+
string: [123]
|
|
46390
|
+
}; // TLS
|
|
46391
|
+
this.rules[1].opcodes[2] = {
|
|
46392
|
+
type: 4,
|
|
46393
|
+
index: 2
|
|
46394
|
+
}; // RNM(server-variable-name)
|
|
46395
|
+
this.rules[1].opcodes[3] = {
|
|
46396
|
+
type: 7,
|
|
46397
|
+
string: [125]
|
|
46398
|
+
}; // TLS
|
|
46399
|
+
|
|
46400
|
+
/* server-variable-name */
|
|
46401
|
+
this.rules[2].opcodes = [];
|
|
46402
|
+
this.rules[2].opcodes[0] = {
|
|
46403
|
+
type: 3,
|
|
46404
|
+
min: 1,
|
|
46405
|
+
max: Infinity
|
|
46406
|
+
}; // REP
|
|
46407
|
+
this.rules[2].opcodes[1] = {
|
|
46408
|
+
type: 1,
|
|
46409
|
+
children: [2, 3, 4, 5, 6]
|
|
46410
|
+
}; // ALT
|
|
46411
|
+
this.rules[2].opcodes[2] = {
|
|
46412
|
+
type: 4,
|
|
46413
|
+
index: 8
|
|
46414
|
+
}; // RNM(unreserved)
|
|
46415
|
+
this.rules[2].opcodes[3] = {
|
|
46416
|
+
type: 4,
|
|
46417
|
+
index: 7
|
|
46418
|
+
}; // RNM(pct-encoded)
|
|
46419
|
+
this.rules[2].opcodes[4] = {
|
|
46420
|
+
type: 4,
|
|
46421
|
+
index: 9
|
|
46422
|
+
}; // RNM(sub-delims)
|
|
46423
|
+
this.rules[2].opcodes[5] = {
|
|
46424
|
+
type: 7,
|
|
46425
|
+
string: [58]
|
|
46426
|
+
}; // TLS
|
|
46427
|
+
this.rules[2].opcodes[6] = {
|
|
46428
|
+
type: 7,
|
|
46429
|
+
string: [64]
|
|
46430
|
+
}; // TLS
|
|
46431
|
+
|
|
46432
|
+
/* literals */
|
|
46433
|
+
this.rules[3].opcodes = [];
|
|
46434
|
+
this.rules[3].opcodes[0] = {
|
|
46435
|
+
type: 3,
|
|
46436
|
+
min: 1,
|
|
46437
|
+
max: Infinity
|
|
46438
|
+
}; // REP
|
|
46439
|
+
this.rules[3].opcodes[1] = {
|
|
46440
|
+
type: 1,
|
|
46441
|
+
children: [2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14]
|
|
46442
|
+
}; // ALT
|
|
46443
|
+
this.rules[3].opcodes[2] = {
|
|
46444
|
+
type: 6,
|
|
46445
|
+
string: [33]
|
|
46446
|
+
}; // TBS
|
|
46447
|
+
this.rules[3].opcodes[3] = {
|
|
46448
|
+
type: 5,
|
|
46449
|
+
min: 35,
|
|
46450
|
+
max: 36
|
|
46451
|
+
}; // TRG
|
|
46452
|
+
this.rules[3].opcodes[4] = {
|
|
46453
|
+
type: 6,
|
|
46454
|
+
string: [38]
|
|
46455
|
+
}; // TBS
|
|
46456
|
+
this.rules[3].opcodes[5] = {
|
|
46457
|
+
type: 5,
|
|
46458
|
+
min: 40,
|
|
46459
|
+
max: 59
|
|
46460
|
+
}; // TRG
|
|
46461
|
+
this.rules[3].opcodes[6] = {
|
|
46462
|
+
type: 6,
|
|
46463
|
+
string: [61]
|
|
46464
|
+
}; // TBS
|
|
46465
|
+
this.rules[3].opcodes[7] = {
|
|
46466
|
+
type: 5,
|
|
46467
|
+
min: 63,
|
|
46468
|
+
max: 91
|
|
46469
|
+
}; // TRG
|
|
46470
|
+
this.rules[3].opcodes[8] = {
|
|
46471
|
+
type: 6,
|
|
46472
|
+
string: [93]
|
|
46473
|
+
}; // TBS
|
|
46474
|
+
this.rules[3].opcodes[9] = {
|
|
46475
|
+
type: 6,
|
|
46476
|
+
string: [95]
|
|
46477
|
+
}; // TBS
|
|
46478
|
+
this.rules[3].opcodes[10] = {
|
|
46479
|
+
type: 5,
|
|
46480
|
+
min: 97,
|
|
46481
|
+
max: 122
|
|
46482
|
+
}; // TRG
|
|
46483
|
+
this.rules[3].opcodes[11] = {
|
|
46484
|
+
type: 6,
|
|
46485
|
+
string: [126]
|
|
46486
|
+
}; // TBS
|
|
46487
|
+
this.rules[3].opcodes[12] = {
|
|
46488
|
+
type: 4,
|
|
46489
|
+
index: 10
|
|
46490
|
+
}; // RNM(ucschar)
|
|
46491
|
+
this.rules[3].opcodes[13] = {
|
|
46492
|
+
type: 4,
|
|
46493
|
+
index: 11
|
|
46494
|
+
}; // RNM(iprivate)
|
|
46495
|
+
this.rules[3].opcodes[14] = {
|
|
46496
|
+
type: 4,
|
|
46497
|
+
index: 7
|
|
46498
|
+
}; // RNM(pct-encoded)
|
|
46499
|
+
|
|
46500
|
+
/* ALPHA */
|
|
46501
|
+
this.rules[4].opcodes = [];
|
|
46502
|
+
this.rules[4].opcodes[0] = {
|
|
46503
|
+
type: 1,
|
|
46504
|
+
children: [1, 2]
|
|
46505
|
+
}; // ALT
|
|
46506
|
+
this.rules[4].opcodes[1] = {
|
|
46507
|
+
type: 5,
|
|
46508
|
+
min: 65,
|
|
46509
|
+
max: 90
|
|
46510
|
+
}; // TRG
|
|
46511
|
+
this.rules[4].opcodes[2] = {
|
|
46512
|
+
type: 5,
|
|
46513
|
+
min: 97,
|
|
46514
|
+
max: 122
|
|
46515
|
+
}; // TRG
|
|
46516
|
+
|
|
46517
|
+
/* DIGIT */
|
|
46518
|
+
this.rules[5].opcodes = [];
|
|
46519
|
+
this.rules[5].opcodes[0] = {
|
|
46520
|
+
type: 5,
|
|
46521
|
+
min: 48,
|
|
46522
|
+
max: 57
|
|
46523
|
+
}; // TRG
|
|
46524
|
+
|
|
46525
|
+
/* HEXDIG */
|
|
46526
|
+
this.rules[6].opcodes = [];
|
|
46527
|
+
this.rules[6].opcodes[0] = {
|
|
46528
|
+
type: 1,
|
|
46529
|
+
children: [1, 2, 3, 4, 5, 6, 7]
|
|
46530
|
+
}; // ALT
|
|
46531
|
+
this.rules[6].opcodes[1] = {
|
|
46532
|
+
type: 4,
|
|
46533
|
+
index: 5
|
|
46534
|
+
}; // RNM(DIGIT)
|
|
46535
|
+
this.rules[6].opcodes[2] = {
|
|
46536
|
+
type: 7,
|
|
46537
|
+
string: [97]
|
|
46538
|
+
}; // TLS
|
|
46539
|
+
this.rules[6].opcodes[3] = {
|
|
46540
|
+
type: 7,
|
|
46541
|
+
string: [98]
|
|
46542
|
+
}; // TLS
|
|
46543
|
+
this.rules[6].opcodes[4] = {
|
|
46544
|
+
type: 7,
|
|
46545
|
+
string: [99]
|
|
46546
|
+
}; // TLS
|
|
46547
|
+
this.rules[6].opcodes[5] = {
|
|
46548
|
+
type: 7,
|
|
46549
|
+
string: [100]
|
|
46550
|
+
}; // TLS
|
|
46551
|
+
this.rules[6].opcodes[6] = {
|
|
46552
|
+
type: 7,
|
|
46553
|
+
string: [101]
|
|
46554
|
+
}; // TLS
|
|
46555
|
+
this.rules[6].opcodes[7] = {
|
|
46556
|
+
type: 7,
|
|
46557
|
+
string: [102]
|
|
46558
|
+
}; // TLS
|
|
46559
|
+
|
|
46560
|
+
/* pct-encoded */
|
|
46561
|
+
this.rules[7].opcodes = [];
|
|
46562
|
+
this.rules[7].opcodes[0] = {
|
|
46563
|
+
type: 2,
|
|
46564
|
+
children: [1, 2, 3]
|
|
46565
|
+
}; // CAT
|
|
46566
|
+
this.rules[7].opcodes[1] = {
|
|
46567
|
+
type: 7,
|
|
46568
|
+
string: [37]
|
|
46569
|
+
}; // TLS
|
|
46570
|
+
this.rules[7].opcodes[2] = {
|
|
46571
|
+
type: 4,
|
|
46572
|
+
index: 6
|
|
46573
|
+
}; // RNM(HEXDIG)
|
|
46574
|
+
this.rules[7].opcodes[3] = {
|
|
46575
|
+
type: 4,
|
|
46576
|
+
index: 6
|
|
46577
|
+
}; // RNM(HEXDIG)
|
|
46578
|
+
|
|
46579
|
+
/* unreserved */
|
|
46580
|
+
this.rules[8].opcodes = [];
|
|
46581
|
+
this.rules[8].opcodes[0] = {
|
|
46582
|
+
type: 1,
|
|
46583
|
+
children: [1, 2, 3, 4, 5, 6]
|
|
46584
|
+
}; // ALT
|
|
46585
|
+
this.rules[8].opcodes[1] = {
|
|
46586
|
+
type: 4,
|
|
46587
|
+
index: 4
|
|
46588
|
+
}; // RNM(ALPHA)
|
|
46589
|
+
this.rules[8].opcodes[2] = {
|
|
46590
|
+
type: 4,
|
|
46591
|
+
index: 5
|
|
46592
|
+
}; // RNM(DIGIT)
|
|
46593
|
+
this.rules[8].opcodes[3] = {
|
|
46594
|
+
type: 7,
|
|
46595
|
+
string: [45]
|
|
46596
|
+
}; // TLS
|
|
46597
|
+
this.rules[8].opcodes[4] = {
|
|
46598
|
+
type: 7,
|
|
46599
|
+
string: [46]
|
|
46600
|
+
}; // TLS
|
|
46601
|
+
this.rules[8].opcodes[5] = {
|
|
46602
|
+
type: 7,
|
|
46603
|
+
string: [95]
|
|
46604
|
+
}; // TLS
|
|
46605
|
+
this.rules[8].opcodes[6] = {
|
|
46606
|
+
type: 7,
|
|
46607
|
+
string: [126]
|
|
46608
|
+
}; // TLS
|
|
46609
|
+
|
|
46610
|
+
/* sub-delims */
|
|
46611
|
+
this.rules[9].opcodes = [];
|
|
46612
|
+
this.rules[9].opcodes[0] = {
|
|
46613
|
+
type: 1,
|
|
46614
|
+
children: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11]
|
|
46615
|
+
}; // ALT
|
|
46616
|
+
this.rules[9].opcodes[1] = {
|
|
46617
|
+
type: 7,
|
|
46618
|
+
string: [33]
|
|
46619
|
+
}; // TLS
|
|
46620
|
+
this.rules[9].opcodes[2] = {
|
|
46621
|
+
type: 7,
|
|
46622
|
+
string: [36]
|
|
46623
|
+
}; // TLS
|
|
46624
|
+
this.rules[9].opcodes[3] = {
|
|
46625
|
+
type: 7,
|
|
46626
|
+
string: [38]
|
|
46627
|
+
}; // TLS
|
|
46628
|
+
this.rules[9].opcodes[4] = {
|
|
46629
|
+
type: 7,
|
|
46630
|
+
string: [39]
|
|
46631
|
+
}; // TLS
|
|
46632
|
+
this.rules[9].opcodes[5] = {
|
|
46633
|
+
type: 7,
|
|
46634
|
+
string: [40]
|
|
46635
|
+
}; // TLS
|
|
46636
|
+
this.rules[9].opcodes[6] = {
|
|
46637
|
+
type: 7,
|
|
46638
|
+
string: [41]
|
|
46639
|
+
}; // TLS
|
|
46640
|
+
this.rules[9].opcodes[7] = {
|
|
46641
|
+
type: 7,
|
|
46642
|
+
string: [42]
|
|
46643
|
+
}; // TLS
|
|
46644
|
+
this.rules[9].opcodes[8] = {
|
|
46645
|
+
type: 7,
|
|
46646
|
+
string: [43]
|
|
46647
|
+
}; // TLS
|
|
46648
|
+
this.rules[9].opcodes[9] = {
|
|
46649
|
+
type: 7,
|
|
46650
|
+
string: [44]
|
|
46651
|
+
}; // TLS
|
|
46652
|
+
this.rules[9].opcodes[10] = {
|
|
46653
|
+
type: 7,
|
|
46654
|
+
string: [59]
|
|
46655
|
+
}; // TLS
|
|
46656
|
+
this.rules[9].opcodes[11] = {
|
|
46657
|
+
type: 7,
|
|
46658
|
+
string: [61]
|
|
46659
|
+
}; // TLS
|
|
46660
|
+
|
|
46661
|
+
/* ucschar */
|
|
46662
|
+
this.rules[10].opcodes = [];
|
|
46663
|
+
this.rules[10].opcodes[0] = {
|
|
46664
|
+
type: 1,
|
|
46665
|
+
children: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17]
|
|
46666
|
+
}; // ALT
|
|
46667
|
+
this.rules[10].opcodes[1] = {
|
|
46668
|
+
type: 5,
|
|
46669
|
+
min: 160,
|
|
46670
|
+
max: 55295
|
|
46671
|
+
}; // TRG
|
|
46672
|
+
this.rules[10].opcodes[2] = {
|
|
46673
|
+
type: 5,
|
|
46674
|
+
min: 63744,
|
|
46675
|
+
max: 64975
|
|
46676
|
+
}; // TRG
|
|
46677
|
+
this.rules[10].opcodes[3] = {
|
|
46678
|
+
type: 5,
|
|
46679
|
+
min: 65008,
|
|
46680
|
+
max: 65519
|
|
46681
|
+
}; // TRG
|
|
46682
|
+
this.rules[10].opcodes[4] = {
|
|
46683
|
+
type: 5,
|
|
46684
|
+
min: 65536,
|
|
46685
|
+
max: 131069
|
|
46686
|
+
}; // TRG
|
|
46687
|
+
this.rules[10].opcodes[5] = {
|
|
46688
|
+
type: 5,
|
|
46689
|
+
min: 131072,
|
|
46690
|
+
max: 196605
|
|
46691
|
+
}; // TRG
|
|
46692
|
+
this.rules[10].opcodes[6] = {
|
|
46693
|
+
type: 5,
|
|
46694
|
+
min: 196608,
|
|
46695
|
+
max: 262141
|
|
46696
|
+
}; // TRG
|
|
46697
|
+
this.rules[10].opcodes[7] = {
|
|
46698
|
+
type: 5,
|
|
46699
|
+
min: 262144,
|
|
46700
|
+
max: 327677
|
|
46701
|
+
}; // TRG
|
|
46702
|
+
this.rules[10].opcodes[8] = {
|
|
46703
|
+
type: 5,
|
|
46704
|
+
min: 327680,
|
|
46705
|
+
max: 393213
|
|
46706
|
+
}; // TRG
|
|
46707
|
+
this.rules[10].opcodes[9] = {
|
|
46708
|
+
type: 5,
|
|
46709
|
+
min: 393216,
|
|
46710
|
+
max: 458749
|
|
46711
|
+
}; // TRG
|
|
46712
|
+
this.rules[10].opcodes[10] = {
|
|
46713
|
+
type: 5,
|
|
46714
|
+
min: 458752,
|
|
46715
|
+
max: 524285
|
|
46716
|
+
}; // TRG
|
|
46717
|
+
this.rules[10].opcodes[11] = {
|
|
46718
|
+
type: 5,
|
|
46719
|
+
min: 524288,
|
|
46720
|
+
max: 589821
|
|
46721
|
+
}; // TRG
|
|
46722
|
+
this.rules[10].opcodes[12] = {
|
|
46723
|
+
type: 5,
|
|
46724
|
+
min: 589824,
|
|
46725
|
+
max: 655357
|
|
46726
|
+
}; // TRG
|
|
46727
|
+
this.rules[10].opcodes[13] = {
|
|
46728
|
+
type: 5,
|
|
46729
|
+
min: 655360,
|
|
46730
|
+
max: 720893
|
|
46731
|
+
}; // TRG
|
|
46732
|
+
this.rules[10].opcodes[14] = {
|
|
46733
|
+
type: 5,
|
|
46734
|
+
min: 720896,
|
|
46735
|
+
max: 786429
|
|
46736
|
+
}; // TRG
|
|
46737
|
+
this.rules[10].opcodes[15] = {
|
|
46738
|
+
type: 5,
|
|
46739
|
+
min: 786432,
|
|
46740
|
+
max: 851965
|
|
46741
|
+
}; // TRG
|
|
46742
|
+
this.rules[10].opcodes[16] = {
|
|
46743
|
+
type: 5,
|
|
46744
|
+
min: 851968,
|
|
46745
|
+
max: 917501
|
|
46746
|
+
}; // TRG
|
|
46747
|
+
this.rules[10].opcodes[17] = {
|
|
46748
|
+
type: 5,
|
|
46749
|
+
min: 921600,
|
|
46750
|
+
max: 983037
|
|
46751
|
+
}; // TRG
|
|
46752
|
+
|
|
46753
|
+
/* iprivate */
|
|
46754
|
+
this.rules[11].opcodes = [];
|
|
46755
|
+
this.rules[11].opcodes[0] = {
|
|
46756
|
+
type: 1,
|
|
46757
|
+
children: [1, 2, 3]
|
|
46758
|
+
}; // ALT
|
|
46759
|
+
this.rules[11].opcodes[1] = {
|
|
46760
|
+
type: 5,
|
|
46761
|
+
min: 57344,
|
|
46762
|
+
max: 63743
|
|
46763
|
+
}; // TRG
|
|
46764
|
+
this.rules[11].opcodes[2] = {
|
|
46765
|
+
type: 5,
|
|
46766
|
+
min: 983040,
|
|
46767
|
+
max: 1048573
|
|
46768
|
+
}; // TRG
|
|
46769
|
+
this.rules[11].opcodes[3] = {
|
|
46770
|
+
type: 5,
|
|
46771
|
+
min: 1048576,
|
|
46772
|
+
max: 1114109
|
|
46773
|
+
}; // TRG
|
|
46774
|
+
|
|
46775
|
+
// The `toString()` function will display the original grammar file(s) that produced these opcodes.
|
|
46776
|
+
this.toString = function toString() {
|
|
46777
|
+
let str = "";
|
|
46778
|
+
str += "; OpenAPI Server URL templating ABNF syntax\n";
|
|
46779
|
+
str += "server-url-template = 1*( literals / server-variable )\n";
|
|
46780
|
+
str += "server-variable = \"{\" server-variable-name \"}\"\n";
|
|
46781
|
+
str += "server-variable-name = 1*( unreserved / pct-encoded / sub-delims / \":\" / \"@\" )\n";
|
|
46782
|
+
str += "literals = 1*( %x21 / %x23-24 / %x26 / %x28-3B / %x3D / %x3F-5B\n";
|
|
46783
|
+
str += " / %x5D / %x5F / %x61-7A / %x7E / ucschar / iprivate\n";
|
|
46784
|
+
str += " / pct-encoded)\n";
|
|
46785
|
+
str += " ; any Unicode character except: CTL, SP,\n";
|
|
46786
|
+
str += " ; DQUOTE, \"'\", \"%\" (aside from pct-encoded),\n";
|
|
46787
|
+
str += " ; \"<\", \">\", \"\\\", \"^\", \"`\", \"{\", \"|\", \"}\"\n";
|
|
46788
|
+
str += "\n";
|
|
46789
|
+
str += "; Characters definitions (from RFC 6570)\n";
|
|
46790
|
+
str += "ALPHA = %x41-5A / %x61-7A ; A-Z / a-z\n";
|
|
46791
|
+
str += "DIGIT = %x30-39 ; 0-9\n";
|
|
46792
|
+
str += "HEXDIG = DIGIT / \"A\" / \"B\" / \"C\" / \"D\" / \"E\" / \"F\"\n";
|
|
46793
|
+
str += " ; case-insensitive\n";
|
|
46794
|
+
str += "\n";
|
|
46795
|
+
str += "pct-encoded = \"%\" HEXDIG HEXDIG\n";
|
|
46796
|
+
str += "unreserved = ALPHA / DIGIT / \"-\" / \".\" / \"_\" / \"~\"\n";
|
|
46797
|
+
str += "sub-delims = \"!\" / \"$\" / \"&\" / \"'\" / \"(\" / \")\"\n";
|
|
46798
|
+
str += " / \"*\" / \"+\" / \",\" / \";\" / \"=\"\n";
|
|
46799
|
+
str += "\n";
|
|
46800
|
+
str += "ucschar = %xA0-D7FF / %xF900-FDCF / %xFDF0-FFEF\n";
|
|
46801
|
+
str += " / %x10000-1FFFD / %x20000-2FFFD / %x30000-3FFFD\n";
|
|
46802
|
+
str += " / %x40000-4FFFD / %x50000-5FFFD / %x60000-6FFFD\n";
|
|
46803
|
+
str += " / %x70000-7FFFD / %x80000-8FFFD / %x90000-9FFFD\n";
|
|
46804
|
+
str += " / %xA0000-AFFFD / %xB0000-BFFFD / %xC0000-CFFFD\n";
|
|
46805
|
+
str += " / %xD0000-DFFFD / %xE1000-EFFFD\n";
|
|
46806
|
+
str += "\n";
|
|
46807
|
+
str += "iprivate = %xE000-F8FF / %xF0000-FFFFD / %x100000-10FFFD\n";
|
|
46808
|
+
return str;
|
|
46809
|
+
};
|
|
46810
|
+
}
|
|
46811
|
+
|
|
46812
|
+
/***/ }),
|
|
46813
|
+
|
|
46814
|
+
/***/ 16254:
|
|
46815
|
+
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
|
|
46816
|
+
|
|
46817
|
+
"use strict";
|
|
46818
|
+
__webpack_require__.r(__webpack_exports__);
|
|
46819
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
46820
|
+
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__),
|
|
46821
|
+
/* harmony export */ encodeServerVariable: () => (/* binding */ encodeServerVariable)
|
|
46822
|
+
/* harmony export */ });
|
|
46823
|
+
/* harmony import */ var _parse_index_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(39790);
|
|
46824
|
+
|
|
46825
|
+
const isEncoded = serverVariableValue => {
|
|
46826
|
+
try {
|
|
46827
|
+
return typeof serverVariableValue === 'string' && decodeURIComponent(serverVariableValue) !== serverVariableValue;
|
|
46828
|
+
} catch {
|
|
46829
|
+
return false;
|
|
46830
|
+
}
|
|
46831
|
+
};
|
|
46832
|
+
const encodeServerVariable = serverVariableValue => {
|
|
46833
|
+
if (isEncoded(serverVariableValue)) {
|
|
46834
|
+
return serverVariableValue;
|
|
46835
|
+
}
|
|
46836
|
+
return encodeURIComponent(serverVariableValue).replace(/%5B/g, '[').replace(/%5D/g, ']');
|
|
46837
|
+
};
|
|
46838
|
+
const significantTypes = ['literals', 'server-variable-name'];
|
|
46839
|
+
const substitute = (serverURLTemplate, serverVariables, options = {}) => {
|
|
46840
|
+
const defaultOptions = {
|
|
46841
|
+
encoder: encodeServerVariable
|
|
46842
|
+
};
|
|
46843
|
+
const mergedOptions = {
|
|
46844
|
+
...defaultOptions,
|
|
46845
|
+
...options
|
|
46846
|
+
};
|
|
46847
|
+
const parseResult = (0,_parse_index_mjs__WEBPACK_IMPORTED_MODULE_0__["default"])(serverURLTemplate);
|
|
46848
|
+
if (!parseResult.result.success) return serverURLTemplate;
|
|
46849
|
+
const parts = [];
|
|
46850
|
+
parseResult.ast.translate(parts);
|
|
46851
|
+
const substitutedParts = parts.filter(([type]) => significantTypes.includes(type)).map(([type, value]) => {
|
|
46852
|
+
if (type === 'server-variable-name') {
|
|
46853
|
+
return Object.hasOwn(serverVariables, value) ? mergedOptions.encoder(serverVariables[value], value) : `{${value}}`;
|
|
46854
|
+
}
|
|
46855
|
+
return value;
|
|
46856
|
+
});
|
|
46857
|
+
return substitutedParts.join('');
|
|
46858
|
+
};
|
|
46859
|
+
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (substitute);
|
|
46860
|
+
|
|
46861
|
+
/***/ }),
|
|
46862
|
+
|
|
46863
|
+
/***/ 3406:
|
|
46864
|
+
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
|
|
46865
|
+
|
|
46866
|
+
"use strict";
|
|
46867
|
+
__webpack_require__.r(__webpack_exports__);
|
|
46868
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
46869
|
+
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
46870
|
+
/* harmony export */ });
|
|
46871
|
+
/* harmony import */ var _parse_index_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(39790);
|
|
46872
|
+
|
|
46873
|
+
/**
|
|
46874
|
+
* Test if a string is a server URL template.
|
|
46875
|
+
*
|
|
46876
|
+
* @param {string} serverURLTemplate
|
|
46877
|
+
* @param {Object} [options={}] - An object.
|
|
46878
|
+
* @param {boolean} [options.strict=true] - A boolean indicating presence of at least one `Server Variable` AST node.
|
|
46879
|
+
* @returns {boolean}
|
|
46880
|
+
*/
|
|
46881
|
+
const test = (serverURLTemplate, {
|
|
46882
|
+
strict = false
|
|
46883
|
+
} = {}) => {
|
|
46884
|
+
try {
|
|
46885
|
+
const parseResult = (0,_parse_index_mjs__WEBPACK_IMPORTED_MODULE_0__["default"])(serverURLTemplate);
|
|
46886
|
+
if (!parseResult.result.success) return false;
|
|
46887
|
+
const parts = [];
|
|
46888
|
+
parseResult.ast.translate(parts);
|
|
46889
|
+
const hasServerVariable = parts.some(([type]) => type === 'server-variable');
|
|
46890
|
+
if (!strict && !hasServerVariable) {
|
|
46891
|
+
try {
|
|
46892
|
+
new URL(serverURLTemplate, 'https://vladimirgorej.com');
|
|
46893
|
+
return true;
|
|
46894
|
+
} catch {
|
|
46895
|
+
return false;
|
|
46896
|
+
}
|
|
46897
|
+
}
|
|
46898
|
+
return strict ? hasServerVariable : true;
|
|
46899
|
+
} catch {
|
|
46900
|
+
return false;
|
|
46901
|
+
}
|
|
46902
|
+
};
|
|
46903
|
+
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (test);
|
|
46904
|
+
|
|
46905
|
+
/***/ }),
|
|
46906
|
+
|
|
46106
46907
|
/***/ 89360:
|
|
46107
46908
|
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
|
|
46108
46909
|
|
|
@@ -46124,12 +46925,12 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
46124
46925
|
/* harmony import */ var _isNotNil_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(32458);
|
|
46125
46926
|
/* harmony import */ var _isNonEmptyArray_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(8609);
|
|
46126
46927
|
/* harmony import */ var _stubUndefined_js__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(21504);
|
|
46127
|
-
function _toConsumableArray(
|
|
46928
|
+
function _toConsumableArray(r) { return _arrayWithoutHoles(r) || _iterableToArray(r) || _unsupportedIterableToArray(r) || _nonIterableSpread(); }
|
|
46128
46929
|
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
46129
|
-
function _unsupportedIterableToArray(
|
|
46130
|
-
function _iterableToArray(
|
|
46131
|
-
function _arrayWithoutHoles(
|
|
46132
|
-
function _arrayLikeToArray(
|
|
46930
|
+
function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
|
|
46931
|
+
function _iterableToArray(r) { if ("undefined" != typeof Symbol && null != r[Symbol.iterator] || null != r["@@iterator"]) return Array.from(r); }
|
|
46932
|
+
function _arrayWithoutHoles(r) { if (Array.isArray(r)) return _arrayLikeToArray(r); }
|
|
46933
|
+
function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
|
|
46133
46934
|
|
|
46134
46935
|
|
|
46135
46936
|
/**
|