@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
|
@@ -138,16 +138,44 @@ else
|
|
|
138
138
|
|
|
139
139
|
"status")
|
|
140
140
|
check_setup "$PROJECT_NAME"
|
|
141
|
-
echo "
|
|
142
|
-
echo "
|
|
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
|
-
|
|
145
|
-
|
|
146
|
-
|
|
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
|
-
|
|
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
|
*)
|
package/dist/src/version.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const version = "0.40.85-dev.
|
|
1
|
+
export declare const version = "0.40.85-dev.13";
|
|
2
2
|
//# sourceMappingURL=version.d.ts.map
|
package/dist/src/version.js
CHANGED