@rexeus/typeweaver 0.0.4 → 0.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/README.md +5 -5
- package/dist/{acorn-rXlN7gk4.js → acorn-CJ4HNU11.js} +952 -853
- package/dist/angular-wXs0C_R2.js +2626 -0
- package/dist/{babel-DZgCLJ3w.js → babel-DNmSIBHM.js} +3300 -3055
- package/dist/{cli-Cz6q9I7F.js → cli-Cin8VieP.js} +2098 -5180
- package/dist/{estree-B92etQ3n.js → estree-BfVT8G2n.js} +1726 -1743
- package/dist/flow-DgzFy9Js.js +27138 -0
- package/dist/{glimmer-wgjvri6H.js → glimmer-DiXjs4DB.js} +424 -457
- package/dist/{graphql-Cl6ZUrDI.js → graphql-DLJHmbDb.js} +216 -212
- package/dist/{html-D3ugDhTt.js → html-BwjSBi_v.js} +682 -642
- package/dist/index.js +3 -5
- package/dist/{markdown-Nz6Lc3gB.js → markdown-DWIPYE8e.js} +1706 -1665
- package/dist/meriyah-CbAY3E55.js +2603 -0
- package/dist/{postcss-yEOijaXJ.js → postcss-DUOVol6C.js} +1344 -1324
- package/dist/run-cli-with-tsx.js +3 -5
- package/dist/{typescript-Cv79a1Qz.js → typescript-DDNbhgng.js} +6047 -5963
- package/dist/{yaml-DT3qlFoE.js → yaml-Bd8DkW_K.js} +934 -948
- package/package.json +18 -18
- package/dist/angular-D_XFD5k4.js +0 -2531
- package/dist/flow-q2wMXrDa.js +0 -26826
- package/dist/meriyah-DkEqawD_.js +0 -2456
|
@@ -1,31 +1,37 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var
|
|
4
|
-
var
|
|
5
|
-
var
|
|
6
|
-
var
|
|
7
|
-
|
|
8
|
-
}
|
|
9
|
-
|
|
1
|
+
var Yi = Object.create;
|
|
2
|
+
var Nt = Object.defineProperty;
|
|
3
|
+
var $i = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var Bi = Object.getOwnPropertyNames;
|
|
5
|
+
var Fi = Object.getPrototypeOf, qi = Object.prototype.hasOwnProperty;
|
|
6
|
+
var dr = (t) => {
|
|
7
|
+
throw TypeError(t);
|
|
8
|
+
};
|
|
9
|
+
var Ui = (t, e, n) => e in t ? Nt(t, e, { enumerable: true, configurable: true, writable: true, value: n }) : t[e] = n;
|
|
10
|
+
var te = (t, e) => () => (e || t((e = { exports: {} }).exports, e), e.exports), yr = (t, e) => {
|
|
11
|
+
for (var n in e) Nt(t, n, { get: e[n], enumerable: true });
|
|
12
|
+
}, Ki = (t, e, n, r) => {
|
|
13
|
+
if (e && typeof e == "object" || typeof e == "function") for (let s of Bi(e)) !qi.call(t, s) && s !== n && Nt(t, s, { get: () => e[s], enumerable: !(r = $i(e, s)) || r.enumerable });
|
|
10
14
|
return t;
|
|
11
15
|
};
|
|
12
|
-
var
|
|
13
|
-
var
|
|
14
|
-
|
|
15
|
-
|
|
16
|
+
var cn = (t, e, n) => (n = t != null ? Yi(Fi(t)) : {}, Ki(Nt(n, "default", { value: t, enumerable: true }) , t));
|
|
17
|
+
var ln = (t, e, n) => Ui(t, typeof e != "symbol" ? e + "" : e, n), fn = (t, e, n) => e.has(t) || dr("Cannot " + n);
|
|
18
|
+
var Te = (t, e, n) => (fn(t, e, "read from private field"), n ? n.call(t) : e.get(t)), Ot = (t, e, n) => e.has(t) ? dr("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(t) : e.set(t, n), un = (t, e, n, r) => (fn(t, e, "write to private field"), e.set(t, n), n), Xe = (t, e, n) => (fn(t, e, "access private method"), n);
|
|
19
|
+
var oe = te(($) => {
|
|
20
|
+
var re = { ANCHOR: "&", COMMENT: "#", TAG: "!", DIRECTIVES_END: "-", DOCUMENT_END: "." }, pt = { ALIAS: "ALIAS", BLANK_LINE: "BLANK_LINE", BLOCK_FOLDED: "BLOCK_FOLDED", BLOCK_LITERAL: "BLOCK_LITERAL", COMMENT: "COMMENT", DIRECTIVE: "DIRECTIVE", DOCUMENT: "DOCUMENT", FLOW_MAP: "FLOW_MAP", FLOW_SEQ: "FLOW_SEQ", MAP: "MAP", MAP_KEY: "MAP_KEY", MAP_VALUE: "MAP_VALUE", PLAIN: "PLAIN", QUOTE_DOUBLE: "QUOTE_DOUBLE", QUOTE_SINGLE: "QUOTE_SINGLE", SEQ: "SEQ", SEQ_ITEM: "SEQ_ITEM" }, bo = "tag:yaml.org,2002:", No = { MAP: "tag:yaml.org,2002:map", SEQ: "tag:yaml.org,2002:seq", STR: "tag:yaml.org,2002:str" };
|
|
21
|
+
function Zr(t) {
|
|
16
22
|
let e = [0], n = t.indexOf(`
|
|
17
23
|
`);
|
|
18
24
|
for (; n !== -1; ) n += 1, e.push(n), n = t.indexOf(`
|
|
19
25
|
`, n);
|
|
20
26
|
return e;
|
|
21
27
|
}
|
|
22
|
-
function
|
|
28
|
+
function es(t) {
|
|
23
29
|
let e, n;
|
|
24
|
-
return typeof t == "string" ? (e =
|
|
30
|
+
return typeof t == "string" ? (e = Zr(t), n = t) : (Array.isArray(t) && (t = t[0]), t && t.context && (t.lineStarts || (t.lineStarts = Zr(t.context.src)), e = t.lineStarts, n = t.context.src)), { lineStarts: e, src: n };
|
|
25
31
|
}
|
|
26
|
-
function
|
|
32
|
+
function Mn(t, e) {
|
|
27
33
|
if (typeof t != "number" || t < 0) return null;
|
|
28
|
-
let { lineStarts: n, src: r } =
|
|
34
|
+
let { lineStarts: n, src: r } = es(e);
|
|
29
35
|
if (!n || !r || t > r.length) return null;
|
|
30
36
|
for (let i = 0; i < n.length; ++i) {
|
|
31
37
|
let o = n[i];
|
|
@@ -35,16 +41,16 @@ var le = te((U) => {
|
|
|
35
41
|
let s = n.length;
|
|
36
42
|
return { line: s, col: t - n[s - 1] + 1 };
|
|
37
43
|
}
|
|
38
|
-
function
|
|
39
|
-
let { lineStarts: n, src: r } =
|
|
44
|
+
function Oo(t, e) {
|
|
45
|
+
let { lineStarts: n, src: r } = es(e);
|
|
40
46
|
if (!n || !(t >= 1) || t > n.length) return null;
|
|
41
47
|
let s = n[t - 1], i = n[t];
|
|
42
48
|
for (; i && i > s && r[i - 1] === `
|
|
43
49
|
`; ) --i;
|
|
44
50
|
return r.slice(s, i);
|
|
45
51
|
}
|
|
46
|
-
function
|
|
47
|
-
let s =
|
|
52
|
+
function Ao({ start: t, end: e }, n, r = 80) {
|
|
53
|
+
let s = Oo(t.line, n);
|
|
48
54
|
if (!s) return null;
|
|
49
55
|
let { col: i } = t;
|
|
50
56
|
if (s.length > r) if (i <= r - 10) s = s.substr(0, r - 1) + "\u2026";
|
|
@@ -226,13 +232,13 @@ ${c}${l}${a}`;
|
|
|
226
232
|
return false;
|
|
227
233
|
}
|
|
228
234
|
get jsonLike() {
|
|
229
|
-
return [
|
|
235
|
+
return [pt.FLOW_MAP, pt.FLOW_SEQ, pt.QUOTE_DOUBLE, pt.QUOTE_SINGLE].indexOf(this.type) !== -1;
|
|
230
236
|
}
|
|
231
237
|
get rangeAsLinePos() {
|
|
232
238
|
if (!this.range || !this.context) return;
|
|
233
|
-
let e =
|
|
239
|
+
let e = Mn(this.range.start, this.context.root);
|
|
234
240
|
if (!e) return;
|
|
235
|
-
let n =
|
|
241
|
+
let n = Mn(this.range.end, this.context.root);
|
|
236
242
|
return { start: e, end: n };
|
|
237
243
|
}
|
|
238
244
|
get rawValue() {
|
|
@@ -288,7 +294,7 @@ ${c}${l}${a}`;
|
|
|
288
294
|
let e = this.source.context && this.source.context.root;
|
|
289
295
|
if (typeof this.offset == "number") {
|
|
290
296
|
this.range = new Be(this.offset, this.offset + 1);
|
|
291
|
-
let n = e &&
|
|
297
|
+
let n = e && Mn(this.offset, e);
|
|
292
298
|
if (n) {
|
|
293
299
|
let r = { line: n.line, col: n.col + 1 };
|
|
294
300
|
this.linePos = { start: n, end: r };
|
|
@@ -298,7 +304,7 @@ ${c}${l}${a}`;
|
|
|
298
304
|
if (this.linePos) {
|
|
299
305
|
let { line: n, col: r } = this.linePos.start;
|
|
300
306
|
this.message += ` at line ${n}, column ${r}`;
|
|
301
|
-
let s = e &&
|
|
307
|
+
let s = e && Ao(this.linePos, e);
|
|
302
308
|
s && (this.message += `:
|
|
303
309
|
|
|
304
310
|
${s}
|
|
@@ -310,23 +316,23 @@ ${s}
|
|
|
310
316
|
constructor(e, n) {
|
|
311
317
|
super("YAMLReferenceError", e, n);
|
|
312
318
|
}
|
|
313
|
-
},
|
|
319
|
+
}, mt = class extends ye {
|
|
314
320
|
constructor(e, n) {
|
|
315
321
|
super("YAMLSemanticError", e, n);
|
|
316
322
|
}
|
|
317
|
-
},
|
|
323
|
+
}, kn = class extends ye {
|
|
318
324
|
constructor(e, n) {
|
|
319
325
|
super("YAMLSyntaxError", e, n);
|
|
320
326
|
}
|
|
321
|
-
},
|
|
327
|
+
}, Pn = class extends ye {
|
|
322
328
|
constructor(e, n) {
|
|
323
329
|
super("YAMLWarning", e, n);
|
|
324
330
|
}
|
|
325
331
|
};
|
|
326
|
-
function
|
|
332
|
+
function Lo(t, e, n) {
|
|
327
333
|
return e in t ? Object.defineProperty(t, e, { value: n, enumerable: true, configurable: true, writable: true }) : t[e] = n, t;
|
|
328
334
|
}
|
|
329
|
-
var
|
|
335
|
+
var In = class t extends se {
|
|
330
336
|
static endOfLine(e, n, r) {
|
|
331
337
|
let s = e[n], i = n;
|
|
332
338
|
for (; s && s !== `
|
|
@@ -361,12 +367,12 @@ ${s}
|
|
|
361
367
|
switch (o) {
|
|
362
368
|
case " ": {
|
|
363
369
|
let a = "Plain value cannot start with a tab character";
|
|
364
|
-
return { errors: [new
|
|
370
|
+
return { errors: [new mt(this, a)], str: i };
|
|
365
371
|
}
|
|
366
372
|
case "@":
|
|
367
373
|
case "`": {
|
|
368
374
|
let a = `Plain value cannot start with reserved character ${o}`;
|
|
369
|
-
return { errors: [new
|
|
375
|
+
return { errors: [new mt(this, a)], str: i };
|
|
370
376
|
}
|
|
371
377
|
default:
|
|
372
378
|
return i;
|
|
@@ -390,22 +396,22 @@ ${s}
|
|
|
390
396
|
` && (i = t.endOfLine(s, n, r)), this.valueRange = new Be(n, i), i = se.endOfWhiteSpace(s, i), i = this.parseComment(i), (!this.hasComment || this.valueRange.isEmpty()) && (i = this.parseBlockValue(i)), i;
|
|
391
397
|
}
|
|
392
398
|
};
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
399
|
+
$.Char = re;
|
|
400
|
+
$.Node = se;
|
|
401
|
+
$.PlainValue = In;
|
|
402
|
+
$.Range = Be;
|
|
403
|
+
$.Type = pt;
|
|
404
|
+
$.YAMLError = ye;
|
|
405
|
+
$.YAMLReferenceError = Cn;
|
|
406
|
+
$.YAMLSemanticError = mt;
|
|
407
|
+
$.YAMLSyntaxError = kn;
|
|
408
|
+
$.YAMLWarning = Pn;
|
|
409
|
+
$._defineProperty = Lo;
|
|
410
|
+
$.defaultTagPrefix = bo;
|
|
411
|
+
$.defaultTags = No;
|
|
406
412
|
});
|
|
407
|
-
var
|
|
408
|
-
var u =
|
|
413
|
+
var ns = te((ts) => {
|
|
414
|
+
var u = oe(), Se = class extends u.Node {
|
|
409
415
|
constructor() {
|
|
410
416
|
super(u.Type.BLANK_LINE);
|
|
411
417
|
}
|
|
@@ -415,7 +421,7 @@ var Rs = te((xs) => {
|
|
|
415
421
|
parse(e, n) {
|
|
416
422
|
return this.context = e, this.range = new u.Range(n, n + 1), n + 1;
|
|
417
423
|
}
|
|
418
|
-
},
|
|
424
|
+
}, ht = class extends u.Node {
|
|
419
425
|
constructor(e, n) {
|
|
420
426
|
super(e, n), this.node = null;
|
|
421
427
|
}
|
|
@@ -472,10 +478,10 @@ var Rs = te((xs) => {
|
|
|
472
478
|
return this.range = new u.Range(n, r), r;
|
|
473
479
|
}
|
|
474
480
|
};
|
|
475
|
-
function
|
|
481
|
+
function vn(t) {
|
|
476
482
|
let e = t;
|
|
477
|
-
for (; e instanceof
|
|
478
|
-
if (!(e instanceof
|
|
483
|
+
for (; e instanceof ht; ) e = e.node;
|
|
484
|
+
if (!(e instanceof xt)) return null;
|
|
479
485
|
let n = e.items.length, r = -1;
|
|
480
486
|
for (let o = n - 1; o >= 0; --o) {
|
|
481
487
|
let a = e.items[o];
|
|
@@ -491,7 +497,7 @@ var Rs = te((xs) => {
|
|
|
491
497
|
for (; e.range.end = i, e.valueRange && e.valueRange.end > i && (e.valueRange.end = i), e !== t; ) e = e.context.parent;
|
|
492
498
|
return s;
|
|
493
499
|
}
|
|
494
|
-
var
|
|
500
|
+
var xt = class t extends u.Node {
|
|
495
501
|
static nextContentHasIndent(e, n, r) {
|
|
496
502
|
let s = u.Node.endOfLine(e, n) + 1;
|
|
497
503
|
n = u.Node.endOfWhiteSpace(e, s);
|
|
@@ -508,7 +514,7 @@ var Rs = te((xs) => {
|
|
|
508
514
|
break;
|
|
509
515
|
}
|
|
510
516
|
this.items = [e];
|
|
511
|
-
let n =
|
|
517
|
+
let n = vn(e);
|
|
512
518
|
n && Array.prototype.push.apply(this.items, n);
|
|
513
519
|
}
|
|
514
520
|
get includesTrailingLines() {
|
|
@@ -578,7 +584,7 @@ var Rs = te((xs) => {
|
|
|
578
584
|
g === `
|
|
579
585
|
` && (i = h + 1, f = true);
|
|
580
586
|
}
|
|
581
|
-
let y =
|
|
587
|
+
let y = vn(d);
|
|
582
588
|
y && Array.prototype.push.apply(this.items, y);
|
|
583
589
|
}
|
|
584
590
|
return c;
|
|
@@ -599,7 +605,7 @@ var Rs = te((xs) => {
|
|
|
599
605
|
}
|
|
600
606
|
return u.Node.addStringTerminator(e, r.end, i);
|
|
601
607
|
}
|
|
602
|
-
},
|
|
608
|
+
}, _n = class extends u.Node {
|
|
603
609
|
constructor() {
|
|
604
610
|
super(u.Type.DIRECTIVE), this.name = null;
|
|
605
611
|
}
|
|
@@ -624,7 +630,7 @@ var Rs = te((xs) => {
|
|
|
624
630
|
let r = this.parseName(n + 1);
|
|
625
631
|
return r = this.parseParameters(r), r = this.parseComment(r), this.range = new u.Range(n, r), r;
|
|
626
632
|
}
|
|
627
|
-
},
|
|
633
|
+
}, Rn = class t extends u.Node {
|
|
628
634
|
static startCommentOrEndBlankLine(e, n) {
|
|
629
635
|
let r = u.Node.endOfWhiteSpace(e, n), s = e[r];
|
|
630
636
|
return s === "#" || s === `
|
|
@@ -653,7 +659,7 @@ var Rs = te((xs) => {
|
|
|
653
659
|
break;
|
|
654
660
|
case "%":
|
|
655
661
|
{
|
|
656
|
-
let o = new
|
|
662
|
+
let o = new _n();
|
|
657
663
|
i = o.parse({ parent: this, src: n }, i), this.directives.push(o), s = true, r = false;
|
|
658
664
|
}
|
|
659
665
|
break;
|
|
@@ -688,7 +694,7 @@ var Rs = te((xs) => {
|
|
|
688
694
|
let a = u.Node.endOfIndent(r, i), l = n({ atLineStart: o, indent: -1, inFlow: false, inCollection: false, lineStart: s, parent: this }, a);
|
|
689
695
|
if (!l) return this.valueRange.end = a;
|
|
690
696
|
this.contents.push(l), i = l.range.end, o = false;
|
|
691
|
-
let f =
|
|
697
|
+
let f = vn(l);
|
|
692
698
|
f && Array.prototype.push.apply(this.contents, f);
|
|
693
699
|
}
|
|
694
700
|
}
|
|
@@ -739,12 +745,12 @@ var Rs = te((xs) => {
|
|
|
739
745
|
let { src: r } = e, s = u.Node.endOfIdentifier(r, n + 1);
|
|
740
746
|
return this.valueRange = new u.Range(n + 1, s), s = u.Node.endOfWhiteSpace(r, s), s = this.parseComment(s), s;
|
|
741
747
|
}
|
|
742
|
-
},
|
|
748
|
+
}, ae = { CLIP: "CLIP", KEEP: "KEEP", STRIP: "STRIP" }, Dn = class extends u.Node {
|
|
743
749
|
constructor(e, n) {
|
|
744
|
-
super(e, n), this.blockIndent = null, this.chomping =
|
|
750
|
+
super(e, n), this.blockIndent = null, this.chomping = ae.CLIP, this.header = null;
|
|
745
751
|
}
|
|
746
752
|
get includesTrailingLines() {
|
|
747
|
-
return this.chomping ===
|
|
753
|
+
return this.chomping === ae.KEEP;
|
|
748
754
|
}
|
|
749
755
|
get strValue() {
|
|
750
756
|
if (!this.valueRange || !this.context) return null;
|
|
@@ -754,14 +760,14 @@ var Rs = te((xs) => {
|
|
|
754
760
|
for (; o === `
|
|
755
761
|
` || o === " " || o === " "; ) {
|
|
756
762
|
if (n -= 1, n <= e) {
|
|
757
|
-
if (this.chomping ===
|
|
763
|
+
if (this.chomping === ae.KEEP) break;
|
|
758
764
|
return "";
|
|
759
765
|
}
|
|
760
766
|
o === `
|
|
761
767
|
` && (i = n), o = s[n - 1];
|
|
762
768
|
}
|
|
763
769
|
let a = n + 1;
|
|
764
|
-
i && (this.chomping ===
|
|
770
|
+
i && (this.chomping === ae.KEEP ? (a = i, n = this.valueRange.end) : n = i);
|
|
765
771
|
let c = r + this.blockIndent, l = this.type === u.Type.BLOCK_FOLDED, f = true, m = "", d = "", y = false;
|
|
766
772
|
for (let h = e; h < n; ++h) {
|
|
767
773
|
for (let w = 0; w < c && s[h] === " "; ++w) h += 1;
|
|
@@ -772,16 +778,16 @@ var Rs = te((xs) => {
|
|
|
772
778
|
` : d = `
|
|
773
779
|
`;
|
|
774
780
|
else {
|
|
775
|
-
let w = u.Node.endOfLine(s, h),
|
|
781
|
+
let w = u.Node.endOfLine(s, h), M = s.slice(h, w);
|
|
776
782
|
h = w, l && (g === " " || g === " ") && h < a ? (d === " " ? d = `
|
|
777
783
|
` : !y && !f && d === `
|
|
778
784
|
` && (d = `
|
|
779
785
|
|
|
780
|
-
`), m += d +
|
|
781
|
-
`, y = false), f &&
|
|
786
|
+
`), m += d + M, d = w < n && s[w] || "", y = true) : (m += d + M, d = l && h < a ? " " : `
|
|
787
|
+
`, y = false), f && M !== "" && (f = false);
|
|
782
788
|
}
|
|
783
789
|
}
|
|
784
|
-
return this.chomping ===
|
|
790
|
+
return this.chomping === ae.STRIP ? m : m + `
|
|
785
791
|
`;
|
|
786
792
|
}
|
|
787
793
|
parseBlockHeader(e) {
|
|
@@ -790,10 +796,10 @@ var Rs = te((xs) => {
|
|
|
790
796
|
let i = n[r];
|
|
791
797
|
switch (i) {
|
|
792
798
|
case "-":
|
|
793
|
-
this.chomping =
|
|
799
|
+
this.chomping = ae.STRIP;
|
|
794
800
|
break;
|
|
795
801
|
case "+":
|
|
796
|
-
this.chomping =
|
|
802
|
+
this.chomping = ae.KEEP;
|
|
797
803
|
break;
|
|
798
804
|
case "0":
|
|
799
805
|
case "1":
|
|
@@ -840,7 +846,7 @@ var Rs = te((xs) => {
|
|
|
840
846
|
r[l] === `
|
|
841
847
|
` ? i = l : i = o = u.Node.endOfLine(r, l);
|
|
842
848
|
}
|
|
843
|
-
return this.chomping !==
|
|
849
|
+
return this.chomping !== ae.KEEP && (i = r[o] ? o + 1 : o), this.valueRange = new u.Range(e + 1, i), i;
|
|
844
850
|
}
|
|
845
851
|
parse(e, n) {
|
|
846
852
|
this.context = e;
|
|
@@ -850,7 +856,7 @@ var Rs = te((xs) => {
|
|
|
850
856
|
setOrigRanges(e, n) {
|
|
851
857
|
return n = super.setOrigRanges(e, n), this.header ? this.header.setOrigRange(e, n) : n;
|
|
852
858
|
}
|
|
853
|
-
},
|
|
859
|
+
}, Yn = class extends u.Node {
|
|
854
860
|
constructor(e, n) {
|
|
855
861
|
super(e, n), this.items = null;
|
|
856
862
|
}
|
|
@@ -932,7 +938,7 @@ var Rs = te((xs) => {
|
|
|
932
938
|
` && (a += 1);
|
|
933
939
|
}), o += e.slice(a, r.end), u.Node.addStringTerminator(e, r.end, o);
|
|
934
940
|
}
|
|
935
|
-
},
|
|
941
|
+
}, $n = class t extends u.Node {
|
|
936
942
|
static endOfQuote(e, n) {
|
|
937
943
|
let r = e[n];
|
|
938
944
|
for (; r && r !== '"'; ) n += r === "\\" ? 2 : 1, r = e[n];
|
|
@@ -1040,7 +1046,7 @@ var Rs = te((xs) => {
|
|
|
1040
1046
|
let { src: r } = e, s = t.endOfQuote(r, n + 1);
|
|
1041
1047
|
return this.valueRange = new u.Range(n, s), s = u.Node.endOfWhiteSpace(r, s), s = this.parseComment(s), s;
|
|
1042
1048
|
}
|
|
1043
|
-
},
|
|
1049
|
+
}, Bn = class t extends u.Node {
|
|
1044
1050
|
static endOfQuote(e, n) {
|
|
1045
1051
|
let r = e[n];
|
|
1046
1052
|
for (; r; ) if (r === "'") {
|
|
@@ -1077,32 +1083,32 @@ var Rs = te((xs) => {
|
|
|
1077
1083
|
return this.valueRange = new u.Range(n, s), s = u.Node.endOfWhiteSpace(r, s), s = this.parseComment(s), s;
|
|
1078
1084
|
}
|
|
1079
1085
|
};
|
|
1080
|
-
function
|
|
1086
|
+
function To(t, e) {
|
|
1081
1087
|
switch (t) {
|
|
1082
1088
|
case u.Type.ALIAS:
|
|
1083
1089
|
return new xn(t, e);
|
|
1084
1090
|
case u.Type.BLOCK_FOLDED:
|
|
1085
1091
|
case u.Type.BLOCK_LITERAL:
|
|
1086
|
-
return new
|
|
1092
|
+
return new Dn(t, e);
|
|
1087
1093
|
case u.Type.FLOW_MAP:
|
|
1088
1094
|
case u.Type.FLOW_SEQ:
|
|
1089
|
-
return new
|
|
1095
|
+
return new Yn(t, e);
|
|
1090
1096
|
case u.Type.MAP_KEY:
|
|
1091
1097
|
case u.Type.MAP_VALUE:
|
|
1092
1098
|
case u.Type.SEQ_ITEM:
|
|
1093
|
-
return new
|
|
1099
|
+
return new ht(t, e);
|
|
1094
1100
|
case u.Type.COMMENT:
|
|
1095
1101
|
case u.Type.PLAIN:
|
|
1096
1102
|
return new u.PlainValue(t, e);
|
|
1097
1103
|
case u.Type.QUOTE_DOUBLE:
|
|
1098
|
-
return new Yn(t, e);
|
|
1099
|
-
case u.Type.QUOTE_SINGLE:
|
|
1100
1104
|
return new $n(t, e);
|
|
1105
|
+
case u.Type.QUOTE_SINGLE:
|
|
1106
|
+
return new Bn(t, e);
|
|
1101
1107
|
default:
|
|
1102
1108
|
return null;
|
|
1103
1109
|
}
|
|
1104
1110
|
}
|
|
1105
|
-
var
|
|
1111
|
+
var Fn = class t {
|
|
1106
1112
|
static parseType(e, n, r) {
|
|
1107
1113
|
switch (e[n]) {
|
|
1108
1114
|
case "*":
|
|
@@ -1132,10 +1138,10 @@ var Rs = te((xs) => {
|
|
|
1132
1138
|
constructor(e = {}, { atLineStart: n, inCollection: r, inFlow: s, indent: i, lineStart: o, parent: a } = {}) {
|
|
1133
1139
|
u._defineProperty(this, "parseNode", (c, l) => {
|
|
1134
1140
|
if (u.Node.atDocumentBoundary(this.src, l)) return null;
|
|
1135
|
-
let f = new t(this, c), { props: m, type: d, valueStart: y } = f.parseProps(l), h =
|
|
1141
|
+
let f = new t(this, c), { props: m, type: d, valueStart: y } = f.parseProps(l), h = To(d, m), g = h.parse(f, y);
|
|
1136
1142
|
if (h.range = new u.Range(l, g), g <= l && (h.error = new Error("Node#parse consumed no characters"), h.error.parseEnd = g, h.error.source = h, h.range.end = l + 1), f.nodeStartsCollection(h)) {
|
|
1137
1143
|
!h.error && !f.atLineStart && f.parent.type === u.Type.DOCUMENT && (h.error = new u.YAMLSyntaxError(h, "Block collection must not have preceding content here (e.g. directives-end indicator)"));
|
|
1138
|
-
let w = new
|
|
1144
|
+
let w = new xt(h);
|
|
1139
1145
|
return g = w.parse(new t(f), g), w.range = new u.Range(l, g), w;
|
|
1140
1146
|
}
|
|
1141
1147
|
return h;
|
|
@@ -1144,7 +1150,7 @@ var Rs = te((xs) => {
|
|
|
1144
1150
|
nodeStartsCollection(e) {
|
|
1145
1151
|
let { inCollection: n, inFlow: r, src: s } = this;
|
|
1146
1152
|
if (n || r) return false;
|
|
1147
|
-
if (e instanceof
|
|
1153
|
+
if (e instanceof ht) return true;
|
|
1148
1154
|
let i = e.range.end;
|
|
1149
1155
|
return s[i] === `
|
|
1150
1156
|
` || s[i - 1] === `
|
|
@@ -1180,13 +1186,13 @@ var Rs = te((xs) => {
|
|
|
1180
1186
|
return { props: i, type: c, valueStart: e };
|
|
1181
1187
|
}
|
|
1182
1188
|
};
|
|
1183
|
-
function
|
|
1189
|
+
function Mo(t) {
|
|
1184
1190
|
let e = [];
|
|
1185
1191
|
t.indexOf("\r") !== -1 && (t = t.replace(/\r\n?/g, (s, i) => (s.length > 1 && e.push(i), `
|
|
1186
1192
|
`)));
|
|
1187
1193
|
let n = [], r = 0;
|
|
1188
1194
|
do {
|
|
1189
|
-
let s = new
|
|
1195
|
+
let s = new Rn(), i = new Fn({ src: t });
|
|
1190
1196
|
r = s.parse(i, r), n.push(s);
|
|
1191
1197
|
} while (r < t.length);
|
|
1192
1198
|
return n.setOrigRanges = () => {
|
|
@@ -1198,11 +1204,11 @@ var Rs = te((xs) => {
|
|
|
1198
1204
|
}, n.toString = () => n.join(`...
|
|
1199
1205
|
`), n;
|
|
1200
1206
|
}
|
|
1201
|
-
|
|
1207
|
+
ts.parse = Mo;
|
|
1202
1208
|
});
|
|
1203
1209
|
var qe = te((k) => {
|
|
1204
|
-
var p =
|
|
1205
|
-
function
|
|
1210
|
+
var p = oe();
|
|
1211
|
+
function Co(t, e, n) {
|
|
1206
1212
|
return n ? `#${n.replace(/[\s\S]^/gm, `$&${e}#`)}
|
|
1207
1213
|
${e}${t}` : t;
|
|
1208
1214
|
}
|
|
@@ -1211,10 +1217,10 @@ ${e}${t}` : t;
|
|
|
1211
1217
|
`) === -1 ? `${t} #${n}` : `${t}
|
|
1212
1218
|
` + n.replace(/^/gm, `${e || ""}#`) : t;
|
|
1213
1219
|
}
|
|
1214
|
-
var
|
|
1220
|
+
var j = class {
|
|
1215
1221
|
};
|
|
1216
|
-
function
|
|
1217
|
-
if (Array.isArray(t)) return t.map((r, s) =>
|
|
1222
|
+
function ce(t, e, n) {
|
|
1223
|
+
if (Array.isArray(t)) return t.map((r, s) => ce(r, String(s), n));
|
|
1218
1224
|
if (t && typeof t.toJSON == "function") {
|
|
1219
1225
|
let r = n && n.anchors && n.anchors.get(t);
|
|
1220
1226
|
r && (n.onCreate = (i) => {
|
|
@@ -1225,18 +1231,18 @@ ${e}${t}` : t;
|
|
|
1225
1231
|
}
|
|
1226
1232
|
return (!n || !n.keep) && typeof t == "bigint" ? Number(t) : t;
|
|
1227
1233
|
}
|
|
1228
|
-
var
|
|
1234
|
+
var _ = class extends j {
|
|
1229
1235
|
constructor(e) {
|
|
1230
1236
|
super(), this.value = e;
|
|
1231
1237
|
}
|
|
1232
1238
|
toJSON(e, n) {
|
|
1233
|
-
return n && n.keep ? this.value :
|
|
1239
|
+
return n && n.keep ? this.value : ce(this.value, e, n);
|
|
1234
1240
|
}
|
|
1235
1241
|
toString() {
|
|
1236
1242
|
return String(this.value);
|
|
1237
1243
|
}
|
|
1238
1244
|
};
|
|
1239
|
-
function
|
|
1245
|
+
function rs(t, e, n) {
|
|
1240
1246
|
let r = n;
|
|
1241
1247
|
for (let s = e.length - 1; s >= 0; --s) {
|
|
1242
1248
|
let i = e[s];
|
|
@@ -1250,16 +1256,16 @@ ${e}${t}` : t;
|
|
|
1250
1256
|
}
|
|
1251
1257
|
return t.createNode(r, false);
|
|
1252
1258
|
}
|
|
1253
|
-
var
|
|
1259
|
+
var os = (t) => t == null || typeof t == "object" && t[Symbol.iterator]().next().done, W = class t extends j {
|
|
1254
1260
|
constructor(e) {
|
|
1255
1261
|
super(), p._defineProperty(this, "items", []), this.schema = e;
|
|
1256
1262
|
}
|
|
1257
1263
|
addIn(e, n) {
|
|
1258
|
-
if (
|
|
1264
|
+
if (os(e)) this.add(n);
|
|
1259
1265
|
else {
|
|
1260
1266
|
let [r, ...s] = e, i = this.get(r, true);
|
|
1261
1267
|
if (i instanceof t) i.addIn(s, n);
|
|
1262
|
-
else if (i === void 0 && this.schema) this.set(r,
|
|
1268
|
+
else if (i === void 0 && this.schema) this.set(r, rs(this.schema, s, n));
|
|
1263
1269
|
else throw new Error(`Expected YAML collection at ${r}. Remaining path: ${s}`);
|
|
1264
1270
|
}
|
|
1265
1271
|
}
|
|
@@ -1271,13 +1277,13 @@ ${e}${t}` : t;
|
|
|
1271
1277
|
}
|
|
1272
1278
|
getIn([e, ...n], r) {
|
|
1273
1279
|
let s = this.get(e, true);
|
|
1274
|
-
return n.length === 0 ? !r && s instanceof
|
|
1280
|
+
return n.length === 0 ? !r && s instanceof _ ? s.value : s : s instanceof t ? s.getIn(n, r) : void 0;
|
|
1275
1281
|
}
|
|
1276
1282
|
hasAllNullValues() {
|
|
1277
1283
|
return this.items.every((e) => {
|
|
1278
1284
|
if (!e || e.type !== "PAIR") return false;
|
|
1279
1285
|
let n = e.value;
|
|
1280
|
-
return n == null || n instanceof
|
|
1286
|
+
return n == null || n instanceof _ && n.value == null && !n.commentBefore && !n.comment && !n.tag;
|
|
1281
1287
|
});
|
|
1282
1288
|
}
|
|
1283
1289
|
hasIn([e, ...n]) {
|
|
@@ -1290,7 +1296,7 @@ ${e}${t}` : t;
|
|
|
1290
1296
|
else {
|
|
1291
1297
|
let s = this.get(e, true);
|
|
1292
1298
|
if (s instanceof t) s.setIn(n, r);
|
|
1293
|
-
else if (s === void 0 && this.schema) this.set(e,
|
|
1299
|
+
else if (s === void 0 && this.schema) this.set(e, rs(this.schema, n, r));
|
|
1294
1300
|
else throw new Error(`Expected YAML collection at ${e}. Remaining path: ${n}`);
|
|
1295
1301
|
}
|
|
1296
1302
|
}
|
|
@@ -1302,62 +1308,62 @@ ${e}${t}` : t;
|
|
|
1302
1308
|
m && (i += l);
|
|
1303
1309
|
let d = s && this.hasAllNullValues();
|
|
1304
1310
|
e = Object.assign({}, e, { allNullValues: d, indent: i, inFlow: m, type: null });
|
|
1305
|
-
let y = false, h = false, g = this.items.reduce((
|
|
1306
|
-
let
|
|
1307
|
-
|
|
1308
|
-
|
|
1309
|
-
}),
|
|
1310
|
-
let
|
|
1311
|
-
return m && !h &&
|
|
1312
|
-
`) && (h = true), m &&
|
|
1311
|
+
let y = false, h = false, g = this.items.reduce((M, A, C) => {
|
|
1312
|
+
let L;
|
|
1313
|
+
A && (!y && A.spaceBefore && M.push({ type: "comment", str: "" }), A.commentBefore && A.commentBefore.match(/^.*$/gm).forEach((Di) => {
|
|
1314
|
+
M.push({ type: "comment", str: `#${Di}` });
|
|
1315
|
+
}), A.comment && (L = A.comment), m && (!y && A.spaceBefore || A.commentBefore || A.comment || A.key && (A.key.commentBefore || A.key.comment) || A.value && (A.value.commentBefore || A.value.comment)) && (h = true)), y = false;
|
|
1316
|
+
let R = f(A, e, () => L = null, () => y = true);
|
|
1317
|
+
return m && !h && R.includes(`
|
|
1318
|
+
`) && (h = true), m && C < this.items.length - 1 && (R += ","), R = Fe(R, i, L), y && (L || m) && (y = false), M.push({ type: "item", str: R }), M;
|
|
1313
1319
|
}, []), w;
|
|
1314
1320
|
if (g.length === 0) w = r.start + r.end;
|
|
1315
1321
|
else if (m) {
|
|
1316
|
-
let { start:
|
|
1317
|
-
if (h ||
|
|
1318
|
-
w =
|
|
1319
|
-
for (let
|
|
1320
|
-
${l}${c}${
|
|
1322
|
+
let { start: M, end: A } = r, C = g.map((L) => L.str);
|
|
1323
|
+
if (h || C.reduce((L, R) => L + R.length + 2, 2) > t.maxFlowStringSingleLineLength) {
|
|
1324
|
+
w = M;
|
|
1325
|
+
for (let L of C) w += L ? `
|
|
1326
|
+
${l}${c}${L}` : `
|
|
1321
1327
|
`;
|
|
1322
1328
|
w += `
|
|
1323
|
-
${c}${
|
|
1324
|
-
} else w = `${
|
|
1329
|
+
${c}${A}`;
|
|
1330
|
+
} else w = `${M} ${C.join(" ")} ${A}`;
|
|
1325
1331
|
} else {
|
|
1326
|
-
let
|
|
1327
|
-
w =
|
|
1328
|
-
for (let
|
|
1329
|
-
${c}${
|
|
1332
|
+
let M = g.map(n);
|
|
1333
|
+
w = M.shift();
|
|
1334
|
+
for (let A of M) w += A ? `
|
|
1335
|
+
${c}${A}` : `
|
|
1330
1336
|
`;
|
|
1331
1337
|
}
|
|
1332
1338
|
return this.comment ? (w += `
|
|
1333
1339
|
` + this.comment.replace(/^/gm, `${c}#`), o && o()) : y && a && a(), w;
|
|
1334
1340
|
}
|
|
1335
1341
|
};
|
|
1336
|
-
p._defineProperty(
|
|
1337
|
-
function
|
|
1338
|
-
let e = t instanceof
|
|
1342
|
+
p._defineProperty(W, "maxFlowStringSingleLineLength", 60);
|
|
1343
|
+
function Dt(t) {
|
|
1344
|
+
let e = t instanceof _ ? t.value : t;
|
|
1339
1345
|
return e && typeof e == "string" && (e = Number(e)), Number.isInteger(e) && e >= 0 ? e : null;
|
|
1340
1346
|
}
|
|
1341
|
-
var
|
|
1347
|
+
var le = class extends W {
|
|
1342
1348
|
add(e) {
|
|
1343
1349
|
this.items.push(e);
|
|
1344
1350
|
}
|
|
1345
1351
|
delete(e) {
|
|
1346
|
-
let n =
|
|
1352
|
+
let n = Dt(e);
|
|
1347
1353
|
return typeof n != "number" ? false : this.items.splice(n, 1).length > 0;
|
|
1348
1354
|
}
|
|
1349
1355
|
get(e, n) {
|
|
1350
|
-
let r =
|
|
1356
|
+
let r = Dt(e);
|
|
1351
1357
|
if (typeof r != "number") return;
|
|
1352
1358
|
let s = this.items[r];
|
|
1353
|
-
return !n && s instanceof
|
|
1359
|
+
return !n && s instanceof _ ? s.value : s;
|
|
1354
1360
|
}
|
|
1355
1361
|
has(e) {
|
|
1356
|
-
let n =
|
|
1362
|
+
let n = Dt(e);
|
|
1357
1363
|
return typeof n == "number" && n < this.items.length;
|
|
1358
1364
|
}
|
|
1359
1365
|
set(e, n) {
|
|
1360
|
-
let r =
|
|
1366
|
+
let r = Dt(e);
|
|
1361
1367
|
if (typeof r != "number") throw new Error(`Expected a valid index, not ${e}.`);
|
|
1362
1368
|
this.items[r] = n;
|
|
1363
1369
|
}
|
|
@@ -1365,34 +1371,34 @@ ${c}${L}` : `
|
|
|
1365
1371
|
let r = [];
|
|
1366
1372
|
n && n.onCreate && n.onCreate(r);
|
|
1367
1373
|
let s = 0;
|
|
1368
|
-
for (let i of this.items) r.push(
|
|
1374
|
+
for (let i of this.items) r.push(ce(i, String(s++), n));
|
|
1369
1375
|
return r;
|
|
1370
1376
|
}
|
|
1371
1377
|
toString(e, n, r) {
|
|
1372
1378
|
return e ? super.toString(e, { blockItem: (s) => s.type === "comment" ? s.str : `- ${s.str}`, flowChars: { start: "[", end: "]" }, isMap: false, itemIndent: (e.indent || "") + " " }, n, r) : JSON.stringify(this);
|
|
1373
1379
|
}
|
|
1374
|
-
},
|
|
1380
|
+
}, ko = (t, e, n) => e === null ? "" : typeof e != "object" ? String(e) : t instanceof j && n && n.doc ? t.toString({ anchors: /* @__PURE__ */ Object.create(null), doc: n.doc, indent: "", indentStep: n.indentStep, inFlow: true, inStringifyKey: true, stringify: n.stringify }) : JSON.stringify(e), T = class t extends j {
|
|
1375
1381
|
constructor(e, n = null) {
|
|
1376
1382
|
super(), this.key = e, this.value = n, this.type = t.Type.PAIR;
|
|
1377
1383
|
}
|
|
1378
1384
|
get commentBefore() {
|
|
1379
|
-
return this.key instanceof
|
|
1385
|
+
return this.key instanceof j ? this.key.commentBefore : void 0;
|
|
1380
1386
|
}
|
|
1381
1387
|
set commentBefore(e) {
|
|
1382
|
-
if (this.key == null && (this.key = new
|
|
1388
|
+
if (this.key == null && (this.key = new _(null)), this.key instanceof j) this.key.commentBefore = e;
|
|
1383
1389
|
else {
|
|
1384
1390
|
let n = "Pair.commentBefore is an alias for Pair.key.commentBefore. To set it, the key must be a Node.";
|
|
1385
1391
|
throw new Error(n);
|
|
1386
1392
|
}
|
|
1387
1393
|
}
|
|
1388
1394
|
addToJSMap(e, n) {
|
|
1389
|
-
let r =
|
|
1395
|
+
let r = ce(this.key, "", e);
|
|
1390
1396
|
if (n instanceof Map) {
|
|
1391
|
-
let s =
|
|
1397
|
+
let s = ce(this.value, r, e);
|
|
1392
1398
|
n.set(r, s);
|
|
1393
1399
|
} else if (n instanceof Set) n.add(r);
|
|
1394
1400
|
else {
|
|
1395
|
-
let s =
|
|
1401
|
+
let s = ko(this.key, r, e), i = ce(this.value, s, e);
|
|
1396
1402
|
s in n ? Object.defineProperty(n, s, { value: i, writable: true, enumerable: true, configurable: true }) : n[s] = i;
|
|
1397
1403
|
}
|
|
1398
1404
|
return n;
|
|
@@ -1403,15 +1409,15 @@ ${c}${L}` : `
|
|
|
1403
1409
|
}
|
|
1404
1410
|
toString(e, n, r) {
|
|
1405
1411
|
if (!e || !e.doc) return JSON.stringify(this);
|
|
1406
|
-
let { indent: s, indentSeq: i, simpleKeys: o } = e.doc.options, { key: a, value: c } = this, l = a instanceof
|
|
1412
|
+
let { indent: s, indentSeq: i, simpleKeys: o } = e.doc.options, { key: a, value: c } = this, l = a instanceof j && a.comment;
|
|
1407
1413
|
if (o) {
|
|
1408
1414
|
if (l) throw new Error("With simple keys, key nodes cannot have comments");
|
|
1409
|
-
if (a instanceof
|
|
1410
|
-
let
|
|
1411
|
-
throw new Error(
|
|
1415
|
+
if (a instanceof W) {
|
|
1416
|
+
let R = "With simple keys, collection cannot be used as a key value";
|
|
1417
|
+
throw new Error(R);
|
|
1412
1418
|
}
|
|
1413
1419
|
}
|
|
1414
|
-
let f = !o && (!a || l || (a instanceof
|
|
1420
|
+
let f = !o && (!a || l || (a instanceof j ? a instanceof W || a.type === p.Type.BLOCK_FOLDED || a.type === p.Type.BLOCK_LITERAL : typeof a == "object")), { doc: m, indent: d, indentStep: y, stringify: h } = e;
|
|
1415
1421
|
e = Object.assign({}, e, { implicitKey: !f, indent: d + y });
|
|
1416
1422
|
let g = false, w = h(a, e, () => l = null, () => g = true);
|
|
1417
1423
|
if (w = Fe(w, e.indent, l), !f && w.length > 1024) {
|
|
@@ -1421,43 +1427,43 @@ ${c}${L}` : `
|
|
|
1421
1427
|
if (e.allNullValues && !o) return this.comment ? (w = Fe(w, e.indent, this.comment), n && n()) : g && !l && r && r(), e.inFlow && !f ? w : `? ${w}`;
|
|
1422
1428
|
w = f ? `? ${w}
|
|
1423
1429
|
${d}:` : `${w}:`, this.comment && (w = Fe(w, e.indent, this.comment), n && n());
|
|
1424
|
-
let
|
|
1425
|
-
if (c instanceof
|
|
1426
|
-
if (c.spaceBefore && (
|
|
1430
|
+
let M = "", A = null;
|
|
1431
|
+
if (c instanceof j) {
|
|
1432
|
+
if (c.spaceBefore && (M = `
|
|
1427
1433
|
`), c.commentBefore) {
|
|
1428
|
-
let
|
|
1429
|
-
|
|
1430
|
-
${
|
|
1434
|
+
let R = c.commentBefore.replace(/^/gm, `${e.indent}#`);
|
|
1435
|
+
M += `
|
|
1436
|
+
${R}`;
|
|
1431
1437
|
}
|
|
1432
|
-
|
|
1438
|
+
A = c.comment;
|
|
1433
1439
|
} else c && typeof c == "object" && (c = m.schema.createNode(c, true));
|
|
1434
|
-
e.implicitKey = false, !f && !this.comment && c instanceof
|
|
1435
|
-
let
|
|
1436
|
-
return
|
|
1437
|
-
${e.indent}` : !f && c instanceof
|
|
1438
|
-
`)) && (
|
|
1439
|
-
${e.indent}`) :
|
|
1440
|
-
` && (
|
|
1440
|
+
e.implicitKey = false, !f && !this.comment && c instanceof _ && (e.indentAtStart = w.length + 1), g = false, !i && s >= 2 && !e.inFlow && !f && c instanceof le && c.type !== p.Type.FLOW_SEQ && !c.tag && !m.anchors.getName(c) && (e.indent = e.indent.substr(2));
|
|
1441
|
+
let C = h(c, e, () => A = null, () => g = true), L = " ";
|
|
1442
|
+
return M || this.comment ? L = `${M}
|
|
1443
|
+
${e.indent}` : !f && c instanceof W ? (!(C[0] === "[" || C[0] === "{") || C.includes(`
|
|
1444
|
+
`)) && (L = `
|
|
1445
|
+
${e.indent}`) : C[0] === `
|
|
1446
|
+
` && (L = ""), g && !A && r && r(), Fe(w + L + C, e.indent, A);
|
|
1441
1447
|
}
|
|
1442
1448
|
};
|
|
1443
1449
|
p._defineProperty(T, "Type", { PAIR: "PAIR", MERGE_PAIR: "MERGE_PAIR" });
|
|
1444
|
-
var
|
|
1450
|
+
var Yt = (t, e) => {
|
|
1445
1451
|
if (t instanceof be) {
|
|
1446
1452
|
let n = e.get(t.source);
|
|
1447
1453
|
return n.count * n.aliasCount;
|
|
1448
|
-
} else if (t instanceof
|
|
1454
|
+
} else if (t instanceof W) {
|
|
1449
1455
|
let n = 0;
|
|
1450
1456
|
for (let r of t.items) {
|
|
1451
|
-
let s =
|
|
1457
|
+
let s = Yt(r, e);
|
|
1452
1458
|
s > n && (n = s);
|
|
1453
1459
|
}
|
|
1454
1460
|
return n;
|
|
1455
1461
|
} else if (t instanceof T) {
|
|
1456
|
-
let n =
|
|
1462
|
+
let n = Yt(t.key, e), r = Yt(t.value, e);
|
|
1457
1463
|
return Math.max(n, r);
|
|
1458
1464
|
}
|
|
1459
1465
|
return 1;
|
|
1460
|
-
}, be = class t extends
|
|
1466
|
+
}, be = class t extends j {
|
|
1461
1467
|
static stringify({ range: e, source: n }, { anchors: r, doc: s, implicitKey: i, inStringifyKey: o }) {
|
|
1462
1468
|
let a = Object.keys(r).find((l) => r[l] === n);
|
|
1463
1469
|
if (!a && o && (a = s.anchors.getName(n) || s.anchors.newName()), a) return `*${a}${i ? " " : ""}`;
|
|
@@ -1471,13 +1477,13 @@ ${e.indent}`) : M[0] === `
|
|
|
1471
1477
|
throw new Error("Alias nodes cannot have tags");
|
|
1472
1478
|
}
|
|
1473
1479
|
toJSON(e, n) {
|
|
1474
|
-
if (!n) return
|
|
1480
|
+
if (!n) return ce(this.source, e, n);
|
|
1475
1481
|
let { anchors: r, maxAliasCount: s } = n, i = r.get(this.source);
|
|
1476
1482
|
if (!i || i.res === void 0) {
|
|
1477
1483
|
let o = "This should not happen: Alias anchor was not resolved?";
|
|
1478
1484
|
throw this.cstNode ? new p.YAMLReferenceError(this.cstNode, o) : new ReferenceError(o);
|
|
1479
1485
|
}
|
|
1480
|
-
if (s >= 0 && (i.count += 1, i.aliasCount === 0 && (i.aliasCount =
|
|
1486
|
+
if (s >= 0 && (i.count += 1, i.aliasCount === 0 && (i.aliasCount = Yt(this.source, r)), i.count * i.aliasCount > s)) {
|
|
1481
1487
|
let o = "Excessive alias count indicates a resource exhaustion attack";
|
|
1482
1488
|
throw this.cstNode ? new p.YAMLReferenceError(this.cstNode, o) : new ReferenceError(o);
|
|
1483
1489
|
}
|
|
@@ -1488,14 +1494,14 @@ ${e.indent}`) : M[0] === `
|
|
|
1488
1494
|
}
|
|
1489
1495
|
};
|
|
1490
1496
|
p._defineProperty(be, "default", true);
|
|
1491
|
-
function
|
|
1492
|
-
let n = e instanceof
|
|
1497
|
+
function gt(t, e) {
|
|
1498
|
+
let n = e instanceof _ ? e.value : e;
|
|
1493
1499
|
for (let r of t) if (r instanceof T && (r.key === e || r.key === n || r.key && r.key.value === n)) return r;
|
|
1494
1500
|
}
|
|
1495
|
-
var
|
|
1501
|
+
var dt = class extends W {
|
|
1496
1502
|
add(e, n) {
|
|
1497
1503
|
e ? e instanceof T || (e = new T(e.key || e, e.value)) : e = new T(e);
|
|
1498
|
-
let r =
|
|
1504
|
+
let r = gt(this.items, e.key), s = this.schema && this.schema.sortMapEntries;
|
|
1499
1505
|
if (r) if (n) r.value = e.value;
|
|
1500
1506
|
else throw new Error(`Key ${e.key} already set`);
|
|
1501
1507
|
else if (s) {
|
|
@@ -1504,15 +1510,15 @@ ${e.indent}`) : M[0] === `
|
|
|
1504
1510
|
} else this.items.push(e);
|
|
1505
1511
|
}
|
|
1506
1512
|
delete(e) {
|
|
1507
|
-
let n =
|
|
1513
|
+
let n = gt(this.items, e);
|
|
1508
1514
|
return n ? this.items.splice(this.items.indexOf(n), 1).length > 0 : false;
|
|
1509
1515
|
}
|
|
1510
1516
|
get(e, n) {
|
|
1511
|
-
let r =
|
|
1512
|
-
return !n && s instanceof
|
|
1517
|
+
let r = gt(this.items, e), s = r && r.value;
|
|
1518
|
+
return !n && s instanceof _ ? s.value : s;
|
|
1513
1519
|
}
|
|
1514
1520
|
has(e) {
|
|
1515
|
-
return !!
|
|
1521
|
+
return !!gt(this.items, e);
|
|
1516
1522
|
}
|
|
1517
1523
|
set(e, n) {
|
|
1518
1524
|
this.add(new T(e, n), true);
|
|
@@ -1528,17 +1534,17 @@ ${e.indent}`) : M[0] === `
|
|
|
1528
1534
|
for (let s of this.items) if (!(s instanceof T)) throw new Error(`Map items must all be pairs; found ${JSON.stringify(s)} instead`);
|
|
1529
1535
|
return super.toString(e, { blockItem: (s) => s.str, flowChars: { start: "{", end: "}" }, isMap: true, itemIndent: e.indent || "" }, n, r);
|
|
1530
1536
|
}
|
|
1531
|
-
},
|
|
1537
|
+
}, as = "<<", Ft = class extends T {
|
|
1532
1538
|
constructor(e) {
|
|
1533
1539
|
if (e instanceof T) {
|
|
1534
1540
|
let n = e.value;
|
|
1535
|
-
n instanceof
|
|
1536
|
-
} else super(new
|
|
1541
|
+
n instanceof le || (n = new le(), n.items.push(e.value), n.range = e.value.range), super(e.key, n), this.range = e.range;
|
|
1542
|
+
} else super(new _(as), new le());
|
|
1537
1543
|
this.type = T.Type.MERGE_PAIR;
|
|
1538
1544
|
}
|
|
1539
1545
|
addToJSMap(e, n) {
|
|
1540
1546
|
for (let { source: r } of this.value.items) {
|
|
1541
|
-
if (!(r instanceof
|
|
1547
|
+
if (!(r instanceof dt)) throw new Error("Merge sources must be maps");
|
|
1542
1548
|
let s = r.toJSON(null, e, Map);
|
|
1543
1549
|
for (let [i, o] of s) n instanceof Map ? n.has(i) || n.set(i, o) : n instanceof Set ? n.add(i) : Object.prototype.hasOwnProperty.call(n, i) || Object.defineProperty(n, i, { value: o, writable: true, enumerable: true, configurable: true });
|
|
1544
1550
|
}
|
|
@@ -1551,18 +1557,18 @@ ${e.indent}`) : M[0] === `
|
|
|
1551
1557
|
let s = super.toString(e, n);
|
|
1552
1558
|
return this.value = r, s;
|
|
1553
1559
|
}
|
|
1554
|
-
},
|
|
1555
|
-
function
|
|
1560
|
+
}, Po = { defaultType: p.Type.BLOCK_LITERAL, lineWidth: 76 }, Io = { trueStr: "true", falseStr: "false" }, vo = { asBigInt: false }, _o = { nullStr: "null" }, Ne = { defaultType: p.Type.PLAIN, doubleQuoted: { jsonEncoding: false, minMultiLineLength: 40 }, fold: { lineWidth: 80, minContentWidth: 20 } };
|
|
1561
|
+
function Un(t, e, n) {
|
|
1556
1562
|
for (let { format: r, test: s, resolve: i } of e) if (s) {
|
|
1557
1563
|
let o = t.match(s);
|
|
1558
1564
|
if (o) {
|
|
1559
1565
|
let a = i.apply(null, o);
|
|
1560
|
-
return a instanceof
|
|
1566
|
+
return a instanceof _ || (a = new _(a)), r && (a.format = r), a;
|
|
1561
1567
|
}
|
|
1562
1568
|
}
|
|
1563
|
-
return n && (t = n(t)), new
|
|
1569
|
+
return n && (t = n(t)), new _(t);
|
|
1564
1570
|
}
|
|
1565
|
-
var
|
|
1571
|
+
var cs = "flow", qn = "block", $t = "quoted", ss = (t, e) => {
|
|
1566
1572
|
let n = t[e + 1];
|
|
1567
1573
|
for (; n === " " || n === " "; ) {
|
|
1568
1574
|
do
|
|
@@ -1573,16 +1579,16 @@ ${e.indent}`) : M[0] === `
|
|
|
1573
1579
|
}
|
|
1574
1580
|
return e;
|
|
1575
1581
|
};
|
|
1576
|
-
function
|
|
1582
|
+
function qt(t, e, n, { indentAtStart: r, lineWidth: s = 80, minContentWidth: i = 20, onFold: o, onOverflow: a }) {
|
|
1577
1583
|
if (!s || s < 0) return t;
|
|
1578
1584
|
let c = Math.max(1 + i, 1 + s - e.length);
|
|
1579
1585
|
if (t.length <= c) return t;
|
|
1580
1586
|
let l = [], f = {}, m = s - e.length;
|
|
1581
1587
|
typeof r == "number" && (r > s - Math.max(2, i) ? l.push(0) : m = s - r);
|
|
1582
|
-
let d, y, h = false, g = -1, w = -1,
|
|
1583
|
-
n ===
|
|
1584
|
-
for (let
|
|
1585
|
-
if (n ===
|
|
1588
|
+
let d, y, h = false, g = -1, w = -1, M = -1;
|
|
1589
|
+
n === qn && (g = ss(t, g), g !== -1 && (m = g + c));
|
|
1590
|
+
for (let C; C = t[g += 1]; ) {
|
|
1591
|
+
if (n === $t && C === "\\") {
|
|
1586
1592
|
switch (w = g, t[g + 1]) {
|
|
1587
1593
|
case "x":
|
|
1588
1594
|
g += 3;
|
|
@@ -1596,40 +1602,40 @@ ${e.indent}`) : M[0] === `
|
|
|
1596
1602
|
default:
|
|
1597
1603
|
g += 1;
|
|
1598
1604
|
}
|
|
1599
|
-
|
|
1605
|
+
M = g;
|
|
1600
1606
|
}
|
|
1601
|
-
if (
|
|
1602
|
-
`) n ===
|
|
1607
|
+
if (C === `
|
|
1608
|
+
`) n === qn && (g = ss(t, g)), m = g + c, d = void 0;
|
|
1603
1609
|
else {
|
|
1604
|
-
if (
|
|
1610
|
+
if (C === " " && y && y !== " " && y !== `
|
|
1605
1611
|
` && y !== " ") {
|
|
1606
|
-
let
|
|
1607
|
-
|
|
1608
|
-
` &&
|
|
1612
|
+
let L = t[g + 1];
|
|
1613
|
+
L && L !== " " && L !== `
|
|
1614
|
+
` && L !== " " && (d = g);
|
|
1609
1615
|
}
|
|
1610
1616
|
if (g >= m) if (d) l.push(d), m = d + c, d = void 0;
|
|
1611
|
-
else if (n ===
|
|
1612
|
-
for (; y === " " || y === " "; ) y =
|
|
1613
|
-
let
|
|
1614
|
-
if (f[
|
|
1615
|
-
l.push(
|
|
1617
|
+
else if (n === $t) {
|
|
1618
|
+
for (; y === " " || y === " "; ) y = C, C = t[g += 1], h = true;
|
|
1619
|
+
let L = g > M + 1 ? g - 2 : w - 1;
|
|
1620
|
+
if (f[L]) return t;
|
|
1621
|
+
l.push(L), f[L] = true, m = L + c, d = void 0;
|
|
1616
1622
|
} else h = true;
|
|
1617
1623
|
}
|
|
1618
|
-
y =
|
|
1624
|
+
y = C;
|
|
1619
1625
|
}
|
|
1620
1626
|
if (h && a && a(), l.length === 0) return t;
|
|
1621
1627
|
o && o();
|
|
1622
|
-
let
|
|
1623
|
-
for (let
|
|
1624
|
-
let
|
|
1625
|
-
|
|
1626
|
-
${e}${t.slice(0,
|
|
1627
|
-
${e}${t.slice(
|
|
1628
|
-
}
|
|
1629
|
-
return
|
|
1628
|
+
let A = t.slice(0, l[0]);
|
|
1629
|
+
for (let C = 0; C < l.length; ++C) {
|
|
1630
|
+
let L = l[C], R = l[C + 1] || t.length;
|
|
1631
|
+
L === 0 ? A = `
|
|
1632
|
+
${e}${t.slice(0, R)}` : (n === $t && f[L] && (A += `${t[L]}\\`), A += `
|
|
1633
|
+
${e}${t.slice(L + 1, R)}`);
|
|
1634
|
+
}
|
|
1635
|
+
return A;
|
|
1630
1636
|
}
|
|
1631
|
-
var
|
|
1632
|
-
function
|
|
1637
|
+
var Kn = ({ indentAtStart: t }) => t ? Object.assign({ indentAtStart: t }, Ne.fold) : Ne.fold, Ut = (t) => /^(%|---|\.\.\.)/m.test(t);
|
|
1638
|
+
function Ro(t, e, n) {
|
|
1633
1639
|
if (!e || e < 0) return false;
|
|
1634
1640
|
let r = e - n, s = t.length;
|
|
1635
1641
|
if (s <= r) return false;
|
|
@@ -1643,7 +1649,7 @@ ${e}${t.slice(A + 1, _)}`);
|
|
|
1643
1649
|
function we(t, e) {
|
|
1644
1650
|
let { implicitKey: n } = e, { jsonEncoding: r, minMultiLineLength: s } = Ne.doubleQuoted, i = JSON.stringify(t);
|
|
1645
1651
|
if (r) return i;
|
|
1646
|
-
let o = e.indent || (
|
|
1652
|
+
let o = e.indent || (Ut(t) ? " " : ""), a = "", c = 0;
|
|
1647
1653
|
for (let l = 0, f = i[l]; f; f = i[++l]) if (f === " " && i[l + 1] === "\\" && i[l + 2] === "n" && (a += i.slice(c, l) + "\\ ", l += 1, c = l, f = "\\"), f === "\\") switch (i[l + 1]) {
|
|
1648
1654
|
case "u":
|
|
1649
1655
|
{
|
|
@@ -1693,19 +1699,19 @@ ${e}${t.slice(A + 1, _)}`);
|
|
|
1693
1699
|
default:
|
|
1694
1700
|
l += 1;
|
|
1695
1701
|
}
|
|
1696
|
-
return a = c ? a + i.slice(c) : i, n ? a :
|
|
1702
|
+
return a = c ? a + i.slice(c) : i, n ? a : qt(a, o, $t, Kn(e));
|
|
1697
1703
|
}
|
|
1698
|
-
function
|
|
1704
|
+
function ls(t, e) {
|
|
1699
1705
|
if (e.implicitKey) {
|
|
1700
1706
|
if (/\n/.test(t)) return we(t, e);
|
|
1701
1707
|
} else if (/[ \t]\n|\n[ \t]/.test(t)) return we(t, e);
|
|
1702
|
-
let n = e.indent || (
|
|
1708
|
+
let n = e.indent || (Ut(t) ? " " : ""), r = "'" + t.replace(/'/g, "''").replace(/\n+/g, `$&
|
|
1703
1709
|
${n}`) + "'";
|
|
1704
|
-
return e.implicitKey ? r :
|
|
1710
|
+
return e.implicitKey ? r : qt(r, n, cs, Kn(e));
|
|
1705
1711
|
}
|
|
1706
|
-
function
|
|
1712
|
+
function Bt({ comment: t, type: e, value: n }, r, s, i) {
|
|
1707
1713
|
if (/\n[\t ]+$/.test(n) || /^\s*$/.test(n)) return we(n, r);
|
|
1708
|
-
let o = r.indent || (r.forceBlockIndent ||
|
|
1714
|
+
let o = r.indent || (r.forceBlockIndent || Ut(n) ? " " : ""), a = o ? "2" : "1", c = e === p.Type.BLOCK_FOLDED ? false : e === p.Type.BLOCK_LITERAL ? true : !Ro(n, Ne.fold.lineWidth, o.length), l = c ? "|" : ">";
|
|
1709
1715
|
if (!n) return l + `
|
|
1710
1716
|
`;
|
|
1711
1717
|
let f = "", m = "";
|
|
@@ -1723,43 +1729,43 @@ ${o}${m}`;
|
|
|
1723
1729
|
${o}${f}${n}${m}`;
|
|
1724
1730
|
n = n.replace(/\n+/g, `
|
|
1725
1731
|
$&`).replace(/(?:^|\n)([\t ].*)(?:([\n\t ]*)\n(?![\n\t ]))?/g, "$1$2").replace(/\n+/g, `$&${o}`);
|
|
1726
|
-
let d =
|
|
1732
|
+
let d = qt(`${f}${n}${m}`, o, qn, Ne.fold);
|
|
1727
1733
|
return `${l}
|
|
1728
1734
|
${o}${d}`;
|
|
1729
1735
|
}
|
|
1730
|
-
function
|
|
1736
|
+
function xo(t, e, n, r) {
|
|
1731
1737
|
let { comment: s, type: i, value: o } = t, { actualString: a, implicitKey: c, indent: l, inFlow: f } = e;
|
|
1732
1738
|
if (c && /[\n[\]{},]/.test(o) || f && /[[\]{},]/.test(o)) return we(o, e);
|
|
1733
1739
|
if (!o || /^[\n\t ,[\]{}#&*!|>'"%@`]|^[?-]$|^[?-][ \t]|[\n:][ \t]|[ \t]\n|[\n\t ]#|[\n\t :]$/.test(o)) return c || f || o.indexOf(`
|
|
1734
|
-
`) === -1 ? o.indexOf('"') !== -1 && o.indexOf("'") === -1 ?
|
|
1740
|
+
`) === -1 ? o.indexOf('"') !== -1 && o.indexOf("'") === -1 ? ls(o, e) : we(o, e) : Bt(t, e, n, r);
|
|
1735
1741
|
if (!c && !f && i !== p.Type.PLAIN && o.indexOf(`
|
|
1736
|
-
`) !== -1) return
|
|
1737
|
-
if (l === "" &&
|
|
1742
|
+
`) !== -1) return Bt(t, e, n, r);
|
|
1743
|
+
if (l === "" && Ut(o)) return e.forceBlockIndent = true, Bt(t, e, n, r);
|
|
1738
1744
|
let m = o.replace(/\n+/g, `$&
|
|
1739
1745
|
${l}`);
|
|
1740
1746
|
if (a) {
|
|
1741
1747
|
let { tags: y } = e.doc.schema;
|
|
1742
|
-
if (typeof
|
|
1748
|
+
if (typeof Un(m, y, y.scalarFallback).value != "string") return we(o, e);
|
|
1743
1749
|
}
|
|
1744
|
-
let d = c ? m :
|
|
1750
|
+
let d = c ? m : qt(m, l, cs, Kn(e));
|
|
1745
1751
|
return s && !f && (d.indexOf(`
|
|
1746
1752
|
`) !== -1 || s.indexOf(`
|
|
1747
|
-
`) !== -1) ? (n && n(),
|
|
1753
|
+
`) !== -1) ? (n && n(), Co(d, l, s)) : d;
|
|
1748
1754
|
}
|
|
1749
|
-
function
|
|
1755
|
+
function Do(t, e, n, r) {
|
|
1750
1756
|
let { defaultType: s } = Ne, { implicitKey: i, inFlow: o } = e, { type: a, value: c } = t;
|
|
1751
1757
|
typeof c != "string" && (c = String(c), t = Object.assign({}, t, { value: c }));
|
|
1752
1758
|
let l = (m) => {
|
|
1753
1759
|
switch (m) {
|
|
1754
1760
|
case p.Type.BLOCK_FOLDED:
|
|
1755
1761
|
case p.Type.BLOCK_LITERAL:
|
|
1756
|
-
return
|
|
1762
|
+
return Bt(t, e, n, r);
|
|
1757
1763
|
case p.Type.QUOTE_DOUBLE:
|
|
1758
1764
|
return we(c, e);
|
|
1759
1765
|
case p.Type.QUOTE_SINGLE:
|
|
1760
|
-
return
|
|
1766
|
+
return ls(c, e);
|
|
1761
1767
|
case p.Type.PLAIN:
|
|
1762
|
-
return
|
|
1768
|
+
return xo(t, e, n, r);
|
|
1763
1769
|
default:
|
|
1764
1770
|
return null;
|
|
1765
1771
|
}
|
|
@@ -1769,7 +1775,7 @@ ${l}`);
|
|
|
1769
1775
|
if (f === null && (f = l(s), f === null)) throw new Error(`Unsupported default string type ${s}`);
|
|
1770
1776
|
return f;
|
|
1771
1777
|
}
|
|
1772
|
-
function
|
|
1778
|
+
function Yo({ format: t, minFractionDigits: e, tag: n, value: r }) {
|
|
1773
1779
|
if (typeof r == "bigint") return String(r);
|
|
1774
1780
|
if (!isFinite(r)) return isNaN(r) ? ".nan" : r < 0 ? "-.inf" : ".inf";
|
|
1775
1781
|
let s = JSON.stringify(r);
|
|
@@ -1781,7 +1787,7 @@ ${l}`);
|
|
|
1781
1787
|
}
|
|
1782
1788
|
return s;
|
|
1783
1789
|
}
|
|
1784
|
-
function
|
|
1790
|
+
function fs(t, e) {
|
|
1785
1791
|
let n, r;
|
|
1786
1792
|
switch (e.type) {
|
|
1787
1793
|
case p.Type.FLOW_MAP:
|
|
@@ -1807,7 +1813,7 @@ ${l}`);
|
|
|
1807
1813
|
typeof s.offset == "number" ? (o = new p.YAMLSemanticError(e, i), o.offset = s.offset + 1) : (o = new p.YAMLSemanticError(s, i), s.range && s.range.end && (o.offset = s.range.end - s.range.start)), t.push(o);
|
|
1808
1814
|
}
|
|
1809
1815
|
}
|
|
1810
|
-
function
|
|
1816
|
+
function us(t, e) {
|
|
1811
1817
|
let n = e.context.src[e.range.start - 1];
|
|
1812
1818
|
if (n !== `
|
|
1813
1819
|
` && n !== " " && n !== " ") {
|
|
@@ -1815,11 +1821,11 @@ ${l}`);
|
|
|
1815
1821
|
t.push(new p.YAMLSemanticError(e, r));
|
|
1816
1822
|
}
|
|
1817
1823
|
}
|
|
1818
|
-
function
|
|
1824
|
+
function ps(t, e) {
|
|
1819
1825
|
let n = String(e), r = n.substr(0, 8) + "..." + n.substr(-8);
|
|
1820
1826
|
return new p.YAMLSemanticError(t, `The "${r}" key is too long`);
|
|
1821
1827
|
}
|
|
1822
|
-
function
|
|
1828
|
+
function ms(t, e) {
|
|
1823
1829
|
for (let { afterKey: n, before: r, comment: s } of e) {
|
|
1824
1830
|
let i = t.items[r];
|
|
1825
1831
|
i ? (n && i.value && (i = i.value), s === void 0 ? (n || !i.commentBefore) && (i.spaceBefore = true) : i.commentBefore ? i.commentBefore += `
|
|
@@ -1827,13 +1833,13 @@ ${l}`);
|
|
|
1827
1833
|
` + s : t.comment = s);
|
|
1828
1834
|
}
|
|
1829
1835
|
}
|
|
1830
|
-
function
|
|
1836
|
+
function Vn(t, e) {
|
|
1831
1837
|
let n = e.strValue;
|
|
1832
1838
|
return n ? typeof n == "string" ? n : (n.errors.forEach((r) => {
|
|
1833
1839
|
r.source || (r.source = e), t.errors.push(r);
|
|
1834
1840
|
}), n.str) : "";
|
|
1835
1841
|
}
|
|
1836
|
-
function
|
|
1842
|
+
function $o(t, e) {
|
|
1837
1843
|
let { handle: n, suffix: r } = e.tag, s = t.tagPrefixes.find((i) => i.handle === n);
|
|
1838
1844
|
if (!s) {
|
|
1839
1845
|
let i = t.getDefaults().tagPrefixes;
|
|
@@ -1849,7 +1855,7 @@ ${l}`);
|
|
|
1849
1855
|
}
|
|
1850
1856
|
return s.prefix + decodeURIComponent(r);
|
|
1851
1857
|
}
|
|
1852
|
-
function
|
|
1858
|
+
function Bo(t, e) {
|
|
1853
1859
|
let { tag: n, type: r } = e, s = false;
|
|
1854
1860
|
if (n) {
|
|
1855
1861
|
let { handle: i, suffix: o, verbatim: a } = n;
|
|
@@ -1859,7 +1865,7 @@ ${l}`);
|
|
|
1859
1865
|
t.errors.push(new p.YAMLSemanticError(e, c));
|
|
1860
1866
|
} else if (i === "!" && !o) s = true;
|
|
1861
1867
|
else try {
|
|
1862
|
-
return
|
|
1868
|
+
return $o(t, e);
|
|
1863
1869
|
} catch (c) {
|
|
1864
1870
|
t.errors.push(c);
|
|
1865
1871
|
}
|
|
@@ -1882,17 +1888,17 @@ ${l}`);
|
|
|
1882
1888
|
return null;
|
|
1883
1889
|
}
|
|
1884
1890
|
}
|
|
1885
|
-
function
|
|
1891
|
+
function is(t, e, n) {
|
|
1886
1892
|
let { tags: r } = t.schema, s = [];
|
|
1887
1893
|
for (let o of r) if (o.tag === n) if (o.test) s.push(o);
|
|
1888
1894
|
else {
|
|
1889
1895
|
let a = o.resolve(t, e);
|
|
1890
|
-
return a instanceof
|
|
1896
|
+
return a instanceof W ? a : new _(a);
|
|
1891
1897
|
}
|
|
1892
|
-
let i =
|
|
1893
|
-
return typeof i == "string" && s.length > 0 ?
|
|
1898
|
+
let i = Vn(t, e);
|
|
1899
|
+
return typeof i == "string" && s.length > 0 ? Un(i, s, r.scalarFallback) : null;
|
|
1894
1900
|
}
|
|
1895
|
-
function
|
|
1901
|
+
function Fo({ type: t }) {
|
|
1896
1902
|
switch (t) {
|
|
1897
1903
|
case p.Type.FLOW_MAP:
|
|
1898
1904
|
case p.Type.MAP:
|
|
@@ -1904,32 +1910,32 @@ ${l}`);
|
|
|
1904
1910
|
return p.defaultTags.STR;
|
|
1905
1911
|
}
|
|
1906
1912
|
}
|
|
1907
|
-
function
|
|
1913
|
+
function qo(t, e, n) {
|
|
1908
1914
|
try {
|
|
1909
|
-
let r =
|
|
1915
|
+
let r = is(t, e, n);
|
|
1910
1916
|
if (r) return n && e.tag && (r.tag = n), r;
|
|
1911
1917
|
} catch (r) {
|
|
1912
1918
|
return r.source || (r.source = e), t.errors.push(r), null;
|
|
1913
1919
|
}
|
|
1914
1920
|
try {
|
|
1915
|
-
let r =
|
|
1921
|
+
let r = Fo(e);
|
|
1916
1922
|
if (!r) throw new Error(`The tag ${n} is unavailable`);
|
|
1917
1923
|
let s = `The tag ${n} is unavailable, falling back to ${r}`;
|
|
1918
1924
|
t.warnings.push(new p.YAMLWarning(e, s));
|
|
1919
|
-
let i =
|
|
1925
|
+
let i = is(t, e, r);
|
|
1920
1926
|
return i.tag = n, i;
|
|
1921
1927
|
} catch (r) {
|
|
1922
1928
|
let s = new p.YAMLReferenceError(e, r.message);
|
|
1923
1929
|
return s.stack = r.stack, t.errors.push(s), null;
|
|
1924
1930
|
}
|
|
1925
1931
|
}
|
|
1926
|
-
var
|
|
1932
|
+
var Uo = (t) => {
|
|
1927
1933
|
if (!t) return false;
|
|
1928
1934
|
let { type: e } = t;
|
|
1929
1935
|
return e === p.Type.MAP_KEY || e === p.Type.MAP_VALUE || e === p.Type.SEQ_ITEM;
|
|
1930
1936
|
};
|
|
1931
|
-
function
|
|
1932
|
-
let n = { before: [], after: [] }, r = false, s = false, i =
|
|
1937
|
+
function Ko(t, e) {
|
|
1938
|
+
let n = { before: [], after: [] }, r = false, s = false, i = Uo(e.context.parent) ? e.context.parent.props.concat(e.props) : e.props;
|
|
1933
1939
|
for (let { start: o, end: a } of i) switch (e.context.src[o]) {
|
|
1934
1940
|
case p.Char.COMMENT: {
|
|
1935
1941
|
if (!e.commentHasRequiredWhitespace(o)) {
|
|
@@ -1957,7 +1963,7 @@ ${l}`);
|
|
|
1957
1963
|
}
|
|
1958
1964
|
return { comments: n, hasAnchor: r, hasTag: s };
|
|
1959
1965
|
}
|
|
1960
|
-
function
|
|
1966
|
+
function Vo(t, e) {
|
|
1961
1967
|
let { anchors: n, errors: r, schema: s } = t;
|
|
1962
1968
|
if (e.type === p.Type.ALIAS) {
|
|
1963
1969
|
let o = e.rawValue, a = n.getNode(o);
|
|
@@ -1968,23 +1974,23 @@ ${l}`);
|
|
|
1968
1974
|
let c = new be(a);
|
|
1969
1975
|
return n._cstAliases.push(c), c;
|
|
1970
1976
|
}
|
|
1971
|
-
let i =
|
|
1972
|
-
if (i) return
|
|
1977
|
+
let i = Bo(t, e);
|
|
1978
|
+
if (i) return qo(t, e, i);
|
|
1973
1979
|
if (e.type !== p.Type.PLAIN) {
|
|
1974
1980
|
let o = `Failed to resolve ${e.type} node here`;
|
|
1975
1981
|
return r.push(new p.YAMLSyntaxError(e, o)), null;
|
|
1976
1982
|
}
|
|
1977
1983
|
try {
|
|
1978
|
-
let o =
|
|
1979
|
-
return
|
|
1984
|
+
let o = Vn(t, e);
|
|
1985
|
+
return Un(o, s.tags, s.tags.scalarFallback);
|
|
1980
1986
|
} catch (o) {
|
|
1981
1987
|
return o.source || (o.source = e), r.push(o), null;
|
|
1982
1988
|
}
|
|
1983
1989
|
}
|
|
1984
|
-
function
|
|
1990
|
+
function fe(t, e) {
|
|
1985
1991
|
if (!e) return null;
|
|
1986
1992
|
e.error && t.errors.push(e.error);
|
|
1987
|
-
let { comments: n, hasAnchor: r, hasTag: s } =
|
|
1993
|
+
let { comments: n, hasAnchor: r, hasTag: s } = Ko(t.errors, e);
|
|
1988
1994
|
if (r) {
|
|
1989
1995
|
let { anchors: o } = t, a = e.anchor, c = o.getNode(a);
|
|
1990
1996
|
c && (o.map[o.newName(a)] = c), o.map[a] = e;
|
|
@@ -1993,7 +1999,7 @@ ${l}`);
|
|
|
1993
1999
|
let o = "An alias node must not specify any properties";
|
|
1994
2000
|
t.errors.push(new p.YAMLSemanticError(e, o));
|
|
1995
2001
|
}
|
|
1996
|
-
let i =
|
|
2002
|
+
let i = Vo(t, e);
|
|
1997
2003
|
if (i) {
|
|
1998
2004
|
i.range = [e.range.start, e.range.end], t.options.keepCstNodes && (i.cstNode = e), t.options.keepNodeTypes && (i.type = e.type);
|
|
1999
2005
|
let o = n.before.join(`
|
|
@@ -2007,18 +2013,18 @@ ${a}` : a);
|
|
|
2007
2013
|
}
|
|
2008
2014
|
return e.resolved = i;
|
|
2009
2015
|
}
|
|
2010
|
-
function
|
|
2016
|
+
function jo(t, e) {
|
|
2011
2017
|
if (e.type !== p.Type.MAP && e.type !== p.Type.FLOW_MAP) {
|
|
2012
2018
|
let o = `A ${e.type} node cannot be resolved as a mapping`;
|
|
2013
2019
|
return t.errors.push(new p.YAMLSyntaxError(e, o)), null;
|
|
2014
2020
|
}
|
|
2015
|
-
let { comments: n, items: r } = e.type === p.Type.FLOW_MAP ?
|
|
2016
|
-
s.items = r,
|
|
2021
|
+
let { comments: n, items: r } = e.type === p.Type.FLOW_MAP ? Ho(t, e) : Go(t, e), s = new dt();
|
|
2022
|
+
s.items = r, ms(s, n);
|
|
2017
2023
|
let i = false;
|
|
2018
2024
|
for (let o = 0; o < r.length; ++o) {
|
|
2019
2025
|
let { key: a } = r[o];
|
|
2020
|
-
if (a instanceof
|
|
2021
|
-
r[o] = new
|
|
2026
|
+
if (a instanceof W && (i = true), t.schema.merge && a && a.value === as) {
|
|
2027
|
+
r[o] = new Ft(r[o]);
|
|
2022
2028
|
let c = r[o].value.items, l = null;
|
|
2023
2029
|
c.some((f) => {
|
|
2024
2030
|
if (f instanceof be) {
|
|
@@ -2042,7 +2048,7 @@ ${a}` : a);
|
|
|
2042
2048
|
}
|
|
2043
2049
|
return e.resolved = s, s;
|
|
2044
2050
|
}
|
|
2045
|
-
var
|
|
2051
|
+
var Wo = ({ context: { lineStart: t, node: e, src: n }, props: r }) => {
|
|
2046
2052
|
if (r.length === 0) return false;
|
|
2047
2053
|
let { start: s } = r[0];
|
|
2048
2054
|
if (e && s > e.valueRange.start || n[s] !== p.Char.COMMENT) return false;
|
|
@@ -2050,8 +2056,8 @@ ${a}` : a);
|
|
|
2050
2056
|
`) return false;
|
|
2051
2057
|
return true;
|
|
2052
2058
|
};
|
|
2053
|
-
function
|
|
2054
|
-
if (!
|
|
2059
|
+
function Qo(t, e) {
|
|
2060
|
+
if (!Wo(t)) return;
|
|
2055
2061
|
let n = t.getPropValue(0, p.Char.COMMENT, true), r = false, s = e.value.commentBefore;
|
|
2056
2062
|
if (s && s.startsWith(n)) e.value.commentBefore = s.substr(n.length + 1), r = true;
|
|
2057
2063
|
else {
|
|
@@ -2060,7 +2066,7 @@ ${a}` : a);
|
|
|
2060
2066
|
}
|
|
2061
2067
|
r && (e.comment = n);
|
|
2062
2068
|
}
|
|
2063
|
-
function
|
|
2069
|
+
function Go(t, e) {
|
|
2064
2070
|
let n = [], r = [], s, i = null;
|
|
2065
2071
|
for (let o = 0; o < e.items.length; ++o) {
|
|
2066
2072
|
let a = e.items[o];
|
|
@@ -2072,7 +2078,7 @@ ${a}` : a);
|
|
|
2072
2078
|
n.push({ afterKey: !!s, before: r.length, comment: a.comment });
|
|
2073
2079
|
break;
|
|
2074
2080
|
case p.Type.MAP_KEY:
|
|
2075
|
-
s !== void 0 && r.push(new T(s)), a.error && t.errors.push(a.error), s =
|
|
2081
|
+
s !== void 0 && r.push(new T(s)), a.error && t.errors.push(a.error), s = fe(t, a.node), i = null;
|
|
2076
2082
|
break;
|
|
2077
2083
|
case p.Type.MAP_VALUE:
|
|
2078
2084
|
{
|
|
@@ -2089,12 +2095,12 @@ ${a}` : a);
|
|
|
2089
2095
|
c.range.origStart = c.range.origEnd = m, c.valueRange.origStart = c.valueRange.origEnd = m;
|
|
2090
2096
|
}
|
|
2091
2097
|
}
|
|
2092
|
-
let l = new T(s,
|
|
2093
|
-
|
|
2098
|
+
let l = new T(s, fe(t, c));
|
|
2099
|
+
Qo(a, l), r.push(l), s && typeof i == "number" && a.range.start > i + 1024 && t.errors.push(ps(e, s)), s = void 0, i = null;
|
|
2094
2100
|
}
|
|
2095
2101
|
break;
|
|
2096
2102
|
default:
|
|
2097
|
-
s !== void 0 && r.push(new T(s)), s =
|
|
2103
|
+
s !== void 0 && r.push(new T(s)), s = fe(t, a), i = a.range.start, a.error && t.errors.push(a.error);
|
|
2098
2104
|
e: for (let c = o + 1; ; ++c) {
|
|
2099
2105
|
let l = e.items[c];
|
|
2100
2106
|
switch (l && l.type) {
|
|
@@ -2118,7 +2124,7 @@ ${a}` : a);
|
|
|
2118
2124
|
}
|
|
2119
2125
|
return s !== void 0 && r.push(new T(s)), { comments: n, items: r };
|
|
2120
2126
|
}
|
|
2121
|
-
function
|
|
2127
|
+
function Ho(t, e) {
|
|
2122
2128
|
let n = [], r = [], s, i = false, o = "{";
|
|
2123
2129
|
for (let a = 0; a < e.items.length; ++a) {
|
|
2124
2130
|
let c = e.items[a];
|
|
@@ -2145,23 +2151,23 @@ ${a}` : a);
|
|
|
2145
2151
|
}
|
|
2146
2152
|
let m = `Flow map contains an unexpected ${l}`, d = new p.YAMLSyntaxError(e, m);
|
|
2147
2153
|
d.offset = f, t.errors.push(d);
|
|
2148
|
-
} else c.type === p.Type.BLANK_LINE ? n.push({ afterKey: !!s, before: r.length }) : c.type === p.Type.COMMENT ? (
|
|
2154
|
+
} else c.type === p.Type.BLANK_LINE ? n.push({ afterKey: !!s, before: r.length }) : c.type === p.Type.COMMENT ? (us(t.errors, c), n.push({ afterKey: !!s, before: r.length, comment: c.comment })) : s === void 0 ? (o === "," && t.errors.push(new p.YAMLSemanticError(c, "Separator , missing in flow map")), s = fe(t, c)) : (o !== "," && t.errors.push(new p.YAMLSemanticError(c, "Indicator : missing in flow map entry")), r.push(new T(s, fe(t, c))), s = void 0, i = false);
|
|
2149
2155
|
}
|
|
2150
|
-
return
|
|
2156
|
+
return fs(t.errors, e), s !== void 0 && r.push(new T(s)), { comments: n, items: r };
|
|
2151
2157
|
}
|
|
2152
|
-
function
|
|
2158
|
+
function Jo(t, e) {
|
|
2153
2159
|
if (e.type !== p.Type.SEQ && e.type !== p.Type.FLOW_SEQ) {
|
|
2154
2160
|
let i = `A ${e.type} node cannot be resolved as a sequence`;
|
|
2155
2161
|
return t.errors.push(new p.YAMLSyntaxError(e, i)), null;
|
|
2156
2162
|
}
|
|
2157
|
-
let { comments: n, items: r } = e.type === p.Type.FLOW_SEQ ?
|
|
2158
|
-
if (s.items = r,
|
|
2163
|
+
let { comments: n, items: r } = e.type === p.Type.FLOW_SEQ ? zo(t, e) : Xo(t, e), s = new le();
|
|
2164
|
+
if (s.items = r, ms(s, n), !t.options.mapAsMap && r.some((i) => i instanceof T && i.key instanceof W)) {
|
|
2159
2165
|
let i = "Keys with collection values will be stringified as YAML due to JS Object restrictions. Use mapAsMap: true to avoid this.";
|
|
2160
2166
|
t.warnings.push(new p.YAMLWarning(e, i));
|
|
2161
2167
|
}
|
|
2162
2168
|
return e.resolved = s, s;
|
|
2163
2169
|
}
|
|
2164
|
-
function
|
|
2170
|
+
function Xo(t, e) {
|
|
2165
2171
|
let n = [], r = [];
|
|
2166
2172
|
for (let s = 0; s < e.items.length; ++s) {
|
|
2167
2173
|
let i = e.items[s];
|
|
@@ -2173,7 +2179,7 @@ ${a}` : a);
|
|
|
2173
2179
|
n.push({ comment: i.comment, before: r.length });
|
|
2174
2180
|
break;
|
|
2175
2181
|
case p.Type.SEQ_ITEM:
|
|
2176
|
-
if (i.error && t.errors.push(i.error), r.push(
|
|
2182
|
+
if (i.error && t.errors.push(i.error), r.push(fe(t, i.node)), i.hasProps) {
|
|
2177
2183
|
let o = "Sequence items cannot have tags or anchors before the - indicator";
|
|
2178
2184
|
t.errors.push(new p.YAMLSemanticError(i, o));
|
|
2179
2185
|
}
|
|
@@ -2184,7 +2190,7 @@ ${a}` : a);
|
|
|
2184
2190
|
}
|
|
2185
2191
|
return { comments: n, items: r };
|
|
2186
2192
|
}
|
|
2187
|
-
function
|
|
2193
|
+
function zo(t, e) {
|
|
2188
2194
|
let n = [], r = [], s = false, i, o = null, a = "[", c = null;
|
|
2189
2195
|
for (let l = 0; l < e.items.length; ++l) {
|
|
2190
2196
|
let f = e.items[l];
|
|
@@ -2200,7 +2206,7 @@ ${a}` : a);
|
|
|
2200
2206
|
}
|
|
2201
2207
|
if (!s && typeof o == "number") {
|
|
2202
2208
|
let y = f.range ? f.range.start : f.offset;
|
|
2203
|
-
y > o + 1024 && t.errors.push(
|
|
2209
|
+
y > o + 1024 && t.errors.push(ps(e, i));
|
|
2204
2210
|
let { src: h } = c.context;
|
|
2205
2211
|
for (let g = o; g < y; ++g) if (h[g] === `
|
|
2206
2212
|
`) {
|
|
@@ -2216,44 +2222,44 @@ ${a}` : a);
|
|
|
2216
2222
|
h.offset = d, t.errors.push(h);
|
|
2217
2223
|
}
|
|
2218
2224
|
} else if (f.type === p.Type.BLANK_LINE) n.push({ before: r.length });
|
|
2219
|
-
else if (f.type === p.Type.COMMENT)
|
|
2225
|
+
else if (f.type === p.Type.COMMENT) us(t.errors, f), n.push({ comment: f.comment, before: r.length });
|
|
2220
2226
|
else {
|
|
2221
2227
|
if (a) {
|
|
2222
2228
|
let d = `Expected a ${a} in flow sequence`;
|
|
2223
2229
|
t.errors.push(new p.YAMLSemanticError(f, d));
|
|
2224
2230
|
}
|
|
2225
|
-
let m =
|
|
2231
|
+
let m = fe(t, f);
|
|
2226
2232
|
i === void 0 ? (r.push(m), c = f) : (r.push(new T(i, m)), i = void 0), o = f.range.start, a = ",";
|
|
2227
2233
|
}
|
|
2228
2234
|
}
|
|
2229
|
-
return
|
|
2235
|
+
return fs(t.errors, e), i !== void 0 && r.push(new T(i)), { comments: n, items: r };
|
|
2230
2236
|
}
|
|
2231
2237
|
k.Alias = be;
|
|
2232
|
-
k.Collection =
|
|
2233
|
-
k.Merge =
|
|
2234
|
-
k.Node =
|
|
2238
|
+
k.Collection = W;
|
|
2239
|
+
k.Merge = Ft;
|
|
2240
|
+
k.Node = j;
|
|
2235
2241
|
k.Pair = T;
|
|
2236
|
-
k.Scalar =
|
|
2237
|
-
k.YAMLMap =
|
|
2238
|
-
k.YAMLSeq =
|
|
2242
|
+
k.Scalar = _;
|
|
2243
|
+
k.YAMLMap = dt;
|
|
2244
|
+
k.YAMLSeq = le;
|
|
2239
2245
|
k.addComment = Fe;
|
|
2240
|
-
k.binaryOptions =
|
|
2241
|
-
k.boolOptions =
|
|
2242
|
-
k.findPair =
|
|
2243
|
-
k.intOptions =
|
|
2244
|
-
k.isEmptyPath =
|
|
2245
|
-
k.nullOptions =
|
|
2246
|
-
k.resolveMap =
|
|
2247
|
-
k.resolveNode =
|
|
2248
|
-
k.resolveSeq =
|
|
2249
|
-
k.resolveString =
|
|
2246
|
+
k.binaryOptions = Po;
|
|
2247
|
+
k.boolOptions = Io;
|
|
2248
|
+
k.findPair = gt;
|
|
2249
|
+
k.intOptions = vo;
|
|
2250
|
+
k.isEmptyPath = os;
|
|
2251
|
+
k.nullOptions = _o;
|
|
2252
|
+
k.resolveMap = jo;
|
|
2253
|
+
k.resolveNode = fe;
|
|
2254
|
+
k.resolveSeq = Jo;
|
|
2255
|
+
k.resolveString = Vn;
|
|
2250
2256
|
k.strOptions = Ne;
|
|
2251
|
-
k.stringifyNumber =
|
|
2252
|
-
k.stringifyString =
|
|
2253
|
-
k.toJSON =
|
|
2257
|
+
k.stringifyNumber = Yo;
|
|
2258
|
+
k.stringifyString = Do;
|
|
2259
|
+
k.toJSON = ce;
|
|
2254
2260
|
});
|
|
2255
|
-
var
|
|
2256
|
-
var Q =
|
|
2261
|
+
var Gn = te((z) => {
|
|
2262
|
+
var Q = oe(), O = qe(), Zo = { identify: (t) => t instanceof Uint8Array, default: false, tag: "tag:yaml.org,2002:binary", resolve: (t, e) => {
|
|
2257
2263
|
let n = O.resolveString(t, e);
|
|
2258
2264
|
if (typeof Buffer == "function") return Buffer.from(n, "base64");
|
|
2259
2265
|
if (typeof atob == "function") {
|
|
@@ -2281,7 +2287,7 @@ var Qn = te((z) => {
|
|
|
2281
2287
|
}
|
|
2282
2288
|
return O.stringifyString({ comment: t, type: e, value: n }, r, s, i);
|
|
2283
2289
|
} };
|
|
2284
|
-
function
|
|
2290
|
+
function gs(t, e) {
|
|
2285
2291
|
let n = O.resolveSeq(t, e);
|
|
2286
2292
|
for (let r = 0; r < n.items.length; ++r) {
|
|
2287
2293
|
let s = n.items[r];
|
|
@@ -2301,7 +2307,7 @@ ${i.comment}` : s.comment), s = i;
|
|
|
2301
2307
|
}
|
|
2302
2308
|
return n;
|
|
2303
2309
|
}
|
|
2304
|
-
function
|
|
2310
|
+
function ds(t, e, n) {
|
|
2305
2311
|
let r = new O.YAMLSeq(t);
|
|
2306
2312
|
r.tag = "tag:yaml.org,2002:pairs";
|
|
2307
2313
|
for (let s of e) {
|
|
@@ -2318,7 +2324,7 @@ ${i.comment}` : s.comment), s = i;
|
|
|
2318
2324
|
}
|
|
2319
2325
|
return r;
|
|
2320
2326
|
}
|
|
2321
|
-
var
|
|
2327
|
+
var ea = { default: false, tag: "tag:yaml.org,2002:pairs", resolve: gs, createNode: ds }, Ue = class t extends O.YAMLSeq {
|
|
2322
2328
|
constructor() {
|
|
2323
2329
|
super(), Q._defineProperty(this, "add", O.YAMLMap.prototype.add.bind(this)), Q._defineProperty(this, "delete", O.YAMLMap.prototype.delete.bind(this)), Q._defineProperty(this, "get", O.YAMLMap.prototype.get.bind(this)), Q._defineProperty(this, "has", O.YAMLMap.prototype.has.bind(this)), Q._defineProperty(this, "set", O.YAMLMap.prototype.set.bind(this)), this.tag = t.tag;
|
|
2324
2330
|
}
|
|
@@ -2334,19 +2340,19 @@ ${i.comment}` : s.comment), s = i;
|
|
|
2334
2340
|
}
|
|
2335
2341
|
};
|
|
2336
2342
|
Q._defineProperty(Ue, "tag", "tag:yaml.org,2002:omap");
|
|
2337
|
-
function
|
|
2338
|
-
let n =
|
|
2343
|
+
function ta(t, e) {
|
|
2344
|
+
let n = gs(t, e), r = [];
|
|
2339
2345
|
for (let { key: s } of n.items) if (s instanceof O.Scalar) if (r.includes(s.value)) {
|
|
2340
2346
|
let i = "Ordered maps must not include duplicate keys";
|
|
2341
2347
|
throw new Q.YAMLSemanticError(e, i);
|
|
2342
2348
|
} else r.push(s.value);
|
|
2343
2349
|
return Object.assign(new Ue(), n);
|
|
2344
2350
|
}
|
|
2345
|
-
function
|
|
2346
|
-
let r =
|
|
2351
|
+
function na(t, e, n) {
|
|
2352
|
+
let r = ds(t, e, n), s = new Ue();
|
|
2347
2353
|
return s.items = r.items, s;
|
|
2348
2354
|
}
|
|
2349
|
-
var
|
|
2355
|
+
var ra = { identify: (t) => t instanceof Map, nodeClass: Ue, default: false, tag: "tag:yaml.org,2002:omap", resolve: ta, createNode: na }, Ke = class t extends O.YAMLMap {
|
|
2350
2356
|
constructor() {
|
|
2351
2357
|
super(), this.tag = t.tag;
|
|
2352
2358
|
}
|
|
@@ -2373,30 +2379,30 @@ ${i.comment}` : s.comment), s = i;
|
|
|
2373
2379
|
}
|
|
2374
2380
|
};
|
|
2375
2381
|
Q._defineProperty(Ke, "tag", "tag:yaml.org,2002:set");
|
|
2376
|
-
function
|
|
2382
|
+
function sa(t, e) {
|
|
2377
2383
|
let n = O.resolveMap(t, e);
|
|
2378
2384
|
if (!n.hasAllNullValues()) throw new Q.YAMLSemanticError(e, "Set items must all have null values");
|
|
2379
2385
|
return Object.assign(new Ke(), n);
|
|
2380
2386
|
}
|
|
2381
|
-
function
|
|
2387
|
+
function ia(t, e, n) {
|
|
2382
2388
|
let r = new Ke();
|
|
2383
2389
|
for (let s of e) r.items.push(t.createPair(s, null, n));
|
|
2384
2390
|
return r;
|
|
2385
2391
|
}
|
|
2386
|
-
var
|
|
2392
|
+
var oa = { identify: (t) => t instanceof Set, nodeClass: Ke, default: false, tag: "tag:yaml.org,2002:set", resolve: sa, createNode: ia }, jn = (t, e) => {
|
|
2387
2393
|
let n = e.split(":").reduce((r, s) => r * 60 + Number(s), 0);
|
|
2388
2394
|
return t === "-" ? -n : n;
|
|
2389
|
-
},
|
|
2395
|
+
}, ys = ({ value: t }) => {
|
|
2390
2396
|
if (isNaN(t) || !isFinite(t)) return O.stringifyNumber(t);
|
|
2391
2397
|
let e = "";
|
|
2392
2398
|
t < 0 && (e = "-", t = Math.abs(t));
|
|
2393
2399
|
let n = [t % 60];
|
|
2394
2400
|
return t < 60 ? n.unshift(0) : (t = Math.round((t - n[0]) / 60), n.unshift(t % 60), t >= 60 && (t = Math.round((t - n[0]) / 60), n.unshift(t))), e + n.map((r) => r < 10 ? "0" + String(r) : String(r)).join(":").replace(/000000\d*$/, "");
|
|
2395
|
-
},
|
|
2401
|
+
}, aa = { identify: (t) => typeof t == "number", default: true, tag: "tag:yaml.org,2002:int", format: "TIME", test: /^([-+]?)([0-9][0-9_]*(?::[0-5]?[0-9])+)$/, resolve: (t, e, n) => jn(e, n.replace(/_/g, "")), stringify: ys }, ca = { identify: (t) => typeof t == "number", default: true, tag: "tag:yaml.org,2002:float", format: "TIME", test: /^([-+]?)([0-9][0-9_]*(?::[0-5]?[0-9])+\.[0-9_]*)$/, resolve: (t, e, n) => jn(e, n.replace(/_/g, "")), stringify: ys }, la = { identify: (t) => t instanceof Date, default: true, tag: "tag:yaml.org,2002:timestamp", test: RegExp("^(?:([0-9]{4})-([0-9]{1,2})-([0-9]{1,2})(?:(?:t|T|[ \\t]+)([0-9]{1,2}):([0-9]{1,2}):([0-9]{1,2}(\\.[0-9]+)?)(?:[ \\t]*(Z|[-+][012]?[0-9](?::[0-9]{2})?))?)?)$"), resolve: (t, e, n, r, s, i, o, a, c) => {
|
|
2396
2402
|
a && (a = (a + "00").substr(1, 3));
|
|
2397
2403
|
let l = Date.UTC(e, n - 1, r, s || 0, i || 0, o || 0, a || 0);
|
|
2398
2404
|
if (c && c !== "Z") {
|
|
2399
|
-
let f =
|
|
2405
|
+
let f = jn(c[0], c.slice(1));
|
|
2400
2406
|
Math.abs(f) < 30 && (f *= 60), l -= 6e4 * f;
|
|
2401
2407
|
}
|
|
2402
2408
|
return new Date(l);
|
|
@@ -2405,44 +2411,44 @@ ${i.comment}` : s.comment), s = i;
|
|
|
2405
2411
|
let e = {};
|
|
2406
2412
|
return t ? typeof YAML_SILENCE_DEPRECATION_WARNINGS < "u" ? !YAML_SILENCE_DEPRECATION_WARNINGS : !e.YAML_SILENCE_DEPRECATION_WARNINGS : typeof YAML_SILENCE_WARNINGS < "u" ? !YAML_SILENCE_WARNINGS : !e.YAML_SILENCE_WARNINGS;
|
|
2407
2413
|
}
|
|
2408
|
-
function
|
|
2414
|
+
function Qn(t, e) {
|
|
2409
2415
|
Wn(false) && console.warn(e ? `${e}: ${t}` : t);
|
|
2410
2416
|
}
|
|
2411
|
-
function
|
|
2417
|
+
function fa(t) {
|
|
2412
2418
|
if (Wn(true)) {
|
|
2413
2419
|
let e = t.replace(/.*yaml[/\\]/i, "").replace(/\.js$/, "").replace(/\\/g, "/");
|
|
2414
|
-
|
|
2420
|
+
Qn(`The endpoint 'yaml/${e}' will be removed in a future release.`, "DeprecationWarning");
|
|
2415
2421
|
}
|
|
2416
2422
|
}
|
|
2417
|
-
var
|
|
2418
|
-
function
|
|
2419
|
-
if (!
|
|
2420
|
-
|
|
2423
|
+
var hs = {};
|
|
2424
|
+
function ua(t, e) {
|
|
2425
|
+
if (!hs[t] && Wn(true)) {
|
|
2426
|
+
hs[t] = true;
|
|
2421
2427
|
let n = `The option '${t}' will be removed in a future release`;
|
|
2422
|
-
n += e ? `, use '${e}' instead.` : ".",
|
|
2428
|
+
n += e ? `, use '${e}' instead.` : ".", Qn(n, "DeprecationWarning");
|
|
2423
2429
|
}
|
|
2424
2430
|
}
|
|
2425
|
-
z.binary =
|
|
2426
|
-
z.floatTime =
|
|
2427
|
-
z.intTime =
|
|
2428
|
-
z.omap =
|
|
2429
|
-
z.pairs =
|
|
2430
|
-
z.set =
|
|
2431
|
-
z.timestamp =
|
|
2432
|
-
z.warn =
|
|
2433
|
-
z.warnFileDeprecation =
|
|
2434
|
-
z.warnOptionDeprecation =
|
|
2431
|
+
z.binary = Zo;
|
|
2432
|
+
z.floatTime = ca;
|
|
2433
|
+
z.intTime = aa;
|
|
2434
|
+
z.omap = ra;
|
|
2435
|
+
z.pairs = ea;
|
|
2436
|
+
z.set = oa;
|
|
2437
|
+
z.timestamp = la;
|
|
2438
|
+
z.warn = Qn;
|
|
2439
|
+
z.warnFileDeprecation = fa;
|
|
2440
|
+
z.warnOptionDeprecation = ua;
|
|
2435
2441
|
});
|
|
2436
|
-
var
|
|
2437
|
-
var
|
|
2438
|
-
function
|
|
2442
|
+
var zn = te((Ps) => {
|
|
2443
|
+
var jt = oe(), E = qe(), D = Gn();
|
|
2444
|
+
function pa(t, e, n) {
|
|
2439
2445
|
let r = new E.YAMLMap(t);
|
|
2440
2446
|
if (e instanceof Map) for (let [s, i] of e) r.items.push(t.createPair(s, i, n));
|
|
2441
2447
|
else if (e && typeof e == "object") for (let s of Object.keys(e)) r.items.push(t.createPair(s, e[s], n));
|
|
2442
2448
|
return typeof t.sortMapEntries == "function" && r.items.sort(t.sortMapEntries), r;
|
|
2443
2449
|
}
|
|
2444
|
-
var
|
|
2445
|
-
function
|
|
2450
|
+
var Et = { createNode: pa, default: true, nodeClass: E.YAMLMap, tag: "tag:yaml.org,2002:map", resolve: E.resolveMap };
|
|
2451
|
+
function ma(t, e, n) {
|
|
2446
2452
|
let r = new E.YAMLSeq(t);
|
|
2447
2453
|
if (e && e[Symbol.iterator]) for (let s of e) {
|
|
2448
2454
|
let i = t.createNode(s, n.wrapScalars, null, n);
|
|
@@ -2450,22 +2456,22 @@ var Xn = te((li) => {
|
|
|
2450
2456
|
}
|
|
2451
2457
|
return r;
|
|
2452
2458
|
}
|
|
2453
|
-
var
|
|
2459
|
+
var Wt = { createNode: ma, default: true, nodeClass: E.YAMLSeq, tag: "tag:yaml.org,2002:seq", resolve: E.resolveSeq }, ha = { identify: (t) => typeof t == "string", default: true, tag: "tag:yaml.org,2002:str", resolve: E.resolveString, stringify(t, e, n, r) {
|
|
2454
2460
|
return e = Object.assign({ actualString: true }, e), E.stringifyString(t, e, n, r);
|
|
2455
|
-
}, options: E.strOptions },
|
|
2456
|
-
function
|
|
2461
|
+
}, options: E.strOptions }, Jn = [Et, Wt, ha], Qt = (t) => typeof t == "bigint" || Number.isInteger(t), Xn = (t, e, n) => E.intOptions.asBigInt ? BigInt(t) : parseInt(e, n);
|
|
2462
|
+
function ws(t, e, n) {
|
|
2457
2463
|
let { value: r } = t;
|
|
2458
|
-
return
|
|
2464
|
+
return Qt(r) && r >= 0 ? n + r.toString(e) : E.stringifyNumber(t);
|
|
2459
2465
|
}
|
|
2460
|
-
var
|
|
2466
|
+
var bs = { identify: (t) => t == null, createNode: (t, e, n) => n.wrapScalars ? new E.Scalar(null) : null, default: true, tag: "tag:yaml.org,2002:null", test: /^(?:~|[Nn]ull|NULL)?$/, resolve: () => null, options: E.nullOptions, stringify: () => E.nullOptions.nullStr }, Ns = { identify: (t) => typeof t == "boolean", default: true, tag: "tag:yaml.org,2002:bool", test: /^(?:[Tt]rue|TRUE|[Ff]alse|FALSE)$/, resolve: (t) => t[0] === "t" || t[0] === "T", options: E.boolOptions, stringify: ({ value: t }) => t ? E.boolOptions.trueStr : E.boolOptions.falseStr }, Os = { identify: (t) => Qt(t) && t >= 0, default: true, tag: "tag:yaml.org,2002:int", format: "OCT", test: /^0o([0-7]+)$/, resolve: (t, e) => Xn(t, e, 8), options: E.intOptions, stringify: (t) => ws(t, 8, "0o") }, As = { identify: Qt, default: true, tag: "tag:yaml.org,2002:int", test: /^[-+]?[0-9]+$/, resolve: (t) => Xn(t, t, 10), options: E.intOptions, stringify: E.stringifyNumber }, Ls = { identify: (t) => Qt(t) && t >= 0, default: true, tag: "tag:yaml.org,2002:int", format: "HEX", test: /^0x([0-9a-fA-F]+)$/, resolve: (t, e) => Xn(t, e, 16), options: E.intOptions, stringify: (t) => ws(t, 16, "0x") }, Ts = { identify: (t) => typeof t == "number", default: true, tag: "tag:yaml.org,2002:float", test: /^(?:[-+]?\.inf|(\.nan))$/i, resolve: (t, e) => e ? NaN : t[0] === "-" ? Number.NEGATIVE_INFINITY : Number.POSITIVE_INFINITY, stringify: E.stringifyNumber }, Ms = { identify: (t) => typeof t == "number", default: true, tag: "tag:yaml.org,2002:float", format: "EXP", test: /^[-+]?(?:\.[0-9]+|[0-9]+(?:\.[0-9]*)?)[eE][-+]?[0-9]+$/, resolve: (t) => parseFloat(t), stringify: ({ value: t }) => Number(t).toExponential() }, Cs = { identify: (t) => typeof t == "number", default: true, tag: "tag:yaml.org,2002:float", test: /^[-+]?(?:\.([0-9]+)|[0-9]+\.([0-9]*))$/, resolve(t, e, n) {
|
|
2461
2467
|
let r = e || n, s = new E.Scalar(parseFloat(t));
|
|
2462
2468
|
return r && r[r.length - 1] === "0" && (s.minFractionDigits = r.length), s;
|
|
2463
|
-
}, stringify: E.stringifyNumber },
|
|
2464
|
-
|
|
2469
|
+
}, stringify: E.stringifyNumber }, ga = Jn.concat([bs, Ns, Os, As, Ls, Ts, Ms, Cs]), Es = (t) => typeof t == "bigint" || Number.isInteger(t), Kt = ({ value: t }) => JSON.stringify(t), ks = [Et, Wt, { identify: (t) => typeof t == "string", default: true, tag: "tag:yaml.org,2002:str", resolve: E.resolveString, stringify: Kt }, { identify: (t) => t == null, createNode: (t, e, n) => n.wrapScalars ? new E.Scalar(null) : null, default: true, tag: "tag:yaml.org,2002:null", test: /^null$/, resolve: () => null, stringify: Kt }, { identify: (t) => typeof t == "boolean", default: true, tag: "tag:yaml.org,2002:bool", test: /^true|false$/, resolve: (t) => t === "true", stringify: Kt }, { identify: Es, default: true, tag: "tag:yaml.org,2002:int", test: /^-?(?:0|[1-9][0-9]*)$/, resolve: (t) => E.intOptions.asBigInt ? BigInt(t) : parseInt(t, 10), stringify: ({ value: t }) => Es(t) ? t.toString() : JSON.stringify(t) }, { identify: (t) => typeof t == "number", default: true, tag: "tag:yaml.org,2002:float", test: /^-?(?:0|[1-9][0-9]*)(?:\.[0-9]*)?(?:[eE][-+]?[0-9]+)?$/, resolve: (t) => parseFloat(t), stringify: Kt }];
|
|
2470
|
+
ks.scalarFallback = (t) => {
|
|
2465
2471
|
throw new SyntaxError(`Unresolved plain scalar ${JSON.stringify(t)}`);
|
|
2466
2472
|
};
|
|
2467
|
-
var
|
|
2468
|
-
function
|
|
2473
|
+
var Ss = ({ value: t }) => t ? E.boolOptions.trueStr : E.boolOptions.falseStr, yt = (t) => typeof t == "bigint" || Number.isInteger(t);
|
|
2474
|
+
function Vt(t, e, n) {
|
|
2469
2475
|
let r = e.replace(/_/g, "");
|
|
2470
2476
|
if (E.intOptions.asBigInt) {
|
|
2471
2477
|
switch (n) {
|
|
@@ -2485,23 +2491,23 @@ var Xn = te((li) => {
|
|
|
2485
2491
|
let s = parseInt(r, n);
|
|
2486
2492
|
return t === "-" ? -1 * s : s;
|
|
2487
2493
|
}
|
|
2488
|
-
function
|
|
2494
|
+
function Hn(t, e, n) {
|
|
2489
2495
|
let { value: r } = t;
|
|
2490
|
-
if (
|
|
2496
|
+
if (yt(r)) {
|
|
2491
2497
|
let s = r.toString(e);
|
|
2492
2498
|
return r < 0 ? "-" + n + s.substr(1) : n + s;
|
|
2493
2499
|
}
|
|
2494
2500
|
return E.stringifyNumber(t);
|
|
2495
2501
|
}
|
|
2496
|
-
var
|
|
2502
|
+
var da = Jn.concat([{ identify: (t) => t == null, createNode: (t, e, n) => n.wrapScalars ? new E.Scalar(null) : null, default: true, tag: "tag:yaml.org,2002:null", test: /^(?:~|[Nn]ull|NULL)?$/, resolve: () => null, options: E.nullOptions, stringify: () => E.nullOptions.nullStr }, { identify: (t) => typeof t == "boolean", default: true, tag: "tag:yaml.org,2002:bool", test: /^(?:Y|y|[Yy]es|YES|[Tt]rue|TRUE|[Oo]n|ON)$/, resolve: () => true, options: E.boolOptions, stringify: Ss }, { identify: (t) => typeof t == "boolean", default: true, tag: "tag:yaml.org,2002:bool", test: /^(?:N|n|[Nn]o|NO|[Ff]alse|FALSE|[Oo]ff|OFF)$/i, resolve: () => false, options: E.boolOptions, stringify: Ss }, { identify: yt, default: true, tag: "tag:yaml.org,2002:int", format: "BIN", test: /^([-+]?)0b([0-1_]+)$/, resolve: (t, e, n) => Vt(e, n, 2), stringify: (t) => Hn(t, 2, "0b") }, { identify: yt, default: true, tag: "tag:yaml.org,2002:int", format: "OCT", test: /^([-+]?)0([0-7_]+)$/, resolve: (t, e, n) => Vt(e, n, 8), stringify: (t) => Hn(t, 8, "0") }, { identify: yt, default: true, tag: "tag:yaml.org,2002:int", test: /^([-+]?)([0-9][0-9_]*)$/, resolve: (t, e, n) => Vt(e, n, 10), stringify: E.stringifyNumber }, { identify: yt, default: true, tag: "tag:yaml.org,2002:int", format: "HEX", test: /^([-+]?)0x([0-9a-fA-F_]+)$/, resolve: (t, e, n) => Vt(e, n, 16), stringify: (t) => Hn(t, 16, "0x") }, { identify: (t) => typeof t == "number", default: true, tag: "tag:yaml.org,2002:float", test: /^(?:[-+]?\.inf|(\.nan))$/i, resolve: (t, e) => e ? NaN : t[0] === "-" ? Number.NEGATIVE_INFINITY : Number.POSITIVE_INFINITY, stringify: E.stringifyNumber }, { identify: (t) => typeof t == "number", default: true, tag: "tag:yaml.org,2002:float", format: "EXP", test: /^[-+]?([0-9][0-9_]*)?(\.[0-9_]*)?[eE][-+]?[0-9]+$/, resolve: (t) => parseFloat(t.replace(/_/g, "")), stringify: ({ value: t }) => Number(t).toExponential() }, { identify: (t) => typeof t == "number", default: true, tag: "tag:yaml.org,2002:float", test: /^[-+]?(?:[0-9][0-9_]*)?\.([0-9_]*)$/, resolve(t, e) {
|
|
2497
2503
|
let n = new E.Scalar(parseFloat(t.replace(/_/g, "")));
|
|
2498
2504
|
if (e) {
|
|
2499
2505
|
let r = e.replace(/_/g, "");
|
|
2500
2506
|
r[r.length - 1] === "0" && (n.minFractionDigits = r.length);
|
|
2501
2507
|
}
|
|
2502
2508
|
return n;
|
|
2503
|
-
}, stringify: E.stringifyNumber }], D.binary, D.omap, D.pairs, D.set, D.intTime, D.floatTime, D.timestamp),
|
|
2504
|
-
function
|
|
2509
|
+
}, stringify: E.stringifyNumber }], D.binary, D.omap, D.pairs, D.set, D.intTime, D.floatTime, D.timestamp), ya = { core: ga, failsafe: Jn, json: ks, yaml11: da }, Ea = { binary: D.binary, bool: Ns, float: Cs, floatExp: Ms, floatNaN: Ts, floatTime: D.floatTime, int: As, intHex: Ls, intOct: Os, intTime: D.intTime, map: Et, null: bs, omap: D.omap, pairs: D.pairs, seq: Wt, set: D.set, timestamp: D.timestamp };
|
|
2510
|
+
function Sa(t, e, n) {
|
|
2505
2511
|
if (e) {
|
|
2506
2512
|
let r = n.filter((i) => i.tag === e), s = r.find((i) => !i.format) || r[0];
|
|
2507
2513
|
if (!s) throw new Error(`Tag ${e} not found`);
|
|
@@ -2509,14 +2515,14 @@ var Xn = te((li) => {
|
|
|
2509
2515
|
}
|
|
2510
2516
|
return n.find((r) => (r.identify && r.identify(t) || r.class && t instanceof r.class) && !r.format);
|
|
2511
2517
|
}
|
|
2512
|
-
function
|
|
2518
|
+
function wa(t, e, n) {
|
|
2513
2519
|
if (t instanceof E.Node) return t;
|
|
2514
2520
|
let { defaultPrefix: r, onTagObj: s, prevObjects: i, schema: o, wrapScalars: a } = n;
|
|
2515
2521
|
e && e.startsWith("!!") && (e = r + e.slice(2));
|
|
2516
|
-
let c =
|
|
2522
|
+
let c = Sa(t, e, o.tags);
|
|
2517
2523
|
if (!c) {
|
|
2518
2524
|
if (typeof t.toJSON == "function" && (t = t.toJSON()), !t || typeof t != "object") return a ? new E.Scalar(t) : t;
|
|
2519
|
-
c = t instanceof Map ?
|
|
2525
|
+
c = t instanceof Map ? Et : t[Symbol.iterator] ? Wt : Et;
|
|
2520
2526
|
}
|
|
2521
2527
|
s && (s(c), delete n.onTagObj);
|
|
2522
2528
|
let l = { value: void 0, node: void 0 };
|
|
@@ -2530,7 +2536,7 @@ var Xn = te((li) => {
|
|
|
2530
2536
|
}
|
|
2531
2537
|
return l.node = c.createNode ? c.createNode(n.schema, t, n) : a ? new E.Scalar(t) : t, e && l.node instanceof E.Node && (l.node.tag = e), l.node;
|
|
2532
2538
|
}
|
|
2533
|
-
function
|
|
2539
|
+
function ba(t, e, n, r) {
|
|
2534
2540
|
let s = t[r.replace(/\W/g, "")];
|
|
2535
2541
|
if (!s) {
|
|
2536
2542
|
let i = Object.keys(t).map((o) => JSON.stringify(o)).join(", ");
|
|
@@ -2551,13 +2557,13 @@ var Xn = te((li) => {
|
|
|
2551
2557
|
}
|
|
2552
2558
|
return s;
|
|
2553
2559
|
}
|
|
2554
|
-
var
|
|
2560
|
+
var Na = (t, e) => t.key < e.key ? -1 : t.key > e.key ? 1 : 0, St = class t {
|
|
2555
2561
|
constructor({ customTags: e, merge: n, schema: r, sortMapEntries: s, tags: i }) {
|
|
2556
|
-
this.merge = !!n, this.name = r, this.sortMapEntries = s === true ?
|
|
2562
|
+
this.merge = !!n, this.name = r, this.sortMapEntries = s === true ? Na : s || null, !e && i && D.warnOptionDeprecation("tags", "customTags"), this.tags = ba(ya, Ea, e || i, r);
|
|
2557
2563
|
}
|
|
2558
2564
|
createNode(e, n, r, s) {
|
|
2559
2565
|
let i = { defaultPrefix: t.defaultPrefix, schema: this, wrapScalars: n }, o = s ? Object.assign(s, i) : i;
|
|
2560
|
-
return
|
|
2566
|
+
return wa(e, r, o);
|
|
2561
2567
|
}
|
|
2562
2568
|
createPair(e, n, r) {
|
|
2563
2569
|
r || (r = { wrapScalars: true });
|
|
@@ -2565,12 +2571,12 @@ var Xn = te((li) => {
|
|
|
2565
2571
|
return new E.Pair(s, i);
|
|
2566
2572
|
}
|
|
2567
2573
|
};
|
|
2568
|
-
|
|
2569
|
-
|
|
2570
|
-
|
|
2574
|
+
jt._defineProperty(St, "defaultPrefix", jt.defaultTagPrefix);
|
|
2575
|
+
jt._defineProperty(St, "defaultTags", jt.defaultTags);
|
|
2576
|
+
Ps.Schema = St;
|
|
2571
2577
|
});
|
|
2572
|
-
var
|
|
2573
|
-
var Y =
|
|
2578
|
+
var Rs = te((Xt) => {
|
|
2579
|
+
var Y = oe(), S = qe(), Is = zn(), Oa = { anchorPrefix: "a", customTags: null, indent: 2, indentSeq: true, keepCstNodes: false, keepNodeTypes: true, keepBlobsInJSON: true, mapAsMap: false, maxAliasCount: 100, prettyErrors: false, simpleKeys: false, version: "1.2" }, Aa = { get binary() {
|
|
2574
2580
|
return S.binaryOptions;
|
|
2575
2581
|
}, set binary(t) {
|
|
2576
2582
|
Object.assign(S.binaryOptions, t);
|
|
@@ -2590,8 +2596,8 @@ var mi = te((en) => {
|
|
|
2590
2596
|
return S.strOptions;
|
|
2591
2597
|
}, set str(t) {
|
|
2592
2598
|
Object.assign(S.strOptions, t);
|
|
2593
|
-
} },
|
|
2594
|
-
function
|
|
2599
|
+
} }, _s = { "1.0": { schema: "yaml-1.1", merge: true, tagPrefixes: [{ handle: "!", prefix: Y.defaultTagPrefix }, { handle: "!!", prefix: "tag:private.yaml.org,2002:" }] }, 1.1: { schema: "yaml-1.1", merge: true, tagPrefixes: [{ handle: "!", prefix: "!" }, { handle: "!!", prefix: Y.defaultTagPrefix }] }, 1.2: { schema: "core", merge: false, tagPrefixes: [{ handle: "!", prefix: "!" }, { handle: "!!", prefix: Y.defaultTagPrefix }] } };
|
|
2600
|
+
function vs(t, e) {
|
|
2595
2601
|
if ((t.version || t.options.version) === "1.0") {
|
|
2596
2602
|
let s = e.match(/^tag:private\.yaml\.org,2002:([^:/]+)$/);
|
|
2597
2603
|
if (s) return "!" + s[1];
|
|
@@ -2607,7 +2613,7 @@ var mi = te((en) => {
|
|
|
2607
2613
|
let r = e.substr(n.prefix.length).replace(/[!,[\]{}]/g, (s) => ({ "!": "%21", ",": "%2C", "[": "%5B", "]": "%5D", "{": "%7B", "}": "%7D" })[s]);
|
|
2608
2614
|
return n.handle + r;
|
|
2609
2615
|
}
|
|
2610
|
-
function
|
|
2616
|
+
function La(t, e) {
|
|
2611
2617
|
if (e instanceof S.Alias) return S.Alias;
|
|
2612
2618
|
if (e.tag) {
|
|
2613
2619
|
let s = t.filter((i) => i.tag === e.tag);
|
|
@@ -2625,11 +2631,11 @@ var mi = te((en) => {
|
|
|
2625
2631
|
}
|
|
2626
2632
|
return n;
|
|
2627
2633
|
}
|
|
2628
|
-
function
|
|
2634
|
+
function Ta(t, e, { anchors: n, doc: r }) {
|
|
2629
2635
|
let s = [], i = r.anchors.getName(t);
|
|
2630
|
-
return i && (n[i] = t, s.push(`&${i}`)), t.tag ? s.push(
|
|
2636
|
+
return i && (n[i] = t, s.push(`&${i}`)), t.tag ? s.push(vs(r, t.tag)) : e.default || s.push(vs(r, e.tag)), s.join(" ");
|
|
2631
2637
|
}
|
|
2632
|
-
function
|
|
2638
|
+
function Gt(t, e, n, r) {
|
|
2633
2639
|
let { anchors: s, schema: i } = e.doc, o;
|
|
2634
2640
|
if (!(t instanceof S.Node)) {
|
|
2635
2641
|
let l = { aliasNodes: [], onTagObj: (f) => o = f, prevObjects: /* @__PURE__ */ new Map() };
|
|
@@ -2641,14 +2647,14 @@ var mi = te((en) => {
|
|
|
2641
2647
|
}
|
|
2642
2648
|
}
|
|
2643
2649
|
if (t instanceof S.Pair) return t.toString(e, n, r);
|
|
2644
|
-
o || (o =
|
|
2645
|
-
let a =
|
|
2650
|
+
o || (o = La(i.tags, t));
|
|
2651
|
+
let a = Ta(t, o, e);
|
|
2646
2652
|
a.length > 0 && (e.indentAtStart = (e.indentAtStart || 0) + a.length + 1);
|
|
2647
2653
|
let c = typeof o.stringify == "function" ? o.stringify(t, e, n, r) : t instanceof S.Scalar ? S.stringifyString(t, e, n, r) : t.toString(e, n, r);
|
|
2648
2654
|
return a ? t instanceof S.Scalar || c[0] === "{" || c[0] === "[" ? `${a} ${c}` : `${a}
|
|
2649
2655
|
${e.indent}${c}` : c;
|
|
2650
2656
|
}
|
|
2651
|
-
var
|
|
2657
|
+
var Zn = class t {
|
|
2652
2658
|
static validAnchorNode(e) {
|
|
2653
2659
|
return e instanceof S.Scalar || e instanceof S.YAMLSeq || e instanceof S.YAMLMap;
|
|
2654
2660
|
}
|
|
@@ -2708,14 +2714,14 @@ ${e.indent}${c}` : c;
|
|
|
2708
2714
|
}
|
|
2709
2715
|
return n;
|
|
2710
2716
|
}
|
|
2711
|
-
},
|
|
2717
|
+
}, Ht = (t, e) => {
|
|
2712
2718
|
if (t && typeof t == "object") {
|
|
2713
2719
|
let { tag: n } = t;
|
|
2714
|
-
t instanceof S.Collection ? (n && (e[n] = true), t.items.forEach((r) =>
|
|
2720
|
+
t instanceof S.Collection ? (n && (e[n] = true), t.items.forEach((r) => Ht(r, e))) : t instanceof S.Pair ? (Ht(t.key, e), Ht(t.value, e)) : t instanceof S.Scalar && n && (e[n] = true);
|
|
2715
2721
|
}
|
|
2716
2722
|
return e;
|
|
2717
|
-
},
|
|
2718
|
-
function
|
|
2723
|
+
}, Ma = (t) => Object.keys(Ht(t, {}));
|
|
2724
|
+
function Ca(t, e) {
|
|
2719
2725
|
let n = { before: [], after: [] }, r, s = false;
|
|
2720
2726
|
for (let i of e) if (i.valueRange) {
|
|
2721
2727
|
if (r !== void 0) {
|
|
@@ -2741,7 +2747,7 @@ ${o.commentBefore}` : i;
|
|
|
2741
2747
|
`) || null;
|
|
2742
2748
|
}
|
|
2743
2749
|
}
|
|
2744
|
-
function
|
|
2750
|
+
function ka({ tagPrefixes: t }, e) {
|
|
2745
2751
|
let [n, r] = e.parameters;
|
|
2746
2752
|
if (!n || !r) {
|
|
2747
2753
|
let s = "Insufficient parameters given for %TAG directive";
|
|
@@ -2753,26 +2759,26 @@ ${o.commentBefore}` : i;
|
|
|
2753
2759
|
}
|
|
2754
2760
|
return { handle: n, prefix: r };
|
|
2755
2761
|
}
|
|
2756
|
-
function
|
|
2762
|
+
function Pa(t, e) {
|
|
2757
2763
|
let [n] = e.parameters;
|
|
2758
2764
|
if (e.name === "YAML:1.0" && (n = "1.0"), !n) {
|
|
2759
2765
|
let r = "Insufficient parameters given for %YAML directive";
|
|
2760
2766
|
throw new Y.YAMLSemanticError(e, r);
|
|
2761
2767
|
}
|
|
2762
|
-
if (!
|
|
2768
|
+
if (!_s[n]) {
|
|
2763
2769
|
let s = `Document will be parsed as YAML ${t.version || t.options.version} rather than YAML ${n}`;
|
|
2764
2770
|
t.warnings.push(new Y.YAMLWarning(e, s));
|
|
2765
2771
|
}
|
|
2766
2772
|
return n;
|
|
2767
2773
|
}
|
|
2768
|
-
function
|
|
2774
|
+
function Ia(t, e, n) {
|
|
2769
2775
|
let r = [], s = false;
|
|
2770
2776
|
for (let i of e) {
|
|
2771
2777
|
let { comment: o, name: a } = i;
|
|
2772
2778
|
switch (a) {
|
|
2773
2779
|
case "TAG":
|
|
2774
2780
|
try {
|
|
2775
|
-
t.tagPrefixes.push(
|
|
2781
|
+
t.tagPrefixes.push(ka(t, i));
|
|
2776
2782
|
} catch (c) {
|
|
2777
2783
|
t.errors.push(c);
|
|
2778
2784
|
}
|
|
@@ -2785,7 +2791,7 @@ ${o.commentBefore}` : i;
|
|
|
2785
2791
|
t.errors.push(new Y.YAMLSemanticError(i, c));
|
|
2786
2792
|
}
|
|
2787
2793
|
try {
|
|
2788
|
-
t.version =
|
|
2794
|
+
t.version = Pa(t, i);
|
|
2789
2795
|
} catch (c) {
|
|
2790
2796
|
t.errors.push(c);
|
|
2791
2797
|
}
|
|
@@ -2810,9 +2816,9 @@ ${o.commentBefore}` : i;
|
|
|
2810
2816
|
if (t instanceof S.Collection) return true;
|
|
2811
2817
|
throw new Error("Expected a YAML collection as document contents");
|
|
2812
2818
|
}
|
|
2813
|
-
var
|
|
2819
|
+
var Jt = class t {
|
|
2814
2820
|
constructor(e) {
|
|
2815
|
-
this.anchors = new
|
|
2821
|
+
this.anchors = new Zn(e.anchorPrefix), this.commentBefore = null, this.comment = null, this.contents = null, this.directivesEndMarker = null, this.errors = [], this.options = e, this.schema = null, this.tagPrefixes = [], this.version = null, this.warnings = [];
|
|
2816
2822
|
}
|
|
2817
2823
|
add(e) {
|
|
2818
2824
|
return Ve(this.contents), this.contents.add(e);
|
|
@@ -2851,19 +2857,19 @@ ${o.commentBefore}` : i;
|
|
|
2851
2857
|
if (!e && !n && this.schema) return;
|
|
2852
2858
|
typeof e == "number" && (e = e.toFixed(1)), e === "1.0" || e === "1.1" || e === "1.2" ? (this.version ? this.version = e : this.options.version = e, delete this.options.schema) : e && typeof e == "string" && (this.options.schema = e), Array.isArray(n) && (this.options.customTags = n);
|
|
2853
2859
|
let r = Object.assign({}, this.getDefaults(), this.options);
|
|
2854
|
-
this.schema = new
|
|
2860
|
+
this.schema = new Is.Schema(r);
|
|
2855
2861
|
}
|
|
2856
2862
|
parse(e, n) {
|
|
2857
2863
|
this.options.keepCstNodes && (this.cstNode = e), this.options.keepNodeTypes && (this.type = "DOCUMENT");
|
|
2858
2864
|
let { directives: r = [], contents: s = [], directivesEndMarker: i, error: o, valueRange: a } = e;
|
|
2859
|
-
if (o && (o.source || (o.source = this), this.errors.push(o)),
|
|
2865
|
+
if (o && (o.source || (o.source = this), this.errors.push(o)), Ia(this, r, n), i && (this.directivesEndMarker = true), this.range = a ? [a.start, a.end] : null, this.setSchema(), this.anchors._cstAliases = [], Ca(this, s), this.anchors.resolveNodes(), this.options.prettyErrors) {
|
|
2860
2866
|
for (let c of this.errors) c instanceof Y.YAMLError && c.makePretty();
|
|
2861
2867
|
for (let c of this.warnings) c instanceof Y.YAMLError && c.makePretty();
|
|
2862
2868
|
}
|
|
2863
2869
|
return this;
|
|
2864
2870
|
}
|
|
2865
2871
|
listNonDefaultTags() {
|
|
2866
|
-
return
|
|
2872
|
+
return Ma(this.contents).filter((e) => e.indexOf(Is.Schema.defaultPrefix) !== 0);
|
|
2867
2873
|
}
|
|
2868
2874
|
setTagPrefix(e, n) {
|
|
2869
2875
|
if (e[0] !== "!" || e[e.length - 1] !== "!") throw new Error("Handle must start and end with !");
|
|
@@ -2873,7 +2879,7 @@ ${o.commentBefore}` : i;
|
|
|
2873
2879
|
} else this.tagPrefixes = this.tagPrefixes.filter((r) => r.handle !== e);
|
|
2874
2880
|
}
|
|
2875
2881
|
toJSON(e, n) {
|
|
2876
|
-
let { keepBlobsInJSON: r, mapAsMap: s, maxAliasCount: i } = this.options, o = r && (typeof e != "string" || !(this.contents instanceof S.Scalar)), a = { doc: this, indentStep: " ", keep: o, mapAsMap: o && !!s, maxAliasCount: i, stringify:
|
|
2882
|
+
let { keepBlobsInJSON: r, mapAsMap: s, maxAliasCount: i } = this.options, o = r && (typeof e != "string" || !(this.contents instanceof S.Scalar)), a = { doc: this, indentStep: " ", keep: o, mapAsMap: o && !!s, maxAliasCount: i, stringify: Gt }, c = Object.keys(this.anchors.map);
|
|
2877
2883
|
c.length > 0 && (a.anchors = new Map(c.map((f) => [this.anchors.map[f], { alias: [], aliasCount: 0, count: 1 }])));
|
|
2878
2884
|
let l = S.toJSON(this.contents, e, a);
|
|
2879
2885
|
if (typeof n == "function" && a.anchors) for (let { count: f, res: m } of a.anchors.values()) n(m, f);
|
|
@@ -2896,117 +2902,117 @@ ${o.commentBefore}` : i;
|
|
|
2896
2902
|
this.tagPrefixes.forEach(({ handle: c, prefix: l }) => {
|
|
2897
2903
|
s.some((f) => f.indexOf(l) === 0) && (n.push(`%TAG ${c} ${l}`), r = true);
|
|
2898
2904
|
}), (r || this.directivesEndMarker) && n.push("---"), this.commentBefore && ((r || !this.directivesEndMarker) && n.unshift(""), n.unshift(this.commentBefore.replace(/^/gm, "#")));
|
|
2899
|
-
let i = { anchors: /* @__PURE__ */ Object.create(null), doc: this, indent: "", indentStep: " ".repeat(e), stringify:
|
|
2905
|
+
let i = { anchors: /* @__PURE__ */ Object.create(null), doc: this, indent: "", indentStep: " ".repeat(e), stringify: Gt }, o = false, a = null;
|
|
2900
2906
|
if (this.contents) {
|
|
2901
2907
|
this.contents instanceof S.Node && (this.contents.spaceBefore && (r || this.directivesEndMarker) && n.push(""), this.contents.commentBefore && n.push(this.contents.commentBefore.replace(/^/gm, "#")), i.forceBlockIndent = !!this.comment, a = this.contents.comment);
|
|
2902
|
-
let c = a ? null : () => o = true, l =
|
|
2908
|
+
let c = a ? null : () => o = true, l = Gt(this.contents, i, () => a = null, c);
|
|
2903
2909
|
n.push(S.addComment(l, "", a));
|
|
2904
|
-
} else this.contents !== void 0 && n.push(
|
|
2910
|
+
} else this.contents !== void 0 && n.push(Gt(this.contents, i));
|
|
2905
2911
|
return this.comment && ((!o || a) && n[n.length - 1] !== "" && n.push(""), n.push(this.comment.replace(/^/gm, "#"))), n.join(`
|
|
2906
2912
|
`) + `
|
|
2907
2913
|
`;
|
|
2908
2914
|
}
|
|
2909
2915
|
};
|
|
2910
|
-
Y._defineProperty(
|
|
2911
|
-
|
|
2912
|
-
|
|
2913
|
-
|
|
2916
|
+
Y._defineProperty(Jt, "defaults", _s);
|
|
2917
|
+
Xt.Document = Jt;
|
|
2918
|
+
Xt.defaultOptions = Oa;
|
|
2919
|
+
Xt.scalarOptions = Aa;
|
|
2914
2920
|
});
|
|
2915
|
-
var
|
|
2916
|
-
var
|
|
2921
|
+
var Ys = te((Ds) => {
|
|
2922
|
+
var er = ns(), Oe = Rs(), va = zn(), _a = oe(), Ra = Gn();
|
|
2917
2923
|
qe();
|
|
2918
|
-
function
|
|
2924
|
+
function xa(t, e = true, n) {
|
|
2919
2925
|
n === void 0 && typeof e == "string" && (n = e, e = true);
|
|
2920
2926
|
let r = Object.assign({}, Oe.Document.defaults[Oe.defaultOptions.version], Oe.defaultOptions);
|
|
2921
|
-
return new
|
|
2927
|
+
return new va.Schema(r).createNode(t, e, n);
|
|
2922
2928
|
}
|
|
2923
|
-
var
|
|
2929
|
+
var je = class extends Oe.Document {
|
|
2924
2930
|
constructor(e) {
|
|
2925
2931
|
super(Object.assign({}, Oe.defaultOptions, e));
|
|
2926
2932
|
}
|
|
2927
2933
|
};
|
|
2928
|
-
function
|
|
2934
|
+
function Da(t, e) {
|
|
2929
2935
|
let n = [], r;
|
|
2930
|
-
for (let s of
|
|
2931
|
-
let i = new
|
|
2936
|
+
for (let s of er.parse(t)) {
|
|
2937
|
+
let i = new je(e);
|
|
2932
2938
|
i.parse(s, r), n.push(i), r = i;
|
|
2933
2939
|
}
|
|
2934
2940
|
return n;
|
|
2935
2941
|
}
|
|
2936
|
-
function
|
|
2937
|
-
let n =
|
|
2942
|
+
function xs(t, e) {
|
|
2943
|
+
let n = er.parse(t), r = new je(e).parse(n[0]);
|
|
2938
2944
|
if (n.length > 1) {
|
|
2939
2945
|
let s = "Source contains multiple documents; please use YAML.parseAllDocuments()";
|
|
2940
|
-
r.errors.unshift(new
|
|
2946
|
+
r.errors.unshift(new _a.YAMLSemanticError(n[1], s));
|
|
2941
2947
|
}
|
|
2942
2948
|
return r;
|
|
2943
2949
|
}
|
|
2944
|
-
function
|
|
2945
|
-
let n =
|
|
2946
|
-
if (n.warnings.forEach((r) =>
|
|
2950
|
+
function Ya(t, e) {
|
|
2951
|
+
let n = xs(t, e);
|
|
2952
|
+
if (n.warnings.forEach((r) => Ra.warn(r)), n.errors.length > 0) throw n.errors[0];
|
|
2947
2953
|
return n.toJSON();
|
|
2948
2954
|
}
|
|
2949
|
-
function
|
|
2950
|
-
let n = new
|
|
2955
|
+
function $a(t, e) {
|
|
2956
|
+
let n = new je(e);
|
|
2951
2957
|
return n.contents = t, String(n);
|
|
2952
2958
|
}
|
|
2953
|
-
var
|
|
2954
|
-
|
|
2959
|
+
var Ba = { createNode: xa, defaultOptions: Oe.defaultOptions, Document: je, parse: Ya, parseAllDocuments: Da, parseCST: er.parse, parseDocument: xs, scalarOptions: Oe.scalarOptions, stringify: $a };
|
|
2960
|
+
Ds.YAML = Ba;
|
|
2955
2961
|
});
|
|
2956
|
-
var
|
|
2957
|
-
|
|
2962
|
+
var tr = te((nf, $s) => {
|
|
2963
|
+
$s.exports = Ys().YAML;
|
|
2958
2964
|
});
|
|
2959
|
-
var
|
|
2960
|
-
var
|
|
2961
|
-
|
|
2962
|
-
|
|
2963
|
-
|
|
2964
|
-
|
|
2965
|
-
|
|
2966
|
-
|
|
2967
|
-
|
|
2968
|
-
|
|
2969
|
-
|
|
2970
|
-
|
|
2971
|
-
|
|
2972
|
-
|
|
2965
|
+
var Bs = te((G) => {
|
|
2966
|
+
var We = qe(), Qe = oe();
|
|
2967
|
+
G.findPair = We.findPair;
|
|
2968
|
+
G.parseMap = We.resolveMap;
|
|
2969
|
+
G.parseSeq = We.resolveSeq;
|
|
2970
|
+
G.stringifyNumber = We.stringifyNumber;
|
|
2971
|
+
G.stringifyString = We.stringifyString;
|
|
2972
|
+
G.toJSON = We.toJSON;
|
|
2973
|
+
G.Type = Qe.Type;
|
|
2974
|
+
G.YAMLError = Qe.YAMLError;
|
|
2975
|
+
G.YAMLReferenceError = Qe.YAMLReferenceError;
|
|
2976
|
+
G.YAMLSemanticError = Qe.YAMLSemanticError;
|
|
2977
|
+
G.YAMLSyntaxError = Qe.YAMLSyntaxError;
|
|
2978
|
+
G.YAMLWarning = Qe.YAMLWarning;
|
|
2973
2979
|
});
|
|
2974
|
-
var
|
|
2975
|
-
|
|
2976
|
-
var
|
|
2980
|
+
var gr = {};
|
|
2981
|
+
yr(gr, { __parsePrettierYamlConfig: () => sc, languages: () => Xr, options: () => zr, parsers: () => hr, printers: () => rc });
|
|
2982
|
+
var Vi = (t, e, n, r) => {
|
|
2977
2983
|
if (!(t && e == null)) return e.replaceAll ? e.replaceAll(n, r) : n.global ? e.replace(n, r) : e.split(n).join(r);
|
|
2978
|
-
},
|
|
2979
|
-
var
|
|
2980
|
-
var
|
|
2984
|
+
}, At = Vi;
|
|
2985
|
+
var Me = "string", ze = "array", Ze = "cursor", et = "indent", Ce = "align", tt = "trim", ke = "group", Pe = "fill", ge = "if-break", nt = "indent-if-break", Ie = "line-suffix", rt = "line-suffix-boundary", Z = "line", st = "label", ve = "break-parent", Lt = /* @__PURE__ */ new Set([Ze, et, Ce, tt, ke, Pe, ge, nt, Ie, rt, Z, st, ve]);
|
|
2986
|
+
var ji = (t, e, n) => {
|
|
2981
2987
|
if (!(t && e == null)) return Array.isArray(e) || typeof e == "string" ? e[n < 0 ? e.length + n : n] : e.at(n);
|
|
2982
|
-
}, x =
|
|
2983
|
-
function
|
|
2984
|
-
if (typeof t == "string") return
|
|
2985
|
-
if (Array.isArray(t)) return
|
|
2988
|
+
}, x = ji;
|
|
2989
|
+
function Wi(t) {
|
|
2990
|
+
if (typeof t == "string") return Me;
|
|
2991
|
+
if (Array.isArray(t)) return ze;
|
|
2986
2992
|
if (!t) return;
|
|
2987
2993
|
let { type: e } = t;
|
|
2988
|
-
if (
|
|
2994
|
+
if (Lt.has(e)) return e;
|
|
2989
2995
|
}
|
|
2990
|
-
var
|
|
2991
|
-
var
|
|
2992
|
-
function
|
|
2996
|
+
var _e = Wi;
|
|
2997
|
+
var Qi = (t) => new Intl.ListFormat("en-US", { type: "disjunction" }).format(t);
|
|
2998
|
+
function Gi(t) {
|
|
2993
2999
|
let e = t === null ? "null" : typeof t;
|
|
2994
3000
|
if (e !== "string" && e !== "object") return `Unexpected doc '${e}',
|
|
2995
3001
|
Expected it to be 'string' or 'object'.`;
|
|
2996
|
-
if (
|
|
3002
|
+
if (_e(t)) throw new Error("doc is valid.");
|
|
2997
3003
|
let n = Object.prototype.toString.call(t);
|
|
2998
3004
|
if (n !== "[object Object]") return `Unexpected doc '${n}'.`;
|
|
2999
|
-
let r =
|
|
3005
|
+
let r = Qi([...Lt].map((s) => `'${s}'`));
|
|
3000
3006
|
return `Unexpected doc.type '${t.type}'.
|
|
3001
3007
|
Expected it to be ${r}.`;
|
|
3002
3008
|
}
|
|
3003
|
-
var
|
|
3009
|
+
var pn = class extends Error {
|
|
3004
3010
|
name = "InvalidDocError";
|
|
3005
3011
|
constructor(e) {
|
|
3006
|
-
super(
|
|
3012
|
+
super(Gi(e)), this.doc = e;
|
|
3007
3013
|
}
|
|
3008
|
-
},
|
|
3009
|
-
function
|
|
3014
|
+
}, mn = pn;
|
|
3015
|
+
function Ji(t, e) {
|
|
3010
3016
|
if (typeof t == "string") return e(t);
|
|
3011
3017
|
let n = /* @__PURE__ */ new Map();
|
|
3012
3018
|
return r(t);
|
|
@@ -3016,76 +3022,76 @@ function $i(t, e) {
|
|
|
3016
3022
|
return n.set(i, o), o;
|
|
3017
3023
|
}
|
|
3018
3024
|
function s(i) {
|
|
3019
|
-
switch (
|
|
3020
|
-
case
|
|
3025
|
+
switch (_e(i)) {
|
|
3026
|
+
case ze:
|
|
3021
3027
|
return e(i.map(r));
|
|
3022
|
-
case
|
|
3028
|
+
case Pe:
|
|
3023
3029
|
return e({ ...i, parts: i.parts.map(r) });
|
|
3024
|
-
case
|
|
3030
|
+
case ge:
|
|
3025
3031
|
return e({ ...i, breakContents: r(i.breakContents), flatContents: r(i.flatContents) });
|
|
3026
|
-
case
|
|
3032
|
+
case ke: {
|
|
3027
3033
|
let { expandedStates: o, contents: a } = i;
|
|
3028
3034
|
return o ? (o = o.map(r), a = o[0]) : a = r(a), e({ ...i, contents: a, expandedStates: o });
|
|
3029
3035
|
}
|
|
3030
|
-
case
|
|
3031
|
-
case He:
|
|
3032
|
-
case ze:
|
|
3036
|
+
case Ce:
|
|
3033
3037
|
case et:
|
|
3034
|
-
case
|
|
3038
|
+
case nt:
|
|
3039
|
+
case st:
|
|
3040
|
+
case Ie:
|
|
3035
3041
|
return e({ ...i, contents: r(i.contents) });
|
|
3036
|
-
case
|
|
3037
|
-
case Ge:
|
|
3038
|
-
case Xe:
|
|
3042
|
+
case Me:
|
|
3039
3043
|
case Ze:
|
|
3044
|
+
case tt:
|
|
3045
|
+
case rt:
|
|
3040
3046
|
case Z:
|
|
3041
|
-
case
|
|
3047
|
+
case ve:
|
|
3042
3048
|
return e(i);
|
|
3043
3049
|
default:
|
|
3044
|
-
throw new
|
|
3050
|
+
throw new mn(i);
|
|
3045
3051
|
}
|
|
3046
3052
|
}
|
|
3047
3053
|
}
|
|
3048
|
-
function
|
|
3049
|
-
return
|
|
3054
|
+
function Er(t, e = it) {
|
|
3055
|
+
return Ji(t, (n) => typeof n == "string" ? P(e, n.split(`
|
|
3050
3056
|
`)) : n);
|
|
3051
3057
|
}
|
|
3052
|
-
var
|
|
3053
|
-
},
|
|
3054
|
-
function
|
|
3055
|
-
return { type:
|
|
3058
|
+
var hn = () => {
|
|
3059
|
+
}, gn = hn;
|
|
3060
|
+
function ot(t, e) {
|
|
3061
|
+
return { type: Ce, contents: e, n: t };
|
|
3056
3062
|
}
|
|
3057
|
-
function
|
|
3058
|
-
return
|
|
3063
|
+
function Re(t, e = {}) {
|
|
3064
|
+
return gn(e.expandedStates), { type: ke, id: e.id, contents: t, break: !!e.shouldBreak, expandedStates: e.expandedStates };
|
|
3059
3065
|
}
|
|
3060
|
-
function
|
|
3061
|
-
return
|
|
3066
|
+
function dn(t) {
|
|
3067
|
+
return ot(Number.NEGATIVE_INFINITY, t);
|
|
3062
3068
|
}
|
|
3063
|
-
function
|
|
3064
|
-
return
|
|
3069
|
+
function wr(t) {
|
|
3070
|
+
return ot({ type: "root" }, t);
|
|
3065
3071
|
}
|
|
3066
|
-
function
|
|
3067
|
-
return
|
|
3072
|
+
function br(t) {
|
|
3073
|
+
return ot(-1, t);
|
|
3068
3074
|
}
|
|
3069
|
-
function
|
|
3070
|
-
return
|
|
3075
|
+
function yn(t, e) {
|
|
3076
|
+
return Re(t[0], { ...e, expandedStates: t });
|
|
3071
3077
|
}
|
|
3072
|
-
function
|
|
3073
|
-
return { type:
|
|
3078
|
+
function Tt(t) {
|
|
3079
|
+
return { type: Pe, parts: t };
|
|
3074
3080
|
}
|
|
3075
|
-
function
|
|
3076
|
-
return { type:
|
|
3081
|
+
function at(t, e = "", n = {}) {
|
|
3082
|
+
return { type: ge, breakContents: t, flatContents: e, groupId: n.groupId };
|
|
3077
3083
|
}
|
|
3078
|
-
function
|
|
3079
|
-
return { type:
|
|
3084
|
+
function Nr(t) {
|
|
3085
|
+
return { type: Ie, contents: t };
|
|
3080
3086
|
}
|
|
3081
|
-
var
|
|
3082
|
-
var
|
|
3083
|
-
function
|
|
3087
|
+
var Mt = { type: ve };
|
|
3088
|
+
var Xi = { type: Z, hard: true }, zi = { type: Z, hard: true, literal: true }, ne = { type: Z }, Ct = { type: Z, soft: true }, N = [Xi, Mt], it = [zi, Mt];
|
|
3089
|
+
function P(t, e) {
|
|
3084
3090
|
let n = [];
|
|
3085
3091
|
for (let r = 0; r < e.length; r++) r !== 0 && n.push(t), n.push(e[r]);
|
|
3086
3092
|
return n;
|
|
3087
3093
|
}
|
|
3088
|
-
function
|
|
3094
|
+
function kt(t) {
|
|
3089
3095
|
return (e, n, r) => {
|
|
3090
3096
|
let s = !!(r != null && r.backwards);
|
|
3091
3097
|
if (n === false) return false;
|
|
@@ -3100,8 +3106,8 @@ function Nt(t) {
|
|
|
3100
3106
|
return o === -1 || o === i ? o : false;
|
|
3101
3107
|
};
|
|
3102
3108
|
}
|
|
3103
|
-
var
|
|
3104
|
-
function
|
|
3109
|
+
var En = kt(" ");
|
|
3110
|
+
function Zi(t, e, n) {
|
|
3105
3111
|
let r = !!(n != null && n.backwards);
|
|
3106
3112
|
if (e === false) return false;
|
|
3107
3113
|
let s = t.charAt(e);
|
|
@@ -3118,44 +3124,44 @@ function qi(t, e, n) {
|
|
|
3118
3124
|
}
|
|
3119
3125
|
return e;
|
|
3120
3126
|
}
|
|
3121
|
-
var
|
|
3122
|
-
function
|
|
3127
|
+
var Sn = Zi;
|
|
3128
|
+
function eo(t, e) {
|
|
3123
3129
|
let n = e - 1;
|
|
3124
|
-
n =
|
|
3125
|
-
let r =
|
|
3130
|
+
n = En(t, n, { backwards: true }), n = Sn(t, n, { backwards: true }), n = En(t, n, { backwards: true });
|
|
3131
|
+
let r = Sn(t, n, { backwards: true });
|
|
3126
3132
|
return n !== r;
|
|
3127
3133
|
}
|
|
3128
|
-
var
|
|
3129
|
-
var
|
|
3134
|
+
var Or = eo;
|
|
3135
|
+
var wn = class extends Error {
|
|
3130
3136
|
name = "UnexpectedNodeError";
|
|
3131
3137
|
constructor(e, n, r = "type") {
|
|
3132
3138
|
super(`Unexpected ${n} node ${r}: ${JSON.stringify(e[r])}.`), this.node = e;
|
|
3133
3139
|
}
|
|
3134
|
-
},
|
|
3135
|
-
function
|
|
3140
|
+
}, Ar = wn;
|
|
3141
|
+
function Lr(t, e) {
|
|
3136
3142
|
let { node: n } = t;
|
|
3137
3143
|
if (n.type === "root" && e.filepath && /(?:[/\\]|^)\.(?:prettier|stylelint|lintstaged)rc$/u.test(e.filepath)) return async (r) => {
|
|
3138
3144
|
let s = await r(e.originalText, { parser: "json" });
|
|
3139
3145
|
return s ? [s, N] : void 0;
|
|
3140
3146
|
};
|
|
3141
3147
|
}
|
|
3142
|
-
|
|
3143
|
-
var
|
|
3144
|
-
var
|
|
3145
|
-
function
|
|
3146
|
-
if (
|
|
3147
|
-
let e =
|
|
3148
|
-
return
|
|
3148
|
+
Lr.getVisitorKeys = () => [];
|
|
3149
|
+
var Tr = Lr;
|
|
3150
|
+
var ct = null;
|
|
3151
|
+
function lt(t) {
|
|
3152
|
+
if (ct !== null && typeof ct.property) {
|
|
3153
|
+
let e = ct;
|
|
3154
|
+
return ct = lt.prototype = null, e;
|
|
3149
3155
|
}
|
|
3150
|
-
return
|
|
3156
|
+
return ct = lt.prototype = t ?? /* @__PURE__ */ Object.create(null), new lt();
|
|
3151
3157
|
}
|
|
3152
|
-
var
|
|
3153
|
-
for (let t = 0; t <=
|
|
3154
|
-
function
|
|
3155
|
-
return
|
|
3158
|
+
var to = 10;
|
|
3159
|
+
for (let t = 0; t <= to; t++) lt();
|
|
3160
|
+
function bn(t) {
|
|
3161
|
+
return lt(t);
|
|
3156
3162
|
}
|
|
3157
|
-
function
|
|
3158
|
-
|
|
3163
|
+
function no(t, e = "type") {
|
|
3164
|
+
bn(t);
|
|
3159
3165
|
function n(r) {
|
|
3160
3166
|
let s = r[e], i = t[s];
|
|
3161
3167
|
if (!Array.isArray(i)) throw Object.assign(new Error(`Missing visitor keys for '${s}'.`), { node: r });
|
|
@@ -3163,40 +3169,45 @@ function Vi(t, e = "type") {
|
|
|
3163
3169
|
}
|
|
3164
3170
|
return n;
|
|
3165
3171
|
}
|
|
3166
|
-
var
|
|
3167
|
-
var
|
|
3168
|
-
var
|
|
3169
|
-
function
|
|
3172
|
+
var Mr = no;
|
|
3173
|
+
var ro = Object.fromEntries(Object.entries({ root: ["children"], document: ["head", "body", "children"], documentHead: ["children"], documentBody: ["children"], directive: [], alias: [], blockLiteral: [], blockFolded: ["children"], plain: ["children"], quoteSingle: [], quoteDouble: [], mapping: ["children"], mappingItem: ["key", "value", "children"], mappingKey: ["content", "children"], mappingValue: ["content", "children"], sequence: ["children"], sequenceItem: ["content", "children"], flowMapping: ["children"], flowMappingItem: ["key", "value", "children"], flowSequence: ["children"], flowSequenceItem: ["content", "children"], comment: [], tag: [], anchor: [] }).map(([t, e]) => [t, [...e, "anchor", "tag", "indicatorComment", "leadingComments", "middleComments", "trailingComment", "endComments"]])), Cr = ro;
|
|
3174
|
+
var so = Mr(Cr), kr = so;
|
|
3175
|
+
function xe(t) {
|
|
3170
3176
|
return t.position.start.offset;
|
|
3171
3177
|
}
|
|
3172
|
-
function
|
|
3178
|
+
function Pr(t) {
|
|
3173
3179
|
return t.position.end.offset;
|
|
3174
3180
|
}
|
|
3175
|
-
|
|
3176
|
-
|
|
3181
|
+
var Ir = "format";
|
|
3182
|
+
var vr = /^\s*#[^\S\n]*@(?:noformat|noprettier)\s*?(?:\n|$)/u, _r = /^\s*#[^\S\n]*@(?:format|prettier)\s*?(?:\n|$)/u, Rr = /^\s*@(?:format|prettier)\s*$/u;
|
|
3183
|
+
function xr(t) {
|
|
3184
|
+
return Rr.test(t);
|
|
3177
3185
|
}
|
|
3178
|
-
function
|
|
3179
|
-
return
|
|
3186
|
+
function Dr(t) {
|
|
3187
|
+
return _r.test(t);
|
|
3180
3188
|
}
|
|
3181
|
-
function
|
|
3182
|
-
return
|
|
3189
|
+
function Yr(t) {
|
|
3190
|
+
return vr.test(t);
|
|
3191
|
+
}
|
|
3192
|
+
function $r(t) {
|
|
3193
|
+
return `# @${Ir}
|
|
3183
3194
|
|
|
3184
3195
|
${t}`;
|
|
3185
3196
|
}
|
|
3186
|
-
function
|
|
3197
|
+
function io(t) {
|
|
3187
3198
|
return Array.isArray(t) && t.length > 0;
|
|
3188
3199
|
}
|
|
3189
|
-
var
|
|
3190
|
-
function
|
|
3200
|
+
var De = io;
|
|
3201
|
+
function K(t, e) {
|
|
3191
3202
|
return typeof (t == null ? void 0 : t.type) == "string" && (!e || e.includes(t.type));
|
|
3192
3203
|
}
|
|
3193
|
-
function
|
|
3194
|
-
return e("children" in t ? { ...t, children: t.children.map((r) =>
|
|
3204
|
+
function Nn(t, e, n) {
|
|
3205
|
+
return e("children" in t ? { ...t, children: t.children.map((r) => Nn(r, e, t)) } : t, n);
|
|
3195
3206
|
}
|
|
3196
|
-
function
|
|
3207
|
+
function Ye(t, e, n) {
|
|
3197
3208
|
Object.defineProperty(t, e, { get: n, enumerable: false });
|
|
3198
3209
|
}
|
|
3199
|
-
function
|
|
3210
|
+
function Fr(t, e) {
|
|
3200
3211
|
let n = 0, r = e.length;
|
|
3201
3212
|
for (let s = t.position.end.offset - 1; s < r; s++) {
|
|
3202
3213
|
let i = e[s];
|
|
@@ -3206,7 +3217,7 @@ function Nr(t, e) {
|
|
|
3206
3217
|
}
|
|
3207
3218
|
return false;
|
|
3208
3219
|
}
|
|
3209
|
-
function
|
|
3220
|
+
function Pt(t) {
|
|
3210
3221
|
let { node: e } = t;
|
|
3211
3222
|
switch (e.type) {
|
|
3212
3223
|
case "tag":
|
|
@@ -3221,52 +3232,52 @@ function Ot(t) {
|
|
|
3221
3232
|
}
|
|
3222
3233
|
return true;
|
|
3223
3234
|
}
|
|
3224
|
-
function
|
|
3225
|
-
return
|
|
3235
|
+
function It(t) {
|
|
3236
|
+
return De(t.children) ? It(x(false, t.children, -1)) : t;
|
|
3226
3237
|
}
|
|
3227
|
-
function
|
|
3238
|
+
function Br(t) {
|
|
3228
3239
|
return t.value.trim() === "prettier-ignore";
|
|
3229
3240
|
}
|
|
3230
|
-
function
|
|
3241
|
+
function qr(t) {
|
|
3231
3242
|
let { node: e } = t;
|
|
3232
3243
|
if (e.type === "documentBody") {
|
|
3233
3244
|
let n = t.parent.head;
|
|
3234
|
-
return
|
|
3245
|
+
return I(n) && Br(x(false, n.endComments, -1));
|
|
3235
3246
|
}
|
|
3236
|
-
return ee(e) &&
|
|
3247
|
+
return ee(e) && Br(x(false, e.leadingComments, -1));
|
|
3237
3248
|
}
|
|
3238
|
-
function
|
|
3239
|
-
return !
|
|
3249
|
+
function $e(t) {
|
|
3250
|
+
return !De(t.children) && !oo(t);
|
|
3240
3251
|
}
|
|
3241
|
-
function
|
|
3242
|
-
return ee(t) || ie(t) ||
|
|
3252
|
+
function oo(t) {
|
|
3253
|
+
return ee(t) || ie(t) || On(t) || V(t) || I(t);
|
|
3243
3254
|
}
|
|
3244
3255
|
function ee(t) {
|
|
3245
|
-
return
|
|
3256
|
+
return De(t == null ? void 0 : t.leadingComments);
|
|
3246
3257
|
}
|
|
3247
3258
|
function ie(t) {
|
|
3248
|
-
return
|
|
3259
|
+
return De(t == null ? void 0 : t.middleComments);
|
|
3249
3260
|
}
|
|
3250
|
-
function
|
|
3261
|
+
function On(t) {
|
|
3251
3262
|
return t == null ? void 0 : t.indicatorComment;
|
|
3252
3263
|
}
|
|
3253
|
-
function
|
|
3264
|
+
function V(t) {
|
|
3254
3265
|
return t == null ? void 0 : t.trailingComment;
|
|
3255
3266
|
}
|
|
3256
|
-
function
|
|
3257
|
-
return
|
|
3267
|
+
function I(t) {
|
|
3268
|
+
return De(t == null ? void 0 : t.endComments);
|
|
3258
3269
|
}
|
|
3259
|
-
function
|
|
3270
|
+
function Ur(t) {
|
|
3260
3271
|
let e = [], n;
|
|
3261
3272
|
for (let r of t.split(/( +)/u)) r !== " " ? n === " " ? e.push(r) : e.push((e.pop() || "") + r) : n === void 0 && e.unshift(""), n = r;
|
|
3262
3273
|
return n === " " && e.push((e.pop() || "") + " "), e[0] === "" && (e.shift(), e.unshift(" " + (e.shift() || ""))), e;
|
|
3263
3274
|
}
|
|
3264
|
-
function
|
|
3275
|
+
function Kr(t, e, n) {
|
|
3265
3276
|
let r = e.split(`
|
|
3266
3277
|
`).map((s, i, o) => i === 0 && i === o.length - 1 ? s : i !== 0 && i !== o.length - 1 ? s.trim() : i === 0 ? s.trimEnd() : s.trimStart());
|
|
3267
|
-
return n.proseWrap === "preserve" ? r.map((s) => s.length === 0 ? [] : [s]) : r.map((s) => s.length === 0 ? [] :
|
|
3278
|
+
return n.proseWrap === "preserve" ? r.map((s) => s.length === 0 ? [] : [s]) : r.map((s) => s.length === 0 ? [] : Ur(s)).reduce((s, i, o) => o !== 0 && r[o - 1].length > 0 && i.length > 0 && !(t === "quoteDouble" && x(false, x(false, s, -1), -1).endsWith("\\")) ? [...s.slice(0, -1), [...x(false, s, -1), ...i]] : [...s, i], []).map((s) => n.proseWrap === "never" ? [s.join(" ")] : s);
|
|
3268
3279
|
}
|
|
3269
|
-
function
|
|
3280
|
+
function Vr(t, { parentIndent: e, isLastDescendant: n, options: r }) {
|
|
3270
3281
|
let s = t.position.start.line === t.position.end.line ? "" : r.originalText.slice(t.position.start.offset, t.position.end.offset).match(/^[^\n]*\n(.*)$/su)[1], i;
|
|
3271
3282
|
if (t.indent === null) {
|
|
3272
3283
|
let c = s.match(/^(?<leadingSpace> *)[^\n\r ]/mu);
|
|
@@ -3275,7 +3286,7 @@ function Tr(t, { parentIndent: e, isLastDescendant: n, options: r }) {
|
|
|
3275
3286
|
let o = s.split(`
|
|
3276
3287
|
`).map((c) => c.slice(i));
|
|
3277
3288
|
if (r.proseWrap === "preserve" || t.type === "blockLiteral") return a(o.map((c) => c.length === 0 ? [] : [c]));
|
|
3278
|
-
return a(o.map((c) => c.length === 0 ? [] :
|
|
3289
|
+
return a(o.map((c) => c.length === 0 ? [] : Ur(c)).reduce((c, l, f) => f !== 0 && o[f - 1].length > 0 && l.length > 0 && !/^\s/u.test(l[0]) && !/^\s|\s$/u.test(x(false, c, -1)) ? [...c.slice(0, -1), [...x(false, c, -1), ...l]] : [...c, l], []).map((c) => c.reduce((l, f) => l.length > 0 && /\s$/u.test(x(false, l, -1)) ? [...l.slice(0, -1), x(false, l, -1) + " " + f] : [...l, f], [])).map((c) => r.proseWrap === "never" ? [c.join(" ")] : c));
|
|
3279
3290
|
function a(c) {
|
|
3280
3291
|
if (t.chomping === "keep") return x(false, c, -1).length === 0 ? c.slice(0, -1) : c;
|
|
3281
3292
|
let l = 0;
|
|
@@ -3283,7 +3294,7 @@ function Tr(t, { parentIndent: e, isLastDescendant: n, options: r }) {
|
|
|
3283
3294
|
return l === 0 ? c : l >= 2 && !n ? c.slice(0, -(l - 1)) : c.slice(0, -l);
|
|
3284
3295
|
}
|
|
3285
3296
|
}
|
|
3286
|
-
function
|
|
3297
|
+
function ft(t) {
|
|
3287
3298
|
if (!t) return true;
|
|
3288
3299
|
switch (t.type) {
|
|
3289
3300
|
case "plain":
|
|
@@ -3297,50 +3308,50 @@ function ot(t) {
|
|
|
3297
3308
|
return false;
|
|
3298
3309
|
}
|
|
3299
3310
|
}
|
|
3300
|
-
var
|
|
3301
|
-
function
|
|
3311
|
+
var An = /* @__PURE__ */ new WeakMap();
|
|
3312
|
+
function vt(t, e) {
|
|
3302
3313
|
let { node: n, root: r } = t, s;
|
|
3303
|
-
return
|
|
3314
|
+
return An.has(r) ? s = An.get(r) : (s = /* @__PURE__ */ new Set(), An.set(r, s)), !s.has(n.position.end.line) && (s.add(n.position.end.line), Fr(n, e) && !Ln(t.parent)) ? Ct : "";
|
|
3304
3315
|
}
|
|
3305
|
-
function
|
|
3306
|
-
return
|
|
3307
|
-
}
|
|
3308
|
-
function I(t, e) {
|
|
3309
|
-
return nt(" ".repeat(t), e);
|
|
3310
|
-
}
|
|
3311
|
-
function Gi(t, e, n) {
|
|
3312
|
-
let { node: r } = t, s = t.ancestors.filter((l) => l.type === "sequence" || l.type === "mapping").length, i = Ot(t), o = [r.type === "blockFolded" ? ">" : "|"];
|
|
3313
|
-
r.indent !== null && o.push(r.indent.toString()), r.chomping !== "clip" && o.push(r.chomping === "keep" ? "+" : "-"), hn(r) && o.push(" ", e("indicatorComment"));
|
|
3314
|
-
let a = Tr(r, { parentIndent: s, isLastDescendant: i, options: n }), c = [];
|
|
3315
|
-
for (let [l, f] of a.entries()) l === 0 && c.push(N), c.push(St(v(ne, f))), l !== a.length - 1 ? c.push(f.length === 0 ? N : ar(tt)) : r.chomping === "keep" && i && c.push(an(f.length === 0 ? N : tt));
|
|
3316
|
-
return r.indent === null ? o.push(cr(I(n.tabWidth, c))) : o.push(an(I(r.indent - 1 + s, c))), o;
|
|
3317
|
-
}
|
|
3318
|
-
var Cr = Gi;
|
|
3319
|
-
function Tt(t, e, n) {
|
|
3320
|
-
let { node: r } = t, s = r.type === "flowMapping", i = s ? "{" : "[", o = s ? "}" : "]", a = bt;
|
|
3321
|
-
s && r.children.length > 0 && n.bracketSpacing && (a = ne);
|
|
3322
|
-
let c = x(false, r.children, -1), l = (c == null ? void 0 : c.type) === "flowMappingItem" && Re(c.key) && Re(c.value);
|
|
3323
|
-
return [i, I(n.tabWidth, [a, Hi(t, e, n), n.trailingComma === "none" ? "" : rt(","), R(r) ? [N, v(N, t.map(e, "endComments"))] : ""]), l ? "" : a, o];
|
|
3324
|
-
}
|
|
3325
|
-
function Hi(t, e, n) {
|
|
3326
|
-
return t.map(({ isLast: r, node: s, next: i }) => [e(), r ? "" : [",", ne, s.position.start.line !== i.position.start.line ? At(t, n.originalText) : ""]], "children");
|
|
3327
|
-
}
|
|
3328
|
-
function Xi(t, e, n) {
|
|
3329
|
-
var C;
|
|
3330
|
-
let { node: r, parent: s } = t, { key: i, value: o } = r, a = Re(i), c = Re(o);
|
|
3331
|
-
if (a && c) return ": ";
|
|
3332
|
-
let l = e("key"), f = zi(r) ? " " : "";
|
|
3333
|
-
if (c) return r.type === "flowMappingItem" && s.type === "flowMapping" ? l : r.type === "mappingItem" && yn(i.content, n) && !K(i.content) && ((C = s.tag) == null ? void 0 : C.value) !== "tag:yaml.org,2002:set" ? [l, f, ":"] : ["? ", I(2, l)];
|
|
3334
|
-
let m = e("value");
|
|
3335
|
-
if (a) return [": ", I(2, m)];
|
|
3336
|
-
if (ee(o) || !ot(i.content)) return ["? ", I(2, l), N, ...t.map(() => [e(), N], "value", "leadingComments"), ": ", I(2, m)];
|
|
3337
|
-
if (Zi(i.content) && !ee(i.content) && !ie(i.content) && !K(i.content) && !R(i) && !ee(o.content) && !ie(o.content) && !R(o) && yn(o.content, n)) return [l, f, ": ", m];
|
|
3338
|
-
let d = Symbol("mappingKey"), y = Ie([rt("? "), Ie(I(2, l), { id: d })]), h = [N, ": ", I(2, m)], g = [f, ":"];
|
|
3339
|
-
ee(o.content) || R(o) && o.content && !H(o.content, ["mapping", "sequence"]) || s.type === "mapping" && K(i.content) && ot(o.content) || H(o.content, ["mapping", "sequence"]) && o.content.tag === null && o.content.anchor === null ? g.push(N) : o.content ? g.push(ne) : K(o) && g.push(" "), g.push(m);
|
|
3340
|
-
let w = I(n.tabWidth, g);
|
|
3341
|
-
return yn(i.content, n) && !ee(i.content) && !ie(i.content) && !R(i) ? cn([[l, w]]) : cn([[y, rt(h, w, { groupId: d })]]);
|
|
3316
|
+
function Ln(t) {
|
|
3317
|
+
return I(t) && !K(t, ["documentHead", "documentBody", "flowMapping", "flowSequence"]);
|
|
3342
3318
|
}
|
|
3343
|
-
function
|
|
3319
|
+
function v(t, e) {
|
|
3320
|
+
return ot(" ".repeat(t), e);
|
|
3321
|
+
}
|
|
3322
|
+
function ao(t, e, n) {
|
|
3323
|
+
let { node: r } = t, s = t.ancestors.filter((l) => l.type === "sequence" || l.type === "mapping").length, i = Pt(t), o = [r.type === "blockFolded" ? ">" : "|"];
|
|
3324
|
+
r.indent !== null && o.push(r.indent.toString()), r.chomping !== "clip" && o.push(r.chomping === "keep" ? "+" : "-"), On(r) && o.push(" ", n("indicatorComment"));
|
|
3325
|
+
let a = Vr(r, { parentIndent: s, isLastDescendant: i, options: e }), c = [];
|
|
3326
|
+
for (let [l, f] of a.entries()) l === 0 && c.push(N), c.push(Tt(P(ne, f))), l !== a.length - 1 ? c.push(f.length === 0 ? N : wr(it)) : r.chomping === "keep" && i && c.push(dn(f.length === 0 ? N : it));
|
|
3327
|
+
return r.indent === null ? o.push(br(v(e.tabWidth, c))) : o.push(dn(v(r.indent - 1 + s, c))), o;
|
|
3328
|
+
}
|
|
3329
|
+
var jr = ao;
|
|
3330
|
+
function _t(t, e, n) {
|
|
3331
|
+
let { node: r } = t, s = r.type === "flowMapping", i = s ? "{" : "[", o = s ? "}" : "]", a = Ct;
|
|
3332
|
+
s && r.children.length > 0 && e.bracketSpacing && (a = ne);
|
|
3333
|
+
let c = x(false, r.children, -1), l = (c == null ? void 0 : c.type) === "flowMappingItem" && $e(c.key) && $e(c.value);
|
|
3334
|
+
return [i, v(e.tabWidth, [a, co(t, e, n), e.trailingComma === "none" ? "" : at(","), I(r) ? [N, P(N, t.map(n, "endComments"))] : ""]), l ? "" : a, o];
|
|
3335
|
+
}
|
|
3336
|
+
function co(t, e, n) {
|
|
3337
|
+
return t.map(({ isLast: r, node: s, next: i }) => [n(), r ? "" : [",", ne, s.position.start.line !== i.position.start.line ? vt(t, e.originalText) : ""]], "children");
|
|
3338
|
+
}
|
|
3339
|
+
function lo(t, e, n) {
|
|
3340
|
+
var M;
|
|
3341
|
+
let { node: r, parent: s } = t, { key: i, value: o } = r, a = $e(i), c = $e(o);
|
|
3342
|
+
if (a && c) return ": ";
|
|
3343
|
+
let l = n("key"), f = fo(r) ? " " : "";
|
|
3344
|
+
if (c) return r.type === "flowMappingItem" && s.type === "flowMapping" ? l : r.type === "mappingItem" && Tn(i.content, e) && !V(i.content) && ((M = s.tag) == null ? void 0 : M.value) !== "tag:yaml.org,2002:set" ? [l, f, ":"] : ["? ", v(2, l)];
|
|
3345
|
+
let m = n("value");
|
|
3346
|
+
if (a) return [": ", v(2, m)];
|
|
3347
|
+
if (ee(o) || !ft(i.content)) return ["? ", v(2, l), N, ...t.map(() => [n(), N], "value", "leadingComments"), ": ", v(2, m)];
|
|
3348
|
+
if (uo(i.content) && !ee(i.content) && !ie(i.content) && !V(i.content) && !I(i) && !ee(o.content) && !ie(o.content) && !I(o) && Tn(o.content, e)) return [l, f, ": ", m];
|
|
3349
|
+
let d = Symbol("mappingKey"), y = Re([at("? "), Re(v(2, l), { id: d })]), h = [N, ": ", v(2, m)], g = [f, ":"];
|
|
3350
|
+
I(o) && o.content && K(o.content, ["flowMapping", "flowSequence"]) && o.content.children.length === 0 ? g.push(" ") : ee(o.content) || I(o) && o.content && !K(o.content, ["mapping", "sequence"]) || s.type === "mapping" && V(i.content) && ft(o.content) || K(o.content, ["mapping", "sequence"]) && o.content.tag === null && o.content.anchor === null ? g.push(N) : o.content ? g.push(ne) : V(o) && g.push(" "), g.push(m);
|
|
3351
|
+
let w = v(e.tabWidth, g);
|
|
3352
|
+
return Tn(i.content, e) && !ee(i.content) && !ie(i.content) && !I(i) ? yn([[l, w]]) : yn([[y, at(h, w, { groupId: d })]]);
|
|
3353
|
+
}
|
|
3354
|
+
function Tn(t, e) {
|
|
3344
3355
|
if (!t) return true;
|
|
3345
3356
|
switch (t.type) {
|
|
3346
3357
|
case "plain":
|
|
@@ -3364,11 +3375,11 @@ function yn(t, e) {
|
|
|
3364
3375
|
return false;
|
|
3365
3376
|
}
|
|
3366
3377
|
}
|
|
3367
|
-
function
|
|
3378
|
+
function fo(t) {
|
|
3368
3379
|
var e;
|
|
3369
3380
|
return ((e = t.key.content) == null ? void 0 : e.type) === "alias";
|
|
3370
3381
|
}
|
|
3371
|
-
function
|
|
3382
|
+
function uo(t) {
|
|
3372
3383
|
if (!t) return true;
|
|
3373
3384
|
switch (t.type) {
|
|
3374
3385
|
case "plain":
|
|
@@ -3381,65 +3392,65 @@ function Zi(t) {
|
|
|
3381
3392
|
return false;
|
|
3382
3393
|
}
|
|
3383
3394
|
}
|
|
3384
|
-
var
|
|
3385
|
-
function
|
|
3386
|
-
return
|
|
3395
|
+
var Wr = lo;
|
|
3396
|
+
function po(t) {
|
|
3397
|
+
return Nn(t, mo);
|
|
3387
3398
|
}
|
|
3388
|
-
function
|
|
3399
|
+
function mo(t) {
|
|
3389
3400
|
switch (t.type) {
|
|
3390
3401
|
case "document":
|
|
3391
|
-
|
|
3402
|
+
Ye(t, "head", () => t.children[0]), Ye(t, "body", () => t.children[1]);
|
|
3392
3403
|
break;
|
|
3393
3404
|
case "documentBody":
|
|
3394
3405
|
case "sequenceItem":
|
|
3395
3406
|
case "flowSequenceItem":
|
|
3396
3407
|
case "mappingKey":
|
|
3397
3408
|
case "mappingValue":
|
|
3398
|
-
|
|
3409
|
+
Ye(t, "content", () => t.children[0]);
|
|
3399
3410
|
break;
|
|
3400
3411
|
case "mappingItem":
|
|
3401
3412
|
case "flowMappingItem":
|
|
3402
|
-
|
|
3413
|
+
Ye(t, "key", () => t.children[0]), Ye(t, "value", () => t.children[1]);
|
|
3403
3414
|
break;
|
|
3404
3415
|
}
|
|
3405
3416
|
return t;
|
|
3406
3417
|
}
|
|
3407
|
-
var
|
|
3408
|
-
function
|
|
3418
|
+
var Qr = po;
|
|
3419
|
+
function ho(t, e, n) {
|
|
3409
3420
|
let { node: r } = t, s = [];
|
|
3410
|
-
r.type !== "mappingValue" && ee(r) && s.push([
|
|
3421
|
+
r.type !== "mappingValue" && ee(r) && s.push([P(N, t.map(n, "leadingComments")), N]);
|
|
3411
3422
|
let { tag: i, anchor: o } = r;
|
|
3412
3423
|
i && s.push(n("tag")), i && o && s.push(" "), o && s.push(n("anchor"));
|
|
3413
3424
|
let a = "";
|
|
3414
|
-
return
|
|
3425
|
+
return K(r, ["mapping", "sequence", "comment", "directive", "mappingItem", "sequenceItem"]) && !Pt(t) && (a = vt(t, e.originalText)), (i || o) && (K(r, ["sequence", "mapping"]) && !ie(r) ? s.push(N) : s.push(" ")), ie(r) && s.push([r.middleComments.length === 1 ? "" : N, P(N, t.map(n, "middleComments")), N]), qr(t) ? s.push(Er(e.originalText.slice(r.position.start.offset, r.position.end.offset).trimEnd())) : s.push(Re(go(t, e, n))), V(r) && !K(r, ["document", "documentHead"]) && s.push(Nr([r.type === "mappingValue" && !r.content ? "" : " ", t.parent.type === "mappingKey" && t.getParentNode(2).type === "mapping" && ft(r) ? "" : Mt, n("trailingComment")])), Ln(r) && s.push(v(r.type === "sequenceItem" ? 2 : 0, [N, P(N, t.map(({ node: c }) => [Or(e.originalText, xe(c)) ? N : "", n()], "endComments"))])), s.push(a), s;
|
|
3415
3426
|
}
|
|
3416
|
-
function
|
|
3427
|
+
function go(t, e, n) {
|
|
3417
3428
|
let { node: r } = t;
|
|
3418
3429
|
switch (r.type) {
|
|
3419
3430
|
case "root": {
|
|
3420
3431
|
let s = [];
|
|
3421
3432
|
t.each(({ node: o, next: a, isFirst: c }) => {
|
|
3422
|
-
c || s.push(N), s.push(n()),
|
|
3433
|
+
c || s.push(N), s.push(n()), Gr(o, a) ? (s.push(N, "..."), V(o) && s.push(" ", n("trailingComment"))) : a && !V(a.head) && s.push(N, "---");
|
|
3423
3434
|
}, "children");
|
|
3424
|
-
let i =
|
|
3425
|
-
return (!
|
|
3435
|
+
let i = It(r);
|
|
3436
|
+
return (!K(i, ["blockLiteral", "blockFolded"]) || i.chomping !== "keep") && s.push(N), s;
|
|
3426
3437
|
}
|
|
3427
3438
|
case "document": {
|
|
3428
3439
|
let s = [];
|
|
3429
|
-
return
|
|
3440
|
+
return Eo(t, e) === "head" && ((r.head.children.length > 0 || r.head.endComments.length > 0) && s.push(n("head")), V(r.head) ? s.push(["---", " ", n(["head", "trailingComment"])]) : s.push("---")), yo(r) && s.push(n("body")), P(N, s);
|
|
3430
3441
|
}
|
|
3431
3442
|
case "documentHead":
|
|
3432
|
-
return
|
|
3443
|
+
return P(N, [...t.map(n, "children"), ...t.map(n, "endComments")]);
|
|
3433
3444
|
case "documentBody": {
|
|
3434
3445
|
let { children: s, endComments: i } = r, o = "";
|
|
3435
3446
|
if (s.length > 0 && i.length > 0) {
|
|
3436
|
-
let a =
|
|
3437
|
-
|
|
3447
|
+
let a = It(r);
|
|
3448
|
+
K(a, ["blockFolded", "blockLiteral"]) ? a.chomping !== "keep" && (o = [N, N]) : o = N;
|
|
3438
3449
|
}
|
|
3439
|
-
return [
|
|
3450
|
+
return [P(N, t.map(n, "children")), o, P(N, t.map(n, "endComments"))];
|
|
3440
3451
|
}
|
|
3441
3452
|
case "directive":
|
|
3442
|
-
return ["%",
|
|
3453
|
+
return ["%", P(" ", [r.name, ...r.parameters])];
|
|
3443
3454
|
case "comment":
|
|
3444
3455
|
return ["#", r.value];
|
|
3445
3456
|
case "alias":
|
|
@@ -3449,63 +3460,63 @@ function ro(t, e, n) {
|
|
|
3449
3460
|
case "anchor":
|
|
3450
3461
|
return ["&", r.value];
|
|
3451
3462
|
case "plain":
|
|
3452
|
-
return
|
|
3463
|
+
return ut(r.type, e.originalText.slice(r.position.start.offset, r.position.end.offset), e);
|
|
3453
3464
|
case "quoteDouble":
|
|
3454
3465
|
case "quoteSingle": {
|
|
3455
3466
|
let s = "'", i = '"', o = e.originalText.slice(r.position.start.offset + 1, r.position.end.offset - 1);
|
|
3456
3467
|
if (r.type === "quoteSingle" && o.includes("\\") || r.type === "quoteDouble" && /\\[^"]/u.test(o)) {
|
|
3457
3468
|
let c = r.type === "quoteDouble" ? i : s;
|
|
3458
|
-
return [c,
|
|
3469
|
+
return [c, ut(r.type, o, e), c];
|
|
3459
3470
|
}
|
|
3460
|
-
if (o.includes(i)) return [s,
|
|
3461
|
-
if (o.includes(s)) return [i,
|
|
3471
|
+
if (o.includes(i)) return [s, ut(r.type, r.type === "quoteDouble" ? At(false, At(false, o, String.raw`\"`, i), "'", s.repeat(2)) : o, e), s];
|
|
3472
|
+
if (o.includes(s)) return [i, ut(r.type, r.type === "quoteSingle" ? At(false, o, "''", s) : o, e), i];
|
|
3462
3473
|
let a = e.singleQuote ? s : i;
|
|
3463
|
-
return [a,
|
|
3474
|
+
return [a, ut(r.type, o, e), a];
|
|
3464
3475
|
}
|
|
3465
3476
|
case "blockFolded":
|
|
3466
3477
|
case "blockLiteral":
|
|
3467
|
-
return
|
|
3478
|
+
return jr(t, e, n);
|
|
3468
3479
|
case "mapping":
|
|
3469
3480
|
case "sequence":
|
|
3470
|
-
return
|
|
3481
|
+
return P(N, t.map(n, "children"));
|
|
3471
3482
|
case "sequenceItem":
|
|
3472
|
-
return ["- ",
|
|
3483
|
+
return ["- ", v(2, r.content ? n("content") : "")];
|
|
3473
3484
|
case "mappingKey":
|
|
3474
3485
|
case "mappingValue":
|
|
3475
3486
|
return r.content ? n("content") : "";
|
|
3476
3487
|
case "mappingItem":
|
|
3477
3488
|
case "flowMappingItem":
|
|
3478
|
-
return
|
|
3489
|
+
return Wr(t, e, n);
|
|
3479
3490
|
case "flowMapping":
|
|
3480
|
-
return
|
|
3491
|
+
return _t(t, e, n);
|
|
3481
3492
|
case "flowSequence":
|
|
3482
|
-
return
|
|
3493
|
+
return _t(t, e, n);
|
|
3483
3494
|
case "flowSequenceItem":
|
|
3484
3495
|
return n("content");
|
|
3485
3496
|
default:
|
|
3486
|
-
throw new
|
|
3497
|
+
throw new Ar(r, "YAML");
|
|
3487
3498
|
}
|
|
3488
3499
|
}
|
|
3489
|
-
function
|
|
3490
|
-
return t.body.children.length > 0 ||
|
|
3500
|
+
function yo(t) {
|
|
3501
|
+
return t.body.children.length > 0 || I(t.body);
|
|
3491
3502
|
}
|
|
3492
|
-
function
|
|
3493
|
-
return
|
|
3503
|
+
function Gr(t, e) {
|
|
3504
|
+
return V(t) || e && (e.head.children.length > 0 || I(e.head));
|
|
3494
3505
|
}
|
|
3495
|
-
function
|
|
3506
|
+
function Eo(t, e) {
|
|
3496
3507
|
let n = t.node;
|
|
3497
|
-
if (t.isFirst && /---(?:\s|$)/u.test(e.originalText.slice(
|
|
3508
|
+
if (t.isFirst && /---(?:\s|$)/u.test(e.originalText.slice(xe(n), xe(n) + 4)) || n.head.children.length > 0 || I(n.head) || V(n.head)) return "head";
|
|
3498
3509
|
let r = t.next;
|
|
3499
|
-
return
|
|
3510
|
+
return Gr(n, r) ? false : r ? "root" : false;
|
|
3500
3511
|
}
|
|
3501
|
-
function
|
|
3502
|
-
let r =
|
|
3503
|
-
return
|
|
3512
|
+
function ut(t, e, n) {
|
|
3513
|
+
let r = Kr(t, e, n);
|
|
3514
|
+
return P(N, r.map((s) => Tt(P(ne, s))));
|
|
3504
3515
|
}
|
|
3505
|
-
function
|
|
3506
|
-
if (
|
|
3516
|
+
function Hr(t, e) {
|
|
3517
|
+
if (K(t)) switch (t.type) {
|
|
3507
3518
|
case "comment":
|
|
3508
|
-
if (
|
|
3519
|
+
if (xr(t.value)) return null;
|
|
3509
3520
|
break;
|
|
3510
3521
|
case "quoteDouble":
|
|
3511
3522
|
case "quoteSingle":
|
|
@@ -3513,63 +3524,35 @@ function Ir(t, e) {
|
|
|
3513
3524
|
break;
|
|
3514
3525
|
}
|
|
3515
3526
|
}
|
|
3516
|
-
|
|
3517
|
-
var
|
|
3518
|
-
var
|
|
3519
|
-
var
|
|
3520
|
-
var
|
|
3521
|
-
var
|
|
3522
|
-
|
|
3523
|
-
var
|
|
3524
|
-
|
|
3525
|
-
|
|
3526
|
-
|
|
3527
|
-
|
|
3528
|
-
|
|
3529
|
-
r += Mt.length, n.push(r);
|
|
3530
|
-
break;
|
|
3531
|
-
case Rr:
|
|
3532
|
-
r += Rr.length, e[r] === Mt && (r += Mt.length), n.push(r);
|
|
3533
|
-
break;
|
|
3534
|
-
default:
|
|
3535
|
-
r++;
|
|
3536
|
-
break;
|
|
3537
|
-
}
|
|
3538
|
-
this.offsets = n;
|
|
3539
|
-
}
|
|
3540
|
-
return t.prototype.locationForIndex = function(e) {
|
|
3541
|
-
if (e < 0 || e > this.length) return null;
|
|
3542
|
-
for (var n = 0, r = this.offsets; r[n + 1] <= e; ) n++;
|
|
3543
|
-
var s = e - r[n];
|
|
3544
|
-
return { line: n, column: s };
|
|
3545
|
-
}, t.prototype.indexForLocation = function(e) {
|
|
3546
|
-
var n = e.line, r = e.column;
|
|
3547
|
-
return n < 0 || n >= this.offsets.length || r < 0 || r > this.lengthOfLine(n) ? null : this.offsets[n] + r;
|
|
3548
|
-
}, t.prototype.lengthOfLine = function(e) {
|
|
3549
|
-
var n = this.offsets[e], r = e === this.offsets.length - 1 ? this.length : this.offsets[e + 1];
|
|
3550
|
-
return r - n;
|
|
3551
|
-
}, t;
|
|
3552
|
-
})();
|
|
3553
|
-
function $(t, e = null) {
|
|
3554
|
-
"children" in t && t.children.forEach((n) => $(n, t)), "anchor" in t && t.anchor && $(t.anchor, t), "tag" in t && t.tag && $(t.tag, t), "leadingComments" in t && t.leadingComments.forEach((n) => $(n, t)), "middleComments" in t && t.middleComments.forEach((n) => $(n, t)), "indicatorComment" in t && t.indicatorComment && $(t.indicatorComment, t), "trailingComment" in t && t.trailingComment && $(t.trailingComment, t), "endComments" in t && t.endComments.forEach((n) => $(n, t)), Object.defineProperty(t, "_parent", { value: e, enumerable: false });
|
|
3555
|
-
}
|
|
3556
|
-
function de(t) {
|
|
3527
|
+
Hr.ignoredProperties = /* @__PURE__ */ new Set(["position"]);
|
|
3528
|
+
var So = { preprocess: Qr, embed: Tr, print: ho, massageAstNode: Hr, insertPragma: $r, getVisitorKeys: kr }, Jr = So;
|
|
3529
|
+
var Xr = [{ name: "YAML", type: "data", extensions: [".yml", ".mir", ".reek", ".rviz", ".sublime-syntax", ".syntax", ".yaml", ".yaml-tmlanguage", ".yaml.sed", ".yml.mysql"], tmScope: "source.yaml", aceMode: "yaml", aliases: ["yml"], codemirrorMode: "yaml", codemirrorMimeType: "text/x-yaml", filenames: [".clang-format", ".clang-tidy", ".clangd", ".gemrc", "CITATION.cff", "glide.lock", "pixi.lock", ".prettierrc", ".stylelintrc", ".lintstagedrc"], parsers: ["yaml"], vscodeLanguageIds: ["yaml", "ansible", "dockercompose", "github-actions-workflow", "home-assistant"], linguistLanguageId: 407 }];
|
|
3530
|
+
var Rt = { bracketSpacing: { category: "Common", type: "boolean", default: true, description: "Print spaces between brackets.", oppositeDescription: "Do not print spaces between brackets." }, singleQuote: { category: "Common", type: "boolean", default: false, description: "Use single quotes instead of double quotes." }, proseWrap: { category: "Common", type: "choice", default: "preserve", description: "How to wrap prose.", choices: [{ value: "always", description: "Wrap prose if it exceeds the print width." }, { value: "never", description: "Do not wrap prose." }, { value: "preserve", description: "Wrap prose as-is." }] }};
|
|
3531
|
+
var wo = { bracketSpacing: Rt.bracketSpacing, singleQuote: Rt.singleQuote, proseWrap: Rt.proseWrap }, zr = wo;
|
|
3532
|
+
var hr = {};
|
|
3533
|
+
yr(hr, { yaml: () => nc });
|
|
3534
|
+
var mr = cn(tr());
|
|
3535
|
+
var H = cn(Bs()); H.default.findPair; H.default.toJSON; H.default.parseMap; H.default.parseSeq; H.default.stringifyNumber; H.default.stringifyString; H.default.Type; H.default.YAMLError; H.default.YAMLReferenceError; var Fs = H.default.YAMLSemanticError; H.default.YAMLSyntaxError; H.default.YAMLWarning;
|
|
3536
|
+
function B(t, e = null) {
|
|
3537
|
+
"children" in t && t.children.forEach((n) => B(n, t)), "anchor" in t && t.anchor && B(t.anchor, t), "tag" in t && t.tag && B(t.tag, t), "leadingComments" in t && t.leadingComments.forEach((n) => B(n, t)), "middleComments" in t && t.middleComments.forEach((n) => B(n, t)), "indicatorComment" in t && t.indicatorComment && B(t.indicatorComment, t), "trailingComment" in t && t.trailingComment && B(t.trailingComment, t), "endComments" in t && t.endComments.forEach((n) => B(n, t)), Object.defineProperty(t, "_parent", { value: e, enumerable: false });
|
|
3538
|
+
}
|
|
3539
|
+
function Ae(t) {
|
|
3557
3540
|
return `${t.line}:${t.column}`;
|
|
3558
3541
|
}
|
|
3559
|
-
function
|
|
3560
|
-
|
|
3561
|
-
let e =
|
|
3542
|
+
function qs(t) {
|
|
3543
|
+
B(t);
|
|
3544
|
+
let e = Fa(t), n = t.children.slice();
|
|
3562
3545
|
t.comments.sort((r, s) => r.position.start.offset - s.position.end.offset).filter((r) => !r._parent).forEach((r) => {
|
|
3563
3546
|
for (; n.length > 1 && r.position.start.line > n[0].position.end.line; ) n.shift();
|
|
3564
|
-
|
|
3547
|
+
qa(r, e, n[0]);
|
|
3565
3548
|
});
|
|
3566
3549
|
}
|
|
3567
|
-
function
|
|
3550
|
+
function Fa(t) {
|
|
3568
3551
|
let e = Array.from(new Array(t.position.end.line), () => ({}));
|
|
3569
3552
|
for (let n of t.comments) e[n.position.start.line - 1].comment = n;
|
|
3570
|
-
return
|
|
3553
|
+
return Us(e, t), e;
|
|
3571
3554
|
}
|
|
3572
|
-
function
|
|
3555
|
+
function Us(t, e) {
|
|
3573
3556
|
if (e.position.start.offset !== e.position.end.offset) {
|
|
3574
3557
|
if ("leadingComments" in e) {
|
|
3575
3558
|
let { start: n } = e.position, { leadingAttachableNode: r } = t[n.line - 1];
|
|
@@ -3587,15 +3570,15 @@ function $r(t, e) {
|
|
|
3587
3570
|
}
|
|
3588
3571
|
}
|
|
3589
3572
|
"children" in e && e.children.forEach((n) => {
|
|
3590
|
-
|
|
3573
|
+
Us(t, n);
|
|
3591
3574
|
});
|
|
3592
3575
|
}
|
|
3593
3576
|
}
|
|
3594
|
-
function
|
|
3577
|
+
function qa(t, e, n) {
|
|
3595
3578
|
let r = t.position.start.line, { trailingAttachableNode: s } = e[r - 1];
|
|
3596
3579
|
if (s) {
|
|
3597
|
-
if (s.trailingComment) throw new Error(`Unexpected multiple trailing comment at ${
|
|
3598
|
-
|
|
3580
|
+
if (s.trailingComment) throw new Error(`Unexpected multiple trailing comment at ${Ae(t.position.start)}`);
|
|
3581
|
+
B(t, s), s.trailingComment = t;
|
|
3599
3582
|
return;
|
|
3600
3583
|
}
|
|
3601
3584
|
for (let o = r; o >= n.position.start.line; o--) {
|
|
@@ -3605,11 +3588,11 @@ function lo(t, e, n) {
|
|
|
3605
3588
|
else continue;
|
|
3606
3589
|
if ((c.type === "sequence" || c.type === "mapping") && (c = c.children[0]), c.type === "mappingItem") {
|
|
3607
3590
|
let [l, f] = c.children;
|
|
3608
|
-
c =
|
|
3591
|
+
c = Ks(l) ? l : f;
|
|
3609
3592
|
}
|
|
3610
3593
|
for (; ; ) {
|
|
3611
|
-
if (
|
|
3612
|
-
|
|
3594
|
+
if (Ua(c, t)) {
|
|
3595
|
+
B(t, c), c.endComments.push(t);
|
|
3613
3596
|
return;
|
|
3614
3597
|
}
|
|
3615
3598
|
if (!c._parent) break;
|
|
@@ -3620,14 +3603,14 @@ function lo(t, e, n) {
|
|
|
3620
3603
|
for (let o = r + 1; o <= n.position.end.line; o++) {
|
|
3621
3604
|
let { leadingAttachableNode: a } = e[o - 1];
|
|
3622
3605
|
if (a) {
|
|
3623
|
-
|
|
3606
|
+
B(t, a), a.leadingComments.push(t);
|
|
3624
3607
|
return;
|
|
3625
3608
|
}
|
|
3626
3609
|
}
|
|
3627
3610
|
let i = n.children[1];
|
|
3628
|
-
|
|
3611
|
+
B(t, i), i.endComments.push(t);
|
|
3629
3612
|
}
|
|
3630
|
-
function
|
|
3613
|
+
function Ua(t, e) {
|
|
3631
3614
|
if (t.position.start.offset < e.position.start.offset && t.position.end.offset > e.position.end.offset) switch (t.type) {
|
|
3632
3615
|
case "flowMapping":
|
|
3633
3616
|
case "flowSequence":
|
|
@@ -3639,24 +3622,24 @@ function fo(t, e) {
|
|
|
3639
3622
|
return e.position.start.column > t.position.start.column;
|
|
3640
3623
|
case "mappingKey":
|
|
3641
3624
|
case "mappingValue":
|
|
3642
|
-
return e.position.start.column > t._parent.position.start.column && (t.children.length === 0 || t.children.length === 1 && t.children[0].type !== "blockFolded" && t.children[0].type !== "blockLiteral") && (t.type === "mappingValue" ||
|
|
3625
|
+
return e.position.start.column > t._parent.position.start.column && (t.children.length === 0 || t.children.length === 1 && t.children[0].type !== "blockFolded" && t.children[0].type !== "blockLiteral") && (t.type === "mappingValue" || Ks(t));
|
|
3643
3626
|
default:
|
|
3644
3627
|
return false;
|
|
3645
3628
|
}
|
|
3646
3629
|
}
|
|
3647
|
-
function
|
|
3630
|
+
function Ks(t) {
|
|
3648
3631
|
return t.position.start !== t.position.end && (t.children.length === 0 || t.position.start.offset !== t.children[0].position.start.offset);
|
|
3649
3632
|
}
|
|
3650
3633
|
function b(t, e) {
|
|
3651
3634
|
return { type: t, position: e };
|
|
3652
3635
|
}
|
|
3653
|
-
function
|
|
3636
|
+
function Vs(t, e, n) {
|
|
3654
3637
|
return { ...b("root", t), children: e, comments: n };
|
|
3655
3638
|
}
|
|
3656
|
-
function
|
|
3639
|
+
function wt(t) {
|
|
3657
3640
|
switch (t.type) {
|
|
3658
3641
|
case "DOCUMENT":
|
|
3659
|
-
for (let e = t.contents.length - 1; e >= 0; e--) t.contents[e].type === "BLANK_LINE" ? t.contents.splice(e, 1) :
|
|
3642
|
+
for (let e = t.contents.length - 1; e >= 0; e--) t.contents[e].type === "BLANK_LINE" ? t.contents.splice(e, 1) : wt(t.contents[e]);
|
|
3660
3643
|
for (let e = t.directives.length - 1; e >= 0; e--) t.directives[e].type === "BLANK_LINE" && t.directives.splice(e, 1);
|
|
3661
3644
|
break;
|
|
3662
3645
|
case "FLOW_MAP":
|
|
@@ -3665,13 +3648,13 @@ function ct(t) {
|
|
|
3665
3648
|
case "SEQ":
|
|
3666
3649
|
for (let e = t.items.length - 1; e >= 0; e--) {
|
|
3667
3650
|
let n = t.items[e];
|
|
3668
|
-
"char" in n || (n.type === "BLANK_LINE" ? t.items.splice(e, 1) :
|
|
3651
|
+
"char" in n || (n.type === "BLANK_LINE" ? t.items.splice(e, 1) : wt(n));
|
|
3669
3652
|
}
|
|
3670
3653
|
break;
|
|
3671
3654
|
case "MAP_KEY":
|
|
3672
3655
|
case "MAP_VALUE":
|
|
3673
3656
|
case "SEQ_ITEM":
|
|
3674
|
-
t.node &&
|
|
3657
|
+
t.node && wt(t.node);
|
|
3675
3658
|
break;
|
|
3676
3659
|
case "ALIAS":
|
|
3677
3660
|
case "BLANK_LINE":
|
|
@@ -3687,57 +3670,41 @@ function ct(t) {
|
|
|
3687
3670
|
throw new Error(`Unexpected node type ${JSON.stringify(t.type)}`);
|
|
3688
3671
|
}
|
|
3689
3672
|
}
|
|
3690
|
-
function
|
|
3691
|
-
return {
|
|
3692
|
-
}
|
|
3693
|
-
function oe(t = null) {
|
|
3694
|
-
return { trailingComment: t };
|
|
3695
|
-
}
|
|
3696
|
-
function B() {
|
|
3697
|
-
return { ...X(), ...oe() };
|
|
3698
|
-
}
|
|
3699
|
-
function qr(t, e, n) {
|
|
3700
|
-
return { ...b("alias", t), ...B(), ...e, value: n };
|
|
3701
|
-
}
|
|
3702
|
-
function Ur(t, e) {
|
|
3703
|
-
let n = t.cstNode;
|
|
3704
|
-
return qr(e.transformRange({ origStart: n.valueRange.origStart - 1, origEnd: n.valueRange.origEnd }), e.transformContent(t), n.rawValue);
|
|
3705
|
-
}
|
|
3706
|
-
function Kr(t) {
|
|
3707
|
-
return { ...t, type: "blockFolded" };
|
|
3673
|
+
function J(t, e) {
|
|
3674
|
+
return { start: t, end: e };
|
|
3708
3675
|
}
|
|
3709
|
-
function
|
|
3710
|
-
return {
|
|
3676
|
+
function nr(t) {
|
|
3677
|
+
return { start: t, end: t };
|
|
3711
3678
|
}
|
|
3712
|
-
var
|
|
3679
|
+
var ue;
|
|
3713
3680
|
(function(t) {
|
|
3714
3681
|
t.Tag = "!", t.Anchor = "&", t.Comment = "#";
|
|
3715
|
-
})(
|
|
3716
|
-
function
|
|
3682
|
+
})(ue || (ue = {}));
|
|
3683
|
+
function js(t, e) {
|
|
3717
3684
|
return { ...b("anchor", t), value: e };
|
|
3718
3685
|
}
|
|
3719
|
-
function
|
|
3686
|
+
function Ge(t, e) {
|
|
3720
3687
|
return { ...b("comment", t), value: e };
|
|
3721
3688
|
}
|
|
3722
|
-
function
|
|
3689
|
+
function Ws(t, e, n) {
|
|
3723
3690
|
return { anchor: e, tag: t, middleComments: n };
|
|
3724
3691
|
}
|
|
3725
|
-
function
|
|
3692
|
+
function Qs(t, e) {
|
|
3726
3693
|
return { ...b("tag", t), value: e };
|
|
3727
3694
|
}
|
|
3728
|
-
function
|
|
3695
|
+
function zt(t, e, n = () => false) {
|
|
3729
3696
|
let r = t.cstNode, s = [], i = null, o = null, a = null;
|
|
3730
3697
|
for (let c of r.props) {
|
|
3731
3698
|
let l = e.text[c.origStart];
|
|
3732
3699
|
switch (l) {
|
|
3733
|
-
case
|
|
3734
|
-
i = i || c, o =
|
|
3700
|
+
case ue.Tag:
|
|
3701
|
+
i = i || c, o = Qs(e.transformRange(c), t.tag);
|
|
3735
3702
|
break;
|
|
3736
|
-
case
|
|
3737
|
-
i = i || c, a =
|
|
3703
|
+
case ue.Anchor:
|
|
3704
|
+
i = i || c, a = js(e.transformRange(c), r.anchor);
|
|
3738
3705
|
break;
|
|
3739
|
-
case
|
|
3740
|
-
let f =
|
|
3706
|
+
case ue.Comment: {
|
|
3707
|
+
let f = Ge(e.transformRange(c), e.text.slice(c.origStart + 1, c.origEnd));
|
|
3741
3708
|
e.comments.push(f), !n(f) && i && i.origEnd <= c.origStart && c.origEnd <= r.valueRange.origStart && s.push(f);
|
|
3742
3709
|
break;
|
|
3743
3710
|
}
|
|
@@ -3745,77 +3712,93 @@ function kt(t, e, n = () => false) {
|
|
|
3745
3712
|
throw new Error(`Unexpected leading character ${JSON.stringify(l)}`);
|
|
3746
3713
|
}
|
|
3747
3714
|
}
|
|
3748
|
-
return
|
|
3715
|
+
return Ws(o, a, s);
|
|
3716
|
+
}
|
|
3717
|
+
function X() {
|
|
3718
|
+
return { leadingComments: [] };
|
|
3719
|
+
}
|
|
3720
|
+
function pe(t = null) {
|
|
3721
|
+
return { trailingComment: t };
|
|
3722
|
+
}
|
|
3723
|
+
function F() {
|
|
3724
|
+
return { ...X(), ...pe() };
|
|
3749
3725
|
}
|
|
3750
|
-
|
|
3726
|
+
function Gs(t, e, n) {
|
|
3727
|
+
return { ...b("alias", t), ...F(), ...e, value: n };
|
|
3728
|
+
}
|
|
3729
|
+
function Hs(t, e) {
|
|
3730
|
+
let n = t.cstNode;
|
|
3731
|
+
return Gs(e.transformRange({ origStart: n.valueRange.origStart - 1, origEnd: n.valueRange.origEnd }), e.transformContent(t), n.rawValue);
|
|
3732
|
+
}
|
|
3733
|
+
function Js(t) {
|
|
3734
|
+
return { ...t, type: "blockFolded" };
|
|
3735
|
+
}
|
|
3736
|
+
function Xs(t, e, n, r, s, i) {
|
|
3737
|
+
return { ...b("blockValue", t), ...X(), ...e, chomping: n, indent: r, value: s, indicatorComment: i };
|
|
3738
|
+
}
|
|
3739
|
+
var rr;
|
|
3751
3740
|
(function(t) {
|
|
3752
3741
|
t.CLIP = "clip", t.STRIP = "strip", t.KEEP = "keep";
|
|
3753
|
-
})(
|
|
3754
|
-
function
|
|
3755
|
-
let n = t.cstNode, r = 1, s = n.chomping === "CLIP" ? 0 : 1, o = n.header.origEnd - n.header.origStart - r - s !== 0, a = e.transformRange({ origStart: n.header.origStart, origEnd: n.valueRange.origEnd }), c = null, l =
|
|
3742
|
+
})(rr || (rr = {}));
|
|
3743
|
+
function Zt(t, e) {
|
|
3744
|
+
let n = t.cstNode, r = 1, s = n.chomping === "CLIP" ? 0 : 1, o = n.header.origEnd - n.header.origStart - r - s !== 0, a = e.transformRange({ origStart: n.header.origStart, origEnd: n.valueRange.origEnd }), c = null, l = zt(t, e, (f) => {
|
|
3756
3745
|
if (!(a.start.offset < f.position.start.offset && f.position.end.offset < a.end.offset)) return false;
|
|
3757
|
-
if (c) throw new Error(`Unexpected multiple indicator comments at ${
|
|
3746
|
+
if (c) throw new Error(`Unexpected multiple indicator comments at ${Ae(f.position.start)}`);
|
|
3758
3747
|
return c = f, true;
|
|
3759
3748
|
});
|
|
3760
|
-
return
|
|
3749
|
+
return Xs(a, l, rr[n.chomping], o ? n.blockIndent : null, n.strValue, c);
|
|
3761
3750
|
}
|
|
3762
|
-
function
|
|
3763
|
-
return
|
|
3751
|
+
function zs(t, e) {
|
|
3752
|
+
return Js(Zt(t, e));
|
|
3764
3753
|
}
|
|
3765
|
-
function
|
|
3754
|
+
function Zs(t) {
|
|
3766
3755
|
return { ...t, type: "blockLiteral" };
|
|
3767
3756
|
}
|
|
3768
|
-
function
|
|
3769
|
-
return
|
|
3757
|
+
function ei(t, e) {
|
|
3758
|
+
return Zs(Zt(t, e));
|
|
3770
3759
|
}
|
|
3771
|
-
function
|
|
3772
|
-
return
|
|
3760
|
+
function ti(t, e) {
|
|
3761
|
+
return Ge(e.transformRange(t.range), t.comment);
|
|
3773
3762
|
}
|
|
3774
|
-
function
|
|
3775
|
-
return { ...b("directive", t), ...
|
|
3763
|
+
function ni(t, e, n) {
|
|
3764
|
+
return { ...b("directive", t), ...F(), name: e, parameters: n };
|
|
3776
3765
|
}
|
|
3777
|
-
function
|
|
3766
|
+
function He(t, e) {
|
|
3778
3767
|
for (let n of t.props) {
|
|
3779
3768
|
let r = e.text[n.origStart];
|
|
3780
3769
|
switch (r) {
|
|
3781
|
-
case
|
|
3782
|
-
e.comments.push(
|
|
3770
|
+
case ue.Comment:
|
|
3771
|
+
e.comments.push(Ge(e.transformRange(n), e.text.slice(n.origStart + 1, n.origEnd)));
|
|
3783
3772
|
break;
|
|
3784
3773
|
default:
|
|
3785
3774
|
throw new Error(`Unexpected leading character ${JSON.stringify(r)}`);
|
|
3786
3775
|
}
|
|
3787
3776
|
}
|
|
3788
3777
|
}
|
|
3789
|
-
function
|
|
3790
|
-
return
|
|
3791
|
-
}
|
|
3792
|
-
function es(t, e, n, r) {
|
|
3793
|
-
return { ...b("document", t), ...oe(r), children: [e, n] };
|
|
3794
|
-
}
|
|
3795
|
-
function V(t, e) {
|
|
3796
|
-
return { start: t, end: e };
|
|
3778
|
+
function ri(t, e) {
|
|
3779
|
+
return He(t, e), ni(e.transformRange(t.range), t.name, t.parameters);
|
|
3797
3780
|
}
|
|
3798
|
-
function
|
|
3799
|
-
return {
|
|
3781
|
+
function si(t, e, n, r) {
|
|
3782
|
+
return { ...b("document", t), ...pe(r), children: [e, n] };
|
|
3800
3783
|
}
|
|
3801
|
-
function
|
|
3784
|
+
function q(t = []) {
|
|
3802
3785
|
return { endComments: t };
|
|
3803
3786
|
}
|
|
3804
|
-
function
|
|
3805
|
-
return { ...b("documentBody", t), ...
|
|
3787
|
+
function ii(t, e, n) {
|
|
3788
|
+
return { ...b("documentBody", t), ...q(n), children: e ? [e] : [] };
|
|
3806
3789
|
}
|
|
3807
|
-
function
|
|
3790
|
+
function U(t) {
|
|
3808
3791
|
return t[t.length - 1];
|
|
3809
3792
|
}
|
|
3810
|
-
function
|
|
3793
|
+
function en(t, e) {
|
|
3811
3794
|
let n = t.match(e);
|
|
3812
3795
|
return n ? n.index : -1;
|
|
3813
3796
|
}
|
|
3814
|
-
function
|
|
3815
|
-
let r = t.cstNode, { comments: s, endComments: i, documentTrailingComment: o, documentHeadTrailingComment: a } =
|
|
3816
|
-
return e.comments.push(...s, ...i), { documentBody:
|
|
3797
|
+
function oi(t, e, n) {
|
|
3798
|
+
let r = t.cstNode, { comments: s, endComments: i, documentTrailingComment: o, documentHeadTrailingComment: a } = Ka(r, e, n), c = e.transformNode(t.contents), { position: l, documentEndPoint: f } = Va(r, c, e);
|
|
3799
|
+
return e.comments.push(...s, ...i), { documentBody: ii(l, c, i), documentEndPoint: f, documentTrailingComment: o, documentHeadTrailingComment: a };
|
|
3817
3800
|
}
|
|
3818
|
-
function
|
|
3801
|
+
function Ka(t, e, n) {
|
|
3819
3802
|
let r = [], s = [], i = [], o = [], a = false;
|
|
3820
3803
|
for (let c = t.contents.length - 1; c >= 0; c--) {
|
|
3821
3804
|
let l = t.contents[c];
|
|
@@ -3824,24 +3807,24 @@ function uo(t, e, n) {
|
|
|
3824
3807
|
n && n.line === f.position.start.line ? o.unshift(f) : a ? r.unshift(f) : f.position.start.offset >= t.valueRange.origEnd ? i.unshift(f) : r.unshift(f);
|
|
3825
3808
|
} else a = true;
|
|
3826
3809
|
}
|
|
3827
|
-
if (i.length > 1) throw new Error(`Unexpected multiple document trailing comments at ${
|
|
3828
|
-
if (o.length > 1) throw new Error(`Unexpected multiple documentHead trailing comments at ${
|
|
3829
|
-
return { comments: r, endComments: s, documentTrailingComment:
|
|
3810
|
+
if (i.length > 1) throw new Error(`Unexpected multiple document trailing comments at ${Ae(i[1].position.start)}`);
|
|
3811
|
+
if (o.length > 1) throw new Error(`Unexpected multiple documentHead trailing comments at ${Ae(o[1].position.start)}`);
|
|
3812
|
+
return { comments: r, endComments: s, documentTrailingComment: U(i) || null, documentHeadTrailingComment: U(o) || null };
|
|
3830
3813
|
}
|
|
3831
|
-
function
|
|
3832
|
-
let r =
|
|
3814
|
+
function Va(t, e, n) {
|
|
3815
|
+
let r = en(n.text.slice(t.valueRange.origEnd), /^\.\.\./), s = r === -1 ? t.valueRange.origEnd : Math.max(0, t.valueRange.origEnd - 1);
|
|
3833
3816
|
n.text[s - 1] === "\r" && s--;
|
|
3834
3817
|
let i = n.transformRange({ origStart: e !== null ? e.position.start.offset : s, origEnd: s }), o = r === -1 ? i.end : n.transformOffset(t.valueRange.origEnd + 3);
|
|
3835
3818
|
return { position: i, documentEndPoint: o };
|
|
3836
3819
|
}
|
|
3837
|
-
function
|
|
3838
|
-
return { ...b("documentHead", t), ...
|
|
3820
|
+
function ai(t, e, n, r) {
|
|
3821
|
+
return { ...b("documentHead", t), ...q(n), ...pe(r), children: e };
|
|
3839
3822
|
}
|
|
3840
|
-
function
|
|
3841
|
-
let n = t.cstNode, { directives: r, comments: s, endComments: i } =
|
|
3842
|
-
return e.comments.push(...s, ...i), { createDocumentHeadWithTrailingComment: (l) => (l && e.comments.push(l),
|
|
3823
|
+
function ci(t, e) {
|
|
3824
|
+
let n = t.cstNode, { directives: r, comments: s, endComments: i } = ja(n, e), { position: o, endMarkerPoint: a } = Wa(n, r, e);
|
|
3825
|
+
return e.comments.push(...s, ...i), { createDocumentHeadWithTrailingComment: (l) => (l && e.comments.push(l), ai(o, r, i, l)), documentHeadEndMarkerPoint: a };
|
|
3843
3826
|
}
|
|
3844
|
-
function
|
|
3827
|
+
function ja(t, e) {
|
|
3845
3828
|
let n = [], r = [], s = [], i = false;
|
|
3846
3829
|
for (let o = t.directives.length - 1; o >= 0; o--) {
|
|
3847
3830
|
let a = e.transformNode(t.directives[o]);
|
|
@@ -3849,43 +3832,43 @@ function mo(t, e) {
|
|
|
3849
3832
|
}
|
|
3850
3833
|
return { directives: n, comments: r, endComments: s };
|
|
3851
3834
|
}
|
|
3852
|
-
function
|
|
3853
|
-
let r =
|
|
3835
|
+
function Wa(t, e, n) {
|
|
3836
|
+
let r = en(n.text.slice(0, t.valueRange.origStart), /---\s*$/);
|
|
3854
3837
|
r > 0 && !/[\r\n]/.test(n.text[r - 1]) && (r = -1);
|
|
3855
3838
|
let s = r === -1 ? { origStart: t.valueRange.origStart, origEnd: t.valueRange.origStart } : { origStart: r, origEnd: r + 3 };
|
|
3856
3839
|
return e.length !== 0 && (s.origStart = e[0].position.start.offset), { position: n.transformRange(s), endMarkerPoint: r === -1 ? null : n.transformOffset(r) };
|
|
3857
3840
|
}
|
|
3858
|
-
function
|
|
3859
|
-
let { createDocumentHeadWithTrailingComment: n, documentHeadEndMarkerPoint: r } =
|
|
3860
|
-
return o && e.comments.push(o),
|
|
3841
|
+
function li(t, e) {
|
|
3842
|
+
let { createDocumentHeadWithTrailingComment: n, documentHeadEndMarkerPoint: r } = ci(t, e), { documentBody: s, documentEndPoint: i, documentTrailingComment: o, documentHeadTrailingComment: a } = oi(t, e, r), c = n(a);
|
|
3843
|
+
return o && e.comments.push(o), si(J(c.position.start, i), c, s, o);
|
|
3861
3844
|
}
|
|
3862
|
-
function
|
|
3863
|
-
return { ...b("flowCollection", t), ...
|
|
3845
|
+
function tn(t, e, n) {
|
|
3846
|
+
return { ...b("flowCollection", t), ...F(), ...q(), ...e, children: n };
|
|
3864
3847
|
}
|
|
3865
|
-
function
|
|
3866
|
-
return { ...
|
|
3848
|
+
function fi(t, e, n) {
|
|
3849
|
+
return { ...tn(t, e, n), type: "flowMapping" };
|
|
3867
3850
|
}
|
|
3868
|
-
function
|
|
3851
|
+
function nn(t, e, n) {
|
|
3869
3852
|
return { ...b("flowMappingItem", t), ...X(), children: [e, n] };
|
|
3870
3853
|
}
|
|
3871
|
-
function
|
|
3854
|
+
function me(t, e) {
|
|
3872
3855
|
let n = [];
|
|
3873
3856
|
for (let r of t) r && "type" in r && r.type === "COMMENT" ? e.comments.push(e.transformNode(r)) : n.push(r);
|
|
3874
3857
|
return n;
|
|
3875
3858
|
}
|
|
3876
|
-
function
|
|
3859
|
+
function rn(t) {
|
|
3877
3860
|
let [e, n] = ["?", ":"].map((r) => {
|
|
3878
3861
|
let s = t.find((i) => "char" in i && i.char === r);
|
|
3879
3862
|
return s ? { origStart: s.origOffset, origEnd: s.origOffset + 1 } : null;
|
|
3880
3863
|
});
|
|
3881
3864
|
return { additionalKeyRange: e, additionalValueRange: n };
|
|
3882
3865
|
}
|
|
3883
|
-
function
|
|
3866
|
+
function sn(t, e) {
|
|
3884
3867
|
let n = e;
|
|
3885
3868
|
return (r) => t.slice(n, n = r);
|
|
3886
3869
|
}
|
|
3887
|
-
function
|
|
3888
|
-
let e = [], n =
|
|
3870
|
+
function on(t) {
|
|
3871
|
+
let e = [], n = sn(t, 1), r = false;
|
|
3889
3872
|
for (let s = 1; s < t.length - 1; s++) {
|
|
3890
3873
|
let i = t[s];
|
|
3891
3874
|
if ("char" in i && i.char === ",") {
|
|
@@ -3896,58 +3879,58 @@ function Dt(t) {
|
|
|
3896
3879
|
}
|
|
3897
3880
|
return r && e.push(n(t.length - 1)), e;
|
|
3898
3881
|
}
|
|
3899
|
-
function
|
|
3900
|
-
return { ...b("mappingKey", t), ...
|
|
3882
|
+
function sr(t, e) {
|
|
3883
|
+
return { ...b("mappingKey", t), ...pe(), ...q(), children: e ? [e] : [] };
|
|
3901
3884
|
}
|
|
3902
|
-
function
|
|
3903
|
-
return { ...b("mappingValue", t), ...
|
|
3885
|
+
function ir(t, e) {
|
|
3886
|
+
return { ...b("mappingValue", t), ...F(), ...q(), children: e ? [e] : [] };
|
|
3904
3887
|
}
|
|
3905
|
-
function
|
|
3906
|
-
let i = e.transformNode(t.key), o = e.transformNode(t.value), a = i || r ?
|
|
3907
|
-
return n(
|
|
3888
|
+
function Je(t, e, n, r, s) {
|
|
3889
|
+
let i = e.transformNode(t.key), o = e.transformNode(t.value), a = i || r ? sr(e.transformRange({ origStart: r ? r.origStart : i.position.start.offset, origEnd: i ? i.position.end.offset : r.origStart + 1 }), i) : null, c = o || s ? ir(e.transformRange({ origStart: s ? s.origStart : o.position.start.offset, origEnd: o ? o.position.end.offset : s.origStart + 1 }), o) : null;
|
|
3890
|
+
return n(J(a ? a.position.start : c.position.start, c ? c.position.end : a.position.end), a || sr(nr(c.position.start), null), c || ir(nr(a.position.end), null));
|
|
3908
3891
|
}
|
|
3909
|
-
function
|
|
3910
|
-
let n =
|
|
3911
|
-
let l = r[c], { additionalKeyRange: f, additionalValueRange: m } =
|
|
3912
|
-
return
|
|
3913
|
-
}), i = n[0], o =
|
|
3914
|
-
return
|
|
3892
|
+
function ui(t, e) {
|
|
3893
|
+
let n = me(t.cstNode.items, e), r = on(n), s = t.items.map((a, c) => {
|
|
3894
|
+
let l = r[c], { additionalKeyRange: f, additionalValueRange: m } = rn(l);
|
|
3895
|
+
return Je(a, e, nn, f, m);
|
|
3896
|
+
}), i = n[0], o = U(n);
|
|
3897
|
+
return fi(e.transformRange({ origStart: i.origOffset, origEnd: o.origOffset + 1 }), e.transformContent(t), s);
|
|
3915
3898
|
}
|
|
3916
|
-
function
|
|
3917
|
-
return { ...
|
|
3899
|
+
function pi(t, e, n) {
|
|
3900
|
+
return { ...tn(t, e, n), type: "flowSequence" };
|
|
3918
3901
|
}
|
|
3919
|
-
function
|
|
3902
|
+
function mi(t, e) {
|
|
3920
3903
|
return { ...b("flowSequenceItem", t), children: [e] };
|
|
3921
3904
|
}
|
|
3922
|
-
function
|
|
3923
|
-
let n =
|
|
3905
|
+
function hi(t, e) {
|
|
3906
|
+
let n = me(t.cstNode.items, e), r = on(n), s = t.items.map((a, c) => {
|
|
3924
3907
|
if (a.type !== "PAIR") {
|
|
3925
3908
|
let l = e.transformNode(a);
|
|
3926
|
-
return
|
|
3909
|
+
return mi(J(l.position.start, l.position.end), l);
|
|
3927
3910
|
} else {
|
|
3928
|
-
let l = r[c], { additionalKeyRange: f, additionalValueRange: m } =
|
|
3929
|
-
return
|
|
3911
|
+
let l = r[c], { additionalKeyRange: f, additionalValueRange: m } = rn(l);
|
|
3912
|
+
return Je(a, e, nn, f, m);
|
|
3930
3913
|
}
|
|
3931
|
-
}), i = n[0], o =
|
|
3932
|
-
return
|
|
3914
|
+
}), i = n[0], o = U(n);
|
|
3915
|
+
return pi(e.transformRange({ origStart: i.origOffset, origEnd: o.origOffset + 1 }), e.transformContent(t), s);
|
|
3933
3916
|
}
|
|
3934
|
-
function
|
|
3917
|
+
function gi(t, e, n) {
|
|
3935
3918
|
return { ...b("mapping", t), ...X(), ...e, children: n };
|
|
3936
3919
|
}
|
|
3937
|
-
function
|
|
3920
|
+
function di(t, e, n) {
|
|
3938
3921
|
return { ...b("mappingItem", t), ...X(), children: [e, n] };
|
|
3939
3922
|
}
|
|
3940
|
-
function
|
|
3923
|
+
function yi(t, e) {
|
|
3941
3924
|
let n = t.cstNode;
|
|
3942
|
-
n.items.filter((o) => o.type === "MAP_KEY" || o.type === "MAP_VALUE").forEach((o) =>
|
|
3943
|
-
let r =
|
|
3925
|
+
n.items.filter((o) => o.type === "MAP_KEY" || o.type === "MAP_VALUE").forEach((o) => He(o, e));
|
|
3926
|
+
let r = me(n.items, e), s = Qa(r), i = t.items.map((o, a) => {
|
|
3944
3927
|
let c = s[a], [l, f] = c[0].type === "MAP_VALUE" ? [null, c[0].range] : [c[0].range, c.length === 1 ? null : c[1].range];
|
|
3945
|
-
return
|
|
3928
|
+
return Je(o, e, di, l, f);
|
|
3946
3929
|
});
|
|
3947
|
-
return
|
|
3930
|
+
return gi(J(i[0].position.start, U(i).position.end), e.transformContent(t), i);
|
|
3948
3931
|
}
|
|
3949
|
-
function
|
|
3950
|
-
let e = [], n =
|
|
3932
|
+
function Qa(t) {
|
|
3933
|
+
let e = [], n = sn(t, 0), r = false;
|
|
3951
3934
|
for (let s = 0; s < t.length; s++) {
|
|
3952
3935
|
if (t[s].type === "MAP_VALUE") {
|
|
3953
3936
|
e.push(n(s + 1)), r = false;
|
|
@@ -3957,200 +3940,203 @@ function go(t) {
|
|
|
3957
3940
|
}
|
|
3958
3941
|
return r && e.push(n(1 / 0)), e;
|
|
3959
3942
|
}
|
|
3960
|
-
function
|
|
3961
|
-
return { ...b("plain", t), ...
|
|
3943
|
+
function Ei(t, e, n) {
|
|
3944
|
+
return { ...b("plain", t), ...F(), ...e, value: n };
|
|
3962
3945
|
}
|
|
3963
|
-
function
|
|
3946
|
+
function Si(t, e, n) {
|
|
3964
3947
|
for (let r = e; r >= 0; r--) if (n.test(t[r])) return r;
|
|
3965
3948
|
return -1;
|
|
3966
3949
|
}
|
|
3967
|
-
function
|
|
3950
|
+
function wi(t, e) {
|
|
3968
3951
|
let n = t.cstNode;
|
|
3969
|
-
return
|
|
3952
|
+
return Ei(e.transformRange({ origStart: n.valueRange.origStart, origEnd: Si(e.text, n.valueRange.origEnd - 1, /\S/) + 1 }), e.transformContent(t), n.strValue);
|
|
3970
3953
|
}
|
|
3971
|
-
function
|
|
3954
|
+
function bi(t) {
|
|
3972
3955
|
return { ...t, type: "quoteDouble" };
|
|
3973
3956
|
}
|
|
3974
|
-
function
|
|
3975
|
-
return { ...b("quoteValue", t), ...e, ...
|
|
3957
|
+
function Ni(t, e, n) {
|
|
3958
|
+
return { ...b("quoteValue", t), ...e, ...F(), value: n };
|
|
3976
3959
|
}
|
|
3977
|
-
function
|
|
3960
|
+
function an(t, e) {
|
|
3978
3961
|
let n = t.cstNode;
|
|
3979
|
-
return
|
|
3962
|
+
return Ni(e.transformRange(n.valueRange), e.transformContent(t), n.strValue);
|
|
3980
3963
|
}
|
|
3981
|
-
function
|
|
3982
|
-
return
|
|
3964
|
+
function Oi(t, e) {
|
|
3965
|
+
return bi(an(t, e));
|
|
3983
3966
|
}
|
|
3984
|
-
function
|
|
3967
|
+
function Ai(t) {
|
|
3985
3968
|
return { ...t, type: "quoteSingle" };
|
|
3986
3969
|
}
|
|
3987
|
-
function
|
|
3988
|
-
return
|
|
3970
|
+
function Li(t, e) {
|
|
3971
|
+
return Ai(an(t, e));
|
|
3989
3972
|
}
|
|
3990
|
-
function
|
|
3991
|
-
return { ...b("sequence", t), ...X(), ...
|
|
3973
|
+
function Ti(t, e, n) {
|
|
3974
|
+
return { ...b("sequence", t), ...X(), ...q(), ...e, children: n };
|
|
3992
3975
|
}
|
|
3993
|
-
function
|
|
3994
|
-
return { ...b("sequenceItem", t), ...
|
|
3976
|
+
function Mi(t, e) {
|
|
3977
|
+
return { ...b("sequenceItem", t), ...F(), ...q(), children: e ? [e] : [] };
|
|
3995
3978
|
}
|
|
3996
|
-
function
|
|
3997
|
-
let r =
|
|
3998
|
-
|
|
3979
|
+
function Ci(t, e) {
|
|
3980
|
+
let r = me(t.cstNode.items, e).map((s, i) => {
|
|
3981
|
+
He(s, e);
|
|
3999
3982
|
let o = e.transformNode(t.items[i]);
|
|
4000
|
-
return
|
|
3983
|
+
return Mi(J(e.transformOffset(s.valueRange.origStart), o === null ? e.transformOffset(s.valueRange.origStart + 1) : o.position.end), o);
|
|
4001
3984
|
});
|
|
4002
|
-
return
|
|
3985
|
+
return Ti(J(r[0].position.start, U(r).position.end), e.transformContent(t), r);
|
|
4003
3986
|
}
|
|
4004
|
-
function
|
|
3987
|
+
function ki(t, e) {
|
|
4005
3988
|
if (t === null || t.type === void 0 && t.value === null) return null;
|
|
4006
3989
|
switch (t.type) {
|
|
4007
3990
|
case "ALIAS":
|
|
4008
|
-
return
|
|
3991
|
+
return Hs(t, e);
|
|
4009
3992
|
case "BLOCK_FOLDED":
|
|
4010
|
-
return
|
|
3993
|
+
return zs(t, e);
|
|
4011
3994
|
case "BLOCK_LITERAL":
|
|
4012
|
-
return
|
|
3995
|
+
return ei(t, e);
|
|
4013
3996
|
case "COMMENT":
|
|
4014
|
-
return
|
|
3997
|
+
return ti(t, e);
|
|
4015
3998
|
case "DIRECTIVE":
|
|
4016
|
-
return
|
|
3999
|
+
return ri(t, e);
|
|
4017
4000
|
case "DOCUMENT":
|
|
4018
|
-
return
|
|
4001
|
+
return li(t, e);
|
|
4019
4002
|
case "FLOW_MAP":
|
|
4020
|
-
return
|
|
4003
|
+
return ui(t, e);
|
|
4021
4004
|
case "FLOW_SEQ":
|
|
4022
|
-
return
|
|
4005
|
+
return hi(t, e);
|
|
4023
4006
|
case "MAP":
|
|
4024
|
-
return
|
|
4007
|
+
return yi(t, e);
|
|
4025
4008
|
case "PLAIN":
|
|
4026
|
-
return
|
|
4009
|
+
return wi(t, e);
|
|
4027
4010
|
case "QUOTE_DOUBLE":
|
|
4028
|
-
return
|
|
4011
|
+
return Oi(t, e);
|
|
4029
4012
|
case "QUOTE_SINGLE":
|
|
4030
|
-
return
|
|
4013
|
+
return Li(t, e);
|
|
4031
4014
|
case "SEQ":
|
|
4032
|
-
return
|
|
4015
|
+
return Ci(t, e);
|
|
4033
4016
|
default:
|
|
4034
4017
|
throw new Error(`Unexpected node type ${t.type}`);
|
|
4035
4018
|
}
|
|
4036
4019
|
}
|
|
4037
|
-
|
|
4020
|
+
var or, Le, bt, he, cr, lr, ar = class {
|
|
4021
|
+
constructor(e, n) {
|
|
4022
|
+
Ot(this, he);
|
|
4023
|
+
ln(this, "text");
|
|
4024
|
+
ln(this, "comments", []);
|
|
4025
|
+
Ot(this, Le);
|
|
4026
|
+
Ot(this, bt);
|
|
4027
|
+
this.text = n, un(this, Le, e);
|
|
4028
|
+
}
|
|
4029
|
+
setOrigRanges() {
|
|
4030
|
+
if (!Te(this, Le).setOrigRanges()) for (let e of Te(this, Le)) e.setOrigRanges([], 0);
|
|
4031
|
+
}
|
|
4032
|
+
transformOffset(e) {
|
|
4033
|
+
return Xe(this, he, cr).call(this, { origStart: e, origEnd: e }).start;
|
|
4034
|
+
}
|
|
4035
|
+
transformRange(e) {
|
|
4036
|
+
let { start: n, end: r } = Xe(this, he, cr).call(this, e);
|
|
4037
|
+
return J(n, r);
|
|
4038
|
+
}
|
|
4039
|
+
transformNode(e) {
|
|
4040
|
+
return ki(e, this);
|
|
4041
|
+
}
|
|
4042
|
+
transformContent(e) {
|
|
4043
|
+
return zt(e, this);
|
|
4044
|
+
}
|
|
4045
|
+
};
|
|
4046
|
+
Le = /* @__PURE__ */ new WeakMap(), bt = /* @__PURE__ */ new WeakMap(), he = /* @__PURE__ */ new WeakSet(), cr = function(e) {
|
|
4047
|
+
if (!or) {
|
|
4048
|
+
let [o] = Te(this, Le), a = Object.getPrototypeOf(Object.getPrototypeOf(o));
|
|
4049
|
+
or = Object.getOwnPropertyDescriptor(a, "rangeAsLinePos").get;
|
|
4050
|
+
}
|
|
4051
|
+
Te(this, bt) ?? un(this, bt, { root: { context: { src: this.text } } });
|
|
4052
|
+
let { start: { line: n, col: r }, end: { line: s, col: i } } = or.call({ range: { start: Xe(this, he, lr).call(this, e.origStart), end: Xe(this, he, lr).call(this, e.origEnd) }, context: Te(this, bt) });
|
|
4053
|
+
return { start: { offset: e.origStart, line: n, column: r }, end: { offset: e.origEnd, line: s, column: i } };
|
|
4054
|
+
}, lr = function(e) {
|
|
4055
|
+
return e < 0 ? 0 : e > this.text.length ? this.text.length : e;
|
|
4056
|
+
};
|
|
4057
|
+
var Pi = ar;
|
|
4058
|
+
function Ii(t, e, n) {
|
|
4038
4059
|
let r = new SyntaxError(t);
|
|
4039
4060
|
return r.name = "YAMLSyntaxError", r.source = e, r.position = n, r;
|
|
4040
4061
|
}
|
|
4041
|
-
function
|
|
4062
|
+
function vi(t, e) {
|
|
4042
4063
|
let n = t.source.range || t.source.valueRange;
|
|
4043
|
-
return
|
|
4064
|
+
return Ii(t.message, e.text, e.transformRange(n));
|
|
4044
4065
|
}
|
|
4045
|
-
function
|
|
4046
|
-
return { offset: t, line: e, column: n };
|
|
4047
|
-
}
|
|
4048
|
-
function ks(t, e) {
|
|
4049
|
-
t < 0 ? t = 0 : t > e.text.length && (t = e.text.length);
|
|
4050
|
-
let n = e.locator.locationForIndex(t);
|
|
4051
|
-
return Ms(t, n.line + 1, n.column + 1);
|
|
4052
|
-
}
|
|
4053
|
-
function vs(t, e) {
|
|
4054
|
-
return V(e.transformOffset(t.origStart), e.transformOffset(t.origEnd));
|
|
4055
|
-
}
|
|
4056
|
-
function Is(t) {
|
|
4057
|
-
if (!t.setOrigRanges()) {
|
|
4058
|
-
let e = (n) => {
|
|
4059
|
-
if (yo(n)) return n.origStart = n.start, n.origEnd = n.end, true;
|
|
4060
|
-
if (Eo(n)) return n.origOffset = n.offset, true;
|
|
4061
|
-
};
|
|
4062
|
-
t.forEach((n) => Nn(n, e));
|
|
4063
|
-
}
|
|
4064
|
-
}
|
|
4065
|
-
function Nn(t, e) {
|
|
4066
|
-
if (!(!t || typeof t != "object") && e(t) !== true) for (let n of Object.keys(t)) {
|
|
4067
|
-
if (n === "context" || n === "error") continue;
|
|
4068
|
-
let r = t[n];
|
|
4069
|
-
Array.isArray(r) ? r.forEach((s) => Nn(s, e)) : Nn(r, e);
|
|
4070
|
-
}
|
|
4071
|
-
}
|
|
4072
|
-
function yo(t) {
|
|
4073
|
-
return typeof t.start == "number";
|
|
4074
|
-
}
|
|
4075
|
-
function Eo(t) {
|
|
4076
|
-
return typeof t.offset == "number";
|
|
4077
|
-
}
|
|
4078
|
-
function On(t) {
|
|
4066
|
+
function fr(t) {
|
|
4079
4067
|
if ("children" in t) {
|
|
4080
4068
|
if (t.children.length === 1) {
|
|
4081
4069
|
let e = t.children[0];
|
|
4082
4070
|
if (e.type === "plain" && e.tag === null && e.anchor === null && e.value === "") return t.children.splice(0, 1), t;
|
|
4083
4071
|
}
|
|
4084
|
-
t.children.forEach(
|
|
4072
|
+
t.children.forEach(fr);
|
|
4085
4073
|
}
|
|
4086
4074
|
return t;
|
|
4087
4075
|
}
|
|
4088
|
-
function
|
|
4076
|
+
function ur(t, e, n, r) {
|
|
4089
4077
|
let s = e(t);
|
|
4090
4078
|
return (i) => {
|
|
4091
4079
|
r(s, i) && n(t, s = i);
|
|
4092
4080
|
};
|
|
4093
4081
|
}
|
|
4094
|
-
function
|
|
4082
|
+
function pr(t) {
|
|
4095
4083
|
if (t === null || !("children" in t)) return;
|
|
4096
4084
|
let e = t.children;
|
|
4097
|
-
if (e.forEach(
|
|
4085
|
+
if (e.forEach(pr), t.type === "document") {
|
|
4098
4086
|
let [i, o] = t.children;
|
|
4099
4087
|
i.position.start.offset === i.position.end.offset ? i.position.start = i.position.end = o.position.start : o.position.start.offset === o.position.end.offset && (o.position.start = o.position.end = i.position.end);
|
|
4100
4088
|
}
|
|
4101
|
-
let n =
|
|
4102
|
-
"endComments" in t && t.endComments.length !== 0 && (n(t.endComments[0].position.start), r(
|
|
4089
|
+
let n = ur(t.position, Ga, Ha, za), r = ur(t.position, Ja, Xa, Za);
|
|
4090
|
+
"endComments" in t && t.endComments.length !== 0 && (n(t.endComments[0].position.start), r(U(t.endComments).position.end));
|
|
4103
4091
|
let s = e.filter((i) => i !== null);
|
|
4104
4092
|
if (s.length !== 0) {
|
|
4105
|
-
let i = s[0], o =
|
|
4093
|
+
let i = s[0], o = U(s);
|
|
4106
4094
|
n(i.position.start), r(o.position.end), "leadingComments" in i && i.leadingComments.length !== 0 && n(i.leadingComments[0].position.start), "tag" in i && i.tag && n(i.tag.position.start), "anchor" in i && i.anchor && n(i.anchor.position.start), "trailingComment" in o && o.trailingComment && r(o.trailingComment.position.end);
|
|
4107
4095
|
}
|
|
4108
4096
|
}
|
|
4109
|
-
function
|
|
4097
|
+
function Ga(t) {
|
|
4110
4098
|
return t.start;
|
|
4111
4099
|
}
|
|
4112
|
-
function
|
|
4100
|
+
function Ha(t, e) {
|
|
4113
4101
|
t.start = e;
|
|
4114
4102
|
}
|
|
4115
|
-
function
|
|
4103
|
+
function Ja(t) {
|
|
4116
4104
|
return t.end;
|
|
4117
4105
|
}
|
|
4118
|
-
function
|
|
4106
|
+
function Xa(t, e) {
|
|
4119
4107
|
t.end = e;
|
|
4120
4108
|
}
|
|
4121
|
-
function
|
|
4109
|
+
function za(t, e) {
|
|
4122
4110
|
return e.offset < t.offset;
|
|
4123
4111
|
}
|
|
4124
|
-
function
|
|
4112
|
+
function Za(t, e) {
|
|
4125
4113
|
return e.offset > t.offset;
|
|
4126
4114
|
}
|
|
4127
|
-
|
|
4128
|
-
|
|
4129
|
-
|
|
4130
|
-
|
|
4131
|
-
let
|
|
4132
|
-
|
|
4133
|
-
let
|
|
4134
|
-
|
|
4135
|
-
|
|
4136
|
-
|
|
4137
|
-
return Yr(o), An(o), On(o), o;
|
|
4138
|
-
}
|
|
4139
|
-
function Qa(t, e) {
|
|
4115
|
+
function _i(t) {
|
|
4116
|
+
let e = mr.default.parseCST(t), n = new Pi(e, t);
|
|
4117
|
+
n.setOrigRanges();
|
|
4118
|
+
let r = e.map((i) => new mr.default.Document({ merge: false, keepCstNodes: true }).parse(i));
|
|
4119
|
+
for (let i of r) for (let o of i.errors) if (!(o instanceof Fs && o.message === 'Map keys must be unique; "<<" is repeated')) throw vi(o, n);
|
|
4120
|
+
r.forEach((i) => wt(i.cstNode));
|
|
4121
|
+
let s = Vs(n.transformRange({ origStart: 0, origEnd: t.length }), r.map((i) => n.transformNode(i)), n.comments);
|
|
4122
|
+
return qs(s), pr(s), fr(s), s;
|
|
4123
|
+
}
|
|
4124
|
+
function ec(t, e) {
|
|
4140
4125
|
let n = new SyntaxError(t + " (" + e.loc.start.line + ":" + e.loc.start.column + ")");
|
|
4141
4126
|
return Object.assign(n, e);
|
|
4142
4127
|
}
|
|
4143
|
-
var
|
|
4144
|
-
function
|
|
4128
|
+
var Ri = ec;
|
|
4129
|
+
function tc(t) {
|
|
4145
4130
|
try {
|
|
4146
|
-
let e =
|
|
4131
|
+
let e = _i(t);
|
|
4147
4132
|
return delete e.comments, e;
|
|
4148
4133
|
} catch (e) {
|
|
4149
|
-
throw e != null && e.position ?
|
|
4134
|
+
throw e != null && e.position ? Ri(e.message, { loc: e.position, cause: e }) : e;
|
|
4150
4135
|
}
|
|
4151
4136
|
}
|
|
4152
|
-
var
|
|
4153
|
-
var
|
|
4154
|
-
var
|
|
4137
|
+
var nc = { astFormat: "yaml", parse: tc, hasPragma: Dr, hasIgnorePragma: Yr, locStart: xe, locEnd: Pr };
|
|
4138
|
+
var rc = { yaml: Jr };
|
|
4139
|
+
var xi = cn(tr()), sc = xi.default.parse;
|
|
4140
|
+
var Ih = gr;
|
|
4155
4141
|
|
|
4156
|
-
export {
|
|
4142
|
+
export { sc as __parsePrettierYamlConfig, Ih as default, Xr as languages, zr as options, hr as parsers, rc as printers };
|