better-supabase 0.15.1 → 0.16.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{ai-schedules-D_Hz-ik5.d.ts → ai-schedules-BmkARmQ9.d.ts} +1 -1
- package/dist/{api-DxAPqMrE.d.ts → api-hHwieEfz.d.ts} +1 -1
- package/dist/{app-tables-CbCFSXLG.d.ts → app-tables-yMQ4ubyY.d.ts} +1 -1
- package/dist/astro/index.d.ts +4 -4
- package/dist/{auth-module-BEFESDC4.js → auth-module-BbmX-N4L.js} +12 -4
- package/dist/better-result/index.d.ts +2 -2
- package/dist/{bind-h5jre2K0.d.ts → bind-JGCPGUJh.d.ts} +4 -4
- package/dist/{block-env-BrfRvPrj.d.ts → block-env-y65GF_px.d.ts} +4 -4
- package/dist/blocks/access-requests/index.d.ts +1 -1
- package/dist/blocks/activities/index.d.ts +1 -1
- package/dist/blocks/agents/index.d.ts +1 -1
- package/dist/blocks/ai-cache/index.d.ts +1 -1
- package/dist/blocks/ai-chat/index.d.ts +4 -4
- package/dist/blocks/ai-files/index.d.ts +1 -1
- package/dist/blocks/ai-keys/index.d.ts +1 -1
- package/dist/blocks/ai-schedules/index.d.ts +2 -2
- package/dist/blocks/announcements/index.d.ts +4 -4
- package/dist/blocks/api-keys/index.d.ts +2 -2
- package/dist/blocks/approvals/index.d.ts +1 -1
- package/dist/blocks/assets/index.d.ts +1 -1
- package/dist/blocks/assignment/index.d.ts +1 -1
- package/dist/blocks/attachments/index.d.ts +2 -2
- package/dist/blocks/audit/index.d.ts +5 -5
- package/dist/blocks/automations/index.d.ts +3 -3
- package/dist/blocks/billable-time/index.d.ts +1 -1
- package/dist/blocks/billing/index.d.ts +3 -3
- package/dist/blocks/bookings/index.d.ts +2 -2
- package/dist/blocks/bulk/index.d.ts +1 -1
- package/dist/blocks/calendar/index.d.ts +2 -2
- package/dist/blocks/catalog/index.d.ts +1 -1
- package/dist/blocks/channels/index.d.ts +1 -1
- package/dist/blocks/collections/index.d.ts +1 -1
- package/dist/blocks/comments/index.d.ts +4 -4
- package/dist/blocks/compliance/index.d.ts +1 -1
- package/dist/blocks/connectors/index.d.ts +1 -1
- package/dist/blocks/contacts/index.d.ts +1 -1
- package/dist/blocks/content/index.d.ts +1 -1
- package/dist/blocks/contracts/index.d.ts +1 -1
- package/dist/blocks/courses/index.d.ts +1 -1
- package/dist/blocks/created-by/index.d.ts +1 -1
- package/dist/blocks/custom-fields/index.d.ts +1 -1
- package/dist/blocks/data-lifecycle/index.d.ts +1 -1
- package/dist/blocks/deals/index.d.ts +1 -1
- package/dist/blocks/dispatch/index.d.ts +1 -1
- package/dist/blocks/documents/index.d.ts +1 -1
- package/dist/blocks/domains/index.d.ts +1 -1
- package/dist/blocks/donations/index.d.ts +1 -1
- package/dist/blocks/drive/index.d.ts +1 -1
- package/dist/blocks/employees/index.d.ts +2 -2
- package/dist/blocks/enrichment/index.d.ts +1 -1
- package/dist/blocks/enrollments/index.d.ts +1 -1
- package/dist/blocks/entitlements/index.d.ts +3 -3
- package/dist/blocks/expenses/index.d.ts +1 -1
- package/dist/blocks/field-history/index.d.ts +1 -1
- package/dist/blocks/flags/index.d.ts +1 -1
- package/dist/blocks/forecasts/index.d.ts +1 -1
- package/dist/blocks/forms/index.d.ts +2 -2
- package/dist/blocks/goals/index.d.ts +1 -1
- package/dist/blocks/guests/index.d.ts +1 -1
- package/dist/blocks/hiring/index.d.ts +1 -1
- package/dist/blocks/identities/index.d.ts +1 -1
- package/dist/blocks/imports/index.d.ts +1 -1
- package/dist/blocks/inbox/index.d.ts +5 -5
- package/dist/blocks/incidents/index.d.ts +1 -1
- package/dist/blocks/index.d.ts +2 -2
- package/dist/blocks/inventory/index.d.ts +1 -1
- package/dist/blocks/invoices/index.d.ts +1 -1
- package/dist/blocks/knowledge/index.d.ts +1 -1
- package/dist/blocks/lead-scoring/index.d.ts +1 -1
- package/dist/blocks/leases/index.d.ts +1 -1
- package/dist/blocks/leave/index.d.ts +1 -1
- package/dist/blocks/ledger/index.d.ts +1 -1
- package/dist/blocks/mail-sync/index.d.ts +1 -1
- package/dist/blocks/memberships/index.d.ts +1 -1
- package/dist/blocks/memory/index.d.ts +1 -1
- package/dist/blocks/messaging/index.d.ts +4 -4
- package/dist/blocks/metrics/index.d.ts +1 -1
- package/dist/blocks/mfa/index.d.ts +2 -2
- package/dist/blocks/moderation/index.d.ts +1 -1
- package/dist/blocks/notifications/index.d.ts +4 -4
- package/dist/blocks/numbering/index.d.ts +1 -1
- package/dist/blocks/oauth-server/index.d.ts +1 -1
- package/dist/blocks/onboarding/index.d.ts +2 -2
- package/dist/blocks/orders/index.d.ts +2 -2
- package/dist/blocks/organizations/index.d.ts +2 -2
- package/dist/blocks/outbox/index.d.ts +1 -1
- package/dist/blocks/passes/index.d.ts +1 -1
- package/dist/blocks/permissions/index.d.ts +3 -3
- package/dist/blocks/pipelines/index.d.ts +1 -1
- package/dist/blocks/posts/index.d.ts +1 -1
- package/dist/blocks/profiles/index.d.ts +1 -1
- package/dist/blocks/promotions/index.d.ts +1 -1
- package/dist/blocks/push/index.d.ts +2 -2
- package/dist/blocks/queue/index.d.ts +29 -2
- package/dist/blocks/queue/index.js +1 -1
- package/dist/blocks/quotes/index.d.ts +1 -1
- package/dist/blocks/rank/index.d.ts +1 -1
- package/dist/blocks/reactions/index.d.ts +4 -4
- package/dist/blocks/relations/index.d.ts +1 -1
- package/dist/blocks/reminders/index.d.ts +1 -1
- package/dist/blocks/reviews/index.d.ts +1 -1
- package/dist/blocks/saved-views/index.d.ts +3 -3
- package/dist/blocks/scores/index.d.ts +1 -1
- package/dist/blocks/search/index.d.ts +3 -3
- package/dist/blocks/security-events/index.d.ts +1 -1
- package/dist/blocks/segments/index.d.ts +1 -1
- package/dist/blocks/sequences/index.d.ts +1 -1
- package/dist/blocks/service-accounts/index.d.ts +1 -1
- package/dist/blocks/sessions/index.d.ts +2 -2
- package/dist/blocks/settings/index.d.ts +2 -2
- package/dist/blocks/share-links/index.d.ts +1 -1
- package/dist/blocks/shipments/index.d.ts +1 -1
- package/dist/blocks/signatures/index.d.ts +1 -1
- package/dist/blocks/signing-keys/index.d.ts +1 -1
- package/dist/blocks/sla/index.d.ts +1 -1
- package/dist/blocks/sso/index.d.ts +1 -1
- package/dist/blocks/state-machine/index.d.ts +1 -1
- package/dist/blocks/subjects/index.d.ts +2 -2
- package/dist/blocks/tags/index.d.ts +2 -2
- package/dist/blocks/tasks/index.d.ts +2 -2
- package/dist/blocks/teams/index.d.ts +1 -1
- package/dist/blocks/templates/index.d.ts +1 -1
- package/dist/blocks/time-tracking/index.d.ts +1 -1
- package/dist/blocks/timeline/index.d.ts +3 -3
- package/dist/blocks/trash/index.d.ts +1 -1
- package/dist/blocks/undo/index.d.ts +2 -2
- package/dist/blocks/updated-at/index.d.ts +1 -1
- package/dist/blocks/usage/index.d.ts +2 -2
- package/dist/blocks/vercel-marketplace/index.d.ts +1 -1
- package/dist/blocks/versions/index.d.ts +1 -1
- package/dist/blocks/waitlist/index.d.ts +1 -1
- package/dist/blocks/webhooks/index.d.ts +2 -2
- package/dist/blocks/webhooks/index.js +1 -1
- package/dist/blocks/workflow-editor/index.d.ts +4 -4
- package/dist/blocks/workflows/index.d.ts +4 -4
- package/dist/{bucket-CiNi8sIw.d.ts → bucket-vc-QRrva.d.ts} +40 -1
- package/dist/cli/add-Bfb_ISrO.js +1 -0
- package/dist/cli/{add-DNOL9PDu.js → add-D7TkPdco.js} +9 -9
- package/dist/cli/{add-C04vkBk9.js → add-I8OW-qJH.js} +2 -2
- package/dist/cli/{backfill-VFzf-TJP.js → backfill-DIz5DnlQ.js} +1 -1
- package/dist/cli/bin.js +1 -1
- package/dist/cli/{blocks-Bn7WUca5.js → blocks-Bp5RPoft.js} +1 -1
- package/dist/cli/{blocks-Cb7mILFU.js → blocks-xk-SE8gS.js} +1 -1
- package/dist/cli/{cache-DkplpIGe.js → cache-AznIssjI.js} +1 -1
- package/dist/cli/{codemod-BbaE5dL_.js → codemod-Aewxza6i.js} +1 -1
- package/dist/cli/{content-mapper-Cdx6arxu.js → content-mapper-DCrz6OIv.js} +2 -2
- package/dist/cli/{doctor-C-VO-QQ2.js → doctor-DkOSLPEQ.js} +13 -13
- package/dist/cli/{gen-yRHOHW1b.js → gen-CFkYUnWq.js} +10 -10
- package/dist/cli/index.d.ts +1 -1
- package/dist/cli/index.js +6 -6
- package/dist/cli/{init-BOw0SX65.js → init-CHj9ad4S.js} +5 -5
- package/dist/cli/{live-Lmg-hYyO.js → live-DGdLR41j.js} +2 -2
- package/dist/cli/{mcp-DQ1zR2eA.js → mcp-BZno503V.js} +2 -2
- package/dist/cli/{metadata-CZaxkv21.js → metadata-BfgHMe4q.js} +3 -3
- package/dist/cli/{migration-safety-BbhLu2fo.js → migration-safety-BnnXPAro.js} +1 -1
- package/dist/cli/{module-migration-DOn6EmNz.js → module-migration-O_IxewFs.js} +1 -1
- package/dist/cli/{print-D_xf8PPj.js → print-DosQIFSy.js} +1 -1
- package/dist/cli/{remove-BY_TOTRj.js → remove-DK2G_KHm.js} +5 -5
- package/dist/cli/{render-lJmHr0y9.js → render-5y5a1QZr.js} +3 -3
- package/dist/cli/{run-BJ6IMs_H.js → run-Bs4OKdDI.js} +7 -7
- package/dist/cli/{run-DkB0fhc9.js → run-MRET30vh.js} +20 -20
- package/dist/cli/{shared-Bh-6IqJS.js → shared-BLqbvY2x.js} +1 -1
- package/dist/cli/{snapshot-Bzcigm7T.js → snapshot-uTUlEzY2.js} +2 -2
- package/dist/cli/{source-WoLdcQzN.js → source-D2gJHKwC.js} +1 -1
- package/dist/cli/{spec-CZMiLhv_.js → spec-Cm2einTO.js} +2 -2
- package/dist/cli/{spec-BF_dpwzW.js → spec-DUjOtciN.js} +1 -1
- package/dist/cli/{sql-layout-rFP0oq1N.js → sql-layout-lUWenjJw.js} +2 -2
- package/dist/cli/{sync-mANmYYoL.js → sync-CZMRB3aU.js} +2 -2
- package/dist/cli/{upgrade-B0Q9wMs-.js → upgrade-BFEIMC7U.js} +3 -3
- package/dist/cli/{upgrade-BrNLt92u.js → upgrade-fVsJniXm.js} +2 -2
- package/dist/cli/{version-CyavsyGA.js → version-B2Dr6VmJ.js} +1 -1
- package/dist/client/index.d.ts +5 -5
- package/dist/client/index.js +1 -1
- package/dist/client/native/index.d.ts +5 -5
- package/dist/client/native/index.js +1 -1
- package/dist/{client-BAEbEA7t.js → client-C_mlji5R.js} +6 -5
- package/dist/{composite-BZYXlVBN.d.ts → composite-CfYyU3vs.d.ts} +4 -3
- package/dist/config/index.d.ts +1 -1
- package/dist/{context-TGX2eDS5.d.ts → context-8kb8m5uO.d.ts} +1 -1
- package/dist/{controller-DyPPMFSw.d.ts → controller-BW-5Opig.d.ts} +1 -1
- package/dist/{conversion-O-kyhXcC.d.ts → conversion-3iv2r7YC.d.ts} +1 -1
- package/dist/create/index.d.ts +2 -2
- package/dist/create/index.js +1 -1
- package/dist/{define-DFBnQyYg.d.ts → define-C5AcEkEJ.d.ts} +1 -1
- package/dist/{define-block-DvvcM54N.d.ts → define-block-C1RHXz7L.d.ts} +2 -2
- package/dist/edge/index.d.ts +5 -5
- package/dist/{entitlements-BnhDBxLW.d.ts → entitlements-sO977DO-.d.ts} +1 -1
- package/dist/{executor-CVIn6JHa.d.ts → executor-BcNWcD-4.d.ts} +2 -2
- package/dist/expo/index.d.ts +2 -2
- package/dist/{field-errors-DYtg1mwv.d.ts → field-errors-Dt86dCKk.d.ts} +12 -12
- package/dist/{framework-h5lP_5yj.d.ts → framework-BGdZVyPL.d.ts} +3 -3
- package/dist/hono/index.d.ts +4 -4
- package/dist/{index-BAHGLvGD.d.ts → index-CENWq3zb.d.ts} +1 -1
- package/dist/{index-Do2ChN_y.d.ts → index-CQhPHHDF.d.ts} +20 -2
- package/dist/{index-DN9mfmhA.d.ts → index-CTu-3fJB.d.ts} +51 -3
- package/dist/{index-BfK6olKm.d.ts → index-Cc4mIQS8.d.ts} +2 -2
- package/dist/{index-BfkltrGJ.d.ts → index-CcAmFNVi.d.ts} +2 -2
- package/dist/{index-Ab4UeEn_.d.ts → index-Craf712U.d.ts} +44 -12
- package/dist/{index-B4gcStOz.d.ts → index-DZKCc2WM.d.ts} +3 -3
- package/dist/index.d.ts +2 -2
- package/dist/list/index.d.ts +1 -1
- package/dist/{list-query-BDVutLFr.d.ts → list-query-DYhgRTd5.d.ts} +1 -1
- package/dist/mapper/bin.js +5 -5
- package/dist/mcp/index.d.ts +3 -3
- package/dist/mcp/sdk/index.d.ts +2 -2
- package/dist/next/client/index.d.ts +81 -1
- package/dist/next/client/index.js +178 -2
- package/dist/next/index.d.ts +15 -14
- package/dist/orpc/index.d.ts +4 -4
- package/dist/otel/index.js +4 -4
- package/dist/{ports-DOhtuw3c.js → ports-CaVRXjxq.js} +1 -1
- package/dist/{ports-CpdiQv1D.d.ts → ports-mObLgH1z.d.ts} +1 -1
- package/dist/powersync/index.d.ts +2 -2
- package/dist/preset/index.d.ts +3 -3
- package/dist/{push-token-B3m3pWAv.d.ts → push-token-BSSvsWXZ.d.ts} +1 -1
- package/dist/query/index.d.ts +1 -1
- package/dist/{rate-limit-o44SYkVY.js → rate-limit-Dt9vAY4E.js} +53 -0
- package/dist/react/index.d.ts +6 -6
- package/dist/react/index.js +3 -3
- package/dist/react/native/index.d.ts +1 -1
- package/dist/react/native/index.js +1 -1
- package/dist/react/server.d.ts +12 -7
- package/dist/react/server.js +8 -3
- package/dist/react/session.d.ts +5 -0
- package/dist/react/session.js +9 -1
- package/dist/{react-BuDYI62C.js → react-CZUZYn9E.js} +41 -4
- package/dist/react-router/index.d.ts +3 -3
- package/dist/realtime/index.d.ts +5 -5
- package/dist/realtime/index.js +2 -1
- package/dist/{record-form-DB_5Ue_B.d.ts → record-form-D9ILuVtA.d.ts} +1 -1
- package/dist/records/index.d.ts +7 -7
- package/dist/relay-gKvKJ3xf.js +208 -0
- package/dist/{resource-execute-CzHuDsil.d.ts → resource-execute-Cpnob1Vj.d.ts} +1 -1
- package/dist/{resource-types-DnKiH4G2.d.ts → resource-types-pMeLs68X.d.ts} +1 -1
- package/dist/{resources-B9cQxhjw.d.ts → resources-7iq2-5_A.d.ts} +1 -1
- package/dist/server/index.d.ts +147 -9
- package/dist/server/index.js +396 -1
- package/dist/{server-types-7QPzW2bF.d.ts → server-types-CK8mUIUT.d.ts} +5 -354
- package/dist/{session-CfBCJGgc.d.ts → session-DWmFv3vB.d.ts} +2 -1
- package/dist/session-status-qQLm7jzh.d.ts +82 -0
- package/dist/{sign-in-BsIaNx2C.js → sign-in-CmPK1AgM.js} +20 -10
- package/dist/solid/index.d.ts +7 -7
- package/dist/solid/index.js +1 -1
- package/dist/solid-start/index.d.ts +3 -3
- package/dist/spec/index.d.ts +1 -1
- package/dist/sql/index.d.ts +3 -3
- package/dist/sql/index.js +1 -1
- package/dist/{sql-OLVW4t08.js → sql-Dl3Alk43.js} +127 -0
- package/dist/sqlite/index.d.ts +1 -1
- package/dist/ssr/index.d.ts +1 -1
- package/dist/storage/index.d.ts +3 -3
- package/dist/storage/index.js +54 -1
- package/dist/support-B4ZBVxt3.d.ts +357 -0
- package/dist/svelte/index.d.ts +7 -7
- package/dist/svelte/index.js +1 -1
- package/dist/sveltekit/index.d.ts +4 -4
- package/dist/{tags-BjHflcHF.d.ts → tags-qvVk79pp.d.ts} +1 -1
- package/dist/tanstack-db/index.d.ts +1 -1
- package/dist/tanstack-start/index.d.ts +3 -3
- package/dist/{tenant-DzFsg0Pc.d.ts → tenant-DOKIJI62.d.ts} +1 -1
- package/dist/testing/index.d.ts +8 -7
- package/dist/{timeline-WrFMgd3U.d.ts → timeline-CvTuXYvn.d.ts} +3 -3
- package/dist/{topic-DNFEFGKI.d.ts → topic-CZXHhZye.d.ts} +2 -2
- package/dist/{verify-CMou8dWZ.d.ts → verify-CjvNLY7N.d.ts} +1 -1
- package/dist/vue/index.d.ts +7 -7
- package/dist/vue/index.js +1 -1
- package/dist/{watch-topic-Bo9S2R4P.d.ts → watch-topic-BAxoPKZx.d.ts} +1 -1
- package/dist/yjs/index.d.ts +1 -1
- package/package.json +1 -1
- package/skills/better-supabase-api/SKILL.md +3 -1
- package/skills/better-supabase-auth/SKILL.md +7 -0
- package/dist/cli/add-CUH0rORo.js +0 -1
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
import { b as DbError, f as Result, t as AsyncResult } from "./result-DZeA5KS6.js";
|
|
2
2
|
import { $ as RecordRef } from "./types-DFdg_4yN.js";
|
|
3
3
|
import { Ct as Events, D as BlockEventPattern, T as BlockEvent, bt as EventMap, k as BlockEventsMatching } from "./events-vcqenSYU.js";
|
|
4
|
-
import { pt as QuerySpec } from "./define-
|
|
5
|
-
import {
|
|
4
|
+
import { pt as QuerySpec } from "./define-C5AcEkEJ.js";
|
|
5
|
+
import { A as TtlPreset, C as TransformOptions, E as UrlOptions, T as UploadOptions, l as ImageTransform, tt as TemplateValues, w as UploadBody } from "./bucket-vc-QRrva.js";
|
|
6
6
|
import { m as RejectedChange, o as DataSyncState } from "./data-engine-BWoz9lED.js";
|
|
7
|
-
import { M as BindingName, S as RecordWriteInput, _ as RecordTypeBlocks, b as RecordTypeWriteInput, d as BindingWritesOf, f as Plain, g as RecordType, h as RecordCan, m as PlainBindings, x as RecordTypeWriteOutput } from "./index-
|
|
8
|
-
import { c as RealtimeClient, d as SubscribeOptions, g as TopicHandlers, i as PresenceOptions, m as Topic, p as SubscriptionStatus, r as PresenceMember, s as PresenceSubscription, t as EventSchemas } from "./topic-
|
|
9
|
-
import { t as AuthSnapshot } from "./bind-
|
|
7
|
+
import { M as BindingName, S as RecordWriteInput, _ as RecordTypeBlocks, b as RecordTypeWriteInput, d as BindingWritesOf, f as Plain, g as RecordType, h as RecordCan, m as PlainBindings, x as RecordTypeWriteOutput } from "./index-CcAmFNVi.js";
|
|
8
|
+
import { c as RealtimeClient, d as SubscribeOptions, g as TopicHandlers, i as PresenceOptions, m as Topic, p as SubscriptionStatus, r as PresenceMember, s as PresenceSubscription, t as EventSchemas } from "./topic-CZXHhZye.js";
|
|
9
|
+
import { t as AuthSnapshot } from "./bind-JGCPGUJh.js";
|
|
10
10
|
import { t as AuthSession } from "./view-DyFdMCqg.js";
|
|
11
|
-
import { r as LiveCountSeed } from "./index-
|
|
12
|
-
import { n as Controller } from "./controller-
|
|
13
|
-
import { D as ProfileOf, O as UseActionOptions, S as LiveCountHookOptions, _ as ActionResultOf, a as DataRows, b as ClaimsOf, c as DataWrites, d as BlockMutationState, f as BlockQueryActions, g as ActionInputOf, i as DataRow, l as BlockEventSource, m as BlockQueryState, n as DataId, o as DataSource, p as BlockQueryOptions, r as DataListArgs, s as DataState, u as BlockMutationActions, w as LiveQueryHookOptions, x as ClientLike, y as BroadcastOptions } from "./field-errors-
|
|
14
|
-
import { t as BlockEnv } from "./block-env-
|
|
11
|
+
import { r as LiveCountSeed, v as RelayClientOptions } from "./index-CTu-3fJB.js";
|
|
12
|
+
import { n as Controller } from "./controller-BW-5Opig.js";
|
|
13
|
+
import { D as ProfileOf, O as UseActionOptions, S as LiveCountHookOptions, _ as ActionResultOf, a as DataRows, b as ClaimsOf, c as DataWrites, d as BlockMutationState, f as BlockQueryActions, g as ActionInputOf, i as DataRow, l as BlockEventSource, m as BlockQueryState, n as DataId, o as DataSource, p as BlockQueryOptions, r as DataListArgs, s as DataState, u as BlockMutationActions, w as LiveQueryHookOptions, x as ClientLike, y as BroadcastOptions } from "./field-errors-Dt86dCKk.js";
|
|
14
|
+
import { t as BlockEnv } from "./block-env-y65GF_px.js";
|
|
15
15
|
import { n as BlockDataOf, r as BlockMethodName, t as BlockArgsOf } from "./block-method-CiVa2G-J.js";
|
|
16
|
-
import { s as RecordFormValues, t as RecordForm } from "./record-form-
|
|
16
|
+
import { s as RecordFormValues, t as RecordForm } from "./record-form-D9ILuVtA.js";
|
|
17
17
|
import { SupabaseClient } from "@supabase/supabase-js";
|
|
18
18
|
import { DependencyList, ReactNode, SubmitEvent } from "react";
|
|
19
19
|
import { QueryClient } from "@tanstack/query-core";
|
|
@@ -22,6 +22,11 @@ interface BetterSupabaseProviderProps {
|
|
|
22
22
|
readonly client: ClientLike;
|
|
23
23
|
/** Better-supabase queries are removed when the user signs out or changes. */
|
|
24
24
|
readonly queryClient?: QueryClient;
|
|
25
|
+
/**
|
|
26
|
+
* The Realtime client the hooks join with instead of the client's `supabase`,
|
|
27
|
+
* such as `useRealtimeRelay(url)` in a support session.
|
|
28
|
+
*/
|
|
29
|
+
readonly realtime?: RealtimeClient;
|
|
25
30
|
readonly children?: ReactNode;
|
|
26
31
|
}
|
|
27
32
|
/** Provides the better-supabase client to the hooks. */
|
|
@@ -450,7 +455,7 @@ interface PresenceHookOptions<I> {
|
|
|
450
455
|
*/
|
|
451
456
|
readonly state?: I | null;
|
|
452
457
|
/** A supabase-js client for apps without `<BetterSupabaseProvider>`. */
|
|
453
|
-
readonly client?:
|
|
458
|
+
readonly client?: RealtimeClient;
|
|
454
459
|
}
|
|
455
460
|
interface Presence<I, O> {
|
|
456
461
|
/** Everyone on the topic, this client included, from the last sync. */
|
|
@@ -480,6 +485,33 @@ interface PresenceTopic<P extends string, I, O> {
|
|
|
480
485
|
*/
|
|
481
486
|
declare function usePresence<P extends string, I, O>(topic: PresenceTopic<P, I, O>, values: TemplateValues<P> | null | undefined, options?: PresenceHookOptions<I>): Presence<I, O>;
|
|
482
487
|
//#endregion
|
|
488
|
+
//#region src/react/relay.d.ts
|
|
489
|
+
interface UseRealtimeRelayOptions extends RelayClientOptions {
|
|
490
|
+
/**
|
|
491
|
+
* `support` (the default): the relay only while a support session runs, as
|
|
492
|
+
* `useSupportSession()` reports it from the nearest `<SessionProvider>`.
|
|
493
|
+
* `always`: for apps that keep sessions in httpOnly cookies.
|
|
494
|
+
*/
|
|
495
|
+
readonly when?: "support" | "always";
|
|
496
|
+
}
|
|
497
|
+
/**
|
|
498
|
+
* A `relayRealtimeClient(url)` while it is needed, else `undefined`. Pass it to
|
|
499
|
+
* `<BetterSupabaseProvider realtime={...}>`, and `useBroadcast`, `usePresence`,
|
|
500
|
+
* `useLiveQuery` and `useLiveCount` join through the server's `realtimeRelay`
|
|
501
|
+
* route, as the viewed user in a support session. The client is created once
|
|
502
|
+
* per `url` and options, so pass a stable `fetch` and `EventSource`.
|
|
503
|
+
*
|
|
504
|
+
* ```tsx
|
|
505
|
+
* const realtime = useRealtimeRelay("/api/realtime");
|
|
506
|
+
* return (
|
|
507
|
+
* <BetterSupabaseProvider client={bsb} realtime={realtime}>
|
|
508
|
+
* {children}
|
|
509
|
+
* </BetterSupabaseProvider>
|
|
510
|
+
* );
|
|
511
|
+
* ```
|
|
512
|
+
*/
|
|
513
|
+
declare function useRealtimeRelay(url: string, options?: UseRealtimeRelayOptions): RealtimeClient | undefined;
|
|
514
|
+
//#endregion
|
|
483
515
|
//#region src/react/search.d.ts
|
|
484
516
|
interface DebouncedSearchOptions {
|
|
485
517
|
/** Defaults to 250 ms. */
|
|
@@ -630,4 +662,4 @@ interface UseUploadOptions<R> {
|
|
|
630
662
|
*/
|
|
631
663
|
declare function useUpload<T, R>(bucket: UploadTarget<T, R>, options?: UseUploadOptions<R>): Upload<T, R>;
|
|
632
664
|
//#endregion
|
|
633
|
-
export {
|
|
665
|
+
export { UseActionFormOptions as $, useController as A, RecordListUrl as B, useConflicts as C, defineDataHooks as D, DataView as E, RecordFormState as F, RecordInitial as G, useRecordListState as H, UseRecordFormOptions as I, RecordState as J, RecordProviderKit as K, useRecordForm as L, useBlockEvent as M, useBlockMutation as N, useBlockEnv as O, useBlockQuery as P, ActionHandle as Q, RecordListQueryStates as R, Conflicts as S, DataHooks as T, RecordActionsOf as U, RecordListUrlState as V, RecordContextValue as W, createRecordProvider as X, RecordWriteHandlers as Y, ActionForm as Z, useRealtimeRelay as _, Upload as a, LiveCount as at, PresenceTopic as b, UseImageOptions as c, useBroadcast as ct, useSignedUrl as d, useSupabase as dt, useAction as et, useUpload as f, UseRealtimeRelayOptions as g, useDebouncedSearch as h, StorageImage as i, BetterSupabaseProviderProps as it, useLatest as j, useBlockTenant as k, UseUploadOptions as l, useLiveCount as lt, DebouncedSearchOptions as m, SignedUrl as n, BetterHooks as nt, UploadStatus as o, createHooks as ot, DebouncedSearch as p, RecordProviderProps as q, SignedUrlSource as r, BetterSupabaseProvider as rt, UploadTarget as s, useAuth as st, ImageSource as t, useActionForm as tt, useImage as u, useLiveQuery as ut, Presence as v, useSyncStatus as w, usePresence as x, PresenceHookOptions as y, RecordListState as z };
|
|
@@ -2,9 +2,9 @@ import { t as AsyncResult } from "./result-DZeA5KS6.js";
|
|
|
2
2
|
import { O as AnyFunctions, k as AnyModels } from "./types-DFdg_4yN.js";
|
|
3
3
|
import { l as PublicEnv } from "./index-NRMMhhEi.js";
|
|
4
4
|
import { g as SessionEncoding } from "./resolve-CXX6DHv3.js";
|
|
5
|
-
import { t as BetterSupabase } from "./define-
|
|
6
|
-
import { i as KeyboardPort, l as StoragePort, n as DeepLinkPort, r as FilePickerPort, s as PushTokenPort, t as ClientPorts } from "./ports-
|
|
7
|
-
import { i as BindClientOptions, r as BetterClient } from "./bind-
|
|
5
|
+
import { t as BetterSupabase } from "./define-C5AcEkEJ.js";
|
|
6
|
+
import { i as KeyboardPort, l as StoragePort, n as DeepLinkPort, r as FilePickerPort, s as PushTokenPort, t as ClientPorts } from "./ports-mObLgH1z.js";
|
|
7
|
+
import { i as BindClientOptions, r as BetterClient } from "./bind-JGCPGUJh.js";
|
|
8
8
|
import { n as FunctionContract } from "./function-contract-DxFNOmsm.js";
|
|
9
9
|
import { FunctionInvokeOptions, SupabaseClient, SupabaseClientOptions } from "@supabase/supabase-js";
|
|
10
10
|
//#region src/client/functions.d.ts
|
package/dist/index.d.ts
CHANGED
|
@@ -6,8 +6,8 @@ import { $ as RecordRef, A as BucketMeta, At as NoExtension, B as FunctionMeta,
|
|
|
6
6
|
import { Ct as Events, O as BlockEventType, T as BlockEvent, a as EventHandler, bt as EventMap, c as MutationNotice, d as RpcNotice, i as ErrorEvent, l as QueryEvent, n as AuthOutageEvent, o as EventHub, r as BetterSupabaseEvents, s as EventName, t as AuthEvent, u as RefreshEvent } from "./events-vcqenSYU.js";
|
|
7
7
|
import { i as silentLogger, n as Logger, r as consoleLogger, t as LogFields } from "./logger-DWVYUmwi.js";
|
|
8
8
|
import { a as ProblemFormat, c as fromProblem, d as toProblem, i as ProblemDetails, l as isProblem, n as PROBLEM_CONTENT_TYPE, o as ProblemOptions, r as PROBLEM_TYPE_BASE, s as ProblemResponseOptions, t as BlockProblemOptions, u as problemResponse } from "./problem-DNwN8iGz.js";
|
|
9
|
-
import { $t as MemoryCache, A as OffsetRangeArgs, At as IncludeArg, B as RowFilter, Bt as Payload, C as GetKey, Ct as AggregateRow, Dt as CountArgs, E as ManyWriteArgs, Et as CountArg, Ft as MeasureKey, G as UpsertManyArgs, Gt as SortDirection, H as RpcOptions, Ht as RelationMeasureArg, It as MutableWhere, J as DbStats, Jt as WhereInput, K as WriteArgs, Kt as SortSpec, L as Repository, Lt as NumericMeasureArg, Mt as JsonPathOps, Nt as ListArgs, O as OffsetPage, Ot as FieldFilter, P as PageOf, Pt as MeasureArg, Q as SearchArgs, Qt as CacheTarget, R as RepositoryOf, Rt as OrderByArg, S as FindExt, St as AggregateResult, T as ManyResult, Tt as ColumnOrderByArg, U as UpdateArgs, Ut as RequestArgs, Vt as ReadArgs, W as UpsertArgs, Wt as SelectArg, X as StatsRecorder, Xt as BucketsHelper, Y as EMPTY_STATS, Yt as BucketRegistry, Z as recordStats, Zt as CacheAdapter, _ as CursorPageArgs, _t as isQuerySpec, a as explainPostgrest, at as ReadSetParamTypes, b as DeleteArgs, bt as AggregateOrderBy, c as RpcDefinition, ct as ReadSetResult, d as BlocksHelper, dt as readSetTables, en as cacheTargetOf, et as InferReadSetParams, f as DbBlockSource, ft as InferResult, g as CursorPage, gt as TableSpecs, h as ConflictTarget, ht as Specs, i as PostgrestExecutorOptions, it as ReadSetParamType, jt as IncludeArgs, k as OffsetPageArgs, kt as GetArgs, l as SupabaseOptions, lt as defineReadSet, m as DbOf, mt as ReadMethod, n as defineSupabase, nn as rowKey, nt as ReadSetAuth, o as postgrestExecutor, ot as ReadSetParamValue, p as DbExtras, pt as QuerySpec, q as WriteManyArgs, qt as WhereArg, r as PostgrestClientLike, rn as rpcCacheTargets, rt as ReadSetOptions, s as ConnectOptions, st as ReadSetParams, t as BetterSupabase, tn as memoryCache, tt as ReadSet, ut as isReadSet, v as Db, vt as specTables, wt as ColumnOrderBy, x as DeleteExt, xt as AggregateOrderByArg, y as DbHelpers, yt as AggregateArgs, z as Returned, zt as OrderByInput } from "./define-
|
|
10
|
-
import {
|
|
9
|
+
import { $t as MemoryCache, A as OffsetRangeArgs, At as IncludeArg, B as RowFilter, Bt as Payload, C as GetKey, Ct as AggregateRow, Dt as CountArgs, E as ManyWriteArgs, Et as CountArg, Ft as MeasureKey, G as UpsertManyArgs, Gt as SortDirection, H as RpcOptions, Ht as RelationMeasureArg, It as MutableWhere, J as DbStats, Jt as WhereInput, K as WriteArgs, Kt as SortSpec, L as Repository, Lt as NumericMeasureArg, Mt as JsonPathOps, Nt as ListArgs, O as OffsetPage, Ot as FieldFilter, P as PageOf, Pt as MeasureArg, Q as SearchArgs, Qt as CacheTarget, R as RepositoryOf, Rt as OrderByArg, S as FindExt, St as AggregateResult, T as ManyResult, Tt as ColumnOrderByArg, U as UpdateArgs, Ut as RequestArgs, Vt as ReadArgs, W as UpsertArgs, Wt as SelectArg, X as StatsRecorder, Xt as BucketsHelper, Y as EMPTY_STATS, Yt as BucketRegistry, Z as recordStats, Zt as CacheAdapter, _ as CursorPageArgs, _t as isQuerySpec, a as explainPostgrest, at as ReadSetParamTypes, b as DeleteArgs, bt as AggregateOrderBy, c as RpcDefinition, ct as ReadSetResult, d as BlocksHelper, dt as readSetTables, en as cacheTargetOf, et as InferReadSetParams, f as DbBlockSource, ft as InferResult, g as CursorPage, gt as TableSpecs, h as ConflictTarget, ht as Specs, i as PostgrestExecutorOptions, it as ReadSetParamType, jt as IncludeArgs, k as OffsetPageArgs, kt as GetArgs, l as SupabaseOptions, lt as defineReadSet, m as DbOf, mt as ReadMethod, n as defineSupabase, nn as rowKey, nt as ReadSetAuth, o as postgrestExecutor, ot as ReadSetParamValue, p as DbExtras, pt as QuerySpec, q as WriteManyArgs, qt as WhereArg, r as PostgrestClientLike, rn as rpcCacheTargets, rt as ReadSetOptions, s as ConnectOptions, st as ReadSetParams, t as BetterSupabase, tn as memoryCache, tt as ReadSet, ut as isReadSet, v as Db, vt as specTables, wt as ColumnOrderBy, x as DeleteExt, xt as AggregateOrderByArg, y as DbHelpers, yt as AggregateArgs, z as Returned, zt as OrderByInput } from "./define-C5AcEkEJ.js";
|
|
10
|
+
import { Q as StoragePath } from "./bucket-vc-QRrva.js";
|
|
11
11
|
import { a as PostgrestPlan, n as PlanLimit, o as compilePostgrest, r as PlanOrder, t as PlanFilter } from "./postgrest-z-T0l23T.js";
|
|
12
12
|
import { i as FieldSpec, n as TableSchema, o as TableSchemaSpec, r as tableSchema, t as StandardJSONSchemaV1 } from "./table-schema-BlF6k62Q.js";
|
|
13
13
|
import { n as postgrestCompiler, t as Compiler } from "./compiler-D3UmE7ao.js";
|
package/dist/list/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { _ as FilterRule, a as FilterDateValue, b as encodeFilterQuery, c as FilterFieldLabels, d as FilterLimits, f as FilterNode, g as FilterRelativeDate, h as FilterQuery, i as FilterCombinator, l as FilterFieldType, m as FilterOperatorSpec, n as FILTER_OPERATOR_LABELS, o as FilterField, p as FilterOperatorArity, r as FilterClock, s as FilterFieldInfo, t as FILTER_OPERATORS, u as FilterGroupNode, v as ListFilterConfig, y as decodeFilterQuery } from "../filter-query-BXLs72G9.js";
|
|
2
|
-
import { _ as UNSET, a as ListExtra, c as ListParseOptions, d as ListQuery, f as ListQueryConfig, g as ParserSpec, h as OpenApiParameter, i as ListDefinition, l as ListParseResult, m as ListSearchParams, n as FacetCounts, o as ListPage, p as ListQueryInput, r as FacetInfo, s as ListPagination, t as FacetCountFields, u as ListParsers, v as defineListQuery } from "../list-query-
|
|
2
|
+
import { _ as UNSET, a as ListExtra, c as ListParseOptions, d as ListQuery, f as ListQueryConfig, g as ParserSpec, h as OpenApiParameter, i as ListDefinition, l as ListParseResult, m as ListSearchParams, n as FacetCounts, o as ListPage, p as ListQueryInput, r as FacetInfo, s as ListPagination, t as FacetCountFields, u as ListParsers, v as defineListQuery } from "../list-query-DYhgRTd5.js";
|
|
3
3
|
import { n as FilterRecordField, r as evaluateFilterQuery, t as FilterEvaluation } from "../filter-evaluate-CPxeae5X.js";
|
|
4
4
|
export { FILTER_OPERATORS, FILTER_OPERATOR_LABELS, type FacetCountFields, type FacetCounts, type FacetInfo, type FilterClock, type FilterCombinator, type FilterDateValue, type FilterEvaluation, type FilterField, type FilterFieldInfo, type FilterFieldLabels, type FilterFieldType, type FilterGroupNode, type FilterLimits, type FilterNode, type FilterOperatorArity, type FilterOperatorSpec, type FilterQuery, type FilterRecordField, type FilterRelativeDate, type FilterRule, type ListDefinition, type ListExtra, type ListFilterConfig, type ListPage, type ListPagination, type ListParseOptions, type ListParseResult, type ListParsers, type ListQuery, type ListQueryConfig, type ListQueryInput, type ListSearchParams, type OpenApiParameter, type ParserSpec, UNSET, decodeFilterQuery, defineListQuery, encodeFilterQuery, evaluateFilterQuery };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { D as ValidationIssue, t as AsyncResult } from "./result-DZeA5KS6.js";
|
|
2
2
|
import { O as AnyFunctions, a as CountMode, it as Row, k as AnyModels, ut as TableKey } from "./types-DFdg_4yN.js";
|
|
3
|
-
import { At as IncludeArg, Bt as Payload, Jt as WhereInput, O as OffsetPage, R as RepositoryOf, Rt as OrderByArg, S as FindExt, Wt as SelectArg, _ as CursorPageArgs, g as CursorPage, k as OffsetPageArgs, t as BetterSupabase } from "./define-
|
|
3
|
+
import { At as IncludeArg, Bt as Payload, Jt as WhereInput, O as OffsetPage, R as RepositoryOf, Rt as OrderByArg, S as FindExt, Wt as SelectArg, _ as CursorPageArgs, g as CursorPage, k as OffsetPageArgs, t as BetterSupabase } from "./define-C5AcEkEJ.js";
|
|
4
4
|
import { c as FilterFieldLabels, h as FilterQuery, o as FilterField, r as FilterClock, s as FilterFieldInfo, v as ListFilterConfig } from "./filter-query-BXLs72G9.js";
|
|
5
5
|
import { StandardSchemaV1 } from "@standard-schema/spec";
|
|
6
6
|
//#region src/list/list-query.d.ts
|
package/dist/mapper/bin.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { t as VERSION } from "../cli/version-
|
|
2
|
-
import { a as lastTypesModule, c as writeAtomic, s as typesModuleKey } from "../cli/cache-
|
|
3
|
-
import { t as loadSnapshot } from "../cli/snapshot-
|
|
4
|
-
import { i as renderTypesModule, t as mapperFilePath } from "../cli/render-
|
|
1
|
+
import { t as VERSION } from "../cli/version-B2Dr6VmJ.js";
|
|
2
|
+
import { a as lastTypesModule, c as writeAtomic, s as typesModuleKey } from "../cli/cache-AznIssjI.js";
|
|
3
|
+
import { t as loadSnapshot } from "../cli/snapshot-uTUlEzY2.js";
|
|
4
|
+
import { i as renderTypesModule, t as mapperFilePath } from "../cli/render-5y5a1QZr.js";
|
|
5
5
|
import { i as discoverConfig, s as loadConfig } from "../cli/config-9t5ec_N7.js";
|
|
6
6
|
import { i as parseEnv, n as configEnvironment } from "../cli/env-DMgjB_4y.js";
|
|
7
|
-
import { s as schemaStampPath } from "../cli/content-mapper-
|
|
7
|
+
import { s as schemaStampPath } from "../cli/content-mapper-DCrz6OIv.js";
|
|
8
8
|
import { existsSync, realpathSync } from "node:fs";
|
|
9
9
|
import { basename, dirname, join, resolve } from "node:path";
|
|
10
10
|
import { createHash } from "node:crypto";
|
package/dist/mcp/index.d.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { O as AnyFunctions, k as AnyModels, ut as TableKey } from "../types-DFdg_4yN.js";
|
|
2
2
|
import { t as OperationTable } from "../operations-CSc_IsHO.js";
|
|
3
3
|
import { l as PermissionRef, t as AnyAuthorizer } from "../authorizer-B6X09otb.js";
|
|
4
|
-
import { t as BetterSupabase } from "../define-
|
|
5
|
-
import { a as ServerContext, c as ServerOptions, n as BetterServer } from "../server-types-
|
|
4
|
+
import { t as BetterSupabase } from "../define-C5AcEkEJ.js";
|
|
5
|
+
import { a as ServerContext, c as ServerOptions, n as BetterServer } from "../server-types-CK8mUIUT.js";
|
|
6
6
|
import { r as GuardOptions } from "../respond-Dn1_YhC1.js";
|
|
7
7
|
import { D as ResourceOperation } from "../model-hwpvole9.js";
|
|
8
|
-
import { l as ResourceRouteOptions } from "../resource-types-
|
|
8
|
+
import { l as ResourceRouteOptions } from "../resource-types-pMeLs68X.js";
|
|
9
9
|
import { StandardSchemaV1 } from "@standard-schema/spec";
|
|
10
10
|
//#region src/mcp/dialect.d.ts
|
|
11
11
|
/**
|
package/dist/mcp/sdk/index.d.ts
CHANGED
|
@@ -2,8 +2,8 @@ import { O as AnyFunctions, k as AnyModels } from "../../types-DFdg_4yN.js";
|
|
|
2
2
|
import { r as AuthState } from "../../resolve-CXX6DHv3.js";
|
|
3
3
|
import { i as CredentialRef, r as CredentialProvider } from "../../provider-CqwEOLCA.js";
|
|
4
4
|
import { i as SupabaseMcpScope, n as SupabaseMcpModule, r as SupabaseMcpPlatformModule, t as SupabaseMcpFeature } from "../../supabase-mcp-Z4vtsuoO.js";
|
|
5
|
-
import { t as BetterSupabase } from "../../define-
|
|
6
|
-
import { a as ServerContext$1, c as ServerOptions, n as BetterServer } from "../../server-types-
|
|
5
|
+
import { t as BetterSupabase } from "../../define-C5AcEkEJ.js";
|
|
6
|
+
import { a as ServerContext$1, c as ServerOptions, n as BetterServer } from "../../server-types-CK8mUIUT.js";
|
|
7
7
|
import { r as GuardOptions, t as AllowedCaller } from "../../respond-Dn1_YhC1.js";
|
|
8
8
|
import { AuthInfo, CallToolResult, Icon, InputRequiredResult, OAuthTokenVerifier, RegisteredTool, ScopeChallengeHandler, ServerContext, StandardSchemaWithJSON, ToolAnnotations } from "@modelcontextprotocol/server";
|
|
9
9
|
//#region src/mcp/sdk/sdk.d.ts
|
|
@@ -1,3 +1,54 @@
|
|
|
1
|
+
import { i as SessionWatchStatus, t as SessionStatusBody } from "../../session-status-qQLm7jzh.js";
|
|
2
|
+
//#region src/next/client/session-watch.d.ts
|
|
3
|
+
/**
|
|
4
|
+
* Why the session changed: Auth ended it or banned the user, the user signed
|
|
5
|
+
* out, or the claims or support target behind the session changed.
|
|
6
|
+
*/
|
|
7
|
+
type SessionChangeReason = "ended" | "banned" | "signed_out" | "claims_changed";
|
|
8
|
+
interface SessionWatchEvent {
|
|
9
|
+
readonly reason: SessionChangeReason;
|
|
10
|
+
/** The route's answer; `null` when another tab reported the change. */
|
|
11
|
+
readonly status: SessionStatusBody | null;
|
|
12
|
+
/** `check`: this tab saw it. `tab`: another tab of the app did. */
|
|
13
|
+
readonly source: "check" | "tab";
|
|
14
|
+
}
|
|
15
|
+
interface SessionWatchOptions {
|
|
16
|
+
/** Where `sessionStatusRoute` is mounted. Defaults to `/api/session-status`. */
|
|
17
|
+
readonly url?: string;
|
|
18
|
+
/**
|
|
19
|
+
* Milliseconds between checks while the page is visible. Defaults to 60000; 0
|
|
20
|
+
* checks on focus and visibility only.
|
|
21
|
+
*/
|
|
22
|
+
readonly intervalMs?: number;
|
|
23
|
+
/**
|
|
24
|
+
* The fingerprint the page rendered with, such as from the session status of
|
|
25
|
+
* the server render. Without it the first check sets it.
|
|
26
|
+
*/
|
|
27
|
+
readonly fingerprint?: string | null;
|
|
28
|
+
/**
|
|
29
|
+
* The `BroadcastChannel` that tells the app's other tabs, or `false` for
|
|
30
|
+
* none. Defaults to `better-supabase:session`.
|
|
31
|
+
*/
|
|
32
|
+
readonly channel?: string | false;
|
|
33
|
+
readonly fetch?: typeof fetch;
|
|
34
|
+
/** Called with every answer of the route, changed or not. */
|
|
35
|
+
readonly onStatus?: (status: SessionStatusBody) => void;
|
|
36
|
+
}
|
|
37
|
+
interface SessionWatcher {
|
|
38
|
+
/** Checks now; a check already running is reused. */
|
|
39
|
+
check(): Promise<SessionStatusBody | undefined>;
|
|
40
|
+
stop(): void;
|
|
41
|
+
}
|
|
42
|
+
/**
|
|
43
|
+
* Watches the session through `sessionStatusRoute`: checks when the window gets
|
|
44
|
+
* focus or becomes visible and on an interval while visible, and calls
|
|
45
|
+
* `onChange` when the session ended, the user was banned or signed out, or the
|
|
46
|
+
* claims fingerprint changed. Each change is posted to the app's other tabs,
|
|
47
|
+
* which call their own `onChange` with `source: "tab"`. Failed checks are
|
|
48
|
+
* ignored and retried on the next trigger.
|
|
49
|
+
*/
|
|
50
|
+
export declare function watchSession(onChange: (event: SessionWatchEvent) => void, options?: SessionWatchOptions): SessionWatcher;
|
|
51
|
+
//#endregion
|
|
1
52
|
//#region src/next/client/index.d.ts
|
|
2
53
|
/** The `push` and `refresh` `useSessionChange` needs; next-intl's router fits. */
|
|
3
54
|
export interface SessionChangeRouter {
|
|
@@ -33,4 +84,33 @@ export interface SessionChangeOptions {
|
|
|
33
84
|
* ```
|
|
34
85
|
*/
|
|
35
86
|
export declare function useSessionChange(changed: () => Promise<void>, router?: SessionChangeRouter, options?: SessionChangeOptions): (to?: string) => Promise<void>;
|
|
36
|
-
|
|
87
|
+
export interface UseSessionWatchOptions extends SessionWatchOptions {
|
|
88
|
+
/**
|
|
89
|
+
* Replaces the default reaction. By default an ended, banned or signed-out
|
|
90
|
+
* session loads `redirect` (or the current page, which the proxy then sends
|
|
91
|
+
* to sign-in) as a full document load, and a claims change refreshes the
|
|
92
|
+
* router so Server Components render with the new claims.
|
|
93
|
+
*/
|
|
94
|
+
readonly onChange?: (event: SessionWatchEvent) => void;
|
|
95
|
+
/** Where an ended session goes. Defaults to reloading the current page. */
|
|
96
|
+
readonly redirect?: string;
|
|
97
|
+
/** The router a claims change refreshes. Defaults to Next.js's. */
|
|
98
|
+
readonly router?: Pick<SessionChangeRouter, "refresh">;
|
|
99
|
+
/** Pauses the watch, e.g. on pages without a session. */
|
|
100
|
+
readonly enabled?: boolean;
|
|
101
|
+
}
|
|
102
|
+
/**
|
|
103
|
+
* Watches the session of an app that keeps it in httpOnly cookies, without a
|
|
104
|
+
* browser Supabase client: it asks `sessionStatusRoute` on focus, when the tab
|
|
105
|
+
* becomes visible and on an interval, and reacts when Auth ended the session,
|
|
106
|
+
* banned the user, the user signed out, or the claims or support target
|
|
107
|
+
* changed. Other tabs of the app hear each change through a `BroadcastChannel`.
|
|
108
|
+
* Returns the last answer.
|
|
109
|
+
*
|
|
110
|
+
* ```tsx
|
|
111
|
+
* useSessionWatch({ url: "/api/session-status", redirect: "/sign-in" });
|
|
112
|
+
* ```
|
|
113
|
+
*/
|
|
114
|
+
export declare function useSessionWatch(options?: UseSessionWatchOptions): SessionStatusBody | undefined;
|
|
115
|
+
//#endregion
|
|
116
|
+
export type { SessionChangeReason, SessionStatusBody, SessionWatchEvent, SessionWatchOptions, SessionWatchStatus, SessionWatcher };
|
|
@@ -1,6 +1,124 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { useCallback } from "react";
|
|
2
|
+
import { useCallback, useEffect, useRef, useState } from "react";
|
|
3
3
|
import { useRouter } from "next/navigation.js";
|
|
4
|
+
//#region src/next/client/session-watch.ts
|
|
5
|
+
const REASONS = /* @__PURE__ */ new Set([
|
|
6
|
+
"ended",
|
|
7
|
+
"banned",
|
|
8
|
+
"signed_out",
|
|
9
|
+
"claims_changed"
|
|
10
|
+
]);
|
|
11
|
+
function isTabMessage(value) {
|
|
12
|
+
if (typeof value !== "object" || value === null) return false;
|
|
13
|
+
const message = value;
|
|
14
|
+
return message.type === "better-supabase:session" && typeof message.reason === "string" && REASONS.has(message.reason) && (message.fingerprint === null || typeof message.fingerprint === "string");
|
|
15
|
+
}
|
|
16
|
+
function isBody(value) {
|
|
17
|
+
if (typeof value !== "object" || value === null) return false;
|
|
18
|
+
const body = value;
|
|
19
|
+
return typeof body.status === "string" && (body.fingerprint === null || typeof body.fingerprint === "string");
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* Watches the session through `sessionStatusRoute`: checks when the window gets
|
|
23
|
+
* focus or becomes visible and on an interval while visible, and calls
|
|
24
|
+
* `onChange` when the session ended, the user was banned or signed out, or the
|
|
25
|
+
* claims fingerprint changed. Each change is posted to the app's other tabs,
|
|
26
|
+
* which call their own `onChange` with `source: "tab"`. Failed checks are
|
|
27
|
+
* ignored and retried on the next trigger.
|
|
28
|
+
*/
|
|
29
|
+
function watchSession(onChange, options = {}) {
|
|
30
|
+
const url = options.url ?? "/api/session-status";
|
|
31
|
+
const intervalMs = options.intervalMs ?? 6e4;
|
|
32
|
+
const doFetch = options.fetch ?? globalThis.fetch.bind(globalThis);
|
|
33
|
+
const channelName = options.channel ?? "better-supabase:session";
|
|
34
|
+
let baseline = options.fingerprint;
|
|
35
|
+
let running;
|
|
36
|
+
let stopped = false;
|
|
37
|
+
const channel = channelName !== false && typeof BroadcastChannel === "function" ? new BroadcastChannel(channelName) : void 0;
|
|
38
|
+
const visible = () => !("document" in globalThis) || globalThis.document.visibilityState !== "hidden";
|
|
39
|
+
const report = (reason, status) => {
|
|
40
|
+
const message = {
|
|
41
|
+
type: "better-supabase:session",
|
|
42
|
+
reason,
|
|
43
|
+
fingerprint: status.fingerprint
|
|
44
|
+
};
|
|
45
|
+
channel?.postMessage(message);
|
|
46
|
+
onChange({
|
|
47
|
+
reason,
|
|
48
|
+
status,
|
|
49
|
+
source: "check"
|
|
50
|
+
});
|
|
51
|
+
};
|
|
52
|
+
const settle = (status) => {
|
|
53
|
+
if (status.status === "expired") return;
|
|
54
|
+
const next = status.status === "active" ? status.fingerprint : null;
|
|
55
|
+
const previous = baseline;
|
|
56
|
+
baseline = next;
|
|
57
|
+
if (previous === void 0 || previous === next) return;
|
|
58
|
+
if (next === null) {
|
|
59
|
+
report(status.status === "ended" || status.status === "banned" ? status.status : "signed_out", status);
|
|
60
|
+
return;
|
|
61
|
+
}
|
|
62
|
+
report("claims_changed", status);
|
|
63
|
+
};
|
|
64
|
+
const run = async () => {
|
|
65
|
+
try {
|
|
66
|
+
const response = await doFetch(url, {
|
|
67
|
+
method: "GET",
|
|
68
|
+
credentials: "same-origin",
|
|
69
|
+
cache: "no-store",
|
|
70
|
+
headers: { accept: "application/json" }
|
|
71
|
+
});
|
|
72
|
+
if (!response.ok) {
|
|
73
|
+
await response.body?.cancel();
|
|
74
|
+
return;
|
|
75
|
+
}
|
|
76
|
+
const body = await response.json();
|
|
77
|
+
if (!isBody(body) || stopped) return;
|
|
78
|
+
options.onStatus?.(body);
|
|
79
|
+
settle(body);
|
|
80
|
+
return body;
|
|
81
|
+
} catch {
|
|
82
|
+
return;
|
|
83
|
+
}
|
|
84
|
+
};
|
|
85
|
+
const check = () => {
|
|
86
|
+
running ??= run().finally(() => {
|
|
87
|
+
running = void 0;
|
|
88
|
+
});
|
|
89
|
+
return running;
|
|
90
|
+
};
|
|
91
|
+
const onVisible = () => {
|
|
92
|
+
if (visible()) check();
|
|
93
|
+
};
|
|
94
|
+
const onMessage = (event) => {
|
|
95
|
+
if (!isTabMessage(event.data)) return;
|
|
96
|
+
baseline = event.data.fingerprint;
|
|
97
|
+
onChange({
|
|
98
|
+
reason: event.data.reason,
|
|
99
|
+
status: null,
|
|
100
|
+
source: "tab"
|
|
101
|
+
});
|
|
102
|
+
};
|
|
103
|
+
channel?.addEventListener("message", onMessage);
|
|
104
|
+
if (typeof window !== "undefined") window.addEventListener("focus", onVisible);
|
|
105
|
+
if (typeof document !== "undefined") document.addEventListener("visibilitychange", onVisible);
|
|
106
|
+
const timer = intervalMs > 0 ? setInterval(onVisible, intervalMs) : void 0;
|
|
107
|
+
check();
|
|
108
|
+
return {
|
|
109
|
+
check,
|
|
110
|
+
stop: () => {
|
|
111
|
+
if (stopped) return;
|
|
112
|
+
stopped = true;
|
|
113
|
+
if (timer !== void 0) clearInterval(timer);
|
|
114
|
+
if (typeof window !== "undefined") window.removeEventListener("focus", onVisible);
|
|
115
|
+
if (typeof document !== "undefined") document.removeEventListener("visibilitychange", onVisible);
|
|
116
|
+
channel?.removeEventListener("message", onMessage);
|
|
117
|
+
channel?.close();
|
|
118
|
+
}
|
|
119
|
+
};
|
|
120
|
+
}
|
|
121
|
+
//#endregion
|
|
4
122
|
//#region src/next/client/index.ts
|
|
5
123
|
/**
|
|
6
124
|
* After a session change, expire the server cache (`changed`), navigate, then
|
|
@@ -33,5 +151,63 @@ function useSessionChange(changed, router, options = {}) {
|
|
|
33
151
|
refresher
|
|
34
152
|
]);
|
|
35
153
|
}
|
|
154
|
+
/**
|
|
155
|
+
* Watches the session of an app that keeps it in httpOnly cookies, without a
|
|
156
|
+
* browser Supabase client: it asks `sessionStatusRoute` on focus, when the tab
|
|
157
|
+
* becomes visible and on an interval, and reacts when Auth ended the session,
|
|
158
|
+
* banned the user, the user signed out, or the claims or support target
|
|
159
|
+
* changed. Other tabs of the app hear each change through a `BroadcastChannel`.
|
|
160
|
+
* Returns the last answer.
|
|
161
|
+
*
|
|
162
|
+
* ```tsx
|
|
163
|
+
* useSessionWatch({ url: "/api/session-status", redirect: "/sign-in" });
|
|
164
|
+
* ```
|
|
165
|
+
*/
|
|
166
|
+
function useSessionWatch(options = {}) {
|
|
167
|
+
const nextRouter = useRouter();
|
|
168
|
+
const [last, setLast] = useState(void 0);
|
|
169
|
+
const latest = useRef({
|
|
170
|
+
options,
|
|
171
|
+
router: options.router ?? nextRouter
|
|
172
|
+
});
|
|
173
|
+
latest.current = {
|
|
174
|
+
options,
|
|
175
|
+
router: options.router ?? nextRouter
|
|
176
|
+
};
|
|
177
|
+
const { url, intervalMs, channel, fingerprint } = options;
|
|
178
|
+
const enabled = options.enabled ?? true;
|
|
179
|
+
useEffect(() => {
|
|
180
|
+
if (!enabled) return;
|
|
181
|
+
const watcher = watchSession((event) => {
|
|
182
|
+
const current = latest.current;
|
|
183
|
+
if (current.options.onChange) {
|
|
184
|
+
current.options.onChange(event);
|
|
185
|
+
return;
|
|
186
|
+
}
|
|
187
|
+
if (event.reason === "claims_changed") {
|
|
188
|
+
current.router.refresh();
|
|
189
|
+
return;
|
|
190
|
+
}
|
|
191
|
+
window.location.assign(current.options.redirect ?? window.location.href);
|
|
192
|
+
}, {
|
|
193
|
+
...url === void 0 ? {} : { url },
|
|
194
|
+
...intervalMs === void 0 ? {} : { intervalMs },
|
|
195
|
+
...channel === void 0 ? {} : { channel },
|
|
196
|
+
...fingerprint === void 0 ? {} : { fingerprint },
|
|
197
|
+
...latest.current.options.fetch ? { fetch: latest.current.options.fetch } : {},
|
|
198
|
+
onStatus: setLast
|
|
199
|
+
});
|
|
200
|
+
return () => {
|
|
201
|
+
watcher.stop();
|
|
202
|
+
};
|
|
203
|
+
}, [
|
|
204
|
+
enabled,
|
|
205
|
+
url,
|
|
206
|
+
intervalMs,
|
|
207
|
+
channel,
|
|
208
|
+
fingerprint
|
|
209
|
+
]);
|
|
210
|
+
return last;
|
|
211
|
+
}
|
|
36
212
|
//#endregion
|
|
37
|
-
export { useSessionChange };
|
|
213
|
+
export { useSessionChange, useSessionWatch, watchSession };
|
package/dist/next/index.d.ts
CHANGED
|
@@ -2,26 +2,27 @@ import { b as DbError, f as Result } from "../result-DZeA5KS6.js";
|
|
|
2
2
|
import { $ as RecordRef, O as AnyFunctions, k as AnyModels } from "../types-DFdg_4yN.js";
|
|
3
3
|
import { r as AuthState } from "../resolve-CXX6DHv3.js";
|
|
4
4
|
import { l as PermissionRef, t as AnyAuthorizer } from "../authorizer-B6X09otb.js";
|
|
5
|
-
import { J as DbStats, Zt as CacheAdapter, pt as QuerySpec, t as BetterSupabase, tt as ReadSet } from "../define-
|
|
6
|
-
import {
|
|
5
|
+
import { J as DbStats, Zt as CacheAdapter, pt as QuerySpec, t as BetterSupabase, tt as ReadSet } from "../define-C5AcEkEJ.js";
|
|
6
|
+
import { A as isSessionSnapshot, M as sessionCacheKey, O as SessionSnapshot, a as ServerContext, c as ServerOptions, j as issuedAtOf, k as authzVersionOf, l as SharedServer, n as BetterServer, r as ContextOptions } from "../server-types-CK8mUIUT.js";
|
|
7
7
|
import { n as Impersonator } from "../impersonation-YTa9dZUv.js";
|
|
8
8
|
import { n as AmrEntry, t as Aal } from "../mfa-oIOYTpvc.js";
|
|
9
|
-
import { S as BlockClientSource, on as RecordBindingOptions } from "../define-block-
|
|
10
|
-
import { M as BindingName, N as BindingOf, S as RecordWriteInput, _ as RecordTypeBlocks, b as RecordTypeWriteInput, d as BindingWritesOf, f as Plain, g as RecordType, h as RecordCan, m as PlainBindings, x as RecordTypeWriteOutput } from "../index-
|
|
11
|
-
import { t as tenantOf } from "../tenant-
|
|
9
|
+
import { S as BlockClientSource, on as RecordBindingOptions } from "../define-block-C1RHXz7L.js";
|
|
10
|
+
import { M as BindingName, N as BindingOf, S as RecordWriteInput, _ as RecordTypeBlocks, b as RecordTypeWriteInput, d as BindingWritesOf, f as Plain, g as RecordType, h as RecordCan, m as PlainBindings, x as RecordTypeWriteOutput } from "../index-CcAmFNVi.js";
|
|
11
|
+
import { t as tenantOf } from "../tenant-DOKIJI62.js";
|
|
12
12
|
import { n as toSession, t as AuthSession } from "../view-DyFdMCqg.js";
|
|
13
|
-
import { t as
|
|
13
|
+
import { a as SupportPolicy, c as supportSessions, i as SupportOptions, o as SupportSessions, s as SupportStartRequest, t as ActiveSupport } from "../support-B4ZBVxt3.js";
|
|
14
|
+
import { t as AuthOutageHook } from "../session-DWmFv3vB.js";
|
|
14
15
|
import { n as AuthKind, r as GuardOptions } from "../respond-Dn1_YhC1.js";
|
|
15
16
|
import { a as AuthorizedContext, c as ResourceLoaderContext, i as AuthorizeOptions, l as Unwrapped, n as ActionParsed, r as ActionResult, t as ActionInput } from "../kit-DOwKpSkA.js";
|
|
16
|
-
import { c as ListParseOptions, m as ListSearchParams } from "../list-query-
|
|
17
|
-
import { r as LiveCountSeed, t as CountRunner } from "../index-
|
|
18
|
-
import { r as MembershipClaim } from "../entitlements-
|
|
19
|
-
import { i as ResourceContext, l as ResourceRouteOptions, o as ResourceHooks, r as ResourceAction, t as ActionArgs } from "../resource-types-
|
|
20
|
-
import { t as ResourceMap } from "../resources-
|
|
21
|
-
import { t as defineAction } from "../resource-execute-
|
|
17
|
+
import { c as ListParseOptions, m as ListSearchParams } from "../list-query-DYhgRTd5.js";
|
|
18
|
+
import { r as LiveCountSeed, t as CountRunner } from "../index-CTu-3fJB.js";
|
|
19
|
+
import { r as MembershipClaim } from "../entitlements-sO977DO-.js";
|
|
20
|
+
import { i as ResourceContext, l as ResourceRouteOptions, o as ResourceHooks, r as ResourceAction, t as ActionArgs } from "../resource-types-pMeLs68X.js";
|
|
21
|
+
import { t as ResourceMap } from "../resources-7iq2-5_A.js";
|
|
22
|
+
import { t as defineAction } from "../resource-execute-Cpnob1Vj.js";
|
|
22
23
|
import { n as BlockDataOf, r as BlockMethodName, t as BlockArgsOf } from "../block-method-CiVa2G-J.js";
|
|
23
|
-
import { i as tagFor, t as TagOptions } from "../tags-
|
|
24
|
-
import { c as RecordListCells, n as Timeline, o as RecordList, u as RecordListPage } from "../timeline-
|
|
24
|
+
import { i as tagFor, t as TagOptions } from "../tags-qvVk79pp.js";
|
|
25
|
+
import { c as RecordListCells, n as Timeline, o as RecordList, u as RecordListPage } from "../timeline-CvTuXYvn.js";
|
|
25
26
|
import { r as safeRedirectPath } from "../sign-in-BAjR49fq.js";
|
|
26
27
|
import { n as supportOf, t as SupportView } from "../support-view-BYOgwXsJ.js";
|
|
27
28
|
import { NextRequest } from "next/server.js";
|
package/dist/orpc/index.d.ts
CHANGED
|
@@ -2,14 +2,14 @@ import { b as DbError, f as Result } from "../result-DZeA5KS6.js";
|
|
|
2
2
|
import { O as AnyFunctions, k as AnyModels } from "../types-DFdg_4yN.js";
|
|
3
3
|
import { r as AuthState } from "../resolve-CXX6DHv3.js";
|
|
4
4
|
import { i as ProblemDetails } from "../problem-DNwN8iGz.js";
|
|
5
|
-
import { t as BetterSupabase } from "../define-
|
|
6
|
-
import { a as ServerContext, c as ServerOptions, n as BetterServer } from "../server-types-
|
|
5
|
+
import { t as BetterSupabase } from "../define-C5AcEkEJ.js";
|
|
6
|
+
import { a as ServerContext, c as ServerOptions, n as BetterServer } from "../server-types-CK8mUIUT.js";
|
|
7
7
|
import { i as MiddlewareOptions, r as GuardOptions } from "../respond-Dn1_YhC1.js";
|
|
8
8
|
import { c as ResourceLoaderContext, i as AuthorizeOptions } from "../kit-DOwKpSkA.js";
|
|
9
9
|
import { t as Validated } from "../shared-CRRfQAKG.js";
|
|
10
|
-
import { a as ResourceHandler } from "../resource-types-
|
|
10
|
+
import { a as ResourceHandler } from "../resource-types-pMeLs68X.js";
|
|
11
11
|
import { i as RouteRateLimitRule, n as RateLimitVerdict, r as RateLimiter, t as RateLimitRouteOptions } from "../rate-limit-Bztf32cl.js";
|
|
12
|
-
import { t as Api } from "../api-
|
|
12
|
+
import { t as Api } from "../api-hHwieEfz.js";
|
|
13
13
|
import { AnyEntry, Contributions } from "@supabase/middleware";
|
|
14
14
|
import { AnySchema, BuilderWithMiddlewares, DecoratedMiddleware, DecoratedProcedure, MetaPlugin, ORPCError, Schema } from "@orpc/server";
|
|
15
15
|
//#region src/orpc/router.d.ts
|
package/dist/otel/index.js
CHANGED
|
@@ -40,9 +40,9 @@ function systemOf(executor) {
|
|
|
40
40
|
* ```
|
|
41
41
|
*/
|
|
42
42
|
function otel(options = {}) {
|
|
43
|
-
const tracer = options.tracer ?? trace.getTracer("better-supabase", "0.
|
|
43
|
+
const tracer = options.tracer ?? trace.getTracer("better-supabase", "0.16.0");
|
|
44
44
|
let histogram;
|
|
45
|
-
if (options.metrics !== false) histogram = (options.meter ?? metrics.getMeter("better-supabase", "0.
|
|
45
|
+
if (options.metrics !== false) histogram = (options.meter ?? metrics.getMeter("better-supabase", "0.16.0")).createHistogram("db.client.operation.duration", {
|
|
46
46
|
unit: "s",
|
|
47
47
|
description: "Duration of database client operations.",
|
|
48
48
|
advice: { explicitBucketBoundaries: [
|
|
@@ -219,7 +219,7 @@ function otel(options = {}) {
|
|
|
219
219
|
* `betterSupabase.events`. Returns a function that stops listening.
|
|
220
220
|
*/
|
|
221
221
|
function traceAuth(betterSupabase, options = {}) {
|
|
222
|
-
const tracer = options.tracer ?? trace.getTracer("better-supabase", "0.
|
|
222
|
+
const tracer = options.tracer ?? trace.getTracer("better-supabase", "0.16.0");
|
|
223
223
|
const offAuth = betterSupabase.events.on("auth", (event) => {
|
|
224
224
|
const span = tracer.startSpan("auth.resolve", {
|
|
225
225
|
kind: SpanKind.INTERNAL,
|
|
@@ -257,7 +257,7 @@ function traceAuth(betterSupabase, options = {}) {
|
|
|
257
257
|
* an error status. Returns a function that stops listening.
|
|
258
258
|
*/
|
|
259
259
|
function traceBlockEvents(betterSupabase, options = {}) {
|
|
260
|
-
const tracer = options.tracer ?? trace.getTracer("better-supabase", "0.
|
|
260
|
+
const tracer = options.tracer ?? trace.getTracer("better-supabase", "0.16.0");
|
|
261
261
|
return betterSupabase.events.on("block", (event) => {
|
|
262
262
|
const attributes = {
|
|
263
263
|
...options.attributes,
|
|
@@ -2,7 +2,7 @@ import { a as ok, r as err, t as AsyncResult } from "./result-ntFBW2p2.js";
|
|
|
2
2
|
import { n as postgrestExecutor } from "./postgrest-executor-BFW4oWte.js";
|
|
3
3
|
import { n as decodeJwtPayload } from "./base64-B9Wlsdj7.js";
|
|
4
4
|
import { i as userContext } from "./impersonation-DM3oWNoD.js";
|
|
5
|
-
import { n as
|
|
5
|
+
import { n as hasAuthModule, r as claimedTenant } from "./auth-module-BbmX-N4L.js";
|
|
6
6
|
import { t as currentTenant } from "./tenant-source-bqWpSr86.js";
|
|
7
7
|
import { n as identityKey } from "./user-change-DgWC6RRC.js";
|
|
8
8
|
import { t as createQueries } from "./queries-BWYYS9um.js";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { t as AsyncResult } from "./result-DZeA5KS6.js";
|
|
2
|
-
import { n as TopicPort } from "./watch-topic-
|
|
2
|
+
import { n as TopicPort } from "./watch-topic-BAxoPKZx.js";
|
|
3
3
|
import { SupabaseClient } from "@supabase/supabase-js";
|
|
4
4
|
//#region src/client/ports.d.ts
|
|
5
5
|
/**
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Bt as Executor } from "../types-DFdg_4yN.js";
|
|
2
2
|
import { C as UploadRouteOptions, E as uploadRoute, S as UploadRoute, T as uploadOutcome, _ as UploadConnectorOptions, b as UploadOutcome, c as LocalTablesOption, d as CreateUploadRepository, f as CrudEntryLike, g as UploadConnector, h as RejectedStore, m as RejectedChange, n as DataEngine, p as CrudQueueLike, s as LiveEngineOptions, v as UploadErrorContext, w as createUploadConnector, x as UploadRepository, y as UploadFunction } from "../data-engine-BWoz9lED.js";
|
|
3
|
-
import { t as AuthSnapshot } from "../bind-
|
|
4
|
-
import { C as quoteSqliteIdent, S as likeToGlob, _ as SqliteQuery, a as postgrestTimestamp, b as SqliteValue, c as sqliteCompiler, d as SqliteDecode, f as SqliteInsertPlan, g as SqlitePlan, h as SqliteNested, i as fromSqliteError, l as SqliteColumn, m as SqliteKeys, n as SqliteDatabaseLike, o as CheckSqliteOptions, p as SqliteKeyedPlan, r as SqliteExecutorOptions, s as checkSqlite, t as SqliteContextLike, u as SqliteCompilerOptions, v as SqliteReturning, w as sqliteValue, x as compileSqlite, y as SqliteSelectPlan } from "../executor-
|
|
3
|
+
import { t as AuthSnapshot } from "../bind-JGCPGUJh.js";
|
|
4
|
+
import { C as quoteSqliteIdent, S as likeToGlob, _ as SqliteQuery, a as postgrestTimestamp, b as SqliteValue, c as sqliteCompiler, d as SqliteDecode, f as SqliteInsertPlan, g as SqlitePlan, h as SqliteNested, i as fromSqliteError, l as SqliteColumn, m as SqliteKeys, n as SqliteDatabaseLike, o as CheckSqliteOptions, p as SqliteKeyedPlan, r as SqliteExecutorOptions, s as checkSqlite, t as SqliteContextLike, u as SqliteCompilerOptions, v as SqliteReturning, w as sqliteValue, x as compileSqlite, y as SqliteSelectPlan } from "../executor-BcNWcD-4.js";
|
|
5
5
|
//#region src/powersync/sync.d.ts
|
|
6
6
|
/** The part of PowerSync's `SyncStatus` the engine reads. */
|
|
7
7
|
interface SyncStatusLike {
|
package/dist/preset/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Bn as PRESETS, Ct as ResolvedPresetBlock, Et as resolvePreset, Fn as presetFromSpec, Gn as defaultPreset, Hn as PRESET_NAMES, In as presetOfSpec, Kn as isPresetName, Ln as presetSpec, Pn as PresetSpec, Rn as DEFAULT_PRESET_NAME, St as ResolvedPreset, Tt as presetBlockConflict, Un as PresetGroup, Vn as PRESET_GROUPS, Wn as PresetName, _i as PresetValueInfo, _t as expandPreset, ai as DEFAULT_CONVENTIONS, bi as presetValueLabel, bt as PresetConflict, ci as Preset, di as PresetField, ei as PresetCatalog, er as APP_COLUMN_FORMATS, fi as PresetFieldKey, gi as PresetScope, gt as conventionConfig, hi as PresetPlatforms, ht as PresetInput, ii as CONVENTION_FIELDS, li as PresetAccess, mi as PresetFramework, mt as ExpandedConfig, ni as PresetCatalogManifest, oi as PRESET_FRAMEWORKS, pi as PresetFieldValue, pt as ConfigConventions, qn as namedPreset, ri as PresetGlueItem, si as PRESET_TENANT_NAMES, sr as AppColumnFormat, ti as PresetCatalogBlock, ui as PresetConventions, vi as integrationsForFramework, vt as presetConfig, wt as listNames, xt as PresetIntegration, yi as presetField, yt as presetOf, zn as NamedPreset } from "../context-
|
|
2
|
-
import { A as presetAndDesignOf, C as designFileSource, D as encodeDesign, E as designSchema, F as safeDesignFileSource, I as safeParseDesign, L as appDefaultError, M as presetConfigSource, N as presetInstallCommand, O as isDesignCode, P as readDesignFile, R as isAppDefault, S as designConfig, T as designOf, _ as DesignParseResult, a as DesignChange, b as createUrl, c as diffAppTables, d as DESIGN_FILE, f as DESIGN_FORMAT, g as DesignParseIssue, h as DesignParseError, i as presetGlue, j as presetApplyCommand, k as parseDesign, l as diffDesigns, m as DesignFile, n as glueCommand, o as DesignChangeKind, p as DesignErrorCode, r as presetBlocksSource, s as DiffOptions, t as PROVIDER_COMMENT, u as CreateDesign, v as DesignTooLongError, w as designFormat, x as decodeDesign, y as MAX_DESIGN_CODE_LENGTH, z as PRESET_CATALOG } from "../index-
|
|
3
|
-
import { i as appReservedColumns, n as appIdentifierError, r as appNameLengthError, t as APP_NAME_MAX } from "../app-tables-
|
|
1
|
+
import { Bn as PRESETS, Ct as ResolvedPresetBlock, Et as resolvePreset, Fn as presetFromSpec, Gn as defaultPreset, Hn as PRESET_NAMES, In as presetOfSpec, Kn as isPresetName, Ln as presetSpec, Pn as PresetSpec, Rn as DEFAULT_PRESET_NAME, St as ResolvedPreset, Tt as presetBlockConflict, Un as PresetGroup, Vn as PRESET_GROUPS, Wn as PresetName, _i as PresetValueInfo, _t as expandPreset, ai as DEFAULT_CONVENTIONS, bi as presetValueLabel, bt as PresetConflict, ci as Preset, di as PresetField, ei as PresetCatalog, er as APP_COLUMN_FORMATS, fi as PresetFieldKey, gi as PresetScope, gt as conventionConfig, hi as PresetPlatforms, ht as PresetInput, ii as CONVENTION_FIELDS, li as PresetAccess, mi as PresetFramework, mt as ExpandedConfig, ni as PresetCatalogManifest, oi as PRESET_FRAMEWORKS, pi as PresetFieldValue, pt as ConfigConventions, qn as namedPreset, ri as PresetGlueItem, si as PRESET_TENANT_NAMES, sr as AppColumnFormat, ti as PresetCatalogBlock, ui as PresetConventions, vi as integrationsForFramework, vt as presetConfig, wt as listNames, xt as PresetIntegration, yi as presetField, yt as presetOf, zn as NamedPreset } from "../context-8kb8m5uO.js";
|
|
2
|
+
import { A as presetAndDesignOf, C as designFileSource, D as encodeDesign, E as designSchema, F as safeDesignFileSource, I as safeParseDesign, L as appDefaultError, M as presetConfigSource, N as presetInstallCommand, O as isDesignCode, P as readDesignFile, R as isAppDefault, S as designConfig, T as designOf, _ as DesignParseResult, a as DesignChange, b as createUrl, c as diffAppTables, d as DESIGN_FILE, f as DESIGN_FORMAT, g as DesignParseIssue, h as DesignParseError, i as presetGlue, j as presetApplyCommand, k as parseDesign, l as diffDesigns, m as DesignFile, n as glueCommand, o as DesignChangeKind, p as DesignErrorCode, r as presetBlocksSource, s as DiffOptions, t as PROVIDER_COMMENT, u as CreateDesign, v as DesignTooLongError, w as designFormat, x as decodeDesign, y as MAX_DESIGN_CODE_LENGTH, z as PRESET_CATALOG } from "../index-CENWq3zb.js";
|
|
3
|
+
import { i as appReservedColumns, n as appIdentifierError, r as appNameLengthError, t as APP_NAME_MAX } from "../app-tables-yMQ4ubyY.js";
|
|
4
4
|
export { APP_COLUMN_FORMATS, APP_NAME_MAX, type AppColumnFormat, CONVENTION_FIELDS, type ConfigConventions, type CreateDesign, DEFAULT_CONVENTIONS, DEFAULT_PRESET_NAME, DESIGN_FILE, DESIGN_FORMAT, type DesignChange, type DesignChangeKind, type DesignErrorCode, type DesignFile, DesignParseError, type DesignParseIssue, type DesignParseResult, DesignTooLongError, type DiffOptions, type ExpandedConfig, MAX_DESIGN_CODE_LENGTH, type NamedPreset, PRESETS, PRESET_CATALOG, PRESET_FRAMEWORKS, PRESET_GROUPS, PRESET_NAMES, PRESET_TENANT_NAMES, PROVIDER_COMMENT, type Preset, type PresetAccess, type PresetCatalog, type PresetCatalogBlock, type PresetCatalogManifest, type PresetConflict, type PresetConventions, type PresetField, type PresetFieldKey, type PresetFieldValue, type PresetFramework, type PresetGlueItem, type PresetGroup, type PresetInput, type PresetIntegration, type PresetName, type PresetPlatforms, type PresetScope, type PresetSpec, type PresetValueInfo, type ResolvedPreset, type ResolvedPresetBlock, appDefaultError, appIdentifierError, appNameLengthError, appReservedColumns, conventionConfig, createUrl, decodeDesign, defaultPreset, designConfig, designFileSource, designFormat, designOf, designSchema, diffAppTables, diffDesigns, encodeDesign, expandPreset, glueCommand, integrationsForFramework, isAppDefault, isDesignCode, isPresetName, listNames, namedPreset, parseDesign, presetAndDesignOf, presetApplyCommand, presetBlockConflict, presetBlocksSource, presetConfig, presetConfigSource, presetField, presetFromSpec, presetGlue, presetInstallCommand, presetOf, presetOfSpec, presetSpec, presetValueLabel, readDesignFile, resolvePreset, safeDesignFileSource, safeParseDesign };
|