diff --git a/docs/deploy-environment-variables.mdx b/docs/deploy-environment-variables.mdx index 3f67a5bb6a..5ec2c55af3 100644 --- a/docs/deploy-environment-variables.mdx +++ b/docs/deploy-environment-variables.mdx @@ -97,18 +97,20 @@ In this example we're using env vars from [Infisical](https://infisical.com). ```ts trigger.config.ts import { defineConfig } from "@trigger.dev/sdk/v3"; import { syncEnvVars } from "@trigger.dev/build/extensions/core"; -import { InfisicalClient } from "@infisical/sdk"; +import { InfisicalSDK } from "@infisical/sdk"; export default defineConfig({ build: { extensions: [ syncEnvVars(async (ctx) => { - const client = new InfisicalClient({ - clientId: process.env.INFISICAL_CLIENT_ID, - clientSecret: process.env.INFISICAL_CLIENT_SECRET, + const client = new InfisicalSDK(); + + await client.auth().universalAuth.login({ + clientId: process.env.INFISICAL_CLIENT_ID!, + clientSecret: process.env.INFISICAL_CLIENT_SECRET!, }); - const secrets = await client.listSecrets({ + const { secrets } = await client.secrets().listSecrets({ environment: ctx.environment, projectId: process.env.INFISICAL_PROJECT_ID!, });