better-supabase 0.29.0 → 0.31.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-D4aNBxhm.js → adapter-BTbj5N9C.js} +2 -52
- package/dist/ai-sdk/agents/index.d.ts +2 -2
- package/dist/{app-tables-DekyKNQ8.d.ts → app-tables-B2mKMNRQ.d.ts} +1 -1
- package/dist/astro/index.js +2 -2
- package/dist/{authorization-C7nuWMuB.d.ts → authorization-DfEkyFt_.d.ts} +24 -3
- package/dist/{bind-DmUGUsBd.d.ts → bind-DAx0bMSi.d.ts} +2 -2
- package/dist/{block-env-DWtZsqhH.d.ts → block-env-Dz7Caxk0.d.ts} +3 -3
- package/dist/blocks/ai-chat/index.d.ts +3 -3
- package/dist/blocks/announcements/index.d.ts +3 -3
- package/dist/blocks/api-keys/index.d.ts +1 -1
- package/dist/blocks/attachments/index.d.ts +1 -1
- package/dist/blocks/audit/index.d.ts +2 -2
- package/dist/blocks/automations/index.d.ts +1 -1
- package/dist/blocks/billing/index.d.ts +1 -1
- package/dist/blocks/bookings/index.d.ts +1 -1
- package/dist/blocks/calendar/index.d.ts +7 -3
- package/dist/blocks/calendar/index.js +5 -1
- package/dist/blocks/comments/index.d.ts +4 -4
- package/dist/blocks/employees/index.js +1 -4
- package/dist/blocks/entitlements/index.d.ts +2 -2
- package/dist/blocks/forms/index.d.ts +1 -1
- package/dist/blocks/inbox/index.d.ts +4 -4
- package/dist/blocks/index.d.ts +1 -1
- package/dist/blocks/messaging/index.d.ts +4 -4
- package/dist/blocks/mfa/index.d.ts +1 -1
- package/dist/blocks/notifications/index.d.ts +3 -3
- package/dist/blocks/notifications/index.js +5 -43
- package/dist/blocks/onboarding/index.d.ts +1 -1
- package/dist/blocks/organizations/index.d.ts +34 -21
- package/dist/blocks/organizations/index.js +5 -1
- package/dist/blocks/permissions/index.d.ts +32 -3
- package/dist/blocks/permissions/index.js +23 -2
- package/dist/blocks/push/index.d.ts +10 -2
- package/dist/blocks/push/index.js +23 -7
- package/dist/blocks/reactions/index.d.ts +3 -3
- package/dist/blocks/saved-views/index.d.ts +1 -1
- package/dist/blocks/search/index.d.ts +2 -2
- package/dist/blocks/sessions/index.d.ts +1 -1
- package/dist/blocks/settings/index.d.ts +1 -1
- package/dist/blocks/subjects/index.d.ts +1 -1
- package/dist/blocks/tags/index.d.ts +1 -1
- package/dist/blocks/tasks/index.js +1 -1
- package/dist/blocks/teams/index.d.ts +7 -1
- package/dist/blocks/teams/index.js +8 -7
- package/dist/blocks/undo/index.d.ts +1 -1
- package/dist/blocks/usage/index.d.ts +1 -1
- package/dist/blocks/workflow-editor/index.d.ts +3 -3
- package/dist/blocks/workflows/index.d.ts +3 -3
- package/dist/cli/{add-BKkV99g9.js → add-B9wP0YGU.js} +2 -2
- package/dist/cli/{add-CrQ3jS7t.js → add-DjZXKd7X.js} +10 -10
- package/dist/cli/add-ZcEOEK23.js +1 -0
- package/dist/cli/{app-table-files-PnPOpuB4.js → app-table-files-mtvjHa48.js} +2 -2
- package/dist/cli/{backfill-DDDLhinm.js → backfill-Coshdvh_.js} +2 -2
- package/dist/cli/bin.js +1 -1
- package/dist/cli/{blocks-tRfYx_mh.js → blocks-BWCuA0nq.js} +2 -2
- package/dist/cli/{blocks-BCVcjvbm.js → blocks-hiSazThw.js} +1 -1
- package/dist/cli/{cache-DQZ09YOg.js → cache-x2wWAy0h.js} +1 -1
- package/dist/cli/{codemod-HKuwQmi_.js → codemod-BnjV7BpC.js} +210 -11
- package/dist/cli/{command-DIPmo0wh.js → command-CCAwhiOh.js} +6 -0
- package/dist/cli/{completion-DxPxMtyP.js → completion-BJaB84Pe.js} +2 -2
- package/dist/cli/{completion-DyLMSjOD.js → completion-BkUhs1ms.js} +1 -1
- package/dist/cli/{completion-FUgqm2-N.js → completion-DmUVsUVQ.js} +2 -2
- package/dist/cli/{config-BfapErxs.js → config-zId1jkLx.js} +1 -1
- package/dist/cli/{content-mapper-B0ehR7K-.js → content-mapper-DvOSOdTE.js} +2 -2
- package/dist/cli/{db-CWvH1_46.js → db-DXKyVEDF.js} +1 -1
- package/dist/cli/{doctor-CXJOhwLB.js → doctor-Ywy8oJEU.js} +76 -18
- package/dist/cli/env-CNjT_uOV.js +1 -0
- package/dist/cli/{env-BM242BCV.js → env-XMiKvhtV.js} +2 -2
- package/dist/cli/{gen-B7rw4j19.js → gen-B-FbQmG1.js} +14 -14
- package/dist/cli/index.d.ts +1 -1
- package/dist/cli/index.js +7 -7
- package/dist/cli/{init-C1bXXB_P.js → init-fb9e1BKX.js} +9 -9
- package/dist/cli/{keys-V-HcO-21.js → keys-ORiPz1sM.js} +1 -1
- package/dist/cli/{live-PpAh9pAc.js → live-DIt7TP-N.js} +2 -2
- package/dist/cli/{mcp-BRNAchdH.js → mcp-CVWwraga.js} +3 -3
- package/dist/cli/{metadata-dAAKb_kR.js → metadata-CannIjel.js} +3 -3
- package/dist/cli/{migrate-BWYXFnaW.js → migrate-Ht2TzIQF.js} +2 -2
- package/dist/cli/{migration-safety-DGQswWZy.js → migration-safety-nNyB05I-.js} +1 -1
- package/dist/cli/{migrations-Cqk-lJwu.js → migrations-bAd7dpk1.js} +2 -2
- package/dist/cli/{module-migration-8-hMiZtW.js → module-migration-CkNux8dr.js} +2 -2
- package/dist/cli/{moved-DNOtp9LA.js → moved-C3WyRHkA.js} +1 -1
- package/dist/cli/{parse-BPf3kGnc.js → parse-DjHbTaFI.js} +1 -1
- package/dist/cli/{powersync-BWQ-8T3G.js → powersync-B2v0tDwp.js} +100 -7
- package/dist/cli/powersync-D3mAQ6QE.js +1 -0
- package/dist/cli/{print-DSTnq5xz.js → print-CxQ0rBKT.js} +2 -2
- package/dist/cli/{providers-Cjf5iOp5.js → providers-DtI90lSw.js} +1 -1
- package/dist/cli/{remove-CwG8cPv1.js → remove-DYtE4IZ4.js} +6 -6
- package/dist/cli/{render-B18iAdsT.js → render-QGWfEoiB.js} +3 -3
- package/dist/cli/{run-CvPl8iQd.js → run-B5aMwErM.js} +3 -3
- package/dist/cli/{run-C2Yg5MWt.js → run-BNoJKf5I.js} +40 -39
- package/dist/cli/{run-Wx_2Acgv.js → run-DiYX1XEa.js} +8 -8
- package/dist/cli/{seed-CDnL4Tnc.js → seed-C-Hu2n_E.js} +1 -1
- package/dist/cli/seed-Cm-c0BDd.js +1 -0
- package/dist/cli/{shared-BHbtUOvh.js → shared-D_CFi5di.js} +1 -1
- package/dist/cli/{skills-DM3oeIxY.js → skills-D98y0bSB.js} +1 -1
- package/dist/cli/{snapshot-CXgsUPGj.js → snapshot-BlQ4DDcJ.js} +9 -4
- package/dist/cli/{source-B6aMAoEK.js → source-CelMBQMj.js} +1 -1
- package/dist/cli/{spec-EO0TP84d.js → spec-BxcoGE0h.js} +1 -1
- package/dist/cli/{spec-BcYic005.js → spec-iBx1LcYO.js} +3 -3
- package/dist/cli/{sql-layout-CkxDNVEH.js → sql-layout-Dp4Rottt.js} +2 -2
- package/dist/cli/{stack-ClESAZYf.js → stack-B2slzrYH.js} +1 -1
- package/dist/cli/{stack-env-6hS-WEmh.js → stack-env-3ziggrU3.js} +1 -1
- package/dist/cli/{sync-pq6gmlhG.js → sync-BnORI43S.js} +4 -4
- package/dist/cli/{table-dyKddjwo.js → table-D6HUECKI.js} +1 -1
- package/dist/cli/{upgrade-Dp9p7A69.js → upgrade-CR6-WmIc.js} +5 -5
- package/dist/cli/{upgrade-BoHb4h9P.js → upgrade-fz92aCnh.js} +3 -3
- package/dist/cli/{version-CQHFm-ak.js → version-Dz8ZlOuh.js} +1 -1
- package/dist/client/index.d.ts +5 -5
- package/dist/client/native/index.d.ts +4 -4
- package/dist/{composite-CBRbvn5j.js → composite-B4qB6k31.js} +2 -2
- package/dist/config/index.d.ts +2 -2
- package/dist/config/index.js +4 -4
- package/dist/{config-r7njjNgh.js → config-B7g-HDis.js} +3 -3
- package/dist/{config-bqKaPjst.js → config-R0m0fBiD.js} +1 -1
- package/dist/{context-B4TsE2gY.d.ts → context-DWWoP1wK.d.ts} +13 -1
- package/dist/{controller-CtwAsnVV.d.ts → controller-Br9dGKGe.d.ts} +1 -1
- package/dist/{controller-qG-B1eDn.js → controller-W97g2WGG.js} +1 -1
- package/dist/create/index.d.ts +3 -3
- package/dist/create/index.js +3 -3
- package/dist/create/lite/index.d.ts +3 -3
- package/dist/create/lite/index.js +3 -3
- package/dist/delivery-events-DbL8IHIY.js +53 -0
- package/dist/edge/index.js +3 -3
- package/dist/{entitlements-Bw3eYGKJ.d.ts → entitlements-CBjm2lvD.d.ts} +1 -1
- package/dist/eve/index.js +1 -1
- package/dist/expo/index.js +3 -2
- package/dist/{field-errors-DkzFduux.d.ts → field-errors-CEjsMAgd.d.ts} +4 -4
- package/dist/{framework-DYEUraqt.js → framework-CqiZk89W.js} +1 -1
- package/dist/hono/index.js +2 -2
- package/dist/{index-CB66nl14.d.ts → index-Clyd2Goi.d.ts} +1 -1
- package/dist/{index-Cw5gGSP8.d.ts → index-D98bQs8a.d.ts} +7 -7
- package/dist/{index-BNgpz_BV.d.ts → index-DIdPoQtO.d.ts} +2 -2
- package/dist/{index-BxckmAFc.d.ts → index-I8YLxKq8.d.ts} +2 -2
- package/dist/{index-CBQT_nXf.d.ts → index-eRBuKtMt.d.ts} +2 -2
- package/dist/{index-BM6NmKSc.d.ts → index-uIU65iEn.d.ts} +6 -6
- package/dist/{instances-C7qUTjhJ.js → instances-DY_ORk5g.js} +2 -0
- package/dist/mapper/bin.js +5 -5
- package/dist/mcp/index.d.ts +1 -1
- package/dist/mcp/index.js +1 -1
- package/dist/mcp/sdk/index.js +1 -1
- package/dist/next/index.d.ts +155 -13
- package/dist/next/index.js +245 -52
- package/dist/{operations-CqmQrTKw.d.ts → operations-hm1Isvvs.d.ts} +1 -1
- package/dist/{options-C4LuqmdG.js → options-CF6EVF_G.js} +3 -1
- package/dist/{options-COo7_3MX.js → options-DSCW40_5.js} +3 -1
- package/dist/orpc/index.js +2 -1
- package/dist/otel/index.js +4 -4
- package/dist/{ports-6LBgr1Aa.d.ts → ports-DOrPTJzl.d.ts} +1 -1
- package/dist/powersync/index.d.ts +204 -4
- package/dist/powersync/index.js +361 -4
- package/dist/preset/index.d.ts +3 -3
- package/dist/preset/index.js +3 -3
- package/dist/{preset-DCdEnJj9.js → preset-CXhpPmPV.js} +2 -2
- package/dist/{project-C4NA_van.js → project-DJ9Uo0sT.js} +5 -5
- package/dist/{push-token-BXsrJ7W9.d.ts → push-token-B4vcIU4s.d.ts} +1 -1
- package/dist/query/index.d.ts +1 -1
- package/dist/query/index.js +1 -1
- package/dist/react/index.d.ts +5 -5
- package/dist/react/index.js +1 -1
- package/dist/react/native/index.d.ts +1 -1
- package/dist/react/server.d.ts +5 -5
- package/dist/react/server.js +1 -1
- package/dist/{react-CcrQQl0_.js → react-mdVjpewL.js} +2 -2
- package/dist/react-router/index.js +2 -2
- package/dist/realtime/index.d.ts +3 -3
- package/dist/{record-type-DRbnlj5q.js → record-type-BEUyEsFx.js} +2 -2
- package/dist/records/index.d.ts +5 -5
- package/dist/records/index.js +3 -3
- package/dist/{replicas-Dyoh3CEg.js → refresh-DLBgnxjL.js} +51 -1
- package/dist/{resolved-names-iLBOUaib.js → resolved-names-kMRjmSIy.js} +1 -1
- package/dist/{runtime-CoKxZibd.js → runtime-LRJM7UqY.js} +19 -20
- package/dist/server/index.d.ts +3 -3
- package/dist/server/index.js +4 -4
- package/dist/sign-in-BzihC_8k.d.ts +50 -0
- package/dist/{sign-in-NO7LWlw4.js → sign-in-CuZ1Ag7O.js} +136 -26
- package/dist/solid/index.d.ts +5 -5
- package/dist/solid-start/index.js +2 -2
- package/dist/spec/index.js +1 -1
- package/dist/sql/index.d.ts +4 -4
- package/dist/sql/index.js +3 -3
- package/dist/{sql-CoBySj2F.js → sql-DHp0L7zK.js} +680 -333
- package/dist/ssr/index.d.ts +1 -1
- package/dist/svelte/index.d.ts +5 -5
- package/dist/sveltekit/index.js +2 -2
- package/dist/tanstack-start/index.js +2 -2
- package/dist/{tenant-Ded341Qz.d.ts → tenant-FfgNhd5x.d.ts} +1 -1
- package/dist/testing/index.d.ts +13 -4
- package/dist/testing/index.js +17 -15
- package/dist/{timeline-DvXtXq5q.d.ts → timeline-DqEoD8bb.d.ts} +1 -1
- package/dist/{timeline--VU3A1e4.js → timeline-Dz3hO2I6.js} +1 -1
- package/dist/{topic-XDdKzlrn.d.ts → topic-BaUElNw2.d.ts} +1 -1
- package/dist/{types-BFwB-E1j.d.ts → types-CMN0h_Ix.d.ts} +2 -2
- package/dist/vue/index.d.ts +5 -5
- package/dist/{watch-topic-DpN_GEoS.d.ts → watch-topic-BabDTZ-L.d.ts} +1 -1
- package/dist/workflow-sdk/world/index.js +2 -2
- package/dist/{workflow-sdk-CaEw822d.js → workflow-sdk-DJJkP0dT.js} +47 -8
- package/dist/yjs/index.d.ts +1 -1
- package/package.json +1 -1
- package/schemas/config-v1.json +10 -1
- package/schemas/doctor-report-v1.json +2 -0
- package/skills/better-supabase/references/ui-recipes.md +524 -295
- package/skills/better-supabase-api/references/powersync.md +16 -0
- package/skills/better-supabase-auth/SKILL.md +11 -1
- package/dist/cli/add-CwhrRJz5.js +0 -1
- package/dist/cli/env-uqfUbUzk.js +0 -1
- package/dist/cli/powersync-CbYxLsjv.js +0 -1
- package/dist/cli/seed-BOun22-k.js +0 -1
- package/dist/sign-in-CfwJAJJL.d.ts +0 -24
package/dist/records/index.d.ts
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { b as DbError, t as AsyncResult } from "../result-DZeA5KS6.js";
|
|
2
2
|
import { $ as RecordRef } from "../types-CPl9uJ0G.js";
|
|
3
3
|
import { _n as recordBindingWrite, an as RecordBindingDefinition, cn as RecordBindingResult, dn as RecordBindingWriteName, fn as RecordBindingWriteOutput, gn as defineRecordBinding, hn as TimelineItem, in as RecordBindingData, ln as RecordBindingWrite, mn as RecordRowInput, nn as AnyRecordBindingWrite, on as RecordBindingOptions, pn as RecordBindingWrites, rn as RecordBinding, sn as RecordBindingPermissions, tn as AnyRecordBinding, un as RecordBindingWriteInput, vn as recordEventMatches, yn as recordRowInput } from "../define-block-DWVZSZv1.js";
|
|
4
|
-
import { A as BindingBlocks, B as PermissionFlags, C as defineRecordType, D as recordPermissionKeys, E as recordCan, F as LoadBindingsOptions, H as can, I as LoadedBindings, L as bindingCan, M as BindingName, N as BindingOf, O as recordSubject, P as BindingSource, R as countBinding, S as RecordWriteInput, T as plainData, U as permissionFlags, V as PermissionSet, _ as RecordTypeBlocks, b as RecordTypeWriteInput, d as BindingWritesOf, f as Plain, g as RecordType, h as RecordCan, j as BindingCheck, k as recordWriteInput, m as PlainBindings, p as PlainBinding, v as RecordTypePermissions, w as findBindingWrite, x as RecordTypeWriteOutput, y as RecordTypeSpec, z as loadBindings } from "../index-
|
|
5
|
-
import { p as SubscriptionStatus } from "../topic-
|
|
6
|
-
import { n as TopicPort } from "../watch-topic-
|
|
7
|
-
import { n as Controller, t as AuthPort } from "../controller-
|
|
4
|
+
import { A as BindingBlocks, B as PermissionFlags, C as defineRecordType, D as recordPermissionKeys, E as recordCan, F as LoadBindingsOptions, H as can, I as LoadedBindings, L as bindingCan, M as BindingName, N as BindingOf, O as recordSubject, P as BindingSource, R as countBinding, S as RecordWriteInput, T as plainData, U as permissionFlags, V as PermissionSet, _ as RecordTypeBlocks, b as RecordTypeWriteInput, d as BindingWritesOf, f as Plain, g as RecordType, h as RecordCan, j as BindingCheck, k as recordWriteInput, m as PlainBindings, p as PlainBinding, v as RecordTypePermissions, w as findBindingWrite, x as RecordTypeWriteOutput, y as RecordTypeSpec, z as loadBindings } from "../index-uIU65iEn.js";
|
|
5
|
+
import { p as SubscriptionStatus } from "../topic-BaUElNw2.js";
|
|
6
|
+
import { n as TopicPort } from "../watch-topic-BabDTZ-L.js";
|
|
7
|
+
import { n as Controller, t as AuthPort } from "../controller-Br9dGKGe.js";
|
|
8
8
|
import { a as RecordSummaryOptions, c as Subjects, f as MyWorkKind, i as RecordSummary, n as MyWorkItem, r as MyWorkOptions } from "../subjects-CiBNKy2y.js";
|
|
9
|
-
import { a as timelineBindings, c as RecordListCells, d as RecordListQuery, f as RecordListRow, h as defineRecordList, i as loadTimeline, l as RecordListColumn, m as RecordListSpec, n as Timeline, o as RecordList, p as RecordListSource, r as TimelineEntry, s as RecordListCell, t as LoadTimelineOptions, u as RecordListPage } from "../timeline-
|
|
9
|
+
import { a as timelineBindings, c as RecordListCells, d as RecordListQuery, f as RecordListRow, h as defineRecordList, i as loadTimeline, l as RecordListColumn, m as RecordListSpec, n as Timeline, o as RecordList, p as RecordListSource, r as TimelineEntry, s as RecordListCell, t as LoadTimelineOptions, u as RecordListPage } from "../timeline-DqEoD8bb.js";
|
|
10
10
|
import { a as RecordFormOptions, c as recordForm, i as RecordFormInput, n as RecordFormCustomField, o as RecordFormResult, r as RecordFormField, s as RecordFormValues, t as RecordForm } from "../record-form-CubgBrtI.js";
|
|
11
11
|
//#region src/records/controller.d.ts
|
|
12
12
|
interface RecordControllerOptions<B extends BindingBlocks, N extends BindingName<B>> extends LoadBindingsOptions<B, N> {
|
package/dist/records/index.js
CHANGED
|
@@ -4,9 +4,9 @@ import { a as ok, t as AsyncResult } from "../result-ntFBW2p2.js";
|
|
|
4
4
|
import { t as CUSTOM_FIELD_FORM_TYPES } from "../field-formats-C6QKA3UR.js";
|
|
5
5
|
import { i as recordRowInput, n as recordBindingWrite, r as recordEventMatches, t as defineRecordBinding } from "../record-bindings-Z51mGfhB.js";
|
|
6
6
|
import { n as permissionFlags, t as can } from "../permissions-controller-BMsqIE5T.js";
|
|
7
|
-
import { a as recordCan, c as recordWriteInput, d as countBinding, f as findBinding, i as plainData, n as defineRecordType, o as recordPermissionKeys, p as loadBindings, r as findBindingWrite, s as recordSubject, u as bindingCan } from "../record-type-
|
|
8
|
-
import { t as createRecordController } from "../controller-
|
|
9
|
-
import { n as timelineBindings, t as loadTimeline } from "../timeline
|
|
7
|
+
import { a as recordCan, c as recordWriteInput, d as countBinding, f as findBinding, i as plainData, n as defineRecordType, o as recordPermissionKeys, p as loadBindings, r as findBindingWrite, s as recordSubject, u as bindingCan } from "../record-type-BEUyEsFx.js";
|
|
8
|
+
import { t as createRecordController } from "../controller-W97g2WGG.js";
|
|
9
|
+
import { n as timelineBindings, t as loadTimeline } from "../timeline-Dz3hO2I6.js";
|
|
10
10
|
import { t as MY_WORK_KINDS } from "../my-work-kinds-BU3SlA-6.js";
|
|
11
11
|
//#region src/records/list.ts
|
|
12
12
|
/**
|
|
@@ -91,4 +91,54 @@ function routedExecutor(primary, replica, state) {
|
|
|
91
91
|
};
|
|
92
92
|
}
|
|
93
93
|
//#endregion
|
|
94
|
-
|
|
94
|
+
//#region src/server/refresh.ts
|
|
95
|
+
/**
|
|
96
|
+
* A router or browser prefetch, by its request headers: Next.js route and
|
|
97
|
+
* segment prefetches (`next-router-prefetch`, `next-router-segment-prefetch`),
|
|
98
|
+
* Next's middleware prefetch (`x-middleware-prefetch`), and browser and
|
|
99
|
+
* speculation-rules prefetches (`purpose`, `sec-purpose`, `x-moz`).
|
|
100
|
+
*/
|
|
101
|
+
function isPrefetch(request) {
|
|
102
|
+
const h = request.headers;
|
|
103
|
+
return h.has("next-router-prefetch") || h.has("next-router-segment-prefetch") || h.get("x-middleware-prefetch") === "1" || h.get("purpose") === "prefetch" || h.get("x-moz") === "prefetch" || (h.get("sec-purpose")?.includes("prefetch") ?? false);
|
|
104
|
+
}
|
|
105
|
+
const FORM_TYPES = ["application/x-www-form-urlencoded", "multipart/form-data"];
|
|
106
|
+
/**
|
|
107
|
+
* Whether a request should refresh an expired session cookie: page loads,
|
|
108
|
+
* client navigations (`rsc`, `x-sveltekit-*`, `_data` loaders), form posts and
|
|
109
|
+
* Server Actions. Prefetches, assets and `fetch` calls from scripts read the
|
|
110
|
+
* session as it is, so a burst of parallel requests never races on the
|
|
111
|
+
* single-use refresh token.
|
|
112
|
+
*/
|
|
113
|
+
function shouldRefresh(request) {
|
|
114
|
+
const h = request.headers;
|
|
115
|
+
if (request.method !== "GET" && request.method !== "HEAD") {
|
|
116
|
+
if (h.has("next-action") || h.has("x-sveltekit-action")) return true;
|
|
117
|
+
if (h.get("sec-fetch-dest") === "document") return true;
|
|
118
|
+
const type = h.get("content-type") ?? "";
|
|
119
|
+
return FORM_TYPES.some((form) => type.startsWith(form));
|
|
120
|
+
}
|
|
121
|
+
if (isPrefetch(request)) return false;
|
|
122
|
+
if (h.get("rsc") === "1") return true;
|
|
123
|
+
const dest = h.get("sec-fetch-dest");
|
|
124
|
+
if (dest) return dest === "document";
|
|
125
|
+
return h.get("accept")?.includes("text/html") ?? false;
|
|
126
|
+
}
|
|
127
|
+
/**
|
|
128
|
+
* Whether a request should ask the Auth server if the session still exists
|
|
129
|
+
* (`checkSession`): full page loads, and `paths` you list for client
|
|
130
|
+
* navigations. Never prefetches or mutations.
|
|
131
|
+
*/
|
|
132
|
+
function shouldCheckSession(request, paths) {
|
|
133
|
+
if (request.method !== "GET" && request.method !== "HEAD") return false;
|
|
134
|
+
if (isPrefetch(request)) return false;
|
|
135
|
+
if (request.headers.get("sec-fetch-dest") === "document") return true;
|
|
136
|
+
return paths?.includes(new URL(request.url).pathname) ?? false;
|
|
137
|
+
}
|
|
138
|
+
/** `policy` for one request. */
|
|
139
|
+
function refreshFor(policy, request) {
|
|
140
|
+
if (policy === void 0 || typeof policy === "boolean") return policy;
|
|
141
|
+
return policy === "navigation" ? shouldRefresh(request) : policy(request);
|
|
142
|
+
}
|
|
143
|
+
//#endregion
|
|
144
|
+
export { DEFAULT_PIN_MS as a, primaryCookieWrite as c, withPrimaryPin as d, shouldRefresh as i, replicaState as l, refreshFor as n, PRIMARY_COOKIE as o, shouldCheckSession as r, pinnedUntil as s, isPrefetch as t, routedExecutor as u };
|
|
@@ -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 { L as tenantNameOf } from "./instances-
|
|
2
|
+
import { L as tenantNameOf } from "./instances-DY_ORk5g.js";
|
|
3
3
|
//#region src/config/defaults.ts
|
|
4
4
|
/**
|
|
5
5
|
* Every default `resolveConfig` fills in. Other modules (the SQL module
|
|
@@ -1,28 +1,27 @@
|
|
|
1
|
+
import { t as importOptionalPeer } from "./optional-peer-C1NbBRJm.js";
|
|
1
2
|
//#region src/lite/runtime.ts
|
|
2
3
|
const LITE_INSTALL = "Supabase Lite is an optional peer: install it with `pnpm add -D @supabase/lite`";
|
|
3
4
|
/**
|
|
4
|
-
* `@supabase/lite` is an optional peer
|
|
5
|
-
*
|
|
6
|
-
* how to
|
|
5
|
+
* `@supabase/lite` is an optional peer, loaded through `importOptionalPeer` so
|
|
6
|
+
* bundlers leave it out (a literal specifier, even in a `const`, is resolved by
|
|
7
|
+
* Turbopack). A missing install returns `undefined` so callers can say how to
|
|
8
|
+
* add it.
|
|
7
9
|
*/
|
|
8
10
|
async function loadLite() {
|
|
9
|
-
const root =
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
} catch {
|
|
24
|
-
return;
|
|
25
|
-
}
|
|
11
|
+
const [root, pg, sq] = await Promise.all([
|
|
12
|
+
importOptionalPeer("@supabase/lite"),
|
|
13
|
+
importOptionalPeer("@supabase/lite/pglite"),
|
|
14
|
+
importOptionalPeer("@supabase/lite/sqlite")
|
|
15
|
+
]);
|
|
16
|
+
if (root === void 0 || pg === void 0 || sq === void 0) return;
|
|
17
|
+
const { App } = root;
|
|
18
|
+
const pglite = pg;
|
|
19
|
+
const sqlite = sq;
|
|
20
|
+
return {
|
|
21
|
+
App,
|
|
22
|
+
createPgliteConnection: () => pglite.createPgliteConnection(),
|
|
23
|
+
createSqliteConnection: (url) => sqlite.createConnection({ url })
|
|
24
|
+
};
|
|
26
25
|
}
|
|
27
26
|
/** Applies migrations, then declarative schemas, with Lite's migrator. */
|
|
28
27
|
async function migrateLite(connection, sql) {
|
package/dist/server/index.d.ts
CHANGED
|
@@ -13,7 +13,7 @@ import { A as isSessionSnapshot, C as DeleteAccountResult, D as SessionMemoStats
|
|
|
13
13
|
import { n as Impersonator, r as impersonatorOf, t as ImpersonationOptions } from "../impersonation-YTa9dZUv.js";
|
|
14
14
|
import { a as checkAal, i as amrOf, n as AmrEntry, r as aalOf, t as Aal } from "../mfa-oIOYTpvc.js";
|
|
15
15
|
import { _ as SupportAuthorize, a as AutomationHooks, b as TicketSubject, c as ChatActionHook, d as IdentityRef, f as IdentityTarget, g as SubscriberPolicy, h as SubscriberEvent, i as AuthorizationHooks, l as DelegationPermissions, m as Subscriber, n as Approver, o as AutomationRef, p as PrincipalByIdentity, r as ApproverOf, s as ChatAction, t as ApprovalRequestRef, u as DelegationRef, v as SupportAuthorizeInput, x as defineAuthorizationHooks, y as SupportDecision } from "../authorization-hooks-BWhkMZfH.js";
|
|
16
|
-
import { c as RealtimeClient } from "../topic-
|
|
16
|
+
import { c as RealtimeClient } from "../topic-BaUElNw2.js";
|
|
17
17
|
import { n as toSession, t as AuthSession } from "../view-C8_xvD-j.js";
|
|
18
18
|
import { C as SupportSessionStore, E as supportClaims, S as SupportSession, T as sqlSupportStore, _ as SupportCallerClaims, a as SupportPolicy, b as SupportRequest, c as supportSessions, d as clearSupportCookie, f as supportCookie, g as SupportApprover, h as SupportApprovalQuery, i as SupportOptions, l as SUPPORT_COOKIE, m as SqlSupportStoreOptions, n as SupportApi, o as SupportSessions, p as supportCookieValue, r as SupportExpireRouteOptions, s as SupportStartRequest, t as ActiveSupport, u as SupportCookieOptions, v as SupportEndedBy, w as SupportStartInput, x as SupportRequestInput, y as SupportListFilter } from "../support-BxyPOFk4.js";
|
|
19
19
|
import { a as serverCore, i as ServerCore, n as SessionEntryConfig, r as withSession, t as AuthOutageHook } from "../session-BOzx2qHC.js";
|
|
@@ -26,9 +26,9 @@ import { i as JwsAlgorithm, n as Jwks, r as JwksOfOptions } from "../jws-D0toeQl
|
|
|
26
26
|
import { i as ResourcePagination } from "../resource-WxN0IsvB.js";
|
|
27
27
|
import { a as ResourceHandler, c as ResourceList, l as ResourceRouteOptions, s as ResourceInput } from "../resource-types-BVbHgTPg.js";
|
|
28
28
|
import { a as claimsFingerprint, i as SessionWatchStatus, n as SessionStatusRouteOptions, o as sessionStatusRoute, r as SessionStatusServer, t as SessionStatusBody } from "../session-status-BP8eYVnA.js";
|
|
29
|
-
import { i as tagFor, n as cacheTagsOf, r as tagCache, t as TagOptions } from "../tags-Cm48BsOa.js";
|
|
30
29
|
import { n as RefreshOutcome, r as refreshSession } from "../refresh-D02Pbf5B.js";
|
|
31
|
-
import {
|
|
30
|
+
import { i as PasswordGrantOptions, o as passwordGrant, s as safeRedirectPath } from "../sign-in-BzihC_8k.js";
|
|
31
|
+
import { i as tagFor, n as cacheTagsOf, r as tagCache, t as TagOptions } from "../tags-Cm48BsOa.js";
|
|
32
32
|
import { n as supportOf, t as SupportView } from "../support-view-nqUWKHEs.js";
|
|
33
33
|
import { a as sessionStatus, i as clearSessionCookies, n as SessionStatus, o as authContext, r as SessionStatusOptions, t as ClearSessionCookiesOptions } from "../ended-EZzN9QTM.js";
|
|
34
34
|
import { SupabaseClient } from "@supabase/supabase-js";
|
package/dist/server/index.js
CHANGED
|
@@ -9,19 +9,19 @@ import { i as userContext, r as impersonatorOf } from "../impersonation-DM3oWNoD
|
|
|
9
9
|
import { t as supportOf } from "../support-view-g4YLBeqX.js";
|
|
10
10
|
import { t as joinTopic } from "../channels-CfcFPuo_.js";
|
|
11
11
|
import { r as toCsv, t as csvColumns } from "../csv-2rXGPNtP.js";
|
|
12
|
-
import {
|
|
13
|
-
import { n as PRIMARY_COOKIE } from "../
|
|
12
|
+
import { C as SERVER_EVENT_SOURCE, D as deleteAccount, E as suspendAccount, S as defineAuthorizationHooks, T as lastSignIns, a as unexpectedResponse, c as extendServer, d as clearSupportCookie, f as supportCookie, h as TENANT_HEADER, i as resolveToken, l as supportStorage, m as supportCookieValue, n as flushEvents, o as withFlush, r as handle, s as createServer, u as SUPPORT_COOKIE, w as endSessions, x as serverCore, y as withSession } from "../adapter-BTbj5N9C.js";
|
|
13
|
+
import { i as shouldRefresh, n as refreshFor, o as PRIMARY_COOKIE, r as shouldCheckSession, t as isPrefetch } from "../refresh-DLBgnxjL.js";
|
|
14
14
|
import { t as authContext } from "../context-DBicfUNz.js";
|
|
15
15
|
import { r as PERMISSION_CAP_CLAIM } from "../delegation-DGOIiT8k.js";
|
|
16
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";
|
|
17
17
|
import { i as defineAuthorizer, o as requestMemo, t as bindAuthorizer } from "../authorizer-BGhXaDmo.js";
|
|
18
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";
|
|
19
19
|
import { a as isResult, i as guard, o as respond, s as settle } from "../respond-CZMWbUs3.js";
|
|
20
|
-
import {
|
|
20
|
+
import { d as supportSessions, f as sqlSupportStore, o as passwordGrant, p as supportClaims, u as safeRedirectPath } from "../sign-in-CuZ1Ag7O.js";
|
|
21
21
|
import { t as subjectReaders } from "../subject-readers-VHcrWhmq.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-B4qB6k31.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";
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { f as Result } from "./result-DZeA5KS6.js";
|
|
2
|
+
import { _ as StoredSession } from "./resolve-CtX6T0c0.js";
|
|
3
|
+
import { t as RefreshOptions } from "./refresh-D02Pbf5B.js";
|
|
4
|
+
//#region src/auth/sign-in.d.ts
|
|
5
|
+
/**
|
|
6
|
+
* `next` when it is a same-origin path (`/dashboard?tab=1`), else `fallback`.
|
|
7
|
+
* Use it on any `?next=` or `redirectTo` value a request carries, so the value
|
|
8
|
+
* can't send the user to another origin.
|
|
9
|
+
*/
|
|
10
|
+
declare function safeRedirectPath(next: string | null | undefined, fallback: string): string;
|
|
11
|
+
type PasswordGrantOptions = Omit<RefreshOptions, "now"> & {
|
|
12
|
+
readonly now?: () => number;
|
|
13
|
+
};
|
|
14
|
+
/** The email link and code types `/auth/v1/verify` accepts. */
|
|
15
|
+
type EmailOtpType = "signup" | "invite" | "magiclink" | "recovery" | "email_change" | "email";
|
|
16
|
+
/** A link's `token_hash`, or the email and the code Auth sent to it. */
|
|
17
|
+
type OtpParams = {
|
|
18
|
+
readonly type: EmailOtpType;
|
|
19
|
+
readonly tokenHash: string;
|
|
20
|
+
} | {
|
|
21
|
+
readonly type: EmailOtpType;
|
|
22
|
+
readonly email: string;
|
|
23
|
+
readonly token: string;
|
|
24
|
+
};
|
|
25
|
+
/** Where `logout` ends sessions: this one, every one, or every other one. */
|
|
26
|
+
type SignOutScope = "local" | "global" | "others";
|
|
27
|
+
/**
|
|
28
|
+
* Signs in with an email and a password against the Auth server's password
|
|
29
|
+
* grant, without a supabase-js client. Returns the session to write as
|
|
30
|
+
* cookies.
|
|
31
|
+
*/
|
|
32
|
+
declare function passwordGrant(credentials: {
|
|
33
|
+
readonly email: string;
|
|
34
|
+
readonly password: string;
|
|
35
|
+
}, options: PasswordGrantOptions): Promise<Result<StoredSession>>;
|
|
36
|
+
interface AuthorizeUrlParams {
|
|
37
|
+
/** The OAuth provider, such as `github` or `google`. */
|
|
38
|
+
readonly provider: string;
|
|
39
|
+
/**
|
|
40
|
+
* The absolute URL of the callback route that calls `exchangeCode`. It must
|
|
41
|
+
* be in the project's redirect allow list.
|
|
42
|
+
*/
|
|
43
|
+
readonly redirectTo: string;
|
|
44
|
+
/** Space-separated provider scopes. */
|
|
45
|
+
readonly scopes?: string;
|
|
46
|
+
/** Extra query parameters for the provider, such as `prompt`. */
|
|
47
|
+
readonly queryParams?: Readonly<Record<string, string>>;
|
|
48
|
+
}
|
|
49
|
+
//#endregion
|
|
50
|
+
export { SignOutScope as a, PasswordGrantOptions as i, EmailOtpType as n, passwordGrant as o, OtpParams as r, safeRedirectPath as s, AuthorizeUrlParams as t };
|
|
@@ -6,7 +6,7 @@ import { o as problemResponse } from "./problem-Bf0cJ7tk.js";
|
|
|
6
6
|
import { i as sqlIdent } from "./template-Drgg3v2J.js";
|
|
7
7
|
import { a as emitBlockEvent } from "./block-events-IWAyafO3.js";
|
|
8
8
|
import { t as fromPgError } from "./pg-error-B5QLDcbG.js";
|
|
9
|
-
import { d as clearSupportCookie, f as supportCookie, m as supportCookieValue } from "./adapter-
|
|
9
|
+
import { d as clearSupportCookie, f as supportCookie, m as supportCookieValue } from "./adapter-BTbj5N9C.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
|
|
@@ -561,48 +561,158 @@ function needsMfa(session) {
|
|
|
561
561
|
const factors = user.factors;
|
|
562
562
|
return Array.isArray(factors) && factors.some((factor) => typeof factor === "object" && factor !== null && "status" in factor && factor.status === "verified");
|
|
563
563
|
}
|
|
564
|
+
function failure(status, body, what) {
|
|
565
|
+
const code = typeof body?.["error_code"] === "string" ? body["error_code"] : void 0;
|
|
566
|
+
if (status === 429) return dbError("rate_limited", `${what} was rate limited`, code === void 0 ? {} : { code });
|
|
567
|
+
if (status >= 500) return dbError("network", `${what} failed with ${String(status)}`);
|
|
568
|
+
return dbError("unauthorized", `${what} failed`, code === void 0 ? {} : { code });
|
|
569
|
+
}
|
|
564
570
|
/**
|
|
565
|
-
*
|
|
566
|
-
*
|
|
567
|
-
* cookies.
|
|
571
|
+
* One POST to the Auth server, with the secret key and the user's IP when
|
|
572
|
+
* `forwardedFor` is set. Returns the JSON body, `{}` when there is none.
|
|
568
573
|
*/
|
|
569
|
-
async function
|
|
574
|
+
async function authPost(path, body, options, what) {
|
|
570
575
|
const doFetch = options.fetch ?? fetch;
|
|
571
576
|
const signal = AbortSignal.timeout(options.timeoutMs ?? DEFAULT_TIMEOUT_MS);
|
|
572
577
|
let response;
|
|
573
578
|
try {
|
|
574
|
-
response = await doFetch(`${options.url}/auth/v1
|
|
579
|
+
response = await doFetch(`${options.url}/auth/v1/${path}`, {
|
|
575
580
|
method: "POST",
|
|
576
581
|
headers: {
|
|
577
582
|
apikey: options.forwardedFor?.secretKey ?? options.publishableKey,
|
|
578
583
|
"content-type": "application/json",
|
|
579
|
-
...options.forwardedFor ? { "sb-forwarded-for": options.forwardedFor.ip } : {}
|
|
584
|
+
...options.forwardedFor ? { "sb-forwarded-for": options.forwardedFor.ip } : {},
|
|
585
|
+
...options.token ? { authorization: `Bearer ${options.token}` } : {}
|
|
580
586
|
},
|
|
581
|
-
body: JSON.stringify(
|
|
582
|
-
email: credentials.email,
|
|
583
|
-
password: credentials.password
|
|
584
|
-
}),
|
|
587
|
+
...body === void 0 ? {} : { body: JSON.stringify(body) },
|
|
585
588
|
signal
|
|
586
589
|
});
|
|
587
590
|
} catch (cause) {
|
|
588
|
-
return err(signal.aborted ? dbError("timeout",
|
|
591
|
+
return err(signal.aborted ? dbError("timeout", `${what} timed out`) : dbError("network", cause instanceof Error ? cause.message : "fetch failed"));
|
|
589
592
|
}
|
|
590
|
-
const
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
const
|
|
593
|
+
const parsed = await response.json().catch(() => null);
|
|
594
|
+
let json = null;
|
|
595
|
+
if (typeof parsed === "object" && parsed !== null && !Array.isArray(parsed)) json = parsed;
|
|
596
|
+
return response.ok ? ok(json ?? {}) : err(failure(response.status, json, what));
|
|
597
|
+
}
|
|
598
|
+
/** The session in a token response, with `expires_at` filled in. */
|
|
599
|
+
function sessionFrom(body, options, what) {
|
|
600
|
+
if (!body.ok) return body;
|
|
601
|
+
const data = body.data;
|
|
602
|
+
const accessToken = data["access_token"];
|
|
603
|
+
const refreshToken = data["refresh_token"];
|
|
604
|
+
if (typeof accessToken !== "string" || typeof refreshToken !== "string") return err(dbError("unauthorized", `${what} returned no session`, { code: "no_session" }));
|
|
605
|
+
const expiresIn = typeof data["expires_in"] === "number" ? data["expires_in"] : void 0;
|
|
599
606
|
const now = options.now ?? Date.now;
|
|
600
607
|
return ok({
|
|
601
|
-
...
|
|
602
|
-
access_token:
|
|
603
|
-
refresh_token:
|
|
604
|
-
...typeof
|
|
608
|
+
...data,
|
|
609
|
+
access_token: accessToken,
|
|
610
|
+
refresh_token: refreshToken,
|
|
611
|
+
...typeof data["expires_at"] !== "number" && expiresIn !== void 0 ? { expires_at: Math.floor(now() / 1e3) + expiresIn } : {}
|
|
605
612
|
});
|
|
606
613
|
}
|
|
614
|
+
/**
|
|
615
|
+
* Signs in with an email and a password against the Auth server's password
|
|
616
|
+
* grant, without a supabase-js client. Returns the session to write as
|
|
617
|
+
* cookies.
|
|
618
|
+
*/
|
|
619
|
+
async function passwordGrant(credentials, options) {
|
|
620
|
+
return sessionFrom(await authPost("token?grant_type=password", {
|
|
621
|
+
email: credentials.email,
|
|
622
|
+
password: credentials.password
|
|
623
|
+
}, options, "Sign-in"), options, "Sign-in");
|
|
624
|
+
}
|
|
625
|
+
/**
|
|
626
|
+
* Verifies an email link's `token_hash`, or an emailed code, against
|
|
627
|
+
* `/auth/v1/verify` and returns the session it starts.
|
|
628
|
+
*/
|
|
629
|
+
async function otpGrant(params, options) {
|
|
630
|
+
return sessionFrom(await authPost("verify", "tokenHash" in params ? {
|
|
631
|
+
type: params.type,
|
|
632
|
+
token_hash: params.tokenHash
|
|
633
|
+
} : {
|
|
634
|
+
type: params.type,
|
|
635
|
+
email: params.email,
|
|
636
|
+
token: params.token
|
|
637
|
+
}, options, "Verification"), options, "Verification");
|
|
638
|
+
}
|
|
639
|
+
/** Exchanges an OAuth or email `code` and its PKCE verifier for a session. */
|
|
640
|
+
async function pkceGrant(params, options) {
|
|
641
|
+
return sessionFrom(await authPost("token?grant_type=pkce", {
|
|
642
|
+
auth_code: params.code,
|
|
643
|
+
code_verifier: params.verifier
|
|
644
|
+
}, options, "Code exchange"), options, "Code exchange");
|
|
645
|
+
}
|
|
646
|
+
/**
|
|
647
|
+
* Starts an email flow (magic link or code, password reset, sign-up, resend)
|
|
648
|
+
* with a PKCE `challenge`, so the link lands on `redirectTo` with a `?code=`
|
|
649
|
+
* that `pkceGrant` exchanges. Returns the session a sign-up starts when email
|
|
650
|
+
* confirmation is off, else `null`.
|
|
651
|
+
*/
|
|
652
|
+
async function emailFlow(path, params, options) {
|
|
653
|
+
const what = path === "signup" ? "Sign-up" : "Email request";
|
|
654
|
+
const sent = await authPost(`${path}?redirect_to=${encodeURIComponent(params.redirectTo)}`, {
|
|
655
|
+
...params.body,
|
|
656
|
+
code_challenge: params.challenge,
|
|
657
|
+
code_challenge_method: "s256"
|
|
658
|
+
}, options, what);
|
|
659
|
+
return sent.ok && typeof sent.data["access_token"] !== "string" ? ok(null) : sessionFrom(sent, options, what);
|
|
660
|
+
}
|
|
661
|
+
/**
|
|
662
|
+
* Challenges an MFA factor and verifies the code against it, as the user the
|
|
663
|
+
* access token belongs to. Returns the `aal2` session.
|
|
664
|
+
*/
|
|
665
|
+
async function mfaGrant(params, options) {
|
|
666
|
+
const factor = `factors/${encodeURIComponent(params.factorId)}`;
|
|
667
|
+
const withToken = {
|
|
668
|
+
...options,
|
|
669
|
+
token: params.accessToken
|
|
670
|
+
};
|
|
671
|
+
const challenge = await authPost(`${factor}/challenge`, {}, withToken, "MFA challenge");
|
|
672
|
+
if (!challenge.ok) return challenge;
|
|
673
|
+
const challengeId = challenge.data["id"];
|
|
674
|
+
if (typeof challengeId !== "string") return err(dbError("unauthorized", "MFA challenge failed"));
|
|
675
|
+
return sessionFrom(await authPost(`${factor}/verify`, {
|
|
676
|
+
challenge_id: challengeId,
|
|
677
|
+
code: params.code
|
|
678
|
+
}, withToken, "MFA verification"), options, "MFA verification");
|
|
679
|
+
}
|
|
680
|
+
/**
|
|
681
|
+
* Ends the access token's session (`local`), every session of its user
|
|
682
|
+
* (`global`) or every other one (`others`) on the Auth server. A session that
|
|
683
|
+
* is already gone counts as ended.
|
|
684
|
+
*/
|
|
685
|
+
async function revokeSession(accessToken, scope, options) {
|
|
686
|
+
const revoked = await authPost(`logout?scope=${scope}`, void 0, {
|
|
687
|
+
...options,
|
|
688
|
+
token: accessToken
|
|
689
|
+
}, "Sign-out");
|
|
690
|
+
return revoked.ok || revoked.error.kind === "unauthorized" ? ok(null) : revoked;
|
|
691
|
+
}
|
|
692
|
+
function base64url(bytes) {
|
|
693
|
+
let binary = "";
|
|
694
|
+
for (const byte of bytes) binary += String.fromCodePoint(byte);
|
|
695
|
+
return btoa(binary).replaceAll("+", "-").replaceAll("/", "_").replace(/[=]+$/, "");
|
|
696
|
+
}
|
|
697
|
+
/** A PKCE verifier and its S256 challenge (RFC 7636). */
|
|
698
|
+
async function pkcePair() {
|
|
699
|
+
const verifier = base64url(crypto.getRandomValues(/* @__PURE__ */ new Uint8Array(32)));
|
|
700
|
+
const digest = await crypto.subtle.digest("SHA-256", new TextEncoder().encode(verifier));
|
|
701
|
+
return {
|
|
702
|
+
verifier,
|
|
703
|
+
challenge: base64url(new Uint8Array(digest))
|
|
704
|
+
};
|
|
705
|
+
}
|
|
706
|
+
/** The Auth server's `/authorize` URL for a PKCE sign-in with `challenge`. */
|
|
707
|
+
function authorizeUrlFor(url, params, challenge) {
|
|
708
|
+
const target = new URL(`${url}/auth/v1/authorize`);
|
|
709
|
+
for (const [key, value] of Object.entries(params.queryParams ?? {})) target.searchParams.set(key, value);
|
|
710
|
+
target.searchParams.set("provider", params.provider);
|
|
711
|
+
target.searchParams.set("redirect_to", params.redirectTo);
|
|
712
|
+
target.searchParams.set("code_challenge", challenge);
|
|
713
|
+
target.searchParams.set("code_challenge_method", "s256");
|
|
714
|
+
if (params.scopes) target.searchParams.set("scopes", params.scopes);
|
|
715
|
+
return target.href;
|
|
716
|
+
}
|
|
607
717
|
//#endregion
|
|
608
|
-
export {
|
|
718
|
+
export { otpGrant as a, pkcePair as c, supportSessions as d, sqlSupportStore as f, needsMfa as i, revokeSession as l, emailFlow as n, passwordGrant as o, supportClaims as p, mfaGrant as r, pkceGrant as s, authorizeUrlFor as t, safeRedirectPath as u };
|
package/dist/solid/index.d.ts
CHANGED
|
@@ -2,12 +2,12 @@ import { b as DbError } from "../result-DZeA5KS6.js";
|
|
|
2
2
|
import { Ct as Events, D as BlockEventPattern, T as BlockEvent, bt as EventMap, k as BlockEventsMatching } from "../events-B2qbZps6.js";
|
|
3
3
|
import { mt as QuerySpec } from "../define-D8_9X5fZ.js";
|
|
4
4
|
import { tt as TemplateValues } from "../bucket-SvRQwYS4.js";
|
|
5
|
-
import { g as TopicHandlers, m as Topic, p as SubscriptionStatus, r as PresenceMember, t as EventSchemas } from "../topic-
|
|
6
|
-
import { t as AuthSnapshot } from "../bind-
|
|
5
|
+
import { g as TopicHandlers, m as Topic, p as SubscriptionStatus, r as PresenceMember, t as EventSchemas } from "../topic-BaUElNw2.js";
|
|
6
|
+
import { t as AuthSnapshot } from "../bind-DAx0bMSi.js";
|
|
7
7
|
import { t as AuthSession } from "../view-C8_xvD-j.js";
|
|
8
|
-
import { n as Controller } from "../controller-
|
|
9
|
-
import { C as LiveCountSource, D as ProfileOf, E as PresenceTopic, O as UseActionOptions, S as LiveCountHookOptions, T as PresenceHookOptions, _ as ActionResultOf, a as DataRows, b as ClaimsOf, c as DataWrites, d as BlockMutationState, f as BlockQueryActions, g as ActionInputOf, h as BlockRefetchOn, i as DataRow, l as BlockEventSource, m as BlockQueryState, n as DataId, o as DataSource, p as BlockQueryOptions, r as DataListArgs, s as DataState, t as fieldErrorsOf, u as BlockMutationActions, v as ActionState, w as LiveQueryHookOptions, x as ClientLike, y as BroadcastOptions } from "../field-errors-
|
|
10
|
-
import { n as BlockOptions } from "../block-env-
|
|
8
|
+
import { n as Controller } from "../controller-Br9dGKGe.js";
|
|
9
|
+
import { C as LiveCountSource, D as ProfileOf, E as PresenceTopic, O as UseActionOptions, S as LiveCountHookOptions, T as PresenceHookOptions, _ as ActionResultOf, a as DataRows, b as ClaimsOf, c as DataWrites, d as BlockMutationState, f as BlockQueryActions, g as ActionInputOf, h as BlockRefetchOn, i as DataRow, l as BlockEventSource, m as BlockQueryState, n as DataId, o as DataSource, p as BlockQueryOptions, r as DataListArgs, s as DataState, t as fieldErrorsOf, u as BlockMutationActions, v as ActionState, w as LiveQueryHookOptions, x as ClientLike, y as BroadcastOptions } from "../field-errors-CEjsMAgd.js";
|
|
10
|
+
import { n as BlockOptions } from "../block-env-Dz7Caxk0.js";
|
|
11
11
|
import { n as BlockDataOf, r as BlockMethodName, t as BlockArgsOf } from "../block-method-CiVa2G-J.js";
|
|
12
12
|
import { t as SupportView } from "../support-view-nqUWKHEs.js";
|
|
13
13
|
import { SupabaseClient } from "@supabase/supabase-js";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { c as extendServer, n as flushEvents, s as createServer } from "../adapter-
|
|
1
|
+
import { c as extendServer, n as flushEvents, s as createServer } from "../adapter-BTbj5N9C.js";
|
|
2
2
|
import { n as defaultExpose } from "../respond-CZMWbUs3.js";
|
|
3
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-
|
|
5
|
+
import { i as localsOf, r as frameworkEntry } from "../framework-CqiZk89W.js";
|
|
6
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
|
package/dist/spec/index.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { r as isPlainObject } from "../clone-CkG0-hlI.js";
|
|
2
2
|
import { a as methodNotAllowed } from "../problem-Bf0cJ7tk.js";
|
|
3
3
|
import { t as SPEC_PINS } from "../spec-pins-D3zDek-u.js";
|
|
4
|
+
import { n as memoized, t as importOptionalPeer } from "../optional-peer-C1NbBRJm.js";
|
|
4
5
|
import { a as toOpenApi30Schema, n as openapiFormat, o as defineDocumentFormat, r as OPENAPI_33_PREVIEW_VERSION, t as defineApi } from "../api-3C0AWFeP.js";
|
|
5
6
|
import { a as topicsFrom, c as PROBLEM_SCHEMA, d as mergeJson, f as pointerToken, i as safeKey, l as convertStandard, r as CLOUD_EVENT_TRAIT, s as DEFAULT_ERRORS, t as buildApiModel, u as pascal } from "../build-CH2N3Yf0.js";
|
|
6
7
|
import { t as FUNCTION_DESCRIPTOR } from "../function-contract-pEmsaUIf.js";
|
|
7
|
-
import { n as memoized, t as importOptionalPeer } from "../optional-peer-C1NbBRJm.js";
|
|
8
8
|
//#region src/spec/function-route.ts
|
|
9
9
|
function isDescriptor(value) {
|
|
10
10
|
return typeof value === "object" && value !== null && "input" in value;
|
package/dist/sql/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { M as BlockOptionsRegistry, j as BLOCK_OPTION_SCHEMAS, k as resolveBlock } from "../authorization-
|
|
2
|
-
import { A as declaredIndexes, C as OwnView, D as OwnIndex, E as DeclaredView, F as extensionSchema, I as policyGrants, L as rlsTables, M as declaredTables, N as declaredUpdatedAtTriggers, O as PolicyGrant, P as declaredViews, S as BlockSqlUpgrade, T as notNullCheckName, _ as BlockSqlDeprecation, a as BlockSqlContext, ar as DeclaredForeignKey, b as BlockSqlLayout, c as BlockSqlIdType, cr as auditRegistrations, d as MODULE_ID_TYPES, f as contractSignature, g as BlockSqlAccessProvider, h as BlockSql, i as BlockSqlAudit, j as declaredTableColumns, k as declaredColumnTypes, l as BlockSqlNames, m as moduleIdType, n as AuditCategory, o as BlockSqlContractFunction, or as sameTenantLayout, p as isBlockSqlIdType, r as BlockSqlAction, s as BlockSqlEmit, sr as AuditedTable, t as AUDIT_CATEGORIES, u as BlockSqlTableSpec, v as BlockSqlEntitlementsProvider, w as blockSqlVersion, x as BlockSqlTestFile, y as BlockSqlFile } from "../context-
|
|
3
|
-
import { a as appTableEventTypes } from "../app-tables-
|
|
4
|
-
import { $ as MigrationOptionUse, $t as BlockSqlTopic, A as declaredPolicies, At as BlockSqlExtension, B as catalogPolicy, Bt as moduleDataDir, C as isRule, Ct as APP_TABLES_MARKER, D as renderRulePolicy, Dt as instanceFunctions, E as renderRule, Et as DEFAULT_ROLES, F as Policy, Ft as moduleSchemaExtensions, G as readPolicy, Gt as BLOCK_RENAMES, H as policy, Ht as EntityRenamePlan, I as PolicyCommand, It as blockFileState, J as hasColumnAccess, Jt as renamedBlock, K as renderPolicy, Kt as currentBlockName, L as PolicyInput, Lt as isModuleDataFile, M as TENANT_SCOPE_NAMES, Mt as moduleEventTriggers, N as TENANT_SCOPE_POLICY, Nt as moduleHidingColumns, O as rulePolicy, Ot as SQL_MODULES, P as Grant, Pt as modulePermissionKeys, Q as sharedRolesProblems, Qt as upgradePlan, R as ReadPolicy, Rt as moduleFileVersion, S as disallowedPolicyCalls, St as moduleWritesText, T as readRulePolicies, Tt as appTablesFiles, U as readGrants, Ut as EntityRenameStep, V as maskSql, Vt as moduleFilePaths, W as readPolicies, Wt as entityRenamePlan, X as compileReadSet, Xt as InstalledBlock, Y as CompiledReadSet, Yt as BlockSqlUpgradePlan, Z as compileReadSets, Zt as moduleDeprecations, _ as Rule, _t as AdoptedTable, a as setTableFeature, at as templateFunctions, b as RulePolicyInput, bt as adoptedTables, c as BsbComment, ct as tenantsQuery, d as formatBsbComment, dt as sameTenantTrigger, en as customContracts, et as migrationOptionUses, f as parseBsbComment, ft as DataExportPlan, g as ReadRulePolicy, gt as resolveExposeColumns, h as PolicyFunctionsOptions, ht as excludedColumns, i as isTableFeature, it as scopeProblems, j as widenedCommands, jt as BlockSqlPermissionKey, k as appTablePolicyNotes, kt as resolveBlocks, l as BsbTag, lt as expiredFlagsQuery, m as POLICY_FUNCTIONS, mt as dataExportPlan, n as TableFeature, nn as moduleTopics, nt as SCOPE_ID_TYPES, o as tableFeatures, ot as subjectColumns, p as setBsbTag, pt as SECRET_COLUMNS, q as scopePolicyName, qt as formerBlockName, r as createsTable, rn as renderBlocks, rt as resolveProviderSql, s as tableTagComments, st as TenantQuery, t as TABLE_FEATURES, tn as moduleBody, tt as moduleLayout, u as commentOnTableSql, ut as sameTenantColumn, v as RuleOperator, vt as AdoptedView, w as policyFunctionsSql, wt as APP_TABLES_MODULE, x as RuleValue, xt as adoptedViews, y as RulePolicy, yt as adoptedColumnProblems, z as RenderPolicyOptions, zt as sameBlockFile } from "../index-
|
|
1
|
+
import { M as BlockOptionsRegistry, j as BLOCK_OPTION_SCHEMAS, k as resolveBlock } from "../authorization-DfEkyFt_.js";
|
|
2
|
+
import { A as declaredIndexes, C as OwnView, D as OwnIndex, E as DeclaredView, F as extensionSchema, I as policyGrants, L as rlsTables, M as declaredTables, N as declaredUpdatedAtTriggers, O as PolicyGrant, P as declaredViews, S as BlockSqlUpgrade, T as notNullCheckName, _ as BlockSqlDeprecation, a as BlockSqlContext, ar as DeclaredForeignKey, b as BlockSqlLayout, c as BlockSqlIdType, cr as auditRegistrations, d as MODULE_ID_TYPES, f as contractSignature, g as BlockSqlAccessProvider, h as BlockSql, i as BlockSqlAudit, j as declaredTableColumns, k as declaredColumnTypes, l as BlockSqlNames, m as moduleIdType, n as AuditCategory, o as BlockSqlContractFunction, or as sameTenantLayout, p as isBlockSqlIdType, r as BlockSqlAction, s as BlockSqlEmit, sr as AuditedTable, t as AUDIT_CATEGORIES, u as BlockSqlTableSpec, v as BlockSqlEntitlementsProvider, w as blockSqlVersion, x as BlockSqlTestFile, y as BlockSqlFile } from "../context-DWWoP1wK.js";
|
|
3
|
+
import { a as appTableEventTypes } from "../app-tables-B2mKMNRQ.js";
|
|
4
|
+
import { $ as MigrationOptionUse, $t as BlockSqlTopic, A as declaredPolicies, At as BlockSqlExtension, B as catalogPolicy, Bt as moduleDataDir, C as isRule, Ct as APP_TABLES_MARKER, D as renderRulePolicy, Dt as instanceFunctions, E as renderRule, Et as DEFAULT_ROLES, F as Policy, Ft as moduleSchemaExtensions, G as readPolicy, Gt as BLOCK_RENAMES, H as policy, Ht as EntityRenamePlan, I as PolicyCommand, It as blockFileState, J as hasColumnAccess, Jt as renamedBlock, K as renderPolicy, Kt as currentBlockName, L as PolicyInput, Lt as isModuleDataFile, M as TENANT_SCOPE_NAMES, Mt as moduleEventTriggers, N as TENANT_SCOPE_POLICY, Nt as moduleHidingColumns, O as rulePolicy, Ot as SQL_MODULES, P as Grant, Pt as modulePermissionKeys, Q as sharedRolesProblems, Qt as upgradePlan, R as ReadPolicy, Rt as moduleFileVersion, S as disallowedPolicyCalls, St as moduleWritesText, T as readRulePolicies, Tt as appTablesFiles, U as readGrants, Ut as EntityRenameStep, V as maskSql, Vt as moduleFilePaths, W as readPolicies, Wt as entityRenamePlan, X as compileReadSet, Xt as InstalledBlock, Y as CompiledReadSet, Yt as BlockSqlUpgradePlan, Z as compileReadSets, Zt as moduleDeprecations, _ as Rule, _t as AdoptedTable, a as setTableFeature, at as templateFunctions, b as RulePolicyInput, bt as adoptedTables, c as BsbComment, ct as tenantsQuery, d as formatBsbComment, dt as sameTenantTrigger, en as customContracts, et as migrationOptionUses, f as parseBsbComment, ft as DataExportPlan, g as ReadRulePolicy, gt as resolveExposeColumns, h as PolicyFunctionsOptions, ht as excludedColumns, i as isTableFeature, it as scopeProblems, j as widenedCommands, jt as BlockSqlPermissionKey, k as appTablePolicyNotes, kt as resolveBlocks, l as BsbTag, lt as expiredFlagsQuery, m as POLICY_FUNCTIONS, mt as dataExportPlan, n as TableFeature, nn as moduleTopics, nt as SCOPE_ID_TYPES, o as tableFeatures, ot as subjectColumns, p as setBsbTag, pt as SECRET_COLUMNS, q as scopePolicyName, qt as formerBlockName, r as createsTable, rn as renderBlocks, rt as resolveProviderSql, s as tableTagComments, st as TenantQuery, t as TABLE_FEATURES, tn as moduleBody, tt as moduleLayout, u as commentOnTableSql, ut as sameTenantColumn, v as RuleOperator, vt as AdoptedView, w as policyFunctionsSql, wt as APP_TABLES_MODULE, x as RuleValue, xt as adoptedViews, y as RulePolicy, yt as adoptedColumnProblems, z as RenderPolicyOptions, zt as sameBlockFile } from "../index-I8YLxKq8.js";
|
|
5
5
|
export { APP_TABLES_MARKER, APP_TABLES_MODULE, AUDIT_CATEGORIES, type AdoptedTable, type AdoptedView, type AuditCategory, type AuditedTable, BLOCK_OPTION_SCHEMAS, BLOCK_RENAMES, type BlockOptionsRegistry, type BlockSql, type BlockSqlAccessProvider, type BlockSqlAction, type BlockSqlAudit, type BlockSqlContext, type BlockSqlContractFunction, type BlockSqlDeprecation, type BlockSqlEmit, type BlockSqlEntitlementsProvider, type BlockSqlExtension, type BlockSqlFile, type BlockSqlIdType, type BlockSqlLayout, type BlockSqlNames, type BlockSqlPermissionKey, type BlockSqlTableSpec, type BlockSqlTestFile, type BlockSqlTopic, type BlockSqlUpgrade, type BlockSqlUpgradePlan, type BsbComment, type BsbTag, type CompiledReadSet, DEFAULT_ROLES, type DataExportPlan, type DeclaredForeignKey, type DeclaredView, type EntityRenamePlan, type EntityRenameStep, type Grant, type InstalledBlock, MODULE_ID_TYPES, type MigrationOptionUse, type OwnIndex, type OwnView, POLICY_FUNCTIONS, type Policy, type PolicyCommand, type PolicyFunctionsOptions, type PolicyGrant, type PolicyInput, type ReadPolicy, type ReadRulePolicy, type RenderPolicyOptions, type Rule, type RuleOperator, type RulePolicy, type RulePolicyInput, type RuleValue, SCOPE_ID_TYPES, SECRET_COLUMNS, SQL_MODULES, TABLE_FEATURES, TENANT_SCOPE_NAMES, TENANT_SCOPE_POLICY, type TableFeature, type TenantQuery, adoptedColumnProblems, adoptedTables, adoptedViews, appTableEventTypes, appTablePolicyNotes, appTablesFiles, auditRegistrations, blockFileState, blockSqlVersion, catalogPolicy, commentOnTableSql, compileReadSet, compileReadSets, contractSignature, createsTable, currentBlockName, customContracts, dataExportPlan, declaredColumnTypes, declaredIndexes, declaredPolicies, declaredTableColumns, declaredTables, declaredUpdatedAtTriggers, declaredViews, disallowedPolicyCalls, entityRenamePlan, excludedColumns, expiredFlagsQuery, extensionSchema, formatBsbComment, formerBlockName, hasColumnAccess, instanceFunctions, isBlockSqlIdType, isModuleDataFile, isRule, isTableFeature, maskSql, migrationOptionUses, moduleBody, moduleDataDir, moduleDeprecations, moduleEventTriggers, moduleFilePaths, moduleFileVersion, moduleHidingColumns, moduleIdType, moduleLayout, modulePermissionKeys, moduleSchemaExtensions, moduleTopics, moduleWritesText, notNullCheckName, parseBsbComment, policy, policyFunctionsSql, policyGrants, readGrants, readPolicies, readPolicy, readRulePolicies, renamedBlock, renderBlocks, renderPolicy, renderRule, renderRulePolicy, resolveBlock, resolveBlocks, resolveExposeColumns, resolveProviderSql, rlsTables, rulePolicy, sameBlockFile, sameTenantColumn, sameTenantLayout, sameTenantTrigger, scopePolicyName, scopeProblems, setBsbTag, setTableFeature, sharedRolesProblems, subjectColumns, tableFeatures, tableTagComments, templateFunctions, tenantsQuery, upgradePlan, widenedCommands };
|
package/dist/sql/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { I as resolveBlock, h as appTableEventTypes, w as hasColumnAccess } from "../instances-
|
|
1
|
+
import { I as resolveBlock, h as appTableEventTypes, w as hasColumnAccess } from "../instances-DY_ORk5g.js";
|
|
2
2
|
import { c as templateFunctions, o as resolveProviderSql, s as scopeProblems, t as SCOPE_ID_TYPES } from "../access-sql-CTDNuxRv.js";
|
|
3
|
-
import { $ as moduleHidingColumns, A as instanceFunctions, At as extensionSchema, B as widenedCommands, Bt as renderPolicy, C as tenantsQuery, Ct as BLOCK_OPTION_SCHEMAS, D as adoptedTables, Dt as declaredTables, E as adoptedColumnProblems, Et as declaredTableColumns, F as renderBlocks, Ft as maskSql, G as appTablesFiles, H as moduleFilePaths, I as moduleDeprecations, It as policy, J as blockFileState, K as scopePolicyName, L as upgradePlan, Lt as readGrants, M as customContracts, Mt as rlsTables, N as moduleBody, Nt as auditRegistrations, O as adoptedViews, Ot as declaredUpdatedAtTriggers, P as moduleTopics, Pt as catalogPolicy, Q as moduleEventTriggers, R as appTablePolicyNotes, Rt as readPolicies, S as moduleLayout, St as moduleIdType, T as sameTenantLayout, Tt as declaredIndexes, U as APP_TABLES_MARKER, V as moduleDataDir, W as APP_TABLES_MODULE, X as moduleFileVersion, Y as isModuleDataFile, Z as sameBlockFile, _ as renderRulePolicy, _t as renamedBlock, a as tableFeatures, at as TENANT_SCOPE_POLICY, b as compileReadSets, bt as contractSignature, c as formatBsbComment, ct as SECRET_COLUMNS, d as POLICY_FUNCTIONS, dt as sameTenantColumn, et as modulePermissionKeys, f as disallowedPolicyCalls, ft as sameTenantTrigger, g as renderRule, gt as formerBlockName, h as readRulePolicies, ht as currentBlockName, i as setTableFeature, it as TENANT_SCOPE_NAMES, j as entityRenamePlan, jt as policyGrants, k as moduleWritesText, kt as declaredViews, l as parseBsbComment, lt as dataExportPlan, m as policyFunctionsSql, mt as BLOCK_RENAMES, n as createsTable, nt as SQL_MODULES, o as tableTagComments, ot as excludedColumns, p as isRule, pt as migrationOptionUses, q as blockSqlVersion, r as isTableFeature, rt as resolveBlocks, s as commentOnTableSql, st as resolveExposeColumns, t as TABLE_FEATURES, tt as moduleSchemaExtensions, u as setBsbTag, ut as subjectColumns, v as rulePolicy, vt as AUDIT_CATEGORIES, w as expiredFlagsQuery, wt as declaredColumnTypes, x as sharedRolesProblems, xt as isBlockSqlIdType, y as compileReadSet, yt as MODULE_ID_TYPES, z as declaredPolicies, zt as readPolicy } from "../sql-
|
|
4
|
-
import { Z as notNullCheckName, a as DEFAULT_ROLES } from "../workflow-sdk-
|
|
3
|
+
import { $ as moduleHidingColumns, A as instanceFunctions, At as extensionSchema, B as widenedCommands, Bt as renderPolicy, C as tenantsQuery, Ct as BLOCK_OPTION_SCHEMAS, D as adoptedTables, Dt as declaredTables, E as adoptedColumnProblems, Et as declaredTableColumns, F as renderBlocks, Ft as maskSql, G as appTablesFiles, H as moduleFilePaths, I as moduleDeprecations, It as policy, J as blockFileState, K as scopePolicyName, L as upgradePlan, Lt as readGrants, M as customContracts, Mt as rlsTables, N as moduleBody, Nt as auditRegistrations, O as adoptedViews, Ot as declaredUpdatedAtTriggers, P as moduleTopics, Pt as catalogPolicy, Q as moduleEventTriggers, R as appTablePolicyNotes, Rt as readPolicies, S as moduleLayout, St as moduleIdType, T as sameTenantLayout, Tt as declaredIndexes, U as APP_TABLES_MARKER, V as moduleDataDir, W as APP_TABLES_MODULE, X as moduleFileVersion, Y as isModuleDataFile, Z as sameBlockFile, _ as renderRulePolicy, _t as renamedBlock, a as tableFeatures, at as TENANT_SCOPE_POLICY, b as compileReadSets, bt as contractSignature, c as formatBsbComment, ct as SECRET_COLUMNS, d as POLICY_FUNCTIONS, dt as sameTenantColumn, et as modulePermissionKeys, f as disallowedPolicyCalls, ft as sameTenantTrigger, g as renderRule, gt as formerBlockName, h as readRulePolicies, ht as currentBlockName, i as setTableFeature, it as TENANT_SCOPE_NAMES, j as entityRenamePlan, jt as policyGrants, k as moduleWritesText, kt as declaredViews, l as parseBsbComment, lt as dataExportPlan, m as policyFunctionsSql, mt as BLOCK_RENAMES, n as createsTable, nt as SQL_MODULES, o as tableTagComments, ot as excludedColumns, p as isRule, pt as migrationOptionUses, q as blockSqlVersion, r as isTableFeature, rt as resolveBlocks, s as commentOnTableSql, st as resolveExposeColumns, t as TABLE_FEATURES, tt as moduleSchemaExtensions, u as setBsbTag, ut as subjectColumns, v as rulePolicy, vt as AUDIT_CATEGORIES, w as expiredFlagsQuery, wt as declaredColumnTypes, x as sharedRolesProblems, xt as isBlockSqlIdType, y as compileReadSet, yt as MODULE_ID_TYPES, z as declaredPolicies, zt as readPolicy } from "../sql-DHp0L7zK.js";
|
|
4
|
+
import { Z as notNullCheckName, a as DEFAULT_ROLES } from "../workflow-sdk-DJJkP0dT.js";
|
|
5
5
|
export { APP_TABLES_MARKER, APP_TABLES_MODULE, AUDIT_CATEGORIES, BLOCK_OPTION_SCHEMAS, BLOCK_RENAMES, DEFAULT_ROLES, MODULE_ID_TYPES, POLICY_FUNCTIONS, SCOPE_ID_TYPES, SECRET_COLUMNS, SQL_MODULES, TABLE_FEATURES, TENANT_SCOPE_NAMES, TENANT_SCOPE_POLICY, adoptedColumnProblems, adoptedTables, adoptedViews, appTableEventTypes, appTablePolicyNotes, appTablesFiles, auditRegistrations, blockFileState, blockSqlVersion, catalogPolicy, commentOnTableSql, compileReadSet, compileReadSets, contractSignature, createsTable, currentBlockName, customContracts, dataExportPlan, declaredColumnTypes, declaredIndexes, declaredPolicies, declaredTableColumns, declaredTables, declaredUpdatedAtTriggers, declaredViews, disallowedPolicyCalls, entityRenamePlan, excludedColumns, expiredFlagsQuery, extensionSchema, formatBsbComment, formerBlockName, hasColumnAccess, instanceFunctions, isBlockSqlIdType, isModuleDataFile, isRule, isTableFeature, maskSql, migrationOptionUses, moduleBody, moduleDataDir, moduleDeprecations, moduleEventTriggers, moduleFilePaths, moduleFileVersion, moduleHidingColumns, moduleIdType, moduleLayout, modulePermissionKeys, moduleSchemaExtensions, moduleTopics, moduleWritesText, notNullCheckName, parseBsbComment, policy, policyFunctionsSql, policyGrants, readGrants, readPolicies, readPolicy, readRulePolicies, renamedBlock, renderBlocks, renderPolicy, renderRule, renderRulePolicy, resolveBlock, resolveBlocks, resolveExposeColumns, resolveProviderSql, rlsTables, rulePolicy, sameBlockFile, sameTenantColumn, sameTenantLayout, sameTenantTrigger, scopePolicyName, scopeProblems, setBsbTag, setTableFeature, sharedRolesProblems, subjectColumns, tableFeatures, tableTagComments, templateFunctions, tenantsQuery, upgradePlan, widenedCommands };
|