@lunora/hyperdrive 1.0.0-alpha.123 → 1.0.0-alpha.125
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 +5 -4
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -146,12 +146,13 @@ export default defineSchema({
|
|
|
146
146
|
export const channelMessages = defineShape({ table: "messages", where: () => ({}) });
|
|
147
147
|
```
|
|
148
148
|
|
|
149
|
-
Supply the driver once,
|
|
149
|
+
Supply the driver once, on the app builder — required, or every tick records `no sourceClient resolved for binding "…"` and the table stays empty. Lunora memoizes it per binding:
|
|
150
150
|
|
|
151
151
|
```ts
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
})
|
|
152
|
+
export default defineApp<Env>()
|
|
153
|
+
.shard((env) => env.SHARD)
|
|
154
|
+
.sourceClient((env, binding) => fromPostgresJs(postgres((env[binding] as { connectionString: string }).connectionString)))
|
|
155
|
+
.build();
|
|
155
156
|
```
|
|
156
157
|
|
|
157
158
|
Clients subscribe with the shape they would use over any table — external data stops being external once it is materialized.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lunora/hyperdrive",
|
|
3
|
-
"version": "1.0.0-alpha.
|
|
3
|
+
"version": "1.0.0-alpha.125",
|
|
4
4
|
"description": "Bring-your-own Postgres/MySQL for Lunora via Cloudflare Hyperdrive: a driver-agnostic, action-only ctx.sql",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"cloudflare",
|
|
@@ -52,8 +52,8 @@
|
|
|
52
52
|
"dependencies": {
|
|
53
53
|
"@lunora/errors": "1.0.0-alpha.39",
|
|
54
54
|
"@lunora/platform": "1.0.0-alpha.32",
|
|
55
|
-
"@lunora/shard-engine": "1.0.0-alpha.
|
|
56
|
-
"@lunora/sql-store": "1.0.0-alpha.
|
|
55
|
+
"@lunora/shard-engine": "1.0.0-alpha.76",
|
|
56
|
+
"@lunora/sql-store": "1.0.0-alpha.127",
|
|
57
57
|
"drizzle-orm": "^0.45.2"
|
|
58
58
|
},
|
|
59
59
|
"peerDependencies": {
|