@speclynx/apidom-parser-adapter-openapi-json-2 5.0.2 → 5.1.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,10 @@
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
+ # [5.1.0](https://github.com/speclynx/apidom/compare/v5.0.2...v5.1.0) (2026-08-09)
7
+
8
+ **Note:** Version bump only for package @speclynx/apidom-parser-adapter-openapi-json-2
9
+
6
10
  ## [5.0.2](https://github.com/speclynx/apidom/compare/v5.0.1...v5.0.2) (2026-08-04)
7
11
 
8
12
  **Note:** Version bump only for package @speclynx/apidom-parser-adapter-openapi-json-2
@@ -857,7 +857,7 @@ function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object
857
857
  function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
858
858
  function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
859
859
  function _assertClassBrand(e, t, n) { if ("function" == typeof e ? e === t : e.has(t)) return arguments.length < 3 ? t : n; throw new TypeError("Private element is not present on this object"); }
860
-
860
+ ;
861
861
 
862
862
  var _CompositeEvaluationRealm_brand = /*#__PURE__*/new WeakSet();
863
863
  class CompositeEvaluationRealm extends _EvaluationRealm_mjs__WEBPACK_IMPORTED_MODULE_0__["default"] {
@@ -9759,7 +9759,7 @@ function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r)
9759
9759
  function _iterableToArray(r) { if ("undefined" != typeof Symbol && null != r[Symbol.iterator] || null != r["@@iterator"]) return Array.from(r); }
9760
9760
  function _arrayWithoutHoles(r) { if (Array.isArray(r)) return _arrayLikeToArray(r); }
9761
9761
  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; }
9762
-
9762
+ ;
9763
9763
 
9764
9764
  /**
9765
9765
  * Can be used as a way to compose multiple invokers together to form polymorphic functions,
@@ -20241,7 +20241,7 @@ __webpack_require__.r(__webpack_exports__);
20241
20241
  * @public
20242
20242
  */
20243
20243
  const emptyElement = element => {
20244
- const meta = !element.isMetaEmpty ? element.meta.cloneDeep() : undefined;
20244
+ const meta = !element.isMetaEmpty ? (0,_speclynx_apidom_datamodel__WEBPACK_IMPORTED_MODULE_1__.cloneDeep)(element.meta) : undefined;
20245
20245
  const attributes = !element.isAttributesEmpty ? (0,_speclynx_apidom_datamodel__WEBPACK_IMPORTED_MODULE_1__.cloneDeep)(element.attributes) : undefined;
20246
20246
 
20247
20247
  // @ts-ignore
@@ -20257,7 +20257,7 @@ const getMergeFunction = (keyElement, options) => {
20257
20257
  };
20258
20258
  const getMetaMergeFunction = options => {
20259
20259
  if (typeof options.customMetaMerge !== 'function') {
20260
- return targetMeta => targetMeta.cloneDeep();
20260
+ return targetMeta => (0,_speclynx_apidom_datamodel__WEBPACK_IMPORTED_MODULE_1__.cloneDeep)(targetMeta);
20261
20261
  }
20262
20262
  return options.customMetaMerge;
20263
20263
  };
@@ -20332,9 +20332,9 @@ const deepmerge = (targetElement, sourceElement, options) => {
20332
20332
  if (!targetElement.isMetaEmpty && !sourceElement.isMetaEmpty) {
20333
20333
  mergedElement.meta = getMetaMergeFunction(mergedOptions)(targetElement.meta, sourceElement.meta);
20334
20334
  } else if (!targetElement.isMetaEmpty) {
20335
- mergedElement.meta = targetElement.meta.cloneDeep();
20335
+ mergedElement.meta = (0,_speclynx_apidom_datamodel__WEBPACK_IMPORTED_MODULE_1__.cloneDeep)(targetElement.meta);
20336
20336
  } else if (!sourceElement.isMetaEmpty) {
20337
- mergedElement.meta = sourceElement.meta.cloneDeep();
20337
+ mergedElement.meta = (0,_speclynx_apidom_datamodel__WEBPACK_IMPORTED_MODULE_1__.cloneDeep)(sourceElement.meta);
20338
20338
  }
20339
20339
  if (!targetElement.isAttributesEmpty && !sourceElement.isAttributesEmpty) {
20340
20340
  mergedElement.attributes = getAttributesMergeFunction(mergedOptions)(targetElement.attributes, sourceElement.attributes);
@@ -21312,19 +21312,21 @@ class ShallowCloneError extends _CloneError_mjs__WEBPACK_IMPORTED_MODULE_0__["de
21312
21312
  "use strict";
21313
21313
  __webpack_require__.r(__webpack_exports__);
21314
21314
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
21315
- /* harmony export */ CloneError: () => (/* reexport safe */ _errors_CloneError_mjs__WEBPACK_IMPORTED_MODULE_8__["default"]),
21316
- /* harmony export */ DeepCloneError: () => (/* reexport safe */ _errors_DeepCloneError_mjs__WEBPACK_IMPORTED_MODULE_6__["default"]),
21317
- /* harmony export */ ShallowCloneError: () => (/* reexport safe */ _errors_ShallowCloneError_mjs__WEBPACK_IMPORTED_MODULE_7__["default"])
21315
+ /* harmony export */ CloneError: () => (/* reexport safe */ _errors_CloneError_mjs__WEBPACK_IMPORTED_MODULE_9__["default"]),
21316
+ /* harmony export */ DeepCloneError: () => (/* reexport safe */ _errors_DeepCloneError_mjs__WEBPACK_IMPORTED_MODULE_7__["default"]),
21317
+ /* harmony export */ ShallowCloneError: () => (/* reexport safe */ _errors_ShallowCloneError_mjs__WEBPACK_IMPORTED_MODULE_8__["default"])
21318
21318
  /* harmony export */ });
21319
21319
  /* harmony import */ var ramda__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(8138);
21320
21320
  /* harmony import */ var _ObjectSlice_mjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(8504);
21321
21321
  /* harmony import */ var _KeyValuePair_mjs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(6663);
21322
- /* harmony import */ var _predicates_index_mjs__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(8252);
21323
- /* harmony import */ var _predicates_index_mjs__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(5162);
21324
- /* harmony import */ var _elements_SourceMap_mjs__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(5810);
21325
- /* harmony import */ var _errors_DeepCloneError_mjs__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(5018);
21326
- /* harmony import */ var _errors_ShallowCloneError_mjs__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(3686);
21327
- /* harmony import */ var _errors_CloneError_mjs__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(3772);
21322
+ /* harmony import */ var _Metadata_mjs__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(1844);
21323
+ /* harmony import */ var _predicates_index_mjs__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(8252);
21324
+ /* harmony import */ var _predicates_index_mjs__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(5162);
21325
+ /* harmony import */ var _elements_SourceMap_mjs__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(5810);
21326
+ /* harmony import */ var _errors_DeepCloneError_mjs__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(5018);
21327
+ /* harmony import */ var _errors_ShallowCloneError_mjs__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(3686);
21328
+ /* harmony import */ var _errors_CloneError_mjs__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(3772);
21329
+
21328
21330
 
21329
21331
 
21330
21332
 
@@ -21358,7 +21360,7 @@ const cloneDeepElement = (element, options) => {
21358
21360
  } = element;
21359
21361
  if (Array.isArray(content)) {
21360
21362
  copy.content = content.map(el => cloneDeepElement(el, passThroughOptions));
21361
- } else if ((0,_predicates_index_mjs__WEBPACK_IMPORTED_MODULE_4__.isElement)(content)) {
21363
+ } else if ((0,_predicates_index_mjs__WEBPACK_IMPORTED_MODULE_5__.isElement)(content)) {
21362
21364
  copy.content = cloneDeepElement(content, passThroughOptions);
21363
21365
  } else if (content instanceof _KeyValuePair_mjs__WEBPACK_IMPORTED_MODULE_2__["default"]) {
21364
21366
  copy.content = cloneDeepKeyValuePair(content, passThroughOptions);
@@ -21406,7 +21408,7 @@ const cloneDeepObjectSlice = (slice, options) => {
21406
21408
  };
21407
21409
 
21408
21410
  /**
21409
- * Creates a deep clone of an ApiDOM Element, KeyValuePair, or ObjectSlice.
21411
+ * Creates a deep clone of an ApiDOM Element, KeyValuePair, ObjectSlice, or Metadata.
21410
21412
  * Handles cycles by memoizing visited objects.
21411
21413
  * @public
21412
21414
  */
@@ -21417,10 +21419,13 @@ const cloneDeep = (value, options = {}) => {
21417
21419
  if (value instanceof _ObjectSlice_mjs__WEBPACK_IMPORTED_MODULE_1__["default"]) {
21418
21420
  return cloneDeepObjectSlice(value, options);
21419
21421
  }
21420
- if ((0,_predicates_index_mjs__WEBPACK_IMPORTED_MODULE_4__.isElement)(value)) {
21422
+ if (value instanceof _Metadata_mjs__WEBPACK_IMPORTED_MODULE_3__["default"]) {
21423
+ return value.cloneDeep();
21424
+ }
21425
+ if ((0,_predicates_index_mjs__WEBPACK_IMPORTED_MODULE_5__.isElement)(value)) {
21421
21426
  return cloneDeepElement(value, options);
21422
21427
  }
21423
- throw new _errors_DeepCloneError_mjs__WEBPACK_IMPORTED_MODULE_6__["default"]("Value provided to cloneDeep function couldn't be cloned", {
21428
+ throw new _errors_DeepCloneError_mjs__WEBPACK_IMPORTED_MODULE_7__["default"]("Value provided to cloneDeep function couldn't be cloned", {
21424
21429
  value
21425
21430
  });
21426
21431
  };
@@ -21447,21 +21452,21 @@ const cloneShallowElement = element => {
21447
21452
  const copy = new Ctor();
21448
21453
  copy.element = element.element;
21449
21454
  if (!element.isMetaEmpty) {
21450
- copy.meta = element.meta.cloneDeep();
21455
+ copy.meta = cloneDeep(element.meta);
21451
21456
  }
21452
21457
  if (!element.isAttributesEmpty) {
21453
21458
  copy.attributes = cloneDeep(element.attributes);
21454
21459
  }
21455
- if ((0,_predicates_index_mjs__WEBPACK_IMPORTED_MODULE_3__.hasElementSourceMap)(element)) {
21456
- _elements_SourceMap_mjs__WEBPACK_IMPORTED_MODULE_5__["default"].transfer(element, copy);
21460
+ if ((0,_predicates_index_mjs__WEBPACK_IMPORTED_MODULE_4__.hasElementSourceMap)(element)) {
21461
+ _elements_SourceMap_mjs__WEBPACK_IMPORTED_MODULE_6__["default"].transfer(element, copy);
21457
21462
  }
21458
- if ((0,_predicates_index_mjs__WEBPACK_IMPORTED_MODULE_3__.hasElementStyle)(element)) {
21463
+ if ((0,_predicates_index_mjs__WEBPACK_IMPORTED_MODULE_4__.hasElementStyle)(element)) {
21459
21464
  copy.style = (0,ramda__WEBPACK_IMPORTED_MODULE_0__["default"])(element.style);
21460
21465
  }
21461
21466
  const {
21462
21467
  content
21463
21468
  } = element;
21464
- if ((0,_predicates_index_mjs__WEBPACK_IMPORTED_MODULE_4__.isElement)(content)) {
21469
+ if ((0,_predicates_index_mjs__WEBPACK_IMPORTED_MODULE_5__.isElement)(content)) {
21465
21470
  copy.content = cloneShallowElement(content);
21466
21471
  } else if (Array.isArray(content)) {
21467
21472
  copy.content = [...content];
@@ -21474,7 +21479,7 @@ const cloneShallowElement = element => {
21474
21479
  };
21475
21480
 
21476
21481
  /**
21477
- * Creates a shallow clone of an ApiDOM Element, KeyValuePair, or ObjectSlice.
21482
+ * Creates a shallow clone of an ApiDOM Element, KeyValuePair, ObjectSlice, or Metadata.
21478
21483
  * The element itself is cloned, but content references are shared.
21479
21484
  * Meta and attributes are deep cloned to preserve semantic information.
21480
21485
  * @public
@@ -21486,10 +21491,13 @@ const cloneShallow = value => {
21486
21491
  if (value instanceof _ObjectSlice_mjs__WEBPACK_IMPORTED_MODULE_1__["default"]) {
21487
21492
  return cloneShallowObjectSlice(value);
21488
21493
  }
21489
- if ((0,_predicates_index_mjs__WEBPACK_IMPORTED_MODULE_4__.isElement)(value)) {
21494
+ if (value instanceof _Metadata_mjs__WEBPACK_IMPORTED_MODULE_3__["default"]) {
21495
+ return value.cloneShallow();
21496
+ }
21497
+ if ((0,_predicates_index_mjs__WEBPACK_IMPORTED_MODULE_5__.isElement)(value)) {
21490
21498
  return cloneShallowElement(value);
21491
21499
  }
21492
- throw new _errors_ShallowCloneError_mjs__WEBPACK_IMPORTED_MODULE_7__["default"]("Value provided to cloneShallow function couldn't be cloned", {
21500
+ throw new _errors_ShallowCloneError_mjs__WEBPACK_IMPORTED_MODULE_8__["default"]("Value provided to cloneShallow function couldn't be cloned", {
21493
21501
  value
21494
21502
  });
21495
21503
  };
@@ -24914,7 +24922,7 @@ class SpecificationVisitor extends _Visitor_mjs__WEBPACK_IMPORTED_MODULE_6__["de
24914
24922
  if (visitor instanceof _FallbackVisitor_mjs__WEBPACK_IMPORTED_MODULE_7__["default"] && visitor?.constructor === _FallbackVisitor_mjs__WEBPACK_IMPORTED_MODULE_7__["default"]) {
24915
24923
  return this.consume ? element : (0,_speclynx_apidom_datamodel__WEBPACK_IMPORTED_MODULE_4__.cloneDeep)(element);
24916
24924
  }
24917
- (0,_speclynx_apidom_traverse__WEBPACK_IMPORTED_MODULE_5__.traverse)(element, visitor, options);
24925
+ ;(0,_speclynx_apidom_traverse__WEBPACK_IMPORTED_MODULE_5__.traverse)(element, visitor, options);
24918
24926
  return visitor.element;
24919
24927
  }
24920
24928
  }
@@ -24956,7 +24964,7 @@ class Visitor {
24956
24964
  if (!from.isMetaEmpty && !to.isMetaEmpty) {
24957
24965
  to.meta = to.meta.merge(from.meta);
24958
24966
  } else if (!from.isMetaEmpty) {
24959
- to.meta = from.meta.cloneDeep();
24967
+ to.meta = (0,_speclynx_apidom_datamodel__WEBPACK_IMPORTED_MODULE_1__.cloneDeep)(from.meta);
24960
24968
  }
24961
24969
  if (!from.isAttributesEmpty && !to.isAttributesEmpty) {
24962
24970
  to.attributes = (0,_speclynx_apidom_core__WEBPACK_IMPORTED_MODULE_0__["default"])(to.attributes, from.attributes);
@@ -29559,7 +29567,7 @@ class SpecificationVisitor extends _Visitor_mjs__WEBPACK_IMPORTED_MODULE_6__["de
29559
29567
  if (visitor instanceof _FallbackVisitor_mjs__WEBPACK_IMPORTED_MODULE_7__["default"] && visitor?.constructor === _FallbackVisitor_mjs__WEBPACK_IMPORTED_MODULE_7__["default"]) {
29560
29568
  return this.consume ? element : (0,_speclynx_apidom_datamodel__WEBPACK_IMPORTED_MODULE_4__.cloneDeep)(element);
29561
29569
  }
29562
- (0,_speclynx_apidom_traverse__WEBPACK_IMPORTED_MODULE_5__.traverse)(element, visitor);
29570
+ ;(0,_speclynx_apidom_traverse__WEBPACK_IMPORTED_MODULE_5__.traverse)(element, visitor);
29563
29571
  return visitor.element;
29564
29572
  }
29565
29573
  }
@@ -29601,7 +29609,7 @@ class Visitor {
29601
29609
  if (!from.isMetaEmpty && !to.isMetaEmpty) {
29602
29610
  to.meta = to.meta.merge(from.meta);
29603
29611
  } else if (!from.isMetaEmpty) {
29604
- to.meta = from.meta.cloneDeep();
29612
+ to.meta = (0,_speclynx_apidom_datamodel__WEBPACK_IMPORTED_MODULE_1__.cloneDeep)(from.meta);
29605
29613
  }
29606
29614
  if (!from.isAttributesEmpty && !to.isAttributesEmpty) {
29607
29615
  to.attributes = (0,_speclynx_apidom_core__WEBPACK_IMPORTED_MODULE_0__["default"])(to.attributes, from.attributes);
@@ -29994,6 +30002,7 @@ class ConsumesVisitor extends _FallbackVisitor_mjs__WEBPACK_IMPORTED_MODULE_2__[
29994
30002
  ArrayElement(path) {
29995
30003
  const arrayElement = path.node;
29996
30004
  this.element = this.element.concat((0,_speclynx_apidom_datamodel__WEBPACK_IMPORTED_MODULE_0__.cloneDeep)(arrayElement));
30005
+ this.copyMetaAndAttributes(arrayElement, this.element);
29997
30006
  path.stop();
29998
30007
  }
29999
30008
  }
@@ -30051,6 +30060,7 @@ class ProducesVisitor extends _FallbackVisitor_mjs__WEBPACK_IMPORTED_MODULE_2__[
30051
30060
  ArrayElement(path) {
30052
30061
  const arrayElement = path.node;
30053
30062
  this.element = this.element.concat((0,_speclynx_apidom_datamodel__WEBPACK_IMPORTED_MODULE_0__.cloneDeep)(arrayElement));
30063
+ this.copyMetaAndAttributes(arrayElement, this.element);
30054
30064
  path.stop();
30055
30065
  }
30056
30066
  }
@@ -30084,6 +30094,7 @@ class SchemesVisitor extends _FallbackVisitor_mjs__WEBPACK_IMPORTED_MODULE_2__["
30084
30094
  ArrayElement(path) {
30085
30095
  const arrayElement = path.node;
30086
30096
  this.element = this.element.concat((0,_speclynx_apidom_datamodel__WEBPACK_IMPORTED_MODULE_0__.cloneDeep)(arrayElement));
30097
+ this.copyMetaAndAttributes(arrayElement, this.element);
30087
30098
  path.stop();
30088
30099
  }
30089
30100
  }
@@ -30652,6 +30663,7 @@ class ConsumesVisitor extends _FallbackVisitor_mjs__WEBPACK_IMPORTED_MODULE_2__[
30652
30663
  ArrayElement(path) {
30653
30664
  const arrayElement = path.node;
30654
30665
  this.element = this.element.concat((0,_speclynx_apidom_datamodel__WEBPACK_IMPORTED_MODULE_0__.cloneDeep)(arrayElement));
30666
+ this.copyMetaAndAttributes(arrayElement, this.element);
30655
30667
  path.stop();
30656
30668
  }
30657
30669
  }
@@ -30728,6 +30740,7 @@ class ProducesVisitor extends _FallbackVisitor_mjs__WEBPACK_IMPORTED_MODULE_2__[
30728
30740
  ArrayElement(path) {
30729
30741
  const arrayElement = path.node;
30730
30742
  this.element = this.element.concat((0,_speclynx_apidom_datamodel__WEBPACK_IMPORTED_MODULE_0__.cloneDeep)(arrayElement));
30743
+ this.copyMetaAndAttributes(arrayElement, this.element);
30731
30744
  path.stop();
30732
30745
  }
30733
30746
  }
@@ -30761,6 +30774,7 @@ class SchemesVisitor extends _FallbackVisitor_mjs__WEBPACK_IMPORTED_MODULE_2__["
30761
30774
  ArrayElement(path) {
30762
30775
  const arrayElement = path.node;
30763
30776
  this.element = this.element.concat((0,_speclynx_apidom_datamodel__WEBPACK_IMPORTED_MODULE_0__.cloneDeep)(arrayElement));
30777
+ this.copyMetaAndAttributes(arrayElement, this.element);
30764
30778
  path.stop();
30765
30779
  }
30766
30780
  }
@@ -30830,6 +30844,7 @@ class TagsVisitor extends _FallbackVisitor_mjs__WEBPACK_IMPORTED_MODULE_2__["def
30830
30844
  ArrayElement(path) {
30831
30845
  const arrayElement = path.node;
30832
30846
  this.element = this.element.concat((0,_speclynx_apidom_datamodel__WEBPACK_IMPORTED_MODULE_0__.cloneDeep)(arrayElement));
30847
+ this.copyMetaAndAttributes(arrayElement, this.element);
30833
30848
  path.stop();
30834
30849
  }
30835
30850
  }
@@ -32789,7 +32804,7 @@ const forEach = (element, options) => {
32789
32804
  callback = options.callback ?? (() => {});
32790
32805
  predicate = options.predicate ?? (() => true);
32791
32806
  }
32792
- (0,_traversal_mjs__WEBPACK_IMPORTED_MODULE_0__.traverse)(element, {
32807
+ ;(0,_traversal_mjs__WEBPACK_IMPORTED_MODULE_0__.traverse)(element, {
32793
32808
  enter(path) {
32794
32809
  if (predicate(path)) {
32795
32810
  callback(path);