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.
Files changed (3) hide show
  1. package/README.md +6 -1
  2. package/bin/cli.js +2 -5
  3. package/package.json +3 -3
package/README.md CHANGED
@@ -1,5 +1,10 @@
1
1
  # Caddy CLI Manager
2
2
 
3
+ [![npm](https://img.shields.io/npm/v/caddy-cli-manager)](https://www.npmjs.com/package/caddy-cli-manager)
4
+ [![license](https://img.shields.io/github/license/williammoreschi/caddy-cli-manager)](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="./docs/preview.gif" alt="preview" />
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
- if (!fs.existsSync(filePath)) return false;
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
@@ -1,9 +1,9 @@
1
1
  {
2
2
  "name": "caddy-cli-manager",
3
- "version": "1.0.0",
3
+ "version": "1.0.2",
4
4
  "description": "CLI para gerenciar Caddyfile facilmente",
5
5
  "bin": {
6
- "caddy-cli": "./bin/cli.js"
6
+ "caddy-cli": "bin/cli.js"
7
7
  },
8
8
  "type": "commonjs"
9
- }
9
+ }