easy-devops 0.2.7 → 1.0.1
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/README.md +97 -53
- package/install.sh +34 -12
- package/package.json +11 -12
- package/{cli → src/cli}/index.js +28 -6
- package/{cli → src/cli}/managers/domain-manager.js +143 -35
- package/{cli → src/cli}/managers/nginx-manager.js +43 -10
- package/src/cli/managers/ssl-manager.js +678 -0
- package/{cli → src/cli}/menus/dashboard.js +1 -1
- package/{cli → src/cli}/menus/settings.js +27 -8
- package/{cli → src/cli}/menus/update.js +1 -1
- package/{core → src/core}/config.js +5 -2
- package/{core → src/core}/db.js +1 -1
- package/{core → src/core}/detector.js +50 -87
- package/{core → src/core}/nginx-conf-generator.js +101 -64
- package/src/core/platform.js +61 -0
- package/{core → src/core}/shell.js +38 -2
- package/src/core/validators.js +96 -0
- package/{dashboard → src/dashboard}/lib/cert-reader.js +5 -5
- package/{dashboard → src/dashboard}/lib/nginx-service.js +47 -77
- package/src/dashboard/public/img/icon.png +0 -0
- package/src/dashboard/public/img/icon_b.png +0 -0
- package/{dashboard → src/dashboard}/public/js/app.js +206 -30
- package/{dashboard → src/dashboard}/routes/domains.js +96 -72
- package/{dashboard → src/dashboard}/routes/settings.js +19 -11
- package/src/dashboard/routes/ssl.js +281 -0
- package/src/dashboard/views/index.ejs +652 -0
- package/src/dashboard/views/partials/domain-form.ejs +356 -0
- package/src/dashboard/views/partials/domains-panel.ejs +101 -0
- package/src/dashboard/views/partials/login.ejs +167 -0
- package/src/dashboard/views/partials/nginx-panel.ejs +153 -0
- package/src/dashboard/views/partials/overview.ejs +142 -0
- package/src/dashboard/views/partials/settings-panel.ejs +68 -0
- package/src/dashboard/views/partials/sidebar.ejs +96 -0
- package/src/dashboard/views/partials/ssl-panel.ejs +176 -0
- package/{lib → src/lib}/installer/nvm-bootstrap.sh +8 -8
- package/{lib → src/lib}/installer/picker.sh +33 -16
- package/cli/managers/ssl-manager.js +0 -963
- package/dashboard/routes/ssl.js +0 -140
- package/dashboard/views/index.ejs +0 -327
- package/dashboard/views/partials/domain-form.ejs +0 -257
- package/dashboard/views/partials/domains-panel.ejs +0 -66
- package/dashboard/views/partials/login.ejs +0 -50
- package/dashboard/views/partials/nginx-panel.ejs +0 -90
- package/dashboard/views/partials/overview.ejs +0 -67
- package/dashboard/views/partials/settings-panel.ejs +0 -37
- package/dashboard/views/partials/sidebar.ejs +0 -45
- package/dashboard/views/partials/ssl-panel.ejs +0 -95
- /package/{cli → src/cli}/managers/node-manager.js +0 -0
- /package/{cli → src/cli}/menus/.gitkeep +0 -0
- /package/{cli → src/cli}/menus/domains.js +0 -0
- /package/{cli → src/cli}/menus/nginx.js +0 -0
- /package/{cli → src/cli}/menus/nodejs.js +0 -0
- /package/{cli → src/cli}/menus/ssl.js +0 -0
- /package/{dashboard → src/dashboard}/lib/.gitkeep +0 -0
- /package/{dashboard → src/dashboard}/lib/domains-db.js +0 -0
- /package/{dashboard → src/dashboard}/lib/nginx-conf-generator.js +0 -0
- /package/{dashboard → src/dashboard}/routes/.gitkeep +0 -0
- /package/{dashboard → src/dashboard}/routes/auth.js +0 -0
- /package/{dashboard → src/dashboard}/routes/nginx.js +0 -0
- /package/{dashboard → src/dashboard}/server.js +0 -0
- /package/{lib → src/lib}/installer/.gitkeep +0 -0
- /package/{lib → src/lib}/installer/detect.sh +0 -0
- /package/{lib → src/lib}/installer/node-versions.sh +0 -0
- /package/{lib → src/lib}/installer/progress.sh +0 -0
- /package/{lib → src/lib}/installer/winget-install.ps1 +0 -0
package/README.md
CHANGED
|
@@ -1,3 +1,7 @@
|
|
|
1
|
+
<p align="center">
|
|
2
|
+
<img src="dashboard/public/img/icon.png" alt="Easy DevOps" width="100" />
|
|
3
|
+
</p>
|
|
4
|
+
|
|
1
5
|
# Easy DevOps
|
|
2
6
|
|
|
3
7
|
[](https://badge.fury.io/js/easy-devops)
|
|
@@ -6,23 +10,25 @@
|
|
|
6
10
|
|
|
7
11
|
A unified DevOps management tool with interactive CLI and web dashboard for managing **Nginx**, **SSL certificates**, and **Node.js** on Linux and Windows servers.
|
|
8
12
|
|
|
13
|
+
No external ACME binaries required — SSL certificates are issued via [`acme-client`](https://www.npmjs.com/package/acme-client) (pure Node.js, Let's Encrypt).
|
|
14
|
+
|
|
9
15
|
## Features
|
|
10
16
|
|
|
11
17
|
- **🖥️ Interactive CLI** — Arrow-key menus with real-time status indicators
|
|
12
|
-
- **📊 Web Dashboard** — Modern Vue 3 interface with dark/light themes
|
|
13
|
-
- **🌐 Nginx Management** — Start/stop/reload, config editor, error logs
|
|
14
|
-
- **🔒 SSL Certificate Management** — Let's Encrypt via
|
|
15
|
-
- **🔗 Domain Management** — Reverse proxy
|
|
16
|
-
- **📦 Node.js Manager** — Version switching via nvm, global package management
|
|
18
|
+
- **📊 Web Dashboard** — Modern Vue 3 interface with dark/light themes (`#161616` / `#d64a29` palette)
|
|
19
|
+
- **🌐 Nginx Management** — Start/stop/reload, config editor, error logs, install
|
|
20
|
+
- **🔒 SSL Certificate Management** — Let's Encrypt via `acme-client` (no certbot), HTTP-01 and DNS-01 challenges, wildcard certs, expiry tracking
|
|
21
|
+
- **🔗 Domain Management** — Reverse proxy configs with SSL, external URL backends, enable/disable, wildcard domains, WebSocket, gzip, rate limiting
|
|
22
|
+
- **📦 Node.js Manager** — Version switching via nvm / nvm-windows, global package management
|
|
17
23
|
- **🔄 Real-time Updates** — Socket.io powered status updates in dashboard
|
|
18
24
|
- **💿 SQLite Storage** — Persistent configuration via `good.db`
|
|
19
25
|
|
|
20
26
|
## Requirements
|
|
21
27
|
|
|
22
28
|
- **Node.js 18+** (with npm)
|
|
23
|
-
- **Linux** (Debian/Ubuntu) or **Windows**
|
|
24
|
-
- ⚠️ **Windows users: PowerShell must be run as Administrator** (required for
|
|
25
|
-
- Optional: Nginx,
|
|
29
|
+
- **Linux** (Debian/Ubuntu/etc.) or **Windows**
|
|
30
|
+
- ⚠️ **Windows users: PowerShell must be run as Administrator** (required for managing services and SSL certificates)
|
|
31
|
+
- Optional: Nginx, nvm (installed separately or via the tool)
|
|
26
32
|
|
|
27
33
|
## Installation
|
|
28
34
|
|
|
@@ -39,13 +45,13 @@ If you **don't have Node.js** yet, use the bootstrap installer:
|
|
|
39
45
|
#### Linux / macOS
|
|
40
46
|
|
|
41
47
|
```bash
|
|
42
|
-
curl -fsSL https://raw.githubusercontent.com/omar00050/Easy-DevOps/main/install.sh
|
|
48
|
+
curl -fsSL https://raw.githubusercontent.com/omar00050/Easy-DevOps/main/install.sh -o install.sh && bash install.sh
|
|
43
49
|
```
|
|
44
50
|
|
|
45
51
|
Or with wget:
|
|
46
52
|
|
|
47
53
|
```bash
|
|
48
|
-
wget -qO
|
|
54
|
+
wget -qO install.sh https://raw.githubusercontent.com/omar00050/Easy-DevOps/main/install.sh && bash install.sh
|
|
49
55
|
```
|
|
50
56
|
|
|
51
57
|
#### Windows (PowerShell)
|
|
@@ -98,11 +104,14 @@ npx easy-devops
|
|
|
98
104
|
### CLI Overview
|
|
99
105
|
|
|
100
106
|
```
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
107
|
+
███████╗███████╗ Easy DevOps v1.0.0
|
|
108
|
+
██╔════╝╚════██╗ ─────────────────────
|
|
109
|
+
█████╗ ██╔╝ CLI & Web Dashboard
|
|
110
|
+
██╔══╝ ██╔╝ Nginx · SSL · Domains · Node.js
|
|
111
|
+
███████╗ ██████╗
|
|
112
|
+
╚══════╝ ╚═════╝
|
|
104
113
|
|
|
105
|
-
nginx: ✅ v1.26.2 |
|
|
114
|
+
nginx: ✅ v1.26.2 | ACME: acme-client | node: v22.21.1
|
|
106
115
|
|
|
107
116
|
? Select an option:
|
|
108
117
|
📦 Node.js Manager
|
|
@@ -111,6 +120,7 @@ nginx: ✅ v1.26.2 | certbot: ✅ v2.9.0 | node: v22.21.1
|
|
|
111
120
|
🔗 Domain Manager
|
|
112
121
|
🎛️ Open Dashboard
|
|
113
122
|
⚙️ Settings
|
|
123
|
+
🔄 Check for Updates
|
|
114
124
|
✖ Exit
|
|
115
125
|
```
|
|
116
126
|
|
|
@@ -150,13 +160,16 @@ Manage Nginx reverse proxy configurations from CLI or dashboard.
|
|
|
150
160
|
|
|
151
161
|
| Option | Description |
|
|
152
162
|
|--------|-------------|
|
|
153
|
-
| List Domains | Show all configured domains in a table |
|
|
163
|
+
| List Domains | Show all configured domains in a table (with status) |
|
|
154
164
|
| Add Domain | Interactive prompts for domain configuration |
|
|
155
165
|
| Edit Domain | Modify existing domain settings |
|
|
156
|
-
|
|
|
166
|
+
| Enable / Disable Domain | Toggle domain on/off without deleting config |
|
|
167
|
+
| Delete Domain | Remove domain (with option to also delete SSL files) |
|
|
157
168
|
|
|
158
169
|
**Domain Configuration Options:**
|
|
159
|
-
-
|
|
170
|
+
- Backend: local host:port (`127.0.0.1:3000`) or full external URL (`https://app.vercel.app`)
|
|
171
|
+
- Wildcard domain (`*.example.com`) — auto-enforces DNS-01 SSL validation
|
|
172
|
+
- SSL/HTTPS with certificate management
|
|
160
173
|
- WebSocket support (`ws` upstream type)
|
|
161
174
|
- Gzip compression
|
|
162
175
|
- Rate limiting (requests/second + burst)
|
|
@@ -168,7 +181,7 @@ Manage Nginx reverse proxy configurations from CLI or dashboard.
|
|
|
168
181
|
|
|
169
182
|
### SSL Manager
|
|
170
183
|
|
|
171
|
-
|
|
184
|
+
Issue and renew Let's Encrypt SSL certificates via `acme-client` — no certbot or external binaries required.
|
|
172
185
|
|
|
173
186
|
| Status | Meaning |
|
|
174
187
|
|--------|---------|
|
|
@@ -176,21 +189,28 @@ Manage Let's Encrypt SSL certificates using Certbot.
|
|
|
176
189
|
| ⚠️ yellow | Expiring soon (10–30 days) |
|
|
177
190
|
| ❌ red | Critical (< 10 days) |
|
|
178
191
|
|
|
179
|
-
|
|
192
|
+
#### Challenge Methods
|
|
180
193
|
|
|
181
|
-
|
|
194
|
+
| Method | How it works |
|
|
195
|
+
|--------|-------------|
|
|
196
|
+
| **HTTP-01** | Easy DevOps stops nginx, binds port 80, serves the ACME token, then restarts nginx |
|
|
197
|
+
| **DNS-01** | You add a `_acme-challenge` TXT record to your DNS; Easy DevOps waits for confirmation |
|
|
182
198
|
|
|
183
|
-
|
|
199
|
+
> **Wildcard certificates** (`*.example.com`) require DNS-01 — HTTP-01 is automatically disabled for wildcard domains.
|
|
184
200
|
|
|
185
|
-
|
|
201
|
+
#### Certificate Storage
|
|
186
202
|
|
|
187
|
-
|
|
203
|
+
Certificates are stored under `sslDir` (configured in Settings):
|
|
188
204
|
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
205
|
+
```
|
|
206
|
+
{sslDir}/{domain}/fullchain.pem
|
|
207
|
+
{sslDir}/{domain}/privkey.pem
|
|
208
|
+
{sslDir}/.account/account.key ← ACME account key, reused across all issuances
|
|
209
|
+
```
|
|
192
210
|
|
|
193
|
-
|
|
211
|
+
Default paths:
|
|
212
|
+
- Linux: `/etc/easy-devops/ssl/`
|
|
213
|
+
- Windows: `C:\easy-devops\ssl\`
|
|
194
214
|
|
|
195
215
|
---
|
|
196
216
|
|
|
@@ -239,8 +259,12 @@ The dashboard exposes RESTful API endpoints:
|
|
|
239
259
|
| `/api/nginx/configs` | GET | List config files |
|
|
240
260
|
| `/api/nginx/config/:file` | GET/POST | Read/write config file |
|
|
241
261
|
| `/api/domains` | GET/POST | List/create domains |
|
|
242
|
-
| `/api/domains/:name` |
|
|
262
|
+
| `/api/domains/:name` | PUT/DELETE | Update/delete domain |
|
|
263
|
+
| `/api/domains/:name/toggle` | PUT | Enable or disable domain |
|
|
264
|
+
| `/api/domains/:name/reload` | POST | Reload nginx for domain |
|
|
243
265
|
| `/api/ssl` | GET | List certificates |
|
|
266
|
+
| `/api/ssl/create` | POST | Issue new certificate |
|
|
267
|
+
| `/api/ssl/create-confirm` | POST | Confirm DNS challenge |
|
|
244
268
|
| `/api/ssl/renew/:domain` | POST | Renew certificate |
|
|
245
269
|
| `/api/settings` | GET/POST | Dashboard settings |
|
|
246
270
|
|
|
@@ -252,39 +276,51 @@ All configuration is stored in `data/easy-devops.sqlite`:
|
|
|
252
276
|
|
|
253
277
|
| Key | Contents |
|
|
254
278
|
|-----|----------|
|
|
255
|
-
| `config` | Dashboard port, password,
|
|
256
|
-
| `system-detection` | Cached system info (OS, Node, nginx
|
|
279
|
+
| `config` | Dashboard port, password, `nginxDir`, `sslDir`, `acmeEmail` |
|
|
280
|
+
| `system-detection` | Cached system info (OS, Node, nginx) |
|
|
257
281
|
| `domains` | Array of domain configurations |
|
|
258
282
|
|
|
283
|
+
**Config fields:**
|
|
284
|
+
|
|
285
|
+
| Field | Default (Linux) | Default (Windows) | Description |
|
|
286
|
+
|-------|-----------------|-------------------|-------------|
|
|
287
|
+
| `dashboardPort` | `6443` | `6443` | Dashboard HTTP port |
|
|
288
|
+
| `dashboardPassword` | `admin` | `admin` | Dashboard login password |
|
|
289
|
+
| `nginxDir` | `/etc/nginx` | `C:\nginx` | Nginx installation directory |
|
|
290
|
+
| `sslDir` | `/etc/easy-devops/ssl` | `C:\easy-devops\ssl` | SSL certificate storage root |
|
|
291
|
+
| `acmeEmail` | _(empty)_ | _(empty)_ | Email for Let's Encrypt account (**required** for cert issuance) |
|
|
292
|
+
|
|
259
293
|
---
|
|
260
294
|
|
|
261
295
|
## Project Structure
|
|
262
296
|
|
|
263
297
|
```
|
|
264
298
|
easy-devops/
|
|
265
|
-
├──
|
|
266
|
-
│ ├──
|
|
267
|
-
│ ├──
|
|
268
|
-
│
|
|
269
|
-
|
|
270
|
-
│ ├──
|
|
271
|
-
│ ├──
|
|
272
|
-
│ ├──
|
|
273
|
-
│ ├──
|
|
274
|
-
│
|
|
275
|
-
├──
|
|
276
|
-
│ ├──
|
|
277
|
-
│
|
|
278
|
-
│ ├──
|
|
279
|
-
│ ├──
|
|
280
|
-
│
|
|
299
|
+
├── src/
|
|
300
|
+
│ ├── cli/
|
|
301
|
+
│ │ ├── index.js # CLI entry point
|
|
302
|
+
│ │ ├── managers/ # Domain, Nginx, SSL, Node.js logic
|
|
303
|
+
│ │ └── menus/ # Thin menu dispatcher wrappers
|
|
304
|
+
│ ├── core/
|
|
305
|
+
│ │ ├── config.js # Configuration load/save
|
|
306
|
+
│ │ ├── db.js # SQLite helpers (good.db)
|
|
307
|
+
│ │ ├── detector.js # System environment detection
|
|
308
|
+
│ │ ├── nginx-conf-generator.js # Nginx conf builder (shared)
|
|
309
|
+
│ │ ├── platform.js # isWindows, nginx cmd helpers, combineOutput
|
|
310
|
+
│ │ ├── shell.js # Cross-platform shell executor
|
|
311
|
+
│ │ └── validators.js # Shared input validation helpers
|
|
312
|
+
│ ├── dashboard/
|
|
313
|
+
│ │ ├── server.js # Express + Socket.io server
|
|
314
|
+
│ │ ├── routes/ # auth, domains, nginx, settings, ssl
|
|
315
|
+
│ │ ├── lib/ # cert-reader, domains-db, nginx-service
|
|
316
|
+
│ │ ├── views/ # EJS templates + partials
|
|
317
|
+
│ │ └── public/ # Static assets (Vue 3 app)
|
|
318
|
+
│ └── lib/
|
|
319
|
+
│ └── installer/ # Bash helper modules for install.sh
|
|
281
320
|
├── data/
|
|
282
321
|
│ └── easy-devops.sqlite
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
├── install.ps1 # Windows bootstrap installer
|
|
286
|
-
├── install.sh # Linux/macOS bootstrap installer
|
|
287
|
-
└── winget-install.ps1 # Windows Package Manager installer
|
|
322
|
+
├── install.sh # Linux/macOS bootstrap installer
|
|
323
|
+
└── install.ps1 # Windows PowerShell installer
|
|
288
324
|
```
|
|
289
325
|
|
|
290
326
|
---
|
|
@@ -296,9 +332,11 @@ easy-devops/
|
|
|
296
332
|
| CLI Interface | ✅ | ✅ |
|
|
297
333
|
| Web Dashboard | ✅ | ✅ |
|
|
298
334
|
| Nginx Management | ✅ | ✅ |
|
|
299
|
-
| SSL (
|
|
335
|
+
| SSL — HTTP-01 (acme-client) | ✅ | ✅ |
|
|
336
|
+
| SSL — DNS-01 (acme-client) | ✅ | ✅ |
|
|
337
|
+
| Wildcard Certificates | ✅ | ✅ |
|
|
300
338
|
| Node.js (nvm) | ✅ | ✅ (nvm-windows) |
|
|
301
|
-
|
|
|
339
|
+
| Nginx service control | systemctl | nginx.exe direct |
|
|
302
340
|
|
|
303
341
|
---
|
|
304
342
|
|
|
@@ -334,6 +372,12 @@ Contributions are welcome! Please feel free to submit a Pull Request.
|
|
|
334
372
|
|
|
335
373
|
---
|
|
336
374
|
|
|
375
|
+
## Changelog
|
|
376
|
+
|
|
377
|
+
See [CHANGELOG.md](./CHANGELOG.md) for a full history of changes.
|
|
378
|
+
|
|
379
|
+
---
|
|
380
|
+
|
|
337
381
|
## License
|
|
338
382
|
|
|
339
383
|
This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.
|
package/install.sh
CHANGED
|
@@ -19,7 +19,7 @@ set -euo pipefail
|
|
|
19
19
|
# ---------------------------------------------------------------------------
|
|
20
20
|
# Resolve script and project directory
|
|
21
21
|
# ---------------------------------------------------------------------------
|
|
22
|
-
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
|
22
|
+
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]:-$0}")" && pwd)"
|
|
23
23
|
EASYDEVOPS_DIR="${EASYDEVOPS_DIR:-$SCRIPT_DIR}"
|
|
24
24
|
|
|
25
25
|
# ---------------------------------------------------------------------------
|
|
@@ -236,12 +236,6 @@ STEPS=(
|
|
|
236
236
|
"Registering global command"
|
|
237
237
|
)
|
|
238
238
|
|
|
239
|
-
# Print all steps as pending initially
|
|
240
|
-
for _s in "${STEPS[@]}"; do
|
|
241
|
-
step_pending "$_s"
|
|
242
|
-
done
|
|
243
|
-
printf '\n'
|
|
244
|
-
|
|
245
239
|
# ---------------------------------------------------------------------------
|
|
246
240
|
# Step 1: Detect system
|
|
247
241
|
# ---------------------------------------------------------------------------
|
|
@@ -309,7 +303,7 @@ else
|
|
|
309
303
|
local_choice=""
|
|
310
304
|
while true; do
|
|
311
305
|
printf 'Enter 1, 2, or 3 (q to quit): '
|
|
312
|
-
IFS= read -r local_choice
|
|
306
|
+
IFS= read -r local_choice < /dev/tty
|
|
313
307
|
case "$local_choice" in
|
|
314
308
|
1)
|
|
315
309
|
NODE_ACTION="keep"
|
|
@@ -393,15 +387,20 @@ else
|
|
|
393
387
|
|
|
394
388
|
# Step 5: install chosen Node.js version
|
|
395
389
|
step_running "${STEPS[4]}"
|
|
396
|
-
printf 'Installing Node.js %s via nvm...\n' "$NODE_TARGET"
|
|
397
|
-
|
|
390
|
+
printf 'Installing Node.js %s via nvm (this may take a minute)...\n' "$NODE_TARGET"
|
|
391
|
+
_nvm_log="$(mktemp /tmp/nvm-install.XXXXXX 2>/dev/null || mktemp)"
|
|
392
|
+
if ! nvm install "$NODE_TARGET" > "$_nvm_log" 2>&1; then
|
|
393
|
+
printf '\n--- nvm install output ---\n' >&2
|
|
394
|
+
cat "$_nvm_log" >&2
|
|
395
|
+
rm -f "$_nvm_log"
|
|
398
396
|
die "${STEPS[4]}" "Failed to install Node.js $NODE_TARGET via nvm" \
|
|
399
397
|
"nvm install $NODE_TARGET" \
|
|
400
398
|
"nvm use $NODE_TARGET" \
|
|
401
399
|
"npm install" \
|
|
402
400
|
"npm link"
|
|
403
401
|
fi
|
|
404
|
-
|
|
402
|
+
rm -f "$_nvm_log"
|
|
403
|
+
if ! nvm use "$NODE_TARGET" > /dev/null 2>&1; then
|
|
405
404
|
die "${STEPS[4]}" "Failed to activate Node.js $NODE_TARGET" \
|
|
406
405
|
"nvm use $NODE_TARGET" \
|
|
407
406
|
"npm install" \
|
|
@@ -488,7 +487,9 @@ printf '\n'
|
|
|
488
487
|
|
|
489
488
|
if [ "$_allOK" = "true" ]; then
|
|
490
489
|
printf ' All steps completed successfully!\n\n'
|
|
491
|
-
printf '
|
|
490
|
+
printf ' To use immediately in this terminal, run:\n'
|
|
491
|
+
printf ' source ~/.bashrc\n\n'
|
|
492
|
+
printf ' Or open a new terminal, then run:\n'
|
|
492
493
|
printf ' easy-devops\n'
|
|
493
494
|
else
|
|
494
495
|
printf ' Some steps need attention -- see warnings above.\n\n'
|
|
@@ -496,4 +497,25 @@ else
|
|
|
496
497
|
printf ' node cli/index.js\n'
|
|
497
498
|
fi
|
|
498
499
|
printf '\n'
|
|
500
|
+
|
|
501
|
+
# ---------------------------------------------------------------------------
|
|
502
|
+
# Source nvm into the current session so node/npm/easy-devops work immediately
|
|
503
|
+
# (only when nvm was actually used, i.e. NODE_ACTION != "keep")
|
|
504
|
+
# ---------------------------------------------------------------------------
|
|
505
|
+
if [ "$NODE_ACTION" != "keep" ]; then
|
|
506
|
+
export NVM_DIR="$HOME/.nvm"
|
|
507
|
+
if [ -s "$NVM_DIR/nvm.sh" ]; then
|
|
508
|
+
. "$NVM_DIR/nvm.sh"
|
|
509
|
+
fi
|
|
510
|
+
|
|
511
|
+
# Also source shell config to pick up PATH changes
|
|
512
|
+
if [ -f "$HOME/.bashrc" ]; then
|
|
513
|
+
. "$HOME/.bashrc" 2>/dev/null || true
|
|
514
|
+
elif [ -f "$HOME/.bash_profile" ]; then
|
|
515
|
+
. "$HOME/.bash_profile" 2>/dev/null || true
|
|
516
|
+
elif [ -f "$HOME/.zshrc" ]; then
|
|
517
|
+
. "$HOME/.zshrc" 2>/dev/null || true
|
|
518
|
+
fi
|
|
519
|
+
fi
|
|
520
|
+
|
|
499
521
|
exit 0
|
package/package.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "easy-devops",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "1.0.1",
|
|
4
4
|
"description": "A unified DevOps management tool with CLI and web dashboard for managing Nginx, SSL certificates, and Node.js on Linux and Windows servers.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"devops",
|
|
7
7
|
"nginx",
|
|
8
8
|
"ssl",
|
|
9
|
-
"
|
|
9
|
+
"acme",
|
|
10
10
|
"letsencrypt",
|
|
11
11
|
"nodejs",
|
|
12
12
|
"dashboard",
|
|
@@ -30,30 +30,29 @@
|
|
|
30
30
|
},
|
|
31
31
|
"homepage": "https://github.com/omar00050/Easy-DevOps#readme",
|
|
32
32
|
"type": "module",
|
|
33
|
-
"main": "cli/index.js",
|
|
33
|
+
"main": "src/cli/index.js",
|
|
34
34
|
"bin": {
|
|
35
|
-
"easy-devops": "cli/index.js"
|
|
35
|
+
"easy-devops": "src/cli/index.js",
|
|
36
|
+
"ezz": "src/cli/index.js"
|
|
36
37
|
},
|
|
37
38
|
"files": [
|
|
38
|
-
"
|
|
39
|
-
"core/",
|
|
40
|
-
"dashboard/",
|
|
41
|
-
"lib/",
|
|
39
|
+
"src/",
|
|
42
40
|
"data/.gitkeep",
|
|
43
41
|
"install.bat",
|
|
44
42
|
"install.ps1",
|
|
45
43
|
"install.sh"
|
|
46
44
|
],
|
|
47
45
|
"scripts": {
|
|
48
|
-
"start": "node cli/index.js",
|
|
46
|
+
"start": "node src/cli/index.js",
|
|
49
47
|
"test": "echo \" no test specified\"",
|
|
50
|
-
"dashboard": "node dashboard/server.js",
|
|
51
|
-
"system-info": "node cli/index.js system-info"
|
|
48
|
+
"dashboard": "node src/dashboard/server.js",
|
|
49
|
+
"system-info": "node src/cli/index.js system-info"
|
|
52
50
|
},
|
|
53
51
|
"engines": {
|
|
54
52
|
"node": ">=18.0.0"
|
|
55
53
|
},
|
|
56
54
|
"dependencies": {
|
|
55
|
+
"acme-client": "^5.4.0",
|
|
57
56
|
"chalk": "^5.3.0",
|
|
58
57
|
"cli-table3": "^0.6.5",
|
|
59
58
|
"ejs": "^5.0.1",
|
|
@@ -64,4 +63,4 @@
|
|
|
64
63
|
"ora": "^7.0.1",
|
|
65
64
|
"socket.io": "^4.8.3"
|
|
66
65
|
}
|
|
67
|
-
}
|
|
66
|
+
}
|
package/{cli → src/cli}/index.js
RENAMED
|
@@ -14,7 +14,7 @@ import settingsMenu from './menus/settings.js';
|
|
|
14
14
|
import updateMenu from './menus/update.js';
|
|
15
15
|
|
|
16
16
|
const require = createRequire(import.meta.url);
|
|
17
|
-
const { version } = require('
|
|
17
|
+
const { version } = require('../../package.json');
|
|
18
18
|
|
|
19
19
|
process.on('SIGINT', () => process.exit(0));
|
|
20
20
|
|
|
@@ -25,11 +25,33 @@ if (process.argv[2] === 'system-info') {
|
|
|
25
25
|
}
|
|
26
26
|
|
|
27
27
|
function renderBanner() {
|
|
28
|
-
const
|
|
29
|
-
const
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
28
|
+
const c = chalk.hex('#d64a29');
|
|
29
|
+
const dim = chalk.hex('#d64a29').dim;
|
|
30
|
+
|
|
31
|
+
// Compact "EZ" logo — 6 lines, ~20 chars wide, fits any 80-col terminal
|
|
32
|
+
const logo = [
|
|
33
|
+
'███████╗███████╗',
|
|
34
|
+
'██╔════╝╚════██╗',
|
|
35
|
+
'█████╗ ██╔╝',
|
|
36
|
+
'██╔══╝ ██╔╝ ',
|
|
37
|
+
'███████╗ ██████╗',
|
|
38
|
+
'╚══════╝ ╚═════╝',
|
|
39
|
+
];
|
|
40
|
+
|
|
41
|
+
const gap = ' ';
|
|
42
|
+
const info = [
|
|
43
|
+
chalk.bold.white('Easy DevOps') + ' ' + chalk.hex('#d64a29')(`v${version}`),
|
|
44
|
+
dim('─────────────────────'),
|
|
45
|
+
chalk.hex('#888888')('CLI & Web Dashboard'),
|
|
46
|
+
chalk.hex('#888888')('Nginx · SSL · Domains · Node.js'),
|
|
47
|
+
'',
|
|
48
|
+
'',
|
|
49
|
+
];
|
|
50
|
+
|
|
51
|
+
console.log();
|
|
52
|
+
logo.forEach((line, i) => {
|
|
53
|
+
console.log(' ' + c(line) + gap + (info[i] ?? ''));
|
|
54
|
+
});
|
|
33
55
|
console.log();
|
|
34
56
|
}
|
|
35
57
|
|