@supabase/server 1.1.0-rc.63 → 1.1.0-rc.64
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/README.md +16 -35
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
[](https://pkg.pr.new/~/supabase/server)
|
|
6
6
|
[](https://supabase.github.io/server/)
|
|
7
7
|
|
|
8
|
-
> **v1.
|
|
8
|
+
> **v1.X — Public Beta.** First stable release under SemVer: breaking changes only ship as a major bump. The package is still early — expect new adapters, ergonomic improvements, and features to land frequently in minor releases. Found a rough edge? [Open an issue](https://github.com/supabase/server/issues) or [submit a PR](https://github.com/supabase/server/blob/main/CONTRIBUTING.md).
|
|
9
9
|
|
|
10
10
|
> **Coming from a `0.x` release?** See [MIGRATION.md](MIGRATION.md) for the v0 → v1 rename map (`allow` → `auth`, `'public'` → `'publishable'`, `authType` → `authMode`, `claims` → `jwtClaims`, …).
|
|
11
11
|
|
|
@@ -262,40 +262,16 @@ withSupabase(
|
|
|
262
262
|
|
|
263
263
|
## Framework Adapters
|
|
264
264
|
|
|
265
|
-
Adapters wrap `withSupabase` for a specific framework's middleware contract.
|
|
265
|
+
Adapters wrap `withSupabase` for a specific framework's middleware contract. They ship inside `@supabase/server`, so a single `npm install @supabase/server` covers the framework you're using — no separate package per adapter.
|
|
266
|
+
|
|
267
|
+
> **Adapters are a community initiative.** Every adapter in this repo originated as a community contribution — Hono and H3 included. The Supabase team reviews PRs, runs security and regression triage, and ships releases; the original contributor is the de-facto domain expert for their adapter and the first responder on framework-version bumps. Want to add a new one? See [`src/adapters/README.md`](src/adapters/README.md) for the contribution requirements (tests, types, docs, build wiring).
|
|
266
268
|
|
|
267
269
|
| Framework | Import | Framework version | Docs |
|
|
268
270
|
| --------- | -------------------------------- | ----------------- | ---------------------------------------------- |
|
|
269
271
|
| Hono | `@supabase/server/adapters/hono` | `^4.0.0` | [docs/adapters/hono.md](docs/adapters/hono.md) |
|
|
270
272
|
| H3 / Nuxt | `@supabase/server/adapters/h3` | `^2.0.0` | [docs/adapters/h3.md](docs/adapters/h3.md) |
|
|
271
273
|
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
```ts
|
|
275
|
-
import { Hono } from 'hono'
|
|
276
|
-
import { withSupabase } from '@supabase/server/adapters/hono'
|
|
277
|
-
|
|
278
|
-
const app = new Hono()
|
|
279
|
-
app.use('*', withSupabase({ auth: 'user' }))
|
|
280
|
-
|
|
281
|
-
export default { fetch: app.fetch }
|
|
282
|
-
```
|
|
283
|
-
|
|
284
|
-
See [docs/adapters/hono.md](docs/adapters/hono.md) for per-route auth, CORS, error handling, and other patterns.
|
|
285
|
-
|
|
286
|
-
### H3 / Nuxt
|
|
287
|
-
|
|
288
|
-
```ts
|
|
289
|
-
import { H3 } from 'h3'
|
|
290
|
-
import { withSupabase } from '@supabase/server/adapters/h3'
|
|
291
|
-
|
|
292
|
-
const app = new H3()
|
|
293
|
-
app.use(withSupabase({ auth: 'user' }))
|
|
294
|
-
|
|
295
|
-
export default { fetch: app.fetch }
|
|
296
|
-
```
|
|
297
|
-
|
|
298
|
-
See [docs/adapters/h3.md](docs/adapters/h3.md) for per-route auth, Nuxt server-middleware patterns, CORS, and more.
|
|
274
|
+
See the per-adapter docs above for setup, per-route auth, CORS, error handling, and other patterns.
|
|
299
275
|
|
|
300
276
|
## Primitives
|
|
301
277
|
|
|
@@ -421,12 +397,17 @@ For other environments, pass overrides via the `env` config option or `resolveEn
|
|
|
421
397
|
|
|
422
398
|
## Runtimes
|
|
423
399
|
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
400
|
+
`@supabase/server` runs anywhere standard Web `fetch` does — pick the row that matches your deployment target.
|
|
401
|
+
|
|
402
|
+
| Target | Notes |
|
|
403
|
+
| --------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------- |
|
|
404
|
+
| **Supabase Edge Functions** | Zero config — environment variables are auto-injected. |
|
|
405
|
+
| **Vercel Functions** | Edge runtime: `export default { fetch }`. Node runtime: use a [framework adapter](#framework-adapters) or [core primitives](#primitives). |
|
|
406
|
+
| **Cloudflare Workers** | Enable `nodejs_compat` in `wrangler.toml`, or pass overrides via the `env` config option. |
|
|
407
|
+
| **Deno / Bun** | Works out of the box via `export default { fetch }`. |
|
|
408
|
+
| **Node.js** | Use a [framework adapter](#framework-adapters) or [core primitives](#primitives) with your framework of choice. |
|
|
409
|
+
|
|
410
|
+
Using a framework? See [Framework Adapters](#framework-adapters) for Hono and H3 / Nuxt, or [`docs/ssr-frameworks.md`](docs/ssr-frameworks.md) for Next.js / SvelteKit / Remix (compose with [`@supabase/ssr`](https://github.com/supabase/ssr)).
|
|
430
411
|
|
|
431
412
|
### Does this replace `@supabase/ssr`?
|
|
432
413
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@supabase/server",
|
|
3
|
-
"version": "1.1.0-rc.
|
|
3
|
+
"version": "1.1.0-rc.64",
|
|
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",
|