preflyt 1.0.0 → 1.0.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/bin/cli.js +13 -8
- package/package.json +1 -1
package/bin/cli.js
CHANGED
|
@@ -63,24 +63,29 @@ function scanDirectory(dir) {
|
|
|
63
63
|
}
|
|
64
64
|
|
|
65
65
|
// Main
|
|
66
|
-
console.log('\n✈️ Preflyt - Preflight security check
|
|
66
|
+
console.log('\n✈️ Preflyt - Preflight security check\n')
|
|
67
67
|
|
|
68
68
|
const targetDir = process.argv[2] || '.'
|
|
69
69
|
scanDirectory(targetDir)
|
|
70
70
|
|
|
71
|
+
console.log('✅ Scan complete!\n')
|
|
72
|
+
|
|
71
73
|
if (issues.length === 0) {
|
|
72
|
-
console.log('
|
|
74
|
+
console.log('🎉 All clear — no issues found. Ready for takeoff!\n')
|
|
73
75
|
} else {
|
|
74
|
-
console.log(
|
|
76
|
+
console.log(`──────────────────────────────────────────`)
|
|
77
|
+
console.log(`📋 Found ${issues.length} item(s) to review:\n`)
|
|
75
78
|
|
|
76
|
-
issues.forEach(issue => {
|
|
77
|
-
console.log(`
|
|
78
|
-
console.log(`
|
|
79
|
-
console.log(`
|
|
79
|
+
issues.forEach((issue, index) => {
|
|
80
|
+
console.log(` ${index + 1}. ${issue.type} key exposed`)
|
|
81
|
+
console.log(` 📁 ${issue.file}:${issue.line}`)
|
|
82
|
+
console.log(` └─ ${issue.content}`)
|
|
80
83
|
console.log()
|
|
81
84
|
})
|
|
82
85
|
|
|
83
|
-
console.log(
|
|
86
|
+
console.log(`──────────────────────────────────────────`)
|
|
87
|
+
console.log(`💡 Quick fix: Move secrets to environment variables`)
|
|
88
|
+
console.log(` Then use process.env.YOUR_KEY_NAME instead\n`)
|
|
84
89
|
process.exit(1) // Exit with error code
|
|
85
90
|
}
|
|
86
91
|
|