Skip to content

Commit

Permalink
feat: update supabase types (#12)
Browse files Browse the repository at this point in the history
* feat: update supabase types

* feat: create utility types for supabase

* chore: update supabase types
  • Loading branch information
altaywtf authored Dec 11, 2023
1 parent b35d43d commit f0cd6c3
Show file tree
Hide file tree
Showing 9 changed files with 275 additions and 174 deletions.
1 change: 1 addition & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
types
2 changes: 1 addition & 1 deletion lib/services/supabase/auth.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { Database } from '@/types/database';
import type { Database } from '@/types/supabase/database';
import type { CookieOptions } from '@supabase/ssr';
import type { NextRequest } from 'next/server';

Expand Down
2 changes: 1 addition & 1 deletion lib/services/supabase/browser.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
'use client';
import type { Database } from '@/types/database';
import type { Database } from '@/types/supabase/database';

import { env } from '@/env.mjs';
import { createBrowserClient } from '@supabase/ssr';
Expand Down
2 changes: 1 addition & 1 deletion lib/services/supabase/server.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { Database } from '@/types/database';
import type { Database } from '@/types/supabase/database';
import type { CookieOptions } from '@supabase/ssr';
import type { cookies } from 'next/headers';

Expand Down
2 changes: 1 addition & 1 deletion lib/services/supabase/service.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { Database } from '@/types/database';
import type { Database } from '@/types/supabase/database';

import { env } from '@/env.mjs';
import { createClient } from '@supabase/supabase-js';
Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"start": "next start",
"storybook": "storybook dev -p 6006",
"supabase:login": "supabase login",
"supabase:types": "supabase gen types typescript --project-id zcetythxtznisfgaakyk > types/database.ts",
"supabase:types": "supabase gen types typescript --project-id zcetythxtznisfgaakyk > types/supabase/database-generated.ts",
"typecheck": "tsc --noEmit"
},
"prettier": "@vercel/style-guide/prettier",
Expand Down Expand Up @@ -50,6 +50,7 @@
"lint-staged": "^15.2.0",
"prettier": "^3.1.0",
"storybook": "^7.6.4",
"supabase": "^1.115.5",
"typescript": "^5"
},
"packageManager": "[email protected]"
Expand Down
89 changes: 89 additions & 0 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit f0cd6c3

Please sign in to comment.