heroku-connect-plugin
Advanced tools
Comparing version 0.0.1 to 0.0.2
59
index.js
@@ -1,58 +0,13 @@ | ||
var https = require('https'); | ||
var opts = { | ||
hostname: 'connect.heroku.com', | ||
port: 443, | ||
method: 'GET' | ||
} | ||
var me_path = '/api/v2/users/me?deep=true'; | ||
function connection_info(conn) { | ||
console.log("Overall: " + conn.state); | ||
conn.mappings.forEach(function(mapping) { | ||
if (mapping.state == 'DATA_SYNCED') { | ||
console.log("--> ✓ " + mapping.object_name); | ||
} else { | ||
console.log("--> x " + mapping.object_name + ": " + mapping.state); | ||
} | ||
}); | ||
} | ||
'use strict'; | ||
exports.topics = [{ | ||
name: 'connect', | ||
description: 'a topic for the hello world plugin' | ||
description: 'manage connections for heroku connect' | ||
}]; | ||
exports.commands = [ | ||
{ | ||
topic: 'connect', | ||
command: 'status', | ||
description: 'Status of your Heroku Connect connection', | ||
help: 'Status of your Heroku Connect connection', | ||
flags: [ | ||
{name: 'user', char: 'u', description: 'user to say hello to', hasValue: true} | ||
], | ||
needsApp: true, | ||
needsAuth: true, | ||
run: function (context) { | ||
opts.headers = {Authorization: 'Heroku ' + context.auth.password}; | ||
opts.path = me_path; | ||
var req = https.request(opts, function(res) { | ||
var body = ''; | ||
res.on('data', function(d) { | ||
body += d; | ||
}); | ||
res.on('end', function() { | ||
body = JSON.parse(body); | ||
body.instances.forEach(function(instance) { | ||
if (instance.name == context.app) { | ||
instance.connections.forEach(function(connection) { | ||
connection_info(connection); | ||
}); | ||
} | ||
}); | ||
}); | ||
}); | ||
req.end(); | ||
} | ||
} | ||
require('./lib/commands/connect/status'), | ||
require('./lib/commands/connect/preauth'), | ||
require('./lib/commands/connect/setup'), | ||
require('./lib/commands/connect/create-mapping'), | ||
require('./lib/commands/connect/delete-mapping') | ||
]; |
{ | ||
"name": "heroku-connect-plugin", | ||
"description": "Minimal Heroku Connect plugin for Heroku Toolbelt", | ||
"version": "0.0.1", | ||
"version": "0.0.2", | ||
"author": "Scott Persinger @persingerscott", | ||
@@ -13,3 +13,9 @@ "bugs": { | ||
"license": "ISC", | ||
"main": "index.js" | ||
"main": "index.js", | ||
"dependencies": { | ||
"heroku-cli-util": "^5.4.6", | ||
"heroku-client": "^1.10.0", | ||
"open": "0.0.5", | ||
"q": "^1.3.0" | ||
} | ||
} |
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
Network access
Supply chain riskThis module accesses the network.
Found 1 instance in 1 package
15812
11
432
4
3
+ Addedheroku-cli-util@^5.4.6
+ Addedheroku-client@^1.10.0
+ Addedopen@0.0.5
+ Addedq@^1.3.0
+ Addedansi-regex@2.1.1(transitive)
+ Addedansi-styles@2.2.1(transitive)
+ Addedansicolors@0.2.1(transitive)
+ Addedbuffer-from@1.1.2(transitive)
+ Addedcapture-stack-trace@1.0.2(transitive)
+ Addedcardinal@0.7.1(transitive)
+ Addedchalk@1.1.3(transitive)
+ Addedcli-cursor@1.0.2(transitive)
+ Addedco@4.6.0(transitive)
+ Addedconcat-stream@1.6.2(transitive)
+ Addedcore-util-is@1.0.3(transitive)
+ Addedcreate-error-class@3.0.2(transitive)
+ Addedduplexer3@0.1.5(transitive)
+ Addedescape-string-regexp@1.0.5(transitive)
+ Addedesprima@2.7.3(transitive)
+ Addedexit-hook@1.1.1(transitive)
+ Addedget-stream@1.1.0(transitive)
+ Addedgot@6.3.0(transitive)
+ Addedhas-ansi@2.0.0(transitive)
+ Addedhas-flag@1.0.0(transitive)
+ Addedheroku-cli-util@5.10.12(transitive)
+ Addedheroku-client@1.11.02.4.3(transitive)
+ Addedinflection@1.13.41.3.8(transitive)
+ Addedinherits@2.0.4(transitive)
+ Addedis-plain-obj@1.1.0(transitive)
+ Addedis-redirect@1.0.0(transitive)
+ Addedis-retry-allowed@1.2.0(transitive)
+ Addedis-stream@1.1.0(transitive)
+ Addedisarray@1.0.0(transitive)
+ Addedlazy.js@0.4.3(transitive)
+ Addedlodash@4.11.1(transitive)
+ Addedlogfmt@1.4.0(transitive)
+ Addedlowercase-keys@1.0.1(transitive)
+ Addedmemjs@0.8.9(transitive)
+ Addednode-status-codes@2.0.1(transitive)
+ Addedobject-assign@4.1.1(transitive)
+ Addedonetime@1.1.0(transitive)
+ Addedopen@0.0.5(transitive)
+ Addedopn@3.0.3(transitive)
+ Addedpath-proxy@1.0.0(transitive)
+ Addedprepend-http@1.0.4(transitive)
+ Addedprocess-nextick-args@2.0.1(transitive)
+ Addedq@1.5.1(transitive)
+ Addedreadable-stream@2.3.8(transitive)
+ Addedredeyed@0.6.0(transitive)
+ Addedrestore-cursor@1.0.1(transitive)
+ Addedsafe-buffer@5.1.2(transitive)
+ Addedscmp@2.0.0(transitive)
+ Addedsimple-encryptor@1.4.0(transitive)
+ Addedsplit@0.2.10(transitive)
+ Addedstring_decoder@1.1.1(transitive)
+ Addedstrip-ansi@3.0.1(transitive)
+ Addedsupports-color@2.0.03.1.2(transitive)
+ Addedthrough@2.3.8(transitive)
+ Addedtimed-out@2.0.0(transitive)
+ Addedtunnel-agent@0.4.2(transitive)
+ Addedtypedarray@0.0.6(transitive)
+ Addedunzip-response@1.0.2(transitive)
+ Addedurl-parse-lax@1.0.0(transitive)
+ Addedutil-deprecate@1.0.2(transitive)