caddy-cli-manager 1.0.0 → 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.
Files changed (2) hide show
  1. package/bin/cli.js +2 -5
  2. package/package.json +1 -1
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,6 +1,6 @@
1
1
  {
2
2
  "name": "caddy-cli-manager",
3
- "version": "1.0.0",
3
+ "version": "1.0.1",
4
4
  "description": "CLI para gerenciar Caddyfile facilmente",
5
5
  "bin": {
6
6
  "caddy-cli": "./bin/cli.js"