Skip to content

Commit 7511cbc

Browse files
committed
Rename SupabaseClientConstructor to SupabaseClientConstructorType
1 parent 3c1e23d commit 7511cbc

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
@@ -14,7 +14,7 @@ import { isPlainObject } from '../utils/is';
1414
import { addExceptionMechanism } from '../utils/misc';
1515
import { getTraceData } from '../utils/traceData';
1616

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

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

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

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

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

274274
function extractTraceAndBaggageFromMessage(message: { _sentry?: { sentry_trace?: string; baggage?: string } }): {
@@ -622,12 +622,12 @@ function instrumentSupabaseAuthClient(supabaseClientInstance: SupabaseClientInst
622622
}
623623

624624
function instrumentSupabaseClientConstructor(SupabaseClient: unknown): void {
625-
if (isInstrumented((SupabaseClient as unknown as SupabaseClientConstructor).prototype.from)) {
625+
if (isInstrumented((SupabaseClient as unknown as SupabaseClientConstructorType).prototype.from)) {
626626
return;
627627
}
628628

629-
(SupabaseClient as unknown as SupabaseClientConstructor).prototype.from = new Proxy(
630-
(SupabaseClient as unknown as SupabaseClientConstructor).prototype.from,
629+
(SupabaseClient as unknown as SupabaseClientConstructorType).prototype.from = new Proxy(
630+
(SupabaseClient as unknown as SupabaseClientConstructorType).prototype.from,
631631
{
632632
apply(target, thisArg, argumentsList) {
633633
const rv = Reflect.apply(target, thisArg, argumentsList);
@@ -640,7 +640,7 @@ function instrumentSupabaseClientConstructor(SupabaseClient: unknown): void {
640640
},
641641
);
642642

643-
markAsInstrumented((SupabaseClient as unknown as SupabaseClientConstructor).prototype.from);
643+
markAsInstrumented((SupabaseClient as unknown as SupabaseClientConstructorType).prototype.from);
644644
}
645645

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

0 commit comments

Comments
 (0)