/opt/cpanel/ea-wappspector/src/Matchers
Edit: /opt/cpanel/ea-wappspector/src/Matchers/NodeJs.php (1177B)
fileExists($packageJsonPath)) {
$json = [];
try {
$json = json_decode($fs->read($packageJsonPath), true, 512, JSON_THROW_ON_ERROR);
} catch (JsonException) {
// ignore package.json errors
}
return new MatchResult($path, null, $json['name'] ?? null);
}
$filesToCheck = ['server.js', 'app.js', 'index.js'];
foreach ($filesToCheck as $file) {
if ($fs->fileExists($basePath . '/' . $file)) {
return new MatchResult($path, null, null);
}
}
return new EmptyMatchResult();
}
}