cloud-ide-cide 2.0.36 → 2.0.37

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cloud-ide-cide",
3
- "version": "2.0.36",
3
+ "version": "2.0.37",
4
4
  "description": "Cloud IDE CLI — create, build, publish, upload and deploy Cloud IDE projects.",
5
5
  "main": "cli.js",
6
6
  "bin": {
package/serverInit.js CHANGED
@@ -256,6 +256,7 @@ function listenerStatus(cideDir) {
256
256
  }
257
257
 
258
258
  console.log('');
259
+ console.log(' ── Upload Listener ──────────────────────────');
259
260
  console.log(` Server type : ${config.serverType}`);
260
261
  console.log(` Server root : ${config.serverRoot}`);
261
262
  console.log(` Port : ${config.port || 4500}`);
@@ -275,6 +276,41 @@ function listenerStatus(cideDir) {
275
276
  }
276
277
  console.log(` Log : ${getServerLog(cideDir)}`);
277
278
  }
279
+
280
+ // ── Show deployed apps status ─────────────────────────────────────────
281
+ const deployments = safeReadJson(path.join(cideDir, 'deployments.json'));
282
+ if (deployments && deployments.apps && Object.keys(deployments.apps).length > 0) {
283
+ console.log('');
284
+ console.log(' ── Deployed Apps ────────────────────────────');
285
+
286
+ for (const [appCode, appData] of Object.entries(deployments.apps)) {
287
+ const pidFile = path.join(cideDir, 'logs', `${appCode}.pid`);
288
+ let appPid = null;
289
+ try { appPid = parseInt(fs.readFileSync(pidFile, 'utf8').trim(), 10); } catch {}
290
+ if (isNaN(appPid)) appPid = null;
291
+
292
+ const appRunning = appPid ? isProcessRunning(appPid) : false;
293
+ const current = appData.current || {};
294
+ const appLogFile = path.join(cideDir, 'logs', `${appCode}.log`);
295
+
296
+ console.log('');
297
+ console.log(` App : ${appCode}`);
298
+ console.log(` Path : ${current.appDir || 'N/A'}`);
299
+ console.log(` Version : ${current.version || 'N/A'}`);
300
+ console.log(` Deployed : ${current.deployedAt || 'N/A'}`);
301
+ if (appRunning) {
302
+ console.log(` Status : Running (PID: ${appPid})`);
303
+ } else {
304
+ console.log(' Status : Stopped');
305
+ if (appPid) {
306
+ try { fs.unlinkSync(pidFile); } catch {}
307
+ }
308
+ }
309
+ console.log(` Log : ${appLogFile}`);
310
+ console.log(` Releases : ${appData.history ? appData.history.length : 0}`);
311
+ }
312
+ }
313
+
278
314
  console.log('');
279
315
  }
280
316
 
package/uploadProject.js CHANGED
@@ -629,6 +629,17 @@ async function uploadProject(opts = {}) {
629
629
  console.log(' Rollback successful!');
630
630
  console.log(` Now active : ${result.rolledBackTo}`);
631
631
  console.log(` Previous : ${result.previousVersion}`);
632
+ if (result.appProcess) {
633
+ if (result.appProcess.started) {
634
+ console.log(` App : Running (PID: ${result.appProcess.pid})`);
635
+ } else {
636
+ console.log(` App : Failed to start`);
637
+ if (result.appProcess.reason) console.log(` Reason : ${result.appProcess.reason}`);
638
+ }
639
+ if (result.appProcess.steps) {
640
+ result.appProcess.steps.forEach(s => console.log(` Step : ${s}`));
641
+ }
642
+ }
632
643
  console.log('');
633
644
  } else {
634
645
  console.error(` Rollback failed: ${result.message || JSON.stringify(result)}`);
@@ -704,7 +715,21 @@ async function uploadProject(opts = {}) {
704
715
  console.log(` App : ${result.appCode}`);
705
716
  console.log(` Server : ${label}`);
706
717
  if (result.previousVersion) console.log(` Previous : ${result.previousVersion}`);
707
- if (result.releasePath) console.log(` Path : ${result.releasePath}`);
718
+ if (result.appDir) console.log(` Path : ${result.appDir}`);
719
+ else if (result.releasePath) console.log(` Path : ${result.releasePath}`);
720
+ if (result.appProcess) {
721
+ console.log('');
722
+ if (result.appProcess.started) {
723
+ console.log(` App : Running (PID: ${result.appProcess.pid})`);
724
+ if (result.appProcess.logFile) console.log(` App Log : ${result.appProcess.logFile}`);
725
+ } else {
726
+ console.log(` App : Failed to start`);
727
+ if (result.appProcess.reason) console.log(` Reason : ${result.appProcess.reason}`);
728
+ }
729
+ if (result.appProcess.steps) {
730
+ result.appProcess.steps.forEach(s => console.log(` Step : ${s}`));
731
+ }
732
+ }
708
733
  console.log('');
709
734
  } else {
710
735
  console.error(` Upload failed: ${result.message || JSON.stringify(result)}`);