UNPKG

@heroku-cli/command

Version:
36 lines (35 loc) 1.3 kB
import { Command as Base } from '@oclif/core'; import { APIClient } from './api-client.js'; export declare abstract class Command extends Base { /** * Base flags that includes the prompt flag by default * Subclasses can override this to customize base flags */ static baseFlags: Record<string, any>; /** * Set this to false in a command class to disable the --prompt flag for that command */ static promptFlagActive: boolean; allowArbitraryFlags: boolean; _heroku: APIClient; /** * Helper function to get baseFlags without the prompt flag * Use this when you want to remove the prompt flag in a specific command: * * @example * export default class MyCommand extends Command { * static baseFlags = Command.baseFlagsWithoutPrompt() * static flags = { ... } * } */ static baseFlagsWithoutPrompt(): Record<string, any>; get heroku(): APIClient; init(): Promise<void>; /** * Returns whether prompt mode is active for this command. * False if the command has opted out (static promptFlagActive = false) * or if the prompt flag is not in baseFlags. */ protected isPromptModeActive(): boolean; protected parse(options?: any, argv?: string[]): Promise<any>; }