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

cli-engine-heroku

Package Overview
Dependencies
Maintainers
3
Versions
61
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cli-engine-heroku - npm Package Compare versions

Comparing version 7.0.2 to 7.0.3

18

lib/api_client.d.ts

@@ -0,9 +1,9 @@

import { Config } from 'cli-engine-config';
import { HTTP, HTTPError, HTTPRequestOptions } from 'http-call';
import { Mutex } from './mutex';
import { Config } from 'cli-engine-config';
export declare type Options = {
export interface IOptions {
required?: boolean;
preauth?: boolean;
};
export declare type HerokuAPIErrorOptions = {
}
export interface IHerokuAPIErrorOptions {
resource?: string;

@@ -17,10 +17,10 @@ app?: {

url?: string;
};
}
export declare class HerokuAPIError extends Error {
http: HTTPError;
body: HerokuAPIErrorOptions;
body: IHerokuAPIErrorOptions;
constructor(httpError: HTTPError);
}
export declare class APIClient {
options: Options;
options: IOptions;
preauthPromises: {

@@ -31,6 +31,6 @@ [k: string]: Promise<HTTP>;

config: Config;
private _twoFactorMutex;
constructor({config}: {
config: Config;
}, options?: Options);
_twoFactorMutex: Mutex<string>;
}, options?: IOptions);
readonly twoFactorMutex: Mutex<string>;

@@ -37,0 +37,0 @@ readonly auth: string | undefined;

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const url_1 = require("url");
const deps_1 = require("./deps");
const vars_1 = require("./vars");
const deps_1 = require("./deps");
class HerokuAPIError extends Error {

@@ -46,4 +46,4 @@ constructor(httpError) {

...super.defaultOptions.headers,
accept: 'application/vnd.heroku+json; version=3',
'user-agent': `heroku-cli/${self.config.version} ${self.config.platform}`,
accept: 'application/vnd.heroku+json; version=3',
...envHeaders,

@@ -50,0 +50,0 @@ },

import { Command as Base } from 'cli-engine-command';
import { APIClient } from './api_client';
export declare class Command extends Base {
export declare abstract class Command extends Base {
app: string | undefined;

@@ -5,0 +5,0 @@ _heroku: APIClient;

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const cli_engine_command_1 = require("cli-engine-command");
const deps_1 = require("./deps");
const cli_engine_command_1 = require("cli-engine-command");
class Command extends cli_engine_command_1.Command {

@@ -22,7 +22,7 @@ async init() {

let options = {
userAgent: this.heroku.defaultOptions.headers['user-agent'],
debug: this.config.debug,
token: this.heroku.auth,
host: `${this.heroku.defaultOptions.protocol || 'https:'}//${this.heroku.defaultOptions.host ||
'api.heroku.com'}`,
token: this.heroku.auth,
userAgent: this.heroku.defaultOptions.headers['user-agent'],
};

@@ -29,0 +29,0 @@ this._legacyHerokuClient = new HerokuClient(options);

@@ -5,18 +5,18 @@ import { flags } from 'cli-engine-command';

export declare const oneDay: number;
export declare const _herokuGet: (resource: string, ctx: {
export declare const herokuGet: (resource: string, ctx: {
config: Config;
}) => Promise<string[]>;
export declare const BuildpackCompletion: flags.Completion;
export declare const AppAddonCompletion: flags.Completion;
export declare const AppDynoCompletion: flags.Completion;
export declare const DynoSizeCompletion: flags.Completion;
export declare const FileCompletion: flags.Completion;
export declare const PipelineCompletion: flags.Completion;
export declare const ProcessTypeCompletion: flags.Completion;
export declare const RegionCompletion: flags.Completion;
export declare const RoleCompletion: flags.Completion;
export declare const ScopeCompletion: flags.Completion;
export declare const SpaceCompletion: flags.Completion;
export declare const StackCompletion: flags.Completion;
export declare const StageCompletion: flags.Completion;
export declare const TeamCompletion: flags.Completion;
export declare const BuildpackCompletion: flags.ICompletion;
export declare const AppAddonCompletion: flags.ICompletion;
export declare const AppDynoCompletion: flags.ICompletion;
export declare const DynoSizeCompletion: flags.ICompletion;
export declare const FileCompletion: flags.ICompletion;
export declare const PipelineCompletion: flags.ICompletion;
export declare const ProcessTypeCompletion: flags.ICompletion;
export declare const RegionCompletion: flags.ICompletion;
export declare const RoleCompletion: flags.ICompletion;
export declare const ScopeCompletion: flags.ICompletion;
export declare const SpaceCompletion: flags.ICompletion;
export declare const StackCompletion: flags.ICompletion;
export declare const StageCompletion: flags.ICompletion;
export declare const TeamCompletion: flags.ICompletion;
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const path = require("path");
const deps_1 = require("./deps");
const path = require("path");
var app_1 = require("./flags/app");

@@ -9,3 +9,3 @@ exports.AppCompletion = app_1.AppCompletion;

exports.oneDay = 60 * 60 * 24;
exports._herokuGet = async function (resource, ctx) {
exports.herokuGet = async (resource, ctx) => {
const heroku = new deps_1.default.APIClient({ config: ctx.config });

@@ -58,3 +58,3 @@ let { body: resources } = await heroku.get(`/${resource}`);

options: async (ctx) => {
let sizes = await exports._herokuGet('dyno-sizes', ctx);
let sizes = await exports.herokuGet('dyno-sizes', ctx);
return sizes;

@@ -73,3 +73,3 @@ },

options: async (ctx) => {
let pipelines = await exports._herokuGet('pipelines', ctx);
let pipelines = await exports.herokuGet('pipelines', ctx);
return pipelines;

@@ -106,3 +106,3 @@ },

options: async (ctx) => {
let regions = await exports._herokuGet('regions', ctx);
let regions = await exports.herokuGet('regions', ctx);
return regions;

@@ -126,3 +126,3 @@ },

options: async (ctx) => {
let spaces = await exports._herokuGet('spaces', ctx);
let spaces = await exports.herokuGet('spaces', ctx);
return spaces;

@@ -134,3 +134,3 @@ },

options: async (ctx) => {
let stacks = await exports._herokuGet('stacks', ctx);
let stacks = await exports.herokuGet('stacks', ctx);
return stacks;

@@ -148,5 +148,5 @@ },

options: async (ctx) => {
let teams = await exports._herokuGet('teams', ctx);
let teams = await exports.herokuGet('teams', ctx);
return teams;
},
};
/// <reference types="node" />
import CLI = require('cli-ux');
import HTTP = require('http-call');
import mutex = require('./mutex');
import apiClient = require('./api_client');
import file = require('./file');
import git = require('./git');
import mutex = require('./mutex');
import flags = require('./flags');

@@ -14,4 +14,4 @@ export declare const deps: {

readonly yubikey: {
disable: () => void;
enable: () => void;
disable: () => void;
platform: NodeJS.Platform;

@@ -18,0 +18,0 @@ };

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const fs = require("fs");
const util_1 = require("util");
const fs = require("fs");
let _debug;

@@ -6,0 +6,0 @@ function debug(...args) {

import { flags } from 'cli-engine-command';
export declare const AppCompletion: flags.Completion;
export declare const AppCompletion: flags.ICompletion;
export declare const app: flags.Definition<string>;
export declare const RemoteCompletion: flags.Completion;
export declare const RemoteCompletion: flags.ICompletion;
export declare const remote: flags.Definition<string>;
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const cli_engine_command_1 = require("cli-engine-command");
const completions_1 = require("../completions");
const deps_1 = require("../deps");
const vars_1 = require("../vars");
const cli_engine_command_1 = require("cli-engine-command");
const completions_1 = require("../completions");
class MultipleRemotesError extends Error {

@@ -24,3 +24,3 @@ constructor(gitRemotes) {

options: async (ctx) => {
let apps = await completions_1._herokuGet('apps', ctx);
let apps = await completions_1.herokuGet('apps', ctx);
return apps;

@@ -30,4 +30,5 @@ },

exports.app = cli_engine_command_1.flags.option({
char: 'a',
completion: exports.AppCompletion,
description: 'app to run command against',
char: 'a',
default: ({ options, flags }) => {

@@ -47,3 +48,2 @@ const envApp = process.env.HEROKU_APP;

},
completion: exports.AppCompletion,
});

@@ -59,4 +59,4 @@ exports.RemoteCompletion = {

char: 'r',
completion: exports.RemoteCompletion,
description: 'git remote of app to use',
completion: exports.RemoteCompletion,
});

@@ -89,4 +89,4 @@ function configRemote() {

appRemotes.push({
app: match[1],
remote: remote.name,
app: match[1],
});

@@ -93,0 +93,0 @@ }

@@ -5,6 +5,6 @@ "use strict";

exports.org = cli_engine_command_1.flags.option({
char: 'o',
default: () => process.env.HEROKU_ORGANIZATION,
description: 'name of org',
char: 'o',
hidden: true,
default: () => process.env.HEROKU_ORGANIZATION,
});
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const cli_engine_command_1 = require("cli-engine-command");
const completions_1 = require("../completions");
const cli_engine_command_1 = require("cli-engine-command");
exports.team = cli_engine_command_1.flags.option({
char: 't',
completion: completions_1.TeamCompletion,
description: 'team to use',
char: 't',
default: ({ flags }) => {

@@ -17,3 +18,2 @@ let { HEROKU_ORGANIZATION: org, HEROKU_TEAM: team } = process.env;

},
completion: completions_1.TeamCompletion,
});

@@ -1,8 +0,8 @@

export declare type Remote = {
export interface IGitRemote {
name: string;
url: string;
};
}
export declare class Git {
readonly remotes: Remote[];
readonly remotes: IGitRemote[];
exec(cmd: string): string;
}
/// <reference types="node" />
export declare const yubikey: {
disable: () => void;
enable: () => void;
disable: () => void;
platform: NodeJS.Platform;
};

@@ -13,5 +13,5 @@ "use strict";

exports.yubikey = {
disable: () => toggle('KeyOff'),
enable: () => toggle('KeyOn'),
disable: () => toggle('KeyOff'),
platform: process.platform,
};
{
"name": "cli-engine-heroku",
"description": "heroku specific functionality for the cli-engine",
"version": "7.0.2",
"version": "7.0.3",
"author": "Jeff Dickey @jdxcode",

@@ -14,7 +14,7 @@ "bugs": "https://github.com/heroku/cli-engine-heroku/issues",

"devDependencies": {
"@types/jest": "21.1.8",
"@types/jest": "21.1.9",
"@types/nock": "9.1.0",
"@types/node": "8.5.1",
"cli-engine-command": "11.0.3",
"cli-engine-config": "5.0.3",
"@types/node": "8.5.2",
"cli-engine-command": "11.0.4",
"cli-engine-config": "5.0.4",
"cli-flags": "^2.0.2",

@@ -28,2 +28,4 @@ "del-cli": "1.1.0",

"ts-jest": "22.0.0",
"tslint": "^5.8.0",
"tslint-cli-engine": "^1.0.1",
"typescript": "2.6.2"

@@ -50,3 +52,3 @@ },

"clean": "del-cli lib",
"posttest": "prettier -l 'src/**/*.ts'",
"posttest": "tslint -p . && prettier -l 'src/**/*.ts'",
"precommit": "lint-staged",

@@ -53,0 +55,0 @@ "prepare": "tsc",

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