@blakearoberts/visage 0.0.1-rc.8 → 0.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.
- package/README.md +98 -29
- package/dist/certs.d.ts +2 -6
- package/dist/certs.d.ts.map +1 -1
- package/dist/compose.d.ts +2 -1
- package/dist/compose.d.ts.map +1 -1
- package/dist/config.d.ts +50 -22
- package/dist/config.d.ts.map +1 -1
- package/dist/hosts.d.ts +2 -1
- package/dist/hosts.d.ts.map +1 -1
- package/dist/index.d.ts +2 -4
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +857 -462
- package/dist/middleware.d.ts +4 -0
- package/dist/middleware.d.ts.map +1 -0
- package/dist/network.d.ts +3 -0
- package/dist/network.d.ts.map +1 -0
- package/dist/plugin.d.ts +5 -0
- package/dist/plugin.d.ts.map +1 -0
- package/dist/render/index.d.ts +4 -2
- package/dist/render/index.d.ts.map +1 -1
- package/dist/render/nginx.d.ts.map +1 -1
- package/dist/render/oauth2-proxy.d.ts.map +1 -1
- package/dist/server.d.ts +31 -0
- package/dist/server.d.ts.map +1 -0
- package/dist/types.d.ts +61 -20
- package/dist/types.d.ts.map +1 -1
- package/docker-compose.images.yml +7 -0
- package/package.json +22 -16
package/README.md
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
# Visage
|
|
2
2
|
|
|
3
|
-
Visage (`/vit·ɛdʒ/`) is a Vite plugin for local development with HMR and OIDC
|
|
3
|
+
Visage (`/vit·ɛdʒ/`) is a Vite plugin for local development with HMR and OIDC
|
|
4
|
+
session cookie lifecycle semantics.
|
|
4
5
|
|
|
5
6
|
## Getting Started
|
|
6
7
|
|
|
@@ -21,17 +22,38 @@ export default defineConfig({
|
|
|
21
22
|
});
|
|
22
23
|
```
|
|
23
24
|
|
|
24
|
-
|
|
25
|
+
Start Vite normally:
|
|
25
26
|
|
|
26
27
|
```console
|
|
27
28
|
vite
|
|
28
29
|
```
|
|
29
30
|
|
|
31
|
+
By default, you can reach the app at `https://localhost:9001`. You will be
|
|
32
|
+
redirected to Dex to sign in. The default username and password is
|
|
33
|
+
`user@example.com` and `pass`.
|
|
34
|
+
|
|
35
|
+
## Why Visage
|
|
36
|
+
|
|
37
|
+
Visage is a local development harness for web apps that run behind an
|
|
38
|
+
auth-protected edge, where browser sessions are represented by secure cookies
|
|
39
|
+
backed by OIDC tokens.
|
|
40
|
+
|
|
41
|
+
Visage narrows the gap between local development, automated tests, and
|
|
42
|
+
production by bringing production-like session lifecycle semantics to local Vite
|
|
43
|
+
development without giving up HMR. That makes it practical to iterate on SSR
|
|
44
|
+
identity injection, session timeout recovery, lock screens, and authenticated
|
|
45
|
+
API calls.
|
|
46
|
+
|
|
47
|
+
Visage can also use a hosted IdP, so local frontend code can call hosted backend
|
|
48
|
+
APIs with real credentials. That avoids frontend-only auth mocks or backend-only
|
|
49
|
+
local bypasses: code can be written for production and still work locally.
|
|
50
|
+
|
|
30
51
|
## Configuration
|
|
31
52
|
|
|
32
53
|
Visage is configured through `visage(options?)` in `vite.config.ts`.
|
|
33
54
|
|
|
34
|
-
The top-level `host` and `port` configure the local Visage origin that the
|
|
55
|
+
The top-level `host` and `port` configure the local Visage origin that the
|
|
56
|
+
browser visits:
|
|
35
57
|
|
|
36
58
|
```ts
|
|
37
59
|
visage({ host: 'localhost', port: 9001 });
|
|
@@ -62,19 +84,53 @@ visage({
|
|
|
62
84
|
});
|
|
63
85
|
```
|
|
64
86
|
|
|
65
|
-
|
|
87
|
+
Authenticated upstream locations do not forward bearer tokens by default. Set
|
|
88
|
+
`auth.forward` to `true` to forward the default bearer token for the upstream
|
|
89
|
+
kind: external upstreams receive the OAuth access token, while local service
|
|
90
|
+
upstreams receive the OIDC ID token.
|
|
91
|
+
|
|
92
|
+
Hosted backend APIs that validate bearer auth should generally receive the
|
|
93
|
+
access token, provided the token is issued for that API's issuer, audience, and
|
|
94
|
+
scopes. Use `'access'` or `'id'` when you need to force a specific token kind.
|
|
66
95
|
|
|
67
|
-
|
|
96
|
+
```ts
|
|
97
|
+
visage({
|
|
98
|
+
upstreams: {
|
|
99
|
+
api: {
|
|
100
|
+
locations: {
|
|
101
|
+
'/api/': { auth: { forward: true } },
|
|
102
|
+
},
|
|
103
|
+
},
|
|
104
|
+
},
|
|
105
|
+
});
|
|
106
|
+
```
|
|
68
107
|
|
|
69
|
-
|
|
108
|
+
OAuth2 Proxy identity values can also be mapped explicitly through headers such
|
|
109
|
+
as `$auth_user`, `$auth_email`, `$auth_groups`, and `$auth_preferred_username`.
|
|
70
110
|
|
|
71
|
-
|
|
111
|
+
Authenticated locations also get Fetch Metadata CSRF checks by default. The
|
|
112
|
+
built-in Vite root location uses `csrf: 'app'`, which allows same-origin
|
|
113
|
+
requests and top-level `GET` document navigations. Other authenticated upstream
|
|
114
|
+
locations use `csrf: 'api'`, which blocks same-site and cross-site browser
|
|
115
|
+
requests when modern Fetch Metadata headers are present. Set `csrf: 'app'` for
|
|
116
|
+
an upstream that serves browser pages, or `csrf: false` when the upstream
|
|
117
|
+
intentionally handles cross-site browser requests itself.
|
|
72
118
|
|
|
73
|
-
|
|
74
|
-
|
|
119
|
+
### External IdPs
|
|
120
|
+
|
|
121
|
+
External OIDC providers use issuer discovery by default:
|
|
122
|
+
|
|
123
|
+
```ts
|
|
124
|
+
visage({
|
|
125
|
+
idp: { issuer: 'https://idp.example.test/oauth2/default' },
|
|
126
|
+
});
|
|
75
127
|
```
|
|
76
128
|
|
|
77
|
-
|
|
129
|
+
Configure `authorization`, `token`, or `jwks` only when the provider endpoints
|
|
130
|
+
must be rendered explicitly instead of discovered from the issuer. Configure
|
|
131
|
+
`end_session_endpoint` when the provider supports OIDC end-session redirects.
|
|
132
|
+
|
|
133
|
+
See [`VisageOptions`](src/types.ts) for the full option surface.
|
|
78
134
|
|
|
79
135
|
## System Block Diagram
|
|
80
136
|
|
|
@@ -96,40 +152,53 @@ flowchart LR
|
|
|
96
152
|
|
|
97
153
|
## Required Tools
|
|
98
154
|
|
|
99
|
-
- [Docker](https://docs.docker.com/get-started/get-docker/) with Compose v2
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
### mkcert
|
|
155
|
+
- [Docker](https://docs.docker.com/get-started/get-docker/) with Compose v2
|
|
156
|
+
support through `docker compose`.
|
|
157
|
+
- [`mkcert`](https://github.com/FiloSottile/mkcert#installation) installed on
|
|
158
|
+
`PATH`, or configured with `VISAGE_MKCERT=/path/to/mkcert`.
|
|
104
159
|
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
### Docker Images
|
|
160
|
+
## Managed Docker Images
|
|
108
161
|
|
|
109
162
|
Visage pulls these as needed based on configuration:
|
|
110
163
|
|
|
111
|
-
| Service | Image
|
|
112
|
-
| ------------------------------------------------------------ |
|
|
113
|
-
| [NGINX](https://nginx.org/) | [`nginx
|
|
114
|
-
| [OAuth2 Proxy](https://oauth2-proxy.github.io/oauth2-proxy/) | [`quay.io/oauth2-proxy/oauth2-proxy
|
|
115
|
-
| [Dex](https://dexidp.io/) | [`ghcr.io/dexidp/dex
|
|
164
|
+
| Service | Image | Pin |
|
|
165
|
+
| ------------------------------------------------------------ | ------------------------------------------------------------------------------------------- | ------------------------------------- |
|
|
166
|
+
| [NGINX](https://nginx.org/) | [`nginx`](https://hub.docker.com/_/nginx) | [manifest](docker-compose.images.yml) |
|
|
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
|
+
| [Dex](https://dexidp.io/) | [`ghcr.io/dexidp/dex`](https://github.com/dexidp/dex/pkgs/container/dex) | [manifest](docker-compose.images.yml) |
|
|
116
169
|
|
|
117
170
|
## Security Notes
|
|
118
171
|
|
|
119
|
-
Visage is local-development tooling. It starts local auth infrastructure,
|
|
172
|
+
Visage is local-development tooling. It starts local auth infrastructure,
|
|
173
|
+
terminates local HTTPS, and forwards authenticated identity or token material to
|
|
174
|
+
configured upstreams.
|
|
175
|
+
|
|
176
|
+
Please report suspected vulnerabilities through GitHub private vulnerability
|
|
177
|
+
reporting as described in [Security Policy](SECURITY.md).
|
|
178
|
+
|
|
179
|
+
Do not treat the managed Dex and OAuth2 Proxy defaults as production auth
|
|
180
|
+
infrastructure.
|
|
120
181
|
|
|
121
|
-
|
|
182
|
+
Visage's CSRF policy is an edge request-isolation guard for cookie-backed
|
|
183
|
+
locations. It is not a replacement for application-owned CSRF tokens where an
|
|
184
|
+
application accepts form posts or other browser-submitted mutations. CSP,
|
|
185
|
+
`frame-ancestors`, and other click-jacking controls remain application policy.
|
|
122
186
|
|
|
123
187
|
## Troubleshooting
|
|
124
188
|
|
|
125
|
-
- If startup fails immediately, confirm Docker is running and `docker compose`
|
|
189
|
+
- If startup fails immediately, confirm Docker is running and `docker compose`
|
|
190
|
+
works.
|
|
126
191
|
- If NGINX cannot start, check whether the configured `port` is already in use.
|
|
127
|
-
- If the hostname cannot be resolved, Visage may need permission to update
|
|
128
|
-
|
|
192
|
+
- If the hostname cannot be resolved, Visage may need permission to update
|
|
193
|
+
`/etc/hosts`.
|
|
194
|
+
- If the browser rejects the certificate, allow the local certificate authority
|
|
195
|
+
prompt from `mkcert`; CI test runners should be configured to ignore local
|
|
196
|
+
HTTPS errors.
|
|
129
197
|
|
|
130
198
|
## TO-DO
|
|
131
199
|
|
|
132
|
-
- [ ]
|
|
200
|
+
- [ ] Harden the default security posture by addressing the
|
|
201
|
+
[security hardening backlog](docs/security-hardening.md).
|
|
133
202
|
- [ ] Support configuring [Dex connectors](https://dexidp.io/docs/connectors/).
|
|
134
203
|
- [ ] Support configuring Dex on a distinct subdomain, such as `auth.localhost`.
|
|
135
204
|
- [ ] Support optional [HTTP mode without local TLS](docs/tls-http-mode.md).
|
package/dist/certs.d.ts
CHANGED
|
@@ -1,7 +1,3 @@
|
|
|
1
|
-
type
|
|
2
|
-
|
|
3
|
-
hostname: string;
|
|
4
|
-
};
|
|
5
|
-
export declare function ensureCerts({ certs, hostname }: Options): Promise<void>;
|
|
6
|
-
export {};
|
|
1
|
+
import type { VisageConfig } from './config';
|
|
2
|
+
export declare function ensureCerts(config: VisageConfig): Promise<void>;
|
|
7
3
|
//# sourceMappingURL=certs.d.ts.map
|
package/dist/certs.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"certs.d.ts","sourceRoot":"","sources":["../src/certs.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"certs.d.ts","sourceRoot":"","sources":["../src/certs.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAI7C,wBAAsB,WAAW,CAAC,MAAM,EAAE,YAAY,GAAG,OAAO,CAAC,IAAI,CAAC,CAwCrE"}
|
package/dist/compose.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
+
import type { VisageConfig } from './config';
|
|
1
2
|
type StopCompose = () => void;
|
|
2
|
-
export declare function startCompose(
|
|
3
|
+
export declare function startCompose(config: VisageConfig): StopCompose;
|
|
3
4
|
export {};
|
|
4
5
|
//# sourceMappingURL=compose.d.ts.map
|
package/dist/compose.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"compose.d.ts","sourceRoot":"","sources":["../src/compose.ts"],"names":[],"mappings":"
|
|
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;AAI9B,wBAAgB,YAAY,CAAC,MAAM,EAAE,YAAY,GAAG,WAAW,CA0C9D"}
|
package/dist/config.d.ts
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
import type { VisageDexExpiry, VisageDexOptions, VisageDexUser, VisageExternalIdpOptions, VisageOptions, VisageProxyPolicy, VisageService, VisageUpstream } from './types';
|
|
1
|
+
import type { VisageDexExpiry, VisageDexOptions, VisageDexUser, VisageExternalIdpOptions, VisageOptions, VisageService } from './types';
|
|
3
2
|
type Volume = readonly [from: string, to: string];
|
|
4
3
|
type ResolvedCookiePolicy = {
|
|
5
4
|
readonly cookie_name: string;
|
|
@@ -15,8 +14,25 @@ type ResolvedOAuth2Client = {
|
|
|
15
14
|
readonly id: string;
|
|
16
15
|
readonly secret?: string;
|
|
17
16
|
readonly scopes: readonly string[];
|
|
17
|
+
readonly emailDomains: readonly string[];
|
|
18
18
|
readonly public: boolean;
|
|
19
19
|
};
|
|
20
|
+
type ResolvedProxyPolicy = {
|
|
21
|
+
readonly auth: {
|
|
22
|
+
readonly enabled: boolean;
|
|
23
|
+
readonly forward: false | 'id' | 'access';
|
|
24
|
+
readonly redirect: boolean;
|
|
25
|
+
};
|
|
26
|
+
readonly csrf: false | 'app' | 'api';
|
|
27
|
+
readonly headers: Readonly<Record<string, string>>;
|
|
28
|
+
readonly directives: Readonly<Record<string, readonly string[]>>;
|
|
29
|
+
};
|
|
30
|
+
type ResolvedUpstream = {
|
|
31
|
+
readonly scheme: 'http' | 'https';
|
|
32
|
+
readonly host: string;
|
|
33
|
+
readonly port: number;
|
|
34
|
+
readonly locations: Readonly<Record<string, ResolvedProxyPolicy>>;
|
|
35
|
+
};
|
|
20
36
|
type ResolvedVisageOptions = {
|
|
21
37
|
readonly host: string;
|
|
22
38
|
readonly port: number;
|
|
@@ -24,38 +40,42 @@ type ResolvedVisageOptions = {
|
|
|
24
40
|
readonly idp: ResolvedIdpOption;
|
|
25
41
|
readonly oauth2: ResolvedOAuth2Client;
|
|
26
42
|
readonly services: Readonly<Record<string, VisageService>>;
|
|
27
|
-
readonly upstreams: Record<string,
|
|
43
|
+
readonly upstreams: Record<string, ResolvedUpstream>;
|
|
28
44
|
};
|
|
29
|
-
type
|
|
30
|
-
readonly upstream: string;
|
|
45
|
+
type OIDCEndpointConfig = {
|
|
31
46
|
readonly issuer: string;
|
|
47
|
+
readonly authorization?: string;
|
|
48
|
+
readonly token?: string;
|
|
49
|
+
readonly jwks?: string;
|
|
50
|
+
readonly end_session_endpoint?: string;
|
|
51
|
+
};
|
|
52
|
+
type ManualOIDCEndpointConfig = OIDCEndpointConfig & {
|
|
32
53
|
readonly authorization: string;
|
|
33
54
|
readonly token: string;
|
|
34
55
|
readonly jwks: string;
|
|
35
56
|
};
|
|
36
|
-
type ResolvedDexIdpConfig =
|
|
57
|
+
type ResolvedDexIdpConfig = {
|
|
37
58
|
readonly dex: {
|
|
38
59
|
readonly expiry?: VisageDexExpiry;
|
|
39
60
|
readonly users: readonly VisageDexUser[];
|
|
40
61
|
};
|
|
62
|
+
readonly oidc: ManualOIDCEndpointConfig;
|
|
63
|
+
readonly upstream: {
|
|
64
|
+
readonly dex: ResolvedUpstream;
|
|
65
|
+
};
|
|
41
66
|
};
|
|
42
|
-
type ResolvedExternalIdpConfig =
|
|
43
|
-
readonly
|
|
67
|
+
type ResolvedExternalIdpConfig = {
|
|
68
|
+
readonly oidc: OIDCEndpointConfig;
|
|
69
|
+
readonly upstream: {
|
|
70
|
+
readonly idp: ResolvedUpstream;
|
|
71
|
+
};
|
|
44
72
|
};
|
|
45
73
|
type ResolvedIdpConfig = ResolvedDexIdpConfig | ResolvedExternalIdpConfig;
|
|
46
|
-
type ResolvedService = Omit<VisageService, 'upstream'
|
|
47
|
-
|
|
48
|
-
readonly scheme: 'http' | 'https';
|
|
49
|
-
readonly host: string;
|
|
50
|
-
readonly port: number;
|
|
51
|
-
readonly locations: Readonly<Record<string, VisageProxyPolicy>>;
|
|
74
|
+
type ResolvedService = Omit<VisageService, 'upstream'> & {
|
|
75
|
+
readonly restart: NonNullable<VisageService['restart']>;
|
|
52
76
|
};
|
|
53
|
-
type
|
|
54
|
-
readonly
|
|
55
|
-
readonly headers: VisageProxyPolicy['headers'];
|
|
56
|
-
};
|
|
57
|
-
type ResolvedConfigUpstream = Omit<ResolvedUpstream, 'locations'> & {
|
|
58
|
-
readonly locations: Readonly<Record<string, ResolvedProxyPolicy>>;
|
|
77
|
+
type ResolvedConfigUpstream = ResolvedUpstream & {
|
|
78
|
+
readonly external: boolean;
|
|
59
79
|
};
|
|
60
80
|
export type VisageConfig = {
|
|
61
81
|
readonly host: string;
|
|
@@ -70,12 +90,20 @@ export type VisageConfig = {
|
|
|
70
90
|
readonly dex: Volume;
|
|
71
91
|
readonly nginx: Volume;
|
|
72
92
|
readonly oauth2Proxy: Volume;
|
|
73
|
-
|
|
93
|
+
};
|
|
94
|
+
readonly secrets: {
|
|
95
|
+
readonly cookieSecret: string;
|
|
96
|
+
readonly clientSecret: string;
|
|
97
|
+
};
|
|
98
|
+
readonly network: {
|
|
99
|
+
readonly name: string;
|
|
100
|
+
readonly trustedProxyIps: readonly string[];
|
|
74
101
|
};
|
|
75
102
|
readonly services: Readonly<Record<string, ResolvedService>>;
|
|
76
103
|
readonly upstreams: Readonly<Record<string, ResolvedConfigUpstream>>;
|
|
77
104
|
};
|
|
105
|
+
export declare const VisageEdgeKeyHeader = "X-Visage-Edge-Key";
|
|
78
106
|
export declare function resolveOptions(options: VisageOptions): ResolvedVisageOptions;
|
|
79
|
-
export declare function resolveConfig(options: ResolvedVisageOptions,
|
|
107
|
+
export declare function resolveConfig(options: ResolvedVisageOptions, cache: string, edgeKey?: string): VisageConfig;
|
|
80
108
|
export {};
|
|
81
109
|
//# sourceMappingURL=config.d.ts.map
|
package/dist/config.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EACV,eAAe,EACf,gBAAgB,EAChB,aAAa,EACb,wBAAwB,EACxB,aAAa,EAEb,aAAa,EAEd,MAAM,SAA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,EAAE,MAAM,CAAC;QACrB,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;QACvB,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;KAC9B,CAAC;IACF,QAAQ,CAAC,OAAO,EAAE;QAChB,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAC;QAC9B,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAC;KAC/B,CAAC;IACF,QAAQ,CAAC,OAAO,EAAE;QAChB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;QACtB,QAAQ,CAAC,eAAe,EAAE,SAAS,MAAM,EAAE,CAAC;KAC7C,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;AAmGvD,wBAAgB,cAAc,CAAC,OAAO,EAAE,aAAa,GAAG,qBAAqB,CAyD5E;AAsLD,wBAAgB,aAAa,CAC3B,OAAO,EAAE,qBAAqB,EAC9B,KAAK,EAAE,MAAM,EACb,OAAO,CAAC,EAAE,MAAM,GACf,YAAY,CAsFd"}
|
package/dist/hosts.d.ts
CHANGED
package/dist/hosts.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hosts.d.ts","sourceRoot":"","sources":["../src/hosts.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"hosts.d.ts","sourceRoot":"","sources":["../src/hosts.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAI7C,wBAAgB,eAAe,CAAC,EAAE,IAAI,EAAE,EAAE,YAAY,GAAG,IAAI,CAyD5D"}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,4 @@
|
|
|
1
|
-
import type { Plugin } from 'vite';
|
|
2
|
-
import type { VisageOptions } from './types';
|
|
3
1
|
export type { VisageCookiePolicy, VisageDexExpiry, VisageDexOptions, VisageDexUser, VisageExternalIdpOptions, VisageOAuth2Client, VisageOptions, VisageProxyPolicy, VisageService, VisageUpstream, } from './types';
|
|
4
|
-
export
|
|
5
|
-
export
|
|
2
|
+
export { default, visage } from './plugin';
|
|
3
|
+
export { createVisageServer, type VisageServer } from './server';
|
|
6
4
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,YAAY,EACV,kBAAkB,EAClB,eAAe,EACf,gBAAgB,EAChB,aAAa,EACb,wBAAwB,EACxB,kBAAkB,EAClB,aAAa,EACb,iBAAiB,EACjB,aAAa,EACb,cAAc,GACf,MAAM,SAAS,CAAC;AAEjB,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAC3C,OAAO,EAAE,kBAAkB,EAAE,KAAK,YAAY,EAAE,MAAM,UAAU,CAAC"}
|