@kaynooo/cli-check 0.18.3 → 0.18.4

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 CHANGED
@@ -1165,7 +1165,7 @@ var {Glob } = globalThis.Bun;
1165
1165
  var SESSION_FILES = new Glob("*.json");
1166
1166
  var ACCOUNT_DIRS = new Glob("*/sessions");
1167
1167
  // package.json
1168
- var version = "0.18.3";
1168
+ var version = "0.18.4";
1169
1169
 
1170
1170
  // src/check.ts
1171
1171
  import { writeFile as writeFile3 } from "fs/promises";
package/dist/errs-cli.js CHANGED
@@ -1165,7 +1165,7 @@ var {Glob } = globalThis.Bun;
1165
1165
  var SESSION_FILES = new Glob("*.json");
1166
1166
  var ACCOUNT_DIRS = new Glob("*/sessions");
1167
1167
  // package.json
1168
- var version = "0.18.3";
1168
+ var version = "0.18.4";
1169
1169
 
1170
1170
  // src/errs.ts
1171
1171
  import { relative as relative2 } from "path";
package/dist/fix-cli.js CHANGED
@@ -1165,7 +1165,7 @@ var {Glob } = globalThis.Bun;
1165
1165
  var SESSION_FILES = new Glob("*.json");
1166
1166
  var ACCOUNT_DIRS = new Glob("*/sessions");
1167
1167
  // package.json
1168
- var version = "0.18.3";
1168
+ var version = "0.18.4";
1169
1169
 
1170
1170
  // src/fix.ts
1171
1171
  import { existsSync as existsSync5, statSync as statSync2 } from "fs";
package/dist/j-cli.js CHANGED
@@ -1165,7 +1165,7 @@ var {Glob } = globalThis.Bun;
1165
1165
  var SESSION_FILES = new Glob("*.json");
1166
1166
  var ACCOUNT_DIRS = new Glob("*/sessions");
1167
1167
  // package.json
1168
- var version = "0.18.3";
1168
+ var version = "0.18.4";
1169
1169
 
1170
1170
  // src/j.ts
1171
1171
  import process22 from "process";
@@ -1448,6 +1448,14 @@ import { openSync as openSync2 } from "fs";
1448
1448
  import process18 from "process";
1449
1449
  import tty from "tty";
1450
1450
 
1451
+ // ../kit/src/redraw.ts
1452
+ var SYNC_START = "\x1B[?2026h";
1453
+ var SYNC_END = "\x1B[?2026l";
1454
+ function overwrite(lines, columns) {
1455
+ return lines.map((line) => textWidth(line) < columns ? `${line}\x1B[K` : `\x1B[2K${line}`).join(`
1456
+ `);
1457
+ }
1458
+
1451
1459
  // ../kit/src/picker/preview.ts
1452
1460
  import process17 from "process";
1453
1461
 
@@ -1719,14 +1727,13 @@ async function select(rows, settings, terminal = openTerminal()) {
1719
1727
  if (restored)
1720
1728
  return;
1721
1729
  const layout = layoutFor({ columns: terminal.columns, rows: terminal.rows }, settings.height, settings.preview !== undefined, settings.previewPosition);
1722
- let frame = HIDE_CURSOR;
1730
+ let frame = SYNC_START + HIDE_CURSOR;
1723
1731
  if (reserved !== layout.height || clear) {
1724
1732
  frame += CLEAR_BELOW + `
1725
1733
  `.repeat(layout.height - 1) + up(layout.height - 1);
1726
1734
  reserved = layout.height;
1727
1735
  }
1728
- frame += `\r${render(state, layout, theme, preview).map((line) => `\x1B[2K${line}`).join(`
1729
- `)}${up(layout.height - 1)}\r\x1B[${caretColumn(state, layout)}G${CARET}\r`;
1736
+ frame += `\r${overwrite(render(state, layout, theme, preview), terminal.columns)}${up(layout.height - 1)}\r\x1B[${caretColumn(state, layout)}G${CARET}\r${SYNC_END}`;
1730
1737
  terminal.write(frame);
1731
1738
  }
1732
1739
  function pageSize() {
@@ -1974,8 +1981,7 @@ async function ask(question, { hint, terminal = process20 }, render, press) {
1974
1981
  const columns = () => stderr.columns || 80;
1975
1982
  const draw = (state, last = false) => {
1976
1983
  const frame = render(colors, state, { columns: columns(), rows: stderr.rows || 24 });
1977
- stderr.write(`\r\x1B[0J${frame.join(`
1978
- `)}${last || frame.length < 2 ? "" : `\x1B[${frame.length - 1}A`}${last ? "" : "\r"}`);
1984
+ stderr.write(`${SYNC_START}\r${overwrite(frame, columns())}\x1B[0J${last || frame.length < 2 ? "" : `\x1B[${frame.length - 1}A`}${last ? "" : "\r"}${SYNC_END}`);
1979
1985
  current = state;
1980
1986
  };
1981
1987
  const redraw = () => draw(current);
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@kaynooo/cli-check",
3
3
  "type": "module",
4
- "version": "0.18.3",
4
+ "version": "0.18.4",
5
5
  "description": "check, fix and errs: run a repo's check, typecheck, lint and test steps or its fixers, inside its docker compose service when one mounts the folder, showing only what failed with each full output saved to a file, and turn tsc, eslint, bun test, vitest, playwright, phpunit, phpstan and php-cs-fixer logs into file:line:col errors.",
6
6
  "author": "Kaynooo <contact@kaynooo.fr>",
7
7
  "license": "MIT",
@@ -34,6 +34,6 @@
34
34
  "j": "$npm_execpath src/j-cli.ts"
35
35
  },
36
36
  "devDependencies": {
37
- "@kaynooo/cli-kit": "0.38.2"
37
+ "@kaynooo/cli-kit": "0.38.4"
38
38
  }
39
39
  }