Skip to content

Commit e184b8e

Browse files
authored
docs: add @category tags to public API to prep for supabase docs (#95)
* docs: add @category tags to public API and add nestjs to TypeDoc entry points * docs: add @category tags, fix TypeDoc cross-module links, export options types * docs: some small missing things * docs: add @module for jsr score
1 parent 04276d0 commit e184b8e

24 files changed

Lines changed: 146 additions & 36 deletions

CHANGELOG.md

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,15 @@
22

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

5-
65
### Features
76

8-
* add NestJS adapter ([#55](https://github.com/supabase/server/issues/55)) ([3052a6b](https://github.com/supabase/server/commit/3052a6b30931f0478bfc4f9dcd25505292b585a9))
9-
* add support for `HS256` JWKs ([#83](https://github.com/supabase/server/issues/83)) ([67c840d](https://github.com/supabase/server/commit/67c840dc5e8df9374877ca94dc6b6e278e4b13f9))
10-
7+
- add NestJS adapter ([#55](https://github.com/supabase/server/issues/55)) ([3052a6b](https://github.com/supabase/server/commit/3052a6b30931f0478bfc4f9dcd25505292b585a9))
8+
- add support for `HS256` JWKs ([#83](https://github.com/supabase/server/issues/83)) ([67c840d](https://github.com/supabase/server/commit/67c840dc5e8df9374877ca94dc6b6e278e4b13f9))
119

1210
### Bug Fixes
1311

14-
* **docs:** Replace manual context casting with Hono Env type ([#77](https://github.com/supabase/server/issues/77)) ([5ac7ccf](https://github.com/supabase/server/commit/5ac7ccf629c246164659b8c1dc329c3e3066ff14))
15-
* **test:** lint regression in hono tests ([#79](https://github.com/supabase/server/issues/79)) ([182412b](https://github.com/supabase/server/commit/182412b2f0586fa942a6b6d2662fddf0776da9cf))
12+
- **docs:** Replace manual context casting with Hono Env type ([#77](https://github.com/supabase/server/issues/77)) ([5ac7ccf](https://github.com/supabase/server/commit/5ac7ccf629c246164659b8c1dc329c3e3066ff14))
13+
- **test:** lint regression in hono tests ([#79](https://github.com/supabase/server/issues/79)) ([182412b](https://github.com/supabase/server/commit/182412b2f0586fa942a6b6d2662fddf0776da9cf))
1614

1715
## [1.1.0](https://github.com/supabase/server/compare/server-v1.0.0...server-v1.1.0) (2026-05-19)
1816

src/adapters/elysia/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
/**
22
* Elysia framework adapter for `@supabase/server`.
33
*
4+
* @module
45
* @packageDocumentation
56
*/
67

src/adapters/elysia/plugin.ts

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,14 @@ import { createSupabaseContext } from '../../create-supabase-context.js'
44
import type { AuthError } from '../../errors.js'
55
import type { SupabaseContext, WithSupabaseConfig } from '../../types.js'
66

7+
/**
8+
* Wraps an {@link AuthError} as an Elysia-compatible error.
9+
*
10+
* Discriminate in `onError` via `code === 'SupabaseError'`. The original
11+
* `AuthError` is available as the typed `.cause`.
12+
*
13+
* @category Adapters
14+
*/
715
export class SupabaseError extends Error {
816
status: number
917
declare cause: AuthError
@@ -23,7 +31,7 @@ export class SupabaseError extends Error {
2331
* @param config - Auth modes and optional environment overrides. CORS is excluded — use Elysia's CORS utilities.
2432
* @returns An Elysia plugin that exposes `supabaseContext`.
2533
*
26-
* @example App-wide auth via `.use()`
34+
* @example App-wide auth via .use()
2735
* ```ts
2836
* import { Elysia } from 'elysia'
2937
* import { withSupabase } from '@supabase/server/adapters/elysia'
@@ -38,7 +46,7 @@ export class SupabaseError extends Error {
3846
* app.listen(3000)
3947
* ```
4048
*
41-
* @example Per-route auth via scoped `.use()`
49+
* @example Per-route auth via scoped .use()
4250
* ```ts
4351
* import { Elysia } from 'elysia'
4452
* import { withSupabase } from '@supabase/server/adapters/elysia'
@@ -55,6 +63,8 @@ export class SupabaseError extends Error {
5563
*
5664
* app.listen(3000)
5765
* ```
66+
*
67+
* @category Adapters
5868
*/
5969
// The explicit return type below mirrors Elysia's own generic defaults, which use
6070
// `{}` literals — switching to `object` or `Record<string, never>` would not satisfy

src/adapters/h3/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
/**
22
* H3 framework adapter for `@supabase/server`.
33
*
4+
* @module
45
* @packageDocumentation
56
*/
67

src/adapters/h3/middleware.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ import type { SupabaseContext, WithSupabaseConfig } from '../../types.js'
1313
* @param config - Auth modes and optional environment overrides. CORS is excluded — use H3's CORS utilities.
1414
* @returns An H3 middleware.
1515
*
16-
* @example App-wide auth via `app.use()`
16+
* @example App-wide auth via app.use()
1717
* ```ts
1818
* import { H3 } from 'h3'
1919
* import { withSupabase } from '@supabase/server/adapters/h3'
@@ -29,7 +29,7 @@ import type { SupabaseContext, WithSupabaseConfig } from '../../types.js'
2929
* export default { fetch: app.fetch }
3030
* ```
3131
*
32-
* @example Per-route auth via `defineHandler`
32+
* @example Per-route auth via defineHandler
3333
* ```ts
3434
* import { defineHandler } from 'h3'
3535
* import { withSupabase } from '@supabase/server/adapters/h3'
@@ -42,6 +42,8 @@ import type { SupabaseContext, WithSupabaseConfig } from '../../types.js'
4242
* },
4343
* })
4444
* ```
45+
*
46+
* @category Adapters
4547
*/
4648
export function withSupabase(
4749
config?: Omit<WithSupabaseConfig, 'cors'>,

src/adapters/hono/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
/**
22
* Hono framework adapter for `@supabase/server`.
33
*
4+
* @module
45
* @packageDocumentation
56
*/
67

src/adapters/hono/middleware.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,8 @@ import type { SupabaseContext, WithSupabaseConfig } from '../../types.js'
3737
*
3838
* export default { fetch: app.fetch }
3939
* ```
40+
*
41+
* @category Adapters
4042
*/
4143
export function withSupabase(
4244
config?: Omit<WithSupabaseConfig, 'cors'>,

src/adapters/nestjs/decorator.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,8 @@ import type { SupabaseContext } from '../../types.js'
3232
* }
3333
* }
3434
* ```
35+
*
36+
* @category Adapters
3537
*/
3638
export const SupabaseCtx: (
3739
data?: keyof SupabaseContext,

src/adapters/nestjs/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
/**
22
* NestJS framework adapter for `@supabase/server`.
33
*
4+
* @module
45
* @packageDocumentation
56
*/
67

src/adapters/nestjs/middleware.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,8 @@ function toWebRequest(req: NestRequestLike): Request {
8181
* }
8282
* }
8383
* ```
84+
*
85+
* @category Adapters
8486
*/
8587
export function withSupabase(
8688
config?: Omit<WithSupabaseConfig, 'cors'>,

0 commit comments

Comments
 (0)