better-supabase 0.17.0 → 0.18.1
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/{access-sql-B-MkVARa.js → access-sql-CNIgUqWf.js} +2 -0
- package/dist/{adapter-Dyks1lX1.js → adapter-CfuBICuG.js} +3 -1
- package/dist/{ai-schedules-Dk9H3kAp.d.ts → ai-schedules-DzLh6BYI.d.ts} +1 -1
- package/dist/ai-sdk/agents/index.d.ts +2 -2
- package/dist/ai-sdk/memory/index.js +1 -1
- package/dist/{api-CpL3hm87.d.ts → api-B6zteBya.d.ts} +1 -1
- package/dist/{app-tables-Q0TYfeih.js → app-tables-DyswUg6J.js} +10 -2
- package/dist/{app-tables-dS02piE7.d.ts → app-tables-XwCviyhP.d.ts} +1 -1
- package/dist/astro/index.d.ts +3 -3
- package/dist/astro/index.js +5 -5
- package/dist/{attachments-aJYgdYtB.js → attachments-M-Dy79Ry.js} +9 -2
- package/dist/{authorization-CNsvnwle.d.ts → authorization-IiE__z2m.d.ts} +169 -87
- package/dist/{automations-CIwRq7zm.js → automations-B5P6vTvk.js} +2 -2
- package/dist/{automations-CD1XlL2W.js → automations-BKjJpktQ.js} +1 -1
- package/dist/{automations-Bc2ue55V.js → automations-FCnWy387.js} +2 -2
- package/dist/{bind-C801IaK-.d.ts → bind-pu5TLrla.d.ts} +3 -3
- package/dist/{block-env-BeG4DiiO.d.ts → block-env-CA65ulTD.d.ts} +4 -4
- package/dist/blocks/access-requests/index.d.ts +1 -1
- package/dist/blocks/access-requests/index.js +1 -1
- package/dist/blocks/activities/index.d.ts +1 -1
- package/dist/blocks/activities/index.js +1 -1
- package/dist/blocks/agents/index.d.ts +1 -1
- package/dist/blocks/agents/index.js +1 -1
- package/dist/blocks/ai-cache/index.d.ts +1 -1
- package/dist/blocks/ai-cache/index.js +1 -1
- package/dist/blocks/ai-chat/index.d.ts +4 -4
- package/dist/blocks/ai-chat/index.js +1 -1
- package/dist/blocks/ai-files/index.d.ts +1 -1
- package/dist/blocks/ai-files/index.js +1 -1
- package/dist/blocks/ai-keys/index.d.ts +1 -1
- package/dist/blocks/ai-keys/index.js +1 -1
- package/dist/blocks/ai-schedules/index.d.ts +2 -2
- package/dist/blocks/ai-schedules/index.js +1 -1
- package/dist/blocks/announcements/index.d.ts +4 -4
- package/dist/blocks/announcements/index.js +1 -1
- package/dist/blocks/api-keys/index.d.ts +2 -2
- package/dist/blocks/api-keys/index.js +1 -1
- package/dist/blocks/approvals/index.d.ts +1 -1
- package/dist/blocks/approvals/index.js +1 -1
- package/dist/blocks/assets/index.d.ts +1 -1
- package/dist/blocks/assets/index.js +1 -1
- package/dist/blocks/assignment/index.d.ts +1 -1
- package/dist/blocks/attachments/index.d.ts +40 -4
- package/dist/blocks/attachments/index.js +42 -4
- package/dist/blocks/audit/index.d.ts +3 -3
- package/dist/blocks/audit/index.js +2 -2
- package/dist/blocks/automations/index.d.ts +3 -3
- package/dist/blocks/automations/index.js +1 -1
- package/dist/blocks/billable-time/index.d.ts +1 -1
- package/dist/blocks/billing/index.d.ts +2 -2
- package/dist/blocks/billing/index.js +1 -1
- package/dist/blocks/bookings/index.d.ts +2 -2
- package/dist/blocks/bookings/index.js +1 -1
- package/dist/blocks/bulk/index.d.ts +1 -1
- package/dist/blocks/bulk/index.js +1 -1
- package/dist/blocks/calendar/index.d.ts +2 -2
- package/dist/blocks/calendar/index.js +1 -1
- package/dist/blocks/catalog/index.d.ts +1 -1
- package/dist/blocks/catalog/index.js +1 -1
- package/dist/blocks/channels/index.d.ts +1 -1
- package/dist/blocks/collections/index.d.ts +1 -1
- package/dist/blocks/collections/index.js +1 -1
- package/dist/blocks/comments/index.d.ts +5 -5
- package/dist/blocks/comments/index.js +1 -1
- package/dist/blocks/compliance/index.d.ts +1 -1
- package/dist/blocks/compliance/index.js +1 -1
- package/dist/blocks/connectors/index.d.ts +1 -1
- package/dist/blocks/connectors/index.js +1 -1
- package/dist/blocks/contacts/index.d.ts +1 -1
- package/dist/blocks/contacts/index.js +1 -1
- package/dist/blocks/content/index.d.ts +2 -2
- package/dist/blocks/content/index.js +1 -1
- package/dist/blocks/contracts/index.d.ts +1 -1
- package/dist/blocks/contracts/index.js +1 -1
- package/dist/blocks/courses/index.d.ts +2 -2
- package/dist/blocks/courses/index.js +1 -1
- package/dist/blocks/created-by/index.d.ts +1 -1
- package/dist/blocks/created-by/index.js +1 -1
- package/dist/blocks/custom-fields/index.d.ts +1 -1
- package/dist/blocks/custom-fields/index.js +1 -1
- package/dist/blocks/data-lifecycle/index.d.ts +1 -1
- package/dist/blocks/data-lifecycle/index.js +1 -1
- package/dist/blocks/deals/index.d.ts +1 -1
- package/dist/blocks/deals/index.js +1 -1
- package/dist/blocks/dispatch/index.d.ts +2 -2
- package/dist/blocks/dispatch/index.js +1 -1
- package/dist/blocks/documents/index.d.ts +1 -1
- package/dist/blocks/documents/index.js +1 -1
- package/dist/blocks/domains/index.d.ts +1 -1
- package/dist/blocks/domains/index.js +1 -1
- package/dist/blocks/donations/index.d.ts +1 -1
- package/dist/blocks/donations/index.js +1 -1
- package/dist/blocks/drive/index.d.ts +1 -1
- package/dist/blocks/drive/index.js +2 -2
- package/dist/blocks/employees/index.d.ts +2 -2
- package/dist/blocks/employees/index.js +1 -1
- package/dist/blocks/enrichment/index.d.ts +1 -1
- package/dist/blocks/enrollments/index.d.ts +1 -1
- package/dist/blocks/enrollments/index.js +1 -1
- package/dist/blocks/entitlements/index.d.ts +3 -3
- package/dist/blocks/expenses/index.d.ts +1 -1
- package/dist/blocks/expenses/index.js +1 -1
- package/dist/blocks/field-history/index.d.ts +1 -1
- package/dist/blocks/flags/index.d.ts +1 -1
- package/dist/blocks/flags/index.js +1 -1
- package/dist/blocks/forecasts/index.d.ts +1 -1
- package/dist/blocks/forms/index.d.ts +2 -2
- package/dist/blocks/forms/index.js +1 -1
- package/dist/blocks/goals/index.d.ts +1 -1
- package/dist/blocks/goals/index.js +1 -1
- package/dist/blocks/guests/index.d.ts +1 -1
- package/dist/blocks/hiring/index.d.ts +1 -1
- package/dist/blocks/hiring/index.js +1 -1
- package/dist/blocks/identities/index.d.ts +1 -1
- package/dist/blocks/identities/index.js +1 -1
- package/dist/blocks/imports/index.d.ts +1 -1
- package/dist/blocks/inbox/index.d.ts +5 -5
- package/dist/blocks/inbox/index.js +1 -1
- package/dist/blocks/incidents/index.d.ts +1 -1
- package/dist/blocks/incidents/index.js +1 -1
- package/dist/blocks/index.d.ts +4 -4
- package/dist/blocks/index.js +1 -1
- package/dist/blocks/inventory/index.d.ts +1 -1
- package/dist/blocks/inventory/index.js +1 -1
- package/dist/blocks/invoices/index.d.ts +1 -1
- package/dist/blocks/invoices/index.js +1 -1
- package/dist/blocks/knowledge/index.d.ts +1 -1
- package/dist/blocks/knowledge/index.js +1 -1
- package/dist/blocks/lead-scoring/index.d.ts +2 -2
- package/dist/blocks/lead-scoring/index.js +1 -1
- package/dist/blocks/leases/index.d.ts +1 -1
- package/dist/blocks/leases/index.js +1 -1
- package/dist/blocks/leave/index.d.ts +1 -1
- package/dist/blocks/leave/index.js +1 -1
- package/dist/blocks/ledger/index.d.ts +1 -1
- package/dist/blocks/mail-sync/index.d.ts +2 -2
- package/dist/blocks/mail-sync/index.js +1 -1
- package/dist/blocks/memberships/index.d.ts +3 -3
- package/dist/blocks/memberships/index.js +1 -1
- package/dist/blocks/memory/index.d.ts +1 -1
- package/dist/blocks/memory/index.js +1 -1
- package/dist/blocks/messaging/index.d.ts +5 -5
- package/dist/blocks/messaging/index.js +1 -1
- package/dist/blocks/metrics/index.d.ts +1 -1
- package/dist/blocks/metrics/index.js +1 -1
- package/dist/blocks/mfa/index.d.ts +2 -2
- package/dist/blocks/moderation/index.d.ts +1 -1
- package/dist/blocks/moderation/index.js +1 -1
- package/dist/blocks/notifications/index.d.ts +17 -6
- package/dist/blocks/notifications/index.js +110 -40
- package/dist/blocks/numbering/index.d.ts +1 -1
- package/dist/blocks/numbering/index.js +1 -1
- package/dist/blocks/oauth-server/index.d.ts +1 -1
- package/dist/blocks/oauth-server/index.js +1 -1
- package/dist/blocks/onboarding/index.d.ts +2 -2
- package/dist/blocks/onboarding/index.js +1 -1
- package/dist/blocks/orders/index.d.ts +2 -2
- package/dist/blocks/orders/index.js +1 -1
- package/dist/blocks/organizations/index.d.ts +38 -3
- package/dist/blocks/organizations/index.js +50 -5
- package/dist/blocks/outbox/index.d.ts +1 -1
- package/dist/blocks/outbox/index.js +1 -1
- package/dist/blocks/passes/index.d.ts +2 -2
- package/dist/blocks/passes/index.js +1 -1
- package/dist/blocks/permissions/index.d.ts +4 -4
- package/dist/blocks/permissions/index.js +2 -2
- package/dist/blocks/pipelines/index.d.ts +1 -1
- package/dist/blocks/pipelines/index.js +1 -1
- package/dist/blocks/posts/index.d.ts +2 -2
- package/dist/blocks/posts/index.js +1 -1
- package/dist/blocks/profiles/index.d.ts +1 -1
- package/dist/blocks/profiles/index.js +1 -1
- package/dist/blocks/promotions/index.d.ts +1 -1
- package/dist/blocks/promotions/index.js +1 -1
- package/dist/blocks/push/index.d.ts +76 -10
- package/dist/blocks/push/index.js +172 -43
- package/dist/blocks/queue/index.d.ts +1 -1
- package/dist/blocks/queue/index.js +1 -1
- package/dist/blocks/quotes/index.d.ts +1 -1
- package/dist/blocks/quotes/index.js +1 -1
- package/dist/blocks/rank/index.d.ts +1 -1
- package/dist/blocks/reactions/index.d.ts +4 -4
- package/dist/blocks/reactions/index.js +1 -1
- package/dist/blocks/relations/index.d.ts +1 -1
- package/dist/blocks/relations/index.js +1 -1
- package/dist/blocks/reminders/index.d.ts +1 -1
- package/dist/blocks/reminders/index.js +1 -1
- package/dist/blocks/reviews/index.d.ts +1 -1
- package/dist/blocks/reviews/index.js +1 -1
- package/dist/blocks/saved-views/index.d.ts +2 -2
- package/dist/blocks/saved-views/index.js +1 -1
- package/dist/blocks/scores/index.d.ts +1 -1
- package/dist/blocks/scores/index.js +1 -1
- package/dist/blocks/search/index.d.ts +3 -3
- package/dist/blocks/search/index.js +1 -1
- package/dist/blocks/security-events/index.d.ts +1 -1
- package/dist/blocks/security-events/index.js +1 -1
- package/dist/blocks/segments/index.d.ts +2 -2
- package/dist/blocks/segments/index.js +1 -1
- package/dist/blocks/sequences/index.d.ts +2 -2
- package/dist/blocks/sequences/index.js +1 -1
- package/dist/blocks/service-accounts/index.d.ts +1 -1
- package/dist/blocks/service-accounts/index.js +1 -1
- package/dist/blocks/sessions/index.d.ts +2 -2
- package/dist/blocks/sessions/index.js +1 -1
- package/dist/blocks/settings/index.d.ts +2 -2
- package/dist/blocks/settings/index.js +1 -1
- package/dist/blocks/share-links/index.d.ts +1 -1
- package/dist/blocks/share-links/index.js +1 -1
- package/dist/blocks/shipments/index.d.ts +2 -2
- package/dist/blocks/shipments/index.js +1 -1
- package/dist/blocks/signatures/index.d.ts +2 -2
- package/dist/blocks/signatures/index.js +1 -1
- package/dist/blocks/signing-keys/index.d.ts +1 -1
- package/dist/blocks/signing-keys/index.js +1 -1
- package/dist/blocks/sla/index.d.ts +1 -1
- package/dist/blocks/sla/index.js +1 -1
- package/dist/blocks/sso/index.d.ts +1 -1
- package/dist/blocks/sso/index.js +1 -1
- package/dist/blocks/state-machine/index.d.ts +1 -1
- package/dist/blocks/state-machine/index.js +1 -1
- package/dist/blocks/subjects/index.d.ts +2 -2
- package/dist/blocks/tags/index.d.ts +2 -2
- package/dist/blocks/tags/index.js +1 -1
- package/dist/blocks/tasks/index.d.ts +2 -2
- package/dist/blocks/tasks/index.js +1 -1
- package/dist/blocks/teams/index.d.ts +1 -1
- package/dist/blocks/teams/index.js +1 -1
- package/dist/blocks/templates/index.d.ts +2 -2
- package/dist/blocks/templates/index.js +1 -1
- package/dist/blocks/time-tracking/index.d.ts +1 -1
- package/dist/blocks/time-tracking/index.js +1 -1
- package/dist/blocks/timeline/index.d.ts +1 -1
- package/dist/blocks/trash/index.d.ts +1 -1
- package/dist/blocks/trash/index.js +1 -1
- package/dist/blocks/undo/index.d.ts +2 -2
- package/dist/blocks/updated-at/index.d.ts +1 -1
- package/dist/blocks/updated-at/index.js +1 -1
- package/dist/blocks/usage/index.d.ts +2 -2
- package/dist/blocks/usage/index.js +1 -1
- package/dist/blocks/vercel-marketplace/index.d.ts +1 -1
- package/dist/blocks/vercel-marketplace/index.js +1 -1
- package/dist/blocks/versions/index.d.ts +1 -1
- package/dist/blocks/versions/index.js +1 -1
- package/dist/blocks/waitlist/index.d.ts +1 -1
- package/dist/blocks/waitlist/index.js +1 -1
- package/dist/blocks/webhooks/index.d.ts +1 -1
- package/dist/blocks/webhooks/index.js +1 -1
- package/dist/blocks/workflow-editor/index.d.ts +4 -4
- package/dist/blocks/workflow-editor/index.js +1 -1
- package/dist/blocks/workflows/index.d.ts +4 -4
- package/dist/{channel-BjvGO39m.d.ts → channel-JcMd5lNP.d.ts} +30 -2
- package/dist/cli/{add-DMcrsWjC.js → add-C5kLXuqn.js} +18 -13
- package/dist/cli/add-CFKvvXlK.js +1 -0
- package/dist/cli/{add-BinNYhFD.js → add-CTtj1dfh.js} +2 -2
- package/dist/cli/{backfill-DxBB62Zr.js → backfill-C-b6eH98.js} +4 -4
- package/dist/cli/bin.js +1 -1
- package/dist/cli/{blocks-DSgTifw0.js → blocks-CT8-TBdW.js} +2 -2
- package/dist/cli/{blocks-rxOS-Mzz.js → blocks-zpu__C1Y.js} +1 -1
- package/dist/cli/{cache-oU0yHKf0.js → cache-BxohmNou.js} +1 -1
- package/dist/cli/{codemod-Dsrv_3gQ.js → codemod-BVo3sdx7.js} +5 -5
- package/dist/cli/{command-CQ61x6gN.js → command-BWEEXmtz.js} +20 -0
- package/dist/cli/{completion-Dlu5AdUW.js → completion-8EDK21xj.js} +1 -1
- package/dist/cli/{completion-BwI0_Ap5.js → completion-BfnKI4QZ.js} +2 -2
- package/dist/cli/{completion-2Y3D_eNu.js → completion-Bt7LMypX.js} +2 -2
- package/dist/cli/{config-2rwFHbwj.js → config-BJSqMi04.js} +17 -5
- package/dist/cli/{config-C6XylzKz.js → config-BlfVh0IP.js} +1 -1
- package/dist/cli/{config-CPux9Wa7.js → config-WKDixoGK.js} +1 -1
- package/dist/cli/{content-mapper-DLbXilBz.js → content-mapper-D54wumPS.js} +2 -2
- package/dist/cli/{db-Bwrr3GHM.js → db-DYU5hUcd.js} +3 -3
- package/dist/cli/{doctor-CKt5Yyl4.js → doctor-DBxc5aud.js} +17 -16
- package/dist/cli/{env-BBl5L8Bf.js → env-BCgVZkcb.js} +1 -1
- package/dist/cli/env-xhwXk5Ri.js +1 -0
- package/dist/cli/{gen-CeG6lbka.js → gen--IBq-J4M.js} +22 -15
- package/dist/cli/index.d.ts +2 -2
- package/dist/cli/index.js +8 -8
- package/dist/cli/{init-DrQlf9RL.js → init-Dxvlzka4.js} +7 -7
- package/dist/cli/{keys-DGEpMbeB.js → keys-CbaL0lnw.js} +1 -1
- package/dist/cli/{legacy-prefix-DkTA3Rhx.js → legacy-prefix-R7UChFFl.js} +18 -5
- package/dist/cli/{live-BvWGM4c3.js → live-C-0OdLKE.js} +2 -2
- package/dist/cli/{mcp-BrOnGB15.js → mcp-3q5RDvYJ.js} +3 -3
- package/dist/cli/{metadata-BNSdPuKp.js → metadata-Dvc6U3bk.js} +3 -3
- package/dist/cli/{migration-safety-NtB3dsRU.js → migration-safety-DYgarZxP.js} +2 -2
- package/dist/cli/{module-migration-mKhX88V_.js → migrations-Cwh5VvUC.js} +3 -113
- package/dist/cli/module-migration-CXtSwDLu.js +119 -0
- package/dist/cli/{moved-CsfDQcyk.js → moved-DVwgE8lV.js} +1 -1
- package/dist/cli/{parse-B9Iv_-Pf.js → parse-B079x40m.js} +1 -1
- package/dist/cli/powersync-BAE2dlPJ.js +1 -0
- package/dist/cli/powersync-BCDuGn5p.js +283 -0
- package/dist/cli/{print-Dh8iuPK3.js → print-Dpfa_--H.js} +2 -1
- package/dist/cli/{remove-DfFXVBRr.js → remove-DpAwgO8A.js} +6 -6
- package/dist/cli/{render-ChIwdIOJ.js → render-D9c5ynjR.js} +8 -5
- package/dist/cli/{run-CLSHSVYo.js → run-CuzSU8Sk.js} +29 -10
- package/dist/cli/{run-BXx6D1aR.js → run-DmOTMa44.js} +2 -2
- package/dist/cli/{run-D48ZEU58.js → run-Q5V5Kle1.js} +38 -37
- package/dist/cli/{seed-CG-pA-5N.js → seed-D9mt8bnW.js} +3 -3
- package/dist/cli/seed-EPO6AvLG.js +1 -0
- package/dist/cli/{shared-D0XBFSlz.js → shared-BNScv93m.js} +1 -1
- package/dist/cli/{skills-toUan_OV.js → skills-FXAVPLzp.js} +1 -1
- package/dist/cli/{snapshot-C6vh_n3t.js → snapshot-k4R6vT20.js} +3 -3
- package/dist/cli/{source-BZbEK5if.js → source-MMQKgaIx.js} +1 -1
- package/dist/cli/{source-args-MTLYpifA.js → source-args-DlckPVje.js} +1 -1
- package/dist/cli/{spec-B4LhpI6t.js → spec-CCpPVw_T.js} +3 -3
- package/dist/cli/{spec-C-dhdKwa.js → spec-CqANRfuu.js} +1 -1
- package/dist/cli/{sql-layout-26LSoifK.js → sql-layout-AByPAQXl.js} +2 -2
- package/dist/cli/{stack-CWEHdO0b.js → stack-DgASZP0K.js} +1 -1
- package/dist/cli/{sync-CHGMZCJ5.js → sync-DYQVml8j.js} +3 -2
- package/dist/cli/{upgrade-C0dVsqNX.js → upgrade-DHcIHeRM.js} +5 -4
- package/dist/cli/{upgrade-GB9rqUGT.js → upgrade-f-3Nl6lO.js} +3 -3
- package/dist/cli/{version-T507a49w.js → version-DzroJkIT.js} +1 -1
- package/dist/client/index.d.ts +5 -5
- package/dist/client/native/index.d.ts +4 -4
- package/dist/{composite-B7f1MMgr.d.ts → composite-C-8A8qzi.d.ts} +2 -2
- package/dist/{composite-B3TIjId4.js → composite-D24L5RIY.js} +2 -2
- package/dist/config/index.d.ts +3 -3
- package/dist/config/index.js +4 -4
- package/dist/{config-CIBc79_8.js → config-CD2OGfCG.js} +2 -1
- package/dist/{config-BVNNJwGC.js → config-mbVyJwSc.js} +3 -3
- package/dist/{context-CKCgjEDF.d.ts → context-D24k1Cpc.d.ts} +29 -4
- package/dist/{controller-CJUXhshv.d.ts → controller-BR7CZ1R9.d.ts} +1 -1
- package/dist/{conversion-DgHdDlTK.d.ts → conversion-BgtOfTaS.d.ts} +1 -1
- package/dist/create/index.d.ts +2 -2
- package/dist/create/index.js +5 -5
- package/dist/{define-block-Xxw8Hroe.d.ts → define-block-CJWiDWa5.d.ts} +10 -3
- package/dist/edge/index.d.ts +5 -5
- package/dist/edge/index.js +7 -7
- package/dist/elysia/index.d.ts +1 -1
- package/dist/elysia/index.js +1 -1
- package/dist/{email-tt2QqiSc.d.ts → email-B3YxEzwC.d.ts} +1 -1
- package/dist/{entitlements-B0jmjNLD.d.ts → entitlements-DHcNt1aF.d.ts} +1 -1
- package/dist/{events-SqJLbb8q.js → events-DuLhzjP6.js} +2 -0
- package/dist/expo/index.d.ts +1 -1
- package/dist/expo/index.js +3 -3
- package/dist/{field-errors-DqlebtTE.d.ts → field-errors-DkAemDoc.d.ts} +5 -5
- package/dist/{framework-BozTXRzt.js → framework-CNhTg0th.js} +1 -1
- package/dist/{framework-CF6zFU7a.d.ts → framework-x9Y4uB1q.d.ts} +4 -4
- package/dist/h3/index.d.ts +1 -1
- package/dist/h3/index.js +1 -1
- package/dist/h3/v1/index.d.ts +1 -1
- package/dist/h3/v1/index.js +1 -1
- package/dist/hono/index.d.ts +4 -4
- package/dist/hono/index.js +7 -6
- package/dist/{index-Dbb7BQdi.d.ts → index-4WT_uRRL.d.ts} +14 -3
- package/dist/{index-BCeTYhFk.d.ts → index-BAcQz5DS.d.ts} +1 -1
- package/dist/{index-B8YjrfVl.d.ts → index-C0t-vNIt.d.ts} +1 -1
- package/dist/{index-DUxXdQN_.d.ts → index-C6ruLtyx.d.ts} +2 -2
- package/dist/{index-ClMN0f98.d.ts → index-DTbJAsrT.d.ts} +8 -8
- package/dist/{index-lB-8iPmY.d.ts → index-DmbCyl6Z.d.ts} +9 -5
- package/dist/{index-BxYOB1Oc.d.ts → index-iRkFvJ7J.d.ts} +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/{instances-QOzIz9-q.js → instances-DDt7NdVl.js} +1 -1
- package/dist/{kit-DOwKpSkA.d.ts → kit-CVgQCIBO.d.ts} +1 -1
- package/dist/{kit-5l-o8RxL.js → kit-DhlB-vv_.js} +1 -1
- package/dist/mapper/bin.js +7 -6
- package/dist/mcp/index.d.ts +9 -3
- package/dist/mcp/index.js +6 -6
- package/dist/mcp/sdk/index.d.ts +1 -1
- package/dist/mcp/sdk/index.js +2 -2
- package/dist/{methods-B3o7BFOW.js → methods-Cund9ZBe.js} +1 -1
- package/dist/nestjs/index.d.ts +2 -2
- package/dist/nestjs/index.js +1 -1
- package/dist/next/index.d.ts +12 -12
- package/dist/next/index.js +6 -6
- package/dist/node/index.d.ts +2 -2
- package/dist/node/index.js +1 -1
- package/dist/{operations-Dc07aV_H.d.ts → operations-CAjMgNr9.d.ts} +1 -1
- package/dist/{options-CK5WiFwG.js → options-3OYOU56e.js} +1 -1
- package/dist/{options-xD4_FRUq.js → options-56zYYXxc.js} +1 -1
- package/dist/{options-_F-enoBs.d.ts → options-5WvWOkAm.d.ts} +1 -1
- package/dist/{options-SViK_2x2.js → options-62woPFn3.js} +1 -1
- package/dist/{options-1GgseJq5.js → options-7ixoOoap.js} +1 -1
- package/dist/{options-BZsoPJGX.js → options-9dSU5RML.js} +2 -2
- package/dist/{options-y_-AkVCs.d.ts → options-B0YZtAkb.d.ts} +1 -1
- package/dist/{options-HLwOuF2H.js → options-B2Kz_tCx.js} +2 -2
- package/dist/{options-CEMawFrr.js → options-B685YSzQ.js} +1 -1
- package/dist/{options-DWbA9buW.js → options-B692WoK6.js} +2 -2
- package/dist/options-BHU1wc74.js +5 -0
- package/dist/{options-CPK2nQER.js → options-BHy0Z5Zd.js} +2 -2
- package/dist/{options-Fz6xqu-b.js → options-BKDxrPvE.js} +2 -2
- package/dist/{options-BVg58avP.js → options-BLfymS4s.js} +2 -2
- package/dist/{options-CYV4iZiQ.js → options-BOCRbzh3.js} +1 -1
- package/dist/{options-tSsUF0-7.js → options-BQWJqwHO.js} +1 -1
- package/dist/{options-Cl9Ag2Pt.js → options-BQunK6_Y.js} +2 -2
- package/dist/{options-CljDnQt2.js → options-BQyrZjwM.js} +4 -1
- package/dist/options-BR9xTHZW.js +5 -0
- package/dist/{options-D40CQzji.js → options-BRUdd5jY.js} +1 -1
- package/dist/{options-CsGl5BLH.d.ts → options-BTmaRzx2.d.ts} +13 -5
- package/dist/{options-Li1Dyu88.d.ts → options-BUCQYAeJ.d.ts} +2 -2
- package/dist/{options-B5BU2Yg7.js → options-BawzwlmC.js} +2 -2
- package/dist/{options-BlzSfWxC.d.ts → options-BbLDAp7G.d.ts} +2 -2
- package/dist/{options-DTDxFT6J.js → options-Bc4xz5jQ.js} +2 -2
- package/dist/options-BfFC4iFE.js +8 -0
- package/dist/{options-Br1Xi2Hw.js → options-BfPsL7E2.js} +1 -1
- package/dist/{options-DYBQ973I.js → options-Bfmwwc78.js} +1 -1
- package/dist/{options-c5WCsky5.js → options-BhsdveDk.js} +2 -2
- package/dist/{options-B5woz53h.js → options-BomoTH-8.js} +2 -2
- package/dist/{options-DeNejBtq.js → options-BtjkzIVh.js} +1 -1
- package/dist/options-Bvi9bl4H.js +5 -0
- package/dist/{options-IHPg8ZoA.js → options-BwKNmaJo.js} +2 -2
- package/dist/{options-CtUUU71w.js → options-BxpLtyk-.js} +4 -6
- package/dist/{options-D_bBVCXg.js → options-BzB2QxL3.js} +1 -1
- package/dist/{options-CmraJhd9.js → options-C078wBP0.js} +1 -1
- package/dist/options-C1-pwEqm.js +5 -0
- package/dist/{options-BZOliZvb.js → options-C3AdsFJ6.js} +2 -2
- package/dist/options-C7C5OhmL.d.ts +8 -0
- package/dist/{options-CCUaRLgd.js → options-C87u6eSa.js} +1 -1
- package/dist/{options-CVSWgZpY.js → options-CBAEGxwS.js} +1 -1
- package/dist/{options-9gvPo1BC.js → options-CDUr8zzX.js} +1 -1
- package/dist/{options-DMR68VAC.js → options-CFjGxfa8.js} +2 -2
- package/dist/{options-Bf96aVk5.js → options-CI6P0xhV.js} +1 -1
- package/dist/{options-B5VUf4IT.js → options-CJFMK9A_.js} +1 -1
- package/dist/{options-CRz8Ht_4.js → options-CLpgx7en.js} +3 -2
- package/dist/{options-BesyRBnM.js → options-CTXHj9zr.js} +2 -2
- package/dist/{options-D2d1fFuw.js → options-CTl8T88w.js} +1 -1
- package/dist/{options-C3RgtOLo.js → options-CTv-xmbA.js} +2 -2
- package/dist/{options-Bpl-WFPk.js → options-CUIOOv4z.js} +1 -1
- package/dist/{options-o2kfYU2x.js → options-CZDmtsbV.js} +2 -2
- package/dist/{options-CF7nRWXS.js → options-CZTscdPB.js} +1 -1
- package/dist/{options-BlncUmIc.js → options-CZdKndeo.js} +2 -2
- package/dist/{options-DplE18Ko.d.ts → options-C_7g9TTq.d.ts} +1 -1
- package/dist/{options-C_pb1Nd3.js → options-Cb2FOFj5.js} +1 -1
- package/dist/{options-t_O5ldT6.js → options-CbOstLa7.js} +2 -2
- package/dist/{options-Bt0bYMLl.js → options-CcXgWlvm.js} +2 -2
- package/dist/{options-BMjcVuaI.js → options-CfVPctAw.js} +7 -0
- package/dist/{options-DWpz3V3F.js → options-ChiL-4ZS.js} +2 -2
- package/dist/{options-E7KcmHQv.js → options-Cjgaf8ub.js} +2 -2
- package/dist/{options-DrSkIBCD.js → options-CoSPgWKy.js} +1 -1
- package/dist/{options-Bp7sgKvl.js → options-CpZ2HlSU.js} +5 -3
- package/dist/{options-CN7PHkhU.js → options-CsSe8Nba.js} +1 -1
- package/dist/{options-B9q8CROT.js → options-CsvJR-r2.js} +1 -1
- package/dist/{options-oeAq4Ho5.js → options-Cucv6sWP.js} +2 -2
- package/dist/{options-BOOEzor9.js → options-CyjL9lTf.js} +2 -2
- package/dist/{options-pOVWwbAK.d.ts → options-D-OOO9V2.d.ts} +1 -1
- package/dist/{options-nFzfgtA6.js → options-D0Y6ZMe8.js} +1 -1
- package/dist/{options-BnZS7IK-.js → options-D0sj5abR.js} +2 -2
- package/dist/{options-0qvUckqt.js → options-D2s7fT1s.js} +2 -2
- package/dist/{options-BjtrC7o6.js → options-D32-YxnO.js} +1 -1
- package/dist/{options-B0EJULm5.js → options-D610Fa6T.js} +2 -2
- package/dist/{options-BvtnxHfK.js → options-D96dScev.js} +1 -1
- package/dist/{options-DgQo80Xh.js → options-DFpyP1bg.js} +2 -2
- package/dist/{options-BYOtaF7w.js → options-DJEcS4DX.js} +1 -1
- package/dist/{options-DPgdAXO5.js → options-DJbN3bi9.js} +2 -2
- package/dist/{options-EsUh744F.js → options-DKoQoRCy.js} +2 -2
- package/dist/{options-CvD9vNvx.js → options-DM1qaMMQ.js} +1 -1
- package/dist/{options-eBPsk4WI.js → options-DNgSwhsm.js} +2 -2
- package/dist/{options-2EMA_x6_.js → options-DOIwzRXL.js} +2 -2
- package/dist/{options-D6as77gU.d.ts → options-DRIgHh4O.d.ts} +2 -2
- package/dist/{options-DDzggjN7.js → options-DRrZmJyI.js} +2 -2
- package/dist/{options-DJ-aYPVN.js → options-DUMUsvml.js} +2 -2
- package/dist/{options-Cp0HyUEk.js → options-DWwL5Kaz.js} +1 -1
- package/dist/{options-BCrqe3HH.js → options-DZHZYlpD.js} +1 -1
- package/dist/{options-BQIYfx9F.js → options-DZLkeqWn.js} +2 -2
- package/dist/{options-RKYdmIdV.js → options-DZRpXKQE.js} +1 -1
- package/dist/{options-D0G06Zm9.js → options-D_9Vxx7f.js} +2 -2
- package/dist/{options-BMGClqoa.js → options-DcHl59RC.js} +1 -1
- package/dist/{options-CW9wTqOk.js → options-Dcaql09y.js} +1 -1
- package/dist/{options-CXFz0xxS.js → options-DcnBNYmV.js} +1 -1
- package/dist/{options-21s0dpnX.js → options-DdpM-fiP.js} +2 -2
- package/dist/{options-BbnPv6p7.js → options-DhdazgTZ.js} +2 -2
- package/dist/{options-C239TLRF.js → options-Dpy-Ruo-.js} +1 -1
- package/dist/{options-DWVYM8P0.d.ts → options-DsVuVRH3.d.ts} +1 -1
- package/dist/{options-BlOPivzq.js → options-DtAJxfHS.js} +1 -1
- package/dist/{options-DXnBN2E7.js → options-Dz9Yo52Z.js} +2 -2
- package/dist/{options-DcOx8_3X.d.ts → options-HnfETSHr.d.ts} +1 -1
- package/dist/{options-CoX6VKGb.js → options-LqUXTpML.js} +1 -1
- package/dist/options-MsloEAIB.js +5 -0
- package/dist/{options-DCduTMST.js → options-P2FxqYpd.js} +2 -2
- package/dist/options-_1gAIMq7.d.ts +60 -0
- package/dist/{options-B0FcEKtH.js → options-aT89JqlB.js} +1 -1
- package/dist/{options-Cyu0hgmN.js → options-cVKZu9b0.js} +2 -2
- package/dist/options-fMxhtuVR.js +5 -0
- package/dist/{options-BxcFLL1G.js → options-fkShrmGQ.js} +2 -2
- package/dist/{options-Ctac2R0Q.js → options-gUvfr3no.js} +2 -2
- package/dist/{options-DNKyN5uq.js → options-hynwKWuf.js} +2 -2
- package/dist/{options-CkScQRJR.js → options-lsxJYfYx.js} +2 -2
- package/dist/{options-CyAhRKKm.d.ts → options-o5wCw8H7.d.ts} +2 -2
- package/dist/{options-DARkpk2P.js → options-p49DFg3H.js} +2 -2
- package/dist/{options-zkyhM3qi.js → options-pYNpXKcg.js} +1 -1
- package/dist/{options-Cqq2jUww.js → options-qtETCHzW.js} +2 -2
- package/dist/options-rnKlqYEr.js +5 -0
- package/dist/{options-KV84gAxl.js → options-sU_zGkiV.js} +2 -2
- package/dist/{options-BfLmA375.js → options-xq4MXG1M.js} +2 -2
- package/dist/{options-BA6jV6py.js → options-zzlznRA7.js} +2 -2
- package/dist/orpc/index.d.ts +19 -8
- package/dist/orpc/index.js +60 -31
- package/dist/otel/index.d.ts +1 -1
- package/dist/otel/index.js +5 -5
- package/dist/{ports-DnpAuTvB.d.ts → ports-g0H1Kzwr.d.ts} +1 -1
- package/dist/powersync/index.d.ts +135 -2
- package/dist/powersync/index.js +333 -1
- package/dist/preset/index.d.ts +3 -3
- package/dist/preset/index.js +3 -3
- package/dist/{preset-BIANzB5p.js → preset-B3CukUhu.js} +4 -4
- package/dist/{push-token-C_mFkYfq.d.ts → push-token-Cl2EihRc.d.ts} +1 -1
- package/dist/query/index.d.ts +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-router/index.d.ts +3 -3
- package/dist/react-router/index.js +5 -5
- package/dist/{react-CZUZYn9E.js → react-zBTxLsV6.js} +1 -1
- package/dist/realtime/index.d.ts +3 -3
- package/dist/realtime/index.js +2 -2
- package/dist/{record-form-xWvVcb86.d.ts → record-form-zMwz0Ayt.d.ts} +1 -1
- package/dist/records/index.d.ts +7 -7
- package/dist/{refusal-ByBZcm0V.js → refusal-D48CMqpQ.js} +2 -2
- package/dist/{refusal-CSntB_x8.d.ts → refusal-OrlI3g4H.d.ts} +1 -1
- package/dist/{relay-gKvKJ3xf.js → relay-CIKcAVjf.js} +61 -21
- package/dist/{resource-DV2GC2dB.js → resource-R3KToNze.js} +1 -1
- package/dist/{resource-execute-DqWfEc56.d.ts → resource-execute-CKBtGL8-.d.ts} +1 -1
- package/dist/{resource-types-BIoz_ElD.d.ts → resource-types-8Q5Klkpa.d.ts} +1 -1
- package/dist/{resources-C02l_YBJ.js → resources-DqIwoQsP.js} +1 -1
- package/dist/{resources-Bt2PDKE7.d.ts → resources-DxpqenZA.d.ts} +1 -1
- package/dist/{respond-C3CcOZlA.js → respond-3RKp6VgU.js} +8 -1
- package/dist/{respond-Dn1_YhC1.d.ts → respond-oZeJ342J.d.ts} +6 -0
- package/dist/server/index.d.ts +9 -8
- package/dist/server/index.js +17 -10
- package/dist/{session-C1OuXbtN.d.ts → session-Fcft5A39.d.ts} +1 -1
- package/dist/{sign-in-B64114O4.js → sign-in-BLkRU3lc.js} +1 -1
- package/dist/solid/index.d.ts +5 -5
- package/dist/solid-start/index.d.ts +3 -3
- package/dist/solid-start/index.js +5 -5
- package/dist/spec/index.d.ts +2 -2
- package/dist/spec/index.js +1 -1
- package/dist/{spec-pins-DIx95afw.d.ts → spec-pins-BZkKfwY8.d.ts} +2 -0
- package/dist/{spec-pins-C1Vm8OBl.js → spec-pins-D3zDek-u.js} +1 -0
- package/dist/sql/index.d.ts +5 -5
- package/dist/sql/index.js +5 -5
- package/dist/{sql-ClTmzHs8.js → sql-fHTjZGqR.js} +2608 -1415
- package/dist/sql-type-iUSZpaUu.js +34 -0
- package/dist/ssr/index.d.ts +1 -1
- package/dist/{statuses-DMMDwXpZ.js → statuses-Alll5Ip6.js} +2 -2
- package/dist/storage/index.js +1 -1
- package/dist/svelte/index.d.ts +5 -5
- package/dist/sveltekit/index.d.ts +3 -3
- package/dist/sveltekit/index.js +5 -5
- package/dist/tanstack-start/index.d.ts +3 -3
- package/dist/tanstack-start/index.js +5 -5
- package/dist/{tenant-DVvjw9H-.d.ts → tenant-DyoVYFfC.d.ts} +1 -1
- package/dist/testing/index.d.ts +7 -7
- package/dist/testing/index.js +6 -3
- package/dist/{timeline-BBfKuMVL.d.ts → timeline-CMmo0R7g.d.ts} +2 -2
- package/dist/{topic-ikV_pLTX.js → topic-J9I3yu6f.js} +1 -1
- package/dist/{topic-BtLz-qTI.d.ts → topic-nQYxoTaU.d.ts} +1 -1
- package/dist/vue/index.d.ts +5 -5
- package/dist/{watch-topic-tnfOTa3-.d.ts → watch-topic-UGSEWAqR.d.ts} +1 -1
- package/dist/workflow-sdk/world/index.js +1 -1
- package/dist/{workflow-sdk-Bw6_u0ar.js → workflow-sdk-DELaQEp3.js} +2 -0
- package/dist/yjs/index.d.ts +1 -1
- package/dist/yjs/index.js +1 -1
- package/package.json +1 -1
- package/schemas/config-v1.json +449 -69
- package/dist/cli/add-z-3pXI6C.js +0 -1
- package/dist/cli/env-CAU1nknN.js +0 -1
- package/dist/cli/seed-CUxW5Dks.js +0 -1
- package/dist/options-63AKQNv0.js +0 -5
- package/dist/options-B-cxGmRA.js +0 -5
- package/dist/options-BPDiwSa-.js +0 -5
- package/dist/options-C6rEL6U5.js +0 -8
- package/dist/options-CE93HOYi.d.ts +0 -7
- package/dist/options-CTZNpb2n.js +0 -5
- package/dist/options-CrC78Tee.js +0 -5
- package/dist/options-DINdgVih.d.ts +0 -9
- package/dist/options-DWML05Cp.js +0 -5
- package/dist/options-Q1Bzgqpr.js +0 -5
package/dist/powersync/index.js
CHANGED
|
@@ -341,4 +341,336 @@ function createUploadConnector(options) {
|
|
|
341
341
|
};
|
|
342
342
|
}
|
|
343
343
|
//#endregion
|
|
344
|
-
|
|
344
|
+
//#region src/powersync/attachments.ts
|
|
345
|
+
/** The columns an attachment insert accepts, besides `id`. */
|
|
346
|
+
const WRITABLE = [
|
|
347
|
+
"organization_id",
|
|
348
|
+
"bucket",
|
|
349
|
+
"subject_type",
|
|
350
|
+
"subject_id",
|
|
351
|
+
"name",
|
|
352
|
+
"mime_type",
|
|
353
|
+
"size",
|
|
354
|
+
"metadata",
|
|
355
|
+
"width",
|
|
356
|
+
"height",
|
|
357
|
+
"pages"
|
|
358
|
+
];
|
|
359
|
+
const DEFAULT_PATH = "{organization_id}/attachments/{id}";
|
|
360
|
+
const PLACEHOLDER = /\{([a-z_]+)\}/g;
|
|
361
|
+
function placeholder(row, key) {
|
|
362
|
+
switch (key) {
|
|
363
|
+
case "id": return row.id;
|
|
364
|
+
case "organization_id": return row.organization_id ?? "-";
|
|
365
|
+
case "subject_type": return row.subject_type ?? "-";
|
|
366
|
+
case "subject_id": return row.subject_id ?? "-";
|
|
367
|
+
case "ext": return /\.([a-z0-9]{1,10})$/.exec((row.name ?? "").toLowerCase())?.[1] ?? "";
|
|
368
|
+
default: throw new TypeError(`better-supabase: {${key}} is not an attachments path placeholder`);
|
|
369
|
+
}
|
|
370
|
+
}
|
|
371
|
+
function attachmentQueueRoute(repository, options = {}) {
|
|
372
|
+
const template = options.path ?? DEFAULT_PATH;
|
|
373
|
+
const columns = [...WRITABLE, ...options.extraColumns ?? []];
|
|
374
|
+
const route = async (entry) => {
|
|
375
|
+
switch (entry.op) {
|
|
376
|
+
case "PUT": {
|
|
377
|
+
const data = entry.opData ?? {};
|
|
378
|
+
const row = { id: entry.id };
|
|
379
|
+
for (const column of columns) if (data[column] !== void 0) row[column] = data[column];
|
|
380
|
+
const result = await repository.create(row);
|
|
381
|
+
return !result.ok && result.error.kind === "conflict" ? ok(void 0) : result;
|
|
382
|
+
}
|
|
383
|
+
case "DELETE": {
|
|
384
|
+
const result = await repository.delete(entry.id);
|
|
385
|
+
return !result.ok && result.error.kind === "not_found" ? ok(void 0) : result;
|
|
386
|
+
}
|
|
387
|
+
default: return err(dbError("unsupported", `better-supabase: attachmentQueueRoute can't replay PowerSync op ${entry.op}; attachments are written once`));
|
|
388
|
+
}
|
|
389
|
+
};
|
|
390
|
+
return Object.assign(route, { path: (row) => {
|
|
391
|
+
const base = template.replaceAll(PLACEHOLDER, (_, key) => placeholder(row, key));
|
|
392
|
+
return (row.version ?? 1) > 1 ? `${base}-v${String(row.version)}` : base;
|
|
393
|
+
} });
|
|
394
|
+
}
|
|
395
|
+
//#endregion
|
|
396
|
+
//#region src/powersync/notifications.ts
|
|
397
|
+
const FUNCTIONS = [
|
|
398
|
+
"get_notification",
|
|
399
|
+
"list_notifications",
|
|
400
|
+
"notification_page",
|
|
401
|
+
"notification_counts",
|
|
402
|
+
"mark_notifications_read",
|
|
403
|
+
"mark_notifications_unread",
|
|
404
|
+
"dismiss_notifications"
|
|
405
|
+
];
|
|
406
|
+
/** Event columns the item reads by name; any other column becomes a field. */
|
|
407
|
+
const EVENT_COLUMNS = /* @__PURE__ */ new Set([
|
|
408
|
+
"id",
|
|
409
|
+
"type",
|
|
410
|
+
"data",
|
|
411
|
+
"actor_id",
|
|
412
|
+
"subject_type",
|
|
413
|
+
"subject_id",
|
|
414
|
+
"subject_label",
|
|
415
|
+
"summary",
|
|
416
|
+
"action_path",
|
|
417
|
+
"actions",
|
|
418
|
+
"priority",
|
|
419
|
+
"created_at",
|
|
420
|
+
"updated_at"
|
|
421
|
+
]);
|
|
422
|
+
/**
|
|
423
|
+
* A block transport for the notifications module on PowerSync: the feed, its
|
|
424
|
+
* counts and marking read, unread or dismissed run on the synced tables, so the
|
|
425
|
+
* inbox works offline. Writes go into PowerSync's upload queue, which
|
|
426
|
+
* `notificationRecipientsRoute` replays on the server. Every other function
|
|
427
|
+
* (sending, preferences, resolving) goes to `server`.
|
|
428
|
+
*
|
|
429
|
+
* ```ts
|
|
430
|
+
* const notifications = createNotifications({
|
|
431
|
+
* transport: powersyncNotificationsTransport(powersync, {
|
|
432
|
+
* server: rpcTransport(supabase),
|
|
433
|
+
* }),
|
|
434
|
+
* });
|
|
435
|
+
* ```
|
|
436
|
+
*
|
|
437
|
+
* The synced rows are the signed-in user's only (the `powersync streams` query
|
|
438
|
+
* filters by `auth.user_id()`), so the local reads add no user filter.
|
|
439
|
+
*/
|
|
440
|
+
function powersyncNotificationsTransport(database, options) {
|
|
441
|
+
const recipients = quoteSqliteIdent(options.tables?.recipients ?? "notification_recipients");
|
|
442
|
+
const events = quoteSqliteIdent(options.tables?.events ?? "notification_events");
|
|
443
|
+
const tenant = options.tenantColumn ?? "organization_id";
|
|
444
|
+
const tenantColumn = quoteSqliteIdent(tenant);
|
|
445
|
+
const byName = new Map(FUNCTIONS.map((fn) => [options.functions?.[fn] ?? fn, fn]));
|
|
446
|
+
const toItem = (recipient, event) => {
|
|
447
|
+
const fields = {};
|
|
448
|
+
for (const [key, value] of Object.entries(event)) if (!EVENT_COLUMNS.has(key) && key !== tenant) fields[key] = value;
|
|
449
|
+
return {
|
|
450
|
+
id: recipient["id"],
|
|
451
|
+
event_id: event["id"],
|
|
452
|
+
type: event["type"],
|
|
453
|
+
data: json(event["data"]) ?? {},
|
|
454
|
+
created_at: timestamp(recipient["created_at"]),
|
|
455
|
+
read_at: timestamp(recipient["read_at"]),
|
|
456
|
+
tenant: event[tenant] ?? null,
|
|
457
|
+
actor_id: event["actor_id"] ?? null,
|
|
458
|
+
subject_type: event["subject_type"] ?? null,
|
|
459
|
+
subject_id: event["subject_id"] ?? null,
|
|
460
|
+
subject_label: event["subject_label"] ?? null,
|
|
461
|
+
summary: event["summary"] ?? null,
|
|
462
|
+
action_path: event["action_path"] ?? null,
|
|
463
|
+
actions: json(event["actions"]) ?? [],
|
|
464
|
+
priority: event["priority"] ?? null,
|
|
465
|
+
resolved_at: timestamp(recipient["resolved_at"]),
|
|
466
|
+
resolution: json(recipient["resolution"]) ?? null,
|
|
467
|
+
...Object.keys(fields).length === 0 ? {} : { fields }
|
|
468
|
+
};
|
|
469
|
+
};
|
|
470
|
+
/** Recipients with their events, newest first. */
|
|
471
|
+
const items = async (context, where, parameters) => {
|
|
472
|
+
const rows = await context.getAll(`SELECT rc.* FROM ${recipients} rc JOIN ${events} ev ON ev.id = rc.event_id WHERE ${where}`, parameters);
|
|
473
|
+
const ids = [...new Set(rows.map((row) => String(row["event_id"])))];
|
|
474
|
+
const found = ids.length === 0 ? [] : await context.getAll(`SELECT * FROM ${events} WHERE id IN (${marks(ids)})`, ids);
|
|
475
|
+
const eventsById = new Map(found.map((row) => [String(row["id"]), row]));
|
|
476
|
+
return rows.flatMap((row) => {
|
|
477
|
+
const event = eventsById.get(String(row["event_id"]));
|
|
478
|
+
return event === void 0 ? [] : [toItem(row, event)];
|
|
479
|
+
}).toSorted(newestFirst);
|
|
480
|
+
};
|
|
481
|
+
const filters = (args, clauses, parameters) => {
|
|
482
|
+
const add = (clause, ...values) => {
|
|
483
|
+
clauses.push(clause);
|
|
484
|
+
parameters.push(...values);
|
|
485
|
+
};
|
|
486
|
+
if (typeof args["tenant"] === "string") add(`rc.${tenantColumn} = ?`, args["tenant"]);
|
|
487
|
+
const dismissed = args["status"] === "settled" ? null : args["dismissed"] ?? false;
|
|
488
|
+
if (dismissed !== null) clauses.push(dismissed === true ? "rc.dismissed_at IS NOT NULL" : "rc.dismissed_at IS NULL");
|
|
489
|
+
switch (args["status"]) {
|
|
490
|
+
case "unread":
|
|
491
|
+
clauses.push("rc.read_at IS NULL");
|
|
492
|
+
break;
|
|
493
|
+
case "read":
|
|
494
|
+
clauses.push("rc.read_at IS NOT NULL");
|
|
495
|
+
break;
|
|
496
|
+
case "unresolved":
|
|
497
|
+
clauses.push("rc.resolved_at IS NULL");
|
|
498
|
+
break;
|
|
499
|
+
case "settled": clauses.push("(rc.resolved_at IS NOT NULL OR rc.dismissed_at IS NOT NULL)");
|
|
500
|
+
}
|
|
501
|
+
if (typeof args["read"] === "boolean") clauses.push(args["read"] ? "rc.read_at IS NOT NULL" : "rc.read_at IS NULL");
|
|
502
|
+
if (typeof args["resolved"] === "boolean") clauses.push(args["resolved"] ? "rc.resolved_at IS NOT NULL" : "rc.resolved_at IS NULL");
|
|
503
|
+
for (const [key, column] of [["types", "ev.type"], ["subject_types", "ev.subject_type"]]) {
|
|
504
|
+
const values = arrayOf(args[key]);
|
|
505
|
+
if (values !== void 0) add(values.length === 0 ? "0" : `${column} IN (${marks(values)})`, ...values);
|
|
506
|
+
}
|
|
507
|
+
if (typeof args["search"] === "string" && args["search"] !== "") add("(coalesce(ev.summary, '') || ' ' || coalesce(ev.subject_label, '') || ' ' || ev.type) LIKE ? ESCAPE '\\'", `%${args["search"].replaceAll(/[\\%_]/gu, (match) => `\\${match}`)}%`);
|
|
508
|
+
};
|
|
509
|
+
const list = async (args) => {
|
|
510
|
+
const clauses = [];
|
|
511
|
+
const parameters = [];
|
|
512
|
+
filters(args, clauses, parameters);
|
|
513
|
+
const all = await items(database, joined(clauses), parameters);
|
|
514
|
+
const before = typeof args["before"] === "string" ? args["before"] : null;
|
|
515
|
+
const beforeId = typeof args["before_id"] === "string" ? args["before_id"] : null;
|
|
516
|
+
return before === null ? all : all.filter((item) => {
|
|
517
|
+
const at = time(item["created_at"]);
|
|
518
|
+
const cursor = Date.parse(postgrestTimestamp(before));
|
|
519
|
+
return at < cursor || at === cursor && beforeId !== null && String(item["id"]) < beforeId;
|
|
520
|
+
});
|
|
521
|
+
};
|
|
522
|
+
const mark = async (set, stamps, where, args) => database.writeTransaction(async (tx) => {
|
|
523
|
+
const clauses = [where];
|
|
524
|
+
const parameters = [];
|
|
525
|
+
const ids = arrayOf(args["ids"]);
|
|
526
|
+
if (ids !== void 0) {
|
|
527
|
+
clauses.push(ids.length === 0 ? "0" : `rc.id IN (${marks(ids)})`);
|
|
528
|
+
parameters.push(...ids);
|
|
529
|
+
}
|
|
530
|
+
if (typeof args["tenant"] === "string") {
|
|
531
|
+
clauses.push(`rc.${tenantColumn} = ?`);
|
|
532
|
+
parameters.push(args["tenant"]);
|
|
533
|
+
}
|
|
534
|
+
const changed = (await tx.getAll(`SELECT rc.id FROM ${recipients} rc WHERE ${clauses.join(" AND ")}`, parameters)).map((row) => row.id);
|
|
535
|
+
if (changed.length === 0) return {
|
|
536
|
+
count: 0,
|
|
537
|
+
items: []
|
|
538
|
+
};
|
|
539
|
+
const now = (/* @__PURE__ */ new Date()).toISOString();
|
|
540
|
+
await tx.execute(`UPDATE ${recipients} SET ${set} WHERE id IN (${marks(changed)})`, [...Array.from({ length: stamps }, () => now), ...changed]);
|
|
541
|
+
const updated = await items(tx, `rc.id IN (${marks(changed)})`, changed);
|
|
542
|
+
return {
|
|
543
|
+
count: updated.length,
|
|
544
|
+
items: updated
|
|
545
|
+
};
|
|
546
|
+
});
|
|
547
|
+
const local = async (fn, args) => {
|
|
548
|
+
switch (fn) {
|
|
549
|
+
case "get_notification": {
|
|
550
|
+
const [item] = await items(database, "rc.id = ?", [args["id"]]);
|
|
551
|
+
return item ?? null;
|
|
552
|
+
}
|
|
553
|
+
case "list_notifications": return (await list(args)).slice(0, limit(args["max_items"], 0));
|
|
554
|
+
case "notification_page": {
|
|
555
|
+
const all = await list(args);
|
|
556
|
+
const skip = Math.max(Number(args["skip"] ?? 0), 0);
|
|
557
|
+
return {
|
|
558
|
+
items: all.slice(skip, skip + limit(args["max_items"], 1)),
|
|
559
|
+
total: all.length
|
|
560
|
+
};
|
|
561
|
+
}
|
|
562
|
+
case "notification_counts": return counts(await list({ tenant: args["tenant"] }), args);
|
|
563
|
+
case "mark_notifications_read": return mark("read_at = ?", 1, "rc.read_at IS NULL AND rc.dismissed_at IS NULL", args);
|
|
564
|
+
case "mark_notifications_unread": return mark("read_at = NULL", 0, "rc.read_at IS NOT NULL AND rc.dismissed_at IS NULL", args);
|
|
565
|
+
case "dismiss_notifications": return mark("dismissed_at = ?, read_at = coalesce(read_at, ?)", 2, "rc.dismissed_at IS NULL", { ids: args["ids"] });
|
|
566
|
+
default: throw new TypeError(`Unhandled notification function ${String(fn)}`);
|
|
567
|
+
}
|
|
568
|
+
};
|
|
569
|
+
return { call(schema, fn, args) {
|
|
570
|
+
const handled = byName.get(fn);
|
|
571
|
+
return handled === void 0 ? options.server.call(schema, fn, args) : local(handled, args);
|
|
572
|
+
} };
|
|
573
|
+
}
|
|
574
|
+
function counts(all, args) {
|
|
575
|
+
const actionable = new Set(Array.isArray(args["actionable"]) ? args["actionable"].map(String) : []);
|
|
576
|
+
const open = all.filter((item) => item["resolved_at"] === null && actionable.has(String(item["type"])));
|
|
577
|
+
const subjects = new Set(open.map((item) => item["subject_id"] === null ? `recipient:${String(item["id"])}` : JSON.stringify([
|
|
578
|
+
item["tenant"],
|
|
579
|
+
item["subject_type"],
|
|
580
|
+
item["subject_id"]
|
|
581
|
+
])));
|
|
582
|
+
return {
|
|
583
|
+
unread: all.filter((item) => item["read_at"] === null).length,
|
|
584
|
+
actionable: open.length,
|
|
585
|
+
actionable_subjects: subjects.size
|
|
586
|
+
};
|
|
587
|
+
}
|
|
588
|
+
/**
|
|
589
|
+
* The upload route for `notification_recipients`: replays a local mark read,
|
|
590
|
+
* unread or dismiss through the server's functions, which check the caller owns
|
|
591
|
+
* the row. Pass a notifications client on `rpcTransport(supabase)`; one on
|
|
592
|
+
* `powersyncNotificationsTransport` would write the change locally again.
|
|
593
|
+
*
|
|
594
|
+
* ```ts
|
|
595
|
+
* createUploadConnector({
|
|
596
|
+
* routes: {
|
|
597
|
+
* notification_recipients: notificationRecipientsRoute(
|
|
598
|
+
* serverNotifications,
|
|
599
|
+
* ),
|
|
600
|
+
* },
|
|
601
|
+
* });
|
|
602
|
+
* ```
|
|
603
|
+
*/
|
|
604
|
+
function notificationRecipientsRoute(notifications) {
|
|
605
|
+
return async (entry) => {
|
|
606
|
+
const data = entry.opData ?? {};
|
|
607
|
+
const ids = [entry.id];
|
|
608
|
+
if (entry.op !== "PATCH") return err(dbError("unsupported", `notification_recipients takes updates only, not ${entry.op}`));
|
|
609
|
+
if (data["dismissed_at"] !== void 0 && data["dismissed_at"] !== null) return notifications.dismiss(ids);
|
|
610
|
+
if (data["read_at"] === void 0) return ok(null);
|
|
611
|
+
return data["read_at"] === null ? notifications.markUnread({ ids }) : notifications.markRead({ ids });
|
|
612
|
+
};
|
|
613
|
+
}
|
|
614
|
+
/**
|
|
615
|
+
* A topic port for the notifications feed on PowerSync: the feed reads again
|
|
616
|
+
* when the synced notification tables change, from a sync or a local write,
|
|
617
|
+
* instead of on a Realtime broadcast.
|
|
618
|
+
*
|
|
619
|
+
* ```ts
|
|
620
|
+
* createNotificationsController({
|
|
621
|
+
* ports: { topic: powersyncTopicPort(powersync) },
|
|
622
|
+
* });
|
|
623
|
+
* ```
|
|
624
|
+
*/
|
|
625
|
+
function powersyncTopicPort(database, tables = ["notification_recipients", "notification_events"]) {
|
|
626
|
+
return (_topic, watch) => {
|
|
627
|
+
const unsubscribe = database.onChange?.({ onChange: (event) => {
|
|
628
|
+
if (event.changedTables.some((table) => tables.includes(table))) watch.onMessage("change", { tables: event.changedTables });
|
|
629
|
+
} }, { tables: [...tables] });
|
|
630
|
+
watch.onStatus("subscribed");
|
|
631
|
+
let left = false;
|
|
632
|
+
return {
|
|
633
|
+
leave: () => {
|
|
634
|
+
if (!left) {
|
|
635
|
+
left = true;
|
|
636
|
+
unsubscribe?.();
|
|
637
|
+
}
|
|
638
|
+
},
|
|
639
|
+
send: () => void 0
|
|
640
|
+
};
|
|
641
|
+
};
|
|
642
|
+
}
|
|
643
|
+
function arrayOf(value) {
|
|
644
|
+
return Array.isArray(value) ? value.map((item) => item) : void 0;
|
|
645
|
+
}
|
|
646
|
+
function marks(values) {
|
|
647
|
+
return values.map(() => "?").join(", ");
|
|
648
|
+
}
|
|
649
|
+
function joined(clauses) {
|
|
650
|
+
return clauses.length === 0 ? "1" : clauses.join(" AND ");
|
|
651
|
+
}
|
|
652
|
+
function limit(value, least) {
|
|
653
|
+
const parsed = Number(value ?? 50);
|
|
654
|
+
return Math.min(Math.max(Number.isFinite(parsed) ? parsed : 50, least), 200);
|
|
655
|
+
}
|
|
656
|
+
function json(value) {
|
|
657
|
+
if (typeof value !== "string") return value ?? void 0;
|
|
658
|
+
try {
|
|
659
|
+
return JSON.parse(value);
|
|
660
|
+
} catch {
|
|
661
|
+
return value;
|
|
662
|
+
}
|
|
663
|
+
}
|
|
664
|
+
function timestamp(value) {
|
|
665
|
+
return typeof value === "string" ? postgrestTimestamp(value) : null;
|
|
666
|
+
}
|
|
667
|
+
function time(value) {
|
|
668
|
+
return typeof value === "string" ? Date.parse(value) : 0;
|
|
669
|
+
}
|
|
670
|
+
function newestFirst(left, right) {
|
|
671
|
+
const order = time(right["created_at"]) - time(left["created_at"]);
|
|
672
|
+
if (order !== 0) return order;
|
|
673
|
+
return String(right["id"]).localeCompare(String(left["id"]));
|
|
674
|
+
}
|
|
675
|
+
//#endregion
|
|
676
|
+
export { attachmentQueueRoute, checkSqlite, compileSqlite, createUploadConnector, fromSqliteError, likeToGlob, notificationRecipientsRoute, postgrestTimestamp, powersyncEngine, powersyncExecutor, powersyncNotificationsTransport, powersyncTopicPort, quoteSqliteIdent, sqliteCompiler, sqliteValue, syncWithAuth, uploadOutcome, uploadRoute };
|
package/dist/preset/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Bn as PRESETS, Ct as ResolvedPresetBlock, Et as resolvePreset, Fn as presetFromSpec, Gn as defaultPreset, Hn as PRESET_NAMES, In as presetOfSpec, Kn as isPresetName, Ln as presetSpec, Pn as PresetSpec, Rn as DEFAULT_PRESET_NAME, St as ResolvedPreset, Tt as presetBlockConflict, Un as PresetGroup, Vn as PRESET_GROUPS, Wn as PresetName, _i as PresetValueInfo, _t as expandPreset, ai as DEFAULT_CONVENTIONS, bi as presetValueLabel, bt as PresetConflict, ci as Preset, di as PresetField, ei as PresetCatalog, er as APP_COLUMN_FORMATS, fi as PresetFieldKey, gi as PresetScope, gt as conventionConfig, hi as PresetPlatforms, ht as PresetInput, ii as CONVENTION_FIELDS, li as PresetAccess, mi as PresetFramework, mt as ExpandedConfig, ni as PresetCatalogManifest, oi as PRESET_FRAMEWORKS, pi as PresetFieldValue, pt as ConfigConventions, qn as namedPreset, ri as PresetGlueItem, si as PRESET_TENANT_NAMES, sr as AppColumnFormat, ti as PresetCatalogBlock, ui as PresetConventions, vi as integrationsForFramework, vt as presetConfig, wt as listNames, xt as PresetIntegration, yi as presetField, yt as presetOf, zn as NamedPreset } from "../context-
|
|
2
|
-
import { A as presetAndDesignOf, C as designFileSource, D as encodeDesign, E as designSchema, F as safeDesignFileSource, I as safeParseDesign, L as appDefaultError, M as presetConfigSource, N as presetInstallCommand, O as isDesignCode, P as readDesignFile, R as isAppDefault, S as designConfig, T as designOf, _ as DesignParseResult, a as DesignChange, b as createUrl, c as diffAppTables, d as DESIGN_FILE, f as DESIGN_FORMAT, g as DesignParseIssue, h as DesignParseError, i as presetGlue, j as presetApplyCommand, k as parseDesign, l as diffDesigns, m as DesignFile, n as glueCommand, o as DesignChangeKind, p as DesignErrorCode, r as presetBlocksSource, s as DiffOptions, t as PROVIDER_COMMENT, u as CreateDesign, v as DesignTooLongError, w as designFormat, x as decodeDesign, y as MAX_DESIGN_CODE_LENGTH, z as PRESET_CATALOG } from "../index-
|
|
3
|
-
import { i as appReservedColumns, n as appIdentifierError, r as appNameLengthError, t as APP_NAME_MAX } from "../app-tables-
|
|
1
|
+
import { Bn as PRESETS, Ct as ResolvedPresetBlock, Et as resolvePreset, Fn as presetFromSpec, Gn as defaultPreset, Hn as PRESET_NAMES, In as presetOfSpec, Kn as isPresetName, Ln as presetSpec, Pn as PresetSpec, Rn as DEFAULT_PRESET_NAME, St as ResolvedPreset, Tt as presetBlockConflict, Un as PresetGroup, Vn as PRESET_GROUPS, Wn as PresetName, _i as PresetValueInfo, _t as expandPreset, ai as DEFAULT_CONVENTIONS, bi as presetValueLabel, bt as PresetConflict, ci as Preset, di as PresetField, ei as PresetCatalog, er as APP_COLUMN_FORMATS, fi as PresetFieldKey, gi as PresetScope, gt as conventionConfig, hi as PresetPlatforms, ht as PresetInput, ii as CONVENTION_FIELDS, li as PresetAccess, mi as PresetFramework, mt as ExpandedConfig, ni as PresetCatalogManifest, oi as PRESET_FRAMEWORKS, pi as PresetFieldValue, pt as ConfigConventions, qn as namedPreset, ri as PresetGlueItem, si as PRESET_TENANT_NAMES, sr as AppColumnFormat, ti as PresetCatalogBlock, ui as PresetConventions, vi as integrationsForFramework, vt as presetConfig, wt as listNames, xt as PresetIntegration, yi as presetField, yt as presetOf, zn as NamedPreset } from "../context-D24k1Cpc.js";
|
|
2
|
+
import { A as presetAndDesignOf, C as designFileSource, D as encodeDesign, E as designSchema, F as safeDesignFileSource, I as safeParseDesign, L as appDefaultError, M as presetConfigSource, N as presetInstallCommand, O as isDesignCode, P as readDesignFile, R as isAppDefault, S as designConfig, T as designOf, _ as DesignParseResult, a as DesignChange, b as createUrl, c as diffAppTables, d as DESIGN_FILE, f as DESIGN_FORMAT, g as DesignParseIssue, h as DesignParseError, i as presetGlue, j as presetApplyCommand, k as parseDesign, l as diffDesigns, m as DesignFile, n as glueCommand, o as DesignChangeKind, p as DesignErrorCode, r as presetBlocksSource, s as DiffOptions, t as PROVIDER_COMMENT, u as CreateDesign, v as DesignTooLongError, w as designFormat, x as decodeDesign, y as MAX_DESIGN_CODE_LENGTH, z as PRESET_CATALOG } from "../index-BAcQz5DS.js";
|
|
3
|
+
import { i as appReservedColumns, n as appIdentifierError, r as appNameLengthError, t as APP_NAME_MAX } from "../app-tables-XwCviyhP.js";
|
|
4
4
|
export { APP_COLUMN_FORMATS, APP_NAME_MAX, type AppColumnFormat, CONVENTION_FIELDS, type ConfigConventions, type CreateDesign, DEFAULT_CONVENTIONS, DEFAULT_PRESET_NAME, DESIGN_FILE, DESIGN_FORMAT, type DesignChange, type DesignChangeKind, type DesignErrorCode, type DesignFile, DesignParseError, type DesignParseIssue, type DesignParseResult, DesignTooLongError, type DiffOptions, type ExpandedConfig, MAX_DESIGN_CODE_LENGTH, type NamedPreset, PRESETS, PRESET_CATALOG, PRESET_FRAMEWORKS, PRESET_GROUPS, PRESET_NAMES, PRESET_TENANT_NAMES, PROVIDER_COMMENT, type Preset, type PresetAccess, type PresetCatalog, type PresetCatalogBlock, type PresetCatalogManifest, type PresetConflict, type PresetConventions, type PresetField, type PresetFieldKey, type PresetFieldValue, type PresetFramework, type PresetGlueItem, type PresetGroup, type PresetInput, type PresetIntegration, type PresetName, type PresetPlatforms, type PresetScope, type PresetSpec, type PresetValueInfo, type ResolvedPreset, type ResolvedPresetBlock, appDefaultError, appIdentifierError, appNameLengthError, appReservedColumns, conventionConfig, createUrl, decodeDesign, defaultPreset, designConfig, designFileSource, designFormat, designOf, designSchema, diffAppTables, diffDesigns, encodeDesign, expandPreset, glueCommand, integrationsForFramework, isAppDefault, isDesignCode, isPresetName, listNames, namedPreset, parseDesign, presetAndDesignOf, presetApplyCommand, presetBlockConflict, presetBlocksSource, presetConfig, presetConfigSource, presetField, presetFromSpec, presetGlue, presetInstallCommand, presetOf, presetOfSpec, presetSpec, presetValueLabel, readDesignFile, resolvePreset, safeDesignFileSource, safeParseDesign };
|
package/dist/preset/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { C as integrationsForFramework, S as PRESET_TENANT_NAMES, T as presetValueLabel, _ as isPresetName, a as presetOf, b as DEFAULT_CONVENTIONS, c as presetSpec, d as resolvePreset, f as DEFAULT_PRESET_NAME, g as defaultPreset, h as PRESET_NAMES, i as presetConfig, l as listNames, m as PRESET_GROUPS, o as presetFromSpec, p as PRESETS, r as expandPreset, s as presetOfSpec, t as conventionConfig, u as presetBlockConflict, v as namedPreset, w as presetField, x as PRESET_FRAMEWORKS, y as CONVENTION_FIELDS } from "../config-
|
|
2
|
-
import { E as PRESET_CATALOG, a as appIdentifierError, m as isAppDefault, n as APP_NAME_MAX, o as appNameLengthError, p as appDefaultError, s as appReservedColumns, x as APP_COLUMN_FORMATS } from "../app-tables-
|
|
3
|
-
import { C as readDesignFile, D as glueCommand, E as PROVIDER_COMMENT, O as presetBlocksSource, S as presetInstallCommand, T as safeParseDesign, a as DesignParseError, b as presetApplyCommand, c as createUrl, d as designFileSource, f as designFormat, g as isDesignCode, h as encodeDesign, i as DESIGN_FORMAT, k as presetGlue, l as decodeDesign, m as designSchema, n as diffDesigns, o as DesignTooLongError, p as designOf, r as DESIGN_FILE, s as MAX_DESIGN_CODE_LENGTH, t as diffAppTables, u as designConfig, v as parseDesign, w as safeDesignFileSource, x as presetConfigSource, y as presetAndDesignOf } from "../preset-
|
|
1
|
+
import { C as integrationsForFramework, S as PRESET_TENANT_NAMES, T as presetValueLabel, _ as isPresetName, a as presetOf, b as DEFAULT_CONVENTIONS, c as presetSpec, d as resolvePreset, f as DEFAULT_PRESET_NAME, g as defaultPreset, h as PRESET_NAMES, i as presetConfig, l as listNames, m as PRESET_GROUPS, o as presetFromSpec, p as PRESETS, r as expandPreset, s as presetOfSpec, t as conventionConfig, u as presetBlockConflict, v as namedPreset, w as presetField, x as PRESET_FRAMEWORKS, y as CONVENTION_FIELDS } from "../config-CD2OGfCG.js";
|
|
2
|
+
import { E as PRESET_CATALOG, a as appIdentifierError, m as isAppDefault, n as APP_NAME_MAX, o as appNameLengthError, p as appDefaultError, s as appReservedColumns, x as APP_COLUMN_FORMATS } from "../app-tables-DyswUg6J.js";
|
|
3
|
+
import { C as readDesignFile, D as glueCommand, E as PROVIDER_COMMENT, O as presetBlocksSource, S as presetInstallCommand, T as safeParseDesign, a as DesignParseError, b as presetApplyCommand, c as createUrl, d as designFileSource, f as designFormat, g as isDesignCode, h as encodeDesign, i as DESIGN_FORMAT, k as presetGlue, l as decodeDesign, m as designSchema, n as diffDesigns, o as DesignTooLongError, p as designOf, r as DESIGN_FILE, s as MAX_DESIGN_CODE_LENGTH, t as diffAppTables, u as designConfig, v as parseDesign, w as safeDesignFileSource, x as presetConfigSource, y as presetAndDesignOf } from "../preset-B3CukUhu.js";
|
|
4
4
|
export { APP_COLUMN_FORMATS, APP_NAME_MAX, CONVENTION_FIELDS, DEFAULT_CONVENTIONS, DEFAULT_PRESET_NAME, DESIGN_FILE, DESIGN_FORMAT, DesignParseError, DesignTooLongError, MAX_DESIGN_CODE_LENGTH, PRESETS, PRESET_CATALOG, PRESET_FRAMEWORKS, PRESET_GROUPS, PRESET_NAMES, PRESET_TENANT_NAMES, PROVIDER_COMMENT, appDefaultError, appIdentifierError, appNameLengthError, appReservedColumns, conventionConfig, createUrl, decodeDesign, defaultPreset, designConfig, designFileSource, designFormat, designOf, designSchema, diffAppTables, diffDesigns, encodeDesign, expandPreset, glueCommand, integrationsForFramework, isAppDefault, isDesignCode, isPresetName, listNames, namedPreset, parseDesign, presetAndDesignOf, presetApplyCommand, presetBlockConflict, presetBlocksSource, presetConfig, presetConfigSource, presetField, presetFromSpec, presetGlue, presetInstallCommand, presetOf, presetOfSpec, presetSpec, presetValueLabel, readDesignFile, resolvePreset, safeDesignFileSource, safeParseDesign };
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import { M as groupEntries, a as presetOf, c as presetSpec, g as defaultPreset, i as presetConfig, s as presetOfSpec } from "./config-
|
|
2
|
-
import { E as PRESET_CATALOG, d as appTablesOf, k as asBlocksConfig } from "./app-tables-
|
|
1
|
+
import { M as groupEntries, a as presetOf, c as presetSpec, g as defaultPreset, i as presetConfig, s as presetOfSpec } from "./config-CD2OGfCG.js";
|
|
2
|
+
import { E as PRESET_CATALOG, d as appTablesOf, k as asBlocksConfig } from "./app-tables-DyswUg6J.js";
|
|
3
3
|
import { r as FIELD_FORMATS } from "./field-formats-C6QKA3UR.js";
|
|
4
|
+
import { t as isSqlType } from "./sql-type-iUSZpaUu.js";
|
|
4
5
|
//#region src/preset/render.ts
|
|
5
6
|
/** The comment a config with the provider access model gets above `blocks`. */
|
|
6
7
|
const PROVIDER_COMMENT = [" // The provider access model reads roles from your authorization", " // library: set `auth.authorization` to its adapter."];
|
|
@@ -214,7 +215,6 @@ const MAX_POSITIONS = 1e3;
|
|
|
214
215
|
const MAX_COORDINATE = 1e6;
|
|
215
216
|
const DESIGN_CODE = /^0[A-Za-z0-9_-]+$/;
|
|
216
217
|
const COLUMN = /^[a-z_][a-z0-9_]{0,62}$/;
|
|
217
|
-
const SQL_TYPE = /^[a-z][a-z0-9_ (),.'[\]-]*$/i;
|
|
218
218
|
const QUALIFIED = /^[a-z_][a-z0-9_]{0,62}\.[a-z_][a-z0-9_]{0,62}$/;
|
|
219
219
|
const isRecord = (value) => typeof value === "object" && value !== null && !Array.isArray(value);
|
|
220
220
|
/** Whether `value` has the shape of a design code. It may still fail to decode. */
|
|
@@ -235,7 +235,7 @@ function extraColumnsOf(value, catalog) {
|
|
|
235
235
|
const checked = {};
|
|
236
236
|
for (const [name, type] of entries) {
|
|
237
237
|
if (!COLUMN.test(name)) throw new DesignParseError("invalid_name", jsonPointer("extraColumns", module, name), `${at}: "${name}" is not a valid column name`);
|
|
238
|
-
if (typeof type !== "string" || !
|
|
238
|
+
if (typeof type !== "string" || !isSqlType(type)) throw new DesignParseError("invalid_type", jsonPointer("extraColumns", module, name), `${at}.${name} must be a SQL type such as "text not null default ''"`);
|
|
239
239
|
checked[name] = type;
|
|
240
240
|
}
|
|
241
241
|
return [module, checked];
|
package/dist/query/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { t as escapeLike } from "../escape-like-PReMbEEU.js";
|
|
2
2
|
import { n as invalidateTables, t as BetterQueryMeta } from "../invalidate-DMp4eqfF.js";
|
|
3
|
-
import { $ as invalidateOnBlockEvents, G as BLOCK_READ_PREFIXES, J as BlockInvalidation, K as BlockClientQueries, Q as blockQueries, X as BlockQueries, Y as BlockMethodQuery, Z as BlockVariablesOf, a as RecordBindingQueries, at as InfiniteOptionsOf, c as RecordWriteMutations, ct as QueryHelpers, dt as TableQueries, et as queryEngine, ft as createQueries, i as optimistic, it as InfiniteExtras, l as invalidateOnRecordEvents, lt as QueryKeyOf, mt as queryCache, n as OptimisticSnapshot, nt as clearOnUserChange, o as RecordQueries, ot as MutationOptionsOf, pt as invalidateOnMutation, q as BlockClients, r as OptimisticTarget, rt as BetterQueries, s as RecordQueriesOptions, st as QueriesOptions, t as OptimisticHandlers, tt as UserChangeSource, u as recordQueries, ut as QueryOptionsOf } from "../index-
|
|
3
|
+
import { $ as invalidateOnBlockEvents, G as BLOCK_READ_PREFIXES, J as BlockInvalidation, K as BlockClientQueries, Q as blockQueries, X as BlockQueries, Y as BlockMethodQuery, Z as BlockVariablesOf, a as RecordBindingQueries, at as InfiniteOptionsOf, c as RecordWriteMutations, ct as QueryHelpers, dt as TableQueries, et as queryEngine, ft as createQueries, i as optimistic, it as InfiniteExtras, l as invalidateOnRecordEvents, lt as QueryKeyOf, mt as queryCache, n as OptimisticSnapshot, nt as clearOnUserChange, o as RecordQueries, ot as MutationOptionsOf, pt as invalidateOnMutation, q as BlockClients, r as OptimisticTarget, rt as BetterQueries, s as RecordQueriesOptions, st as QueriesOptions, t as OptimisticHandlers, tt as UserChangeSource, u as recordQueries, ut as QueryOptionsOf } from "../index-C0t-vNIt.js";
|
|
4
4
|
export { BLOCK_READ_PREFIXES, type BetterQueries, type BetterQueryMeta, type BlockClientQueries, type BlockClients, type BlockInvalidation, type BlockMethodQuery, type BlockQueries, type BlockVariablesOf, type InfiniteExtras, type InfiniteOptionsOf, type MutationOptionsOf, type OptimisticHandlers, type OptimisticSnapshot, type OptimisticTarget, type QueriesOptions, type QueryHelpers, type QueryKeyOf, type QueryOptionsOf, type RecordBindingQueries, type RecordQueries, type RecordQueriesOptions, type RecordWriteMutations, type TableQueries, type UserChangeSource, blockQueries, clearOnUserChange, createQueries, escapeLike, invalidateOnBlockEvents, invalidateOnMutation, invalidateOnRecordEvents, invalidateTables, optimistic, queryCache, queryEngine, recordQueries };
|
package/dist/react/index.d.ts
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { t as escapeLike } from "../escape-like-PReMbEEU.js";
|
|
2
2
|
import { n as Impersonator } from "../impersonation-YTa9dZUv.js";
|
|
3
3
|
import { i as DataEntry, m as RejectedChange, n as DataEngine, o as DataSyncState } from "../data-engine-BWoz9lED.js";
|
|
4
|
-
import { t as tenantOf } from "../tenant-
|
|
4
|
+
import { t as tenantOf } from "../tenant-DyoVYFfC.js";
|
|
5
5
|
import { t as AuthSession } from "../view-DyFdMCqg.js";
|
|
6
|
-
import { r as LiveCountSeed } from "../index-
|
|
7
|
-
import { r as MembershipClaim } from "../entitlements-
|
|
8
|
-
import { D as ProfileOf, O as UseActionOptions, S as LiveCountHookOptions, _ as ActionResultOf, b as ClaimsOf, c as DataWrites, d as BlockMutationState, f as BlockQueryActions, g as ActionInputOf, h as BlockRefetchOn, l as BlockEventSource, m as BlockQueryState, o as DataSource, p as BlockQueryOptions, s as DataState, t as fieldErrorsOf, u as BlockMutationActions, w as LiveQueryHookOptions, x as ClientLike, y as BroadcastOptions } from "../field-errors-
|
|
6
|
+
import { r as LiveCountSeed } from "../index-DmbCyl6Z.js";
|
|
7
|
+
import { r as MembershipClaim } from "../entitlements-DHcNt1aF.js";
|
|
8
|
+
import { D as ProfileOf, O as UseActionOptions, S as LiveCountHookOptions, _ as ActionResultOf, b as ClaimsOf, c as DataWrites, d as BlockMutationState, f as BlockQueryActions, g as ActionInputOf, h as BlockRefetchOn, l as BlockEventSource, m as BlockQueryState, o as DataSource, p as BlockQueryOptions, s as DataState, t as fieldErrorsOf, u as BlockMutationActions, w as LiveQueryHookOptions, x as ClientLike, y as BroadcastOptions } from "../field-errors-DkAemDoc.js";
|
|
9
9
|
import { n as supportOf, t as SupportView } from "../support-view-BYOgwXsJ.js";
|
|
10
|
-
import { $ as UseActionFormOptions, A as useController, B as RecordListUrl, C as useConflicts, D as defineDataHooks, E as DataView, F as RecordFormState, G as RecordInitial, H as useRecordListState, I as UseRecordFormOptions, J as RecordState, K as RecordProviderKit, L as useRecordForm, M as useBlockEvent, N as useBlockMutation, O as useBlockEnv, P as useBlockQuery, Q as ActionHandle, R as RecordListQueryStates, S as Conflicts, T as DataHooks, U as RecordActionsOf, V as RecordListUrlState, W as RecordContextValue, X as createRecordProvider, Y as RecordWriteHandlers, Z as ActionForm, _ as useRealtimeRelay, a as Upload, at as LiveCount, b as PresenceTopic, c as UseImageOptions, ct as useBroadcast, d as useSignedUrl, dt as useSupabase, et as useAction, f as useUpload, g as UseRealtimeRelayOptions, h as useDebouncedSearch, i as StorageImage, it as BetterSupabaseProviderProps, j as useLatest, k as useBlockTenant, l as UseUploadOptions, lt as useLiveCount, m as DebouncedSearchOptions, n as SignedUrl, nt as BetterHooks, o as UploadStatus, ot as createHooks, p as DebouncedSearch, q as RecordProviderProps, r as SignedUrlSource, rt as BetterSupabaseProvider, s as UploadTarget, st as useAuth, t as ImageSource, tt as useActionForm, u as useImage, ut as useLiveQuery, v as Presence, w as useSyncStatus, x as usePresence, y as PresenceHookOptions, z as RecordListState } from "../index-
|
|
10
|
+
import { $ as UseActionFormOptions, A as useController, B as RecordListUrl, C as useConflicts, D as defineDataHooks, E as DataView, F as RecordFormState, G as RecordInitial, H as useRecordListState, I as UseRecordFormOptions, J as RecordState, K as RecordProviderKit, L as useRecordForm, M as useBlockEvent, N as useBlockMutation, O as useBlockEnv, P as useBlockQuery, Q as ActionHandle, R as RecordListQueryStates, S as Conflicts, T as DataHooks, U as RecordActionsOf, V as RecordListUrlState, W as RecordContextValue, X as createRecordProvider, Y as RecordWriteHandlers, Z as ActionForm, _ as useRealtimeRelay, a as Upload, at as LiveCount, b as PresenceTopic, c as UseImageOptions, ct as useBroadcast, d as useSignedUrl, dt as useSupabase, et as useAction, f as useUpload, g as UseRealtimeRelayOptions, h as useDebouncedSearch, i as StorageImage, it as BetterSupabaseProviderProps, j as useLatest, k as useBlockTenant, l as UseUploadOptions, lt as useLiveCount, m as DebouncedSearchOptions, n as SignedUrl, nt as BetterHooks, o as UploadStatus, ot as createHooks, p as DebouncedSearch, q as RecordProviderProps, r as SignedUrlSource, rt as BetterSupabaseProvider, s as UploadTarget, st as useAuth, t as ImageSource, tt as useActionForm, u as useImage, ut as useLiveQuery, v as Presence, w as useSyncStatus, x as usePresence, y as PresenceHookOptions, z as RecordListState } from "../index-DTbJAsrT.js";
|
|
11
11
|
import { SessionProvider, SessionProviderProps, useSession, useSupportSession } from "./session.js";
|
|
12
12
|
import { a as useSignIn, i as SignOut, n as PendingState, o as useSignOut, r as SignIn, t as AuthHookOptions } from "../sign-in-D54FLMQy.js";
|
|
13
13
|
export { type ActionForm, type ActionHandle, type ActionInputOf, type ActionResultOf, type AuthHookOptions, type AuthSession, type BetterHooks, BetterSupabaseProvider, type BetterSupabaseProviderProps, type BlockEventSource, type BlockMutationActions, type BlockMutationState, type BlockQueryActions, type BlockQueryOptions, type BlockQueryState, type BlockRefetchOn, type BroadcastOptions, type ClaimsOf, type ClientLike, type Conflicts, type DataEngine, type DataEntry, type DataHooks, type DataSource, type DataState, type DataSyncState, type DataView, type DataWrites, type DebouncedSearch, type DebouncedSearchOptions, type ImageSource, type Impersonator, type LiveCount, type LiveCountHookOptions, type LiveCountSeed, type LiveQueryHookOptions, type MembershipClaim, type PendingState, type Presence, type PresenceHookOptions, type PresenceTopic, type ProfileOf, type RecordActionsOf, type RecordContextValue, type RecordFormState, type RecordInitial, type RecordListQueryStates, type RecordListState, type RecordListUrl, type RecordListUrlState, type RecordProviderKit, type RecordProviderProps, type RecordState, type RecordWriteHandlers, type RejectedChange, SessionProvider, type SessionProviderProps, type SignIn, type SignOut, type SignedUrl, type SignedUrlSource, type StorageImage, type SupportView, type Upload, type UploadStatus, type UploadTarget, type UseActionFormOptions, type UseActionOptions, type UseImageOptions, type UseRealtimeRelayOptions, type UseRecordFormOptions, type UseUploadOptions, createHooks, createRecordProvider, defineDataHooks, escapeLike, fieldErrorsOf, supportOf, tenantOf, useAction, useActionForm, useAuth, useBlockEnv, useBlockEvent, useBlockMutation, useBlockQuery, useBlockTenant, useBroadcast, useConflicts, useController, useDebouncedSearch, useImage, useLatest, useLiveCount, useLiveQuery, usePresence, useRealtimeRelay, useRecordForm, useRecordListState, useSession, useSignIn, useSignOut, useSignedUrl, useSupabase, useSupportSession, useSyncStatus, useUpload };
|
package/dist/react/index.js
CHANGED
|
@@ -4,6 +4,6 @@ import { a as createHooks, d as useSupabase, i as BetterSupabaseProvider, l as u
|
|
|
4
4
|
import { t as supportOf } from "../support-view-g4YLBeqX.js";
|
|
5
5
|
import { SessionProvider, useSession, useSupportSession } from "./session.js";
|
|
6
6
|
import { d as fieldErrorsOf } from "../data-hooks-tgF1Ct0F.js";
|
|
7
|
-
import { _ as useBlockTenant, a as useRealtimeRelay, b as useAction, c as useSyncStatus, d as useBlockMutation, f as useBlockQuery, g as useBlockEnv, h as createRecordProvider, i as useDebouncedSearch, l as defineDataHooks, m as useRecordListState, n as useSignedUrl, o as usePresence, p as useRecordForm, r as useUpload, s as useConflicts, t as useImage, u as useBlockEvent, v as useController, x as useActionForm, y as useLatest } from "../react-
|
|
7
|
+
import { _ as useBlockTenant, a as useRealtimeRelay, b as useAction, c as useSyncStatus, d as useBlockMutation, f as useBlockQuery, g as useBlockEnv, h as createRecordProvider, i as useDebouncedSearch, l as defineDataHooks, m as useRecordListState, n as useSignedUrl, o as usePresence, p as useRecordForm, r as useUpload, s as useConflicts, t as useImage, u as useBlockEvent, v as useController, x as useActionForm, y as useLatest } from "../react-zBTxLsV6.js";
|
|
8
8
|
import { t as tenantOf } from "../tenant-BgIiMQpo.js";
|
|
9
9
|
export { BetterSupabaseProvider, SessionProvider, createHooks, createRecordProvider, defineDataHooks, escapeLike, fieldErrorsOf, supportOf, tenantOf, useAction, useActionForm, useAuth, useBlockEnv, useBlockEvent, useBlockMutation, useBlockQuery, useBlockTenant, useBroadcast, useConflicts, useController, useDebouncedSearch, useImage, useLatest, useLiveCount, useLiveQuery, usePresence, useRealtimeRelay, useRecordForm, useRecordListState, useSession, useSignIn, useSignOut, useSignedUrl, useSupabase, useSupportSession, useSyncStatus, useUpload };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as AuthSnapshot } from "../../bind-
|
|
1
|
+
import { t as AuthSnapshot } from "../../bind-pu5TLrla.js";
|
|
2
2
|
import { a as OAuthSignInOptions, i as OAuthClient, n as AuthLinkClient, o as WebBrowserLike, r as AuthLinkResult, t as AuthFailure } from "../../auth-link-B4NL84XU.js";
|
|
3
3
|
import { n as PendingState } from "../../sign-in-D54FLMQy.js";
|
|
4
4
|
import { Provider } from "@supabase/supabase-js";
|
package/dist/react/server.d.ts
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { t as escapeLike } from "../escape-like-PReMbEEU.js";
|
|
2
2
|
import { pt as QuerySpec } from "../define-Cgru0_kF.js";
|
|
3
3
|
import { n as Impersonator } from "../impersonation-YTa9dZUv.js";
|
|
4
|
-
import { t as tenantOf } from "../tenant-
|
|
4
|
+
import { t as tenantOf } from "../tenant-DyoVYFfC.js";
|
|
5
5
|
import { t as AuthSession } from "../view-DyFdMCqg.js";
|
|
6
|
-
import { r as LiveCountSeed } from "../index-
|
|
7
|
-
import { r as MembershipClaim } from "../entitlements-
|
|
8
|
-
import { D as ProfileOf, O as UseActionOptions, S as LiveCountHookOptions, _ as ActionResultOf, b as ClaimsOf, g as ActionInputOf, t as fieldErrorsOf, w as LiveQueryHookOptions, x as ClientLike, y as BroadcastOptions } from "../field-errors-
|
|
6
|
+
import { r as LiveCountSeed } from "../index-DmbCyl6Z.js";
|
|
7
|
+
import { r as MembershipClaim } from "../entitlements-DHcNt1aF.js";
|
|
8
|
+
import { D as ProfileOf, O as UseActionOptions, S as LiveCountHookOptions, _ as ActionResultOf, b as ClaimsOf, g as ActionInputOf, t as fieldErrorsOf, w as LiveQueryHookOptions, x as ClientLike, y as BroadcastOptions } from "../field-errors-DkAemDoc.js";
|
|
9
9
|
import { n as supportOf, t as SupportView } from "../support-view-BYOgwXsJ.js";
|
|
10
|
-
import { $ as UseActionFormOptions, A as useController$1, B as RecordListUrl, C as useConflicts$1, D as defineDataHooks$1, F as RecordFormState, G as RecordInitial, H as useRecordListState$1, I as UseRecordFormOptions, J as RecordState, K as RecordProviderKit, L as useRecordForm$1, M as useBlockEvent$1, N as useBlockMutation$1, O as useBlockEnv$1, P as useBlockQuery$1, Q as ActionHandle, R as RecordListQueryStates, U as RecordActionsOf, V as RecordListUrlState, W as RecordContextValue, X as createRecordProvider$1, Y as RecordWriteHandlers, Z as ActionForm, _ as useRealtimeRelay$1, a as Upload, at as LiveCount, b as PresenceTopic, c as UseImageOptions, ct as useBroadcast, d as useSignedUrl$1, dt as useSupabase, f as useUpload$1, g as UseRealtimeRelayOptions, h as useDebouncedSearch$1, i as StorageImage, it as BetterSupabaseProviderProps, j as useLatest$1, k as useBlockTenant$1, l as UseUploadOptions, m as DebouncedSearchOptions, n as SignedUrl, nt as BetterHooks, o as UploadStatus, p as DebouncedSearch, q as RecordProviderProps, r as SignedUrlSource, rt as BetterSupabaseProvider, s as UploadTarget, st as useAuth, t as ImageSource, u as useImage$1, ut as useLiveQuery, v as Presence, w as useSyncStatus$1, x as usePresence$1, y as PresenceHookOptions, z as RecordListState } from "../index-
|
|
10
|
+
import { $ as UseActionFormOptions, A as useController$1, B as RecordListUrl, C as useConflicts$1, D as defineDataHooks$1, F as RecordFormState, G as RecordInitial, H as useRecordListState$1, I as UseRecordFormOptions, J as RecordState, K as RecordProviderKit, L as useRecordForm$1, M as useBlockEvent$1, N as useBlockMutation$1, O as useBlockEnv$1, P as useBlockQuery$1, Q as ActionHandle, R as RecordListQueryStates, U as RecordActionsOf, V as RecordListUrlState, W as RecordContextValue, X as createRecordProvider$1, Y as RecordWriteHandlers, Z as ActionForm, _ as useRealtimeRelay$1, a as Upload, at as LiveCount, b as PresenceTopic, c as UseImageOptions, ct as useBroadcast, d as useSignedUrl$1, dt as useSupabase, f as useUpload$1, g as UseRealtimeRelayOptions, h as useDebouncedSearch$1, i as StorageImage, it as BetterSupabaseProviderProps, j as useLatest$1, k as useBlockTenant$1, l as UseUploadOptions, m as DebouncedSearchOptions, n as SignedUrl, nt as BetterHooks, o as UploadStatus, p as DebouncedSearch, q as RecordProviderProps, r as SignedUrlSource, rt as BetterSupabaseProvider, s as UploadTarget, st as useAuth, t as ImageSource, u as useImage$1, ut as useLiveQuery, v as Presence, w as useSyncStatus$1, x as usePresence$1, y as PresenceHookOptions, z as RecordListState } from "../index-DTbJAsrT.js";
|
|
11
11
|
import { SessionProvider, SessionProviderProps } from "./session.js";
|
|
12
12
|
import { a as useSignIn$1, i as SignOut, n as PendingState, o as useSignOut$1, r as SignIn, t as AuthHookOptions } from "../sign-in-D54FLMQy.js";
|
|
13
13
|
//#region src/react/server.d.ts
|
package/dist/react/server.js
CHANGED
|
@@ -2,7 +2,7 @@ import { t as escapeLike } from "../escape-like-DHfx6jRr.js";
|
|
|
2
2
|
import { d as useSupabase, i as BetterSupabaseProvider, o as useAuth, s as useBroadcast, u as useLiveQuery } from "../sign-in-CmPK1AgM.js";
|
|
3
3
|
import { t as supportOf } from "../support-view-g4YLBeqX.js";
|
|
4
4
|
import { d as fieldErrorsOf } from "../data-hooks-tgF1Ct0F.js";
|
|
5
|
-
import "../react-
|
|
5
|
+
import "../react-zBTxLsV6.js";
|
|
6
6
|
import { t as tenantOf } from "../tenant-BgIiMQpo.js";
|
|
7
7
|
import { SessionProvider } from "./session.js";
|
|
8
8
|
//#region src/react/server.ts
|
|
@@ -2,9 +2,9 @@ import { O as AnyFunctions, k as AnyModels } from "../types-DFdg_4yN.js";
|
|
|
2
2
|
import { l as PermissionRef, t as AnyAuthorizer } from "../authorizer-B6X09otb.js";
|
|
3
3
|
import { t as BetterSupabase } from "../define-Cgru0_kF.js";
|
|
4
4
|
import { n as BetterServer } from "../server-types-gR4Q1aM0.js";
|
|
5
|
-
import { a as AuthorizedContext, c as ResourceLoaderContext, i as AuthorizeOptions, l as Unwrapped, n as ActionParsed, o as BlockActionOptions, r as ActionResult, s as BlockRequireOptions } from "../kit-
|
|
6
|
-
import { t as RefusalRedirects } from "../refusal-
|
|
7
|
-
import { n as FrameworkOptions, r as LocalsResource, t as FrameworkLocals } from "../framework-
|
|
5
|
+
import { a as AuthorizedContext, c as ResourceLoaderContext, i as AuthorizeOptions, l as Unwrapped, n as ActionParsed, o as BlockActionOptions, r as ActionResult, s as BlockRequireOptions } from "../kit-CVgQCIBO.js";
|
|
6
|
+
import { t as RefusalRedirects } from "../refusal-OrlI3g4H.js";
|
|
7
|
+
import { n as FrameworkOptions, r as LocalsResource, t as FrameworkLocals } from "../framework-x9Y4uB1q.js";
|
|
8
8
|
import { t as Validated } from "../shared-CRRfQAKG.js";
|
|
9
9
|
import { AnyEntry, Contributions } from "@supabase/middleware";
|
|
10
10
|
import { StandardSchemaV1 } from "@standard-schema/spec";
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { o as problemResponse } from "../problem-Bf0cJ7tk.js";
|
|
2
|
-
import { c as extendServer, o as withFlush, s as createServer } from "../adapter-
|
|
3
|
-
import {
|
|
4
|
-
import { i as requireCaller, o as runAction } from "../kit-
|
|
2
|
+
import { c as extendServer, o as withFlush, s as createServer } from "../adapter-CfuBICuG.js";
|
|
3
|
+
import { n as defaultExpose, s as settle } from "../respond-3RKp6VgU.js";
|
|
4
|
+
import { i as requireCaller, o as runAction } from "../kit-DhlB-vv_.js";
|
|
5
5
|
import { n as bufferInPlace, t as around } from "../shared-Bf-I13Ht.js";
|
|
6
|
-
import { i as localsOf, n as actionInput, r as frameworkEntry } from "../framework-
|
|
7
|
-
import { r as refusalResponse } from "../refusal-
|
|
6
|
+
import { i as localsOf, n as actionInput, r as frameworkEntry } from "../framework-CNhTg0th.js";
|
|
7
|
+
import { r as refusalResponse } from "../refusal-D48CMqpQ.js";
|
|
8
8
|
//#region src/bridges/react-router.ts
|
|
9
9
|
/**
|
|
10
10
|
* Runs an entry array as React Router server middleware. The contributions are
|
|
@@ -8,7 +8,7 @@ import { H as rpcTransport } from "./block-helpers-CtBdjgO4.js";
|
|
|
8
8
|
import { r as createBlocks } from "./create-blocks-Bu4H5TXw.js";
|
|
9
9
|
import { a as recordCan, i as plainData, l as runBindingWrite, s as recordSubject } from "./record-type-DRbnlj5q.js";
|
|
10
10
|
import { t as createRecordController } from "./controller-BNZKd6bJ.js";
|
|
11
|
-
import { t as relayRealtimeClient } from "./relay-
|
|
11
|
+
import { t as relayRealtimeClient } from "./relay-CIKcAVjf.js";
|
|
12
12
|
import { a as ttlSeconds, n as scaleTransform, r as transformFor } from "./variants-Cy--Ub-a.js";
|
|
13
13
|
import { createContext, createElement, use, useCallback, useContext, useEffect, useMemo, useRef, useState, useSyncExternalStore, useTransition } from "react";
|
|
14
14
|
//#region src/react/actions.ts
|
package/dist/realtime/index.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { D as AccessTopicPolicy, E as AccessPolicySql } from "../types-DFdg_4yN.js";
|
|
2
2
|
import { et as TemplateParams, tt as TemplateValues } from "../bucket-vc-QRrva.js";
|
|
3
3
|
import { t as RealtimeStatus } from "../realtime-status-BhNkb-Ow.js";
|
|
4
|
-
import { A as TriggerTopic, C as TopicSubscription, D as TriggerLookup, E as TopicTriggerValue, F as FanOutResult, I as TopicFanOutOptions, M as defineTopic, N as rowChange, O as TriggerOptions, P as rowKeys, S as TopicSubscribeOptions, T as TopicTriggerOptions, _ as TopicMessage, a as PresenceOutput, b as TopicPermission, c as RealtimeClient, d as SubscribeOptions, f as Subscription, g as TopicHandlers, h as TopicEvent, i as PresenceOptions, j as TriggerValue, k as TriggerPayloadMode, l as RowChange, m as Topic, n as PresenceInput, o as PresenceSchema, p as SubscriptionStatus, r as PresenceMember, s as PresenceSubscription, t as EventSchemas, u as RowKeys, v as TopicOptions, w as TopicTriggerLookup, x as TopicSqlOptions, y as TopicPayload } from "../topic-
|
|
5
|
-
import { a as watchTopic, i as topicPort, n as TopicPort, r as TopicWatch, t as TopicHandle } from "../watch-topic-
|
|
6
|
-
import { S as relayTopicPort, _ as subjectPresenceValues, a as LiveSource, b as RelayEventSourceConstructor, c as liveCount, d as realtimeChanges, f as SUBJECT_PRESENCE_TEMPLATE, g as subjectPresenceTopic, h as subjectPresence, i as LiveQueryOptions, l as liveQuery, m as SubjectPresenceValues, n as LiveCountOptions, o as LiveSubscription, p as SubjectPresenceTopic, r as LiveCountSeed, s as RealtimeChangesOptions, t as CountRunner, u as liveTopic, v as RelayClientOptions, x as relayRealtimeClient, y as RelayEventSource } from "../index-
|
|
4
|
+
import { A as TriggerTopic, C as TopicSubscription, D as TriggerLookup, E as TopicTriggerValue, F as FanOutResult, I as TopicFanOutOptions, M as defineTopic, N as rowChange, O as TriggerOptions, P as rowKeys, S as TopicSubscribeOptions, T as TopicTriggerOptions, _ as TopicMessage, a as PresenceOutput, b as TopicPermission, c as RealtimeClient, d as SubscribeOptions, f as Subscription, g as TopicHandlers, h as TopicEvent, i as PresenceOptions, j as TriggerValue, k as TriggerPayloadMode, l as RowChange, m as Topic, n as PresenceInput, o as PresenceSchema, p as SubscriptionStatus, r as PresenceMember, s as PresenceSubscription, t as EventSchemas, u as RowKeys, v as TopicOptions, w as TopicTriggerLookup, x as TopicSqlOptions, y as TopicPayload } from "../topic-nQYxoTaU.js";
|
|
5
|
+
import { a as watchTopic, i as topicPort, n as TopicPort, r as TopicWatch, t as TopicHandle } from "../watch-topic-UGSEWAqR.js";
|
|
6
|
+
import { S as relayTopicPort, _ as subjectPresenceValues, a as LiveSource, b as RelayEventSourceConstructor, c as liveCount, d as realtimeChanges, f as SUBJECT_PRESENCE_TEMPLATE, g as subjectPresenceTopic, h as subjectPresence, i as LiveQueryOptions, l as liveQuery, m as SubjectPresenceValues, n as LiveCountOptions, o as LiveSubscription, p as SubjectPresenceTopic, r as LiveCountSeed, s as RealtimeChangesOptions, t as CountRunner, u as liveTopic, v as RelayClientOptions, x as relayRealtimeClient, y as RelayEventSource } from "../index-DmbCyl6Z.js";
|
|
7
7
|
import { n as subjectReaders, t as SubjectReadersOptions } from "../subject-readers-8GySC9Z8.js";
|
|
8
8
|
export { type AccessPolicySql, type AccessTopicPolicy, type CountRunner, type EventSchemas, type FanOutResult, type LiveCountOptions, type LiveCountSeed, type LiveQueryOptions, type LiveSource, type LiveSubscription, type PresenceInput, type PresenceMember, type PresenceOptions, type PresenceOutput, type PresenceSchema, type PresenceSubscription, type RealtimeChangesOptions, type RealtimeClient, type RealtimeStatus, type RelayClientOptions, type RelayEventSource, type RelayEventSourceConstructor, type RowChange, type RowKeys, SUBJECT_PRESENCE_TEMPLATE, type SubjectPresenceTopic, type SubjectPresenceValues, type SubjectReadersOptions, type SubscribeOptions, type Subscription, type SubscriptionStatus, type TemplateParams, type TemplateValues, type Topic, type TopicEvent, type TopicFanOutOptions, type TopicHandle, type TopicHandlers, type TopicMessage, type TopicOptions, type TopicPayload, type TopicPermission, type TopicPort, type TopicSqlOptions, type TopicSubscribeOptions, type TopicSubscription, type TopicTriggerLookup, type TopicTriggerOptions, type TopicTriggerValue, type TopicWatch, type TriggerLookup, type TriggerOptions, type TriggerPayloadMode, type TriggerTopic, type TriggerValue, defineTopic, liveCount, liveQuery, liveTopic, realtimeChanges, relayRealtimeClient, relayTopicPort, rowChange, rowKeys, subjectPresence, subjectPresenceTopic, subjectPresenceValues, subjectReaders, topicPort, watchTopic };
|
package/dist/realtime/index.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { i as realtimeChanges, n as liveQuery, r as liveTopic, t as liveCount } from "../live-C21DgbsD.js";
|
|
2
2
|
import { n as watchTopic, t as topicPort } from "../watch-topic-CuaWfCuv.js";
|
|
3
|
-
import { n as relayTopicPort, t as relayRealtimeClient } from "../relay-
|
|
3
|
+
import { n as relayTopicPort, t as relayRealtimeClient } from "../relay-CIKcAVjf.js";
|
|
4
4
|
import { t as subjectReaders } from "../subject-readers-B-pQ9Mmo.js";
|
|
5
|
-
import { n as rowChange, r as rowKeys, t as defineTopic } from "../topic-
|
|
5
|
+
import { n as rowChange, r as rowKeys, t as defineTopic } from "../topic-J9I3yu6f.js";
|
|
6
6
|
//#region src/realtime/subject-presence.ts
|
|
7
7
|
/** The presence topic template; the subjects module's policies authorize it. */
|
|
8
8
|
const SUBJECT_PRESENCE_TEMPLATE = "presence:{subjectType}:{subjectId}";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Sn as EntitySchema } from "./define-block-
|
|
1
|
+
import { Sn as EntitySchema } from "./define-block-CJWiDWa5.js";
|
|
2
2
|
import { s as FormFieldType } from "./form-definition-BjEtH8BT.js";
|
|
3
3
|
//#region src/records/record-form.d.ts
|
|
4
4
|
/** The input a field renders: a forms block field type, or a date and time. */
|
package/dist/records/index.d.ts
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { b as DbError, t as AsyncResult } from "../result-DZeA5KS6.js";
|
|
2
2
|
import { $ as RecordRef } from "../types-DFdg_4yN.js";
|
|
3
|
-
import { _n as recordBindingWrite, an as RecordBindingDefinition, cn as RecordBindingResult, dn as RecordBindingWriteName, fn as RecordBindingWriteOutput, gn as defineRecordBinding, hn as TimelineItem, in as RecordBindingData, ln as RecordBindingWrite, mn as RecordRowInput, nn as AnyRecordBindingWrite, on as RecordBindingOptions, pn as RecordBindingWrites, rn as RecordBinding, sn as RecordBindingPermissions, tn as AnyRecordBinding, un as RecordBindingWriteInput, vn as recordEventMatches, yn as recordRowInput } from "../define-block-
|
|
4
|
-
import { A as BindingBlocks, B as PermissionFlags, C as defineRecordType, D as recordPermissionKeys, E as recordCan, F as LoadBindingsOptions, H as can, I as LoadedBindings, L as bindingCan, M as BindingName, N as BindingOf, O as recordSubject, P as BindingSource, R as countBinding, S as RecordWriteInput, T as plainData, U as permissionFlags, V as PermissionSet, _ as RecordTypeBlocks, b as RecordTypeWriteInput, d as BindingWritesOf, f as Plain, g as RecordType, h as RecordCan, j as BindingCheck, k as recordWriteInput, m as PlainBindings, p as PlainBinding, v as RecordTypePermissions, w as findBindingWrite, x as RecordTypeWriteOutput, y as RecordTypeSpec, z as loadBindings } from "../index-
|
|
5
|
-
import { p as SubscriptionStatus } from "../topic-
|
|
6
|
-
import { n as TopicPort } from "../watch-topic-
|
|
7
|
-
import { n as Controller, t as AuthPort } from "../controller-
|
|
3
|
+
import { _n as recordBindingWrite, an as RecordBindingDefinition, cn as RecordBindingResult, dn as RecordBindingWriteName, fn as RecordBindingWriteOutput, gn as defineRecordBinding, hn as TimelineItem, in as RecordBindingData, ln as RecordBindingWrite, mn as RecordRowInput, nn as AnyRecordBindingWrite, on as RecordBindingOptions, pn as RecordBindingWrites, rn as RecordBinding, sn as RecordBindingPermissions, tn as AnyRecordBinding, un as RecordBindingWriteInput, vn as recordEventMatches, yn as recordRowInput } from "../define-block-CJWiDWa5.js";
|
|
4
|
+
import { A as BindingBlocks, B as PermissionFlags, C as defineRecordType, D as recordPermissionKeys, E as recordCan, F as LoadBindingsOptions, H as can, I as LoadedBindings, L as bindingCan, M as BindingName, N as BindingOf, O as recordSubject, P as BindingSource, R as countBinding, S as RecordWriteInput, T as plainData, U as permissionFlags, V as PermissionSet, _ as RecordTypeBlocks, b as RecordTypeWriteInput, d as BindingWritesOf, f as Plain, g as RecordType, h as RecordCan, j as BindingCheck, k as recordWriteInput, m as PlainBindings, p as PlainBinding, v as RecordTypePermissions, w as findBindingWrite, x as RecordTypeWriteOutput, y as RecordTypeSpec, z as loadBindings } from "../index-C0t-vNIt.js";
|
|
5
|
+
import { p as SubscriptionStatus } from "../topic-nQYxoTaU.js";
|
|
6
|
+
import { n as TopicPort } from "../watch-topic-UGSEWAqR.js";
|
|
7
|
+
import { n as Controller, t as AuthPort } from "../controller-BR7CZ1R9.js";
|
|
8
8
|
import { a as RecordSummaryOptions, c as Subjects, f as MyWorkKind, i as RecordSummary, n as MyWorkItem, r as MyWorkOptions } from "../subjects-BpIEN1MS.js";
|
|
9
|
-
import { a as timelineBindings, c as RecordListCells, d as RecordListQuery, f as RecordListRow, h as defineRecordList, i as loadTimeline, l as RecordListColumn, m as RecordListSpec, n as Timeline, o as RecordList, p as RecordListSource, r as TimelineEntry, s as RecordListCell, t as LoadTimelineOptions, u as RecordListPage } from "../timeline-
|
|
10
|
-
import { a as RecordFormOptions, c as recordForm, i as RecordFormInput, n as RecordFormCustomField, o as RecordFormResult, r as RecordFormField, s as RecordFormValues, t as RecordForm } from "../record-form-
|
|
9
|
+
import { a as timelineBindings, c as RecordListCells, d as RecordListQuery, f as RecordListRow, h as defineRecordList, i as loadTimeline, l as RecordListColumn, m as RecordListSpec, n as Timeline, o as RecordList, p as RecordListSource, r as TimelineEntry, s as RecordListCell, t as LoadTimelineOptions, u as RecordListPage } from "../timeline-CMmo0R7g.js";
|
|
10
|
+
import { a as RecordFormOptions, c as recordForm, i as RecordFormInput, n as RecordFormCustomField, o as RecordFormResult, r as RecordFormField, s as RecordFormValues, t as RecordForm } from "../record-form-zMwz0Ayt.js";
|
|
11
11
|
//#region src/records/controller.d.ts
|
|
12
12
|
interface RecordControllerOptions<B extends BindingBlocks, N extends BindingName<B>> extends LoadBindingsOptions<B, N> {
|
|
13
13
|
readonly source: BindingSource<B>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { r as dbErrorOf } from "./errors-BVFgt8BZ.js";
|
|
2
2
|
import { o as problemResponse } from "./problem-Bf0cJ7tk.js";
|
|
3
|
-
import {
|
|
4
|
-
import { i as requireCaller } from "./kit-
|
|
3
|
+
import { n as defaultExpose } from "./respond-3RKp6VgU.js";
|
|
4
|
+
import { i as requireCaller } from "./kit-DhlB-vv_.js";
|
|
5
5
|
//#region src/server/refusal.ts
|
|
6
6
|
function isAalRefusal(error) {
|
|
7
7
|
return error.kind === "forbidden" && "required" in error && error.required === "aal2";
|