@archastro/tui-shot 0.1.0 → 0.2.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/README.md +5 -7
- package/dist/shot.js +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -16,18 +16,16 @@ when using Ink mode:
|
|
|
16
16
|
|
|
17
17
|
```bash
|
|
18
18
|
npm install --save-dev ink@^7.1 react@^19
|
|
19
|
-
npx
|
|
20
|
-
npx
|
|
21
|
-
npx
|
|
19
|
+
npx astroshot install-browser
|
|
20
|
+
npx astroshot init ink
|
|
21
|
+
npx astroshot init pty
|
|
22
22
|
```
|
|
23
23
|
|
|
24
24
|
Then capture either boundary:
|
|
25
25
|
|
|
26
26
|
```bash
|
|
27
|
-
npx
|
|
28
|
-
|
|
29
|
-
npx --@archastro:registry=https://registry.npmjs.org \
|
|
30
|
-
@archastro/astroshot pty ./pty.shot.yaml -o ./ratatui.png
|
|
27
|
+
npx astroshot ink ./ink.shot.tsx -o ./ink.png
|
|
28
|
+
npx astroshot pty ./pty.shot.yaml -o ./ratatui.png
|
|
31
29
|
```
|
|
32
30
|
|
|
33
31
|
On Linux hosts missing Chromium's system libraries, install the browser with
|
package/dist/shot.js
CHANGED
|
@@ -22,7 +22,7 @@ async function browserFor(headed) {
|
|
|
22
22
|
catch (error) {
|
|
23
23
|
const detail = error instanceof Error ? error.message : String(error);
|
|
24
24
|
if (detail.includes("Executable doesn't exist")) {
|
|
25
|
-
throw new Error("Chromium is not installed. Run `npx
|
|
25
|
+
throw new Error("Chromium is not installed. Run `npx astroshot install-browser` and retry.", { cause: error });
|
|
26
26
|
}
|
|
27
27
|
throw error;
|
|
28
28
|
}
|