snapfail 0.0.18 → 0.0.19

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/index.js +7 -0
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -245,6 +245,13 @@ function formatIncidentDetail(group, sample) {
245
245
  for (const f of sample.stackFrames.slice(0, 6)) {
246
246
  const fn = f.fn ? `${cyan(f.fn)} ` : "";
247
247
  lines.push(` ${fn}${dim(f.file + ":" + f.line)}`);
248
+ if (f.codeSnippet) {
249
+ for (const snippetLine of f.codeSnippet.split(`
250
+ `)) {
251
+ const isError = snippetLine.startsWith("\u25BA");
252
+ lines.push(isError ? ` ${bold(snippetLine)}` : ` ${dim(snippetLine)}`);
253
+ }
254
+ }
248
255
  }
249
256
  }
250
257
  if (sample.consoleEntries.length > 0) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "snapfail",
3
- "version": "0.0.18",
3
+ "version": "0.0.19",
4
4
  "type": "module",
5
5
  "description": "CLI for snapfail — project setup, incident inspection and AI diagnostics",
6
6
  "license": "MIT",