21c0dc619e
* feat: playwright build extension * feat: add playwright task * full dep list & added some comments * fix v3-catalog * log image size for local builds * detect playwright version * add changesets * add docs * additional checks * fix unit test workflow for forks * use middleware and update docs * update jsdoc --------- Co-authored-by: nicktrn <55853254+nicktrn@users.noreply.github.com>
84 lines
2.5 KiB
TypeScript
84 lines
2.5 KiB
TypeScript
import { InfisicalClient } from "@infisical/sdk";
|
|
import { sentryEsbuildPlugin } from "@sentry/esbuild-plugin";
|
|
import { OpenAIInstrumentation } from "@traceloop/instrumentation-openai";
|
|
import { esbuildPlugin } from "@trigger.dev/build";
|
|
import { audioWaveform } from "@trigger.dev/build/extensions/audioWaveform";
|
|
import { ffmpeg, syncEnvVars } from "@trigger.dev/build/extensions/core";
|
|
import { puppeteer } from "@trigger.dev/build/extensions/puppeteer";
|
|
import { playwright } from "@trigger.dev/build/extensions/playwright";
|
|
import { prismaExtension } from "@trigger.dev/build/extensions/prisma";
|
|
import { emitDecoratorMetadata } from "@trigger.dev/build/extensions/typescript";
|
|
import { defineConfig } from "@trigger.dev/sdk/v3";
|
|
|
|
export default defineConfig({
|
|
runtime: "node",
|
|
project: "yubjwjsfkxnylobaqvqz",
|
|
machine: "medium-1x",
|
|
instrumentations: [new OpenAIInstrumentation()],
|
|
additionalFiles: ["wrangler/wrangler.toml"],
|
|
maxDuration: 3600,
|
|
dirs: ["./src/trigger"],
|
|
retries: {
|
|
enabledInDev: false,
|
|
default: {
|
|
maxAttempts: 10,
|
|
minTimeoutInMs: 5_000,
|
|
maxTimeoutInMs: 30_000,
|
|
factor: 2,
|
|
randomize: true,
|
|
},
|
|
},
|
|
enableConsoleLogging: false,
|
|
logLevel: "info",
|
|
build: {
|
|
conditions: ["react-server"],
|
|
extensions: [
|
|
ffmpeg(),
|
|
emitDecoratorMetadata(),
|
|
audioWaveform(),
|
|
prismaExtension({
|
|
schema: "prisma/schema/schema.prisma",
|
|
migrate: true,
|
|
directUrlEnvVarName: "DATABASE_URL_UNPOOLED",
|
|
clientGenerator: "client",
|
|
typedSql: true,
|
|
}),
|
|
esbuildPlugin(
|
|
sentryEsbuildPlugin({
|
|
org: "triggerdev",
|
|
project: "taskhero-examples-basic",
|
|
authToken: process.env.SENTRY_AUTH_TOKEN,
|
|
}),
|
|
{ placement: "last", target: "deploy" }
|
|
),
|
|
syncEnvVars(async (ctx) => {
|
|
if (
|
|
!process.env.INFISICAL_CLIENT_ID ||
|
|
!process.env.INFISICAL_CLIENT_SECRET ||
|
|
!process.env.INFISICAL_PROJECT_ID
|
|
) {
|
|
return;
|
|
}
|
|
|
|
const client = new InfisicalClient({
|
|
clientId: process.env.INFISICAL_CLIENT_ID,
|
|
clientSecret: process.env.INFISICAL_CLIENT_SECRET,
|
|
});
|
|
|
|
const secrets = await client.listSecrets({
|
|
environment: ctx.environment,
|
|
projectId: process.env.INFISICAL_PROJECT_ID,
|
|
});
|
|
|
|
return secrets.map((secret) => ({
|
|
name: secret.secretKey,
|
|
value: secret.secretValue,
|
|
}));
|
|
}),
|
|
puppeteer(),
|
|
playwright(),
|
|
],
|
|
external: ["re2"],
|
|
},
|
|
});
|