@@ -13,7 +13,7 @@ import { isPlainObject } from '../utils/is';
13
13
import { logger } from '../utils/logger' ;
14
14
import { getTraceData } from '../utils/traceData' ;
15
15
16
- export interface SupabaseClientConstructor {
16
+ export interface SupabaseClientConstructorType {
17
17
prototype : {
18
18
from : ( table : string ) => PostgRESTQueryBuilder ;
19
19
schema : ( schema : string ) => { rpc : ( ...args : unknown [ ] ) => Promise < unknown > } ;
@@ -229,17 +229,17 @@ export function translateFiltersIntoMethods(key: string, query: string): string
229
229
}
230
230
231
231
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 ) ) {
233
233
return ;
234
234
}
235
235
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 ,
238
238
{
239
239
apply ( target , thisArg , argumentsList ) {
240
240
const supabaseInstance = Reflect . apply ( target , thisArg , argumentsList ) ;
241
241
242
- ( supabaseInstance as unknown as SupabaseClientConstructor ) . rpc = new Proxy (
242
+ ( supabaseInstance as unknown as SupabaseClientConstructorType ) . rpc = new Proxy (
243
243
( supabaseInstance as unknown as SupabaseClientInstance ) . rpc ,
244
244
{
245
245
apply ( target , thisArg , argumentsList ) {
@@ -267,7 +267,7 @@ function instrumentRpcReturnedFromSchemaCall(SupabaseClient: unknown): void {
267
267
} ,
268
268
) ;
269
269
270
- markAsInstrumented ( ( SupabaseClient as unknown as SupabaseClientConstructor ) . prototype . schema ) ;
270
+ markAsInstrumented ( ( SupabaseClient as unknown as SupabaseClientConstructorType ) . prototype . schema ) ;
271
271
}
272
272
273
273
function extractTraceAndBaggageFromMessage ( message : { _sentry ?: { sentry_trace ?: string ; baggage ?: string } } ) : {
@@ -619,12 +619,12 @@ function instrumentSupabaseAuthClient(supabaseClientInstance: SupabaseClientInst
619
619
}
620
620
621
621
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 ) ) {
623
623
return ;
624
624
}
625
625
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 ,
628
628
{
629
629
apply ( target , thisArg , argumentsList ) {
630
630
const rv = Reflect . apply ( target , thisArg , argumentsList ) ;
@@ -637,7 +637,7 @@ function instrumentSupabaseClientConstructor(SupabaseClient: unknown): void {
637
637
} ,
638
638
) ;
639
639
640
- markAsInstrumented ( ( SupabaseClient as unknown as SupabaseClientConstructor ) . prototype . from ) ;
640
+ markAsInstrumented ( ( SupabaseClient as unknown as SupabaseClientConstructorType ) . prototype . from ) ;
641
641
}
642
642
643
643
function instrumentPostgRESTFilterBuilder ( PostgRESTFilterBuilder : PostgRESTFilterBuilder [ 'constructor' ] ) : void {
0 commit comments