@ariestools/toolchain 8.7.19 → 8.7.21

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.
Files changed (45) hide show
  1. package/dist/actions/analyze.d.ts +28 -1
  2. package/dist/actions/analyze.d.ts.map +1 -1
  3. package/dist/actions/work/github.d.ts +60 -0
  4. package/dist/actions/work/github.d.ts.map +1 -0
  5. package/dist/actions/work/index.d.ts +21 -19
  6. package/dist/actions/work/index.d.ts.map +1 -1
  7. package/dist/actions/work/render.d.ts +5 -0
  8. package/dist/actions/work/render.d.ts.map +1 -0
  9. package/dist/actions/work/result.d.ts +12 -0
  10. package/dist/actions/work/result.d.ts.map +1 -0
  11. package/dist/actions/work/schema.d.ts.map +1 -1
  12. package/dist/actions/work/sync.d.ts +34 -0
  13. package/dist/actions/work/sync.d.ts.map +1 -0
  14. package/dist/bin/package/build.mjs +1256 -699
  15. package/dist/bin/package/build.mjs.map +1 -1
  16. package/dist/bin/package/clean.mjs +633 -432
  17. package/dist/bin/package/clean.mjs.map +1 -1
  18. package/dist/bin/package/compile.mjs +632 -431
  19. package/dist/bin/package/compile.mjs.map +1 -1
  20. package/dist/bin/package/copy-assets-cjs.mjs +1 -1
  21. package/dist/bin/package/copy-assets-esm.mjs +1 -1
  22. package/dist/bin/package/fix.mjs +17 -12
  23. package/dist/bin/package/fix.mjs.map +1 -1
  24. package/dist/bin/package/lint-verbose.mjs +17 -12
  25. package/dist/bin/package/lint-verbose.mjs.map +1 -1
  26. package/dist/bin/package/lint.mjs +17 -12
  27. package/dist/bin/package/lint.mjs.map +1 -1
  28. package/dist/bin/package/publint.mjs +1161 -609
  29. package/dist/bin/package/publint.mjs.map +1 -1
  30. package/dist/bin/package/recompile.mjs +632 -431
  31. package/dist/bin/package/recompile.mjs.map +1 -1
  32. package/dist/bin/package/relint.mjs +17 -12
  33. package/dist/bin/package/relint.mjs.map +1 -1
  34. package/dist/bin/package/sync-layout.mjs +615 -419
  35. package/dist/bin/package/sync-layout.mjs.map +1 -1
  36. package/dist/bin/xy.mjs +2067 -737
  37. package/dist/bin/xy.mjs.map +1 -1
  38. package/dist/xy/common/work/index.d.ts.map +1 -1
  39. package/dist/xy/common/work/listCommand.d.ts.map +1 -1
  40. package/dist/xy/common/work/syncCommand.d.ts +3 -0
  41. package/dist/xy/common/work/syncCommand.d.ts.map +1 -0
  42. package/dist/xy/react/analyzeCommand.d.ts.map +1 -1
  43. package/package.json +5 -5
  44. package/dist/bin/source-map-explorer.mjs +0 -27268
  45. package/dist/bin/source-map-explorer.mjs.map +0 -1
package/dist/bin/xy.mjs CHANGED
@@ -1,23 +1,23 @@
1
1
  #!/usr/bin/env node
2
2
  import { builtinModules, createRequire } from "node:module";
3
3
  import * as xi from "node:fs";
4
- import fs, { copyFileSync, existsSync, lstatSync, mkdirSync, promises, readFileSync, readdirSync, readlinkSync, realpathSync, rmSync, statSync, unlinkSync, writeFileSync } from "node:fs";
5
- import PATH, { posix, win32 } from "node:path";
6
- import process$1 from "node:process";
4
+ import fs, { closeSync, copyFileSync, existsSync, lstatSync, mkdirSync, openSync, promises, readFileSync, readSync, readdirSync, readlinkSync, realpathSync, rmSync, statSync, unlinkSync, writeFileSync } from "node:fs";
5
+ import PATH, { basename, delimiter, dirname, normalize, posix, resolve, win32 } from "node:path";
6
+ import { fileURLToPath, pathToFileURL } from "node:url";
7
+ import process$1, { cwd } from "node:process";
7
8
  import os, { EOL, availableParallelism } from "node:os";
8
9
  import tty from "node:tty";
9
10
  import { AsyncLocalStorage, AsyncResource } from "node:async_hooks";
10
11
  import path from "node:path/posix";
11
- import { fileURLToPath, pathToFileURL } from "node:url";
12
12
  import { lstatSync as lstatSync$1, readFileSync as readFileSync$1, readdir, readdirSync as readdirSync$1, readlinkSync as readlinkSync$1, realpathSync as realpathSync$1, statSync as statSync$1, writeFile } from "fs";
13
13
  import fs$1, { lstat, readdir as readdir$1, readlink, realpath } from "node:fs/promises";
14
14
  import { EventEmitter } from "node:events";
15
- import Pe from "node:stream";
15
+ import Pe, { PassThrough } from "node:stream";
16
16
  import { StringDecoder } from "node:string_decoder";
17
- import { basename, dirname, extname, join, normalize, relative, resolve } from "path";
18
- import cp, { execFile, execFileSync, execSync } from "node:child_process";
17
+ import { basename as basename$1, dirname as dirname$1, extname, join, normalize as normalize$1, relative, resolve as resolve$1 } from "path";
18
+ import { execFile, execFileSync, execSync, spawn } from "node:child_process";
19
19
  import * as readline from "node:readline";
20
- import { createInterface } from "node:readline";
20
+ import u, { createInterface } from "node:readline";
21
21
  import { fileURLToPath as fileURLToPath$1 } from "url";
22
22
  import { format, inspect } from "util";
23
23
  import ts from "typescript";
@@ -26,6 +26,7 @@ import { performance as performance$1 } from "node:perf_hooks";
26
26
  import util, { promisify, stripVTControlCharacters } from "node:util";
27
27
  import { createHash, randomBytes } from "node:crypto";
28
28
  import { applyRecommendedConfigTypeChecked, parseRecommendedConfigSource } from "@ariestools/eslint-config-flat";
29
+ import { pipeline } from "node:stream/promises";
29
30
  import zlib from "node:zlib";
30
31
  import { builtinRules } from "eslint/use-at-your-own-risk";
31
32
  import { notStrictEqual, strictEqual } from "assert";
@@ -615,24 +616,24 @@ function ht(n, t, e) {
615
616
  return s;
616
617
  }
617
618
  function Bt(n, t = {}) {
618
- return new I(n, t).streamSync();
619
+ return new I$1(n, t).streamSync();
619
620
  }
620
621
  function Qe(n, t = {}) {
621
- return new I(n, t).stream();
622
+ return new I$1(n, t).stream();
622
623
  }
623
624
  function ts$1(n, t = {}) {
624
- return new I(n, t).walkSync();
625
+ return new I$1(n, t).walkSync();
625
626
  }
626
627
  async function Je(n, t = {}) {
627
- return new I(n, t).walk();
628
+ return new I$1(n, t).walk();
628
629
  }
629
630
  function Ut(n, t = {}) {
630
- return new I(n, t).iterateSync();
631
+ return new I$1(n, t).iterateSync();
631
632
  }
632
633
  function es(n, t = {}) {
633
- return new I(n, t).iterate();
634
+ return new I$1(n, t).iterate();
634
635
  }
635
- var Gt, ce, ss, fe, ue, qt, de, pe, is, rs, ns, os$2, hs, as, ls, cs, fs$6, us, ds, at, Ss, lt, Es, we, ye, W, xs, be, vs, Ct, Cs, Ts, As, ks, Kt, Se, Ee, Q, tt, O, Rs, Os, Fs, Ds, Ms, Ns, _s, Ls, Ws, Ps, js, Is, zs, Bs, Us, $s, Gs, Hs, Ce, Te, Ae, xe, A, Vs, Ys, Xs, Js, N, Zs, ke, Qs, ti, ve, ei, D, si, Oe, Vt, Fe, At, Re, ii, q, De, Tt, ri, ft, Ne, oi, hi, ai, G, H, K, kt, ut, Rt, _e, Ot, Le, P, et, v, dt, st, C, F, T, Yt, Ft, k, x, Xt, Jt, We, Zt, B, Qt, Dt, pt, Y, M, mt, li, ci, fi, ui$1, Mt, te, di, pi, V, wt, Ue, $e, Ri, Oi, L, Ge, He, U, qe, Ke, X, Ve, _, gt, se, je, yt, j, Nt, Lt, Ie, Fi, ie, ze, bt, Be, _t, Wt, ne, Ye, R, Pt, jt, It, it, rt, St, Xe, Di, Mi, Ni, nt, _i, ot, oe, he, ae, Et, Li, zt, xt, vt, Pi, I, le, ji, Ii, zi, Bi, Ui, Ze;
636
+ var Gt, ce, ss, fe, ue, qt, de, pe, is, rs, ns, os$2, hs, as, ls, cs, fs$6, us, ds, at, Ss, lt, Es, we, ye, W, xs, be, vs, Ct, Cs, Ts, As, ks, Kt, Se, Ee, Q, tt, O$1, Rs, Os, Fs, Ds, Ms, Ns, _s, Ls, Ws, Ps, js, Is, zs, Bs, Us, $s, Gs, Hs, Ce, Te, Ae, xe, A, Vs, Ys, Xs, Js, N$1, Zs, ke, Qs, ti, ve, ei, D$1, si, Oe, Vt, Fe, At, Re, ii, q, De, Tt, ri, ft, Ne, oi, hi, ai, G, H, K, kt, ut, Rt, _e, Ot, Le, P$1, et, v$1, dt, st, C$1, F$1, T$1, Yt, Ft, k$1, x$1, Xt, Jt, We, Zt, B, Qt, Dt, pt, Y, M, mt, li, ci, fi, ui$1, Mt, te, di, pi, V, wt, Ue, $e, Ri, Oi, L, Ge, He, U, qe, Ke, X, Ve, _$1, gt, se, je, yt, j$1, Nt, Lt, Ie, Fi, ie, ze, bt, Be, _t, Wt, ne, Ye, R$1, Pt, jt, It, it, rt, St, Xe, Di, Mi, Ni, nt, _i, ot, oe, he, ae, Et, Li, zt, xt, vt, Pi, I$1, le, ji, Ii, zi, Bi, Ui, Ze;
636
637
  var init_index_min = __esmMin((() => {
637
638
  Gt = (n, t, e) => {
638
639
  let s = n instanceof RegExp ? ce(n, e) : n, i = t instanceof RegExp ? ce(t, e) : t, r = s !== null && i != null && ss(s, i, e);
@@ -1036,7 +1037,7 @@ var init_index_min = __esmMin((() => {
1036
1037
  }
1037
1038
  };
1038
1039
  tt = (n, { windowsPathsNoEscape: t = !1, magicalBraces: e = !1 } = {}) => e ? t ? n.replace(/[?*()[\]{}]/g, "[$&]") : n.replace(/[?*()[\]\\{}]/g, "\\$&") : t ? n.replace(/[?*()[\]]/g, "[$&]") : n.replace(/[?*()[\]\\]/g, "\\$&");
1039
- O = (n, t, e = {}) => (at(t), !e.nocomment && t.charAt(0) === "#" ? !1 : new D(t, e).match(n));
1040
+ O$1 = (n, t, e = {}) => (at(t), !e.nocomment && t.charAt(0) === "#" ? !1 : new D$1(t, e).match(n));
1040
1041
  Rs = /^\*+([^+@!?\*\[\(]*)$/;
1041
1042
  Os = (n) => (t) => !t.startsWith(".") && t.endsWith(n);
1042
1043
  Fs = (n) => (t) => t.endsWith(n);
@@ -1080,59 +1081,59 @@ var init_index_min = __esmMin((() => {
1080
1081
  win32: { sep: "\\" },
1081
1082
  posix: { sep: "/" }
1082
1083
  };
1083
- O.sep = Ae === "win32" ? xe.win32.sep : xe.posix.sep;
1084
+ O$1.sep = Ae === "win32" ? xe.win32.sep : xe.posix.sep;
1084
1085
  A = Symbol("globstar **");
1085
- O.GLOBSTAR = A;
1086
+ O$1.GLOBSTAR = A;
1086
1087
  Vs = "[^/]*?";
1087
1088
  Ys = "(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?";
1088
1089
  Xs = "(?:(?!(?:\\/|^)\\.).)*?";
1089
- Js = (n, t = {}) => (e) => O(e, n, t);
1090
- O.filter = Js;
1091
- N = (n, t = {}) => Object.assign({}, n, t);
1090
+ Js = (n, t = {}) => (e) => O$1(e, n, t);
1091
+ O$1.filter = Js;
1092
+ N$1 = (n, t = {}) => Object.assign({}, n, t);
1092
1093
  Zs = (n) => {
1093
- if (!n || typeof n != "object" || !Object.keys(n).length) return O;
1094
- let t = O;
1095
- return Object.assign((s, i, r = {}) => t(s, i, N(n, r)), {
1094
+ if (!n || typeof n != "object" || !Object.keys(n).length) return O$1;
1095
+ let t = O$1;
1096
+ return Object.assign((s, i, r = {}) => t(s, i, N$1(n, r)), {
1096
1097
  Minimatch: class extends t.Minimatch {
1097
1098
  constructor(i, r = {}) {
1098
- super(i, N(n, r));
1099
+ super(i, N$1(n, r));
1099
1100
  }
1100
1101
  static defaults(i) {
1101
- return t.defaults(N(n, i)).Minimatch;
1102
+ return t.defaults(N$1(n, i)).Minimatch;
1102
1103
  }
1103
1104
  },
1104
1105
  AST: class extends t.AST {
1105
1106
  constructor(i, r, o = {}) {
1106
- super(i, r, N(n, o));
1107
+ super(i, r, N$1(n, o));
1107
1108
  }
1108
1109
  static fromGlob(i, r = {}) {
1109
- return t.AST.fromGlob(i, N(n, r));
1110
+ return t.AST.fromGlob(i, N$1(n, r));
1110
1111
  }
1111
1112
  },
1112
- unescape: (s, i = {}) => t.unescape(s, N(n, i)),
1113
- escape: (s, i = {}) => t.escape(s, N(n, i)),
1114
- filter: (s, i = {}) => t.filter(s, N(n, i)),
1115
- defaults: (s) => t.defaults(N(n, s)),
1116
- makeRe: (s, i = {}) => t.makeRe(s, N(n, i)),
1117
- braceExpand: (s, i = {}) => t.braceExpand(s, N(n, i)),
1118
- match: (s, i, r = {}) => t.match(s, i, N(n, r)),
1113
+ unescape: (s, i = {}) => t.unescape(s, N$1(n, i)),
1114
+ escape: (s, i = {}) => t.escape(s, N$1(n, i)),
1115
+ filter: (s, i = {}) => t.filter(s, N$1(n, i)),
1116
+ defaults: (s) => t.defaults(N$1(n, s)),
1117
+ makeRe: (s, i = {}) => t.makeRe(s, N$1(n, i)),
1118
+ braceExpand: (s, i = {}) => t.braceExpand(s, N$1(n, i)),
1119
+ match: (s, i, r = {}) => t.match(s, i, N$1(n, r)),
1119
1120
  sep: t.sep,
1120
1121
  GLOBSTAR: A
1121
1122
  });
1122
1123
  };
1123
- O.defaults = Zs;
1124
+ O$1.defaults = Zs;
1124
1125
  ke = (n, t = {}) => (at(n), t.nobrace || !/\{(?:(?!\{).)*\}/.test(n) ? [n] : ge(n, { max: t.braceExpandMax }));
1125
- O.braceExpand = ke;
1126
- Qs = (n, t = {}) => new D(n, t).makeRe();
1127
- O.makeRe = Qs;
1126
+ O$1.braceExpand = ke;
1127
+ Qs = (n, t = {}) => new D$1(n, t).makeRe();
1128
+ O$1.makeRe = Qs;
1128
1129
  ti = (n, t, e = {}) => {
1129
- let s = new D(t, e);
1130
+ let s = new D$1(t, e);
1130
1131
  return n = n.filter((i) => s.match(i)), s.options.nonull && !n.length && n.push(t), n;
1131
1132
  };
1132
- O.match = ti;
1133
+ O$1.match = ti;
1133
1134
  ve = /[?*]|[+@!]\(.*?\)|\[|\]/;
1134
1135
  ei = (n) => n.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&");
1135
- D = class {
1136
+ D$1 = class {
1136
1137
  options;
1137
1138
  set;
1138
1139
  pattern;
@@ -1409,13 +1410,13 @@ globstar while`, t, d, e, f, m), this.matchOne(t.slice(d), e.slice(f), s)) retur
1409
1410
  return s.flipNegate ? !1 : this.negate;
1410
1411
  }
1411
1412
  static defaults(t) {
1412
- return O.defaults(t).Minimatch;
1413
+ return O$1.defaults(t).Minimatch;
1413
1414
  }
1414
1415
  };
1415
- O.AST = Q;
1416
- O.Minimatch = D;
1417
- O.escape = tt;
1418
- O.unescape = W;
1416
+ O$1.AST = Q;
1417
+ O$1.Minimatch = D$1;
1418
+ O$1.escape = tt;
1419
+ O$1.unescape = W;
1419
1420
  si = typeof performance == "object" && performance && typeof performance.now == "function" ? performance : Date;
1420
1421
  Oe = /* @__PURE__ */ new Set();
1421
1422
  Vt = typeof process == "object" && process ? process : {};
@@ -2036,18 +2037,18 @@ globstar while`, t, d, e, f, m), this.matchOne(t.slice(d), e.slice(f), s)) retur
2036
2037
  _e = Symbol("read");
2037
2038
  Ot = Symbol("flush");
2038
2039
  Le = Symbol("flushChunk");
2039
- P = Symbol("encoding");
2040
+ P$1 = Symbol("encoding");
2040
2041
  et = Symbol("decoder");
2041
- v = Symbol("flowing");
2042
+ v$1 = Symbol("flowing");
2042
2043
  dt = Symbol("paused");
2043
2044
  st = Symbol("resume");
2044
- C = Symbol("buffer");
2045
- F = Symbol("pipes");
2046
- T = Symbol("bufferLength");
2045
+ C$1 = Symbol("buffer");
2046
+ F$1 = Symbol("pipes");
2047
+ T$1 = Symbol("bufferLength");
2047
2048
  Yt = Symbol("bufferPush");
2048
2049
  Ft = Symbol("bufferShift");
2049
- k = Symbol("objectMode");
2050
- x = Symbol("destroyed");
2050
+ k$1 = Symbol("objectMode");
2051
+ x$1 = Symbol("destroyed");
2051
2052
  Xt = Symbol("error");
2052
2053
  Jt = Symbol("emitData");
2053
2054
  We = Symbol("emitEnd");
@@ -2090,12 +2091,12 @@ globstar while`, t, d, e, f, m), this.matchOne(t.slice(d), e.slice(f), s)) retur
2090
2091
  di = (n) => !!n.objectMode;
2091
2092
  pi = (n) => !n.objectMode && !!n.encoding && n.encoding !== "buffer";
2092
2093
  V = class extends EventEmitter {
2093
- [v] = !1;
2094
+ [v$1] = !1;
2094
2095
  [dt] = !1;
2095
- [F] = [];
2096
- [C] = [];
2097
- [k];
2098
- [P];
2096
+ [F$1] = [];
2097
+ [C$1] = [];
2098
+ [k$1];
2099
+ [P$1];
2099
2100
  [B];
2100
2101
  [et];
2101
2102
  [G] = !1;
@@ -2103,8 +2104,8 @@ globstar while`, t, d, e, f, m), this.matchOne(t.slice(d), e.slice(f), s)) retur
2103
2104
  [kt] = !1;
2104
2105
  [Rt] = !1;
2105
2106
  [ut] = null;
2106
- [T] = 0;
2107
- [x] = !1;
2107
+ [T$1] = 0;
2108
+ [x$1] = !1;
2108
2109
  [pt];
2109
2110
  [Dt] = !1;
2110
2111
  [Y] = 0;
@@ -2114,15 +2115,15 @@ globstar while`, t, d, e, f, m), this.matchOne(t.slice(d), e.slice(f), s)) retur
2114
2115
  constructor(...t) {
2115
2116
  let e = t[0] || {};
2116
2117
  if (super(), e.objectMode && typeof e.encoding == "string") throw new TypeError("Encoding and objectMode may not be used together");
2117
- di(e) ? (this[k] = !0, this[P] = null) : pi(e) ? (this[P] = e.encoding, this[k] = !1) : (this[k] = !1, this[P] = null), this[B] = !!e.async, this[et] = this[P] ? new StringDecoder(this[P]) : null, e && e.debugExposeBuffer === !0 && Object.defineProperty(this, "buffer", { get: () => this[C] }), e && e.debugExposePipes === !0 && Object.defineProperty(this, "pipes", { get: () => this[F] });
2118
+ di(e) ? (this[k$1] = !0, this[P$1] = null) : pi(e) ? (this[P$1] = e.encoding, this[k$1] = !1) : (this[k$1] = !1, this[P$1] = null), this[B] = !!e.async, this[et] = this[P$1] ? new StringDecoder(this[P$1]) : null, e && e.debugExposeBuffer === !0 && Object.defineProperty(this, "buffer", { get: () => this[C$1] }), e && e.debugExposePipes === !0 && Object.defineProperty(this, "pipes", { get: () => this[F$1] });
2118
2119
  let { signal: s } = e;
2119
2120
  s && (this[pt] = s, s.aborted ? this[Qt]() : s.addEventListener("abort", () => this[Qt]()));
2120
2121
  }
2121
2122
  get bufferLength() {
2122
- return this[T];
2123
+ return this[T$1];
2123
2124
  }
2124
2125
  get encoding() {
2125
- return this[P];
2126
+ return this[P$1];
2126
2127
  }
2127
2128
  set encoding(t) {
2128
2129
  throw new Error("Encoding must be set at instantiation time");
@@ -2131,7 +2132,7 @@ globstar while`, t, d, e, f, m), this.matchOne(t.slice(d), e.slice(f), s)) retur
2131
2132
  throw new Error("Encoding must be set at instantiation time");
2132
2133
  }
2133
2134
  get objectMode() {
2134
- return this[k];
2135
+ return this[k$1];
2135
2136
  }
2136
2137
  set objectMode(t) {
2137
2138
  throw new Error("objectMode must be set at instantiation time");
@@ -2152,83 +2153,83 @@ globstar while`, t, d, e, f, m), this.matchOne(t.slice(d), e.slice(f), s)) retur
2152
2153
  write(t, e, s) {
2153
2154
  if (this[Dt]) return !1;
2154
2155
  if (this[G]) throw new Error("write after end");
2155
- if (this[x]) return this.emit("error", Object.assign(/* @__PURE__ */ new Error("Cannot call write after a stream was destroyed"), { code: "ERR_STREAM_DESTROYED" })), !0;
2156
+ if (this[x$1]) return this.emit("error", Object.assign(/* @__PURE__ */ new Error("Cannot call write after a stream was destroyed"), { code: "ERR_STREAM_DESTROYED" })), !0;
2156
2157
  typeof e == "function" && (s = e, e = "utf8"), e || (e = "utf8");
2157
2158
  let i = this[B] ? mt : li;
2158
- if (!this[k] && !Buffer.isBuffer(t)) {
2159
+ if (!this[k$1] && !Buffer.isBuffer(t)) {
2159
2160
  if (ui$1(t)) t = Buffer.from(t.buffer, t.byteOffset, t.byteLength);
2160
2161
  else if (fi(t)) t = Buffer.from(t);
2161
2162
  else if (typeof t != "string") throw new Error("Non-contiguous data written to non-objectMode stream");
2162
2163
  }
2163
- return this[k] ? (this[v] && this[T] !== 0 && this[Ot](!0), this[v] ? this.emit("data", t) : this[Yt](t), this[T] !== 0 && this.emit("readable"), s && i(s), this[v]) : t.length ? (typeof t == "string" && !(e === this[P] && !this[et]?.lastNeed) && (t = Buffer.from(t, e)), Buffer.isBuffer(t) && this[P] && (t = this[et].write(t)), this[v] && this[T] !== 0 && this[Ot](!0), this[v] ? this.emit("data", t) : this[Yt](t), this[T] !== 0 && this.emit("readable"), s && i(s), this[v]) : (this[T] !== 0 && this.emit("readable"), s && i(s), this[v]);
2164
+ return this[k$1] ? (this[v$1] && this[T$1] !== 0 && this[Ot](!0), this[v$1] ? this.emit("data", t) : this[Yt](t), this[T$1] !== 0 && this.emit("readable"), s && i(s), this[v$1]) : t.length ? (typeof t == "string" && !(e === this[P$1] && !this[et]?.lastNeed) && (t = Buffer.from(t, e)), Buffer.isBuffer(t) && this[P$1] && (t = this[et].write(t)), this[v$1] && this[T$1] !== 0 && this[Ot](!0), this[v$1] ? this.emit("data", t) : this[Yt](t), this[T$1] !== 0 && this.emit("readable"), s && i(s), this[v$1]) : (this[T$1] !== 0 && this.emit("readable"), s && i(s), this[v$1]);
2164
2165
  }
2165
2166
  read(t) {
2166
- if (this[x]) return null;
2167
- if (this[M] = !1, this[T] === 0 || t === 0 || t && t > this[T]) return this[H](), null;
2168
- this[k] && (t = null), this[C].length > 1 && !this[k] && (this[C] = [this[P] ? this[C].join("") : Buffer.concat(this[C], this[T])]);
2169
- let e = this[_e](t || null, this[C][0]);
2167
+ if (this[x$1]) return null;
2168
+ if (this[M] = !1, this[T$1] === 0 || t === 0 || t && t > this[T$1]) return this[H](), null;
2169
+ this[k$1] && (t = null), this[C$1].length > 1 && !this[k$1] && (this[C$1] = [this[P$1] ? this[C$1].join("") : Buffer.concat(this[C$1], this[T$1])]);
2170
+ let e = this[_e](t || null, this[C$1][0]);
2170
2171
  return this[H](), e;
2171
2172
  }
2172
2173
  [_e](t, e) {
2173
- if (this[k]) this[Ft]();
2174
+ if (this[k$1]) this[Ft]();
2174
2175
  else {
2175
2176
  let s = e;
2176
- t === s.length || t === null ? this[Ft]() : typeof s == "string" ? (this[C][0] = s.slice(t), e = s.slice(0, t), this[T] -= t) : (this[C][0] = s.subarray(t), e = s.subarray(0, t), this[T] -= t);
2177
+ t === s.length || t === null ? this[Ft]() : typeof s == "string" ? (this[C$1][0] = s.slice(t), e = s.slice(0, t), this[T$1] -= t) : (this[C$1][0] = s.subarray(t), e = s.subarray(0, t), this[T$1] -= t);
2177
2178
  }
2178
- return this.emit("data", e), !this[C].length && !this[G] && this.emit("drain"), e;
2179
+ return this.emit("data", e), !this[C$1].length && !this[G] && this.emit("drain"), e;
2179
2180
  }
2180
2181
  end(t, e, s) {
2181
- return typeof t == "function" && (s = t, t = void 0), typeof e == "function" && (s = e, e = "utf8"), t !== void 0 && this.write(t, e), s && this.once("end", s), this[G] = !0, this.writable = !1, (this[v] || !this[dt]) && this[H](), this;
2182
+ return typeof t == "function" && (s = t, t = void 0), typeof e == "function" && (s = e, e = "utf8"), t !== void 0 && this.write(t, e), s && this.once("end", s), this[G] = !0, this.writable = !1, (this[v$1] || !this[dt]) && this[H](), this;
2182
2183
  }
2183
2184
  [st]() {
2184
- this[x] || (!this[Y] && !this[F].length && (this[M] = !0), this[dt] = !1, this[v] = !0, this.emit("resume"), this[C].length ? this[Ot]() : this[G] ? this[H]() : this.emit("drain"));
2185
+ this[x$1] || (!this[Y] && !this[F$1].length && (this[M] = !0), this[dt] = !1, this[v$1] = !0, this.emit("resume"), this[C$1].length ? this[Ot]() : this[G] ? this[H]() : this.emit("drain"));
2185
2186
  }
2186
2187
  resume() {
2187
2188
  return this[st]();
2188
2189
  }
2189
2190
  pause() {
2190
- this[v] = !1, this[dt] = !0, this[M] = !1;
2191
+ this[v$1] = !1, this[dt] = !0, this[M] = !1;
2191
2192
  }
2192
2193
  get destroyed() {
2193
- return this[x];
2194
+ return this[x$1];
2194
2195
  }
2195
2196
  get flowing() {
2196
- return this[v];
2197
+ return this[v$1];
2197
2198
  }
2198
2199
  get paused() {
2199
2200
  return this[dt];
2200
2201
  }
2201
2202
  [Yt](t) {
2202
- this[k] ? this[T] += 1 : this[T] += t.length, this[C].push(t);
2203
+ this[k$1] ? this[T$1] += 1 : this[T$1] += t.length, this[C$1].push(t);
2203
2204
  }
2204
2205
  [Ft]() {
2205
- return this[k] ? this[T] -= 1 : this[T] -= this[C][0].length, this[C].shift();
2206
+ return this[k$1] ? this[T$1] -= 1 : this[T$1] -= this[C$1][0].length, this[C$1].shift();
2206
2207
  }
2207
2208
  [Ot](t = !1) {
2208
2209
  do ;
2209
- while (this[Le](this[Ft]()) && this[C].length);
2210
- !t && !this[C].length && !this[G] && this.emit("drain");
2210
+ while (this[Le](this[Ft]()) && this[C$1].length);
2211
+ !t && !this[C$1].length && !this[G] && this.emit("drain");
2211
2212
  }
2212
2213
  [Le](t) {
2213
- return this.emit("data", t), this[v];
2214
+ return this.emit("data", t), this[v$1];
2214
2215
  }
2215
2216
  pipe(t, e) {
2216
- if (this[x]) return t;
2217
+ if (this[x$1]) return t;
2217
2218
  this[M] = !1;
2218
2219
  let s = this[K];
2219
- return e = e || {}, t === Ne.stdout || t === Ne.stderr ? e.end = !1 : e.end = e.end !== !1, e.proxyErrors = !!e.proxyErrors, s ? e.end && t.end() : (this[F].push(e.proxyErrors ? new te(this, t, e) : new Mt(this, t, e)), this[B] ? mt(() => this[st]()) : this[st]()), t;
2220
+ return e = e || {}, t === Ne.stdout || t === Ne.stderr ? e.end = !1 : e.end = e.end !== !1, e.proxyErrors = !!e.proxyErrors, s ? e.end && t.end() : (this[F$1].push(e.proxyErrors ? new te(this, t, e) : new Mt(this, t, e)), this[B] ? mt(() => this[st]()) : this[st]()), t;
2220
2221
  }
2221
2222
  unpipe(t) {
2222
- let e = this[F].find((s) => s.dest === t);
2223
- e && (this[F].length === 1 ? (this[v] && this[Y] === 0 && (this[v] = !1), this[F] = []) : this[F].splice(this[F].indexOf(e), 1), e.unpipe());
2223
+ let e = this[F$1].find((s) => s.dest === t);
2224
+ e && (this[F$1].length === 1 ? (this[v$1] && this[Y] === 0 && (this[v$1] = !1), this[F$1] = []) : this[F$1].splice(this[F$1].indexOf(e), 1), e.unpipe());
2224
2225
  }
2225
2226
  addListener(t, e) {
2226
2227
  return this.on(t, e);
2227
2228
  }
2228
2229
  on(t, e) {
2229
2230
  let s = super.on(t, e);
2230
- if (t === "data") this[M] = !1, this[Y]++, !this[F].length && !this[v] && this[st]();
2231
- else if (t === "readable" && this[T] !== 0) super.emit("readable");
2231
+ if (t === "data") this[M] = !1, this[Y]++, !this[F$1].length && !this[v$1] && this[st]();
2232
+ else if (t === "readable" && this[T$1] !== 0) super.emit("readable");
2232
2233
  else if (ci(t) && this[K]) super.emit(t), this.removeAllListeners(t);
2233
2234
  else if (t === "error" && this[ut]) {
2234
2235
  let i = e;
@@ -2241,25 +2242,25 @@ while (this[Le](this[Ft]()) && this[C].length);
2241
2242
  }
2242
2243
  off(t, e) {
2243
2244
  let s = super.off(t, e);
2244
- return t === "data" && (this[Y] = this.listeners("data").length, this[Y] === 0 && !this[M] && !this[F].length && (this[v] = !1)), s;
2245
+ return t === "data" && (this[Y] = this.listeners("data").length, this[Y] === 0 && !this[M] && !this[F$1].length && (this[v$1] = !1)), s;
2245
2246
  }
2246
2247
  removeAllListeners(t) {
2247
2248
  let e = super.removeAllListeners(t);
2248
- return (t === "data" || t === void 0) && (this[Y] = 0, !this[M] && !this[F].length && (this[v] = !1)), e;
2249
+ return (t === "data" || t === void 0) && (this[Y] = 0, !this[M] && !this[F$1].length && (this[v$1] = !1)), e;
2249
2250
  }
2250
2251
  get emittedEnd() {
2251
2252
  return this[K];
2252
2253
  }
2253
2254
  [H]() {
2254
- !this[kt] && !this[K] && !this[x] && this[C].length === 0 && this[G] && (this[kt] = !0, this.emit("end"), this.emit("prefinish"), this.emit("finish"), this[Rt] && this.emit("close"), this[kt] = !1);
2255
+ !this[kt] && !this[K] && !this[x$1] && this[C$1].length === 0 && this[G] && (this[kt] = !0, this.emit("end"), this.emit("prefinish"), this.emit("finish"), this[Rt] && this.emit("close"), this[kt] = !1);
2255
2256
  }
2256
2257
  emit(t, ...e) {
2257
2258
  let s = e[0];
2258
- if (t !== "error" && t !== "close" && t !== x && this[x]) return !1;
2259
- if (t === "data") return !this[k] && !s ? !1 : this[B] ? (mt(() => this[Jt](s)), !0) : this[Jt](s);
2259
+ if (t !== "error" && t !== "close" && t !== x$1 && this[x$1]) return !1;
2260
+ if (t === "data") return !this[k$1] && !s ? !1 : this[B] ? (mt(() => this[Jt](s)), !0) : this[Jt](s);
2260
2261
  if (t === "end") return this[We]();
2261
2262
  if (t === "close") {
2262
- if (this[Rt] = !0, !this[K] && !this[x]) return !1;
2263
+ if (this[Rt] = !0, !this[K] && !this[x$1]) return !1;
2263
2264
  let r = super.emit("close");
2264
2265
  return this.removeAllListeners("close"), r;
2265
2266
  } else if (t === "error") {
@@ -2277,7 +2278,7 @@ while (this[Le](this[Ft]()) && this[C].length);
2277
2278
  return this[H](), i;
2278
2279
  }
2279
2280
  [Jt](t) {
2280
- for (let s of this[F]) s.dest.write(t) === !1 && this.pause();
2281
+ for (let s of this[F$1]) s.dest.write(t) === !1 && this.pause();
2281
2282
  let e = this[M] ? !1 : super.emit("data", t);
2282
2283
  return this[H](), e;
2283
2284
  }
@@ -2288,30 +2289,30 @@ while (this[Le](this[Ft]()) && this[C].length);
2288
2289
  if (this[et]) {
2289
2290
  let e = this[et].end();
2290
2291
  if (e) {
2291
- for (let s of this[F]) s.dest.write(e);
2292
+ for (let s of this[F$1]) s.dest.write(e);
2292
2293
  this[M] || super.emit("data", e);
2293
2294
  }
2294
2295
  }
2295
- for (let e of this[F]) e.end();
2296
+ for (let e of this[F$1]) e.end();
2296
2297
  let t = super.emit("end");
2297
2298
  return this.removeAllListeners("end"), t;
2298
2299
  }
2299
2300
  async collect() {
2300
2301
  let t = Object.assign([], { dataLength: 0 });
2301
- this[k] || (t.dataLength = 0);
2302
+ this[k$1] || (t.dataLength = 0);
2302
2303
  let e = this.promise();
2303
2304
  return this.on("data", (s) => {
2304
- t.push(s), this[k] || (t.dataLength += s.length);
2305
+ t.push(s), this[k$1] || (t.dataLength += s.length);
2305
2306
  }), await e, t;
2306
2307
  }
2307
2308
  async concat() {
2308
- if (this[k]) throw new Error("cannot concat in objectMode");
2309
+ if (this[k$1]) throw new Error("cannot concat in objectMode");
2309
2310
  let t = await this.collect();
2310
- return this[P] ? t.join("") : Buffer.concat(t, t.dataLength);
2311
+ return this[P$1] ? t.join("") : Buffer.concat(t, t.dataLength);
2311
2312
  }
2312
2313
  async promise() {
2313
2314
  return new Promise((t, e) => {
2314
- this.on(x, () => e(/* @__PURE__ */ new Error("stream destroyed"))), this.on("error", (s) => e(s)), this.on("end", () => t());
2315
+ this.on(x$1, () => e(/* @__PURE__ */ new Error("stream destroyed"))), this.on("error", (s) => e(s)), this.on("end", () => t());
2315
2316
  });
2316
2317
  }
2317
2318
  [Symbol.asyncIterator]() {
@@ -2330,20 +2331,20 @@ while (this[Le](this[Ft]()) && this[C].length);
2330
2331
  });
2331
2332
  if (this[G]) return e();
2332
2333
  let r, o, h = (c) => {
2333
- this.off("data", a), this.off("end", l), this.off(x, u), e(), o(c);
2334
+ this.off("data", a), this.off("end", l), this.off(x$1, u), e(), o(c);
2334
2335
  }, a = (c) => {
2335
- this.off("error", h), this.off("end", l), this.off(x, u), this.pause(), r({
2336
+ this.off("error", h), this.off("end", l), this.off(x$1, u), this.pause(), r({
2336
2337
  value: c,
2337
2338
  done: !!this[G]
2338
2339
  });
2339
2340
  }, l = () => {
2340
- this.off("error", h), this.off("data", a), this.off(x, u), e(), r({
2341
+ this.off("error", h), this.off("data", a), this.off(x$1, u), e(), r({
2341
2342
  done: !0,
2342
2343
  value: void 0
2343
2344
  });
2344
2345
  }, u = () => h(/* @__PURE__ */ new Error("stream destroyed"));
2345
2346
  return new Promise((c, d) => {
2346
- o = d, r = c, this.once(x, u), this.once("error", h), this.once("end", l), this.once("data", a);
2347
+ o = d, r = c, this.once(x$1, u), this.once("error", h), this.once("end", l), this.once("data", a);
2347
2348
  });
2348
2349
  },
2349
2350
  throw: e,
@@ -2356,7 +2357,7 @@ while (this[Le](this[Ft]()) && this[C].length);
2356
2357
  }
2357
2358
  [Symbol.iterator]() {
2358
2359
  this[M] = !1;
2359
- let t = !1, e = () => (this.pause(), this.off(Xt, e), this.off(x, e), this.off("end", e), t = !0, {
2360
+ let t = !1, e = () => (this.pause(), this.off(Xt, e), this.off(x$1, e), this.off("end", e), t = !0, {
2360
2361
  done: !0,
2361
2362
  value: void 0
2362
2363
  }), s = () => {
@@ -2367,7 +2368,7 @@ while (this[Le](this[Ft]()) && this[C].length);
2367
2368
  value: i
2368
2369
  };
2369
2370
  };
2370
- return this.once("end", e), this.once(Xt, e), this.once(x, e), {
2371
+ return this.once("end", e), this.once(Xt, e), this.once(x$1, e), {
2371
2372
  next: s,
2372
2373
  throw: e,
2373
2374
  return: e,
@@ -2378,10 +2379,10 @@ while (this[Le](this[Ft]()) && this[C].length);
2378
2379
  };
2379
2380
  }
2380
2381
  destroy(t) {
2381
- if (this[x]) return t ? this.emit("error", t) : this.emit(x), this;
2382
- this[x] = !0, this[M] = !0, this[C].length = 0, this[T] = 0;
2382
+ if (this[x$1]) return t ? this.emit("error", t) : this.emit(x$1), this;
2383
+ this[x$1] = !0, this[M] = !0, this[C$1].length = 0, this[T$1] = 0;
2383
2384
  let e = this;
2384
- return typeof e.close == "function" && !this[Rt] && e.close(), t ? this.emit("error", t) : this.emit(x), this;
2385
+ return typeof e.close == "function" && !this[Rt] && e.close(), t ? this.emit("error", t) : this.emit(x$1), this;
2385
2386
  }
2386
2387
  static get isStream() {
2387
2388
  return oi;
@@ -2419,15 +2420,15 @@ while (this[Le](this[Ft]()) && this[C].length);
2419
2420
  Ke = 8;
2420
2421
  X = 10;
2421
2422
  Ve = 12;
2422
- _ = 15;
2423
- gt = ~_;
2423
+ _$1 = 15;
2424
+ gt = ~_$1;
2424
2425
  se = 16;
2425
2426
  je = 32;
2426
2427
  yt = 64;
2427
- j = 128;
2428
+ j$1 = 128;
2428
2429
  Nt = 256;
2429
2430
  Lt = 512;
2430
- Ie = yt | j | Lt;
2431
+ Ie = yt | j$1 | Lt;
2431
2432
  Fi = 1023;
2432
2433
  ie = (n) => n.isFile() ? Ke : n.isDirectory() ? U : n.isSymbolicLink() ? X : n.isCharacterDevice() ? He : n.isBlockDevice() ? qe : n.isSocket() ? Ve : n.isFIFO() ? Ge : L;
2433
2434
  ze = new ft({ max: 2 ** 12 });
@@ -2458,7 +2459,7 @@ while (this[Le](this[Ft]()) && this[C].length);
2458
2459
  }
2459
2460
  };
2460
2461
  Ye = Symbol("PathScurry setAsCwd");
2461
- R = class {
2462
+ R$1 = class {
2462
2463
  name;
2463
2464
  root;
2464
2465
  roots;
@@ -2589,7 +2590,7 @@ while (this[Le](this[Ft]()) && this[C].length);
2589
2590
  parent: this,
2590
2591
  fullpath: o
2591
2592
  });
2592
- return this.canReaddir() || (h.#e |= j), s.push(h), h;
2593
+ return this.canReaddir() || (h.#e |= j$1), s.push(h), h;
2593
2594
  }
2594
2595
  relative() {
2595
2596
  if (this.isCWD) return "";
@@ -2626,7 +2627,7 @@ while (this[Le](this[Ft]()) && this[C].length);
2626
2627
  return this.#y = s;
2627
2628
  }
2628
2629
  isUnknown() {
2629
- return (this.#e & _) === L;
2630
+ return (this.#e & _$1) === L;
2630
2631
  }
2631
2632
  isType(t) {
2632
2633
  return this[`is${t}`]();
@@ -2635,22 +2636,22 @@ while (this[Le](this[Ft]()) && this[C].length);
2635
2636
  return this.isUnknown() ? "Unknown" : this.isDirectory() ? "Directory" : this.isFile() ? "File" : this.isSymbolicLink() ? "SymbolicLink" : this.isFIFO() ? "FIFO" : this.isCharacterDevice() ? "CharacterDevice" : this.isBlockDevice() ? "BlockDevice" : this.isSocket() ? "Socket" : "Unknown";
2636
2637
  }
2637
2638
  isFile() {
2638
- return (this.#e & _) === Ke;
2639
+ return (this.#e & _$1) === Ke;
2639
2640
  }
2640
2641
  isDirectory() {
2641
- return (this.#e & _) === U;
2642
+ return (this.#e & _$1) === U;
2642
2643
  }
2643
2644
  isCharacterDevice() {
2644
- return (this.#e & _) === He;
2645
+ return (this.#e & _$1) === He;
2645
2646
  }
2646
2647
  isBlockDevice() {
2647
- return (this.#e & _) === qe;
2648
+ return (this.#e & _$1) === qe;
2648
2649
  }
2649
2650
  isFIFO() {
2650
- return (this.#e & _) === Ge;
2651
+ return (this.#e & _$1) === Ge;
2651
2652
  }
2652
2653
  isSocket() {
2653
- return (this.#e & _) === Ve;
2654
+ return (this.#e & _$1) === Ve;
2654
2655
  }
2655
2656
  isSymbolicLink() {
2656
2657
  return (this.#e & X) === X;
@@ -2671,14 +2672,14 @@ while (this[Le](this[Ft]()) && this[C].length);
2671
2672
  canReadlink() {
2672
2673
  if (this.#M) return !0;
2673
2674
  if (!this.parent) return !1;
2674
- let t = this.#e & _;
2675
- return !(t !== L && t !== X || this.#e & Nt || this.#e & j);
2675
+ let t = this.#e & _$1;
2676
+ return !(t !== L && t !== X || this.#e & Nt || this.#e & j$1);
2676
2677
  }
2677
2678
  calledReaddir() {
2678
2679
  return !!(this.#e & se);
2679
2680
  }
2680
2681
  isENOENT() {
2681
- return !!(this.#e & j);
2682
+ return !!(this.#e & j$1);
2682
2683
  }
2683
2684
  isNamed(t) {
2684
2685
  return this.nocase ? this.#C === _t(t) : this.#C === bt(t);
@@ -2713,7 +2714,7 @@ while (this[Le](this[Ft]()) && this[C].length);
2713
2714
  }
2714
2715
  }
2715
2716
  #v() {
2716
- this.#e & j || (this.#e = (this.#e | j) & gt, this.#G());
2717
+ this.#e & j$1 || (this.#e = (this.#e | j$1) & gt, this.#G());
2717
2718
  }
2718
2719
  #G() {
2719
2720
  let t = this.children();
@@ -2726,7 +2727,7 @@ while (this[Le](this[Ft]()) && this[C].length);
2726
2727
  #L() {
2727
2728
  if (this.#e & yt) return;
2728
2729
  let t = this.#e;
2729
- (t & _) === U && (t &= gt), this.#e = t | yt, this.#G();
2730
+ (t & _$1) === U && (t &= gt), this.#e = t | yt, this.#G();
2730
2731
  }
2731
2732
  #I(t = "") {
2732
2733
  t === "ENOTDIR" || t === "EPERM" ? this.#L() : t === "ENOENT" ? this.#v() : this.children().provisional = 0;
@@ -2736,13 +2737,13 @@ while (this[Le](this[Ft]()) && this[C].length);
2736
2737
  }
2737
2738
  #D(t = "") {
2738
2739
  let e = this.#e;
2739
- e |= Nt, t === "ENOENT" && (e |= j), (t === "EINVAL" || t === "UNKNOWN") && (e &= gt), this.#e = e, t === "ENOTDIR" && this.parent && this.parent.#L();
2740
+ e |= Nt, t === "ENOENT" && (e |= j$1), (t === "EINVAL" || t === "UNKNOWN") && (e &= gt), this.#e = e, t === "ENOTDIR" && this.parent && this.parent.#L();
2740
2741
  }
2741
2742
  #z(t, e) {
2742
2743
  return this.#U(t, e) || this.#B(t, e);
2743
2744
  }
2744
2745
  #B(t, e) {
2745
- let s = ie(t), i = this.newChild(t.name, s, { parent: this }), r = i.#e & _;
2746
+ let s = ie(t), i = this.newChild(t.name, s, { parent: this }), r = i.#e & _$1;
2746
2747
  return r !== U && r !== X && r !== L && (i.#e |= yt), e.unshift(i), e.provisional++, i;
2747
2748
  }
2748
2749
  #U(t, e) {
@@ -2756,14 +2757,14 @@ while (this[Le](this[Ft]()) && this[C].length);
2756
2757
  return e.#e = e.#e & gt | ie(t), r !== t.name && (e.name = t.name), s !== i.provisional && (s === i.length - 1 ? i.pop() : i.splice(s, 1), i.unshift(e)), i.provisional++, e;
2757
2758
  }
2758
2759
  async lstat() {
2759
- if ((this.#e & j) === 0) try {
2760
+ if ((this.#e & j$1) === 0) try {
2760
2761
  return this.#$(await this.#t.promises.lstat(this.fullpath())), this;
2761
2762
  } catch (t) {
2762
2763
  this.#F(t.code);
2763
2764
  }
2764
2765
  }
2765
2766
  lstatSync() {
2766
- if ((this.#e & j) === 0) try {
2767
+ if ((this.#e & j$1) === 0) try {
2767
2768
  return this.#$(this.#t.lstatSync(this.fullpath())), this;
2768
2769
  } catch (t) {
2769
2770
  this.#F(t.code);
@@ -2840,7 +2841,7 @@ while (this[Le](this[Ft]()) && this[C].length);
2840
2841
  }
2841
2842
  canReaddir() {
2842
2843
  if (this.#e & Ie) return !1;
2843
- let t = _ & this.#e;
2844
+ let t = _$1 & this.#e;
2844
2845
  return t === L || t === U || t === X;
2845
2846
  }
2846
2847
  shouldWalk(t, e) {
@@ -2848,7 +2849,7 @@ while (this[Le](this[Ft]()) && this[C].length);
2848
2849
  }
2849
2850
  async realpath() {
2850
2851
  if (this.#k) return this.#k;
2851
- if (!((Lt | Nt | j) & this.#e)) try {
2852
+ if (!((Lt | Nt | j$1) & this.#e)) try {
2852
2853
  let t = await this.#t.promises.realpath(this.fullpath());
2853
2854
  return this.#k = this.resolve(t);
2854
2855
  } catch {
@@ -2857,7 +2858,7 @@ while (this[Le](this[Ft]()) && this[C].length);
2857
2858
  }
2858
2859
  realpathSync() {
2859
2860
  if (this.#k) return this.#k;
2860
- if (!((Lt | Nt | j) & this.#e)) try {
2861
+ if (!((Lt | Nt | j$1) & this.#e)) try {
2861
2862
  let t = this.#t.realpathSync(this.fullpath());
2862
2863
  return this.#k = this.resolve(t);
2863
2864
  } catch {
@@ -2872,7 +2873,7 @@ while (this[Le](this[Ft]()) && this[C].length);
2872
2873
  for (i = t; i && i.parent && !e.has(i);) i.#x = void 0, i.#A = void 0, i = i.parent;
2873
2874
  }
2874
2875
  };
2875
- Pt = class n extends R {
2876
+ Pt = class n extends R$1 {
2876
2877
  sep = "\\";
2877
2878
  splitSep = Oi;
2878
2879
  constructor(t, e = L, s, i, r, o, h) {
@@ -2893,7 +2894,7 @@ while (this[Le](this[Ft]()) && this[C].length);
2893
2894
  return t = t.toUpperCase().replace(/\//g, "\\").replace($e, "$1\\"), t === e;
2894
2895
  }
2895
2896
  };
2896
- jt = class n extends R {
2897
+ jt = class n extends R$1 {
2897
2898
  splitSep = "/";
2898
2899
  sep = "/";
2899
2900
  constructor(t, e = L, s, i, r, o, h) {
@@ -2978,7 +2979,7 @@ while (this[Le](this[Ft]()) && this[C].length);
2978
2979
  return typeof t == "string" && (t = this.cwd.resolve(t)), (t.parent || t).fullpath();
2979
2980
  }
2980
2981
  async readdir(t = this.cwd, e = { withFileTypes: !0 }) {
2981
- typeof t == "string" ? t = this.cwd.resolve(t) : t instanceof R || (e = t, t = this.cwd);
2982
+ typeof t == "string" ? t = this.cwd.resolve(t) : t instanceof R$1 || (e = t, t = this.cwd);
2982
2983
  let { withFileTypes: s } = e;
2983
2984
  if (t.canReaddir()) {
2984
2985
  let i = await t.readdir();
@@ -2986,7 +2987,7 @@ while (this[Le](this[Ft]()) && this[C].length);
2986
2987
  } else return [];
2987
2988
  }
2988
2989
  readdirSync(t = this.cwd, e = { withFileTypes: !0 }) {
2989
- typeof t == "string" ? t = this.cwd.resolve(t) : t instanceof R || (e = t, t = this.cwd);
2990
+ typeof t == "string" ? t = this.cwd.resolve(t) : t instanceof R$1 || (e = t, t = this.cwd);
2990
2991
  let { withFileTypes: s = !0 } = e;
2991
2992
  return t.canReaddir() ? s ? t.readdirSync() : t.readdirSync().map((i) => i.name) : [];
2992
2993
  }
@@ -2997,27 +2998,27 @@ while (this[Le](this[Ft]()) && this[C].length);
2997
2998
  return typeof t == "string" && (t = this.cwd.resolve(t)), t.lstatSync();
2998
2999
  }
2999
3000
  async readlink(t = this.cwd, { withFileTypes: e } = { withFileTypes: !1 }) {
3000
- typeof t == "string" ? t = this.cwd.resolve(t) : t instanceof R || (e = t.withFileTypes, t = this.cwd);
3001
+ typeof t == "string" ? t = this.cwd.resolve(t) : t instanceof R$1 || (e = t.withFileTypes, t = this.cwd);
3001
3002
  let s = await t.readlink();
3002
3003
  return e ? s : s?.fullpath();
3003
3004
  }
3004
3005
  readlinkSync(t = this.cwd, { withFileTypes: e } = { withFileTypes: !1 }) {
3005
- typeof t == "string" ? t = this.cwd.resolve(t) : t instanceof R || (e = t.withFileTypes, t = this.cwd);
3006
+ typeof t == "string" ? t = this.cwd.resolve(t) : t instanceof R$1 || (e = t.withFileTypes, t = this.cwd);
3006
3007
  let s = t.readlinkSync();
3007
3008
  return e ? s : s?.fullpath();
3008
3009
  }
3009
3010
  async realpath(t = this.cwd, { withFileTypes: e } = { withFileTypes: !1 }) {
3010
- typeof t == "string" ? t = this.cwd.resolve(t) : t instanceof R || (e = t.withFileTypes, t = this.cwd);
3011
+ typeof t == "string" ? t = this.cwd.resolve(t) : t instanceof R$1 || (e = t.withFileTypes, t = this.cwd);
3011
3012
  let s = await t.realpath();
3012
3013
  return e ? s : s?.fullpath();
3013
3014
  }
3014
3015
  realpathSync(t = this.cwd, { withFileTypes: e } = { withFileTypes: !1 }) {
3015
- typeof t == "string" ? t = this.cwd.resolve(t) : t instanceof R || (e = t.withFileTypes, t = this.cwd);
3016
+ typeof t == "string" ? t = this.cwd.resolve(t) : t instanceof R$1 || (e = t.withFileTypes, t = this.cwd);
3016
3017
  let s = t.realpathSync();
3017
3018
  return e ? s : s?.fullpath();
3018
3019
  }
3019
3020
  async walk(t = this.cwd, e = {}) {
3020
- typeof t == "string" ? t = this.cwd.resolve(t) : t instanceof R || (e = t, t = this.cwd);
3021
+ typeof t == "string" ? t = this.cwd.resolve(t) : t instanceof R$1 || (e = t, t = this.cwd);
3021
3022
  let { withFileTypes: s = !0, follow: i = !1, filter: r, walkFilter: o } = e, h = [];
3022
3023
  (!r || r(t)) && h.push(s ? t : t.fullpath());
3023
3024
  let a = /* @__PURE__ */ new Set(), l = (c, d) => {
@@ -3039,7 +3040,7 @@ while (this[Le](this[Ft]()) && this[C].length);
3039
3040
  });
3040
3041
  }
3041
3042
  walkSync(t = this.cwd, e = {}) {
3042
- typeof t == "string" ? t = this.cwd.resolve(t) : t instanceof R || (e = t, t = this.cwd);
3043
+ typeof t == "string" ? t = this.cwd.resolve(t) : t instanceof R$1 || (e = t, t = this.cwd);
3043
3044
  let { withFileTypes: s = !0, follow: i = !1, filter: r, walkFilter: o } = e, h = [];
3044
3045
  (!r || r(t)) && h.push(s ? t : t.fullpath());
3045
3046
  let a = /* @__PURE__ */ new Set([t]);
@@ -3061,13 +3062,13 @@ while (this[Le](this[Ft]()) && this[C].length);
3061
3062
  return this.iterate();
3062
3063
  }
3063
3064
  iterate(t = this.cwd, e = {}) {
3064
- return typeof t == "string" ? t = this.cwd.resolve(t) : t instanceof R || (e = t, t = this.cwd), this.stream(t, e)[Symbol.asyncIterator]();
3065
+ return typeof t == "string" ? t = this.cwd.resolve(t) : t instanceof R$1 || (e = t, t = this.cwd), this.stream(t, e)[Symbol.asyncIterator]();
3065
3066
  }
3066
3067
  [Symbol.iterator]() {
3067
3068
  return this.iterateSync();
3068
3069
  }
3069
3070
  *iterateSync(t = this.cwd, e = {}) {
3070
- typeof t == "string" ? t = this.cwd.resolve(t) : t instanceof R || (e = t, t = this.cwd);
3071
+ typeof t == "string" ? t = this.cwd.resolve(t) : t instanceof R$1 || (e = t, t = this.cwd);
3071
3072
  let { withFileTypes: s = !0, follow: i = !1, filter: r, walkFilter: o } = e;
3072
3073
  (!r || r(t)) && (yield s ? t : t.fullpath());
3073
3074
  let h = /* @__PURE__ */ new Set([t]);
@@ -3085,7 +3086,7 @@ while (this[Le](this[Ft]()) && this[C].length);
3085
3086
  }
3086
3087
  }
3087
3088
  stream(t = this.cwd, e = {}) {
3088
- typeof t == "string" ? t = this.cwd.resolve(t) : t instanceof R || (e = t, t = this.cwd);
3089
+ typeof t == "string" ? t = this.cwd.resolve(t) : t instanceof R$1 || (e = t, t = this.cwd);
3089
3090
  let { withFileTypes: s = !0, follow: i = !1, filter: r, walkFilter: o } = e, h = new V({ objectMode: !0 });
3090
3091
  (!r || r(t)) && h.write(s ? t : t.fullpath());
3091
3092
  let a = /* @__PURE__ */ new Set(), l = [t], u = 0, c = () => {
@@ -3121,7 +3122,7 @@ while (this[Le](this[Ft]()) && this[C].length);
3121
3122
  return c(), h;
3122
3123
  }
3123
3124
  streamSync(t = this.cwd, e = {}) {
3124
- typeof t == "string" ? t = this.cwd.resolve(t) : t instanceof R || (e = t, t = this.cwd);
3125
+ typeof t == "string" ? t = this.cwd.resolve(t) : t instanceof R$1 || (e = t, t = this.cwd);
3125
3126
  let { withFileTypes: s = !0, follow: i = !1, filter: r, walkFilter: o } = e, h = new V({ objectMode: !0 }), a = /* @__PURE__ */ new Set();
3126
3127
  (!r || r(t)) && h.write(s ? t : t.fullpath());
3127
3128
  let l = [t], u = 0, c = () => {
@@ -3320,12 +3321,12 @@ while (this[Le](this[Ft]()) && this[C].length);
3320
3321
  for (let h of t) this.add(h);
3321
3322
  }
3322
3323
  add(t) {
3323
- let e = new D(t, this.mmopts);
3324
+ let e = new D$1(t, this.mmopts);
3324
3325
  for (let s = 0; s < e.set.length; s++) {
3325
3326
  let i = e.set[s], r = e.globParts[s];
3326
3327
  if (!i || !r) throw new Error("invalid pattern object");
3327
3328
  for (; i[0] === "." && r[0] === ".";) i.shift(), r.shift();
3328
- let o = new nt(i, r, 0, this.platform), h = new D(o.globString(), this.mmopts), a = r[r.length - 1] === "**", l = o.isAbsolute();
3329
+ let o = new nt(i, r, 0, this.platform), h = new D$1(o.globString(), this.mmopts), a = r[r.length - 1] === "**", l = o.isAbsolute();
3329
3330
  l ? this.absolute.push(h) : this.relative.push(h), a && (l ? this.absoluteChildren.push(h) : this.relativeChildren.push(h));
3330
3331
  }
3331
3332
  }
@@ -3674,7 +3675,7 @@ while (this[Le](this[Ft]()) && this[C].length);
3674
3675
  }
3675
3676
  };
3676
3677
  Pi = typeof process == "object" && process && typeof process.platform == "string" ? process.platform : "linux";
3677
- I = class {
3678
+ I$1 = class {
3678
3679
  absolute;
3679
3680
  cwd;
3680
3681
  root;
@@ -3737,7 +3738,7 @@ while (this[Le](this[Ft]()) && this[C].length);
3737
3738
  platform: this.platform,
3738
3739
  windowsPathsNoEscape: this.windowsPathsNoEscape,
3739
3740
  debug: !!this.opts.debug
3740
- }, [o, h] = this.pattern.map((a) => new D(a, i)).reduce((a, l) => (a[0].push(...l.set), a[1].push(...l.globParts), a), [[], []]);
3741
+ }, [o, h] = this.pattern.map((a) => new D$1(a, i)).reduce((a, l) => (a[0].push(...l.set), a[1].push(...l.globParts), a), [[], []]);
3741
3742
  this.patterns = o.map((a, l) => {
3742
3743
  let u = h[l];
3743
3744
  if (!u) throw new Error("invalid pattern object");
@@ -3795,7 +3796,7 @@ while (this[Le](this[Ft]()) && this[C].length);
3795
3796
  };
3796
3797
  le = (n, t = {}) => {
3797
3798
  Array.isArray(n) || (n = [n]);
3798
- for (let e of n) if (new D(e, t).hasMagic()) return !0;
3799
+ for (let e of n) if (new D$1(e, t).hasMagic()) return !0;
3799
3800
  return !1;
3800
3801
  };
3801
3802
  ji = Bt;
@@ -3818,7 +3819,7 @@ while (this[Le](this[Ft]()) && this[C].length);
3818
3819
  iterate: Bi,
3819
3820
  globIterateSync: Ut,
3820
3821
  iterateSync: zi,
3821
- Glob: I,
3822
+ Glob: I$1,
3822
3823
  hasMagic: le,
3823
3824
  escape: tt,
3824
3825
  unescape: W
@@ -4236,18 +4237,18 @@ var require_enoent = /* @__PURE__ */ __commonJSMin(((exports, module) => {
4236
4237
  //#endregion
4237
4238
  //#region src/lib/crossSpawn.ts
4238
4239
  var import_cross_spawn = /* @__PURE__ */ __toESM((/* @__PURE__ */ __commonJSMin(((exports, module) => {
4239
- const cp$1 = __require("child_process");
4240
+ const cp = __require("child_process");
4240
4241
  const parse = require_parse$1();
4241
4242
  const enoent = require_enoent();
4242
4243
  function spawn(command, args, options) {
4243
4244
  const parsed = parse(command, args, options);
4244
- const spawned = cp$1.spawn(parsed.command, parsed.args, parsed.options);
4245
+ const spawned = cp.spawn(parsed.command, parsed.args, parsed.options);
4245
4246
  enoent.hookChildProcess(spawned, parsed);
4246
4247
  return spawned;
4247
4248
  }
4248
4249
  function spawnSync(command, args, options) {
4249
4250
  const parsed = parse(command, args, options);
4250
- const result = cp$1.spawnSync(parsed.command, parsed.args, parsed.options);
4251
+ const result = cp.spawnSync(parsed.command, parsed.args, parsed.options);
4251
4252
  result.error = result.error || enoent.verifyENOENTSync(result.status, parsed);
4252
4253
  return result;
4253
4254
  }
@@ -4257,7 +4258,7 @@ var import_cross_spawn = /* @__PURE__ */ __toESM((/* @__PURE__ */ __commonJSMin(
4257
4258
  module.exports._parse = parse;
4258
4259
  module.exports._enoent = enoent;
4259
4260
  })))(), 1);
4260
- function spawn(command, args, options) {
4261
+ function spawn$1(command, args, options) {
4261
4262
  return (0, import_cross_spawn.default)(command, args, options);
4262
4263
  }
4263
4264
  function spawnSync(command, args, options) {
@@ -8756,7 +8757,7 @@ var require_parse_json = /* @__PURE__ */ __commonJSMin(((exports, module) => {
8756
8757
  module.exports = parseJson;
8757
8758
  }));
8758
8759
  //#endregion
8759
- //#region ../../node_modules/.pnpm/js-yaml@4.1.1/node_modules/js-yaml/lib/common.js
8760
+ //#region ../../node_modules/.pnpm/js-yaml@4.3.0/node_modules/js-yaml/lib/common.js
8760
8761
  var require_common = /* @__PURE__ */ __commonJSMin(((exports, module) => {
8761
8762
  function isNothing(subject) {
8762
8763
  return typeof subject === "undefined" || subject === null;
@@ -8770,19 +8771,18 @@ var require_common = /* @__PURE__ */ __commonJSMin(((exports, module) => {
8770
8771
  return [sequence];
8771
8772
  }
8772
8773
  function extend(target, source) {
8773
- var index, length, key, sourceKeys;
8774
8774
  if (source) {
8775
- sourceKeys = Object.keys(source);
8776
- for (index = 0, length = sourceKeys.length; index < length; index += 1) {
8777
- key = sourceKeys[index];
8775
+ const sourceKeys = Object.keys(source);
8776
+ for (let index = 0, length = sourceKeys.length; index < length; index += 1) {
8777
+ const key = sourceKeys[index];
8778
8778
  target[key] = source[key];
8779
8779
  }
8780
8780
  }
8781
8781
  return target;
8782
8782
  }
8783
8783
  function repeat(string, count) {
8784
- var result = "", cycle;
8785
- for (cycle = 0; cycle < count; cycle += 1) result += string;
8784
+ let result = "";
8785
+ for (let cycle = 0; cycle < count; cycle += 1) result += string;
8786
8786
  return result;
8787
8787
  }
8788
8788
  function isNegativeZero(number) {
@@ -8796,10 +8796,11 @@ var require_common = /* @__PURE__ */ __commonJSMin(((exports, module) => {
8796
8796
  module.exports.extend = extend;
8797
8797
  }));
8798
8798
  //#endregion
8799
- //#region ../../node_modules/.pnpm/js-yaml@4.1.1/node_modules/js-yaml/lib/exception.js
8799
+ //#region ../../node_modules/.pnpm/js-yaml@4.3.0/node_modules/js-yaml/lib/exception.js
8800
8800
  var require_exception = /* @__PURE__ */ __commonJSMin(((exports, module) => {
8801
8801
  function formatError(exception, compact) {
8802
- var where = "", message = exception.reason || "(unknown reason)";
8802
+ let where = "";
8803
+ const message = exception.reason || "(unknown reason)";
8803
8804
  if (!exception.mark) return message;
8804
8805
  if (exception.mark.name) where += "in \"" + exception.mark.name + "\" ";
8805
8806
  where += "(" + (exception.mark.line + 1) + ":" + (exception.mark.column + 1) + ")";
@@ -8823,13 +8824,13 @@ var require_exception = /* @__PURE__ */ __commonJSMin(((exports, module) => {
8823
8824
  module.exports = YAMLException;
8824
8825
  }));
8825
8826
  //#endregion
8826
- //#region ../../node_modules/.pnpm/js-yaml@4.1.1/node_modules/js-yaml/lib/snippet.js
8827
+ //#region ../../node_modules/.pnpm/js-yaml@4.3.0/node_modules/js-yaml/lib/snippet.js
8827
8828
  var require_snippet = /* @__PURE__ */ __commonJSMin(((exports, module) => {
8828
- var common = require_common();
8829
+ const common = require_common();
8829
8830
  function getLine(buffer, lineStart, lineEnd, position, maxLineLength) {
8830
- var head = "";
8831
- var tail = "";
8832
- var maxHalfLength = Math.floor(maxLineLength / 2) - 1;
8831
+ let head = "";
8832
+ let tail = "";
8833
+ const maxHalfLength = Math.floor(maxLineLength / 2) - 1;
8833
8834
  if (position - lineStart > maxHalfLength) {
8834
8835
  head = " ... ";
8835
8836
  lineStart = position - maxHalfLength + head.length;
@@ -8853,31 +8854,31 @@ var require_snippet = /* @__PURE__ */ __commonJSMin(((exports, module) => {
8853
8854
  if (typeof options.indent !== "number") options.indent = 1;
8854
8855
  if (typeof options.linesBefore !== "number") options.linesBefore = 3;
8855
8856
  if (typeof options.linesAfter !== "number") options.linesAfter = 2;
8856
- var re = /\r?\n|\r|\0/g;
8857
- var lineStarts = [0];
8858
- var lineEnds = [];
8859
- var match;
8860
- var foundLineNo = -1;
8857
+ const re = /\r?\n|\r|\0/g;
8858
+ const lineStarts = [0];
8859
+ const lineEnds = [];
8860
+ let match;
8861
+ let foundLineNo = -1;
8861
8862
  while (match = re.exec(mark.buffer)) {
8862
8863
  lineEnds.push(match.index);
8863
8864
  lineStarts.push(match.index + match[0].length);
8864
8865
  if (mark.position <= match.index && foundLineNo < 0) foundLineNo = lineStarts.length - 2;
8865
8866
  }
8866
8867
  if (foundLineNo < 0) foundLineNo = lineStarts.length - 1;
8867
- var result = "", i, line;
8868
- var lineNoLength = Math.min(mark.line + options.linesAfter, lineEnds.length).toString().length;
8869
- var maxLineLength = options.maxLength - (options.indent + lineNoLength + 3);
8870
- for (i = 1; i <= options.linesBefore; i++) {
8868
+ let result = "";
8869
+ const lineNoLength = Math.min(mark.line + options.linesAfter, lineEnds.length).toString().length;
8870
+ const maxLineLength = options.maxLength - (options.indent + lineNoLength + 3);
8871
+ for (let i = 1; i <= options.linesBefore; i++) {
8871
8872
  if (foundLineNo - i < 0) break;
8872
- line = getLine(mark.buffer, lineStarts[foundLineNo - i], lineEnds[foundLineNo - i], mark.position - (lineStarts[foundLineNo] - lineStarts[foundLineNo - i]), maxLineLength);
8873
+ const line = getLine(mark.buffer, lineStarts[foundLineNo - i], lineEnds[foundLineNo - i], mark.position - (lineStarts[foundLineNo] - lineStarts[foundLineNo - i]), maxLineLength);
8873
8874
  result = common.repeat(" ", options.indent) + padStart((mark.line - i + 1).toString(), lineNoLength) + " | " + line.str + "\n" + result;
8874
8875
  }
8875
- line = getLine(mark.buffer, lineStarts[foundLineNo], lineEnds[foundLineNo], mark.position, maxLineLength);
8876
+ const line = getLine(mark.buffer, lineStarts[foundLineNo], lineEnds[foundLineNo], mark.position, maxLineLength);
8876
8877
  result += common.repeat(" ", options.indent) + padStart((mark.line + 1).toString(), lineNoLength) + " | " + line.str + "\n";
8877
8878
  result += common.repeat("-", options.indent + lineNoLength + 3 + line.pos) + "^\n";
8878
- for (i = 1; i <= options.linesAfter; i++) {
8879
+ for (let i = 1; i <= options.linesAfter; i++) {
8879
8880
  if (foundLineNo + i >= lineEnds.length) break;
8880
- line = getLine(mark.buffer, lineStarts[foundLineNo + i], lineEnds[foundLineNo + i], mark.position - (lineStarts[foundLineNo] - lineStarts[foundLineNo + i]), maxLineLength);
8881
+ const line = getLine(mark.buffer, lineStarts[foundLineNo + i], lineEnds[foundLineNo + i], mark.position - (lineStarts[foundLineNo] - lineStarts[foundLineNo + i]), maxLineLength);
8881
8882
  result += common.repeat(" ", options.indent) + padStart((mark.line + i + 1).toString(), lineNoLength) + " | " + line.str + "\n";
8882
8883
  }
8883
8884
  return result.replace(/\n$/, "");
@@ -8885,10 +8886,10 @@ var require_snippet = /* @__PURE__ */ __commonJSMin(((exports, module) => {
8885
8886
  module.exports = makeSnippet;
8886
8887
  }));
8887
8888
  //#endregion
8888
- //#region ../../node_modules/.pnpm/js-yaml@4.1.1/node_modules/js-yaml/lib/type.js
8889
+ //#region ../../node_modules/.pnpm/js-yaml@4.3.0/node_modules/js-yaml/lib/type.js
8889
8890
  var require_type = /* @__PURE__ */ __commonJSMin(((exports, module) => {
8890
- var YAMLException = require_exception();
8891
- var TYPE_CONSTRUCTOR_OPTIONS = [
8891
+ const YAMLException = require_exception();
8892
+ const TYPE_CONSTRUCTOR_OPTIONS = [
8892
8893
  "kind",
8893
8894
  "multi",
8894
8895
  "resolve",
@@ -8900,13 +8901,13 @@ var require_type = /* @__PURE__ */ __commonJSMin(((exports, module) => {
8900
8901
  "defaultStyle",
8901
8902
  "styleAliases"
8902
8903
  ];
8903
- var YAML_NODE_KINDS = [
8904
+ const YAML_NODE_KINDS = [
8904
8905
  "scalar",
8905
8906
  "sequence",
8906
8907
  "mapping"
8907
8908
  ];
8908
8909
  function compileStyleAliases(map) {
8909
- var result = {};
8910
+ const result = {};
8910
8911
  if (map !== null) Object.keys(map).forEach(function(style) {
8911
8912
  map[style].forEach(function(alias) {
8912
8913
  result[String(alias)] = style;
@@ -8940,14 +8941,14 @@ var require_type = /* @__PURE__ */ __commonJSMin(((exports, module) => {
8940
8941
  module.exports = Type;
8941
8942
  }));
8942
8943
  //#endregion
8943
- //#region ../../node_modules/.pnpm/js-yaml@4.1.1/node_modules/js-yaml/lib/schema.js
8944
+ //#region ../../node_modules/.pnpm/js-yaml@4.3.0/node_modules/js-yaml/lib/schema.js
8944
8945
  var require_schema$3 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
8945
- var YAMLException = require_exception();
8946
- var Type = require_type();
8946
+ const YAMLException = require_exception();
8947
+ const Type = require_type();
8947
8948
  function compileList(schema, name) {
8948
- var result = [];
8949
+ const result = [];
8949
8950
  schema[name].forEach(function(currentType) {
8950
- var newIndex = result.length;
8951
+ let newIndex = result.length;
8951
8952
  result.forEach(function(previousType, previousIndex) {
8952
8953
  if (previousType.tag === currentType.tag && previousType.kind === currentType.kind && previousType.multi === currentType.multi) newIndex = previousIndex;
8953
8954
  });
@@ -8956,7 +8957,7 @@ var require_schema$3 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
8956
8957
  return result;
8957
8958
  }
8958
8959
  function compileMap() {
8959
- var result = {
8960
+ const result = {
8960
8961
  scalar: {},
8961
8962
  sequence: {},
8962
8963
  mapping: {},
@@ -8967,22 +8968,22 @@ var require_schema$3 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
8967
8968
  mapping: [],
8968
8969
  fallback: []
8969
8970
  }
8970
- }, index, length;
8971
+ };
8971
8972
  function collectType(type) {
8972
8973
  if (type.multi) {
8973
8974
  result.multi[type.kind].push(type);
8974
8975
  result.multi["fallback"].push(type);
8975
8976
  } else result[type.kind][type.tag] = result["fallback"][type.tag] = type;
8976
8977
  }
8977
- for (index = 0, length = arguments.length; index < length; index += 1) arguments[index].forEach(collectType);
8978
+ for (let index = 0, length = arguments.length; index < length; index += 1) arguments[index].forEach(collectType);
8978
8979
  return result;
8979
8980
  }
8980
8981
  function Schema(definition) {
8981
8982
  return this.extend(definition);
8982
8983
  }
8983
8984
  Schema.prototype.extend = function extend(definition) {
8984
- var implicit = [];
8985
- var explicit = [];
8985
+ let implicit = [];
8986
+ let explicit = [];
8986
8987
  if (definition instanceof Type) explicit.push(definition);
8987
8988
  else if (Array.isArray(definition)) explicit = explicit.concat(definition);
8988
8989
  else if (definition && (Array.isArray(definition.implicit) || Array.isArray(definition.explicit))) {
@@ -8997,7 +8998,7 @@ var require_schema$3 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
8997
8998
  explicit.forEach(function(type) {
8998
8999
  if (!(type instanceof Type)) throw new YAMLException("Specified list of YAML types (or a single Type object) contains a non-Type object.");
8999
9000
  });
9000
- var result = Object.create(Schema.prototype);
9001
+ const result = Object.create(Schema.prototype);
9001
9002
  result.implicit = (this.implicit || []).concat(implicit);
9002
9003
  result.explicit = (this.explicit || []).concat(explicit);
9003
9004
  result.compiledImplicit = compileList(result, "implicit");
@@ -9008,7 +9009,7 @@ var require_schema$3 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
9008
9009
  module.exports = Schema;
9009
9010
  }));
9010
9011
  //#endregion
9011
- //#region ../../node_modules/.pnpm/js-yaml@4.1.1/node_modules/js-yaml/lib/type/str.js
9012
+ //#region ../../node_modules/.pnpm/js-yaml@4.3.0/node_modules/js-yaml/lib/type/str.js
9012
9013
  var require_str = /* @__PURE__ */ __commonJSMin(((exports, module) => {
9013
9014
  module.exports = new (require_type())("tag:yaml.org,2002:str", {
9014
9015
  kind: "scalar",
@@ -9018,7 +9019,7 @@ var require_str = /* @__PURE__ */ __commonJSMin(((exports, module) => {
9018
9019
  });
9019
9020
  }));
9020
9021
  //#endregion
9021
- //#region ../../node_modules/.pnpm/js-yaml@4.1.1/node_modules/js-yaml/lib/type/seq.js
9022
+ //#region ../../node_modules/.pnpm/js-yaml@4.3.0/node_modules/js-yaml/lib/type/seq.js
9022
9023
  var require_seq$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
9023
9024
  module.exports = new (require_type())("tag:yaml.org,2002:seq", {
9024
9025
  kind: "sequence",
@@ -9028,7 +9029,7 @@ var require_seq$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
9028
9029
  });
9029
9030
  }));
9030
9031
  //#endregion
9031
- //#region ../../node_modules/.pnpm/js-yaml@4.1.1/node_modules/js-yaml/lib/type/map.js
9032
+ //#region ../../node_modules/.pnpm/js-yaml@4.3.0/node_modules/js-yaml/lib/type/map.js
9032
9033
  var require_map$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
9033
9034
  module.exports = new (require_type())("tag:yaml.org,2002:map", {
9034
9035
  kind: "mapping",
@@ -9038,7 +9039,7 @@ var require_map$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
9038
9039
  });
9039
9040
  }));
9040
9041
  //#endregion
9041
- //#region ../../node_modules/.pnpm/js-yaml@4.1.1/node_modules/js-yaml/lib/schema/failsafe.js
9042
+ //#region ../../node_modules/.pnpm/js-yaml@4.3.0/node_modules/js-yaml/lib/schema/failsafe.js
9042
9043
  var require_failsafe = /* @__PURE__ */ __commonJSMin(((exports, module) => {
9043
9044
  module.exports = new (require_schema$3())({ explicit: [
9044
9045
  require_str(),
@@ -9047,12 +9048,12 @@ var require_failsafe = /* @__PURE__ */ __commonJSMin(((exports, module) => {
9047
9048
  ] });
9048
9049
  }));
9049
9050
  //#endregion
9050
- //#region ../../node_modules/.pnpm/js-yaml@4.1.1/node_modules/js-yaml/lib/type/null.js
9051
+ //#region ../../node_modules/.pnpm/js-yaml@4.3.0/node_modules/js-yaml/lib/type/null.js
9051
9052
  var require_null$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
9052
- var Type = require_type();
9053
+ const Type = require_type();
9053
9054
  function resolveYamlNull(data) {
9054
9055
  if (data === null) return true;
9055
- var max = data.length;
9056
+ const max = data.length;
9056
9057
  return max === 1 && data === "~" || max === 4 && (data === "null" || data === "Null" || data === "NULL");
9057
9058
  }
9058
9059
  function constructYamlNull() {
@@ -9087,12 +9088,12 @@ var require_null$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
9087
9088
  });
9088
9089
  }));
9089
9090
  //#endregion
9090
- //#region ../../node_modules/.pnpm/js-yaml@4.1.1/node_modules/js-yaml/lib/type/bool.js
9091
+ //#region ../../node_modules/.pnpm/js-yaml@4.3.0/node_modules/js-yaml/lib/type/bool.js
9091
9092
  var require_bool$2 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
9092
- var Type = require_type();
9093
+ const Type = require_type();
9093
9094
  function resolveYamlBoolean(data) {
9094
9095
  if (data === null) return false;
9095
- var max = data.length;
9096
+ const max = data.length;
9096
9097
  return max === 4 && (data === "true" || data === "True" || data === "TRUE") || max === 5 && (data === "false" || data === "False" || data === "FALSE");
9097
9098
  }
9098
9099
  function constructYamlBoolean(data) {
@@ -9121,24 +9122,26 @@ var require_bool$2 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
9121
9122
  });
9122
9123
  }));
9123
9124
  //#endregion
9124
- //#region ../../node_modules/.pnpm/js-yaml@4.1.1/node_modules/js-yaml/lib/type/int.js
9125
+ //#region ../../node_modules/.pnpm/js-yaml@4.3.0/node_modules/js-yaml/lib/type/int.js
9125
9126
  var require_int$2 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
9126
- var common = require_common();
9127
- var Type = require_type();
9127
+ const common = require_common();
9128
+ const Type = require_type();
9128
9129
  function isHexCode(c) {
9129
- return 48 <= c && c <= 57 || 65 <= c && c <= 70 || 97 <= c && c <= 102;
9130
+ return c >= 48 && c <= 57 || c >= 65 && c <= 70 || c >= 97 && c <= 102;
9130
9131
  }
9131
9132
  function isOctCode(c) {
9132
- return 48 <= c && c <= 55;
9133
+ return c >= 48 && c <= 55;
9133
9134
  }
9134
9135
  function isDecCode(c) {
9135
- return 48 <= c && c <= 57;
9136
+ return c >= 48 && c <= 57;
9136
9137
  }
9137
9138
  function resolveYamlInteger(data) {
9138
9139
  if (data === null) return false;
9139
- var max = data.length, index = 0, hasDigits = false, ch;
9140
+ const max = data.length;
9141
+ let index = 0;
9142
+ let hasDigits = false;
9140
9143
  if (!max) return false;
9141
- ch = data[index];
9144
+ let ch = data[index];
9142
9145
  if (ch === "-" || ch === "+") ch = data[++index];
9143
9146
  if (ch === "0") {
9144
9147
  if (index + 1 === max) return true;
@@ -9147,47 +9150,39 @@ var require_int$2 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
9147
9150
  index++;
9148
9151
  for (; index < max; index++) {
9149
9152
  ch = data[index];
9150
- if (ch === "_") continue;
9151
9153
  if (ch !== "0" && ch !== "1") return false;
9152
9154
  hasDigits = true;
9153
9155
  }
9154
- return hasDigits && ch !== "_";
9156
+ return hasDigits && isFinite(parseYamlInteger(data));
9155
9157
  }
9156
9158
  if (ch === "x") {
9157
9159
  index++;
9158
9160
  for (; index < max; index++) {
9159
- ch = data[index];
9160
- if (ch === "_") continue;
9161
9161
  if (!isHexCode(data.charCodeAt(index))) return false;
9162
9162
  hasDigits = true;
9163
9163
  }
9164
- return hasDigits && ch !== "_";
9164
+ return hasDigits && isFinite(parseYamlInteger(data));
9165
9165
  }
9166
9166
  if (ch === "o") {
9167
9167
  index++;
9168
9168
  for (; index < max; index++) {
9169
- ch = data[index];
9170
- if (ch === "_") continue;
9171
9169
  if (!isOctCode(data.charCodeAt(index))) return false;
9172
9170
  hasDigits = true;
9173
9171
  }
9174
- return hasDigits && ch !== "_";
9172
+ return hasDigits && isFinite(parseYamlInteger(data));
9175
9173
  }
9176
9174
  }
9177
- if (ch === "_") return false;
9178
9175
  for (; index < max; index++) {
9179
- ch = data[index];
9180
- if (ch === "_") continue;
9181
9176
  if (!isDecCode(data.charCodeAt(index))) return false;
9182
9177
  hasDigits = true;
9183
9178
  }
9184
- if (!hasDigits || ch === "_") return false;
9185
- return true;
9179
+ if (!hasDigits) return false;
9180
+ return isFinite(parseYamlInteger(data));
9186
9181
  }
9187
- function constructYamlInteger(data) {
9188
- var value = data, sign = 1, ch;
9189
- if (value.indexOf("_") !== -1) value = value.replace(/_/g, "");
9190
- ch = value[0];
9182
+ function parseYamlInteger(data) {
9183
+ let value = data;
9184
+ let sign = 1;
9185
+ let ch = value[0];
9191
9186
  if (ch === "-" || ch === "+") {
9192
9187
  if (ch === "-") sign = -1;
9193
9188
  value = value.slice(1);
@@ -9201,6 +9196,9 @@ var require_int$2 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
9201
9196
  }
9202
9197
  return sign * parseInt(value, 10);
9203
9198
  }
9199
+ function constructYamlInteger(data) {
9200
+ return parseYamlInteger(data);
9201
+ }
9204
9202
  function isInteger(object) {
9205
9203
  return Object.prototype.toString.call(object) === "[object Number]" && object % 1 === 0 && !common.isNegativeZero(object);
9206
9204
  }
@@ -9233,26 +9231,28 @@ var require_int$2 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
9233
9231
  });
9234
9232
  }));
9235
9233
  //#endregion
9236
- //#region ../../node_modules/.pnpm/js-yaml@4.1.1/node_modules/js-yaml/lib/type/float.js
9234
+ //#region ../../node_modules/.pnpm/js-yaml@4.3.0/node_modules/js-yaml/lib/type/float.js
9237
9235
  var require_float$2 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
9238
- var common = require_common();
9239
- var Type = require_type();
9240
- var YAML_FLOAT_PATTERN = /* @__PURE__ */ new RegExp("^(?:[-+]?(?:[0-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");
9236
+ const common = require_common();
9237
+ const Type = require_type();
9238
+ const YAML_FLOAT_PATTERN = /* @__PURE__ */ new RegExp("^(?:[-+]?(?:[0-9]+)(?:\\.[0-9]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");
9239
+ const YAML_FLOAT_SPECIAL_PATTERN = /* @__PURE__ */ new RegExp("^(?:[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");
9241
9240
  function resolveYamlFloat(data) {
9242
9241
  if (data === null) return false;
9243
- if (!YAML_FLOAT_PATTERN.test(data) || data[data.length - 1] === "_") return false;
9244
- return true;
9242
+ if (!YAML_FLOAT_PATTERN.test(data)) return false;
9243
+ if (isFinite(parseFloat(data, 10))) return true;
9244
+ return YAML_FLOAT_SPECIAL_PATTERN.test(data);
9245
9245
  }
9246
9246
  function constructYamlFloat(data) {
9247
- var value = data.replace(/_/g, "").toLowerCase(), sign = value[0] === "-" ? -1 : 1;
9247
+ let value = data.toLowerCase();
9248
+ const sign = value[0] === "-" ? -1 : 1;
9248
9249
  if ("+-".indexOf(value[0]) >= 0) value = value.slice(1);
9249
9250
  if (value === ".inf") return sign === 1 ? Number.POSITIVE_INFINITY : Number.NEGATIVE_INFINITY;
9250
9251
  else if (value === ".nan") return NaN;
9251
9252
  return sign * parseFloat(value, 10);
9252
9253
  }
9253
- var SCIENTIFIC_WITHOUT_DOT = /^[-+]?[0-9]+e/;
9254
+ const SCIENTIFIC_WITHOUT_DOT = /^[-+]?[0-9]+e/;
9254
9255
  function representYamlFloat(object, style) {
9255
- var res;
9256
9256
  if (isNaN(object)) switch (style) {
9257
9257
  case "lowercase": return ".nan";
9258
9258
  case "uppercase": return ".NAN";
@@ -9269,7 +9269,7 @@ var require_float$2 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
9269
9269
  case "camelcase": return "-.Inf";
9270
9270
  }
9271
9271
  else if (common.isNegativeZero(object)) return "-0.0";
9272
- res = object.toString(10);
9272
+ const res = object.toString(10);
9273
9273
  return SCIENTIFIC_WITHOUT_DOT.test(res) ? res.replace("e", ".e") : res;
9274
9274
  }
9275
9275
  function isFloat(object) {
@@ -9285,7 +9285,7 @@ var require_float$2 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
9285
9285
  });
9286
9286
  }));
9287
9287
  //#endregion
9288
- //#region ../../node_modules/.pnpm/js-yaml@4.1.1/node_modules/js-yaml/lib/schema/json.js
9288
+ //#region ../../node_modules/.pnpm/js-yaml@4.3.0/node_modules/js-yaml/lib/schema/json.js
9289
9289
  var require_json = /* @__PURE__ */ __commonJSMin(((exports, module) => {
9290
9290
  module.exports = require_failsafe().extend({ implicit: [
9291
9291
  require_null$1(),
@@ -9295,16 +9295,16 @@ var require_json = /* @__PURE__ */ __commonJSMin(((exports, module) => {
9295
9295
  ] });
9296
9296
  }));
9297
9297
  //#endregion
9298
- //#region ../../node_modules/.pnpm/js-yaml@4.1.1/node_modules/js-yaml/lib/schema/core.js
9298
+ //#region ../../node_modules/.pnpm/js-yaml@4.3.0/node_modules/js-yaml/lib/schema/core.js
9299
9299
  var require_core = /* @__PURE__ */ __commonJSMin(((exports, module) => {
9300
9300
  module.exports = require_json();
9301
9301
  }));
9302
9302
  //#endregion
9303
- //#region ../../node_modules/.pnpm/js-yaml@4.1.1/node_modules/js-yaml/lib/type/timestamp.js
9303
+ //#region ../../node_modules/.pnpm/js-yaml@4.3.0/node_modules/js-yaml/lib/type/timestamp.js
9304
9304
  var require_timestamp$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
9305
- var Type = require_type();
9306
- var YAML_DATE_REGEXP = /* @__PURE__ */ new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$");
9307
- var YAML_TIMESTAMP_REGEXP = /* @__PURE__ */ new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9]?)-([0-9][0-9]?)(?:[Tt]|[ \\t]+)([0-9][0-9]?):([0-9][0-9]):([0-9][0-9])(?:\\.([0-9]*))?(?:[ \\t]*(Z|([-+])([0-9][0-9]?)(?::([0-9][0-9]))?))?$");
9305
+ const Type = require_type();
9306
+ const YAML_DATE_REGEXP = /* @__PURE__ */ new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$");
9307
+ const YAML_TIMESTAMP_REGEXP = /* @__PURE__ */ new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9]?)-([0-9][0-9]?)(?:[Tt]|[ \\t]+)([0-9][0-9]?):([0-9][0-9]):([0-9][0-9])(?:\\.([0-9]*))?(?:[ \\t]*(Z|([-+])([0-9][0-9]?)(?::([0-9][0-9]))?))?$");
9308
9308
  function resolveYamlTimestamp(data) {
9309
9309
  if (data === null) return false;
9310
9310
  if (YAML_DATE_REGEXP.exec(data) !== null) return true;
@@ -9312,29 +9312,30 @@ var require_timestamp$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
9312
9312
  return false;
9313
9313
  }
9314
9314
  function constructYamlTimestamp(data) {
9315
- var match, year, month, day, hour, minute, second, fraction = 0, delta = null, tz_hour, tz_minute, date;
9316
- match = YAML_DATE_REGEXP.exec(data);
9315
+ let fraction = 0;
9316
+ let delta = null;
9317
+ let match = YAML_DATE_REGEXP.exec(data);
9317
9318
  if (match === null) match = YAML_TIMESTAMP_REGEXP.exec(data);
9318
9319
  if (match === null) throw new Error("Date resolve error");
9319
- year = +match[1];
9320
- month = +match[2] - 1;
9321
- day = +match[3];
9320
+ const year = +match[1];
9321
+ const month = +match[2] - 1;
9322
+ const day = +match[3];
9322
9323
  if (!match[4]) return new Date(Date.UTC(year, month, day));
9323
- hour = +match[4];
9324
- minute = +match[5];
9325
- second = +match[6];
9324
+ const hour = +match[4];
9325
+ const minute = +match[5];
9326
+ const second = +match[6];
9326
9327
  if (match[7]) {
9327
9328
  fraction = match[7].slice(0, 3);
9328
9329
  while (fraction.length < 3) fraction += "0";
9329
9330
  fraction = +fraction;
9330
9331
  }
9331
9332
  if (match[9]) {
9332
- tz_hour = +match[10];
9333
- tz_minute = +(match[11] || 0);
9334
- delta = (tz_hour * 60 + tz_minute) * 6e4;
9333
+ const tzHour = +match[10];
9334
+ const tzMinute = +(match[11] || 0);
9335
+ delta = (tzHour * 60 + tzMinute) * 6e4;
9335
9336
  if (match[9] === "-") delta = -delta;
9336
9337
  }
9337
- date = new Date(Date.UTC(year, month, day, hour, minute, second, fraction));
9338
+ const date = new Date(Date.UTC(year, month, day, hour, minute, second, fraction));
9338
9339
  if (delta) date.setTime(date.getTime() - delta);
9339
9340
  return date;
9340
9341
  }
@@ -9350,9 +9351,9 @@ var require_timestamp$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
9350
9351
  });
9351
9352
  }));
9352
9353
  //#endregion
9353
- //#region ../../node_modules/.pnpm/js-yaml@4.1.1/node_modules/js-yaml/lib/type/merge.js
9354
+ //#region ../../node_modules/.pnpm/js-yaml@4.3.0/node_modules/js-yaml/lib/type/merge.js
9354
9355
  var require_merge$2 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
9355
- var Type = require_type();
9356
+ const Type = require_type();
9356
9357
  function resolveYamlMerge(data) {
9357
9358
  return data === "<<" || data === null;
9358
9359
  }
@@ -9362,15 +9363,17 @@ var require_merge$2 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
9362
9363
  });
9363
9364
  }));
9364
9365
  //#endregion
9365
- //#region ../../node_modules/.pnpm/js-yaml@4.1.1/node_modules/js-yaml/lib/type/binary.js
9366
+ //#region ../../node_modules/.pnpm/js-yaml@4.3.0/node_modules/js-yaml/lib/type/binary.js
9366
9367
  var require_binary$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
9367
- var Type = require_type();
9368
- var BASE64_MAP = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\n\r";
9368
+ const Type = require_type();
9369
+ const BASE64_MAP = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\n\r";
9369
9370
  function resolveYamlBinary(data) {
9370
9371
  if (data === null) return false;
9371
- var code, idx, bitlen = 0, max = data.length, map = BASE64_MAP;
9372
- for (idx = 0; idx < max; idx++) {
9373
- code = map.indexOf(data.charAt(idx));
9372
+ let bitlen = 0;
9373
+ const max = data.length;
9374
+ const map = BASE64_MAP;
9375
+ for (let idx = 0; idx < max; idx++) {
9376
+ const code = map.indexOf(data.charAt(idx));
9374
9377
  if (code > 64) continue;
9375
9378
  if (code < 0) return false;
9376
9379
  bitlen += 6;
@@ -9378,8 +9381,12 @@ var require_binary$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
9378
9381
  return bitlen % 8 === 0;
9379
9382
  }
9380
9383
  function constructYamlBinary(data) {
9381
- var idx, tailbits, input = data.replace(/[\r\n=]/g, ""), max = input.length, map = BASE64_MAP, bits = 0, result = [];
9382
- for (idx = 0; idx < max; idx++) {
9384
+ const input = data.replace(/[\r\n=]/g, "");
9385
+ const max = input.length;
9386
+ const map = BASE64_MAP;
9387
+ let bits = 0;
9388
+ const result = [];
9389
+ for (let idx = 0; idx < max; idx++) {
9383
9390
  if (idx % 4 === 0 && idx) {
9384
9391
  result.push(bits >> 16 & 255);
9385
9392
  result.push(bits >> 8 & 255);
@@ -9387,7 +9394,7 @@ var require_binary$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
9387
9394
  }
9388
9395
  bits = bits << 6 | map.indexOf(input.charAt(idx));
9389
9396
  }
9390
- tailbits = max % 4 * 6;
9397
+ const tailbits = max % 4 * 6;
9391
9398
  if (tailbits === 0) {
9392
9399
  result.push(bits >> 16 & 255);
9393
9400
  result.push(bits >> 8 & 255);
@@ -9399,8 +9406,11 @@ var require_binary$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
9399
9406
  return new Uint8Array(result);
9400
9407
  }
9401
9408
  function representYamlBinary(object) {
9402
- var result = "", bits = 0, idx, tail, max = object.length, map = BASE64_MAP;
9403
- for (idx = 0; idx < max; idx++) {
9409
+ let result = "";
9410
+ let bits = 0;
9411
+ const max = object.length;
9412
+ const map = BASE64_MAP;
9413
+ for (let idx = 0; idx < max; idx++) {
9404
9414
  if (idx % 3 === 0 && idx) {
9405
9415
  result += map[bits >> 18 & 63];
9406
9416
  result += map[bits >> 12 & 63];
@@ -9409,7 +9419,7 @@ var require_binary$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
9409
9419
  }
9410
9420
  bits = (bits << 8) + object[idx];
9411
9421
  }
9412
- tail = max % 3;
9422
+ const tail = max % 3;
9413
9423
  if (tail === 0) {
9414
9424
  result += map[bits >> 18 & 63];
9415
9425
  result += map[bits >> 12 & 63];
@@ -9440,18 +9450,20 @@ var require_binary$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
9440
9450
  });
9441
9451
  }));
9442
9452
  //#endregion
9443
- //#region ../../node_modules/.pnpm/js-yaml@4.1.1/node_modules/js-yaml/lib/type/omap.js
9453
+ //#region ../../node_modules/.pnpm/js-yaml@4.3.0/node_modules/js-yaml/lib/type/omap.js
9444
9454
  var require_omap$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
9445
- var Type = require_type();
9446
- var _hasOwnProperty = Object.prototype.hasOwnProperty;
9447
- var _toString = Object.prototype.toString;
9455
+ const Type = require_type();
9456
+ const _hasOwnProperty = Object.prototype.hasOwnProperty;
9457
+ const _toString = Object.prototype.toString;
9448
9458
  function resolveYamlOmap(data) {
9449
9459
  if (data === null) return true;
9450
- var objectKeys = [], index, length, pair, pairKey, pairHasKey, object = data;
9451
- for (index = 0, length = object.length; index < length; index += 1) {
9452
- pair = object[index];
9453
- pairHasKey = false;
9460
+ const objectKeys = [];
9461
+ const object = data;
9462
+ for (let index = 0, length = object.length; index < length; index += 1) {
9463
+ const pair = object[index];
9464
+ let pairHasKey = false;
9454
9465
  if (_toString.call(pair) !== "[object Object]") return false;
9466
+ let pairKey;
9455
9467
  for (pairKey in pair) if (_hasOwnProperty.call(pair, pairKey)) if (!pairHasKey) pairHasKey = true;
9456
9468
  else return false;
9457
9469
  if (!pairHasKey) return false;
@@ -9470,18 +9482,18 @@ var require_omap$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
9470
9482
  });
9471
9483
  }));
9472
9484
  //#endregion
9473
- //#region ../../node_modules/.pnpm/js-yaml@4.1.1/node_modules/js-yaml/lib/type/pairs.js
9485
+ //#region ../../node_modules/.pnpm/js-yaml@4.3.0/node_modules/js-yaml/lib/type/pairs.js
9474
9486
  var require_pairs$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
9475
- var Type = require_type();
9476
- var _toString = Object.prototype.toString;
9487
+ const Type = require_type();
9488
+ const _toString = Object.prototype.toString;
9477
9489
  function resolveYamlPairs(data) {
9478
9490
  if (data === null) return true;
9479
- var index, length, pair, keys, result, object = data;
9480
- result = new Array(object.length);
9481
- for (index = 0, length = object.length; index < length; index += 1) {
9482
- pair = object[index];
9491
+ const object = data;
9492
+ const result = new Array(object.length);
9493
+ for (let index = 0, length = object.length; index < length; index += 1) {
9494
+ const pair = object[index];
9483
9495
  if (_toString.call(pair) !== "[object Object]") return false;
9484
- keys = Object.keys(pair);
9496
+ const keys = Object.keys(pair);
9485
9497
  if (keys.length !== 1) return false;
9486
9498
  result[index] = [keys[0], pair[keys[0]]];
9487
9499
  }
@@ -9489,11 +9501,11 @@ var require_pairs$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
9489
9501
  }
9490
9502
  function constructYamlPairs(data) {
9491
9503
  if (data === null) return [];
9492
- var index, length, pair, keys, result, object = data;
9493
- result = new Array(object.length);
9494
- for (index = 0, length = object.length; index < length; index += 1) {
9495
- pair = object[index];
9496
- keys = Object.keys(pair);
9504
+ const object = data;
9505
+ const result = new Array(object.length);
9506
+ for (let index = 0, length = object.length; index < length; index += 1) {
9507
+ const pair = object[index];
9508
+ const keys = Object.keys(pair);
9497
9509
  result[index] = [keys[0], pair[keys[0]]];
9498
9510
  }
9499
9511
  return result;
@@ -9505,14 +9517,14 @@ var require_pairs$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
9505
9517
  });
9506
9518
  }));
9507
9519
  //#endregion
9508
- //#region ../../node_modules/.pnpm/js-yaml@4.1.1/node_modules/js-yaml/lib/type/set.js
9520
+ //#region ../../node_modules/.pnpm/js-yaml@4.3.0/node_modules/js-yaml/lib/type/set.js
9509
9521
  var require_set$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
9510
- var Type = require_type();
9511
- var _hasOwnProperty = Object.prototype.hasOwnProperty;
9522
+ const Type = require_type();
9523
+ const _hasOwnProperty = Object.prototype.hasOwnProperty;
9512
9524
  function resolveYamlSet(data) {
9513
9525
  if (data === null) return true;
9514
- var key, object = data;
9515
- for (key in object) if (_hasOwnProperty.call(object, key)) {
9526
+ const object = data;
9527
+ for (const key in object) if (_hasOwnProperty.call(object, key)) {
9516
9528
  if (object[key] !== null) return false;
9517
9529
  }
9518
9530
  return true;
@@ -9527,7 +9539,7 @@ var require_set$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
9527
9539
  });
9528
9540
  }));
9529
9541
  //#endregion
9530
- //#region ../../node_modules/.pnpm/js-yaml@4.1.1/node_modules/js-yaml/lib/schema/default.js
9542
+ //#region ../../node_modules/.pnpm/js-yaml@4.3.0/node_modules/js-yaml/lib/schema/default.js
9531
9543
  var require_default = /* @__PURE__ */ __commonJSMin(((exports, module) => {
9532
9544
  module.exports = require_core().extend({
9533
9545
  implicit: [require_timestamp$1(), require_merge$2()],
@@ -9540,45 +9552,44 @@ var require_default = /* @__PURE__ */ __commonJSMin(((exports, module) => {
9540
9552
  });
9541
9553
  }));
9542
9554
  //#endregion
9543
- //#region ../../node_modules/.pnpm/js-yaml@4.1.1/node_modules/js-yaml/lib/loader.js
9555
+ //#region ../../node_modules/.pnpm/js-yaml@4.3.0/node_modules/js-yaml/lib/loader.js
9544
9556
  var require_loader = /* @__PURE__ */ __commonJSMin(((exports, module) => {
9545
- var common = require_common();
9546
- var YAMLException = require_exception();
9547
- var makeSnippet = require_snippet();
9548
- var DEFAULT_SCHEMA = require_default();
9549
- var _hasOwnProperty = Object.prototype.hasOwnProperty;
9550
- var CONTEXT_FLOW_IN = 1;
9551
- var CONTEXT_FLOW_OUT = 2;
9552
- var CONTEXT_BLOCK_IN = 3;
9553
- var CONTEXT_BLOCK_OUT = 4;
9554
- var CHOMPING_CLIP = 1;
9555
- var CHOMPING_STRIP = 2;
9556
- var CHOMPING_KEEP = 3;
9557
- var PATTERN_NON_PRINTABLE = /[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/;
9558
- var PATTERN_NON_ASCII_LINE_BREAKS = /[\x85\u2028\u2029]/;
9559
- var PATTERN_FLOW_INDICATORS = /[,\[\]\{\}]/;
9560
- var PATTERN_TAG_HANDLE = /^(?:!|!!|![a-z\-]+!)$/i;
9561
- var PATTERN_TAG_URI = /^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;
9557
+ const common = require_common();
9558
+ const YAMLException = require_exception();
9559
+ const makeSnippet = require_snippet();
9560
+ const DEFAULT_SCHEMA = require_default();
9561
+ const _hasOwnProperty = Object.prototype.hasOwnProperty;
9562
+ const CONTEXT_FLOW_IN = 1;
9563
+ const CONTEXT_FLOW_OUT = 2;
9564
+ const CONTEXT_BLOCK_IN = 3;
9565
+ const CONTEXT_BLOCK_OUT = 4;
9566
+ const CHOMPING_CLIP = 1;
9567
+ const CHOMPING_STRIP = 2;
9568
+ const CHOMPING_KEEP = 3;
9569
+ const PATTERN_NON_PRINTABLE = /[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/;
9570
+ const PATTERN_NON_ASCII_LINE_BREAKS = /[\x85\u2028\u2029]/;
9571
+ const PATTERN_FLOW_INDICATORS = /[,\[\]{}]/;
9572
+ const PATTERN_TAG_HANDLE = /^(?:!|!!|![0-9A-Za-z-]+!)$/;
9573
+ const PATTERN_TAG_URI = /^(?:!|[^,\[\]{}])(?:%[0-9a-f]{2}|[0-9a-z\-#;/?:@&=+$,_.!~*'()\[\]])*$/i;
9562
9574
  function _class(obj) {
9563
9575
  return Object.prototype.toString.call(obj);
9564
9576
  }
9565
- function is_EOL(c) {
9577
+ function isEol(c) {
9566
9578
  return c === 10 || c === 13;
9567
9579
  }
9568
- function is_WHITE_SPACE(c) {
9580
+ function isWhiteSpace(c) {
9569
9581
  return c === 9 || c === 32;
9570
9582
  }
9571
- function is_WS_OR_EOL(c) {
9583
+ function isWsOrEol(c) {
9572
9584
  return c === 9 || c === 32 || c === 10 || c === 13;
9573
9585
  }
9574
- function is_FLOW_INDICATOR(c) {
9586
+ function isFlowIndicator(c) {
9575
9587
  return c === 44 || c === 91 || c === 93 || c === 123 || c === 125;
9576
9588
  }
9577
9589
  function fromHexCode(c) {
9578
- var lc;
9579
- if (48 <= c && c <= 57) return c - 48;
9580
- lc = c | 32;
9581
- if (97 <= lc && lc <= 102) return lc - 97 + 10;
9590
+ if (c >= 48 && c <= 57) return c - 48;
9591
+ const lc = c | 32;
9592
+ if (lc >= 97 && lc <= 102) return lc - 97 + 10;
9582
9593
  return -1;
9583
9594
  }
9584
9595
  function escapedHexLen(c) {
@@ -9588,11 +9599,31 @@ var require_loader = /* @__PURE__ */ __commonJSMin(((exports, module) => {
9588
9599
  return 0;
9589
9600
  }
9590
9601
  function fromDecimalCode(c) {
9591
- if (48 <= c && c <= 57) return c - 48;
9602
+ if (c >= 48 && c <= 57) return c - 48;
9592
9603
  return -1;
9593
9604
  }
9594
9605
  function simpleEscapeSequence(c) {
9595
- return c === 48 ? "\0" : c === 97 ? "\x07" : c === 98 ? "\b" : c === 116 ? " " : c === 9 ? " " : c === 110 ? "\n" : c === 118 ? "\v" : c === 102 ? "\f" : c === 114 ? "\r" : c === 101 ? "\x1B" : c === 32 ? " " : c === 34 ? "\"" : c === 47 ? "/" : c === 92 ? "\\" : c === 78 ? "…" : c === 95 ? "\xA0" : c === 76 ? "\u2028" : c === 80 ? "\u2029" : "";
9606
+ switch (c) {
9607
+ case 48: return "\0";
9608
+ case 97: return "\x07";
9609
+ case 98: return "\b";
9610
+ case 116: return " ";
9611
+ case 9: return " ";
9612
+ case 110: return "\n";
9613
+ case 118: return "\v";
9614
+ case 102: return "\f";
9615
+ case 114: return "\r";
9616
+ case 101: return "\x1B";
9617
+ case 32: return " ";
9618
+ case 34: return "\"";
9619
+ case 47: return "/";
9620
+ case 92: return "\\";
9621
+ case 78: return "…";
9622
+ case 95: return "\xA0";
9623
+ case 76: return "\u2028";
9624
+ case 80: return "\u2029";
9625
+ default: return "";
9626
+ }
9596
9627
  }
9597
9628
  function charFromCodepoint(c) {
9598
9629
  if (c <= 65535) return String.fromCharCode(c);
@@ -9607,9 +9638,9 @@ var require_loader = /* @__PURE__ */ __commonJSMin(((exports, module) => {
9607
9638
  });
9608
9639
  else object[key] = value;
9609
9640
  }
9610
- var simpleEscapeCheck = new Array(256);
9611
- var simpleEscapeMap = new Array(256);
9612
- for (var i = 0; i < 256; i++) {
9641
+ const simpleEscapeCheck = new Array(256);
9642
+ const simpleEscapeMap = new Array(256);
9643
+ for (let i = 0; i < 256; i++) {
9613
9644
  simpleEscapeCheck[i] = simpleEscapeSequence(i) ? 1 : 0;
9614
9645
  simpleEscapeMap[i] = simpleEscapeSequence(i);
9615
9646
  }
@@ -9621,6 +9652,8 @@ var require_loader = /* @__PURE__ */ __commonJSMin(((exports, module) => {
9621
9652
  this.legacy = options["legacy"] || false;
9622
9653
  this.json = options["json"] || false;
9623
9654
  this.listener = options["listener"] || null;
9655
+ this.maxDepth = typeof options["maxDepth"] === "number" ? options["maxDepth"] : 100;
9656
+ this.maxTotalMergeKeys = typeof options["maxTotalMergeKeys"] === "number" ? options["maxTotalMergeKeys"] : 1e4;
9624
9657
  this.implicitTypes = this.schema.compiledImplicit;
9625
9658
  this.typeMap = this.schema.compiledTypeMap;
9626
9659
  this.length = input.length;
@@ -9628,11 +9661,14 @@ var require_loader = /* @__PURE__ */ __commonJSMin(((exports, module) => {
9628
9661
  this.line = 0;
9629
9662
  this.lineStart = 0;
9630
9663
  this.lineIndent = 0;
9664
+ this.depth = 0;
9665
+ this.totalMergeKeys = 0;
9631
9666
  this.firstTabInLine = -1;
9632
9667
  this.documents = [];
9668
+ this.anchorMapTransactions = [];
9633
9669
  }
9634
9670
  function generateError(state, message) {
9635
- var mark = {
9671
+ const mark = {
9636
9672
  name: state.filename,
9637
9673
  buffer: state.input.slice(0, -1),
9638
9674
  position: state.position,
@@ -9648,24 +9684,81 @@ var require_loader = /* @__PURE__ */ __commonJSMin(((exports, module) => {
9648
9684
  function throwWarning(state, message) {
9649
9685
  if (state.onWarning) state.onWarning.call(null, generateError(state, message));
9650
9686
  }
9651
- var directiveHandlers = {
9687
+ function storeAnchor(state, name, value) {
9688
+ const transactions = state.anchorMapTransactions;
9689
+ if (transactions.length !== 0) {
9690
+ const transaction = transactions[transactions.length - 1];
9691
+ if (!_hasOwnProperty.call(transaction, name)) transaction[name] = {
9692
+ existed: _hasOwnProperty.call(state.anchorMap, name),
9693
+ value: state.anchorMap[name]
9694
+ };
9695
+ }
9696
+ state.anchorMap[name] = value;
9697
+ }
9698
+ function beginAnchorTransaction(state) {
9699
+ state.anchorMapTransactions.push(Object.create(null));
9700
+ }
9701
+ function commitAnchorTransaction(state) {
9702
+ const transaction = state.anchorMapTransactions.pop();
9703
+ const transactions = state.anchorMapTransactions;
9704
+ if (transactions.length === 0) return;
9705
+ const parent = transactions[transactions.length - 1];
9706
+ const names = Object.keys(transaction);
9707
+ for (let index = 0, length = names.length; index < length; index += 1) {
9708
+ const name = names[index];
9709
+ if (!_hasOwnProperty.call(parent, name)) parent[name] = transaction[name];
9710
+ }
9711
+ }
9712
+ function rollbackAnchorTransaction(state) {
9713
+ const transaction = state.anchorMapTransactions.pop();
9714
+ const names = Object.keys(transaction);
9715
+ for (let index = names.length - 1; index >= 0; index -= 1) {
9716
+ const entry = transaction[names[index]];
9717
+ if (entry.existed) state.anchorMap[names[index]] = entry.value;
9718
+ else delete state.anchorMap[names[index]];
9719
+ }
9720
+ }
9721
+ function snapshotState(state) {
9722
+ return {
9723
+ position: state.position,
9724
+ line: state.line,
9725
+ lineStart: state.lineStart,
9726
+ lineIndent: state.lineIndent,
9727
+ firstTabInLine: state.firstTabInLine,
9728
+ tag: state.tag,
9729
+ anchor: state.anchor,
9730
+ kind: state.kind,
9731
+ result: state.result
9732
+ };
9733
+ }
9734
+ function restoreState(state, snapshot) {
9735
+ state.position = snapshot.position;
9736
+ state.line = snapshot.line;
9737
+ state.lineStart = snapshot.lineStart;
9738
+ state.lineIndent = snapshot.lineIndent;
9739
+ state.firstTabInLine = snapshot.firstTabInLine;
9740
+ state.tag = snapshot.tag;
9741
+ state.anchor = snapshot.anchor;
9742
+ state.kind = snapshot.kind;
9743
+ state.result = snapshot.result;
9744
+ }
9745
+ const directiveHandlers = {
9652
9746
  YAML: function handleYamlDirective(state, name, args) {
9653
- var match, major, minor;
9654
9747
  if (state.version !== null) throwError(state, "duplication of %YAML directive");
9655
9748
  if (args.length !== 1) throwError(state, "YAML directive accepts exactly one argument");
9656
- match = /^([0-9]+)\.([0-9]+)$/.exec(args[0]);
9749
+ const match = /^([0-9]+)\.([0-9]+)$/.exec(args[0]);
9657
9750
  if (match === null) throwError(state, "ill-formed argument of the YAML directive");
9658
- major = parseInt(match[1], 10);
9659
- minor = parseInt(match[2], 10);
9751
+ const major = parseInt(match[1], 10);
9752
+ const minor = parseInt(match[2], 10);
9660
9753
  if (major !== 1) throwError(state, "unacceptable YAML version of the document");
9661
9754
  state.version = args[0];
9662
9755
  state.checkLineBreaks = minor < 2;
9663
9756
  if (minor !== 1 && minor !== 2) throwWarning(state, "unsupported YAML version of the document");
9664
9757
  },
9665
9758
  TAG: function handleTagDirective(state, name, args) {
9666
- var handle, prefix;
9759
+ let prefix;
9667
9760
  if (args.length !== 2) throwError(state, "TAG directive accepts exactly two arguments");
9668
- handle = args[0];
9761
+ const handle = args[0];
9669
9762
  prefix = args[1];
9670
9763
  if (!PATTERN_TAG_HANDLE.test(handle)) throwError(state, "ill-formed tag handle (first argument) of the TAG directive");
9671
9764
  if (_hasOwnProperty.call(state.tagMap, handle)) throwError(state, "there is a previously declared suffix for \"" + handle + "\" tag handle");
@@ -9679,23 +9772,22 @@ var require_loader = /* @__PURE__ */ __commonJSMin(((exports, module) => {
9679
9772
  }
9680
9773
  };
9681
9774
  function captureSegment(state, start, end, checkJson) {
9682
- var _position, _length, _character, _result;
9683
9775
  if (start < end) {
9684
- _result = state.input.slice(start, end);
9685
- if (checkJson) for (_position = 0, _length = _result.length; _position < _length; _position += 1) {
9686
- _character = _result.charCodeAt(_position);
9687
- if (!(_character === 9 || 32 <= _character && _character <= 1114111)) throwError(state, "expected valid JSON character");
9776
+ const _result = state.input.slice(start, end);
9777
+ if (checkJson) for (let _position = 0, _length = _result.length; _position < _length; _position += 1) {
9778
+ const _character = _result.charCodeAt(_position);
9779
+ if (!(_character === 9 || _character >= 32 && _character <= 1114111)) throwError(state, "expected valid JSON character");
9688
9780
  }
9689
9781
  else if (PATTERN_NON_PRINTABLE.test(_result)) throwError(state, "the stream contains non-printable characters");
9690
9782
  state.result += _result;
9691
9783
  }
9692
9784
  }
9693
9785
  function mergeMappings(state, destination, source, overridableKeys) {
9694
- var sourceKeys, key, index, quantity;
9695
9786
  if (!common.isObject(source)) throwError(state, "cannot merge mappings; the provided source object is unacceptable");
9696
- sourceKeys = Object.keys(source);
9697
- for (index = 0, quantity = sourceKeys.length; index < quantity; index += 1) {
9698
- key = sourceKeys[index];
9787
+ const sourceKeys = Object.keys(source);
9788
+ for (let index = 0, quantity = sourceKeys.length; index < quantity; index += 1) {
9789
+ const key = sourceKeys[index];
9790
+ if (state.maxTotalMergeKeys !== -1 && ++state.totalMergeKeys > state.maxTotalMergeKeys) throwError(state, "merge keys exceeded maxTotalMergeKeys (" + state.maxTotalMergeKeys + ")");
9699
9791
  if (!_hasOwnProperty.call(destination, key)) {
9700
9792
  setProperty(destination, key, source[key]);
9701
9793
  overridableKeys[key] = true;
@@ -9703,10 +9795,9 @@ var require_loader = /* @__PURE__ */ __commonJSMin(((exports, module) => {
9703
9795
  }
9704
9796
  }
9705
9797
  function storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, valueNode, startLine, startLineStart, startPos) {
9706
- var index, quantity;
9707
9798
  if (Array.isArray(keyNode)) {
9708
9799
  keyNode = Array.prototype.slice.call(keyNode);
9709
- for (index = 0, quantity = keyNode.length; index < quantity; index += 1) {
9800
+ for (let index = 0, quantity = keyNode.length; index < quantity; index += 1) {
9710
9801
  if (Array.isArray(keyNode[index])) throwError(state, "nested arrays are not supported inside keys");
9711
9802
  if (typeof keyNode === "object" && _class(keyNode[index]) === "[object Object]") keyNode[index] = "[object Object]";
9712
9803
  }
@@ -9714,7 +9805,7 @@ var require_loader = /* @__PURE__ */ __commonJSMin(((exports, module) => {
9714
9805
  if (typeof keyNode === "object" && _class(keyNode) === "[object Object]") keyNode = "[object Object]";
9715
9806
  keyNode = String(keyNode);
9716
9807
  if (_result === null) _result = {};
9717
- if (keyTag === "tag:yaml.org,2002:merge") if (Array.isArray(valueNode)) for (index = 0, quantity = valueNode.length; index < quantity; index += 1) mergeMappings(state, _result, valueNode[index], overridableKeys);
9808
+ if (keyTag === "tag:yaml.org,2002:merge") if (Array.isArray(valueNode)) for (let index = 0, quantity = valueNode.length; index < quantity; index += 1) mergeMappings(state, _result, valueNode[index], overridableKeys);
9718
9809
  else mergeMappings(state, _result, valueNode, overridableKeys);
9719
9810
  else {
9720
9811
  if (!state.json && !_hasOwnProperty.call(overridableKeys, keyNode) && _hasOwnProperty.call(_result, keyNode)) {
@@ -9729,7 +9820,7 @@ var require_loader = /* @__PURE__ */ __commonJSMin(((exports, module) => {
9729
9820
  return _result;
9730
9821
  }
9731
9822
  function readLineBreak(state) {
9732
- var ch = state.input.charCodeAt(state.position);
9823
+ const ch = state.input.charCodeAt(state.position);
9733
9824
  if (ch === 10) state.position++;
9734
9825
  else if (ch === 13) {
9735
9826
  state.position++;
@@ -9740,16 +9831,17 @@ var require_loader = /* @__PURE__ */ __commonJSMin(((exports, module) => {
9740
9831
  state.firstTabInLine = -1;
9741
9832
  }
9742
9833
  function skipSeparationSpace(state, allowComments, checkIndent) {
9743
- var lineBreaks = 0, ch = state.input.charCodeAt(state.position);
9834
+ let lineBreaks = 0;
9835
+ let ch = state.input.charCodeAt(state.position);
9744
9836
  while (ch !== 0) {
9745
- while (is_WHITE_SPACE(ch)) {
9837
+ while (isWhiteSpace(ch)) {
9746
9838
  if (ch === 9 && state.firstTabInLine === -1) state.firstTabInLine = state.position;
9747
9839
  ch = state.input.charCodeAt(++state.position);
9748
9840
  }
9749
9841
  if (allowComments && ch === 35) do
9750
9842
  ch = state.input.charCodeAt(++state.position);
9751
9843
  while (ch !== 10 && ch !== 13 && ch !== 0);
9752
- if (is_EOL(ch)) {
9844
+ if (isEol(ch)) {
9753
9845
  readLineBreak(state);
9754
9846
  ch = state.input.charCodeAt(state.position);
9755
9847
  lineBreaks++;
@@ -9764,11 +9856,12 @@ var require_loader = /* @__PURE__ */ __commonJSMin(((exports, module) => {
9764
9856
  return lineBreaks;
9765
9857
  }
9766
9858
  function testDocumentSeparator(state) {
9767
- var _position = state.position, ch = state.input.charCodeAt(_position);
9859
+ let _position = state.position;
9860
+ let ch = state.input.charCodeAt(_position);
9768
9861
  if ((ch === 45 || ch === 46) && ch === state.input.charCodeAt(_position + 1) && ch === state.input.charCodeAt(_position + 2)) {
9769
9862
  _position += 3;
9770
9863
  ch = state.input.charCodeAt(_position);
9771
- if (ch === 0 || is_WS_OR_EOL(ch)) return true;
9864
+ if (ch === 0 || isWsOrEol(ch)) return true;
9772
9865
  }
9773
9866
  return false;
9774
9867
  }
@@ -9777,11 +9870,19 @@ var require_loader = /* @__PURE__ */ __commonJSMin(((exports, module) => {
9777
9870
  else if (count > 1) state.result += common.repeat("\n", count - 1);
9778
9871
  }
9779
9872
  function readPlainScalar(state, nodeIndent, withinFlowCollection) {
9780
- var preceding, following, captureStart, captureEnd, hasPendingContent, _line, _lineStart, _lineIndent, _kind = state.kind, _result = state.result, ch = state.input.charCodeAt(state.position);
9781
- if (is_WS_OR_EOL(ch) || is_FLOW_INDICATOR(ch) || ch === 35 || ch === 38 || ch === 42 || ch === 33 || ch === 124 || ch === 62 || ch === 39 || ch === 34 || ch === 37 || ch === 64 || ch === 96) return false;
9873
+ let captureStart;
9874
+ let captureEnd;
9875
+ let hasPendingContent;
9876
+ let _line;
9877
+ let _lineStart;
9878
+ let _lineIndent;
9879
+ const _kind = state.kind;
9880
+ const _result = state.result;
9881
+ let ch = state.input.charCodeAt(state.position);
9882
+ 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) return false;
9782
9883
  if (ch === 63 || ch === 45) {
9783
- following = state.input.charCodeAt(state.position + 1);
9784
- if (is_WS_OR_EOL(following) || withinFlowCollection && is_FLOW_INDICATOR(following)) return false;
9884
+ const following = state.input.charCodeAt(state.position + 1);
9885
+ if (isWsOrEol(following) || withinFlowCollection && isFlowIndicator(following)) return false;
9785
9886
  }
9786
9887
  state.kind = "scalar";
9787
9888
  state.result = "";
@@ -9789,13 +9890,12 @@ var require_loader = /* @__PURE__ */ __commonJSMin(((exports, module) => {
9789
9890
  hasPendingContent = false;
9790
9891
  while (ch !== 0) {
9791
9892
  if (ch === 58) {
9792
- following = state.input.charCodeAt(state.position + 1);
9793
- if (is_WS_OR_EOL(following) || withinFlowCollection && is_FLOW_INDICATOR(following)) break;
9893
+ const following = state.input.charCodeAt(state.position + 1);
9894
+ if (isWsOrEol(following) || withinFlowCollection && isFlowIndicator(following)) break;
9794
9895
  } else if (ch === 35) {
9795
- preceding = state.input.charCodeAt(state.position - 1);
9796
- if (is_WS_OR_EOL(preceding)) break;
9797
- } else if (state.position === state.lineStart && testDocumentSeparator(state) || withinFlowCollection && is_FLOW_INDICATOR(ch)) break;
9798
- else if (is_EOL(ch)) {
9896
+ if (isWsOrEol(state.input.charCodeAt(state.position - 1))) break;
9897
+ } else if (state.position === state.lineStart && testDocumentSeparator(state) || withinFlowCollection && isFlowIndicator(ch)) break;
9898
+ else if (isEol(ch)) {
9799
9899
  _line = state.line;
9800
9900
  _lineStart = state.lineStart;
9801
9901
  _lineIndent = state.lineIndent;
@@ -9818,7 +9918,7 @@ var require_loader = /* @__PURE__ */ __commonJSMin(((exports, module) => {
9818
9918
  captureStart = captureEnd = state.position;
9819
9919
  hasPendingContent = false;
9820
9920
  }
9821
- if (!is_WHITE_SPACE(ch)) captureEnd = state.position + 1;
9921
+ if (!isWhiteSpace(ch)) captureEnd = state.position + 1;
9822
9922
  ch = state.input.charCodeAt(++state.position);
9823
9923
  }
9824
9924
  captureSegment(state, captureStart, captureEnd, false);
@@ -9828,7 +9928,9 @@ var require_loader = /* @__PURE__ */ __commonJSMin(((exports, module) => {
9828
9928
  return false;
9829
9929
  }
9830
9930
  function readSingleQuotedScalar(state, nodeIndent) {
9831
- var ch = state.input.charCodeAt(state.position), captureStart, captureEnd;
9931
+ let captureStart;
9932
+ let captureEnd;
9933
+ let ch = state.input.charCodeAt(state.position);
9832
9934
  if (ch !== 39) return false;
9833
9935
  state.kind = "scalar";
9834
9936
  state.result = "";
@@ -9842,19 +9944,22 @@ var require_loader = /* @__PURE__ */ __commonJSMin(((exports, module) => {
9842
9944
  state.position++;
9843
9945
  captureEnd = state.position;
9844
9946
  } else return true;
9845
- } else if (is_EOL(ch)) {
9947
+ } else if (isEol(ch)) {
9846
9948
  captureSegment(state, captureStart, captureEnd, true);
9847
9949
  writeFoldedLines(state, skipSeparationSpace(state, false, nodeIndent));
9848
9950
  captureStart = captureEnd = state.position;
9849
9951
  } else if (state.position === state.lineStart && testDocumentSeparator(state)) throwError(state, "unexpected end of the document within a single quoted scalar");
9850
9952
  else {
9851
9953
  state.position++;
9852
- captureEnd = state.position;
9954
+ if (!isWhiteSpace(ch)) captureEnd = state.position;
9853
9955
  }
9854
9956
  throwError(state, "unexpected end of the stream within a single quoted scalar");
9855
9957
  }
9856
9958
  function readDoubleQuotedScalar(state, nodeIndent) {
9857
- var captureStart, captureEnd, hexLength, hexResult, tmp, ch = state.input.charCodeAt(state.position);
9959
+ let captureStart;
9960
+ let captureEnd;
9961
+ let tmp;
9962
+ let ch = state.input.charCodeAt(state.position);
9858
9963
  if (ch !== 34) return false;
9859
9964
  state.kind = "scalar";
9860
9965
  state.result = "";
@@ -9867,13 +9972,13 @@ var require_loader = /* @__PURE__ */ __commonJSMin(((exports, module) => {
9867
9972
  } else if (ch === 92) {
9868
9973
  captureSegment(state, captureStart, state.position, true);
9869
9974
  ch = state.input.charCodeAt(++state.position);
9870
- if (is_EOL(ch)) skipSeparationSpace(state, false, nodeIndent);
9975
+ if (isEol(ch)) skipSeparationSpace(state, false, nodeIndent);
9871
9976
  else if (ch < 256 && simpleEscapeCheck[ch]) {
9872
9977
  state.result += simpleEscapeMap[ch];
9873
9978
  state.position++;
9874
9979
  } else if ((tmp = escapedHexLen(ch)) > 0) {
9875
- hexLength = tmp;
9876
- hexResult = 0;
9980
+ let hexLength = tmp;
9981
+ let hexResult = 0;
9877
9982
  for (; hexLength > 0; hexLength--) {
9878
9983
  ch = state.input.charCodeAt(++state.position);
9879
9984
  if ((tmp = fromHexCode(ch)) >= 0) hexResult = (hexResult << 4) + tmp;
@@ -9883,19 +9988,34 @@ var require_loader = /* @__PURE__ */ __commonJSMin(((exports, module) => {
9883
9988
  state.position++;
9884
9989
  } else throwError(state, "unknown escape sequence");
9885
9990
  captureStart = captureEnd = state.position;
9886
- } else if (is_EOL(ch)) {
9991
+ } else if (isEol(ch)) {
9887
9992
  captureSegment(state, captureStart, captureEnd, true);
9888
9993
  writeFoldedLines(state, skipSeparationSpace(state, false, nodeIndent));
9889
9994
  captureStart = captureEnd = state.position;
9890
9995
  } else if (state.position === state.lineStart && testDocumentSeparator(state)) throwError(state, "unexpected end of the document within a double quoted scalar");
9891
9996
  else {
9892
9997
  state.position++;
9893
- captureEnd = state.position;
9998
+ if (!isWhiteSpace(ch)) captureEnd = state.position;
9894
9999
  }
9895
10000
  throwError(state, "unexpected end of the stream within a double quoted scalar");
9896
10001
  }
9897
10002
  function readFlowCollection(state, nodeIndent) {
9898
- var readNext = true, _line, _lineStart, _pos, _tag = state.tag, _result, _anchor = state.anchor, following, terminator, isPair, isExplicitPair, isMapping, overridableKeys = Object.create(null), keyNode, keyTag, valueNode, ch = state.input.charCodeAt(state.position);
10003
+ let readNext = true;
10004
+ let _line;
10005
+ let _lineStart;
10006
+ let _pos;
10007
+ const _tag = state.tag;
10008
+ let _result;
10009
+ const _anchor = state.anchor;
10010
+ let terminator;
10011
+ let isPair;
10012
+ let isExplicitPair;
10013
+ let isMapping;
10014
+ const overridableKeys = Object.create(null);
10015
+ let keyNode;
10016
+ let keyTag;
10017
+ let valueNode;
10018
+ let ch = state.input.charCodeAt(state.position);
9899
10019
  if (ch === 91) {
9900
10020
  terminator = 93;
9901
10021
  isMapping = false;
@@ -9905,7 +10025,7 @@ var require_loader = /* @__PURE__ */ __commonJSMin(((exports, module) => {
9905
10025
  isMapping = true;
9906
10026
  _result = {};
9907
10027
  } else return false;
9908
- if (state.anchor !== null) state.anchorMap[state.anchor] = _result;
10028
+ if (state.anchor !== null) storeAnchor(state, state.anchor, _result);
9909
10029
  ch = state.input.charCodeAt(++state.position);
9910
10030
  while (ch !== 0) {
9911
10031
  skipSeparationSpace(state, true, nodeIndent);
@@ -9922,8 +10042,7 @@ var require_loader = /* @__PURE__ */ __commonJSMin(((exports, module) => {
9922
10042
  keyTag = keyNode = valueNode = null;
9923
10043
  isPair = isExplicitPair = false;
9924
10044
  if (ch === 63) {
9925
- following = state.input.charCodeAt(state.position + 1);
9926
- if (is_WS_OR_EOL(following)) {
10045
+ if (isWsOrEol(state.input.charCodeAt(state.position + 1))) {
9927
10046
  isPair = isExplicitPair = true;
9928
10047
  state.position++;
9929
10048
  skipSeparationSpace(state, true, nodeIndent);
@@ -9957,7 +10076,15 @@ var require_loader = /* @__PURE__ */ __commonJSMin(((exports, module) => {
9957
10076
  throwError(state, "unexpected end of the stream within a flow collection");
9958
10077
  }
9959
10078
  function readBlockScalar(state, nodeIndent) {
9960
- var captureStart, folding, chomping = CHOMPING_CLIP, didReadContent = false, detectedIndent = false, textIndent = nodeIndent, emptyLines = 0, atMoreIndented = false, tmp, ch = state.input.charCodeAt(state.position);
10079
+ let folding;
10080
+ let chomping = CHOMPING_CLIP;
10081
+ let didReadContent = false;
10082
+ let detectedIndent = false;
10083
+ let textIndent = nodeIndent;
10084
+ let emptyLines = 0;
10085
+ let atMoreIndented = false;
10086
+ let tmp;
10087
+ let ch = state.input.charCodeAt(state.position);
9961
10088
  if (ch === 124) folding = false;
9962
10089
  else if (ch === 62) folding = true;
9963
10090
  else return false;
@@ -9974,13 +10101,13 @@ var require_loader = /* @__PURE__ */ __commonJSMin(((exports, module) => {
9974
10101
  } else throwError(state, "repeat of an indentation width identifier");
9975
10102
  else break;
9976
10103
  }
9977
- if (is_WHITE_SPACE(ch)) {
10104
+ if (isWhiteSpace(ch)) {
9978
10105
  do
9979
10106
  ch = state.input.charCodeAt(++state.position);
9980
- while (is_WHITE_SPACE(ch));
10107
+ while (isWhiteSpace(ch));
9981
10108
  if (ch === 35) do
9982
10109
  ch = state.input.charCodeAt(++state.position);
9983
- while (!is_EOL(ch) && ch !== 0);
10110
+ while (!isEol(ch) && ch !== 0);
9984
10111
  }
9985
10112
  while (ch !== 0) {
9986
10113
  readLineBreak(state);
@@ -9991,10 +10118,11 @@ var require_loader = /* @__PURE__ */ __commonJSMin(((exports, module) => {
9991
10118
  ch = state.input.charCodeAt(++state.position);
9992
10119
  }
9993
10120
  if (!detectedIndent && state.lineIndent > textIndent) textIndent = state.lineIndent;
9994
- if (is_EOL(ch)) {
10121
+ if (isEol(ch)) {
9995
10122
  emptyLines++;
9996
10123
  continue;
9997
10124
  }
10125
+ if (!detectedIndent && textIndent === 0) throwError(state, "missing indentation for block scalar");
9998
10126
  if (state.lineIndent < textIndent) {
9999
10127
  if (chomping === CHOMPING_KEEP) state.result += common.repeat("\n", didReadContent ? 1 + emptyLines : emptyLines);
10000
10128
  else if (chomping === CHOMPING_CLIP) {
@@ -10002,7 +10130,7 @@ var require_loader = /* @__PURE__ */ __commonJSMin(((exports, module) => {
10002
10130
  }
10003
10131
  break;
10004
10132
  }
10005
- if (folding) if (is_WHITE_SPACE(ch)) {
10133
+ if (folding) if (isWhiteSpace(ch)) {
10006
10134
  atMoreIndented = true;
10007
10135
  state.result += common.repeat("\n", didReadContent ? 1 + emptyLines : emptyLines);
10008
10136
  } else if (atMoreIndented) {
@@ -10015,25 +10143,27 @@ var require_loader = /* @__PURE__ */ __commonJSMin(((exports, module) => {
10015
10143
  didReadContent = true;
10016
10144
  detectedIndent = true;
10017
10145
  emptyLines = 0;
10018
- captureStart = state.position;
10019
- while (!is_EOL(ch) && ch !== 0) ch = state.input.charCodeAt(++state.position);
10146
+ const captureStart = state.position;
10147
+ while (!isEol(ch) && ch !== 0) ch = state.input.charCodeAt(++state.position);
10020
10148
  captureSegment(state, captureStart, state.position, false);
10021
10149
  }
10022
10150
  return true;
10023
10151
  }
10024
10152
  function readBlockSequence(state, nodeIndent) {
10025
- var _line, _tag = state.tag, _anchor = state.anchor, _result = [], following, detected = false, ch;
10153
+ const _tag = state.tag;
10154
+ const _anchor = state.anchor;
10155
+ const _result = [];
10156
+ let detected = false;
10026
10157
  if (state.firstTabInLine !== -1) return false;
10027
- if (state.anchor !== null) state.anchorMap[state.anchor] = _result;
10028
- ch = state.input.charCodeAt(state.position);
10158
+ if (state.anchor !== null) storeAnchor(state, state.anchor, _result);
10159
+ let ch = state.input.charCodeAt(state.position);
10029
10160
  while (ch !== 0) {
10030
10161
  if (state.firstTabInLine !== -1) {
10031
10162
  state.position = state.firstTabInLine;
10032
10163
  throwError(state, "tab characters must not be used in indentation");
10033
10164
  }
10034
10165
  if (ch !== 45) break;
10035
- following = state.input.charCodeAt(state.position + 1);
10036
- if (!is_WS_OR_EOL(following)) break;
10166
+ if (!isWsOrEol(state.input.charCodeAt(state.position + 1))) break;
10037
10167
  detected = true;
10038
10168
  state.position++;
10039
10169
  if (skipSeparationSpace(state, true, -1)) {
@@ -10043,7 +10173,7 @@ var require_loader = /* @__PURE__ */ __commonJSMin(((exports, module) => {
10043
10173
  continue;
10044
10174
  }
10045
10175
  }
10046
- _line = state.line;
10176
+ const _line = state.line;
10047
10177
  composeNode(state, nodeIndent, CONTEXT_BLOCK_IN, false, true);
10048
10178
  _result.push(state.result);
10049
10179
  skipSeparationSpace(state, true, -1);
@@ -10061,18 +10191,30 @@ var require_loader = /* @__PURE__ */ __commonJSMin(((exports, module) => {
10061
10191
  return false;
10062
10192
  }
10063
10193
  function readBlockMapping(state, nodeIndent, flowIndent) {
10064
- var following, allowCompact, _line, _keyLine, _keyLineStart, _keyPos, _tag = state.tag, _anchor = state.anchor, _result = {}, overridableKeys = Object.create(null), keyTag = null, keyNode = null, valueNode = null, atExplicitKey = false, detected = false, ch;
10194
+ let allowCompact;
10195
+ let _keyLine;
10196
+ let _keyLineStart;
10197
+ let _keyPos;
10198
+ const _tag = state.tag;
10199
+ const _anchor = state.anchor;
10200
+ const _result = {};
10201
+ const overridableKeys = Object.create(null);
10202
+ let keyTag = null;
10203
+ let keyNode = null;
10204
+ let valueNode = null;
10205
+ let atExplicitKey = false;
10206
+ let detected = false;
10065
10207
  if (state.firstTabInLine !== -1) return false;
10066
- if (state.anchor !== null) state.anchorMap[state.anchor] = _result;
10067
- ch = state.input.charCodeAt(state.position);
10208
+ if (state.anchor !== null) storeAnchor(state, state.anchor, _result);
10209
+ let ch = state.input.charCodeAt(state.position);
10068
10210
  while (ch !== 0) {
10069
10211
  if (!atExplicitKey && state.firstTabInLine !== -1) {
10070
10212
  state.position = state.firstTabInLine;
10071
10213
  throwError(state, "tab characters must not be used in indentation");
10072
10214
  }
10073
- following = state.input.charCodeAt(state.position + 1);
10074
- _line = state.line;
10075
- if ((ch === 63 || ch === 58) && is_WS_OR_EOL(following)) {
10215
+ const following = state.input.charCodeAt(state.position + 1);
10216
+ const _line = state.line;
10217
+ if ((ch === 63 || ch === 58) && isWsOrEol(following)) {
10076
10218
  if (ch === 63) {
10077
10219
  if (atExplicitKey) {
10078
10220
  storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, null, _keyLine, _keyLineStart, _keyPos);
@@ -10094,10 +10236,10 @@ var require_loader = /* @__PURE__ */ __commonJSMin(((exports, module) => {
10094
10236
  if (!composeNode(state, flowIndent, CONTEXT_FLOW_OUT, false, true)) break;
10095
10237
  if (state.line === _line) {
10096
10238
  ch = state.input.charCodeAt(state.position);
10097
- while (is_WHITE_SPACE(ch)) ch = state.input.charCodeAt(++state.position);
10239
+ while (isWhiteSpace(ch)) ch = state.input.charCodeAt(++state.position);
10098
10240
  if (ch === 58) {
10099
10241
  ch = state.input.charCodeAt(++state.position);
10100
- if (!is_WS_OR_EOL(ch)) throwError(state, "a whitespace character is expected after the key-value separator within a block mapping");
10242
+ if (!isWsOrEol(ch)) throwError(state, "a whitespace character is expected after the key-value separator within a block mapping");
10101
10243
  if (atExplicitKey) {
10102
10244
  storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, null, _keyLine, _keyLineStart, _keyPos);
10103
10245
  keyTag = keyNode = valueNode = null;
@@ -10148,7 +10290,11 @@ var require_loader = /* @__PURE__ */ __commonJSMin(((exports, module) => {
10148
10290
  return detected;
10149
10291
  }
10150
10292
  function readTagProperty(state) {
10151
- var _position, isVerbatim = false, isNamed = false, tagHandle, tagName, ch = state.input.charCodeAt(state.position);
10293
+ let isVerbatim = false;
10294
+ let isNamed = false;
10295
+ let tagHandle;
10296
+ let tagName;
10297
+ let ch = state.input.charCodeAt(state.position);
10152
10298
  if (ch !== 33) return false;
10153
10299
  if (state.tag !== null) throwError(state, "duplication of a tag property");
10154
10300
  ch = state.input.charCodeAt(++state.position);
@@ -10160,7 +10306,7 @@ var require_loader = /* @__PURE__ */ __commonJSMin(((exports, module) => {
10160
10306
  tagHandle = "!!";
10161
10307
  ch = state.input.charCodeAt(++state.position);
10162
10308
  } else tagHandle = "!";
10163
- _position = state.position;
10309
+ let _position = state.position;
10164
10310
  if (isVerbatim) {
10165
10311
  do
10166
10312
  ch = state.input.charCodeAt(++state.position);
@@ -10170,7 +10316,7 @@ var require_loader = /* @__PURE__ */ __commonJSMin(((exports, module) => {
10170
10316
  ch = state.input.charCodeAt(++state.position);
10171
10317
  } else throwError(state, "unexpected end of the stream within a verbatim tag");
10172
10318
  } else {
10173
- while (ch !== 0 && !is_WS_OR_EOL(ch)) {
10319
+ while (ch !== 0 && !isWsOrEol(ch)) {
10174
10320
  if (ch === 33) if (!isNamed) {
10175
10321
  tagHandle = state.input.slice(_position - 1, state.position + 1);
10176
10322
  if (!PATTERN_TAG_HANDLE.test(tagHandle)) throwError(state, "named tag handle cannot contain such characters");
@@ -10196,37 +10342,63 @@ var require_loader = /* @__PURE__ */ __commonJSMin(((exports, module) => {
10196
10342
  return true;
10197
10343
  }
10198
10344
  function readAnchorProperty(state) {
10199
- var _position, ch = state.input.charCodeAt(state.position);
10345
+ let ch = state.input.charCodeAt(state.position);
10200
10346
  if (ch !== 38) return false;
10201
10347
  if (state.anchor !== null) throwError(state, "duplication of an anchor property");
10202
10348
  ch = state.input.charCodeAt(++state.position);
10203
- _position = state.position;
10204
- while (ch !== 0 && !is_WS_OR_EOL(ch) && !is_FLOW_INDICATOR(ch)) ch = state.input.charCodeAt(++state.position);
10349
+ const _position = state.position;
10350
+ while (ch !== 0 && !isWsOrEol(ch) && !isFlowIndicator(ch)) ch = state.input.charCodeAt(++state.position);
10205
10351
  if (state.position === _position) throwError(state, "name of an anchor node must contain at least one character");
10206
10352
  state.anchor = state.input.slice(_position, state.position);
10207
10353
  return true;
10208
10354
  }
10209
10355
  function readAlias(state) {
10210
- var _position, alias, ch = state.input.charCodeAt(state.position);
10356
+ let ch = state.input.charCodeAt(state.position);
10211
10357
  if (ch !== 42) return false;
10212
10358
  ch = state.input.charCodeAt(++state.position);
10213
- _position = state.position;
10214
- while (ch !== 0 && !is_WS_OR_EOL(ch) && !is_FLOW_INDICATOR(ch)) ch = state.input.charCodeAt(++state.position);
10359
+ const _position = state.position;
10360
+ while (ch !== 0 && !isWsOrEol(ch) && !isFlowIndicator(ch)) ch = state.input.charCodeAt(++state.position);
10215
10361
  if (state.position === _position) throwError(state, "name of an alias node must contain at least one character");
10216
- alias = state.input.slice(_position, state.position);
10362
+ const alias = state.input.slice(_position, state.position);
10217
10363
  if (!_hasOwnProperty.call(state.anchorMap, alias)) throwError(state, "unidentified alias \"" + alias + "\"");
10218
10364
  state.result = state.anchorMap[alias];
10219
10365
  skipSeparationSpace(state, true, -1);
10220
10366
  return true;
10221
10367
  }
10368
+ function tryReadBlockMappingFromProperty(state, propertyStart, nodeIndent, flowIndent) {
10369
+ const fallbackState = snapshotState(state);
10370
+ beginAnchorTransaction(state);
10371
+ restoreState(state, propertyStart);
10372
+ state.tag = null;
10373
+ state.anchor = null;
10374
+ state.kind = null;
10375
+ state.result = null;
10376
+ if (readBlockMapping(state, nodeIndent, flowIndent) && state.kind === "mapping") {
10377
+ commitAnchorTransaction(state);
10378
+ return true;
10379
+ }
10380
+ rollbackAnchorTransaction(state);
10381
+ restoreState(state, fallbackState);
10382
+ return false;
10383
+ }
10222
10384
  function composeNode(state, parentIndent, nodeContext, allowToSeek, allowCompact) {
10223
- var allowBlockStyles, allowBlockScalars, allowBlockCollections, indentStatus = 1, atNewLine = false, hasContent = false, typeIndex, typeQuantity, typeList, type, flowIndent, blockIndent;
10385
+ let allowBlockScalars;
10386
+ let allowBlockCollections;
10387
+ let indentStatus = 1;
10388
+ let atNewLine = false;
10389
+ let hasContent = false;
10390
+ let propertyStart = null;
10391
+ let type;
10392
+ let flowIndent;
10393
+ let blockIndent;
10394
+ if (state.depth >= state.maxDepth) throwError(state, "nesting exceeded maxDepth (" + state.maxDepth + ")");
10395
+ state.depth += 1;
10224
10396
  if (state.listener !== null) state.listener("open", state);
10225
10397
  state.tag = null;
10226
10398
  state.anchor = null;
10227
10399
  state.kind = null;
10228
10400
  state.result = null;
10229
- allowBlockStyles = allowBlockScalars = allowBlockCollections = CONTEXT_BLOCK_OUT === nodeContext || CONTEXT_BLOCK_IN === nodeContext;
10401
+ const allowBlockStyles = allowBlockScalars = allowBlockCollections = CONTEXT_BLOCK_OUT === nodeContext || CONTEXT_BLOCK_IN === nodeContext;
10230
10402
  if (allowToSeek) {
10231
10403
  if (skipSeparationSpace(state, true, -1)) {
10232
10404
  atNewLine = true;
@@ -10235,13 +10407,20 @@ var require_loader = /* @__PURE__ */ __commonJSMin(((exports, module) => {
10235
10407
  else if (state.lineIndent < parentIndent) indentStatus = -1;
10236
10408
  }
10237
10409
  }
10238
- if (indentStatus === 1) while (readTagProperty(state) || readAnchorProperty(state)) if (skipSeparationSpace(state, true, -1)) {
10239
- atNewLine = true;
10240
- allowBlockCollections = allowBlockStyles;
10241
- if (state.lineIndent > parentIndent) indentStatus = 1;
10242
- else if (state.lineIndent === parentIndent) indentStatus = 0;
10243
- else if (state.lineIndent < parentIndent) indentStatus = -1;
10244
- } else allowBlockCollections = false;
10410
+ if (indentStatus === 1) while (true) {
10411
+ const ch = state.input.charCodeAt(state.position);
10412
+ const propertyState = snapshotState(state);
10413
+ if (atNewLine && (ch === 33 && state.tag !== null || ch === 38 && state.anchor !== null)) break;
10414
+ if (!readTagProperty(state) && !readAnchorProperty(state)) break;
10415
+ if (propertyStart === null) propertyStart = propertyState;
10416
+ if (skipSeparationSpace(state, true, -1)) {
10417
+ atNewLine = true;
10418
+ allowBlockCollections = allowBlockStyles;
10419
+ if (state.lineIndent > parentIndent) indentStatus = 1;
10420
+ else if (state.lineIndent === parentIndent) indentStatus = 0;
10421
+ else if (state.lineIndent < parentIndent) indentStatus = -1;
10422
+ } else allowBlockCollections = false;
10423
+ }
10245
10424
  if (allowBlockCollections) allowBlockCollections = atNewLine || allowCompact;
10246
10425
  if (indentStatus === 1 || CONTEXT_BLOCK_OUT === nodeContext) {
10247
10426
  if (CONTEXT_FLOW_IN === nodeContext || CONTEXT_FLOW_OUT === nodeContext) flowIndent = parentIndent;
@@ -10249,7 +10428,9 @@ var require_loader = /* @__PURE__ */ __commonJSMin(((exports, module) => {
10249
10428
  blockIndent = state.position - state.lineStart;
10250
10429
  if (indentStatus === 1) if (allowBlockCollections && (readBlockSequence(state, blockIndent) || readBlockMapping(state, blockIndent, flowIndent)) || readFlowCollection(state, flowIndent)) hasContent = true;
10251
10430
  else {
10252
- if (allowBlockScalars && readBlockScalar(state, flowIndent) || readSingleQuotedScalar(state, flowIndent) || readDoubleQuotedScalar(state, flowIndent)) hasContent = true;
10431
+ const ch = state.input.charCodeAt(state.position);
10432
+ if (propertyStart !== null && allowBlockStyles && !allowBlockCollections && ch !== 124 && ch !== 62 && tryReadBlockMappingFromProperty(state, propertyStart, propertyStart.position - propertyStart.lineStart, flowIndent)) hasContent = true;
10433
+ else if (allowBlockScalars && readBlockScalar(state, flowIndent) || readSingleQuotedScalar(state, flowIndent) || readDoubleQuotedScalar(state, flowIndent)) hasContent = true;
10253
10434
  else if (readAlias(state)) {
10254
10435
  hasContent = true;
10255
10436
  if (state.tag !== null || state.anchor !== null) throwError(state, "alias node should not have any properties");
@@ -10257,20 +10438,20 @@ var require_loader = /* @__PURE__ */ __commonJSMin(((exports, module) => {
10257
10438
  hasContent = true;
10258
10439
  if (state.tag === null) state.tag = "?";
10259
10440
  }
10260
- if (state.anchor !== null) state.anchorMap[state.anchor] = state.result;
10441
+ if (state.anchor !== null) storeAnchor(state, state.anchor, state.result);
10261
10442
  }
10262
10443
  else if (indentStatus === 0) hasContent = allowBlockCollections && readBlockSequence(state, blockIndent);
10263
10444
  }
10264
10445
  if (state.tag === null) {
10265
- if (state.anchor !== null) state.anchorMap[state.anchor] = state.result;
10446
+ if (state.anchor !== null) storeAnchor(state, state.anchor, state.result);
10266
10447
  } else if (state.tag === "?") {
10267
10448
  if (state.result !== null && state.kind !== "scalar") throwError(state, "unacceptable node kind for !<?> tag; it should be \"scalar\", not \"" + state.kind + "\"");
10268
- for (typeIndex = 0, typeQuantity = state.implicitTypes.length; typeIndex < typeQuantity; typeIndex += 1) {
10449
+ for (let typeIndex = 0, typeQuantity = state.implicitTypes.length; typeIndex < typeQuantity; typeIndex += 1) {
10269
10450
  type = state.implicitTypes[typeIndex];
10270
10451
  if (type.resolve(state.result)) {
10271
10452
  state.result = type.construct(state.result);
10272
10453
  state.tag = type.tag;
10273
- if (state.anchor !== null) state.anchorMap[state.anchor] = state.result;
10454
+ if (state.anchor !== null) storeAnchor(state, state.anchor, state.result);
10274
10455
  break;
10275
10456
  }
10276
10457
  }
@@ -10278,8 +10459,8 @@ var require_loader = /* @__PURE__ */ __commonJSMin(((exports, module) => {
10278
10459
  if (_hasOwnProperty.call(state.typeMap[state.kind || "fallback"], state.tag)) type = state.typeMap[state.kind || "fallback"][state.tag];
10279
10460
  else {
10280
10461
  type = null;
10281
- typeList = state.typeMap.multi[state.kind || "fallback"];
10282
- for (typeIndex = 0, typeQuantity = typeList.length; typeIndex < typeQuantity; typeIndex += 1) if (state.tag.slice(0, typeList[typeIndex].tag.length) === typeList[typeIndex].tag) {
10462
+ const typeList = state.typeMap.multi[state.kind || "fallback"];
10463
+ for (let typeIndex = 0, typeQuantity = typeList.length; typeIndex < typeQuantity; typeIndex += 1) if (state.tag.slice(0, typeList[typeIndex].tag.length) === typeList[typeIndex].tag) {
10283
10464
  type = typeList[typeIndex];
10284
10465
  break;
10285
10466
  }
@@ -10289,14 +10470,17 @@ var require_loader = /* @__PURE__ */ __commonJSMin(((exports, module) => {
10289
10470
  if (!type.resolve(state.result, state.tag)) throwError(state, "cannot resolve a node with !<" + state.tag + "> explicit tag");
10290
10471
  else {
10291
10472
  state.result = type.construct(state.result, state.tag);
10292
- if (state.anchor !== null) state.anchorMap[state.anchor] = state.result;
10473
+ if (state.anchor !== null) storeAnchor(state, state.anchor, state.result);
10293
10474
  }
10294
10475
  }
10295
10476
  if (state.listener !== null) state.listener("close", state);
10477
+ state.depth -= 1;
10296
10478
  return state.tag !== null || state.anchor !== null || hasContent;
10297
10479
  }
10298
10480
  function readDocument(state) {
10299
- var documentStart = state.position, _position, directiveName, directiveArgs, hasDirectives = false, ch;
10481
+ const documentStart = state.position;
10482
+ let hasDirectives = false;
10483
+ let ch;
10300
10484
  state.version = null;
10301
10485
  state.checkLineBreaks = state.legacy;
10302
10486
  state.tagMap = Object.create(null);
@@ -10307,22 +10491,22 @@ var require_loader = /* @__PURE__ */ __commonJSMin(((exports, module) => {
10307
10491
  if (state.lineIndent > 0 || ch !== 37) break;
10308
10492
  hasDirectives = true;
10309
10493
  ch = state.input.charCodeAt(++state.position);
10310
- _position = state.position;
10311
- while (ch !== 0 && !is_WS_OR_EOL(ch)) ch = state.input.charCodeAt(++state.position);
10312
- directiveName = state.input.slice(_position, state.position);
10313
- directiveArgs = [];
10494
+ let _position = state.position;
10495
+ while (ch !== 0 && !isWsOrEol(ch)) ch = state.input.charCodeAt(++state.position);
10496
+ const directiveName = state.input.slice(_position, state.position);
10497
+ const directiveArgs = [];
10314
10498
  if (directiveName.length < 1) throwError(state, "directive name must not be less than one character in length");
10315
10499
  while (ch !== 0) {
10316
- while (is_WHITE_SPACE(ch)) ch = state.input.charCodeAt(++state.position);
10500
+ while (isWhiteSpace(ch)) ch = state.input.charCodeAt(++state.position);
10317
10501
  if (ch === 35) {
10318
10502
  do
10319
10503
  ch = state.input.charCodeAt(++state.position);
10320
- while (ch !== 0 && !is_EOL(ch));
10504
+ while (ch !== 0 && !isEol(ch));
10321
10505
  break;
10322
10506
  }
10323
- if (is_EOL(ch)) break;
10507
+ if (isEol(ch)) break;
10324
10508
  _position = state.position;
10325
- while (ch !== 0 && !is_WS_OR_EOL(ch)) ch = state.input.charCodeAt(++state.position);
10509
+ while (ch !== 0 && !isWsOrEol(ch)) ch = state.input.charCodeAt(++state.position);
10326
10510
  directiveArgs.push(state.input.slice(_position, state.position));
10327
10511
  }
10328
10512
  if (ch !== 0) readLineBreak(state);
@@ -10346,7 +10530,6 @@ var require_loader = /* @__PURE__ */ __commonJSMin(((exports, module) => {
10346
10530
  return;
10347
10531
  }
10348
10532
  if (state.position < state.length - 1) throwError(state, "end of the stream or a document separator is expected");
10349
- else return;
10350
10533
  }
10351
10534
  function loadDocuments(input, options) {
10352
10535
  input = String(input);
@@ -10355,8 +10538,8 @@ var require_loader = /* @__PURE__ */ __commonJSMin(((exports, module) => {
10355
10538
  if (input.charCodeAt(input.length - 1) !== 10 && input.charCodeAt(input.length - 1) !== 13) input += "\n";
10356
10539
  if (input.charCodeAt(0) === 65279) input = input.slice(1);
10357
10540
  }
10358
- var state = new State(input, options);
10359
- var nullpos = input.indexOf("\0");
10541
+ const state = new State(input, options);
10542
+ const nullpos = input.indexOf("\0");
10360
10543
  if (nullpos !== -1) {
10361
10544
  state.position = nullpos;
10362
10545
  throwError(state, "null byte is not allowed in input");
@@ -10374,12 +10557,12 @@ var require_loader = /* @__PURE__ */ __commonJSMin(((exports, module) => {
10374
10557
  options = iterator;
10375
10558
  iterator = null;
10376
10559
  }
10377
- var documents = loadDocuments(input, options);
10560
+ const documents = loadDocuments(input, options);
10378
10561
  if (typeof iterator !== "function") return documents;
10379
- for (var index = 0, length = documents.length; index < length; index += 1) iterator(documents[index]);
10562
+ for (let index = 0, length = documents.length; index < length; index += 1) iterator(documents[index]);
10380
10563
  }
10381
10564
  function load(input, options) {
10382
- var documents = loadDocuments(input, options);
10565
+ const documents = loadDocuments(input, options);
10383
10566
  if (documents.length === 0) return;
10384
10567
  else if (documents.length === 1) return documents[0];
10385
10568
  throw new YAMLException("expected a single document in the stream, but found more");
@@ -10388,39 +10571,39 @@ var require_loader = /* @__PURE__ */ __commonJSMin(((exports, module) => {
10388
10571
  module.exports.load = load;
10389
10572
  }));
10390
10573
  //#endregion
10391
- //#region ../../node_modules/.pnpm/js-yaml@4.1.1/node_modules/js-yaml/lib/dumper.js
10574
+ //#region ../../node_modules/.pnpm/js-yaml@4.3.0/node_modules/js-yaml/lib/dumper.js
10392
10575
  var require_dumper = /* @__PURE__ */ __commonJSMin(((exports, module) => {
10393
- var common = require_common();
10394
- var YAMLException = require_exception();
10395
- var DEFAULT_SCHEMA = require_default();
10396
- var _toString = Object.prototype.toString;
10397
- var _hasOwnProperty = Object.prototype.hasOwnProperty;
10398
- var CHAR_BOM = 65279;
10399
- var CHAR_TAB = 9;
10400
- var CHAR_LINE_FEED = 10;
10401
- var CHAR_CARRIAGE_RETURN = 13;
10402
- var CHAR_SPACE = 32;
10403
- var CHAR_EXCLAMATION = 33;
10404
- var CHAR_DOUBLE_QUOTE = 34;
10405
- var CHAR_SHARP = 35;
10406
- var CHAR_PERCENT = 37;
10407
- var CHAR_AMPERSAND = 38;
10408
- var CHAR_SINGLE_QUOTE = 39;
10409
- var CHAR_ASTERISK = 42;
10410
- var CHAR_COMMA = 44;
10411
- var CHAR_MINUS = 45;
10412
- var CHAR_COLON = 58;
10413
- var CHAR_EQUALS = 61;
10414
- var CHAR_GREATER_THAN = 62;
10415
- var CHAR_QUESTION = 63;
10416
- var CHAR_COMMERCIAL_AT = 64;
10417
- var CHAR_LEFT_SQUARE_BRACKET = 91;
10418
- var CHAR_RIGHT_SQUARE_BRACKET = 93;
10419
- var CHAR_GRAVE_ACCENT = 96;
10420
- var CHAR_LEFT_CURLY_BRACKET = 123;
10421
- var CHAR_VERTICAL_LINE = 124;
10422
- var CHAR_RIGHT_CURLY_BRACKET = 125;
10423
- var ESCAPE_SEQUENCES = {};
10576
+ const common = require_common();
10577
+ const YAMLException = require_exception();
10578
+ const DEFAULT_SCHEMA = require_default();
10579
+ const _toString = Object.prototype.toString;
10580
+ const _hasOwnProperty = Object.prototype.hasOwnProperty;
10581
+ const CHAR_BOM = 65279;
10582
+ const CHAR_TAB = 9;
10583
+ const CHAR_LINE_FEED = 10;
10584
+ const CHAR_CARRIAGE_RETURN = 13;
10585
+ const CHAR_SPACE = 32;
10586
+ const CHAR_EXCLAMATION = 33;
10587
+ const CHAR_DOUBLE_QUOTE = 34;
10588
+ const CHAR_SHARP = 35;
10589
+ const CHAR_PERCENT = 37;
10590
+ const CHAR_AMPERSAND = 38;
10591
+ const CHAR_SINGLE_QUOTE = 39;
10592
+ const CHAR_ASTERISK = 42;
10593
+ const CHAR_COMMA = 44;
10594
+ const CHAR_MINUS = 45;
10595
+ const CHAR_COLON = 58;
10596
+ const CHAR_EQUALS = 61;
10597
+ const CHAR_GREATER_THAN = 62;
10598
+ const CHAR_QUESTION = 63;
10599
+ const CHAR_COMMERCIAL_AT = 64;
10600
+ const CHAR_LEFT_SQUARE_BRACKET = 91;
10601
+ const CHAR_RIGHT_SQUARE_BRACKET = 93;
10602
+ const CHAR_GRAVE_ACCENT = 96;
10603
+ const CHAR_LEFT_CURLY_BRACKET = 123;
10604
+ const CHAR_VERTICAL_LINE = 124;
10605
+ const CHAR_RIGHT_CURLY_BRACKET = 125;
10606
+ const ESCAPE_SEQUENCES = {};
10424
10607
  ESCAPE_SEQUENCES[0] = "\\0";
10425
10608
  ESCAPE_SEQUENCES[7] = "\\a";
10426
10609
  ESCAPE_SEQUENCES[8] = "\\b";
@@ -10436,7 +10619,7 @@ var require_dumper = /* @__PURE__ */ __commonJSMin(((exports, module) => {
10436
10619
  ESCAPE_SEQUENCES[160] = "\\_";
10437
10620
  ESCAPE_SEQUENCES[8232] = "\\L";
10438
10621
  ESCAPE_SEQUENCES[8233] = "\\P";
10439
- var DEPRECATED_BOOLEANS_SYNTAX = [
10622
+ const DEPRECATED_BOOLEANS_SYNTAX = [
10440
10623
  "y",
10441
10624
  "Y",
10442
10625
  "yes",
@@ -10454,24 +10637,25 @@ var require_dumper = /* @__PURE__ */ __commonJSMin(((exports, module) => {
10454
10637
  "Off",
10455
10638
  "OFF"
10456
10639
  ];
10457
- var DEPRECATED_BASE60_SYNTAX = /^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/;
10640
+ const DEPRECATED_BASE60_SYNTAX = /^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/;
10458
10641
  function compileStyleMap(schema, map) {
10459
- var result, keys, index, length, tag, style, type;
10460
10642
  if (map === null) return {};
10461
- result = {};
10462
- keys = Object.keys(map);
10463
- for (index = 0, length = keys.length; index < length; index += 1) {
10464
- tag = keys[index];
10465
- style = String(map[tag]);
10643
+ const result = {};
10644
+ const keys = Object.keys(map);
10645
+ for (let index = 0, length = keys.length; index < length; index += 1) {
10646
+ let tag = keys[index];
10647
+ let style = String(map[tag]);
10466
10648
  if (tag.slice(0, 2) === "!!") tag = "tag:yaml.org,2002:" + tag.slice(2);
10467
- type = schema.compiledTypeMap["fallback"][tag];
10649
+ const type = schema.compiledTypeMap["fallback"][tag];
10468
10650
  if (type && _hasOwnProperty.call(type.styleAliases, style)) style = type.styleAliases[style];
10469
10651
  result[tag] = style;
10470
10652
  }
10471
10653
  return result;
10472
10654
  }
10473
10655
  function encodeHex(character) {
10474
- var string = character.toString(16).toUpperCase(), handle, length;
10656
+ let handle;
10657
+ let length;
10658
+ const string = character.toString(16).toUpperCase();
10475
10659
  if (character <= 255) {
10476
10660
  handle = "x";
10477
10661
  length = 2;
@@ -10484,8 +10668,8 @@ var require_dumper = /* @__PURE__ */ __commonJSMin(((exports, module) => {
10484
10668
  } else throw new YAMLException("code point within a string may not be greater than 0xFFFFFFFF");
10485
10669
  return "\\" + handle + common.repeat("0", length - string.length) + string;
10486
10670
  }
10487
- var QUOTING_TYPE_SINGLE = 1;
10488
- var QUOTING_TYPE_DOUBLE = 2;
10671
+ const QUOTING_TYPE_SINGLE = 1;
10672
+ const QUOTING_TYPE_DOUBLE = 2;
10489
10673
  function State(options) {
10490
10674
  this.schema = options["schema"] || DEFAULT_SCHEMA;
10491
10675
  this.indent = Math.max(1, options["indent"] || 2);
@@ -10509,9 +10693,13 @@ var require_dumper = /* @__PURE__ */ __commonJSMin(((exports, module) => {
10509
10693
  this.usedDuplicates = null;
10510
10694
  }
10511
10695
  function indentString(string, spaces) {
10512
- var ind = common.repeat(" ", spaces), position = 0, next = -1, result = "", line, length = string.length;
10696
+ const ind = common.repeat(" ", spaces);
10697
+ let position = 0;
10698
+ let result = "";
10699
+ const length = string.length;
10513
10700
  while (position < length) {
10514
- next = string.indexOf("\n", position);
10701
+ let line;
10702
+ const next = string.indexOf("\n", position);
10515
10703
  if (next === -1) {
10516
10704
  line = string.slice(position);
10517
10705
  position = length;
@@ -10528,25 +10716,21 @@ var require_dumper = /* @__PURE__ */ __commonJSMin(((exports, module) => {
10528
10716
  return "\n" + common.repeat(" ", state.indent * level);
10529
10717
  }
10530
10718
  function testImplicitResolving(state, str) {
10531
- var index, length, type;
10532
- for (index = 0, length = state.implicitTypes.length; index < length; index += 1) {
10533
- type = state.implicitTypes[index];
10534
- if (type.resolve(str)) return true;
10535
- }
10719
+ for (let index = 0, length = state.implicitTypes.length; index < length; index += 1) if (state.implicitTypes[index].resolve(str)) return true;
10536
10720
  return false;
10537
10721
  }
10538
10722
  function isWhitespace(c) {
10539
10723
  return c === CHAR_SPACE || c === CHAR_TAB;
10540
10724
  }
10541
10725
  function isPrintable(c) {
10542
- return 32 <= c && c <= 126 || 161 <= c && c <= 55295 && c !== 8232 && c !== 8233 || 57344 <= c && c <= 65533 && c !== CHAR_BOM || 65536 <= c && c <= 1114111;
10726
+ return c >= 32 && c <= 126 || c >= 161 && c <= 55295 && c !== 8232 && c !== 8233 || c >= 57344 && c <= 65533 && c !== CHAR_BOM || c >= 65536 && c <= 1114111;
10543
10727
  }
10544
10728
  function isNsCharOrWhitespace(c) {
10545
10729
  return isPrintable(c) && c !== CHAR_BOM && c !== CHAR_CARRIAGE_RETURN && c !== CHAR_LINE_FEED;
10546
10730
  }
10547
10731
  function isPlainSafe(c, prev, inblock) {
10548
- var cIsNsCharOrWhitespace = isNsCharOrWhitespace(c);
10549
- var cIsNsChar = cIsNsCharOrWhitespace && !isWhitespace(c);
10732
+ const cIsNsCharOrWhitespace = isNsCharOrWhitespace(c);
10733
+ const cIsNsChar = cIsNsCharOrWhitespace && !isWhitespace(c);
10550
10734
  return (inblock ? cIsNsCharOrWhitespace : cIsNsCharOrWhitespace && c !== CHAR_COMMA && c !== CHAR_LEFT_SQUARE_BRACKET && c !== CHAR_RIGHT_SQUARE_BRACKET && c !== CHAR_LEFT_CURLY_BRACKET && c !== CHAR_RIGHT_CURLY_BRACKET) && c !== CHAR_SHARP && !(prev === CHAR_COLON && !cIsNsChar) || isNsCharOrWhitespace(prev) && !isWhitespace(prev) && c === CHAR_SHARP || prev === CHAR_COLON && cIsNsChar;
10551
10735
  }
10552
10736
  function isPlainSafeFirst(c) {
@@ -10556,7 +10740,8 @@ var require_dumper = /* @__PURE__ */ __commonJSMin(((exports, module) => {
10556
10740
  return !isWhitespace(c) && c !== CHAR_COLON;
10557
10741
  }
10558
10742
  function codePointAt(string, pos) {
10559
- var first = string.charCodeAt(pos), second;
10743
+ const first = string.charCodeAt(pos);
10744
+ let second;
10560
10745
  if (first >= 55296 && first <= 56319 && pos + 1 < string.length) {
10561
10746
  second = string.charCodeAt(pos + 1);
10562
10747
  if (second >= 56320 && second <= 57343) return (first - 55296) * 1024 + second - 56320 + 65536;
@@ -10566,20 +10751,20 @@ var require_dumper = /* @__PURE__ */ __commonJSMin(((exports, module) => {
10566
10751
  function needIndentIndicator(string) {
10567
10752
  return /^\n* /.test(string);
10568
10753
  }
10569
- var STYLE_PLAIN = 1;
10570
- var STYLE_SINGLE = 2;
10571
- var STYLE_LITERAL = 3;
10572
- var STYLE_FOLDED = 4;
10573
- var STYLE_DOUBLE = 5;
10754
+ const STYLE_PLAIN = 1;
10755
+ const STYLE_SINGLE = 2;
10756
+ const STYLE_LITERAL = 3;
10757
+ const STYLE_FOLDED = 4;
10758
+ const STYLE_DOUBLE = 5;
10574
10759
  function chooseScalarStyle(string, singleLineOnly, indentPerLevel, lineWidth, testAmbiguousType, quotingType, forceQuotes, inblock) {
10575
- var i;
10576
- var char = 0;
10577
- var prevChar = null;
10578
- var hasLineBreak = false;
10579
- var hasFoldableLine = false;
10580
- var shouldTrackWidth = lineWidth !== -1;
10581
- var previousLineBreak = -1;
10582
- var plain = isPlainSafeFirst(codePointAt(string, 0)) && isPlainSafeLast(codePointAt(string, string.length - 1));
10760
+ let i;
10761
+ let char = 0;
10762
+ let prevChar = null;
10763
+ let hasLineBreak = false;
10764
+ let hasFoldableLine = false;
10765
+ const shouldTrackWidth = lineWidth !== -1;
10766
+ let previousLineBreak = -1;
10767
+ let plain = isPlainSafeFirst(codePointAt(string, 0)) && isPlainSafeLast(codePointAt(string, string.length - 1));
10583
10768
  if (singleLineOnly || forceQuotes) for (i = 0; i < string.length; char >= 65536 ? i += 2 : i++) {
10584
10769
  char = codePointAt(string, i);
10585
10770
  if (!isPrintable(char)) return STYLE_DOUBLE;
@@ -10615,9 +10800,9 @@ var require_dumper = /* @__PURE__ */ __commonJSMin(((exports, module) => {
10615
10800
  if (!state.noCompatMode) {
10616
10801
  if (DEPRECATED_BOOLEANS_SYNTAX.indexOf(string) !== -1 || DEPRECATED_BASE60_SYNTAX.test(string)) return state.quotingType === QUOTING_TYPE_DOUBLE ? "\"" + string + "\"" : "'" + string + "'";
10617
10802
  }
10618
- var indent = state.indent * Math.max(1, level);
10619
- var lineWidth = state.lineWidth === -1 ? -1 : Math.max(Math.min(state.lineWidth, 40), state.lineWidth - indent);
10620
- var singleLineOnly = iskey || state.flowLevel > -1 && level >= state.flowLevel;
10803
+ const indent = state.indent * Math.max(1, level);
10804
+ const lineWidth = state.lineWidth === -1 ? -1 : Math.max(Math.min(state.lineWidth, 40), state.lineWidth - indent);
10805
+ const singleLineOnly = iskey || state.flowLevel > -1 && level >= state.flowLevel;
10621
10806
  function testAmbiguity(string) {
10622
10807
  return testImplicitResolving(state, string);
10623
10808
  }
@@ -10632,26 +10817,27 @@ var require_dumper = /* @__PURE__ */ __commonJSMin(((exports, module) => {
10632
10817
  }();
10633
10818
  }
10634
10819
  function blockHeader(string, indentPerLevel) {
10635
- var indentIndicator = needIndentIndicator(string) ? String(indentPerLevel) : "";
10636
- var clip = string[string.length - 1] === "\n";
10820
+ const indentIndicator = needIndentIndicator(string) ? String(indentPerLevel) : "";
10821
+ const clip = string[string.length - 1] === "\n";
10637
10822
  return indentIndicator + (clip && (string[string.length - 2] === "\n" || string === "\n") ? "+" : clip ? "" : "-") + "\n";
10638
10823
  }
10639
10824
  function dropEndingNewline(string) {
10640
10825
  return string[string.length - 1] === "\n" ? string.slice(0, -1) : string;
10641
10826
  }
10642
10827
  function foldString(string, width) {
10643
- var lineRe = /(\n+)([^\n]*)/g;
10644
- var result = function() {
10645
- var nextLF = string.indexOf("\n");
10828
+ const lineRe = /(\n+)([^\n]*)/g;
10829
+ let result = function() {
10830
+ let nextLF = string.indexOf("\n");
10646
10831
  nextLF = nextLF !== -1 ? nextLF : string.length;
10647
10832
  lineRe.lastIndex = nextLF;
10648
10833
  return foldLine(string.slice(0, nextLF), width);
10649
10834
  }();
10650
- var prevMoreIndented = string[0] === "\n" || string[0] === " ";
10651
- var moreIndented;
10652
- var match;
10835
+ let prevMoreIndented = string[0] === "\n" || string[0] === " ";
10836
+ let moreIndented;
10837
+ let match;
10653
10838
  while (match = lineRe.exec(string)) {
10654
- var prefix = match[1], line = match[2];
10839
+ const prefix = match[1];
10840
+ const line = match[2];
10655
10841
  moreIndented = line[0] === " ";
10656
10842
  result += prefix + (!prevMoreIndented && !moreIndented && line !== "" ? "\n" : "") + foldLine(line, width);
10657
10843
  prevMoreIndented = moreIndented;
@@ -10660,10 +10846,13 @@ var require_dumper = /* @__PURE__ */ __commonJSMin(((exports, module) => {
10660
10846
  }
10661
10847
  function foldLine(line, width) {
10662
10848
  if (line === "" || line[0] === " ") return line;
10663
- var breakRe = / [^ ]/g;
10664
- var match;
10665
- var start = 0, end, curr = 0, next = 0;
10666
- var result = "";
10849
+ const breakRe = / [^ ]/g;
10850
+ let match;
10851
+ let start = 0;
10852
+ let end;
10853
+ let curr = 0;
10854
+ let next = 0;
10855
+ let result = "";
10667
10856
  while (match = breakRe.exec(line)) {
10668
10857
  next = match.index;
10669
10858
  if (next - start > width) {
@@ -10679,12 +10868,11 @@ var require_dumper = /* @__PURE__ */ __commonJSMin(((exports, module) => {
10679
10868
  return result.slice(1);
10680
10869
  }
10681
10870
  function escapeString(string) {
10682
- var result = "";
10683
- var char = 0;
10684
- var escapeSeq;
10685
- for (var i = 0; i < string.length; char >= 65536 ? i += 2 : i++) {
10871
+ let result = "";
10872
+ let char = 0;
10873
+ for (let i = 0; i < string.length; char >= 65536 ? i += 2 : i++) {
10686
10874
  char = codePointAt(string, i);
10687
- escapeSeq = ESCAPE_SEQUENCES[char];
10875
+ const escapeSeq = ESCAPE_SEQUENCES[char];
10688
10876
  if (!escapeSeq && isPrintable(char)) {
10689
10877
  result += string[i];
10690
10878
  if (char >= 65536) result += string[i + 1];
@@ -10693,9 +10881,10 @@ var require_dumper = /* @__PURE__ */ __commonJSMin(((exports, module) => {
10693
10881
  return result;
10694
10882
  }
10695
10883
  function writeFlowSequence(state, level, object) {
10696
- var _result = "", _tag = state.tag, index, length, value;
10697
- for (index = 0, length = object.length; index < length; index += 1) {
10698
- value = object[index];
10884
+ let _result = "";
10885
+ const _tag = state.tag;
10886
+ for (let index = 0, length = object.length; index < length; index += 1) {
10887
+ let value = object[index];
10699
10888
  if (state.replacer) value = state.replacer.call(object, String(index), value);
10700
10889
  if (writeNode(state, level, value, false, false) || typeof value === "undefined" && writeNode(state, level, null, false, false)) {
10701
10890
  if (_result !== "") _result += "," + (!state.condenseFlow ? " " : "");
@@ -10706,9 +10895,10 @@ var require_dumper = /* @__PURE__ */ __commonJSMin(((exports, module) => {
10706
10895
  state.dump = "[" + _result + "]";
10707
10896
  }
10708
10897
  function writeBlockSequence(state, level, object, compact) {
10709
- var _result = "", _tag = state.tag, index, length, value;
10710
- for (index = 0, length = object.length; index < length; index += 1) {
10711
- value = object[index];
10898
+ let _result = "";
10899
+ const _tag = state.tag;
10900
+ for (let index = 0, length = object.length; index < length; index += 1) {
10901
+ let value = object[index];
10712
10902
  if (state.replacer) value = state.replacer.call(object, String(index), value);
10713
10903
  if (writeNode(state, level + 1, value, true, true, false, true) || typeof value === "undefined" && writeNode(state, level + 1, null, true, true, false, true)) {
10714
10904
  if (!compact || _result !== "") _result += generateNextLine(state, level);
@@ -10721,13 +10911,15 @@ var require_dumper = /* @__PURE__ */ __commonJSMin(((exports, module) => {
10721
10911
  state.dump = _result || "[]";
10722
10912
  }
10723
10913
  function writeFlowMapping(state, level, object) {
10724
- var _result = "", _tag = state.tag, objectKeyList = Object.keys(object), index, length, objectKey, objectValue, pairBuffer;
10725
- for (index = 0, length = objectKeyList.length; index < length; index += 1) {
10726
- pairBuffer = "";
10914
+ let _result = "";
10915
+ const _tag = state.tag;
10916
+ const objectKeyList = Object.keys(object);
10917
+ for (let index = 0, length = objectKeyList.length; index < length; index += 1) {
10918
+ let pairBuffer = "";
10727
10919
  if (_result !== "") pairBuffer += ", ";
10728
10920
  if (state.condenseFlow) pairBuffer += "\"";
10729
- objectKey = objectKeyList[index];
10730
- objectValue = object[objectKey];
10921
+ const objectKey = objectKeyList[index];
10922
+ let objectValue = object[objectKey];
10731
10923
  if (state.replacer) objectValue = state.replacer.call(object, objectKey, objectValue);
10732
10924
  if (!writeNode(state, level, objectKey, false, false)) continue;
10733
10925
  if (state.dump.length > 1024) pairBuffer += "? ";
@@ -10740,18 +10932,20 @@ var require_dumper = /* @__PURE__ */ __commonJSMin(((exports, module) => {
10740
10932
  state.dump = "{" + _result + "}";
10741
10933
  }
10742
10934
  function writeBlockMapping(state, level, object, compact) {
10743
- var _result = "", _tag = state.tag, objectKeyList = Object.keys(object), index, length, objectKey, objectValue, explicitPair, pairBuffer;
10935
+ let _result = "";
10936
+ const _tag = state.tag;
10937
+ const objectKeyList = Object.keys(object);
10744
10938
  if (state.sortKeys === true) objectKeyList.sort();
10745
10939
  else if (typeof state.sortKeys === "function") objectKeyList.sort(state.sortKeys);
10746
10940
  else if (state.sortKeys) throw new YAMLException("sortKeys must be a boolean or a function");
10747
- for (index = 0, length = objectKeyList.length; index < length; index += 1) {
10748
- pairBuffer = "";
10941
+ for (let index = 0, length = objectKeyList.length; index < length; index += 1) {
10942
+ let pairBuffer = "";
10749
10943
  if (!compact || _result !== "") pairBuffer += generateNextLine(state, level);
10750
- objectKey = objectKeyList[index];
10751
- objectValue = object[objectKey];
10944
+ const objectKey = objectKeyList[index];
10945
+ let objectValue = object[objectKey];
10752
10946
  if (state.replacer) objectValue = state.replacer.call(object, objectKey, objectValue);
10753
10947
  if (!writeNode(state, level + 1, objectKey, true, true, true)) continue;
10754
- explicitPair = state.tag !== null && state.tag !== "?" || state.dump && state.dump.length > 1024;
10948
+ const explicitPair = state.tag !== null && state.tag !== "?" || state.dump && state.dump.length > 1024;
10755
10949
  if (explicitPair) if (state.dump && CHAR_LINE_FEED === state.dump.charCodeAt(0)) pairBuffer += "?";
10756
10950
  else pairBuffer += "? ";
10757
10951
  pairBuffer += state.dump;
@@ -10766,15 +10960,16 @@ var require_dumper = /* @__PURE__ */ __commonJSMin(((exports, module) => {
10766
10960
  state.dump = _result || "{}";
10767
10961
  }
10768
10962
  function detectType(state, object, explicit) {
10769
- var _result, typeList = explicit ? state.explicitTypes : state.implicitTypes, index, length, type, style;
10770
- for (index = 0, length = typeList.length; index < length; index += 1) {
10771
- type = typeList[index];
10963
+ const typeList = explicit ? state.explicitTypes : state.implicitTypes;
10964
+ for (let index = 0, length = typeList.length; index < length; index += 1) {
10965
+ const type = typeList[index];
10772
10966
  if ((type.instanceOf || type.predicate) && (!type.instanceOf || typeof object === "object" && object instanceof type.instanceOf) && (!type.predicate || type.predicate(object))) {
10773
10967
  if (explicit) if (type.multi && type.representName) state.tag = type.representName(object);
10774
10968
  else state.tag = type.tag;
10775
10969
  else state.tag = "?";
10776
10970
  if (type.represent) {
10777
- style = state.styleMap[type.tag] || type.defaultStyle;
10971
+ const style = state.styleMap[type.tag] || type.defaultStyle;
10972
+ let _result;
10778
10973
  if (_toString.call(type.represent) === "[object Function]") _result = type.represent(object, style);
10779
10974
  else if (_hasOwnProperty.call(type.represent, style)) _result = type.represent[style](object, style);
10780
10975
  else throw new YAMLException("!<" + type.tag + "> tag resolver accepts not \"" + style + "\" style");
@@ -10789,11 +10984,12 @@ var require_dumper = /* @__PURE__ */ __commonJSMin(((exports, module) => {
10789
10984
  state.tag = null;
10790
10985
  state.dump = object;
10791
10986
  if (!detectType(state, object, false)) detectType(state, object, true);
10792
- var type = _toString.call(state.dump);
10793
- var inblock = block;
10794
- var tagStr;
10987
+ const type = _toString.call(state.dump);
10988
+ const inblock = block;
10795
10989
  if (block) block = state.flowLevel < 0 || state.flowLevel > level;
10796
- var objectOrArray = type === "[object Object]" || type === "[object Array]", duplicateIndex, duplicate;
10990
+ const objectOrArray = type === "[object Object]" || type === "[object Array]";
10991
+ let duplicateIndex;
10992
+ let duplicate;
10797
10993
  if (objectOrArray) {
10798
10994
  duplicateIndex = state.duplicates.indexOf(object);
10799
10995
  duplicate = duplicateIndex !== -1;
@@ -10825,7 +11021,7 @@ var require_dumper = /* @__PURE__ */ __commonJSMin(((exports, module) => {
10825
11021
  throw new YAMLException("unacceptable kind of an object to dump " + type);
10826
11022
  }
10827
11023
  if (state.tag !== null && state.tag !== "?") {
10828
- tagStr = encodeURI(state.tag[0] === "!" ? state.tag.slice(1) : state.tag).replace(/!/g, "%21");
11024
+ let tagStr = encodeURI(state.tag[0] === "!" ? state.tag.slice(1) : state.tag).replace(/!/g, "%21");
10829
11025
  if (state.tag[0] === "!") tagStr = "!" + tagStr;
10830
11026
  else if (tagStr.slice(0, 18) === "tag:yaml.org,2002:") tagStr = "!!" + tagStr.slice(18);
10831
11027
  else tagStr = "!<" + tagStr + ">";
@@ -10835,32 +11031,33 @@ var require_dumper = /* @__PURE__ */ __commonJSMin(((exports, module) => {
10835
11031
  return true;
10836
11032
  }
10837
11033
  function getDuplicateReferences(object, state) {
10838
- var objects = [], duplicatesIndexes = [], index, length;
11034
+ const objects = [];
11035
+ const duplicatesIndexes = [];
10839
11036
  inspectNode(object, objects, duplicatesIndexes);
10840
- for (index = 0, length = duplicatesIndexes.length; index < length; index += 1) state.duplicates.push(objects[duplicatesIndexes[index]]);
11037
+ const length = duplicatesIndexes.length;
11038
+ for (let index = 0; index < length; index += 1) state.duplicates.push(objects[duplicatesIndexes[index]]);
10841
11039
  state.usedDuplicates = new Array(length);
10842
11040
  }
10843
11041
  function inspectNode(object, objects, duplicatesIndexes) {
10844
- var objectKeyList, index, length;
10845
11042
  if (object !== null && typeof object === "object") {
10846
- index = objects.indexOf(object);
11043
+ const index = objects.indexOf(object);
10847
11044
  if (index !== -1) {
10848
11045
  if (duplicatesIndexes.indexOf(index) === -1) duplicatesIndexes.push(index);
10849
11046
  } else {
10850
11047
  objects.push(object);
10851
- if (Array.isArray(object)) for (index = 0, length = object.length; index < length; index += 1) inspectNode(object[index], objects, duplicatesIndexes);
11048
+ if (Array.isArray(object)) for (let i = 0, length = object.length; i < length; i += 1) inspectNode(object[i], objects, duplicatesIndexes);
10852
11049
  else {
10853
- objectKeyList = Object.keys(object);
10854
- for (index = 0, length = objectKeyList.length; index < length; index += 1) inspectNode(object[objectKeyList[index]], objects, duplicatesIndexes);
11050
+ const objectKeyList = Object.keys(object);
11051
+ for (let i = 0, length = objectKeyList.length; i < length; i += 1) inspectNode(object[objectKeyList[i]], objects, duplicatesIndexes);
10855
11052
  }
10856
11053
  }
10857
11054
  }
10858
11055
  }
10859
11056
  function dump(input, options) {
10860
11057
  options = options || {};
10861
- var state = new State(options);
11058
+ const state = new State(options);
10862
11059
  if (!state.noRefs) getDuplicateReferences(input, state);
10863
- var value = input;
11060
+ let value = input;
10864
11061
  if (state.replacer) value = state.replacer.call({ "": value }, "", value);
10865
11062
  if (writeNode(state, 0, value, true, true)) return state.dump + "\n";
10866
11063
  return "";
@@ -10868,10 +11065,10 @@ var require_dumper = /* @__PURE__ */ __commonJSMin(((exports, module) => {
10868
11065
  module.exports.dump = dump;
10869
11066
  }));
10870
11067
  //#endregion
10871
- //#region ../../node_modules/.pnpm/js-yaml@4.1.1/node_modules/js-yaml/index.js
11068
+ //#region ../../node_modules/.pnpm/js-yaml@4.3.0/node_modules/js-yaml/index.js
10872
11069
  var require_js_yaml = /* @__PURE__ */ __commonJSMin(((exports, module) => {
10873
- var loader = require_loader();
10874
- var dumper = require_dumper();
11070
+ const loader = require_loader();
11071
+ const dumper = require_dumper();
10875
11072
  function renamed(from, to) {
10876
11073
  return function() {
10877
11074
  throw new Error("Function yaml." + from + " is removed in js-yaml 4. Use yaml." + to + " instead, which is now safe by default.");
@@ -11970,7 +12167,7 @@ const workspaceConfigCache = /* @__PURE__ */ new Map();
11970
12167
  /** In-flight workspace loads — concurrent jobs for the same dir share one search. */
11971
12168
  const workspaceConfigLoadPromises = /* @__PURE__ */ new Map();
11972
12169
  const deprecationWarned = /* @__PURE__ */ new Set();
11973
- function isRecord$6(value) {
12170
+ function isRecord$7(value) {
11974
12171
  return typeof value === "object" && value !== null && !Array.isArray(value);
11975
12172
  }
11976
12173
  const explorerState = {};
@@ -12049,12 +12246,12 @@ function warnOnce(key, message) {
12049
12246
  */
12050
12247
  function resolveCommandField(cfg, commandName, configPath) {
12051
12248
  const configKey = canonicalRuleConfigKey(commandName);
12052
- const commands = isRecord$6(cfg.commands) ? cfg.commands : void 0;
12249
+ const commands = isRecord$7(cfg.commands) ? cfg.commands : void 0;
12053
12250
  const fromCommands = commands?.[configKey];
12054
- if (isRecord$6(fromCommands)) return fromCommands;
12251
+ if (isRecord$7(fromCommands)) return fromCommands;
12055
12252
  for (const alias of deprecatedRuleConfigAliases(configKey)) {
12056
12253
  const fromAlias = commands?.[alias];
12057
- if (!isRecord$6(fromAlias)) continue;
12254
+ if (!isRecord$7(fromAlias)) continue;
12058
12255
  warnOnce(`${configPath ?? "unknown"}:commands.${alias}`, `[xy] Deprecated: "commands.${alias}" in ${configPath ?? "xy.config"} — use "commands.${configKey}"`);
12059
12256
  return fromAlias;
12060
12257
  }
@@ -12066,7 +12263,7 @@ function resolveCommandField(cfg, commandName, configPath) {
12066
12263
  return {};
12067
12264
  }
12068
12265
  function mergeRuleConfigs(target, source) {
12069
- if (isRecord$6(target) && isRecord$6(source)) return {
12266
+ if (isRecord$7(target) && isRecord$7(source)) return {
12070
12267
  ...target,
12071
12268
  ...source
12072
12269
  };
@@ -12150,7 +12347,7 @@ const range = (a, b, str) => {
12150
12347
  return result;
12151
12348
  };
12152
12349
  //#endregion
12153
- //#region ../../node_modules/.pnpm/brace-expansion@5.0.6/node_modules/brace-expansion/dist/esm/index.js
12350
+ //#region ../../node_modules/.pnpm/brace-expansion@5.0.7/node_modules/brace-expansion/dist/esm/index.js
12154
12351
  const escSlash = "\0SLASH" + Math.random() + "\0";
12155
12352
  const escOpen = "\0OPEN" + Math.random() + "\0";
12156
12353
  const escClose = "\0CLOSE" + Math.random() + "\0";
@@ -12218,15 +12415,18 @@ function gte(i, y) {
12218
12415
  function expand_(str, max, isTop) {
12219
12416
  /** @type {string[]} */
12220
12417
  const expansions = [];
12221
- const m = balanced("{", "}", str);
12222
- if (!m) return [str];
12223
- const pre = m.pre;
12224
- const post = m.post.length ? expand_(m.post, max, false) : [""];
12225
- if (/\$$/.test(m.pre)) for (let k = 0; k < post.length && k < max; k++) {
12226
- const expansion = pre + "{" + m.body + "}" + post[k];
12227
- expansions.push(expansion);
12228
- }
12229
- else {
12418
+ for (;;) {
12419
+ const m = balanced("{", "}", str);
12420
+ if (!m) return [str];
12421
+ const pre = m.pre;
12422
+ if (/\$$/.test(m.pre)) {
12423
+ const post = m.post.length ? expand_(m.post, max, false) : [""];
12424
+ for (let k = 0; k < post.length && k < max; k++) {
12425
+ const expansion = pre + "{" + m.body + "}" + post[k];
12426
+ expansions.push(expansion);
12427
+ }
12428
+ return expansions;
12429
+ }
12230
12430
  const isNumericSequence = /^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(m.body);
12231
12431
  const isAlphaSequence = /^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(m.body);
12232
12432
  const isSequence = isNumericSequence || isAlphaSequence;
@@ -12234,10 +12434,12 @@ function expand_(str, max, isTop) {
12234
12434
  if (!isSequence && !isOptions) {
12235
12435
  if (m.post.match(/,(?!,).*\}/)) {
12236
12436
  str = m.pre + "{" + m.body + escClose + m.post;
12237
- return expand_(str, max, true);
12437
+ isTop = true;
12438
+ continue;
12238
12439
  }
12239
12440
  return [str];
12240
12441
  }
12442
+ const post = m.post.length ? expand_(m.post, max, false) : [""];
12241
12443
  let n;
12242
12444
  if (isSequence) n = m.body.split(/\.\./);
12243
12445
  else {
@@ -12287,8 +12489,8 @@ function expand_(str, max, isTop) {
12287
12489
  const expansion = pre + N[j] + post[k];
12288
12490
  if (!isTop || isSequence || expansion) expansions.push(expansion);
12289
12491
  }
12492
+ return expansions;
12290
12493
  }
12291
- return expansions;
12292
12494
  }
12293
12495
  //#endregion
12294
12496
  //#region ../../node_modules/.pnpm/minimatch@10.2.5/node_modules/minimatch/dist/esm/assert-valid-pattern.js
@@ -20554,7 +20756,7 @@ const runStepAsync = (name, step, shouldExitOnFail = true, message) => {
20554
20756
  resolve(1);
20555
20757
  return;
20556
20758
  }
20557
- spawn(command, Array.isArray(args) ? args : args.split(" "), {
20759
+ spawn$1(command, Array.isArray(args) ? args : args.split(" "), {
20558
20760
  ...config,
20559
20761
  env: {
20560
20762
  FORCE_COLOR: "3",
@@ -21252,7 +21454,7 @@ function appendChunk(current, chunk) {
21252
21454
  }
21253
21455
  function runPackageManagerView(pm, args) {
21254
21456
  return new Promise((resolve) => {
21255
- const child = spawn(pm.command, args, {
21457
+ const child = spawn$1(pm.command, args, {
21256
21458
  cwd: INIT_CWD(),
21257
21459
  env: {
21258
21460
  FORCE_COLOR: "3",
@@ -21785,7 +21987,7 @@ const fastStringWidth = (input, options = {}) => {
21785
21987
  return getStringTruncatedWidth(input, NO_TRUNCATION, options).width;
21786
21988
  };
21787
21989
  //#endregion
21788
- //#region ../../node_modules/.pnpm/fast-wrap-ansi@0.2.0/node_modules/fast-wrap-ansi/lib/main.js
21990
+ //#region ../../node_modules/.pnpm/fast-wrap-ansi@0.2.2/node_modules/fast-wrap-ansi/lib/main.js
21789
21991
  const ESC$1 = "\x1B";
21790
21992
  const CSI = "›";
21791
21993
  const END_CODE$1 = 39;
@@ -22980,10 +23182,120 @@ async function runUpdo(pm, options = {}) {
22980
23182
  return runSteps("Updo", [pm.install(), pm.dedupe()], true);
22981
23183
  }
22982
23184
  //#endregion
23185
+ //#region src/actions/result.ts
23186
+ function actionResult({ errorCount, exitCode = errorCount, warningCount }) {
23187
+ if (errorCount === 0 && warningCount === 0 && exitCode === 0) return 0;
23188
+ return {
23189
+ envelope: {
23190
+ errorCount,
23191
+ warningCount
23192
+ },
23193
+ exitCode
23194
+ };
23195
+ }
23196
+ function resultFromExitCode(exitCode) {
23197
+ return actionResult({
23198
+ errorCount: exitCode === 0 ? 0 : Math.max(1, exitCode),
23199
+ exitCode,
23200
+ warningCount: 0
23201
+ });
23202
+ }
23203
+ function resultExitCode(result) {
23204
+ return typeof result === "number" ? result : result.exitCode;
23205
+ }
23206
+ function resultErrorCount(result) {
23207
+ if (typeof result === "number") return result === 0 ? 0 : Math.max(1, result);
23208
+ return result.envelope?.errorCount ?? (result.exitCode === 0 ? 0 : Math.max(1, result.exitCode));
23209
+ }
23210
+ function resultWarningCount(result) {
23211
+ return typeof result === "number" ? 0 : result.envelope?.warningCount ?? 0;
23212
+ }
23213
+ function isCleanResult(result) {
23214
+ return resultExitCode(result) === 0 && resultErrorCount(result) === 0 && resultWarningCount(result) === 0;
23215
+ }
23216
+ function combineResults(results) {
23217
+ const errorCount = results.reduce((sum, result) => sum + resultErrorCount(result), 0);
23218
+ const warningCount = results.reduce((sum, result) => sum + resultWarningCount(result), 0);
23219
+ return actionResult({
23220
+ errorCount,
23221
+ exitCode: results.reduce((sum, result) => sum + resultExitCode(result), 0),
23222
+ warningCount
23223
+ });
23224
+ }
23225
+ //#endregion
22983
23226
  //#region src/actions/analyze.ts
22984
- const analyze = () => {
22985
- const cli = resolvePublishedOrDevCli("source-map-explorer.mjs", () => createRequire(import.meta.url).resolve("source-map-explorer/bin/cli.js"));
22986
- return runSteps("Analyze", [[process.execPath, [cli, "build/static/js/*.ts"]]]);
23227
+ /** Dynamic import that static bundlers cannot rewrite into chunks. */
23228
+ const importUrl = (specifier) => {
23229
+ return new Function("moduleSpecifier", "return import(moduleSpecifier)")(specifier);
23230
+ };
23231
+ const loadVite = async () => {
23232
+ try {
23233
+ const viteEntry = createRequire(PATH.join(process.cwd(), "package.json")).resolve("vite");
23234
+ return await importUrl(pathToFileURL(viteEntry).href);
23235
+ } catch {
23236
+ const viteEntry = createRequire(import.meta.url).resolve("vite");
23237
+ return await importUrl(pathToFileURL(viteEntry).href);
23238
+ }
23239
+ };
23240
+ const loadBundleStats = () => {
23241
+ const mod = createRequire(import.meta.url)("rollup-plugin-bundle-stats");
23242
+ if (typeof mod === "function") return mod;
23243
+ if (typeof mod.bundleStats === "function") return mod.bundleStats;
23244
+ throw new Error("rollup-plugin-bundle-stats did not export bundleStats()");
23245
+ };
23246
+ const openPath = (filePath) => {
23247
+ const platform = process.platform;
23248
+ if (platform === "darwin") {
23249
+ spawnSync("open", [filePath], { stdio: "ignore" });
23250
+ return;
23251
+ }
23252
+ if (platform === "win32") {
23253
+ spawnSync("cmd", [
23254
+ "/c",
23255
+ "start",
23256
+ "",
23257
+ filePath
23258
+ ], { stdio: "ignore" });
23259
+ return;
23260
+ }
23261
+ spawnSync("xdg-open", [filePath], { stdio: "ignore" });
23262
+ };
23263
+ /**
23264
+ * Run a Vite production build with `rollup-plugin-bundle-stats` injected to
23265
+ * produce an HTML (and optional JSON) bundle report.
23266
+ *
23267
+ * Requires a Vite project in cwd. Uses the project's Vite when installed,
23268
+ * otherwise falls back to the toolchain's Vite.
23269
+ */
23270
+ const analyze = async (params = {}) => {
23271
+ const html = params.html !== false;
23272
+ const json = params.json === true;
23273
+ const open = params.open !== false && html;
23274
+ const mode = params.mode ?? "production";
23275
+ const outDir = params.outDir ?? "";
23276
+ const compare = params.compare !== false;
23277
+ const { build } = await loadVite();
23278
+ const bundleStats = loadBundleStats();
23279
+ await build({
23280
+ configFile: params.config,
23281
+ mode,
23282
+ plugins: [bundleStats({
23283
+ baseline: params.baseline === true,
23284
+ compare,
23285
+ html,
23286
+ json,
23287
+ outDir,
23288
+ silent: params.silent === true
23289
+ })]
23290
+ });
23291
+ if (open) {
23292
+ const reportName = PATH.join(outDir, "bundle-stats.html");
23293
+ const reportPath = ["dist", "build"].map((dir) => PATH.resolve(process.cwd(), dir, reportName)).find((candidate) => existsSync(candidate));
23294
+ if (reportPath !== void 0) try {
23295
+ openPath(reportPath);
23296
+ } catch {}
23297
+ }
23298
+ return resultFromExitCode(0);
22987
23299
  };
22988
23300
  //#endregion
22989
23301
  //#region src/actions/deplint/getRequiredPeerDependencies.ts
@@ -23645,7 +23957,7 @@ const RULE_LEVELS$2 = /* @__PURE__ */ new Set([
23645
23957
  "off",
23646
23958
  "warn"
23647
23959
  ]);
23648
- function isRecord$5(value) {
23960
+ function isRecord$6(value) {
23649
23961
  return typeof value === "object" && value !== null && !Array.isArray(value);
23650
23962
  }
23651
23963
  function isValidWeight(value) {
@@ -23662,7 +23974,7 @@ function parseTupleRuleSetting(location, setting) {
23662
23974
  if (setting.length !== 2) throw new TypeError(`${location} tuple must be [level, options]`);
23663
23975
  const [level, options] = setting;
23664
23976
  if (!isRuleLevel$5(level)) throw new TypeError(`${location} level must be "error", "warn", or "off"`);
23665
- if (!isRecord$5(options)) throw new TypeError(`${location} options must be an object`);
23977
+ if (!isRecord$6(options)) throw new TypeError(`${location} options must be an object`);
23666
23978
  return {
23667
23979
  enabled: level !== "off",
23668
23980
  level,
@@ -23695,7 +24007,7 @@ function parseRuleSetting(location, setting) {
23695
24007
  weight: parseWeight(location, setting)
23696
24008
  };
23697
24009
  if (Array.isArray(setting)) return parseTupleRuleSetting(location, setting);
23698
- if (isRecord$5(setting)) return parseObjectRuleSetting(location, setting);
24010
+ if (isRecord$6(setting)) return parseObjectRuleSetting(location, setting);
23699
24011
  throw new TypeError(`${location} must be a boolean, rule level, number, "infinite", [level, options], or { enabled?, level?, weight? } object`);
23700
24012
  }
23701
24013
  function validateRuleIds(location, rules) {
@@ -27565,47 +27877,6 @@ function clearIncrementalSnapshot(action) {
27565
27877
  rmSync(filePath, { force: true });
27566
27878
  }
27567
27879
  //#endregion
27568
- //#region src/actions/result.ts
27569
- function actionResult({ errorCount, exitCode = errorCount, warningCount }) {
27570
- if (errorCount === 0 && warningCount === 0 && exitCode === 0) return 0;
27571
- return {
27572
- envelope: {
27573
- errorCount,
27574
- warningCount
27575
- },
27576
- exitCode
27577
- };
27578
- }
27579
- function resultFromExitCode(exitCode) {
27580
- return actionResult({
27581
- errorCount: exitCode === 0 ? 0 : Math.max(1, exitCode),
27582
- exitCode,
27583
- warningCount: 0
27584
- });
27585
- }
27586
- function resultExitCode(result) {
27587
- return typeof result === "number" ? result : result.exitCode;
27588
- }
27589
- function resultErrorCount(result) {
27590
- if (typeof result === "number") return result === 0 ? 0 : Math.max(1, result);
27591
- return result.envelope?.errorCount ?? (result.exitCode === 0 ? 0 : Math.max(1, result.exitCode));
27592
- }
27593
- function resultWarningCount(result) {
27594
- return typeof result === "number" ? 0 : result.envelope?.warningCount ?? 0;
27595
- }
27596
- function isCleanResult(result) {
27597
- return resultExitCode(result) === 0 && resultErrorCount(result) === 0 && resultWarningCount(result) === 0;
27598
- }
27599
- function combineResults(results) {
27600
- const errorCount = results.reduce((sum, result) => sum + resultErrorCount(result), 0);
27601
- const warningCount = results.reduce((sum, result) => sum + resultWarningCount(result), 0);
27602
- return actionResult({
27603
- errorCount,
27604
- exitCode: results.reduce((sum, result) => sum + resultExitCode(result), 0),
27605
- warningCount
27606
- });
27607
- }
27608
- //#endregion
27609
27880
  //#region src/actions/tsc-validate/sharedValidate.ts
27610
27881
  function createSharedValidateCache() {
27611
27882
  return { sourceFiles: /* @__PURE__ */ new Map() };
@@ -28289,7 +28560,7 @@ const BUILT_IN_RULE_OPTION_KEYS = {
28289
28560
  ]),
28290
28561
  "dep.workspace.protocol": /* @__PURE__ */ new Set(["ignore", "protocol"])
28291
28562
  };
28292
- function isRecord$4(value) {
28563
+ function isRecord$5(value) {
28293
28564
  return typeof value === "object" && value !== null && !Array.isArray(value);
28294
28565
  }
28295
28566
  function isRuleLevel$4(value) {
@@ -28326,7 +28597,7 @@ function parseRuleConfig$1(ruleId, value) {
28326
28597
  const level = value[0];
28327
28598
  if (!isRuleLevel$4(level)) throw new TypeError(`${formatRuleConfigLocation$1(ruleId)} level must be one of "off", "warn", or "error"`);
28328
28599
  const options = value[1];
28329
- if (!isRecord$4(options)) throw new TypeError(`${formatRuleConfigLocation$1(ruleId)} options must be an object`);
28600
+ if (!isRecord$5(options)) throw new TypeError(`${formatRuleConfigLocation$1(ruleId)} options must be an object`);
28330
28601
  return {
28331
28602
  level,
28332
28603
  options: { ...options }
@@ -32296,7 +32567,7 @@ var LintWorkerPool = class {
32296
32567
  };
32297
32568
  delete env.NO_COLOR;
32298
32569
  delete env.NODE_DISABLE_COLORS;
32299
- const child = spawn(process.execPath, [
32570
+ const child = spawn$1(process.execPath, [
32300
32571
  "--input-type=module",
32301
32572
  "--eval",
32302
32573
  lintPoolWorkerSource
@@ -34182,7 +34453,7 @@ function formatExportPath$1(pathParts) {
34182
34453
  function ensureExportsPath$1(value) {
34183
34454
  return value.startsWith("./") ? value : `./${value}`;
34184
34455
  }
34185
- function isRecord$3(value) {
34456
+ function isRecord$4(value) {
34186
34457
  return typeof value === "object" && value !== null && !Array.isArray(value);
34187
34458
  }
34188
34459
  function normalizeTarget(target) {
@@ -34219,7 +34490,7 @@ function collectExportLeaves(value, subpath = ".", pathParts = ["exports"], cond
34219
34490
  }];
34220
34491
  }
34221
34492
  if (Array.isArray(value)) return value.flatMap((entry, index) => collectExportLeaves(entry, subpath, [...pathParts, `[${index}]`], conditionPath));
34222
- if (!isRecord$3(value)) return [];
34493
+ if (!isRecord$4(value)) return [];
34223
34494
  return Object.entries(value).flatMap(([key, nested]) => {
34224
34495
  if (isSubpathExportKey$1(key)) return collectExportLeaves(nested, key, [...pathParts, key], conditionPath);
34225
34496
  return collectExportLeaves(nested, subpath, [...pathParts, key], [...conditionPath, key]);
@@ -34317,14 +34588,14 @@ function shouldNormalizeExportsForFix(pkg) {
34317
34588
  pkg.exports = { ".": pkg.exports };
34318
34589
  return true;
34319
34590
  }
34320
- if (isRecord$3(pkg.exports) && !hasSubpathKeys(pkg.exports)) {
34591
+ if (isRecord$4(pkg.exports) && !hasSubpathKeys(pkg.exports)) {
34321
34592
  pkg.exports = { ".": pkg.exports };
34322
34593
  return true;
34323
34594
  }
34324
34595
  return false;
34325
34596
  }
34326
34597
  function isRecordObject(value) {
34327
- return isRecord$3(value);
34598
+ return isRecord$4(value);
34328
34599
  }
34329
34600
  function ensureSubpath(exports, subpath) {
34330
34601
  const existing = exports[subpath];
@@ -34868,34 +35139,386 @@ function cloneResolvedPublintRules(rules) {
34868
35139
  };
34869
35140
  }
34870
35141
  //#endregion
34871
- //#region ../../node_modules/.pnpm/@publint+pack@0.1.4/node_modules/@publint/pack/src/node/pack.js
35142
+ //#region ../../node_modules/.pnpm/tinyexec@1.2.4/node_modules/tinyexec/dist/main.mjs
35143
+ function _(e) {
35144
+ for (const t in e) {
35145
+ if (!Object.prototype.hasOwnProperty.call(e, t) || !h.test(t)) continue;
35146
+ const n = e[t];
35147
+ if (!n) return g;
35148
+ return {
35149
+ key: t,
35150
+ value: n
35151
+ };
35152
+ }
35153
+ return g;
35154
+ }
35155
+ function v(e, t) {
35156
+ const n = t.value.split(delimiter);
35157
+ const r = [];
35158
+ let o = e;
35159
+ let c;
35160
+ do {
35161
+ r.push(resolve(o, "node_modules", ".bin"));
35162
+ c = o;
35163
+ o = dirname(o);
35164
+ } while (o !== c);
35165
+ r.push(dirname(process.execPath));
35166
+ const l = r.concat(n).join(delimiter);
35167
+ return {
35168
+ key: t.key,
35169
+ value: l
35170
+ };
35171
+ }
35172
+ function y(e, t, n = true) {
35173
+ const r = {
35174
+ ...process.env,
35175
+ ...t
35176
+ };
35177
+ if (!n) return r;
35178
+ const i = v(e, _(r));
35179
+ r[i.key] = i.value;
35180
+ return r;
35181
+ }
35182
+ /**
35183
+ * Normalizes the command and arguments to work cross-platform.
35184
+ * On Windows, this basically handles things like shebangs, calling
35185
+ * `node_modules/.bin` commands, and escaping meta characters.
35186
+ * On other platforms, it just returns the command and arguments as-is.
35187
+ */
35188
+ function D(e, t = [], n = {}) {
35189
+ if (n.shell === true || !T) return {
35190
+ command: e,
35191
+ args: t,
35192
+ options: n
35193
+ };
35194
+ let i = O(e, n);
35195
+ let a = null;
35196
+ if (i !== null) {
35197
+ const e = 150;
35198
+ const t = Buffer.alloc(e);
35199
+ let n = null;
35200
+ try {
35201
+ n = openSync(i, "r");
35202
+ readSync(n, t, 0, e, 0);
35203
+ } catch {} finally {
35204
+ if (n !== null) closeSync(n);
35205
+ }
35206
+ const o = t.toString().match(S);
35207
+ if (o !== null) {
35208
+ const e = o[1].trim();
35209
+ const t = e.indexOf(" ");
35210
+ const n = t !== -1 ? e.slice(0, t) : e;
35211
+ const i = t !== -1 ? e.slice(t + 1) : "";
35212
+ const s = basename(n);
35213
+ a = s === "env" ? i || null : s;
35214
+ }
35215
+ }
35216
+ if (a !== null && i !== null) {
35217
+ t = [i, ...t];
35218
+ e = a;
35219
+ i = O(e, n);
35220
+ }
35221
+ if (i === null || !C.test(i)) {
35222
+ const r = i !== null && w.test(i);
35223
+ e = normalize(e);
35224
+ e = e.replace(x, "^$1");
35225
+ t = t.map((e) => {
35226
+ e = e.replace(/(?=(\\+?)?)\1"/g, "$1$1\\\"");
35227
+ e = e.replace(/(?=(\\+?)?)\1$/, "$1$1");
35228
+ e = `"${e}"`;
35229
+ e = e.replace(x, "^$1");
35230
+ if (r) e = e.replace(x, "^$1");
35231
+ return e;
35232
+ });
35233
+ t = [
35234
+ "/d",
35235
+ "/s",
35236
+ "/c",
35237
+ `"${[e, ...t].join(" ")}"`
35238
+ ];
35239
+ e = n.env?.comspec ?? "cmd.exe";
35240
+ n = {
35241
+ ...n,
35242
+ windowsVerbatimArguments: true
35243
+ };
35244
+ }
35245
+ return {
35246
+ command: e,
35247
+ args: t,
35248
+ options: n
35249
+ };
35250
+ }
35251
+ /**
35252
+ * Resolves the command to an absolute path if possible.
35253
+ * Handles things like traversing PATH and adding extensions from PATHEXT
35254
+ */
35255
+ function O(e, t) {
35256
+ const r = (t.cwd ?? cwd()).toString();
35257
+ const a = t.env ?? process.env;
35258
+ const o = _(a).value;
35259
+ const c = e.includes("/") || e.includes("\\") ? [""] : [r, ...o.split(delimiter)];
35260
+ const l = a.PATHEXT ? a.PATHEXT.split(delimiter) : E;
35261
+ if (e.includes(".") && l[0] !== "") l.unshift("");
35262
+ for (const t of c) {
35263
+ const n = resolve(r, t.startsWith("\"") && t.endsWith("\"") && t.length > 1 ? t.slice(1, -1) : t, e);
35264
+ for (const e of l) {
35265
+ const t = n + e;
35266
+ try {
35267
+ if (statSync(t).isFile()) return t;
35268
+ } catch {}
35269
+ }
35270
+ }
35271
+ return null;
35272
+ }
35273
+ function P(e) {
35274
+ const t = new AbortController();
35275
+ for (const n of e) {
35276
+ if (n.aborted) {
35277
+ t.abort();
35278
+ return n;
35279
+ }
35280
+ const e = () => {
35281
+ t.abort(n.reason);
35282
+ };
35283
+ n.addEventListener("abort", e, { signal: t.signal });
35284
+ }
35285
+ return t.signal;
35286
+ }
35287
+ async function F(e) {
35288
+ let t = "";
35289
+ try {
35290
+ for await (const n of e) t += n.toString();
35291
+ } catch {}
35292
+ return t;
35293
+ }
35294
+ var h, g, b, x, S, C, w, T, E, k, j, N, I, R, z;
35295
+ var init_main = __esmMin((() => {
35296
+ h = /^path$/i;
35297
+ g = {
35298
+ key: "PATH",
35299
+ value: ""
35300
+ };
35301
+ b = (e) => {
35302
+ let t = e.length;
35303
+ const n = new PassThrough();
35304
+ const r = () => {
35305
+ if (--t === 0) n.end();
35306
+ };
35307
+ for (const t of e) pipeline(t, n, { end: false }).then(r).catch(r);
35308
+ return n;
35309
+ };
35310
+ x = /([()\][%!^"`<>&|;, *?])/g;
35311
+ S = /^#!\s*(.+)/;
35312
+ C = /\.(?:com|exe)$/i;
35313
+ w = /node_modules[\\/]\.bin[\\/][^\\/]+\.cmd$/i;
35314
+ T = process.platform === "win32";
35315
+ E = [
35316
+ ".EXE",
35317
+ ".CMD",
35318
+ ".BAT",
35319
+ ".COM"
35320
+ ];
35321
+ k = class extends Error {
35322
+ result;
35323
+ output;
35324
+ get exitCode() {
35325
+ if (this.result.exitCode !== null) return this.result.exitCode;
35326
+ }
35327
+ constructor(e, t) {
35328
+ super(`Process exited with non-zero status (${e.exitCode})`);
35329
+ this.result = e;
35330
+ this.output = t;
35331
+ }
35332
+ };
35333
+ j = {
35334
+ timeout: void 0,
35335
+ persist: false
35336
+ };
35337
+ N = { windowsHide: true };
35338
+ I = class {
35339
+ _process;
35340
+ _aborted = false;
35341
+ _options;
35342
+ _command;
35343
+ _args;
35344
+ _resolveClose;
35345
+ _processClosed;
35346
+ _thrownError;
35347
+ get process() {
35348
+ return this._process;
35349
+ }
35350
+ get pid() {
35351
+ return this._process?.pid;
35352
+ }
35353
+ get exitCode() {
35354
+ if (this._process && this._process.exitCode !== null) return this._process.exitCode;
35355
+ }
35356
+ constructor(e, t, n) {
35357
+ this._options = {
35358
+ ...j,
35359
+ ...n
35360
+ };
35361
+ this._command = e;
35362
+ this._args = t ?? [];
35363
+ this._processClosed = new Promise((e) => {
35364
+ this._resolveClose = e;
35365
+ });
35366
+ }
35367
+ kill(e) {
35368
+ return this._process?.kill(e) === true;
35369
+ }
35370
+ get aborted() {
35371
+ return this._aborted;
35372
+ }
35373
+ get killed() {
35374
+ return this._process?.killed === true;
35375
+ }
35376
+ pipe(e, t, n) {
35377
+ return z(e, t, {
35378
+ ...n,
35379
+ stdin: this
35380
+ });
35381
+ }
35382
+ async *[Symbol.asyncIterator]() {
35383
+ const e = this._process;
35384
+ if (!e) return;
35385
+ const t = [];
35386
+ if (this._streamErr) t.push(this._streamErr);
35387
+ if (this._streamOut) t.push(this._streamOut);
35388
+ const n = b(t);
35389
+ const r = u.createInterface({ input: n });
35390
+ for await (const e of r) yield e.toString();
35391
+ await this._processClosed;
35392
+ e.removeAllListeners();
35393
+ if (this._thrownError) throw this._thrownError;
35394
+ if (this._options?.throwOnError && this.exitCode !== 0 && this.exitCode !== void 0) throw new k(this);
35395
+ }
35396
+ async _waitForOutput() {
35397
+ const e = this._process;
35398
+ if (!e) throw new Error("No process was started");
35399
+ const [t, n] = await Promise.all([this._streamOut ? F(this._streamOut) : "", this._streamErr ? F(this._streamErr) : ""]);
35400
+ await this._processClosed;
35401
+ const { stdin: r } = this._options;
35402
+ if (r && typeof r !== "string") await r;
35403
+ e.removeAllListeners();
35404
+ if (this._thrownError) throw this._thrownError;
35405
+ const i = {
35406
+ stderr: n,
35407
+ stdout: t,
35408
+ exitCode: this.exitCode
35409
+ };
35410
+ if (this._options.throwOnError && this.exitCode !== 0 && this.exitCode !== void 0) throw new k(this, i);
35411
+ return i;
35412
+ }
35413
+ then(e, t) {
35414
+ return this._waitForOutput().then(e, t);
35415
+ }
35416
+ _streamOut;
35417
+ _streamErr;
35418
+ spawn() {
35419
+ const t = cwd();
35420
+ const r = this._options;
35421
+ const i = {
35422
+ ...N,
35423
+ ...r.nodeOptions
35424
+ };
35425
+ const a = [];
35426
+ this._resetState();
35427
+ if (r.timeout !== void 0) a.push(AbortSignal.timeout(r.timeout));
35428
+ if (r.signal !== void 0) a.push(r.signal);
35429
+ if (r.persist === true) i.detached = true;
35430
+ if (a.length > 0) i.signal = P(a);
35431
+ i.env = y(t, i.env, r.nodePath);
35432
+ const o = D(this._command, this._args, i);
35433
+ const s = spawn(o.command, o.args, o.options);
35434
+ if (s.stderr) this._streamErr = s.stderr;
35435
+ if (s.stdout) this._streamOut = s.stdout;
35436
+ this._process = s;
35437
+ s.once("error", this._onError);
35438
+ s.once("close", this._onClose);
35439
+ if (s.stdin) {
35440
+ const { stdin: e } = r;
35441
+ if (typeof e === "string") s.stdin.end(e);
35442
+ else e?.process?.stdout?.pipe(s.stdin);
35443
+ }
35444
+ }
35445
+ _resetState() {
35446
+ this._aborted = false;
35447
+ this._processClosed = new Promise((e) => {
35448
+ this._resolveClose = e;
35449
+ });
35450
+ this._thrownError = void 0;
35451
+ }
35452
+ _onError = (e) => {
35453
+ if (e.name === "AbortError" && (!(e.cause instanceof Error) || e.cause.name !== "TimeoutError")) {
35454
+ this._aborted = true;
35455
+ return;
35456
+ }
35457
+ this._thrownError = e;
35458
+ };
35459
+ _onClose = () => {
35460
+ if (this._resolveClose) this._resolveClose();
35461
+ };
35462
+ };
35463
+ R = (e, t, n) => {
35464
+ const r = new I(e, t, n);
35465
+ r.spawn();
35466
+ return r;
35467
+ };
35468
+ z = R;
35469
+ }));
35470
+ //#endregion
35471
+ //#region ../../node_modules/.pnpm/@publint+pack@0.1.5/node_modules/@publint/pack/src/node/utils.js
35472
+ /**
35473
+ * @param {string} packageManager
35474
+ * @returns {string[]}
35475
+ */
35476
+ function resolvePackageManagerCommand(packageManager) {
35477
+ if (![
35478
+ "npm",
35479
+ "yarn",
35480
+ "pnpm",
35481
+ "bun"
35482
+ ].includes(packageManager)) throw new Error(`Unsupported package manager: ${packageManager}`);
35483
+ const command = [packageManager];
35484
+ if (packageManager === "bun") command.push("pm");
35485
+ return command;
35486
+ }
35487
+ async function getTempPackDir() {
35488
+ const tempDir = os.tmpdir() + PATH.sep;
35489
+ const tempPackDir = await fs$1.mkdtemp(tempDir + "publint-pack-");
35490
+ return await fs$1.realpath(tempPackDir);
35491
+ }
35492
+ var init_utils$2 = __esmMin((() => {}));
35493
+ //#endregion
35494
+ //#region ../../node_modules/.pnpm/@publint+pack@0.1.5/node_modules/@publint/pack/src/node/pack.js
34872
35495
  /** @type {import('../index.d.ts').pack} */
34873
35496
  async function pack(dir, opts) {
34874
35497
  const packageManager = opts?.packageManager ?? "npm";
34875
- let command = `${packageManager} pack`;
34876
- if (packageManager === "bun") command = command.replace("bun", "bun pm");
35498
+ const command = resolvePackageManagerCommand(packageManager);
35499
+ command.push("pack");
34877
35500
  const packDestination = opts?.destination ?? dir;
34878
35501
  if (opts?.destination) switch (packageManager) {
34879
35502
  case "yarn":
34880
- command += ` --out \"${PATH.join(packDestination, "package.tgz")}\"`;
35503
+ command.push("--out", PATH.join(packDestination, "package.tgz"));
34881
35504
  break;
34882
35505
  case "bun":
34883
- command += ` --destination \"${packDestination}\"`;
35506
+ command.push("--destination", packDestination);
34884
35507
  break;
34885
35508
  default:
34886
- command += ` --pack-destination \"${packDestination}\"`;
35509
+ command.push("--pack-destination", packDestination);
34887
35510
  break;
34888
35511
  }
34889
35512
  if (opts?.ignoreScripts) switch (packageManager) {
34890
35513
  case "pnpm":
34891
- command += " --config.ignore-scripts=true";
35514
+ command.push("--config.ignore-scripts=true");
34892
35515
  break;
34893
35516
  case "yarn": break;
34894
35517
  default:
34895
- command += " --ignore-scripts";
35518
+ command.push("--ignore-scripts");
34896
35519
  break;
34897
35520
  }
34898
- const output = await util.promisify(cp.exec)(command, { cwd: dir });
35521
+ const output = await z(command[0], command.slice(1), { nodeOptions: { cwd: dir } });
34899
35522
  const tarballFile = await fs$1.readdir(packDestination).then((files) => {
34900
35523
  return files.find((file) => file.endsWith(".tgz") && output.stdout.includes(file));
34901
35524
  });
@@ -34903,40 +35526,36 @@ async function pack(dir, opts) {
34903
35526
  else throw new Error(`Failed to find packed tarball file in ${packDestination}. Command output:\n${JSON.stringify(output, null, 2)}`);
34904
35527
  return PATH.join(packDestination, tarballFile);
34905
35528
  }
34906
- var init_pack = __esmMin((() => {}));
34907
- //#endregion
34908
- //#region ../../node_modules/.pnpm/@publint+pack@0.1.4/node_modules/@publint/pack/src/node/utils.js
34909
- async function getTempPackDir() {
34910
- const tempDir = os.tmpdir() + PATH.sep;
34911
- const tempPackDir = await fs$1.mkdtemp(tempDir + "publint-pack-");
34912
- return await fs$1.realpath(tempPackDir);
34913
- }
34914
- var init_utils$2 = __esmMin((() => {}));
35529
+ var init_pack = __esmMin((() => {
35530
+ init_main();
35531
+ init_utils$2();
35532
+ }));
34915
35533
  //#endregion
34916
- //#region ../../node_modules/.pnpm/@publint+pack@0.1.4/node_modules/@publint/pack/src/node/pack-as-json.js
35534
+ //#region ../../node_modules/.pnpm/@publint+pack@0.1.5/node_modules/@publint/pack/src/node/pack-as-json.js
34917
35535
  /** @type {import('../index.d.ts').packAsJson} */
34918
35536
  async function packAsJson(dir, opts) {
34919
35537
  const packageManager = opts?.packageManager ?? "npm";
34920
35538
  if (packageManager === "bun") throw new Error("`packAsJson` is not supported for `bun`");
34921
- let command = `${packageManager} pack --json`;
35539
+ const command = resolvePackageManagerCommand(packageManager);
35540
+ command.push("pack", "--json");
34922
35541
  const supportsDryRun = packageManager === "npm" || packageManager === "yarn";
34923
35542
  /** @type {string | undefined} */
34924
35543
  let packDestination;
34925
- if (supportsDryRun) command += " --dry-run";
35544
+ if (supportsDryRun) command.push("--dry-run");
34926
35545
  else {
34927
35546
  packDestination = await getTempPackDir();
34928
- command += ` --pack-destination ${packDestination}`;
35547
+ command.push("--pack-destination", packDestination);
34929
35548
  }
34930
35549
  if (opts?.ignoreScripts) switch (packageManager) {
34931
35550
  case "pnpm":
34932
- command += " --config.ignore-scripts=true";
35551
+ command.push("--config.ignore-scripts=true");
34933
35552
  break;
34934
35553
  case "yarn": break;
34935
35554
  default:
34936
- command += " --ignore-scripts";
35555
+ command.push("--ignore-scripts");
34937
35556
  break;
34938
35557
  }
34939
- let { stdout } = await util.promisify(cp.exec)(command, { cwd: dir });
35558
+ let { stdout } = await z(command[0], command.slice(1), { nodeOptions: { cwd: dir } });
34940
35559
  try {
34941
35560
  stdout = stdout.trim();
34942
35561
  if (packageManager === "pnpm") stdout = fixPnpmStdout(stdout);
@@ -34969,10 +35588,11 @@ function fixYarnStdout(stdout) {
34969
35588
  return fixedStdout;
34970
35589
  }
34971
35590
  var init_pack_as_json = __esmMin((() => {
35591
+ init_main();
34972
35592
  init_utils$2();
34973
35593
  }));
34974
35594
  //#endregion
34975
- //#region ../../node_modules/.pnpm/@publint+pack@0.1.4/node_modules/@publint/pack/src/shared/buffer-stream.js
35595
+ //#region ../../node_modules/.pnpm/@publint+pack@0.1.5/node_modules/@publint/pack/src/shared/buffer-stream.js
34976
35596
  /**
34977
35597
  * @param {ReadableStream<Uint8Array>} readableStream
34978
35598
  * @returns {Promise<ArrayBuffer>}
@@ -34982,7 +35602,7 @@ async function readableStreamToArrayBuffer(readableStream) {
34982
35602
  }
34983
35603
  var init_buffer_stream = __esmMin((() => {}));
34984
35604
  //#endregion
34985
- //#region ../../node_modules/.pnpm/@publint+pack@0.1.4/node_modules/@publint/pack/src/shared/parse-tar.js
35605
+ //#region ../../node_modules/.pnpm/@publint+pack@0.1.5/node_modules/@publint/pack/src/shared/parse-tar.js
34986
35606
  /**
34987
35607
  * @param {ArrayBuffer} buffer
34988
35608
  * @returns {import('../index.d.ts').TarballFile[]}
@@ -35026,7 +35646,7 @@ function getFilesRootDir(files) {
35026
35646
  }
35027
35647
  var init_parse_tar = __esmMin((() => {}));
35028
35648
  //#endregion
35029
- //#region ../../node_modules/.pnpm/@publint+pack@0.1.4/node_modules/@publint/pack/src/node/unpack.js
35649
+ //#region ../../node_modules/.pnpm/@publint+pack@0.1.5/node_modules/@publint/pack/src/node/unpack.js
35030
35650
  /** @type {import('../index.d.ts').unpack} */
35031
35651
  async function unpack(tarball) {
35032
35652
  /** @type {ArrayBuffer} */
@@ -35047,7 +35667,7 @@ var init_unpack = __esmMin((() => {
35047
35667
  init_parse_tar();
35048
35668
  }));
35049
35669
  //#endregion
35050
- //#region ../../node_modules/.pnpm/@publint+pack@0.1.4/node_modules/@publint/pack/src/node/pack-as-list.js
35670
+ //#region ../../node_modules/.pnpm/@publint+pack@0.1.5/node_modules/@publint/pack/src/node/pack-as-list.js
35051
35671
  /** @type {import('../index.d.ts').packAsList} */
35052
35672
  async function packAsList(dir, opts) {
35053
35673
  const packageManager = opts?.packageManager ?? "npm";
@@ -35130,7 +35750,7 @@ var init_pack_as_list = __esmMin((() => {
35130
35750
  init_utils$2();
35131
35751
  }));
35132
35752
  //#endregion
35133
- //#region ../../node_modules/.pnpm/@publint+pack@0.1.4/node_modules/@publint/pack/src/node/get-pack-directory.js
35753
+ //#region ../../node_modules/.pnpm/@publint+pack@0.1.5/node_modules/@publint/pack/src/node/get-pack-directory.js
35134
35754
  /** @type {import('../index.d.ts').getPackDirectory} */
35135
35755
  async function getPackDirectory(dir, packageManager) {
35136
35756
  if (packageManager === "pnpm") try {
@@ -35142,7 +35762,7 @@ async function getPackDirectory(dir, packageManager) {
35142
35762
  }
35143
35763
  var init_get_pack_directory = __esmMin((() => {}));
35144
35764
  //#endregion
35145
- //#region ../../node_modules/.pnpm/@publint+pack@0.1.4/node_modules/@publint/pack/src/index-node.js
35765
+ //#region ../../node_modules/.pnpm/@publint+pack@0.1.5/node_modules/@publint/pack/src/index-node.js
35146
35766
  var init_index_node$1 = __esmMin((() => {
35147
35767
  init_pack();
35148
35768
  init_pack_as_list();
@@ -36550,7 +37170,7 @@ function createTarballVfs(files) {
36550
37170
  }
36551
37171
  var init_vfs_tarball = __esmMin((() => {}));
36552
37172
  //#endregion
36553
- //#region ../../node_modules/.pnpm/package-manager-detector@1.6.0/node_modules/package-manager-detector/dist/constants.mjs
37173
+ //#region ../../node_modules/.pnpm/package-manager-detector@1.7.0/node_modules/package-manager-detector/dist/constants.mjs
36554
37174
  var AGENTS, LOCKS, INSTALL_METADATA;
36555
37175
  var init_constants = __esmMin((() => {
36556
37176
  AGENTS = [
@@ -36560,9 +37180,13 @@ var init_constants = __esmMin((() => {
36560
37180
  "pnpm",
36561
37181
  "pnpm@6",
36562
37182
  "bun",
36563
- "deno"
37183
+ "deno",
37184
+ "nub",
37185
+ "aube"
36564
37186
  ];
36565
37187
  LOCKS = {
37188
+ "aube-lock.yaml": "aube",
37189
+ "aube-workspace.yaml": "aube",
36566
37190
  "bun.lock": "bun",
36567
37191
  "bun.lockb": "bun",
36568
37192
  "deno.lock": "deno",
@@ -36573,6 +37197,7 @@ var init_constants = __esmMin((() => {
36573
37197
  "npm-shrinkwrap.json": "npm"
36574
37198
  };
36575
37199
  INSTALL_METADATA = {
37200
+ "node_modules/.aube/": "aube",
36576
37201
  "node_modules/.deno/": "deno",
36577
37202
  "node_modules/.pnpm/": "pnpm",
36578
37203
  "node_modules/.yarn-state.yml": "yarn",
@@ -36585,7 +37210,7 @@ var init_constants = __esmMin((() => {
36585
37210
  };
36586
37211
  }));
36587
37212
  //#endregion
36588
- //#region ../../node_modules/.pnpm/package-manager-detector@1.6.0/node_modules/package-manager-detector/dist/detect.mjs
37213
+ //#region ../../node_modules/.pnpm/package-manager-detector@1.7.0/node_modules/package-manager-detector/dist/detect.mjs
36589
37214
  var detect_exports = /* @__PURE__ */ __exportAll({
36590
37215
  detect: () => detect,
36591
37216
  getUserAgent: () => getUserAgent
@@ -39173,7 +39798,7 @@ const VALID_RULE_LEVELS = /* @__PURE__ */ new Set([
39173
39798
  "warn",
39174
39799
  "error"
39175
39800
  ]);
39176
- function isRecord$2(value) {
39801
+ function isRecord$3(value) {
39177
39802
  return typeof value === "object" && value !== null && !Array.isArray(value);
39178
39803
  }
39179
39804
  function isRuleLevel$1(value) {
@@ -39198,13 +39823,13 @@ function parseRuleConfig(ruleId, value) {
39198
39823
  const level = value[0];
39199
39824
  if (!isRuleLevel$1(level)) throw new TypeError(`${formatRuleConfigLocation(ruleId)} level must be one of "off", "warn", or "error"`);
39200
39825
  const options = value[1];
39201
- if (!isRecord$2(options)) throw new TypeError(`${formatRuleConfigLocation(ruleId)} options must be an object`);
39826
+ if (!isRecord$3(options)) throw new TypeError(`${formatRuleConfigLocation(ruleId)} options must be an object`);
39202
39827
  return {
39203
39828
  level,
39204
39829
  options: { ...options }
39205
39830
  };
39206
39831
  }
39207
- if (isRecord$2(value)) return {
39832
+ if (isRecord$3(value)) return {
39208
39833
  level: "warn",
39209
39834
  options: { ...value }
39210
39835
  };
@@ -41486,12 +42111,12 @@ function checkPnpmReleaseAgeExcludes(cwd, pm, workspaces = []) {
41486
42111
  for (const pattern of unnecessary) result.fixable.push(`pnpm-workspace.yaml minimumReleaseAgeExclude includes '${pattern}' but the repo does not use that scope`);
41487
42112
  return result;
41488
42113
  }
41489
- function isRecord$1(value) {
42114
+ function isRecord$2(value) {
41490
42115
  return typeof value === "object" && value !== null && !Array.isArray(value);
41491
42116
  }
41492
42117
  function isConfiguredValue(value) {
41493
42118
  if (value === void 0 || value === null) return false;
41494
- if (isRecord$1(value)) return Object.keys(value).length > 0;
42119
+ if (isRecord$2(value)) return Object.keys(value).length > 0;
41495
42120
  if (Array.isArray(value)) return value.length > 0;
41496
42121
  return value !== "";
41497
42122
  }
@@ -41519,8 +42144,8 @@ function formatOverrideWarning(location, keys) {
41519
42144
  function checkPnpmDependencyOverrides(cwd, pm, rootPkg) {
41520
42145
  const result = emptyResult$2();
41521
42146
  if (pm !== "pnpm") return result;
41522
- const packageJsonOverrides = (isRecord$1(rootPkg.pnpm) ? rootPkg.pnpm : void 0)?.overrides;
41523
- if (isConfiguredValue(packageJsonOverrides)) result.warnings.push(formatOverrideWarning("Root package.json pnpm.overrides field", isRecord$1(packageJsonOverrides) ? Object.keys(packageJsonOverrides) : []));
42147
+ const packageJsonOverrides = (isRecord$2(rootPkg.pnpm) ? rootPkg.pnpm : void 0)?.overrides;
42148
+ if (isConfiguredValue(packageJsonOverrides)) result.warnings.push(formatOverrideWarning("Root package.json pnpm.overrides field", isRecord$2(packageJsonOverrides) ? Object.keys(packageJsonOverrides) : []));
41524
42149
  const workspaceOverrides = readPnpmWorkspaceDocument(cwd)?.get("overrides");
41525
42150
  if (isConfiguredYamlNode(workspaceOverrides)) result.warnings.push(formatOverrideWarning("pnpm-workspace.yaml overrides field", configuredYamlKeys(workspaceOverrides)));
41526
42151
  return result;
@@ -49386,26 +50011,26 @@ function sortRules(rules) {
49386
50011
  return command === 0 ? left.id.localeCompare(right.id) : command;
49387
50012
  });
49388
50013
  }
49389
- function maxWidth(header, values, max = Infinity) {
50014
+ function maxWidth$1(header, values, max = Infinity) {
49390
50015
  return Math.min(max, Math.max(header.length, ...values.map((value) => value.length)));
49391
50016
  }
49392
- function resolveTableWidth() {
50017
+ function resolveTableWidth$1() {
49393
50018
  const columns = process.stdout.isTTY ? process.stdout.columns : void 0;
49394
50019
  return Math.max(72, Math.min(columns ?? 120, 160) - 2);
49395
50020
  }
49396
50021
  function resolveRuleTableWidths(rows, hasWeight) {
49397
50022
  const columnCount = hasWeight ? 5 : 4;
49398
50023
  const tableChromeWidth = columnCount + 1 + columnCount * 2;
49399
- const level = maxWidth("Level", rows.map((row) => row.level));
49400
- const fix = maxWidth("Fix", rows.map((row) => row.fix));
49401
- const weight = hasWeight ? maxWidth("Weight", rows.map((row) => row.weight), 12) : void 0;
49402
- let id = maxWidth("Rule", rows.map((row) => row.id), 56);
50024
+ const level = maxWidth$1("Level", rows.map((row) => row.level));
50025
+ const fix = maxWidth$1("Fix", rows.map((row) => row.fix));
50026
+ const weight = hasWeight ? maxWidth$1("Weight", rows.map((row) => row.weight), 12) : void 0;
50027
+ let id = maxWidth$1("Rule", rows.map((row) => row.id), 56);
49403
50028
  const fixedWidth = () => tableChromeWidth + level + fix + id + (weight ?? 0);
49404
50029
  const minimumDescription = 28;
49405
- const tableWidth = resolveTableWidth();
50030
+ const tableWidth = resolveTableWidth$1();
49406
50031
  if (tableWidth - fixedWidth() < minimumDescription) id = Math.max(24, id - (minimumDescription - (tableWidth - fixedWidth())));
49407
50032
  const availableDescription = Math.max(20, tableWidth - fixedWidth());
49408
- const naturalDescription = maxWidth("Description", rows.map((row) => row.description), 72);
50033
+ const naturalDescription = maxWidth$1("Description", rows.map((row) => row.description), 72);
49409
50034
  return {
49410
50035
  description: Math.min(naturalDescription, availableDescription),
49411
50036
  fix,
@@ -49593,7 +50218,7 @@ const runSkills = async (args, options = {}) => {
49593
50218
  "pipe"
49594
50219
  ];
49595
50220
  return new Promise((resolve) => {
49596
- const child = spawn(invocation.command, invocation.args, {
50221
+ const child = spawn$1(invocation.command, invocation.args, {
49597
50222
  env: {
49598
50223
  FORCE_COLOR: "3",
49599
50224
  ...process.env
@@ -50567,7 +51192,7 @@ const defaultWorkConfig = () => ({
50567
51192
  idPrefix: "XYW",
50568
51193
  priority: { formula: DEFAULT_PRIORITY_FORMULA },
50569
51194
  stores: {
50570
- github: { enabled: false },
51195
+ github: { enabled: true },
50571
51196
  inline: {
50572
51197
  enabled: true,
50573
51198
  marker: "xy-work"
@@ -50579,7 +51204,7 @@ const defaultWorkConfig = () => ({
50579
51204
  },
50580
51205
  version: 1
50581
51206
  });
50582
- const isRecord = (value) => {
51207
+ const isRecord$1 = (value) => {
50583
51208
  return typeof value === "object" && value !== null && !Array.isArray(value);
50584
51209
  };
50585
51210
  const isStringArray = (value) => {
@@ -50606,7 +51231,7 @@ const parseStringArray = (value, label) => {
50606
51231
  return value;
50607
51232
  };
50608
51233
  const parseRecord = (value, label) => {
50609
- if (!isRecord(value)) throw new TypeError(`${label} must be an object`);
51234
+ if (!isRecord$1(value)) throw new TypeError(`${label} must be an object`);
50610
51235
  return value;
50611
51236
  };
50612
51237
  const isWorkType = (value) => {
@@ -50870,7 +51495,101 @@ const priorityFromPartial = (partial) => {
50870
51495
  };
50871
51496
  };
50872
51497
  //#endregion
50873
- //#region src/actions/work/index.ts
51498
+ //#region src/actions/work/render.ts
51499
+ const maxWidth = (headerLabel, values, max = Infinity) => {
51500
+ return Math.min(max, Math.max(headerLabel.length, ...values.map((value) => value.length)));
51501
+ };
51502
+ const resolveTableWidth = () => {
51503
+ const columns = process.stdout.isTTY ? process.stdout.columns : void 0;
51504
+ return Math.max(72, Math.min(columns ?? 120, 160) - 2);
51505
+ };
51506
+ const resolveWorkTableWidths = (rows) => {
51507
+ const tableChromeWidth = 19;
51508
+ const id = maxWidth("ID", rows.map((row) => row.id), 28);
51509
+ const status = maxWidth("Status", rows.map((row) => row.status), 12);
51510
+ const type = maxWidth("Type", rows.map((row) => row.type), 12);
51511
+ const score = maxWidth("Score", rows.map((row) => row.score), 8);
51512
+ const area = maxWidth("Area", rows.map((row) => row.area), 20);
51513
+ const fixedWidth = tableChromeWidth + id + status + type + score + area;
51514
+ const availableTitle = Math.max(20, resolveTableWidth() - fixedWidth);
51515
+ const naturalTitle = maxWidth("Title", rows.map((row) => row.title), 72);
51516
+ return {
51517
+ area,
51518
+ id,
51519
+ score,
51520
+ status,
51521
+ title: Math.min(naturalTitle, availableTitle),
51522
+ type
51523
+ };
51524
+ };
51525
+ const workTableConfig = (widths) => ({
51526
+ border: (0, import_src.getBorderCharacters)("norc"),
51527
+ columnDefault: {
51528
+ paddingLeft: 1,
51529
+ paddingRight: 1,
51530
+ wrapWord: true
51531
+ },
51532
+ columns: {
51533
+ 0: { width: widths.id },
51534
+ 1: { width: widths.status },
51535
+ 2: { width: widths.type },
51536
+ 3: {
51537
+ alignment: "right",
51538
+ width: widths.score
51539
+ },
51540
+ 4: { width: widths.area },
51541
+ 5: { width: widths.title }
51542
+ },
51543
+ drawHorizontalLine: (index, size) => [
51544
+ 0,
51545
+ 1,
51546
+ size
51547
+ ].includes(index)
51548
+ });
51549
+ const toRow = (item, formula) => {
51550
+ const score = calculatePriorityScore(item.priority, formula);
51551
+ return {
51552
+ area: item.area ?? "-",
51553
+ id: item.id,
51554
+ score: score === void 0 ? "-" : String(score),
51555
+ status: item.status,
51556
+ title: item.title,
51557
+ type: item.type
51558
+ };
51559
+ };
51560
+ const formatWorkTable = (items, formula) => {
51561
+ const rows = items.map((item) => toRow(item, formula));
51562
+ const widths = resolveWorkTableWidths(rows);
51563
+ return (0, import_src.table)([[
51564
+ chalk.gray.bold("ID"),
51565
+ chalk.gray.bold("Status"),
51566
+ chalk.gray.bold("Type"),
51567
+ chalk.gray.bold("Score"),
51568
+ chalk.gray.bold("Area"),
51569
+ chalk.gray.bold("Title")
51570
+ ], ...rows.map((row) => [
51571
+ chalk.cyan(row.id),
51572
+ chalk.white(row.status),
51573
+ chalk.white(row.type),
51574
+ chalk.gray(row.score),
51575
+ chalk.gray(row.area),
51576
+ chalk.white(row.title)
51577
+ ])], workTableConfig(widths)).trimEnd();
51578
+ };
51579
+ const printWorkItemsTable = (items, formula) => {
51580
+ if (isJsonMode()) return;
51581
+ if (items.length === 0) {
51582
+ xyLog("No work items");
51583
+ return;
51584
+ }
51585
+ xyLog(formatWorkTable(items, formula));
51586
+ };
51587
+ const printWorkItemSummary = (item, score) => {
51588
+ const scoreText = score === void 0 ? "-" : String(score);
51589
+ xyLog(`${item.id}\t${item.status}\t${item.type}\t${scoreText}\t${item.title}`);
51590
+ };
51591
+ //#endregion
51592
+ //#region src/actions/work/result.ts
50874
51593
  const cleanResult = (data) => {
50875
51594
  return {
50876
51595
  envelope: {
@@ -50883,10 +51602,522 @@ const cleanResult = (data) => {
50883
51602
  };
50884
51603
  };
50885
51604
  const nowIso = (now = /* @__PURE__ */ new Date()) => now.toISOString();
50886
- const printItemSummary = (item, score) => {
50887
- const scoreText = score === void 0 ? "-" : String(score);
50888
- xyLog(`${item.id}\t${item.status}\t${item.type}\t${scoreText}\t${item.title}`);
51605
+ //#endregion
51606
+ //#region src/actions/work/github.ts
51607
+ /** Label applied to every GitHub issue created by `xy work`. */
51608
+ const XY_WORK_GITHUB_LABEL = "xy-work";
51609
+ /** HTML comment marker embedded in issue bodies so we can recognize our issues. */
51610
+ const XY_WORK_GITHUB_BODY_MARKER_PREFIX = "<!-- xy-work:";
51611
+ const defaultGithubWorkRunner = (args, options = {}) => {
51612
+ const result = spawnSync("gh", args, {
51613
+ cwd: options.cwd,
51614
+ encoding: "utf8",
51615
+ env: process.env,
51616
+ stdio: [
51617
+ "ignore",
51618
+ "pipe",
51619
+ "pipe"
51620
+ ]
51621
+ });
51622
+ return {
51623
+ status: result.status,
51624
+ stderr: typeof result.stderr === "string" ? result.stderr : "",
51625
+ stdout: typeof result.stdout === "string" ? result.stdout : ""
51626
+ };
51627
+ };
51628
+ const isRecord = (value) => {
51629
+ return typeof value === "object" && value !== null && !Array.isArray(value);
51630
+ };
51631
+ const runOrThrow = (runner, args, cwd, context) => {
51632
+ const result = runner(args, { cwd });
51633
+ if (result.status !== 0) {
51634
+ const detail = result.stderr.trim() || result.stdout.trim() || `exit ${String(result.status)}`;
51635
+ throw new Error(`${context}: ${detail}`);
51636
+ }
51637
+ return result.stdout;
51638
+ };
51639
+ const parseIssueUrl = (url) => {
51640
+ const match = url.trim().match(/\/issues\/(\d+)\s*$/);
51641
+ if (match === null) throw new Error(`Could not parse GitHub issue number from: ${url.trim()}`);
51642
+ return {
51643
+ number: Number(match[1]),
51644
+ url: url.trim()
51645
+ };
51646
+ };
51647
+ const formatXyWorkBodyMarker = (id) => {
51648
+ return `${XY_WORK_GITHUB_BODY_MARKER_PREFIX} ${id} -->`;
51649
+ };
51650
+ const isXyWorkGithubIssue = (issue) => {
51651
+ if (issue.labels.includes("xy-work")) return true;
51652
+ return issue.body.includes(XY_WORK_GITHUB_BODY_MARKER_PREFIX);
51653
+ };
51654
+ /** Extract the local work id embedded in a GitHub issue body created by `xy work`. */
51655
+ const parseXyWorkIdFromGithubBody = (body) => {
51656
+ const marker = body.match(/<!--\s*xy-work:\s*([A-Z0-9][A-Z0-9-]*)\s*-->/i);
51657
+ if (marker?.[1] !== void 0) return marker[1].toUpperCase();
51658
+ const metadata = body.match(/\*\*xy work id\*\*:\s*`([A-Z0-9][A-Z0-9-]*)`/i);
51659
+ if (metadata?.[1] !== void 0) return metadata[1].toUpperCase();
51660
+ };
51661
+ const githubIssueIsOpen = (issue) => {
51662
+ return issue.state.toUpperCase() === "OPEN";
51663
+ };
51664
+ const readGithubStoreNumber = (stores) => {
51665
+ const value = stores.github;
51666
+ if (!isRecord(value)) return void 0;
51667
+ if (typeof value.number !== "number" || !Number.isSafeInteger(value.number) || value.number < 1) return;
51668
+ return value.number;
51669
+ };
51670
+ const readGithubStoreUrl = (stores) => {
51671
+ const value = stores.github;
51672
+ if (!isRecord(value) || typeof value.url !== "string" || value.url.length === 0) return void 0;
51673
+ return value.url;
51674
+ };
51675
+ const formatGithubWorkIssueBody = (item) => {
51676
+ const sections = [];
51677
+ if (item.description.trim().length > 0) sections.push(item.description.trim());
51678
+ if (item.acceptanceCriteria.length > 0) sections.push(["## Acceptance Criteria", ...item.acceptanceCriteria.map((criterion) => `- ${criterion}`)].join("\n"));
51679
+ if (item.verification.length > 0) sections.push(["## Verification", ...item.verification.map((entry) => `- ${entry}`)].join("\n"));
51680
+ const metadataLines = [`- **xy work id**: \`${item.id}\``, `- **type**: ${item.type}`];
51681
+ if (item.area !== void 0) metadataLines.push(`- **area**: ${item.area}`);
51682
+ if (item.tags.length > 0) metadataLines.push(`- **tags**: ${item.tags.join(", ")}`);
51683
+ if (item.anchors.length > 0) {
51684
+ const anchors = item.anchors.map((anchor) => anchor.line === void 0 ? anchor.path : `${anchor.path}:${String(anchor.line)}`).join(", ");
51685
+ metadataLines.push(`- **anchors**: ${anchors}`);
51686
+ }
51687
+ sections.push(["## xy work metadata", ...metadataLines].join("\n"), [
51688
+ "---",
51689
+ formatXyWorkBodyMarker(item.id),
51690
+ "*Created by the `xy work` tool.*"
51691
+ ].join("\n"));
51692
+ return sections.join("\n\n");
51693
+ };
51694
+ const TYPE_LABEL_MAP = [
51695
+ ["bug", "bug"],
51696
+ ["type:bug", "bug"],
51697
+ ["feature", "feature"],
51698
+ ["enhancement", "feature"],
51699
+ ["type:feature", "feature"],
51700
+ ["todo", "todo"],
51701
+ ["type:todo", "todo"],
51702
+ ["debt", "debt"],
51703
+ ["tech-debt", "debt"],
51704
+ ["type:debt", "debt"],
51705
+ ["idea", "idea"],
51706
+ ["type:idea", "idea"],
51707
+ ["research", "research"],
51708
+ ["type:research", "research"],
51709
+ ["question", "question"],
51710
+ ["type:question", "question"],
51711
+ ["risk", "risk"],
51712
+ ["type:risk", "risk"]
51713
+ ];
51714
+ const inferWorkTypeFromGithubLabels = (labels) => {
51715
+ const normalized = new Set(labels.map((label) => label.trim().toLowerCase()));
51716
+ for (const [label, type] of TYPE_LABEL_MAP) if (normalized.has(label)) return type;
51717
+ return "todo";
51718
+ };
51719
+ const githubWorkItemId = (issueNumber) => {
51720
+ return `GH-${String(issueNumber)}`;
51721
+ };
51722
+ const normalizeGithubIssueToWorkItem = (issue) => {
51723
+ const status = issue.state.toUpperCase() === "OPEN" ? "open" : "done";
51724
+ const createdAt = issue.createdAt;
51725
+ const updatedAt = issue.updatedAt;
51726
+ const tags = issue.labels.filter((label) => label !== XY_WORK_GITHUB_LABEL).map((label) => label.trim()).filter((label) => label.length > 0).toSorted();
51727
+ return {
51728
+ acceptanceCriteria: [],
51729
+ anchors: [],
51730
+ createdAt,
51731
+ description: issue.body.trim(),
51732
+ id: githubWorkItemId(issue.number),
51733
+ status,
51734
+ stores: { github: {
51735
+ createdByXyWork: false,
51736
+ number: issue.number,
51737
+ source: "github",
51738
+ url: issue.url
51739
+ } },
51740
+ tags,
51741
+ title: issue.title,
51742
+ type: inferWorkTypeFromGithubLabels(issue.labels),
51743
+ updatedAt,
51744
+ verification: []
51745
+ };
51746
+ };
51747
+ const ensureXyWorkLabel = (runner, cwd) => {
51748
+ const list = runner([
51749
+ "label",
51750
+ "list",
51751
+ "--json",
51752
+ "name",
51753
+ "--limit",
51754
+ "1000"
51755
+ ], { cwd });
51756
+ if (list.status === 0) try {
51757
+ const labels = JSON.parse(list.stdout);
51758
+ if (Array.isArray(labels) && labels.some((entry) => isRecord(entry) && entry.name === "xy-work")) return;
51759
+ } catch {}
51760
+ runner([
51761
+ "label",
51762
+ "create",
51763
+ XY_WORK_GITHUB_LABEL,
51764
+ "--color",
51765
+ "0E8A16",
51766
+ "--description",
51767
+ "Created by the xy work tool"
51768
+ ], { cwd });
51769
+ };
51770
+ const EPOCH_ISO = "1970-01-01T00:00:00.000Z";
51771
+ const parseIssueList = (stdout) => {
51772
+ const parsed = JSON.parse(stdout);
51773
+ if (!Array.isArray(parsed)) throw new TypeError("gh issue list returned non-array JSON");
51774
+ return parsed.map((entry) => {
51775
+ if (!isRecord(entry)) throw new TypeError("gh issue list entry must be an object");
51776
+ const labelsRaw = entry.labels;
51777
+ const labels = Array.isArray(labelsRaw) ? labelsRaw.map((label) => {
51778
+ if (typeof label === "string") return label;
51779
+ if (isRecord(label) && typeof label.name === "string") return label.name;
51780
+ return "";
51781
+ }).filter((label) => label.length > 0) : [];
51782
+ return {
51783
+ body: typeof entry.body === "string" ? entry.body : "",
51784
+ createdAt: typeof entry.createdAt === "string" ? entry.createdAt : EPOCH_ISO,
51785
+ labels,
51786
+ number: typeof entry.number === "number" ? entry.number : Number(entry.number),
51787
+ state: typeof entry.state === "string" ? entry.state : "OPEN",
51788
+ title: typeof entry.title === "string" ? entry.title : "",
51789
+ updatedAt: typeof entry.updatedAt === "string" ? entry.updatedAt : EPOCH_ISO,
51790
+ url: typeof entry.url === "string" ? entry.url : ""
51791
+ };
51792
+ }).filter((issue) => Number.isSafeInteger(issue.number) && issue.number > 0 && issue.title.length > 0);
51793
+ };
51794
+ const createGithubWorkBridge = (runner = defaultGithubWorkRunner) => {
51795
+ const listIssues = (cwd, state = "open") => {
51796
+ const stdout = runOrThrow(runner, [
51797
+ "issue",
51798
+ "list",
51799
+ "--state",
51800
+ state,
51801
+ "--limit",
51802
+ "200",
51803
+ "--json",
51804
+ "number,title,body,labels,createdAt,updatedAt,url,state"
51805
+ ], cwd, "Failed to list GitHub issues");
51806
+ return parseIssueList(stdout);
51807
+ };
51808
+ return {
51809
+ createIssue: (cwd, item) => {
51810
+ ensureXyWorkLabel(runner, cwd);
51811
+ const body = formatGithubWorkIssueBody(item);
51812
+ const stdout = runOrThrow(runner, [
51813
+ "issue",
51814
+ "create",
51815
+ "--title",
51816
+ item.title,
51817
+ "--body",
51818
+ body,
51819
+ "--label",
51820
+ XY_WORK_GITHUB_LABEL
51821
+ ], cwd, "Failed to create GitHub issue");
51822
+ return parseIssueUrl(stdout);
51823
+ },
51824
+ isAvailable: (cwd) => {
51825
+ if (runner(["--version"], { cwd }).status !== 0) return false;
51826
+ if (runner(["auth", "status"], { cwd }).status !== 0) return false;
51827
+ const repo = runner([
51828
+ "repo",
51829
+ "view",
51830
+ "--json",
51831
+ "nameWithOwner"
51832
+ ], { cwd });
51833
+ return repo.status === 0 && repo.stdout.trim().length > 0;
51834
+ },
51835
+ listIssues,
51836
+ listOpenIssues: (cwd) => listIssues(cwd, "open"),
51837
+ updateIssue: (cwd, issueNumber, update) => {
51838
+ if (update.state === "closed") runOrThrow(runner, [
51839
+ "issue",
51840
+ "close",
51841
+ String(issueNumber),
51842
+ "--reason",
51843
+ "completed"
51844
+ ], cwd, `Failed to close GitHub issue #${String(issueNumber)}`);
51845
+ else if (update.state === "open") runOrThrow(runner, [
51846
+ "issue",
51847
+ "reopen",
51848
+ String(issueNumber)
51849
+ ], cwd, `Failed to reopen GitHub issue #${String(issueNumber)}`);
51850
+ if (update.title !== void 0 || update.body !== void 0) {
51851
+ const args = [
51852
+ "issue",
51853
+ "edit",
51854
+ String(issueNumber)
51855
+ ];
51856
+ if (update.title !== void 0) args.push("--title", update.title);
51857
+ if (update.body !== void 0) args.push("--body", update.body);
51858
+ runOrThrow(runner, args, cwd, `Failed to update GitHub issue #${String(issueNumber)}`);
51859
+ }
51860
+ }
51861
+ };
51862
+ };
51863
+ const defaultGithubWorkBridge = createGithubWorkBridge();
51864
+ //#endregion
51865
+ //#region src/actions/work/sync.ts
51866
+ const resolveGithubBridge = (config, cwd, bridge = defaultGithubWorkBridge) => {
51867
+ if (!config.stores.github.enabled) return void 0;
51868
+ return bridge.isAvailable(cwd) ? bridge : void 0;
51869
+ };
51870
+ const linkedGithubNumbers = (items) => {
51871
+ const numbers = /* @__PURE__ */ new Set();
51872
+ for (const item of items) {
51873
+ const number = readGithubStoreNumber(item.stores);
51874
+ if (number !== void 0) numbers.add(number);
51875
+ }
51876
+ return numbers;
51877
+ };
51878
+ const isTerminalWorkStatus = (status) => {
51879
+ return status === "done" || status === "wontfix";
50889
51880
  };
51881
+ /**
51882
+ * Normalize open GitHub issues that were not created by `xy work` into WorkItem shape.
51883
+ * Issues already linked from local items (or marked with the xy-work label/marker) are skipped.
51884
+ */
51885
+ const listExternalGithubWorkItems = (cwd, localItems, bridge) => {
51886
+ const knownNumbers = linkedGithubNumbers(localItems);
51887
+ return bridge.listOpenIssues(cwd).filter((issue) => !isXyWorkGithubIssue(issue) && !knownNumbers.has(issue.number)).map(normalizeGithubIssueToWorkItem);
51888
+ };
51889
+ const emptySyncSummary = () => ({
51890
+ closedGithub: [],
51891
+ createdGithub: [],
51892
+ importedLocal: [],
51893
+ reopenedGithub: [],
51894
+ updatedGithub: [],
51895
+ updatedLocal: []
51896
+ });
51897
+ const withGithubLink = (item, number, url, createdByXyWork) => {
51898
+ return {
51899
+ ...item,
51900
+ stores: {
51901
+ ...item.stores,
51902
+ github: {
51903
+ createdByXyWork,
51904
+ number,
51905
+ ...!createdByXyWork && { source: "github" },
51906
+ url
51907
+ }
51908
+ }
51909
+ };
51910
+ };
51911
+ const importGithubIssueLocally = (cwd, issue, now, preferredId) => {
51912
+ const base = normalizeGithubIssueToWorkItem(issue);
51913
+ const id = preferredId ?? base.id;
51914
+ const createdByXyWork = isXyWorkGithubIssue(issue);
51915
+ const open = githubIssueIsOpen(issue);
51916
+ const item = {
51917
+ ...base,
51918
+ completedAt: open ? void 0 : base.updatedAt || nowIso(now),
51919
+ id,
51920
+ status: open ? "open" : "done",
51921
+ stores: { github: {
51922
+ createdByXyWork,
51923
+ number: issue.number,
51924
+ ...!createdByXyWork && { source: "github" },
51925
+ url: issue.url
51926
+ } },
51927
+ updatedAt: nowIso(now)
51928
+ };
51929
+ writeWorkItem(cwd, item);
51930
+ return item;
51931
+ };
51932
+ const createMissingGithubIssues = (cwd, localItems, github, issuesByNumber, summary, now) => {
51933
+ for (const item of localItems) {
51934
+ if (readGithubStoreNumber(item.stores) !== void 0) continue;
51935
+ if (isTerminalWorkStatus(item.status)) continue;
51936
+ try {
51937
+ const ref = github.createIssue(cwd, item);
51938
+ const linked = {
51939
+ ...withGithubLink(item, ref.number, ref.url, true),
51940
+ updatedAt: nowIso(now)
51941
+ };
51942
+ writeWorkItem(cwd, linked);
51943
+ summary.createdGithub.push(`${item.id}→#${String(ref.number)}`);
51944
+ issuesByNumber.set(ref.number, {
51945
+ body: formatGithubWorkIssueBody(linked),
51946
+ createdAt: linked.createdAt,
51947
+ labels: ["xy-work"],
51948
+ number: ref.number,
51949
+ state: "OPEN",
51950
+ title: linked.title,
51951
+ updatedAt: linked.updatedAt,
51952
+ url: ref.url
51953
+ });
51954
+ } catch (error) {
51955
+ const message = error instanceof Error ? error.message : String(error);
51956
+ xyLog(`Sync create failed for ${item.id}: ${message}`);
51957
+ }
51958
+ }
51959
+ };
51960
+ const attachOrImportGithubIssues = (cwd, issuesByNumber, summary, now) => {
51961
+ const localItems = listWorkItems(cwd);
51962
+ const localById = new Map(localItems.map((item) => [item.id, item]));
51963
+ const linkedNumbers = linkedGithubNumbers(localItems);
51964
+ for (const issue of issuesByNumber.values()) {
51965
+ if (linkedNumbers.has(issue.number)) continue;
51966
+ const xyWorkId = isXyWorkGithubIssue(issue) ? parseXyWorkIdFromGithubBody(issue.body) : void 0;
51967
+ if (xyWorkId !== void 0 && localById.has(xyWorkId)) {
51968
+ const existing = localById.get(xyWorkId);
51969
+ if (existing === void 0) continue;
51970
+ if (readGithubStoreNumber(existing.stores) === void 0) {
51971
+ const linked = {
51972
+ ...withGithubLink(existing, issue.number, issue.url, true),
51973
+ updatedAt: nowIso(now)
51974
+ };
51975
+ writeWorkItem(cwd, linked);
51976
+ localById.set(xyWorkId, linked);
51977
+ linkedNumbers.add(issue.number);
51978
+ summary.updatedLocal.push(`${xyWorkId}↔#${String(issue.number)}`);
51979
+ }
51980
+ continue;
51981
+ }
51982
+ if (!githubIssueIsOpen(issue) && !isXyWorkGithubIssue(issue)) continue;
51983
+ const preferredId = xyWorkId;
51984
+ if (preferredId !== void 0 && localById.has(preferredId)) continue;
51985
+ try {
51986
+ const imported = importGithubIssueLocally(cwd, issue, now ?? /* @__PURE__ */ new Date(), preferredId);
51987
+ localById.set(imported.id, imported);
51988
+ linkedNumbers.add(issue.number);
51989
+ summary.importedLocal.push(`${imported.id}←#${String(issue.number)}`);
51990
+ } catch (error) {
51991
+ const message = error instanceof Error ? error.message : String(error);
51992
+ xyLog(`Sync import failed for GitHub #${String(issue.number)}: ${message}`);
51993
+ }
51994
+ }
51995
+ };
51996
+ const reconcileTitleDrift = (cwd, github, item, issue, number, summary, now) => {
51997
+ if (item.title === issue.title) return {
51998
+ localChanged: false,
51999
+ next: item
52000
+ };
52001
+ if (item.updatedAt.localeCompare(issue.updatedAt) >= 0) {
52002
+ github.updateIssue(cwd, number, {
52003
+ body: formatGithubWorkIssueBody(item),
52004
+ title: item.title
52005
+ });
52006
+ summary.updatedGithub.push(`${item.id}→#${String(number)}`);
52007
+ issue.title = item.title;
52008
+ issue.updatedAt = nowIso(now);
52009
+ return {
52010
+ localChanged: false,
52011
+ next: item
52012
+ };
52013
+ }
52014
+ return {
52015
+ localChanged: true,
52016
+ next: {
52017
+ ...item,
52018
+ title: issue.title,
52019
+ updatedAt: nowIso(now)
52020
+ }
52021
+ };
52022
+ };
52023
+ const ensureGithubStoreUrl = (item, issue, number) => {
52024
+ const url = readGithubStoreUrl(item.stores) ?? issue.url;
52025
+ if (readGithubStoreUrl(item.stores) === url) return {
52026
+ localChanged: false,
52027
+ next: item
52028
+ };
52029
+ const store = item.stores.github;
52030
+ const createdByXyWork = isXyWorkGithubIssue(issue) || typeof store === "object" && store !== null && store.createdByXyWork === true;
52031
+ return {
52032
+ localChanged: true,
52033
+ next: withGithubLink(item, number, url, createdByXyWork)
52034
+ };
52035
+ };
52036
+ const reconcileLinkedItem = (cwd, github, item, issue, number, summary, now) => {
52037
+ let next = item;
52038
+ let localChanged = false;
52039
+ const issueOpen = githubIssueIsOpen(issue);
52040
+ const localTerminal = isTerminalWorkStatus(item.status);
52041
+ if (localTerminal && issueOpen) {
52042
+ github.updateIssue(cwd, number, { state: "closed" });
52043
+ summary.closedGithub.push(`${item.id}→#${String(number)}`);
52044
+ issue.state = "CLOSED";
52045
+ } else if (!localTerminal && !issueOpen) {
52046
+ next = {
52047
+ ...next,
52048
+ completedAt: next.completedAt ?? issue.updatedAt,
52049
+ status: "done",
52050
+ updatedAt: nowIso(now),
52051
+ verification: [.../* @__PURE__ */ new Set([...next.verification, `synced closed from GitHub #${String(number)}`])]
52052
+ };
52053
+ localChanged = true;
52054
+ } else if (!localTerminal && issueOpen) {
52055
+ const titleResult = reconcileTitleDrift(cwd, github, next, issue, number, summary, now);
52056
+ next = titleResult.next;
52057
+ localChanged ||= titleResult.localChanged;
52058
+ }
52059
+ const urlResult = ensureGithubStoreUrl(next, issue, number);
52060
+ next = urlResult.next;
52061
+ localChanged ||= urlResult.localChanged;
52062
+ if (localChanged) {
52063
+ writeWorkItem(cwd, next);
52064
+ summary.updatedLocal.push(`${next.id}←#${String(number)}`);
52065
+ }
52066
+ };
52067
+ const reconcileLinkedPairs = (cwd, github, issuesByNumber, summary, now) => {
52068
+ for (const item of listWorkItems(cwd)) {
52069
+ const number = readGithubStoreNumber(item.stores);
52070
+ if (number === void 0) continue;
52071
+ const issue = issuesByNumber.get(number);
52072
+ if (issue === void 0) continue;
52073
+ try {
52074
+ reconcileLinkedItem(cwd, github, item, issue, number, summary, now);
52075
+ } catch (error) {
52076
+ const message = error instanceof Error ? error.message : String(error);
52077
+ xyLog(`Sync reconcile failed for ${item.id}/#${String(number)}: ${message}`);
52078
+ }
52079
+ }
52080
+ };
52081
+ const logSyncSummary = (summary) => {
52082
+ if (summary.createdGithub.length + summary.importedLocal.length + summary.updatedLocal.length + summary.updatedGithub.length + summary.closedGithub.length + summary.reopenedGithub.length === 0) {
52083
+ xyLog("GitHub sync: already in sync");
52084
+ return;
52085
+ }
52086
+ xyLog([
52087
+ "GitHub sync complete:",
52088
+ ` created GitHub: ${String(summary.createdGithub.length)}`,
52089
+ ` imported local: ${String(summary.importedLocal.length)}`,
52090
+ ` updated local: ${String(summary.updatedLocal.length)}`,
52091
+ ` updated GitHub: ${String(summary.updatedGithub.length)}`,
52092
+ ` closed GitHub: ${String(summary.closedGithub.length)}`
52093
+ ].join("\n"));
52094
+ };
52095
+ /**
52096
+ * Bidirectional sync between repo-local work items and GitHub Issues when available.
52097
+ *
52098
+ * - Local active items without a GitHub link → create a marked GitHub issue
52099
+ * - Open/closed GitHub issues not present locally → import as local items
52100
+ * - Linked pairs: reconcile title (newer wins) and status (done/wontfix ↔ closed)
52101
+ */
52102
+ const workSync = (options = {}) => {
52103
+ const cwd = options.cwd ?? process.cwd();
52104
+ const config = readWorkConfig(cwd);
52105
+ const summary = emptySyncSummary();
52106
+ const github = resolveGithubBridge(config, cwd, options.github);
52107
+ if (github === void 0) {
52108
+ xyLog("GitHub sync skipped: GitHub Issues unavailable or disabled");
52109
+ return cleanResult({ summary });
52110
+ }
52111
+ const issuesByNumber = /* @__PURE__ */ new Map();
52112
+ for (const issue of github.listIssues(cwd, "all")) issuesByNumber.set(issue.number, issue);
52113
+ createMissingGithubIssues(cwd, listWorkItems(cwd), github, issuesByNumber, summary, options.now);
52114
+ attachOrImportGithubIssues(cwd, issuesByNumber, summary, options.now);
52115
+ reconcileLinkedPairs(cwd, github, issuesByNumber, summary, options.now);
52116
+ logSyncSummary(summary);
52117
+ return cleanResult({ summary });
52118
+ };
52119
+ //#endregion
52120
+ //#region src/actions/work/index.ts
50890
52121
  const normalizeTags = (tags) => {
50891
52122
  return [...new Set((tags ?? []).map((tag) => tag.trim()).filter((tag) => tag.length > 0))].toSorted();
50892
52123
  };
@@ -50932,7 +52163,7 @@ const workAdd = (options) => {
50932
52163
  now: options.now,
50933
52164
  prefix: config.idPrefix
50934
52165
  });
50935
- const item = {
52166
+ let item = {
50936
52167
  acceptanceCriteria: normalizeTextList(options.acceptanceCriteria),
50937
52168
  anchors,
50938
52169
  area: options.area,
@@ -50960,6 +52191,29 @@ const workAdd = (options) => {
50960
52191
  marker: config.stores.inline.marker
50961
52192
  });
50962
52193
  }
52194
+ const github = resolveGithubBridge(config, cwd, options.github);
52195
+ if (github !== void 0) try {
52196
+ const ref = github.createIssue(cwd, item);
52197
+ item = {
52198
+ ...item,
52199
+ stores: {
52200
+ ...item.stores,
52201
+ github: {
52202
+ createdByXyWork: true,
52203
+ number: ref.number,
52204
+ url: ref.url
52205
+ }
52206
+ },
52207
+ updatedAt: nowIso(options.now)
52208
+ };
52209
+ writeWorkItem(cwd, item);
52210
+ xyLog(`Added ${item.id}: ${item.title} (GitHub #${String(ref.number)})`);
52211
+ return cleanResult({ item });
52212
+ } catch (error) {
52213
+ const message = error instanceof Error ? error.message : String(error);
52214
+ xyLog(`Added ${item.id}: ${item.title} (GitHub issue skipped: ${message})`);
52215
+ return cleanResult({ item });
52216
+ }
50963
52217
  xyLog(`Added ${item.id}: ${item.title}`);
50964
52218
  return cleanResult({ item });
50965
52219
  };
@@ -50971,8 +52225,19 @@ const selectWorkItems = (items, options, formula) => {
50971
52225
  const workList = (options = {}) => {
50972
52226
  const cwd = options.cwd ?? process.cwd();
50973
52227
  const config = readWorkConfig(cwd);
50974
- const items = selectWorkItems(listWorkItems(cwd), options, config.priority.formula);
50975
- for (const item of items) printItemSummary(item, calculatePriorityScore(item.priority, config.priority.formula));
52228
+ const localItems = listWorkItems(cwd);
52229
+ let combined = localItems;
52230
+ if (options.all === true) {
52231
+ const github = resolveGithubBridge(config, cwd, options.github);
52232
+ if (github !== void 0) try {
52233
+ const external = listExternalGithubWorkItems(cwd, localItems, github);
52234
+ combined = [...localItems, ...external];
52235
+ } catch (error) {
52236
+ xyLog(`GitHub issues skipped: ${error instanceof Error ? error.message : String(error)}`);
52237
+ }
52238
+ }
52239
+ const items = selectWorkItems(combined, options, config.priority.formula);
52240
+ printWorkItemsTable(items, config.priority.formula);
50976
52241
  return cleanResult({ items });
50977
52242
  };
50978
52243
  const workShow = (options) => {
@@ -50984,8 +52249,10 @@ const needsTriage = (item) => {
50984
52249
  return item.status === "open" && (item.priority === void 0 || item.area === void 0 || item.acceptanceCriteria.length === 0 || item.verification.length === 0);
50985
52250
  };
50986
52251
  const workTriage = (options = {}) => {
50987
- const items = listWorkItems(options.cwd ?? process.cwd()).filter(needsTriage);
50988
- for (const item of items) printItemSummary(item);
52252
+ const cwd = options.cwd ?? process.cwd();
52253
+ const config = readWorkConfig(cwd);
52254
+ const items = listWorkItems(cwd).filter(needsTriage);
52255
+ printWorkItemsTable(items, config.priority.formula);
50989
52256
  return cleanResult({ items });
50990
52257
  };
50991
52258
  const workQueue = (options = {}) => {
@@ -51038,7 +52305,7 @@ const workNext = (options = {}) => {
51038
52305
  return cleanResult({ item: void 0 });
51039
52306
  }
51040
52307
  const next = options.claim === true ? claimItem(cwd, item, options.now) : item;
51041
- printItemSummary(next, calculatePriorityScore(next.priority, config.priority.formula));
52308
+ printWorkItemSummary(next, calculatePriorityScore(next.priority, config.priority.formula));
51042
52309
  return cleanResult({ item: next });
51043
52310
  };
51044
52311
  const claimItem = (cwd, item, now) => {
@@ -51864,7 +53131,7 @@ const addCommand = {
51864
53131
  });
51865
53132
  },
51866
53133
  command: "add <type> <title>",
51867
- describe: "Create a repo-local work item",
53134
+ describe: "Create a work item (also creates a GitHub issue when available)",
51868
53135
  handler: async (argv) => {
51869
53136
  await withEnvelope("work add", () => workAdd({
51870
53137
  acceptanceCriteria: stringArray(argv.acceptance),
@@ -51935,7 +53202,11 @@ const initCommand$1 = {
51935
53202
  //#region src/xy/common/work/listCommand.ts
51936
53203
  const listCommand = {
51937
53204
  builder: (yargs) => {
51938
- return yargs.option("status", {
53205
+ return yargs.option("all", {
53206
+ default: false,
53207
+ describe: "Also list/normalize open GitHub issues not created by xy work",
53208
+ type: "boolean"
53209
+ }).option("status", {
51939
53210
  choices: WORK_STATUSES,
51940
53211
  describe: "Filter by status",
51941
53212
  type: "string"
@@ -51954,6 +53225,7 @@ const listCommand = {
51954
53225
  describe: "List work items",
51955
53226
  handler: async (argv) => {
51956
53227
  await withEnvelope("work list", () => workList({
53228
+ all: Boolean(argv.all),
51957
53229
  sort: argv.sort,
51958
53230
  status: argv.status,
51959
53231
  type: argv.type
@@ -52024,6 +53296,15 @@ const showCommand = {
52024
53296
  }
52025
53297
  };
52026
53298
  //#endregion
53299
+ //#region src/xy/common/work/syncCommand.ts
53300
+ const syncCommand = {
53301
+ command: "sync",
53302
+ describe: "Sync repo-local work items with GitHub Issues when available",
53303
+ handler: async () => {
53304
+ await withEnvelope("work sync", () => workSync());
53305
+ }
53306
+ };
53307
+ //#endregion
52027
53308
  //#region src/xy/common/work/triageCommand.ts
52028
53309
  const triageCommand = {
52029
53310
  command: "triage",
@@ -52094,10 +53375,10 @@ const updateCommand = {
52094
53375
  //#region src/xy/common/work/index.ts
52095
53376
  const workCommand = {
52096
53377
  builder: (yargs) => {
52097
- return yargs.command(initCommand$1).command(addCommand).command(listCommand).command(showCommand).command(triageCommand).command(queueCommand).command(nextCommand).command(claimCommand).command(doneCommand).command(updateCommand).demandCommand(1, "Please specify a work subcommand").strictCommands();
53378
+ return yargs.command(initCommand$1).command(addCommand).command(listCommand).command(showCommand).command(syncCommand).command(triageCommand).command(queueCommand).command(nextCommand).command(claimCommand).command(doneCommand).command(updateCommand).demandCommand(1, "Please specify a work subcommand").strictCommands();
52098
53379
  },
52099
53380
  command: "work",
52100
- describe: "Work - Repo-local AI-friendly work tracking",
53381
+ describe: "Work - AI-friendly work tracking (repo-local, with optional GitHub Issues)",
52101
53382
  handler: () => {}
52102
53383
  };
52103
53384
  //#endregion
@@ -52864,11 +54145,60 @@ const xyLintCommands = (args) => {
52864
54145
  //#endregion
52865
54146
  //#region src/xy/react/analyzeCommand.ts
52866
54147
  const analyzeCommand = {
54148
+ builder: (yargs) => {
54149
+ return yargs.option("config", {
54150
+ alias: "c",
54151
+ describe: "Vite config file path",
54152
+ type: "string"
54153
+ }).option("mode", {
54154
+ alias: "m",
54155
+ default: "production",
54156
+ describe: "Vite env mode",
54157
+ type: "string"
54158
+ }).option("out-dir", {
54159
+ describe: "Report subdirectory under Vite outDir (default: outDir root)",
54160
+ type: "string"
54161
+ }).option("html", {
54162
+ default: true,
54163
+ describe: "Write HTML report (bundle-stats.html)",
54164
+ type: "boolean"
54165
+ }).option("json", {
54166
+ default: false,
54167
+ describe: "Also write JSON report",
54168
+ type: "boolean"
54169
+ }).option("compare", {
54170
+ default: true,
54171
+ describe: "Compare against the previous baseline when present",
54172
+ type: "boolean"
54173
+ }).option("baseline", {
54174
+ default: false,
54175
+ describe: "Persist current stats as baseline for later compares",
54176
+ type: "boolean"
54177
+ }).option("open", {
54178
+ default: true,
54179
+ describe: "Open the HTML report in a browser after generation",
54180
+ type: "boolean"
54181
+ }).option("silent", {
54182
+ default: false,
54183
+ describe: "Suppress bundle-stats plugin logging",
54184
+ type: "boolean"
54185
+ });
54186
+ },
52867
54187
  command: "analyze",
52868
- describe: "Analyze - Analyze Bundles",
54188
+ describe: "Analyze - Vite/Rollup bundle report via bundle-stats",
52869
54189
  handler: async (argv) => {
52870
- if (Boolean(argv.verbose)) console.log("Analyzing");
52871
- await withEnvelope("analyze", () => analyze());
54190
+ if (Boolean(argv.verbose)) console.log("Analyzing Vite bundle with bundle-stats");
54191
+ await withEnvelope("analyze", () => analyze({
54192
+ baseline: Boolean(argv.baseline),
54193
+ compare: argv.compare !== false,
54194
+ config: typeof argv.config === "string" ? argv.config : void 0,
54195
+ html: argv.html !== false,
54196
+ json: Boolean(argv.json),
54197
+ mode: typeof argv.mode === "string" ? argv.mode : void 0,
54198
+ open: argv.open !== false,
54199
+ outDir: typeof argv["out-dir"] === "string" ? argv["out-dir"] : void 0,
54200
+ silent: Boolean(argv.silent)
54201
+ }));
52872
54202
  }
52873
54203
  };
52874
54204
  //#endregion
@@ -54149,13 +55479,13 @@ function ui(opts) {
54149
55479
  //#endregion
54150
55480
  //#region ../../node_modules/.pnpm/escalade@3.2.0/node_modules/escalade/sync/index.mjs
54151
55481
  function sync_default(start, callback) {
54152
- let dir = resolve(".", start);
55482
+ let dir = resolve$1(".", start);
54153
55483
  let tmp;
54154
- if (!statSync$1(dir).isDirectory()) dir = dirname(dir);
55484
+ if (!statSync$1(dir).isDirectory()) dir = dirname$1(dir);
54155
55485
  while (true) {
54156
55486
  tmp = callback(dir, readdirSync$1(dir));
54157
- if (tmp) return resolve(dir, tmp);
54158
- dir = dirname(tmp = dir);
55487
+ if (tmp) return resolve$1(dir, tmp);
55488
+ dir = dirname$1(tmp = dir);
54159
55489
  if (tmp === dir) break;
54160
55490
  }
54161
55491
  }
@@ -54938,8 +56268,8 @@ const parser = new YargsParser({
54938
56268
  return env;
54939
56269
  },
54940
56270
  format,
54941
- normalize,
54942
- resolve,
56271
+ normalize: normalize$1,
56272
+ resolve: resolve$1,
54943
56273
  require: (path) => {
54944
56274
  if (typeof require$2 !== "undefined") return require$2(path);
54945
56275
  else if (path.match(/\.json$/)) return JSON.parse(readFileSync$1(path, "utf8"));
@@ -54981,7 +56311,7 @@ var node_default = {
54981
56311
  writeFile
54982
56312
  },
54983
56313
  format,
54984
- resolve,
56314
+ resolve: resolve$1,
54985
56315
  exists: (file) => {
54986
56316
  try {
54987
56317
  return statSync$1(file).isFile();
@@ -55156,11 +56486,11 @@ var esm_default = {
55156
56486
  mainFilename: mainFilename || process.cwd(),
55157
56487
  Parser: yargsParser,
55158
56488
  path: {
55159
- basename,
55160
- dirname,
56489
+ basename: basename$1,
56490
+ dirname: dirname$1,
55161
56491
  extname,
55162
56492
  relative,
55163
- resolve,
56493
+ resolve: resolve$1,
55164
56494
  join
55165
56495
  },
55166
56496
  process: {
@@ -55183,7 +56513,7 @@ var esm_default = {
55183
56513
  },
55184
56514
  stringWidth,
55185
56515
  y18n: y18n({
55186
- directory: resolve(__dirname$1, "../../../locales"),
56516
+ directory: resolve$1(__dirname$1, "../../../locales"),
55187
56517
  updateFiles: false
55188
56518
  })
55189
56519
  };