@blakearoberts/visage 0.0.4-rc.9 → 0.0.5-rc.0

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 CHANGED
@@ -166,6 +166,7 @@ Visage pulls these as needed based on configuration:
166
166
  | [NGINX](https://nginx.org/) | [`nginx`](https://hub.docker.com/_/nginx) | [manifest](docker-compose.images.yml) |
167
167
  | [OAuth2 Proxy](https://oauth2-proxy.github.io/oauth2-proxy/) | [`quay.io/oauth2-proxy/oauth2-proxy`](https://quay.io/repository/oauth2-proxy/oauth2-proxy) | [manifest](docker-compose.images.yml) |
168
168
  | [Dex](https://dexidp.io/) | [`ghcr.io/dexidp/dex`](https://github.com/dexidp/dex/pkgs/container/dex) | [manifest](docker-compose.images.yml) |
169
+ | [Socat](https://www.dest-unreach.org/socat/) | [`alpine/socat`](https://hub.docker.com/r/alpine/socat) | [manifest](docker-compose.images.yml) |
169
170
 
170
171
  ## Security Notes
171
172
 
package/dist/compose.d.ts CHANGED
@@ -1,5 +1,3 @@
1
1
  import type { VisageConfig } from './config';
2
- type StopCompose = () => void;
3
- export declare function startCompose(config: VisageConfig): StopCompose;
4
- export {};
2
+ export declare function startCompose(config: VisageConfig): () => void;
5
3
  //# sourceMappingURL=compose.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"compose.d.ts","sourceRoot":"","sources":["../src/compose.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAE7C,KAAK,WAAW,GAAG,MAAM,IAAI,CAAC;AAK9B,wBAAgB,YAAY,CAAC,MAAM,EAAE,YAAY,GAAG,WAAW,CAiD9D"}
1
+ {"version":3,"file":"compose.d.ts","sourceRoot":"","sources":["../src/compose.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAE7C,wBAAgB,YAAY,CAAC,MAAM,EAAE,YAAY,GAAG,MAAM,IAAI,CAmD7D"}
package/dist/config.d.ts CHANGED
@@ -47,6 +47,7 @@ type OIDCEndpointConfig = {
47
47
  readonly authorization?: string;
48
48
  readonly token?: string;
49
49
  readonly jwks?: string;
50
+ readonly algs?: readonly string[];
50
51
  readonly end_session_endpoint?: string;
51
52
  };
52
53
  type ManualOIDCEndpointConfig = OIDCEndpointConfig & {
@@ -100,14 +101,14 @@ export type VisageConfig = {
100
101
  };
101
102
  readonly compose: {
102
103
  readonly name: string;
103
- readonly network: {
104
- readonly trustedProxyIps: readonly string[];
105
- };
106
104
  };
107
105
  readonly services: Readonly<Record<string, ResolvedService>>;
108
106
  readonly upstreams: Readonly<Record<string, ResolvedConfigUpstream>>;
109
107
  };
110
108
  export declare const VisageEdgeKeyHeader = "X-Visage-Edge-Key";
109
+ export declare const DockerImages: Record<string, {
110
+ image: string;
111
+ }>;
111
112
  export declare function resolveOptions(options: VisageOptions): ResolvedVisageOptions;
112
113
  export declare function resolveConfig(options: ResolvedVisageOptions & {
113
114
  readonly root: string;
@@ -1 +1 @@
1
- {"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EACV,eAAe,EACf,gBAAgB,EAChB,aAAa,EACb,wBAAwB,EACxB,aAAa,EAEb,aAAa,EAEd,MAAM,SAAS,CAAC;AAEjB,KAAK,MAAM,GAAG,SAAS,CAAC,IAAI,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,CAAC,CAAC;AAElD,KAAK,oBAAoB,GAAG;IAC1B,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAC7B,QAAQ,CAAC,aAAa,EAAE,MAAM,CAAC;IAC/B,QAAQ,CAAC,cAAc,EAAE,MAAM,CAAC;IAChC,QAAQ,CAAC,cAAc,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;IAC5C,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;CAC9B,CAAC;AAEF,KAAK,iBAAiB,GAClB;IAAE,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CAAC;QAC9B,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;KAC1B,CAAC;IACF,QAAQ,CAAC,OAAO,EAAE;QAChB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;KACvB,CAAC;IAEF,QAAQ,CAAC,QAAQ,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,eAAe,CAAC,CAAC,CAAC;IAC7D,QAAQ,CAAC,SAAS,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,sBAAsB,CAAC,CAAC,CAAC;CACtE,CAAC;AAEF,eAAO,MAAM,mBAAmB,sBAAsB,CAAC;AAEvD,eAAO,MAAM,YAAY,EAKX,MAAM,CAAC,MAAM,EAAE;IAAE,KAAK,EAAE,MAAM,CAAA;CAAE,CAAC,CAAC;AA0GhD,wBAAgB,cAAc,CAAC,OAAO,EAAE,aAAa,GAAG,qBAAqB,CAyD5E;AAgLD,wBAAgB,aAAa,CAC3B,OAAO,EAAE,qBAAqB,GAAG;IAC/B,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;CAC1B,GACA,YAAY,CAqFd"}
package/dist/index.js CHANGED
@@ -1,9 +1,8 @@
1
- import { spawnSync, spawn } from 'node:child_process';
2
1
  import { randomBytes } from 'node:crypto';
3
- import { isIP } from 'node:net';
4
2
  import { basename, resolve, join } from 'node:path';
5
3
  import { readFileSync, mkdirSync, chmodSync, openSync, rmSync, appendFileSync, writeFileSync } from 'node:fs';
6
4
  import { parse, stringify } from 'yaml';
5
+ import { spawnSync } from 'node:child_process';
7
6
  import { homedir } from 'node:os';
8
7
  import { hashSync } from 'bcryptjs';
9
8
  import { Eta } from 'eta';
@@ -17,14 +16,14 @@ const BaseServiceDex = {
17
16
  };
18
17
  const BaseServiceNginx = {
19
18
  image: DockerImages.nginx.image,
20
- depends_on: ['oauth2_proxy'],
21
19
  extra_hosts: ['host.docker.internal:host-gateway'],
22
20
  restart: 'always',
23
21
  };
24
22
  const BaseServiceOAuth2Proxy = {
25
23
  image: DockerImages.oauth2_proxy.image,
26
24
  command: ['--config', '/etc/oauth2-proxy/config.yml'],
27
- extra_hosts: ['host.docker.internal:host-gateway'],
25
+ depends_on: ['nginx'],
26
+ network_mode: 'service:nginx',
28
27
  restart: 'always',
29
28
  };
30
29
  const DefaultProxyPolicy = {
@@ -49,7 +48,7 @@ const DefaultProxyPolicy = {
49
48
  },
50
49
  };
51
50
  const BaseUpstreamOauth2Proxy = {
52
- host: 'oauth2_proxy',
51
+ host: '127.0.0.1',
53
52
  scheme: 'http',
54
53
  port: 4180,
55
54
  locations: {
@@ -167,13 +166,7 @@ function resolveServicesOptions(services = {}) {
167
166
  },
168
167
  oauth2_proxy: {
169
168
  ...BaseServiceOAuth2Proxy,
170
- ...{
171
- ...(services.oauth2_proxy ?? {}),
172
- extra_hosts: [
173
- ...BaseServiceOAuth2Proxy.extra_hosts,
174
- ...(services.oauth2_proxy?.extra_hosts ?? []),
175
- ],
176
- },
169
+ ...(services.oauth2_proxy ?? {}),
177
170
  },
178
171
  };
179
172
  }
@@ -345,14 +338,13 @@ function resolveConfig(options) {
345
338
  },
346
339
  compose: {
347
340
  name: resolveComposeName(options.root),
348
- network: { trustedProxyIps: [] },
349
341
  },
350
342
  services: {
351
343
  ...('dex' in idp
352
344
  ? {
353
345
  dex: BaseServiceDex,
354
- nginx: { ...BaseServiceNginx, depends_on: ['dex', 'oauth2_proxy'] },
355
- oauth2_proxy: { ...BaseServiceOAuth2Proxy, depends_on: ['dex'] },
346
+ nginx: BaseServiceNginx,
347
+ oauth2_proxy: BaseServiceOAuth2Proxy,
356
348
  }
357
349
  : { nginx: BaseServiceNginx, oauth2_proxy: BaseServiceOAuth2Proxy }),
358
350
  ...Object.fromEntries(Object.entries(options.services).map(([name, { upstream: _upstream, ...service }]) => [
@@ -373,8 +365,8 @@ function resolveConfig(options) {
373
365
  function resolveComposeName(root) {
374
366
  const name = (packageName(root) ?? basename(resolve(root)))
375
367
  .toLowerCase()
376
- .replace(/[^a-z0-9_-]+/g, '-')
377
- .replace(/^[^a-z0-9]+|[^a-z0-9]+$/g, '');
368
+ .replace(/^[^a-z0-9]+/, '')
369
+ .replace(/[^a-z0-9_-]+/g, '-');
378
370
  return `${name}-visage`;
379
371
  }
380
372
  function packageName(root) {
@@ -423,6 +415,7 @@ function resolveIdpConfig({ host, port, idp, }) {
423
415
  const issuer = new URL(idp.issuer);
424
416
  const oidc = {
425
417
  issuer: idp.issuer,
418
+ ...(idp.algs === undefined ? {} : { algs: idp.algs }),
426
419
  ...(idp.end_session_endpoint === undefined
427
420
  ? {}
428
421
  : { end_session_endpoint: idp.end_session_endpoint }),
@@ -576,19 +569,15 @@ function mkcertInstallInstructions() {
576
569
  ].join('\n');
577
570
  }
578
571
 
579
- let stopRef;
580
- let cookieSecret;
581
572
  function startCompose(config) {
582
- stopRef?.();
583
- stopRef = undefined;
584
- const file = join(config.cache, config.files.compose);
585
573
  const logs = join(config.cache, 'logs');
586
574
  const output = openSync(join(logs, 'compose.log'), 'w');
587
575
  const compose = [
588
576
  'compose',
589
577
  '--ansi=never',
590
- `--file=${file}`,
578
+ `--file=${config.files.compose}`,
591
579
  `--project-name=${config.compose.name}`,
580
+ `--profile=${process.platform}`,
592
581
  ];
593
582
  const env = {
594
583
  COMPOSE_MENU: 'false',
@@ -597,31 +586,36 @@ function startCompose(config) {
597
586
  : { [config.secrets.clientSecret]: config.oauth2.secret }),
598
587
  ...process.env,
599
588
  [config.secrets.edgeKey]: config.edgeKey,
600
- [config.secrets.cookieSecret]: (cookieSecret ??=
601
- randomBytes(32).toString('base64url')),
589
+ [config.secrets.cookieSecret]: randomBytes(32).toString('base64url'),
602
590
  };
603
591
  const opts = {
604
592
  cwd: config.cache,
605
593
  stdio: ['ignore', output, output],
606
594
  env,
607
595
  };
608
- const up = [
609
- ...compose,
610
- 'up',
611
- '--force-recreate',
612
- '--remove-orphans',
613
- ];
614
- const child = spawn('docker', up, opts);
615
- const stop = () => {
616
- if (stopRef !== stop)
617
- return;
618
- stopRef = undefined;
619
- child.kill();
620
- const down = [...compose, 'down', '--remove-orphans'];
621
- spawnSync('docker', down, opts);
622
- };
623
- stopRef = stop;
624
- return stop;
596
+ function up() {
597
+ const args = [
598
+ ...compose,
599
+ 'up',
600
+ '--detach',
601
+ '--force-recreate',
602
+ '--remove-orphans',
603
+ ];
604
+ return spawnSync('docker', args, opts);
605
+ }
606
+ function down() {
607
+ const args = [...compose, 'down', '--remove-orphans'];
608
+ return spawnSync('docker', args, opts);
609
+ }
610
+ down();
611
+ const result = up();
612
+ if (result.error)
613
+ throw result.error;
614
+ if (result.status !== 0) {
615
+ down();
616
+ throw new Error('Failed to start Docker Compose');
617
+ }
618
+ return down;
625
619
  }
626
620
 
627
621
  const HOSTS_FILE = '/etc/hosts';
@@ -669,62 +663,6 @@ function ensureHostEntry({ host }) {
669
663
  }
670
664
  }
671
665
 
672
- function ensureNginxNetwork(config) {
673
- const network = config.compose.name;
674
- const exists = spawnSync('docker', ['network', 'ls', '--filter', `name=${network}`, '--format', '{{ .Name }}'], { encoding: 'utf-8' });
675
- if (exists.error)
676
- throw exists.error;
677
- if (exists.status !== 0) {
678
- console.error(exists.stderr);
679
- throw new Error('Failed to list Docker network');
680
- }
681
- if (exists.stdout) {
682
- return withTrustedProxyIps(config, inspectNetwork(network));
683
- }
684
- const create = spawnSync('docker', ['network', 'create', '--driver', 'bridge', network], { encoding: 'utf-8' });
685
- if (create.error)
686
- throw create.error;
687
- if (create.status !== 0) {
688
- console.error(create.stderr);
689
- throw new Error('Failed to create Docker network');
690
- }
691
- return withTrustedProxyIps(config, inspectNetwork(network));
692
- }
693
- function withTrustedProxyIps(config, trustedProxyIps) {
694
- return {
695
- ...config,
696
- compose: {
697
- ...config.compose,
698
- network: {
699
- ...config.compose.network,
700
- trustedProxyIps: [
701
- ...config.compose.network.trustedProxyIps,
702
- ...trustedProxyIps,
703
- ],
704
- },
705
- },
706
- };
707
- }
708
- function inspectNetwork(name) {
709
- const result = spawnSync('docker', [
710
- 'network',
711
- 'inspect',
712
- '--format',
713
- '{{range .IPAM.Config}}{{println .Subnet}}{{end}}',
714
- name,
715
- ], { encoding: 'utf-8' });
716
- if (result.error)
717
- throw result.error;
718
- if (result.status !== 0) {
719
- console.error(result.stderr);
720
- throw new Error('Failed to inspect Docker network');
721
- }
722
- return result.stdout
723
- .split(/\r?\n/)
724
- .map((line) => line.trim())
725
- .filter(Boolean);
726
- }
727
-
728
666
  function writeComposeConfig(config) {
729
667
  const file = join(config.cache, config.files.compose);
730
668
  const render = renderComposeConfig(config);
@@ -732,8 +670,13 @@ function writeComposeConfig(config) {
732
670
  }
733
671
  function renderComposeConfig(config) {
734
672
  const { dex, nginx, oauth2_proxy, ...services } = config.services;
673
+ const bridge = spawnSync('docker', [
674
+ 'network',
675
+ 'inspect',
676
+ 'bridge',
677
+ '--format={{ (index .IPAM.Config 0).Gateway }}',
678
+ ], { encoding: 'utf8' }).stdout.trim();
735
679
  return stringify({
736
- networks: { default: { external: true, name: config.compose.name } },
737
680
  secrets: {
738
681
  [config.secrets.cookieSecret]: {
739
682
  environment: config.secrets.cookieSecret,
@@ -754,27 +697,45 @@ function renderComposeConfig(config) {
754
697
  ? {
755
698
  dex: {
756
699
  ...config.services.dex,
757
- volumes: [`${config.files.dex[0]}:${config.files.dex[1]}:ro`],
700
+ volumes: [
701
+ `${config.files.dex[0]}:${config.files.dex[1]}:ro`,
702
+ ...(config.services.dex.volumes ?? []),
703
+ ],
758
704
  ...(config.oauth2.public
759
705
  ? {}
760
706
  : { secrets: [config.secrets.clientSecret] }),
761
707
  },
762
708
  }
763
709
  : {}),
710
+ ...('vite' in config.upstreams
711
+ ? {
712
+ vite_loopback: {
713
+ image: DockerImages.socat.image,
714
+ command: `tcp-listen:${config.upstreams.vite.port},fork,bind=${bridge} tcp-connect:127.0.0.1:${config.upstreams.vite.port}`,
715
+ network_mode: 'host',
716
+ profiles: ['linux'],
717
+ restart: 'always',
718
+ },
719
+ }
720
+ : {}),
764
721
  nginx: {
765
722
  ...config.services.nginx,
766
723
  secrets: [config.secrets.edgeKey],
767
724
  ports: [`127.0.0.1:${config.port}:${config.port}`],
768
725
  volumes: [
769
- config.files.certs,
770
- config.files.nginx,
771
- config.files.nginxEdgeKeyJS,
772
- ].map(([from, to]) => `${from}:${to}:ro`),
726
+ ...[
727
+ config.files.certs,
728
+ config.files.nginx,
729
+ config.files.nginxEdgeKeyJS,
730
+ ].map(([from, to]) => `${from}:${to}:ro`),
731
+ ...(config.services.nginx.volumes ?? []),
732
+ ],
773
733
  },
774
734
  oauth2_proxy: {
775
735
  ...config.services.oauth2_proxy,
776
736
  volumes: [
777
737
  `${config.files.oauth2Proxy[0]}:${config.files.oauth2Proxy[1]}:ro`,
738
+ ...(config.services.oauth2_proxy.volumes ?? []),
778
739
  ],
779
740
  secrets: [
780
741
  config.secrets.cookieSecret,
@@ -831,7 +792,8 @@ http {
831
792
  js_shared_dict_zone zone=edge_key:32k;
832
793
  js_set $edge_key edge_key;
833
794
 
834
- # Disable IPv6 DNS lookups that may fail to resolve upstream hostnames.
795
+ # Disable IPv6 DNS lookup. Docker Desktop (com.docker.backend), doesn't
796
+ # support IPv6 traffic translation to host loopback.
835
797
  resolver 127.0.0.11 ipv6=off;
836
798
 
837
799
  # Configure access log format.
@@ -1002,9 +964,12 @@ function writeOauth2ProxyConfig(config) {
1002
964
  }
1003
965
  function renderOauth2ProxyConfig(config) {
1004
966
  const data = {
1005
- http_address: `0.0.0.0:${config.upstreams.oauth2_proxy.port}`,
967
+ http_address: `127.0.0.1:${config.upstreams.oauth2_proxy.port}`,
1006
968
  provider: 'oidc',
1007
969
  oidc_issuer_url: config.idp.oidc.issuer,
970
+ ...(config.idp.oidc.algs === undefined
971
+ ? {}
972
+ : { oidc_enabled_signing_algs: config.idp.oidc.algs }),
1008
973
  ...('authorization' in config.idp.oidc
1009
974
  ? {
1010
975
  skip_oidc_discovery: true,
@@ -1038,7 +1003,7 @@ function renderOauth2ProxyConfig(config) {
1038
1003
  ],
1039
1004
  scope: config.oauth2.scopes.join(' '),
1040
1005
  reverse_proxy: true,
1041
- trusted_proxy_ips: config.compose.network.trustedProxyIps,
1006
+ trusted_proxy_ips: ['127.0.0.1'],
1042
1007
  set_xauthrequest: true,
1043
1008
  set_authorization_header: true,
1044
1009
  pass_access_token: true,
@@ -1088,14 +1053,13 @@ async function startVisageServer(config) {
1088
1053
  chmodSync(logs, 0o700);
1089
1054
  await ensureCerts(config);
1090
1055
  ensureHostEntry(config);
1091
- const renderConfig = ensureNginxNetwork(config);
1092
- writeComposeConfig(renderConfig);
1093
- if ('dex' in renderConfig.idp) {
1094
- writeDexConfig(renderConfig);
1056
+ writeComposeConfig(config);
1057
+ if ('dex' in config.idp) {
1058
+ writeDexConfig(config);
1095
1059
  }
1096
- writeNginxConfig(renderConfig);
1097
- writeOauth2ProxyConfig(renderConfig);
1098
- return startCompose(renderConfig);
1060
+ writeNginxConfig(config);
1061
+ writeOauth2ProxyConfig(config);
1062
+ return startCompose(config);
1099
1063
  }
1100
1064
 
1101
1065
  function visage(options = {}) {
@@ -1119,23 +1083,10 @@ function visage(options = {}) {
1119
1083
  host: resolvedOptions.host,
1120
1084
  clientPort: resolvedOptions.port,
1121
1085
  },
1122
- // Configure Vite to listen on the minimal host address to allow
1123
- // Docker containers to reach it. Visage (internally managed NGINX)
1124
- // exposes the browser-facing host/port. On non-Linux systems, this is
1125
- // localhost. On Linux, it's the host's bridge gateway (e.g.,
1126
- // 172.17.0.1).
1127
- host: process.platform !== 'linux'
1128
- ? '127.0.0.1'
1129
- : (spawnSync('docker', [
1130
- 'network',
1131
- 'inspect',
1132
- 'bridge',
1133
- '--format',
1134
- '{{range .IPAM.Config}}{{println .Gateway}}{{end}}',
1135
- ], { encoding: 'utf8' })
1136
- .stdout?.split(/\r?\n/)
1137
- .map((line) => line.trim())
1138
- .find((line) => isIP(line)) ?? '0.0.0.0'),
1086
+ // Overwrite the localhost default which may resolve to an IPv6
1087
+ // loopback. Docker Desktop (com.docker.backend), doesn't support IPv6
1088
+ // traffic translation to host loopback.
1089
+ host: '127.0.0.1',
1139
1090
  },
1140
1091
  };
1141
1092
  },
@@ -1170,6 +1121,7 @@ function visage(options = {}) {
1170
1121
  });
1171
1122
  visageUrl = formatVisageUrlLog(config.host, config.port);
1172
1123
  stop = await startVisageServer(config);
1124
+ process.once('SIGINT', closeBundle);
1173
1125
  vite.httpServer?.once('close', closeBundle);
1174
1126
  return result;
1175
1127
  };
@@ -1 +1 @@
1
- {"version":3,"file":"plugin.d.ts","sourceRoot":"","sources":["../src/plugin.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,MAAM,EAAiB,MAAM,MAAM,CAAC;AAQlD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAE7C,wBAAgB,MAAM,CAAC,OAAO,GAAE,aAAkB,GAAG,MAAM,CAgG1D;AAED,eAAe,MAAM,CAAC"}
1
+ {"version":3,"file":"plugin.d.ts","sourceRoot":"","sources":["../src/plugin.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,MAAM,EAAiB,MAAM,MAAM,CAAC;AAQlD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAE7C,wBAAgB,MAAM,CAAC,OAAO,GAAE,aAAkB,GAAG,MAAM,CA+E1D;AAED,eAAe,MAAM,CAAC"}
@@ -1,3 +1,3 @@
1
- import type { VisageConfig } from '../config';
1
+ import { type VisageConfig } from '../config';
2
2
  export declare function writeComposeConfig(config: VisageConfig): void;
3
3
  //# sourceMappingURL=compose.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"compose.d.ts","sourceRoot":"","sources":["../../src/render/compose.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AAE9C,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,YAAY,GAAG,IAAI,CAI7D"}
1
+ {"version":3,"file":"compose.d.ts","sourceRoot":"","sources":["../../src/render/compose.ts"],"names":[],"mappings":"AAMA,OAAO,EAAgB,KAAK,YAAY,EAAE,MAAM,WAAW,CAAC;AAE5D,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,YAAY,GAAG,IAAI,CAI7D"}
@@ -1 +1 @@
1
- {"version":3,"file":"nginx.d.ts","sourceRoot":"","sources":["../../src/render/nginx.ts"],"names":[],"mappings":"AAIA,OAAO,EAAuB,KAAK,YAAY,EAAE,MAAM,WAAW,CAAC;AA0InE,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,YAAY,GAAG,IAAI,CAQ3D"}
1
+ {"version":3,"file":"nginx.d.ts","sourceRoot":"","sources":["../../src/render/nginx.ts"],"names":[],"mappings":"AAIA,OAAO,EAAuB,KAAK,YAAY,EAAE,MAAM,WAAW,CAAC;AA2InE,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,YAAY,GAAG,IAAI,CAQ3D"}
@@ -1 +1 @@
1
- {"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../src/server.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,eAAe,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AACjE,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAKvC,OAAO,EAAiC,KAAK,YAAY,EAAE,MAAM,UAAU,CAAC;AAa5E,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAE7C,MAAM,MAAM,gBAAgB,GAAG,CAC7B,OAAO,EAAE,eAAe,EACxB,QAAQ,EAAE,cAAc,EACxB,IAAI,EAAE,MAAM,IAAI,KACb,IAAI,CAAC;AAEV,MAAM,MAAM,oBAAoB,GAAG,CACjC,OAAO,EAAE,eAAe,EACxB,MAAM,EAAE,MAAM,KACX,IAAI,CAAC;AAEV;;GAEG;AACH,MAAM,MAAM,YAAY,GAAG;IAC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MAAM,EAAE,YAAY,GACnB,OAAO,CAAC,MAAM,IAAI,CAAC,CAiBrB"}
package/dist/types.d.ts CHANGED
@@ -204,6 +204,14 @@ export type VisageExternalIdpOptions = {
204
204
  * endpoints.
205
205
  */
206
206
  readonly jwks?: string;
207
+ /**
208
+ * JWT signing algorithms allowed by OAuth2 Proxy when verifying OIDC tokens.
209
+ * Rendered as OAuth2 Proxy `oidc_enabled_signing_algs`.
210
+ *
211
+ * @defaultValue OAuth2 Proxy uses discovered provider algorithms, or `RS256`
212
+ * when none are discovered or specified.
213
+ */
214
+ readonly algs?: readonly string[];
207
215
  /**
208
216
  * OIDC end-session endpoint URL. When configured, Visage routes OAuth2 Proxy
209
217
  * sign-out redirects through this endpoint so the provider session can be
@@ -258,10 +266,20 @@ export type VisageService = {
258
266
  * Optional command override rendered into the Compose service.
259
267
  */
260
268
  readonly command?: readonly string[];
269
+ /**
270
+ * Environment variables rendered into the Compose service.
271
+ */
272
+ readonly environment?: {
273
+ readonly [name: string]: string;
274
+ };
261
275
  /**
262
276
  * Compose service dependencies that should start before this service.
263
277
  */
264
278
  readonly depends_on?: readonly string[];
279
+ /**
280
+ * Docker network mode rendered into the Compose service.
281
+ */
282
+ readonly network_mode?: string;
265
283
  /**
266
284
  * Additional host-to-IP mappings rendered into the Compose service.
267
285
  */
@@ -271,6 +289,10 @@ export type VisageService = {
271
289
  * @defaultValue `'on-failure'`
272
290
  */
273
291
  readonly restart?: 'always' | 'no' | 'on-failure' | 'unless-stopped';
292
+ /**
293
+ * Volume mounts rendered into the Compose service.
294
+ */
295
+ readonly volumes?: readonly string[];
274
296
  /**
275
297
  * Optional upstream override for this service. Omit this to create a default
276
298
  * upstream from the service name.
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,MAAM,aAAa,GAAG;IAC1B;;;;OAIG;IACH,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,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C,QAAQ,CAAC,EAAE,OAAO,CAAC;QAC5B;;;;;;;;;WASG;QACH,QAAQ,CAAC,OAAO,CAAC,EAAE,OAAO,GAAG,IAAI,GAAG,QAAQ,CAAC;KAC9C,CAAC;IACF;;;;;;;OAOG;IACH,QAAQ,CAAC,IAAI,CAAC,EAAE,KAAK,GAAG,KAAK,GAAG,KAAK,CAAC;IACtC;;;;;;OAMG;IACH,QAAQ,CAAC,OAAO,CAAC,EAAE;QAAE,QAAQ,EAAE,GAAG,EAAE,MAAM,GAAG,MAAM,CAAA;KAAE,CAAC;IACtD;;;;OAIG;IACH,QAAQ,CAAC,UAAU,CAAC,EAAE;QACpB,QAAQ,EAAE,IAAI,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,MAAM,EAAE,CAAC;KACrD,CAAC;CACH,CAAC"}
@@ -2,6 +2,8 @@ services:
2
2
  dex:
3
3
  image: ghcr.io/dexidp/dex:v2.45.1
4
4
  nginx:
5
- image: nginx:1.31.1-alpine
5
+ image: nginx:1.31.2-alpine
6
6
  oauth2_proxy:
7
7
  image: quay.io/oauth2-proxy/oauth2-proxy:v7.15.3
8
+ socat:
9
+ image: alpine/socat:1.8.1.3
package/package.json CHANGED
@@ -1,13 +1,14 @@
1
1
  {
2
2
  "name": "@blakearoberts/visage",
3
- "version": "0.0.4-rc.9",
3
+ "version": "0.0.5-rc.0",
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",
7
7
  "license": "MIT",
8
8
  "repository": {
9
9
  "type": "git",
10
- "url": "https://github.com/blakearoberts/visage.git"
10
+ "url": "https://github.com/blakearoberts/visage.git",
11
+ "directory": "packages/visage"
11
12
  },
12
13
  "bugs": {
13
14
  "url": "https://github.com/blakearoberts/visage/issues"
@@ -44,18 +45,9 @@
44
45
  "registry": "https://registry.npmjs.org"
45
46
  },
46
47
  "scripts": {
47
- "build": "npm run clean && rollup -c",
48
- "clean": "node -e \"require('node:fs').rmSync('dist', { recursive: true, force: true })\"",
49
- "example": "npm run example:simple",
50
- "example:simple": "cd examples/simple && npm run dev",
51
- "format": "prettier --write .",
52
- "format:check": "prettier --check .",
53
- "pretest:e2e": "npm run test:e2e:setup",
54
- "test": "tsx --test test/unit/*.test.ts",
55
- "test:all": "npm run typecheck && npm test && npm run test:e2e",
56
- "test:e2e": "playwright test test/e2e",
57
- "test:e2e:setup": "npm run build && npm run test:e2e:setup:examples && playwright install chromium",
58
- "test:e2e:setup:examples": "npm --prefix examples/simple install --no-audit --no-fund && npm --prefix examples/ssr install --no-audit --no-fund && npm --prefix examples/external-idp install --no-audit --no-fund",
48
+ "build": "rollup -c",
49
+ "check": "npm run typecheck",
50
+ "test": "tsx --test test/*.test.ts",
59
51
  "typecheck": "tsc --noEmit"
60
52
  },
61
53
  "dependencies": {
@@ -67,11 +59,10 @@
67
59
  "vite": "^8.0.0"
68
60
  },
69
61
  "devDependencies": {
70
- "@playwright/test": "^1.60.0",
62
+ "@playwright/test": "^1.61.0",
71
63
  "@rollup/plugin-typescript": "^12.3.0",
72
- "@types/node": "^25.8.0",
73
- "prettier": "^3.8.3",
74
- "rollup": "^4.60.4",
64
+ "@types/node": "^26.0.0",
65
+ "rollup": "^4.62.1",
75
66
  "tslib": "^2.8.1",
76
67
  "tsx": "^4.22.3",
77
68
  "typescript": "^6.0.3",
package/dist/network.d.ts DELETED
@@ -1,3 +0,0 @@
1
- import type { VisageConfig } from './config';
2
- export declare function ensureNginxNetwork(config: VisageConfig): VisageConfig;
3
- //# sourceMappingURL=network.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"network.d.ts","sourceRoot":"","sources":["../src/network.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAE7C,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,YAAY,GAAG,YAAY,CA2BrE"}