Skip to content

Commit 596f2ef

Browse files
authored
Merge pull request #2470 from trycompai/main
[comp] Production Deploy
2 parents 29394fb + 4650bd9 commit 596f2ef

File tree

47 files changed

+1460
-1812
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

47 files changed

+1460
-1812
lines changed

.github/workflows/trigger-api-tasks-deploy-main.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@ jobs:
1818
node-version: "22.x" # Updated to match Node.js w/ Vercel
1919
- name: Setup Bun
2020
uses: oven-sh/setup-bun@v2
21+
with:
22+
bun-version: "1.3.4"
2123
- name: Clear cache
2224
run: rm -rf node_modules .bun
2325
- name: Install dependencies

.github/workflows/trigger-api-tasks-deploy-release.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@ jobs:
2121

2222
- name: Setup Bun
2323
uses: oven-sh/setup-bun@v2
24+
with:
25+
bun-version: "1.3.4"
2426

2527
- name: Install dependencies
2628
run: bun install --frozen-lockfile || bun install --frozen-lockfile --ignore-scripts

.github/workflows/trigger-tasks-deploy-main.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@ jobs:
1414
node-version: "22.x" # Updated to match Node.js w/ Vercel
1515
- name: Setup Bun
1616
uses: oven-sh/setup-bun@v2
17+
with:
18+
bun-version: "1.3.4"
1719
- name: Clear cache
1820
run: rm -rf node_modules .bun
1921
- name: Install dependencies

.github/workflows/trigger-tasks-deploy-release.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@ jobs:
1818

1919
- name: Setup Bun
2020
uses: oven-sh/setup-bun@v2
21+
with:
22+
bun-version: "1.3.4"
2123

2224
- name: Install dependencies
2325
run: bun install --frozen-lockfile || bun install --frozen-lockfile --ignore-scripts

apps/api/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
"@aws-sdk/client-securityhub": "^3.948.0",
1313
"@aws-sdk/client-sts": "^3.948.0",
1414
"@aws-sdk/s3-request-presigner": "^3.859.0",
15-
"@browserbasehq/sdk": "^2.6.0",
15+
"@browserbasehq/sdk": "2.6.0",
1616
"@browserbasehq/stagehand": "^3.0.5",
1717
"@mendable/firecrawl-js": "^4.9.3",
1818
"@nestjs/common": "^11.0.1",

apps/api/src/trigger/browser-automation/run-browser-automation.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { db } from '@db';
2-
import { logger, task } from '@trigger.dev/sdk';
2+
import { logger, tags, task } from '@trigger.dev/sdk';
33
import { BrowserbaseService } from '../../browserbase/browserbase.service';
44
import { triggerEmail } from '../../email/trigger-email';
55
import { TaskStatusChangedEmail } from '../../email/templates/task-status-changed';
@@ -187,6 +187,8 @@ export const runBrowserAutomation = task({
187187
}) => {
188188
const { automationId, automationName, organizationId, taskId } = payload;
189189

190+
await tags.add([`org:${organizationId}`]);
191+
190192
logger.info(`Running browser automation "${automationName}"`, {
191193
automationId,
192194
organizationId,

apps/api/src/trigger/cloud-security/run-cloud-security-scan.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { db } from '@db';
2-
import { logger, task } from '@trigger.dev/sdk';
2+
import { logger, tags, task } from '@trigger.dev/sdk';
33

44
/**
55
* Trigger task that runs a cloud security scan for a single connection.
@@ -20,6 +20,8 @@ export const runCloudSecurityScan = task({
2020
const { connectionId, organizationId, providerSlug, connectionName } =
2121
payload;
2222

23+
await tags.add([`org:${organizationId}`]);
24+
2325
logger.info(
2426
`Starting cloud security scan for connection: ${connectionName}`,
2527
{

apps/api/src/trigger/integration-platform/run-connection-checks.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { getManifest, runAllChecks } from '@trycompai/integration-platform';
22
import { db } from '@db';
3-
import { logger, task } from '@trigger.dev/sdk';
3+
import { logger, tags, task } from '@trigger.dev/sdk';
44

55
/**
66
* Trigger task that runs all checks for a connection.
@@ -22,6 +22,8 @@ export const runConnectionChecks = task({
2222
}) => {
2323
const { connectionId, organizationId, providerSlug } = payload;
2424

25+
await tags.add([`org:${organizationId}`]);
26+
2527
logger.info(`Auto-running checks for connection ${connectionId}`, {
2628
provider: providerSlug,
2729
organizationId,

apps/api/src/trigger/integration-platform/run-task-integration-checks.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { getManifest, runAllChecks } from '@trycompai/integration-platform';
22
import { db } from '@db';
3-
import { logger, task } from '@trigger.dev/sdk';
3+
import { logger, tags, task } from '@trigger.dev/sdk';
44
import { triggerEmail } from '../../email/trigger-email';
55
import { TaskStatusChangedEmail } from '../../email/templates/task-status-changed';
66
import { isUserUnsubscribed } from '@trycompai/email';
@@ -185,6 +185,8 @@ export const runTaskIntegrationChecks = task({
185185
checkIds,
186186
} = payload;
187187

188+
await tags.add([`org:${organizationId}`]);
189+
188190
logger.info(`Running integration checks for task "${taskTitle}"`, {
189191
taskId,
190192
connectionId,

apps/api/src/trigger/policies/update-policy.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { logger, metadata, queue, schemaTask } from '@trigger.dev/sdk';
1+
import { logger, metadata, queue, schemaTask, tags } from '@trigger.dev/sdk';
22
import { z } from 'zod';
33
import { processPolicyUpdate } from './update-policy-helpers';
44

@@ -29,6 +29,8 @@ export const updatePolicy = schemaTask({
2929
memberId: z.string().optional(),
3030
}),
3131
run: async (params) => {
32+
await tags.add([`org:${params.organizationId}`]);
33+
3234
try {
3335
logger.info(`Starting policy update for policy ${params.policyId}`);
3436

0 commit comments

Comments
 (0)