codesentry 0.1.6 → 0.1.7
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 +20 -1
- package/package.json +3 -3
package/dist/index.js
CHANGED
|
@@ -142,6 +142,25 @@ import { join as join2 } from "path";
|
|
|
142
142
|
import chalk2 from "chalk";
|
|
143
143
|
import { Listr } from "listr2";
|
|
144
144
|
|
|
145
|
+
// src/errors.ts
|
|
146
|
+
var errorDetail = (error) => {
|
|
147
|
+
const stderr = error.stderr;
|
|
148
|
+
const stderrText = typeof stderr === "string" && stderr.trim().length > 0 ? ` (stderr: ${stderr.trim()})` : "";
|
|
149
|
+
return `${error.message}${stderrText}`;
|
|
150
|
+
};
|
|
151
|
+
var formatErrorChain = (error) => {
|
|
152
|
+
if (!(error instanceof Error)) {
|
|
153
|
+
return "erro desconhecido";
|
|
154
|
+
}
|
|
155
|
+
const parts = [errorDetail(error)];
|
|
156
|
+
let current = error.cause;
|
|
157
|
+
while (current instanceof Error) {
|
|
158
|
+
parts.push(errorDetail(current));
|
|
159
|
+
current = current.cause;
|
|
160
|
+
}
|
|
161
|
+
return parts.join(" | Causa: ");
|
|
162
|
+
};
|
|
163
|
+
|
|
145
164
|
// src/reporters/console.reporter.ts
|
|
146
165
|
import chalk from "chalk";
|
|
147
166
|
import Table from "cli-table3";
|
|
@@ -498,7 +517,7 @@ var generateMarkdownReportFilename = (date = /* @__PURE__ */ new Date()) => {
|
|
|
498
517
|
var errorMessage2 = (error) => error instanceof Error ? error.message : "erro desconhecido";
|
|
499
518
|
var reportScanFailure = (error) => {
|
|
500
519
|
process.exitCode = 1;
|
|
501
|
-
console.error(`Falha ao executar o scan: ${
|
|
520
|
+
console.error(`Falha ao executar o scan: ${formatErrorChain(error)}`);
|
|
502
521
|
};
|
|
503
522
|
var printResult = (result, options) => {
|
|
504
523
|
if (options.json) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "codesentry",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.7",
|
|
4
4
|
"workspaces": [
|
|
5
5
|
"packages/semgrep-rules"
|
|
6
6
|
],
|
|
@@ -58,8 +58,8 @@
|
|
|
58
58
|
"p-limit": "^7.3.2"
|
|
59
59
|
},
|
|
60
60
|
"optionalDependencies": {
|
|
61
|
-
"codesentry-semgrep-linux-x64": "0.1.
|
|
62
|
-
"codesentry-semgrep-win32-x64": "0.1.
|
|
61
|
+
"codesentry-semgrep-linux-x64": "0.1.7",
|
|
62
|
+
"codesentry-semgrep-win32-x64": "0.1.7"
|
|
63
63
|
},
|
|
64
64
|
"devDependencies": {
|
|
65
65
|
"@types/node": "^26.4.1",
|