better-supabase 0.6.1 → 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-CHnPkCPd.js → adapter-iKgjHVPx.js} +34 -4
- package/dist/ai-sdk/batches/index.d.ts +1 -1
- package/dist/ai-sdk/index.d.ts +1 -1
- package/dist/ai-sdk/mcp/index.d.ts +3 -3
- package/dist/{api-keys-rCGtKaZA.d.ts → api-keys-CIjghYjV.d.ts} +1 -1
- package/dist/astro/index.d.ts +4 -4
- package/dist/astro/index.js +2 -2
- package/dist/blocks/ai-providers/index.d.ts +1 -1
- package/dist/blocks/api-keys/index.d.ts +2 -2
- package/dist/blocks/audit/index.js +1 -1
- package/dist/blocks/connectors/index.d.ts +1 -1
- package/dist/blocks/data-lifecycle/index.d.ts +1 -1
- package/dist/blocks/data-lifecycle/index.js +1 -1
- package/dist/blocks/entitlements/index.d.ts +1 -1
- package/dist/blocks/index.d.ts +1 -1
- package/dist/blocks/sso/index.d.ts +1 -1
- package/dist/blocks/workflow-builder/index.d.ts +2 -2
- package/dist/blocks/workflow-builder/react/index.d.ts +1 -1
- package/dist/chat-sdk/index.d.ts +1 -1
- package/dist/cli/bin.js +1 -1
- package/dist/cli/{doctor-BMqBgM3X.js → doctor-DJk0aeBi.js} +66 -14
- package/dist/cli/{gen-DeuDgPxN.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-C7Xd0Kda.js → init-BHuEQrQK.js} +1 -1
- package/dist/cli/{introspect-CSnMJ94U.js → introspect-DzR2nyQb.js} +1 -1
- package/dist/cli/{run-C8tnlHSb.js → run-BqDPh9UH.js} +7 -7
- package/dist/cli/{sql-D0GUtUPp.js → sql-B8csQPyn.js} +13 -54
- package/dist/cli/sql-layout-D6cphHT3.js +69 -0
- package/dist/cli/{version-C_4JwyiM.js → version-59gcepIG.js} +1 -1
- package/dist/{composite-pSfeJNce.d.ts → composite--yqry7uW.d.ts} +3 -3
- package/dist/{composite-CLqs9-OA.js → composite-DXVUibdi.js} +1 -1
- package/dist/{connectors-hkLCwyEz.d.ts → connectors-CrpknU0P.d.ts} +1 -1
- package/dist/credentials/index.d.ts +2 -2
- package/dist/{csv-CPAzEmB6.js → csv-DCK-PT1n.js} +1 -1
- package/dist/edge/index.d.ts +5 -5
- package/dist/edge/index.js +3 -3
- package/dist/elysia/index.d.ts +1 -1
- package/dist/{ended-jLfvw8h-.d.ts → ended-XjeGQ5XW.d.ts} +4 -1
- package/dist/{entitlements-DHrY2UDZ.d.ts → entitlements-BKSVGtrG.d.ts} +1 -1
- package/dist/eve/index.d.ts +2 -2
- package/dist/eve/index.js +1 -1
- package/dist/{executor-D14tGopJ.d.ts → executor-BVBFM86G.d.ts} +1 -1
- package/dist/expo/index.d.ts +2 -2
- package/dist/expo/index.js +3 -3
- package/dist/{framework-CdPDPpFs.d.ts → framework-BmzgK32X.d.ts} +4 -4
- package/dist/{framework-xjTBoyBB.js → framework-a7aRCIqv.js} +1 -1
- package/dist/h3/index.d.ts +1 -1
- package/dist/h3/v1/index.d.ts +1 -1
- package/dist/hono/index.d.ts +6 -6
- package/dist/hono/index.js +2 -2
- package/dist/{index-DDrYaUcq.d.ts → index-CdZKQF98.d.ts} +1 -1
- package/dist/{index-CtuakVRc.d.ts → index-CewnYSpv.d.ts} +1 -1
- package/dist/{kit-B5tid-q5.d.ts → kit-CkNzZUqv.d.ts} +3 -3
- package/dist/mcp/index.d.ts +3 -3
- package/dist/mcp/index.js +1 -1
- package/dist/mcp/sdk/index.d.ts +3 -3
- package/dist/mcp/sdk/index.js +1 -1
- package/dist/nestjs/index.d.ts +2 -2
- package/dist/next/index.d.ts +13 -8
- package/dist/next/index.js +5 -5
- package/dist/node/index.d.ts +2 -2
- package/dist/orpc/index.d.ts +4 -4
- package/dist/orpc/index.js +1 -1
- package/dist/otel/index.js +5 -5
- package/dist/{provider-BH5UWZJ6.d.ts → provider-D-UEMvSD.d.ts} +1 -1
- package/dist/react/index.d.ts +5 -5
- package/dist/react/server.d.ts +5 -5
- package/dist/react/session.d.ts +2 -2
- package/dist/react-router/index.d.ts +4 -4
- package/dist/react-router/index.js +2 -2
- package/dist/{refusal-D1rgbzNq.d.ts → refusal-DhSU2Vvr.d.ts} +1 -1
- package/dist/{resolve-KW8nCeL6.d.ts → resolve-ChTYeTEl.d.ts} +3 -0
- package/dist/{resolve-D_IcnvFd.js → resolve-tJZY3FEa.js} +12 -7
- package/dist/{resource-D6Uc7Sk7.d.ts → resource-IPS5xi9q.d.ts} +1 -1
- package/dist/{respond-DoBijysA.d.ts → respond-DprrgyXX.d.ts} +1 -1
- package/dist/server/index.d.ts +47 -10
- package/dist/server/index.js +27 -5
- package/dist/{server-C6DWVEVG.d.ts → server-Bh0EVSwU.d.ts} +32 -3
- package/dist/solid/index.d.ts +2 -2
- package/dist/solid-start/index.d.ts +4 -4
- package/dist/solid-start/index.js +2 -2
- package/dist/sql/index.d.ts +10 -0
- package/dist/sql/index.js +52 -5
- package/dist/ssr/index.d.ts +4 -4
- package/dist/ssr/index.js +1 -1
- package/dist/{support-zIa1URaN.js → support-ig_K4PvS.js} +1 -1
- package/dist/{support-view-33Oi07TT.d.ts → support-view-CVOJJLpc.d.ts} +1 -1
- package/dist/svelte/index.d.ts +1 -1
- package/dist/sveltekit/index.d.ts +4 -4
- package/dist/sveltekit/index.js +2 -2
- package/dist/tanstack-start/index.d.ts +4 -4
- package/dist/tanstack-start/index.js +2 -2
- package/dist/{tenant-icPeuUBN.d.ts → tenant-BxNFk9bx.d.ts} +1 -1
- package/dist/testing/index.d.ts +5 -5
- package/dist/{types-TaiEeBGA.d.ts → types-6rocye-y.d.ts} +1 -1
- package/dist/{types-BI-0Sl2v.d.ts → types-AYOvcyep.d.ts} +1 -1
- package/dist/{vault-CSO7ss5C.d.ts → vault-wlbBhqm7.d.ts} +1 -1
- package/dist/vercel-connect/index.d.ts +1 -1
- package/dist/{version-CQt77F3T.js → version-C6OfRAIn.js} +1 -1
- package/dist/{view-DbxLNu8L.d.ts → view-CF7ihnkg.d.ts} +1 -1
- package/dist/vue/index.d.ts +2 -2
- package/dist/workflow-sdk/builder/index.d.ts +2 -2
- package/package.json +1 -1
- package/schemas/doctor-report-v1.json +2 -0
- package/skills/better-supabase-auth/SKILL.md +8 -4
- package/dist/cli/gen-4JlOwgWG.js +0 -2
|
@@ -5,10 +5,11 @@ import { a as entitlementsMode, n as accessProviderMode, o as moduleKeyProblems,
|
|
|
5
5
|
import { t as importFresh } from "./fresh-import-BeYf9I3x.js";
|
|
6
6
|
import { c as migrationCommand, d as schemaPaths, n as declarativeSchemasDir, u as readSupabaseToml } from "./supabase-toml-B-bIukQF.js";
|
|
7
7
|
import { t as fileDiff } from "./diff-SjkO5rNr.js";
|
|
8
|
-
import {
|
|
8
|
+
import { n as moduleLayoutFor, t as migrationsDir } from "./sql-layout-D6cphHT3.js";
|
|
9
|
+
import { resolve } from "node:path";
|
|
9
10
|
import { existsSync } from "node:fs";
|
|
10
11
|
import { readFile, readdir, rm } from "node:fs/promises";
|
|
11
|
-
import { SQL_MODULES,
|
|
12
|
+
import { SQL_MODULES, contractSignature, customContracts, moduleBody, moduleFilePaths, moduleFileVersion, moduleLayout, modulePermissionKeys, moduleSchemaExtensions, moduleTopics, renderModules, resolveModules, sameModuleFile, upgradePlan } from "better-supabase/sql";
|
|
12
13
|
//#region src/cli/topic-policies.ts
|
|
13
14
|
const isTopic = (value) => typeof value === "object" && value !== null && "template" in value && typeof value.template === "string" && "sql" in value && typeof value.sql === "function" && "triggerSql" in value;
|
|
14
15
|
const literalParts = (template) => template.replaceAll(/\{[^}]+\}/g, "{}");
|
|
@@ -124,46 +125,22 @@ async function layout(config, args, names) {
|
|
|
124
125
|
schemasDir: declarativeSchemasDir(await readSupabaseToml(config.root))
|
|
125
126
|
};
|
|
126
127
|
}
|
|
127
|
-
/** The declarative schema files, then the migrations oldest first. */
|
|
128
|
-
async function schemaTexts(config) {
|
|
129
|
-
const toml = await readSupabaseToml(config.root);
|
|
130
|
-
const migrations = resolve(config.root, migrationsDir(config));
|
|
131
|
-
const paths = [...(await schemaPaths(config.root, toml)).files, ...existsSync(migrations) ? (await readdir(migrations)).filter((name) => name.endsWith(".sql")).toSorted().map((name) => join(migrations, name)) : []];
|
|
132
|
-
return Promise.all(paths.map(async (path) => ({ text: await readFile(resolve(config.root, path), "utf8") })));
|
|
133
|
-
}
|
|
134
|
-
async function declarativeTexts(config) {
|
|
135
|
-
const { files } = await schemaPaths(config.root, await readSupabaseToml(config.root));
|
|
136
|
-
if (files.length === 0) return schemaTexts(config);
|
|
137
|
-
return Promise.all(files.map(async (path) => ({ text: await readFile(resolve(config.root, path), "utf8") })));
|
|
138
|
-
}
|
|
139
|
-
/**
|
|
140
|
-
* The `better_supabase.audit(...)` calls in the declarative schemas, then
|
|
141
|
-
* the migrations oldest first, so a later call or `unaudit` wins.
|
|
142
|
-
*/
|
|
143
|
-
async function auditedTables(config) {
|
|
144
|
-
return auditRegistrations(await schemaTexts(config));
|
|
145
|
-
}
|
|
146
128
|
/**
|
|
147
129
|
* The layout, with `config.readSets` compiled when `names` includes
|
|
148
|
-
* `read-sets
|
|
130
|
+
* `read-sets`.
|
|
149
131
|
*/
|
|
150
132
|
async function layoutFor(config, args, names) {
|
|
151
133
|
const entitlementsProvider = entitlementsProviderFor(config, names);
|
|
152
134
|
const resolved = new Set(resolveModules(names, { ...entitlementsProvider ? { entitlementsProvider } : {} }).map((module) => module.name));
|
|
153
|
-
const
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
...
|
|
159
|
-
...
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
};
|
|
163
|
-
}
|
|
164
|
-
function vectorSchemaOf(sources) {
|
|
165
|
-
const schema = extensionSchema(sources, "vector");
|
|
166
|
-
return schema === void 0 ? {} : { vectorSchema: schema };
|
|
135
|
+
const accessProvider = accessProviderFor(config, names);
|
|
136
|
+
return moduleLayoutFor(config, {
|
|
137
|
+
names,
|
|
138
|
+
testsDir: args["tests-dir"],
|
|
139
|
+
readSets: resolved.has("read-sets") ? await compiledReadSets(config) : [],
|
|
140
|
+
...entitlementsProvider ? { entitlementsProvider } : {},
|
|
141
|
+
...accessProvider ? { accessProvider } : {},
|
|
142
|
+
permissionCatalog: permissionKeysFor(config)
|
|
143
|
+
});
|
|
167
144
|
}
|
|
168
145
|
const MODULE_TEST_MARKER = /^-- @bs-module-test ([a-z0-9-]+)$/m;
|
|
169
146
|
/**
|
|
@@ -185,24 +162,6 @@ async function staleModuleTests(config, names, sqlLayout, files) {
|
|
|
185
162
|
}
|
|
186
163
|
return stale;
|
|
187
164
|
}
|
|
188
|
-
/**
|
|
189
|
-
* The migrations folder next to the `config.toml` found walking up from
|
|
190
|
-
* `sql.dir`, relative to the root; `supabase/migrations` without one. The
|
|
191
|
-
* walk stops where `sql.dir` and the root meet, so a `sql.dir` outside the
|
|
192
|
-
* project (a shared stack in a monorepo) finds that stack's folder.
|
|
193
|
-
*/
|
|
194
|
-
function migrationsDir(config) {
|
|
195
|
-
const root = resolve(config.root);
|
|
196
|
-
let dir = resolve(root, config.sql.dir);
|
|
197
|
-
let stop = root;
|
|
198
|
-
while (dir !== stop && !dir.startsWith(stop + sep) && dirname(stop) !== stop) stop = dirname(stop);
|
|
199
|
-
for (;;) {
|
|
200
|
-
if (existsSync(join(dir, "config.toml"))) return relative(root, join(dir, "migrations")).replaceAll("\\", "/");
|
|
201
|
-
if (dir === stop || dirname(dir) === dir) break;
|
|
202
|
-
dir = dirname(dir);
|
|
203
|
-
}
|
|
204
|
-
return "supabase/migrations";
|
|
205
|
-
}
|
|
206
165
|
/** `YYYYMMDDHHMMSS` in UTC, the Supabase CLI's migration prefix. */
|
|
207
166
|
const migrationStamp = (now) => now.toISOString().replaceAll(/[-:T]/g, "").slice(0, 14);
|
|
208
167
|
/**
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import { d as schemaPaths, n as declarativeSchemasDir, u as readSupabaseToml } from "./supabase-toml-B-bIukQF.js";
|
|
2
|
+
import { dirname, join, relative, resolve, sep } from "node:path";
|
|
3
|
+
import { existsSync } from "node:fs";
|
|
4
|
+
import { readFile, readdir } from "node:fs/promises";
|
|
5
|
+
import { adoptedColumnProblems, auditRegistrations, declaredTables, extensionSchema, moduleLayout, policyGrants, resolveModules, rlsTables } from "better-supabase/sql";
|
|
6
|
+
//#region src/cli/sql-layout.ts
|
|
7
|
+
/** The declarative schema files, then the migrations oldest first. */
|
|
8
|
+
async function schemaTexts(config) {
|
|
9
|
+
const toml = await readSupabaseToml(config.root);
|
|
10
|
+
const migrations = resolve(config.root, migrationsDir(config));
|
|
11
|
+
const paths = [...(await schemaPaths(config.root, toml)).files, ...existsSync(migrations) ? (await readdir(migrations)).filter((name) => name.endsWith(".sql")).toSorted().map((name) => join(migrations, name)) : []];
|
|
12
|
+
return Promise.all(paths.map(async (path) => ({ text: await readFile(resolve(config.root, path), "utf8") })));
|
|
13
|
+
}
|
|
14
|
+
async function declarativeTexts(config) {
|
|
15
|
+
const { files } = await schemaPaths(config.root, await readSupabaseToml(config.root));
|
|
16
|
+
if (files.length === 0) return schemaTexts(config);
|
|
17
|
+
return Promise.all(files.map(async (path) => ({ text: await readFile(resolve(config.root, path), "utf8") })));
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* The `better_supabase.audit(...)` calls in the declarative schemas, then
|
|
21
|
+
* the migrations oldest first, so a later call or `unaudit` wins.
|
|
22
|
+
*/
|
|
23
|
+
async function auditedTables(config) {
|
|
24
|
+
return auditRegistrations(await schemaTexts(config));
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* The layout `sql sync` and doctor render the module files with, so both
|
|
28
|
+
* see the same grants, session policies, audit triggers and vector schema.
|
|
29
|
+
*/
|
|
30
|
+
async function moduleLayoutFor(config, input) {
|
|
31
|
+
const resolved = new Set(resolveModules(input.names, { ...input.entitlementsProvider ? { entitlementsProvider: input.entitlementsProvider } : {} }).map((module) => module.name));
|
|
32
|
+
const adopted = adoptedColumnProblems(config.sql.modules, await declarativeTexts(config), config.schemas);
|
|
33
|
+
if (adopted.length > 0) throw new TypeError(adopted.join("\n"));
|
|
34
|
+
const fromPolicies = resolved.has("grants") && config.sql.modules["grants"]?.options?.["fromPolicies"] === true;
|
|
35
|
+
const sessionPolicies = resolved.has("sessions") && config.sql.modules["sessions"]?.options?.["policies"] === true;
|
|
36
|
+
return {
|
|
37
|
+
...moduleLayout(config, input.testsDir, input.readSets ?? [], input.entitlementsProvider, input.accessProvider, input.permissionCatalog),
|
|
38
|
+
schemasDir: declarativeSchemasDir(await readSupabaseToml(config.root)),
|
|
39
|
+
...resolved.has("audit") ? { auditedTables: await auditedTables(config) } : {},
|
|
40
|
+
...resolved.has("vector-search") ? vectorSchemaOf(await schemaTexts(config)) : {},
|
|
41
|
+
...fromPolicies ? { policyGrants: policyGrants(await declarativeTexts(config), config.schemas) } : {},
|
|
42
|
+
...fromPolicies ? { rlsTables: rlsTables(await declarativeTexts(config), config.schemas) } : {},
|
|
43
|
+
...fromPolicies || sessionPolicies ? { declaredTables: declaredTables(await declarativeTexts(config), config.schemas) } : {}
|
|
44
|
+
};
|
|
45
|
+
}
|
|
46
|
+
function vectorSchemaOf(sources) {
|
|
47
|
+
const schema = extensionSchema(sources, "vector");
|
|
48
|
+
return schema === void 0 ? {} : { vectorSchema: schema };
|
|
49
|
+
}
|
|
50
|
+
/**
|
|
51
|
+
* The migrations folder next to the `config.toml` found walking up from
|
|
52
|
+
* `sql.dir`, relative to the root; `supabase/migrations` without one. The
|
|
53
|
+
* walk stops where `sql.dir` and the root meet, so a `sql.dir` outside the
|
|
54
|
+
* project (a shared stack in a monorepo) finds that stack's folder.
|
|
55
|
+
*/
|
|
56
|
+
function migrationsDir(config) {
|
|
57
|
+
const root = resolve(config.root);
|
|
58
|
+
let dir = resolve(root, config.sql.dir);
|
|
59
|
+
let stop = root;
|
|
60
|
+
while (dir !== stop && !dir.startsWith(stop + sep) && dirname(stop) !== stop) stop = dirname(stop);
|
|
61
|
+
for (;;) {
|
|
62
|
+
if (existsSync(join(dir, "config.toml"))) return relative(root, join(dir, "migrations")).replaceAll("\\", "/");
|
|
63
|
+
if (dir === stop || dirname(dir) === dir) break;
|
|
64
|
+
dir = dirname(dir);
|
|
65
|
+
}
|
|
66
|
+
return "supabase/migrations";
|
|
67
|
+
}
|
|
68
|
+
//#endregion
|
|
69
|
+
export { moduleLayoutFor as n, migrationsDir as t };
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { a as AnyModels, i as AnyFunctions } from "./types-6BdhkmZe.js";
|
|
2
2
|
import { a as EventHub } from "./events-DWDhx77e.js";
|
|
3
3
|
import { i as CookieScope, s as SessionEncoding } from "./session-ChiXDZdZ.js";
|
|
4
|
-
import { r as AuthState, t as AuthResolution } from "./resolve-
|
|
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 {
|
|
7
|
-
import { d as RefreshPolicy, r as GuardOptions } from "./respond-
|
|
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
|
+
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";
|
|
10
10
|
import { AuthMode, JWTClaims, UserClaims } from "@supabase/server";
|
|
@@ -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";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/// <reference lib="esnext.temporal" />
|
|
2
2
|
import { t as AsyncResult, w as ErrorMapper } from "./result-D7y2fT87.js";
|
|
3
3
|
import { t as BlockTransport } from "./block-transport-DvaoPuZ9.js";
|
|
4
|
-
import { i as CredentialRef, r as CredentialProvider } from "./provider-
|
|
4
|
+
import { i as CredentialRef, r as CredentialProvider } from "./provider-D-UEMvSD.js";
|
|
5
5
|
import { r as BlockTemporalOptions } from "./block-helpers-CKtbFcRv.js";
|
|
6
6
|
//#region src/blocks/connectors/connectors.d.ts
|
|
7
7
|
type ConnectorTransport = "http" | "sse";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { t as AsyncResult } from "../result-D7y2fT87.js";
|
|
2
2
|
import { i as sqlTransport, r as rpcTransport, t as BlockTransport } from "../block-transport-DvaoPuZ9.js";
|
|
3
|
-
import { a as CredentialSubject, c as SetCredentialOptions, d as foreignCredentialRef, f as subjectFor, i as CredentialRef, l as StartAuthorizationOptions, n as CredentialCapabilities, o as CredentialToken, p as tenantCredentialRef, r as CredentialProvider, s as GetTokenOptions, t as CompleteAuthorizationOptions, u as credentialRefInTenant } from "../provider-
|
|
4
|
-
import { a as vaultCredentials, i as VaultInboundScheme, n as VaultCredentials, r as VaultCredentialsOptions, t as VaultCredentialRef } from "../vault-
|
|
3
|
+
import { a as CredentialSubject, c as SetCredentialOptions, d as foreignCredentialRef, f as subjectFor, i as CredentialRef, l as StartAuthorizationOptions, n as CredentialCapabilities, o as CredentialToken, p as tenantCredentialRef, r as CredentialProvider, s as GetTokenOptions, t as CompleteAuthorizationOptions, u as credentialRefInTenant } from "../provider-D-UEMvSD.js";
|
|
4
|
+
import { a as vaultCredentials, i as VaultInboundScheme, n as VaultCredentials, r as VaultCredentialsOptions, t as VaultCredentialRef } from "../vault-wlbBhqm7.js";
|
|
5
5
|
//#region src/credentials/compose.d.ts
|
|
6
6
|
/**
|
|
7
7
|
* One provider over several: each call goes to the provider whose `name`
|
|
@@ -22,4 +22,4 @@ function toCsv(rows, options = {}) {
|
|
|
22
22
|
return `${[columns.map((column) => cell(column, false)).join(","), ...rows.map((row) => columns.map((column) => cell(row[column], escape)).join(","))].join("\r\n")}\r\n`;
|
|
23
23
|
}
|
|
24
24
|
//#endregion
|
|
25
|
-
export { toCsv as t };
|
|
25
|
+
export { toCsv as n, csvColumns as t };
|
package/dist/edge/index.d.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
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-
|
|
4
|
-
import { t as AuthSession } from "../view-
|
|
5
|
-
import { i as MiddlewareOptions, r as GuardOptions } from "../respond-
|
|
6
|
-
import { s as BlockRequireOptions } from "../kit-
|
|
3
|
+
import { i as ServerContext, o as ServerOptions, t as BetterServer } from "../server-Bh0EVSwU.js";
|
|
4
|
+
import { t as AuthSession } from "../view-CF7ihnkg.js";
|
|
5
|
+
import { i as MiddlewareOptions, r as GuardOptions } from "../respond-DprrgyXX.js";
|
|
6
|
+
import { s as BlockRequireOptions } from "../kit-CkNzZUqv.js";
|
|
7
7
|
import { t as Validated } from "../shared-DDSjEGDR.js";
|
|
8
|
-
import { a as ResourceRouteOptions } from "../resource-
|
|
8
|
+
import { a as ResourceRouteOptions } from "../resource-IPS5xi9q.js";
|
|
9
9
|
import { AnyEntry, Contributions } from "@supabase/middleware";
|
|
10
10
|
import { WithCorsConfig } from "@supabase/middleware/cors";
|
|
11
11
|
//#region src/bridges/edge.d.ts
|
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/elysia/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { n as RouteGuardOptions } from "../refusal-
|
|
1
|
+
import { n as RouteGuardOptions } from "../refusal-DhSU2Vvr.js";
|
|
2
2
|
import { t as Validated } from "../shared-DDSjEGDR.js";
|
|
3
3
|
import { AnyEntry, Contributions } from "@supabase/middleware";
|
|
4
4
|
//#region src/bridges/elysia.d.ts
|
|
@@ -30,6 +30,8 @@ type RefreshOutcome = {
|
|
|
30
30
|
/** `rejected`: the refresh token is dead, sign the user out. `network`: keep the session and retry later. */
|
|
31
31
|
readonly reason: "rejected" | "network";
|
|
32
32
|
readonly status?: number;
|
|
33
|
+
/** The Auth server's `error_code`, such as `user_banned` or `refresh_token_not_found`. */
|
|
34
|
+
readonly code?: string;
|
|
33
35
|
readonly message: string;
|
|
34
36
|
};
|
|
35
37
|
/**
|
|
@@ -40,7 +42,8 @@ type RefreshOutcome = {
|
|
|
40
42
|
declare function refreshSession(refreshToken: string, options: RefreshOptions): Promise<RefreshOutcome>;
|
|
41
43
|
//#endregion
|
|
42
44
|
//#region src/auth/ended.d.ts
|
|
43
|
-
|
|
45
|
+
/** `banned`: Auth rejected the token with `error_code: "user_banned"`. */
|
|
46
|
+
type SessionStatus = "active" | "ended" | "banned" | "unknown";
|
|
44
47
|
interface SessionStatusOptions {
|
|
45
48
|
readonly url: string;
|
|
46
49
|
readonly publishableKey: string;
|
package/dist/eve/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { a as ResolveAuthOptions, r as AuthState } from "../resolve-
|
|
2
|
-
import { i as CredentialRef, r as CredentialProvider } from "../provider-
|
|
1
|
+
import { a as ResolveAuthOptions, r as AuthState } from "../resolve-ChTYeTEl.js";
|
|
2
|
+
import { i as CredentialRef, r as CredentialProvider } from "../provider-D-UEMvSD.js";
|
|
3
3
|
import { i as AiChat } from "../ai-chat-7amvXjmQ.js";
|
|
4
4
|
import { a as Inbox } from "../inbox-i7E1ppo6.js";
|
|
5
5
|
import { a as EveMemoryToolsContext, c as MemoryDocumentConflictError, d as supabaseDocumentBackend, f as supabaseMemory, i as EveMemoryTool, l as SupabaseDocumentBackendOptions, m as EveSessionContext, n as EveMemoryContext, o as EveRecallMessage, p as EveSessionAuth, r as EveMemoryProvider, s as EveRecallResult, t as EveDocumentBackend, u as SupabaseMemoryOptions } from "../eve-gT2Fpjut.js";
|
package/dist/eve/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { t as DbException } from "../db-exception-CnWcYPxL.js";
|
|
2
2
|
import { a as tenantClaimPaths, n as claimAt, t as DEFAULT_CLAIMS } from "../claims-PqzCxaTD.js";
|
|
3
|
-
import { i as resolveAuth } from "../resolve-
|
|
3
|
+
import { i as resolveAuth } from "../resolve-tJZY3FEa.js";
|
|
4
4
|
import { t as isAnonymousUser } from "../view-BeFcRV6G.js";
|
|
5
5
|
import { d as isRecord } from "../block-helpers-DWHxHsEQ.js";
|
|
6
6
|
//#region src/eve/ids.ts
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { T as WorkflowGraph } from "./types-
|
|
1
|
+
import { T as WorkflowGraph } from "./types-AYOvcyep.js";
|
|
2
2
|
//#region src/blocks/workflow-builder/executor.d.ts
|
|
3
3
|
/** What a step node passes to the engine's step: plain data, so it serializes. */
|
|
4
4
|
interface GraphStepCall {
|
package/dist/expo/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
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-
|
|
4
|
-
import { i as MiddlewareOptions, r as GuardOptions } from "../respond-
|
|
3
|
+
import { i as ServerContext, n as ContextOptions, o as ServerOptions, t as BetterServer } from "../server-Bh0EVSwU.js";
|
|
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";
|
|
7
7
|
import { ImmutableRequest, MiddlewareFunction } from "expo-server";
|
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-
|
|
4
|
-
import { m as serializeCookie } from "../resolve-
|
|
3
|
+
import { a as unexpectedResponse, c as extendServer, s as createServer, y as refreshFor } from "../adapter-iKgjHVPx.js";
|
|
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,8 +1,8 @@
|
|
|
1
1
|
import { a as AnyModels, i as AnyFunctions } from "./types-6BdhkmZe.js";
|
|
2
|
-
import { o as ServerOptions } from "./server-
|
|
3
|
-
import { t as AuthSession } from "./view-
|
|
4
|
-
import { a as SessionEntryConfig, n as BetterSupabaseContributions } from "./composite
|
|
5
|
-
import { t as RefusalRedirects } from "./refusal-
|
|
2
|
+
import { o as ServerOptions } from "./server-Bh0EVSwU.js";
|
|
3
|
+
import { t as AuthSession } from "./view-CF7ihnkg.js";
|
|
4
|
+
import { a as SessionEntryConfig, n as BetterSupabaseContributions } from "./composite--yqry7uW.js";
|
|
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. */
|
|
8
8
|
interface FrameworkOptions extends ServerOptions, RefusalRedirects, Pick<SessionEntryConfig, "checkSession" | "cookieScopes" | "encode"> {
|
|
@@ -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/h3/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { n as RouteGuardOptions } from "../refusal-
|
|
1
|
+
import { n as RouteGuardOptions } from "../refusal-DhSU2Vvr.js";
|
|
2
2
|
import { t as Validated } from "../shared-DDSjEGDR.js";
|
|
3
3
|
import { AnyEntry, Contributions } from "@supabase/middleware";
|
|
4
4
|
//#region src/bridges/h3.d.ts
|
package/dist/h3/v1/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { n as RouteGuardOptions } from "../../refusal-
|
|
1
|
+
import { n as RouteGuardOptions } from "../../refusal-DhSU2Vvr.js";
|
|
2
2
|
import { t as Validated } from "../../shared-DDSjEGDR.js";
|
|
3
3
|
import { n as NodeRequestHead, t as NodeHeaderTarget } from "../../node-headers-AO06VhqH.js";
|
|
4
4
|
import { AnyEntry, Contributions } from "@supabase/middleware";
|
package/dist/hono/index.d.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { L as TableKey, a as AnyModels, i as AnyFunctions } from "../types-6BdhkmZe.js";
|
|
2
|
-
import { r as AuthState } from "../resolve-
|
|
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-
|
|
5
|
-
import { t as AuthSession } from "../view-
|
|
6
|
-
import { i as MiddlewareOptions, r as GuardOptions } from "../respond-
|
|
7
|
-
import { s as BlockRequireOptions } from "../kit-
|
|
8
|
-
import { a as ResourceRouteOptions } from "../resource-
|
|
4
|
+
import { i as ServerContext, o as ServerOptions, t as BetterServer } from "../server-Bh0EVSwU.js";
|
|
5
|
+
import { t as AuthSession } from "../view-CF7ihnkg.js";
|
|
6
|
+
import { i as MiddlewareOptions, r as GuardOptions } from "../respond-DprrgyXX.js";
|
|
7
|
+
import { s as BlockRequireOptions } from "../kit-CkNzZUqv.js";
|
|
8
|
+
import { a as ResourceRouteOptions } from "../resource-IPS5xi9q.js";
|
|
9
9
|
import { AnyEntry, Contributions, ValidateEntries } from "@supabase/middleware";
|
|
10
10
|
import { Context, ErrorHandler, Hono, MiddlewareHandler } from "hono";
|
|
11
11
|
//#region src/bridges/hono.d.ts
|
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";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { n as RouteGuardOptions } from "./refusal-
|
|
1
|
+
import { n as RouteGuardOptions } from "./refusal-DhSU2Vvr.js";
|
|
2
2
|
import { t as Validated } from "./shared-DDSjEGDR.js";
|
|
3
3
|
import { AnyEntry, Contributions } from "@supabase/middleware";
|
|
4
4
|
import { IncomingMessage, ServerResponse } from "node:http";
|
|
@@ -3,7 +3,7 @@ import { it as QuerySpec } from "./define-CJJkkr1-.js";
|
|
|
3
3
|
import { C as UrlOptions, S as UploadOptions, x as UploadBody } from "./bucket-Cl46E3jS.js";
|
|
4
4
|
import { n as TemplateValues } from "./template-CwO38Do8.js";
|
|
5
5
|
import { t as AuthSnapshot } from "./bind-Bu_ZNa3W.js";
|
|
6
|
-
import { t as AuthSession } from "./view-
|
|
6
|
+
import { t as AuthSession } from "./view-CF7ihnkg.js";
|
|
7
7
|
import { S as Topic, _ as RealtimeClient, f as PresenceMember, g as PresenceSubscription, p as PresenceOptions, r as LiveCountSeed, u as EventSchemas, w as TopicHandlers, x as SubscriptionStatus, y as SubscribeOptions } from "./index-DunNRdnT.js";
|
|
8
8
|
import { a as BroadcastOptions, f as UseActionOptions, l as LiveQueryHookOptions, n as ActionInputOf, o as ClientLike, r as ActionResultOf, s as LiveCountHookOptions } from "./field-errors-BFOa7WhB.js";
|
|
9
9
|
import { SupabaseClient } from "@supabase/supabase-js";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { b as DbError } from "./result-D7y2fT87.js";
|
|
2
|
-
import { r as AuthState } from "./resolve-
|
|
3
|
-
import { t as AuthSession } from "./view-
|
|
4
|
-
import { r as GuardOptions } from "./respond-
|
|
2
|
+
import { r as AuthState } from "./resolve-ChTYeTEl.js";
|
|
3
|
+
import { t as AuthSession } from "./view-CF7ihnkg.js";
|
|
4
|
+
import { r as GuardOptions } from "./respond-DprrgyXX.js";
|
|
5
5
|
import { StandardSchemaV1 } from "@standard-schema/spec";
|
|
6
6
|
//#region src/server/kit.d.ts
|
|
7
7
|
/** What a server action returns: plain data, safe across any serialization boundary. */
|
package/dist/mcp/index.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
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-
|
|
4
|
-
import { r as GuardOptions } from "../respond-
|
|
3
|
+
import { i as ServerContext, o as ServerOptions, t as BetterServer } from "../server-Bh0EVSwU.js";
|
|
4
|
+
import { r as GuardOptions } from "../respond-DprrgyXX.js";
|
|
5
5
|
import { i as ResourceOperation } from "../index-Bxih3l0u.js";
|
|
6
|
-
import { a as ResourceRouteOptions } from "../resource-
|
|
6
|
+
import { a as ResourceRouteOptions } from "../resource-IPS5xi9q.js";
|
|
7
7
|
import { StandardSchemaV1 } from "@standard-schema/spec";
|
|
8
8
|
//#region src/mcp/mcp.d.ts
|
|
9
9
|
export declare const MCP_PROTOCOL_VERSION: string;
|
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,8 +1,8 @@
|
|
|
1
1
|
import { a as AnyModels, i as AnyFunctions } from "../../types-6BdhkmZe.js";
|
|
2
|
-
import { r as AuthState } from "../../resolve-
|
|
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-
|
|
5
|
-
import { r as GuardOptions, t as AllowedCaller } from "../../respond-
|
|
4
|
+
import { i as ServerContext$1, o as ServerOptions, t as BetterServer } from "../../server-Bh0EVSwU.js";
|
|
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
|
|
8
8
|
interface McpAuthOptions extends ServerOptions, Omit<GuardOptions, "scopes"> {
|
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/nestjs/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { n as RouteGuardOptions } from "../refusal-
|
|
1
|
+
import { n as RouteGuardOptions } from "../refusal-DhSU2Vvr.js";
|
|
2
2
|
import { t as Validated } from "../shared-DDSjEGDR.js";
|
|
3
|
-
import { l as ToNodeOptions } from "../index-
|
|
3
|
+
import { l as ToNodeOptions } from "../index-CdZKQF98.js";
|
|
4
4
|
import { AnyEntry } from "@supabase/middleware";
|
|
5
5
|
import { IncomingMessage, ServerResponse } from "node:http";
|
|
6
6
|
//#region src/nestjs/index.d.ts
|
package/dist/next/index.d.ts
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import { a as AnyModels, i as AnyFunctions } from "../types-6BdhkmZe.js";
|
|
2
|
-
import { r as AuthState } from "../resolve-
|
|
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 {
|
|
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
|
-
import { t as tenantOf } from "../tenant-
|
|
7
|
-
import { n as toSession, t as AuthSession } from "../view-
|
|
8
|
-
import { n as AuthKind, r as GuardOptions } from "../respond-
|
|
9
|
-
import { a as AuthorizedContext, c as Unwrapped, i as AuthorizeOptions, n as ActionParsed, r as ActionResult, t as ActionInput } from "../kit-
|
|
6
|
+
import { t as tenantOf } from "../tenant-BxNFk9bx.js";
|
|
7
|
+
import { n as toSession, t as AuthSession } from "../view-CF7ihnkg.js";
|
|
8
|
+
import { n as AuthKind, r as GuardOptions } from "../respond-DprrgyXX.js";
|
|
9
|
+
import { a as AuthorizedContext, c as Unwrapped, i as AuthorizeOptions, n as ActionParsed, r as ActionResult, t as ActionInput } from "../kit-CkNzZUqv.js";
|
|
10
10
|
import { r as LiveCountSeed, t as CountRunner } from "../index-DunNRdnT.js";
|
|
11
|
-
import { r as MembershipClaim } from "../entitlements-
|
|
11
|
+
import { r as MembershipClaim } from "../entitlements-BKSVGtrG.js";
|
|
12
12
|
import { i as tagFor, t as TagOptions } from "../tags-Cx-LnIQP.js";
|
|
13
|
-
import { n as supportOf, t as SupportView } from "../support-view-
|
|
13
|
+
import { n as supportOf, t as SupportView } from "../support-view-CVOJJLpc.js";
|
|
14
14
|
import { NextRequest } from "next/server.js";
|
|
15
15
|
import { StandardSchemaV1 } from "@standard-schema/spec";
|
|
16
16
|
//#region src/next/collector.d.ts
|
|
@@ -78,6 +78,11 @@ interface ProxyOptions<C = unknown, P = unknown> {
|
|
|
78
78
|
interface EndedSessionOptions {
|
|
79
79
|
readonly paths?: readonly string[];
|
|
80
80
|
readonly redirect?: string;
|
|
81
|
+
/** The `reason` query value on the redirect. Defaults to `session_ended` and `account_banned`. */
|
|
82
|
+
readonly reasons?: {
|
|
83
|
+
readonly ended?: string;
|
|
84
|
+
readonly banned?: string;
|
|
85
|
+
};
|
|
81
86
|
}
|
|
82
87
|
interface ActionOptions<S extends StandardSchemaV1 | undefined, C = unknown, P = unknown, R extends boolean = boolean> extends GuardOptions, AuthorizeOptions<ActionParsed<S>, C, P, R> {
|
|
83
88
|
/** Validates the input (plain object or `FormData`) with any Standard Schema. */
|
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";
|
|
@@ -286,9 +286,9 @@ function requireAal(level, options = {}) {
|
|
|
286
286
|
return NextResponse.redirect(target);
|
|
287
287
|
};
|
|
288
288
|
}
|
|
289
|
-
function endedRedirect(request, path) {
|
|
289
|
+
function endedRedirect(request, path, reason) {
|
|
290
290
|
const target = new URL(path, request.url);
|
|
291
|
-
target.searchParams.set("reason",
|
|
291
|
+
target.searchParams.set("reason", reason);
|
|
292
292
|
return NextResponse.redirect(target);
|
|
293
293
|
}
|
|
294
294
|
function shouldCheckSession(request, options = {}) {
|
|
@@ -485,7 +485,7 @@ function createNext(betterSupabase, options = {}) {
|
|
|
485
485
|
const rendersSignedOut = proxyOptions.expiredPrefetch === "render" && resolution.auth.kind === "anon" && resolution.auth.reason === "expired" && isPrefetch(request);
|
|
486
486
|
const protectMethods = proxyOptions.protectMethods;
|
|
487
487
|
const runsProtect = protectMethods === true ? true : (protectMethods ?? ["GET", "HEAD"]).includes(request.method);
|
|
488
|
-
const custom = (resolution.sessionEnded === true && sessionCheck?.redirect !== void 0 && request.nextUrl.pathname !== sessionCheck.redirect ? endedRedirect(request, sessionCheck.redirect) : void 0) ?? (rendersSignedOut || !runsProtect ? void 0 : await proxyOptions.protect?.(resolution.auth, request));
|
|
488
|
+
const custom = (resolution.sessionEnded === true && sessionCheck?.redirect !== void 0 && request.nextUrl.pathname !== sessionCheck.redirect ? endedRedirect(request, sessionCheck.redirect, resolution.sessionEndedReason === "banned" ? sessionCheck.reasons?.banned ?? "account_banned" : sessionCheck.reasons?.ended ?? "session_ended") : void 0) ?? (rendersSignedOut || !runsProtect ? void 0 : await proxyOptions.protect?.(resolution.auth, request));
|
|
489
489
|
const initial = custom ?? early;
|
|
490
490
|
if (!initial && resolution.cookies.length === 0 && !id && !proxyOptions.after && !proxyOptions.serverTiming) {
|
|
491
491
|
flushAfter();
|
package/dist/node/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { n as RouteGuardOptions } from "../refusal-
|
|
1
|
+
import { n as RouteGuardOptions } from "../refusal-DhSU2Vvr.js";
|
|
2
2
|
import { i as toWebHeaders, r as applyWebHeaders, t as NodeHeaderTarget } from "../node-headers-AO06VhqH.js";
|
|
3
|
-
import { _ as toNodeHandler, a as FastifyReplyLike, b as toWebRequest, c as KoaMiddleware, d as guard, f as koaGuard, g as toKoa, h as toFastify, i as FastifyHook, l as ToNodeOptions, m as toExpress, n as ExpressMiddleware, o as FastifyRequestLike, p as problemErrorHandler, r as ExpressResponse, s as KoaContextLike, t as ExpressErrorHandler, u as fastifyGuard, v as WebRequestOptions, y as sendWebResponse } from "../index-
|
|
3
|
+
import { _ as toNodeHandler, a as FastifyReplyLike, b as toWebRequest, c as KoaMiddleware, d as guard, f as koaGuard, g as toKoa, h as toFastify, i as FastifyHook, l as ToNodeOptions, m as toExpress, n as ExpressMiddleware, o as FastifyRequestLike, p as problemErrorHandler, r as ExpressResponse, s as KoaContextLike, t as ExpressErrorHandler, u as fastifyGuard, v as WebRequestOptions, y as sendWebResponse } from "../index-CdZKQF98.js";
|
|
4
4
|
export { ExpressErrorHandler, ExpressMiddleware, ExpressResponse, FastifyHook, FastifyReplyLike, FastifyRequestLike, KoaContextLike, KoaMiddleware, type NodeHeaderTarget, type RouteGuardOptions, ToNodeOptions, type WebRequestOptions, applyWebHeaders, fastifyGuard, guard, koaGuard, problemErrorHandler, sendWebResponse, toExpress, toFastify, toKoa, toNodeHandler, toWebHeaders, toWebRequest };
|