better-supabase 0.21.0 → 0.22.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/{adapter-DZJZTY6g.js → adapter-D4aNBxhm.js} +2 -2
- package/dist/api-3C0AWFeP.js +696 -0
- package/dist/{api-Cj4W_pqT.d.ts → api-CHObZL7m.d.ts} +1 -1
- package/dist/{app-tables-C5HjXs2k.d.ts → app-tables-BGzdnQm5.d.ts} +1 -1
- package/dist/astro/index.js +5 -5
- package/dist/blocks/access-requests/index.js +1 -1
- package/dist/blocks/activities/index.js +1 -1
- package/dist/blocks/agents/index.js +1 -1
- package/dist/blocks/ai-chat/index.js +1 -1
- package/dist/blocks/ai-keys/index.js +1 -1
- package/dist/blocks/announcements/index.js +1 -1
- package/dist/blocks/api-keys/index.js +1 -1
- package/dist/blocks/approvals/index.js +1 -1
- package/dist/blocks/assets/index.js +1 -1
- package/dist/blocks/assignment/index.js +1 -1
- package/dist/blocks/attachments/index.js +1 -1
- package/dist/blocks/audit/index.d.ts +1 -1
- package/dist/blocks/audit/index.js +1 -1
- package/dist/blocks/automations/index.js +1 -1
- package/dist/blocks/billable-time/index.js +1 -1
- package/dist/blocks/billing/index.js +2 -2
- package/dist/blocks/bookings/index.js +1 -1
- package/dist/blocks/bulk/index.js +1 -1
- package/dist/blocks/calendar/index.js +1 -1
- package/dist/blocks/catalog/index.js +1 -1
- package/dist/blocks/channels/index.js +1 -1
- package/dist/blocks/collections/index.js +1 -1
- package/dist/blocks/compliance/index.js +1 -1
- package/dist/blocks/connectors/index.js +1 -1
- package/dist/blocks/contacts/index.js +1 -1
- package/dist/blocks/content/index.js +1 -1
- package/dist/blocks/contracts/index.js +1 -1
- package/dist/blocks/courses/index.js +1 -1
- package/dist/blocks/custom-fields/index.js +1 -1
- package/dist/blocks/data-lifecycle/index.js +1 -1
- package/dist/blocks/deals/index.js +1 -1
- package/dist/blocks/dispatch/index.js +1 -1
- package/dist/blocks/documents/index.js +1 -1
- package/dist/blocks/domains/index.js +1 -1
- package/dist/blocks/donations/index.js +1 -1
- package/dist/blocks/drive/index.js +1 -1
- package/dist/blocks/employees/index.js +1 -1
- package/dist/blocks/enrichment/index.js +1 -1
- package/dist/blocks/enrollments/index.js +1 -1
- package/dist/blocks/expenses/index.js +1 -1
- package/dist/blocks/flags/index.js +1 -1
- package/dist/blocks/forecasts/index.js +1 -1
- package/dist/blocks/forms/index.js +1 -1
- package/dist/blocks/guests/index.js +1 -1
- package/dist/blocks/hiring/index.js +1 -1
- package/dist/blocks/imports/index.js +1 -1
- package/dist/blocks/inbox/index.js +1 -1
- package/dist/blocks/incidents/index.js +1 -1
- package/dist/blocks/index.js +2 -2
- package/dist/blocks/inventory/index.js +1 -1
- package/dist/blocks/invoices/index.js +1 -1
- package/dist/blocks/leases/index.js +1 -1
- package/dist/blocks/leave/index.js +1 -1
- package/dist/blocks/ledger/index.js +1 -1
- package/dist/blocks/mail-sync/index.js +1 -1
- package/dist/blocks/messaging/index.js +1 -1
- package/dist/blocks/metrics/index.js +1 -1
- package/dist/blocks/moderation/index.js +1 -1
- package/dist/blocks/notifications/index.js +3 -3
- package/dist/blocks/numbering/index.js +1 -1
- package/dist/blocks/oauth-server/index.js +1 -1
- package/dist/blocks/orders/index.js +1 -1
- package/dist/blocks/organizations/index.js +1 -1
- package/dist/blocks/outbox/index.js +1 -1
- package/dist/blocks/passes/index.js +1 -1
- package/dist/blocks/pipelines/index.js +1 -1
- package/dist/blocks/posts/index.js +1 -1
- package/dist/blocks/promotions/index.js +1 -1
- package/dist/blocks/push/index.js +1 -1
- package/dist/blocks/quotes/index.js +1 -1
- package/dist/blocks/reactions/index.js +1 -1
- package/dist/blocks/relations/index.js +1 -1
- package/dist/blocks/reminders/index.js +1 -1
- package/dist/blocks/reviews/index.js +1 -1
- package/dist/blocks/saved-views/index.js +1 -1
- package/dist/blocks/scores/index.js +1 -1
- package/dist/blocks/search/index.js +1 -1
- package/dist/blocks/security-events/index.js +1 -1
- package/dist/blocks/segments/index.js +1 -1
- package/dist/blocks/sequences/index.js +1 -1
- package/dist/blocks/service-accounts/index.js +1 -1
- package/dist/blocks/settings/index.js +1 -1
- package/dist/blocks/share-links/index.js +1 -1
- package/dist/blocks/shipments/index.js +1 -1
- package/dist/blocks/signatures/index.js +1 -1
- package/dist/blocks/signing-keys/index.js +1 -1
- package/dist/blocks/sla/index.js +1 -1
- package/dist/blocks/sso/index.js +1 -1
- package/dist/blocks/state-machine/index.js +1 -1
- package/dist/blocks/tags/index.js +1 -1
- package/dist/blocks/tasks/index.js +2 -2
- package/dist/blocks/teams/index.js +1 -1
- package/dist/blocks/templates/index.js +1 -1
- package/dist/blocks/time-tracking/index.js +1 -1
- package/dist/blocks/timeline/index.js +1 -1
- package/dist/blocks/trash/index.js +1 -1
- package/dist/blocks/vercel-marketplace/index.js +1 -1
- package/dist/blocks/versions/index.js +1 -1
- package/dist/blocks/waitlist/index.js +1 -1
- package/dist/blocks/webhooks/index.js +4 -4
- package/dist/blocks/workflow-editor/index.js +1 -1
- package/dist/blocks/workflows/index.js +1 -1
- package/dist/cli/{add-C0w-mVTQ.js → add-B6CQOt3A.js} +2 -2
- package/dist/cli/{add-BTDPjVGC.js → add-BXFzr0Wf.js} +9 -9
- package/dist/cli/add-w_HumDPX.js +1 -0
- package/dist/cli/{backfill-BDdBs6Ne.js → backfill-Dflp6JZk.js} +1 -1
- package/dist/cli/bin.js +1 -1
- package/dist/cli/{blocks-Bs-lA-U_.js → blocks-CBH3N7Fy.js} +1 -1
- package/dist/cli/{blocks-CQLME-HQ.js → blocks-FtOIcUbu.js} +1 -1
- package/dist/cli/{cache-DDKao2Va.js → cache-61VwYKEv.js} +1 -1
- package/dist/cli/{codemod-Bjl998Do.js → codemod-CqPRa25J.js} +1 -1
- package/dist/cli/{content-mapper-DgSTl-DL.js → content-mapper-DGQQY5IA.js} +2 -2
- package/dist/cli/{doctor-CMLWbt44.js → doctor-BxxSO193.js} +19 -17
- package/dist/cli/{gen-D3VX8WdV.js → gen-D2cqqqTH.js} +11 -11
- package/dist/cli/index.d.ts +1 -1
- package/dist/cli/index.js +6 -6
- package/dist/cli/{init-D6D6eWze.js → init-BnG1IE1y.js} +5 -5
- package/dist/cli/{live-C_xgTOfD.js → live-D26OWOAb.js} +2 -2
- package/dist/cli/{mcp-B0Irjbes.js → mcp-1l3C_GdB.js} +2 -2
- package/dist/cli/{metadata-cLXra-XB.js → metadata-DDfPBHwI.js} +3 -3
- package/dist/cli/{migration-safety-OUK-Afbb.js → migration-safety-CQbrfZIx.js} +1 -1
- package/dist/cli/{migrations-CHenMvl_.js → migrations-Ch5Uuvyj.js} +1 -1
- package/dist/cli/{module-migration-6V7vXWUK.js → module-migration-Dul1uTYX.js} +2 -2
- package/dist/cli/{powersync-D83yAFbl.js → powersync-CfT-tRx1.js} +2 -2
- package/dist/cli/powersync-Vmhw5c1N.js +1 -0
- package/dist/cli/{print-C0OmQyTu.js → print-CbPT4PTL.js} +2 -2
- package/dist/cli/{remove-BWlOngNT.js → remove-kDH1yxKZ.js} +5 -5
- package/dist/cli/{render-9m70qveo.js → render-0Vd7BaNA.js} +3 -3
- package/dist/cli/{run-gE4eAazR.js → run-Dafms0D2.js} +8 -8
- package/dist/cli/{run-He3M-ZRq.js → run-DxTd55Ug.js} +21 -21
- package/dist/cli/{shared-Cx2WFVWq.js → shared-BQAMXvwd.js} +1 -1
- package/dist/cli/{snapshot-CZb3uVKE.js → snapshot-B8K6gYjA.js} +2 -2
- package/dist/cli/{source-CrYSCdPZ.js → source-CXDyCWz5.js} +1 -1
- package/dist/cli/{spec-Cn5RhuQc.js → spec-BGsnTkIl.js} +2 -2
- package/dist/cli/{spec-D4b9ePuQ.js → spec-CaN7nOqI.js} +1 -1
- package/dist/cli/{sql-layout-CLJ67h3L.js → sql-layout-BGAlcp1U.js} +2 -2
- package/dist/cli/{sync-B8VGiaHk.js → sync-CT_5VG0E.js} +3 -3
- package/dist/cli/{upgrade-DMiYx1C8.js → upgrade-DA7aO88E.js} +2 -2
- package/dist/cli/{upgrade-BvBWK3Fo.js → upgrade-frUtPDDb.js} +4 -4
- package/dist/cli/{version-BVg2Z6yv.js → version-CUdPyV6J.js} +1 -1
- package/dist/{composite-Dw5ofSF_.js → composite-CBRbvn5j.js} +2 -2
- package/dist/config/index.d.ts +1 -1
- package/dist/config/index.js +4 -4
- package/dist/{config-CD2OGfCG.js → config-C9AOcQ9S.js} +1 -1
- package/dist/{config-BOt5T6Vs.js → config-CH-D2B-4.js} +3 -3
- package/dist/{context-sgrUjA3U.d.ts → context-DEisra3V.d.ts} +15 -3
- package/dist/create/index.d.ts +72 -451
- package/dist/create/index.js +15 -1687
- package/dist/create/lite/index.d.ts +250 -13
- package/dist/create/lite/index.js +1007 -24
- package/dist/credentials/index.js +1 -1
- package/dist/edge/index.js +7 -7
- package/dist/elysia/index.js +1 -1
- package/dist/events/index.js +1 -1
- package/dist/expo/index.js +3 -3
- package/dist/{framework-DXM1vNcV.js → framework-DYEUraqt.js} +1 -1
- package/dist/h3/index.js +1 -1
- package/dist/h3/v1/index.js +1 -1
- package/dist/hono/index.js +6 -6
- package/dist/{index-5JSxY1MG.d.ts → index-3p_oWttZ.d.ts} +77 -2
- package/dist/{index-Bt7_mxn0.d.ts → index-CM2aGNRo.d.ts} +1 -1
- package/dist/{app-tables-DyswUg6J.js → instances-CK0jR3Pc.js} +147 -3
- package/dist/{kit-DhlB-vv_.js → kit-Bcd9wYCV.js} +1 -1
- package/dist/mapper/bin.js +5 -5
- package/dist/mcp/index.js +6 -6
- package/dist/mcp/sdk/index.js +2 -2
- package/dist/nestjs/index.js +1 -1
- package/dist/next/index.js +7 -7
- package/dist/node/index.js +1 -1
- package/dist/orpc/index.d.ts +1 -1
- package/dist/orpc/index.js +5 -5
- package/dist/otel/index.js +4 -4
- package/dist/preset/index.d.ts +4 -4
- package/dist/preset/index.js +4 -4
- package/dist/{preset-B3CukUhu.js → preset-CS490mYJ.js} +179 -7
- package/dist/project-NmP1NdLi.js +1760 -0
- package/dist/react/index.js +2 -2
- package/dist/react/server.js +2 -2
- package/dist/{react-_D_CeZMk.js → react-CcrQQl0_.js} +2 -2
- package/dist/react-router/index.js +5 -5
- package/dist/realtime/index.js +1 -1
- package/dist/{refusal-D48CMqpQ.js → refusal-DDlInPff.js} +2 -2
- package/dist/{instances-DDt7NdVl.js → resolved-names-DdlJzoMK.js} +2 -146
- package/dist/{resource-R3KToNze.js → resource-BUJcZKiW.js} +2 -2
- package/dist/{resources-DqIwoQsP.js → resources-jb3R6rEa.js} +1 -1
- package/dist/server/index.js +7 -7
- package/dist/{sign-in-1FJiXXyG.js → sign-in-NO7LWlw4.js} +2 -2
- package/dist/solid/index.js +1 -1
- package/dist/solid-start/index.js +5 -5
- package/dist/spec/index.d.ts +2 -2
- package/dist/spec/index.js +2 -693
- package/dist/sql/index.d.ts +3 -3
- package/dist/sql/index.js +2 -2
- package/dist/{sql-BjjgwJKg.js → sql-BMXEHTvr.js} +17 -3
- package/dist/svelte/index.js +1 -1
- package/dist/sveltekit/index.js +5 -5
- package/dist/tanstack-start/index.js +5 -5
- package/dist/testing/index.d.ts +2 -2
- package/dist/testing/index.js +4 -4
- package/dist/types-BC1HLEVx.d.ts +461 -0
- package/dist/vue/index.js +1 -1
- package/dist/yjs/index.js +1 -1
- package/package.json +1 -1
- package/dist/cli/add-CspY9jKT.js +0 -1
- package/dist/cli/powersync-DwhCH0gs.js +0 -1
- package/dist/types-DGHfTW8_.d.ts +0 -9
- package/dist/{build-CM8PJqwW.js → build-CH2N3Yf0.js} +3 -3
- package/dist/{create-blocks-CUS28FfS.js → create-blocks-BfrDUSM6.js} +1 -1
- package/dist/{data-hooks-tgF1Ct0F.js → data-hooks-CdcZfVS1.js} +1 -1
- package/dist/{respond-3RKp6VgU.js → respond-CZMWbUs3.js} +1 -1
- package/dist/{topic-J9I3yu6f.js → topic-DClSoqY7.js} +1 -1
package/dist/react/index.js
CHANGED
|
@@ -3,7 +3,7 @@ import { t as escapeLike } from "../escape-like-DHfx6jRr.js";
|
|
|
3
3
|
import { a as createHooks, d as useSupabase, i as BetterSupabaseProvider, l as useLiveCount, n as useSignIn, o as useAuth, r as useSignOut, s as useBroadcast, u as useLiveQuery } from "../sign-in-CmPK1AgM.js";
|
|
4
4
|
import { t as supportOf } from "../support-view-g4YLBeqX.js";
|
|
5
5
|
import { SessionProvider, useSession, useSupportSession } from "./session.js";
|
|
6
|
-
import { d as fieldErrorsOf } from "../data-hooks-
|
|
7
|
-
import { _ as useBlockTenant, a as useRealtimeRelay, b as useAction, c as useSyncStatus, d as useBlockMutation, f as useBlockQuery, g as useBlockEnv, h as createRecordProvider, i as useDebouncedSearch, l as defineDataHooks, m as useRecordListState, n as useSignedUrl, o as usePresence, p as useRecordForm, r as useUpload, s as useConflicts, t as useImage, u as useBlockEvent, v as useController, x as useActionForm, y as useLatest } from "../react-
|
|
6
|
+
import { d as fieldErrorsOf } from "../data-hooks-CdcZfVS1.js";
|
|
7
|
+
import { _ as useBlockTenant, a as useRealtimeRelay, b as useAction, c as useSyncStatus, d as useBlockMutation, f as useBlockQuery, g as useBlockEnv, h as createRecordProvider, i as useDebouncedSearch, l as defineDataHooks, m as useRecordListState, n as useSignedUrl, o as usePresence, p as useRecordForm, r as useUpload, s as useConflicts, t as useImage, u as useBlockEvent, v as useController, x as useActionForm, y as useLatest } from "../react-CcrQQl0_.js";
|
|
8
8
|
import { t as tenantOf } from "../tenant-BgIiMQpo.js";
|
|
9
9
|
export { BetterSupabaseProvider, SessionProvider, createHooks, createRecordProvider, defineDataHooks, escapeLike, fieldErrorsOf, supportOf, tenantOf, useAction, useActionForm, useAuth, useBlockEnv, useBlockEvent, useBlockMutation, useBlockQuery, useBlockTenant, useBroadcast, useConflicts, useController, useDebouncedSearch, useImage, useLatest, useLiveCount, useLiveQuery, usePresence, useRealtimeRelay, useRecordForm, useRecordListState, useSession, useSignIn, useSignOut, useSignedUrl, useSupabase, useSupportSession, useSyncStatus, useUpload };
|
package/dist/react/server.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { t as escapeLike } from "../escape-like-DHfx6jRr.js";
|
|
2
2
|
import { d as useSupabase, i as BetterSupabaseProvider, o as useAuth, s as useBroadcast, u as useLiveQuery } from "../sign-in-CmPK1AgM.js";
|
|
3
3
|
import { t as supportOf } from "../support-view-g4YLBeqX.js";
|
|
4
|
-
import { d as fieldErrorsOf } from "../data-hooks-
|
|
5
|
-
import "../react-
|
|
4
|
+
import { d as fieldErrorsOf } from "../data-hooks-CdcZfVS1.js";
|
|
5
|
+
import "../react-CcrQQl0_.js";
|
|
6
6
|
import { t as tenantOf } from "../tenant-BgIiMQpo.js";
|
|
7
7
|
import { SessionProvider } from "./session.js";
|
|
8
8
|
//#region src/react/server.ts
|
|
@@ -3,9 +3,9 @@ import { t as escapeLike } from "./escape-like-DHfx6jRr.js";
|
|
|
3
3
|
import { a as ok, r as err, s as toDbError } from "./result-ntFBW2p2.js";
|
|
4
4
|
import { c as useBroadcastAuth, f as ClientContext } from "./sign-in-CmPK1AgM.js";
|
|
5
5
|
import { useOptionalSupportSession } from "./react/session.js";
|
|
6
|
-
import { a as blockArgsKey, c as listenToBlockEvents, d as fieldErrorsOf, i as dataTarget, l as blockEnv, n as createDataOne, o as createBlockMutation, r as dataArgsKey, s as createBlockQuery, t as createDataList } from "./data-hooks-
|
|
6
|
+
import { a as blockArgsKey, c as listenToBlockEvents, d as fieldErrorsOf, i as dataTarget, l as blockEnv, n as createDataOne, o as createBlockMutation, r as dataArgsKey, s as createBlockQuery, t as createDataList } from "./data-hooks-CdcZfVS1.js";
|
|
7
7
|
import { U as rpcTransport } from "./block-helpers-B0f0ZVb5.js";
|
|
8
|
-
import { r as createBlocks } from "./create-blocks-
|
|
8
|
+
import { r as createBlocks } from "./create-blocks-BfrDUSM6.js";
|
|
9
9
|
import { a as recordCan, i as plainData, l as runBindingWrite, s as recordSubject } from "./record-type-DRbnlj5q.js";
|
|
10
10
|
import { t as createRecordController } from "./controller-qG-B1eDn.js";
|
|
11
11
|
import { t as relayRealtimeClient } from "./relay-CIKcAVjf.js";
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { o as problemResponse } from "../problem-Bf0cJ7tk.js";
|
|
2
|
-
import { c as extendServer, o as withFlush, s as createServer } from "../adapter-
|
|
3
|
-
import { n as defaultExpose, s as settle } from "../respond-
|
|
4
|
-
import { i as requireCaller, o as runAction } from "../kit-
|
|
2
|
+
import { c as extendServer, o as withFlush, s as createServer } from "../adapter-D4aNBxhm.js";
|
|
3
|
+
import { n as defaultExpose, s as settle } from "../respond-CZMWbUs3.js";
|
|
4
|
+
import { i as requireCaller, o as runAction } from "../kit-Bcd9wYCV.js";
|
|
5
5
|
import { n as bufferInPlace, t as around } from "../shared-Bf-I13Ht.js";
|
|
6
|
-
import { i as localsOf, n as actionInput, r as frameworkEntry } from "../framework-
|
|
7
|
-
import { r as refusalResponse } from "../refusal-
|
|
6
|
+
import { i as localsOf, n as actionInput, r as frameworkEntry } from "../framework-DYEUraqt.js";
|
|
7
|
+
import { r as refusalResponse } from "../refusal-DDlInPff.js";
|
|
8
8
|
//#region src/bridges/react-router.ts
|
|
9
9
|
/**
|
|
10
10
|
* Runs an entry array as React Router server middleware. The contributions are
|
package/dist/realtime/index.js
CHANGED
|
@@ -2,7 +2,7 @@ import { i as realtimeChanges, n as liveQuery, r as liveTopic, t as liveCount }
|
|
|
2
2
|
import { n as watchTopic, t as topicPort } from "../watch-topic-CuaWfCuv.js";
|
|
3
3
|
import { n as relayTopicPort, t as relayRealtimeClient } from "../relay-CIKcAVjf.js";
|
|
4
4
|
import { t as subjectReaders } from "../subject-readers-CeeJJOQ4.js";
|
|
5
|
-
import { n as rowChange, r as rowKeys, t as defineTopic } from "../topic-
|
|
5
|
+
import { n as rowChange, r as rowKeys, t as defineTopic } from "../topic-DClSoqY7.js";
|
|
6
6
|
//#region src/realtime/subject-presence.ts
|
|
7
7
|
/** The presence topic template; the subjects module's policies authorize it. */
|
|
8
8
|
const SUBJECT_PRESENCE_TEMPLATE = "presence:{subjectType}:{subjectId}";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { r as dbErrorOf } from "./errors-BVFgt8BZ.js";
|
|
2
2
|
import { o as problemResponse } from "./problem-Bf0cJ7tk.js";
|
|
3
|
-
import { n as defaultExpose } from "./respond-
|
|
4
|
-
import { i as requireCaller } from "./kit-
|
|
3
|
+
import { n as defaultExpose } from "./respond-CZMWbUs3.js";
|
|
4
|
+
import { i as requireCaller } from "./kit-Bcd9wYCV.js";
|
|
5
5
|
//#region src/server/refusal.ts
|
|
6
6
|
function isAalRefusal(error) {
|
|
7
7
|
return error.kind === "forbidden" && "required" in error && error.required === "aal2";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { a as entityNoun, i as entityNames, n as checkEntityName, s as tenantRename, t as DEFAULT_TENANT } from "./entity-naming-Dtyq5sKE.js";
|
|
2
|
-
import {
|
|
2
|
+
import { L as tenantNameOf } from "./instances-CK0jR3Pc.js";
|
|
3
3
|
//#region src/config/defaults.ts
|
|
4
4
|
/**
|
|
5
5
|
* Every default `resolveConfig` fills in. Other modules (the SQL module
|
|
@@ -130,148 +130,4 @@ function resolveNames(module, names, blocks = {}) {
|
|
|
130
130
|
};
|
|
131
131
|
}
|
|
132
132
|
//#endregion
|
|
133
|
-
|
|
134
|
-
/**
|
|
135
|
-
* Blocks that install once: they hold the app's identity, tenancy, access and
|
|
136
|
-
* plumbing, so a second copy would split what every other block reads.
|
|
137
|
-
*/
|
|
138
|
-
const CORE_BLOCKS = /* @__PURE__ */ new Set([
|
|
139
|
-
"api-keys",
|
|
140
|
-
"audit",
|
|
141
|
-
"created-by",
|
|
142
|
-
"grants",
|
|
143
|
-
"data-lifecycle",
|
|
144
|
-
"entitlements",
|
|
145
|
-
"flags",
|
|
146
|
-
"field-encryption",
|
|
147
|
-
"field-history",
|
|
148
|
-
"guests",
|
|
149
|
-
"idempotency",
|
|
150
|
-
"invitations",
|
|
151
|
-
"jsonb-schemas",
|
|
152
|
-
"identities",
|
|
153
|
-
"memberships",
|
|
154
|
-
"mfa",
|
|
155
|
-
"oauth-server",
|
|
156
|
-
"organizations",
|
|
157
|
-
"outbox",
|
|
158
|
-
"permissions",
|
|
159
|
-
"pgtap",
|
|
160
|
-
"profiles",
|
|
161
|
-
"queue",
|
|
162
|
-
"rate-limit",
|
|
163
|
-
"read-sets",
|
|
164
|
-
"realtime-tables",
|
|
165
|
-
"reserved-slugs",
|
|
166
|
-
"rls-guard",
|
|
167
|
-
"search",
|
|
168
|
-
"security-events",
|
|
169
|
-
"service-accounts",
|
|
170
|
-
"sessions",
|
|
171
|
-
"settings",
|
|
172
|
-
"signing-keys",
|
|
173
|
-
"sso",
|
|
174
|
-
"subjects",
|
|
175
|
-
"teams",
|
|
176
|
-
"trash",
|
|
177
|
-
"updated-at",
|
|
178
|
-
"usage",
|
|
179
|
-
"vector-search"
|
|
180
|
-
]);
|
|
181
|
-
const INSTANCE_NAME = /^[a-z][a-zA-Z0-9-]*$/;
|
|
182
|
-
/**
|
|
183
|
-
* The prefix an instance gives the names its block's renames leave unchanged:
|
|
184
|
-
* `hiring-pipelines` and `hiringPipelines` both give `hiring_pipelines`.
|
|
185
|
-
*/
|
|
186
|
-
function instancePrefix(name) {
|
|
187
|
-
return name.replaceAll(/[A-Z]/g, (letter) => `_${letter.toLowerCase()}`).replaceAll("-", "_");
|
|
188
|
-
}
|
|
189
|
-
/** Whether `instance` installs its block under another name. */
|
|
190
|
-
const isRenamedInstance = (instance) => instance.name !== instance.block;
|
|
191
|
-
/** The blocks `block` may bind with `uses`: what it requires or works with. */
|
|
192
|
-
function dependenciesOf(block, catalog) {
|
|
193
|
-
const entry = catalog.blocks.find((each) => each.name === block);
|
|
194
|
-
const requires = /* @__PURE__ */ new Set([...entry?.requires ?? [], ...Object.values(entry?.requiresByAccess ?? {}).flat()]);
|
|
195
|
-
return {
|
|
196
|
-
requires,
|
|
197
|
-
known: /* @__PURE__ */ new Set([...requires, ...entry?.integrates ?? []])
|
|
198
|
-
};
|
|
199
|
-
}
|
|
200
|
-
function instanceProblems(entries, catalog) {
|
|
201
|
-
const blocks = new Set(catalog.blocks.map((block) => block.name));
|
|
202
|
-
const byBlock = /* @__PURE__ */ new Map();
|
|
203
|
-
for (const [name, entry] of entries) {
|
|
204
|
-
const block = entry.block ?? name;
|
|
205
|
-
byBlock.set(block, [...byBlock.get(block) ?? [], name]);
|
|
206
|
-
}
|
|
207
|
-
const problems = [];
|
|
208
|
-
for (const [name, entry] of entries) {
|
|
209
|
-
if (!INSTANCE_NAME.test(name)) {
|
|
210
|
-
problems.push(`blocks.${name}: an instance name starts with a lowercase letter and holds letters, digits and -.`);
|
|
211
|
-
continue;
|
|
212
|
-
}
|
|
213
|
-
if (entry.block !== void 0 && !blocks.has(entry.block)) {
|
|
214
|
-
problems.push(`blocks.${name}.block: "${entry.block}" is not a block. See \`better-supabase blocks list\`.`);
|
|
215
|
-
continue;
|
|
216
|
-
}
|
|
217
|
-
const block = entry.block ?? name;
|
|
218
|
-
if (CORE_BLOCKS.has(block) && name !== block) problems.push(`blocks.${name}: "${block}" is a core block and installs once, under its own name. Rename the key to "${block}".`);
|
|
219
|
-
const { requires, known } = dependenciesOf(block, catalog);
|
|
220
|
-
for (const [dependency, instance] of Object.entries(entry.uses ?? {})) if (!known.has(dependency)) problems.push(`blocks.${name}.uses.${dependency}: "${block}" doesn't use "${dependency}".`);
|
|
221
|
-
else if (!(byBlock.get(dependency) ?? []).includes(instance)) problems.push(`blocks.${name}.uses.${dependency}: "${instance}" is not an instance of "${dependency}".`);
|
|
222
|
-
for (const dependency of requires) {
|
|
223
|
-
const installed = byBlock.get(dependency) ?? [];
|
|
224
|
-
if (installed.length > 1 && entry.uses?.[dependency] === void 0) problems.push(`blocks.${name}.uses.${dependency}: "${dependency}" is installed as ${installed.map((each) => `"${each}"`).join(" and ")}; name the one "${name}" uses.`);
|
|
225
|
-
}
|
|
226
|
-
}
|
|
227
|
-
return problems;
|
|
228
|
-
}
|
|
229
|
-
function isNameList(blocks) {
|
|
230
|
-
return Array.isArray(blocks);
|
|
231
|
-
}
|
|
232
|
-
/**
|
|
233
|
-
* The instances in `blocks`, keyed by instance name. A list of names installs
|
|
234
|
-
* each block once under its own name. Throws one error that lists every
|
|
235
|
-
* instance whose `block` is unknown, that renames or repeats a core block, or
|
|
236
|
-
* whose `uses` doesn't name an installed instance of a dependency.
|
|
237
|
-
*/
|
|
238
|
-
function resolveInstances(blocks, catalog = PRESET_CATALOG) {
|
|
239
|
-
const entries = blocks === void 0 ? [] : isNameList(blocks) ? blocks.map((name) => [name, {}]) : Object.entries(blocks).flatMap(([name, entry]) => entry === void 0 ? [] : [[name, entry]]);
|
|
240
|
-
const problems = instanceProblems(entries, catalog);
|
|
241
|
-
if (problems.length > 0) throw new TypeError(problems.join("\n"));
|
|
242
|
-
const byBlock = /* @__PURE__ */ new Map();
|
|
243
|
-
for (const [name, entry] of entries) {
|
|
244
|
-
const block = entry.block ?? name;
|
|
245
|
-
byBlock.set(block, [...byBlock.get(block) ?? [], name]);
|
|
246
|
-
}
|
|
247
|
-
return Object.fromEntries(entries.map(([name, entry]) => {
|
|
248
|
-
const block = entry.block ?? name;
|
|
249
|
-
const { known } = dependenciesOf(block, catalog);
|
|
250
|
-
const implied = [...known].flatMap((dependency) => {
|
|
251
|
-
const installed = byBlock.get(dependency) ?? [];
|
|
252
|
-
return installed.length === 1 && installed[0] !== dependency ? [[dependency, installed[0]]] : [];
|
|
253
|
-
});
|
|
254
|
-
const uses = Object.fromEntries([...implied, ...Object.entries(entry.uses ?? {})].filter(([dependency, instance]) => instance !== dependency));
|
|
255
|
-
return [name, {
|
|
256
|
-
name,
|
|
257
|
-
block,
|
|
258
|
-
...entry.on === void 0 ? {} : { on: entry.on },
|
|
259
|
-
uses,
|
|
260
|
-
config: withoutBlockKey(entry)
|
|
261
|
-
}];
|
|
262
|
-
}));
|
|
263
|
-
}
|
|
264
|
-
/**
|
|
265
|
-
* `blocks` keyed by block name: the instances named after their block. The
|
|
266
|
-
* other instances render on their own, from `instances`.
|
|
267
|
-
*/
|
|
268
|
-
function blocksByName(instances) {
|
|
269
|
-
return Object.fromEntries(Object.values(instances).filter((instance) => !isRenamedInstance(instance)).map((instance) => [instance.block, instance.config]));
|
|
270
|
-
}
|
|
271
|
-
function withoutBlockKey(entry) {
|
|
272
|
-
if (entry.block === void 0) return entry;
|
|
273
|
-
const { block: _, ...rest } = entry;
|
|
274
|
-
return rest;
|
|
275
|
-
}
|
|
276
|
-
//#endregion
|
|
277
|
-
export { resolveNames as a, resolveInstances as i, instancePrefix as n, resolveJsonSchema as o, isRenamedInstance as r, CONFIG_DEFAULTS as s, blocksByName as t };
|
|
133
|
+
export { resolveJsonSchema as n, CONFIG_DEFAULTS as r, resolveNames as t };
|
|
@@ -3,9 +3,9 @@ import { n as isRecord } from "./guards-6F2bCtQR.js";
|
|
|
3
3
|
import { a as ok, r as err, s as toDbError } from "./result-ntFBW2p2.js";
|
|
4
4
|
import { n as validate } from "./standard-BA3mLh6w.js";
|
|
5
5
|
import { a as methodNotAllowed } from "./problem-Bf0cJ7tk.js";
|
|
6
|
-
import { n as checkEach, r as checkPermission } from "./authorizer-BGhXaDmo.js";
|
|
7
|
-
import { a as isResult, o as respond } from "./respond-3RKp6VgU.js";
|
|
8
6
|
import { n as matchAction, r as planResource, t as TABLE_VERBS } from "./resource-DvgXqZB_.js";
|
|
7
|
+
import { n as checkEach, r as checkPermission } from "./authorizer-BGhXaDmo.js";
|
|
8
|
+
import { a as isResult, o as respond } from "./respond-CZMWbUs3.js";
|
|
9
9
|
//#region src/server/resource-execute.ts
|
|
10
10
|
async function settled(value) {
|
|
11
11
|
return await value;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { n as dbError } from "./errors-BVFgt8BZ.js";
|
|
2
2
|
import { o as problemResponse } from "./problem-Bf0cJ7tk.js";
|
|
3
|
-
import { n as actionFits, t as defineResource } from "./resource-
|
|
3
|
+
import { n as actionFits, t as defineResource } from "./resource-BUJcZKiW.js";
|
|
4
4
|
//#region src/server/resources.ts
|
|
5
5
|
function split(path) {
|
|
6
6
|
return path.split("/").filter((segment) => segment !== "");
|
package/dist/server/index.js
CHANGED
|
@@ -3,32 +3,32 @@ import { n as isRecord } from "../guards-6F2bCtQR.js";
|
|
|
3
3
|
import { t as base64ToText } from "../base64-B9Wlsdj7.js";
|
|
4
4
|
import { n as validate } from "../standard-BA3mLh6w.js";
|
|
5
5
|
import { c as toProblem, i as isProblem, n as PROBLEM_TYPE_BASE, o as problemResponse, r as fromProblem, t as PROBLEM_CONTENT_TYPE } from "../problem-Bf0cJ7tk.js";
|
|
6
|
+
import { n as event, t as defineEvents } from "../event-map-CtPFhcOp.js";
|
|
6
7
|
import { i as delegationOf, n as actorOf, r as agentClaims, t as IDENTITY_SCOPES } from "../actor-go7p9-CJ.js";
|
|
7
8
|
import { i as userContext, r as impersonatorOf } from "../impersonation-DM3oWNoD.js";
|
|
8
9
|
import { t as supportOf } from "../support-view-g4YLBeqX.js";
|
|
9
10
|
import { t as joinTopic } from "../channels-CfcFPuo_.js";
|
|
10
11
|
import { r as toCsv, t as csvColumns } from "../csv-2rXGPNtP.js";
|
|
11
|
-
import { A as suspendAccount, C as shouldRefresh, D as SERVER_EVENT_SOURCE, E as defineAuthorizationHooks, O as endSessions, S as shouldCheckSession, T as serverCore, a as unexpectedResponse, b as isPrefetch, c as extendServer, d as clearSupportCookie, f as supportCookie, h as TENANT_HEADER, i as resolveToken, j as deleteAccount, k as lastSignIns, l as supportStorage, m as supportCookieValue, n as flushEvents, o as withFlush, r as handle, s as createServer, u as SUPPORT_COOKIE, x as refreshFor, y as withSession } from "../adapter-
|
|
12
|
+
import { A as suspendAccount, C as shouldRefresh, D as SERVER_EVENT_SOURCE, E as defineAuthorizationHooks, O as endSessions, S as shouldCheckSession, T as serverCore, a as unexpectedResponse, b as isPrefetch, c as extendServer, d as clearSupportCookie, f as supportCookie, h as TENANT_HEADER, i as resolveToken, j as deleteAccount, k as lastSignIns, l as supportStorage, m as supportCookieValue, n as flushEvents, o as withFlush, r as handle, s as createServer, u as SUPPORT_COOKIE, x as refreshFor, y as withSession } from "../adapter-D4aNBxhm.js";
|
|
12
13
|
import { n as PRIMARY_COOKIE } from "../replicas-Dyoh3CEg.js";
|
|
13
14
|
import { t as authContext } from "../context-DBicfUNz.js";
|
|
14
15
|
import { r as PERMISSION_CAP_CLAIM } from "../delegation-DGOIiT8k.js";
|
|
15
16
|
import { a as refreshSession, c as AUTH_CACHE_HEADERS, g as sessionCookieName, i as resolveAuth, m as readSession, o as clearSessionCookies, s as sessionStatus, t as clientIp, v as writeSession } from "../resolve-B0mW2m7f.js";
|
|
16
17
|
import { i as defineAuthorizer, o as requestMemo, t as bindAuthorizer } from "../authorizer-BGhXaDmo.js";
|
|
17
18
|
import { a as isSessionSnapshot, c as sessionMemo, d as amrOf, f as checkAal, i as authzVersionOf, l as snapshotOf, n as toSession, o as issuedAtOf, s as sessionCacheKey, u as aalOf } from "../view-C8Ve14ja.js";
|
|
18
|
-
import { a as isResult, i as guard, o as respond, s as settle } from "../respond-
|
|
19
|
-
import { a as sqlSupportStore, i as supportSessions, n as passwordGrant, o as supportClaims, r as safeRedirectPath } from "../sign-in-
|
|
20
|
-
import { n as event, t as defineEvents } from "../event-map-CtPFhcOp.js";
|
|
19
|
+
import { a as isResult, i as guard, o as respond, s as settle } from "../respond-CZMWbUs3.js";
|
|
20
|
+
import { a as sqlSupportStore, i as supportSessions, n as passwordGrant, o as supportClaims, r as safeRedirectPath } from "../sign-in-NO7LWlw4.js";
|
|
21
21
|
import { t as subjectReaders } from "../subject-readers-CeeJJOQ4.js";
|
|
22
22
|
import { t as postgresExecutor } from "../executor-C2Ne-Scm.js";
|
|
23
23
|
import { n as jwtClaimsOf, r as userClaimsOf, t as authModeOf } from "../claims-DTy6R6my.js";
|
|
24
|
-
import { n as withGuard, t as withBetterSupabase } from "../composite-
|
|
24
|
+
import { n as withGuard, t as withBetterSupabase } from "../composite-CBRbvn5j.js";
|
|
25
25
|
import { c as verifyCompact, t as JwsError } from "../jws-DOgHJKHb.js";
|
|
26
26
|
import { t as jwksSource } from "../jwks-cache-DEsKI0hJ.js";
|
|
27
27
|
import { i as rateLimitPolicyHeader, n as periodSeconds, r as rateLimitHeader, t as isRateLimitPolicyName } from "../ratelimit-headers-kEcXyO3H.js";
|
|
28
|
-
import { t as defineResource } from "../resource-
|
|
28
|
+
import { t as defineResource } from "../resource-BUJcZKiW.js";
|
|
29
29
|
import { i as withServerTiming, n as parseDbStats, r as withDbStats, t as DB_CALLS_HEADER } from "../timing-dypS0nxW.js";
|
|
30
30
|
import { n as tagCache, r as tagFor, t as cacheTagsOf } from "../tags-CIZTqtlY.js";
|
|
31
|
-
import { a as rolesAt, r as hasRole } from "../kit-
|
|
31
|
+
import { a as rolesAt, r as hasRole } from "../kit-Bcd9wYCV.js";
|
|
32
32
|
import { defineMiddleware } from "@supabase/middleware";
|
|
33
33
|
//#region src/server/csv.ts
|
|
34
34
|
function disposition(filename) {
|
|
@@ -4,9 +4,9 @@ import { a as ok, r as err, s as toDbError, t as AsyncResult } from "./result-nt
|
|
|
4
4
|
import { n as validate } from "./standard-BA3mLh6w.js";
|
|
5
5
|
import { o as problemResponse } from "./problem-Bf0cJ7tk.js";
|
|
6
6
|
import { i as sqlIdent } from "./template-Drgg3v2J.js";
|
|
7
|
-
import { t as fromPgError } from "./pg-error-B5QLDcbG.js";
|
|
8
|
-
import { d as clearSupportCookie, f as supportCookie, m as supportCookieValue } from "./adapter-DZJZTY6g.js";
|
|
9
7
|
import { a as emitBlockEvent } from "./block-events-IWAyafO3.js";
|
|
8
|
+
import { t as fromPgError } from "./pg-error-B5QLDcbG.js";
|
|
9
|
+
import { d as clearSupportCookie, f as supportCookie, m as supportCookieValue } from "./adapter-D4aNBxhm.js";
|
|
10
10
|
import { t as cronRoute } from "./cron-route-FjKgRvTY.js";
|
|
11
11
|
import { t as boundedTtlCache } from "./ttl-cache-Bhr9swjT.js";
|
|
12
12
|
//#region src/auth/support.ts
|
package/dist/solid/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { t as clearOnUserChange } from "../user-change-DgWC6RRC.js";
|
|
2
2
|
import { a as createActionRunner, c as liveKey, d as shownCount, f as startBroadcast, i as countSource, l as notJoined, m as startLiveQuery, n as assertInvalidateClient, o as joinPresence, p as startLiveCount, r as callerOf, s as keyed, t as NO_COUNT, u as plainCaller } from "../client-C_mlji5R.js";
|
|
3
3
|
import { t as supportOf } from "../support-view-g4YLBeqX.js";
|
|
4
|
-
import { c as listenToBlockEvents, d as fieldErrorsOf, i as dataTarget, l as blockEnv, n as createDataOne, o as createBlockMutation, s as createBlockQuery, t as createDataList, u as withEnv } from "../data-hooks-
|
|
4
|
+
import { c as listenToBlockEvents, d as fieldErrorsOf, i as dataTarget, l as blockEnv, n as createDataOne, o as createBlockMutation, s as createBlockQuery, t as createDataList, u as withEnv } from "../data-hooks-CdcZfVS1.js";
|
|
5
5
|
import { createComponent, createContext, createEffect, createMemo, createSignal, from, onCleanup, onMount, untrack, useContext } from "solid-js";
|
|
6
6
|
//#region src/solid/context.ts
|
|
7
7
|
const ClientContext = createContext();
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { c as extendServer, n as flushEvents, s as createServer } from "../adapter-
|
|
2
|
-
import { n as defaultExpose } from "../respond-
|
|
3
|
-
import { i as requireCaller, o as runAction } from "../kit-
|
|
1
|
+
import { c as extendServer, n as flushEvents, s as createServer } from "../adapter-D4aNBxhm.js";
|
|
2
|
+
import { n as defaultExpose } from "../respond-CZMWbUs3.js";
|
|
3
|
+
import { i as requireCaller, o as runAction } from "../kit-Bcd9wYCV.js";
|
|
4
4
|
import { i as nitroCloudflareEnv } from "../shared-Bf-I13Ht.js";
|
|
5
|
-
import { i as localsOf, r as frameworkEntry } from "../framework-
|
|
6
|
-
import { r as refusalResponse } from "../refusal-
|
|
5
|
+
import { i as localsOf, r as frameworkEntry } from "../framework-DYEUraqt.js";
|
|
6
|
+
import { r as refusalResponse } from "../refusal-DDlInPff.js";
|
|
7
7
|
import { t as beforeRoute } from "../before-route-B23K2zYU.js";
|
|
8
8
|
//#region src/solid-start/index.ts
|
|
9
9
|
/** SolidStart integration: middleware, guards and server function actions. */
|
package/dist/spec/index.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { t as DescribedFunction } from "../function-contract-DxFNOmsm.js";
|
|
2
2
|
import { C as ModelWebhook, D as ResourceOperation, E as OperationSource, O as SecurityRequirement, S as ModelTag, T as OAuthFlow, _ as ModelResponseOrRef, a as JsonSchema, b as ModelServer, c as ModelChannelOperation, d as ModelInfo, f as ModelMessage, g as ModelResponse, h as ModelParameter, i as JsonObject, k as TableVerb, l as ModelContent, m as ModelOperation, n as DataApiOperation, o as ModelBody, p as ModelMessageTrait, r as HttpMethod, s as ModelChannel, t as ApiModel, u as ModelExample, v as ModelSecurityProfileRequirement, w as ModelWorkflow, x as ModelStep, y as ModelSecurityScheme } from "../model-hwpvole9.js";
|
|
3
|
+
import { a as FormatVersion, c as SpecDiagnostic, d as defineDocumentFormat, i as DocumentOf, l as VersionOf, n as DiagnosticSeverity, o as LowerContext, r as DocumentFormat, s as RenderedOf, t as AnyDocumentFormat, u as VersionStatus } from "../format-u-65igKI.js";
|
|
3
4
|
import { a as ResourcePlan, o as StandardLike, r as ResourceDescription } from "../resource-D8pzB5Qf.js";
|
|
4
5
|
import { t as SPEC_PINS } from "../spec-pins-BZkKfwY8.js";
|
|
5
|
-
import { A as AnyOpenApiDocument, B as OpenApiSecurityRequirement, C as TopicInput, D as DEFAULT_ERRORS, E as CustomSecurity, F as OpenApi33PreviewDocument, H as RenderedOpenApi, I as OpenApiComponents, L as OpenApiDocument, M as OpenApi30Document, N as OpenApi31Document, O as PROBLEM_SCHEMA, P as OpenApi32Document, R as OpenApiDocuments, S as EventsOptions, T as DataApiOptions, V as OpenApiVersion, _ as WorkflowSource, a as OverlayEngine, b as CLOUD_EVENT_TRAIT, c as defineApi, d as BuiltModel, f as ComponentNameContext, g as RouteSpec, h as ResourceInput, i as OpenApiRenderResult, j as OPENAPI_33_PREVIEW_VERSION, k as SecurityPreset, l as ApiOptions, m as OperationIdContext, n as DefineApiOptions, o as RenderOptions, p as EnrichHooks, r as OpenApiRenderOptions, s as RenderResult, t as Api, u as ApiSource, v as BlockEventSchema, w as topicsFrom, x as CloudEventsInput, y as BlockEventSchemas, z as OpenApiInfo } from "../api-
|
|
6
|
-
import { a as FormatVersion, c as SpecDiagnostic, d as defineDocumentFormat, i as DocumentOf, l as VersionOf, n as DiagnosticSeverity, o as LowerContext, r as DocumentFormat, s as RenderedOf, t as AnyDocumentFormat, u as VersionStatus } from "../format-u-65igKI.js";
|
|
6
|
+
import { A as AnyOpenApiDocument, B as OpenApiSecurityRequirement, C as TopicInput, D as DEFAULT_ERRORS, E as CustomSecurity, F as OpenApi33PreviewDocument, H as RenderedOpenApi, I as OpenApiComponents, L as OpenApiDocument, M as OpenApi30Document, N as OpenApi31Document, O as PROBLEM_SCHEMA, P as OpenApi32Document, R as OpenApiDocuments, S as EventsOptions, T as DataApiOptions, V as OpenApiVersion, _ as WorkflowSource, a as OverlayEngine, b as CLOUD_EVENT_TRAIT, c as defineApi, d as BuiltModel, f as ComponentNameContext, g as RouteSpec, h as ResourceInput, i as OpenApiRenderResult, j as OPENAPI_33_PREVIEW_VERSION, k as SecurityPreset, l as ApiOptions, m as OperationIdContext, n as DefineApiOptions, o as RenderOptions, p as EnrichHooks, r as OpenApiRenderOptions, s as RenderResult, t as Api, u as ApiSource, v as BlockEventSchema, w as topicsFrom, x as CloudEventsInput, y as BlockEventSchemas, z as OpenApiInfo } from "../api-CHObZL7m.js";
|
|
7
7
|
//#region src/spec/build.d.ts
|
|
8
8
|
/**
|
|
9
9
|
* Builds the version-neutral API model once per metadata, plugin list, block
|