create-bridgething 0.1.2 → 0.1.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 CHANGED
@@ -15,7 +15,8 @@ npm create bridgething@latest my-app
15
15
  ```
16
16
 
17
17
  The generated project includes `bun run push` to deploy the built webapp to a
18
- connected Car Thing and `bun run share` to share it with the community.
18
+ connected Car Thing, `bun run share` to share it with the community, and
19
+ `bun run update` to bring the connected device to the latest bridgething release.
19
20
 
20
21
  - Full docs: <https://bridgething.com/docs>
21
22
  - Source: <https://github.com/JoeyEamigh/bridgething>
package/dist/index.mjs CHANGED
@@ -137,6 +137,7 @@ driving the app, and installing and sharing it.
137
137
  bun run build # production bundle into dist/
138
138
  bun run push <addr> # build + install onto a connected Car Thing (default bridgething.local)
139
139
  bun run share # build first, then zip dist/ to hand to friends
140
+ bun run update # bring the connected Car Thing to the latest bridgething release
140
141
 
141
142
  The starter App connects to ws://127.0.0.1:8891/ on the device, and to
142
143
  ws://<device-ip>:8891/ in dev when you set VITE_BRIDGETHING_URL.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-bridgething",
3
- "version": "0.1.2",
3
+ "version": "0.1.4",
4
4
  "type": "module",
5
5
  "description": "Scaffold a new bridgething webapp (React + Vite + Tailwind v4)",
6
6
  "license": "MIT",
@@ -77,6 +77,8 @@ files for a specific method or type.
77
77
  of seeing the screen and pressing the buttons.
78
78
  - `bun run build` - production bundle into `dist/`.
79
79
  - `bun run push` - build + install onto a connected Car Thing (see `/bridgething`).
80
+ - `bun run update` - update the connected device to the latest bridgething release
81
+ (device firmware, not your webapp; see `/bridgething`).
80
82
 
81
83
  ## Do not
82
84
 
@@ -45,6 +45,15 @@ bun run share
45
45
  `share` writes `<name>-<version>.zip` from `dist/`. Anyone with a bridgething Car
46
46
  Thing installs it from the app.
47
47
 
48
+ ## Update the device
49
+
50
+ ```bash
51
+ bun run update
52
+ ```
53
+
54
+ `update` runs [`@bridgething/updater`](https://www.npmjs.com/package/@bridgething/updater)
55
+ to bring the connected Car Thing to the latest bridgething release. Multiple devices: `bun run update -- --host ws://bridgething-<serial>.local:8892/`.
56
+
48
57
  ## Layout
49
58
 
50
59
  - `src/App.tsx` - starter UI: subscribes to `client.player.onSnapshot`,
@@ -18,7 +18,8 @@ Three jobs. Read the reference file for the one in front of you:
18
18
  the physical controls (locally, then over CDP on the device):
19
19
  [reference/develop.md](reference/develop.md)
20
20
  - **Install and share** - build, push onto a connected Car Thing, package a zip
21
- anyone can install: [reference/ship.md](reference/ship.md)
21
+ anyone can install, and keep the device on the latest bridgething release:
22
+ [reference/ship.md](reference/ship.md)
22
23
 
23
24
  The device shape, the control-to-event mapping, and the hard constraints live in
24
25
  CLAUDE.md, which is always loaded. This skill is the how-to on top of it.
@@ -35,3 +35,22 @@ your built bundle with `manifest.json` at its root.
35
35
  Bump `version` in `public/manifest.json` before sharing an update, so people can
36
36
  tell builds apart. Never touch `manifest.json`'s `id` - it is the webapp's
37
37
  identity and the install path on the device.
38
+
39
+ ## Keep the device on the latest bridgething
40
+
41
+ ```bash
42
+ bun run update # updates the connected Car Thing's daemon + image
43
+ ```
44
+
45
+ `update` runs `@bridgething/updater`: it connects over the same gateway `push`
46
+ uses, reads the release manifest, and brings the device to the latest `stable`
47
+ release.
48
+
49
+ Multiple devices? Target one explicitly:
50
+
51
+ ```bash
52
+ bun run update -- --host ws://bridgething-<serial>.local:8892/
53
+ ```
54
+
55
+ Other flags: `-- --channel <name>` to track a non-stable channel,
56
+ `-- --daemon-only` to skip the image OTA.
@@ -8,10 +8,11 @@
8
8
  "build": "vite build",
9
9
  "preview": "vite preview",
10
10
  "push": "bun scripts/push.ts",
11
- "share": "bun scripts/share.ts"
11
+ "share": "bun scripts/share.ts",
12
+ "update": "bunx @bridgething/updater"
12
13
  },
13
14
  "dependencies": {
14
- "@bridgething/client": "^0.1.2",
15
+ "@bridgething/client": "^0.1.4",
15
16
  "react": "^19.2.0",
16
17
  "react-dom": "^19.2.0"
17
18
  },