heroku 9.0.0-alpha.3 → 9.0.0-beta.1

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.
Files changed (36) hide show
  1. package/lib/commands/addons/create.d.ts +1 -0
  2. package/lib/commands/addons/create.js +13 -1
  3. package/lib/commands/apps/info.js +7 -7
  4. package/lib/commands/ci/config/get.js +2 -2
  5. package/lib/commands/ci/config/index.d.ts +1 -0
  6. package/lib/commands/ci/config/index.js +3 -2
  7. package/lib/commands/ci/config/set.d.ts +1 -1
  8. package/lib/commands/ci/config/set.js +1 -1
  9. package/lib/commands/ci/config/unset.d.ts +0 -1
  10. package/lib/commands/ci/config/unset.js +2 -3
  11. package/lib/commands/container/pull.js +3 -0
  12. package/lib/commands/container/push.js +3 -1
  13. package/lib/commands/container/release.js +3 -1
  14. package/lib/commands/container/rm.js +3 -0
  15. package/lib/commands/container/run.js +3 -0
  16. package/lib/commands/spaces/transfer.js +2 -2
  17. package/lib/commands/spaces/trusted-ips/remove.d.ts +1 -1
  18. package/lib/commands/spaces/trusted-ips/remove.js +1 -1
  19. package/lib/commands/spaces/vpn/config.js +1 -1
  20. package/lib/commands/spaces/vpn/connect.js +5 -2
  21. package/lib/commands/spaces/vpn/destroy.js +4 -1
  22. package/lib/commands/spaces/vpn/info.js +1 -1
  23. package/lib/commands/spaces/vpn/update.js +5 -2
  24. package/lib/commands/spaces/vpn/wait.d.ts +4 -1
  25. package/lib/commands/spaces/vpn/wait.js +20 -3
  26. package/lib/lib/container/helpers.d.ts +8 -0
  27. package/lib/lib/container/helpers.js +26 -0
  28. package/lib/lib/git/git.js +3 -3
  29. package/oclif.manifest.json +699 -858
  30. package/package.json +6 -9
  31. package/lib/commands/spaces/outbound-rules/add.d.ts +0 -15
  32. package/lib/commands/spaces/outbound-rules/add.js +0 -81
  33. package/lib/commands/spaces/outbound-rules/index.d.ts +0 -15
  34. package/lib/commands/spaces/outbound-rules/index.js +0 -49
  35. package/lib/commands/spaces/outbound-rules/remove.d.ts +0 -17
  36. package/lib/commands/spaces/outbound-rules/remove.js +0 -53
package/package.json CHANGED
@@ -1,13 +1,13 @@
1
1
  {
2
2
  "name": "heroku",
3
3
  "description": "CLI to interact with Heroku",
4
- "version": "9.0.0-alpha.3",
4
+ "version": "9.0.0-beta.1",
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": "2.0.1",
10
- "@heroku-cli/command": "^11.0.0",
10
+ "@heroku-cli/command": "^11.1.2",
11
11
  "@heroku-cli/notifications": "^1.2.4",
12
12
  "@heroku-cli/plugin-ps": "^8.1.7",
13
13
  "@heroku-cli/plugin-ps-exec": "^2.4.0",
@@ -20,7 +20,7 @@
20
20
  "@oclif/plugin-help": "^5",
21
21
  "@oclif/plugin-legacy": "^1.3.0",
22
22
  "@oclif/plugin-not-found": "2.3.16",
23
- "@oclif/plugin-plugins": "3.10.1",
23
+ "@oclif/plugin-plugins": "2.4.3",
24
24
  "@oclif/plugin-update": "3.2.4",
25
25
  "@oclif/plugin-version": "^1.2.1",
26
26
  "@oclif/plugin-warn-if-update-available": "2.0.29",
@@ -43,7 +43,7 @@
43
43
  "debug": "4.3.4",
44
44
  "edit-string": "^1.1.6",
45
45
  "execa": "5.1.1",
46
- "filesize": "^4.0.0",
46
+ "filesize": "^10.1.2",
47
47
  "foreman": "^3.0.1",
48
48
  "fs-extra": "7.0.1",
49
49
  "github-url-to-object": "^4.0.4",
@@ -164,6 +164,7 @@
164
164
  "timeout": 360000
165
165
  },
166
166
  "oclif": {
167
+ "repositoryPrefix": "<%- repo %>/blob/v<%- version %>/packages/cli/<%- commandPath %>",
167
168
  "additionalHelpFlags": [
168
169
  "-h"
169
170
  ],
@@ -272,10 +273,6 @@
272
273
  "orgs": {
273
274
  "description": "manage organizations"
274
275
  },
275
- "outbound-rules": {
276
- "description": "space outbound IP rules",
277
- "hidden": true
278
- },
279
276
  "pg": {
280
277
  "description": "manage postgresql databases"
281
278
  },
@@ -391,5 +388,5 @@
391
388
  "version": "oclif readme --multi && git add README.md ../../docs"
392
389
  },
393
390
  "types": "lib/index.d.ts",
394
- "gitHead": "80a96b32a9083b3f9282d96f9b621af7080cd16d"
391
+ "gitHead": "ecf6f90d54c0060ff169475611a92c3fedec3faa"
395
392
  }
@@ -1,15 +0,0 @@
1
- import { Command } from '@heroku-cli/command';
2
- export default class Add extends Command {
3
- static topic: string;
4
- static aliases: string[];
5
- static description: string;
6
- static examples: string[];
7
- static hidden: boolean;
8
- static flags: {
9
- space: import("@oclif/core/lib/interfaces").OptionFlag<string, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
10
- dest: import("@oclif/core/lib/interfaces").OptionFlag<string, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
11
- protocol: import("@oclif/core/lib/interfaces").OptionFlag<string, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
12
- port: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
13
- };
14
- run(): Promise<void>;
15
- }
@@ -1,81 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- const command_1 = require("@heroku-cli/command");
4
- const color_1 = require("@heroku-cli/color");
5
- const core_1 = require("@oclif/core");
6
- const tsheredoc_1 = require("tsheredoc");
7
- const outbound_rules_1 = require("../../../lib/spaces/outbound-rules");
8
- const completions_1 = require("@heroku-cli/command/lib/completions");
9
- const completions_2 = require("../../../lib/autocomplete/completions");
10
- class Add extends command_1.Command {
11
- async run() {
12
- const { flags } = await this.parse(Add);
13
- const { space, dest, protocol, port } = flags;
14
- const { body: ruleset } = await this.heroku.get(`/spaces/${space}/outbound-ruleset`, {
15
- headers: { Accept: 'application/vnd.heroku+json; version=3.dogwood' },
16
- });
17
- ruleset.rules = ruleset.rules || [];
18
- const ports = (0, outbound_rules_1.parsePorts)(protocol, port);
19
- ruleset.rules.push({
20
- target: dest, from_port: ports[0], to_port: ports[1] || ports[0], protocol: protocol,
21
- });
22
- core_1.ux.action.start(`Adding rule to the Outbound Rules of ${color_1.default.cyan.bold(space)}`);
23
- await this.heroku.put(`/spaces/${space}/outbound-ruleset`, {
24
- headers: { Accept: 'application/vnd.heroku+json; version=3.dogwood' },
25
- body: ruleset,
26
- });
27
- core_1.ux.action.stop();
28
- core_1.ux.warn('Modifying the Outbound Rules may break Add-ons for Apps in this Private Space');
29
- }
30
- }
31
- exports.default = Add;
32
- Add.topic = 'spaces';
33
- Add.aliases = ['outbound-rules:add'];
34
- Add.description = (0, tsheredoc_1.default)(`
35
- Add outbound rules to a Private Space
36
-
37
- The destination flag uses CIDR notation.
38
-
39
- ICMP Rules
40
- The ICMP protocol has types, not ports, but the underlying systems treat them as the same. For this reason,
41
- when you want to allow ICMP traffic you will use the --port flag to specify the ICMP types you want to
42
- allow. ICMP types are numbered, 0-255.
43
- `);
44
- Add.examples = [
45
- (0, tsheredoc_1.default)(`
46
- $ heroku outbound-rules:add --space my-space --dest 192.168.2.0/24 --protocol tcp --port 80
47
- Adding rule to the Outbound Rules of my-space... done
48
- `),
49
- (0, tsheredoc_1.default)(`
50
- # with port range:
51
- $ heroku outbound-rules:add --space my-space --dest 192.168.2.0/24 --protocol tcp --port 80-100
52
- Adding rule to the Outbound Rules of my-space... done
53
- `),
54
- (0, tsheredoc_1.default)(`
55
- # opening up everything
56
- $ heroku outbound-rules:add --space my-space --dest 0.0.0.0/0 --protocol any --port any
57
- Adding rule to the Outbound Rules of my-space... done
58
- `),
59
- ];
60
- Add.hidden = true;
61
- Add.flags = {
62
- space: command_1.flags.string({
63
- char: 's',
64
- description: 'space to add rule to',
65
- required: true,
66
- completion: completions_1.SpaceCompletion,
67
- }),
68
- dest: command_1.flags.string({
69
- description: 'target CIDR block dynos are allowed to communicate with',
70
- required: true,
71
- }),
72
- protocol: command_1.flags.string({
73
- description: 'the protocol dynos are allowed to use when communicating with hosts in destination CIDR block.',
74
- completion: completions_2.ProtocolCompletion,
75
- options: ['tcp', 'udp', 'icmp', '0-255', 'any'],
76
- required: true,
77
- }),
78
- port: command_1.flags.string({
79
- description: 'the port dynos are allowed to use when communicating with hosts in destination CIDR block. Accepts a range in `<lowest port>-<highest port>` format. 0 is the minimum. The maximum port allowed is 65535, except for ICMP with a maximum of 255.',
80
- }),
81
- };
@@ -1,15 +0,0 @@
1
- import { Command } from '@heroku-cli/command';
2
- export default class Index extends Command {
3
- static topic: string;
4
- static aliases: string[];
5
- static description: string;
6
- static hidden: boolean;
7
- static flags: {
8
- space: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
9
- json: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
10
- };
11
- static args: {
12
- space: import("@oclif/core/lib/interfaces/parser").Arg<string | undefined, Record<string, unknown>>;
13
- };
14
- run(): Promise<void>;
15
- }
@@ -1,49 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- const command_1 = require("@heroku-cli/command");
4
- const core_1 = require("@oclif/core");
5
- const tsheredoc_1 = require("tsheredoc");
6
- const outbound_rules_1 = require("../../../lib/spaces/outbound-rules");
7
- const completions_1 = require("@heroku-cli/command/lib/completions");
8
- class Index extends command_1.Command {
9
- async run() {
10
- const { flags, args } = await this.parse(Index);
11
- const spaceName = flags.space || args.space;
12
- if (!spaceName) {
13
- core_1.ux.error((0, tsheredoc_1.default)(`
14
- Error: Missing 1 required arg:
15
- space
16
- See more help with --help
17
- `));
18
- }
19
- const { body: ruleset } = await this.heroku.get(`/spaces/${spaceName}/outbound-ruleset`, {
20
- headers: { Accept: 'application/vnd.heroku+json; version=3.dogwood' },
21
- });
22
- if (flags.json)
23
- (0, outbound_rules_1.displayRulesAsJSON)(ruleset);
24
- else
25
- (0, outbound_rules_1.displayRules)(spaceName, ruleset);
26
- }
27
- }
28
- exports.default = Index;
29
- Index.topic = 'spaces';
30
- Index.aliases = ['outbound-rules'];
31
- Index.description = (0, tsheredoc_1.default)(`
32
- list Outbound Rules for a space
33
- Outbound Rules are only available on Private Spaces.
34
-
35
- Newly created spaces will have an "Allow All" rule set by default
36
- allowing all egress dyno traffic outside of the space. You can
37
- remove this default rule to completely stop your private dynos from
38
- talking to the world.
39
-
40
- You can add specific rules that only allow your dyno to communicate with trusted hosts.
41
- `);
42
- Index.hidden = true;
43
- Index.flags = {
44
- space: command_1.flags.string({ char: 's', description: 'space to get outbound rules from', completion: completions_1.SpaceCompletion }),
45
- json: command_1.flags.boolean({ description: 'output in json format' }),
46
- };
47
- Index.args = {
48
- space: core_1.Args.string({ hidden: true }),
49
- };
@@ -1,17 +0,0 @@
1
- import { Command } from '@heroku-cli/command';
2
- export default class Remove extends Command {
3
- static topic: string;
4
- static aliases: string[];
5
- static description: string;
6
- static examples: string[];
7
- static hidden: boolean;
8
- static flags: {
9
- space: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
10
- confirm: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
11
- };
12
- static args: {
13
- ruleNumber: import("@oclif/core/lib/interfaces/parser").Arg<string, Record<string, unknown>>;
14
- };
15
- private clientOptions;
16
- run(): Promise<void>;
17
- }
@@ -1,53 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- const color_1 = require("@heroku-cli/color");
4
- const command_1 = require("@heroku-cli/command");
5
- const core_1 = require("@oclif/core");
6
- const tsheredoc_1 = require("tsheredoc");
7
- const confirmCommand_1 = require("../../../lib/confirmCommand");
8
- class Remove extends command_1.Command {
9
- constructor() {
10
- super(...arguments);
11
- this.clientOptions = {
12
- headers: { Accept: 'application/vnd.heroku+json; version=3.dogwood' },
13
- };
14
- }
15
- async run() {
16
- var _a;
17
- const { flags, args } = await this.parse(Remove);
18
- const space = flags.space;
19
- if (!space)
20
- throw new Error('Space name required.');
21
- const { body: ruleset } = await this.heroku.get(`/spaces/${space}/outbound-ruleset`, this.clientOptions);
22
- if (!((_a = ruleset.rules) === null || _a === void 0 ? void 0 : _a.length)) {
23
- throw new Error('No Outbound Rules configured. Nothing to do.');
24
- }
25
- const deleted = ruleset.rules.splice(Number.parseInt(args.ruleNumber, 10) - 1, 1)[0];
26
- await (0, confirmCommand_1.default)(space, flags.confirm, (0, tsheredoc_1.default)(`
27
- Destructive Action
28
- This will remove:
29
- Destination: ${deleted.target}, From Port: ${deleted.from_port}, To Port: ${deleted.to_port}, Protocol ${deleted.protocol}
30
- from the Outbound Rules on ${color_1.default.cyan.bold(space)}
31
- `));
32
- const opts = Object.assign(Object.assign({}, this.clientOptions), { body: ruleset });
33
- await this.heroku.put(`/spaces/${space}/outbound-ruleset`, opts);
34
- core_1.ux.log(`Removed Rule ${color_1.default.cyan.bold(args.ruleNumber)} from Outbound Rules on ${color_1.default.cyan.bold(space)}`);
35
- core_1.ux.warn('It may take a few moments for the changes to take effect.');
36
- }
37
- }
38
- exports.default = Remove;
39
- Remove.topic = 'spaces';
40
- Remove.aliases = ['outbound-rules:remove'];
41
- Remove.description = 'Remove a Rules from the list of Outbound Rules';
42
- Remove.examples = [(0, tsheredoc_1.default)(`
43
- $ heroku outbound-rules:remove --space my-space 4
44
- Removed 192.168.2.0/24 from trusted IP ranges on my-space
45
- `)];
46
- Remove.hidden = true;
47
- Remove.flags = {
48
- space: command_1.flags.string({ optional: false, description: 'space to remove rule from' }),
49
- confirm: command_1.flags.string({ description: 'set to space name to bypass confirm prompt' }),
50
- };
51
- Remove.args = {
52
- ruleNumber: core_1.Args.string({ required: true }),
53
- };