@contrail/cli 3.0.2 → 3.0.4
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
CHANGED
|
@@ -17,7 +17,7 @@ $ npm install -g @contrail/cli
|
|
|
17
17
|
$ contrail COMMAND
|
|
18
18
|
running command...
|
|
19
19
|
$ contrail (--version)
|
|
20
|
-
@contrail/cli/3.0.
|
|
20
|
+
@contrail/cli/3.0.4 darwin-x64 node-v20.19.1
|
|
21
21
|
$ contrail --help [COMMAND]
|
|
22
22
|
USAGE
|
|
23
23
|
$ contrail COMMAND
|
|
@@ -7,6 +7,8 @@ const login_1 = require("../../auth/login");
|
|
|
7
7
|
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
|
+
const app_deployer_1 = require("../../helpers/app/app-deployer");
|
|
11
|
+
const load_app_config_1 = require("../../helpers/app/load-app-config");
|
|
10
12
|
class CreateApp extends basecommand_1.BaseCommand {
|
|
11
13
|
static description = 'Create an app from a template';
|
|
12
14
|
static examples = [
|
|
@@ -80,6 +82,14 @@ class CreateApp extends basecommand_1.BaseCommand {
|
|
|
80
82
|
appDescription: answers.appDescription,
|
|
81
83
|
appPublisher: answers.appPublisher,
|
|
82
84
|
});
|
|
85
|
+
try {
|
|
86
|
+
let appDeclaration = (0, load_app_config_1.loadAppConfig)();
|
|
87
|
+
await new app_deployer_1.AppDeployer().deploy(appDeclaration);
|
|
88
|
+
}
|
|
89
|
+
catch (error) {
|
|
90
|
+
logger_1.default.error(`Failed to deploy the app: ${error}`);
|
|
91
|
+
this.exit(1);
|
|
92
|
+
}
|
|
83
93
|
}
|
|
84
94
|
}
|
|
85
95
|
exports.default = CreateApp;
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const tslib_1 = require("tslib");
|
|
3
4
|
const config_1 = require("../../helpers/config/config");
|
|
4
5
|
const basecommand_1 = require("../../basecommand");
|
|
6
|
+
const chalk_1 = tslib_1.__importDefault(require("chalk"));
|
|
5
7
|
class ListConfig extends basecommand_1.BaseCommand {
|
|
6
8
|
static description = 'List the configurations';
|
|
7
9
|
skipConfirmEnv = true;
|
|
@@ -13,8 +15,25 @@ class ListConfig extends basecommand_1.BaseCommand {
|
|
|
13
15
|
...basecommand_1.BaseCommand.baseFlags,
|
|
14
16
|
};
|
|
15
17
|
async run() {
|
|
18
|
+
// Get all available config files
|
|
16
19
|
const arrConfigFiles = await (0, config_1.getConfigFiles)();
|
|
17
|
-
|
|
20
|
+
// Get the current active configuration from the main config file
|
|
21
|
+
const mainConfig = await (0, config_1.readVibeIQConfig)();
|
|
22
|
+
const activeConfig = mainConfig?.configInUse || '';
|
|
23
|
+
// Create a simpler array of objects with just the names
|
|
24
|
+
const tableData = arrConfigFiles.map((config, index) => {
|
|
25
|
+
return {
|
|
26
|
+
Name: config,
|
|
27
|
+
};
|
|
28
|
+
});
|
|
29
|
+
// Display a simpler table with just the names
|
|
30
|
+
console.table(tableData, ['Name']);
|
|
31
|
+
if (!activeConfig) {
|
|
32
|
+
this.log(`No active configuration. Use ${chalk_1.default.yellow('contrail config use <name>')} to set one.`);
|
|
33
|
+
}
|
|
34
|
+
else {
|
|
35
|
+
this.log(`Currently Using: ${chalk_1.default.green(activeConfig)}`);
|
|
36
|
+
}
|
|
18
37
|
}
|
|
19
38
|
}
|
|
20
39
|
exports.default = ListConfig;
|
|
@@ -15,6 +15,7 @@ const basecommand_1 = require("../../basecommand");
|
|
|
15
15
|
const logger_1 = tslib_1.__importDefault(require("../../logger"));
|
|
16
16
|
const js_yaml_1 = tslib_1.__importDefault(require("js-yaml"));
|
|
17
17
|
const common_1 = require("../../common");
|
|
18
|
+
const users_1 = require("../../api/users");
|
|
18
19
|
class GetAllTypes extends basecommand_1.BaseCommand {
|
|
19
20
|
static description = 'Get all Types and associated data for your Org';
|
|
20
21
|
static examples = [
|
|
@@ -61,6 +62,8 @@ async function getAll(outDir, overwrite) {
|
|
|
61
62
|
typePropertyPolicyLinks: await (0, types_1.getTypePropertyPolicyLinks)(),
|
|
62
63
|
typePolicies: await (0, types_1.getTypePolicies)(),
|
|
63
64
|
typePolicyLinks: await (0, types_1.getTypePolicyLinks)(),
|
|
65
|
+
orgUsers: await (0, users_1.getUserOrgs)(),
|
|
66
|
+
groups: await (0, users_1.getGroups)(),
|
|
64
67
|
};
|
|
65
68
|
const reducedData = await (0, types_2.getAllReducedTypes)(data);
|
|
66
69
|
await saveData(reducedData, outDir, overwrite);
|
package/oclif.manifest.json
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@contrail/cli",
|
|
3
|
-
"version": "3.0.
|
|
3
|
+
"version": "3.0.4",
|
|
4
4
|
"description": "VibeIQ's Contrail Platform CLI.",
|
|
5
5
|
"bin": {
|
|
6
6
|
"contrail-cli": "./bin/run",
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
],
|
|
24
24
|
"dependencies": {
|
|
25
25
|
"@contrail/entity-types": "^1.1.17",
|
|
26
|
-
"@contrail/org-config-migration": "^1.
|
|
26
|
+
"@contrail/org-config-migration": "^1.1.3",
|
|
27
27
|
"@contrail/sdk": "^1.4.6",
|
|
28
28
|
"@contrail/types": "^3.0.48",
|
|
29
29
|
"@contrail/util": "^1.0.41",
|