Skip to content

Commit 8125185

Browse files
authored
feat(cli): add tarball specific stats in verbose stat logs (#741)
1 parent ed588fa commit 8125185

6 files changed

Lines changed: 21 additions & 3 deletions

File tree

i18n/arabic.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,10 @@ const cli = {
99
http_server_started: "تم تشغيل خادم HTTP على:",
1010
missingEnv: tS`متغير البيئة ${0} مفقود!`,
1111
stat: tS`${0}${1} في ${2}`,
12+
tarballStats: {
13+
path: tS`المسار: ${0}`,
14+
filesCount: tS`عدد الملفات: ${0}`
15+
},
1216
error: {
1317
name: tS`اسم ${0}: ${1}`,
1418
message: tS`الرسالة: ${0}`,

i18n/english.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,11 @@ const cli = {
1010
successfully_written_json: tS`Successfully written results file at: ${0}`,
1111
http_server_started: "HTTP Server started on:",
1212
missingEnv: tS`Environment variable ${0} is missing!`,
13-
stat: tS`${0}${1} in ${2}`,
13+
stat: tS`${0}${1} in ${2}${3}${4}`,
14+
tarballStats: {
15+
path: tS`Path: ${0}`,
16+
filesCount: tS`Files count: ${0}`
17+
},
1418
error: {
1519
name: tS`${0} name: ${1}`,
1620
message: tS`Message: ${0}`,

i18n/french.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,10 @@ const cli = {
1111
http_server_started: "Serveur HTTP démarré sur :",
1212
missingEnv: tS`La variable d'environnement ${0} est manquante!`,
1313
stat: tS`${0}${1} en ${2}`,
14+
tarballStats: {
15+
path: tS`Chemin: ${0}`,
16+
filesCount: tS`Nombre de fichiers: ${0}`
17+
},
1418
error: {
1519
name: tS`Nom ${0}: ${1}`,
1620
message: tS`Message: ${0}`,

i18n/turkish.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,10 @@ const cli = {
1111
http_server_started: "HTTP Sunucusu başlatıldı:",
1212
missingEnv: tS`${0} ortam değişkeni eksik!`,
1313
stat: tS`${0}${1} içinde ${2}`,
14+
tarballStats: {
15+
path: tS`Yol: ${0}`,
16+
filesCount: tS`Dosya sayısı: ${0}`
17+
},
1418
error: {
1519
name: tS`${0} adı: ${1}`,
1620
message: tS`Mesaj: ${0}`,

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@
110110
"@nodesecure/ossf-scorecard-sdk": "4.0.1",
111111
"@nodesecure/rc": "5.5.0",
112112
"@nodesecure/report": "4.2.2",
113-
"@nodesecure/scanner": "10.10.0",
113+
"@nodesecure/scanner": "10.11.0",
114114
"@nodesecure/server": "1.0.0",
115115
"@nodesecure/utils": "^2.2.0",
116116
"@nodesecure/vulnera": "3.1.0",

src/commands/loggers/logger.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,9 @@ export function logScannerStat(stat, isVerbose = true) {
1818
i18n.getTokenSync("cli.stat",
1919
isVerbose ? kleur.blue().bold("verbose ") : "",
2020
stat.name,
21-
colorExecutionTime(stat.executionTime)
21+
colorExecutionTime(stat.executionTime),
22+
stat.tarball?.path ? ` ${i18n.getTokenSync("cli.tarballStats.path", stat.tarball.path)}` : "",
23+
stat.tarball?.filesCount ? ` ${i18n.getTokenSync("cli.tarballStats.filesCount", stat.tarball.filesCount)}` : ""
2224
)));
2325
}
2426

0 commit comments

Comments
 (0)