Comparing version 1.0.0-beta.7 to 1.0.0-beta.8
@@ -8,4 +8,4 @@ import { Options } from './index'; | ||
export declare function fetchCertificateAuthorityCredentials(): Promise<{ | ||
rootKeyPath: string; | ||
rootCertPath: string; | ||
decryptedCAKeyPath: string; | ||
decryptedCACertPath: string; | ||
}>; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
const tslib_1 = require("tslib"); | ||
const crypto = require("crypto"); | ||
const fs_1 = require("fs"); | ||
@@ -8,3 +9,3 @@ const createDebug = require("debug"); | ||
const tmp_1 = require("tmp"); | ||
const keychain = require("keytar"); | ||
const prompt = require("prompt"); | ||
const constants_1 = require("./constants"); | ||
@@ -33,3 +34,3 @@ const macos_1 = require("./platforms/macos"); | ||
debug('Saving certificate authority credentials to system keychain'); | ||
addCertificateAuthorityToSystemKeychain(rootKeyPath, rootCertPath); | ||
saveCertificateAuthorityCredentials(rootKeyPath, rootCertPath); | ||
debug(`Adding the root certificate authority to trust stores`); | ||
@@ -45,7 +46,2 @@ if (constants_1.isMac) { | ||
} | ||
debug('Certificate authority added to trust stores, removing temporary files'); | ||
fs_1.unlinkSync(rootKeyPath); | ||
fs_1.unlinkSync(rootCertPath); | ||
debug('Adding flag indicating root certificate authority install'); | ||
fs_1.writeFileSync(constants_1.rootCAInstalledFlagFilePath, ''); | ||
}); | ||
@@ -75,13 +71,14 @@ } | ||
debug(`Fetching devcert's certificate authority credentials from the system keychain`); | ||
let rootKeyPath = tmp_1.fileSync().name; | ||
let rootCertPath = tmp_1.fileSync().name; | ||
let key = yield keychain.getPassword('devcert', 'certificate-authority-key'); | ||
let cert = yield keychain.getPassword('devcert', 'certificate-authority-certificate'); | ||
fs_1.writeFileSync(rootKeyPath, key); | ||
fs_1.writeFileSync(rootCertPath, cert); | ||
return { rootKeyPath, rootCertPath }; | ||
let decryptedCAKeyPath = tmp_1.fileSync().name; | ||
let decryptedCACertPath = tmp_1.fileSync().name; | ||
let encryptedCAKey = fs_1.readFileSync(constants_1.rootCAKeyPath, 'utf-8'); | ||
let encryptedCACert = fs_1.readFileSync(constants_1.rootCACertPath, 'utf-8'); | ||
let encryptionKey = yield getPasswordFromUser(); | ||
fs_1.writeFileSync(decryptedCAKeyPath, decrypt(encryptedCAKey, encryptionKey)); | ||
fs_1.writeFileSync(decryptedCACertPath, decrypt(encryptedCACert, encryptionKey)); | ||
return { decryptedCAKeyPath, decryptedCACertPath }; | ||
}); | ||
} | ||
exports.fetchCertificateAuthorityCredentials = fetchCertificateAuthorityCredentials; | ||
function addCertificateAuthorityToSystemKeychain(keypath, certpath) { | ||
function saveCertificateAuthorityCredentials(keypath, certpath) { | ||
return tslib_1.__awaiter(this, void 0, void 0, function* () { | ||
@@ -91,6 +88,30 @@ debug(`Adding devcert's certificate authority credentials to the system keychain`); | ||
let cert = fs_1.readFileSync(certpath, 'utf-8'); | ||
yield keychain.setPassword('devcert', 'certificate-authority-key', key); | ||
yield keychain.setPassword('devcert', 'certificate-authority-certificate', cert); | ||
let encryptionKey = yield getPasswordFromUser(); | ||
fs_1.writeFileSync(constants_1.rootCAKeyPath, encrypt(key, encryptionKey)); | ||
fs_1.writeFileSync(constants_1.rootCACertPath, encrypt(cert, encryptionKey)); | ||
}); | ||
} | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY2VydGlmaWNhdGUtYXV0aG9yaXR5LmpzIiwic291cmNlUm9vdCI6Ii9Vc2Vycy9kYXcvb3NzL2RldmNlcnQvIiwic291cmNlcyI6WyJjZXJ0aWZpY2F0ZS1hdXRob3JpdHkudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7O0FBQUEsMkJBQTRGO0FBQzVGLHFDQUFxQztBQUNyQywyQkFBMkI7QUFDM0IsNkJBQXNDO0FBQ3RDLG1DQUFtQztBQUVuQywyQ0FPcUI7QUFDckIsNkNBQW9EO0FBQ3BELDZDQUFzRDtBQUN0RCxpREFBMEQ7QUFDMUQsbUNBQWtDO0FB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ICBsZXQga2V5ID0gcmVhZEZpbGUoa2V5cGF0aCwgJ3V0Zi04Jyk7XG4gIGxldCBjZXJ0ID0gcmVhZEZpbGUoY2VydHBhdGgsICd1dGYtOCcpO1xuICBhd2FpdCBrZXljaGFpbi5zZXRQYXNzd29yZCgnZGV2Y2VydCcsICdjZXJ0aWZpY2F0ZS1hdXRob3JpdHkta2V5Jywga2V5KTtcbiAgYXdhaXQga2V5Y2hhaW4uc2V0UGFzc3dvcmQoJ2RldmNlcnQnLCAnY2VydGlmaWNhdGUtYXV0aG9yaXR5LWNlcnRpZmljYXRlJywgY2VydCk7XG59Il19 | ||
function getPasswordFromUser() { | ||
return new Promise((resolve, reject) => { | ||
prompt.start(); | ||
prompt.get({ | ||
properties: { | ||
password: { | ||
description: 'Password:', | ||
hidden: true | ||
} | ||
} | ||
}, (err, result) => { | ||
err ? reject(err) : resolve(result); | ||
}); | ||
}); | ||
} | ||
function encrypt(text, key) { | ||
let cipher = crypto.createCipher('aes256', key); | ||
return cipher.update(text, 'utf8', 'hex') + cipher.final('hex'); | ||
} | ||
function decrypt(encrypted, key) { | ||
let decipher = crypto.createDecipher('aes256', key); | ||
return decipher.update(encrypted, 'hex', 'utf8') + decipher.final('utf8'); | ||
} | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY2VydGlmaWNhdGUtYXV0aG9yaXR5LmpzIiwic291cmNlUm9vdCI6Ii9Vc2Vycy9kYXcvb3NzL2RldmNlcnQvIiwic291cmNlcyI6WyJjZXJ0aWZpY2F0ZS1hdXRob3JpdHkudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7O0FBQUEsaUNBQWlDO0FBQ2pDLDJCQUEwRTtBQUMxRSxxQ0FBcUM7QUFDckMsMkJBQTJCO0FBQzNCLDZCQUFzQztBQUN0QyxpQ0FBaUM7QUFFakMsMkNBUXFCO0FBQ3JCLDZDQUFvRDtBQUNwRCw2Q0FBc0Q7QUFDdEQsa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RmOCcpO1xufSJdfQ== |
@@ -30,6 +30,6 @@ "use strict"; | ||
let certPath = constants_1.pathForDomain(`${domain}.crt`); | ||
let { rootKeyPath, rootCertPath } = yield certificate_authority_1.fetchCertificateAuthorityCredentials(); | ||
utils_1.openssl(`ca -config ${constants_1.opensslConfPath} -in ${csrFile} -out ${path.basename(certPath)} -outdir ${path.dirname(certPath)} -keyfile ${rootKeyPath} -cert ${rootCertPath} -notext -md sha256 -days 7000 -batch -extensions server_cert`); | ||
fs_1.unlinkSync(rootKeyPath); | ||
fs_1.unlinkSync(rootCertPath); | ||
let { decryptedCAKeyPath, decryptedCACertPath } = yield certificate_authority_1.fetchCertificateAuthorityCredentials(); | ||
utils_1.openssl(`ca -config ${constants_1.opensslConfPath} -in ${csrFile} -out ${path.basename(certPath)} -outdir ${path.dirname(certPath)} -keyfile ${decryptedCAKeyPath} -cert ${decryptedCACertPath} -notext -md sha256 -days 7000 -batch -extensions server_cert`); | ||
fs_1.unlinkSync(decryptedCAKeyPath); | ||
fs_1.unlinkSync(decryptedCACertPath); | ||
}); | ||
@@ -45,2 +45,2 @@ } | ||
exports.generateKey = generateKey; | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY2VydGlmaWNhdGVzLmpzIiwic291cmNlUm9vdCI6Ii9Vc2Vycy9kYXcvb3NzL2RldmNlcnQvIiwic291cmNlcyI6WyJjZXJ0aWZpY2F0ZXMudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7O0FBQUEsNkJBQTZCO0FBQzdCLHFDQUFxQztBQUNyQyxtQ0FBd0M7QUFDeEMsMkJBQTBEO0FBQzFELDJDQUE2RDtBQUM3RCxtQ0FBa0M7QUFDbEMsbUVBQStFO0FBRS9FLE1BQU0sS0FBSyxHQUFHLFdBQVcsQ0FBQyxzQkFBc0IsQ0FBQyxDQUFDO0FBRWxEOzs7Ozs7R0FNRztBQUNILG1DQUF3RCxNQUFjOztRQUNwRSxhQ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5nKTogdm9pZCB7XG4gIGRlYnVnKGBnZW5lcmF0ZUtleTogJHsgZmlsZW5hbWUgfWApO1xuICBvcGVuc3NsKGBnZW5yc2EgLW91dCAkeyBmaWxlbmFtZSB9IDIwNDhgKTtcbiAgY2htb2QoZmlsZW5hbWUsIDQwMCk7XG59Il19 |
@@ -10,2 +10,4 @@ export declare const isMac: boolean; | ||
export declare const opensslConfPath: string; | ||
export declare const rootCAInstalledFlagFilePath: string; | ||
export declare const rootCADir: string; | ||
export declare const rootCAKeyPath: string; | ||
export declare const rootCACertPath: string; |
@@ -17,5 +17,7 @@ "use strict"; | ||
exports.opensslConfPath = exports.configPath('openssl.conf'); | ||
exports.rootCAInstalledFlagFilePath = exports.configPath('root-ca-installed'); | ||
exports.rootCADir = exports.configPath('certificate-authority'); | ||
exports.rootCAKeyPath = exports.configPath('certificate-authority', 'private-key.key'); | ||
exports.rootCACertPath = exports.configPath('certificate-authority', 'certificate.cert'); | ||
mkdirp_1.sync(exports.configDir); | ||
mkdirp_1.sync(exports.domainsDir); | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY29uc3RhbnRzLmpzIiwic291cmNlUm9vdCI6Ii9Vc2Vycy9kYXcvb3NzL2RldmNlcnQvIiwic291cmNlcyI6WyJjb25zdGFudHMudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7QUFBQSw2QkFBNkI7QUFDN0IsbUNBQXdDO0FBQ3hDLGlFQUFrRTtBQUVsRSxxQkFBcUI7QUFDUixRQUFBLEtBQUssR0FBRyxPQUFPLENBQUMsUUFBUSxLQUFLLFFBQVEsQ0FBQztBQUN0QyxRQUFBLE9BQU8sR0FBRyxPQUFPLENBQUMsUUFBUSxLQUFLLE9BQU8sQ0FBQztBQUN2QyxRQUFBLFNBQVMsR0FBRyxPQUFPLENBQUMsUUFBUSxLQUFLLE9BQU8sQ0FBQztBQUV0RCxlQUFlO0FBQ0YsUUFBQSxTQUFTLEd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3NsQ29uZlBhdGggPSBjb25maWdQYXRoKCdvcGVuc3NsLmNvbmYnKTtcblxuZXhwb3J0IGNvbnN0IHJvb3RDQURpciA9IGNvbmZpZ1BhdGgoJ2NlcnRpZmljYXRlLWF1dGhvcml0eScpO1xuZXhwb3J0IGNvbnN0IHJvb3RDQUtleVBhdGggPSBjb25maWdQYXRoKCdjZXJ0aWZpY2F0ZS1hdXRob3JpdHknLCAncHJpdmF0ZS1rZXkua2V5Jyk7XG5leHBvcnQgY29uc3Qgcm9vdENBQ2VydFBhdGggPSBjb25maWdQYXRoKCdjZXJ0aWZpY2F0ZS1hdXRob3JpdHknLCAnY2VydGlmaWNhdGUuY2VydCcpO1xuXG5ta2RpcnAoY29uZmlnRGlyKTtcbm1rZGlycChkb21haW5zRGlyKTtcbiJdfQ== |
@@ -35,3 +35,3 @@ "use strict"; | ||
let domainCertPath = constants_1.pathForDomain(domain, `certificate.crt`); | ||
if (!fs_1.existsSync(constants_1.rootCAInstalledFlagFilePath)) { | ||
if (!fs_1.existsSync(constants_1.rootCAKeyPath)) { | ||
debug('Root CA is not installed yet, so it must be our first run. Installing root CA ...'); | ||
@@ -64,2 +64,2 @@ yield certificate_authority_1.default(options); | ||
exports.removeDomain = removeDomain; | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiL1VzZXJzL2Rhdy9vc3MvZGV2Y2VydC8iLCJzb3VyY2VzIjpbImluZGV4LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7OztBQUFBLDJCQUE0RjtBQUM1RixxQ0FBcUM7QUFDckMsbURBQXVEO0FBQ3ZELGlDQUFpQztBQUNqQywyQ0FPcUI7QUFDckIsbUVBQWtFO0FBQ2xFLGlEQUF1RDtBQUV2RCxNQUFNLEtBQUssR0FBRyxXQUFXLENBQUMsU0FBUyxDQUFDLENBQUM7QUFPckM7Ozs7Ozs7Ozs7O0dBV0c7Q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xdWVzdCBmb3IgJHsgZG9tYWluIH0uIEdlbmVyYXRpbmcgYW5kIGNhY2hpbmcgLi4uYCk7XG4gICAgYXdhaXQgZ2VuZXJhdGVEb21haW5DZXJ0aWZpY2F0ZShkb21haW4pO1xuICB9XG5cbiAgZGVidWcoYFJldHVybmluZyBkb21haW4gY2VydGlmaWNhdGVgKTtcbiAgcmV0dXJuIHtcbiAgICBrZXk6IHJlYWRGaWxlKGRvbWFpbktleVBhdGgpLFxuICAgIGNlcnQ6IHJlYWRGaWxlKGRvbWFpbkNlcnRQYXRoKVxuICB9O1xufVxuXG5leHBvcnQgZnVuY3Rpb24gaGFzQ2VydGlmaWNhdGVGb3IoZG9tYWluOiBzdHJpbmcpIHtcbiAgcmV0dXJuIGV4aXN0cyhwYXRoRm9yRG9tYWluKGRvbWFpbiwgYGNlcnRpZmljYXRlLmNydGApKTtcbn1cblxuZXhwb3J0IGZ1bmN0aW9uIGNvbmZpZ3VyZWREb21haW5zKCkge1xuICByZXR1cm4gcmVhZGRpcihkb21haW5zRGlyKTtcbn1cblxuZXhwb3J0IGZ1bmN0aW9uIHJlbW92ZURvbWFpbihkb21haW46IHN0cmluZykge1xuICByZXR1cm4gcmltcmFmLnN5bmMocGF0aEZvckRvbWFpbihkb21haW4pKTtcbn0iXX0= |
{ | ||
"name": "devcert", | ||
"version": "1.0.0-beta.7", | ||
"version": "1.0.0-beta.8", | ||
"description": "Generate trusted local SSL/TLS certificates for local SSL development", | ||
@@ -36,3 +36,2 @@ "main": "dist/index.js", | ||
"@types/glob": "^5.0.34", | ||
"@types/keytar": "^4.0.1", | ||
"@types/mkdirp": "^0.5.2", | ||
@@ -49,4 +48,4 @@ "@types/node": "^8.5.7", | ||
"glob": "^7.1.2", | ||
"keytar": "^4.1.0", | ||
"mkdirp": "^0.5.1", | ||
"prompt": "^1.0.0", | ||
"rimraf": "^2.6.2", | ||
@@ -53,0 +52,0 @@ "tmp": "^0.0.33", |
@@ -1,6 +0,7 @@ | ||
import { unlinkSync as rm, readFileSync as readFile, writeFileSync as writeFile } from 'fs'; | ||
import * as crypto from 'crypto'; | ||
import { readFileSync as readFile, writeFileSync as writeFile } from 'fs'; | ||
import * as createDebug from 'debug'; | ||
import * as eol from 'eol'; | ||
import { fileSync as tmp } from 'tmp'; | ||
import * as keychain from 'keytar'; | ||
import * as prompt from 'prompt'; | ||
@@ -13,3 +14,4 @@ import { | ||
opensslConfTemplate, | ||
rootCAInstalledFlagFilePath | ||
rootCAKeyPath, | ||
rootCACertPath, | ||
} from './constants'; | ||
@@ -44,3 +46,3 @@ import addToMacTrustStores from './platforms/macos'; | ||
debug('Saving certificate authority credentials to system keychain'); | ||
addCertificateAuthorityToSystemKeychain(rootKeyPath, rootCertPath); | ||
saveCertificateAuthorityCredentials(rootKeyPath, rootCertPath); | ||
@@ -56,8 +58,2 @@ debug(`Adding the root certificate authority to trust stores`); | ||
debug('Certificate authority added to trust stores, removing temporary files'); | ||
rm(rootKeyPath); | ||
rm(rootCertPath); | ||
debug('Adding flag indicating root certificate authority install'); | ||
writeFile(rootCAInstalledFlagFilePath, ''); | ||
} | ||
@@ -86,17 +82,45 @@ | ||
debug(`Fetching devcert's certificate authority credentials from the system keychain`); | ||
let rootKeyPath = tmp().name; | ||
let rootCertPath = tmp().name; | ||
let key = await keychain.getPassword('devcert', 'certificate-authority-key'); | ||
let cert = await keychain.getPassword('devcert', 'certificate-authority-certificate'); | ||
writeFile(rootKeyPath, key); | ||
writeFile(rootCertPath, cert); | ||
return { rootKeyPath, rootCertPath }; | ||
let decryptedCAKeyPath = tmp().name; | ||
let decryptedCACertPath = tmp().name; | ||
let encryptedCAKey = readFile(rootCAKeyPath, 'utf-8'); | ||
let encryptedCACert = readFile(rootCACertPath, 'utf-8'); | ||
let encryptionKey = await getPasswordFromUser(); | ||
writeFile(decryptedCAKeyPath , decrypt(encryptedCAKey, encryptionKey)); | ||
writeFile(decryptedCACertPath , decrypt(encryptedCACert, encryptionKey)); | ||
return { decryptedCAKeyPath , decryptedCACertPath }; | ||
} | ||
async function addCertificateAuthorityToSystemKeychain(keypath: string, certpath: string) { | ||
async function saveCertificateAuthorityCredentials(keypath: string, certpath: string) { | ||
debug(`Adding devcert's certificate authority credentials to the system keychain`); | ||
let key = readFile(keypath, 'utf-8'); | ||
let cert = readFile(certpath, 'utf-8'); | ||
await keychain.setPassword('devcert', 'certificate-authority-key', key); | ||
await keychain.setPassword('devcert', 'certificate-authority-certificate', cert); | ||
let encryptionKey = await getPasswordFromUser(); | ||
writeFile(rootCAKeyPath, encrypt(key, encryptionKey)); | ||
writeFile(rootCACertPath, encrypt(cert, encryptionKey)); | ||
} | ||
function getPasswordFromUser(): Promise<string> { | ||
return new Promise((resolve, reject) => { | ||
prompt.start(); | ||
prompt.get({ | ||
properties: { | ||
password: { | ||
description: 'Password:', | ||
hidden: true | ||
} | ||
} | ||
}, (err: Error, result: string) => { | ||
err ? reject(err) : resolve(result); | ||
}); | ||
}); | ||
} | ||
function encrypt(text: string, key: string) { | ||
let cipher = crypto.createCipher('aes256', key); | ||
return cipher.update(text, 'utf8', 'hex') + cipher.final('hex'); | ||
} | ||
function decrypt(encrypted: string, key: string) { | ||
let decipher = crypto.createDecipher('aes256', key); | ||
return decipher.update(encrypted, 'hex', 'utf8') + decipher.final('utf8'); | ||
} |
@@ -31,7 +31,7 @@ import * as path from 'path'; | ||
let certPath = pathForDomain(`${ domain }.crt`); | ||
let { rootKeyPath, rootCertPath } = await fetchCertificateAuthorityCredentials(); | ||
openssl(`ca -config ${ opensslConfPath } -in ${ csrFile } -out ${ path.basename(certPath) } -outdir ${ path.dirname(certPath) } -keyfile ${ rootKeyPath } -cert ${ rootCertPath } -notext -md sha256 -days 7000 -batch -extensions server_cert`) | ||
let { decryptedCAKeyPath, decryptedCACertPath } = await fetchCertificateAuthorityCredentials(); | ||
openssl(`ca -config ${ opensslConfPath } -in ${ csrFile } -out ${ path.basename(certPath) } -outdir ${ path.dirname(certPath) } -keyfile ${ decryptedCAKeyPath } -cert ${ decryptedCACertPath } -notext -md sha256 -days 7000 -batch -extensions server_cert`) | ||
rm(rootKeyPath); | ||
rm(rootCertPath); | ||
rm(decryptedCAKeyPath); | ||
rm(decryptedCACertPath); | ||
} | ||
@@ -38,0 +38,0 @@ |
@@ -20,5 +20,7 @@ import * as path from 'path'; | ||
export const rootCAInstalledFlagFilePath = configPath('root-ca-installed'); | ||
export const rootCADir = configPath('certificate-authority'); | ||
export const rootCAKeyPath = configPath('certificate-authority', 'private-key.key'); | ||
export const rootCACertPath = configPath('certificate-authority', 'certificate.cert'); | ||
mkdirp(configDir); | ||
mkdirp(domainsDir); |
@@ -11,3 +11,3 @@ import { readFileSync as readFile, readdirSync as readdir, existsSync as exists } from 'fs'; | ||
domainsDir, | ||
rootCAInstalledFlagFilePath | ||
rootCAKeyPath | ||
} from './constants'; | ||
@@ -50,3 +50,3 @@ import installCertificateAuthority from './certificate-authority'; | ||
if (!exists(rootCAInstalledFlagFilePath)) { | ||
if (!exists(rootCAKeyPath)) { | ||
debug('Root CA is not installed yet, so it must be our first run. Installing root CA ...'); | ||
@@ -53,0 +53,0 @@ await installCertificateAuthority(options); |
declare module "command-exists"; | ||
declare module "eol"; | ||
declare module "prompt"; | ||
declare module "application-config-path" { | ||
export = (appName: string) => string; | ||
} |
Sorry, the diff of this file is not supported yet
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
211469
20
1442
+ Addedprompt@^1.0.0
+ Added@colors/colors@1.5.0(transitive)
+ Addedasync@2.6.43.2.3(transitive)
+ Addedcolors@1.0.3(transitive)
+ Addedcycle@1.0.3(transitive)
+ Addedeyes@0.1.8(transitive)
+ Addedisstream@0.1.2(transitive)
+ Addedlodash@4.17.21(transitive)
+ Addedmute-stream@0.0.8(transitive)
+ Addedprompt@1.3.0(transitive)
+ Addedread@1.0.7(transitive)
+ Addedrevalidator@0.1.8(transitive)
+ Addedstack-trace@0.0.10(transitive)
+ Addedwinston@2.4.7(transitive)
- Removed@types/keytar@^4.0.1
- Removedkeytar@^4.1.0
- Removed@types/keytar@4.4.2(transitive)
- Removedansi-regex@2.1.1(transitive)
- Removedaproba@1.2.0(transitive)
- Removedare-we-there-yet@1.1.7(transitive)
- Removedbl@1.2.3(transitive)
- Removedbuffer-alloc@1.2.0(transitive)
- Removedbuffer-alloc-unsafe@1.1.0(transitive)
- Removedbuffer-fill@1.0.0(transitive)
- Removedchownr@1.1.4(transitive)
- Removedcode-point-at@1.1.0(transitive)
- Removedconsole-control-strings@1.1.0(transitive)
- Removedcore-util-is@1.0.3(transitive)
- Removeddecompress-response@3.3.0(transitive)
- Removeddeep-extend@0.6.0(transitive)
- Removeddelegates@1.0.0(transitive)
- Removeddetect-libc@1.0.3(transitive)
- Removedend-of-stream@1.4.4(transitive)
- Removedexpand-template@2.0.3(transitive)
- Removedfs-constants@1.0.0(transitive)
- Removedgauge@2.7.4(transitive)
- Removedgithub-from-package@0.0.0(transitive)
- Removedhas-unicode@2.0.1(transitive)
- Removedini@1.3.8(transitive)
- Removedis-fullwidth-code-point@1.0.0(transitive)
- Removedisarray@1.0.0(transitive)
- Removedkeytar@4.13.0(transitive)
- Removedmimic-response@1.0.1(transitive)
- Removednan@2.14.0(transitive)
- Removednapi-build-utils@1.0.2(transitive)
- Removednode-abi@2.30.1(transitive)
- Removednoop-logger@0.1.1(transitive)
- Removednpmlog@4.1.2(transitive)
- Removednumber-is-nan@1.0.1(transitive)
- Removedobject-assign@4.1.1(transitive)
- Removedos-homedir@1.0.2(transitive)
- Removedprebuild-install@5.3.0(transitive)
- Removedprocess-nextick-args@2.0.1(transitive)
- Removedpump@1.0.32.0.1(transitive)
- Removedrc@1.2.8(transitive)
- Removedreadable-stream@2.3.8(transitive)
- Removedsafe-buffer@5.1.2(transitive)
- Removedsemver@5.7.2(transitive)
- Removedset-blocking@2.0.0(transitive)
- Removedsimple-concat@1.0.1(transitive)
- Removedsimple-get@2.8.2(transitive)
- Removedstring-width@1.0.2(transitive)
- Removedstring_decoder@1.1.1(transitive)
- Removedstrip-ansi@3.0.1(transitive)
- Removedstrip-json-comments@2.0.1(transitive)
- Removedtar-fs@1.16.3(transitive)
- Removedtar-stream@1.6.2(transitive)
- Removedto-buffer@1.1.1(transitive)
- Removedtunnel-agent@0.6.0(transitive)
- Removedutil-deprecate@1.0.2(transitive)
- Removedwhich-pm-runs@1.1.0(transitive)
- Removedwide-align@1.1.5(transitive)
- Removedxtend@4.0.2(transitive)