Skip to content

Commit 68533dd

Browse files
committed
fix(supabase): satisfy repository validation
1 parent c798da3 commit 68533dd

10 files changed

Lines changed: 57 additions & 57 deletions

File tree

packages/datadog-instrumentations/src/helpers/rewriter/instrumentations/supabase.js

Lines changed: 35 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -5,150 +5,150 @@ module.exports = [
55
module: {
66
name: '@supabase/supabase-js',
77
versionRange: '2.112.2',
8-
filePath: 'dist/index.cjs'
8+
filePath: 'dist/index.cjs',
99
},
1010
astQuery: 'VariableDeclarator[id.name="fetchWithAuth"] ReturnStatement > ArrowFunctionExpression[async=true]',
1111
functionQuery: { kind: 'Async' },
12-
channelName: 'fetchWithAuth'
12+
channelName: 'fetchWithAuth',
1313
},
1414
{
1515
module: {
1616
name: '@supabase/supabase-js',
1717
versionRange: '2.112.2',
18-
filePath: 'dist/index.mjs'
18+
filePath: 'dist/index.mjs',
1919
},
2020
astQuery: 'VariableDeclarator[id.name="fetchWithAuth"] ReturnStatement > ArrowFunctionExpression[async=true]',
2121
functionQuery: { kind: 'Async' },
22-
channelName: 'fetchWithAuth'
22+
channelName: 'fetchWithAuth',
2323
},
2424
{
2525
module: {
2626
name: '@supabase/auth-js',
2727
versionRange: '2.112.2',
28-
filePath: 'dist/main/GoTrueClient.js'
28+
filePath: 'dist/main/GoTrueClient.js',
2929
},
3030
functionQuery: {
3131
methodName: 'getUser',
3232
className: 'GoTrueClient',
33-
kind: 'Async'
33+
kind: 'Async',
3434
},
35-
channelName: 'GoTrueClient_getUser'
35+
channelName: 'GoTrueClient_getUser',
3636
},
3737
{
3838
module: {
3939
name: '@supabase/auth-js',
4040
versionRange: '2.112.2',
41-
filePath: 'dist/module/GoTrueClient.js'
41+
filePath: 'dist/module/GoTrueClient.js',
4242
},
4343
functionQuery: {
4444
methodName: 'getUser',
4545
className: 'GoTrueClient',
46-
kind: 'Async'
46+
kind: 'Async',
4747
},
48-
channelName: 'GoTrueClient_getUser'
48+
channelName: 'GoTrueClient_getUser',
4949
},
5050
{
5151
module: {
5252
name: '@supabase/storage-js',
5353
versionRange: '2.112.2',
54-
filePath: 'dist/index.cjs'
54+
filePath: 'dist/index.cjs',
5555
},
5656
functionQuery: {
5757
methodName: 'listBuckets',
5858
className: 'StorageBucketApi',
59-
kind: 'Async'
59+
kind: 'Async',
6060
},
61-
channelName: 'StorageBucketApi_listBuckets'
61+
channelName: 'StorageBucketApi_listBuckets',
6262
},
6363
{
6464
module: {
6565
name: '@supabase/storage-js',
6666
versionRange: '2.112.2',
67-
filePath: 'dist/index.mjs'
67+
filePath: 'dist/index.mjs',
6868
},
6969
functionQuery: {
7070
methodName: 'listBuckets',
7171
className: 'StorageBucketApi',
72-
kind: 'Async'
72+
kind: 'Async',
7373
},
74-
channelName: 'StorageBucketApi_listBuckets'
74+
channelName: 'StorageBucketApi_listBuckets',
7575
},
7676
{
7777
module: {
7878
name: '@supabase/realtime-js',
7979
versionRange: '2.112.2',
80-
filePath: 'dist/main/RealtimeChannel.js'
80+
filePath: 'dist/main/RealtimeChannel.js',
8181
},
8282
functionQuery: {
8383
methodName: 'send',
8484
className: 'RealtimeChannel',
85-
kind: 'Async'
85+
kind: 'Async',
8686
},
87-
channelName: 'RealtimeChannel_send'
87+
channelName: 'RealtimeChannel_send',
8888
},
8989
{
9090
module: {
9191
name: '@supabase/realtime-js',
9292
versionRange: '2.112.2',
93-
filePath: 'dist/module/RealtimeChannel.js'
93+
filePath: 'dist/module/RealtimeChannel.js',
9494
},
9595
functionQuery: {
9696
methodName: 'send',
9797
className: 'RealtimeChannel',
98-
kind: 'Async'
98+
kind: 'Async',
9999
},
100-
channelName: 'RealtimeChannel_send'
100+
channelName: 'RealtimeChannel_send',
101101
},
102102
{
103103
module: {
104104
name: '@supabase/functions-js',
105105
versionRange: '2.112.2',
106-
filePath: 'dist/main/FunctionsClient.js'
106+
filePath: 'dist/main/FunctionsClient.js',
107107
},
108108
functionQuery: {
109109
methodName: 'invoke',
110110
className: 'FunctionsClient',
111-
kind: 'Async'
111+
kind: 'Async',
112112
},
113-
channelName: 'FunctionsClient_invoke'
113+
channelName: 'FunctionsClient_invoke',
114114
},
115115
{
116116
module: {
117117
name: '@supabase/functions-js',
118118
versionRange: '2.112.2',
119-
filePath: 'dist/module/FunctionsClient.js'
119+
filePath: 'dist/module/FunctionsClient.js',
120120
},
121121
functionQuery: {
122122
methodName: 'invoke',
123123
className: 'FunctionsClient',
124-
kind: 'Async'
124+
kind: 'Async',
125125
},
126-
channelName: 'FunctionsClient_invoke'
126+
channelName: 'FunctionsClient_invoke',
127127
},
128128
{
129129
module: {
130130
name: '@supabase/postgrest-js',
131131
versionRange: '2.112.2',
132-
filePath: 'dist/index.cjs'
132+
filePath: 'dist/index.cjs',
133133
},
134134
functionQuery: {
135135
methodName: 'then',
136136
className: 'PostgrestBuilder',
137-
kind: 'Async'
137+
kind: 'Async',
138138
},
139-
channelName: 'PostgrestBuilder_then'
139+
channelName: 'PostgrestBuilder_then',
140140
},
141141
{
142142
module: {
143143
name: '@supabase/postgrest-js',
144144
versionRange: '2.112.2',
145-
filePath: 'dist/index.mjs'
145+
filePath: 'dist/index.mjs',
146146
},
147147
functionQuery: {
148148
methodName: 'then',
149149
className: 'PostgrestBuilder',
150-
kind: 'Async'
150+
kind: 'Async',
151151
},
152-
channelName: 'PostgrestBuilder_then'
153-
}
152+
channelName: 'PostgrestBuilder_then',
153+
},
154154
]

packages/datadog-plugin-supabase/src/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ class SupabasePlugin extends CompositePlugin {
1616
SupabaseStorageBucketApiListBucketsPlugin,
1717
SupabaseRealtimeChannelSendPlugin,
1818
SupabaseFunctionsClientInvokePlugin,
19-
SupabasePostgrestBuilderThenPlugin
19+
SupabasePostgrestBuilderThenPlugin,
2020
}
2121
}
2222

packages/datadog-plugin-supabase/src/supabase-auth-js-gotrueclient-getuser.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@ class SupabaseGoTrueClientGetUserPlugin extends ClientPlugin {
2222
component: 'supabase',
2323
'span.kind': 'client',
2424
'http.method': method,
25-
'http.url': url
26-
}
25+
'http.url': url,
26+
},
2727
}, ctx)
2828

2929
return ctx.currentStore

packages/datadog-plugin-supabase/src/supabase-functions-js-functionsclient-invoke.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@ class SupabaseFunctionsClientInvokePlugin extends ClientPlugin {
2424
'span.kind': 'client',
2525
'http.method': method,
2626
'http.url': url,
27-
'faas.invoked_name': functionName
28-
}
27+
'faas.invoked_name': functionName,
28+
},
2929
}, ctx)
3030

3131
return ctx.currentStore

packages/datadog-plugin-supabase/src/supabase-postgrest-js-postgrestbuilder-then.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ const operationByMethod = {
1111
GET: 'SELECT',
1212
HEAD: 'SELECT',
1313
PATCH: 'UPDATE',
14-
POST: 'INSERT'
14+
POST: 'INSERT',
1515
}
1616

1717
class SupabasePostgrestBuilderThenPlugin extends DatabasePlugin {
@@ -36,8 +36,8 @@ class SupabasePostgrestBuilderThenPlugin extends DatabasePlugin {
3636
'db.type': 'postgres',
3737
'db.name': ctx.self?.schema || 'public',
3838
'db.operation': operation,
39-
'out.host': requestUrl?.hostname
40-
}
39+
'out.host': requestUrl?.hostname,
40+
},
4141
}, ctx)
4242

4343
const onFulfilled = ctx.arguments?.[0]

packages/datadog-plugin-supabase/src/supabase-realtime-js-realtimechannel-send.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@ class SupabaseRealtimeChannelSendPlugin extends ProducerPlugin {
2222
'messaging.system': 'supabase',
2323
'messaging.destination.name': destination,
2424
'messaging.destination.kind': 'topic',
25-
'messaging.operation': 'send'
26-
}
25+
'messaging.operation': 'send',
26+
},
2727
}, ctx)
2828

2929
return ctx.currentStore

packages/datadog-plugin-supabase/src/supabase-storage-js-storagebucketapi-listbuckets.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@ class SupabaseStorageBucketApiListBucketsPlugin extends StoragePlugin {
2222
component: 'supabase',
2323
'span.kind': 'client',
2424
'http.method': method,
25-
'http.url': url
26-
}
25+
'http.url': url,
26+
},
2727
}, ctx)
2828

2929
return ctx.currentStore

packages/datadog-plugin-supabase/src/supabase-supabase-js-fetchwithauth.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@ class SupabaseFetchWithAuthPlugin extends StoragePlugin {
2323
component: 'supabase',
2424
'span.kind': 'client',
2525
'http.method': method,
26-
'http.url': url
27-
}
26+
'http.url': url,
27+
},
2828
}, ctx)
2929

3030
return ctx.currentStore

packages/datadog-plugin-supabase/test/integration-test/server.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ async function executeOperations () {
8787
const storage = new StorageClient(`${SUPABASE_URL}/storage/v1`, { apikey: SUPABASE_KEY }, testFetch)
8888
await storage.listBuckets()
8989

90-
const realtime = new RealtimeClient(`wss://project.supabase.co/realtime/v1`, {
90+
const realtime = new RealtimeClient('wss://project.supabase.co/realtime/v1', {
9191
params: { apikey: SUPABASE_KEY },
9292
fetch: testFetch,
9393
timeout: 100,

packages/dd-trace/src/config/supported-configurations.json

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3895,13 +3895,6 @@
38953895
"default": "true"
38963896
}
38973897
],
3898-
"DD_TRACE_SUPABASE_ENABLED": [
3899-
{
3900-
"implementation": "A",
3901-
"type": "boolean",
3902-
"default": "true"
3903-
}
3904-
],
39053898
"DD_TRACE_SMITHY_SMITHY_CLIENT_ENABLED": [
39063899
{
39073900
"implementation": "A",
@@ -3963,6 +3956,13 @@
39633956
"default": "true"
39643957
}
39653958
],
3959+
"DD_TRACE_SUPABASE_ENABLED": [
3960+
{
3961+
"implementation": "A",
3962+
"type": "boolean",
3963+
"default": "true"
3964+
}
3965+
],
39663966
"DD_TRACE_TAGS": [
39673967
{
39683968
"implementation": "B",

0 commit comments

Comments
 (0)