better-supabase 0.28.0 → 0.29.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/{agents-CMIB3802.d.ts → agents-CM_cCtcr.d.ts} +4 -4
- package/dist/{ai-cache-2LGgaT7F.d.ts → ai-cache-BTGqckta.d.ts} +4 -4
- package/dist/{ai-chat-BCaKsvLW.d.ts → ai-chat-B7_vQvxU.d.ts} +4 -4
- package/dist/{ai-schedules-yGZH-vQb.d.ts → ai-schedules-CZEfo-_M.d.ts} +5 -5
- package/dist/ai-sdk/agents/index.d.ts +6 -6
- package/dist/ai-sdk/batches/index.d.ts +3 -3
- package/dist/ai-sdk/cache/index.d.ts +1 -1
- package/dist/ai-sdk/chat/index.d.ts +1 -1
- package/dist/ai-sdk/embeddings/index.d.ts +2 -2
- package/dist/ai-sdk/files/index.d.ts +1 -1
- package/dist/ai-sdk/index.d.ts +5 -5
- package/dist/ai-sdk/mcp/index.d.ts +3 -3
- package/dist/ai-sdk/memory/index.d.ts +3 -3
- package/dist/ai-sdk/workflow/index.d.ts +3 -3
- package/dist/{api-B1OkIWdx.d.ts → api-59rv5hL6.d.ts} +5 -5
- package/dist/{api-keys-ClhKBDcc.d.ts → api-keys-JE-aykZE.d.ts} +4 -4
- package/dist/{app-tables-62GqZIhd.d.ts → app-tables-DekyKNQ8.d.ts} +1 -1
- package/dist/{approvals-C5fmPLsH.d.ts → approvals-BfEafAzt.d.ts} +5 -5
- package/dist/{assistant-ndGdOBax.d.ts → assistant-B49qATbj.d.ts} +2 -2
- package/dist/astro/index.d.ts +7 -7
- package/dist/{authorization-BCG1v0iC.d.ts → authorization-C7nuWMuB.d.ts} +3 -3
- package/dist/{authorization-hooks-DtzreCAq.d.ts → authorization-hooks-BWhkMZfH.d.ts} +2 -2
- package/dist/better-result/index.d.ts +3 -3
- package/dist/{bind-C54jD0r3.d.ts → bind-DmUGUsBd.d.ts} +7 -7
- package/dist/{block-env-CM-LFfj4.d.ts → block-env-DWtZsqhH.d.ts} +4 -4
- package/dist/{block-helpers-CRpAHrp_.d.ts → block-helpers-D5emQ2O6.d.ts} +1 -1
- package/dist/{block-hooks-DZN2w69m.d.ts → block-hooks-B8itxzEE.d.ts} +2 -2
- package/dist/{block-subjects-CphkQPxp.d.ts → block-subjects-C1_9DkSA.d.ts} +1 -1
- package/dist/{block-transport-DWZSJrwN.d.ts → block-transport-9EUA3q_I.d.ts} +2 -2
- package/dist/blocks/access-requests/index.d.ts +5 -5
- package/dist/blocks/activities/index.d.ts +10 -10
- package/dist/blocks/activities/index.js +1 -1
- package/dist/blocks/agents/index.d.ts +4 -4
- package/dist/blocks/ai-cache/index.d.ts +3 -3
- package/dist/blocks/ai-chat/index.d.ts +7 -7
- package/dist/blocks/ai-files/index.d.ts +3 -3
- package/dist/blocks/ai-keys/index.d.ts +4 -4
- package/dist/blocks/ai-schedules/index.d.ts +3 -3
- package/dist/blocks/announcements/index.d.ts +8 -8
- package/dist/blocks/api-keys/index.d.ts +6 -6
- package/dist/blocks/approvals/index.d.ts +4 -4
- package/dist/blocks/assets/index.d.ts +6 -6
- package/dist/blocks/assignment/index.d.ts +7 -7
- package/dist/blocks/attachments/index.d.ts +4 -4
- package/dist/blocks/audit/index.d.ts +13 -13
- package/dist/blocks/automations/index.d.ts +12 -12
- package/dist/blocks/billable-time/index.d.ts +6 -6
- package/dist/blocks/billing/index.d.ts +9 -9
- package/dist/blocks/bookings/index.d.ts +4 -4
- package/dist/blocks/bulk/index.d.ts +4 -4
- package/dist/blocks/calendar/index.d.ts +5 -5
- package/dist/blocks/catalog/index.d.ts +6 -6
- package/dist/blocks/channels/index.d.ts +7 -7
- package/dist/blocks/collections/index.d.ts +12 -12
- package/dist/blocks/collections/index.js +1 -1
- package/dist/blocks/comments/index.d.ts +10 -10
- package/dist/blocks/compliance/index.d.ts +5 -5
- package/dist/blocks/connectors/index.d.ts +4 -4
- package/dist/blocks/contacts/index.d.ts +7 -7
- package/dist/blocks/contacts/index.js +1 -1
- package/dist/blocks/content/index.d.ts +5 -5
- package/dist/blocks/contracts/index.d.ts +6 -6
- package/dist/blocks/courses/index.d.ts +5 -5
- package/dist/blocks/created-by/index.d.ts +2 -2
- package/dist/blocks/custom-fields/index.d.ts +6 -6
- package/dist/blocks/data-lifecycle/index.d.ts +8 -8
- package/dist/blocks/deals/index.d.ts +6 -6
- package/dist/blocks/dispatch/index.d.ts +7 -7
- package/dist/blocks/documents/index.d.ts +4 -4
- package/dist/blocks/domains/index.d.ts +6 -6
- package/dist/blocks/donations/index.d.ts +6 -6
- package/dist/blocks/drive/index.d.ts +6 -6
- package/dist/blocks/employees/index.d.ts +8 -8
- package/dist/blocks/enrichment/index.d.ts +6 -6
- package/dist/blocks/enrollments/index.d.ts +6 -6
- package/dist/blocks/entitlements/index.d.ts +6 -6
- package/dist/blocks/expenses/index.d.ts +5 -5
- package/dist/blocks/field-history/index.d.ts +4 -4
- package/dist/blocks/flags/index.d.ts +5 -5
- package/dist/blocks/forecasts/index.d.ts +6 -6
- package/dist/blocks/forms/index.d.ts +6 -6
- package/dist/blocks/goals/index.d.ts +4 -4
- package/dist/blocks/guests/index.d.ts +6 -6
- package/dist/blocks/hiring/index.d.ts +7 -7
- package/dist/blocks/identities/index.d.ts +5 -5
- package/dist/blocks/imports/index.d.ts +5 -5
- package/dist/blocks/inbox/index.d.ts +10 -10
- package/dist/blocks/incidents/index.d.ts +5 -5
- package/dist/blocks/index.d.ts +9 -9
- package/dist/blocks/inventory/index.d.ts +7 -7
- package/dist/blocks/invoices/index.d.ts +8 -8
- package/dist/blocks/knowledge/index.d.ts +3 -3
- package/dist/blocks/lead-scoring/index.d.ts +7 -7
- package/dist/blocks/leases/index.d.ts +6 -6
- package/dist/blocks/leave/index.d.ts +5 -5
- package/dist/blocks/ledger/index.d.ts +6 -6
- package/dist/blocks/mail-sync/index.d.ts +5 -5
- package/dist/blocks/memberships/index.d.ts +2 -2
- package/dist/blocks/memory/index.d.ts +4 -4
- package/dist/blocks/messaging/index.d.ts +11 -11
- package/dist/blocks/metrics/index.d.ts +6 -6
- package/dist/blocks/mfa/index.d.ts +2 -2
- package/dist/blocks/moderation/index.d.ts +6 -6
- package/dist/blocks/notifications/index.d.ts +12 -12
- package/dist/blocks/notifications/index.js +1 -1
- package/dist/blocks/numbering/index.d.ts +4 -4
- package/dist/blocks/oauth-server/index.d.ts +5 -5
- package/dist/blocks/onboarding/index.d.ts +5 -5
- package/dist/blocks/orders/index.d.ts +7 -7
- package/dist/blocks/organizations/index.d.ts +8 -8
- package/dist/blocks/outbox/index.d.ts +4 -4
- package/dist/blocks/passes/index.d.ts +8 -8
- package/dist/blocks/permissions/index.d.ts +6 -6
- package/dist/blocks/pipelines/index.d.ts +6 -6
- package/dist/blocks/posts/index.d.ts +5 -5
- package/dist/blocks/profiles/index.d.ts +4 -4
- package/dist/blocks/promotions/index.d.ts +5 -5
- package/dist/blocks/push/index.d.ts +6 -6
- package/dist/blocks/queue/index.d.ts +6 -6
- package/dist/blocks/quotes/index.d.ts +8 -8
- package/dist/blocks/rank/index.d.ts +5 -5
- package/dist/blocks/reactions/index.d.ts +9 -9
- package/dist/blocks/relations/index.d.ts +7 -7
- package/dist/blocks/reminders/index.d.ts +8 -8
- package/dist/blocks/reminders/index.js +1 -1
- package/dist/blocks/reviews/index.d.ts +5 -5
- package/dist/blocks/saved-views/index.d.ts +6 -6
- package/dist/blocks/scores/index.d.ts +5 -5
- package/dist/blocks/search/index.d.ts +8 -8
- package/dist/blocks/security-events/index.d.ts +7 -7
- package/dist/blocks/segments/index.d.ts +8 -8
- package/dist/blocks/sequences/index.d.ts +6 -6
- package/dist/blocks/service-accounts/index.d.ts +5 -5
- package/dist/blocks/sessions/index.d.ts +2 -2
- package/dist/blocks/settings/index.d.ts +6 -6
- package/dist/blocks/share-links/index.d.ts +5 -5
- package/dist/blocks/shipments/index.d.ts +6 -6
- package/dist/blocks/signatures/index.d.ts +5 -5
- package/dist/blocks/signing-keys/index.d.ts +4 -4
- package/dist/blocks/sla/index.d.ts +7 -7
- package/dist/blocks/sso/index.d.ts +6 -6
- package/dist/blocks/state-machine/index.d.ts +5 -5
- package/dist/blocks/subjects/index.d.ts +6 -6
- package/dist/blocks/tags/index.d.ts +6 -6
- package/dist/blocks/tasks/index.d.ts +9 -9
- package/dist/blocks/teams/index.d.ts +4 -4
- package/dist/blocks/templates/index.d.ts +7 -7
- package/dist/blocks/time-tracking/index.d.ts +7 -7
- package/dist/blocks/timeline/index.d.ts +8 -8
- package/dist/blocks/trash/index.d.ts +6 -6
- package/dist/blocks/undo/index.d.ts +4 -4
- package/dist/blocks/updated-at/index.d.ts +2 -2
- package/dist/blocks/usage/index.d.ts +4 -4
- package/dist/blocks/vercel-marketplace/index.d.ts +5 -5
- package/dist/blocks/versions/index.d.ts +6 -6
- package/dist/blocks/waitlist/index.d.ts +5 -5
- package/dist/blocks/webhooks/index.d.ts +14 -14
- package/dist/blocks/webhooks/index.js +1 -1
- package/dist/blocks/workflow-editor/index.d.ts +9 -9
- package/dist/blocks/workflows/index.d.ts +7 -7
- package/dist/{bookings-CVw5-Q0Z.d.ts → bookings-xsmM2TA_.d.ts} +3 -3
- package/dist/{bucket-vc-QRrva.d.ts → bucket-SvRQwYS4.d.ts} +1 -1
- package/dist/chat-sdk/index.d.ts +6 -6
- package/dist/cli/{add-BKcE_g9D.js → add-BKkV99g9.js} +2 -2
- package/dist/cli/{add-DUyg9qna.js → add-CrQ3jS7t.js} +27 -85
- package/dist/cli/add-CwhrRJz5.js +1 -0
- package/dist/cli/{migrate-sVs1QYTM.js → app-table-files-PnPOpuB4.js} +90 -50
- package/dist/cli/{backfill-r9RELEEh.js → backfill-DDDLhinm.js} +4 -4
- package/dist/cli/bin.js +1 -1
- package/dist/cli/{blocks-DTOFdrxL.js → blocks-BCVcjvbm.js} +1 -1
- package/dist/cli/{blocks-k1OG8XDs.js → blocks-tRfYx_mh.js} +2 -2
- package/dist/cli/{cache-Czfw7Iow.js → cache-DQZ09YOg.js} +1 -1
- package/dist/cli/{codemod-ClmbiLuL.js → codemod-HKuwQmi_.js} +5 -5
- package/dist/cli/{command-CVzTJSLp.js → command-DIPmo0wh.js} +6 -1
- package/dist/cli/{completion-DxEXxFpz.js → completion-DxPxMtyP.js} +2 -2
- package/dist/cli/{completion-CNCqE-Gb.js → completion-DyLMSjOD.js} +1 -1
- package/dist/cli/{completion-Dpk6vh0p.js → completion-FUgqm2-N.js} +2 -2
- package/dist/cli/{config-EjNj3HfT.js → config-BfapErxs.js} +1 -1
- package/dist/cli/{config-KvV-sLZL.js → config-Cskysxp-.js} +38 -7
- package/dist/cli/{config-D2YUlzrl.js → config-Df5cXWNN.js} +1 -1
- package/dist/cli/{config-group-C8tjut39.js → config-group-CP-B9uRt.js} +2 -3
- package/dist/cli/{content-mapper-ez_mT0d4.js → content-mapper-B0ehR7K-.js} +2 -2
- package/dist/cli/{db-uYN6O5Eg.js → db-CWvH1_46.js} +3 -3
- package/dist/cli/{doctor-BD9oo4MG.js → doctor-CXJOhwLB.js} +22 -22
- package/dist/cli/{env-DEAtgGoj.js → env-BM242BCV.js} +1 -1
- package/dist/cli/env-uqfUbUzk.js +1 -0
- package/dist/cli/{gen-8Ya8n2sA.js → gen-B7rw4j19.js} +16 -16
- package/dist/cli/index.d.ts +9 -2
- package/dist/cli/index.js +8 -8
- package/dist/cli/{init-DgL3sDfQ.js → init-C1bXXB_P.js} +22 -10
- package/dist/cli/{keys-CsanNk-2.js → keys-V-HcO-21.js} +1 -1
- package/dist/cli/{live-CMMEct_F.js → live-PpAh9pAc.js} +2 -2
- package/dist/cli/{mcp-DEHtzAkq.js → mcp-BRNAchdH.js} +6 -14
- package/dist/cli/{metadata-BZh-cOzC.js → metadata-dAAKb_kR.js} +3 -3
- package/dist/cli/migrate-BWYXFnaW.js +46 -0
- package/dist/cli/{migration-safety-ClnYNMdq.js → migration-safety-DGQswWZy.js} +2 -2
- package/dist/cli/{migrations-DWh38tO9.js → migrations-Cqk-lJwu.js} +2 -2
- package/dist/cli/{module-migration-CXfRJIV4.js → module-migration-8-hMiZtW.js} +2 -2
- package/dist/cli/{moved-Cnb4fp49.js → moved-DNOtp9LA.js} +1 -1
- package/dist/cli/{parse-BWM6IGhF.js → parse-BPf3kGnc.js} +1 -1
- package/dist/cli/{powersync-Dnyr-Wy5.js → powersync-BWQ-8T3G.js} +4 -4
- package/dist/cli/powersync-CbYxLsjv.js +1 -0
- package/dist/cli/{print-DJrSr56b.js → print-DSTnq5xz.js} +2 -2
- package/dist/cli/{providers-CpaISitn.js → providers-Cjf5iOp5.js} +1 -1
- package/dist/cli/{remove-ChaieK3t.js → remove-CwG8cPv1.js} +7 -7
- package/dist/cli/{render-DUNJ4Pss.js → render-B18iAdsT.js} +5 -5
- package/dist/cli/{run-ChCQPYOh.js → run-C2Yg5MWt.js} +41 -41
- package/dist/cli/{run-CxFDjL1Q.js → run-CvPl8iQd.js} +2 -2
- package/dist/cli/{run-Cl9COGuy.js → run-Wx_2Acgv.js} +9 -9
- package/dist/cli/seed-BOun22-k.js +1 -0
- package/dist/cli/{seed-BzVLTdRl.js → seed-CDnL4Tnc.js} +3 -3
- package/dist/cli/{shared-5uqc1GBj.js → shared-BHbtUOvh.js} +1 -1
- package/dist/cli/{skills-0gz_qjVb.js → skills-DM3oeIxY.js} +1 -1
- package/dist/cli/{snapshot-DdAP7LWO.js → snapshot-CXgsUPGj.js} +3 -3
- package/dist/cli/{source-2irbWSck.js → source-B6aMAoEK.js} +1 -1
- package/dist/cli/{source-args-DAcQt-Mh.js → source-args-v8ljFDfc.js} +1 -1
- package/dist/cli/{spec-B7n4Rthp.js → spec-BcYic005.js} +3 -3
- package/dist/cli/{spec-_MS0ym5r.js → spec-EO0TP84d.js} +1 -1
- package/dist/cli/{sql-layout-DYKkQw1k.js → sql-layout-CkxDNVEH.js} +2 -2
- package/dist/cli/{stack-CteM33gC.js → stack-ClESAZYf.js} +1 -1
- package/dist/cli/{sync-DnSOrQuA.js → sync-pq6gmlhG.js} +4 -4
- package/dist/cli/{table-DeH8X0qz.js → table-dyKddjwo.js} +1 -1
- package/dist/cli/{upgrade-cMy5fKkg.js → upgrade-BoHb4h9P.js} +3 -3
- package/dist/cli/{upgrade-CWdrC-K3.js → upgrade-Dp9p7A69.js} +5 -5
- package/dist/cli/{version-C5RAWmrD.js → version-CQHFm-ak.js} +1 -1
- package/dist/client/index.d.ts +6 -6
- package/dist/client/native/index.d.ts +5 -5
- package/dist/{cloud-event-DcJwder2.d.ts → cloud-event-0pQ9vFNS.d.ts} +1 -1
- package/dist/{compiler-D3UmE7ao.d.ts → compiler-BEeVWXPS.d.ts} +2 -2
- package/dist/{composite-CWJvZgni.d.ts → composite-BJ9s-IJJ.d.ts} +7 -7
- package/dist/config/index.d.ts +4 -4
- package/dist/config/index.js +3 -3
- package/dist/{config-CvJHIy5q.js → config-bqKaPjst.js} +6 -27
- package/dist/{config-CTeR7XHK.js → config-r7njjNgh.js} +1 -1
- package/dist/{connectors-CHGiffYH.d.ts → connectors-uC5baoFV.d.ts} +4 -4
- package/dist/{context-BFEX0b7H.d.ts → context-B4TsE2gY.d.ts} +34 -51
- package/dist/{controller-Cl6HmMBk.d.ts → controller-CtwAsnVV.d.ts} +1 -1
- package/dist/{conversion-DlfStnln.d.ts → conversion-g8HzH9My.d.ts} +1 -1
- package/dist/create/index.d.ts +3 -3
- package/dist/create/index.js +2 -2
- package/dist/create/lite/index.d.ts +4 -4
- package/dist/create/lite/index.js +1 -1
- package/dist/credentials/index.d.ts +4 -4
- package/dist/{data-engine-BWoz9lED.d.ts → data-engine-rvbR2C4F.d.ts} +1 -1
- package/dist/{define-BLP6XtoL.d.ts → define-D8_9X5fZ.d.ts} +5 -5
- package/dist/{define-block-DibVN37N.d.ts → define-block-DWVZSZv1.d.ts} +12 -12
- package/dist/{documents-Cup1rpjF.d.ts → documents-BbwYyynk.d.ts} +3 -3
- package/dist/edge/index.d.ts +9 -9
- package/dist/elysia/index.d.ts +1 -1
- package/dist/{embeddings-D_RsS6ow.d.ts → embeddings-I3s5sTDt.d.ts} +1 -1
- package/dist/{ended-B8RyuUXF.d.ts → ended-EZzN9QTM.d.ts} +2 -2
- package/dist/{entitlements-Y-n4RGAd.d.ts → entitlements-Bw3eYGKJ.d.ts} +2 -2
- package/dist/eve/index.d.ts +5 -5
- package/dist/{eve-B7jxYPCw.d.ts → eve-BfhVFV33.d.ts} +2 -2
- package/dist/events/index.d.ts +3 -3
- package/dist/{events-Cc9DDQWH.d.ts → events-B2qbZps6.d.ts} +1 -1
- package/dist/{executor-DNPm13a9.d.ts → executor-BfirBzOr.d.ts} +4 -4
- package/dist/{executor-C-Ox9eKq.d.ts → executor-BlS0kCrN.d.ts} +1 -1
- package/dist/{executor-hGjrop3A.d.ts → executor-DXQIx4sW.d.ts} +1 -1
- package/dist/expo/index.d.ts +4 -4
- package/dist/{field-errors-Btn3czyz.d.ts → field-errors-DkzFduux.d.ts} +10 -10
- package/dist/{fields-C3q2ypnO.d.ts → fields-snbaZ14h.d.ts} +1 -1
- package/dist/{filter-evaluate-CPxeae5X.d.ts → filter-evaluate-BRpNiNPG.d.ts} +1 -1
- package/dist/{filter-query-BXLs72G9.d.ts → filter-query-DBt7OKuH.d.ts} +1 -1
- package/dist/{flags-C01PLMJ-.d.ts → flags-DDKTThrO.d.ts} +2 -2
- package/dist/flags-sdk/index.d.ts +1 -1
- package/dist/{framework-GlxXiotm.d.ts → framework-DVYTtQXA.d.ts} +7 -7
- package/dist/{gateway-DzI687yd.d.ts → gateway-Ve7cByEr.d.ts} +3 -3
- package/dist/h3/index.d.ts +1 -1
- package/dist/h3/v1/index.d.ts +1 -1
- package/dist/hono/index.d.ts +9 -9
- package/dist/{inbox-NDKwSk_H.d.ts → inbox-c8B86Trp.d.ts} +5 -5
- package/dist/{index-C_qlBJ3k.d.ts → index-B4wttiLh.d.ts} +4 -4
- package/dist/{index-BfYDY6eh.d.ts → index-BM6NmKSc.d.ts} +5 -5
- package/dist/{index-CAY7rIQs.d.ts → index-BNgpz_BV.d.ts} +5 -5
- package/dist/{index-k-SyCzcQ.d.ts → index-BxckmAFc.d.ts} +4 -4
- package/dist/{index-8wOL81rB.d.ts → index-CB66nl14.d.ts} +4 -3
- package/dist/{index-DPMVWm_Z.d.ts → index-CBQT_nXf.d.ts} +5 -5
- package/dist/{index-C0_cweyT.d.ts → index-Cw5gGSP8.d.ts} +14 -14
- package/dist/{index-CQhPHHDF.d.ts → index-Cxsnd-OL.d.ts} +1 -1
- package/dist/{index-D1ckLbUM.d.ts → index-pZn6S_iq.d.ts} +1 -1
- package/dist/index.d.ts +6 -6
- package/dist/{kit-Dxx3MT8m.d.ts → kit-B8yWCRN7.d.ts} +3 -3
- package/dist/{knowledge-F1IhRI4Q.d.ts → knowledge-CsLPACGJ.d.ts} +5 -5
- package/dist/lint/index.d.ts +1 -1
- package/dist/list/index.d.ts +3 -3
- package/dist/{list-query-XHoYDlRN.d.ts → list-query-BcU8NnNL.d.ts} +3 -3
- package/dist/mapper/bin.js +6 -6
- package/dist/mcp/index.d.ts +6 -6
- package/dist/mcp/sdk/index.d.ts +6 -6
- package/dist/{messaging-C_Pr9tGx.d.ts → messaging-DQP09JsY.d.ts} +4 -4
- package/dist/nestjs/index.d.ts +2 -2
- package/dist/next/client/index.d.ts +1 -1
- package/dist/next/index.d.ts +22 -22
- package/dist/node/index.d.ts +2 -2
- package/dist/{operations-DE7SOBw-.d.ts → operations-CqmQrTKw.d.ts} +1 -1
- package/dist/orpc/index.d.ts +8 -8
- package/dist/otel/index.d.ts +2 -2
- package/dist/otel/index.js +4 -4
- package/dist/{outbox-DxZgoKwp.d.ts → outbox-BZ712Z3X.d.ts} +4 -4
- package/dist/{pool-wjbAMqc1.d.ts → pool-DDR1ndk7.d.ts} +3 -3
- package/dist/{ports-DP0bthUk.d.ts → ports-6LBgr1Aa.d.ts} +1 -1
- package/dist/postgres/index.d.ts +4 -4
- package/dist/{postgrest-z-T0l23T.d.ts → postgrest-AJc8hnJU.d.ts} +1 -1
- package/dist/powersync/index.d.ts +6 -6
- package/dist/preset/index.d.ts +3 -3
- package/dist/preset/index.js +2 -2
- package/dist/{preset-DwuWNBip.js → preset-DCdEnJj9.js} +8 -13
- package/dist/{project-Bo1vZqVs.js → project-C4NA_van.js} +4 -4
- package/dist/{provider-ClrIplXa.d.ts → provider-CWjzAIX9.d.ts} +1 -1
- package/dist/{push-token-v3xCcVU7.d.ts → push-token-BXsrJ7W9.d.ts} +1 -1
- package/dist/query/index.d.ts +1 -1
- package/dist/react/index.d.ts +8 -8
- package/dist/react/native/index.d.ts +1 -1
- package/dist/react/server.d.ts +8 -8
- package/dist/react/session.d.ts +2 -2
- package/dist/react-router/index.d.ts +6 -6
- package/dist/realtime/index.d.ts +6 -6
- package/dist/realtime/index.js +1 -1
- package/dist/{record-form-D2-F4IwS.d.ts → record-form-CubgBrtI.d.ts} +1 -1
- package/dist/{recordings-BBSJt_YV.d.ts → recordings-DeZYx-Kv.d.ts} +1 -1
- package/dist/records/index.d.ts +9 -9
- package/dist/{refresh-CCKB1Wa6.d.ts → refresh-D02Pbf5B.d.ts} +1 -1
- package/dist/{refusal-D_tklIEb.d.ts → refusal-B0VmlAxF.d.ts} +2 -2
- package/dist/{resolve-Bj1qD7Dy.d.ts → resolve-CtX6T0c0.d.ts} +1 -1
- package/dist/{resource-D8pzB5Qf.d.ts → resource-WxN0IsvB.d.ts} +1 -1
- package/dist/{resource-execute-BSTIfp1D.d.ts → resource-execute-BzqR8DdD.d.ts} +2 -2
- package/dist/{resource-types-D5WEvYtV.d.ts → resource-types-BVbHgTPg.d.ts} +4 -4
- package/dist/{resources-CsZ7RhZC.d.ts → resources-BSbRa0Ab.d.ts} +2 -2
- package/dist/{respond-BzRG-0qc.d.ts → respond-Dzu_-EPH.d.ts} +1 -1
- package/dist/{sales-lines-KxxStRzU.d.ts → sales-lines-BsmrNHe9.d.ts} +1 -1
- package/dist/{scores-B2BiNuVJ.d.ts → scores-Y8TvyJi1.d.ts} +5 -5
- package/dist/server/index.d.ts +24 -24
- package/dist/server/index.js +1 -1
- package/dist/{server-types-BlDiY-ya.d.ts → server-types-BkTIxW_H.d.ts} +11 -11
- package/dist/{session-BGP98Rgj.d.ts → session-BOzx2qHC.d.ts} +6 -6
- package/dist/{session-status-C4t7kbSn.d.ts → session-status-BP8eYVnA.d.ts} +2 -2
- package/dist/{sign-in-CAadgm33.d.ts → sign-in-CfwJAJJL.d.ts} +2 -2
- package/dist/{signers-BKgmVh6A.d.ts → signers-ZmxO1I05.d.ts} +4 -4
- package/dist/{signing-keys-BNDUxpQL.d.ts → signing-keys-udgP7Aod.d.ts} +2 -2
- package/dist/solid/index.d.ts +10 -10
- package/dist/solid-start/index.d.ts +6 -6
- package/dist/spec/index.d.ts +2 -2
- package/dist/sql/index.d.ts +4 -4
- package/dist/sql/index.js +1 -1
- package/dist/{sql-B7vBP9g0.js → sql-CoBySj2F.js} +42 -41
- package/dist/sqlite/index.d.ts +3 -3
- package/dist/{sso-B0Txid2-.d.ts → sso-CkU_4mtK.d.ts} +3 -3
- package/dist/ssr/index.d.ts +5 -5
- package/dist/storage/index.d.ts +3 -3
- package/dist/streams/index.d.ts +1 -1
- package/dist/{subject-readers-DJbzlm8a.d.ts → subject-readers-CB5Te02u.d.ts} +5 -5
- package/dist/{subject-readers-CeeJJOQ4.js → subject-readers-VHcrWhmq.js} +2 -2
- package/dist/{subjects-BpIEN1MS.d.ts → subjects-CiBNKy2y.d.ts} +4 -4
- package/dist/{support-D7CMbhRT.d.ts → support-BxyPOFk4.d.ts} +4 -4
- package/dist/{support-view-CIDXF3_H.d.ts → support-view-nqUWKHEs.d.ts} +1 -1
- package/dist/svelte/index.d.ts +9 -9
- package/dist/sveltekit/index.d.ts +7 -7
- package/dist/{tags-Dg4Ywmqp.d.ts → tags-Cm48BsOa.d.ts} +1 -1
- package/dist/tanstack-db/index.d.ts +3 -3
- package/dist/tanstack-start/index.d.ts +6 -6
- package/dist/{tenant-CyLEXgot.d.ts → tenant-Ded341Qz.d.ts} +2 -2
- package/dist/testing/index.d.ts +25 -25
- package/dist/testing/index.js +1 -1
- package/dist/{timeline-Cjl-1hiA.d.ts → timeline-DvXtXq5q.d.ts} +5 -5
- package/dist/{topic-B_DGdAEs.d.ts → topic-XDdKzlrn.d.ts} +5 -5
- package/dist/{types-Dp3UCr1e.d.ts → types-B-D6fYx2.d.ts} +1 -1
- package/dist/{types-DF8JYEf5.d.ts → types-BFwB-E1j.d.ts} +2 -2
- package/dist/{types-Czq9Xtpa.d.ts → types-CK2X2wCB.d.ts} +5 -5
- package/dist/{types-DFdg_4yN.d.ts → types-CPl9uJ0G.d.ts} +2 -2
- package/dist/{types-DR1MHh7N.d.ts → types-CwQgFo8c.d.ts} +4 -4
- package/dist/{types-Dr9wZgNy.d.ts → types-DMihLukJ.d.ts} +3 -3
- package/dist/{types-A4yyKEsg.d.ts → types-iCyZ3lMx.d.ts} +4 -4
- package/dist/{types-BdaBfYIw.d.ts → types-nspa5I-a.d.ts} +7 -7
- package/dist/{undo-B1jwnVyN.d.ts → undo-0HkWXASn.d.ts} +2 -2
- package/dist/{usage-Dp45V42p.d.ts → usage-BkWAPkg2.d.ts} +4 -4
- package/dist/{vault-BghaujrZ.d.ts → vault-BkdPmL7f.d.ts} +2 -2
- package/dist/vercel-connect/index.d.ts +1 -1
- package/dist/{verify-CI8LgSpv.d.ts → verify-41mZmspj.d.ts} +2 -2
- package/dist/{view-BvNA7EOC.d.ts → view-C8_xvD-j.d.ts} +1 -1
- package/dist/vue/index.d.ts +10 -10
- package/dist/{watch-topic-1zIAtiNM.d.ts → watch-topic-DpN_GEoS.d.ts} +1 -1
- package/dist/workflow-sdk/builder/index.d.ts +3 -3
- package/dist/workflow-sdk/index.d.ts +1 -1
- package/dist/workflow-sdk/world/index.d.ts +1 -1
- package/dist/{workflow-sdk-BNsZrcVg.d.ts → workflow-sdk-rg3IbCZC.d.ts} +3 -3
- package/dist/{workflows-B0ZPAQu0.d.ts → workflows-xL6t0TXx.d.ts} +7 -4
- package/dist/yjs/index.d.ts +2 -2
- package/package.json +1 -2
- package/schemas/config-v1.json +3 -351
- package/skills/better-supabase/references/ui-recipes.md +5 -5
- package/dist/cli/add-pDOlqWUa.js +0 -1
- package/dist/cli/env-Cy2lWBRC.js +0 -1
- package/dist/cli/powersync-DURhWDVc.js +0 -1
- package/dist/cli/seed-BJ7c-ktX.js +0 -1
|
@@ -1,27 +1,27 @@
|
|
|
1
|
-
import { a as list,
|
|
1
|
+
import { a as list, m as commandMeta, r as defineCliCommand } from "./command-DIPmo0wh.js";
|
|
2
2
|
import { i as plain } from "./style-Bm2X5JrN.js";
|
|
3
|
-
import { t as VERSION } from "./version-
|
|
3
|
+
import { t as VERSION } from "./version-CQHFm-ak.js";
|
|
4
4
|
import { a as parseNames, n as CliError } from "./errors-BTe6A15O.js";
|
|
5
5
|
import { r as readIfExists, t as display } from "./io-DH1kcmmP.js";
|
|
6
|
-
import { t as loadSnapshot } from "./snapshot-
|
|
6
|
+
import { t as loadSnapshot } from "./snapshot-CXgsUPGj.js";
|
|
7
7
|
import { t as isRecord } from "./guards-CUlDNYZs.js";
|
|
8
|
-
import { a as toCatalog } from "./source-
|
|
9
|
-
import { a as findConfig, f as INTEGRATIONS, s as loadConfig } from "./config-
|
|
8
|
+
import { a as toCatalog } from "./source-B6aMAoEK.js";
|
|
9
|
+
import { a as findConfig, f as INTEGRATIONS, s as loadConfig } from "./config-Cskysxp-.js";
|
|
10
10
|
import { i as changeLines, n as PLAN_ARGS, r as applyPlan, u as planResult } from "./files-CX71yBm8.js";
|
|
11
|
-
import { n as dataMigration } from "./migrations-
|
|
12
|
-
import { a as wiringFiles, d as libEntry, f as needsLib, i as wiringChecklist, l as importFrom, n as latestMigrationVersion, o as wiringFor, p as resolveIntegrations, s as TEMPLATES, u as isIntegration } from "./migration-safety-
|
|
11
|
+
import { n as dataMigration } from "./migrations-Cqk-lJwu.js";
|
|
12
|
+
import { a as wiringFiles, d as libEntry, f as needsLib, i as wiringChecklist, l as importFrom, n as latestMigrationVersion, o as wiringFor, p as resolveIntegrations, s as TEMPLATES, u as isIntegration } from "./migration-safety-DGQswWZy.js";
|
|
13
13
|
import { n as installCommand, t as detectProject } from "./detect-D9JaAX20.js";
|
|
14
14
|
import { d as setBlockInJson, f as setPathInConfig, h as setPresetInJson, m as setPresetInConfig, n as addBlocksToJson, p as setPathInJson, r as addBlocksToWiring, t as addBlocksToConfig, u as setBlockInConfig } from "./config-edit-CrWfk8s3.js";
|
|
15
|
-
import { t as syncModules } from "./sync-
|
|
16
|
-
import { t as addModules } from "./add-
|
|
17
|
-
import {
|
|
18
|
-
import { t as blockNames } from "./blocks-
|
|
19
|
-
import { i as sourceArgs, n as SOURCE_ARGS } from "./source-args-
|
|
15
|
+
import { t as syncModules } from "./sync-pq6gmlhG.js";
|
|
16
|
+
import { t as addModules } from "./add-BKkV99g9.js";
|
|
17
|
+
import { t as appTablePlan } from "./app-table-files-PnPOpuB4.js";
|
|
18
|
+
import { t as blockNames } from "./blocks-tRfYx_mh.js";
|
|
19
|
+
import { i as sourceArgs, n as SOURCE_ARGS } from "./source-args-v8ljFDfc.js";
|
|
20
20
|
import { existsSync } from "node:fs";
|
|
21
21
|
import { dirname, join, posix, resolve } from "node:path";
|
|
22
22
|
import { readFile } from "node:fs/promises";
|
|
23
23
|
import { INTEGRATION_INFO, blockEntrySource } from "better-supabase/config";
|
|
24
|
-
import { DEFAULT_CONVENTIONS, PRESET_CATALOG, PRESET_FRAMEWORKS, PRESET_NAMES, PRESET_TENANT_NAMES, designConfig,
|
|
24
|
+
import { DEFAULT_CONVENTIONS, PRESET_CATALOG, PRESET_FRAMEWORKS, PRESET_NAMES, PRESET_TENANT_NAMES, designConfig, glueCommand, isPresetName, presetAndDesignOf, presetField, presetFromSpec, presetSpec, presetValueLabel, readDesignFile, resolvePreset } from "better-supabase/preset";
|
|
25
25
|
import { SQL_MODULES, adoptedColumnProblems, migrationOptionUses, moduleBody, moduleIdType, moduleWritesText } from "better-supabase/sql";
|
|
26
26
|
import { toSnake } from "better-supabase";
|
|
27
27
|
//#region src/cli/conventions.ts
|
|
@@ -656,9 +656,9 @@ function currentExtraColumns(config, module) {
|
|
|
656
656
|
}
|
|
657
657
|
/**
|
|
658
658
|
* `source` with a `/create` design written into it: each block's
|
|
659
|
-
* `options.extraColumns` (merged over the columns `config` already gives it)
|
|
660
|
-
*
|
|
661
|
-
*
|
|
659
|
+
* `options.extraColumns` (merged over the columns `config` already gives it).
|
|
660
|
+
* The design's tables are SQL files, written by `appTablePlan`, and positions
|
|
661
|
+
* only matter to the canvas, so neither goes into the config.
|
|
662
662
|
*/
|
|
663
663
|
function writeDesign(file, source, design, config) {
|
|
664
664
|
const set = file.endsWith(".json") ? setPathInJson : setPathInConfig;
|
|
@@ -683,17 +683,6 @@ function writeDesign(file, source, design, config) {
|
|
|
683
683
|
reason: problem
|
|
684
684
|
};
|
|
685
685
|
}
|
|
686
|
-
for (const [name, table] of Object.entries(design.appTables ?? {})) {
|
|
687
|
-
const { scope, ...rest } = table;
|
|
688
|
-
const problem = apply(["tables", name], scope === void 0 ? rest : {
|
|
689
|
-
...rest,
|
|
690
|
-
owner: scope
|
|
691
|
-
});
|
|
692
|
-
if (problem !== void 0) return {
|
|
693
|
-
ok: false,
|
|
694
|
-
reason: problem
|
|
695
|
-
};
|
|
696
|
-
}
|
|
697
686
|
return {
|
|
698
687
|
ok: true,
|
|
699
688
|
text
|
|
@@ -721,10 +710,6 @@ const APPLY_ARGS = {
|
|
|
721
710
|
type: "boolean",
|
|
722
711
|
description: "Map existing tables onto a block (with --tables), the preset's blocks onto tables under their default names, or, alone, write the data rows migration for blocks over your tables"
|
|
723
712
|
},
|
|
724
|
-
"allow-breaking": {
|
|
725
|
-
type: "boolean",
|
|
726
|
-
description: "Write a design with breaking app table changes (a rename, a retyped or required column, a tighter constraint); renames print their alter statements"
|
|
727
|
-
},
|
|
728
713
|
"dry-run": {
|
|
729
714
|
type: "boolean",
|
|
730
715
|
description: "Show the config diff and write nothing"
|
|
@@ -793,31 +778,6 @@ function designFor(config, design, preset) {
|
|
|
793
778
|
designConfig(resolved, design.appTables === void 0 ? {} : { appTables: design.appTables });
|
|
794
779
|
return design;
|
|
795
780
|
}
|
|
796
|
-
/** Each breaking change with its expand-and-contract steps. */
|
|
797
|
-
function describeBreaking(changes) {
|
|
798
|
-
return ["Breaking changes to app tables:", ...changes.flatMap((change) => [` ${change.summary}`, ...change.steps.map((step, index) => ` ${String(index + 1)}. ${step}`)])];
|
|
799
|
-
}
|
|
800
|
-
/**
|
|
801
|
-
* The statements that rename the tables and columns `changes` renames, in
|
|
802
|
-
* order.
|
|
803
|
-
*/
|
|
804
|
-
function renameStatements(changes) {
|
|
805
|
-
return changes.flatMap((change) => {
|
|
806
|
-
if (change.from === void 0) return [];
|
|
807
|
-
if (change.kind === "table.renamed") return [`alter table public.${ident(change.from)} rename to ${ident(change.table)};`];
|
|
808
|
-
if (change.kind === "column.renamed" && change.column !== void 0) return [`alter table public.${ident(change.table)} rename column ${ident(change.from)} to ${ident(change.column)};`];
|
|
809
|
-
return [];
|
|
810
|
-
});
|
|
811
|
-
}
|
|
812
|
-
/** How to run `renames` before `upgrade` creates the new names. */
|
|
813
|
-
function describeRenames(renames, renamedTables, file) {
|
|
814
|
-
return renames.length === 0 ? [] : [
|
|
815
|
-
"Run these in a migration before `better-supabase upgrade`, so the renamed tables and columns keep their rows:",
|
|
816
|
-
...renames.map((statement) => ` ${statement}`),
|
|
817
|
-
...renamedTables.length === 0 ? [] : [`Then remove ${renamedTables.join(", ")} from tables in ${file}: apply keeps the tables a design leaves out.`],
|
|
818
|
-
""
|
|
819
|
-
];
|
|
820
|
-
}
|
|
821
781
|
/** The config file edited for `--only`: the `preset` key, or the blocks. */
|
|
822
782
|
function edited(file, source, name, preset, only) {
|
|
823
783
|
const json = file.endsWith(".json");
|
|
@@ -881,23 +841,7 @@ async function runApply(rootConfig, args, rootDeps) {
|
|
|
881
841
|
blocks: []
|
|
882
842
|
} : preset);
|
|
883
843
|
if (conflict !== void 0) throw new CliError("usage", conflict);
|
|
884
|
-
const changes = design?.appTables === void 0 ? [] : diffAppTables(config.appTables, design.appTables);
|
|
885
|
-
const kept = changes.filter((change) => change.kind === "table.dropped").map((change) => change.table);
|
|
886
|
-
const renamedTables = changes.flatMap((change) => change.kind === "table.renamed" && change.from !== void 0 ? [change.from] : []);
|
|
887
|
-
const breaking = changes.filter((change) => change.breaking && change.kind !== "table.dropped");
|
|
888
|
-
const renames = renameStatements(breaking);
|
|
889
844
|
const shown = display(config.root, file);
|
|
890
|
-
if (breaking.length > 0 && args["allow-breaking"] !== true && args["dry-run"] !== true) return {
|
|
891
|
-
code: 1,
|
|
892
|
-
output: describeBreaking(breaking).join("\n"),
|
|
893
|
-
data: {
|
|
894
|
-
file: shown,
|
|
895
|
-
written: false,
|
|
896
|
-
breaking,
|
|
897
|
-
kept
|
|
898
|
-
},
|
|
899
|
-
error: `Nothing was written: the design has ${breaking.length === 1 ? "a breaking change" : `${String(breaking.length)} breaking changes`} to tables the app already has. Follow the steps above, or pass --allow-breaking to write it anyway.`
|
|
900
|
-
};
|
|
901
845
|
const source = await readFile(file, "utf-8");
|
|
902
846
|
const edit = edited(file, source, name, preset, only);
|
|
903
847
|
if (!edit.ok) return {
|
|
@@ -911,11 +855,7 @@ async function runApply(rootConfig, args, rootDeps) {
|
|
|
911
855
|
};
|
|
912
856
|
const paint = deps.paint ?? plain;
|
|
913
857
|
let text = withDesign.text;
|
|
914
|
-
const lines = [
|
|
915
|
-
...breaking.length === 0 ? [] : [...describeBreaking(breaking), ""],
|
|
916
|
-
...describeRenames(renames, renamedTables, shown),
|
|
917
|
-
...kept.length === 0 ? [] : [`Kept ${kept.join(", ")}: the design doesn't name ${kept.length === 1 ? "it" : "them"}, and apply keeps the tables a design leaves out. Remove ${kept.length === 1 ? "it" : "them"} from tables in ${shown} to drop ${kept.length === 1 ? "it" : "them"}.`, ""]
|
|
918
|
-
];
|
|
858
|
+
const lines = [];
|
|
919
859
|
if (createUrlParam(input, "authz") !== void 0) lines.push(AUTHZ_NOTE, "");
|
|
920
860
|
let adopted = {};
|
|
921
861
|
if (args.adopt === true) {
|
|
@@ -938,11 +878,13 @@ async function runApply(rootConfig, args, rootDeps) {
|
|
|
938
878
|
const data = {
|
|
939
879
|
file: shown,
|
|
940
880
|
adopted,
|
|
941
|
-
contents: text
|
|
942
|
-
kept,
|
|
943
|
-
...renames.length === 0 ? {} : { renames }
|
|
881
|
+
contents: text
|
|
944
882
|
};
|
|
945
|
-
|
|
883
|
+
const tables = design?.appTables === void 0 ? void 0 : await appTablePlan({
|
|
884
|
+
...config,
|
|
885
|
+
appTables: designConfig(resolvePreset(preset), design).appTables ?? {}
|
|
886
|
+
}, "better-supabase add");
|
|
887
|
+
if (text === source && tables === void 0) {
|
|
946
888
|
lines.push(`${shown} already holds the preset.`);
|
|
947
889
|
return {
|
|
948
890
|
code: 0,
|
|
@@ -954,13 +896,14 @@ async function runApply(rootConfig, args, rootDeps) {
|
|
|
954
896
|
};
|
|
955
897
|
}
|
|
956
898
|
const plan = {
|
|
957
|
-
root: config.root,
|
|
899
|
+
root: tables?.plan.root ?? config.root,
|
|
900
|
+
base: config.root,
|
|
958
901
|
regenerate: "better-supabase add",
|
|
959
|
-
files: [{
|
|
902
|
+
files: [...text === source ? [] : [{
|
|
960
903
|
path: file,
|
|
961
904
|
contents: text,
|
|
962
905
|
policy: "edit"
|
|
963
|
-
}]
|
|
906
|
+
}], ...tables?.plan.files ?? []]
|
|
964
907
|
};
|
|
965
908
|
const applied = await applyPlan(plan, args, paint);
|
|
966
909
|
if (applied.mode === "check") return planResult(plan, applied, { data: {
|
|
@@ -1212,7 +1155,6 @@ const ADD_COMMAND_ARGS = {
|
|
|
1212
1155
|
const PRESET_ONLY = [
|
|
1213
1156
|
"package",
|
|
1214
1157
|
"only",
|
|
1215
|
-
"allow-breaking",
|
|
1216
1158
|
...Object.keys(CONVENTION_ARGS)
|
|
1217
1159
|
];
|
|
1218
1160
|
/** A usage error for the first flag in `flags` that `args` sets. */
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { t as addCommand } from "./add-CrQ3jS7t.js";
|
|
@@ -1,12 +1,58 @@
|
|
|
1
|
-
import { p as commandMeta, r as defineCliCommand } from "./command-CVzTJSLp.js";
|
|
2
|
-
import { i as plain } from "./style-Bm2X5JrN.js";
|
|
3
1
|
import { n as CliError } from "./errors-BTe6A15O.js";
|
|
4
|
-
import { h as subjectTagArgs } from "./config-
|
|
5
|
-
import { r as layoutFor } from "./providers-
|
|
2
|
+
import { h as subjectTagArgs } from "./config-Cskysxp-.js";
|
|
3
|
+
import { r as layoutFor } from "./providers-Cjf5iOp5.js";
|
|
6
4
|
import { d as readSupabaseToml, n as declarativeSchemasDir } from "./supabase-toml-CncmQbO0.js";
|
|
7
|
-
import {
|
|
5
|
+
import { r as literal } from "./live-PpAh9pAc.js";
|
|
8
6
|
import { join, resolve, sep } from "node:path";
|
|
7
|
+
import { FIELD_FORMATS } from "better-supabase/config";
|
|
9
8
|
import { APP_TABLES_MODULE, renderBlocks, setTableFeature } from "better-supabase/sql";
|
|
9
|
+
/**
|
|
10
|
+
* The domain for a format on a column type, or undefined when the format has no
|
|
11
|
+
* pattern or bounds to check. The first type a format fits takes the plain
|
|
12
|
+
* name; the others add the type (`rating_bigint`).
|
|
13
|
+
*/
|
|
14
|
+
function formatDomain(format, type) {
|
|
15
|
+
const spec = FIELD_FORMATS[format];
|
|
16
|
+
const index = spec.types.findIndex((each) => each === type);
|
|
17
|
+
if (index === -1 || spec.pattern === void 0 && spec.bounds === void 0) return;
|
|
18
|
+
const bare = index === 0 ? format : `${format}_${type}`;
|
|
19
|
+
const checks = [...spec.pattern === void 0 ? [] : [`value ~* ${literal(spec.pattern)}`], ...spec.bounds === void 0 ? [] : [`value >= ${String(spec.bounds[0])}`, `value <= ${String(spec.bounds[1])}`]];
|
|
20
|
+
return {
|
|
21
|
+
name: `bsb.${bare}`,
|
|
22
|
+
bare,
|
|
23
|
+
base: type,
|
|
24
|
+
sql: `create domain bsb.${bare} as ${type}\n constraint ${bare}_check check (${checks.join(" and ")});`
|
|
25
|
+
};
|
|
26
|
+
}
|
|
27
|
+
/** The domain a column takes, or undefined when it keeps its type and check. */
|
|
28
|
+
function domainOf(column) {
|
|
29
|
+
if (column.format === void 0 || column.options !== void 0 || column.encrypted === true || column.min !== void 0 || column.max !== void 0) return;
|
|
30
|
+
return formatDomain(column.format, column.type);
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* `tables` with each format column typed as its domain, and the domains they
|
|
34
|
+
* use. A column with its own `min`, `max` or `options` keeps the inline check,
|
|
35
|
+
* since a domain would tighten what the column allows.
|
|
36
|
+
*/
|
|
37
|
+
function withFormatDomains(tables) {
|
|
38
|
+
const used = /* @__PURE__ */ new Map();
|
|
39
|
+
return {
|
|
40
|
+
tables: Object.fromEntries(Object.entries(tables).map(([name, table]) => [name, {
|
|
41
|
+
...table,
|
|
42
|
+
columns: Object.fromEntries(Object.entries(table.columns ?? {}).map(([column, config]) => {
|
|
43
|
+
const domain = domainOf(config);
|
|
44
|
+
if (domain === void 0) return [column, config];
|
|
45
|
+
used.set(domain.name, domain);
|
|
46
|
+
return [column, {
|
|
47
|
+
...config,
|
|
48
|
+
domain: domain.name
|
|
49
|
+
}];
|
|
50
|
+
}))
|
|
51
|
+
}])),
|
|
52
|
+
domains: [...used.values()].toSorted((a, b) => a.name.localeCompare(b.name))
|
|
53
|
+
};
|
|
54
|
+
}
|
|
55
|
+
//#endregion
|
|
10
56
|
//#region src/cli/sql/schema-first.ts
|
|
11
57
|
const NAME = String.raw`(?:"?public"?\.)?"?([a-z_][a-z0-9_]*)"?`;
|
|
12
58
|
const TABLE_TARGETS = [
|
|
@@ -236,8 +282,7 @@ function splitAppTables(config, sql, tables) {
|
|
|
236
282
|
return files;
|
|
237
283
|
}
|
|
238
284
|
//#endregion
|
|
239
|
-
//#region src/cli/
|
|
240
|
-
const MIGRATE_ARGS = {};
|
|
285
|
+
//#region src/cli/sql/app-table-files.ts
|
|
241
286
|
/**
|
|
242
287
|
* The deepest directory that holds both paths. A project in a monorepo keeps
|
|
243
288
|
* its `supabase` folder above its own root, and the plan may not leave `root`.
|
|
@@ -252,55 +297,50 @@ function commonAncestor(first, second) {
|
|
|
252
297
|
}
|
|
253
298
|
return shared.join(sep) || sep;
|
|
254
299
|
}
|
|
300
|
+
/** The `bsb` schema and one file per domain, in pg-delta's export layout. */
|
|
301
|
+
function domainFiles(domains) {
|
|
302
|
+
if (domains.length === 0) return [];
|
|
303
|
+
return [{
|
|
304
|
+
path: `bsb/schema.sql`,
|
|
305
|
+
contents: `-- Owned by you since \`better-supabase migrate schema-first\`.\ncreate schema if not exists bsb;\ngrant usage on schema bsb to anon, authenticated, service_role;\n`
|
|
306
|
+
}, ...domains.map((domain) => ({
|
|
307
|
+
path: `bsb/domains/${domain.bare}.sql`,
|
|
308
|
+
contents: `-- The ${domain.bare} format of a column. Owned by you.\n${domain.sql}\n`
|
|
309
|
+
}))];
|
|
310
|
+
}
|
|
255
311
|
/**
|
|
256
|
-
*
|
|
257
|
-
*
|
|
258
|
-
* tags in
|
|
259
|
-
* `appTables
|
|
312
|
+
* The plan that writes the tables `config.appTables` renders as files you own
|
|
313
|
+
* under the declarative schemas folder (ADR 0102), with each table's features
|
|
314
|
+
* as `@bsb` tags in its comment. A file that exists stays as it is. The config
|
|
315
|
+
* only carries `appTables` from a Create design or an old config that `migrate
|
|
316
|
+
* schema-first` reads; the public config has no key for it.
|
|
260
317
|
*/
|
|
261
|
-
async function
|
|
318
|
+
async function appTablePlan(config, regenerate) {
|
|
262
319
|
const tables = Object.keys(config.appTables);
|
|
263
|
-
if (tables.length === 0) return
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
}
|
|
270
|
-
};
|
|
271
|
-
const layout = await layoutFor(config, {}, config.blockNames);
|
|
320
|
+
if (tables.length === 0) return;
|
|
321
|
+
const typed = withFormatDomains(config.appTables);
|
|
322
|
+
const layout = await layoutFor({
|
|
323
|
+
...config,
|
|
324
|
+
appTables: typed.tables
|
|
325
|
+
}, {}, config.blockNames);
|
|
272
326
|
const source = renderBlocks(config.blockNames, layout).find((file) => file.module === APP_TABLES_MODULE && file.kind === "schema");
|
|
273
327
|
if (source === void 0) throw new CliError("usage", "The config renders no app tables file.");
|
|
274
328
|
const dir = join(config.root, declarativeSchemasDir(await readSupabaseToml(config.root)));
|
|
275
|
-
const
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
329
|
+
const split = [...splitAppTables(config, source.contents, tables), ...domainFiles(typed.domains)];
|
|
330
|
+
return {
|
|
331
|
+
tables,
|
|
332
|
+
files: split.map((file) => file.path),
|
|
333
|
+
plan: {
|
|
334
|
+
root: commonAncestor(config.root, dir),
|
|
335
|
+
base: config.root,
|
|
336
|
+
regenerate,
|
|
337
|
+
files: split.map((file) => ({
|
|
338
|
+
path: join(dir, file.path),
|
|
339
|
+
contents: file.contents,
|
|
340
|
+
policy: "create"
|
|
341
|
+
}))
|
|
342
|
+
}
|
|
285
343
|
};
|
|
286
|
-
const applied = await applyPlan(plan, args, deps.paint ?? plain);
|
|
287
|
-
const summary = applied.mode === "write" && applied.drift ? `Wrote ${String(files.length)} files for ${String(tables.length)} tables. Delete appTables (and records) from the config, run \`better-supabase upgrade\` to remove the old app tables file, then \`better-supabase db diff\` to check that the schema is unchanged.` : void 0;
|
|
288
|
-
return planResult(plan, applied, {
|
|
289
|
-
data: {
|
|
290
|
-
tables,
|
|
291
|
-
files: files.map((file) => file.path)
|
|
292
|
-
},
|
|
293
|
-
...summary === void 0 ? {} : { summary }
|
|
294
|
-
});
|
|
295
344
|
}
|
|
296
|
-
const migrateSchemaFirstCommand = defineCliCommand({
|
|
297
|
-
meta: commandMeta("migrate schema-first"),
|
|
298
|
-
args: {
|
|
299
|
-
...MIGRATE_ARGS,
|
|
300
|
-
"dry-run": PLAN_ARGS["dry-run"],
|
|
301
|
-
check: PLAN_ARGS.check
|
|
302
|
-
},
|
|
303
|
-
run: (args, { config, paint }) => runMigrateSchemaFirst(config, args, { paint })
|
|
304
|
-
});
|
|
305
345
|
//#endregion
|
|
306
|
-
export {
|
|
346
|
+
export { appTablePlan as t };
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { m as commandMeta, r as defineCliCommand } from "./command-DIPmo0wh.js";
|
|
2
2
|
import { n as CliError, r as errorText } from "./errors-BTe6A15O.js";
|
|
3
3
|
import { i as isLocalDatabaseUrl, r as databaseHost } from "./agent-CbuPvI2x.js";
|
|
4
|
-
import { l as stdinDatabaseUrl, n as databaseUrl } from "./config-
|
|
4
|
+
import { l as stdinDatabaseUrl, n as databaseUrl } from "./config-Cskysxp-.js";
|
|
5
5
|
import { t as connect } from "./db-CQCLx7cx.js";
|
|
6
|
-
import { n as ident } from "./live-
|
|
7
|
-
import { r as STACK_ARG, t as DB_URL_STDIN_ARG } from "./source-args-
|
|
6
|
+
import { n as ident } from "./live-PpAh9pAc.js";
|
|
7
|
+
import { r as STACK_ARG, t as DB_URL_STDIN_ARG } from "./source-args-v8ljFDfc.js";
|
|
8
8
|
//#region src/cli/commands/backfill.ts
|
|
9
9
|
const DEFAULT_BATCH = 1e3;
|
|
10
10
|
const ARGS = {
|
package/dist/cli/bin.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { n as blocksListCommand, r as blocksSearchCommand, i as blocksViewCommand } from "./blocks-
|
|
1
|
+
export { n as blocksListCommand, r as blocksSearchCommand, i as blocksViewCommand } from "./blocks-tRfYx_mh.js";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { m as commandMeta, r as defineCliCommand } from "./command-DIPmo0wh.js";
|
|
2
2
|
import { n as CliError } from "./errors-BTe6A15O.js";
|
|
3
3
|
import { t as SQL_ARGS } from "./args-UEwg0l-N.js";
|
|
4
|
-
import { n as listModules, t as printModule } from "./print-
|
|
4
|
+
import { n as listModules, t as printModule } from "./print-DSTnq5xz.js";
|
|
5
5
|
import { t as decodePresetInput } from "./preset-BwmIfFnh.js";
|
|
6
6
|
import { BLOCK_CATEGORIES } from "better-supabase/blocks";
|
|
7
7
|
import { PRESET_CATALOG, PRESET_NAMES, glueCommand } from "better-supabase/preset";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as VERSION } from "./version-
|
|
1
|
+
import { t as VERSION } from "./version-CQHFm-ak.js";
|
|
2
2
|
import { dirname, resolve } from "node:path";
|
|
3
3
|
import { createHash } from "node:crypto";
|
|
4
4
|
import { mkdir, readFile, rename, rm, writeFile } from "node:fs/promises";
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { m as commandMeta, r as defineCliCommand } from "./command-DIPmo0wh.js";
|
|
2
2
|
import { i as plain } from "./style-Bm2X5JrN.js";
|
|
3
3
|
import { n as CliError } from "./errors-BTe6A15O.js";
|
|
4
|
-
import { t as migrateCliCall } from "./moved-
|
|
4
|
+
import { t as migrateCliCall } from "./moved-DNOtp9LA.js";
|
|
5
5
|
import { t as isRecord$1 } from "./guards-CUlDNYZs.js";
|
|
6
6
|
import { a as changedFiles, i as changeLines, r as applyPlan, u as planResult } from "./files-CX71yBm8.js";
|
|
7
|
-
import { i as schemasDirOf, n as migrationsDir, o as writtenByBlocks } from "./sql-layout-
|
|
7
|
+
import { i as schemasDirOf, n as migrationsDir, o as writtenByBlocks } from "./sql-layout-CkxDNVEH.js";
|
|
8
8
|
import { a as configObject, c as mask, f as setPathInConfig, g as skipSpace, h as setPresetInJson, i as closingIndex, l as properties, m as setPresetInConfig, o as indentAt, p as setPathInJson, t as addBlocksToConfig, v as codeRanges } from "./config-edit-CrWfk8s3.js";
|
|
9
9
|
import { i as legacyPrefixNames, n as LEGACY_PREFIXES, t as LEGACY_CLAIMS } from "./legacy-prefix-R7UChFFl.js";
|
|
10
10
|
import { a as REVIEW_0_15, c as renameSubpaths, r as PLUGIN_IMPORT_RENAMES, s as SUBPATH_RENAMES_0_15, t as BLOCK_EXPORT_RENAMES } from "./codemod-block-renames-BuSaTE_G.js";
|
|
11
|
-
import { a as RECORD_BINDING_RENAMES, n as groupConfigJson, r as groupConfigSource, t as cutRange } from "./config-group-
|
|
11
|
+
import { a as RECORD_BINDING_RENAMES, n as groupConfigJson, r as groupConfigSource, t as cutRange } from "./config-group-CP-B9uRt.js";
|
|
12
12
|
import { existsSync } from "node:fs";
|
|
13
13
|
import { extname, join, relative, resolve } from "node:path";
|
|
14
14
|
import { readFile, readdir, stat } from "node:fs/promises";
|
|
@@ -1874,7 +1874,7 @@ const CODEMODS = {
|
|
|
1874
1874
|
},
|
|
1875
1875
|
{
|
|
1876
1876
|
pattern: /\bcomments\s*:\s*\{/,
|
|
1877
|
-
message: "With `config.
|
|
1877
|
+
message: "With `config.subjects` set and no `subjects` option, comments accept only the registered subject types and require read on the subject row"
|
|
1878
1878
|
}
|
|
1879
1879
|
]
|
|
1880
1880
|
},
|
|
@@ -914,6 +914,7 @@ const GLOBAL_ARGS = {
|
|
|
914
914
|
const LISTS = /* @__PURE__ */ new WeakMap();
|
|
915
915
|
const COMPLETIONS = /* @__PURE__ */ new WeakMap();
|
|
916
916
|
const RUNS_WITH_INVALID_CONFIG = /* @__PURE__ */ new WeakSet();
|
|
917
|
+
const READS_LEGACY_TABLES = /* @__PURE__ */ new WeakSet();
|
|
917
918
|
/** A citty command that receives the `CliContext` and returns a `CommandResult`. */
|
|
918
919
|
function defineCliCommand(def) {
|
|
919
920
|
const version = def.apiVersion ?? 1;
|
|
@@ -929,6 +930,7 @@ function defineCliCommand(def) {
|
|
|
929
930
|
LISTS.set(command, def.lists ?? []);
|
|
930
931
|
COMPLETIONS.set(command, def.completions ?? {});
|
|
931
932
|
if (def.runsWithInvalidConfig === true) RUNS_WITH_INVALID_CONFIG.add(command);
|
|
933
|
+
if (def.readsLegacyTables === true) READS_LEGACY_TABLES.add(command);
|
|
932
934
|
return Object.assign(command, { apiVersion: 1 });
|
|
933
935
|
}
|
|
934
936
|
/** The list options a command declared through `defineCliCommand`. */
|
|
@@ -942,6 +944,9 @@ function listArgs(command) {
|
|
|
942
944
|
function completionValues(command) {
|
|
943
945
|
return COMPLETIONS.get(command) ?? {};
|
|
944
946
|
}
|
|
947
|
+
function readsLegacyTables(command) {
|
|
948
|
+
return READS_LEGACY_TABLES.has(command);
|
|
949
|
+
}
|
|
945
950
|
function runsWithInvalidConfig(command) {
|
|
946
951
|
return RUNS_WITH_INVALID_CONFIG.has(command);
|
|
947
952
|
}
|
|
@@ -989,4 +994,4 @@ function cliContext(data) {
|
|
|
989
994
|
return data;
|
|
990
995
|
}
|
|
991
996
|
//#endregion
|
|
992
|
-
export { list as a,
|
|
997
|
+
export { list as a, runsWithInvalidConfig as c, DOCS_ORIGIN as d, GROUPS as f, runCommand as g, parseArgs$2 as h, joinRepeated as i, COMMANDS as l, commandMeta as m, completionValues as n, listArgs as o, RESERVED_NAMES as p, defineCliCommand as r, readsLegacyTables as s, GLOBAL_ARGS as t, COMPLETE_COMMAND as u };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { o as isVariadic, r as commandArgs } from "./parse-
|
|
1
|
+
import { n as completionValues, o as listArgs, t as GLOBAL_ARGS, u as COMPLETE_COMMAND } from "./command-DIPmo0wh.js";
|
|
2
|
+
import { o as isVariadic, r as commandArgs } from "./parse-BPf3kGnc.js";
|
|
3
3
|
//#region src/cli/core/completion.ts
|
|
4
4
|
const SHELLS = [
|
|
5
5
|
"bash",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { n as complete, r as completionLines } from "./completion-
|
|
1
|
+
export { n as complete, r as completionLines } from "./completion-DxPxMtyP.js";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { m as commandMeta, r as defineCliCommand } from "./command-DIPmo0wh.js";
|
|
2
2
|
import { n as CliError } from "./errors-BTe6A15O.js";
|
|
3
|
-
import { a as isShell, i as completionScript, t as SHELLS } from "./completion-
|
|
3
|
+
import { a as isShell, i as completionScript, t as SHELLS } from "./completion-DxPxMtyP.js";
|
|
4
4
|
//#region src/cli/commands/completion.ts
|
|
5
5
|
const ARGS = { shell: {
|
|
6
6
|
type: "positional",
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { m as commandMeta, r as defineCliCommand } from "./command-DIPmo0wh.js";
|
|
2
2
|
import { n as redact, r as redactUrl } from "./redact-KGAk2Ul9.js";
|
|
3
3
|
import { t as display } from "./io-DH1kcmmP.js";
|
|
4
4
|
import { n as presetInfo } from "./preset-BwmIfFnh.js";
|
|
@@ -979,6 +979,7 @@ const subjectSearchSchema = strictObject({
|
|
|
979
979
|
//#region src/cli/config-moved.ts
|
|
980
980
|
/** Where each top-level key of a 0.14 config moved in 0.15. */
|
|
981
981
|
const MOVED_KEYS = new Map([...Object.entries(CONFIG_GROUPS).flatMap(([group, keys]) => keys.filter((key) => key !== "tables").map((key) => [key, `${group}.${key}`])), ...RENAMED_CONFIG_KEYS.map(([grouped, flat]) => [flat, grouped])]);
|
|
982
|
+
const TABLES_REMOVED = "removed in 0.28: tables are SQL in `supabase/schemas` with `@bsb` tags in the table comment; run `better-supabase migrate schema-first`";
|
|
982
983
|
/** `sql` keys that moved before 0.15, with where they went. */
|
|
983
984
|
const MOVED_SQL_KEYS = [["modules", "moved to the top-level `blocks` key in 0.9; run `better-supabase codemod 0.9`"], ["naming", "`sql.naming.tenant` moved to `blocks.memberships.names.organization`"]];
|
|
984
985
|
/** Moved `sql` keys in one config block, under `sql` or `database.sql`. */
|
|
@@ -989,7 +990,13 @@ function movedSqlIssues(prefix, block) {
|
|
|
989
990
|
}
|
|
990
991
|
const SCAFFOLD_REMOVED = "removed in 0.15 with `better-supabase scaffold api`; delete it. `defineApi` includes every table and block instance, and `createOrpc(betterSupabase).router(api)` serves it: https://bettersupabase.com/docs/frameworks/orpc#serve-the-api";
|
|
991
992
|
/** Top-level keys 0.15 removed, with what replaces them. */
|
|
992
|
-
const REMOVED_KEYS = /* @__PURE__ */ new Map([
|
|
993
|
+
const REMOVED_KEYS = /* @__PURE__ */ new Map([
|
|
994
|
+
["plugins", "removed in 0.15: the updated-at, created-by, trash and memberships blocks carry these columns now; run `better-supabase codemod 0.15`"],
|
|
995
|
+
["scaffold", SCAFFOLD_REMOVED],
|
|
996
|
+
["tables", TABLES_REMOVED],
|
|
997
|
+
["appTables", TABLES_REMOVED],
|
|
998
|
+
["records", "renamed to `subjects` in 0.28; rename the key. A table's subject now comes from `@bsb subject` in its comment"]
|
|
999
|
+
]);
|
|
993
1000
|
const RECORD_TYPES_MOVED = "renamed to `gen.recordTypes` in 0.15; run `better-supabase codemod 0.15`";
|
|
994
1001
|
/** Keys of the flat 0.14 config in one config block. */
|
|
995
1002
|
function movedGroupIssues(prefix, block) {
|
|
@@ -1648,8 +1655,7 @@ const ENTRIES = {
|
|
|
1648
1655
|
"entitlements"
|
|
1649
1656
|
])
|
|
1650
1657
|
})),
|
|
1651
|
-
|
|
1652
|
-
tables: FLAT.appTables,
|
|
1658
|
+
subjects: FLAT.subjects,
|
|
1653
1659
|
blocks: FLAT.blocks,
|
|
1654
1660
|
adapters: FLAT.integrations,
|
|
1655
1661
|
gen: optional(strictObject({
|
|
@@ -1839,6 +1845,26 @@ function mergeConfig(base, override) {
|
|
|
1839
1845
|
return merged;
|
|
1840
1846
|
}
|
|
1841
1847
|
/**
|
|
1848
|
+
* A config without the removed top-level `tables` and `records` keys: the
|
|
1849
|
+
* tables as `appTables`, and the records merged into `subjects`. `migrate
|
|
1850
|
+
* schema-first` reads them to write the tables as SQL.
|
|
1851
|
+
*/
|
|
1852
|
+
function takeLegacyTables(config) {
|
|
1853
|
+
if (!isPlainObject(config)) return {};
|
|
1854
|
+
const { tables, appTables, records, ...rest } = config;
|
|
1855
|
+
const subjects = isPlainObject(records) ? records : void 0;
|
|
1856
|
+
return {
|
|
1857
|
+
config: subjects === void 0 ? rest : {
|
|
1858
|
+
...rest,
|
|
1859
|
+
subjects: {
|
|
1860
|
+
...subjects,
|
|
1861
|
+
...isPlainObject(rest["subjects"]) ? rest["subjects"] : {}
|
|
1862
|
+
}
|
|
1863
|
+
},
|
|
1864
|
+
appTables: isPlainObject(tables) ? tables : appTables
|
|
1865
|
+
};
|
|
1866
|
+
}
|
|
1867
|
+
/**
|
|
1842
1868
|
* The config with the `environment` blocks merged in: `$env.<name>`, then the
|
|
1843
1869
|
* `$development`, `$production`, `$test` or `$ci` shorthand. Every `$` key is
|
|
1844
1870
|
* dropped from the result.
|
|
@@ -1874,7 +1900,7 @@ function defaultConfig(cwd, explicit, environment, path = discoverConfig(cwd, ex
|
|
|
1874
1900
|
* `--config` keeps `cwd` as the root. `path` is the file `discoverConfig`
|
|
1875
1901
|
* found, for callers that already looked it up.
|
|
1876
1902
|
*/
|
|
1877
|
-
async function loadConfig(cwd, explicit, environment, path = discoverConfig(cwd, explicit)) {
|
|
1903
|
+
async function loadConfig(cwd, explicit, environment, path = discoverConfig(cwd, explicit), options = {}) {
|
|
1878
1904
|
const withEnvironment = (resolved) => environment === void 0 ? resolved : {
|
|
1879
1905
|
...resolved,
|
|
1880
1906
|
environment
|
|
@@ -1892,11 +1918,16 @@ async function loadConfig(cwd, explicit, environment, path = discoverConfig(cwd,
|
|
|
1892
1918
|
extend: false,
|
|
1893
1919
|
giget: false
|
|
1894
1920
|
});
|
|
1895
|
-
|
|
1896
|
-
|
|
1921
|
+
const legacy = options.legacyTables === true ? takeLegacyTables(config) : {};
|
|
1922
|
+
const current = legacy.config ?? config;
|
|
1923
|
+
if (!isConfig(current)) {
|
|
1924
|
+
const issues = configIssues(current);
|
|
1897
1925
|
throw new CliError("config_invalid", `${display(cwd, path)} is not a valid config:\n${issues.map((issue) => ` ${issue}`).join("\n")}`, { issues });
|
|
1898
1926
|
}
|
|
1899
|
-
return withEnvironment(await withSchemaTags(resolveConfig(
|
|
1927
|
+
return withEnvironment(await withSchemaTags(resolveConfig({
|
|
1928
|
+
...applyEnvironment(current, environment),
|
|
1929
|
+
...legacy.appTables === void 0 ? {} : { appTables: legacy.appTables }
|
|
1930
|
+
}, explicit ? cwd : dirname(path))));
|
|
1900
1931
|
}
|
|
1901
1932
|
/** `[db] port` or `[api] port` from `supabase/config.toml`. */
|
|
1902
1933
|
async function readSupabasePort(root, section) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { t as applyEnvironment, n as databaseUrl, r as defaultConfig, i as discoverConfig, a as findConfig, o as importExport, s as loadConfig, c as readSupabasePort, l as stdinDatabaseUrl } from "./config-
|
|
1
|
+
export { t as applyEnvironment, n as databaseUrl, r as defaultConfig, i as discoverConfig, a as findConfig, o as importExport, s as loadConfig, c as readSupabasePort, l as stdinDatabaseUrl } from "./config-Cskysxp-.js";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { a as configObject, c as mask, g as skipSpace, i as closingIndex, l as properties, o as indentAt } from "./config-edit-CrWfk8s3.js";
|
|
2
|
-
import { CONFIG_GROUPS, RENAMED_BLOCK_KEYS, RENAMED_CONFIG_KEYS, groupEntries
|
|
2
|
+
import { CONFIG_GROUPS, RENAMED_BLOCK_KEYS, RENAMED_CONFIG_KEYS, groupEntries } from "better-supabase/config";
|
|
3
3
|
//#region src/cli/codemod-record-bindings.ts
|
|
4
4
|
/** Blocks whose record section export became `<block>Binding` in 0.15. */
|
|
5
5
|
const BLOCK_BINDINGS = [
|
|
@@ -276,10 +276,9 @@ function regroup(source, open, organization) {
|
|
|
276
276
|
members.set(group, [...members.get(group) ?? [], text]);
|
|
277
277
|
if (!firstAt.has(group)) firstAt.set(group, at);
|
|
278
278
|
};
|
|
279
|
-
const flatTables = hasFlatTables(props.flatMap((prop) => prop.key ?? []));
|
|
280
279
|
for (const [index, prop] of props.entries()) {
|
|
281
280
|
const key = prop.key;
|
|
282
|
-
const group =
|
|
281
|
+
const group = GROUP_OF.get(key);
|
|
283
282
|
const rename = RENAMED_CONFIG_KEYS.find(([, flat]) => flat === key);
|
|
284
283
|
const isGroup = GROUP_KEYS.has(key);
|
|
285
284
|
if (group === void 0 && !isGroup) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { r as readIfExists } from "./io-DH1kcmmP.js";
|
|
2
|
-
import { t as CACHE_DIR } from "./cache-
|
|
3
|
-
import { x as installedVersion } from "./snapshot-
|
|
2
|
+
import { t as CACHE_DIR } from "./cache-DQZ09YOg.js";
|
|
3
|
+
import { x as installedVersion } from "./snapshot-CXgsUPGj.js";
|
|
4
4
|
import { t as i } from "./jsonc-D5Fu67jw.js";
|
|
5
5
|
import { resolve } from "node:path";
|
|
6
6
|
import { createHash } from "node:crypto";
|