@fabioplunser/epd 0.5.5 → 0.5.6

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/dist/cli.js +11 -10
  2. package/package.json +1 -1
package/dist/cli.js CHANGED
@@ -866,12 +866,6 @@ function validateCrossReferences(cfg) {
866
866
  }
867
867
  }
868
868
  }
869
- if (cfg.proxy.enabled && cfg.proxy.ssl && cfg.proxy.challenge !== "dns" && !cfg.proxy.email) {
870
- const anySsl = cfg.services.some((s) => s.routes.some((r) => r.ssl));
871
- if (anySsl)
872
- fail("epd.yml.proxy.email", "is required for Let's Encrypt certificates", `proxy:
873
- email: you@example.com`);
874
- }
875
869
  if (cfg.mode === "docker" && !cfg.registry && cfg.services.some((s) => s.hosts.length > 1)) {}
876
870
  }
877
871
 
@@ -2804,8 +2798,8 @@ http:
2804
2798
  - url: "http://${upstreamHost}:${upstreamPort}"
2805
2799
  `;
2806
2800
  }
2807
- function updateLocalConfigDisableProxy() {
2808
- const configFile = resolve2("epd.yml");
2801
+ function updateLocalConfigDisableProxy(configPath = "epd.yml") {
2802
+ const configFile = resolve2(configPath);
2809
2803
  if (!existsSync5(configFile))
2810
2804
  return;
2811
2805
  try {
@@ -2843,7 +2837,7 @@ async function handleExistingProxy(host, cfg, detected) {
2843
2837
  if (!useExisting)
2844
2838
  return false;
2845
2839
  cfg.proxy.enabled = false;
2846
- updateLocalConfigDisableProxy();
2840
+ updateLocalConfigDisableProxy(cfg.configPath);
2847
2841
  if (detected.type === "caddy") {
2848
2842
  const snippet = generateCaddyConfig(cfg, "127.0.0.1", upstreamPort);
2849
2843
  log.plain(`
@@ -3308,6 +3302,13 @@ async function ensureProxy(host, cfg, opts = {}) {
3308
3302
  if (!cfg.proxy.enabled)
3309
3303
  return;
3310
3304
  }
3305
+ if (cfg.proxy.ssl && cfg.proxy.challenge !== "dns" && !cfg.proxy.email) {
3306
+ const anySsl = cfg.services.some((s) => s.routes.some((r) => r.ssl));
3307
+ if (anySsl) {
3308
+ throw new EpdError("epd.yml.proxy.email: is required for Let's Encrypt certificates", `proxy:
3309
+ email: you@example.com`);
3310
+ }
3311
+ }
3311
3312
  await host.writeFile(p.proxyApp, JSON.stringify(declaration, null, 2), "644");
3312
3313
  const where = containerMode ? CONTAINER_PATHS : { dynamicDir: p.proxyDynamicDir, acmeFile: `${p.acmeDir}/acme.json` };
3313
3314
  const staticJson = JSON.stringify(staticConfig(merged, where), null, 2);
@@ -6823,7 +6824,7 @@ async function promptAutoUpdate(currentVersion) {
6823
6824
  }
6824
6825
 
6825
6826
  // src/version.ts
6826
- var VERSION = "0.5.5";
6827
+ var VERSION = "0.5.6";
6827
6828
 
6828
6829
  // src/commands/update.ts
6829
6830
  var update = {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fabioplunser/epd",
3
- "version": "0.5.5",
3
+ "version": "0.5.6",
4
4
  "description": "Easy Project Deployer — deploy any project to one or many servers with Docker or PM2, fronted by Traefik.",
5
5
  "type": "module",
6
6
  "author": "Fabio Plünser",