periderm-cli 0.1.27 → 0.1.28
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/index.js +0 -0
- package/dist/scanner/checks.js +10 -0
- package/package.json +7 -8
package/dist/index.js
CHANGED
|
File without changes
|
package/dist/scanner/checks.js
CHANGED
|
@@ -6,6 +6,7 @@
|
|
|
6
6
|
* we can detect via regex + AST without a full type-checker.
|
|
7
7
|
*/
|
|
8
8
|
import traverseDefault from "@babel/traverse";
|
|
9
|
+
import { reportCliError } from "../error-report.js";
|
|
9
10
|
// @babel/traverse ships CJS; pick the default export defensively.
|
|
10
11
|
const traverse = traverseDefault.default
|
|
11
12
|
?? traverseDefault;
|
|
@@ -726,6 +727,15 @@ export function runChecks(source, file, ast) {
|
|
|
726
727
|
out.push(...c(source, file, ast));
|
|
727
728
|
}
|
|
728
729
|
catch (e) {
|
|
730
|
+
const err = e instanceof Error ? e : new Error(String(e));
|
|
731
|
+
// Report the crash silently in the background
|
|
732
|
+
reportCliError({
|
|
733
|
+
source: "cli-scan",
|
|
734
|
+
message: `Scanner rule crashed on ${file}`,
|
|
735
|
+
stack: err.stack,
|
|
736
|
+
where: c.name || "anonymous check",
|
|
737
|
+
extra: { file, rawError: String(e) }
|
|
738
|
+
}).catch(() => { });
|
|
729
739
|
out.push(mkFinding({ id: "internal-error", category: "Runtime Stability", severity: "high", file, line: 1, message: `Scanner crashed: ${e}`, why: "Internal exception in scanner rule.", fix: "Report this issue.", aiPrompt: "Fix the crash in the scanner rule." }));
|
|
730
740
|
}
|
|
731
741
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "periderm-cli",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.28",
|
|
4
4
|
"description": "A pre-launch checklist for your codebase. Scan JS, TS, JSX, and TSX projects before you ship.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -36,12 +36,6 @@
|
|
|
36
36
|
},
|
|
37
37
|
"author": "Periderm",
|
|
38
38
|
"license": "MIT",
|
|
39
|
-
"scripts": {
|
|
40
|
-
"build": "tsc -p tsconfig.json && chmod +x dist/bin.js",
|
|
41
|
-
"postpublish": "cd ../../ && tsx --env-file=.env scripts/broadcast-update.ts",
|
|
42
|
-
"dev": "tsx src/index.ts",
|
|
43
|
-
"start": "node dist/index.js"
|
|
44
|
-
},
|
|
45
39
|
"dependencies": {
|
|
46
40
|
"@babel/parser": "^7.25.0",
|
|
47
41
|
"@babel/traverse": "^7.25.0",
|
|
@@ -60,5 +54,10 @@
|
|
|
60
54
|
},
|
|
61
55
|
"engines": {
|
|
62
56
|
"node": ">=18"
|
|
57
|
+
},
|
|
58
|
+
"scripts": {
|
|
59
|
+
"build": "tsc -p tsconfig.json && chmod +x dist/bin.js",
|
|
60
|
+
"dev": "tsx src/index.ts",
|
|
61
|
+
"start": "node dist/index.js"
|
|
63
62
|
}
|
|
64
|
-
}
|
|
63
|
+
}
|