@catchdrift/cli 0.1.21 → 0.1.22

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@catchdrift/cli",
3
- "version": "0.1.21",
3
+ "version": "0.1.22",
4
4
  "description": "CLI for Drift — install, check, and manage design system coverage for any React app.",
5
5
  "keywords": [
6
6
  "design-system",
@@ -39,13 +39,14 @@ export function writeDriftConfig(cwd, { storybookUrl, chromaticUrl, figmaFiles,
39
39
  figmaFilesBlock = ` figmaFiles: [\n${entries}\n ],`
40
40
  }
41
41
 
42
- // Figma token — read from env var at runtime so it's never committed to git
42
+ // Figma token — read from env at runtime via a Record cast to avoid TS errors
43
+ // for undeclared env vars. The actual value comes from .env.local (gitignored).
43
44
  let figmaTokenLine = null
44
45
  if (hasFigma) {
45
46
  const envExpr = framework === 'nextjs'
46
- ? `process.env.NEXT_PUBLIC_FIGMA_TOKEN`
47
- : `import.meta.env.VITE_FIGMA_TOKEN`
48
- figmaTokenLine = ` figmaToken: ${envExpr}, // set in .env.local — never commit your token`
47
+ ? `(process.env as Record<string,string|undefined>)['NEXT_PUBLIC_FIGMA_TOKEN']`
48
+ : `(import.meta.env as Record<string,string|undefined>)['VITE_FIGMA_TOKEN']`
49
+ figmaTokenLine = ` figmaToken: ${envExpr}, // set VITE_FIGMA_TOKEN in .env.local — never commit your token`
49
50
  }
50
51
 
51
52
  const lines = [