@powerhousedao/ph-cli 2.5.0-dev.4 → 2.5.0-dev.41
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 +1 -1
- package/dist/scripts/manage-environment +8 -1
- package/dist/scripts/setup-environment +120 -127
- package/dist/src/commands/connect.d.ts.map +1 -1
- package/dist/src/commands/connect.js +2 -0
- package/dist/src/commands/connect.js.map +1 -1
- package/dist/src/commands/install.d.ts.map +1 -1
- package/dist/src/commands/install.js +17 -11
- package/dist/src/commands/install.js.map +1 -1
- package/dist/src/commands/uninstall.d.ts.map +1 -1
- package/dist/src/commands/uninstall.js +26 -7
- package/dist/src/commands/uninstall.js.map +1 -1
- package/dist/src/help.d.ts +3 -3
- package/dist/src/help.d.ts.map +1 -1
- package/dist/src/help.js +6 -6
- package/dist/src/help.js.map +1 -1
- package/dist/src/version.d.ts +1 -1
- package/dist/src/version.d.ts.map +1 -1
- package/dist/src/version.js +1 -1
- package/dist/src/version.js.map +1 -1
- package/dist/tsconfig.lib.tsbuildinfo +1 -1
- package/package.json +9 -9
package/dist/package.json
CHANGED
|
@@ -6,6 +6,12 @@
|
|
|
6
6
|
PROJECT_NAME=${1:-"global"}
|
|
7
7
|
ACTION=${2:-"status"}
|
|
8
8
|
|
|
9
|
+
# Get Switchboard port from .env or use default
|
|
10
|
+
if [ -f ".env" ]; then
|
|
11
|
+
SWITCHBOARD_PORT=$(grep "SWITCHBOARD_PORT=" .env | cut -d'=' -f2)
|
|
12
|
+
fi
|
|
13
|
+
SWITCHBOARD_PORT=${SWITCHBOARD_PORT:-4001}
|
|
14
|
+
|
|
9
15
|
# =============================================================================
|
|
10
16
|
# OS Detection and Windows Handling
|
|
11
17
|
# =============================================================================
|
|
@@ -87,6 +93,7 @@ else
|
|
|
87
93
|
# Build Connect
|
|
88
94
|
echo "Building Connect..."
|
|
89
95
|
ph connect build
|
|
96
|
+
sudo rm -rf /var/www/html/${PROJECT_NAME}
|
|
90
97
|
sudo cp -r .ph/connect-build/dist /var/www/html/${PROJECT_NAME}
|
|
91
98
|
|
|
92
99
|
# Enable Nginx site
|
|
@@ -95,7 +102,7 @@ else
|
|
|
95
102
|
# Start Switchboard via PM2
|
|
96
103
|
if ! pm2 list | grep -q "switchboard_${PROJECT_NAME}"; then
|
|
97
104
|
cd $PROJECT_NAME
|
|
98
|
-
pm2 start "pnpm switchboard" --name "switchboard_${PROJECT_NAME}"
|
|
105
|
+
pm2 start "pnpm switchboard --port $SWITCHBOARD_PORT" --name "switchboard_${PROJECT_NAME}"
|
|
99
106
|
pm2 save
|
|
100
107
|
else
|
|
101
108
|
pm2 start "switchboard_${PROJECT_NAME}"
|
|
@@ -6,6 +6,15 @@
|
|
|
6
6
|
TARGET_TAG=${1:-"latest"}
|
|
7
7
|
PROJECT_NAME=${2:-"global"}
|
|
8
8
|
|
|
9
|
+
# Function to find an available port
|
|
10
|
+
find_available_port() {
|
|
11
|
+
local port=4001
|
|
12
|
+
while netstat -tuln | grep -q ":$port "; do
|
|
13
|
+
port=$((port + 1))
|
|
14
|
+
done
|
|
15
|
+
echo $port
|
|
16
|
+
}
|
|
17
|
+
|
|
9
18
|
# =============================================================================
|
|
10
19
|
# OS Detection and Windows Handling
|
|
11
20
|
# =============================================================================
|
|
@@ -113,6 +122,30 @@ EOF
|
|
|
113
122
|
echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
|
|
114
123
|
echo " SSL Configuration"
|
|
115
124
|
echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
|
|
125
|
+
|
|
126
|
+
# Find an available port for Switchboard
|
|
127
|
+
SWITCHBOARD_PORT=$(find_available_port)
|
|
128
|
+
echo "Using port $SWITCHBOARD_PORT for Switchboard"
|
|
129
|
+
|
|
130
|
+
# Save Switchboard port to configuration
|
|
131
|
+
echo "SWITCHBOARD_PORT=$SWITCHBOARD_PORT" | sudo tee -a .env
|
|
132
|
+
|
|
133
|
+
# Add compression settings to nginx.conf if not exists
|
|
134
|
+
if ! grep -q "brotli_comp_level" /etc/nginx/nginx.conf || ! grep -q "gzip_comp_level" /etc/nginx/nginx.conf; then
|
|
135
|
+
echo "Adding compression settings to nginx.conf..."
|
|
136
|
+
# Find the http block in nginx.conf
|
|
137
|
+
if ! grep -q "brotli_comp_level" /etc/nginx/nginx.conf; then
|
|
138
|
+
sudo sed -i '/http {/a \ # Brotli compression\n brotli on;\n brotli_comp_level 6;\n brotli_types text/plain text/css application/javascript application/json image/svg+xml application/xml+rss;\n brotli_static on;' /etc/nginx/nginx.conf
|
|
139
|
+
fi
|
|
140
|
+
if ! grep -q "gzip_comp_level" /etc/nginx/nginx.conf; then
|
|
141
|
+
sudo sed -i '/http {/a \ # Gzip compression\n gzip on;\n gzip_vary on;\n gzip_proxied any;\n gzip_comp_level 6;\n gzip_buffers 16 8k;\n gzip_http_version 1.1;\n gzip_types text/plain text/css application/javascript application/json image/svg+xml application/xml+rss;' /etc/nginx/nginx.conf
|
|
142
|
+
fi
|
|
143
|
+
else
|
|
144
|
+
echo "Compression settings already present in nginx.conf"
|
|
145
|
+
fi
|
|
146
|
+
|
|
147
|
+
|
|
148
|
+
|
|
116
149
|
echo "Choose SSL configuration:"
|
|
117
150
|
echo "1) Let's Encrypt certificates for domains"
|
|
118
151
|
echo "2) Self-signed certificate for machine hostname"
|
|
@@ -130,116 +163,58 @@ EOF
|
|
|
130
163
|
echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
|
|
131
164
|
read -p "Enter Connect domain (e.g. connect.google.com): " connect_domain
|
|
132
165
|
read -p "Enter Switchboard domain (e.g. switchboard.google.com): " switchboard_domain
|
|
166
|
+
read -p "Enter admin email for Let's Encrypt notifications: " admin_email
|
|
133
167
|
|
|
134
168
|
echo "Using domains:"
|
|
135
169
|
echo "Connect: $connect_domain"
|
|
136
170
|
echo "Switchboard: $switchboard_domain"
|
|
137
171
|
|
|
138
|
-
#
|
|
139
|
-
echo "
|
|
140
|
-
sudo
|
|
141
|
-
sudo openssl req -x509 -nodes -days 1 -newkey rsa:2048 \
|
|
142
|
-
-keyout /etc/nginx/ssl/temp.key \
|
|
143
|
-
-out /etc/nginx/ssl/temp.crt \
|
|
144
|
-
-subj "/CN=$connect_domain" \
|
|
145
|
-
-addext "subjectAltName = DNS:$connect_domain,DNS:$switchboard_domain"
|
|
146
|
-
|
|
147
|
-
# Check if Nginx configuration already exists
|
|
148
|
-
if [ -f "/etc/nginx/sites-available/$PROJECT_NAME" ]; then
|
|
149
|
-
echo "Nginx configuration for $PROJECT_NAME already exists"
|
|
150
|
-
read -p "Do you want to overwrite it? (y/n): " overwrite_nginx
|
|
151
|
-
if [ "$overwrite_nginx" != "y" ]; then
|
|
152
|
-
echo "Keeping existing Nginx configuration"
|
|
153
|
-
else
|
|
154
|
-
# Create Nginx configuration for domains
|
|
155
|
-
echo "Creating Nginx configuration..."
|
|
156
|
-
sudo tee /etc/nginx/sites-available/$PROJECT_NAME > /dev/null << EOF
|
|
157
|
-
# Security headers
|
|
158
|
-
add_header Strict-Transport-Security "max-age=63072000" always;
|
|
159
|
-
add_header X-Frame-Options DENY;
|
|
160
|
-
add_header X-Content-Type-Options nosniff;
|
|
161
|
-
add_header X-XSS-Protection "1; mode=block";
|
|
162
|
-
|
|
163
|
-
# Compression settings
|
|
164
|
-
brotli on;
|
|
165
|
-
brotli_comp_level 6;
|
|
166
|
-
brotli_types text/plain text/css application/javascript application/json image/svg+xml application/xml+rss;
|
|
167
|
-
brotli_static on;
|
|
168
|
-
|
|
172
|
+
# Create initial Nginx configuration for certbot
|
|
173
|
+
echo "Creating initial Nginx configuration..."
|
|
174
|
+
sudo tee /etc/nginx/sites-available/$PROJECT_NAME > /dev/null << EOF
|
|
169
175
|
server {
|
|
170
176
|
listen 80;
|
|
171
177
|
server_name $connect_domain $switchboard_domain;
|
|
172
|
-
return 301 https://\$host\$request_uri;
|
|
173
|
-
}
|
|
174
|
-
|
|
175
|
-
server {
|
|
176
|
-
listen 443 ssl http2;
|
|
177
|
-
server_name $connect_domain;
|
|
178
|
-
|
|
179
|
-
ssl_certificate /etc/nginx/ssl/temp.crt;
|
|
180
|
-
ssl_certificate_key /etc/nginx/ssl/temp.key;
|
|
181
|
-
|
|
182
|
-
# SSL configuration
|
|
183
|
-
ssl_protocols TLSv1.2 TLSv1.3;
|
|
184
|
-
ssl_ciphers ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384;
|
|
185
|
-
ssl_prefer_server_ciphers off;
|
|
186
|
-
ssl_session_timeout 1d;
|
|
187
|
-
ssl_session_cache shared:SSL:50m;
|
|
188
|
-
ssl_session_tickets off;
|
|
189
|
-
ssl_stapling on;
|
|
190
|
-
ssl_stapling_verify on;
|
|
191
|
-
|
|
192
|
-
if (\$http_x_forwarded_proto = "http") {
|
|
193
|
-
return 301 https://\$server_name\$request_uri;
|
|
194
|
-
}
|
|
195
178
|
|
|
196
179
|
location / {
|
|
197
|
-
root
|
|
180
|
+
root /var/www/html/$PROJECT_NAME;
|
|
198
181
|
try_files \$uri \$uri/ /index.html;
|
|
199
|
-
add_header Cache-Control "no-cache";
|
|
200
|
-
add_header X-Forwarded-Proto \$scheme;
|
|
201
|
-
add_header X-Forwarded-Host \$host;
|
|
202
|
-
add_header X-Forwarded-Port \$server_port;
|
|
203
182
|
}
|
|
204
|
-
}
|
|
205
183
|
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
server_name $switchboard_domain;
|
|
209
|
-
|
|
210
|
-
ssl_certificate /etc/nginx/ssl/temp.crt;
|
|
211
|
-
ssl_certificate_key /etc/nginx/ssl/temp.key;
|
|
212
|
-
|
|
213
|
-
location / {
|
|
214
|
-
proxy_pass http://localhost:4001;
|
|
215
|
-
proxy_http_version 1.1;
|
|
216
|
-
proxy_set_header Upgrade \$http_upgrade;
|
|
217
|
-
proxy_set_header Connection 'upgrade';
|
|
218
|
-
proxy_set_header Host \$host;
|
|
219
|
-
proxy_cache_bypass \$http_upgrade;
|
|
220
|
-
proxy_set_header X-Real-IP \$remote_addr;
|
|
221
|
-
proxy_set_header X-Forwarded-For \$proxy_add_x_forwarded_for;
|
|
222
|
-
proxy_set_header X-Forwarded-Proto \$scheme;
|
|
184
|
+
location /.well-known/acme-challenge/ {
|
|
185
|
+
root /var/www/html;
|
|
223
186
|
}
|
|
224
187
|
}
|
|
225
188
|
EOF
|
|
226
|
-
fi
|
|
227
|
-
else
|
|
228
|
-
# Create Nginx configuration for domains
|
|
229
|
-
echo "Creating Nginx configuration..."
|
|
230
|
-
sudo tee /etc/nginx/sites-available/$PROJECT_NAME > /dev/null << EOF
|
|
231
|
-
# Security headers
|
|
232
|
-
add_header Strict-Transport-Security "max-age=63072000" always;
|
|
233
|
-
add_header X-Frame-Options DENY;
|
|
234
|
-
add_header X-Content-Type-Options nosniff;
|
|
235
|
-
add_header X-XSS-Protection "1; mode=block";
|
|
236
|
-
|
|
237
|
-
# Compression settings
|
|
238
|
-
brotli on;
|
|
239
|
-
brotli_comp_level 6;
|
|
240
|
-
brotli_types text/plain text/css application/javascript application/json image/svg+xml application/xml+rss;
|
|
241
|
-
brotli_static on;
|
|
242
189
|
|
|
190
|
+
# Enable the site
|
|
191
|
+
sudo ln -sf /etc/nginx/sites-available/$PROJECT_NAME /etc/nginx/sites-enabled/
|
|
192
|
+
sudo rm -f /etc/nginx/sites-enabled/default
|
|
193
|
+
|
|
194
|
+
# Test Nginx configuration
|
|
195
|
+
sudo nginx -t
|
|
196
|
+
|
|
197
|
+
# Restart Nginx to apply changes
|
|
198
|
+
sudo systemctl restart nginx
|
|
199
|
+
|
|
200
|
+
# Obtain SSL certificates
|
|
201
|
+
echo "Obtaining SSL certificates..."
|
|
202
|
+
sudo certbot --nginx -d $connect_domain --non-interactive --agree-tos --email $admin_email --redirect
|
|
203
|
+
sudo certbot --nginx -d $switchboard_domain --non-interactive --agree-tos --email $admin_email --redirect
|
|
204
|
+
|
|
205
|
+
# Wait for certbot to finish and certificates to be installed
|
|
206
|
+
sleep 5
|
|
207
|
+
|
|
208
|
+
# Check if certificates were installed
|
|
209
|
+
if [ ! -f "/etc/letsencrypt/live/$connect_domain/fullchain.pem" ] || [ ! -f "/etc/letsencrypt/live/$switchboard_domain/fullchain.pem" ]; then
|
|
210
|
+
echo "Error: SSL certificates were not installed properly"
|
|
211
|
+
echo "Please check the certbot logs at /var/log/letsencrypt/letsencrypt.log"
|
|
212
|
+
exit 1
|
|
213
|
+
fi
|
|
214
|
+
|
|
215
|
+
# Update Nginx configuration with proper SSL settings
|
|
216
|
+
echo "Updating Nginx configuration with SSL settings..."
|
|
217
|
+
sudo tee /etc/nginx/sites-available/$PROJECT_NAME > /dev/null << EOF
|
|
243
218
|
server {
|
|
244
219
|
listen 80;
|
|
245
220
|
server_name $connect_domain $switchboard_domain;
|
|
@@ -247,11 +222,12 @@ server {
|
|
|
247
222
|
}
|
|
248
223
|
|
|
249
224
|
server {
|
|
250
|
-
listen 443 ssl
|
|
225
|
+
listen 443 ssl;
|
|
226
|
+
http2 on;
|
|
251
227
|
server_name $connect_domain;
|
|
252
228
|
|
|
253
|
-
ssl_certificate /etc/
|
|
254
|
-
ssl_certificate_key /etc/
|
|
229
|
+
ssl_certificate /etc/letsencrypt/live/$connect_domain/fullchain.pem;
|
|
230
|
+
ssl_certificate_key /etc/letsencrypt/live/$connect_domain/privkey.pem;
|
|
255
231
|
|
|
256
232
|
# SSL configuration
|
|
257
233
|
ssl_protocols TLSv1.2 TLSv1.3;
|
|
@@ -262,6 +238,14 @@ server {
|
|
|
262
238
|
ssl_session_tickets off;
|
|
263
239
|
ssl_stapling on;
|
|
264
240
|
ssl_stapling_verify on;
|
|
241
|
+
resolver 8.8.8.8 8.8.4.4 valid=300s;
|
|
242
|
+
resolver_timeout 5s;
|
|
243
|
+
|
|
244
|
+
# Security headers
|
|
245
|
+
add_header Strict-Transport-Security "max-age=63072000" always;
|
|
246
|
+
add_header X-Frame-Options DENY;
|
|
247
|
+
add_header X-Content-Type-Options nosniff;
|
|
248
|
+
add_header X-XSS-Protection "1; mode=block";
|
|
265
249
|
|
|
266
250
|
if (\$http_x_forwarded_proto = "http") {
|
|
267
251
|
return 301 https://\$server_name\$request_uri;
|
|
@@ -275,17 +259,40 @@ server {
|
|
|
275
259
|
add_header X-Forwarded-Host \$host;
|
|
276
260
|
add_header X-Forwarded-Port \$server_port;
|
|
277
261
|
}
|
|
262
|
+
|
|
263
|
+
location /.well-known/acme-challenge/ {
|
|
264
|
+
root /var/www/html;
|
|
265
|
+
}
|
|
278
266
|
}
|
|
279
267
|
|
|
280
268
|
server {
|
|
281
|
-
listen 443 ssl
|
|
269
|
+
listen 443 ssl;
|
|
270
|
+
http2 on;
|
|
282
271
|
server_name $switchboard_domain;
|
|
283
272
|
|
|
284
|
-
ssl_certificate /etc/
|
|
285
|
-
ssl_certificate_key /etc/
|
|
273
|
+
ssl_certificate /etc/letsencrypt/live/$switchboard_domain/fullchain.pem;
|
|
274
|
+
ssl_certificate_key /etc/letsencrypt/live/$switchboard_domain/privkey.pem;
|
|
275
|
+
|
|
276
|
+
# SSL configuration
|
|
277
|
+
ssl_protocols TLSv1.2 TLSv1.3;
|
|
278
|
+
ssl_ciphers ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384;
|
|
279
|
+
ssl_prefer_server_ciphers off;
|
|
280
|
+
ssl_session_timeout 1d;
|
|
281
|
+
ssl_session_cache shared:SSL:50m;
|
|
282
|
+
ssl_session_tickets off;
|
|
283
|
+
ssl_stapling on;
|
|
284
|
+
ssl_stapling_verify on;
|
|
285
|
+
resolver 8.8.8.8 8.8.4.4 valid=300s;
|
|
286
|
+
resolver_timeout 5s;
|
|
287
|
+
|
|
288
|
+
# Security headers
|
|
289
|
+
add_header Strict-Transport-Security "max-age=63072000" always;
|
|
290
|
+
add_header X-Frame-Options DENY;
|
|
291
|
+
add_header X-Content-Type-Options nosniff;
|
|
292
|
+
add_header X-XSS-Protection "1; mode=block";
|
|
286
293
|
|
|
287
294
|
location / {
|
|
288
|
-
proxy_pass http://localhost
|
|
295
|
+
proxy_pass http://localhost:$SWITCHBOARD_PORT;
|
|
289
296
|
proxy_http_version 1.1;
|
|
290
297
|
proxy_set_header Upgrade \$http_upgrade;
|
|
291
298
|
proxy_set_header Connection 'upgrade';
|
|
@@ -295,23 +302,20 @@ server {
|
|
|
295
302
|
proxy_set_header X-Forwarded-For \$proxy_add_x_forwarded_for;
|
|
296
303
|
proxy_set_header X-Forwarded-Proto \$scheme;
|
|
297
304
|
}
|
|
305
|
+
|
|
306
|
+
location /.well-known/acme-challenge/ {
|
|
307
|
+
root /var/www/html;
|
|
308
|
+
}
|
|
298
309
|
}
|
|
299
310
|
EOF
|
|
300
|
-
fi
|
|
301
|
-
|
|
302
|
-
# Enable the site
|
|
303
|
-
sudo ln -sf /etc/nginx/sites-available/$PROJECT_NAME /etc/nginx/sites-enabled/
|
|
304
|
-
sudo rm -f /etc/nginx/sites-enabled/default
|
|
305
311
|
|
|
306
|
-
# Test Nginx configuration
|
|
307
|
-
sudo nginx -t
|
|
308
|
-
|
|
309
|
-
# Obtain SSL certificates
|
|
310
|
-
echo "Obtaining SSL certificates..."
|
|
311
|
-
sudo certbot --nginx -d $connect_domain -d $switchboard_domain --non-interactive --agree-tos --email admin@$connect_domain
|
|
312
|
+
# Test and reload Nginx configuration
|
|
313
|
+
sudo nginx -t && sudo systemctl reload nginx
|
|
312
314
|
|
|
313
|
-
#
|
|
314
|
-
|
|
315
|
+
# Set up automatic renewal
|
|
316
|
+
echo "Setting up automatic certificate renewal..."
|
|
317
|
+
sudo systemctl enable certbot.timer
|
|
318
|
+
sudo systemctl start certbot.timer
|
|
315
319
|
|
|
316
320
|
else
|
|
317
321
|
# Get machine hostname
|
|
@@ -328,18 +332,6 @@ EOF
|
|
|
328
332
|
# Create Nginx configuration for self-signed
|
|
329
333
|
echo "Creating Nginx configuration..."
|
|
330
334
|
sudo tee /etc/nginx/sites-available/$PROJECT_NAME > /dev/null << EOF
|
|
331
|
-
# Security headers
|
|
332
|
-
add_header Strict-Transport-Security "max-age=63072000" always;
|
|
333
|
-
add_header X-Frame-Options DENY;
|
|
334
|
-
add_header X-Content-Type-Options nosniff;
|
|
335
|
-
add_header X-XSS-Protection "1; mode=block";
|
|
336
|
-
|
|
337
|
-
# Compression settings
|
|
338
|
-
brotli on;
|
|
339
|
-
brotli_comp_level 6;
|
|
340
|
-
brotli_types text/plain text/css application/javascript application/json image/svg+xml application/xml+rss;
|
|
341
|
-
brotli_static on;
|
|
342
|
-
|
|
343
335
|
server {
|
|
344
336
|
listen 80;
|
|
345
337
|
server_name $hostname;
|
|
@@ -347,7 +339,8 @@ server {
|
|
|
347
339
|
}
|
|
348
340
|
|
|
349
341
|
server {
|
|
350
|
-
listen 443 ssl
|
|
342
|
+
listen 443 ssl;
|
|
343
|
+
http2 on;
|
|
351
344
|
server_name $hostname;
|
|
352
345
|
|
|
353
346
|
ssl_certificate /etc/ssl/certs/$hostname.crt;
|
|
@@ -366,7 +359,7 @@ server {
|
|
|
366
359
|
}
|
|
367
360
|
|
|
368
361
|
location /switchboard {
|
|
369
|
-
proxy_pass http://localhost
|
|
362
|
+
proxy_pass http://localhost:$SWITCHBOARD_PORT;
|
|
370
363
|
proxy_http_version 1.1;
|
|
371
364
|
proxy_set_header Upgrade \$http_upgrade;
|
|
372
365
|
proxy_set_header Connection 'upgrade';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"connect.d.ts","sourceRoot":"","sources":["../../../src/commands/connect.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAMpC,OAAO,EAAE,KAAK,cAAc,EAAE,MAAM,wBAAwB,CAAC;AAC7D,OAAO,EAAE,KAAK,iBAAiB,EAAE,MAAM,aAAa,CAAC;AASrD,eAAO,MAAM,OAAO,EAAE,iBAAiB,CACrC;IAAC,cAAc;CAAC,EAChB,OAAO,CAAC,IAAI,CAAC,CAGd,CAAC;
|
|
1
|
+
{"version":3,"file":"connect.d.ts","sourceRoot":"","sources":["../../../src/commands/connect.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAMpC,OAAO,EAAE,KAAK,cAAc,EAAE,MAAM,wBAAwB,CAAC;AAC7D,OAAO,EAAE,KAAK,iBAAiB,EAAE,MAAM,aAAa,CAAC;AASrD,eAAO,MAAM,OAAO,EAAE,iBAAiB,CACrC;IAAC,cAAc;CAAC,EAChB,OAAO,CAAC,IAAI,CAAC,CAGd,CAAC;AA6CF,wBAAgB,cAAc,CAAC,OAAO,EAAE,OAAO,QAY9C"}
|
|
@@ -23,6 +23,7 @@ const studioCommand = new Command("studio")
|
|
|
23
23
|
setCustomHelp(studioCommand, connectStudioHelp);
|
|
24
24
|
const buildCommand = new Command("build")
|
|
25
25
|
.description("Build Connect project")
|
|
26
|
+
.option("--base <base>", "Base path for the app")
|
|
26
27
|
.option("--project-root <path>", "The root directory of the project", process.cwd())
|
|
27
28
|
.option("--assets-dir-name <name>", "The name of the assets directory")
|
|
28
29
|
.option("--external-packages-file-name <name>", "The name of the external packages file")
|
|
@@ -34,6 +35,7 @@ const buildCommand = new Command("build")
|
|
|
34
35
|
setCustomHelp(buildCommand, connectBuildHelp);
|
|
35
36
|
const previewCommand = new Command("preview")
|
|
36
37
|
.description("Preview built Connect project")
|
|
38
|
+
.option("--base <base>", "Base path for the app")
|
|
37
39
|
.option("--project-root <path>", "The root directory of the project")
|
|
38
40
|
.option("-p, --port <port>", "The port to run the server on", "4173")
|
|
39
41
|
.option("--open", "Open the browser")
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"connect.js","sourceRoot":"","sources":["../../../src/commands/connect.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,YAAY,EACZ,cAAc,GAGf,MAAM,4CAA4C,CAAC;AACpD,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EACL,gBAAgB,EAChB,kBAAkB,EAClB,iBAAiB,GAClB,MAAM,YAAY,CAAC;AAGpB,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAE5C,KAAK,UAAU,YAAY,CAAC,OAAuB;IACjD,MAAM,OAAO,GAAG,MAAM,MAAM,CAAC,wBAAwB,CAAC,CAAC;IACvD,MAAM,EAAE,YAAY,EAAE,GAAG,OAAO,CAAC;IACjC,OAAO,YAAY,CAAC,OAAO,CAAC,CAAC;AAC/B,CAAC;AAED,MAAM,CAAC,MAAM,OAAO,GAGhB,KAAK,EAAE,OAAO,EAAE,EAAE;IACpB,OAAO,YAAY,CAAC,OAAO,CAAC,CAAC;AAC/B,CAAC,CAAC;AAEF,MAAM,aAAa,GAAG,IAAI,OAAO,CAAC,QAAQ,CAAC;KACxC,WAAW,CAAC,iCAAiC,CAAC;KAC9C,MAAM,CAAC,mBAAmB,EAAE,2BAA2B,EAAE,MAAM,CAAC;KAChE,MAAM,CAAC,YAAY,EAAE,kCAAkC,CAAC;KACxD,MAAM,CAAC,SAAS,EAAE,cAAc,CAAC;KACjC,MAAM,CAAC,QAAQ,EAAE,kBAAkB,CAAC;KACpC,MAAM,CAAC,4BAA4B,EAAE,uCAAuC,CAAC;KAC7E,MAAM,CAAC,KAAK,EAAE,GAAG,IAAsB,EAAE,EAAE;IAC1C,MAAM,OAAO,CAAC,GAAG,IAAI,CAAC,CAAC;AACzB,CAAC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;QACE,KAAK,CAAC,EAAE,OAAO,CAAC;QAChB,MAAM,CAAC,EAAE,OAAO,CAAC;QACjB,SAAS,CAAC,EAAE,OAAO,CAAC;QACpB,cAAc,CAAC,EAAE,MAAM,CAAC;KACzB;CACF,CA6GF,CAAC;AAEF,wBAAgB,cAAc,CAAC,OAAO,EAAE,OAAO,QAoB9C"}
|
|
@@ -22,20 +22,26 @@ export const install = (dependencies, options) => {
|
|
|
22
22
|
}
|
|
23
23
|
// Parse package names to extract version/tag
|
|
24
24
|
const parsedDependencies = dependencies.map((dep) => {
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
25
|
+
// Handle scoped packages (@org/package[@version])
|
|
26
|
+
if (dep.startsWith("@")) {
|
|
27
|
+
const matches = /^(@[^/]+\/[^@]+)(?:@(.+))?$/.exec(dep);
|
|
28
|
+
if (!matches) {
|
|
29
|
+
throw new Error(`Invalid scoped package name format: ${dep}`);
|
|
30
|
+
}
|
|
31
|
+
return {
|
|
32
|
+
name: matches[1],
|
|
33
|
+
version: matches[2] || "latest",
|
|
34
|
+
full: dep,
|
|
35
|
+
};
|
|
31
36
|
}
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
37
|
+
// Handle regular packages (package[@version])
|
|
38
|
+
const matches = /^([^@]+)(?:@(.+))?$/.exec(dep);
|
|
39
|
+
if (!matches) {
|
|
40
|
+
throw new Error(`Invalid package name format: ${dep}`);
|
|
35
41
|
}
|
|
36
42
|
return {
|
|
37
|
-
name:
|
|
38
|
-
version:
|
|
43
|
+
name: matches[1],
|
|
44
|
+
version: matches[2] || "latest",
|
|
39
45
|
full: dep,
|
|
40
46
|
};
|
|
41
47
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"install.js","sourceRoot":"","sources":["../../../src/commands/install.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAC9C,OA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,yEAAyE,CAC1E;SACA,MAAM,CACL,oCAAoC,EACpC,8BAA8B,CAC/B;SACA,MAAM,CAAC,OAAO,CAAC,CAAC;IAEnB,aAAa,CAAC,OAAO,EAAE,WAAW,CAAC,CAAC;AACtC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"uninstall.d.ts","sourceRoot":"","sources":["../../../src/commands/uninstall.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,OAAO,EAAE,MAAM,WAAW,CAAC;AAKzC,OAAO,EAAE,KAAK,iBAAiB,EAAE,MAAM,aAAa,CAAC;AACrD,OAAO,EAGL,KAAK,cAAc,EAKpB,MAAM,aAAa,CAAC;AAErB,wBAAgB,mBAAmB,CACjC,cAAc,EAAE,cAAc,EAC9B,YAAY,EAAE,MAAM,EAAE,EACtB,WAAW,EAAE,MAAM,EACnB,SAAS,CAAC,EAAE,OAAO,QAuBpB;AAED,eAAO,MAAM,SAAS,EAAE,iBAAiB,CACvC;IACE,MAAM,EAAE,GAAG,SAAS;IACpB;QACE,KAAK,CAAC,EAAE,OAAO,CAAC;QAChB,MAAM,CAAC,EAAE,OAAO,CAAC;QACjB,SAAS,CAAC,EAAE,OAAO,CAAC;QACpB,cAAc,CAAC,EAAE,MAAM,CAAC;KACzB;CACF,
|
|
1
|
+
{"version":3,"file":"uninstall.d.ts","sourceRoot":"","sources":["../../../src/commands/uninstall.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,OAAO,EAAE,MAAM,WAAW,CAAC;AAKzC,OAAO,EAAE,KAAK,iBAAiB,EAAE,MAAM,aAAa,CAAC;AACrD,OAAO,EAGL,KAAK,cAAc,EAKpB,MAAM,aAAa,CAAC;AAErB,wBAAgB,mBAAmB,CACjC,cAAc,EAAE,cAAc,EAC9B,YAAY,EAAE,MAAM,EAAE,EACtB,WAAW,EAAE,MAAM,EACnB,SAAS,CAAC,EAAE,OAAO,QAuBpB;AAED,eAAO,MAAM,SAAS,EAAE,iBAAiB,CACvC;IACE,MAAM,EAAE,GAAG,SAAS;IACpB;QACE,KAAK,CAAC,EAAE,OAAO,CAAC;QAChB,MAAM,CAAC,EAAE,OAAO,CAAC;QACjB,SAAS,CAAC,EAAE,OAAO,CAAC;QACpB,cAAc,CAAC,EAAE,MAAM,CAAC;KACzB;CACF,CAkGF,CAAC;AAEF,wBAAgB,gBAAgB,CAAC,OAAO,EAAE,OAAO,QAmBhD"}
|
|
@@ -24,12 +24,31 @@ export const uninstall = (dependencies, options) => {
|
|
|
24
24
|
if (!dependencies || dependencies.length === 0) {
|
|
25
25
|
throw new Error("❌ Dependency name is required");
|
|
26
26
|
}
|
|
27
|
-
//
|
|
28
|
-
const parsedDependencies = dependencies.map((dep) =>
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
27
|
+
// Parse package names to extract version/tag
|
|
28
|
+
const parsedDependencies = dependencies.map((dep) => {
|
|
29
|
+
// Handle scoped packages (@org/package[@version])
|
|
30
|
+
if (dep.startsWith("@")) {
|
|
31
|
+
const matches = /^(@[^/]+\/[^@]+)(?:@(.+))?$/.exec(dep);
|
|
32
|
+
if (!matches) {
|
|
33
|
+
throw new Error(`Invalid scoped package name format: ${dep}`);
|
|
34
|
+
}
|
|
35
|
+
return {
|
|
36
|
+
name: matches[1],
|
|
37
|
+
version: matches[2] || "latest",
|
|
38
|
+
full: dep,
|
|
39
|
+
};
|
|
40
|
+
}
|
|
41
|
+
// Handle regular packages (package[@version])
|
|
42
|
+
const matches = /^([^@]+)(?:@(.+))?$/.exec(dep);
|
|
43
|
+
if (!matches) {
|
|
44
|
+
throw new Error(`Invalid package name format: ${dep}`);
|
|
45
|
+
}
|
|
46
|
+
return {
|
|
47
|
+
name: matches[1],
|
|
48
|
+
version: matches[2] || "latest",
|
|
49
|
+
full: dep,
|
|
50
|
+
};
|
|
51
|
+
});
|
|
33
52
|
if (options.debug) {
|
|
34
53
|
console.log(">>> parsedDependencies", parsedDependencies);
|
|
35
54
|
}
|
|
@@ -53,7 +72,7 @@ export const uninstall = (dependencies, options) => {
|
|
|
53
72
|
}
|
|
54
73
|
try {
|
|
55
74
|
console.log("Uninstalling dependencies 📦 ...");
|
|
56
|
-
uninstallDependency(packageManager,
|
|
75
|
+
uninstallDependency(packageManager, parsedDependencies.map((dep) => dep.name), projectInfo.path, options.workspace);
|
|
57
76
|
console.log("Dependency uninstalled successfully 🎉");
|
|
58
77
|
}
|
|
59
78
|
catch (error) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"uninstall.js","sourceRoot":"","sources":["../../../src/commands/uninstall.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAC9C,OAAO,EAAE,MAAM,SAAS,CAAC;AAEzB,OAAO,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAE3C,OAAO,EACL,6BAA6B,EAC7B,cAAc,EAEd,eAAe,EACf,aAAa,EACb,0BAA0B,EAC1B,gBAAgB,GACjB,MAAM,aAAa,CAAC;AAErB,MAAM,UAAU,mBAAmB,CACjC,cAA8B,EAC9B,YAAsB,EACtB,WAAmB,EACnB,SAAmB;IAEnB,IAAI,CAAC,EAAE,CAAC,UAAU,CAAC,WAAW,CAAC,EAAE,CAAC;QAChC,MAAM,IAAI,KAAK,CAAC,2BAA2B,WAAW,EAAE,CAAC,CAAC;IAC5D,CAAC;IAED,MAAM,OAAO,GAAG,eAAe,CAAC,cAAc,CAAC,CAAC;IAEhD,IAAI,gBAAgB,GAAG,OAAO,CAAC,gBAAgB,CAAC,OAAO,CACrD,gBAAgB,EAChB,YAAY,CAAC,IAAI,CAAC,GAAG,CAAC,CACvB,CAAC;IAEF,IAAI,SAAS,EAAE,CAAC;QACd,gBAAgB,IAAI,IAAI,OAAO,CAAC,eAAe,EAAE,CAAC;IACpD,CAAC;IAED,MAAM,cAAc,GAAG,EAAE,GAAG,EAAE,WAAW,EAAE,CAAC;IAE5C,QAAQ,CAAC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AC,mCAAmC,CAAC;SAChD,QAAQ,CAAC,mBAAmB,EAAE,qCAAqC,CAAC;SACpE,MAAM,CAAC,cAAc,EAAE,gCAAgC,CAAC;SACxD,MAAM,CAAC,SAAS,EAAE,sBAAsB,CAAC;SACzC,MAAM,CACL,iBAAiB,EACjB,2EAA2E,CAC5E;SACA,MAAM,CACL,oCAAoC,EACpC,8BAA8B,CAC/B;SACA,MAAM,CAAC,SAAS,CAAC,CAAC;IAErB,aAAa,CAAC,OAAO,EAAE,aAAa,CAAC,CAAC;AACxC,CAAC"}
|
package/dist/src/help.d.ts
CHANGED
|
@@ -5,11 +5,11 @@ export declare const connectStudioHelp = "\nCommand Overview:\n The connect com
|
|
|
5
5
|
/**
|
|
6
6
|
* Help text for the connect build command
|
|
7
7
|
*/
|
|
8
|
-
export declare const connectBuildHelp = "\nCommand Overview:\n The Connect build command creates a connect build with the project's local and external packages included.\n\nOptions:\n --project-root <path> The root directory of the project. Default is \"process.cwd()\".\n --assets-dir-name <name> The name of the assets directory. Default is \"assets\".\n --external-packages-file-name <name> The name of the external packages file. Default is \"external-packages.js\".\n --styles-file-name <name> The name of the styles file. Default is \"style.css\".\n --connect-path <path> The path to the Connect dist directory. Calls \"resolveConnect()\" if not provided.\n";
|
|
8
|
+
export declare const connectBuildHelp = "\nCommand Overview:\n The Connect build command creates a connect build with the project's local and external packages included.\n\nOptions:\n --base <path> The base path for the app. Default is \"/\".\n --project-root <path> The root directory of the project. Default is \"process.cwd()\".\n --assets-dir-name <name> The name of the assets directory. Default is \"assets\".\n --external-packages-file-name <name> The name of the external packages file. Default is \"external-packages.js\".\n --styles-file-name <name> The name of the styles file. Default is \"style.css\".\n --connect-path <path> The path to the Connect dist directory. Calls \"resolveConnect()\" if not provided.\n";
|
|
9
9
|
/**
|
|
10
10
|
* Help text for the connect preview command
|
|
11
11
|
*/
|
|
12
|
-
export declare const connectPreviewHelp = "\nCommand Overview:\n The Connect preview command previews a built Connect project.\n NOTE: You must run `ph connect build` first.\n\nOptions:\n --project-root <path> The root directory of the project. Default is \"process.cwd()\".\n --port <port> The port to run the server on. Default is 4173.\n --open Open the browser. Default is true.\n";
|
|
12
|
+
export declare const connectPreviewHelp = "\nCommand Overview:\n The Connect preview command previews a built Connect project.\n NOTE: You must run `ph connect build` first.\n\nOptions:\n --base <path> The base path for the app. Default is \"/\".\n --project-root <path> The root directory of the project. Default is \"process.cwd()\".\n --port <port> The port to run the server on. Default is 4173.\n --open Open the browser. Default is true.\n";
|
|
13
13
|
/**
|
|
14
14
|
* Help text for the generate command
|
|
15
15
|
*/
|
|
@@ -37,7 +37,7 @@ export declare const inspectHelp = "\nCommand Overview:\n The inspect command e
|
|
|
37
37
|
/**
|
|
38
38
|
* Help text for the service command
|
|
39
39
|
*/
|
|
40
|
-
export declare const serviceHelp = "\nCommand Overview:\n The service command manages Powerhouse services, allowing you to start, stop, check status,\n and more. It provides a centralized way to control the lifecycle of services in your project.\n\n This command:\n 1. Controls service lifecycle (start, stop, status, etc.)\n 2. Manages multiple services from a single interface\n 3. Provides detailed information about running services\n 4. Uses PM2 under the hood for process management\n\nArguments:\n <action> The action to perform. Available actions:\n - start: Launch the specified service\n - stop: Terminate the specified service\n - status: Check the current status of services\n - list: List all managed services (default)\n - startup: Configure services to start on system boot\n - unstartup: Remove services from system startup\n \n [service] Optional. The service to act upon. Available services:\n - switchboard: The document processing engine\n - connect: The Connect Studio interface\n - all: Act on all services (default)\n\nExamples:\n $ ph service
|
|
40
|
+
export declare const serviceHelp = "\nCommand Overview:\n The service command manages Powerhouse services, allowing you to start, stop, check status,\n and more. It provides a centralized way to control the lifecycle of services in your project.\n\n This command:\n 1. Controls service lifecycle (start, stop, status, etc.)\n 2. Manages multiple services from a single interface\n 3. Provides detailed information about running services\n 4. Uses PM2 under the hood for process management\n\nArguments:\n <action> The action to perform. Available actions:\n - start: Launch the specified service\n - stop: Terminate the specified service\n - status: Check the current status of services\n - list: List all managed services (default)\n - startup: Configure services to start on system boot\n - unstartup: Remove services from system startup\n \n [service] Optional. The service to act upon. Available services:\n - switchboard: The document processing engine\n - connect: The Connect Studio interface\n - all: Act on all services (default)\n\nExamples:\n $ ph service setup # Setup services\n $ ph service start # Start the services\n $ ph service stop # Stop the services\n $ ph service status # Check status of all services\n \n\nNotes:\n - Services are managed using PM2, a process manager for Node.js applications\n - The 'status' action shows uptime, memory usage, CPU usage, and other metrics\n - The 'list' action is the default when no action is specified\n - The 'all' service is the default when no service is specified\n";
|
|
41
41
|
/**
|
|
42
42
|
* Help text for the switchboard command
|
|
43
43
|
*/
|
package/dist/src/help.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"help.d.ts","sourceRoot":"","sources":["../../src/help.ts"],"names":[],"mappings":"AAMA;;GAEG;AACH,eAAO,MAAM,iBAAiB,itDAkC7B,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,gBAAgB,
|
|
1
|
+
{"version":3,"file":"help.d.ts","sourceRoot":"","sources":["../../src/help.ts"],"names":[],"mappings":"AAMA;;GAEG;AACH,eAAO,MAAM,iBAAiB,itDAkC7B,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,gBAAgB,yrBAW5B,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,kBAAkB,gcAU9B,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,YAAY,kpGA0DxB,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,WAAW,+jEAsCvB,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,aAAa,4pEAwCzB,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,QAAQ,ypCA2BpB,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,OAAO,m7DAoCnB,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,WAAW,miDAkCvB,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,WAAW,+zDAqCvB,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,eAAe,ixDAoC3B,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,WAAW,s6DAuCvB,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,WAAW,2kCA0BvB,CAAC"}
|
package/dist/src/help.js
CHANGED
|
@@ -45,6 +45,7 @@ Command Overview:
|
|
|
45
45
|
The Connect build command creates a connect build with the project's local and external packages included.
|
|
46
46
|
|
|
47
47
|
Options:
|
|
48
|
+
--base <path> The base path for the app. Default is "/".
|
|
48
49
|
--project-root <path> The root directory of the project. Default is "process.cwd()".
|
|
49
50
|
--assets-dir-name <name> The name of the assets directory. Default is "${DEFAULT_ASSETS_DIR_NAME}".
|
|
50
51
|
--external-packages-file-name <name> The name of the external packages file. Default is "${DEFAULT_EXTERNAL_PACKAGES_FILE_NAME}".
|
|
@@ -60,6 +61,7 @@ Command Overview:
|
|
|
60
61
|
NOTE: You must run \`ph connect build\` first.
|
|
61
62
|
|
|
62
63
|
Options:
|
|
64
|
+
--base <path> The base path for the app. Default is "/".
|
|
63
65
|
--project-root <path> The root directory of the project. Default is "process.cwd()".
|
|
64
66
|
--port <port> The port to run the server on. Default is 4173.
|
|
65
67
|
--open Open the browser. Default is true.
|
|
@@ -350,13 +352,11 @@ Arguments:
|
|
|
350
352
|
- all: Act on all services (default)
|
|
351
353
|
|
|
352
354
|
Examples:
|
|
353
|
-
$ ph service
|
|
354
|
-
$ ph service start
|
|
355
|
-
$ ph service stop
|
|
356
|
-
$ ph service start all # Start all services
|
|
355
|
+
$ ph service setup # Setup services
|
|
356
|
+
$ ph service start # Start the services
|
|
357
|
+
$ ph service stop # Stop the services
|
|
357
358
|
$ ph service status # Check status of all services
|
|
358
|
-
|
|
359
|
-
$ ph service unstartup # Remove services from system startup
|
|
359
|
+
|
|
360
360
|
|
|
361
361
|
Notes:
|
|
362
362
|
- Services are managed using PM2, a process manager for Node.js applications
|