create-bridgething 0.6.0 → 0.7.0

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-bridgething",
3
- "version": "0.6.0",
3
+ "version": "0.7.0",
4
4
  "type": "module",
5
5
  "description": "Scaffold a new bridgething webapp (React + Vite + Tailwind v4)",
6
6
  "license": "MIT",
@@ -68,25 +68,26 @@ CDP input goes straight into the page (never through the physical buttons), so t
68
68
  launcher gesture and on-device browser-nav side effects never interfere.
69
69
 
70
70
  Install the app onto the device first so the kiosk is showing it (build + push).
71
- Then tunnel the device's CDP port to your machine (it is bound to `127.0.0.1` and
72
- chromium refuses to bind it to anything routable, so a tunnel is mandatory):
71
+ CDP is served at `bridgething.local:9222`, reachable directly over USB:
73
72
 
74
73
  ```bash
75
74
  # device answers at bridgething.local over USB; root has no password
76
- ssh -o StrictHostKeyChecking=no -fN -L 9223:127.0.0.1:9223 root@bridgething.local
77
- curl -s http://localhost:9223/json/version >/dev/null && echo tunnel-up
75
+ curl -s http://bridgething.local:9222/json/version >/dev/null && echo cdp-up
78
76
  ```
79
77
 
78
+ Use the `webSocketDebuggerUrl` exactly as returned. It comes back as an IP rather
79
+ than the hostname you asked for, and it is already correct - do not rewrite it.
80
+
80
81
  **Playwright's `connectOverCDP` hangs against the device's embedded chromium** -
81
82
  it never finishes the websocket upgrade (a quirk of the device's `cast_shell`
82
- build, not the tunnel: a plain websocket connects fine over the same tunnel).
83
- Drive it with a raw CDP websocket instead. Connect to the `page` target from
84
- `/json` (the page-level endpoint, not the browser-level one). This script
85
- screenshots the live device and presses a button; it is the whole loop:
83
+ build; a plain websocket connects fine). Drive it with a raw CDP websocket
84
+ instead. Connect to the `page` target from `/json` (the page-level endpoint, not
85
+ the browser-level one). This script screenshots the live device and presses a
86
+ button; it is the whole loop:
86
87
 
87
88
  ```ts
88
89
  // drive.ts -> run with: bun drive.ts
89
- const targets = (await fetch('http://localhost:9223/json').then(r => r.json())) as any[];
90
+ const targets = (await fetch('http://bridgething.local:9222/json').then(r => r.json())) as any[];
90
91
  const page = targets.find(t => t.type === 'page');
91
92
  const ws = new WebSocket(page.webSocketDebuggerUrl);
92
93
  await new Promise<void>((res, rej) => {
@@ -12,7 +12,7 @@
12
12
  "update": "bunx @bridgething/updater"
13
13
  },
14
14
  "dependencies": {
15
- "@bridgething/client": "^0.6.0",
15
+ "@bridgething/client": "^0.7.0",
16
16
  "preact": "^10.29.7",
17
17
  "react": "^19.2.0",
18
18
  "react-dom": "^19.2.0"