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

@heroku-cli/command

Package Overview
Dependencies
Maintainers
33
Versions
94
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@heroku-cli/command - npm Package Compare versions

Comparing version 8.4.1 to 8.5.0

12

lib/login.js

@@ -14,2 +14,3 @@ "use strict";

const hostname = os.hostname();
const thirtyDays = 60 * 60 * 24 * 30;
const headers = (token) => ({ headers: { accept: 'application/vnd.heroku+json; version=3', authorization: `Bearer ${token}` } });

@@ -32,2 +33,4 @@ class Login {

cli_ux_1.default.error('Cannot log in with HEROKU_API_KEY set');
if (opts.expiresIn && opts.expiresIn > thirtyDays)
cli_ux_1.default.error('Cannot set an expiration longer than thirty days');
await netrc_parser_1.default.load();

@@ -184,6 +187,7 @@ const previousEntry = netrc_parser_1.default.machines['api.heroku.com'];

catch (err) {
if (err.body && err.body.id === 'device_trust_required') {
err.body.message = 'The interactive flag requires Two-Factor Authentication to be enabled on your account. Please use heroku login.';
throw err;
}
if (!err.body || err.body.id !== 'two_factor') {
if (err.body.id === 'device_trust_required') {
err.body.message = 'The interactive flag requires Two-Factor Authentication to be enabled on your account. Please use heroku login.';
}
throw err;

@@ -214,3 +218,3 @@ }

description: `Heroku CLI login from ${hostname}`,
expires_in: opts.expiresIn || 60 * 60 * 24 * 365 // 1 year
expires_in: opts.expiresIn || thirtyDays
}

@@ -217,0 +221,0 @@ });

{
"name": "@heroku-cli/command",
"description": "base class for Heroku CLI commands",
"version": "8.4.1",
"version": "8.5.0",
"author": "Jeff Dickey @jdxcode",

@@ -6,0 +6,0 @@ "bugs": "https://github.com/heroku/heroku-cli-command/issues",

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