@blakearoberts/visage 0.0.1-rc.12 → 0.0.1-rc.13

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/index.js +10 -3
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -241,7 +241,7 @@ http {
241
241
 
242
242
  <%_ for (const [name, upstream] of Object.entries(it.upstreams)) { %>
243
243
  upstream <%~ name %> {
244
- <%_ if (upstream.external || (upstream.host === 'host.docker.internal' && it.resolveHostDockerInternal)) { %>
244
+ <%_ if (upstream.resolve) { %>
245
245
  zone <%~ name %> 64k;
246
246
  server <%~ upstream.host %>:<%~ upstream.port %> resolve;
247
247
  <%_ } else { %>
@@ -311,8 +311,15 @@ function renderNginxConfig(config) {
311
311
  cert: join(config.files.certs[1], 'tls.crt'),
312
312
  key: join(config.files.certs[1], 'tls.key'),
313
313
  },
314
- upstreams: config.upstreams,
315
- resolveHostDockerInternal: process.platform !== 'linux',
314
+ upstreams: Object.fromEntries(Object.entries(config.upstreams).map(([name, upstream]) => [
315
+ name,
316
+ {
317
+ ...upstream,
318
+ resolve: upstream.external ||
319
+ (upstream.host === 'host.docker.internal' &&
320
+ process.platform !== 'linux'),
321
+ },
322
+ ])),
316
323
  };
317
324
  return new Eta({ autoTrim: false }).renderString(template, data);
318
325
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@blakearoberts/visage",
3
- "version": "0.0.1-rc.12",
3
+ "version": "0.0.1-rc.13",
4
4
  "description": "Vite plugin for local development with HMR and OIDC session cookie lifecycle semantics.",
5
5
  "type": "module",
6
6
  "author": "Blake Roberts",