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

heroku-connect-plugin

Package Overview
Dependencies
Maintainers
1
Versions
29
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

heroku-connect-plugin - npm Package Compare versions

Comparing version 0.0.3 to 0.0.4

19

lib/commands/connect/shared.js

@@ -102,3 +102,3 @@ var https = require('https');

var withUserConnections = exports.withUserConnections = function(token, appName, flags){
var withUserConnections = exports.withUserConnections = function(token, appName, flags, allowNone){
global_config();

@@ -120,3 +120,3 @@

}
if (connections.length > 0) {
if (connections.length > 0 || allowNone) {
resolve(connections);

@@ -180,1 +180,16 @@ } else {

};
exports.requestAppAccess = function(token, app) {
global_config();
return exports.withUser(token).then(function(user_id) {
console.log("Got user id ", user_id);
var url = '/api/v3/users/' + user_id + '/apps/' + app + '/auth';
console.log("POST ", url);
return request(token, 'POST', url).then(function(response){
return Q.Promise(function(resolve, reject){
resolve(response.json);
});
});
});
}

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

function connections_status(connections) {
if (connections.length == 0) {
console.log("No connections found");
}
connections.forEach(function(connection) {
connection_info(connection);
console.log("");
});
}
module.exports = {

@@ -25,9 +35,16 @@ topic: 'connect',

run: function (context) {
api.withUserConnections(context.auth.password, context.app, context.flags).then(function(connections){
connections.forEach(function(connection) {
connection_info(connection);
console.log("");
});
console.log(context.auth.password);
api.withUserConnections(context.auth.password, context.app, context.flags, true).then(function(connections){
if (connections.length === 0) {
console.log("No connection found, requesting auth...");
api.requestAppAccess(context.auth.password, context.app).then(function() {
api.withUserConnections(context.auth.password, context.app, context.flags).then(function(connections){
connections_status(connections);
});
});
} else {
connections_status(connections);
}
});
}
};

2

package.json
{
"name": "heroku-connect-plugin",
"description": "Minimal Heroku Connect plugin for Heroku Toolbelt",
"version": "0.0.3",
"version": "0.0.4",
"author": "Scott Persinger @persingerscott",

@@ -6,0 +6,0 @@ "bugs": {

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