better-supabase 0.31.0 → 0.33.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 +11 -10
- package/codemods/0.32.json +31 -0
- package/dist/access-sql-Dao1C0fz.js +383 -0
- package/dist/actor-B5b0i1Fs.js +149 -0
- package/dist/actor-DseNR02I.d.ts +104 -0
- package/dist/adapter-CWzyKepA.js +2260 -0
- package/dist/agents-DXiOPB3V.d.ts +115 -0
- package/dist/ai-cache-CLiAXCPH.d.ts +80 -0
- package/dist/ai-cache-D9D36eh4.js +86 -0
- package/dist/ai-chat-DlcBdOhJ.d.ts +532 -0
- package/dist/ai-files-DCMVGSds.js +337 -0
- package/dist/ai-message-cnroprVB.js +13 -0
- package/dist/ai-schedules-Drx2KRTn.d.ts +164 -0
- package/dist/ai-sdk/agents/index.d.ts +8 -12
- package/dist/ai-sdk/agents/index.js +10 -12
- package/dist/ai-sdk/batches/index.d.ts +12 -7
- package/dist/ai-sdk/batches/index.js +16 -9
- package/dist/ai-sdk/cache/index.d.ts +2 -4
- package/dist/ai-sdk/cache/index.js +3 -4
- package/dist/ai-sdk/chat/index.d.ts +77 -2
- package/dist/ai-sdk/chat/index.js +179 -28
- package/dist/ai-sdk/embeddings/index.d.ts +2 -2
- package/dist/ai-sdk/embeddings/index.js +1 -1
- package/dist/ai-sdk/files/index.d.ts +3 -5
- package/dist/ai-sdk/files/index.js +5 -6
- package/dist/ai-sdk/index.d.ts +75 -21
- package/dist/ai-sdk/index.js +112 -66
- package/dist/ai-sdk/mcp/index.d.ts +28 -13
- package/dist/ai-sdk/mcp/index.js +56 -17
- package/dist/ai-sdk/memory/index.d.ts +3 -5
- package/dist/ai-sdk/memory/index.js +3 -4
- package/dist/ai-sdk/react/index.d.ts +2 -2
- package/dist/ai-sdk/react/index.js +3 -1
- package/dist/ai-sdk/react/server.d.ts +7 -4
- package/dist/ai-sdk/react/server.js +10 -3
- package/dist/ai-sdk/workflow/index.d.ts +12 -13
- package/dist/ai-sdk/workflow/index.js +17 -17
- package/dist/ai-sdk/workflow/react/index.d.ts +1 -3
- package/dist/ai-sdk/workflow/react/index.js +3 -3
- package/dist/ai-sdk/workflow/react/server.d.ts +1 -3
- package/dist/ai-sdk/workflow/react/server.js +1 -2
- package/dist/anchors-sCLvYj-8.d.ts +36 -0
- package/dist/api-keys-DbIbkGxx.d.ts +211 -0
- package/dist/api-myq2e9t5.d.ts +482 -0
- package/dist/api-wwix_K5c.js +691 -0
- package/dist/app-tables-IrglDJCs.d.ts +26 -0
- package/dist/approvals-DZoGtNFv.d.ts +127 -0
- package/dist/approvals-Da4uAANx.js +166 -0
- package/dist/assistant-BEbRPjhn.d.ts +209 -0
- package/dist/astro/index.d.ts +7 -10
- package/dist/astro/index.js +8 -9
- package/dist/attachments-BWtUQgsL.js +375 -0
- package/dist/attributes-BZNkR2z2.js +51 -0
- package/dist/auth-link-BmJsQG4a.js +117 -0
- package/dist/auth-link-DRjtI1Ky.d.ts +102 -0
- package/dist/auth-module-CqXdm8qD.js +50 -0
- package/dist/auth-reply-BMPJQssh.d.ts +9 -0
- package/dist/auth-reply-Cnwn3I_q.js +30 -0
- package/dist/auth-wFlGgwTZ.js +19 -0
- package/dist/authorization-BlmDNI2b.d.ts +3734 -0
- package/dist/authorization-hooks-CxwsRnfV.d.ts +219 -0
- package/dist/authorizer-BtIPDO-c.js +194 -0
- package/dist/automation-acq3iK9y.js +74 -0
- package/dist/automations-BfH8GJqv.js +27 -0
- package/dist/automations-Bw5cX7oj.js +29 -0
- package/dist/automations-CCc5RUw-.js +31 -0
- package/dist/automations-Dou1t3lt.js +313 -0
- package/dist/availability-CebEOfMN.d.ts +236 -0
- package/dist/base64-CVyKHBBw.js +41 -0
- package/dist/batch-limit-DqQ3d6op.js +4 -0
- package/dist/before-route-Ra3OhI2x.js +29 -0
- package/dist/better-result/index.d.ts +4 -6
- package/dist/better-result/index.js +2 -3
- package/dist/bind-DP-KLgYI.d.ts +102 -0
- package/dist/block-authors-C5z3tGVu.d.ts +10 -0
- package/dist/block-authors-DCQ4zl8e.js +13 -0
- package/dist/block-env-CJ38ZSTP.d.ts +30 -0
- package/dist/block-event-listener-DCi7c89M.js +15 -0
- package/dist/block-events-Bp6GPIBN.js +82 -0
- package/dist/block-fields-Bjcv6_zc.js +139 -0
- package/dist/block-fields-Puv5m5D3.d.ts +56 -0
- package/dist/block-helpers-I7UzjNEf.js +435 -0
- package/dist/block-helpers-disoUWCp.d.ts +56 -0
- package/dist/block-hooks-CadxQ9-_.js +129 -0
- package/dist/block-hooks-DrA_d1dJ.d.ts +115 -0
- package/dist/block-method-DIbWG4Mj.js +20 -0
- package/dist/block-method-QSaPsL2P.d.ts +12 -0
- package/dist/block-subjects-Br2MQNFn.d.ts +4 -0
- package/dist/block-subjects-cRlVtKDO.js +54 -0
- package/dist/block-tables-CQTU71zn.d.ts +34 -0
- package/dist/block-tenant-Bun03JuO.js +13 -0
- package/dist/block-transport-BEtC_Kis.d.ts +67 -0
- package/dist/blocks/access-requests/index.d.ts +9 -15
- package/dist/blocks/access-requests/index.js +11 -14
- package/dist/blocks/activities/index.d.ts +13 -21
- package/dist/blocks/activities/index.js +16 -21
- package/dist/blocks/agents/index.d.ts +4 -8
- package/dist/blocks/agents/index.js +11 -14
- package/dist/blocks/ai-cache/index.d.ts +3 -5
- package/dist/blocks/ai-cache/index.js +5 -6
- package/dist/blocks/ai-chat/index.d.ts +10 -19
- package/dist/blocks/ai-chat/index.js +20 -28
- package/dist/blocks/ai-files/index.d.ts +5 -9
- package/dist/blocks/ai-files/index.js +5 -6
- package/dist/blocks/ai-keys/index.d.ts +4 -10
- package/dist/blocks/ai-keys/index.js +14 -18
- package/dist/blocks/ai-schedules/index.d.ts +3 -5
- package/dist/blocks/ai-schedules/index.js +14 -16
- package/dist/blocks/announcements/index.d.ts +12 -20
- package/dist/blocks/announcements/index.js +12 -16
- package/dist/blocks/api-keys/index.d.ts +4 -116
- package/dist/blocks/api-keys/index.js +17 -22
- package/dist/blocks/approvals/index.d.ts +4 -8
- package/dist/blocks/approvals/index.js +7 -173
- package/dist/blocks/assets/index.d.ts +9 -17
- package/dist/blocks/assets/index.js +13 -17
- package/dist/blocks/assignment/index.d.ts +9 -17
- package/dist/blocks/assignment/index.js +10 -14
- package/dist/blocks/attachments/index.d.ts +6 -18
- package/dist/blocks/attachments/index.js +19 -24
- package/dist/blocks/audit/index.d.ts +15 -31
- package/dist/blocks/audit/index.js +27 -35
- package/dist/blocks/automations/index.d.ts +14 -26
- package/dist/blocks/automations/index.js +18 -23
- package/dist/blocks/billable-time/index.d.ts +9 -19
- package/dist/blocks/billable-time/index.js +15 -20
- package/dist/blocks/billing/index.d.ts +12 -22
- package/dist/blocks/billing/index.js +19 -24
- package/dist/blocks/bookings/index.d.ts +8 -18
- package/dist/blocks/bookings/index.js +17 -23
- package/dist/blocks/bulk/index.d.ts +6 -12
- package/dist/blocks/bulk/index.js +10 -13
- package/dist/blocks/calendar/index.d.ts +13 -23
- package/dist/blocks/calendar/index.js +35 -32
- package/dist/blocks/catalog/index.d.ts +12 -20
- package/dist/blocks/catalog/index.js +17 -21
- package/dist/blocks/channels/index.d.ts +9 -17
- package/dist/blocks/channels/index.js +11 -15
- package/dist/blocks/collections/index.d.ts +11 -17
- package/dist/blocks/collections/index.js +13 -16
- package/dist/blocks/comments/index.d.ts +16 -26
- package/dist/blocks/comments/index.js +21 -26
- package/dist/blocks/compliance/index.d.ts +9 -17
- package/dist/blocks/compliance/index.js +13 -17
- package/dist/blocks/connectors/index.d.ts +4 -8
- package/dist/blocks/connectors/index.js +13 -16
- package/dist/blocks/contacts/index.d.ts +10 -18
- package/dist/blocks/contacts/index.js +12 -16
- package/dist/blocks/content/index.d.ts +8 -16
- package/dist/blocks/content/index.js +13 -17
- package/dist/blocks/contracts/index.d.ts +11 -21
- package/dist/blocks/contracts/index.js +17 -22
- package/dist/blocks/courses/index.d.ts +11 -21
- package/dist/blocks/courses/index.js +17 -22
- package/dist/blocks/created-by/index.d.ts +3 -7
- package/dist/blocks/created-by/index.js +4 -5
- package/dist/blocks/custom-fields/index.d.ts +10 -16
- package/dist/blocks/custom-fields/index.js +13 -16
- package/dist/blocks/data-lifecycle/index.d.ts +10 -26
- package/dist/blocks/data-lifecycle/index.js +17 -23
- package/dist/blocks/deals/index.d.ts +12 -20
- package/dist/blocks/deals/index.js +18 -22
- package/dist/blocks/dispatch/index.d.ts +11 -23
- package/dist/blocks/dispatch/index.js +19 -24
- package/dist/blocks/documents/index.d.ts +4 -8
- package/dist/blocks/documents/index.js +9 -12
- package/dist/blocks/domains/index.d.ts +8 -14
- package/dist/blocks/domains/index.js +12 -15
- package/dist/blocks/donations/index.d.ts +13 -23
- package/dist/blocks/donations/index.js +21 -26
- package/dist/blocks/drive/index.d.ts +116 -20
- package/dist/blocks/drive/index.js +138 -26
- package/dist/blocks/employees/index.d.ts +13 -23
- package/dist/blocks/employees/index.js +18 -23
- package/dist/blocks/enrichment/index.d.ts +8 -16
- package/dist/blocks/enrichment/index.js +11 -15
- package/dist/blocks/enrollments/index.d.ts +9 -17
- package/dist/blocks/enrollments/index.js +13 -17
- package/dist/blocks/entitlements/index.d.ts +8 -14
- package/dist/blocks/entitlements/index.js +8 -32
- package/dist/blocks/expenses/index.d.ts +22 -19
- package/dist/blocks/expenses/index.js +25 -23
- package/dist/blocks/field-history/index.d.ts +6 -10
- package/dist/blocks/field-history/index.js +5 -7
- package/dist/blocks/flags/index.d.ts +49 -20
- package/dist/blocks/flags/index.js +65 -19
- package/dist/blocks/forecasts/index.d.ts +10 -16
- package/dist/blocks/forecasts/index.js +11 -14
- package/dist/blocks/forms/index.d.ts +11 -25
- package/dist/blocks/forms/index.js +17 -24
- package/dist/blocks/goals/index.d.ts +8 -12
- package/dist/blocks/goals/index.js +9 -11
- package/dist/blocks/guests/index.d.ts +9 -19
- package/dist/blocks/guests/index.js +14 -19
- package/dist/blocks/hiring/index.d.ts +10 -18
- package/dist/blocks/hiring/index.js +12 -15
- package/dist/blocks/identities/index.d.ts +7 -11
- package/dist/blocks/identities/index.js +7 -9
- package/dist/blocks/imports/index.d.ts +8 -18
- package/dist/blocks/imports/index.js +11 -16
- package/dist/blocks/inbox/index.d.ts +11 -21
- package/dist/blocks/inbox/index.js +26 -23
- package/dist/blocks/incidents/index.d.ts +9 -17
- package/dist/blocks/incidents/index.js +14 -18
- package/dist/blocks/index.d.ts +14 -20
- package/dist/blocks/index.js +17 -20
- package/dist/blocks/inventory/index.d.ts +11 -17
- package/dist/blocks/inventory/index.js +12 -15
- package/dist/blocks/invoices/index.d.ts +34 -21
- package/dist/blocks/invoices/index.js +31 -18
- package/dist/blocks/knowledge/index.d.ts +3 -5
- package/dist/blocks/knowledge/index.js +5 -6
- package/dist/blocks/lead-scoring/index.d.ts +10 -14
- package/dist/blocks/lead-scoring/index.js +11 -13
- package/dist/blocks/leases/index.d.ts +11 -21
- package/dist/blocks/leases/index.js +20 -25
- package/dist/blocks/leave/index.d.ts +50 -17
- package/dist/blocks/leave/index.js +35 -14
- package/dist/blocks/ledger/index.d.ts +9 -17
- package/dist/blocks/ledger/index.js +13 -17
- package/dist/blocks/mail-sync/index.d.ts +6 -12
- package/dist/blocks/mail-sync/index.js +26 -25
- package/dist/blocks/memberships/index.d.ts +5 -9
- package/dist/blocks/memberships/index.js +4 -5
- package/dist/blocks/memory/index.d.ts +4 -8
- package/dist/blocks/memory/index.js +12 -15
- package/dist/blocks/messaging/index.d.ts +14 -24
- package/dist/blocks/messaging/index.js +19 -24
- package/dist/blocks/metrics/index.d.ts +9 -17
- package/dist/blocks/metrics/index.js +14 -18
- package/dist/blocks/mfa/index.d.ts +5 -9
- package/dist/blocks/mfa/index.js +7 -9
- package/dist/blocks/moderation/index.d.ts +9 -17
- package/dist/blocks/moderation/index.js +13 -17
- package/dist/blocks/notifications/index.d.ts +18 -34
- package/dist/blocks/notifications/index.js +32 -42
- package/dist/blocks/numbering/index.d.ts +6 -12
- package/dist/blocks/numbering/index.js +8 -11
- package/dist/blocks/oauth-server/index.d.ts +7 -13
- package/dist/blocks/oauth-server/index.js +12 -15
- package/dist/blocks/onboarding/index.d.ts +7 -13
- package/dist/blocks/onboarding/index.js +8 -11
- package/dist/blocks/orders/index.d.ts +17 -29
- package/dist/blocks/orders/index.js +22 -28
- package/dist/blocks/organizations/index.d.ts +11 -21
- package/dist/blocks/organizations/index.js +16 -19
- package/dist/blocks/outbox/index.d.ts +4 -6
- package/dist/blocks/outbox/index.js +11 -13
- package/dist/blocks/passes/index.d.ts +12 -22
- package/dist/blocks/passes/index.js +20 -25
- package/dist/blocks/permissions/index.d.ts +50 -15
- package/dist/blocks/permissions/index.js +99 -19
- package/dist/blocks/pipelines/index.d.ts +12 -18
- package/dist/blocks/pipelines/index.js +12 -15
- package/dist/blocks/posts/index.d.ts +10 -18
- package/dist/blocks/posts/index.js +15 -19
- package/dist/blocks/profiles/index.d.ts +8 -12
- package/dist/blocks/profiles/index.js +9 -11
- package/dist/blocks/promotions/index.d.ts +11 -17
- package/dist/blocks/promotions/index.js +13 -16
- package/dist/blocks/push/index.d.ts +12 -18
- package/dist/blocks/push/index.js +13 -16
- package/dist/blocks/queue/index.d.ts +187 -39
- package/dist/blocks/queue/index.js +226 -60
- package/dist/blocks/quotes/index.d.ts +13 -21
- package/dist/blocks/quotes/index.js +14 -17
- package/dist/blocks/rank/index.d.ts +7 -13
- package/dist/blocks/rank/index.js +8 -10
- package/dist/blocks/reactions/index.d.ts +11 -19
- package/dist/blocks/reactions/index.js +13 -17
- package/dist/blocks/relations/index.d.ts +11 -21
- package/dist/blocks/relations/index.js +18 -23
- package/dist/blocks/reminders/index.d.ts +12 -22
- package/dist/blocks/reminders/index.js +21 -25
- package/dist/blocks/reviews/index.d.ts +9 -15
- package/dist/blocks/reviews/index.js +11 -14
- package/dist/blocks/saved-views/index.d.ts +11 -21
- package/dist/blocks/saved-views/index.js +16 -21
- package/dist/blocks/scores/index.d.ts +6 -12
- package/dist/blocks/scores/index.js +10 -13
- package/dist/blocks/search/index.d.ts +9 -19
- package/dist/blocks/search/index.js +15 -19
- package/dist/blocks/security-events/index.d.ts +10 -24
- package/dist/blocks/security-events/index.js +17 -23
- package/dist/blocks/segments/index.d.ts +10 -18
- package/dist/blocks/segments/index.js +11 -15
- package/dist/blocks/sequences/index.d.ts +9 -17
- package/dist/blocks/sequences/index.js +15 -19
- package/dist/blocks/service-accounts/index.d.ts +9 -15
- package/dist/blocks/service-accounts/index.js +11 -14
- package/dist/blocks/sessions/index.d.ts +4 -8
- package/dist/blocks/sessions/index.js +9 -11
- package/dist/blocks/settings/index.d.ts +8 -16
- package/dist/blocks/settings/index.js +14 -18
- package/dist/blocks/share-links/index.d.ts +9 -17
- package/dist/blocks/share-links/index.js +16 -20
- package/dist/blocks/shipments/index.d.ts +14 -24
- package/dist/blocks/shipments/index.js +25 -31
- package/dist/blocks/signatures/index.d.ts +10 -16
- package/dist/blocks/signatures/index.js +10 -13
- package/dist/blocks/signing-keys/index.d.ts +5 -9
- package/dist/blocks/signing-keys/index.js +8 -10
- package/dist/blocks/sla/index.d.ts +11 -19
- package/dist/blocks/sla/index.js +17 -21
- package/dist/blocks/sso/index.d.ts +7 -19
- package/dist/blocks/sso/index.js +14 -21
- package/dist/blocks/state-machine/index.d.ts +7 -13
- package/dist/blocks/state-machine/index.js +9 -12
- package/dist/blocks/subjects/index.d.ts +7 -11
- package/dist/blocks/subjects/index.js +12 -14
- package/dist/blocks/tags/index.d.ts +11 -21
- package/dist/blocks/tags/index.js +20 -25
- package/dist/blocks/tasks/index.d.ts +13 -27
- package/dist/blocks/tasks/index.js +22 -29
- package/dist/blocks/teams/index.d.ts +8 -14
- package/dist/blocks/teams/index.js +10 -13
- package/dist/blocks/templates/index.d.ts +12 -22
- package/dist/blocks/templates/index.js +16 -21
- package/dist/blocks/time-tracking/index.d.ts +31 -25
- package/dist/blocks/time-tracking/index.js +29 -29
- package/dist/blocks/timeline/index.d.ts +10 -14
- package/dist/blocks/timeline/index.js +11 -13
- package/dist/blocks/trash/index.d.ts +10 -18
- package/dist/blocks/trash/index.js +11 -14
- package/dist/blocks/undo/index.d.ts +4 -8
- package/dist/blocks/undo/index.js +6 -8
- package/dist/blocks/updated-at/index.d.ts +3 -7
- package/dist/blocks/updated-at/index.js +4 -5
- package/dist/blocks/usage/index.d.ts +6 -10
- package/dist/blocks/usage/index.js +10 -13
- package/dist/blocks/vercel-marketplace/index.d.ts +9 -17
- package/dist/blocks/vercel-marketplace/index.js +17 -21
- package/dist/blocks/versions/index.d.ts +10 -20
- package/dist/blocks/versions/index.js +17 -22
- package/dist/blocks/waitlist/index.d.ts +10 -16
- package/dist/blocks/waitlist/index.js +11 -14
- package/dist/blocks/webhooks/index.d.ts +16 -34
- package/dist/blocks/webhooks/index.js +33 -44
- package/dist/blocks/workflow-editor/index.d.ts +13 -21
- package/dist/blocks/workflow-editor/index.js +22 -27
- package/dist/blocks/workflows/index.d.ts +8 -14
- package/dist/blocks/workflows/index.js +14 -18
- package/dist/bookings-Br0VXzaf.d.ts +285 -0
- package/dist/bucket-DvG66r5G.d.ts +693 -0
- package/dist/build-Ckxct2EX.js +2065 -0
- package/dist/build-D1-V9dd8.js +732 -0
- package/dist/carrier-D2b_028L.d.ts +165 -0
- package/dist/casing-DQzG9ANZ.js +15 -0
- package/dist/channel-B_kufDZy.d.ts +101 -0
- package/dist/channels-BxeTTtCY.js +113 -0
- package/dist/chat-sdk/index.d.ts +174 -41
- package/dist/chat-sdk/index.js +425 -83
- package/dist/claim-names-BKig1LOk.js +24 -0
- package/dist/claims/index.d.ts +8 -0
- package/dist/claims/index.js +8 -0
- package/dist/claims-CqTr_N1n.js +98 -0
- package/dist/claims-DouHL7ZL.js +62 -0
- package/dist/cli/_format-Ba0DoWjl.js +99 -0
- package/dist/cli/add-BDLLVLI8.js +99 -0
- package/dist/cli/add-BaOCKKt6.js +1 -0
- package/dist/cli/add-D2pKTbPw.js +1222 -0
- package/dist/cli/agent-59XWXsRi.js +184 -0
- package/dist/cli/app-table-files-CimWi_eh.js +343 -0
- package/dist/cli/arazzo-1.0-D3OaSeZw.js +531 -0
- package/dist/cli/arazzo-1.1-DaT2KAkP.js +704 -0
- package/dist/cli/args-_ZVgRBkx.js +26 -0
- package/dist/cli/asyncapi-3.0.0-Ca-UwtUW.js +5592 -0
- package/dist/cli/asyncapi-3.1.0-DUxf5zNu.js +5832 -0
- package/dist/cli/authorization-DJkkOjjG.js +230 -0
- package/dist/cli/backfill-B1xAsdL4.js +292 -0
- package/dist/cli/bin.js +5 -5
- package/dist/cli/blocks-DtZtn-R4.js +1 -0
- package/dist/cli/blocks-rBeis04I.js +155 -0
- package/dist/cli/cache-CvBRwv02.js +643 -0
- package/dist/cli/codemod-DYbVbJ-e.js +2884 -0
- package/dist/cli/codemod-block-renames-Dt3X1Wvg.js +238 -0
- package/dist/cli/command-BpZ4AuhR.js +1021 -0
- package/dist/cli/compare-yl4sSwVn.js +8 -0
- package/dist/cli/completion-B08Q0xB3.js +29 -0
- package/dist/cli/completion-CwL7e93t.js +210 -0
- package/dist/cli/completion-DHTT6rjI.js +1 -0
- package/dist/cli/config-CrwCec-B.js +1 -0
- package/dist/cli/config-D-Upz3jV.js +46 -0
- package/dist/cli/config-DrrkMihk.js +2030 -0
- package/dist/cli/config-edit-C6sQ1MqT.js +619 -0
- package/dist/cli/config-group-D4JWh4kG.js +388 -0
- package/dist/cli/content-mapper-DrhtDsAm.js +181 -0
- package/dist/cli/db-B8zfxjl2.js +77 -0
- package/dist/cli/db-Diy1OebO.js +246 -0
- package/dist/cli/detect-BcUDaO8I.js +83 -0
- package/dist/cli/dist-CYnD1kyT.js +128 -0
- package/dist/cli/dist-MKwjiW2w.js +1114 -0
- package/dist/cli/doctor-Dn4TzGmw.js +4687 -0
- package/dist/cli/env-BAJn6wCA.js +142 -0
- package/dist/cli/env-BCuUsWOh.js +1109 -0
- package/dist/cli/env-D70ihdbB.js +1 -0
- package/dist/cli/env-UN6PJFX6.js +1 -0
- package/dist/cli/errors-DcJ_PayO.js +97 -0
- package/dist/cli/exec-CXBufciC.js +461 -0
- package/dist/cli/fastest-levenshtein-B_QF6At5.js +119 -0
- package/dist/cli/files-DQayErI8.js +999 -0
- package/dist/cli/fresh-import-CdO2oQaQ.js +39 -0
- package/dist/cli/gen-BbeS0KgF.js +390 -0
- package/dist/cli/guards-DxwRG0Uv.js +7 -0
- package/dist/cli/in-stack-diff-huI7fGMX.js +185 -0
- package/dist/cli/index.d.ts +1 -53
- package/dist/cli/index.js +10 -11
- package/dist/cli/init-C30xdMSs.js +556 -0
- package/dist/cli/io-CQzy8PEZ.js +36 -0
- package/dist/cli/json5-DhsZB2va.js +784 -0
- package/dist/cli/jsonc-DU9Clnrz.js +1 -0
- package/dist/cli/jsonc-u_UiXFxs.js +43 -0
- package/dist/cli/keys-CxajkV_7.js +105 -0
- package/dist/cli/legacy-prefix-D8Jfku6I.js +153 -0
- package/dist/cli/live-Ctc8Qh9Y.js +339 -0
- package/dist/cli/mcp-5J0kUOtD.js +240 -0
- package/dist/cli/metadata-DxhUNctA.js +149 -0
- package/dist/cli/migrate-ockrh3UX.js +45 -0
- package/dist/cli/migration-safety-CLrqC0D-.js +925 -0
- package/dist/cli/migrations-CZTg2UJM.js +116 -0
- package/dist/cli/module-migration-BptQzmj2.js +118 -0
- package/dist/cli/moved-BAFPdJz_.js +253 -0
- package/dist/cli/ohash-imLR_J5Y.js +276 -0
- package/dist/cli/openapi-3.0-BJiTNq_x.js +927 -0
- package/dist/cli/openapi-3.1-BcWCoii2.js +869 -0
- package/dist/cli/openapi-3.2-MXPkeoTk.js +1030 -0
- package/dist/cli/orphans-CPcR85QN.js +27 -0
- package/dist/cli/parse-BueItuNJ.js +181 -0
- package/dist/cli/powersync-CmsXOuui.js +1 -0
- package/dist/cli/powersync-DIvsipKr.js +375 -0
- package/dist/cli/preset-BQnjDCSR.js +100 -0
- package/dist/cli/print-DdHt8xCc.js +66 -0
- package/dist/cli/prompts-D9b6uf21.js +1133 -0
- package/dist/cli/providers-k-1cEna6.js +99 -0
- package/dist/cli/prune-workflows-Ddv-GfkO.js +153 -0
- package/dist/cli/redact--zOGdWzo.js +37 -0
- package/dist/cli/remove-DEEQDoc7.js +237 -0
- package/dist/cli/render-SjSVz8yK.js +2216 -0
- package/dist/cli/rolldown-runtime-DegdyBIC.js +25 -0
- package/dist/cli/run-DdhIK7-K.js +1451 -0
- package/dist/cli/run-Ixt9mEb6.js +703 -0
- package/dist/cli/run-dY9uOC3W.js +62 -0
- package/dist/cli/seed-BpaqqyO8.js +187 -0
- package/dist/cli/seed-ByLneY1H.js +1 -0
- package/dist/cli/shared-p6sxli_5.js +150 -0
- package/dist/cli/shell-C1U618XA.js +9 -0
- package/dist/cli/skills-jZThjL3B.js +120 -0
- package/dist/cli/snapshot-Dd_8B9g-.js +728 -0
- package/dist/cli/source-BYvVe_Es.js +317 -0
- package/dist/cli/source-args-Bz5QQne2.js +58 -0
- package/dist/cli/spec-BxQgllJY.js +7449 -0
- package/dist/cli/spec-liRzcZTa.js +1 -0
- package/dist/cli/sql-layout-DHwiUOaD.js +260 -0
- package/dist/cli/stack-147NqctC.js +134 -0
- package/dist/cli/stack-env-BQhbUFa7.js +92 -0
- package/dist/cli/stack-status-Mxgqb3I4.js +45 -0
- package/dist/cli/stacks-C5YL6Un9.js +230 -0
- package/dist/cli/style-B5-nByxb.js +34 -0
- package/dist/cli/supabase-toml-B6-eEV5p.js +1155 -0
- package/dist/cli/sync-CreQWj53.js +318 -0
- package/dist/cli/table-D9FbJS8h.js +88 -0
- package/dist/cli/toml-VX0BsvYq.js +422 -0
- package/dist/cli/topics-Cdg0V7Tt.js +29 -0
- package/dist/cli/trace-D3TNqWBg.js +6 -0
- package/dist/cli/upgrade-3NQOUO1_.js +270 -0
- package/dist/cli/upgrade-U7IKj45h.js +40 -0
- package/dist/cli/validate-C_WTnX1U.js +7426 -0
- package/dist/cli/version-mBwP-aMG.js +3 -0
- package/dist/cli/yaml-JsusTbcC.js +2250 -0
- package/dist/client/index.d.ts +7 -7
- package/dist/client/index.js +9 -12
- package/dist/client/native/index.d.ts +7 -23
- package/dist/client/native/index.js +15 -22
- package/dist/client-Bky2z09B.js +290 -0
- package/dist/clone-H_gCsL29.js +32 -0
- package/dist/cloud-event-CLvsaPqH.js +62 -0
- package/dist/cloud-event-DXWmXrus.d.ts +62 -0
- package/dist/codecs-B1VO2BGL.d.ts +220 -0
- package/dist/codecs-B9v5Y5HH.js +357 -0
- package/dist/commerce/index.d.ts +5 -13
- package/dist/commerce/index.js +13 -16
- package/dist/compiler-qlXlokKn.d.ts +12 -0
- package/dist/compose-BRBlPSEY.js +52 -0
- package/dist/composite-CIxjVcL1.d.ts +79 -0
- package/dist/composite-D2JnIiHt.js +125 -0
- package/dist/config/index.d.ts +6 -6
- package/dist/config/index.js +7 -7
- package/dist/config-Bu6pwqcO.js +1102 -0
- package/dist/config-MDRA2sre.js +1672 -0
- package/dist/connectors-Cf2LeAuZ.d.ts +145 -0
- package/dist/context-D7jICqdN.d.ts +4279 -0
- package/dist/context-DSevnLrT.js +40 -0
- package/dist/contract/index.d.ts +16 -0
- package/dist/contract/index.js +0 -0
- package/dist/controller-BJmh7gFm.js +78 -0
- package/dist/controller-DxtxeYdf.d.ts +50 -0
- package/dist/controller-y1kSMuCU.js +72 -0
- package/dist/conversion-Bj9j3KnG.js +76 -0
- package/dist/conversion-C9rndpEI.d.ts +84 -0
- package/dist/cookie-DDkqvqe4.d.ts +3 -0
- package/dist/cookie-DJI6xXJ9.js +4 -0
- package/dist/cors-9SDsndtb.d.ts +13 -0
- package/dist/cors-DrDFLMNn.js +23 -0
- package/dist/create/index.d.ts +4 -28
- package/dist/create/index.js +9 -15
- package/dist/create/lite/index.d.ts +5 -25
- package/dist/create/lite/index.js +14 -24
- package/dist/create/oauth/index.d.ts +1 -1
- package/dist/create/oauth/index.js +1 -2
- package/dist/create/supabase/index.d.ts +2 -4
- package/dist/create/supabase/index.js +3 -6
- package/dist/create-blocks-D7q1boXV.js +367 -0
- package/dist/credentials/index.d.ts +6 -10
- package/dist/credentials/index.js +11 -12
- package/dist/cron-BD8VrQQl.js +147 -0
- package/dist/cron-route-DSITg1yC.js +23 -0
- package/dist/csv-Bwn9insJ.js +88 -0
- package/dist/csv-Dd1iKsk-.d.ts +26 -0
- package/dist/data-engine-BbqQwso_.js +174 -0
- package/dist/data-engine-CMENsp3d.d.ts +269 -0
- package/dist/data-hooks-BToeAcQ_.js +277 -0
- package/dist/db-exception-Dv18UZ-I.js +30 -0
- package/dist/deal-forecast-CN_BEy9s.d.ts +21 -0
- package/dist/deal-forecast-DsVFoMkJ.js +38 -0
- package/dist/define-B6D55cO0.js +2073 -0
- package/dist/define-ITQA71fw.d.ts +1242 -0
- package/dist/define-block-22Jv4U_-.js +63 -0
- package/dist/define-block-COmMkx2x.d.ts +1669 -0
- package/dist/delegation-C2rLpkHO.js +147 -0
- package/dist/delivery-CWcbh87x.d.ts +69 -0
- package/dist/delivery-SmPHu2_H.js +28 -0
- package/dist/delivery-events-0mAEuscm.js +52 -0
- package/dist/documents-DeZw83ue.d.ts +150 -0
- package/dist/edge/index.d.ts +20 -26
- package/dist/edge/index.js +20 -24
- package/dist/elysia/index.d.ts +2 -6
- package/dist/elysia/index.js +4 -6
- package/dist/email-BRm6wMWQ.d.ts +40 -0
- package/dist/embeddings--v4BJdUL.js +127 -0
- package/dist/embeddings-rVR2AKVz.d.ts +76 -0
- package/dist/ended-NC_ZesY4.d.ts +22 -0
- package/dist/entitlements-Dydkg-TV.js +47 -0
- package/dist/entitlements-sLoj3M6Y.js +44 -0
- package/dist/entitlements-w04ivvAy.d.ts +70 -0
- package/dist/entity-naming-BES3pkQI.js +130 -0
- package/dist/entity-schema-DEIz0I8i.js +38 -0
- package/dist/env/index.d.ts +1 -1
- package/dist/env/index.js +1 -2
- package/dist/envelope-CapD-JtH.js +90 -0
- package/dist/errors-B7tCfCvX.js +327 -0
- package/dist/errors-BdjHv5SV.js +43 -0
- package/dist/errors-D3-4c-XF.js +102 -0
- package/dist/escape-like-CK6L7gkj.d.ts +26 -0
- package/dist/escape-like-gxNXs145.js +6 -0
- package/dist/eve/index.d.ts +247 -16
- package/dist/eve/index.js +334 -26
- package/dist/eve-DIKjuPp5.d.ts +213 -0
- package/dist/event-calendar-DUtFyRrv.d.ts +63 -0
- package/dist/event-map-DxfsFgQT.js +18 -0
- package/dist/events/index.d.ts +3 -3
- package/dist/events/index.js +7 -8
- package/dist/events-BRKIxVQD.js +25 -0
- package/dist/events-DVt3Z9hw.d.ts +850 -0
- package/dist/events-Da482tiF.js +81 -0
- package/dist/executor-BDMqPbVU.js +482 -0
- package/dist/executor-C0_TT717.js +840 -0
- package/dist/executor-CFmee_nV.d.ts +35 -0
- package/dist/executor-CHnoKOxk.d.ts +168 -0
- package/dist/executor-Dc4Pl44u.js +207 -0
- package/dist/executor-DqNRrFxx.d.ts +99 -0
- package/dist/expo/index.d.ts +5 -9
- package/dist/expo/index.js +10 -12
- package/dist/extension-DQ9-oOVC.js +58 -0
- package/dist/extension-WdHd5uqI.js +102 -0
- package/dist/extension-Z8Pe7fXA.js +120 -0
- package/dist/extension-rdpYvpyN.js +52 -0
- package/dist/extension-shared-DJb_PfD4.js +59 -0
- package/dist/extra-Dz9n5y1s.js +9 -0
- package/dist/field-errors-DKCaSlZw.d.ts +208 -0
- package/dist/field-formats-Cap-V7UP.js +101 -0
- package/dist/field-formats-DVukMbRa.d.ts +36 -0
- package/dist/fields-BBcdKD-S.js +107 -0
- package/dist/fields-CAVk9dxX.d.ts +76 -0
- package/dist/filter-evaluate-Bz3Fzhz2.d.ts +35 -0
- package/dist/filter-evaluate-D_LLfdtE.js +216 -0
- package/dist/filter-query-DV-x8fio.d.ts +131 -0
- package/dist/filter-query-Ds7Z6lgZ.js +565 -0
- package/dist/flags-0EXDD3Iz.js +361 -0
- package/dist/flags-6emyAXly.d.ts +315 -0
- package/dist/flags-sdk/index.d.ts +217 -28
- package/dist/flags-sdk/index.js +255 -35
- package/dist/form-definition-8cCCt5zj.js +362 -0
- package/dist/form-definition-BN8shngm.d.ts +117 -0
- package/dist/format-BT0Z3V54.d.ts +77 -0
- package/dist/framework-BFlaPuvv.d.ts +46 -0
- package/dist/framework-ChzJYkJW.js +58 -0
- package/dist/function-contract-Bf6llTkE.js +7 -0
- package/dist/function-contract-DgDBYbXu.d.ts +25 -0
- package/dist/gateway-DaekJ_Me.d.ts +120 -0
- package/dist/gateway-options-DQGQzdkD.js +26 -0
- package/dist/gateway-options-Mut8jih_.d.ts +27 -0
- package/dist/guards-CsRa6v57.js +11 -0
- package/dist/guest-actions-CEwttioE.js +8 -0
- package/dist/guest-actions-DfHHp98H.d.ts +3 -0
- package/dist/h3/index.d.ts +2 -6
- package/dist/h3/index.js +4 -6
- package/dist/h3/v1/index.d.ts +3 -5
- package/dist/h3/v1/index.js +4 -5
- package/dist/history-6KiVNWdH.js +269 -0
- package/dist/hmac-DNcfpmI9.js +22 -0
- package/dist/hono/index.d.ts +18 -22
- package/dist/hono/index.js +16 -17
- package/dist/http-BDC1IvBX.js +27 -0
- package/dist/http-BRUI3qim.js +140 -0
- package/dist/http-D4lH1xqY.js +39 -0
- package/dist/image-url-bsGeybeg.js +83 -0
- package/dist/impersonation-BOCJcsmS.d.ts +26 -0
- package/dist/impersonation-D-quM36V.js +61 -0
- package/dist/inbox-DavCzW7b.d.ts +326 -0
- package/dist/index-8w4OB5En.d.ts +102 -0
- package/dist/index-BIAtapnD.d.ts +570 -0
- package/dist/index-BWR29Vvw.d.ts +76 -0
- package/dist/index-BZCmy767.d.ts +234 -0
- package/dist/index-BdC2IqkU.d.ts +152 -0
- package/dist/index-BgkHbf9C.d.ts +637 -0
- package/dist/index-BvcMQYL-.d.ts +326 -0
- package/dist/index-CbUXFzQV.d.ts +107 -0
- package/dist/index-CiE37wKX.d.ts +289 -0
- package/dist/index-D18su_r5.d.ts +402 -0
- package/dist/index-DU0UwWvL.d.ts +667 -0
- package/dist/index-Dj4VKpYZ.d.ts +49 -0
- package/dist/index-Dvpu22CJ.d.ts +291 -0
- package/dist/index-IKfbX_39.d.ts +23 -0
- package/dist/index-M1izbwbN.d.ts +145 -0
- package/dist/index.d.ts +13 -41
- package/dist/index.js +29 -34
- package/dist/instance-property-BlH7QSDl.js +6 -0
- package/dist/instances-D31jrmKh.js +16636 -0
- package/dist/invalidate-DAB9CaPm.d.ts +19 -0
- package/dist/iso4217-oKsif_hW.js +175 -0
- package/dist/json-O5vFw243.js +21 -0
- package/dist/json-schema-D9eVL_xi.js +884 -0
- package/dist/jwks-cache-IZaiICAV.js +48 -0
- package/dist/jws-B8p0ppgh.js +204 -0
- package/dist/jws-CxgTsbgG.d.ts +64 -0
- package/dist/kit-9pZP5iLU.js +163 -0
- package/dist/kit-OgFOW9rX.d.ts +92 -0
- package/dist/knowledge-BBC2sfAY.d.ts +215 -0
- package/dist/knowledge-DdZzUTQ-.js +299 -0
- package/dist/lint/index.d.ts +1 -5
- package/dist/lint/index.js +8 -10
- package/dist/list/index.d.ts +3 -3
- package/dist/list/index.js +3 -3
- package/dist/list-query-C7V8kUaD.d.ts +220 -0
- package/dist/list-query-D-tgs1eY.js +558 -0
- package/dist/live-BVi3q4bX.js +277 -0
- package/dist/logger-0LfhvwE4.d.ts +16 -0
- package/dist/logger-BkF8ukXV.js +20 -0
- package/dist/lookup-upE-e1zw.js +17 -0
- package/dist/management-DtX4ic1F.d.ts +55 -0
- package/dist/mapper/bin.js +13 -17
- package/dist/mcp/index.d.ts +4 -299
- package/dist/mcp/index.js +71 -42
- package/dist/mcp/sdk/index.d.ts +7 -11
- package/dist/mcp/sdk/index.js +12 -14
- package/dist/message-Cc4bkdNw.d.ts +97 -0
- package/dist/messages-CRk1g6oe.js +512 -0
- package/dist/messaging-D5z2TR37.d.ts +295 -0
- package/dist/methods-BjfDv4Gy.js +9 -0
- package/dist/metric-definition-2KQYeUZ1.d.ts +67 -0
- package/dist/metric-definition-D4H6IQT7.js +116 -0
- package/dist/mfa-CM5r904M.d.ts +34 -0
- package/dist/model-Lxa_mOzB.d.ts +338 -0
- package/dist/model-messages-BcrkjsPE.js +205 -0
- package/dist/model-messages-CGSUU450.d.ts +32 -0
- package/dist/money-BgpAd7d3.d.ts +89 -0
- package/dist/money-DH--bbYr.js +196 -0
- package/dist/money-codec-SKPm8FPw.js +40 -0
- package/dist/my-work-kinds-DNPq3ccL.js +10 -0
- package/dist/nestjs/index.d.ts +3 -5
- package/dist/nestjs/index.js +5 -6
- package/dist/next/client/index.d.ts +1 -5
- package/dist/next/client/index.js +2 -4
- package/dist/next/image/index.d.ts +1 -3
- package/dist/next/image/index.js +2 -3
- package/dist/next/index.d.ts +98 -106
- package/dist/next/index.js +88 -87
- package/dist/node/index.d.ts +3 -3
- package/dist/node/index.js +6 -7
- package/dist/node-headers-C3FExlg9.js +54 -0
- package/dist/node-headers-TnS4T7V_.d.ts +25 -0
- package/dist/nuxt/index.d.ts +0 -2
- package/dist/nuxt/index.js +1 -2
- package/dist/operations-BNFbWv1t.js +28 -0
- package/dist/operations-CsCwruKT.d.ts +4 -0
- package/dist/optional-peer-5SOYr3lL.js +31 -0
- package/dist/options--rohtkkC.js +4 -0
- package/dist/options-1iHDmlZ5.js +8 -0
- package/dist/options-2QJXZPPS.js +4 -0
- package/dist/options-B-JqrC61.d.ts +8 -0
- package/dist/options-B3xH2JvJ.js +8 -0
- package/dist/options-B4sTqDrt.js +4 -0
- package/dist/options-B56njigZ.js +19 -0
- package/dist/options-B5A3UmKY.d.ts +17 -0
- package/dist/options-B6m9gYRH.d.ts +11 -0
- package/dist/options-B7Pl708M.js +8 -0
- package/dist/options-B7YrdiUc.js +11 -0
- package/dist/options-B8c2_hIB.js +9 -0
- package/dist/options-B9w_Y08G.d.ts +6 -0
- package/dist/options-BDF60ouf.js +4 -0
- package/dist/options-BDMPjyrI.js +4 -0
- package/dist/options-BHdHuY5r.js +14 -0
- package/dist/options-BLMeCbtT.js +31 -0
- package/dist/options-BLQePOPy.d.ts +8 -0
- package/dist/options-BLn1PFyu.js +4 -0
- package/dist/options-BMO-FnOT.js +7 -0
- package/dist/options-BNRvoEkj.js +4 -0
- package/dist/options-BPQOiVx2.js +7 -0
- package/dist/options-BSTJmfX4.js +10 -0
- package/dist/options-BTRH26MJ.js +9 -0
- package/dist/options-BTaQszYn.js +9 -0
- package/dist/options-BYo7hMHK.js +10 -0
- package/dist/options-B_bxCZYM.js +7 -0
- package/dist/options-BaBaVWS-.js +10 -0
- package/dist/options-BamaRO-q.d.ts +12 -0
- package/dist/options-BcBdiPSZ.js +7 -0
- package/dist/options-BfY4pyQE.js +23 -0
- package/dist/options-BgCS5ODi.js +9 -0
- package/dist/options-Bi96Lzuf.js +9 -0
- package/dist/options-BjEsSoFp.js +17 -0
- package/dist/options-Bkx8vwip.js +4 -0
- package/dist/options-BmFSI07A.js +4 -0
- package/dist/options-BmwDdKwE.js +7 -0
- package/dist/options-Bn3NjXfn.js +7 -0
- package/dist/options-BqK4xV67.js +13 -0
- package/dist/options-Bs2dC-at.js +11 -0
- package/dist/options-BvttpM1M.js +4 -0
- package/dist/options-Bwrwb8do.d.ts +10 -0
- package/dist/options-BxdqA2Ex.js +19 -0
- package/dist/options-BzxR82Tu.js +9 -0
- package/dist/options-C-NFS6e3.js +13 -0
- package/dist/options-C13-dVMH.js +7 -0
- package/dist/options-C1RIyAe1.js +7 -0
- package/dist/options-C1kZ3qLd.js +8 -0
- package/dist/options-C2RjdunU.js +27 -0
- package/dist/options-C4kpi6HE.js +8 -0
- package/dist/options-C5MfwOAO.js +8 -0
- package/dist/options-C5fKQ3EJ.d.ts +10 -0
- package/dist/options-CJR59q8s.js +17 -0
- package/dist/options-CJVYQue3.d.ts +10 -0
- package/dist/options-CLy7CcMn.js +8 -0
- package/dist/options-COfEYic3.js +8 -0
- package/dist/options-CRwTY_q2.d.ts +58 -0
- package/dist/options-CcW7h8mv.js +9 -0
- package/dist/options-Ceu2j1vv.js +7 -0
- package/dist/options-CgBKgmI8.js +7 -0
- package/dist/options-CgMiQGOF.js +9 -0
- package/dist/options-CptvcSmF.js +11 -0
- package/dist/options-CsLUAt04.js +8 -0
- package/dist/options-CtyjhSGk.js +15 -0
- package/dist/options-CuPWezcV.js +7 -0
- package/dist/options-CyDOOWlk.js +7 -0
- package/dist/options-CyYZvdSy.js +10 -0
- package/dist/options-CzIPn0fF.js +4 -0
- package/dist/options-CzWjw2HY.js +10 -0
- package/dist/options-CztbWdz9.js +4 -0
- package/dist/options-D4LuPM8a.js +4 -0
- package/dist/options-D4dxMGHF.js +7 -0
- package/dist/options-D5a9CHgP.js +7 -0
- package/dist/options-D6tpMRvp.d.ts +13 -0
- package/dist/options-D848Os4l.js +10 -0
- package/dist/options-DCZPW5gR.d.ts +15 -0
- package/dist/options-DFSHZFLN.js +4 -0
- package/dist/options-DFemc2im.js +9 -0
- package/dist/options-DFgHHwzD.js +12 -0
- package/dist/options-DNZ9r_Vo.d.ts +8 -0
- package/dist/options-DP7NwQPZ.js +4 -0
- package/dist/options-DPQaafyc.js +7 -0
- package/dist/options-DQkhhBLy.js +4 -0
- package/dist/options-DTTz33na.js +9 -0
- package/dist/options-DToWdVqW.js +4 -0
- package/dist/options-DUNUGuhM.js +4 -0
- package/dist/options-DWgpi5ns.js +7 -0
- package/dist/options-DeamnVOY.d.ts +12 -0
- package/dist/options-Dg7eK-_J.d.ts +8 -0
- package/dist/options-DiIlMZpc.js +8 -0
- package/dist/options-DjFbIRgV.js +16 -0
- package/dist/options-DjtCYRWb.js +4 -0
- package/dist/options-Dk6D88Zx.d.ts +6 -0
- package/dist/options-DpwRG4tO.js +8 -0
- package/dist/options-DvgKdZ2K.js +9 -0
- package/dist/options-DwIoRvic.js +4 -0
- package/dist/options-GwwLsKf5.js +8 -0
- package/dist/options-I1ZHfDP0.d.ts +58 -0
- package/dist/options-Itq7QYoW.js +20 -0
- package/dist/options-JnPEVbBJ.js +17 -0
- package/dist/options-Jwux4JDX.js +7 -0
- package/dist/options-Lg76d-cV.js +7 -0
- package/dist/options-Lh6uxepF.d.ts +24 -0
- package/dist/options-Oki2W_c3.js +4 -0
- package/dist/options-PM7IaIFP.js +10 -0
- package/dist/options-PTLBl6QT.js +7 -0
- package/dist/options-PheFo4JY.js +10 -0
- package/dist/options-SlC_jZ7y.js +4 -0
- package/dist/options-Sq4bYbf5.js +13 -0
- package/dist/options-XiD_Y3oK.js +14 -0
- package/dist/options-Z-bd_H1E.js +88 -0
- package/dist/options-ax_ssX_m.js +4 -0
- package/dist/options-bNB8_nlW.js +23 -0
- package/dist/options-eIEk0vqV.js +4 -0
- package/dist/options-eLIedotm.js +7 -0
- package/dist/options-jg0FMHA5.js +4 -0
- package/dist/options-mypVYaqR.js +9 -0
- package/dist/options-ompJjxkV.js +4 -0
- package/dist/options-pbc4H8_A.js +7 -0
- package/dist/options-uUGi0Phf.d.ts +14 -0
- package/dist/options-yRwYr4up.js +4 -0
- package/dist/options-z2Zhi97E.js +9 -0
- package/dist/options-zYV6M0vr.js +8 -0
- package/dist/orpc/index.d.ts +13 -19
- package/dist/orpc/index.js +20 -23
- package/dist/otel/index.d.ts +4 -6
- package/dist/otel/index.js +8 -10
- package/dist/outbox-7zgh-7nw.d.ts +197 -0
- package/dist/payments-B4JchZuJ.js +15 -0
- package/dist/payments-BBGSGRQ7.d.ts +112 -0
- package/dist/permissions-BDt27oYF.js +48 -0
- package/dist/permissions-BP593xxk.d.ts +44 -0
- package/dist/permissions-controller-B4uI5IPH.js +33 -0
- package/dist/pg-error-D92B6jlF.js +25 -0
- package/dist/plugin-Ca2qBiFZ.js +47 -0
- package/dist/pool-D-4HyhuW.d.ts +121 -0
- package/dist/pool-errors-JrZie6u3.js +26 -0
- package/dist/ports-BVLhLUvR.d.ts +87 -0
- package/dist/ports-CmEXVqhg.js +150 -0
- package/dist/postgres/index.d.ts +5 -11
- package/dist/postgres/index.js +7 -9
- package/dist/postgrest-DZtM2nIS.d.ts +51 -0
- package/dist/postgrest-executor-lf8Mt4J0.js +1064 -0
- package/dist/powersync/index.d.ts +7 -25
- package/dist/powersync/index.js +14 -24
- package/dist/preset/index.d.ts +3 -3
- package/dist/preset/index.js +3 -3
- package/dist/preset-om2rbdYw.js +1038 -0
- package/dist/problem-C0SVHhd3.js +161 -0
- package/dist/problem-NGBjN-TO.d.ts +77 -0
- package/dist/project-D4ArwcS5.js +1749 -0
- package/dist/provider-B6qpleR9.js +56 -0
- package/dist/provider-BI0KC4u5.d.ts +142 -0
- package/dist/providers-C9sBIBYE.js +62 -0
- package/dist/push-token-B0j171on.d.ts +22 -0
- package/dist/push-token-CO28k46S.js +15 -0
- package/dist/queries-BLrxg_GL.js +238 -0
- package/dist/query/index.d.ts +3 -3
- package/dist/query/index.js +11 -15
- package/dist/range-BN3kpJAE.d.ts +6 -0
- package/dist/range-Nrh_qtb_.js +6 -0
- package/dist/rank-keys-CEBzd9Xa.js +59 -0
- package/dist/rank-result-B_xLQCBV.d.ts +12 -0
- package/dist/rank-result-DzaTKKhH.js +17 -0
- package/dist/rate-limit-C89Yzwd9.d.ts +48 -0
- package/dist/rate-limit-CRhlLFhP.js +380 -0
- package/dist/rate-limit-DXJbLVg0.js +48 -0
- package/dist/ratelimit-headers-CpB-cDD6.js +61 -0
- package/dist/react/index.d.ts +11 -11
- package/dist/react/index.js +6 -6
- package/dist/react/native/index.d.ts +3 -5
- package/dist/react/native/index.js +5 -5
- package/dist/react/server.d.ts +13 -15
- package/dist/react/server.js +9 -10
- package/dist/react/session.d.ts +4 -6
- package/dist/react/session.js +2 -3
- package/dist/react-COIov1yC.js +1006 -0
- package/dist/react-CqOVutZj.js +80 -0
- package/dist/react-router/index.d.ts +7 -12
- package/dist/react-router/index.js +10 -12
- package/dist/read-set-DEDoIHMM.js +198 -0
- package/dist/realtime/index.d.ts +7 -7
- package/dist/realtime/index.js +6 -7
- package/dist/realtime-status-CocmAOPv.js +10 -0
- package/dist/realtime-status-D3oUx3o4.d.ts +6 -0
- package/dist/record-bindings-jTZw-GVe.js +25 -0
- package/dist/record-form-DU2EoVsv.d.ts +80 -0
- package/dist/record-type-oQxekQTX.js +219 -0
- package/dist/recordings-D69Va7gP.d.ts +117 -0
- package/dist/records/index.d.ts +10 -14
- package/dist/records/index.js +13 -16
- package/dist/refresh-B8t_KE3s.js +142 -0
- package/dist/refresh-BtbC2rZe.d.ts +52 -0
- package/dist/refusal-5c6UMpUP.js +63 -0
- package/dist/refusal-CGi-0Q18.d.ts +30 -0
- package/dist/relay-CllqA-lV.js +248 -0
- package/dist/resolve--LfVoOMg.d.ts +287 -0
- package/dist/resolve-FW8oeXvh.js +927 -0
- package/dist/resolved-names-DYYyh35i.js +130 -0
- package/dist/resource-BbWk4hoP.js +561 -0
- package/dist/resource-DQ4kIBpa.js +104 -0
- package/dist/resource-DWllVW8k.d.ts +124 -0
- package/dist/resource-execute-DUBYKTYU.d.ts +13 -0
- package/dist/resource-schemas-Bq0g2RCQ.js +81 -0
- package/dist/resource-types-RgaljPs0.d.ts +155 -0
- package/dist/resources-Bki1J4jy.d.ts +5 -0
- package/dist/resources-DYSx9NYM.js +63 -0
- package/dist/respond-BYOV7KZp.d.ts +108 -0
- package/dist/respond-DLH4tD2d.js +106 -0
- package/dist/result-8xza7w5W.js +145 -0
- package/dist/result-DTOQRyGY.d.ts +347 -0
- package/dist/rows-Ce8dsmfM.js +79 -0
- package/dist/rows-D-RqIsRz.js +38 -0
- package/dist/rrule-BLpe2449.js +289 -0
- package/dist/run-keys-BnzqxtYc.d.ts +59 -0
- package/dist/run-state-D0Tbl-nM.d.ts +11 -0
- package/dist/run-state-DGiyDQxH.js +12 -0
- package/dist/run-watch-DJk4Q603.js +52 -0
- package/dist/runtime-qslVrC9l.js +43 -0
- package/dist/sales-lines-DuNVoKHA.d.ts +36 -0
- package/dist/sales-lines-axwWhnLk.js +44 -0
- package/dist/sales-shared-CY3s_wBx.js +21 -0
- package/dist/sandboxes-B2hBoBvJ.d.ts +85 -0
- package/dist/schemas-CpoEiAeT.js +213 -0
- package/dist/scope-dD_OAgRU.js +89 -0
- package/dist/scores-Bvk_JgXL.js +176 -0
- package/dist/scores-FAORS4qU.d.ts +172 -0
- package/dist/search-DtbkD0h0.js +8 -0
- package/dist/server/index.d.ts +39 -70
- package/dist/server/index.js +55 -59
- package/dist/server-types-C2hlvhP4.d.ts +521 -0
- package/dist/session-B4VasaAA.d.ts +96 -0
- package/dist/session-status-D8CBxCqv.d.ts +80 -0
- package/dist/shared-Bmcnxwie.js +16 -0
- package/dist/shared-Ci1g9nl4.js +90 -0
- package/dist/shared-DsBcvj6q.d.ts +9 -0
- package/dist/sign-in-BMm1xhKq.js +730 -0
- package/dist/sign-in-C9pZE1kM.d.ts +53 -0
- package/dist/sign-in-CX1a5i2P.d.ts +52 -0
- package/dist/sign-in-CxdoTEp5.js +399 -0
- package/dist/signatures-CBn7w4VR.js +144 -0
- package/dist/signatures-jPr9JXyw.d.ts +41 -0
- package/dist/signers-6ih6i9aq.d.ts +380 -0
- package/dist/signing-keys-BC5_hJN5.js +163 -0
- package/dist/signing-keys-De09WNJ3.d.ts +117 -0
- package/dist/simplify-BzThKn5b.js +82 -0
- package/dist/snapshot-BGsJw9xn.d.ts +83 -0
- package/dist/snapshot-CVMSyTHH.js +138 -0
- package/dist/solid/index.d.ts +12 -22
- package/dist/solid/index.js +10 -16
- package/dist/solid-start/index.d.ts +6 -9
- package/dist/solid-start/index.js +8 -9
- package/dist/spec/index.d.ts +6 -48
- package/dist/spec/index.js +23 -39
- package/dist/spec-6Vr7sc0Z.js +123 -0
- package/dist/spec-pins-CuQ2anBw.d.ts +125 -0
- package/dist/spec-pins-FKUzgF6K.js +61 -0
- package/dist/sql/index.d.ts +6 -5
- package/dist/sql/index.js +5 -5
- package/dist/sql-C1K5JALb.js +420 -0
- package/dist/sql-DiUP7fKX.js +140711 -0
- package/dist/sql-type-XWMeZRAl.js +33 -0
- package/dist/sqlite/index.d.ts +3 -9
- package/dist/sqlite/index.js +5 -8
- package/dist/sso-CRnaFJh0.js +216 -0
- package/dist/sso-CuzAjsc8.d.ts +159 -0
- package/dist/ssr/index.d.ts +5 -5
- package/dist/ssr/index.js +3 -3
- package/dist/standard-BD2aOUsf.js +24 -0
- package/dist/standard-DRX6Ch1j.d.ts +5 -0
- package/dist/stats-BTJgRMEp.js +82 -0
- package/dist/statuses-BTrQ5H4S.js +27 -0
- package/dist/statuses-Bv-0XoYC.js +27 -0
- package/dist/storage/index.d.ts +3 -3
- package/dist/storage/index.js +27 -40
- package/dist/storage-api-COQr77e8.js +9 -0
- package/dist/store-CKKzmsWB.js +68 -0
- package/dist/store-c7QxUHX-.d.ts +81 -0
- package/dist/streams/index.d.ts +3 -7
- package/dist/streams/index.js +5 -6
- package/dist/streams/redis/index.d.ts +1 -3
- package/dist/streams/redis/index.js +6 -7
- package/dist/stripe/index.d.ts +1 -3
- package/dist/stripe/index.js +3 -4
- package/dist/stripe-Bl-sjnl6.d.ts +154 -0
- package/dist/stripe-DKRwRWew.js +31 -0
- package/dist/subject-readers-BARV5rNp.js +48 -0
- package/dist/subject-readers-BlD8tALG.d.ts +19 -0
- package/dist/subject-type-BarjdHZV.js +7 -0
- package/dist/subjects-BGwLJ3IB.d.ts +148 -0
- package/dist/subjects-Bv2dPflD.d.ts +86 -0
- package/dist/subscribers-C57054Pc.js +32 -0
- package/dist/summaries-CUemsYwV.d.ts +67 -0
- package/dist/supabase-mcp-DY32eoax.d.ts +44 -0
- package/dist/supabase-mcp-QvebHckf.js +27 -0
- package/dist/support-DxYI6sDM.d.ts +351 -0
- package/dist/support-view-CvDEgyGY.js +17 -0
- package/dist/support-view-DSmCett7.d.ts +15 -0
- package/dist/svelte/index.d.ts +11 -21
- package/dist/svelte/index.js +9 -15
- package/dist/sveltekit/index.d.ts +9 -14
- package/dist/sveltekit/index.js +12 -14
- package/dist/table-schema-CwXg7oBz.d.ts +77 -0
- package/dist/table-schema-D-ss9ozY.js +291 -0
- package/dist/tables-BSiVuKKx.js +72 -0
- package/dist/tags--k2fbPfO.d.ts +28 -0
- package/dist/tags-CW-KvjdL.js +38 -0
- package/dist/tanstack-db/index.d.ts +4 -8
- package/dist/tanstack-db/index.js +4 -6
- package/dist/tanstack-start/index.d.ts +7 -12
- package/dist/tanstack-start/index.js +8 -10
- package/dist/tax-BD9dN1rx.d.ts +168 -0
- package/dist/tax-BwckP5dv.js +139 -0
- package/dist/tee-CVOMhEX-.js +100 -0
- package/dist/template-CNq9xcfx.js +125 -0
- package/dist/temporal-DKTdGK9i.js +94 -0
- package/dist/temporal-required-w_2u4EDp.js +19 -0
- package/dist/tenant-B3IIq8Eq.d.ts +14 -0
- package/dist/tenant-Beqd7TTq.js +48 -0
- package/dist/tenant-source-46lMuMEn.js +7 -0
- package/dist/testing/index.d.ts +120 -127
- package/dist/testing/index.js +277 -129
- package/dist/timeline-Bq658xsi.d.ts +147 -0
- package/dist/timeline-Bs-FGMIJ.js +49 -0
- package/dist/timing-B6yHayKA.js +94 -0
- package/dist/topic-D2MyBeaI.d.ts +411 -0
- package/dist/topic-k17VvXRj.js +640 -0
- package/dist/transport-CS4cVH4S.js +30 -0
- package/dist/ttl-cache-C5S0L2wx.js +31 -0
- package/dist/types-BBqP9H6w.d.ts +175 -0
- package/dist/types-BFEKRmEK.d.ts +449 -0
- package/dist/types-BkYEUWdz.d.ts +1095 -0
- package/dist/types-C8UyJOPJ.d.ts +247 -0
- package/dist/types-DCoqai8o.d.ts +215 -0
- package/dist/types-Dh2OGEW5.d.ts +648 -0
- package/dist/types-DnrJ_crV.js +28 -0
- package/dist/types-TH3zlMiM.d.ts +192 -0
- package/dist/types-d0JBRTAg.d.ts +660 -0
- package/dist/undo-22ofP6Zp.d.ts +44 -0
- package/dist/undo-Dki6Ujak.js +43 -0
- package/dist/upload-claim-Bo2mpBz4.js +32 -0
- package/dist/usage-CNCT6_3D.d.ts +230 -0
- package/dist/user-change-Ngy8z1fZ.js +133 -0
- package/dist/variants-BaMleC56.js +51 -0
- package/dist/vault-yGQD5Rdl.d.ts +60 -0
- package/dist/vercel-connect/index.d.ts +194 -20
- package/dist/vercel-connect/index.js +265 -33
- package/dist/vercel-sandbox/index.d.ts +166 -0
- package/dist/vercel-sandbox/index.js +171 -0
- package/dist/verify-BQu3eBNW.d.ts +144 -0
- package/dist/verify-DY_j4GPZ.js +129 -0
- package/dist/view-BfEqjZJ_.js +117 -0
- package/dist/view-Cy2XxYp1.d.ts +107 -0
- package/dist/vue/index.d.ts +12 -22
- package/dist/vue/index.js +10 -16
- package/dist/watch-topic-C2KxpeaB.js +56 -0
- package/dist/watch-topic-q6krNw0T.d.ts +29 -0
- package/dist/wire-DIoLA8VL.js +90 -0
- package/dist/wiring-DJBSLdyF.js +12 -0
- package/dist/workflow-sdk/builder/index.d.ts +12 -14
- package/dist/workflow-sdk/builder/index.js +12 -11
- package/dist/workflow-sdk/index.d.ts +62 -6
- package/dist/workflow-sdk/index.js +75 -10
- package/dist/workflow-sdk/world/index.d.ts +13 -20
- package/dist/workflow-sdk/world/index.js +115 -26
- package/dist/workflow-sdk-BL3wzkdp.js +2749 -0
- package/dist/workflow-sdk-q2jnEaAJ.js +302 -0
- package/dist/workflow-sdk-yIkECybp.d.ts +171 -0
- package/dist/workflows-BljkWRxE.d.ts +256 -0
- package/dist/yjs/index.d.ts +3 -5
- package/dist/yjs/index.js +6 -7
- package/package.json +56 -31
- package/schemas/config-v1.json +60 -3
- package/schemas/doctor-report-v1.json +1 -0
- package/schemas/snapshot-v2.json +7 -0
- package/skills/better-supabase/SKILL.md +4 -4
- package/skills/better-supabase/references/block-extensions.md +2 -2
- package/skills/better-supabase/references/troubleshooting.md +1 -1
- package/skills/better-supabase/references/ui-recipes.md +73 -36
- package/skills/better-supabase-api/SKILL.md +1 -1
- package/skills/better-supabase-api/references/adapters.md +3 -3
- package/skills/better-supabase-api/references/ai.md +8 -0
- package/skills/better-supabase-auth/SKILL.md +19 -19
- package/skills/better-supabase-auth/references/authorization-providers.md +1 -1
- package/dist/access-sql-CTDNuxRv.js +0 -385
- package/dist/actor-CoveJgya.d.ts +0 -106
- package/dist/actor-go7p9-CJ.js +0 -150
- package/dist/adapter-BTbj5N9C.js +0 -2251
- package/dist/agents-CM_cCtcr.d.ts +0 -117
- package/dist/ai-cache-BFRKxgZ4.js +0 -87
- package/dist/ai-cache-BTGqckta.d.ts +0 -82
- package/dist/ai-chat-B7_vQvxU.d.ts +0 -619
- package/dist/ai-files-m_2z3rH1.js +0 -339
- package/dist/ai-message-DfaP8sis.js +0 -14
- package/dist/ai-schedules-CZEfo-_M.d.ts +0 -166
- package/dist/anchors-7F34QyHa.d.ts +0 -40
- package/dist/api-3C0AWFeP.js +0 -696
- package/dist/api-59rv5hL6.d.ts +0 -495
- package/dist/api-keys-JE-aykZE.d.ts +0 -213
- package/dist/app-tables-B2mKMNRQ.d.ts +0 -28
- package/dist/approvals-BfEafAzt.d.ts +0 -129
- package/dist/assistant-B49qATbj.d.ts +0 -157
- package/dist/attachments-BXbLnNxm.js +0 -376
- package/dist/attributes-Bzf51_nc.js +0 -47
- package/dist/auth-DyF_LRxd.js +0 -20
- package/dist/auth-link-B4NL84XU.d.ts +0 -104
- package/dist/auth-link-D3-bU6yz.js +0 -118
- package/dist/auth-module-BbmX-N4L.js +0 -52
- package/dist/auth-reply-Dj124sbX.d.ts +0 -11
- package/dist/auth-reply-tlXB2FQ9.js +0 -31
- package/dist/authorization-DfEkyFt_.d.ts +0 -3867
- package/dist/authorization-hooks-BWhkMZfH.d.ts +0 -221
- package/dist/authorizer-B6X09otb.d.ts +0 -118
- package/dist/authorizer-BGhXaDmo.js +0 -172
- package/dist/automation-D41DXyvT.js +0 -75
- package/dist/automations-8L3NEuoq.js +0 -29
- package/dist/automations-BKjJpktQ.js +0 -33
- package/dist/automations-BMuqwZZn.js +0 -314
- package/dist/automations-EzXteupo.js +0 -31
- package/dist/availability-BdeKCHpl.d.ts +0 -236
- package/dist/base64-B9Wlsdj7.js +0 -42
- package/dist/batch-limit-DKVQDz4o.js +0 -5
- package/dist/before-route-B23K2zYU.js +0 -30
- package/dist/bind-DAx0bMSi.d.ts +0 -104
- package/dist/block-authors-Bw3zdzgl.js +0 -14
- package/dist/block-authors-DzXLUiIq.d.ts +0 -12
- package/dist/block-env-Dz7Caxk0.d.ts +0 -32
- package/dist/block-event-listener-Bu6G0TFH.js +0 -16
- package/dist/block-events-IWAyafO3.js +0 -83
- package/dist/block-fields-BE7pInWZ.d.ts +0 -58
- package/dist/block-fields-BjXgX_5c.js +0 -140
- package/dist/block-helpers-B0f0ZVb5.js +0 -437
- package/dist/block-helpers-D5emQ2O6.d.ts +0 -62
- package/dist/block-hooks-B8itxzEE.d.ts +0 -117
- package/dist/block-hooks-DKtz0HRh.js +0 -130
- package/dist/block-method-C9hWdHom.js +0 -21
- package/dist/block-method-CiVa2G-J.d.ts +0 -14
- package/dist/block-subjects-C1_9DkSA.d.ts +0 -6
- package/dist/block-subjects-DFSuFY1a.js +0 -55
- package/dist/block-tenant-DHp7subc.js +0 -14
- package/dist/block-transport-9EUA3q_I.d.ts +0 -69
- package/dist/bookings-xsmM2TA_.d.ts +0 -289
- package/dist/bucket-SvRQwYS4.d.ts +0 -705
- package/dist/build-CH2N3Yf0.js +0 -2073
- package/dist/build-DbIRFcHQ.js +0 -735
- package/dist/carrier-KzeYXVrW.d.ts +0 -169
- package/dist/casing-DdFWEtqr.js +0 -16
- package/dist/channel-JcMd5lNP.d.ts +0 -105
- package/dist/channels-CfcFPuo_.js +0 -114
- package/dist/claims-Bp9My7XP.js +0 -88
- package/dist/claims-DTy6R6my.js +0 -63
- package/dist/cli/_format-Cax5EsM9.js +0 -101
- package/dist/cli/add-B9wP0YGU.js +0 -99
- package/dist/cli/add-DjZXKd7X.js +0 -1231
- package/dist/cli/add-ZcEOEK23.js +0 -1
- package/dist/cli/agent-CbuPvI2x.js +0 -185
- package/dist/cli/app-table-files-mtvjHa48.js +0 -346
- package/dist/cli/arazzo-1.0-BalU61-_.js +0 -532
- package/dist/cli/arazzo-1.1-Bnfasbun.js +0 -705
- package/dist/cli/args-UEwg0l-N.js +0 -27
- package/dist/cli/asyncapi-3.0.0-C78dBjR6.js +0 -5593
- package/dist/cli/asyncapi-3.1.0-g-7aIfV1.js +0 -5833
- package/dist/cli/backfill-Coshdvh_.js +0 -293
- package/dist/cli/blocks-BWCuA0nq.js +0 -156
- package/dist/cli/blocks-hiSazThw.js +0 -1
- package/dist/cli/cache-x2wWAy0h.js +0 -607
- package/dist/cli/codemod-BnjV7BpC.js +0 -2634
- package/dist/cli/codemod-block-renames-BuSaTE_G.js +0 -239
- package/dist/cli/command-CCAwhiOh.js +0 -1003
- package/dist/cli/compare-BmIWVEui.js +0 -9
- package/dist/cli/completion-BJaB84Pe.js +0 -211
- package/dist/cli/completion-BkUhs1ms.js +0 -1
- package/dist/cli/completion-DmUVsUVQ.js +0 -30
- package/dist/cli/config-Cskysxp-.js +0 -2000
- package/dist/cli/config-Df5cXWNN.js +0 -1
- package/dist/cli/config-edit-CrWfk8s3.js +0 -621
- package/dist/cli/config-group-CP-B9uRt.js +0 -390
- package/dist/cli/config-zId1jkLx.js +0 -47
- package/dist/cli/content-mapper-DvOSOdTE.js +0 -182
- package/dist/cli/db-CQCLx7cx.js +0 -78
- package/dist/cli/db-DXKyVEDF.js +0 -247
- package/dist/cli/detect-D9JaAX20.js +0 -84
- package/dist/cli/dist-D_VbPAMR.js +0 -129
- package/dist/cli/dist-DuiMMRbJ.js +0 -1112
- package/dist/cli/doctor-Ywy8oJEU.js +0 -4684
- package/dist/cli/env-BK0xKMeU.js +0 -1113
- package/dist/cli/env-Bat6ogep.js +0 -1
- package/dist/cli/env-CNjT_uOV.js +0 -1
- package/dist/cli/env-XMiKvhtV.js +0 -143
- package/dist/cli/errors-BTe6A15O.js +0 -98
- package/dist/cli/exec-Ca5s-ygi.js +0 -463
- package/dist/cli/fastest-levenshtein-dhRRvrM2.js +0 -120
- package/dist/cli/files-CX71yBm8.js +0 -1010
- package/dist/cli/fresh-import-DzgsGHkX.js +0 -40
- package/dist/cli/gen-B-FbQmG1.js +0 -394
- package/dist/cli/guards-CUlDNYZs.js +0 -8
- package/dist/cli/in-stack-diff-Cp-tVPj2.js +0 -186
- package/dist/cli/init-fb9e1BKX.js +0 -559
- package/dist/cli/io-DH1kcmmP.js +0 -37
- package/dist/cli/json5-ChRycquj.js +0 -787
- package/dist/cli/jsonc-C8M0EhHB.js +0 -1
- package/dist/cli/jsonc-D5Fu67jw.js +0 -45
- package/dist/cli/keys-ORiPz1sM.js +0 -106
- package/dist/cli/legacy-prefix-R7UChFFl.js +0 -154
- package/dist/cli/live-DIt7TP-N.js +0 -341
- package/dist/cli/mcp-CVWwraga.js +0 -241
- package/dist/cli/metadata-CannIjel.js +0 -150
- package/dist/cli/migrate-Ht2TzIQF.js +0 -46
- package/dist/cli/migration-safety-nNyB05I-.js +0 -928
- package/dist/cli/migrations-bAd7dpk1.js +0 -117
- package/dist/cli/module-migration-CkNux8dr.js +0 -119
- package/dist/cli/moved-C3WyRHkA.js +0 -254
- package/dist/cli/ohash-BjQY1cBb.js +0 -277
- package/dist/cli/openapi-3.0-t7xwkuRH.js +0 -928
- package/dist/cli/openapi-3.1-CVze7tBS.js +0 -870
- package/dist/cli/openapi-3.2-CFoMYM01.js +0 -1031
- package/dist/cli/orphans-BAboqyVM.js +0 -28
- package/dist/cli/parse-DjHbTaFI.js +0 -182
- package/dist/cli/powersync-B2v0tDwp.js +0 -377
- package/dist/cli/powersync-D3mAQ6QE.js +0 -1
- package/dist/cli/preset-BwmIfFnh.js +0 -101
- package/dist/cli/print-CxQ0rBKT.js +0 -68
- package/dist/cli/prompts-jqnr94b9.js +0 -1140
- package/dist/cli/providers-DtI90lSw.js +0 -301
- package/dist/cli/redact-KGAk2Ul9.js +0 -38
- package/dist/cli/remove-DYtE4IZ4.js +0 -239
- package/dist/cli/render-QGWfEoiB.js +0 -2225
- package/dist/cli/rolldown-runtime-kJ_i4yPo.js +0 -26
- package/dist/cli/run-B5aMwErM.js +0 -63
- package/dist/cli/run-BNoJKf5I.js +0 -706
- package/dist/cli/run-DiYX1XEa.js +0 -1459
- package/dist/cli/seed-C-Hu2n_E.js +0 -188
- package/dist/cli/seed-Cm-c0BDd.js +0 -1
- package/dist/cli/shared-D_CFi5di.js +0 -151
- package/dist/cli/shell-Btv_4Yhe.js +0 -10
- package/dist/cli/skills-D98y0bSB.js +0 -121
- package/dist/cli/snapshot-BlQ4DDcJ.js +0 -734
- package/dist/cli/source-CelMBQMj.js +0 -320
- package/dist/cli/source-args-v8ljFDfc.js +0 -59
- package/dist/cli/spec-BxcoGE0h.js +0 -1
- package/dist/cli/spec-iBx1LcYO.js +0 -7530
- package/dist/cli/sql-layout-Dp4Rottt.js +0 -261
- package/dist/cli/stack-B2slzrYH.js +0 -135
- package/dist/cli/stack-env-3ziggrU3.js +0 -93
- package/dist/cli/stack-status-BkkYRlXG.js +0 -46
- package/dist/cli/stacks-CiDBH1dB.js +0 -232
- package/dist/cli/style-Bm2X5JrN.js +0 -35
- package/dist/cli/supabase-toml-CncmQbO0.js +0 -1164
- package/dist/cli/sync-BnORI43S.js +0 -322
- package/dist/cli/table-D6HUECKI.js +0 -89
- package/dist/cli/toml-DB-MNnFs.js +0 -424
- package/dist/cli/topics-BpdnYmWb.js +0 -30
- package/dist/cli/trace-VbdO6bcN.js +0 -7
- package/dist/cli/upgrade-CR6-WmIc.js +0 -272
- package/dist/cli/upgrade-fz92aCnh.js +0 -41
- package/dist/cli/validate-B3lF3-jB.js +0 -7522
- package/dist/cli/version-Dz8ZlOuh.js +0 -4
- package/dist/cli/yaml-CYCbJ6et.js +0 -2252
- package/dist/client-C_mlji5R.js +0 -288
- package/dist/clone-CkG0-hlI.js +0 -33
- package/dist/cloud-event-0pQ9vFNS.d.ts +0 -64
- package/dist/cloud-event-XsM53POL.js +0 -63
- package/dist/codecs-CMWlhHZ0.d.ts +0 -222
- package/dist/codecs-CSUFGrdP.js +0 -358
- package/dist/compiler-BEeVWXPS.d.ts +0 -14
- package/dist/compose-DKW0Tr3e.js +0 -53
- package/dist/composite-B4qB6k31.js +0 -130
- package/dist/composite-BJ9s-IJJ.d.ts +0 -83
- package/dist/config-B7g-HDis.js +0 -1111
- package/dist/config-R0m0fBiD.js +0 -1679
- package/dist/connectors-uC5baoFV.d.ts +0 -147
- package/dist/context-DBicfUNz.js +0 -41
- package/dist/context-DWWoP1wK.d.ts +0 -4344
- package/dist/controller-BEliOBOv.js +0 -79
- package/dist/controller-Br9dGKGe.d.ts +0 -52
- package/dist/controller-W97g2WGG.js +0 -73
- package/dist/conversion-Dq1S7xzE.js +0 -77
- package/dist/conversion-g8HzH9My.d.ts +0 -86
- package/dist/cors-h_v7TPxl.js +0 -24
- package/dist/cors-kLq6VM06.d.ts +0 -15
- package/dist/create-blocks-BfrDUSM6.js +0 -370
- package/dist/cron-DdT4ti8a.js +0 -148
- package/dist/cron-route-FjKgRvTY.js +0 -24
- package/dist/csv-2rXGPNtP.js +0 -89
- package/dist/csv-DhHQS2x_.d.ts +0 -28
- package/dist/data-engine-D1BkmBoR.js +0 -173
- package/dist/data-engine-rvbR2C4F.d.ts +0 -273
- package/dist/data-hooks-CdcZfVS1.js +0 -280
- package/dist/db-exception-Lngc1W49.js +0 -31
- package/dist/deal-forecast-CKBnRodz.js +0 -39
- package/dist/deal-forecast-LwO-Z4_C.d.ts +0 -23
- package/dist/define-D-dLADd5.js +0 -2084
- package/dist/define-D8_9X5fZ.d.ts +0 -1263
- package/dist/define-block-BGqOO8B3.js +0 -64
- package/dist/define-block-DWVZSZv1.d.ts +0 -1687
- package/dist/delegation-C7eWP2r8.d.ts +0 -14
- package/dist/delegation-DGOIiT8k.js +0 -153
- package/dist/delivery-Bm0jxmzI.js +0 -29
- package/dist/delivery-events-DbL8IHIY.js +0 -53
- package/dist/delivery-n6lZGuGx.d.ts +0 -71
- package/dist/documents-BbwYyynk.d.ts +0 -152
- package/dist/email-B3YxEzwC.d.ts +0 -42
- package/dist/embeddings-I3s5sTDt.d.ts +0 -78
- package/dist/embeddings-vVzseUw0.js +0 -128
- package/dist/ended-EZzN9QTM.d.ts +0 -26
- package/dist/entitlements-CBjm2lvD.d.ts +0 -54
- package/dist/entitlements-tGL6-69B.js +0 -45
- package/dist/entity-naming-Dtyq5sKE.js +0 -131
- package/dist/entity-schema-B1YmMtP8.js +0 -39
- package/dist/envelope-DEI2iX-d.js +0 -90
- package/dist/errors-BVFgt8BZ.js +0 -328
- package/dist/errors-CyxMxzlu.js +0 -44
- package/dist/escape-like-DHfx6jRr.js +0 -7
- package/dist/escape-like-PReMbEEU.d.ts +0 -30
- package/dist/eve-BfhVFV33.d.ts +0 -157
- package/dist/event-calendar-DVLs2wUO.d.ts +0 -65
- package/dist/event-map-CtPFhcOp.js +0 -19
- package/dist/events-B2qbZps6.d.ts +0 -854
- package/dist/events-D6IZ5CE8.js +0 -82
- package/dist/events-DuLhzjP6.js +0 -26
- package/dist/executor-BfirBzOr.d.ts +0 -174
- package/dist/executor-BlS0kCrN.d.ts +0 -104
- package/dist/executor-C2Ne-Scm.js +0 -208
- package/dist/executor-DXQIx4sW.d.ts +0 -37
- package/dist/executor-DqIci3Jb.js +0 -486
- package/dist/executor-WolvKszH.js +0 -843
- package/dist/extension-DTaHjwdc.js +0 -59
- package/dist/extension-DeAd_MqI.js +0 -121
- package/dist/extension-DzCc0IOd.js +0 -103
- package/dist/extension-mGylYROs.js +0 -53
- package/dist/extension-shared-Djm8mGHD.js +0 -60
- package/dist/extra-CGQ2_q3S.js +0 -10
- package/dist/field-errors-CEjsMAgd.d.ts +0 -216
- package/dist/field-formats-C6QKA3UR.js +0 -102
- package/dist/field-formats-CAFNkKSN.d.ts +0 -38
- package/dist/fields-BBm49w-E.js +0 -108
- package/dist/fields-snbaZ14h.d.ts +0 -78
- package/dist/filter-evaluate-BRpNiNPG.d.ts +0 -37
- package/dist/filter-evaluate-lCToXzZI.js +0 -217
- package/dist/filter-query-CQ6d5GnQ.js +0 -566
- package/dist/filter-query-DBt7OKuH.d.ts +0 -133
- package/dist/flags-DDKTThrO.d.ts +0 -246
- package/dist/flags-DF_SCqp5.js +0 -279
- package/dist/form-definition-BTpM_tz1.js +0 -363
- package/dist/form-definition-BjEtH8BT.d.ts +0 -119
- package/dist/format-u-65igKI.d.ts +0 -79
- package/dist/framework-CqiZk89W.js +0 -58
- package/dist/framework-DVYTtQXA.d.ts +0 -47
- package/dist/function-contract-DxFNOmsm.d.ts +0 -27
- package/dist/function-contract-pEmsaUIf.js +0 -8
- package/dist/gateway-Ve7cByEr.d.ts +0 -115
- package/dist/gateway-options-BlVCqgb8.d.ts +0 -29
- package/dist/gateway-options-Cl74B7k6.js +0 -27
- package/dist/guards-6F2bCtQR.js +0 -12
- package/dist/guest-actions-1T1DeS5Y.d.ts +0 -5
- package/dist/guest-actions-B7zdhfnh.js +0 -9
- package/dist/history-GH1HJWQV.js +0 -271
- package/dist/hmac-B3CTTlfv.js +0 -23
- package/dist/http-7-UvHjQe.js +0 -28
- package/dist/http-BjjojWg3.js +0 -40
- package/dist/http-DzbloBR-.js +0 -141
- package/dist/image-url-_d7xYsXK.js +0 -84
- package/dist/impersonation-DM3oWNoD.js +0 -62
- package/dist/impersonation-YTa9dZUv.d.ts +0 -28
- package/dist/inbox-c8B86Trp.d.ts +0 -321
- package/dist/index-B4wttiLh.d.ts +0 -407
- package/dist/index-Clyd2Goi.d.ts +0 -338
- package/dist/index-Cxsnd-OL.d.ts +0 -305
- package/dist/index-D98bQs8a.d.ts +0 -665
- package/dist/index-DIdPoQtO.d.ts +0 -240
- package/dist/index-DbyDZZlc.d.ts +0 -53
- package/dist/index-I8YLxKq8.d.ts +0 -729
- package/dist/index-NRMMhhEi.d.ts +0 -104
- package/dist/index-X2fkPUwb.d.ts +0 -51
- package/dist/index-eRBuKtMt.d.ts +0 -158
- package/dist/index-pZn6S_iq.d.ts +0 -149
- package/dist/index-uIU65iEn.d.ts +0 -588
- package/dist/instance-property-hRh88y_s.js +0 -7
- package/dist/instances-DY_ORk5g.js +0 -16605
- package/dist/invalidate-DMp4eqfF.d.ts +0 -21
- package/dist/iso4217-B-durg_y.js +0 -176
- package/dist/json-DaByVJpw.js +0 -22
- package/dist/json-schema-DHJxiizN.js +0 -888
- package/dist/jwks-cache-DEsKI0hJ.js +0 -49
- package/dist/jws-D0toeQlA.d.ts +0 -66
- package/dist/jws-DOgHJKHb.js +0 -205
- package/dist/kit-B8yWCRN7.d.ts +0 -94
- package/dist/kit-Bcd9wYCV.js +0 -133
- package/dist/knowledge-CsLPACGJ.d.ts +0 -217
- package/dist/knowledge-tCrrU99q.js +0 -300
- package/dist/list-query-BcU8NnNL.d.ts +0 -222
- package/dist/list-query-BnpA2BDg.js +0 -559
- package/dist/live-C21DgbsD.js +0 -275
- package/dist/logger-DWVYUmwi.d.ts +0 -18
- package/dist/logger-glM28NVN.js +0 -21
- package/dist/lookup-BaP5bI27.js +0 -18
- package/dist/management-wtecfrNf.d.ts +0 -57
- package/dist/message-Bg4TKA12.d.ts +0 -99
- package/dist/messages-ecPW_nOv.js +0 -492
- package/dist/messaging-DQP09JsY.d.ts +0 -297
- package/dist/methods-Cund9ZBe.js +0 -11
- package/dist/metric-definition-BjxVn4R5.js +0 -117
- package/dist/metric-definition-EAYI1r2n.d.ts +0 -69
- package/dist/mfa-oIOYTpvc.d.ts +0 -36
- package/dist/model-hwpvole9.d.ts +0 -340
- package/dist/model-messages-CkZSDDHP.js +0 -206
- package/dist/model-messages-DrR4lZ_c.d.ts +0 -34
- package/dist/money-BNRdJQzA.d.ts +0 -91
- package/dist/money-BZl985O-.js +0 -197
- package/dist/money-codec-BJuS2zEW.js +0 -41
- package/dist/my-work-kinds-BU3SlA-6.js +0 -11
- package/dist/node-headers-BPtMP4_V.d.ts +0 -27
- package/dist/node-headers-C71zNQHe.js +0 -55
- package/dist/operations-DVHRHvv6.js +0 -29
- package/dist/operations-hm1Isvvs.d.ts +0 -6
- package/dist/optional-peer-C1NbBRJm.js +0 -32
- package/dist/options-3OYOU56e.js +0 -11
- package/dist/options-56zYYXxc.js +0 -10
- package/dist/options-5WvWOkAm.d.ts +0 -26
- package/dist/options-62woPFn3.js +0 -12
- package/dist/options-7ixoOoap.js +0 -10
- package/dist/options-9dSU5RML.js +0 -5
- package/dist/options-B0YZtAkb.d.ts +0 -15
- package/dist/options-B2Kz_tCx.js +0 -10
- package/dist/options-B5E2MGIz.js +0 -15
- package/dist/options-B685YSzQ.js +0 -5
- package/dist/options-B692WoK6.js +0 -9
- package/dist/options-BHU1wc74.js +0 -5
- package/dist/options-BHy0Z5Zd.js +0 -5
- package/dist/options-BJtdsK7b.js +0 -8
- package/dist/options-BKDxrPvE.js +0 -5
- package/dist/options-BLfymS4s.js +0 -5
- package/dist/options-BOCRbzh3.js +0 -5
- package/dist/options-BOqfYsM1.js +0 -13
- package/dist/options-BQWJqwHO.js +0 -9
- package/dist/options-BQunK6_Y.js +0 -8
- package/dist/options-BQyrZjwM.js +0 -28
- package/dist/options-BR9xTHZW.js +0 -5
- package/dist/options-BRUdd5jY.js +0 -8
- package/dist/options-BSsYXjhC.js +0 -9
- package/dist/options-BTmaRzx2.d.ts +0 -60
- package/dist/options-BUCQYAeJ.d.ts +0 -10
- package/dist/options-B_NrjVDt.d.ts +0 -12
- package/dist/options-BawzwlmC.js +0 -11
- package/dist/options-BbLDAp7G.d.ts +0 -10
- package/dist/options-BfPsL7E2.js +0 -9
- package/dist/options-Bfmwwc78.js +0 -8
- package/dist/options-BhsdveDk.js +0 -21
- package/dist/options-BomoTH-8.js +0 -5
- package/dist/options-BtjkzIVh.js +0 -8
- package/dist/options-Bvi9bl4H.js +0 -5
- package/dist/options-BwKNmaJo.js +0 -5
- package/dist/options-BxpLtyk-.js +0 -18
- package/dist/options-BzB2QxL3.js +0 -5
- package/dist/options-C078wBP0.js +0 -5
- package/dist/options-C3AdsFJ6.js +0 -9
- package/dist/options-C7C5OhmL.d.ts +0 -8
- package/dist/options-C87u6eSa.js +0 -10
- package/dist/options-CBAEGxwS.js +0 -8
- package/dist/options-CDSCkYxu.d.ts +0 -14
- package/dist/options-CDUr8zzX.js +0 -8
- package/dist/options-CF6EVF_G.js +0 -17
- package/dist/options-CFjGxfa8.js +0 -5
- package/dist/options-CI6P0xhV.js +0 -10
- package/dist/options-CJFMK9A_.js +0 -8
- package/dist/options-CLpgx7en.js +0 -10
- package/dist/options-CSCXNYJO.d.ts +0 -8
- package/dist/options-CTXHj9zr.js +0 -16
- package/dist/options-CTl8T88w.js +0 -11
- package/dist/options-CUIOOv4z.js +0 -15
- package/dist/options-CZDmtsbV.js +0 -8
- package/dist/options-CZTscdPB.js +0 -5
- package/dist/options-CZdKndeo.js +0 -9
- package/dist/options-C_7g9TTq.d.ts +0 -12
- package/dist/options-Cb2FOFj5.js +0 -5
- package/dist/options-CbOstLa7.js +0 -5
- package/dist/options-CcXgWlvm.js +0 -24
- package/dist/options-CfVPctAw.js +0 -89
- package/dist/options-Cjgaf8ub.js +0 -8
- package/dist/options-CoSPgWKy.js +0 -9
- package/dist/options-CpZ2HlSU.js +0 -32
- package/dist/options-CsSe8Nba.js +0 -8
- package/dist/options-CsvJR-r2.js +0 -9
- package/dist/options-Cucv6sWP.js +0 -12
- package/dist/options-CyjL9lTf.js +0 -5
- package/dist/options-D-OOO9V2.d.ts +0 -10
- package/dist/options-D0Y6ZMe8.js +0 -5
- package/dist/options-D0bzZx9a.d.ts +0 -10
- package/dist/options-D0sj5abR.js +0 -9
- package/dist/options-D1hSuf50.d.ts +0 -12
- package/dist/options-D610Fa6T.js +0 -5
- package/dist/options-D96dScev.js +0 -24
- package/dist/options-DFpyP1bg.js +0 -5
- package/dist/options-DJEcS4DX.js +0 -5
- package/dist/options-DJbN3bi9.js +0 -11
- package/dist/options-DKoQoRCy.js +0 -13
- package/dist/options-DM1qaMMQ.js +0 -9
- package/dist/options-DNgSwhsm.js +0 -11
- package/dist/options-DOIwzRXL.js +0 -16
- package/dist/options-DRIgHh4O.d.ts +0 -16
- package/dist/options-DRrZmJyI.js +0 -8
- package/dist/options-DSCW40_5.js +0 -12
- package/dist/options-DUMUsvml.js +0 -5
- package/dist/options-DWwL5Kaz.js +0 -9
- package/dist/options-DZHZYlpD.js +0 -10
- package/dist/options-DZLkeqWn.js +0 -9
- package/dist/options-DZRpXKQE.js +0 -5
- package/dist/options-DZen3UiC.js +0 -14
- package/dist/options-D_9Vxx7f.js +0 -8
- package/dist/options-DcHl59RC.js +0 -11
- package/dist/options-Dcaql09y.js +0 -11
- package/dist/options-DcnBNYmV.js +0 -8
- package/dist/options-DdpM-fiP.js +0 -9
- package/dist/options-DhoLMknl.js +0 -10
- package/dist/options-DlohRAYd.d.ts +0 -13
- package/dist/options-Dpy-Ruo-.js +0 -14
- package/dist/options-DsVuVRH3.d.ts +0 -17
- package/dist/options-DtAJxfHS.js +0 -8
- package/dist/options-Dz9Yo52Z.js +0 -8
- package/dist/options-HnfETSHr.d.ts +0 -19
- package/dist/options-LqUXTpML.js +0 -8
- package/dist/options-MsloEAIB.js +0 -5
- package/dist/options-P2FxqYpd.js +0 -17
- package/dist/options-_1gAIMq7.d.ts +0 -60
- package/dist/options-aT89JqlB.js +0 -5
- package/dist/options-cVKZu9b0.js +0 -9
- package/dist/options-eTepQ1rZ.js +0 -15
- package/dist/options-fkShrmGQ.js +0 -8
- package/dist/options-gUvfr3no.js +0 -11
- package/dist/options-hynwKWuf.js +0 -20
- package/dist/options-jsOCvLUz.js +0 -10
- package/dist/options-o5wCw8H7.d.ts +0 -14
- package/dist/options-p49DFg3H.js +0 -8
- package/dist/options-pYNpXKcg.js +0 -8
- package/dist/options-qtETCHzW.js +0 -10
- package/dist/options-rnKlqYEr.js +0 -5
- package/dist/options-sU_zGkiV.js +0 -10
- package/dist/options-xq4MXG1M.js +0 -5
- package/dist/options-zzlznRA7.js +0 -10
- package/dist/outbox-BZ712Z3X.d.ts +0 -199
- package/dist/payments-BXvabJOw.js +0 -16
- package/dist/payments-BYcN34Fp.d.ts +0 -114
- package/dist/permissions-controller-BMsqIE5T.js +0 -34
- package/dist/pg-error-B5QLDcbG.js +0 -26
- package/dist/plugin-AKwwe2gF.js +0 -48
- package/dist/pool-DDR1ndk7.d.ts +0 -123
- package/dist/pool-errors-JUBcGrre.js +0 -27
- package/dist/ports-DOrPTJzl.d.ts +0 -89
- package/dist/ports-DvpNseap.js +0 -152
- package/dist/postgrest-AJc8hnJU.d.ts +0 -53
- package/dist/postgrest-executor-B_Uezhrm.js +0 -1068
- package/dist/preset-CXhpPmPV.js +0 -1042
- package/dist/problem-Bf0cJ7tk.js +0 -162
- package/dist/problem-DNwN8iGz.d.ts +0 -79
- package/dist/project-DJ9Uo0sT.js +0 -1760
- package/dist/provider-B6g7rBZX.js +0 -57
- package/dist/provider-CWjzAIX9.d.ts +0 -112
- package/dist/push-token-B4vcIU4s.d.ts +0 -24
- package/dist/push-token-D6REHMMw.js +0 -16
- package/dist/queries-BWYYS9um.js +0 -239
- package/dist/range-DwpWe8e7.js +0 -7
- package/dist/range-p5V4rBhZ.d.ts +0 -8
- package/dist/rank-keys-DcPMt_Jk.js +0 -60
- package/dist/rank-result-BBJIK-k_.js +0 -18
- package/dist/rank-result-Bwe7igy-.d.ts +0 -14
- package/dist/rate-limit-BWKGlhTM.js +0 -49
- package/dist/rate-limit-Bztf32cl.d.ts +0 -50
- package/dist/rate-limit-fZ_d8gSE.js +0 -380
- package/dist/ratelimit-headers-kEcXyO3H.js +0 -62
- package/dist/react-BKCnIuZs.js +0 -79
- package/dist/react-mdVjpewL.js +0 -1016
- package/dist/read-set-B1sDib5O.js +0 -199
- package/dist/realtime-status-BhNkb-Ow.d.ts +0 -8
- package/dist/realtime-status-asHvhiOh.js +0 -11
- package/dist/record-bindings-Z51mGfhB.js +0 -26
- package/dist/record-form-CubgBrtI.d.ts +0 -82
- package/dist/record-type-BEUyEsFx.js +0 -221
- package/dist/recordings-DeZYx-Kv.d.ts +0 -119
- package/dist/refresh-D02Pbf5B.d.ts +0 -54
- package/dist/refresh-DLBgnxjL.js +0 -144
- package/dist/refusal-B0VmlAxF.d.ts +0 -32
- package/dist/refusal-DDlInPff.js +0 -64
- package/dist/relay-CIKcAVjf.js +0 -248
- package/dist/resolve-B0mW2m7f.js +0 -932
- package/dist/resolve-CtX6T0c0.d.ts +0 -288
- package/dist/resolved-names-kMRjmSIy.js +0 -133
- package/dist/resource-BUJcZKiW.js +0 -520
- package/dist/resource-DvgXqZB_.js +0 -105
- package/dist/resource-WxN0IsvB.d.ts +0 -123
- package/dist/resource-execute-BzqR8DdD.d.ts +0 -15
- package/dist/resource-schemas-up6bKOUi.js +0 -82
- package/dist/resource-types-BVbHgTPg.d.ts +0 -157
- package/dist/resources-BSbRa0Ab.d.ts +0 -7
- package/dist/resources-jb3R6rEa.js +0 -64
- package/dist/respond-CZMWbUs3.js +0 -107
- package/dist/respond-Dzu_-EPH.d.ts +0 -112
- package/dist/result-DZeA5KS6.d.ts +0 -351
- package/dist/result-ntFBW2p2.js +0 -146
- package/dist/rows-BdqXmiB-.js +0 -80
- package/dist/rows-jijHLVE_.js +0 -39
- package/dist/rrule-C9Ot6ax8.js +0 -290
- package/dist/run-state-BMCD_1Lt.d.ts +0 -13
- package/dist/run-state-CgBKzYMW.js +0 -13
- package/dist/run-watch-B-LoK5m1.js +0 -53
- package/dist/runtime-LRJM7UqY.js +0 -44
- package/dist/sales-lines-BsmrNHe9.d.ts +0 -38
- package/dist/sales-lines-DO7oRu1o.js +0 -45
- package/dist/sales-shared-BuTA8JK7.js +0 -22
- package/dist/schemas-CLOTvdsC.js +0 -216
- package/dist/scope-DgWjuXUw.js +0 -90
- package/dist/scores-Y8TvyJi1.d.ts +0 -174
- package/dist/scores-bY2Is0kx.js +0 -177
- package/dist/search-Cn_DGluL.js +0 -9
- package/dist/server-types-BkTIxW_H.d.ts +0 -597
- package/dist/session-BOzx2qHC.d.ts +0 -100
- package/dist/session-status-BP8eYVnA.d.ts +0 -82
- package/dist/shared-BeHTi8Fu.js +0 -17
- package/dist/shared-Bf-I13Ht.js +0 -91
- package/dist/shared-CRRfQAKG.d.ts +0 -11
- package/dist/sign-in-BzihC_8k.d.ts +0 -50
- package/dist/sign-in-CmPK1AgM.js +0 -402
- package/dist/sign-in-CuZ1Ag7O.js +0 -718
- package/dist/sign-in-D54FLMQy.d.ts +0 -55
- package/dist/signatures-CX1b4WHa.js +0 -145
- package/dist/signatures-Dkx9OE8j.d.ts +0 -43
- package/dist/signers-ZmxO1I05.d.ts +0 -390
- package/dist/signing-keys-CWtpMask.js +0 -164
- package/dist/signing-keys-udgP7Aod.d.ts +0 -119
- package/dist/simplify-DDO0j0LI.js +0 -83
- package/dist/spec-BMvCCNnd.js +0 -124
- package/dist/spec-pins-BZkKfwY8.d.ts +0 -127
- package/dist/spec-pins-D3zDek-u.js +0 -62
- package/dist/sql-CYt7EhH0.js +0 -421
- package/dist/sql-DHp0L7zK.js +0 -138385
- package/dist/sql-type-iUSZpaUu.js +0 -34
- package/dist/sso-CkU_4mtK.d.ts +0 -161
- package/dist/sso-DdDpJQzw.js +0 -217
- package/dist/standard-BA3mLh6w.js +0 -25
- package/dist/standard-DBV730sF.d.ts +0 -7
- package/dist/stats-BHl1-zj9.js +0 -83
- package/dist/statuses-Alll5Ip6.js +0 -29
- package/dist/statuses-zRcc2TeZ.js +0 -28
- package/dist/storage-api-Dg78Wqsg.js +0 -10
- package/dist/store-CpheI-lN.d.ts +0 -83
- package/dist/store-McN-2esd.js +0 -69
- package/dist/stripe-BJUfp5jM.js +0 -32
- package/dist/stripe-X22LjuH-.d.ts +0 -156
- package/dist/subject-readers-CB5Te02u.d.ts +0 -21
- package/dist/subject-readers-VHcrWhmq.js +0 -49
- package/dist/subject-type-BRnK7Av3.js +0 -8
- package/dist/subjects-BYCL-6hA.d.ts +0 -145
- package/dist/subjects-CiBNKy2y.d.ts +0 -90
- package/dist/subscribers-BvZxcd63.js +0 -33
- package/dist/summaries-8jQTELIX.d.ts +0 -69
- package/dist/supabase-mcp-Dz9DgrKP.js +0 -28
- package/dist/supabase-mcp-Z4vtsuoO.d.ts +0 -46
- package/dist/support-BxyPOFk4.d.ts +0 -357
- package/dist/support-view-g4YLBeqX.js +0 -18
- package/dist/support-view-nqUWKHEs.d.ts +0 -17
- package/dist/table-schema-BlF6k62Q.d.ts +0 -81
- package/dist/table-schema-C80xItaV.js +0 -293
- package/dist/tables-Cb-3_VWc.js +0 -73
- package/dist/tags-CIZTqtlY.js +0 -39
- package/dist/tags-Cm48BsOa.d.ts +0 -30
- package/dist/tax-BkCNWWMc.js +0 -140
- package/dist/tax-DPShHual.d.ts +0 -170
- package/dist/tee-V97_v1ZS.js +0 -101
- package/dist/template-Drgg3v2J.js +0 -126
- package/dist/temporal-Dbo0fLzc.js +0 -95
- package/dist/temporal-required-DcLhnDhQ.js +0 -20
- package/dist/tenant-BgIiMQpo.js +0 -27
- package/dist/tenant-FfgNhd5x.d.ts +0 -17
- package/dist/tenant-source-bqWpSr86.js +0 -8
- package/dist/timeline-DqEoD8bb.d.ts +0 -151
- package/dist/timeline-Dz3hO2I6.js +0 -50
- package/dist/timing-dypS0nxW.js +0 -95
- package/dist/topic-BaUElNw2.d.ts +0 -415
- package/dist/topic-DnsNG4Kj.js +0 -643
- package/dist/ttl-cache-Bhr9swjT.js +0 -32
- package/dist/types-B-D6fYx2.d.ts +0 -194
- package/dist/types-CK2X2wCB.d.ts +0 -618
- package/dist/types-CMN0h_Ix.d.ts +0 -461
- package/dist/types-CPl9uJ0G.d.ts +0 -912
- package/dist/types-CwQgFo8c.d.ts +0 -177
- package/dist/types-DMihLukJ.d.ts +0 -251
- package/dist/types-R6syp1el.js +0 -29
- package/dist/types-iCyZ3lMx.d.ts +0 -217
- package/dist/types-nspa5I-a.d.ts +0 -664
- package/dist/undo-0HkWXASn.d.ts +0 -46
- package/dist/undo-BbftL9-4.js +0 -44
- package/dist/upload-claim-B1ZU8ydB.js +0 -33
- package/dist/usage-BkWAPkg2.d.ts +0 -232
- package/dist/user-change-DgWC6RRC.js +0 -135
- package/dist/variants-Cy--Ub-a.js +0 -53
- package/dist/vault-BkdPmL7f.d.ts +0 -62
- package/dist/verify-41mZmspj.d.ts +0 -146
- package/dist/verify-7EucfCnv.js +0 -130
- package/dist/view-C8Ve14ja.js +0 -247
- package/dist/view-C8_xvD-j.d.ts +0 -97
- package/dist/watch-topic-BabDTZ-L.d.ts +0 -31
- package/dist/watch-topic-CuaWfCuv.js +0 -57
- package/dist/wire-ChYn1g21.js +0 -91
- package/dist/wiring-CDNuQoJJ.js +0 -13
- package/dist/workflow-sdk-Cf0LAOFF.js +0 -242
- package/dist/workflow-sdk-DJJkP0dT.js +0 -2545
- package/dist/workflow-sdk-rg3IbCZC.d.ts +0 -163
- package/dist/workflows-xL6t0TXx.d.ts +0 -258
package/dist/config-B7g-HDis.js
DELETED
|
@@ -1,1111 +0,0 @@
|
|
|
1
|
-
import { r as CONFIG_DEFAULTS, t as resolveNames } from "./resolved-names-kMRjmSIy.js";
|
|
2
|
-
import { A as flattenConfig, n as expandFlatPreset, r as expandPreset } from "./config-R0m0fBiD.js";
|
|
3
|
-
import { t as DEFAULT_CLAIMS } from "./claims-Bp9My7XP.js";
|
|
4
|
-
import { o as tenantNames } from "./entity-naming-Dtyq5sKE.js";
|
|
5
|
-
import { I as resolveBlock, L as tenantNameOf, M as PRESET_CATALOG, _ as appTablesOf, o as resolveInstances, r as blocksByName, v as withAppTableSubjects } from "./instances-DY_ORk5g.js";
|
|
6
|
-
import { C as variantsFor, S as variantTitle, _ as schemaName, a as extraSchemas, b as tableEntries, c as resultType, d as fieldSpec, f as fieldsFor, g as rowType, h as propertyKey, i as extraKinds, l as HEADER, m as parseImport, o as fieldMetaLines, p as optionalLine, s as objectType, u as fieldDocs, v as siblingPath, x as temporalGuardImport, y as tableDocs } from "./json-schema-DHJxiizN.js";
|
|
7
|
-
//#region src/config/authorization.ts
|
|
8
|
-
/**
|
|
9
|
-
* The error for a provider built for another API version, or `undefined` for
|
|
10
|
-
* version 1.
|
|
11
|
-
*/
|
|
12
|
-
function providerApiProblem(provider) {
|
|
13
|
-
const version = provider.apiVersion;
|
|
14
|
-
if (version === 1) return;
|
|
15
|
-
return `authorization "${typeof provider.name === "string" ? provider.name : "provider"}" targets authorization provider API ${String(version)}; this better-supabase supports 1. Upgrade better-supabase or use a release of the provider for API 1.`;
|
|
16
|
-
}
|
|
17
|
-
//#endregion
|
|
18
|
-
//#region src/config/block-subjects.ts
|
|
19
|
-
const CATALOG = new Map(PRESET_CATALOG.blocks.map((block) => [block.name, block]));
|
|
20
|
-
/** `names` and every block they require, from the catalog, in order. */
|
|
21
|
-
function withRequired(names) {
|
|
22
|
-
const found = /* @__PURE__ */ new Set();
|
|
23
|
-
const add = (name) => {
|
|
24
|
-
if (found.has(name)) return;
|
|
25
|
-
found.add(name);
|
|
26
|
-
for (const required of CATALOG.get(name)?.requires ?? []) add(required);
|
|
27
|
-
};
|
|
28
|
-
for (const name of names) add(name);
|
|
29
|
-
return [...found];
|
|
30
|
-
}
|
|
31
|
-
const PLACEHOLDER = /\{([^{}]*)\}/g;
|
|
32
|
-
/** One installed module's names under `blocks`, from the catalog. */
|
|
33
|
-
function catalogNames(module) {
|
|
34
|
-
const entities = CATALOG.get(module)?.entities;
|
|
35
|
-
return entities === void 0 ? void 0 : {
|
|
36
|
-
tables: entities.tables,
|
|
37
|
-
entities: entities.specs
|
|
38
|
-
};
|
|
39
|
-
}
|
|
40
|
-
/**
|
|
41
|
-
* The entities `blocks.<module>.names` gives a new name, such as `work_item` to
|
|
42
|
-
* `task`, for the block's TypeScript client (`blocks.generated.ts`). Empty when
|
|
43
|
-
* the module renames none.
|
|
44
|
-
*/
|
|
45
|
-
function blockEntityRenames(module, blocks) {
|
|
46
|
-
const names = catalogNames(module);
|
|
47
|
-
if (names === void 0) return [];
|
|
48
|
-
return Object.values(resolveNames(module, names, blocks).entities).filter((entity) => !entity.global && (entity.to.singular !== entity.from.singular || entity.to.plural !== entity.from.plural)).map((entity) => ({
|
|
49
|
-
from: entity.from,
|
|
50
|
-
to: entity.to
|
|
51
|
-
}));
|
|
52
|
-
}
|
|
53
|
-
/** The entities one installed block declares, with their final names. */
|
|
54
|
-
function blockEntities(module, blocks) {
|
|
55
|
-
const names = catalogNames(module);
|
|
56
|
-
if (names === void 0) return [];
|
|
57
|
-
const resolved = resolveNames(module, names, blocks);
|
|
58
|
-
const mapped = resolveBlock(blocks[module]).tables;
|
|
59
|
-
return Object.values(resolved.entities).map((entity) => {
|
|
60
|
-
const logical = entity.table;
|
|
61
|
-
const spec = logical === void 0 ? void 0 : names.tables[logical];
|
|
62
|
-
const target = logical === void 0 ? void 0 : mapped[logical];
|
|
63
|
-
const table = spec === void 0 || target === null ? void 0 : target ?? resolved.naming.rename(spec.name);
|
|
64
|
-
return {
|
|
65
|
-
key: entity.key,
|
|
66
|
-
from: entity.from,
|
|
67
|
-
to: entity.to,
|
|
68
|
-
primary: entity.primary,
|
|
69
|
-
table,
|
|
70
|
-
url: entity.url
|
|
71
|
-
};
|
|
72
|
-
});
|
|
73
|
-
}
|
|
74
|
-
/** The subjects one installed block registers, keyed by renamed entity. */
|
|
75
|
-
function subjectsOf(module, blocks) {
|
|
76
|
-
const entities = CATALOG.get(module)?.entities;
|
|
77
|
-
const names = catalogNames(module);
|
|
78
|
-
const config = resolveBlock(blocks[module]);
|
|
79
|
-
if (entities === void 0 || names === void 0 || config.mode === "custom") return {};
|
|
80
|
-
const resolved = resolveNames(module, names, blocks);
|
|
81
|
-
const key = (action) => config.permissions[action] ?? resolved.entityNaming.rename(entities.keys[action] ?? `${module}.${action}`);
|
|
82
|
-
return Object.fromEntries(Object.values(resolved.entities).flatMap((entity) => {
|
|
83
|
-
const subject = entity.subject;
|
|
84
|
-
const table = entity.table === void 0 ? void 0 : names.tables[entity.table];
|
|
85
|
-
const mapped = entity.table === void 0 ? void 0 : config.tables[entity.table];
|
|
86
|
-
if (subject === void 0 || entity.table === void 0 || table === void 0 || mapped === null) return [];
|
|
87
|
-
const logical = entity.table;
|
|
88
|
-
const column = (name) => config.columns[logical]?.[name] ?? resolved.naming.rename(table.columns[name] ?? name);
|
|
89
|
-
const titled = (key) => config.columns[logical]?.[key] === null && subject.fallbackTitle !== void 0 ? column(subject.fallbackTitle) : column(key);
|
|
90
|
-
const name = mapped ?? resolved.naming.rename(table.name);
|
|
91
|
-
const url = entity.url ?? subject.url;
|
|
92
|
-
const entry = {
|
|
93
|
-
table: name.includes(".") ? name : `${config.schema}.${name}`,
|
|
94
|
-
idType: "uuid",
|
|
95
|
-
tenant: column("tenant"),
|
|
96
|
-
title: titled(subject.title),
|
|
97
|
-
permissions: {
|
|
98
|
-
read: key(subject.permissions.read),
|
|
99
|
-
write: key(subject.permissions.write),
|
|
100
|
-
...subject.permissions.upload === void 0 ? {} : { upload: key(subject.permissions.upload) }
|
|
101
|
-
},
|
|
102
|
-
...subject.deletedAt === void 0 ? {} : { deletedAt: column(subject.deletedAt) },
|
|
103
|
-
...subject.rank === void 0 ? {} : { rank: {
|
|
104
|
-
column: column(subject.rank.column),
|
|
105
|
-
group: column(subject.rank.group)
|
|
106
|
-
} },
|
|
107
|
-
...subject.search === void 0 ? {} : { search: {
|
|
108
|
-
title: titled(subject.search.title),
|
|
109
|
-
body: subject.search.body.filter((name) => config.columns[logical]?.[name] !== null).map(column)
|
|
110
|
-
} },
|
|
111
|
-
...url === void 0 ? {} : { url: url.replaceAll(PLACEHOLDER, (_, placeholder) => `{${column(placeholder)}}`) },
|
|
112
|
-
...subject.cascade === true ? { cascade: true } : {}
|
|
113
|
-
};
|
|
114
|
-
return [[entity.to.singular, entry]];
|
|
115
|
-
}));
|
|
116
|
-
}
|
|
117
|
-
/**
|
|
118
|
-
* The entities of every installed block that registers one (work items, deals,
|
|
119
|
-
* companies and people, products, employees), under their renamed type, then
|
|
120
|
-
* `subjects`. Throws when `subjects` already has a block's type.
|
|
121
|
-
*/
|
|
122
|
-
/** The subject types one installed block registers, by renamed entity. */
|
|
123
|
-
function blockSubjectTypes(module, blocks) {
|
|
124
|
-
return Object.keys(subjectsOf(module, blocks));
|
|
125
|
-
}
|
|
126
|
-
function withBlockSubjects(subjects, blockNames, blocks) {
|
|
127
|
-
const merged = {};
|
|
128
|
-
for (const module of withRequired(blockNames)) for (const [type, entry] of Object.entries(subjectsOf(module, blocks))) {
|
|
129
|
-
if (Object.hasOwn(subjects, type)) throw new TypeError(`records.${type}: the ${module} block registers "${type}" itself; remove records.${type}, or set blocks.${module}.names.<entity>.subject to false to keep your own`);
|
|
130
|
-
merged[type] = entry;
|
|
131
|
-
}
|
|
132
|
-
return {
|
|
133
|
-
...merged,
|
|
134
|
-
...subjects
|
|
135
|
-
};
|
|
136
|
-
}
|
|
137
|
-
//#endregion
|
|
138
|
-
//#region src/config/expose.ts
|
|
139
|
-
const ALL_PRIVILEGES = [
|
|
140
|
-
"select",
|
|
141
|
-
"insert",
|
|
142
|
-
"update",
|
|
143
|
-
"delete"
|
|
144
|
-
];
|
|
145
|
-
const isFunctionKey = (key) => key.endsWith(")");
|
|
146
|
-
const EXPOSE_PRIVILEGE = /^(?:select|insert|update|delete|(?:select|insert|update)\s*\(\s*(?:[a-z_][a-z0-9_$]*(?:\s*,\s*[a-z_][a-z0-9_$]*)*|\*(?:\s*,\s*-\s*[a-z_][a-z0-9_$]*)*)\s*\))$/;
|
|
147
|
-
function checkedPrivileges(key, privileges) {
|
|
148
|
-
for (const privilege of privileges) {
|
|
149
|
-
const value = privilege;
|
|
150
|
-
if (typeof value !== "string" || !EXPOSE_PRIVILEGE.test(value)) throw new TypeError(`expose.${key}: "${String(value)}" is not a privilege. Use select, insert, update or delete, name columns such as "update(title, body)", or exclude them from every column with "select(*, -secret)"`);
|
|
151
|
-
}
|
|
152
|
-
return privileges;
|
|
153
|
-
}
|
|
154
|
-
function resolveExpose(key, entry) {
|
|
155
|
-
if (Array.isArray(entry)) return {
|
|
156
|
-
anon: [],
|
|
157
|
-
authenticated: checkedPrivileges(key, entry),
|
|
158
|
-
serviceRole: ALL_PRIVILEGES
|
|
159
|
-
};
|
|
160
|
-
if ("execute" in entry) throw new TypeError(`expose.${key}: \`execute\` is for functions; key it by its signature, such as ${key}(text)`);
|
|
161
|
-
const roles = entry;
|
|
162
|
-
return {
|
|
163
|
-
anon: checkedPrivileges(key, roles.anon ?? []),
|
|
164
|
-
authenticated: checkedPrivileges(key, roles.authenticated ?? []),
|
|
165
|
-
serviceRole: checkedPrivileges(key, roles.serviceRole ?? ALL_PRIVILEGES)
|
|
166
|
-
};
|
|
167
|
-
}
|
|
168
|
-
function resolveExposeFunction(key, entry) {
|
|
169
|
-
if (Array.isArray(entry) || !("execute" in entry)) throw new TypeError(`expose.${key}: a function takes { execute: ["authenticated"] }, not table privileges`);
|
|
170
|
-
return [...entry.execute, ...entry.serviceRole === false ? [] : ["service_role"]];
|
|
171
|
-
}
|
|
172
|
-
//#endregion
|
|
173
|
-
//#region src/config/resolve.ts
|
|
174
|
-
function entitlementsOf(config = {}, provider) {
|
|
175
|
-
const customer = config.customer;
|
|
176
|
-
const dot = customer?.lastIndexOf(".") ?? -1;
|
|
177
|
-
if (customer !== void 0 && dot <= 0) throw new TypeError(`auth.entitlements.customer must be "table.column", got "${customer}"`);
|
|
178
|
-
return {
|
|
179
|
-
...customer === void 0 ? {} : {
|
|
180
|
-
table: customer.slice(0, dot),
|
|
181
|
-
column: customer.slice(dot + 1)
|
|
182
|
-
},
|
|
183
|
-
key: config.key ?? "id",
|
|
184
|
-
memberships: config.memberships ?? (provider ? "provider" : "tenant"),
|
|
185
|
-
source: config.source ?? "stripe-sync",
|
|
186
|
-
...config.claim === void 0 ? {} : { claim: config.claim }
|
|
187
|
-
};
|
|
188
|
-
}
|
|
189
|
-
function vectorSearchOf(config = {}) {
|
|
190
|
-
return Object.entries(config).map(([table, entry]) => typeof entry === "string" ? {
|
|
191
|
-
table,
|
|
192
|
-
column: entry,
|
|
193
|
-
distance: "cosine"
|
|
194
|
-
} : {
|
|
195
|
-
table,
|
|
196
|
-
column: entry.column,
|
|
197
|
-
distance: entry.distance ?? "cosine",
|
|
198
|
-
...entry.type === void 0 ? {} : { type: entry.type },
|
|
199
|
-
...entry.key === void 0 ? {} : { key: entry.key },
|
|
200
|
-
...entry.hybrid === void 0 ? {} : { hybrid: entry.hybrid },
|
|
201
|
-
...entry.boost === void 0 ? {} : { boost: entry.boost },
|
|
202
|
-
...entry.prefilter === void 0 ? {} : { prefilter: entry.prefilter },
|
|
203
|
-
...entry.predicate === void 0 ? {} : { predicate: entry.predicate },
|
|
204
|
-
...entry.boostMode === void 0 ? {} : { boostMode: entry.boostMode },
|
|
205
|
-
...entry.order === void 0 ? {} : { order: entry.order }
|
|
206
|
-
});
|
|
207
|
-
}
|
|
208
|
-
/**
|
|
209
|
-
* With `authorization` set, the `access` module's model defaults to `provider`,
|
|
210
|
-
* so `can`, `tenant_ids_with` and every module check answer from the provider's
|
|
211
|
-
* templates instead of the built-in roles.
|
|
212
|
-
*/
|
|
213
|
-
function blocksOf(blocks, sql = {}, provider) {
|
|
214
|
-
const instances = Object.fromEntries(Object.entries(resolveInstances(blocks ?? [])).map(([name, instance]) => [name, {
|
|
215
|
-
...instance,
|
|
216
|
-
config: withSqlDefaults(instance.config, sql)
|
|
217
|
-
}]));
|
|
218
|
-
const blockNames = [...new Set(Object.values(instances).map((instance) => instance.block))];
|
|
219
|
-
const resolved = Array.isArray(blocks) && sql.schema === void 0 && sql.api === void 0 && sql.ownTablePolicies === void 0 ? {} : blocksByName(instances);
|
|
220
|
-
if (!provider || !blockNames.includes("permissions") || resolved.permissions?.model !== void 0) return {
|
|
221
|
-
blocks: resolved,
|
|
222
|
-
blockNames,
|
|
223
|
-
instances
|
|
224
|
-
};
|
|
225
|
-
return {
|
|
226
|
-
blocks: {
|
|
227
|
-
...resolved,
|
|
228
|
-
permissions: {
|
|
229
|
-
...resolved.permissions,
|
|
230
|
-
model: "provider"
|
|
231
|
-
}
|
|
232
|
-
},
|
|
233
|
-
blockNames,
|
|
234
|
-
instances
|
|
235
|
-
};
|
|
236
|
-
}
|
|
237
|
-
/**
|
|
238
|
-
* `sql.schema` and `sql.api` on every block that leaves its own unset. A
|
|
239
|
-
* block's `api: false` keeps it out of the API schema.
|
|
240
|
-
*/
|
|
241
|
-
function withSqlDefaults(block, sql) {
|
|
242
|
-
const { schema, api, ownTablePolicies } = sql;
|
|
243
|
-
return {
|
|
244
|
-
...block,
|
|
245
|
-
...schema === void 0 || block.schema !== void 0 ? {} : { schema },
|
|
246
|
-
...api === void 0 || block.api !== void 0 ? {} : { api },
|
|
247
|
-
...ownTablePolicies === void 0 || block.ownTablePolicies !== void 0 ? {} : { ownTablePolicies }
|
|
248
|
-
};
|
|
249
|
-
}
|
|
250
|
-
const CONFIG_SCHEMA_URL = "https://unpkg.com/better-supabase/schemas/config-v1.json";
|
|
251
|
-
/**
|
|
252
|
-
* Types `better-supabase.config.ts` and returns it with its literal types. With
|
|
253
|
-
* `preset`, it expands the preset into `blocks` and its conventions first, and
|
|
254
|
-
* the keys you set win. It checks the references between keys against the
|
|
255
|
-
* config itself: block tables and app tables in `tables` references, the
|
|
256
|
-
* `database.buckets` in `gen.storagePaths`, and the `blocks.permissions.roles`
|
|
257
|
-
* other blocks name.
|
|
258
|
-
*/
|
|
259
|
-
function defineConfig(config) {
|
|
260
|
-
return expandPreset(config);
|
|
261
|
-
}
|
|
262
|
-
/** A block's option as a string, or `fallback` when it leaves it unset. */
|
|
263
|
-
function optionOf(blocks, block, key, fallback) {
|
|
264
|
-
const value = blocks[block]?.options?.[key];
|
|
265
|
-
return typeof value === "string" ? value : fallback;
|
|
266
|
-
}
|
|
267
|
-
/**
|
|
268
|
-
* The columns each installed block's repository extension manages. The
|
|
269
|
-
* organization one is on with the `memberships` block, or with
|
|
270
|
-
* `auth.organization.column` set for an app's own tenancy.
|
|
271
|
-
*/
|
|
272
|
-
function extensionsOf({ blocks, blockNames }, organization, organizationColumn) {
|
|
273
|
-
const has = (name) => blockNames.includes(name);
|
|
274
|
-
return {
|
|
275
|
-
timestamps: has("updated-at") ? {
|
|
276
|
-
createdAt: optionOf(blocks, "updated-at", "createdAt", "created_at"),
|
|
277
|
-
updatedAt: optionOf(blocks, "updated-at", "updatedAt", "updated_at")
|
|
278
|
-
} : void 0,
|
|
279
|
-
softDelete: has("trash") ? { column: optionOf(blocks, "trash", "deletedAt", "deleted_at") } : void 0,
|
|
280
|
-
tenant: has("memberships") || organization?.column !== void 0 ? {
|
|
281
|
-
column: organization?.column ?? organizationColumn,
|
|
282
|
-
...organization?.onMissing === void 0 ? {} : { onMissing: organization.onMissing },
|
|
283
|
-
...organization?.header === void 0 ? {} : { header: organization.header }
|
|
284
|
-
} : void 0,
|
|
285
|
-
actor: has("created-by") ? {
|
|
286
|
-
createdBy: optionOf(blocks, "created-by", "createdBy", "created_by"),
|
|
287
|
-
updatedBy: optionOf(blocks, "created-by", "updatedBy", "updated_by"),
|
|
288
|
-
impersonatedBy: optionOf(blocks, "created-by", "impersonatedBy", "impersonated_by")
|
|
289
|
-
} : void 0
|
|
290
|
-
};
|
|
291
|
-
}
|
|
292
|
-
function generatorsOf(generators) {
|
|
293
|
-
for (const generator of generators ?? []) {
|
|
294
|
-
const version = generator.apiVersion;
|
|
295
|
-
if (version !== void 0 && version !== 1) throw new TypeError(`generator "${generator.name}" targets generator API ${String(version)}; this better-supabase supports 1. Upgrade better-supabase or use a release of the generator for API 1.`);
|
|
296
|
-
}
|
|
297
|
-
return generators ?? [];
|
|
298
|
-
}
|
|
299
|
-
function authorizationOf(provider) {
|
|
300
|
-
const problem = providerApiProblem(provider);
|
|
301
|
-
if (problem !== void 0) throw new TypeError(problem);
|
|
302
|
-
return provider;
|
|
303
|
-
}
|
|
304
|
-
/** Applies defaults. Paths stay relative to `root`. */
|
|
305
|
-
function resolveConfig(input, root) {
|
|
306
|
-
const config = expandFlatPreset(flattenConfig(input));
|
|
307
|
-
const output = config.output ?? CONFIG_DEFAULTS.output;
|
|
308
|
-
const legacyOpenApi = config.openapi;
|
|
309
|
-
const tenantName = tenantNameOf(config.blocks);
|
|
310
|
-
const appTables = appTablesOf(config.appTables, tenantName);
|
|
311
|
-
const blocks = blocksOf(config.blocks, config.sql, config.authorization !== void 0);
|
|
312
|
-
return {
|
|
313
|
-
root,
|
|
314
|
-
source: config.source ?? {},
|
|
315
|
-
schemas: config.schemas ?? CONFIG_DEFAULTS.schemas,
|
|
316
|
-
casing: config.casing ?? CONFIG_DEFAULTS.casing,
|
|
317
|
-
tables: config.tables ?? {},
|
|
318
|
-
output,
|
|
319
|
-
databaseTypesOutput: output.replace(/[^/]+$/, "database.types.ts"),
|
|
320
|
-
postgrestVersion: config.postgrestVersion ?? CONFIG_DEFAULTS.postgrestVersion,
|
|
321
|
-
recordTypes: config.recordTypes ?? true,
|
|
322
|
-
hooks: config.hooks ?? ((config.integrations ?? []).some((name) => [
|
|
323
|
-
"next",
|
|
324
|
-
"react",
|
|
325
|
-
"expo"
|
|
326
|
-
].includes(name)) ? "react" : false),
|
|
327
|
-
json: config.json ?? {},
|
|
328
|
-
codecs: {
|
|
329
|
-
timestamptz: config.codecs?.timestamptz ?? CONFIG_DEFAULTS.codecs.timestamptz,
|
|
330
|
-
int8: config.codecs?.int8 ?? CONFIG_DEFAULTS.codecs.int8,
|
|
331
|
-
numeric: config.codecs?.numeric ?? CONFIG_DEFAULTS.codecs.numeric
|
|
332
|
-
},
|
|
333
|
-
relations: { nullableUnderRls: config.relations?.nullableUnderRls ?? false },
|
|
334
|
-
sensitive: config.sensitive ?? [],
|
|
335
|
-
storagePaths: config.storagePaths ?? {},
|
|
336
|
-
functions: config.functions ?? {},
|
|
337
|
-
expose: Object.fromEntries(Object.entries(config.expose ?? {}).filter(([key]) => !isFunctionKey(key)).map(([table, entry]) => [table, resolveExpose(table, entry)])),
|
|
338
|
-
exposeFunctions: Object.fromEntries(Object.entries(config.expose ?? {}).filter(([key]) => isFunctionKey(key)).map(([fn, entry]) => [fn, resolveExposeFunction(fn, entry)])),
|
|
339
|
-
readSets: config.readSets ?? [],
|
|
340
|
-
generators: generatorsOf(config.generators),
|
|
341
|
-
extensions: extensionsOf(blocks, config.organization, tenantNames(tenantName).rename("organization_id")),
|
|
342
|
-
claims: {
|
|
343
|
-
...DEFAULT_CLAIMS,
|
|
344
|
-
...config.claims
|
|
345
|
-
},
|
|
346
|
-
buckets: config.buckets ?? {},
|
|
347
|
-
topics: config.topics ?? {},
|
|
348
|
-
realtime: {
|
|
349
|
-
tables: config.realtime?.tables ?? [],
|
|
350
|
-
global: config.realtime?.global ?? [],
|
|
351
|
-
users: config.realtime?.users ?? {},
|
|
352
|
-
triggers: config.realtime?.triggers ?? [],
|
|
353
|
-
...config.realtime?.policies === void 0 ? {} : { policies: config.realtime.policies }
|
|
354
|
-
},
|
|
355
|
-
entitlements: entitlementsOf(config.entitlements, config.authorization !== void 0),
|
|
356
|
-
...config.authorization === void 0 ? {} : { authorization: authorizationOf(config.authorization) },
|
|
357
|
-
vectorSearch: vectorSearchOf(config.vectorSearch),
|
|
358
|
-
subjects: withBlockSubjects(withAppTableSubjects(config.subjects ?? {}, appTables, config.sql?.scope, tenantName), blocks.blockNames, blocks.blocks),
|
|
359
|
-
sql: {
|
|
360
|
-
...config.sql?.workflow === void 0 ? {} : { workflow: config.sql.workflow },
|
|
361
|
-
dir: config.sql?.dir ?? CONFIG_DEFAULTS.sql.dir,
|
|
362
|
-
prefix: config.sql?.prefix ?? CONFIG_DEFAULTS.sql.prefix,
|
|
363
|
-
testsDir: config.sql?.testsDir ?? CONFIG_DEFAULTS.sql.testsDir,
|
|
364
|
-
...config.sql?.scope === void 0 ? {} : { scope: config.sql.scope },
|
|
365
|
-
...config.sql?.tenantColumn === void 0 ? {} : { tenantColumn: config.sql.tenantColumn }
|
|
366
|
-
},
|
|
367
|
-
...config.preset === void 0 ? {} : { preset: config.preset },
|
|
368
|
-
...blocks,
|
|
369
|
-
appTables,
|
|
370
|
-
seed: {
|
|
371
|
-
entry: config.seed?.entry ?? CONFIG_DEFAULTS.seed.entry,
|
|
372
|
-
output: config.seed?.output ?? CONFIG_DEFAULTS.seed.output,
|
|
373
|
-
perTenant: config.seed?.perTenant ?? CONFIG_DEFAULTS.seed.perTenant
|
|
374
|
-
},
|
|
375
|
-
openapi: {
|
|
376
|
-
entry: legacyOpenApi?.entry ?? CONFIG_DEFAULTS.openapi.entry,
|
|
377
|
-
output: legacyOpenApi?.output ?? CONFIG_DEFAULTS.openapi.output
|
|
378
|
-
},
|
|
379
|
-
specs: {
|
|
380
|
-
entry: config.specs?.entry ?? legacyOpenApi?.entry ?? CONFIG_DEFAULTS.openapi.entry,
|
|
381
|
-
outputs: config.specs?.outputs ?? [{
|
|
382
|
-
format: "openapi",
|
|
383
|
-
output: legacyOpenApi?.output ?? CONFIG_DEFAULTS.openapi.output
|
|
384
|
-
}],
|
|
385
|
-
failOn: config.specs?.failOn ?? CONFIG_DEFAULTS.specs.failOn,
|
|
386
|
-
...config.specs?.manifest === void 0 ? {} : { manifest: config.specs.manifest }
|
|
387
|
-
},
|
|
388
|
-
doctor: {
|
|
389
|
-
ignore: config.doctor?.ignore ?? [],
|
|
390
|
-
only: config.doctor?.only ?? [],
|
|
391
|
-
strict: config.doctor?.strict ?? false,
|
|
392
|
-
format: config.doctor?.format ?? CONFIG_DEFAULTS.doctor.format,
|
|
393
|
-
sources: config.doctor?.sources ?? CONFIG_DEFAULTS.doctor.sources,
|
|
394
|
-
policyHelperLimit: config.doctor?.policyHelperLimit ?? CONFIG_DEFAULTS.doctor.policyHelperLimit,
|
|
395
|
-
...config.doctor?.output === void 0 ? {} : { output: config.doctor.output },
|
|
396
|
-
...config.doctor?.claimsLimit === void 0 ? {} : { claimsLimit: config.doctor.claimsLimit },
|
|
397
|
-
...config.doctor?.migrationSafety === void 0 ? {} : { migrationSafety: config.doctor.migrationSafety }
|
|
398
|
-
},
|
|
399
|
-
gen: {
|
|
400
|
-
...config.gen,
|
|
401
|
-
watchInterval: config.gen?.watchInterval ?? CONFIG_DEFAULTS.gen.watchInterval
|
|
402
|
-
},
|
|
403
|
-
env: {
|
|
404
|
-
output: config.env?.output ?? CONFIG_DEFAULTS.env.output,
|
|
405
|
-
...config.env?.prefix === void 0 ? {} : { prefix: config.env.prefix }
|
|
406
|
-
},
|
|
407
|
-
integrations: config.integrations ?? [],
|
|
408
|
-
skills: config.skills ?? {},
|
|
409
|
-
keys: config.keys ?? {}
|
|
410
|
-
};
|
|
411
|
-
}
|
|
412
|
-
//#endregion
|
|
413
|
-
//#region src/generators/factories.ts
|
|
414
|
-
const NUMBER = String.raw`(-?\d+(?:\.\d+)?)`;
|
|
415
|
-
/** The call number as the generated template literal interpolates it. */
|
|
416
|
-
const N = ["$", "{String(n)}"].join("");
|
|
417
|
-
function escape(name) {
|
|
418
|
-
return name.replaceAll(/[.*+?^${}()|[\]\\]/g, String.raw`\$&`);
|
|
419
|
-
}
|
|
420
|
-
function tighten(bounds, op, value) {
|
|
421
|
-
switch (op) {
|
|
422
|
-
case ">=":
|
|
423
|
-
case ">": {
|
|
424
|
-
const min = op === ">" ? value + 1 : value;
|
|
425
|
-
bounds.min = Math.max(bounds.min ?? min, min);
|
|
426
|
-
break;
|
|
427
|
-
}
|
|
428
|
-
case "<=":
|
|
429
|
-
case "<": {
|
|
430
|
-
const max = op === "<" ? value - 1 : value;
|
|
431
|
-
bounds.max = Math.min(bounds.max ?? max, max);
|
|
432
|
-
break;
|
|
433
|
-
}
|
|
434
|
-
}
|
|
435
|
-
}
|
|
436
|
-
const FLIP = {
|
|
437
|
-
">=": "<=",
|
|
438
|
-
">": "<",
|
|
439
|
-
"<=": ">=",
|
|
440
|
-
"<": ">"
|
|
441
|
-
};
|
|
442
|
-
/** Numeric and length bounds a check constraint puts on `db`. */
|
|
443
|
-
function checkBounds(db, checks) {
|
|
444
|
-
const name = String.raw`"?${escape(db)}"?`;
|
|
445
|
-
const bounds = {};
|
|
446
|
-
const lengths = {};
|
|
447
|
-
for (const check of checks) {
|
|
448
|
-
const length = new RegExp(String.raw`(?:char_length|length)\(\s*${name}(?:::\w+)?\s*\)\s*(>=|>|<=|<)\s*${NUMBER}`, "gi");
|
|
449
|
-
for (const [, op = "", value = ""] of check.matchAll(length)) tighten(lengths, op, Number(value));
|
|
450
|
-
const after = new RegExp(String.raw`(?<![\w.])${name}(?:::\w+)?\s*(>=|>|<=|<)\s*\(?\s*${NUMBER}`, "gi");
|
|
451
|
-
for (const [, op = "", value = ""] of check.matchAll(after)) tighten(bounds, op, Number(value));
|
|
452
|
-
const before = new RegExp(String.raw`${NUMBER}\s*\)?\s*(>=|>|<=|<)\s*${name}(?![\w(])`, "gi");
|
|
453
|
-
for (const [, value = "", op = ""] of check.matchAll(before)) tighten(bounds, FLIP[op] ?? op, Number(value));
|
|
454
|
-
const between = new RegExp(String.raw`${name}\s+between\s+${NUMBER}\s+and\s+${NUMBER}`, "gi");
|
|
455
|
-
for (const [, low = "", high = ""] of check.matchAll(between)) {
|
|
456
|
-
tighten(bounds, ">=", Number(low));
|
|
457
|
-
tighten(bounds, "<=", Number(high));
|
|
458
|
-
}
|
|
459
|
-
}
|
|
460
|
-
return {
|
|
461
|
-
...bounds,
|
|
462
|
-
...lengths.min === void 0 ? {} : { minLength: lengths.min },
|
|
463
|
-
...lengths.max === void 0 ? {} : { maxLength: lengths.max }
|
|
464
|
-
};
|
|
465
|
-
}
|
|
466
|
-
function numberValue(bounds) {
|
|
467
|
-
const { min, max } = bounds;
|
|
468
|
-
if (min !== void 0 && max !== void 0) return max <= min ? String(min) : `${String(min)} + ((n - 1) % ${String(max - min + 1)})`;
|
|
469
|
-
if (min !== void 0) return min === 1 ? "n" : `${String(min)} + n - 1`;
|
|
470
|
-
return max === void 0 ? "n" : `Math.min(${String(max)}, n)`;
|
|
471
|
-
}
|
|
472
|
-
function textValue(column, bounds) {
|
|
473
|
-
let value = `\`${column.db.replaceAll("_", "-")}-${N}\``;
|
|
474
|
-
if (bounds.minLength !== void 0 && bounds.minLength > column.db.length) value = `${value}.padEnd(${String(bounds.minLength)}, "x")`;
|
|
475
|
-
if (bounds.maxLength !== void 0) value = `${value}.slice(0, ${String(bounds.maxLength)})`;
|
|
476
|
-
return value;
|
|
477
|
-
}
|
|
478
|
-
const TEMPORAL = {
|
|
479
|
-
"Temporal.Instant": "factoryTime.instant()",
|
|
480
|
-
"Temporal.PlainDate": "factoryTime.plainDate()",
|
|
481
|
-
"Temporal.PlainDateTime": "factoryTime.plainDateTime()",
|
|
482
|
-
"Temporal.PlainTime": "factoryTime.plainTime()"
|
|
483
|
-
};
|
|
484
|
-
const STRING_FORMATS = {
|
|
485
|
-
uuid: `\`00000000-0000-4000-8000-${["$", "{String(n).padStart(12, \"0\")}"].join("")}\``,
|
|
486
|
-
date: "\"2026-01-01\"",
|
|
487
|
-
timestamptz: "\"2026-01-01T00:00:00Z\"",
|
|
488
|
-
timestamp: "\"2026-01-01T00:00:00\"",
|
|
489
|
-
time: "\"00:00:00\""
|
|
490
|
-
};
|
|
491
|
-
/** The default for one required column, or undefined when a call needs it. */
|
|
492
|
-
function defaultValue(column, format, bounds) {
|
|
493
|
-
if (column.values !== void 0) return JSON.stringify(column.values[0]);
|
|
494
|
-
const bucket = /^StoragePath<"([^"]+)">$/.exec(column.tsType)?.[1];
|
|
495
|
-
if (bucket !== void 0) return `factoryPath(${JSON.stringify(bucket)}, \`${column.app}/${N}\`)`;
|
|
496
|
-
if (column.tsType.endsWith("[]")) return "[]";
|
|
497
|
-
if (column.json) return column.tsType === "Json" ? "{}" : void 0;
|
|
498
|
-
const temporal = TEMPORAL[column.tsType];
|
|
499
|
-
if (temporal !== void 0) return temporal;
|
|
500
|
-
switch (column.tsType) {
|
|
501
|
-
case "boolean": return "false";
|
|
502
|
-
case "bigint": return "BigInt(n)";
|
|
503
|
-
case "number": return numberValue(bounds);
|
|
504
|
-
case "string": {
|
|
505
|
-
const formatted = format === void 0 ? void 0 : STRING_FORMATS[format];
|
|
506
|
-
if (formatted !== void 0) return formatted;
|
|
507
|
-
return /email/i.test(column.app) ? `\`user${N}@example.com\`` : textValue(column, bounds);
|
|
508
|
-
}
|
|
509
|
-
default: return;
|
|
510
|
-
}
|
|
511
|
-
}
|
|
512
|
-
function sortByKey(a, b) {
|
|
513
|
-
return a.key < b.key ? -1 : a.key > b.key ? 1 : 0;
|
|
514
|
-
}
|
|
515
|
-
function camel(noun) {
|
|
516
|
-
return noun.replaceAll(/_([a-z0-9])/g, (_, c) => c.toUpperCase());
|
|
517
|
-
}
|
|
518
|
-
function planTable(table, input) {
|
|
519
|
-
const { introspection, extras, model } = input;
|
|
520
|
-
const checks = (extras.tables.find((entry) => entry.schema === table.schema && entry.name === table.name)?.checks ?? []).map((check) => check.definition);
|
|
521
|
-
const columns = introspection.columns.filter((entry) => entry.schema === table.schema && entry.table === table.name);
|
|
522
|
-
const refs = /* @__PURE__ */ new Map();
|
|
523
|
-
const relationships = introspection.relationships.filter((relationship) => relationship.schema === table.schema && relationship.relation === table.name).toSorted((a, b) => a.columns.length - b.columns.length);
|
|
524
|
-
for (const relationship of relationships) {
|
|
525
|
-
const parent = model.tables.find((entry) => entry.schema === relationship.referenced_schema && entry.name === relationship.referenced_relation);
|
|
526
|
-
for (const [index, db] of relationship.columns.entries()) {
|
|
527
|
-
const target = relationship.referenced_columns[index];
|
|
528
|
-
if (target === void 0 || refs.has(db)) continue;
|
|
529
|
-
refs.set(db, parent?.columns.find((column) => column.db === target)?.app ?? target);
|
|
530
|
-
}
|
|
531
|
-
}
|
|
532
|
-
return table.columns.filter((column) => !column.readonly).map((column) => {
|
|
533
|
-
const ref = refs.get(column.db);
|
|
534
|
-
const meta = columns.find((entry) => entry.name === column.db);
|
|
535
|
-
const own = meta?.check ? [meta.check] : [];
|
|
536
|
-
return {
|
|
537
|
-
column,
|
|
538
|
-
ref,
|
|
539
|
-
value: column.optional || ref !== void 0 ? void 0 : defaultValue(column, meta?.format, checkBounds(column.db, [...own, ...checks]))
|
|
540
|
-
};
|
|
541
|
-
});
|
|
542
|
-
}
|
|
543
|
-
function union$1(keys) {
|
|
544
|
-
return keys.length === 0 ? "never" : keys.map((key) => JSON.stringify(key)).join(" | ");
|
|
545
|
-
}
|
|
546
|
-
function tableLines$1(table, plan) {
|
|
547
|
-
const refs = plan.filter((entry) => entry.ref !== void 0);
|
|
548
|
-
const required = plan.filter((entry) => !entry.column.optional && entry.value === void 0);
|
|
549
|
-
const type = `Factory<InsertOf<${JSON.stringify(table.key)}>, ${union$1(refs.map((entry) => entry.column.app))}, ${union$1(required.map((entry) => entry.column.app))}>`;
|
|
550
|
-
const defaults = plan.flatMap((entry) => entry.value === void 0 ? [] : [`${JSON.stringify(entry.column.app)}: ${entry.value}`]);
|
|
551
|
-
const refMap = refs.map((entry) => `${JSON.stringify(entry.column.app)}: ${JSON.stringify(entry.ref)}`);
|
|
552
|
-
const uses = defaults.some((line) => /\bn\b/.test(line));
|
|
553
|
-
const object = (items) => items.length === 0 ? "{}" : `{ ${items.join(", ")} }`;
|
|
554
|
-
return {
|
|
555
|
-
type,
|
|
556
|
-
value: `defineFactory<InsertOf<${JSON.stringify(table.key)}>, ${union$1(refs.map((entry) => entry.column.app))}, ${union$1(required.map((entry) => entry.column.app))}>((${uses ? "n" : "_n"}) => (${object(defaults)}), ${object(refMap)})`
|
|
557
|
-
};
|
|
558
|
-
}
|
|
559
|
-
/**
|
|
560
|
-
* Test factories, one per table: `factories.customers({ name })` returns an
|
|
561
|
-
* insert row with valid defaults for the required columns. Defaults respect
|
|
562
|
-
* enums, check-constraint bounds and `StoragePath` buckets. A foreign key takes
|
|
563
|
-
* the parent row or its id, and a column without a safe default is a required
|
|
564
|
-
* input. Block entities also get a factory under their singular noun
|
|
565
|
-
* (`factories.task`). The file imports `better-supabase/testing`.
|
|
566
|
-
*/
|
|
567
|
-
function factories(options = {}) {
|
|
568
|
-
return {
|
|
569
|
-
apiVersion: 1,
|
|
570
|
-
name: "factories",
|
|
571
|
-
generate(input) {
|
|
572
|
-
const path = options.output ?? siblingPath(input.config.output, "factories.ts");
|
|
573
|
-
const wanted = options.tables === void 0 ? void 0 : new Set(options.tables);
|
|
574
|
-
const tables = input.model.tables.filter((table) => (wanted === void 0 || wanted.has(table.key)) && input.introspection.tables.some((entry) => entry.schema === table.schema && entry.name === table.name)).toSorted(sortByKey);
|
|
575
|
-
const missing = [...wanted ?? []].filter((key) => !tables.some((table) => table.key === key));
|
|
576
|
-
if (missing.length > 0) throw new Error(`factories(): no table named ${missing.map((key) => `"${key}"`).join(", ")}`);
|
|
577
|
-
const lines = tables.map((table) => ({
|
|
578
|
-
key: table.key,
|
|
579
|
-
plan: planTable(table, input),
|
|
580
|
-
table
|
|
581
|
-
})).map(({ key, plan, table }) => ({
|
|
582
|
-
key,
|
|
583
|
-
...tableLines$1(table, plan)
|
|
584
|
-
}));
|
|
585
|
-
const aliases = input.model.blocks.flatMap((block) => block.entities.flatMap((entity) => {
|
|
586
|
-
const key = camel(entity.to.singular);
|
|
587
|
-
const table = tables.find((entry) => entry.schema === block.schema && entry.name === entity.table);
|
|
588
|
-
return table === void 0 || table.key === key || tables.some((entry) => entry.key === key) ? [] : [{
|
|
589
|
-
key,
|
|
590
|
-
target: table.key
|
|
591
|
-
}];
|
|
592
|
-
}));
|
|
593
|
-
const runtime = options.testingImport ?? `${input.runtimeImport ?? "better-supabase"}/testing`;
|
|
594
|
-
const usesPath = lines.some((line) => line.value.includes("factoryPath("));
|
|
595
|
-
const usesTime = lines.some((line) => line.value.includes("factoryTime."));
|
|
596
|
-
const local = (key) => `${key}Factory`;
|
|
597
|
-
const members = [...lines.map((line) => ({
|
|
598
|
-
key: line.key,
|
|
599
|
-
target: line.key
|
|
600
|
-
})), ...aliases].toSorted((a, b) => a.key < b.key ? -1 : a.key > b.key ? 1 : 0);
|
|
601
|
-
return [{
|
|
602
|
-
path,
|
|
603
|
-
contents: [
|
|
604
|
-
HEADER,
|
|
605
|
-
`import type { Factory } from ${JSON.stringify(runtime)};`,
|
|
606
|
-
`import { ${[
|
|
607
|
-
"defineFactory",
|
|
608
|
-
...usesPath ? ["factoryPath"] : [],
|
|
609
|
-
...usesTime ? ["factoryTime"] : []
|
|
610
|
-
].join(", ")} } from ${JSON.stringify(runtime)};`,
|
|
611
|
-
"",
|
|
612
|
-
`import type { InsertOf } from ${JSON.stringify(input.importPath(path, input.config.output))};`,
|
|
613
|
-
...lines.flatMap((line) => ["", `const ${local(line.key)}: ${line.type} = ${line.value};`]),
|
|
614
|
-
"",
|
|
615
|
-
"/**",
|
|
616
|
-
" * Insert rows with valid defaults, one factory per table and one per block",
|
|
617
|
-
" * entity under the name the config gives it.",
|
|
618
|
-
" */",
|
|
619
|
-
"export const factories: {",
|
|
620
|
-
...members.map(({ key, target }) => ` readonly ${key}: typeof ${local(target)};`),
|
|
621
|
-
"} = {",
|
|
622
|
-
...members.map(({ key, target }) => ` ${key}: ${local(target)},`),
|
|
623
|
-
"};",
|
|
624
|
-
""
|
|
625
|
-
].join("\n")
|
|
626
|
-
}];
|
|
627
|
-
}
|
|
628
|
-
};
|
|
629
|
-
}
|
|
630
|
-
//#endregion
|
|
631
|
-
//#region src/generators/nuqs.ts
|
|
632
|
-
/**
|
|
633
|
-
* The list params every table gets; a column with one of these names is left
|
|
634
|
-
* out.
|
|
635
|
-
*/
|
|
636
|
-
const LIST_PARAMS = /* @__PURE__ */ new Set([
|
|
637
|
-
"cursor",
|
|
638
|
-
"direction",
|
|
639
|
-
"limit",
|
|
640
|
-
"orderBy"
|
|
641
|
-
]);
|
|
642
|
-
const SORTABLE = /* @__PURE__ */ new Set([
|
|
643
|
-
"bigint",
|
|
644
|
-
"boolean",
|
|
645
|
-
"number",
|
|
646
|
-
"string"
|
|
647
|
-
]);
|
|
648
|
-
function sortable(column) {
|
|
649
|
-
return !column.json && (column.values !== void 0 || SORTABLE.has(column.tsType) || column.tsType.startsWith("Temporal."));
|
|
650
|
-
}
|
|
651
|
-
function pascal(key) {
|
|
652
|
-
return key.replace(/^[a-z]/, (c) => c.toUpperCase());
|
|
653
|
-
}
|
|
654
|
-
function literal(values) {
|
|
655
|
-
return `[${values.map((value) => JSON.stringify(value)).join(", ")}] as const`;
|
|
656
|
-
}
|
|
657
|
-
function union(values) {
|
|
658
|
-
return values.map((value) => JSON.stringify(value)).join(" | ");
|
|
659
|
-
}
|
|
660
|
-
function tableLines(table, limit) {
|
|
661
|
-
const name = `${table.key.replace(/^[A-Z]/, (c) => c.toLowerCase())}SearchParams`;
|
|
662
|
-
const params = [];
|
|
663
|
-
for (const column of table.columns) {
|
|
664
|
-
if (column.values === void 0 || LIST_PARAMS.has(column.app)) continue;
|
|
665
|
-
params.push([
|
|
666
|
-
column.app,
|
|
667
|
-
`SingleParserBuilder<${union(column.values)}>`,
|
|
668
|
-
`parseAsStringLiteral(${literal(column.values)})`
|
|
669
|
-
]);
|
|
670
|
-
}
|
|
671
|
-
const orderBy = table.columns.filter(sortable).map((column) => column.app);
|
|
672
|
-
if (orderBy.length > 0) params.push([
|
|
673
|
-
"orderBy",
|
|
674
|
-
`SingleParserBuilder<${union(orderBy)}>`,
|
|
675
|
-
`parseAsStringLiteral(${literal(orderBy)})`
|
|
676
|
-
]);
|
|
677
|
-
params.push([
|
|
678
|
-
"direction",
|
|
679
|
-
"SingleParserBuilder<\"asc\" | \"desc\"> & { readonly defaultValue: \"asc\" | \"desc\" }",
|
|
680
|
-
`parseAsStringLiteral(${literal(["asc", "desc"])}).withDefault("asc")`
|
|
681
|
-
], [
|
|
682
|
-
"cursor",
|
|
683
|
-
"SingleParserBuilder<string>",
|
|
684
|
-
"parseAsString"
|
|
685
|
-
], [
|
|
686
|
-
"limit",
|
|
687
|
-
"SingleParserBuilder<number> & { readonly defaultValue: number }",
|
|
688
|
-
`parseAsInteger.withDefault(${String(limit)})`
|
|
689
|
-
]);
|
|
690
|
-
const map = `typeof ${name}`;
|
|
691
|
-
return [
|
|
692
|
-
"",
|
|
693
|
-
`/** Search params for a list of \`${table.key}\`: filters, order, cursor and page size. */`,
|
|
694
|
-
`export const ${name}: {`,
|
|
695
|
-
...params.map(([key, type]) => ` readonly ${key}: ${type};`),
|
|
696
|
-
"} = {",
|
|
697
|
-
...params.map(([key, , value]) => ` ${key}: ${value},`),
|
|
698
|
-
"};",
|
|
699
|
-
"",
|
|
700
|
-
`/** Reads \`${name}\` once per request in Server Components. */`,
|
|
701
|
-
`export const ${name}Cache: ReturnType<typeof createSearchParamsCache<${map}>> = createSearchParamsCache(${name});`,
|
|
702
|
-
"",
|
|
703
|
-
`/** Parses \`${name}\` from a URL, a \`Request\` or \`searchParams\`. */`,
|
|
704
|
-
`export const load${pascal(name)}: LoaderFunction<${map}> = createLoader(${name});`,
|
|
705
|
-
"",
|
|
706
|
-
`/** Writes \`${name}\` into a URL, for links. */`,
|
|
707
|
-
`export const serialize${pascal(name)}: ReturnType<typeof createSerializer<${map}>> = createSerializer(${name});`
|
|
708
|
-
];
|
|
709
|
-
}
|
|
710
|
-
/**
|
|
711
|
-
* Search-param parsers for nuqs, one set per table list: a filter for every
|
|
712
|
-
* column with a closed set of values, `orderBy` over the sortable columns,
|
|
713
|
-
* `direction`, `cursor` and `limit`, with a cache, a loader and a serializer.
|
|
714
|
-
* The file imports `nuqs/server`, which the app installs.
|
|
715
|
-
*/
|
|
716
|
-
function nuqs(options = {}) {
|
|
717
|
-
return {
|
|
718
|
-
apiVersion: 1,
|
|
719
|
-
name: "nuqs",
|
|
720
|
-
generate(input) {
|
|
721
|
-
const path = options.output ?? siblingPath(input.config.output, "nuqs.ts");
|
|
722
|
-
const wanted = options.tables === void 0 ? void 0 : new Set(options.tables);
|
|
723
|
-
const tables = input.model.tables.filter((table) => wanted === void 0 || wanted.has(table.key)).toSorted((a, b) => a.key < b.key ? -1 : a.key > b.key ? 1 : 0);
|
|
724
|
-
const missing = [...wanted ?? []].filter((key) => !tables.some((table) => table.key === key));
|
|
725
|
-
if (missing.length > 0) throw new Error(`nuqs(): no table named ${missing.map((key) => `"${key}"`).join(", ")}`);
|
|
726
|
-
return [{
|
|
727
|
-
path,
|
|
728
|
-
contents: [
|
|
729
|
-
HEADER,
|
|
730
|
-
"import type { LoaderFunction, SingleParserBuilder } from \"nuqs/server\";",
|
|
731
|
-
"import { createLoader, createSearchParamsCache, createSerializer, parseAsInteger, parseAsString, parseAsStringLiteral } from \"nuqs/server\";",
|
|
732
|
-
...tables.flatMap((table) => tableLines(table, options.limit ?? 25)),
|
|
733
|
-
""
|
|
734
|
-
].join("\n")
|
|
735
|
-
}];
|
|
736
|
-
}
|
|
737
|
-
};
|
|
738
|
-
}
|
|
739
|
-
//#endregion
|
|
740
|
-
//#region src/generators/standard-schema.ts
|
|
741
|
-
/**
|
|
742
|
-
* Standard Schemas for every table's Row, Insert and Update shape, with no
|
|
743
|
-
* validation library. Each one also converts to JSON Schema (Standard JSON
|
|
744
|
-
* Schema), and `validators` is what the generated schema checks writes with.
|
|
745
|
-
*/
|
|
746
|
-
function standardSchema(options = {}) {
|
|
747
|
-
return {
|
|
748
|
-
apiVersion: 1,
|
|
749
|
-
name: "standard-schema",
|
|
750
|
-
generate(input) {
|
|
751
|
-
const path = options.output ?? siblingPath(input.config.output, "standard.ts");
|
|
752
|
-
const imports = /* @__PURE__ */ new Map();
|
|
753
|
-
const jsonImports = /* @__PURE__ */ new Map();
|
|
754
|
-
const tableNames = new Map(Object.values(input.meta.tables).map((t) => [t.name, t.key]));
|
|
755
|
-
for (const [key, spec] of Object.entries(options.json ?? {})) {
|
|
756
|
-
const [tableName, column] = key.split(".");
|
|
757
|
-
const { from, name } = parseImport(spec);
|
|
758
|
-
const specifier = from.startsWith(".") ? input.importPath(path, from) : from;
|
|
759
|
-
imports.set(specifier, [...imports.get(specifier) ?? [], name]);
|
|
760
|
-
jsonImports.set(`${tableNames.get(tableName ?? "") ?? tableName}.${column}`, name);
|
|
761
|
-
}
|
|
762
|
-
const extras = extraSchemas(input);
|
|
763
|
-
const usesJson = extras.inputs.some((schema) => Object.values(schema.fields).some((field) => field.kind === "json"));
|
|
764
|
-
const lines = [
|
|
765
|
-
HEADER,
|
|
766
|
-
`import { type TableSchema, tableSchema } from ${JSON.stringify(input.runtimeImport ?? "better-supabase")};`,
|
|
767
|
-
"",
|
|
768
|
-
`import type { InsertOf, ${usesJson ? "Json, " : ""}RowOf, UpdateOf } from ${JSON.stringify(input.importPath(path, input.config.output))};`
|
|
769
|
-
];
|
|
770
|
-
for (const [from, names] of imports) lines.push(`import { ${[...new Set(names)].toSorted().join(", ")} } from ${JSON.stringify(from)};`);
|
|
771
|
-
const validators = [];
|
|
772
|
-
const validatorTypes = [];
|
|
773
|
-
for (const [key, table] of tableEntries(input)) {
|
|
774
|
-
const variants = variantsFor(table);
|
|
775
|
-
const docs = tableDocs(input, table);
|
|
776
|
-
for (const variant of variants) {
|
|
777
|
-
lines.push("", `export const ${schemaName(key, variant)}: TableSchema<${variant}Of<'${key}'>> = tableSchema({`);
|
|
778
|
-
if (docs) {
|
|
779
|
-
lines.push(` title: ${JSON.stringify(variantTitle(docs, variant))},`);
|
|
780
|
-
if (docs.description !== void 0) lines.push(` description: ${JSON.stringify(docs.description)},`);
|
|
781
|
-
}
|
|
782
|
-
lines.push(" fields: {");
|
|
783
|
-
for (const plan of fieldsFor(table, variant, input)) {
|
|
784
|
-
const imported = jsonImports.get(`${key}.${plan.column.db}`);
|
|
785
|
-
const entries = Object.entries(fieldSpec(plan, fieldDocs(docs, plan))).map(([name, value]) => `${name}: ${JSON.stringify(value)}`);
|
|
786
|
-
if (imported) entries.push(`schema: ${imported}`);
|
|
787
|
-
lines.push(` ${propertyKey(plan.name)}: { ${entries.join(", ")} },`);
|
|
788
|
-
}
|
|
789
|
-
lines.push(" },", "});");
|
|
790
|
-
}
|
|
791
|
-
if (variants.includes("Insert")) {
|
|
792
|
-
const insert = schemaName(key, "Insert");
|
|
793
|
-
const update = schemaName(key, "Update");
|
|
794
|
-
validators.push(` ${propertyKey(key)}: { insert: ${insert}, update: ${update} },`);
|
|
795
|
-
validatorTypes.push(` readonly ${propertyKey(key)}: { readonly insert: typeof ${insert}; readonly update: typeof ${update} };`);
|
|
796
|
-
}
|
|
797
|
-
}
|
|
798
|
-
lines.push("", "/** Write validators; the generated schema installs them through `validation`. */", "export const validators: {", ...validatorTypes, "} = {", ...validators, "};");
|
|
799
|
-
for (const schema of extras.inputs) lines.push("", `export const ${schema.name}: TableSchema<${objectType(schema)}> = tableSchema({`, ` title: ${JSON.stringify(schema.title)},`, " fields: {", ...Object.entries(schema.fields).map(([name, spec]) => ` ${propertyKey(name)}: ${JSON.stringify(spec)},`), " },", "});");
|
|
800
|
-
lines.push(...options.fieldMeta ? fieldMetaLines(input, extras) : [], "");
|
|
801
|
-
return [{
|
|
802
|
-
path,
|
|
803
|
-
contents: lines.join("\n"),
|
|
804
|
-
validators: true
|
|
805
|
-
}];
|
|
806
|
-
}
|
|
807
|
-
};
|
|
808
|
-
}
|
|
809
|
-
//#endregion
|
|
810
|
-
//#region src/generators/valibot.ts
|
|
811
|
-
function scalar$1(kind) {
|
|
812
|
-
switch (kind.kind) {
|
|
813
|
-
case "uuid": return "v.pipe(v.string(), v.uuid())";
|
|
814
|
-
case "string": return "v.string()";
|
|
815
|
-
case "integer": return "v.pipe(v.number(), v.integer())";
|
|
816
|
-
case "number": return "v.number()";
|
|
817
|
-
case "boolean": return "v.boolean()";
|
|
818
|
-
case "datetime": return "v.pipe(v.string(), v.isoTimestamp())";
|
|
819
|
-
case "date": return "v.pipe(v.string(), v.isoDate())";
|
|
820
|
-
case "instant": return "v.custom<Temporal.Instant>(isInstant)";
|
|
821
|
-
case "plainDate": return "v.custom<Temporal.PlainDate>(isPlainDate)";
|
|
822
|
-
case "plainDateTime": return "v.custom<Temporal.PlainDateTime>(isPlainDateTime)";
|
|
823
|
-
case "bigint": return "v.bigint()";
|
|
824
|
-
case "json": return "json";
|
|
825
|
-
case "enum": return `v.picklist([${kind.values.map((value) => JSON.stringify(value)).join(", ")}])`;
|
|
826
|
-
case "unknown": return "v.unknown()";
|
|
827
|
-
default: return kind;
|
|
828
|
-
}
|
|
829
|
-
}
|
|
830
|
-
/** `expr` with `actions` appended, flattening an existing top-level `v.pipe`. */
|
|
831
|
-
function piped(expr, actions) {
|
|
832
|
-
if (actions.length === 0) return expr;
|
|
833
|
-
return `v.pipe(${/^v\.pipe\((.*)\)$/s.exec(expr)?.[1] ?? expr}, ${actions.join(", ")})`;
|
|
834
|
-
}
|
|
835
|
-
function boundActions(docs) {
|
|
836
|
-
return [
|
|
837
|
-
docs.minimum === void 0 ? void 0 : `v.minValue(${docs.minimum})`,
|
|
838
|
-
docs.exclusiveMinimum === void 0 ? void 0 : `v.gtValue(${docs.exclusiveMinimum})`,
|
|
839
|
-
docs.maximum === void 0 ? void 0 : `v.maxValue(${docs.maximum})`,
|
|
840
|
-
docs.exclusiveMaximum === void 0 ? void 0 : `v.ltValue(${docs.exclusiveMaximum})`,
|
|
841
|
-
docs.minLength === void 0 ? void 0 : `v.minLength(${docs.minLength})`,
|
|
842
|
-
docs.maxLength === void 0 ? void 0 : `v.maxLength(${docs.maxLength})`
|
|
843
|
-
].filter((action) => action !== void 0);
|
|
844
|
-
}
|
|
845
|
-
function docActions(docs) {
|
|
846
|
-
return [...docs.description === void 0 ? [] : [`v.description(${JSON.stringify(docs.description)})`], ...docs.examples === void 0 ? [] : [`v.examples(${JSON.stringify(docs.examples)})`]];
|
|
847
|
-
}
|
|
848
|
-
function field$1(table, plan, jsonImports, docs) {
|
|
849
|
-
let expr = jsonImports.get(`${table}.${plan.column.db}`) ?? (plan.customJson ? `v.custom<NonNullable<RowOf<'${table}'>['${plan.name}']>>((value) => value !== undefined)` : plan.column.storage === void 0 ? piped(scalar$1(plan.scalar), boundActions(docs)) : `(v.string() as unknown as v.GenericSchema<${rowType(table, plan)}>)`);
|
|
850
|
-
if (plan.column.array) expr = `v.array(${expr})`;
|
|
851
|
-
if (plan.nullable) expr = `v.nullable(${expr})`;
|
|
852
|
-
expr = piped(expr, docActions(docs));
|
|
853
|
-
if (plan.optional) expr = `v.exactOptional(${expr})`;
|
|
854
|
-
return ` ${propertyKey(plan.name)}: ${expr},`;
|
|
855
|
-
}
|
|
856
|
-
function specExpr$1(spec) {
|
|
857
|
-
let expr = spec.kind === "custom" ? "v.unknown()" : piped(scalar$1(spec), boundActions(spec));
|
|
858
|
-
if (spec.array) expr = `v.array(${expr})`;
|
|
859
|
-
if (spec.nullable) expr = `v.nullable(${expr})`;
|
|
860
|
-
expr = piped(expr, docActions(spec));
|
|
861
|
-
return spec.optional ? `v.exactOptional(${expr})` : expr;
|
|
862
|
-
}
|
|
863
|
-
function resultExpr$1(result, rows) {
|
|
864
|
-
if (result.of.kind === "row") {
|
|
865
|
-
if (!rows.has(result.of.table)) return;
|
|
866
|
-
const row = schemaName(result.of.table, "Row");
|
|
867
|
-
return result.set ? `v.array(${row})` : `v.nullable(${row})`;
|
|
868
|
-
}
|
|
869
|
-
const item = scalar$1(result.of.scalar);
|
|
870
|
-
const element = result.nullable ? `v.nullable(${item})` : item;
|
|
871
|
-
return result.set ? `v.array(${element})` : element;
|
|
872
|
-
}
|
|
873
|
-
function extraLines$1(input, extras) {
|
|
874
|
-
const lines = [];
|
|
875
|
-
for (const schema of extras.inputs) {
|
|
876
|
-
lines.push("", `export const ${schema.name}: v.GenericSchema<${objectType(schema)}> = v.pipe(v.object({`);
|
|
877
|
-
for (const [name, spec] of Object.entries(schema.fields)) lines.push(` ${propertyKey(name)}: ${specExpr$1(spec)},`);
|
|
878
|
-
lines.push(`}), v.title(${JSON.stringify(schema.title)}));`);
|
|
879
|
-
}
|
|
880
|
-
const rows = new Set(Object.keys(input.meta.tables));
|
|
881
|
-
for (const result of extras.results) {
|
|
882
|
-
const expr = resultExpr$1(result, rows);
|
|
883
|
-
if (expr !== void 0) lines.push("", `export const ${result.name}: v.GenericSchema<${resultType(result)}> = ${expr};`);
|
|
884
|
-
}
|
|
885
|
-
return lines;
|
|
886
|
-
}
|
|
887
|
-
/** Valibot schemas for every table's Row, Insert and Update shape. */
|
|
888
|
-
function valibot(options = {}) {
|
|
889
|
-
return {
|
|
890
|
-
apiVersion: 1,
|
|
891
|
-
name: "valibot",
|
|
892
|
-
generate(input) {
|
|
893
|
-
const path = options.output ?? siblingPath(input.config.output, "valibot.ts");
|
|
894
|
-
const imports = /* @__PURE__ */ new Map();
|
|
895
|
-
const jsonImports = /* @__PURE__ */ new Map();
|
|
896
|
-
const tableNames = new Map(Object.values(input.meta.tables).map((t) => [t.name, t.key]));
|
|
897
|
-
for (const [key, spec] of Object.entries(options.json ?? {})) {
|
|
898
|
-
const [tableName, column] = key.split(".");
|
|
899
|
-
const { from, name } = parseImport(spec);
|
|
900
|
-
const specifier = from.startsWith(".") ? input.importPath(path, from) : from;
|
|
901
|
-
imports.set(specifier, [...imports.get(specifier) ?? [], name]);
|
|
902
|
-
jsonImports.set(`${tableNames.get(tableName ?? "") ?? tableName}.${column}`, name);
|
|
903
|
-
}
|
|
904
|
-
const extras = extraSchemas(input);
|
|
905
|
-
const lines = [
|
|
906
|
-
HEADER,
|
|
907
|
-
"import * as v from \"valibot\";",
|
|
908
|
-
...optionalLine(temporalGuardImport(input, extraKinds(extras))),
|
|
909
|
-
"",
|
|
910
|
-
`import type { InsertOf, Json, RowOf, UpdateOf } from ${JSON.stringify(input.importPath(path, input.config.output))};`
|
|
911
|
-
];
|
|
912
|
-
for (const [from, names] of imports) lines.push(`import { ${[...new Set(names)].toSorted().join(", ")} } from ${JSON.stringify(from)};`);
|
|
913
|
-
lines.push("", "const json: v.GenericSchema<Json> = v.lazy(() =>", " v.union([v.string(), v.number(), v.boolean(), v.null(), v.array(json), v.record(v.string(), v.optional(json))]),", ");");
|
|
914
|
-
const validators = [];
|
|
915
|
-
const validatorTypes = [];
|
|
916
|
-
for (const [key, table] of tableEntries(input)) {
|
|
917
|
-
lines.push("");
|
|
918
|
-
const variants = variantsFor(table);
|
|
919
|
-
const docs = tableDocs(input, table);
|
|
920
|
-
for (const variant of variants) {
|
|
921
|
-
const name = schemaName(key, variant);
|
|
922
|
-
const objectActions = docs ? [`v.title(${JSON.stringify(variantTitle(docs, variant))})`, ...docs.description === void 0 ? [] : [`v.description(${JSON.stringify(docs.description)})`]] : [];
|
|
923
|
-
lines.push(`export const ${name}: v.GenericSchema<${variant}Of<'${key}'>> = ${objectActions.length > 0 ? "v.pipe(" : ""}v.object({`);
|
|
924
|
-
for (const plan of fieldsFor(table, variant, input)) lines.push(field$1(key, plan, jsonImports, fieldDocs(docs, plan)));
|
|
925
|
-
lines.push(objectActions.length > 0 ? `}), ${objectActions.join(", ")});` : "});");
|
|
926
|
-
}
|
|
927
|
-
if (variants.includes("Insert")) {
|
|
928
|
-
const insert = schemaName(key, "Insert");
|
|
929
|
-
const update = schemaName(key, "Update");
|
|
930
|
-
validators.push(` ${propertyKey(key)}: { insert: ${insert}, update: ${update} },`);
|
|
931
|
-
validatorTypes.push(` readonly ${propertyKey(key)}: { readonly insert: typeof ${insert}; readonly update: typeof ${update} };`);
|
|
932
|
-
}
|
|
933
|
-
}
|
|
934
|
-
lines.push("", "/** Write validators; the generated schema installs them through `validation`. */", "export const validators: {", ...validatorTypes, "} = {", ...validators, "};", ...extraLines$1(input, extras), ...options.fieldMeta ? fieldMetaLines(input, extras) : [], "");
|
|
935
|
-
return [{
|
|
936
|
-
path,
|
|
937
|
-
contents: lines.join("\n"),
|
|
938
|
-
validators: true
|
|
939
|
-
}];
|
|
940
|
-
}
|
|
941
|
-
};
|
|
942
|
-
}
|
|
943
|
-
//#endregion
|
|
944
|
-
//#region src/generators/zod.ts
|
|
945
|
-
function scalar(kind) {
|
|
946
|
-
switch (kind.kind) {
|
|
947
|
-
case "uuid": return "z.guid()";
|
|
948
|
-
case "string": return "z.string()";
|
|
949
|
-
case "integer": return "z.int()";
|
|
950
|
-
case "number": return "z.number()";
|
|
951
|
-
case "boolean": return "z.boolean()";
|
|
952
|
-
case "datetime": return "z.iso.datetime({ offset: true })";
|
|
953
|
-
case "date": return "z.iso.date()";
|
|
954
|
-
case "instant": return "z.custom<Temporal.Instant>(isInstant)";
|
|
955
|
-
case "plainDate": return "z.custom<Temporal.PlainDate>(isPlainDate)";
|
|
956
|
-
case "plainDateTime": return "z.custom<Temporal.PlainDateTime>(isPlainDateTime)";
|
|
957
|
-
case "bigint": return "z.bigint()";
|
|
958
|
-
case "json": return "z.json()";
|
|
959
|
-
case "enum": return `z.enum([${kind.values.map((value) => JSON.stringify(value)).join(", ")}])`;
|
|
960
|
-
case "unknown": return "z.unknown()";
|
|
961
|
-
default: return kind;
|
|
962
|
-
}
|
|
963
|
-
}
|
|
964
|
-
function bounds(docs, flavor) {
|
|
965
|
-
if (flavor === "mini") {
|
|
966
|
-
const checks = [
|
|
967
|
-
docs.minimum === void 0 ? "" : `z.gte(${docs.minimum})`,
|
|
968
|
-
docs.exclusiveMinimum === void 0 ? "" : `z.gt(${docs.exclusiveMinimum})`,
|
|
969
|
-
docs.maximum === void 0 ? "" : `z.lte(${docs.maximum})`,
|
|
970
|
-
docs.exclusiveMaximum === void 0 ? "" : `z.lt(${docs.exclusiveMaximum})`,
|
|
971
|
-
docs.minLength === void 0 ? "" : `z.minLength(${docs.minLength})`,
|
|
972
|
-
docs.maxLength === void 0 ? "" : `z.maxLength(${docs.maxLength})`
|
|
973
|
-
].filter((check) => check !== "");
|
|
974
|
-
return checks.length === 0 ? "" : `.check(${checks.join(", ")})`;
|
|
975
|
-
}
|
|
976
|
-
return [
|
|
977
|
-
docs.minimum === void 0 ? "" : `.min(${docs.minimum})`,
|
|
978
|
-
docs.exclusiveMinimum === void 0 ? "" : `.gt(${docs.exclusiveMinimum})`,
|
|
979
|
-
docs.maximum === void 0 ? "" : `.max(${docs.maximum})`,
|
|
980
|
-
docs.exclusiveMaximum === void 0 ? "" : `.lt(${docs.exclusiveMaximum})`,
|
|
981
|
-
docs.minLength === void 0 ? "" : `.min(${docs.minLength})`,
|
|
982
|
-
docs.maxLength === void 0 ? "" : `.max(${docs.maxLength})`
|
|
983
|
-
].join("");
|
|
984
|
-
}
|
|
985
|
-
/**
|
|
986
|
-
* `.meta({ ... })` (`.check(z.meta({ ... }))` in mini) for the entries that are
|
|
987
|
-
* set, or nothing.
|
|
988
|
-
*/
|
|
989
|
-
function meta(entries, flavor) {
|
|
990
|
-
const set = Object.entries(entries).filter(([, value]) => value !== void 0);
|
|
991
|
-
if (set.length === 0) return "";
|
|
992
|
-
const object = `{ ${set.map(([key, value]) => `${key}: ${JSON.stringify(value)}`).join(", ")} }`;
|
|
993
|
-
return flavor === "mini" ? `.check(z.meta(${object}))` : `.meta(${object})`;
|
|
994
|
-
}
|
|
995
|
-
function field(table, plan, jsonImports, docs, flavor) {
|
|
996
|
-
const expr = jsonImports.get(`${table}.${plan.column.db}`) ?? (plan.customJson ? `z.custom<NonNullable<RowOf<'${table}'>['${plan.name}']>>((value) => value !== undefined)` : plan.column.storage === void 0 ? `${scalar(plan.scalar)}${bounds(docs, flavor)}` : `(z.string() as unknown as ${typeName(flavor)}<${rowType(table, plan)}>)`);
|
|
997
|
-
return ` ${propertyKey(plan.name)}: ${wrap(expr, {
|
|
998
|
-
array: plan.column.array === true,
|
|
999
|
-
nullable: plan.nullable,
|
|
1000
|
-
optional: plan.optional,
|
|
1001
|
-
...docs
|
|
1002
|
-
}, flavor)},`;
|
|
1003
|
-
}
|
|
1004
|
-
/** `expr` as an array, nullable, documented and optional, as `spec` says. */
|
|
1005
|
-
function wrap(expr, spec, flavor) {
|
|
1006
|
-
const mini = flavor === "mini";
|
|
1007
|
-
let out = spec.array ? `z.array(${expr})` : expr;
|
|
1008
|
-
if (spec.nullable) out = mini ? `z.nullable(${out})` : `${out}.nullable()`;
|
|
1009
|
-
out += meta({
|
|
1010
|
-
description: spec.description,
|
|
1011
|
-
examples: spec.examples
|
|
1012
|
-
}, flavor);
|
|
1013
|
-
if (spec.optional) out = mini ? `z.exactOptional(${out})` : `${out}.exactOptional()`;
|
|
1014
|
-
return out;
|
|
1015
|
-
}
|
|
1016
|
-
function specExpr(spec, flavor) {
|
|
1017
|
-
return wrap(spec.kind === "custom" ? "z.unknown()" : `${scalar(spec)}${bounds(spec, flavor)}`, spec, flavor);
|
|
1018
|
-
}
|
|
1019
|
-
function resultExpr(result, rows, flavor) {
|
|
1020
|
-
const mini = flavor === "mini";
|
|
1021
|
-
if (result.of.kind === "row") {
|
|
1022
|
-
if (!rows.has(result.of.table)) return;
|
|
1023
|
-
const row = schemaName(result.of.table, "Row");
|
|
1024
|
-
if (result.set) return `z.array(${row})`;
|
|
1025
|
-
return mini ? `z.nullable(${row})` : `${row}.nullable()`;
|
|
1026
|
-
}
|
|
1027
|
-
const item = scalar(result.of.scalar);
|
|
1028
|
-
const nullable = mini ? `z.nullable(${item})` : `${item}.nullable()`;
|
|
1029
|
-
if (result.set) return `z.array(${result.nullable ? nullable : item})`;
|
|
1030
|
-
return result.nullable ? nullable : item;
|
|
1031
|
-
}
|
|
1032
|
-
function extraLines(input, extras, flavor) {
|
|
1033
|
-
const lines = [];
|
|
1034
|
-
for (const schema of extras.inputs) {
|
|
1035
|
-
lines.push("", `export const ${schema.name}: ${typeName(flavor)}<${objectType(schema)}> = z.object({`);
|
|
1036
|
-
for (const [name, spec] of Object.entries(schema.fields)) lines.push(` ${propertyKey(name)}: ${specExpr(spec, flavor)},`);
|
|
1037
|
-
lines.push(`})${meta({ title: schema.title }, flavor)};`);
|
|
1038
|
-
}
|
|
1039
|
-
const rows = new Set(Object.keys(input.meta.tables));
|
|
1040
|
-
for (const result of extras.results) {
|
|
1041
|
-
const expr = resultExpr(result, rows, flavor);
|
|
1042
|
-
if (expr !== void 0) lines.push("", `export const ${result.name}: ${typeName(flavor)}<${resultType(result)}> = ${expr};`);
|
|
1043
|
-
}
|
|
1044
|
-
return lines;
|
|
1045
|
-
}
|
|
1046
|
-
function typeName(flavor) {
|
|
1047
|
-
return flavor === "mini" ? "z.ZodMiniType" : "z.ZodType";
|
|
1048
|
-
}
|
|
1049
|
-
/**
|
|
1050
|
-
* Zod 4 schemas for every table's Row, Insert and Update shape, for `zod` or,
|
|
1051
|
-
* with `flavor: 'mini'`, `zod/mini`.
|
|
1052
|
-
*/
|
|
1053
|
-
function zod(options = {}) {
|
|
1054
|
-
const flavor = options.flavor ?? "classic";
|
|
1055
|
-
return {
|
|
1056
|
-
apiVersion: 1,
|
|
1057
|
-
name: "zod",
|
|
1058
|
-
generate(input) {
|
|
1059
|
-
const path = options.output ?? siblingPath(input.config.output, "zod.ts");
|
|
1060
|
-
const imports = /* @__PURE__ */ new Map();
|
|
1061
|
-
const jsonImports = /* @__PURE__ */ new Map();
|
|
1062
|
-
const tableNames = new Map(Object.values(input.meta.tables).map((t) => [t.name, t.key]));
|
|
1063
|
-
for (const [key, spec] of Object.entries(options.json ?? {})) {
|
|
1064
|
-
const [tableName, column] = key.split(".");
|
|
1065
|
-
const { from, name } = parseImport(spec);
|
|
1066
|
-
const specifier = from.startsWith(".") ? input.importPath(path, from) : from;
|
|
1067
|
-
imports.set(specifier, [...imports.get(specifier) ?? [], name]);
|
|
1068
|
-
jsonImports.set(`${tableNames.get(tableName ?? "") ?? tableName}.${column}`, name);
|
|
1069
|
-
}
|
|
1070
|
-
const extras = extraSchemas(input);
|
|
1071
|
-
const kinds = extraKinds(extras);
|
|
1072
|
-
const lines = [
|
|
1073
|
-
HEADER,
|
|
1074
|
-
flavor === "mini" ? "import { z } from \"zod/mini\";" : "import { z } from \"zod\";",
|
|
1075
|
-
...optionalLine(temporalGuardImport(input, kinds)),
|
|
1076
|
-
"",
|
|
1077
|
-
`import type { InsertOf, ${kinds.includes("json") ? "Json, " : ""}RowOf, UpdateOf } from ${JSON.stringify(input.importPath(path, input.config.output))};`
|
|
1078
|
-
];
|
|
1079
|
-
for (const [from, names] of imports) lines.push(`import { ${[...new Set(names)].toSorted().join(", ")} } from ${JSON.stringify(from)};`);
|
|
1080
|
-
const validators = [];
|
|
1081
|
-
for (const [key, table] of tableEntries(input)) {
|
|
1082
|
-
lines.push("");
|
|
1083
|
-
const variants = variantsFor(table);
|
|
1084
|
-
const docs = tableDocs(input, table);
|
|
1085
|
-
for (const variant of variants) {
|
|
1086
|
-
const name = schemaName(key, variant);
|
|
1087
|
-
lines.push(`export const ${name}: ${typeName(flavor)}<${variant}Of<'${key}'>> = z.object({`);
|
|
1088
|
-
for (const plan of fieldsFor(table, variant, input)) lines.push(field(key, plan, jsonImports, fieldDocs(docs, plan), flavor));
|
|
1089
|
-
lines.push(`})${docs ? meta({
|
|
1090
|
-
title: variantTitle(docs, variant),
|
|
1091
|
-
description: docs.description
|
|
1092
|
-
}, flavor) : ""};`);
|
|
1093
|
-
}
|
|
1094
|
-
if (variants.includes("Insert")) validators.push(` ${propertyKey(key)}: { insert: ${schemaName(key, "Insert")}, update: ${schemaName(key, "Update")} },`);
|
|
1095
|
-
}
|
|
1096
|
-
lines.push("", "/** Write validators; the generated schema installs them through `validation`. */", "export const validators: {");
|
|
1097
|
-
for (const [key, table] of tableEntries(input)) {
|
|
1098
|
-
if (!variantsFor(table).includes("Insert")) continue;
|
|
1099
|
-
lines.push(` readonly ${propertyKey(key)}: { readonly insert: typeof ${schemaName(key, "Insert")}; readonly update: typeof ${schemaName(key, "Update")} };`);
|
|
1100
|
-
}
|
|
1101
|
-
lines.push("} = {", ...validators, "};", ...extraLines(input, extras, flavor), ...options.fieldMeta ? fieldMetaLines(input, extras) : [], "");
|
|
1102
|
-
return [{
|
|
1103
|
-
path,
|
|
1104
|
-
contents: lines.join("\n"),
|
|
1105
|
-
validators: true
|
|
1106
|
-
}];
|
|
1107
|
-
}
|
|
1108
|
-
};
|
|
1109
|
-
}
|
|
1110
|
-
//#endregion
|
|
1111
|
-
export { factories as a, resolveConfig as c, blockSubjectTypes as d, providerApiProblem as f, nuqs as i, blockEntities as l, valibot as n, CONFIG_SCHEMA_URL as o, standardSchema as r, defineConfig as s, zod as t, blockEntityRenames as u };
|