New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

npm-java-runner

Package Overview
Dependencies
Maintainers
1
Versions
18
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

npm-java-runner - npm Package Compare versions

Comparing version 0.0.8 to 0.0.9

37

lib/index.js

@@ -9,4 +9,37 @@ #!/usr/bin/env node

var path_1 = __importDefault(require("path"));
var fs_1 = __importDefault(require("fs"));
var child_process_1 = __importDefault(require("child_process"));
function execute(command) {
child_process_1.default.exec(command, function (error, stdout, stderr) {
if (error) {
console.error(error);
}
if (stderr) {
console.error(stderr);
}
if (stdout) {
console.log(stdout);
}
});
}
function search(dir, regex) {
var result = [];
for (var file in fs_1.default.readdirSync(dir)) {
var filePath = path_1.default.join(dir, file);
var stat = fs_1.default.statSync(filePath);
if (stat.isFile() && new RegExp(regex).test(filePath)) {
result.push(filePath);
}
else if (stat.isDirectory()) {
result = result.concat(search(filePath, regex));
}
}
return result;
}
function resolveRunnableJar(regexp, path) {
throw "Cannot find " + regexp + " in " + path;
var found = search(path, regexp);
if (found.length > 1) {
throw "Multiple matches of " + regexp + " in " + path + " " + JSON.stringify(found);
}
return found[0];
}

@@ -22,5 +55,5 @@ function run(userPath) {

var runnableJar = resolveRunnableJar(runnableJarRegexp, userPath);
console.log("Runnable jar: " + runnableJar);
execute("java -jar " + runnableJar);
}
exports.run = run;
//# sourceMappingURL=index.js.map

4

package.json
{
"name": "npm-java-runner",
"version": "0.0.8",
"version": "0.0.9",
"scripts": {
"build": "npm run format && tsc -p .",
"format": "prettier --write .",
"release": "npm version patch && npm publish && git push --follow-tags"
"release": "npm run build && npm version patch && npm publish && git push --follow-tags"
},

@@ -9,0 +9,0 @@ "dependencies": {

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc