@powerhousedao/ph-cli 0.40.85-dev.12 → 0.40.85-dev.13

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/dist/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@powerhousedao/ph-cli",
3
- "version": "0.40.85-dev.12",
3
+ "version": "0.40.85-dev.13",
4
4
  "description": "",
5
5
  "license": "AGPL-3.0-only",
6
6
  "type": "module",
@@ -138,16 +138,44 @@ else
138
138
 
139
139
  "status")
140
140
  check_setup "$PROJECT_NAME"
141
- echo "Checking service status..."
142
- echo "Nginx site status:"
141
+ echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
142
+ echo " Service Status for $PROJECT_NAME"
143
+ echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
144
+
145
+ # Create table header
146
+ printf "%-15s %-10s %-15s %-10s %-10s\n" "Service" "Status" "Memory" "Uptime" "Health"
147
+ echo "────────────────────────────────────────────────────────────────────"
148
+
149
+ # Check Connect status
150
+ connect_status="Disabled"
151
+ connect_health="❌"
152
+ connect_memory="N/A"
153
+ connect_uptime="N/A"
143
154
  if [ -L "/etc/nginx/sites-enabled/$PROJECT_NAME" ]; then
144
- echo "Site is enabled"
145
- else
146
- echo "Site is disabled"
155
+ connect_status="Enabled"
156
+ # Check if Connect is reachable
157
+ if curl -s -f "http://localhost/$PROJECT_NAME" > /dev/null; then
158
+ connect_health="✅"
159
+ fi
160
+ # Get Nginx memory usage for the site
161
+ connect_memory=$(ps -o rss= -p $(pgrep -f "nginx.*$PROJECT_NAME") 2>/dev/null | awk '{printf "%.1fmb", $1/1024}')
162
+ # Get Nginx uptime
163
+ connect_uptime=$(ps -o etime= -p $(pgrep -f "nginx.*$PROJECT_NAME") 2>/dev/null || echo "N/A")
147
164
  fi
165
+ printf "%-15s %-10s %-15s %-10s %-10s\n" "Connect" "$connect_status" "$connect_memory" "$connect_uptime" "$connect_health"
148
166
 
149
- echo -e "\nSwitchboard status:"
150
- pm2 list | grep "switchboard_${PROJECT_NAME}"
167
+ # Check Switchboard status
168
+ switchboard_info=$(pm2 list | grep "switchboard_${PROJECT_NAME}")
169
+ if [ -n "$switchboard_info" ]; then
170
+ switchboard_status=$(echo "$switchboard_info" | awk '{print $10}')
171
+ switchboard_memory=$(echo "$switchboard_info" | awk '{print $12}')
172
+ switchboard_uptime=$(echo "$switchboard_info" | awk '{print $7}')
173
+ switchboard_health="✅"
174
+ printf "%-15s %-10s %-15s %-10s %-10s\n" "Switchboard" "$switchboard_status" "$switchboard_memory" "$switchboard_uptime" "$switchboard_health"
175
+ else
176
+ printf "%-15s %-10s %-15s %-10s %-10s\n" "Switchboard" "Stopped" "N/A" "N/A" "❌"
177
+ fi
178
+ echo "────────────────────────────────────────────────────────────────────"
151
179
  ;;
152
180
 
153
181
  *)
@@ -1,2 +1,2 @@
1
- export declare const version = "0.40.85-dev.12";
1
+ export declare const version = "0.40.85-dev.13";
2
2
  //# sourceMappingURL=version.d.ts.map
@@ -1,3 +1,3 @@
1
1
  // This file is auto-generated. DO NOT EDIT.
2
- export const version = "0.40.85-dev.12";
2
+ export const version = "0.40.85-dev.13";
3
3
  //# sourceMappingURL=version.js.map