Skip to content

Commit 1083673

Browse files
committed
Supabase SDK tsconfig now matches OpenAI. enableDatabaseWebhooks doesn’t retry
1 parent 090bc2e commit 1083673

File tree

4 files changed

+28
-23
lines changed

4 files changed

+28
-23
lines changed

integrations/supabase/package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
"dist/index.js.map"
1414
],
1515
"devDependencies": {
16+
"@trigger.dev/tsconfig": "workspace:*",
1617
"@types/node": "18.x",
1718
"rimraf": "^3.0.2",
1819
"tsup": "7.1.x",
@@ -34,4 +35,4 @@
3435
"engines": {
3536
"node": ">=18.0.0"
3637
}
37-
}
38+
}

integrations/supabase/src/management/index.ts

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ import {
1515
TriggerIntegration,
1616
isTriggerError,
1717
retry,
18+
OverridableRunTaskOptions,
1819
} from "@trigger.dev/sdk";
1920
import {
2021
CreateProjectRequestBody,
@@ -32,7 +33,6 @@ import { z } from "zod";
3233
import { Prettify, safeParseBody } from "@trigger.dev/integration-kit";
3334
import { randomUUID } from "crypto";
3435
import { GenericSchema } from "../database/types";
35-
import events from "events";
3636

3737
export type SupabaseManagementIntegrationOptions =
3838
| {
@@ -514,7 +514,11 @@ export class SupabaseManagement implements TriggerIntegration {
514514
}
515515

516516
/** Enable Database Webhooks in project */
517-
enableDatabaseWebhooks(key: IntegrationTaskKey, params: { ref: string }): Promise<void> {
517+
enableDatabaseWebhooks(
518+
key: IntegrationTaskKey,
519+
params: { ref: string },
520+
options: OverridableRunTaskOptions = {}
521+
): Promise<void> {
518522
return this.runTask(
519523
key,
520524
(client) => {
@@ -529,6 +533,7 @@ export class SupabaseManagement implements TriggerIntegration {
529533
text: params.ref,
530534
},
531535
],
536+
...options,
532537
}
533538
);
534539
}
@@ -714,7 +719,13 @@ export function createWebhookEventSource(integration: SupabaseManagement): Exter
714719
const id = url.pathname.split("/").pop() ?? randomUUID();
715720

716721
try {
717-
await io.integration.enableDatabaseWebhooks("enable-webhooks", { ref: params.projectRef });
722+
await io.integration.enableDatabaseWebhooks(
723+
"enable-webhooks",
724+
{ ref: params.projectRef },
725+
{
726+
retry: undefined,
727+
}
728+
);
718729
} catch (error) {
719730
if (isTriggerError(error)) {
720731
throw error;

integrations/supabase/tsconfig.json

Lines changed: 10 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,17 @@
11
{
2+
"extends": "@trigger.dev/tsconfig/node18.json",
3+
"include": ["./src/**/*.ts", "tsup.config.ts"],
24
"compilerOptions": {
3-
"composite": false,
5+
"lib": ["DOM", "DOM.Iterable", "ES2019"],
6+
"paths": {
7+
"@trigger.dev/sdk/*": ["../../packages/trigger-sdk/src/*"],
8+
"@trigger.dev/sdk": ["../../packages/trigger-sdk/src/index"],
9+
"@trigger.dev/integration-kit/*": ["../../packages/integration-kit/src/*"],
10+
"@trigger.dev/integration-kit": ["../../packages/integration-kit/src/index"]
11+
},
412
"declaration": false,
513
"declarationMap": false,
6-
"esModuleInterop": true,
7-
"forceConsistentCasingInFileNames": true,
8-
"inlineSources": false,
9-
"isolatedModules": true,
10-
"moduleResolution": "node",
11-
"noUnusedLocals": false,
12-
"noUnusedParameters": false,
13-
"preserveWatchOutput": true,
14-
"skipLibCheck": true,
15-
"strict": true,
16-
"experimentalDecorators": true,
17-
"emitDecoratorMetadata": true,
18-
"sourceMap": true,
19-
"resolveJsonModule": true,
20-
"lib": ["es2019", "dom"],
21-
"module": "CommonJS",
22-
"target": "es2021"
14+
"baseUrl": "."
2315
},
24-
"include": ["./src/**/*.ts", "tsup.config.ts"],
2516
"exclude": ["node_modules"]
2617
}

pnpm-lock.yaml

Lines changed: 2 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)