@supabase/server 0.1.0-alpha.0 → 0.1.1-rc.24
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/adapters/hono/index.d.cts +1 -1
- package/dist/adapters/hono/index.d.mts +1 -1
- package/dist/core/index.d.cts +2 -2
- package/dist/core/index.d.mts +2 -2
- package/dist/{create-admin-client-BZ_3qcxI.d.cts → create-admin-client-BQEHqeFW.d.mts} +3 -3
- package/dist/{create-admin-client-CSX-Q_Fv.d.mts → create-admin-client-CnuiHPpV.d.cts} +3 -3
- package/dist/index.d.cts +5 -5
- package/dist/index.d.mts +5 -5
- package/dist/{types-BLM5-qA8.d.mts → types-C9J9JcPD.d.cts} +3 -3
- package/dist/{types-DNh3Z1O1.d.cts → types-Ceetds5F.d.mts} +3 -3
- package/package.json +4 -4
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { l as WithSupabaseConfig, o as SupabaseContext } from "../../types-
|
|
1
|
+
import { l as WithSupabaseConfig, o as SupabaseContext } from "../../types-C9J9JcPD.cjs";
|
|
2
2
|
import * as hono_types0 from "hono/types";
|
|
3
3
|
|
|
4
4
|
//#region src/adapters/hono/middleware.d.ts
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { l as WithSupabaseConfig, o as SupabaseContext } from "../../types-
|
|
1
|
+
import { l as WithSupabaseConfig, o as SupabaseContext } from "../../types-Ceetds5F.mjs";
|
|
2
2
|
import * as hono_types0 from "hono/types";
|
|
3
3
|
|
|
4
4
|
//#region src/adapters/hono/middleware.d.ts
|
package/dist/core/index.d.cts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import "../types-
|
|
2
|
-
import { a as extractCredentials, i as verifyCredentials, n as createContextClient, o as resolveEnv, r as verifyAuth, t as createAdminClient } from "../create-admin-client-
|
|
1
|
+
import "../types-C9J9JcPD.cjs";
|
|
2
|
+
import { a as extractCredentials, i as verifyCredentials, n as createContextClient, o as resolveEnv, r as verifyAuth, t as createAdminClient } from "../create-admin-client-CnuiHPpV.cjs";
|
|
3
3
|
export { createAdminClient, createContextClient, extractCredentials, resolveEnv, verifyAuth, verifyCredentials };
|
package/dist/core/index.d.mts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import "../types-
|
|
2
|
-
import { a as extractCredentials, i as verifyCredentials, n as createContextClient, o as resolveEnv, r as verifyAuth, t as createAdminClient } from "../create-admin-client-
|
|
1
|
+
import "../types-Ceetds5F.mjs";
|
|
2
|
+
import { a as extractCredentials, i as verifyCredentials, n as createContextClient, o as resolveEnv, r as verifyAuth, t as createAdminClient } from "../create-admin-client-BQEHqeFW.mjs";
|
|
3
3
|
export { createAdminClient, createContextClient, extractCredentials, resolveEnv, verifyAuth, verifyCredentials };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { i as Credentials, n as AllowWithKey, r as AuthResult, s as SupabaseEnv } from "./types-
|
|
1
|
+
import { i as Credentials, n as AllowWithKey, r as AuthResult, s as SupabaseEnv } from "./types-Ceetds5F.mjs";
|
|
2
2
|
import { SupabaseClient } from "@supabase/supabase-js";
|
|
3
3
|
|
|
4
4
|
//#region src/errors.d.ts
|
|
@@ -52,9 +52,9 @@ declare function verifyAuth(request: Request, options: VerifyAuthOptions): Promi
|
|
|
52
52
|
}>;
|
|
53
53
|
//#endregion
|
|
54
54
|
//#region src/core/create-context-client.d.ts
|
|
55
|
-
declare function createContextClient(token?: string | null, env?: Partial<SupabaseEnv>, keyName?: string | null): SupabaseClient
|
|
55
|
+
declare function createContextClient<Database = unknown>(token?: string | null, env?: Partial<SupabaseEnv>, keyName?: string | null): SupabaseClient<Database>;
|
|
56
56
|
//#endregion
|
|
57
57
|
//#region src/core/create-admin-client.d.ts
|
|
58
|
-
declare function createAdminClient(env?: Partial<SupabaseEnv>, keyName?: string | null): SupabaseClient
|
|
58
|
+
declare function createAdminClient<Database = unknown>(env?: Partial<SupabaseEnv>, keyName?: string | null): SupabaseClient<Database>;
|
|
59
59
|
//#endregion
|
|
60
60
|
export { extractCredentials as a, EnvError as c, verifyCredentials as i, createContextClient as n, resolveEnv as o, verifyAuth as r, AuthError as s, createAdminClient as t };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { i as Credentials, n as AllowWithKey, r as AuthResult, s as SupabaseEnv } from "./types-
|
|
1
|
+
import { i as Credentials, n as AllowWithKey, r as AuthResult, s as SupabaseEnv } from "./types-C9J9JcPD.cjs";
|
|
2
2
|
import { SupabaseClient } from "@supabase/supabase-js";
|
|
3
3
|
|
|
4
4
|
//#region src/errors.d.ts
|
|
@@ -52,9 +52,9 @@ declare function verifyAuth(request: Request, options: VerifyAuthOptions): Promi
|
|
|
52
52
|
}>;
|
|
53
53
|
//#endregion
|
|
54
54
|
//#region src/core/create-context-client.d.ts
|
|
55
|
-
declare function createContextClient(token?: string | null, env?: Partial<SupabaseEnv>, keyName?: string | null): SupabaseClient
|
|
55
|
+
declare function createContextClient<Database = unknown>(token?: string | null, env?: Partial<SupabaseEnv>, keyName?: string | null): SupabaseClient<Database>;
|
|
56
56
|
//#endregion
|
|
57
57
|
//#region src/core/create-admin-client.d.ts
|
|
58
|
-
declare function createAdminClient(env?: Partial<SupabaseEnv>, keyName?: string | null): SupabaseClient
|
|
58
|
+
declare function createAdminClient<Database = unknown>(env?: Partial<SupabaseEnv>, keyName?: string | null): SupabaseClient<Database>;
|
|
59
59
|
//#endregion
|
|
60
60
|
export { extractCredentials as a, EnvError as c, verifyCredentials as i, createContextClient as n, resolveEnv as o, verifyAuth as r, AuthError as s, createAdminClient as t };
|
package/dist/index.d.cts
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { a as JWTClaims, c as UserClaims, i as Credentials, l as WithSupabaseConfig, n as AllowWithKey, o as SupabaseContext, r as AuthResult, s as SupabaseEnv, t as Allow } from "./types-
|
|
2
|
-
import { a as extractCredentials, c as EnvError, i as verifyCredentials, n as createContextClient, o as resolveEnv, r as verifyAuth, s as AuthError, t as createAdminClient } from "./create-admin-client-
|
|
1
|
+
import { a as JWTClaims, c as UserClaims, i as Credentials, l as WithSupabaseConfig, n as AllowWithKey, o as SupabaseContext, r as AuthResult, s as SupabaseEnv, t as Allow } from "./types-C9J9JcPD.cjs";
|
|
2
|
+
import { a as extractCredentials, c as EnvError, i as verifyCredentials, n as createContextClient, o as resolveEnv, r as verifyAuth, s as AuthError, t as createAdminClient } from "./create-admin-client-CnuiHPpV.cjs";
|
|
3
3
|
|
|
4
4
|
//#region src/with-supabase.d.ts
|
|
5
|
-
declare function withSupabase(config: WithSupabaseConfig, handler: (req: Request, ctx: SupabaseContext) => Promise<Response>): (req: Request) => Promise<Response>;
|
|
5
|
+
declare function withSupabase<Database = unknown>(config: WithSupabaseConfig, handler: (req: Request, ctx: SupabaseContext<Database>) => Promise<Response>): (req: Request) => Promise<Response>;
|
|
6
6
|
//#endregion
|
|
7
7
|
//#region src/create-supabase-context.d.ts
|
|
8
|
-
declare function createSupabaseContext(request: Request, options?: WithSupabaseConfig): Promise<{
|
|
9
|
-
data: SupabaseContext
|
|
8
|
+
declare function createSupabaseContext<Database = unknown>(request: Request, options?: WithSupabaseConfig): Promise<{
|
|
9
|
+
data: SupabaseContext<Database>;
|
|
10
10
|
error: null;
|
|
11
11
|
} | {
|
|
12
12
|
data: null;
|
package/dist/index.d.mts
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { a as JWTClaims, c as UserClaims, i as Credentials, l as WithSupabaseConfig, n as AllowWithKey, o as SupabaseContext, r as AuthResult, s as SupabaseEnv, t as Allow } from "./types-
|
|
2
|
-
import { a as extractCredentials, c as EnvError, i as verifyCredentials, n as createContextClient, o as resolveEnv, r as verifyAuth, s as AuthError, t as createAdminClient } from "./create-admin-client-
|
|
1
|
+
import { a as JWTClaims, c as UserClaims, i as Credentials, l as WithSupabaseConfig, n as AllowWithKey, o as SupabaseContext, r as AuthResult, s as SupabaseEnv, t as Allow } from "./types-Ceetds5F.mjs";
|
|
2
|
+
import { a as extractCredentials, c as EnvError, i as verifyCredentials, n as createContextClient, o as resolveEnv, r as verifyAuth, s as AuthError, t as createAdminClient } from "./create-admin-client-BQEHqeFW.mjs";
|
|
3
3
|
|
|
4
4
|
//#region src/with-supabase.d.ts
|
|
5
|
-
declare function withSupabase(config: WithSupabaseConfig, handler: (req: Request, ctx: SupabaseContext) => Promise<Response>): (req: Request) => Promise<Response>;
|
|
5
|
+
declare function withSupabase<Database = unknown>(config: WithSupabaseConfig, handler: (req: Request, ctx: SupabaseContext<Database>) => Promise<Response>): (req: Request) => Promise<Response>;
|
|
6
6
|
//#endregion
|
|
7
7
|
//#region src/create-supabase-context.d.ts
|
|
8
|
-
declare function createSupabaseContext(request: Request, options?: WithSupabaseConfig): Promise<{
|
|
9
|
-
data: SupabaseContext
|
|
8
|
+
declare function createSupabaseContext<Database = unknown>(request: Request, options?: WithSupabaseConfig): Promise<{
|
|
9
|
+
data: SupabaseContext<Database>;
|
|
10
10
|
error: null;
|
|
11
11
|
} | {
|
|
12
12
|
data: null;
|
|
@@ -47,9 +47,9 @@ interface WithSupabaseConfig {
|
|
|
47
47
|
env?: Partial<SupabaseEnv>;
|
|
48
48
|
cors?: boolean | Record<string, string>;
|
|
49
49
|
}
|
|
50
|
-
interface SupabaseContext {
|
|
51
|
-
supabase: SupabaseClient
|
|
52
|
-
supabaseAdmin: SupabaseClient
|
|
50
|
+
interface SupabaseContext<Database = unknown> {
|
|
51
|
+
supabase: SupabaseClient<Database>;
|
|
52
|
+
supabaseAdmin: SupabaseClient<Database>;
|
|
53
53
|
/** JWT-derived identity. For the full Supabase User object, call `supabase.auth.getUser()`. */
|
|
54
54
|
userClaims: UserClaims | null;
|
|
55
55
|
claims: JWTClaims | null;
|
|
@@ -47,9 +47,9 @@ interface WithSupabaseConfig {
|
|
|
47
47
|
env?: Partial<SupabaseEnv>;
|
|
48
48
|
cors?: boolean | Record<string, string>;
|
|
49
49
|
}
|
|
50
|
-
interface SupabaseContext {
|
|
51
|
-
supabase: SupabaseClient
|
|
52
|
-
supabaseAdmin: SupabaseClient
|
|
50
|
+
interface SupabaseContext<Database = unknown> {
|
|
51
|
+
supabase: SupabaseClient<Database>;
|
|
52
|
+
supabaseAdmin: SupabaseClient<Database>;
|
|
53
53
|
/** JWT-derived identity. For the full Supabase User object, call `supabase.auth.getUser()`. */
|
|
54
54
|
userClaims: UserClaims | null;
|
|
55
55
|
claims: JWTClaims | null;
|
package/package.json
CHANGED
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@supabase/server",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.1-rc.24",
|
|
4
4
|
"description": "Server-side utilities for Supabase. Handles auth, client creation, and context injection so you write business logic, not boilerplate.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"edge",
|
|
7
7
|
"functions",
|
|
8
8
|
"supabase"
|
|
9
9
|
],
|
|
10
|
-
"homepage": "https://github.com/supabase/
|
|
10
|
+
"homepage": "https://github.com/supabase/server#readme",
|
|
11
11
|
"bugs": {
|
|
12
|
-
"url": "https://github.com/supabase/
|
|
12
|
+
"url": "https://github.com/supabase/server/issues"
|
|
13
13
|
},
|
|
14
14
|
"repository": {
|
|
15
15
|
"type": "git",
|
|
16
|
-
"url": "git+https://github.com/supabase/
|
|
16
|
+
"url": "git+https://github.com/supabase/server.git"
|
|
17
17
|
},
|
|
18
18
|
"license": "MIT",
|
|
19
19
|
"author": "supabase",
|