@vibes.diy/use-vibes-base 2.4.12 → 2.4.14
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 +8 -8
- package/package.json +7 -7
package/README.md
CHANGED
|
@@ -59,12 +59,12 @@ db.subscribe((changes) => {
|
|
|
59
59
|
|
|
60
60
|
### How defaults resolve
|
|
61
61
|
|
|
62
|
-
| Field
|
|
63
|
-
|
|
|
64
|
-
| `apiUrl`
|
|
65
|
-
| `appSlug`
|
|
66
|
-
| `getToken`
|
|
67
|
-
| `
|
|
62
|
+
| Field | Default source (when omitted) |
|
|
63
|
+
| ------------ | ----------------------------------------------------------------------------------- |
|
|
64
|
+
| `apiUrl` | env `VIBES_DIY_API_URL`, then `https://vibes.diy/api` |
|
|
65
|
+
| `appSlug` | env `VIBES_APP_SLUG`, then `basename(process.cwd())` |
|
|
66
|
+
| `getToken` | local device-id cert from the Fireproof keybag (populated by `npx vibes-diy login`) |
|
|
67
|
+
| `userHandle` | lazy — looked up from your `defaultHandle` user setting on first request |
|
|
68
68
|
|
|
69
69
|
### Explicit overrides
|
|
70
70
|
|
|
@@ -76,7 +76,7 @@ import { fireproof, type FireproofOpts } from "use-vibes";
|
|
|
76
76
|
const db = fireproof("todos", {
|
|
77
77
|
apiUrl: "https://vibes.diy/api",
|
|
78
78
|
appSlug: "my-app",
|
|
79
|
-
|
|
79
|
+
userHandle: "alice", // optional — auto-derived from token otherwise
|
|
80
80
|
getToken: async () => ({
|
|
81
81
|
isOk: () => true,
|
|
82
82
|
Ok: () => ({ type: "device-id", token: myToken }),
|
|
@@ -90,7 +90,7 @@ const db = fireproof("todos", {
|
|
|
90
90
|
Calling `fireproof(name)` repeatedly is the supported pattern:
|
|
91
91
|
|
|
92
92
|
- `fireproof("a") === fireproof("a")` — same name returns the same database instance.
|
|
93
|
-
- `fireproof("a")` and `fireproof("b")` are distinct, but **share one WebSocket connection and one resolved
|
|
93
|
+
- `fireproof("a")` and `fireproof("b")` are distinct, but **share one WebSocket connection and one resolved userHandle**.
|
|
94
94
|
- **First call's opts win.** If you need to talk to multiple `(apiUrl, appSlug)` pairs in one process, drop the sugar and construct `VibesDiyApi` + `FireflyApiAdapter` + `FireflyDatabase` directly.
|
|
95
95
|
|
|
96
96
|
### v1 limitations
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vibes.diy/use-vibes-base",
|
|
3
|
-
"version": "2.4.
|
|
3
|
+
"version": "2.4.14",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "./index.js",
|
|
6
6
|
"description": "Core components and utilities for use-vibes (internal workspace package)",
|
|
@@ -20,13 +20,13 @@
|
|
|
20
20
|
"@fireproof/core-types-protocols-cloud": "~0.24.19",
|
|
21
21
|
"@fireproof/core-types-protocols-dashboard": "~0.24.19",
|
|
22
22
|
"@fireproof/use-fireproof": "~0.24.19",
|
|
23
|
-
"@vibes.diy/api-impl": "^2.4.
|
|
24
|
-
"@vibes.diy/base": "^2.4.
|
|
25
|
-
"@vibes.diy/prompts": "^2.4.
|
|
26
|
-
"@vibes.diy/use-vibes-types": "^2.4.
|
|
27
|
-
"@vibes.diy/vibe-runtime": "^2.4.
|
|
23
|
+
"@vibes.diy/api-impl": "^2.4.14",
|
|
24
|
+
"@vibes.diy/base": "^2.4.14",
|
|
25
|
+
"@vibes.diy/prompts": "^2.4.14",
|
|
26
|
+
"@vibes.diy/use-vibes-types": "^2.4.14",
|
|
27
|
+
"@vibes.diy/vibe-runtime": "^2.4.14",
|
|
28
28
|
"arktype": "~2.2.0",
|
|
29
|
-
"call-ai": "^2.4.
|
|
29
|
+
"call-ai": "^2.4.14",
|
|
30
30
|
"jose": "~6.2.2",
|
|
31
31
|
"react-dom": "~19.2.5",
|
|
32
32
|
"zod": "~4.3.6"
|