@kode-ai-tools/cli 0.1.7 → 0.1.8
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/bin.js +106 -106
- package/package.json +1 -1
package/bin.js
CHANGED
|
@@ -13,7 +13,7 @@ import Vi from "buffer";
|
|
|
13
13
|
function si(e) {
|
|
14
14
|
return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
|
|
15
15
|
}
|
|
16
|
-
var Q = {},
|
|
16
|
+
var Q = {}, Be = {}, Ne = {}, Cs;
|
|
17
17
|
function Je() {
|
|
18
18
|
if (Cs) return Ne;
|
|
19
19
|
Cs = 1;
|
|
@@ -41,7 +41,7 @@ function Je() {
|
|
|
41
41
|
}
|
|
42
42
|
var Es;
|
|
43
43
|
function os() {
|
|
44
|
-
if (Es) return
|
|
44
|
+
if (Es) return Be;
|
|
45
45
|
Es = 1;
|
|
46
46
|
const { InvalidArgumentError: e } = Je();
|
|
47
47
|
class f {
|
|
@@ -136,7 +136,7 @@ function os() {
|
|
|
136
136
|
const i = D.name() + (D.variadic === !0 ? "..." : "");
|
|
137
137
|
return D.required ? "<" + i + ">" : "[" + i + "]";
|
|
138
138
|
}
|
|
139
|
-
return
|
|
139
|
+
return Be.Argument = f, Be.humanReadableArgName = d, Be;
|
|
140
140
|
}
|
|
141
141
|
var Te = {}, Le = {}, bs;
|
|
142
142
|
function ni() {
|
|
@@ -3066,54 +3066,54 @@ function ar(e, f, d = e, D = e.length + 1) {
|
|
|
3066
3066
|
d
|
|
3067
3067
|
) : "";
|
|
3068
3068
|
}
|
|
3069
|
-
function
|
|
3069
|
+
function B(e, f, d) {
|
|
3070
3070
|
return ar(`\x1B[${e}m`, `\x1B[${f}m`, d);
|
|
3071
3071
|
}
|
|
3072
|
-
const
|
|
3073
|
-
reset:
|
|
3074
|
-
bold:
|
|
3075
|
-
dim:
|
|
3076
|
-
italic:
|
|
3077
|
-
underline:
|
|
3078
|
-
inverse:
|
|
3079
|
-
hidden:
|
|
3080
|
-
strikethrough:
|
|
3081
|
-
black:
|
|
3082
|
-
red:
|
|
3083
|
-
green:
|
|
3084
|
-
yellow:
|
|
3085
|
-
blue:
|
|
3086
|
-
magenta:
|
|
3087
|
-
cyan:
|
|
3088
|
-
white:
|
|
3089
|
-
gray:
|
|
3090
|
-
bgBlack:
|
|
3091
|
-
bgRed:
|
|
3092
|
-
bgGreen:
|
|
3093
|
-
bgYellow:
|
|
3094
|
-
bgBlue:
|
|
3095
|
-
bgMagenta:
|
|
3096
|
-
bgCyan:
|
|
3097
|
-
bgWhite:
|
|
3098
|
-
blackBright:
|
|
3099
|
-
redBright:
|
|
3100
|
-
greenBright:
|
|
3101
|
-
yellowBright:
|
|
3102
|
-
blueBright:
|
|
3103
|
-
magentaBright:
|
|
3104
|
-
cyanBright:
|
|
3105
|
-
whiteBright:
|
|
3106
|
-
bgBlackBright:
|
|
3107
|
-
bgRedBright:
|
|
3108
|
-
bgGreenBright:
|
|
3109
|
-
bgYellowBright:
|
|
3110
|
-
bgBlueBright:
|
|
3111
|
-
bgMagentaBright:
|
|
3112
|
-
bgCyanBright:
|
|
3113
|
-
bgWhiteBright:
|
|
3072
|
+
const ks = {
|
|
3073
|
+
reset: B(0, 0),
|
|
3074
|
+
bold: B(1, 22, "\x1B[22m\x1B[1m"),
|
|
3075
|
+
dim: B(2, 22, "\x1B[22m\x1B[2m"),
|
|
3076
|
+
italic: B(3, 23),
|
|
3077
|
+
underline: B(4, 24),
|
|
3078
|
+
inverse: B(7, 27),
|
|
3079
|
+
hidden: B(8, 28),
|
|
3080
|
+
strikethrough: B(9, 29),
|
|
3081
|
+
black: B(30, 39),
|
|
3082
|
+
red: B(31, 39),
|
|
3083
|
+
green: B(32, 39),
|
|
3084
|
+
yellow: B(33, 39),
|
|
3085
|
+
blue: B(34, 39),
|
|
3086
|
+
magenta: B(35, 39),
|
|
3087
|
+
cyan: B(36, 39),
|
|
3088
|
+
white: B(37, 39),
|
|
3089
|
+
gray: B(90, 39),
|
|
3090
|
+
bgBlack: B(40, 49),
|
|
3091
|
+
bgRed: B(41, 49),
|
|
3092
|
+
bgGreen: B(42, 49),
|
|
3093
|
+
bgYellow: B(43, 49),
|
|
3094
|
+
bgBlue: B(44, 49),
|
|
3095
|
+
bgMagenta: B(45, 49),
|
|
3096
|
+
bgCyan: B(46, 49),
|
|
3097
|
+
bgWhite: B(47, 49),
|
|
3098
|
+
blackBright: B(90, 39),
|
|
3099
|
+
redBright: B(91, 39),
|
|
3100
|
+
greenBright: B(92, 39),
|
|
3101
|
+
yellowBright: B(93, 39),
|
|
3102
|
+
blueBright: B(94, 39),
|
|
3103
|
+
magentaBright: B(95, 39),
|
|
3104
|
+
cyanBright: B(96, 39),
|
|
3105
|
+
whiteBright: B(97, 39),
|
|
3106
|
+
bgBlackBright: B(100, 49),
|
|
3107
|
+
bgRedBright: B(101, 49),
|
|
3108
|
+
bgGreenBright: B(102, 49),
|
|
3109
|
+
bgYellowBright: B(103, 49),
|
|
3110
|
+
bgBlueBright: B(104, 49),
|
|
3111
|
+
bgMagentaBright: B(105, 49),
|
|
3112
|
+
bgCyanBright: B(106, 49),
|
|
3113
|
+
bgWhiteBright: B(107, 49)
|
|
3114
3114
|
};
|
|
3115
3115
|
function ur(e = rr) {
|
|
3116
|
-
return e ?
|
|
3116
|
+
return e ? ks : Object.fromEntries(Object.keys(ks).map((f) => [f, String]));
|
|
3117
3117
|
}
|
|
3118
3118
|
const J = ur();
|
|
3119
3119
|
function lr(e, f = "reset") {
|
|
@@ -3126,7 +3126,7 @@ const cr = [
|
|
|
3126
3126
|
function se(e) {
|
|
3127
3127
|
return e.replace(new RegExp(cr, "g"), "");
|
|
3128
3128
|
}
|
|
3129
|
-
const
|
|
3129
|
+
const Bs = {
|
|
3130
3130
|
solid: {
|
|
3131
3131
|
tl: "┌",
|
|
3132
3132
|
tr: "┐",
|
|
@@ -3209,7 +3209,7 @@ function hr(e, f = {}) {
|
|
|
3209
3209
|
}
|
|
3210
3210
|
}, D = e.split(`
|
|
3211
3211
|
`), i = [], l = lr(d.style.borderColor), r = {
|
|
3212
|
-
...typeof d.style.borderStyle == "string" ?
|
|
3212
|
+
...typeof d.style.borderStyle == "string" ? Bs[d.style.borderStyle] || Bs.solid : d.style.borderStyle
|
|
3213
3213
|
};
|
|
3214
3214
|
if (l)
|
|
3215
3215
|
for (const c in r)
|
|
@@ -3290,12 +3290,12 @@ new Proxy(Er, { get(e, f) {
|
|
|
3290
3290
|
if (f in e) return e[f];
|
|
3291
3291
|
if (f in Ns) return Ns[f];
|
|
3292
3292
|
} });
|
|
3293
|
-
const br = globalThis.process?.release?.name === "node", Sr = !!globalThis.Bun || !!globalThis.process?.versions?.bun, vr = !!globalThis.Deno, Ar = !!globalThis.fastly, wr = !!globalThis.Netlify, _r = !!globalThis.EdgeRuntime, Or = globalThis.navigator?.userAgent === "Cloudflare-Workers",
|
|
3294
|
-
function
|
|
3295
|
-
const e =
|
|
3293
|
+
const br = globalThis.process?.release?.name === "node", Sr = !!globalThis.Bun || !!globalThis.process?.versions?.bun, vr = !!globalThis.Deno, Ar = !!globalThis.fastly, wr = !!globalThis.Netlify, _r = !!globalThis.EdgeRuntime, Or = globalThis.navigator?.userAgent === "Cloudflare-Workers", kr = [[wr, "netlify"], [_r, "edge-light"], [Or, "workerd"], [Ar, "fastly"], [vr, "deno"], [Sr, "bun"], [br, "node"]];
|
|
3294
|
+
function Br() {
|
|
3295
|
+
const e = kr.find((f) => f[0]);
|
|
3296
3296
|
if (e) return { name: e[1] };
|
|
3297
3297
|
}
|
|
3298
|
-
const Nr =
|
|
3298
|
+
const Nr = Br();
|
|
3299
3299
|
Nr?.name;
|
|
3300
3300
|
function Tr({ onlyFirst: e = !1 } = {}) {
|
|
3301
3301
|
const d = [
|
|
@@ -4387,9 +4387,9 @@ ${p}`) + "'";
|
|
|
4387
4387
|
`;
|
|
4388
4388
|
let S, w;
|
|
4389
4389
|
for (w = p.length; w > 0; --w) {
|
|
4390
|
-
const
|
|
4391
|
-
if (
|
|
4392
|
-
` &&
|
|
4390
|
+
const k = p[w - 1];
|
|
4391
|
+
if (k !== `
|
|
4392
|
+
` && k !== " " && k !== " ")
|
|
4393
4393
|
break;
|
|
4394
4394
|
}
|
|
4395
4395
|
let v = p.substring(w);
|
|
@@ -4399,10 +4399,10 @@ ${p}`) + "'";
|
|
|
4399
4399
|
` && (v = v.slice(0, -1)), v = v.replace(h, `$&${E}`));
|
|
4400
4400
|
let _ = !1, O, q = -1;
|
|
4401
4401
|
for (O = 0; O < p.length; ++O) {
|
|
4402
|
-
const
|
|
4403
|
-
if (
|
|
4402
|
+
const k = p[O];
|
|
4403
|
+
if (k === " ")
|
|
4404
4404
|
_ = !0;
|
|
4405
|
-
else if (
|
|
4405
|
+
else if (k === `
|
|
4406
4406
|
`)
|
|
4407
4407
|
q = O;
|
|
4408
4408
|
else
|
|
@@ -4412,14 +4412,14 @@ ${p}`) + "'";
|
|
|
4412
4412
|
$ && (p = p.substring($.length), $ = $.replace(/\n+/g, `$&${E}`));
|
|
4413
4413
|
let R = (_ ? E ? "2" : "1" : "") + S;
|
|
4414
4414
|
if (s && (R += " " + C(s.replace(/ ?[\r\n]+/g, " ")), y && y()), !b) {
|
|
4415
|
-
const
|
|
4415
|
+
const k = p.replace(/\n+/g, `
|
|
4416
4416
|
$&`).replace(/(?:^|\n)([\t ].*)(?:([\n\t ]*)\n(?![\n\t ]))?/g, "$1$2").replace(/\n+/g, `$&${E}`);
|
|
4417
4417
|
let Y = !1;
|
|
4418
4418
|
const P = d(g, !0);
|
|
4419
4419
|
m !== "folded" && c !== e.Scalar.BLOCK_FOLDED && (P.onOverflow = () => {
|
|
4420
4420
|
Y = !0;
|
|
4421
4421
|
});
|
|
4422
|
-
const W = f.foldFlowLines(`${$}${
|
|
4422
|
+
const W = f.foldFlowLines(`${$}${k}${v}`, E, f.FOLD_BLOCK, P);
|
|
4423
4423
|
if (!Y)
|
|
4424
4424
|
return `>${R}
|
|
4425
4425
|
${E}${W}`;
|
|
@@ -4638,8 +4638,8 @@ ${o.indent}`;
|
|
|
4638
4638
|
if ($ || !H) {
|
|
4639
4639
|
let R = !1;
|
|
4640
4640
|
if ($ && (O === "&" || O === "!")) {
|
|
4641
|
-
let
|
|
4642
|
-
O === "&" &&
|
|
4641
|
+
let k = A.indexOf(" ");
|
|
4642
|
+
O === "&" && k !== -1 && k < q && A[k + 1] === "!" && (k = A.indexOf(" ", k + 1)), (k === -1 || q < k) && (R = !0);
|
|
4643
4643
|
}
|
|
4644
4644
|
R || (_ = `
|
|
4645
4645
|
${o.indent}`);
|
|
@@ -5120,9 +5120,9 @@ function tt() {
|
|
|
5120
5120
|
};
|
|
5121
5121
|
return Ot.string = f, Ot;
|
|
5122
5122
|
}
|
|
5123
|
-
var Ke = {},
|
|
5123
|
+
var Ke = {}, kt = {}, un;
|
|
5124
5124
|
function ps() {
|
|
5125
|
-
if (un) return
|
|
5125
|
+
if (un) return kt;
|
|
5126
5126
|
un = 1;
|
|
5127
5127
|
var e = j();
|
|
5128
5128
|
const f = {
|
|
@@ -5134,11 +5134,11 @@ function ps() {
|
|
|
5134
5134
|
resolve: () => new e.Scalar(null),
|
|
5135
5135
|
stringify: ({ source: d }, D) => typeof d == "string" && f.test.test(d) ? d : D.options.nullStr
|
|
5136
5136
|
};
|
|
5137
|
-
return
|
|
5137
|
+
return kt.nullTag = f, kt;
|
|
5138
5138
|
}
|
|
5139
|
-
var
|
|
5139
|
+
var Bt = {}, ln;
|
|
5140
5140
|
function yi() {
|
|
5141
|
-
if (ln) return
|
|
5141
|
+
if (ln) return Bt;
|
|
5142
5142
|
ln = 1;
|
|
5143
5143
|
var e = j();
|
|
5144
5144
|
const f = {
|
|
@@ -5156,7 +5156,7 @@ function yi() {
|
|
|
5156
5156
|
return D ? i.options.trueStr : i.options.falseStr;
|
|
5157
5157
|
}
|
|
5158
5158
|
};
|
|
5159
|
-
return
|
|
5159
|
+
return Bt.boolTag = f, Bt;
|
|
5160
5160
|
}
|
|
5161
5161
|
var ye = {}, Nt = {}, cn;
|
|
5162
5162
|
function _e() {
|
|
@@ -6188,10 +6188,10 @@ ${c}
|
|
|
6188
6188
|
};
|
|
6189
6189
|
return he.YAMLError = e, he.YAMLParseError = f, he.YAMLWarning = d, he.prettifyError = D, he;
|
|
6190
6190
|
}
|
|
6191
|
-
var Mt = {}, We = {}, qt = {}, Rt = {}, jt = {},
|
|
6191
|
+
var Mt = {}, We = {}, qt = {}, Rt = {}, jt = {}, kn;
|
|
6192
6192
|
function it() {
|
|
6193
|
-
if (
|
|
6194
|
-
|
|
6193
|
+
if (kn) return jt;
|
|
6194
|
+
kn = 1;
|
|
6195
6195
|
function e(f, { flow: d, indicator: D, next: i, offset: l, onError: r, parentIndent: o, startOnNewline: h }) {
|
|
6196
6196
|
let u = !1, n = h, t = h, s = "", c = "", p = !1, g = !1, y = null, a = null, m = null, C = null, F = null, E = null, b = null;
|
|
6197
6197
|
for (const v of f)
|
|
@@ -6243,10 +6243,10 @@ function it() {
|
|
|
6243
6243
|
}
|
|
6244
6244
|
return jt.resolveProps = e, jt;
|
|
6245
6245
|
}
|
|
6246
|
-
var Vt = {},
|
|
6246
|
+
var Vt = {}, Bn;
|
|
6247
6247
|
function Ds() {
|
|
6248
|
-
if (
|
|
6249
|
-
|
|
6248
|
+
if (Bn) return Vt;
|
|
6249
|
+
Bn = 1;
|
|
6250
6250
|
function e(f) {
|
|
6251
6251
|
if (!f)
|
|
6252
6252
|
return null;
|
|
@@ -6298,7 +6298,7 @@ function Oi() {
|
|
|
6298
6298
|
return Kt.flowIndentCheck = f, Kt;
|
|
6299
6299
|
}
|
|
6300
6300
|
var Ut = {}, Tn;
|
|
6301
|
-
function
|
|
6301
|
+
function ki() {
|
|
6302
6302
|
if (Tn) return Ut;
|
|
6303
6303
|
Tn = 1;
|
|
6304
6304
|
var e = N();
|
|
@@ -6315,7 +6315,7 @@ var Ln;
|
|
|
6315
6315
|
function co() {
|
|
6316
6316
|
if (Ln) return Rt;
|
|
6317
6317
|
Ln = 1;
|
|
6318
|
-
var e = re(), f = oe(), d = it(), D = Ds(), i = Oi(), l =
|
|
6318
|
+
var e = re(), f = oe(), d = it(), D = Ds(), i = Oi(), l = ki();
|
|
6319
6319
|
const r = "All mapping items must start at the same column";
|
|
6320
6320
|
function o({ composeNode: h, composeEmptyNode: u }, n, t, s, c) {
|
|
6321
6321
|
const p = c?.nodeClass ?? f.YAMLMap, g = new p(n.schema);
|
|
@@ -6435,7 +6435,7 @@ var Pn;
|
|
|
6435
6435
|
function ho() {
|
|
6436
6436
|
if (Pn) return Yt;
|
|
6437
6437
|
Pn = 1;
|
|
6438
|
-
var e = N(), f = re(), d = oe(), D = ae(), i = Oe(), l = it(), r = Ds(), o =
|
|
6438
|
+
var e = N(), f = re(), d = oe(), D = ae(), i = Oe(), l = it(), r = Ds(), o = ki();
|
|
6439
6439
|
const h = "Block collections are not allowed within flow collections", u = (t) => t && (t.type === "block-map" || t.type === "block-seq");
|
|
6440
6440
|
function n({ composeNode: t, composeEmptyNode: s }, c, p, g, y) {
|
|
6441
6441
|
const a = p.start.source === "{", m = a ? "flow map" : "flow sequence", C = y?.nodeClass ?? (a ? d.YAMLMap : D.YAMLSeq), F = new C(c.schema);
|
|
@@ -6444,7 +6444,7 @@ function ho() {
|
|
|
6444
6444
|
E && (c.atRoot = !1), c.atKey && (c.atKey = !1);
|
|
6445
6445
|
let b = p.offset + p.start.source.length;
|
|
6446
6446
|
for (let _ = 0; _ < p.items.length; ++_) {
|
|
6447
|
-
const O = p.items[_], { start: q, key: $, sep: H, value: R } = O,
|
|
6447
|
+
const O = p.items[_], { start: q, key: $, sep: H, value: R } = O, k = l.resolveProps(q, {
|
|
6448
6448
|
flow: m,
|
|
6449
6449
|
indicator: "explicit-key-ind",
|
|
6450
6450
|
next: $ ?? H?.[0],
|
|
@@ -6453,10 +6453,10 @@ function ho() {
|
|
|
6453
6453
|
parentIndent: p.indent,
|
|
6454
6454
|
startOnNewline: !1
|
|
6455
6455
|
});
|
|
6456
|
-
if (!
|
|
6457
|
-
if (!
|
|
6458
|
-
_ === 0 &&
|
|
6459
|
-
` +
|
|
6456
|
+
if (!k.found) {
|
|
6457
|
+
if (!k.anchor && !k.tag && !H && !R) {
|
|
6458
|
+
_ === 0 && k.comma ? g(k.comma, "UNEXPECTED_TOKEN", `Unexpected , in ${m}`) : _ < p.items.length - 1 && g(k.start, "UNEXPECTED_TOKEN", `Unexpected empty item in ${m}`), k.comment && (F.comment ? F.comment += `
|
|
6459
|
+
` + k.comment : F.comment = k.comment), b = k.end;
|
|
6460
6460
|
continue;
|
|
6461
6461
|
}
|
|
6462
6462
|
!a && c.options.strict && r.containsNewline($) && g(
|
|
@@ -6467,8 +6467,8 @@ function ho() {
|
|
|
6467
6467
|
);
|
|
6468
6468
|
}
|
|
6469
6469
|
if (_ === 0)
|
|
6470
|
-
|
|
6471
|
-
else if (
|
|
6470
|
+
k.comma && g(k.comma, "UNEXPECTED_TOKEN", `Unexpected , in ${m}`);
|
|
6471
|
+
else if (k.comma || g(k.start, "MISSING_CHAR", `Missing , between ${m} items`), k.comment) {
|
|
6472
6472
|
let Y = "";
|
|
6473
6473
|
e: for (const P of q)
|
|
6474
6474
|
switch (P.type) {
|
|
@@ -6484,15 +6484,15 @@ function ho() {
|
|
|
6484
6484
|
if (Y) {
|
|
6485
6485
|
let P = F.items[F.items.length - 1];
|
|
6486
6486
|
e.isPair(P) && (P = P.value ?? P.key), P.comment ? P.comment += `
|
|
6487
|
-
` + Y : P.comment = Y,
|
|
6487
|
+
` + Y : P.comment = Y, k.comment = k.comment.substring(Y.length + 1);
|
|
6488
6488
|
}
|
|
6489
6489
|
}
|
|
6490
|
-
if (!a && !H && !
|
|
6491
|
-
const Y = R ? t(c, R,
|
|
6490
|
+
if (!a && !H && !k.found) {
|
|
6491
|
+
const Y = R ? t(c, R, k, g) : s(c, k.end, H, null, k, g);
|
|
6492
6492
|
F.items.push(Y), b = Y.range[2], u(R) && g(Y.range, "BLOCK_IN_FLOW", h);
|
|
6493
6493
|
} else {
|
|
6494
6494
|
c.atKey = !0;
|
|
6495
|
-
const Y =
|
|
6495
|
+
const Y = k.end, P = $ ? t(c, $, k, g) : s(c, Y, q, null, k, g);
|
|
6496
6496
|
u($) && g(P.range, "BLOCK_IN_FLOW", h), c.atKey = !1;
|
|
6497
6497
|
const W = l.resolveProps(H ?? [], {
|
|
6498
6498
|
flow: m,
|
|
@@ -6504,7 +6504,7 @@ function ho() {
|
|
|
6504
6504
|
startOnNewline: !1
|
|
6505
6505
|
});
|
|
6506
6506
|
if (W.found) {
|
|
6507
|
-
if (!a && !
|
|
6507
|
+
if (!a && !k.found && c.options.strict) {
|
|
6508
6508
|
if (H)
|
|
6509
6509
|
for (const z of H) {
|
|
6510
6510
|
if (z === W.found)
|
|
@@ -6514,7 +6514,7 @@ function ho() {
|
|
|
6514
6514
|
break;
|
|
6515
6515
|
}
|
|
6516
6516
|
}
|
|
6517
|
-
|
|
6517
|
+
k.start < W.found.offset - 1024 && g(W.found, "KEY_OVER_1024_CHARS", "The : indicator must be at most 1024 chars after the start of an implicit flow sequence key");
|
|
6518
6518
|
}
|
|
6519
6519
|
} else R && ("source" in R && R.source?.[0] === ":" ? g(R, "MISSING_CHAR", `Missing space after : in ${m}`) : g(W.start, "MISSING_CHAR", `Missing , or : between ${m} items`));
|
|
6520
6520
|
const ue = R ? t(c, R, W, g) : W.found ? s(c, W.end, H, null, W, g) : null;
|
|
@@ -6583,7 +6583,7 @@ function po() {
|
|
|
6583
6583
|
return qt.composeCollection = h, qt;
|
|
6584
6584
|
}
|
|
6585
6585
|
var Gt = {}, Jt = {}, qn;
|
|
6586
|
-
function
|
|
6586
|
+
function Bi() {
|
|
6587
6587
|
if (qn) return Jt;
|
|
6588
6588
|
qn = 1;
|
|
6589
6589
|
var e = j();
|
|
@@ -6896,7 +6896,7 @@ var jn;
|
|
|
6896
6896
|
function Do() {
|
|
6897
6897
|
if (jn) return Gt;
|
|
6898
6898
|
jn = 1;
|
|
6899
|
-
var e = N(), f = j(), d =
|
|
6899
|
+
var e = N(), f = j(), d = Bi(), D = Ni();
|
|
6900
6900
|
function i(o, h, u, n) {
|
|
6901
6901
|
const { value: t, type: s, comment: c, range: p } = h.type === "block-scalar" ? d.resolveBlockScalar(o, h, n) : D.resolveFlowScalar(h, o.options.strict, n), g = u ? o.directives.tagName(u.source, (m) => n(u, "TAG_RESOLVE_FAILED", m)) : null;
|
|
6902
6902
|
let y;
|
|
@@ -7193,7 +7193,7 @@ var G = {}, Se = {}, Yn;
|
|
|
7193
7193
|
function Fo() {
|
|
7194
7194
|
if (Yn) return Se;
|
|
7195
7195
|
Yn = 1;
|
|
7196
|
-
var e =
|
|
7196
|
+
var e = Bi(), f = Ni(), d = nt(), D = xe();
|
|
7197
7197
|
function i(n, t = !0, s) {
|
|
7198
7198
|
if (n) {
|
|
7199
7199
|
const c = (p, g, y) => {
|
|
@@ -8713,7 +8713,7 @@ function So() {
|
|
|
8713
8713
|
return T.Composer = e.Composer, T.Document = f.Document, T.Schema = d.Schema, T.YAMLError = D.YAMLError, T.YAMLParseError = D.YAMLParseError, T.YAMLWarning = D.YAMLWarning, T.Alias = i.Alias, T.isAlias = l.isAlias, T.isCollection = l.isCollection, T.isDocument = l.isDocument, T.isMap = l.isMap, T.isNode = l.isNode, T.isPair = l.isPair, T.isScalar = l.isScalar, T.isSeq = l.isSeq, T.Pair = r.Pair, T.Scalar = o.Scalar, T.YAMLMap = h.YAMLMap, T.YAMLSeq = u.YAMLSeq, T.CST = n, T.Lexer = t.Lexer, T.LineCounter = s.LineCounter, T.Parser = c.Parser, T.parse = p.parse, T.parseAllDocuments = p.parseAllDocuments, T.parseDocument = p.parseDocument, T.stringify = p.stringify, T.visit = g.visit, T.visitAsync = g.visitAsync, T;
|
|
8714
8714
|
}
|
|
8715
8715
|
var Z = So();
|
|
8716
|
-
const
|
|
8716
|
+
const ke = /* @__PURE__ */ si(Z);
|
|
8717
8717
|
function ss(e) {
|
|
8718
8718
|
L.existsSync(e) || L.mkdirSync(e, { recursive: !0 });
|
|
8719
8719
|
}
|
|
@@ -8767,14 +8767,14 @@ function wo(e) {
|
|
|
8767
8767
|
}
|
|
8768
8768
|
function _o(e, f, d) {
|
|
8769
8769
|
const D = d ? `${f}/${d}.yaml` : f, i = Oo(e), l = Ao(i);
|
|
8770
|
-
L.writeFileSync(D, l.toString(), "utf-8");
|
|
8770
|
+
L.writeFileSync(D, l.toString({ lineWidth: 0 }), "utf-8");
|
|
8771
8771
|
}
|
|
8772
8772
|
function Oo(e) {
|
|
8773
8773
|
const f = M.join(e, "openapi.yaml"), d = M.join(e, "manifest.json");
|
|
8774
8774
|
if (!L.existsSync(f))
|
|
8775
8775
|
throw new Error(`Not found: ${f}`);
|
|
8776
|
-
const D =
|
|
8777
|
-
let l =
|
|
8776
|
+
const D = ke.parseDocument(L.readFileSync(f, "utf-8")), i = L.existsSync(d) ? JSON.parse(L.readFileSync(d, "utf-8")) : null;
|
|
8777
|
+
let l = ko(e), r = Bo(e);
|
|
8778
8778
|
if (i) {
|
|
8779
8779
|
const h = vo(l, r, i);
|
|
8780
8780
|
l = h.paths, r = h.components;
|
|
@@ -8782,13 +8782,13 @@ function Oo(e) {
|
|
|
8782
8782
|
const o = [...l, ...r];
|
|
8783
8783
|
return i ? { core: D, files: o, manifest: { kind: "manifest", manifest: i } } : { core: D, files: o };
|
|
8784
8784
|
}
|
|
8785
|
-
function
|
|
8785
|
+
function ko(e) {
|
|
8786
8786
|
const f = M.join(e, "paths");
|
|
8787
8787
|
if (!L.existsSync(f))
|
|
8788
8788
|
return [];
|
|
8789
8789
|
const d = [];
|
|
8790
8790
|
for (const D of gs(f, (i) => i.endsWith(".yaml"))) {
|
|
8791
|
-
const i = L.readFileSync(D, "utf-8"), r =
|
|
8791
|
+
const i = L.readFileSync(D, "utf-8"), r = ke.parseDocument(i).contents;
|
|
8792
8792
|
if (!r?.items?.length)
|
|
8793
8793
|
continue;
|
|
8794
8794
|
const o = r.items[0];
|
|
@@ -8799,13 +8799,13 @@ function Bo(e) {
|
|
|
8799
8799
|
}
|
|
8800
8800
|
return d;
|
|
8801
8801
|
}
|
|
8802
|
-
function
|
|
8802
|
+
function Bo(e) {
|
|
8803
8803
|
const f = M.join(e, "components");
|
|
8804
8804
|
if (!L.existsSync(f))
|
|
8805
8805
|
return [];
|
|
8806
8806
|
const d = [];
|
|
8807
8807
|
for (const D of gs(f, (i) => i.endsWith(".yaml")).sort()) {
|
|
8808
|
-
const i = L.readFileSync(D, "utf-8"), r =
|
|
8808
|
+
const i = L.readFileSync(D, "utf-8"), r = ke.parseDocument(i).contents;
|
|
8809
8809
|
if (!r?.items?.length)
|
|
8810
8810
|
continue;
|
|
8811
8811
|
const o = r.items[0];
|
|
@@ -8883,18 +8883,18 @@ function $o(e) {
|
|
|
8883
8883
|
return f;
|
|
8884
8884
|
}
|
|
8885
8885
|
function Po(e) {
|
|
8886
|
-
const f =
|
|
8886
|
+
const f = ke.parseDocument(e, { keepSourceTokens: !0 }), d = f.get("paths", !0), D = f.get("components", !0), i = [{ kind: "core", doc: f }];
|
|
8887
8887
|
Z.isMap(d) && i.push(...Io(d)), Z.isMap(D) && i.push(...$o(D));
|
|
8888
8888
|
const l = Lo(Z.isMap(d) ? d : null, Z.isMap(D) ? D : null);
|
|
8889
8889
|
return { files: i, manifest: { kind: "manifest", manifest: l } };
|
|
8890
8890
|
}
|
|
8891
8891
|
function Mo(e) {
|
|
8892
8892
|
const f = e.clone();
|
|
8893
|
-
return f.delete("paths"), f.delete("components"), f.toString();
|
|
8893
|
+
return f.delete("paths"), f.delete("components"), f.toString({ lineWidth: 0 });
|
|
8894
8894
|
}
|
|
8895
8895
|
function ti(e) {
|
|
8896
|
-
const f = new
|
|
8897
|
-
return f.add(
|
|
8896
|
+
const f = new ke.Document({});
|
|
8897
|
+
return f.add(e), f.toString({ lineWidth: 0 });
|
|
8898
8898
|
}
|
|
8899
8899
|
function qo(e, f) {
|
|
8900
8900
|
const d = L.readFileSync(e, "utf-8");
|