better-supabase 0.30.0 → 0.32.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/access-sql-Dao1C0fz.js +383 -0
- package/dist/actor-B5b0i1Fs.js +149 -0
- package/dist/actor-DseNR02I.d.ts +104 -0
- package/dist/adapter-CPPN80mx.js +2231 -0
- package/dist/agents-BEiBtYmh.d.ts +115 -0
- package/dist/ai-cache-D9D36eh4.js +86 -0
- package/dist/ai-cache-FMYzw7lW.d.ts +80 -0
- package/dist/ai-chat-B_P--Ie2.d.ts +532 -0
- package/dist/ai-files-DCMVGSds.js +337 -0
- package/dist/ai-message-cnroprVB.js +13 -0
- package/dist/ai-schedules-D_q1iclL.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-CwzVbbw4.d.ts +483 -0
- package/dist/api-keys-u2sXB-CZ.d.ts +211 -0
- package/dist/api-wwix_K5c.js +691 -0
- package/dist/app-tables-DomvYx5b.d.ts +26 -0
- package/dist/approvals-Da4uAANx.js +166 -0
- package/dist/approvals-idpuhILk.d.ts +127 -0
- package/dist/assistant-CMKsaeJd.d.ts +209 -0
- package/dist/astro/index.d.ts +8 -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-CVo86UKh.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-CYu_UKX4.d.ts +3723 -0
- package/dist/authorization-hooks-CldgvzBZ.d.ts +219 -0
- package/dist/authorizer-AswD5q6g.d.ts +116 -0
- package/dist/authorizer-D6po_XZA.js +171 -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-8LYVJE5W.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-BsLgZL2l.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-JxiD1iw4.d.ts +56 -0
- package/dist/block-hooks-CJP5kGEa.d.ts +115 -0
- package/dist/block-hooks-CadxQ9-_.js +129 -0
- package/dist/block-method-DIbWG4Mj.js +20 -0
- package/dist/block-method-QSaPsL2P.d.ts +12 -0
- package/dist/block-subjects-SyJwfgrX.d.ts +4 -0
- package/dist/block-subjects-cRlVtKDO.js +54 -0
- package/dist/block-tenant-Bun03JuO.js +13 -0
- package/dist/block-transport-Bbf1ZZre.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 +8 -16
- 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 +18 -24
- package/dist/blocks/calendar/index.js +39 -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 +19 -27
- 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 -11
- 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 +36 -84
- 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 +43 -40
- package/dist/blocks/organizations/index.js +21 -20
- 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 +74 -15
- package/dist/blocks/permissions/index.js +119 -18
- 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 +19 -17
- package/dist/blocks/push/index.js +33 -20
- 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 +15 -15
- package/dist/blocks/teams/index.js +17 -19
- 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 +21 -27
- package/dist/blocks/workflows/index.d.ts +8 -14
- package/dist/blocks/workflows/index.js +14 -18
- package/dist/bookings-DG443336.d.ts +285 -0
- package/dist/bucket-Clq5xINQ.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/claims-DRmafYVK.js +90 -0
- package/dist/claims-DouHL7ZL.js +62 -0
- package/dist/cli/_format-Ba0DoWjl.js +99 -0
- package/dist/cli/add-ChoHyBhz.js +1222 -0
- package/dist/cli/add-DlYL-1mF.js +1 -0
- package/dist/cli/add-fzRPyIED.js +98 -0
- package/dist/cli/agent-59XWXsRi.js +184 -0
- package/dist/cli/app-table-files-C0OtdUVu.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/backfill-Dq2XMXf9.js +292 -0
- package/dist/cli/bin.js +5 -5
- package/dist/cli/blocks-CCzp0eAH.js +155 -0
- package/dist/cli/blocks-DVhJOzFj.js +1 -0
- package/dist/cli/cache-CoC-1i1O.js +643 -0
- package/dist/cli/codemod-block-renames-Dt3X1Wvg.js +238 -0
- package/dist/cli/codemod-pyf6HmS9.js +2883 -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-D-Upz3jV.js +46 -0
- package/dist/cli/config-D0m2rQqk.js +1 -0
- package/dist/cli/config-Dyl3iX3u.js +2029 -0
- package/dist/cli/config-edit-C6sQ1MqT.js +619 -0
- package/dist/cli/config-group-D4JWh4kG.js +388 -0
- package/dist/cli/content-mapper-ChSVT9Tq.js +181 -0
- package/dist/cli/db-B8zfxjl2.js +77 -0
- package/dist/cli/db-dFzhcozO.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-BKZsztFV.js +4647 -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-BN_eh6rE.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-CaDDt8F6.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-KU41LMGE.js +339 -0
- package/dist/cli/mcp-C_m-TpLJ.js +240 -0
- package/dist/cli/metadata-Bq4ra7zo.js +149 -0
- package/dist/cli/migrate-DHG2Qz_K.js +45 -0
- package/dist/cli/migration-safety-STVbiKhz.js +925 -0
- package/dist/cli/migrations-O1QZoMiH.js +116 -0
- package/dist/cli/module-migration-DB9ntWM-.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-CN3QPF2K.js +375 -0
- package/dist/cli/powersync-DfeGl5N1.js +1 -0
- package/dist/cli/preset-BQnjDCSR.js +100 -0
- package/dist/cli/print-DG7TRCi8.js +66 -0
- package/dist/cli/prompts-D9b6uf21.js +1133 -0
- package/dist/cli/providers-DpfoF3VC.js +298 -0
- package/dist/cli/prune-workflows-DcNJUS1m.js +153 -0
- package/dist/cli/redact--zOGdWzo.js +37 -0
- package/dist/cli/remove-BpfYqP45.js +237 -0
- package/dist/cli/render-Q7jnLn_C.js +2213 -0
- package/dist/cli/rolldown-runtime-DegdyBIC.js +25 -0
- package/dist/cli/run-9NfabanB.js +703 -0
- package/dist/cli/run-D6K-qQIX.js +1450 -0
- package/dist/cli/run-dY9uOC3W.js +62 -0
- package/dist/cli/seed-B4H0Lco9.js +187 -0
- package/dist/cli/seed-BIB6-WPa.js +1 -0
- package/dist/cli/shared-PrvYREVy.js +150 -0
- package/dist/cli/shell-C1U618XA.js +9 -0
- package/dist/cli/skills-jZThjL3B.js +120 -0
- package/dist/cli/snapshot-UfJsqfys.js +728 -0
- package/dist/cli/source-F3YTVvFo.js +317 -0
- package/dist/cli/source-args-DJMrW_jW.js +58 -0
- package/dist/cli/spec-DsLQuJKp.js +7449 -0
- package/dist/cli/spec-HQOBVbEO.js +1 -0
- package/dist/cli/sql-layout-CZ66pY8j.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-B12wbtFd.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-AgUXFDo6.js +270 -0
- package/dist/cli/upgrade-C20z49De.js +40 -0
- package/dist/cli/validate-C_WTnX1U.js +7426 -0
- package/dist/cli/version-DEUWW8cv.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-BLor58Je.js +290 -0
- package/dist/clone-H_gCsL29.js +32 -0
- package/dist/cloud-event-CLvsaPqH.js +62 -0
- package/dist/cloud-event-bcaMqEbN.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-CWishtY2.d.ts +12 -0
- package/dist/compose-BRBlPSEY.js +52 -0
- package/dist/composite-BZMkWNOQ.js +125 -0
- package/dist/composite-ClLWZIwX.d.ts +79 -0
- package/dist/config/index.d.ts +6 -6
- package/dist/config/index.js +7 -7
- package/dist/config-BhExAhNK.js +1102 -0
- package/dist/config-MDRA2sre.js +1672 -0
- package/dist/connectors-BImAu75R.d.ts +145 -0
- package/dist/context-DSevnLrT.js +40 -0
- package/dist/context-DcxfrCml.d.ts +4267 -0
- package/dist/controller-BJmh7gFm.js +78 -0
- package/dist/controller-D_UJBaEU.d.ts +50 -0
- package/dist/controller-y1kSMuCU.js +72 -0
- package/dist/conversion-7U1WeLxK.d.ts +84 -0
- package/dist/conversion-Bj9j3KnG.js +76 -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-B-D6bdyx.d.ts +269 -0
- package/dist/data-engine-BbqQwso_.js +174 -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-3RbqoF1S.d.ts +1242 -0
- package/dist/define-B6D55cO0.js +2073 -0
- package/dist/define-block-22Jv4U_-.js +63 -0
- package/dist/define-block-B_i9VPcc.d.ts +1669 -0
- package/dist/delegation-BRHHXERz.js +152 -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-6ov2gWh3.d.ts +150 -0
- package/dist/edge/index.d.ts +17 -23
- package/dist/edge/index.js +18 -22
- 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-K0lH--nt.d.ts +76 -0
- package/dist/ended-CCoE7XXY.d.ts +22 -0
- package/dist/entitlements-XwpuBbKN.d.ts +52 -0
- package/dist/entitlements-sLoj3M6Y.js +44 -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-DAtaFJue.js +89 -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-Cf-QRGij.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-CfDdOwqg.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-CAhykadW.d.ts +168 -0
- package/dist/executor-CbDX34I9.d.ts +99 -0
- package/dist/executor-Dc4Pl44u.js +207 -0
- package/dist/executor-ynEwaUZy.d.ts +35 -0
- package/dist/expo/index.d.ts +5 -9
- package/dist/expo/index.js +10 -11
- package/dist/extension-DQ9-oOVC.js +58 -0
- package/dist/extension-LgaDPMJs.js +120 -0
- package/dist/extension-WdHd5uqI.js +102 -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-tQr-anYL.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-AKKMirg_.d.ts +76 -0
- package/dist/fields-BBcdKD-S.js +107 -0
- package/dist/filter-evaluate-Bhq99aEN.d.ts +35 -0
- package/dist/filter-evaluate-D_LLfdtE.js +216 -0
- package/dist/filter-query-B7A4l2xn.d.ts +131 -0
- package/dist/filter-query-Ds7Z6lgZ.js +565 -0
- package/dist/flags-B5B4mkZV.d.ts +315 -0
- package/dist/flags-D0npSE-5.js +361 -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-B1h-uquj.js +57 -0
- package/dist/framework-CyDn_SXR.d.ts +45 -0
- package/dist/function-contract-Bf6llTkE.js +7 -0
- package/dist/function-contract-DgDBYbXu.d.ts +25 -0
- package/dist/gateway-Cg_MgGen.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 +14 -19
- package/dist/hono/index.js +14 -16
- 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-BmSA9K01.d.ts +326 -0
- package/dist/index-8w4OB5En.d.ts +102 -0
- package/dist/index-B2871MHr.d.ts +234 -0
- package/dist/index-B5_J-MaK.d.ts +152 -0
- package/dist/index-BWR29Vvw.d.ts +76 -0
- package/dist/index-CRrBZtKm.d.ts +326 -0
- package/dist/index-CTpEQvIv.d.ts +291 -0
- package/dist/index-D2BGCjIz.d.ts +570 -0
- package/dist/index-D66_dYVi.d.ts +667 -0
- package/dist/index-Dj4VKpYZ.d.ts +49 -0
- package/dist/index-DzBFdI9I.d.ts +145 -0
- package/dist/index-lazpPVr0.d.ts +402 -0
- package/dist/index-xCpjvDVm.d.ts +637 -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-CJKo0soh.d.ts +92 -0
- package/dist/kit-CVZDd1X9.js +132 -0
- package/dist/knowledge-BUwbpS8I.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-CZ-K5aHX.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 +8 -18
- package/dist/mcp/index.js +24 -29
- 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-DMhtGxVv.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 +149 -92
- package/dist/next/index.js +167 -114
- 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-D51ONRvR.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 -22
- package/dist/otel/index.d.ts +4 -6
- package/dist/otel/index.js +8 -10
- package/dist/outbox-C44Aa94K.d.ts +197 -0
- package/dist/payments-B4JchZuJ.js +15 -0
- package/dist/payments-BBGSGRQ7.d.ts +112 -0
- package/dist/permissions-B9aZZ9LR.js +43 -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-Bji4lnQM.d.ts +121 -0
- package/dist/pool-errors-JrZie6u3.js +26 -0
- package/dist/ports-C-hdygkZ.js +150 -0
- package/dist/ports-zFqRNXVJ.d.ts +87 -0
- package/dist/postgres/index.d.ts +5 -11
- package/dist/postgres/index.js +7 -9
- package/dist/postgrest-2WjRrtmX.d.ts +51 -0
- package/dist/postgrest-executor-lf8Mt4J0.js +1064 -0
- package/dist/powersync/index.d.ts +203 -21
- package/dist/powersync/index.js +369 -22
- 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-oNHntJ6T.js +1749 -0
- package/dist/provider-B6qpleR9.js +56 -0
- package/dist/provider-CH8McX3b.d.ts +142 -0
- package/dist/providers-C9sBIBYE.js +62 -0
- package/dist/push-token-CO28k46S.js +15 -0
- package/dist/push-token-a3Ev1U3L.d.ts +22 -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-C40oomj7.js +1006 -0
- package/dist/react-CqOVutZj.js +80 -0
- package/dist/react-router/index.d.ts +8 -12
- package/dist/react-router/index.js +9 -11
- 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-DCIui2Ol.d.ts +80 -0
- package/dist/record-type-oQxekQTX.js +219 -0
- package/dist/recordings-Dlpq8jUG.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-BK9epzeC.d.ts +52 -0
- package/dist/refusal-DEuFVi4s.d.ts +30 -0
- package/dist/refusal-DhX7Xpfp.js +63 -0
- package/dist/relay-CllqA-lV.js +248 -0
- package/dist/resolve-DVOtYTAc.d.ts +287 -0
- package/dist/resolve-FW8oeXvh.js +927 -0
- package/dist/resolved-names-DYYyh35i.js +130 -0
- package/dist/resource-BfsTJnxZ.d.ts +119 -0
- package/dist/resource-Cn6Bn-_o.js +517 -0
- package/dist/resource-DQ4kIBpa.js +104 -0
- package/dist/resource-execute-DQRS7PFt.d.ts +13 -0
- package/dist/resource-schemas-Bq0g2RCQ.js +81 -0
- package/dist/resource-types-DF6KDAZM.d.ts +155 -0
- package/dist/resources-B0Vy7_wv.js +63 -0
- package/dist/resources-CeY53FiJ.d.ts +5 -0
- package/dist/respond-C2qvP1wv.js +106 -0
- package/dist/respond-CkwkvFdZ.d.ts +108 -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-Bde9cV5F.d.ts +36 -0
- package/dist/sales-lines-axwWhnLk.js +44 -0
- package/dist/sales-shared-CY3s_wBx.js +21 -0
- package/dist/sandboxes-DDWuD9fh.d.ts +85 -0
- package/dist/schemas-CpoEiAeT.js +213 -0
- package/dist/scope-dD_OAgRU.js +89 -0
- package/dist/scores-Bql-ABl0.d.ts +172 -0
- package/dist/scores-Bvk_JgXL.js +176 -0
- package/dist/search-DtbkD0h0.js +8 -0
- package/dist/server/index.d.ts +35 -69
- package/dist/server/index.js +51 -59
- package/dist/server-types-C3p3jUqr.d.ts +583 -0
- package/dist/session-BOch2y2z.d.ts +96 -0
- package/dist/session-status-DRBRnZHx.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-BmigClRh.js +730 -0
- package/dist/sign-in-C9pZE1kM.d.ts +53 -0
- package/dist/sign-in-CXOg2Dwb.js +399 -0
- package/dist/sign-in-Dxyi4aKu.d.ts +83 -0
- package/dist/signatures-CBn7w4VR.js +144 -0
- package/dist/signatures-jPr9JXyw.d.ts +41 -0
- package/dist/signers-Cz5ZhTHH.d.ts +380 -0
- package/dist/signing-keys-BC5_hJN5.js +163 -0
- package/dist/signing-keys-DS-rIVzz.d.ts +117 -0
- package/dist/simplify-BzThKn5b.js +82 -0
- package/dist/solid/index.d.ts +12 -22
- package/dist/solid/index.js +10 -16
- package/dist/solid-start/index.d.ts +7 -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 +4 -4
- package/dist/sql/index.js +4 -4
- package/dist/sql-BPV51R3A.js +140626 -0
- package/dist/sql-C1K5JALb.js +420 -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-BEvNf1oW.d.ts +159 -0
- package/dist/sso-CRnaFJh0.js +216 -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-DWkVSbFr.d.ts +19 -0
- package/dist/subject-type-BarjdHZV.js +7 -0
- package/dist/subjects-BGwLJ3IB.d.ts +148 -0
- package/dist/subjects-vci6Wufh.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-rZbdU35s.d.ts +351 -0
- package/dist/support-view-CvDEgyGY.js +17 -0
- package/dist/support-view-WY4Y-A40.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 +10 -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-BVLELhOf.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 +8 -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-BR7fvPj7.js +26 -0
- package/dist/tenant-RKvGBB-U.d.ts +15 -0
- package/dist/tenant-source-46lMuMEn.js +7 -0
- package/dist/testing/index.d.ts +87 -124
- package/dist/testing/index.js +158 -128
- package/dist/timeline-Bs-FGMIJ.js +49 -0
- package/dist/timeline-Ck8OFuAN.d.ts +147 -0
- package/dist/timing-B6yHayKA.js +94 -0
- package/dist/topic-BBBCVLyS.js +640 -0
- package/dist/topic-Dr8VYE4D.d.ts +411 -0
- package/dist/transport-CS4cVH4S.js +30 -0
- package/dist/ttl-cache-C5S0L2wx.js +31 -0
- package/dist/types-BiedVwz_.d.ts +192 -0
- package/dist/types-CCmW3MqI.d.ts +449 -0
- package/dist/types-CL-z0A4K.d.ts +660 -0
- package/dist/types-CvlJNzX4.d.ts +215 -0
- package/dist/types-D9FY9qSJ.d.ts +247 -0
- package/dist/types-DWZubmwk.d.ts +648 -0
- package/dist/types-DnrJ_crV.js +28 -0
- package/dist/types-Pv5WPfIC.d.ts +175 -0
- package/dist/types-WZUVlTXs.d.ts +907 -0
- package/dist/undo-BdoEJ6Ot.d.ts +44 -0
- package/dist/undo-Dki6Ujak.js +43 -0
- package/dist/upload-claim-Bo2mpBz4.js +32 -0
- package/dist/usage-D27Uw426.d.ts +230 -0
- package/dist/user-change-Ngy8z1fZ.js +133 -0
- package/dist/variants-BaMleC56.js +51 -0
- package/dist/vault-Dx0LaNMX.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-DY_j4GPZ.js +129 -0
- package/dist/verify-DnL0Fgu0.d.ts +144 -0
- package/dist/view-DmEZA1fL.d.ts +95 -0
- package/dist/view-YnesSUEa.js +244 -0
- package/dist/vue/index.d.ts +12 -22
- package/dist/vue/index.js +10 -16
- package/dist/watch-topic-BB7T05sc.d.ts +29 -0
- package/dist/watch-topic-C2KxpeaB.js +56 -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-D5zRSwxh.js +302 -0
- package/dist/workflow-sdk-DMpVSMB7.d.ts +171 -0
- package/dist/workflows-DKTw2PZo.d.ts +256 -0
- package/dist/yjs/index.d.ts +3 -5
- package/dist/yjs/index.js +6 -7
- package/package.json +45 -31
- package/schemas/config-v1.json +66 -4
- 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 +591 -325
- 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-api/references/powersync.md +16 -0
- package/skills/better-supabase-auth/SKILL.md +22 -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-D4aNBxhm.js +0 -2301
- 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-yyVncXEt.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-CDU9tYA_.d.ts +0 -3860
- 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-p7asfI6H.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-B8wG3xeh.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-BdhGOwkB.js +0 -1
- package/dist/cli/add-D4w-Axib.js +0 -1231
- package/dist/cli/add-Dggyehsy.js +0 -99
- package/dist/cli/agent-CbuPvI2x.js +0 -185
- package/dist/cli/app-table-files-CiGuwLkO.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-DjVjXW_P.js +0 -293
- package/dist/cli/blocks-Bbmb6W_F.js +0 -1
- package/dist/cli/blocks-jRL9K1R8.js +0 -156
- package/dist/cli/cache-BuoIFlUJ.js +0 -607
- package/dist/cli/codemod-DRavXBCb.js +0 -2435
- package/dist/cli/codemod-block-renames-BuSaTE_G.js +0 -239
- package/dist/cli/command-DIPmo0wh.js +0 -997
- package/dist/cli/compare-BmIWVEui.js +0 -9
- package/dist/cli/completion-DxPxMtyP.js +0 -211
- package/dist/cli/completion-DyLMSjOD.js +0 -1
- package/dist/cli/completion-FUgqm2-N.js +0 -30
- package/dist/cli/config-BfapErxs.js +0 -47
- 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/content-mapper-BCtyfKXl.js +0 -182
- package/dist/cli/db-CQCLx7cx.js +0 -78
- package/dist/cli/db-CWvH1_46.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-Di2ZekfN.js +0 -4659
- package/dist/cli/env-B2CbnbzD.js +0 -143
- package/dist/cli/env-BK0xKMeU.js +0 -1113
- package/dist/cli/env-Bat6ogep.js +0 -1
- package/dist/cli/env-CynGCICL.js +0 -1
- 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-STKC9vkK.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-DW6_nIwj.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-V-HcO-21.js +0 -106
- package/dist/cli/legacy-prefix-R7UChFFl.js +0 -154
- package/dist/cli/live-0G4Plw3K.js +0 -341
- package/dist/cli/mcp-flKS8iU5.js +0 -241
- package/dist/cli/metadata-VARUbXEe.js +0 -150
- package/dist/cli/migrate-Bkq07XcT.js +0 -46
- package/dist/cli/migration-safety-BfVeza5j.js +0 -928
- package/dist/cli/migrations-BCq7Zs2E.js +0 -117
- package/dist/cli/module-migration-lbeUrsYv.js +0 -119
- package/dist/cli/moved-DNOtp9LA.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-BPf3kGnc.js +0 -182
- package/dist/cli/powersync-B15CfH5Y.js +0 -284
- package/dist/cli/powersync-DnBsDchT.js +0 -1
- package/dist/cli/preset-BwmIfFnh.js +0 -101
- package/dist/cli/print-DjxpBRnv.js +0 -68
- package/dist/cli/prompts-jqnr94b9.js +0 -1140
- package/dist/cli/providers-dyxcHQY3.js +0 -301
- package/dist/cli/redact-KGAk2Ul9.js +0 -38
- package/dist/cli/remove-BLq5gbal.js +0 -239
- package/dist/cli/render-CizUf3RW.js +0 -2225
- package/dist/cli/rolldown-runtime-kJ_i4yPo.js +0 -26
- package/dist/cli/run-ChEjR7yw.js +0 -63
- package/dist/cli/run-ChOY6s4o.js +0 -1459
- package/dist/cli/run-MwM__teL.js +0 -705
- package/dist/cli/seed-BOun22-k.js +0 -1
- package/dist/cli/seed-CDnL4Tnc.js +0 -188
- package/dist/cli/shared-DV5wIv-7.js +0 -151
- package/dist/cli/shell-Btv_4Yhe.js +0 -10
- package/dist/cli/skills-DM3oeIxY.js +0 -121
- package/dist/cli/snapshot-B5LXkVMC.js +0 -729
- package/dist/cli/source-BoLNG_2A.js +0 -320
- package/dist/cli/source-args-v8ljFDfc.js +0 -59
- package/dist/cli/spec-D6QeE2Zx.js +0 -1
- package/dist/cli/spec-Dz-PGCaM.js +0 -7530
- package/dist/cli/sql-layout-zo02f3Dm.js +0 -261
- package/dist/cli/stack-ClESAZYf.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-m-oZ_SyI.js +0 -322
- package/dist/cli/table-dyKddjwo.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-C9sgVZ5z.js +0 -272
- package/dist/cli/upgrade-WwEJaX3i.js +0 -41
- package/dist/cli/validate-B3lF3-jB.js +0 -7522
- package/dist/cli/version-D2BQuqta.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-BJ9s-IJJ.d.ts +0 -83
- package/dist/composite-CBRbvn5j.js +0 -130
- package/dist/config-bqKaPjst.js +0 -1679
- package/dist/config-r7njjNgh.js +0 -1111
- package/dist/connectors-uC5baoFV.d.ts +0 -147
- package/dist/context-DBicfUNz.js +0 -41
- package/dist/context-nbYYjv7U.d.ts +0 -4344
- package/dist/controller-BEliOBOv.js +0 -79
- package/dist/controller-TRocodqG.d.ts +0 -52
- package/dist/controller-qG-B1eDn.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-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-B1i1-wfe.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-tJvehEFc.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-DVYTtQXA.d.ts +0 -47
- package/dist/framework-DYEUraqt.js +0 -58
- 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-8US7qlvW.d.ts +0 -158
- package/dist/index-B4wttiLh.d.ts +0 -407
- package/dist/index-BKrxynq9.d.ts +0 -240
- package/dist/index-BM6NmKSc.d.ts +0 -588
- package/dist/index-BkzXwuIN.d.ts +0 -338
- package/dist/index-CWAQRWY8.d.ts +0 -729
- package/dist/index-Cxsnd-OL.d.ts +0 -305
- package/dist/index-DbyDZZlc.d.ts +0 -53
- package/dist/index-NRMMhhEi.d.ts +0 -104
- package/dist/index-X2fkPUwb.d.ts +0 -51
- package/dist/index-pZn6S_iq.d.ts +0 -149
- package/dist/index-zsgNmE8m.d.ts +0 -665
- package/dist/instance-property-hRh88y_s.js +0 -7
- package/dist/instances-C7qUTjhJ.js +0 -16603
- 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-CB9atU2e.d.ts +0 -6
- package/dist/operations-DVHRHvv6.js +0 -29
- 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-BKBy5wM_.js +0 -16
- 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-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-COo7_3MX.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-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-DvpNseap.js +0 -152
- package/dist/ports-hpbyMySO.d.ts +0 -89
- package/dist/postgrest-AJc8hnJU.d.ts +0 -53
- package/dist/postgrest-executor-B_Uezhrm.js +0 -1068
- package/dist/preset-DCdEnJj9.js +0 -1042
- package/dist/problem-Bf0cJ7tk.js +0 -162
- package/dist/problem-DNwN8iGz.d.ts +0 -79
- package/dist/project-B32wb5J6.js +0 -1760
- package/dist/provider-B6g7rBZX.js +0 -57
- package/dist/provider-CWjzAIX9.d.ts +0 -112
- package/dist/push-token-D6REHMMw.js +0 -16
- package/dist/push-token-DQ1ycFPU.d.ts +0 -24
- 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-CcrQQl0_.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-DRbnlj5q.js +0 -221
- package/dist/recordings-DeZYx-Kv.d.ts +0 -119
- package/dist/refresh-D02Pbf5B.d.ts +0 -54
- package/dist/refusal-B0VmlAxF.d.ts +0 -32
- package/dist/refusal-DDlInPff.js +0 -64
- package/dist/relay-CIKcAVjf.js +0 -248
- package/dist/replicas-Dyoh3CEg.js +0 -94
- package/dist/resolve-B0mW2m7f.js +0 -932
- package/dist/resolve-CtX6T0c0.d.ts +0 -288
- package/dist/resolved-names-iLBOUaib.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-CoKxZibd.js +0 -45
- 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-Cyj3ZlFX.js +0 -703
- 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-CyeDg3Yh.js +0 -138146
- 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-C9YE_kqK.d.ts +0 -17
- package/dist/tenant-source-bqWpSr86.js +0 -8
- package/dist/timeline--VU3A1e4.js +0 -50
- package/dist/timeline-DvXtXq5q.d.ts +0 -151
- package/dist/timing-dypS0nxW.js +0 -95
- package/dist/topic-DnsNG4Kj.js +0 -643
- package/dist/topic-breZqx_4.d.ts +0 -415
- package/dist/ttl-cache-Bhr9swjT.js +0 -32
- package/dist/types-B-D6fYx2.d.ts +0 -194
- package/dist/types-C3I7S51U.d.ts +0 -461
- package/dist/types-CK2X2wCB.d.ts +0 -618
- 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-CuaWfCuv.js +0 -57
- package/dist/watch-topic-ItO3dz8m.d.ts +0 -31
- package/dist/wire-ChYn1g21.js +0 -91
- package/dist/wiring-CDNuQoJJ.js +0 -13
- package/dist/workflow-sdk-BWPsdzVK.js +0 -2534
- package/dist/workflow-sdk-Cf0LAOFF.js +0 -242
- package/dist/workflow-sdk-rg3IbCZC.d.ts +0 -163
- package/dist/workflows-xL6t0TXx.d.ts +0 -258
|
@@ -1,2000 +0,0 @@
|
|
|
1
|
-
import { n as CliError } from "./errors-BTe6A15O.js";
|
|
2
|
-
import { i as readStdin, t as display } from "./io-DH1kcmmP.js";
|
|
3
|
-
import { t as isRecord } from "./guards-CUlDNYZs.js";
|
|
4
|
-
import { c as resolve$1, i as extname$1, n as basename$1, o as join$1, r as dirname$1, s as normalize$1, t as resolveModulePath } from "./dist-DuiMMRbJ.js";
|
|
5
|
-
import { _ as parse$1, d as readSupabaseToml, f as schemaPaths, g as tomlNumber, p as sqlWorkflow, s as findUp } from "./supabase-toml-CncmQbO0.js";
|
|
6
|
-
import { A as strictObject, C as optional, D as record, E as rawCheck, M as union, N as unknown, O as regex, S as objectWithRest, T as pipe, _ as minLength, a as array, b as number, c as exactOptional, f as lazy, g as maxValue, h as maxLength, j as string, k as safeParse, l as getDotPath, m as literal, o as boolean, p as length, s as custom, u as integer, v as minValue, w as picklist, y as nullable } from "./env-BK0xKMeU.js";
|
|
7
|
-
import { t as importFresh } from "./fresh-import-DzgsGHkX.js";
|
|
8
|
-
import { n as readStackStatus } from "./stack-status-BkkYRlXG.js";
|
|
9
|
-
import * as nodeUtil from "node:util";
|
|
10
|
-
import { existsSync, readFileSync, statSync } from "node:fs";
|
|
11
|
-
import { dirname, join, resolve } from "node:path";
|
|
12
|
-
import { readFile, rm } from "node:fs/promises";
|
|
13
|
-
import { pathToFileURL } from "node:url";
|
|
14
|
-
import { APP_COLUMN_ACCESS, APP_COLUMN_FORMATS, APP_COLUMN_TYPES, APP_ON_DELETE_ACTIONS, APP_ROLLUP_AGGREGATES, APP_TABLE_EVENT_KINDS, CONFIG_GROUPS, GEN_TASKS, INTEGRATION_NAMES, RENAMED_CONFIG_KEYS, SKILLS_AGENTS, providerApiProblem, resolveConfig } from "better-supabase/config";
|
|
15
|
-
import { CONVENTION_FIELDS } from "better-supabase/preset";
|
|
16
|
-
import { SCOPE_ID_TYPES, parseBsbComment, scopeProblems, tableTagComments } from "better-supabase/sql";
|
|
17
|
-
import { homedir } from "node:os";
|
|
18
|
-
//#region src/cli/subject-tag.ts
|
|
19
|
-
const PERMISSION_PREFIX = "can-";
|
|
20
|
-
function text$1(value) {
|
|
21
|
-
return typeof value === "string" ? value : void 0;
|
|
22
|
-
}
|
|
23
|
-
function columns(value) {
|
|
24
|
-
return typeof value === "string" ? value.split(",").map((item) => item.trim()).filter((item) => item !== "") : [];
|
|
25
|
-
}
|
|
26
|
-
/**
|
|
27
|
-
* The `subject` entry a tag stands for. `table` is the tagged table. Options
|
|
28
|
-
* the tag has no word for (`search.from`, `search.watch`, row grants) stay in
|
|
29
|
-
* `subjects`.
|
|
30
|
-
*/
|
|
31
|
-
function subjectFromTag(args, table) {
|
|
32
|
-
const tenant = text$1(args["tenant"]);
|
|
33
|
-
const searchTitle = text$1(args["search-title"]);
|
|
34
|
-
const searchBody = columns(args["search-body"]);
|
|
35
|
-
const description = text$1(args["search-description"]);
|
|
36
|
-
const exclude = text$1(args["search-exclude"]);
|
|
37
|
-
const versions = columns(args["versions"]);
|
|
38
|
-
const rank = text$1(args["rank"]);
|
|
39
|
-
const permissions = Object.fromEntries(Object.entries(args).flatMap(([key, value]) => key.startsWith(PERMISSION_PREFIX) && typeof value === "string" ? [[key.slice(4), value]] : []));
|
|
40
|
-
const search = searchTitle !== void 0 || searchBody.length > 0 || description !== void 0 || exclude !== void 0 || args["search"] === true;
|
|
41
|
-
const id = text$1(args["id"]);
|
|
42
|
-
const idType = text$1(args["id-type"]);
|
|
43
|
-
const title = text$1(args["title"]);
|
|
44
|
-
const url = text$1(args["url"]);
|
|
45
|
-
const scope = text$1(args["scope"]);
|
|
46
|
-
const deletedAt = text$1(args["deleted-at"]);
|
|
47
|
-
const rankGroup = text$1(args["rank-group"]);
|
|
48
|
-
return {
|
|
49
|
-
table,
|
|
50
|
-
...id === void 0 ? {} : { id },
|
|
51
|
-
...idType === void 0 ? {} : { idType },
|
|
52
|
-
...tenant === void 0 ? {} : { tenant: tenant === "false" ? false : tenant },
|
|
53
|
-
...title === void 0 ? {} : { title },
|
|
54
|
-
...url === void 0 ? {} : { url },
|
|
55
|
-
...scope === void 0 ? {} : { scope },
|
|
56
|
-
...args["cascade"] === true ? { cascade: true } : {},
|
|
57
|
-
...deletedAt === void 0 ? {} : { deletedAt },
|
|
58
|
-
...Object.keys(permissions).length === 0 ? {} : { permissions },
|
|
59
|
-
...search ? { search: {
|
|
60
|
-
...searchTitle === void 0 ? {} : { title: searchTitle },
|
|
61
|
-
...searchBody.length === 0 ? {} : { body: searchBody },
|
|
62
|
-
...description === void 0 ? {} : { description },
|
|
63
|
-
...exclude === void 0 ? {} : { exclude }
|
|
64
|
-
} } : {},
|
|
65
|
-
...rank === void 0 && rankGroup === void 0 ? {} : { rank: {
|
|
66
|
-
column: rank ?? "rank",
|
|
67
|
-
...rankGroup === void 0 ? {} : { group: rankGroup }
|
|
68
|
-
} },
|
|
69
|
-
...versions.length === 0 ? {} : { versions: {
|
|
70
|
-
columns: versions,
|
|
71
|
-
auto: args["versions-auto"] !== "false"
|
|
72
|
-
} }
|
|
73
|
-
};
|
|
74
|
-
}
|
|
75
|
-
/**
|
|
76
|
-
* The tag arguments for `subject`, or `undefined` when the entry holds an
|
|
77
|
-
* option a tag can't carry, so it stays in `subjects`.
|
|
78
|
-
*/
|
|
79
|
-
function subjectTagArgs(type, subject, table) {
|
|
80
|
-
const permissions = Object.entries(subject.permissions ?? {});
|
|
81
|
-
if (permissions.some(([, value]) => typeof value !== "string") || subject.search?.from !== void 0 || subject.search?.watch !== void 0) return;
|
|
82
|
-
const args = {};
|
|
83
|
-
const set = (key, value) => {
|
|
84
|
-
if (value !== void 0) args[key] = value;
|
|
85
|
-
};
|
|
86
|
-
set("type", type === table ? void 0 : type);
|
|
87
|
-
set("id", subject.id);
|
|
88
|
-
set("id-type", subject.idType);
|
|
89
|
-
set("tenant", subject.tenant === false ? "false" : subject.tenant);
|
|
90
|
-
set("title", subject.title);
|
|
91
|
-
set("url", subject.url);
|
|
92
|
-
set("scope", subject.scope);
|
|
93
|
-
set("cascade", subject.cascade === true ? true : void 0);
|
|
94
|
-
set("deleted-at", subject.deletedAt);
|
|
95
|
-
set("search-title", subject.search?.title);
|
|
96
|
-
set("search-body", subject.search?.body === void 0 ? void 0 : subject.search.body.join(","));
|
|
97
|
-
set("search-description", subject.search?.description);
|
|
98
|
-
set("search-exclude", subject.search?.exclude);
|
|
99
|
-
set("search", subject.search !== void 0 && Object.keys(args).every((key) => !key.startsWith("search-")) ? true : void 0);
|
|
100
|
-
set("rank", subject.rank?.column);
|
|
101
|
-
set("rank-group", subject.rank?.group);
|
|
102
|
-
if (subject.versions !== void 0) {
|
|
103
|
-
set("versions", subject.versions.columns.join(","));
|
|
104
|
-
set("versions-auto", subject.versions.auto ? void 0 : "false");
|
|
105
|
-
}
|
|
106
|
-
for (const [action, key] of permissions) set(`${PERMISSION_PREFIX}${action}`, typeof key === "string" ? key : void 0);
|
|
107
|
-
return args;
|
|
108
|
-
}
|
|
109
|
-
//#endregion
|
|
110
|
-
//#region src/cli/gen/table-tags.ts
|
|
111
|
-
const DISTANCES = /* @__PURE__ */ new Set([
|
|
112
|
-
"cosine",
|
|
113
|
-
"l2",
|
|
114
|
-
"inner_product"
|
|
115
|
-
]);
|
|
116
|
-
function isDistance(value) {
|
|
117
|
-
return DISTANCES.has(value);
|
|
118
|
-
}
|
|
119
|
-
const IMPORT_PREFIX = "import:";
|
|
120
|
-
function isColumnType(value) {
|
|
121
|
-
return APP_COLUMN_TYPES.some((type) => type === value);
|
|
122
|
-
}
|
|
123
|
-
function isEventKind(value) {
|
|
124
|
-
return APP_TABLE_EVENT_KINDS.some((kind) => kind === value);
|
|
125
|
-
}
|
|
126
|
-
function list(value) {
|
|
127
|
-
return typeof value === "string" ? value.split(",").map((item) => item.trim()).filter((item) => item !== "") : [];
|
|
128
|
-
}
|
|
129
|
-
function text(value) {
|
|
130
|
-
return typeof value === "string" ? value : void 0;
|
|
131
|
-
}
|
|
132
|
-
/**
|
|
133
|
-
* `config` with the per-table features the schema's `@bsb` table comments turn
|
|
134
|
-
* on (ADR 0102): `subject`, `realtime`, `vector-search`, `json` (`column=Type`,
|
|
135
|
-
* or `column=import:module#Name`), `encrypted` (`column=type`, a bare column is
|
|
136
|
-
* text) and `events` (`on`, `include`). `audit`, `audit-reads` and `expose`
|
|
137
|
-
* change the table's SQL only, so `gen` has nothing to read from them. A key
|
|
138
|
-
* the config sets itself wins, so a project can move to tags one table at a
|
|
139
|
-
* time. Tables outside `config.schemas` are ignored.
|
|
140
|
-
*/
|
|
141
|
-
function withTableTags(config, tables) {
|
|
142
|
-
const subjects = { ...config.subjects };
|
|
143
|
-
const realtimeTables = [...config.realtime.tables];
|
|
144
|
-
const realtimeGlobal = [...config.realtime.global];
|
|
145
|
-
const realtimeUsers = { ...config.realtime.users };
|
|
146
|
-
const vectorSearch = [...config.vectorSearch];
|
|
147
|
-
const json = { ...config.json };
|
|
148
|
-
const appTables = { ...config.appTables };
|
|
149
|
-
const fromTags = /* @__PURE__ */ new Set();
|
|
150
|
-
const eventTables = /* @__PURE__ */ new Set();
|
|
151
|
-
let changed = false;
|
|
152
|
-
for (const table of tables) {
|
|
153
|
-
if (!config.schemas.includes(table.schema)) continue;
|
|
154
|
-
const { tags } = parseBsbComment(table.comment);
|
|
155
|
-
if (tags.length === 0) continue;
|
|
156
|
-
const qualified = `${table.schema}.${table.name}`;
|
|
157
|
-
const short = table.schema === "public" ? table.name : qualified;
|
|
158
|
-
const names = /* @__PURE__ */ new Set([short, qualified]);
|
|
159
|
-
for (const tag of tags) if (tag.name === "subject") {
|
|
160
|
-
const type = text(tag.args["type"]) ?? table.name;
|
|
161
|
-
if (subjects[type] === void 0) {
|
|
162
|
-
subjects[type] = subjectFromTag(tag.args, short);
|
|
163
|
-
changed = true;
|
|
164
|
-
}
|
|
165
|
-
} else if (tag.name === "realtime" && !realtimeTables.some((each) => names.has(each))) {
|
|
166
|
-
realtimeTables.push(short);
|
|
167
|
-
const user = text(tag.args["user"]);
|
|
168
|
-
if (tag.args["global"] === true) realtimeGlobal.push(short);
|
|
169
|
-
if (user !== void 0) realtimeUsers[short] = user;
|
|
170
|
-
changed = true;
|
|
171
|
-
} else if (tag.name === "json") for (const [column, value] of Object.entries(tag.args)) {
|
|
172
|
-
const key = `${short}.${column}`;
|
|
173
|
-
const taken = [key, `${qualified}.${column}`].some((each) => each in json);
|
|
174
|
-
if (typeof value === "string" && !taken) {
|
|
175
|
-
json[key] = value.startsWith(IMPORT_PREFIX) ? { import: value.slice(7) } : { type: value };
|
|
176
|
-
changed = true;
|
|
177
|
-
}
|
|
178
|
-
}
|
|
179
|
-
else if (tag.name === "encrypted" && table.schema === "public") for (const [column, value] of Object.entries(tag.args)) {
|
|
180
|
-
const type = value === true ? "text" : value;
|
|
181
|
-
const own = appTables[table.name];
|
|
182
|
-
const existing = own?.columns?.[column];
|
|
183
|
-
const key = `${table.name}.${column}`;
|
|
184
|
-
if (isColumnType(type) && (existing === void 0 || fromTags.has(key))) {
|
|
185
|
-
fromTags.add(key);
|
|
186
|
-
const entry = {
|
|
187
|
-
...existing,
|
|
188
|
-
type,
|
|
189
|
-
encrypted: true
|
|
190
|
-
};
|
|
191
|
-
appTables[table.name] = {
|
|
192
|
-
...own,
|
|
193
|
-
columns: {
|
|
194
|
-
...own?.columns,
|
|
195
|
-
[column]: entry
|
|
196
|
-
}
|
|
197
|
-
};
|
|
198
|
-
changed = true;
|
|
199
|
-
}
|
|
200
|
-
}
|
|
201
|
-
else if (tag.name === "server" && table.schema === "public") for (const column of Object.keys(tag.args)) {
|
|
202
|
-
const own = appTables[table.name];
|
|
203
|
-
const existing = own?.columns?.[column];
|
|
204
|
-
const key = `${table.name}.${column}`;
|
|
205
|
-
if (existing === void 0 || fromTags.has(key)) {
|
|
206
|
-
fromTags.add(key);
|
|
207
|
-
const entry = {
|
|
208
|
-
type: "text",
|
|
209
|
-
...existing,
|
|
210
|
-
access: "server"
|
|
211
|
-
};
|
|
212
|
-
appTables[table.name] = {
|
|
213
|
-
...own,
|
|
214
|
-
columns: {
|
|
215
|
-
...own?.columns,
|
|
216
|
-
[column]: entry
|
|
217
|
-
}
|
|
218
|
-
};
|
|
219
|
-
changed = true;
|
|
220
|
-
}
|
|
221
|
-
}
|
|
222
|
-
else if (tag.name === "events" && table.schema === "public" && appTables[table.name]?.events === void 0) {
|
|
223
|
-
const on = list(tag.args["on"]).filter(isEventKind);
|
|
224
|
-
const include = list(tag.args["include"]);
|
|
225
|
-
const events = on.length === 0 && include.length === 0 ? true : {
|
|
226
|
-
...on.length === 0 ? {} : { on },
|
|
227
|
-
...include.length === 0 ? {} : { include }
|
|
228
|
-
};
|
|
229
|
-
appTables[table.name] = {
|
|
230
|
-
...appTables[table.name],
|
|
231
|
-
events
|
|
232
|
-
};
|
|
233
|
-
eventTables.add(table.name);
|
|
234
|
-
changed = true;
|
|
235
|
-
} else if (tag.name === "vector-search" && !vectorSearch.some((each) => names.has(each.table))) {
|
|
236
|
-
const column = text(tag.args["column"]);
|
|
237
|
-
const distance = text(tag.args["distance"]) ?? "cosine";
|
|
238
|
-
if (column !== void 0 && isDistance(distance)) {
|
|
239
|
-
vectorSearch.push({
|
|
240
|
-
table: short,
|
|
241
|
-
column,
|
|
242
|
-
distance
|
|
243
|
-
});
|
|
244
|
-
changed = true;
|
|
245
|
-
}
|
|
246
|
-
}
|
|
247
|
-
}
|
|
248
|
-
for (const name of eventTables) {
|
|
249
|
-
const type = Object.entries(subjects).find(([, subject]) => subject.table === name || subject.table === `public.${name}`)?.[0];
|
|
250
|
-
if (type !== void 0) appTables[name] = {
|
|
251
|
-
...appTables[name],
|
|
252
|
-
subject: { type }
|
|
253
|
-
};
|
|
254
|
-
}
|
|
255
|
-
return changed ? {
|
|
256
|
-
...config,
|
|
257
|
-
subjects,
|
|
258
|
-
vectorSearch,
|
|
259
|
-
json,
|
|
260
|
-
appTables,
|
|
261
|
-
realtime: {
|
|
262
|
-
...config.realtime,
|
|
263
|
-
tables: realtimeTables,
|
|
264
|
-
global: realtimeGlobal,
|
|
265
|
-
users: realtimeUsers
|
|
266
|
-
}
|
|
267
|
-
} : config;
|
|
268
|
-
}
|
|
269
|
-
//#endregion
|
|
270
|
-
//#region ../../node_modules/.pnpm/rc9@3.1.0/node_modules/rc9/dist/_chunks/libs/flat.mjs
|
|
271
|
-
function isBuffer(obj) {
|
|
272
|
-
return obj && obj.constructor && typeof obj.constructor.isBuffer === "function" && obj.constructor.isBuffer(obj);
|
|
273
|
-
}
|
|
274
|
-
function keyIdentity(key) {
|
|
275
|
-
return key;
|
|
276
|
-
}
|
|
277
|
-
function flatten(target, opts) {
|
|
278
|
-
opts = opts || {};
|
|
279
|
-
const delimiter = opts.delimiter || ".";
|
|
280
|
-
const maxDepth = opts.maxDepth;
|
|
281
|
-
const transformKey = opts.transformKey || keyIdentity;
|
|
282
|
-
const output = {};
|
|
283
|
-
function step(object, prev, currentDepth) {
|
|
284
|
-
currentDepth = currentDepth || 1;
|
|
285
|
-
Object.keys(object).forEach(function(key) {
|
|
286
|
-
const value = object[key];
|
|
287
|
-
const isarray = opts.safe && Array.isArray(value);
|
|
288
|
-
const type = Object.prototype.toString.call(value);
|
|
289
|
-
const isbuffer = isBuffer(value);
|
|
290
|
-
const isobject = type === "[object Object]" || type === "[object Array]";
|
|
291
|
-
const newKey = prev ? prev + delimiter + transformKey(key) : transformKey(key);
|
|
292
|
-
if (!isarray && !isbuffer && isobject && Object.keys(value).length && (!opts.maxDepth || currentDepth < maxDepth)) return step(value, newKey, currentDepth + 1);
|
|
293
|
-
output[newKey] = value;
|
|
294
|
-
});
|
|
295
|
-
}
|
|
296
|
-
step(target);
|
|
297
|
-
return output;
|
|
298
|
-
}
|
|
299
|
-
function unflatten(target, opts) {
|
|
300
|
-
opts = opts || {};
|
|
301
|
-
const delimiter = opts.delimiter || ".";
|
|
302
|
-
const overwrite = opts.overwrite || false;
|
|
303
|
-
const transformKey = opts.transformKey || keyIdentity;
|
|
304
|
-
const result = {};
|
|
305
|
-
if (isBuffer(target) || Object.prototype.toString.call(target) !== "[object Object]") return target;
|
|
306
|
-
function getkey(key) {
|
|
307
|
-
const parsedKey = Number(key);
|
|
308
|
-
return isNaN(parsedKey) || key.indexOf(".") !== -1 || opts.object ? key : parsedKey;
|
|
309
|
-
}
|
|
310
|
-
function addKeys(keyPrefix, recipient, target) {
|
|
311
|
-
return Object.keys(target).reduce(function(result, key) {
|
|
312
|
-
result[keyPrefix + delimiter + key] = target[key];
|
|
313
|
-
return result;
|
|
314
|
-
}, recipient);
|
|
315
|
-
}
|
|
316
|
-
function isEmpty(val) {
|
|
317
|
-
const type = Object.prototype.toString.call(val);
|
|
318
|
-
const isArray = type === "[object Array]";
|
|
319
|
-
const isObject = type === "[object Object]";
|
|
320
|
-
if (!val) return true;
|
|
321
|
-
else if (isArray) return !val.length;
|
|
322
|
-
else if (isObject) return !Object.keys(val).length;
|
|
323
|
-
}
|
|
324
|
-
target = Object.keys(target).reduce(function(result, key) {
|
|
325
|
-
const type = Object.prototype.toString.call(target[key]);
|
|
326
|
-
if (!(type === "[object Object]" || type === "[object Array]") || isEmpty(target[key])) {
|
|
327
|
-
result[key] = target[key];
|
|
328
|
-
return result;
|
|
329
|
-
} else return addKeys(key, result, flatten(target[key], opts));
|
|
330
|
-
}, {});
|
|
331
|
-
Object.keys(target).forEach(function(key) {
|
|
332
|
-
const split = key.split(delimiter).map(transformKey);
|
|
333
|
-
let key1 = getkey(split.shift());
|
|
334
|
-
let key2 = getkey(split[0]);
|
|
335
|
-
let recipient = result;
|
|
336
|
-
while (key2 !== void 0) {
|
|
337
|
-
if (key1 === "__proto__") return;
|
|
338
|
-
const type = Object.prototype.toString.call(recipient[key1]);
|
|
339
|
-
const isobject = type === "[object Object]" || type === "[object Array]";
|
|
340
|
-
if (!overwrite && !isobject && typeof recipient[key1] !== "undefined") return;
|
|
341
|
-
if (overwrite && !isobject || !overwrite && recipient[key1] == null) recipient[key1] = typeof key2 === "number" && !opts.object ? [] : {};
|
|
342
|
-
recipient = recipient[key1];
|
|
343
|
-
if (split.length > 0) {
|
|
344
|
-
key1 = getkey(split.shift());
|
|
345
|
-
key2 = getkey(split[0]);
|
|
346
|
-
}
|
|
347
|
-
}
|
|
348
|
-
recipient[key1] = unflatten(target[key], opts);
|
|
349
|
-
});
|
|
350
|
-
return result;
|
|
351
|
-
}
|
|
352
|
-
//#endregion
|
|
353
|
-
//#region ../../node_modules/.pnpm/destr@2.0.5/node_modules/destr/dist/index.mjs
|
|
354
|
-
const suspectProtoRx = /"(?:_|\\u0{2}5[Ff]){2}(?:p|\\u0{2}70)(?:r|\\u0{2}72)(?:o|\\u0{2}6[Ff])(?:t|\\u0{2}74)(?:o|\\u0{2}6[Ff])(?:_|\\u0{2}5[Ff]){2}"\s*:/;
|
|
355
|
-
const suspectConstructorRx = /"(?:c|\\u0063)(?:o|\\u006[Ff])(?:n|\\u006[Ee])(?:s|\\u0073)(?:t|\\u0074)(?:r|\\u0072)(?:u|\\u0075)(?:c|\\u0063)(?:t|\\u0074)(?:o|\\u006[Ff])(?:r|\\u0072)"\s*:/;
|
|
356
|
-
const JsonSigRx = /^\s*["[{]|^\s*-?\d{1,16}(\.\d{1,17})?([Ee][+-]?\d+)?\s*$/;
|
|
357
|
-
function jsonParseTransform(key, value) {
|
|
358
|
-
if (key === "__proto__" || key === "constructor" && value && typeof value === "object" && "prototype" in value) {
|
|
359
|
-
warnKeyDropped(key);
|
|
360
|
-
return;
|
|
361
|
-
}
|
|
362
|
-
return value;
|
|
363
|
-
}
|
|
364
|
-
function warnKeyDropped(key) {
|
|
365
|
-
console.warn(`[destr] Dropping "${key}" key to prevent prototype pollution.`);
|
|
366
|
-
}
|
|
367
|
-
function destr(value, options = {}) {
|
|
368
|
-
if (typeof value !== "string") return value;
|
|
369
|
-
if (value[0] === "\"" && value[value.length - 1] === "\"" && value.indexOf("\\") === -1) return value.slice(1, -1);
|
|
370
|
-
const _value = value.trim();
|
|
371
|
-
if (_value.length <= 9) switch (_value.toLowerCase()) {
|
|
372
|
-
case "true": return true;
|
|
373
|
-
case "false": return false;
|
|
374
|
-
case "undefined": return;
|
|
375
|
-
case "null": return null;
|
|
376
|
-
case "nan": return NaN;
|
|
377
|
-
case "infinity": return Number.POSITIVE_INFINITY;
|
|
378
|
-
case "-infinity": return Number.NEGATIVE_INFINITY;
|
|
379
|
-
}
|
|
380
|
-
if (!JsonSigRx.test(value)) {
|
|
381
|
-
if (options.strict) throw new SyntaxError("[destr] Invalid JSON");
|
|
382
|
-
return value;
|
|
383
|
-
}
|
|
384
|
-
try {
|
|
385
|
-
if (suspectProtoRx.test(value) || suspectConstructorRx.test(value)) {
|
|
386
|
-
if (options.strict) throw new Error("[destr] Possible prototype pollution");
|
|
387
|
-
return JSON.parse(value, jsonParseTransform);
|
|
388
|
-
}
|
|
389
|
-
return JSON.parse(value);
|
|
390
|
-
} catch (error) {
|
|
391
|
-
if (options.strict) throw error;
|
|
392
|
-
return value;
|
|
393
|
-
}
|
|
394
|
-
}
|
|
395
|
-
//#endregion
|
|
396
|
-
//#region ../../node_modules/.pnpm/defu@6.1.7/node_modules/defu/dist/defu.mjs
|
|
397
|
-
function isPlainObject$1(value) {
|
|
398
|
-
if (value === null || typeof value !== "object") return false;
|
|
399
|
-
const prototype = Object.getPrototypeOf(value);
|
|
400
|
-
if (prototype !== null && prototype !== Object.prototype && Object.getPrototypeOf(prototype) !== null) return false;
|
|
401
|
-
if (Symbol.iterator in value) return false;
|
|
402
|
-
if (Symbol.toStringTag in value) return Object.prototype.toString.call(value) === "[object Module]";
|
|
403
|
-
return true;
|
|
404
|
-
}
|
|
405
|
-
function _defu(baseObject, defaults, namespace = ".", merger) {
|
|
406
|
-
if (!isPlainObject$1(defaults)) return _defu(baseObject, {}, namespace, merger);
|
|
407
|
-
const object = { ...defaults };
|
|
408
|
-
for (const key of Object.keys(baseObject)) {
|
|
409
|
-
if (key === "__proto__" || key === "constructor") continue;
|
|
410
|
-
const value = baseObject[key];
|
|
411
|
-
if (value === null || value === void 0) continue;
|
|
412
|
-
if (merger && merger(object, key, value, namespace)) continue;
|
|
413
|
-
if (Array.isArray(value) && Array.isArray(object[key])) object[key] = [...value, ...object[key]];
|
|
414
|
-
else if (isPlainObject$1(value) && isPlainObject$1(object[key])) object[key] = _defu(value, object[key], (namespace ? `${namespace}.` : "") + key.toString(), merger);
|
|
415
|
-
else object[key] = value;
|
|
416
|
-
}
|
|
417
|
-
return object;
|
|
418
|
-
}
|
|
419
|
-
function createDefu(merger) {
|
|
420
|
-
return (...arguments_) => arguments_.reduce((p, c) => _defu(p, c, "", merger), {});
|
|
421
|
-
}
|
|
422
|
-
const defu = createDefu();
|
|
423
|
-
//#endregion
|
|
424
|
-
//#region ../../node_modules/.pnpm/rc9@3.1.0/node_modules/rc9/dist/index.mjs
|
|
425
|
-
const RE_KEY_VAL = /^\s*([^\s=]+)\s*=\s*(.*)?\s*$/;
|
|
426
|
-
const RE_LINES = /\n|\r|\r\n/;
|
|
427
|
-
const defaults = {
|
|
428
|
-
name: ".conf",
|
|
429
|
-
dir: process.cwd(),
|
|
430
|
-
flat: false
|
|
431
|
-
};
|
|
432
|
-
function withDefaults(options) {
|
|
433
|
-
if (typeof options === "string") options = { name: options };
|
|
434
|
-
return {
|
|
435
|
-
...defaults,
|
|
436
|
-
...options
|
|
437
|
-
};
|
|
438
|
-
}
|
|
439
|
-
function parse(contents, options = {}) {
|
|
440
|
-
const config = {};
|
|
441
|
-
const lines = contents.split(RE_LINES);
|
|
442
|
-
for (const line of lines) {
|
|
443
|
-
const match = line.match(RE_KEY_VAL);
|
|
444
|
-
if (!match) continue;
|
|
445
|
-
const key = match[1];
|
|
446
|
-
if (!key || key === "__proto__" || key === "constructor") continue;
|
|
447
|
-
const value = destr((match[2] || "").trim());
|
|
448
|
-
if (key.endsWith("[]")) {
|
|
449
|
-
const nkey = key.slice(0, Math.max(0, key.length - 2));
|
|
450
|
-
config[nkey] = (config[nkey] || []).concat(value);
|
|
451
|
-
continue;
|
|
452
|
-
}
|
|
453
|
-
config[key] = value;
|
|
454
|
-
}
|
|
455
|
-
return options.flat ? config : unflatten(config, { overwrite: true });
|
|
456
|
-
}
|
|
457
|
-
function parseFile(path, options) {
|
|
458
|
-
if (!existsSync(path)) return {};
|
|
459
|
-
return parse(readFileSync(path, "utf8"), options);
|
|
460
|
-
}
|
|
461
|
-
function read(options) {
|
|
462
|
-
options = withDefaults(options);
|
|
463
|
-
return parseFile(resolve(options.dir, options.name), options);
|
|
464
|
-
}
|
|
465
|
-
function userConfigDir() {
|
|
466
|
-
return process.env.XDG_CONFIG_HOME || resolve(homedir(), ".config");
|
|
467
|
-
}
|
|
468
|
-
function readUserConfig(options) {
|
|
469
|
-
options = withDefaults(options);
|
|
470
|
-
options.dir = userConfigDir();
|
|
471
|
-
return read(options);
|
|
472
|
-
}
|
|
473
|
-
//#endregion
|
|
474
|
-
//#region ../../node_modules/.pnpm/c12@4.0.0-rc.2_dotenv@17.4.2_giget@3.3.1_jiti@2.7.0_magicast@0.5.5/node_modules/c12/dist/index.mjs
|
|
475
|
-
async function setupDotenv(options) {
|
|
476
|
-
const targetEnvironment = options.env ?? process.env;
|
|
477
|
-
const environment = await loadDotenv({
|
|
478
|
-
cwd: options.cwd,
|
|
479
|
-
fileName: options.fileName ?? ".env",
|
|
480
|
-
env: targetEnvironment,
|
|
481
|
-
interpolate: options.interpolate ?? true,
|
|
482
|
-
expandFileReferences: options.expandFileReferences ?? false,
|
|
483
|
-
parse: options.parse
|
|
484
|
-
});
|
|
485
|
-
const dotenvVars = getDotEnvVars(targetEnvironment);
|
|
486
|
-
for (const key in environment) {
|
|
487
|
-
if (key.startsWith("_")) continue;
|
|
488
|
-
if (targetEnvironment[key] === void 0 || dotenvVars.has(key)) targetEnvironment[key] = environment[key];
|
|
489
|
-
}
|
|
490
|
-
return environment;
|
|
491
|
-
}
|
|
492
|
-
async function loadDotenv(options) {
|
|
493
|
-
const environment = Object.create(null);
|
|
494
|
-
const cwd = resolve$1(options.cwd || ".");
|
|
495
|
-
const _fileName = options.fileName || ".env";
|
|
496
|
-
const dotenvFiles = typeof _fileName === "string" ? [_fileName] : _fileName;
|
|
497
|
-
const dotenvVars = getDotEnvVars(options.env || {});
|
|
498
|
-
Object.assign(environment, options.env);
|
|
499
|
-
for (const file of dotenvFiles) {
|
|
500
|
-
const dotenvFile = resolve$1(cwd, file);
|
|
501
|
-
if (!statSync(dotenvFile, { throwIfNoEntry: false })?.isFile()) continue;
|
|
502
|
-
const parsed = await readEnvFile(dotenvFile, options.parse);
|
|
503
|
-
for (const key in parsed) {
|
|
504
|
-
if (key in environment && !dotenvVars.has(key)) continue;
|
|
505
|
-
environment[key] = parsed[key];
|
|
506
|
-
dotenvVars.add(key);
|
|
507
|
-
}
|
|
508
|
-
}
|
|
509
|
-
if (options.expandFileReferences) {
|
|
510
|
-
for (const key in environment) if (key.endsWith("_FILE")) {
|
|
511
|
-
const targetKey = key.slice(0, -5);
|
|
512
|
-
if (environment[targetKey] === void 0) {
|
|
513
|
-
const filePath = environment[key];
|
|
514
|
-
if (filePath && statSync(filePath, { throwIfNoEntry: false })?.isFile()) {
|
|
515
|
-
environment[targetKey] = readFileSync(filePath, "utf8").trim();
|
|
516
|
-
dotenvVars.add(targetKey);
|
|
517
|
-
}
|
|
518
|
-
}
|
|
519
|
-
}
|
|
520
|
-
}
|
|
521
|
-
if (options.interpolate) interpolate(environment);
|
|
522
|
-
return environment;
|
|
523
|
-
}
|
|
524
|
-
let _parseEnv = nodeUtil.parseEnv;
|
|
525
|
-
async function readEnvFile(path, parse) {
|
|
526
|
-
const src = readFileSync(path, "utf8");
|
|
527
|
-
if (parse) return parse(src);
|
|
528
|
-
if (!_parseEnv) try {
|
|
529
|
-
const dotenv = await import("dotenv");
|
|
530
|
-
_parseEnv = (src) => dotenv.parse(src);
|
|
531
|
-
} catch {
|
|
532
|
-
throw new Error("Failed to parse .env file: `node:util.parseEnv` is not available and `dotenv` package is not installed. Please upgrade your runtime, install `dotenv` as a dependency or provide a custom `parse` option.");
|
|
533
|
-
}
|
|
534
|
-
return _parseEnv(src);
|
|
535
|
-
}
|
|
536
|
-
function interpolate(target, source = {}, parse = (v) => v) {
|
|
537
|
-
function getValue(key) {
|
|
538
|
-
return source[key] === void 0 ? target[key] : source[key];
|
|
539
|
-
}
|
|
540
|
-
function interpolate(value, parents = []) {
|
|
541
|
-
if (typeof value !== "string") return value;
|
|
542
|
-
let result = "";
|
|
543
|
-
let index = 0;
|
|
544
|
-
while (index < value.length) {
|
|
545
|
-
const char = value[index];
|
|
546
|
-
if (char === "\\" && value[index + 1] === "$") {
|
|
547
|
-
result += "$";
|
|
548
|
-
index += 2;
|
|
549
|
-
continue;
|
|
550
|
-
}
|
|
551
|
-
const ref = char === "$" ? parseRef(value, index) : void 0;
|
|
552
|
-
if (!ref) {
|
|
553
|
-
result += char;
|
|
554
|
-
index++;
|
|
555
|
-
continue;
|
|
556
|
-
}
|
|
557
|
-
if (parents.includes(ref.key)) {
|
|
558
|
-
if (ref.defaultValue !== void 0) {
|
|
559
|
-
result += interpolate(ref.defaultValue, parents);
|
|
560
|
-
index = ref.end;
|
|
561
|
-
continue;
|
|
562
|
-
}
|
|
563
|
-
console.warn(`Please avoid recursive environment variables ( loop: ${parents.join(" > ")} > ${ref.key} )`);
|
|
564
|
-
return "";
|
|
565
|
-
}
|
|
566
|
-
let resolved = interpolate(getValue(ref.key), [...parents, ref.key]);
|
|
567
|
-
if (ref.defaultValue !== void 0 && (resolved === void 0 || ref.operator === ":-" && resolved === "")) resolved = interpolate(ref.defaultValue, parents);
|
|
568
|
-
result += resolved === void 0 ? value.slice(index, ref.end) : resolved;
|
|
569
|
-
index = ref.end;
|
|
570
|
-
}
|
|
571
|
-
return parse(result);
|
|
572
|
-
}
|
|
573
|
-
for (const key in target) target[key] = interpolate(getValue(key));
|
|
574
|
-
}
|
|
575
|
-
const REF_NAME_RE = /\w+/y;
|
|
576
|
-
const BRACED_REF_NAME_RE = /[\w:]+/y;
|
|
577
|
-
function parseRef(input, start) {
|
|
578
|
-
let index = start + 1;
|
|
579
|
-
const braced = input[index] === "{";
|
|
580
|
-
if (braced) index++;
|
|
581
|
-
const nameRe = braced ? BRACED_REF_NAME_RE : REF_NAME_RE;
|
|
582
|
-
nameRe.lastIndex = index;
|
|
583
|
-
const name = nameRe.exec(input);
|
|
584
|
-
if (!name) return;
|
|
585
|
-
let key = name[0];
|
|
586
|
-
index = nameRe.lastIndex;
|
|
587
|
-
if (!braced) return {
|
|
588
|
-
key,
|
|
589
|
-
end: index
|
|
590
|
-
};
|
|
591
|
-
if (input[index] === "}") return {
|
|
592
|
-
key,
|
|
593
|
-
end: index + 1
|
|
594
|
-
};
|
|
595
|
-
if (input[index] === "-") {
|
|
596
|
-
let operator = "-";
|
|
597
|
-
if (key.endsWith(":")) {
|
|
598
|
-
key = key.slice(0, -1);
|
|
599
|
-
operator = ":-";
|
|
600
|
-
}
|
|
601
|
-
const defaultValue = key ? readDefault(input, index + 1) : void 0;
|
|
602
|
-
if (!defaultValue) return;
|
|
603
|
-
return {
|
|
604
|
-
key,
|
|
605
|
-
operator,
|
|
606
|
-
defaultValue: defaultValue.value,
|
|
607
|
-
end: defaultValue.end
|
|
608
|
-
};
|
|
609
|
-
}
|
|
610
|
-
return {
|
|
611
|
-
key,
|
|
612
|
-
end: index
|
|
613
|
-
};
|
|
614
|
-
}
|
|
615
|
-
function readDefault(input, start) {
|
|
616
|
-
let value = "";
|
|
617
|
-
let depth = 1;
|
|
618
|
-
for (let index = start; index < input.length; index++) {
|
|
619
|
-
const char = input[index];
|
|
620
|
-
if (char === "\\" && index + 1 < input.length) {
|
|
621
|
-
const next = input[index + 1];
|
|
622
|
-
value += next === "{" || next === "}" ? next : char + next;
|
|
623
|
-
index++;
|
|
624
|
-
continue;
|
|
625
|
-
}
|
|
626
|
-
if (char === "$" && input[index + 1] === "{") {
|
|
627
|
-
depth++;
|
|
628
|
-
value += "${";
|
|
629
|
-
index++;
|
|
630
|
-
continue;
|
|
631
|
-
}
|
|
632
|
-
if (char === "{") depth++;
|
|
633
|
-
if (char === "}") {
|
|
634
|
-
depth--;
|
|
635
|
-
if (depth === 0) return {
|
|
636
|
-
value,
|
|
637
|
-
end: index + 1
|
|
638
|
-
};
|
|
639
|
-
}
|
|
640
|
-
value += char;
|
|
641
|
-
}
|
|
642
|
-
}
|
|
643
|
-
function getDotEnvVars(targetEnvironment) {
|
|
644
|
-
const globalRegistry = globalThis.__c12_dotenv_vars__ ||= /* @__PURE__ */ new Map();
|
|
645
|
-
if (!globalRegistry.has(targetEnvironment)) globalRegistry.set(targetEnvironment, /* @__PURE__ */ new Set());
|
|
646
|
-
return globalRegistry.get(targetEnvironment);
|
|
647
|
-
}
|
|
648
|
-
const _normalize = (p) => p?.replace(/\\/g, "/");
|
|
649
|
-
let importCounter = 0;
|
|
650
|
-
const ASYNC_LOADERS = {
|
|
651
|
-
".json": () => JSON.parse,
|
|
652
|
-
".yaml": () => import("./yaml-CYCbJ6et.js").then((r) => r.parseYAML),
|
|
653
|
-
".yml": () => import("./yaml-CYCbJ6et.js").then((r) => r.parseYAML),
|
|
654
|
-
".jsonc": () => import("./jsonc-C8M0EhHB.js").then((r) => (source) => r.parseJSONC(source, { allowTrailingComma: true })),
|
|
655
|
-
".json5": () => import("./json5-ChRycquj.js").then((r) => r.parseJSON5),
|
|
656
|
-
".toml": () => import("./toml-DB-MNnFs.js").then((r) => r.parseTOML)
|
|
657
|
-
};
|
|
658
|
-
const SUPPORTED_EXTENSIONS = Object.freeze([
|
|
659
|
-
".js",
|
|
660
|
-
".ts",
|
|
661
|
-
".mjs",
|
|
662
|
-
".cjs",
|
|
663
|
-
".mts",
|
|
664
|
-
".cts",
|
|
665
|
-
".json",
|
|
666
|
-
".jsonc",
|
|
667
|
-
".json5",
|
|
668
|
-
".yaml",
|
|
669
|
-
".yml",
|
|
670
|
-
".toml"
|
|
671
|
-
]);
|
|
672
|
-
async function loadConfig$1(options) {
|
|
673
|
-
options.cwd = resolve$1(process.cwd(), options.cwd || ".");
|
|
674
|
-
options.name = options.name || "config";
|
|
675
|
-
options.envName = options.envName ?? process.env.NODE_ENV;
|
|
676
|
-
options.configFile = options.configFile ?? (options.name === "config" ? "config" : `${options.name}.config`);
|
|
677
|
-
options.rcFile = options.rcFile ?? `.${options.name}rc`;
|
|
678
|
-
if (options.extend !== false) options.extend = {
|
|
679
|
-
extendKey: "extends",
|
|
680
|
-
...options.extend
|
|
681
|
-
};
|
|
682
|
-
const _merger = options.merger || defu;
|
|
683
|
-
const r = {
|
|
684
|
-
config: {},
|
|
685
|
-
cwd: options.cwd,
|
|
686
|
-
configFile: resolve$1(options.cwd, options.configFile),
|
|
687
|
-
layers: [],
|
|
688
|
-
_configFile: void 0
|
|
689
|
-
};
|
|
690
|
-
const rawConfigs = {
|
|
691
|
-
overrides: options.overrides,
|
|
692
|
-
main: void 0,
|
|
693
|
-
rc: void 0,
|
|
694
|
-
packageJson: void 0,
|
|
695
|
-
defaultConfig: options.defaultConfig
|
|
696
|
-
};
|
|
697
|
-
if (options.dotenv) await setupDotenv({
|
|
698
|
-
cwd: options.cwd,
|
|
699
|
-
...options.dotenv === true ? {} : options.dotenv
|
|
700
|
-
});
|
|
701
|
-
const _mainConfig = await resolveConfig$1(".", options);
|
|
702
|
-
if (_mainConfig.configFile) {
|
|
703
|
-
rawConfigs.main = _mainConfig.config;
|
|
704
|
-
r.configFile = _mainConfig.configFile;
|
|
705
|
-
r._configFile = _mainConfig._configFile;
|
|
706
|
-
}
|
|
707
|
-
if (_mainConfig.meta) r.meta = _mainConfig.meta;
|
|
708
|
-
if (options.rcFile) {
|
|
709
|
-
const rcSources = [];
|
|
710
|
-
rcSources.push(read({
|
|
711
|
-
name: options.rcFile,
|
|
712
|
-
dir: options.cwd
|
|
713
|
-
}));
|
|
714
|
-
if (options.globalRc) {
|
|
715
|
-
const { findWorkspaceDir } = await import("./dist-D_VbPAMR.js");
|
|
716
|
-
const workspaceDir = await findWorkspaceDir(options.cwd).catch(() => {});
|
|
717
|
-
if (workspaceDir) rcSources.push(read({
|
|
718
|
-
name: options.rcFile,
|
|
719
|
-
dir: workspaceDir
|
|
720
|
-
}));
|
|
721
|
-
rcSources.push(readUserConfig({ name: options.rcFile }));
|
|
722
|
-
rcSources.push(read({
|
|
723
|
-
name: options.rcFile,
|
|
724
|
-
dir: homedir()
|
|
725
|
-
}));
|
|
726
|
-
}
|
|
727
|
-
rawConfigs.rc = _merger({}, ...rcSources);
|
|
728
|
-
}
|
|
729
|
-
if (options.packageJson) {
|
|
730
|
-
const keys = (Array.isArray(options.packageJson) ? options.packageJson : [typeof options.packageJson === "string" ? options.packageJson : options.name]).filter((t) => t && typeof t === "string");
|
|
731
|
-
const { readPackageJSON } = await import("./dist-D_VbPAMR.js");
|
|
732
|
-
const pkgJsonFile = await readPackageJSON(options.cwd).catch(() => {});
|
|
733
|
-
rawConfigs.packageJson = _merger({}, ...keys.map((key) => pkgJsonFile?.[key]));
|
|
734
|
-
}
|
|
735
|
-
const configs = {};
|
|
736
|
-
for (const key in rawConfigs) {
|
|
737
|
-
const value = rawConfigs[key];
|
|
738
|
-
configs[key] = await (typeof value === "function" ? value({
|
|
739
|
-
configs,
|
|
740
|
-
rawConfigs
|
|
741
|
-
}) : value);
|
|
742
|
-
}
|
|
743
|
-
if (Array.isArray(configs.main)) r.config = configs.main;
|
|
744
|
-
else {
|
|
745
|
-
r.config = _merger(configs.overrides, configs.main, configs.rc, configs.packageJson, configs.defaultConfig);
|
|
746
|
-
if (options.extend) {
|
|
747
|
-
await extendConfig(r.config, options);
|
|
748
|
-
r.layers = r.config._layers;
|
|
749
|
-
delete r.config._layers;
|
|
750
|
-
r.config = _merger(r.config, ...r.layers.map((e) => e.config));
|
|
751
|
-
}
|
|
752
|
-
}
|
|
753
|
-
r.layers = [...[
|
|
754
|
-
configs.overrides && {
|
|
755
|
-
config: configs.overrides,
|
|
756
|
-
configFile: void 0,
|
|
757
|
-
cwd: void 0
|
|
758
|
-
},
|
|
759
|
-
{
|
|
760
|
-
config: configs.main,
|
|
761
|
-
configFile: options.configFile,
|
|
762
|
-
cwd: options.cwd
|
|
763
|
-
},
|
|
764
|
-
configs.rc && {
|
|
765
|
-
config: configs.rc,
|
|
766
|
-
configFile: options.rcFile
|
|
767
|
-
},
|
|
768
|
-
configs.packageJson && {
|
|
769
|
-
config: configs.packageJson,
|
|
770
|
-
configFile: "package.json"
|
|
771
|
-
}
|
|
772
|
-
].filter((l) => l && l.config), ...r.layers];
|
|
773
|
-
if (options.defaults) r.config = _merger(r.config, options.defaults);
|
|
774
|
-
if (options.omit$Keys) {
|
|
775
|
-
for (const key in r.config) if (key.startsWith("$")) delete r.config[key];
|
|
776
|
-
}
|
|
777
|
-
if (options.configFileRequired && !r._configFile) throw new Error(`Required config (${r.configFile}) cannot be resolved.`);
|
|
778
|
-
if (options.schema != null) r.config = await validateConfig(r.config, options.schema);
|
|
779
|
-
return r;
|
|
780
|
-
}
|
|
781
|
-
async function extendConfig(config, options) {
|
|
782
|
-
config._layers = config._layers || [];
|
|
783
|
-
if (!options.extend) return;
|
|
784
|
-
let keys = options.extend.extendKey;
|
|
785
|
-
if (typeof keys === "string") keys = [keys];
|
|
786
|
-
const extendSources = [];
|
|
787
|
-
for (const key of keys) {
|
|
788
|
-
extendSources.push(...(Array.isArray(config[key]) ? config[key] : [config[key]]).filter(Boolean));
|
|
789
|
-
delete config[key];
|
|
790
|
-
}
|
|
791
|
-
for (let extendSource of extendSources) {
|
|
792
|
-
const originalExtendSource = extendSource;
|
|
793
|
-
let sourceOptions = {};
|
|
794
|
-
if (extendSource.source) {
|
|
795
|
-
sourceOptions = extendSource.options || {};
|
|
796
|
-
extendSource = extendSource.source;
|
|
797
|
-
}
|
|
798
|
-
if (Array.isArray(extendSource)) {
|
|
799
|
-
sourceOptions = extendSource[1] || {};
|
|
800
|
-
extendSource = extendSource[0];
|
|
801
|
-
}
|
|
802
|
-
if (typeof extendSource !== "string") {
|
|
803
|
-
console.warn(`Cannot extend config from \`${JSON.stringify(originalExtendSource)}\` in ${options.cwd}`);
|
|
804
|
-
continue;
|
|
805
|
-
}
|
|
806
|
-
const _config = await resolveConfig$1(extendSource, options, sourceOptions);
|
|
807
|
-
if (!_config.config) {
|
|
808
|
-
console.warn(`Cannot extend config from \`${extendSource}\` in ${options.cwd}`);
|
|
809
|
-
continue;
|
|
810
|
-
}
|
|
811
|
-
await extendConfig(_config.config, {
|
|
812
|
-
...options,
|
|
813
|
-
cwd: _config.cwd
|
|
814
|
-
});
|
|
815
|
-
config._layers.push(_config);
|
|
816
|
-
if (_config.config._layers) {
|
|
817
|
-
config._layers.push(..._config.config._layers);
|
|
818
|
-
delete _config.config._layers;
|
|
819
|
-
}
|
|
820
|
-
}
|
|
821
|
-
}
|
|
822
|
-
const GIGET_PREFIXES = [
|
|
823
|
-
"gh:",
|
|
824
|
-
"github:",
|
|
825
|
-
"gitlab:",
|
|
826
|
-
"bitbucket:",
|
|
827
|
-
"https://",
|
|
828
|
-
"http://"
|
|
829
|
-
];
|
|
830
|
-
const NPM_PACKAGE_RE = /^(@[\da-z~-][\d._a-z~-]*\/)?[\da-z~-][\d._a-z~-]*($|\/.*)/;
|
|
831
|
-
async function resolveConfig$1(source, options, sourceOptions = {}) {
|
|
832
|
-
if (options.resolve) {
|
|
833
|
-
const res = await options.resolve(source, options);
|
|
834
|
-
if (res) return res;
|
|
835
|
-
}
|
|
836
|
-
const _merger = options.merger || defu;
|
|
837
|
-
const customProviderKeys = Object.keys(sourceOptions.giget?.providers || {}).map((key) => `${key}:`);
|
|
838
|
-
const gigetPrefixes = customProviderKeys.length > 0 ? [.../* @__PURE__ */ new Set([...customProviderKeys, ...GIGET_PREFIXES])] : GIGET_PREFIXES;
|
|
839
|
-
if (options.giget !== false && gigetPrefixes.some((prefix) => source.startsWith(prefix))) {
|
|
840
|
-
const { downloadTemplate } = await import("giget").catch((error) => {
|
|
841
|
-
throw new Error(`Extending config from \`${source}\` requires \`giget\` peer dependency to be installed.\n\nInstall it with: \`npx nypm i giget\``, { cause: error });
|
|
842
|
-
});
|
|
843
|
-
const { digest } = await import("./ohash-BjQY1cBb.js").then((n) => n.dist_exports);
|
|
844
|
-
const cloneName = source.replace(/\W+/g, "_").split("_").splice(0, 3).join("_") + "_" + digest(source).slice(0, 10).replace(/[-_]/g, "");
|
|
845
|
-
let cloneDir;
|
|
846
|
-
const localNodeModules = resolve$1(options.cwd, "node_modules");
|
|
847
|
-
const parentDir = dirname$1(options.cwd);
|
|
848
|
-
if (basename$1(parentDir) === ".c12") cloneDir = join$1(parentDir, cloneName);
|
|
849
|
-
else if (existsSync(localNodeModules)) cloneDir = join$1(localNodeModules, ".c12", cloneName);
|
|
850
|
-
else cloneDir = process.env.XDG_CACHE_HOME ? resolve$1(process.env.XDG_CACHE_HOME, "c12", cloneName) : resolve$1(homedir(), ".cache/c12", cloneName);
|
|
851
|
-
const install = sourceOptions.install ? defu(sourceOptions.install === true ? {} : sourceOptions.install, { ignoreWorkspace: true }) : false;
|
|
852
|
-
if (existsSync(cloneDir) && !install) await rm(cloneDir, { recursive: true });
|
|
853
|
-
source = (await downloadTemplate(source, {
|
|
854
|
-
dir: cloneDir,
|
|
855
|
-
install,
|
|
856
|
-
force: Boolean(install),
|
|
857
|
-
auth: sourceOptions.auth,
|
|
858
|
-
...options.giget,
|
|
859
|
-
...sourceOptions.giget
|
|
860
|
-
})).dir;
|
|
861
|
-
}
|
|
862
|
-
if (NPM_PACKAGE_RE.test(source)) source = tryResolve(source, options) || source;
|
|
863
|
-
const ext = extname$1(source);
|
|
864
|
-
const isDir = _isDirectory(resolve$1(options.cwd, source)) ?? (!ext || ext === basename$1(source));
|
|
865
|
-
const cwd = resolve$1(options.cwd, isDir ? source : dirname$1(source));
|
|
866
|
-
if (isDir) source = options.configFile;
|
|
867
|
-
const res = {
|
|
868
|
-
config: void 0,
|
|
869
|
-
configFile: void 0,
|
|
870
|
-
cwd,
|
|
871
|
-
source,
|
|
872
|
-
sourceOptions
|
|
873
|
-
};
|
|
874
|
-
res.configFile = tryResolve(resolve$1(cwd, source), options) || tryResolve(resolve$1(cwd, ".config", source.replace(/\.config$/, "")), options) || tryResolve(resolve$1(cwd, ".config", source), options) || source;
|
|
875
|
-
if (!existsSync(res.configFile)) return res;
|
|
876
|
-
res._configFile = res.configFile;
|
|
877
|
-
const configFileExt = extname$1(res.configFile) || "";
|
|
878
|
-
if (configFileExt in ASYNC_LOADERS) res.config = (await ASYNC_LOADERS[configFileExt]())(await readFile(res.configFile, "utf8"));
|
|
879
|
-
else {
|
|
880
|
-
const _resolveModule = options.resolveModule || ((mod) => mod.default || mod);
|
|
881
|
-
if (options.import) res.config = _resolveModule(await options.import(res.configFile));
|
|
882
|
-
else {
|
|
883
|
-
const _configURL = pathToFileURL(res.configFile);
|
|
884
|
-
_configURL.search = `_${++importCounter}`;
|
|
885
|
-
res.config = await import(_configURL.href).then(_resolveModule, async (error) => {
|
|
886
|
-
const { createJiti } = await import("jiti").catch(() => {
|
|
887
|
-
throw new Error(`Failed to load config file \`${res.configFile}\`: ${error?.message}. Hint install \`jiti\` for compatibility.`, { cause: error });
|
|
888
|
-
});
|
|
889
|
-
const jiti = createJiti(join$1(options.cwd || ".", options.configFile || "/"), {
|
|
890
|
-
interopDefault: true,
|
|
891
|
-
moduleCache: false,
|
|
892
|
-
extensions: [...SUPPORTED_EXTENSIONS],
|
|
893
|
-
...options.jitiOptions
|
|
894
|
-
});
|
|
895
|
-
options.import = (id) => jiti.import(id);
|
|
896
|
-
return _resolveModule(await options.import(res.configFile));
|
|
897
|
-
});
|
|
898
|
-
}
|
|
899
|
-
}
|
|
900
|
-
if (typeof res.config === "function") res.config = await res.config(options.context);
|
|
901
|
-
if (res.config && typeof res.config === "object" && !Array.isArray(res.config) && !Object.isExtensible(res.config)) res.config = { ...res.config };
|
|
902
|
-
const envConfigs = (Array.isArray(options.envName) ? options.envName : [options.envName]).filter(Boolean).reverse().flatMap((envName) => [res.config.$env?.[envName], res.config["$" + envName]]).filter((c) => c && Object.keys(c).length > 0);
|
|
903
|
-
if (envConfigs.length > 0) res.config = (options.envMerger || _merger)({}, ...envConfigs, res.config);
|
|
904
|
-
res.meta = defu(res.sourceOptions.meta, res.config.$meta);
|
|
905
|
-
delete res.config.$meta;
|
|
906
|
-
if (res.sourceOptions.overrides) res.config = _merger(res.sourceOptions.overrides, res.config);
|
|
907
|
-
res.configFile = _normalize(res.configFile);
|
|
908
|
-
res.source = _normalize(res.source);
|
|
909
|
-
return res;
|
|
910
|
-
}
|
|
911
|
-
async function validateConfig(config, schema) {
|
|
912
|
-
if (typeof schema?.["~standard"]?.validate !== "function") throw new TypeError("Invalid `schema` option: expected a Standard Schema (https://standardschema.dev).");
|
|
913
|
-
const result = await schema["~standard"].validate(config);
|
|
914
|
-
if (result.issues) {
|
|
915
|
-
const messages = result.issues.map((issue) => {
|
|
916
|
-
const path = issue.path?.map((p) => String(typeof p === "object" ? p.key : p)).join(".");
|
|
917
|
-
return ` - ${path ? `${path}: ` : ""}${issue.message}`;
|
|
918
|
-
});
|
|
919
|
-
throw new Error(`Config validation failed (${schema["~standard"].vendor}):\n${messages.join("\n")}`, { cause: result.issues });
|
|
920
|
-
}
|
|
921
|
-
return result.value;
|
|
922
|
-
}
|
|
923
|
-
function tryResolve(id, options) {
|
|
924
|
-
const res = resolveModulePath(id, {
|
|
925
|
-
try: true,
|
|
926
|
-
from: pathToFileURL(join$1(options.cwd || ".", options.configFile || "/")),
|
|
927
|
-
suffixes: ["", "/index"],
|
|
928
|
-
extensions: SUPPORTED_EXTENSIONS,
|
|
929
|
-
cache: false
|
|
930
|
-
});
|
|
931
|
-
return res ? normalize$1(res) : void 0;
|
|
932
|
-
}
|
|
933
|
-
function _isDirectory(path) {
|
|
934
|
-
try {
|
|
935
|
-
return statSync(path).isDirectory();
|
|
936
|
-
} catch {
|
|
937
|
-
return null;
|
|
938
|
-
}
|
|
939
|
-
}
|
|
940
|
-
//#endregion
|
|
941
|
-
//#region src/cli/block-config-schema.ts
|
|
942
|
-
/**
|
|
943
|
-
* `blocks.<name>.values`: table to column to label to an app value, a list of
|
|
944
|
-
* app values, or `null`. The module context checks the names.
|
|
945
|
-
*/
|
|
946
|
-
const valueMapsSchema = record(string(), record(string(), record(string(), nullable(union([string(), array(string())])))));
|
|
947
|
-
/**
|
|
948
|
-
* `records.<type>.permissions`: action to a key, or to `{ key, rows, owner,
|
|
949
|
-
* also }`. The subject registry checks the names.
|
|
950
|
-
*/
|
|
951
|
-
const subjectPermissionsSchema = record(string(), union([string(), strictObject({
|
|
952
|
-
key: optional(string()),
|
|
953
|
-
rows: optional(string()),
|
|
954
|
-
owner: optional(string()),
|
|
955
|
-
also: optional(string())
|
|
956
|
-
})]));
|
|
957
|
-
/** `records.<type>.search`. The subject registry checks the names. */
|
|
958
|
-
const subjectSearchSchema = strictObject({
|
|
959
|
-
title: optional(string()),
|
|
960
|
-
body: optional(array(string())),
|
|
961
|
-
description: optional(string()),
|
|
962
|
-
exclude: optional(string()),
|
|
963
|
-
from: optional(strictObject({
|
|
964
|
-
view: string(),
|
|
965
|
-
key: string()
|
|
966
|
-
})),
|
|
967
|
-
watch: optional(array(strictObject({
|
|
968
|
-
table: string(),
|
|
969
|
-
key: string(),
|
|
970
|
-
via: optional(string()),
|
|
971
|
-
through: optional(array(strictObject({
|
|
972
|
-
table: string(),
|
|
973
|
-
from: string(),
|
|
974
|
-
to: string()
|
|
975
|
-
})))
|
|
976
|
-
})))
|
|
977
|
-
});
|
|
978
|
-
//#endregion
|
|
979
|
-
//#region src/cli/config-moved.ts
|
|
980
|
-
/** Where each top-level key of a 0.14 config moved in 0.15. */
|
|
981
|
-
const MOVED_KEYS = new Map([...Object.entries(CONFIG_GROUPS).flatMap(([group, keys]) => keys.filter((key) => key !== "tables").map((key) => [key, `${group}.${key}`])), ...RENAMED_CONFIG_KEYS.map(([grouped, flat]) => [flat, grouped])]);
|
|
982
|
-
const TABLES_REMOVED = "removed in 0.28: tables are SQL in `supabase/schemas` with `@bsb` tags in the table comment; run `better-supabase migrate schema-first`";
|
|
983
|
-
/** `sql` keys that moved before 0.15, with where they went. */
|
|
984
|
-
const MOVED_SQL_KEYS = [["modules", "moved to the top-level `blocks` key in 0.9; run `better-supabase codemod 0.9`"], ["naming", "`sql.naming.tenant` moved to `blocks.memberships.names.organization`"]];
|
|
985
|
-
/** Moved `sql` keys in one config block, under `sql` or `database.sql`. */
|
|
986
|
-
function movedSqlIssues(prefix, block) {
|
|
987
|
-
if (!isRecord(block)) return [];
|
|
988
|
-
const database = block["database"];
|
|
989
|
-
return [["sql", block["sql"]], ["database.sql", isRecord(database) ? database["sql"] : void 0]].flatMap(([path, sql]) => isRecord(sql) ? MOVED_SQL_KEYS.filter(([key]) => key in sql).map(([key, message]) => `${prefix}${path}.${key}: ${message}`) : []);
|
|
990
|
-
}
|
|
991
|
-
const SCAFFOLD_REMOVED = "removed in 0.15 with `better-supabase scaffold api`; delete it. `defineApi` includes every table and block instance, and `createOrpc(betterSupabase).router(api)` serves it: https://bettersupabase.com/docs/frameworks/orpc#serve-the-api";
|
|
992
|
-
/** Top-level keys 0.15 removed, with what replaces them. */
|
|
993
|
-
const REMOVED_KEYS = /* @__PURE__ */ new Map([
|
|
994
|
-
["plugins", "removed in 0.15: the updated-at, created-by, trash and memberships blocks carry these columns now; run `better-supabase codemod 0.15`"],
|
|
995
|
-
["scaffold", SCAFFOLD_REMOVED],
|
|
996
|
-
["tables", TABLES_REMOVED],
|
|
997
|
-
["appTables", TABLES_REMOVED],
|
|
998
|
-
["records", "renamed to `subjects` in 0.28; rename the key. A table's subject now comes from `@bsb subject` in its comment"]
|
|
999
|
-
]);
|
|
1000
|
-
const RECORD_TYPES_MOVED = "renamed to `gen.recordTypes` in 0.15; run `better-supabase codemod 0.15`";
|
|
1001
|
-
/** Keys of the flat 0.14 config in one config block. */
|
|
1002
|
-
function movedGroupIssues(prefix, block) {
|
|
1003
|
-
if (!isRecord(block)) return [];
|
|
1004
|
-
const gen = block["gen"];
|
|
1005
|
-
const tooling = block["tooling"];
|
|
1006
|
-
const genIssues = isRecord(gen) && "generateFeatures" in gen ? [`${prefix}gen.generateFeatures: ${RECORD_TYPES_MOVED}`] : [];
|
|
1007
|
-
const toolingIssues = isRecord(tooling) && "scaffold" in tooling ? [`${prefix}tooling.scaffold: ${SCAFFOLD_REMOVED}`] : [];
|
|
1008
|
-
return Object.keys(block).flatMap((key) => {
|
|
1009
|
-
if (key === "generateFeatures") return [`${prefix}${key}: ${RECORD_TYPES_MOVED}`];
|
|
1010
|
-
if (key === "gen") return genIssues;
|
|
1011
|
-
if (key === "tooling") return toolingIssues;
|
|
1012
|
-
const removed = REMOVED_KEYS.get(key);
|
|
1013
|
-
if (removed !== void 0) return [`${prefix}${key}: ${removed}`];
|
|
1014
|
-
const moved = MOVED_KEYS.get(key);
|
|
1015
|
-
return moved === void 0 ? [] : [`${prefix}${key}: moved to \`${moved}\` in 0.15; run \`better-supabase codemod 0.15\``];
|
|
1016
|
-
});
|
|
1017
|
-
}
|
|
1018
|
-
/**
|
|
1019
|
-
* Keys of the flat 0.14 config, and `sql` keys moved before it, in the config
|
|
1020
|
-
* or one of its environment blocks, each as `path: message`.
|
|
1021
|
-
*/
|
|
1022
|
-
function movedKeyIssues(value) {
|
|
1023
|
-
if (!isRecord(value)) return [];
|
|
1024
|
-
const blocks = [["", value]];
|
|
1025
|
-
for (const [key, block] of Object.entries(value)) if (key === "$env" && isRecord(block)) for (const [name, env] of Object.entries(block)) blocks.push([`$env.${name}.`, env]);
|
|
1026
|
-
else if (key.startsWith("$")) blocks.push([`${key}.`, block]);
|
|
1027
|
-
return [...blocks.flatMap(([prefix, block]) => movedSqlIssues(prefix, block)), ...blocks.flatMap(([prefix, block]) => movedGroupIssues(prefix, block))];
|
|
1028
|
-
}
|
|
1029
|
-
//#endregion
|
|
1030
|
-
//#region src/cli/names.ts
|
|
1031
|
-
const HOOK_FRAMEWORKS = [
|
|
1032
|
-
"react",
|
|
1033
|
-
"vue",
|
|
1034
|
-
"svelte",
|
|
1035
|
-
"solid"
|
|
1036
|
-
];
|
|
1037
|
-
const INTEGRATIONS = INTEGRATION_NAMES;
|
|
1038
|
-
const isGenTask = (value) => GEN_TASKS.some((task) => task === value);
|
|
1039
|
-
//#endregion
|
|
1040
|
-
//#region src/cli/powersync/config-schema.ts
|
|
1041
|
-
/** `gen.powersync`. */
|
|
1042
|
-
const powersyncGenSchema = strictObject({
|
|
1043
|
-
instances: pipe(array(string()), minLength(1, "lists at least one block instance")),
|
|
1044
|
-
out: optional(string()),
|
|
1045
|
-
import: optional(string())
|
|
1046
|
-
});
|
|
1047
|
-
//#endregion
|
|
1048
|
-
//#region src/cli/config-schema.ts
|
|
1049
|
-
const strings = array(string());
|
|
1050
|
-
const stringRecord = record(string(), string());
|
|
1051
|
-
const privilege = pipe(string(), regex(/^(?: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*\))$/, "Use select, insert, update or delete, name columns such as \"update(title, body)\", or exclude them from every column with \"select(*, -secret)\""));
|
|
1052
|
-
const privileges = array(privilege);
|
|
1053
|
-
const triggerValue = union([string(), strictObject({
|
|
1054
|
-
from: string(),
|
|
1055
|
-
via: lazy(() => triggerValue),
|
|
1056
|
-
select: string(),
|
|
1057
|
-
key: exactOptional(string())
|
|
1058
|
-
})]);
|
|
1059
|
-
const triggerValues = record(string(), triggerValue);
|
|
1060
|
-
const isGenerator = (value) => typeof value === "object" && value !== null && "name" in value && typeof value.name === "string" && "generate" in value && typeof value.generate === "function";
|
|
1061
|
-
const generator = custom(isGenerator, "must be a generator: { name, generate(input) }");
|
|
1062
|
-
/**
|
|
1063
|
-
* The top level of `better-supabase.config.*`. It rejects unknown keys and
|
|
1064
|
-
* checks the leaves a typo or an old value breaks; nested objects the library
|
|
1065
|
-
* reads loosely stay loose.
|
|
1066
|
-
*/
|
|
1067
|
-
const entityName = pipe(string(), regex(/^[a-z][a-z0-9_]{0,40}$/, "an entity name is lowercase letters, digits and underscores"));
|
|
1068
|
-
const ADOPT_REMOVED = "ownership \"adopt\" was removed: a block now leaves alone every table your schema already has. Delete the key, or run `better-supabase codemod`.";
|
|
1069
|
-
const instanceKeys = {
|
|
1070
|
-
block: optional(string()),
|
|
1071
|
-
on: optional(union([strings, record(string(), record(string(), unknown()))])),
|
|
1072
|
-
uses: optional(stringRecord),
|
|
1073
|
-
tables: optional(record(string(), nullable(string())))
|
|
1074
|
-
};
|
|
1075
|
-
const blockEntries = {
|
|
1076
|
-
...instanceKeys,
|
|
1077
|
-
ownership: optional(picklist(["managed", "custom"], (issue) => issue.input === "adopt" ? ADOPT_REMOVED : issue.message)),
|
|
1078
|
-
schema: optional(string()),
|
|
1079
|
-
columns: optional(record(string(), record(string(), nullable(string())))),
|
|
1080
|
-
values: optional(valueMapsSchema),
|
|
1081
|
-
idType: optional(string()),
|
|
1082
|
-
owner: optional(picklist([
|
|
1083
|
-
"tenant",
|
|
1084
|
-
"user",
|
|
1085
|
-
"none"
|
|
1086
|
-
])),
|
|
1087
|
-
ownTablePolicies: optional(picklist(["block", "app"])),
|
|
1088
|
-
functions: optional(stringRecord),
|
|
1089
|
-
permissions: optional(stringRecord),
|
|
1090
|
-
names: optional(union([entityName, record(string(), union([entityName, strictObject({
|
|
1091
|
-
name: optional(entityName),
|
|
1092
|
-
plural: optional(entityName),
|
|
1093
|
-
url: optional(string()),
|
|
1094
|
-
subject: optional(literal(false))
|
|
1095
|
-
})]))])),
|
|
1096
|
-
options: optional(record(string(), unknown())),
|
|
1097
|
-
callbacks: optional(strictObject({
|
|
1098
|
-
schema: optional(string()),
|
|
1099
|
-
functions: optional(stringRecord)
|
|
1100
|
-
})),
|
|
1101
|
-
events: optional(boolean()),
|
|
1102
|
-
audit: optional(boolean()),
|
|
1103
|
-
api: optional(union([
|
|
1104
|
-
string(),
|
|
1105
|
-
literal(false),
|
|
1106
|
-
strictObject({
|
|
1107
|
-
schema: string(),
|
|
1108
|
-
functions: optional(strings)
|
|
1109
|
-
})
|
|
1110
|
-
]))
|
|
1111
|
-
};
|
|
1112
|
-
const disabledRow = strictObject({
|
|
1113
|
-
table: string(),
|
|
1114
|
-
id: string(),
|
|
1115
|
-
disabledAt: optional(string()),
|
|
1116
|
-
status: optional(string()),
|
|
1117
|
-
active: optional(strings)
|
|
1118
|
-
});
|
|
1119
|
-
const activeTenantSource = union([picklist(["claim", "resolver"]), strictObject({
|
|
1120
|
-
profileColumn: string(),
|
|
1121
|
-
key: optional(string())
|
|
1122
|
-
})]);
|
|
1123
|
-
const permissionsBlock = strictObject({
|
|
1124
|
-
...blockEntries,
|
|
1125
|
-
model: optional(picklist([
|
|
1126
|
-
"roles",
|
|
1127
|
-
"catalog",
|
|
1128
|
-
"provider",
|
|
1129
|
-
"custom"
|
|
1130
|
-
])),
|
|
1131
|
-
roles: optional(record(string(), strings)),
|
|
1132
|
-
functions: optional(strictObject({
|
|
1133
|
-
can: optional(string()),
|
|
1134
|
-
tenantIdsWith: optional(string()),
|
|
1135
|
-
isPlatform: optional(string()),
|
|
1136
|
-
canUser: optional(string()),
|
|
1137
|
-
canAssign: optional(string()),
|
|
1138
|
-
canAssignFor: optional(string()),
|
|
1139
|
-
permissionClaims: optional(string())
|
|
1140
|
-
})),
|
|
1141
|
-
platformClaim: optional(string()),
|
|
1142
|
-
scopes: optional(record(string(), strings)),
|
|
1143
|
-
disabled: optional(strictObject({
|
|
1144
|
-
tenant: optional(union([string(), disabledRow])),
|
|
1145
|
-
user: optional(union([string(), disabledRow])),
|
|
1146
|
-
userKey: optional(string())
|
|
1147
|
-
})),
|
|
1148
|
-
activeTenant: optional(activeTenantSource)
|
|
1149
|
-
});
|
|
1150
|
-
/**
|
|
1151
|
-
* `blocks`: a list of names, or each block's config. The schema checks the keys
|
|
1152
|
-
* every block shares; `resolveConfig` checks the tables, columns, functions,
|
|
1153
|
-
* actions, hooks and entities each module declares.
|
|
1154
|
-
*/
|
|
1155
|
-
const blocksSchema = lazy((input) => Array.isArray(input) ? strings : objectWithRest({ permissions: optional(permissionsBlock) }, strictObject(blockEntries)));
|
|
1156
|
-
const scopeName = pipe(string(), regex(/^[a-z][a-z0-9_]*$/, "Use lower case letters, digits and _"));
|
|
1157
|
-
const membershipScope = union([strictObject({ column: string() }), strictObject({ value: string() })]);
|
|
1158
|
-
const authorization = strictObject({
|
|
1159
|
-
apiVersion: literal(1),
|
|
1160
|
-
name: string(),
|
|
1161
|
-
scopes: array(strictObject({
|
|
1162
|
-
name: scopeName,
|
|
1163
|
-
idType: optional(picklist(SCOPE_ID_TYPES)),
|
|
1164
|
-
parent: optional(string())
|
|
1165
|
-
})),
|
|
1166
|
-
tenantScope: scopeName,
|
|
1167
|
-
functions: strictObject({
|
|
1168
|
-
idsWith: string(),
|
|
1169
|
-
isPlatform: string(),
|
|
1170
|
-
idsWithFor: optional(string()),
|
|
1171
|
-
isPlatformFor: optional(string()),
|
|
1172
|
-
memberIds: optional(string()),
|
|
1173
|
-
memberIdsFor: optional(string()),
|
|
1174
|
-
teamIdsOf: optional(string()),
|
|
1175
|
-
canAssign: optional(string()),
|
|
1176
|
-
canAssignFor: optional(string()),
|
|
1177
|
-
permissionsFor: optional(string()),
|
|
1178
|
-
canApprove: optional(string()),
|
|
1179
|
-
isApprover: optional(string()),
|
|
1180
|
-
holdersOf: optional(string()),
|
|
1181
|
-
actorMayWrite: optional(string()),
|
|
1182
|
-
permitted: optional(string()),
|
|
1183
|
-
rowsWith: optional(string()),
|
|
1184
|
-
rowsWithFor: optional(string()),
|
|
1185
|
-
portalSubjects: optional(string()),
|
|
1186
|
-
portalParties: optional(string())
|
|
1187
|
-
}),
|
|
1188
|
-
requires: optional(array(strictObject({
|
|
1189
|
-
function: string(),
|
|
1190
|
-
args: optional(string()),
|
|
1191
|
-
role: string()
|
|
1192
|
-
}))),
|
|
1193
|
-
permissions: optional(array(strictObject({
|
|
1194
|
-
key: string(),
|
|
1195
|
-
sqlComplete: optional(boolean()),
|
|
1196
|
-
scopes: optional(strings)
|
|
1197
|
-
}))),
|
|
1198
|
-
operations: optional(record(string(), strictObject({
|
|
1199
|
-
permission: pipe(string(), minLength(1)),
|
|
1200
|
-
meta: optional(strictObject({
|
|
1201
|
-
risk: optional(picklist([
|
|
1202
|
-
"low",
|
|
1203
|
-
"medium",
|
|
1204
|
-
"high"
|
|
1205
|
-
])),
|
|
1206
|
-
effects: optional(array(picklist([
|
|
1207
|
-
"read",
|
|
1208
|
-
"write",
|
|
1209
|
-
"delete",
|
|
1210
|
-
"external"
|
|
1211
|
-
]))),
|
|
1212
|
-
title: optional(string())
|
|
1213
|
-
}))
|
|
1214
|
-
}))),
|
|
1215
|
-
memberships: optional(array(strictObject({
|
|
1216
|
-
table: string(),
|
|
1217
|
-
userColumn: string(),
|
|
1218
|
-
scope: membershipScope,
|
|
1219
|
-
idColumn: string(),
|
|
1220
|
-
rolesTable: optional(string())
|
|
1221
|
-
}))),
|
|
1222
|
-
suspension: optional(strictObject({
|
|
1223
|
-
user: optional(disabledRow),
|
|
1224
|
-
tenant: optional(disabledRow)
|
|
1225
|
-
})),
|
|
1226
|
-
roleSources: optional(array(strictObject({
|
|
1227
|
-
table: string(),
|
|
1228
|
-
role: strictObject({
|
|
1229
|
-
column: string(),
|
|
1230
|
-
through: strictObject({
|
|
1231
|
-
table: string(),
|
|
1232
|
-
id: string(),
|
|
1233
|
-
column: string()
|
|
1234
|
-
})
|
|
1235
|
-
})
|
|
1236
|
-
}))),
|
|
1237
|
-
decidingColumns: optional(array(pipe(string(), regex(/^[A-Za-z_][\w$]*\.[A-Za-z_][\w$]*\.[A-Za-z_][\w$]*$/, "Use schema.table.column")))),
|
|
1238
|
-
tokenHook: optional(strictObject({
|
|
1239
|
-
function: string(),
|
|
1240
|
-
tenantClaim: optional(string()),
|
|
1241
|
-
activeOrganizationFrom: optional(activeTenantSource),
|
|
1242
|
-
ownedClaims: pipe(strings, minLength(1, "List at least one claim")),
|
|
1243
|
-
registeredClaims: optional(array(strictObject({
|
|
1244
|
-
name: string(),
|
|
1245
|
-
function: string()
|
|
1246
|
-
}))),
|
|
1247
|
-
budget: optional(strictObject({
|
|
1248
|
-
claims: strings,
|
|
1249
|
-
bytes: pipe(number(), integer("Use a whole number of bytes"), minValue(1, "Use at least 1 byte")),
|
|
1250
|
-
truncatedClaim: optional(string())
|
|
1251
|
-
})),
|
|
1252
|
-
markers: optional(strictObject({
|
|
1253
|
-
hook: optional(string()),
|
|
1254
|
-
grants: optional(string())
|
|
1255
|
-
})),
|
|
1256
|
-
grantsCommand: optional(string())
|
|
1257
|
-
})),
|
|
1258
|
-
delegation: optional(strictObject({ scopes: optional(record(string(), strings)) })),
|
|
1259
|
-
approvals: optional(strictObject({ distinctApprover: optional(boolean()) })),
|
|
1260
|
-
problems: optional(strings)
|
|
1261
|
-
});
|
|
1262
|
-
const checkedAuthorization = pipe(authorization, rawCheck(({ dataset, addIssue }) => {
|
|
1263
|
-
if (!dataset.typed) return;
|
|
1264
|
-
for (const problem of scopeProblems(dataset.value)) addIssue({ message: problem });
|
|
1265
|
-
}));
|
|
1266
|
-
const jsonSchema$1 = record(string(), unknown());
|
|
1267
|
-
const presetInstance = strictObject({
|
|
1268
|
-
...instanceKeys,
|
|
1269
|
-
names: optional(stringRecord),
|
|
1270
|
-
options: optional(jsonSchema$1)
|
|
1271
|
-
});
|
|
1272
|
-
const onDelete = optional(picklist(APP_ON_DELETE_ACTIONS));
|
|
1273
|
-
const positiveInteger = pipe(number(), integer(), minValue(1));
|
|
1274
|
-
const bucket = strictObject({
|
|
1275
|
-
id: optional(string()),
|
|
1276
|
-
public: optional(boolean()),
|
|
1277
|
-
path: union([string(), pipe(strings, minLength(1))]),
|
|
1278
|
-
policy: optional(union([picklist([
|
|
1279
|
-
"tenant",
|
|
1280
|
-
"owner",
|
|
1281
|
-
"public",
|
|
1282
|
-
"none"
|
|
1283
|
-
]), strictObject({
|
|
1284
|
-
access: strictObject({
|
|
1285
|
-
read: string(),
|
|
1286
|
-
list: optional(string()),
|
|
1287
|
-
write: string(),
|
|
1288
|
-
delete: optional(string())
|
|
1289
|
-
}),
|
|
1290
|
-
scope: optional(string()),
|
|
1291
|
-
segment: optional(positiveInteger),
|
|
1292
|
-
sql: optional(union([literal("provider"), strictObject({
|
|
1293
|
-
idsWith: string(),
|
|
1294
|
-
isPlatform: string()
|
|
1295
|
-
})]))
|
|
1296
|
-
})])),
|
|
1297
|
-
fileSizeLimit: optional(string()),
|
|
1298
|
-
allowedMimeTypes: optional(strings),
|
|
1299
|
-
versioning: optional(boolean()),
|
|
1300
|
-
lifecycle: optional(strictObject({ rules: pipe(array(strictObject({
|
|
1301
|
-
id: optional(string()),
|
|
1302
|
-
status: optional(picklist(["Enabled", "Disabled"])),
|
|
1303
|
-
noncurrentVersionExpiration: strictObject({
|
|
1304
|
-
noncurrentDays: positiveInteger,
|
|
1305
|
-
newerNoncurrentVersions: optional(pipe(number(), integer(), minValue(1), maxValue(100)))
|
|
1306
|
-
})
|
|
1307
|
-
})), minLength(1), maxLength(1e3)) }))
|
|
1308
|
-
});
|
|
1309
|
-
const appTableEntries = {
|
|
1310
|
-
columns: optional(record(string(), strictObject({
|
|
1311
|
-
type: picklist(APP_COLUMN_TYPES),
|
|
1312
|
-
nullable: optional(boolean()),
|
|
1313
|
-
default: optional(string()),
|
|
1314
|
-
unique: optional(boolean()),
|
|
1315
|
-
references: optional(union([strictObject({
|
|
1316
|
-
table: string(),
|
|
1317
|
-
onDelete
|
|
1318
|
-
}), strictObject({
|
|
1319
|
-
block: string(),
|
|
1320
|
-
table: string(),
|
|
1321
|
-
onDelete
|
|
1322
|
-
})])),
|
|
1323
|
-
format: optional(picklist(APP_COLUMN_FORMATS)),
|
|
1324
|
-
options: optional(array(string())),
|
|
1325
|
-
min: optional(number()),
|
|
1326
|
-
max: optional(number()),
|
|
1327
|
-
comment: optional(string()),
|
|
1328
|
-
identity: optional(boolean()),
|
|
1329
|
-
access: optional(picklist(APP_COLUMN_ACCESS)),
|
|
1330
|
-
encrypted: optional(boolean())
|
|
1331
|
-
}))),
|
|
1332
|
-
timestamps: optional(boolean()),
|
|
1333
|
-
id: optional(picklist(["uuid", "bigint"])),
|
|
1334
|
-
unique: optional(array(array(string()))),
|
|
1335
|
-
indexes: optional(array(array(string()))),
|
|
1336
|
-
comment: optional(string()),
|
|
1337
|
-
auditReads: optional(boolean()),
|
|
1338
|
-
subject: optional(strictObject({
|
|
1339
|
-
type: string(),
|
|
1340
|
-
title: optional(string()),
|
|
1341
|
-
url: optional(string()),
|
|
1342
|
-
search: optional(strictObject({
|
|
1343
|
-
title: optional(string()),
|
|
1344
|
-
body: optional(array(string()))
|
|
1345
|
-
})),
|
|
1346
|
-
permissions: optional(record(string(), string())),
|
|
1347
|
-
rank: optional(union([literal(true), strictObject({ group: optional(string()) })])),
|
|
1348
|
-
softDelete: optional(boolean()),
|
|
1349
|
-
versions: optional(union([literal(true), strictObject({
|
|
1350
|
-
columns: optional(strings),
|
|
1351
|
-
auto: optional(boolean())
|
|
1352
|
-
})]))
|
|
1353
|
-
})),
|
|
1354
|
-
rollups: optional(record(string(), strictObject({
|
|
1355
|
-
table: string(),
|
|
1356
|
-
via: string(),
|
|
1357
|
-
aggregate: picklist(APP_ROLLUP_AGGREGATES),
|
|
1358
|
-
column: optional(string()),
|
|
1359
|
-
where: optional(strictObject({
|
|
1360
|
-
column: string(),
|
|
1361
|
-
equals: string()
|
|
1362
|
-
}))
|
|
1363
|
-
}))),
|
|
1364
|
-
lookups: optional(record(string(), strictObject({
|
|
1365
|
-
via: string(),
|
|
1366
|
-
column: string()
|
|
1367
|
-
}))),
|
|
1368
|
-
events: optional(union([literal(true), strictObject({
|
|
1369
|
-
on: optional(array(picklist(APP_TABLE_EVENT_KINDS))),
|
|
1370
|
-
include: optional(strings)
|
|
1371
|
-
})]))
|
|
1372
|
-
};
|
|
1373
|
-
const appTableOwner = optional(picklist([
|
|
1374
|
-
"inherit",
|
|
1375
|
-
"user",
|
|
1376
|
-
"none"
|
|
1377
|
-
]));
|
|
1378
|
-
const appTables = record(string(), strictObject({
|
|
1379
|
-
...appTableEntries,
|
|
1380
|
-
owner: appTableOwner
|
|
1381
|
-
}));
|
|
1382
|
-
/** A `/create` design keeps `scope` until designs move to the config shape. */
|
|
1383
|
-
const designAppTables = record(string(), strictObject({
|
|
1384
|
-
...appTableEntries,
|
|
1385
|
-
scope: appTableOwner
|
|
1386
|
-
}));
|
|
1387
|
-
const FLAT = {
|
|
1388
|
-
source: optional(strictObject({
|
|
1389
|
-
dbUrl: optional(string()),
|
|
1390
|
-
projectRef: optional(string()),
|
|
1391
|
-
accessToken: optional(string()),
|
|
1392
|
-
snapshot: optional(string()),
|
|
1393
|
-
lite: optional(boolean())
|
|
1394
|
-
})),
|
|
1395
|
-
schemas: optional(strings),
|
|
1396
|
-
casing: optional(picklist(["snake", "camel"])),
|
|
1397
|
-
tables: optional(record(string(), strictObject({
|
|
1398
|
-
casing: optional(picklist(["snake", "camel"])),
|
|
1399
|
-
exclude: optional(boolean()),
|
|
1400
|
-
serviceRole: optional(boolean()),
|
|
1401
|
-
relations: optional(stringRecord),
|
|
1402
|
-
insertOptional: optional(strings)
|
|
1403
|
-
}))),
|
|
1404
|
-
output: optional(string()),
|
|
1405
|
-
postgrestVersion: optional(string()),
|
|
1406
|
-
recordTypes: optional(boolean()),
|
|
1407
|
-
hooks: optional(union([picklist(HOOK_FRAMEWORKS), literal(false)])),
|
|
1408
|
-
json: optional(record(string(), union([strictObject({
|
|
1409
|
-
import: string(),
|
|
1410
|
-
schema: optional(jsonSchema$1)
|
|
1411
|
-
}), strictObject({
|
|
1412
|
-
type: string(),
|
|
1413
|
-
schema: optional(jsonSchema$1)
|
|
1414
|
-
})], "Use { import } or { type }, with an optional schema"))),
|
|
1415
|
-
codecs: optional(strictObject({
|
|
1416
|
-
timestamptz: optional(picklist([
|
|
1417
|
-
"string",
|
|
1418
|
-
"instant",
|
|
1419
|
-
"utc"
|
|
1420
|
-
])),
|
|
1421
|
-
int8: optional(picklist([
|
|
1422
|
-
"number",
|
|
1423
|
-
"string",
|
|
1424
|
-
"bigint"
|
|
1425
|
-
])),
|
|
1426
|
-
numeric: optional(picklist(["number", "string"]))
|
|
1427
|
-
})),
|
|
1428
|
-
relations: optional(strictObject({ nullableUnderRls: optional(boolean()) })),
|
|
1429
|
-
sensitive: optional(strings),
|
|
1430
|
-
storagePaths: optional(stringRecord),
|
|
1431
|
-
functions: optional(record(string(), strictObject({ notNull: optional(union([literal(true), strings])) }))),
|
|
1432
|
-
expose: optional(record(string(), union([
|
|
1433
|
-
privileges,
|
|
1434
|
-
strictObject({
|
|
1435
|
-
anon: optional(privileges),
|
|
1436
|
-
authenticated: optional(privileges),
|
|
1437
|
-
serviceRole: optional(privileges)
|
|
1438
|
-
}),
|
|
1439
|
-
strictObject({
|
|
1440
|
-
execute: array(picklist(["anon", "authenticated"])),
|
|
1441
|
-
serviceRole: optional(boolean())
|
|
1442
|
-
})
|
|
1443
|
-
]))),
|
|
1444
|
-
readSets: optional(strings),
|
|
1445
|
-
generators: optional(array(generator)),
|
|
1446
|
-
organization: optional(strictObject({
|
|
1447
|
-
column: optional(string()),
|
|
1448
|
-
onMissing: optional(picklist(["error", "skip"])),
|
|
1449
|
-
header: optional(string())
|
|
1450
|
-
})),
|
|
1451
|
-
claims: optional(strictObject({
|
|
1452
|
-
scope: optional(string()),
|
|
1453
|
-
features: optional(string()),
|
|
1454
|
-
memberships: optional(string())
|
|
1455
|
-
})),
|
|
1456
|
-
buckets: optional(record(string(), bucket)),
|
|
1457
|
-
topics: optional(stringRecord),
|
|
1458
|
-
realtime: optional(strictObject({
|
|
1459
|
-
tables: optional(strings),
|
|
1460
|
-
global: optional(strings),
|
|
1461
|
-
users: optional(stringRecord),
|
|
1462
|
-
policies: optional(strictObject({
|
|
1463
|
-
from: strings,
|
|
1464
|
-
output: string()
|
|
1465
|
-
})),
|
|
1466
|
-
triggers: optional(array(strictObject({
|
|
1467
|
-
topic: string(),
|
|
1468
|
-
table: string(),
|
|
1469
|
-
values: optional(triggerValues),
|
|
1470
|
-
events: optional(array(picklist([
|
|
1471
|
-
"insert",
|
|
1472
|
-
"update",
|
|
1473
|
-
"delete"
|
|
1474
|
-
]))),
|
|
1475
|
-
event: optional(union([string(), strictObject({
|
|
1476
|
-
insert: optional(string()),
|
|
1477
|
-
update: optional(string()),
|
|
1478
|
-
delete: optional(string())
|
|
1479
|
-
})])),
|
|
1480
|
-
payload: optional(union([picklist(["keys", "row"]), record(string(), union([triggerValue, strictObject({ sql: string() })]))])),
|
|
1481
|
-
topics: optional(array(strictObject({
|
|
1482
|
-
topic: string(),
|
|
1483
|
-
values: optional(triggerValues)
|
|
1484
|
-
}))),
|
|
1485
|
-
functionSchema: optional(string()),
|
|
1486
|
-
when: optional(strictObject({ changed: pipe(array(string()), minLength(1)) }))
|
|
1487
|
-
})))
|
|
1488
|
-
})),
|
|
1489
|
-
entitlements: optional(strictObject({
|
|
1490
|
-
customer: optional(string()),
|
|
1491
|
-
key: optional(string()),
|
|
1492
|
-
memberships: optional(picklist(["tenant", "provider"])),
|
|
1493
|
-
source: optional(union([picklist(["stripe-sync", "custom"]), strictObject({ plans: strictObject({
|
|
1494
|
-
subscriptions: strictObject({
|
|
1495
|
-
table: string(),
|
|
1496
|
-
tenant: string(),
|
|
1497
|
-
plan: string(),
|
|
1498
|
-
status: optional(string()),
|
|
1499
|
-
activeStatuses: optional(strings)
|
|
1500
|
-
}),
|
|
1501
|
-
features: strictObject({
|
|
1502
|
-
table: string(),
|
|
1503
|
-
plan: string(),
|
|
1504
|
-
feature: string(),
|
|
1505
|
-
included: optional(string()),
|
|
1506
|
-
value: optional(string())
|
|
1507
|
-
})
|
|
1508
|
-
}) })])),
|
|
1509
|
-
claim: optional(union([literal(false), strictObject({
|
|
1510
|
-
maxTenants: optional(number()),
|
|
1511
|
-
keys: optional(stringRecord)
|
|
1512
|
-
})]))
|
|
1513
|
-
})),
|
|
1514
|
-
authorization: optional(checkedAuthorization),
|
|
1515
|
-
vectorSearch: optional(record(string(), union([string(), strictObject({
|
|
1516
|
-
column: string(),
|
|
1517
|
-
distance: optional(picklist([
|
|
1518
|
-
"cosine",
|
|
1519
|
-
"l2",
|
|
1520
|
-
"inner_product"
|
|
1521
|
-
])),
|
|
1522
|
-
type: optional(picklist(["vector", "halfvec"])),
|
|
1523
|
-
key: optional(string()),
|
|
1524
|
-
hybrid: optional(strictObject({
|
|
1525
|
-
tsvector: string(),
|
|
1526
|
-
config: optional(string()),
|
|
1527
|
-
k: optional(number())
|
|
1528
|
-
})),
|
|
1529
|
-
boost: optional(string()),
|
|
1530
|
-
prefilter: optional(strings),
|
|
1531
|
-
predicate: optional(string()),
|
|
1532
|
-
boostMode: optional(picklist(["multiply", "add"])),
|
|
1533
|
-
order: optional(string())
|
|
1534
|
-
})]))),
|
|
1535
|
-
subjects: optional(record(pipe(string(), regex(/^[a-z][a-z0-9_-]{0,62}$/, "a subject type is lowercase letters, digits, hyphens and underscores")), strictObject({
|
|
1536
|
-
table: string(),
|
|
1537
|
-
id: optional(string()),
|
|
1538
|
-
idType: optional(string()),
|
|
1539
|
-
tenant: optional(union([string(), literal(false)])),
|
|
1540
|
-
title: optional(string()),
|
|
1541
|
-
url: optional(string()),
|
|
1542
|
-
permissions: optional(subjectPermissionsSchema),
|
|
1543
|
-
scope: optional(string()),
|
|
1544
|
-
cascade: optional(boolean()),
|
|
1545
|
-
deletedAt: optional(string()),
|
|
1546
|
-
search: optional(subjectSearchSchema),
|
|
1547
|
-
rank: optional(strictObject({
|
|
1548
|
-
column: string(),
|
|
1549
|
-
group: optional(string())
|
|
1550
|
-
})),
|
|
1551
|
-
versions: optional(strictObject({
|
|
1552
|
-
columns: strings,
|
|
1553
|
-
auto: boolean()
|
|
1554
|
-
}))
|
|
1555
|
-
}))),
|
|
1556
|
-
appTables: optional(appTables),
|
|
1557
|
-
blocks: optional(blocksSchema),
|
|
1558
|
-
sql: optional(strictObject({
|
|
1559
|
-
workflow: optional(picklist([
|
|
1560
|
-
"pg-delta",
|
|
1561
|
-
"migra",
|
|
1562
|
-
"migrations"
|
|
1563
|
-
])),
|
|
1564
|
-
dir: optional(string()),
|
|
1565
|
-
prefix: optional(string()),
|
|
1566
|
-
testsDir: optional(string()),
|
|
1567
|
-
schema: optional(string()),
|
|
1568
|
-
api: optional(string()),
|
|
1569
|
-
owner: optional(picklist([
|
|
1570
|
-
"tenant",
|
|
1571
|
-
"user",
|
|
1572
|
-
"none"
|
|
1573
|
-
])),
|
|
1574
|
-
ownTablePolicies: optional(picklist(["block", "app"])),
|
|
1575
|
-
tenantColumn: optional(string())
|
|
1576
|
-
})),
|
|
1577
|
-
seed: optional(strictObject({
|
|
1578
|
-
entry: optional(string()),
|
|
1579
|
-
output: optional(string()),
|
|
1580
|
-
perTenant: optional(string())
|
|
1581
|
-
})),
|
|
1582
|
-
openapi: optional(strictObject({
|
|
1583
|
-
entry: optional(string()),
|
|
1584
|
-
output: optional(string())
|
|
1585
|
-
})),
|
|
1586
|
-
specs: optional(strictObject({
|
|
1587
|
-
entry: optional(string()),
|
|
1588
|
-
outputs: optional(array(strictObject({
|
|
1589
|
-
format: pipe(string(), minLength(1)),
|
|
1590
|
-
version: optional(string()),
|
|
1591
|
-
output: optional(string()),
|
|
1592
|
-
overlays: optional(strings),
|
|
1593
|
-
serialize: optional(picklist(["json", "yaml"])),
|
|
1594
|
-
ui: optional(picklist([
|
|
1595
|
-
"scalar",
|
|
1596
|
-
"swagger",
|
|
1597
|
-
"redoc",
|
|
1598
|
-
"elements",
|
|
1599
|
-
"rapidoc"
|
|
1600
|
-
]))
|
|
1601
|
-
}))),
|
|
1602
|
-
failOn: optional(picklist([
|
|
1603
|
-
"error",
|
|
1604
|
-
"warning",
|
|
1605
|
-
"never"
|
|
1606
|
-
])),
|
|
1607
|
-
manifest: optional(string())
|
|
1608
|
-
})),
|
|
1609
|
-
doctor: optional(strictObject({
|
|
1610
|
-
ignore: optional(strings),
|
|
1611
|
-
only: optional(strings),
|
|
1612
|
-
strict: optional(boolean()),
|
|
1613
|
-
format: optional(picklist([
|
|
1614
|
-
"text",
|
|
1615
|
-
"sarif",
|
|
1616
|
-
"github"
|
|
1617
|
-
])),
|
|
1618
|
-
output: optional(string()),
|
|
1619
|
-
sources: optional(strings),
|
|
1620
|
-
policyHelperLimit: optional(number()),
|
|
1621
|
-
claimsLimit: optional(number()),
|
|
1622
|
-
migrationSafety: optional(strictObject({ since: optional(string()) }))
|
|
1623
|
-
})),
|
|
1624
|
-
env: optional(strictObject({
|
|
1625
|
-
output: optional(string()),
|
|
1626
|
-
prefix: optional(string())
|
|
1627
|
-
})),
|
|
1628
|
-
integrations: optional(array(picklist(INTEGRATIONS))),
|
|
1629
|
-
skills: optional(strictObject({ agents: optional(array(picklist(SKILLS_AGENTS))) })),
|
|
1630
|
-
keys: optional(strictObject({ output: optional(string()) }))
|
|
1631
|
-
};
|
|
1632
|
-
const pickEntries = (keys) => Object.fromEntries(keys.map((key) => [key, FLAT[key]]));
|
|
1633
|
-
const ENTRIES = {
|
|
1634
|
-
database: optional(strictObject(pickEntries([
|
|
1635
|
-
"source",
|
|
1636
|
-
"schemas",
|
|
1637
|
-
"sql",
|
|
1638
|
-
"seed",
|
|
1639
|
-
"expose",
|
|
1640
|
-
"buckets",
|
|
1641
|
-
"realtime",
|
|
1642
|
-
"topics",
|
|
1643
|
-
"vectorSearch"
|
|
1644
|
-
]))),
|
|
1645
|
-
auth: optional(strictObject({
|
|
1646
|
-
organization: optional(strictObject({
|
|
1647
|
-
claim: optional(string()),
|
|
1648
|
-
column: optional(string()),
|
|
1649
|
-
onMissing: optional(picklist(["error", "skip"])),
|
|
1650
|
-
header: optional(string())
|
|
1651
|
-
})),
|
|
1652
|
-
...pickEntries([
|
|
1653
|
-
"claims",
|
|
1654
|
-
"authorization",
|
|
1655
|
-
"entitlements"
|
|
1656
|
-
])
|
|
1657
|
-
})),
|
|
1658
|
-
subjects: FLAT.subjects,
|
|
1659
|
-
blocks: FLAT.blocks,
|
|
1660
|
-
adapters: FLAT.integrations,
|
|
1661
|
-
gen: optional(strictObject({
|
|
1662
|
-
tasks: optional(array(picklist(GEN_TASKS))),
|
|
1663
|
-
watchInterval: optional(pipe(number(), minValue(1, "must be a positive number of ms"))),
|
|
1664
|
-
contentMapper: optional(boolean()),
|
|
1665
|
-
powersync: optional(powersyncGenSchema),
|
|
1666
|
-
...pickEntries([
|
|
1667
|
-
"output",
|
|
1668
|
-
"casing",
|
|
1669
|
-
"postgrestVersion",
|
|
1670
|
-
"recordTypes",
|
|
1671
|
-
"hooks",
|
|
1672
|
-
"tables",
|
|
1673
|
-
"json",
|
|
1674
|
-
"codecs",
|
|
1675
|
-
"relations",
|
|
1676
|
-
"sensitive",
|
|
1677
|
-
"storagePaths",
|
|
1678
|
-
"functions",
|
|
1679
|
-
"generators",
|
|
1680
|
-
"readSets"
|
|
1681
|
-
])
|
|
1682
|
-
})),
|
|
1683
|
-
api: optional(strictObject(pickEntries(["openapi", "specs"]))),
|
|
1684
|
-
tooling: optional(strictObject(pickEntries([
|
|
1685
|
-
"doctor",
|
|
1686
|
-
"env",
|
|
1687
|
-
"keys",
|
|
1688
|
-
"skills"
|
|
1689
|
-
])))
|
|
1690
|
-
};
|
|
1691
|
-
const EnvironmentSchema = strictObject(ENTRIES);
|
|
1692
|
-
/**
|
|
1693
|
-
* The shape of a `/create` design; `parseDesign` adds the rules a schema can't
|
|
1694
|
-
* state.
|
|
1695
|
-
*/
|
|
1696
|
-
/**
|
|
1697
|
-
* A preset name, or the conventions that differ from the defaults and the
|
|
1698
|
-
* blocks.
|
|
1699
|
-
*/
|
|
1700
|
-
const PresetSchema = union([pipe(string(), minLength(1)), strictObject({
|
|
1701
|
-
...Object.fromEntries(CONVENTION_FIELDS.map((field) => [field.key, optional(field.multi === true ? array(picklist(field.values)) : picklist(field.values))])),
|
|
1702
|
-
blocks: optional(array(string())),
|
|
1703
|
-
instances: optional(record(string(), presetInstance))
|
|
1704
|
-
})]);
|
|
1705
|
-
strictObject({
|
|
1706
|
-
version: optional(pipe(number(), integer(), minValue(0))),
|
|
1707
|
-
preset: optional(PresetSchema),
|
|
1708
|
-
appTables: optional(designAppTables),
|
|
1709
|
-
extraColumns: optional(record(string(), stringRecord)),
|
|
1710
|
-
positions: optional(record(string(), pipe(array(number()), length(2))))
|
|
1711
|
-
});
|
|
1712
|
-
const ConfigSchema = strictObject({
|
|
1713
|
-
$schema: optional(string()),
|
|
1714
|
-
preset: optional(PresetSchema),
|
|
1715
|
-
...ENTRIES,
|
|
1716
|
-
$env: optional(record(string(), EnvironmentSchema)),
|
|
1717
|
-
$development: optional(EnvironmentSchema),
|
|
1718
|
-
$production: optional(EnvironmentSchema),
|
|
1719
|
-
$test: optional(EnvironmentSchema),
|
|
1720
|
-
$ci: optional(EnvironmentSchema)
|
|
1721
|
-
});
|
|
1722
|
-
/** Each issue as `path: message`, the path in config keys. */
|
|
1723
|
-
function configIssues(value) {
|
|
1724
|
-
const moved = movedKeyIssues(value);
|
|
1725
|
-
if (moved.length > 0) return moved;
|
|
1726
|
-
const auth = typeof value === "object" && value !== null && "auth" in value ? value.auth : void 0;
|
|
1727
|
-
if (typeof value === "object" && value !== null && typeof auth === "object" && auth !== null && "authorization" in auth) {
|
|
1728
|
-
const provider = auth.authorization;
|
|
1729
|
-
const problem = typeof provider === "object" && provider !== null ? providerApiProblem(provider) : void 0;
|
|
1730
|
-
if (problem !== void 0) {
|
|
1731
|
-
const { authorization: _, ...rest } = auth;
|
|
1732
|
-
return [`auth.authorization.apiVersion: ${problem}`, ...configIssues({
|
|
1733
|
-
...value,
|
|
1734
|
-
auth: rest
|
|
1735
|
-
})];
|
|
1736
|
-
}
|
|
1737
|
-
}
|
|
1738
|
-
const result = safeParse(ConfigSchema, value);
|
|
1739
|
-
if (result.success) return [];
|
|
1740
|
-
return result.issues.map((issue) => {
|
|
1741
|
-
const path = getDotPath(issue);
|
|
1742
|
-
return path ? `${path}: ${issue.message}` : issue.message;
|
|
1743
|
-
});
|
|
1744
|
-
}
|
|
1745
|
-
strictObject(blockEntries);
|
|
1746
|
-
//#endregion
|
|
1747
|
-
//#region src/cli/core/credentials.ts
|
|
1748
|
-
/** The first source that has a value, in order. */
|
|
1749
|
-
function first(sources) {
|
|
1750
|
-
for (const [from, value] of sources) if (value !== void 0 && value !== "") return {
|
|
1751
|
-
value,
|
|
1752
|
-
from
|
|
1753
|
-
};
|
|
1754
|
-
}
|
|
1755
|
-
/**
|
|
1756
|
-
* The Supabase access token: `source.accessToken`, then
|
|
1757
|
-
* `$SUPABASE_ACCESS_TOKEN`.
|
|
1758
|
-
*/
|
|
1759
|
-
function accessToken(config, env) {
|
|
1760
|
-
return first([["database.source.accessToken", config.source.accessToken], ["$SUPABASE_ACCESS_TOKEN", env.SUPABASE_ACCESS_TOKEN]]);
|
|
1761
|
-
}
|
|
1762
|
-
/**
|
|
1763
|
-
* A connection string given by the user: `--db-url-stdin`, `source.dbUrl`,
|
|
1764
|
-
* `$DATABASE_URL`, then `$SUPABASE_DB_URL`.
|
|
1765
|
-
*/
|
|
1766
|
-
function databaseUrlCredential(config, env, fromStdin) {
|
|
1767
|
-
return first([
|
|
1768
|
-
["--db-url-stdin", fromStdin],
|
|
1769
|
-
["database.source.dbUrl", config.source.dbUrl],
|
|
1770
|
-
["$DATABASE_URL", env.DATABASE_URL],
|
|
1771
|
-
["$SUPABASE_DB_URL", env.SUPABASE_DB_URL]
|
|
1772
|
-
]);
|
|
1773
|
-
}
|
|
1774
|
-
//#endregion
|
|
1775
|
-
//#region src/cli/schema-tags.ts
|
|
1776
|
-
/** The `@bsb` table comments in the project's declarative schema files. */
|
|
1777
|
-
async function schemaTagComments(config) {
|
|
1778
|
-
const toml = await readSupabaseToml(config.root);
|
|
1779
|
-
const { files } = await schemaPaths(config.root, toml, sqlWorkflow(config, toml));
|
|
1780
|
-
return (await Promise.all(files.map((path) => readFile(resolve(config.root, path), "utf-8")))).flatMap((sql) => tableTagComments(sql));
|
|
1781
|
-
}
|
|
1782
|
-
/**
|
|
1783
|
-
* `config` with the features the schema files' `@bsb` table comments turn on
|
|
1784
|
-
* (ADR 0102), so the SQL modules, `gen` and doctor read the same config. A key
|
|
1785
|
-
* the config sets itself wins. `appTables` stays as declared: `encrypted` and
|
|
1786
|
-
* `events` tags describe tables whose SQL the files already hold, and `gen`
|
|
1787
|
-
* reads them from the snapshot.
|
|
1788
|
-
*/
|
|
1789
|
-
async function withSchemaTags(config) {
|
|
1790
|
-
const tagged = withTableTags(config, await schemaTagComments(config));
|
|
1791
|
-
return tagged === config ? config : {
|
|
1792
|
-
...tagged,
|
|
1793
|
-
appTables: config.appTables
|
|
1794
|
-
};
|
|
1795
|
-
}
|
|
1796
|
-
//#endregion
|
|
1797
|
-
//#region src/cli/config.ts
|
|
1798
|
-
const CONFIG_FILES = [
|
|
1799
|
-
"better-supabase.config.ts",
|
|
1800
|
-
"better-supabase.config.mts",
|
|
1801
|
-
"better-supabase.config.js",
|
|
1802
|
-
"better-supabase.config.mjs",
|
|
1803
|
-
"better-supabase.config.json"
|
|
1804
|
-
];
|
|
1805
|
-
function configIn(dir) {
|
|
1806
|
-
for (const name of CONFIG_FILES) {
|
|
1807
|
-
const path = join(dir, name);
|
|
1808
|
-
if (existsSync(path)) return path;
|
|
1809
|
-
}
|
|
1810
|
-
}
|
|
1811
|
-
function findConfig(cwd, explicit) {
|
|
1812
|
-
if (explicit) return resolve(cwd, explicit);
|
|
1813
|
-
return configIn(cwd);
|
|
1814
|
-
}
|
|
1815
|
-
/**
|
|
1816
|
-
* `--config`, else the first `better-supabase.config.*` at or above `cwd`,
|
|
1817
|
-
* within the same `.git` boundary as the Supabase project search.
|
|
1818
|
-
*/
|
|
1819
|
-
function discoverConfig(cwd, explicit) {
|
|
1820
|
-
if (explicit) return resolve(cwd, explicit);
|
|
1821
|
-
const dir = findUp(cwd, (candidate) => configIn(candidate) !== void 0);
|
|
1822
|
-
return dir === void 0 ? void 0 : configIn(dir);
|
|
1823
|
-
}
|
|
1824
|
-
/** The named export, then `default`, of a project module. */
|
|
1825
|
-
async function importExport(path, name) {
|
|
1826
|
-
if (!existsSync(path)) throw new CliError("not_found", `Module not found: ${path}`);
|
|
1827
|
-
const loaded = await importFresh(path);
|
|
1828
|
-
return loaded[name] ?? loaded["default"];
|
|
1829
|
-
}
|
|
1830
|
-
function isConfig(value) {
|
|
1831
|
-
return configIssues(value).length === 0;
|
|
1832
|
-
}
|
|
1833
|
-
const isPlainObject = (value) => typeof value === "object" && value !== null && !Array.isArray(value);
|
|
1834
|
-
/**
|
|
1835
|
-
* Objects merge key by key; arrays and every other value replace what `base`
|
|
1836
|
-
* had.
|
|
1837
|
-
*/
|
|
1838
|
-
function mergeConfig(base, override) {
|
|
1839
|
-
const merged = { ...base };
|
|
1840
|
-
for (const [key, value] of Object.entries(override)) {
|
|
1841
|
-
if (value === void 0) continue;
|
|
1842
|
-
const current = merged[key];
|
|
1843
|
-
merged[key] = isPlainObject(current) && isPlainObject(value) ? mergeConfig(current, value) : value;
|
|
1844
|
-
}
|
|
1845
|
-
return merged;
|
|
1846
|
-
}
|
|
1847
|
-
/**
|
|
1848
|
-
* A config without the removed top-level `tables` and `records` keys: the
|
|
1849
|
-
* tables as `appTables`, and the records merged into `subjects`. `migrate
|
|
1850
|
-
* schema-first` reads them to write the tables as SQL.
|
|
1851
|
-
*/
|
|
1852
|
-
function takeLegacyTables(config) {
|
|
1853
|
-
if (!isPlainObject(config)) return {};
|
|
1854
|
-
const { tables, appTables, records, ...rest } = config;
|
|
1855
|
-
const subjects = isPlainObject(records) ? records : void 0;
|
|
1856
|
-
return {
|
|
1857
|
-
config: subjects === void 0 ? rest : {
|
|
1858
|
-
...rest,
|
|
1859
|
-
subjects: {
|
|
1860
|
-
...subjects,
|
|
1861
|
-
...isPlainObject(rest["subjects"]) ? rest["subjects"] : {}
|
|
1862
|
-
}
|
|
1863
|
-
},
|
|
1864
|
-
appTables: isPlainObject(tables) ? tables : appTables
|
|
1865
|
-
};
|
|
1866
|
-
}
|
|
1867
|
-
/**
|
|
1868
|
-
* The config with the `environment` blocks merged in: `$env.<name>`, then the
|
|
1869
|
-
* `$development`, `$production`, `$test` or `$ci` shorthand. Every `$` key is
|
|
1870
|
-
* dropped from the result.
|
|
1871
|
-
*/
|
|
1872
|
-
function applyEnvironment(config, environment) {
|
|
1873
|
-
const { $schema: _schema, $env, $development, $production, $test, $ci, ...base } = config;
|
|
1874
|
-
if (environment === void 0) return base;
|
|
1875
|
-
const shorthand = (/* @__PURE__ */ new Map([
|
|
1876
|
-
["development", $development],
|
|
1877
|
-
["production", $production],
|
|
1878
|
-
["test", $test],
|
|
1879
|
-
["ci", $ci]
|
|
1880
|
-
])).get(environment);
|
|
1881
|
-
let merged = { ...base };
|
|
1882
|
-
for (const block of [$env?.[environment], shorthand]) if (block) merged = mergeConfig(merged, block);
|
|
1883
|
-
if (!isConfig(merged)) throw new CliError("config_invalid", `The ${environment} environment makes the config invalid:\n${configIssues(merged).map((issue) => ` ${issue}`).join("\n")}`);
|
|
1884
|
-
return merged;
|
|
1885
|
-
}
|
|
1886
|
-
function defaultConfig(cwd, explicit, environment, path = discoverConfig(cwd, explicit)) {
|
|
1887
|
-
const resolved = resolveConfig({}, !path || explicit ? cwd : dirname(path));
|
|
1888
|
-
return environment === void 0 ? resolved : {
|
|
1889
|
-
...resolved,
|
|
1890
|
-
environment
|
|
1891
|
-
};
|
|
1892
|
-
}
|
|
1893
|
-
/**
|
|
1894
|
-
* Loads `better-supabase.config.*` with c12 and checks it against the config
|
|
1895
|
-
* schema. c12 imports `.ts` natively (Node 24 strips the types), so no loader
|
|
1896
|
-
* is needed; rc files, `package.json`, env overrides and `extends` are off so
|
|
1897
|
-
* the one file is the whole config. `environment` merges its blocks in
|
|
1898
|
-
* (`applyEnvironment`); c12's own `envName` is off because it concatenates
|
|
1899
|
-
* arrays. A discovered file sets the project root to its own directory;
|
|
1900
|
-
* `--config` keeps `cwd` as the root. `path` is the file `discoverConfig`
|
|
1901
|
-
* found, for callers that already looked it up.
|
|
1902
|
-
*/
|
|
1903
|
-
async function loadConfig(cwd, explicit, environment, path = discoverConfig(cwd, explicit), options = {}) {
|
|
1904
|
-
const withEnvironment = (resolved) => environment === void 0 ? resolved : {
|
|
1905
|
-
...resolved,
|
|
1906
|
-
environment
|
|
1907
|
-
};
|
|
1908
|
-
if (!path) return withEnvironment(resolveConfig({}, cwd));
|
|
1909
|
-
if (!existsSync(path)) throw new CliError("config_not_found", `Config file not found: ${path}`);
|
|
1910
|
-
const { config } = await loadConfig$1({
|
|
1911
|
-
cwd,
|
|
1912
|
-
configFile: path,
|
|
1913
|
-
rcFile: false,
|
|
1914
|
-
globalRc: false,
|
|
1915
|
-
packageJson: false,
|
|
1916
|
-
dotenv: false,
|
|
1917
|
-
envName: false,
|
|
1918
|
-
extend: false,
|
|
1919
|
-
giget: false
|
|
1920
|
-
});
|
|
1921
|
-
const legacy = options.legacyTables === true ? takeLegacyTables(config) : {};
|
|
1922
|
-
const current = legacy.config ?? config;
|
|
1923
|
-
if (!isConfig(current)) {
|
|
1924
|
-
const issues = configIssues(current);
|
|
1925
|
-
throw new CliError("config_invalid", `${display(cwd, path)} is not a valid config:\n${issues.map((issue) => ` ${issue}`).join("\n")}`, { issues });
|
|
1926
|
-
}
|
|
1927
|
-
return withEnvironment(await withSchemaTags(resolveConfig({
|
|
1928
|
-
...applyEnvironment(current, environment),
|
|
1929
|
-
...legacy.appTables === void 0 ? {} : { appTables: legacy.appTables }
|
|
1930
|
-
}, explicit ? cwd : dirname(path))));
|
|
1931
|
-
}
|
|
1932
|
-
/** `[db] port` or `[api] port` from `supabase/config.toml`. */
|
|
1933
|
-
async function readSupabasePort(root, section) {
|
|
1934
|
-
const toml = await readSupabaseToml(root);
|
|
1935
|
-
return toml ? tomlNumber(toml.document, [section, "port"]) : void 0;
|
|
1936
|
-
}
|
|
1937
|
-
/** The connection string piped in for `--db-url-stdin`, when it was passed. */
|
|
1938
|
-
async function stdinDatabaseUrl(enabled, io) {
|
|
1939
|
-
if (enabled !== true) return;
|
|
1940
|
-
const url = (await readStdin(io, "--db-url-stdin")).trim();
|
|
1941
|
-
if (!url) throw new CliError("missing_value", "--db-url-stdin read nothing from stdin. Pipe the connection string: printf %s \"$URL\" | better-supabase <command> --db-url-stdin", { flag: "--db-url-stdin" });
|
|
1942
|
-
return url;
|
|
1943
|
-
}
|
|
1944
|
-
/**
|
|
1945
|
-
* Connection string: stdin, config, `$DATABASE_URL`, `$SUPABASE_DB_URL`, then
|
|
1946
|
-
* the local stack: the `[db] port` in `config.toml`, else the running stack's
|
|
1947
|
-
* `DB_URL`. With neither it fails with `not_found` rather than guess a port.
|
|
1948
|
-
*/
|
|
1949
|
-
async function databaseUrl(config, env, fromStdin, stack = env.BSB_STACK) {
|
|
1950
|
-
const given = databaseUrlCredential(config, env, fromStdin);
|
|
1951
|
-
if (given) return given.value;
|
|
1952
|
-
if (stack !== void 0 && stack !== "") return namedStackUrl(config.root, stack, env);
|
|
1953
|
-
let resolved = localUrls.get(config);
|
|
1954
|
-
if (!resolved) {
|
|
1955
|
-
resolved = localDatabaseUrl(config.root, env);
|
|
1956
|
-
localUrls.set(config, resolved);
|
|
1957
|
-
}
|
|
1958
|
-
return resolved;
|
|
1959
|
-
}
|
|
1960
|
-
/**
|
|
1961
|
-
* The database of `supabase/stacks/<name>/config.toml`, a stack kept for one
|
|
1962
|
-
* purpose such as tests or a demo.
|
|
1963
|
-
*/
|
|
1964
|
-
async function namedStackUrl(root, name, env) {
|
|
1965
|
-
if (!/^[a-z0-9][a-z0-9_-]*$/u.test(name)) throw new CliError("invalid_value", `--stack "${name}" must be lowercase letters, digits, dashes or underscores.`, { flag: "--stack" });
|
|
1966
|
-
const toml = await readSupabaseToml(root);
|
|
1967
|
-
const file = toml ? join(dirname(resolve(root, toml.path)), "stacks", name, "config.toml") : void 0;
|
|
1968
|
-
const db = file !== void 0 && existsSync(file) ? parse$1(await readFile(file, "utf-8"))["db"] : void 0;
|
|
1969
|
-
const port = typeof db === "object" && db !== null && "port" in db && typeof db.port === "number" ? db.port : void 0;
|
|
1970
|
-
if (port !== void 0) return `postgresql://postgres:postgres@127.0.0.1:${port}/postgres`;
|
|
1971
|
-
return statusDatabaseUrl(root, env, name, `supabase/stacks/${name}/config.toml sets no [db] port`);
|
|
1972
|
-
}
|
|
1973
|
-
/** One lookup per loaded config, so a run asks `supabase status` at most once. */
|
|
1974
|
-
const localUrls = /* @__PURE__ */ new WeakMap();
|
|
1975
|
-
async function localDatabaseUrl(root, env) {
|
|
1976
|
-
const port = await readSupabasePort(root, "db");
|
|
1977
|
-
if (port !== void 0) return `postgresql://postgres:postgres@127.0.0.1:${port}/postgres`;
|
|
1978
|
-
return statusDatabaseUrl(root, env, void 0, await readSupabaseToml(root) ? "supabase/config.toml sets no [db] port" : "there is no supabase/config.toml");
|
|
1979
|
-
}
|
|
1980
|
-
/** The running stack's `DB_URL`, or `not_found` naming both places it looked. */
|
|
1981
|
-
async function statusDatabaseUrl(root, env, stack, noPort) {
|
|
1982
|
-
let failure;
|
|
1983
|
-
try {
|
|
1984
|
-
const status = await readStackStatus(root, env, stack === void 0 ? {} : { stack });
|
|
1985
|
-
const url = status.ok ? status.status["DB_URL"] : void 0;
|
|
1986
|
-
if (typeof url === "string" && url.length > 0) return url;
|
|
1987
|
-
failure = status.ok ? "printed no DB_URL" : `failed (exit ${String(status.code)})`;
|
|
1988
|
-
} catch (error) {
|
|
1989
|
-
if (error instanceof CliError && error.code === "supabase_cli_missing") failure = "could not run";
|
|
1990
|
-
else if (error instanceof CliError) failure = `failed: ${error.message}`;
|
|
1991
|
-
else throw error;
|
|
1992
|
-
}
|
|
1993
|
-
const command = stack === void 0 ? "supabase status" : `supabase status --stack ${stack}`;
|
|
1994
|
-
throw new CliError("not_found", `No database to connect to: ${noPort}, and \`${command}\` ${failure}. Start the stack, set [db] port, or pass $DATABASE_URL or --db-url-stdin.`, {
|
|
1995
|
-
suggestion: stack === void 0 ? "supabase start" : `supabase start --stack ${stack}`,
|
|
1996
|
-
...stack === void 0 ? {} : { flag: "--stack" }
|
|
1997
|
-
});
|
|
1998
|
-
}
|
|
1999
|
-
//#endregion
|
|
2000
|
-
export { findConfig as a, readSupabasePort as c, GEN_TASKS as d, INTEGRATIONS as f, subjectTagArgs as h, discoverConfig as i, stdinDatabaseUrl as l, withTableTags as m, databaseUrl as n, importExport as o, isGenTask as p, defaultConfig as r, loadConfig as s, applyEnvironment as t, accessToken as u };
|