@@ -14,7 +14,7 @@ import { isPlainObject } from '../utils/is';
14
14
import { addExceptionMechanism } from '../utils/misc' ;
15
15
import { getTraceData } from '../utils/traceData' ;
16
16
17
- export interface SupabaseClientConstructor {
17
+ export interface SupabaseClientConstructorType {
18
18
prototype : {
19
19
from : ( table : string ) => PostgRESTQueryBuilder ;
20
20
schema : ( schema : string ) => { rpc : ( ...args : unknown [ ] ) => Promise < unknown > } ;
@@ -230,17 +230,17 @@ export function translateFiltersIntoMethods(key: string, query: string): string
230
230
}
231
231
232
232
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 ) ) {
234
234
return ;
235
235
}
236
236
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 ,
239
239
{
240
240
apply ( target , thisArg , argumentsList ) {
241
241
const supabaseInstance = Reflect . apply ( target , thisArg , argumentsList ) ;
242
242
243
- ( supabaseInstance as unknown as SupabaseClientConstructor ) . rpc = new Proxy (
243
+ ( supabaseInstance as unknown as SupabaseClientConstructorType ) . rpc = new Proxy (
244
244
( supabaseInstance as unknown as SupabaseClientInstance ) . rpc ,
245
245
{
246
246
apply ( target , thisArg , argumentsList ) {
@@ -268,7 +268,7 @@ function instrumentRpcReturnedFromSchemaCall(SupabaseClient: unknown): void {
268
268
} ,
269
269
) ;
270
270
271
- markAsInstrumented ( ( SupabaseClient as unknown as SupabaseClientConstructor ) . prototype . schema ) ;
271
+ markAsInstrumented ( ( SupabaseClient as unknown as SupabaseClientConstructorType ) . prototype . schema ) ;
272
272
}
273
273
274
274
function extractTraceAndBaggageFromMessage ( message : { _sentry ?: { sentry_trace ?: string ; baggage ?: string } } ) : {
@@ -622,12 +622,12 @@ function instrumentSupabaseAuthClient(supabaseClientInstance: SupabaseClientInst
622
622
}
623
623
624
624
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 ) ) {
626
626
return ;
627
627
}
628
628
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 ,
631
631
{
632
632
apply ( target , thisArg , argumentsList ) {
633
633
const rv = Reflect . apply ( target , thisArg , argumentsList ) ;
@@ -640,7 +640,7 @@ function instrumentSupabaseClientConstructor(SupabaseClient: unknown): void {
640
640
} ,
641
641
) ;
642
642
643
- markAsInstrumented ( ( SupabaseClient as unknown as SupabaseClientConstructor ) . prototype . from ) ;
643
+ markAsInstrumented ( ( SupabaseClient as unknown as SupabaseClientConstructorType ) . prototype . from ) ;
644
644
}
645
645
646
646
function instrumentPostgRESTFilterBuilder ( PostgRESTFilterBuilder : PostgRESTFilterBuilder [ 'constructor' ] ) : void {
0 commit comments