Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

cli-router

Package Overview
Dependencies
Maintainers
1
Versions
31
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cli-router - npm Package Compare versions

Comparing version 0.0.4 to 0.0.5

13

lib/spec/cli_router_spec.js

@@ -52,14 +52,13 @@ 'use strict';

it('should fn of route /agent', function () {
it('should fn result of route /agent', function () {
var action = '/agent';
var cli_router = new _srcCli_router.CliRouter(controllers_root).add(action);
var Controller = require(path.join(controllers_root, action));
var controller = new Controller();
var params = cli_router.match(action).params;
var route = cli_router.findRouteByParams(params);
var fn = cli_router.getFn(route, params);
var result = cli_router.getFn(route, params)();
var Controller = require(path.join(controllers_root, action));
var should_fn = new Controller({}).index;
_specHelper2['default'].expect(fn).to.eql(should_fn);
_specHelper2['default'].expect(result).to.eql(controller.index());
});

@@ -139,2 +138,2 @@

});
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImNsaV9yb3V0ZXJfc3BlYy5qcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7OzBCQUFjLGVBQWU7Ozs7NkJBQ0gsbUJBQW1COztBQUU3QyxJQUFJLENBQUMsR0FBTSxPQUFPLENBQUMsT0FBTyxDQUFDLENBQUM7QUFDNUIsSUFBSSxJQUFJLEdBQUcsT0FBTyxDQUFDLE1BQU0sQ0FBQyxDQUFDOztBQUUzQixRQUFRLENBQUMsa0JBQWtCLEVBQUUsWUFBVztBQUN0QyxNQUFJLGdCQUFnQixHQUFHLHdCQUFFLG9CQUFvQixDQUFDLGFBQWEsQ0FBQyxDQUFDO0FBQzdELE1BQUksZUFBZSxHQUFHO0FBQ3BCLE9BQUcsRUFBRSxPQUFPLENBQUMsR0FBRyxFQUFFO0dBQ25CLENBQUM7O0FBRUYsSUFBRSxDQUFDLDZCQUE2QixFQUFFLFlBQVc7QUFDM0MsUUFBS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ICAuYWRkKCcvc3RhcnQnLCAoKSA9PiAnc3RhcnQnKTtcblxuICAgICAgdmFyIHJlc3VsdCA9IGNsaV9yb3V0ZXIucnVuKG9wdGlvbnMsIGNvbnRyb2xsZXJfb3B0cyk7XG4gICAgICBoLmV4cGVjdChyZXN1bHQpLnRvLmVxbCgnYWdlbnQgbm8gc3RhcnQnKTtcbiAgICB9KTtcblxuICAgIGl0KCdzaG91bGQgcnVuIGBzeXN0ZW0gc3RhcnRgIHdpdGggZnVuY3Rpb24nLCBmdW5jdGlvbigpIHtcbiAgICAgIHZhciBvcHRpb25zID0gUi5tZXJnZShzaG91bGRfb3B0aW9ucywge1xuICAgICAgICBzeXN0ZW06IHRydWUsXG4gICAgICAgIHN0YXJ0OiB0cnVlLFxuICAgICAgfSk7XG4gICAgICB2YXIgY2xpX3JvdXRlciA9IG5ldyBDbGlSb3V0ZXIoY29udHJvbGxlcnNfcm9vdClcbiAgICAgICAgLmFkZCgnL3N5c3RlbScpXG4gICAgICAgIC5hZGQoJy9zeXN0ZW0vc3RhcnQnLCAoKSA9PiAnc3lzdGVtIHN0YXJ0JylcbiAgICAgICAgLmFkZCgnL3N0YXJ0JywgKCkgPT4gJ3N0YXJ0Jyk7XG5cbiAgICAgIHZhciByZXN1bHQgPSBjbGlfcm91dGVyLnJ1bihvcHRpb25zLCBjb250cm9sbGVyX29wdHMpO1xuICAgICAgaC5leHBlY3QocmVzdWx0KS50by5lcWwoJ3N5c3RlbSBzdGFydCcpO1xuICAgIH0pO1xuICB9KTtcblxufSk7XG4iXSwic291cmNlUm9vdCI6Ii9jbGktcm91dGVyOjAuMC40L3NwZWMifQ==

@@ -38,4 +38,3 @@ 'use strict';

var system = params.system;
return 'agent start ' + system;
return 'agent start ' + params.system;
}

@@ -53,2 +52,2 @@ }, {

module.exports = Agent;
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImZpeHR1cmVzL2NvbnRyb2xsZXJzL2FnZW50Lm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ChvcHRpb25zKS50by5lcWwoYCR7Y2xpLnZlcnNpb259YCk7XG4gICAgICB9KTtcbiAgICB9KTtcbiAgfSk7XG5cbiAgZGVzY3JpYmUoJ2Z1bGwgdXNhZ2UnLCBmdW5jdGlvbiAoKSB7XG4gICAgY2xpX29wdGlvbnMucGF0aCA9IGguZml4dHVyZV9wYXRoKCd1c2FnZV9mdWxsLnR4dCcpO1xuXG4gICAgdmFyIGRvY19vcHRzID0geyBleGl0OiBmYWxzZSB9O1xuXG4gICAgaXQoJ3Nob3VsZCByb3V0ZSAvYWdlbnQnLCBmdW5jdGlvbigpIHtcbiAgICAgIHZhciBjbGkgPSBuZXcgVGVzdENsaShjbGlfb3B0aW9ucylcbiAgICAgICAgLnJvdXRlKCcvYWdlbnQnKTtcblxuICAgICAgZG9jX29wdHMuYXJndiA9IFsnYWdlbnQnLCAnc3RhcnQnXTtcbiAgICAgIHZhciByZXN1bHQgID0gY2xpLnJ1bihkb2Nfb3B0cywgY29udHJvbGxlcl9vcHRzKTtcblxuICAgICAgaC5leHBlY3QoY2xpLnJvdXRlc1swXS5wYXJhbXMpLnRvLmVxbCh7IGNvbnRyb2xsZXI6ICdhZ2VudCcsIGFjdGlvbjogdW5kZWZpbmVkIH0pO1xuICAgICAgaC5leHBlY3QocmVzdWx0KS50by5lcWwoJ2FnZW50IHN0YXJ0IG51bGwnKTtcbiAgICB9KTtcbiAgfSk7XG59KTtcbiJdLCJzb3VyY2VSb290IjoiL2NsaS1yb3V0ZXI6MC4wLjQvc3BlYyJ9

@@ -29,2 +29,2 @@ 'use strict';

module.exports = exports['default'];
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInNwZWMtaGVscGVyLmpzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7O0FBQUEsSUFBSSxJQUFJLEdBQUcsT0FBTyxDQUFDLE1BQU0sQ0FBQyxDQUFDOztBQUUzQixJQUFJLE9BQU8sR0FBRztB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HVyZSkge1xuICAgIHJldHVybiBwYXRoLnJlc29sdmUoXG4gICAgICAnLicsICdsaWInLCAnc3BlYycsICdmaXh0dXJlcycsIC4uLmZpeHR1cmVcbiAgICApO1xuICB9LFxufTtcblxuZXhwb3J0IGRlZmF1bHQgSGVscGVycztcbiJdLCJzb3VyY2VSb290IjoiL2NsaS1yb3V0ZXI6MC4wLjQvc3BlYyJ9

@@ -13,12 +13,16 @@ "use strict";

function CliController() {
var _this = this;
var opts = arguments[0] === undefined ? {} : arguments[0];
_classCallCheck(this, CliController);
Object.keys(opts).forEach(function (key) {
if (opts.hasOwnProperty(key)) {
_this[key] = opts[key];
}
});
}
_createClass(CliController, [{
key: "contructor",
value: function contructor(opts) {
this.ui = opts.ui;
this.cwd = opts.cwd;
}
}, {
key: "index",

@@ -34,2 +38,2 @@ value: function index() {

exports.CliController = CliController;
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImNsaV9jb250cm9sbGVyLmpzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7Ozs7Ozs7SUFBYSxhQUFhO1dBQWIsYUFBYTswQkFBYixhQUFhOzs7ZUFBYixhQUFhOztXQUNkLG9CQUFDLElBQUksRUFBRTtBQUNmLFVBQUksQ0FBQyxFQUFFLEdBQUksSUFBSSxDQUFDLEVBQUUsQ0FBQztBQUNuQixVQUFJLENBQUMsR0FBRyxHQUFHLElBQUksQ0FBQyxHQUFHLENBQUM7S0FDckI7OztXQUVJLGlCQUFHO0FBQ04sWUFBTSxJQUFJLEtBQUssQ0FBQyxnRUFBZ0UsQ0FBQyxDQUFDO0tBQ25GOzs7U0FSVSxhQUFhOzs7UUFBYixhQUFhLEdBQWIsYUFBYSIsImZpbGUiOiJjbGlfY29udHJvbGxlci5qcyIsInNvdXJjZXNDb250ZW50IjpbImV4cG9ydCBjbGFzcyBDbGlDb250cm9sbGVyIHtcbiAgY29udHJ1Y3RvcihvcHRzKSB7XG4gIC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b3JFYWNoKChrZXkpID0+IHtcbiAgICAgIGlmIChvcHRzLmhhc093blByb3BlcnR5KGtleSkpIHtcbiAgICAgICAgdGhpc1trZXldID0gb3B0c1trZXldO1xuICAgICAgfVxuICAgIH0pO1xuICB9XG5cbiAgaW5kZXgoKSB7XG4gICAgdGhyb3cgbmV3IEVycm9yKFwiRG9uJ3QgdXNlIENsaUNvbnRyb2xsZXIgZGlyZWN0bHksIGltcGxlbWVudGUgdGhlIGluZGV4IGFjdGlvbi5cIik7XG4gIH1cbn1cbiJdLCJzb3VyY2VSb290IjoiL2NsaS1yb3V0ZXI6MC4wLjQvc3JjIn0=

@@ -106,3 +106,10 @@ 'use strict';

var controller = new route.Controller(opts);
fn = !R.isNil(params.action) ? controller[params.action] : controller.index;
fn = function () {
for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
args[_key] = arguments[_key];
}
var fn = !R.isNil(params.action) ? controller[params.action] : controller.index;
return fn.apply(controller, args);
};
} else if (route.hasOwnProperty('fn')) {

@@ -141,3 +148,3 @@ fn = route.fn;

key: 'run',
value: function run(args, opts) {
value: function run(args, opts, obj) {
var cmds = this.exatractCommads(args);

@@ -151,3 +158,6 @@

if (R.is(Function, fn)) {
return fn(this.cleanArgs(args));
args = this.cleanArgs(args);
obj = obj || this;
return fn(args, obj);
}

@@ -162,2 +172,2 @@ }

exports.CliRouter = CliRouter;
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImNsaV9yb3V0ZXIuanMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7Ozs7Ozs7O21CQUFtQixLQUFLOzs7O0FBRXhCLElBQUksQ0FBQyxHQUFNLE9BQU8sQ0FBQyxPQUFPLENBQUMsQ0FBQztBQUM1QixJQUFJLElBQUksR0FBRyxPQUFPLENBQUMsTUFBTSxDQUFDLENBQUM7O0lBRWQsU0FBUztBQUNULFdBREEsU0FBUyxDQUNSLGdCQUFnQixFQ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BwYXRobmFtZSwgc3RhcnRBdCk7XG5cbiAgICBpZiAocm91dGUpIHtcbiAgICAgIHZhciBjb250cm9sbGVyX25hbWUgPSByb3V0ZS5wYXJhbXMuY29udHJvbGxlcjtcbiAgICAgIGlmICghUi5pc05pbChjb250cm9sbGVyX25hbWUpICYmICFSLmNvbnRhaW5zKGNvbnRyb2xsZXJfbmFtZSkodGhpcy5jb250cm9sbGVyX25hbWVzKSkge1xuICAgICAgICB0aGlzLmNvbnRyb2xsZXJfbmFtZXMucHVzaChjb250cm9sbGVyX25hbWUpO1xuICAgICAgfVxuXG4gICAgICBjb250cm9sbGVyID0gY29udHJvbGxlciB8fCBwYXRobmFtZTtcblxuICAgICAgaWYgKHR5cGVvZiBjb250cm9sbGVyID09PSAnc3RyaW5nJykge1xuICAgICAgICByb3V0ZS5Db250cm9sbGVyID0gY29udHJvbGxlcjtcbiAgICAgIH0gZWxzZSBpZiAodHlwZW9mIGNvbnRyb2xsZXIgPT09ICdmdW5jdGlvbicpIHtcbiAgICAgICAgcm91dGUuZm4gPSBjb250cm9sbGVyO1xuICAgICAgfSBlbHNlIHtcbiAgICAgICAgdGhyb3cgbmV3IEVycm9yKCcgcm91dGUgJyArIHBhdGhuYW1lLnRvU3RyaW5nKCkgKyAnIHJlcXVpcmVzIGEgYGNvbnRyb2xsZXJgJyk7XG4gICAgICB9XG5cbiAgICAgIHRoaXMucm91dGVzLnB1c2gocm91dGUpO1xuICAgIH0gZWxzZSB7XG4gICAgICB0aHJvdyBuZXcgRXJyb3IoJyBpbnZhbGlkIHJvdXRlICcgKyBwYXRobmFtZS50b1N0cmluZygpKTtcblxuICAgIH1cbiAgICByZXR1cm4gdGhpcztcbiAgfVxuXG4gIG1hdGNoKHBhdGhuYW1lLCBzdGFydEF0KSB7XG4gICAgdmFyIHBhcmFtcyA9IFJvdXRlci5tYXRjaCh0aGlzLnJvdXRlX3J1bGVzLCBwYXRobmFtZSwgc3RhcnRBdCk7XG4gICAgcmV0dXJuIHBhc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AgIHZhciBhcmdzID0ge307XG4gICAgZm9yICh2YXIga2V5IGluIG9sZF9hcmdzKSB7XG4gICAgICB2YXIgdmFsdWUgPSBvbGRfYXJnc1trZXldO1xuICAgICAgLy8gaHR0cHM6Ly9yZWdleDEwMS5jb20vci9mTTRwTzUvMVxuICAgICAga2V5ID0ga2V5LnJlcGxhY2UoL14oPzpbLS1dezJ9KC4pKXxePHw+JC9nbSwgJyQxJyk7XG4gICAgICBhcmdzW2tleV0gPSB2YWx1ZTtcbiAgICB9XG4gICAgcmV0dXJuIGFyZ3M7XG4gIH1cblxuICBydW4oYXJncywgb3B0cywgb2JqKSB7XG4gICAgdmFyIGNtZHMgPSB0aGlzLmV4YXRyYWN0Q29tbWFkcyhhcmdzKTtcblxuICAgIGlmICghUi5pc05pbChjbWRzKSAmJiAhUi5pc0VtcHR5KGNtZHMpKSB7XG4gICAgICB2YXIgbWF0Y2ggPSB0aGlzLm1hdGNoKGAvJHtjbWRzLmpvaW4oJy8nKX0vYCkucGFyYW1zO1xuICAgICAgdmFyIHJvdXRlID0gdGhpcy5maW5kUm91dGVCeVBhcmFtcyhtYXRjaCk7XG4gICAgICB2YXIgZm4gICAgPSB0aGlzLmdldEZuKHJvdXRlLCBtYXRjaCwgb3B0cyk7XG5cbiAgICAgIGlmIChSLmlzKEZ1bmN0aW9uLCBmbikpIHtcbiAgICAgICAgYXJncyA9IHRoaXMuY2xlYW5BcmdzKGFyZ3MpO1xuICAgICAgICBvYmogPSBvYmogfHwgdGhpcztcblxuICAgICAgICByZXR1cm4gZm4oYXJncywgb2JqKTtcbiAgICAgIH1cbiAgICB9XG4gIH1cbn1cbiJdLCJzb3VyY2VSb290IjoiL2NsaS1yb3V0ZXI6MC4wLjQvc3JjIn0=

@@ -74,3 +74,3 @@ 'use strict';

key: 'run',
value: function run(args, opts) {
value: function run(args, opts, obj) {
if (Array.isArray(args) || typeof args === 'string') {

@@ -82,3 +82,3 @@ args = { argv: args };

if (typeof result !== 'string') {
result = this.router.run(result, opts);
result = this.router.run(result, opts, obj || this);
}

@@ -94,2 +94,2 @@

exports.Cli = Cli;
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImluZGV4LmpzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7Ozs7Ozs7MEJBQTBCLGNBQWM7O0FBRXhDLElBQUksRUFBRSxHQUFLLE9BQU8sQ0FBQyxJQUFJLENBQUMsQ0FBQzs7QUFFekIsSUFBSSxNQUFNLEdBQUcsT0FBTyxDQUFDLFFBQVEsQ0FBQyxDQUFDOztJQUVsQixHQUFHO0FBQ0gsV0FEQSxHQUFHLENBQ0YsT0FBTyxFQUFFOzBCQURWLEdBQUc7O0FBRVosUUFBSSxPQUFPLE9BQU8sS0FBSyxRQUFRLEVBQUU7QUFDL0IsWUFBTSxLQUFLLENBQUMsZ0NBQWdDLENBQUMsQ0FBQztLQUMvQyxNQUFNLElBQUksT0FBTyxDQUFDLElBQUksRUFBRTtBQUN2QixVQUFJLENBQUMsU0FBUyxHQUFHLEVBQUUsQ0FBQyxZQUFZLENBQUMsT0FBTyxDQUFDLElBQUksQ0FBQyxDQUFDLFFBQVEsRUFBRSxDQUFDO0tBQzNELE1BQU0sSUFBSSxDQUFDLENBQUMsT0FBTyxDQUFDLFNBQVMsRUFBRTtBQUM5QixVQUFJLENBQUMsU0FBUyxHQUFHLE9BQU8sQ0FBQyxTQUFTLENBQUM7S0FDcEM7O0FBRUQsUUFBSSxDQUFDLE1BQU0sR0FBSyxnQkFoQlgsU0FBUyxDQWdCZ0IsT0FBTyxDQUFDLGdCQUFnQixJQUFJLGVBQWUsQ0FBQyxDQUFDO0FBQzNFLFFBQUksQ0FBQyxRQUFRLEdBQUcsT0FBTyxDQUFDLE9BQU8sQ0FBQztHQUNqQzs7ZUFaVSxHQUFHOztTQWNOLFlBQUc7QUFDVCxhQUFPLElBQUksQ0FBQyxTQUFTLENBQUM7S0FDdkI7OztTQUVVLFlB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IHJldHVybiB0aGlzO1xuICB9XG5cbiAgZ2V0IHJvdXRlcygpIHtcbiAgICByZXR1cm4gdGhpcy5yb3V0ZXIucm91dGVzO1xuICB9XG5cbiAgcnVuKGFyZ3MsIG9wdHMsIG9iaikge1xuICAgIGlmIChBcnJheS5pc0FycmF5KGFyZ3MpIHx8IHR5cGVvZiBhcmdzID09PSAnc3RyaW5nJykge1xuICAgICAgYXJncyA9IHsgYXJndjogYXJncyB9O1xuICAgIH1cbiAgICB2YXIgcmVzdWx0ID0gdGhpcy5kb2NvcHQoYXJncyk7XG5cbiAgICBpZiAodHlwZW9mIHJlc3VsdCAhPT0gJ3N0cmluZycpIHtcbiAgICAgIHJlc3VsdCA9IHRoaXMucm91dGVyLnJ1bihyZXN1bHQsIG9wdHMsIChvYmogfHwgdGhpcykpO1xuICAgIH1cblxuICAgIHJldHVybiByZXN1bHQ7XG4gIH1cbn1cbiJdLCJzb3VyY2VSb290IjoiL2NsaS1yb3V0ZXI6MC4wLjQvc3JjIn0=
{
"name": "cli-router",
"version": "0.0.4",
"version": "0.0.5",
"description": "cli-router",

@@ -5,0 +5,0 @@ "main": "index.js",

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