cloudron 4.15.0 → 4.15.1
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/package.json +1 -1
- package/src/actions.js +17 -11
package/package.json
CHANGED
package/src/actions.js
CHANGED
|
@@ -449,23 +449,29 @@ async function list(options) {
|
|
|
449
449
|
// after quiet
|
|
450
450
|
if (apps.length === 0) return console.log('No apps installed.');
|
|
451
451
|
|
|
452
|
-
|
|
452
|
+
const t = new Table();
|
|
453
453
|
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
454
|
+
for (const app of apps) {
|
|
455
|
+
const response2 = await createRequest('GET', `/api/v1/apps/${app.id}`, options);
|
|
456
|
+
if (response2.statusCode !== 200) return exit(`Failed to list app: ${requestError(response2)}`);
|
|
457
|
+
response2.body.location = response2.body.location || response2.body.subdomain; // LEGACY support
|
|
458
|
+
|
|
459
|
+
const detailedApp = response2.body;
|
|
460
|
+
|
|
461
|
+
t.cell('Id', detailedApp.id);
|
|
462
|
+
t.cell('Location', detailedApp.fqdn);
|
|
463
|
+
t.cell('Manifest Id', (detailedApp.manifest.id || 'customapp') + '@' + detailedApp.manifest.version);
|
|
458
464
|
var prettyState;
|
|
459
|
-
if (
|
|
460
|
-
prettyState = (
|
|
461
|
-
} else if (
|
|
462
|
-
prettyState = `error (${
|
|
465
|
+
if (detailedApp.installationState === 'installed') {
|
|
466
|
+
prettyState = (detailedApp.debugMode ? 'debug' : detailedApp.runState);
|
|
467
|
+
} else if (detailedApp.installationState === 'error') {
|
|
468
|
+
prettyState = `error (${detailedApp.error.installationState})`;
|
|
463
469
|
} else {
|
|
464
|
-
prettyState =
|
|
470
|
+
prettyState = detailedApp.installationState;
|
|
465
471
|
}
|
|
466
472
|
t.cell('State', prettyState);
|
|
467
473
|
t.newRow();
|
|
468
|
-
}
|
|
474
|
+
}
|
|
469
475
|
|
|
470
476
|
console.log();
|
|
471
477
|
console.log(t.toString());
|