@swagger-api/apidom-parser-adapter-openapi-yaml-3-1 0.71.0 → 0.72.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.72.0](https://github.com/swagger-api/apidom/compare/v0.71.1...v0.72.0) (2023-07-17)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @swagger-api/apidom-parser-adapter-openapi-yaml-3-1
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
6
14
|
# [0.71.0](https://github.com/swagger-api/apidom/compare/v0.70.4...v0.71.0) (2023-07-13)
|
|
7
15
|
|
|
8
16
|
**Note:** Version bump only for package @swagger-api/apidom-parser-adapter-openapi-yaml-3-1
|
|
@@ -30357,10 +30357,10 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
30357
30357
|
/* harmony export */ mediaTypes: () => (/* reexport safe */ _adapter_js__WEBPACK_IMPORTED_MODULE_0__["default"]),
|
|
30358
30358
|
/* harmony export */ namespace: () => (/* reexport safe */ _adapter_js__WEBPACK_IMPORTED_MODULE_1__.namespace),
|
|
30359
30359
|
/* harmony export */ parse: () => (/* binding */ parse),
|
|
30360
|
-
/* harmony export */ syntacticAnalysis: () => (/* reexport safe */
|
|
30360
|
+
/* harmony export */ syntacticAnalysis: () => (/* reexport safe */ _syntactic_analysis_indirect_index_js__WEBPACK_IMPORTED_MODULE_3__["default"])
|
|
30361
30361
|
/* harmony export */ });
|
|
30362
30362
|
/* harmony import */ var _lexical_analysis_browser_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(77829);
|
|
30363
|
-
/* harmony import */ var
|
|
30363
|
+
/* harmony import */ var _syntactic_analysis_indirect_index_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(75595);
|
|
30364
30364
|
/* harmony import */ var _adapter_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(99659);
|
|
30365
30365
|
/* harmony import */ var _adapter_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(13631);
|
|
30366
30366
|
|
|
@@ -30379,7 +30379,7 @@ const parse = async (source, {
|
|
|
30379
30379
|
sourceMap = false
|
|
30380
30380
|
} = {}) => {
|
|
30381
30381
|
const cst = await (0,_lexical_analysis_browser_js__WEBPACK_IMPORTED_MODULE_2__["default"])(source);
|
|
30382
|
-
return (0,
|
|
30382
|
+
return (0,_syntactic_analysis_indirect_index_js__WEBPACK_IMPORTED_MODULE_3__["default"])(cst, {
|
|
30383
30383
|
sourceMap
|
|
30384
30384
|
});
|
|
30385
30385
|
};
|
|
@@ -30503,7 +30503,7 @@ const mediaTypes = new YamlMediaTypes('text/yaml', 'application/yaml');
|
|
|
30503
30503
|
|
|
30504
30504
|
/***/ }),
|
|
30505
30505
|
|
|
30506
|
-
/***/
|
|
30506
|
+
/***/ 70893:
|
|
30507
30507
|
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
|
|
30508
30508
|
|
|
30509
30509
|
"use strict";
|
|
@@ -30511,10 +30511,213 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
30511
30511
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
30512
30512
|
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
30513
30513
|
/* harmony export */ });
|
|
30514
|
-
/* harmony import */ var
|
|
30515
|
-
/* harmony import */ var
|
|
30516
|
-
|
|
30517
|
-
|
|
30514
|
+
/* harmony import */ var _babel_runtime_corejs3_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(28936);
|
|
30515
|
+
/* harmony import */ var _TreeCursorSyntaxNode_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(39135);
|
|
30516
|
+
|
|
30517
|
+
let _Symbol$iterator;
|
|
30518
|
+
|
|
30519
|
+
_Symbol$iterator = Symbol.iterator;
|
|
30520
|
+
class TreeCursorIterator {
|
|
30521
|
+
constructor(cursor) {
|
|
30522
|
+
(0,_babel_runtime_corejs3_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__["default"])(this, "cursor", void 0);
|
|
30523
|
+
this.cursor = cursor;
|
|
30524
|
+
}
|
|
30525
|
+
stream() {
|
|
30526
|
+
return new _TreeCursorSyntaxNode_js__WEBPACK_IMPORTED_MODULE_1__["default"](this.cursor);
|
|
30527
|
+
}
|
|
30528
|
+
yaml_directive() {
|
|
30529
|
+
return new _TreeCursorSyntaxNode_js__WEBPACK_IMPORTED_MODULE_1__["default"](this.cursor);
|
|
30530
|
+
}
|
|
30531
|
+
tag_directive() {
|
|
30532
|
+
return new _TreeCursorSyntaxNode_js__WEBPACK_IMPORTED_MODULE_1__["default"](this.cursor);
|
|
30533
|
+
}
|
|
30534
|
+
reserved_directive() {
|
|
30535
|
+
return new _TreeCursorSyntaxNode_js__WEBPACK_IMPORTED_MODULE_1__["default"](this.cursor);
|
|
30536
|
+
}
|
|
30537
|
+
document() {
|
|
30538
|
+
return new _TreeCursorSyntaxNode_js__WEBPACK_IMPORTED_MODULE_1__["default"](this.cursor);
|
|
30539
|
+
}
|
|
30540
|
+
block_node() {
|
|
30541
|
+
return new _TreeCursorSyntaxNode_js__WEBPACK_IMPORTED_MODULE_1__["default"](this.cursor).setFieldName(this.cursor);
|
|
30542
|
+
}
|
|
30543
|
+
flow_node() {
|
|
30544
|
+
return new _TreeCursorSyntaxNode_js__WEBPACK_IMPORTED_MODULE_1__["default"](this.cursor).setFieldName(this.cursor);
|
|
30545
|
+
}
|
|
30546
|
+
block_mapping() {
|
|
30547
|
+
return new _TreeCursorSyntaxNode_js__WEBPACK_IMPORTED_MODULE_1__["default"](this.cursor);
|
|
30548
|
+
}
|
|
30549
|
+
block_mapping_pair() {
|
|
30550
|
+
return new _TreeCursorSyntaxNode_js__WEBPACK_IMPORTED_MODULE_1__["default"](this.cursor);
|
|
30551
|
+
}
|
|
30552
|
+
flow_mapping() {
|
|
30553
|
+
return new _TreeCursorSyntaxNode_js__WEBPACK_IMPORTED_MODULE_1__["default"](this.cursor);
|
|
30554
|
+
}
|
|
30555
|
+
flow_pair() {
|
|
30556
|
+
return new _TreeCursorSyntaxNode_js__WEBPACK_IMPORTED_MODULE_1__["default"](this.cursor);
|
|
30557
|
+
}
|
|
30558
|
+
block_sequence() {
|
|
30559
|
+
return new _TreeCursorSyntaxNode_js__WEBPACK_IMPORTED_MODULE_1__["default"](this.cursor);
|
|
30560
|
+
}
|
|
30561
|
+
block_sequence_item() {
|
|
30562
|
+
return new _TreeCursorSyntaxNode_js__WEBPACK_IMPORTED_MODULE_1__["default"](this.cursor);
|
|
30563
|
+
}
|
|
30564
|
+
flow_sequence() {
|
|
30565
|
+
return new _TreeCursorSyntaxNode_js__WEBPACK_IMPORTED_MODULE_1__["default"](this.cursor);
|
|
30566
|
+
}
|
|
30567
|
+
plain_scalar() {
|
|
30568
|
+
return new _TreeCursorSyntaxNode_js__WEBPACK_IMPORTED_MODULE_1__["default"](this.cursor);
|
|
30569
|
+
}
|
|
30570
|
+
single_quote_scalar() {
|
|
30571
|
+
return new _TreeCursorSyntaxNode_js__WEBPACK_IMPORTED_MODULE_1__["default"](this.cursor);
|
|
30572
|
+
}
|
|
30573
|
+
double_quote_scalar() {
|
|
30574
|
+
return new _TreeCursorSyntaxNode_js__WEBPACK_IMPORTED_MODULE_1__["default"](this.cursor);
|
|
30575
|
+
}
|
|
30576
|
+
block_scalar() {
|
|
30577
|
+
return new _TreeCursorSyntaxNode_js__WEBPACK_IMPORTED_MODULE_1__["default"](this.cursor);
|
|
30578
|
+
}
|
|
30579
|
+
ERROR() {
|
|
30580
|
+
return new _TreeCursorSyntaxNode_js__WEBPACK_IMPORTED_MODULE_1__["default"](this.cursor).setHasError(this.cursor);
|
|
30581
|
+
}
|
|
30582
|
+
*[_Symbol$iterator]() {
|
|
30583
|
+
let node;
|
|
30584
|
+
if (this.cursor.nodeType in this) {
|
|
30585
|
+
// @ts-ignore
|
|
30586
|
+
node = this[this.cursor.nodeType]();
|
|
30587
|
+
} else {
|
|
30588
|
+
node = new _TreeCursorSyntaxNode_js__WEBPACK_IMPORTED_MODULE_1__["default"](this.cursor);
|
|
30589
|
+
}
|
|
30590
|
+
if (this.cursor.gotoFirstChild()) {
|
|
30591
|
+
const [firstChild] = new TreeCursorIterator(this.cursor);
|
|
30592
|
+
node.pushChildren(firstChild);
|
|
30593
|
+
while (this.cursor.gotoNextSibling()) {
|
|
30594
|
+
const firstChildSiblings = Array.from(new TreeCursorIterator(this.cursor));
|
|
30595
|
+
node.pushChildren(...firstChildSiblings);
|
|
30596
|
+
}
|
|
30597
|
+
node.children.reduce((previousNode, currentNode) => {
|
|
30598
|
+
currentNode.setPreviousSibling(previousNode);
|
|
30599
|
+
return currentNode;
|
|
30600
|
+
}, undefined);
|
|
30601
|
+
this.cursor.gotoParent();
|
|
30602
|
+
}
|
|
30603
|
+
yield node;
|
|
30604
|
+
}
|
|
30605
|
+
}
|
|
30606
|
+
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (TreeCursorIterator);
|
|
30607
|
+
|
|
30608
|
+
/***/ }),
|
|
30609
|
+
|
|
30610
|
+
/***/ 39135:
|
|
30611
|
+
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
|
|
30612
|
+
|
|
30613
|
+
"use strict";
|
|
30614
|
+
__webpack_require__.r(__webpack_exports__);
|
|
30615
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
30616
|
+
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
30617
|
+
/* harmony export */ });
|
|
30618
|
+
/* harmony import */ var _babel_runtime_corejs3_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(28936);
|
|
30619
|
+
|
|
30620
|
+
class TreeCursorSyntaxNode {
|
|
30621
|
+
constructor(cursor) {
|
|
30622
|
+
(0,_babel_runtime_corejs3_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__["default"])(this, "type", void 0);
|
|
30623
|
+
(0,_babel_runtime_corejs3_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__["default"])(this, "startPosition", void 0);
|
|
30624
|
+
(0,_babel_runtime_corejs3_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__["default"])(this, "endPosition", void 0);
|
|
30625
|
+
(0,_babel_runtime_corejs3_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__["default"])(this, "startIndex", void 0);
|
|
30626
|
+
(0,_babel_runtime_corejs3_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__["default"])(this, "endIndex", void 0);
|
|
30627
|
+
(0,_babel_runtime_corejs3_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__["default"])(this, "text", void 0);
|
|
30628
|
+
(0,_babel_runtime_corejs3_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__["default"])(this, "isNamed", void 0);
|
|
30629
|
+
(0,_babel_runtime_corejs3_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__["default"])(this, "isMissing", void 0);
|
|
30630
|
+
(0,_babel_runtime_corejs3_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__["default"])(this, "fieldName", void 0);
|
|
30631
|
+
(0,_babel_runtime_corejs3_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__["default"])(this, "hasError", false);
|
|
30632
|
+
(0,_babel_runtime_corejs3_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__["default"])(this, "children", []);
|
|
30633
|
+
(0,_babel_runtime_corejs3_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__["default"])(this, "previousSibling", void 0);
|
|
30634
|
+
this.type = cursor.nodeType;
|
|
30635
|
+
this.startPosition = cursor.startPosition;
|
|
30636
|
+
this.endPosition = cursor.endPosition;
|
|
30637
|
+
this.startIndex = cursor.startIndex;
|
|
30638
|
+
this.endIndex = cursor.endIndex;
|
|
30639
|
+
this.text = cursor.nodeText;
|
|
30640
|
+
this.isNamed = cursor.nodeIsNamed;
|
|
30641
|
+
this.isMissing = cursor.nodeIsMissing;
|
|
30642
|
+
}
|
|
30643
|
+
get keyNode() {
|
|
30644
|
+
if (this.type === 'flow_pair' || this.type === 'block_mapping_pair') {
|
|
30645
|
+
return this.children.find(node => node.fieldName === 'key');
|
|
30646
|
+
}
|
|
30647
|
+
return undefined;
|
|
30648
|
+
}
|
|
30649
|
+
get valueNode() {
|
|
30650
|
+
if (this.type === 'flow_pair' || this.type === 'block_mapping_pair') {
|
|
30651
|
+
return this.children.find(node => node.fieldName === 'value');
|
|
30652
|
+
}
|
|
30653
|
+
return undefined;
|
|
30654
|
+
}
|
|
30655
|
+
get tag() {
|
|
30656
|
+
let {
|
|
30657
|
+
previousSibling
|
|
30658
|
+
} = this;
|
|
30659
|
+
while (typeof previousSibling !== 'undefined' && previousSibling.type !== 'tag') {
|
|
30660
|
+
({
|
|
30661
|
+
previousSibling
|
|
30662
|
+
} = previousSibling);
|
|
30663
|
+
}
|
|
30664
|
+
return previousSibling;
|
|
30665
|
+
}
|
|
30666
|
+
get anchor() {
|
|
30667
|
+
let {
|
|
30668
|
+
previousSibling
|
|
30669
|
+
} = this;
|
|
30670
|
+
while (typeof previousSibling !== 'undefined' && previousSibling.type !== 'anchor') {
|
|
30671
|
+
({
|
|
30672
|
+
previousSibling
|
|
30673
|
+
} = previousSibling);
|
|
30674
|
+
}
|
|
30675
|
+
return previousSibling;
|
|
30676
|
+
}
|
|
30677
|
+
get firstNamedChild() {
|
|
30678
|
+
return this.children.find(node => node.isNamed);
|
|
30679
|
+
}
|
|
30680
|
+
setFieldName(cursor) {
|
|
30681
|
+
if (typeof cursor.currentFieldName === 'function') {
|
|
30682
|
+
this.fieldName = cursor.currentFieldName();
|
|
30683
|
+
} else {
|
|
30684
|
+
this.fieldName = cursor.currentFieldName;
|
|
30685
|
+
}
|
|
30686
|
+
return this;
|
|
30687
|
+
}
|
|
30688
|
+
setHasError(cursor) {
|
|
30689
|
+
if (typeof cursor.currentNode === 'function') {
|
|
30690
|
+
this.hasError = cursor.currentNode().hasError();
|
|
30691
|
+
} else {
|
|
30692
|
+
this.hasError = cursor.currentNode.hasError();
|
|
30693
|
+
}
|
|
30694
|
+
return this;
|
|
30695
|
+
}
|
|
30696
|
+
setPreviousSibling(previousSibling) {
|
|
30697
|
+
this.previousSibling = previousSibling;
|
|
30698
|
+
}
|
|
30699
|
+
pushChildren(...children) {
|
|
30700
|
+
this.children.push(...children);
|
|
30701
|
+
}
|
|
30702
|
+
}
|
|
30703
|
+
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (TreeCursorSyntaxNode);
|
|
30704
|
+
|
|
30705
|
+
/***/ }),
|
|
30706
|
+
|
|
30707
|
+
/***/ 75595:
|
|
30708
|
+
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
|
|
30709
|
+
|
|
30710
|
+
"use strict";
|
|
30711
|
+
__webpack_require__.r(__webpack_exports__);
|
|
30712
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
30713
|
+
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
30714
|
+
/* harmony export */ });
|
|
30715
|
+
/* harmony import */ var _swagger_api_apidom_ast__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(73150);
|
|
30716
|
+
/* harmony import */ var _swagger_api_apidom_ast__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(49925);
|
|
30717
|
+
/* harmony import */ var _visitors_CstVisitor_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(44105);
|
|
30718
|
+
/* harmony import */ var _visitors_YamlAstVisitor_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(95000);
|
|
30719
|
+
/* harmony import */ var _TreeCursorIterator_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(70893);
|
|
30720
|
+
|
|
30518
30721
|
|
|
30519
30722
|
|
|
30520
30723
|
|
|
@@ -30526,25 +30729,26 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
30526
30729
|
const analyze = (cst, {
|
|
30527
30730
|
sourceMap = false
|
|
30528
30731
|
} = {}) => {
|
|
30529
|
-
const
|
|
30530
|
-
const
|
|
30531
|
-
const
|
|
30532
|
-
const
|
|
30732
|
+
const cursor = cst.walk();
|
|
30733
|
+
const iterator = new _TreeCursorIterator_js__WEBPACK_IMPORTED_MODULE_0__["default"](cursor);
|
|
30734
|
+
const rootNode = [...iterator].at(0);
|
|
30735
|
+
const cstVisitor = (0,_visitors_CstVisitor_js__WEBPACK_IMPORTED_MODULE_1__["default"])();
|
|
30736
|
+
const astVisitor = (0,_visitors_YamlAstVisitor_js__WEBPACK_IMPORTED_MODULE_2__["default"])();
|
|
30737
|
+
const schema = (0,_swagger_api_apidom_ast__WEBPACK_IMPORTED_MODULE_3__["default"])();
|
|
30738
|
+
const yamlAst = (0,_swagger_api_apidom_ast__WEBPACK_IMPORTED_MODULE_4__.visit)(rootNode, cstVisitor, {
|
|
30533
30739
|
// @ts-ignore
|
|
30534
|
-
keyMap:
|
|
30535
|
-
nodePredicate:
|
|
30740
|
+
keyMap: _visitors_CstVisitor_js__WEBPACK_IMPORTED_MODULE_1__.keyMap,
|
|
30741
|
+
nodePredicate: _visitors_CstVisitor_js__WEBPACK_IMPORTED_MODULE_1__.isNode,
|
|
30536
30742
|
state: {
|
|
30537
30743
|
schema,
|
|
30538
30744
|
sourceMap
|
|
30539
30745
|
}
|
|
30540
30746
|
});
|
|
30541
|
-
return (0,
|
|
30542
|
-
// @ts-ignore
|
|
30543
|
-
keyMap: _visitors_YamlAstVisitor_js__WEBPACK_IMPORTED_MODULE_1__.keyMap,
|
|
30544
|
-
// @ts-ignore
|
|
30545
|
-
nodeTypeGetter: _visitors_YamlAstVisitor_js__WEBPACK_IMPORTED_MODULE_1__.getNodeType,
|
|
30747
|
+
return (0,_swagger_api_apidom_ast__WEBPACK_IMPORTED_MODULE_4__.visit)(yamlAst.rootNode, astVisitor, {
|
|
30546
30748
|
// @ts-ignore
|
|
30547
|
-
|
|
30749
|
+
keyMap: _visitors_YamlAstVisitor_js__WEBPACK_IMPORTED_MODULE_2__.keyMap,
|
|
30750
|
+
nodeTypeGetter: _visitors_YamlAstVisitor_js__WEBPACK_IMPORTED_MODULE_2__.getNodeType,
|
|
30751
|
+
nodePredicate: _visitors_YamlAstVisitor_js__WEBPACK_IMPORTED_MODULE_2__.isNode,
|
|
30548
30752
|
state: {
|
|
30549
30753
|
sourceMap
|
|
30550
30754
|
}
|
|
@@ -30554,7 +30758,7 @@ const analyze = (cst, {
|
|
|
30554
30758
|
|
|
30555
30759
|
/***/ }),
|
|
30556
30760
|
|
|
30557
|
-
/***/
|
|
30761
|
+
/***/ 44105:
|
|
30558
30762
|
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
|
|
30559
30763
|
|
|
30560
30764
|
"use strict";
|
|
@@ -30571,16 +30775,18 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
30571
30775
|
/* harmony import */ var _swagger_api_apidom_ast__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(14207);
|
|
30572
30776
|
/* harmony import */ var _swagger_api_apidom_ast__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(14138);
|
|
30573
30777
|
/* harmony import */ var _swagger_api_apidom_ast__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(4542);
|
|
30574
|
-
/* harmony import */ var
|
|
30575
|
-
/* harmony import */ var
|
|
30576
|
-
/* harmony import */ var
|
|
30577
|
-
/* harmony import */ var
|
|
30578
|
-
/* harmony import */ var
|
|
30579
|
-
/* harmony import */ var
|
|
30580
|
-
/* harmony import */ var
|
|
30581
|
-
/* harmony import */ var
|
|
30582
|
-
/* harmony import */ var
|
|
30583
|
-
/* harmony import */ var
|
|
30778
|
+
/* harmony import */ var _swagger_api_apidom_ast__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(67172);
|
|
30779
|
+
/* harmony import */ var _swagger_api_apidom_ast__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(76719);
|
|
30780
|
+
/* harmony import */ var _swagger_api_apidom_ast__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(49727);
|
|
30781
|
+
/* harmony import */ var _swagger_api_apidom_ast__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(92665);
|
|
30782
|
+
/* harmony import */ var _swagger_api_apidom_ast__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(50415);
|
|
30783
|
+
/* harmony import */ var _swagger_api_apidom_ast__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(10033);
|
|
30784
|
+
/* harmony import */ var _swagger_api_apidom_ast__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(43156);
|
|
30785
|
+
/* harmony import */ var _swagger_api_apidom_ast__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(60635);
|
|
30786
|
+
/* harmony import */ var _swagger_api_apidom_ast__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(19503);
|
|
30787
|
+
/* harmony import */ var _swagger_api_apidom_ast__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(30720);
|
|
30788
|
+
/* harmony import */ var _TreeCursorSyntaxNode_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(39135);
|
|
30789
|
+
|
|
30584
30790
|
|
|
30585
30791
|
|
|
30586
30792
|
const keyMap = {
|
|
@@ -30607,9 +30813,6 @@ const CstVisitor = stampit__WEBPACK_IMPORTED_MODULE_0__({
|
|
|
30607
30813
|
*/
|
|
30608
30814
|
|
|
30609
30815
|
const toPosition = node => {
|
|
30610
|
-
if (node === null) {
|
|
30611
|
-
return null;
|
|
30612
|
-
}
|
|
30613
30816
|
const start = (0,_swagger_api_apidom_ast__WEBPACK_IMPORTED_MODULE_2__.Point)({
|
|
30614
30817
|
row: node.startPosition.row,
|
|
30615
30818
|
column: node.startPosition.column,
|
|
@@ -30626,20 +30829,14 @@ const CstVisitor = stampit__WEBPACK_IMPORTED_MODULE_0__({
|
|
|
30626
30829
|
});
|
|
30627
30830
|
};
|
|
30628
30831
|
const kindNodeToYamlTag = node => {
|
|
30629
|
-
|
|
30630
|
-
|
|
30631
|
-
previousSibling
|
|
30832
|
+
const {
|
|
30833
|
+
tag: tagNode
|
|
30632
30834
|
} = node;
|
|
30633
|
-
|
|
30634
|
-
({
|
|
30635
|
-
previousSibling
|
|
30636
|
-
} = previousSibling);
|
|
30637
|
-
}
|
|
30638
|
-
const explicitName = (_previousSibling = previousSibling) !== null && _previousSibling !== void 0 && _previousSibling.text || node.type === 'plain_scalar' ? '?' : '!';
|
|
30835
|
+
const explicitName = tagNode !== null && tagNode !== void 0 && tagNode.text || node.type === 'plain_scalar' ? '?' : '!';
|
|
30639
30836
|
|
|
30640
30837
|
// eslint-disable-next-line no-nested-ternary
|
|
30641
30838
|
const kind = node.type.endsWith('mapping') ? _swagger_api_apidom_ast__WEBPACK_IMPORTED_MODULE_3__.YamlNodeKind.Mapping : node.type.endsWith('sequence') ? _swagger_api_apidom_ast__WEBPACK_IMPORTED_MODULE_3__.YamlNodeKind.Sequence : _swagger_api_apidom_ast__WEBPACK_IMPORTED_MODULE_3__.YamlNodeKind.Scalar;
|
|
30642
|
-
const position = toPosition(
|
|
30839
|
+
const position = tagNode ? toPosition(tagNode) : null;
|
|
30643
30840
|
return (0,_swagger_api_apidom_ast__WEBPACK_IMPORTED_MODULE_3__["default"])({
|
|
30644
30841
|
explicitName,
|
|
30645
30842
|
kind,
|
|
@@ -30647,53 +30844,32 @@ const CstVisitor = stampit__WEBPACK_IMPORTED_MODULE_0__({
|
|
|
30647
30844
|
});
|
|
30648
30845
|
};
|
|
30649
30846
|
const kindNodeToYamlAnchor = node => {
|
|
30650
|
-
|
|
30651
|
-
|
|
30847
|
+
const {
|
|
30848
|
+
anchor: anchorNode
|
|
30652
30849
|
} = node;
|
|
30653
|
-
|
|
30654
|
-
({
|
|
30655
|
-
previousSibling
|
|
30656
|
-
} = previousSibling);
|
|
30657
|
-
}
|
|
30658
|
-
if (previousSibling === null) {
|
|
30659
|
-
return null;
|
|
30660
|
-
}
|
|
30850
|
+
if (typeof anchorNode === 'undefined') return null;
|
|
30661
30851
|
return (0,_swagger_api_apidom_ast__WEBPACK_IMPORTED_MODULE_4__["default"])({
|
|
30662
|
-
name:
|
|
30663
|
-
position: toPosition(
|
|
30852
|
+
name: anchorNode.text,
|
|
30853
|
+
position: toPosition(anchorNode)
|
|
30664
30854
|
});
|
|
30665
30855
|
};
|
|
30666
|
-
|
|
30667
|
-
/**
|
|
30668
|
-
* If web-tree-sitter will support keyNode and valueNode this can be further simplified.
|
|
30669
|
-
*/
|
|
30670
30856
|
const isKind = ending => node => typeof (node === null || node === void 0 ? void 0 : node.type) === 'string' && node.type.endsWith(ending);
|
|
30671
30857
|
const isScalar = isKind('scalar');
|
|
30672
30858
|
const isMapping = isKind('mapping');
|
|
30673
30859
|
const isSequence = isKind('sequence');
|
|
30674
|
-
const getFieldFromNode = (fieldName, node) => {
|
|
30675
|
-
var _node$childForFieldNa;
|
|
30676
|
-
return `${fieldName}Node` in node ?
|
|
30677
|
-
// @ts-ignore
|
|
30678
|
-
node[`${fieldName}Node`] : 'childForFieldName' in node ? (_node$childForFieldNa = node.childForFieldName) === null || _node$childForFieldNa === void 0 ? void 0 : _node$childForFieldNa.call(node, fieldName) : null;
|
|
30679
|
-
};
|
|
30680
30860
|
const hasKeyValuePairEmptyKey = node => {
|
|
30681
30861
|
if (node.type !== 'block_mapping_pair' && node.type !== 'flow_pair') {
|
|
30682
30862
|
return false;
|
|
30683
30863
|
}
|
|
30684
|
-
const keyNode = getFieldFromNode('key', node);
|
|
30685
|
-
|
|
30686
30864
|
// keyNode was not explicitly provided; tag and anchor are missing too
|
|
30687
|
-
return keyNode ===
|
|
30865
|
+
return typeof node.keyNode === 'undefined';
|
|
30688
30866
|
};
|
|
30689
30867
|
const hasKeyValuePairEmptyValue = node => {
|
|
30690
30868
|
if (node.type !== 'block_mapping_pair' && node.type !== 'flow_pair') {
|
|
30691
30869
|
return false;
|
|
30692
30870
|
}
|
|
30693
|
-
const valueNode = getFieldFromNode('value', node);
|
|
30694
|
-
|
|
30695
30871
|
// valueNode was not explicitly provided; tag and anchor are missing too
|
|
30696
|
-
return valueNode ===
|
|
30872
|
+
return typeof node.valueNode === 'undefined';
|
|
30697
30873
|
};
|
|
30698
30874
|
const createKeyValuePairEmptyKey = node => {
|
|
30699
30875
|
const emptyPoint = (0,_swagger_api_apidom_ast__WEBPACK_IMPORTED_MODULE_2__.Point)({
|
|
@@ -30701,11 +30877,11 @@ const CstVisitor = stampit__WEBPACK_IMPORTED_MODULE_0__({
|
|
|
30701
30877
|
column: node.startPosition.column,
|
|
30702
30878
|
char: node.startIndex
|
|
30703
30879
|
});
|
|
30704
|
-
const
|
|
30880
|
+
const {
|
|
30881
|
+
keyNode
|
|
30882
|
+
} = node;
|
|
30705
30883
|
const children = (keyNode === null || keyNode === void 0 ? void 0 : keyNode.children) || [];
|
|
30706
|
-
// @ts-ignore
|
|
30707
30884
|
const tagNode = children.find(isKind('tag'));
|
|
30708
|
-
// @ts-ignore
|
|
30709
30885
|
const anchorNode = children.find(isKind('anchor'));
|
|
30710
30886
|
const tag = typeof tagNode !== 'undefined' ? (0,_swagger_api_apidom_ast__WEBPACK_IMPORTED_MODULE_3__["default"])({
|
|
30711
30887
|
explicitName: tagNode.text,
|
|
@@ -30737,11 +30913,11 @@ const CstVisitor = stampit__WEBPACK_IMPORTED_MODULE_0__({
|
|
|
30737
30913
|
column: node.endPosition.column,
|
|
30738
30914
|
char: node.endIndex
|
|
30739
30915
|
});
|
|
30740
|
-
const
|
|
30916
|
+
const {
|
|
30917
|
+
valueNode
|
|
30918
|
+
} = node;
|
|
30741
30919
|
const children = (valueNode === null || valueNode === void 0 ? void 0 : valueNode.children) || [];
|
|
30742
|
-
// @ts-ignore
|
|
30743
30920
|
const tagNode = children.find(isKind('tag'));
|
|
30744
|
-
// @ts-ignore
|
|
30745
30921
|
const anchorNode = children.find(isKind('anchor'));
|
|
30746
30922
|
const tag = typeof tagNode !== 'undefined' ? (0,_swagger_api_apidom_ast__WEBPACK_IMPORTED_MODULE_3__["default"])({
|
|
30747
30923
|
explicitName: tagNode.text,
|
|
@@ -30774,15 +30950,13 @@ const CstVisitor = stampit__WEBPACK_IMPORTED_MODULE_0__({
|
|
|
30774
30950
|
|
|
30775
30951
|
this.enter = function enter(node) {
|
|
30776
30952
|
// missing anonymous literals from CST transformed into AST literal nodes
|
|
30777
|
-
|
|
30778
|
-
// in `SyntaxNode.isNamed` property. web-tree-sitter has it defined as method
|
|
30779
|
-
// whether tree-sitter node binding has it defined as a boolean property.
|
|
30780
|
-
// @ts-ignore
|
|
30781
|
-
if (typeof node.isNamed === 'function' && !node.isNamed() || node.isNamed === false) {
|
|
30953
|
+
if (node instanceof _TreeCursorSyntaxNode_js__WEBPACK_IMPORTED_MODULE_7__["default"] && !node.isNamed) {
|
|
30782
30954
|
const position = toPosition(node);
|
|
30783
30955
|
const value = node.type || node.text;
|
|
30784
|
-
const
|
|
30785
|
-
|
|
30956
|
+
const {
|
|
30957
|
+
isMissing
|
|
30958
|
+
} = node;
|
|
30959
|
+
return (0,_swagger_api_apidom_ast__WEBPACK_IMPORTED_MODULE_8__["default"])({
|
|
30786
30960
|
value,
|
|
30787
30961
|
position,
|
|
30788
30962
|
isMissing
|
|
@@ -30793,14 +30967,14 @@ const CstVisitor = stampit__WEBPACK_IMPORTED_MODULE_0__({
|
|
|
30793
30967
|
this.stream = {
|
|
30794
30968
|
enter(node) {
|
|
30795
30969
|
const position = toPosition(node);
|
|
30796
|
-
return (0,
|
|
30970
|
+
return (0,_swagger_api_apidom_ast__WEBPACK_IMPORTED_MODULE_9__["default"])({
|
|
30797
30971
|
children: node.children,
|
|
30798
30972
|
position,
|
|
30799
|
-
isMissing: node.isMissing
|
|
30973
|
+
isMissing: node.isMissing
|
|
30800
30974
|
});
|
|
30801
30975
|
},
|
|
30802
30976
|
leave(stream) {
|
|
30803
|
-
return (0,
|
|
30977
|
+
return (0,_swagger_api_apidom_ast__WEBPACK_IMPORTED_MODULE_10__["default"])({
|
|
30804
30978
|
children: [stream]
|
|
30805
30979
|
});
|
|
30806
30980
|
}
|
|
@@ -30810,7 +30984,7 @@ const CstVisitor = stampit__WEBPACK_IMPORTED_MODULE_0__({
|
|
|
30810
30984
|
var _node$firstNamedChild;
|
|
30811
30985
|
const position = toPosition(node);
|
|
30812
30986
|
const version = (node === null || node === void 0 || (_node$firstNamedChild = node.firstNamedChild) === null || _node$firstNamedChild === void 0 ? void 0 : _node$firstNamedChild.text) || null;
|
|
30813
|
-
return (0,
|
|
30987
|
+
return (0,_swagger_api_apidom_ast__WEBPACK_IMPORTED_MODULE_11__["default"])({
|
|
30814
30988
|
position,
|
|
30815
30989
|
name: '%YAML',
|
|
30816
30990
|
parameters: {
|
|
@@ -30822,9 +30996,9 @@ const CstVisitor = stampit__WEBPACK_IMPORTED_MODULE_0__({
|
|
|
30822
30996
|
this.tag_directive = {
|
|
30823
30997
|
enter(node) {
|
|
30824
30998
|
const position = toPosition(node);
|
|
30825
|
-
const tagHandleNode = node.
|
|
30826
|
-
const tagPrefixNode = node.
|
|
30827
|
-
const tagDirective = (0,
|
|
30999
|
+
const tagHandleNode = node.children[0];
|
|
31000
|
+
const tagPrefixNode = node.children[1];
|
|
31001
|
+
const tagDirective = (0,_swagger_api_apidom_ast__WEBPACK_IMPORTED_MODULE_11__["default"])({
|
|
30828
31002
|
position,
|
|
30829
31003
|
name: '%TAG',
|
|
30830
31004
|
parameters: {
|
|
@@ -30839,10 +31013,10 @@ const CstVisitor = stampit__WEBPACK_IMPORTED_MODULE_0__({
|
|
|
30839
31013
|
this.reserved_directive = {
|
|
30840
31014
|
enter(node) {
|
|
30841
31015
|
const position = toPosition(node);
|
|
30842
|
-
const directiveNameNode = node.
|
|
30843
|
-
const directiveParameter1Node = node.
|
|
30844
|
-
const directiveParameter2Node = node.
|
|
30845
|
-
return (0,
|
|
31016
|
+
const directiveNameNode = node.children[0];
|
|
31017
|
+
const directiveParameter1Node = node.children[1];
|
|
31018
|
+
const directiveParameter2Node = node.children[2];
|
|
31019
|
+
return (0,_swagger_api_apidom_ast__WEBPACK_IMPORTED_MODULE_11__["default"])({
|
|
30846
31020
|
position,
|
|
30847
31021
|
name: (directiveNameNode === null || directiveNameNode === void 0 ? void 0 : directiveNameNode.text) || null,
|
|
30848
31022
|
parameters: {
|
|
@@ -30855,10 +31029,10 @@ const CstVisitor = stampit__WEBPACK_IMPORTED_MODULE_0__({
|
|
|
30855
31029
|
this.document = {
|
|
30856
31030
|
enter(node) {
|
|
30857
31031
|
const position = toPosition(node);
|
|
30858
|
-
return (0,
|
|
31032
|
+
return (0,_swagger_api_apidom_ast__WEBPACK_IMPORTED_MODULE_12__["default"])({
|
|
30859
31033
|
children: node.children,
|
|
30860
31034
|
position,
|
|
30861
|
-
isMissing: node.isMissing
|
|
31035
|
+
isMissing: node.isMissing
|
|
30862
31036
|
});
|
|
30863
31037
|
},
|
|
30864
31038
|
leave(node) {
|
|
@@ -30914,14 +31088,14 @@ const CstVisitor = stampit__WEBPACK_IMPORTED_MODULE_0__({
|
|
|
30914
31088
|
const position = toPosition(node);
|
|
30915
31089
|
const tag = kindNodeToYamlTag(node);
|
|
30916
31090
|
const anchor = kindNodeToYamlAnchor(node);
|
|
30917
|
-
const mappingNode = (0,
|
|
31091
|
+
const mappingNode = (0,_swagger_api_apidom_ast__WEBPACK_IMPORTED_MODULE_13__["default"])({
|
|
30918
31092
|
children: node.children,
|
|
30919
31093
|
position,
|
|
30920
31094
|
anchor,
|
|
30921
31095
|
tag,
|
|
30922
31096
|
styleGroup: _swagger_api_apidom_ast__WEBPACK_IMPORTED_MODULE_6__.YamlStyleGroup.Block,
|
|
30923
31097
|
style: _swagger_api_apidom_ast__WEBPACK_IMPORTED_MODULE_6__.YamlStyle.NextLine,
|
|
30924
|
-
isMissing: node.isMissing
|
|
31098
|
+
isMissing: node.isMissing
|
|
30925
31099
|
});
|
|
30926
31100
|
return this.schema.resolve(mappingNode);
|
|
30927
31101
|
}
|
|
@@ -30938,11 +31112,11 @@ const CstVisitor = stampit__WEBPACK_IMPORTED_MODULE_0__({
|
|
|
30938
31112
|
const valueNode = createKeyValuePairEmptyValue(node);
|
|
30939
31113
|
children.push(valueNode);
|
|
30940
31114
|
}
|
|
30941
|
-
return (0,
|
|
31115
|
+
return (0,_swagger_api_apidom_ast__WEBPACK_IMPORTED_MODULE_14__["default"])({
|
|
30942
31116
|
children,
|
|
30943
31117
|
position,
|
|
30944
31118
|
styleGroup: _swagger_api_apidom_ast__WEBPACK_IMPORTED_MODULE_6__.YamlStyleGroup.Block,
|
|
30945
|
-
isMissing: node.isMissing
|
|
31119
|
+
isMissing: node.isMissing
|
|
30946
31120
|
});
|
|
30947
31121
|
}
|
|
30948
31122
|
};
|
|
@@ -30951,14 +31125,14 @@ const CstVisitor = stampit__WEBPACK_IMPORTED_MODULE_0__({
|
|
|
30951
31125
|
const position = toPosition(node);
|
|
30952
31126
|
const tag = kindNodeToYamlTag(node);
|
|
30953
31127
|
const anchor = kindNodeToYamlAnchor(node);
|
|
30954
|
-
const mappingNode = (0,
|
|
31128
|
+
const mappingNode = (0,_swagger_api_apidom_ast__WEBPACK_IMPORTED_MODULE_13__["default"])({
|
|
30955
31129
|
children: node.children,
|
|
30956
31130
|
position,
|
|
30957
31131
|
anchor,
|
|
30958
31132
|
tag,
|
|
30959
31133
|
styleGroup: _swagger_api_apidom_ast__WEBPACK_IMPORTED_MODULE_6__.YamlStyleGroup.Flow,
|
|
30960
31134
|
style: _swagger_api_apidom_ast__WEBPACK_IMPORTED_MODULE_6__.YamlStyle.Explicit,
|
|
30961
|
-
isMissing: node.isMissing
|
|
31135
|
+
isMissing: node.isMissing
|
|
30962
31136
|
});
|
|
30963
31137
|
return this.schema.resolve(mappingNode);
|
|
30964
31138
|
}
|
|
@@ -30975,11 +31149,11 @@ const CstVisitor = stampit__WEBPACK_IMPORTED_MODULE_0__({
|
|
|
30975
31149
|
const valueNode = createKeyValuePairEmptyValue(node);
|
|
30976
31150
|
children.push(valueNode);
|
|
30977
31151
|
}
|
|
30978
|
-
return (0,
|
|
31152
|
+
return (0,_swagger_api_apidom_ast__WEBPACK_IMPORTED_MODULE_14__["default"])({
|
|
30979
31153
|
children,
|
|
30980
31154
|
position,
|
|
30981
31155
|
styleGroup: _swagger_api_apidom_ast__WEBPACK_IMPORTED_MODULE_6__.YamlStyleGroup.Flow,
|
|
30982
|
-
isMissing: node.isMissing
|
|
31156
|
+
isMissing: node.isMissing
|
|
30983
31157
|
});
|
|
30984
31158
|
}
|
|
30985
31159
|
};
|
|
@@ -30993,7 +31167,7 @@ const CstVisitor = stampit__WEBPACK_IMPORTED_MODULE_0__({
|
|
|
30993
31167
|
const position = toPosition(node);
|
|
30994
31168
|
const tag = kindNodeToYamlTag(node);
|
|
30995
31169
|
const anchor = kindNodeToYamlAnchor(node);
|
|
30996
|
-
const sequenceNode = (0,
|
|
31170
|
+
const sequenceNode = (0,_swagger_api_apidom_ast__WEBPACK_IMPORTED_MODULE_15__["default"])({
|
|
30997
31171
|
children: node.children,
|
|
30998
31172
|
position,
|
|
30999
31173
|
anchor,
|
|
@@ -31039,7 +31213,7 @@ const CstVisitor = stampit__WEBPACK_IMPORTED_MODULE_0__({
|
|
|
31039
31213
|
const position = toPosition(node);
|
|
31040
31214
|
const tag = kindNodeToYamlTag(node);
|
|
31041
31215
|
const anchor = kindNodeToYamlAnchor(node);
|
|
31042
|
-
const sequenceNode = (0,
|
|
31216
|
+
const sequenceNode = (0,_swagger_api_apidom_ast__WEBPACK_IMPORTED_MODULE_15__["default"])({
|
|
31043
31217
|
children: node.children.flat(),
|
|
31044
31218
|
position,
|
|
31045
31219
|
anchor,
|
|
@@ -31123,22 +31297,22 @@ const CstVisitor = stampit__WEBPACK_IMPORTED_MODULE_0__({
|
|
|
31123
31297
|
};
|
|
31124
31298
|
this.comment = {
|
|
31125
31299
|
enter(node) {
|
|
31126
|
-
return (0,
|
|
31300
|
+
return (0,_swagger_api_apidom_ast__WEBPACK_IMPORTED_MODULE_16__["default"])({
|
|
31127
31301
|
content: node.text
|
|
31128
31302
|
});
|
|
31129
31303
|
}
|
|
31130
31304
|
};
|
|
31131
31305
|
this.ERROR = function ERROR(node, key, parent, path) {
|
|
31132
31306
|
const position = toPosition(node);
|
|
31133
|
-
const errorNode = (0,
|
|
31307
|
+
const errorNode = (0,_swagger_api_apidom_ast__WEBPACK_IMPORTED_MODULE_17__["default"])({
|
|
31134
31308
|
children: node.children,
|
|
31135
31309
|
position,
|
|
31136
|
-
isUnexpected: !node.hasError
|
|
31137
|
-
isMissing: node.isMissing
|
|
31310
|
+
isUnexpected: !node.hasError,
|
|
31311
|
+
isMissing: node.isMissing,
|
|
31138
31312
|
value: node.text
|
|
31139
31313
|
});
|
|
31140
31314
|
if (path.length === 0) {
|
|
31141
|
-
return (0,
|
|
31315
|
+
return (0,_swagger_api_apidom_ast__WEBPACK_IMPORTED_MODULE_10__["default"])({
|
|
31142
31316
|
children: [errorNode]
|
|
31143
31317
|
});
|
|
31144
31318
|
}
|
|
@@ -31150,7 +31324,7 @@ const CstVisitor = stampit__WEBPACK_IMPORTED_MODULE_0__({
|
|
|
31150
31324
|
|
|
31151
31325
|
/***/ }),
|
|
31152
31326
|
|
|
31153
|
-
/***/
|
|
31327
|
+
/***/ 95000:
|
|
31154
31328
|
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
|
|
31155
31329
|
|
|
31156
31330
|
"use strict";
|