@osdk/cli 0.29.0-beta.3 → 0.29.0-beta.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +4 -0
- package/build/esm/{acorn-JD7YOXOW.js → acorn-OOLA2SYL.js} +1429 -1263
- package/build/esm/acorn-OOLA2SYL.js.map +1 -0
- package/build/esm/angular-B3DVBAJV.js +3921 -0
- package/build/esm/angular-B3DVBAJV.js.map +1 -0
- package/build/esm/{babel-QGX3VV5S.js → babel-QGU36NF2.js} +4749 -4416
- package/build/esm/babel-QGU36NF2.js.map +1 -0
- package/build/esm/{chunk-GQTSTRG7.js → chunk-2R54QG3I.js} +7 -6
- package/build/esm/chunk-2R54QG3I.js.map +1 -0
- package/build/esm/{chunk-XN5PUPF7.js → chunk-5WP6J4UN.js} +3 -3
- package/build/esm/{chunk-XN5PUPF7.js.map → chunk-5WP6J4UN.js.map} +1 -1
- package/build/esm/{chunk-HFQXGJUG.js → chunk-CZNX7NAA.js} +8 -8
- package/build/esm/{chunk-HFQXGJUG.js.map → chunk-CZNX7NAA.js.map} +1 -1
- package/build/esm/{chunk-MRRQIWFU.js → chunk-HDRBKETK.js} +3 -3
- package/build/esm/{chunk-MRRQIWFU.js.map → chunk-HDRBKETK.js.map} +1 -1
- package/build/esm/{chunk-WHNUNGND.js → chunk-QCQEOFJ7.js} +15 -10
- package/build/esm/chunk-QCQEOFJ7.js.map +1 -0
- package/build/esm/{chunk-DXFUAG7W.js → chunk-SEG3TN7G.js} +7 -7
- package/build/esm/{chunk-DXFUAG7W.js.map → chunk-SEG3TN7G.js.map} +1 -1
- package/build/esm/{chunk-MU732G7I.js → chunk-TGQMPTOO.js} +6 -5
- package/build/esm/chunk-TGQMPTOO.js.map +1 -0
- package/build/esm/{chunk-5PX3HSZR.js → chunk-WLPJIKJV.js} +3 -3
- package/build/esm/{chunk-5PX3HSZR.js.map → chunk-WLPJIKJV.js.map} +1 -1
- package/build/esm/{chunk-PFFPV5JQ.js → chunk-ZAWCQ47H.js} +9 -9
- package/build/esm/chunk-ZAWCQ47H.js.map +1 -0
- package/build/esm/estree-ATGZ6OGQ.js +6145 -0
- package/build/esm/estree-ATGZ6OGQ.js.map +1 -0
- package/build/esm/find-up-JM7QWHT3.js +4 -0
- package/build/esm/{find-up-W7EXJFQH.js.map → find-up-JM7QWHT3.js.map} +1 -1
- package/build/esm/flow-GUZBCHQS.js +27169 -0
- package/build/esm/flow-GUZBCHQS.js.map +1 -0
- package/build/esm/{glimmer-LTNZJIJW.js → glimmer-K2WK52BN.js} +2642 -2669
- package/build/esm/glimmer-K2WK52BN.js.map +1 -0
- package/build/esm/{graphql-KTAUFGIO.js → graphql-MBGHR3ZR.js} +543 -529
- package/build/esm/graphql-MBGHR3ZR.js.map +1 -0
- package/build/esm/{handleGenerate-WOXIHSCJ.js → handleGenerate-KGS77ERN.js} +4659 -8558
- package/build/esm/handleGenerate-KGS77ERN.js.map +1 -0
- package/build/esm/{html-GMDGBLFG.js → html-IRNVR4MI.js} +1485 -1328
- package/build/esm/html-IRNVR4MI.js.map +1 -0
- package/build/esm/index.js +27 -18
- package/build/esm/index.js.map +1 -1
- package/build/esm/loginFlow-AGXNBVJB.js +4 -0
- package/build/esm/{loginFlow-HRPXRVXN.js.map → loginFlow-AGXNBVJB.js.map} +1 -1
- package/build/esm/markdown-N3ITOTMK.js +6697 -0
- package/build/esm/markdown-N3ITOTMK.js.map +1 -0
- package/build/esm/meriyah-LUFL36FF.js +4343 -0
- package/build/esm/meriyah-LUFL36FF.js.map +1 -0
- package/build/esm/{postcss-HFWVKWXX.js → postcss-TV6UK7MR.js} +2266 -2173
- package/build/esm/postcss-TV6UK7MR.js.map +1 -0
- package/build/esm/{siteDeployCommand-YDROISOZ.js → siteDeployCommand-CWR5F4EH.js} +11 -11
- package/build/esm/{siteDeployCommand-YDROISOZ.js.map → siteDeployCommand-CWR5F4EH.js.map} +1 -1
- package/build/esm/typescript-KPTOIHC3.js +13078 -0
- package/build/esm/typescript-KPTOIHC3.js.map +1 -0
- package/build/esm/{versionDeleteCommand-VIPTBZ2L.js → versionDeleteCommand-5KF34BQE.js} +7 -7
- package/build/esm/{versionDeleteCommand-VIPTBZ2L.js.map → versionDeleteCommand-5KF34BQE.js.map} +1 -1
- package/build/esm/{versionDeleteCommand-HUCQPSGV.js → versionDeleteCommand-5ZF5YLI4.js} +7 -7
- package/build/esm/{versionDeleteCommand-HUCQPSGV.js.map → versionDeleteCommand-5ZF5YLI4.js.map} +1 -1
- package/build/esm/{versionGetCommand-SAF7DVRA.js → versionGetCommand-JCTQEP3R.js} +6 -6
- package/build/esm/{versionGetCommand-SAF7DVRA.js.map → versionGetCommand-JCTQEP3R.js.map} +1 -1
- package/build/esm/{versionInfoCommand-DK25W5U7.js → versionInfoCommand-FCPKK743.js} +6 -6
- package/build/esm/{versionInfoCommand-DK25W5U7.js.map → versionInfoCommand-FCPKK743.js.map} +1 -1
- package/build/esm/{versionListCommand-MDBG5UYM.js → versionListCommand-6KQHQNSI.js} +6 -6
- package/build/esm/{versionListCommand-MDBG5UYM.js.map → versionListCommand-6KQHQNSI.js.map} +1 -1
- package/build/esm/{versionListCommand-VPPGAYL7.js → versionListCommand-HSSUX52Q.js} +6 -6
- package/build/esm/{versionListCommand-VPPGAYL7.js.map → versionListCommand-HSSUX52Q.js.map} +1 -1
- package/build/esm/{versionSetCommand-H34E5M4G.js → versionSetCommand-X4B2SNU4.js} +6 -6
- package/build/esm/{versionSetCommand-H34E5M4G.js.map → versionSetCommand-X4B2SNU4.js.map} +1 -1
- package/build/esm/{versionUnsetCommand-DEHOEXY6.js → versionUnsetCommand-FPJ4K56H.js} +7 -7
- package/build/esm/{versionUnsetCommand-DEHOEXY6.js.map → versionUnsetCommand-FPJ4K56H.js.map} +1 -1
- package/build/esm/{widgetSetDeployCommand-3UOFO3I5.js → widgetSetDeployCommand-N34DLLLN.js} +10 -10
- package/build/esm/{widgetSetDeployCommand-3UOFO3I5.js.map → widgetSetDeployCommand-N34DLLLN.js.map} +1 -1
- package/build/esm/{yaml-AZTVLK7P.js → yaml-LD5K7H4C.js} +1294 -1270
- package/build/esm/yaml-LD5K7H4C.js.map +1 -0
- package/package.json +11 -11
- package/build/esm/acorn-JD7YOXOW.js.map +0 -1
- package/build/esm/angular-3AJ2SFX7.js +0 -1981
- package/build/esm/angular-3AJ2SFX7.js.map +0 -1
- package/build/esm/babel-QGX3VV5S.js.map +0 -1
- package/build/esm/chunk-GQTSTRG7.js.map +0 -1
- package/build/esm/chunk-MU732G7I.js.map +0 -1
- package/build/esm/chunk-PFFPV5JQ.js.map +0 -1
- package/build/esm/chunk-WHNUNGND.js.map +0 -1
- package/build/esm/estree-KG4K5QQZ.js +0 -6035
- package/build/esm/estree-KG4K5QQZ.js.map +0 -1
- package/build/esm/find-up-W7EXJFQH.js +0 -4
- package/build/esm/flow-JJAOFHVR.js +0 -26049
- package/build/esm/flow-JJAOFHVR.js.map +0 -1
- package/build/esm/glimmer-LTNZJIJW.js.map +0 -1
- package/build/esm/graphql-KTAUFGIO.js.map +0 -1
- package/build/esm/handleGenerate-WOXIHSCJ.js.map +0 -1
- package/build/esm/html-GMDGBLFG.js.map +0 -1
- package/build/esm/loginFlow-HRPXRVXN.js +0 -4
- package/build/esm/markdown-HFDLFZ5Y.js +0 -6529
- package/build/esm/markdown-HFDLFZ5Y.js.map +0 -1
- package/build/esm/meriyah-M2H255YT.js +0 -4105
- package/build/esm/meriyah-M2H255YT.js.map +0 -1
- package/build/esm/postcss-HFWVKWXX.js.map +0 -1
- package/build/esm/typescript-LVGK7LR7.js +0 -19653
- package/build/esm/typescript-LVGK7LR7.js.map +0 -1
- package/build/esm/yaml-AZTVLK7P.js.map +0 -1
|
@@ -1,41 +1,56 @@
|
|
|
1
|
-
import { init_esm_shims } from './chunk-
|
|
1
|
+
import { init_esm_shims } from './chunk-TGQMPTOO.js';
|
|
2
2
|
|
|
3
|
-
// ../../node_modules/.pnpm/prettier@3.2
|
|
3
|
+
// ../../node_modules/.pnpm/prettier@3.6.2/node_modules/prettier/plugins/yaml.mjs
|
|
4
4
|
init_esm_shims();
|
|
5
|
-
var
|
|
6
|
-
var
|
|
7
|
-
var
|
|
8
|
-
var
|
|
9
|
-
var
|
|
10
|
-
var
|
|
11
|
-
var
|
|
5
|
+
var Yi = Object.create;
|
|
6
|
+
var Nt = Object.defineProperty;
|
|
7
|
+
var $i = Object.getOwnPropertyDescriptor;
|
|
8
|
+
var Bi = Object.getOwnPropertyNames;
|
|
9
|
+
var Fi = Object.getPrototypeOf;
|
|
10
|
+
var qi = Object.prototype.hasOwnProperty;
|
|
11
|
+
var dr = (t) => {
|
|
12
|
+
throw TypeError(t);
|
|
13
|
+
};
|
|
14
|
+
var Ui = (t, e, n) => e in t ? Nt(t, e, {
|
|
15
|
+
enumerable: true,
|
|
16
|
+
configurable: true,
|
|
17
|
+
writable: true,
|
|
18
|
+
value: n
|
|
19
|
+
}) : t[e] = n;
|
|
20
|
+
var te = (t, e) => () => (e || t((e = {
|
|
12
21
|
exports: {}
|
|
13
22
|
}).exports, e), e.exports);
|
|
14
|
-
var
|
|
15
|
-
for (var n in e)
|
|
23
|
+
var yr = (t, e) => {
|
|
24
|
+
for (var n in e) Nt(t, n, {
|
|
16
25
|
get: e[n],
|
|
17
26
|
enumerable: true
|
|
18
27
|
});
|
|
19
28
|
};
|
|
20
|
-
var
|
|
21
|
-
if (e && typeof e == "object" || typeof e == "function") for (let s of
|
|
29
|
+
var Ki = (t, e, n, r) => {
|
|
30
|
+
if (e && typeof e == "object" || typeof e == "function") for (let s of Bi(e)) !qi.call(t, s) && s !== n && Nt(t, s, {
|
|
22
31
|
get: () => e[s],
|
|
23
|
-
enumerable: !(r =
|
|
32
|
+
enumerable: !(r = $i(e, s)) || r.enumerable
|
|
24
33
|
});
|
|
25
34
|
return t;
|
|
26
35
|
};
|
|
27
|
-
var
|
|
36
|
+
var cn = (t, e, n) => (n = t != null ? Yi(Fi(t)) : {}, Ki(Nt(n, "default", {
|
|
28
37
|
value: t,
|
|
29
38
|
enumerable: true
|
|
30
39
|
}) , t));
|
|
31
|
-
var
|
|
40
|
+
var ln = (t, e, n) => Ui(t, typeof e != "symbol" ? e + "" : e, n);
|
|
41
|
+
var fn = (t, e, n) => e.has(t) || dr("Cannot " + n);
|
|
42
|
+
var Te = (t, e, n) => (fn(t, e, "read from private field"), n ? n.call(t) : e.get(t));
|
|
43
|
+
var 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);
|
|
44
|
+
var un = (t, e, n, r) => (fn(t, e, "write to private field"), e.set(t, n), n);
|
|
45
|
+
var Xe = (t, e, n) => (fn(t, e, "access private method"), n);
|
|
46
|
+
var oe = te(($) => {
|
|
32
47
|
var re = {
|
|
33
48
|
ANCHOR: "&",
|
|
34
49
|
COMMENT: "#",
|
|
35
50
|
TAG: "!",
|
|
36
51
|
DIRECTIVES_END: "-",
|
|
37
52
|
DOCUMENT_END: "."
|
|
38
|
-
},
|
|
53
|
+
}, pt = {
|
|
39
54
|
ALIAS: "ALIAS",
|
|
40
55
|
BLANK_LINE: "BLANK_LINE",
|
|
41
56
|
BLOCK_FOLDED: "BLOCK_FOLDED",
|
|
@@ -53,31 +68,31 @@ var le = ee((U) => {
|
|
|
53
68
|
QUOTE_SINGLE: "QUOTE_SINGLE",
|
|
54
69
|
SEQ: "SEQ",
|
|
55
70
|
SEQ_ITEM: "SEQ_ITEM"
|
|
56
|
-
},
|
|
71
|
+
}, bo = "tag:yaml.org,2002:", No = {
|
|
57
72
|
MAP: "tag:yaml.org,2002:map",
|
|
58
73
|
SEQ: "tag:yaml.org,2002:seq",
|
|
59
74
|
STR: "tag:yaml.org,2002:str"
|
|
60
75
|
};
|
|
61
|
-
function
|
|
76
|
+
function Zr(t) {
|
|
62
77
|
let e = [0], n = t.indexOf(`
|
|
63
78
|
`);
|
|
64
79
|
for (; n !== -1; ) n += 1, e.push(n), n = t.indexOf(`
|
|
65
80
|
`, n);
|
|
66
81
|
return e;
|
|
67
82
|
}
|
|
68
|
-
function
|
|
83
|
+
function es(t) {
|
|
69
84
|
let e, n;
|
|
70
|
-
return typeof t == "string" ? (e =
|
|
85
|
+
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)), {
|
|
71
86
|
lineStarts: e,
|
|
72
87
|
src: n
|
|
73
88
|
};
|
|
74
89
|
}
|
|
75
|
-
function
|
|
90
|
+
function Mn(t, e) {
|
|
76
91
|
if (typeof t != "number" || t < 0) return null;
|
|
77
92
|
let {
|
|
78
93
|
lineStarts: n,
|
|
79
94
|
src: r
|
|
80
|
-
} =
|
|
95
|
+
} = es(e);
|
|
81
96
|
if (!n || !r || t > r.length) return null;
|
|
82
97
|
for (let i = 0; i < n.length; ++i) {
|
|
83
98
|
let o = n[i];
|
|
@@ -96,22 +111,22 @@ var le = ee((U) => {
|
|
|
96
111
|
col: t - n[s - 1] + 1
|
|
97
112
|
};
|
|
98
113
|
}
|
|
99
|
-
function
|
|
114
|
+
function Oo(t, e) {
|
|
100
115
|
let {
|
|
101
116
|
lineStarts: n,
|
|
102
117
|
src: r
|
|
103
|
-
} =
|
|
118
|
+
} = es(e);
|
|
104
119
|
if (!n || !(t >= 1) || t > n.length) return null;
|
|
105
120
|
let s = n[t - 1], i = n[t];
|
|
106
121
|
for (; i && i > s && r[i - 1] === `
|
|
107
122
|
`; ) --i;
|
|
108
123
|
return r.slice(s, i);
|
|
109
124
|
}
|
|
110
|
-
function
|
|
125
|
+
function Ao({
|
|
111
126
|
start: t,
|
|
112
127
|
end: e
|
|
113
128
|
}, n, r = 80) {
|
|
114
|
-
let s =
|
|
129
|
+
let s = Oo(t.line, n);
|
|
115
130
|
if (!s) return null;
|
|
116
131
|
let {
|
|
117
132
|
col: i
|
|
@@ -127,7 +142,7 @@ var le = ee((U) => {
|
|
|
127
142
|
return `${s}
|
|
128
143
|
${c}${l}${a}`;
|
|
129
144
|
}
|
|
130
|
-
var
|
|
145
|
+
var Be = class t {
|
|
131
146
|
static copy(e) {
|
|
132
147
|
return new t(e.start, e.end);
|
|
133
148
|
}
|
|
@@ -315,13 +330,13 @@ ${c}${l}${a}`;
|
|
|
315
330
|
return false;
|
|
316
331
|
}
|
|
317
332
|
get jsonLike() {
|
|
318
|
-
return [
|
|
333
|
+
return [pt.FLOW_MAP, pt.FLOW_SEQ, pt.QUOTE_DOUBLE, pt.QUOTE_SINGLE].indexOf(this.type) !== -1;
|
|
319
334
|
}
|
|
320
335
|
get rangeAsLinePos() {
|
|
321
336
|
if (!this.range || !this.context) return;
|
|
322
|
-
let e =
|
|
337
|
+
let e = Mn(this.range.start, this.context.root);
|
|
323
338
|
if (!e) return;
|
|
324
|
-
let n =
|
|
339
|
+
let n = Mn(this.range.end, this.context.root);
|
|
325
340
|
return {
|
|
326
341
|
start: e,
|
|
327
342
|
end: n
|
|
@@ -370,7 +385,7 @@ ${c}${l}${a}`;
|
|
|
370
385
|
src: n
|
|
371
386
|
} = this.context;
|
|
372
387
|
if (n[e] === re.COMMENT) {
|
|
373
|
-
let r = t.endOfLine(n, e + 1), s = new
|
|
388
|
+
let r = t.endOfLine(n, e + 1), s = new Be(e, r);
|
|
374
389
|
return this.props.push(s), r;
|
|
375
390
|
}
|
|
376
391
|
return e;
|
|
@@ -390,7 +405,7 @@ ${c}${l}${a}`;
|
|
|
390
405
|
let s = e.slice(n.start, n.end);
|
|
391
406
|
return t.addStringTerminator(e, n.end, s);
|
|
392
407
|
}
|
|
393
|
-
},
|
|
408
|
+
}, ye = class extends Error {
|
|
394
409
|
constructor(e, n, r) {
|
|
395
410
|
if (!r || !(n instanceof se)) throw new Error(`Invalid arguments for new ${e}`);
|
|
396
411
|
super(), this.name = e, this.message = r, this.source = n;
|
|
@@ -400,8 +415,8 @@ ${c}${l}${a}`;
|
|
|
400
415
|
this.nodeType = this.source.type;
|
|
401
416
|
let e = this.source.context && this.source.context.root;
|
|
402
417
|
if (typeof this.offset == "number") {
|
|
403
|
-
this.range = new
|
|
404
|
-
let n = e &&
|
|
418
|
+
this.range = new Be(this.offset, this.offset + 1);
|
|
419
|
+
let n = e && Mn(this.offset, e);
|
|
405
420
|
if (n) {
|
|
406
421
|
let r = {
|
|
407
422
|
line: n.line,
|
|
@@ -420,7 +435,7 @@ ${c}${l}${a}`;
|
|
|
420
435
|
col: r
|
|
421
436
|
} = this.linePos.start;
|
|
422
437
|
this.message += ` at line ${n}, column ${r}`;
|
|
423
|
-
let s = e &&
|
|
438
|
+
let s = e && Ao(this.linePos, e);
|
|
424
439
|
s && (this.message += `:
|
|
425
440
|
|
|
426
441
|
${s}
|
|
@@ -428,24 +443,24 @@ ${s}
|
|
|
428
443
|
}
|
|
429
444
|
delete this.source;
|
|
430
445
|
}
|
|
431
|
-
},
|
|
446
|
+
}, Cn = class extends ye {
|
|
432
447
|
constructor(e, n) {
|
|
433
448
|
super("YAMLReferenceError", e, n);
|
|
434
449
|
}
|
|
435
|
-
},
|
|
450
|
+
}, mt = class extends ye {
|
|
436
451
|
constructor(e, n) {
|
|
437
452
|
super("YAMLSemanticError", e, n);
|
|
438
453
|
}
|
|
439
|
-
},
|
|
454
|
+
}, kn = class extends ye {
|
|
440
455
|
constructor(e, n) {
|
|
441
456
|
super("YAMLSyntaxError", e, n);
|
|
442
457
|
}
|
|
443
|
-
},
|
|
458
|
+
}, Pn = class extends ye {
|
|
444
459
|
constructor(e, n) {
|
|
445
460
|
super("YAMLWarning", e, n);
|
|
446
461
|
}
|
|
447
462
|
};
|
|
448
|
-
function
|
|
463
|
+
function Lo(t, e, n) {
|
|
449
464
|
return e in t ? Object.defineProperty(t, e, {
|
|
450
465
|
value: n,
|
|
451
466
|
enumerable: true,
|
|
@@ -453,7 +468,7 @@ ${s}
|
|
|
453
468
|
writable: true
|
|
454
469
|
}) : t[e] = n, t;
|
|
455
470
|
}
|
|
456
|
-
var
|
|
471
|
+
var In = class t extends se {
|
|
457
472
|
static endOfLine(e, n, r) {
|
|
458
473
|
let s = e[n], i = n;
|
|
459
474
|
for (; s && s !== `
|
|
@@ -497,7 +512,7 @@ ${s}
|
|
|
497
512
|
case " ": {
|
|
498
513
|
let a = "Plain value cannot start with a tab character";
|
|
499
514
|
return {
|
|
500
|
-
errors: [new
|
|
515
|
+
errors: [new mt(this, a)],
|
|
501
516
|
str: i
|
|
502
517
|
};
|
|
503
518
|
}
|
|
@@ -505,7 +520,7 @@ ${s}
|
|
|
505
520
|
case "`": {
|
|
506
521
|
let a = `Plain value cannot start with reserved character ${o}`;
|
|
507
522
|
return {
|
|
508
|
-
errors: [new
|
|
523
|
+
errors: [new mt(this, a)],
|
|
509
524
|
str: i
|
|
510
525
|
};
|
|
511
526
|
}
|
|
@@ -535,25 +550,25 @@ ${s}
|
|
|
535
550
|
src: s
|
|
536
551
|
} = e, i = n, o = s[i];
|
|
537
552
|
return o && o !== "#" && o !== `
|
|
538
|
-
` && (i = t.endOfLine(s, n, r)), this.valueRange = new
|
|
553
|
+
` && (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;
|
|
539
554
|
}
|
|
540
555
|
};
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
556
|
+
$.Char = re;
|
|
557
|
+
$.Node = se;
|
|
558
|
+
$.PlainValue = In;
|
|
559
|
+
$.Range = Be;
|
|
560
|
+
$.Type = pt;
|
|
561
|
+
$.YAMLError = ye;
|
|
562
|
+
$.YAMLReferenceError = Cn;
|
|
563
|
+
$.YAMLSemanticError = mt;
|
|
564
|
+
$.YAMLSyntaxError = kn;
|
|
565
|
+
$.YAMLWarning = Pn;
|
|
566
|
+
$._defineProperty = Lo;
|
|
567
|
+
$.defaultTagPrefix = bo;
|
|
568
|
+
$.defaultTags = No;
|
|
554
569
|
});
|
|
555
|
-
var
|
|
556
|
-
var u =
|
|
570
|
+
var ns = te((ts) => {
|
|
571
|
+
var u = oe(), Se = class extends u.Node {
|
|
557
572
|
constructor() {
|
|
558
573
|
super(u.Type.BLANK_LINE);
|
|
559
574
|
}
|
|
@@ -563,7 +578,7 @@ var _s = ee((Ps) => {
|
|
|
563
578
|
parse(e, n) {
|
|
564
579
|
return this.context = e, this.range = new u.Range(n, n + 1), n + 1;
|
|
565
580
|
}
|
|
566
|
-
},
|
|
581
|
+
}, ht = class extends u.Node {
|
|
567
582
|
constructor(e, n) {
|
|
568
583
|
super(e, n), this.node = null;
|
|
569
584
|
}
|
|
@@ -590,7 +605,7 @@ var _s = ee((Ps) => {
|
|
|
590
605
|
i = true, o = c + 1;
|
|
591
606
|
let h = u.Node.endOfWhiteSpace(s, o);
|
|
592
607
|
s[h] === `
|
|
593
|
-
` && m.length === 0 && (d = new
|
|
608
|
+
` && m.length === 0 && (d = new Se(), o = d.parse({
|
|
594
609
|
src: s
|
|
595
610
|
}, o)), c = u.Node.endOfIndent(s, o);
|
|
596
611
|
}
|
|
@@ -631,7 +646,7 @@ var _s = ee((Ps) => {
|
|
|
631
646
|
let i = n ? e.slice(r.start, n.range.start) + String(n) : e.slice(r.start, r.end);
|
|
632
647
|
return u.Node.addStringTerminator(e, r.end, i);
|
|
633
648
|
}
|
|
634
|
-
},
|
|
649
|
+
}, Ee = class extends u.Node {
|
|
635
650
|
constructor() {
|
|
636
651
|
super(u.Type.COMMENT);
|
|
637
652
|
}
|
|
@@ -643,8 +658,8 @@ var _s = ee((Ps) => {
|
|
|
643
658
|
};
|
|
644
659
|
function vn(t) {
|
|
645
660
|
let e = t;
|
|
646
|
-
for (; e instanceof
|
|
647
|
-
if (!(e instanceof
|
|
661
|
+
for (; e instanceof ht; ) e = e.node;
|
|
662
|
+
if (!(e instanceof xt)) return null;
|
|
648
663
|
let n = e.items.length, r = -1;
|
|
649
664
|
for (let o = n - 1; o >= 0; --o) {
|
|
650
665
|
let a = e.items[o];
|
|
@@ -663,7 +678,7 @@ var _s = ee((Ps) => {
|
|
|
663
678
|
for (; e.range.end = i, e.valueRange && e.valueRange.end > i && (e.valueRange.end = i), e !== t; ) e = e.context.parent;
|
|
664
679
|
return s;
|
|
665
680
|
}
|
|
666
|
-
var
|
|
681
|
+
var xt = class t extends u.Node {
|
|
667
682
|
static nextContentHasIndent(e, n, r) {
|
|
668
683
|
let s = u.Node.endOfLine(e, n) + 1;
|
|
669
684
|
n = u.Node.endOfWhiteSpace(e, s);
|
|
@@ -701,7 +716,7 @@ var _s = ee((Ps) => {
|
|
|
701
716
|
` || l === "#"; ) {
|
|
702
717
|
if (f && l === `
|
|
703
718
|
` && !m) {
|
|
704
|
-
let h = new
|
|
719
|
+
let h = new Se();
|
|
705
720
|
if (c = h.parse({
|
|
706
721
|
src: s
|
|
707
722
|
}, c), this.valueRange.end = c, c >= s.length) {
|
|
@@ -711,7 +726,7 @@ var _s = ee((Ps) => {
|
|
|
711
726
|
this.items.push(h), c -= 1;
|
|
712
727
|
} else if (l === "#") {
|
|
713
728
|
if (c < i + a && !t.nextContentHasIndent(s, c, a)) return c;
|
|
714
|
-
let h = new
|
|
729
|
+
let h = new Ee();
|
|
715
730
|
if (c = h.parse({
|
|
716
731
|
indent: a,
|
|
717
732
|
lineStart: i,
|
|
@@ -796,7 +811,7 @@ var _s = ee((Ps) => {
|
|
|
796
811
|
}
|
|
797
812
|
return u.Node.addStringTerminator(e, r.end, i);
|
|
798
813
|
}
|
|
799
|
-
},
|
|
814
|
+
}, _n = class extends u.Node {
|
|
800
815
|
constructor() {
|
|
801
816
|
super(u.Type.DIRECTIVE), this.name = null;
|
|
802
817
|
}
|
|
@@ -825,7 +840,7 @@ var _s = ee((Ps) => {
|
|
|
825
840
|
let r = this.parseName(n + 1);
|
|
826
841
|
return r = this.parseParameters(r), r = this.parseComment(r), this.range = new u.Range(n, r), r;
|
|
827
842
|
}
|
|
828
|
-
},
|
|
843
|
+
}, Rn = class t extends u.Node {
|
|
829
844
|
static startCommentOrEndBlankLine(e, n) {
|
|
830
845
|
let r = u.Node.endOfWhiteSpace(e, n), s = e[r];
|
|
831
846
|
return s === "#" || s === `
|
|
@@ -844,7 +859,7 @@ var _s = ee((Ps) => {
|
|
|
844
859
|
case `
|
|
845
860
|
`:
|
|
846
861
|
if (r) {
|
|
847
|
-
let o = new
|
|
862
|
+
let o = new Se();
|
|
848
863
|
i = o.parse({
|
|
849
864
|
src: n
|
|
850
865
|
}, i), i < n.length && this.directives.push(o);
|
|
@@ -852,7 +867,7 @@ var _s = ee((Ps) => {
|
|
|
852
867
|
break;
|
|
853
868
|
case "#":
|
|
854
869
|
{
|
|
855
|
-
let o = new
|
|
870
|
+
let o = new Ee();
|
|
856
871
|
i = o.parse({
|
|
857
872
|
src: n
|
|
858
873
|
}, i), this.directives.push(o), r = false;
|
|
@@ -860,7 +875,7 @@ var _s = ee((Ps) => {
|
|
|
860
875
|
break;
|
|
861
876
|
case "%":
|
|
862
877
|
{
|
|
863
|
-
let o = new
|
|
878
|
+
let o = new _n();
|
|
864
879
|
i = o.parse({
|
|
865
880
|
parent: this,
|
|
866
881
|
src: n
|
|
@@ -886,7 +901,7 @@ var _s = ee((Ps) => {
|
|
|
886
901
|
case `
|
|
887
902
|
`:
|
|
888
903
|
if (o) {
|
|
889
|
-
let a = new
|
|
904
|
+
let a = new Se();
|
|
890
905
|
i = a.parse({
|
|
891
906
|
src: r
|
|
892
907
|
}, i), i < r.length && this.contents.push(a);
|
|
@@ -895,7 +910,7 @@ var _s = ee((Ps) => {
|
|
|
895
910
|
break;
|
|
896
911
|
case "#":
|
|
897
912
|
{
|
|
898
|
-
let a = new
|
|
913
|
+
let a = new Ee();
|
|
899
914
|
i = a.parse({
|
|
900
915
|
src: r
|
|
901
916
|
}, i), this.contents.push(a), o = false;
|
|
@@ -920,7 +935,7 @@ var _s = ee((Ps) => {
|
|
|
920
935
|
}
|
|
921
936
|
if (this.valueRange.end = i, r[i] && (this.documentEndMarker = new u.Range(i, i + 3), i += 3, r[i])) {
|
|
922
937
|
if (i = u.Node.endOfWhiteSpace(r, i), r[i] === "#") {
|
|
923
|
-
let a = new
|
|
938
|
+
let a = new Ee();
|
|
924
939
|
i = a.parse({
|
|
925
940
|
src: r
|
|
926
941
|
}, i), this.contents.push(a);
|
|
@@ -965,7 +980,7 @@ var _s = ee((Ps) => {
|
|
|
965
980
|
` && (s += `
|
|
966
981
|
`), s;
|
|
967
982
|
}
|
|
968
|
-
},
|
|
983
|
+
}, xn = class extends u.Node {
|
|
969
984
|
parse(e, n) {
|
|
970
985
|
this.context = e;
|
|
971
986
|
let {
|
|
@@ -973,16 +988,16 @@ var _s = ee((Ps) => {
|
|
|
973
988
|
} = e, s = u.Node.endOfIdentifier(r, n + 1);
|
|
974
989
|
return this.valueRange = new u.Range(n + 1, s), s = u.Node.endOfWhiteSpace(r, s), s = this.parseComment(s), s;
|
|
975
990
|
}
|
|
976
|
-
},
|
|
991
|
+
}, ae = {
|
|
977
992
|
CLIP: "CLIP",
|
|
978
993
|
KEEP: "KEEP",
|
|
979
994
|
STRIP: "STRIP"
|
|
980
|
-
},
|
|
995
|
+
}, Dn = class extends u.Node {
|
|
981
996
|
constructor(e, n) {
|
|
982
|
-
super(e, n), this.blockIndent = null, this.chomping =
|
|
997
|
+
super(e, n), this.blockIndent = null, this.chomping = ae.CLIP, this.header = null;
|
|
983
998
|
}
|
|
984
999
|
get includesTrailingLines() {
|
|
985
|
-
return this.chomping ===
|
|
1000
|
+
return this.chomping === ae.KEEP;
|
|
986
1001
|
}
|
|
987
1002
|
get strValue() {
|
|
988
1003
|
if (!this.valueRange || !this.context) return null;
|
|
@@ -998,14 +1013,14 @@ var _s = ee((Ps) => {
|
|
|
998
1013
|
for (; o === `
|
|
999
1014
|
` || o === " " || o === " "; ) {
|
|
1000
1015
|
if (n -= 1, n <= e) {
|
|
1001
|
-
if (this.chomping ===
|
|
1016
|
+
if (this.chomping === ae.KEEP) break;
|
|
1002
1017
|
return "";
|
|
1003
1018
|
}
|
|
1004
1019
|
o === `
|
|
1005
1020
|
` && (i = n), o = s[n - 1];
|
|
1006
1021
|
}
|
|
1007
1022
|
let a = n + 1;
|
|
1008
|
-
i && (this.chomping ===
|
|
1023
|
+
i && (this.chomping === ae.KEEP ? (a = i, n = this.valueRange.end) : n = i);
|
|
1009
1024
|
let c = r + this.blockIndent, l = this.type === u.Type.BLOCK_FOLDED, f = true, m = "", d = "", y = false;
|
|
1010
1025
|
for (let h = e; h < n; ++h) {
|
|
1011
1026
|
for (let w = 0; w < c && s[h] === " "; ++w) h += 1;
|
|
@@ -1016,16 +1031,16 @@ var _s = ee((Ps) => {
|
|
|
1016
1031
|
` : d = `
|
|
1017
1032
|
`;
|
|
1018
1033
|
else {
|
|
1019
|
-
let w = u.Node.endOfLine(s, h),
|
|
1034
|
+
let w = u.Node.endOfLine(s, h), M = s.slice(h, w);
|
|
1020
1035
|
h = w, l && (g === " " || g === " ") && h < a ? (d === " " ? d = `
|
|
1021
1036
|
` : !y && !f && d === `
|
|
1022
1037
|
` && (d = `
|
|
1023
1038
|
|
|
1024
|
-
`), m += d +
|
|
1025
|
-
`, y = false), f &&
|
|
1039
|
+
`), m += d + M, d = w < n && s[w] || "", y = true) : (m += d + M, d = l && h < a ? " " : `
|
|
1040
|
+
`, y = false), f && M !== "" && (f = false);
|
|
1026
1041
|
}
|
|
1027
1042
|
}
|
|
1028
|
-
return this.chomping ===
|
|
1043
|
+
return this.chomping === ae.STRIP ? m : m + `
|
|
1029
1044
|
`;
|
|
1030
1045
|
}
|
|
1031
1046
|
parseBlockHeader(e) {
|
|
@@ -1036,10 +1051,10 @@ var _s = ee((Ps) => {
|
|
|
1036
1051
|
let i = n[r];
|
|
1037
1052
|
switch (i) {
|
|
1038
1053
|
case "-":
|
|
1039
|
-
this.chomping =
|
|
1054
|
+
this.chomping = ae.STRIP;
|
|
1040
1055
|
break;
|
|
1041
1056
|
case "+":
|
|
1042
|
-
this.chomping =
|
|
1057
|
+
this.chomping = ae.KEEP;
|
|
1043
1058
|
break;
|
|
1044
1059
|
case "0":
|
|
1045
1060
|
case "1":
|
|
@@ -1089,7 +1104,7 @@ var _s = ee((Ps) => {
|
|
|
1089
1104
|
r[l] === `
|
|
1090
1105
|
` ? i = l : i = o = u.Node.endOfLine(r, l);
|
|
1091
1106
|
}
|
|
1092
|
-
return this.chomping !==
|
|
1107
|
+
return this.chomping !== ae.KEEP && (i = r[o] ? o + 1 : o), this.valueRange = new u.Range(e + 1, i), i;
|
|
1093
1108
|
}
|
|
1094
1109
|
parse(e, n) {
|
|
1095
1110
|
this.context = e;
|
|
@@ -1101,7 +1116,7 @@ var _s = ee((Ps) => {
|
|
|
1101
1116
|
setOrigRanges(e, n) {
|
|
1102
1117
|
return n = super.setOrigRanges(e, n), this.header ? this.header.setOrigRange(e, n) : n;
|
|
1103
1118
|
}
|
|
1104
|
-
},
|
|
1119
|
+
}, Yn = class extends u.Node {
|
|
1105
1120
|
constructor(e, n) {
|
|
1106
1121
|
super(e, n), this.items = null;
|
|
1107
1122
|
}
|
|
@@ -1132,7 +1147,7 @@ var _s = ee((Ps) => {
|
|
|
1132
1147
|
let l = u.Node.endOfWhiteSpace(s, o);
|
|
1133
1148
|
if (s[l] === `
|
|
1134
1149
|
`) {
|
|
1135
|
-
let f = new
|
|
1150
|
+
let f = new Se();
|
|
1136
1151
|
o = f.parse({
|
|
1137
1152
|
src: s
|
|
1138
1153
|
}, o), this.items.push(f);
|
|
@@ -1151,7 +1166,7 @@ var _s = ee((Ps) => {
|
|
|
1151
1166
|
break;
|
|
1152
1167
|
case "#":
|
|
1153
1168
|
{
|
|
1154
|
-
let l = new
|
|
1169
|
+
let l = new Ee();
|
|
1155
1170
|
c = l.parse({
|
|
1156
1171
|
src: s
|
|
1157
1172
|
}, c), this.items.push(l);
|
|
@@ -1219,7 +1234,7 @@ var _s = ee((Ps) => {
|
|
|
1219
1234
|
` && (a += 1);
|
|
1220
1235
|
}), o += e.slice(a, r.end), u.Node.addStringTerminator(e, r.end, o);
|
|
1221
1236
|
}
|
|
1222
|
-
},
|
|
1237
|
+
}, $n = class t extends u.Node {
|
|
1223
1238
|
static endOfQuote(e, n) {
|
|
1224
1239
|
let r = e[n];
|
|
1225
1240
|
for (; r && r !== '"'; ) n += r === "\\" ? 2 : 1, r = e[n];
|
|
@@ -1344,7 +1359,7 @@ var _s = ee((Ps) => {
|
|
|
1344
1359
|
} = e, s = t.endOfQuote(r, n + 1);
|
|
1345
1360
|
return this.valueRange = new u.Range(n, s), s = u.Node.endOfWhiteSpace(r, s), s = this.parseComment(s), s;
|
|
1346
1361
|
}
|
|
1347
|
-
},
|
|
1362
|
+
}, Bn = class t extends u.Node {
|
|
1348
1363
|
static endOfQuote(e, n) {
|
|
1349
1364
|
let r = e[n];
|
|
1350
1365
|
for (; r; ) if (r === "'") {
|
|
@@ -1396,32 +1411,32 @@ var _s = ee((Ps) => {
|
|
|
1396
1411
|
return this.valueRange = new u.Range(n, s), s = u.Node.endOfWhiteSpace(r, s), s = this.parseComment(s), s;
|
|
1397
1412
|
}
|
|
1398
1413
|
};
|
|
1399
|
-
function
|
|
1414
|
+
function To(t, e) {
|
|
1400
1415
|
switch (t) {
|
|
1401
1416
|
case u.Type.ALIAS:
|
|
1402
|
-
return new
|
|
1417
|
+
return new xn(t, e);
|
|
1403
1418
|
case u.Type.BLOCK_FOLDED:
|
|
1404
1419
|
case u.Type.BLOCK_LITERAL:
|
|
1405
|
-
return new
|
|
1420
|
+
return new Dn(t, e);
|
|
1406
1421
|
case u.Type.FLOW_MAP:
|
|
1407
1422
|
case u.Type.FLOW_SEQ:
|
|
1408
|
-
return new
|
|
1423
|
+
return new Yn(t, e);
|
|
1409
1424
|
case u.Type.MAP_KEY:
|
|
1410
1425
|
case u.Type.MAP_VALUE:
|
|
1411
1426
|
case u.Type.SEQ_ITEM:
|
|
1412
|
-
return new
|
|
1427
|
+
return new ht(t, e);
|
|
1413
1428
|
case u.Type.COMMENT:
|
|
1414
1429
|
case u.Type.PLAIN:
|
|
1415
1430
|
return new u.PlainValue(t, e);
|
|
1416
1431
|
case u.Type.QUOTE_DOUBLE:
|
|
1417
|
-
return new
|
|
1432
|
+
return new $n(t, e);
|
|
1418
1433
|
case u.Type.QUOTE_SINGLE:
|
|
1419
|
-
return new
|
|
1434
|
+
return new Bn(t, e);
|
|
1420
1435
|
default:
|
|
1421
1436
|
return null;
|
|
1422
1437
|
}
|
|
1423
1438
|
}
|
|
1424
|
-
var
|
|
1439
|
+
var Fn = class t {
|
|
1425
1440
|
static parseType(e, n, r) {
|
|
1426
1441
|
switch (e[n]) {
|
|
1427
1442
|
case "*":
|
|
@@ -1462,10 +1477,10 @@ var _s = ee((Ps) => {
|
|
|
1462
1477
|
props: m,
|
|
1463
1478
|
type: d,
|
|
1464
1479
|
valueStart: y
|
|
1465
|
-
} = f.parseProps(l), h =
|
|
1480
|
+
} = f.parseProps(l), h = To(d, m), g = h.parse(f, y);
|
|
1466
1481
|
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)) {
|
|
1467
1482
|
!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)"));
|
|
1468
|
-
let w = new
|
|
1483
|
+
let w = new xt(h);
|
|
1469
1484
|
return g = w.parse(new t(f), g), w.range = new u.Range(l, g), w;
|
|
1470
1485
|
}
|
|
1471
1486
|
return h;
|
|
@@ -1478,7 +1493,7 @@ var _s = ee((Ps) => {
|
|
|
1478
1493
|
src: s
|
|
1479
1494
|
} = this;
|
|
1480
1495
|
if (n || r) return false;
|
|
1481
|
-
if (e instanceof
|
|
1496
|
+
if (e instanceof ht) return true;
|
|
1482
1497
|
let i = e.range.end;
|
|
1483
1498
|
return s[i] === `
|
|
1484
1499
|
` || s[i - 1] === `
|
|
@@ -1522,13 +1537,13 @@ var _s = ee((Ps) => {
|
|
|
1522
1537
|
};
|
|
1523
1538
|
}
|
|
1524
1539
|
};
|
|
1525
|
-
function
|
|
1540
|
+
function Mo(t) {
|
|
1526
1541
|
let e = [];
|
|
1527
1542
|
t.indexOf("\r") !== -1 && (t = t.replace(/\r\n?/g, (s, i) => (s.length > 1 && e.push(i), `
|
|
1528
1543
|
`)));
|
|
1529
1544
|
let n = [], r = 0;
|
|
1530
1545
|
do {
|
|
1531
|
-
let s = new
|
|
1546
|
+
let s = new Rn(), i = new Fn({
|
|
1532
1547
|
src: t
|
|
1533
1548
|
});
|
|
1534
1549
|
r = s.parse(i, r), n.push(s);
|
|
@@ -1542,23 +1557,23 @@ var _s = ee((Ps) => {
|
|
|
1542
1557
|
}, n.toString = () => n.join(`...
|
|
1543
1558
|
`), n;
|
|
1544
1559
|
}
|
|
1545
|
-
|
|
1560
|
+
ts.parse = Mo;
|
|
1546
1561
|
});
|
|
1547
|
-
var
|
|
1548
|
-
var p =
|
|
1549
|
-
function
|
|
1562
|
+
var qe = te((k) => {
|
|
1563
|
+
var p = oe();
|
|
1564
|
+
function Co(t, e, n) {
|
|
1550
1565
|
return n ? `#${n.replace(/[\s\S]^/gm, `$&${e}#`)}
|
|
1551
1566
|
${e}${t}` : t;
|
|
1552
1567
|
}
|
|
1553
|
-
function
|
|
1568
|
+
function Fe(t, e, n) {
|
|
1554
1569
|
return n ? n.indexOf(`
|
|
1555
1570
|
`) === -1 ? `${t} #${n}` : `${t}
|
|
1556
1571
|
` + n.replace(/^/gm, `${e || ""}#`) : t;
|
|
1557
1572
|
}
|
|
1558
|
-
var
|
|
1573
|
+
var j = class {
|
|
1559
1574
|
};
|
|
1560
|
-
function
|
|
1561
|
-
if (Array.isArray(t)) return t.map((r, s) =>
|
|
1575
|
+
function ce(t, e, n) {
|
|
1576
|
+
if (Array.isArray(t)) return t.map((r, s) => ce(r, String(s), n));
|
|
1562
1577
|
if (t && typeof t.toJSON == "function") {
|
|
1563
1578
|
let r = n && n.anchors && n.anchors.get(t);
|
|
1564
1579
|
r && (n.onCreate = (i) => {
|
|
@@ -1569,18 +1584,18 @@ ${e}${t}` : t;
|
|
|
1569
1584
|
}
|
|
1570
1585
|
return (!n || !n.keep) && typeof t == "bigint" ? Number(t) : t;
|
|
1571
1586
|
}
|
|
1572
|
-
var
|
|
1587
|
+
var _ = class extends j {
|
|
1573
1588
|
constructor(e) {
|
|
1574
1589
|
super(), this.value = e;
|
|
1575
1590
|
}
|
|
1576
1591
|
toJSON(e, n) {
|
|
1577
|
-
return n && n.keep ? this.value :
|
|
1592
|
+
return n && n.keep ? this.value : ce(this.value, e, n);
|
|
1578
1593
|
}
|
|
1579
1594
|
toString() {
|
|
1580
1595
|
return String(this.value);
|
|
1581
1596
|
}
|
|
1582
1597
|
};
|
|
1583
|
-
function
|
|
1598
|
+
function rs(t, e, n) {
|
|
1584
1599
|
let r = n;
|
|
1585
1600
|
for (let s = e.length - 1; s >= 0; --s) {
|
|
1586
1601
|
let i = e[s];
|
|
@@ -1599,16 +1614,16 @@ ${e}${t}` : t;
|
|
|
1599
1614
|
}
|
|
1600
1615
|
return t.createNode(r, false);
|
|
1601
1616
|
}
|
|
1602
|
-
var
|
|
1617
|
+
var os = (t) => t == null || typeof t == "object" && t[Symbol.iterator]().next().done, W = class t extends j {
|
|
1603
1618
|
constructor(e) {
|
|
1604
1619
|
super(), p._defineProperty(this, "items", []), this.schema = e;
|
|
1605
1620
|
}
|
|
1606
1621
|
addIn(e, n) {
|
|
1607
|
-
if (
|
|
1622
|
+
if (os(e)) this.add(n);
|
|
1608
1623
|
else {
|
|
1609
1624
|
let [r, ...s] = e, i = this.get(r, true);
|
|
1610
1625
|
if (i instanceof t) i.addIn(s, n);
|
|
1611
|
-
else if (i === void 0 && this.schema) this.set(r,
|
|
1626
|
+
else if (i === void 0 && this.schema) this.set(r, rs(this.schema, s, n));
|
|
1612
1627
|
else throw new Error(`Expected YAML collection at ${r}. Remaining path: ${s}`);
|
|
1613
1628
|
}
|
|
1614
1629
|
}
|
|
@@ -1620,13 +1635,13 @@ ${e}${t}` : t;
|
|
|
1620
1635
|
}
|
|
1621
1636
|
getIn([e, ...n], r) {
|
|
1622
1637
|
let s = this.get(e, true);
|
|
1623
|
-
return n.length === 0 ? !r && s instanceof
|
|
1638
|
+
return n.length === 0 ? !r && s instanceof _ ? s.value : s : s instanceof t ? s.getIn(n, r) : void 0;
|
|
1624
1639
|
}
|
|
1625
1640
|
hasAllNullValues() {
|
|
1626
1641
|
return this.items.every((e) => {
|
|
1627
1642
|
if (!e || e.type !== "PAIR") return false;
|
|
1628
1643
|
let n = e.value;
|
|
1629
|
-
return n == null || n instanceof
|
|
1644
|
+
return n == null || n instanceof _ && n.value == null && !n.commentBefore && !n.comment && !n.tag;
|
|
1630
1645
|
});
|
|
1631
1646
|
}
|
|
1632
1647
|
hasIn([e, ...n]) {
|
|
@@ -1639,7 +1654,7 @@ ${e}${t}` : t;
|
|
|
1639
1654
|
else {
|
|
1640
1655
|
let s = this.get(e, true);
|
|
1641
1656
|
if (s instanceof t) s.setIn(n, r);
|
|
1642
|
-
else if (s === void 0 && this.schema) this.set(e,
|
|
1657
|
+
else if (s === void 0 && this.schema) this.set(e, rs(this.schema, n, r));
|
|
1643
1658
|
else throw new Error(`Expected YAML collection at ${e}. Remaining path: ${n}`);
|
|
1644
1659
|
}
|
|
1645
1660
|
}
|
|
@@ -1665,43 +1680,43 @@ ${e}${t}` : t;
|
|
|
1665
1680
|
inFlow: m,
|
|
1666
1681
|
type: null
|
|
1667
1682
|
});
|
|
1668
|
-
let y = false, h = false, g = this.items.reduce((
|
|
1669
|
-
let
|
|
1670
|
-
|
|
1683
|
+
let y = false, h = false, g = this.items.reduce((M, A, C) => {
|
|
1684
|
+
let L;
|
|
1685
|
+
A && (!y && A.spaceBefore && M.push({
|
|
1671
1686
|
type: "comment",
|
|
1672
1687
|
str: ""
|
|
1673
|
-
}),
|
|
1674
|
-
|
|
1688
|
+
}), A.commentBefore && A.commentBefore.match(/^.*$/gm).forEach((Di) => {
|
|
1689
|
+
M.push({
|
|
1675
1690
|
type: "comment",
|
|
1676
|
-
str: `#${
|
|
1691
|
+
str: `#${Di}`
|
|
1677
1692
|
});
|
|
1678
|
-
}),
|
|
1679
|
-
let
|
|
1680
|
-
return m && !h &&
|
|
1681
|
-
`) && (h = true), m &&
|
|
1693
|
+
}), 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;
|
|
1694
|
+
let R = f(A, e, () => L = null, () => y = true);
|
|
1695
|
+
return m && !h && R.includes(`
|
|
1696
|
+
`) && (h = true), m && C < this.items.length - 1 && (R += ","), R = Fe(R, i, L), y && (L || m) && (y = false), M.push({
|
|
1682
1697
|
type: "item",
|
|
1683
|
-
str:
|
|
1684
|
-
}),
|
|
1698
|
+
str: R
|
|
1699
|
+
}), M;
|
|
1685
1700
|
}, []), w;
|
|
1686
1701
|
if (g.length === 0) w = r.start + r.end;
|
|
1687
1702
|
else if (m) {
|
|
1688
1703
|
let {
|
|
1689
|
-
start:
|
|
1690
|
-
end:
|
|
1691
|
-
} = r,
|
|
1692
|
-
if (h ||
|
|
1693
|
-
w =
|
|
1694
|
-
for (let
|
|
1695
|
-
${l}${c}${
|
|
1704
|
+
start: M,
|
|
1705
|
+
end: A
|
|
1706
|
+
} = r, C = g.map((L) => L.str);
|
|
1707
|
+
if (h || C.reduce((L, R) => L + R.length + 2, 2) > t.maxFlowStringSingleLineLength) {
|
|
1708
|
+
w = M;
|
|
1709
|
+
for (let L of C) w += L ? `
|
|
1710
|
+
${l}${c}${L}` : `
|
|
1696
1711
|
`;
|
|
1697
1712
|
w += `
|
|
1698
|
-
${c}${
|
|
1699
|
-
} else w = `${
|
|
1713
|
+
${c}${A}`;
|
|
1714
|
+
} else w = `${M} ${C.join(" ")} ${A}`;
|
|
1700
1715
|
} else {
|
|
1701
|
-
let
|
|
1702
|
-
w =
|
|
1703
|
-
for (let
|
|
1704
|
-
${c}${
|
|
1716
|
+
let M = g.map(n);
|
|
1717
|
+
w = M.shift();
|
|
1718
|
+
for (let A of M) w += A ? `
|
|
1719
|
+
${c}${A}` : `
|
|
1705
1720
|
`;
|
|
1706
1721
|
}
|
|
1707
1722
|
return this.comment ? (w += `
|
|
@@ -1709,30 +1724,30 @@ ${c}${L}` : `
|
|
|
1709
1724
|
}
|
|
1710
1725
|
};
|
|
1711
1726
|
p._defineProperty(W, "maxFlowStringSingleLineLength", 60);
|
|
1712
|
-
function
|
|
1713
|
-
let e = t instanceof
|
|
1727
|
+
function Dt(t) {
|
|
1728
|
+
let e = t instanceof _ ? t.value : t;
|
|
1714
1729
|
return e && typeof e == "string" && (e = Number(e)), Number.isInteger(e) && e >= 0 ? e : null;
|
|
1715
1730
|
}
|
|
1716
|
-
var
|
|
1731
|
+
var le = class extends W {
|
|
1717
1732
|
add(e) {
|
|
1718
1733
|
this.items.push(e);
|
|
1719
1734
|
}
|
|
1720
1735
|
delete(e) {
|
|
1721
|
-
let n =
|
|
1736
|
+
let n = Dt(e);
|
|
1722
1737
|
return typeof n != "number" ? false : this.items.splice(n, 1).length > 0;
|
|
1723
1738
|
}
|
|
1724
1739
|
get(e, n) {
|
|
1725
|
-
let r =
|
|
1740
|
+
let r = Dt(e);
|
|
1726
1741
|
if (typeof r != "number") return;
|
|
1727
1742
|
let s = this.items[r];
|
|
1728
|
-
return !n && s instanceof
|
|
1743
|
+
return !n && s instanceof _ ? s.value : s;
|
|
1729
1744
|
}
|
|
1730
1745
|
has(e) {
|
|
1731
|
-
let n =
|
|
1746
|
+
let n = Dt(e);
|
|
1732
1747
|
return typeof n == "number" && n < this.items.length;
|
|
1733
1748
|
}
|
|
1734
1749
|
set(e, n) {
|
|
1735
|
-
let r =
|
|
1750
|
+
let r = Dt(e);
|
|
1736
1751
|
if (typeof r != "number") throw new Error(`Expected a valid index, not ${e}.`);
|
|
1737
1752
|
this.items[r] = n;
|
|
1738
1753
|
}
|
|
@@ -1740,7 +1755,7 @@ ${c}${L}` : `
|
|
|
1740
1755
|
let r = [];
|
|
1741
1756
|
n && n.onCreate && n.onCreate(r);
|
|
1742
1757
|
let s = 0;
|
|
1743
|
-
for (let i of this.items) r.push(
|
|
1758
|
+
for (let i of this.items) r.push(ce(i, String(s++), n));
|
|
1744
1759
|
return r;
|
|
1745
1760
|
}
|
|
1746
1761
|
toString(e, n, r) {
|
|
@@ -1754,7 +1769,7 @@ ${c}${L}` : `
|
|
|
1754
1769
|
itemIndent: (e.indent || "") + " "
|
|
1755
1770
|
}, n, r) : JSON.stringify(this);
|
|
1756
1771
|
}
|
|
1757
|
-
},
|
|
1772
|
+
}, ko = (t, e, n) => e === null ? "" : typeof e != "object" ? String(e) : t instanceof j && n && n.doc ? t.toString({
|
|
1758
1773
|
anchors: /* @__PURE__ */ Object.create(null),
|
|
1759
1774
|
doc: n.doc,
|
|
1760
1775
|
indent: "",
|
|
@@ -1762,28 +1777,28 @@ ${c}${L}` : `
|
|
|
1762
1777
|
inFlow: true,
|
|
1763
1778
|
inStringifyKey: true,
|
|
1764
1779
|
stringify: n.stringify
|
|
1765
|
-
}) : JSON.stringify(e), T = class t extends
|
|
1780
|
+
}) : JSON.stringify(e), T = class t extends j {
|
|
1766
1781
|
constructor(e, n = null) {
|
|
1767
1782
|
super(), this.key = e, this.value = n, this.type = t.Type.PAIR;
|
|
1768
1783
|
}
|
|
1769
1784
|
get commentBefore() {
|
|
1770
|
-
return this.key instanceof
|
|
1785
|
+
return this.key instanceof j ? this.key.commentBefore : void 0;
|
|
1771
1786
|
}
|
|
1772
1787
|
set commentBefore(e) {
|
|
1773
|
-
if (this.key == null && (this.key = new
|
|
1788
|
+
if (this.key == null && (this.key = new _(null)), this.key instanceof j) this.key.commentBefore = e;
|
|
1774
1789
|
else {
|
|
1775
1790
|
let n = "Pair.commentBefore is an alias for Pair.key.commentBefore. To set it, the key must be a Node.";
|
|
1776
1791
|
throw new Error(n);
|
|
1777
1792
|
}
|
|
1778
1793
|
}
|
|
1779
1794
|
addToJSMap(e, n) {
|
|
1780
|
-
let r =
|
|
1795
|
+
let r = ce(this.key, "", e);
|
|
1781
1796
|
if (n instanceof Map) {
|
|
1782
|
-
let s =
|
|
1797
|
+
let s = ce(this.value, r, e);
|
|
1783
1798
|
n.set(r, s);
|
|
1784
1799
|
} else if (n instanceof Set) n.add(r);
|
|
1785
1800
|
else {
|
|
1786
|
-
let s =
|
|
1801
|
+
let s = ko(this.key, r, e), i = ce(this.value, s, e);
|
|
1787
1802
|
s in n ? Object.defineProperty(n, s, {
|
|
1788
1803
|
value: i,
|
|
1789
1804
|
writable: true,
|
|
@@ -1806,15 +1821,15 @@ ${c}${L}` : `
|
|
|
1806
1821
|
} = e.doc.options, {
|
|
1807
1822
|
key: a,
|
|
1808
1823
|
value: c
|
|
1809
|
-
} = this, l = a instanceof
|
|
1824
|
+
} = this, l = a instanceof j && a.comment;
|
|
1810
1825
|
if (o) {
|
|
1811
1826
|
if (l) throw new Error("With simple keys, key nodes cannot have comments");
|
|
1812
1827
|
if (a instanceof W) {
|
|
1813
|
-
let
|
|
1814
|
-
throw new Error(
|
|
1828
|
+
let R = "With simple keys, collection cannot be used as a key value";
|
|
1829
|
+
throw new Error(R);
|
|
1815
1830
|
}
|
|
1816
1831
|
}
|
|
1817
|
-
let f = !o && (!a || l || (a instanceof
|
|
1832
|
+
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")), {
|
|
1818
1833
|
doc: m,
|
|
1819
1834
|
indent: d,
|
|
1820
1835
|
indentStep: y,
|
|
@@ -1825,53 +1840,53 @@ ${c}${L}` : `
|
|
|
1825
1840
|
indent: d + y
|
|
1826
1841
|
});
|
|
1827
1842
|
let g = false, w = h(a, e, () => l = null, () => g = true);
|
|
1828
|
-
if (w =
|
|
1843
|
+
if (w = Fe(w, e.indent, l), !f && w.length > 1024) {
|
|
1829
1844
|
if (o) throw new Error("With simple keys, single line scalar must not span more than 1024 characters");
|
|
1830
1845
|
f = true;
|
|
1831
1846
|
}
|
|
1832
|
-
if (e.allNullValues && !o) return this.comment ? (w =
|
|
1847
|
+
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}`;
|
|
1833
1848
|
w = f ? `? ${w}
|
|
1834
|
-
${d}:` : `${w}:`, this.comment && (w =
|
|
1835
|
-
let
|
|
1836
|
-
if (c instanceof
|
|
1837
|
-
if (c.spaceBefore && (
|
|
1849
|
+
${d}:` : `${w}:`, this.comment && (w = Fe(w, e.indent, this.comment), n && n());
|
|
1850
|
+
let M = "", A = null;
|
|
1851
|
+
if (c instanceof j) {
|
|
1852
|
+
if (c.spaceBefore && (M = `
|
|
1838
1853
|
`), c.commentBefore) {
|
|
1839
|
-
let
|
|
1840
|
-
|
|
1841
|
-
${
|
|
1854
|
+
let R = c.commentBefore.replace(/^/gm, `${e.indent}#`);
|
|
1855
|
+
M += `
|
|
1856
|
+
${R}`;
|
|
1842
1857
|
}
|
|
1843
|
-
|
|
1858
|
+
A = c.comment;
|
|
1844
1859
|
} else c && typeof c == "object" && (c = m.schema.createNode(c, true));
|
|
1845
|
-
e.implicitKey = false, !f && !this.comment && c instanceof
|
|
1846
|
-
let
|
|
1847
|
-
return
|
|
1848
|
-
${e.indent}` : !f && c instanceof W ? (!(
|
|
1849
|
-
`)) && (
|
|
1850
|
-
${e.indent}`) :
|
|
1851
|
-
` && (
|
|
1860
|
+
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));
|
|
1861
|
+
let C = h(c, e, () => A = null, () => g = true), L = " ";
|
|
1862
|
+
return M || this.comment ? L = `${M}
|
|
1863
|
+
${e.indent}` : !f && c instanceof W ? (!(C[0] === "[" || C[0] === "{") || C.includes(`
|
|
1864
|
+
`)) && (L = `
|
|
1865
|
+
${e.indent}`) : C[0] === `
|
|
1866
|
+
` && (L = ""), g && !A && r && r(), Fe(w + L + C, e.indent, A);
|
|
1852
1867
|
}
|
|
1853
1868
|
};
|
|
1854
1869
|
p._defineProperty(T, "Type", {
|
|
1855
1870
|
PAIR: "PAIR",
|
|
1856
1871
|
MERGE_PAIR: "MERGE_PAIR"
|
|
1857
1872
|
});
|
|
1858
|
-
var
|
|
1859
|
-
if (t instanceof
|
|
1873
|
+
var Yt = (t, e) => {
|
|
1874
|
+
if (t instanceof be) {
|
|
1860
1875
|
let n = e.get(t.source);
|
|
1861
1876
|
return n.count * n.aliasCount;
|
|
1862
1877
|
} else if (t instanceof W) {
|
|
1863
1878
|
let n = 0;
|
|
1864
1879
|
for (let r of t.items) {
|
|
1865
|
-
let s =
|
|
1880
|
+
let s = Yt(r, e);
|
|
1866
1881
|
s > n && (n = s);
|
|
1867
1882
|
}
|
|
1868
1883
|
return n;
|
|
1869
1884
|
} else if (t instanceof T) {
|
|
1870
|
-
let n =
|
|
1885
|
+
let n = Yt(t.key, e), r = Yt(t.value, e);
|
|
1871
1886
|
return Math.max(n, r);
|
|
1872
1887
|
}
|
|
1873
1888
|
return 1;
|
|
1874
|
-
},
|
|
1889
|
+
}, be = class t extends j {
|
|
1875
1890
|
static stringify({
|
|
1876
1891
|
range: e,
|
|
1877
1892
|
source: n
|
|
@@ -1893,7 +1908,7 @@ ${e.indent}`) : M[0] === `
|
|
|
1893
1908
|
throw new Error("Alias nodes cannot have tags");
|
|
1894
1909
|
}
|
|
1895
1910
|
toJSON(e, n) {
|
|
1896
|
-
if (!n) return
|
|
1911
|
+
if (!n) return ce(this.source, e, n);
|
|
1897
1912
|
let {
|
|
1898
1913
|
anchors: r,
|
|
1899
1914
|
maxAliasCount: s
|
|
@@ -1902,7 +1917,7 @@ ${e.indent}`) : M[0] === `
|
|
|
1902
1917
|
let o = "This should not happen: Alias anchor was not resolved?";
|
|
1903
1918
|
throw this.cstNode ? new p.YAMLReferenceError(this.cstNode, o) : new ReferenceError(o);
|
|
1904
1919
|
}
|
|
1905
|
-
if (s >= 0 && (i.count += 1, i.aliasCount === 0 && (i.aliasCount =
|
|
1920
|
+
if (s >= 0 && (i.count += 1, i.aliasCount === 0 && (i.aliasCount = Yt(this.source, r)), i.count * i.aliasCount > s)) {
|
|
1906
1921
|
let o = "Excessive alias count indicates a resource exhaustion attack";
|
|
1907
1922
|
throw this.cstNode ? new p.YAMLReferenceError(this.cstNode, o) : new ReferenceError(o);
|
|
1908
1923
|
}
|
|
@@ -1912,15 +1927,15 @@ ${e.indent}`) : M[0] === `
|
|
|
1912
1927
|
return t.stringify(this, e);
|
|
1913
1928
|
}
|
|
1914
1929
|
};
|
|
1915
|
-
p._defineProperty(
|
|
1916
|
-
function
|
|
1917
|
-
let n = e instanceof
|
|
1930
|
+
p._defineProperty(be, "default", true);
|
|
1931
|
+
function gt(t, e) {
|
|
1932
|
+
let n = e instanceof _ ? e.value : e;
|
|
1918
1933
|
for (let r of t) if (r instanceof T && (r.key === e || r.key === n || r.key && r.key.value === n)) return r;
|
|
1919
1934
|
}
|
|
1920
|
-
var
|
|
1935
|
+
var dt = class extends W {
|
|
1921
1936
|
add(e, n) {
|
|
1922
1937
|
e ? e instanceof T || (e = new T(e.key || e, e.value)) : e = new T(e);
|
|
1923
|
-
let r =
|
|
1938
|
+
let r = gt(this.items, e.key), s = this.schema && this.schema.sortMapEntries;
|
|
1924
1939
|
if (r) {
|
|
1925
1940
|
if (n) r.value = e.value;
|
|
1926
1941
|
else throw new Error(`Key ${e.key} already set`);
|
|
@@ -1930,15 +1945,15 @@ ${e.indent}`) : M[0] === `
|
|
|
1930
1945
|
} else this.items.push(e);
|
|
1931
1946
|
}
|
|
1932
1947
|
delete(e) {
|
|
1933
|
-
let n =
|
|
1948
|
+
let n = gt(this.items, e);
|
|
1934
1949
|
return n ? this.items.splice(this.items.indexOf(n), 1).length > 0 : false;
|
|
1935
1950
|
}
|
|
1936
1951
|
get(e, n) {
|
|
1937
|
-
let r =
|
|
1938
|
-
return !n && s instanceof
|
|
1952
|
+
let r = gt(this.items, e), s = r && r.value;
|
|
1953
|
+
return !n && s instanceof _ ? s.value : s;
|
|
1939
1954
|
}
|
|
1940
1955
|
has(e) {
|
|
1941
|
-
return !!
|
|
1956
|
+
return !!gt(this.items, e);
|
|
1942
1957
|
}
|
|
1943
1958
|
set(e, n) {
|
|
1944
1959
|
this.add(new T(e, n), true);
|
|
@@ -1962,19 +1977,19 @@ ${e.indent}`) : M[0] === `
|
|
|
1962
1977
|
itemIndent: e.indent || ""
|
|
1963
1978
|
}, n, r);
|
|
1964
1979
|
}
|
|
1965
|
-
},
|
|
1980
|
+
}, as = "<<", Ft = class extends T {
|
|
1966
1981
|
constructor(e) {
|
|
1967
1982
|
if (e instanceof T) {
|
|
1968
1983
|
let n = e.value;
|
|
1969
|
-
n instanceof
|
|
1970
|
-
} else super(new
|
|
1984
|
+
n instanceof le || (n = new le(), n.items.push(e.value), n.range = e.value.range), super(e.key, n), this.range = e.range;
|
|
1985
|
+
} else super(new _(as), new le());
|
|
1971
1986
|
this.type = T.Type.MERGE_PAIR;
|
|
1972
1987
|
}
|
|
1973
1988
|
addToJSMap(e, n) {
|
|
1974
1989
|
for (let {
|
|
1975
1990
|
source: r
|
|
1976
1991
|
} of this.value.items) {
|
|
1977
|
-
if (!(r instanceof
|
|
1992
|
+
if (!(r instanceof dt)) throw new Error("Merge sources must be maps");
|
|
1978
1993
|
let s = r.toJSON(null, e, Map);
|
|
1979
1994
|
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, {
|
|
1980
1995
|
value: o,
|
|
@@ -1995,14 +2010,14 @@ ${e.indent}`) : M[0] === `
|
|
|
1995
2010
|
}, Po = {
|
|
1996
2011
|
defaultType: p.Type.BLOCK_LITERAL,
|
|
1997
2012
|
lineWidth: 76
|
|
1998
|
-
},
|
|
2013
|
+
}, Io = {
|
|
1999
2014
|
trueStr: "true",
|
|
2000
2015
|
falseStr: "false"
|
|
2001
|
-
},
|
|
2016
|
+
}, vo = {
|
|
2002
2017
|
asBigInt: false
|
|
2003
|
-
},
|
|
2018
|
+
}, _o = {
|
|
2004
2019
|
nullStr: "null"
|
|
2005
|
-
},
|
|
2020
|
+
}, Ne = {
|
|
2006
2021
|
defaultType: p.Type.PLAIN,
|
|
2007
2022
|
doubleQuoted: {
|
|
2008
2023
|
jsonEncoding: false,
|
|
@@ -2013,7 +2028,7 @@ ${e.indent}`) : M[0] === `
|
|
|
2013
2028
|
minContentWidth: 20
|
|
2014
2029
|
}
|
|
2015
2030
|
};
|
|
2016
|
-
function
|
|
2031
|
+
function Un(t, e, n) {
|
|
2017
2032
|
for (let {
|
|
2018
2033
|
format: r,
|
|
2019
2034
|
test: s,
|
|
@@ -2022,12 +2037,12 @@ ${e.indent}`) : M[0] === `
|
|
|
2022
2037
|
let o = t.match(s);
|
|
2023
2038
|
if (o) {
|
|
2024
2039
|
let a = i.apply(null, o);
|
|
2025
|
-
return a instanceof
|
|
2040
|
+
return a instanceof _ || (a = new _(a)), r && (a.format = r), a;
|
|
2026
2041
|
}
|
|
2027
2042
|
}
|
|
2028
|
-
return n && (t = n(t)), new
|
|
2043
|
+
return n && (t = n(t)), new _(t);
|
|
2029
2044
|
}
|
|
2030
|
-
var
|
|
2045
|
+
var cs = "flow", qn = "block", $t = "quoted", ss = (t, e) => {
|
|
2031
2046
|
let n = t[e + 1];
|
|
2032
2047
|
for (; n === " " || n === " "; ) {
|
|
2033
2048
|
do
|
|
@@ -2038,7 +2053,7 @@ ${e.indent}`) : M[0] === `
|
|
|
2038
2053
|
}
|
|
2039
2054
|
return e;
|
|
2040
2055
|
};
|
|
2041
|
-
function
|
|
2056
|
+
function qt(t, e, n, {
|
|
2042
2057
|
indentAtStart: r,
|
|
2043
2058
|
lineWidth: s = 80,
|
|
2044
2059
|
minContentWidth: i = 20,
|
|
@@ -2050,10 +2065,10 @@ ${e.indent}`) : M[0] === `
|
|
|
2050
2065
|
if (t.length <= c) return t;
|
|
2051
2066
|
let l = [], f = {}, m = s - e.length;
|
|
2052
2067
|
typeof r == "number" && (r > s - Math.max(2, i) ? l.push(0) : m = s - r);
|
|
2053
|
-
let d, y, h = false, g = -1, w = -1,
|
|
2054
|
-
n ===
|
|
2055
|
-
for (let
|
|
2056
|
-
if (n ===
|
|
2068
|
+
let d, y, h = false, g = -1, w = -1, M = -1;
|
|
2069
|
+
n === qn && (g = ss(t, g), g !== -1 && (m = g + c));
|
|
2070
|
+
for (let C; C = t[g += 1]; ) {
|
|
2071
|
+
if (n === $t && C === "\\") {
|
|
2057
2072
|
switch (w = g, t[g + 1]) {
|
|
2058
2073
|
case "x":
|
|
2059
2074
|
g += 3;
|
|
@@ -2067,44 +2082,44 @@ ${e.indent}`) : M[0] === `
|
|
|
2067
2082
|
default:
|
|
2068
2083
|
g += 1;
|
|
2069
2084
|
}
|
|
2070
|
-
|
|
2085
|
+
M = g;
|
|
2071
2086
|
}
|
|
2072
|
-
if (
|
|
2073
|
-
`) n ===
|
|
2087
|
+
if (C === `
|
|
2088
|
+
`) n === qn && (g = ss(t, g)), m = g + c, d = void 0;
|
|
2074
2089
|
else {
|
|
2075
|
-
if (
|
|
2090
|
+
if (C === " " && y && y !== " " && y !== `
|
|
2076
2091
|
` && y !== " ") {
|
|
2077
|
-
let
|
|
2078
|
-
|
|
2079
|
-
` &&
|
|
2092
|
+
let L = t[g + 1];
|
|
2093
|
+
L && L !== " " && L !== `
|
|
2094
|
+
` && L !== " " && (d = g);
|
|
2080
2095
|
}
|
|
2081
2096
|
if (g >= m) if (d) l.push(d), m = d + c, d = void 0;
|
|
2082
|
-
else if (n ===
|
|
2083
|
-
for (; y === " " || y === " "; ) y =
|
|
2084
|
-
let
|
|
2085
|
-
if (f[
|
|
2086
|
-
l.push(
|
|
2097
|
+
else if (n === $t) {
|
|
2098
|
+
for (; y === " " || y === " "; ) y = C, C = t[g += 1], h = true;
|
|
2099
|
+
let L = g > M + 1 ? g - 2 : w - 1;
|
|
2100
|
+
if (f[L]) return t;
|
|
2101
|
+
l.push(L), f[L] = true, m = L + c, d = void 0;
|
|
2087
2102
|
} else h = true;
|
|
2088
2103
|
}
|
|
2089
|
-
y =
|
|
2104
|
+
y = C;
|
|
2090
2105
|
}
|
|
2091
2106
|
if (h && a && a(), l.length === 0) return t;
|
|
2092
2107
|
o && o();
|
|
2093
|
-
let
|
|
2094
|
-
for (let
|
|
2095
|
-
let
|
|
2096
|
-
|
|
2097
|
-
${e}${t.slice(0,
|
|
2098
|
-
${e}${t.slice(
|
|
2099
|
-
}
|
|
2100
|
-
return
|
|
2108
|
+
let A = t.slice(0, l[0]);
|
|
2109
|
+
for (let C = 0; C < l.length; ++C) {
|
|
2110
|
+
let L = l[C], R = l[C + 1] || t.length;
|
|
2111
|
+
L === 0 ? A = `
|
|
2112
|
+
${e}${t.slice(0, R)}` : (n === $t && f[L] && (A += `${t[L]}\\`), A += `
|
|
2113
|
+
${e}${t.slice(L + 1, R)}`);
|
|
2114
|
+
}
|
|
2115
|
+
return A;
|
|
2101
2116
|
}
|
|
2102
|
-
var
|
|
2117
|
+
var Kn = ({
|
|
2103
2118
|
indentAtStart: t
|
|
2104
2119
|
}) => t ? Object.assign({
|
|
2105
2120
|
indentAtStart: t
|
|
2106
|
-
},
|
|
2107
|
-
function
|
|
2121
|
+
}, Ne.fold) : Ne.fold, Ut = (t) => /^(%|---|\.\.\.)/m.test(t);
|
|
2122
|
+
function Ro(t, e, n) {
|
|
2108
2123
|
if (!e || e < 0) return false;
|
|
2109
2124
|
let r = e - n, s = t.length;
|
|
2110
2125
|
if (s <= r) return false;
|
|
@@ -2115,15 +2130,15 @@ ${e}${t.slice(A + 1, _)}`);
|
|
|
2115
2130
|
}
|
|
2116
2131
|
return true;
|
|
2117
2132
|
}
|
|
2118
|
-
function
|
|
2133
|
+
function we(t, e) {
|
|
2119
2134
|
let {
|
|
2120
2135
|
implicitKey: n
|
|
2121
2136
|
} = e, {
|
|
2122
2137
|
jsonEncoding: r,
|
|
2123
2138
|
minMultiLineLength: s
|
|
2124
|
-
} =
|
|
2139
|
+
} = Ne.doubleQuoted, i = JSON.stringify(t);
|
|
2125
2140
|
if (r) return i;
|
|
2126
|
-
let o = e.indent || (
|
|
2141
|
+
let o = e.indent || (Ut(t) ? " " : ""), a = "", c = 0;
|
|
2127
2142
|
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]) {
|
|
2128
2143
|
case "u":
|
|
2129
2144
|
{
|
|
@@ -2173,23 +2188,23 @@ ${e}${t.slice(A + 1, _)}`);
|
|
|
2173
2188
|
default:
|
|
2174
2189
|
l += 1;
|
|
2175
2190
|
}
|
|
2176
|
-
return a = c ? a + i.slice(c) : i, n ? a :
|
|
2191
|
+
return a = c ? a + i.slice(c) : i, n ? a : qt(a, o, $t, Kn(e));
|
|
2177
2192
|
}
|
|
2178
|
-
function
|
|
2193
|
+
function ls(t, e) {
|
|
2179
2194
|
if (e.implicitKey) {
|
|
2180
|
-
if (/\n/.test(t)) return
|
|
2181
|
-
} else if (/[ \t]\n|\n[ \t]/.test(t)) return
|
|
2182
|
-
let n = e.indent || (
|
|
2195
|
+
if (/\n/.test(t)) return we(t, e);
|
|
2196
|
+
} else if (/[ \t]\n|\n[ \t]/.test(t)) return we(t, e);
|
|
2197
|
+
let n = e.indent || (Ut(t) ? " " : ""), r = "'" + t.replace(/'/g, "''").replace(/\n+/g, `$&
|
|
2183
2198
|
${n}`) + "'";
|
|
2184
|
-
return e.implicitKey ? r :
|
|
2199
|
+
return e.implicitKey ? r : qt(r, n, cs, Kn(e));
|
|
2185
2200
|
}
|
|
2186
|
-
function
|
|
2201
|
+
function Bt({
|
|
2187
2202
|
comment: t,
|
|
2188
2203
|
type: e,
|
|
2189
2204
|
value: n
|
|
2190
2205
|
}, r, s, i) {
|
|
2191
|
-
if (/\n[\t ]+$/.test(n) || /^\s*$/.test(n)) return
|
|
2192
|
-
let o = r.indent || (r.forceBlockIndent ||
|
|
2206
|
+
if (/\n[\t ]+$/.test(n) || /^\s*$/.test(n)) return we(n, r);
|
|
2207
|
+
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 ? "|" : ">";
|
|
2193
2208
|
if (!n) return l + `
|
|
2194
2209
|
`;
|
|
2195
2210
|
let f = "", m = "";
|
|
@@ -2207,11 +2222,11 @@ ${o}${m}`;
|
|
|
2207
2222
|
${o}${f}${n}${m}`;
|
|
2208
2223
|
n = n.replace(/\n+/g, `
|
|
2209
2224
|
$&`).replace(/(?:^|\n)([\t ].*)(?:([\n\t ]*)\n(?![\n\t ]))?/g, "$1$2").replace(/\n+/g, `$&${o}`);
|
|
2210
|
-
let d =
|
|
2225
|
+
let d = qt(`${f}${n}${m}`, o, qn, Ne.fold);
|
|
2211
2226
|
return `${l}
|
|
2212
2227
|
${o}${d}`;
|
|
2213
2228
|
}
|
|
2214
|
-
function
|
|
2229
|
+
function xo(t, e, n, r) {
|
|
2215
2230
|
let {
|
|
2216
2231
|
comment: s,
|
|
2217
2232
|
type: i,
|
|
@@ -2222,29 +2237,29 @@ ${o}${d}`;
|
|
|
2222
2237
|
indent: l,
|
|
2223
2238
|
inFlow: f
|
|
2224
2239
|
} = e;
|
|
2225
|
-
if (c && /[\n[\]{},]/.test(o) || f && /[[\]{},]/.test(o)) return
|
|
2240
|
+
if (c && /[\n[\]{},]/.test(o) || f && /[[\]{},]/.test(o)) return we(o, e);
|
|
2226
2241
|
if (!o || /^[\n\t ,[\]{}#&*!|>'"%@`]|^[?-]$|^[?-][ \t]|[\n:][ \t]|[ \t]\n|[\n\t ]#|[\n\t :]$/.test(o)) return c || f || o.indexOf(`
|
|
2227
|
-
`) === -1 ? o.indexOf('"') !== -1 && o.indexOf("'") === -1 ?
|
|
2242
|
+
`) === -1 ? o.indexOf('"') !== -1 && o.indexOf("'") === -1 ? ls(o, e) : we(o, e) : Bt(t, e, n, r);
|
|
2228
2243
|
if (!c && !f && i !== p.Type.PLAIN && o.indexOf(`
|
|
2229
|
-
`) !== -1) return
|
|
2230
|
-
if (l === "" &&
|
|
2244
|
+
`) !== -1) return Bt(t, e, n, r);
|
|
2245
|
+
if (l === "" && Ut(o)) return e.forceBlockIndent = true, Bt(t, e, n, r);
|
|
2231
2246
|
let m = o.replace(/\n+/g, `$&
|
|
2232
2247
|
${l}`);
|
|
2233
2248
|
if (a) {
|
|
2234
2249
|
let {
|
|
2235
2250
|
tags: y
|
|
2236
2251
|
} = e.doc.schema;
|
|
2237
|
-
if (typeof
|
|
2252
|
+
if (typeof Un(m, y, y.scalarFallback).value != "string") return we(o, e);
|
|
2238
2253
|
}
|
|
2239
|
-
let d = c ? m :
|
|
2254
|
+
let d = c ? m : qt(m, l, cs, Kn(e));
|
|
2240
2255
|
return s && !f && (d.indexOf(`
|
|
2241
2256
|
`) !== -1 || s.indexOf(`
|
|
2242
|
-
`) !== -1) ? (n && n(),
|
|
2257
|
+
`) !== -1) ? (n && n(), Co(d, l, s)) : d;
|
|
2243
2258
|
}
|
|
2244
|
-
function
|
|
2259
|
+
function Do(t, e, n, r) {
|
|
2245
2260
|
let {
|
|
2246
2261
|
defaultType: s
|
|
2247
|
-
} =
|
|
2262
|
+
} = Ne, {
|
|
2248
2263
|
implicitKey: i,
|
|
2249
2264
|
inFlow: o
|
|
2250
2265
|
} = e, {
|
|
@@ -2258,13 +2273,13 @@ ${l}`);
|
|
|
2258
2273
|
switch (m) {
|
|
2259
2274
|
case p.Type.BLOCK_FOLDED:
|
|
2260
2275
|
case p.Type.BLOCK_LITERAL:
|
|
2261
|
-
return
|
|
2276
|
+
return Bt(t, e, n, r);
|
|
2262
2277
|
case p.Type.QUOTE_DOUBLE:
|
|
2263
|
-
return
|
|
2278
|
+
return we(c, e);
|
|
2264
2279
|
case p.Type.QUOTE_SINGLE:
|
|
2265
|
-
return
|
|
2280
|
+
return ls(c, e);
|
|
2266
2281
|
case p.Type.PLAIN:
|
|
2267
|
-
return
|
|
2282
|
+
return xo(t, e, n, r);
|
|
2268
2283
|
default:
|
|
2269
2284
|
return null;
|
|
2270
2285
|
}
|
|
@@ -2274,7 +2289,7 @@ ${l}`);
|
|
|
2274
2289
|
if (f === null && (f = l(s), f === null)) throw new Error(`Unsupported default string type ${s}`);
|
|
2275
2290
|
return f;
|
|
2276
2291
|
}
|
|
2277
|
-
function
|
|
2292
|
+
function Yo({
|
|
2278
2293
|
format: t,
|
|
2279
2294
|
minFractionDigits: e,
|
|
2280
2295
|
tag: n,
|
|
@@ -2291,7 +2306,7 @@ ${l}`);
|
|
|
2291
2306
|
}
|
|
2292
2307
|
return s;
|
|
2293
2308
|
}
|
|
2294
|
-
function
|
|
2309
|
+
function fs(t, e) {
|
|
2295
2310
|
let n, r;
|
|
2296
2311
|
switch (e.type) {
|
|
2297
2312
|
case p.Type.FLOW_MAP:
|
|
@@ -2317,7 +2332,7 @@ ${l}`);
|
|
|
2317
2332
|
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);
|
|
2318
2333
|
}
|
|
2319
2334
|
}
|
|
2320
|
-
function
|
|
2335
|
+
function us(t, e) {
|
|
2321
2336
|
let n = e.context.src[e.range.start - 1];
|
|
2322
2337
|
if (n !== `
|
|
2323
2338
|
` && n !== " " && n !== " ") {
|
|
@@ -2325,11 +2340,11 @@ ${l}`);
|
|
|
2325
2340
|
t.push(new p.YAMLSemanticError(e, r));
|
|
2326
2341
|
}
|
|
2327
2342
|
}
|
|
2328
|
-
function
|
|
2343
|
+
function ps(t, e) {
|
|
2329
2344
|
let n = String(e), r = n.substr(0, 8) + "..." + n.substr(-8);
|
|
2330
2345
|
return new p.YAMLSemanticError(t, `The "${r}" key is too long`);
|
|
2331
2346
|
}
|
|
2332
|
-
function
|
|
2347
|
+
function ms(t, e) {
|
|
2333
2348
|
for (let {
|
|
2334
2349
|
afterKey: n,
|
|
2335
2350
|
before: r,
|
|
@@ -2341,13 +2356,13 @@ ${l}`);
|
|
|
2341
2356
|
` + s : t.comment = s);
|
|
2342
2357
|
}
|
|
2343
2358
|
}
|
|
2344
|
-
function
|
|
2359
|
+
function Vn(t, e) {
|
|
2345
2360
|
let n = e.strValue;
|
|
2346
2361
|
return n ? typeof n == "string" ? n : (n.errors.forEach((r) => {
|
|
2347
2362
|
r.source || (r.source = e), t.errors.push(r);
|
|
2348
2363
|
}), n.str) : "";
|
|
2349
2364
|
}
|
|
2350
|
-
function
|
|
2365
|
+
function $o(t, e) {
|
|
2351
2366
|
let {
|
|
2352
2367
|
handle: n,
|
|
2353
2368
|
suffix: r
|
|
@@ -2366,7 +2381,7 @@ ${l}`);
|
|
|
2366
2381
|
}
|
|
2367
2382
|
return s.prefix + decodeURIComponent(r);
|
|
2368
2383
|
}
|
|
2369
|
-
function
|
|
2384
|
+
function Bo(t, e) {
|
|
2370
2385
|
let {
|
|
2371
2386
|
tag: n,
|
|
2372
2387
|
type: r
|
|
@@ -2383,7 +2398,7 @@ ${l}`);
|
|
|
2383
2398
|
t.errors.push(new p.YAMLSemanticError(e, c));
|
|
2384
2399
|
} else if (i === "!" && !o) s = true;
|
|
2385
2400
|
else try {
|
|
2386
|
-
return
|
|
2401
|
+
return $o(t, e);
|
|
2387
2402
|
} catch (c) {
|
|
2388
2403
|
t.errors.push(c);
|
|
2389
2404
|
}
|
|
@@ -2406,19 +2421,19 @@ ${l}`);
|
|
|
2406
2421
|
return null;
|
|
2407
2422
|
}
|
|
2408
2423
|
}
|
|
2409
|
-
function
|
|
2424
|
+
function is(t, e, n) {
|
|
2410
2425
|
let {
|
|
2411
2426
|
tags: r
|
|
2412
2427
|
} = t.schema, s = [];
|
|
2413
2428
|
for (let o of r) if (o.tag === n) if (o.test) s.push(o);
|
|
2414
2429
|
else {
|
|
2415
2430
|
let a = o.resolve(t, e);
|
|
2416
|
-
return a instanceof W ? a : new
|
|
2431
|
+
return a instanceof W ? a : new _(a);
|
|
2417
2432
|
}
|
|
2418
|
-
let i =
|
|
2419
|
-
return typeof i == "string" && s.length > 0 ?
|
|
2433
|
+
let i = Vn(t, e);
|
|
2434
|
+
return typeof i == "string" && s.length > 0 ? Un(i, s, r.scalarFallback) : null;
|
|
2420
2435
|
}
|
|
2421
|
-
function
|
|
2436
|
+
function Fo({
|
|
2422
2437
|
type: t
|
|
2423
2438
|
}) {
|
|
2424
2439
|
switch (t) {
|
|
@@ -2432,37 +2447,37 @@ ${l}`);
|
|
|
2432
2447
|
return p.defaultTags.STR;
|
|
2433
2448
|
}
|
|
2434
2449
|
}
|
|
2435
|
-
function
|
|
2450
|
+
function qo(t, e, n) {
|
|
2436
2451
|
try {
|
|
2437
|
-
let r =
|
|
2452
|
+
let r = is(t, e, n);
|
|
2438
2453
|
if (r) return n && e.tag && (r.tag = n), r;
|
|
2439
2454
|
} catch (r) {
|
|
2440
2455
|
return r.source || (r.source = e), t.errors.push(r), null;
|
|
2441
2456
|
}
|
|
2442
2457
|
try {
|
|
2443
|
-
let r =
|
|
2458
|
+
let r = Fo(e);
|
|
2444
2459
|
if (!r) throw new Error(`The tag ${n} is unavailable`);
|
|
2445
2460
|
let s = `The tag ${n} is unavailable, falling back to ${r}`;
|
|
2446
2461
|
t.warnings.push(new p.YAMLWarning(e, s));
|
|
2447
|
-
let i =
|
|
2462
|
+
let i = is(t, e, r);
|
|
2448
2463
|
return i.tag = n, i;
|
|
2449
2464
|
} catch (r) {
|
|
2450
2465
|
let s = new p.YAMLReferenceError(e, r.message);
|
|
2451
2466
|
return s.stack = r.stack, t.errors.push(s), null;
|
|
2452
2467
|
}
|
|
2453
2468
|
}
|
|
2454
|
-
var
|
|
2469
|
+
var Uo = (t) => {
|
|
2455
2470
|
if (!t) return false;
|
|
2456
2471
|
let {
|
|
2457
2472
|
type: e
|
|
2458
2473
|
} = t;
|
|
2459
2474
|
return e === p.Type.MAP_KEY || e === p.Type.MAP_VALUE || e === p.Type.SEQ_ITEM;
|
|
2460
2475
|
};
|
|
2461
|
-
function
|
|
2476
|
+
function Ko(t, e) {
|
|
2462
2477
|
let n = {
|
|
2463
2478
|
before: [],
|
|
2464
2479
|
after: []
|
|
2465
|
-
}, r = false, s = false, i =
|
|
2480
|
+
}, r = false, s = false, i = Uo(e.context.parent) ? e.context.parent.props.concat(e.props) : e.props;
|
|
2466
2481
|
for (let {
|
|
2467
2482
|
start: o,
|
|
2468
2483
|
end: a
|
|
@@ -2500,7 +2515,7 @@ ${l}`);
|
|
|
2500
2515
|
hasTag: s
|
|
2501
2516
|
};
|
|
2502
2517
|
}
|
|
2503
|
-
function
|
|
2518
|
+
function Vo(t, e) {
|
|
2504
2519
|
let {
|
|
2505
2520
|
anchors: n,
|
|
2506
2521
|
errors: r,
|
|
@@ -2512,30 +2527,30 @@ ${l}`);
|
|
|
2512
2527
|
let l = `Aliased anchor not found: ${o}`;
|
|
2513
2528
|
return r.push(new p.YAMLReferenceError(e, l)), null;
|
|
2514
2529
|
}
|
|
2515
|
-
let c = new
|
|
2530
|
+
let c = new be(a);
|
|
2516
2531
|
return n._cstAliases.push(c), c;
|
|
2517
2532
|
}
|
|
2518
|
-
let i =
|
|
2519
|
-
if (i) return
|
|
2533
|
+
let i = Bo(t, e);
|
|
2534
|
+
if (i) return qo(t, e, i);
|
|
2520
2535
|
if (e.type !== p.Type.PLAIN) {
|
|
2521
2536
|
let o = `Failed to resolve ${e.type} node here`;
|
|
2522
2537
|
return r.push(new p.YAMLSyntaxError(e, o)), null;
|
|
2523
2538
|
}
|
|
2524
2539
|
try {
|
|
2525
|
-
let o =
|
|
2526
|
-
return
|
|
2540
|
+
let o = Vn(t, e);
|
|
2541
|
+
return Un(o, s.tags, s.tags.scalarFallback);
|
|
2527
2542
|
} catch (o) {
|
|
2528
2543
|
return o.source || (o.source = e), r.push(o), null;
|
|
2529
2544
|
}
|
|
2530
2545
|
}
|
|
2531
|
-
function
|
|
2546
|
+
function fe(t, e) {
|
|
2532
2547
|
if (!e) return null;
|
|
2533
2548
|
e.error && t.errors.push(e.error);
|
|
2534
2549
|
let {
|
|
2535
2550
|
comments: n,
|
|
2536
2551
|
hasAnchor: r,
|
|
2537
2552
|
hasTag: s
|
|
2538
|
-
} =
|
|
2553
|
+
} = Ko(t.errors, e);
|
|
2539
2554
|
if (r) {
|
|
2540
2555
|
let {
|
|
2541
2556
|
anchors: o
|
|
@@ -2546,7 +2561,7 @@ ${l}`);
|
|
|
2546
2561
|
let o = "An alias node must not specify any properties";
|
|
2547
2562
|
t.errors.push(new p.YAMLSemanticError(e, o));
|
|
2548
2563
|
}
|
|
2549
|
-
let i =
|
|
2564
|
+
let i = Vo(t, e);
|
|
2550
2565
|
if (i) {
|
|
2551
2566
|
i.range = [e.range.start, e.range.end], t.options.keepCstNodes && (i.cstNode = e), t.options.keepNodeTypes && (i.type = e.type);
|
|
2552
2567
|
let o = n.before.join(`
|
|
@@ -2560,7 +2575,7 @@ ${a}` : a);
|
|
|
2560
2575
|
}
|
|
2561
2576
|
return e.resolved = i;
|
|
2562
2577
|
}
|
|
2563
|
-
function
|
|
2578
|
+
function jo(t, e) {
|
|
2564
2579
|
if (e.type !== p.Type.MAP && e.type !== p.Type.FLOW_MAP) {
|
|
2565
2580
|
let o = `A ${e.type} node cannot be resolved as a mapping`;
|
|
2566
2581
|
return t.errors.push(new p.YAMLSyntaxError(e, o)), null;
|
|
@@ -2568,18 +2583,18 @@ ${a}` : a);
|
|
|
2568
2583
|
let {
|
|
2569
2584
|
comments: n,
|
|
2570
2585
|
items: r
|
|
2571
|
-
} = e.type === p.Type.FLOW_MAP ?
|
|
2572
|
-
s.items = r,
|
|
2586
|
+
} = e.type === p.Type.FLOW_MAP ? Ho(t, e) : Go(t, e), s = new dt();
|
|
2587
|
+
s.items = r, ms(s, n);
|
|
2573
2588
|
let i = false;
|
|
2574
2589
|
for (let o = 0; o < r.length; ++o) {
|
|
2575
2590
|
let {
|
|
2576
2591
|
key: a
|
|
2577
2592
|
} = r[o];
|
|
2578
|
-
if (a instanceof W && (i = true), t.schema.merge && a && a.value ===
|
|
2579
|
-
r[o] = new
|
|
2593
|
+
if (a instanceof W && (i = true), t.schema.merge && a && a.value === as) {
|
|
2594
|
+
r[o] = new Ft(r[o]);
|
|
2580
2595
|
let c = r[o].value.items, l = null;
|
|
2581
2596
|
c.some((f) => {
|
|
2582
|
-
if (f instanceof
|
|
2597
|
+
if (f instanceof be) {
|
|
2583
2598
|
let {
|
|
2584
2599
|
type: m
|
|
2585
2600
|
} = f.source;
|
|
@@ -2604,7 +2619,7 @@ ${a}` : a);
|
|
|
2604
2619
|
}
|
|
2605
2620
|
return e.resolved = s, s;
|
|
2606
2621
|
}
|
|
2607
|
-
var
|
|
2622
|
+
var Wo = ({
|
|
2608
2623
|
context: {
|
|
2609
2624
|
lineStart: t,
|
|
2610
2625
|
node: e,
|
|
@@ -2621,8 +2636,8 @@ ${a}` : a);
|
|
|
2621
2636
|
`) return false;
|
|
2622
2637
|
return true;
|
|
2623
2638
|
};
|
|
2624
|
-
function
|
|
2625
|
-
if (!
|
|
2639
|
+
function Qo(t, e) {
|
|
2640
|
+
if (!Wo(t)) return;
|
|
2626
2641
|
let n = t.getPropValue(0, p.Char.COMMENT, true), r = false, s = e.value.commentBefore;
|
|
2627
2642
|
if (s && s.startsWith(n)) e.value.commentBefore = s.substr(n.length + 1), r = true;
|
|
2628
2643
|
else {
|
|
@@ -2631,7 +2646,7 @@ ${a}` : a);
|
|
|
2631
2646
|
}
|
|
2632
2647
|
r && (e.comment = n);
|
|
2633
2648
|
}
|
|
2634
|
-
function
|
|
2649
|
+
function Go(t, e) {
|
|
2635
2650
|
let n = [], r = [], s, i = null;
|
|
2636
2651
|
for (let o = 0; o < e.items.length; ++o) {
|
|
2637
2652
|
let a = e.items[o];
|
|
@@ -2650,7 +2665,7 @@ ${a}` : a);
|
|
|
2650
2665
|
});
|
|
2651
2666
|
break;
|
|
2652
2667
|
case p.Type.MAP_KEY:
|
|
2653
|
-
s !== void 0 && r.push(new T(s)), a.error && t.errors.push(a.error), s =
|
|
2668
|
+
s !== void 0 && r.push(new T(s)), a.error && t.errors.push(a.error), s = fe(t, a.node), i = null;
|
|
2654
2669
|
break;
|
|
2655
2670
|
case p.Type.MAP_VALUE:
|
|
2656
2671
|
{
|
|
@@ -2676,12 +2691,12 @@ ${a}` : a);
|
|
|
2676
2691
|
c.range.origStart = c.range.origEnd = m, c.valueRange.origStart = c.valueRange.origEnd = m;
|
|
2677
2692
|
}
|
|
2678
2693
|
}
|
|
2679
|
-
let l = new T(s,
|
|
2680
|
-
|
|
2694
|
+
let l = new T(s, fe(t, c));
|
|
2695
|
+
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;
|
|
2681
2696
|
}
|
|
2682
2697
|
break;
|
|
2683
2698
|
default:
|
|
2684
|
-
s !== void 0 && r.push(new T(s)), s =
|
|
2699
|
+
s !== void 0 && r.push(new T(s)), s = fe(t, a), i = a.range.start, a.error && t.errors.push(a.error);
|
|
2685
2700
|
e: for (let c = o + 1; ; ++c) {
|
|
2686
2701
|
let l = e.items[c];
|
|
2687
2702
|
switch (l && l.type) {
|
|
@@ -2708,7 +2723,7 @@ ${a}` : a);
|
|
|
2708
2723
|
items: r
|
|
2709
2724
|
};
|
|
2710
2725
|
}
|
|
2711
|
-
function
|
|
2726
|
+
function Ho(t, e) {
|
|
2712
2727
|
let n = [], r = [], s, i = false, o = "{";
|
|
2713
2728
|
for (let a = 0; a < e.items.length; ++a) {
|
|
2714
2729
|
let c = e.items[a];
|
|
@@ -2741,18 +2756,18 @@ ${a}` : a);
|
|
|
2741
2756
|
} else c.type === p.Type.BLANK_LINE ? n.push({
|
|
2742
2757
|
afterKey: !!s,
|
|
2743
2758
|
before: r.length
|
|
2744
|
-
}) : c.type === p.Type.COMMENT ? (
|
|
2759
|
+
}) : c.type === p.Type.COMMENT ? (us(t.errors, c), n.push({
|
|
2745
2760
|
afterKey: !!s,
|
|
2746
2761
|
before: r.length,
|
|
2747
2762
|
comment: c.comment
|
|
2748
|
-
})) : s === void 0 ? (o === "," && t.errors.push(new p.YAMLSemanticError(c, "Separator , missing in flow map")), s =
|
|
2763
|
+
})) : 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);
|
|
2749
2764
|
}
|
|
2750
|
-
return
|
|
2765
|
+
return fs(t.errors, e), s !== void 0 && r.push(new T(s)), {
|
|
2751
2766
|
comments: n,
|
|
2752
2767
|
items: r
|
|
2753
2768
|
};
|
|
2754
2769
|
}
|
|
2755
|
-
function
|
|
2770
|
+
function Jo(t, e) {
|
|
2756
2771
|
if (e.type !== p.Type.SEQ && e.type !== p.Type.FLOW_SEQ) {
|
|
2757
2772
|
let i = `A ${e.type} node cannot be resolved as a sequence`;
|
|
2758
2773
|
return t.errors.push(new p.YAMLSyntaxError(e, i)), null;
|
|
@@ -2760,14 +2775,14 @@ ${a}` : a);
|
|
|
2760
2775
|
let {
|
|
2761
2776
|
comments: n,
|
|
2762
2777
|
items: r
|
|
2763
|
-
} = e.type === p.Type.FLOW_SEQ ?
|
|
2764
|
-
if (s.items = r,
|
|
2778
|
+
} = e.type === p.Type.FLOW_SEQ ? zo(t, e) : Xo(t, e), s = new le();
|
|
2779
|
+
if (s.items = r, ms(s, n), !t.options.mapAsMap && r.some((i) => i instanceof T && i.key instanceof W)) {
|
|
2765
2780
|
let i = "Keys with collection values will be stringified as YAML due to JS Object restrictions. Use mapAsMap: true to avoid this.";
|
|
2766
2781
|
t.warnings.push(new p.YAMLWarning(e, i));
|
|
2767
2782
|
}
|
|
2768
2783
|
return e.resolved = s, s;
|
|
2769
2784
|
}
|
|
2770
|
-
function
|
|
2785
|
+
function Xo(t, e) {
|
|
2771
2786
|
let n = [], r = [];
|
|
2772
2787
|
for (let s = 0; s < e.items.length; ++s) {
|
|
2773
2788
|
let i = e.items[s];
|
|
@@ -2784,7 +2799,7 @@ ${a}` : a);
|
|
|
2784
2799
|
});
|
|
2785
2800
|
break;
|
|
2786
2801
|
case p.Type.SEQ_ITEM:
|
|
2787
|
-
if (i.error && t.errors.push(i.error), r.push(
|
|
2802
|
+
if (i.error && t.errors.push(i.error), r.push(fe(t, i.node)), i.hasProps) {
|
|
2788
2803
|
let o = "Sequence items cannot have tags or anchors before the - indicator";
|
|
2789
2804
|
t.errors.push(new p.YAMLSemanticError(i, o));
|
|
2790
2805
|
}
|
|
@@ -2798,7 +2813,7 @@ ${a}` : a);
|
|
|
2798
2813
|
items: r
|
|
2799
2814
|
};
|
|
2800
2815
|
}
|
|
2801
|
-
function
|
|
2816
|
+
function zo(t, e) {
|
|
2802
2817
|
let n = [], r = [], s = false, i, o = null, a = "[", c = null;
|
|
2803
2818
|
for (let l = 0; l < e.items.length; ++l) {
|
|
2804
2819
|
let f = e.items[l];
|
|
@@ -2817,7 +2832,7 @@ ${a}` : a);
|
|
|
2817
2832
|
}
|
|
2818
2833
|
if (!s && typeof o == "number") {
|
|
2819
2834
|
let y = f.range ? f.range.start : f.offset;
|
|
2820
|
-
y > o + 1024 && t.errors.push(
|
|
2835
|
+
y > o + 1024 && t.errors.push(ps(e, i));
|
|
2821
2836
|
let {
|
|
2822
2837
|
src: h
|
|
2823
2838
|
} = c.context;
|
|
@@ -2837,7 +2852,7 @@ ${a}` : a);
|
|
|
2837
2852
|
} else if (f.type === p.Type.BLANK_LINE) n.push({
|
|
2838
2853
|
before: r.length
|
|
2839
2854
|
});
|
|
2840
|
-
else if (f.type === p.Type.COMMENT)
|
|
2855
|
+
else if (f.type === p.Type.COMMENT) us(t.errors, f), n.push({
|
|
2841
2856
|
comment: f.comment,
|
|
2842
2857
|
before: r.length
|
|
2843
2858
|
});
|
|
@@ -2846,41 +2861,41 @@ ${a}` : a);
|
|
|
2846
2861
|
let d = `Expected a ${a} in flow sequence`;
|
|
2847
2862
|
t.errors.push(new p.YAMLSemanticError(f, d));
|
|
2848
2863
|
}
|
|
2849
|
-
let m =
|
|
2864
|
+
let m = fe(t, f);
|
|
2850
2865
|
i === void 0 ? (r.push(m), c = f) : (r.push(new T(i, m)), i = void 0), o = f.range.start, a = ",";
|
|
2851
2866
|
}
|
|
2852
2867
|
}
|
|
2853
|
-
return
|
|
2868
|
+
return fs(t.errors, e), i !== void 0 && r.push(new T(i)), {
|
|
2854
2869
|
comments: n,
|
|
2855
2870
|
items: r
|
|
2856
2871
|
};
|
|
2857
2872
|
}
|
|
2858
|
-
k.Alias =
|
|
2873
|
+
k.Alias = be;
|
|
2859
2874
|
k.Collection = W;
|
|
2860
|
-
k.Merge =
|
|
2861
|
-
k.Node =
|
|
2875
|
+
k.Merge = Ft;
|
|
2876
|
+
k.Node = j;
|
|
2862
2877
|
k.Pair = T;
|
|
2863
|
-
k.Scalar =
|
|
2864
|
-
k.YAMLMap =
|
|
2865
|
-
k.YAMLSeq =
|
|
2866
|
-
k.addComment =
|
|
2878
|
+
k.Scalar = _;
|
|
2879
|
+
k.YAMLMap = dt;
|
|
2880
|
+
k.YAMLSeq = le;
|
|
2881
|
+
k.addComment = Fe;
|
|
2867
2882
|
k.binaryOptions = Po;
|
|
2868
|
-
k.boolOptions =
|
|
2869
|
-
k.findPair =
|
|
2870
|
-
k.intOptions =
|
|
2871
|
-
k.isEmptyPath =
|
|
2872
|
-
k.nullOptions =
|
|
2873
|
-
k.resolveMap =
|
|
2874
|
-
k.resolveNode =
|
|
2875
|
-
k.resolveSeq =
|
|
2876
|
-
k.resolveString =
|
|
2877
|
-
k.strOptions =
|
|
2878
|
-
k.stringifyNumber =
|
|
2879
|
-
k.stringifyString =
|
|
2880
|
-
k.toJSON =
|
|
2883
|
+
k.boolOptions = Io;
|
|
2884
|
+
k.findPair = gt;
|
|
2885
|
+
k.intOptions = vo;
|
|
2886
|
+
k.isEmptyPath = os;
|
|
2887
|
+
k.nullOptions = _o;
|
|
2888
|
+
k.resolveMap = jo;
|
|
2889
|
+
k.resolveNode = fe;
|
|
2890
|
+
k.resolveSeq = Jo;
|
|
2891
|
+
k.resolveString = Vn;
|
|
2892
|
+
k.strOptions = Ne;
|
|
2893
|
+
k.stringifyNumber = Yo;
|
|
2894
|
+
k.stringifyString = Do;
|
|
2895
|
+
k.toJSON = ce;
|
|
2881
2896
|
});
|
|
2882
|
-
var
|
|
2883
|
-
var
|
|
2897
|
+
var Gn = te((z) => {
|
|
2898
|
+
var Q = oe(), O = qe(), Zo = {
|
|
2884
2899
|
identify: (t) => t instanceof Uint8Array,
|
|
2885
2900
|
default: false,
|
|
2886
2901
|
tag: "tag:yaml.org,2002:binary",
|
|
@@ -2893,7 +2908,7 @@ var jn = ee((z) => {
|
|
|
2893
2908
|
return s;
|
|
2894
2909
|
} else {
|
|
2895
2910
|
let r = "This environment does not support reading binary tags; either Buffer or atob is required";
|
|
2896
|
-
return t.errors.push(new
|
|
2911
|
+
return t.errors.push(new Q.YAMLReferenceError(e, r)), null;
|
|
2897
2912
|
}
|
|
2898
2913
|
},
|
|
2899
2914
|
options: O.binaryOptions,
|
|
@@ -2909,13 +2924,13 @@ var jn = ee((z) => {
|
|
|
2909
2924
|
for (let c = 0; c < n.length; ++c) a += String.fromCharCode(n[c]);
|
|
2910
2925
|
o = btoa(a);
|
|
2911
2926
|
} else throw new Error("This environment does not support writing binary tags; either Buffer or btoa is required");
|
|
2912
|
-
if (e || (e = O.binaryOptions.defaultType), e ===
|
|
2927
|
+
if (e || (e = O.binaryOptions.defaultType), e === Q.Type.QUOTE_DOUBLE) n = o;
|
|
2913
2928
|
else {
|
|
2914
2929
|
let {
|
|
2915
2930
|
lineWidth: a
|
|
2916
2931
|
} = O.binaryOptions, c = Math.ceil(o.length / a), l = new Array(c);
|
|
2917
2932
|
for (let f = 0, m = 0; f < c; ++f, m += a) l[f] = o.substr(m, a);
|
|
2918
|
-
n = l.join(e ===
|
|
2933
|
+
n = l.join(e === Q.Type.BLOCK_LITERAL ? `
|
|
2919
2934
|
` : " ");
|
|
2920
2935
|
}
|
|
2921
2936
|
return O.stringifyString({
|
|
@@ -2925,7 +2940,7 @@ var jn = ee((z) => {
|
|
|
2925
2940
|
}, r, s, i);
|
|
2926
2941
|
}
|
|
2927
2942
|
};
|
|
2928
|
-
function
|
|
2943
|
+
function gs(t, e) {
|
|
2929
2944
|
let n = O.resolveSeq(t, e);
|
|
2930
2945
|
for (let r = 0; r < n.items.length; ++r) {
|
|
2931
2946
|
let s = n.items[r];
|
|
@@ -2933,7 +2948,7 @@ var jn = ee((z) => {
|
|
|
2933
2948
|
if (s instanceof O.YAMLMap) {
|
|
2934
2949
|
if (s.items.length > 1) {
|
|
2935
2950
|
let o = "Each pair must have its own sequence indicator";
|
|
2936
|
-
throw new
|
|
2951
|
+
throw new Q.YAMLSemanticError(e, o);
|
|
2937
2952
|
}
|
|
2938
2953
|
let i = s.items[0] || new O.Pair();
|
|
2939
2954
|
s.commentBefore && (i.commentBefore = i.commentBefore ? `${s.commentBefore}
|
|
@@ -2945,7 +2960,7 @@ ${i.comment}` : s.comment), s = i;
|
|
|
2945
2960
|
}
|
|
2946
2961
|
return n;
|
|
2947
2962
|
}
|
|
2948
|
-
function
|
|
2963
|
+
function ds(t, e, n) {
|
|
2949
2964
|
let r = new O.YAMLSeq(t);
|
|
2950
2965
|
r.tag = "tag:yaml.org,2002:pairs";
|
|
2951
2966
|
for (let s of e) {
|
|
@@ -2963,14 +2978,14 @@ ${i.comment}` : s.comment), s = i;
|
|
|
2963
2978
|
}
|
|
2964
2979
|
return r;
|
|
2965
2980
|
}
|
|
2966
|
-
var
|
|
2981
|
+
var ea = {
|
|
2967
2982
|
default: false,
|
|
2968
2983
|
tag: "tag:yaml.org,2002:pairs",
|
|
2969
|
-
resolve:
|
|
2970
|
-
createNode:
|
|
2971
|
-
},
|
|
2984
|
+
resolve: gs,
|
|
2985
|
+
createNode: ds
|
|
2986
|
+
}, Ue = class t extends O.YAMLSeq {
|
|
2972
2987
|
constructor() {
|
|
2973
|
-
super(),
|
|
2988
|
+
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;
|
|
2974
2989
|
}
|
|
2975
2990
|
toJSON(e, n) {
|
|
2976
2991
|
let r = /* @__PURE__ */ new Map();
|
|
@@ -2983,29 +2998,29 @@ ${i.comment}` : s.comment), s = i;
|
|
|
2983
2998
|
return r;
|
|
2984
2999
|
}
|
|
2985
3000
|
};
|
|
2986
|
-
|
|
2987
|
-
function
|
|
2988
|
-
let n =
|
|
3001
|
+
Q._defineProperty(Ue, "tag", "tag:yaml.org,2002:omap");
|
|
3002
|
+
function ta(t, e) {
|
|
3003
|
+
let n = gs(t, e), r = [];
|
|
2989
3004
|
for (let {
|
|
2990
3005
|
key: s
|
|
2991
3006
|
} of n.items) if (s instanceof O.Scalar) if (r.includes(s.value)) {
|
|
2992
3007
|
let i = "Ordered maps must not include duplicate keys";
|
|
2993
|
-
throw new
|
|
3008
|
+
throw new Q.YAMLSemanticError(e, i);
|
|
2994
3009
|
} else r.push(s.value);
|
|
2995
|
-
return Object.assign(new
|
|
3010
|
+
return Object.assign(new Ue(), n);
|
|
2996
3011
|
}
|
|
2997
|
-
function
|
|
2998
|
-
let r =
|
|
3012
|
+
function na(t, e, n) {
|
|
3013
|
+
let r = ds(t, e, n), s = new Ue();
|
|
2999
3014
|
return s.items = r.items, s;
|
|
3000
3015
|
}
|
|
3001
|
-
var
|
|
3016
|
+
var ra = {
|
|
3002
3017
|
identify: (t) => t instanceof Map,
|
|
3003
|
-
nodeClass:
|
|
3018
|
+
nodeClass: Ue,
|
|
3004
3019
|
default: false,
|
|
3005
3020
|
tag: "tag:yaml.org,2002:omap",
|
|
3006
|
-
resolve:
|
|
3007
|
-
createNode:
|
|
3008
|
-
},
|
|
3021
|
+
resolve: ta,
|
|
3022
|
+
createNode: na
|
|
3023
|
+
}, Ke = class t extends O.YAMLMap {
|
|
3009
3024
|
constructor() {
|
|
3010
3025
|
super(), this.tag = t.tag;
|
|
3011
3026
|
}
|
|
@@ -3031,28 +3046,28 @@ ${i.comment}` : s.comment), s = i;
|
|
|
3031
3046
|
throw new Error("Set items must all have null values");
|
|
3032
3047
|
}
|
|
3033
3048
|
};
|
|
3034
|
-
|
|
3035
|
-
function
|
|
3049
|
+
Q._defineProperty(Ke, "tag", "tag:yaml.org,2002:set");
|
|
3050
|
+
function sa(t, e) {
|
|
3036
3051
|
let n = O.resolveMap(t, e);
|
|
3037
|
-
if (!n.hasAllNullValues()) throw new
|
|
3038
|
-
return Object.assign(new
|
|
3052
|
+
if (!n.hasAllNullValues()) throw new Q.YAMLSemanticError(e, "Set items must all have null values");
|
|
3053
|
+
return Object.assign(new Ke(), n);
|
|
3039
3054
|
}
|
|
3040
|
-
function
|
|
3041
|
-
let r = new
|
|
3055
|
+
function ia(t, e, n) {
|
|
3056
|
+
let r = new Ke();
|
|
3042
3057
|
for (let s of e) r.items.push(t.createPair(s, null, n));
|
|
3043
3058
|
return r;
|
|
3044
3059
|
}
|
|
3045
|
-
var
|
|
3060
|
+
var oa = {
|
|
3046
3061
|
identify: (t) => t instanceof Set,
|
|
3047
|
-
nodeClass:
|
|
3062
|
+
nodeClass: Ke,
|
|
3048
3063
|
default: false,
|
|
3049
3064
|
tag: "tag:yaml.org,2002:set",
|
|
3050
|
-
resolve:
|
|
3051
|
-
createNode:
|
|
3052
|
-
},
|
|
3065
|
+
resolve: sa,
|
|
3066
|
+
createNode: ia
|
|
3067
|
+
}, jn = (t, e) => {
|
|
3053
3068
|
let n = e.split(":").reduce((r, s) => r * 60 + Number(s), 0);
|
|
3054
3069
|
return t === "-" ? -n : n;
|
|
3055
|
-
},
|
|
3070
|
+
}, ys = ({
|
|
3056
3071
|
value: t
|
|
3057
3072
|
}) => {
|
|
3058
3073
|
if (isNaN(t) || !isFinite(t)) return O.stringifyNumber(t);
|
|
@@ -3060,23 +3075,23 @@ ${i.comment}` : s.comment), s = i;
|
|
|
3060
3075
|
t < 0 && (e = "-", t = Math.abs(t));
|
|
3061
3076
|
let n = [t % 60];
|
|
3062
3077
|
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*$/, "");
|
|
3063
|
-
},
|
|
3078
|
+
}, aa = {
|
|
3064
3079
|
identify: (t) => typeof t == "number",
|
|
3065
3080
|
default: true,
|
|
3066
3081
|
tag: "tag:yaml.org,2002:int",
|
|
3067
3082
|
format: "TIME",
|
|
3068
3083
|
test: /^([-+]?)([0-9][0-9_]*(?::[0-5]?[0-9])+)$/,
|
|
3069
|
-
resolve: (t, e, n) =>
|
|
3070
|
-
stringify:
|
|
3071
|
-
},
|
|
3084
|
+
resolve: (t, e, n) => jn(e, n.replace(/_/g, "")),
|
|
3085
|
+
stringify: ys
|
|
3086
|
+
}, ca = {
|
|
3072
3087
|
identify: (t) => typeof t == "number",
|
|
3073
3088
|
default: true,
|
|
3074
3089
|
tag: "tag:yaml.org,2002:float",
|
|
3075
3090
|
format: "TIME",
|
|
3076
3091
|
test: /^([-+]?)([0-9][0-9_]*(?::[0-5]?[0-9])+\.[0-9_]*)$/,
|
|
3077
|
-
resolve: (t, e, n) =>
|
|
3078
|
-
stringify:
|
|
3079
|
-
},
|
|
3092
|
+
resolve: (t, e, n) => jn(e, n.replace(/_/g, "")),
|
|
3093
|
+
stringify: ys
|
|
3094
|
+
}, la = {
|
|
3080
3095
|
identify: (t) => t instanceof Date,
|
|
3081
3096
|
default: true,
|
|
3082
3097
|
tag: "tag:yaml.org,2002:timestamp",
|
|
@@ -3085,7 +3100,7 @@ ${i.comment}` : s.comment), s = i;
|
|
|
3085
3100
|
a && (a = (a + "00").substr(1, 3));
|
|
3086
3101
|
let l = Date.UTC(e, n - 1, r, s || 0, i || 0, o || 0, a || 0);
|
|
3087
3102
|
if (c && c !== "Z") {
|
|
3088
|
-
let f =
|
|
3103
|
+
let f = jn(c[0], c.slice(1));
|
|
3089
3104
|
Math.abs(f) < 30 && (f *= 60), l -= 6e4 * f;
|
|
3090
3105
|
}
|
|
3091
3106
|
return new Date(l);
|
|
@@ -3094,54 +3109,54 @@ ${i.comment}` : s.comment), s = i;
|
|
|
3094
3109
|
value: t
|
|
3095
3110
|
}) => t.toISOString().replace(/((T00:00)?:00)?\.000Z$/, "")
|
|
3096
3111
|
};
|
|
3097
|
-
function
|
|
3112
|
+
function Wn(t) {
|
|
3098
3113
|
let e = {};
|
|
3099
3114
|
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;
|
|
3100
3115
|
}
|
|
3101
|
-
function
|
|
3102
|
-
|
|
3116
|
+
function Qn(t, e) {
|
|
3117
|
+
Wn(false) && console.warn(e ? `${e}: ${t}` : t);
|
|
3103
3118
|
}
|
|
3104
|
-
function
|
|
3105
|
-
if (
|
|
3119
|
+
function fa(t) {
|
|
3120
|
+
if (Wn(true)) {
|
|
3106
3121
|
let e = t.replace(/.*yaml[/\\]/i, "").replace(/\.js$/, "").replace(/\\/g, "/");
|
|
3107
|
-
|
|
3122
|
+
Qn(`The endpoint 'yaml/${e}' will be removed in a future release.`, "DeprecationWarning");
|
|
3108
3123
|
}
|
|
3109
3124
|
}
|
|
3110
|
-
var
|
|
3111
|
-
function
|
|
3112
|
-
if (!
|
|
3113
|
-
|
|
3125
|
+
var hs = {};
|
|
3126
|
+
function ua(t, e) {
|
|
3127
|
+
if (!hs[t] && Wn(true)) {
|
|
3128
|
+
hs[t] = true;
|
|
3114
3129
|
let n = `The option '${t}' will be removed in a future release`;
|
|
3115
|
-
n += e ? `, use '${e}' instead.` : ".",
|
|
3130
|
+
n += e ? `, use '${e}' instead.` : ".", Qn(n, "DeprecationWarning");
|
|
3116
3131
|
}
|
|
3117
3132
|
}
|
|
3118
|
-
z.binary =
|
|
3119
|
-
z.floatTime =
|
|
3120
|
-
z.intTime =
|
|
3121
|
-
z.omap =
|
|
3122
|
-
z.pairs =
|
|
3123
|
-
z.set =
|
|
3124
|
-
z.timestamp =
|
|
3125
|
-
z.warn =
|
|
3126
|
-
z.warnFileDeprecation =
|
|
3127
|
-
z.warnOptionDeprecation =
|
|
3133
|
+
z.binary = Zo;
|
|
3134
|
+
z.floatTime = ca;
|
|
3135
|
+
z.intTime = aa;
|
|
3136
|
+
z.omap = ra;
|
|
3137
|
+
z.pairs = ea;
|
|
3138
|
+
z.set = oa;
|
|
3139
|
+
z.timestamp = la;
|
|
3140
|
+
z.warn = Qn;
|
|
3141
|
+
z.warnFileDeprecation = fa;
|
|
3142
|
+
z.warnOptionDeprecation = ua;
|
|
3128
3143
|
});
|
|
3129
|
-
var
|
|
3130
|
-
var
|
|
3131
|
-
function
|
|
3144
|
+
var zn = te((Ps) => {
|
|
3145
|
+
var jt = oe(), E = qe(), D = Gn();
|
|
3146
|
+
function pa(t, e, n) {
|
|
3132
3147
|
let r = new E.YAMLMap(t);
|
|
3133
3148
|
if (e instanceof Map) for (let [s, i] of e) r.items.push(t.createPair(s, i, n));
|
|
3134
3149
|
else if (e && typeof e == "object") for (let s of Object.keys(e)) r.items.push(t.createPair(s, e[s], n));
|
|
3135
3150
|
return typeof t.sortMapEntries == "function" && r.items.sort(t.sortMapEntries), r;
|
|
3136
3151
|
}
|
|
3137
|
-
var
|
|
3138
|
-
createNode:
|
|
3152
|
+
var Et = {
|
|
3153
|
+
createNode: pa,
|
|
3139
3154
|
default: true,
|
|
3140
3155
|
nodeClass: E.YAMLMap,
|
|
3141
3156
|
tag: "tag:yaml.org,2002:map",
|
|
3142
3157
|
resolve: E.resolveMap
|
|
3143
3158
|
};
|
|
3144
|
-
function
|
|
3159
|
+
function ma(t, e, n) {
|
|
3145
3160
|
let r = new E.YAMLSeq(t);
|
|
3146
3161
|
if (e && e[Symbol.iterator]) for (let s of e) {
|
|
3147
3162
|
let i = t.createNode(s, n.wrapScalars, null, n);
|
|
@@ -3149,13 +3164,13 @@ var Hn = ee((ai) => {
|
|
|
3149
3164
|
}
|
|
3150
3165
|
return r;
|
|
3151
3166
|
}
|
|
3152
|
-
var
|
|
3153
|
-
createNode:
|
|
3167
|
+
var Wt = {
|
|
3168
|
+
createNode: ma,
|
|
3154
3169
|
default: true,
|
|
3155
3170
|
nodeClass: E.YAMLSeq,
|
|
3156
3171
|
tag: "tag:yaml.org,2002:seq",
|
|
3157
3172
|
resolve: E.resolveSeq
|
|
3158
|
-
},
|
|
3173
|
+
}, ha = {
|
|
3159
3174
|
identify: (t) => typeof t == "string",
|
|
3160
3175
|
default: true,
|
|
3161
3176
|
tag: "tag:yaml.org,2002:str",
|
|
@@ -3166,14 +3181,14 @@ var Hn = ee((ai) => {
|
|
|
3166
3181
|
}, e), E.stringifyString(t, e, n, r);
|
|
3167
3182
|
},
|
|
3168
3183
|
options: E.strOptions
|
|
3169
|
-
}, Jn = [
|
|
3170
|
-
function
|
|
3184
|
+
}, Jn = [Et, Wt, ha], Qt = (t) => typeof t == "bigint" || Number.isInteger(t), Xn = (t, e, n) => E.intOptions.asBigInt ? BigInt(t) : parseInt(e, n);
|
|
3185
|
+
function ws(t, e, n) {
|
|
3171
3186
|
let {
|
|
3172
3187
|
value: r
|
|
3173
3188
|
} = t;
|
|
3174
|
-
return
|
|
3189
|
+
return Qt(r) && r >= 0 ? n + r.toString(e) : E.stringifyNumber(t);
|
|
3175
3190
|
}
|
|
3176
|
-
var
|
|
3191
|
+
var bs = {
|
|
3177
3192
|
identify: (t) => t == null,
|
|
3178
3193
|
createNode: (t, e, n) => n.wrapScalars ? new E.Scalar(null) : null,
|
|
3179
3194
|
default: true,
|
|
@@ -3182,7 +3197,7 @@ var Hn = ee((ai) => {
|
|
|
3182
3197
|
resolve: () => null,
|
|
3183
3198
|
options: E.nullOptions,
|
|
3184
3199
|
stringify: () => E.nullOptions.nullStr
|
|
3185
|
-
},
|
|
3200
|
+
}, Ns = {
|
|
3186
3201
|
identify: (t) => typeof t == "boolean",
|
|
3187
3202
|
default: true,
|
|
3188
3203
|
tag: "tag:yaml.org,2002:bool",
|
|
@@ -3192,40 +3207,40 @@ var Hn = ee((ai) => {
|
|
|
3192
3207
|
stringify: ({
|
|
3193
3208
|
value: t
|
|
3194
3209
|
}) => t ? E.boolOptions.trueStr : E.boolOptions.falseStr
|
|
3195
|
-
},
|
|
3196
|
-
identify: (t) =>
|
|
3210
|
+
}, Os = {
|
|
3211
|
+
identify: (t) => Qt(t) && t >= 0,
|
|
3197
3212
|
default: true,
|
|
3198
3213
|
tag: "tag:yaml.org,2002:int",
|
|
3199
3214
|
format: "OCT",
|
|
3200
3215
|
test: /^0o([0-7]+)$/,
|
|
3201
|
-
resolve: (t, e) =>
|
|
3216
|
+
resolve: (t, e) => Xn(t, e, 8),
|
|
3202
3217
|
options: E.intOptions,
|
|
3203
|
-
stringify: (t) =>
|
|
3204
|
-
},
|
|
3205
|
-
identify:
|
|
3218
|
+
stringify: (t) => ws(t, 8, "0o")
|
|
3219
|
+
}, As = {
|
|
3220
|
+
identify: Qt,
|
|
3206
3221
|
default: true,
|
|
3207
3222
|
tag: "tag:yaml.org,2002:int",
|
|
3208
3223
|
test: /^[-+]?[0-9]+$/,
|
|
3209
|
-
resolve: (t) =>
|
|
3224
|
+
resolve: (t) => Xn(t, t, 10),
|
|
3210
3225
|
options: E.intOptions,
|
|
3211
3226
|
stringify: E.stringifyNumber
|
|
3212
|
-
},
|
|
3213
|
-
identify: (t) =>
|
|
3227
|
+
}, Ls = {
|
|
3228
|
+
identify: (t) => Qt(t) && t >= 0,
|
|
3214
3229
|
default: true,
|
|
3215
3230
|
tag: "tag:yaml.org,2002:int",
|
|
3216
3231
|
format: "HEX",
|
|
3217
3232
|
test: /^0x([0-9a-fA-F]+)$/,
|
|
3218
|
-
resolve: (t, e) =>
|
|
3233
|
+
resolve: (t, e) => Xn(t, e, 16),
|
|
3219
3234
|
options: E.intOptions,
|
|
3220
|
-
stringify: (t) =>
|
|
3221
|
-
},
|
|
3235
|
+
stringify: (t) => ws(t, 16, "0x")
|
|
3236
|
+
}, Ts = {
|
|
3222
3237
|
identify: (t) => typeof t == "number",
|
|
3223
3238
|
default: true,
|
|
3224
3239
|
tag: "tag:yaml.org,2002:float",
|
|
3225
3240
|
test: /^(?:[-+]?\.inf|(\.nan))$/i,
|
|
3226
3241
|
resolve: (t, e) => e ? NaN : t[0] === "-" ? Number.NEGATIVE_INFINITY : Number.POSITIVE_INFINITY,
|
|
3227
3242
|
stringify: E.stringifyNumber
|
|
3228
|
-
},
|
|
3243
|
+
}, Ms = {
|
|
3229
3244
|
identify: (t) => typeof t == "number",
|
|
3230
3245
|
default: true,
|
|
3231
3246
|
tag: "tag:yaml.org,2002:float",
|
|
@@ -3235,7 +3250,7 @@ var Hn = ee((ai) => {
|
|
|
3235
3250
|
stringify: ({
|
|
3236
3251
|
value: t
|
|
3237
3252
|
}) => Number(t).toExponential()
|
|
3238
|
-
},
|
|
3253
|
+
}, Cs = {
|
|
3239
3254
|
identify: (t) => typeof t == "number",
|
|
3240
3255
|
default: true,
|
|
3241
3256
|
tag: "tag:yaml.org,2002:float",
|
|
@@ -3245,14 +3260,14 @@ var Hn = ee((ai) => {
|
|
|
3245
3260
|
return r && r[r.length - 1] === "0" && (s.minFractionDigits = r.length), s;
|
|
3246
3261
|
},
|
|
3247
3262
|
stringify: E.stringifyNumber
|
|
3248
|
-
},
|
|
3263
|
+
}, ga = Jn.concat([bs, Ns, Os, As, Ls, Ts, Ms, Cs]), Es = (t) => typeof t == "bigint" || Number.isInteger(t), Kt = ({
|
|
3249
3264
|
value: t
|
|
3250
|
-
}) => JSON.stringify(t),
|
|
3265
|
+
}) => JSON.stringify(t), ks = [Et, Wt, {
|
|
3251
3266
|
identify: (t) => typeof t == "string",
|
|
3252
3267
|
default: true,
|
|
3253
3268
|
tag: "tag:yaml.org,2002:str",
|
|
3254
3269
|
resolve: E.resolveString,
|
|
3255
|
-
stringify:
|
|
3270
|
+
stringify: Kt
|
|
3256
3271
|
}, {
|
|
3257
3272
|
identify: (t) => t == null,
|
|
3258
3273
|
createNode: (t, e, n) => n.wrapScalars ? new E.Scalar(null) : null,
|
|
@@ -3260,38 +3275,38 @@ var Hn = ee((ai) => {
|
|
|
3260
3275
|
tag: "tag:yaml.org,2002:null",
|
|
3261
3276
|
test: /^null$/,
|
|
3262
3277
|
resolve: () => null,
|
|
3263
|
-
stringify:
|
|
3278
|
+
stringify: Kt
|
|
3264
3279
|
}, {
|
|
3265
3280
|
identify: (t) => typeof t == "boolean",
|
|
3266
3281
|
default: true,
|
|
3267
3282
|
tag: "tag:yaml.org,2002:bool",
|
|
3268
3283
|
test: /^true|false$/,
|
|
3269
3284
|
resolve: (t) => t === "true",
|
|
3270
|
-
stringify:
|
|
3285
|
+
stringify: Kt
|
|
3271
3286
|
}, {
|
|
3272
|
-
identify:
|
|
3287
|
+
identify: Es,
|
|
3273
3288
|
default: true,
|
|
3274
3289
|
tag: "tag:yaml.org,2002:int",
|
|
3275
3290
|
test: /^-?(?:0|[1-9][0-9]*)$/,
|
|
3276
3291
|
resolve: (t) => E.intOptions.asBigInt ? BigInt(t) : parseInt(t, 10),
|
|
3277
3292
|
stringify: ({
|
|
3278
3293
|
value: t
|
|
3279
|
-
}) =>
|
|
3294
|
+
}) => Es(t) ? t.toString() : JSON.stringify(t)
|
|
3280
3295
|
}, {
|
|
3281
3296
|
identify: (t) => typeof t == "number",
|
|
3282
3297
|
default: true,
|
|
3283
3298
|
tag: "tag:yaml.org,2002:float",
|
|
3284
3299
|
test: /^-?(?:0|[1-9][0-9]*)(?:\.[0-9]*)?(?:[eE][-+]?[0-9]+)?$/,
|
|
3285
3300
|
resolve: (t) => parseFloat(t),
|
|
3286
|
-
stringify:
|
|
3301
|
+
stringify: Kt
|
|
3287
3302
|
}];
|
|
3288
|
-
|
|
3303
|
+
ks.scalarFallback = (t) => {
|
|
3289
3304
|
throw new SyntaxError(`Unresolved plain scalar ${JSON.stringify(t)}`);
|
|
3290
3305
|
};
|
|
3291
|
-
var
|
|
3306
|
+
var Ss = ({
|
|
3292
3307
|
value: t
|
|
3293
|
-
}) => t ? E.boolOptions.trueStr : E.boolOptions.falseStr,
|
|
3294
|
-
function
|
|
3308
|
+
}) => t ? E.boolOptions.trueStr : E.boolOptions.falseStr, yt = (t) => typeof t == "bigint" || Number.isInteger(t);
|
|
3309
|
+
function Vt(t, e, n) {
|
|
3295
3310
|
let r = e.replace(/_/g, "");
|
|
3296
3311
|
if (E.intOptions.asBigInt) {
|
|
3297
3312
|
switch (n) {
|
|
@@ -3311,17 +3326,17 @@ var Hn = ee((ai) => {
|
|
|
3311
3326
|
let s = parseInt(r, n);
|
|
3312
3327
|
return t === "-" ? -1 * s : s;
|
|
3313
3328
|
}
|
|
3314
|
-
function
|
|
3329
|
+
function Hn(t, e, n) {
|
|
3315
3330
|
let {
|
|
3316
3331
|
value: r
|
|
3317
3332
|
} = t;
|
|
3318
|
-
if (
|
|
3333
|
+
if (yt(r)) {
|
|
3319
3334
|
let s = r.toString(e);
|
|
3320
3335
|
return r < 0 ? "-" + n + s.substr(1) : n + s;
|
|
3321
3336
|
}
|
|
3322
3337
|
return E.stringifyNumber(t);
|
|
3323
3338
|
}
|
|
3324
|
-
var
|
|
3339
|
+
var da = Jn.concat([{
|
|
3325
3340
|
identify: (t) => t == null,
|
|
3326
3341
|
createNode: (t, e, n) => n.wrapScalars ? new E.Scalar(null) : null,
|
|
3327
3342
|
default: true,
|
|
@@ -3337,7 +3352,7 @@ var Hn = ee((ai) => {
|
|
|
3337
3352
|
test: /^(?:Y|y|[Yy]es|YES|[Tt]rue|TRUE|[Oo]n|ON)$/,
|
|
3338
3353
|
resolve: () => true,
|
|
3339
3354
|
options: E.boolOptions,
|
|
3340
|
-
stringify:
|
|
3355
|
+
stringify: Ss
|
|
3341
3356
|
}, {
|
|
3342
3357
|
identify: (t) => typeof t == "boolean",
|
|
3343
3358
|
default: true,
|
|
@@ -3345,38 +3360,38 @@ var Hn = ee((ai) => {
|
|
|
3345
3360
|
test: /^(?:N|n|[Nn]o|NO|[Ff]alse|FALSE|[Oo]ff|OFF)$/i,
|
|
3346
3361
|
resolve: () => false,
|
|
3347
3362
|
options: E.boolOptions,
|
|
3348
|
-
stringify:
|
|
3363
|
+
stringify: Ss
|
|
3349
3364
|
}, {
|
|
3350
|
-
identify:
|
|
3365
|
+
identify: yt,
|
|
3351
3366
|
default: true,
|
|
3352
3367
|
tag: "tag:yaml.org,2002:int",
|
|
3353
3368
|
format: "BIN",
|
|
3354
3369
|
test: /^([-+]?)0b([0-1_]+)$/,
|
|
3355
|
-
resolve: (t, e, n) =>
|
|
3356
|
-
stringify: (t) =>
|
|
3370
|
+
resolve: (t, e, n) => Vt(e, n, 2),
|
|
3371
|
+
stringify: (t) => Hn(t, 2, "0b")
|
|
3357
3372
|
}, {
|
|
3358
|
-
identify:
|
|
3373
|
+
identify: yt,
|
|
3359
3374
|
default: true,
|
|
3360
3375
|
tag: "tag:yaml.org,2002:int",
|
|
3361
3376
|
format: "OCT",
|
|
3362
3377
|
test: /^([-+]?)0([0-7_]+)$/,
|
|
3363
|
-
resolve: (t, e, n) =>
|
|
3364
|
-
stringify: (t) =>
|
|
3378
|
+
resolve: (t, e, n) => Vt(e, n, 8),
|
|
3379
|
+
stringify: (t) => Hn(t, 8, "0")
|
|
3365
3380
|
}, {
|
|
3366
|
-
identify:
|
|
3381
|
+
identify: yt,
|
|
3367
3382
|
default: true,
|
|
3368
3383
|
tag: "tag:yaml.org,2002:int",
|
|
3369
3384
|
test: /^([-+]?)([0-9][0-9_]*)$/,
|
|
3370
|
-
resolve: (t, e, n) =>
|
|
3385
|
+
resolve: (t, e, n) => Vt(e, n, 10),
|
|
3371
3386
|
stringify: E.stringifyNumber
|
|
3372
3387
|
}, {
|
|
3373
|
-
identify:
|
|
3388
|
+
identify: yt,
|
|
3374
3389
|
default: true,
|
|
3375
3390
|
tag: "tag:yaml.org,2002:int",
|
|
3376
3391
|
format: "HEX",
|
|
3377
3392
|
test: /^([-+]?)0x([0-9a-fA-F_]+)$/,
|
|
3378
|
-
resolve: (t, e, n) =>
|
|
3379
|
-
stringify: (t) =>
|
|
3393
|
+
resolve: (t, e, n) => Vt(e, n, 16),
|
|
3394
|
+
stringify: (t) => Hn(t, 16, "0x")
|
|
3380
3395
|
}, {
|
|
3381
3396
|
identify: (t) => typeof t == "number",
|
|
3382
3397
|
default: true,
|
|
@@ -3408,31 +3423,31 @@ var Hn = ee((ai) => {
|
|
|
3408
3423
|
return n;
|
|
3409
3424
|
},
|
|
3410
3425
|
stringify: E.stringifyNumber
|
|
3411
|
-
}], D.binary, D.omap, D.pairs, D.set, D.intTime, D.floatTime, D.timestamp),
|
|
3412
|
-
core:
|
|
3426
|
+
}], D.binary, D.omap, D.pairs, D.set, D.intTime, D.floatTime, D.timestamp), ya = {
|
|
3427
|
+
core: ga,
|
|
3413
3428
|
failsafe: Jn,
|
|
3414
|
-
json:
|
|
3415
|
-
yaml11:
|
|
3416
|
-
},
|
|
3429
|
+
json: ks,
|
|
3430
|
+
yaml11: da
|
|
3431
|
+
}, Ea = {
|
|
3417
3432
|
binary: D.binary,
|
|
3418
|
-
bool:
|
|
3419
|
-
float:
|
|
3420
|
-
floatExp:
|
|
3421
|
-
floatNaN:
|
|
3433
|
+
bool: Ns,
|
|
3434
|
+
float: Cs,
|
|
3435
|
+
floatExp: Ms,
|
|
3436
|
+
floatNaN: Ts,
|
|
3422
3437
|
floatTime: D.floatTime,
|
|
3423
|
-
int:
|
|
3424
|
-
intHex:
|
|
3425
|
-
intOct:
|
|
3438
|
+
int: As,
|
|
3439
|
+
intHex: Ls,
|
|
3440
|
+
intOct: Os,
|
|
3426
3441
|
intTime: D.intTime,
|
|
3427
|
-
map:
|
|
3428
|
-
null:
|
|
3442
|
+
map: Et,
|
|
3443
|
+
null: bs,
|
|
3429
3444
|
omap: D.omap,
|
|
3430
3445
|
pairs: D.pairs,
|
|
3431
|
-
seq:
|
|
3446
|
+
seq: Wt,
|
|
3432
3447
|
set: D.set,
|
|
3433
3448
|
timestamp: D.timestamp
|
|
3434
3449
|
};
|
|
3435
|
-
function
|
|
3450
|
+
function Sa(t, e, n) {
|
|
3436
3451
|
if (e) {
|
|
3437
3452
|
let r = n.filter((i) => i.tag === e), s = r.find((i) => !i.format) || r[0];
|
|
3438
3453
|
if (!s) throw new Error(`Tag ${e} not found`);
|
|
@@ -3440,7 +3455,7 @@ var Hn = ee((ai) => {
|
|
|
3440
3455
|
}
|
|
3441
3456
|
return n.find((r) => (r.identify && r.identify(t) || r.class && t instanceof r.class) && !r.format);
|
|
3442
3457
|
}
|
|
3443
|
-
function
|
|
3458
|
+
function wa(t, e, n) {
|
|
3444
3459
|
if (t instanceof E.Node) return t;
|
|
3445
3460
|
let {
|
|
3446
3461
|
defaultPrefix: r,
|
|
@@ -3450,10 +3465,10 @@ var Hn = ee((ai) => {
|
|
|
3450
3465
|
wrapScalars: a
|
|
3451
3466
|
} = n;
|
|
3452
3467
|
e && e.startsWith("!!") && (e = r + e.slice(2));
|
|
3453
|
-
let c =
|
|
3468
|
+
let c = Sa(t, e, o.tags);
|
|
3454
3469
|
if (!c) {
|
|
3455
3470
|
if (typeof t.toJSON == "function" && (t = t.toJSON()), !t || typeof t != "object") return a ? new E.Scalar(t) : t;
|
|
3456
|
-
c = t instanceof Map ?
|
|
3471
|
+
c = t instanceof Map ? Et : t[Symbol.iterator] ? Wt : Et;
|
|
3457
3472
|
}
|
|
3458
3473
|
s && (s(c), delete n.onTagObj);
|
|
3459
3474
|
let l = {
|
|
@@ -3470,7 +3485,7 @@ var Hn = ee((ai) => {
|
|
|
3470
3485
|
}
|
|
3471
3486
|
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;
|
|
3472
3487
|
}
|
|
3473
|
-
function
|
|
3488
|
+
function ba(t, e, n, r) {
|
|
3474
3489
|
let s = t[r.replace(/\W/g, "")];
|
|
3475
3490
|
if (!s) {
|
|
3476
3491
|
let i = Object.keys(t).map((o) => JSON.stringify(o)).join(", ");
|
|
@@ -3491,7 +3506,7 @@ var Hn = ee((ai) => {
|
|
|
3491
3506
|
}
|
|
3492
3507
|
return s;
|
|
3493
3508
|
}
|
|
3494
|
-
var
|
|
3509
|
+
var Na = (t, e) => t.key < e.key ? -1 : t.key > e.key ? 1 : 0, St = class t {
|
|
3495
3510
|
constructor({
|
|
3496
3511
|
customTags: e,
|
|
3497
3512
|
merge: n,
|
|
@@ -3499,7 +3514,7 @@ var Hn = ee((ai) => {
|
|
|
3499
3514
|
sortMapEntries: s,
|
|
3500
3515
|
tags: i
|
|
3501
3516
|
}) {
|
|
3502
|
-
this.merge = !!n, this.name = r, this.sortMapEntries = s === true ?
|
|
3517
|
+
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);
|
|
3503
3518
|
}
|
|
3504
3519
|
createNode(e, n, r, s) {
|
|
3505
3520
|
let i = {
|
|
@@ -3507,7 +3522,7 @@ var Hn = ee((ai) => {
|
|
|
3507
3522
|
schema: this,
|
|
3508
3523
|
wrapScalars: n
|
|
3509
3524
|
}, o = s ? Object.assign(s, i) : i;
|
|
3510
|
-
return
|
|
3525
|
+
return wa(e, r, o);
|
|
3511
3526
|
}
|
|
3512
3527
|
createPair(e, n, r) {
|
|
3513
3528
|
r || (r = {
|
|
@@ -3517,12 +3532,12 @@ var Hn = ee((ai) => {
|
|
|
3517
3532
|
return new E.Pair(s, i);
|
|
3518
3533
|
}
|
|
3519
3534
|
};
|
|
3520
|
-
|
|
3521
|
-
|
|
3522
|
-
|
|
3535
|
+
jt._defineProperty(St, "defaultPrefix", jt.defaultTagPrefix);
|
|
3536
|
+
jt._defineProperty(St, "defaultTags", jt.defaultTags);
|
|
3537
|
+
Ps.Schema = St;
|
|
3523
3538
|
});
|
|
3524
|
-
var
|
|
3525
|
-
var Y =
|
|
3539
|
+
var Rs = te((Xt) => {
|
|
3540
|
+
var Y = oe(), S = qe(), Is = zn(), Oa = {
|
|
3526
3541
|
anchorPrefix: "a",
|
|
3527
3542
|
customTags: null,
|
|
3528
3543
|
indent: 2,
|
|
@@ -3535,7 +3550,7 @@ var ui = ee((tn) => {
|
|
|
3535
3550
|
prettyErrors: false,
|
|
3536
3551
|
simpleKeys: false,
|
|
3537
3552
|
version: "1.2"
|
|
3538
|
-
},
|
|
3553
|
+
}, Aa = {
|
|
3539
3554
|
get binary() {
|
|
3540
3555
|
return S.binaryOptions;
|
|
3541
3556
|
},
|
|
@@ -3566,7 +3581,7 @@ var ui = ee((tn) => {
|
|
|
3566
3581
|
set str(t) {
|
|
3567
3582
|
Object.assign(S.strOptions, t);
|
|
3568
3583
|
}
|
|
3569
|
-
},
|
|
3584
|
+
}, _s = {
|
|
3570
3585
|
"1.0": {
|
|
3571
3586
|
schema: "yaml-1.1",
|
|
3572
3587
|
merge: true,
|
|
@@ -3601,7 +3616,7 @@ var ui = ee((tn) => {
|
|
|
3601
3616
|
}]
|
|
3602
3617
|
}
|
|
3603
3618
|
};
|
|
3604
|
-
function
|
|
3619
|
+
function vs(t, e) {
|
|
3605
3620
|
if ((t.version || t.options.version) === "1.0") {
|
|
3606
3621
|
let s = e.match(/^tag:private\.yaml\.org,2002:([^:/]+)$/);
|
|
3607
3622
|
if (s) return "!" + s[1];
|
|
@@ -3624,7 +3639,7 @@ var ui = ee((tn) => {
|
|
|
3624
3639
|
})[s]);
|
|
3625
3640
|
return n.handle + r;
|
|
3626
3641
|
}
|
|
3627
|
-
function
|
|
3642
|
+
function La(t, e) {
|
|
3628
3643
|
if (e instanceof S.Alias) return S.Alias;
|
|
3629
3644
|
if (e.tag) {
|
|
3630
3645
|
let s = t.filter((i) => i.tag === e.tag);
|
|
@@ -3642,14 +3657,14 @@ var ui = ee((tn) => {
|
|
|
3642
3657
|
}
|
|
3643
3658
|
return n;
|
|
3644
3659
|
}
|
|
3645
|
-
function
|
|
3660
|
+
function Ta(t, e, {
|
|
3646
3661
|
anchors: n,
|
|
3647
3662
|
doc: r
|
|
3648
3663
|
}) {
|
|
3649
3664
|
let s = [], i = r.anchors.getName(t);
|
|
3650
|
-
return i && (n[i] = t, s.push(`&${i}`)), t.tag ? s.push(
|
|
3665
|
+
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(" ");
|
|
3651
3666
|
}
|
|
3652
|
-
function
|
|
3667
|
+
function Gt(t, e, n, r) {
|
|
3653
3668
|
let {
|
|
3654
3669
|
anchors: s,
|
|
3655
3670
|
schema: i
|
|
@@ -3668,14 +3683,14 @@ var ui = ee((tn) => {
|
|
|
3668
3683
|
}
|
|
3669
3684
|
}
|
|
3670
3685
|
if (t instanceof S.Pair) return t.toString(e, n, r);
|
|
3671
|
-
o || (o =
|
|
3672
|
-
let a =
|
|
3686
|
+
o || (o = La(i.tags, t));
|
|
3687
|
+
let a = Ta(t, o, e);
|
|
3673
3688
|
a.length > 0 && (e.indentAtStart = (e.indentAtStart || 0) + a.length + 1);
|
|
3674
3689
|
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);
|
|
3675
3690
|
return a ? t instanceof S.Scalar || c[0] === "{" || c[0] === "[" ? `${a} ${c}` : `${a}
|
|
3676
3691
|
${e.indent}${c}` : c;
|
|
3677
3692
|
}
|
|
3678
|
-
var
|
|
3693
|
+
var Zn = class t {
|
|
3679
3694
|
static validAnchorNode(e) {
|
|
3680
3695
|
return e instanceof S.Scalar || e instanceof S.YAMLSeq || e instanceof S.YAMLMap;
|
|
3681
3696
|
}
|
|
@@ -3743,16 +3758,16 @@ ${e.indent}${c}` : c;
|
|
|
3743
3758
|
}
|
|
3744
3759
|
return n;
|
|
3745
3760
|
}
|
|
3746
|
-
},
|
|
3761
|
+
}, Ht = (t, e) => {
|
|
3747
3762
|
if (t && typeof t == "object") {
|
|
3748
3763
|
let {
|
|
3749
3764
|
tag: n
|
|
3750
3765
|
} = t;
|
|
3751
|
-
t instanceof S.Collection ? (n && (e[n] = true), t.items.forEach((r) =>
|
|
3766
|
+
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);
|
|
3752
3767
|
}
|
|
3753
3768
|
return e;
|
|
3754
|
-
},
|
|
3755
|
-
function
|
|
3769
|
+
}, Ma = (t) => Object.keys(Ht(t, {}));
|
|
3770
|
+
function Ca(t, e) {
|
|
3756
3771
|
let n = {
|
|
3757
3772
|
before: [],
|
|
3758
3773
|
after: []
|
|
@@ -3781,7 +3796,7 @@ ${o.commentBefore}` : i;
|
|
|
3781
3796
|
`) || null;
|
|
3782
3797
|
}
|
|
3783
3798
|
}
|
|
3784
|
-
function
|
|
3799
|
+
function ka({
|
|
3785
3800
|
tagPrefixes: t
|
|
3786
3801
|
}, e) {
|
|
3787
3802
|
let [n, r] = e.parameters;
|
|
@@ -3804,13 +3819,13 @@ ${o.commentBefore}` : i;
|
|
|
3804
3819
|
let r = "Insufficient parameters given for %YAML directive";
|
|
3805
3820
|
throw new Y.YAMLSemanticError(e, r);
|
|
3806
3821
|
}
|
|
3807
|
-
if (!
|
|
3822
|
+
if (!_s[n]) {
|
|
3808
3823
|
let s = `Document will be parsed as YAML ${t.version || t.options.version} rather than YAML ${n}`;
|
|
3809
3824
|
t.warnings.push(new Y.YAMLWarning(e, s));
|
|
3810
3825
|
}
|
|
3811
3826
|
return n;
|
|
3812
3827
|
}
|
|
3813
|
-
function
|
|
3828
|
+
function Ia(t, e, n) {
|
|
3814
3829
|
let r = [], s = false;
|
|
3815
3830
|
for (let i of e) {
|
|
3816
3831
|
let {
|
|
@@ -3820,7 +3835,7 @@ ${o.commentBefore}` : i;
|
|
|
3820
3835
|
switch (a) {
|
|
3821
3836
|
case "TAG":
|
|
3822
3837
|
try {
|
|
3823
|
-
t.tagPrefixes.push(
|
|
3838
|
+
t.tagPrefixes.push(ka(t, i));
|
|
3824
3839
|
} catch (c) {
|
|
3825
3840
|
t.errors.push(c);
|
|
3826
3841
|
}
|
|
@@ -3860,25 +3875,25 @@ ${o.commentBefore}` : i;
|
|
|
3860
3875
|
t.commentBefore = r.join(`
|
|
3861
3876
|
`) || null;
|
|
3862
3877
|
}
|
|
3863
|
-
function
|
|
3878
|
+
function Ve(t) {
|
|
3864
3879
|
if (t instanceof S.Collection) return true;
|
|
3865
3880
|
throw new Error("Expected a YAML collection as document contents");
|
|
3866
3881
|
}
|
|
3867
|
-
var
|
|
3882
|
+
var Jt = class t {
|
|
3868
3883
|
constructor(e) {
|
|
3869
|
-
this.anchors = new
|
|
3884
|
+
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 = [];
|
|
3870
3885
|
}
|
|
3871
3886
|
add(e) {
|
|
3872
|
-
return
|
|
3887
|
+
return Ve(this.contents), this.contents.add(e);
|
|
3873
3888
|
}
|
|
3874
3889
|
addIn(e, n) {
|
|
3875
|
-
|
|
3890
|
+
Ve(this.contents), this.contents.addIn(e, n);
|
|
3876
3891
|
}
|
|
3877
3892
|
delete(e) {
|
|
3878
|
-
return
|
|
3893
|
+
return Ve(this.contents), this.contents.delete(e);
|
|
3879
3894
|
}
|
|
3880
3895
|
deleteIn(e) {
|
|
3881
|
-
return S.isEmptyPath(e) ? this.contents == null ? false : (this.contents = null, true) : (
|
|
3896
|
+
return S.isEmptyPath(e) ? this.contents == null ? false : (this.contents = null, true) : (Ve(this.contents), this.contents.deleteIn(e));
|
|
3882
3897
|
}
|
|
3883
3898
|
getDefaults() {
|
|
3884
3899
|
return t.defaults[this.version] || t.defaults[this.options.version] || {};
|
|
@@ -3896,16 +3911,16 @@ ${o.commentBefore}` : i;
|
|
|
3896
3911
|
return S.isEmptyPath(e) ? this.contents !== void 0 : this.contents instanceof S.Collection ? this.contents.hasIn(e) : false;
|
|
3897
3912
|
}
|
|
3898
3913
|
set(e, n) {
|
|
3899
|
-
|
|
3914
|
+
Ve(this.contents), this.contents.set(e, n);
|
|
3900
3915
|
}
|
|
3901
3916
|
setIn(e, n) {
|
|
3902
|
-
S.isEmptyPath(e) ? this.contents = n : (
|
|
3917
|
+
S.isEmptyPath(e) ? this.contents = n : (Ve(this.contents), this.contents.setIn(e, n));
|
|
3903
3918
|
}
|
|
3904
3919
|
setSchema(e, n) {
|
|
3905
3920
|
if (!e && !n && this.schema) return;
|
|
3906
3921
|
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);
|
|
3907
3922
|
let r = Object.assign({}, this.getDefaults(), this.options);
|
|
3908
|
-
this.schema = new
|
|
3923
|
+
this.schema = new Is.Schema(r);
|
|
3909
3924
|
}
|
|
3910
3925
|
parse(e, n) {
|
|
3911
3926
|
this.options.keepCstNodes && (this.cstNode = e), this.options.keepNodeTypes && (this.type = "DOCUMENT");
|
|
@@ -3916,14 +3931,14 @@ ${o.commentBefore}` : i;
|
|
|
3916
3931
|
error: o,
|
|
3917
3932
|
valueRange: a
|
|
3918
3933
|
} = e;
|
|
3919
|
-
if (o && (o.source || (o.source = this), this.errors.push(o)),
|
|
3934
|
+
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) {
|
|
3920
3935
|
for (let c of this.errors) c instanceof Y.YAMLError && c.makePretty();
|
|
3921
3936
|
for (let c of this.warnings) c instanceof Y.YAMLError && c.makePretty();
|
|
3922
3937
|
}
|
|
3923
3938
|
return this;
|
|
3924
3939
|
}
|
|
3925
3940
|
listNonDefaultTags() {
|
|
3926
|
-
return
|
|
3941
|
+
return Ma(this.contents).filter((e) => e.indexOf(Is.Schema.defaultPrefix) !== 0);
|
|
3927
3942
|
}
|
|
3928
3943
|
setTagPrefix(e, n) {
|
|
3929
3944
|
if (e[0] !== "!" || e[e.length - 1] !== "!") throw new Error("Handle must start and end with !");
|
|
@@ -3946,7 +3961,7 @@ ${o.commentBefore}` : i;
|
|
|
3946
3961
|
keep: o,
|
|
3947
3962
|
mapAsMap: o && !!s,
|
|
3948
3963
|
maxAliasCount: i,
|
|
3949
|
-
stringify:
|
|
3964
|
+
stringify: Gt
|
|
3950
3965
|
}, c = Object.keys(this.anchors.map);
|
|
3951
3966
|
c.length > 0 && (a.anchors = new Map(c.map((f) => [this.anchors.map[f], {
|
|
3952
3967
|
alias: [],
|
|
@@ -3985,297 +4000,298 @@ ${o.commentBefore}` : i;
|
|
|
3985
4000
|
doc: this,
|
|
3986
4001
|
indent: "",
|
|
3987
4002
|
indentStep: " ".repeat(e),
|
|
3988
|
-
stringify:
|
|
4003
|
+
stringify: Gt
|
|
3989
4004
|
}, o = false, a = null;
|
|
3990
4005
|
if (this.contents) {
|
|
3991
4006
|
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);
|
|
3992
|
-
let c = a ? null : () => o = true, l =
|
|
4007
|
+
let c = a ? null : () => o = true, l = Gt(this.contents, i, () => a = null, c);
|
|
3993
4008
|
n.push(S.addComment(l, "", a));
|
|
3994
|
-
} else this.contents !== void 0 && n.push(
|
|
4009
|
+
} else this.contents !== void 0 && n.push(Gt(this.contents, i));
|
|
3995
4010
|
return this.comment && ((!o || a) && n[n.length - 1] !== "" && n.push(""), n.push(this.comment.replace(/^/gm, "#"))), n.join(`
|
|
3996
4011
|
`) + `
|
|
3997
4012
|
`;
|
|
3998
4013
|
}
|
|
3999
4014
|
};
|
|
4000
|
-
Y._defineProperty(
|
|
4001
|
-
|
|
4002
|
-
|
|
4003
|
-
|
|
4015
|
+
Y._defineProperty(Jt, "defaults", _s);
|
|
4016
|
+
Xt.Document = Jt;
|
|
4017
|
+
Xt.defaultOptions = Oa;
|
|
4018
|
+
Xt.scalarOptions = Aa;
|
|
4004
4019
|
});
|
|
4005
|
-
var
|
|
4006
|
-
var
|
|
4007
|
-
|
|
4008
|
-
function
|
|
4020
|
+
var Ys = te((Ds) => {
|
|
4021
|
+
var er = ns(), Oe = Rs(), va = zn(), _a = oe(), Ra = Gn();
|
|
4022
|
+
qe();
|
|
4023
|
+
function xa(t, e = true, n) {
|
|
4009
4024
|
n === void 0 && typeof e == "string" && (n = e, e = true);
|
|
4010
|
-
let r = Object.assign({},
|
|
4011
|
-
return new
|
|
4025
|
+
let r = Object.assign({}, Oe.Document.defaults[Oe.defaultOptions.version], Oe.defaultOptions);
|
|
4026
|
+
return new va.Schema(r).createNode(t, e, n);
|
|
4012
4027
|
}
|
|
4013
|
-
var
|
|
4028
|
+
var je = class extends Oe.Document {
|
|
4014
4029
|
constructor(e) {
|
|
4015
|
-
super(Object.assign({},
|
|
4030
|
+
super(Object.assign({}, Oe.defaultOptions, e));
|
|
4016
4031
|
}
|
|
4017
4032
|
};
|
|
4018
|
-
function
|
|
4033
|
+
function Da(t, e) {
|
|
4019
4034
|
let n = [], r;
|
|
4020
|
-
for (let s of
|
|
4021
|
-
let i = new
|
|
4035
|
+
for (let s of er.parse(t)) {
|
|
4036
|
+
let i = new je(e);
|
|
4022
4037
|
i.parse(s, r), n.push(i), r = i;
|
|
4023
4038
|
}
|
|
4024
4039
|
return n;
|
|
4025
4040
|
}
|
|
4026
|
-
function
|
|
4027
|
-
let n =
|
|
4041
|
+
function xs(t, e) {
|
|
4042
|
+
let n = er.parse(t), r = new je(e).parse(n[0]);
|
|
4028
4043
|
if (n.length > 1) {
|
|
4029
4044
|
let s = "Source contains multiple documents; please use YAML.parseAllDocuments()";
|
|
4030
|
-
r.errors.unshift(new
|
|
4045
|
+
r.errors.unshift(new _a.YAMLSemanticError(n[1], s));
|
|
4031
4046
|
}
|
|
4032
4047
|
return r;
|
|
4033
4048
|
}
|
|
4034
|
-
function
|
|
4035
|
-
let n =
|
|
4036
|
-
if (n.warnings.forEach((r) =>
|
|
4049
|
+
function Ya(t, e) {
|
|
4050
|
+
let n = xs(t, e);
|
|
4051
|
+
if (n.warnings.forEach((r) => Ra.warn(r)), n.errors.length > 0) throw n.errors[0];
|
|
4037
4052
|
return n.toJSON();
|
|
4038
4053
|
}
|
|
4039
|
-
function
|
|
4040
|
-
let n = new
|
|
4054
|
+
function $a(t, e) {
|
|
4055
|
+
let n = new je(e);
|
|
4041
4056
|
return n.contents = t, String(n);
|
|
4042
4057
|
}
|
|
4043
|
-
var
|
|
4044
|
-
createNode:
|
|
4045
|
-
defaultOptions:
|
|
4046
|
-
Document:
|
|
4047
|
-
parse:
|
|
4048
|
-
parseAllDocuments:
|
|
4049
|
-
parseCST:
|
|
4050
|
-
parseDocument:
|
|
4051
|
-
scalarOptions:
|
|
4052
|
-
stringify:
|
|
4058
|
+
var Ba = {
|
|
4059
|
+
createNode: xa,
|
|
4060
|
+
defaultOptions: Oe.defaultOptions,
|
|
4061
|
+
Document: je,
|
|
4062
|
+
parse: Ya,
|
|
4063
|
+
parseAllDocuments: Da,
|
|
4064
|
+
parseCST: er.parse,
|
|
4065
|
+
parseDocument: xs,
|
|
4066
|
+
scalarOptions: Oe.scalarOptions,
|
|
4067
|
+
stringify: $a
|
|
4053
4068
|
};
|
|
4054
|
-
|
|
4069
|
+
Ds.YAML = Ba;
|
|
4055
4070
|
});
|
|
4056
|
-
var
|
|
4057
|
-
|
|
4071
|
+
var tr = te((nf, $s) => {
|
|
4072
|
+
$s.exports = Ys().YAML;
|
|
4058
4073
|
});
|
|
4059
|
-
var
|
|
4060
|
-
var
|
|
4061
|
-
|
|
4062
|
-
|
|
4063
|
-
|
|
4064
|
-
|
|
4065
|
-
|
|
4066
|
-
|
|
4067
|
-
|
|
4068
|
-
|
|
4069
|
-
|
|
4070
|
-
|
|
4071
|
-
|
|
4072
|
-
|
|
4074
|
+
var Bs = te((G) => {
|
|
4075
|
+
var We = qe(), Qe = oe();
|
|
4076
|
+
G.findPair = We.findPair;
|
|
4077
|
+
G.parseMap = We.resolveMap;
|
|
4078
|
+
G.parseSeq = We.resolveSeq;
|
|
4079
|
+
G.stringifyNumber = We.stringifyNumber;
|
|
4080
|
+
G.stringifyString = We.stringifyString;
|
|
4081
|
+
G.toJSON = We.toJSON;
|
|
4082
|
+
G.Type = Qe.Type;
|
|
4083
|
+
G.YAMLError = Qe.YAMLError;
|
|
4084
|
+
G.YAMLReferenceError = Qe.YAMLReferenceError;
|
|
4085
|
+
G.YAMLSemanticError = Qe.YAMLSemanticError;
|
|
4086
|
+
G.YAMLSyntaxError = Qe.YAMLSyntaxError;
|
|
4087
|
+
G.YAMLWarning = Qe.YAMLWarning;
|
|
4073
4088
|
});
|
|
4074
|
-
var
|
|
4075
|
-
|
|
4076
|
-
|
|
4077
|
-
|
|
4078
|
-
|
|
4079
|
-
|
|
4089
|
+
var gr = {};
|
|
4090
|
+
yr(gr, {
|
|
4091
|
+
__parsePrettierYamlConfig: () => sc,
|
|
4092
|
+
languages: () => Xr,
|
|
4093
|
+
options: () => zr,
|
|
4094
|
+
parsers: () => hr,
|
|
4095
|
+
printers: () => rc
|
|
4080
4096
|
});
|
|
4081
|
-
var
|
|
4097
|
+
var Vi = (t, e, n, r) => {
|
|
4082
4098
|
if (!(t && e == null)) return e.replaceAll ? e.replaceAll(n, r) : n.global ? e.replace(n, r) : e.split(n).join(r);
|
|
4083
4099
|
};
|
|
4084
|
-
var
|
|
4085
|
-
var
|
|
4086
|
-
var
|
|
4087
|
-
var
|
|
4088
|
-
var
|
|
4089
|
-
var
|
|
4090
|
-
var
|
|
4091
|
-
var
|
|
4092
|
-
var
|
|
4093
|
-
var
|
|
4094
|
-
var
|
|
4095
|
-
var
|
|
4096
|
-
var
|
|
4097
|
-
var
|
|
4098
|
-
var
|
|
4099
|
-
var
|
|
4100
|
-
var
|
|
4101
|
-
|
|
4102
|
-
if (typeof
|
|
4103
|
-
|
|
4100
|
+
var At = Vi;
|
|
4101
|
+
var Me = "string";
|
|
4102
|
+
var ze = "array";
|
|
4103
|
+
var Ze = "cursor";
|
|
4104
|
+
var et = "indent";
|
|
4105
|
+
var Ce = "align";
|
|
4106
|
+
var tt = "trim";
|
|
4107
|
+
var ke = "group";
|
|
4108
|
+
var Pe = "fill";
|
|
4109
|
+
var ge = "if-break";
|
|
4110
|
+
var nt = "indent-if-break";
|
|
4111
|
+
var Ie = "line-suffix";
|
|
4112
|
+
var rt = "line-suffix-boundary";
|
|
4113
|
+
var Z = "line";
|
|
4114
|
+
var st = "label";
|
|
4115
|
+
var ve = "break-parent";
|
|
4116
|
+
var Lt = /* @__PURE__ */ new Set([Ze, et, Ce, tt, ke, Pe, ge, nt, Ie, rt, Z, st, ve]);
|
|
4117
|
+
var ji = (t, e, n) => {
|
|
4118
|
+
if (!(t && e == null)) return Array.isArray(e) || typeof e == "string" ? e[n < 0 ? e.length + n : n] : e.at(n);
|
|
4119
|
+
};
|
|
4120
|
+
var x = ji;
|
|
4121
|
+
function Wi(t) {
|
|
4122
|
+
if (typeof t == "string") return Me;
|
|
4123
|
+
if (Array.isArray(t)) return ze;
|
|
4104
4124
|
if (!t) return;
|
|
4105
4125
|
let {
|
|
4106
4126
|
type: e
|
|
4107
4127
|
} = t;
|
|
4108
|
-
if (
|
|
4128
|
+
if (Lt.has(e)) return e;
|
|
4109
4129
|
}
|
|
4110
|
-
var
|
|
4111
|
-
var
|
|
4130
|
+
var _e = Wi;
|
|
4131
|
+
var Qi = (t) => new Intl.ListFormat("en-US", {
|
|
4112
4132
|
type: "disjunction"
|
|
4113
4133
|
}).format(t);
|
|
4114
|
-
function
|
|
4134
|
+
function Gi(t) {
|
|
4115
4135
|
let e = t === null ? "null" : typeof t;
|
|
4116
4136
|
if (e !== "string" && e !== "object") return `Unexpected doc '${e}',
|
|
4117
4137
|
Expected it to be 'string' or 'object'.`;
|
|
4118
|
-
if (
|
|
4138
|
+
if (_e(t)) throw new Error("doc is valid.");
|
|
4119
4139
|
let n = Object.prototype.toString.call(t);
|
|
4120
4140
|
if (n !== "[object Object]") return `Unexpected doc '${n}'.`;
|
|
4121
|
-
let r =
|
|
4141
|
+
let r = Qi([...Lt].map((s) => `'${s}'`));
|
|
4122
4142
|
return `Unexpected doc.type '${t.type}'.
|
|
4123
4143
|
Expected it to be ${r}.`;
|
|
4124
4144
|
}
|
|
4125
|
-
var
|
|
4145
|
+
var pn = class extends Error {
|
|
4126
4146
|
name = "InvalidDocError";
|
|
4127
4147
|
constructor(e) {
|
|
4128
|
-
super(
|
|
4148
|
+
super(Gi(e)), this.doc = e;
|
|
4129
4149
|
}
|
|
4130
4150
|
};
|
|
4131
|
-
var
|
|
4132
|
-
|
|
4151
|
+
var mn = pn;
|
|
4152
|
+
function Ji(t, e) {
|
|
4153
|
+
if (typeof t == "string") return e(t);
|
|
4154
|
+
let n = /* @__PURE__ */ new Map();
|
|
4155
|
+
return r(t);
|
|
4156
|
+
function r(i) {
|
|
4157
|
+
if (n.has(i)) return n.get(i);
|
|
4158
|
+
let o = s(i);
|
|
4159
|
+
return n.set(i, o), o;
|
|
4160
|
+
}
|
|
4161
|
+
function s(i) {
|
|
4162
|
+
switch (_e(i)) {
|
|
4163
|
+
case ze:
|
|
4164
|
+
return e(i.map(r));
|
|
4165
|
+
case Pe:
|
|
4166
|
+
return e({
|
|
4167
|
+
...i,
|
|
4168
|
+
parts: i.parts.map(r)
|
|
4169
|
+
});
|
|
4170
|
+
case ge:
|
|
4171
|
+
return e({
|
|
4172
|
+
...i,
|
|
4173
|
+
breakContents: r(i.breakContents),
|
|
4174
|
+
flatContents: r(i.flatContents)
|
|
4175
|
+
});
|
|
4176
|
+
case ke: {
|
|
4177
|
+
let {
|
|
4178
|
+
expandedStates: o,
|
|
4179
|
+
contents: a
|
|
4180
|
+
} = i;
|
|
4181
|
+
return o ? (o = o.map(r), a = o[0]) : a = r(a), e({
|
|
4182
|
+
...i,
|
|
4183
|
+
contents: a,
|
|
4184
|
+
expandedStates: o
|
|
4185
|
+
});
|
|
4186
|
+
}
|
|
4187
|
+
case Ce:
|
|
4188
|
+
case et:
|
|
4189
|
+
case nt:
|
|
4190
|
+
case st:
|
|
4191
|
+
case Ie:
|
|
4192
|
+
return e({
|
|
4193
|
+
...i,
|
|
4194
|
+
contents: r(i.contents)
|
|
4195
|
+
});
|
|
4196
|
+
case Me:
|
|
4197
|
+
case Ze:
|
|
4198
|
+
case tt:
|
|
4199
|
+
case rt:
|
|
4200
|
+
case Z:
|
|
4201
|
+
case ve:
|
|
4202
|
+
return e(i);
|
|
4203
|
+
default:
|
|
4204
|
+
throw new mn(i);
|
|
4205
|
+
}
|
|
4206
|
+
}
|
|
4207
|
+
}
|
|
4208
|
+
function Er(t, e = it) {
|
|
4209
|
+
return Ji(t, (n) => typeof n == "string" ? P(e, n.split(`
|
|
4210
|
+
`)) : n);
|
|
4211
|
+
}
|
|
4212
|
+
var hn = () => {
|
|
4133
4213
|
};
|
|
4134
|
-
var
|
|
4135
|
-
function
|
|
4214
|
+
var gn = hn;
|
|
4215
|
+
function ot(t, e) {
|
|
4136
4216
|
return {
|
|
4137
|
-
type:
|
|
4217
|
+
type: Ce,
|
|
4138
4218
|
contents: e,
|
|
4139
4219
|
n: t
|
|
4140
4220
|
};
|
|
4141
4221
|
}
|
|
4142
|
-
function
|
|
4143
|
-
return
|
|
4144
|
-
type:
|
|
4222
|
+
function Re(t, e = {}) {
|
|
4223
|
+
return gn(e.expandedStates), {
|
|
4224
|
+
type: ke,
|
|
4145
4225
|
id: e.id,
|
|
4146
4226
|
contents: t,
|
|
4147
4227
|
break: !!e.shouldBreak,
|
|
4148
4228
|
expandedStates: e.expandedStates
|
|
4149
4229
|
};
|
|
4150
4230
|
}
|
|
4151
|
-
function
|
|
4152
|
-
return
|
|
4231
|
+
function dn(t) {
|
|
4232
|
+
return ot(Number.NEGATIVE_INFINITY, t);
|
|
4153
4233
|
}
|
|
4154
|
-
function
|
|
4155
|
-
return
|
|
4234
|
+
function wr(t) {
|
|
4235
|
+
return ot({
|
|
4156
4236
|
type: "root"
|
|
4157
4237
|
}, t);
|
|
4158
4238
|
}
|
|
4159
|
-
function
|
|
4160
|
-
return
|
|
4239
|
+
function br(t) {
|
|
4240
|
+
return ot(-1, t);
|
|
4161
4241
|
}
|
|
4162
|
-
function
|
|
4163
|
-
return
|
|
4242
|
+
function yn(t, e) {
|
|
4243
|
+
return Re(t[0], {
|
|
4164
4244
|
...e,
|
|
4165
4245
|
expandedStates: t
|
|
4166
4246
|
});
|
|
4167
4247
|
}
|
|
4168
|
-
function
|
|
4248
|
+
function Tt(t) {
|
|
4169
4249
|
return {
|
|
4170
|
-
type:
|
|
4250
|
+
type: Pe,
|
|
4171
4251
|
parts: t
|
|
4172
4252
|
};
|
|
4173
4253
|
}
|
|
4174
|
-
function
|
|
4254
|
+
function at(t, e = "", n = {}) {
|
|
4175
4255
|
return {
|
|
4176
|
-
type:
|
|
4256
|
+
type: ge,
|
|
4177
4257
|
breakContents: t,
|
|
4178
4258
|
flatContents: e,
|
|
4179
4259
|
groupId: n.groupId
|
|
4180
4260
|
};
|
|
4181
4261
|
}
|
|
4182
|
-
function
|
|
4262
|
+
function Nr(t) {
|
|
4183
4263
|
return {
|
|
4184
|
-
type:
|
|
4264
|
+
type: Ie,
|
|
4185
4265
|
contents: t
|
|
4186
4266
|
};
|
|
4187
4267
|
}
|
|
4188
|
-
var
|
|
4189
|
-
type:
|
|
4268
|
+
var Mt = {
|
|
4269
|
+
type: ve
|
|
4190
4270
|
};
|
|
4191
|
-
var
|
|
4192
|
-
type:
|
|
4271
|
+
var Xi = {
|
|
4272
|
+
type: Z,
|
|
4193
4273
|
hard: true
|
|
4194
4274
|
};
|
|
4195
|
-
var
|
|
4196
|
-
type:
|
|
4275
|
+
var zi = {
|
|
4276
|
+
type: Z,
|
|
4197
4277
|
hard: true,
|
|
4198
4278
|
literal: true
|
|
4199
4279
|
};
|
|
4200
4280
|
var ne = {
|
|
4201
|
-
type:
|
|
4281
|
+
type: Z
|
|
4202
4282
|
};
|
|
4203
|
-
var
|
|
4204
|
-
type:
|
|
4283
|
+
var Ct = {
|
|
4284
|
+
type: Z,
|
|
4205
4285
|
soft: true
|
|
4206
4286
|
};
|
|
4207
|
-
var N = [
|
|
4208
|
-
var
|
|
4209
|
-
function
|
|
4287
|
+
var N = [Xi, Mt];
|
|
4288
|
+
var it = [zi, Mt];
|
|
4289
|
+
function P(t, e) {
|
|
4210
4290
|
let n = [];
|
|
4211
4291
|
for (let r = 0; r < e.length; r++) r !== 0 && n.push(t), n.push(e[r]);
|
|
4212
4292
|
return n;
|
|
4213
4293
|
}
|
|
4214
|
-
|
|
4215
|
-
if (!(t && e == null)) return Array.isArray(e) || typeof e == "string" ? e[n < 0 ? e.length + n : n] : e.at(n);
|
|
4216
|
-
};
|
|
4217
|
-
var x = Di;
|
|
4218
|
-
function Yi(t, e) {
|
|
4219
|
-
if (typeof t == "string") return e(t);
|
|
4220
|
-
let n = /* @__PURE__ */ new Map();
|
|
4221
|
-
return r(t);
|
|
4222
|
-
function r(i) {
|
|
4223
|
-
if (n.has(i)) return n.get(i);
|
|
4224
|
-
let o = s(i);
|
|
4225
|
-
return n.set(i, o), o;
|
|
4226
|
-
}
|
|
4227
|
-
function s(i) {
|
|
4228
|
-
switch (et(i)) {
|
|
4229
|
-
case Qe:
|
|
4230
|
-
return e(i.map(r));
|
|
4231
|
-
case Ae:
|
|
4232
|
-
return e({
|
|
4233
|
-
...i,
|
|
4234
|
-
parts: i.parts.map(r)
|
|
4235
|
-
});
|
|
4236
|
-
case Te:
|
|
4237
|
-
return e({
|
|
4238
|
-
...i,
|
|
4239
|
-
breakContents: r(i.breakContents),
|
|
4240
|
-
flatContents: r(i.flatContents)
|
|
4241
|
-
});
|
|
4242
|
-
case Le: {
|
|
4243
|
-
let {
|
|
4244
|
-
expandedStates: o,
|
|
4245
|
-
contents: a
|
|
4246
|
-
} = i;
|
|
4247
|
-
return o ? (o = o.map(r), a = o[0]) : a = r(a), e({
|
|
4248
|
-
...i,
|
|
4249
|
-
contents: a,
|
|
4250
|
-
expandedStates: o
|
|
4251
|
-
});
|
|
4252
|
-
}
|
|
4253
|
-
case Oe:
|
|
4254
|
-
case Ge:
|
|
4255
|
-
case Xe:
|
|
4256
|
-
case Ze:
|
|
4257
|
-
case Ce:
|
|
4258
|
-
return e({
|
|
4259
|
-
...i,
|
|
4260
|
-
contents: r(i.contents)
|
|
4261
|
-
});
|
|
4262
|
-
case je:
|
|
4263
|
-
case Je:
|
|
4264
|
-
case He:
|
|
4265
|
-
case ze:
|
|
4266
|
-
case te:
|
|
4267
|
-
case Me:
|
|
4268
|
-
return e(i);
|
|
4269
|
-
default:
|
|
4270
|
-
throw new sn(i);
|
|
4271
|
-
}
|
|
4272
|
-
}
|
|
4273
|
-
}
|
|
4274
|
-
function cr(t, e = rt) {
|
|
4275
|
-
return Yi(t, (n) => typeof n == "string" ? v(e, n.split(`
|
|
4276
|
-
`)) : n);
|
|
4277
|
-
}
|
|
4278
|
-
function Ot(t) {
|
|
4294
|
+
function kt(t) {
|
|
4279
4295
|
return (e, n, r) => {
|
|
4280
4296
|
let s = !!(r != null && r.backwards);
|
|
4281
4297
|
if (n === false) return false;
|
|
@@ -4292,8 +4308,8 @@ function Ot(t) {
|
|
|
4292
4308
|
return o === -1 || o === i ? o : false;
|
|
4293
4309
|
};
|
|
4294
4310
|
}
|
|
4295
|
-
var
|
|
4296
|
-
function
|
|
4311
|
+
var En = kt(" ");
|
|
4312
|
+
function Zi(t, e, n) {
|
|
4297
4313
|
let r = !!(n != null && n.backwards);
|
|
4298
4314
|
if (e === false) return false;
|
|
4299
4315
|
let s = t.charAt(e);
|
|
@@ -4310,57 +4326,57 @@ function Bi(t, e, n) {
|
|
|
4310
4326
|
}
|
|
4311
4327
|
return e;
|
|
4312
4328
|
}
|
|
4313
|
-
var
|
|
4314
|
-
function
|
|
4329
|
+
var Sn = Zi;
|
|
4330
|
+
function eo(t, e) {
|
|
4315
4331
|
let n = e - 1;
|
|
4316
|
-
n =
|
|
4332
|
+
n = En(t, n, {
|
|
4317
4333
|
backwards: true
|
|
4318
|
-
}), n =
|
|
4334
|
+
}), n = Sn(t, n, {
|
|
4319
4335
|
backwards: true
|
|
4320
|
-
}), n =
|
|
4336
|
+
}), n = En(t, n, {
|
|
4321
4337
|
backwards: true
|
|
4322
4338
|
});
|
|
4323
|
-
let r =
|
|
4339
|
+
let r = Sn(t, n, {
|
|
4324
4340
|
backwards: true
|
|
4325
4341
|
});
|
|
4326
4342
|
return n !== r;
|
|
4327
4343
|
}
|
|
4328
|
-
var
|
|
4329
|
-
var
|
|
4344
|
+
var Or = eo;
|
|
4345
|
+
var wn = class extends Error {
|
|
4330
4346
|
name = "UnexpectedNodeError";
|
|
4331
4347
|
constructor(e, n, r = "type") {
|
|
4332
4348
|
super(`Unexpected ${n} node ${r}: ${JSON.stringify(e[r])}.`), this.node = e;
|
|
4333
4349
|
}
|
|
4334
4350
|
};
|
|
4335
|
-
var
|
|
4336
|
-
function
|
|
4351
|
+
var Ar = wn;
|
|
4352
|
+
function Lr(t, e) {
|
|
4337
4353
|
let {
|
|
4338
4354
|
node: n
|
|
4339
4355
|
} = t;
|
|
4340
|
-
if (n.type === "root" && e.filepath && /(?:[/\\]|^)\.(?:prettier|stylelint|lintstaged)rc
|
|
4356
|
+
if (n.type === "root" && e.filepath && /(?:[/\\]|^)\.(?:prettier|stylelint|lintstaged)rc$/u.test(e.filepath)) return async (r) => {
|
|
4341
4357
|
let s = await r(e.originalText, {
|
|
4342
4358
|
parser: "json"
|
|
4343
4359
|
});
|
|
4344
4360
|
return s ? [s, N] : void 0;
|
|
4345
4361
|
};
|
|
4346
4362
|
}
|
|
4347
|
-
|
|
4348
|
-
var
|
|
4349
|
-
var
|
|
4350
|
-
function
|
|
4351
|
-
if (
|
|
4352
|
-
let e =
|
|
4353
|
-
return
|
|
4363
|
+
Lr.getVisitorKeys = () => [];
|
|
4364
|
+
var Tr = Lr;
|
|
4365
|
+
var ct = null;
|
|
4366
|
+
function lt(t) {
|
|
4367
|
+
if (ct !== null && typeof ct.property) {
|
|
4368
|
+
let e = ct;
|
|
4369
|
+
return ct = lt.prototype = null, e;
|
|
4354
4370
|
}
|
|
4355
|
-
return
|
|
4371
|
+
return ct = lt.prototype = t ?? /* @__PURE__ */ Object.create(null), new lt();
|
|
4356
4372
|
}
|
|
4357
|
-
var
|
|
4358
|
-
for (let t = 0; t <=
|
|
4359
|
-
function
|
|
4360
|
-
return
|
|
4373
|
+
var to = 10;
|
|
4374
|
+
for (let t = 0; t <= to; t++) lt();
|
|
4375
|
+
function bn(t) {
|
|
4376
|
+
return lt(t);
|
|
4361
4377
|
}
|
|
4362
|
-
function
|
|
4363
|
-
|
|
4378
|
+
function no(t, e = "type") {
|
|
4379
|
+
bn(t);
|
|
4364
4380
|
function n(r) {
|
|
4365
4381
|
let s = r[e], i = t[s];
|
|
4366
4382
|
if (!Array.isArray(i)) throw Object.assign(new Error(`Missing visitor keys for '${s}'.`), {
|
|
@@ -4370,8 +4386,8 @@ function qi(t, e = "type") {
|
|
|
4370
4386
|
}
|
|
4371
4387
|
return n;
|
|
4372
4388
|
}
|
|
4373
|
-
var
|
|
4374
|
-
var
|
|
4389
|
+
var Mr = no;
|
|
4390
|
+
var ro = Object.fromEntries(Object.entries({
|
|
4375
4391
|
root: ["children"],
|
|
4376
4392
|
document: ["head", "body", "children"],
|
|
4377
4393
|
documentHead: ["children"],
|
|
@@ -4397,56 +4413,63 @@ var Ui = Object.fromEntries(Object.entries({
|
|
|
4397
4413
|
tag: [],
|
|
4398
4414
|
anchor: []
|
|
4399
4415
|
}).map(([t, e]) => [t, [...e, "anchor", "tag", "indicatorComment", "leadingComments", "middleComments", "trailingComment", "endComments"]]));
|
|
4400
|
-
var
|
|
4401
|
-
var
|
|
4402
|
-
var
|
|
4403
|
-
function
|
|
4416
|
+
var Cr = ro;
|
|
4417
|
+
var so = Mr(Cr);
|
|
4418
|
+
var kr = so;
|
|
4419
|
+
function xe(t) {
|
|
4404
4420
|
return t.position.start.offset;
|
|
4405
4421
|
}
|
|
4406
|
-
function
|
|
4422
|
+
function Pr(t) {
|
|
4407
4423
|
return t.position.end.offset;
|
|
4408
4424
|
}
|
|
4409
|
-
|
|
4410
|
-
|
|
4425
|
+
var Ir = "format";
|
|
4426
|
+
var vr = /^\s*#[^\S\n]*@(?:noformat|noprettier)\s*?(?:\n|$)/u;
|
|
4427
|
+
var _r = /^\s*#[^\S\n]*@(?:format|prettier)\s*?(?:\n|$)/u;
|
|
4428
|
+
var Rr = /^\s*@(?:format|prettier)\s*$/u;
|
|
4429
|
+
function xr(t) {
|
|
4430
|
+
return Rr.test(t);
|
|
4411
4431
|
}
|
|
4412
|
-
function
|
|
4413
|
-
return
|
|
4432
|
+
function Dr(t) {
|
|
4433
|
+
return _r.test(t);
|
|
4434
|
+
}
|
|
4435
|
+
function Yr(t) {
|
|
4436
|
+
return vr.test(t);
|
|
4414
4437
|
}
|
|
4415
|
-
function
|
|
4416
|
-
return `#
|
|
4438
|
+
function $r(t) {
|
|
4439
|
+
return `# @${Ir}
|
|
4417
4440
|
|
|
4418
4441
|
${t}`;
|
|
4419
4442
|
}
|
|
4420
|
-
function
|
|
4443
|
+
function io(t) {
|
|
4421
4444
|
return Array.isArray(t) && t.length > 0;
|
|
4422
4445
|
}
|
|
4423
|
-
var
|
|
4424
|
-
function
|
|
4446
|
+
var De = io;
|
|
4447
|
+
function K(t, e) {
|
|
4425
4448
|
return typeof (t == null ? void 0 : t.type) == "string" && (!e || e.includes(t.type));
|
|
4426
4449
|
}
|
|
4427
|
-
function
|
|
4450
|
+
function Nn(t, e, n) {
|
|
4428
4451
|
return e("children" in t ? {
|
|
4429
4452
|
...t,
|
|
4430
|
-
children: t.children.map((r) =>
|
|
4453
|
+
children: t.children.map((r) => Nn(r, e, t))
|
|
4431
4454
|
} : t, n);
|
|
4432
4455
|
}
|
|
4433
|
-
function
|
|
4456
|
+
function Ye(t, e, n) {
|
|
4434
4457
|
Object.defineProperty(t, e, {
|
|
4435
4458
|
get: n,
|
|
4436
4459
|
enumerable: false
|
|
4437
4460
|
});
|
|
4438
4461
|
}
|
|
4439
|
-
function
|
|
4462
|
+
function Fr(t, e) {
|
|
4440
4463
|
let n = 0, r = e.length;
|
|
4441
4464
|
for (let s = t.position.end.offset - 1; s < r; s++) {
|
|
4442
4465
|
let i = e[s];
|
|
4443
4466
|
if (i === `
|
|
4444
|
-
` && n++, n === 1 && /\S
|
|
4467
|
+
` && n++, n === 1 && /\S/u.test(i)) return false;
|
|
4445
4468
|
if (n === 2) return true;
|
|
4446
4469
|
}
|
|
4447
4470
|
return false;
|
|
4448
4471
|
}
|
|
4449
|
-
function
|
|
4472
|
+
function Pt(t) {
|
|
4450
4473
|
let {
|
|
4451
4474
|
node: e
|
|
4452
4475
|
} = t;
|
|
@@ -4463,67 +4486,67 @@ function Lt(t) {
|
|
|
4463
4486
|
}
|
|
4464
4487
|
return true;
|
|
4465
4488
|
}
|
|
4466
|
-
function
|
|
4467
|
-
return
|
|
4489
|
+
function It(t) {
|
|
4490
|
+
return De(t.children) ? It(x(false, t.children, -1)) : t;
|
|
4468
4491
|
}
|
|
4469
|
-
function
|
|
4492
|
+
function Br(t) {
|
|
4470
4493
|
return t.value.trim() === "prettier-ignore";
|
|
4471
4494
|
}
|
|
4472
|
-
function
|
|
4495
|
+
function qr(t) {
|
|
4473
4496
|
let {
|
|
4474
4497
|
node: e
|
|
4475
4498
|
} = t;
|
|
4476
4499
|
if (e.type === "documentBody") {
|
|
4477
4500
|
let n = t.parent.head;
|
|
4478
|
-
return
|
|
4501
|
+
return I(n) && Br(x(false, n.endComments, -1));
|
|
4479
4502
|
}
|
|
4480
|
-
return
|
|
4503
|
+
return ee(e) && Br(x(false, e.leadingComments, -1));
|
|
4481
4504
|
}
|
|
4482
|
-
function
|
|
4483
|
-
return !
|
|
4505
|
+
function $e(t) {
|
|
4506
|
+
return !De(t.children) && !oo(t);
|
|
4484
4507
|
}
|
|
4485
|
-
function
|
|
4486
|
-
return
|
|
4508
|
+
function oo(t) {
|
|
4509
|
+
return ee(t) || ie(t) || On(t) || V(t) || I(t);
|
|
4487
4510
|
}
|
|
4488
|
-
function
|
|
4489
|
-
return
|
|
4511
|
+
function ee(t) {
|
|
4512
|
+
return De(t == null ? void 0 : t.leadingComments);
|
|
4490
4513
|
}
|
|
4491
4514
|
function ie(t) {
|
|
4492
|
-
return
|
|
4515
|
+
return De(t == null ? void 0 : t.middleComments);
|
|
4493
4516
|
}
|
|
4494
|
-
function
|
|
4517
|
+
function On(t) {
|
|
4495
4518
|
return t == null ? void 0 : t.indicatorComment;
|
|
4496
4519
|
}
|
|
4497
|
-
function
|
|
4520
|
+
function V(t) {
|
|
4498
4521
|
return t == null ? void 0 : t.trailingComment;
|
|
4499
4522
|
}
|
|
4500
|
-
function
|
|
4501
|
-
return
|
|
4523
|
+
function I(t) {
|
|
4524
|
+
return De(t == null ? void 0 : t.endComments);
|
|
4502
4525
|
}
|
|
4503
|
-
function
|
|
4526
|
+
function Ur(t) {
|
|
4504
4527
|
let e = [], n;
|
|
4505
|
-
for (let r of t.split(/( +)/)) r !== " " ? n === " " ? e.push(r) : e.push((e.pop() || "") + r) : n === void 0 && e.unshift(""), n = r;
|
|
4528
|
+
for (let r of t.split(/( +)/u)) r !== " " ? n === " " ? e.push(r) : e.push((e.pop() || "") + r) : n === void 0 && e.unshift(""), n = r;
|
|
4506
4529
|
return n === " " && e.push((e.pop() || "") + " "), e[0] === "" && (e.shift(), e.unshift(" " + (e.shift() || ""))), e;
|
|
4507
4530
|
}
|
|
4508
|
-
function
|
|
4531
|
+
function Kr(t, e, n) {
|
|
4509
4532
|
let r = e.split(`
|
|
4510
4533
|
`).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());
|
|
4511
|
-
return n.proseWrap === "preserve" ? r.map((s) => s.length === 0 ? [] : [s]) : r.map((s) => s.length === 0 ? [] :
|
|
4534
|
+
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);
|
|
4512
4535
|
}
|
|
4513
|
-
function
|
|
4536
|
+
function Vr(t, {
|
|
4514
4537
|
parentIndent: e,
|
|
4515
4538
|
isLastDescendant: n,
|
|
4516
4539
|
options: r
|
|
4517
4540
|
}) {
|
|
4518
|
-
let s = t.position.start.line === t.position.end.line ? "" : r.originalText.slice(t.position.start.offset, t.position.end.offset).match(/^[^\n]*\n(.*)$/
|
|
4541
|
+
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;
|
|
4519
4542
|
if (t.indent === null) {
|
|
4520
|
-
let c = s.match(/^(?<leadingSpace> *)[^\n\r ]/
|
|
4543
|
+
let c = s.match(/^(?<leadingSpace> *)[^\n\r ]/mu);
|
|
4521
4544
|
i = c ? c.groups.leadingSpace.length : Number.POSITIVE_INFINITY;
|
|
4522
4545
|
} else i = t.indent - 1 + e;
|
|
4523
4546
|
let o = s.split(`
|
|
4524
4547
|
`).map((c) => c.slice(i));
|
|
4525
4548
|
if (r.proseWrap === "preserve" || t.type === "blockLiteral") return a(o.map((c) => c.length === 0 ? [] : [c]));
|
|
4526
|
-
return a(o.map((c) => c.length === 0 ? [] :
|
|
4549
|
+
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));
|
|
4527
4550
|
function a(c) {
|
|
4528
4551
|
if (t.chomping === "keep") return x(false, c, -1).length === 0 ? c.slice(0, -1) : c;
|
|
4529
4552
|
let l = 0;
|
|
@@ -4531,7 +4554,7 @@ function Ar(t, {
|
|
|
4531
4554
|
return l === 0 ? c : l >= 2 && !n ? c.slice(0, -(l - 1)) : c.slice(0, -l);
|
|
4532
4555
|
}
|
|
4533
4556
|
}
|
|
4534
|
-
function
|
|
4557
|
+
function ft(t) {
|
|
4535
4558
|
if (!t) return true;
|
|
4536
4559
|
switch (t.type) {
|
|
4537
4560
|
case "plain":
|
|
@@ -4545,75 +4568,75 @@ function ot(t) {
|
|
|
4545
4568
|
return false;
|
|
4546
4569
|
}
|
|
4547
4570
|
}
|
|
4548
|
-
var
|
|
4549
|
-
function
|
|
4571
|
+
var An = /* @__PURE__ */ new WeakMap();
|
|
4572
|
+
function vt(t, e) {
|
|
4550
4573
|
let {
|
|
4551
4574
|
node: n,
|
|
4552
4575
|
root: r
|
|
4553
4576
|
} = t, s;
|
|
4554
|
-
return
|
|
4577
|
+
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 : "";
|
|
4555
4578
|
}
|
|
4556
|
-
function
|
|
4557
|
-
return
|
|
4579
|
+
function Ln(t) {
|
|
4580
|
+
return I(t) && !K(t, ["documentHead", "documentBody", "flowMapping", "flowSequence"]);
|
|
4558
4581
|
}
|
|
4559
|
-
function
|
|
4560
|
-
return
|
|
4582
|
+
function v(t, e) {
|
|
4583
|
+
return ot(" ".repeat(t), e);
|
|
4561
4584
|
}
|
|
4562
|
-
function
|
|
4585
|
+
function ao(t, e, n) {
|
|
4563
4586
|
let {
|
|
4564
4587
|
node: r
|
|
4565
|
-
} = t, s = t.ancestors.filter((l) => l.type === "sequence" || l.type === "mapping").length, i =
|
|
4566
|
-
r.indent !== null && o.push(r.indent.toString()), r.chomping !== "clip" && o.push(r.chomping === "keep" ? "+" : "-"),
|
|
4567
|
-
let a =
|
|
4588
|
+
} = t, s = t.ancestors.filter((l) => l.type === "sequence" || l.type === "mapping").length, i = Pt(t), o = [r.type === "blockFolded" ? ">" : "|"];
|
|
4589
|
+
r.indent !== null && o.push(r.indent.toString()), r.chomping !== "clip" && o.push(r.chomping === "keep" ? "+" : "-"), On(r) && o.push(" ", n("indicatorComment"));
|
|
4590
|
+
let a = Vr(r, {
|
|
4568
4591
|
parentIndent: s,
|
|
4569
4592
|
isLastDescendant: i,
|
|
4570
|
-
options:
|
|
4593
|
+
options: e
|
|
4571
4594
|
}), c = [];
|
|
4572
|
-
for (let [l, f] of a.entries()) l === 0 && c.push(N), c.push(
|
|
4573
|
-
return r.indent === null ? o.push(
|
|
4595
|
+
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));
|
|
4596
|
+
return r.indent === null ? o.push(br(v(e.tabWidth, c))) : o.push(dn(v(r.indent - 1 + s, c))), o;
|
|
4574
4597
|
}
|
|
4575
|
-
var
|
|
4576
|
-
function
|
|
4598
|
+
var jr = ao;
|
|
4599
|
+
function _t(t, e, n) {
|
|
4577
4600
|
let {
|
|
4578
4601
|
node: r
|
|
4579
|
-
} = t, s = r.type === "flowMapping", i = s ? "{" : "[", o = s ? "}" : "]", a =
|
|
4580
|
-
s && r.children.length > 0 &&
|
|
4581
|
-
let c = x(false, r.children, -1), l = (c == null ? void 0 : c.type) === "flowMappingItem" &&
|
|
4582
|
-
return [i,
|
|
4602
|
+
} = t, s = r.type === "flowMapping", i = s ? "{" : "[", o = s ? "}" : "]", a = Ct;
|
|
4603
|
+
s && r.children.length > 0 && e.bracketSpacing && (a = ne);
|
|
4604
|
+
let c = x(false, r.children, -1), l = (c == null ? void 0 : c.type) === "flowMappingItem" && $e(c.key) && $e(c.value);
|
|
4605
|
+
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];
|
|
4583
4606
|
}
|
|
4584
|
-
function
|
|
4607
|
+
function co(t, e, n) {
|
|
4585
4608
|
return t.map(({
|
|
4586
4609
|
isLast: r,
|
|
4587
4610
|
node: s,
|
|
4588
4611
|
next: i
|
|
4589
|
-
}) => [
|
|
4612
|
+
}) => [n(), r ? "" : [",", ne, s.position.start.line !== i.position.start.line ? vt(t, e.originalText) : ""]], "children");
|
|
4590
4613
|
}
|
|
4591
|
-
function
|
|
4592
|
-
var
|
|
4614
|
+
function lo(t, e, n) {
|
|
4615
|
+
var M;
|
|
4593
4616
|
let {
|
|
4594
4617
|
node: r,
|
|
4595
4618
|
parent: s
|
|
4596
4619
|
} = t, {
|
|
4597
4620
|
key: i,
|
|
4598
4621
|
value: o
|
|
4599
|
-
} = r, a =
|
|
4622
|
+
} = r, a = $e(i), c = $e(o);
|
|
4600
4623
|
if (a && c) return ": ";
|
|
4601
|
-
let l =
|
|
4602
|
-
if (c) return r.type === "flowMappingItem" && s.type === "flowMapping" ? l : r.type === "mappingItem" &&
|
|
4603
|
-
let m =
|
|
4604
|
-
if (a) return [": ",
|
|
4605
|
-
if (
|
|
4606
|
-
if (
|
|
4607
|
-
let d = Symbol("mappingKey"), y =
|
|
4624
|
+
let l = n("key"), f = fo(r) ? " " : "";
|
|
4625
|
+
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)];
|
|
4626
|
+
let m = n("value");
|
|
4627
|
+
if (a) return [": ", v(2, m)];
|
|
4628
|
+
if (ee(o) || !ft(i.content)) return ["? ", v(2, l), N, ...t.map(() => [n(), N], "value", "leadingComments"), ": ", v(2, m)];
|
|
4629
|
+
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];
|
|
4630
|
+
let d = Symbol("mappingKey"), y = Re([at("? "), Re(v(2, l), {
|
|
4608
4631
|
id: d
|
|
4609
|
-
})]), h = [N, ": ",
|
|
4610
|
-
|
|
4611
|
-
let w =
|
|
4612
|
-
return
|
|
4632
|
+
})]), h = [N, ": ", v(2, m)], g = [f, ":"];
|
|
4633
|
+
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);
|
|
4634
|
+
let w = v(e.tabWidth, g);
|
|
4635
|
+
return Tn(i.content, e) && !ee(i.content) && !ie(i.content) && !I(i) ? yn([[l, w]]) : yn([[y, at(h, w, {
|
|
4613
4636
|
groupId: d
|
|
4614
4637
|
})]]);
|
|
4615
4638
|
}
|
|
4616
|
-
function
|
|
4639
|
+
function Tn(t, e) {
|
|
4617
4640
|
if (!t) return true;
|
|
4618
4641
|
switch (t.type) {
|
|
4619
4642
|
case "plain":
|
|
@@ -4626,22 +4649,22 @@ function dn(t, e) {
|
|
|
4626
4649
|
return false;
|
|
4627
4650
|
}
|
|
4628
4651
|
if (e.proseWrap === "preserve") return t.position.start.line === t.position.end.line;
|
|
4629
|
-
if (/\\$/
|
|
4652
|
+
if (/\\$/mu.test(e.originalText.slice(t.position.start.offset, t.position.end.offset))) return false;
|
|
4630
4653
|
switch (e.proseWrap) {
|
|
4631
4654
|
case "never":
|
|
4632
4655
|
return !t.value.includes(`
|
|
4633
4656
|
`);
|
|
4634
4657
|
case "always":
|
|
4635
|
-
return !/[\n ]
|
|
4658
|
+
return !/[\n ]/u.test(t.value);
|
|
4636
4659
|
default:
|
|
4637
4660
|
return false;
|
|
4638
4661
|
}
|
|
4639
4662
|
}
|
|
4640
|
-
function
|
|
4663
|
+
function fo(t) {
|
|
4641
4664
|
var e;
|
|
4642
4665
|
return ((e = t.key.content) == null ? void 0 : e.type) === "alias";
|
|
4643
4666
|
}
|
|
4644
|
-
function
|
|
4667
|
+
function uo(t) {
|
|
4645
4668
|
if (!t) return true;
|
|
4646
4669
|
switch (t.type) {
|
|
4647
4670
|
case "plain":
|
|
@@ -4654,46 +4677,46 @@ function Hi(t) {
|
|
|
4654
4677
|
return false;
|
|
4655
4678
|
}
|
|
4656
4679
|
}
|
|
4657
|
-
var
|
|
4658
|
-
function
|
|
4659
|
-
return
|
|
4680
|
+
var Wr = lo;
|
|
4681
|
+
function po(t) {
|
|
4682
|
+
return Nn(t, mo);
|
|
4660
4683
|
}
|
|
4661
|
-
function
|
|
4684
|
+
function mo(t) {
|
|
4662
4685
|
switch (t.type) {
|
|
4663
4686
|
case "document":
|
|
4664
|
-
|
|
4687
|
+
Ye(t, "head", () => t.children[0]), Ye(t, "body", () => t.children[1]);
|
|
4665
4688
|
break;
|
|
4666
4689
|
case "documentBody":
|
|
4667
4690
|
case "sequenceItem":
|
|
4668
4691
|
case "flowSequenceItem":
|
|
4669
4692
|
case "mappingKey":
|
|
4670
4693
|
case "mappingValue":
|
|
4671
|
-
|
|
4694
|
+
Ye(t, "content", () => t.children[0]);
|
|
4672
4695
|
break;
|
|
4673
4696
|
case "mappingItem":
|
|
4674
4697
|
case "flowMappingItem":
|
|
4675
|
-
|
|
4698
|
+
Ye(t, "key", () => t.children[0]), Ye(t, "value", () => t.children[1]);
|
|
4676
4699
|
break;
|
|
4677
4700
|
}
|
|
4678
4701
|
return t;
|
|
4679
4702
|
}
|
|
4680
|
-
var
|
|
4681
|
-
function
|
|
4703
|
+
var Qr = po;
|
|
4704
|
+
function ho(t, e, n) {
|
|
4682
4705
|
let {
|
|
4683
4706
|
node: r
|
|
4684
4707
|
} = t, s = [];
|
|
4685
|
-
r.type !== "mappingValue" &&
|
|
4708
|
+
r.type !== "mappingValue" && ee(r) && s.push([P(N, t.map(n, "leadingComments")), N]);
|
|
4686
4709
|
let {
|
|
4687
4710
|
tag: i,
|
|
4688
4711
|
anchor: o
|
|
4689
4712
|
} = r;
|
|
4690
4713
|
i && s.push(n("tag")), i && o && s.push(" "), o && s.push(n("anchor"));
|
|
4691
4714
|
let a = "";
|
|
4692
|
-
return
|
|
4715
|
+
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(({
|
|
4693
4716
|
node: c
|
|
4694
|
-
}) => [
|
|
4717
|
+
}) => [Or(e.originalText, xe(c)) ? N : "", n()], "endComments"))])), s.push(a), s;
|
|
4695
4718
|
}
|
|
4696
|
-
function
|
|
4719
|
+
function go(t, e, n) {
|
|
4697
4720
|
let {
|
|
4698
4721
|
node: r
|
|
4699
4722
|
} = t;
|
|
@@ -4705,30 +4728,30 @@ function eo(t, e, n) {
|
|
|
4705
4728
|
next: a,
|
|
4706
4729
|
isFirst: c
|
|
4707
4730
|
}) => {
|
|
4708
|
-
c || s.push(N), s.push(n()),
|
|
4731
|
+
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, "---");
|
|
4709
4732
|
}, "children");
|
|
4710
|
-
let i =
|
|
4711
|
-
return (!
|
|
4733
|
+
let i = It(r);
|
|
4734
|
+
return (!K(i, ["blockLiteral", "blockFolded"]) || i.chomping !== "keep") && s.push(N), s;
|
|
4712
4735
|
}
|
|
4713
4736
|
case "document": {
|
|
4714
4737
|
let s = [];
|
|
4715
|
-
return
|
|
4738
|
+
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);
|
|
4716
4739
|
}
|
|
4717
4740
|
case "documentHead":
|
|
4718
|
-
return
|
|
4741
|
+
return P(N, [...t.map(n, "children"), ...t.map(n, "endComments")]);
|
|
4719
4742
|
case "documentBody": {
|
|
4720
4743
|
let {
|
|
4721
4744
|
children: s,
|
|
4722
4745
|
endComments: i
|
|
4723
4746
|
} = r, o = "";
|
|
4724
4747
|
if (s.length > 0 && i.length > 0) {
|
|
4725
|
-
let a =
|
|
4726
|
-
|
|
4748
|
+
let a = It(r);
|
|
4749
|
+
K(a, ["blockFolded", "blockLiteral"]) ? a.chomping !== "keep" && (o = [N, N]) : o = N;
|
|
4727
4750
|
}
|
|
4728
|
-
return [
|
|
4751
|
+
return [P(N, t.map(n, "children")), o, P(N, t.map(n, "endComments"))];
|
|
4729
4752
|
}
|
|
4730
4753
|
case "directive":
|
|
4731
|
-
return ["%",
|
|
4754
|
+
return ["%", P(" ", [r.name, ...r.parameters])];
|
|
4732
4755
|
case "comment":
|
|
4733
4756
|
return ["#", r.value];
|
|
4734
4757
|
case "alias":
|
|
@@ -4738,63 +4761,63 @@ function eo(t, e, n) {
|
|
|
4738
4761
|
case "anchor":
|
|
4739
4762
|
return ["&", r.value];
|
|
4740
4763
|
case "plain":
|
|
4741
|
-
return
|
|
4764
|
+
return ut(r.type, e.originalText.slice(r.position.start.offset, r.position.end.offset), e);
|
|
4742
4765
|
case "quoteDouble":
|
|
4743
4766
|
case "quoteSingle": {
|
|
4744
4767
|
let s = "'", i = '"', o = e.originalText.slice(r.position.start.offset + 1, r.position.end.offset - 1);
|
|
4745
|
-
if (r.type === "quoteSingle" && o.includes("\\") || r.type === "quoteDouble" && /\\[^"]
|
|
4768
|
+
if (r.type === "quoteSingle" && o.includes("\\") || r.type === "quoteDouble" && /\\[^"]/u.test(o)) {
|
|
4746
4769
|
let c = r.type === "quoteDouble" ? i : s;
|
|
4747
|
-
return [c,
|
|
4770
|
+
return [c, ut(r.type, o, e), c];
|
|
4748
4771
|
}
|
|
4749
|
-
if (o.includes(i)) return [s,
|
|
4750
|
-
if (o.includes(s)) return [i,
|
|
4772
|
+
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];
|
|
4773
|
+
if (o.includes(s)) return [i, ut(r.type, r.type === "quoteSingle" ? At(false, o, "''", s) : o, e), i];
|
|
4751
4774
|
let a = e.singleQuote ? s : i;
|
|
4752
|
-
return [a,
|
|
4775
|
+
return [a, ut(r.type, o, e), a];
|
|
4753
4776
|
}
|
|
4754
4777
|
case "blockFolded":
|
|
4755
4778
|
case "blockLiteral":
|
|
4756
|
-
return
|
|
4779
|
+
return jr(t, e, n);
|
|
4757
4780
|
case "mapping":
|
|
4758
4781
|
case "sequence":
|
|
4759
|
-
return
|
|
4782
|
+
return P(N, t.map(n, "children"));
|
|
4760
4783
|
case "sequenceItem":
|
|
4761
|
-
return ["- ",
|
|
4784
|
+
return ["- ", v(2, r.content ? n("content") : "")];
|
|
4762
4785
|
case "mappingKey":
|
|
4763
4786
|
case "mappingValue":
|
|
4764
4787
|
return r.content ? n("content") : "";
|
|
4765
4788
|
case "mappingItem":
|
|
4766
4789
|
case "flowMappingItem":
|
|
4767
|
-
return
|
|
4790
|
+
return Wr(t, e, n);
|
|
4768
4791
|
case "flowMapping":
|
|
4769
|
-
return
|
|
4792
|
+
return _t(t, e, n);
|
|
4770
4793
|
case "flowSequence":
|
|
4771
|
-
return
|
|
4794
|
+
return _t(t, e, n);
|
|
4772
4795
|
case "flowSequenceItem":
|
|
4773
4796
|
return n("content");
|
|
4774
4797
|
default:
|
|
4775
|
-
throw new
|
|
4798
|
+
throw new Ar(r, "YAML");
|
|
4776
4799
|
}
|
|
4777
4800
|
}
|
|
4778
|
-
function
|
|
4779
|
-
return t.body.children.length > 0 ||
|
|
4801
|
+
function yo(t) {
|
|
4802
|
+
return t.body.children.length > 0 || I(t.body);
|
|
4780
4803
|
}
|
|
4781
|
-
function
|
|
4782
|
-
return
|
|
4804
|
+
function Gr(t, e) {
|
|
4805
|
+
return V(t) || e && (e.head.children.length > 0 || I(e.head));
|
|
4783
4806
|
}
|
|
4784
|
-
function
|
|
4807
|
+
function Eo(t, e) {
|
|
4785
4808
|
let n = t.node;
|
|
4786
|
-
if (t.isFirst && /---(?:\s|$)
|
|
4809
|
+
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";
|
|
4787
4810
|
let r = t.next;
|
|
4788
|
-
return
|
|
4811
|
+
return Gr(n, r) ? false : r ? "root" : false;
|
|
4789
4812
|
}
|
|
4790
|
-
function
|
|
4791
|
-
let r =
|
|
4792
|
-
return
|
|
4813
|
+
function ut(t, e, n) {
|
|
4814
|
+
let r = Kr(t, e, n);
|
|
4815
|
+
return P(N, r.map((s) => Tt(P(ne, s))));
|
|
4793
4816
|
}
|
|
4794
|
-
function
|
|
4795
|
-
if (
|
|
4817
|
+
function Hr(t, e) {
|
|
4818
|
+
if (K(t)) switch (t.type) {
|
|
4796
4819
|
case "comment":
|
|
4797
|
-
if (
|
|
4820
|
+
if (xr(t.value)) return null;
|
|
4798
4821
|
break;
|
|
4799
4822
|
case "quoteDouble":
|
|
4800
4823
|
case "quoteSingle":
|
|
@@ -4802,31 +4825,31 @@ function ro(t, e) {
|
|
|
4802
4825
|
break;
|
|
4803
4826
|
}
|
|
4804
4827
|
}
|
|
4805
|
-
|
|
4806
|
-
|
|
4807
|
-
|
|
4808
|
-
|
|
4809
|
-
|
|
4810
|
-
|
|
4811
|
-
|
|
4828
|
+
Hr.ignoredProperties = /* @__PURE__ */ new Set(["position"]);
|
|
4829
|
+
var So = {
|
|
4830
|
+
preprocess: Qr,
|
|
4831
|
+
embed: Tr,
|
|
4832
|
+
print: ho,
|
|
4833
|
+
massageAstNode: Hr,
|
|
4834
|
+
insertPragma: $r,
|
|
4835
|
+
getVisitorKeys: kr
|
|
4812
4836
|
};
|
|
4813
|
-
var
|
|
4814
|
-
var
|
|
4815
|
-
linguistLanguageId: 407,
|
|
4837
|
+
var Jr = So;
|
|
4838
|
+
var Xr = [{
|
|
4816
4839
|
name: "YAML",
|
|
4817
4840
|
type: "data",
|
|
4818
|
-
color: "#cb171e",
|
|
4819
|
-
tmScope: "source.yaml",
|
|
4820
|
-
aliases: ["yml"],
|
|
4821
4841
|
extensions: [".yml", ".mir", ".reek", ".rviz", ".sublime-syntax", ".syntax", ".yaml", ".yaml-tmlanguage", ".yaml.sed", ".yml.mysql"],
|
|
4822
|
-
|
|
4842
|
+
tmScope: "source.yaml",
|
|
4823
4843
|
aceMode: "yaml",
|
|
4844
|
+
aliases: ["yml"],
|
|
4824
4845
|
codemirrorMode: "yaml",
|
|
4825
4846
|
codemirrorMimeType: "text/x-yaml",
|
|
4847
|
+
filenames: [".clang-format", ".clang-tidy", ".clangd", ".gemrc", "CITATION.cff", "glide.lock", "pixi.lock", ".prettierrc", ".stylelintrc", ".lintstagedrc"],
|
|
4826
4848
|
parsers: ["yaml"],
|
|
4827
|
-
vscodeLanguageIds: ["yaml", "ansible", "home-assistant"]
|
|
4849
|
+
vscodeLanguageIds: ["yaml", "ansible", "dockercompose", "github-actions-workflow", "home-assistant"],
|
|
4850
|
+
linguistLanguageId: 407
|
|
4828
4851
|
}];
|
|
4829
|
-
var
|
|
4852
|
+
var Rt = {
|
|
4830
4853
|
bracketSpacing: {
|
|
4831
4854
|
category: "Common",
|
|
4832
4855
|
type: "boolean",
|
|
@@ -4856,74 +4879,53 @@ var Mt = {
|
|
|
4856
4879
|
description: "Wrap prose as-is."
|
|
4857
4880
|
}]
|
|
4858
4881
|
}};
|
|
4859
|
-
var
|
|
4860
|
-
bracketSpacing:
|
|
4861
|
-
singleQuote:
|
|
4862
|
-
proseWrap:
|
|
4882
|
+
var wo = {
|
|
4883
|
+
bracketSpacing: Rt.bracketSpacing,
|
|
4884
|
+
singleQuote: Rt.singleQuote,
|
|
4885
|
+
proseWrap: Rt.proseWrap
|
|
4863
4886
|
};
|
|
4864
|
-
var
|
|
4865
|
-
var
|
|
4866
|
-
|
|
4867
|
-
yaml: () =>
|
|
4887
|
+
var zr = wo;
|
|
4888
|
+
var hr = {};
|
|
4889
|
+
yr(hr, {
|
|
4890
|
+
yaml: () => nc
|
|
4868
4891
|
});
|
|
4869
|
-
var
|
|
4870
|
-
|
|
4871
|
-
|
|
4872
|
-
|
|
4873
|
-
|
|
4874
|
-
|
|
4875
|
-
|
|
4876
|
-
|
|
4877
|
-
|
|
4878
|
-
|
|
4879
|
-
|
|
4880
|
-
|
|
4881
|
-
|
|
4882
|
-
|
|
4883
|
-
r++;
|
|
4884
|
-
break;
|
|
4885
|
-
}
|
|
4886
|
-
this.offsets = n;
|
|
4887
|
-
}
|
|
4888
|
-
return t.prototype.locationForIndex = function(e) {
|
|
4889
|
-
if (e < 0 || e > this.length) return null;
|
|
4890
|
-
for (var n = 0, r = this.offsets; r[n + 1] <= e; ) n++;
|
|
4891
|
-
var s = e - r[n];
|
|
4892
|
-
return {
|
|
4893
|
-
line: n,
|
|
4894
|
-
column: s
|
|
4895
|
-
};
|
|
4896
|
-
}, t.prototype.indexForLocation = function(e) {
|
|
4897
|
-
var n = e.line, r = e.column;
|
|
4898
|
-
return n < 0 || n >= this.offsets.length || r < 0 || r > this.lengthOfLine(n) ? null : this.offsets[n] + r;
|
|
4899
|
-
}, t.prototype.lengthOfLine = function(e) {
|
|
4900
|
-
var n = this.offsets[e], r = e === this.offsets.length - 1 ? this.length : this.offsets[e + 1];
|
|
4901
|
-
return r - n;
|
|
4902
|
-
}, t;
|
|
4903
|
-
}();
|
|
4892
|
+
var mr = cn(tr());
|
|
4893
|
+
var H = cn(Bs());
|
|
4894
|
+
H.default.findPair;
|
|
4895
|
+
H.default.toJSON;
|
|
4896
|
+
H.default.parseMap;
|
|
4897
|
+
H.default.parseSeq;
|
|
4898
|
+
H.default.stringifyNumber;
|
|
4899
|
+
H.default.stringifyString;
|
|
4900
|
+
H.default.Type;
|
|
4901
|
+
H.default.YAMLError;
|
|
4902
|
+
H.default.YAMLReferenceError;
|
|
4903
|
+
var Fs = H.default.YAMLSemanticError;
|
|
4904
|
+
H.default.YAMLSyntaxError;
|
|
4905
|
+
H.default.YAMLWarning;
|
|
4904
4906
|
function B(t, e = null) {
|
|
4905
4907
|
"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", {
|
|
4906
4908
|
value: e,
|
|
4907
4909
|
enumerable: false
|
|
4908
4910
|
});
|
|
4909
4911
|
}
|
|
4910
|
-
function
|
|
4912
|
+
function Ae(t) {
|
|
4911
4913
|
return `${t.line}:${t.column}`;
|
|
4912
4914
|
}
|
|
4913
|
-
function
|
|
4915
|
+
function qs(t) {
|
|
4914
4916
|
B(t);
|
|
4915
|
-
let e =
|
|
4917
|
+
let e = Fa(t), n = t.children.slice();
|
|
4916
4918
|
t.comments.sort((r, s) => r.position.start.offset - s.position.end.offset).filter((r) => !r._parent).forEach((r) => {
|
|
4917
4919
|
for (; n.length > 1 && r.position.start.line > n[0].position.end.line; ) n.shift();
|
|
4918
|
-
|
|
4920
|
+
qa(r, e, n[0]);
|
|
4919
4921
|
});
|
|
4920
4922
|
}
|
|
4921
|
-
function
|
|
4923
|
+
function Fa(t) {
|
|
4922
4924
|
let e = Array.from(new Array(t.position.end.line), () => ({}));
|
|
4923
4925
|
for (let n of t.comments) e[n.position.start.line - 1].comment = n;
|
|
4924
|
-
return
|
|
4926
|
+
return Us(e, t), e;
|
|
4925
4927
|
}
|
|
4926
|
-
function
|
|
4928
|
+
function Us(t, e) {
|
|
4927
4929
|
if (e.position.start.offset !== e.position.end.offset) {
|
|
4928
4930
|
if ("leadingComments" in e) {
|
|
4929
4931
|
let {
|
|
@@ -4952,16 +4954,16 @@ function Dr(t, e) {
|
|
|
4952
4954
|
}
|
|
4953
4955
|
}
|
|
4954
4956
|
"children" in e && e.children.forEach((n) => {
|
|
4955
|
-
|
|
4957
|
+
Us(t, n);
|
|
4956
4958
|
});
|
|
4957
4959
|
}
|
|
4958
4960
|
}
|
|
4959
|
-
function
|
|
4961
|
+
function qa(t, e, n) {
|
|
4960
4962
|
let r = t.position.start.line, {
|
|
4961
4963
|
trailingAttachableNode: s
|
|
4962
4964
|
} = e[r - 1];
|
|
4963
4965
|
if (s) {
|
|
4964
|
-
if (s.trailingComment) throw new Error(`Unexpected multiple trailing comment at ${
|
|
4966
|
+
if (s.trailingComment) throw new Error(`Unexpected multiple trailing comment at ${Ae(t.position.start)}`);
|
|
4965
4967
|
B(t, s), s.trailingComment = t;
|
|
4966
4968
|
return;
|
|
4967
4969
|
}
|
|
@@ -4974,10 +4976,10 @@ function ao(t, e, n) {
|
|
|
4974
4976
|
else continue;
|
|
4975
4977
|
if ((c.type === "sequence" || c.type === "mapping") && (c = c.children[0]), c.type === "mappingItem") {
|
|
4976
4978
|
let [l, f] = c.children;
|
|
4977
|
-
c =
|
|
4979
|
+
c = Ks(l) ? l : f;
|
|
4978
4980
|
}
|
|
4979
4981
|
for (; ; ) {
|
|
4980
|
-
if (
|
|
4982
|
+
if (Ua(c, t)) {
|
|
4981
4983
|
B(t, c), c.endComments.push(t);
|
|
4982
4984
|
return;
|
|
4983
4985
|
}
|
|
@@ -4998,7 +5000,7 @@ function ao(t, e, n) {
|
|
|
4998
5000
|
let i = n.children[1];
|
|
4999
5001
|
B(t, i), i.endComments.push(t);
|
|
5000
5002
|
}
|
|
5001
|
-
function
|
|
5003
|
+
function Ua(t, e) {
|
|
5002
5004
|
if (t.position.start.offset < e.position.start.offset && t.position.end.offset > e.position.end.offset) switch (t.type) {
|
|
5003
5005
|
case "flowMapping":
|
|
5004
5006
|
case "flowSequence":
|
|
@@ -5010,12 +5012,12 @@ function co(t, e) {
|
|
|
5010
5012
|
return e.position.start.column > t.position.start.column;
|
|
5011
5013
|
case "mappingKey":
|
|
5012
5014
|
case "mappingValue":
|
|
5013
|
-
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" ||
|
|
5015
|
+
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));
|
|
5014
5016
|
default:
|
|
5015
5017
|
return false;
|
|
5016
5018
|
}
|
|
5017
5019
|
}
|
|
5018
|
-
function
|
|
5020
|
+
function Ks(t) {
|
|
5019
5021
|
return t.position.start !== t.position.end && (t.children.length === 0 || t.position.start.offset !== t.children[0].position.start.offset);
|
|
5020
5022
|
}
|
|
5021
5023
|
function b(t, e) {
|
|
@@ -5024,17 +5026,17 @@ function b(t, e) {
|
|
|
5024
5026
|
position: e
|
|
5025
5027
|
};
|
|
5026
5028
|
}
|
|
5027
|
-
function
|
|
5029
|
+
function Vs(t, e, n) {
|
|
5028
5030
|
return {
|
|
5029
5031
|
...b("root", t),
|
|
5030
5032
|
children: e,
|
|
5031
5033
|
comments: n
|
|
5032
5034
|
};
|
|
5033
5035
|
}
|
|
5034
|
-
function
|
|
5036
|
+
function wt(t) {
|
|
5035
5037
|
switch (t.type) {
|
|
5036
5038
|
case "DOCUMENT":
|
|
5037
|
-
for (let e = t.contents.length - 1; e >= 0; e--) t.contents[e].type === "BLANK_LINE" ? t.contents.splice(e, 1) :
|
|
5039
|
+
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]);
|
|
5038
5040
|
for (let e = t.directives.length - 1; e >= 0; e--) t.directives[e].type === "BLANK_LINE" && t.directives.splice(e, 1);
|
|
5039
5041
|
break;
|
|
5040
5042
|
case "FLOW_MAP":
|
|
@@ -5043,13 +5045,13 @@ function ct(t) {
|
|
|
5043
5045
|
case "SEQ":
|
|
5044
5046
|
for (let e = t.items.length - 1; e >= 0; e--) {
|
|
5045
5047
|
let n = t.items[e];
|
|
5046
|
-
"char" in n || (n.type === "BLANK_LINE" ? t.items.splice(e, 1) :
|
|
5048
|
+
"char" in n || (n.type === "BLANK_LINE" ? t.items.splice(e, 1) : wt(n));
|
|
5047
5049
|
}
|
|
5048
5050
|
break;
|
|
5049
5051
|
case "MAP_KEY":
|
|
5050
5052
|
case "MAP_VALUE":
|
|
5051
5053
|
case "SEQ_ITEM":
|
|
5052
|
-
t.node &&
|
|
5054
|
+
t.node && wt(t.node);
|
|
5053
5055
|
break;
|
|
5054
5056
|
case "ALIAS":
|
|
5055
5057
|
case "BLANK_LINE":
|
|
@@ -5065,96 +5067,60 @@ function ct(t) {
|
|
|
5065
5067
|
throw new Error(`Unexpected node type ${JSON.stringify(t.type)}`);
|
|
5066
5068
|
}
|
|
5067
5069
|
}
|
|
5068
|
-
function
|
|
5069
|
-
return {
|
|
5070
|
-
leadingComments: []
|
|
5071
|
-
};
|
|
5072
|
-
}
|
|
5073
|
-
function oe(t = null) {
|
|
5074
|
-
return {
|
|
5075
|
-
trailingComment: t
|
|
5076
|
-
};
|
|
5077
|
-
}
|
|
5078
|
-
function $() {
|
|
5070
|
+
function J(t, e) {
|
|
5079
5071
|
return {
|
|
5080
|
-
|
|
5081
|
-
|
|
5082
|
-
};
|
|
5083
|
-
}
|
|
5084
|
-
function $r(t, e, n) {
|
|
5085
|
-
return {
|
|
5086
|
-
...b("alias", t),
|
|
5087
|
-
...$(),
|
|
5088
|
-
...e,
|
|
5089
|
-
value: n
|
|
5090
|
-
};
|
|
5091
|
-
}
|
|
5092
|
-
function Fr(t, e) {
|
|
5093
|
-
let n = t.cstNode;
|
|
5094
|
-
return $r(e.transformRange({
|
|
5095
|
-
origStart: n.valueRange.origStart - 1,
|
|
5096
|
-
origEnd: n.valueRange.origEnd
|
|
5097
|
-
}), e.transformContent(t), n.rawValue);
|
|
5098
|
-
}
|
|
5099
|
-
function qr(t) {
|
|
5100
|
-
return {
|
|
5101
|
-
...t,
|
|
5102
|
-
type: "blockFolded"
|
|
5072
|
+
start: t,
|
|
5073
|
+
end: e
|
|
5103
5074
|
};
|
|
5104
5075
|
}
|
|
5105
|
-
function
|
|
5076
|
+
function nr(t) {
|
|
5106
5077
|
return {
|
|
5107
|
-
|
|
5108
|
-
|
|
5109
|
-
...e,
|
|
5110
|
-
chomping: n,
|
|
5111
|
-
indent: r,
|
|
5112
|
-
value: s,
|
|
5113
|
-
indicatorComment: i
|
|
5078
|
+
start: t,
|
|
5079
|
+
end: t
|
|
5114
5080
|
};
|
|
5115
5081
|
}
|
|
5116
|
-
var
|
|
5082
|
+
var ue;
|
|
5117
5083
|
(function(t) {
|
|
5118
5084
|
t.Tag = "!", t.Anchor = "&", t.Comment = "#";
|
|
5119
|
-
})(
|
|
5120
|
-
function
|
|
5085
|
+
})(ue || (ue = {}));
|
|
5086
|
+
function js(t, e) {
|
|
5121
5087
|
return {
|
|
5122
5088
|
...b("anchor", t),
|
|
5123
5089
|
value: e
|
|
5124
5090
|
};
|
|
5125
5091
|
}
|
|
5126
|
-
function
|
|
5092
|
+
function Ge(t, e) {
|
|
5127
5093
|
return {
|
|
5128
5094
|
...b("comment", t),
|
|
5129
5095
|
value: e
|
|
5130
5096
|
};
|
|
5131
5097
|
}
|
|
5132
|
-
function
|
|
5098
|
+
function Ws(t, e, n) {
|
|
5133
5099
|
return {
|
|
5134
5100
|
anchor: e,
|
|
5135
5101
|
tag: t,
|
|
5136
5102
|
middleComments: n
|
|
5137
5103
|
};
|
|
5138
5104
|
}
|
|
5139
|
-
function
|
|
5105
|
+
function Qs(t, e) {
|
|
5140
5106
|
return {
|
|
5141
5107
|
...b("tag", t),
|
|
5142
5108
|
value: e
|
|
5143
5109
|
};
|
|
5144
5110
|
}
|
|
5145
|
-
function
|
|
5111
|
+
function zt(t, e, n = () => false) {
|
|
5146
5112
|
let r = t.cstNode, s = [], i = null, o = null, a = null;
|
|
5147
5113
|
for (let c of r.props) {
|
|
5148
5114
|
let l = e.text[c.origStart];
|
|
5149
5115
|
switch (l) {
|
|
5150
|
-
case
|
|
5151
|
-
i = i || c, o =
|
|
5116
|
+
case ue.Tag:
|
|
5117
|
+
i = i || c, o = Qs(e.transformRange(c), t.tag);
|
|
5152
5118
|
break;
|
|
5153
|
-
case
|
|
5154
|
-
i = i || c, a =
|
|
5119
|
+
case ue.Anchor:
|
|
5120
|
+
i = i || c, a = js(e.transformRange(c), r.anchor);
|
|
5155
5121
|
break;
|
|
5156
|
-
case
|
|
5157
|
-
let f =
|
|
5122
|
+
case ue.Comment: {
|
|
5123
|
+
let f = Ge(e.transformRange(c), e.text.slice(c.origStart + 1, c.origEnd));
|
|
5158
5124
|
e.comments.push(f), !n(f) && i && i.origEnd <= c.origStart && c.origEnd <= r.valueRange.origStart && s.push(f);
|
|
5159
5125
|
break;
|
|
5160
5126
|
}
|
|
@@ -5162,117 +5128,153 @@ function vt(t, e, n = () => false) {
|
|
|
5162
5128
|
throw new Error(`Unexpected leading character ${JSON.stringify(l)}`);
|
|
5163
5129
|
}
|
|
5164
5130
|
}
|
|
5165
|
-
return
|
|
5131
|
+
return Ws(o, a, s);
|
|
5132
|
+
}
|
|
5133
|
+
function X() {
|
|
5134
|
+
return {
|
|
5135
|
+
leadingComments: []
|
|
5136
|
+
};
|
|
5166
5137
|
}
|
|
5167
|
-
|
|
5138
|
+
function pe(t = null) {
|
|
5139
|
+
return {
|
|
5140
|
+
trailingComment: t
|
|
5141
|
+
};
|
|
5142
|
+
}
|
|
5143
|
+
function F() {
|
|
5144
|
+
return {
|
|
5145
|
+
...X(),
|
|
5146
|
+
...pe()
|
|
5147
|
+
};
|
|
5148
|
+
}
|
|
5149
|
+
function Gs(t, e, n) {
|
|
5150
|
+
return {
|
|
5151
|
+
...b("alias", t),
|
|
5152
|
+
...F(),
|
|
5153
|
+
...e,
|
|
5154
|
+
value: n
|
|
5155
|
+
};
|
|
5156
|
+
}
|
|
5157
|
+
function Hs(t, e) {
|
|
5158
|
+
let n = t.cstNode;
|
|
5159
|
+
return Gs(e.transformRange({
|
|
5160
|
+
origStart: n.valueRange.origStart - 1,
|
|
5161
|
+
origEnd: n.valueRange.origEnd
|
|
5162
|
+
}), e.transformContent(t), n.rawValue);
|
|
5163
|
+
}
|
|
5164
|
+
function Js(t) {
|
|
5165
|
+
return {
|
|
5166
|
+
...t,
|
|
5167
|
+
type: "blockFolded"
|
|
5168
|
+
};
|
|
5169
|
+
}
|
|
5170
|
+
function Xs(t, e, n, r, s, i) {
|
|
5171
|
+
return {
|
|
5172
|
+
...b("blockValue", t),
|
|
5173
|
+
...X(),
|
|
5174
|
+
...e,
|
|
5175
|
+
chomping: n,
|
|
5176
|
+
indent: r,
|
|
5177
|
+
value: s,
|
|
5178
|
+
indicatorComment: i
|
|
5179
|
+
};
|
|
5180
|
+
}
|
|
5181
|
+
var rr;
|
|
5168
5182
|
(function(t) {
|
|
5169
5183
|
t.CLIP = "clip", t.STRIP = "strip", t.KEEP = "keep";
|
|
5170
|
-
})(
|
|
5171
|
-
function
|
|
5184
|
+
})(rr || (rr = {}));
|
|
5185
|
+
function Zt(t, e) {
|
|
5172
5186
|
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({
|
|
5173
5187
|
origStart: n.header.origStart,
|
|
5174
5188
|
origEnd: n.valueRange.origEnd
|
|
5175
|
-
}), c = null, l =
|
|
5189
|
+
}), c = null, l = zt(t, e, (f) => {
|
|
5176
5190
|
if (!(a.start.offset < f.position.start.offset && f.position.end.offset < a.end.offset)) return false;
|
|
5177
|
-
if (c) throw new Error(`Unexpected multiple indicator comments at ${
|
|
5191
|
+
if (c) throw new Error(`Unexpected multiple indicator comments at ${Ae(f.position.start)}`);
|
|
5178
5192
|
return c = f, true;
|
|
5179
5193
|
});
|
|
5180
|
-
return
|
|
5194
|
+
return Xs(a, l, rr[n.chomping], o ? n.blockIndent : null, n.strValue, c);
|
|
5181
5195
|
}
|
|
5182
|
-
function
|
|
5183
|
-
return
|
|
5196
|
+
function zs(t, e) {
|
|
5197
|
+
return Js(Zt(t, e));
|
|
5184
5198
|
}
|
|
5185
|
-
function
|
|
5199
|
+
function Zs(t) {
|
|
5186
5200
|
return {
|
|
5187
5201
|
...t,
|
|
5188
5202
|
type: "blockLiteral"
|
|
5189
5203
|
};
|
|
5190
5204
|
}
|
|
5191
|
-
function
|
|
5192
|
-
return
|
|
5205
|
+
function ei(t, e) {
|
|
5206
|
+
return Zs(Zt(t, e));
|
|
5193
5207
|
}
|
|
5194
|
-
function
|
|
5195
|
-
return
|
|
5208
|
+
function ti(t, e) {
|
|
5209
|
+
return Ge(e.transformRange(t.range), t.comment);
|
|
5196
5210
|
}
|
|
5197
|
-
function
|
|
5211
|
+
function ni(t, e, n) {
|
|
5198
5212
|
return {
|
|
5199
5213
|
...b("directive", t),
|
|
5200
|
-
|
|
5214
|
+
...F(),
|
|
5201
5215
|
name: e,
|
|
5202
5216
|
parameters: n
|
|
5203
5217
|
};
|
|
5204
5218
|
}
|
|
5205
|
-
function
|
|
5219
|
+
function He(t, e) {
|
|
5206
5220
|
for (let n of t.props) {
|
|
5207
5221
|
let r = e.text[n.origStart];
|
|
5208
5222
|
switch (r) {
|
|
5209
|
-
case
|
|
5210
|
-
e.comments.push(
|
|
5223
|
+
case ue.Comment:
|
|
5224
|
+
e.comments.push(Ge(e.transformRange(n), e.text.slice(n.origStart + 1, n.origEnd)));
|
|
5211
5225
|
break;
|
|
5212
5226
|
default:
|
|
5213
5227
|
throw new Error(`Unexpected leading character ${JSON.stringify(r)}`);
|
|
5214
5228
|
}
|
|
5215
5229
|
}
|
|
5216
5230
|
}
|
|
5217
|
-
function
|
|
5218
|
-
return
|
|
5231
|
+
function ri(t, e) {
|
|
5232
|
+
return He(t, e), ni(e.transformRange(t.range), t.name, t.parameters);
|
|
5219
5233
|
}
|
|
5220
|
-
function
|
|
5234
|
+
function si(t, e, n, r) {
|
|
5221
5235
|
return {
|
|
5222
5236
|
...b("document", t),
|
|
5223
|
-
...
|
|
5237
|
+
...pe(r),
|
|
5224
5238
|
children: [e, n]
|
|
5225
5239
|
};
|
|
5226
5240
|
}
|
|
5227
|
-
function
|
|
5228
|
-
return {
|
|
5229
|
-
start: t,
|
|
5230
|
-
end: e
|
|
5231
|
-
};
|
|
5232
|
-
}
|
|
5233
|
-
function En(t) {
|
|
5234
|
-
return {
|
|
5235
|
-
start: t,
|
|
5236
|
-
end: t
|
|
5237
|
-
};
|
|
5238
|
-
}
|
|
5239
|
-
function F(t = []) {
|
|
5241
|
+
function q(t = []) {
|
|
5240
5242
|
return {
|
|
5241
5243
|
endComments: t
|
|
5242
5244
|
};
|
|
5243
5245
|
}
|
|
5244
|
-
function
|
|
5246
|
+
function ii(t, e, n) {
|
|
5245
5247
|
return {
|
|
5246
5248
|
...b("documentBody", t),
|
|
5247
|
-
...
|
|
5249
|
+
...q(n),
|
|
5248
5250
|
children: e ? [e] : []
|
|
5249
5251
|
};
|
|
5250
5252
|
}
|
|
5251
|
-
function
|
|
5253
|
+
function U(t) {
|
|
5252
5254
|
return t[t.length - 1];
|
|
5253
5255
|
}
|
|
5254
|
-
function
|
|
5256
|
+
function en(t, e) {
|
|
5255
5257
|
let n = t.match(e);
|
|
5256
5258
|
return n ? n.index : -1;
|
|
5257
5259
|
}
|
|
5258
|
-
function
|
|
5260
|
+
function oi(t, e, n) {
|
|
5259
5261
|
let r = t.cstNode, {
|
|
5260
5262
|
comments: s,
|
|
5261
5263
|
endComments: i,
|
|
5262
5264
|
documentTrailingComment: o,
|
|
5263
5265
|
documentHeadTrailingComment: a
|
|
5264
|
-
} =
|
|
5266
|
+
} = Ka(r, e, n), c = e.transformNode(t.contents), {
|
|
5265
5267
|
position: l,
|
|
5266
5268
|
documentEndPoint: f
|
|
5267
|
-
} =
|
|
5269
|
+
} = Va(r, c, e);
|
|
5268
5270
|
return e.comments.push(...s, ...i), {
|
|
5269
|
-
documentBody:
|
|
5271
|
+
documentBody: ii(l, c, i),
|
|
5270
5272
|
documentEndPoint: f,
|
|
5271
5273
|
documentTrailingComment: o,
|
|
5272
5274
|
documentHeadTrailingComment: a
|
|
5273
5275
|
};
|
|
5274
5276
|
}
|
|
5275
|
-
function
|
|
5277
|
+
function Ka(t, e, n) {
|
|
5276
5278
|
let r = [], s = [], i = [], o = [], a = false;
|
|
5277
5279
|
for (let c = t.contents.length - 1; c >= 0; c--) {
|
|
5278
5280
|
let l = t.contents[c];
|
|
@@ -5281,17 +5283,17 @@ function lo(t, e, n) {
|
|
|
5281
5283
|
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);
|
|
5282
5284
|
} else a = true;
|
|
5283
5285
|
}
|
|
5284
|
-
if (i.length > 1) throw new Error(`Unexpected multiple document trailing comments at ${
|
|
5285
|
-
if (o.length > 1) throw new Error(`Unexpected multiple documentHead trailing comments at ${
|
|
5286
|
+
if (i.length > 1) throw new Error(`Unexpected multiple document trailing comments at ${Ae(i[1].position.start)}`);
|
|
5287
|
+
if (o.length > 1) throw new Error(`Unexpected multiple documentHead trailing comments at ${Ae(o[1].position.start)}`);
|
|
5286
5288
|
return {
|
|
5287
5289
|
comments: r,
|
|
5288
5290
|
endComments: s,
|
|
5289
|
-
documentTrailingComment:
|
|
5290
|
-
documentHeadTrailingComment:
|
|
5291
|
+
documentTrailingComment: U(i) || null,
|
|
5292
|
+
documentHeadTrailingComment: U(o) || null
|
|
5291
5293
|
};
|
|
5292
5294
|
}
|
|
5293
|
-
function
|
|
5294
|
-
let r =
|
|
5295
|
+
function Va(t, e, n) {
|
|
5296
|
+
let r = en(n.text.slice(t.valueRange.origEnd), /^\.\.\./), s = r === -1 ? t.valueRange.origEnd : Math.max(0, t.valueRange.origEnd - 1);
|
|
5295
5297
|
n.text[s - 1] === "\r" && s--;
|
|
5296
5298
|
let i = n.transformRange({
|
|
5297
5299
|
origStart: e !== null ? e.position.start.offset : s,
|
|
@@ -5302,29 +5304,29 @@ function fo(t, e, n) {
|
|
|
5302
5304
|
documentEndPoint: o
|
|
5303
5305
|
};
|
|
5304
5306
|
}
|
|
5305
|
-
function
|
|
5307
|
+
function ai(t, e, n, r) {
|
|
5306
5308
|
return {
|
|
5307
5309
|
...b("documentHead", t),
|
|
5308
|
-
...
|
|
5309
|
-
...
|
|
5310
|
+
...q(n),
|
|
5311
|
+
...pe(r),
|
|
5310
5312
|
children: e
|
|
5311
5313
|
};
|
|
5312
5314
|
}
|
|
5313
|
-
function
|
|
5315
|
+
function ci(t, e) {
|
|
5314
5316
|
let n = t.cstNode, {
|
|
5315
5317
|
directives: r,
|
|
5316
5318
|
comments: s,
|
|
5317
5319
|
endComments: i
|
|
5318
|
-
} =
|
|
5320
|
+
} = ja(n, e), {
|
|
5319
5321
|
position: o,
|
|
5320
5322
|
endMarkerPoint: a
|
|
5321
|
-
} =
|
|
5323
|
+
} = Wa(n, r, e);
|
|
5322
5324
|
return e.comments.push(...s, ...i), {
|
|
5323
|
-
createDocumentHeadWithTrailingComment: (l) => (l && e.comments.push(l),
|
|
5325
|
+
createDocumentHeadWithTrailingComment: (l) => (l && e.comments.push(l), ai(o, r, i, l)),
|
|
5324
5326
|
documentHeadEndMarkerPoint: a
|
|
5325
5327
|
};
|
|
5326
5328
|
}
|
|
5327
|
-
function
|
|
5329
|
+
function ja(t, e) {
|
|
5328
5330
|
let n = [], r = [], s = [], i = false;
|
|
5329
5331
|
for (let o = t.directives.length - 1; o >= 0; o--) {
|
|
5330
5332
|
let a = e.transformNode(t.directives[o]);
|
|
@@ -5336,8 +5338,8 @@ function uo(t, e) {
|
|
|
5336
5338
|
endComments: s
|
|
5337
5339
|
};
|
|
5338
5340
|
}
|
|
5339
|
-
function
|
|
5340
|
-
let r =
|
|
5341
|
+
function Wa(t, e, n) {
|
|
5342
|
+
let r = en(n.text.slice(0, t.valueRange.origStart), /---\s*$/);
|
|
5341
5343
|
r > 0 && !/[\r\n]/.test(n.text[r - 1]) && (r = -1);
|
|
5342
5344
|
let s = r === -1 ? {
|
|
5343
5345
|
origStart: t.valueRange.origStart,
|
|
@@ -5351,46 +5353,46 @@ function po(t, e, n) {
|
|
|
5351
5353
|
endMarkerPoint: r === -1 ? null : n.transformOffset(r)
|
|
5352
5354
|
};
|
|
5353
5355
|
}
|
|
5354
|
-
function
|
|
5356
|
+
function li(t, e) {
|
|
5355
5357
|
let {
|
|
5356
5358
|
createDocumentHeadWithTrailingComment: n,
|
|
5357
5359
|
documentHeadEndMarkerPoint: r
|
|
5358
|
-
} =
|
|
5360
|
+
} = ci(t, e), {
|
|
5359
5361
|
documentBody: s,
|
|
5360
5362
|
documentEndPoint: i,
|
|
5361
5363
|
documentTrailingComment: o,
|
|
5362
5364
|
documentHeadTrailingComment: a
|
|
5363
|
-
} =
|
|
5364
|
-
return o && e.comments.push(o),
|
|
5365
|
+
} = oi(t, e, r), c = n(a);
|
|
5366
|
+
return o && e.comments.push(o), si(J(c.position.start, i), c, s, o);
|
|
5365
5367
|
}
|
|
5366
|
-
function
|
|
5368
|
+
function tn(t, e, n) {
|
|
5367
5369
|
return {
|
|
5368
5370
|
...b("flowCollection", t),
|
|
5369
|
-
...$(),
|
|
5370
5371
|
...F(),
|
|
5372
|
+
...q(),
|
|
5371
5373
|
...e,
|
|
5372
5374
|
children: n
|
|
5373
5375
|
};
|
|
5374
5376
|
}
|
|
5375
|
-
function
|
|
5377
|
+
function fi(t, e, n) {
|
|
5376
5378
|
return {
|
|
5377
|
-
...
|
|
5379
|
+
...tn(t, e, n),
|
|
5378
5380
|
type: "flowMapping"
|
|
5379
5381
|
};
|
|
5380
5382
|
}
|
|
5381
|
-
function
|
|
5383
|
+
function nn(t, e, n) {
|
|
5382
5384
|
return {
|
|
5383
5385
|
...b("flowMappingItem", t),
|
|
5384
5386
|
...X(),
|
|
5385
5387
|
children: [e, n]
|
|
5386
5388
|
};
|
|
5387
5389
|
}
|
|
5388
|
-
function
|
|
5390
|
+
function me(t, e) {
|
|
5389
5391
|
let n = [];
|
|
5390
5392
|
for (let r of t) r && "type" in r && r.type === "COMMENT" ? e.comments.push(e.transformNode(r)) : n.push(r);
|
|
5391
5393
|
return n;
|
|
5392
5394
|
}
|
|
5393
|
-
function
|
|
5395
|
+
function rn(t) {
|
|
5394
5396
|
let [e, n] = ["?", ":"].map((r) => {
|
|
5395
5397
|
let s = t.find((i) => "char" in i && i.char === r);
|
|
5396
5398
|
return s ? {
|
|
@@ -5403,12 +5405,12 @@ function Rt(t) {
|
|
|
5403
5405
|
additionalValueRange: n
|
|
5404
5406
|
};
|
|
5405
5407
|
}
|
|
5406
|
-
function
|
|
5408
|
+
function sn(t, e) {
|
|
5407
5409
|
let n = e;
|
|
5408
5410
|
return (r) => t.slice(n, n = r);
|
|
5409
5411
|
}
|
|
5410
|
-
function
|
|
5411
|
-
let e = [], n =
|
|
5412
|
+
function on(t) {
|
|
5413
|
+
let e = [], n = sn(t, 1), r = false;
|
|
5412
5414
|
for (let s = 1; s < t.length - 1; s++) {
|
|
5413
5415
|
let i = t[s];
|
|
5414
5416
|
if ("char" in i && i.char === ",") {
|
|
@@ -5419,76 +5421,76 @@ function Yt(t) {
|
|
|
5419
5421
|
}
|
|
5420
5422
|
return r && e.push(n(t.length - 1)), e;
|
|
5421
5423
|
}
|
|
5422
|
-
function
|
|
5424
|
+
function sr(t, e) {
|
|
5423
5425
|
return {
|
|
5424
5426
|
...b("mappingKey", t),
|
|
5425
|
-
...
|
|
5426
|
-
...
|
|
5427
|
+
...pe(),
|
|
5428
|
+
...q(),
|
|
5427
5429
|
children: e ? [e] : []
|
|
5428
5430
|
};
|
|
5429
5431
|
}
|
|
5430
|
-
function
|
|
5432
|
+
function ir(t, e) {
|
|
5431
5433
|
return {
|
|
5432
5434
|
...b("mappingValue", t),
|
|
5433
|
-
...$(),
|
|
5434
5435
|
...F(),
|
|
5436
|
+
...q(),
|
|
5435
5437
|
children: e ? [e] : []
|
|
5436
5438
|
};
|
|
5437
5439
|
}
|
|
5438
|
-
function
|
|
5439
|
-
let i = e.transformNode(t.key), o = e.transformNode(t.value), a = i || r ?
|
|
5440
|
+
function Je(t, e, n, r, s) {
|
|
5441
|
+
let i = e.transformNode(t.key), o = e.transformNode(t.value), a = i || r ? sr(e.transformRange({
|
|
5440
5442
|
origStart: r ? r.origStart : i.position.start.offset,
|
|
5441
5443
|
origEnd: i ? i.position.end.offset : r.origStart + 1
|
|
5442
|
-
}), i) : null, c = o || s ?
|
|
5444
|
+
}), i) : null, c = o || s ? ir(e.transformRange({
|
|
5443
5445
|
origStart: s ? s.origStart : o.position.start.offset,
|
|
5444
5446
|
origEnd: o ? o.position.end.offset : s.origStart + 1
|
|
5445
5447
|
}), o) : null;
|
|
5446
|
-
return n(
|
|
5448
|
+
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));
|
|
5447
5449
|
}
|
|
5448
|
-
function
|
|
5449
|
-
let n =
|
|
5450
|
+
function ui(t, e) {
|
|
5451
|
+
let n = me(t.cstNode.items, e), r = on(n), s = t.items.map((a, c) => {
|
|
5450
5452
|
let l = r[c], {
|
|
5451
5453
|
additionalKeyRange: f,
|
|
5452
5454
|
additionalValueRange: m
|
|
5453
|
-
} =
|
|
5454
|
-
return
|
|
5455
|
-
}), i = n[0], o =
|
|
5456
|
-
return
|
|
5455
|
+
} = rn(l);
|
|
5456
|
+
return Je(a, e, nn, f, m);
|
|
5457
|
+
}), i = n[0], o = U(n);
|
|
5458
|
+
return fi(e.transformRange({
|
|
5457
5459
|
origStart: i.origOffset,
|
|
5458
5460
|
origEnd: o.origOffset + 1
|
|
5459
5461
|
}), e.transformContent(t), s);
|
|
5460
5462
|
}
|
|
5461
|
-
function
|
|
5463
|
+
function pi(t, e, n) {
|
|
5462
5464
|
return {
|
|
5463
|
-
...
|
|
5465
|
+
...tn(t, e, n),
|
|
5464
5466
|
type: "flowSequence"
|
|
5465
5467
|
};
|
|
5466
5468
|
}
|
|
5467
|
-
function
|
|
5469
|
+
function mi(t, e) {
|
|
5468
5470
|
return {
|
|
5469
5471
|
...b("flowSequenceItem", t),
|
|
5470
5472
|
children: [e]
|
|
5471
5473
|
};
|
|
5472
5474
|
}
|
|
5473
|
-
function
|
|
5474
|
-
let n =
|
|
5475
|
+
function hi(t, e) {
|
|
5476
|
+
let n = me(t.cstNode.items, e), r = on(n), s = t.items.map((a, c) => {
|
|
5475
5477
|
if (a.type !== "PAIR") {
|
|
5476
5478
|
let l = e.transformNode(a);
|
|
5477
|
-
return
|
|
5479
|
+
return mi(J(l.position.start, l.position.end), l);
|
|
5478
5480
|
} else {
|
|
5479
5481
|
let l = r[c], {
|
|
5480
5482
|
additionalKeyRange: f,
|
|
5481
5483
|
additionalValueRange: m
|
|
5482
|
-
} =
|
|
5483
|
-
return
|
|
5484
|
+
} = rn(l);
|
|
5485
|
+
return Je(a, e, nn, f, m);
|
|
5484
5486
|
}
|
|
5485
|
-
}), i = n[0], o =
|
|
5486
|
-
return
|
|
5487
|
+
}), i = n[0], o = U(n);
|
|
5488
|
+
return pi(e.transformRange({
|
|
5487
5489
|
origStart: i.origOffset,
|
|
5488
5490
|
origEnd: o.origOffset + 1
|
|
5489
5491
|
}), e.transformContent(t), s);
|
|
5490
5492
|
}
|
|
5491
|
-
function
|
|
5493
|
+
function gi(t, e, n) {
|
|
5492
5494
|
return {
|
|
5493
5495
|
...b("mapping", t),
|
|
5494
5496
|
...X(),
|
|
@@ -5496,24 +5498,24 @@ function ls(t, e, n) {
|
|
|
5496
5498
|
children: n
|
|
5497
5499
|
};
|
|
5498
5500
|
}
|
|
5499
|
-
function
|
|
5501
|
+
function di(t, e, n) {
|
|
5500
5502
|
return {
|
|
5501
5503
|
...b("mappingItem", t),
|
|
5502
5504
|
...X(),
|
|
5503
5505
|
children: [e, n]
|
|
5504
5506
|
};
|
|
5505
5507
|
}
|
|
5506
|
-
function
|
|
5508
|
+
function yi(t, e) {
|
|
5507
5509
|
let n = t.cstNode;
|
|
5508
|
-
n.items.filter((o) => o.type === "MAP_KEY" || o.type === "MAP_VALUE").forEach((o) =>
|
|
5509
|
-
let r =
|
|
5510
|
+
n.items.filter((o) => o.type === "MAP_KEY" || o.type === "MAP_VALUE").forEach((o) => He(o, e));
|
|
5511
|
+
let r = me(n.items, e), s = Qa(r), i = t.items.map((o, a) => {
|
|
5510
5512
|
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];
|
|
5511
|
-
return
|
|
5513
|
+
return Je(o, e, di, l, f);
|
|
5512
5514
|
});
|
|
5513
|
-
return
|
|
5515
|
+
return gi(J(i[0].position.start, U(i).position.end), e.transformContent(t), i);
|
|
5514
5516
|
}
|
|
5515
|
-
function
|
|
5516
|
-
let e = [], n =
|
|
5517
|
+
function Qa(t) {
|
|
5518
|
+
let e = [], n = sn(t, 0), r = false;
|
|
5517
5519
|
for (let s = 0; s < t.length; s++) {
|
|
5518
5520
|
if (t[s].type === "MAP_VALUE") {
|
|
5519
5521
|
e.push(n(s + 1)), r = false;
|
|
@@ -5523,276 +5525,298 @@ function mo(t) {
|
|
|
5523
5525
|
}
|
|
5524
5526
|
return r && e.push(n(1 / 0)), e;
|
|
5525
5527
|
}
|
|
5526
|
-
function
|
|
5528
|
+
function Ei(t, e, n) {
|
|
5527
5529
|
return {
|
|
5528
5530
|
...b("plain", t),
|
|
5529
|
-
|
|
5531
|
+
...F(),
|
|
5530
5532
|
...e,
|
|
5531
5533
|
value: n
|
|
5532
5534
|
};
|
|
5533
5535
|
}
|
|
5534
|
-
function
|
|
5536
|
+
function Si(t, e, n) {
|
|
5535
5537
|
for (let r = e; r >= 0; r--) if (n.test(t[r])) return r;
|
|
5536
5538
|
return -1;
|
|
5537
5539
|
}
|
|
5538
|
-
function
|
|
5540
|
+
function wi(t, e) {
|
|
5539
5541
|
let n = t.cstNode;
|
|
5540
|
-
return
|
|
5542
|
+
return Ei(e.transformRange({
|
|
5541
5543
|
origStart: n.valueRange.origStart,
|
|
5542
|
-
origEnd:
|
|
5544
|
+
origEnd: Si(e.text, n.valueRange.origEnd - 1, /\S/) + 1
|
|
5543
5545
|
}), e.transformContent(t), n.strValue);
|
|
5544
5546
|
}
|
|
5545
|
-
function
|
|
5547
|
+
function bi(t) {
|
|
5546
5548
|
return {
|
|
5547
5549
|
...t,
|
|
5548
5550
|
type: "quoteDouble"
|
|
5549
5551
|
};
|
|
5550
5552
|
}
|
|
5551
|
-
function
|
|
5553
|
+
function Ni(t, e, n) {
|
|
5552
5554
|
return {
|
|
5553
5555
|
...b("quoteValue", t),
|
|
5554
5556
|
...e,
|
|
5555
|
-
|
|
5557
|
+
...F(),
|
|
5556
5558
|
value: n
|
|
5557
5559
|
};
|
|
5558
5560
|
}
|
|
5559
|
-
function
|
|
5561
|
+
function an(t, e) {
|
|
5560
5562
|
let n = t.cstNode;
|
|
5561
|
-
return
|
|
5563
|
+
return Ni(e.transformRange(n.valueRange), e.transformContent(t), n.strValue);
|
|
5562
5564
|
}
|
|
5563
|
-
function
|
|
5564
|
-
return
|
|
5565
|
+
function Oi(t, e) {
|
|
5566
|
+
return bi(an(t, e));
|
|
5565
5567
|
}
|
|
5566
|
-
function
|
|
5568
|
+
function Ai(t) {
|
|
5567
5569
|
return {
|
|
5568
5570
|
...t,
|
|
5569
5571
|
type: "quoteSingle"
|
|
5570
5572
|
};
|
|
5571
5573
|
}
|
|
5572
|
-
function
|
|
5573
|
-
return
|
|
5574
|
+
function Li(t, e) {
|
|
5575
|
+
return Ai(an(t, e));
|
|
5574
5576
|
}
|
|
5575
|
-
function
|
|
5577
|
+
function Ti(t, e, n) {
|
|
5576
5578
|
return {
|
|
5577
5579
|
...b("sequence", t),
|
|
5578
5580
|
...X(),
|
|
5579
|
-
...
|
|
5581
|
+
...q(),
|
|
5580
5582
|
...e,
|
|
5581
5583
|
children: n
|
|
5582
5584
|
};
|
|
5583
5585
|
}
|
|
5584
|
-
function
|
|
5586
|
+
function Mi(t, e) {
|
|
5585
5587
|
return {
|
|
5586
5588
|
...b("sequenceItem", t),
|
|
5587
|
-
...$(),
|
|
5588
5589
|
...F(),
|
|
5590
|
+
...q(),
|
|
5589
5591
|
children: e ? [e] : []
|
|
5590
5592
|
};
|
|
5591
5593
|
}
|
|
5592
|
-
function
|
|
5593
|
-
let r =
|
|
5594
|
-
|
|
5594
|
+
function Ci(t, e) {
|
|
5595
|
+
let r = me(t.cstNode.items, e).map((s, i) => {
|
|
5596
|
+
He(s, e);
|
|
5595
5597
|
let o = e.transformNode(t.items[i]);
|
|
5596
|
-
return
|
|
5598
|
+
return Mi(J(e.transformOffset(s.valueRange.origStart), o === null ? e.transformOffset(s.valueRange.origStart + 1) : o.position.end), o);
|
|
5597
5599
|
});
|
|
5598
|
-
return
|
|
5600
|
+
return Ti(J(r[0].position.start, U(r).position.end), e.transformContent(t), r);
|
|
5599
5601
|
}
|
|
5600
|
-
function
|
|
5602
|
+
function ki(t, e) {
|
|
5601
5603
|
if (t === null || t.type === void 0 && t.value === null) return null;
|
|
5602
5604
|
switch (t.type) {
|
|
5603
5605
|
case "ALIAS":
|
|
5604
|
-
return
|
|
5606
|
+
return Hs(t, e);
|
|
5605
5607
|
case "BLOCK_FOLDED":
|
|
5606
|
-
return
|
|
5608
|
+
return zs(t, e);
|
|
5607
5609
|
case "BLOCK_LITERAL":
|
|
5608
|
-
return
|
|
5610
|
+
return ei(t, e);
|
|
5609
5611
|
case "COMMENT":
|
|
5610
|
-
return
|
|
5612
|
+
return ti(t, e);
|
|
5611
5613
|
case "DIRECTIVE":
|
|
5612
|
-
return
|
|
5614
|
+
return ri(t, e);
|
|
5613
5615
|
case "DOCUMENT":
|
|
5614
|
-
return
|
|
5616
|
+
return li(t, e);
|
|
5615
5617
|
case "FLOW_MAP":
|
|
5616
|
-
return
|
|
5618
|
+
return ui(t, e);
|
|
5617
5619
|
case "FLOW_SEQ":
|
|
5618
|
-
return
|
|
5620
|
+
return hi(t, e);
|
|
5619
5621
|
case "MAP":
|
|
5620
|
-
return
|
|
5622
|
+
return yi(t, e);
|
|
5621
5623
|
case "PLAIN":
|
|
5622
|
-
return
|
|
5624
|
+
return wi(t, e);
|
|
5623
5625
|
case "QUOTE_DOUBLE":
|
|
5624
|
-
return
|
|
5626
|
+
return Oi(t, e);
|
|
5625
5627
|
case "QUOTE_SINGLE":
|
|
5626
|
-
return
|
|
5628
|
+
return Li(t, e);
|
|
5627
5629
|
case "SEQ":
|
|
5628
|
-
return
|
|
5630
|
+
return Ci(t, e);
|
|
5629
5631
|
default:
|
|
5630
5632
|
throw new Error(`Unexpected node type ${t.type}`);
|
|
5631
5633
|
}
|
|
5632
5634
|
}
|
|
5633
|
-
|
|
5635
|
+
var or;
|
|
5636
|
+
var Le;
|
|
5637
|
+
var bt;
|
|
5638
|
+
var he;
|
|
5639
|
+
var cr;
|
|
5640
|
+
var lr;
|
|
5641
|
+
var ar = class {
|
|
5642
|
+
constructor(e, n) {
|
|
5643
|
+
Ot(this, he);
|
|
5644
|
+
ln(this, "text");
|
|
5645
|
+
ln(this, "comments", []);
|
|
5646
|
+
Ot(this, Le);
|
|
5647
|
+
Ot(this, bt);
|
|
5648
|
+
this.text = n, un(this, Le, e);
|
|
5649
|
+
}
|
|
5650
|
+
setOrigRanges() {
|
|
5651
|
+
if (!Te(this, Le).setOrigRanges()) for (let e of Te(this, Le)) e.setOrigRanges([], 0);
|
|
5652
|
+
}
|
|
5653
|
+
transformOffset(e) {
|
|
5654
|
+
return Xe(this, he, cr).call(this, {
|
|
5655
|
+
origStart: e,
|
|
5656
|
+
origEnd: e
|
|
5657
|
+
}).start;
|
|
5658
|
+
}
|
|
5659
|
+
transformRange(e) {
|
|
5660
|
+
let {
|
|
5661
|
+
start: n,
|
|
5662
|
+
end: r
|
|
5663
|
+
} = Xe(this, he, cr).call(this, e);
|
|
5664
|
+
return J(n, r);
|
|
5665
|
+
}
|
|
5666
|
+
transformNode(e) {
|
|
5667
|
+
return ki(e, this);
|
|
5668
|
+
}
|
|
5669
|
+
transformContent(e) {
|
|
5670
|
+
return zt(e, this);
|
|
5671
|
+
}
|
|
5672
|
+
};
|
|
5673
|
+
Le = /* @__PURE__ */ new WeakMap(), bt = /* @__PURE__ */ new WeakMap(), he = /* @__PURE__ */ new WeakSet(), cr = function(e) {
|
|
5674
|
+
if (!or) {
|
|
5675
|
+
let [o] = Te(this, Le), a = Object.getPrototypeOf(Object.getPrototypeOf(o));
|
|
5676
|
+
or = Object.getOwnPropertyDescriptor(a, "rangeAsLinePos").get;
|
|
5677
|
+
}
|
|
5678
|
+
Te(this, bt) ?? un(this, bt, {
|
|
5679
|
+
root: {
|
|
5680
|
+
context: {
|
|
5681
|
+
src: this.text
|
|
5682
|
+
}
|
|
5683
|
+
}
|
|
5684
|
+
});
|
|
5685
|
+
let {
|
|
5686
|
+
start: {
|
|
5687
|
+
line: n,
|
|
5688
|
+
col: r
|
|
5689
|
+
},
|
|
5690
|
+
end: {
|
|
5691
|
+
line: s,
|
|
5692
|
+
col: i
|
|
5693
|
+
}
|
|
5694
|
+
} = or.call({
|
|
5695
|
+
range: {
|
|
5696
|
+
start: Xe(this, he, lr).call(this, e.origStart),
|
|
5697
|
+
end: Xe(this, he, lr).call(this, e.origEnd)
|
|
5698
|
+
},
|
|
5699
|
+
context: Te(this, bt)
|
|
5700
|
+
});
|
|
5701
|
+
return {
|
|
5702
|
+
start: {
|
|
5703
|
+
offset: e.origStart,
|
|
5704
|
+
line: n,
|
|
5705
|
+
column: r
|
|
5706
|
+
},
|
|
5707
|
+
end: {
|
|
5708
|
+
offset: e.origEnd,
|
|
5709
|
+
line: s,
|
|
5710
|
+
column: i
|
|
5711
|
+
}
|
|
5712
|
+
};
|
|
5713
|
+
}, lr = function(e) {
|
|
5714
|
+
return e < 0 ? 0 : e > this.text.length ? this.text.length : e;
|
|
5715
|
+
};
|
|
5716
|
+
var Pi = ar;
|
|
5717
|
+
function Ii(t, e, n) {
|
|
5634
5718
|
let r = new SyntaxError(t);
|
|
5635
5719
|
return r.name = "YAMLSyntaxError", r.source = e, r.position = n, r;
|
|
5636
5720
|
}
|
|
5637
|
-
function
|
|
5721
|
+
function vi(t, e) {
|
|
5638
5722
|
let n = t.source.range || t.source.valueRange;
|
|
5639
|
-
return
|
|
5640
|
-
}
|
|
5641
|
-
function Ts(t, e, n) {
|
|
5642
|
-
return {
|
|
5643
|
-
offset: t,
|
|
5644
|
-
line: e,
|
|
5645
|
-
column: n
|
|
5646
|
-
};
|
|
5647
|
-
}
|
|
5648
|
-
function Cs(t, e) {
|
|
5649
|
-
t < 0 ? t = 0 : t > e.text.length && (t = e.text.length);
|
|
5650
|
-
let n = e.locator.locationForIndex(t);
|
|
5651
|
-
return Ts(t, n.line + 1, n.column + 1);
|
|
5652
|
-
}
|
|
5653
|
-
function Ms(t, e) {
|
|
5654
|
-
return K(e.transformOffset(t.origStart), e.transformOffset(t.origEnd));
|
|
5655
|
-
}
|
|
5656
|
-
function ks(t) {
|
|
5657
|
-
if (!t.setOrigRanges()) {
|
|
5658
|
-
let e = (n) => {
|
|
5659
|
-
if (ho(n)) return n.origStart = n.start, n.origEnd = n.end, true;
|
|
5660
|
-
if (go(n)) return n.origOffset = n.offset, true;
|
|
5661
|
-
};
|
|
5662
|
-
t.forEach((n) => bn(n, e));
|
|
5663
|
-
}
|
|
5664
|
-
}
|
|
5665
|
-
function bn(t, e) {
|
|
5666
|
-
if (!(!t || typeof t != "object") && e(t) !== true) for (let n of Object.keys(t)) {
|
|
5667
|
-
if (n === "context" || n === "error") continue;
|
|
5668
|
-
let r = t[n];
|
|
5669
|
-
Array.isArray(r) ? r.forEach((s) => bn(s, e)) : bn(r, e);
|
|
5670
|
-
}
|
|
5671
|
-
}
|
|
5672
|
-
function ho(t) {
|
|
5673
|
-
return typeof t.start == "number";
|
|
5674
|
-
}
|
|
5675
|
-
function go(t) {
|
|
5676
|
-
return typeof t.offset == "number";
|
|
5723
|
+
return Ii(t.message, e.text, e.transformRange(n));
|
|
5677
5724
|
}
|
|
5678
|
-
function
|
|
5725
|
+
function fr(t) {
|
|
5679
5726
|
if ("children" in t) {
|
|
5680
5727
|
if (t.children.length === 1) {
|
|
5681
5728
|
let e = t.children[0];
|
|
5682
5729
|
if (e.type === "plain" && e.tag === null && e.anchor === null && e.value === "") return t.children.splice(0, 1), t;
|
|
5683
5730
|
}
|
|
5684
|
-
t.children.forEach(
|
|
5731
|
+
t.children.forEach(fr);
|
|
5685
5732
|
}
|
|
5686
5733
|
return t;
|
|
5687
5734
|
}
|
|
5688
|
-
function
|
|
5735
|
+
function ur(t, e, n, r) {
|
|
5689
5736
|
let s = e(t);
|
|
5690
5737
|
return (i) => {
|
|
5691
5738
|
r(s, i) && n(t, s = i);
|
|
5692
5739
|
};
|
|
5693
5740
|
}
|
|
5694
|
-
function
|
|
5741
|
+
function pr(t) {
|
|
5695
5742
|
if (t === null || !("children" in t)) return;
|
|
5696
5743
|
let e = t.children;
|
|
5697
|
-
if (e.forEach(
|
|
5744
|
+
if (e.forEach(pr), t.type === "document") {
|
|
5698
5745
|
let [i, o] = t.children;
|
|
5699
5746
|
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);
|
|
5700
5747
|
}
|
|
5701
|
-
let n =
|
|
5702
|
-
"endComments" in t && t.endComments.length !== 0 && (n(t.endComments[0].position.start), r(
|
|
5748
|
+
let n = ur(t.position, Ga, Ha, za), r = ur(t.position, Ja, Xa, Za);
|
|
5749
|
+
"endComments" in t && t.endComments.length !== 0 && (n(t.endComments[0].position.start), r(U(t.endComments).position.end));
|
|
5703
5750
|
let s = e.filter((i) => i !== null);
|
|
5704
5751
|
if (s.length !== 0) {
|
|
5705
|
-
let i = s[0], o =
|
|
5752
|
+
let i = s[0], o = U(s);
|
|
5706
5753
|
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);
|
|
5707
5754
|
}
|
|
5708
5755
|
}
|
|
5709
|
-
function
|
|
5756
|
+
function Ga(t) {
|
|
5710
5757
|
return t.start;
|
|
5711
5758
|
}
|
|
5712
|
-
function
|
|
5759
|
+
function Ha(t, e) {
|
|
5713
5760
|
t.start = e;
|
|
5714
5761
|
}
|
|
5715
|
-
function
|
|
5762
|
+
function Ja(t) {
|
|
5716
5763
|
return t.end;
|
|
5717
5764
|
}
|
|
5718
|
-
function
|
|
5765
|
+
function Xa(t, e) {
|
|
5719
5766
|
t.end = e;
|
|
5720
5767
|
}
|
|
5721
|
-
function
|
|
5768
|
+
function za(t, e) {
|
|
5722
5769
|
return e.offset < t.offset;
|
|
5723
5770
|
}
|
|
5724
|
-
function
|
|
5771
|
+
function Za(t, e) {
|
|
5725
5772
|
return e.offset > t.offset;
|
|
5726
5773
|
}
|
|
5727
|
-
|
|
5728
|
-
|
|
5729
|
-
|
|
5730
|
-
|
|
5731
|
-
J.default.parseMap;
|
|
5732
|
-
J.default.parseSeq;
|
|
5733
|
-
J.default.stringifyNumber;
|
|
5734
|
-
J.default.stringifyString;
|
|
5735
|
-
J.default.Type;
|
|
5736
|
-
J.default.YAMLError;
|
|
5737
|
-
J.default.YAMLReferenceError;
|
|
5738
|
-
var Zn = J.default.YAMLSemanticError;
|
|
5739
|
-
J.default.YAMLSyntaxError;
|
|
5740
|
-
J.default.YAMLWarning;
|
|
5741
|
-
var {
|
|
5742
|
-
Document: Si,
|
|
5743
|
-
parseCST: wi
|
|
5744
|
-
} = Ei.default;
|
|
5745
|
-
function bi(t) {
|
|
5746
|
-
let e = wi(t);
|
|
5747
|
-
ks(e);
|
|
5748
|
-
let n = e.map((a) => new Si({
|
|
5774
|
+
function _i(t) {
|
|
5775
|
+
let e = mr.default.parseCST(t), n = new Pi(e, t);
|
|
5776
|
+
n.setOrigRanges();
|
|
5777
|
+
let r = e.map((i) => new mr.default.Document({
|
|
5749
5778
|
merge: false,
|
|
5750
5779
|
keepCstNodes: true
|
|
5751
|
-
}).parse(
|
|
5752
|
-
|
|
5753
|
-
|
|
5754
|
-
|
|
5755
|
-
transformOffset: (a) => Cs(a, i),
|
|
5756
|
-
transformRange: (a) => Ms(a, i),
|
|
5757
|
-
transformNode: (a) => Os(a, i),
|
|
5758
|
-
transformContent: (a) => vt(a, i)
|
|
5759
|
-
};
|
|
5760
|
-
for (let a of n) for (let c of a.errors) if (!(c instanceof Zn && c.message === 'Map keys must be unique; "<<" is repeated')) throw As(c, i);
|
|
5761
|
-
n.forEach((a) => ct(a.cstNode));
|
|
5762
|
-
let o = Br(i.transformRange({
|
|
5780
|
+
}).parse(i));
|
|
5781
|
+
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);
|
|
5782
|
+
r.forEach((i) => wt(i.cstNode));
|
|
5783
|
+
let s = Vs(n.transformRange({
|
|
5763
5784
|
origStart: 0,
|
|
5764
|
-
origEnd:
|
|
5765
|
-
}),
|
|
5766
|
-
return
|
|
5785
|
+
origEnd: t.length
|
|
5786
|
+
}), r.map((i) => n.transformNode(i)), n.comments);
|
|
5787
|
+
return qs(s), pr(s), fr(s), s;
|
|
5767
5788
|
}
|
|
5768
|
-
function
|
|
5789
|
+
function ec(t, e) {
|
|
5769
5790
|
let n = new SyntaxError(t + " (" + e.loc.start.line + ":" + e.loc.start.column + ")");
|
|
5770
5791
|
return Object.assign(n, e);
|
|
5771
5792
|
}
|
|
5772
|
-
var
|
|
5773
|
-
function
|
|
5793
|
+
var Ri = ec;
|
|
5794
|
+
function tc(t) {
|
|
5774
5795
|
try {
|
|
5775
|
-
let e =
|
|
5796
|
+
let e = _i(t);
|
|
5776
5797
|
return delete e.comments, e;
|
|
5777
5798
|
} catch (e) {
|
|
5778
|
-
throw e != null && e.position ?
|
|
5799
|
+
throw e != null && e.position ? Ri(e.message, {
|
|
5779
5800
|
loc: e.position,
|
|
5780
5801
|
cause: e
|
|
5781
5802
|
}) : e;
|
|
5782
5803
|
}
|
|
5783
5804
|
}
|
|
5784
|
-
var
|
|
5805
|
+
var nc = {
|
|
5785
5806
|
astFormat: "yaml",
|
|
5786
|
-
parse:
|
|
5787
|
-
hasPragma:
|
|
5788
|
-
|
|
5789
|
-
|
|
5807
|
+
parse: tc,
|
|
5808
|
+
hasPragma: Dr,
|
|
5809
|
+
hasIgnorePragma: Yr,
|
|
5810
|
+
locStart: xe,
|
|
5811
|
+
locEnd: Pr
|
|
5790
5812
|
};
|
|
5791
|
-
var
|
|
5792
|
-
yaml:
|
|
5813
|
+
var rc = {
|
|
5814
|
+
yaml: Jr
|
|
5793
5815
|
};
|
|
5794
|
-
var
|
|
5816
|
+
var xi = cn(tr());
|
|
5817
|
+
var sc = xi.default.parse;
|
|
5818
|
+
var Ih = gr;
|
|
5795
5819
|
|
|
5796
|
-
export {
|
|
5797
|
-
//# sourceMappingURL=yaml-
|
|
5798
|
-
//# sourceMappingURL=yaml-
|
|
5820
|
+
export { sc as __parsePrettierYamlConfig, Ih as default, Xr as languages, zr as options, hr as parsers, rc as printers };
|
|
5821
|
+
//# sourceMappingURL=yaml-LD5K7H4C.js.map
|
|
5822
|
+
//# sourceMappingURL=yaml-LD5K7H4C.js.map
|