better-supabase 0.14.0 → 0.15.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +67 -377
- package/dist/access-sql-B-MkVARa.js +207 -0
- package/dist/actor-go7p9-CJ.js +150 -0
- package/dist/adapter-B0b6MXYS.js +2299 -0
- package/dist/agents-5n8DWRfP.d.ts +117 -0
- package/dist/ai-cache-Cu8j6aQQ.js +87 -0
- package/dist/ai-cache-DyHohbFP.d.ts +82 -0
- package/dist/ai-chat-D1GuRnke.d.ts +619 -0
- package/dist/ai-files-CgFCRsnU.js +339 -0
- package/dist/ai-schedules-CAquecT_.d.ts +166 -0
- package/dist/ai-sdk/agents/index.d.ts +6 -6
- package/dist/ai-sdk/agents/index.js +2 -2
- package/dist/ai-sdk/batches/index.d.ts +5 -5
- package/dist/ai-sdk/batches/index.js +4 -4
- package/dist/ai-sdk/cache/index.d.ts +3 -3
- package/dist/ai-sdk/cache/index.js +2 -2
- package/dist/ai-sdk/chat/index.d.ts +1 -1
- package/dist/ai-sdk/chat/index.js +5 -5
- package/dist/ai-sdk/embeddings/index.d.ts +2 -2
- package/dist/ai-sdk/files/index.d.ts +2 -2
- package/dist/ai-sdk/files/index.js +5 -5
- package/dist/ai-sdk/index.d.ts +10 -10
- package/dist/ai-sdk/index.js +3 -3
- package/dist/ai-sdk/mcp/index.d.ts +4 -4
- package/dist/ai-sdk/mcp/index.js +6 -6
- package/dist/ai-sdk/memory/index.d.ts +3 -3
- package/dist/ai-sdk/memory/index.js +1 -1
- package/dist/ai-sdk/workflow/index.d.ts +4 -4
- package/dist/ai-sdk/workflow/index.js +7 -7
- package/dist/api-DxAPqMrE.d.ts +495 -0
- package/dist/api-keys-D5k63K6y.d.ts +213 -0
- package/dist/app-tables-CF2DD-Mu.d.ts +28 -0
- package/dist/app-tables-D29Rahtg.js +16350 -0
- package/dist/approvals-Crutd4-o.d.ts +129 -0
- package/dist/assistant-CD_h8Vxx.d.ts +157 -0
- package/dist/astro/index.d.ts +12 -12
- package/dist/astro/index.js +8 -8
- package/dist/attachments-aJYgdYtB.js +369 -0
- package/dist/attributes-Bzf51_nc.js +47 -0
- package/dist/auth-reply-tlXB2FQ9.js +31 -0
- package/dist/authorization-HZdJCaVm.d.ts +3595 -0
- package/dist/authorization-hooks-Cs1vP_ej.d.ts +217 -0
- package/dist/authorizer-B6X09otb.d.ts +118 -0
- package/dist/authorizer-BGhXaDmo.js +172 -0
- package/dist/automation-D41DXyvT.js +75 -0
- package/dist/automations-BYsz43AG.js +314 -0
- package/dist/automations-Bc2ue55V.js +26 -0
- package/dist/automations-CD1XlL2W.js +33 -0
- package/dist/automations-CIwRq7zm.js +30 -0
- package/dist/availability-vguUvEK2.d.ts +226 -0
- package/dist/better-result/index.d.ts +20 -30
- package/dist/better-result/index.js +2 -2
- package/dist/bind-CrMBwrPN.d.ts +104 -0
- package/dist/block-authors-BDV3y1SP.js +14 -0
- package/dist/block-env-B_uEM2xz.d.ts +32 -0
- package/dist/block-fields-BE7pInWZ.d.ts +58 -0
- package/dist/block-fields-DE_FgpOU.js +139 -0
- package/dist/block-helpers-CRpAHrp_.d.ts +62 -0
- package/dist/block-helpers-CtBdjgO4.js +353 -0
- package/dist/block-hooks-BfxX3682.js +130 -0
- package/dist/block-hooks-DZN2w69m.d.ts +117 -0
- package/dist/block-method-C9hWdHom.js +21 -0
- package/dist/block-method-CiVa2G-J.d.ts +14 -0
- package/dist/block-subjects-BhDKK_j7.js +55 -0
- package/dist/block-subjects-CphkQPxp.d.ts +6 -0
- package/dist/block-tenant-DHp7subc.js +14 -0
- package/dist/block-transport-DWZSJrwN.d.ts +69 -0
- package/dist/blocks/access-requests/index.d.ts +8 -8
- package/dist/blocks/access-requests/index.js +6 -6
- package/dist/blocks/activities/index.d.ts +215 -0
- package/dist/blocks/activities/index.js +414 -0
- package/dist/blocks/agents/index.d.ts +4 -4
- package/dist/blocks/agents/index.js +5 -5
- package/dist/blocks/ai-cache/index.d.ts +3 -3
- package/dist/blocks/ai-cache/index.js +3 -3
- package/dist/blocks/ai-chat/index.d.ts +119 -6
- package/dist/blocks/ai-chat/index.js +1067 -5
- package/dist/blocks/ai-files/index.d.ts +5 -5
- package/dist/blocks/ai-files/index.js +3 -3
- package/dist/blocks/ai-keys/index.d.ts +22 -0
- package/dist/blocks/ai-keys/index.js +236 -0
- package/dist/blocks/ai-schedules/index.d.ts +10 -0
- package/dist/blocks/ai-schedules/index.js +258 -0
- package/dist/blocks/announcements/index.d.ts +134 -5
- package/dist/blocks/announcements/index.js +179 -4
- package/dist/blocks/api-keys/index.d.ts +69 -8
- package/dist/blocks/api-keys/index.js +417 -7
- package/dist/blocks/approvals/index.d.ts +4 -4
- package/dist/blocks/approvals/index.js +10 -10
- package/dist/blocks/assets/index.d.ts +11 -13
- package/dist/blocks/assets/index.js +10 -10
- package/dist/blocks/assignment/index.d.ts +8 -8
- package/dist/blocks/assignment/index.js +5 -5
- package/dist/blocks/attachments/index.d.ts +97 -12
- package/dist/blocks/attachments/index.js +279 -47
- package/dist/blocks/audit/index.d.ts +476 -7
- package/dist/blocks/audit/index.js +863 -6
- package/dist/blocks/automations/index.d.ts +524 -0
- package/dist/blocks/automations/index.js +553 -0
- package/dist/blocks/billable-time/index.d.ts +22 -24
- package/dist/blocks/billable-time/index.js +13 -13
- package/dist/blocks/billing/index.d.ts +82 -11
- package/dist/blocks/billing/index.js +93 -9
- package/dist/blocks/bookings/index.d.ts +49 -7
- package/dist/blocks/bookings/index.js +419 -4
- package/dist/blocks/bulk/index.d.ts +6 -6
- package/dist/blocks/bulk/index.js +4 -4
- package/dist/blocks/calendar/index.d.ts +180 -7
- package/dist/blocks/calendar/index.js +1073 -5
- package/dist/blocks/catalog/index.d.ts +128 -13
- package/dist/blocks/catalog/index.js +149 -13
- package/dist/blocks/channels/index.d.ts +15 -13
- package/dist/blocks/channels/index.js +12 -13
- package/dist/blocks/collections/index.d.ts +16 -16
- package/dist/blocks/collections/index.js +8 -8
- package/dist/blocks/comments/index.d.ts +231 -14
- package/dist/blocks/comments/index.js +260 -13
- package/dist/blocks/compliance/index.d.ts +325 -0
- package/dist/blocks/compliance/index.js +410 -0
- package/dist/blocks/connectors/index.d.ts +4 -4
- package/dist/blocks/connectors/index.js +8 -8
- package/dist/blocks/contacts/index.d.ts +182 -0
- package/dist/blocks/contacts/index.js +358 -0
- package/dist/blocks/content/index.d.ts +188 -0
- package/dist/blocks/content/index.js +219 -0
- package/dist/blocks/contracts/index.d.ts +16 -18
- package/dist/blocks/contracts/index.js +24 -24
- package/dist/blocks/courses/index.d.ts +17 -17
- package/dist/blocks/courses/index.js +13 -13
- package/dist/blocks/created-by/index.d.ts +27 -0
- package/dist/blocks/created-by/index.js +14 -0
- package/dist/blocks/custom-fields/index.d.ts +11 -11
- package/dist/blocks/custom-fields/index.js +7 -7
- package/dist/blocks/data-lifecycle/index.d.ts +9 -9
- package/dist/blocks/data-lifecycle/index.js +7 -7
- package/dist/blocks/deals/index.d.ts +10 -10
- package/dist/blocks/deals/index.js +11 -11
- package/dist/blocks/dispatch/index.d.ts +20 -22
- package/dist/blocks/dispatch/index.js +17 -17
- package/dist/blocks/documents/index.d.ts +4 -4
- package/dist/blocks/documents/index.js +4 -4
- package/dist/blocks/domains/index.d.ts +7 -7
- package/dist/blocks/domains/index.js +6 -6
- package/dist/blocks/donations/index.d.ts +27 -29
- package/dist/blocks/donations/index.js +36 -28
- package/dist/blocks/drive/index.d.ts +10 -10
- package/dist/blocks/drive/index.js +8 -8
- package/dist/blocks/employees/index.d.ts +204 -7
- package/dist/blocks/employees/index.js +36 -10
- package/dist/blocks/enrichment/index.d.ts +7 -7
- package/dist/blocks/enrichment/index.js +14 -6
- package/dist/blocks/enrollments/index.d.ts +14 -16
- package/dist/blocks/enrollments/index.js +10 -10
- package/dist/blocks/entitlements/index.d.ts +48 -8
- package/dist/blocks/entitlements/index.js +62 -4
- package/dist/blocks/expenses/index.d.ts +8 -8
- package/dist/blocks/expenses/index.js +11 -11
- package/dist/blocks/field-history/index.d.ts +5 -5
- package/dist/blocks/field-history/index.js +3 -5
- package/dist/blocks/flags/index.d.ts +17 -13
- package/dist/blocks/flags/index.js +7 -7
- package/dist/blocks/forecasts/index.d.ts +7 -7
- package/dist/blocks/forecasts/index.js +7 -7
- package/dist/blocks/forms/index.d.ts +144 -12
- package/dist/blocks/forms/index.js +385 -7
- package/dist/blocks/goals/index.d.ts +82 -0
- package/dist/blocks/goals/index.js +72 -0
- package/dist/blocks/guests/index.d.ts +19 -21
- package/dist/blocks/guests/index.js +12 -12
- package/dist/blocks/hiring/index.d.ts +20 -10
- package/dist/blocks/hiring/index.js +10 -9
- package/dist/blocks/identities/index.d.ts +7 -7
- package/dist/blocks/identities/index.js +4 -4
- package/dist/blocks/imports/index.d.ts +8 -8
- package/dist/blocks/imports/index.js +6 -6
- package/dist/blocks/inbox/index.d.ts +137 -8
- package/dist/blocks/inbox/index.js +290 -56
- package/dist/blocks/incidents/index.d.ts +8 -8
- package/dist/blocks/incidents/index.js +7 -7
- package/dist/blocks/index.d.ts +37 -18
- package/dist/blocks/index.js +40 -19
- package/dist/blocks/inventory/index.d.ts +10 -10
- package/dist/blocks/inventory/index.js +6 -6
- package/dist/blocks/invoices/index.d.ts +11 -11
- package/dist/blocks/invoices/index.js +8 -8
- package/dist/blocks/knowledge/index.d.ts +3 -3
- package/dist/blocks/knowledge/index.js +4 -4
- package/dist/blocks/lead-scoring/index.d.ts +11 -11
- package/dist/blocks/lead-scoring/index.js +7 -7
- package/dist/blocks/leases/index.d.ts +16 -73
- package/dist/blocks/leases/index.js +29 -104
- package/dist/blocks/leave/index.d.ts +8 -8
- package/dist/blocks/leave/index.js +5 -5
- package/dist/blocks/ledger/index.d.ts +11 -13
- package/dist/blocks/ledger/index.js +10 -10
- package/dist/blocks/mail-sync/index.d.ts +6 -6
- package/dist/blocks/mail-sync/index.js +18 -10
- package/dist/blocks/memberships/index.d.ts +67 -0
- package/dist/blocks/memberships/index.js +14 -0
- package/dist/blocks/memory/index.d.ts +4 -4
- package/dist/blocks/memory/index.js +8 -8
- package/dist/blocks/messaging/index.d.ts +113 -13
- package/dist/blocks/messaging/index.js +579 -8
- package/dist/blocks/metrics/index.d.ts +7 -7
- package/dist/blocks/metrics/index.js +6 -6
- package/dist/blocks/mfa/index.d.ts +145 -3
- package/dist/blocks/mfa/index.js +211 -2
- package/dist/blocks/moderation/index.d.ts +13 -15
- package/dist/blocks/moderation/index.js +10 -10
- package/dist/blocks/notifications/index.d.ts +67 -15
- package/dist/blocks/notifications/index.js +62 -13
- package/dist/blocks/numbering/index.d.ts +45 -0
- package/dist/blocks/numbering/index.js +49 -0
- package/dist/blocks/oauth-server/index.d.ts +6 -6
- package/dist/blocks/oauth-server/index.js +6 -6
- package/dist/blocks/onboarding/index.d.ts +112 -4
- package/dist/blocks/onboarding/index.js +107 -4
- package/dist/blocks/orders/index.d.ts +35 -14
- package/dist/blocks/orders/index.js +49 -12
- package/dist/blocks/organizations/index.d.ts +452 -6
- package/dist/blocks/organizations/index.js +689 -5
- package/dist/blocks/outbox/index.d.ts +4 -4
- package/dist/blocks/outbox/index.js +19 -6
- package/dist/blocks/passes/index.d.ts +19 -21
- package/dist/blocks/passes/index.js +17 -17
- package/dist/blocks/permissions/index.d.ts +92 -0
- package/dist/blocks/permissions/index.js +127 -0
- package/dist/blocks/pipelines/index.d.ts +15 -15
- package/dist/blocks/pipelines/index.js +12 -12
- package/dist/blocks/posts/index.d.ts +9 -9
- package/dist/blocks/posts/index.js +8 -8
- package/dist/blocks/profiles/index.d.ts +7 -7
- package/dist/blocks/profiles/index.js +5 -5
- package/dist/blocks/promotions/index.d.ts +9 -9
- package/dist/blocks/promotions/index.js +7 -7
- package/dist/blocks/push/index.d.ts +9 -9
- package/dist/blocks/push/index.js +4 -4
- package/dist/blocks/queue/index.d.ts +562 -0
- package/dist/blocks/queue/index.js +1407 -0
- package/dist/blocks/quotes/index.d.ts +29 -14
- package/dist/blocks/quotes/index.js +14 -13
- package/dist/blocks/rank/index.d.ts +7 -7
- package/dist/blocks/rank/index.js +4 -4
- package/dist/blocks/reactions/index.d.ts +154 -5
- package/dist/blocks/reactions/index.js +168 -4
- package/dist/blocks/relations/index.d.ts +36 -38
- package/dist/blocks/relations/index.js +18 -18
- package/dist/blocks/reminders/index.d.ts +16 -16
- package/dist/blocks/reminders/index.js +14 -14
- package/dist/blocks/reviews/index.d.ts +8 -8
- package/dist/blocks/reviews/index.js +6 -6
- package/dist/blocks/saved-views/index.d.ts +311 -4
- package/dist/blocks/saved-views/index.js +437 -2
- package/dist/blocks/scores/index.d.ts +8 -10
- package/dist/blocks/scores/index.js +10 -10
- package/dist/blocks/search/index.d.ts +168 -5
- package/dist/blocks/search/index.js +277 -5
- package/dist/blocks/security-events/index.d.ts +440 -0
- package/dist/blocks/security-events/index.js +885 -0
- package/dist/blocks/segments/index.d.ts +13 -13
- package/dist/blocks/segments/index.js +7 -7
- package/dist/blocks/sequences/index.d.ts +13 -13
- package/dist/blocks/sequences/index.js +16 -10
- package/dist/blocks/service-accounts/index.d.ts +132 -0
- package/dist/blocks/service-accounts/index.js +109 -0
- package/dist/blocks/sessions/index.d.ts +138 -3
- package/dist/blocks/sessions/index.js +173 -2
- package/dist/blocks/settings/index.d.ts +181 -5
- package/dist/blocks/settings/index.js +226 -4
- package/dist/blocks/share-links/index.d.ts +20 -22
- package/dist/blocks/share-links/index.js +16 -16
- package/dist/blocks/shipments/index.d.ts +23 -25
- package/dist/blocks/shipments/index.js +30 -22
- package/dist/blocks/signatures/index.d.ts +9 -9
- package/dist/blocks/signatures/index.js +5 -5
- package/dist/blocks/signing-keys/index.d.ts +4 -4
- package/dist/blocks/signing-keys/index.js +3 -3
- package/dist/blocks/sla/index.d.ts +20 -22
- package/dist/blocks/sla/index.js +22 -16
- package/dist/blocks/sso/index.d.ts +7 -7
- package/dist/blocks/sso/index.js +4 -4
- package/dist/blocks/state-machine/index.d.ts +14 -14
- package/dist/blocks/state-machine/index.js +4 -4
- package/dist/blocks/subjects/index.d.ts +41 -7
- package/dist/blocks/subjects/index.js +187 -5
- package/dist/blocks/tags/index.d.ts +146 -13
- package/dist/blocks/tags/index.js +229 -14
- package/dist/blocks/tasks/index.d.ts +346 -0
- package/dist/blocks/tasks/index.js +626 -0
- package/dist/blocks/teams/index.d.ts +7 -7
- package/dist/blocks/teams/index.js +4 -4
- package/dist/blocks/templates/index.d.ts +18 -18
- package/dist/blocks/templates/index.js +10 -10
- package/dist/blocks/time-tracking/index.d.ts +16 -16
- package/dist/blocks/time-tracking/index.js +13 -13
- package/dist/blocks/timeline/index.d.ts +116 -0
- package/dist/blocks/timeline/index.js +164 -0
- package/dist/blocks/trash/index.d.ts +47 -9
- package/dist/blocks/trash/index.js +9 -7
- package/dist/blocks/undo/index.d.ts +48 -5
- package/dist/blocks/undo/index.js +60 -4
- package/dist/blocks/updated-at/index.d.ts +20 -0
- package/dist/blocks/updated-at/index.js +14 -0
- package/dist/blocks/usage/index.d.ts +39 -5
- package/dist/blocks/usage/index.js +301 -4
- package/dist/blocks/vercel-marketplace/index.d.ts +7 -7
- package/dist/blocks/vercel-marketplace/index.js +8 -8
- package/dist/blocks/versions/index.d.ts +20 -22
- package/dist/blocks/versions/index.js +16 -16
- package/dist/blocks/waitlist/index.d.ts +9 -9
- package/dist/blocks/waitlist/index.js +5 -5
- package/dist/blocks/webhooks/index.d.ts +21 -21
- package/dist/blocks/webhooks/index.js +16 -16
- package/dist/blocks/workflow-editor/index.d.ts +99 -0
- package/dist/blocks/workflow-editor/index.js +733 -0
- package/dist/blocks/workflows/index.d.ts +72 -6
- package/dist/blocks/workflows/index.js +379 -4
- package/dist/bookings-D4dvGXiR.d.ts +290 -0
- package/dist/bucket-CiNi8sIw.d.ts +666 -0
- package/dist/build-BFC8nFiL.js +797 -0
- package/dist/build-QitPVzzO.js +2073 -0
- package/dist/carrier-KzeYXVrW.d.ts +169 -0
- package/dist/chat-sdk/index.d.ts +8 -8
- package/dist/chat-sdk/index.js +3 -3
- package/dist/claims-DTy6R6my.js +63 -0
- package/dist/cli/add-BgsUjCan.js +1252 -0
- package/dist/cli/add-DCI5JKjA.js +99 -0
- package/dist/cli/add-DWjlVwvP.js +1 -0
- package/dist/cli/args-UEwg0l-N.js +27 -0
- package/dist/cli/backfill-nxPbcsns.js +293 -0
- package/dist/cli/bin.js +1 -1
- package/dist/cli/blocks-BZHI8mRC.js +156 -0
- package/dist/cli/blocks-Cr4HGePW.js +1 -0
- package/dist/cli/cache-CXgR_Ahi.js +607 -0
- package/dist/cli/codemod-DSN7iAdg.js +2343 -0
- package/dist/cli/codemod-block-renames-BuSaTE_G.js +239 -0
- package/dist/cli/command-CQ61x6gN.js +941 -0
- package/dist/cli/completion-2Y3D_eNu.js +211 -0
- package/dist/cli/completion-BwI0_Ap5.js +30 -0
- package/dist/cli/completion-Dlu5AdUW.js +1 -0
- package/dist/cli/config-9t5ec_N7.js +1642 -0
- package/dist/cli/config-CBqkQjjN.js +1 -0
- package/dist/cli/config-CPux9Wa7.js +47 -0
- package/dist/cli/config-edit-CrWfk8s3.js +621 -0
- package/dist/cli/config-group-C8tjut39.js +391 -0
- package/dist/cli/content-mapper-DNs7lTu7.js +182 -0
- package/dist/cli/db-DrBI_HNv.js +223 -0
- package/dist/cli/detect-D9JaAX20.js +84 -0
- package/dist/cli/dist-D_VbPAMR.js +129 -0
- package/dist/cli/doctor-DDrEM6S1.js +4561 -0
- package/dist/cli/env-BBl5L8Bf.js +143 -0
- package/dist/cli/env-CAU1nknN.js +1 -0
- package/dist/cli/files-CX71yBm8.js +1010 -0
- package/dist/cli/gen-MtijJQ9r.js +387 -0
- package/dist/cli/in-stack-diff-DQTW53Vf.js +257 -0
- package/dist/cli/index.d.ts +43 -8
- package/dist/cli/index.js +8 -8
- package/dist/cli/init-D-aDv9r5.js +440 -0
- package/dist/cli/keys-DGEpMbeB.js +106 -0
- package/dist/cli/live-iEeH15ck.js +341 -0
- package/dist/cli/mcp-BAPyaQ62.js +249 -0
- package/dist/cli/metadata-DVx9Zgbj.js +150 -0
- package/dist/cli/migration-safety-D7PhzFxm.js +928 -0
- package/dist/cli/module-migration-aPCckev6.js +734 -0
- package/dist/cli/moved-CsfDQcyk.js +254 -0
- package/dist/cli/orphans-BAboqyVM.js +28 -0
- package/dist/cli/parse-B9Iv_-Pf.js +182 -0
- package/dist/cli/preset-BwmIfFnh.js +101 -0
- package/dist/cli/print-BeWO7OJY.js +67 -0
- package/dist/cli/remove-B46Dmd2M.js +238 -0
- package/dist/cli/render-ucJmUyuM.js +2170 -0
- package/dist/cli/run-BXx6D1aR.js +63 -0
- package/dist/cli/run-CvYVAztY.js +1427 -0
- package/dist/cli/run-DYhLBcFW.js +702 -0
- package/dist/cli/seed-Cz8PcXeT.js +188 -0
- package/dist/cli/seed-D6XijwbR.js +1 -0
- package/dist/cli/shared-LZroULBe.js +151 -0
- package/dist/cli/skills-toUan_OV.js +121 -0
- package/dist/cli/snapshot-C8MVPyO8.js +729 -0
- package/dist/cli/source-DANaJJVc.js +320 -0
- package/dist/cli/source-args-IpJRJO5t.js +59 -0
- package/dist/cli/spec-DGVNMSSB.js +7530 -0
- package/dist/cli/spec-g8_G5K7o.js +1 -0
- package/dist/cli/stack-CWEHdO0b.js +135 -0
- package/dist/cli/sync-btj01bcM.js +319 -0
- package/dist/cli/upgrade-B596d4t8.js +403 -0
- package/dist/cli/upgrade-Dw3TMQzn.js +41 -0
- package/dist/cli/version-Du4CgONY.js +4 -0
- package/dist/client/index.d.ts +8 -7
- package/dist/client/index.js +9 -7
- package/dist/client/native/index.d.ts +6 -6
- package/dist/client/native/index.js +3 -3
- package/dist/client-BAEbEA7t.js +287 -0
- package/dist/cloud-event-CzZTJkXv.d.ts +64 -0
- package/dist/codecs-CMWlhHZ0.d.ts +222 -0
- package/dist/codecs-TylXqU_I.js +358 -0
- package/dist/commerce/index.d.ts +3 -3
- package/dist/commerce/index.js +6 -6
- package/dist/compiler-D3UmE7ao.d.ts +14 -0
- package/dist/compose-DKW0Tr3e.js +53 -0
- package/dist/composite-BARuBEDE.js +130 -0
- package/dist/composite-Dsxj7T5K.d.ts +82 -0
- package/dist/config/index.d.ts +6 -7
- package/dist/config/index.js +6 -6
- package/dist/config-CcehOvbz.js +1698 -0
- package/dist/config-DWGgUQCh.js +1108 -0
- package/dist/connectors-Fud4amxp.d.ts +147 -0
- package/dist/context-CEuTKrkz.d.ts +4129 -0
- package/dist/context-DBicfUNz.js +41 -0
- package/dist/controller-BNZKd6bJ.js +73 -0
- package/dist/controller-BrP0gn47.d.ts +52 -0
- package/dist/conversion-BAbucuXq.d.ts +86 -0
- package/dist/conversion-Dq1S7xzE.js +77 -0
- package/dist/create/index.d.ts +19 -21
- package/dist/create/index.js +21 -22
- package/dist/create/lite/index.d.ts +2 -2
- package/dist/create/supabase/index.d.ts +2 -2
- package/dist/create/supabase/index.js +2 -2
- package/dist/create-blocks-Bu4H5TXw.js +352 -0
- package/dist/credentials/index.d.ts +5 -5
- package/dist/credentials/index.js +6 -6
- package/dist/cron-CgHTKwYG.js +148 -0
- package/dist/cron-route-UU9i5i9J.js +24 -0
- package/dist/data-engine-BWoz9lED.d.ts +273 -0
- package/dist/data-engine-D1BkmBoR.js +173 -0
- package/dist/data-hooks-tgF1Ct0F.js +280 -0
- package/dist/db-blocks-DJGbjIPz.js +62 -0
- package/dist/deal-forecast-Bv52QMyX.js +39 -0
- package/dist/define-DFBnQyYg.d.ts +1255 -0
- package/dist/define-DlUeKHce.js +2011 -0
- package/dist/define-block-BGqOO8B3.js +64 -0
- package/dist/define-block-BVcLQ3DF.d.ts +1657 -0
- package/dist/delegation--93jRsVO.js +146 -0
- package/dist/documents-Cup1rpjF.d.ts +152 -0
- package/dist/edge/index.d.ts +20 -20
- package/dist/edge/index.js +14 -14
- package/dist/elysia/index.d.ts +1 -1
- package/dist/elysia/index.js +1 -1
- package/dist/embeddings-kFbRvuic.d.ts +78 -0
- package/dist/ended-gUsMZVNg.d.ts +26 -0
- package/dist/entitlements-CJpYQXeE.d.ts +54 -0
- package/dist/entitlements-NZAE_vLj.js +45 -0
- package/dist/entity-naming-Dtyq5sKE.js +131 -0
- package/dist/entity-schema-BDv6w-OQ.js +39 -0
- package/dist/envelope-Bzu0JnY2.js +90 -0
- package/dist/errors-BVFgt8BZ.js +328 -0
- package/dist/errors-CyxMxzlu.js +44 -0
- package/dist/escape-like-PReMbEEU.d.ts +30 -0
- package/dist/eve/index.d.ts +5 -5
- package/dist/eve/index.js +3 -3
- package/dist/eve-BFSwTu1z.d.ts +157 -0
- package/dist/event-calendar-DCufbihU.d.ts +65 -0
- package/dist/events/index.d.ts +3 -4
- package/dist/events-vcqenSYU.d.ts +852 -0
- package/dist/executor-3qcMhg6R.js +207 -0
- package/dist/executor-BQ7dYw4E.js +843 -0
- package/dist/executor-CVIn6JHa.d.ts +174 -0
- package/dist/executor-D3gB-9si.js +486 -0
- package/dist/executor-_2ekNofh.d.ts +104 -0
- package/dist/executor-hGjrop3A.d.ts +37 -0
- package/dist/expo/index.d.ts +12 -11
- package/dist/expo/index.js +11 -10
- package/dist/extension-B-lajjex.js +58 -0
- package/dist/extension-B0EjCYhO.js +61 -0
- package/dist/extension-DeAd_MqI.js +121 -0
- package/dist/extension-DzCc0IOd.js +103 -0
- package/dist/extension-shared-Djm8mGHD.js +60 -0
- package/dist/field-errors-fsbFktYF.d.ts +216 -0
- package/dist/field-formats-CAFNkKSN.d.ts +38 -0
- package/dist/fields-B0zaJAO3.js +107 -0
- package/dist/fields-C3q2ypnO.d.ts +78 -0
- package/dist/filter-evaluate-CPxeae5X.d.ts +37 -0
- package/dist/filter-evaluate-w1XOIUOL.js +217 -0
- package/dist/filter-query-BXLs72G9.d.ts +133 -0
- package/dist/filter-query-DMoKo82_.js +566 -0
- package/dist/flags-BOdA_ETQ.js +279 -0
- package/dist/flags-C01PLMJ-.d.ts +246 -0
- package/dist/flags-sdk/index.d.ts +1 -1
- package/dist/flags-sdk/index.js +2 -2
- package/dist/format-u-65igKI.d.ts +79 -0
- package/dist/framework-BKyTeS-j.d.ts +47 -0
- package/dist/framework-DDdkR7FX.js +58 -0
- package/dist/function-contract-DxFNOmsm.d.ts +27 -0
- package/dist/gateway-TD1pRfTP.d.ts +115 -0
- package/dist/h3/index.d.ts +2 -4
- package/dist/h3/index.js +2 -4
- package/dist/h3/v1/index.d.ts +2 -3
- package/dist/h3/v1/index.js +2 -3
- package/dist/hono/index.d.ts +27 -21
- package/dist/hono/index.js +22 -20
- package/dist/http-7-UvHjQe.js +28 -0
- package/dist/impersonation-DM3oWNoD.js +62 -0
- package/dist/inbox-NDKwSk_H.d.ts +321 -0
- package/dist/index-B938YqY-.d.ts +188 -0
- package/dist/index-BUuVq1co.d.ts +158 -0
- package/dist/index-BnH4Gomw.d.ts +633 -0
- package/dist/index-BxYOB1Oc.d.ts +149 -0
- package/dist/index-C-qpk8EQ.d.ts +262 -0
- package/dist/index-CG9rA8H8.d.ts +407 -0
- package/dist/index-CguFm716.d.ts +518 -0
- package/dist/index-DLq69k3F.d.ts +588 -0
- package/dist/index-Do2ChN_y.d.ts +287 -0
- package/dist/index.d.ts +39 -17
- package/dist/index.js +94 -16
- package/dist/instances-BHjCZoF8.js +277 -0
- package/dist/invalidate-DMp4eqfF.d.ts +21 -0
- package/dist/json-schema-Ca6gYbEP.js +888 -0
- package/dist/jwks-cache-DEsKI0hJ.js +49 -0
- package/dist/kit-5l-o8RxL.js +133 -0
- package/dist/kit-DOwKpSkA.d.ts +94 -0
- package/dist/knowledge-BGbtxMP9.js +300 -0
- package/dist/knowledge-CtL-Vfgy.d.ts +217 -0
- package/dist/lint/index.d.ts +94 -11
- package/dist/lint/index.js +268 -26
- package/dist/list/index.d.ts +4 -4
- package/dist/list/index.js +3 -3
- package/dist/list-query-BDVutLFr.d.ts +222 -0
- package/dist/list-query-BKy2zBaT.js +559 -0
- package/dist/live-C21DgbsD.js +275 -0
- package/dist/mapper/bin.js +380 -0
- package/dist/mcp/index.d.ts +8 -8
- package/dist/mcp/index.js +11 -11
- package/dist/mcp/sdk/index.d.ts +10 -10
- package/dist/mcp/sdk/index.js +11 -11
- package/dist/messages-D4XWuRTj.js +492 -0
- package/dist/messaging-C_Pr9tGx.d.ts +297 -0
- package/dist/methods-B3o7BFOW.js +11 -0
- package/dist/mfa-oIOYTpvc.d.ts +36 -0
- package/dist/model-hwpvole9.d.ts +340 -0
- package/dist/model-messages-CKG0zwdF.js +206 -0
- package/dist/money-codec-BzddguAQ.js +41 -0
- package/dist/nestjs/index.d.ts +3 -3
- package/dist/nestjs/index.js +2 -2
- package/dist/next/index.d.ts +244 -205
- package/dist/next/index.js +288 -197
- package/dist/node/index.d.ts +2 -2
- package/dist/node/index.js +6 -8
- package/dist/operations-CSc_IsHO.d.ts +6 -0
- package/dist/options-0qvUckqt.js +9 -0
- package/dist/options-1GgseJq5.js +10 -0
- package/dist/options-21s0dpnX.js +9 -0
- package/dist/options-B-cxGmRA.js +5 -0
- package/dist/options-B0EJULm5.js +5 -0
- package/dist/options-B2swWnJW.js +9 -0
- package/dist/options-BMGClqoa.js +11 -0
- package/dist/options-BQIYfx9F.js +9 -0
- package/dist/options-BVg58avP.js +5 -0
- package/dist/options-BbnPv6p7.js +12 -0
- package/dist/options-BfLmA375.js +5 -0
- package/dist/options-BlncUmIc.js +9 -0
- package/dist/options-BlzSfWxC.d.ts +10 -0
- package/dist/options-BnZS7IK-.js +9 -0
- package/dist/options-Bt0bYMLl.js +24 -0
- package/dist/options-BvtnxHfK.js +24 -0
- package/dist/options-C-dQHH5-.js +8 -0
- package/dist/options-C3RgtOLo.js +5 -0
- package/dist/options-CE93HOYi.d.ts +7 -0
- package/dist/options-CM6-18FQ.d.ts +13 -0
- package/dist/options-CPK2nQER.js +5 -0
- package/dist/options-CRz8Ht_4.js +9 -0
- package/dist/options-CW9wTqOk.js +11 -0
- package/dist/options-Cl9Ag2Pt.js +8 -0
- package/dist/options-Cp0HyUEk.js +9 -0
- package/dist/options-Cqq2jUww.js +10 -0
- package/dist/options-CsGl5BLH.d.ts +52 -0
- package/dist/options-CtUUU71w.js +20 -0
- package/dist/options-CvD9vNvx.js +9 -0
- package/dist/options-CyAhRKKm.d.ts +14 -0
- package/dist/options-D0G06Zm9.js +8 -0
- package/dist/options-D6as77gU.d.ts +16 -0
- package/dist/options-DChZoVfs.d.ts +11 -0
- package/dist/options-DINdgVih.d.ts +9 -0
- package/dist/options-DPgdAXO5.js +11 -0
- package/dist/options-DWVYM8P0.d.ts +17 -0
- package/dist/options-DWbA9buW.js +9 -0
- package/dist/options-DXnBN2E7.js +8 -0
- package/dist/options-D_bBVCXg.js +5 -0
- package/dist/options-DcOx8_3X.d.ts +19 -0
- package/dist/options-DeNejBtq.js +8 -0
- package/dist/options-DgQo80Xh.js +5 -0
- package/dist/options-DplE18Ko.d.ts +12 -0
- package/dist/options-HLwOuF2H.js +10 -0
- package/dist/options-KV84gAxl.js +10 -0
- package/dist/options-Li1Dyu88.d.ts +10 -0
- package/dist/options-Q1Bzgqpr.js +5 -0
- package/dist/options-_F-enoBs.d.ts +26 -0
- package/dist/options-c5WCsky5.js +21 -0
- package/dist/options-nFzfgtA6.js +5 -0
- package/dist/options-pOVWwbAK.d.ts +10 -0
- package/dist/options-y_-AkVCs.d.ts +15 -0
- package/dist/orpc/index.d.ts +69 -71
- package/dist/orpc/index.js +161 -27
- package/dist/otel/index.d.ts +3 -3
- package/dist/otel/index.js +6 -6
- package/dist/outbox-HvGAJuBe.d.ts +199 -0
- package/dist/payments-BXvabJOw.js +16 -0
- package/dist/payments-BYcN34Fp.d.ts +114 -0
- package/dist/permissions-controller-BMsqIE5T.js +34 -0
- package/dist/plugin-AKwwe2gF.js +48 -0
- package/dist/pool-CrtT4dg-.d.ts +123 -0
- package/dist/pool-errors-JUBcGrre.js +27 -0
- package/dist/ports-DOhtuw3c.js +152 -0
- package/dist/ports-sx226JUL.d.ts +89 -0
- package/dist/postgres/index.d.ts +5 -5
- package/dist/postgres/index.js +3 -3
- package/dist/postgrest-executor-BFW4oWte.js +1064 -0
- package/dist/postgrest-z-T0l23T.d.ts +53 -0
- package/dist/powersync/index.d.ts +106 -7
- package/dist/powersync/index.js +123 -7
- package/dist/preset/index.d.ts +4 -4
- package/dist/preset/index.js +4 -4
- package/dist/preset-CsHnIBJF.js +875 -0
- package/dist/problem-Bf0cJ7tk.js +162 -0
- package/dist/problem-DNwN8iGz.d.ts +79 -0
- package/dist/provider-B6g7rBZX.js +57 -0
- package/dist/provider-CqwEOLCA.d.ts +112 -0
- package/dist/push-token-D3Vcf0Pf.d.ts +24 -0
- package/dist/queries-BWYYS9um.js +239 -0
- package/dist/query/index.d.ts +4 -4
- package/dist/query/index.js +114 -48
- package/dist/rank-result-BBJIK-k_.js +18 -0
- package/dist/rank-result-Bwe7igy-.d.ts +14 -0
- package/dist/rate-limit-BWKGlhTM.js +49 -0
- package/dist/rate-limit-Bztf32cl.d.ts +50 -0
- package/dist/rate-limit-o44SYkVY.js +327 -0
- package/dist/react/index.d.ts +10 -9
- package/dist/react/index.js +5 -5
- package/dist/react/native/index.d.ts +1 -1
- package/dist/react/native/index.js +2 -3
- package/dist/react/server.d.ts +47 -15
- package/dist/react/server.js +46 -11
- package/dist/react/session.d.ts +3 -3
- package/dist/react-BuDYI62C.js +979 -0
- package/dist/react-router/index.d.ts +13 -10
- package/dist/react-router/index.js +10 -10
- package/dist/read-set-BnKnofIj.js +199 -0
- package/dist/realtime/index.d.ts +7 -7
- package/dist/realtime/index.js +4 -4
- package/dist/record-bindings-DkBJpC5A.js +26 -0
- package/dist/record-form-BYs9xv_N.d.ts +82 -0
- package/dist/record-type-DRbnlj5q.js +221 -0
- package/dist/recordings-BBSJt_YV.d.ts +119 -0
- package/dist/records/index.d.ts +28 -28
- package/dist/records/index.js +22 -23
- package/dist/refresh-DT_ICaK-.d.ts +54 -0
- package/dist/refusal-ByBZcm0V.js +64 -0
- package/dist/refusal-CSntB_x8.d.ts +32 -0
- package/dist/replicas-Dyoh3CEg.js +94 -0
- package/dist/resolve-B0mW2m7f.js +932 -0
- package/dist/resolve-CXX6DHv3.d.ts +288 -0
- package/dist/resource-D8pzB5Qf.d.ts +123 -0
- package/dist/resource-DV2GC2dB.js +520 -0
- package/dist/resource-DvgXqZB_.js +105 -0
- package/dist/resource-execute-CzHuDsil.d.ts +15 -0
- package/dist/resource-types-DnKiH4G2.d.ts +157 -0
- package/dist/resources-B9cQxhjw.d.ts +7 -0
- package/dist/resources-C02l_YBJ.js +64 -0
- package/dist/respond-C3CcOZlA.js +100 -0
- package/dist/respond-Dn1_YhC1.d.ts +106 -0
- package/dist/result-DZeA5KS6.d.ts +351 -0
- package/dist/result-ntFBW2p2.js +146 -0
- package/dist/rows-BDLZStp4.js +80 -0
- package/dist/rows-Bm6sskji.js +39 -0
- package/dist/rrule-79K2c3Nr.js +290 -0
- package/dist/run-state-BMCD_1Lt.d.ts +13 -0
- package/dist/sales-lines-Bk4mbLH1.d.ts +37 -0
- package/dist/sales-lines-D-sf9PIB.js +43 -0
- package/dist/sales-shared-DXGFJP4g.js +22 -0
- package/dist/schemas-l2aF78zQ.js +216 -0
- package/dist/scores-B2BiNuVJ.d.ts +174 -0
- package/dist/scores-CRp3vvQU.js +177 -0
- package/dist/server/index.d.ts +103 -42
- package/dist/server/index.js +98 -30
- package/dist/server-types-CFtehAsr.d.ts +946 -0
- package/dist/session-CH0SKgIz.d.ts +99 -0
- package/dist/shared-C47zAh2A.js +17 -0
- package/dist/sign-in-BAjR49fq.d.ts +24 -0
- package/dist/sign-in-BsIaNx2C.js +392 -0
- package/dist/sign-in-DNCdrk05.js +608 -0
- package/dist/signatures-CNcoq392.js +145 -0
- package/dist/signatures-Dkx9OE8j.d.ts +43 -0
- package/dist/signers-BAEzvTJ0.d.ts +390 -0
- package/dist/signing-keys-BNDUxpQL.d.ts +119 -0
- package/dist/signing-keys-wGKh4vtt.js +164 -0
- package/dist/solid/index.d.ts +52 -18
- package/dist/solid/index.js +69 -11
- package/dist/solid-start/index.d.ts +11 -11
- package/dist/solid-start/index.js +8 -8
- package/dist/spec/index.d.ts +691 -10
- package/dist/spec/index.js +2487 -5
- package/dist/spec-DTWkHzYZ.js +124 -0
- package/dist/spec-pins-C1Vm8OBl.js +61 -0
- package/dist/spec-pins-DIx95afw.d.ts +125 -0
- package/dist/sql/index.d.ts +5 -5
- package/dist/sql/index.js +5 -5
- package/dist/sql-BPbbPzRJ.js +421 -0
- package/dist/sql-ClHIdgKS.js +126996 -0
- package/dist/sqlite/index.d.ts +126 -0
- package/dist/sqlite/index.js +197 -0
- package/dist/sso-B0Txid2-.d.ts +161 -0
- package/dist/sso-d2S4x_f9.js +217 -0
- package/dist/ssr/index.d.ts +5 -4
- package/dist/ssr/index.js +3 -3
- package/dist/standard-BA3mLh6w.js +25 -0
- package/dist/standard-DBV730sF.d.ts +7 -0
- package/dist/stats-BHl1-zj9.js +83 -0
- package/dist/storage/index.d.ts +3 -3
- package/dist/storage/index.js +10 -10
- package/dist/store-CpheI-lN.d.ts +83 -0
- package/dist/streams/index.d.ts +3 -3
- package/dist/streams/index.js +2 -2
- package/dist/streams/redis/index.d.ts +2 -2
- package/dist/streams/redis/index.js +3 -3
- package/dist/subject-readers-B-pQ9Mmo.js +49 -0
- package/dist/subject-readers-BNSzkqw_.d.ts +21 -0
- package/dist/subjects-BpIEN1MS.d.ts +90 -0
- package/dist/subjects-DvmQeF_F.d.ts +79 -0
- package/dist/support-view-BYOgwXsJ.d.ts +17 -0
- package/dist/svelte/index.d.ts +52 -15
- package/dist/svelte/index.js +87 -11
- package/dist/sveltekit/index.d.ts +13 -13
- package/dist/sveltekit/index.js +13 -13
- package/dist/table-schema-BlF6k62Q.d.ts +81 -0
- package/dist/table-schema-CD8cJz_M.js +293 -0
- package/dist/tags-BjHflcHF.d.ts +30 -0
- package/dist/tags-CIZTqtlY.js +39 -0
- package/dist/tanstack-db/index.d.ts +50 -6
- package/dist/tanstack-db/index.js +43 -2
- package/dist/tanstack-start/index.d.ts +9 -9
- package/dist/tanstack-start/index.js +9 -9
- package/dist/tax-BkCNWWMc.js +140 -0
- package/dist/tax-DPShHual.d.ts +170 -0
- package/dist/tee-V97_v1ZS.js +101 -0
- package/dist/template-Drgg3v2J.js +126 -0
- package/dist/temporal-required-Dy0GGD8E.js +20 -0
- package/dist/tenant-BgIiMQpo.js +27 -0
- package/dist/tenant-yYg0E2-n.d.ts +17 -0
- package/dist/testing/index.d.ts +77 -75
- package/dist/testing/index.js +89 -99
- package/dist/timeline--VU3A1e4.js +50 -0
- package/dist/timeline-CtG0sehj.d.ts +151 -0
- package/dist/timing-dypS0nxW.js +95 -0
- package/dist/topic-CJrQZQaa.d.ts +415 -0
- package/dist/topic-ikV_pLTX.js +643 -0
- package/dist/types-BBQLbui9.d.ts +659 -0
- package/dist/types-CAQBmpDx.d.ts +217 -0
- package/dist/types-DFdg_4yN.d.ts +912 -0
- package/dist/types-Dp3UCr1e.d.ts +194 -0
- package/dist/types-Dr9wZgNy.d.ts +251 -0
- package/dist/types-EO2crSX_.d.ts +177 -0
- package/dist/types-SFRomQF7.d.ts +624 -0
- package/dist/undo-B1jwnVyN.d.ts +46 -0
- package/dist/undo-BjCChCmH.js +44 -0
- package/dist/upload-claim-B1ZU8ydB.js +33 -0
- package/dist/usage-D7QkrwzV.d.ts +232 -0
- package/dist/user-change-DgWC6RRC.js +135 -0
- package/dist/variants-Cy--Ub-a.js +53 -0
- package/dist/vault-O-YlAyHb.d.ts +62 -0
- package/dist/vercel-connect/index.d.ts +1 -1
- package/dist/vercel-connect/index.js +3 -3
- package/dist/verify-CMou8dWZ.d.ts +146 -0
- package/dist/verify-ZLFUdlqE.js +130 -0
- package/dist/view-C8Ve14ja.js +247 -0
- package/dist/view-DyFdMCqg.d.ts +97 -0
- package/dist/vue/index.d.ts +52 -23
- package/dist/vue/index.js +77 -14
- package/dist/watch-topic-BcGfvZOE.d.ts +31 -0
- package/dist/wiring-CDNuQoJJ.js +13 -0
- package/dist/workflow-sdk/builder/index.d.ts +12 -12
- package/dist/workflow-sdk/builder/index.js +16 -17
- package/dist/workflow-sdk/index.d.ts +18 -15
- package/dist/workflow-sdk/index.js +2 -2
- package/dist/workflow-sdk/world/index.d.ts +6 -6
- package/dist/workflow-sdk/world/index.js +12 -12
- package/dist/workflow-sdk-BFHu4sci.d.ts +163 -0
- package/dist/workflow-sdk-BVlFEB5Q.js +242 -0
- package/dist/workflow-sdk-Bw6_u0ar.js +2446 -0
- package/dist/workflows-B0ZPAQu0.d.ts +255 -0
- package/dist/yjs/index.d.ts +3 -3
- package/dist/yjs/index.js +2 -2
- package/package.json +75 -623
- package/schemas/config-v1.json +2082 -1754
- package/schemas/design-v1.json +141 -5
- package/schemas/doctor-report-v1.json +14 -0
- package/skills/better-supabase/SKILL.md +70 -28
- package/skills/better-supabase/references/block-extensions.md +64 -0
- package/skills/better-supabase/references/frontend.md +29 -26
- package/skills/better-supabase/references/troubleshooting.md +3 -3
- package/skills/better-supabase/references/ui-recipes.md +267 -134
- package/skills/better-supabase-api/SKILL.md +49 -38
- package/skills/better-supabase-api/references/adapters.md +42 -39
- package/skills/better-supabase-api/references/ai.md +4 -4
- package/skills/better-supabase-api/references/expo.md +8 -8
- package/skills/better-supabase-api/references/powersync.md +20 -13
- package/skills/better-supabase-api/references/streams-credentials.md +3 -3
- package/skills/better-supabase-auth/SKILL.md +17 -17
- package/skills/better-supabase-auth/references/authorization-providers.md +8 -6
- package/skills/better-supabase-testing/SKILL.md +8 -8
- package/dist/access-sql-CPoq9F86.js +0 -207
- package/dist/access-z7NwWtqx.js +0 -34
- package/dist/actor-hNajGNEK.js +0 -150
- package/dist/adapter-BCFAg58A.js +0 -2190
- package/dist/agents-CmZlLPXC.d.ts +0 -117
- package/dist/ai-cache-BxlOkc_M.d.ts +0 -82
- package/dist/ai-cache-DQikwXhJ.js +0 -87
- package/dist/ai-chat-DBxEz3o1.d.ts +0 -619
- package/dist/ai-files-t-kHmS5H.js +0 -339
- package/dist/ai-tasks-BDywBUgN.d.ts +0 -166
- package/dist/announcements-BeOD0zbc.js +0 -128
- package/dist/api-CWhpq24a.d.ts +0 -174
- package/dist/api-DKp2Ggz_.js +0 -685
- package/dist/api-keys-CboAenU8.d.ts +0 -213
- package/dist/api-keys-DT6Fi50R.js +0 -318
- package/dist/app-tables-BHrzAUFJ.d.ts +0 -27
- package/dist/app-tables-C5aoI5rZ.js +0 -959
- package/dist/approvals-bMb7dsBY.d.ts +0 -129
- package/dist/arazzo/index.d.ts +0 -278
- package/dist/arazzo/index.js +0 -630
- package/dist/assistant-D1yev_fR.d.ts +0 -157
- package/dist/asyncapi/index.d.ts +0 -110
- package/dist/asyncapi/index.js +0 -572
- package/dist/attachments-Cjdgarpa.js +0 -351
- package/dist/attributes-BOFl922R.js +0 -44
- package/dist/audit-log-C3rQxeHd.js +0 -788
- package/dist/auth-reply-jVKoAV6R.js +0 -31
- package/dist/authorization-BuT26_sR.d.ts +0 -3455
- package/dist/authorization-hooks-dLmUO_PZ.d.ts +0 -217
- package/dist/authorizer-DFP3gHv8.d.ts +0 -82
- package/dist/authorizer-DPTeL-7h.js +0 -125
- package/dist/availability-q3dZoZYM.d.ts +0 -226
- package/dist/bind-Dz8y3T5T.d.ts +0 -95
- package/dist/block-authors-BRTlT0qv.js +0 -14
- package/dist/block-controller-DTGuBemi.js +0 -112
- package/dist/block-env-DJiUu1fq.js +0 -35
- package/dist/block-env-kFcaaJLM.d.ts +0 -10
- package/dist/block-env-options-2e6IQrSw.js +0 -26
- package/dist/block-events-records-BGVyoz57.d.ts +0 -343
- package/dist/block-fields-3w4MZr8U.d.ts +0 -58
- package/dist/block-fields-DBSJSeaO.js +0 -139
- package/dist/block-helpers-BaugZlJV.d.ts +0 -62
- package/dist/block-helpers-CiKtrb6g.js +0 -353
- package/dist/block-hooks-BymdcD0V.js +0 -130
- package/dist/block-hooks-CmjPKqQ_.d.ts +0 -117
- package/dist/block-method-Bvsao626.js +0 -21
- package/dist/block-method-hsPAGFi5.d.ts +0 -19
- package/dist/block-names-Dbv_2wmE.js +0 -66
- package/dist/block-subjects-Dzq5Xn_0.js +0 -55
- package/dist/block-subjects-FHwLlIHU.d.ts +0 -6
- package/dist/block-tenant-C1sNV8_4.js +0 -14
- package/dist/block-transport-d53POsem.d.ts +0 -69
- package/dist/blocks/access/index.d.ts +0 -9
- package/dist/blocks/access/index.js +0 -18
- package/dist/blocks/access/react/index.d.ts +0 -52
- package/dist/blocks/access/react/index.js +0 -73
- package/dist/blocks/access/react/server.d.ts +0 -11
- package/dist/blocks/access/react/server.js +0 -16
- package/dist/blocks/access/solid/index.d.ts +0 -13
- package/dist/blocks/access/solid/index.js +0 -14
- package/dist/blocks/access/svelte/index.d.ts +0 -13
- package/dist/blocks/access/svelte/index.js +0 -14
- package/dist/blocks/access/vue/index.d.ts +0 -13
- package/dist/blocks/access/vue/index.js +0 -14
- package/dist/blocks/activity/index.d.ts +0 -116
- package/dist/blocks/activity/index.js +0 -164
- package/dist/blocks/ai-chat/react/index.d.ts +0 -52
- package/dist/blocks/ai-chat/react/index.js +0 -95
- package/dist/blocks/ai-chat/react/server.d.ts +0 -25
- package/dist/blocks/ai-chat/react/server.js +0 -23
- package/dist/blocks/ai-chat/solid/index.d.ts +0 -34
- package/dist/blocks/ai-chat/solid/index.js +0 -41
- package/dist/blocks/ai-chat/svelte/index.d.ts +0 -34
- package/dist/blocks/ai-chat/svelte/index.js +0 -41
- package/dist/blocks/ai-chat/vue/index.d.ts +0 -34
- package/dist/blocks/ai-chat/vue/index.js +0 -41
- package/dist/blocks/ai-providers/index.d.ts +0 -22
- package/dist/blocks/ai-providers/index.js +0 -236
- package/dist/blocks/ai-tasks/index.d.ts +0 -10
- package/dist/blocks/ai-tasks/index.js +0 -252
- package/dist/blocks/announcements/react/index.d.ts +0 -28
- package/dist/blocks/announcements/react/index.js +0 -38
- package/dist/blocks/announcements/react/server.d.ts +0 -9
- package/dist/blocks/announcements/react/server.js +0 -10
- package/dist/blocks/announcements/solid/index.d.ts +0 -13
- package/dist/blocks/announcements/solid/index.js +0 -14
- package/dist/blocks/announcements/svelte/index.d.ts +0 -13
- package/dist/blocks/announcements/svelte/index.js +0 -14
- package/dist/blocks/announcements/vue/index.d.ts +0 -13
- package/dist/blocks/announcements/vue/index.js +0 -14
- package/dist/blocks/api-keys/react/index.d.ts +0 -32
- package/dist/blocks/api-keys/react/index.js +0 -43
- package/dist/blocks/api-keys/react/server.d.ts +0 -7
- package/dist/blocks/api-keys/react/server.js +0 -7
- package/dist/blocks/api-keys/solid/index.d.ts +0 -13
- package/dist/blocks/api-keys/solid/index.js +0 -14
- package/dist/blocks/api-keys/svelte/index.d.ts +0 -13
- package/dist/blocks/api-keys/svelte/index.js +0 -14
- package/dist/blocks/api-keys/vue/index.d.ts +0 -13
- package/dist/blocks/api-keys/vue/index.js +0 -14
- package/dist/blocks/attachments/react/index.d.ts +0 -53
- package/dist/blocks/attachments/react/index.js +0 -78
- package/dist/blocks/attachments/react/server.d.ts +0 -9
- package/dist/blocks/attachments/react/server.js +0 -10
- package/dist/blocks/attachments/solid/index.d.ts +0 -13
- package/dist/blocks/attachments/solid/index.js +0 -14
- package/dist/blocks/attachments/svelte/index.d.ts +0 -13
- package/dist/blocks/attachments/svelte/index.js +0 -14
- package/dist/blocks/attachments/vue/index.d.ts +0 -13
- package/dist/blocks/attachments/vue/index.js +0 -14
- package/dist/blocks/audit/react/index.d.ts +0 -31
- package/dist/blocks/audit/react/index.js +0 -46
- package/dist/blocks/audit/react/server.d.ts +0 -7
- package/dist/blocks/audit/react/server.js +0 -7
- package/dist/blocks/audit/solid/index.d.ts +0 -13
- package/dist/blocks/audit/solid/index.js +0 -14
- package/dist/blocks/audit/svelte/index.d.ts +0 -13
- package/dist/blocks/audit/svelte/index.js +0 -14
- package/dist/blocks/audit/vue/index.d.ts +0 -13
- package/dist/blocks/audit/vue/index.js +0 -14
- package/dist/blocks/billing/react/index.d.ts +0 -44
- package/dist/blocks/billing/react/index.js +0 -40
- package/dist/blocks/billing/react/server.d.ts +0 -10
- package/dist/blocks/billing/react/server.js +0 -10
- package/dist/blocks/billing/solid/index.d.ts +0 -15
- package/dist/blocks/billing/solid/index.js +0 -14
- package/dist/blocks/billing/svelte/index.d.ts +0 -15
- package/dist/blocks/billing/svelte/index.js +0 -14
- package/dist/blocks/billing/vue/index.d.ts +0 -15
- package/dist/blocks/billing/vue/index.js +0 -14
- package/dist/blocks/bookings/react/index.d.ts +0 -36
- package/dist/blocks/bookings/react/index.js +0 -63
- package/dist/blocks/bookings/react/server.d.ts +0 -9
- package/dist/blocks/bookings/react/server.js +0 -10
- package/dist/blocks/bookings/solid/index.d.ts +0 -13
- package/dist/blocks/bookings/solid/index.js +0 -14
- package/dist/blocks/bookings/svelte/index.d.ts +0 -13
- package/dist/blocks/bookings/svelte/index.js +0 -14
- package/dist/blocks/bookings/vue/index.d.ts +0 -13
- package/dist/blocks/bookings/vue/index.js +0 -14
- package/dist/blocks/calendar/react/index.d.ts +0 -26
- package/dist/blocks/calendar/react/index.js +0 -58
- package/dist/blocks/calendar/react/server.d.ts +0 -9
- package/dist/blocks/calendar/react/server.js +0 -10
- package/dist/blocks/calendar/solid/index.d.ts +0 -13
- package/dist/blocks/calendar/solid/index.js +0 -14
- package/dist/blocks/calendar/svelte/index.d.ts +0 -13
- package/dist/blocks/calendar/svelte/index.js +0 -14
- package/dist/blocks/calendar/vue/index.d.ts +0 -13
- package/dist/blocks/calendar/vue/index.js +0 -14
- package/dist/blocks/comments/react/index.d.ts +0 -32
- package/dist/blocks/comments/react/index.js +0 -56
- package/dist/blocks/comments/react/server.d.ts +0 -7
- package/dist/blocks/comments/react/server.js +0 -7
- package/dist/blocks/comments/solid/index.d.ts +0 -13
- package/dist/blocks/comments/solid/index.js +0 -14
- package/dist/blocks/comments/svelte/index.d.ts +0 -13
- package/dist/blocks/comments/svelte/index.js +0 -14
- package/dist/blocks/comments/vue/index.d.ts +0 -13
- package/dist/blocks/comments/vue/index.js +0 -14
- package/dist/blocks/controls/index.d.ts +0 -325
- package/dist/blocks/controls/index.js +0 -410
- package/dist/blocks/engagements/index.d.ts +0 -41
- package/dist/blocks/engagements/index.js +0 -414
- package/dist/blocks/entitlements/react/index.d.ts +0 -27
- package/dist/blocks/entitlements/react/index.js +0 -35
- package/dist/blocks/entitlements/react/server.d.ts +0 -9
- package/dist/blocks/entitlements/react/server.js +0 -10
- package/dist/blocks/entitlements/solid/index.d.ts +0 -13
- package/dist/blocks/entitlements/solid/index.js +0 -14
- package/dist/blocks/entitlements/svelte/index.d.ts +0 -13
- package/dist/blocks/entitlements/svelte/index.js +0 -14
- package/dist/blocks/entitlements/vue/index.d.ts +0 -13
- package/dist/blocks/entitlements/vue/index.js +0 -14
- package/dist/blocks/forms/react/index.d.ts +0 -19
- package/dist/blocks/forms/react/index.js +0 -28
- package/dist/blocks/forms/react/server.d.ts +0 -9
- package/dist/blocks/forms/react/server.js +0 -10
- package/dist/blocks/forms/solid/index.d.ts +0 -13
- package/dist/blocks/forms/solid/index.js +0 -14
- package/dist/blocks/forms/svelte/index.d.ts +0 -13
- package/dist/blocks/forms/svelte/index.js +0 -14
- package/dist/blocks/forms/vue/index.d.ts +0 -13
- package/dist/blocks/forms/vue/index.js +0 -14
- package/dist/blocks/inbox/react/index.d.ts +0 -3
- package/dist/blocks/inbox/react/index.js +0 -87
- package/dist/blocks/inbox/react/server.d.ts +0 -17
- package/dist/blocks/inbox/react/server.js +0 -18
- package/dist/blocks/inbox/solid/index.d.ts +0 -27
- package/dist/blocks/inbox/solid/index.js +0 -32
- package/dist/blocks/inbox/svelte/index.d.ts +0 -27
- package/dist/blocks/inbox/svelte/index.js +0 -32
- package/dist/blocks/inbox/vue/index.d.ts +0 -27
- package/dist/blocks/inbox/vue/index.js +0 -32
- package/dist/blocks/jobs/index.d.ts +0 -523
- package/dist/blocks/jobs/index.js +0 -1345
- package/dist/blocks/messaging/react/index.d.ts +0 -39
- package/dist/blocks/messaging/react/index.js +0 -80
- package/dist/blocks/messaging/react/server.d.ts +0 -12
- package/dist/blocks/messaging/react/server.js +0 -14
- package/dist/blocks/messaging/solid/index.d.ts +0 -20
- package/dist/blocks/messaging/solid/index.js +0 -23
- package/dist/blocks/messaging/svelte/index.d.ts +0 -20
- package/dist/blocks/messaging/svelte/index.js +0 -23
- package/dist/blocks/messaging/vue/index.d.ts +0 -20
- package/dist/blocks/messaging/vue/index.js +0 -23
- package/dist/blocks/mfa/react/index.d.ts +0 -30
- package/dist/blocks/mfa/react/index.js +0 -45
- package/dist/blocks/mfa/react/server.d.ts +0 -9
- package/dist/blocks/mfa/react/server.js +0 -12
- package/dist/blocks/mfa/solid/index.d.ts +0 -20
- package/dist/blocks/mfa/solid/index.js +0 -23
- package/dist/blocks/mfa/svelte/index.d.ts +0 -20
- package/dist/blocks/mfa/svelte/index.js +0 -23
- package/dist/blocks/mfa/vue/index.d.ts +0 -20
- package/dist/blocks/mfa/vue/index.js +0 -23
- package/dist/blocks/notifications/react/index.d.ts +0 -19
- package/dist/blocks/notifications/react/index.js +0 -41
- package/dist/blocks/notifications/react/server.d.ts +0 -10
- package/dist/blocks/notifications/react/server.js +0 -10
- package/dist/blocks/notifications/solid/index.d.ts +0 -13
- package/dist/blocks/notifications/solid/index.js +0 -14
- package/dist/blocks/notifications/svelte/index.d.ts +0 -13
- package/dist/blocks/notifications/svelte/index.js +0 -14
- package/dist/blocks/notifications/vue/index.d.ts +0 -13
- package/dist/blocks/notifications/vue/index.js +0 -14
- package/dist/blocks/number-sequences/index.d.ts +0 -48
- package/dist/blocks/number-sequences/index.js +0 -52
- package/dist/blocks/onboarding/react/index.d.ts +0 -24
- package/dist/blocks/onboarding/react/index.js +0 -38
- package/dist/blocks/onboarding/react/server.d.ts +0 -10
- package/dist/blocks/onboarding/react/server.js +0 -10
- package/dist/blocks/onboarding/solid/index.d.ts +0 -13
- package/dist/blocks/onboarding/solid/index.js +0 -14
- package/dist/blocks/onboarding/svelte/index.d.ts +0 -13
- package/dist/blocks/onboarding/svelte/index.js +0 -14
- package/dist/blocks/onboarding/vue/index.d.ts +0 -13
- package/dist/blocks/onboarding/vue/index.js +0 -14
- package/dist/blocks/organizations/react/index.d.ts +0 -127
- package/dist/blocks/organizations/react/index.js +0 -113
- package/dist/blocks/organizations/react/server.d.ts +0 -20
- package/dist/blocks/organizations/react/server.js +0 -24
- package/dist/blocks/organizations/solid/index.d.ts +0 -34
- package/dist/blocks/organizations/solid/index.js +0 -32
- package/dist/blocks/organizations/svelte/index.d.ts +0 -34
- package/dist/blocks/organizations/svelte/index.js +0 -32
- package/dist/blocks/organizations/vue/index.d.ts +0 -34
- package/dist/blocks/organizations/vue/index.js +0 -32
- package/dist/blocks/parties/index.d.ts +0 -182
- package/dist/blocks/parties/index.js +0 -358
- package/dist/blocks/reactions/react/index.d.ts +0 -32
- package/dist/blocks/reactions/react/index.js +0 -57
- package/dist/blocks/reactions/react/server.d.ts +0 -9
- package/dist/blocks/reactions/react/server.js +0 -10
- package/dist/blocks/reactions/solid/index.d.ts +0 -13
- package/dist/blocks/reactions/solid/index.js +0 -14
- package/dist/blocks/reactions/svelte/index.d.ts +0 -13
- package/dist/blocks/reactions/svelte/index.js +0 -14
- package/dist/blocks/reactions/vue/index.d.ts +0 -13
- package/dist/blocks/reactions/vue/index.js +0 -14
- package/dist/blocks/rules/index.d.ts +0 -175
- package/dist/blocks/rules/index.js +0 -163
- package/dist/blocks/rules/react/index.d.ts +0 -38
- package/dist/blocks/rules/react/index.js +0 -59
- package/dist/blocks/rules/react/server.d.ts +0 -6
- package/dist/blocks/rules/react/server.js +0 -7
- package/dist/blocks/rules/solid/index.d.ts +0 -13
- package/dist/blocks/rules/solid/index.js +0 -14
- package/dist/blocks/rules/svelte/index.d.ts +0 -13
- package/dist/blocks/rules/svelte/index.js +0 -14
- package/dist/blocks/rules/vue/index.d.ts +0 -13
- package/dist/blocks/rules/vue/index.js +0 -14
- package/dist/blocks/saved-views/react/index.d.ts +0 -40
- package/dist/blocks/saved-views/react/index.js +0 -60
- package/dist/blocks/saved-views/react/server.d.ts +0 -10
- package/dist/blocks/saved-views/react/server.js +0 -10
- package/dist/blocks/saved-views/solid/index.d.ts +0 -13
- package/dist/blocks/saved-views/solid/index.js +0 -14
- package/dist/blocks/saved-views/svelte/index.d.ts +0 -13
- package/dist/blocks/saved-views/svelte/index.js +0 -14
- package/dist/blocks/saved-views/vue/index.d.ts +0 -13
- package/dist/blocks/saved-views/vue/index.js +0 -14
- package/dist/blocks/search/react/index.d.ts +0 -39
- package/dist/blocks/search/react/index.js +0 -49
- package/dist/blocks/search/react/server.d.ts +0 -10
- package/dist/blocks/search/react/server.js +0 -11
- package/dist/blocks/search/solid/index.d.ts +0 -13
- package/dist/blocks/search/solid/index.js +0 -14
- package/dist/blocks/search/svelte/index.d.ts +0 -13
- package/dist/blocks/search/svelte/index.js +0 -14
- package/dist/blocks/search/vue/index.d.ts +0 -13
- package/dist/blocks/search/vue/index.js +0 -14
- package/dist/blocks/service-principals/index.d.ts +0 -132
- package/dist/blocks/service-principals/index.js +0 -109
- package/dist/blocks/sessions/react/index.d.ts +0 -36
- package/dist/blocks/sessions/react/index.js +0 -53
- package/dist/blocks/sessions/react/server.d.ts +0 -15
- package/dist/blocks/sessions/react/server.js +0 -17
- package/dist/blocks/sessions/solid/index.d.ts +0 -20
- package/dist/blocks/sessions/solid/index.js +0 -23
- package/dist/blocks/sessions/svelte/index.d.ts +0 -20
- package/dist/blocks/sessions/svelte/index.js +0 -23
- package/dist/blocks/sessions/vue/index.d.ts +0 -20
- package/dist/blocks/sessions/vue/index.js +0 -23
- package/dist/blocks/settings/react/index.d.ts +0 -31
- package/dist/blocks/settings/react/index.js +0 -37
- package/dist/blocks/settings/react/server.d.ts +0 -10
- package/dist/blocks/settings/react/server.js +0 -10
- package/dist/blocks/settings/solid/index.d.ts +0 -13
- package/dist/blocks/settings/solid/index.js +0 -14
- package/dist/blocks/settings/svelte/index.d.ts +0 -13
- package/dist/blocks/settings/svelte/index.js +0 -14
- package/dist/blocks/settings/vue/index.d.ts +0 -13
- package/dist/blocks/settings/vue/index.js +0 -14
- package/dist/blocks/shared-signals/index.d.ts +0 -440
- package/dist/blocks/shared-signals/index.js +0 -885
- package/dist/blocks/subjects/react/index.d.ts +0 -31
- package/dist/blocks/subjects/react/index.js +0 -60
- package/dist/blocks/subjects/react/server.d.ts +0 -9
- package/dist/blocks/subjects/react/server.js +0 -12
- package/dist/blocks/subjects/solid/index.d.ts +0 -13
- package/dist/blocks/subjects/solid/index.js +0 -14
- package/dist/blocks/subjects/svelte/index.d.ts +0 -13
- package/dist/blocks/subjects/svelte/index.js +0 -14
- package/dist/blocks/subjects/vue/index.d.ts +0 -13
- package/dist/blocks/subjects/vue/index.js +0 -14
- package/dist/blocks/tags/react/index.d.ts +0 -29
- package/dist/blocks/tags/react/index.js +0 -53
- package/dist/blocks/tags/react/server.d.ts +0 -7
- package/dist/blocks/tags/react/server.js +0 -7
- package/dist/blocks/tags/solid/index.d.ts +0 -13
- package/dist/blocks/tags/solid/index.js +0 -14
- package/dist/blocks/tags/svelte/index.d.ts +0 -13
- package/dist/blocks/tags/svelte/index.js +0 -14
- package/dist/blocks/tags/vue/index.d.ts +0 -13
- package/dist/blocks/tags/vue/index.js +0 -14
- package/dist/blocks/targets/index.d.ts +0 -82
- package/dist/blocks/targets/index.js +0 -72
- package/dist/blocks/undo/react/index.d.ts +0 -17
- package/dist/blocks/undo/react/index.js +0 -24
- package/dist/blocks/undo/react/server.d.ts +0 -10
- package/dist/blocks/undo/react/server.js +0 -10
- package/dist/blocks/undo/solid/index.d.ts +0 -13
- package/dist/blocks/undo/solid/index.js +0 -14
- package/dist/blocks/undo/svelte/index.d.ts +0 -13
- package/dist/blocks/undo/svelte/index.js +0 -14
- package/dist/blocks/undo/vue/index.d.ts +0 -13
- package/dist/blocks/undo/vue/index.js +0 -14
- package/dist/blocks/usage/react/index.d.ts +0 -29
- package/dist/blocks/usage/react/index.js +0 -38
- package/dist/blocks/usage/react/server.d.ts +0 -7
- package/dist/blocks/usage/react/server.js +0 -7
- package/dist/blocks/usage/solid/index.d.ts +0 -13
- package/dist/blocks/usage/solid/index.js +0 -14
- package/dist/blocks/usage/svelte/index.d.ts +0 -13
- package/dist/blocks/usage/svelte/index.js +0 -14
- package/dist/blocks/usage/vue/index.d.ts +0 -13
- package/dist/blocks/usage/vue/index.js +0 -14
- package/dist/blocks/work-items/index.d.ts +0 -87
- package/dist/blocks/work-items/index.js +0 -431
- package/dist/blocks/workflow-builder/index.d.ts +0 -43
- package/dist/blocks/workflow-builder/index.js +0 -33
- package/dist/blocks/workflow-builder/react/index.d.ts +0 -32
- package/dist/blocks/workflow-builder/react/index.js +0 -75
- package/dist/blocks/workflow-builder/react/server.d.ts +0 -14
- package/dist/blocks/workflow-builder/react/server.js +0 -17
- package/dist/blocks/workflow-builder/solid/index.d.ts +0 -20
- package/dist/blocks/workflow-builder/solid/index.js +0 -23
- package/dist/blocks/workflow-builder/svelte/index.d.ts +0 -20
- package/dist/blocks/workflow-builder/svelte/index.js +0 -23
- package/dist/blocks/workflow-builder/vue/index.d.ts +0 -20
- package/dist/blocks/workflow-builder/vue/index.js +0 -23
- package/dist/blocks/workflows/react/index.d.ts +0 -39
- package/dist/blocks/workflows/react/index.js +0 -65
- package/dist/blocks/workflows/react/server.d.ts +0 -14
- package/dist/blocks/workflows/react/server.js +0 -17
- package/dist/blocks/workflows/solid/index.d.ts +0 -20
- package/dist/blocks/workflows/solid/index.js +0 -23
- package/dist/blocks/workflows/svelte/index.d.ts +0 -20
- package/dist/blocks/workflows/svelte/index.js +0 -23
- package/dist/blocks/workflows/vue/index.d.ts +0 -20
- package/dist/blocks/workflows/vue/index.js +0 -23
- package/dist/bookings-BB5lFlNO.js +0 -310
- package/dist/bookings-CC7IeiRa.d.ts +0 -290
- package/dist/bucket-TkB7_xv8.d.ts +0 -667
- package/dist/build-DCfpwg78.js +0 -1839
- package/dist/build-g9wTbQdp.js +0 -703
- package/dist/calendar-T3Vdpq7E.js +0 -952
- package/dist/carrier-C7Q_21Kd.d.ts +0 -169
- package/dist/chat-sdk/react/index.d.ts +0 -3
- package/dist/chat-sdk/react/index.js +0 -2
- package/dist/chat-sdk/react/server.d.ts +0 -4
- package/dist/chat-sdk/react/server.js +0 -1
- package/dist/claims-T8TWZ53E.js +0 -63
- package/dist/cli/add-Bf3kE6PY.js +0 -75
- package/dist/cli/add-CYh6Sxk1.js +0 -674
- package/dist/cli/add-Dg40eFKE.js +0 -1
- package/dist/cli/adopt-B0vrj-4B.js +0 -421
- package/dist/cli/adopt-DJR1k3lS.js +0 -1
- package/dist/cli/apply-DUQ-5LC6.js +0 -329
- package/dist/cli/blocks-DzgYfjVv.js +0 -124
- package/dist/cli/blocks-gGupqvBH.js +0 -1
- package/dist/cli/cache-C3K_wOE2.js +0 -536
- package/dist/cli/catalog-CNM0ViIh.js +0 -199
- package/dist/cli/codemod-Dz4R-tVY.js +0 -1127
- package/dist/cli/command-33pu13LT.js +0 -963
- package/dist/cli/completion-6M6Hr8TL.js +0 -211
- package/dist/cli/completion-Bqu8yq0q.js +0 -1
- package/dist/cli/completion-Ddr3yqd3.js +0 -30
- package/dist/cli/config-B31tIvAl.js +0 -42
- package/dist/cli/config-CjgXMZW2.js +0 -1522
- package/dist/cli/config-D9k5ckqV.js +0 -1
- package/dist/cli/config-edit-D46H0UHp.js +0 -613
- package/dist/cli/db-CeagtENM.js +0 -473
- package/dist/cli/design-edit-B40ljpGZ.js +0 -205
- package/dist/cli/detect-RApSAA8v.js +0 -84
- package/dist/cli/dist-DSwzLVAG.js +0 -129
- package/dist/cli/doctor-COGJJ1gy.js +0 -3898
- package/dist/cli/emit-DbQeLlHt.js +0 -1123
- package/dist/cli/env-Ba-pOD3a.js +0 -1
- package/dist/cli/env-DlgfvI8U.js +0 -143
- package/dist/cli/files-C5JfVnj5.js +0 -972
- package/dist/cli/gen-DHW1qENn.js +0 -307
- package/dist/cli/init-CZifzAUD.js +0 -397
- package/dist/cli/introspect-Dfwu5vAg.js +0 -51
- package/dist/cli/keys-iJs_1WT8.js +0 -106
- package/dist/cli/live-1eL2MIkS.js +0 -344
- package/dist/cli/mcp-CaFW6uKU.js +0 -240
- package/dist/cli/metadata-DkOQHZoH.js +0 -146
- package/dist/cli/migration-safety-BsCKKxPf.js +0 -305
- package/dist/cli/module-migration-CbX-jRhV.js +0 -606
- package/dist/cli/moved-CdNtCf4t.js +0 -161
- package/dist/cli/names-D6LrQnOv.js +0 -6
- package/dist/cli/parse-CRZLku1b.js +0 -182
- package/dist/cli/preset-C4fagbhZ.js +0 -130
- package/dist/cli/run-CE2s5TDh.js +0 -711
- package/dist/cli/run-Du5XPOCv.js +0 -63
- package/dist/cli/run-KXjrgNCH.js +0 -2378
- package/dist/cli/scaffold-CPH8sEhw.js +0 -901
- package/dist/cli/scaffold-DS6g3INp.js +0 -1
- package/dist/cli/seed-D6V-T5Af.js +0 -188
- package/dist/cli/seed-DPQaA8aP.js +0 -1
- package/dist/cli/shared-CCpxS5if.js +0 -151
- package/dist/cli/skills-Bz4INB8f.js +0 -121
- package/dist/cli/snapshot-Dkwxc1uV.js +0 -351
- package/dist/cli/source-args-DZV4RnZL.js +0 -59
- package/dist/cli/spec-B3Tbc7Dm.js +0 -7534
- package/dist/cli/spec-Cv1GYrcW.js +0 -1
- package/dist/cli/sql-C58MS9DI.js +0 -348
- package/dist/cli/sql-DVPw5tvO.js +0 -2
- package/dist/cli/stack-_F_JhllX.js +0 -135
- package/dist/cli/sync-CjkKpI6d.js +0 -91
- package/dist/cli/typegen-F9GEjpvD.js +0 -502
- package/dist/cli/typegen-version-BNBPI4Eu.js +0 -9
- package/dist/cli/version-CTqnp3HO.js +0 -4
- package/dist/cli/write-3qdrpS1v.js +0 -201
- package/dist/client--tyFmxDT.js +0 -52
- package/dist/client-7_4Y21ue.d.ts +0 -122
- package/dist/client-B1cjaIfv.js +0 -116
- package/dist/client-B2GCMvfd.d.ts +0 -451
- package/dist/client-B8cHiZfF.js +0 -67
- package/dist/client-BIMg9IiF.d.ts +0 -349
- package/dist/client-BKGVUgo7.js +0 -380
- package/dist/client-BNaOcfeH.js +0 -58
- package/dist/client-BQseXods.d.ts +0 -309
- package/dist/client-BSnf6fn6.d.ts +0 -59
- package/dist/client-BW3-RUbq.js +0 -235
- package/dist/client-BYAY7lLs.d.ts +0 -137
- package/dist/client-BcXmbm4f.js +0 -173
- package/dist/client-BgmVu505.js +0 -167
- package/dist/client-Bj0xrUzr.js +0 -437
- package/dist/client-Bn0qqRBg.d.ts +0 -37
- package/dist/client-Bni68sve.d.ts +0 -136
- package/dist/client-BrtwaIBh.d.ts +0 -74
- package/dist/client-BtRx0-kn.js +0 -82
- package/dist/client-BteuBPIy.js +0 -337
- package/dist/client-C1TxDBgX.js +0 -111
- package/dist/client-C1zOmnS8.js +0 -89
- package/dist/client-C56l0MnY.d.ts +0 -177
- package/dist/client-CA6KuLDu.d.ts +0 -223
- package/dist/client-CBcq7LBg.d.ts +0 -178
- package/dist/client-CGJrSTMZ.js +0 -234
- package/dist/client-CLIBcMzL.d.ts +0 -116
- package/dist/client-COuIfjbB.d.ts +0 -46
- package/dist/client-CVToJ4uI.js +0 -84
- package/dist/client-C_0XZieg.js +0 -287
- package/dist/client-CebKlRU7.js +0 -157
- package/dist/client-ChOJ4v0D.js +0 -137
- package/dist/client-CnENAa0E.d.ts +0 -69
- package/dist/client-Cp79i2ZE.d.ts +0 -152
- package/dist/client-CwKsEl6q.js +0 -99
- package/dist/client-D-LPdEDQ.d.ts +0 -43
- package/dist/client-D6gD9qt9.d.ts +0 -45
- package/dist/client-DBwWXQKF.d.ts +0 -132
- package/dist/client-DD3EcytK.js +0 -65
- package/dist/client-DScMvaty.js +0 -38
- package/dist/client-DT6Tvudr.d.ts +0 -54
- package/dist/client-DU1_Jq4e.d.ts +0 -116
- package/dist/client-Dd-a0tup.d.ts +0 -475
- package/dist/client-Dh8zXgpq.js +0 -1060
- package/dist/client-DkI0oyR7.js +0 -76
- package/dist/client-DmjG9PHH.js +0 -211
- package/dist/client-DnUFHmje.js +0 -129
- package/dist/client-Do5hykMK.d.ts +0 -38
- package/dist/client-DzOL3lsV.d.ts +0 -110
- package/dist/client-DzukpHS1.d.ts +0 -165
- package/dist/client-LngH55pZ.d.ts +0 -83
- package/dist/client-PPSwiJaK.js +0 -291
- package/dist/client-RoAuPQNB.d.ts +0 -103
- package/dist/client-WzuQExHk.js +0 -253
- package/dist/client-Y_HnZGF4.js +0 -51
- package/dist/client-bDXsvSXp.d.ts +0 -90
- package/dist/client-bx3Bk7c5.d.ts +0 -64
- package/dist/client-jgDU7Roj.d.ts +0 -144
- package/dist/client-kRvHKAKS.js +0 -60
- package/dist/client-pxXoQOdC.js +0 -40
- package/dist/client-yIxEJwTK.js +0 -121
- package/dist/cloud-event-SPyXMdcd.d.ts +0 -64
- package/dist/codecs-CQrX3ZW4.js +0 -358
- package/dist/codecs-DAu2sYWn.d.ts +0 -222
- package/dist/comments-CB8pFSV1.js +0 -142
- package/dist/compiler-BCyHFI6n.d.ts +0 -14
- package/dist/compose--4D1FoPN.js +0 -53
- package/dist/composite-Dv6o2BSw.js +0 -130
- package/dist/composite-KllwFim2.d.ts +0 -82
- package/dist/config-BuOz_O-y.d.ts +0 -2152
- package/dist/config-Dh4D8lBa.js +0 -13931
- package/dist/config-Dn0cC3bM.js +0 -1093
- package/dist/connector-BdCE4Efp.d.ts +0 -164
- package/dist/connectors-DDiSNvkF.d.ts +0 -147
- package/dist/context-9Q23weHu.d.ts +0 -524
- package/dist/context-CMxVnPMY.js +0 -9
- package/dist/context-CYquqpA6.js +0 -41
- package/dist/controller-CSsC9s3s.js +0 -73
- package/dist/controller-DAD4hbl4.d.ts +0 -52
- package/dist/create-blocks-kPUhCvje.js +0 -217
- package/dist/cron-_i5pBGkY.js +0 -148
- package/dist/cron-route-Y0eJ-FNi.js +0 -24
- package/dist/deal-forecast-CBlp20PY.js +0 -39
- package/dist/define-DQznpZYl.js +0 -2023
- package/dist/define-Dw7pRO4h.d.ts +0 -1123
- package/dist/define-block-COpcS6aT.d.ts +0 -1338
- package/dist/define-block-Dze77QTw.js +0 -56
- package/dist/delegation-CeXm9AJ3.js +0 -146
- package/dist/documents-kgDOHUfn.d.ts +0 -152
- package/dist/embeddings-CcRP-cMN.d.ts +0 -78
- package/dist/employees-Dwyvxs4r.d.ts +0 -180
- package/dist/ended--Bd_Q6uL.d.ts +0 -76
- package/dist/engagements-CsJhf2OM.d.ts +0 -179
- package/dist/entitlements-B_ttRvI6.js +0 -45
- package/dist/entitlements-DDevu4ZE.d.ts +0 -54
- package/dist/entity-form-B67vq97h.d.ts +0 -82
- package/dist/entity-naming-DLDhHTbK.js +0 -131
- package/dist/entity-schema-BXXC1NnT.js +0 -39
- package/dist/envelope-DCfHtVtZ.js +0 -90
- package/dist/errors-03ysrOt4.js +0 -325
- package/dist/errors-DZx8w-MH.js +0 -44
- package/dist/escape-like-BfXS-iVe.d.ts +0 -30
- package/dist/eve-BlJI8ZXL.d.ts +0 -157
- package/dist/event-calendar-D3SVa3AE.d.ts +0 -65
- package/dist/events-DbLjvxDX.d.ts +0 -852
- package/dist/executor-BDAGTc_O.js +0 -207
- package/dist/executor-BElVQpaB.d.ts +0 -188
- package/dist/executor-CPyrQdjh.d.ts +0 -700
- package/dist/executor-CsTaO3AT.d.ts +0 -37
- package/dist/executor-DQoczQZJ.d.ts +0 -104
- package/dist/executor-QtVn0axs.js +0 -147
- package/dist/executor-o9HkOJ0m.js +0 -869
- package/dist/expo-sqlite/index.d.ts +0 -61
- package/dist/expo-sqlite/index.js +0 -110
- package/dist/feature-BBLdbGu7.js +0 -224
- package/dist/field-errors-vshYTVKr.d.ts +0 -166
- package/dist/field-formats-DbjaDXoZ.d.ts +0 -39
- package/dist/fields-CanaxA0U.d.ts +0 -75
- package/dist/fields-DK30XCgc.js +0 -107
- package/dist/filter-evaluate-C3i2bGfk.d.ts +0 -37
- package/dist/filter-evaluate-CRDXv0Dl.js +0 -217
- package/dist/filter-query-D4ZSwbcJ.js +0 -524
- package/dist/filter-query-o3b_GuyC.d.ts +0 -133
- package/dist/flags-BTDPaN11.d.ts +0 -246
- package/dist/flags-BhYByvP1.js +0 -279
- package/dist/flows/index.d.ts +0 -247
- package/dist/flows/index.js +0 -229
- package/dist/format-AYHceC2m.d.ts +0 -79
- package/dist/framework-CXoyWGgd.js +0 -57
- package/dist/framework-FxfJpyoF.d.ts +0 -41
- package/dist/function-contract-vPqwt1j4.d.ts +0 -27
- package/dist/gateway-DI8dbOml.d.ts +0 -115
- package/dist/graph-B4eubUQG.js +0 -365
- package/dist/groups-CxonH3u5.js +0 -16
- package/dist/http-51t9xppD.js +0 -28
- package/dist/impersonation-CZD9AOAk.js +0 -62
- package/dist/inbox-BPBb6etH.d.ts +0 -321
- package/dist/index-BSUX4dlB.d.ts +0 -305
- package/dist/index-BgSuw4CC.d.ts +0 -151
- package/dist/index-C7CrdGgz.d.ts +0 -562
- package/dist/index-CvxK2BZS.d.ts +0 -847
- package/dist/index-CxZQgNVE.d.ts +0 -62
- package/dist/index-D4420jLW.d.ts +0 -66
- package/dist/index-DK-YTWLd.d.ts +0 -443
- package/dist/index-DbXWcrOI.d.ts +0 -577
- package/dist/index-U0o7kU0s.d.ts +0 -69
- package/dist/index-WEafENqH.d.ts +0 -149
- package/dist/index-Yep7auV-.d.ts +0 -287
- package/dist/index-eTY4kJzo.d.ts +0 -163
- package/dist/invalidate-BLiBFbLy.d.ts +0 -19
- package/dist/json-schema-DWDTfD8J.js +0 -888
- package/dist/jwks-cache-CRymV-Dr.js +0 -49
- package/dist/kit-Ct4Z6GIO.js +0 -127
- package/dist/kit-DKfbNTAA.d.ts +0 -94
- package/dist/knowledge-BKGrXdS_.js +0 -272
- package/dist/knowledge-CFkCRxO9.d.ts +0 -202
- package/dist/list-query-BtluNnYk.d.ts +0 -222
- package/dist/list-query-CuS1w2Af.js +0 -559
- package/dist/live-CZtRMh62.js +0 -246
- package/dist/mentions-ByYnRNIG.js +0 -114
- package/dist/messages-DNzIVvgN.js +0 -492
- package/dist/messaging-BC-P-yAv.js +0 -329
- package/dist/messaging-CZ6aWb10.d.ts +0 -297
- package/dist/methods-7u6vSgz_.js +0 -11
- package/dist/mfa-wrx1rqJT.d.ts +0 -36
- package/dist/model-Btl8X9cs.d.ts +0 -326
- package/dist/model-messages-D-jVOIOK.js +0 -206
- package/dist/money-codec-jMP0PQLZ.js +0 -41
- package/dist/onboarding-CGMuX7sP.js +0 -68
- package/dist/openapi/index.d.ts +0 -5
- package/dist/openapi/index.js +0 -36
- package/dist/operations-nWYRexee.d.ts +0 -6
- package/dist/options-289GJc2l.d.ts +0 -52
- package/dist/options-70OsM-wK.js +0 -10
- package/dist/options-B7EJaOX-.js +0 -5
- package/dist/options-BkpqTGrJ.js +0 -8
- package/dist/options-Blg8lAkz.js +0 -9
- package/dist/options-Bn4cu0gt.js +0 -5
- package/dist/options-BnoJOwXK.js +0 -8
- package/dist/options-C2HesT4A.js +0 -9
- package/dist/options-C3EzJATk.js +0 -10
- package/dist/options-C3hZ1fbC.js +0 -10
- package/dist/options-CAzVf-1T.js +0 -8
- package/dist/options-CGKSUFUq.js +0 -5
- package/dist/options-CGjGE8xS.js +0 -12
- package/dist/options-CUqQ9pm7.js +0 -9
- package/dist/options-CalPr6kN.d.ts +0 -12
- package/dist/options-CfxBliP6.d.ts +0 -17
- package/dist/options-ChD15QxJ.js +0 -9
- package/dist/options-CmoJsd4V.d.ts +0 -8
- package/dist/options-CyD7OObW.js +0 -17
- package/dist/options-D1blDihM.js +0 -9
- package/dist/options-D2Gd6VfS.js +0 -8
- package/dist/options-D4aD9qwB.js +0 -5
- package/dist/options-D65jzn7S.js +0 -5
- package/dist/options-D7f2VKzj.js +0 -25
- package/dist/options-D7sgG1bQ.js +0 -16
- package/dist/options-DJm31rsi.d.ts +0 -16
- package/dist/options-DXqcJyOP.js +0 -10
- package/dist/options-DXuA4JVa.d.ts +0 -15
- package/dist/options-DZupPoI0.d.ts +0 -10
- package/dist/options-Dm-2crCx.d.ts +0 -273
- package/dist/options-Dmg1Da9P.js +0 -25
- package/dist/options-DsUgamiy.js +0 -5
- package/dist/options-DujalSfR.js +0 -10
- package/dist/options-Dz3hJxUw.d.ts +0 -10
- package/dist/options-HSv8R6h5.js +0 -13
- package/dist/options-I8zVkB_y.js +0 -8
- package/dist/options-MHhjOoWz.js +0 -5
- package/dist/options-MLxMkd5B.js +0 -11
- package/dist/options-MQfTGMgP.d.ts +0 -14
- package/dist/options-OJ5zmgr8.js +0 -10
- package/dist/options-OMAUVcKK.d.ts +0 -10
- package/dist/options-_9arpsX9.js +0 -11
- package/dist/options-a-28mlYT.js +0 -9
- package/dist/options-kLKILdIu.js +0 -10
- package/dist/options-n22NK3PL.js +0 -8
- package/dist/options-qU8vgxhO.js +0 -18
- package/dist/options-te6d5-yz.d.ts +0 -19
- package/dist/options-wFnK3qWl.js +0 -9
- package/dist/options-xVAy3UsV.js +0 -9
- package/dist/organizations-DtehZg3J.js +0 -401
- package/dist/outbox-CsF_iKjx.d.ts +0 -199
- package/dist/overlay/index.d.ts +0 -249
- package/dist/overlay/index.js +0 -561
- package/dist/payments-BtScsgPS.js +0 -16
- package/dist/payments-CBzQIjoX.d.ts +0 -114
- package/dist/permissions-BetA_Fo_.js +0 -34
- package/dist/plugin-Ar5546xh.d.ts +0 -202
- package/dist/plugin-D9bYbYli.js +0 -45
- package/dist/plugins/actor/index.d.ts +0 -19
- package/dist/plugins/actor/index.js +0 -57
- package/dist/plugins/rules/index.d.ts +0 -96
- package/dist/plugins/rules/index.js +0 -235
- package/dist/plugins/soft-delete/index.d.ts +0 -39
- package/dist/plugins/soft-delete/index.js +0 -90
- package/dist/plugins/tenant/index.d.ts +0 -60
- package/dist/plugins/tenant/index.js +0 -119
- package/dist/plugins/timestamps/index.d.ts +0 -11
- package/dist/plugins/timestamps/index.js +0 -47
- package/dist/plugins/validation/index.d.ts +0 -24
- package/dist/plugins/validation/index.js +0 -83
- package/dist/pool-CRkU15dA.d.ts +0 -123
- package/dist/pool-errors-B17BQRW-.js +0 -27
- package/dist/ports-DsJicwI2.d.ts +0 -89
- package/dist/ports-yajgT0t0.js +0 -139
- package/dist/postgrest-DHLlN2nS.d.ts +0 -53
- package/dist/powersync/react/index.d.ts +0 -93
- package/dist/powersync/react/index.js +0 -120
- package/dist/preset-DzcQ5CQM.js +0 -841
- package/dist/problem-BWElIgIb.js +0 -162
- package/dist/problem-DpHB7tWl.d.ts +0 -79
- package/dist/provider-DmiaI1qt.d.ts +0 -112
- package/dist/provider-EJ0-5GwJ.js +0 -57
- package/dist/push-token-BxKmYhwk.d.ts +0 -24
- package/dist/queries-Dw8y9bvz.js +0 -245
- package/dist/rank-result-C_sHjkiz.js +0 -18
- package/dist/rank-result-DwR0FawB.d.ts +0 -14
- package/dist/rate-limit-B_U12PdL.js +0 -49
- package/dist/rate-limit-CrOuXfjj.d.ts +0 -50
- package/dist/rate-limit-DExDw3Cy.js +0 -327
- package/dist/react-28VgUbm9.js +0 -852
- package/dist/react-controller-CKSdtJ10.js +0 -43
- package/dist/react-env-CfA3EdBH.js +0 -20
- package/dist/read-set-BAR84kPC.js +0 -199
- package/dist/recordings-DgDu7AOt.d.ts +0 -119
- package/dist/refusal-DXydjgsS.js +0 -64
- package/dist/refusal-efy5bZMd.d.ts +0 -32
- package/dist/replicas-BvIL4_jL.js +0 -94
- package/dist/resolve-CzUKTIMq.d.ts +0 -289
- package/dist/resolve-DAYdcs22.js +0 -892
- package/dist/resolved-names-Dr7brlLL.js +0 -133
- package/dist/resource-BRRU-A7j.js +0 -91
- package/dist/resource-DYDEnww-.d.ts +0 -115
- package/dist/resource-Dk_JYsOt.js +0 -469
- package/dist/resource-execute-bT9ltHVT.d.ts +0 -15
- package/dist/resource-types-Bzt_bpR5.d.ts +0 -153
- package/dist/resources-BV6j5TTD.js +0 -64
- package/dist/resources-Du5wcL3f.d.ts +0 -7
- package/dist/respond-CZYibxUx.d.ts +0 -101
- package/dist/respond-z_yfyitp.js +0 -100
- package/dist/result-B3m7xtRY.js +0 -146
- package/dist/result-C6jDfedy.d.ts +0 -350
- package/dist/rows-Bb0EPupt.js +0 -80
- package/dist/rows-CtLWqdGQ.js +0 -39
- package/dist/rrule-xDm2znty.js +0 -290
- package/dist/rules-DcW5mj1r.js +0 -287
- package/dist/run-state-CPo-1X2B.d.ts +0 -12
- package/dist/sales-lines-9HsX89aO.d.ts +0 -28
- package/dist/sales-lines-BhrIx2oK.js +0 -41
- package/dist/sales-shared-C_u68eq2.js +0 -22
- package/dist/sales-shared-DAAGwQwN.d.ts +0 -8
- package/dist/schemas-9Ci3K0Hk.js +0 -103
- package/dist/schemas-ypoQZ_6N.js +0 -157
- package/dist/scores-CsURQDUB.d.ts +0 -172
- package/dist/scores-DdPZVVt8.js +0 -177
- package/dist/search-ToCOlCZ8.js +0 -106
- package/dist/sections-DjxYmpu-.js +0 -26
- package/dist/server-types-BOs-eFpo.d.ts +0 -809
- package/dist/session-BgsOPGZs.d.ts +0 -97
- package/dist/settings-mL-i7QUM.js +0 -93
- package/dist/shared-LmlfYPv4.js +0 -60
- package/dist/shared-eVrl39dX.js +0 -17
- package/dist/sign-in-lAyf6Ohy.js +0 -386
- package/dist/signatures-GUBuhLOB.js +0 -145
- package/dist/signatures-zbu6KTNQ.d.ts +0 -43
- package/dist/signers-D6ecZl22.d.ts +0 -390
- package/dist/signing-keys-B3RHGMMu.d.ts +0 -119
- package/dist/signing-keys-fWapUzi0.js +0 -164
- package/dist/solid-bind-C1jeq4Qm.d.ts +0 -11
- package/dist/solid-bind-iHGfGtBK.js +0 -38
- package/dist/solid-controller-DGuv7V8a.js +0 -13
- package/dist/spec-CoWHDoud.js +0 -119
- package/dist/spec-pins-CZ2CL8YZ.d.ts +0 -120
- package/dist/spec-pins-D3Tm6HJi.js +0 -60
- package/dist/sql-CVYjOUyG.js +0 -421
- package/dist/sql-rQDL6PIL.js +0 -122247
- package/dist/sso-B744gHeS.d.ts +0 -161
- package/dist/sso-Bt9HocgW.js +0 -217
- package/dist/standard-DbQsD2xZ.d.ts +0 -7
- package/dist/standard-DtkpFGkS.js +0 -25
- package/dist/stats-qCEV5M3B.js +0 -1147
- package/dist/store-o0HwYXl8.d.ts +0 -83
- package/dist/subject-readers-CsTpx44c.js +0 -49
- package/dist/subject-readers-DEZ45DQF.d.ts +0 -21
- package/dist/subjects-B6p4oAZJ.d.ts +0 -78
- package/dist/subjects-DXFmanh5.d.ts +0 -90
- package/dist/subjects-DevU_atb.js +0 -107
- package/dist/support-Ds1-UCN4.js +0 -534
- package/dist/support-view-vwJbRMpV.d.ts +0 -17
- package/dist/svelte-bind-BHN5a8VV.js +0 -46
- package/dist/svelte-bind-Ja6CtQGp.d.ts +0 -13
- package/dist/svelte-controller-oFKC9AYu.js +0 -19
- package/dist/table-schema-BcB-VCQb.js +0 -293
- package/dist/table-schema-Cb-IV_pZ.d.ts +0 -78
- package/dist/tags-CLXi2c6O.d.ts +0 -30
- package/dist/tags-C_ym1yDM.js +0 -39
- package/dist/tags-EnvIccSJ.js +0 -86
- package/dist/tanstack-db/supabase/index.d.ts +0 -66
- package/dist/tanstack-db/supabase/index.js +0 -271
- package/dist/tax-CIIxd8Zf.d.ts +0 -170
- package/dist/tax-DmOMjrYc.js +0 -140
- package/dist/tee-DwkUvJD_.js +0 -101
- package/dist/template-BWP7IXZg.js +0 -126
- package/dist/temporal-required-B8qQHYbI.js +0 -20
- package/dist/tenant-Bg4PDLkG.d.ts +0 -17
- package/dist/tenant-DnMqeNIM.js +0 -27
- package/dist/timeline-0_hTBH0-.js +0 -52
- package/dist/timeline-DUUsPLv5.d.ts +0 -152
- package/dist/timing-C5NzaEgy.js +0 -95
- package/dist/topic-CPOmMgkf.js +0 -643
- package/dist/topic-D9j8G2dw.d.ts +0 -415
- package/dist/types-BEDfwXL4.d.ts +0 -251
- package/dist/types-BRJHGhSq.d.ts +0 -177
- package/dist/types-BTK75521.js +0 -8
- package/dist/types-CGUDoF5I.d.ts +0 -624
- package/dist/types-DkPE7yd2.d.ts +0 -194
- package/dist/types-QHeku_6b.d.ts +0 -217
- package/dist/types-uHD9yANu.d.ts +0 -700
- package/dist/undo-B696duxr.d.ts +0 -46
- package/dist/undo-vutx78k8.js +0 -44
- package/dist/upload-claim-D_wgDbi7.js +0 -33
- package/dist/usage-BI1E2940.js +0 -264
- package/dist/usage-DBcVGqnr.d.ts +0 -232
- package/dist/user-change-CSR_prhd.js +0 -133
- package/dist/variants-DL7NpFJ7.js +0 -53
- package/dist/vault-BQTdu4eH.d.ts +0 -62
- package/dist/verify-27w0I5C9.js +0 -130
- package/dist/verify-BmuCB4PW.d.ts +0 -146
- package/dist/view-2_I-2ukO.d.ts +0 -90
- package/dist/view-BtgqxQLM.js +0 -108
- package/dist/vue-bind-CFxon-Vs.js +0 -45
- package/dist/vue-bind-TPkbLl4z.d.ts +0 -11
- package/dist/vue-controller-WtbuT-Ux.js +0 -13
- package/dist/watch-CfMT6vX7.js +0 -139
- package/dist/watch-DziJudwj.d.ts +0 -93
- package/dist/watch-topic-CIT3UlAh.d.ts +0 -31
- package/dist/wire-Bizdxvp-.js +0 -66
- package/dist/work-items-Cnntm8ij.d.ts +0 -238
- package/dist/workflow-builder-2q1iqHYG.js +0 -699
- package/dist/workflow-sdk-BTYWQQg9.d.ts +0 -163
- package/dist/workflow-sdk-_pqDUwNK.js +0 -242
- package/dist/workflow-sdk-world-BIwGVy6S.js +0 -2401
- package/dist/workflows-D8U7KyXJ.d.ts +0 -258
- package/dist/workflows-VJBSV-QR.js +0 -285
- package/skills/better-supabase/references/plugins.md +0 -71
|
@@ -1,1345 +0,0 @@
|
|
|
1
|
-
import { t as DbException } from "../../db-exception-Lngc1W49.js";
|
|
2
|
-
import { n as dbError } from "../../errors-03ysrOt4.js";
|
|
3
|
-
import { s as nowInstant } from "../../temporal-DLZlWbOi.js";
|
|
4
|
-
import { t as temporal } from "../../temporal-required-B8qQHYbI.js";
|
|
5
|
-
import { a as ok, r as err, s as toDbError, t as AsyncResult } from "../../result-B3m7xtRY.js";
|
|
6
|
-
import { n as isRecord } from "../../guards-6F2bCtQR.js";
|
|
7
|
-
import { n as allTenantsContext } from "../../plugin-D9bYbYli.js";
|
|
8
|
-
import { n as validate } from "../../standard-DtkpFGkS.js";
|
|
9
|
-
import { o as problemResponse } from "../../problem-BWElIgIb.js";
|
|
10
|
-
import { o as tenantFrom, s as tenantPathsFor } from "../../claims-Bp9My7XP.js";
|
|
11
|
-
import { n as rateLimitSqlOptions, r as webhookInboxSqlOptions, t as jobsSqlOptions } from "../../options-OJ5zmgr8.js";
|
|
12
|
-
import { B as dbTransport, H as rpcTransport, M as seconds, P as sleep, R as toInstant, U as sqlTransport, f as errorText, g as leaseHeartbeat, j as run, n as applyTemporal, o as blockCall, s as budget, w as pageOf } from "../../block-helpers-CiKtrb6g.js";
|
|
13
|
-
import { r as withBlockHooks } from "../../block-hooks-BymdcD0V.js";
|
|
14
|
-
import { t as cronRoute } from "../../cron-route-Y0eJ-FNi.js";
|
|
15
|
-
import { n as periodSeconds } from "../../ratelimit-headers-kEcXyO3H.js";
|
|
16
|
-
import { n as nextCronRun, t as assertCron } from "../../cron-_i5pBGkY.js";
|
|
17
|
-
import { a as purgeWebhookInbox, i as createWebhookInbox, r as rateLimited, t as createRateLimit } from "../../rate-limit-DExDw3Cy.js";
|
|
18
|
-
import { r as wrapPayload, t as unwrap } from "../../envelope-DCfHtVtZ.js";
|
|
19
|
-
import { n as defineBlock } from "../../define-block-Dze77QTw.js";
|
|
20
|
-
//#region src/blocks/jobs/dev.ts
|
|
21
|
-
function devDrainSecret(env, name = "CRON_SECRET") {
|
|
22
|
-
const current = env[name];
|
|
23
|
-
if (current) return current;
|
|
24
|
-
const bytes = crypto.getRandomValues(/* @__PURE__ */ new Uint8Array(32));
|
|
25
|
-
const secret = Array.from(bytes, (byte) => byte.toString(16).padStart(2, "0")).join("");
|
|
26
|
-
env[name] = secret;
|
|
27
|
-
return secret;
|
|
28
|
-
}
|
|
29
|
-
function devDrain(options) {
|
|
30
|
-
if (!options.secret) throw new TypeError("devDrain needs the drain route's secret, such as devDrainSecret(process.env)");
|
|
31
|
-
const every = options.every ?? 6e4;
|
|
32
|
-
if (!Number.isFinite(every) || every <= 0) throw new TypeError("devDrain: every must be a positive number of ms");
|
|
33
|
-
const doFetch = options.fetch ?? fetch;
|
|
34
|
-
const report = options.onError ?? ((message) => {
|
|
35
|
-
console.warn(message);
|
|
36
|
-
});
|
|
37
|
-
let running = false;
|
|
38
|
-
const tick = async () => {
|
|
39
|
-
if (running || options.signal?.aborted) return;
|
|
40
|
-
running = true;
|
|
41
|
-
try {
|
|
42
|
-
const response = await doFetch(options.url, { headers: { authorization: `Bearer ${options.secret}` } });
|
|
43
|
-
await response.body?.cancel();
|
|
44
|
-
if (!response.ok) report(`[jobs] dev drain answered ${String(response.status)}`);
|
|
45
|
-
} catch (cause) {
|
|
46
|
-
report(`[jobs] dev drain failed: ${cause instanceof Error ? cause.message : String(cause)}`);
|
|
47
|
-
} finally {
|
|
48
|
-
running = false;
|
|
49
|
-
}
|
|
50
|
-
};
|
|
51
|
-
const timer = setInterval(() => {
|
|
52
|
-
tick();
|
|
53
|
-
}, every);
|
|
54
|
-
const stop = () => {
|
|
55
|
-
clearInterval(timer);
|
|
56
|
-
};
|
|
57
|
-
options.signal?.addEventListener("abort", stop, { once: true });
|
|
58
|
-
return {
|
|
59
|
-
tick,
|
|
60
|
-
stop
|
|
61
|
-
};
|
|
62
|
-
}
|
|
63
|
-
//#endregion
|
|
64
|
-
//#region src/blocks/jobs/backends.ts
|
|
65
|
-
const instantOrNull = (value) => value === null ? null : toInstant(value);
|
|
66
|
-
/**
|
|
67
|
-
* Schedule times are stored to the millisecond, the precision `Date` reads
|
|
68
|
-
* back.
|
|
69
|
-
*/
|
|
70
|
-
const millis = (instant) => instant.round({
|
|
71
|
-
smallestUnit: "millisecond",
|
|
72
|
-
roundingMode: "floor"
|
|
73
|
-
});
|
|
74
|
-
/**
|
|
75
|
-
* The first run of a schedule written without one, or undefined for a cron the
|
|
76
|
-
* drain can't read.
|
|
77
|
-
*/
|
|
78
|
-
function firstRun(row, now) {
|
|
79
|
-
try {
|
|
80
|
-
return millis(nextCronRun(row.schedule, row.timezone, row.first_after ? toInstant(row.first_after) : now()));
|
|
81
|
-
} catch {
|
|
82
|
-
return;
|
|
83
|
-
}
|
|
84
|
-
}
|
|
85
|
-
/**
|
|
86
|
-
* The due schedules among claimed rows. A row written in SQL without a next run
|
|
87
|
-
* gets its first run here; one not due yet is moved to it with `advance`.
|
|
88
|
-
*/
|
|
89
|
-
async function dueOf(rows, now, advance) {
|
|
90
|
-
const due = [];
|
|
91
|
-
for (const row of rows) {
|
|
92
|
-
const schedule = {
|
|
93
|
-
name: row.job_name,
|
|
94
|
-
cron: row.schedule,
|
|
95
|
-
timeZone: row.timezone,
|
|
96
|
-
queue: row.queue,
|
|
97
|
-
payload: row.payload
|
|
98
|
-
};
|
|
99
|
-
if (row.next_run !== null) {
|
|
100
|
-
due.push({
|
|
101
|
-
...schedule,
|
|
102
|
-
nextRun: toInstant(row.next_run)
|
|
103
|
-
});
|
|
104
|
-
continue;
|
|
105
|
-
}
|
|
106
|
-
const first = firstRun(row, now);
|
|
107
|
-
if (first === void 0) continue;
|
|
108
|
-
if (temporal().Instant.compare(first, now()) <= 0) due.push({
|
|
109
|
-
...schedule,
|
|
110
|
-
nextRun: first
|
|
111
|
-
});
|
|
112
|
-
else await advance(row.job_name, first);
|
|
113
|
-
}
|
|
114
|
-
return due;
|
|
115
|
-
}
|
|
116
|
-
const scheduleInfo = (row) => ({
|
|
117
|
-
name: row.job_name,
|
|
118
|
-
cron: row.schedule,
|
|
119
|
-
timeZone: row.timezone,
|
|
120
|
-
queue: row.queue,
|
|
121
|
-
tenant: row.tenant,
|
|
122
|
-
nextRun: instantOrNull(row.next_run),
|
|
123
|
-
lastRun: instantOrNull(row.last_run),
|
|
124
|
-
leasedUntil: instantOrNull(row.locked_until),
|
|
125
|
-
createdAt: instantOrNull(row.created_at)
|
|
126
|
-
});
|
|
127
|
-
const statsOf = (row) => ({
|
|
128
|
-
ready: Number(row?.ready ?? 0),
|
|
129
|
-
inFlight: Number(row?.in_flight ?? 0),
|
|
130
|
-
delayed: Number(row?.delayed ?? 0),
|
|
131
|
-
dead: Number(row?.dead ?? 0),
|
|
132
|
-
oldestAgeSeconds: row?.oldest_age_seconds === null || row?.oldest_age_seconds === void 0 ? null : Number(row.oldest_age_seconds)
|
|
133
|
-
});
|
|
134
|
-
const onceOf = (row) => {
|
|
135
|
-
if (!row) throw new TypeError("enqueue_job_once returned no row");
|
|
136
|
-
return {
|
|
137
|
-
id: Number(row.id),
|
|
138
|
-
duplicate: row.duplicate
|
|
139
|
-
};
|
|
140
|
-
};
|
|
141
|
-
/**
|
|
142
|
-
* The `jobs` SQL module over a service SQL connection. The same functions back
|
|
143
|
-
* both `blocks.jobs.options.backend` values (pgmq and table) and both
|
|
144
|
-
* schedulers. `now` dates a schedule's first run.
|
|
145
|
-
*/
|
|
146
|
-
function sqlQueueBackend(sql, now = nowInstant) {
|
|
147
|
-
return {
|
|
148
|
-
apiVersion: 1,
|
|
149
|
-
name: "sql",
|
|
150
|
-
leases: true,
|
|
151
|
-
async send(queue, payload, delay, maxAttempts, dedupeKey, dedupe) {
|
|
152
|
-
const [row] = await sql.queryRaw("select better_supabase.enqueue_job($1, $2, $3, $4, $5, $6) as id", [
|
|
153
|
-
queue,
|
|
154
|
-
JSON.stringify(payload ?? {}),
|
|
155
|
-
delay,
|
|
156
|
-
maxAttempts,
|
|
157
|
-
dedupeKey ?? null,
|
|
158
|
-
dedupe !== "waiting"
|
|
159
|
-
]);
|
|
160
|
-
return Number(row.id);
|
|
161
|
-
},
|
|
162
|
-
async sendOnce(queue, payload, delay, maxAttempts, dedupeKey) {
|
|
163
|
-
const [row] = await sql.queryRaw("select * from better_supabase.enqueue_job_once($1, $2, $3, $4, $5)", [
|
|
164
|
-
queue,
|
|
165
|
-
JSON.stringify(payload ?? {}),
|
|
166
|
-
dedupeKey,
|
|
167
|
-
delay,
|
|
168
|
-
maxAttempts
|
|
169
|
-
]);
|
|
170
|
-
return onceOf(row);
|
|
171
|
-
},
|
|
172
|
-
read: (queue, lease, batch) => sql.queryRaw("select * from better_supabase.claim_jobs($1, $2, $3)", [
|
|
173
|
-
queue,
|
|
174
|
-
lease,
|
|
175
|
-
batch
|
|
176
|
-
]),
|
|
177
|
-
async complete(job) {
|
|
178
|
-
const [row] = await sql.queryRaw("select better_supabase.complete_job($1, $2, $3) as done", [
|
|
179
|
-
job.queue,
|
|
180
|
-
job.id,
|
|
181
|
-
job.attempts
|
|
182
|
-
]);
|
|
183
|
-
return row?.done ?? false;
|
|
184
|
-
},
|
|
185
|
-
async fail(job, error, retryIn) {
|
|
186
|
-
const [row] = await sql.queryRaw("select better_supabase.fail_job($1, $2, $3, $4, $5) as status", [
|
|
187
|
-
job.queue,
|
|
188
|
-
job.id,
|
|
189
|
-
job.attempts,
|
|
190
|
-
error,
|
|
191
|
-
retryIn ?? null
|
|
192
|
-
]);
|
|
193
|
-
return row?.status ?? null;
|
|
194
|
-
},
|
|
195
|
-
async extend(job, lease) {
|
|
196
|
-
const [row] = await sql.queryRaw("select better_supabase.extend_job_lease($1, $2, $3, $4) as extended", [
|
|
197
|
-
job.queue,
|
|
198
|
-
job.id,
|
|
199
|
-
job.attempts,
|
|
200
|
-
lease
|
|
201
|
-
]);
|
|
202
|
-
return row?.extended ?? false;
|
|
203
|
-
},
|
|
204
|
-
async replay(queue, id) {
|
|
205
|
-
const [row] = await sql.queryRaw("select better_supabase.replay_dead_job($1, $2) as id", [queue, id]);
|
|
206
|
-
return row?.id === null || row?.id === void 0 ? null : Number(row.id);
|
|
207
|
-
},
|
|
208
|
-
async stats(queue) {
|
|
209
|
-
const [row] = await sql.queryRaw("select * from better_supabase.job_queue_stats($1)", [queue]);
|
|
210
|
-
return statsOf(row);
|
|
211
|
-
},
|
|
212
|
-
listDead: (queue, limit, before) => sql.queryRaw("select * from better_supabase.list_dead_jobs($1, $2, $3)", [
|
|
213
|
-
queue,
|
|
214
|
-
limit,
|
|
215
|
-
before ?? null
|
|
216
|
-
]),
|
|
217
|
-
async retryDead(queue, ids, limit) {
|
|
218
|
-
const [row] = await sql.queryRaw("select better_supabase.retry_dead_jobs($1, $2, $3) as retried", [
|
|
219
|
-
queue,
|
|
220
|
-
ids === void 0 ? null : [...ids],
|
|
221
|
-
limit
|
|
222
|
-
]);
|
|
223
|
-
return row?.retried ?? 0;
|
|
224
|
-
},
|
|
225
|
-
async purge(queue, args) {
|
|
226
|
-
const named = Object.entries({
|
|
227
|
-
older_than: args.olderThan,
|
|
228
|
-
batch: args.batch,
|
|
229
|
-
dead_older_than: args.deadOlderThan
|
|
230
|
-
}).filter(([, value]) => value !== void 0);
|
|
231
|
-
const [row] = await sql.queryRaw(`select better_supabase.purge_job_archive(${["queue => $1", ...named.map(([name], index) => `${name} => $${String(index + 2)}`)].join(", ")}) as purged`, [queue, ...named.map(([, value]) => value)]);
|
|
232
|
-
return row?.purged ?? 0;
|
|
233
|
-
},
|
|
234
|
-
async schedule(name, cron, queue, payload, timeZone, nextRun, tenant) {
|
|
235
|
-
await sql.queryRaw("select better_supabase.schedule_job($1, $2, $3, $4, $5, $6, $7)", [
|
|
236
|
-
name,
|
|
237
|
-
cron,
|
|
238
|
-
queue,
|
|
239
|
-
JSON.stringify(payload ?? {}),
|
|
240
|
-
timeZone,
|
|
241
|
-
nextRun.toString(),
|
|
242
|
-
tenant ?? null
|
|
243
|
-
]);
|
|
244
|
-
},
|
|
245
|
-
async listSchedules(filter) {
|
|
246
|
-
return (await sql.queryRaw("select * from better_supabase.list_schedules($1, $2)", [filter.prefix ?? null, filter.tenant ?? null])).map(scheduleInfo);
|
|
247
|
-
},
|
|
248
|
-
async unscheduleTenant(tenant) {
|
|
249
|
-
const [row] = await sql.queryRaw("select better_supabase.unschedule_tenant($1) as removed", [tenant]);
|
|
250
|
-
return row?.removed ?? 0;
|
|
251
|
-
},
|
|
252
|
-
async unschedule(name) {
|
|
253
|
-
const [row] = await sql.queryRaw("select better_supabase.unschedule_job($1) as done", [name]);
|
|
254
|
-
return row?.done ?? false;
|
|
255
|
-
},
|
|
256
|
-
async dueSchedules(lease, batch) {
|
|
257
|
-
return dueOf(await sql.queryRaw("select * from better_supabase.claim_due_schedules($1, $2)", [lease, batch]), now, async (name, first) => {
|
|
258
|
-
await sql.queryRaw("select better_supabase.advance_schedule($1, null, $2)", [name, first.toString()]);
|
|
259
|
-
});
|
|
260
|
-
},
|
|
261
|
-
async advanceSchedule(name, ran, next) {
|
|
262
|
-
const [row] = await sql.queryRaw("select better_supabase.advance_schedule($1, $2, $3) as advanced", [
|
|
263
|
-
name,
|
|
264
|
-
ran.toString(),
|
|
265
|
-
next.toString()
|
|
266
|
-
]);
|
|
267
|
-
return row?.advanced ?? false;
|
|
268
|
-
}
|
|
269
|
-
};
|
|
270
|
-
}
|
|
271
|
-
/** The named arguments of each `jobs` function, in call order. */
|
|
272
|
-
const PARAMS = {
|
|
273
|
-
enqueue_job: [
|
|
274
|
-
"queue",
|
|
275
|
-
"payload",
|
|
276
|
-
"delay",
|
|
277
|
-
"max_attempts",
|
|
278
|
-
"dedupe_key",
|
|
279
|
-
"dedupe_running"
|
|
280
|
-
],
|
|
281
|
-
enqueue_job_once: [
|
|
282
|
-
"queue",
|
|
283
|
-
"payload",
|
|
284
|
-
"dedupe_key",
|
|
285
|
-
"delay",
|
|
286
|
-
"max_attempts"
|
|
287
|
-
],
|
|
288
|
-
claim_jobs: [
|
|
289
|
-
"queue",
|
|
290
|
-
"lease",
|
|
291
|
-
"batch"
|
|
292
|
-
],
|
|
293
|
-
complete_job: [
|
|
294
|
-
"queue",
|
|
295
|
-
"job_id",
|
|
296
|
-
"attempt"
|
|
297
|
-
],
|
|
298
|
-
fail_job: [
|
|
299
|
-
"queue",
|
|
300
|
-
"job_id",
|
|
301
|
-
"attempt",
|
|
302
|
-
"error",
|
|
303
|
-
"retry_in"
|
|
304
|
-
],
|
|
305
|
-
extend_job_lease: [
|
|
306
|
-
"queue",
|
|
307
|
-
"job_id",
|
|
308
|
-
"attempt",
|
|
309
|
-
"lease"
|
|
310
|
-
],
|
|
311
|
-
replay_dead_job: ["queue", "job_id"],
|
|
312
|
-
job_queue_stats: ["queue"],
|
|
313
|
-
list_dead_jobs: [
|
|
314
|
-
"queue",
|
|
315
|
-
"max_rows",
|
|
316
|
-
"before_id"
|
|
317
|
-
],
|
|
318
|
-
retry_dead_jobs: [
|
|
319
|
-
"queue",
|
|
320
|
-
"ids",
|
|
321
|
-
"batch"
|
|
322
|
-
],
|
|
323
|
-
schedule_job: [
|
|
324
|
-
"job_name",
|
|
325
|
-
"schedule",
|
|
326
|
-
"queue",
|
|
327
|
-
"payload",
|
|
328
|
-
"timezone",
|
|
329
|
-
"next_run",
|
|
330
|
-
"tenant"
|
|
331
|
-
],
|
|
332
|
-
unschedule_job: ["job_name"],
|
|
333
|
-
list_schedules: ["name_prefix", "for_tenant"],
|
|
334
|
-
unschedule_tenant: ["tenant"],
|
|
335
|
-
claim_due_schedules: ["lease", "batch"],
|
|
336
|
-
advance_schedule: [
|
|
337
|
-
"job_name",
|
|
338
|
-
"ran",
|
|
339
|
-
"next_run"
|
|
340
|
-
],
|
|
341
|
-
purge_job_archive: [
|
|
342
|
-
"queue",
|
|
343
|
-
"older_than",
|
|
344
|
-
"batch",
|
|
345
|
-
"dead_older_than"
|
|
346
|
-
]
|
|
347
|
-
};
|
|
348
|
-
/**
|
|
349
|
-
* The rows a set-returning function answered with. PostgREST and `dbTransport`
|
|
350
|
-
* return an array; a single object is one row.
|
|
351
|
-
*/
|
|
352
|
-
function transportRows(fn, value) {
|
|
353
|
-
if (value === null || value === void 0) return [];
|
|
354
|
-
if (Array.isArray(value)) return value;
|
|
355
|
-
if (isRecord(value)) return [value];
|
|
356
|
-
throw new TypeError(`${fn} returned ${typeof value}, not rows: pass a SqlClient instead of sqlTransport for set-returning functions`);
|
|
357
|
-
}
|
|
358
|
-
/**
|
|
359
|
-
* The `jobs` SQL module over a `BlockTransport`, with named arguments: a
|
|
360
|
-
* service-role `rpcTransport(supabase, { schema: "api" })` reaches the wrappers
|
|
361
|
-
* `blocks.jobs.api` writes, so stats, dead letters, replays and schedules work
|
|
362
|
-
* without a direct Postgres connection. Over Postgres, pass the `SqlClient` to
|
|
363
|
-
* `createJobs` instead.
|
|
364
|
-
*/
|
|
365
|
-
function transportQueueBackend(transport, options = {}) {
|
|
366
|
-
const schema = options.schema ?? "better_supabase";
|
|
367
|
-
const now = options.now ?? nowInstant;
|
|
368
|
-
const call = (fn, ...args) => transport.call(schema, fn, Object.fromEntries(PARAMS[fn].flatMap((name, index) => index < args.length ? [[name, args[index]]] : [])));
|
|
369
|
-
const rows = async (fn, ...args) => transportRows(fn, await call(fn, ...args));
|
|
370
|
-
const bool = async (fn, ...args) => await call(fn, ...args) === true;
|
|
371
|
-
const count = async (fn, ...args) => Number(await call(fn, ...args) ?? 0);
|
|
372
|
-
const id = (value) => value === null || value === void 0 ? null : Number(value);
|
|
373
|
-
return {
|
|
374
|
-
apiVersion: 1,
|
|
375
|
-
name: "transport",
|
|
376
|
-
leases: true,
|
|
377
|
-
async send(queue, payload, delay, maxAttempts, dedupeKey, dedupe) {
|
|
378
|
-
const sent = id(await call("enqueue_job", queue, payload ?? {}, delay, maxAttempts, dedupeKey ?? null, dedupe !== "waiting"));
|
|
379
|
-
if (sent === null) throw new TypeError("enqueue_job returned no id");
|
|
380
|
-
return sent;
|
|
381
|
-
},
|
|
382
|
-
sendOnce: async (queue, payload, delay, maxAttempts, dedupeKey) => onceOf((await rows("enqueue_job_once", queue, payload ?? {}, dedupeKey, delay, maxAttempts))[0]),
|
|
383
|
-
read: (queue, lease, batch) => rows("claim_jobs", queue, lease, batch),
|
|
384
|
-
complete: (job) => bool("complete_job", job.queue, job.id, job.attempts),
|
|
385
|
-
async fail(job, error, retryIn) {
|
|
386
|
-
const status = await call("fail_job", job.queue, job.id, job.attempts, error, retryIn ?? null);
|
|
387
|
-
return status === "queued" || status === "dead" ? status : null;
|
|
388
|
-
},
|
|
389
|
-
extend: (job, lease) => bool("extend_job_lease", job.queue, job.id, job.attempts, lease),
|
|
390
|
-
replay: async (queue, jobId) => id(await call("replay_dead_job", queue, jobId)),
|
|
391
|
-
stats: async (queue) => statsOf((await rows("job_queue_stats", queue))[0]),
|
|
392
|
-
listDead: (queue, limit, before) => rows("list_dead_jobs", queue, limit, before ?? null),
|
|
393
|
-
retryDead: (queue, ids, limit) => count("retry_dead_jobs", queue, ids === void 0 ? null : [...ids], limit),
|
|
394
|
-
purge: (queue, args) => count("purge_job_archive", queue, args.olderThan, args.batch, args.deadOlderThan),
|
|
395
|
-
async schedule(name, cron, queue, payload, timeZone, nextRun, tenant) {
|
|
396
|
-
await call("schedule_job", name, cron, queue, payload ?? {}, timeZone, nextRun.toString(), tenant ?? null);
|
|
397
|
-
},
|
|
398
|
-
unschedule: (name) => bool("unschedule_job", name),
|
|
399
|
-
listSchedules: async (filter) => (await rows("list_schedules", filter.prefix ?? null, filter.tenant ?? null)).map(scheduleInfo),
|
|
400
|
-
unscheduleTenant: (tenant) => count("unschedule_tenant", tenant),
|
|
401
|
-
dueSchedules: async (lease, batch) => dueOf(await rows("claim_due_schedules", lease, batch), now, async (name, first) => {
|
|
402
|
-
await call("advance_schedule", name, null, first.toString());
|
|
403
|
-
}),
|
|
404
|
-
advanceSchedule: (name, ran, next) => bool("advance_schedule", name, ran.toString(), next.toString())
|
|
405
|
-
};
|
|
406
|
-
}
|
|
407
|
-
/** Throws for a feature the transport doesn't support. */
|
|
408
|
-
function sqlOnly(feature) {
|
|
409
|
-
throw new DbException(dbError("invalid_request", `${feature} needs a SQL connection; pgmq_public (PostgREST) does not support it`));
|
|
410
|
-
}
|
|
411
|
-
/**
|
|
412
|
-
* Supabase's `pgmq_public` RPCs (Integrations, Queues, "Expose Queues via
|
|
413
|
-
* PostgREST"). No lease check on complete, no retry delay, no deduplication and
|
|
414
|
-
* no schedules: a failed job reappears when its lease ends.
|
|
415
|
-
*/
|
|
416
|
-
function pgmqPublicBackend(client) {
|
|
417
|
-
const untyped = client;
|
|
418
|
-
const call = async (fn, args) => {
|
|
419
|
-
const { data, error } = await untyped.schema("pgmq_public").rpc(fn, args);
|
|
420
|
-
if (error) {
|
|
421
|
-
const message = typeof error === "object" && "message" in error ? String(error.message) : String(error);
|
|
422
|
-
throw new Error(`pgmq_public.${fn}: ${message}`, { cause: error });
|
|
423
|
-
}
|
|
424
|
-
return data;
|
|
425
|
-
};
|
|
426
|
-
const archive = (job) => call("archive", {
|
|
427
|
-
queue_name: job.queue,
|
|
428
|
-
message_id: job.id
|
|
429
|
-
});
|
|
430
|
-
return {
|
|
431
|
-
apiVersion: 1,
|
|
432
|
-
name: "pgmq_public",
|
|
433
|
-
leases: false,
|
|
434
|
-
async send(queue, payload, delay, maxAttempts, dedupeKey) {
|
|
435
|
-
if (dedupeKey !== void 0) sqlOnly("dedupeKey");
|
|
436
|
-
const ids = await call("send", {
|
|
437
|
-
queue_name: queue,
|
|
438
|
-
message: {
|
|
439
|
-
payload: payload ?? {},
|
|
440
|
-
max_attempts: maxAttempts
|
|
441
|
-
},
|
|
442
|
-
sleep_seconds: delay
|
|
443
|
-
});
|
|
444
|
-
return Number(ids[0]);
|
|
445
|
-
},
|
|
446
|
-
async read(queue, lease, batch) {
|
|
447
|
-
const rows = await call("read", {
|
|
448
|
-
queue_name: queue,
|
|
449
|
-
sleep_seconds: lease,
|
|
450
|
-
n: batch
|
|
451
|
-
});
|
|
452
|
-
const dead = (row) => row.read_ct > (row.message?.max_attempts ?? 5);
|
|
453
|
-
const live = rows.filter((row) => !dead(row));
|
|
454
|
-
await Promise.all(rows.filter(dead).map((row) => call("archive", {
|
|
455
|
-
queue_name: queue,
|
|
456
|
-
message_id: row.msg_id
|
|
457
|
-
})));
|
|
458
|
-
return live.map((row) => ({
|
|
459
|
-
id: row.msg_id,
|
|
460
|
-
attempts: row.read_ct,
|
|
461
|
-
enqueued_at: row.enqueued_at,
|
|
462
|
-
visible_until: row.vt,
|
|
463
|
-
message: row.message
|
|
464
|
-
}));
|
|
465
|
-
},
|
|
466
|
-
complete: archive,
|
|
467
|
-
async fail(job) {
|
|
468
|
-
if (job.attempts < job.maxAttempts) return "queued";
|
|
469
|
-
await archive(job);
|
|
470
|
-
return "dead";
|
|
471
|
-
},
|
|
472
|
-
extend: () => Promise.resolve(false),
|
|
473
|
-
schedule: () => sqlOnly("schedule"),
|
|
474
|
-
unschedule: () => sqlOnly("unschedule")
|
|
475
|
-
};
|
|
476
|
-
}
|
|
477
|
-
//#endregion
|
|
478
|
-
//#region src/blocks/jobs/idempotency.ts
|
|
479
|
-
async function sha256(text) {
|
|
480
|
-
const digest = await crypto.subtle.digest("SHA-256", new TextEncoder().encode(text));
|
|
481
|
-
return Array.from(new Uint8Array(digest), (byte) => byte.toString(16).padStart(2, "0")).join("");
|
|
482
|
-
}
|
|
483
|
-
const AUTH_COOKIE = /^sb-.+-auth-token(?:\.\d+)?$/;
|
|
484
|
-
/** A hash of the credentials the request carries, or `''` without any. */
|
|
485
|
-
async function callerScope(request) {
|
|
486
|
-
const authorization = request.headers.get("authorization");
|
|
487
|
-
const cookies = (request.headers.get("cookie") ?? "").split(";").map((pair) => pair.trim()).filter((pair) => AUTH_COOKIE.test(pair.split("=", 1)[0] ?? "")).toSorted();
|
|
488
|
-
const credential = authorization ?? cookies.join(";");
|
|
489
|
-
return credential === "" ? "" : `caller:${await sha256(credential)}`;
|
|
490
|
-
}
|
|
491
|
-
function sqlCalls$1(sql) {
|
|
492
|
-
return {
|
|
493
|
-
begin: (scope, key, fingerprint, ttl, lock) => run(async () => {
|
|
494
|
-
const [row] = await sql.queryRaw("select * from better_supabase.begin_idempotent($1, $2, $3, $4::interval, $5::interval)", [
|
|
495
|
-
scope,
|
|
496
|
-
key,
|
|
497
|
-
fingerprint,
|
|
498
|
-
ttl,
|
|
499
|
-
lock
|
|
500
|
-
]);
|
|
501
|
-
return row;
|
|
502
|
-
}),
|
|
503
|
-
complete: (scope, key, holder, status, body) => run(async () => {
|
|
504
|
-
const [row] = await sql.queryRaw("select better_supabase.complete_idempotent($1, $2, $3, $4, $5) as done", [
|
|
505
|
-
scope,
|
|
506
|
-
key,
|
|
507
|
-
holder,
|
|
508
|
-
status,
|
|
509
|
-
JSON.stringify(body)
|
|
510
|
-
]);
|
|
511
|
-
return row?.done === true;
|
|
512
|
-
}),
|
|
513
|
-
extend: (scope, key, holder, lock) => run(async () => {
|
|
514
|
-
const [row] = await sql.queryRaw("select better_supabase.extend_idempotent($1, $2, $3, $4::interval) as done", [
|
|
515
|
-
scope,
|
|
516
|
-
key,
|
|
517
|
-
holder,
|
|
518
|
-
lock
|
|
519
|
-
]);
|
|
520
|
-
return row?.done === true;
|
|
521
|
-
}),
|
|
522
|
-
release: (scope, key, holder) => run(async () => {
|
|
523
|
-
const [row] = await sql.queryRaw("select better_supabase.release_idempotent($1, $2, $3) as done", [
|
|
524
|
-
scope,
|
|
525
|
-
key,
|
|
526
|
-
holder
|
|
527
|
-
]);
|
|
528
|
-
return row?.done === true;
|
|
529
|
-
}),
|
|
530
|
-
purge: () => run(async () => {
|
|
531
|
-
const [row] = await sql.queryRaw("select better_supabase.purge_idempotency_keys() as purged");
|
|
532
|
-
return row?.purged ?? 0;
|
|
533
|
-
})
|
|
534
|
-
};
|
|
535
|
-
}
|
|
536
|
-
function transportCalls$1(transport, schema, mappers) {
|
|
537
|
-
const call = blockCall(transport, schema, mappers);
|
|
538
|
-
return {
|
|
539
|
-
begin: (scope, key, fingerprint, ttl, lock) => call("begin_idempotent", {
|
|
540
|
-
scope,
|
|
541
|
-
key,
|
|
542
|
-
request_hash: fingerprint,
|
|
543
|
-
ttl,
|
|
544
|
-
lock
|
|
545
|
-
}, (value) => transportRows("begin_idempotent", value)[0]),
|
|
546
|
-
complete: (scope, key, holder, status, body) => call("complete_idempotent", {
|
|
547
|
-
scope,
|
|
548
|
-
key,
|
|
549
|
-
holder,
|
|
550
|
-
status_code: status,
|
|
551
|
-
response: body
|
|
552
|
-
}, (value) => value === true),
|
|
553
|
-
extend: (scope, key, holder, lock) => call("extend_idempotent", {
|
|
554
|
-
scope,
|
|
555
|
-
key,
|
|
556
|
-
holder,
|
|
557
|
-
lock
|
|
558
|
-
}, (value) => value === true),
|
|
559
|
-
release: (scope, key, holder) => call("release_idempotent", {
|
|
560
|
-
scope,
|
|
561
|
-
key,
|
|
562
|
-
holder
|
|
563
|
-
}, (value) => value === true),
|
|
564
|
-
purge: () => call("purge_idempotency_keys", {}, (value) => Number(value ?? 0))
|
|
565
|
-
};
|
|
566
|
-
}
|
|
567
|
-
/**
|
|
568
|
-
* HTTP idempotency keys (IETF `Idempotency-Key` header) over the `idempotency`
|
|
569
|
-
* SQL module: a service SQL connection, or a service-role `rpcTransport` over
|
|
570
|
-
* the wrappers `blocks.idempotency.api` writes.
|
|
571
|
-
*/
|
|
572
|
-
function createIdempotency(options) {
|
|
573
|
-
applyTemporal(options);
|
|
574
|
-
const headerName = options.header ?? "idempotency-key";
|
|
575
|
-
const format = options.problem;
|
|
576
|
-
const ttl = seconds(options.ttl ?? "24 hours");
|
|
577
|
-
const lock = seconds(options.lock ?? "1 minute");
|
|
578
|
-
const lockSeconds = periodSeconds(options.lock ?? 60) ?? 2;
|
|
579
|
-
const calls = options.transport === void 0 ? sqlCalls$1(options.sql) : transportCalls$1(options.transport, options.schema, options.mappers);
|
|
580
|
-
const hooked = withBlockHooks({
|
|
581
|
-
purge: () => calls.purge(),
|
|
582
|
-
purgeJob: () => async () => hooked.purge().orThrow(),
|
|
583
|
-
begin: (key, fingerprint, scope = "") => calls.begin(scope, key, fingerprint, ttl, lock).andThen((row) => row ? AsyncResult.ok({
|
|
584
|
-
state: row.state,
|
|
585
|
-
status: row.status_code,
|
|
586
|
-
body: row.response,
|
|
587
|
-
holder: row.holder ?? void 0
|
|
588
|
-
}) : AsyncResult.err(dbError("unexpected", "begin_idempotent returned no row"))),
|
|
589
|
-
extend: (key, holder, scope = "") => calls.extend(scope, key, holder, lock),
|
|
590
|
-
complete: (key, holder, status, body, scope = "") => calls.complete(scope, key, holder, status, body),
|
|
591
|
-
release: (key, holder, scope = "") => calls.release(scope, key, holder),
|
|
592
|
-
async handle(request, handler) {
|
|
593
|
-
const key = request.headers.get(headerName);
|
|
594
|
-
const url = new URL(request.url);
|
|
595
|
-
const instance = url.pathname;
|
|
596
|
-
if (!key) return options.required ? problemResponse(dbError("invalid_request", `The ${headerName} header is required`, { code: "IDEMPOTENCY_KEY_MISSING" }), {
|
|
597
|
-
instance,
|
|
598
|
-
format
|
|
599
|
-
}) : handler(request);
|
|
600
|
-
if (key.length > 255) return problemResponse(dbError("invalid_request", `The ${headerName} header is too long`, { code: "IDEMPOTENCY_KEY_INVALID" }), {
|
|
601
|
-
instance,
|
|
602
|
-
format
|
|
603
|
-
});
|
|
604
|
-
const scope = typeof options.scope === "function" ? options.scope(request) : options.scope ?? await callerScope(request);
|
|
605
|
-
const body = await request.clone().text();
|
|
606
|
-
const fingerprint = await sha256(`${request.method} ${instance}${url.search}\n${body}`);
|
|
607
|
-
const started = await hooked.begin(key, fingerprint, scope);
|
|
608
|
-
if (!started.ok) return problemResponse(started.error, {
|
|
609
|
-
instance,
|
|
610
|
-
format
|
|
611
|
-
});
|
|
612
|
-
const { state, holder = "" } = started.data;
|
|
613
|
-
switch (state) {
|
|
614
|
-
case "replay": {
|
|
615
|
-
const stored = started.data.body;
|
|
616
|
-
return new Response(stored.body, {
|
|
617
|
-
status: started.data.status ?? 200,
|
|
618
|
-
headers: {
|
|
619
|
-
...stored.contentType ? { "content-type": stored.contentType } : {},
|
|
620
|
-
"idempotency-replayed": "true"
|
|
621
|
-
}
|
|
622
|
-
});
|
|
623
|
-
}
|
|
624
|
-
case "running": return problemResponse(dbError("conflict", "A request with this idempotency key is still running", { code: "IDEMPOTENCY_KEY_IN_USE" }), {
|
|
625
|
-
instance,
|
|
626
|
-
format,
|
|
627
|
-
headers: { "retry-after": "1" }
|
|
628
|
-
});
|
|
629
|
-
case "mismatch": return problemResponse(dbError("validation", "This idempotency key was used for a different request", {
|
|
630
|
-
code: "IDEMPOTENCY_KEY_REUSED",
|
|
631
|
-
issues: [{
|
|
632
|
-
message: "Use a new key for a new request",
|
|
633
|
-
path: [headerName]
|
|
634
|
-
}]
|
|
635
|
-
}), {
|
|
636
|
-
instance,
|
|
637
|
-
format
|
|
638
|
-
});
|
|
639
|
-
case "started": break;
|
|
640
|
-
default: throw new TypeError(`Unknown idempotency state ${String(state)}`);
|
|
641
|
-
}
|
|
642
|
-
let renewing = true;
|
|
643
|
-
const stopHeartbeat = leaseHeartbeat(lockSeconds, () => {
|
|
644
|
-
if (!renewing) return;
|
|
645
|
-
hooked.extend(key, holder, scope).then((extended) => {
|
|
646
|
-
if (extended.ok && !extended.data) renewing = false;
|
|
647
|
-
});
|
|
648
|
-
});
|
|
649
|
-
try {
|
|
650
|
-
let response;
|
|
651
|
-
try {
|
|
652
|
-
response = await handler(request);
|
|
653
|
-
} catch (cause) {
|
|
654
|
-
await hooked.release(key, holder, scope);
|
|
655
|
-
throw cause;
|
|
656
|
-
}
|
|
657
|
-
if (response.status >= 500) {
|
|
658
|
-
await hooked.release(key, holder, scope);
|
|
659
|
-
return response;
|
|
660
|
-
}
|
|
661
|
-
const stored = {
|
|
662
|
-
body: await response.clone().text(),
|
|
663
|
-
contentType: response.headers.get("content-type")
|
|
664
|
-
};
|
|
665
|
-
const completed = await hooked.complete(key, holder, response.status, stored, scope);
|
|
666
|
-
if (!completed.ok || !completed.data) return problemResponse(completed.ok ? dbError("conflict", "The idempotency key's lock expired before the response was saved", { code: "IDEMPOTENCY_KEY_LOST" }) : completed.error, {
|
|
667
|
-
instance,
|
|
668
|
-
format,
|
|
669
|
-
headers: { "retry-after": "1" }
|
|
670
|
-
});
|
|
671
|
-
return response;
|
|
672
|
-
} finally {
|
|
673
|
-
stopHeartbeat();
|
|
674
|
-
}
|
|
675
|
-
}
|
|
676
|
-
}, options.hooks, {
|
|
677
|
-
block: "idempotency",
|
|
678
|
-
...options.logger ? { logger: options.logger } : {}
|
|
679
|
-
});
|
|
680
|
-
return hooked;
|
|
681
|
-
}
|
|
682
|
-
//#endregion
|
|
683
|
-
//#region src/blocks/jobs/lease.ts
|
|
684
|
-
function sqlCalls(sql) {
|
|
685
|
-
return {
|
|
686
|
-
async acquire(key, ttl, scope) {
|
|
687
|
-
const [row] = await sql.queryRaw("select better_supabase.acquire_lease($1, $2, $3) as holder", [
|
|
688
|
-
key,
|
|
689
|
-
ttl,
|
|
690
|
-
scope
|
|
691
|
-
]);
|
|
692
|
-
return row?.holder ?? null;
|
|
693
|
-
},
|
|
694
|
-
async extend(key, holder, ttl, scope) {
|
|
695
|
-
const [row] = await sql.queryRaw("select better_supabase.extend_lease($1, $2, $3, $4) as done", [
|
|
696
|
-
key,
|
|
697
|
-
holder,
|
|
698
|
-
ttl,
|
|
699
|
-
scope
|
|
700
|
-
]);
|
|
701
|
-
return row?.done === true;
|
|
702
|
-
},
|
|
703
|
-
async release(key, holder, scope) {
|
|
704
|
-
await sql.queryRaw("select better_supabase.release_lease($1, $2, $3)", [
|
|
705
|
-
key,
|
|
706
|
-
holder,
|
|
707
|
-
scope
|
|
708
|
-
]);
|
|
709
|
-
}
|
|
710
|
-
};
|
|
711
|
-
}
|
|
712
|
-
function transportCalls(transport, schema) {
|
|
713
|
-
return {
|
|
714
|
-
async acquire(key, ttl, scope) {
|
|
715
|
-
const holder = await transport.call(schema, "acquire_lease", {
|
|
716
|
-
key,
|
|
717
|
-
seconds: ttl,
|
|
718
|
-
scope
|
|
719
|
-
});
|
|
720
|
-
return typeof holder === "string" ? holder : null;
|
|
721
|
-
},
|
|
722
|
-
extend: async (key, holder, ttl, scope) => await transport.call(schema, "extend_lease", {
|
|
723
|
-
key,
|
|
724
|
-
holder,
|
|
725
|
-
seconds: ttl,
|
|
726
|
-
scope
|
|
727
|
-
}) === true,
|
|
728
|
-
async release(key, holder, scope) {
|
|
729
|
-
await transport.call(schema, "release_lease", {
|
|
730
|
-
key,
|
|
731
|
-
holder,
|
|
732
|
-
scope
|
|
733
|
-
});
|
|
734
|
-
}
|
|
735
|
-
};
|
|
736
|
-
}
|
|
737
|
-
/**
|
|
738
|
-
* Runs `fn` while holding the lease on `key`, one holder at a time, and
|
|
739
|
-
* releases it afterwards, also when `fn` throws. `{ acquired: false }` while
|
|
740
|
-
* another holder has it. A lease that expires mid-run is taken by the next
|
|
741
|
-
* caller; call `lease.extend()` for long work. Takes a service SQL connection,
|
|
742
|
-
* or a service-role `rpcTransport` over the wrappers `blocks.idempotency.api`
|
|
743
|
-
* writes.
|
|
744
|
-
*/
|
|
745
|
-
function withLease(source, key, fn, options = {}) {
|
|
746
|
-
const scope = options.scope ?? "";
|
|
747
|
-
const ttl = options.seconds ?? 60;
|
|
748
|
-
const calls = "call" in source ? transportCalls(source, options.schema ?? "better_supabase") : sqlCalls(source);
|
|
749
|
-
return run(async () => {
|
|
750
|
-
const holder = await calls.acquire(key, ttl, scope);
|
|
751
|
-
if (!holder) return { acquired: false };
|
|
752
|
-
const lease = {
|
|
753
|
-
holder,
|
|
754
|
-
extend: (next = ttl) => run(() => calls.extend(key, holder, next, scope))
|
|
755
|
-
};
|
|
756
|
-
try {
|
|
757
|
-
return {
|
|
758
|
-
acquired: true,
|
|
759
|
-
value: await fn(lease)
|
|
760
|
-
};
|
|
761
|
-
} finally {
|
|
762
|
-
await calls.release(key, holder, scope);
|
|
763
|
-
}
|
|
764
|
-
});
|
|
765
|
-
}
|
|
766
|
-
//#endregion
|
|
767
|
-
//#region src/blocks/jobs/vercel-queue.ts
|
|
768
|
-
const TOPIC = /^[A-Za-z0-9_-]+$/;
|
|
769
|
-
/**
|
|
770
|
-
* Stores jobs on Vercel Queues through a `PollingQueueClient`. Queue names are
|
|
771
|
-
* topic names. `read` holds each message open inside the client's `receive`
|
|
772
|
-
* handler (the client keeps the visibility timeout alive), `complete`
|
|
773
|
-
* acknowledges it and `fail` throws so the topic redelivers it after the retry
|
|
774
|
-
* delay. Vercel Queues has no dead letters, schedules or ids that fit a number,
|
|
775
|
-
* so ids are local handles, a message past `maxAttempts` is acknowledged and
|
|
776
|
-
* dropped, and schedules need the SQL backend.
|
|
777
|
-
*/
|
|
778
|
-
function vercelQueueBackend(client, options = {}) {
|
|
779
|
-
const group = options.consumerGroup ?? "better-supabase";
|
|
780
|
-
const retryAfter = options.retryAfter ?? 30;
|
|
781
|
-
const settle = options.settle ?? 25;
|
|
782
|
-
const held = /* @__PURE__ */ new Map();
|
|
783
|
-
const delays = /* @__PURE__ */ new Map();
|
|
784
|
-
const handles = /* @__PURE__ */ new Map();
|
|
785
|
-
let next = 0;
|
|
786
|
-
const handleOf = (messageId) => {
|
|
787
|
-
const known = messageId === null ? void 0 : handles.get(messageId);
|
|
788
|
-
if (known !== void 0) return known;
|
|
789
|
-
next += 1;
|
|
790
|
-
if (messageId !== null) handles.set(messageId, next);
|
|
791
|
-
return next;
|
|
792
|
-
};
|
|
793
|
-
const topicOf = (queue) => {
|
|
794
|
-
if (!TOPIC.test(queue)) throw new TypeError(`Vercel Queues topic names match ${TOPIC.source}, got "${queue}"`);
|
|
795
|
-
return queue;
|
|
796
|
-
};
|
|
797
|
-
const key = (job) => `${job.queue}:${job.id}`;
|
|
798
|
-
return {
|
|
799
|
-
apiVersion: 1,
|
|
800
|
-
name: "vercel-queues",
|
|
801
|
-
leases: false,
|
|
802
|
-
async send(queue, payload, delay, maxAttempts, dedupeKey) {
|
|
803
|
-
const sent = await client.send(topicOf(queue), {
|
|
804
|
-
payload: payload ?? {},
|
|
805
|
-
max_attempts: maxAttempts
|
|
806
|
-
}, {
|
|
807
|
-
delaySeconds: delay,
|
|
808
|
-
...dedupeKey === void 0 ? {} : { idempotencyKey: dedupeKey }
|
|
809
|
-
});
|
|
810
|
-
return handleOf(sent.messageId);
|
|
811
|
-
},
|
|
812
|
-
read(queue, lease, batch) {
|
|
813
|
-
const rows = [];
|
|
814
|
-
return new Promise((resolve, reject) => {
|
|
815
|
-
let timer;
|
|
816
|
-
const finish = () => {
|
|
817
|
-
resolve([...rows]);
|
|
818
|
-
};
|
|
819
|
-
const handler = (message, metadata) => {
|
|
820
|
-
const id = handleOf(metadata.messageId);
|
|
821
|
-
rows.push({
|
|
822
|
-
id,
|
|
823
|
-
attempts: metadata.deliveryCount,
|
|
824
|
-
enqueued_at: metadata.createdAt,
|
|
825
|
-
visible_until: new Date(Date.now() + lease * 1e3),
|
|
826
|
-
message
|
|
827
|
-
});
|
|
828
|
-
return new Promise((done, failed) => {
|
|
829
|
-
held.set(`${queue}:${id}`, {
|
|
830
|
-
metadata,
|
|
831
|
-
done: () => {
|
|
832
|
-
done();
|
|
833
|
-
},
|
|
834
|
-
fail: (error) => {
|
|
835
|
-
failed(error);
|
|
836
|
-
}
|
|
837
|
-
});
|
|
838
|
-
timer ??= setTimeout(finish, settle);
|
|
839
|
-
});
|
|
840
|
-
};
|
|
841
|
-
client.receive(topicOf(queue), group, handler, {
|
|
842
|
-
limit: Math.min(Math.max(batch, 1), 10),
|
|
843
|
-
visibilityTimeoutSeconds: Math.min(Math.max(lease, 30), 3600),
|
|
844
|
-
retry: (_error, metadata) => {
|
|
845
|
-
const afterSeconds = delays.get(metadata.messageId) ?? retryAfter;
|
|
846
|
-
delays.delete(metadata.messageId);
|
|
847
|
-
return { afterSeconds };
|
|
848
|
-
}
|
|
849
|
-
}).then(() => {
|
|
850
|
-
if (timer !== void 0) clearTimeout(timer);
|
|
851
|
-
finish();
|
|
852
|
-
}, reject);
|
|
853
|
-
});
|
|
854
|
-
},
|
|
855
|
-
complete(job) {
|
|
856
|
-
const entry = held.get(key(job));
|
|
857
|
-
if (!entry) return Promise.resolve(false);
|
|
858
|
-
held.delete(key(job));
|
|
859
|
-
entry.done();
|
|
860
|
-
return Promise.resolve(true);
|
|
861
|
-
},
|
|
862
|
-
fail(job, error, retryIn) {
|
|
863
|
-
const entry = held.get(key(job));
|
|
864
|
-
if (!entry) return Promise.resolve(null);
|
|
865
|
-
held.delete(key(job));
|
|
866
|
-
if (job.attempts >= job.maxAttempts) {
|
|
867
|
-
entry.done();
|
|
868
|
-
return Promise.resolve("dead");
|
|
869
|
-
}
|
|
870
|
-
if (retryIn !== void 0) delays.set(entry.metadata.messageId, retryIn);
|
|
871
|
-
entry.fail(new Error(error));
|
|
872
|
-
return Promise.resolve("queued");
|
|
873
|
-
},
|
|
874
|
-
extend: () => Promise.resolve(false),
|
|
875
|
-
schedule: () => sqlOnly("schedule"),
|
|
876
|
-
unschedule: () => sqlOnly("unschedule")
|
|
877
|
-
};
|
|
878
|
-
}
|
|
879
|
-
//#endregion
|
|
880
|
-
//#region src/blocks/jobs/queue.ts
|
|
881
|
-
/**
|
|
882
|
-
* Transient claim errors in a row a lane retries, with backoff, before the loop
|
|
883
|
-
* throws.
|
|
884
|
-
*/
|
|
885
|
-
const CLAIM_RETRIES = 3;
|
|
886
|
-
/** The abort reason of a job whose lease couldn't be extended. */
|
|
887
|
-
const LEASE_LOST = Symbol("lease lost");
|
|
888
|
-
const TRANSIENT = /* @__PURE__ */ new Set([
|
|
889
|
-
"network",
|
|
890
|
-
"timeout",
|
|
891
|
-
"serialization",
|
|
892
|
-
"rate_limited"
|
|
893
|
-
]);
|
|
894
|
-
function toJob(queue, row) {
|
|
895
|
-
const message = row.message ?? {};
|
|
896
|
-
const { payload, context } = unwrap(message.payload);
|
|
897
|
-
return {
|
|
898
|
-
id: Number(row.id),
|
|
899
|
-
queue,
|
|
900
|
-
payload,
|
|
901
|
-
context,
|
|
902
|
-
attempts: row.attempts,
|
|
903
|
-
maxAttempts: message.max_attempts ?? 5,
|
|
904
|
-
enqueuedAt: toInstant(row.enqueued_at),
|
|
905
|
-
visibleUntil: toInstant(row.visible_until),
|
|
906
|
-
lastError: message.last_error ?? null
|
|
907
|
-
};
|
|
908
|
-
}
|
|
909
|
-
const QUEUE_NAME = /^[a-z_][a-z0-9_]{0,46}$/;
|
|
910
|
-
/**
|
|
911
|
-
* `transport` with every call made through `blockCall`, so a rejection is
|
|
912
|
-
* mapped to a `DbError` (with the app's `mappers` first), as in every block.
|
|
913
|
-
*/
|
|
914
|
-
function mappedTransport(transport, mappers) {
|
|
915
|
-
return { async call(schema, fn, args) {
|
|
916
|
-
const result = await blockCall(transport, schema, mappers)(fn, args, (value) => value);
|
|
917
|
-
if (!result.ok) throw new DbException(result.error);
|
|
918
|
-
return result.data;
|
|
919
|
-
} };
|
|
920
|
-
}
|
|
921
|
-
function backendOf(options, now) {
|
|
922
|
-
if (options.backend) return options.backend;
|
|
923
|
-
if (options.sql) return sqlQueueBackend(options.sql, now);
|
|
924
|
-
if (options.client && options.schema) return transportQueueBackend(mappedTransport(rpcTransport(options.client, { schema: options.schema }), options.mappers), {
|
|
925
|
-
now,
|
|
926
|
-
schema: options.schema
|
|
927
|
-
});
|
|
928
|
-
if (options.client) return pgmqPublicBackend(options.client);
|
|
929
|
-
if (options.transport) return transportQueueBackend(mappedTransport(options.transport, options.mappers), {
|
|
930
|
-
now,
|
|
931
|
-
...options.schema ? { schema: options.schema } : {}
|
|
932
|
-
});
|
|
933
|
-
throw new TypeError("createJobs needs a backend, sql, client or transport to store jobs");
|
|
934
|
-
}
|
|
935
|
-
const later = (a, b) => temporal().Instant.compare(a, b) >= 0 ? a : b;
|
|
936
|
-
/**
|
|
937
|
-
* Typed jobs on Supabase Queues (pgmq), over the `jobs` SQL module.
|
|
938
|
-
*
|
|
939
|
-
* Pass a service SQL connection (`postgres.admin`, `ctx.sql`) for the full
|
|
940
|
-
* feature set, a service-role `rpcTransport` over the wrappers
|
|
941
|
-
* `blocks.jobs.api` writes for the same features over the Data API (or a
|
|
942
|
-
* service-role Supabase client with `schema` set to that schema), a
|
|
943
|
-
* service-role Supabase client to go through the `pgmq_public` RPCs, or any
|
|
944
|
-
* `QueueBackend`. Queue names are lowercase letters, digits and underscores.
|
|
945
|
-
*/
|
|
946
|
-
function createJobs(options) {
|
|
947
|
-
applyTemporal(options);
|
|
948
|
-
const queues = options.queues ?? {};
|
|
949
|
-
const now = options.now ?? nowInstant;
|
|
950
|
-
for (const name of Object.keys(queues)) if (!QUEUE_NAME.test(name)) throw new TypeError(`Queue "${name}": pgmq queue names are lowercase letters, digits and underscores (at most 47)`);
|
|
951
|
-
const transport = backendOf(options, now);
|
|
952
|
-
const schemaOf = (queue) => {
|
|
953
|
-
const schema = queues[queue];
|
|
954
|
-
if (!schema) throw new TypeError(`Unknown queue "${queue}". Queues: ${Object.keys(queues).join(", ")}`);
|
|
955
|
-
return schema;
|
|
956
|
-
};
|
|
957
|
-
const complete = (job) => run(() => transport.complete(job));
|
|
958
|
-
const fail = (job, error, failOptions = {}) => run(() => transport.fail(job, errorText(error), failOptions.retryIn));
|
|
959
|
-
const claim = (queue, claimOptions = {}) => run(async () => {
|
|
960
|
-
schemaOf(queue);
|
|
961
|
-
return (await transport.read(queue, claimOptions.lease ?? 300, claimOptions.batch ?? 1)).map((row) => toJob(queue, row));
|
|
962
|
-
});
|
|
963
|
-
/**
|
|
964
|
-
* Extends the lease of every job in `held` at half the lease, so jobs waiting
|
|
965
|
-
* their turn in a claimed batch don't expire before they run. A job whose
|
|
966
|
-
* lease can't be extended is aborted: another worker may already hold it.
|
|
967
|
-
*/
|
|
968
|
-
const heartbeat = (held, lease) => transport.leases ? leaseHeartbeat(lease, () => {
|
|
969
|
-
for (const [job, controller] of held) run(() => transport.extend(job, lease)).then((extended) => {
|
|
970
|
-
if (!extended.ok || !extended.data) controller.abort(LEASE_LOST);
|
|
971
|
-
});
|
|
972
|
-
}) : void 0;
|
|
973
|
-
const leaseLost = (job, workOptions) => {
|
|
974
|
-
workOptions.onError?.(dbError("conflict", `The lease on job ${String(job.id)} in "${job.queue}" was lost, so another worker may run it`, { code: "JOB_LEASE_LOST" }), job);
|
|
975
|
-
return false;
|
|
976
|
-
};
|
|
977
|
-
const handle = async (job, handler, workOptions, controller = new AbortController()) => {
|
|
978
|
-
if (controller.signal.reason === LEASE_LOST) return leaseLost(job, workOptions);
|
|
979
|
-
try {
|
|
980
|
-
const payload = await validate(schemaOf(job.queue), job.payload, "payload");
|
|
981
|
-
if (!payload.ok) {
|
|
982
|
-
await fail(job, payload.error.message);
|
|
983
|
-
workOptions.onError?.(payload.error, job);
|
|
984
|
-
return false;
|
|
985
|
-
}
|
|
986
|
-
const context = workOptions.allTenants && job.context.tenant === void 0 ? allTenantsContext(job.context) : job.context;
|
|
987
|
-
const outcome = await handler(payload.data, {
|
|
988
|
-
...job,
|
|
989
|
-
payload: payload.data,
|
|
990
|
-
context
|
|
991
|
-
}, controller.signal);
|
|
992
|
-
if (typeof outcome === "object" && outcome !== null && "ok" in outcome && outcome.ok === false && "error" in outcome) throw outcome.error;
|
|
993
|
-
if (controller.signal.reason === LEASE_LOST) return leaseLost(job, workOptions);
|
|
994
|
-
const completed = await complete(job);
|
|
995
|
-
if (!completed.ok) {
|
|
996
|
-
workOptions.onError?.(completed.error, job);
|
|
997
|
-
return false;
|
|
998
|
-
}
|
|
999
|
-
return completed.data || leaseLost(job, workOptions);
|
|
1000
|
-
} catch (cause) {
|
|
1001
|
-
if (controller.signal.reason === LEASE_LOST) return leaseLost(job, workOptions);
|
|
1002
|
-
controller.abort();
|
|
1003
|
-
await fail(job, cause);
|
|
1004
|
-
workOptions.onError?.(typeof cause === "object" && cause !== null && "kind" in cause ? cause : toDbError(cause), job);
|
|
1005
|
-
return false;
|
|
1006
|
-
}
|
|
1007
|
-
};
|
|
1008
|
-
const loop = async (queue, handler, workOptions, forever, spent = budget(void 0)) => {
|
|
1009
|
-
const concurrency = Math.max(1, workOptions.concurrency ?? 1);
|
|
1010
|
-
const lease = workOptions.lease ?? 300;
|
|
1011
|
-
const firstWait = workOptions.pollInterval ?? 1e3;
|
|
1012
|
-
const maxWait = Math.max(firstWait, workOptions.maxPollInterval ?? 3e4);
|
|
1013
|
-
let succeeded = 0;
|
|
1014
|
-
let failed = 0;
|
|
1015
|
-
const stop = new AbortController();
|
|
1016
|
-
const signal = workOptions.signal ? AbortSignal.any([workOptions.signal, stop.signal]) : stop.signal;
|
|
1017
|
-
const lanes = Array.from({ length: concurrency }, async () => {
|
|
1018
|
-
let wait = firstWait;
|
|
1019
|
-
let misses = 0;
|
|
1020
|
-
while (!signal.aborted) {
|
|
1021
|
-
if (spent.expired()) return;
|
|
1022
|
-
const claimed = await claim(queue, {
|
|
1023
|
-
...workOptions,
|
|
1024
|
-
batch: workOptions.batch ?? 1
|
|
1025
|
-
});
|
|
1026
|
-
if (!claimed.ok) {
|
|
1027
|
-
misses += 1;
|
|
1028
|
-
if (misses > CLAIM_RETRIES || !TRANSIENT.has(claimed.error.kind)) {
|
|
1029
|
-
stop.abort();
|
|
1030
|
-
throw new TypeError(claimed.error.message, { cause: claimed.error });
|
|
1031
|
-
}
|
|
1032
|
-
await sleep(Math.min(firstWait * 2 ** (misses - 1), spent.remaining()), signal);
|
|
1033
|
-
continue;
|
|
1034
|
-
}
|
|
1035
|
-
misses = 0;
|
|
1036
|
-
if (claimed.data.length === 0) {
|
|
1037
|
-
if (!forever) return;
|
|
1038
|
-
await sleep(wait, signal);
|
|
1039
|
-
wait = Math.min(maxWait, wait * 2);
|
|
1040
|
-
continue;
|
|
1041
|
-
}
|
|
1042
|
-
wait = firstWait;
|
|
1043
|
-
const held = new Map(claimed.data.map((job) => [job, new AbortController()]));
|
|
1044
|
-
const stopHeartbeat = heartbeat(held, lease);
|
|
1045
|
-
try {
|
|
1046
|
-
for (const job of claimed.data) {
|
|
1047
|
-
if (await handle(job, handler, workOptions, held.get(job))) succeeded += 1;
|
|
1048
|
-
else failed += 1;
|
|
1049
|
-
held.delete(job);
|
|
1050
|
-
}
|
|
1051
|
-
} finally {
|
|
1052
|
-
stopHeartbeat?.();
|
|
1053
|
-
}
|
|
1054
|
-
}
|
|
1055
|
-
});
|
|
1056
|
-
const settled = await Promise.allSettled(lanes);
|
|
1057
|
-
for (const lane of settled) if (lane.status === "rejected") throw lane.reason;
|
|
1058
|
-
return {
|
|
1059
|
-
succeeded,
|
|
1060
|
-
failed
|
|
1061
|
-
};
|
|
1062
|
-
};
|
|
1063
|
-
const runSchedules = async (scheduleOptions) => {
|
|
1064
|
-
if (!transport.dueSchedules || !transport.advanceSchedule) return 0;
|
|
1065
|
-
const due = await transport.dueSchedules(scheduleOptions.lease ?? 60, scheduleOptions.batch ?? 100);
|
|
1066
|
-
let ran = 0;
|
|
1067
|
-
for (const schedule of due) {
|
|
1068
|
-
await transport.send(schedule.queue, schedule.payload, 0, 5, `schedule:${schedule.name}:${schedule.nextRun.toString()}`);
|
|
1069
|
-
const next = millis(nextCronRun(schedule.cron, schedule.timeZone, later(now(), schedule.nextRun)));
|
|
1070
|
-
if (await transport.advanceSchedule(schedule.name, schedule.nextRun, next)) ran += 1;
|
|
1071
|
-
}
|
|
1072
|
-
return ran;
|
|
1073
|
-
};
|
|
1074
|
-
const prepare = async (name, cron, queue, payload, scheduleOptions, tenantDefault) => {
|
|
1075
|
-
const valid = await validate(schemaOf(queue), payload, "payload");
|
|
1076
|
-
if (!valid.ok) return valid;
|
|
1077
|
-
const timeZone = scheduleOptions.timeZone ?? "UTC";
|
|
1078
|
-
try {
|
|
1079
|
-
nextCronRun(cron, timeZone, now());
|
|
1080
|
-
} catch (cause) {
|
|
1081
|
-
return err(dbError("validation", errorText(cause), { issues: [{
|
|
1082
|
-
message: errorText(cause),
|
|
1083
|
-
path: [name, "cron"]
|
|
1084
|
-
}] }));
|
|
1085
|
-
}
|
|
1086
|
-
const wrapped = wrapPayload(valid.data, scheduleOptions.context);
|
|
1087
|
-
if (!wrapped.ok) return wrapped;
|
|
1088
|
-
return ok({
|
|
1089
|
-
name,
|
|
1090
|
-
cron,
|
|
1091
|
-
queue,
|
|
1092
|
-
payload: wrapped.data,
|
|
1093
|
-
timeZone,
|
|
1094
|
-
tenant: scheduleOptions.tenant ?? (scheduleOptions.context ? tenantFrom(scheduleOptions.context, tenantPathsFor(void 0)) : void 0) ?? tenantDefault
|
|
1095
|
-
});
|
|
1096
|
-
};
|
|
1097
|
-
const write = (prepared) => transport.schedule(prepared.name, prepared.cron, prepared.queue, prepared.payload, prepared.timeZone, millis(nextCronRun(prepared.cron, prepared.timeZone, now())), prepared.tenant);
|
|
1098
|
-
const purge = (purgeOptions = {}) => run(async () => {
|
|
1099
|
-
if (!transport.purge) sqlOnly("purge");
|
|
1100
|
-
const backendPurge = transport.purge.bind(transport);
|
|
1101
|
-
const interval = (value) => value === void 0 ? void 0 : seconds(value);
|
|
1102
|
-
return (await Promise.all((purgeOptions.queues ?? Object.keys(queues)).map((queue) => {
|
|
1103
|
-
schemaOf(queue);
|
|
1104
|
-
return backendPurge(queue, {
|
|
1105
|
-
olderThan: interval(purgeOptions.olderThan),
|
|
1106
|
-
deadOlderThan: interval(purgeOptions.deadOlderThan),
|
|
1107
|
-
batch: purgeOptions.batch
|
|
1108
|
-
});
|
|
1109
|
-
}))).reduce((sum, count) => sum + count, 0);
|
|
1110
|
-
});
|
|
1111
|
-
const delayOf = (enqueueOptions) => {
|
|
1112
|
-
const delay = enqueueOptions.delay;
|
|
1113
|
-
if (delay !== void 0 && (!Number.isInteger(delay) || delay < 0)) return err(dbError("validation", "delay is a whole number of seconds", { issues: [{
|
|
1114
|
-
message: "Expected a non-negative integer",
|
|
1115
|
-
path: ["delay"]
|
|
1116
|
-
}] }));
|
|
1117
|
-
return ok(delay ?? (enqueueOptions.runAt ? Math.max(0, Math.ceil((enqueueOptions.runAt.epochMilliseconds - now().epochMilliseconds) / 1e3)) : 0));
|
|
1118
|
-
};
|
|
1119
|
-
/**
|
|
1120
|
-
* The validated payload in its envelope, and the delay, for `enqueue` and
|
|
1121
|
-
* `enqueueOnce`.
|
|
1122
|
-
*/
|
|
1123
|
-
const prepareSend = async (queue, payload, enqueueOptions) => {
|
|
1124
|
-
const valid = await validate(schemaOf(queue), payload, "payload");
|
|
1125
|
-
if (!valid.ok) return valid;
|
|
1126
|
-
const delay = delayOf(enqueueOptions);
|
|
1127
|
-
if (!delay.ok) return delay;
|
|
1128
|
-
const message = wrapPayload(valid.data, enqueueOptions.context, enqueueOptions.ticket === void 0 ? {} : { ticket: enqueueOptions.ticket });
|
|
1129
|
-
if (!message.ok) return message;
|
|
1130
|
-
return ok({
|
|
1131
|
-
message: message.data,
|
|
1132
|
-
delay: delay.data
|
|
1133
|
-
});
|
|
1134
|
-
};
|
|
1135
|
-
return withBlockHooks({
|
|
1136
|
-
enqueue(queue, payload, enqueueOptions = {}) {
|
|
1137
|
-
return AsyncResult.from(async () => {
|
|
1138
|
-
const prepared = await prepareSend(queue, payload, enqueueOptions);
|
|
1139
|
-
if (!prepared.ok) return prepared;
|
|
1140
|
-
const { message, delay } = prepared.data;
|
|
1141
|
-
return run(() => transport.send(queue, message, delay, enqueueOptions.maxAttempts ?? 5, enqueueOptions.dedupeKey, enqueueOptions.dedupe));
|
|
1142
|
-
});
|
|
1143
|
-
},
|
|
1144
|
-
enqueueOnce(queue, payload, enqueueOptions) {
|
|
1145
|
-
return AsyncResult.from(async () => {
|
|
1146
|
-
const prepared = await prepareSend(queue, payload, enqueueOptions);
|
|
1147
|
-
if (!prepared.ok) return prepared;
|
|
1148
|
-
const { message, delay } = prepared.data;
|
|
1149
|
-
return run(() => {
|
|
1150
|
-
if (!transport.sendOnce) sqlOnly("enqueueOnce");
|
|
1151
|
-
return transport.sendOnce(queue, message, delay, enqueueOptions.maxAttempts ?? 5, enqueueOptions.dedupeKey);
|
|
1152
|
-
});
|
|
1153
|
-
});
|
|
1154
|
-
},
|
|
1155
|
-
claim,
|
|
1156
|
-
complete,
|
|
1157
|
-
fail,
|
|
1158
|
-
extend: (job, lease) => run(() => transport.extend(job, lease)),
|
|
1159
|
-
stats: (names) => run(async () => {
|
|
1160
|
-
const stats = (queue) => transport.stats?.(queue) ?? sqlOnly("stats");
|
|
1161
|
-
const list = names ?? Object.keys(queues);
|
|
1162
|
-
const entries = await Promise.all(list.map(async (queue) => {
|
|
1163
|
-
schemaOf(queue);
|
|
1164
|
-
return [queue, await stats(queue)];
|
|
1165
|
-
}));
|
|
1166
|
-
return Object.fromEntries(entries);
|
|
1167
|
-
}),
|
|
1168
|
-
listDead: (queue, listOptions = {}) => run(async () => {
|
|
1169
|
-
if (!transport.listDead) sqlOnly("listDead");
|
|
1170
|
-
schemaOf(queue);
|
|
1171
|
-
return (await transport.listDead(queue, listOptions.limit ?? 100, pageOf(listOptions).cursor)).map((row) => {
|
|
1172
|
-
const message = row.message ?? {};
|
|
1173
|
-
const { payload, context } = unwrap(message.payload);
|
|
1174
|
-
return {
|
|
1175
|
-
id: Number(row.id),
|
|
1176
|
-
queue,
|
|
1177
|
-
payload,
|
|
1178
|
-
context,
|
|
1179
|
-
attempts: row.attempts,
|
|
1180
|
-
maxAttempts: message.max_attempts ?? 5,
|
|
1181
|
-
lastError: message.last_error ?? null,
|
|
1182
|
-
enqueuedAt: toInstant(row.enqueued_at),
|
|
1183
|
-
diedAt: row.died_at === null ? null : toInstant(row.died_at)
|
|
1184
|
-
};
|
|
1185
|
-
});
|
|
1186
|
-
}),
|
|
1187
|
-
retryDead: (queue, retryOptions = {}) => run(async () => {
|
|
1188
|
-
if (!transport.retryDead) sqlOnly("retryDead");
|
|
1189
|
-
schemaOf(queue);
|
|
1190
|
-
return transport.retryDead(queue, retryOptions.ids, retryOptions.limit ?? 1e3);
|
|
1191
|
-
}),
|
|
1192
|
-
purge,
|
|
1193
|
-
purgeJob: (purgeOptions) => async () => purge(purgeOptions).orThrow(),
|
|
1194
|
-
replay: (queue, id) => run(() => {
|
|
1195
|
-
if (!transport.replay) sqlOnly("replay");
|
|
1196
|
-
return transport.replay(queue, id);
|
|
1197
|
-
}),
|
|
1198
|
-
schedule(name, cron, queue, payload, scheduleOptions = {}) {
|
|
1199
|
-
return AsyncResult.from(async () => {
|
|
1200
|
-
const prepared = await prepare(name, cron, queue, payload, scheduleOptions);
|
|
1201
|
-
if (!prepared.ok) return prepared;
|
|
1202
|
-
return run(() => write(prepared.data));
|
|
1203
|
-
});
|
|
1204
|
-
},
|
|
1205
|
-
unschedule: (name) => run(() => transport.unschedule(name)),
|
|
1206
|
-
ensureSchedules(definitions, ensureOptions) {
|
|
1207
|
-
return AsyncResult.from(async () => {
|
|
1208
|
-
const { prefix, tenant } = ensureOptions;
|
|
1209
|
-
if (prefix.length === 0) return err(dbError("invalid_request", "ensureSchedules needs a non-empty prefix"));
|
|
1210
|
-
const names = /* @__PURE__ */ new Set();
|
|
1211
|
-
const prepared = [];
|
|
1212
|
-
for (const definition of definitions) {
|
|
1213
|
-
if (!definition.name.startsWith(prefix) || names.has(definition.name)) return err(dbError("invalid_request", names.has(definition.name) ? `Schedule "${definition.name}" is defined twice` : `Schedule "${definition.name}" does not start with "${prefix}"`));
|
|
1214
|
-
names.add(definition.name);
|
|
1215
|
-
const ready = await prepare(definition.name, definition.cron, definition.queue, definition.payload, definition, tenant);
|
|
1216
|
-
if (!ready.ok) return ready;
|
|
1217
|
-
prepared.push(ready.data);
|
|
1218
|
-
}
|
|
1219
|
-
return run(async () => {
|
|
1220
|
-
if (!transport.listSchedules) sqlOnly("ensureSchedules");
|
|
1221
|
-
const existing = await transport.listSchedules({
|
|
1222
|
-
prefix,
|
|
1223
|
-
...tenant === void 0 ? {} : { tenant }
|
|
1224
|
-
});
|
|
1225
|
-
for (const schedule of prepared) await write(schedule);
|
|
1226
|
-
const removed = [];
|
|
1227
|
-
for (const schedule of existing) {
|
|
1228
|
-
if (names.has(schedule.name)) continue;
|
|
1229
|
-
if (await transport.unschedule(schedule.name)) removed.push(schedule.name);
|
|
1230
|
-
}
|
|
1231
|
-
return {
|
|
1232
|
-
scheduled: [...names],
|
|
1233
|
-
removed
|
|
1234
|
-
};
|
|
1235
|
-
});
|
|
1236
|
-
});
|
|
1237
|
-
},
|
|
1238
|
-
listSchedules: (filter = {}) => run(async () => {
|
|
1239
|
-
if (!transport.listSchedules) sqlOnly("listSchedules");
|
|
1240
|
-
return [...await transport.listSchedules(filter)];
|
|
1241
|
-
}),
|
|
1242
|
-
unscheduleAll: (filter) => run(() => {
|
|
1243
|
-
if (!transport.unscheduleTenant) sqlOnly("unscheduleAll");
|
|
1244
|
-
return transport.unscheduleTenant(filter.tenant);
|
|
1245
|
-
}),
|
|
1246
|
-
runSchedules: (scheduleOptions = {}) => run(() => runSchedules(scheduleOptions)),
|
|
1247
|
-
drain: (queue, handler, drainOptions = {}) => loop(queue, handler, drainOptions, false, budget(drainOptions.budgetMs)),
|
|
1248
|
-
work: (queue, handler, workOptions = {}) => loop(queue, handler, workOptions, true),
|
|
1249
|
-
drainRoute(routeOptions) {
|
|
1250
|
-
for (const queue of Object.keys(routeOptions.handlers)) schemaOf(queue);
|
|
1251
|
-
return cronRoute({
|
|
1252
|
-
name: "drain",
|
|
1253
|
-
secret: routeOptions.secret,
|
|
1254
|
-
problem: routeOptions.problem
|
|
1255
|
-
}, async (request) => {
|
|
1256
|
-
const spent = budget(routeOptions.budgetMs ?? 5e4);
|
|
1257
|
-
const monitor = routeOptions.monitor;
|
|
1258
|
-
let errors = 0;
|
|
1259
|
-
const report = (cause) => {
|
|
1260
|
-
errors += 1;
|
|
1261
|
-
routeOptions.onError?.(toDbError(cause));
|
|
1262
|
-
};
|
|
1263
|
-
const watch = async (fn) => {
|
|
1264
|
-
try {
|
|
1265
|
-
return await fn();
|
|
1266
|
-
} catch (cause) {
|
|
1267
|
-
routeOptions.onError?.(toDbError(cause));
|
|
1268
|
-
return;
|
|
1269
|
-
}
|
|
1270
|
-
};
|
|
1271
|
-
const started = monitor?.onStart ? await watch(() => monitor.onStart?.(request)) : void 0;
|
|
1272
|
-
let scheduled = 0;
|
|
1273
|
-
if (routeOptions.schedules ?? true) {
|
|
1274
|
-
const ran = await run(() => runSchedules({}));
|
|
1275
|
-
if (ran.ok) scheduled = ran.data;
|
|
1276
|
-
else {
|
|
1277
|
-
errors += 1;
|
|
1278
|
-
routeOptions.onError?.(ran.error);
|
|
1279
|
-
}
|
|
1280
|
-
}
|
|
1281
|
-
const results = {};
|
|
1282
|
-
for (const [queue, handler] of Object.entries(routeOptions.handlers)) {
|
|
1283
|
-
if (handler === void 0) continue;
|
|
1284
|
-
if (spent.expired()) break;
|
|
1285
|
-
try {
|
|
1286
|
-
results[queue] = await loop(queue, handler, routeOptions, false, spent);
|
|
1287
|
-
} catch (cause) {
|
|
1288
|
-
report(cause);
|
|
1289
|
-
results[queue] = {
|
|
1290
|
-
succeeded: 0,
|
|
1291
|
-
failed: 0
|
|
1292
|
-
};
|
|
1293
|
-
}
|
|
1294
|
-
}
|
|
1295
|
-
const result = {
|
|
1296
|
-
schedules: scheduled,
|
|
1297
|
-
queues: results,
|
|
1298
|
-
budgetExhausted: spent.expired(),
|
|
1299
|
-
errors
|
|
1300
|
-
};
|
|
1301
|
-
if (monitor?.onFinish) await watch(() => monitor.onFinish?.(result, started));
|
|
1302
|
-
return Response.json(result);
|
|
1303
|
-
});
|
|
1304
|
-
}
|
|
1305
|
-
}, options.hooks, {
|
|
1306
|
-
block: "jobs",
|
|
1307
|
-
...options.logger ? { logger: options.logger } : {}
|
|
1308
|
-
});
|
|
1309
|
-
}
|
|
1310
|
-
//#endregion
|
|
1311
|
-
//#region src/blocks/jobs/manifest.ts
|
|
1312
|
-
/** The `jobs` block's manifest (ADR 0029). */
|
|
1313
|
-
const jobsBlock = defineBlock({
|
|
1314
|
-
name: "jobs",
|
|
1315
|
-
sql: ["jobs"],
|
|
1316
|
-
options: { jobs: jobsSqlOptions },
|
|
1317
|
-
create: createJobs,
|
|
1318
|
-
category: "automation",
|
|
1319
|
-
recipes: ["job-runs-table"]
|
|
1320
|
-
});
|
|
1321
|
-
/** The `idempotency` block's manifest (ADR 0029). */
|
|
1322
|
-
const idempotencyBlock = defineBlock({
|
|
1323
|
-
name: "idempotency",
|
|
1324
|
-
sql: ["idempotency"],
|
|
1325
|
-
create: createIdempotency,
|
|
1326
|
-
category: "developer"
|
|
1327
|
-
});
|
|
1328
|
-
/** The `rate-limit` block's manifest (ADR 0029). */
|
|
1329
|
-
const rateLimitBlock = defineBlock({
|
|
1330
|
-
name: "rate-limit",
|
|
1331
|
-
sql: ["rate-limit"],
|
|
1332
|
-
options: { "rate-limit": rateLimitSqlOptions },
|
|
1333
|
-
create: createRateLimit,
|
|
1334
|
-
category: "developer"
|
|
1335
|
-
});
|
|
1336
|
-
/** The `webhook-inbox` block's manifest (ADR 0029). */
|
|
1337
|
-
const webhookInboxBlock = defineBlock({
|
|
1338
|
-
name: "webhook-inbox",
|
|
1339
|
-
sql: ["webhook-inbox"],
|
|
1340
|
-
options: { "webhook-inbox": webhookInboxSqlOptions },
|
|
1341
|
-
create: createWebhookInbox,
|
|
1342
|
-
category: "developer"
|
|
1343
|
-
});
|
|
1344
|
-
//#endregion
|
|
1345
|
-
export { assertCron, createIdempotency, createJobs, createRateLimit, createWebhookInbox, dbTransport, devDrain, devDrainSecret, idempotencyBlock, jobsBlock, nextCronRun, pgmqPublicBackend, purgeWebhookInbox, rateLimitBlock, rateLimited, rpcTransport, sqlQueueBackend, sqlTransport, transportQueueBackend, vercelQueueBackend, webhookInboxBlock, withLease };
|