@heroku-cli/command
Advanced tools
Comparing version 9.0.2 to 10.0.0
import { Interfaces } from '@oclif/core'; | ||
import { Completion } from '@oclif/core/lib/interfaces/parser'; | ||
export declare const oneDay: number; | ||
@@ -6,17 +7,17 @@ export declare const herokuGet: (resource: string, ctx: { | ||
}) => Promise<string[]>; | ||
export declare const AppCompletion: Interfaces.Completion; | ||
export declare const AppAddonCompletion: Interfaces.Completion; | ||
export declare const AppDynoCompletion: Interfaces.Completion; | ||
export declare const BuildpackCompletion: Interfaces.Completion; | ||
export declare const DynoSizeCompletion: Interfaces.Completion; | ||
export declare const FileCompletion: Interfaces.Completion; | ||
export declare const PipelineCompletion: Interfaces.Completion; | ||
export declare const ProcessTypeCompletion: Interfaces.Completion; | ||
export declare const RegionCompletion: Interfaces.Completion; | ||
export declare const RemoteCompletion: Interfaces.Completion; | ||
export declare const RoleCompletion: Interfaces.Completion; | ||
export declare const ScopeCompletion: Interfaces.Completion; | ||
export declare const SpaceCompletion: Interfaces.Completion; | ||
export declare const StackCompletion: Interfaces.Completion; | ||
export declare const StageCompletion: Interfaces.Completion; | ||
export declare const TeamCompletion: Interfaces.Completion; | ||
export declare const AppCompletion: Completion; | ||
export declare const AppAddonCompletion: Completion; | ||
export declare const AppDynoCompletion: Completion; | ||
export declare const BuildpackCompletion: Completion; | ||
export declare const DynoSizeCompletion: Completion; | ||
export declare const FileCompletion: Completion; | ||
export declare const PipelineCompletion: Completion; | ||
export declare const ProcessTypeCompletion: Completion; | ||
export declare const RegionCompletion: Completion; | ||
export declare const RemoteCompletion: Completion; | ||
export declare const RoleCompletion: Completion; | ||
export declare const ScopeCompletion: Completion; | ||
export declare const SpaceCompletion: Completion; | ||
export declare const StackCompletion: Completion; | ||
export declare const StageCompletion: Completion; | ||
export declare const TeamCompletion: Completion; |
/// <reference types="node" /> | ||
import core = require('@oclif/core'); | ||
import oclif = require('@oclif/core'); | ||
import HTTP = require('http-call'); | ||
@@ -11,29 +11,3 @@ import netrc = require('netrc-parser'); | ||
export declare const deps: { | ||
readonly cli: { | ||
config: core.CliUx.Config; | ||
warn: typeof core.Errors.warn; | ||
error: typeof core.Errors.error; | ||
exit: typeof core.Errors.exit; | ||
readonly prompt: typeof import("@oclif/core/lib/cli-ux/prompt").prompt; | ||
readonly anykey: typeof import("@oclif/core/lib/cli-ux/prompt").anykey; | ||
readonly confirm: typeof import("@oclif/core/lib/cli-ux/prompt").confirm; | ||
readonly action: core.CliUx.ActionBase; | ||
readonly prideAction: core.CliUx.ActionBase; | ||
styledObject(obj: any, keys?: string[] | undefined): void; | ||
readonly styledHeader: typeof import("@oclif/core/lib/cli-ux/styled/header").default; | ||
readonly styledJSON: typeof import("@oclif/core/lib/cli-ux/styled/json").default; | ||
readonly table: typeof core.CliUx.Table.table; | ||
readonly tree: typeof import("@oclif/core/lib/cli-ux/styled/tree").default; | ||
readonly open: typeof import("@oclif/core/lib/cli-ux/open").default; | ||
readonly wait: (ms?: number | undefined) => Promise<unknown>; | ||
readonly progress: typeof import("@oclif/core/lib/cli-ux/styled/progress").default; | ||
done(): Promise<void>; | ||
trace(format: string, ...args: string[]): void; | ||
debug(format: string, ...args: string[]): void; | ||
info(format: string, ...args: string[]): void; | ||
log(format?: string | undefined, ...args: string[]): void; | ||
url(text: string, uri: string, params?: {} | undefined): void; | ||
annotation(text: string, annotation: string): void; | ||
flush(ms?: number | undefined): Promise<void>; | ||
}; | ||
readonly cli: typeof oclif.ux; | ||
readonly HTTP: typeof HTTP; | ||
@@ -40,0 +14,0 @@ readonly netrc: netrc.Netrc; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.deps = void 0; | ||
// remote | ||
const oclif = require("@oclif/core"); | ||
const { ux } = oclif; | ||
exports.deps = { | ||
// remote | ||
get cli() { | ||
return fetch('@oclif/core').CliUx.ux; | ||
return fetch('@oclif/core').ux; | ||
}, | ||
@@ -9,0 +12,0 @@ get HTTP() { |
@@ -1,2 +0,2 @@ | ||
export declare const app: import("@oclif/core/lib/interfaces").Definition<string, Record<string, unknown>>; | ||
export declare const remote: import("@oclif/core/lib/interfaces").Definition<string, Record<string, unknown>>; | ||
export declare const app: import("@oclif/core/lib/interfaces/parser").FlagDefinition<string, Record<string, unknown>>; | ||
export declare const remote: import("@oclif/core/lib/interfaces/parser").FlagDefinition<string, Record<string, unknown>>; |
@@ -1,1 +0,1 @@ | ||
export declare const org: import("@oclif/core/lib/interfaces").Definition<() => string | undefined, Record<string, unknown>>; | ||
export declare const org: import("@oclif/core/lib/interfaces/parser").FlagDefinition<() => string | undefined, Record<string, unknown>>; |
@@ -1,1 +0,1 @@ | ||
export declare const pipeline: import("@oclif/core/lib/interfaces").Definition<string, Record<string, unknown>>; | ||
export declare const pipeline: import("@oclif/core/lib/interfaces/parser").FlagDefinition<string, Record<string, unknown>>; |
@@ -1,1 +0,1 @@ | ||
export declare const team: import("@oclif/core/lib/interfaces").Definition<string, Record<string, unknown>>; | ||
export declare const team: import("@oclif/core/lib/interfaces/parser").FlagDefinition<string, Record<string, unknown>>; |
@@ -11,3 +11,2 @@ "use strict"; | ||
const os = tslib_1.__importStar(require("os")); | ||
const { ux } = core_1.CliUx; | ||
const api_client_1 = require("./api-client"); | ||
@@ -31,8 +30,8 @@ const vars_1 = require("./vars"); | ||
if (!loggedIn) | ||
ux.error('timed out'); | ||
core_1.ux.error('timed out'); | ||
}, 1000 * 60 * 10).unref(); | ||
if (process.env.HEROKU_API_KEY) | ||
ux.error('Cannot log in with HEROKU_API_KEY set'); | ||
core_1.ux.error('Cannot log in with HEROKU_API_KEY set'); | ||
if (opts.expiresIn && opts.expiresIn > thirtyDays) | ||
ux.error('Cannot set an expiration longer than thirty days'); | ||
core_1.ux.error('Cannot set an expiration longer than thirty days'); | ||
await netrc_parser_1.default.load(); | ||
@@ -50,3 +49,3 @@ const previousEntry = netrc_parser_1.default.machines['api.heroku.com']; | ||
else { | ||
await ux.anykey(`heroku: Press any key to open up the browser to login or ${color_1.default.yellow('q')} to exit`); | ||
await core_1.ux.anykey(`heroku: Press any key to open up the browser to login or ${color_1.default.yellow('q')} to exit`); | ||
input = 'browser'; | ||
@@ -61,3 +60,3 @@ } | ||
const message = error instanceof Error ? error.message : String(error); | ||
ux.warn(message); | ||
core_1.ux.warn(message); | ||
} | ||
@@ -142,3 +141,3 @@ let auth; | ||
if (!urlDisplayed) | ||
ux.warn('Cannot open browser.'); | ||
core_1.ux.warn('Cannot open browser.'); | ||
urlDisplayed = true; | ||
@@ -149,3 +148,3 @@ }; | ||
cp.on('error', err => { | ||
ux.warn(err); | ||
core_1.ux.warn(err); | ||
showUrl(); | ||
@@ -159,3 +158,3 @@ }); | ||
}); | ||
ux.action.start('heroku: Waiting for login'); | ||
core_1.ux.action.start('heroku: Waiting for login'); | ||
const fetchAuth = async (retries = 3) => { | ||
@@ -176,7 +175,7 @@ try { | ||
if (auth.error) | ||
ux.error(auth.error); | ||
core_1.ux.error(auth.error); | ||
this.heroku.auth = auth.access_token; | ||
ux.action.start('Logging in'); | ||
core_1.ux.action.start('Logging in'); | ||
const { body: account } = await http_call_1.default.get(`${vars_1.vars.apiUrl}/account`, headers(auth.access_token)); | ||
ux.action.stop(); | ||
core_1.ux.action.stop(); | ||
return { | ||
@@ -189,4 +188,4 @@ login: account.email, | ||
process.stderr.write('heroku: Enter your login credentials\n'); | ||
login = await ux.prompt('Email', { default: login }); | ||
const password = await ux.prompt('Password', { type: 'hide' }); | ||
login = await core_1.ux.prompt('Email', { default: login }); | ||
const password = await core_1.ux.prompt('Password', { type: 'hide' }); | ||
let auth; | ||
@@ -204,3 +203,3 @@ try { | ||
} | ||
const secondFactor = await ux.prompt('Two-factor code', { type: 'mask' }); | ||
const secondFactor = await core_1.ux.prompt('Two-factor code', { type: 'mask' }); | ||
auth = await this.createOAuthToken(login, password, { expiresIn, secondFactor }); | ||
@@ -271,3 +270,3 @@ } | ||
if (!url) { | ||
org = await (org ? ux.prompt('Organization name', { default: org }) : ux.prompt('Organization name')); | ||
org = await (org ? core_1.ux.prompt('Organization name', { default: org }) : core_1.ux.prompt('Organization name')); | ||
url = `https://sso.heroku.com/saml/${encodeURIComponent(org)}/init?cli=true`; | ||
@@ -282,4 +281,4 @@ } | ||
await open(url, { wait: false }); | ||
const password = await ux.prompt('Access token', { type: 'mask' }); | ||
ux.action.start('Validating token'); | ||
const password = await core_1.ux.prompt('Access token', { type: 'mask' }); | ||
core_1.ux.action.start('Validating token'); | ||
this.heroku.auth = password; | ||
@@ -286,0 +285,0 @@ const { body: account } = await http_call_1.default.get(`${vars_1.vars.apiUrl}/account`, headers(password)); |
{ | ||
"name": "@heroku-cli/command", | ||
"description": "base class for Heroku CLI commands", | ||
"version": "9.0.2", | ||
"version": "10.0.0", | ||
"author": "Jeff Dickey @jdxcode", | ||
@@ -9,3 +9,3 @@ "bugs": "https://github.com/heroku/heroku-cli-command/issues", | ||
"@heroku-cli/color": "^1.1.14", | ||
"@oclif/core": "^1.26.2", | ||
"@oclif/core": "^2.8.11", | ||
"cli-ux": "^6.0.9", | ||
@@ -12,0 +12,0 @@ "debug": "^4.1.1", |
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
61363
1265
+ Added@cspotcode/source-map-support@0.8.1(transitive)
+ Added@jridgewell/resolve-uri@3.1.2(transitive)
+ Added@jridgewell/sourcemap-codec@1.5.0(transitive)
+ Added@jridgewell/trace-mapping@0.3.9(transitive)
+ Added@oclif/core@2.16.0(transitive)
+ Added@tsconfig/node10@1.0.11(transitive)
+ Added@tsconfig/node12@1.0.11(transitive)
+ Added@tsconfig/node14@1.0.3(transitive)
+ Added@tsconfig/node16@1.0.4(transitive)
+ Added@types/cli-progress@3.11.6(transitive)
+ Added@types/node@22.9.0(transitive)
+ Addedacorn@8.14.0(transitive)
+ Addedacorn-walk@8.3.4(transitive)
+ Addedarg@4.1.3(transitive)
+ Addedastral-regex@2.0.0(transitive)
+ Addedcreate-require@1.1.1(transitive)
+ Addeddiff@4.0.2(transitive)
+ Addedmake-error@1.3.6(transitive)
+ Addedslice-ansi@4.0.0(transitive)
+ Addedts-node@10.9.2(transitive)
+ Addedtypescript@5.6.3(transitive)
+ Addedundici-types@6.19.8(transitive)
+ Addedv8-compile-cache-lib@3.0.1(transitive)
+ Addedwordwrap@1.0.0(transitive)
+ Addedyn@3.1.1(transitive)
- Removed@oclif/screen@1.0.4(transitive)
- Removedjsonfile@6.1.0(transitive)
- Removeduniversalify@2.0.1(transitive)
Updated@oclif/core@^2.8.11