@sanohiro/casty 0.5.2 → 0.5.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/bin/casty CHANGED
@@ -197,4 +197,8 @@ if needs_update; then
197
197
  fi
198
198
  fi
199
199
 
200
- # Called from casty.js just ensures Chrome is available
200
+ # When called from casty.js, CASTY_ENSURE_CHROME is set just return
201
+ # When called directly (./bin/casty), launch the app
202
+ if [ -z "$CASTY_ENSURE_CHROME" ]; then
203
+ exec node "$CASTY_DIR/bin/casty.js" "$@"
204
+ fi
package/bin/casty.js CHANGED
@@ -8,7 +8,10 @@ import { dirname, join } from 'node:path';
8
8
  // Ensure Chrome is installed (runs shell script that handles download/update)
9
9
  const __bin = dirname(fileURLToPath(import.meta.url));
10
10
  try {
11
- execFileSync('bash', [join(__bin, 'casty')], { stdio: 'inherit' });
11
+ execFileSync('bash', [join(__bin, 'casty')], {
12
+ stdio: 'inherit',
13
+ env: { ...process.env, CASTY_ENSURE_CHROME: '1' },
14
+ });
12
15
  } catch (err) {
13
16
  // Shell script prints its own errors — exit if Chrome not available
14
17
  if (err.status) process.exit(err.status);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sanohiro/casty",
3
- "version": "0.5.2",
3
+ "version": "0.5.3",
4
4
  "description": "TTY web browser using raw CDP and Kitty graphics protocol",
5
5
  "main": "bin/casty.js",
6
6
  "bin": {