@kaynooo/cli-workspace 0.10.2 → 0.10.3
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/cli.js +9 -2
- package/dist/sweep-cli.js +9 -2
- package/package.json +2 -2
package/dist/cli.js
CHANGED
|
@@ -2045,6 +2045,14 @@ function parseKeys(input, paste = { active: false }, ctrls = []) {
|
|
|
2045
2045
|
});
|
|
2046
2046
|
}
|
|
2047
2047
|
|
|
2048
|
+
// ../kit/src/redraw.ts
|
|
2049
|
+
var SYNC_START = "\x1B[?2026h";
|
|
2050
|
+
var SYNC_END = "\x1B[?2026l";
|
|
2051
|
+
function overwrite(lines, columns) {
|
|
2052
|
+
return lines.map((line) => textWidth(line) < columns ? `${line}\x1B[K` : `\x1B[2K${line}`).join(`
|
|
2053
|
+
`);
|
|
2054
|
+
}
|
|
2055
|
+
|
|
2048
2056
|
// ../kit/src/prompt.ts
|
|
2049
2057
|
var PROMPT_KEYS = new Set(["up", "down", "pageup", "pagedown", "home", "end", "enter", "cancel", "erase"]);
|
|
2050
2058
|
function readKeys(input, paste = { active: false }) {
|
|
@@ -2082,8 +2090,7 @@ async function ask(question, { hint, terminal = process21 }, render, press) {
|
|
|
2082
2090
|
const columns = () => stderr.columns || 80;
|
|
2083
2091
|
const draw = (state, last = false) => {
|
|
2084
2092
|
const frame = render(colors, state, { columns: columns(), rows: stderr.rows || 24 });
|
|
2085
|
-
stderr.write(
|
|
2086
|
-
`)}${last || frame.length < 2 ? "" : `\x1B[${frame.length - 1}A`}${last ? "" : "\r"}`);
|
|
2093
|
+
stderr.write(`${SYNC_START}\r${overwrite(frame, columns())}\x1B[0J${last || frame.length < 2 ? "" : `\x1B[${frame.length - 1}A`}${last ? "" : "\r"}${SYNC_END}`);
|
|
2087
2094
|
current = state;
|
|
2088
2095
|
};
|
|
2089
2096
|
const redraw = () => draw(current);
|
package/dist/sweep-cli.js
CHANGED
|
@@ -1508,6 +1508,14 @@ function parseKeys(input, paste = { active: false }, ctrls = []) {
|
|
|
1508
1508
|
});
|
|
1509
1509
|
}
|
|
1510
1510
|
|
|
1511
|
+
// ../kit/src/redraw.ts
|
|
1512
|
+
var SYNC_START = "\x1B[?2026h";
|
|
1513
|
+
var SYNC_END = "\x1B[?2026l";
|
|
1514
|
+
function overwrite(lines, columns) {
|
|
1515
|
+
return lines.map((line) => textWidth(line) < columns ? `${line}\x1B[K` : `\x1B[2K${line}`).join(`
|
|
1516
|
+
`);
|
|
1517
|
+
}
|
|
1518
|
+
|
|
1511
1519
|
// ../kit/src/prompt.ts
|
|
1512
1520
|
var PROMPT_KEYS = new Set(["up", "down", "pageup", "pagedown", "home", "end", "enter", "cancel", "erase"]);
|
|
1513
1521
|
function readKeys(input, paste = { active: false }) {
|
|
@@ -1545,8 +1553,7 @@ async function ask(question, { hint, terminal = process18 }, render, press) {
|
|
|
1545
1553
|
const columns = () => stderr.columns || 80;
|
|
1546
1554
|
const draw = (state, last = false) => {
|
|
1547
1555
|
const frame = render(colors, state, { columns: columns(), rows: stderr.rows || 24 });
|
|
1548
|
-
stderr.write(
|
|
1549
|
-
`)}${last || frame.length < 2 ? "" : `\x1B[${frame.length - 1}A`}${last ? "" : "\r"}`);
|
|
1556
|
+
stderr.write(`${SYNC_START}\r${overwrite(frame, columns())}\x1B[0J${last || frame.length < 2 ? "" : `\x1B[${frame.length - 1}A`}${last ? "" : "\r"}${SYNC_END}`);
|
|
1550
1557
|
current = state;
|
|
1551
1558
|
};
|
|
1552
1559
|
const redraw = () => draw(current);
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kaynooo/cli-workspace",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.10.
|
|
4
|
+
"version": "0.10.3",
|
|
5
5
|
"description": "ws, repos, sweep, audit: the repositories of the workspace that need attention, the folders worth reclaiming and their known vulnerabilities.",
|
|
6
6
|
"author": "Kaynooo <contact@kaynooo.fr>",
|
|
7
7
|
"license": "MIT",
|
|
@@ -34,6 +34,6 @@
|
|
|
34
34
|
"audit": "$npm_execpath src/audit-cli.ts"
|
|
35
35
|
},
|
|
36
36
|
"devDependencies": {
|
|
37
|
-
"@kaynooo/cli-kit": "0.38.
|
|
37
|
+
"@kaynooo/cli-kit": "0.38.4"
|
|
38
38
|
}
|
|
39
39
|
}
|