@swagger-api/apidom-parser-adapter-openapi-json-3-1 0.78.0 → 0.80.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,14 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
# [0.80.0](https://github.com/swagger-api/apidom/compare/v0.79.0...v0.80.0) (2023-10-26)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @swagger-api/apidom-parser-adapter-openapi-json-3-1
|
|
9
|
+
|
|
10
|
+
# [0.79.0](https://github.com/swagger-api/apidom/compare/v0.78.0...v0.79.0) (2023-10-24)
|
|
11
|
+
|
|
12
|
+
**Note:** Version bump only for package @swagger-api/apidom-parser-adapter-openapi-json-3-1
|
|
13
|
+
|
|
6
14
|
# [0.78.0](https://github.com/swagger-api/apidom/compare/v0.77.0...v0.78.0) (2023-10-17)
|
|
7
15
|
|
|
8
16
|
### Bug Fixes
|
|
@@ -15992,7 +15992,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
15992
15992
|
/* harmony export */ mergeAll: () => (/* binding */ mergeAll),
|
|
15993
15993
|
/* harmony export */ visit: () => (/* binding */ visit)
|
|
15994
15994
|
/* harmony export */ });
|
|
15995
|
-
/* harmony import */ var _swagger_api_apidom_error__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
|
|
15995
|
+
/* harmony import */ var _swagger_api_apidom_error__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(69985);
|
|
15996
15996
|
|
|
15997
15997
|
|
|
15998
15998
|
/**
|
|
@@ -16263,7 +16263,9 @@ visitor, {
|
|
|
16263
16263
|
let result;
|
|
16264
16264
|
if (!Array.isArray(node)) {
|
|
16265
16265
|
if (!nodePredicate(node)) {
|
|
16266
|
-
throw new _swagger_api_apidom_error__WEBPACK_IMPORTED_MODULE_0__["default"](`Invalid AST Node: ${
|
|
16266
|
+
throw new _swagger_api_apidom_error__WEBPACK_IMPORTED_MODULE_0__["default"](`Invalid AST Node: ${String(node)}`, {
|
|
16267
|
+
node
|
|
16268
|
+
});
|
|
16267
16269
|
}
|
|
16268
16270
|
|
|
16269
16271
|
// cycle detected; skipping over a sub-tree to avoid recursion
|
|
@@ -16412,7 +16414,9 @@ visitor, {
|
|
|
16412
16414
|
let result;
|
|
16413
16415
|
if (!Array.isArray(node)) {
|
|
16414
16416
|
if (!nodePredicate(node)) {
|
|
16415
|
-
throw new _swagger_api_apidom_error__WEBPACK_IMPORTED_MODULE_0__["default"](`Invalid AST Node:
|
|
16417
|
+
throw new _swagger_api_apidom_error__WEBPACK_IMPORTED_MODULE_0__["default"](`Invalid AST Node: ${String(node)}`, {
|
|
16418
|
+
node
|
|
16419
|
+
});
|
|
16416
16420
|
}
|
|
16417
16421
|
|
|
16418
16422
|
// cycle detected; skipping over a sub-tree to avoid recursion
|
|
@@ -16494,7 +16498,14 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
16494
16498
|
/* harmony export */ });
|
|
16495
16499
|
/* harmony import */ var _swagger_api_apidom_error__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(69985);
|
|
16496
16500
|
|
|
16497
|
-
class CloneError extends _swagger_api_apidom_error__WEBPACK_IMPORTED_MODULE_0__["default"] {
|
|
16501
|
+
class CloneError extends _swagger_api_apidom_error__WEBPACK_IMPORTED_MODULE_0__["default"] {
|
|
16502
|
+
constructor(message, structuredOptions) {
|
|
16503
|
+
super(message, structuredOptions);
|
|
16504
|
+
if (typeof structuredOptions !== 'undefined') {
|
|
16505
|
+
this.value = structuredOptions.source;
|
|
16506
|
+
}
|
|
16507
|
+
}
|
|
16508
|
+
}
|
|
16498
16509
|
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (CloneError);
|
|
16499
16510
|
|
|
16500
16511
|
/***/ }),
|
|
@@ -16539,32 +16550,72 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
16539
16550
|
/* harmony export */ cloneShallow: () => (/* binding */ cloneShallow)
|
|
16540
16551
|
/* harmony export */ });
|
|
16541
16552
|
/* harmony import */ var minim__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(67952);
|
|
16542
|
-
/* harmony import */ var
|
|
16543
|
-
/* harmony import */ var
|
|
16553
|
+
/* harmony import */ var _predicates_index_mjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(36903);
|
|
16554
|
+
/* harmony import */ var _errors_DeepCloneError_mjs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(34646);
|
|
16544
16555
|
/* harmony import */ var _errors_ShallowCloneError_mjs__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(10219);
|
|
16545
16556
|
|
|
16546
16557
|
|
|
16547
16558
|
|
|
16548
16559
|
|
|
16549
|
-
const
|
|
16550
|
-
|
|
16551
|
-
|
|
16560
|
+
const cloneDeep = (value, options = {}) => {
|
|
16561
|
+
const {
|
|
16562
|
+
visited = new WeakMap()
|
|
16563
|
+
} = options;
|
|
16564
|
+
const passThroughOptions = {
|
|
16565
|
+
...options,
|
|
16566
|
+
visited
|
|
16567
|
+
};
|
|
16568
|
+
|
|
16569
|
+
// detect cycle and return memoized value
|
|
16570
|
+
if (visited.has(value)) {
|
|
16571
|
+
return visited.get(value);
|
|
16572
|
+
}
|
|
16573
|
+
if (value instanceof minim__WEBPACK_IMPORTED_MODULE_0__.KeyValuePair) {
|
|
16574
|
+
const {
|
|
16575
|
+
key,
|
|
16576
|
+
value: val
|
|
16577
|
+
} = value;
|
|
16578
|
+
const keyCopy = (0,_predicates_index_mjs__WEBPACK_IMPORTED_MODULE_1__.isElement)(key) ? cloneDeep(key, passThroughOptions) : key;
|
|
16579
|
+
const valueCopy = (0,_predicates_index_mjs__WEBPACK_IMPORTED_MODULE_1__.isElement)(val) ? cloneDeep(val, passThroughOptions) : val;
|
|
16580
|
+
const copy = new minim__WEBPACK_IMPORTED_MODULE_0__.KeyValuePair(keyCopy, valueCopy);
|
|
16581
|
+
visited.set(value, copy);
|
|
16582
|
+
return copy;
|
|
16552
16583
|
}
|
|
16553
|
-
return value;
|
|
16554
|
-
};
|
|
16555
|
-
const cloneDeep = value => {
|
|
16556
16584
|
if (value instanceof minim__WEBPACK_IMPORTED_MODULE_0__.ObjectSlice) {
|
|
16557
|
-
const
|
|
16558
|
-
|
|
16585
|
+
const mapper = element => cloneDeep(element, passThroughOptions);
|
|
16586
|
+
const items = [...value].map(mapper);
|
|
16587
|
+
const copy = new minim__WEBPACK_IMPORTED_MODULE_0__.ObjectSlice(items);
|
|
16588
|
+
visited.set(value, copy);
|
|
16589
|
+
return copy;
|
|
16559
16590
|
}
|
|
16560
16591
|
if (value instanceof minim__WEBPACK_IMPORTED_MODULE_0__.ArraySlice) {
|
|
16561
|
-
const
|
|
16562
|
-
|
|
16592
|
+
const mapper = element => cloneDeep(element, passThroughOptions);
|
|
16593
|
+
const items = [...value].map(mapper);
|
|
16594
|
+
const copy = new minim__WEBPACK_IMPORTED_MODULE_0__.ArraySlice(items);
|
|
16595
|
+
visited.set(value, copy);
|
|
16596
|
+
return copy;
|
|
16563
16597
|
}
|
|
16564
|
-
if (
|
|
16565
|
-
|
|
16598
|
+
if ((0,_predicates_index_mjs__WEBPACK_IMPORTED_MODULE_1__.isElement)(value)) {
|
|
16599
|
+
const copy = cloneShallow(value); // eslint-disable-line @typescript-eslint/no-use-before-define
|
|
16600
|
+
|
|
16601
|
+
visited.set(value, copy);
|
|
16602
|
+
if (value.content) {
|
|
16603
|
+
if ((0,_predicates_index_mjs__WEBPACK_IMPORTED_MODULE_1__.isElement)(value.content)) {
|
|
16604
|
+
copy.content = cloneDeep(value.content, passThroughOptions);
|
|
16605
|
+
} else if (value.content instanceof minim__WEBPACK_IMPORTED_MODULE_0__.KeyValuePair) {
|
|
16606
|
+
copy.content = cloneDeep(value.content, passThroughOptions);
|
|
16607
|
+
} else if (Array.isArray(value.content)) {
|
|
16608
|
+
const mapper = element => cloneDeep(element, passThroughOptions);
|
|
16609
|
+
copy.content = value.content.map(mapper);
|
|
16610
|
+
} else {
|
|
16611
|
+
copy.content = value.content;
|
|
16612
|
+
}
|
|
16613
|
+
} else {
|
|
16614
|
+
copy.content = value.content;
|
|
16615
|
+
}
|
|
16616
|
+
return copy;
|
|
16566
16617
|
}
|
|
16567
|
-
throw new
|
|
16618
|
+
throw new _errors_DeepCloneError_mjs__WEBPACK_IMPORTED_MODULE_2__["default"]("Value provided to cloneDeep function couldn't be cloned", {
|
|
16568
16619
|
value
|
|
16569
16620
|
});
|
|
16570
16621
|
};
|
|
@@ -16602,7 +16653,7 @@ const cloneShallowElement = element => {
|
|
|
16602
16653
|
if (element.attributes.length > 0) {
|
|
16603
16654
|
copy._attributes = cloneDeep(element.attributes);
|
|
16604
16655
|
}
|
|
16605
|
-
if ((0,
|
|
16656
|
+
if ((0,_predicates_index_mjs__WEBPACK_IMPORTED_MODULE_1__.isElement)(element.content)) {
|
|
16606
16657
|
const content = element.content;
|
|
16607
16658
|
copy.content = cloneShallowElement(content);
|
|
16608
16659
|
} else if (Array.isArray(element.content)) {
|
|
@@ -16626,7 +16677,7 @@ const cloneShallow = value => {
|
|
|
16626
16677
|
if (value instanceof minim__WEBPACK_IMPORTED_MODULE_0__.ArraySlice) {
|
|
16627
16678
|
return cloneShallowArraySlice(value);
|
|
16628
16679
|
}
|
|
16629
|
-
if ((0,
|
|
16680
|
+
if ((0,_predicates_index_mjs__WEBPACK_IMPORTED_MODULE_1__.isElement)(value)) {
|
|
16630
16681
|
return cloneShallowElement(value);
|
|
16631
16682
|
}
|
|
16632
16683
|
throw new _errors_ShallowCloneError_mjs__WEBPACK_IMPORTED_MODULE_3__["default"]("Value provided to cloneShallow function couldn't be cloned", {
|
|
@@ -16870,19 +16921,25 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
16870
16921
|
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__),
|
|
16871
16922
|
/* harmony export */ isElementType: () => (/* binding */ isElementType)
|
|
16872
16923
|
/* harmony export */ });
|
|
16873
|
-
|
|
16874
|
-
|
|
16875
|
-
const
|
|
16876
|
-
|
|
16877
|
-
return (obj === null || obj === void 0 || (_obj$primitive = obj.primitive) === null || _obj$primitive === void 0 ? void 0 : _obj$primitive.call(obj)) === val;
|
|
16924
|
+
/* harmony import */ var minim__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(67952);
|
|
16925
|
+
|
|
16926
|
+
const hasMethod = (name, element) => {
|
|
16927
|
+
return typeof element === 'object' && element !== null && name in element && typeof element[name] === 'function';
|
|
16878
16928
|
};
|
|
16879
|
-
const
|
|
16880
|
-
|
|
16881
|
-
|
|
16929
|
+
const hasBasicElementProps = element => typeof element === 'object' && element != null && '_storedElement' in element && typeof element._storedElement === 'string' &&
|
|
16930
|
+
// eslint-disable-line no-underscore-dangle
|
|
16931
|
+
'_content' in element;
|
|
16932
|
+
const primitiveEq = (val, element) => {
|
|
16933
|
+
if (typeof element === 'object' && element !== null && 'primitive' in element) {
|
|
16934
|
+
return typeof element.primitive === 'function' && element.primitive() === val;
|
|
16935
|
+
}
|
|
16936
|
+
return false;
|
|
16882
16937
|
};
|
|
16883
|
-
const
|
|
16938
|
+
const hasClass = (cls, element) => {
|
|
16939
|
+
return typeof element === 'object' && element !== null && 'classes' in element && (Array.isArray(element.classes) || element.classes instanceof minim__WEBPACK_IMPORTED_MODULE_0__.ArrayElement) && element.classes.includes(cls);
|
|
16940
|
+
};
|
|
16941
|
+
const isElementType = (name, element) => typeof element === 'object' && element !== null && 'element' in element && element.element === name;
|
|
16884
16942
|
const createPredicate = predicateCreator => {
|
|
16885
|
-
// @ts-ignore
|
|
16886
16943
|
return predicateCreator({
|
|
16887
16944
|
hasMethod,
|
|
16888
16945
|
hasBasicElementProps,
|
|
@@ -17033,8 +17090,7 @@ const isPrimitiveElement = element => {
|
|
|
17033
17090
|
return (0,_helpers_mjs__WEBPACK_IMPORTED_MODULE_1__.isElementType)('object', element) || (0,_helpers_mjs__WEBPACK_IMPORTED_MODULE_1__.isElementType)('array', element) || (0,_helpers_mjs__WEBPACK_IMPORTED_MODULE_1__.isElementType)('boolean', element) || (0,_helpers_mjs__WEBPACK_IMPORTED_MODULE_1__.isElementType)('number', element) || (0,_helpers_mjs__WEBPACK_IMPORTED_MODULE_1__.isElementType)('string', element) || (0,_helpers_mjs__WEBPACK_IMPORTED_MODULE_1__.isElementType)('null', element) || (0,_helpers_mjs__WEBPACK_IMPORTED_MODULE_1__.isElementType)('member', element);
|
|
17034
17091
|
};
|
|
17035
17092
|
const hasElementSourceMap = element => {
|
|
17036
|
-
|
|
17037
|
-
return isSourceMapElement(element === null || element === void 0 || (_element$meta = element.meta) === null || _element$meta === void 0 || (_element$meta$get = _element$meta.get) === null || _element$meta$get === void 0 ? void 0 : _element$meta$get.call(_element$meta, 'sourceMap'));
|
|
17093
|
+
return isSourceMapElement(element.meta.get('sourceMap'));
|
|
17038
17094
|
};
|
|
17039
17095
|
const includesSymbols = (symbols, element) => {
|
|
17040
17096
|
if (symbols.length === 0) {
|