@heroku-cli/plugin-data-privatelink 1.3.1 → 1.3.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.
@@ -1,32 +1,33 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  const command_1 = require("@heroku-cli/command");
4
- const cli_ux_1 = require("cli-ux");
4
+ const core_1 = require("@oclif/core");
5
5
  const base_1 = require("../../../base");
6
6
  const fetcher_1 = require("../../../lib/fetcher");
7
- class EndpointsWait extends base_1.default {
7
+ class Wait extends base_1.default {
8
8
  async run() {
9
- const { args, flags } = this.parse(EndpointsWait);
10
- const database = await fetcher_1.default(this.heroku, args.database, flags.app);
9
+ const { args, flags } = await this.parse(Wait);
10
+ const database = await (0, fetcher_1.default)(this.heroku, args.database, flags.app);
11
11
  let status;
12
- cli_ux_1.cli.action.start('Waiting for the privatelink endpoint to be provisioned');
12
+ core_1.ux.action.start('Waiting for the privatelink endpoint to be provisioned');
13
13
  while (status !== 'Operational') {
14
- let { body: res } = await this.shogun.get(`/private-link/v0/databases/${database}`, this.shogun.defaults);
14
+ const { body: res } = await this.shogun.get(`/private-link/v0/databases/${database}`, this.shogun.defaults);
15
15
  status = res.status;
16
- await cli_ux_1.cli.wait(3000);
16
+ await core_1.ux.wait(3000);
17
17
  }
18
- cli_ux_1.cli.action.stop();
18
+ core_1.ux.action.stop();
19
19
  }
20
20
  }
21
- EndpointsWait.description = 'wait for your privatelink endpoint to be provisioned';
22
- EndpointsWait.aliases = ['pg:privatelink:wait', 'kafka:privatelink:wait', 'redis:privatelink:wait'];
23
- EndpointsWait.args = [
24
- { name: 'database' }
25
- ];
26
- EndpointsWait.flags = {
27
- app: command_1.flags.app({ required: true })
21
+ exports.default = Wait;
22
+ Wait.description = 'wait for your privatelink endpoint to be provisioned';
23
+ Wait.hiddenAliases = ['pg:privatelink:wait', 'kafka:privatelink:wait', 'redis:privatelink:wait'];
24
+ Wait.args = {
25
+ database: core_1.Args.string({ required: true }),
26
+ };
27
+ Wait.flags = {
28
+ app: command_1.flags.app({ required: true }),
29
+ remote: command_1.flags.remote(),
28
30
  };
29
- EndpointsWait.examples = [
30
- '$ heroku data:privatelink:wait postgresql-sushi-12345',
31
+ Wait.examples = [
32
+ '$ heroku data:privatelink:wait postgresql-sushi-12345 postgresql-sushi-12345 --app my-app',
31
33
  ];
32
- exports.default = EndpointsWait;
@@ -1 +1,314 @@
1
- {"version":"1.3.1","commands":{"data:privatelink:create":{"id":"data:privatelink:create","description":"create a new privatelink endpoint for your database","pluginName":"@heroku-cli/plugin-data-privatelink","pluginType":"core","aliases":["pg:privatelink:create","kafka:privatelink:create","redis:privatelink:create"],"examples":["$ heroku data:privatelink:create postgresql-sushi-12345 --aws-account-id 123456789012:user/abc","$ heroku data:privatelink:create postgresql-sushi-12345 --aws-account-id 123456789012:user/abc --account-id 123456789012:user/xyz"],"flags":{"aws-account-id":{"name":"aws-account-id","type":"option","char":"i","description":"AWS account id to use"},"app":{"name":"app","type":"option","char":"a","description":"app to run command against","required":true}},"args":[{"name":"database"}]},"data:privatelink:destroy":{"id":"data:privatelink:destroy","description":"destroy a privatelink endpoint for your database","pluginName":"@heroku-cli/plugin-data-privatelink","pluginType":"core","aliases":["pg:privatelink:destroy","kafka:privatelink:destroy","redis:privatelink:destroy"],"examples":["$ heroku data:privatelink:destroy postgresql-sushi-12345"],"flags":{"app":{"name":"app","type":"option","char":"a","description":"app to run command against","required":true}},"args":[{"name":"database"}]},"data:privatelink":{"id":"data:privatelink","description":"list all your privatelink endpoints!","pluginName":"@heroku-cli/plugin-data-privatelink","pluginType":"core","aliases":["pg:privatelink","kafka:privatelink","redis:privatelink"],"examples":["$ heroku data:privatelink postgresql-sushi-12345"],"flags":{"app":{"name":"app","type":"option","char":"a","description":"app to run command against","required":true}},"args":[{"name":"database"}]},"data:privatelink:wait":{"id":"data:privatelink:wait","description":"wait for your privatelink endpoint to be provisioned","pluginName":"@heroku-cli/plugin-data-privatelink","pluginType":"core","aliases":["pg:privatelink:wait","kafka:privatelink:wait","redis:privatelink:wait"],"examples":["$ heroku data:privatelink:wait postgresql-sushi-12345"],"flags":{"app":{"name":"app","type":"option","char":"a","description":"app to run command against","required":true}},"args":[{"name":"database"}]},"data:privatelink:access:add":{"id":"data:privatelink:access:add","description":"add an allowed account to your privatelink endpoint","pluginName":"@heroku-cli/plugin-data-privatelink","pluginType":"core","aliases":["pg:privatelink:access:add","kafka:privatelink:access:add","redis:privatelink:access:add"],"examples":["$ heroku data:privatelink:access:add postgresql-sushi-12345 --aws-account-id 123456789012:user/abc","$ heroku data:privatelink:access:add postgresql-sushi-12345 --aws-account-id 123456789012:user/abc --aws-account-id 123456789012:user/xyz"],"flags":{"aws-account-id":{"name":"aws-account-id","type":"option","char":"i","description":"AWS account id to use"},"app":{"name":"app","type":"option","char":"a","description":"app to run command against","required":true}},"args":[{"name":"database"}]},"data:privatelink:access":{"id":"data:privatelink:access","description":"list all allowed accounts for your privatelink endpoint","pluginName":"@heroku-cli/plugin-data-privatelink","pluginType":"core","aliases":["pg:privatelink:access","kafka:privatelink:access","redis:privatelink:access"],"examples":["$ heroku data:privatelink:access postgresql-sushi-12345"],"flags":{"app":{"name":"app","type":"option","char":"a","description":"app to run command against","required":true}},"args":[{"name":"database"}]},"data:privatelink:access:remove":{"id":"data:privatelink:access:remove","description":"remove an allowed account from your privatelink endpoint","pluginName":"@heroku-cli/plugin-data-privatelink","pluginType":"core","aliases":["pg:privatelink:access:remove","kafka:privatelink:access:remove","redis:privatelink:access:remove"],"examples":["$ heroku data:privatelink:access:remove postgresql-sushi-12345 --aws-account-id 123456789012:user/xyz","$ heroku data:privatelink:access:remove postgresql-sushi-12345 --aws-account-id 123456789012:user/abc --aws-account-id 123456789012:user/xyz"],"flags":{"aws-account-id":{"name":"aws-account-id","type":"option","char":"i","description":"AWS account id to use"},"app":{"name":"app","type":"option","char":"a","description":"app to run command against","required":true}},"args":[{"name":"database"}]}}}
1
+ {
2
+ "version": "1.3.2",
3
+ "commands": {
4
+ "data:privatelink:create": {
5
+ "id": "data:privatelink:create",
6
+ "description": "create a new privatelink endpoint for your database",
7
+ "strict": true,
8
+ "pluginName": "@heroku-cli/plugin-data-privatelink",
9
+ "pluginAlias": "@heroku-cli/plugin-data-privatelink",
10
+ "pluginType": "core",
11
+ "aliases": [],
12
+ "hiddenAliases": [
13
+ "pg:privatelink:create",
14
+ "kafka:privatelink:create",
15
+ "redis:privatelink:create"
16
+ ],
17
+ "examples": [
18
+ "$ heroku data:privatelink:create postgresql-sushi-12345 --aws-account-id 123456789012:user/abc --app my-app",
19
+ "$ heroku data:privatelink:create postgresql-sushi-12345 --aws-account-id 123456789012:user/abc --account-id 123456789012:user/xyz --app my-app"
20
+ ],
21
+ "flags": {
22
+ "aws-account-id": {
23
+ "name": "aws-account-id",
24
+ "type": "option",
25
+ "char": "i",
26
+ "description": "AWS account id to use",
27
+ "required": true,
28
+ "multiple": true
29
+ },
30
+ "app": {
31
+ "name": "app",
32
+ "type": "option",
33
+ "char": "a",
34
+ "description": "app to run command against",
35
+ "required": true,
36
+ "multiple": false
37
+ },
38
+ "remote": {
39
+ "name": "remote",
40
+ "type": "option",
41
+ "char": "r",
42
+ "description": "git remote of app to use",
43
+ "multiple": false
44
+ }
45
+ },
46
+ "args": {
47
+ "database": {
48
+ "name": "database",
49
+ "required": true
50
+ }
51
+ }
52
+ },
53
+ "data:privatelink:destroy": {
54
+ "id": "data:privatelink:destroy",
55
+ "description": "destroy a privatelink endpoint for your database",
56
+ "strict": true,
57
+ "pluginName": "@heroku-cli/plugin-data-privatelink",
58
+ "pluginAlias": "@heroku-cli/plugin-data-privatelink",
59
+ "pluginType": "core",
60
+ "aliases": [],
61
+ "hiddenAliases": [
62
+ "pg:privatelink:destroy",
63
+ "kafka:privatelink:destroy",
64
+ "redis:privatelink:destroy"
65
+ ],
66
+ "examples": [
67
+ "$ heroku data:privatelink:destroy postgresql-sushi-12345 --app my-app"
68
+ ],
69
+ "flags": {
70
+ "app": {
71
+ "name": "app",
72
+ "type": "option",
73
+ "char": "a",
74
+ "description": "app to run command against",
75
+ "required": true,
76
+ "multiple": false
77
+ },
78
+ "remote": {
79
+ "name": "remote",
80
+ "type": "option",
81
+ "char": "r",
82
+ "description": "git remote of app to use",
83
+ "multiple": false
84
+ }
85
+ },
86
+ "args": {
87
+ "database": {
88
+ "name": "database",
89
+ "required": true
90
+ }
91
+ }
92
+ },
93
+ "data:privatelink": {
94
+ "id": "data:privatelink",
95
+ "description": "list all your privatelink endpoints",
96
+ "strict": true,
97
+ "pluginName": "@heroku-cli/plugin-data-privatelink",
98
+ "pluginAlias": "@heroku-cli/plugin-data-privatelink",
99
+ "pluginType": "core",
100
+ "aliases": [],
101
+ "hiddenAliases": [
102
+ "pg:privatelink",
103
+ "kafka:privatelink",
104
+ "redis:privatelink"
105
+ ],
106
+ "examples": [
107
+ "$ heroku data:privatelink postgresql-sushi-12345 --app my-app"
108
+ ],
109
+ "flags": {
110
+ "app": {
111
+ "name": "app",
112
+ "type": "option",
113
+ "char": "a",
114
+ "description": "app to run command against",
115
+ "required": true,
116
+ "multiple": false
117
+ },
118
+ "remote": {
119
+ "name": "remote",
120
+ "type": "option",
121
+ "char": "r",
122
+ "description": "git remote of app to use",
123
+ "multiple": false
124
+ }
125
+ },
126
+ "args": {
127
+ "database": {
128
+ "name": "database",
129
+ "required": true
130
+ }
131
+ },
132
+ "topic": "data:privatelink"
133
+ },
134
+ "data:privatelink:wait": {
135
+ "id": "data:privatelink:wait",
136
+ "description": "wait for your privatelink endpoint to be provisioned",
137
+ "strict": true,
138
+ "pluginName": "@heroku-cli/plugin-data-privatelink",
139
+ "pluginAlias": "@heroku-cli/plugin-data-privatelink",
140
+ "pluginType": "core",
141
+ "aliases": [],
142
+ "hiddenAliases": [
143
+ "pg:privatelink:wait",
144
+ "kafka:privatelink:wait",
145
+ "redis:privatelink:wait"
146
+ ],
147
+ "examples": [
148
+ "$ heroku data:privatelink:wait postgresql-sushi-12345 postgresql-sushi-12345 --app my-app"
149
+ ],
150
+ "flags": {
151
+ "app": {
152
+ "name": "app",
153
+ "type": "option",
154
+ "char": "a",
155
+ "description": "app to run command against",
156
+ "required": true,
157
+ "multiple": false
158
+ },
159
+ "remote": {
160
+ "name": "remote",
161
+ "type": "option",
162
+ "char": "r",
163
+ "description": "git remote of app to use",
164
+ "multiple": false
165
+ }
166
+ },
167
+ "args": {
168
+ "database": {
169
+ "name": "database",
170
+ "required": true
171
+ }
172
+ }
173
+ },
174
+ "data:privatelink:access:add": {
175
+ "id": "data:privatelink:access:add",
176
+ "description": "add one or more allowed AWS accounts to your privatelink endpoint",
177
+ "strict": true,
178
+ "pluginName": "@heroku-cli/plugin-data-privatelink",
179
+ "pluginAlias": "@heroku-cli/plugin-data-privatelink",
180
+ "pluginType": "core",
181
+ "aliases": [],
182
+ "hiddenAliases": [
183
+ "pg:privatelink:access:add",
184
+ "kafka:privatelink:access:add",
185
+ "redis:privatelink:access:add"
186
+ ],
187
+ "examples": [
188
+ "$ heroku data:privatelink:access:add postgresql-sushi-12345 --aws-account-id 123456789012:user/abc --app my-app",
189
+ "$ heroku data:privatelink:access:add postgresql-sushi-12345 --aws-account-id 123456789012:user/abc --aws-account-id 123456789012:user/xyz --app my-app"
190
+ ],
191
+ "flags": {
192
+ "aws-account-id": {
193
+ "name": "aws-account-id",
194
+ "type": "option",
195
+ "char": "i",
196
+ "description": "AWS account id to use",
197
+ "required": true,
198
+ "multiple": true
199
+ },
200
+ "app": {
201
+ "name": "app",
202
+ "type": "option",
203
+ "char": "a",
204
+ "description": "app to run command against",
205
+ "required": true,
206
+ "multiple": false
207
+ },
208
+ "remote": {
209
+ "name": "remote",
210
+ "type": "option",
211
+ "char": "r",
212
+ "description": "git remote of app to use",
213
+ "multiple": false
214
+ }
215
+ },
216
+ "args": {
217
+ "database": {
218
+ "name": "database",
219
+ "required": true
220
+ }
221
+ }
222
+ },
223
+ "data:privatelink:access": {
224
+ "id": "data:privatelink:access",
225
+ "description": "list all allowed accounts for your privatelink endpoint",
226
+ "strict": true,
227
+ "pluginName": "@heroku-cli/plugin-data-privatelink",
228
+ "pluginAlias": "@heroku-cli/plugin-data-privatelink",
229
+ "pluginType": "core",
230
+ "aliases": [],
231
+ "hiddenAliases": [
232
+ "pg:privatelink:access",
233
+ "kafka:privatelink:access",
234
+ "redis:privatelink:access"
235
+ ],
236
+ "examples": [
237
+ "$ heroku data:privatelink:access postgresql-sushi-12345 --app my-app"
238
+ ],
239
+ "flags": {
240
+ "app": {
241
+ "name": "app",
242
+ "type": "option",
243
+ "char": "a",
244
+ "description": "app to run command against",
245
+ "required": true,
246
+ "multiple": false
247
+ },
248
+ "remote": {
249
+ "name": "remote",
250
+ "type": "option",
251
+ "char": "r",
252
+ "description": "git remote of app to use",
253
+ "multiple": false
254
+ }
255
+ },
256
+ "args": {
257
+ "database": {
258
+ "name": "database",
259
+ "required": true
260
+ }
261
+ },
262
+ "topic": "data:privatelink:access"
263
+ },
264
+ "data:privatelink:access:remove": {
265
+ "id": "data:privatelink:access:remove",
266
+ "description": "remove an allowed account from your privatelink endpoint",
267
+ "strict": true,
268
+ "pluginName": "@heroku-cli/plugin-data-privatelink",
269
+ "pluginAlias": "@heroku-cli/plugin-data-privatelink",
270
+ "pluginType": "core",
271
+ "aliases": [],
272
+ "hiddenAliases": [
273
+ "pg:privatelink:access:remove",
274
+ "kafka:privatelink:access:remove",
275
+ "redis:privatelink:access:remove"
276
+ ],
277
+ "examples": [
278
+ "$ heroku data:privatelink:access:remove postgresql-sushi-12345 --aws-account-id 123456789012:user/xyz --app my-app",
279
+ "$ heroku data:privatelink:access:remove postgresql-sushi-12345 --aws-account-id 123456789012:user/abc --aws-account-id 123456789012:user/xyz --app my-app"
280
+ ],
281
+ "flags": {
282
+ "aws-account-id": {
283
+ "name": "aws-account-id",
284
+ "type": "option",
285
+ "char": "i",
286
+ "description": "AWS account id to use",
287
+ "required": true,
288
+ "multiple": true
289
+ },
290
+ "app": {
291
+ "name": "app",
292
+ "type": "option",
293
+ "char": "a",
294
+ "description": "app to run command against",
295
+ "required": true,
296
+ "multiple": false
297
+ },
298
+ "remote": {
299
+ "name": "remote",
300
+ "type": "option",
301
+ "char": "r",
302
+ "description": "git remote of app to use",
303
+ "multiple": false
304
+ }
305
+ },
306
+ "args": {
307
+ "database": {
308
+ "name": "database",
309
+ "required": true
310
+ }
311
+ }
312
+ }
313
+ }
314
+ }
package/package.json CHANGED
@@ -1,41 +1,47 @@
1
1
  {
2
2
  "name": "@heroku-cli/plugin-data-privatelink",
3
3
  "description": "Heroku Data via PrivateLink CLI",
4
- "version": "1.3.1",
5
- "author": "Heroku Data UX",
4
+ "version": "1.3.2",
5
+ "author": "Heroku",
6
6
  "bugs": "https://github.com/heroku/heroku-data-privatelink-cli/issues",
7
7
  "dependencies": {
8
- "@heroku-cli/color": "^1.1.14",
9
- "@heroku-cli/command": "^8.2.6",
10
- "@oclif/command": "^1.5.8",
11
- "@oclif/config": "^1.10.4",
12
- "@oclif/errors": "^1.2.2",
13
- "@types/supports-color": "^5.3.0",
14
- "cli-ux": "^5.0.0",
15
- "tslib": "^1.9.3"
8
+ "@heroku-cli/color": "^2.0.1",
9
+ "@heroku-cli/command": "^11.1.2",
10
+ "@heroku-cli/schema": "^1.0.25",
11
+ "@oclif/core": "^2.16.0",
12
+ "@oclif/plugin-help": "^5",
13
+ "stdout-stderr": "^0.1.13",
14
+ "tslib": "1.14.1"
16
15
  },
17
16
  "devDependencies": {
18
- "@fancy-test/nock": "^0.1.1",
19
- "@heroku-cli/schema": "^1.0.23",
20
- "@oclif/dev-cli": "^1.21.0",
21
- "@oclif/plugin-help": "^2.1.4",
22
- "@oclif/test": "^1.2.2",
23
- "@oclif/tslint": "^3.1.1",
24
- "@types/chai": "^4.1.7",
25
- "@types/mocha": "^5.2.5",
26
- "@types/node": "^10.12.18",
27
- "chai": "^4.2.0",
28
- "globby": "^8.0.1",
29
- "lolex": "^3.0.0",
30
- "mocha": "^5.2.0",
31
- "nock": "^10.0.5",
32
- "nyc": "^13.1.0",
33
- "ts-node": "^7.0.1",
34
- "tslint": "^5.12.0",
35
- "typescript": "^3.2.2"
17
+ "@oclif/test": "^2.3.28",
18
+ "@types/chai": "^4.3.14",
19
+ "@types/chai-as-promised": "^7.1.8",
20
+ "@types/mocha": "^10.0.6",
21
+ "@types/node": "^16.11.7",
22
+ "@types/supports-color": "^8.1.3",
23
+ "@typescript-eslint/eslint-plugin": "6.21.0",
24
+ "@typescript-eslint/parser": "6.21.0",
25
+ "chai": "^4.4.1",
26
+ "chai-as-promised": "^7.1.1",
27
+ "eslint": "^7.32.0",
28
+ "eslint-config-oclif": "^4.0.0",
29
+ "eslint-config-oclif-typescript": "^1.0.2",
30
+ "eslint-import-resolver-typescript": "^3.5.5",
31
+ "eslint-plugin-import": "^2.27.5",
32
+ "eslint-plugin-mocha": "^10.4.3",
33
+ "globby": "^10.0.2",
34
+ "lolex": "^3.1.0",
35
+ "mocha": "^9.2.2",
36
+ "nock": "^13.5.1",
37
+ "nyc": "^15.1.0",
38
+ "oclif": "3.17.2",
39
+ "ts-node": "^10.9.2",
40
+ "tsheredoc": "^1.0.1",
41
+ "typescript": "4.8.4"
36
42
  },
37
43
  "engines": {
38
- "node": ">=8.0.0"
44
+ "node": ">=16.0.0"
39
45
  },
40
46
  "files": [
41
47
  "/lib",
@@ -45,22 +51,40 @@
45
51
  ],
46
52
  "homepage": "https://github.com/heroku/heroku-data-privatelink-cli",
47
53
  "keywords": [
48
- "oclif-plugin"
54
+ "heroku",
55
+ "heroku-cli-plugin"
49
56
  ],
50
57
  "license": "MIT",
58
+ "mocha": {
59
+ "require": [
60
+ "test/helpers/init.js",
61
+ "ts-node/register",
62
+ "source-map-support/register"
63
+ ],
64
+ "watch-extensions": "ts",
65
+ "recursive": true,
66
+ "reporter": "spec",
67
+ "timeout": 30000
68
+ },
51
69
  "oclif": {
52
70
  "commands": "./lib/commands",
53
71
  "bin": "heroku",
54
- "devPlugins": [
72
+ "plugins": [
55
73
  "@oclif/plugin-help"
56
74
  ]
57
75
  },
58
76
  "repository": "heroku/heroku-data-privatelink-cli",
77
+ "resolutions": {
78
+ "isbinaryfile": "4.0.10"
79
+ },
59
80
  "scripts": {
81
+ "build": "rm -rf lib && tsc -b",
82
+ "lint": "eslint . --ext .ts --config .eslintrc",
60
83
  "postpack": "rm -f oclif.manifest.json",
61
- "posttest": "tslint -p test -t stylish",
62
- "prepack": "rm -rf lib && tsc -b && oclif-dev manifest && oclif-dev readme",
63
- "test": "nyc --extension .ts mocha --forbid-only \"test/**/*.test.ts\"",
64
- "version": "oclif-dev readme && git add README.md"
84
+ "posttest": "yarn lint",
85
+ "prepack": "rm -rf lib && tsc -b && oclif manifest",
86
+ "pretest": "tsc -p test --noEmit && yarn build",
87
+ "test": "nyc mocha --forbid-only \"test/**/*.unit.test.ts\"",
88
+ "version": "oclif readme && git add README.md"
65
89
  }
66
90
  }