@sanohiro/casty 0.5.0 → 0.5.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/bin/casty +1 -1
- package/bin/casty.js +13 -0
- package/package.json +2 -2
package/bin/casty
CHANGED
package/bin/casty.js
CHANGED
|
@@ -1,6 +1,19 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
// casty - TTY web browser using raw CDP and Kitty graphics protocol
|
|
3
3
|
|
|
4
|
+
import { execFileSync } from 'node:child_process';
|
|
5
|
+
import { fileURLToPath } from 'node:url';
|
|
6
|
+
import { dirname, join } from 'node:path';
|
|
7
|
+
|
|
8
|
+
// Ensure Chrome is installed (runs shell script that handles download/update)
|
|
9
|
+
const __bin = dirname(fileURLToPath(import.meta.url));
|
|
10
|
+
try {
|
|
11
|
+
execFileSync('bash', [join(__bin, 'casty')], { stdio: 'inherit' });
|
|
12
|
+
} catch (err) {
|
|
13
|
+
// Shell script prints its own errors — exit if Chrome not available
|
|
14
|
+
if (err.status) process.exit(err.status);
|
|
15
|
+
}
|
|
16
|
+
|
|
4
17
|
import { startBrowser, setupPage, startScreencast, stopScreencast } from '../lib/browser.js';
|
|
5
18
|
import { sendFrame, resetFrameCache, clearScreen, hideCursor, showCursor, cleanup as cleanupTmp, transport } from '../lib/kitty.js';
|
|
6
19
|
import { enableMouse, disableMouse, startInputHandling } from '../lib/input.js';
|
package/package.json
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sanohiro/casty",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.1",
|
|
4
4
|
"description": "TTY web browser using raw CDP and Kitty graphics protocol",
|
|
5
5
|
"main": "bin/casty.js",
|
|
6
6
|
"bin": {
|
|
7
|
-
"casty": "bin/casty"
|
|
7
|
+
"casty": "bin/casty.js"
|
|
8
8
|
},
|
|
9
9
|
"files": [
|
|
10
10
|
"bin/",
|