frontend-guardian 0.1.16 → 0.1.17

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.
Files changed (2) hide show
  1. package/dist/cli.js +3 -6
  2. package/package.json +1 -1
package/dist/cli.js CHANGED
@@ -351,7 +351,7 @@ const DEFAULT_SUGGEST_API = "https://frontend-guardian.vercel.app/api/suggest";
351
351
  async function getGeminiSuggestion(apiKey, issueTitle, detected) {
352
352
  const ai = new GoogleGenAI({ apiKey });
353
353
  const prompt = `Frontend Guardian found this issue: "${issueTitle}". Detected: ${detected.slice(0, 500)}. Give a brief concrete fix suggestion in 1-2 sentences. No preamble.`;
354
- const res = await ai.models.generateContent({ model: "gemini-2.0-flash", contents: prompt });
354
+ const res = await ai.models.generateContent({ model: "gemini-1.5-flash", contents: prompt });
355
355
  const text = res.text;
356
356
  return (text ?? "").trim();
357
357
  }
@@ -473,11 +473,8 @@ async function main() {
473
473
  }
474
474
  spinner.succeed("Done.");
475
475
  }
476
- catch (e) {
477
- spinner.fail("AI suggestion failed.");
478
- if (!apiKey)
479
- console.error(chalk.yellow(" (Hosted API may be down. Set GEMINI_API_KEY to use your own key.)"));
480
- console.error(chalk.red(e instanceof Error ? e.message : String(e)));
476
+ catch {
477
+ spinner.fail("AI suggestions not available at the moment.");
481
478
  }
482
479
  }
483
480
  if (failOnScore != null && result.score < failOnScore) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "frontend-guardian",
3
- "version": "0.1.16",
3
+ "version": "0.1.17",
4
4
  "description": "Scan frontend projects for Tailwind & component consistency (Phase 1 CLI)",
5
5
  "type": "module",
6
6
  "bin": {