@html-validate/commitlint-config 4.0.2 → 4.0.3
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/dist/commitlint.js +840 -627
- package/dist/formatter.js +5 -1
- package/dist/install.js +5 -1
- package/dist/parser-preset.js +5 -1
- package/package.json +6 -1
package/dist/commitlint.js
CHANGED
|
@@ -18,11 +18,20 @@ var __require = /* @__PURE__ */ ((x2) => typeof require !== "undefined" ? requir
|
|
|
18
18
|
if (typeof require !== "undefined") return require.apply(this, arguments);
|
|
19
19
|
throw Error('Dynamic require of "' + x2 + '" is not supported');
|
|
20
20
|
});
|
|
21
|
-
var __esm = (fn, res) => function __init() {
|
|
22
|
-
|
|
21
|
+
var __esm = (fn, res, err) => function __init() {
|
|
22
|
+
if (err) throw err[0];
|
|
23
|
+
try {
|
|
24
|
+
return fn && (res = (0, fn[__getOwnPropNames(fn)[0]])(fn = 0)), res;
|
|
25
|
+
} catch (e2) {
|
|
26
|
+
throw err = [e2], e2;
|
|
27
|
+
}
|
|
23
28
|
};
|
|
24
29
|
var __commonJS = (cb, mod) => function __require2() {
|
|
25
|
-
|
|
30
|
+
try {
|
|
31
|
+
return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
|
|
32
|
+
} catch (e2) {
|
|
33
|
+
throw mod = 0, e2;
|
|
34
|
+
}
|
|
26
35
|
};
|
|
27
36
|
var __copyProps = (to, from, except, desc) => {
|
|
28
37
|
if (from && typeof from === "object" || typeof from === "function") {
|
|
@@ -224,6 +233,18 @@ var require_semver = __commonJS({
|
|
|
224
233
|
var { safeRe: re, t: t2 } = require_re();
|
|
225
234
|
var parseOptions = require_parse_options();
|
|
226
235
|
var { compareIdentifiers } = require_identifiers();
|
|
236
|
+
var isPrereleaseIdentifier = (prerelease, identifier) => {
|
|
237
|
+
const identifiers = identifier.split(".");
|
|
238
|
+
if (identifiers.length > prerelease.length) {
|
|
239
|
+
return false;
|
|
240
|
+
}
|
|
241
|
+
for (let i2 = 0; i2 < identifiers.length; i2++) {
|
|
242
|
+
if (compareIdentifiers(prerelease[i2], identifiers[i2]) !== 0) {
|
|
243
|
+
return false;
|
|
244
|
+
}
|
|
245
|
+
}
|
|
246
|
+
return true;
|
|
247
|
+
};
|
|
227
248
|
var SemVer = class _SemVer {
|
|
228
249
|
constructor(version, options) {
|
|
229
250
|
options = parseOptions(options);
|
|
@@ -470,8 +491,9 @@ var require_semver = __commonJS({
|
|
|
470
491
|
if (identifierBase === false) {
|
|
471
492
|
prerelease = [identifier];
|
|
472
493
|
}
|
|
473
|
-
if (
|
|
474
|
-
|
|
494
|
+
if (isPrereleaseIdentifier(this.prerelease, identifier)) {
|
|
495
|
+
const prereleaseBase = this.prerelease[identifier.split(".").length];
|
|
496
|
+
if (isNaN(prereleaseBase)) {
|
|
475
497
|
this.prerelease = prerelease;
|
|
476
498
|
}
|
|
477
499
|
} else {
|
|
@@ -1141,20 +1163,22 @@ var require_range = __commonJS({
|
|
|
1141
1163
|
return comp;
|
|
1142
1164
|
};
|
|
1143
1165
|
var isX = (id) => !id || id.toLowerCase() === "x" || id === "*";
|
|
1166
|
+
var invalidXRangeOrder = (M, m2, p2) => isX(M) && !isX(m2) || isX(m2) && p2 && !isX(p2);
|
|
1144
1167
|
var replaceTildes = (comp, options) => {
|
|
1145
1168
|
return comp.trim().split(/\s+/).map((c2) => replaceTilde(c2, options)).join(" ");
|
|
1146
1169
|
};
|
|
1147
1170
|
var replaceTilde = (comp, options) => {
|
|
1148
1171
|
const r2 = options.loose ? re[t2.TILDELOOSE] : re[t2.TILDE];
|
|
1172
|
+
const z2 = options.includePrerelease ? "-0" : "";
|
|
1149
1173
|
return comp.replace(r2, (_2, M, m2, p2, pr) => {
|
|
1150
1174
|
debug("tilde", comp, _2, M, m2, p2, pr);
|
|
1151
1175
|
let ret;
|
|
1152
1176
|
if (isX(M)) {
|
|
1153
1177
|
ret = "";
|
|
1154
1178
|
} else if (isX(m2)) {
|
|
1155
|
-
ret = `>=${M}.0.0 <${+M + 1}.0.0-0`;
|
|
1179
|
+
ret = `>=${M}.0.0${z2} <${+M + 1}.0.0-0`;
|
|
1156
1180
|
} else if (isX(p2)) {
|
|
1157
|
-
ret = `>=${M}.${m2}.0 <${M}.${+m2 + 1}.0-0`;
|
|
1181
|
+
ret = `>=${M}.${m2}.0${z2} <${M}.${+m2 + 1}.0-0`;
|
|
1158
1182
|
} else if (pr) {
|
|
1159
1183
|
debug("replaceTilde pr", pr);
|
|
1160
1184
|
ret = `>=${M}.${m2}.${p2}-${pr} <${M}.${+m2 + 1}.0-0`;
|
|
@@ -1200,9 +1224,9 @@ var require_range = __commonJS({
|
|
|
1200
1224
|
debug("no pr");
|
|
1201
1225
|
if (M === "0") {
|
|
1202
1226
|
if (m2 === "0") {
|
|
1203
|
-
ret = `>=${M}.${m2}.${p2}
|
|
1227
|
+
ret = `>=${M}.${m2}.${p2} <${M}.${m2}.${+p2 + 1}-0`;
|
|
1204
1228
|
} else {
|
|
1205
|
-
ret = `>=${M}.${m2}.${p2}
|
|
1229
|
+
ret = `>=${M}.${m2}.${p2} <${M}.${+m2 + 1}.0-0`;
|
|
1206
1230
|
}
|
|
1207
1231
|
} else {
|
|
1208
1232
|
ret = `>=${M}.${m2}.${p2} <${+M + 1}.0.0-0`;
|
|
@@ -1221,6 +1245,9 @@ var require_range = __commonJS({
|
|
|
1221
1245
|
const r2 = options.loose ? re[t2.XRANGELOOSE] : re[t2.XRANGE];
|
|
1222
1246
|
return comp.replace(r2, (ret, gtlt, M, m2, p2, pr) => {
|
|
1223
1247
|
debug("xRange", comp, ret, gtlt, M, m2, p2, pr);
|
|
1248
|
+
if (invalidXRangeOrder(M, m2, p2)) {
|
|
1249
|
+
return comp;
|
|
1250
|
+
}
|
|
1224
1251
|
const xM = isX(M);
|
|
1225
1252
|
const xm = xM || isX(m2);
|
|
1226
1253
|
const xp = xm || isX(p2);
|
|
@@ -10397,19 +10424,18 @@ var require_common = __commonJS({
|
|
|
10397
10424
|
return [sequence];
|
|
10398
10425
|
}
|
|
10399
10426
|
function extend(target, source) {
|
|
10400
|
-
var index, length, key, sourceKeys;
|
|
10401
10427
|
if (source) {
|
|
10402
|
-
sourceKeys = Object.keys(source);
|
|
10403
|
-
for (index = 0, length = sourceKeys.length; index < length; index += 1) {
|
|
10404
|
-
key = sourceKeys[index];
|
|
10428
|
+
const sourceKeys = Object.keys(source);
|
|
10429
|
+
for (let index = 0, length = sourceKeys.length; index < length; index += 1) {
|
|
10430
|
+
const key = sourceKeys[index];
|
|
10405
10431
|
target[key] = source[key];
|
|
10406
10432
|
}
|
|
10407
10433
|
}
|
|
10408
10434
|
return target;
|
|
10409
10435
|
}
|
|
10410
10436
|
function repeat(string, count) {
|
|
10411
|
-
|
|
10412
|
-
for (cycle = 0; cycle < count; cycle += 1) {
|
|
10437
|
+
let result = "";
|
|
10438
|
+
for (let cycle = 0; cycle < count; cycle += 1) {
|
|
10413
10439
|
result += string;
|
|
10414
10440
|
}
|
|
10415
10441
|
return result;
|
|
@@ -10431,7 +10457,8 @@ var require_exception = __commonJS({
|
|
|
10431
10457
|
"node_modules/cosmiconfig/node_modules/js-yaml/lib/exception.js"(exports, module) {
|
|
10432
10458
|
"use strict";
|
|
10433
10459
|
function formatError(exception, compact) {
|
|
10434
|
-
|
|
10460
|
+
let where = "";
|
|
10461
|
+
const message2 = exception.reason || "(unknown reason)";
|
|
10435
10462
|
if (!exception.mark) return message2;
|
|
10436
10463
|
if (exception.mark.name) {
|
|
10437
10464
|
where += 'in "' + exception.mark.name + '" ';
|
|
@@ -10469,9 +10496,9 @@ var require_snippet = __commonJS({
|
|
|
10469
10496
|
"use strict";
|
|
10470
10497
|
var common = require_common();
|
|
10471
10498
|
function getLine(buffer, lineStart, lineEnd, position, maxLineLength) {
|
|
10472
|
-
|
|
10473
|
-
|
|
10474
|
-
|
|
10499
|
+
let head = "";
|
|
10500
|
+
let tail = "";
|
|
10501
|
+
const maxHalfLength = Math.floor(maxLineLength / 2) - 1;
|
|
10475
10502
|
if (position - lineStart > maxHalfLength) {
|
|
10476
10503
|
head = " ... ";
|
|
10477
10504
|
lineStart = position - maxHalfLength + head.length;
|
|
@@ -10496,11 +10523,11 @@ var require_snippet = __commonJS({
|
|
|
10496
10523
|
if (typeof options.indent !== "number") options.indent = 1;
|
|
10497
10524
|
if (typeof options.linesBefore !== "number") options.linesBefore = 3;
|
|
10498
10525
|
if (typeof options.linesAfter !== "number") options.linesAfter = 2;
|
|
10499
|
-
|
|
10500
|
-
|
|
10501
|
-
|
|
10502
|
-
|
|
10503
|
-
|
|
10526
|
+
const re = /\r?\n|\r|\0/g;
|
|
10527
|
+
const lineStarts = [0];
|
|
10528
|
+
const lineEnds = [];
|
|
10529
|
+
let match;
|
|
10530
|
+
let foundLineNo = -1;
|
|
10504
10531
|
while (match = re.exec(mark.buffer)) {
|
|
10505
10532
|
lineEnds.push(match.index);
|
|
10506
10533
|
lineStarts.push(match.index + match[0].length);
|
|
@@ -10509,33 +10536,33 @@ var require_snippet = __commonJS({
|
|
|
10509
10536
|
}
|
|
10510
10537
|
}
|
|
10511
10538
|
if (foundLineNo < 0) foundLineNo = lineStarts.length - 1;
|
|
10512
|
-
|
|
10513
|
-
|
|
10514
|
-
|
|
10515
|
-
for (i2 = 1; i2 <= options.linesBefore; i2++) {
|
|
10539
|
+
let result = "";
|
|
10540
|
+
const lineNoLength = Math.min(mark.line + options.linesAfter, lineEnds.length).toString().length;
|
|
10541
|
+
const maxLineLength = options.maxLength - (options.indent + lineNoLength + 3);
|
|
10542
|
+
for (let i2 = 1; i2 <= options.linesBefore; i2++) {
|
|
10516
10543
|
if (foundLineNo - i2 < 0) break;
|
|
10517
|
-
|
|
10544
|
+
const line2 = getLine(
|
|
10518
10545
|
mark.buffer,
|
|
10519
10546
|
lineStarts[foundLineNo - i2],
|
|
10520
10547
|
lineEnds[foundLineNo - i2],
|
|
10521
10548
|
mark.position - (lineStarts[foundLineNo] - lineStarts[foundLineNo - i2]),
|
|
10522
10549
|
maxLineLength
|
|
10523
10550
|
);
|
|
10524
|
-
result = common.repeat(" ", options.indent) + padStart((mark.line - i2 + 1).toString(), lineNoLength) + " | " +
|
|
10551
|
+
result = common.repeat(" ", options.indent) + padStart((mark.line - i2 + 1).toString(), lineNoLength) + " | " + line2.str + "\n" + result;
|
|
10525
10552
|
}
|
|
10526
|
-
line = getLine(mark.buffer, lineStarts[foundLineNo], lineEnds[foundLineNo], mark.position, maxLineLength);
|
|
10553
|
+
const line = getLine(mark.buffer, lineStarts[foundLineNo], lineEnds[foundLineNo], mark.position, maxLineLength);
|
|
10527
10554
|
result += common.repeat(" ", options.indent) + padStart((mark.line + 1).toString(), lineNoLength) + " | " + line.str + "\n";
|
|
10528
10555
|
result += common.repeat("-", options.indent + lineNoLength + 3 + line.pos) + "^\n";
|
|
10529
|
-
for (i2 = 1; i2 <= options.linesAfter; i2++) {
|
|
10556
|
+
for (let i2 = 1; i2 <= options.linesAfter; i2++) {
|
|
10530
10557
|
if (foundLineNo + i2 >= lineEnds.length) break;
|
|
10531
|
-
|
|
10558
|
+
const line2 = getLine(
|
|
10532
10559
|
mark.buffer,
|
|
10533
10560
|
lineStarts[foundLineNo + i2],
|
|
10534
10561
|
lineEnds[foundLineNo + i2],
|
|
10535
10562
|
mark.position - (lineStarts[foundLineNo] - lineStarts[foundLineNo + i2]),
|
|
10536
10563
|
maxLineLength
|
|
10537
10564
|
);
|
|
10538
|
-
result += common.repeat(" ", options.indent) + padStart((mark.line + i2 + 1).toString(), lineNoLength) + " | " +
|
|
10565
|
+
result += common.repeat(" ", options.indent) + padStart((mark.line + i2 + 1).toString(), lineNoLength) + " | " + line2.str + "\n";
|
|
10539
10566
|
}
|
|
10540
10567
|
return result.replace(/\n$/, "");
|
|
10541
10568
|
}
|
|
@@ -10566,7 +10593,7 @@ var require_type = __commonJS({
|
|
|
10566
10593
|
"mapping"
|
|
10567
10594
|
];
|
|
10568
10595
|
function compileStyleAliases(map) {
|
|
10569
|
-
|
|
10596
|
+
const result = {};
|
|
10570
10597
|
if (map !== null) {
|
|
10571
10598
|
Object.keys(map).forEach(function(style) {
|
|
10572
10599
|
map[style].forEach(function(alias) {
|
|
@@ -10614,9 +10641,9 @@ var require_schema = __commonJS({
|
|
|
10614
10641
|
var YAMLException = require_exception();
|
|
10615
10642
|
var Type = require_type();
|
|
10616
10643
|
function compileList(schema2, name) {
|
|
10617
|
-
|
|
10644
|
+
const result = [];
|
|
10618
10645
|
schema2[name].forEach(function(currentType) {
|
|
10619
|
-
|
|
10646
|
+
let newIndex = result.length;
|
|
10620
10647
|
result.forEach(function(previousType, previousIndex) {
|
|
10621
10648
|
if (previousType.tag === currentType.tag && previousType.kind === currentType.kind && previousType.multi === currentType.multi) {
|
|
10622
10649
|
newIndex = previousIndex;
|
|
@@ -10627,7 +10654,7 @@ var require_schema = __commonJS({
|
|
|
10627
10654
|
return result;
|
|
10628
10655
|
}
|
|
10629
10656
|
function compileMap() {
|
|
10630
|
-
|
|
10657
|
+
const result = {
|
|
10631
10658
|
scalar: {},
|
|
10632
10659
|
sequence: {},
|
|
10633
10660
|
mapping: {},
|
|
@@ -10638,7 +10665,7 @@ var require_schema = __commonJS({
|
|
|
10638
10665
|
mapping: [],
|
|
10639
10666
|
fallback: []
|
|
10640
10667
|
}
|
|
10641
|
-
}
|
|
10668
|
+
};
|
|
10642
10669
|
function collectType(type) {
|
|
10643
10670
|
if (type.multi) {
|
|
10644
10671
|
result.multi[type.kind].push(type);
|
|
@@ -10647,7 +10674,7 @@ var require_schema = __commonJS({
|
|
|
10647
10674
|
result[type.kind][type.tag] = result["fallback"][type.tag] = type;
|
|
10648
10675
|
}
|
|
10649
10676
|
}
|
|
10650
|
-
for (index = 0, length = arguments.length; index < length; index += 1) {
|
|
10677
|
+
for (let index = 0, length = arguments.length; index < length; index += 1) {
|
|
10651
10678
|
arguments[index].forEach(collectType);
|
|
10652
10679
|
}
|
|
10653
10680
|
return result;
|
|
@@ -10656,8 +10683,8 @@ var require_schema = __commonJS({
|
|
|
10656
10683
|
return this.extend(definition);
|
|
10657
10684
|
}
|
|
10658
10685
|
Schema.prototype.extend = function extend(definition) {
|
|
10659
|
-
|
|
10660
|
-
|
|
10686
|
+
let implicit = [];
|
|
10687
|
+
let explicit = [];
|
|
10661
10688
|
if (definition instanceof Type) {
|
|
10662
10689
|
explicit.push(definition);
|
|
10663
10690
|
} else if (Array.isArray(definition)) {
|
|
@@ -10684,7 +10711,7 @@ var require_schema = __commonJS({
|
|
|
10684
10711
|
throw new YAMLException("Specified list of YAML types (or a single Type object) contains a non-Type object.");
|
|
10685
10712
|
}
|
|
10686
10713
|
});
|
|
10687
|
-
|
|
10714
|
+
const result = Object.create(Schema.prototype);
|
|
10688
10715
|
result.implicit = (this.implicit || []).concat(implicit);
|
|
10689
10716
|
result.explicit = (this.explicit || []).concat(explicit);
|
|
10690
10717
|
result.compiledImplicit = compileList(result, "implicit");
|
|
@@ -10760,7 +10787,7 @@ var require_null = __commonJS({
|
|
|
10760
10787
|
var Type = require_type();
|
|
10761
10788
|
function resolveYamlNull(data) {
|
|
10762
10789
|
if (data === null) return true;
|
|
10763
|
-
|
|
10790
|
+
const max = data.length;
|
|
10764
10791
|
return max === 1 && data === "~" || max === 4 && (data === "null" || data === "Null" || data === "NULL");
|
|
10765
10792
|
}
|
|
10766
10793
|
function constructYamlNull() {
|
|
@@ -10803,7 +10830,7 @@ var require_bool = __commonJS({
|
|
|
10803
10830
|
var Type = require_type();
|
|
10804
10831
|
function resolveYamlBoolean(data) {
|
|
10805
10832
|
if (data === null) return false;
|
|
10806
|
-
|
|
10833
|
+
const max = data.length;
|
|
10807
10834
|
return max === 4 && (data === "true" || data === "True" || data === "TRUE") || max === 5 && (data === "false" || data === "False" || data === "FALSE");
|
|
10808
10835
|
}
|
|
10809
10836
|
function constructYamlBoolean(data) {
|
|
@@ -10840,19 +10867,21 @@ var require_int = __commonJS({
|
|
|
10840
10867
|
var common = require_common();
|
|
10841
10868
|
var Type = require_type();
|
|
10842
10869
|
function isHexCode(c2) {
|
|
10843
|
-
return
|
|
10870
|
+
return c2 >= 48 && c2 <= 57 || c2 >= 65 && c2 <= 70 || c2 >= 97 && c2 <= 102;
|
|
10844
10871
|
}
|
|
10845
10872
|
function isOctCode(c2) {
|
|
10846
|
-
return
|
|
10873
|
+
return c2 >= 48 && c2 <= 55;
|
|
10847
10874
|
}
|
|
10848
10875
|
function isDecCode(c2) {
|
|
10849
|
-
return
|
|
10876
|
+
return c2 >= 48 && c2 <= 57;
|
|
10850
10877
|
}
|
|
10851
10878
|
function resolveYamlInteger(data) {
|
|
10852
10879
|
if (data === null) return false;
|
|
10853
|
-
|
|
10880
|
+
const max = data.length;
|
|
10881
|
+
let index = 0;
|
|
10882
|
+
let hasDigits = false;
|
|
10854
10883
|
if (!max) return false;
|
|
10855
|
-
ch = data[index];
|
|
10884
|
+
let ch = data[index];
|
|
10856
10885
|
if (ch === "-" || ch === "+") {
|
|
10857
10886
|
ch = data[++index];
|
|
10858
10887
|
}
|
|
@@ -10863,51 +10892,41 @@ var require_int = __commonJS({
|
|
|
10863
10892
|
index++;
|
|
10864
10893
|
for (; index < max; index++) {
|
|
10865
10894
|
ch = data[index];
|
|
10866
|
-
if (ch === "_") continue;
|
|
10867
10895
|
if (ch !== "0" && ch !== "1") return false;
|
|
10868
10896
|
hasDigits = true;
|
|
10869
10897
|
}
|
|
10870
|
-
return hasDigits &&
|
|
10898
|
+
return hasDigits && Number.isFinite(parseYamlInteger(data));
|
|
10871
10899
|
}
|
|
10872
10900
|
if (ch === "x") {
|
|
10873
10901
|
index++;
|
|
10874
10902
|
for (; index < max; index++) {
|
|
10875
|
-
ch = data[index];
|
|
10876
|
-
if (ch === "_") continue;
|
|
10877
10903
|
if (!isHexCode(data.charCodeAt(index))) return false;
|
|
10878
10904
|
hasDigits = true;
|
|
10879
10905
|
}
|
|
10880
|
-
return hasDigits &&
|
|
10906
|
+
return hasDigits && Number.isFinite(parseYamlInteger(data));
|
|
10881
10907
|
}
|
|
10882
10908
|
if (ch === "o") {
|
|
10883
10909
|
index++;
|
|
10884
10910
|
for (; index < max; index++) {
|
|
10885
|
-
ch = data[index];
|
|
10886
|
-
if (ch === "_") continue;
|
|
10887
10911
|
if (!isOctCode(data.charCodeAt(index))) return false;
|
|
10888
10912
|
hasDigits = true;
|
|
10889
10913
|
}
|
|
10890
|
-
return hasDigits &&
|
|
10914
|
+
return hasDigits && Number.isFinite(parseYamlInteger(data));
|
|
10891
10915
|
}
|
|
10892
10916
|
}
|
|
10893
|
-
if (ch === "_") return false;
|
|
10894
10917
|
for (; index < max; index++) {
|
|
10895
|
-
ch = data[index];
|
|
10896
|
-
if (ch === "_") continue;
|
|
10897
10918
|
if (!isDecCode(data.charCodeAt(index))) {
|
|
10898
10919
|
return false;
|
|
10899
10920
|
}
|
|
10900
10921
|
hasDigits = true;
|
|
10901
10922
|
}
|
|
10902
|
-
if (!hasDigits
|
|
10903
|
-
return
|
|
10923
|
+
if (!hasDigits) return false;
|
|
10924
|
+
return Number.isFinite(parseYamlInteger(data));
|
|
10904
10925
|
}
|
|
10905
|
-
function
|
|
10906
|
-
|
|
10907
|
-
|
|
10908
|
-
|
|
10909
|
-
}
|
|
10910
|
-
ch = value[0];
|
|
10926
|
+
function parseYamlInteger(data) {
|
|
10927
|
+
let value = data;
|
|
10928
|
+
let sign = 1;
|
|
10929
|
+
let ch = value[0];
|
|
10911
10930
|
if (ch === "-" || ch === "+") {
|
|
10912
10931
|
if (ch === "-") sign = -1;
|
|
10913
10932
|
value = value.slice(1);
|
|
@@ -10921,6 +10940,9 @@ var require_int = __commonJS({
|
|
|
10921
10940
|
}
|
|
10922
10941
|
return sign * parseInt(value, 10);
|
|
10923
10942
|
}
|
|
10943
|
+
function constructYamlInteger(data) {
|
|
10944
|
+
return parseYamlInteger(data);
|
|
10945
|
+
}
|
|
10924
10946
|
function isInteger(object) {
|
|
10925
10947
|
return Object.prototype.toString.call(object) === "[object Number]" && (object % 1 === 0 && !common.isNegativeZero(object));
|
|
10926
10948
|
}
|
|
@@ -10939,7 +10961,6 @@ var require_int = __commonJS({
|
|
|
10939
10961
|
decimal: function(obj) {
|
|
10940
10962
|
return obj.toString(10);
|
|
10941
10963
|
},
|
|
10942
|
-
/* eslint-disable max-len */
|
|
10943
10964
|
hexadecimal: function(obj) {
|
|
10944
10965
|
return obj >= 0 ? "0x" + obj.toString(16).toUpperCase() : "-0x" + obj.toString(16).toUpperCase().slice(1);
|
|
10945
10966
|
}
|
|
@@ -10963,21 +10984,24 @@ var require_float = __commonJS({
|
|
|
10963
10984
|
var Type = require_type();
|
|
10964
10985
|
var YAML_FLOAT_PATTERN = new RegExp(
|
|
10965
10986
|
// 2.5e4, 2.5 and integers
|
|
10966
|
-
"^(?:[-+]?(?:[0-9]
|
|
10987
|
+
"^(?:[-+]?(?:[0-9]+)(?:\\.[0-9]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$"
|
|
10988
|
+
);
|
|
10989
|
+
var YAML_FLOAT_SPECIAL_PATTERN = new RegExp(
|
|
10990
|
+
"^(?:[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$"
|
|
10967
10991
|
);
|
|
10968
10992
|
function resolveYamlFloat(data) {
|
|
10969
10993
|
if (data === null) return false;
|
|
10970
|
-
if (!YAML_FLOAT_PATTERN.test(data)
|
|
10971
|
-
// Probably should update regexp & check speed
|
|
10972
|
-
data[data.length - 1] === "_") {
|
|
10994
|
+
if (!YAML_FLOAT_PATTERN.test(data)) {
|
|
10973
10995
|
return false;
|
|
10974
10996
|
}
|
|
10975
|
-
|
|
10997
|
+
if (Number.isFinite(parseFloat(data, 10))) {
|
|
10998
|
+
return true;
|
|
10999
|
+
}
|
|
11000
|
+
return YAML_FLOAT_SPECIAL_PATTERN.test(data);
|
|
10976
11001
|
}
|
|
10977
11002
|
function constructYamlFloat(data) {
|
|
10978
|
-
|
|
10979
|
-
|
|
10980
|
-
sign = value[0] === "-" ? -1 : 1;
|
|
11003
|
+
let value = data.toLowerCase();
|
|
11004
|
+
const sign = value[0] === "-" ? -1 : 1;
|
|
10981
11005
|
if ("+-".indexOf(value[0]) >= 0) {
|
|
10982
11006
|
value = value.slice(1);
|
|
10983
11007
|
}
|
|
@@ -10990,7 +11014,6 @@ var require_float = __commonJS({
|
|
|
10990
11014
|
}
|
|
10991
11015
|
var SCIENTIFIC_WITHOUT_DOT = /^[-+]?[0-9]+e/;
|
|
10992
11016
|
function representYamlFloat(object, style) {
|
|
10993
|
-
var res;
|
|
10994
11017
|
if (isNaN(object)) {
|
|
10995
11018
|
switch (style) {
|
|
10996
11019
|
case "lowercase":
|
|
@@ -11021,7 +11044,7 @@ var require_float = __commonJS({
|
|
|
11021
11044
|
} else if (common.isNegativeZero(object)) {
|
|
11022
11045
|
return "-0.0";
|
|
11023
11046
|
}
|
|
11024
|
-
res = object.toString(10);
|
|
11047
|
+
const res = object.toString(10);
|
|
11025
11048
|
return SCIENTIFIC_WITHOUT_DOT.test(res) ? res.replace("e", ".e") : res;
|
|
11026
11049
|
}
|
|
11027
11050
|
function isFloat(object) {
|
|
@@ -11079,19 +11102,20 @@ var require_timestamp = __commonJS({
|
|
|
11079
11102
|
return false;
|
|
11080
11103
|
}
|
|
11081
11104
|
function constructYamlTimestamp(data) {
|
|
11082
|
-
|
|
11083
|
-
|
|
11105
|
+
let fraction = 0;
|
|
11106
|
+
let delta = null;
|
|
11107
|
+
let match = YAML_DATE_REGEXP.exec(data);
|
|
11084
11108
|
if (match === null) match = YAML_TIMESTAMP_REGEXP.exec(data);
|
|
11085
11109
|
if (match === null) throw new Error("Date resolve error");
|
|
11086
|
-
year = +match[1];
|
|
11087
|
-
month = +match[2] - 1;
|
|
11088
|
-
day = +match[3];
|
|
11110
|
+
const year = +match[1];
|
|
11111
|
+
const month = +match[2] - 1;
|
|
11112
|
+
const day = +match[3];
|
|
11089
11113
|
if (!match[4]) {
|
|
11090
11114
|
return new Date(Date.UTC(year, month, day));
|
|
11091
11115
|
}
|
|
11092
|
-
hour = +match[4];
|
|
11093
|
-
minute = +match[5];
|
|
11094
|
-
second = +match[6];
|
|
11116
|
+
const hour = +match[4];
|
|
11117
|
+
const minute = +match[5];
|
|
11118
|
+
const second = +match[6];
|
|
11095
11119
|
if (match[7]) {
|
|
11096
11120
|
fraction = match[7].slice(0, 3);
|
|
11097
11121
|
while (fraction.length < 3) {
|
|
@@ -11100,12 +11124,12 @@ var require_timestamp = __commonJS({
|
|
|
11100
11124
|
fraction = +fraction;
|
|
11101
11125
|
}
|
|
11102
11126
|
if (match[9]) {
|
|
11103
|
-
|
|
11104
|
-
|
|
11105
|
-
delta = (
|
|
11127
|
+
const tzHour = +match[10];
|
|
11128
|
+
const tzMinute = +(match[11] || 0);
|
|
11129
|
+
delta = (tzHour * 60 + tzMinute) * 6e4;
|
|
11106
11130
|
if (match[9] === "-") delta = -delta;
|
|
11107
11131
|
}
|
|
11108
|
-
date = new Date(Date.UTC(year, month, day, hour, minute, second, fraction));
|
|
11132
|
+
const date = new Date(Date.UTC(year, month, day, hour, minute, second, fraction));
|
|
11109
11133
|
if (delta) date.setTime(date.getTime() - delta);
|
|
11110
11134
|
return date;
|
|
11111
11135
|
}
|
|
@@ -11145,9 +11169,11 @@ var require_binary = __commonJS({
|
|
|
11145
11169
|
var BASE64_MAP = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\n\r";
|
|
11146
11170
|
function resolveYamlBinary(data) {
|
|
11147
11171
|
if (data === null) return false;
|
|
11148
|
-
|
|
11149
|
-
|
|
11150
|
-
|
|
11172
|
+
let bitlen = 0;
|
|
11173
|
+
const max = data.length;
|
|
11174
|
+
const map = BASE64_MAP;
|
|
11175
|
+
for (let idx = 0; idx < max; idx++) {
|
|
11176
|
+
const code = map.indexOf(data.charAt(idx));
|
|
11151
11177
|
if (code > 64) continue;
|
|
11152
11178
|
if (code < 0) return false;
|
|
11153
11179
|
bitlen += 6;
|
|
@@ -11155,8 +11181,12 @@ var require_binary = __commonJS({
|
|
|
11155
11181
|
return bitlen % 8 === 0;
|
|
11156
11182
|
}
|
|
11157
11183
|
function constructYamlBinary(data) {
|
|
11158
|
-
|
|
11159
|
-
|
|
11184
|
+
const input = data.replace(/[\r\n=]/g, "");
|
|
11185
|
+
const max = input.length;
|
|
11186
|
+
const map = BASE64_MAP;
|
|
11187
|
+
let bits = 0;
|
|
11188
|
+
const result = [];
|
|
11189
|
+
for (let idx = 0; idx < max; idx++) {
|
|
11160
11190
|
if (idx % 4 === 0 && idx) {
|
|
11161
11191
|
result.push(bits >> 16 & 255);
|
|
11162
11192
|
result.push(bits >> 8 & 255);
|
|
@@ -11164,7 +11194,7 @@ var require_binary = __commonJS({
|
|
|
11164
11194
|
}
|
|
11165
11195
|
bits = bits << 6 | map.indexOf(input.charAt(idx));
|
|
11166
11196
|
}
|
|
11167
|
-
tailbits = max % 4 * 6;
|
|
11197
|
+
const tailbits = max % 4 * 6;
|
|
11168
11198
|
if (tailbits === 0) {
|
|
11169
11199
|
result.push(bits >> 16 & 255);
|
|
11170
11200
|
result.push(bits >> 8 & 255);
|
|
@@ -11178,8 +11208,11 @@ var require_binary = __commonJS({
|
|
|
11178
11208
|
return new Uint8Array(result);
|
|
11179
11209
|
}
|
|
11180
11210
|
function representYamlBinary(object) {
|
|
11181
|
-
|
|
11182
|
-
|
|
11211
|
+
let result = "";
|
|
11212
|
+
let bits = 0;
|
|
11213
|
+
const max = object.length;
|
|
11214
|
+
const map = BASE64_MAP;
|
|
11215
|
+
for (let idx = 0; idx < max; idx++) {
|
|
11183
11216
|
if (idx % 3 === 0 && idx) {
|
|
11184
11217
|
result += map[bits >> 18 & 63];
|
|
11185
11218
|
result += map[bits >> 12 & 63];
|
|
@@ -11188,7 +11221,7 @@ var require_binary = __commonJS({
|
|
|
11188
11221
|
}
|
|
11189
11222
|
bits = (bits << 8) + object[idx];
|
|
11190
11223
|
}
|
|
11191
|
-
tail = max % 3;
|
|
11224
|
+
const tail = max % 3;
|
|
11192
11225
|
if (tail === 0) {
|
|
11193
11226
|
result += map[bits >> 18 & 63];
|
|
11194
11227
|
result += map[bits >> 12 & 63];
|
|
@@ -11229,11 +11262,13 @@ var require_omap = __commonJS({
|
|
|
11229
11262
|
var _toString = Object.prototype.toString;
|
|
11230
11263
|
function resolveYamlOmap(data) {
|
|
11231
11264
|
if (data === null) return true;
|
|
11232
|
-
|
|
11233
|
-
|
|
11234
|
-
|
|
11235
|
-
|
|
11265
|
+
const objectKeys2 = [];
|
|
11266
|
+
const object = data;
|
|
11267
|
+
for (let index = 0, length = object.length; index < length; index += 1) {
|
|
11268
|
+
const pair = object[index];
|
|
11269
|
+
let pairHasKey = false;
|
|
11236
11270
|
if (_toString.call(pair) !== "[object Object]") return false;
|
|
11271
|
+
let pairKey;
|
|
11237
11272
|
for (pairKey in pair) {
|
|
11238
11273
|
if (_hasOwnProperty.call(pair, pairKey)) {
|
|
11239
11274
|
if (!pairHasKey) pairHasKey = true;
|
|
@@ -11265,12 +11300,12 @@ var require_pairs = __commonJS({
|
|
|
11265
11300
|
var _toString = Object.prototype.toString;
|
|
11266
11301
|
function resolveYamlPairs(data) {
|
|
11267
11302
|
if (data === null) return true;
|
|
11268
|
-
|
|
11269
|
-
result = new Array(object.length);
|
|
11270
|
-
for (index = 0, length = object.length; index < length; index += 1) {
|
|
11271
|
-
pair = object[index];
|
|
11303
|
+
const object = data;
|
|
11304
|
+
const result = new Array(object.length);
|
|
11305
|
+
for (let index = 0, length = object.length; index < length; index += 1) {
|
|
11306
|
+
const pair = object[index];
|
|
11272
11307
|
if (_toString.call(pair) !== "[object Object]") return false;
|
|
11273
|
-
keys = Object.keys(pair);
|
|
11308
|
+
const keys = Object.keys(pair);
|
|
11274
11309
|
if (keys.length !== 1) return false;
|
|
11275
11310
|
result[index] = [keys[0], pair[keys[0]]];
|
|
11276
11311
|
}
|
|
@@ -11278,11 +11313,11 @@ var require_pairs = __commonJS({
|
|
|
11278
11313
|
}
|
|
11279
11314
|
function constructYamlPairs(data) {
|
|
11280
11315
|
if (data === null) return [];
|
|
11281
|
-
|
|
11282
|
-
result = new Array(object.length);
|
|
11283
|
-
for (index = 0, length = object.length; index < length; index += 1) {
|
|
11284
|
-
pair = object[index];
|
|
11285
|
-
keys = Object.keys(pair);
|
|
11316
|
+
const object = data;
|
|
11317
|
+
const result = new Array(object.length);
|
|
11318
|
+
for (let index = 0, length = object.length; index < length; index += 1) {
|
|
11319
|
+
const pair = object[index];
|
|
11320
|
+
const keys = Object.keys(pair);
|
|
11286
11321
|
result[index] = [keys[0], pair[keys[0]]];
|
|
11287
11322
|
}
|
|
11288
11323
|
return result;
|
|
@@ -11303,8 +11338,8 @@ var require_set = __commonJS({
|
|
|
11303
11338
|
var _hasOwnProperty = Object.prototype.hasOwnProperty;
|
|
11304
11339
|
function resolveYamlSet(data) {
|
|
11305
11340
|
if (data === null) return true;
|
|
11306
|
-
|
|
11307
|
-
for (key in object) {
|
|
11341
|
+
const object = data;
|
|
11342
|
+
for (const key in object) {
|
|
11308
11343
|
if (_hasOwnProperty.call(object, key)) {
|
|
11309
11344
|
if (object[key] !== null) return false;
|
|
11310
11345
|
}
|
|
@@ -11359,31 +11394,30 @@ var require_loader = __commonJS({
|
|
|
11359
11394
|
var CHOMPING_KEEP = 3;
|
|
11360
11395
|
var PATTERN_NON_PRINTABLE = /[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/;
|
|
11361
11396
|
var PATTERN_NON_ASCII_LINE_BREAKS = /[\x85\u2028\u2029]/;
|
|
11362
|
-
var PATTERN_FLOW_INDICATORS = /[,\[\]
|
|
11363
|
-
var PATTERN_TAG_HANDLE = /^(?:!|!!|![
|
|
11364
|
-
var PATTERN_TAG_URI = /^(?:!|[^,\[\]
|
|
11397
|
+
var PATTERN_FLOW_INDICATORS = /[,\[\]{}]/;
|
|
11398
|
+
var PATTERN_TAG_HANDLE = /^(?:!|!!|![0-9A-Za-z-]+!)$/;
|
|
11399
|
+
var PATTERN_TAG_URI = /^(?:!|[^,\[\]{}])(?:%[0-9a-f]{2}|[0-9a-z\-#;/?:@&=+$,_.!~*'()\[\]])*$/i;
|
|
11365
11400
|
function _class(obj) {
|
|
11366
11401
|
return Object.prototype.toString.call(obj);
|
|
11367
11402
|
}
|
|
11368
|
-
function
|
|
11403
|
+
function isEol(c2) {
|
|
11369
11404
|
return c2 === 10 || c2 === 13;
|
|
11370
11405
|
}
|
|
11371
|
-
function
|
|
11406
|
+
function isWhiteSpace(c2) {
|
|
11372
11407
|
return c2 === 9 || c2 === 32;
|
|
11373
11408
|
}
|
|
11374
|
-
function
|
|
11409
|
+
function isWsOrEol(c2) {
|
|
11375
11410
|
return c2 === 9 || c2 === 32 || c2 === 10 || c2 === 13;
|
|
11376
11411
|
}
|
|
11377
|
-
function
|
|
11412
|
+
function isFlowIndicator(c2) {
|
|
11378
11413
|
return c2 === 44 || c2 === 91 || c2 === 93 || c2 === 123 || c2 === 125;
|
|
11379
11414
|
}
|
|
11380
11415
|
function fromHexCode(c2) {
|
|
11381
|
-
|
|
11382
|
-
if (48 <= c2 && c2 <= 57) {
|
|
11416
|
+
if (c2 >= 48 && c2 <= 57) {
|
|
11383
11417
|
return c2 - 48;
|
|
11384
11418
|
}
|
|
11385
|
-
lc = c2 | 32;
|
|
11386
|
-
if (
|
|
11419
|
+
const lc = c2 | 32;
|
|
11420
|
+
if (lc >= 97 && lc <= 102) {
|
|
11387
11421
|
return lc - 97 + 10;
|
|
11388
11422
|
}
|
|
11389
11423
|
return -1;
|
|
@@ -11401,13 +11435,52 @@ var require_loader = __commonJS({
|
|
|
11401
11435
|
return 0;
|
|
11402
11436
|
}
|
|
11403
11437
|
function fromDecimalCode(c2) {
|
|
11404
|
-
if (
|
|
11438
|
+
if (c2 >= 48 && c2 <= 57) {
|
|
11405
11439
|
return c2 - 48;
|
|
11406
11440
|
}
|
|
11407
11441
|
return -1;
|
|
11408
11442
|
}
|
|
11409
11443
|
function simpleEscapeSequence(c2) {
|
|
11410
|
-
|
|
11444
|
+
switch (c2) {
|
|
11445
|
+
case 48:
|
|
11446
|
+
return "\0";
|
|
11447
|
+
case 97:
|
|
11448
|
+
return "\x07";
|
|
11449
|
+
case 98:
|
|
11450
|
+
return "\b";
|
|
11451
|
+
case 116:
|
|
11452
|
+
return " ";
|
|
11453
|
+
case 9:
|
|
11454
|
+
return " ";
|
|
11455
|
+
case 110:
|
|
11456
|
+
return "\n";
|
|
11457
|
+
case 118:
|
|
11458
|
+
return "\v";
|
|
11459
|
+
case 102:
|
|
11460
|
+
return "\f";
|
|
11461
|
+
case 114:
|
|
11462
|
+
return "\r";
|
|
11463
|
+
case 101:
|
|
11464
|
+
return "\x1B";
|
|
11465
|
+
case 32:
|
|
11466
|
+
return " ";
|
|
11467
|
+
case 34:
|
|
11468
|
+
return '"';
|
|
11469
|
+
case 47:
|
|
11470
|
+
return "/";
|
|
11471
|
+
case 92:
|
|
11472
|
+
return "\\";
|
|
11473
|
+
case 78:
|
|
11474
|
+
return "\x85";
|
|
11475
|
+
case 95:
|
|
11476
|
+
return "\xA0";
|
|
11477
|
+
case 76:
|
|
11478
|
+
return "\u2028";
|
|
11479
|
+
case 80:
|
|
11480
|
+
return "\u2029";
|
|
11481
|
+
default:
|
|
11482
|
+
return "";
|
|
11483
|
+
}
|
|
11411
11484
|
}
|
|
11412
11485
|
function charFromCodepoint(c2) {
|
|
11413
11486
|
if (c2 <= 65535) {
|
|
@@ -11432,11 +11505,10 @@ var require_loader = __commonJS({
|
|
|
11432
11505
|
}
|
|
11433
11506
|
var simpleEscapeCheck = new Array(256);
|
|
11434
11507
|
var simpleEscapeMap = new Array(256);
|
|
11435
|
-
for (i2 = 0; i2 < 256; i2++) {
|
|
11508
|
+
for (let i2 = 0; i2 < 256; i2++) {
|
|
11436
11509
|
simpleEscapeCheck[i2] = simpleEscapeSequence(i2) ? 1 : 0;
|
|
11437
11510
|
simpleEscapeMap[i2] = simpleEscapeSequence(i2);
|
|
11438
11511
|
}
|
|
11439
|
-
var i2;
|
|
11440
11512
|
function State(input, options) {
|
|
11441
11513
|
this.input = input;
|
|
11442
11514
|
this.filename = options["filename"] || null;
|
|
@@ -11445,6 +11517,8 @@ var require_loader = __commonJS({
|
|
|
11445
11517
|
this.legacy = options["legacy"] || false;
|
|
11446
11518
|
this.json = options["json"] || false;
|
|
11447
11519
|
this.listener = options["listener"] || null;
|
|
11520
|
+
this.maxDepth = typeof options["maxDepth"] === "number" ? options["maxDepth"] : 100;
|
|
11521
|
+
this.maxMergeSeqLength = typeof options["maxMergeSeqLength"] === "number" ? options["maxMergeSeqLength"] : 20;
|
|
11448
11522
|
this.implicitTypes = this.schema.compiledImplicit;
|
|
11449
11523
|
this.typeMap = this.schema.compiledTypeMap;
|
|
11450
11524
|
this.length = input.length;
|
|
@@ -11452,11 +11526,13 @@ var require_loader = __commonJS({
|
|
|
11452
11526
|
this.line = 0;
|
|
11453
11527
|
this.lineStart = 0;
|
|
11454
11528
|
this.lineIndent = 0;
|
|
11529
|
+
this.depth = 0;
|
|
11455
11530
|
this.firstTabInLine = -1;
|
|
11456
11531
|
this.documents = [];
|
|
11532
|
+
this.anchorMapTransactions = [];
|
|
11457
11533
|
}
|
|
11458
11534
|
function generateError(state, message2) {
|
|
11459
|
-
|
|
11535
|
+
const mark = {
|
|
11460
11536
|
name: state.filename,
|
|
11461
11537
|
buffer: state.input.slice(0, -1),
|
|
11462
11538
|
// omit trailing \0
|
|
@@ -11475,21 +11551,85 @@ var require_loader = __commonJS({
|
|
|
11475
11551
|
state.onWarning.call(null, generateError(state, message2));
|
|
11476
11552
|
}
|
|
11477
11553
|
}
|
|
11554
|
+
function storeAnchor(state, name, value) {
|
|
11555
|
+
const transactions = state.anchorMapTransactions;
|
|
11556
|
+
if (transactions.length !== 0) {
|
|
11557
|
+
const transaction = transactions[transactions.length - 1];
|
|
11558
|
+
if (!_hasOwnProperty.call(transaction, name)) {
|
|
11559
|
+
transaction[name] = {
|
|
11560
|
+
existed: _hasOwnProperty.call(state.anchorMap, name),
|
|
11561
|
+
value: state.anchorMap[name]
|
|
11562
|
+
};
|
|
11563
|
+
}
|
|
11564
|
+
}
|
|
11565
|
+
state.anchorMap[name] = value;
|
|
11566
|
+
}
|
|
11567
|
+
function beginAnchorTransaction(state) {
|
|
11568
|
+
state.anchorMapTransactions.push(/* @__PURE__ */ Object.create(null));
|
|
11569
|
+
}
|
|
11570
|
+
function commitAnchorTransaction(state) {
|
|
11571
|
+
const transaction = state.anchorMapTransactions.pop();
|
|
11572
|
+
const transactions = state.anchorMapTransactions;
|
|
11573
|
+
if (transactions.length === 0) return;
|
|
11574
|
+
const parent = transactions[transactions.length - 1];
|
|
11575
|
+
const names = Object.keys(transaction);
|
|
11576
|
+
for (let index = 0, length = names.length; index < length; index += 1) {
|
|
11577
|
+
const name = names[index];
|
|
11578
|
+
if (!_hasOwnProperty.call(parent, name)) {
|
|
11579
|
+
parent[name] = transaction[name];
|
|
11580
|
+
}
|
|
11581
|
+
}
|
|
11582
|
+
}
|
|
11583
|
+
function rollbackAnchorTransaction(state) {
|
|
11584
|
+
const transaction = state.anchorMapTransactions.pop();
|
|
11585
|
+
const names = Object.keys(transaction);
|
|
11586
|
+
for (let index = names.length - 1; index >= 0; index -= 1) {
|
|
11587
|
+
const entry = transaction[names[index]];
|
|
11588
|
+
if (entry.existed) {
|
|
11589
|
+
state.anchorMap[names[index]] = entry.value;
|
|
11590
|
+
} else {
|
|
11591
|
+
delete state.anchorMap[names[index]];
|
|
11592
|
+
}
|
|
11593
|
+
}
|
|
11594
|
+
}
|
|
11595
|
+
function snapshotState(state) {
|
|
11596
|
+
return {
|
|
11597
|
+
position: state.position,
|
|
11598
|
+
line: state.line,
|
|
11599
|
+
lineStart: state.lineStart,
|
|
11600
|
+
lineIndent: state.lineIndent,
|
|
11601
|
+
firstTabInLine: state.firstTabInLine,
|
|
11602
|
+
tag: state.tag,
|
|
11603
|
+
anchor: state.anchor,
|
|
11604
|
+
kind: state.kind,
|
|
11605
|
+
result: state.result
|
|
11606
|
+
};
|
|
11607
|
+
}
|
|
11608
|
+
function restoreState(state, snapshot) {
|
|
11609
|
+
state.position = snapshot.position;
|
|
11610
|
+
state.line = snapshot.line;
|
|
11611
|
+
state.lineStart = snapshot.lineStart;
|
|
11612
|
+
state.lineIndent = snapshot.lineIndent;
|
|
11613
|
+
state.firstTabInLine = snapshot.firstTabInLine;
|
|
11614
|
+
state.tag = snapshot.tag;
|
|
11615
|
+
state.anchor = snapshot.anchor;
|
|
11616
|
+
state.kind = snapshot.kind;
|
|
11617
|
+
state.result = snapshot.result;
|
|
11618
|
+
}
|
|
11478
11619
|
var directiveHandlers = {
|
|
11479
11620
|
YAML: function handleYamlDirective(state, name, args) {
|
|
11480
|
-
var match, major, minor;
|
|
11481
11621
|
if (state.version !== null) {
|
|
11482
11622
|
throwError(state, "duplication of %YAML directive");
|
|
11483
11623
|
}
|
|
11484
11624
|
if (args.length !== 1) {
|
|
11485
11625
|
throwError(state, "YAML directive accepts exactly one argument");
|
|
11486
11626
|
}
|
|
11487
|
-
match = /^([0-9]+)\.([0-9]+)$/.exec(args[0]);
|
|
11627
|
+
const match = /^([0-9]+)\.([0-9]+)$/.exec(args[0]);
|
|
11488
11628
|
if (match === null) {
|
|
11489
11629
|
throwError(state, "ill-formed argument of the YAML directive");
|
|
11490
11630
|
}
|
|
11491
|
-
major = parseInt(match[1], 10);
|
|
11492
|
-
minor = parseInt(match[2], 10);
|
|
11631
|
+
const major = parseInt(match[1], 10);
|
|
11632
|
+
const minor = parseInt(match[2], 10);
|
|
11493
11633
|
if (major !== 1) {
|
|
11494
11634
|
throwError(state, "unacceptable YAML version of the document");
|
|
11495
11635
|
}
|
|
@@ -11500,11 +11640,11 @@ var require_loader = __commonJS({
|
|
|
11500
11640
|
}
|
|
11501
11641
|
},
|
|
11502
11642
|
TAG: function handleTagDirective(state, name, args) {
|
|
11503
|
-
|
|
11643
|
+
let prefix2;
|
|
11504
11644
|
if (args.length !== 2) {
|
|
11505
11645
|
throwError(state, "TAG directive accepts exactly two arguments");
|
|
11506
11646
|
}
|
|
11507
|
-
handle = args[0];
|
|
11647
|
+
const handle = args[0];
|
|
11508
11648
|
prefix2 = args[1];
|
|
11509
11649
|
if (!PATTERN_TAG_HANDLE.test(handle)) {
|
|
11510
11650
|
throwError(state, "ill-formed tag handle (first argument) of the TAG directive");
|
|
@@ -11524,13 +11664,12 @@ var require_loader = __commonJS({
|
|
|
11524
11664
|
}
|
|
11525
11665
|
};
|
|
11526
11666
|
function captureSegment(state, start, end, checkJson) {
|
|
11527
|
-
var _position, _length, _character, _result;
|
|
11528
11667
|
if (start < end) {
|
|
11529
|
-
_result = state.input.slice(start, end);
|
|
11668
|
+
const _result = state.input.slice(start, end);
|
|
11530
11669
|
if (checkJson) {
|
|
11531
|
-
for (_position = 0, _length = _result.length; _position < _length; _position += 1) {
|
|
11532
|
-
_character = _result.charCodeAt(_position);
|
|
11533
|
-
if (!(_character === 9 ||
|
|
11670
|
+
for (let _position = 0, _length = _result.length; _position < _length; _position += 1) {
|
|
11671
|
+
const _character = _result.charCodeAt(_position);
|
|
11672
|
+
if (!(_character === 9 || _character >= 32 && _character <= 1114111)) {
|
|
11534
11673
|
throwError(state, "expected valid JSON character");
|
|
11535
11674
|
}
|
|
11536
11675
|
}
|
|
@@ -11541,13 +11680,12 @@ var require_loader = __commonJS({
|
|
|
11541
11680
|
}
|
|
11542
11681
|
}
|
|
11543
11682
|
function mergeMappings(state, destination, source, overridableKeys) {
|
|
11544
|
-
var sourceKeys, key, index, quantity;
|
|
11545
11683
|
if (!common.isObject(source)) {
|
|
11546
11684
|
throwError(state, "cannot merge mappings; the provided source object is unacceptable");
|
|
11547
11685
|
}
|
|
11548
|
-
sourceKeys = Object.keys(source);
|
|
11549
|
-
for (index = 0, quantity = sourceKeys.length; index < quantity; index += 1) {
|
|
11550
|
-
key = sourceKeys[index];
|
|
11686
|
+
const sourceKeys = Object.keys(source);
|
|
11687
|
+
for (let index = 0, quantity = sourceKeys.length; index < quantity; index += 1) {
|
|
11688
|
+
const key = sourceKeys[index];
|
|
11551
11689
|
if (!_hasOwnProperty.call(destination, key)) {
|
|
11552
11690
|
setProperty(destination, key, source[key]);
|
|
11553
11691
|
overridableKeys[key] = true;
|
|
@@ -11555,10 +11693,9 @@ var require_loader = __commonJS({
|
|
|
11555
11693
|
}
|
|
11556
11694
|
}
|
|
11557
11695
|
function storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, valueNode, startLine, startLineStart, startPos) {
|
|
11558
|
-
var index, quantity;
|
|
11559
11696
|
if (Array.isArray(keyNode)) {
|
|
11560
11697
|
keyNode = Array.prototype.slice.call(keyNode);
|
|
11561
|
-
for (index = 0, quantity = keyNode.length; index < quantity; index += 1) {
|
|
11698
|
+
for (let index = 0, quantity = keyNode.length; index < quantity; index += 1) {
|
|
11562
11699
|
if (Array.isArray(keyNode[index])) {
|
|
11563
11700
|
throwError(state, "nested arrays are not supported inside keys");
|
|
11564
11701
|
}
|
|
@@ -11576,8 +11713,15 @@ var require_loader = __commonJS({
|
|
|
11576
11713
|
}
|
|
11577
11714
|
if (keyTag === "tag:yaml.org,2002:merge") {
|
|
11578
11715
|
if (Array.isArray(valueNode)) {
|
|
11579
|
-
|
|
11580
|
-
|
|
11716
|
+
if (valueNode.length > state.maxMergeSeqLength) {
|
|
11717
|
+
throwError(state, "merge sequence length exceeded maxMergeSeqLength (" + state.maxMergeSeqLength + ")");
|
|
11718
|
+
}
|
|
11719
|
+
const seen = /* @__PURE__ */ new Set();
|
|
11720
|
+
for (let index = 0, quantity = valueNode.length; index < quantity; index += 1) {
|
|
11721
|
+
const src = valueNode[index];
|
|
11722
|
+
if (seen.has(src)) continue;
|
|
11723
|
+
seen.add(src);
|
|
11724
|
+
mergeMappings(state, _result, src, overridableKeys);
|
|
11581
11725
|
}
|
|
11582
11726
|
} else {
|
|
11583
11727
|
mergeMappings(state, _result, valueNode, overridableKeys);
|
|
@@ -11595,8 +11739,7 @@ var require_loader = __commonJS({
|
|
|
11595
11739
|
return _result;
|
|
11596
11740
|
}
|
|
11597
11741
|
function readLineBreak(state) {
|
|
11598
|
-
|
|
11599
|
-
ch = state.input.charCodeAt(state.position);
|
|
11742
|
+
const ch = state.input.charCodeAt(state.position);
|
|
11600
11743
|
if (ch === 10) {
|
|
11601
11744
|
state.position++;
|
|
11602
11745
|
} else if (ch === 13) {
|
|
@@ -11612,9 +11755,10 @@ var require_loader = __commonJS({
|
|
|
11612
11755
|
state.firstTabInLine = -1;
|
|
11613
11756
|
}
|
|
11614
11757
|
function skipSeparationSpace(state, allowComments, checkIndent) {
|
|
11615
|
-
|
|
11758
|
+
let lineBreaks = 0;
|
|
11759
|
+
let ch = state.input.charCodeAt(state.position);
|
|
11616
11760
|
while (ch !== 0) {
|
|
11617
|
-
while (
|
|
11761
|
+
while (isWhiteSpace(ch)) {
|
|
11618
11762
|
if (ch === 9 && state.firstTabInLine === -1) {
|
|
11619
11763
|
state.firstTabInLine = state.position;
|
|
11620
11764
|
}
|
|
@@ -11625,7 +11769,7 @@ var require_loader = __commonJS({
|
|
|
11625
11769
|
ch = state.input.charCodeAt(++state.position);
|
|
11626
11770
|
} while (ch !== 10 && ch !== 13 && ch !== 0);
|
|
11627
11771
|
}
|
|
11628
|
-
if (
|
|
11772
|
+
if (isEol(ch)) {
|
|
11629
11773
|
readLineBreak(state);
|
|
11630
11774
|
ch = state.input.charCodeAt(state.position);
|
|
11631
11775
|
lineBreaks++;
|
|
@@ -11644,12 +11788,12 @@ var require_loader = __commonJS({
|
|
|
11644
11788
|
return lineBreaks;
|
|
11645
11789
|
}
|
|
11646
11790
|
function testDocumentSeparator(state) {
|
|
11647
|
-
|
|
11648
|
-
ch = state.input.charCodeAt(_position);
|
|
11791
|
+
let _position = state.position;
|
|
11792
|
+
let ch = state.input.charCodeAt(_position);
|
|
11649
11793
|
if ((ch === 45 || ch === 46) && ch === state.input.charCodeAt(_position + 1) && ch === state.input.charCodeAt(_position + 2)) {
|
|
11650
11794
|
_position += 3;
|
|
11651
11795
|
ch = state.input.charCodeAt(_position);
|
|
11652
|
-
if (ch === 0 ||
|
|
11796
|
+
if (ch === 0 || isWsOrEol(ch)) {
|
|
11653
11797
|
return true;
|
|
11654
11798
|
}
|
|
11655
11799
|
}
|
|
@@ -11663,14 +11807,21 @@ var require_loader = __commonJS({
|
|
|
11663
11807
|
}
|
|
11664
11808
|
}
|
|
11665
11809
|
function readPlainScalar(state, nodeIndent, withinFlowCollection) {
|
|
11666
|
-
|
|
11667
|
-
|
|
11668
|
-
|
|
11810
|
+
let captureStart;
|
|
11811
|
+
let captureEnd;
|
|
11812
|
+
let hasPendingContent;
|
|
11813
|
+
let _line;
|
|
11814
|
+
let _lineStart;
|
|
11815
|
+
let _lineIndent;
|
|
11816
|
+
const _kind = state.kind;
|
|
11817
|
+
const _result = state.result;
|
|
11818
|
+
let ch = state.input.charCodeAt(state.position);
|
|
11819
|
+
if (isWsOrEol(ch) || isFlowIndicator(ch) || ch === 35 || ch === 38 || ch === 42 || ch === 33 || ch === 124 || ch === 62 || ch === 39 || ch === 34 || ch === 37 || ch === 64 || ch === 96) {
|
|
11669
11820
|
return false;
|
|
11670
11821
|
}
|
|
11671
11822
|
if (ch === 63 || ch === 45) {
|
|
11672
|
-
following = state.input.charCodeAt(state.position + 1);
|
|
11673
|
-
if (
|
|
11823
|
+
const following = state.input.charCodeAt(state.position + 1);
|
|
11824
|
+
if (isWsOrEol(following) || withinFlowCollection && isFlowIndicator(following)) {
|
|
11674
11825
|
return false;
|
|
11675
11826
|
}
|
|
11676
11827
|
}
|
|
@@ -11680,18 +11831,18 @@ var require_loader = __commonJS({
|
|
|
11680
11831
|
hasPendingContent = false;
|
|
11681
11832
|
while (ch !== 0) {
|
|
11682
11833
|
if (ch === 58) {
|
|
11683
|
-
following = state.input.charCodeAt(state.position + 1);
|
|
11684
|
-
if (
|
|
11834
|
+
const following = state.input.charCodeAt(state.position + 1);
|
|
11835
|
+
if (isWsOrEol(following) || withinFlowCollection && isFlowIndicator(following)) {
|
|
11685
11836
|
break;
|
|
11686
11837
|
}
|
|
11687
11838
|
} else if (ch === 35) {
|
|
11688
|
-
preceding = state.input.charCodeAt(state.position - 1);
|
|
11689
|
-
if (
|
|
11839
|
+
const preceding = state.input.charCodeAt(state.position - 1);
|
|
11840
|
+
if (isWsOrEol(preceding)) {
|
|
11690
11841
|
break;
|
|
11691
11842
|
}
|
|
11692
|
-
} else if (state.position === state.lineStart && testDocumentSeparator(state) || withinFlowCollection &&
|
|
11843
|
+
} else if (state.position === state.lineStart && testDocumentSeparator(state) || withinFlowCollection && isFlowIndicator(ch)) {
|
|
11693
11844
|
break;
|
|
11694
|
-
} else if (
|
|
11845
|
+
} else if (isEol(ch)) {
|
|
11695
11846
|
_line = state.line;
|
|
11696
11847
|
_lineStart = state.lineStart;
|
|
11697
11848
|
_lineIndent = state.lineIndent;
|
|
@@ -11714,7 +11865,7 @@ var require_loader = __commonJS({
|
|
|
11714
11865
|
captureStart = captureEnd = state.position;
|
|
11715
11866
|
hasPendingContent = false;
|
|
11716
11867
|
}
|
|
11717
|
-
if (!
|
|
11868
|
+
if (!isWhiteSpace(ch)) {
|
|
11718
11869
|
captureEnd = state.position + 1;
|
|
11719
11870
|
}
|
|
11720
11871
|
ch = state.input.charCodeAt(++state.position);
|
|
@@ -11728,8 +11879,9 @@ var require_loader = __commonJS({
|
|
|
11728
11879
|
return false;
|
|
11729
11880
|
}
|
|
11730
11881
|
function readSingleQuotedScalar(state, nodeIndent) {
|
|
11731
|
-
|
|
11732
|
-
|
|
11882
|
+
let captureStart;
|
|
11883
|
+
let captureEnd;
|
|
11884
|
+
let ch = state.input.charCodeAt(state.position);
|
|
11733
11885
|
if (ch !== 39) {
|
|
11734
11886
|
return false;
|
|
11735
11887
|
}
|
|
@@ -11748,7 +11900,7 @@ var require_loader = __commonJS({
|
|
|
11748
11900
|
} else {
|
|
11749
11901
|
return true;
|
|
11750
11902
|
}
|
|
11751
|
-
} else if (
|
|
11903
|
+
} else if (isEol(ch)) {
|
|
11752
11904
|
captureSegment(state, captureStart, captureEnd, true);
|
|
11753
11905
|
writeFoldedLines(state, skipSeparationSpace(state, false, nodeIndent));
|
|
11754
11906
|
captureStart = captureEnd = state.position;
|
|
@@ -11756,14 +11908,18 @@ var require_loader = __commonJS({
|
|
|
11756
11908
|
throwError(state, "unexpected end of the document within a single quoted scalar");
|
|
11757
11909
|
} else {
|
|
11758
11910
|
state.position++;
|
|
11759
|
-
|
|
11911
|
+
if (!isWhiteSpace(ch)) {
|
|
11912
|
+
captureEnd = state.position;
|
|
11913
|
+
}
|
|
11760
11914
|
}
|
|
11761
11915
|
}
|
|
11762
11916
|
throwError(state, "unexpected end of the stream within a single quoted scalar");
|
|
11763
11917
|
}
|
|
11764
11918
|
function readDoubleQuotedScalar(state, nodeIndent) {
|
|
11765
|
-
|
|
11766
|
-
|
|
11919
|
+
let captureStart;
|
|
11920
|
+
let captureEnd;
|
|
11921
|
+
let tmp;
|
|
11922
|
+
let ch = state.input.charCodeAt(state.position);
|
|
11767
11923
|
if (ch !== 34) {
|
|
11768
11924
|
return false;
|
|
11769
11925
|
}
|
|
@@ -11779,14 +11935,14 @@ var require_loader = __commonJS({
|
|
|
11779
11935
|
} else if (ch === 92) {
|
|
11780
11936
|
captureSegment(state, captureStart, state.position, true);
|
|
11781
11937
|
ch = state.input.charCodeAt(++state.position);
|
|
11782
|
-
if (
|
|
11938
|
+
if (isEol(ch)) {
|
|
11783
11939
|
skipSeparationSpace(state, false, nodeIndent);
|
|
11784
11940
|
} else if (ch < 256 && simpleEscapeCheck[ch]) {
|
|
11785
11941
|
state.result += simpleEscapeMap[ch];
|
|
11786
11942
|
state.position++;
|
|
11787
11943
|
} else if ((tmp = escapedHexLen(ch)) > 0) {
|
|
11788
|
-
hexLength = tmp;
|
|
11789
|
-
hexResult = 0;
|
|
11944
|
+
let hexLength = tmp;
|
|
11945
|
+
let hexResult = 0;
|
|
11790
11946
|
for (; hexLength > 0; hexLength--) {
|
|
11791
11947
|
ch = state.input.charCodeAt(++state.position);
|
|
11792
11948
|
if ((tmp = fromHexCode(ch)) >= 0) {
|
|
@@ -11801,7 +11957,7 @@ var require_loader = __commonJS({
|
|
|
11801
11957
|
throwError(state, "unknown escape sequence");
|
|
11802
11958
|
}
|
|
11803
11959
|
captureStart = captureEnd = state.position;
|
|
11804
|
-
} else if (
|
|
11960
|
+
} else if (isEol(ch)) {
|
|
11805
11961
|
captureSegment(state, captureStart, captureEnd, true);
|
|
11806
11962
|
writeFoldedLines(state, skipSeparationSpace(state, false, nodeIndent));
|
|
11807
11963
|
captureStart = captureEnd = state.position;
|
|
@@ -11809,14 +11965,30 @@ var require_loader = __commonJS({
|
|
|
11809
11965
|
throwError(state, "unexpected end of the document within a double quoted scalar");
|
|
11810
11966
|
} else {
|
|
11811
11967
|
state.position++;
|
|
11812
|
-
|
|
11968
|
+
if (!isWhiteSpace(ch)) {
|
|
11969
|
+
captureEnd = state.position;
|
|
11970
|
+
}
|
|
11813
11971
|
}
|
|
11814
11972
|
}
|
|
11815
11973
|
throwError(state, "unexpected end of the stream within a double quoted scalar");
|
|
11816
11974
|
}
|
|
11817
11975
|
function readFlowCollection(state, nodeIndent) {
|
|
11818
|
-
|
|
11819
|
-
|
|
11976
|
+
let readNext = true;
|
|
11977
|
+
let _line;
|
|
11978
|
+
let _lineStart;
|
|
11979
|
+
let _pos;
|
|
11980
|
+
const _tag = state.tag;
|
|
11981
|
+
let _result;
|
|
11982
|
+
const _anchor = state.anchor;
|
|
11983
|
+
let terminator;
|
|
11984
|
+
let isPair;
|
|
11985
|
+
let isExplicitPair;
|
|
11986
|
+
let isMapping;
|
|
11987
|
+
const overridableKeys = /* @__PURE__ */ Object.create(null);
|
|
11988
|
+
let keyNode;
|
|
11989
|
+
let keyTag;
|
|
11990
|
+
let valueNode;
|
|
11991
|
+
let ch = state.input.charCodeAt(state.position);
|
|
11820
11992
|
if (ch === 91) {
|
|
11821
11993
|
terminator = 93;
|
|
11822
11994
|
isMapping = false;
|
|
@@ -11829,7 +12001,7 @@ var require_loader = __commonJS({
|
|
|
11829
12001
|
return false;
|
|
11830
12002
|
}
|
|
11831
12003
|
if (state.anchor !== null) {
|
|
11832
|
-
state
|
|
12004
|
+
storeAnchor(state, state.anchor, _result);
|
|
11833
12005
|
}
|
|
11834
12006
|
ch = state.input.charCodeAt(++state.position);
|
|
11835
12007
|
while (ch !== 0) {
|
|
@@ -11850,8 +12022,8 @@ var require_loader = __commonJS({
|
|
|
11850
12022
|
keyTag = keyNode = valueNode = null;
|
|
11851
12023
|
isPair = isExplicitPair = false;
|
|
11852
12024
|
if (ch === 63) {
|
|
11853
|
-
following = state.input.charCodeAt(state.position + 1);
|
|
11854
|
-
if (
|
|
12025
|
+
const following = state.input.charCodeAt(state.position + 1);
|
|
12026
|
+
if (isWsOrEol(following)) {
|
|
11855
12027
|
isPair = isExplicitPair = true;
|
|
11856
12028
|
state.position++;
|
|
11857
12029
|
skipSeparationSpace(state, true, nodeIndent);
|
|
@@ -11891,8 +12063,15 @@ var require_loader = __commonJS({
|
|
|
11891
12063
|
throwError(state, "unexpected end of the stream within a flow collection");
|
|
11892
12064
|
}
|
|
11893
12065
|
function readBlockScalar(state, nodeIndent) {
|
|
11894
|
-
|
|
11895
|
-
|
|
12066
|
+
let folding;
|
|
12067
|
+
let chomping = CHOMPING_CLIP;
|
|
12068
|
+
let didReadContent = false;
|
|
12069
|
+
let detectedIndent = false;
|
|
12070
|
+
let textIndent = nodeIndent;
|
|
12071
|
+
let emptyLines = 0;
|
|
12072
|
+
let atMoreIndented = false;
|
|
12073
|
+
let tmp;
|
|
12074
|
+
let ch = state.input.charCodeAt(state.position);
|
|
11896
12075
|
if (ch === 124) {
|
|
11897
12076
|
folding = false;
|
|
11898
12077
|
} else if (ch === 62) {
|
|
@@ -11923,14 +12102,14 @@ var require_loader = __commonJS({
|
|
|
11923
12102
|
break;
|
|
11924
12103
|
}
|
|
11925
12104
|
}
|
|
11926
|
-
if (
|
|
12105
|
+
if (isWhiteSpace(ch)) {
|
|
11927
12106
|
do {
|
|
11928
12107
|
ch = state.input.charCodeAt(++state.position);
|
|
11929
|
-
} while (
|
|
12108
|
+
} while (isWhiteSpace(ch));
|
|
11930
12109
|
if (ch === 35) {
|
|
11931
12110
|
do {
|
|
11932
12111
|
ch = state.input.charCodeAt(++state.position);
|
|
11933
|
-
} while (!
|
|
12112
|
+
} while (!isEol(ch) && ch !== 0);
|
|
11934
12113
|
}
|
|
11935
12114
|
}
|
|
11936
12115
|
while (ch !== 0) {
|
|
@@ -11944,10 +12123,13 @@ var require_loader = __commonJS({
|
|
|
11944
12123
|
if (!detectedIndent && state.lineIndent > textIndent) {
|
|
11945
12124
|
textIndent = state.lineIndent;
|
|
11946
12125
|
}
|
|
11947
|
-
if (
|
|
12126
|
+
if (isEol(ch)) {
|
|
11948
12127
|
emptyLines++;
|
|
11949
12128
|
continue;
|
|
11950
12129
|
}
|
|
12130
|
+
if (!detectedIndent && textIndent === 0) {
|
|
12131
|
+
throwError(state, "missing indentation for block scalar");
|
|
12132
|
+
}
|
|
11951
12133
|
if (state.lineIndent < textIndent) {
|
|
11952
12134
|
if (chomping === CHOMPING_KEEP) {
|
|
11953
12135
|
state.result += common.repeat("\n", didReadContent ? 1 + emptyLines : emptyLines);
|
|
@@ -11959,7 +12141,7 @@ var require_loader = __commonJS({
|
|
|
11959
12141
|
break;
|
|
11960
12142
|
}
|
|
11961
12143
|
if (folding) {
|
|
11962
|
-
if (
|
|
12144
|
+
if (isWhiteSpace(ch)) {
|
|
11963
12145
|
atMoreIndented = true;
|
|
11964
12146
|
state.result += common.repeat("\n", didReadContent ? 1 + emptyLines : emptyLines);
|
|
11965
12147
|
} else if (atMoreIndented) {
|
|
@@ -11978,8 +12160,8 @@ var require_loader = __commonJS({
|
|
|
11978
12160
|
didReadContent = true;
|
|
11979
12161
|
detectedIndent = true;
|
|
11980
12162
|
emptyLines = 0;
|
|
11981
|
-
captureStart = state.position;
|
|
11982
|
-
while (!
|
|
12163
|
+
const captureStart = state.position;
|
|
12164
|
+
while (!isEol(ch) && ch !== 0) {
|
|
11983
12165
|
ch = state.input.charCodeAt(++state.position);
|
|
11984
12166
|
}
|
|
11985
12167
|
captureSegment(state, captureStart, state.position, false);
|
|
@@ -11987,12 +12169,15 @@ var require_loader = __commonJS({
|
|
|
11987
12169
|
return true;
|
|
11988
12170
|
}
|
|
11989
12171
|
function readBlockSequence(state, nodeIndent) {
|
|
11990
|
-
|
|
12172
|
+
const _tag = state.tag;
|
|
12173
|
+
const _anchor = state.anchor;
|
|
12174
|
+
const _result = [];
|
|
12175
|
+
let detected = false;
|
|
11991
12176
|
if (state.firstTabInLine !== -1) return false;
|
|
11992
12177
|
if (state.anchor !== null) {
|
|
11993
|
-
state
|
|
12178
|
+
storeAnchor(state, state.anchor, _result);
|
|
11994
12179
|
}
|
|
11995
|
-
ch = state.input.charCodeAt(state.position);
|
|
12180
|
+
let ch = state.input.charCodeAt(state.position);
|
|
11996
12181
|
while (ch !== 0) {
|
|
11997
12182
|
if (state.firstTabInLine !== -1) {
|
|
11998
12183
|
state.position = state.firstTabInLine;
|
|
@@ -12001,8 +12186,8 @@ var require_loader = __commonJS({
|
|
|
12001
12186
|
if (ch !== 45) {
|
|
12002
12187
|
break;
|
|
12003
12188
|
}
|
|
12004
|
-
following = state.input.charCodeAt(state.position + 1);
|
|
12005
|
-
if (!
|
|
12189
|
+
const following = state.input.charCodeAt(state.position + 1);
|
|
12190
|
+
if (!isWsOrEol(following)) {
|
|
12006
12191
|
break;
|
|
12007
12192
|
}
|
|
12008
12193
|
detected = true;
|
|
@@ -12014,7 +12199,7 @@ var require_loader = __commonJS({
|
|
|
12014
12199
|
continue;
|
|
12015
12200
|
}
|
|
12016
12201
|
}
|
|
12017
|
-
_line = state.line;
|
|
12202
|
+
const _line = state.line;
|
|
12018
12203
|
composeNode(state, nodeIndent, CONTEXT_BLOCK_IN, false, true);
|
|
12019
12204
|
_result.push(state.result);
|
|
12020
12205
|
skipSeparationSpace(state, true, -1);
|
|
@@ -12035,20 +12220,32 @@ var require_loader = __commonJS({
|
|
|
12035
12220
|
return false;
|
|
12036
12221
|
}
|
|
12037
12222
|
function readBlockMapping(state, nodeIndent, flowIndent) {
|
|
12038
|
-
|
|
12223
|
+
let allowCompact;
|
|
12224
|
+
let _keyLine;
|
|
12225
|
+
let _keyLineStart;
|
|
12226
|
+
let _keyPos;
|
|
12227
|
+
const _tag = state.tag;
|
|
12228
|
+
const _anchor = state.anchor;
|
|
12229
|
+
const _result = {};
|
|
12230
|
+
const overridableKeys = /* @__PURE__ */ Object.create(null);
|
|
12231
|
+
let keyTag = null;
|
|
12232
|
+
let keyNode = null;
|
|
12233
|
+
let valueNode = null;
|
|
12234
|
+
let atExplicitKey = false;
|
|
12235
|
+
let detected = false;
|
|
12039
12236
|
if (state.firstTabInLine !== -1) return false;
|
|
12040
12237
|
if (state.anchor !== null) {
|
|
12041
|
-
state
|
|
12238
|
+
storeAnchor(state, state.anchor, _result);
|
|
12042
12239
|
}
|
|
12043
|
-
ch = state.input.charCodeAt(state.position);
|
|
12240
|
+
let ch = state.input.charCodeAt(state.position);
|
|
12044
12241
|
while (ch !== 0) {
|
|
12045
12242
|
if (!atExplicitKey && state.firstTabInLine !== -1) {
|
|
12046
12243
|
state.position = state.firstTabInLine;
|
|
12047
12244
|
throwError(state, "tab characters must not be used in indentation");
|
|
12048
12245
|
}
|
|
12049
|
-
following = state.input.charCodeAt(state.position + 1);
|
|
12050
|
-
_line = state.line;
|
|
12051
|
-
if ((ch === 63 || ch === 58) &&
|
|
12246
|
+
const following = state.input.charCodeAt(state.position + 1);
|
|
12247
|
+
const _line = state.line;
|
|
12248
|
+
if ((ch === 63 || ch === 58) && isWsOrEol(following)) {
|
|
12052
12249
|
if (ch === 63) {
|
|
12053
12250
|
if (atExplicitKey) {
|
|
12054
12251
|
storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, null, _keyLine, _keyLineStart, _keyPos);
|
|
@@ -12074,12 +12271,12 @@ var require_loader = __commonJS({
|
|
|
12074
12271
|
}
|
|
12075
12272
|
if (state.line === _line) {
|
|
12076
12273
|
ch = state.input.charCodeAt(state.position);
|
|
12077
|
-
while (
|
|
12274
|
+
while (isWhiteSpace(ch)) {
|
|
12078
12275
|
ch = state.input.charCodeAt(++state.position);
|
|
12079
12276
|
}
|
|
12080
12277
|
if (ch === 58) {
|
|
12081
12278
|
ch = state.input.charCodeAt(++state.position);
|
|
12082
|
-
if (!
|
|
12279
|
+
if (!isWsOrEol(ch)) {
|
|
12083
12280
|
throwError(state, "a whitespace character is expected after the key-value separator within a block mapping");
|
|
12084
12281
|
}
|
|
12085
12282
|
if (atExplicitKey) {
|
|
@@ -12144,8 +12341,11 @@ var require_loader = __commonJS({
|
|
|
12144
12341
|
return detected;
|
|
12145
12342
|
}
|
|
12146
12343
|
function readTagProperty(state) {
|
|
12147
|
-
|
|
12148
|
-
|
|
12344
|
+
let isVerbatim = false;
|
|
12345
|
+
let isNamed = false;
|
|
12346
|
+
let tagHandle;
|
|
12347
|
+
let tagName;
|
|
12348
|
+
let ch = state.input.charCodeAt(state.position);
|
|
12149
12349
|
if (ch !== 33) return false;
|
|
12150
12350
|
if (state.tag !== null) {
|
|
12151
12351
|
throwError(state, "duplication of a tag property");
|
|
@@ -12161,7 +12361,7 @@ var require_loader = __commonJS({
|
|
|
12161
12361
|
} else {
|
|
12162
12362
|
tagHandle = "!";
|
|
12163
12363
|
}
|
|
12164
|
-
_position = state.position;
|
|
12364
|
+
let _position = state.position;
|
|
12165
12365
|
if (isVerbatim) {
|
|
12166
12366
|
do {
|
|
12167
12367
|
ch = state.input.charCodeAt(++state.position);
|
|
@@ -12173,7 +12373,7 @@ var require_loader = __commonJS({
|
|
|
12173
12373
|
throwError(state, "unexpected end of the stream within a verbatim tag");
|
|
12174
12374
|
}
|
|
12175
12375
|
} else {
|
|
12176
|
-
while (ch !== 0 && !
|
|
12376
|
+
while (ch !== 0 && !isWsOrEol(ch)) {
|
|
12177
12377
|
if (ch === 33) {
|
|
12178
12378
|
if (!isNamed) {
|
|
12179
12379
|
tagHandle = state.input.slice(_position - 1, state.position + 1);
|
|
@@ -12215,15 +12415,14 @@ var require_loader = __commonJS({
|
|
|
12215
12415
|
return true;
|
|
12216
12416
|
}
|
|
12217
12417
|
function readAnchorProperty(state) {
|
|
12218
|
-
|
|
12219
|
-
ch = state.input.charCodeAt(state.position);
|
|
12418
|
+
let ch = state.input.charCodeAt(state.position);
|
|
12220
12419
|
if (ch !== 38) return false;
|
|
12221
12420
|
if (state.anchor !== null) {
|
|
12222
12421
|
throwError(state, "duplication of an anchor property");
|
|
12223
12422
|
}
|
|
12224
12423
|
ch = state.input.charCodeAt(++state.position);
|
|
12225
|
-
_position = state.position;
|
|
12226
|
-
while (ch !== 0 && !
|
|
12424
|
+
const _position = state.position;
|
|
12425
|
+
while (ch !== 0 && !isWsOrEol(ch) && !isFlowIndicator(ch)) {
|
|
12227
12426
|
ch = state.input.charCodeAt(++state.position);
|
|
12228
12427
|
}
|
|
12229
12428
|
if (state.position === _position) {
|
|
@@ -12233,18 +12432,17 @@ var require_loader = __commonJS({
|
|
|
12233
12432
|
return true;
|
|
12234
12433
|
}
|
|
12235
12434
|
function readAlias(state) {
|
|
12236
|
-
|
|
12237
|
-
ch = state.input.charCodeAt(state.position);
|
|
12435
|
+
let ch = state.input.charCodeAt(state.position);
|
|
12238
12436
|
if (ch !== 42) return false;
|
|
12239
12437
|
ch = state.input.charCodeAt(++state.position);
|
|
12240
|
-
_position = state.position;
|
|
12241
|
-
while (ch !== 0 && !
|
|
12438
|
+
const _position = state.position;
|
|
12439
|
+
while (ch !== 0 && !isWsOrEol(ch) && !isFlowIndicator(ch)) {
|
|
12242
12440
|
ch = state.input.charCodeAt(++state.position);
|
|
12243
12441
|
}
|
|
12244
12442
|
if (state.position === _position) {
|
|
12245
12443
|
throwError(state, "name of an alias node must contain at least one character");
|
|
12246
12444
|
}
|
|
12247
|
-
alias = state.input.slice(_position, state.position);
|
|
12445
|
+
const alias = state.input.slice(_position, state.position);
|
|
12248
12446
|
if (!_hasOwnProperty.call(state.anchorMap, alias)) {
|
|
12249
12447
|
throwError(state, 'unidentified alias "' + alias + '"');
|
|
12250
12448
|
}
|
|
@@ -12252,8 +12450,36 @@ var require_loader = __commonJS({
|
|
|
12252
12450
|
skipSeparationSpace(state, true, -1);
|
|
12253
12451
|
return true;
|
|
12254
12452
|
}
|
|
12453
|
+
function tryReadBlockMappingFromProperty(state, propertyStart, nodeIndent, flowIndent) {
|
|
12454
|
+
const fallbackState = snapshotState(state);
|
|
12455
|
+
beginAnchorTransaction(state);
|
|
12456
|
+
restoreState(state, propertyStart);
|
|
12457
|
+
state.tag = null;
|
|
12458
|
+
state.anchor = null;
|
|
12459
|
+
state.kind = null;
|
|
12460
|
+
state.result = null;
|
|
12461
|
+
if (readBlockMapping(state, nodeIndent, flowIndent) && state.kind === "mapping") {
|
|
12462
|
+
commitAnchorTransaction(state);
|
|
12463
|
+
return true;
|
|
12464
|
+
}
|
|
12465
|
+
rollbackAnchorTransaction(state);
|
|
12466
|
+
restoreState(state, fallbackState);
|
|
12467
|
+
return false;
|
|
12468
|
+
}
|
|
12255
12469
|
function composeNode(state, parentIndent, nodeContext, allowToSeek, allowCompact) {
|
|
12256
|
-
|
|
12470
|
+
let allowBlockScalars;
|
|
12471
|
+
let allowBlockCollections;
|
|
12472
|
+
let indentStatus = 1;
|
|
12473
|
+
let atNewLine = false;
|
|
12474
|
+
let hasContent = false;
|
|
12475
|
+
let propertyStart = null;
|
|
12476
|
+
let type;
|
|
12477
|
+
let flowIndent;
|
|
12478
|
+
let blockIndent;
|
|
12479
|
+
if (state.depth >= state.maxDepth) {
|
|
12480
|
+
throwError(state, "nesting exceeded maxDepth (" + state.maxDepth + ")");
|
|
12481
|
+
}
|
|
12482
|
+
state.depth += 1;
|
|
12257
12483
|
if (state.listener !== null) {
|
|
12258
12484
|
state.listener("open", state);
|
|
12259
12485
|
}
|
|
@@ -12261,7 +12487,7 @@ var require_loader = __commonJS({
|
|
|
12261
12487
|
state.anchor = null;
|
|
12262
12488
|
state.kind = null;
|
|
12263
12489
|
state.result = null;
|
|
12264
|
-
allowBlockStyles = allowBlockScalars = allowBlockCollections = CONTEXT_BLOCK_OUT === nodeContext || CONTEXT_BLOCK_IN === nodeContext;
|
|
12490
|
+
const allowBlockStyles = allowBlockScalars = allowBlockCollections = CONTEXT_BLOCK_OUT === nodeContext || CONTEXT_BLOCK_IN === nodeContext;
|
|
12265
12491
|
if (allowToSeek) {
|
|
12266
12492
|
if (skipSeparationSpace(state, true, -1)) {
|
|
12267
12493
|
atNewLine = true;
|
|
@@ -12275,7 +12501,18 @@ var require_loader = __commonJS({
|
|
|
12275
12501
|
}
|
|
12276
12502
|
}
|
|
12277
12503
|
if (indentStatus === 1) {
|
|
12278
|
-
while (
|
|
12504
|
+
while (true) {
|
|
12505
|
+
const ch = state.input.charCodeAt(state.position);
|
|
12506
|
+
const propertyState = snapshotState(state);
|
|
12507
|
+
if (atNewLine && (ch === 33 && state.tag !== null || ch === 38 && state.anchor !== null)) {
|
|
12508
|
+
break;
|
|
12509
|
+
}
|
|
12510
|
+
if (!readTagProperty(state) && !readAnchorProperty(state)) {
|
|
12511
|
+
break;
|
|
12512
|
+
}
|
|
12513
|
+
if (propertyStart === null) {
|
|
12514
|
+
propertyStart = propertyState;
|
|
12515
|
+
}
|
|
12279
12516
|
if (skipSeparationSpace(state, true, -1)) {
|
|
12280
12517
|
atNewLine = true;
|
|
12281
12518
|
allowBlockCollections = allowBlockStyles;
|
|
@@ -12305,7 +12542,15 @@ var require_loader = __commonJS({
|
|
|
12305
12542
|
if (allowBlockCollections && (readBlockSequence(state, blockIndent) || readBlockMapping(state, blockIndent, flowIndent)) || readFlowCollection(state, flowIndent)) {
|
|
12306
12543
|
hasContent = true;
|
|
12307
12544
|
} else {
|
|
12308
|
-
|
|
12545
|
+
const ch = state.input.charCodeAt(state.position);
|
|
12546
|
+
if (propertyStart !== null && allowBlockStyles && !allowBlockCollections && ch !== 124 && ch !== 62 && tryReadBlockMappingFromProperty(
|
|
12547
|
+
state,
|
|
12548
|
+
propertyStart,
|
|
12549
|
+
propertyStart.position - propertyStart.lineStart,
|
|
12550
|
+
flowIndent
|
|
12551
|
+
)) {
|
|
12552
|
+
hasContent = true;
|
|
12553
|
+
} else if (allowBlockScalars && readBlockScalar(state, flowIndent) || readSingleQuotedScalar(state, flowIndent) || readDoubleQuotedScalar(state, flowIndent)) {
|
|
12309
12554
|
hasContent = true;
|
|
12310
12555
|
} else if (readAlias(state)) {
|
|
12311
12556
|
hasContent = true;
|
|
@@ -12319,7 +12564,7 @@ var require_loader = __commonJS({
|
|
|
12319
12564
|
}
|
|
12320
12565
|
}
|
|
12321
12566
|
if (state.anchor !== null) {
|
|
12322
|
-
state
|
|
12567
|
+
storeAnchor(state, state.anchor, state.result);
|
|
12323
12568
|
}
|
|
12324
12569
|
}
|
|
12325
12570
|
} else if (indentStatus === 0) {
|
|
@@ -12328,19 +12573,19 @@ var require_loader = __commonJS({
|
|
|
12328
12573
|
}
|
|
12329
12574
|
if (state.tag === null) {
|
|
12330
12575
|
if (state.anchor !== null) {
|
|
12331
|
-
state
|
|
12576
|
+
storeAnchor(state, state.anchor, state.result);
|
|
12332
12577
|
}
|
|
12333
12578
|
} else if (state.tag === "?") {
|
|
12334
12579
|
if (state.result !== null && state.kind !== "scalar") {
|
|
12335
12580
|
throwError(state, 'unacceptable node kind for !<?> tag; it should be "scalar", not "' + state.kind + '"');
|
|
12336
12581
|
}
|
|
12337
|
-
for (typeIndex = 0, typeQuantity = state.implicitTypes.length; typeIndex < typeQuantity; typeIndex += 1) {
|
|
12582
|
+
for (let typeIndex = 0, typeQuantity = state.implicitTypes.length; typeIndex < typeQuantity; typeIndex += 1) {
|
|
12338
12583
|
type = state.implicitTypes[typeIndex];
|
|
12339
12584
|
if (type.resolve(state.result)) {
|
|
12340
12585
|
state.result = type.construct(state.result);
|
|
12341
12586
|
state.tag = type.tag;
|
|
12342
12587
|
if (state.anchor !== null) {
|
|
12343
|
-
state
|
|
12588
|
+
storeAnchor(state, state.anchor, state.result);
|
|
12344
12589
|
}
|
|
12345
12590
|
break;
|
|
12346
12591
|
}
|
|
@@ -12350,8 +12595,8 @@ var require_loader = __commonJS({
|
|
|
12350
12595
|
type = state.typeMap[state.kind || "fallback"][state.tag];
|
|
12351
12596
|
} else {
|
|
12352
12597
|
type = null;
|
|
12353
|
-
typeList = state.typeMap.multi[state.kind || "fallback"];
|
|
12354
|
-
for (typeIndex = 0, typeQuantity = typeList.length; typeIndex < typeQuantity; typeIndex += 1) {
|
|
12598
|
+
const typeList = state.typeMap.multi[state.kind || "fallback"];
|
|
12599
|
+
for (let typeIndex = 0, typeQuantity = typeList.length; typeIndex < typeQuantity; typeIndex += 1) {
|
|
12355
12600
|
if (state.tag.slice(0, typeList[typeIndex].tag.length) === typeList[typeIndex].tag) {
|
|
12356
12601
|
type = typeList[typeIndex];
|
|
12357
12602
|
break;
|
|
@@ -12369,17 +12614,20 @@ var require_loader = __commonJS({
|
|
|
12369
12614
|
} else {
|
|
12370
12615
|
state.result = type.construct(state.result, state.tag);
|
|
12371
12616
|
if (state.anchor !== null) {
|
|
12372
|
-
state
|
|
12617
|
+
storeAnchor(state, state.anchor, state.result);
|
|
12373
12618
|
}
|
|
12374
12619
|
}
|
|
12375
12620
|
}
|
|
12376
12621
|
if (state.listener !== null) {
|
|
12377
12622
|
state.listener("close", state);
|
|
12378
12623
|
}
|
|
12624
|
+
state.depth -= 1;
|
|
12379
12625
|
return state.tag !== null || state.anchor !== null || hasContent;
|
|
12380
12626
|
}
|
|
12381
12627
|
function readDocument(state) {
|
|
12382
|
-
|
|
12628
|
+
const documentStart = state.position;
|
|
12629
|
+
let hasDirectives = false;
|
|
12630
|
+
let ch;
|
|
12383
12631
|
state.version = null;
|
|
12384
12632
|
state.checkLineBreaks = state.legacy;
|
|
12385
12633
|
state.tagMap = /* @__PURE__ */ Object.create(null);
|
|
@@ -12392,28 +12640,28 @@ var require_loader = __commonJS({
|
|
|
12392
12640
|
}
|
|
12393
12641
|
hasDirectives = true;
|
|
12394
12642
|
ch = state.input.charCodeAt(++state.position);
|
|
12395
|
-
_position = state.position;
|
|
12396
|
-
while (ch !== 0 && !
|
|
12643
|
+
let _position = state.position;
|
|
12644
|
+
while (ch !== 0 && !isWsOrEol(ch)) {
|
|
12397
12645
|
ch = state.input.charCodeAt(++state.position);
|
|
12398
12646
|
}
|
|
12399
|
-
directiveName = state.input.slice(_position, state.position);
|
|
12400
|
-
directiveArgs = [];
|
|
12647
|
+
const directiveName = state.input.slice(_position, state.position);
|
|
12648
|
+
const directiveArgs = [];
|
|
12401
12649
|
if (directiveName.length < 1) {
|
|
12402
12650
|
throwError(state, "directive name must not be less than one character in length");
|
|
12403
12651
|
}
|
|
12404
12652
|
while (ch !== 0) {
|
|
12405
|
-
while (
|
|
12653
|
+
while (isWhiteSpace(ch)) {
|
|
12406
12654
|
ch = state.input.charCodeAt(++state.position);
|
|
12407
12655
|
}
|
|
12408
12656
|
if (ch === 35) {
|
|
12409
12657
|
do {
|
|
12410
12658
|
ch = state.input.charCodeAt(++state.position);
|
|
12411
|
-
} while (ch !== 0 && !
|
|
12659
|
+
} while (ch !== 0 && !isEol(ch));
|
|
12412
12660
|
break;
|
|
12413
12661
|
}
|
|
12414
|
-
if (
|
|
12662
|
+
if (isEol(ch)) break;
|
|
12415
12663
|
_position = state.position;
|
|
12416
|
-
while (ch !== 0 && !
|
|
12664
|
+
while (ch !== 0 && !isWsOrEol(ch)) {
|
|
12417
12665
|
ch = state.input.charCodeAt(++state.position);
|
|
12418
12666
|
}
|
|
12419
12667
|
directiveArgs.push(state.input.slice(_position, state.position));
|
|
@@ -12447,8 +12695,6 @@ var require_loader = __commonJS({
|
|
|
12447
12695
|
}
|
|
12448
12696
|
if (state.position < state.length - 1) {
|
|
12449
12697
|
throwError(state, "end of the stream or a document separator is expected");
|
|
12450
|
-
} else {
|
|
12451
|
-
return;
|
|
12452
12698
|
}
|
|
12453
12699
|
}
|
|
12454
12700
|
function loadDocuments(input, options) {
|
|
@@ -12462,8 +12708,8 @@ var require_loader = __commonJS({
|
|
|
12462
12708
|
input = input.slice(1);
|
|
12463
12709
|
}
|
|
12464
12710
|
}
|
|
12465
|
-
|
|
12466
|
-
|
|
12711
|
+
const state = new State(input, options);
|
|
12712
|
+
const nullpos = input.indexOf("\0");
|
|
12467
12713
|
if (nullpos !== -1) {
|
|
12468
12714
|
state.position = nullpos;
|
|
12469
12715
|
throwError(state, "null byte is not allowed in input");
|
|
@@ -12483,16 +12729,16 @@ var require_loader = __commonJS({
|
|
|
12483
12729
|
options = iterator;
|
|
12484
12730
|
iterator = null;
|
|
12485
12731
|
}
|
|
12486
|
-
|
|
12732
|
+
const documents = loadDocuments(input, options);
|
|
12487
12733
|
if (typeof iterator !== "function") {
|
|
12488
12734
|
return documents;
|
|
12489
12735
|
}
|
|
12490
|
-
for (
|
|
12736
|
+
for (let index = 0, length = documents.length; index < length; index += 1) {
|
|
12491
12737
|
iterator(documents[index]);
|
|
12492
12738
|
}
|
|
12493
12739
|
}
|
|
12494
12740
|
function load2(input, options) {
|
|
12495
|
-
|
|
12741
|
+
const documents = loadDocuments(input, options);
|
|
12496
12742
|
if (documents.length === 0) {
|
|
12497
12743
|
return void 0;
|
|
12498
12744
|
} else if (documents.length === 1) {
|
|
@@ -12575,17 +12821,16 @@ var require_dumper = __commonJS({
|
|
|
12575
12821
|
];
|
|
12576
12822
|
var DEPRECATED_BASE60_SYNTAX = /^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/;
|
|
12577
12823
|
function compileStyleMap(schema2, map) {
|
|
12578
|
-
var result, keys, index, length, tag, style, type;
|
|
12579
12824
|
if (map === null) return {};
|
|
12580
|
-
result = {};
|
|
12581
|
-
keys = Object.keys(map);
|
|
12582
|
-
for (index = 0, length = keys.length; index < length; index += 1) {
|
|
12583
|
-
tag = keys[index];
|
|
12584
|
-
style = String(map[tag]);
|
|
12825
|
+
const result = {};
|
|
12826
|
+
const keys = Object.keys(map);
|
|
12827
|
+
for (let index = 0, length = keys.length; index < length; index += 1) {
|
|
12828
|
+
let tag = keys[index];
|
|
12829
|
+
let style = String(map[tag]);
|
|
12585
12830
|
if (tag.slice(0, 2) === "!!") {
|
|
12586
12831
|
tag = "tag:yaml.org,2002:" + tag.slice(2);
|
|
12587
12832
|
}
|
|
12588
|
-
type = schema2.compiledTypeMap["fallback"][tag];
|
|
12833
|
+
const type = schema2.compiledTypeMap["fallback"][tag];
|
|
12589
12834
|
if (type && _hasOwnProperty.call(type.styleAliases, style)) {
|
|
12590
12835
|
style = type.styleAliases[style];
|
|
12591
12836
|
}
|
|
@@ -12594,8 +12839,9 @@ var require_dumper = __commonJS({
|
|
|
12594
12839
|
return result;
|
|
12595
12840
|
}
|
|
12596
12841
|
function encodeHex(character) {
|
|
12597
|
-
|
|
12598
|
-
|
|
12842
|
+
let handle;
|
|
12843
|
+
let length;
|
|
12844
|
+
const string = character.toString(16).toUpperCase();
|
|
12599
12845
|
if (character <= 255) {
|
|
12600
12846
|
handle = "x";
|
|
12601
12847
|
length = 2;
|
|
@@ -12635,9 +12881,13 @@ var require_dumper = __commonJS({
|
|
|
12635
12881
|
this.usedDuplicates = null;
|
|
12636
12882
|
}
|
|
12637
12883
|
function indentString(string, spaces) {
|
|
12638
|
-
|
|
12884
|
+
const ind = common.repeat(" ", spaces);
|
|
12885
|
+
let position = 0;
|
|
12886
|
+
let result = "";
|
|
12887
|
+
const length = string.length;
|
|
12639
12888
|
while (position < length) {
|
|
12640
|
-
|
|
12889
|
+
let line;
|
|
12890
|
+
const next = string.indexOf("\n", position);
|
|
12641
12891
|
if (next === -1) {
|
|
12642
12892
|
line = string.slice(position);
|
|
12643
12893
|
position = length;
|
|
@@ -12654,9 +12904,8 @@ var require_dumper = __commonJS({
|
|
|
12654
12904
|
return "\n" + common.repeat(" ", state.indent * level);
|
|
12655
12905
|
}
|
|
12656
12906
|
function testImplicitResolving(state, str) {
|
|
12657
|
-
|
|
12658
|
-
|
|
12659
|
-
type = state.implicitTypes[index];
|
|
12907
|
+
for (let index = 0, length = state.implicitTypes.length; index < length; index += 1) {
|
|
12908
|
+
const type = state.implicitTypes[index];
|
|
12660
12909
|
if (type.resolve(str)) {
|
|
12661
12910
|
return true;
|
|
12662
12911
|
}
|
|
@@ -12667,30 +12916,39 @@ var require_dumper = __commonJS({
|
|
|
12667
12916
|
return c2 === CHAR_SPACE || c2 === CHAR_TAB;
|
|
12668
12917
|
}
|
|
12669
12918
|
function isPrintable(c2) {
|
|
12670
|
-
return
|
|
12919
|
+
return c2 >= 32 && c2 <= 126 || c2 >= 161 && c2 <= 55295 && c2 !== 8232 && c2 !== 8233 || c2 >= 57344 && c2 <= 65533 && c2 !== CHAR_BOM || c2 >= 65536 && c2 <= 1114111;
|
|
12671
12920
|
}
|
|
12672
12921
|
function isNsCharOrWhitespace(c2) {
|
|
12673
|
-
return isPrintable(c2) && c2 !== CHAR_BOM &&
|
|
12922
|
+
return isPrintable(c2) && c2 !== CHAR_BOM && // - b-char
|
|
12923
|
+
c2 !== CHAR_CARRIAGE_RETURN && c2 !== CHAR_LINE_FEED;
|
|
12674
12924
|
}
|
|
12675
12925
|
function isPlainSafe(c2, prev, inblock) {
|
|
12676
|
-
|
|
12677
|
-
|
|
12926
|
+
const cIsNsCharOrWhitespace = isNsCharOrWhitespace(c2);
|
|
12927
|
+
const cIsNsChar = cIsNsCharOrWhitespace && !isWhitespace(c2);
|
|
12678
12928
|
return (
|
|
12679
12929
|
// ns-plain-safe
|
|
12680
|
-
(inblock ?
|
|
12681
|
-
|
|
12682
|
-
|
|
12683
|
-
|
|
12930
|
+
(inblock ? cIsNsCharOrWhitespace : cIsNsCharOrWhitespace && // - c-flow-indicator
|
|
12931
|
+
c2 !== CHAR_COMMA && c2 !== CHAR_LEFT_SQUARE_BRACKET && c2 !== CHAR_RIGHT_SQUARE_BRACKET && c2 !== CHAR_LEFT_CURLY_BRACKET && c2 !== CHAR_RIGHT_CURLY_BRACKET) && // ns-plain-char
|
|
12932
|
+
c2 !== CHAR_SHARP && // false on '#'
|
|
12933
|
+
!(prev === CHAR_COLON && !cIsNsChar) || // false on ': '
|
|
12934
|
+
isNsCharOrWhitespace(prev) && !isWhitespace(prev) && c2 === CHAR_SHARP || // change to true on '[^ ]#'
|
|
12935
|
+
prev === CHAR_COLON && cIsNsChar
|
|
12684
12936
|
);
|
|
12685
12937
|
}
|
|
12686
12938
|
function isPlainSafeFirst(c2) {
|
|
12687
|
-
return isPrintable(c2) && c2 !== CHAR_BOM && !isWhitespace(c2) &&
|
|
12939
|
+
return isPrintable(c2) && c2 !== CHAR_BOM && !isWhitespace(c2) && // - s-white
|
|
12940
|
+
// - (c-indicator ::=
|
|
12941
|
+
// “-” | “?” | “:” | “,” | “[” | “]” | “{” | “}”
|
|
12942
|
+
c2 !== CHAR_MINUS && c2 !== CHAR_QUESTION && c2 !== CHAR_COLON && c2 !== CHAR_COMMA && c2 !== CHAR_LEFT_SQUARE_BRACKET && c2 !== CHAR_RIGHT_SQUARE_BRACKET && c2 !== CHAR_LEFT_CURLY_BRACKET && c2 !== CHAR_RIGHT_CURLY_BRACKET && // | “#” | “&” | “*” | “!” | “|” | “=” | “>” | “'” | “"”
|
|
12943
|
+
c2 !== CHAR_SHARP && c2 !== CHAR_AMPERSAND && c2 !== CHAR_ASTERISK && c2 !== CHAR_EXCLAMATION && c2 !== CHAR_VERTICAL_LINE && c2 !== CHAR_EQUALS && c2 !== CHAR_GREATER_THAN && c2 !== CHAR_SINGLE_QUOTE && c2 !== CHAR_DOUBLE_QUOTE && // | “%” | “@” | “`”)
|
|
12944
|
+
c2 !== CHAR_PERCENT && c2 !== CHAR_COMMERCIAL_AT && c2 !== CHAR_GRAVE_ACCENT;
|
|
12688
12945
|
}
|
|
12689
12946
|
function isPlainSafeLast(c2) {
|
|
12690
12947
|
return !isWhitespace(c2) && c2 !== CHAR_COLON;
|
|
12691
12948
|
}
|
|
12692
12949
|
function codePointAt(string, pos) {
|
|
12693
|
-
|
|
12950
|
+
const first = string.charCodeAt(pos);
|
|
12951
|
+
let second;
|
|
12694
12952
|
if (first >= 55296 && first <= 56319 && pos + 1 < string.length) {
|
|
12695
12953
|
second = string.charCodeAt(pos + 1);
|
|
12696
12954
|
if (second >= 56320 && second <= 57343) {
|
|
@@ -12700,7 +12958,7 @@ var require_dumper = __commonJS({
|
|
|
12700
12958
|
return first;
|
|
12701
12959
|
}
|
|
12702
12960
|
function needIndentIndicator(string) {
|
|
12703
|
-
|
|
12961
|
+
const leadingSpaceRe = /^\n* /;
|
|
12704
12962
|
return leadingSpaceRe.test(string);
|
|
12705
12963
|
}
|
|
12706
12964
|
var STYLE_PLAIN = 1;
|
|
@@ -12709,14 +12967,14 @@ var require_dumper = __commonJS({
|
|
|
12709
12967
|
var STYLE_FOLDED = 4;
|
|
12710
12968
|
var STYLE_DOUBLE = 5;
|
|
12711
12969
|
function chooseScalarStyle(string, singleLineOnly, indentPerLevel, lineWidth, testAmbiguousType, quotingType, forceQuotes, inblock) {
|
|
12712
|
-
|
|
12713
|
-
|
|
12714
|
-
|
|
12715
|
-
|
|
12716
|
-
|
|
12717
|
-
|
|
12718
|
-
|
|
12719
|
-
|
|
12970
|
+
let i2;
|
|
12971
|
+
let char = 0;
|
|
12972
|
+
let prevChar = null;
|
|
12973
|
+
let hasLineBreak = false;
|
|
12974
|
+
let hasFoldableLine = false;
|
|
12975
|
+
const shouldTrackWidth = lineWidth !== -1;
|
|
12976
|
+
let previousLineBreak = -1;
|
|
12977
|
+
let plain = isPlainSafeFirst(codePointAt(string, 0)) && isPlainSafeLast(codePointAt(string, string.length - 1));
|
|
12720
12978
|
if (singleLineOnly || forceQuotes) {
|
|
12721
12979
|
for (i2 = 0; i2 < string.length; char >= 65536 ? i2 += 2 : i2++) {
|
|
12722
12980
|
char = codePointAt(string, i2);
|
|
@@ -12768,9 +13026,10 @@ var require_dumper = __commonJS({
|
|
|
12768
13026
|
return state.quotingType === QUOTING_TYPE_DOUBLE ? '"' + string + '"' : "'" + string + "'";
|
|
12769
13027
|
}
|
|
12770
13028
|
}
|
|
12771
|
-
|
|
12772
|
-
|
|
12773
|
-
|
|
13029
|
+
const indent = state.indent * Math.max(1, level);
|
|
13030
|
+
const lineWidth = state.lineWidth === -1 ? -1 : Math.max(Math.min(state.lineWidth, 40), state.lineWidth - indent);
|
|
13031
|
+
const singleLineOnly = iskey || // No block styles in flow mode.
|
|
13032
|
+
state.flowLevel > -1 && level >= state.flowLevel;
|
|
12774
13033
|
function testAmbiguity(string2) {
|
|
12775
13034
|
return testImplicitResolving(state, string2);
|
|
12776
13035
|
}
|
|
@@ -12800,28 +13059,29 @@ var require_dumper = __commonJS({
|
|
|
12800
13059
|
})();
|
|
12801
13060
|
}
|
|
12802
13061
|
function blockHeader(string, indentPerLevel) {
|
|
12803
|
-
|
|
12804
|
-
|
|
12805
|
-
|
|
12806
|
-
|
|
13062
|
+
const indentIndicator = needIndentIndicator(string) ? String(indentPerLevel) : "";
|
|
13063
|
+
const clip = string[string.length - 1] === "\n";
|
|
13064
|
+
const keep = clip && (string[string.length - 2] === "\n" || string === "\n");
|
|
13065
|
+
const chomp = keep ? "+" : clip ? "" : "-";
|
|
12807
13066
|
return indentIndicator + chomp + "\n";
|
|
12808
13067
|
}
|
|
12809
13068
|
function dropEndingNewline(string) {
|
|
12810
13069
|
return string[string.length - 1] === "\n" ? string.slice(0, -1) : string;
|
|
12811
13070
|
}
|
|
12812
13071
|
function foldString(string, width) {
|
|
12813
|
-
|
|
12814
|
-
|
|
12815
|
-
|
|
13072
|
+
const lineRe = /(\n+)([^\n]*)/g;
|
|
13073
|
+
let result = (function() {
|
|
13074
|
+
let nextLF = string.indexOf("\n");
|
|
12816
13075
|
nextLF = nextLF !== -1 ? nextLF : string.length;
|
|
12817
13076
|
lineRe.lastIndex = nextLF;
|
|
12818
13077
|
return foldLine(string.slice(0, nextLF), width);
|
|
12819
13078
|
})();
|
|
12820
|
-
|
|
12821
|
-
|
|
12822
|
-
|
|
13079
|
+
let prevMoreIndented = string[0] === "\n" || string[0] === " ";
|
|
13080
|
+
let moreIndented;
|
|
13081
|
+
let match;
|
|
12823
13082
|
while (match = lineRe.exec(string)) {
|
|
12824
|
-
|
|
13083
|
+
const prefix2 = match[1];
|
|
13084
|
+
const line = match[2];
|
|
12825
13085
|
moreIndented = line[0] === " ";
|
|
12826
13086
|
result += prefix2 + (!prevMoreIndented && !moreIndented && line !== "" ? "\n" : "") + foldLine(line, width);
|
|
12827
13087
|
prevMoreIndented = moreIndented;
|
|
@@ -12830,10 +13090,13 @@ var require_dumper = __commonJS({
|
|
|
12830
13090
|
}
|
|
12831
13091
|
function foldLine(line, width) {
|
|
12832
13092
|
if (line === "" || line[0] === " ") return line;
|
|
12833
|
-
|
|
12834
|
-
|
|
12835
|
-
|
|
12836
|
-
|
|
13093
|
+
const breakRe = / [^ ]/g;
|
|
13094
|
+
let match;
|
|
13095
|
+
let start = 0;
|
|
13096
|
+
let end;
|
|
13097
|
+
let curr = 0;
|
|
13098
|
+
let next = 0;
|
|
13099
|
+
let result = "";
|
|
12837
13100
|
while (match = breakRe.exec(line)) {
|
|
12838
13101
|
next = match.index;
|
|
12839
13102
|
if (next - start > width) {
|
|
@@ -12852,12 +13115,11 @@ var require_dumper = __commonJS({
|
|
|
12852
13115
|
return result.slice(1);
|
|
12853
13116
|
}
|
|
12854
13117
|
function escapeString(string) {
|
|
12855
|
-
|
|
12856
|
-
|
|
12857
|
-
|
|
12858
|
-
for (var i2 = 0; i2 < string.length; char >= 65536 ? i2 += 2 : i2++) {
|
|
13118
|
+
let result = "";
|
|
13119
|
+
let char = 0;
|
|
13120
|
+
for (let i2 = 0; i2 < string.length; char >= 65536 ? i2 += 2 : i2++) {
|
|
12859
13121
|
char = codePointAt(string, i2);
|
|
12860
|
-
escapeSeq = ESCAPE_SEQUENCES[char];
|
|
13122
|
+
const escapeSeq = ESCAPE_SEQUENCES[char];
|
|
12861
13123
|
if (!escapeSeq && isPrintable(char)) {
|
|
12862
13124
|
result += string[i2];
|
|
12863
13125
|
if (char >= 65536) result += string[i2 + 1];
|
|
@@ -12868,9 +13130,10 @@ var require_dumper = __commonJS({
|
|
|
12868
13130
|
return result;
|
|
12869
13131
|
}
|
|
12870
13132
|
function writeFlowSequence(state, level, object) {
|
|
12871
|
-
|
|
12872
|
-
|
|
12873
|
-
|
|
13133
|
+
let _result = "";
|
|
13134
|
+
const _tag = state.tag;
|
|
13135
|
+
for (let index = 0, length = object.length; index < length; index += 1) {
|
|
13136
|
+
let value = object[index];
|
|
12874
13137
|
if (state.replacer) {
|
|
12875
13138
|
value = state.replacer.call(object, String(index), value);
|
|
12876
13139
|
}
|
|
@@ -12883,9 +13146,10 @@ var require_dumper = __commonJS({
|
|
|
12883
13146
|
state.dump = "[" + _result + "]";
|
|
12884
13147
|
}
|
|
12885
13148
|
function writeBlockSequence(state, level, object, compact) {
|
|
12886
|
-
|
|
12887
|
-
|
|
12888
|
-
|
|
13149
|
+
let _result = "";
|
|
13150
|
+
const _tag = state.tag;
|
|
13151
|
+
for (let index = 0, length = object.length; index < length; index += 1) {
|
|
13152
|
+
let value = object[index];
|
|
12889
13153
|
if (state.replacer) {
|
|
12890
13154
|
value = state.replacer.call(object, String(index), value);
|
|
12891
13155
|
}
|
|
@@ -12905,13 +13169,15 @@ var require_dumper = __commonJS({
|
|
|
12905
13169
|
state.dump = _result || "[]";
|
|
12906
13170
|
}
|
|
12907
13171
|
function writeFlowMapping(state, level, object) {
|
|
12908
|
-
|
|
12909
|
-
|
|
12910
|
-
|
|
13172
|
+
let _result = "";
|
|
13173
|
+
const _tag = state.tag;
|
|
13174
|
+
const objectKeyList = Object.keys(object);
|
|
13175
|
+
for (let index = 0, length = objectKeyList.length; index < length; index += 1) {
|
|
13176
|
+
let pairBuffer = "";
|
|
12911
13177
|
if (_result !== "") pairBuffer += ", ";
|
|
12912
13178
|
if (state.condenseFlow) pairBuffer += '"';
|
|
12913
|
-
objectKey = objectKeyList[index];
|
|
12914
|
-
objectValue = object[objectKey];
|
|
13179
|
+
const objectKey = objectKeyList[index];
|
|
13180
|
+
let objectValue = object[objectKey];
|
|
12915
13181
|
if (state.replacer) {
|
|
12916
13182
|
objectValue = state.replacer.call(object, objectKey, objectValue);
|
|
12917
13183
|
}
|
|
@@ -12930,7 +13196,9 @@ var require_dumper = __commonJS({
|
|
|
12930
13196
|
state.dump = "{" + _result + "}";
|
|
12931
13197
|
}
|
|
12932
13198
|
function writeBlockMapping(state, level, object, compact) {
|
|
12933
|
-
|
|
13199
|
+
let _result = "";
|
|
13200
|
+
const _tag = state.tag;
|
|
13201
|
+
const objectKeyList = Object.keys(object);
|
|
12934
13202
|
if (state.sortKeys === true) {
|
|
12935
13203
|
objectKeyList.sort();
|
|
12936
13204
|
} else if (typeof state.sortKeys === "function") {
|
|
@@ -12938,20 +13206,20 @@ var require_dumper = __commonJS({
|
|
|
12938
13206
|
} else if (state.sortKeys) {
|
|
12939
13207
|
throw new YAMLException("sortKeys must be a boolean or a function");
|
|
12940
13208
|
}
|
|
12941
|
-
for (index = 0, length = objectKeyList.length; index < length; index += 1) {
|
|
12942
|
-
pairBuffer = "";
|
|
13209
|
+
for (let index = 0, length = objectKeyList.length; index < length; index += 1) {
|
|
13210
|
+
let pairBuffer = "";
|
|
12943
13211
|
if (!compact || _result !== "") {
|
|
12944
13212
|
pairBuffer += generateNextLine(state, level);
|
|
12945
13213
|
}
|
|
12946
|
-
objectKey = objectKeyList[index];
|
|
12947
|
-
objectValue = object[objectKey];
|
|
13214
|
+
const objectKey = objectKeyList[index];
|
|
13215
|
+
let objectValue = object[objectKey];
|
|
12948
13216
|
if (state.replacer) {
|
|
12949
13217
|
objectValue = state.replacer.call(object, objectKey, objectValue);
|
|
12950
13218
|
}
|
|
12951
13219
|
if (!writeNode(state, level + 1, objectKey, true, true, true)) {
|
|
12952
13220
|
continue;
|
|
12953
13221
|
}
|
|
12954
|
-
explicitPair = state.tag !== null && state.tag !== "?" || state.dump && state.dump.length > 1024;
|
|
13222
|
+
const explicitPair = state.tag !== null && state.tag !== "?" || state.dump && state.dump.length > 1024;
|
|
12955
13223
|
if (explicitPair) {
|
|
12956
13224
|
if (state.dump && CHAR_LINE_FEED === state.dump.charCodeAt(0)) {
|
|
12957
13225
|
pairBuffer += "?";
|
|
@@ -12978,10 +13246,9 @@ var require_dumper = __commonJS({
|
|
|
12978
13246
|
state.dump = _result || "{}";
|
|
12979
13247
|
}
|
|
12980
13248
|
function detectType(state, object, explicit) {
|
|
12981
|
-
|
|
12982
|
-
|
|
12983
|
-
|
|
12984
|
-
type = typeList[index];
|
|
13249
|
+
const typeList = explicit ? state.explicitTypes : state.implicitTypes;
|
|
13250
|
+
for (let index = 0, length = typeList.length; index < length; index += 1) {
|
|
13251
|
+
const type = typeList[index];
|
|
12985
13252
|
if ((type.instanceOf || type.predicate) && (!type.instanceOf || typeof object === "object" && object instanceof type.instanceOf) && (!type.predicate || type.predicate(object))) {
|
|
12986
13253
|
if (explicit) {
|
|
12987
13254
|
if (type.multi && type.representName) {
|
|
@@ -12993,7 +13260,8 @@ var require_dumper = __commonJS({
|
|
|
12993
13260
|
state.tag = "?";
|
|
12994
13261
|
}
|
|
12995
13262
|
if (type.represent) {
|
|
12996
|
-
style = state.styleMap[type.tag] || type.defaultStyle;
|
|
13263
|
+
const style = state.styleMap[type.tag] || type.defaultStyle;
|
|
13264
|
+
let _result;
|
|
12997
13265
|
if (_toString.call(type.represent) === "[object Function]") {
|
|
12998
13266
|
_result = type.represent(object, style);
|
|
12999
13267
|
} else if (_hasOwnProperty.call(type.represent, style)) {
|
|
@@ -13014,13 +13282,14 @@ var require_dumper = __commonJS({
|
|
|
13014
13282
|
if (!detectType(state, object, false)) {
|
|
13015
13283
|
detectType(state, object, true);
|
|
13016
13284
|
}
|
|
13017
|
-
|
|
13018
|
-
|
|
13019
|
-
var tagStr;
|
|
13285
|
+
const type = _toString.call(state.dump);
|
|
13286
|
+
const inblock = block;
|
|
13020
13287
|
if (block) {
|
|
13021
13288
|
block = state.flowLevel < 0 || state.flowLevel > level;
|
|
13022
13289
|
}
|
|
13023
|
-
|
|
13290
|
+
const objectOrArray = type === "[object Object]" || type === "[object Array]";
|
|
13291
|
+
let duplicateIndex;
|
|
13292
|
+
let duplicate;
|
|
13024
13293
|
if (objectOrArray) {
|
|
13025
13294
|
duplicateIndex = state.duplicates.indexOf(object);
|
|
13026
13295
|
duplicate = duplicateIndex !== -1;
|
|
@@ -13073,7 +13342,7 @@ var require_dumper = __commonJS({
|
|
|
13073
13342
|
throw new YAMLException("unacceptable kind of an object to dump " + type);
|
|
13074
13343
|
}
|
|
13075
13344
|
if (state.tag !== null && state.tag !== "?") {
|
|
13076
|
-
tagStr = encodeURI(
|
|
13345
|
+
let tagStr = encodeURI(
|
|
13077
13346
|
state.tag[0] === "!" ? state.tag.slice(1) : state.tag
|
|
13078
13347
|
).replace(/!/g, "%21");
|
|
13079
13348
|
if (state.tag[0] === "!") {
|
|
@@ -13089,17 +13358,18 @@ var require_dumper = __commonJS({
|
|
|
13089
13358
|
return true;
|
|
13090
13359
|
}
|
|
13091
13360
|
function getDuplicateReferences(object, state) {
|
|
13092
|
-
|
|
13361
|
+
const objects = [];
|
|
13362
|
+
const duplicatesIndexes = [];
|
|
13093
13363
|
inspectNode(object, objects, duplicatesIndexes);
|
|
13094
|
-
|
|
13364
|
+
const length = duplicatesIndexes.length;
|
|
13365
|
+
for (let index = 0; index < length; index += 1) {
|
|
13095
13366
|
state.duplicates.push(objects[duplicatesIndexes[index]]);
|
|
13096
13367
|
}
|
|
13097
13368
|
state.usedDuplicates = new Array(length);
|
|
13098
13369
|
}
|
|
13099
13370
|
function inspectNode(object, objects, duplicatesIndexes) {
|
|
13100
|
-
var objectKeyList, index, length;
|
|
13101
13371
|
if (object !== null && typeof object === "object") {
|
|
13102
|
-
index = objects.indexOf(object);
|
|
13372
|
+
const index = objects.indexOf(object);
|
|
13103
13373
|
if (index !== -1) {
|
|
13104
13374
|
if (duplicatesIndexes.indexOf(index) === -1) {
|
|
13105
13375
|
duplicatesIndexes.push(index);
|
|
@@ -13107,13 +13377,13 @@ var require_dumper = __commonJS({
|
|
|
13107
13377
|
} else {
|
|
13108
13378
|
objects.push(object);
|
|
13109
13379
|
if (Array.isArray(object)) {
|
|
13110
|
-
for (
|
|
13111
|
-
inspectNode(object[
|
|
13380
|
+
for (let i2 = 0, length = object.length; i2 < length; i2 += 1) {
|
|
13381
|
+
inspectNode(object[i2], objects, duplicatesIndexes);
|
|
13112
13382
|
}
|
|
13113
13383
|
} else {
|
|
13114
|
-
objectKeyList = Object.keys(object);
|
|
13115
|
-
for (
|
|
13116
|
-
inspectNode(object[objectKeyList[
|
|
13384
|
+
const objectKeyList = Object.keys(object);
|
|
13385
|
+
for (let i2 = 0, length = objectKeyList.length; i2 < length; i2 += 1) {
|
|
13386
|
+
inspectNode(object[objectKeyList[i2]], objects, duplicatesIndexes);
|
|
13117
13387
|
}
|
|
13118
13388
|
}
|
|
13119
13389
|
}
|
|
@@ -13121,9 +13391,9 @@ var require_dumper = __commonJS({
|
|
|
13121
13391
|
}
|
|
13122
13392
|
function dump(input, options) {
|
|
13123
13393
|
options = options || {};
|
|
13124
|
-
|
|
13394
|
+
const state = new State(options);
|
|
13125
13395
|
if (!state.noRefs) getDuplicateReferences(input, state);
|
|
13126
|
-
|
|
13396
|
+
let value = input;
|
|
13127
13397
|
if (state.replacer) {
|
|
13128
13398
|
value = state.replacer.call({ "": value }, "", value);
|
|
13129
13399
|
}
|
|
@@ -227083,7 +227353,9 @@ var require_defaults2 = __commonJS({
|
|
|
227083
227353
|
"node_modules/cosmiconfig/dist/defaults.js"(exports) {
|
|
227084
227354
|
"use strict";
|
|
227085
227355
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
227086
|
-
exports.defaultLoadersSync = exports.defaultLoaders = exports.metaSearchPlaces = exports.globalConfigSearchPlacesSync = exports.globalConfigSearchPlaces =
|
|
227356
|
+
exports.defaultLoadersSync = exports.defaultLoaders = exports.metaSearchPlaces = exports.globalConfigSearchPlacesSync = exports.globalConfigSearchPlaces = void 0;
|
|
227357
|
+
exports.getDefaultSearchPlaces = getDefaultSearchPlaces;
|
|
227358
|
+
exports.getDefaultSearchPlacesSync = getDefaultSearchPlacesSync;
|
|
227087
227359
|
var loaders_1 = require_loaders();
|
|
227088
227360
|
function getDefaultSearchPlaces(moduleName2) {
|
|
227089
227361
|
return [
|
|
@@ -227110,7 +227382,6 @@ var require_defaults2 = __commonJS({
|
|
|
227110
227382
|
`${moduleName2}.config.mjs`
|
|
227111
227383
|
];
|
|
227112
227384
|
}
|
|
227113
|
-
exports.getDefaultSearchPlaces = getDefaultSearchPlaces;
|
|
227114
227385
|
function getDefaultSearchPlacesSync(moduleName2) {
|
|
227115
227386
|
return [
|
|
227116
227387
|
"package.json",
|
|
@@ -227133,7 +227404,6 @@ var require_defaults2 = __commonJS({
|
|
|
227133
227404
|
`${moduleName2}.config.cjs`
|
|
227134
227405
|
];
|
|
227135
227406
|
}
|
|
227136
|
-
exports.getDefaultSearchPlacesSync = getDefaultSearchPlacesSync;
|
|
227137
227407
|
exports.globalConfigSearchPlaces = [
|
|
227138
227408
|
"config",
|
|
227139
227409
|
"config.json",
|
|
@@ -227271,17 +227541,31 @@ var require_util3 = __commonJS({
|
|
|
227271
227541
|
}) : function(o2, v2) {
|
|
227272
227542
|
o2["default"] = v2;
|
|
227273
227543
|
});
|
|
227274
|
-
var __importStar = exports && exports.__importStar || function(
|
|
227275
|
-
|
|
227276
|
-
|
|
227277
|
-
|
|
227278
|
-
|
|
227279
|
-
|
|
227280
|
-
|
|
227281
|
-
|
|
227282
|
-
|
|
227544
|
+
var __importStar = exports && exports.__importStar || /* @__PURE__ */ (function() {
|
|
227545
|
+
var ownKeys = function(o2) {
|
|
227546
|
+
ownKeys = Object.getOwnPropertyNames || function(o3) {
|
|
227547
|
+
var ar = [];
|
|
227548
|
+
for (var k2 in o3) if (Object.prototype.hasOwnProperty.call(o3, k2)) ar[ar.length] = k2;
|
|
227549
|
+
return ar;
|
|
227550
|
+
};
|
|
227551
|
+
return ownKeys(o2);
|
|
227552
|
+
};
|
|
227553
|
+
return function(mod) {
|
|
227554
|
+
if (mod && mod.__esModule) return mod;
|
|
227555
|
+
var result = {};
|
|
227556
|
+
if (mod != null) {
|
|
227557
|
+
for (var k2 = ownKeys(mod), i2 = 0; i2 < k2.length; i2++) if (k2[i2] !== "default") __createBinding(result, mod, k2[i2]);
|
|
227558
|
+
}
|
|
227559
|
+
__setModuleDefault(result, mod);
|
|
227560
|
+
return result;
|
|
227561
|
+
};
|
|
227562
|
+
})();
|
|
227283
227563
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
227284
|
-
exports.
|
|
227564
|
+
exports.emplace = emplace;
|
|
227565
|
+
exports.getPropertyByPath = getPropertyByPath;
|
|
227566
|
+
exports.removeUndefinedValuesFromObject = removeUndefinedValuesFromObject;
|
|
227567
|
+
exports.isDirectory = isDirectory;
|
|
227568
|
+
exports.isDirectorySync = isDirectorySync;
|
|
227285
227569
|
var fs_1 = __importStar(__require("fs"));
|
|
227286
227570
|
function emplace(map, key, fn) {
|
|
227287
227571
|
const cached = map.get(key);
|
|
@@ -227292,7 +227576,6 @@ var require_util3 = __commonJS({
|
|
|
227292
227576
|
map.set(key, result);
|
|
227293
227577
|
return result;
|
|
227294
227578
|
}
|
|
227295
|
-
exports.emplace = emplace;
|
|
227296
227579
|
function getPropertyByPath(source, path9) {
|
|
227297
227580
|
if (typeof path9 === "string" && Object.prototype.hasOwnProperty.call(source, path9)) {
|
|
227298
227581
|
return source[path9];
|
|
@@ -227305,11 +227588,9 @@ var require_util3 = __commonJS({
|
|
|
227305
227588
|
return previous[key];
|
|
227306
227589
|
}, source);
|
|
227307
227590
|
}
|
|
227308
|
-
exports.getPropertyByPath = getPropertyByPath;
|
|
227309
227591
|
function removeUndefinedValuesFromObject(options) {
|
|
227310
227592
|
return Object.fromEntries(Object.entries(options).filter(([, value]) => value !== void 0));
|
|
227311
227593
|
}
|
|
227312
|
-
exports.removeUndefinedValuesFromObject = removeUndefinedValuesFromObject;
|
|
227313
227594
|
async function isDirectory(path9) {
|
|
227314
227595
|
try {
|
|
227315
227596
|
const stat2 = await fs_1.promises.stat(path9);
|
|
@@ -227321,7 +227602,6 @@ var require_util3 = __commonJS({
|
|
|
227321
227602
|
throw e2;
|
|
227322
227603
|
}
|
|
227323
227604
|
}
|
|
227324
|
-
exports.isDirectory = isDirectory;
|
|
227325
227605
|
function isDirectorySync(path9) {
|
|
227326
227606
|
try {
|
|
227327
227607
|
const stat2 = fs_1.default.statSync(path9);
|
|
@@ -227333,7 +227613,6 @@ var require_util3 = __commonJS({
|
|
|
227333
227613
|
throw e2;
|
|
227334
227614
|
}
|
|
227335
227615
|
}
|
|
227336
|
-
exports.isDirectorySync = isDirectorySync;
|
|
227337
227616
|
}
|
|
227338
227617
|
});
|
|
227339
227618
|
|
|
@@ -227345,7 +227624,8 @@ var require_ExplorerBase = __commonJS({
|
|
|
227345
227624
|
return mod && mod.__esModule ? mod : { "default": mod };
|
|
227346
227625
|
};
|
|
227347
227626
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
227348
|
-
exports.
|
|
227627
|
+
exports.ExplorerBase = void 0;
|
|
227628
|
+
exports.getExtensionDescription = getExtensionDescription;
|
|
227349
227629
|
var env_paths_1 = __importDefault(require_env_paths());
|
|
227350
227630
|
var os_1 = __importDefault(__require("os"));
|
|
227351
227631
|
var path_1 = __importDefault(__require("path"));
|
|
@@ -227451,7 +227731,6 @@ ${[...importStack, fullPath].map((path9, i2) => `${i2 + 1}. ${path9}`).join("\n"
|
|
|
227451
227731
|
function getExtensionDescription(extension) {
|
|
227452
227732
|
return extension ? `extension "${extension}"` : "files without extensions";
|
|
227453
227733
|
}
|
|
227454
|
-
exports.getExtensionDescription = getExtensionDescription;
|
|
227455
227734
|
}
|
|
227456
227735
|
});
|
|
227457
227736
|
|
|
@@ -227460,7 +227739,8 @@ var require_merge2 = __commonJS({
|
|
|
227460
227739
|
"node_modules/cosmiconfig/dist/merge.js"(exports) {
|
|
227461
227740
|
"use strict";
|
|
227462
227741
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
227463
|
-
exports.
|
|
227742
|
+
exports.hasOwn = void 0;
|
|
227743
|
+
exports.mergeAll = mergeAll;
|
|
227464
227744
|
exports.hasOwn = Function.prototype.call.bind(Object.prototype.hasOwnProperty);
|
|
227465
227745
|
var objToString = Function.prototype.call.bind(Object.prototype.toString);
|
|
227466
227746
|
function isPlainObject3(obj) {
|
|
@@ -227468,6 +227748,9 @@ var require_merge2 = __commonJS({
|
|
|
227468
227748
|
}
|
|
227469
227749
|
function merge2(target, source, options) {
|
|
227470
227750
|
for (const key of Object.keys(source)) {
|
|
227751
|
+
if (key === "__proto__" || key === "constructor") {
|
|
227752
|
+
continue;
|
|
227753
|
+
}
|
|
227471
227754
|
const newValue = source[key];
|
|
227472
227755
|
if ((0, exports.hasOwn)(target, key)) {
|
|
227473
227756
|
if (Array.isArray(target[key]) && Array.isArray(newValue)) {
|
|
@@ -227487,7 +227770,6 @@ var require_merge2 = __commonJS({
|
|
|
227487
227770
|
function mergeAll(objects, options) {
|
|
227488
227771
|
return objects.reduce((target, source) => merge2(target, source, options), {});
|
|
227489
227772
|
}
|
|
227490
|
-
exports.mergeAll = mergeAll;
|
|
227491
227773
|
}
|
|
227492
227774
|
});
|
|
227493
227775
|
|
|
@@ -227625,19 +227907,23 @@ var require_Explorer = __commonJS({
|
|
|
227625
227907
|
let currentDir = startDir;
|
|
227626
227908
|
while (true) {
|
|
227627
227909
|
yield { path: currentDir, isGlobalConfig: false };
|
|
227910
|
+
let foundPackageFile = false;
|
|
227628
227911
|
for (const ext of ["json", "yaml"]) {
|
|
227629
227912
|
const packageFile = path_1.default.join(currentDir, `package.${ext}`);
|
|
227630
227913
|
if (await this.#fileExists(packageFile)) {
|
|
227914
|
+
foundPackageFile = true;
|
|
227631
227915
|
break;
|
|
227632
227916
|
}
|
|
227633
227917
|
}
|
|
227918
|
+
if (foundPackageFile) {
|
|
227919
|
+
return;
|
|
227920
|
+
}
|
|
227634
227921
|
const parentDir = path_1.default.dirname(currentDir);
|
|
227635
227922
|
if (parentDir === currentDir) {
|
|
227636
|
-
|
|
227923
|
+
return;
|
|
227637
227924
|
}
|
|
227638
227925
|
currentDir = parentDir;
|
|
227639
227926
|
}
|
|
227640
|
-
return;
|
|
227641
227927
|
}
|
|
227642
227928
|
case "global": {
|
|
227643
227929
|
yield* this.getGlobalDirs(startDir);
|
|
@@ -227783,19 +228069,23 @@ var require_ExplorerSync = __commonJS({
|
|
|
227783
228069
|
let currentDir = startDir;
|
|
227784
228070
|
while (true) {
|
|
227785
228071
|
yield { path: currentDir, isGlobalConfig: false };
|
|
228072
|
+
let foundPackageFile = false;
|
|
227786
228073
|
for (const ext of ["json", "yaml"]) {
|
|
227787
228074
|
const packageFile = path_1.default.join(currentDir, `package.${ext}`);
|
|
227788
228075
|
if (this.#fileExists(packageFile)) {
|
|
228076
|
+
foundPackageFile = true;
|
|
227789
228077
|
break;
|
|
227790
228078
|
}
|
|
227791
228079
|
}
|
|
228080
|
+
if (foundPackageFile) {
|
|
228081
|
+
return;
|
|
228082
|
+
}
|
|
227792
228083
|
const parentDir = path_1.default.dirname(currentDir);
|
|
227793
228084
|
if (parentDir === currentDir) {
|
|
227794
|
-
|
|
228085
|
+
return;
|
|
227795
228086
|
}
|
|
227796
228087
|
currentDir = parentDir;
|
|
227797
228088
|
}
|
|
227798
|
-
return;
|
|
227799
228089
|
}
|
|
227800
228090
|
case "global": {
|
|
227801
228091
|
yield* this.getGlobalDirs(startDir);
|
|
@@ -227826,7 +228116,9 @@ var require_dist = __commonJS({
|
|
|
227826
228116
|
"node_modules/cosmiconfig/dist/index.js"(exports) {
|
|
227827
228117
|
"use strict";
|
|
227828
228118
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
227829
|
-
exports.defaultLoadersSync = exports.defaultLoaders = exports.globalConfigSearchPlacesSync = exports.globalConfigSearchPlaces = exports.getDefaultSearchPlacesSync = exports.getDefaultSearchPlaces =
|
|
228119
|
+
exports.defaultLoadersSync = exports.defaultLoaders = exports.globalConfigSearchPlacesSync = exports.globalConfigSearchPlaces = exports.getDefaultSearchPlacesSync = exports.getDefaultSearchPlaces = void 0;
|
|
228120
|
+
exports.cosmiconfig = cosmiconfig2;
|
|
228121
|
+
exports.cosmiconfigSync = cosmiconfigSync;
|
|
227830
228122
|
var defaults_1 = require_defaults2();
|
|
227831
228123
|
Object.defineProperty(exports, "defaultLoaders", { enumerable: true, get: function() {
|
|
227832
228124
|
return defaults_1.defaultLoaders;
|
|
@@ -227968,7 +228260,6 @@ var require_dist = __commonJS({
|
|
|
227968
228260
|
clearCaches: explorer.clearCaches.bind(explorer)
|
|
227969
228261
|
};
|
|
227970
228262
|
}
|
|
227971
|
-
exports.cosmiconfig = cosmiconfig2;
|
|
227972
228263
|
function cosmiconfigSync(moduleName2, options = {}) {
|
|
227973
228264
|
const normalizedOptions = mergeOptionsSync(moduleName2, options);
|
|
227974
228265
|
const explorerSync = new ExplorerSync_js_1.ExplorerSync(normalizedOptions);
|
|
@@ -227980,7 +228271,6 @@ var require_dist = __commonJS({
|
|
|
227980
228271
|
clearCaches: explorerSync.clearCaches.bind(explorerSync)
|
|
227981
228272
|
};
|
|
227982
228273
|
}
|
|
227983
|
-
exports.cosmiconfigSync = cosmiconfigSync;
|
|
227984
228274
|
}
|
|
227985
228275
|
});
|
|
227986
228276
|
|
|
@@ -231180,6 +231470,18 @@ var require_semver3 = __commonJS({
|
|
|
231180
231470
|
var { safeRe: re, t: t2 } = require_re2();
|
|
231181
231471
|
var parseOptions = require_parse_options2();
|
|
231182
231472
|
var { compareIdentifiers } = require_identifiers2();
|
|
231473
|
+
var isPrereleaseIdentifier = (prerelease, identifier) => {
|
|
231474
|
+
const identifiers = identifier.split(".");
|
|
231475
|
+
if (identifiers.length > prerelease.length) {
|
|
231476
|
+
return false;
|
|
231477
|
+
}
|
|
231478
|
+
for (let i2 = 0; i2 < identifiers.length; i2++) {
|
|
231479
|
+
if (compareIdentifiers(prerelease[i2], identifiers[i2]) !== 0) {
|
|
231480
|
+
return false;
|
|
231481
|
+
}
|
|
231482
|
+
}
|
|
231483
|
+
return true;
|
|
231484
|
+
};
|
|
231183
231485
|
var SemVer = class _SemVer {
|
|
231184
231486
|
constructor(version, options) {
|
|
231185
231487
|
options = parseOptions(options);
|
|
@@ -231426,8 +231728,9 @@ var require_semver3 = __commonJS({
|
|
|
231426
231728
|
if (identifierBase === false) {
|
|
231427
231729
|
prerelease = [identifier];
|
|
231428
231730
|
}
|
|
231429
|
-
if (
|
|
231430
|
-
|
|
231731
|
+
if (isPrereleaseIdentifier(this.prerelease, identifier)) {
|
|
231732
|
+
const prereleaseBase = this.prerelease[identifier.split(".").length];
|
|
231733
|
+
if (isNaN(prereleaseBase)) {
|
|
231431
231734
|
this.prerelease = prerelease;
|
|
231432
231735
|
}
|
|
231433
231736
|
} else {
|
|
@@ -232097,20 +232400,22 @@ var require_range2 = __commonJS({
|
|
|
232097
232400
|
return comp;
|
|
232098
232401
|
};
|
|
232099
232402
|
var isX = (id) => !id || id.toLowerCase() === "x" || id === "*";
|
|
232403
|
+
var invalidXRangeOrder = (M, m2, p2) => isX(M) && !isX(m2) || isX(m2) && p2 && !isX(p2);
|
|
232100
232404
|
var replaceTildes = (comp, options) => {
|
|
232101
232405
|
return comp.trim().split(/\s+/).map((c2) => replaceTilde(c2, options)).join(" ");
|
|
232102
232406
|
};
|
|
232103
232407
|
var replaceTilde = (comp, options) => {
|
|
232104
232408
|
const r2 = options.loose ? re[t2.TILDELOOSE] : re[t2.TILDE];
|
|
232409
|
+
const z2 = options.includePrerelease ? "-0" : "";
|
|
232105
232410
|
return comp.replace(r2, (_2, M, m2, p2, pr) => {
|
|
232106
232411
|
debug("tilde", comp, _2, M, m2, p2, pr);
|
|
232107
232412
|
let ret;
|
|
232108
232413
|
if (isX(M)) {
|
|
232109
232414
|
ret = "";
|
|
232110
232415
|
} else if (isX(m2)) {
|
|
232111
|
-
ret = `>=${M}.0.0 <${+M + 1}.0.0-0`;
|
|
232416
|
+
ret = `>=${M}.0.0${z2} <${+M + 1}.0.0-0`;
|
|
232112
232417
|
} else if (isX(p2)) {
|
|
232113
|
-
ret = `>=${M}.${m2}.0 <${M}.${+m2 + 1}.0-0`;
|
|
232418
|
+
ret = `>=${M}.${m2}.0${z2} <${M}.${+m2 + 1}.0-0`;
|
|
232114
232419
|
} else if (pr) {
|
|
232115
232420
|
debug("replaceTilde pr", pr);
|
|
232116
232421
|
ret = `>=${M}.${m2}.${p2}-${pr} <${M}.${+m2 + 1}.0-0`;
|
|
@@ -232156,9 +232461,9 @@ var require_range2 = __commonJS({
|
|
|
232156
232461
|
debug("no pr");
|
|
232157
232462
|
if (M === "0") {
|
|
232158
232463
|
if (m2 === "0") {
|
|
232159
|
-
ret = `>=${M}.${m2}.${p2}
|
|
232464
|
+
ret = `>=${M}.${m2}.${p2} <${M}.${m2}.${+p2 + 1}-0`;
|
|
232160
232465
|
} else {
|
|
232161
|
-
ret = `>=${M}.${m2}.${p2}
|
|
232466
|
+
ret = `>=${M}.${m2}.${p2} <${M}.${+m2 + 1}.0-0`;
|
|
232162
232467
|
}
|
|
232163
232468
|
} else {
|
|
232164
232469
|
ret = `>=${M}.${m2}.${p2} <${+M + 1}.0.0-0`;
|
|
@@ -232177,6 +232482,9 @@ var require_range2 = __commonJS({
|
|
|
232177
232482
|
const r2 = options.loose ? re[t2.XRANGELOOSE] : re[t2.XRANGE];
|
|
232178
232483
|
return comp.replace(r2, (ret, gtlt, M, m2, p2, pr) => {
|
|
232179
232484
|
debug("xRange", comp, ret, gtlt, M, m2, p2, pr);
|
|
232485
|
+
if (invalidXRangeOrder(M, m2, p2)) {
|
|
232486
|
+
return comp;
|
|
232487
|
+
}
|
|
232180
232488
|
const xM = isX(M);
|
|
232181
232489
|
const xm = xM || isX(m2);
|
|
232182
232490
|
const xp = xm || isX(p2);
|
|
@@ -233375,42 +233683,24 @@ var breakingChangeExclamationMark = (parsed, when = "always") => {
|
|
|
233375
233683
|
];
|
|
233376
233684
|
};
|
|
233377
233685
|
|
|
233378
|
-
// node_modules/es-toolkit/dist/predicate/
|
|
233379
|
-
function
|
|
233380
|
-
|
|
233381
|
-
|
|
233382
|
-
|
|
233383
|
-
|
|
233384
|
-
|
|
233385
|
-
|
|
233386
|
-
|
|
233387
|
-
|
|
233388
|
-
// node_modules/es-toolkit/dist/_internal/isUnsafeProperty.mjs
|
|
233389
|
-
function isUnsafeProperty(key) {
|
|
233390
|
-
return key === "__proto__";
|
|
233391
|
-
}
|
|
233392
|
-
|
|
233393
|
-
// node_modules/es-toolkit/dist/compat/util/toString.mjs
|
|
233394
|
-
function toString(value) {
|
|
233395
|
-
if (value == null) {
|
|
233396
|
-
return "";
|
|
233397
|
-
}
|
|
233398
|
-
if (typeof value === "string") {
|
|
233399
|
-
return value;
|
|
233400
|
-
}
|
|
233401
|
-
if (Array.isArray(value)) {
|
|
233402
|
-
return value.map(toString).join(",");
|
|
233403
|
-
}
|
|
233404
|
-
const result = String(value);
|
|
233405
|
-
if (result === "0" && Object.is(Number(value), -0)) {
|
|
233406
|
-
return "-0";
|
|
233686
|
+
// node_modules/es-toolkit/dist/compat/predicate/isPlainObject.mjs
|
|
233687
|
+
function isPlainObject(object) {
|
|
233688
|
+
if (typeof object !== "object") return false;
|
|
233689
|
+
if (object == null) return false;
|
|
233690
|
+
if (Object.getPrototypeOf(object) === null) return true;
|
|
233691
|
+
if (Object.prototype.toString.call(object) !== "[object Object]") {
|
|
233692
|
+
const tag = object[Symbol.toStringTag];
|
|
233693
|
+
if (tag == null) return false;
|
|
233694
|
+
if (!Object.getOwnPropertyDescriptor(object, Symbol.toStringTag)?.writable) return false;
|
|
233695
|
+
return object.toString() === `[object ${tag}]`;
|
|
233407
233696
|
}
|
|
233408
|
-
|
|
233697
|
+
let proto = object;
|
|
233698
|
+
while (Object.getPrototypeOf(proto) !== null) proto = Object.getPrototypeOf(proto);
|
|
233699
|
+
return Object.getPrototypeOf(object) === proto;
|
|
233409
233700
|
}
|
|
233410
233701
|
|
|
233411
|
-
// node_modules/es-toolkit/dist/
|
|
233412
|
-
function
|
|
233413
|
-
return value == null || typeof value !== "object" && typeof value !== "function";
|
|
233702
|
+
// node_modules/es-toolkit/dist/function/noop.mjs
|
|
233703
|
+
function noop() {
|
|
233414
233704
|
}
|
|
233415
233705
|
|
|
233416
233706
|
// node_modules/es-toolkit/dist/compat/_internal/getSymbols.mjs
|
|
@@ -233420,9 +233710,7 @@ function getSymbols(object) {
|
|
|
233420
233710
|
|
|
233421
233711
|
// node_modules/es-toolkit/dist/compat/_internal/getTag.mjs
|
|
233422
233712
|
function getTag(value) {
|
|
233423
|
-
if (value == null)
|
|
233424
|
-
return value === void 0 ? "[object Undefined]" : "[object Null]";
|
|
233425
|
-
}
|
|
233713
|
+
if (value == null) return value === void 0 ? "[object Undefined]" : "[object Null]";
|
|
233426
233714
|
return Object.prototype.toString.call(value);
|
|
233427
233715
|
}
|
|
233428
233716
|
|
|
@@ -233453,13 +233741,43 @@ var float64ArrayTag = "[object Float64Array]";
|
|
|
233453
233741
|
// node_modules/es-toolkit/dist/_internal/globalThis.mjs
|
|
233454
233742
|
var globalThis_ = typeof globalThis === "object" && globalThis || typeof window === "object" && window || typeof self === "object" && self || typeof global === "object" && global || /* @__PURE__ */ (function() {
|
|
233455
233743
|
return this;
|
|
233456
|
-
})()
|
|
233744
|
+
})();
|
|
233457
233745
|
|
|
233458
233746
|
// node_modules/es-toolkit/dist/predicate/isBuffer.mjs
|
|
233459
233747
|
function isBuffer(x2) {
|
|
233460
233748
|
return typeof globalThis_.Buffer !== "undefined" && globalThis_.Buffer.isBuffer(x2);
|
|
233461
233749
|
}
|
|
233462
233750
|
|
|
233751
|
+
// node_modules/es-toolkit/dist/predicate/isLength.mjs
|
|
233752
|
+
function isLength(value) {
|
|
233753
|
+
return Number.isSafeInteger(value) && value >= 0;
|
|
233754
|
+
}
|
|
233755
|
+
|
|
233756
|
+
// node_modules/es-toolkit/dist/compat/predicate/isArrayLike.mjs
|
|
233757
|
+
function isArrayLike(value) {
|
|
233758
|
+
return value != null && typeof value !== "function" && isLength(value.length);
|
|
233759
|
+
}
|
|
233760
|
+
|
|
233761
|
+
// node_modules/es-toolkit/dist/compat/util/toString.mjs
|
|
233762
|
+
function toString(value) {
|
|
233763
|
+
if (value == null) return "";
|
|
233764
|
+
if (typeof value === "string") return value;
|
|
233765
|
+
if (Array.isArray(value)) return value.map(toString).join(",");
|
|
233766
|
+
const result = String(value);
|
|
233767
|
+
if (result === "0" && Object.is(Number(value), -0)) return "-0";
|
|
233768
|
+
return result;
|
|
233769
|
+
}
|
|
233770
|
+
|
|
233771
|
+
// node_modules/es-toolkit/dist/_internal/isUnsafeProperty.mjs
|
|
233772
|
+
function isUnsafeProperty(key) {
|
|
233773
|
+
return key === "__proto__";
|
|
233774
|
+
}
|
|
233775
|
+
|
|
233776
|
+
// node_modules/es-toolkit/dist/predicate/isPrimitive.mjs
|
|
233777
|
+
function isPrimitive(value) {
|
|
233778
|
+
return value == null || typeof value !== "object" && typeof value !== "function";
|
|
233779
|
+
}
|
|
233780
|
+
|
|
233463
233781
|
// node_modules/es-toolkit/dist/predicate/isTypedArray.mjs
|
|
233464
233782
|
function isTypedArray(x2) {
|
|
233465
233783
|
return ArrayBuffer.isView(x2) && !(x2 instanceof DataView);
|
|
@@ -233471,32 +233789,18 @@ function cloneDeepWith(obj, cloneValue) {
|
|
|
233471
233789
|
}
|
|
233472
233790
|
function cloneDeepWithImpl(valueToClone, keyToClone, objectToClone, stack = /* @__PURE__ */ new Map(), cloneValue = void 0) {
|
|
233473
233791
|
const cloned = cloneValue?.(valueToClone, keyToClone, objectToClone, stack);
|
|
233474
|
-
if (cloned !== void 0)
|
|
233475
|
-
|
|
233476
|
-
|
|
233477
|
-
if (isPrimitive(valueToClone)) {
|
|
233478
|
-
return valueToClone;
|
|
233479
|
-
}
|
|
233480
|
-
if (stack.has(valueToClone)) {
|
|
233481
|
-
return stack.get(valueToClone);
|
|
233482
|
-
}
|
|
233792
|
+
if (cloned !== void 0) return cloned;
|
|
233793
|
+
if (isPrimitive(valueToClone)) return valueToClone;
|
|
233794
|
+
if (stack.has(valueToClone)) return stack.get(valueToClone);
|
|
233483
233795
|
if (Array.isArray(valueToClone)) {
|
|
233484
233796
|
const result = new Array(valueToClone.length);
|
|
233485
233797
|
stack.set(valueToClone, result);
|
|
233486
|
-
for (let i2 = 0; i2 < valueToClone.length; i2++)
|
|
233487
|
-
|
|
233488
|
-
|
|
233489
|
-
if (Object.hasOwn(valueToClone, "index")) {
|
|
233490
|
-
result.index = valueToClone.index;
|
|
233491
|
-
}
|
|
233492
|
-
if (Object.hasOwn(valueToClone, "input")) {
|
|
233493
|
-
result.input = valueToClone.input;
|
|
233494
|
-
}
|
|
233798
|
+
for (let i2 = 0; i2 < valueToClone.length; i2++) result[i2] = cloneDeepWithImpl(valueToClone[i2], i2, objectToClone, stack, cloneValue);
|
|
233799
|
+
if (Object.hasOwn(valueToClone, "index")) result.index = valueToClone.index;
|
|
233800
|
+
if (Object.hasOwn(valueToClone, "input")) result.input = valueToClone.input;
|
|
233495
233801
|
return result;
|
|
233496
233802
|
}
|
|
233497
|
-
if (valueToClone instanceof Date)
|
|
233498
|
-
return new Date(valueToClone.getTime());
|
|
233499
|
-
}
|
|
233803
|
+
if (valueToClone instanceof Date) return new Date(valueToClone.getTime());
|
|
233500
233804
|
if (valueToClone instanceof RegExp) {
|
|
233501
233805
|
const result = new RegExp(valueToClone.source, valueToClone.flags);
|
|
233502
233806
|
result.lastIndex = valueToClone.lastIndex;
|
|
@@ -233505,33 +233809,23 @@ function cloneDeepWithImpl(valueToClone, keyToClone, objectToClone, stack = /* @
|
|
|
233505
233809
|
if (valueToClone instanceof Map) {
|
|
233506
233810
|
const result = /* @__PURE__ */ new Map();
|
|
233507
233811
|
stack.set(valueToClone, result);
|
|
233508
|
-
for (const [key, value] of valueToClone)
|
|
233509
|
-
result.set(key, cloneDeepWithImpl(value, key, objectToClone, stack, cloneValue));
|
|
233510
|
-
}
|
|
233812
|
+
for (const [key, value] of valueToClone) result.set(key, cloneDeepWithImpl(value, key, objectToClone, stack, cloneValue));
|
|
233511
233813
|
return result;
|
|
233512
233814
|
}
|
|
233513
233815
|
if (valueToClone instanceof Set) {
|
|
233514
233816
|
const result = /* @__PURE__ */ new Set();
|
|
233515
233817
|
stack.set(valueToClone, result);
|
|
233516
|
-
for (const value of valueToClone)
|
|
233517
|
-
result.add(cloneDeepWithImpl(value, void 0, objectToClone, stack, cloneValue));
|
|
233518
|
-
}
|
|
233818
|
+
for (const value of valueToClone) result.add(cloneDeepWithImpl(value, void 0, objectToClone, stack, cloneValue));
|
|
233519
233819
|
return result;
|
|
233520
233820
|
}
|
|
233521
|
-
if (isBuffer(valueToClone))
|
|
233522
|
-
return valueToClone.subarray();
|
|
233523
|
-
}
|
|
233821
|
+
if (isBuffer(valueToClone)) return valueToClone.subarray();
|
|
233524
233822
|
if (isTypedArray(valueToClone)) {
|
|
233525
233823
|
const result = new (Object.getPrototypeOf(valueToClone)).constructor(valueToClone.length);
|
|
233526
233824
|
stack.set(valueToClone, result);
|
|
233527
|
-
for (let i2 = 0; i2 < valueToClone.length; i2++)
|
|
233528
|
-
result[i2] = cloneDeepWithImpl(valueToClone[i2], i2, objectToClone, stack, cloneValue);
|
|
233529
|
-
}
|
|
233825
|
+
for (let i2 = 0; i2 < valueToClone.length; i2++) result[i2] = cloneDeepWithImpl(valueToClone[i2], i2, objectToClone, stack, cloneValue);
|
|
233530
233826
|
return result;
|
|
233531
233827
|
}
|
|
233532
|
-
if (valueToClone instanceof ArrayBuffer || typeof SharedArrayBuffer !== "undefined" && valueToClone instanceof SharedArrayBuffer)
|
|
233533
|
-
return valueToClone.slice(0);
|
|
233534
|
-
}
|
|
233828
|
+
if (valueToClone instanceof ArrayBuffer || typeof SharedArrayBuffer !== "undefined" && valueToClone instanceof SharedArrayBuffer) return valueToClone.slice(0);
|
|
233535
233829
|
if (valueToClone instanceof DataView) {
|
|
233536
233830
|
const result = new DataView(valueToClone.buffer.slice(0), valueToClone.byteOffset, valueToClone.byteLength);
|
|
233537
233831
|
stack.set(valueToClone, result);
|
|
@@ -233539,9 +233833,7 @@ function cloneDeepWithImpl(valueToClone, keyToClone, objectToClone, stack = /* @
|
|
|
233539
233833
|
return result;
|
|
233540
233834
|
}
|
|
233541
233835
|
if (typeof File !== "undefined" && valueToClone instanceof File) {
|
|
233542
|
-
const result = new File([valueToClone], valueToClone.name, {
|
|
233543
|
-
type: valueToClone.type
|
|
233544
|
-
});
|
|
233836
|
+
const result = new File([valueToClone], valueToClone.name, { type: valueToClone.type });
|
|
233545
233837
|
stack.set(valueToClone, result);
|
|
233546
233838
|
copyProperties(result, valueToClone, objectToClone, stack, cloneValue);
|
|
233547
233839
|
return result;
|
|
@@ -233594,9 +233886,7 @@ function copyProperties(target, source, objectToClone = target, stack, cloneValu
|
|
|
233594
233886
|
for (let i2 = 0; i2 < keys.length; i2++) {
|
|
233595
233887
|
const key = keys[i2];
|
|
233596
233888
|
const descriptor = Object.getOwnPropertyDescriptor(target, key);
|
|
233597
|
-
if (descriptor == null || descriptor.writable)
|
|
233598
|
-
target[key] = cloneDeepWithImpl(source[key], key, objectToClone, stack, cloneValue);
|
|
233599
|
-
}
|
|
233889
|
+
if (descriptor == null || descriptor.writable) target[key] = cloneDeepWithImpl(source[key], key, objectToClone, stack, cloneValue);
|
|
233600
233890
|
}
|
|
233601
233891
|
}
|
|
233602
233892
|
function isCloneableObject(object) {
|
|
@@ -233622,12 +233912,10 @@ function isCloneableObject(object) {
|
|
|
233622
233912
|
case uint8ArrayTag:
|
|
233623
233913
|
case uint8ClampedArrayTag:
|
|
233624
233914
|
case uint16ArrayTag:
|
|
233625
|
-
case uint32ArrayTag:
|
|
233915
|
+
case uint32ArrayTag:
|
|
233626
233916
|
return true;
|
|
233627
|
-
|
|
233628
|
-
default: {
|
|
233917
|
+
default:
|
|
233629
233918
|
return false;
|
|
233630
|
-
}
|
|
233631
233919
|
}
|
|
233632
233920
|
}
|
|
233633
233921
|
|
|
@@ -233635,13 +233923,9 @@ function isCloneableObject(object) {
|
|
|
233635
233923
|
function cloneDeepWith2(obj, customizer) {
|
|
233636
233924
|
return cloneDeepWith(obj, (value, key, object, stack) => {
|
|
233637
233925
|
const cloned = customizer?.(value, key, object, stack);
|
|
233638
|
-
if (cloned !== void 0)
|
|
233639
|
-
|
|
233640
|
-
|
|
233641
|
-
if (typeof obj !== "object") {
|
|
233642
|
-
return void 0;
|
|
233643
|
-
}
|
|
233644
|
-
if (getTag(obj) === objectTag && typeof obj.constructor !== "function") {
|
|
233926
|
+
if (cloned !== void 0) return cloned;
|
|
233927
|
+
if (typeof obj !== "object") return;
|
|
233928
|
+
if (getTag(obj) === "[object Object]" && typeof obj.constructor !== "function") {
|
|
233645
233929
|
const result = {};
|
|
233646
233930
|
stack.set(obj, result);
|
|
233647
233931
|
copyProperties(result, obj, object, stack);
|
|
@@ -233662,9 +233946,8 @@ function cloneDeepWith2(obj, customizer) {
|
|
|
233662
233946
|
result[Symbol.iterator] = obj[Symbol.iterator];
|
|
233663
233947
|
return result;
|
|
233664
233948
|
}
|
|
233665
|
-
default:
|
|
233666
|
-
return
|
|
233667
|
-
}
|
|
233949
|
+
default:
|
|
233950
|
+
return;
|
|
233668
233951
|
}
|
|
233669
233952
|
});
|
|
233670
233953
|
}
|
|
@@ -233689,87 +233972,38 @@ function isArrayLikeObject(value) {
|
|
|
233689
233972
|
return isObjectLike(value) && isArrayLike(value);
|
|
233690
233973
|
}
|
|
233691
233974
|
|
|
233692
|
-
// node_modules/es-toolkit/dist/function/noop.mjs
|
|
233693
|
-
function noop() {
|
|
233694
|
-
}
|
|
233695
|
-
|
|
233696
233975
|
// node_modules/es-toolkit/dist/compat/predicate/isTypedArray.mjs
|
|
233697
233976
|
function isTypedArray2(x2) {
|
|
233698
233977
|
return isTypedArray(x2);
|
|
233699
233978
|
}
|
|
233700
233979
|
|
|
233701
|
-
// node_modules/es-toolkit/dist/compat/predicate/isPlainObject.mjs
|
|
233702
|
-
function isPlainObject(object) {
|
|
233703
|
-
if (typeof object !== "object") {
|
|
233704
|
-
return false;
|
|
233705
|
-
}
|
|
233706
|
-
if (object == null) {
|
|
233707
|
-
return false;
|
|
233708
|
-
}
|
|
233709
|
-
if (Object.getPrototypeOf(object) === null) {
|
|
233710
|
-
return true;
|
|
233711
|
-
}
|
|
233712
|
-
if (Object.prototype.toString.call(object) !== "[object Object]") {
|
|
233713
|
-
const tag = object[Symbol.toStringTag];
|
|
233714
|
-
if (tag == null) {
|
|
233715
|
-
return false;
|
|
233716
|
-
}
|
|
233717
|
-
const isTagReadonly = !Object.getOwnPropertyDescriptor(object, Symbol.toStringTag)?.writable;
|
|
233718
|
-
if (isTagReadonly) {
|
|
233719
|
-
return false;
|
|
233720
|
-
}
|
|
233721
|
-
return object.toString() === `[object ${tag}]`;
|
|
233722
|
-
}
|
|
233723
|
-
let proto = object;
|
|
233724
|
-
while (Object.getPrototypeOf(proto) !== null) {
|
|
233725
|
-
proto = Object.getPrototypeOf(proto);
|
|
233726
|
-
}
|
|
233727
|
-
return Object.getPrototypeOf(object) === proto;
|
|
233728
|
-
}
|
|
233729
|
-
|
|
233730
233980
|
// node_modules/es-toolkit/dist/object/clone.mjs
|
|
233731
233981
|
function clone(obj) {
|
|
233732
|
-
if (isPrimitive(obj))
|
|
233733
|
-
|
|
233734
|
-
}
|
|
233735
|
-
if (Array.isArray(obj) || isTypedArray(obj) || obj instanceof ArrayBuffer || typeof SharedArrayBuffer !== "undefined" && obj instanceof SharedArrayBuffer) {
|
|
233736
|
-
return obj.slice(0);
|
|
233737
|
-
}
|
|
233982
|
+
if (isPrimitive(obj)) return obj;
|
|
233983
|
+
if (Array.isArray(obj) || isTypedArray(obj) || obj instanceof ArrayBuffer || typeof SharedArrayBuffer !== "undefined" && obj instanceof SharedArrayBuffer) return obj.slice(0);
|
|
233738
233984
|
const prototype = Object.getPrototypeOf(obj);
|
|
233739
|
-
if (prototype == null)
|
|
233740
|
-
return Object.assign(Object.create(prototype), obj);
|
|
233741
|
-
}
|
|
233985
|
+
if (prototype == null) return Object.assign(Object.create(prototype), obj);
|
|
233742
233986
|
const Constructor = prototype.constructor;
|
|
233743
|
-
if (obj instanceof Date || obj instanceof Map || obj instanceof Set)
|
|
233744
|
-
return new Constructor(obj);
|
|
233745
|
-
}
|
|
233987
|
+
if (obj instanceof Date || obj instanceof Map || obj instanceof Set) return new Constructor(obj);
|
|
233746
233988
|
if (obj instanceof RegExp) {
|
|
233747
233989
|
const newRegExp = new Constructor(obj);
|
|
233748
233990
|
newRegExp.lastIndex = obj.lastIndex;
|
|
233749
233991
|
return newRegExp;
|
|
233750
233992
|
}
|
|
233751
|
-
if (obj instanceof DataView)
|
|
233752
|
-
return new Constructor(obj.buffer.slice(0));
|
|
233753
|
-
}
|
|
233993
|
+
if (obj instanceof DataView) return new Constructor(obj.buffer.slice(0));
|
|
233754
233994
|
if (obj instanceof Error) {
|
|
233755
233995
|
let newError;
|
|
233756
|
-
if (obj instanceof AggregateError) {
|
|
233757
|
-
|
|
233758
|
-
} else {
|
|
233759
|
-
newError = new Constructor(obj.message, { cause: obj.cause });
|
|
233760
|
-
}
|
|
233996
|
+
if (obj instanceof AggregateError) newError = new Constructor(obj.errors, obj.message, { cause: obj.cause });
|
|
233997
|
+
else newError = new Constructor(obj.message, { cause: obj.cause });
|
|
233761
233998
|
newError.stack = obj.stack;
|
|
233762
233999
|
Object.assign(newError, obj);
|
|
233763
234000
|
return newError;
|
|
233764
234001
|
}
|
|
233765
|
-
if (typeof File !== "undefined" && obj instanceof File) {
|
|
233766
|
-
|
|
233767
|
-
|
|
233768
|
-
}
|
|
233769
|
-
if (typeof obj === "object")
|
|
233770
|
-
const newObject = Object.create(prototype);
|
|
233771
|
-
return Object.assign(newObject, obj);
|
|
233772
|
-
}
|
|
234002
|
+
if (typeof File !== "undefined" && obj instanceof File) return new Constructor([obj], obj.name, {
|
|
234003
|
+
type: obj.type,
|
|
234004
|
+
lastModified: obj.lastModified
|
|
234005
|
+
});
|
|
234006
|
+
if (typeof obj === "object") return Object.assign(Object.create(prototype), obj);
|
|
233773
234007
|
return obj;
|
|
233774
234008
|
}
|
|
233775
234009
|
|
|
@@ -233785,72 +234019,43 @@ function mergeWith(object, ...otherArgs) {
|
|
|
233785
234019
|
return result;
|
|
233786
234020
|
}
|
|
233787
234021
|
function mergeWithDeep(target, source, merge2, stack) {
|
|
233788
|
-
if (isPrimitive(target))
|
|
233789
|
-
|
|
233790
|
-
|
|
233791
|
-
if (source == null || typeof source !== "object") {
|
|
233792
|
-
return target;
|
|
233793
|
-
}
|
|
233794
|
-
if (stack.has(source)) {
|
|
233795
|
-
return clone(stack.get(source));
|
|
233796
|
-
}
|
|
234022
|
+
if (isPrimitive(target)) target = Object(target);
|
|
234023
|
+
if (source == null || typeof source !== "object") return target;
|
|
234024
|
+
if (stack.has(source)) return clone(stack.get(source));
|
|
233797
234025
|
stack.set(source, target);
|
|
233798
234026
|
if (Array.isArray(source)) {
|
|
233799
234027
|
source = source.slice();
|
|
233800
|
-
for (let i2 = 0; i2 < source.length; i2++)
|
|
233801
|
-
source[i2] = source[i2] ?? void 0;
|
|
233802
|
-
}
|
|
234028
|
+
for (let i2 = 0; i2 < source.length; i2++) source[i2] = source[i2] ?? void 0;
|
|
233803
234029
|
}
|
|
233804
234030
|
const sourceKeys = [...Object.keys(source), ...getSymbols(source)];
|
|
233805
234031
|
for (let i2 = 0; i2 < sourceKeys.length; i2++) {
|
|
233806
234032
|
const key = sourceKeys[i2];
|
|
233807
|
-
if (isUnsafeProperty(key))
|
|
233808
|
-
continue;
|
|
233809
|
-
}
|
|
234033
|
+
if (isUnsafeProperty(key)) continue;
|
|
233810
234034
|
let sourceValue = source[key];
|
|
233811
234035
|
let targetValue = target[key];
|
|
233812
|
-
if (isArguments(sourceValue)) {
|
|
233813
|
-
|
|
233814
|
-
|
|
233815
|
-
if (
|
|
233816
|
-
|
|
233817
|
-
|
|
233818
|
-
|
|
233819
|
-
|
|
233820
|
-
|
|
233821
|
-
|
|
233822
|
-
|
|
233823
|
-
|
|
233824
|
-
|
|
233825
|
-
|
|
233826
|
-
|
|
233827
|
-
|
|
233828
|
-
}
|
|
233829
|
-
targetValue = cloned;
|
|
233830
|
-
} else if (isArrayLikeObject(targetValue)) {
|
|
233831
|
-
const cloned = [];
|
|
233832
|
-
for (let i3 = 0; i3 < targetValue.length; i3++) {
|
|
233833
|
-
cloned[i3] = targetValue[i3];
|
|
233834
|
-
}
|
|
233835
|
-
targetValue = cloned;
|
|
233836
|
-
} else {
|
|
233837
|
-
targetValue = [];
|
|
233838
|
-
}
|
|
233839
|
-
}
|
|
234036
|
+
if (isArguments(sourceValue)) sourceValue = { ...sourceValue };
|
|
234037
|
+
if (isArguments(targetValue)) targetValue = { ...targetValue };
|
|
234038
|
+
if (isBuffer(sourceValue)) sourceValue = cloneDeep(sourceValue);
|
|
234039
|
+
if (Array.isArray(sourceValue)) if (Array.isArray(targetValue)) {
|
|
234040
|
+
const cloned = [];
|
|
234041
|
+
const targetKeys = Reflect.ownKeys(targetValue);
|
|
234042
|
+
for (let i3 = 0; i3 < targetKeys.length; i3++) {
|
|
234043
|
+
const targetKey = targetKeys[i3];
|
|
234044
|
+
cloned[targetKey] = targetValue[targetKey];
|
|
234045
|
+
}
|
|
234046
|
+
targetValue = cloned;
|
|
234047
|
+
} else if (isArrayLikeObject(targetValue)) {
|
|
234048
|
+
const cloned = [];
|
|
234049
|
+
for (let i3 = 0; i3 < targetValue.length; i3++) cloned[i3] = targetValue[i3];
|
|
234050
|
+
targetValue = cloned;
|
|
234051
|
+
} else targetValue = [];
|
|
233840
234052
|
const merged = merge2(targetValue, sourceValue, key, target, source, stack);
|
|
233841
|
-
if (merged !== void 0)
|
|
233842
|
-
|
|
233843
|
-
|
|
233844
|
-
|
|
233845
|
-
|
|
233846
|
-
|
|
233847
|
-
} else if (targetValue == null && isPlainObject(sourceValue)) {
|
|
233848
|
-
target[key] = mergeWithDeep({}, sourceValue, merge2, stack);
|
|
233849
|
-
} else if (targetValue == null && isTypedArray2(sourceValue)) {
|
|
233850
|
-
target[key] = cloneDeep(sourceValue);
|
|
233851
|
-
} else if (targetValue === void 0 || sourceValue !== void 0) {
|
|
233852
|
-
target[key] = sourceValue;
|
|
233853
|
-
}
|
|
234053
|
+
if (merged !== void 0) target[key] = merged;
|
|
234054
|
+
else if (Array.isArray(sourceValue)) target[key] = mergeWithDeep(targetValue, sourceValue, merge2, stack);
|
|
234055
|
+
else if (isObjectLike(targetValue) && isObjectLike(sourceValue) && (isPlainObject(targetValue) || isPlainObject(sourceValue) || isTypedArray2(targetValue) || isTypedArray2(sourceValue))) target[key] = mergeWithDeep(targetValue, sourceValue, merge2, stack);
|
|
234056
|
+
else if (targetValue == null && isPlainObject(sourceValue)) target[key] = mergeWithDeep({}, sourceValue, merge2, stack);
|
|
234057
|
+
else if (targetValue == null && isTypedArray2(sourceValue)) target[key] = cloneDeep(sourceValue);
|
|
234058
|
+
else if (targetValue === void 0 || sourceValue !== void 0) target[key] = sourceValue;
|
|
233854
234059
|
}
|
|
233855
234060
|
return target;
|
|
233856
234061
|
}
|
|
@@ -233902,9 +234107,7 @@ function deburr(str) {
|
|
|
233902
234107
|
let result = "";
|
|
233903
234108
|
for (let i2 = 0; i2 < str.length; i2++) {
|
|
233904
234109
|
const char = str[i2];
|
|
233905
|
-
if (char >= "\u0300" && char <= "\u036F" || char >= "\uFE20" && char <= "\uFE23")
|
|
233906
|
-
continue;
|
|
233907
|
-
}
|
|
234110
|
+
if (char >= "\u0300" && char <= "\u036F" || char >= "\uFE20" && char <= "\uFE23") continue;
|
|
233908
234111
|
result += deburrMap.get(char) ?? char;
|
|
233909
234112
|
}
|
|
233910
234113
|
return result;
|
|
@@ -233924,18 +234127,14 @@ function words(str) {
|
|
|
233924
234127
|
// node_modules/es-toolkit/dist/string/camelCase.mjs
|
|
233925
234128
|
function camelCase(str) {
|
|
233926
234129
|
const words$1 = words(str);
|
|
233927
|
-
if (words$1.length === 0)
|
|
233928
|
-
return "";
|
|
233929
|
-
}
|
|
234130
|
+
if (words$1.length === 0) return "";
|
|
233930
234131
|
const [first, ...rest] = words$1;
|
|
233931
234132
|
return `${first.toLowerCase()}${rest.map((word) => capitalize(word)).join("")}`;
|
|
233932
234133
|
}
|
|
233933
234134
|
|
|
233934
234135
|
// node_modules/es-toolkit/dist/compat/_internal/normalizeForCase.mjs
|
|
233935
234136
|
function normalizeForCase(str) {
|
|
233936
|
-
if (typeof str !== "string")
|
|
233937
|
-
str = toString(str);
|
|
233938
|
-
}
|
|
234137
|
+
if (typeof str !== "string") str = toString(str);
|
|
233939
234138
|
return str.replace(/['\u2019]/g, "");
|
|
233940
234139
|
}
|
|
233941
234140
|
|
|
@@ -233946,8 +234145,7 @@ function camelCase2(str) {
|
|
|
233946
234145
|
|
|
233947
234146
|
// node_modules/es-toolkit/dist/string/kebabCase.mjs
|
|
233948
234147
|
function kebabCase(str) {
|
|
233949
|
-
|
|
233950
|
-
return words$1.map((word) => word.toLowerCase()).join("-");
|
|
234148
|
+
return words(str).map((word) => word.toLowerCase()).join("-");
|
|
233951
234149
|
}
|
|
233952
234150
|
|
|
233953
234151
|
// node_modules/es-toolkit/dist/compat/string/kebabCase.mjs
|
|
@@ -233957,8 +234155,7 @@ function kebabCase2(str) {
|
|
|
233957
234155
|
|
|
233958
234156
|
// node_modules/es-toolkit/dist/string/snakeCase.mjs
|
|
233959
234157
|
function snakeCase(str) {
|
|
233960
|
-
|
|
233961
|
-
return words$1.map((word) => word.toLowerCase()).join("_");
|
|
234158
|
+
return words(str).map((word) => word.toLowerCase()).join("_");
|
|
233962
234159
|
}
|
|
233963
234160
|
|
|
233964
234161
|
// node_modules/es-toolkit/dist/compat/string/snakeCase.mjs
|
|
@@ -233972,14 +234169,9 @@ function startCase(str) {
|
|
|
233972
234169
|
let result = "";
|
|
233973
234170
|
for (let i2 = 0; i2 < words$1.length; i2++) {
|
|
233974
234171
|
const word = words$1[i2];
|
|
233975
|
-
if (result)
|
|
233976
|
-
|
|
233977
|
-
|
|
233978
|
-
if (word === word.toUpperCase()) {
|
|
233979
|
-
result += word;
|
|
233980
|
-
} else {
|
|
233981
|
-
result += word[0].toUpperCase() + word.slice(1).toLowerCase();
|
|
233982
|
-
}
|
|
234172
|
+
if (result) result += " ";
|
|
234173
|
+
if (word === word.toUpperCase()) result += word;
|
|
234174
|
+
else result += word[0].toUpperCase() + word.slice(1).toLowerCase();
|
|
233983
234175
|
}
|
|
233984
234176
|
return result;
|
|
233985
234177
|
}
|
|
@@ -234675,7 +234867,7 @@ async function lint(message2, rawRulesConfig, rawOpts) {
|
|
|
234675
234867
|
input: message2
|
|
234676
234868
|
};
|
|
234677
234869
|
}
|
|
234678
|
-
const parsed = message2 === "" ? { header: null, body: null, footer: null } : await lib_default(message2,
|
|
234870
|
+
const parsed = message2 === "" ? { header: null, body: null, footer: null } : await lib_default(message2, opts.parser, opts.parserOpts);
|
|
234679
234871
|
if (parsed.header === null && parsed.body === null && parsed.footer === null) {
|
|
234680
234872
|
return {
|
|
234681
234873
|
valid: true,
|
|
@@ -240330,10 +240522,10 @@ var previouslyVisitedConfigs = [];
|
|
|
240330
240522
|
var shim2;
|
|
240331
240523
|
function applyExtends(config, cwd, mergeExtends, _shim) {
|
|
240332
240524
|
shim2 = _shim;
|
|
240333
|
-
let
|
|
240525
|
+
let defaultConfig2 = {};
|
|
240334
240526
|
if (Object.prototype.hasOwnProperty.call(config, "extends")) {
|
|
240335
240527
|
if (typeof config.extends !== "string")
|
|
240336
|
-
return
|
|
240528
|
+
return defaultConfig2;
|
|
240337
240529
|
const isPath = /\.json|\..*rc$/.test(config.extends);
|
|
240338
240530
|
let pathToDefault = null;
|
|
240339
240531
|
if (!isPath) {
|
|
@@ -240347,12 +240539,12 @@ function applyExtends(config, cwd, mergeExtends, _shim) {
|
|
|
240347
240539
|
}
|
|
240348
240540
|
checkForCircularExtends(pathToDefault);
|
|
240349
240541
|
previouslyVisitedConfigs.push(pathToDefault);
|
|
240350
|
-
|
|
240542
|
+
defaultConfig2 = isPath ? JSON.parse(shim2.readFileSync(pathToDefault, "utf8")) : _shim.require(config.extends);
|
|
240351
240543
|
delete config.extends;
|
|
240352
|
-
|
|
240544
|
+
defaultConfig2 = applyExtends(defaultConfig2, shim2.path.dirname(pathToDefault), mergeExtends, shim2);
|
|
240353
240545
|
}
|
|
240354
240546
|
previouslyVisitedConfigs = [];
|
|
240355
|
-
return mergeExtends ? mergeDeep(
|
|
240547
|
+
return mergeExtends ? mergeDeep(defaultConfig2, config) : Object.assign({}, defaultConfig2, config);
|
|
240356
240548
|
}
|
|
240357
240549
|
function checkForCircularExtends(cfgPath) {
|
|
240358
240550
|
if (previouslyVisitedConfigs.indexOf(cfgPath) > -1) {
|
|
@@ -241911,6 +242103,7 @@ var dynamicImport3 = async (id) => {
|
|
|
241911
242103
|
};
|
|
241912
242104
|
var pkg = require7("../package.json");
|
|
241913
242105
|
var gitDefaultCommentChar = "#";
|
|
242106
|
+
var defaultConfig = "@commitlint/config-conventional";
|
|
241914
242107
|
var cli = yargs_default(process.argv.slice(2)).options({
|
|
241915
242108
|
color: {
|
|
241916
242109
|
alias: "c",
|
|
@@ -241923,6 +242116,10 @@ var cli = yargs_default(process.argv.slice(2)).options({
|
|
|
241923
242116
|
description: "path to the config file; result code 9 if config is missing",
|
|
241924
242117
|
type: "string"
|
|
241925
242118
|
},
|
|
242119
|
+
"default-config": {
|
|
242120
|
+
description: "use built-in default config (@commitlint/config-conventional) when no rules are found",
|
|
242121
|
+
type: "boolean"
|
|
242122
|
+
},
|
|
241926
242123
|
"print-config": {
|
|
241927
242124
|
choices: ["", "text", "json"],
|
|
241928
242125
|
description: "print resolved config",
|
|
@@ -242057,10 +242254,7 @@ async function main(args) {
|
|
|
242057
242254
|
throw err;
|
|
242058
242255
|
}
|
|
242059
242256
|
if (typeof options["print-config"] === "string") {
|
|
242060
|
-
const loaded2 = await
|
|
242061
|
-
cwd: flags.cwd,
|
|
242062
|
-
file: flags.config
|
|
242063
|
-
});
|
|
242257
|
+
const loaded2 = await loadConfig2(flags);
|
|
242064
242258
|
switch (options["print-config"]) {
|
|
242065
242259
|
case "json":
|
|
242066
242260
|
console.log(JSON.stringify(loaded2));
|
|
@@ -242100,10 +242294,7 @@ async function main(args) {
|
|
|
242100
242294
|
console.log(err.message);
|
|
242101
242295
|
throw err;
|
|
242102
242296
|
}
|
|
242103
|
-
const loaded = await
|
|
242104
|
-
cwd: flags.cwd,
|
|
242105
|
-
file: flags.config
|
|
242106
|
-
});
|
|
242297
|
+
const loaded = await loadConfig2(flags);
|
|
242107
242298
|
const parserOpts = selectParserOpts(loaded.parserPreset);
|
|
242108
242299
|
const opts = {
|
|
242109
242300
|
parserOpts: {},
|
|
@@ -242151,7 +242342,8 @@ async function main(args) {
|
|
|
242151
242342
|
message: [
|
|
242152
242343
|
"Please add rules to your `commitlint.config.js`",
|
|
242153
242344
|
" - Getting started guide: https://commitlint.js.org/guides/getting-started",
|
|
242154
|
-
" - Example config: https://github.com/conventional-changelog/commitlint/blob/master/%40commitlint/config-conventional/src/index.ts"
|
|
242345
|
+
" - Example config: https://github.com/conventional-changelog/commitlint/blob/master/%40commitlint/config-conventional/src/index.ts",
|
|
242346
|
+
" - Or run commitlint with the built-in default config: commitlint --default-config"
|
|
242155
242347
|
].join("\n")
|
|
242156
242348
|
}
|
|
242157
242349
|
],
|
|
@@ -242244,6 +242436,26 @@ function getEditValue(flags) {
|
|
|
242244
242436
|
}
|
|
242245
242437
|
return edit;
|
|
242246
242438
|
}
|
|
242439
|
+
async function loadConfig2(flags) {
|
|
242440
|
+
const loaded = await load(getSeed(flags), {
|
|
242441
|
+
cwd: flags.cwd,
|
|
242442
|
+
file: flags.config
|
|
242443
|
+
});
|
|
242444
|
+
if (flags["default-config"] && Object.keys(loaded.rules).length === 0) {
|
|
242445
|
+
const extendsWithDefault = [resolveDefaultConfig(flags), ...flags.extends || []];
|
|
242446
|
+
return load(getSeed({ ...flags, extends: extendsWithDefault }), {
|
|
242447
|
+
cwd: flags.cwd,
|
|
242448
|
+
file: flags.config
|
|
242449
|
+
});
|
|
242450
|
+
}
|
|
242451
|
+
return loaded;
|
|
242452
|
+
}
|
|
242453
|
+
function resolveDefaultConfig(flags) {
|
|
242454
|
+
return resolveModulePath(defaultConfig, flags) || defaultConfig;
|
|
242455
|
+
}
|
|
242456
|
+
function resolveModulePath(moduleName2, flags) {
|
|
242457
|
+
return resolveFromSilent(moduleName2, __dirname4) || resolveFromSilent(moduleName2, flags.cwd) || resolveGlobalSilent(moduleName2);
|
|
242458
|
+
}
|
|
242247
242459
|
function getSeed(flags) {
|
|
242248
242460
|
const n2 = (flags.extends || []).filter((i2) => typeof i2 === "string");
|
|
242249
242461
|
return n2.length > 0 ? { extends: n2, parserPreset: flags["parser-preset"] } : { parserPreset: flags["parser-preset"] };
|
|
@@ -242259,7 +242471,7 @@ function selectParserOpts(parserPreset) {
|
|
|
242259
242471
|
}
|
|
242260
242472
|
function loadFormatter(config, flags) {
|
|
242261
242473
|
const moduleName2 = flags.format || config.formatter || "@commitlint/format";
|
|
242262
|
-
const modulePath =
|
|
242474
|
+
const modulePath = resolveModulePath(moduleName2, flags);
|
|
242263
242475
|
if (modulePath) {
|
|
242264
242476
|
return dynamicImport3(modulePath);
|
|
242265
242477
|
}
|
|
@@ -242289,6 +242501,7 @@ typescript/lib/typescript.js:
|
|
|
242289
242501
|
|
|
242290
242502
|
cosmiconfig/dist/loaders.js:
|
|
242291
242503
|
cosmiconfig/dist/util.js:
|
|
242504
|
+
cosmiconfig/dist/merge.js:
|
|
242292
242505
|
(* istanbul ignore next -- @preserve *)
|
|
242293
242506
|
|
|
242294
242507
|
cosmiconfig/dist/ExplorerBase.js:
|