easy-devops 0.1.0
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/LICENSE +21 -0
- package/README.md +325 -0
- package/cli/index.js +91 -0
- package/cli/managers/domain-manager.js +451 -0
- package/cli/managers/nginx-manager.js +329 -0
- package/cli/managers/node-manager.js +275 -0
- package/cli/managers/ssl-manager.js +397 -0
- package/cli/menus/.gitkeep +0 -0
- package/cli/menus/dashboard.js +223 -0
- package/cli/menus/domains.js +5 -0
- package/cli/menus/nginx.js +5 -0
- package/cli/menus/nodejs.js +5 -0
- package/cli/menus/settings.js +83 -0
- package/cli/menus/ssl.js +5 -0
- package/core/config.js +37 -0
- package/core/db.js +30 -0
- package/core/detector.js +257 -0
- package/core/nginx-conf-generator.js +309 -0
- package/core/shell.js +151 -0
- package/dashboard/lib/.gitkeep +0 -0
- package/dashboard/lib/cert-reader.js +59 -0
- package/dashboard/lib/domains-db.js +51 -0
- package/dashboard/lib/nginx-conf-generator.js +16 -0
- package/dashboard/lib/nginx-service.js +282 -0
- package/dashboard/public/js/app.js +486 -0
- package/dashboard/routes/.gitkeep +0 -0
- package/dashboard/routes/auth.js +30 -0
- package/dashboard/routes/domains.js +300 -0
- package/dashboard/routes/nginx.js +151 -0
- package/dashboard/routes/settings.js +78 -0
- package/dashboard/routes/ssl.js +105 -0
- package/dashboard/server.js +79 -0
- package/dashboard/views/index.ejs +327 -0
- package/dashboard/views/partials/domain-form.ejs +229 -0
- package/dashboard/views/partials/domains-panel.ejs +66 -0
- package/dashboard/views/partials/login.ejs +50 -0
- package/dashboard/views/partials/nginx-panel.ejs +90 -0
- package/dashboard/views/partials/overview.ejs +67 -0
- package/dashboard/views/partials/settings-panel.ejs +37 -0
- package/dashboard/views/partials/sidebar.ejs +45 -0
- package/dashboard/views/partials/ssl-panel.ejs +53 -0
- package/data/.gitkeep +0 -0
- package/install.bat +41 -0
- package/install.ps1 +653 -0
- package/install.sh +452 -0
- package/lib/installer/.gitkeep +0 -0
- package/lib/installer/detect.sh +88 -0
- package/lib/installer/node-versions.sh +109 -0
- package/lib/installer/nvm-bootstrap.sh +77 -0
- package/lib/installer/picker.sh +163 -0
- package/lib/installer/progress.sh +25 -0
- package/package.json +67 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Omar Farghaly
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,325 @@
|
|
|
1
|
+
# Easy DevOps
|
|
2
|
+
|
|
3
|
+
[](https://badge.fury.io/js/easy-devops)
|
|
4
|
+
[](https://opensource.org/licenses/MIT)
|
|
5
|
+
[](https://nodejs.org/)
|
|
6
|
+
|
|
7
|
+
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
|
+
|
|
9
|
+
## Features
|
|
10
|
+
|
|
11
|
+
- **π₯οΈ 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 Certbot, expiry tracking
|
|
15
|
+
- **π Domain Management** β Reverse proxy configurations with SSL, WebSocket, gzip, rate limiting
|
|
16
|
+
- **π¦ Node.js Manager** β Version switching via nvm, global package management
|
|
17
|
+
- **π Real-time Updates** β Socket.io powered status updates in dashboard
|
|
18
|
+
- **πΏ SQLite Storage** β Persistent configuration via `good.db`
|
|
19
|
+
|
|
20
|
+
## Requirements
|
|
21
|
+
|
|
22
|
+
- **Node.js 18+** (with npm)
|
|
23
|
+
- **Linux** (Debian/Ubuntu) or **Windows**
|
|
24
|
+
- Optional: Nginx, Certbot, nvm (installed separately or via the tool)
|
|
25
|
+
|
|
26
|
+
## Installation
|
|
27
|
+
|
|
28
|
+
### Quick Install (One-Line)
|
|
29
|
+
|
|
30
|
+
If you have **Node.js 18+** installed, run:
|
|
31
|
+
|
|
32
|
+
```bash
|
|
33
|
+
npm install -g easy-devops && easy-devops
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
If you **don't have Node.js** yet, use the bootstrap installer:
|
|
37
|
+
|
|
38
|
+
#### Linux / macOS
|
|
39
|
+
|
|
40
|
+
```bash
|
|
41
|
+
curl -fsSL https://raw.githubusercontent.com/omar00050/Easy-DevOps/main/install.sh | bash
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
Or with wget:
|
|
45
|
+
|
|
46
|
+
```bash
|
|
47
|
+
wget -qO- https://raw.githubusercontent.com/omar00050/Easy-DevOps/main/install.sh | bash
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
#### Windows (PowerShell)
|
|
51
|
+
|
|
52
|
+
```powershell
|
|
53
|
+
Invoke-WebRequest -Uri "https://raw.githubusercontent.com/omar00050/Easy-DevOps/main/install.ps1" -OutFile "install.ps1"; ./install.ps1
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
Or from Command Prompt:
|
|
57
|
+
|
|
58
|
+
```cmd
|
|
59
|
+
powershell -ExecutionPolicy Bypass -Command "Invoke-WebRequest -Uri 'https://raw.githubusercontent.com/omar00050/Easy-DevOps/main/install.ps1' -OutFile 'install.ps1'; ./install.ps1"
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
> **What the installer does:**
|
|
63
|
+
> 1. Checks for Node.js 18+ (installs via nvm if missing)
|
|
64
|
+
> 2. Installs Easy DevOps globally via npm
|
|
65
|
+
> 3. Launches the interactive CLI
|
|
66
|
+
|
|
67
|
+
### Via npm (Recommended)
|
|
68
|
+
|
|
69
|
+
```bash
|
|
70
|
+
npm install -g easy-devops
|
|
71
|
+
easy-devops
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
### From Source
|
|
75
|
+
|
|
76
|
+
```bash
|
|
77
|
+
git clone https://github.com/omar00050/Easy-DevOps.git
|
|
78
|
+
cd Easy-DevOps
|
|
79
|
+
npm install
|
|
80
|
+
npm start
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
## Quick Start
|
|
84
|
+
|
|
85
|
+
```bash
|
|
86
|
+
# Start the interactive CLI
|
|
87
|
+
easy-devops
|
|
88
|
+
|
|
89
|
+
# Or run directly
|
|
90
|
+
npx easy-devops
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
## Usage
|
|
94
|
+
|
|
95
|
+
### CLI Overview
|
|
96
|
+
|
|
97
|
+
```
|
|
98
|
+
ββββββββββββββββββββββββββββββββ
|
|
99
|
+
β Easy DevOps v0.1.0 β
|
|
100
|
+
ββββββββββββββββββββββββββββββββ
|
|
101
|
+
|
|
102
|
+
nginx: β
v1.26.2 | certbot: β
v2.9.0 | node: v22.21.1
|
|
103
|
+
|
|
104
|
+
? Select an option:
|
|
105
|
+
π¦ Node.js Manager
|
|
106
|
+
π Nginx Manager
|
|
107
|
+
π SSL Manager
|
|
108
|
+
π Domain Manager
|
|
109
|
+
ποΈ Open Dashboard
|
|
110
|
+
βοΈ Settings
|
|
111
|
+
β Exit
|
|
112
|
+
```
|
|
113
|
+
|
|
114
|
+
Press **Ctrl+C** at any prompt to exit cleanly.
|
|
115
|
+
|
|
116
|
+
---
|
|
117
|
+
|
|
118
|
+
### Node.js Manager
|
|
119
|
+
|
|
120
|
+
Manage your Node.js runtime using `nvm` (Unix) or `nvm-windows` (Windows).
|
|
121
|
+
|
|
122
|
+
| Option | Description |
|
|
123
|
+
|--------|-------------|
|
|
124
|
+
| Switch Node version | Lists available LTS versions and switches to the selected one |
|
|
125
|
+
| Manage global packages | Install, uninstall, or list globally installed npm packages |
|
|
126
|
+
| Update npm | Updates npm to the latest version |
|
|
127
|
+
|
|
128
|
+
---
|
|
129
|
+
|
|
130
|
+
### Nginx Manager
|
|
131
|
+
|
|
132
|
+
Control the Nginx web server from the CLI.
|
|
133
|
+
|
|
134
|
+
| Option | Description |
|
|
135
|
+
|--------|-------------|
|
|
136
|
+
| Reload nginx | Tests the config then sends a graceful reload signal |
|
|
137
|
+
| Restart nginx | Tests the config then performs a full stop/start |
|
|
138
|
+
| Test config | Runs `nginx -t` and displays the result |
|
|
139
|
+
| View error log | Shows the last 50 lines of the Nginx error log |
|
|
140
|
+
| Install nginx | Installs Nginx via `apt-get` (Linux) or `winget` (Windows) |
|
|
141
|
+
|
|
142
|
+
---
|
|
143
|
+
|
|
144
|
+
### Domain Manager
|
|
145
|
+
|
|
146
|
+
Manage Nginx reverse proxy configurations from CLI or dashboard.
|
|
147
|
+
|
|
148
|
+
| Option | Description |
|
|
149
|
+
|--------|-------------|
|
|
150
|
+
| List Domains | Show all configured domains in a table |
|
|
151
|
+
| Add Domain | Interactive prompts for domain configuration |
|
|
152
|
+
| Edit Domain | Modify existing domain settings |
|
|
153
|
+
| Delete Domain | Remove domain with confirmation |
|
|
154
|
+
|
|
155
|
+
**Domain Configuration Options:**
|
|
156
|
+
- SSL/HTTPS with auto-renewal tracking
|
|
157
|
+
- WebSocket support (`ws` upstream type)
|
|
158
|
+
- Gzip compression
|
|
159
|
+
- Rate limiting (requests/second + burst)
|
|
160
|
+
- Security headers (X-Frame-Options, etc.)
|
|
161
|
+
- Custom timeout and body size limits
|
|
162
|
+
- Domain-specific access logs
|
|
163
|
+
|
|
164
|
+
---
|
|
165
|
+
|
|
166
|
+
### SSL Manager
|
|
167
|
+
|
|
168
|
+
Manage Let's Encrypt SSL certificates using Certbot.
|
|
169
|
+
|
|
170
|
+
| Status | Meaning |
|
|
171
|
+
|--------|---------|
|
|
172
|
+
| β
green | Valid, expires in > 30 days |
|
|
173
|
+
| β οΈ yellow | Expiring soon (10β30 days) |
|
|
174
|
+
| β red | Critical (< 10 days) |
|
|
175
|
+
|
|
176
|
+
> **Note:** Renewing a certificate temporarily stops Nginx to free port 80, then restarts it automatically.
|
|
177
|
+
|
|
178
|
+
---
|
|
179
|
+
|
|
180
|
+
### Web Dashboard
|
|
181
|
+
|
|
182
|
+
Start the web dashboard:
|
|
183
|
+
|
|
184
|
+
```bash
|
|
185
|
+
# From CLI menu: Select "ποΈ Open Dashboard" β "Start dashboard"
|
|
186
|
+
# Or directly:
|
|
187
|
+
npm run dashboard
|
|
188
|
+
```
|
|
189
|
+
|
|
190
|
+
Access at `http://localhost:3000` (or configured port).
|
|
191
|
+
|
|
192
|
+
#### Dashboard Pages
|
|
193
|
+
|
|
194
|
+
| Page | Features |
|
|
195
|
+
|------|----------|
|
|
196
|
+
| **Overview** | System status cards for Nginx, SSL, Domains |
|
|
197
|
+
| **Nginx** | Start/stop controls, config editor, error logs |
|
|
198
|
+
| **SSL** | Certificate list, renewal actions, expiry badges |
|
|
199
|
+
| **Domains** | Add/edit form with collapsible sections, table view |
|
|
200
|
+
| **Settings** | Port, password, directory configuration |
|
|
201
|
+
|
|
202
|
+
---
|
|
203
|
+
|
|
204
|
+
## API Endpoints
|
|
205
|
+
|
|
206
|
+
The dashboard exposes RESTful API endpoints:
|
|
207
|
+
|
|
208
|
+
| Endpoint | Method | Description |
|
|
209
|
+
|----------|--------|-------------|
|
|
210
|
+
| `/api/nginx/status` | GET | Get nginx running status |
|
|
211
|
+
| `/api/nginx/start` | POST | Start nginx |
|
|
212
|
+
| `/api/nginx/stop` | POST | Stop nginx |
|
|
213
|
+
| `/api/nginx/reload` | POST | Graceful reload |
|
|
214
|
+
| `/api/nginx/configs` | GET | List config files |
|
|
215
|
+
| `/api/nginx/config/:file` | GET/POST | Read/write config file |
|
|
216
|
+
| `/api/domains` | GET/POST | List/create domains |
|
|
217
|
+
| `/api/domains/:name` | GET/PUT/DELETE | Domain CRUD |
|
|
218
|
+
| `/api/ssl` | GET | List certificates |
|
|
219
|
+
| `/api/ssl/renew/:domain` | POST | Renew certificate |
|
|
220
|
+
| `/api/settings` | GET/POST | Dashboard settings |
|
|
221
|
+
|
|
222
|
+
---
|
|
223
|
+
|
|
224
|
+
## Configuration
|
|
225
|
+
|
|
226
|
+
All configuration is stored in `data/easy-devops.sqlite`:
|
|
227
|
+
|
|
228
|
+
| Key | Contents |
|
|
229
|
+
|-----|----------|
|
|
230
|
+
| `config` | Dashboard port, password, Nginx/Certbot directories |
|
|
231
|
+
| `system-detection` | Cached system info (OS, Node, nginx, certbot) |
|
|
232
|
+
| `domains` | Array of domain configurations |
|
|
233
|
+
|
|
234
|
+
---
|
|
235
|
+
|
|
236
|
+
## Project Structure
|
|
237
|
+
|
|
238
|
+
```
|
|
239
|
+
easy-devops/
|
|
240
|
+
βββ cli/
|
|
241
|
+
β βββ index.js # CLI entry point
|
|
242
|
+
β βββ managers/ # Business logic modules
|
|
243
|
+
β βββ menus/ # Menu dispatcher stubs
|
|
244
|
+
βββ core/
|
|
245
|
+
β βββ config.js # Configuration loader
|
|
246
|
+
β βββ db.js # SQLite database (good.db)
|
|
247
|
+
β βββ detector.js # System environment detection
|
|
248
|
+
β βββ shell.js # Cross-platform shell executor
|
|
249
|
+
βββ dashboard/
|
|
250
|
+
β βββ server.js # Express + Socket.io server
|
|
251
|
+
β βββ routes/ # API endpoints
|
|
252
|
+
β βββ lib/ # Service helpers
|
|
253
|
+
β βββ views/ # EJS templates
|
|
254
|
+
β βββ public/ # Static assets (Vue app)
|
|
255
|
+
βββ data/
|
|
256
|
+
β βββ easy-devops.sqlite
|
|
257
|
+
βββ lib/
|
|
258
|
+
βββ installer/ # Bootstrap scripts
|
|
259
|
+
```
|
|
260
|
+
|
|
261
|
+
---
|
|
262
|
+
|
|
263
|
+
## Platform Support
|
|
264
|
+
|
|
265
|
+
| Feature | Linux | Windows |
|
|
266
|
+
|---------|-------|---------|
|
|
267
|
+
| CLI Interface | β
| β
|
|
|
268
|
+
| Web Dashboard | β
| β
|
|
|
269
|
+
| Nginx Management | β
| β
|
|
|
270
|
+
| SSL (Certbot) | β
| β
|
|
|
271
|
+
| Node.js (nvm) | β
| β
(nvm-windows) |
|
|
272
|
+
| System Service | systemd | Task Scheduler |
|
|
273
|
+
|
|
274
|
+
---
|
|
275
|
+
|
|
276
|
+
## Development
|
|
277
|
+
|
|
278
|
+
```bash
|
|
279
|
+
# Clone and install
|
|
280
|
+
git clone https://github.com/omar00050/Easy-DevOps.git
|
|
281
|
+
cd Easy-DevOps
|
|
282
|
+
npm install
|
|
283
|
+
|
|
284
|
+
# Run CLI
|
|
285
|
+
npm start
|
|
286
|
+
|
|
287
|
+
# Run dashboard
|
|
288
|
+
npm run dashboard
|
|
289
|
+
|
|
290
|
+
# System info only
|
|
291
|
+
npm run system-info
|
|
292
|
+
```
|
|
293
|
+
|
|
294
|
+
---
|
|
295
|
+
|
|
296
|
+
## Contributing
|
|
297
|
+
|
|
298
|
+
Contributions are welcome! Please feel free to submit a Pull Request.
|
|
299
|
+
|
|
300
|
+
1. Fork the repository
|
|
301
|
+
2. Create your feature branch (`git checkout -b feature/amazing-feature`)
|
|
302
|
+
3. Commit your changes (`git commit -m 'Add some amazing feature'`)
|
|
303
|
+
4. Push to the branch (`git push origin feature/amazing-feature`)
|
|
304
|
+
5. Open a Pull Request
|
|
305
|
+
|
|
306
|
+
---
|
|
307
|
+
|
|
308
|
+
## License
|
|
309
|
+
|
|
310
|
+
This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.
|
|
311
|
+
|
|
312
|
+
---
|
|
313
|
+
|
|
314
|
+
## Author
|
|
315
|
+
|
|
316
|
+
**Omar Farghaly**
|
|
317
|
+
|
|
318
|
+
- GitHub: [@omar00050](https://github.com/omar00050)
|
|
319
|
+
- npm: [abo_farghaly](https://www.npmjs.com/~abo_farghaly)
|
|
320
|
+
|
|
321
|
+
---
|
|
322
|
+
|
|
323
|
+
## Support
|
|
324
|
+
|
|
325
|
+
If you encounter any issues or have questions, please [open an issue](https://github.com/omar00050/Easy-DevOps/issues) on GitHub.
|
package/cli/index.js
ADDED
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import { createRequire } from 'module';
|
|
3
|
+
import chalk from 'chalk';
|
|
4
|
+
import ora from 'ora';
|
|
5
|
+
import inquirer from 'inquirer';
|
|
6
|
+
import { runDetection, showSystemStatus, formatStatusLine } from '../core/detector.js';
|
|
7
|
+
|
|
8
|
+
import nodejsMenu from './menus/nodejs.js';
|
|
9
|
+
import nginxMenu from './menus/nginx.js';
|
|
10
|
+
import sslMenu from './menus/ssl.js';
|
|
11
|
+
import domainsMenu from './menus/domains.js';
|
|
12
|
+
import dashboardMenu from './menus/dashboard.js';
|
|
13
|
+
import settingsMenu from './menus/settings.js';
|
|
14
|
+
|
|
15
|
+
const require = createRequire(import.meta.url);
|
|
16
|
+
const { version } = require('../package.json');
|
|
17
|
+
|
|
18
|
+
process.on('SIGINT', () => process.exit(0));
|
|
19
|
+
|
|
20
|
+
if (process.argv[2] === 'system-info') {
|
|
21
|
+
await runDetection();
|
|
22
|
+
showSystemStatus();
|
|
23
|
+
process.exit(0);
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
function renderBanner() {
|
|
27
|
+
const title = ` Easy DevOps v${version}`;
|
|
28
|
+
const paddedTitle = title.padEnd(30);
|
|
29
|
+
console.log(chalk.cyan('ββββββββββββββββββββββββββββββββ'));
|
|
30
|
+
console.log(chalk.cyan('β') + chalk.bold(paddedTitle) + chalk.cyan('β'));
|
|
31
|
+
console.log(chalk.cyan('ββββββββββββββββββββββββββββββββ'));
|
|
32
|
+
console.log();
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
async function showMainMenu() {
|
|
36
|
+
const answers = await inquirer.prompt([{
|
|
37
|
+
type: 'list',
|
|
38
|
+
name: 'choice',
|
|
39
|
+
message: 'Select an option:',
|
|
40
|
+
choices: [
|
|
41
|
+
'π¦ Node.js Manager',
|
|
42
|
+
'π Nginx Manager',
|
|
43
|
+
'π SSL Manager',
|
|
44
|
+
'π Domain Manager',
|
|
45
|
+
'ποΈ Open Dashboard',
|
|
46
|
+
'βοΈ Settings',
|
|
47
|
+
'β Exit',
|
|
48
|
+
],
|
|
49
|
+
}]);
|
|
50
|
+
return answers.choice;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
async function dispatch(choice) {
|
|
54
|
+
switch (choice) {
|
|
55
|
+
case 'π¦ Node.js Manager': await nodejsMenu(); break;
|
|
56
|
+
case 'π Nginx Manager': await nginxMenu(); break;
|
|
57
|
+
case 'π SSL Manager': await sslMenu(); break;
|
|
58
|
+
case 'π Domain Manager': await domainsMenu(); break;
|
|
59
|
+
case 'ποΈ Open Dashboard': await dashboardMenu(); break;
|
|
60
|
+
case 'βοΈ Settings': await settingsMenu(); break;
|
|
61
|
+
case 'β Exit': process.exit(0);
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
async function main() {
|
|
66
|
+
while (true) {
|
|
67
|
+
const spinner = ora('Checking systemβ¦').start();
|
|
68
|
+
await runDetection();
|
|
69
|
+
spinner.stop();
|
|
70
|
+
|
|
71
|
+
try {
|
|
72
|
+
renderBanner();
|
|
73
|
+
console.log(' ' + formatStatusLine());
|
|
74
|
+
console.log();
|
|
75
|
+
} catch {
|
|
76
|
+
console.log(`\n=== Easy DevOps v${version} ===\n`);
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
try {
|
|
80
|
+
const choice = await showMainMenu();
|
|
81
|
+
await dispatch(choice);
|
|
82
|
+
} catch (err) {
|
|
83
|
+
if (err.name === 'ExitPromptError') {
|
|
84
|
+
process.exit(0);
|
|
85
|
+
}
|
|
86
|
+
throw err;
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
await main();
|