@cloud-cli/on 0.1.5 → 0.1.6

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 (2) hide show
  1. package/dist/on.js +310 -309
  2. package/package.json +1 -1
package/dist/on.js CHANGED
@@ -2,16 +2,16 @@
2
2
  import { parseArgs as As } from "node:util";
3
3
  import { createServer as vs } from "node:http";
4
4
  import { readFile as nt, writeFile as $s, mkdtemp as Ls, rm as Cs } from "node:fs/promises";
5
- import _t, { join as it } from "node:path";
6
- import { spawn as Rt } from "node:child_process";
7
- import { existsSync as js } from "node:fs";
8
- import { tmpdir as Ut } from "node:os";
9
- import { join as Bs } from "node:path/posix";
10
- import { randomUUID as Ms } from "node:crypto";
5
+ import Nt, { join as it } from "node:path";
6
+ import { spawn as Ut } from "node:child_process";
7
+ import { mkdirSync as js, existsSync as Bs } from "node:fs";
8
+ import { tmpdir as Ft } from "node:os";
9
+ import { join as Ms } from "node:path/posix";
10
+ import { randomUUID as Ps } from "node:crypto";
11
11
  function _e(s, e, t) {
12
12
  s.writeHead(e, { "content-type": "application/json" }).end(JSON.stringify(t));
13
13
  }
14
- function Ps(s) {
14
+ function Ds(s) {
15
15
  const e = Number.parseInt(s, 10);
16
16
  if (!Number.isInteger(e) || e < 0 || e > 65535)
17
17
  throw new Error(
@@ -24,11 +24,11 @@ function rt(s) {
24
24
  throw new Error("Incoming webhook payload must be a JSON object.");
25
25
  return s;
26
26
  }
27
- function Ft(s) {
27
+ function qt(s) {
28
28
  return typeof s == "object" && s !== null ? new Proxy(s, {
29
29
  get(e, t) {
30
30
  const n = Reflect.get(e, t);
31
- return typeof n == "object" && n !== null ? Ft(n) : t === "toString" ? () => "'" + JSON.stringify(e) + "'" : n;
31
+ return typeof n == "object" && n !== null ? qt(n) : t === "toString" ? () => "'" + JSON.stringify(e) + "'" : n;
32
32
  }
33
33
  }) : s ?? "";
34
34
  }
@@ -39,7 +39,7 @@ function je(s, e) {
39
39
  );
40
40
  return String(t(e) || "");
41
41
  }
42
- function Ds(s, e) {
42
+ function xs(s, e) {
43
43
  if (!e)
44
44
  return { ...s };
45
45
  const t = { inputs: s };
@@ -47,7 +47,7 @@ function Ds(s, e) {
47
47
  t.inputs[n] = je(`\${${i}}`, t);
48
48
  return t.inputs;
49
49
  }
50
- const ot = /* @__PURE__ */ Symbol.for("yaml.alias"), Xe = /* @__PURE__ */ Symbol.for("yaml.document"), J = /* @__PURE__ */ Symbol.for("yaml.map"), qt = /* @__PURE__ */ Symbol.for("yaml.pair"), R = /* @__PURE__ */ Symbol.for("yaml.scalar"), le = /* @__PURE__ */ Symbol.for("yaml.seq"), D = /* @__PURE__ */ Symbol.for("yaml.node.type"), Q = (s) => !!s && typeof s == "object" && s[D] === ot, Be = (s) => !!s && typeof s == "object" && s[D] === Xe, be = (s) => !!s && typeof s == "object" && s[D] === J, $ = (s) => !!s && typeof s == "object" && s[D] === qt, I = (s) => !!s && typeof s == "object" && s[D] === R, we = (s) => !!s && typeof s == "object" && s[D] === le;
50
+ const ot = /* @__PURE__ */ Symbol.for("yaml.alias"), Xe = /* @__PURE__ */ Symbol.for("yaml.document"), J = /* @__PURE__ */ Symbol.for("yaml.map"), Vt = /* @__PURE__ */ Symbol.for("yaml.pair"), R = /* @__PURE__ */ Symbol.for("yaml.scalar"), le = /* @__PURE__ */ Symbol.for("yaml.seq"), D = /* @__PURE__ */ Symbol.for("yaml.node.type"), Q = (s) => !!s && typeof s == "object" && s[D] === ot, Be = (s) => !!s && typeof s == "object" && s[D] === Xe, be = (s) => !!s && typeof s == "object" && s[D] === J, $ = (s) => !!s && typeof s == "object" && s[D] === Vt, I = (s) => !!s && typeof s == "object" && s[D] === R, we = (s) => !!s && typeof s == "object" && s[D] === le;
51
51
  function A(s) {
52
52
  if (s && typeof s == "object")
53
53
  switch (s[D]) {
@@ -68,18 +68,18 @@ function v(s) {
68
68
  }
69
69
  return !1;
70
70
  }
71
- const Vt = (s) => (I(s) || A(s)) && !!s.anchor, Y = /* @__PURE__ */ Symbol("break visit"), xs = /* @__PURE__ */ Symbol("skip children"), pe = /* @__PURE__ */ Symbol("remove node");
71
+ const Jt = (s) => (I(s) || A(s)) && !!s.anchor, Y = /* @__PURE__ */ Symbol("break visit"), Ks = /* @__PURE__ */ Symbol("skip children"), pe = /* @__PURE__ */ Symbol("remove node");
72
72
  function ae(s, e) {
73
- const t = Ks(e);
73
+ const t = Rs(e);
74
74
  Be(s) ? ee(null, s.contents, t, Object.freeze([s])) === pe && (s.contents = null) : ee(null, s, t, Object.freeze([]));
75
75
  }
76
76
  ae.BREAK = Y;
77
- ae.SKIP = xs;
77
+ ae.SKIP = Ks;
78
78
  ae.REMOVE = pe;
79
79
  function ee(s, e, t, n) {
80
- const i = Rs(s, e, t, n);
80
+ const i = Us(s, e, t, n);
81
81
  if (v(i) || $(i))
82
- return Us(s, n, i), ee(s, i, t, n);
82
+ return Fs(s, n, i), ee(s, i, t, n);
83
83
  if (typeof i != "symbol") {
84
84
  if (A(e)) {
85
85
  n = Object.freeze(n.concat(e));
@@ -107,7 +107,7 @@ function ee(s, e, t, n) {
107
107
  }
108
108
  return i;
109
109
  }
110
- function Ks(s) {
110
+ function Rs(s) {
111
111
  return typeof s == "object" && (s.Collection || s.Node || s.Value) ? Object.assign({
112
112
  Alias: s.Node,
113
113
  Map: s.Node,
@@ -122,7 +122,7 @@ function Ks(s) {
122
122
  Seq: s.Collection
123
123
  }, s) : s;
124
124
  }
125
- function Rs(s, e, t, n) {
125
+ function Us(s, e, t, n) {
126
126
  if (typeof t == "function")
127
127
  return t(s, e, n);
128
128
  if (be(e))
@@ -136,7 +136,7 @@ function Rs(s, e, t, n) {
136
136
  if (Q(e))
137
137
  return t.Alias?.(s, e, n);
138
138
  }
139
- function Us(s, e, t) {
139
+ function Fs(s, e, t) {
140
140
  const n = e[e.length - 1];
141
141
  if (A(n))
142
142
  n.items[s] = t;
@@ -149,14 +149,14 @@ function Us(s, e, t) {
149
149
  throw new Error(`Cannot replace node with ${i} parent`);
150
150
  }
151
151
  }
152
- const Fs = {
152
+ const qs = {
153
153
  "!": "%21",
154
154
  ",": "%2C",
155
155
  "[": "%5B",
156
156
  "]": "%5D",
157
157
  "{": "%7B",
158
158
  "}": "%7D"
159
- }, qs = (s) => s.replace(/[!,[\]{}]/g, (e) => Fs[e]);
159
+ }, Vs = (s) => s.replace(/[!,[\]{}]/g, (e) => qs[e]);
160
160
  class j {
161
161
  constructor(e, t) {
162
162
  this.docStart = null, this.docEnd = !1, this.yaml = Object.assign({}, j.defaultYaml, e), this.tags = Object.assign({}, j.defaultTags, t);
@@ -246,7 +246,7 @@ class j {
246
246
  tagString(e) {
247
247
  for (const [t, n] of Object.entries(this.tags))
248
248
  if (e.startsWith(n))
249
- return t + qs(e.substring(n.length));
249
+ return t + Vs(e.substring(n.length));
250
250
  return e[0] === "!" ? e : `!<${e}>`;
251
251
  }
252
252
  toString(e) {
@@ -267,14 +267,14 @@ class j {
267
267
  }
268
268
  j.defaultYaml = { explicit: !1, version: "1.2" };
269
269
  j.defaultTags = { "!!": "tag:yaml.org,2002:" };
270
- function Jt(s) {
270
+ function Yt(s) {
271
271
  if (/[\x00-\x19\s,[\]{}]/.test(s)) {
272
272
  const t = `Anchor must not contain whitespace or control characters: ${JSON.stringify(s)}`;
273
273
  throw new Error(t);
274
274
  }
275
275
  return !0;
276
276
  }
277
- function Yt(s) {
277
+ function Gt(s) {
278
278
  const e = /* @__PURE__ */ new Set();
279
279
  return ae(s, {
280
280
  Value(t, n) {
@@ -282,20 +282,20 @@ function Yt(s) {
282
282
  }
283
283
  }), e;
284
284
  }
285
- function Gt(s, e) {
285
+ function Ht(s, e) {
286
286
  for (let t = 1; ; ++t) {
287
287
  const n = `${s}${t}`;
288
288
  if (!e.has(n))
289
289
  return n;
290
290
  }
291
291
  }
292
- function Vs(s, e) {
292
+ function Js(s, e) {
293
293
  const t = [], n = /* @__PURE__ */ new Map();
294
294
  let i = null;
295
295
  return {
296
296
  onAnchor: (r) => {
297
- t.push(r), i ?? (i = Yt(s));
298
- const o = Gt(e, i);
297
+ t.push(r), i ?? (i = Gt(s));
298
+ const o = Ht(e, i);
299
299
  return i.add(o), o;
300
300
  },
301
301
  /**
@@ -345,7 +345,7 @@ function P(s, e, t) {
345
345
  if (Array.isArray(s))
346
346
  return s.map((n, i) => P(n, String(i), t));
347
347
  if (s && typeof s.toJSON == "function") {
348
- if (!t || !Vt(s))
348
+ if (!t || !Jt(s))
349
349
  return s.toJSON(e, t);
350
350
  const n = { aliasCount: 0, count: 1, res: void 0 };
351
351
  t.anchors.set(s, n), t.onCreate = (r) => {
@@ -399,7 +399,7 @@ class at extends lt {
399
399
  let n;
400
400
  t?.aliasResolveCache ? n = t.aliasResolveCache : (n = [], ae(e, {
401
401
  Node: (r, o) => {
402
- (Q(o) || Vt(o)) && n.push(o);
402
+ (Q(o) || Jt(o)) && n.push(o);
403
403
  }
404
404
  }), t && (t.aliasResolveCache = n));
405
405
  let i;
@@ -432,7 +432,7 @@ class at extends lt {
432
432
  toString(e, t, n) {
433
433
  const i = `*${this.source}`;
434
434
  if (e) {
435
- if (Jt(this.source), e.options.verifyAliasOrder && !e.anchors.has(this.source)) {
435
+ if (Yt(this.source), e.options.verifyAliasOrder && !e.anchors.has(this.source)) {
436
436
  const r = `Unresolved alias (the anchor must be set before the alias): ${this.source}`;
437
437
  throw new Error(r);
438
438
  }
@@ -459,7 +459,7 @@ function Ae(s, e, t) {
459
459
  }
460
460
  return 1;
461
461
  }
462
- const Ht = (s) => !s || typeof s != "function" && typeof s != "object";
462
+ const Wt = (s) => !s || typeof s != "function" && typeof s != "object";
463
463
  class N extends lt {
464
464
  constructor(e) {
465
465
  super(R), this.value = e;
@@ -476,8 +476,8 @@ N.BLOCK_LITERAL = "BLOCK_LITERAL";
476
476
  N.PLAIN = "PLAIN";
477
477
  N.QUOTE_DOUBLE = "QUOTE_DOUBLE";
478
478
  N.QUOTE_SINGLE = "QUOTE_SINGLE";
479
- const Js = "tag:yaml.org,2002:";
480
- function Ys(s, e, t) {
479
+ const Ys = "tag:yaml.org,2002:";
480
+ function Gs(s, e, t) {
481
481
  if (e) {
482
482
  const n = t.filter((r) => r.tag === e), i = n.find((r) => !r.format) ?? n[0];
483
483
  if (!i)
@@ -501,8 +501,8 @@ function ge(s, e, t) {
501
501
  return a.anchor ?? (a.anchor = i(s)), new at(a.anchor);
502
502
  a = { anchor: null, node: null }, l.set(s, a);
503
503
  }
504
- e?.startsWith("!!") && (e = Js + e.slice(2));
505
- let c = Ys(s, e, o.tags);
504
+ e?.startsWith("!!") && (e = Ys + e.slice(2));
505
+ let c = Gs(s, e, o.tags);
506
506
  if (!c) {
507
507
  if (s && typeof s.toJSON == "function" && (s = s.toJSON()), !s || typeof s != "object") {
508
508
  const u = new N(s);
@@ -535,7 +535,7 @@ function Le(s, e, t) {
535
535
  });
536
536
  }
537
537
  const he = (s) => s == null || typeof s == "object" && !!s[Symbol.iterator]().next().done;
538
- class Wt extends lt {
538
+ class Qt extends lt {
539
539
  constructor(e, t) {
540
540
  super(e), Object.defineProperty(this, "schema", {
541
541
  value: t,
@@ -630,14 +630,14 @@ class Wt extends lt {
630
630
  }
631
631
  }
632
632
  }
633
- const Gs = (s) => s.replace(/^(?!$)(?: $)?/gm, "#");
633
+ const Hs = (s) => s.replace(/^(?!$)(?: $)?/gm, "#");
634
634
  function U(s, e) {
635
635
  return /^\n+$/.test(s) ? s.substring(1) : e ? s.replace(/^(?! *$)/gm, e) : s;
636
636
  }
637
637
  const G = (s, e, t) => s.endsWith(`
638
638
  `) ? U(t, e) : t.includes(`
639
639
  `) ? `
640
- ` + U(t, e) : (s.endsWith(" ") ? "" : " ") + t, Qt = "flow", ze = "block", ve = "quoted";
640
+ ` + U(t, e) : (s.endsWith(" ") ? "" : " ") + t, Xt = "flow", ze = "block", ve = "quoted";
641
641
  function Me(s, e, t = "flow", { indentAtStart: n, lineWidth: i = 80, minContentWidth: r = 20, onFold: o, onOverflow: l } = {}) {
642
642
  if (!i || i < 0)
643
643
  return s;
@@ -649,7 +649,7 @@ function Me(s, e, t = "flow", { indentAtStart: n, lineWidth: i = 80, minContentW
649
649
  let u = i - e.length;
650
650
  typeof n == "number" && (n > i - Math.max(2, r) ? c.push(0) : u = i - n);
651
651
  let f, p, g = !1, h = -1, m = -1, b = -1;
652
- t === ze && (h = Nt(s, h, e.length), h !== -1 && (u = h + a));
652
+ t === ze && (h = Ot(s, h, e.length), h !== -1 && (u = h + a));
653
653
  for (let S; S = s[h += 1]; ) {
654
654
  if (t === ve && S === "\\") {
655
655
  switch (m = h, s[h + 1]) {
@@ -669,7 +669,7 @@ function Me(s, e, t = "flow", { indentAtStart: n, lineWidth: i = 80, minContentW
669
669
  }
670
670
  if (S === `
671
671
  `)
672
- t === ze && (h = Nt(s, h, e.length)), u = h + e.length + a, f = void 0;
672
+ t === ze && (h = Ot(s, h, e.length)), u = h + e.length + a, f = void 0;
673
673
  else {
674
674
  if (S === " " && p && p !== " " && p !== `
675
675
  ` && p !== " ") {
@@ -704,7 +704,7 @@ ${e}${s.slice(k + 1, _)}`);
704
704
  }
705
705
  return w;
706
706
  }
707
- function Nt(s, e, t) {
707
+ function Ot(s, e, t) {
708
708
  let n = e, i = e + 1, r = s[i];
709
709
  for (; r === " " || r === " "; )
710
710
  if (e < i + t)
@@ -723,7 +723,7 @@ const Pe = (s, e) => ({
723
723
  lineWidth: s.options.lineWidth,
724
724
  minContentWidth: s.options.minContentWidth
725
725
  }), De = (s) => /^(%|---|\.\.\.)/m.test(s);
726
- function Hs(s, e, t) {
726
+ function Ws(s, e, t) {
727
727
  if (!e || e < 0)
728
728
  return !1;
729
729
  const n = e - t, i = s.length;
@@ -806,7 +806,7 @@ function Ze(s, e) {
806
806
  return me(s, e);
807
807
  const t = e.indent || (De(s) ? " " : ""), n = "'" + s.replace(/'/g, "''").replace(/\n+/g, `$&
808
808
  ${t}`) + "'";
809
- return e.implicitKey ? n : Me(n, t, Qt, Pe(e, !1));
809
+ return e.implicitKey ? n : Me(n, t, Xt, Pe(e, !1));
810
810
  }
811
811
  function se(s, e) {
812
812
  const { singleQuote: t } = e.options;
@@ -832,7 +832,7 @@ function $e({ comment: s, type: e, value: t }, n, i, r) {
832
832
  const { blockQuote: o, commentString: l, lineWidth: a } = n.options;
833
833
  if (!o || /\n[\t ]+$/.test(t))
834
834
  return se(t, n);
835
- const c = n.indent || (n.forceBlockIndent || De(t) ? " " : ""), d = o === "literal" ? !0 : o === "folded" || e === N.BLOCK_FOLDED ? !1 : e === N.BLOCK_LITERAL ? !0 : !Hs(t, a, c.length);
835
+ const c = n.indent || (n.forceBlockIndent || De(t) ? " " : ""), d = o === "literal" ? !0 : o === "folded" || e === N.BLOCK_FOLDED ? !1 : e === N.BLOCK_LITERAL ? !0 : !Ws(t, a, c.length);
836
836
  if (!t)
837
837
  return d ? `|
838
838
  ` : `>
@@ -879,7 +879,7 @@ ${c}${y}`;
879
879
  return t = t.replace(/\n+/g, `$&${c}`), `|${k}
880
880
  ${c}${w}${t}${p}`;
881
881
  }
882
- function Ws(s, e, t, n) {
882
+ function Qs(s, e, t, n) {
883
883
  const { type: i, value: r } = s, { actualString: o, implicitKey: l, indent: a, indentStep: c, inFlow: d } = e;
884
884
  if (l && r.includes(`
885
885
  `) || d && /[[\]{},]/.test(r))
@@ -903,7 +903,7 @@ ${a}`);
903
903
  if (g.some(f) || p?.some(f))
904
904
  return se(r, e);
905
905
  }
906
- return l ? u : Me(u, a, Qt, Pe(e, !1));
906
+ return l ? u : Me(u, a, Xt, Pe(e, !1));
907
907
  }
908
908
  function ct(s, e, t, n) {
909
909
  const { implicitKey: i, inFlow: r } = e, o = typeof s.value == "string" ? s : Object.assign({}, s, { value: String(s.value) });
@@ -919,7 +919,7 @@ function ct(s, e, t, n) {
919
919
  case N.QUOTE_SINGLE:
920
920
  return Ze(o.value, e);
921
921
  case N.PLAIN:
922
- return Ws(o, e, t, n);
922
+ return Qs(o, e, t, n);
923
923
  default:
924
924
  return null;
925
925
  }
@@ -932,10 +932,10 @@ function ct(s, e, t, n) {
932
932
  }
933
933
  return c;
934
934
  }
935
- function Xt(s, e) {
935
+ function zt(s, e) {
936
936
  const t = Object.assign({
937
937
  blockQuote: !0,
938
- commentString: Gs,
938
+ commentString: Hs,
939
939
  defaultKeyType: null,
940
940
  defaultStringType: "PLAIN",
941
941
  directives: null,
@@ -973,7 +973,7 @@ function Xt(s, e) {
973
973
  options: t
974
974
  };
975
975
  }
976
- function Qs(s, e) {
976
+ function Xs(s, e) {
977
977
  if (e.tag) {
978
978
  const i = s.filter((r) => r.tag === e.tag);
979
979
  if (i.length > 0)
@@ -996,11 +996,11 @@ function Qs(s, e) {
996
996
  }
997
997
  return t;
998
998
  }
999
- function Xs(s, e, { anchors: t, doc: n }) {
999
+ function zs(s, e, { anchors: t, doc: n }) {
1000
1000
  if (!n.directives)
1001
1001
  return "";
1002
1002
  const i = [], r = (I(s) || A(s)) && s.anchor;
1003
- r && Jt(r) && (t.add(r), i.push(`&${r}`));
1003
+ r && Yt(r) && (t.add(r), i.push(`&${r}`));
1004
1004
  const o = s.tag ?? (e.default ? null : e.tag);
1005
1005
  return o && i.push(n.directives.tagString(o)), i.join(" ");
1006
1006
  }
@@ -1016,14 +1016,14 @@ function re(s, e, t, n) {
1016
1016
  }
1017
1017
  let i;
1018
1018
  const r = v(s) ? s : e.doc.createNode(s, { onTagObj: (a) => i = a });
1019
- i ?? (i = Qs(e.doc.schema.tags, r));
1020
- const o = Xs(r, i, e);
1019
+ i ?? (i = Xs(e.doc.schema.tags, r));
1020
+ const o = zs(r, i, e);
1021
1021
  o.length > 0 && (e.indentAtStart = (e.indentAtStart ?? 0) + o.length + 1);
1022
1022
  const l = typeof i.stringify == "function" ? i.stringify(r, e, t, n) : I(r) ? ct(r, e, t, n) : r.toString(e, t, n);
1023
1023
  return o ? I(r) || l[0] === "{" || l[0] === "[" ? `${o} ${l}` : `${o}
1024
1024
  ${e.indent}${l}` : l;
1025
1025
  }
1026
- function zs({ key: s, value: e }, t, n, i) {
1026
+ function Zs({ key: s, value: e }, t, n, i) {
1027
1027
  const { allNullValues: r, doc: o, indent: l, indentStep: a, options: { commentString: c, indentSeq: d, simpleKeys: u } } = t;
1028
1028
  let f = v(s) && s.comment || null;
1029
1029
  if (u) {
@@ -1086,7 +1086,7 @@ ${t.indent}`);
1086
1086
  `) && (O = "");
1087
1087
  return m += O + _, t.inFlow ? k && n && n() : S && !k ? m += G(m, t.indent, c(S)) : h && i && i(), m;
1088
1088
  }
1089
- function zt(s, e) {
1089
+ function Zt(s, e) {
1090
1090
  (s === "debug" || s === "warn") && console.warn(e);
1091
1091
  }
1092
1092
  const Ne = "<<", F = {
@@ -1095,11 +1095,11 @@ const Ne = "<<", F = {
1095
1095
  tag: "tag:yaml.org,2002:merge",
1096
1096
  test: /^<<$/,
1097
1097
  resolve: () => Object.assign(new N(Symbol(Ne)), {
1098
- addToJSMap: Zt
1098
+ addToJSMap: es
1099
1099
  }),
1100
1100
  stringify: () => Ne
1101
- }, Zs = (s, e) => (F.identify(e) || I(e) && (!e.type || e.type === N.PLAIN) && F.identify(e.value)) && s?.doc.schema.tags.some((t) => t.tag === F.tag && t.default);
1102
- function Zt(s, e, t) {
1101
+ }, en = (s, e) => (F.identify(e) || I(e) && (!e.type || e.type === N.PLAIN) && F.identify(e.value)) && s?.doc.schema.tags.some((t) => t.tag === F.tag && t.default);
1102
+ function es(s, e, t) {
1103
1103
  if (t = s && Q(t) ? t.resolve(s.doc) : t, we(t))
1104
1104
  for (const n of t.items)
1105
1105
  Ve(s, e, n);
@@ -1123,11 +1123,11 @@ function Ve(s, e, t) {
1123
1123
  });
1124
1124
  return e;
1125
1125
  }
1126
- function es(s, e, { key: t, value: n }) {
1126
+ function ts(s, e, { key: t, value: n }) {
1127
1127
  if (v(t) && t.addToJSMap)
1128
1128
  t.addToJSMap(s, e, n);
1129
- else if (Zs(s, t))
1130
- Zt(s, e, n);
1129
+ else if (en(s, t))
1130
+ es(s, e, n);
1131
1131
  else {
1132
1132
  const i = P(t, "", s);
1133
1133
  if (e instanceof Map)
@@ -1135,7 +1135,7 @@ function es(s, e, { key: t, value: n }) {
1135
1135
  else if (e instanceof Set)
1136
1136
  e.add(i);
1137
1137
  else {
1138
- const r = en(t, i, s), o = P(n, r, s);
1138
+ const r = tn(t, i, s), o = P(n, r, s);
1139
1139
  r in e ? Object.defineProperty(e, r, {
1140
1140
  value: o,
1141
1141
  writable: !0,
@@ -1146,13 +1146,13 @@ function es(s, e, { key: t, value: n }) {
1146
1146
  }
1147
1147
  return e;
1148
1148
  }
1149
- function en(s, e, t) {
1149
+ function tn(s, e, t) {
1150
1150
  if (e === null)
1151
1151
  return "";
1152
1152
  if (typeof e != "object")
1153
1153
  return String(e);
1154
1154
  if (v(s) && t?.doc) {
1155
- const n = Xt(t.doc, {});
1155
+ const n = zt(t.doc, {});
1156
1156
  n.anchors = /* @__PURE__ */ new Set();
1157
1157
  for (const r of t.anchors.keys())
1158
1158
  n.anchors.add(r.anchor);
@@ -1160,7 +1160,7 @@ function en(s, e, t) {
1160
1160
  const i = s.toString(n);
1161
1161
  if (!t.mapKeyWarned) {
1162
1162
  let r = JSON.stringify(i);
1163
- r.length > 40 && (r = r.substring(0, 36) + '..."'), zt(t.doc.options.logLevel, `Keys with collection values will be stringified due to JS Object restrictions: ${r}. Set mapAsMap: true to use object keys.`), t.mapKeyWarned = !0;
1163
+ r.length > 40 && (r = r.substring(0, 36) + '..."'), Zt(t.doc.options.logLevel, `Keys with collection values will be stringified due to JS Object restrictions: ${r}. Set mapAsMap: true to use object keys.`), t.mapKeyWarned = !0;
1164
1164
  }
1165
1165
  return i;
1166
1166
  }
@@ -1172,7 +1172,7 @@ function ft(s, e, t) {
1172
1172
  }
1173
1173
  class B {
1174
1174
  constructor(e, t = null) {
1175
- Object.defineProperty(this, D, { value: qt }), this.key = e, this.value = t;
1175
+ Object.defineProperty(this, D, { value: Vt }), this.key = e, this.value = t;
1176
1176
  }
1177
1177
  clone(e) {
1178
1178
  let { key: t, value: n } = this;
@@ -1180,16 +1180,16 @@ class B {
1180
1180
  }
1181
1181
  toJSON(e, t) {
1182
1182
  const n = t?.mapAsMap ? /* @__PURE__ */ new Map() : {};
1183
- return es(t, n, this);
1183
+ return ts(t, n, this);
1184
1184
  }
1185
1185
  toString(e, t, n) {
1186
- return e?.doc ? zs(this, e, t, n) : JSON.stringify(this);
1186
+ return e?.doc ? Zs(this, e, t, n) : JSON.stringify(this);
1187
1187
  }
1188
1188
  }
1189
- function ts(s, e, t) {
1190
- return (e.inFlow ?? s.flow ? sn : tn)(s, e, t);
1189
+ function ss(s, e, t) {
1190
+ return (e.inFlow ?? s.flow ? nn : sn)(s, e, t);
1191
1191
  }
1192
- function tn({ comment: s, items: e }, t, { blockItemPrefix: n, flowChars: i, itemIndent: r, onChompKeep: o, onComment: l }) {
1192
+ function sn({ comment: s, items: e }, t, { blockItemPrefix: n, flowChars: i, itemIndent: r, onChompKeep: o, onComment: l }) {
1193
1193
  const { indent: a, options: { commentString: c } } = t, d = Object.assign({}, t, { indent: r, type: null });
1194
1194
  let u = !1;
1195
1195
  const f = [];
@@ -1221,7 +1221,7 @@ ${a}${h}` : `
1221
1221
  return s ? (p += `
1222
1222
  ` + U(c(s), a), l && l()) : u && o && o(), p;
1223
1223
  }
1224
- function sn({ items: s }, e, { flowChars: t, itemIndent: n }) {
1224
+ function nn({ items: s }, e, { flowChars: t, itemIndent: n }) {
1225
1225
  const { indent: i, indentStep: r, flowCollectionPadding: o, options: { commentString: l } } = e;
1226
1226
  n += r;
1227
1227
  const a = Object.assign({}, e, {
@@ -1277,7 +1277,7 @@ function H(s, e) {
1277
1277
  if ($(n) && (n.key === e || n.key === t || I(n.key) && n.key.value === t))
1278
1278
  return n;
1279
1279
  }
1280
- class M extends Wt {
1280
+ class M extends Qt {
1281
1281
  static get tagName() {
1282
1282
  return "tag:yaml.org,2002:map";
1283
1283
  }
@@ -1317,7 +1317,7 @@ class M extends Wt {
1317
1317
  if (i) {
1318
1318
  if (!t)
1319
1319
  throw new Error(`Key ${n.key} already set`);
1320
- I(i.value) && Ht(n.value) ? i.value.value = n.value : i.value = n.value;
1320
+ I(i.value) && Wt(n.value) ? i.value.value = n.value : i.value = n.value;
1321
1321
  } else if (r) {
1322
1322
  const o = this.items.findIndex((l) => r(n, l) < 0);
1323
1323
  o === -1 ? this.items.push(n) : this.items.splice(o, 0, n);
@@ -1347,7 +1347,7 @@ class M extends Wt {
1347
1347
  const i = n ? new n() : t?.mapAsMap ? /* @__PURE__ */ new Map() : {};
1348
1348
  t?.onCreate && t.onCreate(i);
1349
1349
  for (const r of this.items)
1350
- es(t, i, r);
1350
+ ts(t, i, r);
1351
1351
  return i;
1352
1352
  }
1353
1353
  toString(e, t, n) {
@@ -1356,7 +1356,7 @@ class M extends Wt {
1356
1356
  for (const i of this.items)
1357
1357
  if (!$(i))
1358
1358
  throw new Error(`Map items must all be pairs; found ${JSON.stringify(i)} instead`);
1359
- return !e.allNullValues && this.hasAllNullValues(!1) && (e = Object.assign({}, e, { allNullValues: !0 })), ts(this, e, {
1359
+ return !e.allNullValues && this.hasAllNullValues(!1) && (e = Object.assign({}, e, { allNullValues: !0 })), ss(this, e, {
1360
1360
  blockItemPrefix: "",
1361
1361
  flowChars: { start: "{", end: "}" },
1362
1362
  itemIndent: e.indent || "",
@@ -1375,7 +1375,7 @@ const ce = {
1375
1375
  },
1376
1376
  createNode: (s, e, t) => M.from(s, e, t)
1377
1377
  };
1378
- class W extends Wt {
1378
+ class W extends Qt {
1379
1379
  static get tagName() {
1380
1380
  return "tag:yaml.org,2002:seq";
1381
1381
  }
@@ -1426,7 +1426,7 @@ class W extends Wt {
1426
1426
  if (typeof n != "number")
1427
1427
  throw new Error(`Expected a valid index, not ${e}.`);
1428
1428
  const i = this.items[n];
1429
- I(i) && Ht(t) ? i.value = t : this.items[n] = t;
1429
+ I(i) && Wt(t) ? i.value = t : this.items[n] = t;
1430
1430
  }
1431
1431
  toJSON(e, t) {
1432
1432
  const n = [];
@@ -1437,7 +1437,7 @@ class W extends Wt {
1437
1437
  return n;
1438
1438
  }
1439
1439
  toString(e, t, n) {
1440
- return e ? ts(this, e, {
1440
+ return e ? ss(this, e, {
1441
1441
  blockItemPrefix: "- ",
1442
1442
  flowChars: { start: "[", end: "]" },
1443
1443
  itemIndent: (e.indent || "") + " ",
@@ -1520,14 +1520,14 @@ function K({ format: s, minFractionDigits: e, tag: t, value: n }) {
1520
1520
  }
1521
1521
  return r;
1522
1522
  }
1523
- const ss = {
1523
+ const ns = {
1524
1524
  identify: (s) => typeof s == "number",
1525
1525
  default: !0,
1526
1526
  tag: "tag:yaml.org,2002:float",
1527
1527
  test: /^(?:[-+]?\.(?:inf|Inf|INF)|\.nan|\.NaN|\.NAN)$/,
1528
1528
  resolve: (s) => s.slice(-3).toLowerCase() === "nan" ? NaN : s[0] === "-" ? Number.NEGATIVE_INFINITY : Number.POSITIVE_INFINITY,
1529
1529
  stringify: K
1530
- }, ns = {
1530
+ }, is = {
1531
1531
  identify: (s) => typeof s == "number",
1532
1532
  default: !0,
1533
1533
  tag: "tag:yaml.org,2002:float",
@@ -1538,7 +1538,7 @@ const ss = {
1538
1538
  const e = Number(s.value);
1539
1539
  return isFinite(e) ? e.toExponential() : K(s);
1540
1540
  }
1541
- }, is = {
1541
+ }, rs = {
1542
1542
  identify: (s) => typeof s == "number",
1543
1543
  default: !0,
1544
1544
  tag: "tag:yaml.org,2002:float",
@@ -1549,50 +1549,50 @@ const ss = {
1549
1549
  },
1550
1550
  stringify: K
1551
1551
  }, Re = (s) => typeof s == "bigint" || Number.isInteger(s), ht = (s, e, t, { intAsBigInt: n }) => n ? BigInt(s) : parseInt(s.substring(e), t);
1552
- function rs(s, e, t) {
1552
+ function os(s, e, t) {
1553
1553
  const { value: n } = s;
1554
1554
  return Re(n) && n >= 0 ? t + n.toString(e) : K(s);
1555
1555
  }
1556
- const os = {
1556
+ const ls = {
1557
1557
  identify: (s) => Re(s) && s >= 0,
1558
1558
  default: !0,
1559
1559
  tag: "tag:yaml.org,2002:int",
1560
1560
  format: "OCT",
1561
1561
  test: /^0o[0-7]+$/,
1562
1562
  resolve: (s, e, t) => ht(s, 2, 8, t),
1563
- stringify: (s) => rs(s, 8, "0o")
1564
- }, ls = {
1563
+ stringify: (s) => os(s, 8, "0o")
1564
+ }, as = {
1565
1565
  identify: Re,
1566
1566
  default: !0,
1567
1567
  tag: "tag:yaml.org,2002:int",
1568
1568
  test: /^[-+]?[0-9]+$/,
1569
1569
  resolve: (s, e, t) => ht(s, 0, 10, t),
1570
1570
  stringify: K
1571
- }, as = {
1571
+ }, cs = {
1572
1572
  identify: (s) => Re(s) && s >= 0,
1573
1573
  default: !0,
1574
1574
  tag: "tag:yaml.org,2002:int",
1575
1575
  format: "HEX",
1576
1576
  test: /^0x[0-9a-fA-F]+$/,
1577
1577
  resolve: (s, e, t) => ht(s, 2, 16, t),
1578
- stringify: (s) => rs(s, 16, "0x")
1579
- }, nn = [
1578
+ stringify: (s) => os(s, 16, "0x")
1579
+ }, rn = [
1580
1580
  ce,
1581
1581
  fe,
1582
1582
  xe,
1583
1583
  Ke,
1584
1584
  ut,
1585
- os,
1586
1585
  ls,
1587
1586
  as,
1588
- ss,
1587
+ cs,
1589
1588
  ns,
1590
- is
1589
+ is,
1590
+ rs
1591
1591
  ];
1592
- function Ot(s) {
1592
+ function Et(s) {
1593
1593
  return typeof s == "bigint" || Number.isInteger(s);
1594
1594
  }
1595
- const Ee = ({ value: s }) => JSON.stringify(s), rn = [
1595
+ const Ee = ({ value: s }) => JSON.stringify(s), on = [
1596
1596
  {
1597
1597
  identify: (s) => typeof s == "string",
1598
1598
  default: !0,
@@ -1618,12 +1618,12 @@ const Ee = ({ value: s }) => JSON.stringify(s), rn = [
1618
1618
  stringify: Ee
1619
1619
  },
1620
1620
  {
1621
- identify: Ot,
1621
+ identify: Et,
1622
1622
  default: !0,
1623
1623
  tag: "tag:yaml.org,2002:int",
1624
1624
  test: /^-?(?:0|[1-9][0-9]*)$/,
1625
1625
  resolve: (s, e, { intAsBigInt: t }) => t ? BigInt(s) : parseInt(s, 10),
1626
- stringify: ({ value: s }) => Ot(s) ? s.toString() : JSON.stringify(s)
1626
+ stringify: ({ value: s }) => Et(s) ? s.toString() : JSON.stringify(s)
1627
1627
  },
1628
1628
  {
1629
1629
  identify: (s) => typeof s == "number",
@@ -1633,14 +1633,14 @@ const Ee = ({ value: s }) => JSON.stringify(s), rn = [
1633
1633
  resolve: (s) => parseFloat(s),
1634
1634
  stringify: Ee
1635
1635
  }
1636
- ], on = {
1636
+ ], ln = {
1637
1637
  default: !0,
1638
1638
  tag: "",
1639
1639
  test: /^/,
1640
1640
  resolve(s, e) {
1641
1641
  return e(`Unresolved plain scalar ${JSON.stringify(s)}`), s;
1642
1642
  }
1643
- }, ln = [ce, fe].concat(rn, on), dt = {
1643
+ }, an = [ce, fe].concat(on, ln), dt = {
1644
1644
  identify: (s) => s instanceof Uint8Array,
1645
1645
  // Buffer inherits from Uint8Array
1646
1646
  default: !1,
@@ -1684,7 +1684,7 @@ const Ee = ({ value: s }) => JSON.stringify(s), rn = [
1684
1684
  return ct({ comment: s, type: e, value: l }, n, i, r);
1685
1685
  }
1686
1686
  };
1687
- function cs(s, e) {
1687
+ function fs(s, e) {
1688
1688
  if (we(s))
1689
1689
  for (let t = 0; t < s.items.length; ++t) {
1690
1690
  let n = s.items[t];
@@ -1707,7 +1707,7 @@ ${r.comment}` : n.comment;
1707
1707
  e("Expected a sequence for this tag");
1708
1708
  return s;
1709
1709
  }
1710
- function fs(s, e, t) {
1710
+ function us(s, e, t) {
1711
1711
  const { replacer: n } = t, i = new W(s);
1712
1712
  i.tag = "tag:yaml.org,2002:pairs";
1713
1713
  let r = 0;
@@ -1736,8 +1736,8 @@ const pt = {
1736
1736
  collection: "seq",
1737
1737
  default: !1,
1738
1738
  tag: "tag:yaml.org,2002:pairs",
1739
- resolve: cs,
1740
- createNode: fs
1739
+ resolve: fs,
1740
+ createNode: us
1741
1741
  };
1742
1742
  class ne extends W {
1743
1743
  constructor() {
@@ -1761,7 +1761,7 @@ class ne extends W {
1761
1761
  return n;
1762
1762
  }
1763
1763
  static from(e, t, n) {
1764
- const i = fs(e, t, n), r = new this();
1764
+ const i = us(e, t, n), r = new this();
1765
1765
  return r.items = i.items, r;
1766
1766
  }
1767
1767
  }
@@ -1773,38 +1773,38 @@ const mt = {
1773
1773
  default: !1,
1774
1774
  tag: "tag:yaml.org,2002:omap",
1775
1775
  resolve(s, e) {
1776
- const t = cs(s, e), n = [];
1776
+ const t = fs(s, e), n = [];
1777
1777
  for (const { key: i } of t.items)
1778
1778
  I(i) && (n.includes(i.value) ? e(`Ordered maps must not include duplicate keys: ${i.value}`) : n.push(i.value));
1779
1779
  return Object.assign(new ne(), t);
1780
1780
  },
1781
1781
  createNode: (s, e, t) => ne.from(s, e, t)
1782
1782
  };
1783
- function us({ value: s, source: e }, t) {
1784
- return e && (s ? hs : ds).test.test(e) ? e : s ? t.options.trueStr : t.options.falseStr;
1783
+ function hs({ value: s, source: e }, t) {
1784
+ return e && (s ? ds : ps).test.test(e) ? e : s ? t.options.trueStr : t.options.falseStr;
1785
1785
  }
1786
- const hs = {
1786
+ const ds = {
1787
1787
  identify: (s) => s === !0,
1788
1788
  default: !0,
1789
1789
  tag: "tag:yaml.org,2002:bool",
1790
1790
  test: /^(?:Y|y|[Yy]es|YES|[Tt]rue|TRUE|[Oo]n|ON)$/,
1791
1791
  resolve: () => new N(!0),
1792
- stringify: us
1793
- }, ds = {
1792
+ stringify: hs
1793
+ }, ps = {
1794
1794
  identify: (s) => s === !1,
1795
1795
  default: !0,
1796
1796
  tag: "tag:yaml.org,2002:bool",
1797
1797
  test: /^(?:N|n|[Nn]o|NO|[Ff]alse|FALSE|[Oo]ff|OFF)$/,
1798
1798
  resolve: () => new N(!1),
1799
- stringify: us
1800
- }, an = {
1799
+ stringify: hs
1800
+ }, cn = {
1801
1801
  identify: (s) => typeof s == "number",
1802
1802
  default: !0,
1803
1803
  tag: "tag:yaml.org,2002:float",
1804
1804
  test: /^(?:[-+]?\.(?:inf|Inf|INF)|\.nan|\.NaN|\.NAN)$/,
1805
1805
  resolve: (s) => s.slice(-3).toLowerCase() === "nan" ? NaN : s[0] === "-" ? Number.NEGATIVE_INFINITY : Number.POSITIVE_INFINITY,
1806
1806
  stringify: K
1807
- }, cn = {
1807
+ }, fn = {
1808
1808
  identify: (s) => typeof s == "number",
1809
1809
  default: !0,
1810
1810
  tag: "tag:yaml.org,2002:float",
@@ -1815,7 +1815,7 @@ const hs = {
1815
1815
  const e = Number(s.value);
1816
1816
  return isFinite(e) ? e.toExponential() : K(s);
1817
1817
  }
1818
- }, fn = {
1818
+ }, un = {
1819
1819
  identify: (s) => typeof s == "number",
1820
1820
  default: !0,
1821
1821
  tag: "tag:yaml.org,2002:float",
@@ -1858,7 +1858,7 @@ function gt(s, e, t) {
1858
1858
  }
1859
1859
  return K(s);
1860
1860
  }
1861
- const un = {
1861
+ const hn = {
1862
1862
  identify: Se,
1863
1863
  default: !0,
1864
1864
  tag: "tag:yaml.org,2002:int",
@@ -1866,7 +1866,7 @@ const un = {
1866
1866
  test: /^[-+]?0b[0-1_]+$/,
1867
1867
  resolve: (s, e, t) => Ue(s, 2, 2, t),
1868
1868
  stringify: (s) => gt(s, 2, "0b")
1869
- }, hn = {
1869
+ }, dn = {
1870
1870
  identify: Se,
1871
1871
  default: !0,
1872
1872
  tag: "tag:yaml.org,2002:int",
@@ -1874,14 +1874,14 @@ const un = {
1874
1874
  test: /^[-+]?0[0-7_]+$/,
1875
1875
  resolve: (s, e, t) => Ue(s, 1, 8, t),
1876
1876
  stringify: (s) => gt(s, 8, "0")
1877
- }, dn = {
1877
+ }, pn = {
1878
1878
  identify: Se,
1879
1879
  default: !0,
1880
1880
  tag: "tag:yaml.org,2002:int",
1881
1881
  test: /^[-+]?[0-9][0-9_]*$/,
1882
1882
  resolve: (s, e, t) => Ue(s, 0, 10, t),
1883
1883
  stringify: K
1884
- }, pn = {
1884
+ }, mn = {
1885
1885
  identify: Se,
1886
1886
  default: !0,
1887
1887
  tag: "tag:yaml.org,2002:int",
@@ -1952,7 +1952,7 @@ function bt(s, e) {
1952
1952
  const t = s[0], n = t === "-" || t === "+" ? s.substring(1) : s, i = (o) => e ? BigInt(o) : Number(o), r = n.replace(/_/g, "").split(":").reduce((o, l) => o * i(60) + i(l), i(0));
1953
1953
  return t === "-" ? i(-1) * r : r;
1954
1954
  }
1955
- function ps(s) {
1955
+ function ms(s) {
1956
1956
  let { value: e } = s, t = (o) => o;
1957
1957
  if (typeof e == "bigint")
1958
1958
  t = (o) => BigInt(o);
@@ -1963,22 +1963,22 @@ function ps(s) {
1963
1963
  const i = t(60), r = [e % i];
1964
1964
  return e < 60 ? r.unshift(0) : (e = (e - r[0]) / i, r.unshift(e % i), e >= 60 && (e = (e - r[0]) / i, r.unshift(e))), n + r.map((o) => String(o).padStart(2, "0")).join(":").replace(/000000\d*$/, "");
1965
1965
  }
1966
- const ms = {
1966
+ const gs = {
1967
1967
  identify: (s) => typeof s == "bigint" || Number.isInteger(s),
1968
1968
  default: !0,
1969
1969
  tag: "tag:yaml.org,2002:int",
1970
1970
  format: "TIME",
1971
1971
  test: /^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+$/,
1972
1972
  resolve: (s, e, { intAsBigInt: t }) => bt(s, t),
1973
- stringify: ps
1974
- }, gs = {
1973
+ stringify: ms
1974
+ }, ys = {
1975
1975
  identify: (s) => typeof s == "number",
1976
1976
  default: !0,
1977
1977
  tag: "tag:yaml.org,2002:float",
1978
1978
  format: "TIME",
1979
1979
  test: /^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\.[0-9_]*$/,
1980
1980
  resolve: (s) => bt(s, !1),
1981
- stringify: ps
1981
+ stringify: ms
1982
1982
  }, Fe = {
1983
1983
  identify: (s) => s instanceof Date,
1984
1984
  default: !0,
@@ -2001,45 +2001,45 @@ const ms = {
2001
2001
  return new Date(c);
2002
2002
  },
2003
2003
  stringify: ({ value: s }) => s?.toISOString().replace(/(T00:00:00)?\.000Z$/, "") ?? ""
2004
- }, Et = [
2004
+ }, Tt = [
2005
2005
  ce,
2006
2006
  fe,
2007
2007
  xe,
2008
2008
  Ke,
2009
- hs,
2010
2009
  ds,
2011
- un,
2010
+ ps,
2012
2011
  hn,
2013
2012
  dn,
2014
2013
  pn,
2015
- an,
2014
+ mn,
2016
2015
  cn,
2017
2016
  fn,
2017
+ un,
2018
2018
  dt,
2019
2019
  F,
2020
2020
  mt,
2021
2021
  pt,
2022
2022
  yt,
2023
- ms,
2024
2023
  gs,
2024
+ ys,
2025
2025
  Fe
2026
- ], Tt = /* @__PURE__ */ new Map([
2027
- ["core", nn],
2026
+ ], It = /* @__PURE__ */ new Map([
2027
+ ["core", rn],
2028
2028
  ["failsafe", [ce, fe, xe]],
2029
- ["json", ln],
2030
- ["yaml11", Et],
2031
- ["yaml-1.1", Et]
2032
- ]), It = {
2029
+ ["json", an],
2030
+ ["yaml11", Tt],
2031
+ ["yaml-1.1", Tt]
2032
+ ]), At = {
2033
2033
  binary: dt,
2034
2034
  bool: ut,
2035
- float: is,
2036
- floatExp: ns,
2037
- floatNaN: ss,
2038
- floatTime: gs,
2039
- int: ls,
2040
- intHex: as,
2041
- intOct: os,
2042
- intTime: ms,
2035
+ float: rs,
2036
+ floatExp: is,
2037
+ floatNaN: ns,
2038
+ floatTime: ys,
2039
+ int: as,
2040
+ intHex: cs,
2041
+ intOct: ls,
2042
+ intTime: gs,
2043
2043
  map: ce,
2044
2044
  merge: F,
2045
2045
  null: Ke,
@@ -2048,7 +2048,7 @@ const ms = {
2048
2048
  seq: fe,
2049
2049
  set: yt,
2050
2050
  timestamp: Fe
2051
- }, mn = {
2051
+ }, gn = {
2052
2052
  "tag:yaml.org,2002:binary": dt,
2053
2053
  "tag:yaml.org,2002:merge": F,
2054
2054
  "tag:yaml.org,2002:omap": mt,
@@ -2057,7 +2057,7 @@ const ms = {
2057
2057
  "tag:yaml.org,2002:timestamp": Fe
2058
2058
  };
2059
2059
  function Je(s, e, t) {
2060
- const n = Tt.get(e);
2060
+ const n = It.get(e);
2061
2061
  if (n && !s)
2062
2062
  return t && !n.includes(F) ? n.concat(F) : n.slice();
2063
2063
  let i = n;
@@ -2065,7 +2065,7 @@ function Je(s, e, t) {
2065
2065
  if (Array.isArray(s))
2066
2066
  i = [];
2067
2067
  else {
2068
- const r = Array.from(Tt.keys()).filter((o) => o !== "yaml11").map((o) => JSON.stringify(o)).join(", ");
2068
+ const r = Array.from(It.keys()).filter((o) => o !== "yaml11").map((o) => JSON.stringify(o)).join(", ");
2069
2069
  throw new Error(`Unknown schema "${e}"; use one of ${r} or define customTags array`);
2070
2070
  }
2071
2071
  if (Array.isArray(s))
@@ -2073,25 +2073,25 @@ function Je(s, e, t) {
2073
2073
  i = i.concat(r);
2074
2074
  else typeof s == "function" && (i = s(i.slice()));
2075
2075
  return t && (i = i.concat(F)), i.reduce((r, o) => {
2076
- const l = typeof o == "string" ? It[o] : o;
2076
+ const l = typeof o == "string" ? At[o] : o;
2077
2077
  if (!l) {
2078
- const a = JSON.stringify(o), c = Object.keys(It).map((d) => JSON.stringify(d)).join(", ");
2078
+ const a = JSON.stringify(o), c = Object.keys(At).map((d) => JSON.stringify(d)).join(", ");
2079
2079
  throw new Error(`Unknown custom tag ${a}; use one of ${c}`);
2080
2080
  }
2081
2081
  return r.includes(l) || r.push(l), r;
2082
2082
  }, []);
2083
2083
  }
2084
- const gn = (s, e) => s.key < e.key ? -1 : s.key > e.key ? 1 : 0;
2084
+ const yn = (s, e) => s.key < e.key ? -1 : s.key > e.key ? 1 : 0;
2085
2085
  class wt {
2086
2086
  constructor({ compat: e, customTags: t, merge: n, resolveKnownTags: i, schema: r, sortMapEntries: o, toStringDefaults: l }) {
2087
- this.compat = Array.isArray(e) ? Je(e, "compat") : e ? Je(null, e) : null, this.name = typeof r == "string" && r || "core", this.knownTags = i ? mn : {}, this.tags = Je(t, this.name, n), this.toStringOptions = l ?? null, Object.defineProperty(this, J, { value: ce }), Object.defineProperty(this, R, { value: xe }), Object.defineProperty(this, le, { value: fe }), this.sortMapEntries = typeof o == "function" ? o : o === !0 ? gn : null;
2087
+ this.compat = Array.isArray(e) ? Je(e, "compat") : e ? Je(null, e) : null, this.name = typeof r == "string" && r || "core", this.knownTags = i ? gn : {}, this.tags = Je(t, this.name, n), this.toStringOptions = l ?? null, Object.defineProperty(this, J, { value: ce }), Object.defineProperty(this, R, { value: xe }), Object.defineProperty(this, le, { value: fe }), this.sortMapEntries = typeof o == "function" ? o : o === !0 ? yn : null;
2088
2088
  }
2089
2089
  clone() {
2090
2090
  const e = Object.create(wt.prototype, Object.getOwnPropertyDescriptors(this));
2091
2091
  return e.tags = this.tags.slice(), e;
2092
2092
  }
2093
2093
  }
2094
- function yn(s, e) {
2094
+ function bn(s, e) {
2095
2095
  const t = [];
2096
2096
  let n = e.directives === !0;
2097
2097
  if (e.directives !== !1 && s.directives) {
@@ -2099,7 +2099,7 @@ function yn(s, e) {
2099
2099
  a ? (t.push(a), n = !0) : s.directives.docStart && (n = !0);
2100
2100
  }
2101
2101
  n && t.push("---");
2102
- const i = Xt(s, e), { commentString: r } = i.options;
2102
+ const i = zt(s, e), { commentString: r } = i.options;
2103
2103
  if (s.commentBefore) {
2104
2104
  t.length !== 1 && t.unshift("");
2105
2105
  const a = r(s.commentBefore);
@@ -2183,9 +2183,9 @@ class qe {
2183
2183
  */
2184
2184
  createAlias(e, t) {
2185
2185
  if (!e.anchor) {
2186
- const n = Yt(this);
2186
+ const n = Gt(this);
2187
2187
  e.anchor = // eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing
2188
- !t || n.has(t) ? Gt(t || "a", n) : t;
2188
+ !t || n.has(t) ? Ht(t || "a", n) : t;
2189
2189
  }
2190
2190
  return new at(e.anchor);
2191
2191
  }
@@ -2197,7 +2197,7 @@ class qe {
2197
2197
  const m = (w) => typeof w == "number" || w instanceof String || w instanceof Number, b = t.filter(m).map(String);
2198
2198
  b.length > 0 && (t = t.concat(b)), i = t;
2199
2199
  } else n === void 0 && t && (n = t, t = void 0);
2200
- const { aliasDuplicateObjects: r, anchorPrefix: o, flow: l, keepUndefined: a, onTagObj: c, tag: d } = n ?? {}, { onAnchor: u, setAnchors: f, sourceObjects: p } = Vs(
2200
+ const { aliasDuplicateObjects: r, anchorPrefix: o, flow: l, keepUndefined: a, onTagObj: c, tag: d } = n ?? {}, { onAnchor: u, setAnchors: f, sourceObjects: p } = Js(
2201
2201
  this,
2202
2202
  // eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing
2203
2203
  o || "a"
@@ -2341,7 +2341,7 @@ class qe {
2341
2341
  const t = JSON.stringify(e.indent);
2342
2342
  throw new Error(`"indent" option must be a positive integer, not ${t}`);
2343
2343
  }
2344
- return yn(this, e);
2344
+ return bn(this, e);
2345
2345
  }
2346
2346
  }
2347
2347
  function z(s) {
@@ -2349,22 +2349,22 @@ function z(s) {
2349
2349
  return !0;
2350
2350
  throw new Error("Expected a YAML collection as document contents");
2351
2351
  }
2352
- class ys extends Error {
2352
+ class bs extends Error {
2353
2353
  constructor(e, t, n, i) {
2354
2354
  super(), this.name = e, this.code = n, this.message = i, this.pos = t;
2355
2355
  }
2356
2356
  }
2357
- class de extends ys {
2357
+ class de extends bs {
2358
2358
  constructor(e, t, n) {
2359
2359
  super("YAMLParseError", e, t, n);
2360
2360
  }
2361
2361
  }
2362
- class bn extends ys {
2362
+ class wn extends bs {
2363
2363
  constructor(e, t, n) {
2364
2364
  super("YAMLWarning", e, t, n);
2365
2365
  }
2366
2366
  }
2367
- const At = (s, e) => (t) => {
2367
+ const vt = (s, e) => (t) => {
2368
2368
  if (t.pos[0] === -1)
2369
2369
  return;
2370
2370
  t.linePos = t.pos.map((l) => e.linePos(l));
@@ -2482,15 +2482,15 @@ function tt(s, e, t) {
2482
2482
  n.indent === s && (n.source === "]" || n.source === "}") && ye(e) && t(n, "BAD_INDENT", "Flow end indicator should be more indented than parent", !0);
2483
2483
  }
2484
2484
  }
2485
- function bs(s, e, t) {
2485
+ function ws(s, e, t) {
2486
2486
  const { uniqueKeys: n } = s.options;
2487
2487
  if (n === !1)
2488
2488
  return !1;
2489
2489
  const i = typeof n == "function" ? n : (r, o) => r === o || I(r) && I(o) && r.value === o.value;
2490
2490
  return e.some((r) => i(r.key, t));
2491
2491
  }
2492
- const vt = "All mapping items must start at the same column";
2493
- function wn({ composeNode: s, composeEmptyNode: e }, t, n, i, r) {
2492
+ const $t = "All mapping items must start at the same column";
2493
+ function Sn({ composeNode: s, composeEmptyNode: e }, t, n, i, r) {
2494
2494
  const o = r?.nodeClass ?? M, l = new o(t.schema);
2495
2495
  t.atRoot && (t.atRoot = !1);
2496
2496
  let a = n.offset, c = null;
@@ -2504,16 +2504,16 @@ function wn({ composeNode: s, composeEmptyNode: e }, t, n, i, r) {
2504
2504
  startOnNewline: !0
2505
2505
  }), m = !h.found;
2506
2506
  if (m) {
2507
- if (f && (f.type === "block-seq" ? i(a, "BLOCK_AS_IMPLICIT_KEY", "A block sequence may not be used as an implicit map key") : "indent" in f && f.indent !== n.indent && i(a, "BAD_INDENT", vt)), !h.anchor && !h.tag && !p) {
2507
+ if (f && (f.type === "block-seq" ? i(a, "BLOCK_AS_IMPLICIT_KEY", "A block sequence may not be used as an implicit map key") : "indent" in f && f.indent !== n.indent && i(a, "BAD_INDENT", $t)), !h.anchor && !h.tag && !p) {
2508
2508
  c = h.end, h.comment && (l.comment ? l.comment += `
2509
2509
  ` + h.comment : l.comment = h.comment);
2510
2510
  continue;
2511
2511
  }
2512
2512
  (h.newlineAfterProp || ye(f)) && i(f ?? u[u.length - 1], "MULTILINE_IMPLICIT_KEY", "Implicit keys need to be on a single line");
2513
- } else h.found?.indent !== n.indent && i(a, "BAD_INDENT", vt);
2513
+ } else h.found?.indent !== n.indent && i(a, "BAD_INDENT", $t);
2514
2514
  t.atKey = !0;
2515
2515
  const b = h.end, w = f ? s(t, f, h, i) : e(t, b, u, null, h, i);
2516
- t.schema.compat && tt(n.indent, f, i), t.atKey = !1, bs(t, l.items, w) && i(b, "DUPLICATE_KEY", "Map keys must be unique");
2516
+ t.schema.compat && tt(n.indent, f, i), t.atKey = !1, ws(t, l.items, w) && i(b, "DUPLICATE_KEY", "Map keys must be unique");
2517
2517
  const S = oe(p ?? [], {
2518
2518
  indicator: "map-value-ind",
2519
2519
  next: g,
@@ -2537,7 +2537,7 @@ function wn({ composeNode: s, composeEmptyNode: e }, t, n, i, r) {
2537
2537
  }
2538
2538
  return c && c < a && i(c, "IMPOSSIBLE", "Map comment with trailing content"), l.range = [n.offset, a, c ?? a], l;
2539
2539
  }
2540
- function Sn({ composeNode: s, composeEmptyNode: e }, t, n, i, r) {
2540
+ function kn({ composeNode: s, composeEmptyNode: e }, t, n, i, r) {
2541
2541
  const o = r?.nodeClass ?? W, l = new o(t.schema);
2542
2542
  t.atRoot && (t.atRoot = !1), t.atKey && (t.atKey = !1);
2543
2543
  let a = n.offset, c = null;
@@ -2590,7 +2590,7 @@ function ke(s, e, t, n) {
2590
2590
  return { comment: i, offset: e };
2591
2591
  }
2592
2592
  const Ye = "Block collections are not allowed within flow collections", Ge = (s) => s && (s.type === "block-map" || s.type === "block-seq");
2593
- function kn({ composeNode: s, composeEmptyNode: e }, t, n, i, r) {
2593
+ function _n({ composeNode: s, composeEmptyNode: e }, t, n, i, r) {
2594
2594
  const o = n.start.source === "{", l = o ? "flow map" : "flow sequence", a = r?.nodeClass ?? (o ? M : W), c = new a(t.schema);
2595
2595
  c.flow = !0;
2596
2596
  const d = t.atRoot;
@@ -2676,12 +2676,12 @@ function kn({ composeNode: s, composeEmptyNode: e }, t, n, i, r) {
2676
2676
  const X = new B(y, q);
2677
2677
  if (t.options.keepSourceTokens && (X.srcToken = b), o) {
2678
2678
  const C = c;
2679
- bs(t, C.items, y) && i(T, "DUPLICATE_KEY", "Map keys must be unique"), C.items.push(X);
2679
+ ws(t, C.items, y) && i(T, "DUPLICATE_KEY", "Map keys must be unique"), C.items.push(X);
2680
2680
  } else {
2681
2681
  const C = new M(t.schema);
2682
2682
  C.flow = !0, C.items.push(X);
2683
- const kt = (q ?? y).range;
2684
- C.range = [y.range[0], kt[1], kt[2]], c.items.push(C);
2683
+ const _t = (q ?? y).range;
2684
+ C.range = [y.range[0], _t[1], _t[2]], c.items.push(C);
2685
2685
  }
2686
2686
  u = q ? q.range[2] : L.end;
2687
2687
  }
@@ -2703,10 +2703,10 @@ function kn({ composeNode: s, composeEmptyNode: e }, t, n, i, r) {
2703
2703
  return c;
2704
2704
  }
2705
2705
  function He(s, e, t, n, i, r) {
2706
- const o = t.type === "block-map" ? wn(s, e, t, n, r) : t.type === "block-seq" ? Sn(s, e, t, n, r) : kn(s, e, t, n, r), l = o.constructor;
2706
+ const o = t.type === "block-map" ? Sn(s, e, t, n, r) : t.type === "block-seq" ? kn(s, e, t, n, r) : _n(s, e, t, n, r), l = o.constructor;
2707
2707
  return i === "!" || i === l.tagName ? (o.tag = l.tagName, o) : (i && (o.tag = i), o);
2708
2708
  }
2709
- function _n(s, e, t, n, i) {
2709
+ function Nn(s, e, t, n, i) {
2710
2710
  const r = n.tag, o = r ? e.directives.tagName(r.source, (f) => i(r, "TAG_RESOLVE_FAILED", f)) : null;
2711
2711
  if (t.type === "block-seq") {
2712
2712
  const { anchor: f, newlineAfterProp: p } = n, g = f && r ? f.offset > r.offset ? f : r : f ?? r;
@@ -2726,11 +2726,11 @@ function _n(s, e, t, n, i) {
2726
2726
  const c = He(s, e, t, i, o, a), d = a.resolve?.(c, (f) => i(r, "TAG_RESOLVE_FAILED", f), e.options) ?? c, u = v(d) ? d : new N(d);
2727
2727
  return u.range = c.range, u.tag = o, a?.format && (u.format = a.format), u;
2728
2728
  }
2729
- function Nn(s, e, t) {
2730
- const n = e.offset, i = On(e, s.options.strict, t);
2729
+ function On(s, e, t) {
2730
+ const n = e.offset, i = En(e, s.options.strict, t);
2731
2731
  if (!i)
2732
2732
  return { value: "", type: null, comment: "", range: [n, n, n] };
2733
- const r = i.mode === ">" ? N.BLOCK_FOLDED : N.BLOCK_LITERAL, o = e.source ? En(e.source) : [];
2733
+ const r = i.mode === ">" ? N.BLOCK_FOLDED : N.BLOCK_LITERAL, o = e.source ? Tn(e.source) : [];
2734
2734
  let l = o.length;
2735
2735
  for (let h = o.length - 1; h >= 0; --h) {
2736
2736
  const m = o[h][1];
@@ -2799,7 +2799,7 @@ function Nn(s, e, t) {
2799
2799
  const g = n + i.length + e.source.length;
2800
2800
  return { value: u, type: r, comment: i.comment, range: [n, g, g] };
2801
2801
  }
2802
- function On({ offset: s, props: e }, t, n) {
2802
+ function En({ offset: s, props: e }, t, n) {
2803
2803
  if (e[0].type !== "block-scalar-header")
2804
2804
  return n(e[0], "IMPOSSIBLE", "Block scalar header not found"), null;
2805
2805
  const { source: i } = e[0], r = i[0];
@@ -2841,25 +2841,25 @@ function On({ offset: s, props: e }, t, n) {
2841
2841
  }
2842
2842
  return { mode: r, indent: o, chomp: l, comment: d, length: u };
2843
2843
  }
2844
- function En(s) {
2844
+ function Tn(s) {
2845
2845
  const e = s.split(/\n( *)/), t = e[0], n = t.match(/^( *)/), r = [n?.[1] ? [n[1], t.slice(n[1].length)] : ["", t]];
2846
2846
  for (let o = 1; o < e.length; o += 2)
2847
2847
  r.push([e[o], e[o + 1]]);
2848
2848
  return r;
2849
2849
  }
2850
- function Tn(s, e, t) {
2850
+ function In(s, e, t) {
2851
2851
  const { offset: n, type: i, source: r, end: o } = s;
2852
2852
  let l, a;
2853
2853
  const c = (f, p, g) => t(n + f, p, g);
2854
2854
  switch (i) {
2855
2855
  case "scalar":
2856
- l = N.PLAIN, a = In(r, c);
2856
+ l = N.PLAIN, a = An(r, c);
2857
2857
  break;
2858
2858
  case "single-quoted-scalar":
2859
- l = N.QUOTE_SINGLE, a = An(r, c);
2859
+ l = N.QUOTE_SINGLE, a = vn(r, c);
2860
2860
  break;
2861
2861
  case "double-quoted-scalar":
2862
- l = N.QUOTE_DOUBLE, a = vn(r, c);
2862
+ l = N.QUOTE_DOUBLE, a = $n(r, c);
2863
2863
  break;
2864
2864
  /* istanbul ignore next should not happen */
2865
2865
  default:
@@ -2878,7 +2878,7 @@ function Tn(s, e, t) {
2878
2878
  range: [n, d, u.offset]
2879
2879
  };
2880
2880
  }
2881
- function In(s, e) {
2881
+ function An(s, e) {
2882
2882
  let t = "";
2883
2883
  switch (s[0]) {
2884
2884
  /* istanbul ignore next should not happen */
@@ -2902,12 +2902,12 @@ function In(s, e) {
2902
2902
  break;
2903
2903
  }
2904
2904
  }
2905
- return t && e(0, "BAD_SCALAR_START", `Plain value cannot start with ${t}`), ws(s);
2905
+ return t && e(0, "BAD_SCALAR_START", `Plain value cannot start with ${t}`), Ss(s);
2906
2906
  }
2907
- function An(s, e) {
2908
- return (s[s.length - 1] !== "'" || s.length === 1) && e(s.length, "MISSING_CHAR", "Missing closing 'quote"), ws(s.slice(1, -1)).replace(/''/g, "'");
2907
+ function vn(s, e) {
2908
+ return (s[s.length - 1] !== "'" || s.length === 1) && e(s.length, "MISSING_CHAR", "Missing closing 'quote"), Ss(s.slice(1, -1)).replace(/''/g, "'");
2909
2909
  }
2910
- function ws(s) {
2910
+ function Ss(s) {
2911
2911
  let e, t;
2912
2912
  try {
2913
2913
  e = new RegExp(`(.*?)(?<![ ])[ ]*\r?
@@ -2927,7 +2927,7 @@ function ws(s) {
2927
2927
  const l = /[ \t]*(.*)/sy;
2928
2928
  return l.lastIndex = o, n = l.exec(s), i + r + (n?.[1] ?? "");
2929
2929
  }
2930
- function vn(s, e) {
2930
+ function $n(s, e) {
2931
2931
  let t = "";
2932
2932
  for (let n = 1; n < s.length - 1; ++n) {
2933
2933
  const i = s[n];
@@ -2935,11 +2935,11 @@ function vn(s, e) {
2935
2935
  `))
2936
2936
  if (i === `
2937
2937
  `) {
2938
- const { fold: r, offset: o } = $n(s, n);
2938
+ const { fold: r, offset: o } = Ln(s, n);
2939
2939
  t += r, n = o;
2940
2940
  } else if (i === "\\") {
2941
2941
  let r = s[++n];
2942
- const o = Ln[r];
2942
+ const o = Cn[r];
2943
2943
  if (o)
2944
2944
  t += o;
2945
2945
  else if (r === `
@@ -2952,7 +2952,7 @@ function vn(s, e) {
2952
2952
  r = s[++n + 1];
2953
2953
  else if (r === "x" || r === "u" || r === "U") {
2954
2954
  const l = { x: 2, u: 4, U: 8 }[r];
2955
- t += Cn(s, n + 1, l, e), n += l;
2955
+ t += jn(s, n + 1, l, e), n += l;
2956
2956
  } else {
2957
2957
  const l = s.substr(n - 1, 2);
2958
2958
  e(n - 1, "BAD_DQ_ESCAPE", `Invalid escape sequence ${l}`), t += l;
@@ -2970,7 +2970,7 @@ function vn(s, e) {
2970
2970
  }
2971
2971
  return (s[s.length - 1] !== '"' || s.length === 1) && e(s.length, "MISSING_CHAR", 'Missing closing "quote'), t;
2972
2972
  }
2973
- function $n(s, e) {
2973
+ function Ln(s, e) {
2974
2974
  let t = "", n = s[e + 1];
2975
2975
  for (; (n === " " || n === " " || n === `
2976
2976
  ` || n === "\r") && !(n === "\r" && s[e + 2] !== `
@@ -2980,7 +2980,7 @@ function $n(s, e) {
2980
2980
  `), e += 1, n = s[e + 1];
2981
2981
  return t || (t = " "), { fold: t, offset: e };
2982
2982
  }
2983
- const Ln = {
2983
+ const Cn = {
2984
2984
  0: "\0",
2985
2985
  // null character
2986
2986
  a: "\x07",
@@ -3014,7 +3014,7 @@ const Ln = {
3014
3014
  "\\": "\\",
3015
3015
  " ": " "
3016
3016
  };
3017
- function Cn(s, e, t, n) {
3017
+ function jn(s, e, t, n) {
3018
3018
  const i = s.substr(e, t), o = i.length === t && /^[0-9a-fA-F]+$/.test(i) ? parseInt(i, 16) : NaN;
3019
3019
  if (isNaN(o)) {
3020
3020
  const l = s.substr(e - 2, t + 2);
@@ -3022,10 +3022,10 @@ function Cn(s, e, t, n) {
3022
3022
  }
3023
3023
  return String.fromCodePoint(o);
3024
3024
  }
3025
- function Ss(s, e, t, n) {
3026
- const { value: i, type: r, comment: o, range: l } = e.type === "block-scalar" ? Nn(s, e, n) : Tn(e, s.options.strict, n), a = t ? s.directives.tagName(t.source, (u) => n(t, "TAG_RESOLVE_FAILED", u)) : null;
3025
+ function ks(s, e, t, n) {
3026
+ const { value: i, type: r, comment: o, range: l } = e.type === "block-scalar" ? On(s, e, n) : In(e, s.options.strict, n), a = t ? s.directives.tagName(t.source, (u) => n(t, "TAG_RESOLVE_FAILED", u)) : null;
3027
3027
  let c;
3028
- s.options.stringKeys && s.atKey ? c = s.schema[R] : a ? c = jn(s.schema, i, a, t, n) : e.type === "scalar" ? c = Bn(s, i, e, n) : c = s.schema[R];
3028
+ s.options.stringKeys && s.atKey ? c = s.schema[R] : a ? c = Bn(s.schema, i, a, t, n) : e.type === "scalar" ? c = Mn(s, i, e, n) : c = s.schema[R];
3029
3029
  let d;
3030
3030
  try {
3031
3031
  const u = c.resolve(i, (f) => n(t ?? e, "TAG_RESOLVE_FAILED", f), s.options);
@@ -3036,7 +3036,7 @@ function Ss(s, e, t, n) {
3036
3036
  }
3037
3037
  return d.range = l, d.source = i, r && (d.type = r), a && (d.tag = a), c.format && (d.format = c.format), o && (d.comment = o), d;
3038
3038
  }
3039
- function jn(s, e, t, n, i) {
3039
+ function Bn(s, e, t, n, i) {
3040
3040
  if (t === "!")
3041
3041
  return s[R];
3042
3042
  const r = [];
@@ -3052,7 +3052,7 @@ function jn(s, e, t, n, i) {
3052
3052
  const o = s.knownTags[t];
3053
3053
  return o && !o.collection ? (s.tags.push(Object.assign({}, o, { default: !1, test: void 0 })), o) : (i(n, "TAG_RESOLVE_FAILED", `Unresolved tag: ${t}`, t !== "tag:yaml.org,2002:str"), s[R]);
3054
3054
  }
3055
- function Bn({ atKey: s, directives: e, schema: t }, n, i, r) {
3055
+ function Mn({ atKey: s, directives: e, schema: t }, n, i, r) {
3056
3056
  const o = t.tags.find((l) => (l.default === !0 || s && l.default === "key") && l.test?.test(n)) || t[R];
3057
3057
  if (t.compat) {
3058
3058
  const l = t.compat.find((a) => a.default && a.test?.test(n)) ?? t[R];
@@ -3063,7 +3063,7 @@ function Bn({ atKey: s, directives: e, schema: t }, n, i, r) {
3063
3063
  }
3064
3064
  return o;
3065
3065
  }
3066
- function Mn(s, e, t) {
3066
+ function Pn(s, e, t) {
3067
3067
  if (e) {
3068
3068
  t ?? (t = e.length);
3069
3069
  for (let n = t - 1; n >= 0; --n) {
@@ -3082,24 +3082,24 @@ function Mn(s, e, t) {
3082
3082
  }
3083
3083
  return s;
3084
3084
  }
3085
- const Pn = { composeNode: ks, composeEmptyNode: St };
3086
- function ks(s, e, t, n) {
3085
+ const Dn = { composeNode: _s, composeEmptyNode: St };
3086
+ function _s(s, e, t, n) {
3087
3087
  const i = s.atKey, { spaceBefore: r, comment: o, anchor: l, tag: a } = t;
3088
3088
  let c, d = !0;
3089
3089
  switch (e.type) {
3090
3090
  case "alias":
3091
- c = Dn(s, e, n), (l || a) && n(e, "ALIAS_PROPS", "An alias node must not specify any properties");
3091
+ c = xn(s, e, n), (l || a) && n(e, "ALIAS_PROPS", "An alias node must not specify any properties");
3092
3092
  break;
3093
3093
  case "scalar":
3094
3094
  case "single-quoted-scalar":
3095
3095
  case "double-quoted-scalar":
3096
3096
  case "block-scalar":
3097
- c = Ss(s, e, a, n), l && (c.anchor = l.source.substring(1));
3097
+ c = ks(s, e, a, n), l && (c.anchor = l.source.substring(1));
3098
3098
  break;
3099
3099
  case "block-map":
3100
3100
  case "block-seq":
3101
3101
  case "flow-collection":
3102
- c = _n(Pn, s, e, t, n), l && (c.anchor = l.source.substring(1));
3102
+ c = Nn(Dn, s, e, t, n), l && (c.anchor = l.source.substring(1));
3103
3103
  break;
3104
3104
  default: {
3105
3105
  const u = e.type === "error" ? e.message : `Unsupported token (type: ${e.type})`;
@@ -3111,19 +3111,19 @@ function ks(s, e, t, n) {
3111
3111
  function St(s, e, t, n, { spaceBefore: i, comment: r, anchor: o, tag: l, end: a }, c) {
3112
3112
  const d = {
3113
3113
  type: "scalar",
3114
- offset: Mn(e, t, n),
3114
+ offset: Pn(e, t, n),
3115
3115
  indent: -1,
3116
3116
  source: ""
3117
- }, u = Ss(s, d, l, c);
3117
+ }, u = ks(s, d, l, c);
3118
3118
  return o && (u.anchor = o.source.substring(1), u.anchor === "" && c(o, "BAD_ALIAS", "Anchor cannot be an empty string")), i && (u.spaceBefore = !0), r && (u.comment = r, u.range[2] = a), u;
3119
3119
  }
3120
- function Dn({ options: s }, { offset: e, source: t, end: n }, i) {
3120
+ function xn({ options: s }, { offset: e, source: t, end: n }, i) {
3121
3121
  const r = new at(t.substring(1));
3122
3122
  r.source === "" && i(e, "BAD_ALIAS", "Alias cannot be an empty string"), r.source.endsWith(":") && i(e + t.length - 1, "BAD_ALIAS", "Alias ending in : is ambiguous", !0);
3123
3123
  const o = e + t.length, l = ke(n, o, s.strict, i);
3124
3124
  return r.range = [e, o, l.offset], l.comment && (r.comment = l.comment), r;
3125
3125
  }
3126
- function xn(s, e, { offset: t, start: n, value: i, end: r }, o) {
3126
+ function Kn(s, e, { offset: t, start: n, value: i, end: r }, o) {
3127
3127
  const l = Object.assign({ _directives: e }, s), a = new qe(void 0, l), c = {
3128
3128
  atKey: !1,
3129
3129
  atRoot: !0,
@@ -3138,7 +3138,7 @@ function xn(s, e, { offset: t, start: n, value: i, end: r }, o) {
3138
3138
  parentIndent: 0,
3139
3139
  startOnNewline: !0
3140
3140
  });
3141
- d.found && (a.directives.docStart = !0, i && (i.type === "block-map" || i.type === "block-seq") && !d.hasNewline && o(d.end, "MISSING_CHAR", "Block collection cannot start on same line with directives-end marker")), a.contents = i ? ks(c, i, d, o) : St(c, d.end, n, null, d, o);
3141
+ d.found && (a.directives.docStart = !0, i && (i.type === "block-map" || i.type === "block-seq") && !d.hasNewline && o(d.end, "MISSING_CHAR", "Block collection cannot start on same line with directives-end marker")), a.contents = i ? _s(c, i, d, o) : St(c, d.end, n, null, d, o);
3142
3142
  const u = a.contents.range[2], f = ke(r, u, !1, o);
3143
3143
  return f.comment && (a.comment = f.comment), a.range = [t, u, f.offset], a;
3144
3144
  }
@@ -3150,7 +3150,7 @@ function ue(s) {
3150
3150
  const { offset: e, source: t } = s;
3151
3151
  return [e, e + (typeof t == "string" ? t.length : 1)];
3152
3152
  }
3153
- function $t(s) {
3153
+ function Lt(s) {
3154
3154
  let e = "", t = !1, n = !1;
3155
3155
  for (let i = 0; i < s.length; ++i) {
3156
3156
  const r = s[i];
@@ -3170,15 +3170,15 @@ function $t(s) {
3170
3170
  }
3171
3171
  return { comment: e, afterEmptyLine: n };
3172
3172
  }
3173
- class Kn {
3173
+ class Rn {
3174
3174
  constructor(e = {}) {
3175
3175
  this.doc = null, this.atDirectives = !1, this.prelude = [], this.errors = [], this.warnings = [], this.onError = (t, n, i, r) => {
3176
3176
  const o = ue(t);
3177
- r ? this.warnings.push(new bn(o, n, i)) : this.errors.push(new de(o, n, i));
3177
+ r ? this.warnings.push(new wn(o, n, i)) : this.errors.push(new de(o, n, i));
3178
3178
  }, this.directives = new j({ version: e.version || "1.2" }), this.options = e;
3179
3179
  }
3180
3180
  decorate(e, t) {
3181
- const { comment: n, afterEmptyLine: i } = $t(this.prelude);
3181
+ const { comment: n, afterEmptyLine: i } = Lt(this.prelude);
3182
3182
  if (n) {
3183
3183
  const r = e.contents;
3184
3184
  if (t)
@@ -3207,7 +3207,7 @@ ${o}` : n;
3207
3207
  */
3208
3208
  streamInfo() {
3209
3209
  return {
3210
- comment: $t(this.prelude).comment,
3210
+ comment: Lt(this.prelude).comment,
3211
3211
  directives: this.directives,
3212
3212
  errors: this.errors,
3213
3213
  warnings: this.warnings
@@ -3234,7 +3234,7 @@ ${o}` : n;
3234
3234
  }), this.prelude.push(e.source), this.atDirectives = !0;
3235
3235
  break;
3236
3236
  case "document": {
3237
- const t = xn(this.options, this.directives, e, this.onError);
3237
+ const t = Kn(this.options, this.directives, e, this.onError);
3238
3238
  this.atDirectives && !t.directives.docStart && this.onError(e, "MISSING_CHAR", "Missing directives-end/doc-start indicator line"), this.decorate(t, !1), this.doc && (yield this.doc), this.doc = t, this.atDirectives = !1;
3239
3239
  break;
3240
3240
  }
@@ -3285,14 +3285,14 @@ ${t.comment}` : t.comment;
3285
3285
  }
3286
3286
  }
3287
3287
  }
3288
- const _s = "\uFEFF", Ns = "", Os = "", st = "";
3289
- function Rn(s) {
3288
+ const Ns = "\uFEFF", Os = "", Es = "", st = "";
3289
+ function Un(s) {
3290
3290
  switch (s) {
3291
- case _s:
3292
- return "byte-order-mark";
3293
3291
  case Ns:
3294
- return "doc-mode";
3292
+ return "byte-order-mark";
3295
3293
  case Os:
3294
+ return "doc-mode";
3295
+ case Es:
3296
3296
  return "flow-error-end";
3297
3297
  case st:
3298
3298
  return "scalar";
@@ -3360,9 +3360,9 @@ function x(s) {
3360
3360
  return !1;
3361
3361
  }
3362
3362
  }
3363
- const Lt = new Set("0123456789ABCDEFabcdef"), Un = new Set("0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-#;/?:@&=+$_.!~*'()"), Te = new Set(",[]{}"), Fn = new Set(` ,[]{}
3364
- \r `), We = (s) => !s || Fn.has(s);
3365
- class qn {
3363
+ const Ct = new Set("0123456789ABCDEFabcdef"), Fn = new Set("0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-#;/?:@&=+$_.!~*'()"), Te = new Set(",[]{}"), qn = new Set(` ,[]{}
3364
+ \r `), We = (s) => !s || qn.has(s);
3365
+ class Vn {
3366
3366
  constructor() {
3367
3367
  this.atEnd = !1, this.blockScalarIndent = -1, this.blockScalarKeep = !1, this.buffer = "", this.flowKey = !1, this.flowLevel = 0, this.indentNext = 0, this.indentValue = 0, this.lineEndPos = null, this.next = null, this.pos = 0;
3368
3368
  }
@@ -3454,7 +3454,7 @@ class qn {
3454
3454
  let e = this.getLine();
3455
3455
  if (e === null)
3456
3456
  return this.setNext("stream");
3457
- if (e[0] === _s && (yield* this.pushCount(1), e = e.substring(1)), e[0] === "%") {
3457
+ if (e[0] === Ns && (yield* this.pushCount(1), e = e.substring(1)), e[0] === "%") {
3458
3458
  let t = e.length, n = e.indexOf("#");
3459
3459
  for (; n !== -1; ) {
3460
3460
  const r = e[n - 1];
@@ -3478,7 +3478,7 @@ class qn {
3478
3478
  const t = yield* this.pushSpaces(!0);
3479
3479
  return yield* this.pushCount(e.length - t), yield* this.pushNewline(), "stream";
3480
3480
  }
3481
- return yield Ns, yield* this.parseLineStart();
3481
+ return yield Os, yield* this.parseLineStart();
3482
3482
  }
3483
3483
  *parseLineStart() {
3484
3484
  const e = this.charAt(0);
@@ -3542,7 +3542,7 @@ class qn {
3542
3542
  if (i === null)
3543
3543
  return this.setNext("flow");
3544
3544
  if ((n !== -1 && n < this.indentNext && i[0] !== "#" || n === 0 && (i.startsWith("---") || i.startsWith("...")) && x(i[3])) && !(n === this.indentNext - 1 && this.flowLevel === 1 && (i[0] === "]" || i[0] === "}")))
3545
- return this.flowLevel = 0, yield Os, yield* this.parseLineStart();
3545
+ return this.flowLevel = 0, yield Es, yield* this.parseLineStart();
3546
3546
  let r = 0;
3547
3547
  for (; i[r] === ","; )
3548
3548
  r += yield* this.pushCount(1), r += yield* this.pushSpaces(!0), this.flowKey = !1;
@@ -3747,9 +3747,9 @@ class qn {
3747
3747
  } else {
3748
3748
  let e = this.pos + 1, t = this.buffer[e];
3749
3749
  for (; t; )
3750
- if (Un.has(t))
3750
+ if (Fn.has(t))
3751
3751
  t = this.buffer[++e];
3752
- else if (t === "%" && Lt.has(this.buffer[e + 1]) && Lt.has(this.buffer[e + 2]))
3752
+ else if (t === "%" && Ct.has(this.buffer[e + 1]) && Ct.has(this.buffer[e + 2]))
3753
3753
  t = this.buffer[e += 3];
3754
3754
  else
3755
3755
  break;
@@ -3777,7 +3777,7 @@ class qn {
3777
3777
  return yield* this.pushToIndex(t, !1);
3778
3778
  }
3779
3779
  }
3780
- class Vn {
3780
+ class Jn {
3781
3781
  constructor() {
3782
3782
  this.lineStarts = [], this.addNewLine = (e) => this.lineStarts.push(e), this.linePos = (e) => {
3783
3783
  let t = 0, n = this.lineStarts.length;
@@ -3800,7 +3800,7 @@ function V(s, e) {
3800
3800
  return !0;
3801
3801
  return !1;
3802
3802
  }
3803
- function Ct(s) {
3803
+ function jt(s) {
3804
3804
  for (let e = 0; e < s.length; ++e)
3805
3805
  switch (s[e].type) {
3806
3806
  case "space":
@@ -3812,7 +3812,7 @@ function Ct(s) {
3812
3812
  }
3813
3813
  return -1;
3814
3814
  }
3815
- function Es(s) {
3815
+ function Ts(s) {
3816
3816
  switch (s?.type) {
3817
3817
  case "alias":
3818
3818
  case "scalar":
@@ -3856,18 +3856,18 @@ function Z(s) {
3856
3856
  ;
3857
3857
  return s.splice(e, s.length);
3858
3858
  }
3859
- function jt(s) {
3859
+ function Bt(s) {
3860
3860
  if (s.start.type === "flow-seq-start")
3861
3861
  for (const e of s.items)
3862
- e.sep && !e.value && !V(e.start, "explicit-key-ind") && !V(e.sep, "map-value-ind") && (e.key && (e.value = e.key), delete e.key, Es(e.value) ? e.value.end ? Array.prototype.push.apply(e.value.end, e.sep) : e.value.end = e.sep : Array.prototype.push.apply(e.start, e.sep), delete e.sep);
3862
+ e.sep && !e.value && !V(e.start, "explicit-key-ind") && !V(e.sep, "map-value-ind") && (e.key && (e.value = e.key), delete e.key, Ts(e.value) ? e.value.end ? Array.prototype.push.apply(e.value.end, e.sep) : e.value.end = e.sep : Array.prototype.push.apply(e.start, e.sep), delete e.sep);
3863
3863
  }
3864
- class Jn {
3864
+ class Yn {
3865
3865
  /**
3866
3866
  * @param onNewLine - If defined, called separately with the start position of
3867
3867
  * each new line (in `parse()`, including the start of input).
3868
3868
  */
3869
3869
  constructor(e) {
3870
- this.atNewLine = !0, this.atScalar = !1, this.indent = 0, this.offset = 0, this.onKeyLine = !1, this.stack = [], this.source = "", this.type = "", this.lexer = new qn(), this.onNewLine = e;
3870
+ this.atNewLine = !0, this.atScalar = !1, this.indent = 0, this.offset = 0, this.onKeyLine = !1, this.stack = [], this.source = "", this.type = "", this.lexer = new Vn(), this.onNewLine = e;
3871
3871
  }
3872
3872
  /**
3873
3873
  * Parse `source` as a YAML stream.
@@ -3891,7 +3891,7 @@ class Jn {
3891
3891
  this.atScalar = !1, yield* this.step(), this.offset += e.length;
3892
3892
  return;
3893
3893
  }
3894
- const t = Rn(e);
3894
+ const t = Un(e);
3895
3895
  if (t)
3896
3896
  if (t === "scalar")
3897
3897
  this.atNewLine = !1, this.atScalar = !0, this.type = "scalar";
@@ -3980,7 +3980,7 @@ class Jn {
3980
3980
  yield t;
3981
3981
  else {
3982
3982
  const n = this.peek(1);
3983
- switch (t.type === "block-scalar" ? t.indent = "indent" in n ? n.indent : 0 : t.type === "flow-collection" && n.type === "document" && (t.indent = 0), t.type === "flow-collection" && jt(t), n.type) {
3983
+ switch (t.type === "block-scalar" ? t.indent = "indent" in n ? n.indent : 0 : t.type === "flow-collection" && n.type === "document" && (t.indent = 0), t.type === "flow-collection" && Bt(t), n.type) {
3984
3984
  case "document":
3985
3985
  n.value = t;
3986
3986
  break;
@@ -4016,7 +4016,7 @@ class Jn {
4016
4016
  }
4017
4017
  if ((n.type === "document" || n.type === "block-map" || n.type === "block-seq") && (t.type === "block-map" || t.type === "block-seq")) {
4018
4018
  const i = t.items[t.items.length - 1];
4019
- i && !i.sep && !i.value && i.start.length > 0 && Ct(i.start) === -1 && (t.indent === 0 || i.start.every((r) => r.type !== "comment" || r.indent < t.indent)) && (n.type === "document" ? n.end = i.start : n.items.push({ start: i.start }), t.items.splice(-1, 1));
4019
+ i && !i.sep && !i.value && i.start.length > 0 && jt(i.start) === -1 && (t.indent === 0 || i.start.every((r) => r.type !== "comment" || r.indent < t.indent)) && (n.type === "document" ? n.end = i.start : n.items.push({ start: i.start }), t.items.splice(-1, 1));
4020
4020
  }
4021
4021
  }
4022
4022
  }
@@ -4054,7 +4054,7 @@ class Jn {
4054
4054
  return yield* this.lineEnd(e);
4055
4055
  switch (this.type) {
4056
4056
  case "doc-start": {
4057
- Ct(e.start) !== -1 ? (yield* this.pop(), yield* this.step()) : e.start.push(this.sourceToken);
4057
+ jt(e.start) !== -1 ? (yield* this.pop(), yield* this.step()) : e.start.push(this.sourceToken);
4058
4058
  return;
4059
4059
  }
4060
4060
  case "anchor":
@@ -4184,7 +4184,7 @@ class Jn {
4184
4184
  indent: this.indent,
4185
4185
  items: [{ start: r, key: null, sep: [this.sourceToken] }]
4186
4186
  });
4187
- else if (Es(t.key) && !V(t.sep, "newline")) {
4187
+ else if (Ts(t.key) && !V(t.sep, "newline")) {
4188
4188
  const o = Z(t.start), l = t.key, a = t.sep;
4189
4189
  a.push(this.sourceToken), delete t.key, delete t.sep, this.stack.push({
4190
4190
  type: "block-map",
@@ -4333,7 +4333,7 @@ class Jn {
4333
4333
  yield* this.pop(), yield* this.step();
4334
4334
  else if (this.type === "map-value-ind" && n.type !== "flow-collection") {
4335
4335
  const i = Ie(n), r = Z(i);
4336
- jt(e);
4336
+ Bt(e);
4337
4337
  const o = e.end.splice(1, e.end.length);
4338
4338
  o.push(this.sourceToken);
4339
4339
  const l = {
@@ -4440,12 +4440,12 @@ class Jn {
4440
4440
  }
4441
4441
  }
4442
4442
  }
4443
- function Yn(s) {
4443
+ function Gn(s) {
4444
4444
  const e = s.prettyErrors !== !1;
4445
- return { lineCounter: s.lineCounter || e && new Vn() || null, prettyErrors: e };
4445
+ return { lineCounter: s.lineCounter || e && new Jn() || null, prettyErrors: e };
4446
4446
  }
4447
- function Gn(s, e = {}) {
4448
- const { lineCounter: t, prettyErrors: n } = Yn(e), i = new Jn(t?.addNewLine), r = new Kn(e);
4447
+ function Hn(s, e = {}) {
4448
+ const { lineCounter: t, prettyErrors: n } = Gn(e), i = new Yn(t?.addNewLine), r = new Rn(e);
4449
4449
  let o = null;
4450
4450
  for (const l of r.compose(i.parse(s), !0, s.length))
4451
4451
  if (!o)
@@ -4454,30 +4454,30 @@ function Gn(s, e = {}) {
4454
4454
  o.errors.push(new de(l.range.slice(0, 2), "MULTIPLE_DOCS", "Source contains multiple documents; please use YAML.parseAllDocuments()"));
4455
4455
  break;
4456
4456
  }
4457
- return n && t && (o.errors.forEach(At(s, t)), o.warnings.forEach(At(s, t))), o;
4457
+ return n && t && (o.errors.forEach(vt(s, t)), o.warnings.forEach(vt(s, t))), o;
4458
4458
  }
4459
- function Hn(s, e, t) {
4459
+ function Wn(s, e, t) {
4460
4460
  let n;
4461
- const i = Gn(s, t);
4461
+ const i = Hn(s, t);
4462
4462
  if (!i)
4463
4463
  return null;
4464
- if (i.warnings.forEach((r) => zt(i.options.logLevel, r)), i.errors.length > 0) {
4464
+ if (i.warnings.forEach((r) => Zt(i.options.logLevel, r)), i.errors.length > 0) {
4465
4465
  if (i.options.logLevel !== "silent")
4466
4466
  throw i.errors[0];
4467
4467
  i.errors = [];
4468
4468
  }
4469
4469
  return i.toJS(Object.assign({ reviver: n }, t));
4470
4470
  }
4471
- function Wn(s) {
4472
- return _t.isAbsolute(s) ? s : _t.resolve(process.cwd(), s);
4471
+ function Qn(s) {
4472
+ return Nt.isAbsolute(s) ? s : Nt.resolve(process.cwd(), s);
4473
4473
  }
4474
- async function Qn(s) {
4474
+ async function Xn(s) {
4475
4475
  if (!s)
4476
4476
  return { on: {} };
4477
- const e = Wn(s), t = await nt(e, "utf8");
4478
- return e.endsWith(".yaml") || e.endsWith(".yml") ? Hn(t) ?? { on: {} } : JSON.parse(t);
4477
+ const e = Qn(s), t = await nt(e, "utf8");
4478
+ return e.endsWith(".yaml") || e.endsWith(".yml") ? Wn(t) ?? { on: {} } : JSON.parse(t);
4479
4479
  }
4480
- function Xn(s) {
4480
+ function zn(s) {
4481
4481
  return s.split(/\r?\n/u).map((e) => e.trim()).filter((e) => e.length > 0 && !e.startsWith("#")).reduce((e, t) => {
4482
4482
  const n = t.indexOf("=");
4483
4483
  if (n <= 0)
@@ -4486,7 +4486,7 @@ function Xn(s) {
4486
4486
  return e[i] = r, e;
4487
4487
  }, {});
4488
4488
  }
4489
- async function zn(s) {
4489
+ async function Zn(s) {
4490
4490
  const e = {};
4491
4491
  for (const [t, n] of Object.entries(process.env))
4492
4492
  typeof n == "string" && (e[t] = n);
@@ -4498,7 +4498,7 @@ async function zn(s) {
4498
4498
  o != null && (e[r] = String(o));
4499
4499
  continue;
4500
4500
  }
4501
- Object.assign(e, Xn(n));
4501
+ Object.assign(e, zn(n));
4502
4502
  }
4503
4503
  return e;
4504
4504
  }
@@ -4508,7 +4508,7 @@ var Qe = function(s, e) {
4508
4508
  (function(s) {
4509
4509
  s[s.EOS = 0] = "EOS", s[s.Text = 1] = "Text", s[s.Incomplete = 2] = "Incomplete", s[s.ESC = 3] = "ESC", s[s.Unknown = 4] = "Unknown", s[s.SGR = 5] = "SGR", s[s.OSCURL = 6] = "OSCURL";
4510
4510
  })(E || (E = {}));
4511
- class Zn {
4511
+ class ei {
4512
4512
  constructor() {
4513
4513
  this.VERSION = "6.0.6", this.setup_palettes(), this._use_classes = !1, this.bold = !1, this.faint = !1, this.italic = !1, this.underline = !1, this.fg = this.bg = null, this._buffer = "", this._url_allowlist = { http: 1, https: 1 }, this._escape_html = !0, this.boldStyle = "font-weight:bold", this.faintStyle = "opacity:0.7", this.italicStyle = "font-style:italic", this.underlineStyle = "text-decoration:underline";
4514
4514
  }
@@ -4632,7 +4632,7 @@ class Zn {
4632
4632
  if (i != "[" && i != "]" && i != "(")
4633
4633
  return e.kind = E.ESC, e.text = this._buffer.slice(0, 1), this._buffer = this._buffer.slice(1), e;
4634
4634
  if (i == "[") {
4635
- this._csi_regex || (this._csi_regex = Bt(Mt || (Mt = Qe([`
4635
+ this._csi_regex || (this._csi_regex = Mt(Pt || (Pt = Qe([`
4636
4636
  ^ # beginning of line
4637
4637
  #
4638
4638
  # First attempt
@@ -4680,7 +4680,7 @@ class Zn {
4680
4680
  return e.kind = E.Incomplete, e;
4681
4681
  if (this._buffer.charAt(2) != "8" || this._buffer.charAt(3) != ";")
4682
4682
  return e.kind = E.ESC, e.text = this._buffer.slice(0, 1), this._buffer = this._buffer.slice(1), e;
4683
- this._osc_st || (this._osc_st = ei(Pt || (Pt = Qe([`
4683
+ this._osc_st || (this._osc_st = ti(Dt || (Dt = Qe([`
4684
4684
  (?: # legal sequence
4685
4685
  (\x1B\\) # ESC | # alternate
4686
4686
  (\x07) # BEL (what xterm did)
@@ -4722,7 +4722,7 @@ class Zn {
4722
4722
  if (a[3])
4723
4723
  return e.kind = E.ESC, e.text = this._buffer.slice(0, 1), this._buffer = this._buffer.slice(1), e;
4724
4724
  }
4725
- this._osc_regex || (this._osc_regex = Bt(Dt || (Dt = Qe([`
4725
+ this._osc_regex || (this._osc_regex = Mt(xt || (xt = Qe([`
4726
4726
  ^ # beginning of line
4727
4727
  #
4728
4728
  \x1B]8; # OSC Hyperlink
@@ -4846,19 +4846,20 @@ class Zn {
4846
4846
  return t.length < 1 || !this._url_allowlist[t[0]] ? "" : `<a href="${this.escape_txt_for_html(e.url)}">${this.escape_txt_for_html(e.text)}</a>`;
4847
4847
  }
4848
4848
  }
4849
- function Bt(s, ...e) {
4849
+ function Mt(s, ...e) {
4850
4850
  let t = s.raw[0], n = /^\s+|\s+\n|\s*#[\s\S]*?\n|\n/gm, i = t.replace(n, "");
4851
4851
  return new RegExp(i);
4852
4852
  }
4853
- function ei(s, ...e) {
4853
+ function ti(s, ...e) {
4854
4854
  let t = s.raw[0], n = /^\s+|\s+\n|\s*#[\s\S]*?\n|\n/gm, i = t.replace(n, "");
4855
4855
  return new RegExp(i, "g");
4856
4856
  }
4857
- var Mt, Pt, Dt;
4858
- const xt = new Zn(), Ts = it(Ut(), "workflow-reports");
4859
- async function ti(s, e) {
4857
+ var Pt, Dt, xt;
4858
+ const Kt = new ei(), kt = it(Ft(), "workflow-reports");
4859
+ js(kt, { recursive: !0 });
4860
+ async function si(s, e) {
4860
4861
  try {
4861
- const t = it(Ts, `${s.id}.json`);
4862
+ const t = it(kt, `${s.id}.json`);
4862
4863
  await $s(
4863
4864
  t,
4864
4865
  JSON.stringify({ ...s, outputs: e }, null, 2),
@@ -4869,15 +4870,15 @@ async function ti(s, e) {
4869
4870
  console.error("Error writing report:", n);
4870
4871
  }
4871
4872
  }
4872
- async function si(s) {
4873
+ async function ni(s) {
4873
4874
  try {
4874
- return await import(it(Ts, `${s}.json`), { assert: { type: "json" } });
4875
+ return await import(it(kt, `${s}.json`), { assert: { type: "json" } });
4875
4876
  } catch (e) {
4876
4877
  const t = e instanceof Error ? e.message : String(e);
4877
4878
  return console.error("Error reading report:", t), null;
4878
4879
  }
4879
4880
  }
4880
- const ni = `<!DOCTYPE html>
4881
+ const ii = `<!DOCTYPE html>
4881
4882
  <html lang="en">
4882
4883
  <head>
4883
4884
  <meta charset="UTF-8">
@@ -4892,7 +4893,7 @@ const ni = `<!DOCTYPE html>
4892
4893
  </div>
4893
4894
  </body>
4894
4895
  </html>`;
4895
- async function Kt(s) {
4896
+ async function Rt(s) {
4896
4897
  return s ? `<!DOCTYPE html>
4897
4898
  <html lang="en">
4898
4899
  <head>
@@ -4909,10 +4910,10 @@ ${s.outputs.map(
4909
4910
  <div class="mb-6">
4910
4911
  <h2 class="text-xl font-semibold mb-2">Step ${n + 1}: ${t.cmd} (${t.code})</h2>
4911
4912
  <div class="bg-gray-800 text-green-400 p-4 rounded mb-2 overflow-x-auto">
4912
- <pre>${xt.ansi_to_html(t.stdout)}</pre>
4913
+ <pre>${Kt.ansi_to_html(t.stdout)}</pre>
4913
4914
  </div>
4914
4915
  <div class="bg-gray-800 text-red-400 p-4 rounded overflow-x-auto">
4915
- <pre>${xt.ansi_to_html(t.stderr)}</pre>
4916
+ <pre>${Kt.ansi_to_html(t.stderr)}</pre>
4916
4917
  </div>
4917
4918
  </div>
4918
4919
  `
@@ -4925,16 +4926,16 @@ ${s.children && s.children.length > 0 ? `<div class="mt-2">Child Reports:<ul>${s
4925
4926
 
4926
4927
  </div>
4927
4928
  </body>
4928
- </html>` : ni;
4929
+ </html>` : ii;
4929
4930
  }
4930
- const ii = "/workspace", ri = "dhi.io/alpine-base:3.23-alpine3.23-dev";
4931
- function oi(s, e) {
4931
+ const ri = "/workspace", oi = "dhi.io/alpine-base:3.23-alpine3.23-dev";
4932
+ function li(s, e) {
4932
4933
  if (typeof s.run != "string")
4933
4934
  throw new Error("Each workflow step must have a 'run' command string.");
4934
4935
  const t = e.workflow.defaults || {};
4935
- return s.image ||= t.image || ri, s.volumes ||= t.volumes || {}, s.args ||= t.args || [], s.run = je(s.run, { ...e, step: s }), s;
4936
+ return s.image ||= t.image || oi, s.volumes ||= t.volumes || {}, s.args ||= t.args || [], s.run = je(s.run, { ...e, step: s }), s;
4936
4937
  }
4937
- function li(s, e) {
4938
+ function ai(s, e) {
4938
4939
  return (s || []).flatMap(
4939
4940
  (t) => Object.entries(t).flatMap(([n, i]) => [
4940
4941
  `--${n}`,
@@ -4942,13 +4943,13 @@ function li(s, e) {
4942
4943
  ])
4943
4944
  );
4944
4945
  }
4945
- function ai(s, e) {
4946
- return s["."] ||= ii, Object.entries(s).flatMap(([t, n]) => [
4946
+ function ci(s, e) {
4947
+ return s["."] ||= ri, Object.entries(s).flatMap(([t, n]) => [
4947
4948
  "-v",
4948
4949
  `${t === "." ? e.workingDir : t}:${n}`
4949
4950
  ]);
4950
4951
  }
4951
- function ci(s) {
4952
+ function fi(s) {
4952
4953
  const { workflow: e, secrets: t } = s, n = {
4953
4954
  ...process.env,
4954
4955
  ...Object.fromEntries(
@@ -4964,7 +4965,7 @@ function ci(s) {
4964
4965
  }
4965
4966
  Object.assign(s.env, n);
4966
4967
  }
4967
- function fi(s, e) {
4968
+ function ui(s, e) {
4968
4969
  const t = Object.keys(s), n = Object.keys(e.on), i = n.find((l) => s[l]), r = i ? e.on[i] : null;
4969
4970
  if (!r)
4970
4971
  return console.log(
@@ -4980,9 +4981,9 @@ function fi(s, e) {
4980
4981
  event: o
4981
4982
  };
4982
4983
  }
4983
- async function ui(s, e) {
4984
+ async function hi(s, e) {
4984
4985
  typeof s == "string" && (s = { run: s });
4985
- const t = oi(s, e), { args: n, image: i, volumes: r } = t, o = ai(r, e), l = li(n, e), a = r["."], c = [
4986
+ const t = li(s, e), { args: n, image: i, volumes: r } = t, o = ci(r, e), l = ai(n, e), a = r["."], c = [
4986
4987
  "run",
4987
4988
  "-i",
4988
4989
  "--rm",
@@ -4995,7 +4996,7 @@ async function ui(s, e) {
4995
4996
  i
4996
4997
  ];
4997
4998
  return new Promise((d, u) => {
4998
- const f = Rt("docker", c, {
4999
+ const f = Ut("docker", c, {
4999
5000
  env: e.env
5000
5001
  }), p = [], g = [];
5001
5002
  f.stdout?.on("data", (h) => {
@@ -5016,10 +5017,10 @@ exit $?;
5016
5017
  });
5017
5018
  }
5018
5019
  async function Is(s, e, t) {
5019
- const n = Ms(), i = fi(s, e);
5020
+ const n = Ps(), i = ui(s, e);
5020
5021
  if (!i)
5021
5022
  return { id: n, parentId: t, outputs: [] };
5022
- const { workflow: r, event: o } = i, l = Ds(o, r.mappings), a = await zn(r.secrets), c = await Ls(Bs(Ut(), "workflow")), d = Ft({
5023
+ const { workflow: r, event: o } = i, l = xs(o, r.mappings), a = await Zn(r.secrets), c = await Ls(Ms(Ft(), "workflow")), d = qt({
5023
5024
  inputs: l,
5024
5025
  secrets: a,
5025
5026
  workflow: r,
@@ -5027,11 +5028,11 @@ async function Is(s, e, t) {
5027
5028
  outputs: [],
5028
5029
  workingDir: c
5029
5030
  });
5030
- ci(d);
5031
+ fi(d);
5031
5032
  const u = [];
5032
5033
  try {
5033
5034
  for (const f of r.steps ?? []) {
5034
- const p = await ui(f, d);
5035
+ const p = await hi(f, d);
5035
5036
  if (p.code !== 0)
5036
5037
  throw new Error(
5037
5038
  `Step failed with code ${p.code}.
@@ -5041,7 +5042,7 @@ stderr: ${p.stderr}`
5041
5042
  d.outputs.push(p);
5042
5043
  }
5043
5044
  for (const f of r.triggers ?? []) {
5044
- const p = await hi(f, e, t);
5045
+ const p = await di(f, e, t);
5045
5046
  p && u.push(p.id);
5046
5047
  }
5047
5048
  } catch (f) {
@@ -5050,32 +5051,32 @@ stderr: ${p.stderr}`
5050
5051
  } finally {
5051
5052
  await Cs(d.workingDir, { recursive: !0, force: !0 });
5052
5053
  }
5053
- return await ti({ id: n, parentId: t, children: u }, d.outputs), { id: n, parentId: t, children: u, outputs: d.outputs };
5054
+ return await si({ id: n, parentId: t, children: u }, d.outputs), { id: n, parentId: t, children: u, outputs: d.outputs };
5054
5055
  }
5055
- async function hi(s, e, t) {
5056
- if (!js(s)) {
5056
+ async function di(s, e, t) {
5057
+ if (!Bs(s)) {
5057
5058
  console.warn(`Trigger file does not exist: ${s}`);
5058
5059
  return;
5059
5060
  }
5060
5061
  const n = await nt(s, "utf8"), i = rt(JSON.parse(n));
5061
5062
  return await Is(i, e, t);
5062
5063
  }
5063
- async function di(s) {
5064
+ async function pi(s) {
5064
5065
  if (s.daemon) {
5065
- const i = process.argv.slice(1).filter((l) => l !== "--daemon" && l !== "-d"), r = process.execArgv.concat(i), o = Rt(process.execPath, r, {
5066
+ const i = process.argv.slice(1).filter((l) => l !== "--daemon" && l !== "-d"), r = process.execArgv.concat(i), o = Ut(process.execPath, r, {
5066
5067
  detached: !0,
5067
5068
  stdio: "ignore"
5068
5069
  });
5069
5070
  return console.log(o.pid), o.unref(), null;
5070
5071
  }
5071
- const e = await Qn(s.configPath), t = vs(async (i, r) => {
5072
+ const e = await Xn(s.configPath), t = vs(async (i, r) => {
5072
5073
  if (i.method === "GET" && i.url === "/health") {
5073
5074
  _e(r, 200, { status: "OK" });
5074
5075
  return;
5075
5076
  }
5076
5077
  if (i.method === "GET" && i.url?.startsWith("/logs/")) {
5077
- const o = i.url.split("/logs/")[1], l = await si(o), a = await Kt(l);
5078
- l ? (r.writeHead(200, { "Content-Type": "text/html" }), r.end(a)) : (r.writeHead(404, { "Content-Type": "text/html" }), r.end(Kt(null)));
5078
+ const o = i.url.split("/logs/")[1], l = await ni(o), a = await Rt(l);
5079
+ l ? (r.writeHead(200, { "Content-Type": "text/html" }), r.end(a)) : (r.writeHead(404, { "Content-Type": "text/html" }), r.end(Rt(null)));
5079
5080
  return;
5080
5081
  }
5081
5082
  if (i.method !== "POST") {
@@ -5107,7 +5108,7 @@ async function di(s) {
5107
5108
  const n = t.address();
5108
5109
  return n && typeof n == "object" && console.log(`Started on http://${n.address}:${n.port}`), t;
5109
5110
  }
5110
- const pi = `on - daemonized webhook runner
5111
+ const mi = `on - daemonized webhook runner
5111
5112
 
5112
5113
  Usage:
5113
5114
  on --port <port> [--host <host>] [--config <path>]
@@ -5119,7 +5120,7 @@ Options:
5119
5120
  --config, -c Path to a YAML/JSON config file
5120
5121
  --help, -h Show this help message
5121
5122
  `;
5122
- function mi(s) {
5123
+ function gi(s) {
5123
5124
  const { values: e } = As({
5124
5125
  args: s,
5125
5126
  options: {
@@ -5132,31 +5133,31 @@ function mi(s) {
5132
5133
  allowPositionals: !1
5133
5134
  });
5134
5135
  if (e.help)
5135
- return console.log(pi), null;
5136
+ return console.log(mi), null;
5136
5137
  if (!e.port)
5137
5138
  throw new Error("Missing required option --port.");
5138
5139
  return {
5139
- port: Ps(e.port),
5140
+ port: Ds(e.port),
5140
5141
  host: e.host,
5141
5142
  configPath: e.config,
5142
5143
  daemon: e.daemon
5143
5144
  };
5144
5145
  }
5145
- async function gi() {
5146
+ async function yi() {
5146
5147
  try {
5147
- const s = mi(process.argv.slice(2));
5148
+ const s = gi(process.argv.slice(2));
5148
5149
  if (!s) {
5149
5150
  process.exitCode = 0;
5150
5151
  return;
5151
5152
  }
5152
- await di(s);
5153
+ await pi(s);
5153
5154
  } catch (s) {
5154
5155
  const e = s instanceof Error ? s.message : String(s);
5155
5156
  console.error(`on: ${e}`), process.exitCode = 1;
5156
5157
  }
5157
5158
  }
5158
- gi();
5159
+ yi();
5159
5160
  export {
5160
- gi as main,
5161
- mi as parseCliOptions
5161
+ yi as main,
5162
+ gi as parseCliOptions
5162
5163
  };