@supabase/lite 0.0.1-next.2 → 0.0.1-next.4
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 +17 -17
- package/STATUS.md +844 -0
- package/UPGRADE.md +221 -0
- package/dist/cli/index.js +362 -30854
- package/dist/cli/lib.js +78 -18528
- package/dist/db/browser/index.js +50 -15915
- package/dist/db/bun/index.js +50 -15903
- package/dist/db/fallback.js +49 -15799
- package/dist/db/node/index.js +50 -15896
- package/dist/db/postgres/PostgresConnection.js +18 -365
- package/dist/db/postgres/pglite/PgliteConnection.js +20 -642
- package/dist/db/workerd/index.js +49 -16021
- package/dist/index.js +289 -32244
- package/dist/vite/index.js +3 -1910
- package/package.json +4 -7
package/README.md
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|

|
|
5
5
|

|
|
6
6
|
|
|
7
|
-

|
|
7
|
+

|
|
8
8
|
|
|
9
9
|
# Supabase Lite
|
|
10
10
|
|
|
@@ -12,9 +12,9 @@ Lightweight TypeScript-native Supabase implementation. SQLite as the primary dat
|
|
|
12
12
|
|
|
13
13
|
Supalite targets AI builders who want quick, cheap prototypes today with a clear path to upgrade later. It supplements Supabase rather than replacing it. The project stays lightweight by implementing only what fits on top of non-UDF SQLite: roughly 60% of the most-used Supabase features, focused on the subset most useful for fast iteration.
|
|
14
14
|
|
|
15
|
-
**Scope:** Both declarative schema (`supabase/schemas/*.sql`) and imperative Postgres migrations (`supabase/migrations/*.sql`, Supabase-CLI compatible) are supported. See [Migrations](#migrations). Advanced Postgres-specific column types (ranges, arrays of composites, and similar) are not available.
|
|
15
|
+
**Scope:** Both declarative schema (`supabase/schemas/*.sql`) and imperative Postgres migrations (`supabase/migrations/*.sql`, Supabase-CLI compatible) are supported. See [Migrations](#migrations). Advanced Postgres-specific column types (ranges, arrays of composites, and similar) are not available.
|
|
16
16
|
|
|
17
|
-
Validated against the upstream PostgREST and GoTrue test suites: 1,803 tests passing.
|
|
17
|
+
Validated against the upstream PostgREST and GoTrue test suites: 1,803 tests passing.
|
|
18
18
|
|
|
19
19
|
---
|
|
20
20
|
|
|
@@ -24,15 +24,15 @@ Compatibility is measured from the `@supabase/supabase-js` surface. The goal is
|
|
|
24
24
|
|
|
25
25
|
| Service | Status | Notes |
|
|
26
26
|
|-------------------------|--------|--------------------------------------------------------------------|
|
|
27
|
-
| [Databases](STATUS.md#database-support) | ✅ | `bun:sqlite`, `node:sqlite`, sqlite-wasm, Cloudflare D1 + DO, PGlite, PostgreSQL |
|
|
28
|
-
| [Data API (PostgREST)](STATUS.md#database-api-postgrest-compatible) | ✅ | 47/74 supabase-js methods on SQLite: `from`, `select`, `insert`, `update`, `delete`, `upsert`, `eq`, `neq`, `gt`, `gte`, `lt`, `lte`, `in`, `notIn`, `is`, `isDistinct`, `like`, `ilike`, `likeAllOf`, `likeAnyOf`, `ilikeAllOf`, `ilikeAnyOf`, `match`, `or`, `not`, `filter`, `order`, `limit`, `range`, `single`, `maybeSingle`, `csv`, `abortSignal`, `setHeader`, `throwOnError`, `maxAffected`, `returns`, `overrideTypes`, plus full resource embedding (FK joins, `!inner`, spreads, nested, aggregates). Partial: `contains`, `containedBy`, `overlaps`. `rpc` not supported on SQLite. 72/74 on Postgres. |
|
|
29
|
-
| [Auth API (GoTrue)](STATUS.md#auth-api-gotrue-compatible) | ✅ | 21/63 supabase-js methods (11 backend + 10 client-side helpers): `signUp`, `signInWithPassword`, `signInWithOtp`, `verifyOtp`, `refreshSession`, `signOut`, `getUser`, `updateUser`, `resetPasswordForEmail`, `resend`, `reauthenticate`. OAuth, anonymous, identity linking, admin API, and MFA planned. |
|
|
30
|
-
| [Storage API](STATUS.md#storage-api-compatible) | 🧪 | 20/20 supabase-js methods: `upload`, `download`, `list`, `remove`, `move`, `copy`, `info`, `exists`, `update`, `getPublicUrl`, `createSignedUrl`, `createSignedUrls`, `createSignedUploadUrl`, `uploadToSignedUrl`, `listBuckets`, `getBucket`, `createBucket`, `updateBucket`, `deleteBucket`, `emptyBucket`. Role-based access + RLS pending. <br />⚠️ Gated behind `EXPERIMENTAL_STORAGE`. |
|
|
27
|
+
| [Databases](https://github.com/supabase-community/lite/blob/HEAD/STATUS.md#database-support) | ✅ | `bun:sqlite`, `node:sqlite`, sqlite-wasm, Cloudflare D1 + DO, PGlite, PostgreSQL |
|
|
28
|
+
| [Data API (PostgREST)](https://github.com/supabase-community/lite/blob/HEAD/STATUS.md#database-api-postgrest-compatible) | ✅ | 47/74 supabase-js methods on SQLite: `from`, `select`, `insert`, `update`, `delete`, `upsert`, `eq`, `neq`, `gt`, `gte`, `lt`, `lte`, `in`, `notIn`, `is`, `isDistinct`, `like`, `ilike`, `likeAllOf`, `likeAnyOf`, `ilikeAllOf`, `ilikeAnyOf`, `match`, `or`, `not`, `filter`, `order`, `limit`, `range`, `single`, `maybeSingle`, `csv`, `abortSignal`, `setHeader`, `throwOnError`, `maxAffected`, `returns`, `overrideTypes`, plus full resource embedding (FK joins, `!inner`, spreads, nested, aggregates). Partial: `contains`, `containedBy`, `overlaps`. `rpc` not supported on SQLite. 72/74 on Postgres. |
|
|
29
|
+
| [Auth API (GoTrue)](https://github.com/supabase-community/lite/blob/HEAD/STATUS.md#auth-api-gotrue-compatible) | ✅ | 21/63 supabase-js methods (11 backend + 10 client-side helpers): `signUp`, `signInWithPassword`, `signInWithOtp`, `verifyOtp`, `refreshSession`, `signOut`, `getUser`, `updateUser`, `resetPasswordForEmail`, `resend`, `reauthenticate`. OAuth, anonymous, identity linking, admin API, and MFA planned. |
|
|
30
|
+
| [Storage API](https://github.com/supabase-community/lite/blob/HEAD/STATUS.md#storage-api-compatible) | 🧪 | 20/20 supabase-js methods: `upload`, `download`, `list`, `remove`, `move`, `copy`, `info`, `exists`, `update`, `getPublicUrl`, `createSignedUrl`, `createSignedUrls`, `createSignedUploadUrl`, `uploadToSignedUrl`, `listBuckets`, `getBucket`, `createBucket`, `updateBucket`, `deleteBucket`, `emptyBucket`. Role-based access + RLS pending. <br />⚠️ Gated behind `EXPERIMENTAL_STORAGE`. |
|
|
31
31
|
| Realtime | 🔄 | Coming soon |
|
|
32
32
|
| Edge Functions | 🔄 | Coming soon |
|
|
33
33
|
| Cloud Hosting | 🔄 | Coming soon |
|
|
34
|
-
| [CLI](STATUS.md#cli) | ✅ | Upstream `supabase` CLI parity for: `init`, `start`, `db diff`, `db query`. Aligned to v2.98.2 command shape. |
|
|
35
|
-
| [Upgrade to Supabase](UPGRADE.md) | 🧪 | `lite upgrade` migrates a project to hosted or local Supabase: schema + user-table data + auth sessions (signing-key import). Storage/realtime migration pending. SQLite shim health audit via `--dry-run`. |
|
|
34
|
+
| [CLI](https://github.com/supabase-community/lite/blob/HEAD/STATUS.md#cli) | ✅ | Upstream `supabase` CLI parity for: `init`, `start`, `db diff`, `db query`. Aligned to v2.98.2 command shape. |
|
|
35
|
+
| [Upgrade to Supabase](https://github.com/supabase-community/lite/blob/HEAD/UPGRADE.md) | 🧪 | `lite upgrade` migrates a project to hosted or local Supabase: schema + user-table data + auth sessions (signing-key import). Storage/realtime migration pending. SQLite shim health audit via `--dry-run`. |
|
|
36
36
|
|
|
37
37
|
---
|
|
38
38
|
|
|
@@ -106,7 +106,7 @@ lite upgrade --target local # initialize/migrate local Supabase in the current
|
|
|
106
106
|
lite upgrade --target local --local-dir ../my-local-supabase
|
|
107
107
|
```
|
|
108
108
|
|
|
109
|
-
See [UPGRADE.md](UPGRADE.md) for upgrade behavior, target differences, session migration, known gaps, and test strategy.
|
|
109
|
+
See [UPGRADE.md](https://github.com/supabase-community/lite/blob/HEAD/UPGRADE.md) for upgrade behavior, target differences, session migration, known gaps, and test strategy.
|
|
110
110
|
|
|
111
111
|
### Telemetry
|
|
112
112
|
|
|
@@ -151,7 +151,7 @@ The plugin auto-resolves `./supabase/config.toml`, applies the schema on boot,
|
|
|
151
151
|
watches `schemas/*.sql` for hot-reload, and mounts `/auth/v1`, `/rest/v1`, and
|
|
152
152
|
`/_system` on the Vite server. Only active during `vite` / `vite dev`.
|
|
153
153
|
|
|
154
|
-
See [`examples/todo`](examples/todo) for a full Vite + React + Tailwind + RLS example, or [`examples/next-todo`](examples/next-todo) for the same pattern using Next.js App Router catch-all route handlers.
|
|
154
|
+
See [`examples/todo`](https://github.com/supabase-community/lite/tree/HEAD/examples/todo) for a full Vite + React + Tailwind + RLS example, or [`examples/next-todo`](https://github.com/supabase-community/lite/tree/HEAD/examples/next-todo) for the same pattern using Next.js App Router catch-all route handlers.
|
|
155
155
|
|
|
156
156
|
---
|
|
157
157
|
|
|
@@ -206,7 +206,7 @@ Write **Postgres DDL** in `supabase/schemas/*.sql`. When the DB driver is SQLite
|
|
|
206
206
|
|
|
207
207
|
RLS works across all backends: on SQLite, policies are extracted from DDL and enforced at the application layer by rewriting the query AST; on PGlite/Postgres, native RLS is used. `auth.uid()`, `auth.jwt()`, and roles (`anon`, `authenticated`) resolve from the JWT.
|
|
208
208
|
|
|
209
|
-
Full translation reference: [STATUS.md#postgres-to-sqlite-translation](STATUS.md#postgres-to-sqlite-translation) and [`app/POSTGRES-SQLITE-COMPAT.md`](app/POSTGRES-SQLITE-COMPAT.md).
|
|
209
|
+
Full translation reference: [STATUS.md#postgres-to-sqlite-translation](https://github.com/supabase-community/lite/blob/HEAD/STATUS.md#postgres-to-sqlite-translation) and [`app/POSTGRES-SQLITE-COMPAT.md`](https://github.com/supabase-community/lite/blob/HEAD/app/POSTGRES-SQLITE-COMPAT.md).
|
|
210
210
|
|
|
211
211
|
---
|
|
212
212
|
|
|
@@ -282,17 +282,17 @@ await app.connection.createMigrator(schema).migrate();
|
|
|
282
282
|
export default app; // app.fetch handles requests
|
|
283
283
|
```
|
|
284
284
|
|
|
285
|
-
### Supported
|
|
285
|
+
### Supported databases
|
|
286
286
|
|
|
287
|
-
| Runtime
|
|
287
|
+
| Runtime/DB | Driver |
|
|
288
288
|
|--------------|----------------------------------|
|
|
289
289
|
| Bun | `bun:sqlite` (auto) |
|
|
290
290
|
| Node.js ≥ 22 | `node:sqlite` (auto) |
|
|
291
291
|
| Browser | `@sqlite.org/sqlite-wasm` (auto) |
|
|
292
|
-
|
|
|
293
|
-
|
|
|
292
|
+
| Workerd | `@supabase/lite/workerd` |
|
|
293
|
+
| PGlite | `@supabase/lite/pglite` |
|
|
294
|
+
| Postgres | `@supabase/lite/postgres` |
|
|
294
295
|
|
|
295
|
-
Edge runtime bindings are also supported. See [STATUS.md#database-support](STATUS.md#database-support).
|
|
296
296
|
|
|
297
297
|
---
|
|
298
298
|
|