Big News: Socket raises $60M Series C at a $1B valuation to secure software supply chains for AI-driven development.Announcement
Sign In

@heroku-cli/command

Package Overview
Dependencies
Maintainers
49
Versions
128
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
13.0.0-beta.3
to
13.0.0-beta.4
+1
-1
lib/api-client.js

@@ -197,3 +197,3 @@ import { HTTP, HTTPError } from '@heroku/http-call';

if (retries > 0) {
if (opts.retryAuth !== false && error.http.statusCode === 401 && error.body.id === 'unauthorized') {
if (opts.retryAuth !== false && error.http.statusCode === 401) {
if (process.env.HEROKU_API_KEY) {

@@ -200,0 +200,0 @@ throw new Error('The token provided to HEROKU_API_KEY is invalid. Please double-check that you have the correct token, or run `heroku login` without HEROKU_API_KEY set.');

@@ -9,3 +9,4 @@ export * from './api-client.js';

export * from './particleboard-client.js';
export * from './prompter.js';
export * from './vars.js';
export * from './yubikey.js';

@@ -9,3 +9,4 @@ export * from './api-client.js';

export * from './particleboard-client.js';
export * from './prompter.js';
export * from './vars.js';
export * from './yubikey.js';

@@ -7,3 +7,2 @@ import type { Config } from '@oclif/core/interfaces';

expiresIn?: number;
keepExistingSession?: boolean;
method?: 'browser' | 'interactive' | 'sso';

@@ -10,0 +9,0 @@ }

@@ -73,10 +73,2 @@ import { HTTP } from '@heroku/http-call';

}
try {
if (previousToken && !opts.keepExistingSession)
await this.logout(previousToken);
}
catch (error) {
const message = error instanceof Error ? error.message : String(error);
ux.warn(message);
}
let auth;

@@ -126,3 +118,3 @@ switch (input) {

}
if (error.http.statusCode === 401 && error.http.body && error.http.body.id === 'unauthorized') {
if (error.http.statusCode === 401) {
return;

@@ -150,3 +142,3 @@ }

throw error;
if (error.http.statusCode === 401 && error.http.body && error.http.body.id === 'unauthorized') {
if (error.http.statusCode === 401) {
return [];

@@ -244,3 +236,3 @@ }

return;
if (error.http.statusCode === 401 && error.http.body && error.http.body.id === 'unauthorized')
if (error.http.statusCode === 401)
return;

@@ -247,0 +239,0 @@ throw error;

@@ -1,6 +0,14 @@

import type { Answers } from 'inquirer';
import type { Answers, createPromptModule } from 'inquirer';
type StreamOptions = NonNullable<Parameters<typeof createPromptModule>[0]>;
declare class Prompter {
prompt<T extends Answers = Answers>(questions: any[]): Promise<T>;
/**
* Wraps inquirer's prompt module so that prompt UI (question text, mask
* characters, cursor escapes) writes to stderr by default. Routing to stdout
* — inquirer's default — corrupts piped output (e.g. `heroku run … | tee`).
*
* Tests can override `input` and/or `output` via the optional second arg.
*/
prompt<T extends Answers = Answers>(questions: any[], streamOpts?: StreamOptions): Promise<T>;
}
export declare const prompter: Prompter;
export {};
class Prompter {
async prompt(questions) {
/**
* Wraps inquirer's prompt module so that prompt UI (question text, mask
* characters, cursor escapes) writes to stderr by default. Routing to stdout
* — inquirer's default — corrupts piped output (e.g. `heroku run … | tee`).
*
* Tests can override `input` and/or `output` via the optional second arg.
*/
async prompt(questions, streamOpts = {}) {
const inquirer = (await import('inquirer')).default;
return inquirer.prompt(questions);
const promptModule = inquirer.createPromptModule({
output: process.stderr,
...streamOpts,
});
return promptModule(questions);
}
}
export const prompter = new Prompter();
{
"name": "@heroku-cli/command",
"description": "base class for Heroku CLI commands",
"version": "13.0.0-beta.3",
"version": "13.0.0-beta.4",
"author": "Heroku",

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