@contrail/cli 2.2.8 → 2.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 +135 -367
- package/dist/api/apps.js +1 -2
- package/dist/auth/auth.js +1 -0
- package/dist/basecommand.js +16 -19
- package/dist/commands/app/create.js +5 -5
- package/dist/commands/app/delete.js +7 -7
- package/dist/commands/app/getApiKey.js +8 -8
- package/dist/commands/app/init.js +5 -5
- package/dist/commands/app/install.js +24 -24
- package/dist/commands/app/publish.js +24 -24
- package/dist/commands/app/uninstall.js +14 -14
- package/dist/commands/app/upgrade.js +19 -19
- package/dist/commands/app/version/major.js +6 -9
- package/dist/commands/app/version/minor.js +6 -9
- package/dist/commands/app/version/patch.js +6 -9
- package/dist/commands/colors/deleteAll.js +5 -5
- package/dist/commands/colors/load.js +5 -5
- package/dist/commands/config/environments/list.js +6 -9
- package/dist/commands/config/environments/remove.js +12 -15
- package/dist/commands/config/environments/set.js +11 -14
- package/dist/commands/config/list.js +6 -9
- package/dist/commands/config/remove.js +16 -19
- package/dist/commands/config/set.js +22 -25
- package/dist/commands/groups/export.js +21 -22
- package/dist/commands/groups/upload.js +10 -11
- package/dist/commands/instance/export.js +19 -19
- package/dist/commands/instance/import.js +13 -13
- package/dist/commands/loader-process/load.js +12 -12
- package/dist/commands/loader-process/upload-and-load.js +17 -17
- package/dist/commands/projects/export.js +9 -9
- package/dist/commands/projects/list.js +5 -5
- package/dist/commands/projects/load.js +16 -17
- package/dist/commands/types/exportOptionSetHierarchies.js +5 -5
- package/dist/commands/types/getAll.js +73 -72
- package/dist/commands/types/loadAll.js +13 -13
- package/dist/commands/types/mergeOptionSets.js +9 -10
- package/dist/commands/types/mergeTypeProperties.js +11 -11
- package/dist/commands/types/parseOptionSetsHierarchyLocalFile.js +9 -9
- package/dist/commands/types/parseOptionSetsHierarchyValuesToKeysLocalFile.js +9 -9
- package/dist/commands/types/parseOptionSetsLocalFiles.d.ts +21 -0
- package/dist/commands/types/parseOptionSetsLocalFiles.js +95 -17
- package/dist/commands/types/parseOptionSetsToFolderStructure.d.ts +0 -1
- package/dist/commands/types/parseOptionSetsToFolderStructure.js +5 -41
- package/dist/commands/types/parseTypesFromFiles.js +13 -13
- package/dist/commands/types/parseTypesFromLocalFiles.js +10 -10
- package/dist/commands/types/parseTypesFromTemplateAndDataFromLocalFiles.js +10 -10
- package/dist/commands/types/parseTypesFromTemplateFromLocalFiles.js +9 -9
- package/dist/commands/types/uploadOptionSetHierarchies.js +15 -16
- package/dist/commands/types/uploadOptionSets.js +15 -13
- package/dist/commands/types/uploadOptionSetsHierarchyLocalFile.js +13 -13
- package/dist/commands/types/uploadRuleSets.js +13 -13
- package/dist/commands/types/uploadTypePolicies.js +16 -16
- package/dist/commands/types/uploadTypePropertyPolicies.js +16 -16
- package/dist/commands/types/uploadTypes.js +13 -13
- package/dist/commands/types/uploadUsageInfo.js +13 -13
- package/dist/commands/users/export.js +19 -20
- package/dist/commands/users/upload.js +8 -8
- package/dist/commands/webhooks/create.js +5 -5
- package/dist/commands/webhooks/delete.js +11 -11
- package/dist/commands/webhooks/getWebhookTrigger.js +5 -5
- package/dist/commands/webhooks/list.js +11 -11
- package/dist/commands/workflow-template-definitions/install.js +5 -5
- package/dist/commands/workflow-template-definitions/list.js +5 -5
- package/dist/commands/workflow-templates/delete.js +5 -5
- package/dist/commands/workflow-templates/export.js +19 -20
- package/dist/commands/workflow-templates/list.js +5 -5
- package/dist/commands/workflow-templates/load.js +11 -11
- package/dist/helpers/app/actions-deployer.js +4 -4
- package/dist/helpers/app/app-deployer.js +9 -9
- package/dist/helpers/app/app-template-parsers.js +1 -1
- package/dist/helpers/app/extensions-deployer.js +5 -6
- package/dist/helpers/app/load-app-config.js +1 -1
- package/dist/helpers/loader-process/helpers.js +3 -3
- package/dist/helpers/projects/helpers.js +5 -5
- package/dist/helpers/types/type-parser.js +8 -8
- package/dist/helpers/types/type-uploader.js +19 -20
- package/dist/helpers/workflow-template-definitions/workflow-template-definition-deployer.js +3 -4
- package/dist/helpers/workflow-templates/helper.js +11 -16
- package/dist/interface-converters.js +1 -2
- package/dist/interfaces.js +79 -0
- package/dist/logger.js +7 -6
- package/oclif.manifest.json +60 -1422
- package/package.json +1 -1
package/dist/api/apps.js
CHANGED
|
@@ -56,8 +56,7 @@ async function installAppToOrg(app, configProperties) {
|
|
|
56
56
|
}
|
|
57
57
|
exports.installAppToOrg = installAppToOrg;
|
|
58
58
|
async function getAvailableApps(options) {
|
|
59
|
-
|
|
60
|
-
const orgId = (_a = options === null || options === void 0 ? void 0 : options.orgId) !== null && _a !== void 0 ? _a : auth_1.Auth.config.orgId;
|
|
59
|
+
const orgId = options?.orgId ?? auth_1.Auth.config.orgId;
|
|
61
60
|
const apps = [];
|
|
62
61
|
apps.push(...(await new sdk_1.Entities().get({
|
|
63
62
|
entityName: 'app',
|
package/dist/auth/auth.js
CHANGED
package/dist/basecommand.js
CHANGED
|
@@ -9,10 +9,22 @@ const config_1 = require("./helpers/config/config");
|
|
|
9
9
|
const auth_1 = require("@contrail/sdk/lib/auth/auth");
|
|
10
10
|
const lodash_1 = tslib_1.__importDefault(require("lodash"));
|
|
11
11
|
class BaseCommand extends core_1.Command {
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
12
|
+
static description = 'Global Flags';
|
|
13
|
+
skipConfirmEnv = false;
|
|
14
|
+
static baseFlags = {
|
|
15
|
+
logLevel: core_1.Flags.string({
|
|
16
|
+
description: 'The Log Level',
|
|
17
|
+
required: false,
|
|
18
|
+
char: 'l',
|
|
19
|
+
options: ['error', 'warn', 'info', 'debug'],
|
|
20
|
+
}),
|
|
21
|
+
alwaysConfirmEnv: core_1.Flags.boolean({
|
|
22
|
+
description: 'The Environment variables',
|
|
23
|
+
required: false,
|
|
24
|
+
char: 'e',
|
|
25
|
+
default: true,
|
|
26
|
+
}),
|
|
27
|
+
};
|
|
16
28
|
async init() {
|
|
17
29
|
await super.init();
|
|
18
30
|
const { flags } = await this.parse({
|
|
@@ -63,18 +75,3 @@ class BaseCommand extends core_1.Command {
|
|
|
63
75
|
}
|
|
64
76
|
}
|
|
65
77
|
exports.BaseCommand = BaseCommand;
|
|
66
|
-
BaseCommand.description = 'Global Flags';
|
|
67
|
-
BaseCommand.baseFlags = {
|
|
68
|
-
logLevel: core_1.Flags.string({
|
|
69
|
-
description: 'The Log Level',
|
|
70
|
-
required: false,
|
|
71
|
-
char: 'l',
|
|
72
|
-
options: ['error', 'warn', 'info', 'debug'],
|
|
73
|
-
}),
|
|
74
|
-
alwaysConfirmEnv: core_1.Flags.boolean({
|
|
75
|
-
description: 'The Environment variables',
|
|
76
|
-
required: false,
|
|
77
|
-
char: 'e',
|
|
78
|
-
default: true,
|
|
79
|
-
}),
|
|
80
|
-
};
|
|
@@ -8,6 +8,11 @@ const basecommand_1 = require("../../basecommand");
|
|
|
8
8
|
const setup_template_1 = require("../../helpers/app/setup-template");
|
|
9
9
|
const logger_1 = tslib_1.__importDefault(require("../../logger"));
|
|
10
10
|
class CreateApp extends basecommand_1.BaseCommand {
|
|
11
|
+
static description = 'Create an app from a template';
|
|
12
|
+
static examples = [
|
|
13
|
+
`$ contrail app create
|
|
14
|
+
`,
|
|
15
|
+
];
|
|
11
16
|
async run() {
|
|
12
17
|
await (0, login_1.authUser)();
|
|
13
18
|
const currentUser = await (0, login_1.getCurrentUser)();
|
|
@@ -75,8 +80,3 @@ class CreateApp extends basecommand_1.BaseCommand {
|
|
|
75
80
|
}
|
|
76
81
|
}
|
|
77
82
|
exports.default = CreateApp;
|
|
78
|
-
CreateApp.description = 'Create an app from a template';
|
|
79
|
-
CreateApp.examples = [
|
|
80
|
-
`$ contrail app create
|
|
81
|
-
`,
|
|
82
|
-
];
|
|
@@ -7,6 +7,13 @@ const app_deployer_1 = require("../../helpers/app/app-deployer");
|
|
|
7
7
|
const basecommand_1 = require("../../basecommand");
|
|
8
8
|
const logger_1 = tslib_1.__importDefault(require("../../logger"));
|
|
9
9
|
class DeleteApp extends basecommand_1.BaseCommand {
|
|
10
|
+
static description = 'Delete the app from the app marketplace';
|
|
11
|
+
static examples = [
|
|
12
|
+
`$ contrail app delete
|
|
13
|
+
`,
|
|
14
|
+
];
|
|
15
|
+
// variable argument length
|
|
16
|
+
static strict = true;
|
|
10
17
|
async run() {
|
|
11
18
|
let appDeclaration;
|
|
12
19
|
try {
|
|
@@ -29,10 +36,3 @@ class DeleteApp extends basecommand_1.BaseCommand {
|
|
|
29
36
|
}
|
|
30
37
|
}
|
|
31
38
|
exports.default = DeleteApp;
|
|
32
|
-
DeleteApp.description = 'Delete the app from the app marketplace';
|
|
33
|
-
DeleteApp.examples = [
|
|
34
|
-
`$ contrail app delete
|
|
35
|
-
`,
|
|
36
|
-
];
|
|
37
|
-
// variable argument length
|
|
38
|
-
DeleteApp.strict = true;
|
|
@@ -8,6 +8,14 @@ const login_1 = require("../../auth/login");
|
|
|
8
8
|
const basecommand_1 = require("../../basecommand");
|
|
9
9
|
const logger_1 = tslib_1.__importDefault(require("../../logger"));
|
|
10
10
|
class GetAPIKeyApp extends basecommand_1.BaseCommand {
|
|
11
|
+
static description = 'Get an api key for an app';
|
|
12
|
+
static examples = [
|
|
13
|
+
`$ contrail app getApiKey
|
|
14
|
+
`,
|
|
15
|
+
];
|
|
16
|
+
static flags = {
|
|
17
|
+
appIdentifier: core_1.Flags.string({ char: 'a', description: 'The app identifier', required: false }),
|
|
18
|
+
};
|
|
11
19
|
async run() {
|
|
12
20
|
const { flags } = await this.parse(GetAPIKeyApp);
|
|
13
21
|
await (0, login_1.authUser)();
|
|
@@ -40,11 +48,3 @@ class GetAPIKeyApp extends basecommand_1.BaseCommand {
|
|
|
40
48
|
}
|
|
41
49
|
}
|
|
42
50
|
exports.default = GetAPIKeyApp;
|
|
43
|
-
GetAPIKeyApp.description = 'Get an api key for an app';
|
|
44
|
-
GetAPIKeyApp.examples = [
|
|
45
|
-
`$ contrail app getApiKey
|
|
46
|
-
`,
|
|
47
|
-
];
|
|
48
|
-
GetAPIKeyApp.flags = {
|
|
49
|
-
appIdentifier: core_1.Flags.string({ char: 'a', description: 'The app identifier', required: false }),
|
|
50
|
-
};
|
|
@@ -6,6 +6,11 @@ const login_1 = require("../../auth/login");
|
|
|
6
6
|
const basecommand_1 = require("../../basecommand");
|
|
7
7
|
const setup_template_1 = require("../../helpers/app/setup-template");
|
|
8
8
|
class CreateApp extends basecommand_1.BaseCommand {
|
|
9
|
+
static description = 'Create an app from a template';
|
|
10
|
+
static examples = [
|
|
11
|
+
`$ contrail app init
|
|
12
|
+
`,
|
|
13
|
+
];
|
|
9
14
|
async run() {
|
|
10
15
|
await (0, login_1.authUser)();
|
|
11
16
|
const currentUser = await (0, login_1.getCurrentUser)();
|
|
@@ -56,8 +61,3 @@ class CreateApp extends basecommand_1.BaseCommand {
|
|
|
56
61
|
}
|
|
57
62
|
}
|
|
58
63
|
exports.default = CreateApp;
|
|
59
|
-
CreateApp.description = 'Create an app from a template';
|
|
60
|
-
CreateApp.examples = [
|
|
61
|
-
`$ contrail app init
|
|
62
|
-
`,
|
|
63
|
-
];
|
|
@@ -12,6 +12,30 @@ const basecommand_1 = require("../../basecommand");
|
|
|
12
12
|
const logger_1 = tslib_1.__importDefault(require("../../logger"));
|
|
13
13
|
const common_1 = require("../../common");
|
|
14
14
|
class InstallApp extends basecommand_1.BaseCommand {
|
|
15
|
+
static description = 'Install an app from the marketplace';
|
|
16
|
+
static examples = [
|
|
17
|
+
`$ contrail app install --appIdentifier @VibeIQ/Flex-PLM-Connector
|
|
18
|
+
`,
|
|
19
|
+
];
|
|
20
|
+
// variable argument length
|
|
21
|
+
static strict = true;
|
|
22
|
+
static flags = {
|
|
23
|
+
appIdentifier: core_1.Flags.string({
|
|
24
|
+
char: 'i',
|
|
25
|
+
description: 'The identifier of the app to install',
|
|
26
|
+
required: false,
|
|
27
|
+
}),
|
|
28
|
+
installWorkflowTemplates: core_1.Flags.boolean({
|
|
29
|
+
char: 'w',
|
|
30
|
+
description: '"Install the app\'s accompanying workflows"',
|
|
31
|
+
required: false,
|
|
32
|
+
}),
|
|
33
|
+
showHidden: core_1.Flags.boolean({
|
|
34
|
+
char: 'h',
|
|
35
|
+
description: 'Show the option to install public but hidden apps',
|
|
36
|
+
required: false,
|
|
37
|
+
}),
|
|
38
|
+
};
|
|
15
39
|
async run() {
|
|
16
40
|
const { flags } = await this.parse(InstallApp);
|
|
17
41
|
await (0, login_1.authUser)();
|
|
@@ -98,30 +122,6 @@ class InstallApp extends basecommand_1.BaseCommand {
|
|
|
98
122
|
}
|
|
99
123
|
}
|
|
100
124
|
exports.default = InstallApp;
|
|
101
|
-
InstallApp.description = 'Install an app from the marketplace';
|
|
102
|
-
InstallApp.examples = [
|
|
103
|
-
`$ contrail app install --appIdentifier @VibeIQ/Flex-PLM-Connector
|
|
104
|
-
`,
|
|
105
|
-
];
|
|
106
|
-
// variable argument length
|
|
107
|
-
InstallApp.strict = true;
|
|
108
|
-
InstallApp.flags = {
|
|
109
|
-
appIdentifier: core_1.Flags.string({
|
|
110
|
-
char: 'i',
|
|
111
|
-
description: 'The identifier of the app to install',
|
|
112
|
-
required: false,
|
|
113
|
-
}),
|
|
114
|
-
installWorkflowTemplates: core_1.Flags.boolean({
|
|
115
|
-
char: 'w',
|
|
116
|
-
description: '"Install the app\'s accompanying workflows"',
|
|
117
|
-
required: false,
|
|
118
|
-
}),
|
|
119
|
-
showHidden: core_1.Flags.boolean({
|
|
120
|
-
char: 'h',
|
|
121
|
-
description: 'Show the option to install public but hidden apps',
|
|
122
|
-
required: false,
|
|
123
|
-
}),
|
|
124
|
-
};
|
|
125
125
|
async function getConfigProperties(app) {
|
|
126
126
|
const config = {};
|
|
127
127
|
for (const key of Object.keys(app.configProperties)) {
|
|
@@ -11,6 +11,30 @@ const upgrade_1 = require("./upgrade");
|
|
|
11
11
|
const basecommand_1 = require("../../basecommand");
|
|
12
12
|
const logger_1 = tslib_1.__importDefault(require("../../logger"));
|
|
13
13
|
class PublishApp extends basecommand_1.BaseCommand {
|
|
14
|
+
static description = 'Publish the app';
|
|
15
|
+
static examples = [
|
|
16
|
+
`$ contrail app publish
|
|
17
|
+
`,
|
|
18
|
+
];
|
|
19
|
+
// variable argument length
|
|
20
|
+
static strict = true;
|
|
21
|
+
static flags = {
|
|
22
|
+
upgrade: core_1.Flags.boolean({
|
|
23
|
+
char: 'u',
|
|
24
|
+
description: 'In addition to deploying, upgrade the installed version of the app in this org to the latest one.',
|
|
25
|
+
required: false,
|
|
26
|
+
}),
|
|
27
|
+
verbose: core_1.Flags.boolean({
|
|
28
|
+
char: 'v',
|
|
29
|
+
description: 'Debug the app deployment step and do not remove the intermediate build artifacts.',
|
|
30
|
+
required: false,
|
|
31
|
+
}),
|
|
32
|
+
dryRun: core_1.Flags.boolean({
|
|
33
|
+
char: 'd',
|
|
34
|
+
description: 'Dry run the upgrade without actually updating the app.',
|
|
35
|
+
required: false,
|
|
36
|
+
}),
|
|
37
|
+
};
|
|
14
38
|
async run() {
|
|
15
39
|
const { flags } = await this.parse(PublishApp);
|
|
16
40
|
let appDeclaration;
|
|
@@ -44,27 +68,3 @@ class PublishApp extends basecommand_1.BaseCommand {
|
|
|
44
68
|
}
|
|
45
69
|
}
|
|
46
70
|
exports.default = PublishApp;
|
|
47
|
-
PublishApp.description = 'Publish the app';
|
|
48
|
-
PublishApp.examples = [
|
|
49
|
-
`$ contrail app publish
|
|
50
|
-
`,
|
|
51
|
-
];
|
|
52
|
-
// variable argument length
|
|
53
|
-
PublishApp.strict = true;
|
|
54
|
-
PublishApp.flags = {
|
|
55
|
-
upgrade: core_1.Flags.boolean({
|
|
56
|
-
char: 'u',
|
|
57
|
-
description: 'In addition to deploying, upgrade the installed version of the app in this org to the latest one.',
|
|
58
|
-
required: false,
|
|
59
|
-
}),
|
|
60
|
-
verbose: core_1.Flags.boolean({
|
|
61
|
-
char: 'v',
|
|
62
|
-
description: 'Debug the app deployment step and do not remove the intermediate build artifacts.',
|
|
63
|
-
required: false,
|
|
64
|
-
}),
|
|
65
|
-
dryRun: core_1.Flags.boolean({
|
|
66
|
-
char: 'd',
|
|
67
|
-
description: 'Dry run the upgrade without actually updating the app.',
|
|
68
|
-
required: false,
|
|
69
|
-
}),
|
|
70
|
-
};
|
|
@@ -10,6 +10,20 @@ const apps_1 = require("../../api/apps");
|
|
|
10
10
|
const basecommand_1 = require("../../basecommand");
|
|
11
11
|
const common_1 = require("../../common");
|
|
12
12
|
class UninstallApp extends basecommand_1.BaseCommand {
|
|
13
|
+
static description = 'Uninstall an app that is currently installed';
|
|
14
|
+
static examples = [
|
|
15
|
+
`$ contrail app uninstall --name @vibeiq/flexplm-connector
|
|
16
|
+
`,
|
|
17
|
+
];
|
|
18
|
+
// variable argument length
|
|
19
|
+
static strict = true;
|
|
20
|
+
static flags = {
|
|
21
|
+
appIdentifier: core_1.Flags.string({
|
|
22
|
+
char: 'i',
|
|
23
|
+
description: '"The identifier of the app to uninstall. The identifier can be found on the app\'s page in the marketplace."',
|
|
24
|
+
required: false,
|
|
25
|
+
}),
|
|
26
|
+
};
|
|
13
27
|
async run() {
|
|
14
28
|
const { flags } = await this.parse(UninstallApp);
|
|
15
29
|
await (0, login_1.authUser)();
|
|
@@ -53,17 +67,3 @@ class UninstallApp extends basecommand_1.BaseCommand {
|
|
|
53
67
|
}
|
|
54
68
|
}
|
|
55
69
|
exports.default = UninstallApp;
|
|
56
|
-
UninstallApp.description = 'Uninstall an app that is currently installed';
|
|
57
|
-
UninstallApp.examples = [
|
|
58
|
-
`$ contrail app uninstall --name @vibeiq/flexplm-connector
|
|
59
|
-
`,
|
|
60
|
-
];
|
|
61
|
-
// variable argument length
|
|
62
|
-
UninstallApp.strict = true;
|
|
63
|
-
UninstallApp.flags = {
|
|
64
|
-
appIdentifier: core_1.Flags.string({
|
|
65
|
-
char: 'i',
|
|
66
|
-
description: '"The identifier of the app to uninstall. The identifier can be found on the app\'s page in the marketplace."',
|
|
67
|
-
required: false,
|
|
68
|
-
}),
|
|
69
|
-
};
|
|
@@ -12,6 +12,25 @@ const basecommand_1 = require("../../basecommand");
|
|
|
12
12
|
const logger_1 = tslib_1.__importDefault(require("../../logger"));
|
|
13
13
|
const common_1 = require("../../common");
|
|
14
14
|
class UpgradeApp extends basecommand_1.BaseCommand {
|
|
15
|
+
static description = 'Upgrade an installed app';
|
|
16
|
+
static examples = [
|
|
17
|
+
`$ contrail app upgrade --appIdentifier @VibeIQ/Flex-PLM-Connector --latest
|
|
18
|
+
`,
|
|
19
|
+
];
|
|
20
|
+
// variable argument length
|
|
21
|
+
static strict = true;
|
|
22
|
+
static flags = {
|
|
23
|
+
appIdentifier: core_1.Flags.string({
|
|
24
|
+
char: 'i',
|
|
25
|
+
description: 'The appIdentifier of the app to install',
|
|
26
|
+
required: false,
|
|
27
|
+
}),
|
|
28
|
+
latest: core_1.Flags.boolean({
|
|
29
|
+
char: 'l',
|
|
30
|
+
description: 'Upgrade to the latest version of the app',
|
|
31
|
+
required: false,
|
|
32
|
+
}),
|
|
33
|
+
};
|
|
15
34
|
async run() {
|
|
16
35
|
const { flags } = await this.parse(UpgradeApp);
|
|
17
36
|
await (0, login_1.authUser)();
|
|
@@ -67,25 +86,6 @@ class UpgradeApp extends basecommand_1.BaseCommand {
|
|
|
67
86
|
}
|
|
68
87
|
}
|
|
69
88
|
exports.default = UpgradeApp;
|
|
70
|
-
UpgradeApp.description = 'Upgrade an installed app';
|
|
71
|
-
UpgradeApp.examples = [
|
|
72
|
-
`$ contrail app upgrade --appIdentifier @VibeIQ/Flex-PLM-Connector --latest
|
|
73
|
-
`,
|
|
74
|
-
];
|
|
75
|
-
// variable argument length
|
|
76
|
-
UpgradeApp.strict = true;
|
|
77
|
-
UpgradeApp.flags = {
|
|
78
|
-
appIdentifier: core_1.Flags.string({
|
|
79
|
-
char: 'i',
|
|
80
|
-
description: 'The appIdentifier of the app to install',
|
|
81
|
-
required: false,
|
|
82
|
-
}),
|
|
83
|
-
latest: core_1.Flags.boolean({
|
|
84
|
-
char: 'l',
|
|
85
|
-
description: 'Upgrade to the latest version of the app',
|
|
86
|
-
required: false,
|
|
87
|
-
}),
|
|
88
|
-
};
|
|
89
89
|
async function upgradeAndWait(appOrgToUpgrade, versionToUpgrade) {
|
|
90
90
|
await (0, apps_1.upgradeAppVersion)(appOrgToUpgrade, versionToUpgrade);
|
|
91
91
|
// eslint-disable-next-line no-constant-condition
|
|
@@ -7,10 +7,12 @@ const logger_1 = tslib_1.__importDefault(require("../../../logger"));
|
|
|
7
7
|
const update_app_config_1 = require("../../../helpers/app/update-app-config");
|
|
8
8
|
const upgrade_version_1 = require("../../../helpers/app/upgrade-version");
|
|
9
9
|
class AppMajorVersionUpgrade extends basecommand_1.BaseCommand {
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
10
|
+
skipConfirmEnv = true;
|
|
11
|
+
static description = 'Upgrade the Major app version';
|
|
12
|
+
static examples = [
|
|
13
|
+
`$ contrail app version major
|
|
14
|
+
`,
|
|
15
|
+
];
|
|
14
16
|
async run() {
|
|
15
17
|
let appDeclaration;
|
|
16
18
|
try {
|
|
@@ -33,8 +35,3 @@ class AppMajorVersionUpgrade extends basecommand_1.BaseCommand {
|
|
|
33
35
|
}
|
|
34
36
|
}
|
|
35
37
|
exports.default = AppMajorVersionUpgrade;
|
|
36
|
-
AppMajorVersionUpgrade.description = 'Upgrade the Major app version';
|
|
37
|
-
AppMajorVersionUpgrade.examples = [
|
|
38
|
-
`$ contrail app version major
|
|
39
|
-
`,
|
|
40
|
-
];
|
|
@@ -7,10 +7,12 @@ const logger_1 = tslib_1.__importDefault(require("../../../logger"));
|
|
|
7
7
|
const update_app_config_1 = require("../../../helpers/app/update-app-config");
|
|
8
8
|
const upgrade_version_1 = require("../../../helpers/app/upgrade-version");
|
|
9
9
|
class AppMinorVersionUpgrade extends basecommand_1.BaseCommand {
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
10
|
+
skipConfirmEnv = true;
|
|
11
|
+
static description = 'Upgrade the Minor app version';
|
|
12
|
+
static examples = [
|
|
13
|
+
`$ contrail app version minor
|
|
14
|
+
`,
|
|
15
|
+
];
|
|
14
16
|
async run() {
|
|
15
17
|
let appDeclaration;
|
|
16
18
|
try {
|
|
@@ -33,8 +35,3 @@ class AppMinorVersionUpgrade extends basecommand_1.BaseCommand {
|
|
|
33
35
|
}
|
|
34
36
|
}
|
|
35
37
|
exports.default = AppMinorVersionUpgrade;
|
|
36
|
-
AppMinorVersionUpgrade.description = 'Upgrade the Minor app version';
|
|
37
|
-
AppMinorVersionUpgrade.examples = [
|
|
38
|
-
`$ contrail app version minor
|
|
39
|
-
`,
|
|
40
|
-
];
|
|
@@ -7,10 +7,12 @@ const logger_1 = tslib_1.__importDefault(require("../../../logger"));
|
|
|
7
7
|
const update_app_config_1 = require("../../../helpers/app/update-app-config");
|
|
8
8
|
const upgrade_version_1 = require("../../../helpers/app/upgrade-version");
|
|
9
9
|
class AppPatchVersionUpgrade extends basecommand_1.BaseCommand {
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
10
|
+
skipConfirmEnv = true;
|
|
11
|
+
static description = 'Upgrade the Patch app version';
|
|
12
|
+
static examples = [
|
|
13
|
+
`$ contrail app version patch
|
|
14
|
+
`,
|
|
15
|
+
];
|
|
14
16
|
async run() {
|
|
15
17
|
let appDeclaration;
|
|
16
18
|
try {
|
|
@@ -33,8 +35,3 @@ class AppPatchVersionUpgrade extends basecommand_1.BaseCommand {
|
|
|
33
35
|
}
|
|
34
36
|
}
|
|
35
37
|
exports.default = AppPatchVersionUpgrade;
|
|
36
|
-
AppPatchVersionUpgrade.description = 'Upgrade the Patch app version';
|
|
37
|
-
AppPatchVersionUpgrade.examples = [
|
|
38
|
-
`$ contrail app version patch
|
|
39
|
-
`,
|
|
40
|
-
];
|
|
@@ -7,6 +7,11 @@ const helpers_1 = require("../../helpers/colors/helpers");
|
|
|
7
7
|
const basecommand_1 = require("../../basecommand");
|
|
8
8
|
const logger_1 = tslib_1.__importDefault(require("../../logger"));
|
|
9
9
|
class DeleteAllColors extends basecommand_1.BaseCommand {
|
|
10
|
+
static description = 'Say hello';
|
|
11
|
+
static examples = [
|
|
12
|
+
`$ contrail colors deleteAll
|
|
13
|
+
`,
|
|
14
|
+
];
|
|
10
15
|
async run() {
|
|
11
16
|
try {
|
|
12
17
|
await (0, login_1.authUser)();
|
|
@@ -24,8 +29,3 @@ class DeleteAllColors extends basecommand_1.BaseCommand {
|
|
|
24
29
|
}
|
|
25
30
|
}
|
|
26
31
|
exports.default = DeleteAllColors;
|
|
27
|
-
DeleteAllColors.description = 'Say hello';
|
|
28
|
-
DeleteAllColors.examples = [
|
|
29
|
-
`$ contrail colors deleteAll
|
|
30
|
-
`,
|
|
31
|
-
];
|
|
@@ -7,6 +7,11 @@ const helpers_1 = require("../../helpers/colors/helpers");
|
|
|
7
7
|
const basecommand_1 = require("../../basecommand");
|
|
8
8
|
const logger_1 = tslib_1.__importDefault(require("../../logger"));
|
|
9
9
|
class LoadColors extends basecommand_1.BaseCommand {
|
|
10
|
+
static description = 'Say hello';
|
|
11
|
+
static examples = [
|
|
12
|
+
`$ contrail colors load
|
|
13
|
+
`,
|
|
14
|
+
];
|
|
10
15
|
async run() {
|
|
11
16
|
try {
|
|
12
17
|
await (0, login_1.authUser)();
|
|
@@ -23,8 +28,3 @@ class LoadColors extends basecommand_1.BaseCommand {
|
|
|
23
28
|
}
|
|
24
29
|
}
|
|
25
30
|
exports.default = LoadColors;
|
|
26
|
-
LoadColors.description = 'Say hello';
|
|
27
|
-
LoadColors.examples = [
|
|
28
|
-
`$ contrail colors load
|
|
29
|
-
`,
|
|
30
|
-
];
|
|
@@ -3,10 +3,12 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
const config_1 = require("../../../helpers/config/config");
|
|
4
4
|
const basecommand_1 = require("../../../basecommand");
|
|
5
5
|
class ListConfigEnvironment extends basecommand_1.BaseCommand {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
6
|
+
skipConfirmEnv = true;
|
|
7
|
+
static description = 'List the environment configurations';
|
|
8
|
+
static examples = [
|
|
9
|
+
`$ contrail config environments list
|
|
10
|
+
`,
|
|
11
|
+
];
|
|
10
12
|
async run() {
|
|
11
13
|
const { flags } = await this.parse(ListConfigEnvironment);
|
|
12
14
|
await super.setLogLevel(flags.logLevel);
|
|
@@ -15,8 +17,3 @@ class ListConfigEnvironment extends basecommand_1.BaseCommand {
|
|
|
15
17
|
}
|
|
16
18
|
}
|
|
17
19
|
exports.default = ListConfigEnvironment;
|
|
18
|
-
ListConfigEnvironment.description = 'List the environment configurations';
|
|
19
|
-
ListConfigEnvironment.examples = [
|
|
20
|
-
`$ contrail config environments list
|
|
21
|
-
`,
|
|
22
|
-
];
|
|
@@ -6,10 +6,18 @@ const basecommand_1 = require("../../../basecommand");
|
|
|
6
6
|
const config_1 = require("../../../helpers/config/config");
|
|
7
7
|
const logger_1 = tslib_1.__importDefault(require("../../../logger"));
|
|
8
8
|
class RemoveConfigEnvironment extends basecommand_1.BaseCommand {
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
9
|
+
skipConfirmEnv = true;
|
|
10
|
+
static description = 'Remove a variable from the configuration';
|
|
11
|
+
static examples = [
|
|
12
|
+
`$ contrail config environments remove --name stage
|
|
13
|
+
`,
|
|
14
|
+
];
|
|
15
|
+
// variable argument length
|
|
16
|
+
static strict = false;
|
|
17
|
+
static flags = {
|
|
18
|
+
name: core_1.Flags.string({ description: 'The env name', required: true }),
|
|
19
|
+
};
|
|
20
|
+
static args = {};
|
|
13
21
|
async run() {
|
|
14
22
|
const { flags } = await this.parse(RemoveConfigEnvironment);
|
|
15
23
|
await super.setLogLevel(flags.logLevel);
|
|
@@ -26,14 +34,3 @@ class RemoveConfigEnvironment extends basecommand_1.BaseCommand {
|
|
|
26
34
|
}
|
|
27
35
|
}
|
|
28
36
|
exports.default = RemoveConfigEnvironment;
|
|
29
|
-
RemoveConfigEnvironment.description = 'Remove a variable from the configuration';
|
|
30
|
-
RemoveConfigEnvironment.examples = [
|
|
31
|
-
`$ contrail config environments remove --name stage
|
|
32
|
-
`,
|
|
33
|
-
];
|
|
34
|
-
// variable argument length
|
|
35
|
-
RemoveConfigEnvironment.strict = false;
|
|
36
|
-
RemoveConfigEnvironment.flags = {
|
|
37
|
-
name: core_1.Flags.string({ description: 'The env name', required: true }),
|
|
38
|
-
};
|
|
39
|
-
RemoveConfigEnvironment.args = {};
|
|
@@ -6,10 +6,17 @@ const config_1 = require("../../../helpers/config/config");
|
|
|
6
6
|
const basecommand_1 = require("../../../basecommand");
|
|
7
7
|
const logger_1 = tslib_1.__importDefault(require("../../../logger"));
|
|
8
8
|
class SetConfigEnvironment extends basecommand_1.BaseCommand {
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
9
|
+
skipConfirmEnv = true;
|
|
10
|
+
static description = 'Set a environment in the configuration';
|
|
11
|
+
static examples = ['$ contrail config environments set --name dev --url https://www.google.com'];
|
|
12
|
+
static flags = {
|
|
13
|
+
name: core_1.Flags.string({ description: 'The env name', required: true }),
|
|
14
|
+
url: core_1.Flags.string({
|
|
15
|
+
description: 'The env url',
|
|
16
|
+
required: true,
|
|
17
|
+
}),
|
|
18
|
+
};
|
|
19
|
+
static args = {};
|
|
13
20
|
async run() {
|
|
14
21
|
const { flags } = await this.parse(SetConfigEnvironment);
|
|
15
22
|
await super.setLogLevel(flags.logLevel);
|
|
@@ -20,13 +27,3 @@ class SetConfigEnvironment extends basecommand_1.BaseCommand {
|
|
|
20
27
|
}
|
|
21
28
|
}
|
|
22
29
|
exports.default = SetConfigEnvironment;
|
|
23
|
-
SetConfigEnvironment.description = 'Set a environment in the configuration';
|
|
24
|
-
SetConfigEnvironment.examples = ['$ contrail config environments set --name dev --url https://www.google.com'];
|
|
25
|
-
SetConfigEnvironment.flags = {
|
|
26
|
-
name: core_1.Flags.string({ description: 'The env name', required: true }),
|
|
27
|
-
url: core_1.Flags.string({
|
|
28
|
-
description: 'The env url',
|
|
29
|
-
required: true,
|
|
30
|
-
}),
|
|
31
|
-
};
|
|
32
|
-
SetConfigEnvironment.args = {};
|
|
@@ -3,17 +3,14 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
const config_1 = require("../../helpers/config/config");
|
|
4
4
|
const basecommand_1 = require("../../basecommand");
|
|
5
5
|
class ListConfig extends basecommand_1.BaseCommand {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
6
|
+
static description = 'List the configurations';
|
|
7
|
+
skipConfirmEnv = true;
|
|
8
|
+
static examples = [
|
|
9
|
+
`$ contrail config list
|
|
10
|
+
`,
|
|
11
|
+
];
|
|
10
12
|
async run() {
|
|
11
13
|
this.log(await (0, config_1.readVibeIQConfig)());
|
|
12
14
|
}
|
|
13
15
|
}
|
|
14
16
|
exports.default = ListConfig;
|
|
15
|
-
ListConfig.description = 'List the configurations';
|
|
16
|
-
ListConfig.examples = [
|
|
17
|
-
`$ contrail config list
|
|
18
|
-
`,
|
|
19
|
-
];
|
|
@@ -4,28 +4,25 @@ const core_1 = require("@oclif/core");
|
|
|
4
4
|
const config_1 = require("../../helpers/config/config");
|
|
5
5
|
const basecommand_1 = require("../../basecommand");
|
|
6
6
|
class RemoveConfig extends basecommand_1.BaseCommand {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
7
|
+
static description = 'Remove a variable from the configuration';
|
|
8
|
+
skipConfirmEnv = true;
|
|
9
|
+
static examples = [
|
|
10
|
+
`$ contrail config remove --orgId
|
|
11
|
+
`,
|
|
12
|
+
];
|
|
13
|
+
// variable argument length
|
|
14
|
+
static strict = false;
|
|
15
|
+
static flags = {
|
|
16
|
+
// list: Flags.string({char: 'f', description: 'Who is saying hello', required: true}),
|
|
17
|
+
orgSlug: core_1.Flags.boolean({ description: 'The org slug', required: false }),
|
|
18
|
+
apiGateway: core_1.Flags.boolean({ description: 'The API Gateway', required: false }),
|
|
19
|
+
orgId: core_1.Flags.boolean({ description: 'The org Id', required: false }),
|
|
20
|
+
apiUserToken: core_1.Flags.boolean({ description: 'The API User Token', required: false }),
|
|
21
|
+
};
|
|
22
|
+
static args = {};
|
|
11
23
|
async run() {
|
|
12
24
|
const { flags } = await this.parse(RemoveConfig);
|
|
13
25
|
await (0, config_1.deleteConfigs)(Object.keys(flags));
|
|
14
26
|
}
|
|
15
27
|
}
|
|
16
28
|
exports.default = RemoveConfig;
|
|
17
|
-
RemoveConfig.description = 'Remove a variable from the configuration';
|
|
18
|
-
RemoveConfig.examples = [
|
|
19
|
-
`$ contrail config remove --orgId
|
|
20
|
-
`,
|
|
21
|
-
];
|
|
22
|
-
// variable argument length
|
|
23
|
-
RemoveConfig.strict = false;
|
|
24
|
-
RemoveConfig.flags = {
|
|
25
|
-
// list: Flags.string({char: 'f', description: 'Who is saying hello', required: true}),
|
|
26
|
-
orgSlug: core_1.Flags.boolean({ description: 'The org slug', required: false }),
|
|
27
|
-
apiGateway: core_1.Flags.boolean({ description: 'The API Gateway', required: false }),
|
|
28
|
-
orgId: core_1.Flags.boolean({ description: 'The org Id', required: false }),
|
|
29
|
-
apiUserToken: core_1.Flags.boolean({ description: 'The API User Token', required: false }),
|
|
30
|
-
};
|
|
31
|
-
RemoveConfig.args = {};
|