Comparing version 0.3.0 to 0.4.0
@@ -8,2 +8,3 @@ require('mootools'); | ||
require('./src/node/fs.js'); | ||
require('./src/node/path.js'); | ||
require('./src/node/http.js'); | ||
@@ -10,0 +11,0 @@ require('./src/zero_functions.js'); |
{ | ||
"name": "nyks", | ||
"version": "0.3.0", | ||
"version": "0.4.0", | ||
"description": "nodejs exupery style", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
@@ -9,9 +9,13 @@ nyks provide a set of "missing" stuffs in nodejs basic api. | ||
* require('child_process').exec_window(cmd, args, callback); | ||
child_process.exec equivalent for windowed applications. | ||
## Date | ||
* Date.now() | ||
Return current unix timestamp, in seconds, as float | ||
* require('child_process').passthru(cmd, args, callback); | ||
* require('child_process').passthru(cmd, {args:args,env:env}, callback); | ||
callback(err, exit_code, last_stdout_line); | ||
## path | ||
* path.which | ||
Return full path of a binary in env PATH | ||
## fs | ||
@@ -18,0 +22,0 @@ * require('fs').deleteFolderRecursive(path); |
@@ -9,1 +9,32 @@ var cp = require('child_process'); | ||
} | ||
//callback(err, exit, lastline); | ||
cp.passthru = function(cmd, options, chain){ | ||
if(Array.isArray(options)) | ||
options = { args : options} ; | ||
options = options || {}; | ||
var ps = cp.spawn(cmd, options.args || [], options), | ||
_ret = ""; | ||
ps.on('error', function(err){ | ||
ps.removeAllListeners('close'); | ||
ps.on('close', function(exit) { | ||
return chain(err, exit); | ||
}); | ||
}); | ||
ps.stdout.on("data", function(data){ | ||
_ret = data.toString(); | ||
console.log(data.toString()); | ||
}); | ||
ps.stderr.on("data", function(data){ | ||
console.err(data.toString()) | ||
}); | ||
ps.on('close', function(exit) { | ||
return chain(null, exit, _ret); | ||
}); | ||
} |
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
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
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
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
13932
15
362
88
2
5