@heroku-cli/plugin-data 2.0.0 → 3.0.1-beta.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 +76 -31
- package/dist/commands/data/connectors/create.d.ts +15 -0
- package/{lib → dist}/commands/data/connectors/create.js +23 -25
- package/dist/commands/data/connectors/destroy.d.ts +12 -0
- package/dist/commands/data/connectors/destroy.js +39 -0
- package/dist/commands/data/connectors/index.d.ts +14 -0
- package/{lib → dist}/commands/data/connectors/index.js +23 -24
- package/dist/commands/data/connectors/info.d.ts +12 -0
- package/{lib → dist}/commands/data/connectors/info.js +22 -23
- package/{lib → dist}/commands/data/connectors/pause.d.ts +2 -2
- package/dist/commands/data/connectors/pause.js +27 -0
- package/{lib → dist}/commands/data/connectors/resume.d.ts +2 -2
- package/dist/commands/data/connectors/resume.js +27 -0
- package/dist/commands/data/connectors/update.d.ts +17 -0
- package/{lib → dist}/commands/data/connectors/update.js +19 -21
- package/{lib → dist}/commands/data/connectors/wait.d.ts +2 -2
- package/{lib → dist}/commands/data/connectors/wait.js +11 -10
- package/dist/commands/data/enhanced-certificates/disable.d.ts +11 -0
- package/dist/commands/data/enhanced-certificates/disable.js +31 -0
- package/dist/commands/data/enhanced-certificates/enable.d.ts +12 -0
- package/dist/commands/data/enhanced-certificates/enable.js +34 -0
- package/dist/commands/data/enhanced-certificates/status.d.ts +12 -0
- package/dist/commands/data/enhanced-certificates/status.js +30 -0
- package/dist/commands/data/labs/disable.d.ts +13 -0
- package/dist/commands/data/labs/disable.js +44 -0
- package/dist/commands/data/labs/enable.d.ts +13 -0
- package/dist/commands/data/labs/enable.js +44 -0
- package/{lib → dist}/commands/data/labs/list.d.ts +3 -3
- package/{lib → dist}/commands/data/labs/list.js +18 -19
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1 -0
- package/dist/lib/base.js +25 -0
- package/oclif.manifest.json +149 -48
- package/package.json +33 -30
- package/lib/commands/data/connectors/create.d.ts +0 -15
- package/lib/commands/data/connectors/destroy.d.ts +0 -12
- package/lib/commands/data/connectors/destroy.js +0 -41
- package/lib/commands/data/connectors/index.d.ts +0 -14
- package/lib/commands/data/connectors/info.d.ts +0 -12
- package/lib/commands/data/connectors/pause.js +0 -28
- package/lib/commands/data/connectors/resume.js +0 -28
- package/lib/commands/data/connectors/update.d.ts +0 -17
- package/lib/commands/data/enhanced-certificates/disable.d.ts +0 -11
- package/lib/commands/data/enhanced-certificates/disable.js +0 -31
- package/lib/commands/data/enhanced-certificates/enable.d.ts +0 -12
- package/lib/commands/data/enhanced-certificates/enable.js +0 -34
- package/lib/commands/data/enhanced-certificates/status.d.ts +0 -12
- package/lib/commands/data/enhanced-certificates/status.js +0 -31
- package/lib/commands/data/labs/disable.d.ts +0 -13
- package/lib/commands/data/labs/disable.js +0 -44
- package/lib/commands/data/labs/enable.d.ts +0 -13
- package/lib/commands/data/labs/enable.js +0 -44
- package/lib/fetcher.d.ts +0 -3
- package/lib/fetcher.js +0 -16
- package/lib/index.d.ts +0 -2
- package/lib/index.js +0 -3
- package/lib/lib/base.js +0 -28
- package/lib/tsconfig.tsbuildinfo +0 -1
- /package/{lib → dist}/lib/base.d.ts +0 -0
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import BaseCommand from '../../../lib/base';
|
|
2
|
-
export default class ConnectorsCreate extends BaseCommand {
|
|
3
|
-
static description: string;
|
|
4
|
-
static examples: string[];
|
|
5
|
-
static flags: {
|
|
6
|
-
app: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
|
|
7
|
-
'exclude-column': import("@oclif/core/lib/interfaces").OptionFlag<string[] | undefined, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
|
|
8
|
-
name: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
|
|
9
|
-
'platform-version': import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
|
|
10
|
-
source: import("@oclif/core/lib/interfaces").OptionFlag<string, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
|
|
11
|
-
store: import("@oclif/core/lib/interfaces").OptionFlag<string, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
|
|
12
|
-
table: import("@oclif/core/lib/interfaces").OptionFlag<string[], import("@oclif/core/lib/interfaces/parser").CustomOptions>;
|
|
13
|
-
};
|
|
14
|
-
run(): Promise<void>;
|
|
15
|
-
}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import BaseCommand from '../../../lib/base';
|
|
2
|
-
export default class ConnectorsDestroy extends BaseCommand {
|
|
3
|
-
static args: {
|
|
4
|
-
connector: import("@oclif/core/lib/interfaces/parser").Arg<string, Record<string, unknown>>;
|
|
5
|
-
};
|
|
6
|
-
static description: string;
|
|
7
|
-
static examples: string[];
|
|
8
|
-
static flags: {
|
|
9
|
-
confirm: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
|
|
10
|
-
};
|
|
11
|
-
run(): Promise<void>;
|
|
12
|
-
}
|
|
@@ -1,41 +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 base_1 = require("../../../lib/base");
|
|
6
|
-
class ConnectorsDestroy extends base_1.default {
|
|
7
|
-
static args = {
|
|
8
|
-
connector: core_1.Args.string({ description: 'name of the connector', required: true }),
|
|
9
|
-
};
|
|
10
|
-
static description = 'Destroy a Data Connector\nRead more about this feature at https://devcenter.heroku.com/articles/heroku-data-connectors';
|
|
11
|
-
static examples = [
|
|
12
|
-
'$ heroku data:connectors:destroy gentle-connector-1234',
|
|
13
|
-
'$ heroku data:connectors:destroy gentle-connector-1234 --confirm gentle-connector-1234',
|
|
14
|
-
];
|
|
15
|
-
static flags = {
|
|
16
|
-
confirm: command_1.flags.string({
|
|
17
|
-
description: 'confirms destroying the connector if passed in',
|
|
18
|
-
required: false,
|
|
19
|
-
}),
|
|
20
|
-
};
|
|
21
|
-
async run() {
|
|
22
|
-
const { args, flags } = await this.parse(ConnectorsDestroy);
|
|
23
|
-
const { connector } = args;
|
|
24
|
-
const confirm = flags.confirm || '';
|
|
25
|
-
await (0, base_1.confirmConnector)(connector, confirm);
|
|
26
|
-
core_1.ux.action.start('Destroying Data Connector');
|
|
27
|
-
try {
|
|
28
|
-
await this.shogun.delete(`/data/cdc/v0/connectors/${connector}`, this.shogun.defaults);
|
|
29
|
-
core_1.ux.log(`Data Connector ${connector} deleted successfully.`);
|
|
30
|
-
core_1.ux.log('Note: We do not delete your Kafka topics automatically, because they could still contain messages which you haven\'t consumed. Please delete the topics manually. See heroku kafka:topics:destroy --help');
|
|
31
|
-
}
|
|
32
|
-
catch (error) {
|
|
33
|
-
core_1.ux.warn('There was an issue deleting your Data Connector.');
|
|
34
|
-
throw error;
|
|
35
|
-
}
|
|
36
|
-
finally {
|
|
37
|
-
core_1.ux.action.stop();
|
|
38
|
-
}
|
|
39
|
-
}
|
|
40
|
-
}
|
|
41
|
-
exports.default = ConnectorsDestroy;
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import BaseCommand from '../../../lib/base';
|
|
2
|
-
export default class ConnectorsList extends BaseCommand {
|
|
3
|
-
static aliases: string[];
|
|
4
|
-
static description: string;
|
|
5
|
-
static examples: string[];
|
|
6
|
-
static flags: {
|
|
7
|
-
addon: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
|
|
8
|
-
app: 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
|
-
remote: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
|
|
11
|
-
table: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
12
|
-
};
|
|
13
|
-
run(): Promise<void>;
|
|
14
|
-
}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import BaseCommand from '../../../lib/base';
|
|
2
|
-
export default class ConnectorsInfo extends BaseCommand {
|
|
3
|
-
static args: {
|
|
4
|
-
connector: import("@oclif/core/lib/interfaces/parser").Arg<string, Record<string, unknown>>;
|
|
5
|
-
};
|
|
6
|
-
static description: string;
|
|
7
|
-
static examples: string[];
|
|
8
|
-
static flags: {
|
|
9
|
-
json: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
10
|
-
};
|
|
11
|
-
run(): Promise<void>;
|
|
12
|
-
}
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const core_1 = require("@oclif/core");
|
|
4
|
-
const base_1 = require("../../../lib/base");
|
|
5
|
-
class ConnectorsPause extends base_1.default {
|
|
6
|
-
static args = {
|
|
7
|
-
connector: core_1.Args.string({ description: 'name of the connector', required: true }),
|
|
8
|
-
};
|
|
9
|
-
static description = 'Pause change event creation on a Data Connector\nRead more about this feature at https://devcenter.heroku.com/articles/heroku-data-connectors';
|
|
10
|
-
static examples = [
|
|
11
|
-
'$ heroku data:connectors:pause gentle-connector-1234',
|
|
12
|
-
];
|
|
13
|
-
async run() {
|
|
14
|
-
const { args } = await this.parse(ConnectorsPause);
|
|
15
|
-
core_1.ux.action.start(`Pausing Data Connector ${args.connector}`);
|
|
16
|
-
try {
|
|
17
|
-
await this.shogun.put(`/data/cdc/v0/connectors/${args.connector}/pause`, {
|
|
18
|
-
...this.shogun.defaults,
|
|
19
|
-
raw: true,
|
|
20
|
-
});
|
|
21
|
-
}
|
|
22
|
-
catch (error) {
|
|
23
|
-
core_1.ux.error(error);
|
|
24
|
-
}
|
|
25
|
-
core_1.ux.action.stop();
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
exports.default = ConnectorsPause;
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const core_1 = require("@oclif/core");
|
|
4
|
-
const base_1 = require("../../../lib/base");
|
|
5
|
-
class ConnectorsResume extends base_1.default {
|
|
6
|
-
static args = {
|
|
7
|
-
connector: core_1.Args.string({ description: 'name of the connector', required: true }),
|
|
8
|
-
};
|
|
9
|
-
static description = 'Resume change event creation on a Data Connector\nRead more about this feature at https://devcenter.heroku.com/articles/heroku-data-connectors';
|
|
10
|
-
static examples = [
|
|
11
|
-
'$ heroku data:connectors:resume gentle-connector-1234',
|
|
12
|
-
];
|
|
13
|
-
async run() {
|
|
14
|
-
const { args } = await this.parse(ConnectorsResume);
|
|
15
|
-
core_1.ux.action.start(`Resuming Data Connector ${args.connector}`);
|
|
16
|
-
try {
|
|
17
|
-
await this.shogun.put(`/data/cdc/v0/connectors/${args.connector}/resume`, {
|
|
18
|
-
...this.shogun.defaults,
|
|
19
|
-
raw: true,
|
|
20
|
-
});
|
|
21
|
-
}
|
|
22
|
-
catch (error) {
|
|
23
|
-
core_1.ux.error(error);
|
|
24
|
-
}
|
|
25
|
-
core_1.ux.action.stop();
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
exports.default = ConnectorsResume;
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import BaseCommand from '../../../lib/base';
|
|
2
|
-
export default class ConnectorsUpdate extends BaseCommand {
|
|
3
|
-
static args: {
|
|
4
|
-
connector: import("@oclif/core/lib/interfaces/parser").Arg<string, Record<string, unknown>>;
|
|
5
|
-
};
|
|
6
|
-
static description: string;
|
|
7
|
-
static examples: string[];
|
|
8
|
-
static flags: {
|
|
9
|
-
setting: import("@oclif/core/lib/interfaces").OptionFlag<string[] | undefined, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
|
|
10
|
-
'add-table': import("@oclif/core/lib/interfaces").OptionFlag<string[] | undefined, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
|
|
11
|
-
'remove-table': import("@oclif/core/lib/interfaces").OptionFlag<string[] | undefined, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
|
|
12
|
-
'exclude-column': import("@oclif/core/lib/interfaces").OptionFlag<string[] | undefined, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
|
|
13
|
-
'remove-excluded-column': import("@oclif/core/lib/interfaces").OptionFlag<string[] | undefined, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
|
|
14
|
-
};
|
|
15
|
-
run(): Promise<void>;
|
|
16
|
-
private parseSettings;
|
|
17
|
-
}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import BaseCommand from '../../../lib/base';
|
|
2
|
-
export default class DataEnhancedCertificatesDisable extends BaseCommand {
|
|
3
|
-
static args: {
|
|
4
|
-
addon: import("@oclif/core/lib/interfaces/parser").Arg<string, Record<string, unknown>>;
|
|
5
|
-
};
|
|
6
|
-
static description: string;
|
|
7
|
-
static flags: {
|
|
8
|
-
app: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
|
|
9
|
-
};
|
|
10
|
-
run(): Promise<void>;
|
|
11
|
-
}
|
|
@@ -1,31 +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 fetcher_1 = require("../../../fetcher");
|
|
6
|
-
const base_1 = require("../../../lib/base");
|
|
7
|
-
class DataEnhancedCertificatesDisable extends base_1.default {
|
|
8
|
-
static args = {
|
|
9
|
-
addon: core_1.Args.string({ description: 'name of the addon', required: true }),
|
|
10
|
-
};
|
|
11
|
-
static description = 'Disable enhanced certificates on an Addon\nRead more about this feature at https://devcenter.heroku.com/articles/heroku-data-enhanced-certificates';
|
|
12
|
-
static flags = {
|
|
13
|
-
app: command_1.flags.app(),
|
|
14
|
-
};
|
|
15
|
-
async run() {
|
|
16
|
-
const { args, flags } = await this.parse(DataEnhancedCertificatesDisable);
|
|
17
|
-
const addon = await (0, fetcher_1.fetchAddon)(this.heroku, args.addon, flags.app);
|
|
18
|
-
core_1.ux.action.start(`Disabling Enhanced Certificates Beta on ${addon.name}`);
|
|
19
|
-
try {
|
|
20
|
-
await this.shogun.put(`/client/v11/enhanced_certificates/${addon.id}/disable`, {
|
|
21
|
-
...this.shogun.defaults,
|
|
22
|
-
raw: true,
|
|
23
|
-
});
|
|
24
|
-
}
|
|
25
|
-
catch (error) {
|
|
26
|
-
core_1.ux.error(error);
|
|
27
|
-
}
|
|
28
|
-
core_1.ux.action.stop();
|
|
29
|
-
}
|
|
30
|
-
}
|
|
31
|
-
exports.default = DataEnhancedCertificatesDisable;
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import BaseCommand from '../../../lib/base';
|
|
2
|
-
export default class DataEnhancedCertificatesEnable extends BaseCommand {
|
|
3
|
-
static args: {
|
|
4
|
-
addon: import("@oclif/core/lib/interfaces/parser").Arg<string, Record<string, unknown>>;
|
|
5
|
-
};
|
|
6
|
-
static description: string;
|
|
7
|
-
static examples: string[];
|
|
8
|
-
static flags: {
|
|
9
|
-
app: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
|
|
10
|
-
};
|
|
11
|
-
run(): Promise<void>;
|
|
12
|
-
}
|
|
@@ -1,34 +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 fetcher_1 = require("../../../fetcher");
|
|
6
|
-
const base_1 = require("../../../lib/base");
|
|
7
|
-
class DataEnhancedCertificatesEnable extends base_1.default {
|
|
8
|
-
static args = {
|
|
9
|
-
addon: core_1.Args.string({ description: 'name of the addon', required: true }),
|
|
10
|
-
};
|
|
11
|
-
static description = 'Enable enhanced certificates on an Addon\nRead more about this feature at https://devcenter.heroku.com/articles/heroku-data-enhanced-certificates';
|
|
12
|
-
static examples = [
|
|
13
|
-
'$ heroku data:enhanced-certificates:enable happy-postgres-1234 -a example-app',
|
|
14
|
-
];
|
|
15
|
-
static flags = {
|
|
16
|
-
app: command_1.flags.app(),
|
|
17
|
-
};
|
|
18
|
-
async run() {
|
|
19
|
-
const { args, flags } = await this.parse(DataEnhancedCertificatesEnable);
|
|
20
|
-
const addon = await (0, fetcher_1.fetchAddon)(this.heroku, args.addon, flags.app);
|
|
21
|
-
core_1.ux.action.start(`Enabling Enhanced Certificates Beta on ${addon.name}`);
|
|
22
|
-
try {
|
|
23
|
-
await this.shogun.put(`/client/v11/enhanced_certificates/${addon.id}/enable`, {
|
|
24
|
-
...this.shogun.defaults,
|
|
25
|
-
raw: true,
|
|
26
|
-
});
|
|
27
|
-
}
|
|
28
|
-
catch (error) {
|
|
29
|
-
core_1.ux.error(error);
|
|
30
|
-
}
|
|
31
|
-
core_1.ux.action.stop();
|
|
32
|
-
}
|
|
33
|
-
}
|
|
34
|
-
exports.default = DataEnhancedCertificatesEnable;
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import BaseCommand from '../../../lib/base';
|
|
2
|
-
export default class DataEnhancedCertificatesStatus extends BaseCommand {
|
|
3
|
-
static args: {
|
|
4
|
-
addon: import("@oclif/core/lib/interfaces/parser").Arg<string, Record<string, unknown>>;
|
|
5
|
-
};
|
|
6
|
-
static description: string;
|
|
7
|
-
static flags: {
|
|
8
|
-
app: 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
|
-
run(): Promise<void>;
|
|
12
|
-
}
|
|
@@ -1,31 +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 fetcher_1 = require("../../../fetcher");
|
|
7
|
-
const base_1 = require("../../../lib/base");
|
|
8
|
-
class DataEnhancedCertificatesStatus extends base_1.default {
|
|
9
|
-
static args = {
|
|
10
|
-
addon: core_1.Args.string({ description: 'name of the addon', required: true }),
|
|
11
|
-
};
|
|
12
|
-
static description = 'Get the status of Enhanced Certificates\nRead more about this feature at https://devcenter.heroku.com/articles/heroku-data-enhanced-certificates';
|
|
13
|
-
static flags = {
|
|
14
|
-
app: command_1.flags.app(),
|
|
15
|
-
json: command_1.flags.boolean({ description: 'Return the results as JSON' }),
|
|
16
|
-
};
|
|
17
|
-
async run() {
|
|
18
|
-
const { args, flags } = await this.parse(DataEnhancedCertificatesStatus);
|
|
19
|
-
const addon = await (0, fetcher_1.fetchAddon)(this.heroku, args.addon, flags.app);
|
|
20
|
-
const { body: res } = await this.shogun.get(`/client/v11/enhanced_certificates/${addon.id}/status`, this.shogun.defaults);
|
|
21
|
-
if (flags.json) {
|
|
22
|
-
core_1.ux.styledJSON(res);
|
|
23
|
-
return;
|
|
24
|
-
}
|
|
25
|
-
core_1.ux.styledHeader(`Enhanced Certificates for ${color_1.default.cyan(addon.name)}.`);
|
|
26
|
-
core_1.ux.styledObject({
|
|
27
|
-
Status: res.status,
|
|
28
|
-
});
|
|
29
|
-
}
|
|
30
|
-
}
|
|
31
|
-
exports.default = DataEnhancedCertificatesStatus;
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import BaseCommand from '../../../lib/base';
|
|
2
|
-
export default class LabsDisable extends BaseCommand {
|
|
3
|
-
static args: {
|
|
4
|
-
feature: import("@oclif/core/lib/interfaces/parser").Arg<string, Record<string, unknown>>;
|
|
5
|
-
};
|
|
6
|
-
static description: string;
|
|
7
|
-
static examples: string[];
|
|
8
|
-
static flags: {
|
|
9
|
-
addon: import("@oclif/core/lib/interfaces").OptionFlag<string, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
|
|
10
|
-
app: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
|
|
11
|
-
};
|
|
12
|
-
run(): Promise<void>;
|
|
13
|
-
}
|
|
@@ -1,44 +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 fetcher_1 = require("../../../fetcher");
|
|
7
|
-
const base_1 = require("../../../lib/base");
|
|
8
|
-
class LabsDisable extends base_1.default {
|
|
9
|
-
static args = {
|
|
10
|
-
feature: core_1.Args.string({ description: 'name of the feature', required: true }),
|
|
11
|
-
};
|
|
12
|
-
static description = 'Disable experimental features on an addon';
|
|
13
|
-
static examples = [
|
|
14
|
-
'$ heroku data:labs:disable wal-compression --addon=happy-postgres-1234 -a example-app',
|
|
15
|
-
];
|
|
16
|
-
static flags = {
|
|
17
|
-
addon: command_1.flags.string({
|
|
18
|
-
description: 'The addon you want to disable features on',
|
|
19
|
-
required: true,
|
|
20
|
-
}),
|
|
21
|
-
app: command_1.flags.app(),
|
|
22
|
-
};
|
|
23
|
-
async run() {
|
|
24
|
-
const { args, flags } = await this.parse(LabsDisable);
|
|
25
|
-
const addon = await (0, fetcher_1.fetchAddon)(this.heroku, flags.addon, flags.app);
|
|
26
|
-
core_1.ux.action.start(`Disabling ${args.feature} on ${color_1.default.cyan(addon.name)}...`);
|
|
27
|
-
try {
|
|
28
|
-
await this.shogun.put(`/client/v11/labs/${addon.id}/disable`, {
|
|
29
|
-
...this.shogun.defaults,
|
|
30
|
-
body: {
|
|
31
|
-
feature: args.feature,
|
|
32
|
-
},
|
|
33
|
-
raw: true,
|
|
34
|
-
});
|
|
35
|
-
}
|
|
36
|
-
catch (error) {
|
|
37
|
-
core_1.ux.error(error);
|
|
38
|
-
}
|
|
39
|
-
finally {
|
|
40
|
-
core_1.ux.action.stop();
|
|
41
|
-
}
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
exports.default = LabsDisable;
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import BaseCommand from '../../../lib/base';
|
|
2
|
-
export default class LabsEnable extends BaseCommand {
|
|
3
|
-
static args: {
|
|
4
|
-
feature: import("@oclif/core/lib/interfaces/parser").Arg<string, Record<string, unknown>>;
|
|
5
|
-
};
|
|
6
|
-
static description: string;
|
|
7
|
-
static examples: string[];
|
|
8
|
-
static flags: {
|
|
9
|
-
addon: import("@oclif/core/lib/interfaces").OptionFlag<string, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
|
|
10
|
-
app: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
|
|
11
|
-
};
|
|
12
|
-
run(): Promise<void>;
|
|
13
|
-
}
|
|
@@ -1,44 +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 fetcher_1 = require("../../../fetcher");
|
|
7
|
-
const base_1 = require("../../../lib/base");
|
|
8
|
-
class LabsEnable extends base_1.default {
|
|
9
|
-
static args = {
|
|
10
|
-
feature: core_1.Args.string({ description: 'name of the feature', required: true }),
|
|
11
|
-
};
|
|
12
|
-
static description = 'Enable experimental features on an addon';
|
|
13
|
-
static examples = [
|
|
14
|
-
'$ heroku data:labs:enable wal-compression --addon=happy-postgres-1234 -a example-app',
|
|
15
|
-
];
|
|
16
|
-
static flags = {
|
|
17
|
-
addon: command_1.flags.string({
|
|
18
|
-
description: 'The addon you want to enable features on',
|
|
19
|
-
required: true,
|
|
20
|
-
}),
|
|
21
|
-
app: command_1.flags.app(),
|
|
22
|
-
};
|
|
23
|
-
async run() {
|
|
24
|
-
const { args, flags } = await this.parse(LabsEnable);
|
|
25
|
-
const addon = await (0, fetcher_1.fetchAddon)(this.heroku, flags.addon, flags.app);
|
|
26
|
-
core_1.ux.action.start(`Enabling ${args.feature} on ${color_1.default.cyan(addon.name)}...`);
|
|
27
|
-
try {
|
|
28
|
-
await this.shogun.put(`/client/v11/labs/${addon.id}/enable`, {
|
|
29
|
-
...this.shogun.defaults,
|
|
30
|
-
body: {
|
|
31
|
-
feature: args.feature,
|
|
32
|
-
},
|
|
33
|
-
raw: true,
|
|
34
|
-
});
|
|
35
|
-
}
|
|
36
|
-
catch (error) {
|
|
37
|
-
core_1.ux.error(error);
|
|
38
|
-
}
|
|
39
|
-
finally {
|
|
40
|
-
core_1.ux.action.stop();
|
|
41
|
-
}
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
exports.default = LabsEnable;
|
package/lib/fetcher.d.ts
DELETED
package/lib/fetcher.js
DELETED
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.fetchAddon = fetchAddon;
|
|
4
|
-
async function fetchAddon(heroku, addon, app) {
|
|
5
|
-
const { body: result } = await heroku.post('/actions/addons/resolve', {
|
|
6
|
-
body: {
|
|
7
|
-
addon,
|
|
8
|
-
app,
|
|
9
|
-
},
|
|
10
|
-
});
|
|
11
|
-
if (result.length > 1) {
|
|
12
|
-
const error = app === undefined ? new Error('Unable to determine addon, try including an app') : new Error('Unable to determine addon');
|
|
13
|
-
throw error;
|
|
14
|
-
}
|
|
15
|
-
return result[0];
|
|
16
|
-
}
|
package/lib/index.d.ts
DELETED
package/lib/index.js
DELETED
package/lib/lib/base.js
DELETED
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.confirmConnector = confirmConnector;
|
|
4
|
-
const color_1 = require("@heroku-cli/color");
|
|
5
|
-
const command_1 = require("@heroku-cli/command");
|
|
6
|
-
const core_1 = require("@oclif/core");
|
|
7
|
-
class Base extends command_1.Command {
|
|
8
|
-
shogun;
|
|
9
|
-
constructor(argv, config) {
|
|
10
|
-
super(argv, config);
|
|
11
|
-
const client = new command_1.APIClient(this.config, {});
|
|
12
|
-
client.defaults.host = process.env.HEROKU_DATA_HOST || 'api.data.heroku.com';
|
|
13
|
-
client.defaults.headers = {
|
|
14
|
-
...this.heroku.defaults.headers,
|
|
15
|
-
authorization: `Basic ${Buffer.from(':' + this.heroku.auth).toString('base64')}`,
|
|
16
|
-
};
|
|
17
|
-
this.shogun = client;
|
|
18
|
-
}
|
|
19
|
-
}
|
|
20
|
-
exports.default = Base;
|
|
21
|
-
async function confirmConnector(connector, confirm) {
|
|
22
|
-
if (!confirm) {
|
|
23
|
-
confirm = await core_1.ux.prompt(`To proceed, type ${color_1.default.bold.red(connector)} or re-run this command with ${color_1.default.bold.red('--confirm', connector)}`);
|
|
24
|
-
}
|
|
25
|
-
if (confirm !== connector) {
|
|
26
|
-
core_1.ux.error(`Confirmation ${color_1.default.bold.red(confirm)} did not match ${color_1.default.bold.red(connector)}. Aborted.`);
|
|
27
|
-
}
|
|
28
|
-
}
|
package/lib/tsconfig.tsbuildinfo
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"root":["../src/fetcher.ts","../src/index.ts","../src/commands/data/connectors/create.ts","../src/commands/data/connectors/destroy.ts","../src/commands/data/connectors/index.ts","../src/commands/data/connectors/info.ts","../src/commands/data/connectors/pause.ts","../src/commands/data/connectors/resume.ts","../src/commands/data/connectors/update.ts","../src/commands/data/connectors/wait.ts","../src/commands/data/enhanced-certificates/disable.ts","../src/commands/data/enhanced-certificates/enable.ts","../src/commands/data/enhanced-certificates/status.ts","../src/commands/data/labs/disable.ts","../src/commands/data/labs/enable.ts","../src/commands/data/labs/list.ts","../src/lib/base.ts"],"version":"5.8.2"}
|
|
File without changes
|