heroku-cli-util
Advanced tools
Comparing version 7.0.2 to 8.0.0
@@ -9,3 +9,3 @@ 'use strict' | ||
let auth = [username, password].join(':') | ||
auth = new Buffer(auth).toString('base64') | ||
auth = Buffer.from(auth).toString('base64') | ||
return `Basic ${auth}` | ||
@@ -36,4 +36,4 @@ } | ||
function saveToken ({email, token}) { | ||
const Netrc = require('netrc-parser') | ||
const netrc = new Netrc() | ||
const netrc = require('netrc-parser').default | ||
netrc.loadSync() | ||
const hosts = [vars.apiHost, vars.httpGitHost] | ||
@@ -156,9 +156,9 @@ hosts.forEach(host => { | ||
const Netrc = require('netrc-parser') | ||
const netrc = new Netrc() | ||
if (netrc.machines.hasOwnProperty('api.heroku.com')) { | ||
delete netrc.machines['api.heroku.com'] | ||
const netrc = require('netrc-parser').default | ||
netrc.loadSync() | ||
if (netrc.machines[vars.apiHost]) { | ||
netrc.machines[vars.apiHost] = undefined | ||
} | ||
if (netrc.machines.hasOwnProperty('git.heroku.com')) { | ||
delete netrc.machines['git.heroku.com'] | ||
if (netrc.machines[vars.httpGitHost]) { | ||
netrc.machines[vars.httpGitHost] = undefined | ||
} | ||
@@ -193,6 +193,6 @@ netrc.save() | ||
function token () { | ||
const Netrc = require('netrc-parser') | ||
const netrc = new Netrc() | ||
const netrc = require('netrc-parser').default | ||
netrc.loadSync() | ||
if (process.env.HEROKU_API_KEY) return process.env.HEROKU_API_KEY | ||
return netrc.machines[vars.apiHost].password | ||
return netrc.machines[vars.apiHost] && netrc.machines[vars.apiHost].password | ||
} | ||
@@ -199,0 +199,0 @@ |
@@ -136,2 +136,6 @@ 'use strict' | ||
const errors = [ | ||
'CacheError', | ||
'CancelError', | ||
'GotError', | ||
'UnsupportedProtocolError', | ||
'HTTPError', | ||
@@ -138,0 +142,0 @@ 'MaxRedirectsError', |
@@ -47,3 +47,3 @@ 'use strict' | ||
function ctrlc () { | ||
reject('') | ||
reject(new Error('')) | ||
stop() | ||
@@ -132,3 +132,3 @@ } | ||
if (confirm === app) return resolve() | ||
return reject(`Confirmation ${cli.color.bold.red(confirm)} did not match ${cli.color.bold.red(app)}. Aborted.`) | ||
return reject(new Error(`Confirmation ${cli.color.bold.red(confirm)} did not match ${cli.color.bold.red(app)}. Aborted.`)) | ||
} | ||
@@ -146,3 +146,3 @@ if (!message) { | ||
} | ||
return reject(`Confirmation did not match ${cli.color.bold.red(app)}. Aborted.`) | ||
return reject(new Error(`Confirmation did not match ${cli.color.bold.red(app)}. Aborted.`)) | ||
}) | ||
@@ -149,0 +149,0 @@ }) |
{ | ||
"name": "heroku-cli-util", | ||
"description": "Set of helpful CLI utilities", | ||
"version": "7.0.2", | ||
"version": "8.0.0", | ||
"author": "Jeff Dickey (@dickeyxxx)", | ||
@@ -16,4 +16,4 @@ "bugs": { | ||
"co": "^4.6.0", | ||
"got": "^6.3.0", | ||
"heroku-client": "^3.0.5", | ||
"got": "^8.0.3", | ||
"heroku-client": "^3.0.6", | ||
"lodash.ary": "^4.1.1", | ||
@@ -31,22 +31,23 @@ "lodash.defaults": "^4.2.0", | ||
"lodash.result": "^4.5.2", | ||
"netrc-parser": "^2.0.5", | ||
"netrc-parser": "^3.1.0", | ||
"opn": "^3.0.3", | ||
"strip-ansi": "^4.0.0", | ||
"supports-color": "^5.1.0", | ||
"tslib": "^1.9.0", | ||
"tunnel-agent": "^0.6.0" | ||
}, | ||
"devDependencies": { | ||
"chai": "^3.0.0", | ||
"codeclimate-test-reporter": "^0.4.0", | ||
"hook-std": "^0.2.0", | ||
"jsdoc": "*", | ||
"mocha": "^3.2.0", | ||
"mocha-junit-reporter": "^1.13.0", | ||
"chai": "^4.1.2", | ||
"codeclimate-test-reporter": "^0.5.0", | ||
"hook-std": "^0.4.0", | ||
"jsdoc": "3.5.5", | ||
"mocha": "^5.0.0", | ||
"mocha-junit-reporter": "^1.17.0", | ||
"nock": "^9.0.4", | ||
"nyc": "^10.1.2", | ||
"nyc": "^11.4.1", | ||
"proxyquire": "^1.7.11", | ||
"sinon": "^1.17.7", | ||
"standard": "^8.6.0", | ||
"tmp": "^0.0.31", | ||
"unexpected": "^10.25.0" | ||
"standard": "^10.0.3", | ||
"tmp": "^0.0.33", | ||
"unexpected": "^10.37.0" | ||
}, | ||
@@ -53,0 +54,0 @@ "engines": { |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
86101
2901
26
+ Addedtslib@^1.9.0
+ Added@sindresorhus/is@0.7.0(transitive)
+ Addedcacheable-request@2.1.4(transitive)
+ Addedclone-response@1.0.2(transitive)
+ Addedcore-util-is@1.0.3(transitive)
+ Addedcross-spawn@6.0.5(transitive)
+ Addeddebug@3.2.7(transitive)
+ Addeddecode-uri-component@0.2.2(transitive)
+ Addeddecompress-response@3.3.0(transitive)
+ Addedexeca@0.10.0(transitive)
+ Addedfrom2@2.3.0(transitive)
+ Addedgot@8.3.2(transitive)
+ Addedhas-symbol-support-x@1.4.2(transitive)
+ Addedhas-to-string-tag-x@1.4.1(transitive)
+ Addedhttp-cache-semantics@3.8.1(transitive)
+ Addedinherits@2.0.4(transitive)
+ Addedinto-stream@3.1.0(transitive)
+ Addedis-object@1.0.2(transitive)
+ Addedis-plain-obj@1.1.0(transitive)
+ Addedisarray@1.0.0(transitive)
+ Addedisexe@2.0.0(transitive)
+ Addedisurl@1.0.0(transitive)
+ Addedjson-buffer@3.0.0(transitive)
+ Addedkeyv@3.0.0(transitive)
+ Addedlowercase-keys@1.0.0(transitive)
+ Addedmimic-response@1.0.1(transitive)
+ Addedms@2.1.3(transitive)
+ Addednetrc-parser@3.1.6(transitive)
+ Addednice-try@1.0.5(transitive)
+ Addednormalize-url@2.0.1(transitive)
+ Addednpm-run-path@2.0.2(transitive)
+ Addedp-cancelable@0.4.1(transitive)
+ Addedp-finally@1.0.0(transitive)
+ Addedp-is-promise@1.1.0(transitive)
+ Addedp-timeout@2.0.1(transitive)
+ Addedpath-key@2.0.1(transitive)
+ Addedpify@3.0.0(transitive)
+ Addedprepend-http@2.0.0(transitive)
+ Addedprocess-nextick-args@2.0.1(transitive)
+ Addedquery-string@5.1.1(transitive)
+ Addedreadable-stream@2.3.8(transitive)
+ Addedresponselike@1.0.2(transitive)
+ Addedsafe-buffer@5.1.2(transitive)
+ Addedsemver@5.7.2(transitive)
+ Addedshebang-command@1.2.0(transitive)
+ Addedshebang-regex@1.0.0(transitive)
+ Addedsignal-exit@3.0.7(transitive)
+ Addedsort-keys@2.0.0(transitive)
+ Addedstrict-uri-encode@1.1.0(transitive)
+ Addedstring_decoder@1.1.1(transitive)
+ Addedstrip-eof@1.0.0(transitive)
+ Addedurl-parse-lax@3.0.0(transitive)
+ Addedurl-to-options@1.0.1(transitive)
+ Addedutil-deprecate@1.0.2(transitive)
+ Addedwhich@1.3.1(transitive)
- Removedcapture-stack-trace@1.0.2(transitive)
- Removedcreate-error-class@3.0.2(transitive)
- Removedgot@6.7.1(transitive)
- Removedis-redirect@1.0.0(transitive)
- Removedlex@1.7.9(transitive)
- Removednetrc-parser@2.0.6(transitive)
- Removedprepend-http@1.0.4(transitive)
- Removedunzip-response@2.0.1(transitive)
- Removedurl-parse-lax@1.0.0(transitive)
Updatedgot@^8.0.3
Updatedheroku-client@^3.0.6
Updatednetrc-parser@^3.1.0