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

@heroku-cli/plugin-run

Package Overview
Dependencies
Maintainers
31
Versions
62
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@heroku-cli/plugin-run - npm Package Compare versions

Comparing version 7.38.1 to 7.41.0

11

CHANGELOG.md

@@ -6,2 +6,13 @@ # Change Log

# [7.41.0](https://github.com/heroku/cli/compare/v7.40.0...v7.41.0) (2020-05-11)
### Bug Fixes
* **run:** fix run status code and use https ([#1351](https://github.com/heroku/cli/issues/1351)) ([ca8127f](https://github.com/heroku/cli/commit/ca8127fd5811d9f9c87aea891d33b36a6835a2ec))
## [7.38.1](https://github.com/heroku/cli/compare/v7.38.0...v7.38.1) (2020-02-10)

@@ -8,0 +19,0 @@

3

lib/lib/dyno.d.ts

@@ -50,5 +50,2 @@ /// <reference types="node" />

_doStart(retries?: number): Promise<HTTP<unknown>>;
/**
* Attaches stdin/stdout to dyno
*/
attach(): any;

@@ -55,0 +52,0 @@ _rendezvous(): Promise<unknown>;

@@ -8,3 +8,3 @@ "use strict";

const debug_1 = require("debug");
const http = require("http");
const https = require("https");
const net = require("net");

@@ -46,18 +46,18 @@ const stream_1 = require("stream");

}
_doStart(retries = 2) {
async _doStart(retries = 2) {
const command = this.opts['exit-code'] ? `${this.opts.command}; echo "\uFFFF heroku-command-exit-status: $?"` : this.opts.command;
return this.heroku.post(this.opts.dyno ? `/apps/${this.opts.app}/dynos/${this.opts.dyno}` : `/apps/${this.opts.app}/dynos`, {
headers: {
Accept: this.opts.dyno ? 'application/vnd.heroku+json; version=3.run-inside' : 'application/vnd.heroku+json; version=3',
},
body: {
command,
attach: this.opts.attach,
size: this.opts.size,
type: this.opts.type,
env: this._env(),
force_no_tty: this.opts['no-tty'],
},
})
.then(dyno => {
try {
const dyno = await this.heroku.post(this.opts.dyno ? `/apps/${this.opts.app}/dynos/${this.opts.dyno}` : `/apps/${this.opts.app}/dynos`, {
headers: {
Accept: this.opts.dyno ? 'application/vnd.heroku+json; version=3.run-inside' : 'application/vnd.heroku+json; version=3',
},
body: {
command,
attach: this.opts.attach,
size: this.opts.size,
type: this.opts.type,
env: this._env(),
force_no_tty: this.opts['no-tty'],
},
});
this.dyno = dyno.body;

@@ -68,9 +68,9 @@ if (this.opts.attach || this.opts.dyno) {

}
return this.attach();
await this.attach();
}
if (this.opts.showStatus) {
else if (this.opts.showStatus) {
cli_ux_1.default.action.stop(this._status('done'));
}
})
.catch(error => {
}
catch (error) {
// Currently the runtime API sends back a 409 in the event the

@@ -86,10 +86,8 @@ // release isn't found yet. API just forwards this response back to

throw error;
})
.finally(() => {
}
finally {
cli_ux_1.default.action.stop();
});
}
}
/**
* Attaches stdin/stdout to dyno
*/
// Attaches stdin/stdout to dyno
attach() {

@@ -151,3 +149,3 @@ this.pipe(process.stdout);

try {
const dyno = await this.heroku.get(`/apps/${this.opts.app}/dynos/${this.opts.dyno}`);
const { body: dyno } = await this.heroku.get(`/apps/${this.opts.app}/dynos/${this.opts.dyno}`);
this.dyno = dyno;

@@ -163,3 +161,3 @@ cli_ux_1.default.action.stop(this._status(this.dyno.state));

// the API sometimes responds with a 404 when the dyno is not yet ready
if (error.statusCode === 404 && retries > 0) {
if (error.http.statusCode === 404 && retries > 0) {
return this._ssh(retries - 1);

@@ -177,3 +175,3 @@ }

options.rejectUnauthorized = false;
const r = http.request(options);
const r = https.request(options);
r.end();

@@ -180,0 +178,0 @@ r.on('error', this.reject);

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

{"version":"7.38.1","commands":{"console":{"id":"console","pluginName":"@heroku-cli/plugin-run","pluginType":"core","hidden":true,"aliases":[],"flags":{"app":{"name":"app","type":"option","char":"a","description":"app to run command against","required":true},"remote":{"name":"remote","type":"option","char":"r","description":"git remote of app to use"},"size":{"name":"size","type":"option","char":"s","description":"dyno size"},"env":{"name":"env","type":"option","char":"e","description":"environment variables to set (use ';' to split multiple vars)"}},"args":[]},"logs":{"id":"logs","description":"display recent log output\ndisable colors with --no-color, HEROKU_LOGS_COLOR=0, or HEROKU_COLOR=0","pluginName":"@heroku-cli/plugin-run","pluginType":"core","aliases":[],"examples":["$ heroku logs --app=my-app","$ heroku logs --num=50","$ heroku logs --dyno=web --app=my-app","$ heroku logs --app=my-app --tail"],"flags":{"app":{"name":"app","type":"option","char":"a","description":"app to run command against","required":true},"remote":{"name":"remote","type":"option","char":"r","description":"git remote of app to use"},"num":{"name":"num","type":"option","char":"n","description":"number of lines to display"},"ps":{"name":"ps","type":"option","char":"p","description":"hidden alias for dyno","hidden":true},"dyno":{"name":"dyno","type":"option","char":"d","description":"only show output from this dyno type (such as \"web\" or \"worker\")"},"source":{"name":"source","type":"option","char":"s","description":"only show output from this source (such as \"app\" or \"heroku\")"},"tail":{"name":"tail","type":"boolean","char":"t","description":"continually stream logs","allowNo":false},"force-colors":{"name":"force-colors","type":"boolean","description":"force use of colors (even on non-tty output)","allowNo":false}},"args":[]},"rake":{"id":"rake","pluginName":"@heroku-cli/plugin-run","pluginType":"core","hidden":true,"aliases":[],"flags":{"app":{"name":"app","type":"option","char":"a","description":"parent app used by review apps","required":true},"remote":{"name":"remote","type":"option","char":"r","description":"git remote of app to use"},"size":{"name":"size","type":"option","char":"s","description":"dyno size"},"exit-code":{"name":"exit-code","type":"boolean","char":"x","description":"passthrough the exit code of the remote command","allowNo":false},"env":{"name":"env","type":"option","char":"e","description":"environment variables to set (use ';' to split multiple vars)"},"no-tty":{"name":"no-tty","type":"boolean","description":"force the command to not run in a tty","allowNo":false}},"args":[]},"run:detached":{"id":"run:detached","description":"run a detached dyno, where output is sent to your logs","pluginName":"@heroku-cli/plugin-run","pluginType":"core","aliases":[],"examples":["$ heroku run:detached ls"],"flags":{"app":{"name":"app","type":"option","char":"a","description":"app to run command against","required":true},"remote":{"name":"remote","type":"option","char":"r","description":"git remote of app to use"},"env":{"name":"env","type":"option","char":"e","description":"environment variables to set (use ';' to split multiple vars)"},"size":{"name":"size","type":"option","char":"s","description":"dyno size"},"tail":{"name":"tail","type":"boolean","char":"t","description":"continually stream logs","allowNo":false},"type":{"name":"type","type":"option","description":"process type"}},"args":[]},"run":{"id":"run","description":"run a one-off process inside a heroku dyno\nShows a notification if the dyno takes more than 20 seconds to start.","pluginName":"@heroku-cli/plugin-run","pluginType":"core","aliases":[],"examples":["$ heroku run bash","$ heroku run -s hobby -- myscript.sh -a arg1 -s arg2"],"flags":{"app":{"name":"app","type":"option","char":"a","description":"parent app used by review apps","required":true},"remote":{"name":"remote","type":"option","char":"r","description":"git remote of app to use"},"size":{"name":"size","type":"option","char":"s","description":"dyno size"},"type":{"name":"type","type":"option","description":"process type"},"exit-code":{"name":"exit-code","type":"boolean","char":"x","description":"passthrough the exit code of the remote command","allowNo":false},"env":{"name":"env","type":"option","char":"e","description":"environment variables to set (use ';' to split multiple vars)"},"no-tty":{"name":"no-tty","type":"boolean","description":"force the command to not run in a tty","allowNo":false},"listen":{"name":"listen","type":"boolean","description":"listen on a local port","hidden":true,"allowNo":false},"no-notify":{"name":"no-notify","type":"boolean","description":"disables notification when dyno is up (alternatively use HEROKU_NOTIFICATIONS=0)","allowNo":false}},"args":[]},"run:inside":{"id":"run:inside","description":"run a one-off process inside an existing heroku dyno","pluginName":"@heroku-cli/plugin-run","pluginType":"core","aliases":[],"examples":["$ heroku run:inside web.1 bash"],"flags":{"app":{"name":"app","type":"option","char":"a","description":"app to run command against","required":true},"remote":{"name":"remote","type":"option","char":"r","description":"git remote of app to use"},"exit-code":{"name":"exit-code","type":"boolean","char":"x","description":"passthrough the exit code of the remote command","allowNo":false},"env":{"name":"env","type":"option","char":"e","description":"environment variables to set (use ';' to split multiple vars)"},"listen":{"name":"listen","type":"boolean","description":"listen on a local port","hidden":true,"allowNo":false}},"args":[]}}}
{"version":"7.41.0","commands":{"console":{"id":"console","pluginName":"@heroku-cli/plugin-run","pluginType":"core","hidden":true,"aliases":[],"flags":{"app":{"name":"app","type":"option","char":"a","description":"app to run command against","required":true},"remote":{"name":"remote","type":"option","char":"r","description":"git remote of app to use"},"size":{"name":"size","type":"option","char":"s","description":"dyno size"},"env":{"name":"env","type":"option","char":"e","description":"environment variables to set (use ';' to split multiple vars)"}},"args":[]},"logs":{"id":"logs","description":"display recent log output\ndisable colors with --no-color, HEROKU_LOGS_COLOR=0, or HEROKU_COLOR=0","pluginName":"@heroku-cli/plugin-run","pluginType":"core","aliases":[],"examples":["$ heroku logs --app=my-app","$ heroku logs --num=50","$ heroku logs --dyno=web --app=my-app","$ heroku logs --app=my-app --tail"],"flags":{"app":{"name":"app","type":"option","char":"a","description":"app to run command against","required":true},"remote":{"name":"remote","type":"option","char":"r","description":"git remote of app to use"},"num":{"name":"num","type":"option","char":"n","description":"number of lines to display"},"ps":{"name":"ps","type":"option","char":"p","description":"hidden alias for dyno","hidden":true},"dyno":{"name":"dyno","type":"option","char":"d","description":"only show output from this dyno type (such as \"web\" or \"worker\")"},"source":{"name":"source","type":"option","char":"s","description":"only show output from this source (such as \"app\" or \"heroku\")"},"tail":{"name":"tail","type":"boolean","char":"t","description":"continually stream logs","allowNo":false},"force-colors":{"name":"force-colors","type":"boolean","description":"force use of colors (even on non-tty output)","allowNo":false}},"args":[]},"rake":{"id":"rake","pluginName":"@heroku-cli/plugin-run","pluginType":"core","hidden":true,"aliases":[],"flags":{"app":{"name":"app","type":"option","char":"a","description":"parent app used by review apps","required":true},"remote":{"name":"remote","type":"option","char":"r","description":"git remote of app to use"},"size":{"name":"size","type":"option","char":"s","description":"dyno size"},"exit-code":{"name":"exit-code","type":"boolean","char":"x","description":"passthrough the exit code of the remote command","allowNo":false},"env":{"name":"env","type":"option","char":"e","description":"environment variables to set (use ';' to split multiple vars)"},"no-tty":{"name":"no-tty","type":"boolean","description":"force the command to not run in a tty","allowNo":false}},"args":[]},"run:detached":{"id":"run:detached","description":"run a detached dyno, where output is sent to your logs","pluginName":"@heroku-cli/plugin-run","pluginType":"core","aliases":[],"examples":["$ heroku run:detached ls"],"flags":{"app":{"name":"app","type":"option","char":"a","description":"app to run command against","required":true},"remote":{"name":"remote","type":"option","char":"r","description":"git remote of app to use"},"env":{"name":"env","type":"option","char":"e","description":"environment variables to set (use ';' to split multiple vars)"},"size":{"name":"size","type":"option","char":"s","description":"dyno size"},"tail":{"name":"tail","type":"boolean","char":"t","description":"continually stream logs","allowNo":false},"type":{"name":"type","type":"option","description":"process type"}},"args":[]},"run":{"id":"run","description":"run a one-off process inside a heroku dyno\nShows a notification if the dyno takes more than 20 seconds to start.","pluginName":"@heroku-cli/plugin-run","pluginType":"core","aliases":[],"examples":["$ heroku run bash","$ heroku run -s hobby -- myscript.sh -a arg1 -s arg2"],"flags":{"app":{"name":"app","type":"option","char":"a","description":"parent app used by review apps","required":true},"remote":{"name":"remote","type":"option","char":"r","description":"git remote of app to use"},"size":{"name":"size","type":"option","char":"s","description":"dyno size"},"type":{"name":"type","type":"option","description":"process type"},"exit-code":{"name":"exit-code","type":"boolean","char":"x","description":"passthrough the exit code of the remote command","allowNo":false},"env":{"name":"env","type":"option","char":"e","description":"environment variables to set (use ';' to split multiple vars)"},"no-tty":{"name":"no-tty","type":"boolean","description":"force the command to not run in a tty","allowNo":false},"listen":{"name":"listen","type":"boolean","description":"listen on a local port","hidden":true,"allowNo":false},"no-notify":{"name":"no-notify","type":"boolean","description":"disables notification when dyno is up (alternatively use HEROKU_NOTIFICATIONS=0)","allowNo":false}},"args":[]},"run:inside":{"id":"run:inside","description":"run a one-off process inside an existing heroku dyno","pluginName":"@heroku-cli/plugin-run","pluginType":"core","aliases":[],"examples":["$ heroku run:inside web.1 bash"],"flags":{"app":{"name":"app","type":"option","char":"a","description":"app to run command against","required":true},"remote":{"name":"remote","type":"option","char":"r","description":"git remote of app to use"},"exit-code":{"name":"exit-code","type":"boolean","char":"x","description":"passthrough the exit code of the remote command","allowNo":false},"env":{"name":"env","type":"option","char":"e","description":"environment variables to set (use ';' to split multiple vars)"},"listen":{"name":"listen","type":"boolean","description":"listen on a local port","hidden":true,"allowNo":false}},"args":[]}}}
{
"name": "@heroku-cli/plugin-run",
"version": "7.38.1",
"version": "7.41.0",
"author": "Chris Freeman @cafreeman",

@@ -26,2 +26,3 @@ "bugs": "https://github.com/heroku/cli/issues",

"@types/node-notifier": "^5.4.0",
"bats": "^1.1.0",
"chai": "^4",

@@ -73,7 +74,9 @@ "eslint": "^6.7.2",

"pretest": "tsc -p test --noEmit",
"test": "nyc --extension .ts mocha --forbid-only \"test/**/*.test.ts\"",
"test": "npm run test:unit",
"test:unit": "nyc --extension .ts mocha --forbid-only \"test/**/*.test.ts\"",
"test:integration": "node ./bin/bats-test-runner",
"posttest": "yarn lint",
"version": "oclif-dev readme && git add README.md"
},
"gitHead": "938ee95e32fbb713f831d4c90b0089fdc1e41410"
"gitHead": "7d2e9ef5177e7c563897b2459e2d47f99392c826"
}

@@ -24,3 +24,3 @@ # @heroku-cli/plugin-run

$ heroku (-v|--version|version)
@heroku-cli/plugin-run/7.38.1 darwin-x64 node-v12.14.1
@heroku-cli/plugin-run/7.41.0 darwin-x64 node-v10.18.1
$ heroku --help [COMMAND]

@@ -68,3 +68,3 @@ USAGE

_See code: [src/commands/logs.ts](https://github.com/heroku/cli/blob/v7.38.1/src/commands/logs.ts)_
_See code: [src/commands/logs.ts](https://github.com/heroku/cli/blob/v7.41.0/src/commands/logs.ts)_

@@ -97,3 +97,3 @@ ## `heroku run`

_See code: [src/commands/run/index.ts](https://github.com/heroku/cli/blob/v7.38.1/src/commands/run/index.ts)_
_See code: [src/commands/run/index.ts](https://github.com/heroku/cli/blob/v7.41.0/src/commands/run/index.ts)_

@@ -120,3 +120,3 @@ ## `heroku run:detached`

_See code: [src/commands/run/detached.ts](https://github.com/heroku/cli/blob/v7.38.1/src/commands/run/detached.ts)_
_See code: [src/commands/run/detached.ts](https://github.com/heroku/cli/blob/v7.41.0/src/commands/run/detached.ts)_

@@ -141,3 +141,3 @@ ## `heroku run:inside`

_See code: [src/commands/run/inside.ts](https://github.com/heroku/cli/blob/v7.38.1/src/commands/run/inside.ts)_
_See code: [src/commands/run/inside.ts](https://github.com/heroku/cli/blob/v7.41.0/src/commands/run/inside.ts)_
<!-- commandsstop -->
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