@oussema_mili/test-pkg-123 1.1.44 → 1.1.45

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/cli-commands.js CHANGED
@@ -754,7 +754,7 @@ function setupCLICommands(program, startServerFunction) {
754
754
 
755
755
  console.log("");
756
756
 
757
- // Agent running status - check daemon first, then fallback to port check
757
+ // Agent running status - only trust daemon state
758
758
  const daemonStatus = getDaemonStatus();
759
759
  if (daemonStatus.running) {
760
760
  console.log(
@@ -766,15 +766,10 @@ function setupCLICommands(program, startServerFunction) {
766
766
  chalk.gray(` Uptime: ${formatDaemonUptime(daemonStatus.uptime)}`),
767
767
  );
768
768
  } else {
769
- const isRunning = await checkAgentRunning(WS_PORT);
770
- if (isRunning) {
771
- console.log(chalk.green(`Agent: Running (port ${WS_PORT})`));
772
- } else {
773
- console.log(chalk.yellow("Agent: Not Running"));
774
- console.log(
775
- chalk.gray(' Run "fenwave service start" to start the agent'),
776
- );
777
- }
769
+ console.log(chalk.yellow("Agent: Not Running"));
770
+ console.log(
771
+ chalk.gray(' Run "fenwave service start" to start the agent'),
772
+ );
778
773
  }
779
774
 
780
775
  console.log("");
@@ -1887,29 +1882,7 @@ function setupCLICommands(program, startServerFunction) {
1887
1882
  formatDaemonUptime(daemonStatus.uptime),
1888
1883
  );
1889
1884
  } else {
1890
- // Fallback to checking port
1891
- const isAgentRunning = await checkAgentRunning(WS_PORT);
1892
- if (isAgentRunning) {
1893
- try {
1894
- const agentStartTime = await agentStore.loadAgentStartTime();
1895
- if (agentStartTime) {
1896
- const currentTime = Date.now();
1897
- const agentUptimeMs = currentTime - agentStartTime.getTime();
1898
- console.log(chalk.blue("Uptime:"), formatUptime(agentUptimeMs));
1899
- } else {
1900
- console.log(chalk.blue("Uptime:"), "0 seconds");
1901
- }
1902
- } catch (error) {
1903
- console.log(chalk.blue("Uptime:"), "0 seconds");
1904
- }
1905
- } else {
1906
- console.log(chalk.blue("Status:"), chalk.red("Agent Not Running"));
1907
- try {
1908
- await agentStore.clearAgentInfo();
1909
- } catch (error) {
1910
- // Ignore cleanup errors
1911
- }
1912
- }
1885
+ console.log(chalk.blue("Status:"), chalk.red("Agent Not Running"));
1913
1886
  }
1914
1887
  process.exit(0);
1915
1888
  } catch (error) {
@@ -187,7 +187,7 @@ class ContainerManager {
187
187
  if (APP_PORT === WS_PORT || !(await isPortAvailable(APP_PORT))) {
188
188
  try {
189
189
  const newPort = await findAvailableContainerPort(DEFAULT_CONTAINER_PORT, 100, [WS_PORT]);
190
- console.log(chalk.yellow(`⚠️ Desired container port ${APP_PORT} is unavailable or conflicts with WebSocket port ${WS_PORT}. Using ${newPort} instead.`));
190
+ console.log(chalk.yellow(`⚠️ Port ${APP_PORT} is unavailable. Using ${newPort} instead.`));
191
191
  APP_PORT = newPort;
192
192
  } catch (err) {
193
193
  throw new Error(`Failed to resolve container port conflict: ${err.message}`);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@oussema_mili/test-pkg-123",
3
- "version": "1.1.44",
3
+ "version": "1.1.45",
4
4
  "description": "Fenwave Docker Agent and CLI",
5
5
  "keywords": [
6
6
  "fenwave",