Refactor key access and role warning in Supabase clients

The update simplifies accessing environment keys and role warnings in Supabase clients by moving them to new functions 'getSupabaseClientKeys' and 'getServiceRoleKey'. The redundancy in the code is reduced promoting clearer and more maintainable code. The '@epic-web/invariant' import has been removed from files as it is no longer needed.
This commit is contained in:
giancarlo
2024-04-13 12:57:56 +08:00
parent 7f11905fc1
commit 87e8376af6
14 changed files with 1912 additions and 1948 deletions

View File

@@ -29,7 +29,6 @@
"supabase:typegen:app": "supabase gen types typescript --local > ./lib/database.types.ts"
},
"dependencies": {
"@epic-web/invariant": "^1.0.0",
"@hookform/resolvers": "^3.3.4",
"@kit/accounts": "workspace:^",
"@kit/admin": "workspace:^",