Skip to content

Commit 8f9aa98

Browse files
committed
Rename SupabaseClientConstructor to SupabaseClientConstructorType
1 parent 5ce5ee9 commit 8f9aa98

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

packages/core/src/integrations/supabase.ts

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ import { isPlainObject } from '../utils/is';
1313
import { logger } from '../utils/logger';
1414
import { getTraceData } from '../utils/traceData';
1515

16-
export interface SupabaseClientConstructor {
16+
export interface SupabaseClientConstructorType {
1717
prototype: {
1818
from: (table: string) => PostgRESTQueryBuilder;
1919
schema: (schema: string) => { rpc: (...args: unknown[]) => Promise<unknown> };
@@ -229,17 +229,17 @@ export function translateFiltersIntoMethods(key: string, query: string): string
229229
}
230230

231231
function instrumentRpcReturnedFromSchemaCall(SupabaseClient: unknown): void {
232-
if (isInstrumented((SupabaseClient as unknown as SupabaseClientConstructor).prototype.schema)) {
232+
if (isInstrumented((SupabaseClient as unknown as SupabaseClientConstructorType).prototype.schema)) {
233233
return;
234234
}
235235

236-
(SupabaseClient as unknown as SupabaseClientConstructor).prototype.schema = new Proxy(
237-
(SupabaseClient as unknown as SupabaseClientConstructor).prototype.schema,
236+
(SupabaseClient as unknown as SupabaseClientConstructorType).prototype.schema = new Proxy(
237+
(SupabaseClient as unknown as SupabaseClientConstructorType).prototype.schema,
238238
{
239239
apply(target, thisArg, argumentsList) {
240240
const supabaseInstance = Reflect.apply(target, thisArg, argumentsList);
241241

242-
(supabaseInstance as unknown as SupabaseClientConstructor).rpc = new Proxy(
242+
(supabaseInstance as unknown as SupabaseClientConstructorType).rpc = new Proxy(
243243
(supabaseInstance as unknown as SupabaseClientInstance).rpc,
244244
{
245245
apply(target, thisArg, argumentsList) {
@@ -267,7 +267,7 @@ function instrumentRpcReturnedFromSchemaCall(SupabaseClient: unknown): void {
267267
},
268268
);
269269

270-
markAsInstrumented((SupabaseClient as unknown as SupabaseClientConstructor).prototype.schema);
270+
markAsInstrumented((SupabaseClient as unknown as SupabaseClientConstructorType).prototype.schema);
271271
}
272272

273273
function extractTraceAndBaggageFromMessage(message: { _sentry?: { sentry_trace?: string; baggage?: string } }): {
@@ -619,12 +619,12 @@ function instrumentSupabaseAuthClient(supabaseClientInstance: SupabaseClientInst
619619
}
620620

621621
function instrumentSupabaseClientConstructor(SupabaseClient: unknown): void {
622-
if (isInstrumented((SupabaseClient as unknown as SupabaseClientConstructor).prototype.from)) {
622+
if (isInstrumented((SupabaseClient as unknown as SupabaseClientConstructorType).prototype.from)) {
623623
return;
624624
}
625625

626-
(SupabaseClient as unknown as SupabaseClientConstructor).prototype.from = new Proxy(
627-
(SupabaseClient as unknown as SupabaseClientConstructor).prototype.from,
626+
(SupabaseClient as unknown as SupabaseClientConstructorType).prototype.from = new Proxy(
627+
(SupabaseClient as unknown as SupabaseClientConstructorType).prototype.from,
628628
{
629629
apply(target, thisArg, argumentsList) {
630630
const rv = Reflect.apply(target, thisArg, argumentsList);
@@ -637,7 +637,7 @@ function instrumentSupabaseClientConstructor(SupabaseClient: unknown): void {
637637
},
638638
);
639639

640-
markAsInstrumented((SupabaseClient as unknown as SupabaseClientConstructor).prototype.from);
640+
markAsInstrumented((SupabaseClient as unknown as SupabaseClientConstructorType).prototype.from);
641641
}
642642

643643
function instrumentPostgRESTFilterBuilder(PostgRESTFilterBuilder: PostgRESTFilterBuilder['constructor']): void {

0 commit comments

Comments
 (0)