@speclynx/apidom-parser-adapter-arazzo-yaml-1 4.9.1 → 4.10.1
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
|
+
## [4.10.1](https://github.com/speclynx/apidom/compare/v4.10.0...v4.10.1) (2026-05-20)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @speclynx/apidom-parser-adapter-arazzo-yaml-1
|
|
9
|
+
|
|
10
|
+
# [4.10.0](https://github.com/speclynx/apidom/compare/v4.9.1...v4.10.0) (2026-05-12)
|
|
11
|
+
|
|
12
|
+
**Note:** Version bump only for package @speclynx/apidom-parser-adapter-arazzo-yaml-1
|
|
13
|
+
|
|
6
14
|
## [4.9.1](https://github.com/speclynx/apidom/compare/v4.9.0...v4.9.1) (2026-04-21)
|
|
7
15
|
|
|
8
16
|
**Note:** Version bump only for package @speclynx/apidom-parser-adapter-arazzo-yaml-1
|
|
@@ -21850,8 +21850,10 @@ class Composer {
|
|
|
21850
21850
|
}
|
|
21851
21851
|
}
|
|
21852
21852
|
if (afterDoc) {
|
|
21853
|
-
|
|
21854
|
-
|
|
21853
|
+
for (let i = 0; i < this.errors.length; ++i)
|
|
21854
|
+
doc.errors.push(this.errors[i]);
|
|
21855
|
+
for (let i = 0; i < this.warnings.length; ++i)
|
|
21856
|
+
doc.warnings.push(this.warnings[i]);
|
|
21855
21857
|
}
|
|
21856
21858
|
else {
|
|
21857
21859
|
doc.errors = this.errors;
|
|
@@ -22813,7 +22815,7 @@ function doubleQuotedValue(source, onError) {
|
|
|
22813
22815
|
next = source[++i + 1];
|
|
22814
22816
|
}
|
|
22815
22817
|
else if (next === 'x' || next === 'u' || next === 'U') {
|
|
22816
|
-
const length =
|
|
22818
|
+
const length = next === 'x' ? 2 : next === 'u' ? 4 : 8;
|
|
22817
22819
|
res += parseCharCode(source, i + 1, length, onError);
|
|
22818
22820
|
i += length;
|
|
22819
22821
|
}
|
|
@@ -22883,12 +22885,14 @@ function parseCharCode(source, offset, length, onError) {
|
|
|
22883
22885
|
const cc = source.substr(offset, length);
|
|
22884
22886
|
const ok = cc.length === length && /^[0-9a-fA-F]+$/.test(cc);
|
|
22885
22887
|
const code = ok ? parseInt(cc, 16) : NaN;
|
|
22886
|
-
|
|
22888
|
+
try {
|
|
22889
|
+
return String.fromCodePoint(code);
|
|
22890
|
+
}
|
|
22891
|
+
catch {
|
|
22887
22892
|
const raw = source.substr(offset - 2, length + 2);
|
|
22888
22893
|
onError(offset - 2, 'BAD_DQ_ESCAPE', `Invalid escape sequence ${raw}`);
|
|
22889
22894
|
return raw;
|
|
22890
22895
|
}
|
|
22891
|
-
return String.fromCodePoint(code);
|
|
22892
22896
|
}
|
|
22893
22897
|
|
|
22894
22898
|
|
|
@@ -24201,6 +24205,8 @@ class Alias extends _Node_js__WEBPACK_IMPORTED_MODULE_3__.NodeBase {
|
|
|
24201
24205
|
* instance of the `source` anchor before this node.
|
|
24202
24206
|
*/
|
|
24203
24207
|
resolve(doc, ctx) {
|
|
24208
|
+
if (ctx?.maxAliasCount === 0)
|
|
24209
|
+
throw new ReferenceError('Alias resolution is disabled');
|
|
24204
24210
|
let nodes;
|
|
24205
24211
|
if (ctx?.aliasResolveCache) {
|
|
24206
24212
|
nodes = ctx.aliasResolveCache;
|
|
@@ -25955,7 +25961,7 @@ class Lexer {
|
|
|
25955
25961
|
const n = (yield* this.pushCount(1)) + (yield* this.pushSpaces(true));
|
|
25956
25962
|
this.indentNext = this.indentValue + 1;
|
|
25957
25963
|
this.indentValue += n;
|
|
25958
|
-
return
|
|
25964
|
+
return 'block-start';
|
|
25959
25965
|
}
|
|
25960
25966
|
return 'doc';
|
|
25961
25967
|
}
|
|
@@ -26276,32 +26282,36 @@ class Lexer {
|
|
|
26276
26282
|
return 0;
|
|
26277
26283
|
}
|
|
26278
26284
|
*pushIndicators() {
|
|
26279
|
-
|
|
26280
|
-
|
|
26281
|
-
|
|
26282
|
-
|
|
26283
|
-
|
|
26284
|
-
|
|
26285
|
-
|
|
26286
|
-
|
|
26287
|
-
|
|
26288
|
-
|
|
26289
|
-
|
|
26290
|
-
|
|
26291
|
-
|
|
26292
|
-
|
|
26293
|
-
|
|
26294
|
-
|
|
26295
|
-
|
|
26296
|
-
|
|
26297
|
-
|
|
26298
|
-
|
|
26299
|
-
|
|
26300
|
-
|
|
26285
|
+
let n = 0;
|
|
26286
|
+
loop: while (true) {
|
|
26287
|
+
switch (this.charAt(0)) {
|
|
26288
|
+
case '!':
|
|
26289
|
+
n += yield* this.pushTag();
|
|
26290
|
+
n += yield* this.pushSpaces(true);
|
|
26291
|
+
continue loop;
|
|
26292
|
+
case '&':
|
|
26293
|
+
n += yield* this.pushUntil(isNotAnchorChar);
|
|
26294
|
+
n += yield* this.pushSpaces(true);
|
|
26295
|
+
continue loop;
|
|
26296
|
+
case '-': // this is an error
|
|
26297
|
+
case '?': // this is an error outside flow collections
|
|
26298
|
+
case ':': {
|
|
26299
|
+
const inFlow = this.flowLevel > 0;
|
|
26300
|
+
const ch1 = this.charAt(1);
|
|
26301
|
+
if (isEmpty(ch1) || (inFlow && flowIndicatorChars.has(ch1))) {
|
|
26302
|
+
if (!inFlow)
|
|
26303
|
+
this.indentNext = this.indentValue + 1;
|
|
26304
|
+
else if (this.flowKey)
|
|
26305
|
+
this.flowKey = false;
|
|
26306
|
+
n += yield* this.pushCount(1);
|
|
26307
|
+
n += yield* this.pushSpaces(true);
|
|
26308
|
+
continue loop;
|
|
26309
|
+
}
|
|
26301
26310
|
}
|
|
26302
26311
|
}
|
|
26312
|
+
break loop;
|
|
26303
26313
|
}
|
|
26304
|
-
return
|
|
26314
|
+
return n;
|
|
26305
26315
|
}
|
|
26306
26316
|
*pushTag() {
|
|
26307
26317
|
if (this.charAt(1) === '<') {
|
|
@@ -26494,6 +26504,14 @@ function getFirstKeyStartProps(prev) {
|
|
|
26494
26504
|
}
|
|
26495
26505
|
return prev.splice(i, prev.length);
|
|
26496
26506
|
}
|
|
26507
|
+
function arrayPushArray(target, source) {
|
|
26508
|
+
// May exhaust call stack with large `source` array
|
|
26509
|
+
if (source.length < 1e5)
|
|
26510
|
+
Array.prototype.push.apply(target, source);
|
|
26511
|
+
else
|
|
26512
|
+
for (let i = 0; i < source.length; ++i)
|
|
26513
|
+
target.push(source[i]);
|
|
26514
|
+
}
|
|
26497
26515
|
function fixFlowSeqItems(fc) {
|
|
26498
26516
|
if (fc.start.type === 'flow-seq-start') {
|
|
26499
26517
|
for (const it of fc.items) {
|
|
@@ -26506,12 +26524,12 @@ function fixFlowSeqItems(fc) {
|
|
|
26506
26524
|
delete it.key;
|
|
26507
26525
|
if (isFlowToken(it.value)) {
|
|
26508
26526
|
if (it.value.end)
|
|
26509
|
-
|
|
26527
|
+
arrayPushArray(it.value.end, it.sep);
|
|
26510
26528
|
else
|
|
26511
26529
|
it.value.end = it.sep;
|
|
26512
26530
|
}
|
|
26513
26531
|
else
|
|
26514
|
-
|
|
26532
|
+
arrayPushArray(it.start, it.sep);
|
|
26515
26533
|
delete it.sep;
|
|
26516
26534
|
}
|
|
26517
26535
|
}
|
|
@@ -26929,7 +26947,7 @@ class Parser {
|
|
|
26929
26947
|
const prev = map.items[map.items.length - 2];
|
|
26930
26948
|
const end = prev?.value?.end;
|
|
26931
26949
|
if (Array.isArray(end)) {
|
|
26932
|
-
|
|
26950
|
+
arrayPushArray(end, it.start);
|
|
26933
26951
|
end.push(this.sourceToken);
|
|
26934
26952
|
map.items.pop();
|
|
26935
26953
|
return;
|
|
@@ -27144,7 +27162,7 @@ class Parser {
|
|
|
27144
27162
|
const prev = seq.items[seq.items.length - 2];
|
|
27145
27163
|
const end = prev?.value?.end;
|
|
27146
27164
|
if (Array.isArray(end)) {
|
|
27147
|
-
|
|
27165
|
+
arrayPushArray(end, it.start);
|
|
27148
27166
|
end.push(this.sourceToken);
|
|
27149
27167
|
seq.items.pop();
|
|
27150
27168
|
return;
|
|
@@ -28380,18 +28398,18 @@ const isMergeKey = (ctx, key) => (merge.identify(key) ||
|
|
|
28380
28398
|
merge.identify(key.value))) &&
|
|
28381
28399
|
ctx?.doc.schema.tags.some(tag => tag.tag === merge.tag && tag.default);
|
|
28382
28400
|
function addMergeToJSMap(ctx, map, value) {
|
|
28383
|
-
|
|
28384
|
-
if ((0,_nodes_identity_js__WEBPACK_IMPORTED_MODULE_0__.isSeq)(
|
|
28385
|
-
for (const it of
|
|
28401
|
+
const source = resolveAliasValue(ctx, value);
|
|
28402
|
+
if ((0,_nodes_identity_js__WEBPACK_IMPORTED_MODULE_0__.isSeq)(source))
|
|
28403
|
+
for (const it of source.items)
|
|
28386
28404
|
mergeValue(ctx, map, it);
|
|
28387
|
-
else if (Array.isArray(
|
|
28388
|
-
for (const it of
|
|
28405
|
+
else if (Array.isArray(source))
|
|
28406
|
+
for (const it of source)
|
|
28389
28407
|
mergeValue(ctx, map, it);
|
|
28390
28408
|
else
|
|
28391
|
-
mergeValue(ctx, map,
|
|
28409
|
+
mergeValue(ctx, map, source);
|
|
28392
28410
|
}
|
|
28393
28411
|
function mergeValue(ctx, map, value) {
|
|
28394
|
-
const source = ctx
|
|
28412
|
+
const source = resolveAliasValue(ctx, value);
|
|
28395
28413
|
if (!(0,_nodes_identity_js__WEBPACK_IMPORTED_MODULE_0__.isMap)(source))
|
|
28396
28414
|
throw new Error('Merge sources must be maps or map aliases');
|
|
28397
28415
|
const srcMap = source.toJSON(null, ctx, Map);
|
|
@@ -28414,6 +28432,9 @@ function mergeValue(ctx, map, value) {
|
|
|
28414
28432
|
}
|
|
28415
28433
|
return map;
|
|
28416
28434
|
}
|
|
28435
|
+
function resolveAliasValue(ctx, value) {
|
|
28436
|
+
return ctx && (0,_nodes_identity_js__WEBPACK_IMPORTED_MODULE_0__.isAlias)(value) ? value.resolve(ctx.doc, ctx) : value;
|
|
28437
|
+
}
|
|
28417
28438
|
|
|
28418
28439
|
|
|
28419
28440
|
|
|
@@ -29524,7 +29545,8 @@ function stringifyNumber({ format, minFractionDigits, tag, value }) {
|
|
|
29524
29545
|
if (!format &&
|
|
29525
29546
|
minFractionDigits &&
|
|
29526
29547
|
(!tag || tag === 'tag:yaml.org,2002:float') &&
|
|
29527
|
-
|
|
29548
|
+
/^-?\d/.test(n) &&
|
|
29549
|
+
!n.includes('e')) {
|
|
29528
29550
|
let i = n.indexOf('.');
|
|
29529
29551
|
if (i < 0) {
|
|
29530
29552
|
i = n.length;
|