varlock 0.9.0 → 0.9.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/auto-load.js +3 -3
- package/dist/{chunk-WLPAS4VQ.js → chunk-253NGIPN.js} +3 -3
- package/dist/{chunk-WLPAS4VQ.js.map → chunk-253NGIPN.js.map} +1 -1
- package/dist/{chunk-6CCHLM3U.js → chunk-2PFIYNFA.js} +3 -2
- package/dist/chunk-2PFIYNFA.js.map +1 -0
- package/dist/{chunk-K5536FEN.js → chunk-4VC5S7NB.js} +5 -5
- package/dist/{chunk-K5536FEN.js.map → chunk-4VC5S7NB.js.map} +1 -1
- package/dist/{chunk-DGXO2UN7.js → chunk-7P3SVUZ5.js} +80 -10
- package/dist/chunk-7P3SVUZ5.js.map +1 -0
- package/dist/{chunk-2R7CWGVL.js → chunk-BFRONY2O.js} +7 -7
- package/dist/{chunk-2R7CWGVL.js.map → chunk-BFRONY2O.js.map} +1 -1
- package/dist/{chunk-Q2XA45LC.js → chunk-FSLTOPCT.js} +5 -5
- package/dist/{chunk-Q2XA45LC.js.map → chunk-FSLTOPCT.js.map} +1 -1
- package/dist/{chunk-LRT2CHDN.js → chunk-FWJAZMC7.js} +4 -4
- package/dist/{chunk-LRT2CHDN.js.map → chunk-FWJAZMC7.js.map} +1 -1
- package/dist/{chunk-LAI7XVJU.js → chunk-GH73MG2H.js} +4 -4
- package/dist/{chunk-LAI7XVJU.js.map → chunk-GH73MG2H.js.map} +1 -1
- package/dist/{chunk-ZZCDYV63.js → chunk-LOGMWG5X.js} +5 -5
- package/dist/{chunk-ZZCDYV63.js.map → chunk-LOGMWG5X.js.map} +1 -1
- package/dist/{chunk-S5EU3LTR.js → chunk-MIMMYDBC.js} +5 -5
- package/dist/{chunk-S5EU3LTR.js.map → chunk-MIMMYDBC.js.map} +1 -1
- package/dist/{chunk-27CA3M4N.js → chunk-NWKETKFP.js} +5 -5
- package/dist/{chunk-27CA3M4N.js.map → chunk-NWKETKFP.js.map} +1 -1
- package/dist/{chunk-YBV5OJW6.js → chunk-QHIRGHGG.js} +5 -4
- package/dist/chunk-QHIRGHGG.js.map +1 -0
- package/dist/{chunk-P5H6JZZR.js → chunk-UG4RTI6V.js} +9 -9
- package/dist/{chunk-P5H6JZZR.js.map → chunk-UG4RTI6V.js.map} +1 -1
- package/dist/{chunk-GWQJHKYT.js → chunk-US7YQTJZ.js} +5 -5
- package/dist/{chunk-GWQJHKYT.js.map → chunk-US7YQTJZ.js.map} +1 -1
- package/dist/{chunk-N2E6DRSH.js → chunk-UUDTMOJS.js} +4 -4
- package/dist/{chunk-N2E6DRSH.js.map → chunk-UUDTMOJS.js.map} +1 -1
- package/dist/{chunk-C4ITUXON.js → chunk-W3GUFLIV.js} +819 -744
- package/dist/chunk-W3GUFLIV.js.map +1 -0
- package/dist/{chunk-QYICMUCP.js → chunk-ZRHT6QHO.js} +5 -5
- package/dist/{chunk-QYICMUCP.js.map → chunk-ZRHT6QHO.js.map} +1 -1
- package/dist/cli/cli-executable.js +26 -26
- package/dist/cli/cli-executable.js.map +1 -1
- package/dist/config-item-IK3DUE5F.js +5 -0
- package/dist/{config-item-5WIOGFHA.js.map → config-item-IK3DUE5F.js.map} +1 -1
- package/dist/dotenv-compat.js +3 -3
- package/dist/explain.command-5DG3ACIH.js +12 -0
- package/dist/{explain.command-NST64XIO.js.map → explain.command-5DG3ACIH.js.map} +1 -1
- package/dist/index.js +8 -8
- package/dist/init.command-EWCFF2D5.js +11 -0
- package/dist/{init.command-4Z3VRGOV.js.map → init.command-EWCFF2D5.js.map} +1 -1
- package/dist/install-plugin.command-6ESRFNKI.js +11 -0
- package/dist/{install-plugin.command-F244Y3RI.js.map → install-plugin.command-6ESRFNKI.js.map} +1 -1
- package/dist/load.command-QNDTE2VK.js +12 -0
- package/dist/{load.command-JTUAYW2W.js.map → load.command-QNDTE2VK.js.map} +1 -1
- package/dist/plugin-lib.js +2 -2
- package/dist/printenv.command-SBCXAVQT.js +12 -0
- package/dist/{printenv.command-NAHG4T76.js.map → printenv.command-SBCXAVQT.js.map} +1 -1
- package/dist/run.command-64JM27VM.js +13 -0
- package/dist/{run.command-2IUKOZHD.js.map → run.command-64JM27VM.js.map} +1 -1
- package/dist/scan.command-YFM7VO2I.js +13 -0
- package/dist/{scan.command-BEPDT3YQ.js.map → scan.command-YFM7VO2I.js.map} +1 -1
- package/dist/telemetry.command-4AEVBTVE.js +11 -0
- package/dist/{telemetry.command-E6GIZKTJ.js.map → telemetry.command-4AEVBTVE.js.map} +1 -1
- package/dist/typegen.command-27OCEPZM.js +12 -0
- package/dist/{typegen.command-JGJUSFGG.js.map → typegen.command-27OCEPZM.js.map} +1 -1
- package/package.json +1 -1
- package/dist/chunk-6CCHLM3U.js.map +0 -1
- package/dist/chunk-C4ITUXON.js.map +0 -1
- package/dist/chunk-DGXO2UN7.js.map +0 -1
- package/dist/chunk-YBV5OJW6.js.map +0 -1
- package/dist/config-item-5WIOGFHA.js +0 -5
- package/dist/explain.command-NST64XIO.js +0 -12
- package/dist/init.command-4Z3VRGOV.js +0 -11
- package/dist/install-plugin.command-F244Y3RI.js +0 -11
- package/dist/load.command-JTUAYW2W.js +0 -12
- package/dist/printenv.command-NAHG4T76.js +0 -12
- package/dist/run.command-2IUKOZHD.js +0 -13
- package/dist/scan.command-BEPDT3YQ.js +0 -13
- package/dist/telemetry.command-E6GIZKTJ.js +0 -11
- package/dist/typegen.command-JGJUSFGG.js +0 -12
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { my_dash_default, SchemaError, createDebug, ResolutionError, CoercionError, ValidationError, activatePlugin, deactivatePlugin, VarlockError, EmptyRequiredValueError, ParseError, pluginProxy } from './chunk-
|
|
1
|
+
import { my_dash_default, SchemaError, createDebug, ResolutionError, CoercionError, ValidationError, activatePlugin, deactivatePlugin, VarlockError, EmptyRequiredValueError, ParseError, pluginProxy } from './chunk-2PFIYNFA.js';
|
|
2
2
|
import { __commonJS, __name, __toESM } from './chunk-6PEHRAEP.js';
|
|
3
3
|
import { exec, spawn } from 'child_process';
|
|
4
4
|
import { promisify, styleText } from 'util';
|
|
@@ -10,8 +10,8 @@ import fs, { accessSync, existsSync } from 'fs';
|
|
|
10
10
|
import { createRequire } from 'module';
|
|
11
11
|
import { pathToFileURL } from 'url';
|
|
12
12
|
import https from 'https';
|
|
13
|
-
import
|
|
14
|
-
import
|
|
13
|
+
import P2, { stdin, stdout } from 'process';
|
|
14
|
+
import P from 'readline';
|
|
15
15
|
import { WriteStream } from 'tty';
|
|
16
16
|
import { AsyncLocalStorage } from 'async_hooks';
|
|
17
17
|
|
|
@@ -23,28 +23,28 @@ var require_ansis = __commonJS({
|
|
|
23
23
|
var r;
|
|
24
24
|
var { defineProperty: l, setPrototypeOf: n, create: o, keys: s } = Object;
|
|
25
25
|
var i = "";
|
|
26
|
-
var { round:
|
|
27
|
-
var
|
|
26
|
+
var { round: c2, max: a2 } = Math;
|
|
27
|
+
var p2 = /* @__PURE__ */ __name((e2) => {
|
|
28
28
|
let t3 = /([a-f\d]{3,6})/i.exec(e2)?.[1], r2 = t3?.length, l2 = parseInt(6 ^ r2 ? 3 ^ r2 ? "0" : t3[0] + t3[0] + t3[1] + t3[1] + t3[2] + t3[2] : t3, 16);
|
|
29
29
|
return [l2 >> 16 & 255, l2 >> 8 & 255, 255 & l2];
|
|
30
30
|
}, "p");
|
|
31
|
-
var
|
|
32
|
-
var
|
|
31
|
+
var u2 = /* @__PURE__ */ __name((e2, t3, r2) => e2 ^ t3 || t3 ^ r2 ? 16 + 36 * c2(e2 / 51) + 6 * c2(t3 / 51) + c2(r2 / 51) : 8 > e2 ? 16 : e2 > 248 ? 231 : c2(24 * (e2 - 8) / 247) + 232, "u");
|
|
32
|
+
var d3 = /* @__PURE__ */ __name((e2) => {
|
|
33
33
|
let t3, r2, l2, n2, o2;
|
|
34
|
-
return 8 > e2 ? 30 + e2 : 16 > e2 ? e2 - 8 + 90 : (232 > e2 ? (o2 = (e2 -= 16) % 36, t3 = (e2 / 36 | 0) / 5, r2 = (o2 / 6 | 0) / 5, l2 = o2 % 6 / 5) : t3 = r2 = l2 = (10 * (e2 - 232) + 8) / 255, n2 = 2 * a2(t3, r2, l2), n2 ? 30 + (
|
|
34
|
+
return 8 > e2 ? 30 + e2 : 16 > e2 ? e2 - 8 + 90 : (232 > e2 ? (o2 = (e2 -= 16) % 36, t3 = (e2 / 36 | 0) / 5, r2 = (o2 / 6 | 0) / 5, l2 = o2 % 6 / 5) : t3 = r2 = l2 = (10 * (e2 - 232) + 8) / 255, n2 = 2 * a2(t3, r2, l2), n2 ? 30 + (c2(l2) << 2 | c2(r2) << 1 | c2(t3)) + (2 ^ n2 ? 0 : 60) : 30);
|
|
35
35
|
}, "d");
|
|
36
36
|
var f = (() => {
|
|
37
|
-
let r2 = /* @__PURE__ */ __name((e2) => o2.some(((t3) => e2.test(t3))), "r"), l2 = globalThis, n2 = l2.process ?? {}, o2 = n2.argv ?? [], i2 = n2.env ?? {},
|
|
37
|
+
let r2 = /* @__PURE__ */ __name((e2) => o2.some(((t3) => e2.test(t3))), "r"), l2 = globalThis, n2 = l2.process ?? {}, o2 = n2.argv ?? [], i2 = n2.env ?? {}, c3 = -1;
|
|
38
38
|
try {
|
|
39
39
|
e = "," + s(i2).join(",");
|
|
40
40
|
} catch (e2) {
|
|
41
|
-
i2 = {},
|
|
41
|
+
i2 = {}, c3 = 0;
|
|
42
42
|
}
|
|
43
|
-
let a3 = "FORCE_COLOR",
|
|
44
|
-
return
|
|
43
|
+
let a3 = "FORCE_COLOR", p3 = { false: 0, 0: 0, 1: 1, 2: 2, 3: 3 }[i2[a3]] ?? -1, u3 = a3 in i2 && p3 || r2(/^--color=?(true|always)?$/);
|
|
44
|
+
return u3 && (c3 = p3), ~c3 || (c3 = ((r3, l3, n3) => (t2 = r3.TERM, { "24bit": 3, truecolor: 3, ansi256: 2, ansi: 1 }[r3.COLORTERM] || (r3.CI ? /,GITHUB/.test(e) ? 3 : 1 : l3 && "dumb" !== t2 ? n3 ? 3 : /-256/.test(t2) ? 2 : 1 : 0)))(i2, !!i2.PM2_HOME || i2.NEXT_RUNTIME?.includes("edge") || !!n2.stdout?.isTTY, "win32" === n2.platform)), !p3 || i2.NO_COLOR || r2(/^--(no-color|color=(false|never))$/) ? 0 : l2.window?.chrome || u3 && !c3 ? 3 : c3;
|
|
45
45
|
})();
|
|
46
46
|
var g = { open: i, close: i };
|
|
47
|
-
var
|
|
47
|
+
var h = 39;
|
|
48
48
|
var b = 49;
|
|
49
49
|
var O2 = {};
|
|
50
50
|
var m = /* @__PURE__ */ __name(({ p: e2 }, { open: t3, close: l2 }) => {
|
|
@@ -53,36 +53,36 @@ var require_ansis = __commonJS({
|
|
|
53
53
|
if (t3 && t3 === l2) return t3;
|
|
54
54
|
if ((e3 ?? i) === i) return i;
|
|
55
55
|
}
|
|
56
|
-
let n2, s3 = e3.raw ? String.raw({ raw: e3 }, ...r2) : i + e3,
|
|
57
|
-
if (s3.includes("\x1B")) for (;
|
|
58
|
-
let { open: e4, close: t4 } =
|
|
56
|
+
let n2, s3 = e3.raw ? String.raw({ raw: e3 }, ...r2) : i + e3, c4 = o2.p, a3 = c4.o, p3 = c4.c;
|
|
57
|
+
if (s3.includes("\x1B")) for (; c4; c4 = c4.p) {
|
|
58
|
+
let { open: e4, close: t4 } = c4, r3 = t4.length, l3 = i, o3 = 0;
|
|
59
59
|
if (r3) for (; ~(n2 = s3.indexOf(t4, o3)); o3 = n2 + r3) l3 += s3.slice(o3, n2) + e4;
|
|
60
60
|
s3 = l3 + s3.slice(o3);
|
|
61
61
|
}
|
|
62
|
-
return a3 + (s3.includes("\n") ? s3.replace(/(\r?\n)/g,
|
|
63
|
-
}, "o"), s2 = t3,
|
|
64
|
-
return e2 && (s2 = e2.o + t3,
|
|
62
|
+
return a3 + (s3.includes("\n") ? s3.replace(/(\r?\n)/g, p3 + "$1" + a3) : s3) + p3;
|
|
63
|
+
}, "o"), s2 = t3, c3 = l2;
|
|
64
|
+
return e2 && (s2 = e2.o + t3, c3 = l2 + e2.c), n(o2, r), o2.p = { open: t3, close: l2, o: s2, c: c3, p: e2 }, o2.open = s2, o2.close = c3, o2;
|
|
65
65
|
}, "m");
|
|
66
|
-
var
|
|
66
|
+
var w3 = new (/* @__PURE__ */ __name(function e2(t3 = f) {
|
|
67
67
|
let s2 = { Ansis: e2, level: t3, isSupported: /* @__PURE__ */ __name(() => a3, "isSupported"), strip: /* @__PURE__ */ __name((e3) => e3.replace(/[][[()#;?]*(?:[0-9]{1,4}(?:;[0-9]{0,4})*)?[0-9A-ORZcf-nqry=><]/g, i), "strip"), extend(e3) {
|
|
68
68
|
for (let t4 in e3) {
|
|
69
69
|
let r2 = e3[t4], l2 = (typeof r2)[0];
|
|
70
|
-
"s" === l2 ? (
|
|
70
|
+
"s" === l2 ? (c3(t4, T(...p2(r2))), c3(_3(t4), v(...p2(r2)))) : c3(t4, r2, "f" === l2);
|
|
71
71
|
}
|
|
72
72
|
return r = o({}, O2), n(s2, r), s2;
|
|
73
|
-
} },
|
|
73
|
+
} }, c3 = /* @__PURE__ */ __name((e3, t4, r2) => {
|
|
74
74
|
O2[e3] = { get() {
|
|
75
75
|
let n2 = r2 ? (...e4) => m(this, t4(...e4)) : m(this, t4);
|
|
76
76
|
return l(this, e3, { value: n2 }), n2;
|
|
77
77
|
} };
|
|
78
|
-
}, "c"), a3 = t3 > 0,
|
|
79
|
-
2 === t3 ? (
|
|
80
|
-
let M2,
|
|
78
|
+
}, "c"), a3 = t3 > 0, w4 = /* @__PURE__ */ __name((e3, t4) => a3 ? { open: `\x1B[${e3}m`, close: `\x1B[${t4}m` } : g, "w"), y2 = /* @__PURE__ */ __name((e3) => (t4) => e3(...p2(t4)), "y"), R2 = /* @__PURE__ */ __name((e3, t4) => (r2, l2, n2) => w4(`${e3}8;2;${r2};${l2};${n2}`, t4), "R"), $2 = /* @__PURE__ */ __name((e3, t4) => (r2, l2, n2) => w4(((e4, t5, r3) => d3(u2(e4, t5, r3)))(r2, l2, n2) + e3, t4), "$"), x = /* @__PURE__ */ __name((e3) => (t4, r2, l2) => e3(u2(t4, r2, l2)), "x"), T = R2(3, h), v = R2(4, b), C2 = /* @__PURE__ */ __name((e3) => w4("38;5;" + e3, h), "C"), E3 = /* @__PURE__ */ __name((e3) => w4("48;5;" + e3, b), "E");
|
|
79
|
+
2 === t3 ? (T = x(C2), v = x(E3)) : 1 === t3 && (T = $2(0, h), v = $2(10, b), C2 = /* @__PURE__ */ __name((e3) => w4(d3(e3), h), "C"), E3 = /* @__PURE__ */ __name((e3) => w4(d3(e3) + 10, b), "E"));
|
|
80
|
+
let M2, I = { fg: C2, bg: E3, rgb: T, bgRgb: v, hex: y2(T), bgHex: y2(v), visible: g, reset: w4(0, 0), bold: w4(1, 22), dim: w4(2, 22), italic: w4(3, 23), underline: w4(4, 24), inverse: w4(7, 27), hidden: w4(8, 28), strikethrough: w4(9, 29) }, _3 = /* @__PURE__ */ __name((e3) => "bg" + e3[0].toUpperCase() + e3.slice(1), "_"), k = "Bright";
|
|
81
81
|
return "black,red,green,yellow,blue,magenta,cyan,white,gray".split(",").map(((e3, t4) => {
|
|
82
|
-
M2 = _3(e3), 8 > t4 ? (
|
|
83
|
-
})), s2.extend(
|
|
82
|
+
M2 = _3(e3), 8 > t4 ? (I[e3 + k] = w4(90 + t4, h), I[M2 + k] = w4(100 + t4, b)) : t4 = 60, I[e3] = w4(30 + t4, h), I[M2] = w4(40 + t4, b);
|
|
83
|
+
})), s2.extend(I);
|
|
84
84
|
}, "e"))();
|
|
85
|
-
module.exports =
|
|
85
|
+
module.exports = w3, w3.default = w3;
|
|
86
86
|
}
|
|
87
87
|
});
|
|
88
88
|
|
|
@@ -748,8 +748,8 @@ var require_rsort = __commonJS({
|
|
|
748
748
|
var require_gt = __commonJS({
|
|
749
749
|
"../../node_modules/.bun/semver@7.7.4/node_modules/semver/functions/gt.js"(exports$1, module) {
|
|
750
750
|
var compare = require_compare();
|
|
751
|
-
var
|
|
752
|
-
module.exports =
|
|
751
|
+
var gt = /* @__PURE__ */ __name((a2, b, loose) => compare(a2, b, loose) > 0, "gt");
|
|
752
|
+
module.exports = gt;
|
|
753
753
|
}
|
|
754
754
|
});
|
|
755
755
|
|
|
@@ -757,8 +757,8 @@ var require_gt = __commonJS({
|
|
|
757
757
|
var require_lt = __commonJS({
|
|
758
758
|
"../../node_modules/.bun/semver@7.7.4/node_modules/semver/functions/lt.js"(exports$1, module) {
|
|
759
759
|
var compare = require_compare();
|
|
760
|
-
var
|
|
761
|
-
module.exports =
|
|
760
|
+
var lt = /* @__PURE__ */ __name((a2, b, loose) => compare(a2, b, loose) < 0, "lt");
|
|
761
|
+
module.exports = lt;
|
|
762
762
|
}
|
|
763
763
|
});
|
|
764
764
|
|
|
@@ -803,9 +803,9 @@ var require_cmp = __commonJS({
|
|
|
803
803
|
"../../node_modules/.bun/semver@7.7.4/node_modules/semver/functions/cmp.js"(exports$1, module) {
|
|
804
804
|
var eq = require_eq();
|
|
805
805
|
var neq = require_neq();
|
|
806
|
-
var
|
|
806
|
+
var gt = require_gt();
|
|
807
807
|
var gte = require_gte();
|
|
808
|
-
var
|
|
808
|
+
var lt = require_lt();
|
|
809
809
|
var lte = require_lte();
|
|
810
810
|
var cmp = /* @__PURE__ */ __name((a2, op, b, loose) => {
|
|
811
811
|
switch (op) {
|
|
@@ -832,11 +832,11 @@ var require_cmp = __commonJS({
|
|
|
832
832
|
case "!=":
|
|
833
833
|
return neq(a2, b, loose);
|
|
834
834
|
case ">":
|
|
835
|
-
return
|
|
835
|
+
return gt(a2, b, loose);
|
|
836
836
|
case ">=":
|
|
837
837
|
return gte(a2, b, loose);
|
|
838
838
|
case "<":
|
|
839
|
-
return
|
|
839
|
+
return lt(a2, b, loose);
|
|
840
840
|
case "<=":
|
|
841
841
|
return lte(a2, b, loose);
|
|
842
842
|
default:
|
|
@@ -959,19 +959,19 @@ var require_range = __commonJS({
|
|
|
959
959
|
this.loose = !!options.loose;
|
|
960
960
|
this.includePrerelease = !!options.includePrerelease;
|
|
961
961
|
this.raw = range.trim().replace(SPACE_CHARACTERS, " ");
|
|
962
|
-
this.set = this.raw.split("||").map((r) => this.parseRange(r.trim())).filter((
|
|
962
|
+
this.set = this.raw.split("||").map((r) => this.parseRange(r.trim())).filter((c2) => c2.length);
|
|
963
963
|
if (!this.set.length) {
|
|
964
964
|
throw new TypeError(`Invalid SemVer Range: ${this.raw}`);
|
|
965
965
|
}
|
|
966
966
|
if (this.set.length > 1) {
|
|
967
967
|
const first = this.set[0];
|
|
968
|
-
this.set = this.set.filter((
|
|
968
|
+
this.set = this.set.filter((c2) => !isNullSet(c2[0]));
|
|
969
969
|
if (this.set.length === 0) {
|
|
970
970
|
this.set = [first];
|
|
971
971
|
} else if (this.set.length > 1) {
|
|
972
|
-
for (const
|
|
973
|
-
if (
|
|
974
|
-
this.set = [
|
|
972
|
+
for (const c2 of this.set) {
|
|
973
|
+
if (c2.length === 1 && isAny(c2[0])) {
|
|
974
|
+
this.set = [c2];
|
|
975
975
|
break;
|
|
976
976
|
}
|
|
977
977
|
}
|
|
@@ -987,11 +987,11 @@ var require_range = __commonJS({
|
|
|
987
987
|
this.formatted += "||";
|
|
988
988
|
}
|
|
989
989
|
const comps = this.set[i];
|
|
990
|
-
for (let
|
|
991
|
-
if (
|
|
990
|
+
for (let k = 0; k < comps.length; k++) {
|
|
991
|
+
if (k > 0) {
|
|
992
992
|
this.formatted += " ";
|
|
993
993
|
}
|
|
994
|
-
this.formatted += comps[
|
|
994
|
+
this.formatted += comps[k].toString().trim();
|
|
995
995
|
}
|
|
996
996
|
}
|
|
997
997
|
}
|
|
@@ -1092,8 +1092,8 @@ var require_range = __commonJS({
|
|
|
1092
1092
|
caretTrimReplace
|
|
1093
1093
|
} = require_re();
|
|
1094
1094
|
var { FLAG_INCLUDE_PRERELEASE, FLAG_LOOSE } = require_constants();
|
|
1095
|
-
var isNullSet = /* @__PURE__ */ __name((
|
|
1096
|
-
var isAny = /* @__PURE__ */ __name((
|
|
1095
|
+
var isNullSet = /* @__PURE__ */ __name((c2) => c2.value === "<0.0.0-0", "isNullSet");
|
|
1096
|
+
var isAny = /* @__PURE__ */ __name((c2) => c2.value === "", "isAny");
|
|
1097
1097
|
var isSatisfiable = /* @__PURE__ */ __name((comparators, options) => {
|
|
1098
1098
|
let result = true;
|
|
1099
1099
|
const remainingComparators = comparators.slice();
|
|
@@ -1121,44 +1121,44 @@ var require_range = __commonJS({
|
|
|
1121
1121
|
}, "parseComparator");
|
|
1122
1122
|
var isX = /* @__PURE__ */ __name((id) => !id || id.toLowerCase() === "x" || id === "*", "isX");
|
|
1123
1123
|
var replaceTildes = /* @__PURE__ */ __name((comp, options) => {
|
|
1124
|
-
return comp.trim().split(/\s+/).map((
|
|
1124
|
+
return comp.trim().split(/\s+/).map((c2) => replaceTilde(c2, options)).join(" ");
|
|
1125
1125
|
}, "replaceTildes");
|
|
1126
1126
|
var replaceTilde = /* @__PURE__ */ __name((comp, options) => {
|
|
1127
1127
|
const r = options.loose ? re2[t2.TILDELOOSE] : re2[t2.TILDE];
|
|
1128
|
-
return comp.replace(r, (_3, M2, m,
|
|
1129
|
-
debug2("tilde", comp, _3, M2, m,
|
|
1128
|
+
return comp.replace(r, (_3, M2, m, p2, pr) => {
|
|
1129
|
+
debug2("tilde", comp, _3, M2, m, p2, pr);
|
|
1130
1130
|
let ret;
|
|
1131
1131
|
if (isX(M2)) {
|
|
1132
1132
|
ret = "";
|
|
1133
1133
|
} else if (isX(m)) {
|
|
1134
1134
|
ret = `>=${M2}.0.0 <${+M2 + 1}.0.0-0`;
|
|
1135
|
-
} else if (isX(
|
|
1135
|
+
} else if (isX(p2)) {
|
|
1136
1136
|
ret = `>=${M2}.${m}.0 <${M2}.${+m + 1}.0-0`;
|
|
1137
1137
|
} else if (pr) {
|
|
1138
1138
|
debug2("replaceTilde pr", pr);
|
|
1139
|
-
ret = `>=${M2}.${m}.${
|
|
1139
|
+
ret = `>=${M2}.${m}.${p2}-${pr} <${M2}.${+m + 1}.0-0`;
|
|
1140
1140
|
} else {
|
|
1141
|
-
ret = `>=${M2}.${m}.${
|
|
1141
|
+
ret = `>=${M2}.${m}.${p2} <${M2}.${+m + 1}.0-0`;
|
|
1142
1142
|
}
|
|
1143
1143
|
debug2("tilde return", ret);
|
|
1144
1144
|
return ret;
|
|
1145
1145
|
});
|
|
1146
1146
|
}, "replaceTilde");
|
|
1147
1147
|
var replaceCarets = /* @__PURE__ */ __name((comp, options) => {
|
|
1148
|
-
return comp.trim().split(/\s+/).map((
|
|
1148
|
+
return comp.trim().split(/\s+/).map((c2) => replaceCaret(c2, options)).join(" ");
|
|
1149
1149
|
}, "replaceCarets");
|
|
1150
1150
|
var replaceCaret = /* @__PURE__ */ __name((comp, options) => {
|
|
1151
1151
|
debug2("caret", comp, options);
|
|
1152
1152
|
const r = options.loose ? re2[t2.CARETLOOSE] : re2[t2.CARET];
|
|
1153
1153
|
const z3 = options.includePrerelease ? "-0" : "";
|
|
1154
|
-
return comp.replace(r, (_3, M2, m,
|
|
1155
|
-
debug2("caret", comp, _3, M2, m,
|
|
1154
|
+
return comp.replace(r, (_3, M2, m, p2, pr) => {
|
|
1155
|
+
debug2("caret", comp, _3, M2, m, p2, pr);
|
|
1156
1156
|
let ret;
|
|
1157
1157
|
if (isX(M2)) {
|
|
1158
1158
|
ret = "";
|
|
1159
1159
|
} else if (isX(m)) {
|
|
1160
1160
|
ret = `>=${M2}.0.0${z3} <${+M2 + 1}.0.0-0`;
|
|
1161
|
-
} else if (isX(
|
|
1161
|
+
} else if (isX(p2)) {
|
|
1162
1162
|
if (M2 === "0") {
|
|
1163
1163
|
ret = `>=${M2}.${m}.0${z3} <${M2}.${+m + 1}.0-0`;
|
|
1164
1164
|
} else {
|
|
@@ -1168,23 +1168,23 @@ var require_range = __commonJS({
|
|
|
1168
1168
|
debug2("replaceCaret pr", pr);
|
|
1169
1169
|
if (M2 === "0") {
|
|
1170
1170
|
if (m === "0") {
|
|
1171
|
-
ret = `>=${M2}.${m}.${
|
|
1171
|
+
ret = `>=${M2}.${m}.${p2}-${pr} <${M2}.${m}.${+p2 + 1}-0`;
|
|
1172
1172
|
} else {
|
|
1173
|
-
ret = `>=${M2}.${m}.${
|
|
1173
|
+
ret = `>=${M2}.${m}.${p2}-${pr} <${M2}.${+m + 1}.0-0`;
|
|
1174
1174
|
}
|
|
1175
1175
|
} else {
|
|
1176
|
-
ret = `>=${M2}.${m}.${
|
|
1176
|
+
ret = `>=${M2}.${m}.${p2}-${pr} <${+M2 + 1}.0.0-0`;
|
|
1177
1177
|
}
|
|
1178
1178
|
} else {
|
|
1179
1179
|
debug2("no pr");
|
|
1180
1180
|
if (M2 === "0") {
|
|
1181
1181
|
if (m === "0") {
|
|
1182
|
-
ret = `>=${M2}.${m}.${
|
|
1182
|
+
ret = `>=${M2}.${m}.${p2}${z3} <${M2}.${m}.${+p2 + 1}-0`;
|
|
1183
1183
|
} else {
|
|
1184
|
-
ret = `>=${M2}.${m}.${
|
|
1184
|
+
ret = `>=${M2}.${m}.${p2}${z3} <${M2}.${+m + 1}.0-0`;
|
|
1185
1185
|
}
|
|
1186
1186
|
} else {
|
|
1187
|
-
ret = `>=${M2}.${m}.${
|
|
1187
|
+
ret = `>=${M2}.${m}.${p2} <${+M2 + 1}.0.0-0`;
|
|
1188
1188
|
}
|
|
1189
1189
|
}
|
|
1190
1190
|
debug2("caret return", ret);
|
|
@@ -1193,16 +1193,16 @@ var require_range = __commonJS({
|
|
|
1193
1193
|
}, "replaceCaret");
|
|
1194
1194
|
var replaceXRanges = /* @__PURE__ */ __name((comp, options) => {
|
|
1195
1195
|
debug2("replaceXRanges", comp, options);
|
|
1196
|
-
return comp.split(/\s+/).map((
|
|
1196
|
+
return comp.split(/\s+/).map((c2) => replaceXRange(c2, options)).join(" ");
|
|
1197
1197
|
}, "replaceXRanges");
|
|
1198
1198
|
var replaceXRange = /* @__PURE__ */ __name((comp, options) => {
|
|
1199
1199
|
comp = comp.trim();
|
|
1200
1200
|
const r = options.loose ? re2[t2.XRANGELOOSE] : re2[t2.XRANGE];
|
|
1201
|
-
return comp.replace(r, (ret, gtlt, M2, m,
|
|
1202
|
-
debug2("xRange", comp, ret, gtlt, M2, m,
|
|
1201
|
+
return comp.replace(r, (ret, gtlt, M2, m, p2, pr) => {
|
|
1202
|
+
debug2("xRange", comp, ret, gtlt, M2, m, p2, pr);
|
|
1203
1203
|
const xM = isX(M2);
|
|
1204
1204
|
const xm = xM || isX(m);
|
|
1205
|
-
const xp = xm || isX(
|
|
1205
|
+
const xp = xm || isX(p2);
|
|
1206
1206
|
const anyX = xp;
|
|
1207
1207
|
if (gtlt === "=" && anyX) {
|
|
1208
1208
|
gtlt = "";
|
|
@@ -1218,16 +1218,16 @@ var require_range = __commonJS({
|
|
|
1218
1218
|
if (xm) {
|
|
1219
1219
|
m = 0;
|
|
1220
1220
|
}
|
|
1221
|
-
|
|
1221
|
+
p2 = 0;
|
|
1222
1222
|
if (gtlt === ">") {
|
|
1223
1223
|
gtlt = ">=";
|
|
1224
1224
|
if (xm) {
|
|
1225
1225
|
M2 = +M2 + 1;
|
|
1226
1226
|
m = 0;
|
|
1227
|
-
|
|
1227
|
+
p2 = 0;
|
|
1228
1228
|
} else {
|
|
1229
1229
|
m = +m + 1;
|
|
1230
|
-
|
|
1230
|
+
p2 = 0;
|
|
1231
1231
|
}
|
|
1232
1232
|
} else if (gtlt === "<=") {
|
|
1233
1233
|
gtlt = "<";
|
|
@@ -1240,7 +1240,7 @@ var require_range = __commonJS({
|
|
|
1240
1240
|
if (gtlt === "<") {
|
|
1241
1241
|
pr = "-0";
|
|
1242
1242
|
}
|
|
1243
|
-
ret = `${gtlt + M2}.${m}.${
|
|
1243
|
+
ret = `${gtlt + M2}.${m}.${p2}${pr}`;
|
|
1244
1244
|
} else if (xm) {
|
|
1245
1245
|
ret = `>=${M2}.0.0${pr} <${+M2 + 1}.0.0-0`;
|
|
1246
1246
|
} else if (xp) {
|
|
@@ -1446,7 +1446,7 @@ var require_satisfies = __commonJS({
|
|
|
1446
1446
|
var require_to_comparators = __commonJS({
|
|
1447
1447
|
"../../node_modules/.bun/semver@7.7.4/node_modules/semver/ranges/to-comparators.js"(exports$1, module) {
|
|
1448
1448
|
var Range = require_range();
|
|
1449
|
-
var toComparators = /* @__PURE__ */ __name((range, options) => new Range(range, options).set.map((comp) => comp.map((
|
|
1449
|
+
var toComparators = /* @__PURE__ */ __name((range, options) => new Range(range, options).set.map((comp) => comp.map((c2) => c2.value).join(" ").trim().split(" ")), "toComparators");
|
|
1450
1450
|
module.exports = toComparators;
|
|
1451
1451
|
}
|
|
1452
1452
|
});
|
|
@@ -1512,7 +1512,7 @@ var require_min_version = __commonJS({
|
|
|
1512
1512
|
"../../node_modules/.bun/semver@7.7.4/node_modules/semver/ranges/min-version.js"(exports$1, module) {
|
|
1513
1513
|
var SemVer = require_semver();
|
|
1514
1514
|
var Range = require_range();
|
|
1515
|
-
var
|
|
1515
|
+
var gt = require_gt();
|
|
1516
1516
|
var minVersion = /* @__PURE__ */ __name((range, loose) => {
|
|
1517
1517
|
range = new Range(range, loose);
|
|
1518
1518
|
let minver = new SemVer("0.0.0");
|
|
@@ -1540,7 +1540,7 @@ var require_min_version = __commonJS({
|
|
|
1540
1540
|
/* fallthrough */
|
|
1541
1541
|
case "":
|
|
1542
1542
|
case ">=":
|
|
1543
|
-
if (!setMin ||
|
|
1543
|
+
if (!setMin || gt(compver, setMin)) {
|
|
1544
1544
|
setMin = compver;
|
|
1545
1545
|
}
|
|
1546
1546
|
break;
|
|
@@ -1552,7 +1552,7 @@ var require_min_version = __commonJS({
|
|
|
1552
1552
|
throw new Error(`Unexpected operation: ${comparator.operator}`);
|
|
1553
1553
|
}
|
|
1554
1554
|
});
|
|
1555
|
-
if (setMin && (!minver ||
|
|
1555
|
+
if (setMin && (!minver || gt(minver, setMin))) {
|
|
1556
1556
|
minver = setMin;
|
|
1557
1557
|
}
|
|
1558
1558
|
}
|
|
@@ -1588,8 +1588,8 @@ var require_outside = __commonJS({
|
|
|
1588
1588
|
var { ANY } = Comparator;
|
|
1589
1589
|
var Range = require_range();
|
|
1590
1590
|
var satisfies = require_satisfies();
|
|
1591
|
-
var
|
|
1592
|
-
var
|
|
1591
|
+
var gt = require_gt();
|
|
1592
|
+
var lt = require_lt();
|
|
1593
1593
|
var lte = require_lte();
|
|
1594
1594
|
var gte = require_gte();
|
|
1595
1595
|
var outside = /* @__PURE__ */ __name((version, range, hilo, options) => {
|
|
@@ -1598,16 +1598,16 @@ var require_outside = __commonJS({
|
|
|
1598
1598
|
let gtfn, ltefn, ltfn, comp, ecomp;
|
|
1599
1599
|
switch (hilo) {
|
|
1600
1600
|
case ">":
|
|
1601
|
-
gtfn =
|
|
1601
|
+
gtfn = gt;
|
|
1602
1602
|
ltefn = lte;
|
|
1603
|
-
ltfn =
|
|
1603
|
+
ltfn = lt;
|
|
1604
1604
|
comp = ">";
|
|
1605
1605
|
ecomp = ">=";
|
|
1606
1606
|
break;
|
|
1607
1607
|
case "<":
|
|
1608
|
-
gtfn =
|
|
1608
|
+
gtfn = lt;
|
|
1609
1609
|
ltefn = gte;
|
|
1610
|
-
ltfn =
|
|
1610
|
+
ltfn = gt;
|
|
1611
1611
|
comp = "<";
|
|
1612
1612
|
ecomp = "<=";
|
|
1613
1613
|
break;
|
|
@@ -1780,37 +1780,37 @@ var require_subset = __commonJS({
|
|
|
1780
1780
|
}
|
|
1781
1781
|
}
|
|
1782
1782
|
const eqSet = /* @__PURE__ */ new Set();
|
|
1783
|
-
let
|
|
1784
|
-
for (const
|
|
1785
|
-
if (
|
|
1786
|
-
|
|
1787
|
-
} else if (
|
|
1788
|
-
|
|
1783
|
+
let gt, lt;
|
|
1784
|
+
for (const c2 of sub) {
|
|
1785
|
+
if (c2.operator === ">" || c2.operator === ">=") {
|
|
1786
|
+
gt = higherGT(gt, c2, options);
|
|
1787
|
+
} else if (c2.operator === "<" || c2.operator === "<=") {
|
|
1788
|
+
lt = lowerLT(lt, c2, options);
|
|
1789
1789
|
} else {
|
|
1790
|
-
eqSet.add(
|
|
1790
|
+
eqSet.add(c2.semver);
|
|
1791
1791
|
}
|
|
1792
1792
|
}
|
|
1793
1793
|
if (eqSet.size > 1) {
|
|
1794
1794
|
return null;
|
|
1795
1795
|
}
|
|
1796
1796
|
let gtltComp;
|
|
1797
|
-
if (
|
|
1798
|
-
gtltComp = compare(
|
|
1797
|
+
if (gt && lt) {
|
|
1798
|
+
gtltComp = compare(gt.semver, lt.semver, options);
|
|
1799
1799
|
if (gtltComp > 0) {
|
|
1800
1800
|
return null;
|
|
1801
|
-
} else if (gtltComp === 0 && (
|
|
1801
|
+
} else if (gtltComp === 0 && (gt.operator !== ">=" || lt.operator !== "<=")) {
|
|
1802
1802
|
return null;
|
|
1803
1803
|
}
|
|
1804
1804
|
}
|
|
1805
1805
|
for (const eq of eqSet) {
|
|
1806
|
-
if (
|
|
1806
|
+
if (gt && !satisfies(eq, String(gt), options)) {
|
|
1807
1807
|
return null;
|
|
1808
1808
|
}
|
|
1809
|
-
if (
|
|
1809
|
+
if (lt && !satisfies(eq, String(lt), options)) {
|
|
1810
1810
|
return null;
|
|
1811
1811
|
}
|
|
1812
|
-
for (const
|
|
1813
|
-
if (!satisfies(eq, String(
|
|
1812
|
+
for (const c2 of dom) {
|
|
1813
|
+
if (!satisfies(eq, String(c2), options)) {
|
|
1814
1814
|
return false;
|
|
1815
1815
|
}
|
|
1816
1816
|
}
|
|
@@ -1818,52 +1818,52 @@ var require_subset = __commonJS({
|
|
|
1818
1818
|
}
|
|
1819
1819
|
let higher, lower;
|
|
1820
1820
|
let hasDomLT, hasDomGT;
|
|
1821
|
-
let needDomLTPre =
|
|
1822
|
-
let needDomGTPre =
|
|
1823
|
-
if (needDomLTPre && needDomLTPre.prerelease.length === 1 &&
|
|
1821
|
+
let needDomLTPre = lt && !options.includePrerelease && lt.semver.prerelease.length ? lt.semver : false;
|
|
1822
|
+
let needDomGTPre = gt && !options.includePrerelease && gt.semver.prerelease.length ? gt.semver : false;
|
|
1823
|
+
if (needDomLTPre && needDomLTPre.prerelease.length === 1 && lt.operator === "<" && needDomLTPre.prerelease[0] === 0) {
|
|
1824
1824
|
needDomLTPre = false;
|
|
1825
1825
|
}
|
|
1826
|
-
for (const
|
|
1827
|
-
hasDomGT = hasDomGT ||
|
|
1828
|
-
hasDomLT = hasDomLT ||
|
|
1829
|
-
if (
|
|
1826
|
+
for (const c2 of dom) {
|
|
1827
|
+
hasDomGT = hasDomGT || c2.operator === ">" || c2.operator === ">=";
|
|
1828
|
+
hasDomLT = hasDomLT || c2.operator === "<" || c2.operator === "<=";
|
|
1829
|
+
if (gt) {
|
|
1830
1830
|
if (needDomGTPre) {
|
|
1831
|
-
if (
|
|
1831
|
+
if (c2.semver.prerelease && c2.semver.prerelease.length && c2.semver.major === needDomGTPre.major && c2.semver.minor === needDomGTPre.minor && c2.semver.patch === needDomGTPre.patch) {
|
|
1832
1832
|
needDomGTPre = false;
|
|
1833
1833
|
}
|
|
1834
1834
|
}
|
|
1835
|
-
if (
|
|
1836
|
-
higher = higherGT(
|
|
1837
|
-
if (higher ===
|
|
1835
|
+
if (c2.operator === ">" || c2.operator === ">=") {
|
|
1836
|
+
higher = higherGT(gt, c2, options);
|
|
1837
|
+
if (higher === c2 && higher !== gt) {
|
|
1838
1838
|
return false;
|
|
1839
1839
|
}
|
|
1840
|
-
} else if (
|
|
1840
|
+
} else if (gt.operator === ">=" && !satisfies(gt.semver, String(c2), options)) {
|
|
1841
1841
|
return false;
|
|
1842
1842
|
}
|
|
1843
1843
|
}
|
|
1844
|
-
if (
|
|
1844
|
+
if (lt) {
|
|
1845
1845
|
if (needDomLTPre) {
|
|
1846
|
-
if (
|
|
1846
|
+
if (c2.semver.prerelease && c2.semver.prerelease.length && c2.semver.major === needDomLTPre.major && c2.semver.minor === needDomLTPre.minor && c2.semver.patch === needDomLTPre.patch) {
|
|
1847
1847
|
needDomLTPre = false;
|
|
1848
1848
|
}
|
|
1849
1849
|
}
|
|
1850
|
-
if (
|
|
1851
|
-
lower = lowerLT(
|
|
1852
|
-
if (lower ===
|
|
1850
|
+
if (c2.operator === "<" || c2.operator === "<=") {
|
|
1851
|
+
lower = lowerLT(lt, c2, options);
|
|
1852
|
+
if (lower === c2 && lower !== lt) {
|
|
1853
1853
|
return false;
|
|
1854
1854
|
}
|
|
1855
|
-
} else if (
|
|
1855
|
+
} else if (lt.operator === "<=" && !satisfies(lt.semver, String(c2), options)) {
|
|
1856
1856
|
return false;
|
|
1857
1857
|
}
|
|
1858
1858
|
}
|
|
1859
|
-
if (!
|
|
1859
|
+
if (!c2.operator && (lt || gt) && gtltComp !== 0) {
|
|
1860
1860
|
return false;
|
|
1861
1861
|
}
|
|
1862
1862
|
}
|
|
1863
|
-
if (
|
|
1863
|
+
if (gt && hasDomLT && !lt && gtltComp !== 0) {
|
|
1864
1864
|
return false;
|
|
1865
1865
|
}
|
|
1866
|
-
if (
|
|
1866
|
+
if (lt && hasDomGT && !gt && gtltComp !== 0) {
|
|
1867
1867
|
return false;
|
|
1868
1868
|
}
|
|
1869
1869
|
if (needDomGTPre || needDomLTPre) {
|
|
@@ -1911,8 +1911,8 @@ var require_semver2 = __commonJS({
|
|
|
1911
1911
|
var compareBuild = require_compare_build();
|
|
1912
1912
|
var sort = require_sort();
|
|
1913
1913
|
var rsort = require_rsort();
|
|
1914
|
-
var
|
|
1915
|
-
var
|
|
1914
|
+
var gt = require_gt();
|
|
1915
|
+
var lt = require_lt();
|
|
1916
1916
|
var eq = require_eq();
|
|
1917
1917
|
var neq = require_neq();
|
|
1918
1918
|
var gte = require_gte();
|
|
@@ -1949,8 +1949,8 @@ var require_semver2 = __commonJS({
|
|
|
1949
1949
|
compareBuild,
|
|
1950
1950
|
sort,
|
|
1951
1951
|
rsort,
|
|
1952
|
-
gt
|
|
1953
|
-
lt
|
|
1952
|
+
gt,
|
|
1953
|
+
lt,
|
|
1954
1954
|
eq,
|
|
1955
1955
|
neq,
|
|
1956
1956
|
gte,
|
|
@@ -1986,45 +1986,45 @@ var require_semver2 = __commonJS({
|
|
|
1986
1986
|
// ../../node_modules/.bun/sisteransi@1.0.5/node_modules/sisteransi/src/index.js
|
|
1987
1987
|
var require_src = __commonJS({
|
|
1988
1988
|
"../../node_modules/.bun/sisteransi@1.0.5/node_modules/sisteransi/src/index.js"(exports$1, module) {
|
|
1989
|
-
var
|
|
1990
|
-
var
|
|
1989
|
+
var ESC2 = "\x1B";
|
|
1990
|
+
var CSI2 = `${ESC2}[`;
|
|
1991
1991
|
var beep = "\x07";
|
|
1992
1992
|
var cursor = {
|
|
1993
|
-
to(
|
|
1994
|
-
if (!y2) return `${
|
|
1995
|
-
return `${
|
|
1993
|
+
to(x, y2) {
|
|
1994
|
+
if (!y2) return `${CSI2}${x + 1}G`;
|
|
1995
|
+
return `${CSI2}${y2 + 1};${x + 1}H`;
|
|
1996
1996
|
},
|
|
1997
|
-
move(
|
|
1997
|
+
move(x, y2) {
|
|
1998
1998
|
let ret = "";
|
|
1999
|
-
if (
|
|
2000
|
-
else if (
|
|
2001
|
-
if (y2 < 0) ret += `${
|
|
2002
|
-
else if (y2 > 0) ret += `${
|
|
1999
|
+
if (x < 0) ret += `${CSI2}${-x}D`;
|
|
2000
|
+
else if (x > 0) ret += `${CSI2}${x}C`;
|
|
2001
|
+
if (y2 < 0) ret += `${CSI2}${-y2}A`;
|
|
2002
|
+
else if (y2 > 0) ret += `${CSI2}${y2}B`;
|
|
2003
2003
|
return ret;
|
|
2004
2004
|
},
|
|
2005
|
-
up: /* @__PURE__ */ __name((count = 1) => `${
|
|
2006
|
-
down: /* @__PURE__ */ __name((count = 1) => `${
|
|
2007
|
-
forward: /* @__PURE__ */ __name((count = 1) => `${
|
|
2008
|
-
backward: /* @__PURE__ */ __name((count = 1) => `${
|
|
2009
|
-
nextLine: /* @__PURE__ */ __name((count = 1) => `${
|
|
2010
|
-
prevLine: /* @__PURE__ */ __name((count = 1) => `${
|
|
2011
|
-
left: `${
|
|
2012
|
-
hide: `${
|
|
2013
|
-
show: `${
|
|
2014
|
-
save: `${
|
|
2015
|
-
restore: `${
|
|
2005
|
+
up: /* @__PURE__ */ __name((count = 1) => `${CSI2}${count}A`, "up"),
|
|
2006
|
+
down: /* @__PURE__ */ __name((count = 1) => `${CSI2}${count}B`, "down"),
|
|
2007
|
+
forward: /* @__PURE__ */ __name((count = 1) => `${CSI2}${count}C`, "forward"),
|
|
2008
|
+
backward: /* @__PURE__ */ __name((count = 1) => `${CSI2}${count}D`, "backward"),
|
|
2009
|
+
nextLine: /* @__PURE__ */ __name((count = 1) => `${CSI2}E`.repeat(count), "nextLine"),
|
|
2010
|
+
prevLine: /* @__PURE__ */ __name((count = 1) => `${CSI2}F`.repeat(count), "prevLine"),
|
|
2011
|
+
left: `${CSI2}G`,
|
|
2012
|
+
hide: `${CSI2}?25l`,
|
|
2013
|
+
show: `${CSI2}?25h`,
|
|
2014
|
+
save: `${ESC2}7`,
|
|
2015
|
+
restore: `${ESC2}8`
|
|
2016
2016
|
};
|
|
2017
2017
|
var scroll = {
|
|
2018
|
-
up: /* @__PURE__ */ __name((count = 1) => `${
|
|
2019
|
-
down: /* @__PURE__ */ __name((count = 1) => `${
|
|
2018
|
+
up: /* @__PURE__ */ __name((count = 1) => `${CSI2}S`.repeat(count), "up"),
|
|
2019
|
+
down: /* @__PURE__ */ __name((count = 1) => `${CSI2}T`.repeat(count), "down")
|
|
2020
2020
|
};
|
|
2021
2021
|
var erase = {
|
|
2022
|
-
screen: `${
|
|
2023
|
-
up: /* @__PURE__ */ __name((count = 1) => `${
|
|
2024
|
-
down: /* @__PURE__ */ __name((count = 1) => `${
|
|
2025
|
-
line: `${
|
|
2026
|
-
lineEnd: `${
|
|
2027
|
-
lineStart: `${
|
|
2022
|
+
screen: `${CSI2}2J`,
|
|
2023
|
+
up: /* @__PURE__ */ __name((count = 1) => `${CSI2}1J`.repeat(count), "up"),
|
|
2024
|
+
down: /* @__PURE__ */ __name((count = 1) => `${CSI2}J`.repeat(count), "down"),
|
|
2025
|
+
line: `${CSI2}2K`,
|
|
2026
|
+
lineEnd: `${CSI2}K`,
|
|
2027
|
+
lineStart: `${CSI2}1K`,
|
|
2028
2028
|
lines(count) {
|
|
2029
2029
|
let clear = "";
|
|
2030
2030
|
for (let i = 0; i < count; i++)
|
|
@@ -2038,7 +2038,7 @@ var require_src = __commonJS({
|
|
|
2038
2038
|
}
|
|
2039
2039
|
});
|
|
2040
2040
|
|
|
2041
|
-
// ../env-spec-parser/dist/chunk-
|
|
2041
|
+
// ../env-spec-parser/dist/chunk-JOUVRUWD.mjs
|
|
2042
2042
|
var __defProp = Object.defineProperty;
|
|
2043
2043
|
var __name2 = /* @__PURE__ */ __name((target, value) => __defProp(target, "name", { value, configurable: true }), "__name");
|
|
2044
2044
|
var VALID_NUMBER_REGEX = /^-?(0|([1-9][0-9]*))?(\.[0-9]+)?$/;
|
|
@@ -2065,6 +2065,7 @@ var ParsedEnvSpecDivider = class {
|
|
|
2065
2065
|
constructor(data) {
|
|
2066
2066
|
this.data = data;
|
|
2067
2067
|
}
|
|
2068
|
+
data;
|
|
2068
2069
|
static {
|
|
2069
2070
|
__name2(this, "ParsedEnvSpecDivider");
|
|
2070
2071
|
}
|
|
@@ -2091,6 +2092,7 @@ var ParsedEnvSpecStaticValue = class {
|
|
|
2091
2092
|
this.value = data.rawValue.slice(data.quote.length, -1 * data.quote.length).replaceAll(`\\${quoteChar}`, quoteChar);
|
|
2092
2093
|
}
|
|
2093
2094
|
}
|
|
2095
|
+
data;
|
|
2094
2096
|
static {
|
|
2095
2097
|
__name2(this, "ParsedEnvSpecStaticValue");
|
|
2096
2098
|
}
|
|
@@ -2121,6 +2123,7 @@ var ParsedEnvSpecKeyValuePair = class {
|
|
|
2121
2123
|
constructor(data) {
|
|
2122
2124
|
this.data = data;
|
|
2123
2125
|
}
|
|
2126
|
+
data;
|
|
2124
2127
|
static {
|
|
2125
2128
|
__name2(this, "ParsedEnvSpecKeyValuePair");
|
|
2126
2129
|
}
|
|
@@ -2141,6 +2144,7 @@ var ParsedEnvSpecFunctionArgs = class {
|
|
|
2141
2144
|
constructor(data) {
|
|
2142
2145
|
this.data = data;
|
|
2143
2146
|
}
|
|
2147
|
+
data;
|
|
2144
2148
|
static {
|
|
2145
2149
|
__name2(this, "ParsedEnvSpecFunctionArgs");
|
|
2146
2150
|
}
|
|
@@ -2183,6 +2187,7 @@ var ParsedEnvSpecFunctionCall = class {
|
|
|
2183
2187
|
constructor(data) {
|
|
2184
2188
|
this.data = data;
|
|
2185
2189
|
}
|
|
2190
|
+
data;
|
|
2186
2191
|
static {
|
|
2187
2192
|
__name2(this, "ParsedEnvSpecFunctionCall");
|
|
2188
2193
|
}
|
|
@@ -2212,6 +2217,7 @@ var ParsedEnvSpecDecorator = class {
|
|
|
2212
2217
|
this.value = expanded;
|
|
2213
2218
|
}
|
|
2214
2219
|
}
|
|
2220
|
+
data;
|
|
2215
2221
|
static {
|
|
2216
2222
|
__name2(this, "ParsedEnvSpecDecorator");
|
|
2217
2223
|
}
|
|
@@ -2247,6 +2253,7 @@ var ParsedEnvSpecComment = class {
|
|
|
2247
2253
|
constructor(data) {
|
|
2248
2254
|
this.data = data;
|
|
2249
2255
|
}
|
|
2256
|
+
data;
|
|
2250
2257
|
static {
|
|
2251
2258
|
__name2(this, "ParsedEnvSpecComment");
|
|
2252
2259
|
}
|
|
@@ -2264,6 +2271,7 @@ var ParsedEnvSpecDecoratorComment = class {
|
|
|
2264
2271
|
constructor(data) {
|
|
2265
2272
|
this.data = data;
|
|
2266
2273
|
}
|
|
2274
|
+
data;
|
|
2267
2275
|
static {
|
|
2268
2276
|
__name2(this, "ParsedEnvSpecDecoratorComment");
|
|
2269
2277
|
}
|
|
@@ -2276,7 +2284,7 @@ var ParsedEnvSpecDecoratorComment = class {
|
|
|
2276
2284
|
toString() {
|
|
2277
2285
|
let s = "#";
|
|
2278
2286
|
s += this.data.leadingSpace || "";
|
|
2279
|
-
s += this.data.decorators.map((
|
|
2287
|
+
s += this.data.decorators.map((d3) => d3.toString()).join(" ");
|
|
2280
2288
|
if (this.data.postComment) s += ` ${this.data.postComment.toString()}`;
|
|
2281
2289
|
return s;
|
|
2282
2290
|
}
|
|
@@ -2312,6 +2320,7 @@ var ParsedEnvSpecCommentBlock = class {
|
|
|
2312
2320
|
constructor(data) {
|
|
2313
2321
|
this.data = data;
|
|
2314
2322
|
}
|
|
2323
|
+
data;
|
|
2315
2324
|
static {
|
|
2316
2325
|
__name2(this, "ParsedEnvSpecCommentBlock");
|
|
2317
2326
|
}
|
|
@@ -2341,6 +2350,7 @@ var ParsedEnvSpecBlankLine = class {
|
|
|
2341
2350
|
constructor(data) {
|
|
2342
2351
|
this.data = data;
|
|
2343
2352
|
}
|
|
2353
|
+
data;
|
|
2344
2354
|
static {
|
|
2345
2355
|
__name2(this, "ParsedEnvSpecBlankLine");
|
|
2346
2356
|
}
|
|
@@ -2364,6 +2374,7 @@ var ParsedEnvSpecConfigItem = class {
|
|
|
2364
2374
|
this.value = expanded;
|
|
2365
2375
|
}
|
|
2366
2376
|
}
|
|
2377
|
+
data;
|
|
2367
2378
|
static {
|
|
2368
2379
|
__name2(this, "ParsedEnvSpecConfigItem");
|
|
2369
2380
|
}
|
|
@@ -3197,30 +3208,30 @@ function peg$parse(input, options) {
|
|
|
3197
3208
|
__name2(peg$otherExpectation, "peg$otherExpectation");
|
|
3198
3209
|
function peg$computePosDetails(pos) {
|
|
3199
3210
|
let details = peg$posDetailsCache[pos];
|
|
3200
|
-
let
|
|
3211
|
+
let p2;
|
|
3201
3212
|
if (details) {
|
|
3202
3213
|
return details;
|
|
3203
3214
|
} else {
|
|
3204
3215
|
if (pos >= peg$posDetailsCache.length) {
|
|
3205
|
-
|
|
3216
|
+
p2 = peg$posDetailsCache.length - 1;
|
|
3206
3217
|
} else {
|
|
3207
|
-
|
|
3208
|
-
while (!peg$posDetailsCache[--
|
|
3218
|
+
p2 = pos;
|
|
3219
|
+
while (!peg$posDetailsCache[--p2]) {
|
|
3209
3220
|
}
|
|
3210
3221
|
}
|
|
3211
|
-
details = peg$posDetailsCache[
|
|
3222
|
+
details = peg$posDetailsCache[p2];
|
|
3212
3223
|
details = {
|
|
3213
3224
|
line: details.line,
|
|
3214
3225
|
column: details.column
|
|
3215
3226
|
};
|
|
3216
|
-
while (
|
|
3217
|
-
if (input.charCodeAt(
|
|
3227
|
+
while (p2 < pos) {
|
|
3228
|
+
if (input.charCodeAt(p2) === 10) {
|
|
3218
3229
|
details.line++;
|
|
3219
3230
|
details.column = 1;
|
|
3220
3231
|
} else {
|
|
3221
3232
|
details.column++;
|
|
3222
3233
|
}
|
|
3223
|
-
|
|
3234
|
+
p2++;
|
|
3224
3235
|
}
|
|
3225
3236
|
peg$posDetailsCache[pos] = details;
|
|
3226
3237
|
return details;
|
|
@@ -7560,9 +7571,9 @@ var VALID_ENVIRONMENTS = /* @__PURE__ */ new Set(
|
|
|
7560
7571
|
["development", "preview", "staging", "production", "test"]
|
|
7561
7572
|
);
|
|
7562
7573
|
function runDetect(platform, env) {
|
|
7563
|
-
const
|
|
7564
|
-
if (typeof
|
|
7565
|
-
return
|
|
7574
|
+
const d3 = platform.detect;
|
|
7575
|
+
if (typeof d3 === "string") return !!env[d3];
|
|
7576
|
+
return d3(env);
|
|
7566
7577
|
}
|
|
7567
7578
|
__name(runDetect, "runDetect");
|
|
7568
7579
|
function runExtractor(platform, key, env) {
|
|
@@ -7607,13 +7618,13 @@ function buildRaw(platform, env) {
|
|
|
7607
7618
|
];
|
|
7608
7619
|
const raw = {};
|
|
7609
7620
|
let hasAny = false;
|
|
7610
|
-
for (const
|
|
7611
|
-
const ext = platform[
|
|
7621
|
+
for (const k of keys) {
|
|
7622
|
+
const ext = platform[k];
|
|
7612
7623
|
if (typeof ext === "string" && env[ext]) {
|
|
7613
7624
|
raw[ext] = env[ext];
|
|
7614
7625
|
hasAny = true;
|
|
7615
7626
|
}
|
|
7616
|
-
if (
|
|
7627
|
+
if (k === "environment" && typeof ext === "object" && ext !== null && "var" in ext && env[ext.var]) {
|
|
7617
7628
|
raw[ext.var] = env[ext.var];
|
|
7618
7629
|
hasAny = true;
|
|
7619
7630
|
}
|
|
@@ -7670,6 +7681,9 @@ var ExecError = class extends Error {
|
|
|
7670
7681
|
this.signal = signal;
|
|
7671
7682
|
this.data = data;
|
|
7672
7683
|
}
|
|
7684
|
+
exitCode;
|
|
7685
|
+
signal;
|
|
7686
|
+
data;
|
|
7673
7687
|
static {
|
|
7674
7688
|
__name(this, "ExecError");
|
|
7675
7689
|
}
|
|
@@ -7848,7 +7862,7 @@ var EnvGraph = class {
|
|
|
7848
7862
|
let effectiveKeys;
|
|
7849
7863
|
const hasFilter = importKeys && importKeys.length > 0;
|
|
7850
7864
|
if (hasFilter && siteKeys?.length) {
|
|
7851
|
-
effectiveKeys = importKeys.filter((
|
|
7865
|
+
effectiveKeys = importKeys.filter((k) => siteKeys.includes(k));
|
|
7852
7866
|
} else if (hasFilter) {
|
|
7853
7867
|
effectiveKeys = importKeys;
|
|
7854
7868
|
} else {
|
|
@@ -8264,18 +8278,18 @@ var EnvGraph = class {
|
|
|
8264
8278
|
/** plugins installed globally in the graph */
|
|
8265
8279
|
plugins = [];
|
|
8266
8280
|
};
|
|
8267
|
-
async function pathExists(
|
|
8281
|
+
async function pathExists(p2) {
|
|
8268
8282
|
try {
|
|
8269
|
-
await access(
|
|
8283
|
+
await access(p2);
|
|
8270
8284
|
return true;
|
|
8271
8285
|
} catch {
|
|
8272
8286
|
return false;
|
|
8273
8287
|
}
|
|
8274
8288
|
}
|
|
8275
8289
|
__name(pathExists, "pathExists");
|
|
8276
|
-
function pathExistsSync(
|
|
8290
|
+
function pathExistsSync(p2) {
|
|
8277
8291
|
try {
|
|
8278
|
-
accessSync(
|
|
8292
|
+
accessSync(p2);
|
|
8279
8293
|
return true;
|
|
8280
8294
|
} catch {
|
|
8281
8295
|
return false;
|
|
@@ -8291,221 +8305,434 @@ var { Ansis, fg, bg, rgb, bgRgb, hex, bgHex, reset, inverse, hidden, visible, bo
|
|
|
8291
8305
|
// src/env-graph/lib/plugins.ts
|
|
8292
8306
|
var import_semver = __toESM(require_semver2(), 1);
|
|
8293
8307
|
|
|
8294
|
-
// ../../node_modules/.bun
|
|
8295
|
-
var
|
|
8296
|
-
|
|
8297
|
-
|
|
8298
|
-
|
|
8299
|
-
return
|
|
8300
|
-
}
|
|
8301
|
-
__name(x
|
|
8302
|
-
|
|
8303
|
-
|
|
8304
|
-
|
|
8305
|
-
|
|
8306
|
-
var
|
|
8307
|
-
var
|
|
8308
|
-
var
|
|
8309
|
-
var
|
|
8310
|
-
var
|
|
8311
|
-
var
|
|
8312
|
-
var
|
|
8313
|
-
|
|
8314
|
-
|
|
8315
|
-
|
|
8316
|
-
|
|
8317
|
-
|
|
8318
|
-
|
|
8319
|
-
|
|
8320
|
-
|
|
8321
|
-
|
|
8322
|
-
|
|
8323
|
-
|
|
8324
|
-
|
|
8325
|
-
|
|
8326
|
-
|
|
8327
|
-
|
|
8328
|
-
|
|
8329
|
-
|
|
8330
|
-
|
|
8331
|
-
|
|
8332
|
-
|
|
8308
|
+
// ../../node_modules/.bun/fast-string-truncated-width@1.2.1/node_modules/fast-string-truncated-width/dist/utils.js
|
|
8309
|
+
var isAmbiguous = /* @__PURE__ */ __name((x) => {
|
|
8310
|
+
return x === 161 || x === 164 || x === 167 || x === 168 || x === 170 || x === 173 || x === 174 || x >= 176 && x <= 180 || x >= 182 && x <= 186 || x >= 188 && x <= 191 || x === 198 || x === 208 || x === 215 || x === 216 || x >= 222 && x <= 225 || x === 230 || x >= 232 && x <= 234 || x === 236 || x === 237 || x === 240 || x === 242 || x === 243 || x >= 247 && x <= 250 || x === 252 || x === 254 || x === 257 || x === 273 || x === 275 || x === 283 || x === 294 || x === 295 || x === 299 || x >= 305 && x <= 307 || x === 312 || x >= 319 && x <= 322 || x === 324 || x >= 328 && x <= 331 || x === 333 || x === 338 || x === 339 || x === 358 || x === 359 || x === 363 || x === 462 || x === 464 || x === 466 || x === 468 || x === 470 || x === 472 || x === 474 || x === 476 || x === 593 || x === 609 || x === 708 || x === 711 || x >= 713 && x <= 715 || x === 717 || x === 720 || x >= 728 && x <= 731 || x === 733 || x === 735 || x >= 768 && x <= 879 || x >= 913 && x <= 929 || x >= 931 && x <= 937 || x >= 945 && x <= 961 || x >= 963 && x <= 969 || x === 1025 || x >= 1040 && x <= 1103 || x === 1105 || x === 8208 || x >= 8211 && x <= 8214 || x === 8216 || x === 8217 || x === 8220 || x === 8221 || x >= 8224 && x <= 8226 || x >= 8228 && x <= 8231 || x === 8240 || x === 8242 || x === 8243 || x === 8245 || x === 8251 || x === 8254 || x === 8308 || x === 8319 || x >= 8321 && x <= 8324 || x === 8364 || x === 8451 || x === 8453 || x === 8457 || x === 8467 || x === 8470 || x === 8481 || x === 8482 || x === 8486 || x === 8491 || x === 8531 || x === 8532 || x >= 8539 && x <= 8542 || x >= 8544 && x <= 8555 || x >= 8560 && x <= 8569 || x === 8585 || x >= 8592 && x <= 8601 || x === 8632 || x === 8633 || x === 8658 || x === 8660 || x === 8679 || x === 8704 || x === 8706 || x === 8707 || x === 8711 || x === 8712 || x === 8715 || x === 8719 || x === 8721 || x === 8725 || x === 8730 || x >= 8733 && x <= 8736 || x === 8739 || x === 8741 || x >= 8743 && x <= 8748 || x === 8750 || x >= 8756 && x <= 8759 || x === 8764 || x === 8765 || x === 8776 || x === 8780 || x === 8786 || x === 8800 || x === 8801 || x >= 8804 && x <= 8807 || x === 8810 || x === 8811 || x === 8814 || x === 8815 || x === 8834 || x === 8835 || x === 8838 || x === 8839 || x === 8853 || x === 8857 || x === 8869 || x === 8895 || x === 8978 || x >= 9312 && x <= 9449 || x >= 9451 && x <= 9547 || x >= 9552 && x <= 9587 || x >= 9600 && x <= 9615 || x >= 9618 && x <= 9621 || x === 9632 || x === 9633 || x >= 9635 && x <= 9641 || x === 9650 || x === 9651 || x === 9654 || x === 9655 || x === 9660 || x === 9661 || x === 9664 || x === 9665 || x >= 9670 && x <= 9672 || x === 9675 || x >= 9678 && x <= 9681 || x >= 9698 && x <= 9701 || x === 9711 || x === 9733 || x === 9734 || x === 9737 || x === 9742 || x === 9743 || x === 9756 || x === 9758 || x === 9792 || x === 9794 || x === 9824 || x === 9825 || x >= 9827 && x <= 9829 || x >= 9831 && x <= 9834 || x === 9836 || x === 9837 || x === 9839 || x === 9886 || x === 9887 || x === 9919 || x >= 9926 && x <= 9933 || x >= 9935 && x <= 9939 || x >= 9941 && x <= 9953 || x === 9955 || x === 9960 || x === 9961 || x >= 9963 && x <= 9969 || x === 9972 || x >= 9974 && x <= 9977 || x === 9979 || x === 9980 || x === 9982 || x === 9983 || x === 10045 || x >= 10102 && x <= 10111 || x >= 11094 && x <= 11097 || x >= 12872 && x <= 12879 || x >= 57344 && x <= 63743 || x >= 65024 && x <= 65039 || x === 65533 || x >= 127232 && x <= 127242 || x >= 127248 && x <= 127277 || x >= 127280 && x <= 127337 || x >= 127344 && x <= 127373 || x === 127375 || x === 127376 || x >= 127387 && x <= 127404 || x >= 917760 && x <= 917999 || x >= 983040 && x <= 1048573 || x >= 1048576 && x <= 1114109;
|
|
8311
|
+
}, "isAmbiguous");
|
|
8312
|
+
var isFullWidth = /* @__PURE__ */ __name((x) => {
|
|
8313
|
+
return x === 12288 || x >= 65281 && x <= 65376 || x >= 65504 && x <= 65510;
|
|
8314
|
+
}, "isFullWidth");
|
|
8315
|
+
var isWide = /* @__PURE__ */ __name((x) => {
|
|
8316
|
+
return x >= 4352 && x <= 4447 || x === 8986 || x === 8987 || x === 9001 || x === 9002 || x >= 9193 && x <= 9196 || x === 9200 || x === 9203 || x === 9725 || x === 9726 || x === 9748 || x === 9749 || x >= 9800 && x <= 9811 || x === 9855 || x === 9875 || x === 9889 || x === 9898 || x === 9899 || x === 9917 || x === 9918 || x === 9924 || x === 9925 || x === 9934 || x === 9940 || x === 9962 || x === 9970 || x === 9971 || x === 9973 || x === 9978 || x === 9981 || x === 9989 || x === 9994 || x === 9995 || x === 10024 || x === 10060 || x === 10062 || x >= 10067 && x <= 10069 || x === 10071 || x >= 10133 && x <= 10135 || x === 10160 || x === 10175 || x === 11035 || x === 11036 || x === 11088 || x === 11093 || x >= 11904 && x <= 11929 || x >= 11931 && x <= 12019 || x >= 12032 && x <= 12245 || x >= 12272 && x <= 12287 || x >= 12289 && x <= 12350 || x >= 12353 && x <= 12438 || x >= 12441 && x <= 12543 || x >= 12549 && x <= 12591 || x >= 12593 && x <= 12686 || x >= 12688 && x <= 12771 || x >= 12783 && x <= 12830 || x >= 12832 && x <= 12871 || x >= 12880 && x <= 19903 || x >= 19968 && x <= 42124 || x >= 42128 && x <= 42182 || x >= 43360 && x <= 43388 || x >= 44032 && x <= 55203 || x >= 63744 && x <= 64255 || x >= 65040 && x <= 65049 || x >= 65072 && x <= 65106 || x >= 65108 && x <= 65126 || x >= 65128 && x <= 65131 || x >= 94176 && x <= 94180 || x === 94192 || x === 94193 || x >= 94208 && x <= 100343 || x >= 100352 && x <= 101589 || x >= 101632 && x <= 101640 || x >= 110576 && x <= 110579 || x >= 110581 && x <= 110587 || x === 110589 || x === 110590 || x >= 110592 && x <= 110882 || x === 110898 || x >= 110928 && x <= 110930 || x === 110933 || x >= 110948 && x <= 110951 || x >= 110960 && x <= 111355 || x === 126980 || x === 127183 || x === 127374 || x >= 127377 && x <= 127386 || x >= 127488 && x <= 127490 || x >= 127504 && x <= 127547 || x >= 127552 && x <= 127560 || x === 127568 || x === 127569 || x >= 127584 && x <= 127589 || x >= 127744 && x <= 127776 || x >= 127789 && x <= 127797 || x >= 127799 && x <= 127868 || x >= 127870 && x <= 127891 || x >= 127904 && x <= 127946 || x >= 127951 && x <= 127955 || x >= 127968 && x <= 127984 || x === 127988 || x >= 127992 && x <= 128062 || x === 128064 || x >= 128066 && x <= 128252 || x >= 128255 && x <= 128317 || x >= 128331 && x <= 128334 || x >= 128336 && x <= 128359 || x === 128378 || x === 128405 || x === 128406 || x === 128420 || x >= 128507 && x <= 128591 || x >= 128640 && x <= 128709 || x === 128716 || x >= 128720 && x <= 128722 || x >= 128725 && x <= 128727 || x >= 128732 && x <= 128735 || x === 128747 || x === 128748 || x >= 128756 && x <= 128764 || x >= 128992 && x <= 129003 || x === 129008 || x >= 129292 && x <= 129338 || x >= 129340 && x <= 129349 || x >= 129351 && x <= 129535 || x >= 129648 && x <= 129660 || x >= 129664 && x <= 129672 || x >= 129680 && x <= 129725 || x >= 129727 && x <= 129733 || x >= 129742 && x <= 129755 || x >= 129760 && x <= 129768 || x >= 129776 && x <= 129784 || x >= 131072 && x <= 196605 || x >= 196608 && x <= 262141;
|
|
8317
|
+
}, "isWide");
|
|
8318
|
+
|
|
8319
|
+
// ../../node_modules/.bun/fast-string-truncated-width@1.2.1/node_modules/fast-string-truncated-width/dist/index.js
|
|
8320
|
+
var ANSI_RE = /[\u001b\u009b][[()#;?]*(?:[0-9]{1,4}(?:;[0-9]{0,4})*)?[0-9A-ORZcf-nqry=><]/y;
|
|
8321
|
+
var CONTROL_RE = /[\x00-\x08\x0A-\x1F\x7F-\x9F]{1,1000}/y;
|
|
8322
|
+
var TAB_RE = /\t{1,1000}/y;
|
|
8323
|
+
var EMOJI_RE = new RegExp("[\\u{1F1E6}-\\u{1F1FF}]{2}|\\u{1F3F4}[\\u{E0061}-\\u{E007A}]{2}[\\u{E0030}-\\u{E0039}\\u{E0061}-\\u{E007A}]{1,3}\\u{E007F}|(?:\\p{Emoji}\\uFE0F\\u20E3?|\\p{Emoji_Modifier_Base}\\p{Emoji_Modifier}?|\\p{Emoji_Presentation})(?:\\u200D(?:\\p{Emoji_Modifier_Base}\\p{Emoji_Modifier}?|\\p{Emoji_Presentation}|\\p{Emoji}\\uFE0F\\u20E3?))*", "yu");
|
|
8324
|
+
var LATIN_RE = /(?:[\x20-\x7E\xA0-\xFF](?!\uFE0F)){1,1000}/y;
|
|
8325
|
+
var MODIFIER_RE = new RegExp("\\p{M}+", "gu");
|
|
8326
|
+
var NO_TRUNCATION = { limit: Infinity, ellipsis: "" };
|
|
8327
|
+
var getStringTruncatedWidth = /* @__PURE__ */ __name((input, truncationOptions = {}, widthOptions = {}) => {
|
|
8328
|
+
const LIMIT = truncationOptions.limit ?? Infinity;
|
|
8329
|
+
const ELLIPSIS = truncationOptions.ellipsis ?? "";
|
|
8330
|
+
const ELLIPSIS_WIDTH = truncationOptions?.ellipsisWidth ?? (ELLIPSIS ? getStringTruncatedWidth(ELLIPSIS, NO_TRUNCATION, widthOptions).width : 0);
|
|
8331
|
+
const ANSI_WIDTH = widthOptions.ansiWidth ?? 0;
|
|
8332
|
+
const CONTROL_WIDTH = widthOptions.controlWidth ?? 0;
|
|
8333
|
+
const TAB_WIDTH = widthOptions.tabWidth ?? 8;
|
|
8334
|
+
const AMBIGUOUS_WIDTH = widthOptions.ambiguousWidth ?? 1;
|
|
8335
|
+
const EMOJI_WIDTH = widthOptions.emojiWidth ?? 2;
|
|
8336
|
+
const FULL_WIDTH_WIDTH = widthOptions.fullWidthWidth ?? 2;
|
|
8337
|
+
const REGULAR_WIDTH = widthOptions.regularWidth ?? 1;
|
|
8338
|
+
const WIDE_WIDTH = widthOptions.wideWidth ?? 2;
|
|
8339
|
+
let indexPrev = 0;
|
|
8340
|
+
let index = 0;
|
|
8341
|
+
let length = input.length;
|
|
8342
|
+
let lengthExtra = 0;
|
|
8343
|
+
let truncationEnabled = false;
|
|
8344
|
+
let truncationIndex = length;
|
|
8345
|
+
let truncationLimit = Math.max(0, LIMIT - ELLIPSIS_WIDTH);
|
|
8346
|
+
let unmatchedStart = 0;
|
|
8347
|
+
let unmatchedEnd = 0;
|
|
8348
|
+
let width = 0;
|
|
8349
|
+
let widthExtra = 0;
|
|
8350
|
+
outer: while (true) {
|
|
8351
|
+
if (unmatchedEnd > unmatchedStart || index >= length && index > indexPrev) {
|
|
8352
|
+
const unmatched = input.slice(unmatchedStart, unmatchedEnd) || input.slice(indexPrev, index);
|
|
8353
|
+
lengthExtra = 0;
|
|
8354
|
+
for (const char of unmatched.replaceAll(MODIFIER_RE, "")) {
|
|
8355
|
+
const codePoint = char.codePointAt(0) || 0;
|
|
8356
|
+
if (isFullWidth(codePoint)) {
|
|
8357
|
+
widthExtra = FULL_WIDTH_WIDTH;
|
|
8358
|
+
} else if (isWide(codePoint)) {
|
|
8359
|
+
widthExtra = WIDE_WIDTH;
|
|
8360
|
+
} else if (AMBIGUOUS_WIDTH !== REGULAR_WIDTH && isAmbiguous(codePoint)) {
|
|
8361
|
+
widthExtra = AMBIGUOUS_WIDTH;
|
|
8362
|
+
} else {
|
|
8363
|
+
widthExtra = REGULAR_WIDTH;
|
|
8364
|
+
}
|
|
8365
|
+
if (width + widthExtra > truncationLimit) {
|
|
8366
|
+
truncationIndex = Math.min(truncationIndex, Math.max(unmatchedStart, indexPrev) + lengthExtra);
|
|
8367
|
+
}
|
|
8368
|
+
if (width + widthExtra > LIMIT) {
|
|
8369
|
+
truncationEnabled = true;
|
|
8370
|
+
break outer;
|
|
8371
|
+
}
|
|
8372
|
+
lengthExtra += char.length;
|
|
8373
|
+
width += widthExtra;
|
|
8374
|
+
}
|
|
8375
|
+
unmatchedStart = unmatchedEnd = 0;
|
|
8376
|
+
}
|
|
8377
|
+
if (index >= length)
|
|
8378
|
+
break;
|
|
8379
|
+
LATIN_RE.lastIndex = index;
|
|
8380
|
+
if (LATIN_RE.test(input)) {
|
|
8381
|
+
lengthExtra = LATIN_RE.lastIndex - index;
|
|
8382
|
+
widthExtra = lengthExtra * REGULAR_WIDTH;
|
|
8383
|
+
if (width + widthExtra > truncationLimit) {
|
|
8384
|
+
truncationIndex = Math.min(truncationIndex, index + Math.floor((truncationLimit - width) / REGULAR_WIDTH));
|
|
8385
|
+
}
|
|
8386
|
+
if (width + widthExtra > LIMIT) {
|
|
8387
|
+
truncationEnabled = true;
|
|
8333
8388
|
break;
|
|
8334
8389
|
}
|
|
8335
|
-
|
|
8390
|
+
width += widthExtra;
|
|
8391
|
+
unmatchedStart = indexPrev;
|
|
8392
|
+
unmatchedEnd = index;
|
|
8393
|
+
index = indexPrev = LATIN_RE.lastIndex;
|
|
8336
8394
|
continue;
|
|
8337
8395
|
}
|
|
8338
|
-
|
|
8339
|
-
|
|
8340
|
-
|
|
8396
|
+
ANSI_RE.lastIndex = index;
|
|
8397
|
+
if (ANSI_RE.test(input)) {
|
|
8398
|
+
if (width + ANSI_WIDTH > truncationLimit) {
|
|
8399
|
+
truncationIndex = Math.min(truncationIndex, index);
|
|
8400
|
+
}
|
|
8401
|
+
if (width + ANSI_WIDTH > LIMIT) {
|
|
8402
|
+
truncationEnabled = true;
|
|
8341
8403
|
break;
|
|
8342
8404
|
}
|
|
8343
|
-
|
|
8405
|
+
width += ANSI_WIDTH;
|
|
8406
|
+
unmatchedStart = indexPrev;
|
|
8407
|
+
unmatchedEnd = index;
|
|
8408
|
+
index = indexPrev = ANSI_RE.lastIndex;
|
|
8344
8409
|
continue;
|
|
8345
8410
|
}
|
|
8346
|
-
|
|
8347
|
-
|
|
8348
|
-
|
|
8411
|
+
CONTROL_RE.lastIndex = index;
|
|
8412
|
+
if (CONTROL_RE.test(input)) {
|
|
8413
|
+
lengthExtra = CONTROL_RE.lastIndex - index;
|
|
8414
|
+
widthExtra = lengthExtra * CONTROL_WIDTH;
|
|
8415
|
+
if (width + widthExtra > truncationLimit) {
|
|
8416
|
+
truncationIndex = Math.min(truncationIndex, index + Math.floor((truncationLimit - width) / CONTROL_WIDTH));
|
|
8417
|
+
}
|
|
8418
|
+
if (width + widthExtra > LIMIT) {
|
|
8419
|
+
truncationEnabled = true;
|
|
8349
8420
|
break;
|
|
8350
8421
|
}
|
|
8351
|
-
|
|
8422
|
+
width += widthExtra;
|
|
8423
|
+
unmatchedStart = indexPrev;
|
|
8424
|
+
unmatchedEnd = index;
|
|
8425
|
+
index = indexPrev = CONTROL_RE.lastIndex;
|
|
8352
8426
|
continue;
|
|
8353
8427
|
}
|
|
8354
|
-
|
|
8355
|
-
|
|
8356
|
-
|
|
8428
|
+
TAB_RE.lastIndex = index;
|
|
8429
|
+
if (TAB_RE.test(input)) {
|
|
8430
|
+
lengthExtra = TAB_RE.lastIndex - index;
|
|
8431
|
+
widthExtra = lengthExtra * TAB_WIDTH;
|
|
8432
|
+
if (width + widthExtra > truncationLimit) {
|
|
8433
|
+
truncationIndex = Math.min(truncationIndex, index + Math.floor((truncationLimit - width) / TAB_WIDTH));
|
|
8434
|
+
}
|
|
8435
|
+
if (width + widthExtra > LIMIT) {
|
|
8436
|
+
truncationEnabled = true;
|
|
8357
8437
|
break;
|
|
8358
8438
|
}
|
|
8359
|
-
|
|
8439
|
+
width += widthExtra;
|
|
8440
|
+
unmatchedStart = indexPrev;
|
|
8441
|
+
unmatchedEnd = index;
|
|
8442
|
+
index = indexPrev = TAB_RE.lastIndex;
|
|
8360
8443
|
continue;
|
|
8361
8444
|
}
|
|
8362
|
-
|
|
8363
|
-
|
|
8364
|
-
|
|
8445
|
+
EMOJI_RE.lastIndex = index;
|
|
8446
|
+
if (EMOJI_RE.test(input)) {
|
|
8447
|
+
if (width + EMOJI_WIDTH > truncationLimit) {
|
|
8448
|
+
truncationIndex = Math.min(truncationIndex, index);
|
|
8449
|
+
}
|
|
8450
|
+
if (width + EMOJI_WIDTH > LIMIT) {
|
|
8451
|
+
truncationEnabled = true;
|
|
8365
8452
|
break;
|
|
8366
8453
|
}
|
|
8367
|
-
|
|
8454
|
+
width += EMOJI_WIDTH;
|
|
8455
|
+
unmatchedStart = indexPrev;
|
|
8456
|
+
unmatchedEnd = index;
|
|
8457
|
+
index = indexPrev = EMOJI_RE.lastIndex;
|
|
8368
8458
|
continue;
|
|
8369
8459
|
}
|
|
8370
|
-
|
|
8371
|
-
}
|
|
8372
|
-
return {
|
|
8373
|
-
|
|
8374
|
-
|
|
8375
|
-
|
|
8376
|
-
|
|
8377
|
-
|
|
8378
|
-
|
|
8379
|
-
var
|
|
8380
|
-
|
|
8381
|
-
|
|
8382
|
-
var
|
|
8383
|
-
|
|
8384
|
-
|
|
8385
|
-
|
|
8386
|
-
|
|
8387
|
-
|
|
8388
|
-
|
|
8389
|
-
|
|
8390
|
-
|
|
8391
|
-
|
|
8392
|
-
|
|
8393
|
-
|
|
8394
|
-
|
|
8395
|
-
|
|
8396
|
-
var
|
|
8397
|
-
var
|
|
8398
|
-
var
|
|
8399
|
-
var
|
|
8400
|
-
|
|
8401
|
-
|
|
8402
|
-
|
|
8403
|
-
|
|
8404
|
-
|
|
8405
|
-
|
|
8406
|
-
|
|
8407
|
-
|
|
8408
|
-
|
|
8409
|
-
|
|
8410
|
-
|
|
8411
|
-
|
|
8412
|
-
|
|
8413
|
-
|
|
8414
|
-
|
|
8415
|
-
if (
|
|
8416
|
-
|
|
8417
|
-
|
|
8418
|
-
|
|
8419
|
-
|
|
8420
|
-
|
|
8421
|
-
|
|
8422
|
-
|
|
8423
|
-
|
|
8424
|
-
|
|
8460
|
+
index += 1;
|
|
8461
|
+
}
|
|
8462
|
+
return {
|
|
8463
|
+
width: truncationEnabled ? truncationLimit : width,
|
|
8464
|
+
index: truncationEnabled ? truncationIndex : length,
|
|
8465
|
+
truncated: truncationEnabled,
|
|
8466
|
+
ellipsed: truncationEnabled && LIMIT >= ELLIPSIS_WIDTH
|
|
8467
|
+
};
|
|
8468
|
+
}, "getStringTruncatedWidth");
|
|
8469
|
+
var dist_default = getStringTruncatedWidth;
|
|
8470
|
+
|
|
8471
|
+
// ../../node_modules/.bun/fast-string-width@1.1.0/node_modules/fast-string-width/dist/index.js
|
|
8472
|
+
var NO_TRUNCATION2 = {
|
|
8473
|
+
limit: Infinity,
|
|
8474
|
+
ellipsis: "",
|
|
8475
|
+
ellipsisWidth: 0
|
|
8476
|
+
};
|
|
8477
|
+
var fastStringWidth = /* @__PURE__ */ __name((input, options = {}) => {
|
|
8478
|
+
return dist_default(input, NO_TRUNCATION2, options).width;
|
|
8479
|
+
}, "fastStringWidth");
|
|
8480
|
+
var dist_default2 = fastStringWidth;
|
|
8481
|
+
|
|
8482
|
+
// ../../node_modules/.bun/fast-wrap-ansi@0.1.6/node_modules/fast-wrap-ansi/lib/main.js
|
|
8483
|
+
var ESC = "\x1B";
|
|
8484
|
+
var CSI = "\x9B";
|
|
8485
|
+
var END_CODE = 39;
|
|
8486
|
+
var ANSI_ESCAPE_BELL = "\x07";
|
|
8487
|
+
var ANSI_CSI = "[";
|
|
8488
|
+
var ANSI_OSC = "]";
|
|
8489
|
+
var ANSI_SGR_TERMINATOR = "m";
|
|
8490
|
+
var ANSI_ESCAPE_LINK = `${ANSI_OSC}8;;`;
|
|
8491
|
+
var GROUP_REGEX = new RegExp(`(?:\\${ANSI_CSI}(?<code>\\d+)m|\\${ANSI_ESCAPE_LINK}(?<uri>.*)${ANSI_ESCAPE_BELL})`, "y");
|
|
8492
|
+
var getClosingCode = /* @__PURE__ */ __name((openingCode) => {
|
|
8493
|
+
if (openingCode >= 30 && openingCode <= 37)
|
|
8494
|
+
return 39;
|
|
8495
|
+
if (openingCode >= 90 && openingCode <= 97)
|
|
8496
|
+
return 39;
|
|
8497
|
+
if (openingCode >= 40 && openingCode <= 47)
|
|
8498
|
+
return 49;
|
|
8499
|
+
if (openingCode >= 100 && openingCode <= 107)
|
|
8500
|
+
return 49;
|
|
8501
|
+
if (openingCode === 1 || openingCode === 2)
|
|
8502
|
+
return 22;
|
|
8503
|
+
if (openingCode === 3)
|
|
8504
|
+
return 23;
|
|
8505
|
+
if (openingCode === 4)
|
|
8506
|
+
return 24;
|
|
8507
|
+
if (openingCode === 7)
|
|
8508
|
+
return 27;
|
|
8509
|
+
if (openingCode === 8)
|
|
8510
|
+
return 28;
|
|
8511
|
+
if (openingCode === 9)
|
|
8512
|
+
return 29;
|
|
8513
|
+
if (openingCode === 0)
|
|
8514
|
+
return 0;
|
|
8515
|
+
return void 0;
|
|
8516
|
+
}, "getClosingCode");
|
|
8517
|
+
var wrapAnsiCode = /* @__PURE__ */ __name((code) => `${ESC}${ANSI_CSI}${code}${ANSI_SGR_TERMINATOR}`, "wrapAnsiCode");
|
|
8518
|
+
var wrapAnsiHyperlink = /* @__PURE__ */ __name((url) => `${ESC}${ANSI_ESCAPE_LINK}${url}${ANSI_ESCAPE_BELL}`, "wrapAnsiHyperlink");
|
|
8519
|
+
var wrapWord = /* @__PURE__ */ __name((rows, word, columns) => {
|
|
8520
|
+
const characters = word[Symbol.iterator]();
|
|
8521
|
+
let isInsideEscape = false;
|
|
8522
|
+
let isInsideLinkEscape = false;
|
|
8523
|
+
let lastRow = rows.at(-1);
|
|
8524
|
+
let visible2 = lastRow === void 0 ? 0 : dist_default2(lastRow);
|
|
8525
|
+
let currentCharacter = characters.next();
|
|
8526
|
+
let nextCharacter = characters.next();
|
|
8527
|
+
let rawCharacterIndex = 0;
|
|
8528
|
+
while (!currentCharacter.done) {
|
|
8529
|
+
const character = currentCharacter.value;
|
|
8530
|
+
const characterLength = dist_default2(character);
|
|
8531
|
+
if (visible2 + characterLength <= columns) {
|
|
8532
|
+
rows[rows.length - 1] += character;
|
|
8533
|
+
} else {
|
|
8534
|
+
rows.push(character);
|
|
8535
|
+
visible2 = 0;
|
|
8536
|
+
}
|
|
8537
|
+
if (character === ESC || character === CSI) {
|
|
8538
|
+
isInsideEscape = true;
|
|
8539
|
+
isInsideLinkEscape = word.startsWith(ANSI_ESCAPE_LINK, rawCharacterIndex + 1);
|
|
8540
|
+
}
|
|
8541
|
+
if (isInsideEscape) {
|
|
8542
|
+
if (isInsideLinkEscape) {
|
|
8543
|
+
if (character === ANSI_ESCAPE_BELL) {
|
|
8544
|
+
isInsideEscape = false;
|
|
8545
|
+
isInsideLinkEscape = false;
|
|
8546
|
+
}
|
|
8547
|
+
} else if (character === ANSI_SGR_TERMINATOR) {
|
|
8548
|
+
isInsideEscape = false;
|
|
8549
|
+
}
|
|
8550
|
+
} else {
|
|
8551
|
+
visible2 += characterLength;
|
|
8552
|
+
if (visible2 === columns && !nextCharacter.done) {
|
|
8553
|
+
rows.push("");
|
|
8554
|
+
visible2 = 0;
|
|
8555
|
+
}
|
|
8556
|
+
}
|
|
8557
|
+
currentCharacter = nextCharacter;
|
|
8558
|
+
nextCharacter = characters.next();
|
|
8559
|
+
rawCharacterIndex += character.length;
|
|
8560
|
+
}
|
|
8561
|
+
lastRow = rows.at(-1);
|
|
8562
|
+
if (!visible2 && lastRow !== void 0 && lastRow.length && rows.length > 1) {
|
|
8563
|
+
rows[rows.length - 2] += rows.pop();
|
|
8564
|
+
}
|
|
8565
|
+
}, "wrapWord");
|
|
8566
|
+
var stringVisibleTrimSpacesRight = /* @__PURE__ */ __name((string) => {
|
|
8567
|
+
const words = string.split(" ");
|
|
8568
|
+
let last = words.length;
|
|
8569
|
+
while (last) {
|
|
8570
|
+
if (dist_default2(words[last - 1])) {
|
|
8571
|
+
break;
|
|
8572
|
+
}
|
|
8573
|
+
last--;
|
|
8574
|
+
}
|
|
8575
|
+
if (last === words.length) {
|
|
8576
|
+
return string;
|
|
8577
|
+
}
|
|
8578
|
+
return words.slice(0, last).join(" ") + words.slice(last).join("");
|
|
8579
|
+
}, "stringVisibleTrimSpacesRight");
|
|
8580
|
+
var exec2 = /* @__PURE__ */ __name((string, columns, options = {}) => {
|
|
8581
|
+
if (options.trim !== false && string.trim() === "") {
|
|
8582
|
+
return "";
|
|
8583
|
+
}
|
|
8584
|
+
let returnValue = "";
|
|
8585
|
+
let escapeCode;
|
|
8586
|
+
let escapeUrl;
|
|
8587
|
+
const words = string.split(" ");
|
|
8588
|
+
let rows = [""];
|
|
8589
|
+
let rowLength = 0;
|
|
8590
|
+
for (let index = 0; index < words.length; index++) {
|
|
8591
|
+
const word = words[index];
|
|
8592
|
+
if (options.trim !== false) {
|
|
8593
|
+
const row = rows.at(-1) ?? "";
|
|
8594
|
+
const trimmed = row.trimStart();
|
|
8595
|
+
if (row.length !== trimmed.length) {
|
|
8596
|
+
rows[rows.length - 1] = trimmed;
|
|
8597
|
+
rowLength = dist_default2(trimmed);
|
|
8598
|
+
}
|
|
8599
|
+
}
|
|
8600
|
+
if (index !== 0) {
|
|
8601
|
+
if (rowLength >= columns && (options.wordWrap === false || options.trim === false)) {
|
|
8602
|
+
rows.push("");
|
|
8603
|
+
rowLength = 0;
|
|
8604
|
+
}
|
|
8605
|
+
if (rowLength || options.trim === false) {
|
|
8606
|
+
rows[rows.length - 1] += " ";
|
|
8607
|
+
rowLength++;
|
|
8608
|
+
}
|
|
8609
|
+
}
|
|
8610
|
+
const wordLength = dist_default2(word);
|
|
8611
|
+
if (options.hard && wordLength > columns) {
|
|
8612
|
+
const remainingColumns = columns - rowLength;
|
|
8613
|
+
const breaksStartingThisLine = 1 + Math.floor((wordLength - remainingColumns - 1) / columns);
|
|
8614
|
+
const breaksStartingNextLine = Math.floor((wordLength - 1) / columns);
|
|
8615
|
+
if (breaksStartingNextLine < breaksStartingThisLine) {
|
|
8616
|
+
rows.push("");
|
|
8617
|
+
}
|
|
8618
|
+
wrapWord(rows, word, columns);
|
|
8619
|
+
rowLength = dist_default2(rows.at(-1) ?? "");
|
|
8425
8620
|
continue;
|
|
8426
8621
|
}
|
|
8427
|
-
if (
|
|
8428
|
-
if (
|
|
8429
|
-
|
|
8622
|
+
if (rowLength + wordLength > columns && rowLength && wordLength) {
|
|
8623
|
+
if (options.wordWrap === false && rowLength < columns) {
|
|
8624
|
+
wrapWord(rows, word, columns);
|
|
8625
|
+
rowLength = dist_default2(rows.at(-1) ?? "");
|
|
8430
8626
|
continue;
|
|
8431
8627
|
}
|
|
8432
|
-
|
|
8628
|
+
rows.push("");
|
|
8629
|
+
rowLength = 0;
|
|
8433
8630
|
}
|
|
8434
|
-
if (
|
|
8435
|
-
|
|
8631
|
+
if (rowLength + wordLength > columns && options.wordWrap === false) {
|
|
8632
|
+
wrapWord(rows, word, columns);
|
|
8633
|
+
rowLength = dist_default2(rows.at(-1) ?? "");
|
|
8436
8634
|
continue;
|
|
8437
8635
|
}
|
|
8438
|
-
|
|
8439
|
-
|
|
8440
|
-
|
|
8441
|
-
|
|
8442
|
-
|
|
8443
|
-
|
|
8444
|
-
|
|
8445
|
-
|
|
8446
|
-
|
|
8447
|
-
|
|
8448
|
-
|
|
8449
|
-
|
|
8450
|
-
|
|
8451
|
-
|
|
8452
|
-
|
|
8453
|
-
}
|
|
8454
|
-
|
|
8455
|
-
|
|
8456
|
-
|
|
8457
|
-
|
|
8458
|
-
|
|
8459
|
-
|
|
8460
|
-
|
|
8461
|
-
|
|
8462
|
-
|
|
8463
|
-
|
|
8464
|
-
|
|
8465
|
-
|
|
8466
|
-
|
|
8636
|
+
rows[rows.length - 1] += word;
|
|
8637
|
+
rowLength += wordLength;
|
|
8638
|
+
}
|
|
8639
|
+
if (options.trim !== false) {
|
|
8640
|
+
rows = rows.map((row) => stringVisibleTrimSpacesRight(row));
|
|
8641
|
+
}
|
|
8642
|
+
const preString = rows.join("\n");
|
|
8643
|
+
let inSurrogate = false;
|
|
8644
|
+
for (let i = 0; i < preString.length; i++) {
|
|
8645
|
+
const character = preString[i];
|
|
8646
|
+
returnValue += character;
|
|
8647
|
+
if (!inSurrogate) {
|
|
8648
|
+
inSurrogate = character >= "\uD800" && character <= "\uDBFF";
|
|
8649
|
+
} else {
|
|
8650
|
+
continue;
|
|
8651
|
+
}
|
|
8652
|
+
if (character === ESC || character === CSI) {
|
|
8653
|
+
GROUP_REGEX.lastIndex = i + 1;
|
|
8654
|
+
const groupsResult = GROUP_REGEX.exec(preString);
|
|
8655
|
+
const groups = groupsResult?.groups;
|
|
8656
|
+
if (groups?.code !== void 0) {
|
|
8657
|
+
const code = Number.parseFloat(groups.code);
|
|
8658
|
+
escapeCode = code === END_CODE ? void 0 : code;
|
|
8659
|
+
} else if (groups?.uri !== void 0) {
|
|
8660
|
+
escapeUrl = groups.uri.length === 0 ? void 0 : groups.uri;
|
|
8661
|
+
}
|
|
8662
|
+
}
|
|
8663
|
+
if (preString[i + 1] === "\n") {
|
|
8664
|
+
if (escapeUrl) {
|
|
8665
|
+
returnValue += wrapAnsiHyperlink("");
|
|
8666
|
+
}
|
|
8667
|
+
const closingCode = escapeCode ? getClosingCode(escapeCode) : void 0;
|
|
8668
|
+
if (escapeCode && closingCode) {
|
|
8669
|
+
returnValue += wrapAnsiCode(closingCode);
|
|
8670
|
+
}
|
|
8671
|
+
} else if (character === "\n") {
|
|
8672
|
+
if (escapeCode && getClosingCode(escapeCode)) {
|
|
8673
|
+
returnValue += wrapAnsiCode(escapeCode);
|
|
8674
|
+
}
|
|
8675
|
+
if (escapeUrl) {
|
|
8676
|
+
returnValue += wrapAnsiHyperlink(escapeUrl);
|
|
8677
|
+
}
|
|
8678
|
+
}
|
|
8679
|
+
}
|
|
8680
|
+
return returnValue;
|
|
8681
|
+
}, "exec");
|
|
8682
|
+
var CRLF_OR_LF = /\r?\n/;
|
|
8683
|
+
function wrapAnsi(string, columns, options) {
|
|
8684
|
+
return String(string).normalize().split(CRLF_OR_LF).map((line) => exec2(line, columns, options)).join("\n");
|
|
8467
8685
|
}
|
|
8468
|
-
__name(
|
|
8469
|
-
|
|
8470
|
-
|
|
8471
|
-
|
|
8472
|
-
|
|
8473
|
-
|
|
8686
|
+
__name(wrapAnsi, "wrapAnsi");
|
|
8687
|
+
|
|
8688
|
+
// ../../node_modules/.bun/@clack+core@1.2.0/node_modules/@clack/core/dist/index.mjs
|
|
8689
|
+
var import_sisteransi = __toESM(require_src(), 1);
|
|
8690
|
+
function d(r, t2, e) {
|
|
8691
|
+
if (!e.some((o) => !o.disabled)) return r;
|
|
8692
|
+
const s = r + t2, i = Math.max(e.length - 1, 0), n = s < 0 ? i : s > i ? 0 : s;
|
|
8693
|
+
return e[n].disabled ? d(n, t2 < 0 ? -1 : 1, e) : n;
|
|
8694
|
+
}
|
|
8695
|
+
__name(d, "d");
|
|
8696
|
+
var E = ["up", "down", "left", "right", "space", "enter", "cancel"];
|
|
8697
|
+
var u = { actions: new Set(E), aliases: /* @__PURE__ */ new Map([["k", "up"], ["j", "down"], ["h", "left"], ["l", "right"], ["", "cancel"], ["escape", "cancel"]]), withGuide: true};
|
|
8698
|
+
function V(r, t2) {
|
|
8699
|
+
if (typeof r == "string") return u.aliases.get(r) === t2;
|
|
8700
|
+
for (const e of r) if (e !== void 0 && V(e, t2)) return true;
|
|
8474
8701
|
return false;
|
|
8475
8702
|
}
|
|
8476
|
-
__name(
|
|
8477
|
-
function
|
|
8478
|
-
if (
|
|
8479
|
-
const
|
|
8480
|
-
`),
|
|
8481
|
-
`),
|
|
8482
|
-
for (let
|
|
8483
|
-
return { lines: n, numLinesBefore:
|
|
8703
|
+
__name(V, "V");
|
|
8704
|
+
function j(r, t2) {
|
|
8705
|
+
if (r === t2) return;
|
|
8706
|
+
const e = r.split(`
|
|
8707
|
+
`), s = t2.split(`
|
|
8708
|
+
`), i = Math.max(e.length, s.length), n = [];
|
|
8709
|
+
for (let o = 0; o < i; o++) e[o] !== s[o] && n.push(o);
|
|
8710
|
+
return { lines: n, numLinesBefore: e.length, numLinesAfter: s.length, numLines: i };
|
|
8484
8711
|
}
|
|
8485
|
-
__name(
|
|
8712
|
+
__name(j, "j");
|
|
8486
8713
|
globalThis.process.platform.startsWith("win");
|
|
8487
|
-
var
|
|
8488
|
-
function
|
|
8489
|
-
return
|
|
8714
|
+
var C = /* @__PURE__ */ Symbol("clack:cancel");
|
|
8715
|
+
function q(r) {
|
|
8716
|
+
return r === C;
|
|
8490
8717
|
}
|
|
8491
|
-
__name(
|
|
8492
|
-
function
|
|
8493
|
-
const
|
|
8494
|
-
|
|
8718
|
+
__name(q, "q");
|
|
8719
|
+
function w(r, t2) {
|
|
8720
|
+
const e = r;
|
|
8721
|
+
e.isTTY && e.setRawMode(t2);
|
|
8495
8722
|
}
|
|
8496
|
-
__name(
|
|
8497
|
-
var
|
|
8498
|
-
var
|
|
8499
|
-
function
|
|
8500
|
-
const
|
|
8501
|
-
return
|
|
8502
|
-
`).map((n,
|
|
8723
|
+
__name(w, "w");
|
|
8724
|
+
var O = /* @__PURE__ */ __name((r) => "columns" in r && typeof r.columns == "number" ? r.columns : 80, "O");
|
|
8725
|
+
var A = /* @__PURE__ */ __name((r) => "rows" in r && typeof r.rows == "number" ? r.rows : 20, "A");
|
|
8726
|
+
function R(r, t2, e, s = e) {
|
|
8727
|
+
const i = O(r ?? stdout);
|
|
8728
|
+
return wrapAnsi(t2, i - e.length, { hard: true, trim: false }).split(`
|
|
8729
|
+
`).map((n, o) => `${o === 0 ? s : e}${n}`).join(`
|
|
8503
8730
|
`);
|
|
8504
8731
|
}
|
|
8505
|
-
__name(
|
|
8506
|
-
var
|
|
8732
|
+
__name(R, "R");
|
|
8733
|
+
var p = class {
|
|
8507
8734
|
static {
|
|
8508
|
-
__name(this, "
|
|
8735
|
+
__name(this, "p");
|
|
8509
8736
|
}
|
|
8510
8737
|
input;
|
|
8511
8738
|
output;
|
|
@@ -8521,116 +8748,116 @@ var B = class {
|
|
|
8521
8748
|
error = "";
|
|
8522
8749
|
value;
|
|
8523
8750
|
userInput = "";
|
|
8524
|
-
constructor(
|
|
8525
|
-
const { input:
|
|
8526
|
-
this.opts = a2, this.onKeypress = this.onKeypress.bind(this), this.close = this.close.bind(this), this.render = this.render.bind(this), this._render = n.bind(this), this._track =
|
|
8751
|
+
constructor(t2, e = true) {
|
|
8752
|
+
const { input: s = stdin, output: i = stdout, render: n, signal: o, ...a2 } = t2;
|
|
8753
|
+
this.opts = a2, this.onKeypress = this.onKeypress.bind(this), this.close = this.close.bind(this), this.render = this.render.bind(this), this._render = n.bind(this), this._track = e, this._abortSignal = o, this.input = s, this.output = i;
|
|
8527
8754
|
}
|
|
8528
8755
|
unsubscribe() {
|
|
8529
8756
|
this._subscribers.clear();
|
|
8530
8757
|
}
|
|
8531
|
-
setSubscriber(
|
|
8532
|
-
const
|
|
8533
|
-
|
|
8758
|
+
setSubscriber(t2, e) {
|
|
8759
|
+
const s = this._subscribers.get(t2) ?? [];
|
|
8760
|
+
s.push(e), this._subscribers.set(t2, s);
|
|
8534
8761
|
}
|
|
8535
|
-
on(
|
|
8536
|
-
this.setSubscriber(
|
|
8762
|
+
on(t2, e) {
|
|
8763
|
+
this.setSubscriber(t2, { cb: e });
|
|
8537
8764
|
}
|
|
8538
|
-
once(
|
|
8539
|
-
this.setSubscriber(
|
|
8765
|
+
once(t2, e) {
|
|
8766
|
+
this.setSubscriber(t2, { cb: e, once: true });
|
|
8540
8767
|
}
|
|
8541
|
-
emit(
|
|
8542
|
-
const
|
|
8543
|
-
for (const n of
|
|
8544
|
-
for (const n of
|
|
8768
|
+
emit(t2, ...e) {
|
|
8769
|
+
const s = this._subscribers.get(t2) ?? [], i = [];
|
|
8770
|
+
for (const n of s) n.cb(...e), n.once && i.push(() => s.splice(s.indexOf(n), 1));
|
|
8771
|
+
for (const n of i) n();
|
|
8545
8772
|
}
|
|
8546
8773
|
prompt() {
|
|
8547
|
-
return new Promise((
|
|
8774
|
+
return new Promise((t2) => {
|
|
8548
8775
|
if (this._abortSignal) {
|
|
8549
|
-
if (this._abortSignal.aborted) return this.state = "cancel", this.close(),
|
|
8776
|
+
if (this._abortSignal.aborted) return this.state = "cancel", this.close(), t2(C);
|
|
8550
8777
|
this._abortSignal.addEventListener("abort", () => {
|
|
8551
8778
|
this.state = "cancel", this.close();
|
|
8552
8779
|
}, { once: true });
|
|
8553
8780
|
}
|
|
8554
|
-
this.rl =
|
|
8555
|
-
this.output.write(import_sisteransi.cursor.show), this.output.off("resize", this.render),
|
|
8781
|
+
this.rl = P.createInterface({ input: this.input, tabSize: 2, prompt: "", escapeCodeTimeout: 50, terminal: true }), this.rl.prompt(), this.opts.initialUserInput !== void 0 && this._setUserInput(this.opts.initialUserInput, true), this.input.on("keypress", this.onKeypress), w(this.input, true), this.output.on("resize", this.render), this.render(), this.once("submit", () => {
|
|
8782
|
+
this.output.write(import_sisteransi.cursor.show), this.output.off("resize", this.render), w(this.input, false), t2(this.value);
|
|
8556
8783
|
}), this.once("cancel", () => {
|
|
8557
|
-
this.output.write(import_sisteransi.cursor.show), this.output.off("resize", this.render),
|
|
8784
|
+
this.output.write(import_sisteransi.cursor.show), this.output.off("resize", this.render), w(this.input, false), t2(C);
|
|
8558
8785
|
});
|
|
8559
8786
|
});
|
|
8560
8787
|
}
|
|
8561
|
-
_isActionKey(
|
|
8562
|
-
return
|
|
8788
|
+
_isActionKey(t2, e) {
|
|
8789
|
+
return t2 === " ";
|
|
8563
8790
|
}
|
|
8564
|
-
_setValue(
|
|
8565
|
-
this.value =
|
|
8791
|
+
_setValue(t2) {
|
|
8792
|
+
this.value = t2, this.emit("value", this.value);
|
|
8566
8793
|
}
|
|
8567
|
-
_setUserInput(
|
|
8568
|
-
this.userInput =
|
|
8794
|
+
_setUserInput(t2, e) {
|
|
8795
|
+
this.userInput = t2 ?? "", this.emit("userInput", this.userInput), e && this._track && this.rl && (this.rl.write(this.userInput), this._cursor = this.rl.cursor);
|
|
8569
8796
|
}
|
|
8570
8797
|
_clearUserInput() {
|
|
8571
8798
|
this.rl?.write(null, { ctrl: true, name: "u" }), this._setUserInput("");
|
|
8572
8799
|
}
|
|
8573
|
-
onKeypress(
|
|
8574
|
-
if (this._track &&
|
|
8800
|
+
onKeypress(t2, e) {
|
|
8801
|
+
if (this._track && e.name !== "return" && (e.name && this._isActionKey(t2, e) && this.rl?.write(null, { ctrl: true, name: "h" }), this._cursor = this.rl?.cursor ?? 0, this._setUserInput(this.rl?.line)), this.state === "error" && (this.state = "active"), e?.name && (!this._track && u.aliases.has(e.name) && this.emit("cursor", u.aliases.get(e.name)), u.actions.has(e.name) && this.emit("cursor", e.name)), t2 && (t2.toLowerCase() === "y" || t2.toLowerCase() === "n") && this.emit("confirm", t2.toLowerCase() === "y"), this.emit("key", t2?.toLowerCase(), e), e?.name === "return") {
|
|
8575
8802
|
if (this.opts.validate) {
|
|
8576
|
-
const
|
|
8577
|
-
|
|
8803
|
+
const s = this.opts.validate(this.value);
|
|
8804
|
+
s && (this.error = s instanceof Error ? s.message : s, this.state = "error", this.rl?.write(this.userInput));
|
|
8578
8805
|
}
|
|
8579
8806
|
this.state !== "error" && (this.state = "submit");
|
|
8580
8807
|
}
|
|
8581
|
-
|
|
8808
|
+
V([t2, e?.name, e?.sequence], "cancel") && (this.state = "cancel"), (this.state === "submit" || this.state === "cancel") && this.emit("finalize"), this.render(), (this.state === "submit" || this.state === "cancel") && this.close();
|
|
8582
8809
|
}
|
|
8583
8810
|
close() {
|
|
8584
8811
|
this.input.unpipe(), this.input.removeListener("keypress", this.onKeypress), this.output.write(`
|
|
8585
|
-
`),
|
|
8812
|
+
`), w(this.input, false), this.rl?.close(), this.rl = void 0, this.emit(`${this.state}`, this.value), this.unsubscribe();
|
|
8586
8813
|
}
|
|
8587
8814
|
restoreCursor() {
|
|
8588
|
-
const
|
|
8815
|
+
const t2 = wrapAnsi(this._prevFrame, process.stdout.columns, { hard: true, trim: false }).split(`
|
|
8589
8816
|
`).length - 1;
|
|
8590
|
-
this.output.write(import_sisteransi.cursor.move(-999,
|
|
8817
|
+
this.output.write(import_sisteransi.cursor.move(-999, t2 * -1));
|
|
8591
8818
|
}
|
|
8592
8819
|
render() {
|
|
8593
|
-
const
|
|
8594
|
-
if (
|
|
8820
|
+
const t2 = wrapAnsi(this._render(this) ?? "", process.stdout.columns, { hard: true, trim: false });
|
|
8821
|
+
if (t2 !== this._prevFrame) {
|
|
8595
8822
|
if (this.state === "initial") this.output.write(import_sisteransi.cursor.hide);
|
|
8596
8823
|
else {
|
|
8597
|
-
const
|
|
8598
|
-
if (this.restoreCursor(),
|
|
8599
|
-
const
|
|
8600
|
-
let
|
|
8601
|
-
if (
|
|
8602
|
-
this._prevFrame =
|
|
8824
|
+
const e = j(this._prevFrame, t2), s = A(this.output);
|
|
8825
|
+
if (this.restoreCursor(), e) {
|
|
8826
|
+
const i = Math.max(0, e.numLinesAfter - s), n = Math.max(0, e.numLinesBefore - s);
|
|
8827
|
+
let o = e.lines.find((a2) => a2 >= i);
|
|
8828
|
+
if (o === void 0) {
|
|
8829
|
+
this._prevFrame = t2;
|
|
8603
8830
|
return;
|
|
8604
8831
|
}
|
|
8605
|
-
if (
|
|
8606
|
-
this.output.write(import_sisteransi.cursor.move(0,
|
|
8607
|
-
const a2 =
|
|
8832
|
+
if (e.lines.length === 1) {
|
|
8833
|
+
this.output.write(import_sisteransi.cursor.move(0, o - n)), this.output.write(import_sisteransi.erase.lines(1));
|
|
8834
|
+
const a2 = t2.split(`
|
|
8608
8835
|
`);
|
|
8609
|
-
this.output.write(a2[
|
|
8836
|
+
this.output.write(a2[o]), this._prevFrame = t2, this.output.write(import_sisteransi.cursor.move(0, a2.length - o - 1));
|
|
8610
8837
|
return;
|
|
8611
|
-
} else if (
|
|
8612
|
-
if (
|
|
8838
|
+
} else if (e.lines.length > 1) {
|
|
8839
|
+
if (i < n) o = i;
|
|
8613
8840
|
else {
|
|
8614
|
-
const
|
|
8615
|
-
|
|
8841
|
+
const h = o - n;
|
|
8842
|
+
h > 0 && this.output.write(import_sisteransi.cursor.move(0, h));
|
|
8616
8843
|
}
|
|
8617
8844
|
this.output.write(import_sisteransi.erase.down());
|
|
8618
|
-
const a2 =
|
|
8619
|
-
`).slice(
|
|
8845
|
+
const a2 = t2.split(`
|
|
8846
|
+
`).slice(o);
|
|
8620
8847
|
this.output.write(a2.join(`
|
|
8621
|
-
`)), this._prevFrame =
|
|
8848
|
+
`)), this._prevFrame = t2;
|
|
8622
8849
|
return;
|
|
8623
8850
|
}
|
|
8624
8851
|
}
|
|
8625
8852
|
this.output.write(import_sisteransi.erase.down());
|
|
8626
8853
|
}
|
|
8627
|
-
this.output.write(
|
|
8854
|
+
this.output.write(t2), this.state === "initial" && (this.state = "active"), this._prevFrame = t2;
|
|
8628
8855
|
}
|
|
8629
8856
|
}
|
|
8630
8857
|
};
|
|
8631
|
-
var
|
|
8858
|
+
var Q = class extends p {
|
|
8632
8859
|
static {
|
|
8633
|
-
__name(this, "
|
|
8860
|
+
__name(this, "Q");
|
|
8634
8861
|
}
|
|
8635
8862
|
get cursor() {
|
|
8636
8863
|
return this.value ? 0 : 1;
|
|
@@ -8638,19 +8865,19 @@ var kt = class extends B {
|
|
|
8638
8865
|
get _value() {
|
|
8639
8866
|
return this.cursor === 0;
|
|
8640
8867
|
}
|
|
8641
|
-
constructor(
|
|
8642
|
-
super(
|
|
8868
|
+
constructor(t2) {
|
|
8869
|
+
super(t2, false), this.value = !!t2.initialValue, this.on("userInput", () => {
|
|
8643
8870
|
this.value = this._value;
|
|
8644
|
-
}), this.on("confirm", (
|
|
8645
|
-
this.output.write(import_sisteransi.cursor.move(0, -1)), this.value =
|
|
8871
|
+
}), this.on("confirm", (e) => {
|
|
8872
|
+
this.output.write(import_sisteransi.cursor.move(0, -1)), this.value = e, this.state = "submit", this.close();
|
|
8646
8873
|
}), this.on("cursor", () => {
|
|
8647
8874
|
this.value = !this.value;
|
|
8648
8875
|
});
|
|
8649
8876
|
}
|
|
8650
8877
|
};
|
|
8651
|
-
var
|
|
8878
|
+
var it = class extends p {
|
|
8652
8879
|
static {
|
|
8653
|
-
__name(this, "
|
|
8880
|
+
__name(this, "it");
|
|
8654
8881
|
}
|
|
8655
8882
|
options;
|
|
8656
8883
|
cursor = 0;
|
|
@@ -8658,37 +8885,37 @@ var Lt = class extends B {
|
|
|
8658
8885
|
return this.options[this.cursor].value;
|
|
8659
8886
|
}
|
|
8660
8887
|
get _enabledOptions() {
|
|
8661
|
-
return this.options.filter((
|
|
8888
|
+
return this.options.filter((t2) => t2.disabled !== true);
|
|
8662
8889
|
}
|
|
8663
8890
|
toggleAll() {
|
|
8664
|
-
const
|
|
8665
|
-
this.value =
|
|
8891
|
+
const t2 = this._enabledOptions, e = this.value !== void 0 && this.value.length === t2.length;
|
|
8892
|
+
this.value = e ? [] : t2.map((s) => s.value);
|
|
8666
8893
|
}
|
|
8667
8894
|
toggleInvert() {
|
|
8668
|
-
const
|
|
8669
|
-
if (!
|
|
8670
|
-
const
|
|
8671
|
-
this.value =
|
|
8895
|
+
const t2 = this.value;
|
|
8896
|
+
if (!t2) return;
|
|
8897
|
+
const e = this._enabledOptions.filter((s) => !t2.includes(s.value));
|
|
8898
|
+
this.value = e.map((s) => s.value);
|
|
8672
8899
|
}
|
|
8673
8900
|
toggleValue() {
|
|
8674
8901
|
this.value === void 0 && (this.value = []);
|
|
8675
|
-
const
|
|
8676
|
-
this.value =
|
|
8677
|
-
}
|
|
8678
|
-
constructor(
|
|
8679
|
-
super(
|
|
8680
|
-
const
|
|
8681
|
-
this.cursor = this.options[
|
|
8682
|
-
|
|
8683
|
-
}), this.on("cursor", (
|
|
8684
|
-
switch (
|
|
8902
|
+
const t2 = this.value.includes(this._value);
|
|
8903
|
+
this.value = t2 ? this.value.filter((e) => e !== this._value) : [...this.value, this._value];
|
|
8904
|
+
}
|
|
8905
|
+
constructor(t2) {
|
|
8906
|
+
super(t2, false), this.options = t2.options, this.value = [...t2.initialValues ?? []];
|
|
8907
|
+
const e = Math.max(this.options.findIndex(({ value: s }) => s === t2.cursorAt), 0);
|
|
8908
|
+
this.cursor = this.options[e].disabled ? d(e, 1, this.options) : e, this.on("key", (s) => {
|
|
8909
|
+
s === "a" && this.toggleAll(), s === "i" && this.toggleInvert();
|
|
8910
|
+
}), this.on("cursor", (s) => {
|
|
8911
|
+
switch (s) {
|
|
8685
8912
|
case "left":
|
|
8686
8913
|
case "up":
|
|
8687
|
-
this.cursor =
|
|
8914
|
+
this.cursor = d(this.cursor, -1, this.options);
|
|
8688
8915
|
break;
|
|
8689
8916
|
case "down":
|
|
8690
8917
|
case "right":
|
|
8691
|
-
this.cursor =
|
|
8918
|
+
this.cursor = d(this.cursor, 1, this.options);
|
|
8692
8919
|
break;
|
|
8693
8920
|
case "space":
|
|
8694
8921
|
this.toggleValue();
|
|
@@ -8697,9 +8924,9 @@ var Lt = class extends B {
|
|
|
8697
8924
|
});
|
|
8698
8925
|
}
|
|
8699
8926
|
};
|
|
8700
|
-
var
|
|
8927
|
+
var nt = class extends p {
|
|
8701
8928
|
static {
|
|
8702
|
-
__name(this, "
|
|
8929
|
+
__name(this, "nt");
|
|
8703
8930
|
}
|
|
8704
8931
|
options;
|
|
8705
8932
|
cursor = 0;
|
|
@@ -8709,330 +8936,161 @@ var Tt = class extends B {
|
|
|
8709
8936
|
changeValue() {
|
|
8710
8937
|
this.value = this._selectedValue.value;
|
|
8711
8938
|
}
|
|
8712
|
-
constructor(
|
|
8713
|
-
super(
|
|
8714
|
-
const
|
|
8715
|
-
this.cursor = this.options[
|
|
8716
|
-
switch (
|
|
8939
|
+
constructor(t2) {
|
|
8940
|
+
super(t2, false), this.options = t2.options;
|
|
8941
|
+
const e = this.options.findIndex(({ value: i }) => i === t2.initialValue), s = e === -1 ? 0 : e;
|
|
8942
|
+
this.cursor = this.options[s].disabled ? d(s, 1, this.options) : s, this.changeValue(), this.on("cursor", (i) => {
|
|
8943
|
+
switch (i) {
|
|
8717
8944
|
case "left":
|
|
8718
8945
|
case "up":
|
|
8719
|
-
this.cursor =
|
|
8946
|
+
this.cursor = d(this.cursor, -1, this.options);
|
|
8720
8947
|
break;
|
|
8721
8948
|
case "down":
|
|
8722
8949
|
case "right":
|
|
8723
|
-
this.cursor =
|
|
8950
|
+
this.cursor = d(this.cursor, 1, this.options);
|
|
8724
8951
|
break;
|
|
8725
8952
|
}
|
|
8726
8953
|
this.changeValue();
|
|
8727
8954
|
});
|
|
8728
8955
|
}
|
|
8729
8956
|
};
|
|
8730
|
-
|
|
8731
|
-
// ../../node_modules/.bun/@clack+prompts@1.1.0/node_modules/@clack/prompts/dist/index.mjs
|
|
8732
8957
|
__toESM(require_src(), 1);
|
|
8733
|
-
function
|
|
8734
|
-
return
|
|
8958
|
+
function Ze() {
|
|
8959
|
+
return P2.platform !== "win32" ? P2.env.TERM !== "linux" : !!P2.env.CI || !!P2.env.WT_SESSION || !!P2.env.TERMINUS_SUBLIME || P2.env.ConEmuTask === "{cmd::Cmder}" || P2.env.TERM_PROGRAM === "Terminus-Sublime" || P2.env.TERM_PROGRAM === "vscode" || P2.env.TERM === "xterm-256color" || P2.env.TERM === "alacritty" || P2.env.TERMINAL_EMULATOR === "JetBrains-JediTerm";
|
|
8735
8960
|
}
|
|
8736
|
-
__name(
|
|
8737
|
-
var ee =
|
|
8738
|
-
var
|
|
8739
|
-
var
|
|
8740
|
-
var
|
|
8741
|
-
var
|
|
8742
|
-
var
|
|
8743
|
-
|
|
8744
|
-
var
|
|
8745
|
-
var
|
|
8746
|
-
|
|
8747
|
-
|
|
8748
|
-
var z2 =
|
|
8749
|
-
var H2 =
|
|
8750
|
-
|
|
8751
|
-
|
|
8752
|
-
|
|
8753
|
-
|
|
8754
|
-
|
|
8755
|
-
|
|
8756
|
-
|
|
8757
|
-
|
|
8758
|
-
|
|
8759
|
-
|
|
8760
|
-
|
|
8761
|
-
|
|
8762
|
-
|
|
8763
|
-
|
|
8764
|
-
var
|
|
8961
|
+
__name(Ze, "Ze");
|
|
8962
|
+
var ee = Ze();
|
|
8963
|
+
var w2 = /* @__PURE__ */ __name((e, i) => ee ? e : i, "w");
|
|
8964
|
+
var _e = w2("\u25C6", "*");
|
|
8965
|
+
var oe = w2("\u25A0", "x");
|
|
8966
|
+
var ue = w2("\u25B2", "x");
|
|
8967
|
+
var F = w2("\u25C7", "o");
|
|
8968
|
+
w2("\u250C", "T");
|
|
8969
|
+
var d2 = w2("\u2502", "|");
|
|
8970
|
+
var E2 = w2("\u2514", "\u2014");
|
|
8971
|
+
w2("\u2510", "T");
|
|
8972
|
+
w2("\u2518", "\u2014");
|
|
8973
|
+
var z2 = w2("\u25CF", ">");
|
|
8974
|
+
var H2 = w2("\u25CB", " ");
|
|
8975
|
+
w2("\u25FB", "[\u2022]");
|
|
8976
|
+
w2("\u25FC", "[+]");
|
|
8977
|
+
w2("\u25FB", "[ ]");
|
|
8978
|
+
w2("\u25AA", "\u2022");
|
|
8979
|
+
w2("\u2500", "-");
|
|
8980
|
+
w2("\u256E", "+");
|
|
8981
|
+
w2("\u251C", "+");
|
|
8982
|
+
w2("\u256F", "+");
|
|
8983
|
+
w2("\u2570", "+");
|
|
8984
|
+
w2("\u256D", "+");
|
|
8985
|
+
w2("\u25CF", "\u2022");
|
|
8986
|
+
w2("\u25C6", "*");
|
|
8987
|
+
w2("\u25B2", "!");
|
|
8988
|
+
w2("\u25A0", "x");
|
|
8989
|
+
var V2 = /* @__PURE__ */ __name((e) => {
|
|
8765
8990
|
switch (e) {
|
|
8766
8991
|
case "initial":
|
|
8767
8992
|
case "active":
|
|
8768
|
-
return styleText("cyan",
|
|
8993
|
+
return styleText("cyan", _e);
|
|
8769
8994
|
case "cancel":
|
|
8770
|
-
return styleText("red",
|
|
8995
|
+
return styleText("red", oe);
|
|
8771
8996
|
case "error":
|
|
8772
|
-
return styleText("yellow",
|
|
8997
|
+
return styleText("yellow", ue);
|
|
8773
8998
|
case "submit":
|
|
8774
|
-
return styleText("green",
|
|
8999
|
+
return styleText("green", F);
|
|
8775
9000
|
}
|
|
8776
|
-
}, "
|
|
8777
|
-
var
|
|
9001
|
+
}, "V");
|
|
9002
|
+
var ye = /* @__PURE__ */ __name((e) => {
|
|
8778
9003
|
switch (e) {
|
|
8779
9004
|
case "initial":
|
|
8780
9005
|
case "active":
|
|
8781
|
-
return styleText("cyan",
|
|
9006
|
+
return styleText("cyan", d2);
|
|
8782
9007
|
case "cancel":
|
|
8783
|
-
return styleText("red",
|
|
9008
|
+
return styleText("red", d2);
|
|
8784
9009
|
case "error":
|
|
8785
|
-
return styleText("yellow",
|
|
9010
|
+
return styleText("yellow", d2);
|
|
8786
9011
|
case "submit":
|
|
8787
|
-
return styleText("green",
|
|
8788
|
-
}
|
|
8789
|
-
}, "
|
|
8790
|
-
var
|
|
8791
|
-
|
|
8792
|
-
|
|
8793
|
-
|
|
8794
|
-
|
|
8795
|
-
|
|
8796
|
-
|
|
8797
|
-
|
|
8798
|
-
var
|
|
8799
|
-
|
|
8800
|
-
|
|
8801
|
-
|
|
8802
|
-
let
|
|
8803
|
-
|
|
8804
|
-
|
|
8805
|
-
|
|
8806
|
-
|
|
8807
|
-
|
|
8808
|
-
|
|
8809
|
-
if (gt2(O2) ? S2 = f : ft2(O2) ? S2 = E : c !== g && mt2(O2) ? S2 = c : S2 = g, w + S2 > C && (v = Math.min(v, Math.max(A, $) + F)), w + S2 > i) {
|
|
8810
|
-
y2 = true;
|
|
8811
|
-
break e;
|
|
8812
|
-
}
|
|
8813
|
-
F += M2.length, w += S2;
|
|
8814
|
-
}
|
|
8815
|
-
A = b = 0;
|
|
8816
|
-
}
|
|
8817
|
-
if (m >= d) break;
|
|
8818
|
-
if (ne.lastIndex = m, ne.test(e)) {
|
|
8819
|
-
if (F = ne.lastIndex - m, S2 = F * g, w + S2 > C && (v = Math.min(v, m + Math.floor((C - w) / g))), w + S2 > i) {
|
|
8820
|
-
y2 = true;
|
|
8821
|
-
break;
|
|
8822
|
-
}
|
|
8823
|
-
w += S2, A = $, b = m, m = $ = ne.lastIndex;
|
|
8824
|
-
continue;
|
|
8825
|
-
}
|
|
8826
|
-
if (we.lastIndex = m, we.test(e)) {
|
|
8827
|
-
if (w + u > C && (v = Math.min(v, m)), w + u > i) {
|
|
8828
|
-
y2 = true;
|
|
8829
|
-
break;
|
|
8830
|
-
}
|
|
8831
|
-
w += u, A = $, b = m, m = $ = we.lastIndex;
|
|
8832
|
-
continue;
|
|
8833
|
-
}
|
|
8834
|
-
if (re.lastIndex = m, re.test(e)) {
|
|
8835
|
-
if (F = re.lastIndex - m, S2 = F * l, w + S2 > C && (v = Math.min(v, m + Math.floor((C - w) / l))), w + S2 > i) {
|
|
8836
|
-
y2 = true;
|
|
8837
|
-
break;
|
|
8838
|
-
}
|
|
8839
|
-
w += S2, A = $, b = m, m = $ = re.lastIndex;
|
|
8840
|
-
continue;
|
|
8841
|
-
}
|
|
8842
|
-
if (ie.lastIndex = m, ie.test(e)) {
|
|
8843
|
-
if (F = ie.lastIndex - m, S2 = F * n, w + S2 > C && (v = Math.min(v, m + Math.floor((C - w) / n))), w + S2 > i) {
|
|
8844
|
-
y2 = true;
|
|
8845
|
-
break;
|
|
8846
|
-
}
|
|
8847
|
-
w += S2, A = $, b = m, m = $ = ie.lastIndex;
|
|
8848
|
-
continue;
|
|
8849
|
-
}
|
|
8850
|
-
if (Ae.lastIndex = m, Ae.test(e)) {
|
|
8851
|
-
if (w + p > C && (v = Math.min(v, m)), w + p > i) {
|
|
8852
|
-
y2 = true;
|
|
8853
|
-
break;
|
|
8854
|
-
}
|
|
8855
|
-
w += p, A = $, b = m, m = $ = Ae.lastIndex;
|
|
8856
|
-
continue;
|
|
8857
|
-
}
|
|
8858
|
-
m += 1;
|
|
8859
|
-
}
|
|
8860
|
-
return { width: y2 ? C : w, index: y2 ? v : d, truncated: y2, ellipsed: y2 && i >= o };
|
|
8861
|
-
}, "Le");
|
|
8862
|
-
var Et2 = { limit: 1 / 0, ellipsis: "", ellipsisWidth: 0 };
|
|
8863
|
-
var D2 = /* @__PURE__ */ __name((e, r = {}) => Le(e, Et2, r).width, "D");
|
|
8864
|
-
var ae = "\x1B";
|
|
8865
|
-
var je = "\x9B";
|
|
8866
|
-
var vt2 = 39;
|
|
8867
|
-
var Ce = "\x07";
|
|
8868
|
-
var ke = "[";
|
|
8869
|
-
var wt = "]";
|
|
8870
|
-
var Ve = "m";
|
|
8871
|
-
var Se = `${wt}8;;`;
|
|
8872
|
-
var He = new RegExp(`(?:\\${ke}(?<code>\\d+)m|\\${Se}(?<uri>.*)${Ce})`, "y");
|
|
8873
|
-
var At2 = /* @__PURE__ */ __name((e) => {
|
|
8874
|
-
if (e >= 30 && e <= 37 || e >= 90 && e <= 97) return 39;
|
|
8875
|
-
if (e >= 40 && e <= 47 || e >= 100 && e <= 107) return 49;
|
|
8876
|
-
if (e === 1 || e === 2) return 22;
|
|
8877
|
-
if (e === 3) return 23;
|
|
8878
|
-
if (e === 4) return 24;
|
|
8879
|
-
if (e === 7) return 27;
|
|
8880
|
-
if (e === 8) return 28;
|
|
8881
|
-
if (e === 9) return 29;
|
|
8882
|
-
if (e === 0) return 0;
|
|
8883
|
-
}, "At");
|
|
8884
|
-
var Ue = /* @__PURE__ */ __name((e) => `${ae}${ke}${e}${Ve}`, "Ue");
|
|
8885
|
-
var Ke = /* @__PURE__ */ __name((e) => `${ae}${Se}${e}${Ce}`, "Ke");
|
|
8886
|
-
var Ct2 = /* @__PURE__ */ __name((e) => e.map((r) => D2(r)), "Ct");
|
|
8887
|
-
var Ie = /* @__PURE__ */ __name((e, r, s) => {
|
|
8888
|
-
const i = r[Symbol.iterator]();
|
|
8889
|
-
let a2 = false, o = false, u = e.at(-1), l = u === void 0 ? 0 : D2(u), n = i.next(), c = i.next(), p = 0;
|
|
8890
|
-
for (; !n.done; ) {
|
|
8891
|
-
const f = n.value, g = D2(f);
|
|
8892
|
-
l + g <= s ? e[e.length - 1] += f : (e.push(f), l = 0), (f === ae || f === je) && (a2 = true, o = r.startsWith(Se, p + 1)), a2 ? o ? f === Ce && (a2 = false, o = false) : f === Ve && (a2 = false) : (l += g, l === s && !c.done && (e.push(""), l = 0)), n = c, c = i.next(), p += f.length;
|
|
8893
|
-
}
|
|
8894
|
-
u = e.at(-1), !l && u !== void 0 && u.length > 0 && e.length > 1 && (e[e.length - 2] += e.pop());
|
|
8895
|
-
}, "Ie");
|
|
8896
|
-
var St = /* @__PURE__ */ __name((e) => {
|
|
8897
|
-
const r = e.split(" ");
|
|
8898
|
-
let s = r.length;
|
|
8899
|
-
for (; s > 0 && !(D2(r[s - 1]) > 0); ) s--;
|
|
8900
|
-
return s === r.length ? e : r.slice(0, s).join(" ") + r.slice(s).join("");
|
|
8901
|
-
}, "St");
|
|
8902
|
-
var It2 = /* @__PURE__ */ __name((e, r, s = {}) => {
|
|
8903
|
-
if (s.trim !== false && e.trim() === "") return "";
|
|
8904
|
-
let i = "", a2, o;
|
|
8905
|
-
const u = e.split(" "), l = Ct2(u);
|
|
8906
|
-
let n = [""];
|
|
8907
|
-
for (const [$, m] of u.entries()) {
|
|
8908
|
-
s.trim !== false && (n[n.length - 1] = (n.at(-1) ?? "").trimStart());
|
|
8909
|
-
let d = D2(n.at(-1) ?? "");
|
|
8910
|
-
if ($ !== 0 && (d >= r && (s.wordWrap === false || s.trim === false) && (n.push(""), d = 0), (d > 0 || s.trim === false) && (n[n.length - 1] += " ", d++)), s.hard && l[$] > r) {
|
|
8911
|
-
const F = r - d, y2 = 1 + Math.floor((l[$] - F - 1) / r);
|
|
8912
|
-
Math.floor((l[$] - 1) / r) < y2 && n.push(""), Ie(n, m, r);
|
|
8913
|
-
continue;
|
|
8914
|
-
}
|
|
8915
|
-
if (d + l[$] > r && d > 0 && l[$] > 0) {
|
|
8916
|
-
if (s.wordWrap === false && d < r) {
|
|
8917
|
-
Ie(n, m, r);
|
|
8918
|
-
continue;
|
|
8919
|
-
}
|
|
8920
|
-
n.push("");
|
|
8921
|
-
}
|
|
8922
|
-
if (d + l[$] > r && s.wordWrap === false) {
|
|
8923
|
-
Ie(n, m, r);
|
|
8924
|
-
continue;
|
|
8925
|
-
}
|
|
8926
|
-
n[n.length - 1] += m;
|
|
8927
|
-
}
|
|
8928
|
-
s.trim !== false && (n = n.map(($) => St($)));
|
|
8929
|
-
const c = n.join(`
|
|
8930
|
-
`), p = c[Symbol.iterator]();
|
|
8931
|
-
let f = p.next(), g = p.next(), E = 0;
|
|
8932
|
-
for (; !f.done; ) {
|
|
8933
|
-
const $ = f.value, m = g.value;
|
|
8934
|
-
if (i += $, $ === ae || $ === je) {
|
|
8935
|
-
He.lastIndex = E + 1;
|
|
8936
|
-
const y2 = He.exec(c)?.groups;
|
|
8937
|
-
if (y2?.code !== void 0) {
|
|
8938
|
-
const v = Number.parseFloat(y2.code);
|
|
8939
|
-
a2 = v === vt2 ? void 0 : v;
|
|
8940
|
-
} else y2?.uri !== void 0 && (o = y2.uri.length === 0 ? void 0 : y2.uri);
|
|
8941
|
-
}
|
|
8942
|
-
const d = a2 ? At2(a2) : void 0;
|
|
8943
|
-
m === `
|
|
8944
|
-
` ? (o && (i += Ke("")), a2 && d && (i += Ue(d))) : $ === `
|
|
8945
|
-
` && (a2 && d && (i += Ue(a2)), o && (i += Ke(o))), E += $.length, f = g, g = p.next();
|
|
8946
|
-
}
|
|
8947
|
-
return i;
|
|
8948
|
-
}, "It");
|
|
8949
|
-
function J2(e, r, s) {
|
|
8950
|
-
return String(e).normalize().replaceAll(`\r
|
|
8951
|
-
`, `
|
|
8952
|
-
`).split(`
|
|
8953
|
-
`).map((i) => It2(i, r, s)).join(`
|
|
9012
|
+
return styleText("green", d2);
|
|
9013
|
+
}
|
|
9014
|
+
}, "ye");
|
|
9015
|
+
var et2 = /* @__PURE__ */ __name((e, i, s, r, u2) => {
|
|
9016
|
+
let n = i, o = 0;
|
|
9017
|
+
for (let c2 = s; c2 < r; c2++) {
|
|
9018
|
+
const a2 = e[c2];
|
|
9019
|
+
if (n = n - a2.length, o++, n <= u2) break;
|
|
9020
|
+
}
|
|
9021
|
+
return { lineCount: n, removals: o };
|
|
9022
|
+
}, "et");
|
|
9023
|
+
var Y2 = /* @__PURE__ */ __name(({ cursor: e, options: i, style: s, output: r = process.stdout, maxItems: u2 = Number.POSITIVE_INFINITY, columnPadding: n = 0, rowPadding: o = 4 }) => {
|
|
9024
|
+
const c2 = O(r) - n, a2 = A(r), l = styleText("dim", "..."), $2 = Math.max(a2 - o, 0), y2 = Math.max(Math.min(u2, $2), 5);
|
|
9025
|
+
let p2 = 0;
|
|
9026
|
+
e >= y2 - 3 && (p2 = Math.max(Math.min(e - y2 + 3, i.length - y2), 0));
|
|
9027
|
+
let m = y2 < i.length && p2 > 0, g = y2 < i.length && p2 + y2 < i.length;
|
|
9028
|
+
const S2 = Math.min(p2 + y2, i.length), h = [];
|
|
9029
|
+
let f = 0;
|
|
9030
|
+
m && f++, g && f++;
|
|
9031
|
+
const v = p2 + (m ? 1 : 0), T = S2 - (g ? 1 : 0);
|
|
9032
|
+
for (let b = v; b < T; b++) {
|
|
9033
|
+
const x = wrapAnsi(s(i[b], b === e), c2, { hard: true, trim: false }).split(`
|
|
8954
9034
|
`);
|
|
8955
|
-
|
|
8956
|
-
|
|
8957
|
-
|
|
8958
|
-
|
|
8959
|
-
|
|
8960
|
-
|
|
8961
|
-
|
|
8962
|
-
|
|
8963
|
-
|
|
8964
|
-
|
|
8965
|
-
|
|
8966
|
-
|
|
8967
|
-
|
|
8968
|
-
|
|
8969
|
-
let E = f < r.length && g > 0, $ = f < r.length && g + f < r.length;
|
|
8970
|
-
const m = Math.min(g + f, r.length), d = [];
|
|
8971
|
-
let F = 0;
|
|
8972
|
-
E && F++, $ && F++;
|
|
8973
|
-
const y2 = g + (E ? 1 : 0), v = m - ($ ? 1 : 0);
|
|
8974
|
-
for (let A = y2; A < v; A++) {
|
|
8975
|
-
const b = J2(s(r[A], A === e), l, { hard: true, trim: false }).split(`
|
|
8976
|
-
`);
|
|
8977
|
-
d.push(b), F += b.length;
|
|
8978
|
-
}
|
|
8979
|
-
if (F > p) {
|
|
8980
|
-
let A = 0, b = 0, w = F;
|
|
8981
|
-
const S2 = e - y2, T2 = /* @__PURE__ */ __name((M2, O2) => bt2(d, w, M2, O2, p), "T");
|
|
8982
|
-
E ? ({ lineCount: w, removals: A } = T2(0, S2), w > p && ({ lineCount: w, removals: b } = T2(S2 + 1, d.length))) : ({ lineCount: w, removals: b } = T2(S2 + 1, d.length), w > p && ({ lineCount: w, removals: A } = T2(0, S2))), A > 0 && (E = true, d.splice(0, A)), b > 0 && ($ = true, d.splice(d.length - b, b));
|
|
8983
|
-
}
|
|
8984
|
-
const C = [];
|
|
8985
|
-
E && C.push(c);
|
|
8986
|
-
for (const A of d) for (const b of A) C.push(b);
|
|
8987
|
-
return $ && C.push(c), C;
|
|
8988
|
-
}, "X");
|
|
8989
|
-
({ light: I2("\u2500", "-"), heavy: I2("\u2501", "="), block: I2("\u2588", "#") });
|
|
8990
|
-
var oe = /* @__PURE__ */ __name((e, r) => e.includes(`
|
|
9035
|
+
h.push(x), f += x.length;
|
|
9036
|
+
}
|
|
9037
|
+
if (f > $2) {
|
|
9038
|
+
let b = 0, x = 0, G2 = f;
|
|
9039
|
+
const M2 = e - v, R2 = /* @__PURE__ */ __name((j2, D2) => et2(h, G2, j2, D2, $2), "R");
|
|
9040
|
+
m ? ({ lineCount: G2, removals: b } = R2(0, M2), G2 > $2 && ({ lineCount: G2, removals: x } = R2(M2 + 1, h.length))) : ({ lineCount: G2, removals: x } = R2(M2 + 1, h.length), G2 > $2 && ({ lineCount: G2, removals: b } = R2(0, M2))), b > 0 && (m = true, h.splice(0, b)), x > 0 && (g = true, h.splice(h.length - x, x));
|
|
9041
|
+
}
|
|
9042
|
+
const C2 = [];
|
|
9043
|
+
m && C2.push(l);
|
|
9044
|
+
for (const b of h) for (const x of b) C2.push(x);
|
|
9045
|
+
return g && C2.push(l), C2;
|
|
9046
|
+
}, "Y");
|
|
9047
|
+
({ light: w2("\u2500", "-"), heavy: w2("\u2501", "="), block: w2("\u2588", "#") });
|
|
9048
|
+
var re = /* @__PURE__ */ __name((e, i) => e.includes(`
|
|
8991
9049
|
`) ? e.split(`
|
|
8992
|
-
`).map((s) =>
|
|
8993
|
-
`) :
|
|
8994
|
-
var
|
|
8995
|
-
const
|
|
8996
|
-
const
|
|
8997
|
-
switch (
|
|
9050
|
+
`).map((s) => i(s)).join(`
|
|
9051
|
+
`) : i(e), "re");
|
|
9052
|
+
var _t = /* @__PURE__ */ __name((e) => {
|
|
9053
|
+
const i = /* @__PURE__ */ __name((s, r) => {
|
|
9054
|
+
const u2 = s.label ?? String(s.value);
|
|
9055
|
+
switch (r) {
|
|
8998
9056
|
case "disabled":
|
|
8999
|
-
return `${styleText("gray", H2)} ${
|
|
9057
|
+
return `${styleText("gray", H2)} ${re(u2, (n) => styleText("gray", n))}${s.hint ? ` ${styleText("dim", `(${s.hint ?? "disabled"})`)}` : ""}`;
|
|
9000
9058
|
case "selected":
|
|
9001
|
-
return `${
|
|
9059
|
+
return `${re(u2, (n) => styleText("dim", n))}`;
|
|
9002
9060
|
case "active":
|
|
9003
|
-
return `${styleText("green", z2)} ${
|
|
9061
|
+
return `${styleText("green", z2)} ${u2}${s.hint ? ` ${styleText("dim", `(${s.hint})`)}` : ""}`;
|
|
9004
9062
|
case "cancelled":
|
|
9005
|
-
return `${
|
|
9063
|
+
return `${re(u2, (n) => styleText(["strikethrough", "dim"], n))}`;
|
|
9006
9064
|
default:
|
|
9007
|
-
return `${styleText("dim", H2)} ${
|
|
9065
|
+
return `${styleText("dim", H2)} ${re(u2, (n) => styleText("dim", n))}`;
|
|
9008
9066
|
}
|
|
9009
|
-
}, "
|
|
9010
|
-
return new
|
|
9011
|
-
const s = e.withGuide ??
|
|
9012
|
-
` : ""}${
|
|
9067
|
+
}, "i");
|
|
9068
|
+
return new nt({ options: e.options, signal: e.signal, input: e.input, output: e.output, initialValue: e.initialValue, render() {
|
|
9069
|
+
const s = e.withGuide ?? u.withGuide, r = `${V2(this.state)} `, u2 = `${ye(this.state)} `, n = R(e.output, e.message, u2, r), o = `${s ? `${styleText("gray", d2)}
|
|
9070
|
+
` : ""}${n}
|
|
9013
9071
|
`;
|
|
9014
9072
|
switch (this.state) {
|
|
9015
9073
|
case "submit": {
|
|
9016
|
-
const
|
|
9017
|
-
return `${
|
|
9074
|
+
const c2 = s ? `${styleText("gray", d2)} ` : "", a2 = R(e.output, i(this.options[this.cursor], "selected"), c2);
|
|
9075
|
+
return `${o}${a2}`;
|
|
9018
9076
|
}
|
|
9019
9077
|
case "cancel": {
|
|
9020
|
-
const
|
|
9021
|
-
return `${
|
|
9022
|
-
${styleText("gray",
|
|
9078
|
+
const c2 = s ? `${styleText("gray", d2)} ` : "", a2 = R(e.output, i(this.options[this.cursor], "cancelled"), c2);
|
|
9079
|
+
return `${o}${a2}${s ? `
|
|
9080
|
+
${styleText("gray", d2)}` : ""}`;
|
|
9023
9081
|
}
|
|
9024
9082
|
default: {
|
|
9025
|
-
const
|
|
9026
|
-
`).length,
|
|
9027
|
-
return `${
|
|
9028
|
-
${
|
|
9029
|
-
${
|
|
9083
|
+
const c2 = s ? `${styleText("cyan", d2)} ` : "", a2 = s ? styleText("cyan", E2) : "", l = o.split(`
|
|
9084
|
+
`).length, $2 = s ? 2 : 1;
|
|
9085
|
+
return `${o}${c2}${Y2({ output: e.output, cursor: this.cursor, options: this.options, maxItems: e.maxItems, columnPadding: c2.length, rowPadding: l + $2, style: /* @__PURE__ */ __name((y2, p2) => i(y2, y2.disabled ? "disabled" : p2 ? "active" : "inactive"), "style") }).join(`
|
|
9086
|
+
${c2}`)}
|
|
9087
|
+
${a2}
|
|
9030
9088
|
`;
|
|
9031
9089
|
}
|
|
9032
9090
|
}
|
|
9033
9091
|
} }).prompt();
|
|
9034
|
-
}, "
|
|
9035
|
-
`${styleText("gray",
|
|
9092
|
+
}, "_t");
|
|
9093
|
+
`${styleText("gray", d2)} `;
|
|
9036
9094
|
function getUserVarlockDir() {
|
|
9037
9095
|
const home = os.homedir();
|
|
9038
9096
|
if (process.env.XDG_CONFIG_HOME) {
|
|
@@ -9046,9 +9104,9 @@ function getUserVarlockDir() {
|
|
|
9046
9104
|
}
|
|
9047
9105
|
__name(getUserVarlockDir, "getUserVarlockDir");
|
|
9048
9106
|
function isUnicodeSupported() {
|
|
9049
|
-
const { env } =
|
|
9107
|
+
const { env } = P2;
|
|
9050
9108
|
const { TERM, TERM_PROGRAM } = env;
|
|
9051
|
-
if (
|
|
9109
|
+
if (P2.platform !== "win32") {
|
|
9052
9110
|
return TERM !== "linux";
|
|
9053
9111
|
}
|
|
9054
9112
|
return Boolean(env.WT_SESSION) || Boolean(env.TERMINUS_SUBLIME) || env.ConEmuTask === "{cmd::Cmder}" || TERM_PROGRAM === "Terminus-Sublime" || TERM_PROGRAM === "vscode" || TERM === "xterm-256color" || TERM === "alacritty" || TERM === "rxvt-unicode" || TERM === "rxvt-unicode-256color" || env.TERMINAL_EMULATOR === "JetBrains-JediTerm";
|
|
@@ -9057,7 +9115,7 @@ __name(isUnicodeSupported, "isUnicodeSupported");
|
|
|
9057
9115
|
|
|
9058
9116
|
// src/cli/helpers/prompts.ts
|
|
9059
9117
|
var unicode = isUnicodeSupported();
|
|
9060
|
-
var unicodeOr = /* @__PURE__ */ __name((
|
|
9118
|
+
var unicodeOr = /* @__PURE__ */ __name((c2, fallback) => unicode ? c2 : fallback, "unicodeOr");
|
|
9061
9119
|
var S_STEP_ACTIVE = unicodeOr("\u25C6", "*");
|
|
9062
9120
|
var S_STEP_CANCEL = unicodeOr("\u25A0", "x");
|
|
9063
9121
|
var S_STEP_ERROR = unicodeOr("\u25B2", "x");
|
|
@@ -9116,7 +9174,7 @@ var limitOptions = /* @__PURE__ */ __name((params) => {
|
|
|
9116
9174
|
var confirm = /* @__PURE__ */ __name((opts) => {
|
|
9117
9175
|
const active = opts.active ?? "Yes";
|
|
9118
9176
|
const inactive = opts.inactive ?? "No";
|
|
9119
|
-
return new
|
|
9177
|
+
return new Q({
|
|
9120
9178
|
active,
|
|
9121
9179
|
inactive,
|
|
9122
9180
|
input: opts.input,
|
|
@@ -9157,7 +9215,7 @@ var select = /* @__PURE__ */ __name((opts) => {
|
|
|
9157
9215
|
return `${ansis_default.dim(S_RADIO_INACTIVE)} ${ansis_default.dim(label)}`;
|
|
9158
9216
|
}
|
|
9159
9217
|
}, "opt");
|
|
9160
|
-
return new
|
|
9218
|
+
return new nt({
|
|
9161
9219
|
options: opts.options,
|
|
9162
9220
|
input: opts.input,
|
|
9163
9221
|
output: opts.output,
|
|
@@ -9211,7 +9269,7 @@ var multiselect = /* @__PURE__ */ __name((opts) => {
|
|
|
9211
9269
|
}
|
|
9212
9270
|
return `${ansis_default.dim(S_CHECKBOX_INACTIVE)} ${ansis_default.dim(label)}`;
|
|
9213
9271
|
}, "opt");
|
|
9214
|
-
return new
|
|
9272
|
+
return new it({
|
|
9215
9273
|
options: opts.options,
|
|
9216
9274
|
input: opts.input,
|
|
9217
9275
|
output: opts.output,
|
|
@@ -9579,7 +9637,7 @@ var VarlockPlugin = class {
|
|
|
9579
9637
|
const { initDecorator, params } = this.standardVars;
|
|
9580
9638
|
const resolved = Object.entries(params).map(([paramName, { key, dataType }]) => {
|
|
9581
9639
|
const keys = Array.isArray(key) ? key : [key];
|
|
9582
|
-
const matchedKey = keys.find((
|
|
9640
|
+
const matchedKey = keys.find((k) => graph.overrideValues[k]);
|
|
9583
9641
|
return {
|
|
9584
9642
|
paramName,
|
|
9585
9643
|
matchedKey,
|
|
@@ -9767,7 +9825,7 @@ async function isPluginCached(url) {
|
|
|
9767
9825
|
}
|
|
9768
9826
|
__name(isPluginCached, "isPluginCached");
|
|
9769
9827
|
async function downloadPlugin(url) {
|
|
9770
|
-
const
|
|
9828
|
+
const exec4 = promisify(exec);
|
|
9771
9829
|
const cacheDir = path3.join(getUserVarlockDir(), "plugins-cache");
|
|
9772
9830
|
const indexPath = path3.join(cacheDir, "index.json");
|
|
9773
9831
|
await fs3.mkdir(cacheDir, { recursive: true });
|
|
@@ -9798,7 +9856,7 @@ async function downloadPlugin(url) {
|
|
|
9798
9856
|
});
|
|
9799
9857
|
const tmpExtractDir = path3.join(cacheDir, `tmp-extract-${crypto2.randomBytes(8).toString("hex")}`);
|
|
9800
9858
|
await fs3.mkdir(tmpExtractDir);
|
|
9801
|
-
await
|
|
9859
|
+
await exec4(`tar -xzf ${tmpTgz} -C ${tmpExtractDir}`);
|
|
9802
9860
|
let pkgJsonPath = path3.join(tmpExtractDir, "package", "package.json");
|
|
9803
9861
|
let pluginRoot = path3.join(tmpExtractDir, "package");
|
|
9804
9862
|
if (!await fs3.stat(pkgJsonPath).then(() => true, () => false)) {
|
|
@@ -9956,7 +10014,7 @@ ${ansis_default.yellow("\u26A0")} Third-party plugin download requested
|
|
|
9956
10014
|
inactive: "No, cancel",
|
|
9957
10015
|
initialValue: false
|
|
9958
10016
|
});
|
|
9959
|
-
if (
|
|
10017
|
+
if (q(confirmed) || !confirmed) {
|
|
9960
10018
|
throw new SchemaError(`Third-party plugin "${moduleName}" download cancelled`);
|
|
9961
10019
|
}
|
|
9962
10020
|
}
|
|
@@ -10272,7 +10330,7 @@ var EnvGraphDataSource2 = class {
|
|
|
10272
10330
|
}
|
|
10273
10331
|
if (this.graph.virtualImports) {
|
|
10274
10332
|
if (importPath.endsWith("/")) {
|
|
10275
|
-
const dirExists = Object.keys(this.graph.virtualImports).some((
|
|
10333
|
+
const dirExists = Object.keys(this.graph.virtualImports).some((p2) => p2.startsWith(fullImportPath));
|
|
10276
10334
|
if (!dirExists && allowMissing) continue;
|
|
10277
10335
|
if (!dirExists) {
|
|
10278
10336
|
this._loadingError = new Error(`Virtual directory import ${fullImportPath} not found`);
|
|
@@ -10387,11 +10445,11 @@ var EnvGraphDataSource2 = class {
|
|
|
10387
10445
|
get schemaErrors() {
|
|
10388
10446
|
return my_dash_default.compact([
|
|
10389
10447
|
...this._schemaErrors,
|
|
10390
|
-
...this.rootDecorators.flatMap((
|
|
10448
|
+
...this.rootDecorators.flatMap((d3) => d3.schemaErrors)
|
|
10391
10449
|
]);
|
|
10392
10450
|
}
|
|
10393
10451
|
get resolutionErrors() {
|
|
10394
|
-
return my_dash_default.compact([...this.rootDecorators.flatMap((
|
|
10452
|
+
return my_dash_default.compact([...this.rootDecorators.flatMap((d3) => d3._executionError)]);
|
|
10395
10453
|
}
|
|
10396
10454
|
get isValid() {
|
|
10397
10455
|
return !this.loadingError && !this.schemaErrors.some((e) => !e.isWarning) && !this.resolutionErrors.length;
|
|
@@ -10399,7 +10457,7 @@ var EnvGraphDataSource2 = class {
|
|
|
10399
10457
|
configItemDefs = {};
|
|
10400
10458
|
decorators = [];
|
|
10401
10459
|
getRootDecorators(decName) {
|
|
10402
|
-
return this.decorators.filter((
|
|
10460
|
+
return this.decorators.filter((d3) => d3.name === decName);
|
|
10403
10461
|
}
|
|
10404
10462
|
getRootDecoratorSimpleValue(decName) {
|
|
10405
10463
|
const decorators = this.getRootDecorators(decName);
|
|
@@ -10409,10 +10467,10 @@ var EnvGraphDataSource2 = class {
|
|
|
10409
10467
|
}
|
|
10410
10468
|
rootDecorators = [];
|
|
10411
10469
|
getRootDec(decName) {
|
|
10412
|
-
return this.rootDecorators.find((
|
|
10470
|
+
return this.rootDecorators.find((d3) => d3.name === decName && !d3.isFunctionCall);
|
|
10413
10471
|
}
|
|
10414
10472
|
getRootDecFns(decName) {
|
|
10415
|
-
return this.rootDecorators.filter((
|
|
10473
|
+
return this.rootDecorators.filter((d3) => d3.name === decName && d3.isFunctionCall);
|
|
10416
10474
|
}
|
|
10417
10475
|
};
|
|
10418
10476
|
var ImportAliasSource = class extends EnvGraphDataSource2 {
|
|
@@ -10420,6 +10478,7 @@ var ImportAliasSource = class extends EnvGraphDataSource2 {
|
|
|
10420
10478
|
super();
|
|
10421
10479
|
this.original = original;
|
|
10422
10480
|
}
|
|
10481
|
+
original;
|
|
10423
10482
|
static {
|
|
10424
10483
|
__name(this, "ImportAliasSource");
|
|
10425
10484
|
}
|
|
@@ -10525,7 +10584,7 @@ var DotEnvFileDataSource = class extends FileBasedDataSource {
|
|
|
10525
10584
|
if (this.loadingError) return;
|
|
10526
10585
|
if (!this.parsedFile) throw new Error("Failed to parse .env file");
|
|
10527
10586
|
if (!this.graph) throw new Error("expected graph to be set");
|
|
10528
|
-
this.rootDecorators = this.parsedFile.decoratorsArray.map((
|
|
10587
|
+
this.rootDecorators = this.parsedFile.decoratorsArray.map((d3) => new RootDecoratorInstance2(this, d3));
|
|
10529
10588
|
this._validateDecoratorPlacement(this.parsedFile);
|
|
10530
10589
|
for (const item of this.parsedFile.configItems) {
|
|
10531
10590
|
this.configItemDefs[item.key] = {
|
|
@@ -10582,6 +10641,7 @@ var DirectoryDataSource = class extends EnvGraphDataSource2 {
|
|
|
10582
10641
|
super();
|
|
10583
10642
|
this.basePath = basePath;
|
|
10584
10643
|
}
|
|
10644
|
+
basePath;
|
|
10585
10645
|
static {
|
|
10586
10646
|
__name(this, "DirectoryDataSource");
|
|
10587
10647
|
}
|
|
@@ -10673,6 +10733,7 @@ var MultiplePathsContainerDataSource = class extends EnvGraphDataSource2 {
|
|
|
10673
10733
|
super();
|
|
10674
10734
|
this.paths = paths;
|
|
10675
10735
|
}
|
|
10736
|
+
paths;
|
|
10676
10737
|
static {
|
|
10677
10738
|
__name(this, "MultiplePathsContainerDataSource");
|
|
10678
10739
|
}
|
|
@@ -10815,6 +10876,9 @@ var ItemDecoratorInstance = class extends DecoratorInstance {
|
|
|
10815
10876
|
this.dataSource = dataSource;
|
|
10816
10877
|
this.parsedDecorator = parsedDecorator;
|
|
10817
10878
|
}
|
|
10879
|
+
configItem;
|
|
10880
|
+
dataSource;
|
|
10881
|
+
parsedDecorator;
|
|
10818
10882
|
static {
|
|
10819
10883
|
__name(this, "ItemDecoratorInstance");
|
|
10820
10884
|
}
|
|
@@ -10829,6 +10893,8 @@ var RootDecoratorInstance2 = class extends DecoratorInstance {
|
|
|
10829
10893
|
this.dataSource = dataSource;
|
|
10830
10894
|
this.parsedDecorator = parsedDecorator;
|
|
10831
10895
|
}
|
|
10896
|
+
dataSource;
|
|
10897
|
+
parsedDecorator;
|
|
10832
10898
|
static {
|
|
10833
10899
|
__name(this, "RootDecoratorInstance");
|
|
10834
10900
|
}
|
|
@@ -11014,7 +11080,7 @@ var builtInRootDecorators = [
|
|
|
11014
11080
|
dataSource._loadingError = err instanceof SchemaError ? err : new SchemaError(err);
|
|
11015
11081
|
return;
|
|
11016
11082
|
}
|
|
11017
|
-
const { ConfigItem: ConfigItem2 } = await import('./config-item-
|
|
11083
|
+
const { ConfigItem: ConfigItem2 } = await import('./config-item-IK3DUE5F.js');
|
|
11018
11084
|
for (const [key, entry] of Object.entries(entries)) {
|
|
11019
11085
|
const existsInSchema = key in graph.configSchema;
|
|
11020
11086
|
if (!existsInSchema && !createMissing) {
|
|
@@ -11096,6 +11162,9 @@ var Resolver = class {
|
|
|
11096
11162
|
this.dataSource = dataSource;
|
|
11097
11163
|
if (this.def.inferredType) this.inferredType = this.def.inferredType;
|
|
11098
11164
|
}
|
|
11165
|
+
arrArgs;
|
|
11166
|
+
objArgs;
|
|
11167
|
+
dataSource;
|
|
11099
11168
|
static {
|
|
11100
11169
|
__name(this, "Resolver");
|
|
11101
11170
|
}
|
|
@@ -11272,6 +11341,7 @@ var StaticValueResolver = class extends Resolver {
|
|
|
11272
11341
|
this.inferredType = typeof _staticValue;
|
|
11273
11342
|
}
|
|
11274
11343
|
}
|
|
11344
|
+
_staticValue;
|
|
11275
11345
|
static {
|
|
11276
11346
|
__name(this, "StaticValueResolver");
|
|
11277
11347
|
}
|
|
@@ -11330,6 +11400,7 @@ var ErrorResolver = class extends Resolver {
|
|
|
11330
11400
|
this.err = err;
|
|
11331
11401
|
this._schemaErrors.push(err);
|
|
11332
11402
|
}
|
|
11403
|
+
err;
|
|
11333
11404
|
static {
|
|
11334
11405
|
__name(this, "ErrorResolver");
|
|
11335
11406
|
}
|
|
@@ -11721,6 +11792,8 @@ var EnvGraphDataType = class {
|
|
|
11721
11792
|
this.def = def;
|
|
11722
11793
|
this.factory = factory;
|
|
11723
11794
|
}
|
|
11795
|
+
def;
|
|
11796
|
+
factory;
|
|
11724
11797
|
static {
|
|
11725
11798
|
__name(this, "EnvGraphDataType");
|
|
11726
11799
|
}
|
|
@@ -11842,8 +11915,8 @@ var NumberDataType = createEnvGraphDataType(
|
|
|
11842
11915
|
if (settings?.isInt === true || settings?.precision === 0) {
|
|
11843
11916
|
numVal = Math.round(numVal);
|
|
11844
11917
|
} else if (settings?.precision) {
|
|
11845
|
-
const
|
|
11846
|
-
numVal = Math.round(numVal *
|
|
11918
|
+
const p2 = 10 ** settings.precision;
|
|
11919
|
+
numVal = Math.round(numVal * p2) / p2;
|
|
11847
11920
|
}
|
|
11848
11921
|
return numVal;
|
|
11849
11922
|
},
|
|
@@ -12102,6 +12175,8 @@ var ConfigItem = class {
|
|
|
12102
12175
|
this.envGraph = envGraph;
|
|
12103
12176
|
this.key = key;
|
|
12104
12177
|
}
|
|
12178
|
+
envGraph;
|
|
12179
|
+
key;
|
|
12105
12180
|
static {
|
|
12106
12181
|
__name(this, "ConfigItem");
|
|
12107
12182
|
}
|
|
@@ -12176,7 +12251,7 @@ var ConfigItem = class {
|
|
|
12176
12251
|
* This is useful for explaining where a value comes from regardless of overrides.
|
|
12177
12252
|
*/
|
|
12178
12253
|
get activeValueDef() {
|
|
12179
|
-
const hasInternalResolver = this._internalDefs.some((
|
|
12254
|
+
const hasInternalResolver = this._internalDefs.some((d3) => d3.itemDef.resolver);
|
|
12180
12255
|
for (const def of this.defs) {
|
|
12181
12256
|
if (def.itemDef.resolver) {
|
|
12182
12257
|
if (hasInternalResolver && def.itemDef.resolver instanceof StaticValueResolver && !def.itemDef.resolver.staticValue) {
|
|
@@ -12190,7 +12265,7 @@ var ConfigItem = class {
|
|
|
12190
12265
|
if (this.isOverridden) {
|
|
12191
12266
|
return new StaticValueResolver(this.envGraph.overrideValues[this.key]);
|
|
12192
12267
|
}
|
|
12193
|
-
const hasInternalResolver = this._internalDefs.some((
|
|
12268
|
+
const hasInternalResolver = this._internalDefs.some((d3) => d3.itemDef.resolver);
|
|
12194
12269
|
for (const def of this.defs) {
|
|
12195
12270
|
if (def.itemDef.resolver) {
|
|
12196
12271
|
if (hasInternalResolver && def.itemDef.resolver instanceof StaticValueResolver && !def.itemDef.resolver.staticValue) {
|
|
@@ -12225,7 +12300,7 @@ var ConfigItem = class {
|
|
|
12225
12300
|
return this.valueResolver?.schemaErrors || [];
|
|
12226
12301
|
}
|
|
12227
12302
|
get decoratorSchemaErrors() {
|
|
12228
|
-
return my_dash_default.values(this.allDecorators).flatMap((
|
|
12303
|
+
return my_dash_default.values(this.allDecorators).flatMap((d3) => d3.schemaErrors);
|
|
12229
12304
|
}
|
|
12230
12305
|
isProcessed = false;
|
|
12231
12306
|
async process() {
|
|
@@ -12244,10 +12319,10 @@ var ConfigItem = class {
|
|
|
12244
12319
|
}
|
|
12245
12320
|
for (const def of this.defs) {
|
|
12246
12321
|
def.itemDef.decorators = def.itemDef.parsedDecorators?.map(
|
|
12247
|
-
(
|
|
12322
|
+
(d3) => new ItemDecoratorInstance(this, def.source, d3)
|
|
12248
12323
|
);
|
|
12249
12324
|
const decKeysInThisDef = /* @__PURE__ */ new Set();
|
|
12250
|
-
const allDecsInThisDef = def.itemDef.decorators?.map((
|
|
12325
|
+
const allDecsInThisDef = def.itemDef.decorators?.map((d3) => d3.name);
|
|
12251
12326
|
for (const dec of def.itemDef.decorators || []) {
|
|
12252
12327
|
await dec.process();
|
|
12253
12328
|
this.allDecorators?.push(dec);
|
|
@@ -12302,7 +12377,7 @@ var ConfigItem = class {
|
|
|
12302
12377
|
),
|
|
12303
12378
|
...my_dash_default.values(this.effectiveDecoratorFns).flatMap(
|
|
12304
12379
|
(decArr) => decArr.flatMap(
|
|
12305
|
-
(
|
|
12380
|
+
(d3) => d3.decValueResolver?.deps || []
|
|
12306
12381
|
)
|
|
12307
12382
|
)
|
|
12308
12383
|
]);
|
|
@@ -12331,7 +12406,7 @@ var ConfigItem = class {
|
|
|
12331
12406
|
async processRequired() {
|
|
12332
12407
|
try {
|
|
12333
12408
|
for (const def of this.defs) {
|
|
12334
|
-
const requiredDecs = def.itemDef.decorators?.filter((
|
|
12409
|
+
const requiredDecs = def.itemDef.decorators?.filter((d3) => d3.name === "required" || d3.name === "optional") || [];
|
|
12335
12410
|
const requiredDec = requiredDecs[0];
|
|
12336
12411
|
if (requiredDec) {
|
|
12337
12412
|
const usingOptional = requiredDec.name === "optional";
|
|
@@ -12390,7 +12465,7 @@ var ConfigItem = class {
|
|
|
12390
12465
|
async processSensitive() {
|
|
12391
12466
|
const sensitiveFromDataType = this.dataType?.isSensitive;
|
|
12392
12467
|
for (const def of this.defs) {
|
|
12393
|
-
const sensitiveDecs = def.itemDef.decorators?.filter((
|
|
12468
|
+
const sensitiveDecs = def.itemDef.decorators?.filter((d3) => d3.name === "sensitive" || d3.name === "public") || [];
|
|
12394
12469
|
const sensitiveDec = sensitiveDecs[0];
|
|
12395
12470
|
if (sensitiveDec) {
|
|
12396
12471
|
const usingPublic = sensitiveDec.name === "public";
|
|
@@ -12567,7 +12642,7 @@ var ConfigItem = class {
|
|
|
12567
12642
|
let isRequiredDynamic = false;
|
|
12568
12643
|
try {
|
|
12569
12644
|
for (const def of defs) {
|
|
12570
|
-
const requiredDecs = def.itemDef.decorators?.filter((
|
|
12645
|
+
const requiredDecs = def.itemDef.decorators?.filter((d3) => d3.name === "required" || d3.name === "optional") || [];
|
|
12571
12646
|
const requiredDec = requiredDecs[0];
|
|
12572
12647
|
if (requiredDec) {
|
|
12573
12648
|
const usingOptional = requiredDec.name === "optional";
|
|
@@ -12613,7 +12688,7 @@ var ConfigItem = class {
|
|
|
12613
12688
|
try {
|
|
12614
12689
|
let foundSensitive = false;
|
|
12615
12690
|
for (const def of defs) {
|
|
12616
|
-
const sensitiveDecs = def.itemDef.decorators?.filter((
|
|
12691
|
+
const sensitiveDecs = def.itemDef.decorators?.filter((d3) => d3.name === "sensitive" || d3.name === "public") || [];
|
|
12617
12692
|
const sensitiveDec = sensitiveDecs[0];
|
|
12618
12693
|
if (sensitiveDec) {
|
|
12619
12694
|
const usingPublic = sensitiveDec.name === "public";
|
|
@@ -12655,7 +12730,7 @@ var ConfigItem = class {
|
|
|
12655
12730
|
}
|
|
12656
12731
|
let icon;
|
|
12657
12732
|
for (const def of defs) {
|
|
12658
|
-
const iconDec = def.itemDef.decorators?.find((
|
|
12733
|
+
const iconDec = def.itemDef.decorators?.find((d3) => d3.name === "icon");
|
|
12659
12734
|
if (iconDec) {
|
|
12660
12735
|
try {
|
|
12661
12736
|
icon = await iconDec.resolve();
|
|
@@ -12673,7 +12748,7 @@ var ConfigItem = class {
|
|
|
12673
12748
|
}
|
|
12674
12749
|
}
|
|
12675
12750
|
for (const def of defs) {
|
|
12676
|
-
const docsUrlDec = def.itemDef.decorators?.find((
|
|
12751
|
+
const docsUrlDec = def.itemDef.decorators?.find((d3) => d3.name === "docsUrl");
|
|
12677
12752
|
if (docsUrlDec) {
|
|
12678
12753
|
try {
|
|
12679
12754
|
const val = await docsUrlDec.resolve();
|
|
@@ -12681,7 +12756,7 @@ var ConfigItem = class {
|
|
|
12681
12756
|
} catch {
|
|
12682
12757
|
}
|
|
12683
12758
|
}
|
|
12684
|
-
const docsFnDecs = def.itemDef.decorators?.filter((
|
|
12759
|
+
const docsFnDecs = def.itemDef.decorators?.filter((d3) => d3.name === "docs" && d3.isFunctionCall) || [];
|
|
12685
12760
|
for (const docsDec of docsFnDecs) {
|
|
12686
12761
|
try {
|
|
12687
12762
|
const decVal = await docsDec.resolve();
|
|
@@ -12709,6 +12784,6 @@ var ConfigItem = class {
|
|
|
12709
12784
|
}
|
|
12710
12785
|
};
|
|
12711
12786
|
|
|
12712
|
-
export { ConfigItem,
|
|
12713
|
-
//# sourceMappingURL=chunk-
|
|
12714
|
-
//# sourceMappingURL=chunk-
|
|
12787
|
+
export { ConfigItem, DirectoryDataSource, DotEnvFileDataSource, EnvGraph, FileBasedDataSource, MultiplePathsContainerDataSource, ParsedEnvSpecStaticValue, StaticValueResolver, _t, ansis_default, detectWorkspaceInfo, downloadPluginToCache, envSpecUpdater, getUserVarlockDir, parseEnvSpecDotEnvFile, pathExists, prompts_default, q, require_semver2 as require_semver, runWithWorkspaceInfo, spawnAsync, tryCatch };
|
|
12788
|
+
//# sourceMappingURL=chunk-W3GUFLIV.js.map
|
|
12789
|
+
//# sourceMappingURL=chunk-W3GUFLIV.js.map
|