@supabase/lite 0.3.1-next.1 → 0.3.1-next.2
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/LIMITATIONS.md +49 -0
- package/PATTERNS.md +119 -0
- package/README.md +47 -7
- package/STATUS.md +75 -2
- package/dist/cli/index.js +1 -1
- package/dist/cli/lib.js +2 -2
- package/dist/index.js +1 -1
- package/package.json +4 -1
- package/skills/supalite/SKILL.md +38 -0
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: supalite
|
|
3
|
+
description: Use when building or debugging an app that uses `@supabase/lite` (a Supabase-compatible local / browser / edge SQLite runtime). Triggers on phrases like "supabase locally", "local supabase", "supabase lite", "supalite", "offline supabase", "browser sqlite supabase", "@supabase/lite", or when the project's package.json depends on `@supabase/lite`.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# supalite
|
|
7
|
+
|
|
8
|
+
`@supabase/lite` (a.k.a. supalite) is a lightweight TypeScript implementation of the Supabase REST + Auth APIs over SQLite (with PGlite / Postgres as alternative drivers). `@supabase/supabase-js` works against it unchanged.
|
|
9
|
+
|
|
10
|
+
The package is pre-1.0 and changes fast. **Do not rely on this skill's specifics — fetch the installed package's docs first.** Authoritative content (limitations, anti-patterns, patterns, full status) ships inside the package and updates with every `npm install`.
|
|
11
|
+
|
|
12
|
+
## Cold start (do this before writing code)
|
|
13
|
+
|
|
14
|
+
1. `bun add @supabase/lite @supabase/supabase-js` (or `npm install` — honor pinned versions like `pkg.pr.new/...` exactly if the user provided one).
|
|
15
|
+
2. `cat node_modules/@supabase/lite/LIMITATIONS.md` — agent-facing cheat sheet of what's not supported and what to avoid (anti-patterns). One-line bullets, links into STATUS.md for detail. Read this **first**.
|
|
16
|
+
3. `cat node_modules/@supabase/lite/PATTERNS.md` — canonical recipes (per-user RLS, embedded filters, custom server logic, Vite cold start, triggers).
|
|
17
|
+
4. `cat node_modules/@supabase/lite/README.md` — install, quick start, CLI, Vite plugin, project layout.
|
|
18
|
+
5. `cat node_modules/@supabase/lite/STATUS.md` only when you need detail behind a LIMITATIONS bullet, or when planning a feature that touches RLS / embedding / auth.
|
|
19
|
+
6. Pick the right runtime path (see decision rule below) before writing the dev server / client.
|
|
20
|
+
|
|
21
|
+
## Decision rule
|
|
22
|
+
|
|
23
|
+
| Scenario | Use | Notes |
|
|
24
|
+
|---|---|---|
|
|
25
|
+
| Vite project | `@supabase/lite/vite` plugin (same-process) | No separate CLI. Pass `window.location.origin` + any non-empty string to `createClient`. |
|
|
26
|
+
| Non-Vite app, want auto schema-reload | `lite dev` (separate process) | Watches `schemas/*.sql`. |
|
|
27
|
+
| Non-Vite app, manual control / CI / prod-like | `lite start` (separate process) | No watch, no auto-migrate. |
|
|
28
|
+
|
|
29
|
+
**Never** run `lite dev` or `lite start` alongside the Vite plugin — port collision.
|
|
30
|
+
|
|
31
|
+
## Patterns, limitations, anti-patterns
|
|
32
|
+
|
|
33
|
+
The skill deliberately does not duplicate these. They live in the installed package and update on every `npm install`:
|
|
34
|
+
|
|
35
|
+
- **What's limited / what to avoid** → `node_modules/@supabase/lite/LIMITATIONS.md`
|
|
36
|
+
- **How to do common things** → `node_modules/@supabase/lite/PATTERNS.md`
|
|
37
|
+
|
|
38
|
+
Re-read both when starting work on a supalite project, or when the user reports an unexpected behavior — they may already be documented.
|