better-supabase 0.30.0 → 0.31.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/dist/{adapter-D4aNBxhm.js → adapter-BTbj5N9C.js} +2 -52
- package/dist/ai-sdk/agents/index.d.ts +2 -2
- package/dist/{app-tables-yyVncXEt.d.ts → app-tables-B2mKMNRQ.d.ts} +1 -1
- package/dist/astro/index.js +2 -2
- package/dist/{authorization-CDU9tYA_.d.ts → authorization-DfEkyFt_.d.ts} +10 -3
- package/dist/{bind-p7asfI6H.d.ts → bind-DAx0bMSi.d.ts} +2 -2
- package/dist/{block-env-B8wG3xeh.d.ts → block-env-Dz7Caxk0.d.ts} +3 -3
- package/dist/blocks/ai-chat/index.d.ts +3 -3
- package/dist/blocks/announcements/index.d.ts +3 -3
- package/dist/blocks/api-keys/index.d.ts +1 -1
- package/dist/blocks/attachments/index.d.ts +1 -1
- package/dist/blocks/audit/index.d.ts +2 -2
- package/dist/blocks/automations/index.d.ts +1 -1
- package/dist/blocks/billing/index.d.ts +1 -1
- package/dist/blocks/bookings/index.d.ts +1 -1
- package/dist/blocks/calendar/index.d.ts +7 -3
- package/dist/blocks/calendar/index.js +5 -1
- package/dist/blocks/comments/index.d.ts +4 -4
- package/dist/blocks/employees/index.js +1 -4
- package/dist/blocks/entitlements/index.d.ts +2 -2
- package/dist/blocks/forms/index.d.ts +1 -1
- package/dist/blocks/inbox/index.d.ts +4 -4
- package/dist/blocks/index.d.ts +1 -1
- package/dist/blocks/messaging/index.d.ts +4 -4
- package/dist/blocks/mfa/index.d.ts +1 -1
- package/dist/blocks/notifications/index.d.ts +3 -3
- package/dist/blocks/notifications/index.js +5 -43
- package/dist/blocks/onboarding/index.d.ts +1 -1
- package/dist/blocks/organizations/index.d.ts +34 -21
- package/dist/blocks/organizations/index.js +5 -1
- package/dist/blocks/permissions/index.d.ts +32 -3
- package/dist/blocks/permissions/index.js +23 -2
- package/dist/blocks/push/index.d.ts +10 -2
- package/dist/blocks/push/index.js +23 -7
- package/dist/blocks/reactions/index.d.ts +3 -3
- package/dist/blocks/saved-views/index.d.ts +1 -1
- package/dist/blocks/search/index.d.ts +2 -2
- package/dist/blocks/sessions/index.d.ts +1 -1
- package/dist/blocks/settings/index.d.ts +1 -1
- package/dist/blocks/subjects/index.d.ts +1 -1
- package/dist/blocks/tags/index.d.ts +1 -1
- package/dist/blocks/tasks/index.js +1 -1
- package/dist/blocks/teams/index.d.ts +7 -1
- package/dist/blocks/teams/index.js +8 -7
- package/dist/blocks/undo/index.d.ts +1 -1
- package/dist/blocks/usage/index.d.ts +1 -1
- package/dist/blocks/workflow-editor/index.d.ts +3 -3
- package/dist/blocks/workflows/index.d.ts +3 -3
- package/dist/cli/{add-Dggyehsy.js → add-B9wP0YGU.js} +2 -2
- package/dist/cli/{add-D4w-Axib.js → add-DjZXKd7X.js} +10 -10
- package/dist/cli/add-ZcEOEK23.js +1 -0
- package/dist/cli/{app-table-files-CiGuwLkO.js → app-table-files-mtvjHa48.js} +2 -2
- package/dist/cli/{backfill-DjVjXW_P.js → backfill-Coshdvh_.js} +2 -2
- package/dist/cli/bin.js +1 -1
- package/dist/cli/{blocks-jRL9K1R8.js → blocks-BWCuA0nq.js} +2 -2
- package/dist/cli/{blocks-Bbmb6W_F.js → blocks-hiSazThw.js} +1 -1
- package/dist/cli/{cache-BuoIFlUJ.js → cache-x2wWAy0h.js} +1 -1
- package/dist/cli/{codemod-DRavXBCb.js → codemod-BnjV7BpC.js} +210 -11
- package/dist/cli/{command-DIPmo0wh.js → command-CCAwhiOh.js} +6 -0
- package/dist/cli/{completion-DxPxMtyP.js → completion-BJaB84Pe.js} +2 -2
- package/dist/cli/{completion-DyLMSjOD.js → completion-BkUhs1ms.js} +1 -1
- package/dist/cli/{completion-FUgqm2-N.js → completion-DmUVsUVQ.js} +2 -2
- package/dist/cli/{config-BfapErxs.js → config-zId1jkLx.js} +1 -1
- package/dist/cli/{content-mapper-BCtyfKXl.js → content-mapper-DvOSOdTE.js} +2 -2
- package/dist/cli/{db-CWvH1_46.js → db-DXKyVEDF.js} +1 -1
- package/dist/cli/{doctor-Di2ZekfN.js → doctor-Ywy8oJEU.js} +41 -16
- package/dist/cli/env-CNjT_uOV.js +1 -0
- package/dist/cli/{env-B2CbnbzD.js → env-XMiKvhtV.js} +1 -1
- package/dist/cli/{gen-STKC9vkK.js → gen-B-FbQmG1.js} +14 -14
- package/dist/cli/index.d.ts +1 -1
- package/dist/cli/index.js +7 -7
- package/dist/cli/{init-DW6_nIwj.js → init-fb9e1BKX.js} +9 -9
- package/dist/cli/{keys-V-HcO-21.js → keys-ORiPz1sM.js} +1 -1
- package/dist/cli/{live-0G4Plw3K.js → live-DIt7TP-N.js} +2 -2
- package/dist/cli/{mcp-flKS8iU5.js → mcp-CVWwraga.js} +3 -3
- package/dist/cli/{metadata-VARUbXEe.js → metadata-CannIjel.js} +3 -3
- package/dist/cli/{migrate-Bkq07XcT.js → migrate-Ht2TzIQF.js} +2 -2
- package/dist/cli/{migration-safety-BfVeza5j.js → migration-safety-nNyB05I-.js} +1 -1
- package/dist/cli/{migrations-BCq7Zs2E.js → migrations-bAd7dpk1.js} +2 -2
- package/dist/cli/{module-migration-lbeUrsYv.js → module-migration-CkNux8dr.js} +2 -2
- package/dist/cli/{moved-DNOtp9LA.js → moved-C3WyRHkA.js} +1 -1
- package/dist/cli/{parse-BPf3kGnc.js → parse-DjHbTaFI.js} +1 -1
- package/dist/cli/{powersync-B15CfH5Y.js → powersync-B2v0tDwp.js} +100 -7
- package/dist/cli/powersync-D3mAQ6QE.js +1 -0
- package/dist/cli/{print-DjxpBRnv.js → print-CxQ0rBKT.js} +2 -2
- package/dist/cli/{providers-dyxcHQY3.js → providers-DtI90lSw.js} +1 -1
- package/dist/cli/{remove-BLq5gbal.js → remove-DYtE4IZ4.js} +6 -6
- package/dist/cli/{render-CizUf3RW.js → render-QGWfEoiB.js} +3 -3
- package/dist/cli/{run-ChEjR7yw.js → run-B5aMwErM.js} +2 -2
- package/dist/cli/{run-MwM__teL.js → run-BNoJKf5I.js} +40 -39
- package/dist/cli/{run-ChOY6s4o.js → run-DiYX1XEa.js} +8 -8
- package/dist/cli/{seed-CDnL4Tnc.js → seed-C-Hu2n_E.js} +1 -1
- package/dist/cli/seed-Cm-c0BDd.js +1 -0
- package/dist/cli/{shared-DV5wIv-7.js → shared-D_CFi5di.js} +1 -1
- package/dist/cli/{skills-DM3oeIxY.js → skills-D98y0bSB.js} +1 -1
- package/dist/cli/{snapshot-B5LXkVMC.js → snapshot-BlQ4DDcJ.js} +9 -4
- package/dist/cli/{source-BoLNG_2A.js → source-CelMBQMj.js} +1 -1
- package/dist/cli/{spec-D6QeE2Zx.js → spec-BxcoGE0h.js} +1 -1
- package/dist/cli/{spec-Dz-PGCaM.js → spec-iBx1LcYO.js} +3 -3
- package/dist/cli/{sql-layout-zo02f3Dm.js → sql-layout-Dp4Rottt.js} +2 -2
- package/dist/cli/{stack-ClESAZYf.js → stack-B2slzrYH.js} +1 -1
- package/dist/cli/{sync-m-oZ_SyI.js → sync-BnORI43S.js} +4 -4
- package/dist/cli/{table-dyKddjwo.js → table-D6HUECKI.js} +1 -1
- package/dist/cli/{upgrade-C9sgVZ5z.js → upgrade-CR6-WmIc.js} +5 -5
- package/dist/cli/{upgrade-WwEJaX3i.js → upgrade-fz92aCnh.js} +3 -3
- package/dist/cli/{version-D2BQuqta.js → version-Dz8ZlOuh.js} +1 -1
- package/dist/client/index.d.ts +5 -5
- package/dist/client/native/index.d.ts +4 -4
- package/dist/{composite-CBRbvn5j.js → composite-B4qB6k31.js} +2 -2
- package/dist/config/index.d.ts +2 -2
- package/dist/config/index.js +4 -4
- package/dist/{config-r7njjNgh.js → config-B7g-HDis.js} +3 -3
- package/dist/{config-bqKaPjst.js → config-R0m0fBiD.js} +1 -1
- package/dist/{context-nbYYjv7U.d.ts → context-DWWoP1wK.d.ts} +1 -1
- package/dist/{controller-TRocodqG.d.ts → controller-Br9dGKGe.d.ts} +1 -1
- package/dist/{controller-qG-B1eDn.js → controller-W97g2WGG.js} +1 -1
- package/dist/create/index.d.ts +3 -3
- package/dist/create/index.js +3 -3
- package/dist/create/lite/index.d.ts +3 -3
- package/dist/create/lite/index.js +3 -3
- package/dist/delivery-events-DbL8IHIY.js +53 -0
- package/dist/edge/index.js +3 -3
- package/dist/{entitlements-B1i1-wfe.d.ts → entitlements-CBjm2lvD.d.ts} +1 -1
- package/dist/eve/index.js +1 -1
- package/dist/expo/index.js +3 -2
- package/dist/{field-errors-tJvehEFc.d.ts → field-errors-CEjsMAgd.d.ts} +4 -4
- package/dist/{framework-DYEUraqt.js → framework-CqiZk89W.js} +1 -1
- package/dist/hono/index.js +2 -2
- package/dist/{index-BkzXwuIN.d.ts → index-Clyd2Goi.d.ts} +1 -1
- package/dist/{index-zsgNmE8m.d.ts → index-D98bQs8a.d.ts} +7 -7
- package/dist/{index-BKrxynq9.d.ts → index-DIdPoQtO.d.ts} +2 -2
- package/dist/{index-CWAQRWY8.d.ts → index-I8YLxKq8.d.ts} +2 -2
- package/dist/{index-8US7qlvW.d.ts → index-eRBuKtMt.d.ts} +2 -2
- package/dist/{index-BM6NmKSc.d.ts → index-uIU65iEn.d.ts} +6 -6
- package/dist/{instances-C7qUTjhJ.js → instances-DY_ORk5g.js} +2 -0
- package/dist/mapper/bin.js +5 -5
- package/dist/mcp/index.d.ts +1 -1
- package/dist/mcp/index.js +1 -1
- package/dist/mcp/sdk/index.js +1 -1
- package/dist/next/index.d.ts +73 -6
- package/dist/next/index.js +88 -35
- package/dist/{operations-CB9atU2e.d.ts → operations-hm1Isvvs.d.ts} +1 -1
- package/dist/{options-BKBy5wM_.js → options-CF6EVF_G.js} +2 -1
- package/dist/{options-COo7_3MX.js → options-DSCW40_5.js} +3 -1
- package/dist/orpc/index.js +2 -1
- package/dist/otel/index.js +4 -4
- package/dist/{ports-hpbyMySO.d.ts → ports-DOrPTJzl.d.ts} +1 -1
- package/dist/powersync/index.d.ts +204 -4
- package/dist/powersync/index.js +361 -4
- package/dist/preset/index.d.ts +3 -3
- package/dist/preset/index.js +3 -3
- package/dist/{preset-DCdEnJj9.js → preset-CXhpPmPV.js} +2 -2
- package/dist/{project-B32wb5J6.js → project-DJ9Uo0sT.js} +5 -5
- package/dist/{push-token-DQ1ycFPU.d.ts → push-token-B4vcIU4s.d.ts} +1 -1
- package/dist/query/index.d.ts +1 -1
- package/dist/query/index.js +1 -1
- package/dist/react/index.d.ts +5 -5
- package/dist/react/index.js +1 -1
- package/dist/react/native/index.d.ts +1 -1
- package/dist/react/server.d.ts +5 -5
- package/dist/react/server.js +1 -1
- package/dist/{react-CcrQQl0_.js → react-mdVjpewL.js} +2 -2
- package/dist/react-router/index.js +2 -2
- package/dist/realtime/index.d.ts +3 -3
- package/dist/{record-type-DRbnlj5q.js → record-type-BEUyEsFx.js} +2 -2
- package/dist/records/index.d.ts +5 -5
- package/dist/records/index.js +3 -3
- package/dist/{replicas-Dyoh3CEg.js → refresh-DLBgnxjL.js} +51 -1
- package/dist/{resolved-names-iLBOUaib.js → resolved-names-kMRjmSIy.js} +1 -1
- package/dist/{runtime-CoKxZibd.js → runtime-LRJM7UqY.js} +19 -20
- package/dist/server/index.d.ts +1 -1
- package/dist/server/index.js +4 -4
- package/dist/{sign-in-Cyj3ZlFX.js → sign-in-CuZ1Ag7O.js} +17 -2
- package/dist/solid/index.d.ts +5 -5
- package/dist/solid-start/index.js +2 -2
- package/dist/spec/index.js +1 -1
- package/dist/sql/index.d.ts +4 -4
- package/dist/sql/index.js +3 -3
- package/dist/{sql-CyeDg3Yh.js → sql-DHp0L7zK.js} +404 -165
- package/dist/ssr/index.d.ts +1 -1
- package/dist/svelte/index.d.ts +5 -5
- package/dist/sveltekit/index.js +2 -2
- package/dist/tanstack-start/index.js +2 -2
- package/dist/{tenant-C9YE_kqK.d.ts → tenant-FfgNhd5x.d.ts} +1 -1
- package/dist/testing/index.d.ts +13 -4
- package/dist/testing/index.js +17 -15
- package/dist/{timeline-DvXtXq5q.d.ts → timeline-DqEoD8bb.d.ts} +1 -1
- package/dist/{timeline--VU3A1e4.js → timeline-Dz3hO2I6.js} +1 -1
- package/dist/{topic-breZqx_4.d.ts → topic-BaUElNw2.d.ts} +1 -1
- package/dist/{types-C3I7S51U.d.ts → types-CMN0h_Ix.d.ts} +2 -2
- package/dist/vue/index.d.ts +5 -5
- package/dist/{watch-topic-ItO3dz8m.d.ts → watch-topic-BabDTZ-L.d.ts} +1 -1
- package/dist/workflow-sdk/world/index.js +2 -2
- package/dist/{workflow-sdk-BWPsdzVK.js → workflow-sdk-DJJkP0dT.js} +12 -1
- package/dist/yjs/index.d.ts +1 -1
- package/package.json +1 -1
- package/schemas/config-v1.json +9 -1
- package/schemas/doctor-report-v1.json +1 -0
- package/skills/better-supabase/references/ui-recipes.md +524 -295
- package/skills/better-supabase-api/references/powersync.md +16 -0
- package/skills/better-supabase-auth/SKILL.md +4 -1
- package/dist/cli/add-BdhGOwkB.js +0 -1
- package/dist/cli/env-CynGCICL.js +0 -1
- package/dist/cli/powersync-DnBsDchT.js +0 -1
- package/dist/cli/seed-BOun22-k.js +0 -1
|
@@ -46,5 +46,21 @@ Never throw for a kind that can't succeed: it blocks the upload queue.
|
|
|
46
46
|
- `uploadRoute(server.db.attachments, { put: "create" })` for write-once tables: a `PUT` calls `create` and a `conflict` counts as applied (the row is already on the server); a `PATCH` is discarded as `unsupported`.
|
|
47
47
|
- `onError: (error, { phase }) => ...` logs a failed `getSession` (`phase: "credentials"`, kind `unauthorized` or `network`; `fetchCredentials` returns `null`) and uploads that stay queued for a retry (`phase: "upload"`).
|
|
48
48
|
|
|
49
|
+
## Offline blocks
|
|
50
|
+
|
|
51
|
+
`gen.powersync.instances` syncs `notifications`, `attachments`, `memberships`,
|
|
52
|
+
`teams` and `profiles`. Give each block client a local transport with
|
|
53
|
+
`server: rpcTransport(supabase)`, and route its tables through a server client:
|
|
54
|
+
|
|
55
|
+
| Block | Transport | Upload routes |
|
|
56
|
+
| ------------- | --------------------------------- | -------------------------------------------------------------------------------- |
|
|
57
|
+
| notifications | `powersyncNotificationsTransport` | `notification_recipients: notificationRecipientsRoute(remote)` |
|
|
58
|
+
| organizations | `powersyncMembershipsTransport` | `memberships: membershipsRoute(remote)` |
|
|
59
|
+
| teams | `powersyncTeamsTransport` | `teams: teamsRoute(remote, powersync)`, `team_members: teamMembersRoute(remote)` |
|
|
60
|
+
| profiles | `powersyncProfilesTransport` | `profiles: profilesRoute(remote)` |
|
|
61
|
+
|
|
62
|
+
The synced rows are the user's own (memberships, their teams, their profile).
|
|
63
|
+
Switching organizations and creating or deleting a team need the network.
|
|
64
|
+
|
|
49
65
|
Docs: https://bettersupabase.com/docs/frontend/powersync.md and
|
|
50
66
|
https://bettersupabase.com/docs/guides/offline-first.md.
|
|
@@ -172,9 +172,12 @@ membership lasts until the next refresh. When that window matters:
|
|
|
172
172
|
- Sign in and out from a Server Action with `bsb.signIn`, `verifyOtp`,
|
|
173
173
|
`authorizeUrl` and `exchangeCode`, `verifyMfa` or `signOut`, then
|
|
174
174
|
`redirect(result.data.redirectTo)`. The result is plain data
|
|
175
|
-
(`redirectTo`, `mfa`); reads later in the action (`bsb.context()`,
|
|
175
|
+
(`redirectTo`, `mfa`, `user`); reads later in the action (`bsb.context()`,
|
|
176
176
|
`bsb.getRequestSession()`) see the new session, so build the landing
|
|
177
177
|
context from them.
|
|
178
|
+
- Start email link flows with `bsb.signInWithOtp`, `resetPasswordForEmail`,
|
|
179
|
+
`signUp` or `resend`, not supabase-js: they write the PKCE verifier cookie
|
|
180
|
+
that `exchangeCode` reads on the link's callback.
|
|
178
181
|
- After signing in or out in the browser client: `useSessionChange(sessionChanged)` from
|
|
179
182
|
`better-supabase/next/client`. After switching the active organization:
|
|
180
183
|
`useSessionChange(sessionChanged, router, { refreshToken: supabase })`, so
|
package/dist/cli/add-BdhGOwkB.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { t as addCommand } from "./add-D4w-Axib.js";
|
package/dist/cli/env-CynGCICL.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { n as envCommand } from "./env-B2CbnbzD.js";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { t as powersyncStreamsCommand } from "./powersync-B15CfH5Y.js";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { n as seedCommand } from "./seed-CDnL4Tnc.js";
|