@baton-dx/cli 0.5.0 → 0.6.0
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/{context-detection-C7T1evnW.mjs → context-detection-D9yccWot.mjs} +17 -17
- package/dist/context-detection-D9yccWot.mjs.map +1 -0
- package/dist/{create-Cx1nCS3X.mjs → create-Y2IeW_fK.mjs} +3 -3
- package/dist/{create-Cx1nCS3X.mjs.map → create-Y2IeW_fK.mjs.map} +1 -1
- package/dist/index.mjs +123 -6
- package/dist/index.mjs.map +1 -1
- package/dist/{list-BsAASsXi.mjs → list-D3woEF2B.mjs} +3 -3
- package/dist/{list-BsAASsXi.mjs.map → list-D3woEF2B.mjs.map} +1 -1
- package/dist/{prompt-C7kAOs-S.mjs → prompt-CLnET8eQ.mjs} +8 -8
- package/dist/prompt-CLnET8eQ.mjs.map +1 -0
- package/dist/{remove-36qv7yQ3.mjs → remove-CsxkkNiu.mjs} +2 -2
- package/dist/{remove-36qv7yQ3.mjs.map → remove-CsxkkNiu.mjs.map} +1 -1
- package/dist/{src-n95I0s2u.mjs → src-BVo3M5-4.mjs} +100 -3
- package/dist/src-BVo3M5-4.mjs.map +1 -0
- package/package.json +1 -1
- package/dist/context-detection-C7T1evnW.mjs.map +0 -1
- package/dist/prompt-C7kAOs-S.mjs.map +0 -1
- package/dist/src-n95I0s2u.mjs.map +0 -1
|
@@ -3,11 +3,11 @@ import { createRequire } from "node:module";
|
|
|
3
3
|
import { access } from "node:fs/promises";
|
|
4
4
|
import { dirname, join, sep } from "node:path";
|
|
5
5
|
import { formatWithOptions, stripVTControlCharacters } from "node:util";
|
|
6
|
-
import
|
|
6
|
+
import g$1, { stdin, stdout } from "node:process";
|
|
7
7
|
import * as tty from "node:tty";
|
|
8
8
|
import { ReadStream } from "node:tty";
|
|
9
9
|
import * as k from "node:readline";
|
|
10
|
-
import
|
|
10
|
+
import f from "node:readline";
|
|
11
11
|
import { existsSync, lstatSync, readdirSync } from "node:fs";
|
|
12
12
|
|
|
13
13
|
//#region \0rolldown/runtime.js
|
|
@@ -695,7 +695,7 @@ const r = Object.create(null), i = (e) => globalThis.process?.env || import.meta
|
|
|
695
695
|
const e = i(true);
|
|
696
696
|
return Object.keys(e);
|
|
697
697
|
}
|
|
698
|
-
}), t = typeof process < "u" && process.env && process.env.NODE_ENV || "", f = [
|
|
698
|
+
}), t = typeof process < "u" && process.env && process.env.NODE_ENV || "", f$1 = [
|
|
699
699
|
["APPVEYOR"],
|
|
700
700
|
[
|
|
701
701
|
"AWS_AMPLIFY",
|
|
@@ -787,7 +787,7 @@ const r = Object.create(null), i = (e) => globalThis.process?.env || import.meta
|
|
|
787
787
|
]
|
|
788
788
|
];
|
|
789
789
|
function b() {
|
|
790
|
-
if (globalThis.process?.env) for (const e of f) {
|
|
790
|
+
if (globalThis.process?.env) for (const e of f$1) {
|
|
791
791
|
const s = e[1] || e[0];
|
|
792
792
|
if (globalThis.process?.env[s]) return {
|
|
793
793
|
name: e[0].toLowerCase(),
|
|
@@ -819,10 +819,10 @@ new Proxy(y$1, { get(e, s) {
|
|
|
819
819
|
if (s in e) return e[s];
|
|
820
820
|
if (s in _$1) return _$1[s];
|
|
821
821
|
} });
|
|
822
|
-
const c = globalThis.process?.release?.name === "node", O$1 = !!globalThis.Bun || !!globalThis.process?.versions?.bun, D$1 = !!globalThis.Deno, L$1 = !!globalThis.fastly, S$1 = !!globalThis.Netlify, u = !!globalThis.EdgeRuntime, N$
|
|
822
|
+
const c = globalThis.process?.release?.name === "node", O$1 = !!globalThis.Bun || !!globalThis.process?.versions?.bun, D$1 = !!globalThis.Deno, L$1 = !!globalThis.fastly, S$1 = !!globalThis.Netlify, u = !!globalThis.EdgeRuntime, N$1 = globalThis.navigator?.userAgent === "Cloudflare-Workers", F = [
|
|
823
823
|
[S$1, "netlify"],
|
|
824
824
|
[u, "edge-light"],
|
|
825
|
-
[N$
|
|
825
|
+
[N$1, "workerd"],
|
|
826
826
|
[L$1, "fastly"],
|
|
827
827
|
[D$1, "deno"],
|
|
828
828
|
[O$1, "bun"],
|
|
@@ -888,9 +888,9 @@ function stringWidth$1(string, options = {}) {
|
|
|
888
888
|
return width;
|
|
889
889
|
}
|
|
890
890
|
function isUnicodeSupported() {
|
|
891
|
-
const { env } =
|
|
891
|
+
const { env } = g$1;
|
|
892
892
|
const { TERM, TERM_PROGRAM } = env;
|
|
893
|
-
if (
|
|
893
|
+
if (g$1.platform !== "win32") return TERM !== "linux";
|
|
894
894
|
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";
|
|
895
895
|
}
|
|
896
896
|
const TYPE_COLOR_MAP = {
|
|
@@ -977,7 +977,7 @@ function createConsola(options = {}) {
|
|
|
977
977
|
defaults: { level },
|
|
978
978
|
stdout: process.stdout,
|
|
979
979
|
stderr: process.stderr,
|
|
980
|
-
prompt: (...args) => import("./prompt-
|
|
980
|
+
prompt: (...args) => import("./prompt-CLnET8eQ.mjs").then((m) => m.prompt(...args)),
|
|
981
981
|
reporters: options.reporters || [options.fancy ?? !(T$1 || R$1) ? new FancyReporter() : new BasicReporter()],
|
|
982
982
|
...options
|
|
983
983
|
});
|
|
@@ -8389,7 +8389,7 @@ var x$1 = class {
|
|
|
8389
8389
|
this.state = "cancel", this.close();
|
|
8390
8390
|
}, { once: !0 });
|
|
8391
8391
|
}
|
|
8392
|
-
this.rl =
|
|
8392
|
+
this.rl = f.createInterface({
|
|
8393
8393
|
input: this.input,
|
|
8394
8394
|
tabSize: 2,
|
|
8395
8395
|
prompt: "",
|
|
@@ -8760,7 +8760,7 @@ var $t$1 = class extends x$1 {
|
|
|
8760
8760
|
//#endregion
|
|
8761
8761
|
//#region ../../node_modules/.bun/@clack+prompts@1.0.1/node_modules/@clack/prompts/dist/index.mjs
|
|
8762
8762
|
function me() {
|
|
8763
|
-
return
|
|
8763
|
+
return g$1.platform !== "win32" ? g$1.env.TERM !== "linux" : !!g$1.env.CI || !!g$1.env.WT_SESSION || !!g$1.env.TERMINUS_SUBLIME || g$1.env.ConEmuTask === "{cmd::Cmder}" || g$1.env.TERM_PROGRAM === "Terminus-Sublime" || g$1.env.TERM_PROGRAM === "vscode" || g$1.env.TERM === "xterm-256color" || g$1.env.TERM === "alacritty" || g$1.env.TERMINAL_EMULATOR === "JetBrains-JediTerm";
|
|
8764
8764
|
}
|
|
8765
8765
|
const et = me(), ct = () => process.env.CI === "true", Mt = (t) => t.isTTY === !0, C = (t, r) => et ? t : r, Rt = C("◆", "*"), dt = C("■", "x"), $t = C("▲", "x"), V = C("◇", "o"), ht = C("┌", "T"), d = C("│", "|"), x = C("└", "—"), Ot = C("┐", "T"), Pt = C("┘", "—"), Q = C("●", ">"), H = C("○", " "), st = C("◻", "[•]"), U = C("◼", "[+]"), q = C("◻", "[ ]"), Nt = C("▪", "•"), rt = C("─", "-"), mt = C("╮", "+"), Wt = C("├", "+"), pt = C("╯", "+"), gt = C("╰", "+"), Lt = C("╭", "+"), ft = C("●", "•"), Ft = C("◆", "*"), yt = C("▲", "!"), Et = C("■", "x"), W = (t) => {
|
|
8766
8766
|
switch (t) {
|
|
@@ -8851,7 +8851,7 @@ const et = me(), ct = () => process.env.CI === "true", Mt = (t) => t.isTTY === !
|
|
|
8851
8851
|
limit: Infinity,
|
|
8852
8852
|
ellipsis: "",
|
|
8853
8853
|
ellipsisWidth: 0
|
|
8854
|
-
}, M = (t, r = {}) => jt(t, Ee, r).width, ot
|
|
8854
|
+
}, M = (t, r = {}) => jt(t, Ee, r).width, ot = "\x1B", Gt = "", ve = 39, Ct = "\x07", kt = "[", Ae = "]", Vt = "m", St = `${Ae}8;;`, Ht = new RegExp(`(?:\\${kt}(?<code>\\d+)m|\\${St}(?<uri>.*)${Ct})`, "y"), we = (t) => {
|
|
8855
8855
|
if (t >= 30 && t <= 37 || t >= 90 && t <= 97) return 39;
|
|
8856
8856
|
if (t >= 40 && t <= 47 || t >= 100 && t <= 107) return 49;
|
|
8857
8857
|
if (t === 1 || t === 2) return 22;
|
|
@@ -8861,12 +8861,12 @@ const et = me(), ct = () => process.env.CI === "true", Mt = (t) => t.isTTY === !
|
|
|
8861
8861
|
if (t === 8) return 28;
|
|
8862
8862
|
if (t === 9) return 29;
|
|
8863
8863
|
if (t === 0) return 0;
|
|
8864
|
-
}, Ut = (t) => `${ot
|
|
8864
|
+
}, Ut = (t) => `${ot}${kt}${t}${Vt}`, Kt = (t) => `${ot}${St}${t}${Ct}`, Ce = (t) => t.map((r) => M(r)), It = (t, r, s) => {
|
|
8865
8865
|
const i = r[Symbol.iterator]();
|
|
8866
8866
|
let a = !1, o = !1, u = t.at(-1), l = u === void 0 ? 0 : M(u), n = i.next(), c = i.next(), g = 0;
|
|
8867
8867
|
for (; !n.done;) {
|
|
8868
8868
|
const F = n.value, p = M(F);
|
|
8869
|
-
l + p <= s ? t[t.length - 1] += F : (t.push(F), l = 0), (F === ot
|
|
8869
|
+
l + p <= s ? t[t.length - 1] += F : (t.push(F), l = 0), (F === ot || F === Gt) && (a = !0, o = r.startsWith(St, g + 1)), a ? o ? F === Ct && (a = !1, o = !1) : F === Vt && (a = !1) : (l += p, l === s && !c.done && (t.push(""), l = 0)), n = c, c = i.next(), g += F.length;
|
|
8870
8870
|
}
|
|
8871
8871
|
u = t.at(-1), !l && u !== void 0 && u.length > 0 && t.length > 1 && (t[t.length - 2] += t.pop());
|
|
8872
8872
|
}, Se = (t) => {
|
|
@@ -8906,7 +8906,7 @@ const et = me(), ct = () => process.env.CI === "true", Mt = (t) => t.isTTY === !
|
|
|
8906
8906
|
let F = g.next(), p = g.next(), E = 0;
|
|
8907
8907
|
for (; !F.done;) {
|
|
8908
8908
|
const $ = F.value, m = p.value;
|
|
8909
|
-
if (i += $, $ === ot
|
|
8909
|
+
if (i += $, $ === ot || $ === Gt) {
|
|
8910
8910
|
Ht.lastIndex = E + 1;
|
|
8911
8911
|
const f = Ht.exec(c)?.groups;
|
|
8912
8912
|
if (f?.code !== void 0) {
|
|
@@ -9400,7 +9400,7 @@ ${import_picocolors.default.cyan(x)}
|
|
|
9400
9400
|
`), o = a.reduce((n, c) => Math.max(M(c), n), 0);
|
|
9401
9401
|
return J(t, r - (a.map(s).reduce((n, c) => Math.max(M(c), n), 0) - o), i);
|
|
9402
9402
|
}, Ve = (t = "", r = "", s) => {
|
|
9403
|
-
const i = s?.output ??
|
|
9403
|
+
const i = s?.output ?? g$1.stdout, a = s?.withGuide ?? _.withGuide, o = s?.format ?? Ge, u = [
|
|
9404
9404
|
"",
|
|
9405
9405
|
...ke(t, rt$1(i) - 6, o).split(`
|
|
9406
9406
|
`).map(o),
|
|
@@ -9867,4 +9867,4 @@ async function findSourceRoot(cwd = process.cwd(), options) {
|
|
|
9867
9867
|
|
|
9868
9868
|
//#endregion
|
|
9869
9869
|
export { __commonJSMin as _, Ne as a, Ve as c, bt as d, je as f, runMain as g, defineCommand as h, Le as i, We as l, require_dist as m, isInSourceRepo as n, R as o, Ct$1 as p, Je as r, Re as s, findSourceRoot as t, Ze as u, __require as v, __toESM as y };
|
|
9870
|
-
//# sourceMappingURL=context-detection-
|
|
9870
|
+
//# sourceMappingURL=context-detection-D9yccWot.mjs.map
|