Skip to content

Commit 50e89cb

Browse files
authored
Update Infisical instructions to new SDK
Current documentation is using old Infisical SDK implementation. New SDK has a different name, and authenticates on a method, not in the class constructor.
1 parent 4305a23 commit 50e89cb

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

docs/deploy-environment-variables.mdx

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -103,12 +103,14 @@ export default defineConfig({
103103
build: {
104104
extensions: [
105105
syncEnvVars(async (ctx) => {
106-
const client = new InfisicalClient({
107-
clientId: process.env.INFISICAL_CLIENT_ID,
108-
clientSecret: process.env.INFISICAL_CLIENT_SECRET,
106+
const client = new InfisicalSDK();
107+
108+
await client.auth().universalAuth.login({
109+
clientId: process.env.INFISICAL_CLIENT_ID!,
110+
clientSecret: process.env.INFISICAL_CLIENT!,
109111
});
110112

111-
const secrets = await client.listSecrets({
113+
const { secrets } = await client.secrets().listSecrets({
112114
environment: ctx.environment,
113115
projectId: process.env.INFISICAL_PROJECT_ID!,
114116
});

0 commit comments

Comments
 (0)