Skip to content

Commit

Permalink
fix: run prettier
Browse files Browse the repository at this point in the history
  • Loading branch information
J0 committed Jul 2, 2024
1 parent 9639797 commit bc04d2a
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions src/createServerClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,15 +32,15 @@ export function createServerClient<
: string & keyof Database,
Schema extends GenericSchema = Database[SchemaName] extends GenericSchema
? Database[SchemaName]
: any,
: any
>(
supabaseUrl: string,
supabaseKey: string,
options: SupabaseClientOptions<SchemaName> & {
cookieOptions?: CookieOptionsWithName;
cookies: CookieMethodsServerDeprecated;
cookieEncoding?: "raw" | "base64url";
},
}
): SupabaseClient<Database, SchemaName, Schema>;

/**
Expand Down Expand Up @@ -111,15 +111,15 @@ export function createServerClient<
: string & keyof Database,
Schema extends GenericSchema = Database[SchemaName] extends GenericSchema
? Database[SchemaName]
: any,
: any
>(
supabaseUrl: string,
supabaseKey: string,
options: SupabaseClientOptions<SchemaName> & {
cookieOptions?: CookieOptionsWithName;
cookies: CookieMethodsServer;
cookieEncoding?: "raw" | "base64url";
},
}
): SupabaseClient<Database, SchemaName, Schema>;

export function createServerClient<
Expand All @@ -129,19 +129,19 @@ export function createServerClient<
: string & keyof Database,
Schema extends GenericSchema = Database[SchemaName] extends GenericSchema
? Database[SchemaName]
: any,
: any
>(
supabaseUrl: string,
supabaseKey: string,
options: SupabaseClientOptions<SchemaName> & {
cookieOptions?: CookieOptionsWithName;
cookies: CookieMethodsServer | CookieMethodsServerDeprecated;
cookieEncoding?: "raw" | "base64url";
},
}
): SupabaseClient<Database, SchemaName, Schema> {
if (!supabaseUrl || !supabaseKey) {
throw new Error(
`Your project's URL and Key are required to create a Supabase client!\n\nCheck your Supabase project's API settings to find these values\n\nhttps://supabase.com/dashboard/project/_/settings/api`,
`Your project's URL and Key are required to create a Supabase client!\n\nCheck your Supabase project's API settings to find these values\n\nhttps://supabase.com/dashboard/project/_/settings/api`
);
}

Expand All @@ -151,7 +151,7 @@ export function createServerClient<
...options,
cookieEncoding: options?.cookieEncoding ?? "base64url",
},
true,
true
);

const client = createClient<Database, SchemaName, Schema>(
Expand All @@ -177,7 +177,7 @@ export function createServerClient<
persistSession: true,
storage,
},
},
}
);

client.auth.onAuthStateChange(async (event) => {
Expand All @@ -201,7 +201,7 @@ export function createServerClient<
{
cookieOptions: options?.cookieOptions ?? null,
cookieEncoding: options?.cookieEncoding ?? "base64url",
},
}
);
}
});
Expand Down

0 comments on commit bc04d2a

Please sign in to comment.