Socket
Socket
Sign inDemoInstall

heroku-cli-util

Package Overview
Dependencies
Maintainers
1
Versions
155
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

heroku-cli-util - npm Package Compare versions

Comparing version 1.0.1 to 1.1.0

.jshintignore

10

package.json
{
"name": "heroku-cli-util",
"version": "1.0.1",
"version": "1.1.0",
"description": "Set of helpful CLI utilities",

@@ -16,5 +16,11 @@ "main": "cli.js",

"homepage": "https://github.com/heroku/heroku-cli-util",
"scripts": {
"test": "jshint . && mocha"
},
"devDependencies": {
"netrc": "^0.1.3"
"chai": "*",
"jshint": "*",
"mocha": "*",
"netrc": "*"
}
}

21

run.js
var util = require('util');
var console = require('./console');
var process = require('./process');

@@ -24,3 +26,3 @@ function usage (commands) {

function parseArgs (cmd, args) {
var argTemplates = cmd.args.slice(0);
var argTemplates = cmd.args ? cmd.args.slice(0) : [];
var parsed = {};

@@ -32,3 +34,3 @@ for (var i=0; i<args.length; i++) {

console.error('Invalid argument. No app is needed');
process.exit(1);
return process.exit(1);
}

@@ -38,3 +40,3 @@ parsed.app = args[i+1];

console.error('TODO: parse flags');
process.exit(1);
return process.exit(1);
}

@@ -46,3 +48,3 @@ i++;

console.error('Too many arguments');
process.exit(1);
return process.exit(1);
}

@@ -55,3 +57,3 @@ parsed[current.name] = args[i];

console.error('Missing argument:', arg.name);
process.exit(1);
return process.exit(1);
}

@@ -64,5 +66,6 @@ });

module.exports = function run (commands, args) {
var argName = args && args.length > 0 ? args[0] : '';
var netrc = require('netrc')()['api.heroku.com'];
var cmd = findCmd(commands, args[0]);
if (!cmd) { usage(commands); process.exit(1); }
var cmd = findCmd(commands, argName);
if (!cmd) { usage(commands); return process.exit(1); }

@@ -76,3 +79,3 @@ var options = {

console.log(' ! Not logged in');
process.exit(1);
return process.exit(1);
}

@@ -87,3 +90,3 @@ options.auth = { username: netrc.login, password: netrc.password };

console.error(' ! Run this command from an app folder or specify which app to use with --app APP');
process.exit(1);
return process.exit(1);
}

@@ -90,0 +93,0 @@ }

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