| (function() { | ||
| var CliCommand, execute, util, _; | ||
| var CliCommand, action, execute, getOptions, makeAction, util, _, _i, _len, _ref; | ||
@@ -12,4 +12,4 @@ _ = require('underscore'); | ||
| exports.push = function(args, options, callback) { | ||
| var command, _ref, _ref1, _ref2; | ||
| getOptions = function(args, options, callback) { | ||
| var _ref, _ref1, _ref2; | ||
| if (_.isString(args)) { | ||
@@ -23,6 +23,20 @@ args = [args]; | ||
| } | ||
| command = new CliCommand(['git', 'push'], args, options); | ||
| return execute(command, this._getOptions(), callback); | ||
| return [args, options, callback]; | ||
| }; | ||
| makeAction = function(action) { | ||
| return function(args, options, callback) { | ||
| var command, _ref; | ||
| _ref = getOptions(args, options, callback), args = _ref[0], options = _ref[1], callback = _ref[2]; | ||
| command = new CliCommand(['git', action], args, options); | ||
| return execute(command, this._getOptions(), callback); | ||
| }; | ||
| }; | ||
| _ref = ['push', 'pull', 'fetch']; | ||
| for (_i = 0, _len = _ref.length; _i < _len; _i++) { | ||
| action = _ref[_i]; | ||
| exports[action] = makeAction(action); | ||
| } | ||
| }).call(this); |
+3
-2
| { | ||
| "name": "git-cli", | ||
| "version": "0.8.3", | ||
| "version": "0.9.0", | ||
| "description": "Simple CLI like git interface for NodeJS", | ||
| "main": "lib/git-cli.js", | ||
| "scripts": { | ||
| "test": "grunt test" | ||
| "test": "grunt test", | ||
| "prepublish": "grunt build" | ||
| }, | ||
@@ -9,0 +10,0 @@ "repository": { |
Network access
Supply chain riskThis module accesses the network.
Found 1 instance in 1 package
Shell access
Supply chain riskThis module accesses the system shell. Accessing the system shell increases the risk of executing arbitrary code.
Found 1 instance in 1 package
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 1 instance in 1 package
Shell access
Supply chain riskThis module accesses the system shell. Accessing the system shell increases the risk of executing arbitrary code.
Found 1 instance in 1 package
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 1 instance in 1 package
27130
1.86%657
1.86%2
100%