security/codeql-dependabot-gitleaks
| 1 | import dotenv from "dotenv" |
| 2 | import { resolve } from "path" |
| 3 | import Figma from "./figma" |
| 4 | |
| 5 | dotenv.config({ path: resolve(process.cwd(), ".env") }) |
| 6 | |
| 7 | const accessToken = process.env.FIGMA_TOKEN || "" |
| 8 | |
| 9 | if (!accessToken) { |
| 10 | throw new Error("FIGMA_TOKEN is not defined") |
| 11 | } |
| 12 | |
| 13 | export const client = new Figma({ |
| 14 | accessToken: accessToken, |
| 15 | maxRetries: 3, |
| 16 | }) |