@heroku-cli/plugin-data 1.2.0 → 1.3.0
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.
- package/README.md +17 -17
- package/lib/commands/data/connectors/create.js +2 -2
- package/lib/commands/data/connectors/destroy.js +1 -1
- package/lib/commands/data/connectors/index.js +1 -1
- package/lib/commands/data/enhanced-certificates/disable.js +1 -1
- package/lib/commands/data/enhanced-certificates/enable.js +1 -1
- package/lib/commands/data/enhanced-certificates/status.js +1 -1
- package/lib/commands/data/labs/disable.js +1 -1
- package/lib/commands/data/labs/enable.js +1 -1
- package/lib/commands/data/labs/list.js +1 -1
- package/lib/fetcher.js +1 -0
- package/lib/lib/base.js +2 -1
- package/npm-shrinkwrap.json +9695 -0
- package/oclif.manifest.json +1 -1
- package/package.json +6 -7
- package/yarn.lock +3072 -2700
package/README.md
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
==========================
|
|
1
|
+
# Heroku CLI Data Plugin
|
|
3
2
|
|
|
4
3
|
A Heroku CLI Plugin for managing Heroku Data Addons and Features
|
|
5
4
|
|
|
@@ -8,7 +7,7 @@ A Heroku CLI Plugin for managing Heroku Data Addons and Features
|
|
|
8
7
|
|
|
9
8
|
[](https://oclif.io)
|
|
10
9
|
[](https://npmjs.org/package/@heroku-cli/plugin-data-connectors)
|
|
11
|
-
|
|
10
|
+

|
|
12
11
|
[](https://npmjs.org/package/@heroku-cli/plugin-data-connectors)
|
|
13
12
|
[](https://github.com/heroku/heroku-cli-plugin-data-connectors/blob/main/package.json)
|
|
14
13
|
|
|
@@ -18,6 +17,7 @@ Center](https://devcenter.heroku.com/articles/heroku-data-connectors).
|
|
|
18
17
|
You can read more about Heroku Data Enhanced Certificates on the [Dev Center](https://devcenter.heroku.com/articles/heroku-data-enhanced-certificates).
|
|
19
18
|
|
|
20
19
|
<!-- toc -->
|
|
20
|
+
* [Heroku CLI Data Plugin](#heroku-cli-data-plugin)
|
|
21
21
|
* [Usage](#usage)
|
|
22
22
|
* [Commands](#commands)
|
|
23
23
|
<!-- tocstop -->
|
|
@@ -78,7 +78,7 @@ EXAMPLES
|
|
|
78
78
|
heroku data:connectors --addon=your-postgres-addon --table
|
|
79
79
|
```
|
|
80
80
|
|
|
81
|
-
_See code: [src/commands/data/connectors/index.ts](https://github.com/heroku/heroku-cli-plugin-data/blob/v1.
|
|
81
|
+
_See code: [src/commands/data/connectors/index.ts](https://github.com/heroku/heroku-cli-plugin-data/blob/v1.3.0/src/commands/data/connectors/index.ts)_
|
|
82
82
|
|
|
83
83
|
## `heroku data:connectors:create`
|
|
84
84
|
|
|
@@ -106,7 +106,7 @@ EXAMPLES
|
|
|
106
106
|
--exclude-column public.users.password
|
|
107
107
|
```
|
|
108
108
|
|
|
109
|
-
_See code: [src/commands/data/connectors/create.ts](https://github.com/heroku/heroku-cli-plugin-data/blob/v1.
|
|
109
|
+
_See code: [src/commands/data/connectors/create.ts](https://github.com/heroku/heroku-cli-plugin-data/blob/v1.3.0/src/commands/data/connectors/create.ts)_
|
|
110
110
|
|
|
111
111
|
## `heroku data:connectors:destroy [CONNECTOR]`
|
|
112
112
|
|
|
@@ -127,7 +127,7 @@ EXAMPLES
|
|
|
127
127
|
$ heroku data:connectors:destroy gentle-connector-1234 --confirm gentle-connector-1234
|
|
128
128
|
```
|
|
129
129
|
|
|
130
|
-
_See code: [src/commands/data/connectors/destroy.ts](https://github.com/heroku/heroku-cli-plugin-data/blob/v1.
|
|
130
|
+
_See code: [src/commands/data/connectors/destroy.ts](https://github.com/heroku/heroku-cli-plugin-data/blob/v1.3.0/src/commands/data/connectors/destroy.ts)_
|
|
131
131
|
|
|
132
132
|
## `heroku data:connectors:info [CONNECTOR]`
|
|
133
133
|
|
|
@@ -148,7 +148,7 @@ EXAMPLES
|
|
|
148
148
|
$ heroku data:connectors:info gentle-connector-1234 --json
|
|
149
149
|
```
|
|
150
150
|
|
|
151
|
-
_See code: [src/commands/data/connectors/info.ts](https://github.com/heroku/heroku-cli-plugin-data/blob/v1.
|
|
151
|
+
_See code: [src/commands/data/connectors/info.ts](https://github.com/heroku/heroku-cli-plugin-data/blob/v1.3.0/src/commands/data/connectors/info.ts)_
|
|
152
152
|
|
|
153
153
|
## `heroku data:connectors:pause [CONNECTOR]`
|
|
154
154
|
|
|
@@ -165,7 +165,7 @@ EXAMPLE
|
|
|
165
165
|
$ heroku data:connectors:pause gentle-connector-1234
|
|
166
166
|
```
|
|
167
167
|
|
|
168
|
-
_See code: [src/commands/data/connectors/pause.ts](https://github.com/heroku/heroku-cli-plugin-data/blob/v1.
|
|
168
|
+
_See code: [src/commands/data/connectors/pause.ts](https://github.com/heroku/heroku-cli-plugin-data/blob/v1.3.0/src/commands/data/connectors/pause.ts)_
|
|
169
169
|
|
|
170
170
|
## `heroku data:connectors:resume [CONNECTOR]`
|
|
171
171
|
|
|
@@ -182,7 +182,7 @@ EXAMPLE
|
|
|
182
182
|
$ heroku data:connectors:resume gentle-connector-1234
|
|
183
183
|
```
|
|
184
184
|
|
|
185
|
-
_See code: [src/commands/data/connectors/resume.ts](https://github.com/heroku/heroku-cli-plugin-data/blob/v1.
|
|
185
|
+
_See code: [src/commands/data/connectors/resume.ts](https://github.com/heroku/heroku-cli-plugin-data/blob/v1.3.0/src/commands/data/connectors/resume.ts)_
|
|
186
186
|
|
|
187
187
|
## `heroku data:connectors:update [CONNECTOR]`
|
|
188
188
|
|
|
@@ -208,7 +208,7 @@ EXAMPLE
|
|
|
208
208
|
--remove-excluded-column public.parcels.key
|
|
209
209
|
```
|
|
210
210
|
|
|
211
|
-
_See code: [src/commands/data/connectors/update.ts](https://github.com/heroku/heroku-cli-plugin-data/blob/v1.
|
|
211
|
+
_See code: [src/commands/data/connectors/update.ts](https://github.com/heroku/heroku-cli-plugin-data/blob/v1.3.0/src/commands/data/connectors/update.ts)_
|
|
212
212
|
|
|
213
213
|
## `heroku data:connectors:wait [CONNECTOR]`
|
|
214
214
|
|
|
@@ -225,7 +225,7 @@ EXAMPLE
|
|
|
225
225
|
$ heroku data:connectors:wait gentle-connector-1234
|
|
226
226
|
```
|
|
227
227
|
|
|
228
|
-
_See code: [src/commands/data/connectors/wait.ts](https://github.com/heroku/heroku-cli-plugin-data/blob/v1.
|
|
228
|
+
_See code: [src/commands/data/connectors/wait.ts](https://github.com/heroku/heroku-cli-plugin-data/blob/v1.3.0/src/commands/data/connectors/wait.ts)_
|
|
229
229
|
|
|
230
230
|
## `heroku data:enhanced-certificates:disable [ADDON]`
|
|
231
231
|
|
|
@@ -242,7 +242,7 @@ DESCRIPTION
|
|
|
242
242
|
Read more about this feature at https://devcenter.heroku.com/articles/heroku-data-enhanced-certificates
|
|
243
243
|
```
|
|
244
244
|
|
|
245
|
-
_See code: [src/commands/data/enhanced-certificates/disable.ts](https://github.com/heroku/heroku-cli-plugin-data/blob/v1.
|
|
245
|
+
_See code: [src/commands/data/enhanced-certificates/disable.ts](https://github.com/heroku/heroku-cli-plugin-data/blob/v1.3.0/src/commands/data/enhanced-certificates/disable.ts)_
|
|
246
246
|
|
|
247
247
|
## `heroku data:enhanced-certificates:enable [ADDON]`
|
|
248
248
|
|
|
@@ -262,7 +262,7 @@ EXAMPLE
|
|
|
262
262
|
$ heroku data:enhanced-certificates:enable happy-postgres-1234 -a example-app
|
|
263
263
|
```
|
|
264
264
|
|
|
265
|
-
_See code: [src/commands/data/enhanced-certificates/enable.ts](https://github.com/heroku/heroku-cli-plugin-data/blob/v1.
|
|
265
|
+
_See code: [src/commands/data/enhanced-certificates/enable.ts](https://github.com/heroku/heroku-cli-plugin-data/blob/v1.3.0/src/commands/data/enhanced-certificates/enable.ts)_
|
|
266
266
|
|
|
267
267
|
## `heroku data:enhanced-certificates:status [ADDON]`
|
|
268
268
|
|
|
@@ -280,7 +280,7 @@ DESCRIPTION
|
|
|
280
280
|
Read more about this feature at https://devcenter.heroku.com/articles/heroku-data-enhanced-certificates
|
|
281
281
|
```
|
|
282
282
|
|
|
283
|
-
_See code: [src/commands/data/enhanced-certificates/status.ts](https://github.com/heroku/heroku-cli-plugin-data/blob/v1.
|
|
283
|
+
_See code: [src/commands/data/enhanced-certificates/status.ts](https://github.com/heroku/heroku-cli-plugin-data/blob/v1.3.0/src/commands/data/enhanced-certificates/status.ts)_
|
|
284
284
|
|
|
285
285
|
## `heroku data:labs:disable [FEATURE]`
|
|
286
286
|
|
|
@@ -298,7 +298,7 @@ EXAMPLE
|
|
|
298
298
|
$ heroku data:labs:disable wal-compression --addon=happy-postgres-1234 -a example-app
|
|
299
299
|
```
|
|
300
300
|
|
|
301
|
-
_See code: [src/commands/data/labs/disable.ts](https://github.com/heroku/heroku-cli-plugin-data/blob/v1.
|
|
301
|
+
_See code: [src/commands/data/labs/disable.ts](https://github.com/heroku/heroku-cli-plugin-data/blob/v1.3.0/src/commands/data/labs/disable.ts)_
|
|
302
302
|
|
|
303
303
|
## `heroku data:labs:enable [FEATURE]`
|
|
304
304
|
|
|
@@ -316,7 +316,7 @@ EXAMPLE
|
|
|
316
316
|
$ heroku data:labs:enable wal-compression --addon=happy-postgres-1234 -a example-app
|
|
317
317
|
```
|
|
318
318
|
|
|
319
|
-
_See code: [src/commands/data/labs/enable.ts](https://github.com/heroku/heroku-cli-plugin-data/blob/v1.
|
|
319
|
+
_See code: [src/commands/data/labs/enable.ts](https://github.com/heroku/heroku-cli-plugin-data/blob/v1.3.0/src/commands/data/labs/enable.ts)_
|
|
320
320
|
|
|
321
321
|
## `heroku data:labs:list [ADDON]`
|
|
322
322
|
|
|
@@ -333,5 +333,5 @@ EXAMPLE
|
|
|
333
333
|
$ heroku data:labs:list happy-postgres-1234
|
|
334
334
|
```
|
|
335
335
|
|
|
336
|
-
_See code: [src/commands/data/labs/list.ts](https://github.com/heroku/heroku-cli-plugin-data/blob/v1.
|
|
336
|
+
_See code: [src/commands/data/labs/list.ts](https://github.com/heroku/heroku-cli-plugin-data/blob/v1.3.0/src/commands/data/labs/list.ts)_
|
|
337
337
|
<!-- commandsstop -->
|
|
@@ -12,8 +12,8 @@ class ConnectorsCreate extends base_1.default {
|
|
|
12
12
|
const excluded = flags['exclude-column'] || [];
|
|
13
13
|
const platformVersion = flags['platform-version'] || '';
|
|
14
14
|
const name = flags.name || '';
|
|
15
|
-
const kafka = await fetcher_1.fetchAddon(this.heroku, flags.store, flags.app);
|
|
16
|
-
const postgres = await fetcher_1.fetchAddon(this.heroku, flags.source, flags.app);
|
|
15
|
+
const kafka = await (0, fetcher_1.fetchAddon)(this.heroku, flags.store, flags.app);
|
|
16
|
+
const postgres = await (0, fetcher_1.fetchAddon)(this.heroku, flags.source, flags.app);
|
|
17
17
|
cli_ux_1.cli.action.start('Provisioning Data Connector');
|
|
18
18
|
const { body: res } = await this.shogun.post(`/data/cdc/v0/kafka_tenants/${kafka.id}`, Object.assign(Object.assign({}, this.shogun.defaults), { body: {
|
|
19
19
|
postgres_addon_uuid: postgres.id,
|
|
@@ -8,7 +8,7 @@ class ConnectorsDestroy extends base_1.default {
|
|
|
8
8
|
const { args, flags } = this.parse(ConnectorsDestroy);
|
|
9
9
|
const connector = args.connector;
|
|
10
10
|
const confirm = flags.confirm || '';
|
|
11
|
-
await base_1.confirmConnector(connector, confirm);
|
|
11
|
+
await (0, base_1.confirmConnector)(connector, confirm);
|
|
12
12
|
cli_ux_1.cli.action.start('Destroying Data Connector');
|
|
13
13
|
try {
|
|
14
14
|
await this.shogun.delete(`/data/cdc/v0/connectors/${connector}`, this.shogun.defaults);
|
|
@@ -9,7 +9,7 @@ class ConnectorsList extends base_1.default {
|
|
|
9
9
|
const { flags } = this.parse(ConnectorsList);
|
|
10
10
|
let connectorInfo;
|
|
11
11
|
if (flags.addon) {
|
|
12
|
-
const addon = await fetcher_1.fetchAddon(this.heroku, flags.addon, flags.app);
|
|
12
|
+
const addon = await (0, fetcher_1.fetchAddon)(this.heroku, flags.addon, flags.app);
|
|
13
13
|
const { body: response } = await this.shogun.get(`/data/cdc/v0/addons/${addon.id}`, this.shogun.defaults);
|
|
14
14
|
connectorInfo = response;
|
|
15
15
|
}
|
|
@@ -7,7 +7,7 @@ const base_1 = require("../../../lib/base");
|
|
|
7
7
|
class DataEnhancedCertificatesDisable extends base_1.default {
|
|
8
8
|
async run() {
|
|
9
9
|
const { args, flags } = this.parse(DataEnhancedCertificatesDisable);
|
|
10
|
-
const addon = await fetcher_1.fetchAddon(this.heroku, args.addon, flags.app);
|
|
10
|
+
const addon = await (0, fetcher_1.fetchAddon)(this.heroku, args.addon, flags.app);
|
|
11
11
|
cli_ux_1.cli.action.start(`Disabling Enhanced Certificates Beta on ${addon.name}`);
|
|
12
12
|
try {
|
|
13
13
|
await this.shogun.put(`/client/v11/enhanced_certificates/${addon.id}/disable`, Object.assign(Object.assign({}, this.shogun.defaults), { raw: true }));
|
|
@@ -7,7 +7,7 @@ const base_1 = require("../../../lib/base");
|
|
|
7
7
|
class DataEnhancedCertificatesEnable extends base_1.default {
|
|
8
8
|
async run() {
|
|
9
9
|
const { args, flags } = this.parse(DataEnhancedCertificatesEnable);
|
|
10
|
-
const addon = await fetcher_1.fetchAddon(this.heroku, args.addon, flags.app);
|
|
10
|
+
const addon = await (0, fetcher_1.fetchAddon)(this.heroku, args.addon, flags.app);
|
|
11
11
|
cli_ux_1.cli.action.start(`Enabling Enhanced Certificates Beta on ${addon.name}`);
|
|
12
12
|
try {
|
|
13
13
|
await this.shogun.put(`/client/v11/enhanced_certificates/${addon.id}/enable`, Object.assign(Object.assign({}, this.shogun.defaults), { raw: true }));
|
|
@@ -8,7 +8,7 @@ const base_1 = require("../../../lib/base");
|
|
|
8
8
|
class DataEnhancedCertificatesStatus extends base_1.default {
|
|
9
9
|
async run() {
|
|
10
10
|
const { args, flags } = this.parse(DataEnhancedCertificatesStatus);
|
|
11
|
-
const addon = await fetcher_1.fetchAddon(this.heroku, args.addon, flags.app);
|
|
11
|
+
const addon = await (0, fetcher_1.fetchAddon)(this.heroku, args.addon, flags.app);
|
|
12
12
|
const { body: res } = await this.shogun.get(`/client/v11/enhanced_certificates/${addon.id}/status`, this.shogun.defaults);
|
|
13
13
|
if (flags.json) {
|
|
14
14
|
cli_ux_1.default.styledJSON(res);
|
|
@@ -8,7 +8,7 @@ const base_1 = require("../../../lib/base");
|
|
|
8
8
|
class LabsDisable extends base_1.default {
|
|
9
9
|
async run() {
|
|
10
10
|
const { args, flags } = this.parse(LabsDisable);
|
|
11
|
-
const addon = await fetcher_1.fetchAddon(this.heroku, flags.addon, flags.app);
|
|
11
|
+
const addon = await (0, fetcher_1.fetchAddon)(this.heroku, flags.addon, flags.app);
|
|
12
12
|
cli_ux_1.cli.action.start(`Disabling ${args.feature} on ${color_1.default.cyan(addon.name)}...`);
|
|
13
13
|
try {
|
|
14
14
|
await this.shogun.put(`/client/v11/labs/${addon.id}/disable`, Object.assign(Object.assign({}, this.shogun.defaults), { raw: true, body: {
|
|
@@ -8,7 +8,7 @@ const base_1 = require("../../../lib/base");
|
|
|
8
8
|
class LabsEnable extends base_1.default {
|
|
9
9
|
async run() {
|
|
10
10
|
const { args, flags } = this.parse(LabsEnable);
|
|
11
|
-
const addon = await fetcher_1.fetchAddon(this.heroku, flags.addon, flags.app);
|
|
11
|
+
const addon = await (0, fetcher_1.fetchAddon)(this.heroku, flags.addon, flags.app);
|
|
12
12
|
cli_ux_1.cli.action.start(`Enabling ${args.feature} on ${color_1.default.cyan(addon.name)}...`);
|
|
13
13
|
try {
|
|
14
14
|
await this.shogun.put(`/client/v11/labs/${addon.id}/enable`, Object.assign(Object.assign({}, this.shogun.defaults), { raw: true, body: {
|
|
@@ -25,7 +25,7 @@ class LabsList extends base_1.default {
|
|
|
25
25
|
}
|
|
26
26
|
async run() {
|
|
27
27
|
const { args, flags } = this.parse(LabsList);
|
|
28
|
-
const addon = await fetcher_1.fetchAddon(this.heroku, args.addon, flags.app);
|
|
28
|
+
const addon = await (0, fetcher_1.fetchAddon)(this.heroku, args.addon, flags.app);
|
|
29
29
|
try {
|
|
30
30
|
const { body: res } = await this.shogun.get(`/client/v11/labs/${addon.id}/list`, this.shogun.defaults);
|
|
31
31
|
this.printFeatures(res.message, addon.name);
|
package/lib/fetcher.js
CHANGED
package/lib/lib/base.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.confirmConnector = void 0;
|
|
3
4
|
const command_1 = require("@heroku-cli/command");
|
|
4
5
|
const cli_ux_1 = require("cli-ux");
|
|
5
6
|
const color_1 = require("@heroku-cli/color");
|
|
@@ -7,7 +8,7 @@ class Base extends command_1.Command {
|
|
|
7
8
|
constructor(argv, config) {
|
|
8
9
|
super(argv, config);
|
|
9
10
|
const client = new command_1.APIClient(this.config, {});
|
|
10
|
-
client.defaults.host = process.env.HEROKU_DATA_HOST || '
|
|
11
|
+
client.defaults.host = process.env.HEROKU_DATA_HOST || 'api.data.heroku.com';
|
|
11
12
|
client.defaults.headers = Object.assign(Object.assign({}, this.heroku.defaults.headers), { authorization: `Basic ${Buffer.from(':' + this.heroku.auth).toString('base64')}` });
|
|
12
13
|
this.shogun = client;
|
|
13
14
|
}
|