@selvajs/supabase-provider 0.16.1-beta.1 → 0.16.1-beta.3
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
CHANGED
|
@@ -34,7 +34,10 @@ Runs the Selva backend against **either** a managed Supabase project (production
|
|
|
34
34
|
|
|
35
35
|
All env vars are documented in [`packages/selva/.env.example`](../../selva/.env.example) — copy that file to `.env` and edit it. The Supabase provider needs `SUPABASE_URL`, `SUPABASE_ANON_KEY`, and `SUPABASE_SERVICE_ROLE_KEY`; the optional bucket / private-URL / signup overrides are also listed there.
|
|
36
36
|
|
|
37
|
-
`
|
|
37
|
+
Both `SELVA_*` keys are still required under this provider, for narrower jobs than under the local provider:
|
|
38
|
+
|
|
39
|
+
- `SELVA_HMAC_KEY` — **not** used for sessions here (those are Supabase JWTs), but still hashes share-link and invite tokens before they're stored.
|
|
40
|
+
- `SELVA_AT_REST_KEY` — encrypts `compute_servers.api_key` before it reaches the database. `SupabaseDataProvider` refuses to construct without it.
|
|
38
41
|
|
|
39
42
|
Rhino.Compute URL + API key are configured in `/admin/compute` and persisted in the `compute_config` table — unchanged by the provider choice.
|
|
40
43
|
|
|
@@ -116,7 +119,7 @@ npx supabase db diff
|
|
|
116
119
|
npx supabase db push
|
|
117
120
|
```
|
|
118
121
|
|
|
119
|
-
Alternatively you can copy each `.sql` file into Supabase Dashboard → **SQL Editor** and run them in order. The CLI path is strongly preferred
|
|
122
|
+
Alternatively you can copy each `.sql` file into Supabase Dashboard → **SQL Editor** and run them in order. The CLI path is strongly preferred: it tracks which migrations already ran, so re-running it is safe, and the files stay under version control.
|
|
120
123
|
|
|
121
124
|
### Exposing the `selva` schema to PostgREST
|
|
122
125
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@selvajs/supabase-provider",
|
|
3
|
-
"version": "0.16.1-beta.
|
|
3
|
+
"version": "0.16.1-beta.3",
|
|
4
4
|
"description": "Supabase (Auth + Postgres + Storage) implementations of @selvajs/platform interfaces",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "VektorNode",
|
|
@@ -32,26 +32,32 @@
|
|
|
32
32
|
},
|
|
33
33
|
"exports": {
|
|
34
34
|
".": {
|
|
35
|
+
"selva-source": "./src/index.ts",
|
|
35
36
|
"types": "./dist/index.d.ts",
|
|
36
37
|
"import": "./dist/index.js"
|
|
37
38
|
},
|
|
38
39
|
"./auth": {
|
|
40
|
+
"selva-source": "./src/auth/index.ts",
|
|
39
41
|
"types": "./dist/auth/index.d.ts",
|
|
40
42
|
"import": "./dist/auth/index.js"
|
|
41
43
|
},
|
|
42
44
|
"./data": {
|
|
45
|
+
"selva-source": "./src/data/index.ts",
|
|
43
46
|
"types": "./dist/data/index.d.ts",
|
|
44
47
|
"import": "./dist/data/index.js"
|
|
45
48
|
},
|
|
46
49
|
"./storage": {
|
|
50
|
+
"selva-source": "./src/storage/index.ts",
|
|
47
51
|
"types": "./dist/storage/index.d.ts",
|
|
48
52
|
"import": "./dist/storage/index.js"
|
|
49
53
|
},
|
|
50
54
|
"./permissions": {
|
|
55
|
+
"selva-source": "./src/permissions/index.ts",
|
|
51
56
|
"types": "./dist/permissions/index.d.ts",
|
|
52
57
|
"import": "./dist/permissions/index.js"
|
|
53
58
|
},
|
|
54
59
|
"./userProfile": {
|
|
60
|
+
"selva-source": "./src/userProfile/index.ts",
|
|
55
61
|
"types": "./dist/userProfile/index.d.ts",
|
|
56
62
|
"import": "./dist/userProfile/index.js"
|
|
57
63
|
}
|
|
@@ -66,13 +72,14 @@
|
|
|
66
72
|
"dependencies": {
|
|
67
73
|
"@supabase/supabase-js": "^2.111.0",
|
|
68
74
|
"sharp": "^0.35.3",
|
|
69
|
-
"@selvajs/platform": "^0.16.1-beta.
|
|
75
|
+
"@selvajs/platform": "^0.16.1-beta.2"
|
|
70
76
|
},
|
|
71
77
|
"devDependencies": {
|
|
72
78
|
"@types/node": "^26.1.2",
|
|
73
79
|
"supabase": "^2.110.0",
|
|
74
80
|
"typescript": "~6.0.3",
|
|
75
|
-
"vitest": "^4.1.10"
|
|
81
|
+
"vitest": "^4.1.10",
|
|
82
|
+
"@selvajs/config": "0.0.3"
|
|
76
83
|
},
|
|
77
84
|
"scripts": {
|
|
78
85
|
"build": "tsc",
|
|
@@ -744,7 +744,7 @@ with check (
|
|
|
744
744
|
-- Invite tokens are HMAC-hashed at the route layer (the selva app's
|
|
745
745
|
-- `lib/server/invites/token.server.ts`) before reaching the store — the raw
|
|
746
746
|
-- token is shown to the admin once and never persisted. A DB-only leak
|
|
747
|
-
-- therefore can't be replayed without the instance's
|
|
747
|
+
-- therefore can't be replayed without the instance's SELVA_HMAC_KEY.
|
|
748
748
|
-- Mirrors the share-link design (`share_links.token_hash`).
|
|
749
749
|
create table if not exists selva.invites (
|
|
750
750
|
id uuid primary key,
|
|
@@ -965,7 +965,7 @@ with check (selva.is_instance_admin());
|
|
|
965
965
|
-- 10. share_links (spec §7)
|
|
966
966
|
--
|
|
967
967
|
-- Per-definition tokens granting unauthenticated access to one
|
|
968
|
-
-- (definitionId, channel). token_hash is HMAC(
|
|
968
|
+
-- (definitionId, channel). token_hash is HMAC(SELVA_HMAC_KEY, raw); the
|
|
969
969
|
-- raw token is shown to the minter once at creation.
|
|
970
970
|
-- ============================================================================
|
|
971
971
|
|