@powerhousedao/ph-cli 0.40.85-dev.13 → 0.40.85-dev.15
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
|
@@ -158,22 +158,24 @@ else
|
|
|
158
158
|
connect_health="✅"
|
|
159
159
|
fi
|
|
160
160
|
# Get Nginx memory usage for the site
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
161
|
+
nginx_pid=$(pgrep -f "nginx.*$PROJECT_NAME" | head -n 1)
|
|
162
|
+
if [ -n "$nginx_pid" ]; then
|
|
163
|
+
connect_memory=$(ps -o rss= -p "$nginx_pid" 2>/dev/null | awk '{printf "%.1fmb", $1/1024}')
|
|
164
|
+
connect_uptime=$(ps -o etime= -p "$nginx_pid" 2>/dev/null)
|
|
165
|
+
fi
|
|
164
166
|
fi
|
|
165
167
|
printf "%-15s %-10s %-15s %-10s %-10s\n" "Connect" "$connect_status" "$connect_memory" "$connect_uptime" "$connect_health"
|
|
166
168
|
|
|
167
169
|
# Check Switchboard status
|
|
168
170
|
switchboard_info=$(pm2 list | grep "switchboard_${PROJECT_NAME}")
|
|
169
171
|
if [ -n "$switchboard_info" ]; then
|
|
170
|
-
switchboard_status
|
|
172
|
+
switchboard_status="Enabled"
|
|
171
173
|
switchboard_memory=$(echo "$switchboard_info" | awk '{print $12}')
|
|
172
174
|
switchboard_uptime=$(echo "$switchboard_info" | awk '{print $7}')
|
|
173
175
|
switchboard_health="✅"
|
|
174
176
|
printf "%-15s %-10s %-15s %-10s %-10s\n" "Switchboard" "$switchboard_status" "$switchboard_memory" "$switchboard_uptime" "$switchboard_health"
|
|
175
177
|
else
|
|
176
|
-
printf "%-15s %-10s %-15s %-10s %-10s\n" "Switchboard" "
|
|
178
|
+
printf "%-15s %-10s %-15s %-10s %-10s\n" "Switchboard" "Disabled" "N/A" "N/A" "❌"
|
|
177
179
|
fi
|
|
178
180
|
echo "────────────────────────────────────────────────────────────────────"
|
|
179
181
|
;;
|
|
@@ -59,7 +59,8 @@ else
|
|
|
59
59
|
# Generate database credentials
|
|
60
60
|
DB_PASSWORD="powerhouse"
|
|
61
61
|
DB_USER="powerhouse"
|
|
62
|
-
|
|
62
|
+
# Convert to lowercase, replace dots with underscores, replace special chars with underscore, ensure starts with letter
|
|
63
|
+
DB_NAME="powerhouse_$(echo "${PROJECT_NAME}" | tr '[:upper:]' '[:lower:]' | sed 's/\./_/g' | sed 's/[^a-z0-9]/_/g' | sed 's/^[^a-z]/p_/' | cut -c1-63)"
|
|
63
64
|
|
|
64
65
|
# Check if database already exists
|
|
65
66
|
if sudo -u postgres psql -lqt | cut -d \| -f 1 | grep -qw $DB_NAME; then
|
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.15";
|
|
2
2
|
//# sourceMappingURL=version.d.ts.map
|
package/dist/src/version.js
CHANGED