@jentic/arazzo-parser 1.0.0-alpha.23 → 1.0.0-alpha.24
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 +4 -0
- package/dist/jentic-arazzo-parser.browser.js +24 -20
- package/package.json +15 -15
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
|
+
# [1.0.0-alpha.24](https://github.com/jentic/jentic-arazzo-tools/compare/v1.0.0-alpha.23...v1.0.0-alpha.24) (2026-03-11)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @jentic/arazzo-parser
|
|
9
|
+
|
|
6
10
|
# [1.0.0-alpha.23](https://github.com/jentic/jentic-arazzo-tools/compare/v1.0.0-alpha.22...v1.0.0-alpha.23) (2026-03-11)
|
|
7
11
|
|
|
8
12
|
### Features
|
|
@@ -38197,7 +38197,9 @@ class Path {
|
|
|
38197
38197
|
*
|
|
38198
38198
|
* @example
|
|
38199
38199
|
* // For a path to $.paths['/pets'].get in an OpenAPI document:
|
|
38200
|
+
* ```
|
|
38200
38201
|
* path.getPathKeys(); // => ['paths', '/pets', 'get']
|
|
38202
|
+
* ```
|
|
38201
38203
|
*/
|
|
38202
38204
|
getPathKeys() {
|
|
38203
38205
|
const keys = [];
|
|
@@ -38232,18 +38234,22 @@ class Path {
|
|
|
38232
38234
|
* or Normalized JSONPath like "$['paths']['/pets']['get']['responses']['200']"
|
|
38233
38235
|
*
|
|
38234
38236
|
* @example
|
|
38237
|
+
* ```
|
|
38235
38238
|
* // JSON Pointer examples:
|
|
38236
38239
|
* path.formatPath(); // "" (root)
|
|
38237
38240
|
* path.formatPath(); // "/info"
|
|
38238
38241
|
* path.formatPath(); // "/paths/~1pets/get"
|
|
38239
38242
|
* path.formatPath(); // "/paths/~1users~1{id}/parameters/0"
|
|
38243
|
+
* ```
|
|
38240
38244
|
*
|
|
38241
38245
|
* @example
|
|
38246
|
+
* ```
|
|
38242
38247
|
* // JSONPath examples:
|
|
38243
38248
|
* path.formatPath('jsonpath'); // "$" (root)
|
|
38244
38249
|
* path.formatPath('jsonpath'); // "$['info']"
|
|
38245
38250
|
* path.formatPath('jsonpath'); // "$['paths']['/pets']['get']"
|
|
38246
38251
|
* path.formatPath('jsonpath'); // "$['paths']['/users/{id}']['parameters'][0]"
|
|
38252
|
+
* ```
|
|
38247
38253
|
*/
|
|
38248
38254
|
formatPath(pathFormat = 'jsonpointer') {
|
|
38249
38255
|
const parts = this.getPathKeys();
|
|
@@ -38453,15 +38459,15 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
38453
38459
|
/* harmony import */ var _traversal_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(66061);
|
|
38454
38460
|
|
|
38455
38461
|
/**
|
|
38456
|
-
* Finds all elements
|
|
38462
|
+
* Finds all paths whose elements match the predicate.
|
|
38457
38463
|
* @public
|
|
38458
38464
|
*/
|
|
38459
38465
|
const filter = (element, predicate) => {
|
|
38460
38466
|
const result = [];
|
|
38461
38467
|
(0,_traversal_mjs__WEBPACK_IMPORTED_MODULE_0__.traverse)(element, {
|
|
38462
38468
|
enter(path) {
|
|
38463
|
-
if (predicate(path
|
|
38464
|
-
result.push(path
|
|
38469
|
+
if (predicate(path)) {
|
|
38470
|
+
result.push(path);
|
|
38465
38471
|
}
|
|
38466
38472
|
}
|
|
38467
38473
|
});
|
|
@@ -38487,7 +38493,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
38487
38493
|
* @public
|
|
38488
38494
|
*/
|
|
38489
38495
|
/**
|
|
38490
|
-
* Finds the most inner node at the given offset.
|
|
38496
|
+
* Finds the path of the most inner node at the given offset.
|
|
38491
38497
|
* If includeRightBound is set, also finds nodes that end at the given offset.
|
|
38492
38498
|
* @public
|
|
38493
38499
|
*/
|
|
@@ -38512,7 +38518,7 @@ const findAtOffset = (element, options) => {
|
|
|
38512
38518
|
const endOffset = node.endOffset;
|
|
38513
38519
|
const isWithinOffsetRange = offset >= startOffset && (offset < endOffset || includeRightBound && offset <= endOffset);
|
|
38514
38520
|
if (isWithinOffsetRange) {
|
|
38515
|
-
result.push(
|
|
38521
|
+
result.push(path);
|
|
38516
38522
|
return; // push to stack and dive in
|
|
38517
38523
|
}
|
|
38518
38524
|
path.skip(); // skip entire sub-tree
|
|
@@ -38535,15 +38541,15 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
38535
38541
|
/* harmony import */ var _traversal_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(66061);
|
|
38536
38542
|
|
|
38537
38543
|
/**
|
|
38538
|
-
*
|
|
38544
|
+
* Finds first path whose element satisfies the provided predicate.
|
|
38539
38545
|
* @public
|
|
38540
38546
|
*/
|
|
38541
38547
|
const find = (element, predicate) => {
|
|
38542
38548
|
let result;
|
|
38543
38549
|
(0,_traversal_mjs__WEBPACK_IMPORTED_MODULE_0__.traverse)(element, {
|
|
38544
38550
|
enter(path) {
|
|
38545
|
-
if (predicate(path
|
|
38546
|
-
result = path
|
|
38551
|
+
if (predicate(path)) {
|
|
38552
|
+
result = path;
|
|
38547
38553
|
path.stop();
|
|
38548
38554
|
}
|
|
38549
38555
|
}
|
|
@@ -38562,9 +38568,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
38562
38568
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
38563
38569
|
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
38564
38570
|
/* harmony export */ });
|
|
38565
|
-
/* harmony import */ var
|
|
38566
|
-
/* harmony import */ var _traversal_mjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(66061);
|
|
38567
|
-
|
|
38571
|
+
/* harmony import */ var _traversal_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(66061);
|
|
38568
38572
|
|
|
38569
38573
|
/**
|
|
38570
38574
|
* @public
|
|
@@ -38573,7 +38577,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
38573
38577
|
* @public
|
|
38574
38578
|
*/
|
|
38575
38579
|
/**
|
|
38576
|
-
* Executes the callback on this element and all
|
|
38580
|
+
* Executes the callback on this element's path and all descendant paths.
|
|
38577
38581
|
* @public
|
|
38578
38582
|
*/
|
|
38579
38583
|
const forEach = (element, options) => {
|
|
@@ -38581,15 +38585,15 @@ const forEach = (element, options) => {
|
|
|
38581
38585
|
let predicate;
|
|
38582
38586
|
if (typeof options === 'function') {
|
|
38583
38587
|
callback = options;
|
|
38584
|
-
predicate =
|
|
38588
|
+
predicate = () => true;
|
|
38585
38589
|
} else {
|
|
38586
38590
|
callback = options.callback ?? (() => {});
|
|
38587
|
-
predicate = options.predicate ??
|
|
38591
|
+
predicate = options.predicate ?? (() => true);
|
|
38588
38592
|
}
|
|
38589
|
-
(0,
|
|
38593
|
+
(0,_traversal_mjs__WEBPACK_IMPORTED_MODULE_0__.traverse)(element, {
|
|
38590
38594
|
enter(path) {
|
|
38591
|
-
if (predicate(path
|
|
38592
|
-
callback(path
|
|
38595
|
+
if (predicate(path)) {
|
|
38596
|
+
callback(path);
|
|
38593
38597
|
}
|
|
38594
38598
|
}
|
|
38595
38599
|
});
|
|
@@ -38638,11 +38642,11 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
38638
38642
|
/* harmony import */ var _filter_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(5800);
|
|
38639
38643
|
|
|
38640
38644
|
/**
|
|
38641
|
-
* Complement of filter. Finds all elements NOT
|
|
38645
|
+
* Complement of filter. Finds all paths whose elements do NOT match the predicate.
|
|
38642
38646
|
* @public
|
|
38643
38647
|
*/
|
|
38644
38648
|
const reject = (element, predicate) => {
|
|
38645
|
-
return (0,_filter_mjs__WEBPACK_IMPORTED_MODULE_0__["default"])(element,
|
|
38649
|
+
return (0,_filter_mjs__WEBPACK_IMPORTED_MODULE_0__["default"])(element, path => !predicate(path));
|
|
38646
38650
|
};
|
|
38647
38651
|
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (reject);
|
|
38648
38652
|
|
|
@@ -38659,7 +38663,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
38659
38663
|
/* harmony import */ var _find_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(66919);
|
|
38660
38664
|
|
|
38661
38665
|
/**
|
|
38662
|
-
* Tests whether at least one element passes the predicate.
|
|
38666
|
+
* Tests whether at least one path's element passes the predicate.
|
|
38663
38667
|
* @public
|
|
38664
38668
|
*/
|
|
38665
38669
|
const some = (element, predicate) => {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jentic/arazzo-parser",
|
|
3
|
-
"version": "1.0.0-alpha.
|
|
3
|
+
"version": "1.0.0-alpha.24",
|
|
4
4
|
"description": "Parser for Arazzo Documents producing SpecLynx ApiDOM data model.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"arazzo",
|
|
@@ -48,23 +48,23 @@
|
|
|
48
48
|
"license": "Apache-2.0",
|
|
49
49
|
"dependencies": {
|
|
50
50
|
"@babel/runtime-corejs3": "^7.28.4",
|
|
51
|
-
"@speclynx/apidom-datamodel": "^
|
|
52
|
-
"@speclynx/apidom-error": "^
|
|
53
|
-
"@speclynx/apidom-ns-arazzo-1": "^
|
|
54
|
-
"@speclynx/apidom-parser-adapter-arazzo-json-1": "^
|
|
55
|
-
"@speclynx/apidom-parser-adapter-arazzo-yaml-1": "^
|
|
56
|
-
"@speclynx/apidom-parser-adapter-openapi-json-2": "^
|
|
57
|
-
"@speclynx/apidom-parser-adapter-openapi-json-3-0": "^
|
|
58
|
-
"@speclynx/apidom-parser-adapter-openapi-json-3-1": "^
|
|
59
|
-
"@speclynx/apidom-parser-adapter-openapi-yaml-2": "^
|
|
60
|
-
"@speclynx/apidom-parser-adapter-openapi-yaml-3-0": "^
|
|
61
|
-
"@speclynx/apidom-parser-adapter-openapi-yaml-3-1": "^
|
|
62
|
-
"@speclynx/apidom-reference": "^
|
|
51
|
+
"@speclynx/apidom-datamodel": "^4.0.3",
|
|
52
|
+
"@speclynx/apidom-error": "^4.0.3",
|
|
53
|
+
"@speclynx/apidom-ns-arazzo-1": "^4.0.3",
|
|
54
|
+
"@speclynx/apidom-parser-adapter-arazzo-json-1": "^4.0.3",
|
|
55
|
+
"@speclynx/apidom-parser-adapter-arazzo-yaml-1": "^4.0.3",
|
|
56
|
+
"@speclynx/apidom-parser-adapter-openapi-json-2": "^4.0.3",
|
|
57
|
+
"@speclynx/apidom-parser-adapter-openapi-json-3-0": "^4.0.3",
|
|
58
|
+
"@speclynx/apidom-parser-adapter-openapi-json-3-1": "^4.0.3",
|
|
59
|
+
"@speclynx/apidom-parser-adapter-openapi-yaml-2": "^4.0.3",
|
|
60
|
+
"@speclynx/apidom-parser-adapter-openapi-yaml-3-0": "^4.0.3",
|
|
61
|
+
"@speclynx/apidom-parser-adapter-openapi-yaml-3-1": "^4.0.3",
|
|
62
|
+
"@speclynx/apidom-reference": "^4.0.3",
|
|
63
63
|
"ramda-adjunct": "^6.0.0",
|
|
64
64
|
"type-fest": "^5.4.3"
|
|
65
65
|
},
|
|
66
66
|
"devDependencies": {
|
|
67
|
-
"@speclynx/apidom-core": "^
|
|
67
|
+
"@speclynx/apidom-core": "^4.0.3"
|
|
68
68
|
},
|
|
69
69
|
"files": [
|
|
70
70
|
"src/**/*.mjs",
|
|
@@ -76,5 +76,5 @@
|
|
|
76
76
|
"README.md",
|
|
77
77
|
"CHANGELOG.md"
|
|
78
78
|
],
|
|
79
|
-
"gitHead": "
|
|
79
|
+
"gitHead": "4d69c9a6c690d8fac8938c7032f57258948d76ce"
|
|
80
80
|
}
|