better-supabase 0.10.0 → 0.12.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/README.md +1 -0
- package/dist/{access-sql-DUSSMaC3.js → access-sql-CTJPHjCL.js} +1 -1
- package/dist/{actor-KHDOKGb1.js → actor-CAL8mMih.js} +1 -1
- package/dist/{adapter-rmWaLNe3.js → adapter-CRNH2aX_.js} +390 -267
- package/dist/{agents-ByYUSZxT.d.ts → agents-CGP2AQge.d.ts} +7 -7
- package/dist/{ai-cache-CkxtAt4P.d.ts → ai-cache-BdeJKlrV.d.ts} +5 -5
- package/dist/{ai-cache-DPiuJ-zJ.js → ai-cache-CLninP-F.js} +2 -2
- package/dist/{ai-chat-al8b3spK.d.ts → ai-chat-D-2MH1sU.d.ts} +7 -7
- package/dist/{ai-files-BXtV3ygd.js → ai-files-ChFDkMLN.js} +18 -10
- package/dist/ai-sdk/agents/index.d.ts +6 -6
- package/dist/ai-sdk/agents/index.js +2 -2
- package/dist/ai-sdk/batches/index.d.ts +4 -4
- package/dist/ai-sdk/batches/index.js +4 -4
- package/dist/ai-sdk/cache/index.d.ts +2 -2
- package/dist/ai-sdk/cache/index.js +1 -1
- package/dist/ai-sdk/chat/index.d.ts +1 -1
- package/dist/ai-sdk/chat/index.js +5 -5
- package/dist/ai-sdk/embeddings/index.d.ts +2 -2
- package/dist/ai-sdk/files/index.d.ts +2 -2
- package/dist/ai-sdk/files/index.js +4 -4
- package/dist/ai-sdk/index.d.ts +6 -6
- package/dist/ai-sdk/index.js +2 -2
- package/dist/ai-sdk/mcp/index.d.ts +4 -4
- package/dist/ai-sdk/mcp/index.js +4 -4
- package/dist/ai-sdk/memory/index.d.ts +3 -3
- package/dist/ai-sdk/workflow/index.d.ts +4 -4
- package/dist/ai-sdk/workflow/index.js +6 -6
- package/dist/{ai-tasks-Di0gmJOX.d.ts → ai-tasks-ZvPnNudQ.d.ts} +8 -8
- package/dist/{announcements-HF7LuFw5.js → announcements-BNxTW5HJ.js} +4 -4
- package/dist/{api-CFjuYKFY.js → api-C43_FYDp.js} +1 -1
- package/dist/{api-XJcQON_7.d.ts → api-DoWK3dTw.d.ts} +6 -6
- package/dist/{api-keys-EdSNjGIZ.d.ts → api-keys-AgDXbcql.d.ts} +7 -7
- package/dist/{api-keys-C1IZF7p8.js → api-keys-BSXwI2jF.js} +6 -6
- package/dist/{app-tables-DVidEHOI.d.ts → app-tables-BrMBjyuq.d.ts} +1 -1
- package/dist/{approvals-DqlPHBHI.d.ts → approvals-CyX709B-.d.ts} +7 -7
- package/dist/arazzo/index.d.ts +2 -2
- package/dist/arazzo/index.js +2 -2
- package/dist/{assistant-BZyhQ8bd.d.ts → assistant-DZsHsYIx.d.ts} +4 -4
- package/dist/astro/index.d.ts +12 -12
- package/dist/astro/index.js +5 -5
- package/dist/asyncapi/index.d.ts +1 -1
- package/dist/asyncapi/index.js +2 -2
- package/dist/{attachments-C8FEBBKE.js → attachments-CK8D8bIV.js} +14 -8
- package/dist/{audit-log-CRgiHlRh.js → audit-log-ovUlF4Mk.js} +7 -7
- package/dist/auth-module-DbZv2WrR.js +10 -0
- package/dist/{auth-reply-B_dW4jHJ.js → auth-reply-Daq72lY4.js} +2 -2
- package/dist/{authorization-CdJRoZgV.d.ts → authorization-ClWBcXJi.d.ts} +23 -2
- package/dist/{authorization-hooks-Do5djkpz.d.ts → authorization-hooks-WDQMKIsc.d.ts} +2 -2
- package/dist/{authorizer-dVVN05Un.js → authorizer-B3yyCVUF.js} +2 -2
- package/dist/{base64-BmeCBgGo.js → base64-D4aqdnDR.js} +4 -4
- package/dist/better-result/index.d.ts +5 -5
- package/dist/better-result/index.js +1 -1
- package/dist/{bind-DkaP_0iS.d.ts → bind-Bfo40o63.d.ts} +4 -4
- package/dist/{block-fields-BANwJ9Y_.js → block-fields-Bv1hV855.js} +3 -3
- package/dist/{block-fields-5UA84ZUg.d.ts → block-fields-DnaDbgZS.d.ts} +2 -2
- package/dist/{block-helpers-7pMBVsE6.d.ts → block-helpers-CjcQM1yA.d.ts} +2 -2
- package/dist/{block-helpers-BfVCR5Fc.js → block-helpers-DkVZNDrj.js} +4 -4
- package/dist/{block-hooks-ByKlh8Qy.js → block-hooks-C22vuIUd.js} +3 -3
- package/dist/{block-hooks-C_WaodoA.d.ts → block-hooks-DcPJHztl.d.ts} +3 -3
- package/dist/{block-transport-NbUJygA7.d.ts → block-transport-DezJPPA0.d.ts} +2 -2
- package/dist/{block-transport-G4t1umrR.js → block-transport-J7ZepTq2.js} +1 -1
- package/dist/blocks/access-requests/index.d.ts +8 -8
- package/dist/blocks/access-requests/index.js +6 -6
- package/dist/blocks/agents/index.d.ts +4 -4
- package/dist/blocks/agents/index.js +5 -5
- package/dist/blocks/ai-cache/index.d.ts +3 -3
- package/dist/blocks/ai-cache/index.js +2 -2
- package/dist/blocks/ai-chat/index.d.ts +5 -5
- package/dist/blocks/ai-chat/index.js +2 -2
- package/dist/blocks/ai-chat/react/index.d.ts +2 -2
- package/dist/blocks/ai-chat/react/index.js +2 -2
- package/dist/blocks/ai-chat/solid/index.d.ts +2 -2
- package/dist/blocks/ai-chat/solid/index.js +1 -1
- package/dist/blocks/ai-chat/svelte/index.d.ts +2 -2
- package/dist/blocks/ai-chat/svelte/index.js +1 -1
- package/dist/blocks/ai-chat/vue/index.d.ts +2 -2
- package/dist/blocks/ai-chat/vue/index.js +1 -1
- package/dist/blocks/ai-files/index.d.ts +5 -5
- package/dist/blocks/ai-files/index.js +2 -2
- package/dist/blocks/ai-providers/index.d.ts +4 -4
- package/dist/blocks/ai-providers/index.js +7 -7
- package/dist/blocks/ai-tasks/index.d.ts +3 -3
- package/dist/blocks/ai-tasks/index.js +7 -7
- package/dist/blocks/announcements/index.d.ts +4 -4
- package/dist/blocks/announcements/index.js +2 -2
- package/dist/blocks/announcements/react/index.d.ts +1 -1
- package/dist/blocks/announcements/react/index.js +2 -2
- package/dist/blocks/announcements/solid/index.d.ts +2 -2
- package/dist/blocks/announcements/svelte/index.d.ts +2 -2
- package/dist/blocks/announcements/vue/index.d.ts +2 -2
- package/dist/blocks/api-keys/index.d.ts +7 -7
- package/dist/blocks/api-keys/index.js +5 -5
- package/dist/blocks/api-keys/react/index.d.ts +1 -1
- package/dist/blocks/api-keys/react/index.js +3 -3
- package/dist/blocks/api-keys/react/server.d.ts +1 -1
- package/dist/blocks/api-keys/solid/index.d.ts +2 -2
- package/dist/blocks/api-keys/solid/index.js +1 -1
- package/dist/blocks/api-keys/svelte/index.d.ts +2 -2
- package/dist/blocks/api-keys/svelte/index.js +1 -1
- package/dist/blocks/api-keys/vue/index.d.ts +2 -2
- package/dist/blocks/api-keys/vue/index.js +1 -1
- package/dist/blocks/approvals/index.d.ts +4 -4
- package/dist/blocks/approvals/index.js +6 -6
- package/dist/blocks/attachments/index.d.ts +4 -4
- package/dist/blocks/attachments/index.js +2 -2
- package/dist/blocks/audit/index.d.ts +6 -6
- package/dist/blocks/audit/index.js +6 -6
- package/dist/blocks/audit/react/index.d.ts +1 -1
- package/dist/blocks/audit/react/index.js +2 -2
- package/dist/blocks/audit/react/server.d.ts +1 -1
- package/dist/blocks/audit/solid/index.d.ts +2 -2
- package/dist/blocks/audit/svelte/index.d.ts +2 -2
- package/dist/blocks/audit/vue/index.d.ts +2 -2
- package/dist/blocks/billing/index.d.ts +26 -10
- package/dist/blocks/billing/index.js +43 -10
- package/dist/blocks/billing/react/index.d.ts +2 -2
- package/dist/blocks/billing/react/index.js +1 -1
- package/dist/blocks/billing/react/server.d.ts +1 -1
- package/dist/blocks/billing/solid/index.d.ts +2 -2
- package/dist/blocks/billing/solid/index.js +1 -1
- package/dist/blocks/billing/svelte/index.d.ts +2 -2
- package/dist/blocks/billing/svelte/index.js +1 -1
- package/dist/blocks/billing/vue/index.d.ts +2 -2
- package/dist/blocks/billing/vue/index.js +1 -1
- package/dist/blocks/bookings/index.d.ts +3 -3
- package/dist/blocks/bookings/index.js +2 -2
- package/dist/blocks/bookings/react/index.d.ts +1 -1
- package/dist/blocks/bookings/react/index.js +3 -3
- package/dist/blocks/bookings/solid/index.d.ts +2 -2
- package/dist/blocks/bookings/solid/index.js +1 -1
- package/dist/blocks/bookings/svelte/index.d.ts +2 -2
- package/dist/blocks/bookings/svelte/index.js +1 -1
- package/dist/blocks/bookings/vue/index.d.ts +2 -2
- package/dist/blocks/bookings/vue/index.js +1 -1
- package/dist/blocks/bulk/index.d.ts +5 -5
- package/dist/blocks/bulk/index.js +3 -3
- package/dist/blocks/calendar/index.d.ts +3 -3
- package/dist/blocks/calendar/index.js +2 -2
- package/dist/blocks/calendar/react/index.d.ts +1 -1
- package/dist/blocks/calendar/react/index.js +3 -3
- package/dist/blocks/calendar/solid/index.d.ts +2 -2
- package/dist/blocks/calendar/solid/index.js +1 -1
- package/dist/blocks/calendar/svelte/index.d.ts +2 -2
- package/dist/blocks/calendar/svelte/index.js +1 -1
- package/dist/blocks/calendar/vue/index.d.ts +2 -2
- package/dist/blocks/calendar/vue/index.js +1 -1
- package/dist/blocks/catalog/index.d.ts +10 -10
- package/dist/blocks/catalog/index.js +8 -8
- package/dist/blocks/collections/index.d.ts +10 -10
- package/dist/blocks/collections/index.js +6 -6
- package/dist/blocks/comments/index.d.ts +4 -4
- package/dist/blocks/comments/index.js +3 -3
- package/dist/blocks/comments/react/index.d.ts +1 -1
- package/dist/blocks/comments/react/index.js +3 -3
- package/dist/blocks/comments/react/server.d.ts +1 -1
- package/dist/blocks/comments/solid/index.d.ts +2 -2
- package/dist/blocks/comments/solid/index.js +1 -1
- package/dist/blocks/comments/svelte/index.d.ts +2 -2
- package/dist/blocks/comments/svelte/index.js +1 -1
- package/dist/blocks/comments/vue/index.d.ts +2 -2
- package/dist/blocks/comments/vue/index.js +1 -1
- package/dist/blocks/connectors/index.d.ts +4 -4
- package/dist/blocks/connectors/index.js +7 -7
- package/dist/blocks/custom-fields/index.d.ts +6 -6
- package/dist/blocks/custom-fields/index.js +4 -4
- package/dist/blocks/data-lifecycle/index.d.ts +9 -9
- package/dist/blocks/data-lifecycle/index.js +7 -7
- package/dist/blocks/deals/index.d.ts +9 -9
- package/dist/blocks/deals/index.js +9 -9
- package/dist/blocks/documents/index.d.ts +4 -4
- package/dist/blocks/documents/index.js +4 -4
- package/dist/blocks/domains/index.d.ts +7 -7
- package/dist/blocks/domains/index.js +6 -6
- package/dist/blocks/drive/index.d.ts +9 -10
- package/dist/blocks/drive/index.js +20 -11
- package/dist/blocks/employees/index.d.ts +9 -9
- package/dist/blocks/employees/index.js +8 -8
- package/dist/blocks/engagements/index.d.ts +9 -9
- package/dist/blocks/engagements/index.js +5 -5
- package/dist/blocks/entitlements/index.d.ts +7 -7
- package/dist/blocks/entitlements/index.js +2 -2
- package/dist/blocks/entitlements/react/index.d.ts +2 -2
- package/dist/blocks/entitlements/solid/index.d.ts +2 -2
- package/dist/blocks/entitlements/svelte/index.d.ts +2 -2
- package/dist/blocks/entitlements/vue/index.d.ts +2 -2
- package/dist/blocks/flags/index.d.ts +8 -8
- package/dist/blocks/flags/index.js +6 -6
- package/dist/blocks/forms/index.d.ts +9 -9
- package/dist/blocks/forms/index.js +5 -5
- package/dist/blocks/forms/react/index.d.ts +1 -1
- package/dist/blocks/forms/solid/index.d.ts +2 -2
- package/dist/blocks/forms/svelte/index.d.ts +2 -2
- package/dist/blocks/forms/vue/index.d.ts +2 -2
- package/dist/blocks/hiring/index.d.ts +9 -9
- package/dist/blocks/hiring/index.js +6 -6
- package/dist/blocks/identities/index.d.ts +6 -6
- package/dist/blocks/identities/index.js +3 -3
- package/dist/blocks/imports/index.d.ts +6 -6
- package/dist/blocks/imports/index.js +3 -3
- package/dist/blocks/inbox/index.d.ts +5 -5
- package/dist/blocks/inbox/index.js +3 -3
- package/dist/blocks/inbox/react/index.d.ts +2 -2
- package/dist/blocks/inbox/react/server.d.ts +2 -2
- package/dist/blocks/inbox/solid/index.d.ts +2 -2
- package/dist/blocks/inbox/svelte/index.d.ts +2 -2
- package/dist/blocks/inbox/vue/index.d.ts +2 -2
- package/dist/blocks/index.d.ts +8 -8
- package/dist/blocks/index.js +3 -3
- package/dist/blocks/inventory/index.d.ts +9 -9
- package/dist/blocks/inventory/index.js +6 -6
- package/dist/blocks/invoices/index.d.ts +9 -9
- package/dist/blocks/invoices/index.js +8 -8
- package/dist/blocks/jobs/index.d.ts +61 -11
- package/dist/blocks/jobs/index.js +126 -13
- package/dist/blocks/knowledge/index.d.ts +3 -3
- package/dist/blocks/knowledge/index.js +2 -2
- package/dist/blocks/leave/index.d.ts +8 -8
- package/dist/blocks/leave/index.js +5 -5
- package/dist/blocks/memory/index.d.ts +4 -4
- package/dist/blocks/memory/index.js +6 -6
- package/dist/blocks/metrics/index.d.ts +7 -7
- package/dist/blocks/metrics/index.js +5 -5
- package/dist/blocks/mfa/index.d.ts +2 -2
- package/dist/blocks/mfa/index.js +1 -1
- package/dist/blocks/mfa/react/index.d.ts +1 -1
- package/dist/blocks/mfa/react/index.js +1 -1
- package/dist/blocks/mfa/react/server.d.ts +1 -1
- package/dist/blocks/mfa/react/server.js +1 -1
- package/dist/blocks/mfa/solid/index.d.ts +2 -2
- package/dist/blocks/mfa/solid/index.js +1 -1
- package/dist/blocks/mfa/svelte/index.d.ts +2 -2
- package/dist/blocks/mfa/svelte/index.js +1 -1
- package/dist/blocks/mfa/vue/index.d.ts +2 -2
- package/dist/blocks/mfa/vue/index.js +1 -1
- package/dist/blocks/notifications/index.d.ts +13 -13
- package/dist/blocks/notifications/index.js +11 -11
- package/dist/blocks/notifications/react/index.d.ts +1 -1
- package/dist/blocks/notifications/react/server.d.ts +1 -1
- package/dist/blocks/notifications/solid/index.d.ts +2 -2
- package/dist/blocks/notifications/svelte/index.d.ts +2 -2
- package/dist/blocks/notifications/vue/index.d.ts +2 -2
- package/dist/blocks/number-sequences/index.d.ts +5 -5
- package/dist/blocks/number-sequences/index.js +2 -2
- package/dist/blocks/oauth-server/index.d.ts +28 -8
- package/dist/blocks/oauth-server/index.js +24 -15
- package/dist/blocks/onboarding/index.d.ts +3 -3
- package/dist/blocks/onboarding/index.js +2 -2
- package/dist/blocks/onboarding/react/index.d.ts +1 -1
- package/dist/blocks/onboarding/react/index.js +2 -2
- package/dist/blocks/onboarding/react/server.d.ts +1 -1
- package/dist/blocks/onboarding/solid/index.d.ts +2 -2
- package/dist/blocks/onboarding/svelte/index.d.ts +2 -2
- package/dist/blocks/onboarding/vue/index.d.ts +2 -2
- package/dist/blocks/orders/index.d.ts +12 -12
- package/dist/blocks/orders/index.js +10 -10
- package/dist/blocks/organizations/index.d.ts +5 -5
- package/dist/blocks/organizations/index.js +4 -4
- package/dist/blocks/organizations/react/index.d.ts +1 -1
- package/dist/blocks/organizations/react/index.js +3 -3
- package/dist/blocks/organizations/react/server.d.ts +1 -1
- package/dist/blocks/organizations/solid/index.d.ts +2 -2
- package/dist/blocks/organizations/solid/index.js +1 -1
- package/dist/blocks/organizations/svelte/index.d.ts +2 -2
- package/dist/blocks/organizations/svelte/index.js +1 -1
- package/dist/blocks/organizations/vue/index.d.ts +2 -2
- package/dist/blocks/organizations/vue/index.js +1 -1
- package/dist/blocks/outbox/index.d.ts +4 -4
- package/dist/blocks/outbox/index.js +5 -5
- package/dist/blocks/parties/index.d.ts +9 -9
- package/dist/blocks/parties/index.js +4 -4
- package/dist/blocks/pipelines/index.d.ts +10 -10
- package/dist/blocks/pipelines/index.js +7 -7
- package/dist/blocks/profiles/index.d.ts +7 -7
- package/dist/blocks/profiles/index.js +5 -5
- package/dist/blocks/promotions/index.d.ts +9 -9
- package/dist/blocks/promotions/index.js +7 -7
- package/dist/blocks/push/index.d.ts +9 -9
- package/dist/blocks/push/index.js +4 -4
- package/dist/blocks/quotes/index.d.ts +9 -9
- package/dist/blocks/quotes/index.js +8 -8
- package/dist/blocks/rank/index.d.ts +6 -6
- package/dist/blocks/rank/index.js +3 -3
- package/dist/blocks/reactions/index.d.ts +4 -4
- package/dist/blocks/reactions/index.js +2 -2
- package/dist/blocks/reactions/react/index.d.ts +1 -1
- package/dist/blocks/reactions/react/index.js +2 -2
- package/dist/blocks/reactions/solid/index.d.ts +2 -2
- package/dist/blocks/reactions/solid/index.js +1 -1
- package/dist/blocks/reactions/svelte/index.d.ts +2 -2
- package/dist/blocks/reactions/svelte/index.js +1 -1
- package/dist/blocks/reactions/vue/index.d.ts +2 -2
- package/dist/blocks/reactions/vue/index.js +1 -1
- package/dist/blocks/relations/index.d.ts +8 -8
- package/dist/blocks/relations/index.js +4 -4
- package/dist/blocks/reminders/index.d.ts +10 -10
- package/dist/blocks/reminders/index.js +8 -8
- package/dist/blocks/reviews/index.d.ts +8 -8
- package/dist/blocks/reviews/index.js +5 -5
- package/dist/blocks/rules/index.d.ts +9 -9
- package/dist/blocks/rules/index.js +5 -5
- package/dist/blocks/rules/react/index.d.ts +2 -2
- package/dist/blocks/rules/react/index.js +2 -2
- package/dist/blocks/rules/solid/index.d.ts +2 -2
- package/dist/blocks/rules/svelte/index.d.ts +2 -2
- package/dist/blocks/rules/vue/index.d.ts +2 -2
- package/dist/blocks/saved-views/index.d.ts +3 -3
- package/dist/blocks/saved-views/index.js +1 -1
- package/dist/blocks/saved-views/react/index.d.ts +1 -1
- package/dist/blocks/saved-views/react/index.js +1 -1
- package/dist/blocks/saved-views/react/server.d.ts +1 -1
- package/dist/blocks/saved-views/solid/index.d.ts +2 -2
- package/dist/blocks/saved-views/solid/index.js +1 -1
- package/dist/blocks/saved-views/svelte/index.d.ts +2 -2
- package/dist/blocks/saved-views/svelte/index.js +1 -1
- package/dist/blocks/saved-views/vue/index.d.ts +2 -2
- package/dist/blocks/saved-views/vue/index.js +1 -1
- package/dist/blocks/search/index.d.ts +4 -4
- package/dist/blocks/search/index.js +3 -3
- package/dist/blocks/search/react/index.d.ts +1 -1
- package/dist/blocks/search/react/index.js +2 -2
- package/dist/blocks/search/react/server.d.ts +1 -1
- package/dist/blocks/search/solid/index.d.ts +2 -2
- package/dist/blocks/search/svelte/index.d.ts +2 -2
- package/dist/blocks/search/vue/index.d.ts +2 -2
- package/dist/blocks/service-principals/index.d.ts +8 -8
- package/dist/blocks/service-principals/index.js +6 -6
- package/dist/blocks/sessions/index.d.ts +2 -2
- package/dist/blocks/sessions/index.js +1 -1
- package/dist/blocks/sessions/react/index.d.ts +1 -1
- package/dist/blocks/sessions/react/index.js +1 -1
- package/dist/blocks/sessions/react/server.d.ts +1 -1
- package/dist/blocks/sessions/solid/index.d.ts +2 -2
- package/dist/blocks/sessions/solid/index.js +1 -1
- package/dist/blocks/sessions/svelte/index.d.ts +2 -2
- package/dist/blocks/sessions/svelte/index.js +1 -1
- package/dist/blocks/sessions/vue/index.d.ts +2 -2
- package/dist/blocks/sessions/vue/index.js +1 -1
- package/dist/blocks/settings/index.d.ts +4 -4
- package/dist/blocks/settings/index.js +3 -3
- package/dist/blocks/settings/react/index.d.ts +1 -1
- package/dist/blocks/settings/react/index.js +3 -3
- package/dist/blocks/settings/react/server.d.ts +1 -1
- package/dist/blocks/settings/solid/index.d.ts +2 -2
- package/dist/blocks/settings/solid/index.js +1 -1
- package/dist/blocks/settings/svelte/index.d.ts +2 -2
- package/dist/blocks/settings/svelte/index.js +1 -1
- package/dist/blocks/settings/vue/index.d.ts +2 -2
- package/dist/blocks/settings/vue/index.js +1 -1
- package/dist/blocks/share-links/index.d.ts +7 -7
- package/dist/blocks/share-links/index.js +3 -3
- package/dist/blocks/shared-signals/index.d.ts +8 -8
- package/dist/blocks/shared-signals/index.js +7 -7
- package/dist/blocks/signing-keys/index.d.ts +5 -5
- package/dist/blocks/signing-keys/index.js +47 -21
- package/dist/blocks/sla/index.d.ts +9 -9
- package/dist/blocks/sla/index.js +5 -5
- package/dist/blocks/sso/index.d.ts +7 -7
- package/dist/blocks/sso/index.js +4 -4
- package/dist/blocks/state-machine/index.d.ts +5 -5
- package/dist/blocks/state-machine/index.js +2 -2
- package/dist/blocks/tags/index.d.ts +3 -3
- package/dist/blocks/tags/index.js +2 -2
- package/dist/blocks/tags/react/index.d.ts +1 -1
- package/dist/blocks/tags/react/index.js +3 -3
- package/dist/blocks/tags/react/server.d.ts +1 -1
- package/dist/blocks/tags/solid/index.d.ts +2 -2
- package/dist/blocks/tags/solid/index.js +1 -1
- package/dist/blocks/tags/svelte/index.d.ts +2 -2
- package/dist/blocks/tags/svelte/index.js +1 -1
- package/dist/blocks/tags/vue/index.d.ts +2 -2
- package/dist/blocks/tags/vue/index.js +1 -1
- package/dist/blocks/targets/index.d.ts +7 -7
- package/dist/blocks/targets/index.js +5 -5
- package/dist/blocks/teams/index.d.ts +7 -7
- package/dist/blocks/teams/index.js +3 -3
- package/dist/blocks/templates/index.d.ts +10 -10
- package/dist/blocks/templates/index.js +7 -7
- package/dist/blocks/time-tracking/index.d.ts +9 -9
- package/dist/blocks/time-tracking/index.js +7 -7
- package/dist/blocks/trash/index.d.ts +8 -8
- package/dist/blocks/trash/index.js +4 -4
- package/dist/blocks/undo/index.d.ts +4 -4
- package/dist/blocks/undo/index.js +2 -2
- package/dist/blocks/undo/react/index.d.ts +1 -1
- package/dist/blocks/undo/react/server.d.ts +1 -1
- package/dist/blocks/undo/solid/index.d.ts +2 -2
- package/dist/blocks/undo/svelte/index.d.ts +2 -2
- package/dist/blocks/undo/vue/index.d.ts +2 -2
- package/dist/blocks/usage/index.d.ts +4 -4
- package/dist/blocks/usage/index.js +2 -2
- package/dist/blocks/usage/react/index.d.ts +1 -1
- package/dist/blocks/usage/react/index.js +2 -2
- package/dist/blocks/usage/react/server.d.ts +1 -1
- package/dist/blocks/usage/solid/index.d.ts +2 -2
- package/dist/blocks/usage/svelte/index.d.ts +2 -2
- package/dist/blocks/usage/vue/index.d.ts +2 -2
- package/dist/blocks/vercel-marketplace/index.d.ts +193 -0
- package/dist/blocks/vercel-marketplace/index.js +300 -0
- package/dist/blocks/versions/index.d.ts +8 -8
- package/dist/blocks/versions/index.js +4 -4
- package/dist/blocks/waitlist/index.d.ts +9 -9
- package/dist/blocks/waitlist/index.js +5 -5
- package/dist/blocks/webhooks/index.d.ts +16 -16
- package/dist/blocks/webhooks/index.js +15 -15
- package/dist/blocks/work-items/index.d.ts +9 -9
- package/dist/blocks/work-items/index.js +6 -6
- package/dist/blocks/workflow-builder/index.d.ts +8 -8
- package/dist/blocks/workflow-builder/index.js +2 -2
- package/dist/blocks/workflow-builder/react/index.d.ts +2 -2
- package/dist/blocks/workflow-builder/react/index.js +3 -3
- package/dist/blocks/workflow-builder/solid/index.d.ts +2 -2
- package/dist/blocks/workflow-builder/svelte/index.d.ts +2 -2
- package/dist/blocks/workflow-builder/vue/index.d.ts +2 -2
- package/dist/blocks/workflows/index.d.ts +5 -5
- package/dist/blocks/workflows/index.js +2 -2
- package/dist/blocks/workflows/react/index.d.ts +2 -2
- package/dist/blocks/workflows/react/index.js +2 -2
- package/dist/blocks/workflows/solid/index.d.ts +2 -2
- package/dist/blocks/workflows/svelte/index.d.ts +2 -2
- package/dist/blocks/workflows/vue/index.d.ts +2 -2
- package/dist/{bookings-EJAVAuVz.js → bookings-DQ7P888X.js} +5 -5
- package/dist/{storage-api-B4Ib2Zpo.d.ts → bucket-BbePDVwc.d.ts} +235 -219
- package/dist/{build-6jmaPAgx.js → build-C-D_vn0U.js} +7 -2
- package/dist/{build-Cm0T5MVG.js → build-CT6SPZkI.js} +1 -1
- package/dist/{calendar-1J1E5dLq.js → calendar-eqyuQAoy.js} +7 -7
- package/dist/chat-sdk/index.d.ts +6 -6
- package/dist/chat-sdk/index.js +3 -3
- package/dist/chat-sdk/react/index.d.ts +2 -2
- package/dist/chat-sdk/react/server.d.ts +2 -2
- package/dist/cli/{add-BhI_nXAo.js → add-BcOHumvq.js} +2 -2
- package/dist/cli/add-DnAyR9w_.js +1 -0
- package/dist/cli/{add-CUS0AiBh.js → add-TT72pQk6.js} +5 -5
- package/dist/cli/adopt-BuS-DC7_.js +1 -0
- package/dist/cli/{adopt-DwcU6CJd.js → adopt-mbB1bcIG.js} +6 -6
- package/dist/cli/{apply-DBXC0Z5I.js → apply-CiBFOFGw.js} +16 -22
- package/dist/cli/bin.js +1 -1
- package/dist/cli/{blocks-B15ltTFn.js → blocks-5-JGzwXX.js} +1 -1
- package/dist/cli/{blocks-BXeqIzWN.js → blocks-DeLQOlUK.js} +1 -1
- package/dist/cli/{cache-CPBYJAkb.js → cache-DQwgb3rg.js} +8 -3
- package/dist/cli/{catalog-Di15TkM2.js → catalog-Cm6BtquM.js} +2 -1
- package/dist/cli/{codemod-CrI33UR2.js → codemod-BzAMX4el.js} +2 -2
- package/dist/cli/{command-D_HI1mp1.js → command-dfdVhU_2.js} +39 -1
- package/dist/cli/{completion-Vry-Wjw8.js → completion-4lLjtI49.js} +1 -1
- package/dist/cli/{completion-En43UcyJ.js → completion-D4InNrxw.js} +2 -2
- package/dist/cli/{completion-DzYo025z.js → completion-zsp5s0zI.js} +2 -2
- package/dist/cli/{config-DsqQr5z3.js → config-CCyweX7Y.js} +1 -1
- package/dist/cli/{config-DyJgo2d9.js → config-DI6ielsx.js} +1 -1
- package/dist/cli/{config-Bi_UBxXl.js → config-yZ55rsKZ.js} +17 -5
- package/dist/cli/db-TRymMyAW.js +90 -0
- package/dist/cli/{design-edit-B-WsnhUF.js → design-edit-0U9iCTiS.js} +29 -2
- package/dist/cli/{detect-BeLVeNpA.js → detect-DQsVeBHg.js} +1 -1
- package/dist/cli/{doctor-wACp5w6N.js → doctor-DOfy6kjt.js} +332 -108
- package/dist/cli/{emit-j0zZ6NE_.js → emit-56LAG_Px.js} +11 -5
- package/dist/cli/{env-Ch99nTQw.js → env-B7TWPEt0.js} +1 -1
- package/dist/cli/{env-Cf5OTqbK.js → env-C8R7Nf0a.js} +2 -1
- package/dist/cli/env-Cmu99uKR.js +1 -0
- package/dist/cli/{env-2v9JrxSr.js → env-Dh5K5t2U.js} +33 -32
- package/dist/cli/{gen-BhquLu7l.js → gen-D3sC5jDn.js} +11 -11
- package/dist/cli/index.d.ts +3 -1
- package/dist/cli/index.js +10 -9
- package/dist/cli/{init-BwLTO6XG.js → init-DNomoycJ.js} +16 -22
- package/dist/cli/{introspect-B-gXAIqs.js → introspect-kYX06Q2g.js} +3 -3
- package/dist/cli/{keys-hwtdwdkT.js → keys-B8dIJwwi.js} +2 -2
- package/dist/cli/{live-BFfYoE0_.js → live-CkV3d3yp.js} +2 -2
- package/dist/cli/{mcp-Bdm2oGmL.js → mcp-DrxB2Wuw.js} +4 -4
- package/dist/cli/{metadata-DikbSOE0.js → metadata-BGkle6WM.js} +2 -2
- package/dist/cli/{migration-safety-LaGVPPuD.js → migration-safety-DjVpz2D6.js} +1 -1
- package/dist/cli/{module-migration-CLkZ8jpw.js → module-migration-CPhuiY8C.js} +1 -1
- package/dist/cli/{moved-B7UFO_OM.js → moved-BMQu1YNY.js} +1 -1
- package/dist/cli/{parse-CwV5a6dA.js → parse-QzDvMpXH.js} +1 -1
- package/dist/cli/{preset-DQ1DxMtI.js → preset-CfIs24cc.js} +1 -1
- package/dist/cli/run-Bck-p0MI.js +63 -0
- package/dist/cli/{run-DliGNdjI.js → run-BhJKAanr.js} +26 -5
- package/dist/cli/{run-BLJj7SuM.js → run-DRZ10srj.js} +52 -43
- package/dist/cli/{scaffold-6bv24GSP.js → scaffold-DoURlDEI.js} +3 -3
- package/dist/cli/{scaffold-DUz5fa-k.js → scaffold-mzy3OsN5.js} +1 -1
- package/dist/cli/seed-C5q4UUIL.js +1 -0
- package/dist/cli/{seed-CIJaL1Ao.js → seed-CIdg6s7m.js} +6 -5
- package/dist/cli/{shared-CNcvDOLt.js → shared-DKLuA1Tp.js} +2 -2
- package/dist/cli/{skills-CaxIQhzW.js → skills-D3zwIlGA.js} +1 -1
- package/dist/cli/{snapshot-Dvcx0BSl.js → snapshot-BBKFojqM.js} +4 -4
- package/dist/cli/{source-args-BNhagtpw.js → source-args-Cwo7zwvq.js} +8 -2
- package/dist/cli/{spec-DRDaIq8f.js → spec-DOgQUZwM.js} +1 -1
- package/dist/cli/{spec-BewE6r6J.js → spec-DZeIP9ta.js} +3 -3
- package/dist/cli/{sql-BCQt5TDs.js → sql-CL_Lbhwl.js} +2 -2
- package/dist/cli/{sql-BBkchli4.js → sql-DLOvvnBV.js} +5 -5
- package/dist/cli/stack-env-_uWWNHWq.js +87 -0
- package/dist/cli/{stack-status-LeEoCtV1.js → stack-status-_NUgd-g5.js} +43 -3
- package/dist/cli/{supabase-toml-DjLgBYEo.js → supabase-toml-BC5sNVKU.js} +1 -1
- package/dist/cli/{sync-CJ-ft-tl.js → sync-DBvknfOK.js} +2 -2
- package/dist/cli/{version-D1wM9DNb.js → version-B7akdvDv.js} +1 -1
- package/dist/cli/{write-Dp1XlAVM.js → write-VZljwoTB.js} +2 -2
- package/dist/client/index.d.ts +6 -6
- package/dist/client/index.js +4 -4
- package/dist/client/native/index.d.ts +6 -6
- package/dist/client/native/index.js +4 -4
- package/dist/{client-ByGlM0YF.d.ts → client-BAOZuBhz.d.ts} +4 -4
- package/dist/{client-fpvgtQKE.js → client-BDO6i2Oe.js} +2 -2
- package/dist/{client-Dk8gY9hi.d.ts → client-BJN0IMEp.d.ts} +2 -2
- package/dist/{client-Fi8CoJcs.d.ts → client-BMcjLG0V.d.ts} +13 -13
- package/dist/{client-B5nnqDmz.d.ts → client-BN_fXOs7.d.ts} +2 -2
- package/dist/{client-CpMv4-v5.d.ts → client-BONsuFYf.d.ts} +4 -4
- package/dist/{client-Diu2lPbg.d.ts → client-BPn9XhAM.d.ts} +7 -7
- package/dist/{client-B0rvMvA8.d.ts → client-BtC-r4hE.d.ts} +3 -3
- package/dist/{client-Cgxj38RS.d.ts → client-BuneNd-C.d.ts} +9 -9
- package/dist/{client-D0502FgY.js → client-CFKONrrU.js} +4 -4
- package/dist/{client-CvITjt-9.js → client-CHR8IBNG.js} +10 -2
- package/dist/{client-B9H4BZJh.d.ts → client-CHwNV8Kz.d.ts} +12 -12
- package/dist/{client-kKdkLGPB.d.ts → client-CLQHsa-2.d.ts} +2 -2
- package/dist/{client-C3dLIsJv.d.ts → client-CMxxwT3N.d.ts} +9 -9
- package/dist/{client-C597NIlL.d.ts → client-CU7aNN_B.d.ts} +8 -8
- package/dist/{client-DZXFDaQE.d.ts → client-CYEdJKjk.d.ts} +6 -6
- package/dist/{client-LVa6yC9u.d.ts → client-CYhSGlCN.d.ts} +5 -5
- package/dist/{client-CWs3X4g1.js → client-C_-NZRrg.js} +1 -1
- package/dist/{client-kI6vCKVI.js → client-CcPxbHeT.js} +2 -2
- package/dist/{client-AxwF58Eo.js → client-CosiUrUb.js} +1 -1
- package/dist/{client-CsRpAyIv.d.ts → client-D3gRTNSi.d.ts} +2 -2
- package/dist/{client-D727oIVC.js → client-D7T7OLiw.js} +4 -4
- package/dist/{client-9zIKhf5D.d.ts → client-DB34f_7i.d.ts} +3 -3
- package/dist/{client-CjyTNdt1.d.ts → client-DCawyopp.d.ts} +5 -5
- package/dist/{client-BtBkVSk2.d.ts → client-Dqa4XyJ5.d.ts} +7 -7
- package/dist/{client-BLKpcAs0.d.ts → client-Dr5h2r9r.d.ts} +3 -3
- package/dist/{client-BO9fQgBB.d.ts → client-DrTqKgvy.d.ts} +4 -4
- package/dist/{client-13Ii0c0P.js → client-DyfWYU8S.js} +2 -2
- package/dist/{client-iB5axfa0.js → client-Dz1jWDA2.js} +3 -3
- package/dist/{client-jvtwGFy4.js → client-DzTtOVRR.js} +2 -2
- package/dist/{client-B_r4denm.d.ts → client-GCCRI9ge.d.ts} +3 -3
- package/dist/{client-DR_YEGnc.d.ts → client-P6v3h7vh.d.ts} +2 -2
- package/dist/{client-D9zBl9PT.d.ts → client-P8l8ncxV.d.ts} +7 -7
- package/dist/{client-CFeWXNXy.js → client-UnM3e32l.js} +2 -2
- package/dist/{client-DG7FwgZD.js → client-arq4daO_.js} +1 -1
- package/dist/{client-CmHsfDHU.js → client-eCDPjOMo.js} +6 -6
- package/dist/{client-rp7YfOg1.js → client-iaFm0aVf.js} +1 -1
- package/dist/{client-WXJwUhr1.d.ts → client-kWg4OqIr.d.ts} +5 -5
- package/dist/{client-B7LCXnnY.d.ts → client-tvG258_1.d.ts} +6 -6
- package/dist/{client-BaynD5V-.d.ts → client-wKmX-f3r.d.ts} +7 -7
- package/dist/{cloud-event-bwsBwVNG.d.ts → cloud-event-DXkNoI6v.d.ts} +1 -1
- package/dist/{codecs-C7E_OoiC.js → codecs-D-rpDifG.js} +3 -3
- package/dist/{codecs-Bm46sVxr.d.ts → codecs-RwFNK8Jh.d.ts} +2 -2
- package/dist/{codegen-2m4SKVdi.d.ts → codegen-C64C0NZG.d.ts} +13 -2
- package/dist/{comments-N7Bi-oTW.js → comments-CV5O8q50.js} +5 -5
- package/dist/commerce/index.d.ts +2 -2
- package/dist/commerce/index.js +6 -6
- package/dist/{compiler-C6E3WwIi.d.ts → compiler-D_Gjpw_O.d.ts} +2 -2
- package/dist/{compose-CO_cljl3.js → compose-CP0ss-cQ.js} +3 -3
- package/dist/{composite-CPV0thLs.js → composite-1kPAxXto.js} +3 -3
- package/dist/{composite-DMMA_Whg.d.ts → composite-DzvBL5nb.d.ts} +13 -13
- package/dist/config/index.d.ts +4 -4
- package/dist/config/index.js +2 -2
- package/dist/{config-C4RQDF6t.js → config-DHhQmmuD.js} +22 -1
- package/dist/{config-CkyahUjo.js → config-NQmw_wsk.js} +1 -1
- package/dist/{connector-Cp8CqssJ.d.ts → connector-D9NMNkv0.d.ts} +1 -1
- package/dist/{connectors-CZdfZcIg.d.ts → connectors-BwPNt-ZG.d.ts} +7 -7
- package/dist/{context-BDDgjoxz.js → context-BiwgsycK.js} +1 -1
- package/dist/{context-CCfX2szU.d.ts → context-Cv3KlxWY.d.ts} +2 -2
- package/dist/{controller-CCb9tHw_.d.ts → controller-BZhiIb-N.d.ts} +1 -1
- package/dist/cors-h_v7TPxl.js +24 -0
- package/dist/cors-kLq6VM06.d.ts +15 -0
- package/dist/create/index.d.ts +25 -3
- package/dist/create/index.js +1002 -915
- package/dist/create/supabase/index.d.ts +1 -1
- package/dist/credentials/index.d.ts +5 -5
- package/dist/credentials/index.js +8 -8
- package/dist/{cron-CUaKTjWC.js → cron-BHdXZFsJ.js} +1 -1
- package/dist/{cron-route-BsgbJ-g4.js → cron-route-mTvWhork.js} +3 -3
- package/dist/{define-CMcokcZz.js → define-Bu1v781m.js} +82 -16
- package/dist/{define-DXTC706J.d.ts → define-DYZnvAbs.d.ts} +96 -43
- package/dist/{define-block-BlHQxDIQ.d.ts → define-block-BHxLHLys.d.ts} +7 -7
- package/dist/{delegation-Dt8hMJWu.js → delegation-B7uNnz6z.js} +2 -2
- package/dist/{documents-BYM2viS0.d.ts → documents-CqtVr2fg.d.ts} +4 -4
- package/dist/edge/index.d.ts +27 -38
- package/dist/edge/index.js +12 -32
- package/dist/elysia/index.d.ts +1 -1
- package/dist/elysia/index.js +1 -1
- package/dist/{embeddings-Da0w4A_0.d.ts → embeddings-CKhygw4C.d.ts} +1 -1
- package/dist/{ended-EcTtzzQJ.d.ts → ended-De6H52nX.d.ts} +2 -2
- package/dist/{entitlements-AmYp2KHX.js → entitlements-C8UvF1Rz.js} +3 -3
- package/dist/{entitlements-Bn7BTnbg.d.ts → entitlements-CtBGXb3B.d.ts} +2 -2
- package/dist/{envelope--7d0Q3Se.js → envelope-C4Z55LKW.js} +4 -4
- package/dist/{errors-8i6tSICm.js → errors-BV1SKTVs.js} +15 -1
- package/dist/{errors-7MqM7bbV.js → errors-D3BR8iUk.js} +2 -2
- package/dist/{escape-like-AUEPn-C5.d.ts → escape-like-B339PlP-.d.ts} +1 -1
- package/dist/eve/index.d.ts +5 -5
- package/dist/eve/index.js +2 -2
- package/dist/{eve-BcEr_hPo.d.ts → eve-B6ru2Bt4.d.ts} +2 -2
- package/dist/events/index.d.ts +3 -3
- package/dist/{events-CtAHxPal.d.ts → events-P3raDX2E.d.ts} +3 -3
- package/dist/{executor-CHRwEYqt.d.ts → executor-BWgJNbGh.d.ts} +1 -1
- package/dist/{executor-Cex-1PFp.js → executor-BiB0wMBA.js} +4 -4
- package/dist/{executor-BicyP8Nl.d.ts → executor-BnMC0lj3.d.ts} +2 -2
- package/dist/{executor-CIxyatuB.d.ts → executor-CvsNcQsa.d.ts} +3 -3
- package/dist/{executor-aKUo_Xyb.js → executor-CxGQiQN_.js} +3 -3
- package/dist/{executor-DzJQVTE2.d.ts → executor-D1hECPGG.d.ts} +1 -1
- package/dist/expo/index.d.ts +11 -9
- package/dist/expo/index.js +42 -7
- package/dist/expo-sqlite/index.d.ts +3 -3
- package/dist/expo-sqlite/index.js +2 -2
- package/dist/{field-errors-nFnYWvB0.d.ts → field-errors-Z-sgsdoN.d.ts} +7 -7
- package/dist/{filter-evaluate-CEm52E5s.d.ts → filter-evaluate-BJcaL3o1.d.ts} +1 -1
- package/dist/{filter-query-D3wOD1P_.d.ts → filter-query-Bc_Qa8V_.d.ts} +1 -1
- package/dist/{flags-Dz5PIzFU.d.ts → flags-6KK6Vqkr.d.ts} +3 -3
- package/dist/{flags-CtSrkVuW.js → flags-aUR7Rod6.js} +1 -1
- package/dist/flags-sdk/index.d.ts +1 -1
- package/dist/flags-sdk/index.js +2 -2
- package/dist/{framework-C2oL4OaO.d.ts → framework-BQhTsLX-.d.ts} +7 -7
- package/dist/{framework-Cfm0IspZ.js → framework-C6PKBgme.js} +2 -2
- package/dist/{function-contract-B4c0XuTU.d.ts → function-contract-DWqFl_QO.d.ts} +1 -1
- package/dist/{gateway-CJL6ZG17.d.ts → gateway-Bq_tWwxE.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/{hmac-DCud0myt.js → hmac-BgpThYQW.js} +2 -1
- package/dist/hono/index.d.ts +34 -25
- package/dist/hono/index.js +18 -12
- package/dist/{http-BF-V0CUF.js → http-C7trc6uN.js} +2 -2
- package/dist/{impersonation-CDeCzZP6.js → impersonation-DxU6yHJV.js} +1 -1
- package/dist/{inbox-BaUJgHOF.d.ts → inbox-Du5aPwKB.d.ts} +4 -4
- package/dist/{index-DTQbC3CW.d.ts → index-1Vsg-7YV.d.ts} +1 -1
- package/dist/{index-8xwnaWHY.d.ts → index-BJLPQr2s.d.ts} +38 -5
- package/dist/{index-DL8z_oDo.d.ts → index-BpyBH5O2.d.ts} +4 -4
- package/dist/{index-Ck4oK5vV.d.ts → index-C-_fs7EI.d.ts} +8 -8
- package/dist/{index-BurdFUXr.d.ts → index-CXFf-c-j.d.ts} +7 -7
- package/dist/{index-MCXVzkXs.d.ts → index-Cm2-g_4H.d.ts} +5 -5
- package/dist/{index-DcijDfh1.d.ts → index-DTQSeHx2.d.ts} +4 -4
- package/dist/{index-D1kMyNc7.d.ts → index-Hc4tetmB.d.ts} +2 -2
- package/dist/{index-gXy3R1Uq.d.ts → index-QWTq2o31.d.ts} +1 -1
- package/dist/{index-Cckxs8IE.d.ts → index-XcTBR4Gb.d.ts} +3 -3
- package/dist/{index-DMONTkSf.d.ts → index-k-rrfG1g.d.ts} +2 -2
- package/dist/{index-Co0YsJTk.d.ts → index-wTnPJUhv.d.ts} +2 -2
- package/dist/index.d.ts +13 -13
- package/dist/index.js +10 -10
- package/dist/jwks-cache-C4rA69hD.js +49 -0
- package/dist/{jws-milwSg7E.js → jws-CwBB5QAT.js} +5 -3
- package/dist/{kit-BlcEFQql.d.ts → kit-De-EVRhw.d.ts} +4 -4
- package/dist/{kit-gqwkVhGU.js → kit-LTbHrWWD.js} +6 -6
- package/dist/{knowledge-BYtgA52P.d.ts → knowledge-B5zdpDD-.d.ts} +6 -6
- package/dist/{knowledge-CSNKLX-s.js → knowledge-BbdXOJvY.js} +4 -4
- package/dist/lint/index.d.ts +1 -1
- package/dist/lint/index.js +47 -2
- package/dist/list/index.d.ts +3 -3
- package/dist/{list-query-DWJIiVz_.d.ts → list-query-aXr2WkGA.d.ts} +5 -5
- package/dist/mcp/index.d.ts +21 -21
- package/dist/mcp/index.js +10 -10
- package/dist/mcp/sdk/index.d.ts +17 -17
- package/dist/mcp/sdk/index.js +5 -5
- package/dist/{messages-Cx4ttLJJ.js → messages-D5nIfCCf.js} +2 -2
- package/dist/{mfa-DtflCXEt.d.ts → mfa-YzkRjNad.d.ts} +1 -1
- package/dist/{model-messages-CTu-6kBu.js → model-messages-CIdqdUtk.js} +1 -1
- package/dist/{money-codec-DCGgzO26.js → money-codec-C21MWw50.js} +2 -2
- package/dist/nestjs/index.d.ts +2 -2
- package/dist/nestjs/index.js +1 -1
- package/dist/next/index.d.ts +34 -29
- package/dist/next/index.js +14 -14
- package/dist/node/index.d.ts +2 -2
- package/dist/node/index.js +1 -1
- package/dist/{onboarding-viTTNWUp.js → onboarding-Du6kCmhF.js} +2 -2
- package/dist/openapi/index.d.ts +2 -2
- package/dist/openapi/index.js +2 -2
- package/dist/{operations-BtuQRwTJ.d.ts → operations-DQCWqkt3.d.ts} +1 -1
- package/dist/{options-CZk_fbbg.js → options-BCrqe3HH.js} +2 -1
- package/dist/options-CEMawFrr.js +5 -0
- package/dist/options-RKYdmIdV.js +5 -0
- package/dist/{options-CbSOj53r.d.ts → options-ZQzNKKBS.d.ts} +1 -1
- package/dist/{organizations-Bxrm32IG.js → organizations-CO2qg44D.js} +6 -6
- package/dist/orpc/index.d.ts +18 -18
- package/dist/orpc/index.js +7 -7
- package/dist/otel/index.d.ts +2 -2
- package/dist/otel/index.js +5 -5
- package/dist/{outbox-BCGHl9X6.d.ts → outbox-B1hZ7PPY.d.ts} +6 -6
- package/dist/{payments-h45bswA-.js → payments-CzjCdIcz.js} +1 -1
- package/dist/{plugin-D5OIaP93.d.ts → plugin-D-95Q0w0.d.ts} +3 -3
- package/dist/plugins/actor/index.d.ts +1 -1
- package/dist/plugins/actor/index.js +1 -1
- package/dist/plugins/rules/index.d.ts +2 -2
- package/dist/plugins/rules/index.js +1 -1
- package/dist/plugins/soft-delete/index.d.ts +3 -3
- package/dist/plugins/soft-delete/index.js +2 -2
- package/dist/plugins/tenant/index.d.ts +2 -2
- package/dist/plugins/tenant/index.js +2 -2
- package/dist/plugins/timestamps/index.d.ts +1 -1
- package/dist/plugins/timestamps/index.js +1 -1
- package/dist/plugins/validation/index.d.ts +2 -2
- package/dist/plugins/validation/index.js +3 -3
- package/dist/{pool-BBi4mot3.d.ts → pool-cM3rpOQr.d.ts} +3 -3
- package/dist/{pool-errors-C94tPR_G.js → pool-errors-CGqvTQOC.js} +2 -2
- package/dist/{ports-Dcnuo3HT.d.ts → ports-BCDIbC_U.d.ts} +2 -2
- package/dist/{ports-B53rB7zg.d.ts → ports-P0A5wo_-.d.ts} +11 -11
- package/dist/{ports-Bcdppx0G.js → ports-aALjot-D.js} +11 -7
- package/dist/postgres/index.d.ts +5 -5
- package/dist/postgres/index.js +3 -3
- package/dist/{postgrest-D6fEMsp4.d.ts → postgrest-CjnO1hbr.d.ts} +1 -1
- package/dist/powersync/index.d.ts +4 -4
- package/dist/powersync/index.js +4 -4
- package/dist/powersync/react/index.d.ts +3 -3
- package/dist/powersync/react/index.js +1 -1
- package/dist/preset/index.d.ts +4 -4
- package/dist/preset/index.js +3 -3
- package/dist/{preset-BBrL6_Ln.js → preset-Cf0T9GRt.js} +49 -6
- package/dist/{problem-CEjyhV5T.d.ts → problem-DCDIQiTA.d.ts} +1 -1
- package/dist/{problem-pIiL3WbE.js → problem-JRCohp1j.js} +1 -1
- package/dist/{provider-DKh2xFZb.js → provider-C-Ti38J6.js} +1 -1
- package/dist/{provider-CQ1SrhLa.d.ts → provider-DXgx5oSA.d.ts} +2 -2
- package/dist/{push-token-CDMgWT13.d.ts → push-token-y1Gnz5bQ.d.ts} +1 -1
- package/dist/query/index.d.ts +2 -2
- package/dist/{rank-result-Dngpt2n5.d.ts → rank-result-BcYfDA0x.d.ts} +1 -1
- package/dist/{rank-result-oUF1DYBm.js → rank-result-DtQuIvob.js} +2 -2
- package/dist/{rate-limit-BtbddDnE.js → rate-limit-DVZ7qIzW.js} +1 -1
- package/dist/{rate-limit-ByfWNX9N.js → rate-limit-I3AncmM8.js} +8 -8
- package/dist/{rate-limit-C88MEAOm.d.ts → rate-limit-c6c1mB6R.d.ts} +2 -2
- package/dist/react/index.d.ts +8 -8
- package/dist/react/index.js +2 -2
- package/dist/react/native/index.d.ts +1 -1
- package/dist/react/native/index.js +1 -1
- package/dist/react/server.d.ts +9 -9
- package/dist/react/server.js +2 -2
- package/dist/react/session.d.ts +2 -2
- package/dist/{react-BcKACxsj.js → react-DzukE6Wp.js} +3 -3
- package/dist/react-router/index.d.ts +11 -11
- package/dist/react-router/index.js +6 -6
- package/dist/{read-set-PWiJfv6S.js → read-set-DeesfeL_.js} +2 -2
- package/dist/realtime/index.d.ts +6 -6
- package/dist/realtime/index.js +2 -2
- package/dist/{refusal-Bdr1k47u.d.ts → refusal-C7geIBRl.d.ts} +1 -1
- package/dist/{refusal-Ch-u9dVd.js → refusal-CFpfmjcS.js} +4 -4
- package/dist/{resolve-CAR9oaKW.js → resolve-AtncaPTU.js} +17 -9
- package/dist/{resolve-7atr-wWr.d.ts → resolve-Ceft-18-.d.ts} +9 -5
- package/dist/{resource-CHGOmg1O.js → resource-Bdkqi8jo.js} +6 -6
- package/dist/{resource-DxcgtHq6.d.ts → resource-DYEtc-KN.d.ts} +1 -1
- package/dist/{resource-execute-C45ICrN9.d.ts → resource-execute-Bxvgmx-n.d.ts} +2 -2
- package/dist/{resource-types-CC59gMHE.d.ts → resource-types-LW1i5-h3.d.ts} +6 -6
- package/dist/{resources-B7htXQeg.js → resources-Ck7itNeX.js} +3 -3
- package/dist/{resources-B71O7EVQ.d.ts → resources-D3_FAz_H.d.ts} +2 -2
- package/dist/{respond-Cdg5ibH5.d.ts → respond-BSL36dQp.d.ts} +3 -3
- package/dist/{respond-Dpx48ATq.js → respond-Bhp3G__q.js} +5 -5
- package/dist/{result-Cj3yWhjH.d.ts → result-BREt7qOh.d.ts} +15 -1
- package/dist/{result-COkvI9t5.js → result-DIeYscA3.js} +1 -1
- package/dist/{rrule-zBh3CA1r.js → rrule-Cw4x4Pf_.js} +1 -1
- package/dist/{rules-4of_Fq-6.js → rules-BiQgmZ_U.js} +4 -4
- package/dist/{sales-lines-CymdiwYd.js → sales-lines-CQ1iC6QM.js} +3 -3
- package/dist/{sales-shared-DjCuN8xG.js → sales-shared-CDSytDEn.js} +2 -2
- package/dist/{search-LbjCylX5.js → search-ZP13UTT4.js} +3 -3
- package/dist/server/index.d.ts +38 -30
- package/dist/server/index.js +19 -64
- package/dist/{server-types-fXwJoFjt.d.ts → server-types-fLdep4gb.d.ts} +50 -30
- package/dist/{session-Djo5t4KQ.d.ts → session-DObioXpX.d.ts} +11 -11
- package/dist/{settings-DxXfDUmh.js → settings-BiHDFglz.js} +5 -5
- package/dist/{shared-9B02lczf.js → shared-C9zvURqC.js} +1 -1
- package/dist/{shared-as0EG51f.js → shared-D5Djh43x.js} +1 -1
- package/dist/{sign-in-D0xN6E_l.js → sign-in-z2BaBdps.js} +10 -3
- package/dist/{signatures-BMdJ7neI.d.ts → signatures-BXlDXV3D.d.ts} +1 -1
- package/dist/{signatures-C9CGYZS1.js → signatures-CeIoAelK.js} +5 -5
- package/dist/{signers-BjSgNAXP.d.ts → signers-BwKV-9S6.d.ts} +6 -6
- package/dist/{signing-keys-Ccr86Y2C.d.ts → signing-keys-v2MRYkDF.d.ts} +20 -5
- package/dist/solid/index.d.ts +8 -8
- package/dist/solid/index.js +1 -1
- package/dist/{solid-controller-CZrt1Tg6.d.ts → solid-controller-CWotGxcG.d.ts} +1 -1
- package/dist/solid-start/index.d.ts +11 -11
- package/dist/solid-start/index.js +5 -5
- package/dist/spec/index.d.ts +3 -3
- package/dist/spec/index.js +3 -3
- package/dist/sql/index.d.ts +4 -4
- package/dist/sql/index.js +2 -2
- package/dist/{sql-BQshMgmB.js → sql-BPKRNutj.js} +3 -3
- package/dist/{sql-CgTZOQZ7.js → sql-CT1Jnwp8.js} +1919 -698
- package/dist/{sso-CwAnve68.js → sso-BaU_6ePE.js} +4 -4
- package/dist/{sso-B5ZoEsXE.d.ts → sso-Bu0mVh0V.d.ts} +4 -4
- package/dist/ssr/index.d.ts +4 -4
- package/dist/ssr/index.js +3 -3
- package/dist/{standard-DZmwmIhV.js → standard-B1BigegP.js} +2 -2
- package/dist/{standard-C3_AAF3g.d.ts → standard-BcUQuUgu.d.ts} +1 -1
- package/dist/{stats-CUhqw6Ev.js → stats-Di5VAsYU.js} +4 -4
- package/dist/storage/index.d.ts +3 -3
- package/dist/storage/index.js +17 -6
- package/dist/{store-B5qYKsTh.d.ts → store-B18bIvKc.d.ts} +1 -1
- package/dist/streams/index.d.ts +3 -3
- package/dist/streams/index.js +3 -3
- package/dist/streams/redis/index.d.ts +1 -1
- package/dist/streams/redis/index.js +2 -2
- package/dist/{subject-readers-81xiWh4M.d.ts → subject-readers-BUChuOxL.d.ts} +2 -2
- package/dist/{subject-readers-DDyPTIOr.js → subject-readers-BpwUFJtp.js} +1 -1
- package/dist/{support-BsqhV6jP.js → support-C2wPYwD7.js} +8 -8
- package/dist/{support-view-CznLe4jq.d.ts → support-view-Bj_lZ8Wr.d.ts} +1 -1
- package/dist/svelte/index.d.ts +7 -7
- package/dist/svelte/index.js +1 -1
- package/dist/{svelte-controller-DDbju9CW.d.ts → svelte-controller-sS4X66yL.d.ts} +1 -1
- package/dist/sveltekit/index.d.ts +13 -13
- package/dist/sveltekit/index.js +7 -7
- package/dist/{tags-DGldvcA4.js → tags-BqgaxCnv.js} +5 -5
- package/dist/{tags-7NHyD1P8.d.ts → tags-BrGopDVG.d.ts} +1 -1
- package/dist/tanstack-db/index.d.ts +2 -2
- package/dist/tanstack-db/supabase/index.d.ts +2 -2
- package/dist/tanstack-start/index.d.ts +11 -11
- package/dist/tanstack-start/index.js +5 -5
- package/dist/{tax-DDZUB_oc.d.ts → tax-DMWDUzKt.d.ts} +2 -2
- package/dist/{tax-DZDpMMRw.js → tax-wm9g2mD2.js} +2 -2
- package/dist/{tee-CdRV1tcj.js → tee-Cw-iJAWL.js} +1 -1
- package/dist/{template-DdgYjIZ5.js → template-Dw3dTmKe.js} +1 -1
- package/dist/{temporal-required-DqRzr7i0.js → temporal-required-nfZ87U-0.js} +1 -1
- package/dist/{tenant-DW_GmsW4.d.ts → tenant-DZMLVuyQ.d.ts} +2 -2
- package/dist/testing/index.d.ts +134 -60
- package/dist/testing/index.js +251 -120
- package/dist/{topic-Dgs-eSYQ.d.ts → topic-DAY_HOX2.d.ts} +20 -6
- package/dist/{topic-DB-1YTMj.js → topic-mee21pux.js} +85 -17
- package/dist/{types-C_GN-4ed.d.ts → types-BA1eTvy4.d.ts} +5 -5
- package/dist/{types-P1S1cj6N.d.ts → types-BEEFkNFY.d.ts} +7 -7
- package/dist/{types-DZj8CZMH.d.ts → types-Bels39_u.d.ts} +10 -10
- package/dist/{types-BO8lVTun.d.ts → types-BrpW5ixT.d.ts} +8 -1
- package/dist/{types-DM8q3IOr.d.ts → types-DOC7wnh6.d.ts} +17 -8
- package/dist/{types-DOaUIJxW.d.ts → types-D_2rClz-.d.ts} +5 -5
- package/dist/{undo-0qM13zul.js → undo-B5LgpGLy.js} +4 -4
- package/dist/{undo-D42sPjCf.d.ts → undo-BsdYRox7.d.ts} +3 -3
- package/dist/upload-claim-BBFCZbBF.js +33 -0
- package/dist/{usage-CnQHSM_r.d.ts → usage-C504GF55.d.ts} +23 -5
- package/dist/{usage-BrJGPvCq.js → usage-DdqT13_X.js} +14 -3
- package/dist/{vault-EnOQJWjn.d.ts → vault-ClkzMGTP.d.ts} +3 -3
- package/dist/vercel-connect/index.d.ts +1 -1
- package/dist/vercel-connect/index.js +2 -2
- package/dist/{verify-3NLjUIER.d.ts → verify-DU4p9-Ve.d.ts} +4 -4
- package/dist/{verify-C9D_jjsQ.js → verify-DnU-uWU2.js} +5 -5
- package/dist/{version-Bxj_xcUY.js → version-DSWxci83.js} +1 -1
- package/dist/{view-DZ63nqwt.js → view-CYX1wsgp.js} +3 -3
- package/dist/{view-SuASaomx.d.ts → view-KQhe6eNc.d.ts} +3 -3
- package/dist/vue/index.d.ts +8 -8
- package/dist/vue/index.js +1 -1
- package/dist/{vue-controller-D_ohttBZ.d.ts → vue-controller-BUo1oove.d.ts} +1 -1
- package/dist/{watch-D1wwzZ04.d.ts → watch-5btote1y.d.ts} +6 -6
- package/dist/{watch-Blj1mQ9n.js → watch-BAuIzC2r.js} +1 -1
- package/dist/{watch-topic-D-rpUg5n.d.ts → watch-topic-C79ZW5-R.d.ts} +1 -1
- package/dist/{wire-DEY0ajW9.js → wire-BCJxCtHS.js} +2 -2
- package/dist/{workflow-builder-C5DBN7yq.js → workflow-builder-CynLqc6H.js} +7 -7
- package/dist/workflow-sdk/builder/index.d.ts +3 -3
- package/dist/workflow-sdk/builder/index.js +1 -1
- package/dist/workflow-sdk/index.d.ts +1 -1
- package/dist/workflow-sdk/index.js +1 -1
- package/dist/workflow-sdk/world/index.d.ts +1 -1
- package/dist/workflow-sdk/world/index.js +6 -6
- package/dist/{workflow-sdk-Di5pmCAu.d.ts → workflow-sdk-CWdCWj7M.d.ts} +3 -3
- package/dist/{workflow-sdk-vjDWlnfX.js → workflow-sdk-QnnzIQRc.js} +2 -2
- package/dist/{workflow-sdk-world-DPMdBfzn.js → workflow-sdk-world-QzcxaaCD.js} +1 -1
- package/dist/{workflows-DJXoxDZH.d.ts → workflows-DQBCzrHC.d.ts} +4 -4
- package/dist/{workflows-DzdX28KN.js → workflows-H9qJge3f.js} +5 -5
- package/dist/yjs/index.d.ts +3 -3
- package/dist/yjs/index.js +3 -3
- package/package.json +10 -1
- package/schemas/cli-commands-v1.json +15 -0
- package/schemas/config-v1.json +47 -3
- package/schemas/doctor-report-v1.json +4 -0
- package/schemas/snapshot-v2.json +4 -0
- package/dist/cli/add-ojbcMxyp.js +0 -1
- package/dist/cli/adopt-D0ASVx2G.js +0 -1
- package/dist/cli/env-DkBe35Rv.js +0 -1
- package/dist/cli/seed-ClGWseBT.js +0 -1
|
@@ -1,25 +1,28 @@
|
|
|
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-dfdVhU_2.js";
|
|
2
2
|
import { i as plain } from "./style-2JfIPVMQ.js";
|
|
3
|
-
import { t as VERSION } from "./version-
|
|
3
|
+
import { t as VERSION } from "./version-B7akdvDv.js";
|
|
4
4
|
import { n as CliError, r as errorText } from "./errors-Caiz_0so.js";
|
|
5
5
|
import { a as sameText, t as display } from "./io-BiPX-_J1.js";
|
|
6
|
-
import { t as CACHE_DIR } from "./cache-
|
|
6
|
+
import { t as CACHE_DIR } from "./cache-DQwgb3rg.js";
|
|
7
7
|
import { t as byCodePoint } from "./compare-BmIWVEui.js";
|
|
8
8
|
import { h as satisfies, m as peerVersions, t as MetadataRejectedError } from "./typegen--TfvOPLh.js";
|
|
9
9
|
import { t as isRecord } from "./guards-CUlDNYZs.js";
|
|
10
|
-
import { c as configFor, s as notNullTag } from "./emit-
|
|
11
|
-
import { _ as withoutStrings, a as METADATA_GAPS_TEXT, c as accessModule, d as RLS_RULES, f as appliesTo, g as policyHelpers, h as functionObject, l as entitlementsModule, m as functionBody, p as escape$1, s as AUTHORIZATION_RULES, u as COMMANDS$1, v as advisorRule, x as renderFiles, y as splinterTables } from "./run-
|
|
12
|
-
import { D as providerLabel, a as migrationModules, i as migrationHolds, r as latestMigration, t as MODULES_SUFFIX, v as migrationsDir, x as compiledReadSets, y as moduleLayoutFor } from "./module-migration-
|
|
13
|
-
import { l as stdinDatabaseUrl } from "./config-
|
|
14
|
-
import { a as findRepoRoot, c as httpHooks, d as readSupabaseToml, f as schemaPaths, h as tomlGet, i as diffEngine, l as migrationCommand, n as declarativeSchemasDir, p as sqlWorkflow, u as pgFunctionHooks } from "./supabase-toml-
|
|
10
|
+
import { c as configFor, s as notNullTag } from "./emit-56LAG_Px.js";
|
|
11
|
+
import { _ as withoutStrings, a as METADATA_GAPS_TEXT, c as accessModule, d as RLS_RULES, f as appliesTo, g as policyHelpers, h as functionObject, l as entitlementsModule, m as functionBody, p as escape$1, s as AUTHORIZATION_RULES, u as COMMANDS$1, v as advisorRule, x as renderFiles, y as splinterTables } from "./run-BhJKAanr.js";
|
|
12
|
+
import { D as providerLabel, a as migrationModules, i as migrationHolds, r as latestMigration, t as MODULES_SUFFIX, v as migrationsDir, x as compiledReadSets, y as moduleLayoutFor } from "./module-migration-CPhuiY8C.js";
|
|
13
|
+
import { l as stdinDatabaseUrl } from "./config-yZ55rsKZ.js";
|
|
14
|
+
import { a as findRepoRoot, c as httpHooks, d as readSupabaseToml, f as schemaPaths, h as tomlGet, i as diffEngine, l as migrationCommand, n as declarativeSchemasDir, p as sqlWorkflow, u as pgFunctionHooks } from "./supabase-toml-BC5sNVKU.js";
|
|
15
|
+
import { t as PROCESS_ENV } from "./env-C8R7Nf0a.js";
|
|
16
|
+
import { n as readStackStatus } from "./stack-status-_NUgd-g5.js";
|
|
15
17
|
import { t as connect } from "./db-DT1bGB02.js";
|
|
16
|
-
import { c as isSqliteLiteDriver, n as managementTarget, o as snapshotFile, p as request, r as openSource, s as liteDriverOf, t as loadSnapshot } from "./snapshot-
|
|
18
|
+
import { c as isSqliteLiteDriver, n as managementTarget, o as snapshotFile, p as request, r as openSource, s as liteDriverOf, t as loadSnapshot } from "./snapshot-BBKFojqM.js";
|
|
17
19
|
import { n as applyPlan, o as insideRoot, r as changeLines } from "./files-DDvAwTko.js";
|
|
18
|
-
import { a as permissionCatalogKeys, i as lineOf, l as tableObject, n as exposed, o as policyObject, r as exposedSchemas, s as qualified, t as catalogOf, u as workflowOf } from "./shared-
|
|
19
|
-
import { t as MIGRATION_SAFETY_RULES } from "./migration-safety-
|
|
20
|
-
import {
|
|
21
|
-
import { i as reservedRoles, n as ident$1, r as literal$1, t as LIVE_RULES } from "./live-
|
|
22
|
-
import { i as
|
|
20
|
+
import { a as permissionCatalogKeys, i as lineOf, l as tableObject, n as exposed, o as policyObject, r as exposedSchemas, s as qualified, t as catalogOf, u as workflowOf } from "./shared-DKLuA1Tp.js";
|
|
21
|
+
import { t as MIGRATION_SAFETY_RULES } from "./migration-safety-DjVpz2D6.js";
|
|
22
|
+
import { a as sourceFlags, n as SOURCE_ARGS } from "./source-args-Cwo7zwvq.js";
|
|
23
|
+
import { i as reservedRoles, n as ident$1, r as literal$1, t as LIVE_RULES } from "./live-CkV3d3yp.js";
|
|
24
|
+
import { i as staleVariables, r as stackEnvValues, t as PREFIX_NAMES } from "./stack-env-_uWWNHWq.js";
|
|
25
|
+
import { i as refuseWithMetadata, r as readMetadataSnapshot } from "./metadata-BGkle6WM.js";
|
|
23
26
|
import { existsSync } from "node:fs";
|
|
24
27
|
import { dirname, resolve } from "node:path";
|
|
25
28
|
import { createHash } from "node:crypto";
|
|
@@ -27,6 +30,107 @@ import { glob, mkdir, readFile, readdir, writeFile } from "node:fs/promises";
|
|
|
27
30
|
import { SECRET_COLUMNS, SQL_MODULES, adoptedTables, contractSignature, customContracts, dataExportPlan, excludedColumns, expiredFlagsQuery, migrationOptionUses, moduleDeprecations, moduleEventTriggers, moduleFileVersion, moduleLayout, moduleVersion, renderModules, sameModuleFile, sameTenantColumn, sameTenantTrigger, sharedRolesProblems, subjectColumns } from "better-supabase/sql";
|
|
28
31
|
import { DEFAULT_ACTIVE_TENANT, tenantClaimPaths } from "better-supabase/config";
|
|
29
32
|
import { defineBucket, parseSize } from "better-supabase/storage";
|
|
33
|
+
//#region src/cli/doctor/env.ts
|
|
34
|
+
const PUBLIC_PREFIXES = [
|
|
35
|
+
"NEXT_PUBLIC_",
|
|
36
|
+
"VITE_",
|
|
37
|
+
"PUBLIC_",
|
|
38
|
+
"EXPO_PUBLIC_",
|
|
39
|
+
"NUXT_PUBLIC_"
|
|
40
|
+
];
|
|
41
|
+
function envEntries(file) {
|
|
42
|
+
return file.text.split("\n").flatMap((raw, index) => {
|
|
43
|
+
const match = /^\s*(?:export\s+)?([A-Za-z_][A-Za-z0-9_]*)\s*=\s*(.*)$/.exec(raw);
|
|
44
|
+
if (!match) return [];
|
|
45
|
+
const value = match[2].trim().replace(/^(['"])(.*)\1$/, "$2");
|
|
46
|
+
return [{
|
|
47
|
+
key: match[1],
|
|
48
|
+
value,
|
|
49
|
+
line: index + 1
|
|
50
|
+
}];
|
|
51
|
+
});
|
|
52
|
+
}
|
|
53
|
+
const PREFIXES = [...new Set(Object.values(PREFIX_NAMES).filter((prefix) => prefix !== ""))];
|
|
54
|
+
/** The names `stackEnvValues` writes, with or without a browser prefix; not the CLI's own `SUPABASE_BIN` or `SUPABASE_ACCESS_TOKEN`. */
|
|
55
|
+
const STACK_VARIABLE = /(?:^|_)SUPABASE_(?:URL|PUBLISHABLE_KEY|SECRET_KEY|JWKS_URL|DB_URL|JWT_SECRET)$/;
|
|
56
|
+
const exportsStackVariable = (shell) => Object.entries(shell).some(([name, value]) => value !== void 0 && value !== "" && STACK_VARIABLE.test(name));
|
|
57
|
+
/**
|
|
58
|
+
* Reads the running stack only when the shell exports a `SUPABASE_*`
|
|
59
|
+
* variable, so a doctor run without one never starts `supabase status`.
|
|
60
|
+
*/
|
|
61
|
+
async function loadStackEnvCheck(root, env, signal) {
|
|
62
|
+
const shell = env[PROCESS_ENV] ?? {};
|
|
63
|
+
if (!exportsStackVariable(shell)) return { skipped: "No SUPABASE_* variable is exported." };
|
|
64
|
+
try {
|
|
65
|
+
const result = await readStackStatus(root, env, { signal });
|
|
66
|
+
if (!result.ok) return { skipped: "The local stack is not running." };
|
|
67
|
+
const values = { ...stackEnvValues(result.status, "") };
|
|
68
|
+
if (values["SUPABASE_URL"] === void 0) return { skipped: "supabase status has no API_URL." };
|
|
69
|
+
for (const prefix of PREFIXES) {
|
|
70
|
+
values[`${prefix}SUPABASE_URL`] = values["SUPABASE_URL"];
|
|
71
|
+
if (values["SUPABASE_PUBLISHABLE_KEY"] !== void 0) values[`${prefix}SUPABASE_PUBLISHABLE_KEY`] = values["SUPABASE_PUBLISHABLE_KEY"];
|
|
72
|
+
}
|
|
73
|
+
return {
|
|
74
|
+
shell,
|
|
75
|
+
values
|
|
76
|
+
};
|
|
77
|
+
} catch (cause) {
|
|
78
|
+
return { skipped: errorText(cause) };
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
/** Checks on env files and the variables the shell exports (BS501 to BS503). */
|
|
82
|
+
const ENV_RULES = [
|
|
83
|
+
{
|
|
84
|
+
code: "BS501",
|
|
85
|
+
severity: "error",
|
|
86
|
+
title: "Secret in a browser variable",
|
|
87
|
+
description: "Variables with a public prefix are bundled into client code. A secret key there gives every visitor full access.",
|
|
88
|
+
check: (context) => context.envFiles.flatMap((file) => envEntries(file).filter((entry) => PUBLIC_PREFIXES.some((prefix) => entry.key.startsWith(prefix)) && (entry.value.startsWith("sb_secret_") || /SECRET|SERVICE_ROLE/.test(entry.key))).map((entry) => ({
|
|
89
|
+
message: `${entry.key} in ${file.path} is exposed to the browser but holds a secret. Rename it without the public prefix and rotate the key.`,
|
|
90
|
+
target: `${file.path}:${entry.key}`,
|
|
91
|
+
location: {
|
|
92
|
+
file: file.path,
|
|
93
|
+
line: entry.line
|
|
94
|
+
}
|
|
95
|
+
})))
|
|
96
|
+
},
|
|
97
|
+
{
|
|
98
|
+
code: "BS502",
|
|
99
|
+
severity: "warning",
|
|
100
|
+
title: "Env file with secrets is not ignored by git",
|
|
101
|
+
description: "Env files holding a secret key or database password should never be committed.",
|
|
102
|
+
check: (context) => {
|
|
103
|
+
const patterns = context.gitignore.split("\n").map((line) => line.trim()).filter((line) => line.length > 0 && !line.startsWith("#"));
|
|
104
|
+
const ignored = (path) => patterns.some((pattern) => {
|
|
105
|
+
const source = pattern.replace(/^\//, "").replaceAll(/[.+^${}()|[\]\\]/g, "\\$&").replaceAll("*", ".*");
|
|
106
|
+
return new RegExp(`^${source}$`).test(path) || new RegExp(`(^|/)${source}$`).test(path);
|
|
107
|
+
});
|
|
108
|
+
return context.envFiles.flatMap((file) => {
|
|
109
|
+
const secret = envEntries(file).find((entry) => entry.value.startsWith("sb_secret_") || /SECRET_KEY|SERVICE_ROLE|DB_URL|DATABASE_URL/.test(entry.key));
|
|
110
|
+
if (!secret || ignored(file.path) || file.path.endsWith(".example")) return [];
|
|
111
|
+
return [{
|
|
112
|
+
message: `${file.path} contains ${secret.key} but isn't in .gitignore.`,
|
|
113
|
+
target: file.path,
|
|
114
|
+
location: {
|
|
115
|
+
file: file.path,
|
|
116
|
+
line: secret.line
|
|
117
|
+
}
|
|
118
|
+
}];
|
|
119
|
+
});
|
|
120
|
+
}
|
|
121
|
+
},
|
|
122
|
+
{
|
|
123
|
+
code: "BS503",
|
|
124
|
+
severity: "warning",
|
|
125
|
+
title: "Exported Supabase variable differs from the running stack",
|
|
126
|
+
description: "A SUPABASE_* variable exported in the shell has another value than the local stack, so the app talks to a stale stack (often another worktree's port). Values are redacted: host and port for URLs, a SHA-256 fingerprint for keys. Unset the variable, or start the app with `better-supabase run -- <cmd>`, which overrides it.",
|
|
127
|
+
check: ({ stackEnv }) => stackEnv === void 0 || "skipped" in stackEnv ? [] : staleVariables(stackEnv.shell, stackEnv.values).map((stale) => ({
|
|
128
|
+
target: stale.variable,
|
|
129
|
+
message: `${stale.message} Unset it or start the app with better-supabase run -- <cmd>.`
|
|
130
|
+
}))
|
|
131
|
+
}
|
|
132
|
+
];
|
|
133
|
+
//#endregion
|
|
30
134
|
//#region src/cli/doctor/adoption.ts
|
|
31
135
|
const tagText = (notNull) => notNull === true ? "@notNull" : `@notNull(${notNull.join(", ")})`;
|
|
32
136
|
const sameNotNull = (a, b) => a === true || b === true ? a === b : a !== void 0 && a.length === b.length && a.every((name) => b.includes(name));
|
|
@@ -124,6 +228,22 @@ const ADOPTION_RULES = [
|
|
|
124
228
|
});
|
|
125
229
|
}
|
|
126
230
|
},
|
|
231
|
+
{
|
|
232
|
+
code: "BS344",
|
|
233
|
+
severity: "warning",
|
|
234
|
+
title: "Adopted webhook endpoints without a format",
|
|
235
|
+
description: "An adopted `webhooks-out` endpoints table that maps no `format` column sends every endpoint in `blocks.webhooks-out.options.defaultFormat`. Its default changed from the 0.8 body (`standard`) to `cloudevents` in 0.9, so receivers built for the old body break without any change to the config. `sql sync` refuses this config; doctor reports it for configs it loads without that check. Set `defaultFormat` explicitly, or add a format column and map it in `columns.endpoints.format`.",
|
|
236
|
+
check: (context) => {
|
|
237
|
+
const block = context.config.blocks["webhooks-out"];
|
|
238
|
+
if (block?.mode !== "adopt" || block.options?.["defaultFormat"] !== void 0 || typeof block.columns?.["endpoints"]?.["format"] === "string") return [];
|
|
239
|
+
const adopted = adoptedTables(context.config.blocks).find((entry) => entry.module === "webhooks-out" && entry.logical === "endpoints");
|
|
240
|
+
const table = adopted === void 0 ? void 0 : catalogOf(context).tables.find((entry) => entry.schema === adopted.schema && entry.name === adopted.table);
|
|
241
|
+
return [{
|
|
242
|
+
message: `${adopted === void 0 ? "The adopted endpoints table" : `${adopted.schema}.${adopted.table}`} ${table?.columns.some((column) => column.name === "format") ? "has a format column the config doesn't map" : "has no format column"}, so every endpoint gets blocks.webhooks-out.options.defaultFormat, which defaults to "cloudevents" since 0.9 ("standard" before). Set defaultFormat to the body your receivers expect, or map columns.endpoints.format.`,
|
|
243
|
+
target: "blocks.webhooks-out.options.defaultFormat"
|
|
244
|
+
}];
|
|
245
|
+
}
|
|
246
|
+
},
|
|
127
247
|
{
|
|
128
248
|
code: "BS341",
|
|
129
249
|
severity: "warning",
|
|
@@ -302,7 +422,7 @@ const splitName = (qualified) => {
|
|
|
302
422
|
name: qualified.slice(dot + 1)
|
|
303
423
|
};
|
|
304
424
|
};
|
|
305
|
-
const escapeRegExp$
|
|
425
|
+
const escapeRegExp$2 = (text) => text.replaceAll(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
|
306
426
|
/**
|
|
307
427
|
* The claims the provider's hook writes that a second writer would
|
|
308
428
|
* contradict, with the tenant claim it writes to.
|
|
@@ -310,7 +430,7 @@ const escapeRegExp$1 = (text) => text.replaceAll(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
|
|
310
430
|
function ownedClaims(hook) {
|
|
311
431
|
return [.../* @__PURE__ */ new Set([...hook.ownedClaims, ...hook.tenantClaim ? [hook.tenantClaim] : []])];
|
|
312
432
|
}
|
|
313
|
-
const quotedName = (schema, name) => `(?:"?${escapeRegExp$
|
|
433
|
+
const quotedName = (schema, name) => `(?:"?${escapeRegExp$2(schema)}"?\\s*\\.\\s*)?"?${escapeRegExp$2(name)}"?`;
|
|
314
434
|
const createsFunction = (fn) => new RegExp(`create\\s+(?:or\\s+replace\\s+)?function\\s+${quotedName(fn.schema, fn.name)}\\s*\\(`, "i");
|
|
315
435
|
/** The SQL file that has the provider's hook marker and creates `fn`. */
|
|
316
436
|
function markerFileFor(context, fn) {
|
|
@@ -334,7 +454,7 @@ function wrapsProviderHook(hook, source) {
|
|
|
334
454
|
/** Which of `claims` the hook body writes through `jsonb_set` or `jsonb_build_object`. */
|
|
335
455
|
function writtenClaims(source, claims) {
|
|
336
456
|
return claims.filter((claim) => {
|
|
337
|
-
const name = escapeRegExp$
|
|
457
|
+
const name = escapeRegExp$2(claim);
|
|
338
458
|
return new RegExp(`jsonb_set\\s*\\([^;]*?'\\{\\s*(?:claims\\s*,\\s*)?${name}\\s*\\}'`, "i").test(source) || new RegExp(`jsonb_build_object\\s*\\([^;]*?'${name}'\\s*,`, "i").test(source);
|
|
339
459
|
});
|
|
340
460
|
}
|
|
@@ -921,6 +1041,187 @@ async function fileState(context, file) {
|
|
|
921
1041
|
};
|
|
922
1042
|
}
|
|
923
1043
|
//#endregion
|
|
1044
|
+
//#region src/cli/doctor/attachment-subjects.ts
|
|
1045
|
+
/** The attachments subjects as the block resolves them, with the per-subject keys each one has. */
|
|
1046
|
+
function attachmentSubjects(context) {
|
|
1047
|
+
const registry = context.config.subjects;
|
|
1048
|
+
const raw = context.config.blocks["attachments"]?.options?.["subjects"];
|
|
1049
|
+
return (raw === void 0 ? Object.keys(registry).map((type) => [type, {}]) : Array.isArray(raw) ? raw.filter((type) => typeof type === "string").map((type) => [type, {}]) : isRecord(raw) ? Object.entries(raw).flatMap(([type, entry]) => isRecord(entry) ? [[type, entry]] : []) : []).flatMap(([type, entry]) => {
|
|
1050
|
+
const registered = registry[type];
|
|
1051
|
+
const table = entry["table"] ?? registered?.table;
|
|
1052
|
+
const tenant = entry["tenant"] ?? registered?.tenant ?? "organization_id";
|
|
1053
|
+
if (typeof table !== "string" || typeof tenant !== "string") return [];
|
|
1054
|
+
const own = isRecord(entry["permissions"]) ? Object.keys(entry["permissions"]) : [];
|
|
1055
|
+
const fromRegistry = Object.keys(registered?.permissions ?? {}).filter((key) => key !== "read");
|
|
1056
|
+
const subjectRead = typeof entry["permission"] === "string" || registered?.permissions?.["read"] !== void 0 ? ["read"] : [];
|
|
1057
|
+
return [{
|
|
1058
|
+
type,
|
|
1059
|
+
table,
|
|
1060
|
+
tenant,
|
|
1061
|
+
keys: /* @__PURE__ */ new Set([
|
|
1062
|
+
...own,
|
|
1063
|
+
...fromRegistry,
|
|
1064
|
+
...subjectRead
|
|
1065
|
+
])
|
|
1066
|
+
}];
|
|
1067
|
+
});
|
|
1068
|
+
}
|
|
1069
|
+
/**
|
|
1070
|
+
* Whether `expression` only checks that the caller is a member of the row's
|
|
1071
|
+
* tenant: `current_tenant_id()`, a `*_ids_with` or `*member_*ids` function in
|
|
1072
|
+
* any schema (the provider's own helpers included), `can('tenant', ...)` or
|
|
1073
|
+
* `member_can`, joined by `and`, with a soft-delete `is null` allowed. A
|
|
1074
|
+
* permission call passes only with one of `keys`.
|
|
1075
|
+
*/
|
|
1076
|
+
function tenantOnly(expression, column, keys) {
|
|
1077
|
+
const col = `(?:"?\\w+"?\\.)?"?${escape$1(column)}"?(?:::\\w+)?`;
|
|
1078
|
+
const key = `'([^']*)'(?:::text)?`;
|
|
1079
|
+
const atoms = [
|
|
1080
|
+
`${col}\\s*=\\s*\\(?\\s*(?:select\\s+)?better_supabase\\.current_tenant_id\\(\\)(?:\\s+as\\s+\\w+)?`,
|
|
1081
|
+
`${col}\\s+in\\s+\\(\\s*select\\s+(?:\\w+\\.)?\\w*_ids_with\\(\\s*${key}\\s*\\)(?:\\s+as\\s+\\w+)?\\s*\\)`,
|
|
1082
|
+
`${col}\\s+in\\s+\\(\\s*select\\s+(?:\\w+\\.)?\\w*member_\\w*ids\\(\\s*\\)(?:\\s+as\\s+\\w+)?\\s*\\)`,
|
|
1083
|
+
`better_supabase\\.can\\(\\s*'tenant'(?:::text)?\\s*,\\s*${col}\\s*,\\s*${key}\\s*\\)`,
|
|
1084
|
+
`better_supabase\\.member_can\\(\\s*${col}\\s*,\\s*${key}\\s*\\)`,
|
|
1085
|
+
`(?:"?\\w+"?\\.)?"?\\w+"?\\s+is\\s+null`
|
|
1086
|
+
];
|
|
1087
|
+
const used = [];
|
|
1088
|
+
let rest = expression;
|
|
1089
|
+
for (const atom of atoms) rest = rest.replaceAll(new RegExp(atom, "gi"), (_match, key) => {
|
|
1090
|
+
if (typeof key === "string") used.push(key);
|
|
1091
|
+
return " ";
|
|
1092
|
+
});
|
|
1093
|
+
return used.every((key) => keys.has(key)) && rest.replaceAll(/\band\b|[()\s]/gi, "") === "";
|
|
1094
|
+
}
|
|
1095
|
+
/** The top-level `or` branches of `expression`, outer parentheses removed. */
|
|
1096
|
+
function branches(expression) {
|
|
1097
|
+
let text = expression.trim();
|
|
1098
|
+
while (text.startsWith("(") && closingParen(text) === text.length - 1) text = text.slice(1, -1).trim();
|
|
1099
|
+
const parts = [];
|
|
1100
|
+
let depth = 0;
|
|
1101
|
+
let start = 0;
|
|
1102
|
+
for (let index = 0; index < text.length; index += 1) {
|
|
1103
|
+
const char = text[index];
|
|
1104
|
+
if (char === "(") depth += 1;
|
|
1105
|
+
else if (char === ")") depth -= 1;
|
|
1106
|
+
else if (depth === 0 && /^\sor\s/i.test(text.slice(index, index + 4))) {
|
|
1107
|
+
parts.push(text.slice(start, index));
|
|
1108
|
+
start = index + 4;
|
|
1109
|
+
}
|
|
1110
|
+
}
|
|
1111
|
+
parts.push(text.slice(start));
|
|
1112
|
+
return parts;
|
|
1113
|
+
}
|
|
1114
|
+
/** The index of the parenthesis closing the one at the start of `text`. */
|
|
1115
|
+
function closingParen(text) {
|
|
1116
|
+
let depth = 0;
|
|
1117
|
+
for (let index = 0; index < text.length; index += 1) if (text[index] === "(") depth += 1;
|
|
1118
|
+
else if (text[index] === ")") {
|
|
1119
|
+
depth -= 1;
|
|
1120
|
+
if (depth === 0) return index;
|
|
1121
|
+
}
|
|
1122
|
+
return -1;
|
|
1123
|
+
}
|
|
1124
|
+
/** Tenant membership alone lets the caller through: the whole check, or one `or` branch of it. */
|
|
1125
|
+
function tenantSuffices(expression, column, keys) {
|
|
1126
|
+
return [expression, ...branches(expression)].some((part) => tenantOnly(part, column, keys));
|
|
1127
|
+
}
|
|
1128
|
+
function attachmentSubjectsOnDefaults(context) {
|
|
1129
|
+
if (!context.config.blockNames.includes("attachments")) return [];
|
|
1130
|
+
const { tables } = catalogOf(context);
|
|
1131
|
+
const overrides = context.config.blocks["attachments"]?.permissions ?? {};
|
|
1132
|
+
const actions = [{
|
|
1133
|
+
action: "read",
|
|
1134
|
+
commands: ["select"],
|
|
1135
|
+
what: "reads"
|
|
1136
|
+
}, {
|
|
1137
|
+
action: "upload",
|
|
1138
|
+
commands: ["insert", "update"],
|
|
1139
|
+
what: "writes"
|
|
1140
|
+
}];
|
|
1141
|
+
return attachmentSubjects(context).flatMap(({ type, table: name, tenant, keys }) => {
|
|
1142
|
+
const [schema, bare] = name.includes(".") ? name.split(".", 2) : ["public", name];
|
|
1143
|
+
const table = tables.find((candidate) => candidate.schema === schema && candidate.name === bare);
|
|
1144
|
+
if (table?.kind !== "table" || !table.rls) return [];
|
|
1145
|
+
const stricter = actions.filter(({ action, commands }) => {
|
|
1146
|
+
if (keys.has(action)) return false;
|
|
1147
|
+
const blockKey = overrides[action] ?? `attachments.${action}`;
|
|
1148
|
+
return commands.some((command) => {
|
|
1149
|
+
const applying = table.policies.filter((policy) => policy.permissive && (policy.command === "all" || policy.command === command) && appliesTo(policy, "authenticated"));
|
|
1150
|
+
if (command !== "select" && applying.length === 0) return false;
|
|
1151
|
+
return !applying.some((policy) => {
|
|
1152
|
+
const expression = command === "select" ? policy.using : policy.check ?? policy.using;
|
|
1153
|
+
return expression !== null && tenantSuffices(expression, tenant, /* @__PURE__ */ new Set([blockKey]));
|
|
1154
|
+
});
|
|
1155
|
+
});
|
|
1156
|
+
});
|
|
1157
|
+
if (stricter.length === 0) return [];
|
|
1158
|
+
const target = `${table.schema}.${table.name}`;
|
|
1159
|
+
return [{
|
|
1160
|
+
message: `Attachments on ${type} use the block-wide ${stricter.map(({ action }) => action).join(" and ")} key, but ${target} checks more than tenant membership for ${stricter.map(({ what: verb }) => verb).join(" and ")}, so any member of the tenant gets the files of a ${type} they can't open. Set ${stricter.map(({ action }) => action === "read" ? `blocks.attachments.options.subjects.${type}.permissions.read` : `subjects.${type}.permissions.upload`).join(" and ")} to the key the table checks.`,
|
|
1161
|
+
target,
|
|
1162
|
+
object: tableObject(table)
|
|
1163
|
+
}];
|
|
1164
|
+
});
|
|
1165
|
+
}
|
|
1166
|
+
//#endregion
|
|
1167
|
+
//#region src/cli/doctor/audit-coverage.ts
|
|
1168
|
+
const escapeRegExp$1 = (value) => value.replaceAll(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
|
1169
|
+
/** `exempt` entries: a glob, or `{ table, reason }` where `table` is a glob. */
|
|
1170
|
+
function exemptions(value) {
|
|
1171
|
+
return (Array.isArray(value) ? value : []).flatMap((entry) => {
|
|
1172
|
+
if (typeof entry === "string") return [{
|
|
1173
|
+
glob: entry,
|
|
1174
|
+
reason: void 0
|
|
1175
|
+
}];
|
|
1176
|
+
if (typeof entry === "object" && entry !== null && "table" in entry && typeof entry.table === "string") {
|
|
1177
|
+
const reason = "reason" in entry && typeof entry.reason === "string" ? entry.reason.trim() : "";
|
|
1178
|
+
return [{
|
|
1179
|
+
glob: entry.table,
|
|
1180
|
+
reason: reason === "" ? void 0 : reason
|
|
1181
|
+
}];
|
|
1182
|
+
}
|
|
1183
|
+
return [];
|
|
1184
|
+
});
|
|
1185
|
+
}
|
|
1186
|
+
/** `exempt` globs (`public.*_archive`): `*` matches any run of characters. */
|
|
1187
|
+
const globs = (value) => (Array.isArray(value) ? value : []).filter((entry) => typeof entry === "string").map((glob) => new RegExp(`^${glob.split("*").map(escapeRegExp$1).join(".*")}$`, "i"));
|
|
1188
|
+
/** The module schemas and the app tables SQL modules adopted, which the audit trigger skips. */
|
|
1189
|
+
function moduleOwned(context) {
|
|
1190
|
+
const schemas = /* @__PURE__ */ new Set(["better_supabase"]);
|
|
1191
|
+
const tables = /* @__PURE__ */ new Set();
|
|
1192
|
+
for (const module of Object.values(context.config.blocks)) {
|
|
1193
|
+
if (module?.schema !== void 0) schemas.add(module.schema);
|
|
1194
|
+
for (const table of Object.values(module?.tables ?? {})) {
|
|
1195
|
+
if (table === null) continue;
|
|
1196
|
+
tables.add(table.includes(".") ? table : `${module?.schema ?? "better_supabase"}.${table}`);
|
|
1197
|
+
}
|
|
1198
|
+
}
|
|
1199
|
+
return {
|
|
1200
|
+
schemas,
|
|
1201
|
+
tables
|
|
1202
|
+
};
|
|
1203
|
+
}
|
|
1204
|
+
/**
|
|
1205
|
+
* Tables in `config.schemas` without the `bs_audit` trigger, when `audit` is
|
|
1206
|
+
* in `blocks`, and exemptions that give no reason.
|
|
1207
|
+
*/
|
|
1208
|
+
function unauditedTables(context) {
|
|
1209
|
+
if (!context.config.blockNames.includes("audit")) return [];
|
|
1210
|
+
const entries = exemptions(context.config.blocks["audit"]?.options?.["exempt"]);
|
|
1211
|
+
const exempt = globs(entries.map((entry) => entry.glob));
|
|
1212
|
+
const owned = moduleOwned(context);
|
|
1213
|
+
const unaudited = catalogOf(context).tables.filter((table) => table.kind === "table" && table.partitionOf === void 0 && context.config.schemas.includes(table.schema) && !owned.schemas.has(table.schema) && !owned.tables.has(qualified(table)) && !exempt.some((pattern) => pattern.test(qualified(table))) && !table.triggers.some((trigger) => trigger.name.startsWith("bs_audit") || trigger.function.split(".").at(-1) === "audit_row_change")).map((table) => ({
|
|
1214
|
+
message: `${qualified(table)} has no audit trigger, so its inserts, updates and deletes are not in the audit log. Run \`select better_supabase.audit('${qualified(table)}')\` in a schema file, or list it in blocks.audit.options.exempt as \`{ table: '${qualified(table)}', reason: '...' }\`.`,
|
|
1215
|
+
target: qualified(table),
|
|
1216
|
+
object: tableObject(table)
|
|
1217
|
+
}));
|
|
1218
|
+
const unexplained = entries.filter((entry) => entry.reason === void 0).map((entry) => ({
|
|
1219
|
+
message: `blocks.audit.options.exempt lists ${entry.glob} without a reason. Write it as { table: '${entry.glob}', reason: 'why its changes need no audit entry' } so a reviewer can tell an intended gap from a forgotten table.`,
|
|
1220
|
+
target: `blocks.audit.options.exempt:${entry.glob}`
|
|
1221
|
+
}));
|
|
1222
|
+
return [...unaudited, ...unexplained];
|
|
1223
|
+
}
|
|
1224
|
+
//#endregion
|
|
924
1225
|
//#region src/cli/doctor/modules.ts
|
|
925
1226
|
/** The non-empty string at a dotted path, as the tenant() plugin reads it. */
|
|
926
1227
|
function claimAt(claims, path) {
|
|
@@ -1242,35 +1543,6 @@ function duplicateTriggers(context) {
|
|
|
1242
1543
|
}));
|
|
1243
1544
|
}));
|
|
1244
1545
|
}
|
|
1245
|
-
/** `exempt` globs (`public.*_archive`): `*` matches any run of characters. */
|
|
1246
|
-
const globs = (value) => (Array.isArray(value) ? value : []).filter((entry) => typeof entry === "string").map((glob) => new RegExp(`^${glob.split("*").map(escapeRegExp).join(".*")}$`, "i"));
|
|
1247
|
-
/** The module schemas and the app tables SQL modules adopted, which the audit trigger skips. */
|
|
1248
|
-
function moduleOwned(context) {
|
|
1249
|
-
const schemas = /* @__PURE__ */ new Set(["better_supabase"]);
|
|
1250
|
-
const tables = /* @__PURE__ */ new Set();
|
|
1251
|
-
for (const module of Object.values(context.config.blocks)) {
|
|
1252
|
-
if (module?.schema !== void 0) schemas.add(module.schema);
|
|
1253
|
-
for (const table of Object.values(module?.tables ?? {})) {
|
|
1254
|
-
if (table === null) continue;
|
|
1255
|
-
tables.add(table.includes(".") ? table : `${module?.schema ?? "better_supabase"}.${table}`);
|
|
1256
|
-
}
|
|
1257
|
-
}
|
|
1258
|
-
return {
|
|
1259
|
-
schemas,
|
|
1260
|
-
tables
|
|
1261
|
-
};
|
|
1262
|
-
}
|
|
1263
|
-
/** Tables in `config.schemas` without the `bs_audit` trigger, when `audit` is in `blocks`. */
|
|
1264
|
-
function unauditedTables(context) {
|
|
1265
|
-
if (!context.config.blockNames.includes("audit")) return [];
|
|
1266
|
-
const exempt = globs(context.config.blocks["audit"]?.options?.["exempt"]);
|
|
1267
|
-
const owned = moduleOwned(context);
|
|
1268
|
-
return catalogOf(context).tables.filter((table) => table.kind === "table" && context.config.schemas.includes(table.schema) && !owned.schemas.has(table.schema) && !owned.tables.has(qualified(table)) && !exempt.some((pattern) => pattern.test(qualified(table))) && !table.triggers.some((trigger) => trigger.name === "bs_audit" || trigger.function.split(".").at(-1) === "audit_row_change")).map((table) => ({
|
|
1269
|
-
message: `${qualified(table)} has no audit trigger, so its inserts, updates and deletes are not in the audit log. Run \`select better_supabase.audit('${qualified(table)}')\` in a schema file, or list it in blocks.audit.options.exempt.`,
|
|
1270
|
-
target: qualified(table),
|
|
1271
|
-
object: tableObject(table)
|
|
1272
|
-
}));
|
|
1273
|
-
}
|
|
1274
1546
|
/** RLS tables in `config.schemas` without a restrictive `session_active()` policy, when `sessions` is in `blocks`. */
|
|
1275
1547
|
function sessionlessTables(context) {
|
|
1276
1548
|
if (!context.config.blockNames.includes("sessions")) return [];
|
|
@@ -1369,7 +1641,7 @@ const MODULE_RULES = [
|
|
|
1369
1641
|
code: "BS315",
|
|
1370
1642
|
severity: "warning",
|
|
1371
1643
|
title: "Table without an audit trigger",
|
|
1372
|
-
description: "The `audit` module is in `blocks`, and a table in `schemas` has no `bs_audit` trigger (or another trigger that calls `audit_row_change()`), so its changes are not in the audit log. The module's own schemas and the tables SQL modules adopt are skipped; `blocks.audit.options.exempt` lists more, as `schema.table`
|
|
1644
|
+
description: "The `audit` module is in `blocks`, and a table in `schemas` has no `bs_audit` trigger (or another trigger that calls `audit_row_change()`), so its changes are not in the audit log. The module's own schemas and the tables SQL modules adopt are skipped; `blocks.audit.options.exempt` lists more, as `{ table, reason }` entries where `table` is a `schema.table` glob such as `public.*_archive`; a bare glob string still works but gets a finding that asks for the reason. Partitions are covered by their parent.",
|
|
1373
1645
|
check: unauditedTables
|
|
1374
1646
|
},
|
|
1375
1647
|
{
|
|
@@ -1449,6 +1721,13 @@ const MODULE_RULES = [
|
|
|
1449
1721
|
description: "A table in `config.subjects` has row level security disabled. `can_subject` treats a row the caller can read as visible, so without RLS every signed-in user passes the visibility half of the check for every row.",
|
|
1450
1722
|
check: subjectsWithoutRls
|
|
1451
1723
|
},
|
|
1724
|
+
{
|
|
1725
|
+
code: "BS345",
|
|
1726
|
+
severity: "warning",
|
|
1727
|
+
title: "Attachments subject on block-wide keys with stricter RLS",
|
|
1728
|
+
description: "An `attachments` subject has no `read` or `upload` key of its own, so its files are checked with the block-wide `attachments.read` and `attachments.upload` keys, but the subject table's own policies check more than tenant membership: a permission key of their own, an owner or `auth.uid()` comparison, or another condition. Any member of the tenant then reads and uploads files of rows they can't open. Doctor recognizes `current_tenant_id()`, `tenant_ids_with`, `member_<tenant>_ids`, `can('tenant', ...)` and `member_can` with the block's key as tenant membership. Set `subjects.<type>.permissions.upload`, or `blocks.attachments.options.subjects.<type>.permissions` for `read`, to the keys the table checks.",
|
|
1729
|
+
check: attachmentSubjectsOnDefaults
|
|
1730
|
+
},
|
|
1452
1731
|
{
|
|
1453
1732
|
code: "BS335",
|
|
1454
1733
|
severity: "warning",
|
|
@@ -2369,25 +2648,6 @@ function tomlLocation(context, key) {
|
|
|
2369
2648
|
line
|
|
2370
2649
|
} : void 0;
|
|
2371
2650
|
}
|
|
2372
|
-
const PUBLIC_PREFIXES = [
|
|
2373
|
-
"NEXT_PUBLIC_",
|
|
2374
|
-
"VITE_",
|
|
2375
|
-
"PUBLIC_",
|
|
2376
|
-
"EXPO_PUBLIC_",
|
|
2377
|
-
"NUXT_PUBLIC_"
|
|
2378
|
-
];
|
|
2379
|
-
function envEntries(file) {
|
|
2380
|
-
return file.text.split("\n").flatMap((raw, index) => {
|
|
2381
|
-
const match = /^\s*(?:export\s+)?([A-Za-z_][A-Za-z0-9_]*)\s*=\s*(.*)$/.exec(raw);
|
|
2382
|
-
if (!match) return [];
|
|
2383
|
-
const value = match[2].trim().replace(/^(['"])(.*)\1$/, "$2");
|
|
2384
|
-
return [{
|
|
2385
|
-
key: match[1],
|
|
2386
|
-
value,
|
|
2387
|
-
line: index + 1
|
|
2388
|
-
}];
|
|
2389
|
-
});
|
|
2390
|
-
}
|
|
2391
2651
|
/**
|
|
2392
2652
|
* `db.x.aggregate(`, an `_sum:`/`_avg:`/`_min:`/`_max:` include or a list
|
|
2393
2653
|
* with `facetCounts: true`.
|
|
@@ -2793,45 +3053,6 @@ const RULES = [
|
|
|
2793
3053
|
target: `${qualified(table)}.${key.name}`,
|
|
2794
3054
|
object: tableObject(table)
|
|
2795
3055
|
})))
|
|
2796
|
-
},
|
|
2797
|
-
{
|
|
2798
|
-
code: "BS501",
|
|
2799
|
-
severity: "error",
|
|
2800
|
-
title: "Secret in a browser variable",
|
|
2801
|
-
description: "Variables with a public prefix are bundled into client code. A secret key there gives every visitor full access.",
|
|
2802
|
-
check: (context) => context.envFiles.flatMap((file) => envEntries(file).filter((entry) => PUBLIC_PREFIXES.some((prefix) => entry.key.startsWith(prefix)) && (entry.value.startsWith("sb_secret_") || /SECRET|SERVICE_ROLE/.test(entry.key))).map((entry) => ({
|
|
2803
|
-
message: `${entry.key} in ${file.path} is exposed to the browser but holds a secret. Rename it without the public prefix and rotate the key.`,
|
|
2804
|
-
target: `${file.path}:${entry.key}`,
|
|
2805
|
-
location: {
|
|
2806
|
-
file: file.path,
|
|
2807
|
-
line: entry.line
|
|
2808
|
-
}
|
|
2809
|
-
})))
|
|
2810
|
-
},
|
|
2811
|
-
{
|
|
2812
|
-
code: "BS502",
|
|
2813
|
-
severity: "warning",
|
|
2814
|
-
title: "Env file with secrets is not ignored by git",
|
|
2815
|
-
description: "Env files holding a secret key or database password should never be committed.",
|
|
2816
|
-
check: (context) => {
|
|
2817
|
-
const patterns = context.gitignore.split("\n").map((line) => line.trim()).filter((line) => line.length > 0 && !line.startsWith("#"));
|
|
2818
|
-
const ignored = (path) => patterns.some((pattern) => {
|
|
2819
|
-
const source = pattern.replace(/^\//, "").replaceAll(/[.+^${}()|[\]\\]/g, "\\$&").replaceAll("*", ".*");
|
|
2820
|
-
return new RegExp(`^${source}$`).test(path) || new RegExp(`(^|/)${source}$`).test(path);
|
|
2821
|
-
});
|
|
2822
|
-
return context.envFiles.flatMap((file) => {
|
|
2823
|
-
const secret = envEntries(file).find((entry) => entry.value.startsWith("sb_secret_") || /SECRET_KEY|SERVICE_ROLE|DB_URL|DATABASE_URL/.test(entry.key));
|
|
2824
|
-
if (!secret || ignored(file.path) || file.path.endsWith(".example")) return [];
|
|
2825
|
-
return [{
|
|
2826
|
-
message: `${file.path} contains ${secret.key} but isn't in .gitignore.`,
|
|
2827
|
-
target: file.path,
|
|
2828
|
-
location: {
|
|
2829
|
-
file: file.path,
|
|
2830
|
-
line: secret.line
|
|
2831
|
-
}
|
|
2832
|
-
}];
|
|
2833
|
-
});
|
|
2834
|
-
}
|
|
2835
3056
|
}
|
|
2836
3057
|
],
|
|
2837
3058
|
...RLS_RULES,
|
|
@@ -2849,7 +3070,8 @@ const RULES = [
|
|
|
2849
3070
|
...FLAG_RULES,
|
|
2850
3071
|
...REALTIME_RULES,
|
|
2851
3072
|
...ADOPTION_RULES,
|
|
2852
|
-
...MIGRATION_SAFETY_RULES
|
|
3073
|
+
...MIGRATION_SAFETY_RULES,
|
|
3074
|
+
...ENV_RULES
|
|
2853
3075
|
].sort((a, b) => byCodePoint(a.code, b.code));
|
|
2854
3076
|
const RULE_CODES = RULES.map((rule) => rule.code);
|
|
2855
3077
|
async function runRules(context, rules = RULES) {
|
|
@@ -3337,14 +3559,15 @@ async function runDoctor(config, args, env, options = {}) {
|
|
|
3337
3559
|
...options.advisors === void 0 ? {} : { advisors: options.advisors },
|
|
3338
3560
|
...options.database === void 0 ? {} : { database: options.database }
|
|
3339
3561
|
};
|
|
3340
|
-
const [snapshot, envFiles, [configToml, sql], gitignore, sources, readSets, peers] = await Promise.all([
|
|
3562
|
+
const [snapshot, envFiles, [configToml, sql], gitignore, sources, readSets, peers, stackEnv] = await Promise.all([
|
|
3341
3563
|
options.snapshot ?? loadSnapshot(config, env, source, pg, opened.open),
|
|
3342
3564
|
Promise.all(ENV_FILES.map((path) => readText(config.root, path))).then((files) => files.filter((file) => file !== void 0)),
|
|
3343
3565
|
readSupabaseToml(config.root).then(async (toml) => [toml, await sqlFiles(config.root, toml, sqlWorkflow(config, toml))]),
|
|
3344
3566
|
readText(config.root, ".gitignore"),
|
|
3345
3567
|
sourceFiles(config),
|
|
3346
3568
|
compiledReadSets(config).catch((cause) => ({ skipped: errorText(cause) })),
|
|
3347
|
-
options.peers ?? peerVersions(config.root).catch(() => [])
|
|
3569
|
+
options.peers ?? peerVersions(config.root).catch(() => []),
|
|
3570
|
+
options.stackEnv ?? (rules.some((rule) => rule.code === "BS503") ? loadStackEnvCheck(config.root, env, options.signal) : void 0)
|
|
3348
3571
|
]).catch(async (cause) => {
|
|
3349
3572
|
await opened.close();
|
|
3350
3573
|
throw cause;
|
|
@@ -3364,6 +3587,7 @@ async function runDoctor(config, args, env, options = {}) {
|
|
|
3364
3587
|
sources,
|
|
3365
3588
|
readSets,
|
|
3366
3589
|
peers,
|
|
3590
|
+
...stackEnv ? { stackEnv } : {},
|
|
3367
3591
|
...live.advisors ? { advisors: live.advisors } : {},
|
|
3368
3592
|
...live.database ? { database: live.database } : {},
|
|
3369
3593
|
...stats ? { stats } : {},
|
|
@@ -2,7 +2,7 @@ import { n as CliError } from "./errors-Caiz_0so.js";
|
|
|
2
2
|
import { t as byCodePoint } from "./compare-BmIWVEui.js";
|
|
3
3
|
import { s as restrictSchemas, u as tsTypeOf } from "./typegen--TfvOPLh.js";
|
|
4
4
|
import { t as isRecord } from "./guards-CUlDNYZs.js";
|
|
5
|
-
import { t as toCatalog } from "./catalog-
|
|
5
|
+
import { t as toCatalog } from "./catalog-Cm6BtquM.js";
|
|
6
6
|
import { resolveProviderSql } from "better-supabase/sql";
|
|
7
7
|
import { DEFAULT_CLAIMS, tenantClaimPaths } from "better-supabase/config";
|
|
8
8
|
import { toCamel } from "better-supabase";
|
|
@@ -856,9 +856,13 @@ function updateEntries(columns, name) {
|
|
|
856
856
|
return `${prop(column[name])}?: ${nullable(column.tsType, column.nullable)};`;
|
|
857
857
|
});
|
|
858
858
|
}
|
|
859
|
-
/**
|
|
859
|
+
/**
|
|
860
|
+
* Postgres passes `null` to any argument, so every argument accepts it. An
|
|
861
|
+
* optional argument also accepts `undefined`, which `rpc()` leaves out, so
|
|
862
|
+
* `exactOptionalPropertyTypes` apps can pass a maybe-missing value.
|
|
863
|
+
*/
|
|
860
864
|
function argEntries(fn) {
|
|
861
|
-
return fn.args.map((arg) => `${prop(arg.name)}${arg.optional ? "?" : ""}: ${nullable(arg.tsType, true)};`);
|
|
865
|
+
return fn.args.map((arg) => `${prop(arg.name)}${arg.optional ? "?" : ""}: ${nullable(arg.tsType, true)}${arg.optional ? " | undefined" : ""};`);
|
|
862
866
|
}
|
|
863
867
|
function enrichedDatabase(model) {
|
|
864
868
|
const schemas = model.config.schemas.flatMap((schema) => {
|
|
@@ -1004,6 +1008,8 @@ const RESERVED_EXPORTS = [
|
|
|
1004
1008
|
"WhereOf",
|
|
1005
1009
|
"OrderByOf",
|
|
1006
1010
|
"OrderTermOf",
|
|
1011
|
+
"WritableColumnOf",
|
|
1012
|
+
"GeneratedColumnOf",
|
|
1007
1013
|
"buckets",
|
|
1008
1014
|
"topics",
|
|
1009
1015
|
"subjectTypes",
|
|
@@ -1022,7 +1028,7 @@ function emitModule(model, options) {
|
|
|
1022
1028
|
`import { defineSchema, type Schema${options.inlineMeta ? ", type SchemaMeta" : ""} } from ${q(runtime)};`
|
|
1023
1029
|
];
|
|
1024
1030
|
const storagePaths = model.tables.some((table) => table.columns.some((column) => column.storage !== void 0));
|
|
1025
|
-
lines.push(`import type { EnrichDatabase, MutableWhere, OrderByArg, OrderByInput${storagePaths ? ", StoragePath" : ""} } from ${q(runtime)};`, `import type { Database as SupabaseDatabase } from ${q(options.databaseTypesImport ?? "./database.types.ts")};`);
|
|
1031
|
+
lines.push(`import type { EnrichDatabase, GeneratedColumns, MutableWhere, OrderByArg, OrderByInput${storagePaths ? ", StoragePath" : ""}, WritableColumns } from ${q(runtime)};`, `import type { Database as SupabaseDatabase } from ${q(options.databaseTypesImport ?? "./database.types.ts")};`);
|
|
1026
1032
|
const byFile = /* @__PURE__ */ new Map();
|
|
1027
1033
|
for (const entry of model.jsonImports) {
|
|
1028
1034
|
const list = byFile.get(entry.from) ?? [];
|
|
@@ -1049,7 +1055,7 @@ function emitModule(model, options) {
|
|
|
1049
1055
|
lines.push(`export const ${claim(constant, source)} = [${column.values.map(q).join(", ")}] as const;`, `export type ${claim(typeName, source)} = (typeof ${constant})[number];`);
|
|
1050
1056
|
}
|
|
1051
1057
|
if (model.enums.length > 0) lines.push("");
|
|
1052
|
-
lines.push(...modelsType(model), "", ...functionsType(model), "", "export type TableName = keyof Models;", "/** Constraint names for `isConflict`, `isCheck` and `isForeignKey`. */", "export type UniqueConstraint = { [T in TableName]: Extract<keyof Models[T]['UniqueKeys'], string> }[TableName];", "export type CheckConstraint = Models[TableName]['Checks'];", "export type ForeignKeyConstraint = Models[TableName]['ForeignKeys'];", "export type RowOf<T extends TableName> = Models[T]['Row'];", "export type InsertOf<T extends TableName> = Models[T]['Insert'];", "export type UpdateOf<T extends TableName> = Models[T]['Update'];", "/** A `where` for `T` you can assign to one key at a time. */", "export type WhereOf<T extends TableName> = MutableWhere<Models, T>;", "/** An `orderBy` for `T`: one sort or a list, by column or to-one relation. */", "export type OrderByOf<T extends TableName> = OrderByArg<Models, T>;", "/** One sort term of `T`'s `orderBy`, by column or to-one relation. */", "export type OrderTermOf<T extends TableName> = OrderByInput<Models, T>;", "");
|
|
1058
|
+
lines.push(...modelsType(model), "", ...functionsType(model), "", "export type TableName = keyof Models;", "/** Constraint names for `isConflict`, `isCheck` and `isForeignKey`. */", "export type UniqueConstraint = { [T in TableName]: Extract<keyof Models[T]['UniqueKeys'], string> }[TableName];", "export type CheckConstraint = Models[TableName]['Checks'];", "export type ForeignKeyConstraint = Models[TableName]['ForeignKeys'];", "export type RowOf<T extends TableName> = Models[T]['Row'];", "export type InsertOf<T extends TableName> = Models[T]['Insert'];", "export type UpdateOf<T extends TableName> = Models[T]['Update'];", "/** A `where` for `T` you can assign to one key at a time. */", "export type WhereOf<T extends TableName> = MutableWhere<Models, T>;", "/** An `orderBy` for `T`: one sort or a list, by column or to-one relation. */", "export type OrderByOf<T extends TableName> = OrderByArg<Models, T>;", "/** One sort term of `T`'s `orderBy`, by column or to-one relation. */", "export type OrderTermOf<T extends TableName> = OrderByInput<Models, T>;", "/** Columns of `T` that `Insert` and `Update` accept. */", "export type WritableColumnOf<T extends TableName> = WritableColumns<Models, T>;", "/** Columns of `T` the database fills (generated columns): in `Row`, never writable. */", "export type GeneratedColumnOf<T extends TableName> = GeneratedColumns<Models, T>;", "");
|
|
1053
1059
|
if (model.meta.buckets) lines.push("/** Bucket configs for `defineBucket` from `better-supabase/storage`. */", `export const buckets = ${JSON.stringify(model.meta.buckets, null, 2)} as const;`, "");
|
|
1054
1060
|
if (model.meta.topics) lines.push("/** Topic templates for `defineTopic` from `better-supabase/realtime`. */", `export const topics = ${JSON.stringify(model.meta.topics, null, 2)} as const;`, "");
|
|
1055
1061
|
const subjects = Object.keys(model.config.subjects);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { t as PROCESS_ENV, n as configEnvironment, r as isCi, i as parseEnv } from "./env-
|
|
1
|
+
export { t as PROCESS_ENV, n as configEnvironment, r as isCi, i as parseEnv } from "./env-C8R7Nf0a.js";
|
|
@@ -1070,7 +1070,8 @@ function parseEnv(env) {
|
|
|
1070
1070
|
HOME: optionalString,
|
|
1071
1071
|
CI: optionalString,
|
|
1072
1072
|
BETTER_SUPABASE_ENV: optionalString,
|
|
1073
|
-
BETTER_SUPABASE_AGENT: optionalString
|
|
1073
|
+
BETTER_SUPABASE_AGENT: optionalString,
|
|
1074
|
+
BSB_STACK: optionalString
|
|
1074
1075
|
},
|
|
1075
1076
|
runtimeEnv: env,
|
|
1076
1077
|
isServer: true,
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { n as envCommand } from "./env-Dh5K5t2U.js";
|