@contrail/cli 1.0.36 → 1.0.38
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/lib/apps/deploy-app/app-template-parsers.js +2 -1
- package/lib/apps/install-app/app-installer.js +21 -2
- package/lib/interfaces.d.ts +1 -0
- package/package.json +1 -1
- package/src/apps/deploy-app/app-template-parsers.ts +1 -0
- package/src/apps/install-app/app-installer.ts +20 -2
- package/src/interfaces.ts +1 -0
|
@@ -25,7 +25,8 @@ export class ConfigPropertiesParser {
|
|
|
25
25
|
const config = {
|
|
26
26
|
label: declaration.label,
|
|
27
27
|
slug: configKey,
|
|
28
|
-
propertyType: declaration.propertyType,
|
|
28
|
+
propertyType: declaration.propertyType,
|
|
29
|
+
dynamic: (declaration === null || declaration === void 0 ? void 0 : declaration.dynamic) || false,
|
|
29
30
|
};
|
|
30
31
|
if (declaration.options) {
|
|
31
32
|
config.options = declaration.options;
|
|
@@ -76,8 +76,27 @@ export async function installApp() {
|
|
|
76
76
|
configProperties = await getConfigProperties(app);
|
|
77
77
|
}
|
|
78
78
|
console.log('%s Installing apps', chalk.green.bold('APP INSTALLATION'));
|
|
79
|
-
await installAppToOrg(app, configProperties);
|
|
80
|
-
|
|
79
|
+
const appOrg = await installAppToOrg(app, configProperties);
|
|
80
|
+
// eslint-disable-next-line no-constant-condition
|
|
81
|
+
while (true) {
|
|
82
|
+
await delay(1000);
|
|
83
|
+
try {
|
|
84
|
+
const installingApp = await new Entities().get({ entityName: 'app-org', id: appOrg.id });
|
|
85
|
+
if (installingApp.status === 'READY') {
|
|
86
|
+
console.log('%s App installed', chalk.green.bold('APP INSTALLATION'));
|
|
87
|
+
return;
|
|
88
|
+
}
|
|
89
|
+
if (installingApp.status === 'FAILED_INSTALLING') {
|
|
90
|
+
console.log('%s App installation failed', chalk.red.bold('APP INSTALLATION'));
|
|
91
|
+
return;
|
|
92
|
+
}
|
|
93
|
+
process.stdout.write('.');
|
|
94
|
+
}
|
|
95
|
+
catch (e) {
|
|
96
|
+
console.log('Error is:', e);
|
|
97
|
+
break;
|
|
98
|
+
}
|
|
99
|
+
}
|
|
81
100
|
}
|
|
82
101
|
function delay(ms) {
|
|
83
102
|
return new Promise(resolve => setTimeout(resolve, ms));
|
package/lib/interfaces.d.ts
CHANGED
package/package.json
CHANGED
|
@@ -32,6 +32,7 @@ export class ConfigPropertiesParser {
|
|
|
32
32
|
label: declaration.label,
|
|
33
33
|
slug: configKey,
|
|
34
34
|
propertyType: declaration.propertyType, // TODO should support options
|
|
35
|
+
dynamic: declaration?.dynamic || false,
|
|
35
36
|
};
|
|
36
37
|
if (declaration.options) {
|
|
37
38
|
config.options = declaration.options;
|
|
@@ -78,8 +78,26 @@ export async function installApp() {
|
|
|
78
78
|
}
|
|
79
79
|
console.log('%s Installing apps', chalk.green.bold('APP INSTALLATION'));
|
|
80
80
|
|
|
81
|
-
await installAppToOrg(app, configProperties);
|
|
82
|
-
|
|
81
|
+
const appOrg = await installAppToOrg(app, configProperties);
|
|
82
|
+
// eslint-disable-next-line no-constant-condition
|
|
83
|
+
while (true) {
|
|
84
|
+
await delay(1000);
|
|
85
|
+
try{
|
|
86
|
+
const installingApp = await new Entities().get({entityName: 'app-org', id: appOrg.id});
|
|
87
|
+
if (installingApp.status === 'READY') {
|
|
88
|
+
console.log('%s App installed', chalk.green.bold('APP INSTALLATION'));
|
|
89
|
+
return;
|
|
90
|
+
}
|
|
91
|
+
if(installingApp.status === 'FAILED_INSTALLING') {
|
|
92
|
+
console.log('%s App installation failed', chalk.red.bold('APP INSTALLATION'));
|
|
93
|
+
return;
|
|
94
|
+
}
|
|
95
|
+
process.stdout.write('.');
|
|
96
|
+
} catch (e) {
|
|
97
|
+
console.log('Error is:', e);
|
|
98
|
+
break;
|
|
99
|
+
}
|
|
100
|
+
}
|
|
83
101
|
}
|
|
84
102
|
|
|
85
103
|
function delay(ms: number) {
|