better-supabase 0.7.0 → 0.7.1
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-B-tL8hqg.js → adapter-iKgjHVPx.js} +5 -0
- package/dist/astro/index.d.ts +2 -2
- package/dist/astro/index.js +2 -2
- package/dist/cli/bin.js +1 -1
- package/dist/cli/{doctor-CVdnLahA.js → doctor-DJk0aeBi.js} +3 -3
- package/dist/cli/{gen-AIf4MREI.js → gen-CCMc39Dx.js} +1 -1
- package/dist/cli/gen-DRmzPI75.js +2 -0
- package/dist/cli/index.d.ts +1 -1
- package/dist/cli/index.js +3 -3
- package/dist/cli/{init-Cr6arjXU.js → init-BHuEQrQK.js} +1 -1
- package/dist/cli/{introspect-Bzuv1HHj.js → introspect-DzR2nyQb.js} +1 -1
- package/dist/cli/{run-BO052mki.js → run-BqDPh9UH.js} +6 -6
- package/dist/cli/{version-Bp4fyubI.js → version-59gcepIG.js} +1 -1
- package/dist/{composite-CpHLEo-G.d.ts → composite--yqry7uW.d.ts} +1 -1
- package/dist/{composite-C6I8ZyaF.js → composite-DXVUibdi.js} +1 -1
- package/dist/edge/index.d.ts +1 -1
- package/dist/edge/index.js +3 -3
- package/dist/expo/index.d.ts +1 -1
- package/dist/expo/index.js +2 -2
- package/dist/{framework-KIPvRQJU.d.ts → framework-BmzgK32X.d.ts} +2 -2
- package/dist/{framework-BDCpJI7o.js → framework-a7aRCIqv.js} +1 -1
- package/dist/hono/index.d.ts +1 -1
- package/dist/hono/index.js +2 -2
- package/dist/mcp/index.d.ts +1 -1
- package/dist/mcp/index.js +1 -1
- package/dist/mcp/sdk/index.d.ts +1 -1
- package/dist/mcp/sdk/index.js +1 -1
- package/dist/next/index.d.ts +1 -1
- package/dist/next/index.js +2 -2
- package/dist/orpc/index.d.ts +1 -1
- package/dist/orpc/index.js +1 -1
- package/dist/otel/index.js +5 -5
- package/dist/react-router/index.d.ts +2 -2
- package/dist/react-router/index.js +2 -2
- package/dist/server/index.d.ts +2 -2
- package/dist/server/index.js +3 -3
- package/dist/{server-ZSJ9rCcV.d.ts → server-Bh0EVSwU.d.ts} +18 -0
- package/dist/solid-start/index.d.ts +2 -2
- package/dist/solid-start/index.js +2 -2
- package/dist/sql/index.js +1 -1
- package/dist/{support-DWwzVf-O.js → support-ig_K4PvS.js} +1 -1
- package/dist/sveltekit/index.d.ts +2 -2
- package/dist/sveltekit/index.js +2 -2
- package/dist/tanstack-start/index.d.ts +2 -2
- package/dist/tanstack-start/index.js +2 -2
- package/dist/testing/index.d.ts +1 -1
- package/dist/{version--AolB5ej.js → version-C6OfRAIn.js} +1 -1
- package/package.json +1 -1
- package/skills/better-supabase-auth/SKILL.md +8 -4
- package/dist/cli/gen-DSrahEdX.js +0 -2
|
@@ -203,6 +203,11 @@ function suspendAccount(service, sql, userId, options) {
|
|
|
203
203
|
if (suspended) {
|
|
204
204
|
const refused = await ban(client, userId, options.duration ?? FOREVER);
|
|
205
205
|
if (refused) return err(refused);
|
|
206
|
+
if (options.endSessions !== true) return ok({
|
|
207
|
+
userId,
|
|
208
|
+
suspended,
|
|
209
|
+
ended: 0
|
|
210
|
+
});
|
|
206
211
|
}
|
|
207
212
|
let ended;
|
|
208
213
|
try {
|
package/dist/astro/index.d.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { a as AnyModels, i as AnyFunctions } from "../types-6BdhkmZe.js";
|
|
2
2
|
import { t as BetterSupabase } from "../define-CJJkkr1-.js";
|
|
3
|
-
import { t as BetterServer } from "../server-
|
|
3
|
+
import { t as BetterServer } from "../server-Bh0EVSwU.js";
|
|
4
4
|
import { j as StorageImageOptions } from "../index-D48jVS-N.js";
|
|
5
5
|
import { a as AuthorizedContext, c as Unwrapped, n as ActionParsed, o as BlockActionOptions, r as ActionResult, s as BlockRequireOptions } from "../kit-CkNzZUqv.js";
|
|
6
6
|
import { t as RefusalRedirects } from "../refusal-DhSU2Vvr.js";
|
|
7
|
-
import { n as FrameworkOptions, t as FrameworkLocals } from "../framework-
|
|
7
|
+
import { n as FrameworkOptions, t as FrameworkLocals } from "../framework-BmzgK32X.js";
|
|
8
8
|
import { StandardSchemaV1 } from "@standard-schema/spec";
|
|
9
9
|
//#region src/astro/index.d.ts
|
|
10
10
|
/** The part of Astro's `APIContext` (middleware, pages, endpoints, actions) the integration uses. */
|
package/dist/astro/index.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
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-iKgjHVPx.js";
|
|
2
2
|
import { t as defaultExpose } from "../respond-BUgsXNgk.js";
|
|
3
3
|
import { i as requireCaller, o as runAction } from "../kit-Fm-Fv7q5.js";
|
|
4
4
|
import { t as storageImageUrl } from "../image-url-pIVlO6R1.js";
|
|
5
5
|
import { t as around } from "../shared-CBxosKK3.js";
|
|
6
|
-
import { i as localsOf, r as frameworkEntry } from "../framework-
|
|
6
|
+
import { i as localsOf, r as frameworkEntry } from "../framework-a7aRCIqv.js";
|
|
7
7
|
import { r as refusalResponse } from "../refusal-CeJWxmkH.js";
|
|
8
8
|
//#region src/astro/index.ts
|
|
9
9
|
function runtimeEnv(locals) {
|
package/dist/cli/bin.js
CHANGED
|
@@ -2,12 +2,12 @@ import { a as list, r as defineCliCommand } from "./command-CK14fP91.js";
|
|
|
2
2
|
import { n as CliError } from "./errors-4v4DTtda.js";
|
|
3
3
|
import { i as writeIfChanged, t as display } from "./io-DI1mTdSA.js";
|
|
4
4
|
import { i as plain, r as painter } from "./style-C0NFdJRL.js";
|
|
5
|
-
import { t as VERSION } from "./version-
|
|
5
|
+
import { t as VERSION } from "./version-59gcepIG.js";
|
|
6
6
|
import { s as providerLabel, t as compiledReadSets } from "./read-sets-CETOSFx4.js";
|
|
7
7
|
import { s as stdinDatabaseUrl } from "./config-NiPxAmUF.js";
|
|
8
8
|
import { c as migrationCommand, d as schemaPaths, i as findRepoRoot, l as pgFunctionHooks, p as tomlGet, r as diffEngine, s as httpHooks, u as readSupabaseToml } from "./supabase-toml-B-bIukQF.js";
|
|
9
9
|
import { t as byCodePoint } from "./compare-BmIWVEui.js";
|
|
10
|
-
import { A as exposed, C as MetadataRejectedError, D as accessModule, E as AUTHORIZATION_RULES, F as qualified, I as tableObject, M as lineOf, N as permissionCatalogKeys, O as entitlementsModule, P as policyObject, S as configFor, _ as METADATA_GAPS_TEXT, a as renderFiles, c as loadSnapshot, j as exposedSchemas, k as catalogOf, l as managementTarget, p as snapshotFile, r as readMetadataSnapshot, u as openSource, v as CACHE_DIR } from "./gen-
|
|
10
|
+
import { A as exposed, C as MetadataRejectedError, D as accessModule, E as AUTHORIZATION_RULES, F as qualified, I as tableObject, M as lineOf, N as permissionCatalogKeys, O as entitlementsModule, P as policyObject, S as configFor, _ as METADATA_GAPS_TEXT, a as renderFiles, c as loadSnapshot, j as exposedSchemas, k as catalogOf, l as managementTarget, p as snapshotFile, r as readMetadataSnapshot, u as openSource, v as CACHE_DIR } from "./gen-CCMc39Dx.js";
|
|
11
11
|
import { n as withSpinner } from "./prompts-BNcNfAve.js";
|
|
12
12
|
import { t as connect } from "./db-DOBPt660.js";
|
|
13
13
|
import { n as moduleLayoutFor } from "./sql-layout-D6cphHT3.js";
|
|
@@ -2623,7 +2623,7 @@ const RULES = [
|
|
|
2623
2623
|
code: "BS106",
|
|
2624
2624
|
severity: "error",
|
|
2625
2625
|
title: "Table not granted to the Data API",
|
|
2626
|
-
description: "Supabase no longer grants new tables to anon and authenticated. Without a grant, every Data API request fails with 42501 before RLS runs. Tables in `expose` need the privileges listed there; other tables need `select` for authenticated, except tables with no permissive policy under `sql.modules.grants.options.fromPolicies`, which are service-only. Tables marked `serviceRole` in `tables` must have no grants for either role.",
|
|
2626
|
+
description: "Supabase no longer grants new tables to anon and authenticated. Without a grant, every Data API request fails with 42501 before RLS runs. Tables in `expose` need the privileges listed there; other tables need `select` for authenticated, except tables with RLS on and no permissive policy under `sql.modules.grants.options.fromPolicies`, which are service-only. Tables marked `serviceRole` in `tables` must have no grants for either role.",
|
|
2627
2627
|
check: (context) => {
|
|
2628
2628
|
const auto = context.configToml ? tomlGet(context.configToml.document, ["api", "auto_expose_new_tables"]) : void 0;
|
|
2629
2629
|
const note = auto === false || auto === "false" ? " config.toml sets [api] auto_expose_new_tables = false, so new tables start without grants." : "";
|
|
@@ -2,7 +2,7 @@ import { r as defineCliCommand } from "./command-CK14fP91.js";
|
|
|
2
2
|
import { n as CliError } from "./errors-4v4DTtda.js";
|
|
3
3
|
import { i as writeIfChanged, n as importPath, r as sameText, t as display } from "./io-DI1mTdSA.js";
|
|
4
4
|
import { r as painter } from "./style-C0NFdJRL.js";
|
|
5
|
-
import { t as VERSION } from "./version-
|
|
5
|
+
import { t as VERSION } from "./version-59gcepIG.js";
|
|
6
6
|
import { a as entitlementsMode, c as unsafeKey, i as entitlementRequirements, n as accessProviderMode, o as moduleKeyProblems, r as accessRequirements, s as providerLabel, t as compiledReadSets } from "./read-sets-CETOSFx4.js";
|
|
7
7
|
import { s as stdinDatabaseUrl, t as databaseUrl } from "./config-NiPxAmUF.js";
|
|
8
8
|
import { l as pgFunctionHooks, p as tomlGet, u as readSupabaseToml } from "./supabase-toml-B-bIukQF.js";
|
package/dist/cli/index.d.ts
CHANGED
|
@@ -527,6 +527,6 @@ export declare function emitModule(model: Model, options: EmitOptions): string;
|
|
|
527
527
|
export declare function loadConfig(cwd: string, explicit?: string): Promise<ResolvedConfig>;
|
|
528
528
|
//#endregion
|
|
529
529
|
//#region src/cli/version.d.ts
|
|
530
|
-
export declare const VERSION = "0.7.
|
|
530
|
+
export declare const VERSION = "0.7.1";
|
|
531
531
|
//#endregion
|
|
532
532
|
export type { Catalog, CatalogCheck, CatalogColumn, CatalogColumnGrant, CatalogEnum, CatalogForeignKey, CatalogFunction, CatalogFunctionArg, CatalogGrant, CatalogIndex, CatalogPolicy, CatalogTable, CatalogTrigger, CatalogUnique, CliArgs, CliCommandDef, CliContext, CliEnv, CliErrorCode, CliErrorOptions, CliIo, CliProblem, CliProblemExtensions, Command, CommandContext, CommandResult, ExitCode, ExtrasFunction, ExtrasHook, ExtrasHookFunction, ExtrasTable, ForeignKeyAction, GeneratorMetadata, IntrospectionSource, ManagementSourceOptions, ParsedArgs, Queryable, RunOptions, RunResult, Snapshot, SnapshotBucket, SnapshotExtras };
|
package/dist/cli/index.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { a as list, r as defineCliCommand } from "./command-CK14fP91.js";
|
|
2
2
|
import { n as CliError, t as CLI_ERRORS_URL } from "./errors-4v4DTtda.js";
|
|
3
|
-
import { i as run, n as help, r as registerCommand, t as commandNames } from "./run-
|
|
4
|
-
import { t as VERSION } from "./version-
|
|
3
|
+
import { i as run, n as help, r as registerCommand, t as commandNames } from "./run-BqDPh9UH.js";
|
|
4
|
+
import { t as VERSION } from "./version-59gcepIG.js";
|
|
5
5
|
import { a as loadConfig } from "./config-NiPxAmUF.js";
|
|
6
|
-
import { L as toCatalog, a as renderFiles, b as emitModule, c as loadSnapshot, d as parseSnapshot, f as serializeSnapshot, g as pgSource, h as managementSource, m as introspect, o as runGen, x as buildModel, y as GENERATED_HEADER } from "./gen-
|
|
6
|
+
import { L as toCatalog, a as renderFiles, b as emitModule, c as loadSnapshot, d as parseSnapshot, f as serializeSnapshot, g as pgSource, h as managementSource, m as introspect, o as runGen, x as buildModel, y as GENERATED_HEADER } from "./gen-CCMc39Dx.js";
|
|
7
7
|
//#region src/cli/introspect/from-catalog.ts
|
|
8
8
|
/**
|
|
9
9
|
* Builds a snapshot from catalog records: the inverse of `toCatalog`. Tests
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { a as list, r as defineCliCommand } from "./command-CK14fP91.js";
|
|
2
2
|
import { i as writeIfChanged, t as display } from "./io-DI1mTdSA.js";
|
|
3
|
-
import { t as VERSION } from "./version-
|
|
3
|
+
import { t as VERSION } from "./version-59gcepIG.js";
|
|
4
4
|
import { a as loadConfig, r as findConfig } from "./config-NiPxAmUF.js";
|
|
5
5
|
import { a as findSupabaseRoot, p as tomlGet, r as diffEngine, t as PGDELTA_TABLE, u as readSupabaseToml } from "./supabase-toml-B-bIukQF.js";
|
|
6
6
|
import { t as TYPEGEN_VERSION } from "./typegen-version-DeFbtzYI.js";
|
|
@@ -2,7 +2,7 @@ import { r as defineCliCommand } from "./command-CK14fP91.js";
|
|
|
2
2
|
import { i as writeIfChanged, r as sameText, t as display } from "./io-DI1mTdSA.js";
|
|
3
3
|
import { r as painter } from "./style-C0NFdJRL.js";
|
|
4
4
|
import { t as fileDiff } from "./diff-SjkO5rNr.js";
|
|
5
|
-
import { T as serializeGenerator, c as loadSnapshot, f as serializeSnapshot, s as sourceArgs, t as SOURCE_ARGS, w as restrictSchemas } from "./gen-
|
|
5
|
+
import { T as serializeGenerator, c as loadSnapshot, f as serializeSnapshot, s as sourceArgs, t as SOURCE_ARGS, w as restrictSchemas } from "./gen-CCMc39Dx.js";
|
|
6
6
|
import { n as withSpinner } from "./prompts-BNcNfAve.js";
|
|
7
7
|
import { resolve } from "node:path";
|
|
8
8
|
import { readFile } from "node:fs/promises";
|
|
@@ -2,7 +2,7 @@ import { n as __toESM } from "./rolldown-runtime-BPOCksWG.js";
|
|
|
2
2
|
import { c as parseArgs$2, i as joinRepeated, l as renderUsage, n as cliContext, o as listArgs, s as defineCommand, t as GLOBAL_ARGS, u as runCommand } from "./command-CK14fP91.js";
|
|
3
3
|
import { n as CliError, r as toCliError } from "./errors-4v4DTtda.js";
|
|
4
4
|
import { n as highlight, r as painter } from "./style-C0NFdJRL.js";
|
|
5
|
-
import { t as VERSION } from "./version-
|
|
5
|
+
import { t as VERSION } from "./version-59gcepIG.js";
|
|
6
6
|
import { stripVTControlCharacters } from "node:util";
|
|
7
7
|
import { resolve } from "node:path";
|
|
8
8
|
//#region src/cli/legacy.ts
|
|
@@ -134,11 +134,11 @@ function renderError(error, options) {
|
|
|
134
134
|
//#region src/cli/run.ts
|
|
135
135
|
const COMMANDS = /* @__PURE__ */ new Map([
|
|
136
136
|
["init", {
|
|
137
|
-
load: () => import("./init-
|
|
137
|
+
load: () => import("./init-BHuEQrQK.js").then((m) => m.initCommand),
|
|
138
138
|
description: "Writes better-supabase.config.ts, src/lib/supabase/index.ts and glue for the frameworks in package.json"
|
|
139
139
|
}],
|
|
140
140
|
["add", {
|
|
141
|
-
load: () => import("./init-
|
|
141
|
+
load: () => import("./init-BHuEQrQK.js").then((m) => m.addCommand),
|
|
142
142
|
description: "Adds glue for an integration to an existing project"
|
|
143
143
|
}],
|
|
144
144
|
["env", {
|
|
@@ -154,11 +154,11 @@ const COMMANDS = /* @__PURE__ */ new Map([
|
|
|
154
154
|
description: "Installs the Agent Skills that ship with this version of better-supabase"
|
|
155
155
|
}],
|
|
156
156
|
["gen", {
|
|
157
|
-
load: () => import("./gen-
|
|
157
|
+
load: () => import("./gen-DRmzPI75.js").then((m) => m.genCommand),
|
|
158
158
|
description: "Writes database.types.ts, generated.ts and its metadata module from the database"
|
|
159
159
|
}],
|
|
160
160
|
["introspect", {
|
|
161
|
-
load: () => import("./introspect-
|
|
161
|
+
load: () => import("./introspect-DzR2nyQb.js").then((m) => m.introspectCommand),
|
|
162
162
|
description: "Saves the database schema as a snapshot for offline gen"
|
|
163
163
|
}],
|
|
164
164
|
["openapi", {
|
|
@@ -170,7 +170,7 @@ const COMMANDS = /* @__PURE__ */ new Map([
|
|
|
170
170
|
description: "Renders the fixtures from defineSeed() (better-supabase/testing) to SQL"
|
|
171
171
|
}],
|
|
172
172
|
["doctor", {
|
|
173
|
-
load: () => import("./doctor-
|
|
173
|
+
load: () => import("./doctor-DJk0aeBi.js").then((m) => m.doctorCommand),
|
|
174
174
|
description: "Checks RLS, indexes, drift, auth config and env files; exits 1 on errors, or on warnings with --strict"
|
|
175
175
|
}],
|
|
176
176
|
["sql", {
|
|
@@ -3,7 +3,7 @@ import { a as EventHub } from "./events-DWDhx77e.js";
|
|
|
3
3
|
import { i as CookieScope, s as SessionEncoding } from "./session-ChiXDZdZ.js";
|
|
4
4
|
import { r as AuthState, t as AuthResolution } from "./resolve-ChTYeTEl.js";
|
|
5
5
|
import { b as Db, t as BetterSupabase } from "./define-CJJkkr1-.js";
|
|
6
|
-
import { C as ActiveSupport, i as ServerContext, n as ContextOptions, o as ServerOptions, t as BetterServer, y as ReplicaState } from "./server-
|
|
6
|
+
import { C as ActiveSupport, i as ServerContext, n as ContextOptions, o as ServerOptions, t as BetterServer, y as ReplicaState } from "./server-Bh0EVSwU.js";
|
|
7
7
|
import { d as RefreshPolicy, r as GuardOptions } from "./respond-DprrgyXX.js";
|
|
8
8
|
import { SupabaseClient } from "@supabase/supabase-js";
|
|
9
9
|
import { Entry, SingleKeyEntry } from "@supabase/middleware";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { a as problemResponse } from "./problem-BreOl8b8.js";
|
|
2
|
-
import { C as serverCore, S as withServerContext, _ as withSession, g as withSupport, h as withTenant, s as createServer } from "./adapter-
|
|
2
|
+
import { C as serverCore, S as withServerContext, _ as withSession, g as withSupport, h as withTenant, s as createServer } from "./adapter-iKgjHVPx.js";
|
|
3
3
|
import { s as withPrimaryPin } from "./replicas-CwrYp5Zj.js";
|
|
4
4
|
import { r as guard, t as defaultExpose } from "./respond-BUgsXNgk.js";
|
|
5
5
|
import { a as withAuthMode, i as withAuth, o as withJwtClaims, s as withUserClaims } from "./claims-DDBQT6BK.js";
|
package/dist/edge/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { L as TableKey, a as AnyModels, i as AnyFunctions } from "../types-6BdhkmZe.js";
|
|
2
2
|
import { t as BetterSupabase } from "../define-CJJkkr1-.js";
|
|
3
|
-
import { i as ServerContext, o as ServerOptions, t as BetterServer } from "../server-
|
|
3
|
+
import { i as ServerContext, o as ServerOptions, t as BetterServer } from "../server-Bh0EVSwU.js";
|
|
4
4
|
import { t as AuthSession } from "../view-CF7ihnkg.js";
|
|
5
5
|
import { i as MiddlewareOptions, r as GuardOptions } from "../respond-DprrgyXX.js";
|
|
6
6
|
import { s as BlockRequireOptions } from "../kit-CkNzZUqv.js";
|
package/dist/edge/index.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { n as dbError } from "../errors-B11Duf73.js";
|
|
2
2
|
import { r as err } from "../result-DzUbqgdW.js";
|
|
3
3
|
import { a as problemResponse } from "../problem-BreOl8b8.js";
|
|
4
|
-
import { a as unexpectedResponse, c as extendServer, l as withExtra, n as flushEvents, s as createServer } from "../adapter-
|
|
4
|
+
import { a as unexpectedResponse, c as extendServer, l as withExtra, n as flushEvents, s as createServer } from "../adapter-iKgjHVPx.js";
|
|
5
5
|
import { a as respond, t as defaultExpose } from "../respond-BUgsXNgk.js";
|
|
6
|
-
import { t as withBetterSupabase } from "../composite-
|
|
6
|
+
import { t as withBetterSupabase } from "../composite-DXVUibdi.js";
|
|
7
7
|
import { t as defineResource } from "../resource-BsvzCMlX.js";
|
|
8
8
|
import { i as requireCaller } from "../kit-Fm-Fv7q5.js";
|
|
9
|
-
import { t as EVERY_CALLER } from "../framework-
|
|
9
|
+
import { t as EVERY_CALLER } from "../framework-a7aRCIqv.js";
|
|
10
10
|
import { bufferRequest, pipeline, seedContext } from "@supabase/middleware";
|
|
11
11
|
import { withCors } from "@supabase/middleware/cors";
|
|
12
12
|
//#region src/bridges/edge.ts
|
package/dist/expo/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { a as AnyModels, i as AnyFunctions } from "../types-6BdhkmZe.js";
|
|
2
2
|
import { t as BetterSupabase } from "../define-CJJkkr1-.js";
|
|
3
|
-
import { i as ServerContext, n as ContextOptions, o as ServerOptions, t as BetterServer } from "../server-
|
|
3
|
+
import { i as ServerContext, n as ContextOptions, o as ServerOptions, t as BetterServer } from "../server-Bh0EVSwU.js";
|
|
4
4
|
import { i as MiddlewareOptions, r as GuardOptions } from "../respond-DprrgyXX.js";
|
|
5
5
|
import { t as Validated } from "../shared-DDSjEGDR.js";
|
|
6
6
|
import { AnyEntry, Contributions } from "@supabase/middleware";
|
package/dist/expo/index.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { t as DbException } from "../db-exception-CnWcYPxL.js";
|
|
2
2
|
import { o as toProblem } from "../problem-BreOl8b8.js";
|
|
3
|
-
import { a as unexpectedResponse, c as extendServer, s as createServer, y as refreshFor } from "../adapter-
|
|
3
|
+
import { a as unexpectedResponse, c as extendServer, s as createServer, y as refreshFor } from "../adapter-iKgjHVPx.js";
|
|
4
4
|
import { m as serializeCookie } from "../resolve-tJZY3FEa.js";
|
|
5
5
|
import { a as respond, r as guard, t as defaultExpose } from "../respond-BUgsXNgk.js";
|
|
6
|
-
import { t as withBetterSupabase } from "../composite-
|
|
6
|
+
import { t as withBetterSupabase } from "../composite-DXVUibdi.js";
|
|
7
7
|
import { r as handoffOf } from "../shared-CBxosKK3.js";
|
|
8
8
|
import { bufferRequest, pipeline, seedContext } from "@supabase/middleware";
|
|
9
9
|
import { StatusError, setResponseHeaders } from "expo-server";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { a as AnyModels, i as AnyFunctions } from "./types-6BdhkmZe.js";
|
|
2
|
-
import { o as ServerOptions } from "./server-
|
|
2
|
+
import { o as ServerOptions } from "./server-Bh0EVSwU.js";
|
|
3
3
|
import { t as AuthSession } from "./view-CF7ihnkg.js";
|
|
4
|
-
import { a as SessionEntryConfig, n as BetterSupabaseContributions } from "./composite
|
|
4
|
+
import { a as SessionEntryConfig, n as BetterSupabaseContributions } from "./composite--yqry7uW.js";
|
|
5
5
|
import { t as RefusalRedirects } from "./refusal-DhSU2Vvr.js";
|
|
6
6
|
//#region src/server/framework.d.ts
|
|
7
7
|
/** What the framework factories (`createSvelteKit`, `createReactRouter`, `createTanStackStart`) take. */
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { n as toSession } from "./view-BeFcRV6G.js";
|
|
2
|
-
import { t as withBetterSupabase } from "./composite-
|
|
2
|
+
import { t as withBetterSupabase } from "./composite-DXVUibdi.js";
|
|
3
3
|
//#region src/server/framework.ts
|
|
4
4
|
/** Every caller: the framework factories guard per loader, action or route instead. */
|
|
5
5
|
const EVERY_CALLER = [
|
package/dist/hono/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { L as TableKey, a as AnyModels, i as AnyFunctions } from "../types-6BdhkmZe.js";
|
|
2
2
|
import { r as AuthState } from "../resolve-ChTYeTEl.js";
|
|
3
3
|
import { t as BetterSupabase } from "../define-CJJkkr1-.js";
|
|
4
|
-
import { i as ServerContext, o as ServerOptions, t as BetterServer } from "../server-
|
|
4
|
+
import { i as ServerContext, o as ServerOptions, t as BetterServer } from "../server-Bh0EVSwU.js";
|
|
5
5
|
import { t as AuthSession } from "../view-CF7ihnkg.js";
|
|
6
6
|
import { i as MiddlewareOptions, r as GuardOptions } from "../respond-DprrgyXX.js";
|
|
7
7
|
import { s as BlockRequireOptions } from "../kit-CkNzZUqv.js";
|
package/dist/hono/index.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { r as dbErrorOf } from "../errors-B11Duf73.js";
|
|
2
2
|
import { a as problemResponse } from "../problem-BreOl8b8.js";
|
|
3
|
-
import { a as unexpectedResponse, c as extendServer, n as flushEvents, s as createServer } from "../adapter-
|
|
3
|
+
import { a as unexpectedResponse, c as extendServer, n as flushEvents, s as createServer } from "../adapter-iKgjHVPx.js";
|
|
4
4
|
import { n as toSession } from "../view-BeFcRV6G.js";
|
|
5
5
|
import { a as respond, t as defaultExpose } from "../respond-BUgsXNgk.js";
|
|
6
|
-
import { t as withBetterSupabase } from "../composite-
|
|
6
|
+
import { t as withBetterSupabase } from "../composite-DXVUibdi.js";
|
|
7
7
|
import { t as defineResource } from "../resource-BsvzCMlX.js";
|
|
8
8
|
import { i as requireCaller } from "../kit-Fm-Fv7q5.js";
|
|
9
9
|
import { r as handoffOf } from "../shared-CBxosKK3.js";
|
package/dist/mcp/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { L as TableKey, a as AnyModels, i as AnyFunctions } from "../types-6BdhkmZe.js";
|
|
2
2
|
import { t as BetterSupabase } from "../define-CJJkkr1-.js";
|
|
3
|
-
import { i as ServerContext, o as ServerOptions, t as BetterServer } from "../server-
|
|
3
|
+
import { i as ServerContext, o as ServerOptions, t as BetterServer } from "../server-Bh0EVSwU.js";
|
|
4
4
|
import { r as GuardOptions } from "../respond-DprrgyXX.js";
|
|
5
5
|
import { i as ResourceOperation } from "../index-Bxih3l0u.js";
|
|
6
6
|
import { a as ResourceRouteOptions } from "../resource-IPS5xi9q.js";
|
package/dist/mcp/index.js
CHANGED
|
@@ -4,7 +4,7 @@ import { n as validate } from "../standard-BK0cqJ7y.js";
|
|
|
4
4
|
import { a as problemResponse, o as toProblem } from "../problem-BreOl8b8.js";
|
|
5
5
|
import { t as SPEC_PINS } from "../spec-pins--j6mTok4.js";
|
|
6
6
|
import { t as buildJsonSchema } from "../json-schema-CvER4kgT.js";
|
|
7
|
-
import { c as extendServer, l as withExtra, n as flushEvents, s as createServer } from "../adapter-
|
|
7
|
+
import { c as extendServer, l as withExtra, n as flushEvents, s as createServer } from "../adapter-iKgjHVPx.js";
|
|
8
8
|
import { n as jsonResponse, t as jsonReplacer } from "../json-CEnpTHlZ.js";
|
|
9
9
|
import { o as settle, r as guard, t as defaultExpose } from "../respond-BUgsXNgk.js";
|
|
10
10
|
import { t as defineResource } from "../resource-BsvzCMlX.js";
|
package/dist/mcp/sdk/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { a as AnyModels, i as AnyFunctions } from "../../types-6BdhkmZe.js";
|
|
2
2
|
import { r as AuthState } from "../../resolve-ChTYeTEl.js";
|
|
3
3
|
import { t as BetterSupabase } from "../../define-CJJkkr1-.js";
|
|
4
|
-
import { i as ServerContext$1, o as ServerOptions, t as BetterServer } from "../../server-
|
|
4
|
+
import { i as ServerContext$1, o as ServerOptions, t as BetterServer } from "../../server-Bh0EVSwU.js";
|
|
5
5
|
import { r as GuardOptions, t as AllowedCaller } from "../../respond-DprrgyXX.js";
|
|
6
6
|
import { AuthInfo, CallToolResult, Icon, InputRequiredResult, OAuthTokenVerifier, RegisteredTool, ScopeChallengeHandler, ServerContext, StandardSchemaWithJSON, ToolAnnotations } from "@modelcontextprotocol/server";
|
|
7
7
|
//#region src/mcp/sdk/sdk.d.ts
|
package/dist/mcp/sdk/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { o as delegationOf } from "../../impersonation-DcqaTBHx.js";
|
|
2
|
-
import { c as extendServer, i as resolveToken, l as withExtra, n as flushEvents, s as createServer } from "../../adapter-
|
|
2
|
+
import { c as extendServer, i as resolveToken, l as withExtra, n as flushEvents, s as createServer } from "../../adapter-iKgjHVPx.js";
|
|
3
3
|
import { r as guard } from "../../respond-BUgsXNgk.js";
|
|
4
4
|
import { a as withCors, i as metadataPreflight, n as endpointPreflight, r as isMetadataRequest, t as discovery } from "../../http-DdYadv-o.js";
|
|
5
5
|
import { OAuthError, bearerAuthChallengeResponse, verifyBearerToken } from "@modelcontextprotocol/server";
|
package/dist/next/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { a as AnyModels, i as AnyFunctions } from "../types-6BdhkmZe.js";
|
|
2
2
|
import { r as AuthState } from "../resolve-ChTYeTEl.js";
|
|
3
3
|
import { B as DbStats, K as ReadSet, it as QuerySpec, t as BetterSupabase, u as CacheAdapter } from "../define-CJJkkr1-.js";
|
|
4
|
-
import { A as supportSessions, C as ActiveSupport, D as SupportPolicy, E as SupportOptions, O as SupportSessions, i as ServerContext, k as SupportStartRequest, n as ContextOptions, o as ServerOptions, t as BetterServer } from "../server-
|
|
4
|
+
import { A as supportSessions, C as ActiveSupport, D as SupportPolicy, E as SupportOptions, O as SupportSessions, i as ServerContext, k as SupportStartRequest, n as ContextOptions, o as ServerOptions, t as BetterServer } from "../server-Bh0EVSwU.js";
|
|
5
5
|
import { n as AmrEntry, s as Impersonator, t as Aal } from "../mfa-Daak8ukG.js";
|
|
6
6
|
import { t as tenantOf } from "../tenant-BxNFk9bx.js";
|
|
7
7
|
import { n as toSession, t as AuthSession } from "../view-CF7ihnkg.js";
|
package/dist/next/index.js
CHANGED
|
@@ -9,10 +9,10 @@ import { a as problemResponse } from "../problem-BreOl8b8.js";
|
|
|
9
9
|
import { i as claimsOf } from "../claims-PqzCxaTD.js";
|
|
10
10
|
import { t as supportOf } from "../support-view-g4YLBeqX.js";
|
|
11
11
|
import { t as tenantOf } from "../tenant-I1TEZ_BX.js";
|
|
12
|
-
import { C as serverCore, c as extendServer, l as withExtra, n as flushEvents, p as supportCookieMaxAge, r as handle, s as createServer, t as bearerRequest, v as isPrefetch } from "../adapter-
|
|
12
|
+
import { C as serverCore, c as extendServer, l as withExtra, n as flushEvents, p as supportCookieMaxAge, r as handle, s as createServer, t as bearerRequest, v as isPrefetch } from "../adapter-iKgjHVPx.js";
|
|
13
13
|
import { a as checkAal, n as toSession } from "../view-BeFcRV6G.js";
|
|
14
14
|
import { o as settle, r as guard, t as defaultExpose } from "../respond-BUgsXNgk.js";
|
|
15
|
-
import { t as supportSessions } from "../support-
|
|
15
|
+
import { t as supportSessions } from "../support-ig_K4PvS.js";
|
|
16
16
|
import { r as tagFor, t as cacheTagsOf } from "../tags-B99_U9Pp.js";
|
|
17
17
|
import { n as formDataObject } from "../kit-Fm-Fv7q5.js";
|
|
18
18
|
import { cache } from "react";
|
package/dist/orpc/index.d.ts
CHANGED
|
@@ -3,7 +3,7 @@ import { a as AnyModels, i as AnyFunctions } from "../types-6BdhkmZe.js";
|
|
|
3
3
|
import { r as AuthState } from "../resolve-ChTYeTEl.js";
|
|
4
4
|
import { i as ProblemDetails } from "../problem-DD8LZFjc.js";
|
|
5
5
|
import { t as BetterSupabase } from "../define-CJJkkr1-.js";
|
|
6
|
-
import { i as ServerContext, o as ServerOptions, t as BetterServer } from "../server-
|
|
6
|
+
import { i as ServerContext, o as ServerOptions, t as BetterServer } from "../server-Bh0EVSwU.js";
|
|
7
7
|
import { i as MiddlewareOptions, r as GuardOptions } from "../respond-DprrgyXX.js";
|
|
8
8
|
import { s as BlockRequireOptions } from "../kit-CkNzZUqv.js";
|
|
9
9
|
import { t as Validated } from "../shared-DDSjEGDR.js";
|
package/dist/orpc/index.js
CHANGED
|
@@ -2,7 +2,7 @@ import { r as dbErrorOf } from "../errors-B11Duf73.js";
|
|
|
2
2
|
import { o as toProblem } from "../problem-BreOl8b8.js";
|
|
3
3
|
import { i as claimsOf } from "../claims-PqzCxaTD.js";
|
|
4
4
|
import { t as tenantOf } from "../tenant-I1TEZ_BX.js";
|
|
5
|
-
import { c as extendServer, n as flushEvents, s as createServer, y as refreshFor } from "../adapter-
|
|
5
|
+
import { c as extendServer, n as flushEvents, s as createServer, y as refreshFor } from "../adapter-iKgjHVPx.js";
|
|
6
6
|
import { n as toSession } from "../view-BeFcRV6G.js";
|
|
7
7
|
import { o as settle, r as guard, t as defaultExpose } from "../respond-BUgsXNgk.js";
|
|
8
8
|
import { t as authorizeCaller } from "../kit-Fm-Fv7q5.js";
|
package/dist/otel/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { r as definePlugin } from "../plugin-tfXW1-qO.js";
|
|
2
2
|
import { t as SPEC_PINS } from "../spec-pins--j6mTok4.js";
|
|
3
3
|
import { r as blockEventAttributes } from "../block-events-CrT8r7Fe.js";
|
|
4
|
-
import "../version
|
|
4
|
+
import "../version-C6OfRAIn.js";
|
|
5
5
|
import { SpanKind, SpanStatusCode, context, metrics, propagation, trace } from "@opentelemetry/api";
|
|
6
6
|
//#region src/otel/index.ts
|
|
7
7
|
const INSTRUMENTATION_NAME = "better-supabase";
|
|
@@ -40,9 +40,9 @@ function systemOf(executor) {
|
|
|
40
40
|
* ```
|
|
41
41
|
*/
|
|
42
42
|
function otel(options = {}) {
|
|
43
|
-
const tracer = options.tracer ?? trace.getTracer("better-supabase", "0.7.
|
|
43
|
+
const tracer = options.tracer ?? trace.getTracer("better-supabase", "0.7.1");
|
|
44
44
|
let histogram;
|
|
45
|
-
if (options.metrics !== false) histogram = (options.meter ?? metrics.getMeter("better-supabase", "0.7.
|
|
45
|
+
if (options.metrics !== false) histogram = (options.meter ?? metrics.getMeter("better-supabase", "0.7.1")).createHistogram("db.client.operation.duration", {
|
|
46
46
|
unit: "s",
|
|
47
47
|
description: "Duration of database client operations.",
|
|
48
48
|
advice: { explicitBucketBoundaries: [
|
|
@@ -181,7 +181,7 @@ function otel(options = {}) {
|
|
|
181
181
|
* Returns a function that stops listening.
|
|
182
182
|
*/
|
|
183
183
|
function traceAuth(betterSupabase, options = {}) {
|
|
184
|
-
const tracer = options.tracer ?? trace.getTracer("better-supabase", "0.7.
|
|
184
|
+
const tracer = options.tracer ?? trace.getTracer("better-supabase", "0.7.1");
|
|
185
185
|
const offAuth = betterSupabase.events.on("auth", (event) => {
|
|
186
186
|
const span = tracer.startSpan("auth.resolve", {
|
|
187
187
|
kind: SpanKind.INTERNAL,
|
|
@@ -219,7 +219,7 @@ function traceAuth(betterSupabase, options = {}) {
|
|
|
219
219
|
* set an error status. Returns a function that stops listening.
|
|
220
220
|
*/
|
|
221
221
|
function traceBlockEvents(betterSupabase, options = {}) {
|
|
222
|
-
const tracer = options.tracer ?? trace.getTracer("better-supabase", "0.7.
|
|
222
|
+
const tracer = options.tracer ?? trace.getTracer("better-supabase", "0.7.1");
|
|
223
223
|
return betterSupabase.events.on("block", (event) => {
|
|
224
224
|
const attributes = {
|
|
225
225
|
...options.attributes,
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { a as AnyModels, i as AnyFunctions } from "../types-6BdhkmZe.js";
|
|
2
2
|
import { t as BetterSupabase } from "../define-CJJkkr1-.js";
|
|
3
|
-
import { t as BetterServer } from "../server-
|
|
3
|
+
import { t as BetterServer } from "../server-Bh0EVSwU.js";
|
|
4
4
|
import { a as AuthorizedContext, c as Unwrapped, i as AuthorizeOptions, n as ActionParsed, o as BlockActionOptions, r as ActionResult, s as BlockRequireOptions } from "../kit-CkNzZUqv.js";
|
|
5
5
|
import { t as RefusalRedirects } from "../refusal-DhSU2Vvr.js";
|
|
6
|
-
import { n as FrameworkOptions, t as FrameworkLocals } from "../framework-
|
|
6
|
+
import { n as FrameworkOptions, t as FrameworkLocals } from "../framework-BmzgK32X.js";
|
|
7
7
|
import { t as Validated } from "../shared-DDSjEGDR.js";
|
|
8
8
|
import { AnyEntry, Contributions } from "@supabase/middleware";
|
|
9
9
|
import { StandardSchemaV1 } from "@standard-schema/spec";
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { a as problemResponse } from "../problem-BreOl8b8.js";
|
|
2
|
-
import { c as extendServer, n as flushEvents, s as createServer } from "../adapter-
|
|
2
|
+
import { c as extendServer, n as flushEvents, s as createServer } from "../adapter-iKgjHVPx.js";
|
|
3
3
|
import { o as settle, t as defaultExpose } from "../respond-BUgsXNgk.js";
|
|
4
4
|
import { i as requireCaller, o as runAction } from "../kit-Fm-Fv7q5.js";
|
|
5
5
|
import { n as bufferInPlace, t as around } from "../shared-CBxosKK3.js";
|
|
6
|
-
import { i as localsOf, n as actionInput, r as frameworkEntry } from "../framework-
|
|
6
|
+
import { i as localsOf, n as actionInput, r as frameworkEntry } from "../framework-a7aRCIqv.js";
|
|
7
7
|
import { r as refusalResponse } from "../refusal-CeJWxmkH.js";
|
|
8
8
|
//#region src/bridges/react-router.ts
|
|
9
9
|
/**
|
package/dist/server/index.d.ts
CHANGED
|
@@ -5,11 +5,11 @@ import { _ as writeSession, a as CookieWrite, c as StoredSession, h as sessionCo
|
|
|
5
5
|
import { a as ResolveAuthOptions, c as clientIp, i as InvalidReason, l as resolveAuth, n as AuthResolver, o as ResolvedState, r as AuthState, s as authContext, t as AuthResolution } from "../resolve-ChTYeTEl.js";
|
|
6
6
|
import { c as fromProblem, d as toProblem, i as ProblemDetails, l as isProblem, n as PROBLEM_CONTENT_TYPE, o as ProblemOptions, r as PROBLEM_TYPE_BASE, s as ProblemResponseOptions, u as problemResponse } from "../problem-DD8LZFjc.js";
|
|
7
7
|
import { B as DbStats, b as Db, t as BetterSupabase } from "../define-CJJkkr1-.js";
|
|
8
|
-
import { A as supportSessions, B as SupportSession, C as ActiveSupport, D as SupportPolicy, E as SupportOptions, F as supportCookieValue, H as SupportStartInput, I as SqlSupportStoreOptions, L as SupportCallerClaims, M as SupportCookieOptions, N as clearSupportCookie, O as SupportSessions, P as supportCookie, R as SupportEndedBy, S as deleteAccount, T as SupportAuthorizeInput, U as sqlSupportStore, V as SupportSessionStore, W as supportClaims, _ as RequestIdOptions, a as ServerDbOptions, b as DeleteAccountOptions, c as createServer, d as LastSignIn, f as SuspendAccountOptions, g as suspendAccount, h as lastSignIns, i as ServerContext, j as SUPPORT_COOKIE, k as SupportStartRequest, l as extendServer, m as endSessions, n as ContextOptions, o as ServerOptions, p as SuspendAccountResult, r as ForContextOptions, s as TENANT_HEADER, t as BetterServer, u as EndSessionsResult, v as PRIMARY_COOKIE, w as SupportApi, x as DeleteAccountResult, y as ReplicaState, z as SupportListFilter } from "../server-
|
|
8
|
+
import { A as supportSessions, B as SupportSession, C as ActiveSupport, D as SupportPolicy, E as SupportOptions, F as supportCookieValue, H as SupportStartInput, I as SqlSupportStoreOptions, L as SupportCallerClaims, M as SupportCookieOptions, N as clearSupportCookie, O as SupportSessions, P as supportCookie, R as SupportEndedBy, S as deleteAccount, T as SupportAuthorizeInput, U as sqlSupportStore, V as SupportSessionStore, W as supportClaims, _ as RequestIdOptions, a as ServerDbOptions, b as DeleteAccountOptions, c as createServer, d as LastSignIn, f as SuspendAccountOptions, g as suspendAccount, h as lastSignIns, i as ServerContext, j as SUPPORT_COOKIE, k as SupportStartRequest, l as extendServer, m as endSessions, n as ContextOptions, o as ServerOptions, p as SuspendAccountResult, r as ForContextOptions, s as TENANT_HEADER, t as BetterServer, u as EndSessionsResult, v as PRIMARY_COOKIE, w as SupportApi, x as DeleteAccountResult, y as ReplicaState, z as SupportListFilter } from "../server-Bh0EVSwU.js";
|
|
9
9
|
import { a as checkAal, c as impersonatorOf, i as amrOf, n as AmrEntry, o as ImpersonationOptions, r as aalOf, s as Impersonator, t as Aal } from "../mfa-Daak8ukG.js";
|
|
10
10
|
import { n as SessionActor, r as SessionDelegation, t as ActClaim } from "../actor-CQTlc1Hh.js";
|
|
11
11
|
import { n as toSession, t as AuthSession } from "../view-CF7ihnkg.js";
|
|
12
|
-
import { a as SessionEntryConfig, c as withGuard, i as withBetterSupabase, l as ServerCore, n as BetterSupabaseContributions, o as withSession, r as BetterSupabaseEntry, s as GuardEntryConfig, t as BetterSupabaseConfig, u as serverCore } from "../composite
|
|
12
|
+
import { a as SessionEntryConfig, c as withGuard, i as withBetterSupabase, l as ServerCore, n as BetterSupabaseContributions, o as withSession, r as BetterSupabaseEntry, s as GuardEntryConfig, t as BetterSupabaseConfig, u as serverCore } from "../composite--yqry7uW.js";
|
|
13
13
|
import { a as RespondOptions, c as isResult, d as RefreshPolicy, f as isPrefetch, h as shouldRefresh, i as MiddlewareOptions, l as respond, m as shouldCheckSession, n as AuthKind, o as Settled, p as refreshFor, r as GuardOptions, s as guard, u as settle } from "../respond-DprrgyXX.js";
|
|
14
14
|
import { a as AuthorizedContext, i as AuthorizeOptions, l as hasRole, o as BlockActionOptions, r as ActionResult, s as BlockRequireOptions, u as rolesAt } from "../kit-CkNzZUqv.js";
|
|
15
15
|
import { a as ResourceRouteOptions, i as ResourcePagination, n as ResourceInput, o as defineResource, r as ResourceList, t as ResourceHandler } from "../resource-IPS5xi9q.js";
|
package/dist/server/index.js
CHANGED
|
@@ -4,14 +4,14 @@ import { i as userContext, r as impersonatorOf } from "../impersonation-DcqaTBHx
|
|
|
4
4
|
import { t as supportOf } from "../support-view-g4YLBeqX.js";
|
|
5
5
|
import { n as toCsv, t as csvColumns } from "../csv-DCK-PT1n.js";
|
|
6
6
|
import { n as postgresExecutor } from "../executor-De1Of3m3.js";
|
|
7
|
-
import { C as serverCore, D as suspendAccount, E as lastSignIns, O as deleteAccount, T as endSessions, _ as withSession, a as unexpectedResponse, b as shouldCheckSession, c as extendServer, d as clearSupportCookie, f as supportCookie, i as resolveToken, m as supportCookieValue, n as flushEvents, o as TENANT_HEADER, r as handle, s as createServer, u as SUPPORT_COOKIE, v as isPrefetch, w as SERVER_EVENT_SOURCE, x as shouldRefresh, y as refreshFor } from "../adapter-
|
|
7
|
+
import { C as serverCore, D as suspendAccount, E as lastSignIns, O as deleteAccount, T as endSessions, _ as withSession, a as unexpectedResponse, b as shouldCheckSession, c as extendServer, d as clearSupportCookie, f as supportCookie, i as resolveToken, m as supportCookieValue, n as flushEvents, o as TENANT_HEADER, r as handle, s as createServer, u as SUPPORT_COOKIE, v as isPrefetch, w as SERVER_EVENT_SOURCE, x as shouldRefresh, y as refreshFor } from "../adapter-iKgjHVPx.js";
|
|
8
8
|
import { n as PRIMARY_COOKIE } from "../replicas-CwrYp5Zj.js";
|
|
9
9
|
import { _ as writeSession, a as refreshSession, c as AUTH_CACHE_HEADERS, h as sessionCookieName, i as resolveAuth, n as clientIp, o as clearSessionCookies, p as readSession, s as sessionStatus, t as authContext } from "../resolve-tJZY3FEa.js";
|
|
10
10
|
import { a as checkAal, i as amrOf, n as toSession, r as aalOf } from "../view-BeFcRV6G.js";
|
|
11
11
|
import { a as respond, i as isResult, o as settle, r as guard } from "../respond-BUgsXNgk.js";
|
|
12
|
-
import { n as sqlSupportStore, r as supportClaims, t as supportSessions } from "../support-
|
|
12
|
+
import { n as sqlSupportStore, r as supportClaims, t as supportSessions } from "../support-ig_K4PvS.js";
|
|
13
13
|
import { n as jwtClaimsOf, r as userClaimsOf, t as authModeOf } from "../claims-DDBQT6BK.js";
|
|
14
|
-
import { n as withGuard, t as withBetterSupabase } from "../composite-
|
|
14
|
+
import { n as withGuard, t as withBetterSupabase } from "../composite-DXVUibdi.js";
|
|
15
15
|
import { t as defineResource } from "../resource-BsvzCMlX.js";
|
|
16
16
|
import { i as withServerTiming, n as parseDbStats, r as withDbStats, t as DB_CALLS_HEADER } from "../timing-CyTQPubY.js";
|
|
17
17
|
import { n as tagCache, r as tagFor, t as cacheTagsOf } from "../tags-B99_U9Pp.js";
|
|
@@ -293,11 +293,24 @@ interface EndSessionsResult {
|
|
|
293
293
|
}
|
|
294
294
|
interface SuspendAccountOptions {
|
|
295
295
|
readonly suspended: boolean;
|
|
296
|
+
/** A Go duration for the ban, such as `"24h"`. Defaults to 100 years. */
|
|
296
297
|
readonly duration?: string;
|
|
298
|
+
/**
|
|
299
|
+
* Also end the sessions when suspending. Defaults to `false`: the sessions
|
|
300
|
+
* stay, so Auth answers refresh and `/user` with `user_banned` and the app
|
|
301
|
+
* can show why. Without the `sessions` SQL module, an access token keeps
|
|
302
|
+
* working against the Data API until it expires; set this to end the
|
|
303
|
+
* sessions at once instead.
|
|
304
|
+
*/
|
|
305
|
+
readonly endSessions?: boolean;
|
|
297
306
|
}
|
|
298
307
|
interface SuspendAccountResult {
|
|
299
308
|
readonly userId: string;
|
|
300
309
|
readonly suspended: boolean;
|
|
310
|
+
/**
|
|
311
|
+
* The sessions deleted: `0` on a suspension (unless `endSessions` is set),
|
|
312
|
+
* and the user's remaining sessions when the ban is lifted.
|
|
313
|
+
*/
|
|
301
314
|
readonly ended: number;
|
|
302
315
|
}
|
|
303
316
|
declare function endSessions(sql: SqlClient, userId: string): AsyncResult<EndSessionsResult>;
|
|
@@ -507,6 +520,11 @@ interface BetterServer<M extends AnyModels, F extends AnyFunctions, E, C = unkno
|
|
|
507
520
|
*/
|
|
508
521
|
deleteAccount(userId: string, options?: DeleteAccountOptions): AsyncResult<DeleteAccountResult>;
|
|
509
522
|
endSessions(userId: string): AsyncResult<EndSessionsResult>;
|
|
523
|
+
/**
|
|
524
|
+
* Bans the user in Auth and keeps their sessions, so Auth answers with
|
|
525
|
+
* `user_banned` (`endSessions: true` deletes them too). Lifting the ban
|
|
526
|
+
* ends the sessions first, so the user signs in again.
|
|
527
|
+
*/
|
|
510
528
|
suspendAccount(userId: string, options: SuspendAccountOptions): AsyncResult<SuspendAccountResult>;
|
|
511
529
|
/**
|
|
512
530
|
* Repositories running as a user, with RLS, over direct Postgres. With
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { a as AnyModels, i as AnyFunctions } from "../types-6BdhkmZe.js";
|
|
2
2
|
import { t as BetterSupabase } from "../define-CJJkkr1-.js";
|
|
3
|
-
import { t as BetterServer } from "../server-
|
|
3
|
+
import { t as BetterServer } from "../server-Bh0EVSwU.js";
|
|
4
4
|
import { a as AuthorizedContext, c as Unwrapped, n as ActionParsed, o as BlockActionOptions, r as ActionResult, s as BlockRequireOptions } from "../kit-CkNzZUqv.js";
|
|
5
5
|
import { t as RefusalRedirects } from "../refusal-DhSU2Vvr.js";
|
|
6
|
-
import { n as FrameworkOptions, t as FrameworkLocals } from "../framework-
|
|
6
|
+
import { n as FrameworkOptions, t as FrameworkLocals } from "../framework-BmzgK32X.js";
|
|
7
7
|
import { StandardSchemaV1 } from "@standard-schema/spec";
|
|
8
8
|
//#region src/solid-start/index.d.ts
|
|
9
9
|
/** The part of a SolidStart `FetchEvent` the integration reads and writes. */
|
|
@@ -1,7 +1,7 @@
|
|
|
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-iKgjHVPx.js";
|
|
2
2
|
import { t as defaultExpose } from "../respond-BUgsXNgk.js";
|
|
3
3
|
import { i as requireCaller, o as runAction } from "../kit-Fm-Fv7q5.js";
|
|
4
|
-
import { i as localsOf, r as frameworkEntry } from "../framework-
|
|
4
|
+
import { i as localsOf, r as frameworkEntry } from "../framework-a7aRCIqv.js";
|
|
5
5
|
import { r as refusalResponse } from "../refusal-CeJWxmkH.js";
|
|
6
6
|
import { t as beforeRoute } from "../before-route-CnR0C0Jr.js";
|
|
7
7
|
//#region src/solid-start/index.ts
|
package/dist/sql/index.js
CHANGED
|
@@ -9,7 +9,7 @@ import { t as FINAL_RUN_STATES$1 } from "../run-state-CgBKzYMW.js";
|
|
|
9
9
|
import { t as AI_MESSAGE_PART_TYPES } from "../message-CaKlqdsX.js";
|
|
10
10
|
import { A as jwtClaim, B as replaceColumnCheck, C as canIn, D as disabledHelpersNeedLaterTables, E as disabledHelpers, F as pageSize, G as splitTable$1, H as serviceGrant, I as quotedTable, J as userGrant, K as tenantIn, L as raise$1, M as membershipDisabledAt, N as membershipSuspended, O as ensureCheck, P as organizationMissing, R as recordTrigger, S as addForeignKey, T as columnsObject, U as serviceOnly$1, V as schemaPreamble, W as sha256Hex, _ as SCHEMA, a as MODULE_PERMISSION_SCOPES, b as activeMembership, c as modulePermission, d as roleNames, f as roleScopeIs, g as NOTHING, h as EQUIVALENT_TRIGGERS, i as MODULE_PERMISSIONS, j as memberAddedRecord, k as jsonSchemaChecks, l as modulePermissionKey, m as tenantScope, n as WORKFLOW_SDK_WORLD, o as accessModel, p as rolesOf, q as updatedAt, s as hasPlatformRoles, u as providerPlatformRoles, v as SERVICE_CALLER, w as columnRef, x as addExtraColumns, y as accessDefinesDisabledHelpers, z as renameSql } from "../workflow-sdk-world-D-prir6O.js";
|
|
11
11
|
import { c as templateFunctions, i as fillTemplate, o as resolveProviderSql, s as scopeProblems, t as SCOPE_ID_TYPES } from "../access-sql-B0dF-SoF.js";
|
|
12
|
-
import { t as VERSION } from "../version
|
|
12
|
+
import { t as VERSION } from "../version-C6OfRAIn.js";
|
|
13
13
|
//#region src/sql/api-schema.ts
|
|
14
14
|
/** The roles PostgREST runs a request as. */
|
|
15
15
|
const API_ROLES = /* @__PURE__ */ new Set([
|
|
@@ -3,7 +3,7 @@ import { t as temporal } from "./temporal-required-BVvW7SYJ.js";
|
|
|
3
3
|
import { a as ok, r as err, s as toDbError, t as AsyncResult } from "./result-DzUbqgdW.js";
|
|
4
4
|
import { n as validate } from "./standard-BK0cqJ7y.js";
|
|
5
5
|
import { t as fromPgError } from "./executor-De1Of3m3.js";
|
|
6
|
-
import { d as clearSupportCookie, f as supportCookie, m as supportCookieValue } from "./adapter-
|
|
6
|
+
import { d as clearSupportCookie, f as supportCookie, m as supportCookieValue } from "./adapter-iKgjHVPx.js";
|
|
7
7
|
import { r as sqlIdent } from "./template--jDkl3UP.js";
|
|
8
8
|
import { i as emitBlockEvent } from "./block-events-CrT8r7Fe.js";
|
|
9
9
|
//#region src/auth/support.ts
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { a as AnyModels, i as AnyFunctions } from "../types-6BdhkmZe.js";
|
|
2
2
|
import { t as BetterSupabase } from "../define-CJJkkr1-.js";
|
|
3
|
-
import { t as BetterServer } from "../server-
|
|
3
|
+
import { t as BetterServer } from "../server-Bh0EVSwU.js";
|
|
4
4
|
import { a as AuthorizedContext, c as Unwrapped, i as AuthorizeOptions, n as ActionParsed, o as BlockActionOptions, r as ActionResult, s as BlockRequireOptions } from "../kit-CkNzZUqv.js";
|
|
5
5
|
import { t as RefusalRedirects } from "../refusal-DhSU2Vvr.js";
|
|
6
|
-
import { n as FrameworkOptions, t as FrameworkLocals } from "../framework-
|
|
6
|
+
import { n as FrameworkOptions, t as FrameworkLocals } from "../framework-BmzgK32X.js";
|
|
7
7
|
import { t as Validated } from "../shared-DDSjEGDR.js";
|
|
8
8
|
import { i as tagFor } from "../tags-Cx-LnIQP.js";
|
|
9
9
|
import { AnyEntry, Contributions } from "@supabase/middleware";
|
package/dist/sveltekit/index.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { t as DbException } from "../db-exception-CnWcYPxL.js";
|
|
2
2
|
import { r as dbErrorOf } from "../errors-B11Duf73.js";
|
|
3
3
|
import { o as toProblem } from "../problem-BreOl8b8.js";
|
|
4
|
-
import { c as extendServer, n as flushEvents, s as createServer } from "../adapter-
|
|
4
|
+
import { c as extendServer, n as flushEvents, s as createServer } from "../adapter-iKgjHVPx.js";
|
|
5
5
|
import { t as defaultExpose } from "../respond-BUgsXNgk.js";
|
|
6
6
|
import { r as tagFor } from "../tags-B99_U9Pp.js";
|
|
7
7
|
import { i as requireCaller, o as runAction } from "../kit-Fm-Fv7q5.js";
|
|
8
8
|
import { n as bufferInPlace, t as around } from "../shared-CBxosKK3.js";
|
|
9
|
-
import { a as platformWaitUntil, i as localsOf, n as actionInput, r as frameworkEntry } from "../framework-
|
|
9
|
+
import { a as platformWaitUntil, i as localsOf, n as actionInput, r as frameworkEntry } from "../framework-a7aRCIqv.js";
|
|
10
10
|
import { i as refusalTarget } from "../refusal-CeJWxmkH.js";
|
|
11
11
|
//#region src/bridges/sveltekit.ts
|
|
12
12
|
/**
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { a as AnyModels, i as AnyFunctions } from "../types-6BdhkmZe.js";
|
|
2
2
|
import { t as BetterSupabase } from "../define-CJJkkr1-.js";
|
|
3
|
-
import { t as BetterServer } from "../server-
|
|
3
|
+
import { t as BetterServer } from "../server-Bh0EVSwU.js";
|
|
4
4
|
import { a as AuthorizedContext, c as Unwrapped, i as AuthorizeOptions, n as ActionParsed, o as BlockActionOptions, r as ActionResult, s as BlockRequireOptions } from "../kit-CkNzZUqv.js";
|
|
5
5
|
import { t as RefusalRedirects } from "../refusal-DhSU2Vvr.js";
|
|
6
|
-
import { n as FrameworkOptions, t as FrameworkLocals } from "../framework-
|
|
6
|
+
import { n as FrameworkOptions, t as FrameworkLocals } from "../framework-BmzgK32X.js";
|
|
7
7
|
import { t as Validated } from "../shared-DDSjEGDR.js";
|
|
8
8
|
import { AnyEntry, Contributions } from "@supabase/middleware";
|
|
9
9
|
import { StandardSchemaV1 } from "@standard-schema/spec";
|
|
@@ -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-iKgjHVPx.js";
|
|
2
2
|
import { t as defaultExpose } from "../respond-BUgsXNgk.js";
|
|
3
3
|
import { i as requireCaller, o as runAction } from "../kit-Fm-Fv7q5.js";
|
|
4
4
|
import { n as bufferInPlace, t as around } from "../shared-CBxosKK3.js";
|
|
5
|
-
import { i as localsOf, r as frameworkEntry } from "../framework-
|
|
5
|
+
import { i as localsOf, r as frameworkEntry } from "../framework-a7aRCIqv.js";
|
|
6
6
|
import { r as refusalResponse } from "../refusal-CeJWxmkH.js";
|
|
7
7
|
//#region src/bridges/tanstack-start.ts
|
|
8
8
|
/** The `response` of a request middleware's `next()` result; server function results have none. */
|
package/dist/testing/index.d.ts
CHANGED
|
@@ -10,7 +10,7 @@ import { o as StreamStore } from "../store-CGjgWu5n.js";
|
|
|
10
10
|
import { B as DbStats, b as Db, t as BetterSupabase, u as CacheAdapter } from "../define-CJJkkr1-.js";
|
|
11
11
|
import { r as EventSink, t as CloudEvent } from "../cloud-event-C1JCc1bH.js";
|
|
12
12
|
import { t as BetterPostgres } from "../pool-CAu2nLrL.js";
|
|
13
|
-
import { V as SupportSessionStore, i as ServerContext, o as ServerOptions } from "../server-
|
|
13
|
+
import { V as SupportSessionStore, i as ServerContext, o as ServerOptions } from "../server-Bh0EVSwU.js";
|
|
14
14
|
import { s as Impersonator } from "../mfa-Daak8ukG.js";
|
|
15
15
|
import { n as SessionActor, r as SessionDelegation } from "../actor-CQTlc1Hh.js";
|
|
16
16
|
import { r as GuardOptions } from "../respond-DprrgyXX.js";
|
package/package.json
CHANGED
|
@@ -115,10 +115,14 @@ A proxy or middleware with its own Supabase client calls
|
|
|
115
115
|
Done when the irreversible action returns `SESSION_REVOKED` for a signed-out
|
|
116
116
|
session in a test.
|
|
117
117
|
|
|
118
|
-
To lock a user out, call `bs.suspendAccount(userId, { suspended: true })
|
|
119
|
-
|
|
120
|
-
`
|
|
121
|
-
|
|
118
|
+
To lock a user out, call `bs.suspendAccount(userId, { suspended: true })`.
|
|
119
|
+
It bans the user in Auth and keeps the sessions, so Auth answers with
|
|
120
|
+
`user_banned`, `sessionStatus` returns `"banned"` and the `session_active()`
|
|
121
|
+
policy refuses the user's tokens. `{ suspended: false }` ends every session
|
|
122
|
+
and refresh token, then lifts the ban. Without the `sessions` SQL module, pass
|
|
123
|
+
`endSessions: true` to delete the sessions on suspension too (the app then
|
|
124
|
+
sees `"ended"`). `bs.endSessions(userId)` signs a user out everywhere without
|
|
125
|
+
a ban. To
|
|
122
126
|
switch a member off in one organization only, use the organizations block's
|
|
123
127
|
`suspendMember`.
|
|
124
128
|
|
package/dist/cli/gen-DSrahEdX.js
DELETED