@swagger-api/apidom-parser-adapter-api-design-systems-yaml 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-api-design-systems-yaml
|
|
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-api-design-systems-yaml
|
|
@@ -15746,10 +15746,10 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
15746
15746
|
/* harmony export */ mediaTypes: () => (/* reexport safe */ _adapter_js__WEBPACK_IMPORTED_MODULE_0__["default"]),
|
|
15747
15747
|
/* harmony export */ namespace: () => (/* reexport safe */ _adapter_js__WEBPACK_IMPORTED_MODULE_1__.namespace),
|
|
15748
15748
|
/* harmony export */ parse: () => (/* binding */ parse),
|
|
15749
|
-
/* harmony export */ syntacticAnalysis: () => (/* reexport safe */
|
|
15749
|
+
/* harmony export */ syntacticAnalysis: () => (/* reexport safe */ _syntactic_analysis_indirect_index_js__WEBPACK_IMPORTED_MODULE_3__["default"])
|
|
15750
15750
|
/* harmony export */ });
|
|
15751
15751
|
/* harmony import */ var _lexical_analysis_browser_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(77829);
|
|
15752
|
-
/* harmony import */ var
|
|
15752
|
+
/* harmony import */ var _syntactic_analysis_indirect_index_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(75595);
|
|
15753
15753
|
/* harmony import */ var _adapter_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(99659);
|
|
15754
15754
|
/* harmony import */ var _adapter_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(13631);
|
|
15755
15755
|
|
|
@@ -15768,7 +15768,7 @@ const parse = async (source, {
|
|
|
15768
15768
|
sourceMap = false
|
|
15769
15769
|
} = {}) => {
|
|
15770
15770
|
const cst = await (0,_lexical_analysis_browser_js__WEBPACK_IMPORTED_MODULE_2__["default"])(source);
|
|
15771
|
-
return (0,
|
|
15771
|
+
return (0,_syntactic_analysis_indirect_index_js__WEBPACK_IMPORTED_MODULE_3__["default"])(cst, {
|
|
15772
15772
|
sourceMap
|
|
15773
15773
|
});
|
|
15774
15774
|
};
|
|
@@ -15892,7 +15892,7 @@ const mediaTypes = new YamlMediaTypes('text/yaml', 'application/yaml');
|
|
|
15892
15892
|
|
|
15893
15893
|
/***/ }),
|
|
15894
15894
|
|
|
15895
|
-
/***/
|
|
15895
|
+
/***/ 70893:
|
|
15896
15896
|
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
|
|
15897
15897
|
|
|
15898
15898
|
"use strict";
|
|
@@ -15900,10 +15900,213 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
15900
15900
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
15901
15901
|
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
15902
15902
|
/* harmony export */ });
|
|
15903
|
-
/* harmony import */ var
|
|
15904
|
-
/* harmony import */ var
|
|
15905
|
-
|
|
15906
|
-
|
|
15903
|
+
/* harmony import */ var _babel_runtime_corejs3_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(28936);
|
|
15904
|
+
/* harmony import */ var _TreeCursorSyntaxNode_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(39135);
|
|
15905
|
+
|
|
15906
|
+
let _Symbol$iterator;
|
|
15907
|
+
|
|
15908
|
+
_Symbol$iterator = Symbol.iterator;
|
|
15909
|
+
class TreeCursorIterator {
|
|
15910
|
+
constructor(cursor) {
|
|
15911
|
+
(0,_babel_runtime_corejs3_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__["default"])(this, "cursor", void 0);
|
|
15912
|
+
this.cursor = cursor;
|
|
15913
|
+
}
|
|
15914
|
+
stream() {
|
|
15915
|
+
return new _TreeCursorSyntaxNode_js__WEBPACK_IMPORTED_MODULE_1__["default"](this.cursor);
|
|
15916
|
+
}
|
|
15917
|
+
yaml_directive() {
|
|
15918
|
+
return new _TreeCursorSyntaxNode_js__WEBPACK_IMPORTED_MODULE_1__["default"](this.cursor);
|
|
15919
|
+
}
|
|
15920
|
+
tag_directive() {
|
|
15921
|
+
return new _TreeCursorSyntaxNode_js__WEBPACK_IMPORTED_MODULE_1__["default"](this.cursor);
|
|
15922
|
+
}
|
|
15923
|
+
reserved_directive() {
|
|
15924
|
+
return new _TreeCursorSyntaxNode_js__WEBPACK_IMPORTED_MODULE_1__["default"](this.cursor);
|
|
15925
|
+
}
|
|
15926
|
+
document() {
|
|
15927
|
+
return new _TreeCursorSyntaxNode_js__WEBPACK_IMPORTED_MODULE_1__["default"](this.cursor);
|
|
15928
|
+
}
|
|
15929
|
+
block_node() {
|
|
15930
|
+
return new _TreeCursorSyntaxNode_js__WEBPACK_IMPORTED_MODULE_1__["default"](this.cursor).setFieldName(this.cursor);
|
|
15931
|
+
}
|
|
15932
|
+
flow_node() {
|
|
15933
|
+
return new _TreeCursorSyntaxNode_js__WEBPACK_IMPORTED_MODULE_1__["default"](this.cursor).setFieldName(this.cursor);
|
|
15934
|
+
}
|
|
15935
|
+
block_mapping() {
|
|
15936
|
+
return new _TreeCursorSyntaxNode_js__WEBPACK_IMPORTED_MODULE_1__["default"](this.cursor);
|
|
15937
|
+
}
|
|
15938
|
+
block_mapping_pair() {
|
|
15939
|
+
return new _TreeCursorSyntaxNode_js__WEBPACK_IMPORTED_MODULE_1__["default"](this.cursor);
|
|
15940
|
+
}
|
|
15941
|
+
flow_mapping() {
|
|
15942
|
+
return new _TreeCursorSyntaxNode_js__WEBPACK_IMPORTED_MODULE_1__["default"](this.cursor);
|
|
15943
|
+
}
|
|
15944
|
+
flow_pair() {
|
|
15945
|
+
return new _TreeCursorSyntaxNode_js__WEBPACK_IMPORTED_MODULE_1__["default"](this.cursor);
|
|
15946
|
+
}
|
|
15947
|
+
block_sequence() {
|
|
15948
|
+
return new _TreeCursorSyntaxNode_js__WEBPACK_IMPORTED_MODULE_1__["default"](this.cursor);
|
|
15949
|
+
}
|
|
15950
|
+
block_sequence_item() {
|
|
15951
|
+
return new _TreeCursorSyntaxNode_js__WEBPACK_IMPORTED_MODULE_1__["default"](this.cursor);
|
|
15952
|
+
}
|
|
15953
|
+
flow_sequence() {
|
|
15954
|
+
return new _TreeCursorSyntaxNode_js__WEBPACK_IMPORTED_MODULE_1__["default"](this.cursor);
|
|
15955
|
+
}
|
|
15956
|
+
plain_scalar() {
|
|
15957
|
+
return new _TreeCursorSyntaxNode_js__WEBPACK_IMPORTED_MODULE_1__["default"](this.cursor);
|
|
15958
|
+
}
|
|
15959
|
+
single_quote_scalar() {
|
|
15960
|
+
return new _TreeCursorSyntaxNode_js__WEBPACK_IMPORTED_MODULE_1__["default"](this.cursor);
|
|
15961
|
+
}
|
|
15962
|
+
double_quote_scalar() {
|
|
15963
|
+
return new _TreeCursorSyntaxNode_js__WEBPACK_IMPORTED_MODULE_1__["default"](this.cursor);
|
|
15964
|
+
}
|
|
15965
|
+
block_scalar() {
|
|
15966
|
+
return new _TreeCursorSyntaxNode_js__WEBPACK_IMPORTED_MODULE_1__["default"](this.cursor);
|
|
15967
|
+
}
|
|
15968
|
+
ERROR() {
|
|
15969
|
+
return new _TreeCursorSyntaxNode_js__WEBPACK_IMPORTED_MODULE_1__["default"](this.cursor).setHasError(this.cursor);
|
|
15970
|
+
}
|
|
15971
|
+
*[_Symbol$iterator]() {
|
|
15972
|
+
let node;
|
|
15973
|
+
if (this.cursor.nodeType in this) {
|
|
15974
|
+
// @ts-ignore
|
|
15975
|
+
node = this[this.cursor.nodeType]();
|
|
15976
|
+
} else {
|
|
15977
|
+
node = new _TreeCursorSyntaxNode_js__WEBPACK_IMPORTED_MODULE_1__["default"](this.cursor);
|
|
15978
|
+
}
|
|
15979
|
+
if (this.cursor.gotoFirstChild()) {
|
|
15980
|
+
const [firstChild] = new TreeCursorIterator(this.cursor);
|
|
15981
|
+
node.pushChildren(firstChild);
|
|
15982
|
+
while (this.cursor.gotoNextSibling()) {
|
|
15983
|
+
const firstChildSiblings = Array.from(new TreeCursorIterator(this.cursor));
|
|
15984
|
+
node.pushChildren(...firstChildSiblings);
|
|
15985
|
+
}
|
|
15986
|
+
node.children.reduce((previousNode, currentNode) => {
|
|
15987
|
+
currentNode.setPreviousSibling(previousNode);
|
|
15988
|
+
return currentNode;
|
|
15989
|
+
}, undefined);
|
|
15990
|
+
this.cursor.gotoParent();
|
|
15991
|
+
}
|
|
15992
|
+
yield node;
|
|
15993
|
+
}
|
|
15994
|
+
}
|
|
15995
|
+
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (TreeCursorIterator);
|
|
15996
|
+
|
|
15997
|
+
/***/ }),
|
|
15998
|
+
|
|
15999
|
+
/***/ 39135:
|
|
16000
|
+
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
|
|
16001
|
+
|
|
16002
|
+
"use strict";
|
|
16003
|
+
__webpack_require__.r(__webpack_exports__);
|
|
16004
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
16005
|
+
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
16006
|
+
/* harmony export */ });
|
|
16007
|
+
/* harmony import */ var _babel_runtime_corejs3_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(28936);
|
|
16008
|
+
|
|
16009
|
+
class TreeCursorSyntaxNode {
|
|
16010
|
+
constructor(cursor) {
|
|
16011
|
+
(0,_babel_runtime_corejs3_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__["default"])(this, "type", void 0);
|
|
16012
|
+
(0,_babel_runtime_corejs3_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__["default"])(this, "startPosition", void 0);
|
|
16013
|
+
(0,_babel_runtime_corejs3_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__["default"])(this, "endPosition", void 0);
|
|
16014
|
+
(0,_babel_runtime_corejs3_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__["default"])(this, "startIndex", void 0);
|
|
16015
|
+
(0,_babel_runtime_corejs3_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__["default"])(this, "endIndex", void 0);
|
|
16016
|
+
(0,_babel_runtime_corejs3_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__["default"])(this, "text", void 0);
|
|
16017
|
+
(0,_babel_runtime_corejs3_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__["default"])(this, "isNamed", void 0);
|
|
16018
|
+
(0,_babel_runtime_corejs3_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__["default"])(this, "isMissing", void 0);
|
|
16019
|
+
(0,_babel_runtime_corejs3_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__["default"])(this, "fieldName", void 0);
|
|
16020
|
+
(0,_babel_runtime_corejs3_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__["default"])(this, "hasError", false);
|
|
16021
|
+
(0,_babel_runtime_corejs3_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__["default"])(this, "children", []);
|
|
16022
|
+
(0,_babel_runtime_corejs3_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__["default"])(this, "previousSibling", void 0);
|
|
16023
|
+
this.type = cursor.nodeType;
|
|
16024
|
+
this.startPosition = cursor.startPosition;
|
|
16025
|
+
this.endPosition = cursor.endPosition;
|
|
16026
|
+
this.startIndex = cursor.startIndex;
|
|
16027
|
+
this.endIndex = cursor.endIndex;
|
|
16028
|
+
this.text = cursor.nodeText;
|
|
16029
|
+
this.isNamed = cursor.nodeIsNamed;
|
|
16030
|
+
this.isMissing = cursor.nodeIsMissing;
|
|
16031
|
+
}
|
|
16032
|
+
get keyNode() {
|
|
16033
|
+
if (this.type === 'flow_pair' || this.type === 'block_mapping_pair') {
|
|
16034
|
+
return this.children.find(node => node.fieldName === 'key');
|
|
16035
|
+
}
|
|
16036
|
+
return undefined;
|
|
16037
|
+
}
|
|
16038
|
+
get valueNode() {
|
|
16039
|
+
if (this.type === 'flow_pair' || this.type === 'block_mapping_pair') {
|
|
16040
|
+
return this.children.find(node => node.fieldName === 'value');
|
|
16041
|
+
}
|
|
16042
|
+
return undefined;
|
|
16043
|
+
}
|
|
16044
|
+
get tag() {
|
|
16045
|
+
let {
|
|
16046
|
+
previousSibling
|
|
16047
|
+
} = this;
|
|
16048
|
+
while (typeof previousSibling !== 'undefined' && previousSibling.type !== 'tag') {
|
|
16049
|
+
({
|
|
16050
|
+
previousSibling
|
|
16051
|
+
} = previousSibling);
|
|
16052
|
+
}
|
|
16053
|
+
return previousSibling;
|
|
16054
|
+
}
|
|
16055
|
+
get anchor() {
|
|
16056
|
+
let {
|
|
16057
|
+
previousSibling
|
|
16058
|
+
} = this;
|
|
16059
|
+
while (typeof previousSibling !== 'undefined' && previousSibling.type !== 'anchor') {
|
|
16060
|
+
({
|
|
16061
|
+
previousSibling
|
|
16062
|
+
} = previousSibling);
|
|
16063
|
+
}
|
|
16064
|
+
return previousSibling;
|
|
16065
|
+
}
|
|
16066
|
+
get firstNamedChild() {
|
|
16067
|
+
return this.children.find(node => node.isNamed);
|
|
16068
|
+
}
|
|
16069
|
+
setFieldName(cursor) {
|
|
16070
|
+
if (typeof cursor.currentFieldName === 'function') {
|
|
16071
|
+
this.fieldName = cursor.currentFieldName();
|
|
16072
|
+
} else {
|
|
16073
|
+
this.fieldName = cursor.currentFieldName;
|
|
16074
|
+
}
|
|
16075
|
+
return this;
|
|
16076
|
+
}
|
|
16077
|
+
setHasError(cursor) {
|
|
16078
|
+
if (typeof cursor.currentNode === 'function') {
|
|
16079
|
+
this.hasError = cursor.currentNode().hasError();
|
|
16080
|
+
} else {
|
|
16081
|
+
this.hasError = cursor.currentNode.hasError();
|
|
16082
|
+
}
|
|
16083
|
+
return this;
|
|
16084
|
+
}
|
|
16085
|
+
setPreviousSibling(previousSibling) {
|
|
16086
|
+
this.previousSibling = previousSibling;
|
|
16087
|
+
}
|
|
16088
|
+
pushChildren(...children) {
|
|
16089
|
+
this.children.push(...children);
|
|
16090
|
+
}
|
|
16091
|
+
}
|
|
16092
|
+
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (TreeCursorSyntaxNode);
|
|
16093
|
+
|
|
16094
|
+
/***/ }),
|
|
16095
|
+
|
|
16096
|
+
/***/ 75595:
|
|
16097
|
+
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
|
|
16098
|
+
|
|
16099
|
+
"use strict";
|
|
16100
|
+
__webpack_require__.r(__webpack_exports__);
|
|
16101
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
16102
|
+
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
16103
|
+
/* harmony export */ });
|
|
16104
|
+
/* harmony import */ var _swagger_api_apidom_ast__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(73150);
|
|
16105
|
+
/* harmony import */ var _swagger_api_apidom_ast__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(49925);
|
|
16106
|
+
/* harmony import */ var _visitors_CstVisitor_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(44105);
|
|
16107
|
+
/* harmony import */ var _visitors_YamlAstVisitor_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(95000);
|
|
16108
|
+
/* harmony import */ var _TreeCursorIterator_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(70893);
|
|
16109
|
+
|
|
15907
16110
|
|
|
15908
16111
|
|
|
15909
16112
|
|
|
@@ -15915,25 +16118,26 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
15915
16118
|
const analyze = (cst, {
|
|
15916
16119
|
sourceMap = false
|
|
15917
16120
|
} = {}) => {
|
|
15918
|
-
const
|
|
15919
|
-
const
|
|
15920
|
-
const
|
|
15921
|
-
const
|
|
16121
|
+
const cursor = cst.walk();
|
|
16122
|
+
const iterator = new _TreeCursorIterator_js__WEBPACK_IMPORTED_MODULE_0__["default"](cursor);
|
|
16123
|
+
const rootNode = [...iterator].at(0);
|
|
16124
|
+
const cstVisitor = (0,_visitors_CstVisitor_js__WEBPACK_IMPORTED_MODULE_1__["default"])();
|
|
16125
|
+
const astVisitor = (0,_visitors_YamlAstVisitor_js__WEBPACK_IMPORTED_MODULE_2__["default"])();
|
|
16126
|
+
const schema = (0,_swagger_api_apidom_ast__WEBPACK_IMPORTED_MODULE_3__["default"])();
|
|
16127
|
+
const yamlAst = (0,_swagger_api_apidom_ast__WEBPACK_IMPORTED_MODULE_4__.visit)(rootNode, cstVisitor, {
|
|
15922
16128
|
// @ts-ignore
|
|
15923
|
-
keyMap:
|
|
15924
|
-
nodePredicate:
|
|
16129
|
+
keyMap: _visitors_CstVisitor_js__WEBPACK_IMPORTED_MODULE_1__.keyMap,
|
|
16130
|
+
nodePredicate: _visitors_CstVisitor_js__WEBPACK_IMPORTED_MODULE_1__.isNode,
|
|
15925
16131
|
state: {
|
|
15926
16132
|
schema,
|
|
15927
16133
|
sourceMap
|
|
15928
16134
|
}
|
|
15929
16135
|
});
|
|
15930
|
-
return (0,
|
|
16136
|
+
return (0,_swagger_api_apidom_ast__WEBPACK_IMPORTED_MODULE_4__.visit)(yamlAst.rootNode, astVisitor, {
|
|
15931
16137
|
// @ts-ignore
|
|
15932
|
-
keyMap:
|
|
15933
|
-
|
|
15934
|
-
|
|
15935
|
-
// @ts-ignore
|
|
15936
|
-
nodePredicate: _visitors_YamlAstVisitor_js__WEBPACK_IMPORTED_MODULE_1__.isNode,
|
|
16138
|
+
keyMap: _visitors_YamlAstVisitor_js__WEBPACK_IMPORTED_MODULE_2__.keyMap,
|
|
16139
|
+
nodeTypeGetter: _visitors_YamlAstVisitor_js__WEBPACK_IMPORTED_MODULE_2__.getNodeType,
|
|
16140
|
+
nodePredicate: _visitors_YamlAstVisitor_js__WEBPACK_IMPORTED_MODULE_2__.isNode,
|
|
15937
16141
|
state: {
|
|
15938
16142
|
sourceMap
|
|
15939
16143
|
}
|
|
@@ -15943,7 +16147,7 @@ const analyze = (cst, {
|
|
|
15943
16147
|
|
|
15944
16148
|
/***/ }),
|
|
15945
16149
|
|
|
15946
|
-
/***/
|
|
16150
|
+
/***/ 44105:
|
|
15947
16151
|
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
|
|
15948
16152
|
|
|
15949
16153
|
"use strict";
|
|
@@ -15960,16 +16164,18 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
15960
16164
|
/* harmony import */ var _swagger_api_apidom_ast__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(14207);
|
|
15961
16165
|
/* harmony import */ var _swagger_api_apidom_ast__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(14138);
|
|
15962
16166
|
/* harmony import */ var _swagger_api_apidom_ast__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(4542);
|
|
15963
|
-
/* harmony import */ var
|
|
15964
|
-
/* harmony import */ var
|
|
15965
|
-
/* harmony import */ var
|
|
15966
|
-
/* harmony import */ var
|
|
15967
|
-
/* harmony import */ var
|
|
15968
|
-
/* harmony import */ var
|
|
15969
|
-
/* harmony import */ var
|
|
15970
|
-
/* harmony import */ var
|
|
15971
|
-
/* harmony import */ var
|
|
15972
|
-
/* harmony import */ var
|
|
16167
|
+
/* harmony import */ var _swagger_api_apidom_ast__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(67172);
|
|
16168
|
+
/* harmony import */ var _swagger_api_apidom_ast__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(76719);
|
|
16169
|
+
/* harmony import */ var _swagger_api_apidom_ast__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(49727);
|
|
16170
|
+
/* harmony import */ var _swagger_api_apidom_ast__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(92665);
|
|
16171
|
+
/* harmony import */ var _swagger_api_apidom_ast__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(50415);
|
|
16172
|
+
/* harmony import */ var _swagger_api_apidom_ast__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(10033);
|
|
16173
|
+
/* harmony import */ var _swagger_api_apidom_ast__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(43156);
|
|
16174
|
+
/* harmony import */ var _swagger_api_apidom_ast__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(60635);
|
|
16175
|
+
/* harmony import */ var _swagger_api_apidom_ast__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(19503);
|
|
16176
|
+
/* harmony import */ var _swagger_api_apidom_ast__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(30720);
|
|
16177
|
+
/* harmony import */ var _TreeCursorSyntaxNode_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(39135);
|
|
16178
|
+
|
|
15973
16179
|
|
|
15974
16180
|
|
|
15975
16181
|
const keyMap = {
|
|
@@ -15996,9 +16202,6 @@ const CstVisitor = stampit__WEBPACK_IMPORTED_MODULE_0__({
|
|
|
15996
16202
|
*/
|
|
15997
16203
|
|
|
15998
16204
|
const toPosition = node => {
|
|
15999
|
-
if (node === null) {
|
|
16000
|
-
return null;
|
|
16001
|
-
}
|
|
16002
16205
|
const start = (0,_swagger_api_apidom_ast__WEBPACK_IMPORTED_MODULE_2__.Point)({
|
|
16003
16206
|
row: node.startPosition.row,
|
|
16004
16207
|
column: node.startPosition.column,
|
|
@@ -16015,20 +16218,14 @@ const CstVisitor = stampit__WEBPACK_IMPORTED_MODULE_0__({
|
|
|
16015
16218
|
});
|
|
16016
16219
|
};
|
|
16017
16220
|
const kindNodeToYamlTag = node => {
|
|
16018
|
-
|
|
16019
|
-
|
|
16020
|
-
previousSibling
|
|
16221
|
+
const {
|
|
16222
|
+
tag: tagNode
|
|
16021
16223
|
} = node;
|
|
16022
|
-
|
|
16023
|
-
({
|
|
16024
|
-
previousSibling
|
|
16025
|
-
} = previousSibling);
|
|
16026
|
-
}
|
|
16027
|
-
const explicitName = (_previousSibling = previousSibling) !== null && _previousSibling !== void 0 && _previousSibling.text || node.type === 'plain_scalar' ? '?' : '!';
|
|
16224
|
+
const explicitName = tagNode !== null && tagNode !== void 0 && tagNode.text || node.type === 'plain_scalar' ? '?' : '!';
|
|
16028
16225
|
|
|
16029
16226
|
// eslint-disable-next-line no-nested-ternary
|
|
16030
16227
|
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;
|
|
16031
|
-
const position = toPosition(
|
|
16228
|
+
const position = tagNode ? toPosition(tagNode) : null;
|
|
16032
16229
|
return (0,_swagger_api_apidom_ast__WEBPACK_IMPORTED_MODULE_3__["default"])({
|
|
16033
16230
|
explicitName,
|
|
16034
16231
|
kind,
|
|
@@ -16036,53 +16233,32 @@ const CstVisitor = stampit__WEBPACK_IMPORTED_MODULE_0__({
|
|
|
16036
16233
|
});
|
|
16037
16234
|
};
|
|
16038
16235
|
const kindNodeToYamlAnchor = node => {
|
|
16039
|
-
|
|
16040
|
-
|
|
16236
|
+
const {
|
|
16237
|
+
anchor: anchorNode
|
|
16041
16238
|
} = node;
|
|
16042
|
-
|
|
16043
|
-
({
|
|
16044
|
-
previousSibling
|
|
16045
|
-
} = previousSibling);
|
|
16046
|
-
}
|
|
16047
|
-
if (previousSibling === null) {
|
|
16048
|
-
return null;
|
|
16049
|
-
}
|
|
16239
|
+
if (typeof anchorNode === 'undefined') return null;
|
|
16050
16240
|
return (0,_swagger_api_apidom_ast__WEBPACK_IMPORTED_MODULE_4__["default"])({
|
|
16051
|
-
name:
|
|
16052
|
-
position: toPosition(
|
|
16241
|
+
name: anchorNode.text,
|
|
16242
|
+
position: toPosition(anchorNode)
|
|
16053
16243
|
});
|
|
16054
16244
|
};
|
|
16055
|
-
|
|
16056
|
-
/**
|
|
16057
|
-
* If web-tree-sitter will support keyNode and valueNode this can be further simplified.
|
|
16058
|
-
*/
|
|
16059
16245
|
const isKind = ending => node => typeof (node === null || node === void 0 ? void 0 : node.type) === 'string' && node.type.endsWith(ending);
|
|
16060
16246
|
const isScalar = isKind('scalar');
|
|
16061
16247
|
const isMapping = isKind('mapping');
|
|
16062
16248
|
const isSequence = isKind('sequence');
|
|
16063
|
-
const getFieldFromNode = (fieldName, node) => {
|
|
16064
|
-
var _node$childForFieldNa;
|
|
16065
|
-
return `${fieldName}Node` in node ?
|
|
16066
|
-
// @ts-ignore
|
|
16067
|
-
node[`${fieldName}Node`] : 'childForFieldName' in node ? (_node$childForFieldNa = node.childForFieldName) === null || _node$childForFieldNa === void 0 ? void 0 : _node$childForFieldNa.call(node, fieldName) : null;
|
|
16068
|
-
};
|
|
16069
16249
|
const hasKeyValuePairEmptyKey = node => {
|
|
16070
16250
|
if (node.type !== 'block_mapping_pair' && node.type !== 'flow_pair') {
|
|
16071
16251
|
return false;
|
|
16072
16252
|
}
|
|
16073
|
-
const keyNode = getFieldFromNode('key', node);
|
|
16074
|
-
|
|
16075
16253
|
// keyNode was not explicitly provided; tag and anchor are missing too
|
|
16076
|
-
return keyNode ===
|
|
16254
|
+
return typeof node.keyNode === 'undefined';
|
|
16077
16255
|
};
|
|
16078
16256
|
const hasKeyValuePairEmptyValue = node => {
|
|
16079
16257
|
if (node.type !== 'block_mapping_pair' && node.type !== 'flow_pair') {
|
|
16080
16258
|
return false;
|
|
16081
16259
|
}
|
|
16082
|
-
const valueNode = getFieldFromNode('value', node);
|
|
16083
|
-
|
|
16084
16260
|
// valueNode was not explicitly provided; tag and anchor are missing too
|
|
16085
|
-
return valueNode ===
|
|
16261
|
+
return typeof node.valueNode === 'undefined';
|
|
16086
16262
|
};
|
|
16087
16263
|
const createKeyValuePairEmptyKey = node => {
|
|
16088
16264
|
const emptyPoint = (0,_swagger_api_apidom_ast__WEBPACK_IMPORTED_MODULE_2__.Point)({
|
|
@@ -16090,11 +16266,11 @@ const CstVisitor = stampit__WEBPACK_IMPORTED_MODULE_0__({
|
|
|
16090
16266
|
column: node.startPosition.column,
|
|
16091
16267
|
char: node.startIndex
|
|
16092
16268
|
});
|
|
16093
|
-
const
|
|
16269
|
+
const {
|
|
16270
|
+
keyNode
|
|
16271
|
+
} = node;
|
|
16094
16272
|
const children = (keyNode === null || keyNode === void 0 ? void 0 : keyNode.children) || [];
|
|
16095
|
-
// @ts-ignore
|
|
16096
16273
|
const tagNode = children.find(isKind('tag'));
|
|
16097
|
-
// @ts-ignore
|
|
16098
16274
|
const anchorNode = children.find(isKind('anchor'));
|
|
16099
16275
|
const tag = typeof tagNode !== 'undefined' ? (0,_swagger_api_apidom_ast__WEBPACK_IMPORTED_MODULE_3__["default"])({
|
|
16100
16276
|
explicitName: tagNode.text,
|
|
@@ -16126,11 +16302,11 @@ const CstVisitor = stampit__WEBPACK_IMPORTED_MODULE_0__({
|
|
|
16126
16302
|
column: node.endPosition.column,
|
|
16127
16303
|
char: node.endIndex
|
|
16128
16304
|
});
|
|
16129
|
-
const
|
|
16305
|
+
const {
|
|
16306
|
+
valueNode
|
|
16307
|
+
} = node;
|
|
16130
16308
|
const children = (valueNode === null || valueNode === void 0 ? void 0 : valueNode.children) || [];
|
|
16131
|
-
// @ts-ignore
|
|
16132
16309
|
const tagNode = children.find(isKind('tag'));
|
|
16133
|
-
// @ts-ignore
|
|
16134
16310
|
const anchorNode = children.find(isKind('anchor'));
|
|
16135
16311
|
const tag = typeof tagNode !== 'undefined' ? (0,_swagger_api_apidom_ast__WEBPACK_IMPORTED_MODULE_3__["default"])({
|
|
16136
16312
|
explicitName: tagNode.text,
|
|
@@ -16163,15 +16339,13 @@ const CstVisitor = stampit__WEBPACK_IMPORTED_MODULE_0__({
|
|
|
16163
16339
|
|
|
16164
16340
|
this.enter = function enter(node) {
|
|
16165
16341
|
// missing anonymous literals from CST transformed into AST literal nodes
|
|
16166
|
-
|
|
16167
|
-
// in `SyntaxNode.isNamed` property. web-tree-sitter has it defined as method
|
|
16168
|
-
// whether tree-sitter node binding has it defined as a boolean property.
|
|
16169
|
-
// @ts-ignore
|
|
16170
|
-
if (typeof node.isNamed === 'function' && !node.isNamed() || node.isNamed === false) {
|
|
16342
|
+
if (node instanceof _TreeCursorSyntaxNode_js__WEBPACK_IMPORTED_MODULE_7__["default"] && !node.isNamed) {
|
|
16171
16343
|
const position = toPosition(node);
|
|
16172
16344
|
const value = node.type || node.text;
|
|
16173
|
-
const
|
|
16174
|
-
|
|
16345
|
+
const {
|
|
16346
|
+
isMissing
|
|
16347
|
+
} = node;
|
|
16348
|
+
return (0,_swagger_api_apidom_ast__WEBPACK_IMPORTED_MODULE_8__["default"])({
|
|
16175
16349
|
value,
|
|
16176
16350
|
position,
|
|
16177
16351
|
isMissing
|
|
@@ -16182,14 +16356,14 @@ const CstVisitor = stampit__WEBPACK_IMPORTED_MODULE_0__({
|
|
|
16182
16356
|
this.stream = {
|
|
16183
16357
|
enter(node) {
|
|
16184
16358
|
const position = toPosition(node);
|
|
16185
|
-
return (0,
|
|
16359
|
+
return (0,_swagger_api_apidom_ast__WEBPACK_IMPORTED_MODULE_9__["default"])({
|
|
16186
16360
|
children: node.children,
|
|
16187
16361
|
position,
|
|
16188
|
-
isMissing: node.isMissing
|
|
16362
|
+
isMissing: node.isMissing
|
|
16189
16363
|
});
|
|
16190
16364
|
},
|
|
16191
16365
|
leave(stream) {
|
|
16192
|
-
return (0,
|
|
16366
|
+
return (0,_swagger_api_apidom_ast__WEBPACK_IMPORTED_MODULE_10__["default"])({
|
|
16193
16367
|
children: [stream]
|
|
16194
16368
|
});
|
|
16195
16369
|
}
|
|
@@ -16199,7 +16373,7 @@ const CstVisitor = stampit__WEBPACK_IMPORTED_MODULE_0__({
|
|
|
16199
16373
|
var _node$firstNamedChild;
|
|
16200
16374
|
const position = toPosition(node);
|
|
16201
16375
|
const version = (node === null || node === void 0 || (_node$firstNamedChild = node.firstNamedChild) === null || _node$firstNamedChild === void 0 ? void 0 : _node$firstNamedChild.text) || null;
|
|
16202
|
-
return (0,
|
|
16376
|
+
return (0,_swagger_api_apidom_ast__WEBPACK_IMPORTED_MODULE_11__["default"])({
|
|
16203
16377
|
position,
|
|
16204
16378
|
name: '%YAML',
|
|
16205
16379
|
parameters: {
|
|
@@ -16211,9 +16385,9 @@ const CstVisitor = stampit__WEBPACK_IMPORTED_MODULE_0__({
|
|
|
16211
16385
|
this.tag_directive = {
|
|
16212
16386
|
enter(node) {
|
|
16213
16387
|
const position = toPosition(node);
|
|
16214
|
-
const tagHandleNode = node.
|
|
16215
|
-
const tagPrefixNode = node.
|
|
16216
|
-
const tagDirective = (0,
|
|
16388
|
+
const tagHandleNode = node.children[0];
|
|
16389
|
+
const tagPrefixNode = node.children[1];
|
|
16390
|
+
const tagDirective = (0,_swagger_api_apidom_ast__WEBPACK_IMPORTED_MODULE_11__["default"])({
|
|
16217
16391
|
position,
|
|
16218
16392
|
name: '%TAG',
|
|
16219
16393
|
parameters: {
|
|
@@ -16228,10 +16402,10 @@ const CstVisitor = stampit__WEBPACK_IMPORTED_MODULE_0__({
|
|
|
16228
16402
|
this.reserved_directive = {
|
|
16229
16403
|
enter(node) {
|
|
16230
16404
|
const position = toPosition(node);
|
|
16231
|
-
const directiveNameNode = node.
|
|
16232
|
-
const directiveParameter1Node = node.
|
|
16233
|
-
const directiveParameter2Node = node.
|
|
16234
|
-
return (0,
|
|
16405
|
+
const directiveNameNode = node.children[0];
|
|
16406
|
+
const directiveParameter1Node = node.children[1];
|
|
16407
|
+
const directiveParameter2Node = node.children[2];
|
|
16408
|
+
return (0,_swagger_api_apidom_ast__WEBPACK_IMPORTED_MODULE_11__["default"])({
|
|
16235
16409
|
position,
|
|
16236
16410
|
name: (directiveNameNode === null || directiveNameNode === void 0 ? void 0 : directiveNameNode.text) || null,
|
|
16237
16411
|
parameters: {
|
|
@@ -16244,10 +16418,10 @@ const CstVisitor = stampit__WEBPACK_IMPORTED_MODULE_0__({
|
|
|
16244
16418
|
this.document = {
|
|
16245
16419
|
enter(node) {
|
|
16246
16420
|
const position = toPosition(node);
|
|
16247
|
-
return (0,
|
|
16421
|
+
return (0,_swagger_api_apidom_ast__WEBPACK_IMPORTED_MODULE_12__["default"])({
|
|
16248
16422
|
children: node.children,
|
|
16249
16423
|
position,
|
|
16250
|
-
isMissing: node.isMissing
|
|
16424
|
+
isMissing: node.isMissing
|
|
16251
16425
|
});
|
|
16252
16426
|
},
|
|
16253
16427
|
leave(node) {
|
|
@@ -16303,14 +16477,14 @@ const CstVisitor = stampit__WEBPACK_IMPORTED_MODULE_0__({
|
|
|
16303
16477
|
const position = toPosition(node);
|
|
16304
16478
|
const tag = kindNodeToYamlTag(node);
|
|
16305
16479
|
const anchor = kindNodeToYamlAnchor(node);
|
|
16306
|
-
const mappingNode = (0,
|
|
16480
|
+
const mappingNode = (0,_swagger_api_apidom_ast__WEBPACK_IMPORTED_MODULE_13__["default"])({
|
|
16307
16481
|
children: node.children,
|
|
16308
16482
|
position,
|
|
16309
16483
|
anchor,
|
|
16310
16484
|
tag,
|
|
16311
16485
|
styleGroup: _swagger_api_apidom_ast__WEBPACK_IMPORTED_MODULE_6__.YamlStyleGroup.Block,
|
|
16312
16486
|
style: _swagger_api_apidom_ast__WEBPACK_IMPORTED_MODULE_6__.YamlStyle.NextLine,
|
|
16313
|
-
isMissing: node.isMissing
|
|
16487
|
+
isMissing: node.isMissing
|
|
16314
16488
|
});
|
|
16315
16489
|
return this.schema.resolve(mappingNode);
|
|
16316
16490
|
}
|
|
@@ -16327,11 +16501,11 @@ const CstVisitor = stampit__WEBPACK_IMPORTED_MODULE_0__({
|
|
|
16327
16501
|
const valueNode = createKeyValuePairEmptyValue(node);
|
|
16328
16502
|
children.push(valueNode);
|
|
16329
16503
|
}
|
|
16330
|
-
return (0,
|
|
16504
|
+
return (0,_swagger_api_apidom_ast__WEBPACK_IMPORTED_MODULE_14__["default"])({
|
|
16331
16505
|
children,
|
|
16332
16506
|
position,
|
|
16333
16507
|
styleGroup: _swagger_api_apidom_ast__WEBPACK_IMPORTED_MODULE_6__.YamlStyleGroup.Block,
|
|
16334
|
-
isMissing: node.isMissing
|
|
16508
|
+
isMissing: node.isMissing
|
|
16335
16509
|
});
|
|
16336
16510
|
}
|
|
16337
16511
|
};
|
|
@@ -16340,14 +16514,14 @@ const CstVisitor = stampit__WEBPACK_IMPORTED_MODULE_0__({
|
|
|
16340
16514
|
const position = toPosition(node);
|
|
16341
16515
|
const tag = kindNodeToYamlTag(node);
|
|
16342
16516
|
const anchor = kindNodeToYamlAnchor(node);
|
|
16343
|
-
const mappingNode = (0,
|
|
16517
|
+
const mappingNode = (0,_swagger_api_apidom_ast__WEBPACK_IMPORTED_MODULE_13__["default"])({
|
|
16344
16518
|
children: node.children,
|
|
16345
16519
|
position,
|
|
16346
16520
|
anchor,
|
|
16347
16521
|
tag,
|
|
16348
16522
|
styleGroup: _swagger_api_apidom_ast__WEBPACK_IMPORTED_MODULE_6__.YamlStyleGroup.Flow,
|
|
16349
16523
|
style: _swagger_api_apidom_ast__WEBPACK_IMPORTED_MODULE_6__.YamlStyle.Explicit,
|
|
16350
|
-
isMissing: node.isMissing
|
|
16524
|
+
isMissing: node.isMissing
|
|
16351
16525
|
});
|
|
16352
16526
|
return this.schema.resolve(mappingNode);
|
|
16353
16527
|
}
|
|
@@ -16364,11 +16538,11 @@ const CstVisitor = stampit__WEBPACK_IMPORTED_MODULE_0__({
|
|
|
16364
16538
|
const valueNode = createKeyValuePairEmptyValue(node);
|
|
16365
16539
|
children.push(valueNode);
|
|
16366
16540
|
}
|
|
16367
|
-
return (0,
|
|
16541
|
+
return (0,_swagger_api_apidom_ast__WEBPACK_IMPORTED_MODULE_14__["default"])({
|
|
16368
16542
|
children,
|
|
16369
16543
|
position,
|
|
16370
16544
|
styleGroup: _swagger_api_apidom_ast__WEBPACK_IMPORTED_MODULE_6__.YamlStyleGroup.Flow,
|
|
16371
|
-
isMissing: node.isMissing
|
|
16545
|
+
isMissing: node.isMissing
|
|
16372
16546
|
});
|
|
16373
16547
|
}
|
|
16374
16548
|
};
|
|
@@ -16382,7 +16556,7 @@ const CstVisitor = stampit__WEBPACK_IMPORTED_MODULE_0__({
|
|
|
16382
16556
|
const position = toPosition(node);
|
|
16383
16557
|
const tag = kindNodeToYamlTag(node);
|
|
16384
16558
|
const anchor = kindNodeToYamlAnchor(node);
|
|
16385
|
-
const sequenceNode = (0,
|
|
16559
|
+
const sequenceNode = (0,_swagger_api_apidom_ast__WEBPACK_IMPORTED_MODULE_15__["default"])({
|
|
16386
16560
|
children: node.children,
|
|
16387
16561
|
position,
|
|
16388
16562
|
anchor,
|
|
@@ -16428,7 +16602,7 @@ const CstVisitor = stampit__WEBPACK_IMPORTED_MODULE_0__({
|
|
|
16428
16602
|
const position = toPosition(node);
|
|
16429
16603
|
const tag = kindNodeToYamlTag(node);
|
|
16430
16604
|
const anchor = kindNodeToYamlAnchor(node);
|
|
16431
|
-
const sequenceNode = (0,
|
|
16605
|
+
const sequenceNode = (0,_swagger_api_apidom_ast__WEBPACK_IMPORTED_MODULE_15__["default"])({
|
|
16432
16606
|
children: node.children.flat(),
|
|
16433
16607
|
position,
|
|
16434
16608
|
anchor,
|
|
@@ -16512,22 +16686,22 @@ const CstVisitor = stampit__WEBPACK_IMPORTED_MODULE_0__({
|
|
|
16512
16686
|
};
|
|
16513
16687
|
this.comment = {
|
|
16514
16688
|
enter(node) {
|
|
16515
|
-
return (0,
|
|
16689
|
+
return (0,_swagger_api_apidom_ast__WEBPACK_IMPORTED_MODULE_16__["default"])({
|
|
16516
16690
|
content: node.text
|
|
16517
16691
|
});
|
|
16518
16692
|
}
|
|
16519
16693
|
};
|
|
16520
16694
|
this.ERROR = function ERROR(node, key, parent, path) {
|
|
16521
16695
|
const position = toPosition(node);
|
|
16522
|
-
const errorNode = (0,
|
|
16696
|
+
const errorNode = (0,_swagger_api_apidom_ast__WEBPACK_IMPORTED_MODULE_17__["default"])({
|
|
16523
16697
|
children: node.children,
|
|
16524
16698
|
position,
|
|
16525
|
-
isUnexpected: !node.hasError
|
|
16526
|
-
isMissing: node.isMissing
|
|
16699
|
+
isUnexpected: !node.hasError,
|
|
16700
|
+
isMissing: node.isMissing,
|
|
16527
16701
|
value: node.text
|
|
16528
16702
|
});
|
|
16529
16703
|
if (path.length === 0) {
|
|
16530
|
-
return (0,
|
|
16704
|
+
return (0,_swagger_api_apidom_ast__WEBPACK_IMPORTED_MODULE_10__["default"])({
|
|
16531
16705
|
children: [errorNode]
|
|
16532
16706
|
});
|
|
16533
16707
|
}
|
|
@@ -16539,7 +16713,7 @@ const CstVisitor = stampit__WEBPACK_IMPORTED_MODULE_0__({
|
|
|
16539
16713
|
|
|
16540
16714
|
/***/ }),
|
|
16541
16715
|
|
|
16542
|
-
/***/
|
|
16716
|
+
/***/ 95000:
|
|
16543
16717
|
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
|
|
16544
16718
|
|
|
16545
16719
|
"use strict";
|