Skip to content

Commit a41aeeb

Browse files
authored
fix: expand @module comment to restore rich JSR overview (#96)
1 parent c419a1d commit a41aeeb

3 files changed

Lines changed: 63 additions & 14 deletions

File tree

CHANGELOG.md

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,14 @@
22

33
## [1.3.0](https://github.com/supabase/server/compare/server-v1.2.0...server-v1.3.0) (2026-07-03)
44

5-
65
### Features
76

8-
* add attw type export checking to CI ([#93](https://github.com/supabase/server/issues/93)) ([e1e2b72](https://github.com/supabase/server/commit/e1e2b72e81660c787b0445dbdf69946b95324abd))
9-
7+
- add attw type export checking to CI ([#93](https://github.com/supabase/server/issues/93)) ([e1e2b72](https://github.com/supabase/server/commit/e1e2b72e81660c787b0445dbdf69946b95324abd))
108

119
### Bug Fixes
1210

13-
* add ./peer/supabase-js to jsr.json exports ([#94](https://github.com/supabase/server/issues/94)) ([04276d0](https://github.com/supabase/server/commit/04276d015c8b65f50c1944a9e8407fe01f444703))
14-
* **test:** correct sub claim in remote JWKS token fixture and wire tests into CI ([#89](https://github.com/supabase/server/issues/89)) ([744105b](https://github.com/supabase/server/commit/744105b458e637b5211021d3e6b9de2d91da6b72))
11+
- add ./peer/supabase-js to jsr.json exports ([#94](https://github.com/supabase/server/issues/94)) ([04276d0](https://github.com/supabase/server/commit/04276d015c8b65f50c1944a9e8407fe01f444703))
12+
- **test:** correct sub claim in remote JWKS token fixture and wire tests into CI ([#89](https://github.com/supabase/server/issues/89)) ([744105b](https://github.com/supabase/server/commit/744105b458e637b5211021d3e6b9de2d91da6b72))
1513

1614
## [1.2.0](https://github.com/supabase/server/compare/server-v1.1.0...server-v1.2.0) (2026-06-17)
1715

jsr.json

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -11,14 +11,7 @@
1111
"./adapters/nestjs": "./src/adapters/nestjs/index.ts"
1212
},
1313
"publish": {
14-
"include": [
15-
"src/**/*.ts",
16-
"README.md",
17-
"LICENSE"
18-
],
19-
"exclude": [
20-
"src/**/*.test.ts",
21-
"src/**/*.spec.ts"
22-
]
14+
"include": ["src/**/*.ts", "README.md", "LICENSE"],
15+
"exclude": ["src/**/*.test.ts", "src/**/*.spec.ts"]
2316
}
2417
}

src/index.ts

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,63 @@
11
/**
22
* Server-side Supabase utilities for modern runtimes.
3+
*
4+
* `@supabase/server` gives you batteries-included auth and client creation for
5+
* Edge Functions, Workers, and any server runtime that speaks standard `fetch`.
6+
* One import, one line of config — auth is verified, Supabase clients are ready,
7+
* CORS is handled. Your handler only runs on successful auth.
8+
*
9+
* ```ts
10+
* import { withSupabase } from '@supabase/server'
11+
*
12+
* export default {
13+
* fetch: withSupabase({ auth: 'user' }, async (_req, ctx) => {
14+
* const { data: myGames } = await ctx.supabase.from('favorite_games').select()
15+
* return Response.json(myGames)
16+
* }),
17+
* }
18+
* ```
19+
*
20+
* ## Auth modes
21+
*
22+
* | Mode | Credential | Use case |
23+
* |------|-----------|----------|
24+
* | `"user"` | Valid JWT | Authenticated user endpoints |
25+
* | `"publishable"` | Publishable key | Client-facing, key-validated endpoints |
26+
* | `"secret"` | Secret key | Server-to-server, internal calls |
27+
* | `"none"` | None | Open endpoints |
28+
*
29+
* Array syntax tries modes in order — first match wins:
30+
* ```ts
31+
* withSupabase({ auth: ['user', 'secret'] }, handler)
32+
* ```
33+
*
34+
* ## Framework adapters
35+
*
36+
* Adapters for Hono, H3 / Nuxt, Elysia, and NestJS ship inside this package:
37+
*
38+
* ```ts
39+
* import { withSupabase } from '@supabase/server/adapters/hono'
40+
* import { withSupabase } from '@supabase/server/adapters/h3'
41+
* import { withSupabase } from '@supabase/server/adapters/elysia'
42+
* import { withSupabase, SupabaseCtx } from '@supabase/server/adapters/nestjs'
43+
* ```
44+
*
45+
* ## Composable primitives
46+
*
47+
* For custom flows, all lower-level functions are available from `@supabase/server/core`:
48+
*
49+
* ```ts
50+
* import { verifyAuth, createContextClient, createAdminClient } from '@supabase/server/core'
51+
* ```
52+
*
53+
* ## Installation
54+
*
55+
* ```sh
56+
* npm install @supabase/server
57+
* # or
58+
* deno add jsr:@supabase/server
59+
* ```
60+
*
361
* @module
462
* @packageDocumentation
563
*/

0 commit comments

Comments
 (0)