heroku 8.4.2-beta.0 → 8.4.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,16 @@
1
+ import { Command } from '@heroku-cli/command-v9';
2
+ import '@oclif/core-v1/lib/parser';
3
+ export default class RunDetached extends Command {
4
+ static description: string;
5
+ static examples: string[];
6
+ static strict: boolean;
7
+ static flags: {
8
+ app: import("@oclif/core-v1/lib/interfaces").OptionFlag<string>;
9
+ remote: import("@oclif/core-v1/lib/interfaces").OptionFlag<string | undefined>;
10
+ env: import("@oclif/core-v1/lib/interfaces").OptionFlag<string | undefined>;
11
+ size: import("@oclif/core-v1/lib/interfaces").OptionFlag<string | undefined>;
12
+ tail: import("@oclif/core-v1/lib/interfaces").BooleanFlag<boolean>;
13
+ type: import("@oclif/core-v1/lib/interfaces").OptionFlag<string | undefined>;
14
+ };
15
+ run(): Promise<void>;
16
+ }
@@ -0,0 +1,57 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ /* eslint-disable @typescript-eslint/ban-ts-comment */
4
+ // tslint:disable:file-name-casing
5
+ const color_1 = require("@heroku-cli/color");
6
+ const command_v9_1 = require("@heroku-cli/command-v9");
7
+ const completions_1 = require("@heroku-cli/command-v9/lib/completions");
8
+ const core_v1_1 = require("@oclif/core-v1");
9
+ require("@oclif/core-v1/lib/parser");
10
+ const dyno_1 = require("@heroku-cli/plugin-run/lib/lib/dyno");
11
+ const helpers_1 = require("@heroku-cli/plugin-run/lib/lib/helpers");
12
+ const log_displayer_1 = require("@heroku-cli/plugin-run/lib/lib/log-displayer");
13
+ class RunDetached extends command_v9_1.Command {
14
+ async run() {
15
+ const { flags, argv } = await this.parse(RunDetached);
16
+ const opts = {
17
+ heroku: this.heroku,
18
+ app: flags.app,
19
+ command: (0, helpers_1.buildCommand)(argv),
20
+ size: flags.size,
21
+ type: flags.type,
22
+ env: flags.env,
23
+ attach: false,
24
+ };
25
+ if (!opts.command) {
26
+ throw new Error('Usage: heroku run COMMAND\n\nExample: heroku run bash');
27
+ }
28
+ const dyno = new dyno_1.default(opts);
29
+ await dyno.start();
30
+ if (flags.tail) {
31
+ await (0, log_displayer_1.default)(this.heroku, {
32
+ app: flags.app,
33
+ // @ts-ignore
34
+ dyno: dyno.dyno.name,
35
+ tail: true,
36
+ });
37
+ }
38
+ else {
39
+ // @ts-ignore
40
+ core_v1_1.CliUx.ux.log(`Run ${color_1.default.cmd('heroku logs --app ' + dyno.opts.app + ' --dyno ' + dyno.dyno.name)} to view the output.`);
41
+ }
42
+ }
43
+ }
44
+ exports.default = RunDetached;
45
+ RunDetached.description = 'run a detached dyno, where output is sent to your logs';
46
+ RunDetached.examples = [
47
+ '$ heroku run:detached ls',
48
+ ];
49
+ RunDetached.strict = false;
50
+ RunDetached.flags = {
51
+ app: command_v9_1.flags.app({ required: true }),
52
+ remote: command_v9_1.flags.remote(),
53
+ env: command_v9_1.flags.string({ char: 'e', description: "environment variables to set (use ';' to split multiple vars)" }),
54
+ size: command_v9_1.flags.string({ char: 's', description: 'dyno size', completion: completions_1.DynoSizeCompletion }),
55
+ tail: command_v9_1.flags.boolean({ char: 't', description: 'continually stream logs' }),
56
+ type: command_v9_1.flags.string({ description: 'process type', completion: completions_1.ProcessTypeCompletion }),
57
+ };
@@ -0,0 +1,19 @@
1
+ import { Command } from '@heroku-cli/command-v9';
2
+ import '@oclif/core-v1/lib/parser';
3
+ export default class Run extends Command {
4
+ static description: string;
5
+ static examples: string[];
6
+ static strict: boolean;
7
+ static flags: {
8
+ app: import("@oclif/core-v1/lib/interfaces").OptionFlag<string>;
9
+ remote: import("@oclif/core-v1/lib/interfaces").OptionFlag<string | undefined>;
10
+ size: import("@oclif/core-v1/lib/interfaces").OptionFlag<string | undefined>;
11
+ type: import("@oclif/core-v1/lib/interfaces").OptionFlag<string | undefined>;
12
+ 'exit-code': import("@oclif/core-v1/lib/interfaces").BooleanFlag<boolean>;
13
+ env: import("@oclif/core-v1/lib/interfaces").OptionFlag<string | undefined>;
14
+ 'no-tty': import("@oclif/core-v1/lib/interfaces").BooleanFlag<boolean>;
15
+ listen: import("@oclif/core-v1/lib/interfaces").BooleanFlag<boolean>;
16
+ 'no-notify': import("@oclif/core-v1/lib/interfaces").BooleanFlag<boolean>;
17
+ };
18
+ run(): Promise<void>;
19
+ }
@@ -0,0 +1,65 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const command_v9_1 = require("@heroku-cli/command-v9");
4
+ const completions_1 = require("@heroku-cli/command/lib/completions");
5
+ const core_v1_1 = require("@oclif/core-v1");
6
+ require("@oclif/core-v1/lib/parser");
7
+ const debug_1 = require("debug");
8
+ const dyno_1 = require("@heroku-cli/plugin-run/lib/lib/dyno");
9
+ const helpers_1 = require("@heroku-cli/plugin-run/lib/lib/helpers");
10
+ const debug = (0, debug_1.default)('heroku:run');
11
+ class Run extends command_v9_1.Command {
12
+ async run() {
13
+ const { argv, flags } = await this.parse(Run);
14
+ const opts = {
15
+ 'exit-code': flags['exit-code'],
16
+ 'no-tty': flags['no-tty'],
17
+ app: flags.app,
18
+ attach: true,
19
+ command: (0, helpers_1.buildCommand)(argv),
20
+ env: flags.env,
21
+ heroku: this.heroku,
22
+ listen: flags.listen,
23
+ notify: !flags['no-notify'],
24
+ size: flags.size,
25
+ type: flags.type,
26
+ };
27
+ if (!opts.command) {
28
+ throw new Error('Usage: heroku run COMMAND\n\nExample: heroku run bash');
29
+ }
30
+ await this.heroku.get('/account');
31
+ const dyno = new dyno_1.default(opts);
32
+ try {
33
+ await dyno.start();
34
+ debug('done running');
35
+ }
36
+ catch (error) {
37
+ debug(error);
38
+ if (error.exitCode) {
39
+ core_v1_1.CliUx.ux.error(error.message, { code: error.exitCode, exit: error.exitCode });
40
+ }
41
+ else {
42
+ throw error;
43
+ }
44
+ }
45
+ }
46
+ }
47
+ exports.default = Run;
48
+ Run.description = 'run a one-off process inside a heroku dyno\nShows a notification if the dyno takes more than 20 seconds to start.';
49
+ Run.examples = [
50
+ '$ heroku run bash',
51
+ '$ heroku run -s standard-2x -- myscript.sh -a arg1 -s arg2',
52
+ ];
53
+ // This is to allow for variable length arguments
54
+ Run.strict = false;
55
+ Run.flags = {
56
+ app: command_v9_1.flags.app({ description: 'parent app used by review apps', required: true }),
57
+ remote: command_v9_1.flags.remote(),
58
+ size: command_v9_1.flags.string({ char: 's', description: 'dyno size', completion: completions_1.DynoSizeCompletion }),
59
+ type: command_v9_1.flags.string({ description: 'process type', completion: completions_1.ProcessTypeCompletion }),
60
+ 'exit-code': command_v9_1.flags.boolean({ char: 'x', description: 'passthrough the exit code of the remote command' }),
61
+ env: command_v9_1.flags.string({ char: 'e', description: "environment variables to set (use ';' to split multiple vars)" }),
62
+ 'no-tty': command_v9_1.flags.boolean({ description: 'force the command to not run in a tty' }),
63
+ listen: command_v9_1.flags.boolean({ description: 'listen on a local port', hidden: true }),
64
+ 'no-notify': command_v9_1.flags.boolean({ description: 'disables notification when dyno is up (alternatively use HEROKU_NOTIFICATIONS=0)' }),
65
+ };
@@ -0,0 +1,16 @@
1
+ import { Command } from '@heroku-cli/command-v9';
2
+ import '@oclif/core-v1/lib/parser';
3
+ export default class RunInside extends Command {
4
+ static description: string;
5
+ static hidden: boolean;
6
+ static examples: string[];
7
+ static flags: {
8
+ app: import("@oclif/core-v1/lib/interfaces").OptionFlag<string>;
9
+ remote: import("@oclif/core-v1/lib/interfaces").OptionFlag<string | undefined>;
10
+ 'exit-code': import("@oclif/core-v1/lib/interfaces").BooleanFlag<boolean>;
11
+ env: import("@oclif/core-v1/lib/interfaces").OptionFlag<string | undefined>;
12
+ listen: import("@oclif/core-v1/lib/interfaces").BooleanFlag<boolean>;
13
+ };
14
+ static strict: boolean;
15
+ run(): Promise<void>;
16
+ }
@@ -0,0 +1,54 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ // tslint:disable:file-name-casing
4
+ const command_v9_1 = require("@heroku-cli/command-v9");
5
+ const core_v1_1 = require("@oclif/core-v1");
6
+ require("@oclif/core-v1/lib/parser");
7
+ const debug_1 = require("debug");
8
+ const dyno_1 = require("@heroku-cli/plugin-run/lib/lib/dyno");
9
+ const helpers_1 = require("@heroku-cli/plugin-run/lib/lib/helpers");
10
+ const debug = (0, debug_1.default)('heroku:run:inside');
11
+ class RunInside extends command_v9_1.Command {
12
+ async run() {
13
+ const { flags, argv } = await this.parse(RunInside);
14
+ if (argv.length < 2) {
15
+ throw new Error('Usage: heroku run:inside DYNO COMMAND\n\nExample: heroku run:inside web.1 bash');
16
+ }
17
+ const opts = {
18
+ 'exit-code': flags['exit-code'],
19
+ app: flags.app,
20
+ command: (0, helpers_1.buildCommand)(argv.slice(1)),
21
+ dyno: argv[0],
22
+ env: flags.env,
23
+ heroku: this.heroku,
24
+ listen: flags.listen,
25
+ };
26
+ const dyno = new dyno_1.default(opts);
27
+ try {
28
+ await dyno.start();
29
+ }
30
+ catch (error) {
31
+ debug(error);
32
+ if (error.exitCode) {
33
+ core_v1_1.CliUx.ux.exit(error.exitCode);
34
+ }
35
+ else {
36
+ throw error;
37
+ }
38
+ }
39
+ }
40
+ }
41
+ exports.default = RunInside;
42
+ RunInside.description = 'run a one-off process inside an existing heroku dyno';
43
+ RunInside.hidden = true;
44
+ RunInside.examples = [
45
+ '$ heroku run:inside web.1 bash',
46
+ ];
47
+ RunInside.flags = {
48
+ app: command_v9_1.flags.app({ required: true }),
49
+ remote: command_v9_1.flags.remote(),
50
+ 'exit-code': command_v9_1.flags.boolean({ char: 'x', description: 'passthrough the exit code of the remote command' }),
51
+ env: command_v9_1.flags.string({ char: 'e', description: "environment variables to set (use ';' to split multiple vars)" }),
52
+ listen: command_v9_1.flags.boolean({ description: 'listen on a local port', hidden: true }),
53
+ };
54
+ RunInside.strict = false;
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "8.4.2-beta.0",
2
+ "version": "8.4.2",
3
3
  "commands": {
4
4
  "console": {
5
5
  "id": "console",
@@ -2578,6 +2578,192 @@
2578
2578
  },
2579
2579
  "args": {}
2580
2580
  },
2581
+ "run:detached": {
2582
+ "id": "run:detached",
2583
+ "description": "run a detached dyno, where output is sent to your logs",
2584
+ "strict": false,
2585
+ "pluginName": "heroku",
2586
+ "pluginAlias": "heroku",
2587
+ "pluginType": "core",
2588
+ "aliases": [],
2589
+ "examples": [
2590
+ "$ heroku run:detached ls"
2591
+ ],
2592
+ "flags": {
2593
+ "app": {
2594
+ "name": "app",
2595
+ "type": "option",
2596
+ "char": "a",
2597
+ "description": "app to run command against",
2598
+ "required": true,
2599
+ "multiple": false
2600
+ },
2601
+ "remote": {
2602
+ "name": "remote",
2603
+ "type": "option",
2604
+ "char": "r",
2605
+ "description": "git remote of app to use",
2606
+ "multiple": false
2607
+ },
2608
+ "env": {
2609
+ "name": "env",
2610
+ "type": "option",
2611
+ "char": "e",
2612
+ "description": "environment variables to set (use ';' to split multiple vars)",
2613
+ "multiple": false
2614
+ },
2615
+ "size": {
2616
+ "name": "size",
2617
+ "type": "option",
2618
+ "char": "s",
2619
+ "description": "dyno size",
2620
+ "multiple": false
2621
+ },
2622
+ "tail": {
2623
+ "name": "tail",
2624
+ "type": "boolean",
2625
+ "char": "t",
2626
+ "description": "continually stream logs",
2627
+ "allowNo": false
2628
+ },
2629
+ "type": {
2630
+ "name": "type",
2631
+ "type": "option",
2632
+ "description": "process type",
2633
+ "multiple": false
2634
+ }
2635
+ },
2636
+ "args": {}
2637
+ },
2638
+ "run": {
2639
+ "id": "run",
2640
+ "description": "run a one-off process inside a heroku dyno\nShows a notification if the dyno takes more than 20 seconds to start.",
2641
+ "strict": false,
2642
+ "pluginName": "heroku",
2643
+ "pluginAlias": "heroku",
2644
+ "pluginType": "core",
2645
+ "aliases": [],
2646
+ "examples": [
2647
+ "$ heroku run bash",
2648
+ "$ heroku run -s standard-2x -- myscript.sh -a arg1 -s arg2"
2649
+ ],
2650
+ "flags": {
2651
+ "app": {
2652
+ "name": "app",
2653
+ "type": "option",
2654
+ "char": "a",
2655
+ "description": "parent app used by review apps",
2656
+ "required": true,
2657
+ "multiple": false
2658
+ },
2659
+ "remote": {
2660
+ "name": "remote",
2661
+ "type": "option",
2662
+ "char": "r",
2663
+ "description": "git remote of app to use",
2664
+ "multiple": false
2665
+ },
2666
+ "size": {
2667
+ "name": "size",
2668
+ "type": "option",
2669
+ "char": "s",
2670
+ "description": "dyno size",
2671
+ "multiple": false
2672
+ },
2673
+ "type": {
2674
+ "name": "type",
2675
+ "type": "option",
2676
+ "description": "process type",
2677
+ "multiple": false
2678
+ },
2679
+ "exit-code": {
2680
+ "name": "exit-code",
2681
+ "type": "boolean",
2682
+ "char": "x",
2683
+ "description": "passthrough the exit code of the remote command",
2684
+ "allowNo": false
2685
+ },
2686
+ "env": {
2687
+ "name": "env",
2688
+ "type": "option",
2689
+ "char": "e",
2690
+ "description": "environment variables to set (use ';' to split multiple vars)",
2691
+ "multiple": false
2692
+ },
2693
+ "no-tty": {
2694
+ "name": "no-tty",
2695
+ "type": "boolean",
2696
+ "description": "force the command to not run in a tty",
2697
+ "allowNo": false
2698
+ },
2699
+ "listen": {
2700
+ "name": "listen",
2701
+ "type": "boolean",
2702
+ "description": "listen on a local port",
2703
+ "hidden": true,
2704
+ "allowNo": false
2705
+ },
2706
+ "no-notify": {
2707
+ "name": "no-notify",
2708
+ "type": "boolean",
2709
+ "description": "disables notification when dyno is up (alternatively use HEROKU_NOTIFICATIONS=0)",
2710
+ "allowNo": false
2711
+ }
2712
+ },
2713
+ "args": {}
2714
+ },
2715
+ "run:inside": {
2716
+ "id": "run:inside",
2717
+ "description": "run a one-off process inside an existing heroku dyno",
2718
+ "strict": false,
2719
+ "pluginName": "heroku",
2720
+ "pluginAlias": "heroku",
2721
+ "pluginType": "core",
2722
+ "hidden": true,
2723
+ "aliases": [],
2724
+ "examples": [
2725
+ "$ heroku run:inside web.1 bash"
2726
+ ],
2727
+ "flags": {
2728
+ "app": {
2729
+ "name": "app",
2730
+ "type": "option",
2731
+ "char": "a",
2732
+ "description": "app to run command against",
2733
+ "required": true,
2734
+ "multiple": false
2735
+ },
2736
+ "remote": {
2737
+ "name": "remote",
2738
+ "type": "option",
2739
+ "char": "r",
2740
+ "description": "git remote of app to use",
2741
+ "multiple": false
2742
+ },
2743
+ "exit-code": {
2744
+ "name": "exit-code",
2745
+ "type": "boolean",
2746
+ "char": "x",
2747
+ "description": "passthrough the exit code of the remote command",
2748
+ "allowNo": false
2749
+ },
2750
+ "env": {
2751
+ "name": "env",
2752
+ "type": "option",
2753
+ "char": "e",
2754
+ "description": "environment variables to set (use ';' to split multiple vars)",
2755
+ "multiple": false
2756
+ },
2757
+ "listen": {
2758
+ "name": "listen",
2759
+ "type": "boolean",
2760
+ "description": "listen on a local port",
2761
+ "hidden": true,
2762
+ "allowNo": false
2763
+ }
2764
+ },
2765
+ "args": {}
2766
+ },
2581
2767
  "sessions:destroy": {
2582
2768
  "id": "sessions:destroy",
2583
2769
  "description": "delete (logout) OAuth session by ID",
package/package.json CHANGED
@@ -1,13 +1,14 @@
1
1
  {
2
2
  "name": "heroku",
3
3
  "description": "CLI to interact with Heroku",
4
- "version": "8.4.2-beta.0",
4
+ "version": "8.4.2",
5
5
  "author": "Jeff Dickey @jdxcode",
6
6
  "bin": "./bin/run",
7
7
  "bugs": "https://github.com/heroku/cli/issues",
8
8
  "dependencies": {
9
9
  "@heroku-cli/color": "1.1.14",
10
10
  "@heroku-cli/command": "^10.0.0",
11
+ "@heroku-cli/command-v9": "npm:@heroku-cli/command@^9.0.2",
11
12
  "@heroku-cli/notifications": "^1.2.2",
12
13
  "@heroku-cli/plugin-addons-v5": "^8.4.0",
13
14
  "@heroku-cli/plugin-apps-v5": "^8.4.0",
@@ -15,7 +16,7 @@
15
16
  "@heroku-cli/plugin-ci-v5": "^8.2.0",
16
17
  "@heroku-cli/plugin-container-registry-v5": "^8.2.0",
17
18
  "@heroku-cli/plugin-orgs-v5": "^8.2.0",
18
- "@heroku-cli/plugin-pg-v5": "^8.4.2-beta.0",
19
+ "@heroku-cli/plugin-pg-v5": "^8.4.2",
19
20
  "@heroku-cli/plugin-ps": "^8.1.7",
20
21
  "@heroku-cli/plugin-ps-exec": "^2.4.0",
21
22
  "@heroku-cli/plugin-redis-v5": "^8.2.0",
@@ -25,6 +26,7 @@
25
26
  "@heroku/buildpack-registry": "^1.0.1",
26
27
  "@heroku/eventsource": "^1.0.7",
27
28
  "@oclif/core": "^2.8.11",
29
+ "@oclif/core-v1": "npm:@oclif/core@^1.26.2",
28
30
  "@oclif/plugin-commands": "2.2.2",
29
31
  "@oclif/plugin-help": "^5",
30
32
  "@oclif/plugin-legacy": "^1.3.0",
@@ -151,7 +153,6 @@
151
153
  "@heroku-cli/plugin-pg-v5",
152
154
  "@heroku-cli/plugin-ps-exec",
153
155
  "@heroku-cli/plugin-redis-v5",
154
- "@heroku-cli/plugin-run",
155
156
  "@heroku-cli/plugin-spaces",
156
157
  "@oclif/plugin-commands",
157
158
  "@oclif/plugin-help",
@@ -340,5 +341,5 @@
340
341
  "version": "oclif readme --multi && git add README.md ../../docs"
341
342
  },
342
343
  "types": "lib/index.d.ts",
343
- "gitHead": "77d4e4693d2859abba3156da735867c79668eae4"
344
+ "gitHead": "b451c6b3054dace0bc462eb778be8ba2d3f4d1ed"
344
345
  }