caddy-cli-manager 1.0.0 → 1.0.2
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 +6 -1
- package/bin/cli.js +2 -5
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -1,5 +1,10 @@
|
|
|
1
1
|
# Caddy CLI Manager
|
|
2
2
|
|
|
3
|
+
[](https://www.npmjs.com/package/caddy-cli-manager)
|
|
4
|
+
[](LICENSE)
|
|
5
|
+
|
|
6
|
+
CLI simples para gerenciar o **Caddyfile** de forma rápida e interativa, com zero dependências externas.
|
|
7
|
+
|
|
3
8
|
CLI simples para gerenciar o **Caddyfile** de forma rápida e interativa, com zero dependências externas.
|
|
4
9
|
|
|
5
10
|
Ideal para quem trabalha com múltiplos projetos locais e precisa criar/remover domínios com frequência.
|
|
@@ -7,7 +12,7 @@ Ideal para quem trabalha com múltiplos projetos locais e precisa criar/remover
|
|
|
7
12
|
## 🎥 Preview
|
|
8
13
|
|
|
9
14
|
<p align="center">
|
|
10
|
-
<img src="
|
|
15
|
+
<img src="https://raw.githubusercontent.com/williammoreschi/caddy-cli-manager/main/docs/preview.gif" alt="preview" />
|
|
11
16
|
</p>
|
|
12
17
|
|
|
13
18
|
## ⚡ Zero dependências
|
package/bin/cli.js
CHANGED
|
@@ -133,11 +133,8 @@ function confirmPort(port) {
|
|
|
133
133
|
}
|
|
134
134
|
|
|
135
135
|
function domainExists(domain) {
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
const content = fs.readFileSync(filePath, "utf-8");
|
|
139
|
-
|
|
140
|
-
return content.includes(domain);
|
|
136
|
+
const domains = getDomains();
|
|
137
|
+
return domains.some((d) => d.domain === domain);
|
|
141
138
|
}
|
|
142
139
|
|
|
143
140
|
function confirmOverwrite(domain) {
|
package/package.json
CHANGED