MCPcopy Create free account
hub / github.com/Silentely/eSIM-Tools / parsePackageLock

Function parsePackageLock

scripts/security-check.js:55–64  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

53
54// 解析package-lock.json
55function parsePackageLock() {
56 try {
57 const packageLockPath = path.join(__dirname, '../package-lock.json');
58 const packageLock = JSON.parse(fs.readFileSync(packageLockPath, 'utf8'));
59 return packageLock.dependencies || {};
60 } catch (error) {
61 console.error('Error reading package-lock.json:', error.message);
62 return {};
63 }
64}
65
66// 检查依赖包的安全状态
67function checkDependencies() {

Callers 1

checkDependenciesFunction · 0.85

Calls 1

errorMethod · 0.45

Tested by

no test coverage detected