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/cli/index.d.ts
CHANGED
|
@@ -498,7 +498,7 @@ interface SchemaExtension {
|
|
|
498
498
|
* options its TypeScript side reads, for `defineBlocks(blockConfig, ...)`, and
|
|
499
499
|
* the app table events. `undefined` when the config installs no blocks.
|
|
500
500
|
*/
|
|
501
|
-
export declare function emitBlockConfig(config: Pick<ResolvedConfig, "appTables" | "blocks" | "blockNames" | "buckets" | "casing" | "instances" | "output" | "sql" | "subjects">, options?: {
|
|
501
|
+
export declare function emitBlockConfig(config: Pick<ResolvedConfig, "appTables" | "blocks" | "blockNames" | "buckets" | "casing" | "instances" | "output" | "gen" | "sql" | "subjects">, options?: {
|
|
502
502
|
readonly runtimeImport?: string;
|
|
503
503
|
}): GeneratedFile | undefined;
|
|
504
504
|
//#endregion
|
|
@@ -798,6 +798,6 @@ export declare function emitModule(model: Model, options: EmitOptions): string;
|
|
|
798
798
|
export declare function loadConfig(cwd: string, explicit?: string, environment?: string, path?: string | undefined): Promise<ResolvedConfig>;
|
|
799
799
|
//#endregion
|
|
800
800
|
//#region src/cli/version.d.ts
|
|
801
|
-
export declare const VERSION = "0.
|
|
801
|
+
export declare const VERSION = "0.18.1";
|
|
802
802
|
//#endregion
|
|
803
803
|
export type { Catalog, CatalogCheck, CatalogColumn, CatalogColumnGrant, CatalogEnum, CatalogForeignKey, CatalogFunction, CatalogFunctionArg, CatalogGrant, CatalogIndex, CatalogPolicy, CatalogTable, CatalogTrigger, CatalogUnique, Choice, Cli, CliArgs, CliCommand, CliCommandDef, CliContext, CliEnv, CliErrorCode, CliErrorOptions, CliIo, CliLog, CliProblem, CliProblemExtensions, CommandResult, CreateCliOptions, ExitCode, ExtrasFunction, ExtrasHook, ExtrasHookFunction, ExtrasTable, ForeignKeyAction, Format, GeneratorMetadata, IntrospectionSource, ManagementSourceOptions, NextStep, Paint, Prompter, Queryable, RunOptions, RunResult, Snapshot, SnapshotBucket, SnapshotExtras };
|
package/dist/cli/index.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { a as list, r as defineCliCommand } from "./command-
|
|
2
|
-
import { i as run, n as createCli, r as help, t as commandNames } from "./run-
|
|
3
|
-
import { t as VERSION } from "./version-
|
|
1
|
+
import { a as list, r as defineCliCommand } from "./command-BWEEXmtz.js";
|
|
2
|
+
import { i as run, n as createCli, r as help, t as commandNames } from "./run-Q5V5Kle1.js";
|
|
3
|
+
import { t as VERSION } from "./version-DzroJkIT.js";
|
|
4
4
|
import { n as CliError, t as CLI_ERRORS_URL } from "./errors-BTe6A15O.js";
|
|
5
|
-
import { a as serializeSnapshot, i as parseSnapshot, l as introspect, t as loadSnapshot } from "./snapshot-
|
|
6
|
-
import { a as emitBlockConfig, l as buildModel, o as GENERATED_HEADER, r as renderFiles, s as emitModule } from "./render-
|
|
7
|
-
import { a as toCatalog, n as managementSource, r as pgSource } from "./source-
|
|
8
|
-
import { s as loadConfig } from "./config-
|
|
9
|
-
import { n as runGen } from "./run-
|
|
5
|
+
import { a as serializeSnapshot, i as parseSnapshot, l as introspect, t as loadSnapshot } from "./snapshot-k4R6vT20.js";
|
|
6
|
+
import { a as emitBlockConfig, l as buildModel, o as GENERATED_HEADER, r as renderFiles, s as emitModule } from "./render-D9c5ynjR.js";
|
|
7
|
+
import { a as toCatalog, n as managementSource, r as pgSource } from "./source-MMQKgaIx.js";
|
|
8
|
+
import { s as loadConfig } from "./config-BJSqMi04.js";
|
|
9
|
+
import { n as runGen } from "./run-CuzSU8Sk.js";
|
|
10
10
|
//#region src/cli/introspect/from-catalog.ts
|
|
11
11
|
/**
|
|
12
12
|
* Builds a snapshot from catalog records: the inverse of `toCatalog`. Tests and
|
|
@@ -1,15 +1,15 @@
|
|
|
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 { i as plain } from "./style-Bm2X5JrN.js";
|
|
3
3
|
import { n as CliError } from "./errors-BTe6A15O.js";
|
|
4
4
|
import { r as readIfExists } from "./io-DH1kcmmP.js";
|
|
5
|
-
import { l as TYPEGEN_VERSION } from "./cache-
|
|
6
|
-
import { a as findConfig, s as loadConfig } from "./config-
|
|
7
|
-
import { r as contentMapperFiles } from "./content-mapper-
|
|
5
|
+
import { l as TYPEGEN_VERSION } from "./cache-BxohmNou.js";
|
|
6
|
+
import { a as findConfig, s as loadConfig } from "./config-BJSqMi04.js";
|
|
7
|
+
import { r as contentMapperFiles } from "./content-mapper-D54wumPS.js";
|
|
8
8
|
import { i as changeLines, n as PLAN_ARGS, r as applyPlan, u as planResult } from "./files-CX71yBm8.js";
|
|
9
|
-
import { C as promptConventions, S as hasConventionFlags, _ as templatePlan, b as conventionFlags, c as AUTHZ_NOTE, d as chooseIntegrations, f as integrationFiles, g as templateContextFor, h as parseIntegrations, i as blocksWiringPath, l as createUrlParam, m as packagesFor, o as writeDesign, p as overwrite, r as blockConfigImport, s as readPresetInput, u as CANCELLED, v as CONVENTION_ARGS, w as withConventions, x as defaultConventions, y as CONVENTION_COMPLETIONS } from "./add-
|
|
10
|
-
import { a as wiringFiles, c as baseFiles, f as needsLib, i as wiringChecklist, m as suggestedIntegrations, n as latestMigrationVersion, o as wiringFor, p as resolveIntegrations, r as configInstances, s as TEMPLATES } from "./migration-safety-
|
|
9
|
+
import { C as promptConventions, S as hasConventionFlags, _ as templatePlan, b as conventionFlags, c as AUTHZ_NOTE, d as chooseIntegrations, f as integrationFiles, g as templateContextFor, h as parseIntegrations, i as blocksWiringPath, l as createUrlParam, m as packagesFor, o as writeDesign, p as overwrite, r as blockConfigImport, s as readPresetInput, u as CANCELLED, v as CONVENTION_ARGS, w as withConventions, x as defaultConventions, y as CONVENTION_COMPLETIONS } from "./add-C5kLXuqn.js";
|
|
10
|
+
import { a as wiringFiles, c as baseFiles, f as needsLib, i as wiringChecklist, m as suggestedIntegrations, n as latestMigrationVersion, o as wiringFor, p as resolveIntegrations, r as configInstances, s as TEMPLATES } from "./migration-safety-DYgarZxP.js";
|
|
11
11
|
import { n as installCommand, t as detectProject } from "./detect-D9JaAX20.js";
|
|
12
|
-
import { s as enablePgDelta, t as syncModules } from "./sync-
|
|
12
|
+
import { s as enablePgDelta, t as syncModules } from "./sync-DYQVml8j.js";
|
|
13
13
|
import { existsSync } from "node:fs";
|
|
14
14
|
import { join, posix, resolve } from "node:path";
|
|
15
15
|
import { glob, readFile } from "node:fs/promises";
|
|
@@ -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 { t as display } from "./io-DH1kcmmP.js";
|
|
3
3
|
import { m as supabaseDir } from "./supabase-toml-CncmQbO0.js";
|
|
4
4
|
import { i as changeLines, r as applyPlan } from "./files-CX71yBm8.js";
|
|
@@ -21,11 +21,11 @@ function legacyPrefixNames(text) {
|
|
|
21
21
|
}
|
|
22
22
|
const array = (values) => `array[${values.map((value) => `'${value.replaceAll("'", "''")}'`).join(", ")}]::text[]`;
|
|
23
23
|
/**
|
|
24
|
-
* Renames the installed `bs_` triggers, policies, constraints,
|
|
25
|
-
* functions to `bsb_`, so the module files' `drop ... if exists
|
|
26
|
-
* them instead of adding a second copy. Only the names in
|
|
27
|
-
* runtime prefixes are renamed, and only while the new name is
|
|
28
|
-
* step can run again.
|
|
24
|
+
* Renames the installed `bs_` triggers, event triggers, policies, constraints,
|
|
25
|
+
* indexes and functions to `bsb_`, so the module files' `drop ... if exists
|
|
26
|
+
* bsb_x` replace them instead of adding a second copy. Only the names in
|
|
27
|
+
* `names` and the runtime prefixes are renamed, and only while the new name is
|
|
28
|
+
* free, so the step can run again.
|
|
29
29
|
*/
|
|
30
30
|
function legacyPrefixSql(names) {
|
|
31
31
|
return `do $bsb_rename$
|
|
@@ -48,6 +48,19 @@ begin
|
|
|
48
48
|
end;
|
|
49
49
|
end loop;
|
|
50
50
|
|
|
51
|
+
for r in
|
|
52
|
+
select e.evtname as name
|
|
53
|
+
from pg_event_trigger e
|
|
54
|
+
where (e.evtname = any (v_names) or exists (select 1 from unnest(v_prefixes) x where starts_with(e.evtname, x)))
|
|
55
|
+
and not exists (select 1 from pg_event_trigger f where f.evtname = 'bsb_' || substr(e.evtname, 4))
|
|
56
|
+
loop
|
|
57
|
+
begin
|
|
58
|
+
execute format('alter event trigger %I rename to %I', r.name, 'bsb_' || substr(r.name, 4));
|
|
59
|
+
exception when insufficient_privilege then
|
|
60
|
+
raise warning 'better-supabase: rename % to bsb_% by hand; the migration role does not own it', r.name, substr(r.name, 4);
|
|
61
|
+
end;
|
|
62
|
+
end loop;
|
|
63
|
+
|
|
51
64
|
for r in
|
|
52
65
|
select p.polname as name, p.polrelid::regclass::text as rel
|
|
53
66
|
from pg_policy p
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { r as errorText } from "./errors-BTe6A15O.js";
|
|
2
|
-
import "./source-
|
|
3
|
-
import { l as tableObject, n as exposed, s as qualified, t as catalogOf } from "./shared-
|
|
2
|
+
import "./source-MMQKgaIx.js";
|
|
3
|
+
import { l as tableObject, n as exposed, s as qualified, t as catalogOf } from "./shared-BNScv93m.js";
|
|
4
4
|
//#region src/cli/doctor/reserved-roles.ts
|
|
5
5
|
/**
|
|
6
6
|
* Supautils' `reserved_roles` on Supabase. Nobody but a superuser may alter,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { p as commandMeta, r as defineCliCommand } from "./command-
|
|
2
|
-
import { a as envelope, i as run } from "./run-
|
|
3
|
-
import { t as VERSION } from "./version-
|
|
1
|
+
import { p as commandMeta, r as defineCliCommand } from "./command-BWEEXmtz.js";
|
|
2
|
+
import { a as envelope, i as run } from "./run-Q5V5Kle1.js";
|
|
3
|
+
import { t as VERSION } from "./version-DzroJkIT.js";
|
|
4
4
|
import { n as CliError } from "./errors-BTe6A15O.js";
|
|
5
5
|
import { n as consentToken } from "./agent-CbuPvI2x.js";
|
|
6
6
|
import { C as optional, D as record, N as unknown, a as array, d as is, j as string$1, k as safeParse, o as boolean, t as PROCESS_ENV, x as object } from "./env-DMgjB_4y.js";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { n as CliError, r as errorText } from "./errors-BTe6A15O.js";
|
|
2
2
|
import { i as readStdin } from "./io-DH1kcmmP.js";
|
|
3
|
-
import { m as parseMetadataDocument, u as MetadataRejectedError } from "./snapshot-
|
|
4
|
-
import { c as metaPaths, n as render } from "./render-
|
|
5
|
-
import { i as generationNotices, n as runGen, o as fromMetadata, r as UNFORMATTED, t as refuseRowConditionedBuckets } from "./run-
|
|
3
|
+
import { m as parseMetadataDocument, u as MetadataRejectedError } from "./snapshot-k4R6vT20.js";
|
|
4
|
+
import { c as metaPaths, n as render } from "./render-D9c5ynjR.js";
|
|
5
|
+
import { i as generationNotices, n as runGen, o as fromMetadata, r as UNFORMATTED, t as refuseRowConditionedBuckets } from "./run-CuzSU8Sk.js";
|
|
6
6
|
import { basename, join, relative, resolve, sep } from "node:path";
|
|
7
7
|
import { readFile } from "node:fs/promises";
|
|
8
8
|
import { jsonSchema, standardSchema, valibot, zod } from "better-supabase/config";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { f as INTEGRATIONS } from "./config-
|
|
2
|
-
import { c as splitStatements } from "./shared-
|
|
1
|
+
import { f as INTEGRATIONS } from "./config-BJSqMi04.js";
|
|
2
|
+
import { c as splitStatements } from "./shared-BNScv93m.js";
|
|
3
3
|
import { dirname, join, posix } from "node:path";
|
|
4
4
|
import { readdir } from "node:fs/promises";
|
|
5
5
|
import { INTEGRATION_INFO, groupEntries } from "better-supabase/config";
|
|
@@ -2,7 +2,7 @@ import { n as CliError } from "./errors-BTe6A15O.js";
|
|
|
2
2
|
import { d as readSupabaseToml, p as sqlWorkflow } from "./supabase-toml-CncmQbO0.js";
|
|
3
3
|
import { t as importFresh } from "./fresh-import-DzgsGHkX.js";
|
|
4
4
|
import { i as changeLines, r as applyPlan } from "./files-CX71yBm8.js";
|
|
5
|
-
import { a as sqlPlan, i as schemasDirOf, n as migrationsDir, r as moduleLayoutFor } from "./sql-layout-
|
|
5
|
+
import { a as sqlPlan, i as schemasDirOf, n as migrationsDir, r as moduleLayoutFor } from "./sql-layout-AByPAQXl.js";
|
|
6
6
|
import { resolve } from "node:path";
|
|
7
7
|
import { readFile, readdir } from "node:fs/promises";
|
|
8
8
|
import { MODULE_ID_TYPES, compileReadSets, moduleIdType, moduleLayout, modulePermissionKeys, moduleSchemaExtensions, renderBlocks, resolveBlocks, scopeProblems, templateFunctions } from "better-supabase/sql";
|
|
@@ -374,7 +374,7 @@ async function dataMigration(config, args, now) {
|
|
|
374
374
|
error: [`No migration before the data migration creates ${missing.map((extension) => extension.name).join(", ")}, and the schema migration needs ${missing.length === 1 ? "it" : "them"} while it applies.`, "Run `better-supabase upgrade` to write the extensions migration, then create the schema migration again after it."].join("\n")
|
|
375
375
|
};
|
|
376
376
|
const files = rendered.filter((file) => file.kind === "data");
|
|
377
|
-
const contents = `-- better-supabase add --adopt: the rows and settings of ${files.map((file) => file.module).join(", ")}, which a schema diff skips.\n\n${files.map((file) => file.contents.trim()).join("\n\n")}\n`;
|
|
377
|
+
const contents = `-- better-supabase add --adopt: the rows and settings of ${files.map((file) => file.module).join(", ")}, which a schema diff skips.\n\nset lock_timeout = '5s';\n\n${files.map((file) => file.contents.trim()).join("\n\n")}\n`;
|
|
378
378
|
const dir = migrationsDir(config);
|
|
379
379
|
const existing = await readdir(resolve(config.root, dir)).catch(() => []);
|
|
380
380
|
const latest = existing.toSorted().findLast((name) => name.endsWith(DATA_SUFFIX));
|
|
@@ -410,114 +410,4 @@ async function dataMigration(config, args, now) {
|
|
|
410
410
|
};
|
|
411
411
|
}
|
|
412
412
|
//#endregion
|
|
413
|
-
|
|
414
|
-
/** The migration the migrations workflow writes the SQL modules into. */
|
|
415
|
-
const MODULES_SUFFIX = "_better_supabase_modules.sql";
|
|
416
|
-
/**
|
|
417
|
-
* The migration `gen` writes the read-sets module into under the migrations
|
|
418
|
-
* workflow.
|
|
419
|
-
*/
|
|
420
|
-
const READ_SETS_SUFFIX = "_better_supabase_read_sets.sql";
|
|
421
|
-
const UPGRADE_START = "-- @bsb-upgrade-start";
|
|
422
|
-
const UPGRADE_END = "-- @bsb-upgrade-end";
|
|
423
|
-
/**
|
|
424
|
-
* Whether the project runs the migrations workflow, with no declarative
|
|
425
|
-
* schemas.
|
|
426
|
-
*/
|
|
427
|
-
async function writesMigrations(config) {
|
|
428
|
-
return sqlWorkflow(config, await readSupabaseToml(config.root)) === "migrations";
|
|
429
|
-
}
|
|
430
|
-
/**
|
|
431
|
-
* One migration that holds, in order, the extensions, the upgrade steps, each
|
|
432
|
-
* module's schema body with its `@bsb-block` header, the realtime topic
|
|
433
|
-
* policies and the data statements. Every statement is re-runnable, so a later
|
|
434
|
-
* migration carries all of them, not only the changes.
|
|
435
|
-
*/
|
|
436
|
-
function renderModuleMigration(parts) {
|
|
437
|
-
const schema = parts.files.filter((file) => file.kind === "schema");
|
|
438
|
-
const data = parts.files.filter((file) => file.kind === "data");
|
|
439
|
-
const modules = [...new Set(schema.map((file) => file.instance ?? file.module))];
|
|
440
|
-
const extensions = moduleSchemaExtensions(parts.files);
|
|
441
|
-
const upgrade = parts.upgrade ?? [];
|
|
442
|
-
return `${[
|
|
443
|
-
[
|
|
444
|
-
`-- better-supabase sql: ${modules.length > 0 ? `the SQL modules ${modules.join(", ")}` : "the realtime topic policies"}, in one migration (database.sql.workflow: 'migrations').`,
|
|
445
|
-
"-- Managed by `better-supabase add` and `better-supabase upgrade`, which write a new migration when they change.",
|
|
446
|
-
"-- Change them through `blocks` in better-supabase.config.ts and the module's SQL hooks."
|
|
447
|
-
].join("\n"),
|
|
448
|
-
...extensions.length > 0 ? [extensions.map((extension) => extension.statement).join("\n")] : [],
|
|
449
|
-
...upgrade.length > 0 ? [[
|
|
450
|
-
UPGRADE_START,
|
|
451
|
-
...upgrade,
|
|
452
|
-
UPGRADE_END
|
|
453
|
-
].join("\n\n")] : [],
|
|
454
|
-
...schema.map((file) => file.contents.trim()),
|
|
455
|
-
...parts.topics === void 0 ? [] : [parts.topics.trim()],
|
|
456
|
-
...data.map((file) => file.contents.trim())
|
|
457
|
-
].join("\n\n")}\n`;
|
|
458
|
-
}
|
|
459
|
-
/**
|
|
460
|
-
* The migration without its upgrade steps and package versions, which a later
|
|
461
|
-
* one doesn't repeat.
|
|
462
|
-
*/
|
|
463
|
-
function comparable(text) {
|
|
464
|
-
return text.replaceAll("\r\n", "\n").replace(/\n\n-- @bsb?-upgrade-start\n[\s\S]*?\n-- @bsb?-upgrade-end/, "").replaceAll(/^(-- better-supabase module: [^\n(]*?)(?: \([^)]*\))?$/gm, "$1");
|
|
465
|
-
}
|
|
466
|
-
/** Whether two module migrations hold the same modules. */
|
|
467
|
-
const sameModuleMigration = (current, expected) => current !== void 0 && comparable(current) === comparable(expected);
|
|
468
|
-
/** Whether a module migration holds `contents` (one module's file) unchanged. */
|
|
469
|
-
const migrationHolds = (text, contents) => comparable(text).includes(comparable(contents.trim()));
|
|
470
|
-
/** The newest migration that ends in `suffix`, with its text. */
|
|
471
|
-
async function latestMigration(config, suffix) {
|
|
472
|
-
const dir = migrationsDir(config);
|
|
473
|
-
const latest = (await readdir(resolve(config.root, dir)).catch(() => [])).toSorted().findLast((name) => name.endsWith(suffix));
|
|
474
|
-
if (latest === void 0) return;
|
|
475
|
-
return {
|
|
476
|
-
path: `${dir}/${latest}`,
|
|
477
|
-
text: await readFile(resolve(config.root, dir, latest), "utf-8")
|
|
478
|
-
};
|
|
479
|
-
}
|
|
480
|
-
const MODULE_MARKERS = /^-- @(?:bsb-block|bs-module) ([a-zA-Z0-9-]+)@(\d+)(?: [a-z]+(?: ([a-z0-9-]+))?)?$/gm;
|
|
481
|
-
/**
|
|
482
|
-
* The modules and versions a module migration installs, from its `@bsb-block`
|
|
483
|
-
* lines.
|
|
484
|
-
*/
|
|
485
|
-
function migrationModules(text) {
|
|
486
|
-
return new Map([...text.matchAll(MODULE_MARKERS)].map((match) => [match[1], Number(match[2])]));
|
|
487
|
-
}
|
|
488
|
-
/**
|
|
489
|
-
* The instances a module migration installs under another name than their
|
|
490
|
-
* block, each to its block.
|
|
491
|
-
*/
|
|
492
|
-
function migrationInstances(text) {
|
|
493
|
-
return new Map([...text.matchAll(MODULE_MARKERS)].flatMap((match) => match[3] === void 0 ? [] : [[match[1], match[3]]]));
|
|
494
|
-
}
|
|
495
|
-
/**
|
|
496
|
-
* Writes `contents` as a new migration ending in `suffix`, unless the newest
|
|
497
|
-
* one already holds the same statements. `force` writes it anyway, for upgrade
|
|
498
|
-
* steps that have to run once.
|
|
499
|
-
*/
|
|
500
|
-
async function writeLatestMigration(config, suffix, contents, options) {
|
|
501
|
-
const latest = await latestMigration(config, suffix);
|
|
502
|
-
if (options.force !== true && latest !== void 0 && sameModuleMigration(latest.text, contents)) return {
|
|
503
|
-
path: latest.path,
|
|
504
|
-
wrote: false,
|
|
505
|
-
line: `Unchanged ${latest.path} (it has these statements)`
|
|
506
|
-
};
|
|
507
|
-
const dir = migrationsDir(config);
|
|
508
|
-
const path = `${dir}/${stampAfter(await readdir(resolve(config.root, dir)).catch(() => []), options.now)}${suffix}`;
|
|
509
|
-
const applied = await applyPlan(sqlPlan(config, {
|
|
510
|
-
regenerate: "better-supabase upgrade",
|
|
511
|
-
files: [{
|
|
512
|
-
path,
|
|
513
|
-
contents
|
|
514
|
-
}]
|
|
515
|
-
}), { "dry-run": options.dryRun });
|
|
516
|
-
return {
|
|
517
|
-
path,
|
|
518
|
-
wrote: applied.mode === "write",
|
|
519
|
-
line: changeLines(applied).join("\n")
|
|
520
|
-
};
|
|
521
|
-
}
|
|
522
|
-
//#endregion
|
|
523
|
-
export { entitlementsMode as C, unsafeKey as E, entitlementRequirements as S, providerLabel as T, layoutFor as _, migrationInstances as a, accessProviderMode as b, sameModuleMigration as c, DATA_NEXT as d, dataMigration as f, layout as g, MEMBERSHIP_CLAIM_MODULES as h, migrationHolds as i, writeLatestMigration as l, writeExtensionsMigration as m, READ_SETS_SUFFIX as n, migrationModules as o, migrationStamp as p, latestMigration as r, renderModuleMigration as s, MODULES_SUFFIX as t, writesMigrations as u, providerOwnsMemberships as v, moduleKeyProblems as w, accessRequirements as x, compiledReadSets as y };
|
|
413
|
+
export { unsafeKey as _, writeExtensionsMigration as a, layoutFor as c, accessProviderMode as d, accessRequirements as f, providerLabel as g, moduleKeyProblems as h, stampAfter as i, providerOwnsMemberships as l, entitlementsMode as m, dataMigration as n, MEMBERSHIP_CLAIM_MODULES as o, entitlementRequirements as p, migrationStamp as r, layout as s, DATA_NEXT as t, compiledReadSets as u };
|
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
import { i as stampAfter } from "./migrations-Cwh5VvUC.js";
|
|
2
|
+
import { d as readSupabaseToml, p as sqlWorkflow } from "./supabase-toml-CncmQbO0.js";
|
|
3
|
+
import { i as changeLines, r as applyPlan } from "./files-CX71yBm8.js";
|
|
4
|
+
import { a as sqlPlan, n as migrationsDir } from "./sql-layout-AByPAQXl.js";
|
|
5
|
+
import { resolve } from "node:path";
|
|
6
|
+
import { readFile, readdir } from "node:fs/promises";
|
|
7
|
+
import { moduleSchemaExtensions } from "better-supabase/sql";
|
|
8
|
+
//#region src/cli/sql/module-migration.ts
|
|
9
|
+
/** The migration the migrations workflow writes the SQL modules into. */
|
|
10
|
+
const MODULES_SUFFIX = "_better_supabase_modules.sql";
|
|
11
|
+
/**
|
|
12
|
+
* The migration `gen` writes the read-sets module into under the migrations
|
|
13
|
+
* workflow.
|
|
14
|
+
*/
|
|
15
|
+
const READ_SETS_SUFFIX = "_better_supabase_read_sets.sql";
|
|
16
|
+
const UPGRADE_START = "-- @bsb-upgrade-start";
|
|
17
|
+
const UPGRADE_END = "-- @bsb-upgrade-end";
|
|
18
|
+
/**
|
|
19
|
+
* Whether the project runs the migrations workflow, with no declarative
|
|
20
|
+
* schemas.
|
|
21
|
+
*/
|
|
22
|
+
async function writesMigrations(config) {
|
|
23
|
+
return sqlWorkflow(config, await readSupabaseToml(config.root)) === "migrations";
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* One migration that holds, in order, the extensions, the upgrade steps, each
|
|
27
|
+
* module's schema body with its `@bsb-block` header, the realtime topic
|
|
28
|
+
* policies and the data statements. Every statement is re-runnable, so a later
|
|
29
|
+
* migration carries all of them, not only the changes.
|
|
30
|
+
*/
|
|
31
|
+
function renderModuleMigration(parts) {
|
|
32
|
+
const schema = parts.files.filter((file) => file.kind === "schema");
|
|
33
|
+
const data = parts.files.filter((file) => file.kind === "data");
|
|
34
|
+
const modules = [...new Set(schema.map((file) => file.instance ?? file.module))];
|
|
35
|
+
const extensions = moduleSchemaExtensions(parts.files);
|
|
36
|
+
const upgrade = parts.upgrade ?? [];
|
|
37
|
+
return `${[
|
|
38
|
+
[
|
|
39
|
+
`-- better-supabase sql: ${modules.length > 0 ? `the SQL modules ${modules.join(", ")}` : "the realtime topic policies"}, in one migration (database.sql.workflow: 'migrations').`,
|
|
40
|
+
"-- Managed by `better-supabase add` and `better-supabase upgrade`, which write a new migration when they change.",
|
|
41
|
+
"-- Change them through `blocks` in better-supabase.config.ts and the module's SQL hooks."
|
|
42
|
+
].join("\n"),
|
|
43
|
+
...extensions.length > 0 ? [extensions.map((extension) => extension.statement).join("\n")] : [],
|
|
44
|
+
...upgrade.length > 0 ? [[
|
|
45
|
+
UPGRADE_START,
|
|
46
|
+
...upgrade,
|
|
47
|
+
UPGRADE_END
|
|
48
|
+
].join("\n\n")] : [],
|
|
49
|
+
...schema.map((file) => file.contents.trim()),
|
|
50
|
+
...parts.topics === void 0 ? [] : [parts.topics.trim()],
|
|
51
|
+
...data.map((file) => file.contents.trim())
|
|
52
|
+
].join("\n\n")}\n`;
|
|
53
|
+
}
|
|
54
|
+
/**
|
|
55
|
+
* The migration without its upgrade steps and package versions, which a later
|
|
56
|
+
* one doesn't repeat.
|
|
57
|
+
*/
|
|
58
|
+
function comparable(text) {
|
|
59
|
+
return text.replaceAll("\r\n", "\n").replace(/\n\n-- @bsb?-upgrade-start\n[\s\S]*?\n-- @bsb?-upgrade-end/, "").replaceAll(/^(-- better-supabase module: [^\n(]*?)(?: \([^)]*\))?$/gm, "$1");
|
|
60
|
+
}
|
|
61
|
+
/** Whether two module migrations hold the same modules. */
|
|
62
|
+
const sameModuleMigration = (current, expected) => current !== void 0 && comparable(current) === comparable(expected);
|
|
63
|
+
/** Whether a module migration holds `contents` (one module's file) unchanged. */
|
|
64
|
+
const migrationHolds = (text, contents) => comparable(text).includes(comparable(contents.trim()));
|
|
65
|
+
/** The newest migration that ends in `suffix`, with its text. */
|
|
66
|
+
async function latestMigration(config, suffix) {
|
|
67
|
+
const dir = migrationsDir(config);
|
|
68
|
+
const latest = (await readdir(resolve(config.root, dir)).catch(() => [])).toSorted().findLast((name) => name.endsWith(suffix));
|
|
69
|
+
if (latest === void 0) return;
|
|
70
|
+
return {
|
|
71
|
+
path: `${dir}/${latest}`,
|
|
72
|
+
text: await readFile(resolve(config.root, dir, latest), "utf-8")
|
|
73
|
+
};
|
|
74
|
+
}
|
|
75
|
+
const MODULE_MARKERS = /^-- @(?:bsb-block|bs-module) ([a-zA-Z0-9-]+)@(\d+)(?: [a-z]+(?: ([a-z0-9-]+))?)?$/gm;
|
|
76
|
+
/**
|
|
77
|
+
* The modules and versions a module migration installs, from its `@bsb-block`
|
|
78
|
+
* lines.
|
|
79
|
+
*/
|
|
80
|
+
function migrationModules(text) {
|
|
81
|
+
return new Map([...text.matchAll(MODULE_MARKERS)].map((match) => [match[1], Number(match[2])]));
|
|
82
|
+
}
|
|
83
|
+
/**
|
|
84
|
+
* The instances a module migration installs under another name than their
|
|
85
|
+
* block, each to its block.
|
|
86
|
+
*/
|
|
87
|
+
function migrationInstances(text) {
|
|
88
|
+
return new Map([...text.matchAll(MODULE_MARKERS)].flatMap((match) => match[3] === void 0 ? [] : [[match[1], match[3]]]));
|
|
89
|
+
}
|
|
90
|
+
/**
|
|
91
|
+
* Writes `contents` as a new migration ending in `suffix`, unless the newest
|
|
92
|
+
* one already holds the same statements. `force` writes it anyway, for upgrade
|
|
93
|
+
* steps that have to run once.
|
|
94
|
+
*/
|
|
95
|
+
async function writeLatestMigration(config, suffix, contents, options) {
|
|
96
|
+
const latest = await latestMigration(config, suffix);
|
|
97
|
+
if (options.force !== true && latest !== void 0 && sameModuleMigration(latest.text, contents)) return {
|
|
98
|
+
path: latest.path,
|
|
99
|
+
wrote: false,
|
|
100
|
+
line: `Unchanged ${latest.path} (it has these statements)`
|
|
101
|
+
};
|
|
102
|
+
const dir = migrationsDir(config);
|
|
103
|
+
const names = await readdir(resolve(config.root, dir)).catch(() => []);
|
|
104
|
+
const path = `${dir}/${stampAfter(names, options.now)}${suffix}`;
|
|
105
|
+
const applied = await applyPlan(sqlPlan(config, {
|
|
106
|
+
regenerate: "better-supabase upgrade",
|
|
107
|
+
files: [{
|
|
108
|
+
path,
|
|
109
|
+
contents
|
|
110
|
+
}]
|
|
111
|
+
}), { "dry-run": options.dryRun });
|
|
112
|
+
return {
|
|
113
|
+
path,
|
|
114
|
+
wrote: applied.mode === "write",
|
|
115
|
+
line: changeLines(applied).join("\n")
|
|
116
|
+
};
|
|
117
|
+
}
|
|
118
|
+
//#endregion
|
|
119
|
+
export { migrationInstances as a, sameModuleMigration as c, migrationHolds as i, writeLatestMigration as l, READ_SETS_SUFFIX as n, migrationModules as o, latestMigration as r, renderModuleMigration as s, MODULES_SUFFIX as t, writesMigrations as u };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { n as CliError } from "./errors-BTe6A15O.js";
|
|
2
|
-
import { s as positionalIndex } from "./parse-
|
|
2
|
+
import { s as positionalIndex } from "./parse-B079x40m.js";
|
|
3
3
|
//#region src/cli/core/moved.ts
|
|
4
4
|
const API_REPLACEMENT = "defineApi includes every table and block instance, and createOrpc(betterSupabase).router(api) serves it: https://bettersupabase.com/docs/frameworks/orpc#serve-the-api";
|
|
5
5
|
/** Commands removed in 0.15, with what replaces them, longest path first. */
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { r as __toESM } from "./rolldown-runtime-kJ_i4yPo.js";
|
|
2
|
-
import { t as GLOBAL_ARGS } from "./command-
|
|
2
|
+
import { t as GLOBAL_ARGS } from "./command-BWEEXmtz.js";
|
|
3
3
|
import { n as CliError } from "./errors-BTe6A15O.js";
|
|
4
4
|
//#region src/cli/core/parse.ts
|
|
5
5
|
/**
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { t as powersyncStreamsCommand } from "./powersync-BCDuGn5p.js";
|