easy-devops 0.2.7 → 1.0.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.
@@ -1,95 +1,176 @@
1
1
  <!-- SSL Page -->
2
- <div v-show="page === 'ssl'" class="max-w-6xl mx-auto">
3
- <div class="flex items-center justify-between mb-2">
4
- <h2 class="text-2xl font-bold">SSL Certificates</h2>
5
- <div class="flex gap-2">
6
- <button @click="ssl.showCreateForm = !ssl.showCreateForm; ssl.createResult = null; ssl.createError = null" class="btn btn-secondary btn-sm">
7
- {{ ssl.showCreateForm ? 'Cancel' : 'New Certificate' }}
8
- </button>
9
- <button @click="renewAll" :disabled="ssl.renewingDomain !== null" class="btn btn-primary btn-sm">
10
- {{ ssl.renewingDomain === 'all' ? 'Renewing...' : 'Renew Expiring' }}
11
- </button>
12
- </div>
13
- </div>
14
- <p class="text-slate-400 mb-4">Let's Encrypt certificates managed by certbot</p>
15
-
16
- <!-- New Certificate inline form -->
17
- <div v-if="ssl.showCreateForm" class="card p-4 mb-6">
18
- <h3 class="font-semibold mb-3 text-sm">Create New Certificate</h3>
19
- <div class="flex items-end gap-3 flex-wrap">
20
- <div class="input-group flex-1 min-w-48">
21
- <input v-model="ssl.createDomain" placeholder=" " @keyup.enter="createCert()" />
22
- <label>Domain name</label>
23
- </div>
24
- <div class="flex items-center gap-2 pb-1">
25
- <label class="switch">
26
- <input type="checkbox" v-model="ssl.createWww" />
27
- <span class="slider"></span>
28
- </label>
29
- <span class="text-sm text-slate-400">Include www</span>
30
- </div>
31
- <button @click="createCert()" :disabled="ssl.creating || !ssl.createDomain.trim()" class="btn btn-primary btn-sm">
32
- {{ ssl.creating ? 'Creating...' : 'Create' }}
33
- </button>
34
- </div>
35
-
36
- <!-- Success result -->
37
- <div v-if="ssl.createResult" class="mt-3 p-3 rounded-lg bg-green-500/10 border border-green-500/20 text-xs">
38
- <p class="text-green-400 font-semibold mb-1">Certificate created successfully</p>
39
- <p class="text-slate-400 font-mono">Cert: {{ ssl.createResult.certPath }}</p>
40
- <p class="text-slate-400 font-mono">Key: {{ ssl.createResult.keyPath }}</p>
41
- </div>
42
-
43
- <!-- Structured error -->
44
- <div v-if="ssl.createError" class="mt-3 p-3 rounded-lg bg-red-500/10 border border-red-500/20 text-xs space-y-1">
45
- <p class="text-red-400 font-semibold">Certificate creation failed</p>
46
- <p class="text-slate-400"><span class="text-slate-300">Step:</span> {{ ssl.createError.step }}</p>
47
- <p class="text-slate-400"><span class="text-slate-300">Cause:</span> {{ ssl.createError.cause }}</p>
48
- <p class="text-slate-400"><span class="text-slate-300">Consequence:</span> {{ ssl.createError.consequence }}</p>
49
- <p class="text-slate-400"><span class="text-slate-300">nginx running:</span> {{ ssl.createError.nginxRunning ? 'yes' : 'no' }}</p>
50
- </div>
51
- </div>
52
-
53
- <div v-if="ssl.error" class="card p-4 mb-6 bg-red-500/10 border-red-500/20 text-red-400">
54
- {{ ssl.error }}
55
- </div>
56
-
57
- <div v-if="ssl.loading" class="text-slate-500">Loading certificates...</div>
58
-
59
- <div v-else-if="ssl.certs.length === 0" class="card p-12 text-center">
60
- <p class="text-slate-500">No certificates found. Use the CLI to issue certificates.</p>
61
- </div>
62
-
63
- <div v-else class="card overflow-hidden">
64
- <table class="data-table">
65
- <thead>
66
- <tr>
67
- <th>Domain</th>
68
- <th>Expires</th>
69
- <th>Days Left</th>
70
- <th>Status</th>
71
- <th class="text-right">Actions</th>
72
- </tr>
73
- </thead>
74
- <tbody>
75
- <tr v-for="cert in ssl.certs" :key="cert.domain">
76
- <td class="font-mono text-sm">{{ cert.domain }}</td>
77
- <td class="text-slate-400">{{ cert.expiry ? new Date(cert.expiry).toLocaleDateString() : '—' }}</td>
78
- <td>
79
- <span :class="certDaysColor(cert)" class="font-mono font-semibold">
80
- {{ cert.daysLeft !== null ? cert.daysLeft + 'd' : '—' }}
81
- </span>
82
- </td>
83
- <td>
84
- <span :class="'badge badge-' + certBadgeType(cert)">{{ certStatus(cert) }}</span>
85
- </td>
86
- <td class="text-right">
87
- <button @click="renewCert(cert.domain)" :disabled="ssl.renewingDomain !== null" class="btn btn-secondary btn-sm" :class="{ 'opacity-50': ssl.renewingDomain !== null }">
88
- {{ ssl.renewingDomain === cert.domain ? 'Renewing...' : 'Renew' }}
89
- </button>
90
- </td>
91
- </tr>
92
- </tbody>
93
- </table>
94
- </div>
2
+ <div v-show="page === 'ssl'" class="w-full">
3
+ <div class="flex items-center justify-between mb-8">
4
+ <div>
5
+ <h2 class="text-2xl font-bold tracking-tight text-foreground">SSL Certificates</h2>
6
+ <p class="text-muted font-medium text-sm mt-1">Let's Encrypt certificates managed dynamically</p>
7
+ </div>
8
+ <div class="flex gap-3">
9
+ <button @click="ssl.showCreateForm = !ssl.showCreateForm; ssl.createResult = null; ssl.createError = null" class="btn btn-secondary btn-sm">
10
+ {{ ssl.showCreateForm ? 'Cancel' : 'New Certificate' }}
11
+ </button>
12
+ <button @click="renewAll" :disabled="ssl.renewingDomain !== null" class="btn btn-primary btn-sm">
13
+ <svg v-if="ssl.renewingDomain === 'all'" class="w-3 h-3 animate-spin mr-1.5 inline-block" fill="none" viewBox="0 0 24 24"><circle class="opacity-25" cx="12" cy="12" r="10" stroke="currentColor" stroke-width="4"></circle><path class="opacity-75" fill="currentColor" d="M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4z"></path></svg>
14
+ {{ ssl.renewingDomain === 'all' ? 'Renewing All...' : 'Renew Expiring' }}
15
+ </button>
16
+ </div>
17
+ </div>
18
+
19
+ <!-- New Certificate inline form (Modal/Drawer block logic reused) -->
20
+ <transition name="modal">
21
+ <div v-if="ssl.showCreateForm" class="mb-8 stat-card overflow-hidden relative">
22
+ <div class="absolute top-0 left-0 w-full h-1 bg-primary/40"></div>
23
+
24
+ <div class="p-5 border-b border-border bg-black/5 dark:bg-white/5">
25
+ <h3 class="font-bold text-[15px] text-foreground tracking-tight">Create New Certificate</h3>
26
+ </div>
27
+ <div class="p-5 bg-background">
28
+ <!-- Error / Result Alerts -->
29
+ <div v-if="ssl.createResult" class="mb-5 p-4 rounded-[12px] bg-green-500/10 border border-green-500/20 text-[13px] shadow-sm">
30
+ <p class="text-green-500 font-bold mb-1">Certificate created successfully</p>
31
+ <p class="text-muted font-mono"><span class="form-label inline mr-2 text-[10px]">Cert</span> {{ ssl.createResult.certPath }}</p>
32
+ <p class="text-muted font-mono"><span class="form-label inline mr-2 text-[10px]">Key</span> {{ ssl.createResult.keyPath }}</p>
33
+ </div>
34
+
35
+ <div v-if="ssl.createError" class="mb-5 p-4 rounded-[12px] bg-red-500/10 border border-red-500/20 text-[13px] space-y-1.5 shadow-sm">
36
+ <p class="text-red-500 font-bold text-sm mb-1">Certificate creation failed</p>
37
+ <p class="text-muted"><span class="form-label inline mr-2 text-[10px]">Step</span> {{ ssl.createError.step }}</p>
38
+ <p class="text-muted"><span class="form-label inline mr-2 text-[10px]">Cause</span> {{ ssl.createError.cause }}</p>
39
+ <p class="text-muted"><span class="form-label inline mr-2 text-[10px]">Note</span> {{ ssl.createError.consequence }}</p>
40
+ </div>
41
+
42
+ <!-- DNS waiting state -->
43
+ <div v-if="ssl.dnsWaiting" class="p-4 rounded-[12px] bg-amber-500/10 border border-amber-500/20 text-sm shadow-sm space-y-3">
44
+ <p class="text-amber-500 font-bold">Add this DNS TXT record, then click Continue</p>
45
+ <div class="space-y-1 font-mono text-xs p-3 bg-black/5 dark:bg-white/5 border border-border/50 rounded-[10px]">
46
+ <p class="text-muted">Name:&nbsp; <span class="text-foreground">{{ ssl.dnsWaiting.txtName }}</span></p>
47
+ <p class="text-muted">Value: <span class="text-foreground border border-border/30 px-1 py-0.5 rounded break-all select-all">{{ ssl.dnsWaiting.txtValue }}</span></p>
48
+ </div>
49
+ <div class="flex gap-2 pt-2">
50
+ <button @click="confirmDns()" :disabled="ssl.dnsConfirming" class="btn btn-primary min-w-[120px]">
51
+ {{ ssl.dnsConfirming ? 'Verifying...' : "I've added the TXT record" }}
52
+ </button>
53
+ <button @click="cancelDns()" :disabled="ssl.dnsConfirming" class="btn btn-secondary">Cancel</button>
54
+ </div>
55
+ </div>
56
+
57
+ <!-- Input form -->
58
+ <div v-if="!ssl.dnsWaiting">
59
+ <div class="flex flex-col sm:flex-row sm:items-center gap-6 mb-6 pb-6 border-b border-border/50">
60
+ <label class="flex items-start gap-3 cursor-pointer group">
61
+ <input type="radio" v-model="ssl.createMethod" value="http" class="w-4 h-4 mt-0.5 text-primary bg-input border-border focus:ring-primary focus:ring-offset-background" />
62
+ <div class="flex flex-col">
63
+ <span class="text-[13px] font-bold text-foreground group-hover:text-primary transition-colors">HTTP Challenge</span>
64
+ <span class="text-[11px] font-medium text-muted mt-0.5">DNS A record must point to this server</span>
65
+ </div>
66
+ </label>
67
+ <label class="flex items-start gap-3 cursor-pointer group">
68
+ <input type="radio" v-model="ssl.createMethod" value="dns" class="w-4 h-4 mt-0.5 text-primary bg-input border-border focus:ring-primary focus:ring-offset-background" />
69
+ <div class="flex flex-col">
70
+ <span class="text-[13px] font-bold text-foreground group-hover:text-primary transition-colors">DNS Challenge</span>
71
+ <span class="text-[11px] font-medium text-muted mt-0.5">Requires adding a TXT record to your DNS provider</span>
72
+ </div>
73
+ </label>
74
+ </div>
75
+
76
+ <div class="grid grid-cols-1 sm:grid-cols-2 gap-6 items-end">
77
+ <div class="w-full">
78
+ <label class="form-label">Email (Let's Encrypt)</label>
79
+ <input v-model="ssl.createEmail" type="email" class="form-input" placeholder="admin@example.com" />
80
+ </div>
81
+ <div class="w-full">
82
+ <label class="form-label">Domain Name</label>
83
+ <input v-model="ssl.createDomain" @keyup.enter="createCert()" class="form-input" placeholder="example.com" />
84
+ </div>
85
+
86
+ <div class="flex items-center gap-4 py-1">
87
+ <label class="relative inline-flex items-center cursor-pointer flex-shrink-0">
88
+ <input type="checkbox" v-model="ssl.createWww" class="sr-only peer" />
89
+ <div class="w-10 h-5 bg-black/20 dark:bg-white/10 border border-border peer-focus:outline-none rounded-full peer peer-checked:after:translate-x-full after:content-[''] after:absolute after:top-[2px] after:left-[2px] after:bg-white after:rounded-full after:h-4 after:w-4 after:transition-all peer-checked:bg-primary"></div>
90
+ </label>
91
+ <span class="text-[13px] font-bold text-foreground">Include www</span>
92
+ </div>
93
+
94
+ <div class="flex justify-end pt-2">
95
+ <button @click="createCert()" :disabled="ssl.creating || !ssl.createDomain.trim() || !ssl.createEmail.trim()" class="btn btn-primary min-w-[120px]">
96
+ <svg v-if="ssl.creating" class="w-4 h-4 animate-spin inline-block mr-1.5" fill="none" viewBox="0 0 24 24"><circle class="opacity-25" cx="12" cy="12" r="10" stroke="currentColor" stroke-width="4"></circle><path class="opacity-75" fill="currentColor" d="M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4z"></path></svg>
97
+ {{ ssl.creating ? 'Working...' : 'Create Certificate' }}
98
+ </button>
99
+ </div>
100
+ </div>
101
+ </div>
102
+ </div>
103
+ </div>
104
+ </transition>
105
+
106
+ <div v-if="ssl.error" class="mb-6 p-4 rounded-[12px] bg-red-500/10 border border-red-500/20 text-red-500 text-[13px] font-bold shadow-sm">
107
+ {{ ssl.error }}
108
+ </div>
109
+
110
+ <div v-if="ssl.loading" class="text-muted text-sm flex items-center gap-3">
111
+ <div class="w-full flex flex-col gap-2">
112
+ <div class="h-16 w-full animate-pulse-fx stat-card"></div>
113
+ <div class="h-16 w-full animate-pulse-fx stat-card"></div>
114
+ <div class="h-16 w-full animate-pulse-fx stat-card"></div>
115
+ </div>
116
+ </div>
117
+
118
+ <div v-else-if="ssl.certs.length === 0" class="stat-card p-16 text-center relative overflow-hidden">
119
+ <div class="absolute top-0 left-0 w-full h-1 bg-primary/40"></div>
120
+ <div class="flex justify-center mb-4">
121
+ <div class="w-16 h-16 rounded-[16px] flex items-center justify-center text-primary shadow-lg" style="background: rgba(var(--color-primary-rgb), 0.1); color: var(--color-primary);">
122
+ <svg class="w-8 h-8" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 15v2m-6 4h12a2 2 0 002-2v-6a2 2 0 00-2-2H6a2 2 0 00-2 2v6a2 2 0 002 2zm10-10V7a4 4 0 00-8 0v4h8z"></path></svg>
123
+ </div>
124
+ </div>
125
+ <h3 class="text-lg font-semibold text-foreground tracking-tight">No SSL Certificates</h3>
126
+ <p class="text-muted text-sm mt-2 max-w-sm mx-auto">It's highly recommended to generate an SSL certificate to secure your proxies.</p>
127
+ </div>
128
+
129
+ <div v-else class="stat-card overflow-hidden flex flex-col">
130
+ <!-- Header pseudo-row -->
131
+ <div class="flex items-center px-6 py-3 border-b border-border bg-black/5 dark:bg-white/5">
132
+ <div class="w-8 shrink-0"></div> <!-- for status dot -->
133
+ <div class="flex-1 form-label !mb-0 text-left text-[11px] font-bold">Domain Name</div>
134
+ <div class="w-32 form-label !mb-0 text-left text-[11px] font-bold">Expiry</div>
135
+ <div class="w-32 form-label !mb-0 text-left text-[11px] font-bold">Time Left</div>
136
+ <div class="w-24 form-label !mb-0 text-left text-[11px] font-bold">Status</div>
137
+ <div class="w-32 form-label !mb-0 text-right text-[11px] font-bold pr-2">Action</div>
138
+ </div>
139
+
140
+ <!-- Rows -->
141
+ <div v-for="cert in ssl.certs" :key="cert.domain" class="domain-row group">
142
+ <!-- Status Dot based on expiry -->
143
+ <div class="w-8 shrink-0 flex items-center justify-center -ml-1">
144
+ <div class="status-dot" :class="cert.daysLeft > 10 ? 'active' : 'inactive'"></div>
145
+ </div>
146
+
147
+ <!-- Domain -->
148
+ <div class="flex-1 min-w-0 pr-4">
149
+ <div class="font-mono text-[14px] font-semibold text-foreground truncate select-all">{{ cert.domain }}</div>
150
+ </div>
151
+
152
+ <!-- Expiry Date -->
153
+ <div class="w-32 shrink-0 truncate text-[13px] text-muted">
154
+ {{ cert.expiry ? new Date(cert.expiry).toLocaleDateString() : '—' }}
155
+ </div>
156
+
157
+ <!-- Days Left -->
158
+ <div class="w-32 shrink-0 truncate text-[14px] font-mono font-bold" :class="certDaysColor(cert)">
159
+ {{ cert.daysLeft !== null ? cert.daysLeft + 'd' : '—' }}
160
+ </div>
161
+
162
+ <!-- Badges -->
163
+ <div class="w-24 shrink-0">
164
+ <span class="badge" :class="'badge-' + certBadgeType(cert)">{{ certStatus(cert) }}</span>
165
+ </div>
166
+
167
+ <!-- Actions -->
168
+ <div class="w-32 flex justify-end shrink-0 domain-actions">
169
+ <button @click="renewCert(cert.domain)" :disabled="ssl.renewingDomain !== null" class="btn btn-secondary btn-sm h-8" :class="{ 'opacity-50': ssl.renewingDomain !== null }">
170
+ <svg v-if="ssl.renewingDomain === cert.domain" class="w-3 h-3 animate-spin mr-1 inline-block" fill="none" viewBox="0 0 24 24"><circle class="opacity-25" cx="12" cy="12" r="10" stroke="currentColor" stroke-width="4"></circle><path class="opacity-75" fill="currentColor" d="M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4z"></path></svg>
171
+ {{ ssl.renewingDomain === cert.domain ? 'Working' : 'Renew' }}
172
+ </button>
173
+ </div>
174
+ </div>
175
+ </div>
95
176
  </div>
package/install.sh CHANGED
@@ -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
  # ---------------------------------------------------------------------------
@@ -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
- if ! nvm install "$NODE_TARGET" 2>&1; then
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
- if ! nvm use "$NODE_TARGET" 2>&1; then
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" \
@@ -17,9 +17,9 @@ bootstrap_nvm() {
17
17
  # Step 1: Install nvm if not already present
18
18
  # ------------------------------------------------------------------
19
19
  if [ -f "$nvm_dir/nvm.sh" ]; then
20
- step_done "nvm already installed at $nvm_dir — skipping download"
20
+ printf ' nvm already installed at %s — skipping download\n' "$nvm_dir"
21
21
  else
22
- step_running "Downloading and installing nvm…"
22
+ printf ' Downloading and installing nvm…\n'
23
23
 
24
24
  local install_ok=false
25
25
  if command -v curl >/dev/null 2>&1; then
@@ -34,14 +34,14 @@ bootstrap_nvm() {
34
34
  fi
35
35
 
36
36
  if [ "$install_ok" = "false" ]; then
37
- step_failed "nvm download failed"
38
- printf '\nManual recovery:\n' >&2
37
+ printf 'Error: nvm download failed\n' >&2
38
+ printf 'Manual recovery:\n' >&2
39
39
  printf ' curl -o- %s | bash\n' "$nvm_install_url" >&2
40
40
  printf ' Then run: source ~/.nvm/nvm.sh\n' >&2
41
41
  return 1
42
42
  fi
43
43
 
44
- step_done "nvm installed at $nvm_dir"
44
+ printf ' nvm installed at %s\n' "$nvm_dir"
45
45
  fi
46
46
 
47
47
  # ------------------------------------------------------------------
@@ -66,12 +66,12 @@ bootstrap_nvm() {
66
66
  fi
67
67
 
68
68
  if ! command -v nvm >/dev/null 2>&1; then
69
- step_failed "nvm command not available after install"
70
- printf '\nManual recovery:\n' >&2
69
+ printf 'Error: nvm command not available after install\n' >&2
70
+ printf 'Manual recovery:\n' >&2
71
71
  printf ' source ~/.nvm/nvm.sh\n' >&2
72
72
  printf ' Then re-run: bash install.sh\n' >&2
73
73
  return 1
74
74
  fi
75
75
 
76
- step_done "nvm is active in this session"
76
+ printf ' nvm is active in this session\n'
77
77
  }
@@ -60,19 +60,24 @@ _pick_tty() {
60
60
  RESET="\033[0m"
61
61
  HIGHLIGHT="\033[7m"
62
62
 
63
- # Hide cursor
64
- printf '\033[?25l'
65
-
66
- # Save terminal state and restore on exit
63
+ # Save terminal state — guard against stty failures (e.g. dumb terminals)
67
64
  local old_stty
68
65
  old_stty="$(stty -g 2>/dev/null || true)"
69
66
 
70
- # Cleanup function
67
+ # Cleanup: restore terminal state and show cursor
71
68
  _tty_cleanup() {
72
- stty "$old_stty" 2>/dev/null || true
69
+ [ -n "$old_stty" ] && stty "$old_stty" 2>/dev/null || true
73
70
  printf '\033[?25h' # show cursor
74
71
  }
75
- trap '_tty_cleanup; return 2' INT TERM
72
+
73
+ # Use a flag instead of `return` inside the trap handler.
74
+ # `return` in a trap does not exit the outer function in bash —
75
+ # it only returns from the trap handler itself.
76
+ local _cancelled=false
77
+ trap '_tty_cleanup; _cancelled=true' INT TERM
78
+
79
+ # Hide cursor only if the terminal supports it
80
+ printf '\033[?25l' 2>/dev/null || true
76
81
 
77
82
  printf '\nSelect a Node.js version (up/down arrows, Enter to confirm, q to quit):\n\n'
78
83
 
@@ -90,12 +95,22 @@ _pick_tty() {
90
95
  stty raw -echo 2>/dev/null || true
91
96
 
92
97
  while true; do
98
+ # Check cancellation flag (set by INT/TERM trap)
99
+ if [ "$_cancelled" = "true" ]; then
100
+ break
101
+ fi
102
+
93
103
  local ch seq1 seq2
94
- IFS= read -r -s -n1 ch 2>/dev/null || true
104
+ IFS= read -r -n1 ch 2>/dev/null || ch=""
105
+
106
+ # Check flag again after read (signal may have arrived during read)
107
+ if [ "$_cancelled" = "true" ]; then
108
+ break
109
+ fi
95
110
 
96
111
  if [ "$ch" = $'\x1b' ]; then
97
- IFS= read -r -s -n1 -t 0.1 seq1 2>/dev/null || seq1=""
98
- IFS= read -r -s -n1 -t 0.1 seq2 2>/dev/null || seq2=""
112
+ IFS= read -r -n1 -t 0.1 seq1 2>/dev/null || seq1=""
113
+ IFS= read -r -n1 -t 0.1 seq2 2>/dev/null || seq2=""
99
114
  if [ "$seq1" = "[" ]; then
100
115
  case "$seq2" in
101
116
  A) [ "$selected" -gt 0 ] && selected=$(( selected - 1 )) ;;
@@ -105,13 +120,11 @@ _pick_tty() {
105
120
  elif [ "$ch" = $'\n' ] || [ "$ch" = $'\r' ] || [ -z "$ch" ]; then
106
121
  break
107
122
  elif [ "$ch" = "q" ] || [ "$ch" = "Q" ]; then
108
- _tty_cleanup
109
- trap - INT TERM
110
- printf '\n'
111
- return 2
123
+ _cancelled=true
124
+ break
112
125
  fi
113
126
 
114
- # Redraw: move cursor up count lines
127
+ # Redraw: move cursor up count lines, clear each line, redraw
115
128
  local k
116
129
  for (( k=0; k<count; k++ )); do
117
130
  printf "${CLEAR_LINE}\033[1A"
@@ -130,6 +143,10 @@ _pick_tty() {
130
143
  trap - INT TERM
131
144
  printf '\n'
132
145
 
146
+ if [ "$_cancelled" = "true" ]; then
147
+ return 2
148
+ fi
149
+
133
150
  PICKED_VERSION="$(printf '%s' "${NODE_RELEASES[$selected]}" | cut -d'|' -f1)"
134
151
  }
135
152
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "easy-devops",
3
- "version": "0.2.7",
3
+ "version": "1.0.0",
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",
@@ -32,7 +32,8 @@
32
32
  "type": "module",
33
33
  "main": "cli/index.js",
34
34
  "bin": {
35
- "easy-devops": "cli/index.js"
35
+ "easy-devops": "cli/index.js",
36
+ "ezz": "cli/index.js"
36
37
  },
37
38
  "files": [
38
39
  "cli/",
@@ -54,6 +55,7 @@
54
55
  "node": ">=18.0.0"
55
56
  },
56
57
  "dependencies": {
58
+ "acme-client": "^5.4.0",
57
59
  "chalk": "^5.3.0",
58
60
  "cli-table3": "^0.6.5",
59
61
  "ejs": "^5.0.1",