better-supabase 0.16.0 → 0.18.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/{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-BmkARmQ9.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-hHwieEfz.d.ts → api-B6zteBya.d.ts} +2 -2
- package/dist/{app-tables-D29Rahtg.js → app-tables-DyswUg6J.js} +11 -2
- package/dist/{app-tables-yMQ4ubyY.d.ts → app-tables-XwCviyhP.d.ts} +1 -1
- package/dist/astro/index.d.ts +5 -5
- package/dist/astro/index.js +5 -5
- package/dist/{attachments-aJYgdYtB.js → attachments-M-Dy79Ry.js} +9 -2
- package/dist/{authorization-HZdJCaVm.d.ts → authorization-IiE__z2m.d.ts} +187 -89
- 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/better-result/index.d.ts +2 -2
- package/dist/{bind-JGCPGUJh.d.ts → bind-pu5TLrla.d.ts} +4 -4
- package/dist/{block-env-y65GF_px.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 +5 -5
- 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 +3 -3
- 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 +4 -3
- package/dist/blocks/created-by/index.js +2 -2
- 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 +3 -3
- 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 +3 -3
- 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 +7 -4
- package/dist/blocks/updated-at/index.js +2 -2
- 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 +2 -2
- 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-D7TkPdco.js → add-B1S3yK4L.js} +20 -13
- package/dist/cli/add-BQPJnapO.js +1 -0
- package/dist/cli/{add-I8OW-qJH.js → add-D7YIXslp.js} +2 -2
- package/dist/cli/{backfill-DIz5DnlQ.js → backfill-BwkyNhlC.js} +4 -4
- package/dist/cli/bin.js +1 -1
- package/dist/cli/{blocks-Bp5RPoft.js → blocks-CBqENu3C.js} +1 -1
- package/dist/cli/{blocks-xk-SE8gS.js → blocks-DDm1Zc2S.js} +2 -2
- package/dist/cli/{cache-AznIssjI.js → cache-DE2IH1-C.js} +1 -1
- package/dist/cli/{codemod-Aewxza6i.js → codemod-OHKhVV-v.js} +4 -4
- 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-9t5ec_N7.js → config-BJSqMi04.js} +20 -6
- package/dist/cli/{config-CBqkQjjN.js → config-BlfVh0IP.js} +1 -1
- package/dist/cli/{config-CPux9Wa7.js → config-WKDixoGK.js} +1 -1
- package/dist/cli/{content-mapper-DCrz6OIv.js → content-mapper-CaygHH_k.js} +2 -2
- package/dist/cli/{db-DrBI_HNv.js → db-DYU5hUcd.js} +3 -3
- package/dist/cli/{doctor-DkOSLPEQ.js → doctor-D_nrsd9E.js} +186 -143
- package/dist/cli/{env-BBl5L8Bf.js → env-BCgVZkcb.js} +1 -1
- package/dist/cli/env-xhwXk5Ri.js +1 -0
- package/dist/cli/{gen-CFkYUnWq.js → gen-D7gMEwvg.js} +22 -15
- package/dist/cli/index.d.ts +2 -2
- package/dist/cli/index.js +8 -8
- package/dist/cli/{init-CHj9ad4S.js → init-ch-HWJyp.js} +7 -7
- package/dist/cli/{keys-DGEpMbeB.js → keys-CbaL0lnw.js} +1 -1
- package/dist/cli/{live-DGdLR41j.js → live-B38ePuRS.js} +2 -2
- package/dist/cli/{mcp-BZno503V.js → mcp-P9RP2SJ3.js} +3 -3
- package/dist/cli/{metadata-BfgHMe4q.js → metadata-BTihErEc.js} +3 -3
- package/dist/cli/{migration-safety-BnnXPAro.js → migration-safety-DYo1vVWC.js} +2 -2
- package/dist/cli/{module-migration-O_IxewFs.js → migrations-BoIyGczt.js} +3 -113
- package/dist/cli/module-migration-DXvo0EqU.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-D-0yV_L_.js +283 -0
- package/dist/cli/powersync-DXVsKkAu.js +1 -0
- package/dist/cli/{print-DosQIFSy.js → print-CRon4lXf.js} +2 -1
- package/dist/cli/{remove-DK2G_KHm.js → remove-D89s99ha.js} +6 -6
- package/dist/cli/{render-5y5a1QZr.js → render-BJF9ytUi.js} +15 -6
- package/dist/cli/{run-BXx6D1aR.js → run-DmOTMa44.js} +2 -2
- package/dist/cli/{run-Bs4OKdDI.js → run-jeplMBOK.js} +29 -10
- package/dist/cli/{run-MRET30vh.js → run-x9ZY4Tm0.js} +38 -37
- package/dist/cli/{seed-Cz8PcXeT.js → seed-D9mt8bnW.js} +3 -3
- package/dist/cli/seed-EPO6AvLG.js +1 -0
- package/dist/cli/{shared-BLqbvY2x.js → shared-B38Chjgd.js} +1 -1
- package/dist/cli/{skills-toUan_OV.js → skills-FXAVPLzp.js} +1 -1
- package/dist/cli/{snapshot-uTUlEzY2.js → snapshot-BXmU3IXN.js} +3 -3
- package/dist/cli/{source-args-IpJRJO5t.js → source-args-DlckPVje.js} +1 -1
- package/dist/cli/{source-D2gJHKwC.js → source-irttnsEb.js} +1 -1
- package/dist/cli/{spec-Cm2einTO.js → spec-CDxfokey.js} +3 -3
- package/dist/cli/{spec-DUjOtciN.js → spec-DzD5wMVF.js} +1 -1
- package/dist/cli/{sql-layout-lUWenjJw.js → sql-layout-D8QrNvt4.js} +2 -2
- package/dist/cli/{stack-CWEHdO0b.js → stack-DgASZP0K.js} +1 -1
- package/dist/cli/{sync-CZMRB3aU.js → sync-s1iKFIos.js} +3 -2
- package/dist/cli/{upgrade-BFEIMC7U.js → upgrade-B4FPlK-_.js} +4 -3
- package/dist/cli/{upgrade-fVsJniXm.js → upgrade-CluxP3JJ.js} +3 -3
- package/dist/cli/{version-B2Dr6VmJ.js → version-TgFM8sOd.js} +1 -1
- package/dist/client/index.d.ts +5 -5
- package/dist/client/native/index.d.ts +4 -4
- package/dist/{composite-CfYyU3vs.d.ts → composite-C-8A8qzi.d.ts} +4 -4
- 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-CcehOvbz.js → config-CD2OGfCG.js} +2 -1
- package/dist/{config-DWGgUQCh.js → config-mbVyJwSc.js} +7 -6
- package/dist/{context-8kb8m5uO.d.ts → context-D24k1Cpc.d.ts} +36 -4
- package/dist/{controller-BW-5Opig.d.ts → controller-BR7CZ1R9.d.ts} +1 -1
- package/dist/{conversion-3iv2r7YC.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-C5AcEkEJ.d.ts → define-Cgru0_kF.d.ts} +1 -1
- package/dist/{define-block-C1RHXz7L.d.ts → define-block-CJWiDWa5.d.ts} +11 -4
- package/dist/edge/index.d.ts +7 -7
- 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-sO977DO-.d.ts → entitlements-DHcNt1aF.d.ts} +1 -1
- package/dist/{events-SqJLbb8q.js → events-DuLhzjP6.js} +2 -0
- package/dist/{executor-BcNWcD-4.d.ts → executor-BWFfz0ik.d.ts} +2 -2
- package/dist/expo/index.d.ts +3 -3
- package/dist/expo/index.js +3 -3
- package/dist/{extension-B-lajjex.js → extension-DTaHjwdc.js} +3 -2
- package/dist/{extension-B0EjCYhO.js → extension-mGylYROs.js} +2 -10
- package/dist/{field-errors-Dt86dCKk.d.ts → field-errors-DucQdLl7.d.ts} +6 -6
- package/dist/{framework-BozTXRzt.js → framework-CNhTg0th.js} +1 -1
- package/dist/{framework-BGdZVyPL.d.ts → framework-x9Y4uB1q.d.ts} +5 -5
- 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 +6 -6
- package/dist/hono/index.js +7 -6
- package/dist/{index-Cc4mIQS8.d.ts → index-4WT_uRRL.d.ts} +20 -4
- package/dist/{index-CENWq3zb.d.ts → index-BAcQz5DS.d.ts} +1 -1
- package/dist/{index-CTu-3fJB.d.ts → index-BH3NYExp.d.ts} +3 -3
- package/dist/{index-CcAmFNVi.d.ts → index-C0t-vNIt.d.ts} +2 -2
- package/dist/{index-DZKCc2WM.d.ts → index-C6ruLtyx.d.ts} +3 -3
- package/dist/{index-Craf712U.d.ts → index-XAyzdLns.d.ts} +9 -9
- package/dist/{index-BxYOB1Oc.d.ts → index-iRkFvJ7J.d.ts} +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.js +1 -1
- package/dist/{instances-BHjCZoF8.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/list/index.d.ts +1 -1
- package/dist/{list-query-DYhgRTd5.d.ts → list-query-DxjuIHEL.d.ts} +1 -1
- package/dist/mapper/bin.js +7 -6
- package/dist/mcp/index.d.ts +11 -5
- package/dist/mcp/index.js +6 -6
- package/dist/mcp/sdk/index.d.ts +3 -3
- 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 +16 -16
- 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-CSc_IsHO.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-C-dQHH5-.js → options-BQWJqwHO.js} +3 -2
- 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-DChZoVfs.d.ts → options-B_NrjVDt.d.ts} +1 -0
- 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-B2swWnJW.js → options-C87u6eSa.js} +3 -2
- package/dist/{options-CVSWgZpY.js → options-CBAEGxwS.js} +1 -1
- package/dist/{options-CM6-18FQ.d.ts → options-CDSCkYxu.d.ts} +1 -0
- 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 +21 -10
- 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-mObLgH1z.d.ts → ports-g0H1Kzwr.d.ts} +1 -1
- package/dist/powersync/index.d.ts +136 -3
- 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-CsHnIBJF.js → preset-B3CukUhu.js} +4 -4
- package/dist/{push-token-BSSvsWXZ.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/native/index.d.ts +1 -1
- package/dist/react/server.d.ts +6 -6
- package/dist/react-router/index.d.ts +5 -5
- package/dist/react-router/index.js +5 -5
- package/dist/realtime/index.d.ts +3 -3
- package/dist/realtime/index.js +1 -1
- package/dist/{record-form-D9ILuVtA.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/{resource-DV2GC2dB.js → resource-R3KToNze.js} +1 -1
- package/dist/{resource-execute-Cpnob1Vj.d.ts → resource-execute-CKBtGL8-.d.ts} +1 -1
- package/dist/{resource-types-pMeLs68X.d.ts → resource-types-8Q5Klkpa.d.ts} +2 -2
- package/dist/{resources-C02l_YBJ.js → resources-DqIwoQsP.js} +1 -1
- package/dist/{resources-7iq2-5_A.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 -9
- package/dist/server/index.js +6 -6
- package/dist/{server-types-CK8mUIUT.d.ts → server-types-gR4Q1aM0.d.ts} +1 -1
- package/dist/{session-DWmFv3vB.d.ts → session-Fcft5A39.d.ts} +2 -2
- package/dist/{sign-in-B64114O4.js → sign-in-BLkRU3lc.js} +1 -1
- package/dist/solid/index.d.ts +6 -6
- package/dist/solid-start/index.d.ts +5 -5
- 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-Dl3Alk43.js → sql-fHTjZGqR.js} +4445 -3211
- package/dist/sql-type-iUSZpaUu.js +34 -0
- package/dist/sqlite/index.d.ts +1 -1
- 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 +6 -6
- package/dist/sveltekit/index.d.ts +6 -6
- package/dist/sveltekit/index.js +5 -5
- package/dist/{tags-qvVk79pp.d.ts → tags-sM-CH9Mn.d.ts} +1 -1
- package/dist/tanstack-db/index.d.ts +1 -1
- package/dist/tanstack-start/index.d.ts +5 -5
- package/dist/tanstack-start/index.js +5 -5
- package/dist/{tenant-DOKIJI62.d.ts → tenant-DyoVYFfC.d.ts} +1 -1
- package/dist/testing/index.d.ts +9 -9
- package/dist/testing/index.js +8 -5
- package/dist/{timeline-CvTuXYvn.d.ts → timeline-CMmo0R7g.d.ts} +3 -3
- package/dist/{topic-ikV_pLTX.js → topic-J9I3yu6f.js} +1 -1
- package/dist/{topic-CZXHhZye.d.ts → topic-nQYxoTaU.d.ts} +2 -2
- package/dist/{verify-CjvNLY7N.d.ts → verify-DEqY__0N.d.ts} +1 -1
- package/dist/vue/index.d.ts +6 -6
- package/dist/{watch-topic-BAxoPKZx.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 +471 -69
- package/schemas/doctor-report-v1.json +1 -0
- package/dist/cli/add-Bfb_ISrO.js +0 -1
- package/dist/cli/env-CAU1nknN.js +0 -1
- package/dist/cli/seed-D6XijwbR.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
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { p as commandMeta, r as defineCliCommand } from "./command-
|
|
1
|
+
import { p as commandMeta, r as defineCliCommand } from "./command-BWEEXmtz.js";
|
|
2
2
|
import { n as CliError } from "./errors-BTe6A15O.js";
|
|
3
3
|
import { t as PROCESS_ENV } from "./env-DMgjB_4y.js";
|
|
4
4
|
import { n as spawnInherited } from "./exec--Q1ZEWUW.js";
|
|
5
5
|
import { i as staleVariables } from "./stack-env-6hS-WEmh.js";
|
|
6
|
-
import { i as readStackEnv } from "./env-
|
|
6
|
+
import { i as readStackEnv } from "./env-BCgVZkcb.js";
|
|
7
7
|
//#region src/cli/commands/run.ts
|
|
8
8
|
const ARGS = {
|
|
9
9
|
prefix: {
|
|
@@ -1,17 +1,19 @@
|
|
|
1
1
|
import { r as errorText } from "./errors-BTe6A15O.js";
|
|
2
2
|
import { a as sameText, t as display } from "./io-DH1kcmmP.js";
|
|
3
|
-
import { c as writeAtomic, o as storeTypesModule, s as typesModuleKey, t as CACHE_DIR } from "./cache-
|
|
3
|
+
import { c as writeAtomic, o as storeTypesModule, s as typesModuleKey, t as CACHE_DIR } from "./cache-DE2IH1-C.js";
|
|
4
4
|
import { t as byCodePoint } from "./compare-BmIWVEui.js";
|
|
5
|
-
import { _ as stabilizeMetadata, b as typegenVersionNotice, p as oxfmtInstalled, t as loadSnapshot, y as typegenVersion } from "./snapshot-
|
|
6
|
-
import { n as render } from "./render-
|
|
7
|
-
import {
|
|
8
|
-
import { s as schemaStampPath } from "./content-mapper-
|
|
5
|
+
import { _ as stabilizeMetadata, b as typegenVersionNotice, p as oxfmtInstalled, t as loadSnapshot, y as typegenVersion } from "./snapshot-BXmU3IXN.js";
|
|
6
|
+
import { n as render } from "./render-BJF9ytUi.js";
|
|
7
|
+
import { _ as unsafeKey, d as accessProviderMode, f as accessRequirements, g as providerLabel, h as moduleKeyProblems, m as entitlementsMode, p as entitlementRequirements, u as compiledReadSets } from "./migrations-BoIyGczt.js";
|
|
8
|
+
import { s as schemaStampPath } from "./content-mapper-CaygHH_k.js";
|
|
9
9
|
import { a as changedFiles, d as fileDiff, i as changeLines, r as applyPlan, s as hasConflicts } from "./files-CX71yBm8.js";
|
|
10
|
-
import { n as migrationsDir, o as writtenByBlocks } from "./sql-layout-
|
|
11
|
-
import { l as tableObject, n as exposed, o as policyObject, s as qualified, t as catalogOf } from "./shared-
|
|
10
|
+
import { n as migrationsDir, o as writtenByBlocks } from "./sql-layout-D8QrNvt4.js";
|
|
11
|
+
import { l as tableObject, n as exposed, o as policyObject, s as qualified, t as catalogOf } from "./shared-B38Chjgd.js";
|
|
12
|
+
import { c as sameModuleMigration, l as writeLatestMigration, n as READ_SETS_SUFFIX, r as latestMigration, u as writesMigrations } from "./module-migration-DXvo0EqU.js";
|
|
12
13
|
import { existsSync } from "node:fs";
|
|
13
14
|
import { dirname, isAbsolute, relative, resolve, sep } from "node:path";
|
|
14
15
|
import { readFile } from "node:fs/promises";
|
|
16
|
+
import { DEFAULT_ACTIVE_TENANT } from "better-supabase/config";
|
|
15
17
|
import { SQL_MODULES, adoptedTables, declaredTables, moduleHidingColumns, moduleLayout, modulePermissionKeys, renderBlocks, resolveBlocks, sameBlockFile } from "better-supabase/sql";
|
|
16
18
|
//#region src/cli/doctor/advisor-rules.ts
|
|
17
19
|
/**
|
|
@@ -654,6 +656,11 @@ const TEMPLATE_EFFECT = {
|
|
|
654
656
|
isPlatformFor: "their checks of another user's platform permissions (platform_can) answer false or are skipped",
|
|
655
657
|
canAssignFor: "better_supabase.can_assign_as is not written and the inviter's right to assign the role is not checked again when the invitation is accepted"
|
|
656
658
|
};
|
|
659
|
+
function activeTenantLabel(source) {
|
|
660
|
+
if (source === "claim") return "the app_metadata claim";
|
|
661
|
+
if (source === "resolver") return "the request (the tenant resolver)";
|
|
662
|
+
return `the profile column ${source.profileColumn}`;
|
|
663
|
+
}
|
|
657
664
|
/** The optional templates installed modules call that the provider doesn't set. */
|
|
658
665
|
function missingTemplates(context, provider) {
|
|
659
666
|
const installed = new Set(context.config.blockNames);
|
|
@@ -935,7 +942,7 @@ const AUTHORIZATION_RULES = [
|
|
|
935
942
|
code: "BS409",
|
|
936
943
|
severity: "warning",
|
|
937
944
|
title: "The authorization provider and the better-supabase config disagree",
|
|
938
|
-
description: "The provider's hook writes the active tenant to `tokenHook.tenantClaim`, and its tenant scope is `tenantScope`. Doctor warns when `auth.organization.claim` names another claim (the tenant plugin, guards and RLS would read a claim the hook never writes), notes when `auth.claims.scope` is neither `tenant` nor the provider's tenant scope, notes when the provider sets `suspension` or `roleSources` but `blocks.permissions.model` is not `provider` (only that model reads them), and reports the `problems` the provider found while it was built.",
|
|
945
|
+
description: "The provider's hook writes the active tenant to `tokenHook.tenantClaim`, and its tenant scope is `tenantScope`. Doctor warns when `auth.organization.claim` names another claim (the tenant plugin, guards and RLS would read a claim the hook never writes), notes when `auth.claims.scope` is neither `tenant` nor the provider's tenant scope, warns when the provider's `tokenHook.activeOrganizationFrom` differs from `blocks.permissions.activeTenant` (where `switch_organization` writes the active organization), notes when the provider sets `suspension` or `roleSources` but `blocks.permissions.model` is not `provider` (only that model reads them), and reports the `problems` the provider found while it was built.",
|
|
939
946
|
check: (context) => {
|
|
940
947
|
const provider = context.config.authorization;
|
|
941
948
|
if (!provider) return [];
|
|
@@ -949,6 +956,12 @@ const AUTHORIZATION_RULES = [
|
|
|
949
956
|
message: `The hook of ${label} writes the active tenant to "${tenantClaim}", but auth.organization.claim is "${context.config.claims.tenant}". Set auth.organization.claim to "${tenantClaim}", or change the provider's tenant claim.`,
|
|
950
957
|
target: "claims.tenant"
|
|
951
958
|
});
|
|
959
|
+
const readsFrom = provider.tokenHook?.activeOrganizationFrom;
|
|
960
|
+
const writesTo = context.config.blocks.permissions?.activeTenant ?? DEFAULT_ACTIVE_TENANT;
|
|
961
|
+
if (readsFrom !== void 0 && activeTenantLabel(readsFrom) !== activeTenantLabel(writesTo)) findings.push({
|
|
962
|
+
message: `The hook of ${label} reads the active organization from ${activeTenantLabel(readsFrom)}, but switch_organization writes it to ${activeTenantLabel(writesTo)} (blocks.permissions.activeTenant), so switching never changes the token. Set blocks.permissions.activeTenant to match the provider.`,
|
|
963
|
+
target: "blocks.permissions.activeTenant"
|
|
964
|
+
});
|
|
952
965
|
const scope = context.config.claims.scope;
|
|
953
966
|
if (scope !== "tenant" && scope !== provider.tenantScope) findings.push({
|
|
954
967
|
severity: "info",
|
|
@@ -969,7 +982,7 @@ const AUTHORIZATION_RULES = [
|
|
|
969
982
|
code: "BS411",
|
|
970
983
|
severity: "error",
|
|
971
984
|
title: "The provider access model can't use the authorization provider",
|
|
972
|
-
description: "With `blocks.permissions.model: 'provider'`, the `access` module fills the provider's `idsWith` template for tenant checks and `isPlatform` for platform checks, at its tenant scope. Doctor reports a config without `authorization`, a tenant scope or id type the module can't render, a function those templates call that `authorization.requires` doesn't list, doesn't let `authenticated` execute or the database lacks, and every module permission key (from `modulePermissionKeys`) the provider doesn't mark `sqlComplete: true`, since its functions are trusted with role and scope only. It warns when neither `blocks.permissions.functions.canAssign` nor the provider's `canAssign` is set, because only the service role then assigns roles, and when an installed module calls a template the provider doesn't set (`idsWithFor` and `isPlatformFor` to check another user, `canAssignFor` to recheck an inviter).",
|
|
985
|
+
description: "With `blocks.permissions.model: 'provider'`, the `access` module fills the provider's `idsWith` template for tenant checks and `isPlatform` for platform checks, at its tenant scope. Doctor reports a config without `authorization`, a tenant scope or id type the module can't render, a function those templates call that `authorization.requires` doesn't list, doesn't let `authenticated` execute or the database lacks, and every module permission key (from `modulePermissionKeys`) the provider doesn't mark `sqlComplete: true`, since its functions are trusted with role and scope only. It warns when neither `blocks.permissions.functions.canAssign` nor the provider's `canAssign` is set, because only the service role then assigns roles, and when an installed module calls a template the provider doesn't set (`idsWithFor` and `isPlatformFor` to check another user, `canAssignFor` to recheck an inviter). It also warns when `blocks.memberships.options.roles.many` is on and none of the provider's `memberships` names a `rolesTable`, since the provider then sees one role per member.",
|
|
973
986
|
check: (context) => {
|
|
974
987
|
const mode = accessModule(context);
|
|
975
988
|
if (mode.kind === "off") return [];
|
|
@@ -992,6 +1005,12 @@ const AUTHORIZATION_RULES = [
|
|
|
992
1005
|
message: `Neither blocks.permissions.functions.canAssign nor ${providerLabel(provider)} sets canAssign, so under the provider model only the service role assigns roles: the memberships guard refuses every membership a member adds or changes. Use a provider that sets authorization.functions.canAssign, or set blocks.permissions.functions.canAssign.`,
|
|
993
1006
|
target: "blocks.permissions.functions.canAssign"
|
|
994
1007
|
});
|
|
1008
|
+
const roles = context.config.blocks["memberships"]?.options?.["roles"];
|
|
1009
|
+
if (typeof roles === "object" && roles !== null && "many" in roles && roles.many === true && (provider.memberships ?? []).length > 0 && !(provider.memberships ?? []).some((membership) => membership.rolesTable !== void 0)) findings.push({
|
|
1010
|
+
severity: "warning",
|
|
1011
|
+
message: `blocks.memberships.options.roles.many keeps several roles per member in better_supabase.membership_roles, but ${providerLabel(provider)} reads one role per membership: none of its authorization.memberships sets rolesTable. A member's extra roles then grant nothing through the provider. Use a provider that reads the role set, or turn roles.many off.`,
|
|
1012
|
+
target: "blocks.memberships.options.roles"
|
|
1013
|
+
});
|
|
995
1014
|
findings.push(...missingTemplates(context, provider));
|
|
996
1015
|
return findings;
|
|
997
1016
|
}
|
|
@@ -1140,7 +1159,7 @@ function templateCalls(template) {
|
|
|
1140
1159
|
return [...withoutStrings(template).matchAll(TEMPLATE_CALL)].map((match) => `${match[1]}.${match[2]}`.replaceAll("\"", "").toLowerCase());
|
|
1141
1160
|
}
|
|
1142
1161
|
const CONTRACT_CALL = /\bbetter_supabase"?\s*\.\s*"?(can|tenant_ids_with)"?\s*\(/gi;
|
|
1143
|
-
const ROLE_HELPER_CALL = /\bbetter_supabase"?\s*\.\s*"?(member_organization_ids|has_organization_role|
|
|
1162
|
+
const ROLE_HELPER_CALL = /\bbetter_supabase"?\s*\.\s*"?(member_organization_ids|has_organization_role|organization_member_roles?)"?\s*\(/gi;
|
|
1144
1163
|
/** The tenant role helpers `text` calls, outside string literals. */
|
|
1145
1164
|
function roleHelperCalls(text) {
|
|
1146
1165
|
const names = /* @__PURE__ */ new Set();
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { c as COMMANDS, d as GROUPS, f as RESERVED_NAMES, h as runCommand, i as joinRepeated, m as parseArgs$2, o as listArgs, s as runsWithInvalidConfig, t as GLOBAL_ARGS, u as DOCS_ORIGIN } from "./command-
|
|
1
|
+
import { c as COMMANDS, d as GROUPS, f as RESERVED_NAMES, h as runCommand, i as joinRepeated, m as parseArgs$2, o as listArgs, s as runsWithInvalidConfig, t as GLOBAL_ARGS, u as DOCS_ORIGIN } from "./command-BWEEXmtz.js";
|
|
2
2
|
import { n as highlight, r as painter } from "./style-Bm2X5JrN.js";
|
|
3
|
-
import { t as VERSION } from "./version-
|
|
3
|
+
import { t as VERSION } from "./version-TgFM8sOd.js";
|
|
4
4
|
import { n as CliError, o as toCliError } from "./errors-BTe6A15O.js";
|
|
5
5
|
import { a as missingInputNext, o as resolveAgent, t as checkConsent } from "./agent-CbuPvI2x.js";
|
|
6
|
-
import { a as globalFlags, c as resolveCommand, i as commandTree, n as closestName, o as isVariadic, r as commandArgs, t as checkArgs } from "./parse-
|
|
7
|
-
import { n as movedCommand, r as movedFlag } from "./moved-
|
|
6
|
+
import { a as globalFlags, c as resolveCommand, i as commandTree, n as closestName, o as isVariadic, r as commandArgs, t as checkArgs } from "./parse-B079x40m.js";
|
|
7
|
+
import { n as movedCommand, r as movedFlag } from "./moved-DVwgE8lV.js";
|
|
8
8
|
import { n as HTTP_CHANNEL, t as EXEC_CHANNEL } from "./trace-VbdO6bcN.js";
|
|
9
9
|
import { stripVTControlCharacters } from "node:util";
|
|
10
10
|
import { subscribe, unsubscribe } from "node:diagnostics_channel";
|
|
@@ -16,37 +16,38 @@ import { resolve } from "node:path";
|
|
|
16
16
|
* loads on demand, so `--version` and `--help` import no command.
|
|
17
17
|
*/
|
|
18
18
|
const LOADERS = [
|
|
19
|
-
["init", () => import("./init-
|
|
20
|
-
["add", () => import("./add-
|
|
21
|
-
["remove", () => import("./remove-
|
|
22
|
-
["upgrade", () => import("./upgrade-
|
|
23
|
-
["gen", () => import("./gen-
|
|
24
|
-
["doctor", () => import("./doctor-
|
|
25
|
-
["db query", () => import("./db-
|
|
26
|
-
["db diff", () => import("./db-
|
|
27
|
-
["db seed", () => import("./seed-
|
|
28
|
-
["db backfill", () => import("./backfill-
|
|
29
|
-
["dev env", () => import("./env-
|
|
30
|
-
["dev run", () => import("./run-
|
|
31
|
-
["dev keys", () => import("./keys-
|
|
32
|
-
["dev stack ls", () => import("./stack-
|
|
33
|
-
["dev stack prune", () => import("./stack-
|
|
34
|
-
["blocks list", () => import("./blocks-
|
|
35
|
-
["blocks view", () => import("./blocks-
|
|
36
|
-
["blocks search", () => import("./blocks-
|
|
37
|
-
["
|
|
38
|
-
["spec
|
|
39
|
-
["
|
|
40
|
-
["
|
|
41
|
-
["skills
|
|
42
|
-
["
|
|
43
|
-
["codemod 0.
|
|
44
|
-
["codemod 0.
|
|
45
|
-
["codemod 0.
|
|
46
|
-
["codemod 0.
|
|
47
|
-
["codemod 0.
|
|
48
|
-
["
|
|
49
|
-
["
|
|
19
|
+
["init", () => import("./init-ch-HWJyp.js").then((m) => m.initCommand)],
|
|
20
|
+
["add", () => import("./add-BQPJnapO.js").then((m) => m.addCommand)],
|
|
21
|
+
["remove", () => import("./remove-D89s99ha.js").then((m) => m.removeCommand)],
|
|
22
|
+
["upgrade", () => import("./upgrade-CluxP3JJ.js").then((m) => m.upgradeCommand)],
|
|
23
|
+
["gen", () => import("./gen-D7gMEwvg.js").then((m) => m.genCommand)],
|
|
24
|
+
["doctor", () => import("./doctor-D_nrsd9E.js").then((m) => m.doctorCommand)],
|
|
25
|
+
["db query", () => import("./db-DYU5hUcd.js").then((m) => m.dbQueryCommand)],
|
|
26
|
+
["db diff", () => import("./db-DYU5hUcd.js").then((m) => m.dbDiffCommand)],
|
|
27
|
+
["db seed", () => import("./seed-EPO6AvLG.js").then((m) => m.seedCommand)],
|
|
28
|
+
["db backfill", () => import("./backfill-BwkyNhlC.js").then((m) => m.dbBackfillCommand)],
|
|
29
|
+
["dev env", () => import("./env-xhwXk5Ri.js").then((m) => m.envCommand)],
|
|
30
|
+
["dev run", () => import("./run-DmOTMa44.js").then((m) => m.runCommand)],
|
|
31
|
+
["dev keys", () => import("./keys-CbaL0lnw.js").then((m) => m.keysCommand)],
|
|
32
|
+
["dev stack ls", () => import("./stack-DgASZP0K.js").then((m) => m.stackLsCommand)],
|
|
33
|
+
["dev stack prune", () => import("./stack-DgASZP0K.js").then((m) => m.stackPruneCommand)],
|
|
34
|
+
["blocks list", () => import("./blocks-CBqENu3C.js").then((m) => m.blocksListCommand)],
|
|
35
|
+
["blocks view", () => import("./blocks-CBqENu3C.js").then((m) => m.blocksViewCommand)],
|
|
36
|
+
["blocks search", () => import("./blocks-CBqENu3C.js").then((m) => m.blocksSearchCommand)],
|
|
37
|
+
["powersync streams", () => import("./powersync-DXVsKkAu.js").then((m) => m.powersyncStreamsCommand)],
|
|
38
|
+
["spec emit", () => import("./spec-DzD5wMVF.js").then((m) => m.specEmitCommand)],
|
|
39
|
+
["spec validate", () => import("./spec-DzD5wMVF.js").then((m) => m.specValidateCommand)],
|
|
40
|
+
["mcp", () => import("./mcp-P9RP2SJ3.js").then((m) => m.mcpCommand)],
|
|
41
|
+
["skills list", () => import("./skills-FXAVPLzp.js").then((m) => m.skillsListCommand)],
|
|
42
|
+
["skills install", () => import("./skills-FXAVPLzp.js").then((m) => m.skillsInstallCommand)],
|
|
43
|
+
["codemod 0.4", () => import("./codemod-OHKhVV-v.js").then((m) => m.codemodCommand("0.4"))],
|
|
44
|
+
["codemod 0.5", () => import("./codemod-OHKhVV-v.js").then((m) => m.codemodCommand("0.5"))],
|
|
45
|
+
["codemod 0.6", () => import("./codemod-OHKhVV-v.js").then((m) => m.codemodCommand("0.6"))],
|
|
46
|
+
["codemod 0.9", () => import("./codemod-OHKhVV-v.js").then((m) => m.codemodCommand("0.9"))],
|
|
47
|
+
["codemod 0.11", () => import("./codemod-OHKhVV-v.js").then((m) => m.codemodCommand("0.11"))],
|
|
48
|
+
["codemod 0.15", () => import("./codemod-OHKhVV-v.js").then((m) => m.codemodCommand("0.15"))],
|
|
49
|
+
["completion", () => import("./completion-BfnKI4QZ.js").then((m) => m.completionCommand)],
|
|
50
|
+
["config", () => import("./config-WKDixoGK.js").then((m) => m.configCommand)]
|
|
50
51
|
];
|
|
51
52
|
/** The built-in commands, for `createCli`. */
|
|
52
53
|
function builtinCommands() {
|
|
@@ -465,7 +466,7 @@ function cliFromTree(init, extra = {}) {
|
|
|
465
466
|
};
|
|
466
467
|
if (argv[0] === "__complete") {
|
|
467
468
|
const words = argv[1] === "--" ? argv.slice(2) : argv.slice(1);
|
|
468
|
-
const lines = await import("./completion-
|
|
469
|
+
const lines = await import("./completion-8EDK21xj.js").then(async ({ complete, completionLines }) => completionLines(await complete(tree, words))).catch(() => "");
|
|
469
470
|
if (lines !== "") out(lines);
|
|
470
471
|
return {
|
|
471
472
|
code: 0,
|
|
@@ -594,7 +595,7 @@ function cliFromTree(init, extra = {}) {
|
|
|
594
595
|
try {
|
|
595
596
|
const [loaded, { defaultConfig, discoverConfig, loadConfig }, { configEnvironment, isCi, parseEnv }] = await Promise.all([
|
|
596
597
|
node.load(),
|
|
597
|
-
import("./config-
|
|
598
|
+
import("./config-BlfVh0IP.js"),
|
|
598
599
|
import("./env-C-Bl6Awn.js")
|
|
599
600
|
]);
|
|
600
601
|
command = loaded;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { p as commandMeta, r as defineCliCommand } from "./command-
|
|
1
|
+
import { p as commandMeta, r as defineCliCommand } from "./command-BWEEXmtz.js";
|
|
2
2
|
import { i as isLocalDatabaseUrl, r as databaseHost } from "./agent-CbuPvI2x.js";
|
|
3
3
|
import { t as display } from "./io-DH1kcmmP.js";
|
|
4
|
-
import { l as stdinDatabaseUrl, n as databaseUrl, o as importExport } from "./config-
|
|
4
|
+
import { l as stdinDatabaseUrl, n as databaseUrl, o as importExport } from "./config-BJSqMi04.js";
|
|
5
5
|
import { m as supabaseDir } from "./supabase-toml-CncmQbO0.js";
|
|
6
6
|
import { t as connect } from "./db-CQCLx7cx.js";
|
|
7
7
|
import { c as insideRoot, i as changeLines, n as PLAN_ARGS, r as applyPlan, s as hasConflicts, u as planResult } from "./files-CX71yBm8.js";
|
|
8
|
-
import { r as STACK_ARG, t as DB_URL_STDIN_ARG } from "./source-args-
|
|
8
|
+
import { r as STACK_ARG, t as DB_URL_STDIN_ARG } from "./source-args-DlckPVje.js";
|
|
9
9
|
import { existsSync } from "node:fs";
|
|
10
10
|
import { resolve } from "node:path";
|
|
11
11
|
import { readFile } from "node:fs/promises";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { n as seedCommand } from "./seed-D9mt8bnW.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as toCatalog } from "./source-
|
|
1
|
+
import { a as toCatalog } from "./source-irttnsEb.js";
|
|
2
2
|
import { h as tomlGet, p as sqlWorkflow, r as detectWorkflow } from "./supabase-toml-CncmQbO0.js";
|
|
3
3
|
//#region src/cli/doctor/shared.ts
|
|
4
4
|
const catalogs = /* @__PURE__ */ new WeakMap();
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as list, p as commandMeta, r as defineCliCommand } from "./command-
|
|
1
|
+
import { a as list, p as commandMeta, r as defineCliCommand } from "./command-BWEEXmtz.js";
|
|
2
2
|
import { n as CliError } from "./errors-BTe6A15O.js";
|
|
3
3
|
import { t as byCodePoint } from "./compare-BmIWVEui.js";
|
|
4
4
|
import { n as PLAN_ARGS, r as applyPlan, u as planResult } from "./files-CX71yBm8.js";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { n as CliError, r as errorText } from "./errors-BTe6A15O.js";
|
|
2
|
-
import { d as readExtras, l as TYPEGEN_VERSION, r as cachedIntrospect } from "./cache-
|
|
2
|
+
import { d as readExtras, l as TYPEGEN_VERSION, r as cachedIntrospect } from "./cache-DE2IH1-C.js";
|
|
3
3
|
import { t as byCodePoint } from "./compare-BmIWVEui.js";
|
|
4
|
-
import { n as managementSource, r as pgSource } from "./source-
|
|
5
|
-
import { n as databaseUrl, u as accessToken } from "./config-
|
|
4
|
+
import { n as managementSource, r as pgSource } from "./source-irttnsEb.js";
|
|
5
|
+
import { n as databaseUrl, u as accessToken } from "./config-BJSqMi04.js";
|
|
6
6
|
import { d as readSupabaseToml, f as schemaPaths, h as tomlGet, u as pgFunctionHooks } from "./supabase-toml-CncmQbO0.js";
|
|
7
7
|
import { t as connect } from "./db-CQCLx7cx.js";
|
|
8
8
|
import { existsSync } from "node:fs";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { n as CliError } from "./errors-BTe6A15O.js";
|
|
2
|
-
import { l as stdinDatabaseUrl } from "./config-
|
|
2
|
+
import { l as stdinDatabaseUrl } from "./config-BJSqMi04.js";
|
|
3
3
|
//#region src/cli/commands/source-args.ts
|
|
4
4
|
/**
|
|
5
5
|
* The connection string from stdin, for commands that connect but read no
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as VERSION } from "./version-
|
|
1
|
+
import { t as VERSION } from "./version-TgFM8sOd.js";
|
|
2
2
|
import { n as CliError } from "./errors-BTe6A15O.js";
|
|
3
3
|
import { r as redactUrl } from "./redact-KGAk2Ul9.js";
|
|
4
4
|
import { n as HTTP_CHANNEL } from "./trace-VbdO6bcN.js";
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { n as __require, t as __commonJSMin } from "./rolldown-runtime-kJ_i4yPo.js";
|
|
2
|
-
import { p as commandMeta, r as defineCliCommand } from "./command-
|
|
3
|
-
import { t as VERSION } from "./version-
|
|
2
|
+
import { p as commandMeta, r as defineCliCommand } from "./command-BWEEXmtz.js";
|
|
3
|
+
import { t as VERSION } from "./version-TgFM8sOd.js";
|
|
4
4
|
import { i as failedResult, n as CliError, r as errorText } from "./errors-BTe6A15O.js";
|
|
5
5
|
import { t as display } from "./io-DH1kcmmP.js";
|
|
6
|
-
import { c as writeAtomic, t as CACHE_DIR } from "./cache-
|
|
6
|
+
import { c as writeAtomic, t as CACHE_DIR } from "./cache-DE2IH1-C.js";
|
|
7
7
|
import { t as isRecord } from "./guards-CUlDNYZs.js";
|
|
8
8
|
import { t as importFresh } from "./fresh-import-DzgsGHkX.js";
|
|
9
9
|
import { a as changedFiles, i as changeLines, r as applyPlan } from "./files-CX71yBm8.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { n as specEmitCommand, i as specValidateCommand } from "./spec-
|
|
1
|
+
export { n as specEmitCommand, i as specValidateCommand } from "./spec-CDxfokey.js";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { d as TypegenMissingError, i as parseSnapshot } from "./snapshot-
|
|
2
|
-
import { a as toCatalog } from "./source-
|
|
1
|
+
import { d as TypegenMissingError, i as parseSnapshot } from "./snapshot-BXmU3IXN.js";
|
|
2
|
+
import { a as toCatalog } from "./source-irttnsEb.js";
|
|
3
3
|
import { d as readSupabaseToml, f as schemaPaths, n as declarativeSchemasDir, p as sqlWorkflow } from "./supabase-toml-CncmQbO0.js";
|
|
4
4
|
import { existsSync } from "node:fs";
|
|
5
5
|
import { dirname, join, relative, resolve, sep } from "node:path";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { p as commandMeta, r as defineCliCommand } from "./command-
|
|
1
|
+
import { p as commandMeta, r as defineCliCommand } from "./command-BWEEXmtz.js";
|
|
2
2
|
import { r as supabaseCli } from "./exec--Q1ZEWUW.js";
|
|
3
3
|
import { a as readSharedMemory, i as reportStacks, n as listStacks, r as prunePlan, t as branchName } from "./stacks-BYlQ96WS.js";
|
|
4
4
|
//#region src/cli/commands/stack.ts
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { n as CliError } from "./errors-BTe6A15O.js";
|
|
2
2
|
import { t as display } from "./io-DH1kcmmP.js";
|
|
3
|
-
import {
|
|
3
|
+
import { a as writeExtensionsMigration, c as layoutFor, t as DATA_NEXT } from "./migrations-BoIyGczt.js";
|
|
4
4
|
import { d as readSupabaseToml, f as schemaPaths, h as tomlGet, i as diffEngine, l as migrationCommand, o as findSupabaseRoot, p as sqlWorkflow, t as PGDELTA_TABLE } from "./supabase-toml-CncmQbO0.js";
|
|
5
5
|
import { d as fileDiff, i as changeLines, l as keepHandEdit, o as handEditedError, r as applyPlan, t as HAND_EDITED, u as planResult } from "./files-CX71yBm8.js";
|
|
6
|
-
import { a as sqlPlan, n as migrationsDir } from "./sql-layout-
|
|
6
|
+
import { a as sqlPlan, n as migrationsDir } from "./sql-layout-D8QrNvt4.js";
|
|
7
|
+
import { c as sameModuleMigration, l as writeLatestMigration, r as latestMigration, s as renderModuleMigration, t as MODULES_SUFFIX, u as writesMigrations } from "./module-migration-DXvo0EqU.js";
|
|
7
8
|
import { t as loadTopics } from "./topics-BpdnYmWb.js";
|
|
8
9
|
import { t as orphanedBlockFiles } from "./orphans-BAboqyVM.js";
|
|
9
10
|
import { dirname, join, resolve } from "node:path";
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { t as display } from "./io-DH1kcmmP.js";
|
|
2
|
-
import {
|
|
2
|
+
import { c as layoutFor, r as migrationStamp } from "./migrations-BoIyGczt.js";
|
|
3
3
|
import { d as fileDiff, i as changeLines, r as applyPlan } from "./files-CX71yBm8.js";
|
|
4
|
-
import { a as sqlPlan, n as migrationsDir } from "./sql-layout-
|
|
5
|
-
import { a as
|
|
4
|
+
import { a as sqlPlan, n as migrationsDir } from "./sql-layout-D8QrNvt4.js";
|
|
5
|
+
import { a as migrationInstances, c as sameModuleMigration, o as migrationModules, r as latestMigration, s as renderModuleMigration, t as MODULES_SUFFIX, u as writesMigrations } from "./module-migration-DXvo0EqU.js";
|
|
6
|
+
import { a as write, o as topicPolicyFile, r as nextStep } from "./sync-s1iKFIos.js";
|
|
6
7
|
import { a as legacyPrefixSql, i as legacyPrefixNames, r as legacyBlocksTableSql } from "./legacy-prefix-DkTA3Rhx.js";
|
|
7
8
|
import { resolve } from "node:path";
|
|
8
9
|
import { readFile } from "node:fs/promises";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { p as commandMeta, r as defineCliCommand } from "./command-
|
|
1
|
+
import { p as commandMeta, r as defineCliCommand } from "./command-BWEEXmtz.js";
|
|
2
2
|
import { i as plain } from "./style-Bm2X5JrN.js";
|
|
3
|
-
import { t as syncModules } from "./sync-
|
|
3
|
+
import { t as syncModules } from "./sync-s1iKFIos.js";
|
|
4
4
|
import { t as SQL_ARGS } from "./args-UEwg0l-N.js";
|
|
5
|
-
import { t as upgrade } from "./upgrade-
|
|
5
|
+
import { t as upgrade } from "./upgrade-B4FPlK-_.js";
|
|
6
6
|
//#region src/cli/commands/upgrade.ts
|
|
7
7
|
const UPGRADE_ARGS = {
|
|
8
8
|
check: {
|
package/dist/client/index.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { a as DataSync, c as LocalTablesOption, i as DataEntry, l as liveEngine, n as DataEngine, o as DataSyncState, r as DataEngineOptions, s as LiveEngineOptions, t as DataChanges, u as memoryEngine } from "../data-engine-BWoz9lED.js";
|
|
2
|
-
import { n as TopicPort, r as TopicWatch, t as TopicHandle } from "../watch-topic-
|
|
3
|
-
import { a as PickFilesOptions, c as Shortcut, d as UploadPort, f as memoryStorage, i as KeyboardPort, l as StoragePort, n as DeepLinkPort, o as PickedFile, p as storageUpload, r as FilePickerPort, s as PushTokenPort, t as ClientPorts, u as UploadDestination } from "../ports-
|
|
4
|
-
import { a as ClientAuth, i as BindClientOptions, n as AuthUser, o as bindClient, r as BetterClient, t as AuthSnapshot } from "../bind-
|
|
5
|
-
import { a as defineController, i as ControllerState, n as Controller, o as whileSignedIn, r as ControllerParts, t as AuthPort } from "../controller-
|
|
2
|
+
import { n as TopicPort, r as TopicWatch, t as TopicHandle } from "../watch-topic-UGSEWAqR.js";
|
|
3
|
+
import { a as PickFilesOptions, c as Shortcut, d as UploadPort, f as memoryStorage, i as KeyboardPort, l as StoragePort, n as DeepLinkPort, o as PickedFile, p as storageUpload, r as FilePickerPort, s as PushTokenPort, t as ClientPorts, u as UploadDestination } from "../ports-g0H1Kzwr.js";
|
|
4
|
+
import { a as ClientAuth, i as BindClientOptions, n as AuthUser, o as bindClient, r as BetterClient, t as AuthSnapshot } from "../bind-pu5TLrla.js";
|
|
5
|
+
import { a as defineController, i as ControllerState, n as Controller, o as whileSignedIn, r as ControllerParts, t as AuthPort } from "../controller-BR7CZ1R9.js";
|
|
6
6
|
import { n as FunctionContract } from "../function-contract-DxFNOmsm.js";
|
|
7
|
-
import { a as webDeepLinks, c as webPorts, d as FunctionContracts, f as FunctionsHost, h as functions, i as WebPushTokenOptions, l as webPushToken, m as TypedFunctions, n as createClient, o as webFilePicker, p as InvokeOptions, r as PushRegistrationLike, s as webKeyboard, t as ClientOptions, u as webStorage } from "../index-
|
|
7
|
+
import { a as webDeepLinks, c as webPorts, d as FunctionContracts, f as FunctionsHost, h as functions, i as WebPushTokenOptions, l as webPushToken, m as TypedFunctions, n as createClient, o as webFilePicker, p as InvokeOptions, r as PushRegistrationLike, s as webKeyboard, t as ClientOptions, u as webStorage } from "../index-C6ruLtyx.js";
|
|
8
8
|
export { type AuthPort, type AuthSnapshot, type AuthUser, type BetterClient, type BindClientOptions, type ClientAuth, ClientOptions, type ClientPorts, type Controller, type ControllerParts, type ControllerState, type DataChanges, type DataEngine, type DataEngineOptions, type DataEntry, type DataSync, type DataSyncState, type DeepLinkPort, type FilePickerPort, type FunctionContract, type FunctionContracts, type FunctionsHost, type InvokeOptions, type KeyboardPort, type LiveEngineOptions, type LocalTablesOption, type PickFilesOptions, type PickedFile, type PushRegistrationLike, type PushTokenPort, type Shortcut, type StoragePort, type TopicHandle, type TopicPort, type TopicWatch, type TypedFunctions, type UploadDestination, type UploadPort, type WebPushTokenOptions, bindClient, createClient, defineController, functions, liveEngine, memoryEngine, memoryStorage, storageUpload, webDeepLinks, webFilePicker, webKeyboard, webPorts, webPushToken, webStorage, whileSignedIn };
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { t as AsyncResult } from "../../result-DZeA5KS6.js";
|
|
2
2
|
import { T as UploadOptions, w as UploadBody } from "../../bucket-vc-QRrva.js";
|
|
3
|
-
import { n as TopicPort, r as TopicWatch, t as TopicHandle } from "../../watch-topic-
|
|
4
|
-
import { a as PickFilesOptions, c as Shortcut, d as UploadPort, f as memoryStorage, i as KeyboardPort, l as StoragePort, n as DeepLinkPort, o as PickedFile, p as storageUpload, r as FilePickerPort, s as PushTokenPort, t as ClientPorts, u as UploadDestination } from "../../ports-
|
|
5
|
-
import { a as ClientAuth, i as BindClientOptions, n as AuthUser, o as bindClient, r as BetterClient, t as AuthSnapshot } from "../../bind-
|
|
6
|
-
import { n as ExpoPushTokenOptions, r as expoPushToken, t as ExpoNotificationsLike } from "../../push-token-
|
|
3
|
+
import { n as TopicPort, r as TopicWatch, t as TopicHandle } from "../../watch-topic-UGSEWAqR.js";
|
|
4
|
+
import { a as PickFilesOptions, c as Shortcut, d as UploadPort, f as memoryStorage, i as KeyboardPort, l as StoragePort, n as DeepLinkPort, o as PickedFile, p as storageUpload, r as FilePickerPort, s as PushTokenPort, t as ClientPorts, u as UploadDestination } from "../../ports-g0H1Kzwr.js";
|
|
5
|
+
import { a as ClientAuth, i as BindClientOptions, n as AuthUser, o as bindClient, r as BetterClient, t as AuthSnapshot } from "../../bind-pu5TLrla.js";
|
|
6
|
+
import { n as ExpoPushTokenOptions, r as expoPushToken, t as ExpoNotificationsLike } from "../../push-token-Cl2EihRc.js";
|
|
7
7
|
import { a as OAuthSignInOptions, c as linkParams, i as OAuthClient, l as signInWithOAuthBrowser, n as AuthLinkClient, o as WebBrowserLike, r as AuthLinkResult, s as handleAuthDeepLink, t as AuthFailure } from "../../auth-link-B4NL84XU.js";
|
|
8
8
|
import { SupabaseClient } from "@supabase/supabase-js";
|
|
9
9
|
//#region src/client/native/auto-refresh.d.ts
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { O as AnyFunctions, k as AnyModels } from "./types-DFdg_4yN.js";
|
|
2
2
|
import { r as AuthState } from "./resolve-CXX6DHv3.js";
|
|
3
|
-
import { t as BetterSupabase, v as Db } from "./define-
|
|
4
|
-
import { a as ServerContext, b as ReplicaState, c as ServerOptions, n as BetterServer } from "./server-types-
|
|
3
|
+
import { t as BetterSupabase, v as Db } from "./define-Cgru0_kF.js";
|
|
4
|
+
import { a as ServerContext, b as ReplicaState, c as ServerOptions, n as BetterServer } from "./server-types-gR4Q1aM0.js";
|
|
5
5
|
import { t as ActiveSupport } from "./support-B4ZBVxt3.js";
|
|
6
|
-
import { n as SessionEntryConfig } from "./session-
|
|
7
|
-
import { r as GuardOptions } from "./respond-
|
|
6
|
+
import { n as SessionEntryConfig } from "./session-Fcft5A39.js";
|
|
7
|
+
import { r as GuardOptions } from "./respond-oZeJ342J.js";
|
|
8
8
|
import { SupabaseClient } from "@supabase/supabase-js";
|
|
9
9
|
import { Entry, SingleKeyEntry } from "@supabase/middleware";
|
|
10
10
|
import { AuthMode, JWTClaims, UserClaims } from "@supabase/server";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { o as problemResponse } from "./problem-Bf0cJ7tk.js";
|
|
2
|
-
import { T as serverCore, _ as withSupport, g as withTenant, s as createServer, w as withServerContext, y as withSession } from "./adapter-
|
|
2
|
+
import { T as serverCore, _ as withSupport, g as withTenant, s as createServer, w as withServerContext, y as withSession } from "./adapter-CfuBICuG.js";
|
|
3
3
|
import { s as withPrimaryPin } from "./replicas-Dyoh3CEg.js";
|
|
4
|
-
import {
|
|
4
|
+
import { i as guard, n as defaultExpose } from "./respond-3RKp6VgU.js";
|
|
5
5
|
import { a as withAuthMode, i as withAuth, o as withJwtClaims, s as withUserClaims } from "./claims-DTy6R6my.js";
|
|
6
6
|
import { defineComposite, defineMiddleware } from "@supabase/middleware";
|
|
7
7
|
//#region src/server/entries/db.ts
|
package/dist/config/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { M as Casing } from "../types-DFdg_4yN.js";
|
|
2
|
-
import { C as EntityConfig, S as EntitiesConfig, a as AuthorizationProvider, b as DEFAULT_ACTIVE_TENANT, c as AuthorizationScope, d as AccessBlockConfig, f as ActiveTenantSource, g as BlockMode, i as AuthorizationPermission,
|
|
3
|
-
import { $ as blockEntrySource, $n as APP_COLUMN_ACCESS, $r as RpcTypeReference, $t as ResolvedExtensions, A as ValibotGeneratorOptions, Ai as
|
|
2
|
+
import { A as tenantNameOf, C as EntityConfig, D as OwnTablePolicies, S as EntitiesConfig, a as AuthorizationProvider, b as DEFAULT_ACTIVE_TENANT, c as AuthorizationScope, d as AccessBlockConfig, f as ActiveTenantSource, g as BlockMode, i as AuthorizationPermission, l as AuthorizationTokenHook, m as BlockConfig, n as AuthorizationMembership, o as AuthorizationRequirement, p as AnyBlocksConfig, r as AuthorizationOperation, s as AuthorizationRoleSource, t as AuthorizationFunctions, u as providerApiProblem, v as BlockScope, x as DisabledRow, y as BlocksConfig } from "../authorization-IiE__z2m.js";
|
|
3
|
+
import { $ as blockEntrySource, $n as APP_COLUMN_ACCESS, $r as RpcTypeReference, $t as ResolvedExtensions, A as ValibotGeneratorOptions, Ai as SkillsAgent, An as ExposePrivilege, Ar as CatalogIndex, At as GeneratedFile, B as jsonSchema, Br as ForeignKeyAction, Bt as GeneratorInputSchema, Ci as GenConfig, Cn as TopicTriggerPayloadValueConfig, Cr as CatalogColumn, D as ZodFlavor, Di as MigrationSafetyConfig, Dn as VectorSearchConfig, Dr as CatalogFunction, Dt as resolveJsonSchema, Ei as KeysConfig, En as VectorDistance, Er as CatalogForeignKey, F as nuqs, Fi as IntegrationInfo, Fr as ExtrasDomain, Ft as GeneratorEntitySchemas, G as tenantClaimPaths, Gr as PostgresColumn, Gt as JsonSchemaSource, H as ClaimPaths, Hr as SnapshotBucket, Ht as GeneratorModel, I as FactoriesGeneratorOptions, Ii as SKILLS_AGENTS, Ir as ExtrasFunction, It as GeneratorField, J as blockEntityRenames, Jn as CONFIG_DEFAULTS, Jr as RpcFunction, Jt as SourceConfig, K as BlockEntity, Kr as PostgresFunction, Kt as JsonTypeConfig, L as factories, Lr as ExtrasHook, Lt as GeneratorFunction, M as StandardSchemaGeneratorOptions, Mi as GEN_TASKS, Mn as Privilege, Mr as CatalogTable, Mt as GeneratorBlock, N as standardSchema, Ni as INTEGRATION_INFO, Nn as ResolvedExpose, Nr as CatalogTrigger, Nt as GeneratorBlockEntity, O as ZodGeneratorOptions, Oi as OpenApiConfig, On as ColumnPrivilege, Or as CatalogFunctionArg, Ot as ClaimsConfig, P as NuqsGeneratorOptions, Pi as INTEGRATION_NAMES, Pr as CatalogUnique, Pt as GeneratorColumn, Q as RENAMED_CONFIG_KEYS, Qr as RpcReturnColumn, Qt as ResolvedConfig, R as JsonSchemaGeneratorOptions, Rr as ExtrasHookFunction, Rt as GeneratorFunctionArg, Si as EnvFileConfig, Sn as TopicTriggerLookupConfig, Sr as CatalogCheck, Ti as IntegrationName, Tn as TopicTriggerValueConfig, Tr as CatalogEnum, U as DEFAULT_CLAIMS, Ur as SnapshotExtras, Ut as GeneratorNoun, V as JsonSchemaTarget, Vr as Snapshot, Vt as GeneratorJsonSchema, W as claimPaths, Wr as GeneratorMetadata, Wt as GeneratorTable, X as CONFIG_GROUPS, Xr as RpcFunctionOverload, Xt as DataHooksFramework, Y as blockSubjectTypes, Yr as RpcFunctionArg, Yt as TableConfig, Z as RENAMED_BLOCK_KEYS, Zr as RpcFunctionReturns, Zt as FlatConfig, _n as ResolvedSqlConfig, _r as AppTableEvents, an as BlockInput, ar as AppColumnAccess, at as defineConfig, bn as SqlWorkflow, br as AppTablesConfig, cn as EnvironmentConfig, cr as AppColumnType, ct as BlockTableReference, dn as SqlInput, dr as AppReference, dt as RoleNames, en as ApiConfig, er as APP_COLUMN_FORMATS, et as flattenConfig, fn as ToolingConfig, fr as AppReferenceTarget, ft as TypedReference, gn as RealtimeConfig, gr as AppTableEventKind, hn as BucketConfig, hr as AppTableConfig, in as BetterSupabaseConfig, ir as APP_TABLE_EVENT_KINDS, it as CONFIG_SCHEMA_URL, j as valibot, ji as SkillsConfig, jn as ExposeRole, jr as CatalogPolicy, jt as Generator, k as zod, ki as PowerSyncGenConfig, kn as ExposeConfig, kr as CatalogGrant, kt as CodecsConfig, ln as GenGroupConfig, lr as AppLookupConfig, lt as BucketName, mn as EntitlementsConfig, mr as AppRollupConfig, mt as ExpandedConfig, nn as AppTablesInput, nr as APP_ON_DELETE_ACTIONS, nt as groupEntries, on as BlocksInput, or as AppColumnConfig, ot as resolveConfig, pn as EntitlementPlansSource, pr as AppRollupAggregate, q as blockEntities, qr as PostgresFunctionArg, qt as RelationsConfig, rn as AuthConfig, rr as APP_ROLLUP_AGGREGATES, rt as hasFlatTables, sn as DatabaseConfig, sr as AppColumnFormat, st as AppTableNames, tn as AppTableInput, tr as APP_COLUMN_TYPES, tt as groupConfig, un as OrganizationConfig, ur as AppOnDeleteAction, ut as ConfigReferences, vn as SeedConfig, vr as AppTableSubject, wi as GenTask, wn as TopicTriggerTopicConfig, wr as CatalogColumnGrant, xi as DoctorConfig, xn as TopicTriggerConfig, xr as Catalog, yn as SqlConfig, yr as AppTableVersions, z as buildJsonSchema, zr as ExtrasTable, zt as GeneratorInput } from "../context-D24k1Cpc.js";
|
|
4
4
|
import { n as SubjectsConfig, t as SubjectConfig } from "../subjects-DvmQeF_F.js";
|
|
5
5
|
import { a as FieldFormat, o as FieldFormatInput, r as FIELD_FORMATS } from "../field-formats-CAFNkKSN.js";
|
|
6
|
-
export { APP_COLUMN_ACCESS, APP_COLUMN_FORMATS, APP_COLUMN_TYPES, APP_ON_DELETE_ACTIONS, APP_ROLLUP_AGGREGATES, APP_TABLE_EVENT_KINDS, type AccessBlockConfig, type ActiveTenantSource, type AnyBlocksConfig, type ApiConfig, type AppColumnAccess, type AppColumnConfig, type AppColumnFormat, type AppColumnType, type AppLookupConfig, type AppOnDeleteAction, type AppReference, type AppReferenceTarget, type AppRollupAggregate, type AppRollupConfig, type AppTableConfig, type AppTableEventKind, type AppTableEvents, type AppTableInput, type AppTableNames, type AppTableSubject, type AppTableVersions, type AppTablesConfig, type AppTablesInput, type AuthConfig, type AuthorizationFunctions, type AuthorizationMembership, type AuthorizationOperation, type AuthorizationPermission, type AuthorizationProvider, type AuthorizationRequirement, type AuthorizationRoleSource, type AuthorizationScope, type AuthorizationTokenHook, type BetterSupabaseConfig, type BlockConfig, type BlockEntity, type BlockInput, type BlockMode, type BlockScope, type BlockTableReference, type BlocksConfig, type BlocksInput, type BucketConfig, type BucketName, CONFIG_DEFAULTS, CONFIG_GROUPS, CONFIG_SCHEMA_URL, type Casing, type Catalog, type CatalogCheck, type CatalogColumn, type CatalogColumnGrant, type CatalogEnum, type CatalogForeignKey, type CatalogFunction, type CatalogFunctionArg, type CatalogGrant, type CatalogIndex, type CatalogPolicy, type CatalogTable, type CatalogTrigger, type CatalogUnique, type ClaimPaths, type ClaimsConfig, type CodecsConfig, type ColumnPrivilege, type ConfigReferences, DEFAULT_ACTIVE_TENANT, DEFAULT_CLAIMS, type DataHooksFramework, type DatabaseConfig, type DisabledRow, type DoctorConfig, type EntitiesConfig, type EntitlementPlansSource, type EntitlementsConfig, type EntityConfig, type EnvFileConfig, type EnvironmentConfig, type ExpandedConfig, type ExposeConfig, type ExposePrivilege, type ExposeRole, type ExtrasDomain, type ExtrasFunction, type ExtrasHook, type ExtrasHookFunction, type ExtrasTable, FIELD_FORMATS, type FactoriesGeneratorOptions, type FieldFormat, type FieldFormatInput, type FlatConfig, type ForeignKeyAction, GEN_TASKS, type GenConfig, type GenGroupConfig, type GenTask, type GeneratedFile, type Generator, type GeneratorBlock, type GeneratorBlockEntity, type GeneratorColumn, type GeneratorEntitySchemas, type GeneratorField, type GeneratorFunction, type GeneratorFunctionArg, type GeneratorInput, type GeneratorInputSchema, type GeneratorJsonSchema, type GeneratorMetadata, type GeneratorModel, type GeneratorNoun, type GeneratorTable, INTEGRATION_INFO, INTEGRATION_NAMES, type IntegrationInfo, type IntegrationName, type JsonSchemaGeneratorOptions, type JsonSchemaSource, type JsonSchemaTarget, type JsonTypeConfig, type KeysConfig, type MigrationSafetyConfig, type NuqsGeneratorOptions, type OpenApiConfig, type OrganizationConfig, type PostgresColumn, type PostgresFunction, type PostgresFunctionArg, type Privilege, RENAMED_BLOCK_KEYS, RENAMED_CONFIG_KEYS, type RealtimeConfig, type RelationsConfig, type ResolvedConfig, type ResolvedExpose, type ResolvedExtensions, type ResolvedSqlConfig, type RoleNames, type RpcFunction, type RpcFunctionArg, type RpcFunctionOverload, type RpcFunctionReturns, type RpcReturnColumn, type RpcTypeReference, SKILLS_AGENTS, type SeedConfig, type SkillsAgent, type SkillsConfig, type Snapshot, type SnapshotBucket, type SnapshotExtras, type SourceConfig, type SqlConfig, type SqlInput, type SqlWorkflow, type StandardSchemaGeneratorOptions, type SubjectConfig, type SubjectsConfig, type TableConfig, type ToolingConfig, type TopicTriggerConfig, type TopicTriggerLookupConfig, type TopicTriggerPayloadValueConfig, type TopicTriggerTopicConfig, type TopicTriggerValueConfig, type TypedReference, type ValibotGeneratorOptions, type VectorDistance, type VectorSearchConfig, type ZodFlavor, type ZodGeneratorOptions, blockEntities, blockEntityRenames, blockEntrySource, blockSubjectTypes, buildJsonSchema, claimPaths, defineConfig, factories, flattenConfig, groupConfig, groupEntries, hasFlatTables, jsonSchema, nuqs, providerApiProblem, resolveConfig, resolveJsonSchema, standardSchema, tenantClaimPaths, tenantNameOf, valibot, zod };
|
|
6
|
+
export { APP_COLUMN_ACCESS, APP_COLUMN_FORMATS, APP_COLUMN_TYPES, APP_ON_DELETE_ACTIONS, APP_ROLLUP_AGGREGATES, APP_TABLE_EVENT_KINDS, type AccessBlockConfig, type ActiveTenantSource, type AnyBlocksConfig, type ApiConfig, type AppColumnAccess, type AppColumnConfig, type AppColumnFormat, type AppColumnType, type AppLookupConfig, type AppOnDeleteAction, type AppReference, type AppReferenceTarget, type AppRollupAggregate, type AppRollupConfig, type AppTableConfig, type AppTableEventKind, type AppTableEvents, type AppTableInput, type AppTableNames, type AppTableSubject, type AppTableVersions, type AppTablesConfig, type AppTablesInput, type AuthConfig, type AuthorizationFunctions, type AuthorizationMembership, type AuthorizationOperation, type AuthorizationPermission, type AuthorizationProvider, type AuthorizationRequirement, type AuthorizationRoleSource, type AuthorizationScope, type AuthorizationTokenHook, type BetterSupabaseConfig, type BlockConfig, type BlockEntity, type BlockInput, type BlockMode, type BlockScope, type BlockTableReference, type BlocksConfig, type BlocksInput, type BucketConfig, type BucketName, CONFIG_DEFAULTS, CONFIG_GROUPS, CONFIG_SCHEMA_URL, type Casing, type Catalog, type CatalogCheck, type CatalogColumn, type CatalogColumnGrant, type CatalogEnum, type CatalogForeignKey, type CatalogFunction, type CatalogFunctionArg, type CatalogGrant, type CatalogIndex, type CatalogPolicy, type CatalogTable, type CatalogTrigger, type CatalogUnique, type ClaimPaths, type ClaimsConfig, type CodecsConfig, type ColumnPrivilege, type ConfigReferences, DEFAULT_ACTIVE_TENANT, DEFAULT_CLAIMS, type DataHooksFramework, type DatabaseConfig, type DisabledRow, type DoctorConfig, type EntitiesConfig, type EntitlementPlansSource, type EntitlementsConfig, type EntityConfig, type EnvFileConfig, type EnvironmentConfig, type ExpandedConfig, type ExposeConfig, type ExposePrivilege, type ExposeRole, type ExtrasDomain, type ExtrasFunction, type ExtrasHook, type ExtrasHookFunction, type ExtrasTable, FIELD_FORMATS, type FactoriesGeneratorOptions, type FieldFormat, type FieldFormatInput, type FlatConfig, type ForeignKeyAction, GEN_TASKS, type GenConfig, type GenGroupConfig, type GenTask, type GeneratedFile, type Generator, type GeneratorBlock, type GeneratorBlockEntity, type GeneratorColumn, type GeneratorEntitySchemas, type GeneratorField, type GeneratorFunction, type GeneratorFunctionArg, type GeneratorInput, type GeneratorInputSchema, type GeneratorJsonSchema, type GeneratorMetadata, type GeneratorModel, type GeneratorNoun, type GeneratorTable, INTEGRATION_INFO, INTEGRATION_NAMES, type IntegrationInfo, type IntegrationName, type JsonSchemaGeneratorOptions, type JsonSchemaSource, type JsonSchemaTarget, type JsonTypeConfig, type KeysConfig, type MigrationSafetyConfig, type NuqsGeneratorOptions, type OpenApiConfig, type OrganizationConfig, type OwnTablePolicies, type PostgresColumn, type PostgresFunction, type PostgresFunctionArg, type PowerSyncGenConfig, type Privilege, RENAMED_BLOCK_KEYS, RENAMED_CONFIG_KEYS, type RealtimeConfig, type RelationsConfig, type ResolvedConfig, type ResolvedExpose, type ResolvedExtensions, type ResolvedSqlConfig, type RoleNames, type RpcFunction, type RpcFunctionArg, type RpcFunctionOverload, type RpcFunctionReturns, type RpcReturnColumn, type RpcTypeReference, SKILLS_AGENTS, type SeedConfig, type SkillsAgent, type SkillsConfig, type Snapshot, type SnapshotBucket, type SnapshotExtras, type SourceConfig, type SqlConfig, type SqlInput, type SqlWorkflow, type StandardSchemaGeneratorOptions, type SubjectConfig, type SubjectsConfig, type TableConfig, type ToolingConfig, type TopicTriggerConfig, type TopicTriggerLookupConfig, type TopicTriggerPayloadValueConfig, type TopicTriggerTopicConfig, type TopicTriggerValueConfig, type TypedReference, type ValibotGeneratorOptions, type VectorDistance, type VectorSearchConfig, type ZodFlavor, type ZodGeneratorOptions, blockEntities, blockEntityRenames, blockEntrySource, blockSubjectTypes, buildJsonSchema, claimPaths, defineConfig, factories, flattenConfig, groupConfig, groupEntries, hasFlatTables, jsonSchema, nuqs, providerApiProblem, resolveConfig, resolveJsonSchema, standardSchema, tenantClaimPaths, tenantNameOf, valibot, zod };
|
package/dist/config/index.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { o as resolveJsonSchema, s as CONFIG_DEFAULTS } from "../instances-
|
|
2
|
-
import { A as flattenConfig, D as RENAMED_BLOCK_KEYS, E as CONFIG_GROUPS, F as INTEGRATION_INFO, I as INTEGRATION_NAMES, L as SKILLS_AGENTS, M as groupEntries, N as hasFlatTables, O as RENAMED_CONFIG_KEYS, P as GEN_TASKS, j as groupConfig, k as blockEntrySource } from "../config-
|
|
1
|
+
import { o as resolveJsonSchema, s as CONFIG_DEFAULTS } from "../instances-DDt7NdVl.js";
|
|
2
|
+
import { A as flattenConfig, D as RENAMED_BLOCK_KEYS, E as CONFIG_GROUPS, F as INTEGRATION_INFO, I as INTEGRATION_NAMES, L as SKILLS_AGENTS, M as groupEntries, N as hasFlatTables, O as RENAMED_CONFIG_KEYS, P as GEN_TASKS, j as groupConfig, k as blockEntrySource } from "../config-CD2OGfCG.js";
|
|
3
3
|
import { a as tenantClaimPaths, r as claimPaths, t as DEFAULT_CLAIMS } from "../claims-Bp9My7XP.js";
|
|
4
|
-
import { C as APP_ON_DELETE_ACTIONS, O as DEFAULT_ACTIVE_TENANT, S as APP_COLUMN_TYPES, T as APP_TABLE_EVENT_KINDS, b as APP_COLUMN_ACCESS, j as tenantNameOf, w as APP_ROLLUP_AGGREGATES, x as APP_COLUMN_FORMATS } from "../app-tables-
|
|
4
|
+
import { C as APP_ON_DELETE_ACTIONS, O as DEFAULT_ACTIVE_TENANT, S as APP_COLUMN_TYPES, T as APP_TABLE_EVENT_KINDS, b as APP_COLUMN_ACCESS, j as tenantNameOf, w as APP_ROLLUP_AGGREGATES, x as APP_COLUMN_FORMATS } from "../app-tables-DyswUg6J.js";
|
|
5
5
|
import { r as FIELD_FORMATS } from "../field-formats-C6QKA3UR.js";
|
|
6
|
-
import { a as factories, c as resolveConfig, d as blockSubjectTypes, f as providerApiProblem, i as nuqs, l as blockEntities, n as valibot, o as CONFIG_SCHEMA_URL, r as standardSchema, s as defineConfig, t as zod, u as blockEntityRenames } from "../config-
|
|
6
|
+
import { a as factories, c as resolveConfig, d as blockSubjectTypes, f as providerApiProblem, i as nuqs, l as blockEntities, n as valibot, o as CONFIG_SCHEMA_URL, r as standardSchema, s as defineConfig, t as zod, u as blockEntityRenames } from "../config-mbVyJwSc.js";
|
|
7
7
|
import { n as jsonSchema, t as buildJsonSchema } from "../json-schema-Ca6gYbEP.js";
|
|
8
8
|
export { APP_COLUMN_ACCESS, APP_COLUMN_FORMATS, APP_COLUMN_TYPES, APP_ON_DELETE_ACTIONS, APP_ROLLUP_AGGREGATES, APP_TABLE_EVENT_KINDS, CONFIG_DEFAULTS, CONFIG_GROUPS, CONFIG_SCHEMA_URL, DEFAULT_ACTIVE_TENANT, DEFAULT_CLAIMS, FIELD_FORMATS, GEN_TASKS, INTEGRATION_INFO, INTEGRATION_NAMES, RENAMED_BLOCK_KEYS, RENAMED_CONFIG_KEYS, SKILLS_AGENTS, blockEntities, blockEntityRenames, blockEntrySource, blockSubjectTypes, buildJsonSchema, claimPaths, defineConfig, factories, flattenConfig, groupConfig, groupEntries, hasFlatTables, jsonSchema, nuqs, providerApiProblem, resolveConfig, resolveJsonSchema, standardSchema, tenantClaimPaths, tenantNameOf, valibot, zod };
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import { t as DEFAULT_TENANT } from "./entity-naming-Dtyq5sKE.js";
|
|
2
|
-
import { E as PRESET_CATALOG, k as asBlocksConfig } from "./app-tables-
|
|
2
|
+
import { E as PRESET_CATALOG, k as asBlocksConfig } from "./app-tables-DyswUg6J.js";
|
|
3
3
|
//#region src/config/names.ts
|
|
4
4
|
/** The steps `better-supabase gen` runs, in the order it runs them. */
|
|
5
5
|
const GEN_TASKS = [
|
|
6
6
|
"types",
|
|
7
7
|
"sql",
|
|
8
|
+
"powersync",
|
|
8
9
|
"spec",
|
|
9
10
|
"seed",
|
|
10
11
|
"env"
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { a as resolveNames, i as resolveInstances, s as CONFIG_DEFAULTS, t as blocksByName } from "./instances-
|
|
2
|
-
import { A as flattenConfig, n as expandFlatPreset, r as expandPreset } from "./config-
|
|
1
|
+
import { a as resolveNames, i as resolveInstances, s as CONFIG_DEFAULTS, t as blocksByName } from "./instances-DDt7NdVl.js";
|
|
2
|
+
import { A as flattenConfig, n as expandFlatPreset, r as expandPreset } from "./config-CD2OGfCG.js";
|
|
3
3
|
import { t as DEFAULT_CLAIMS } from "./claims-Bp9My7XP.js";
|
|
4
4
|
import { o as tenantNames } from "./entity-naming-Dtyq5sKE.js";
|
|
5
|
-
import { A as resolveBlock, E as PRESET_CATALOG, d as appTablesOf, f as withAppTableSubjects, j as tenantNameOf } from "./app-tables-
|
|
5
|
+
import { A as resolveBlock, E as PRESET_CATALOG, d as appTablesOf, f as withAppTableSubjects, j as tenantNameOf } from "./app-tables-DyswUg6J.js";
|
|
6
6
|
import { C as variantsFor, S as variantTitle, _ as schemaName, a as extraSchemas, b as tableEntries, c as resultType, d as fieldSpec, f as fieldsFor, g as rowType, h as propertyKey, i as extraKinds, l as HEADER, m as parseImport, o as fieldMetaLines, p as optionalLine, s as objectType, u as fieldDocs, v as siblingPath, x as temporalGuardImport, y as tableDocs } from "./json-schema-Ca6gYbEP.js";
|
|
7
7
|
//#region src/config/authorization.ts
|
|
8
8
|
/**
|
|
@@ -215,7 +215,7 @@ function blocksOf(blocks, sql = {}, provider) {
|
|
|
215
215
|
config: withSqlDefaults(instance.config, sql)
|
|
216
216
|
}]));
|
|
217
217
|
const blockNames = [...new Set(Object.values(instances).map((instance) => instance.block))];
|
|
218
|
-
const resolved = Array.isArray(blocks) && sql.schema === void 0 && sql.api === void 0 ? {} : blocksByName(instances);
|
|
218
|
+
const resolved = Array.isArray(blocks) && sql.schema === void 0 && sql.api === void 0 && sql.ownTablePolicies === void 0 ? {} : blocksByName(instances);
|
|
219
219
|
if (!provider || !blockNames.includes("permissions") || resolved.permissions?.model !== void 0) return {
|
|
220
220
|
blocks: resolved,
|
|
221
221
|
blockNames,
|
|
@@ -238,11 +238,12 @@ function blocksOf(blocks, sql = {}, provider) {
|
|
|
238
238
|
* block's `api: false` keeps it out of the API schema.
|
|
239
239
|
*/
|
|
240
240
|
function withSqlDefaults(block, sql) {
|
|
241
|
-
const { schema, api } = sql;
|
|
241
|
+
const { schema, api, ownTablePolicies } = sql;
|
|
242
242
|
return {
|
|
243
243
|
...block,
|
|
244
244
|
...schema === void 0 || block.schema !== void 0 ? {} : { schema },
|
|
245
|
-
...api === void 0 || block.api !== void 0 ? {} : { api }
|
|
245
|
+
...api === void 0 || block.api !== void 0 ? {} : { api },
|
|
246
|
+
...ownTablePolicies === void 0 || block.ownTablePolicies !== void 0 ? {} : { ownTablePolicies }
|
|
246
247
|
};
|
|
247
248
|
}
|
|
248
249
|
const CONFIG_SCHEMA_URL = "https://unpkg.com/better-supabase/schemas/config-v1.json";
|