ccwrap 0.3.0 → 0.3.1

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/dist/cli.js CHANGED
@@ -84,7 +84,7 @@ const banner = `
84
84
  program
85
85
  .name("ccwrap")
86
86
  .description("ccwrap - Your AI coding stats, meme-ified into a shareable video")
87
- .version("0.3.0")
87
+ .version("0.3.1")
88
88
  .option("-o, --output <path>", "Output video file path", "ccwrap.mp4")
89
89
  .option("-m, --mode <mode>", "Commentary mode: sassy or dark", "sassy")
90
90
  .option("-p, --period <period>", "Time period: week, month, quarter, all (default: month)")
@@ -81,7 +81,9 @@ export async function generateCommentary(stats, mode) {
81
81
  max_tokens: 1024,
82
82
  messages: [{ role: "user", content: buildPrompt(stats, mode) }],
83
83
  });
84
- const text = message.content[0]?.type === "text" ? message.content[0].text : "";
84
+ const raw = message.content[0]?.type === "text" ? message.content[0].text : "";
85
+ // Strip markdown fences if the model wraps the JSON in ```json ... ```
86
+ const text = raw.replace(/^```(?:json)?\s*\n?/i, "").replace(/\n?```\s*$/i, "");
85
87
  const parsed = JSON.parse(text);
86
88
  // Validate all keys exist
87
89
  const keys = [
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ccwrap",
3
- "version": "0.3.0",
3
+ "version": "0.3.1",
4
4
  "description": "Claude Code Wrapped - Your AI coding stats, meme-ified into a shareable video",
5
5
  "type": "module",
6
6
  "license": "MIT",