@selvajs/supabase-provider 0.12.0 → 0.13.1
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 +60 -14
- package/dist/cli/sync-migrations.d.ts +3 -0
- package/dist/cli/sync-migrations.d.ts.map +1 -0
- package/dist/cli/sync-migrations.js +108 -0
- package/dist/cli/sync-migrations.js.map +1 -0
- package/dist/data/__tests__/test-helpers.d.ts +2 -3
- package/dist/data/__tests__/test-helpers.d.ts.map +1 -1
- package/dist/data/__tests__/test-helpers.js +1 -0
- package/dist/data/__tests__/test-helpers.js.map +1 -1
- package/dist/data/client.d.ts +10 -2
- package/dist/data/client.d.ts.map +1 -1
- package/dist/data/client.js +3 -0
- package/dist/data/client.js.map +1 -1
- package/package.json +4 -1
- package/src/cli/sync-migrations.ts +133 -0
- package/src/data/__tests__/test-helpers.ts +5 -4
- package/src/data/client.ts +16 -4
- package/supabase/config.toml +7 -2
- package/supabase/migrations/{0001_initial.sql → 20260425155514_selva_initial.sql} +314 -233
- package/supabase/migrations/{0002_definition_version_schema.sql → 20260529202220_selva_definition_version_schema.sql} +1 -1
- package/supabase/migrations/20260531120000_set_updated_at_search_path.sql +11 -0
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
-- by 0001_initial.sql — this closes that drift.
|
|
11
11
|
-- ============================================================================
|
|
12
12
|
|
|
13
|
-
alter table
|
|
13
|
+
alter table selva.definition_versions
|
|
14
14
|
add column if not exists change_note text,
|
|
15
15
|
add column if not exists schema jsonb,
|
|
16
16
|
add column if not exists schema_extracted_at timestamptz;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
-- ============================================================================
|
|
2
|
+
-- Harden selva.set_updated_at() with an immutable search_path
|
|
3
|
+
--
|
|
4
|
+
-- The trigger function shipped in 20260425155514_selva_initial.sql had a
|
|
5
|
+
-- role-mutable search_path (Supabase linter 0011_function_search_path_mutable).
|
|
6
|
+
-- The body only touches `new` and `now()` — no schema-qualified objects — so
|
|
7
|
+
-- pinning search_path to empty closes the privilege-escalation vector without
|
|
8
|
+
-- changing behaviour. Triggers that reference this function are unaffected.
|
|
9
|
+
-- ============================================================================
|
|
10
|
+
|
|
11
|
+
alter function selva.set_updated_at() set search_path = '';
|