varlock 0.8.2 → 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 +5 -5
- package/dist/{chunk-YUPV6MIL.js → chunk-253NGIPN.js} +3 -3
- package/dist/{chunk-YUPV6MIL.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-6W4P3ESY.js → chunk-4VC5S7NB.js} +5 -5
- package/dist/{chunk-6W4P3ESY.js.map → chunk-4VC5S7NB.js.map} +1 -1
- package/dist/{chunk-MYHVSJ3X.js → chunk-5DUWGI2N.js} +3 -3
- package/dist/{chunk-MYHVSJ3X.js.map → chunk-5DUWGI2N.js.map} +1 -1
- package/dist/{chunk-YK3J3EOI.js → chunk-7P3SVUZ5.js} +80 -10
- package/dist/chunk-7P3SVUZ5.js.map +1 -0
- package/dist/{chunk-ZH3NIFSS.js → chunk-BFRONY2O.js} +7 -7
- package/dist/{chunk-ZH3NIFSS.js.map → chunk-BFRONY2O.js.map} +1 -1
- package/dist/{chunk-LVZSZAKN.js → chunk-F6RTQ5QX.js} +3 -3
- package/dist/{chunk-LVZSZAKN.js.map → chunk-F6RTQ5QX.js.map} +1 -1
- package/dist/{chunk-PBBUUBNG.js → chunk-FSLTOPCT.js} +5 -5
- package/dist/{chunk-PBBUUBNG.js.map → chunk-FSLTOPCT.js.map} +1 -1
- package/dist/{chunk-VH76CEVH.js → chunk-FWJAZMC7.js} +4 -4
- package/dist/{chunk-VH76CEVH.js.map → chunk-FWJAZMC7.js.map} +1 -1
- package/dist/{chunk-JA2AIGGX.js → chunk-GH73MG2H.js} +14 -7
- package/dist/chunk-GH73MG2H.js.map +1 -0
- package/dist/{chunk-CZXCAKEV.js → chunk-LOGMWG5X.js} +5 -5
- package/dist/{chunk-CZXCAKEV.js.map → chunk-LOGMWG5X.js.map} +1 -1
- package/dist/{chunk-IMB5QAZS.js → chunk-MGWUDHT5.js} +6 -2
- package/dist/chunk-MGWUDHT5.js.map +1 -0
- package/dist/{chunk-WG4YIOKM.js → chunk-MIMMYDBC.js} +5 -5
- package/dist/{chunk-WG4YIOKM.js.map → chunk-MIMMYDBC.js.map} +1 -1
- package/dist/{chunk-Z5OLYLN5.js → chunk-NWKETKFP.js} +5 -5
- package/dist/{chunk-Z5OLYLN5.js.map → chunk-NWKETKFP.js.map} +1 -1
- package/dist/{chunk-I2BC7NCA.js → chunk-QHIRGHGG.js} +5 -4
- package/dist/chunk-QHIRGHGG.js.map +1 -0
- package/dist/{chunk-BC7LU4LG.js → chunk-R73FENLU.js} +3 -3
- package/dist/{chunk-BC7LU4LG.js.map → chunk-R73FENLU.js.map} +1 -1
- package/dist/{chunk-NUSBE7ZT.js → chunk-UG4RTI6V.js} +9 -9
- package/dist/{chunk-NUSBE7ZT.js.map → chunk-UG4RTI6V.js.map} +1 -1
- package/dist/{chunk-CAJTCWYA.js → chunk-US7YQTJZ.js} +5 -5
- package/dist/{chunk-CAJTCWYA.js.map → chunk-US7YQTJZ.js.map} +1 -1
- package/dist/{chunk-5224KHFW.js → chunk-UUDTMOJS.js} +6 -6
- package/dist/{chunk-5224KHFW.js.map → chunk-UUDTMOJS.js.map} +1 -1
- package/dist/{chunk-FOA6LP5C.js → chunk-W3GUFLIV.js} +821 -745
- package/dist/chunk-W3GUFLIV.js.map +1 -0
- package/dist/{chunk-CZ7QQE6H.js → chunk-ZRHT6QHO.js} +5 -5
- package/dist/{chunk-CZ7QQE6H.js.map → chunk-ZRHT6QHO.js.map} +1 -1
- package/dist/cli/cli-executable.js +27 -27
- package/dist/cli/cli-executable.js.map +1 -1
- package/dist/config-item-IK3DUE5F.js +5 -0
- package/dist/{config-item-SR7HN6CU.js.map → config-item-IK3DUE5F.js.map} +1 -1
- package/dist/dotenv-compat.js +5 -5
- package/dist/explain.command-5DG3ACIH.js +12 -0
- package/dist/{explain.command-AQR6BA2T.js.map → explain.command-5DG3ACIH.js.map} +1 -1
- package/dist/index.js +12 -12
- package/dist/init.command-EWCFF2D5.js +11 -0
- package/dist/{init.command-7YURBLWN.js.map → init.command-EWCFF2D5.js.map} +1 -1
- package/dist/install-plugin.command-6ESRFNKI.js +11 -0
- package/dist/{install-plugin.command-PQTP6RHA.js.map → install-plugin.command-6ESRFNKI.js.map} +1 -1
- package/dist/load.command-QNDTE2VK.js +12 -0
- package/dist/{load.command-R2HLBFAO.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-U7ULTREK.js.map → printenv.command-SBCXAVQT.js.map} +1 -1
- package/dist/run.command-64JM27VM.js +13 -0
- package/dist/{run.command-COOPCDSU.js.map → run.command-64JM27VM.js.map} +1 -1
- package/dist/runtime/env.js +1 -1
- package/dist/runtime/init-edge.cjs +4 -0
- package/dist/runtime/init-server.cjs +4 -0
- package/dist/runtime/patch-console.js +2 -2
- package/dist/runtime/patch-response.js +2 -2
- package/dist/runtime/patch-server-response.js +2 -2
- package/dist/scan.command-YFM7VO2I.js +13 -0
- package/dist/{scan.command-OUVXZFQD.js.map → scan.command-YFM7VO2I.js.map} +1 -1
- package/dist/telemetry.command-4AEVBTVE.js +11 -0
- package/dist/{telemetry.command-LI6PESQP.js.map → telemetry.command-4AEVBTVE.js.map} +1 -1
- package/dist/typegen.command-27OCEPZM.js +12 -0
- package/dist/{typegen.command-INHZ55RL.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-FOA6LP5C.js.map +0 -1
- package/dist/chunk-I2BC7NCA.js.map +0 -1
- package/dist/chunk-IMB5QAZS.js.map +0 -1
- package/dist/chunk-JA2AIGGX.js.map +0 -1
- package/dist/chunk-YK3J3EOI.js.map +0 -1
- package/dist/config-item-SR7HN6CU.js +0 -5
- package/dist/explain.command-AQR6BA2T.js +0 -12
- package/dist/init.command-7YURBLWN.js +0 -11
- package/dist/install-plugin.command-PQTP6RHA.js +0 -11
- package/dist/load.command-R2HLBFAO.js +0 -12
- package/dist/printenv.command-U7ULTREK.js +0 -12
- package/dist/run.command-COOPCDSU.js +0 -13
- package/dist/scan.command-OUVXZFQD.js +0 -13
- package/dist/telemetry.command-LI6PESQP.js +0 -11
- package/dist/typegen.command-INHZ55RL.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;
|
|
@@ -7041,7 +7052,8 @@ async function getTsDefinitionForItem(info, indentLevel = 0) {
|
|
|
7041
7052
|
itemSrc.push(...[
|
|
7042
7053
|
"/**",
|
|
7043
7054
|
// extra 2 trailing spaces are needed to make line breaks visible
|
|
7044
|
-
|
|
7055
|
+
// escape `*/` sequences to prevent premature comment closure
|
|
7056
|
+
...my_dash_default.flatMap(jsDocLines, (line) => [` * ${line.replace(/\*\//g, "* /")} `]),
|
|
7045
7057
|
" */"
|
|
7046
7058
|
]);
|
|
7047
7059
|
}
|
|
@@ -7559,9 +7571,9 @@ var VALID_ENVIRONMENTS = /* @__PURE__ */ new Set(
|
|
|
7559
7571
|
["development", "preview", "staging", "production", "test"]
|
|
7560
7572
|
);
|
|
7561
7573
|
function runDetect(platform, env) {
|
|
7562
|
-
const
|
|
7563
|
-
if (typeof
|
|
7564
|
-
return
|
|
7574
|
+
const d3 = platform.detect;
|
|
7575
|
+
if (typeof d3 === "string") return !!env[d3];
|
|
7576
|
+
return d3(env);
|
|
7565
7577
|
}
|
|
7566
7578
|
__name(runDetect, "runDetect");
|
|
7567
7579
|
function runExtractor(platform, key, env) {
|
|
@@ -7606,13 +7618,13 @@ function buildRaw(platform, env) {
|
|
|
7606
7618
|
];
|
|
7607
7619
|
const raw = {};
|
|
7608
7620
|
let hasAny = false;
|
|
7609
|
-
for (const
|
|
7610
|
-
const ext = platform[
|
|
7621
|
+
for (const k of keys) {
|
|
7622
|
+
const ext = platform[k];
|
|
7611
7623
|
if (typeof ext === "string" && env[ext]) {
|
|
7612
7624
|
raw[ext] = env[ext];
|
|
7613
7625
|
hasAny = true;
|
|
7614
7626
|
}
|
|
7615
|
-
if (
|
|
7627
|
+
if (k === "environment" && typeof ext === "object" && ext !== null && "var" in ext && env[ext.var]) {
|
|
7616
7628
|
raw[ext.var] = env[ext.var];
|
|
7617
7629
|
hasAny = true;
|
|
7618
7630
|
}
|
|
@@ -7669,6 +7681,9 @@ var ExecError = class extends Error {
|
|
|
7669
7681
|
this.signal = signal;
|
|
7670
7682
|
this.data = data;
|
|
7671
7683
|
}
|
|
7684
|
+
exitCode;
|
|
7685
|
+
signal;
|
|
7686
|
+
data;
|
|
7672
7687
|
static {
|
|
7673
7688
|
__name(this, "ExecError");
|
|
7674
7689
|
}
|
|
@@ -7847,7 +7862,7 @@ var EnvGraph = class {
|
|
|
7847
7862
|
let effectiveKeys;
|
|
7848
7863
|
const hasFilter = importKeys && importKeys.length > 0;
|
|
7849
7864
|
if (hasFilter && siteKeys?.length) {
|
|
7850
|
-
effectiveKeys = importKeys.filter((
|
|
7865
|
+
effectiveKeys = importKeys.filter((k) => siteKeys.includes(k));
|
|
7851
7866
|
} else if (hasFilter) {
|
|
7852
7867
|
effectiveKeys = importKeys;
|
|
7853
7868
|
} else {
|
|
@@ -8263,18 +8278,18 @@ var EnvGraph = class {
|
|
|
8263
8278
|
/** plugins installed globally in the graph */
|
|
8264
8279
|
plugins = [];
|
|
8265
8280
|
};
|
|
8266
|
-
async function pathExists(
|
|
8281
|
+
async function pathExists(p2) {
|
|
8267
8282
|
try {
|
|
8268
|
-
await access(
|
|
8283
|
+
await access(p2);
|
|
8269
8284
|
return true;
|
|
8270
8285
|
} catch {
|
|
8271
8286
|
return false;
|
|
8272
8287
|
}
|
|
8273
8288
|
}
|
|
8274
8289
|
__name(pathExists, "pathExists");
|
|
8275
|
-
function pathExistsSync(
|
|
8290
|
+
function pathExistsSync(p2) {
|
|
8276
8291
|
try {
|
|
8277
|
-
accessSync(
|
|
8292
|
+
accessSync(p2);
|
|
8278
8293
|
return true;
|
|
8279
8294
|
} catch {
|
|
8280
8295
|
return false;
|
|
@@ -8290,221 +8305,434 @@ var { Ansis, fg, bg, rgb, bgRgb, hex, bgHex, reset, inverse, hidden, visible, bo
|
|
|
8290
8305
|
// src/env-graph/lib/plugins.ts
|
|
8291
8306
|
var import_semver = __toESM(require_semver2(), 1);
|
|
8292
8307
|
|
|
8293
|
-
// ../../node_modules/.bun
|
|
8294
|
-
var
|
|
8295
|
-
|
|
8296
|
-
|
|
8297
|
-
|
|
8298
|
-
return
|
|
8299
|
-
}
|
|
8300
|
-
__name(x
|
|
8301
|
-
|
|
8302
|
-
|
|
8303
|
-
|
|
8304
|
-
|
|
8305
|
-
var
|
|
8306
|
-
var
|
|
8307
|
-
var
|
|
8308
|
-
var
|
|
8309
|
-
var
|
|
8310
|
-
var
|
|
8311
|
-
var
|
|
8312
|
-
|
|
8313
|
-
|
|
8314
|
-
|
|
8315
|
-
|
|
8316
|
-
|
|
8317
|
-
|
|
8318
|
-
|
|
8319
|
-
|
|
8320
|
-
|
|
8321
|
-
|
|
8322
|
-
|
|
8323
|
-
|
|
8324
|
-
|
|
8325
|
-
|
|
8326
|
-
|
|
8327
|
-
|
|
8328
|
-
|
|
8329
|
-
|
|
8330
|
-
|
|
8331
|
-
|
|
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;
|
|
8332
8388
|
break;
|
|
8333
8389
|
}
|
|
8334
|
-
|
|
8390
|
+
width += widthExtra;
|
|
8391
|
+
unmatchedStart = indexPrev;
|
|
8392
|
+
unmatchedEnd = index;
|
|
8393
|
+
index = indexPrev = LATIN_RE.lastIndex;
|
|
8335
8394
|
continue;
|
|
8336
8395
|
}
|
|
8337
|
-
|
|
8338
|
-
|
|
8339
|
-
|
|
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;
|
|
8340
8403
|
break;
|
|
8341
8404
|
}
|
|
8342
|
-
|
|
8405
|
+
width += ANSI_WIDTH;
|
|
8406
|
+
unmatchedStart = indexPrev;
|
|
8407
|
+
unmatchedEnd = index;
|
|
8408
|
+
index = indexPrev = ANSI_RE.lastIndex;
|
|
8343
8409
|
continue;
|
|
8344
8410
|
}
|
|
8345
|
-
|
|
8346
|
-
|
|
8347
|
-
|
|
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;
|
|
8348
8420
|
break;
|
|
8349
8421
|
}
|
|
8350
|
-
|
|
8422
|
+
width += widthExtra;
|
|
8423
|
+
unmatchedStart = indexPrev;
|
|
8424
|
+
unmatchedEnd = index;
|
|
8425
|
+
index = indexPrev = CONTROL_RE.lastIndex;
|
|
8351
8426
|
continue;
|
|
8352
8427
|
}
|
|
8353
|
-
|
|
8354
|
-
|
|
8355
|
-
|
|
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;
|
|
8356
8437
|
break;
|
|
8357
8438
|
}
|
|
8358
|
-
|
|
8439
|
+
width += widthExtra;
|
|
8440
|
+
unmatchedStart = indexPrev;
|
|
8441
|
+
unmatchedEnd = index;
|
|
8442
|
+
index = indexPrev = TAB_RE.lastIndex;
|
|
8359
8443
|
continue;
|
|
8360
8444
|
}
|
|
8361
|
-
|
|
8362
|
-
|
|
8363
|
-
|
|
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;
|
|
8364
8452
|
break;
|
|
8365
8453
|
}
|
|
8366
|
-
|
|
8454
|
+
width += EMOJI_WIDTH;
|
|
8455
|
+
unmatchedStart = indexPrev;
|
|
8456
|
+
unmatchedEnd = index;
|
|
8457
|
+
index = indexPrev = EMOJI_RE.lastIndex;
|
|
8367
8458
|
continue;
|
|
8368
8459
|
}
|
|
8369
|
-
|
|
8370
|
-
}
|
|
8371
|
-
return {
|
|
8372
|
-
|
|
8373
|
-
|
|
8374
|
-
|
|
8375
|
-
|
|
8376
|
-
|
|
8377
|
-
|
|
8378
|
-
var
|
|
8379
|
-
|
|
8380
|
-
|
|
8381
|
-
var
|
|
8382
|
-
|
|
8383
|
-
|
|
8384
|
-
|
|
8385
|
-
|
|
8386
|
-
|
|
8387
|
-
|
|
8388
|
-
|
|
8389
|
-
|
|
8390
|
-
|
|
8391
|
-
|
|
8392
|
-
|
|
8393
|
-
|
|
8394
|
-
|
|
8395
|
-
var
|
|
8396
|
-
var
|
|
8397
|
-
var
|
|
8398
|
-
var
|
|
8399
|
-
|
|
8400
|
-
|
|
8401
|
-
|
|
8402
|
-
|
|
8403
|
-
|
|
8404
|
-
|
|
8405
|
-
|
|
8406
|
-
|
|
8407
|
-
|
|
8408
|
-
|
|
8409
|
-
|
|
8410
|
-
|
|
8411
|
-
|
|
8412
|
-
|
|
8413
|
-
|
|
8414
|
-
if (
|
|
8415
|
-
|
|
8416
|
-
|
|
8417
|
-
|
|
8418
|
-
|
|
8419
|
-
|
|
8420
|
-
|
|
8421
|
-
|
|
8422
|
-
|
|
8423
|
-
|
|
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) ?? "");
|
|
8424
8620
|
continue;
|
|
8425
8621
|
}
|
|
8426
|
-
if (
|
|
8427
|
-
if (
|
|
8428
|
-
|
|
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) ?? "");
|
|
8429
8626
|
continue;
|
|
8430
8627
|
}
|
|
8431
|
-
|
|
8628
|
+
rows.push("");
|
|
8629
|
+
rowLength = 0;
|
|
8432
8630
|
}
|
|
8433
|
-
if (
|
|
8434
|
-
|
|
8631
|
+
if (rowLength + wordLength > columns && options.wordWrap === false) {
|
|
8632
|
+
wrapWord(rows, word, columns);
|
|
8633
|
+
rowLength = dist_default2(rows.at(-1) ?? "");
|
|
8435
8634
|
continue;
|
|
8436
8635
|
}
|
|
8437
|
-
|
|
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
|
-
|
|
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");
|
|
8466
8685
|
}
|
|
8467
|
-
__name(
|
|
8468
|
-
|
|
8469
|
-
|
|
8470
|
-
|
|
8471
|
-
|
|
8472
|
-
|
|
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;
|
|
8473
8701
|
return false;
|
|
8474
8702
|
}
|
|
8475
|
-
__name(
|
|
8476
|
-
function
|
|
8477
|
-
if (
|
|
8478
|
-
const
|
|
8479
|
-
`),
|
|
8480
|
-
`),
|
|
8481
|
-
for (let
|
|
8482
|
-
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 };
|
|
8483
8711
|
}
|
|
8484
|
-
__name(
|
|
8712
|
+
__name(j, "j");
|
|
8485
8713
|
globalThis.process.platform.startsWith("win");
|
|
8486
|
-
var
|
|
8487
|
-
function
|
|
8488
|
-
return
|
|
8714
|
+
var C = /* @__PURE__ */ Symbol("clack:cancel");
|
|
8715
|
+
function q(r) {
|
|
8716
|
+
return r === C;
|
|
8489
8717
|
}
|
|
8490
|
-
__name(
|
|
8491
|
-
function
|
|
8492
|
-
const
|
|
8493
|
-
|
|
8718
|
+
__name(q, "q");
|
|
8719
|
+
function w(r, t2) {
|
|
8720
|
+
const e = r;
|
|
8721
|
+
e.isTTY && e.setRawMode(t2);
|
|
8494
8722
|
}
|
|
8495
|
-
__name(
|
|
8496
|
-
var
|
|
8497
|
-
var
|
|
8498
|
-
function
|
|
8499
|
-
const
|
|
8500
|
-
return
|
|
8501
|
-
`).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(`
|
|
8502
8730
|
`);
|
|
8503
8731
|
}
|
|
8504
|
-
__name(
|
|
8505
|
-
var
|
|
8732
|
+
__name(R, "R");
|
|
8733
|
+
var p = class {
|
|
8506
8734
|
static {
|
|
8507
|
-
__name(this, "
|
|
8735
|
+
__name(this, "p");
|
|
8508
8736
|
}
|
|
8509
8737
|
input;
|
|
8510
8738
|
output;
|
|
@@ -8520,116 +8748,116 @@ var B = class {
|
|
|
8520
8748
|
error = "";
|
|
8521
8749
|
value;
|
|
8522
8750
|
userInput = "";
|
|
8523
|
-
constructor(
|
|
8524
|
-
const { input:
|
|
8525
|
-
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;
|
|
8526
8754
|
}
|
|
8527
8755
|
unsubscribe() {
|
|
8528
8756
|
this._subscribers.clear();
|
|
8529
8757
|
}
|
|
8530
|
-
setSubscriber(
|
|
8531
|
-
const
|
|
8532
|
-
|
|
8758
|
+
setSubscriber(t2, e) {
|
|
8759
|
+
const s = this._subscribers.get(t2) ?? [];
|
|
8760
|
+
s.push(e), this._subscribers.set(t2, s);
|
|
8533
8761
|
}
|
|
8534
|
-
on(
|
|
8535
|
-
this.setSubscriber(
|
|
8762
|
+
on(t2, e) {
|
|
8763
|
+
this.setSubscriber(t2, { cb: e });
|
|
8536
8764
|
}
|
|
8537
|
-
once(
|
|
8538
|
-
this.setSubscriber(
|
|
8765
|
+
once(t2, e) {
|
|
8766
|
+
this.setSubscriber(t2, { cb: e, once: true });
|
|
8539
8767
|
}
|
|
8540
|
-
emit(
|
|
8541
|
-
const
|
|
8542
|
-
for (const n of
|
|
8543
|
-
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();
|
|
8544
8772
|
}
|
|
8545
8773
|
prompt() {
|
|
8546
|
-
return new Promise((
|
|
8774
|
+
return new Promise((t2) => {
|
|
8547
8775
|
if (this._abortSignal) {
|
|
8548
|
-
if (this._abortSignal.aborted) return this.state = "cancel", this.close(),
|
|
8776
|
+
if (this._abortSignal.aborted) return this.state = "cancel", this.close(), t2(C);
|
|
8549
8777
|
this._abortSignal.addEventListener("abort", () => {
|
|
8550
8778
|
this.state = "cancel", this.close();
|
|
8551
8779
|
}, { once: true });
|
|
8552
8780
|
}
|
|
8553
|
-
this.rl =
|
|
8554
|
-
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);
|
|
8555
8783
|
}), this.once("cancel", () => {
|
|
8556
|
-
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);
|
|
8557
8785
|
});
|
|
8558
8786
|
});
|
|
8559
8787
|
}
|
|
8560
|
-
_isActionKey(
|
|
8561
|
-
return
|
|
8788
|
+
_isActionKey(t2, e) {
|
|
8789
|
+
return t2 === " ";
|
|
8562
8790
|
}
|
|
8563
|
-
_setValue(
|
|
8564
|
-
this.value =
|
|
8791
|
+
_setValue(t2) {
|
|
8792
|
+
this.value = t2, this.emit("value", this.value);
|
|
8565
8793
|
}
|
|
8566
|
-
_setUserInput(
|
|
8567
|
-
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);
|
|
8568
8796
|
}
|
|
8569
8797
|
_clearUserInput() {
|
|
8570
8798
|
this.rl?.write(null, { ctrl: true, name: "u" }), this._setUserInput("");
|
|
8571
8799
|
}
|
|
8572
|
-
onKeypress(
|
|
8573
|
-
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") {
|
|
8574
8802
|
if (this.opts.validate) {
|
|
8575
|
-
const
|
|
8576
|
-
|
|
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));
|
|
8577
8805
|
}
|
|
8578
8806
|
this.state !== "error" && (this.state = "submit");
|
|
8579
8807
|
}
|
|
8580
|
-
|
|
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();
|
|
8581
8809
|
}
|
|
8582
8810
|
close() {
|
|
8583
8811
|
this.input.unpipe(), this.input.removeListener("keypress", this.onKeypress), this.output.write(`
|
|
8584
|
-
`),
|
|
8812
|
+
`), w(this.input, false), this.rl?.close(), this.rl = void 0, this.emit(`${this.state}`, this.value), this.unsubscribe();
|
|
8585
8813
|
}
|
|
8586
8814
|
restoreCursor() {
|
|
8587
|
-
const
|
|
8815
|
+
const t2 = wrapAnsi(this._prevFrame, process.stdout.columns, { hard: true, trim: false }).split(`
|
|
8588
8816
|
`).length - 1;
|
|
8589
|
-
this.output.write(import_sisteransi.cursor.move(-999,
|
|
8817
|
+
this.output.write(import_sisteransi.cursor.move(-999, t2 * -1));
|
|
8590
8818
|
}
|
|
8591
8819
|
render() {
|
|
8592
|
-
const
|
|
8593
|
-
if (
|
|
8820
|
+
const t2 = wrapAnsi(this._render(this) ?? "", process.stdout.columns, { hard: true, trim: false });
|
|
8821
|
+
if (t2 !== this._prevFrame) {
|
|
8594
8822
|
if (this.state === "initial") this.output.write(import_sisteransi.cursor.hide);
|
|
8595
8823
|
else {
|
|
8596
|
-
const
|
|
8597
|
-
if (this.restoreCursor(),
|
|
8598
|
-
const
|
|
8599
|
-
let
|
|
8600
|
-
if (
|
|
8601
|
-
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;
|
|
8602
8830
|
return;
|
|
8603
8831
|
}
|
|
8604
|
-
if (
|
|
8605
|
-
this.output.write(import_sisteransi.cursor.move(0,
|
|
8606
|
-
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(`
|
|
8607
8835
|
`);
|
|
8608
|
-
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));
|
|
8609
8837
|
return;
|
|
8610
|
-
} else if (
|
|
8611
|
-
if (
|
|
8838
|
+
} else if (e.lines.length > 1) {
|
|
8839
|
+
if (i < n) o = i;
|
|
8612
8840
|
else {
|
|
8613
|
-
const
|
|
8614
|
-
|
|
8841
|
+
const h = o - n;
|
|
8842
|
+
h > 0 && this.output.write(import_sisteransi.cursor.move(0, h));
|
|
8615
8843
|
}
|
|
8616
8844
|
this.output.write(import_sisteransi.erase.down());
|
|
8617
|
-
const a2 =
|
|
8618
|
-
`).slice(
|
|
8845
|
+
const a2 = t2.split(`
|
|
8846
|
+
`).slice(o);
|
|
8619
8847
|
this.output.write(a2.join(`
|
|
8620
|
-
`)), this._prevFrame =
|
|
8848
|
+
`)), this._prevFrame = t2;
|
|
8621
8849
|
return;
|
|
8622
8850
|
}
|
|
8623
8851
|
}
|
|
8624
8852
|
this.output.write(import_sisteransi.erase.down());
|
|
8625
8853
|
}
|
|
8626
|
-
this.output.write(
|
|
8854
|
+
this.output.write(t2), this.state === "initial" && (this.state = "active"), this._prevFrame = t2;
|
|
8627
8855
|
}
|
|
8628
8856
|
}
|
|
8629
8857
|
};
|
|
8630
|
-
var
|
|
8858
|
+
var Q = class extends p {
|
|
8631
8859
|
static {
|
|
8632
|
-
__name(this, "
|
|
8860
|
+
__name(this, "Q");
|
|
8633
8861
|
}
|
|
8634
8862
|
get cursor() {
|
|
8635
8863
|
return this.value ? 0 : 1;
|
|
@@ -8637,19 +8865,19 @@ var kt = class extends B {
|
|
|
8637
8865
|
get _value() {
|
|
8638
8866
|
return this.cursor === 0;
|
|
8639
8867
|
}
|
|
8640
|
-
constructor(
|
|
8641
|
-
super(
|
|
8868
|
+
constructor(t2) {
|
|
8869
|
+
super(t2, false), this.value = !!t2.initialValue, this.on("userInput", () => {
|
|
8642
8870
|
this.value = this._value;
|
|
8643
|
-
}), this.on("confirm", (
|
|
8644
|
-
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();
|
|
8645
8873
|
}), this.on("cursor", () => {
|
|
8646
8874
|
this.value = !this.value;
|
|
8647
8875
|
});
|
|
8648
8876
|
}
|
|
8649
8877
|
};
|
|
8650
|
-
var
|
|
8878
|
+
var it = class extends p {
|
|
8651
8879
|
static {
|
|
8652
|
-
__name(this, "
|
|
8880
|
+
__name(this, "it");
|
|
8653
8881
|
}
|
|
8654
8882
|
options;
|
|
8655
8883
|
cursor = 0;
|
|
@@ -8657,37 +8885,37 @@ var Lt = class extends B {
|
|
|
8657
8885
|
return this.options[this.cursor].value;
|
|
8658
8886
|
}
|
|
8659
8887
|
get _enabledOptions() {
|
|
8660
|
-
return this.options.filter((
|
|
8888
|
+
return this.options.filter((t2) => t2.disabled !== true);
|
|
8661
8889
|
}
|
|
8662
8890
|
toggleAll() {
|
|
8663
|
-
const
|
|
8664
|
-
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);
|
|
8665
8893
|
}
|
|
8666
8894
|
toggleInvert() {
|
|
8667
|
-
const
|
|
8668
|
-
if (!
|
|
8669
|
-
const
|
|
8670
|
-
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);
|
|
8671
8899
|
}
|
|
8672
8900
|
toggleValue() {
|
|
8673
8901
|
this.value === void 0 && (this.value = []);
|
|
8674
|
-
const
|
|
8675
|
-
this.value =
|
|
8676
|
-
}
|
|
8677
|
-
constructor(
|
|
8678
|
-
super(
|
|
8679
|
-
const
|
|
8680
|
-
this.cursor = this.options[
|
|
8681
|
-
|
|
8682
|
-
}), this.on("cursor", (
|
|
8683
|
-
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) {
|
|
8684
8912
|
case "left":
|
|
8685
8913
|
case "up":
|
|
8686
|
-
this.cursor =
|
|
8914
|
+
this.cursor = d(this.cursor, -1, this.options);
|
|
8687
8915
|
break;
|
|
8688
8916
|
case "down":
|
|
8689
8917
|
case "right":
|
|
8690
|
-
this.cursor =
|
|
8918
|
+
this.cursor = d(this.cursor, 1, this.options);
|
|
8691
8919
|
break;
|
|
8692
8920
|
case "space":
|
|
8693
8921
|
this.toggleValue();
|
|
@@ -8696,9 +8924,9 @@ var Lt = class extends B {
|
|
|
8696
8924
|
});
|
|
8697
8925
|
}
|
|
8698
8926
|
};
|
|
8699
|
-
var
|
|
8927
|
+
var nt = class extends p {
|
|
8700
8928
|
static {
|
|
8701
|
-
__name(this, "
|
|
8929
|
+
__name(this, "nt");
|
|
8702
8930
|
}
|
|
8703
8931
|
options;
|
|
8704
8932
|
cursor = 0;
|
|
@@ -8708,330 +8936,161 @@ var Tt = class extends B {
|
|
|
8708
8936
|
changeValue() {
|
|
8709
8937
|
this.value = this._selectedValue.value;
|
|
8710
8938
|
}
|
|
8711
|
-
constructor(
|
|
8712
|
-
super(
|
|
8713
|
-
const
|
|
8714
|
-
this.cursor = this.options[
|
|
8715
|
-
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) {
|
|
8716
8944
|
case "left":
|
|
8717
8945
|
case "up":
|
|
8718
|
-
this.cursor =
|
|
8946
|
+
this.cursor = d(this.cursor, -1, this.options);
|
|
8719
8947
|
break;
|
|
8720
8948
|
case "down":
|
|
8721
8949
|
case "right":
|
|
8722
|
-
this.cursor =
|
|
8950
|
+
this.cursor = d(this.cursor, 1, this.options);
|
|
8723
8951
|
break;
|
|
8724
8952
|
}
|
|
8725
8953
|
this.changeValue();
|
|
8726
8954
|
});
|
|
8727
8955
|
}
|
|
8728
8956
|
};
|
|
8729
|
-
|
|
8730
|
-
// ../../node_modules/.bun/@clack+prompts@1.1.0/node_modules/@clack/prompts/dist/index.mjs
|
|
8731
8957
|
__toESM(require_src(), 1);
|
|
8732
|
-
function
|
|
8733
|
-
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";
|
|
8734
8960
|
}
|
|
8735
|
-
__name(
|
|
8736
|
-
var ee =
|
|
8737
|
-
var
|
|
8738
|
-
var
|
|
8739
|
-
var
|
|
8740
|
-
var
|
|
8741
|
-
var
|
|
8742
|
-
|
|
8743
|
-
var
|
|
8744
|
-
var
|
|
8745
|
-
|
|
8746
|
-
|
|
8747
|
-
var z2 =
|
|
8748
|
-
var H2 =
|
|
8749
|
-
|
|
8750
|
-
|
|
8751
|
-
|
|
8752
|
-
|
|
8753
|
-
|
|
8754
|
-
|
|
8755
|
-
|
|
8756
|
-
|
|
8757
|
-
|
|
8758
|
-
|
|
8759
|
-
|
|
8760
|
-
|
|
8761
|
-
|
|
8762
|
-
|
|
8763
|
-
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) => {
|
|
8764
8990
|
switch (e) {
|
|
8765
8991
|
case "initial":
|
|
8766
8992
|
case "active":
|
|
8767
|
-
return styleText("cyan",
|
|
8993
|
+
return styleText("cyan", _e);
|
|
8768
8994
|
case "cancel":
|
|
8769
|
-
return styleText("red",
|
|
8995
|
+
return styleText("red", oe);
|
|
8770
8996
|
case "error":
|
|
8771
|
-
return styleText("yellow",
|
|
8997
|
+
return styleText("yellow", ue);
|
|
8772
8998
|
case "submit":
|
|
8773
|
-
return styleText("green",
|
|
8999
|
+
return styleText("green", F);
|
|
8774
9000
|
}
|
|
8775
|
-
}, "
|
|
8776
|
-
var
|
|
9001
|
+
}, "V");
|
|
9002
|
+
var ye = /* @__PURE__ */ __name((e) => {
|
|
8777
9003
|
switch (e) {
|
|
8778
9004
|
case "initial":
|
|
8779
9005
|
case "active":
|
|
8780
|
-
return styleText("cyan",
|
|
9006
|
+
return styleText("cyan", d2);
|
|
8781
9007
|
case "cancel":
|
|
8782
|
-
return styleText("red",
|
|
9008
|
+
return styleText("red", d2);
|
|
8783
9009
|
case "error":
|
|
8784
|
-
return styleText("yellow",
|
|
9010
|
+
return styleText("yellow", d2);
|
|
8785
9011
|
case "submit":
|
|
8786
|
-
return styleText("green",
|
|
8787
|
-
}
|
|
8788
|
-
}, "
|
|
8789
|
-
var
|
|
8790
|
-
|
|
8791
|
-
|
|
8792
|
-
|
|
8793
|
-
|
|
8794
|
-
|
|
8795
|
-
|
|
8796
|
-
|
|
8797
|
-
var
|
|
8798
|
-
|
|
8799
|
-
|
|
8800
|
-
|
|
8801
|
-
let
|
|
8802
|
-
|
|
8803
|
-
|
|
8804
|
-
|
|
8805
|
-
|
|
8806
|
-
|
|
8807
|
-
|
|
8808
|
-
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) {
|
|
8809
|
-
y2 = true;
|
|
8810
|
-
break e;
|
|
8811
|
-
}
|
|
8812
|
-
F += M2.length, w += S2;
|
|
8813
|
-
}
|
|
8814
|
-
A = b = 0;
|
|
8815
|
-
}
|
|
8816
|
-
if (m >= d) break;
|
|
8817
|
-
if (ne.lastIndex = m, ne.test(e)) {
|
|
8818
|
-
if (F = ne.lastIndex - m, S2 = F * g, w + S2 > C && (v = Math.min(v, m + Math.floor((C - w) / g))), w + S2 > i) {
|
|
8819
|
-
y2 = true;
|
|
8820
|
-
break;
|
|
8821
|
-
}
|
|
8822
|
-
w += S2, A = $, b = m, m = $ = ne.lastIndex;
|
|
8823
|
-
continue;
|
|
8824
|
-
}
|
|
8825
|
-
if (we.lastIndex = m, we.test(e)) {
|
|
8826
|
-
if (w + u > C && (v = Math.min(v, m)), w + u > i) {
|
|
8827
|
-
y2 = true;
|
|
8828
|
-
break;
|
|
8829
|
-
}
|
|
8830
|
-
w += u, A = $, b = m, m = $ = we.lastIndex;
|
|
8831
|
-
continue;
|
|
8832
|
-
}
|
|
8833
|
-
if (re.lastIndex = m, re.test(e)) {
|
|
8834
|
-
if (F = re.lastIndex - m, S2 = F * l, w + S2 > C && (v = Math.min(v, m + Math.floor((C - w) / l))), w + S2 > i) {
|
|
8835
|
-
y2 = true;
|
|
8836
|
-
break;
|
|
8837
|
-
}
|
|
8838
|
-
w += S2, A = $, b = m, m = $ = re.lastIndex;
|
|
8839
|
-
continue;
|
|
8840
|
-
}
|
|
8841
|
-
if (ie.lastIndex = m, ie.test(e)) {
|
|
8842
|
-
if (F = ie.lastIndex - m, S2 = F * n, w + S2 > C && (v = Math.min(v, m + Math.floor((C - w) / n))), w + S2 > i) {
|
|
8843
|
-
y2 = true;
|
|
8844
|
-
break;
|
|
8845
|
-
}
|
|
8846
|
-
w += S2, A = $, b = m, m = $ = ie.lastIndex;
|
|
8847
|
-
continue;
|
|
8848
|
-
}
|
|
8849
|
-
if (Ae.lastIndex = m, Ae.test(e)) {
|
|
8850
|
-
if (w + p > C && (v = Math.min(v, m)), w + p > i) {
|
|
8851
|
-
y2 = true;
|
|
8852
|
-
break;
|
|
8853
|
-
}
|
|
8854
|
-
w += p, A = $, b = m, m = $ = Ae.lastIndex;
|
|
8855
|
-
continue;
|
|
8856
|
-
}
|
|
8857
|
-
m += 1;
|
|
8858
|
-
}
|
|
8859
|
-
return { width: y2 ? C : w, index: y2 ? v : d, truncated: y2, ellipsed: y2 && i >= o };
|
|
8860
|
-
}, "Le");
|
|
8861
|
-
var Et2 = { limit: 1 / 0, ellipsis: "", ellipsisWidth: 0 };
|
|
8862
|
-
var D2 = /* @__PURE__ */ __name((e, r = {}) => Le(e, Et2, r).width, "D");
|
|
8863
|
-
var ae = "\x1B";
|
|
8864
|
-
var je = "\x9B";
|
|
8865
|
-
var vt2 = 39;
|
|
8866
|
-
var Ce = "\x07";
|
|
8867
|
-
var ke = "[";
|
|
8868
|
-
var wt = "]";
|
|
8869
|
-
var Ve = "m";
|
|
8870
|
-
var Se = `${wt}8;;`;
|
|
8871
|
-
var He = new RegExp(`(?:\\${ke}(?<code>\\d+)m|\\${Se}(?<uri>.*)${Ce})`, "y");
|
|
8872
|
-
var At2 = /* @__PURE__ */ __name((e) => {
|
|
8873
|
-
if (e >= 30 && e <= 37 || e >= 90 && e <= 97) return 39;
|
|
8874
|
-
if (e >= 40 && e <= 47 || e >= 100 && e <= 107) return 49;
|
|
8875
|
-
if (e === 1 || e === 2) return 22;
|
|
8876
|
-
if (e === 3) return 23;
|
|
8877
|
-
if (e === 4) return 24;
|
|
8878
|
-
if (e === 7) return 27;
|
|
8879
|
-
if (e === 8) return 28;
|
|
8880
|
-
if (e === 9) return 29;
|
|
8881
|
-
if (e === 0) return 0;
|
|
8882
|
-
}, "At");
|
|
8883
|
-
var Ue = /* @__PURE__ */ __name((e) => `${ae}${ke}${e}${Ve}`, "Ue");
|
|
8884
|
-
var Ke = /* @__PURE__ */ __name((e) => `${ae}${Se}${e}${Ce}`, "Ke");
|
|
8885
|
-
var Ct2 = /* @__PURE__ */ __name((e) => e.map((r) => D2(r)), "Ct");
|
|
8886
|
-
var Ie = /* @__PURE__ */ __name((e, r, s) => {
|
|
8887
|
-
const i = r[Symbol.iterator]();
|
|
8888
|
-
let a2 = false, o = false, u = e.at(-1), l = u === void 0 ? 0 : D2(u), n = i.next(), c = i.next(), p = 0;
|
|
8889
|
-
for (; !n.done; ) {
|
|
8890
|
-
const f = n.value, g = D2(f);
|
|
8891
|
-
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;
|
|
8892
|
-
}
|
|
8893
|
-
u = e.at(-1), !l && u !== void 0 && u.length > 0 && e.length > 1 && (e[e.length - 2] += e.pop());
|
|
8894
|
-
}, "Ie");
|
|
8895
|
-
var St = /* @__PURE__ */ __name((e) => {
|
|
8896
|
-
const r = e.split(" ");
|
|
8897
|
-
let s = r.length;
|
|
8898
|
-
for (; s > 0 && !(D2(r[s - 1]) > 0); ) s--;
|
|
8899
|
-
return s === r.length ? e : r.slice(0, s).join(" ") + r.slice(s).join("");
|
|
8900
|
-
}, "St");
|
|
8901
|
-
var It2 = /* @__PURE__ */ __name((e, r, s = {}) => {
|
|
8902
|
-
if (s.trim !== false && e.trim() === "") return "";
|
|
8903
|
-
let i = "", a2, o;
|
|
8904
|
-
const u = e.split(" "), l = Ct2(u);
|
|
8905
|
-
let n = [""];
|
|
8906
|
-
for (const [$, m] of u.entries()) {
|
|
8907
|
-
s.trim !== false && (n[n.length - 1] = (n.at(-1) ?? "").trimStart());
|
|
8908
|
-
let d = D2(n.at(-1) ?? "");
|
|
8909
|
-
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) {
|
|
8910
|
-
const F = r - d, y2 = 1 + Math.floor((l[$] - F - 1) / r);
|
|
8911
|
-
Math.floor((l[$] - 1) / r) < y2 && n.push(""), Ie(n, m, r);
|
|
8912
|
-
continue;
|
|
8913
|
-
}
|
|
8914
|
-
if (d + l[$] > r && d > 0 && l[$] > 0) {
|
|
8915
|
-
if (s.wordWrap === false && d < r) {
|
|
8916
|
-
Ie(n, m, r);
|
|
8917
|
-
continue;
|
|
8918
|
-
}
|
|
8919
|
-
n.push("");
|
|
8920
|
-
}
|
|
8921
|
-
if (d + l[$] > r && s.wordWrap === false) {
|
|
8922
|
-
Ie(n, m, r);
|
|
8923
|
-
continue;
|
|
8924
|
-
}
|
|
8925
|
-
n[n.length - 1] += m;
|
|
8926
|
-
}
|
|
8927
|
-
s.trim !== false && (n = n.map(($) => St($)));
|
|
8928
|
-
const c = n.join(`
|
|
8929
|
-
`), p = c[Symbol.iterator]();
|
|
8930
|
-
let f = p.next(), g = p.next(), E = 0;
|
|
8931
|
-
for (; !f.done; ) {
|
|
8932
|
-
const $ = f.value, m = g.value;
|
|
8933
|
-
if (i += $, $ === ae || $ === je) {
|
|
8934
|
-
He.lastIndex = E + 1;
|
|
8935
|
-
const y2 = He.exec(c)?.groups;
|
|
8936
|
-
if (y2?.code !== void 0) {
|
|
8937
|
-
const v = Number.parseFloat(y2.code);
|
|
8938
|
-
a2 = v === vt2 ? void 0 : v;
|
|
8939
|
-
} else y2?.uri !== void 0 && (o = y2.uri.length === 0 ? void 0 : y2.uri);
|
|
8940
|
-
}
|
|
8941
|
-
const d = a2 ? At2(a2) : void 0;
|
|
8942
|
-
m === `
|
|
8943
|
-
` ? (o && (i += Ke("")), a2 && d && (i += Ue(d))) : $ === `
|
|
8944
|
-
` && (a2 && d && (i += Ue(a2)), o && (i += Ke(o))), E += $.length, f = g, g = p.next();
|
|
8945
|
-
}
|
|
8946
|
-
return i;
|
|
8947
|
-
}, "It");
|
|
8948
|
-
function J2(e, r, s) {
|
|
8949
|
-
return String(e).normalize().replaceAll(`\r
|
|
8950
|
-
`, `
|
|
8951
|
-
`).split(`
|
|
8952
|
-
`).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(`
|
|
8953
9034
|
`);
|
|
8954
|
-
|
|
8955
|
-
|
|
8956
|
-
|
|
8957
|
-
|
|
8958
|
-
|
|
8959
|
-
|
|
8960
|
-
|
|
8961
|
-
|
|
8962
|
-
|
|
8963
|
-
|
|
8964
|
-
|
|
8965
|
-
|
|
8966
|
-
|
|
8967
|
-
|
|
8968
|
-
let E = f < r.length && g > 0, $ = f < r.length && g + f < r.length;
|
|
8969
|
-
const m = Math.min(g + f, r.length), d = [];
|
|
8970
|
-
let F = 0;
|
|
8971
|
-
E && F++, $ && F++;
|
|
8972
|
-
const y2 = g + (E ? 1 : 0), v = m - ($ ? 1 : 0);
|
|
8973
|
-
for (let A = y2; A < v; A++) {
|
|
8974
|
-
const b = J2(s(r[A], A === e), l, { hard: true, trim: false }).split(`
|
|
8975
|
-
`);
|
|
8976
|
-
d.push(b), F += b.length;
|
|
8977
|
-
}
|
|
8978
|
-
if (F > p) {
|
|
8979
|
-
let A = 0, b = 0, w = F;
|
|
8980
|
-
const S2 = e - y2, T2 = /* @__PURE__ */ __name((M2, O2) => bt2(d, w, M2, O2, p), "T");
|
|
8981
|
-
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));
|
|
8982
|
-
}
|
|
8983
|
-
const C = [];
|
|
8984
|
-
E && C.push(c);
|
|
8985
|
-
for (const A of d) for (const b of A) C.push(b);
|
|
8986
|
-
return $ && C.push(c), C;
|
|
8987
|
-
}, "X");
|
|
8988
|
-
({ light: I2("\u2500", "-"), heavy: I2("\u2501", "="), block: I2("\u2588", "#") });
|
|
8989
|
-
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(`
|
|
8990
9049
|
`) ? e.split(`
|
|
8991
|
-
`).map((s) =>
|
|
8992
|
-
`) :
|
|
8993
|
-
var
|
|
8994
|
-
const
|
|
8995
|
-
const
|
|
8996
|
-
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) {
|
|
8997
9056
|
case "disabled":
|
|
8998
|
-
return `${styleText("gray", H2)} ${
|
|
9057
|
+
return `${styleText("gray", H2)} ${re(u2, (n) => styleText("gray", n))}${s.hint ? ` ${styleText("dim", `(${s.hint ?? "disabled"})`)}` : ""}`;
|
|
8999
9058
|
case "selected":
|
|
9000
|
-
return `${
|
|
9059
|
+
return `${re(u2, (n) => styleText("dim", n))}`;
|
|
9001
9060
|
case "active":
|
|
9002
|
-
return `${styleText("green", z2)} ${
|
|
9061
|
+
return `${styleText("green", z2)} ${u2}${s.hint ? ` ${styleText("dim", `(${s.hint})`)}` : ""}`;
|
|
9003
9062
|
case "cancelled":
|
|
9004
|
-
return `${
|
|
9063
|
+
return `${re(u2, (n) => styleText(["strikethrough", "dim"], n))}`;
|
|
9005
9064
|
default:
|
|
9006
|
-
return `${styleText("dim", H2)} ${
|
|
9065
|
+
return `${styleText("dim", H2)} ${re(u2, (n) => styleText("dim", n))}`;
|
|
9007
9066
|
}
|
|
9008
|
-
}, "
|
|
9009
|
-
return new
|
|
9010
|
-
const s = e.withGuide ??
|
|
9011
|
-
` : ""}${
|
|
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}
|
|
9012
9071
|
`;
|
|
9013
9072
|
switch (this.state) {
|
|
9014
9073
|
case "submit": {
|
|
9015
|
-
const
|
|
9016
|
-
return `${
|
|
9074
|
+
const c2 = s ? `${styleText("gray", d2)} ` : "", a2 = R(e.output, i(this.options[this.cursor], "selected"), c2);
|
|
9075
|
+
return `${o}${a2}`;
|
|
9017
9076
|
}
|
|
9018
9077
|
case "cancel": {
|
|
9019
|
-
const
|
|
9020
|
-
return `${
|
|
9021
|
-
${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)}` : ""}`;
|
|
9022
9081
|
}
|
|
9023
9082
|
default: {
|
|
9024
|
-
const
|
|
9025
|
-
`).length,
|
|
9026
|
-
return `${
|
|
9027
|
-
${
|
|
9028
|
-
${
|
|
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}
|
|
9029
9088
|
`;
|
|
9030
9089
|
}
|
|
9031
9090
|
}
|
|
9032
9091
|
} }).prompt();
|
|
9033
|
-
}, "
|
|
9034
|
-
`${styleText("gray",
|
|
9092
|
+
}, "_t");
|
|
9093
|
+
`${styleText("gray", d2)} `;
|
|
9035
9094
|
function getUserVarlockDir() {
|
|
9036
9095
|
const home = os.homedir();
|
|
9037
9096
|
if (process.env.XDG_CONFIG_HOME) {
|
|
@@ -9045,9 +9104,9 @@ function getUserVarlockDir() {
|
|
|
9045
9104
|
}
|
|
9046
9105
|
__name(getUserVarlockDir, "getUserVarlockDir");
|
|
9047
9106
|
function isUnicodeSupported() {
|
|
9048
|
-
const { env } =
|
|
9107
|
+
const { env } = P2;
|
|
9049
9108
|
const { TERM, TERM_PROGRAM } = env;
|
|
9050
|
-
if (
|
|
9109
|
+
if (P2.platform !== "win32") {
|
|
9051
9110
|
return TERM !== "linux";
|
|
9052
9111
|
}
|
|
9053
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";
|
|
@@ -9056,7 +9115,7 @@ __name(isUnicodeSupported, "isUnicodeSupported");
|
|
|
9056
9115
|
|
|
9057
9116
|
// src/cli/helpers/prompts.ts
|
|
9058
9117
|
var unicode = isUnicodeSupported();
|
|
9059
|
-
var unicodeOr = /* @__PURE__ */ __name((
|
|
9118
|
+
var unicodeOr = /* @__PURE__ */ __name((c2, fallback) => unicode ? c2 : fallback, "unicodeOr");
|
|
9060
9119
|
var S_STEP_ACTIVE = unicodeOr("\u25C6", "*");
|
|
9061
9120
|
var S_STEP_CANCEL = unicodeOr("\u25A0", "x");
|
|
9062
9121
|
var S_STEP_ERROR = unicodeOr("\u25B2", "x");
|
|
@@ -9115,7 +9174,7 @@ var limitOptions = /* @__PURE__ */ __name((params) => {
|
|
|
9115
9174
|
var confirm = /* @__PURE__ */ __name((opts) => {
|
|
9116
9175
|
const active = opts.active ?? "Yes";
|
|
9117
9176
|
const inactive = opts.inactive ?? "No";
|
|
9118
|
-
return new
|
|
9177
|
+
return new Q({
|
|
9119
9178
|
active,
|
|
9120
9179
|
inactive,
|
|
9121
9180
|
input: opts.input,
|
|
@@ -9156,7 +9215,7 @@ var select = /* @__PURE__ */ __name((opts) => {
|
|
|
9156
9215
|
return `${ansis_default.dim(S_RADIO_INACTIVE)} ${ansis_default.dim(label)}`;
|
|
9157
9216
|
}
|
|
9158
9217
|
}, "opt");
|
|
9159
|
-
return new
|
|
9218
|
+
return new nt({
|
|
9160
9219
|
options: opts.options,
|
|
9161
9220
|
input: opts.input,
|
|
9162
9221
|
output: opts.output,
|
|
@@ -9210,7 +9269,7 @@ var multiselect = /* @__PURE__ */ __name((opts) => {
|
|
|
9210
9269
|
}
|
|
9211
9270
|
return `${ansis_default.dim(S_CHECKBOX_INACTIVE)} ${ansis_default.dim(label)}`;
|
|
9212
9271
|
}, "opt");
|
|
9213
|
-
return new
|
|
9272
|
+
return new it({
|
|
9214
9273
|
options: opts.options,
|
|
9215
9274
|
input: opts.input,
|
|
9216
9275
|
output: opts.output,
|
|
@@ -9578,7 +9637,7 @@ var VarlockPlugin = class {
|
|
|
9578
9637
|
const { initDecorator, params } = this.standardVars;
|
|
9579
9638
|
const resolved = Object.entries(params).map(([paramName, { key, dataType }]) => {
|
|
9580
9639
|
const keys = Array.isArray(key) ? key : [key];
|
|
9581
|
-
const matchedKey = keys.find((
|
|
9640
|
+
const matchedKey = keys.find((k) => graph.overrideValues[k]);
|
|
9582
9641
|
return {
|
|
9583
9642
|
paramName,
|
|
9584
9643
|
matchedKey,
|
|
@@ -9766,7 +9825,7 @@ async function isPluginCached(url) {
|
|
|
9766
9825
|
}
|
|
9767
9826
|
__name(isPluginCached, "isPluginCached");
|
|
9768
9827
|
async function downloadPlugin(url) {
|
|
9769
|
-
const
|
|
9828
|
+
const exec4 = promisify(exec);
|
|
9770
9829
|
const cacheDir = path3.join(getUserVarlockDir(), "plugins-cache");
|
|
9771
9830
|
const indexPath = path3.join(cacheDir, "index.json");
|
|
9772
9831
|
await fs3.mkdir(cacheDir, { recursive: true });
|
|
@@ -9797,7 +9856,7 @@ async function downloadPlugin(url) {
|
|
|
9797
9856
|
});
|
|
9798
9857
|
const tmpExtractDir = path3.join(cacheDir, `tmp-extract-${crypto2.randomBytes(8).toString("hex")}`);
|
|
9799
9858
|
await fs3.mkdir(tmpExtractDir);
|
|
9800
|
-
await
|
|
9859
|
+
await exec4(`tar -xzf ${tmpTgz} -C ${tmpExtractDir}`);
|
|
9801
9860
|
let pkgJsonPath = path3.join(tmpExtractDir, "package", "package.json");
|
|
9802
9861
|
let pluginRoot = path3.join(tmpExtractDir, "package");
|
|
9803
9862
|
if (!await fs3.stat(pkgJsonPath).then(() => true, () => false)) {
|
|
@@ -9955,7 +10014,7 @@ ${ansis_default.yellow("\u26A0")} Third-party plugin download requested
|
|
|
9955
10014
|
inactive: "No, cancel",
|
|
9956
10015
|
initialValue: false
|
|
9957
10016
|
});
|
|
9958
|
-
if (
|
|
10017
|
+
if (q(confirmed) || !confirmed) {
|
|
9959
10018
|
throw new SchemaError(`Third-party plugin "${moduleName}" download cancelled`);
|
|
9960
10019
|
}
|
|
9961
10020
|
}
|
|
@@ -10271,7 +10330,7 @@ var EnvGraphDataSource2 = class {
|
|
|
10271
10330
|
}
|
|
10272
10331
|
if (this.graph.virtualImports) {
|
|
10273
10332
|
if (importPath.endsWith("/")) {
|
|
10274
|
-
const dirExists = Object.keys(this.graph.virtualImports).some((
|
|
10333
|
+
const dirExists = Object.keys(this.graph.virtualImports).some((p2) => p2.startsWith(fullImportPath));
|
|
10275
10334
|
if (!dirExists && allowMissing) continue;
|
|
10276
10335
|
if (!dirExists) {
|
|
10277
10336
|
this._loadingError = new Error(`Virtual directory import ${fullImportPath} not found`);
|
|
@@ -10386,11 +10445,11 @@ var EnvGraphDataSource2 = class {
|
|
|
10386
10445
|
get schemaErrors() {
|
|
10387
10446
|
return my_dash_default.compact([
|
|
10388
10447
|
...this._schemaErrors,
|
|
10389
|
-
...this.rootDecorators.flatMap((
|
|
10448
|
+
...this.rootDecorators.flatMap((d3) => d3.schemaErrors)
|
|
10390
10449
|
]);
|
|
10391
10450
|
}
|
|
10392
10451
|
get resolutionErrors() {
|
|
10393
|
-
return my_dash_default.compact([...this.rootDecorators.flatMap((
|
|
10452
|
+
return my_dash_default.compact([...this.rootDecorators.flatMap((d3) => d3._executionError)]);
|
|
10394
10453
|
}
|
|
10395
10454
|
get isValid() {
|
|
10396
10455
|
return !this.loadingError && !this.schemaErrors.some((e) => !e.isWarning) && !this.resolutionErrors.length;
|
|
@@ -10398,7 +10457,7 @@ var EnvGraphDataSource2 = class {
|
|
|
10398
10457
|
configItemDefs = {};
|
|
10399
10458
|
decorators = [];
|
|
10400
10459
|
getRootDecorators(decName) {
|
|
10401
|
-
return this.decorators.filter((
|
|
10460
|
+
return this.decorators.filter((d3) => d3.name === decName);
|
|
10402
10461
|
}
|
|
10403
10462
|
getRootDecoratorSimpleValue(decName) {
|
|
10404
10463
|
const decorators = this.getRootDecorators(decName);
|
|
@@ -10408,10 +10467,10 @@ var EnvGraphDataSource2 = class {
|
|
|
10408
10467
|
}
|
|
10409
10468
|
rootDecorators = [];
|
|
10410
10469
|
getRootDec(decName) {
|
|
10411
|
-
return this.rootDecorators.find((
|
|
10470
|
+
return this.rootDecorators.find((d3) => d3.name === decName && !d3.isFunctionCall);
|
|
10412
10471
|
}
|
|
10413
10472
|
getRootDecFns(decName) {
|
|
10414
|
-
return this.rootDecorators.filter((
|
|
10473
|
+
return this.rootDecorators.filter((d3) => d3.name === decName && d3.isFunctionCall);
|
|
10415
10474
|
}
|
|
10416
10475
|
};
|
|
10417
10476
|
var ImportAliasSource = class extends EnvGraphDataSource2 {
|
|
@@ -10419,6 +10478,7 @@ var ImportAliasSource = class extends EnvGraphDataSource2 {
|
|
|
10419
10478
|
super();
|
|
10420
10479
|
this.original = original;
|
|
10421
10480
|
}
|
|
10481
|
+
original;
|
|
10422
10482
|
static {
|
|
10423
10483
|
__name(this, "ImportAliasSource");
|
|
10424
10484
|
}
|
|
@@ -10524,7 +10584,7 @@ var DotEnvFileDataSource = class extends FileBasedDataSource {
|
|
|
10524
10584
|
if (this.loadingError) return;
|
|
10525
10585
|
if (!this.parsedFile) throw new Error("Failed to parse .env file");
|
|
10526
10586
|
if (!this.graph) throw new Error("expected graph to be set");
|
|
10527
|
-
this.rootDecorators = this.parsedFile.decoratorsArray.map((
|
|
10587
|
+
this.rootDecorators = this.parsedFile.decoratorsArray.map((d3) => new RootDecoratorInstance2(this, d3));
|
|
10528
10588
|
this._validateDecoratorPlacement(this.parsedFile);
|
|
10529
10589
|
for (const item of this.parsedFile.configItems) {
|
|
10530
10590
|
this.configItemDefs[item.key] = {
|
|
@@ -10581,6 +10641,7 @@ var DirectoryDataSource = class extends EnvGraphDataSource2 {
|
|
|
10581
10641
|
super();
|
|
10582
10642
|
this.basePath = basePath;
|
|
10583
10643
|
}
|
|
10644
|
+
basePath;
|
|
10584
10645
|
static {
|
|
10585
10646
|
__name(this, "DirectoryDataSource");
|
|
10586
10647
|
}
|
|
@@ -10672,6 +10733,7 @@ var MultiplePathsContainerDataSource = class extends EnvGraphDataSource2 {
|
|
|
10672
10733
|
super();
|
|
10673
10734
|
this.paths = paths;
|
|
10674
10735
|
}
|
|
10736
|
+
paths;
|
|
10675
10737
|
static {
|
|
10676
10738
|
__name(this, "MultiplePathsContainerDataSource");
|
|
10677
10739
|
}
|
|
@@ -10814,6 +10876,9 @@ var ItemDecoratorInstance = class extends DecoratorInstance {
|
|
|
10814
10876
|
this.dataSource = dataSource;
|
|
10815
10877
|
this.parsedDecorator = parsedDecorator;
|
|
10816
10878
|
}
|
|
10879
|
+
configItem;
|
|
10880
|
+
dataSource;
|
|
10881
|
+
parsedDecorator;
|
|
10817
10882
|
static {
|
|
10818
10883
|
__name(this, "ItemDecoratorInstance");
|
|
10819
10884
|
}
|
|
@@ -10828,6 +10893,8 @@ var RootDecoratorInstance2 = class extends DecoratorInstance {
|
|
|
10828
10893
|
this.dataSource = dataSource;
|
|
10829
10894
|
this.parsedDecorator = parsedDecorator;
|
|
10830
10895
|
}
|
|
10896
|
+
dataSource;
|
|
10897
|
+
parsedDecorator;
|
|
10831
10898
|
static {
|
|
10832
10899
|
__name(this, "RootDecoratorInstance");
|
|
10833
10900
|
}
|
|
@@ -11013,7 +11080,7 @@ var builtInRootDecorators = [
|
|
|
11013
11080
|
dataSource._loadingError = err instanceof SchemaError ? err : new SchemaError(err);
|
|
11014
11081
|
return;
|
|
11015
11082
|
}
|
|
11016
|
-
const { ConfigItem: ConfigItem2 } = await import('./config-item-
|
|
11083
|
+
const { ConfigItem: ConfigItem2 } = await import('./config-item-IK3DUE5F.js');
|
|
11017
11084
|
for (const [key, entry] of Object.entries(entries)) {
|
|
11018
11085
|
const existsInSchema = key in graph.configSchema;
|
|
11019
11086
|
if (!existsInSchema && !createMissing) {
|
|
@@ -11095,6 +11162,9 @@ var Resolver = class {
|
|
|
11095
11162
|
this.dataSource = dataSource;
|
|
11096
11163
|
if (this.def.inferredType) this.inferredType = this.def.inferredType;
|
|
11097
11164
|
}
|
|
11165
|
+
arrArgs;
|
|
11166
|
+
objArgs;
|
|
11167
|
+
dataSource;
|
|
11098
11168
|
static {
|
|
11099
11169
|
__name(this, "Resolver");
|
|
11100
11170
|
}
|
|
@@ -11271,6 +11341,7 @@ var StaticValueResolver = class extends Resolver {
|
|
|
11271
11341
|
this.inferredType = typeof _staticValue;
|
|
11272
11342
|
}
|
|
11273
11343
|
}
|
|
11344
|
+
_staticValue;
|
|
11274
11345
|
static {
|
|
11275
11346
|
__name(this, "StaticValueResolver");
|
|
11276
11347
|
}
|
|
@@ -11329,6 +11400,7 @@ var ErrorResolver = class extends Resolver {
|
|
|
11329
11400
|
this.err = err;
|
|
11330
11401
|
this._schemaErrors.push(err);
|
|
11331
11402
|
}
|
|
11403
|
+
err;
|
|
11332
11404
|
static {
|
|
11333
11405
|
__name(this, "ErrorResolver");
|
|
11334
11406
|
}
|
|
@@ -11720,6 +11792,8 @@ var EnvGraphDataType = class {
|
|
|
11720
11792
|
this.def = def;
|
|
11721
11793
|
this.factory = factory;
|
|
11722
11794
|
}
|
|
11795
|
+
def;
|
|
11796
|
+
factory;
|
|
11723
11797
|
static {
|
|
11724
11798
|
__name(this, "EnvGraphDataType");
|
|
11725
11799
|
}
|
|
@@ -11841,8 +11915,8 @@ var NumberDataType = createEnvGraphDataType(
|
|
|
11841
11915
|
if (settings?.isInt === true || settings?.precision === 0) {
|
|
11842
11916
|
numVal = Math.round(numVal);
|
|
11843
11917
|
} else if (settings?.precision) {
|
|
11844
|
-
const
|
|
11845
|
-
numVal = Math.round(numVal *
|
|
11918
|
+
const p2 = 10 ** settings.precision;
|
|
11919
|
+
numVal = Math.round(numVal * p2) / p2;
|
|
11846
11920
|
}
|
|
11847
11921
|
return numVal;
|
|
11848
11922
|
},
|
|
@@ -12101,6 +12175,8 @@ var ConfigItem = class {
|
|
|
12101
12175
|
this.envGraph = envGraph;
|
|
12102
12176
|
this.key = key;
|
|
12103
12177
|
}
|
|
12178
|
+
envGraph;
|
|
12179
|
+
key;
|
|
12104
12180
|
static {
|
|
12105
12181
|
__name(this, "ConfigItem");
|
|
12106
12182
|
}
|
|
@@ -12175,7 +12251,7 @@ var ConfigItem = class {
|
|
|
12175
12251
|
* This is useful for explaining where a value comes from regardless of overrides.
|
|
12176
12252
|
*/
|
|
12177
12253
|
get activeValueDef() {
|
|
12178
|
-
const hasInternalResolver = this._internalDefs.some((
|
|
12254
|
+
const hasInternalResolver = this._internalDefs.some((d3) => d3.itemDef.resolver);
|
|
12179
12255
|
for (const def of this.defs) {
|
|
12180
12256
|
if (def.itemDef.resolver) {
|
|
12181
12257
|
if (hasInternalResolver && def.itemDef.resolver instanceof StaticValueResolver && !def.itemDef.resolver.staticValue) {
|
|
@@ -12189,7 +12265,7 @@ var ConfigItem = class {
|
|
|
12189
12265
|
if (this.isOverridden) {
|
|
12190
12266
|
return new StaticValueResolver(this.envGraph.overrideValues[this.key]);
|
|
12191
12267
|
}
|
|
12192
|
-
const hasInternalResolver = this._internalDefs.some((
|
|
12268
|
+
const hasInternalResolver = this._internalDefs.some((d3) => d3.itemDef.resolver);
|
|
12193
12269
|
for (const def of this.defs) {
|
|
12194
12270
|
if (def.itemDef.resolver) {
|
|
12195
12271
|
if (hasInternalResolver && def.itemDef.resolver instanceof StaticValueResolver && !def.itemDef.resolver.staticValue) {
|
|
@@ -12224,7 +12300,7 @@ var ConfigItem = class {
|
|
|
12224
12300
|
return this.valueResolver?.schemaErrors || [];
|
|
12225
12301
|
}
|
|
12226
12302
|
get decoratorSchemaErrors() {
|
|
12227
|
-
return my_dash_default.values(this.allDecorators).flatMap((
|
|
12303
|
+
return my_dash_default.values(this.allDecorators).flatMap((d3) => d3.schemaErrors);
|
|
12228
12304
|
}
|
|
12229
12305
|
isProcessed = false;
|
|
12230
12306
|
async process() {
|
|
@@ -12243,10 +12319,10 @@ var ConfigItem = class {
|
|
|
12243
12319
|
}
|
|
12244
12320
|
for (const def of this.defs) {
|
|
12245
12321
|
def.itemDef.decorators = def.itemDef.parsedDecorators?.map(
|
|
12246
|
-
(
|
|
12322
|
+
(d3) => new ItemDecoratorInstance(this, def.source, d3)
|
|
12247
12323
|
);
|
|
12248
12324
|
const decKeysInThisDef = /* @__PURE__ */ new Set();
|
|
12249
|
-
const allDecsInThisDef = def.itemDef.decorators?.map((
|
|
12325
|
+
const allDecsInThisDef = def.itemDef.decorators?.map((d3) => d3.name);
|
|
12250
12326
|
for (const dec of def.itemDef.decorators || []) {
|
|
12251
12327
|
await dec.process();
|
|
12252
12328
|
this.allDecorators?.push(dec);
|
|
@@ -12301,7 +12377,7 @@ var ConfigItem = class {
|
|
|
12301
12377
|
),
|
|
12302
12378
|
...my_dash_default.values(this.effectiveDecoratorFns).flatMap(
|
|
12303
12379
|
(decArr) => decArr.flatMap(
|
|
12304
|
-
(
|
|
12380
|
+
(d3) => d3.decValueResolver?.deps || []
|
|
12305
12381
|
)
|
|
12306
12382
|
)
|
|
12307
12383
|
]);
|
|
@@ -12330,7 +12406,7 @@ var ConfigItem = class {
|
|
|
12330
12406
|
async processRequired() {
|
|
12331
12407
|
try {
|
|
12332
12408
|
for (const def of this.defs) {
|
|
12333
|
-
const requiredDecs = def.itemDef.decorators?.filter((
|
|
12409
|
+
const requiredDecs = def.itemDef.decorators?.filter((d3) => d3.name === "required" || d3.name === "optional") || [];
|
|
12334
12410
|
const requiredDec = requiredDecs[0];
|
|
12335
12411
|
if (requiredDec) {
|
|
12336
12412
|
const usingOptional = requiredDec.name === "optional";
|
|
@@ -12389,7 +12465,7 @@ var ConfigItem = class {
|
|
|
12389
12465
|
async processSensitive() {
|
|
12390
12466
|
const sensitiveFromDataType = this.dataType?.isSensitive;
|
|
12391
12467
|
for (const def of this.defs) {
|
|
12392
|
-
const sensitiveDecs = def.itemDef.decorators?.filter((
|
|
12468
|
+
const sensitiveDecs = def.itemDef.decorators?.filter((d3) => d3.name === "sensitive" || d3.name === "public") || [];
|
|
12393
12469
|
const sensitiveDec = sensitiveDecs[0];
|
|
12394
12470
|
if (sensitiveDec) {
|
|
12395
12471
|
const usingPublic = sensitiveDec.name === "public";
|
|
@@ -12566,7 +12642,7 @@ var ConfigItem = class {
|
|
|
12566
12642
|
let isRequiredDynamic = false;
|
|
12567
12643
|
try {
|
|
12568
12644
|
for (const def of defs) {
|
|
12569
|
-
const requiredDecs = def.itemDef.decorators?.filter((
|
|
12645
|
+
const requiredDecs = def.itemDef.decorators?.filter((d3) => d3.name === "required" || d3.name === "optional") || [];
|
|
12570
12646
|
const requiredDec = requiredDecs[0];
|
|
12571
12647
|
if (requiredDec) {
|
|
12572
12648
|
const usingOptional = requiredDec.name === "optional";
|
|
@@ -12612,7 +12688,7 @@ var ConfigItem = class {
|
|
|
12612
12688
|
try {
|
|
12613
12689
|
let foundSensitive = false;
|
|
12614
12690
|
for (const def of defs) {
|
|
12615
|
-
const sensitiveDecs = def.itemDef.decorators?.filter((
|
|
12691
|
+
const sensitiveDecs = def.itemDef.decorators?.filter((d3) => d3.name === "sensitive" || d3.name === "public") || [];
|
|
12616
12692
|
const sensitiveDec = sensitiveDecs[0];
|
|
12617
12693
|
if (sensitiveDec) {
|
|
12618
12694
|
const usingPublic = sensitiveDec.name === "public";
|
|
@@ -12654,7 +12730,7 @@ var ConfigItem = class {
|
|
|
12654
12730
|
}
|
|
12655
12731
|
let icon;
|
|
12656
12732
|
for (const def of defs) {
|
|
12657
|
-
const iconDec = def.itemDef.decorators?.find((
|
|
12733
|
+
const iconDec = def.itemDef.decorators?.find((d3) => d3.name === "icon");
|
|
12658
12734
|
if (iconDec) {
|
|
12659
12735
|
try {
|
|
12660
12736
|
icon = await iconDec.resolve();
|
|
@@ -12672,7 +12748,7 @@ var ConfigItem = class {
|
|
|
12672
12748
|
}
|
|
12673
12749
|
}
|
|
12674
12750
|
for (const def of defs) {
|
|
12675
|
-
const docsUrlDec = def.itemDef.decorators?.find((
|
|
12751
|
+
const docsUrlDec = def.itemDef.decorators?.find((d3) => d3.name === "docsUrl");
|
|
12676
12752
|
if (docsUrlDec) {
|
|
12677
12753
|
try {
|
|
12678
12754
|
const val = await docsUrlDec.resolve();
|
|
@@ -12680,7 +12756,7 @@ var ConfigItem = class {
|
|
|
12680
12756
|
} catch {
|
|
12681
12757
|
}
|
|
12682
12758
|
}
|
|
12683
|
-
const docsFnDecs = def.itemDef.decorators?.filter((
|
|
12759
|
+
const docsFnDecs = def.itemDef.decorators?.filter((d3) => d3.name === "docs" && d3.isFunctionCall) || [];
|
|
12684
12760
|
for (const docsDec of docsFnDecs) {
|
|
12685
12761
|
try {
|
|
12686
12762
|
const decVal = await docsDec.resolve();
|
|
@@ -12708,6 +12784,6 @@ var ConfigItem = class {
|
|
|
12708
12784
|
}
|
|
12709
12785
|
};
|
|
12710
12786
|
|
|
12711
|
-
export { ConfigItem,
|
|
12712
|
-
//# sourceMappingURL=chunk-
|
|
12713
|
-
//# 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
|