@enke.dev/logbox 0.0.2 → 0.0.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/README.md +6 -6
- package/dist/cli.mjs +2 -2
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -6,11 +6,11 @@ wrapped command's output scrolls above it, unaltered — colors, spinners and al
|
|
|
6
6
|
```
|
|
7
7
|
[dev:docs] vite v7.1.0 ready in 431 ms
|
|
8
8
|
[dev:components] build started…
|
|
9
|
-
╭─ dev servers
|
|
10
|
-
│ docs
|
|
11
|
-
│ components (web)
|
|
12
|
-
│ components (react)
|
|
13
|
-
|
|
9
|
+
╭─ dev servers ──────────────────────────────────────────────────────╮
|
|
10
|
+
│ docs........................................https://localhost:5173 │
|
|
11
|
+
│ components (web)............................https://localhost:5174 │
|
|
12
|
+
│ components (react)..........................https://localhost:5175 │
|
|
13
|
+
╰────────────────────────────────────────────────────────────────────╯
|
|
14
14
|
```
|
|
15
15
|
|
|
16
16
|
## tl;dr
|
|
@@ -36,7 +36,7 @@ Typical use is a `package.json` script:
|
|
|
36
36
|
}
|
|
37
37
|
```
|
|
38
38
|
|
|
39
|
-
<img src="https://enke-dev.github.io/logbox/logbox.gif" alt="logbox demo" width="100%">
|
|
39
|
+
<img src="https://enke-dev.github.io/logbox/logbox.gif" alt="logbox demo" width="100%" style="max-width: 456px">
|
|
40
40
|
|
|
41
41
|
## How it works
|
|
42
42
|
|
package/dist/cli.mjs
CHANGED
|
@@ -5,7 +5,7 @@ import process3, { argv, stderr as stderr2, stdout as stdout2 } from "node:proce
|
|
|
5
5
|
// package.json
|
|
6
6
|
var package_default = {
|
|
7
7
|
name: "@enke.dev/logbox",
|
|
8
|
-
version: "0.0.
|
|
8
|
+
version: "0.0.4",
|
|
9
9
|
license: "MIT",
|
|
10
10
|
packageManager: "bun@1.3.14",
|
|
11
11
|
publishConfig: {
|
|
@@ -343,7 +343,7 @@ function runWithBox(command, config) {
|
|
|
343
343
|
const lines = renderBox({ title, rows, columns: size().columns });
|
|
344
344
|
const top = Math.max(1, size().rows - lines.length + 1);
|
|
345
345
|
const box = lines.map((line, index) => `${cursorTo(top + index)}${CLEAR_LINE}${line}`).join("");
|
|
346
|
-
stdout.write(`${SAVE_CURSOR}${box}${RESTORE_CURSOR}`);
|
|
346
|
+
stdout.write(`${SAVE_CURSOR}${setScrollRegion(1, scrollBottom())}${box}${RESTORE_CURSOR}`);
|
|
347
347
|
};
|
|
348
348
|
let scheduled;
|
|
349
349
|
const scheduleBox = () => {
|