@cloud-cli/on 0.1.5 → 0.1.7

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 +389 -387
  2. package/package.json +1 -1
package/dist/on.js CHANGED
@@ -1,17 +1,17 @@
1
1
  #!/usr/bin/env node
2
2
  import { parseArgs as As } from "node:util";
3
3
  import { createServer as vs } from "node:http";
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";
4
+ import { readFile as je, writeFile as $s, mkdtemp as Ls, rm as Cs } from "node:fs/promises";
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,30 +24,30 @@ 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
  }
35
- function je(s, e) {
35
+ function Be(s, e) {
36
36
  const t = Function(
37
37
  "context",
38
38
  "const { secrets = {}, inputs = {}, step = {}, env } = context;return `" + s + "`;"
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 };
46
46
  for (const [n, i] of Object.entries(e))
47
- t.inputs[n] = je(`\${${i}}`, t);
47
+ t.inputs[n] = Be(`\${${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"), ze = /* @__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, Me = (s) => !!s && typeof s == "object" && s[D] === ze, 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);
74
- Be(s) ? ee(null, s.contents, t, Object.freeze([s])) === pe && (s.contents = null) : ee(null, s, t, Object.freeze([]));
73
+ const t = Rs(e);
74
+ Me(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,27 +136,27 @@ 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;
143
143
  else if ($(n))
144
144
  s === "key" ? n.key = t : n.value = t;
145
- else if (Be(n))
145
+ else if (Me(n))
146
146
  n.contents = t;
147
147
  else {
148
148
  const i = Q(n) ? "alias" : "scalar";
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) => {
@@ -367,7 +367,7 @@ class lt {
367
367
  }
368
368
  /** A plain JavaScript representation of this node. */
369
369
  toJS(e, { mapAsMap: t, maxAliasCount: n, onAnchor: i, reviver: r } = {}) {
370
- if (!Be(e))
370
+ if (!Me(e))
371
371
  throw new TypeError("A document argument is required");
372
372
  const o = {
373
373
  anchors: /* @__PURE__ */ new Map(),
@@ -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)
@@ -487,7 +487,7 @@ function Ys(s, e, t) {
487
487
  return t.find((n) => n.identify?.(s) && !n.format);
488
488
  }
489
489
  function ge(s, e, t) {
490
- if (Be(s) && (s = s.contents), v(s))
490
+ if (Me(s) && (s = s.contents), v(s))
491
491
  return s;
492
492
  if ($(s)) {
493
493
  const u = t.schema[J].createNode?.(t.schema, null, t);
@@ -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,15 +630,15 @@ 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";
641
- function Me(s, e, t = "flow", { indentAtStart: n, lineWidth: i = 80, minContentWidth: r = 20, onFold: o, onOverflow: l } = {}) {
640
+ ` + U(t, e) : (s.endsWith(" ") ? "" : " ") + t, Xt = "flow", Ze = "block", ve = "quoted";
641
+ function Pe(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;
644
644
  i < r && (r = 0);
@@ -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)
@@ -718,12 +718,12 @@ function Nt(s, e, t) {
718
718
  }
719
719
  return n;
720
720
  }
721
- const Pe = (s, e) => ({
721
+ const De = (s, e) => ({
722
722
  indentAtStart: e ? s.indent.length : s.indentAtStart,
723
723
  lineWidth: s.options.lineWidth,
724
724
  minContentWidth: s.options.minContentWidth
725
- }), De = (s) => /^(%|---|\.\.\.)/m.test(s);
726
- function Hs(s, e, t) {
725
+ }), xe = (s) => /^(%|---|\.\.\.)/m.test(s);
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;
@@ -743,7 +743,7 @@ function me(s, e) {
743
743
  const t = JSON.stringify(s);
744
744
  if (e.options.doubleQuotedAsJSON)
745
745
  return t;
746
- const { implicitKey: n } = e, i = e.options.doubleQuotedMinMultiLineLength, r = e.indent || (De(s) ? " " : "");
746
+ const { implicitKey: n } = e, i = e.options.doubleQuotedMinMultiLineLength, r = e.indent || (xe(s) ? " " : "");
747
747
  let o = "", l = 0;
748
748
  for (let a = 0, c = t[a]; c; c = t[++a])
749
749
  if (c === " " && t[a + 1] === "\\" && t[a + 2] === "n" && (o += t.slice(l, a) + "\\ ", a += 1, l = a, c = "\\"), c === "\\")
@@ -798,15 +798,15 @@ function me(s, e) {
798
798
  default:
799
799
  a += 1;
800
800
  }
801
- return o = l ? o + t.slice(l) : t, n ? o : Me(o, r, ve, Pe(e, !1));
801
+ return o = l ? o + t.slice(l) : t, n ? o : Pe(o, r, ve, De(e, !1));
802
802
  }
803
- function Ze(s, e) {
803
+ function et(s, e) {
804
804
  if (e.options.singleQuote === !1 || e.implicitKey && s.includes(`
805
805
  `) || /[ \t]\n|\n[ \t]/.test(s))
806
806
  return me(s, e);
807
- const t = e.indent || (De(s) ? " " : ""), n = "'" + s.replace(/'/g, "''").replace(/\n+/g, `$&
807
+ const t = e.indent || (xe(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 : Pe(n, t, Xt, De(e, !1));
810
810
  }
811
811
  function se(s, e) {
812
812
  const { singleQuote: t } = e.options;
@@ -815,24 +815,24 @@ function se(s, e) {
815
815
  n = me;
816
816
  else {
817
817
  const i = s.includes('"'), r = s.includes("'");
818
- i && !r ? n = Ze : r && !i ? n = me : n = t ? Ze : me;
818
+ i && !r ? n = et : r && !i ? n = me : n = t ? et : me;
819
819
  }
820
820
  return n(s, e);
821
821
  }
822
- let et;
822
+ let tt;
823
823
  try {
824
- et = new RegExp(`(^|(?<!
824
+ tt = new RegExp(`(^|(?<!
825
825
  ))
826
826
  +(?!
827
827
  |$)`, "g");
828
828
  } catch {
829
- et = /\n+(?!\n|$)/g;
829
+ tt = /\n+(?!\n|$)/g;
830
830
  }
831
831
  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 || xe(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
  ` : `>
@@ -848,7 +848,7 @@ function $e({ comment: s, type: e, value: t }, n, i, r) {
848
848
  const g = p.indexOf(`
849
849
  `);
850
850
  g === -1 ? u = "-" : t === p || g !== p.length - 1 ? (u = "+", r && r()) : u = "", p && (t = t.slice(0, -p.length), p[p.length - 1] === `
851
- ` && (p = p.slice(0, -1)), p = p.replace(et, `$&${c}`));
851
+ ` && (p = p.slice(0, -1)), p = p.replace(tt, `$&${c}`));
852
852
  let h = !1, m, b = -1;
853
853
  for (m = 0; m < t.length; ++m) {
854
854
  const _ = t[m];
@@ -867,11 +867,11 @@ function $e({ comment: s, type: e, value: t }, n, i, r) {
867
867
  const _ = t.replace(/\n+/g, `
868
868
  $&`).replace(/(?:^|\n)([\t ].*)(?:([\n\t ]*)\n(?![\n\t ]))?/g, "$1$2").replace(/\n+/g, `$&${c}`);
869
869
  let O = !1;
870
- const T = Pe(n, !0);
870
+ const T = De(n, !0);
871
871
  o !== "folded" && e !== N.BLOCK_FOLDED && (T.onOverflow = () => {
872
872
  O = !0;
873
873
  });
874
- const y = Me(`${w}${_}${p}`, c, ze, T);
874
+ const y = Pe(`${w}${_}${p}`, c, Ze, T);
875
875
  if (!O)
876
876
  return `>${k}
877
877
  ${c}${y}`;
@@ -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))
@@ -890,7 +890,7 @@ function Ws(s, e, t, n) {
890
890
  if (!l && !d && i !== N.PLAIN && r.includes(`
891
891
  `))
892
892
  return $e(s, e, t, n);
893
- if (De(r)) {
893
+ if (xe(r)) {
894
894
  if (a === "")
895
895
  return e.forceBlockIndent = !0, $e(s, e, t, n);
896
896
  if (l && a === c)
@@ -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 : Pe(u, a, Xt, De(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) });
@@ -917,9 +917,9 @@ function ct(s, e, t, n) {
917
917
  case N.QUOTE_DOUBLE:
918
918
  return me(o.value, e);
919
919
  case N.QUOTE_SINGLE:
920
- return Ze(o.value, e);
920
+ return et(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,21 +1095,21 @@ 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
- Ve(s, e, n);
1105
+ Je(s, e, n);
1106
1106
  else if (Array.isArray(t))
1107
1107
  for (const n of t)
1108
- Ve(s, e, n);
1108
+ Je(s, e, n);
1109
1109
  else
1110
- Ve(s, e, t);
1110
+ Je(s, e, t);
1111
1111
  }
1112
- function Ve(s, e, t) {
1112
+ function Je(s, e, t) {
1113
1113
  const n = s && Q(t) ? t.resolve(s.doc) : t;
1114
1114
  if (!be(n))
1115
1115
  throw new Error("Merge sources must be maps or map aliases");
@@ -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 || "") + " ",
@@ -1473,7 +1473,7 @@ const fe = {
1473
1473
  return we(s) || e("Expected a sequence for this tag"), s;
1474
1474
  },
1475
1475
  createNode: (s, e, t) => W.from(s, e, t)
1476
- }, xe = {
1476
+ }, Ke = {
1477
1477
  identify: (s) => typeof s == "string",
1478
1478
  default: !0,
1479
1479
  tag: "tag:yaml.org,2002:str",
@@ -1481,14 +1481,14 @@ const fe = {
1481
1481
  stringify(s, e, t, n) {
1482
1482
  return e = Object.assign({ actualString: !0 }, e), ct(s, e, t, n);
1483
1483
  }
1484
- }, Ke = {
1484
+ }, Re = {
1485
1485
  identify: (s) => s == null,
1486
1486
  createNode: () => new N(null),
1487
1487
  default: !0,
1488
1488
  tag: "tag:yaml.org,2002:null",
1489
1489
  test: /^(?:~|[Nn]ull|NULL)?$/,
1490
1490
  resolve: () => new N(null),
1491
- stringify: ({ source: s }, e) => typeof s == "string" && Ke.test.test(s) ? s : e.options.nullStr
1491
+ stringify: ({ source: s }, e) => typeof s == "string" && Re.test.test(s) ? s : e.options.nullStr
1492
1492
  }, ut = {
1493
1493
  identify: (s) => typeof s == "boolean",
1494
1494
  default: !0,
@@ -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",
@@ -1548,51 +1548,51 @@ const ss = {
1548
1548
  return t !== -1 && s[s.length - 1] === "0" && (e.minFractionDigits = s.length - t - 1), e;
1549
1549
  },
1550
1550
  stringify: K
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) {
1551
+ }, Ue = (s) => typeof s == "bigint" || Number.isInteger(s), ht = (s, e, t, { intAsBigInt: n }) => n ? BigInt(s) : parseInt(s.substring(e), t);
1552
+ function os(s, e, t) {
1553
1553
  const { value: n } = s;
1554
- return Re(n) && n >= 0 ? t + n.toString(e) : K(s);
1554
+ return Ue(n) && n >= 0 ? t + n.toString(e) : K(s);
1555
1555
  }
1556
- const os = {
1557
- identify: (s) => Re(s) && s >= 0,
1556
+ const ls = {
1557
+ identify: (s) => Ue(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 = {
1565
- identify: Re,
1563
+ stringify: (s) => os(s, 8, "0o")
1564
+ }, as = {
1565
+ identify: Ue,
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 = {
1572
- identify: (s) => Re(s) && s >= 0,
1571
+ }, cs = {
1572
+ identify: (s) => Ue(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
- xe,
1583
1582
  Ke,
1583
+ Re,
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",
@@ -1830,7 +1830,7 @@ const hs = {
1830
1830
  },
1831
1831
  stringify: K
1832
1832
  }, Se = (s) => typeof s == "bigint" || Number.isInteger(s);
1833
- function Ue(s, e, t, { intAsBigInt: n }) {
1833
+ function Fe(s, e, t, { intAsBigInt: n }) {
1834
1834
  const i = s[0];
1835
1835
  if ((i === "-" || i === "+") && (e += 1), s = s.substring(e).replace(/_/g, ""), n) {
1836
1836
  switch (t) {
@@ -1858,36 +1858,36 @@ 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",
1865
1865
  format: "BIN",
1866
1866
  test: /^[-+]?0b[0-1_]+$/,
1867
- resolve: (s, e, t) => Ue(s, 2, 2, t),
1867
+ resolve: (s, e, t) => Fe(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",
1873
1873
  format: "OCT",
1874
1874
  test: /^[-+]?0[0-7_]+$/,
1875
- resolve: (s, e, t) => Ue(s, 1, 8, t),
1875
+ resolve: (s, e, t) => Fe(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
- resolve: (s, e, t) => Ue(s, 0, 10, t),
1882
+ resolve: (s, e, t) => Fe(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",
1888
1888
  format: "HEX",
1889
1889
  test: /^[-+]?0x[0-9a-fA-F_]+$/,
1890
- resolve: (s, e, t) => Ue(s, 2, 16, t),
1890
+ resolve: (s, e, t) => Fe(s, 2, 16, t),
1891
1891
  stringify: (s) => gt(s, 16, "0x")
1892
1892
  };
1893
1893
  class ie extends M {
@@ -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,23 +1963,23 @@ 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
1982
- }, Fe = {
1981
+ stringify: ms
1982
+ }, qe = {
1983
1983
  identify: (s) => s instanceof Date,
1984
1984
  default: !0,
1985
1985
  tag: "tag:yaml.org,2002:timestamp",
@@ -1988,7 +1988,7 @@ const ms = {
1988
1988
  // assumed to be 00:00:00Z (start of day, UTC).
1989
1989
  test: RegExp("^([0-9]{4})-([0-9]{1,2})-([0-9]{1,2})(?:(?:t|T|[ \\t]+)([0-9]{1,2}):([0-9]{1,2}):([0-9]{1,2}(\\.[0-9]+)?)(?:[ \\t]*(Z|[-+][012]?[0-9](?::[0-9]{2})?))?)?$"),
1990
1990
  resolve(s) {
1991
- const e = s.match(Fe.test);
1991
+ const e = s.match(qe.test);
1992
1992
  if (!e)
1993
1993
  throw new Error("!!timestamp expects a date, starting with yyyy-mm-dd");
1994
1994
  const [, t, n, i, r, o, l] = e.map(Number), a = e[7] ? Number((e[7] + "00").substr(1, 3)) : 0;
@@ -2001,63 +2001,63 @@ 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
- xe,
2008
2007
  Ke,
2009
- hs,
2008
+ Re,
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,
2025
- Fe
2026
- ], Tt = /* @__PURE__ */ new Map([
2027
- ["core", nn],
2028
- ["failsafe", [ce, fe, xe]],
2029
- ["json", ln],
2030
- ["yaml11", Et],
2031
- ["yaml-1.1", Et]
2032
- ]), It = {
2024
+ ys,
2025
+ qe
2026
+ ], It = /* @__PURE__ */ new Map([
2027
+ ["core", rn],
2028
+ ["failsafe", [ce, fe, Ke]],
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
- null: Ke,
2045
+ null: Re,
2046
2046
  omap: mt,
2047
2047
  pairs: pt,
2048
2048
  seq: fe,
2049
2049
  set: yt,
2050
- timestamp: Fe
2051
- }, mn = {
2050
+ timestamp: qe
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,
2055
2055
  "tag:yaml.org,2002:pairs": pt,
2056
2056
  "tag:yaml.org,2002:set": yt,
2057
- "tag:yaml.org,2002:timestamp": Fe
2057
+ "tag:yaml.org,2002:timestamp": qe
2058
2058
  };
2059
- function Je(s, e, t) {
2060
- const n = Tt.get(e);
2059
+ function Ye(s, e, t) {
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) ? Ye(e, "compat") : e ? Ye(null, e) : null, this.name = typeof r == "string" && r || "core", this.knownTags = i ? gn : {}, this.tags = Ye(t, this.name, n), this.toStringOptions = l ?? null, Object.defineProperty(this, J, { value: ce }), Object.defineProperty(this, R, { value: Ke }), 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);
@@ -2134,9 +2134,9 @@ function yn(s, e) {
2134
2134
  `) + `
2135
2135
  `;
2136
2136
  }
2137
- class qe {
2137
+ class Ve {
2138
2138
  constructor(e, t, n) {
2139
- this.commentBefore = null, this.comment = null, this.errors = [], this.warnings = [], Object.defineProperty(this, D, { value: Xe });
2139
+ this.commentBefore = null, this.comment = null, this.errors = [], this.warnings = [], Object.defineProperty(this, D, { value: ze });
2140
2140
  let i = null;
2141
2141
  typeof t == "function" || Array.isArray(t) ? i = t : n === void 0 && t && (n = t, t = void 0);
2142
2142
  const r = Object.assign({
@@ -2159,8 +2159,8 @@ class qe {
2159
2159
  * Custom Node values that inherit from `Object` still refer to their original instances.
2160
2160
  */
2161
2161
  clone() {
2162
- const e = Object.create(qe.prototype, {
2163
- [D]: { value: Xe }
2162
+ const e = Object.create(Ve.prototype, {
2163
+ [D]: { value: ze }
2164
2164
  });
2165
2165
  return e.commentBefore = this.commentBefore, e.comment = this.comment, e.errors = this.errors.slice(), e.warnings = this.warnings.slice(), e.options = Object.assign({}, this.options), this.directives && (e.directives = this.directives.clone()), e.schema = this.schema.clone(), e.contents = v(this.contents) ? this.contents.clone(e.schema) : this.contents, this.range && (e.range = this.range.slice()), e;
2166
2166
  }
@@ -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));
@@ -2476,21 +2476,21 @@ function ye(s) {
2476
2476
  return !0;
2477
2477
  }
2478
2478
  }
2479
- function tt(s, e, t) {
2479
+ function st(s, e, t) {
2480
2480
  if (e?.type === "flow-collection") {
2481
2481
  const n = e.end[0];
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 && st(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,
@@ -2525,7 +2525,7 @@ function wn({ composeNode: s, composeEmptyNode: e }, t, n, i, r) {
2525
2525
  if (a = S.end, S.found) {
2526
2526
  m && (g?.type === "block-map" && !S.hasNewline && i(a, "BLOCK_AS_IMPLICIT_KEY", "Nested mappings are not allowed in compact mappings"), t.options.strict && h.start < S.found.offset - 1024 && i(w.range, "KEY_OVER_1024_CHARS", "The : indicator must be at most 1024 chars after the start of an implicit block mapping key"));
2527
2527
  const k = g ? s(t, g, S, i) : e(t, a, p, null, S, i);
2528
- t.schema.compat && tt(n.indent, g, i), a = k.range[2];
2528
+ t.schema.compat && st(n.indent, g, i), a = k.range[2];
2529
2529
  const _ = new B(w, k);
2530
2530
  t.options.keepSourceTokens && (_.srcToken = d), l.items.push(_);
2531
2531
  } else {
@@ -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;
@@ -2558,7 +2558,7 @@ function Sn({ composeNode: s, composeEmptyNode: e }, t, n, i, r) {
2558
2558
  continue;
2559
2559
  }
2560
2560
  const p = u ? s(t, u, f, i) : e(t, f.end, d, null, f, i);
2561
- t.schema.compat && tt(n.indent, u, i), a = p.range[2], l.items.push(p);
2561
+ t.schema.compat && st(n.indent, u, i), a = p.range[2], l.items.push(p);
2562
2562
  }
2563
2563
  return l.range = [n.offset, a, c ?? a], l;
2564
2564
  }
@@ -2589,8 +2589,8 @@ function ke(s, e, t, n) {
2589
2589
  }
2590
2590
  return { comment: i, offset: e };
2591
2591
  }
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) {
2592
+ const Ge = "Block collections are not allowed within flow collections", He = (s) => s && (s.type === "block-map" || s.type === "block-seq");
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;
@@ -2642,11 +2642,11 @@ function kn({ composeNode: s, composeEmptyNode: e }, t, n, i, r) {
2642
2642
  }
2643
2643
  if (!o && !k && !O.found) {
2644
2644
  const T = _ ? s(t, _, O, i) : e(t, O.end, k, null, O, i);
2645
- c.items.push(T), u = T.range[2], Ge(_) && i(T.range, "BLOCK_IN_FLOW", Ye);
2645
+ c.items.push(T), u = T.range[2], He(_) && i(T.range, "BLOCK_IN_FLOW", Ge);
2646
2646
  } else {
2647
2647
  t.atKey = !0;
2648
2648
  const T = O.end, y = S ? s(t, S, O, i) : e(t, T, w, null, O, i);
2649
- Ge(S) && i(y.range, "BLOCK_IN_FLOW", Ye), t.atKey = !1;
2649
+ He(S) && i(y.range, "BLOCK_IN_FLOW", Ge), t.atKey = !1;
2650
2650
  const L = oe(k ?? [], {
2651
2651
  flow: l,
2652
2652
  indicator: "map-value-ind",
@@ -2671,17 +2671,17 @@ function kn({ composeNode: s, composeEmptyNode: e }, t, n, i, r) {
2671
2671
  }
2672
2672
  } else _ && ("source" in _ && _.source?.[0] === ":" ? i(_, "MISSING_CHAR", `Missing space after : in ${l}`) : i(L.start, "MISSING_CHAR", `Missing , or : between ${l} items`));
2673
2673
  const q = _ ? s(t, _, L, i) : L.found ? e(t, L.end, k, null, L, i) : null;
2674
- q ? Ge(_) && i(q.range, "BLOCK_IN_FLOW", Ye) : L.comment && (y.comment ? y.comment += `
2674
+ q ? He(_) && i(q.range, "BLOCK_IN_FLOW", Ge) : L.comment && (y.comment ? y.comment += `
2675
2675
  ` + L.comment : y.comment = L.comment);
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
  }
@@ -2702,11 +2702,11 @@ function kn({ composeNode: s, composeEmptyNode: e }, t, n, i, r) {
2702
2702
  c.range = [n.offset, h, h];
2703
2703
  return c;
2704
2704
  }
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;
2705
+ function We(s, e, t, n, i, r) {
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;
@@ -2714,23 +2714,23 @@ function _n(s, e, t, n, i) {
2714
2714
  }
2715
2715
  const l = t.type === "block-map" ? "map" : t.type === "block-seq" ? "seq" : t.start.source === "{" ? "map" : "seq";
2716
2716
  if (!r || !o || o === "!" || o === M.tagName && l === "map" || o === W.tagName && l === "seq")
2717
- return He(s, e, t, i, o);
2717
+ return We(s, e, t, i, o);
2718
2718
  let a = e.schema.tags.find((f) => f.tag === o && f.collection === l);
2719
2719
  if (!a) {
2720
2720
  const f = e.schema.knownTags[o];
2721
2721
  if (f?.collection === l)
2722
2722
  e.schema.tags.push(Object.assign({}, f, { default: !1 })), a = f;
2723
2723
  else
2724
- return f ? i(r, "BAD_COLLECTION_TYPE", `${f.tag} used for ${l} collection, but expects ${f.collection ?? "scalar"}`, !0) : i(r, "TAG_RESOLVE_FAILED", `Unresolved tag: ${o}`, !0), He(s, e, t, i, o);
2724
+ return f ? i(r, "BAD_COLLECTION_TYPE", `${f.tag} used for ${l} collection, but expects ${f.collection ?? "scalar"}`, !0) : i(r, "TAG_RESOLVE_FAILED", `Unresolved tag: ${o}`, !0), We(s, e, t, i, o);
2725
2725
  }
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);
2726
+ const c = We(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,20 +3111,20 @@ 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) {
3127
- const l = Object.assign({ _directives: e }, s), a = new qe(void 0, l), c = {
3126
+ function Kn(s, e, { offset: t, start: n, value: i, end: r }, o) {
3127
+ const l = Object.assign({ _directives: e }, s), a = new Ve(void 0, l), c = {
3128
3128
  atKey: !1,
3129
3129
  atRoot: !0,
3130
3130
  directives: a.directives,
@@ -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
  }
@@ -3280,21 +3280,21 @@ ${t.comment}` : t.comment;
3280
3280
  if (this.doc)
3281
3281
  this.decorate(this.doc, !0), yield this.doc, this.doc = null;
3282
3282
  else if (e) {
3283
- const n = Object.assign({ _directives: this.directives }, this.options), i = new qe(void 0, n);
3283
+ const n = Object.assign({ _directives: this.directives }, this.options), i = new Ve(void 0, n);
3284
3284
  this.atDirectives && this.onError(t, "MISSING_CHAR", "Missing directives-end indicator line"), i.range = [0, t, t], this.decorate(i, !1), yield i;
3285
3285
  }
3286
3286
  }
3287
3287
  }
3288
- const _s = "\uFEFF", Ns = "", Os = "", st = "";
3289
- function Rn(s) {
3288
+ const Ns = "\uFEFF", Os = "", Es = "", nt = "";
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
- case st:
3297
+ case nt:
3298
3298
  return "scalar";
3299
3299
  case "---":
3300
3300
  return "doc-start";
@@ -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 `), Qe = (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);
@@ -3522,7 +3522,7 @@ class qn {
3522
3522
  case "]":
3523
3523
  return yield* this.pushCount(1), "doc";
3524
3524
  case "*":
3525
- return yield* this.pushUntil(We), "doc";
3525
+ return yield* this.pushUntil(Qe), "doc";
3526
3526
  case '"':
3527
3527
  case "'":
3528
3528
  return yield* this.parseQuotedScalar();
@@ -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;
@@ -3558,7 +3558,7 @@ class qn {
3558
3558
  case "]":
3559
3559
  return yield* this.pushCount(1), this.flowKey = !0, this.flowLevel -= 1, this.flowLevel ? "flow" : "doc";
3560
3560
  case "*":
3561
- return yield* this.pushUntil(We), "flow";
3561
+ return yield* this.pushUntil(Qe), "flow";
3562
3562
  case '"':
3563
3563
  case "'":
3564
3564
  return this.flowKey = !0, yield* this.parseQuotedScalar();
@@ -3682,7 +3682,7 @@ class qn {
3682
3682
  else
3683
3683
  break;
3684
3684
  } while (!0);
3685
- return yield st, yield* this.pushToIndex(e + 1, !0), yield* this.parseLineStart();
3685
+ return yield nt, yield* this.pushToIndex(e + 1, !0), yield* this.parseLineStart();
3686
3686
  }
3687
3687
  *parsePlainScalar() {
3688
3688
  const e = this.flowLevel > 0;
@@ -3711,7 +3711,7 @@ class qn {
3711
3711
  break;
3712
3712
  t = n;
3713
3713
  }
3714
- return !i && !this.atEnd ? this.setNext("plain-scalar") : (yield st, yield* this.pushToIndex(t + 1, !0), e ? "flow" : "doc");
3714
+ return !i && !this.atEnd ? this.setNext("plain-scalar") : (yield nt, yield* this.pushToIndex(t + 1, !0), e ? "flow" : "doc");
3715
3715
  }
3716
3716
  *pushCount(e) {
3717
3717
  return e > 0 ? (yield this.buffer.substr(this.pos, e), this.pos += e, e) : 0;
@@ -3725,7 +3725,7 @@ class qn {
3725
3725
  case "!":
3726
3726
  return (yield* this.pushTag()) + (yield* this.pushSpaces(!0)) + (yield* this.pushIndicators());
3727
3727
  case "&":
3728
- return (yield* this.pushUntil(We)) + (yield* this.pushSpaces(!0)) + (yield* this.pushIndicators());
3728
+ return (yield* this.pushUntil(Qe)) + (yield* this.pushSpaces(!0)) + (yield* this.pushIndicators());
3729
3729
  case "-":
3730
3730
  // this is an error
3731
3731
  case "?":
@@ -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 je(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,29 +4486,29 @@ 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);
4493
4493
  for (const t of s ?? []) {
4494
- const n = await nt(t, "utf8");
4494
+ const n = await je(t, "utf8");
4495
4495
  if (t.endsWith(".json")) {
4496
4496
  const i = rt(JSON.parse(n));
4497
4497
  for (const [r, o] of Object.entries(i))
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
  }
4505
- var Qe = function(s, e) {
4505
+ var Xe = function(s, e) {
4506
4506
  return Object.defineProperty ? Object.defineProperty(s, "raw", { value: e }) : s.raw = e, s;
4507
4507
  }, 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 = Xe([`
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 = Xe([`
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 = Xe([`
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,16 @@ 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
+ const e = it(kt, `${s}.json`), t = await je(e, "utf8");
4876
+ return JSON.parse(t);
4875
4877
  } catch (e) {
4876
4878
  const t = e instanceof Error ? e.message : String(e);
4877
4879
  return console.error("Error reading report:", t), null;
4878
4880
  }
4879
4881
  }
4880
- const ni = `<!DOCTYPE html>
4882
+ const ii = `<!DOCTYPE html>
4881
4883
  <html lang="en">
4882
4884
  <head>
4883
4885
  <meta charset="UTF-8">
@@ -4892,7 +4894,7 @@ const ni = `<!DOCTYPE html>
4892
4894
  </div>
4893
4895
  </body>
4894
4896
  </html>`;
4895
- async function Kt(s) {
4897
+ async function Rt(s) {
4896
4898
  return s ? `<!DOCTYPE html>
4897
4899
  <html lang="en">
4898
4900
  <head>
@@ -4909,10 +4911,10 @@ ${s.outputs.map(
4909
4911
  <div class="mb-6">
4910
4912
  <h2 class="text-xl font-semibold mb-2">Step ${n + 1}: ${t.cmd} (${t.code})</h2>
4911
4913
  <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>
4914
+ <pre>${Kt.ansi_to_html(t.stdout)}</pre>
4913
4915
  </div>
4914
4916
  <div class="bg-gray-800 text-red-400 p-4 rounded overflow-x-auto">
4915
- <pre>${xt.ansi_to_html(t.stderr)}</pre>
4917
+ <pre>${Kt.ansi_to_html(t.stderr)}</pre>
4916
4918
  </div>
4917
4919
  </div>
4918
4920
  `
@@ -4925,30 +4927,30 @@ ${s.children && s.children.length > 0 ? `<div class="mt-2">Child Reports:<ul>${s
4925
4927
 
4926
4928
  </div>
4927
4929
  </body>
4928
- </html>` : ni;
4930
+ </html>` : ii;
4929
4931
  }
4930
- const ii = "/workspace", ri = "dhi.io/alpine-base:3.23-alpine3.23-dev";
4931
- function oi(s, e) {
4932
+ const ri = "/workspace", oi = "dhi.io/alpine-base:3.23-alpine3.23-dev";
4933
+ function li(s, e) {
4932
4934
  if (typeof s.run != "string")
4933
4935
  throw new Error("Each workflow step must have a 'run' command string.");
4934
4936
  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;
4937
+ return s.image ||= t.image || oi, s.volumes ||= t.volumes || {}, s.args ||= t.args || [], s.run = Be(s.run, { ...e, step: s }), s;
4936
4938
  }
4937
- function li(s, e) {
4939
+ function ai(s, e) {
4938
4940
  return (s || []).flatMap(
4939
4941
  (t) => Object.entries(t).flatMap(([n, i]) => [
4940
4942
  `--${n}`,
4941
- je(String(i), e)
4943
+ Be(String(i), e)
4942
4944
  ])
4943
4945
  );
4944
4946
  }
4945
- function ai(s, e) {
4946
- return s["."] ||= ii, Object.entries(s).flatMap(([t, n]) => [
4947
+ function ci(s, e) {
4948
+ return s["."] ||= ri, Object.entries(s).flatMap(([t, n]) => [
4947
4949
  "-v",
4948
4950
  `${t === "." ? e.workingDir : t}:${n}`
4949
4951
  ]);
4950
4952
  }
4951
- function ci(s) {
4953
+ function fi(s) {
4952
4954
  const { workflow: e, secrets: t } = s, n = {
4953
4955
  ...process.env,
4954
4956
  ...Object.fromEntries(
@@ -4960,11 +4962,11 @@ function ci(s) {
4960
4962
  if (typeof e.env != "object")
4961
4963
  throw new Error("Workflow env field must be an object.");
4962
4964
  for (const [i, r] of Object.entries(e.env))
4963
- n[i] = je(r, s);
4965
+ n[i] = Be(r, s);
4964
4966
  }
4965
4967
  Object.assign(s.env, n);
4966
4968
  }
4967
- function fi(s, e) {
4969
+ function ui(s, e) {
4968
4970
  const t = Object.keys(s), n = Object.keys(e.on), i = n.find((l) => s[l]), r = i ? e.on[i] : null;
4969
4971
  if (!r)
4970
4972
  return console.log(
@@ -4980,9 +4982,9 @@ function fi(s, e) {
4980
4982
  event: o
4981
4983
  };
4982
4984
  }
4983
- async function ui(s, e) {
4985
+ async function hi(s, e) {
4984
4986
  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 = [
4987
+ const t = li(s, e), { args: n, image: i, volumes: r } = t, o = ci(r, e), l = ai(n, e), a = r["."], c = [
4986
4988
  "run",
4987
4989
  "-i",
4988
4990
  "--rm",
@@ -4995,7 +4997,7 @@ async function ui(s, e) {
4995
4997
  i
4996
4998
  ];
4997
4999
  return new Promise((d, u) => {
4998
- const f = Rt("docker", c, {
5000
+ const f = Ut("docker", c, {
4999
5001
  env: e.env
5000
5002
  }), p = [], g = [];
5001
5003
  f.stdout?.on("data", (h) => {
@@ -5016,10 +5018,10 @@ exit $?;
5016
5018
  });
5017
5019
  }
5018
5020
  async function Is(s, e, t) {
5019
- const n = Ms(), i = fi(s, e);
5021
+ const n = Ps(), i = ui(s, e);
5020
5022
  if (!i)
5021
5023
  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({
5024
+ 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
5025
  inputs: l,
5024
5026
  secrets: a,
5025
5027
  workflow: r,
@@ -5027,11 +5029,11 @@ async function Is(s, e, t) {
5027
5029
  outputs: [],
5028
5030
  workingDir: c
5029
5031
  });
5030
- ci(d);
5032
+ fi(d);
5031
5033
  const u = [];
5032
5034
  try {
5033
5035
  for (const f of r.steps ?? []) {
5034
- const p = await ui(f, d);
5036
+ const p = await hi(f, d);
5035
5037
  if (p.code !== 0)
5036
5038
  throw new Error(
5037
5039
  `Step failed with code ${p.code}.
@@ -5041,7 +5043,7 @@ stderr: ${p.stderr}`
5041
5043
  d.outputs.push(p);
5042
5044
  }
5043
5045
  for (const f of r.triggers ?? []) {
5044
- const p = await hi(f, e, t);
5046
+ const p = await di(f, e, t);
5045
5047
  p && u.push(p.id);
5046
5048
  }
5047
5049
  } catch (f) {
@@ -5050,32 +5052,32 @@ stderr: ${p.stderr}`
5050
5052
  } finally {
5051
5053
  await Cs(d.workingDir, { recursive: !0, force: !0 });
5052
5054
  }
5053
- return await ti({ id: n, parentId: t, children: u }, d.outputs), { id: n, parentId: t, children: u, outputs: d.outputs };
5055
+ return await si({ id: n, parentId: t, children: u }, d.outputs), { id: n, parentId: t, children: u, outputs: d.outputs };
5054
5056
  }
5055
- async function hi(s, e, t) {
5056
- if (!js(s)) {
5057
+ async function di(s, e, t) {
5058
+ if (!Bs(s)) {
5057
5059
  console.warn(`Trigger file does not exist: ${s}`);
5058
5060
  return;
5059
5061
  }
5060
- const n = await nt(s, "utf8"), i = rt(JSON.parse(n));
5062
+ const n = await je(s, "utf8"), i = rt(JSON.parse(n));
5061
5063
  return await Is(i, e, t);
5062
5064
  }
5063
- async function di(s) {
5065
+ async function pi(s) {
5064
5066
  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, {
5067
+ const i = process.argv.slice(1).filter((l) => l !== "--daemon" && l !== "-d"), r = process.execArgv.concat(i), o = Ut(process.execPath, r, {
5066
5068
  detached: !0,
5067
5069
  stdio: "ignore"
5068
5070
  });
5069
5071
  return console.log(o.pid), o.unref(), null;
5070
5072
  }
5071
- const e = await Qn(s.configPath), t = vs(async (i, r) => {
5073
+ const e = await Xn(s.configPath), t = vs(async (i, r) => {
5072
5074
  if (i.method === "GET" && i.url === "/health") {
5073
5075
  _e(r, 200, { status: "OK" });
5074
5076
  return;
5075
5077
  }
5076
5078
  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)));
5079
+ const o = i.url.split("/logs/")[1], l = await ni(o);
5080
+ l ? (r.writeHead(200, { "Content-Type": "text/html" }), r.end(await Rt(l))) : (r.writeHead(404, { "Content-Type": "text/html" }), r.end(await Rt(null)));
5079
5081
  return;
5080
5082
  }
5081
5083
  if (i.method !== "POST") {
@@ -5107,7 +5109,7 @@ async function di(s) {
5107
5109
  const n = t.address();
5108
5110
  return n && typeof n == "object" && console.log(`Started on http://${n.address}:${n.port}`), t;
5109
5111
  }
5110
- const pi = `on - daemonized webhook runner
5112
+ const mi = `on - daemonized webhook runner
5111
5113
 
5112
5114
  Usage:
5113
5115
  on --port <port> [--host <host>] [--config <path>]
@@ -5119,7 +5121,7 @@ Options:
5119
5121
  --config, -c Path to a YAML/JSON config file
5120
5122
  --help, -h Show this help message
5121
5123
  `;
5122
- function mi(s) {
5124
+ function gi(s) {
5123
5125
  const { values: e } = As({
5124
5126
  args: s,
5125
5127
  options: {
@@ -5132,31 +5134,31 @@ function mi(s) {
5132
5134
  allowPositionals: !1
5133
5135
  });
5134
5136
  if (e.help)
5135
- return console.log(pi), null;
5137
+ return console.log(mi), null;
5136
5138
  if (!e.port)
5137
5139
  throw new Error("Missing required option --port.");
5138
5140
  return {
5139
- port: Ps(e.port),
5141
+ port: Ds(e.port),
5140
5142
  host: e.host,
5141
5143
  configPath: e.config,
5142
5144
  daemon: e.daemon
5143
5145
  };
5144
5146
  }
5145
- async function gi() {
5147
+ async function yi() {
5146
5148
  try {
5147
- const s = mi(process.argv.slice(2));
5149
+ const s = gi(process.argv.slice(2));
5148
5150
  if (!s) {
5149
5151
  process.exitCode = 0;
5150
5152
  return;
5151
5153
  }
5152
- await di(s);
5154
+ await pi(s);
5153
5155
  } catch (s) {
5154
5156
  const e = s instanceof Error ? s.message : String(s);
5155
5157
  console.error(`on: ${e}`), process.exitCode = 1;
5156
5158
  }
5157
5159
  }
5158
- gi();
5160
+ yi();
5159
5161
  export {
5160
- gi as main,
5161
- mi as parseCliOptions
5162
+ yi as main,
5163
+ gi as parseCliOptions
5162
5164
  };