@blakearoberts/visage 0.0.1-rc.1 → 0.0.1-rc.4

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.
@@ -1 +1 @@
1
- {"version":3,"file":"certs.d.ts","sourceRoot":"","sources":["../src/certs.ts"],"names":[],"mappings":"AAMA,KAAK,OAAO,GAAG;IACb,GAAG,EAAE,MAAM,CAAC;IACZ,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,MAAM,CAAC;CAClB,CAAC;AAEF,wBAAsB,WAAW,CAAC,EAChC,GAAG,EACH,KAAK,EACL,QAAQ,GACT,EAAE,OAAO,GAAG,OAAO,CAAC,IAAI,CAAC,CAiCzB"}
1
+ {"version":3,"file":"certs.d.ts","sourceRoot":"","sources":["../src/certs.ts"],"names":[],"mappings":"AAOA,KAAK,OAAO,GAAG;IACb,GAAG,EAAE,MAAM,CAAC;IACZ,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,MAAM,CAAC;CAClB,CAAC;AAEF,wBAAsB,WAAW,CAAC,EAChC,GAAG,EACH,KAAK,EACL,QAAQ,GACT,EAAE,OAAO,GAAG,OAAO,CAAC,IAAI,CAAC,CAsCzB"}
package/dist/config.d.ts CHANGED
@@ -43,6 +43,9 @@ type ResolvedOAuth2Client = {
43
43
  readonly scopes: readonly string[];
44
44
  readonly public: boolean;
45
45
  };
46
+ type ResolvedUpstream = VisageUpstream & {
47
+ readonly scheme: NonNullable<VisageUpstream['scheme']>;
48
+ };
46
49
  type ResolvedVisageOptions = {
47
50
  readonly host: string;
48
51
  readonly port: number;
@@ -50,7 +53,7 @@ type ResolvedVisageOptions = {
50
53
  readonly idp: ResolvedIdpOption;
51
54
  readonly oauth2: ResolvedOAuth2Client;
52
55
  readonly services?: Record<string, VisageService>;
53
- readonly upstreams?: Record<string, VisageUpstream>;
56
+ readonly upstreams?: Record<string, ResolvedUpstream>;
54
57
  };
55
58
  export type VisageConfig = {
56
59
  readonly host: string;
@@ -68,9 +71,9 @@ export type VisageConfig = {
68
71
  readonly oauth2ProxyClientSecret: Volume;
69
72
  };
70
73
  readonly services: Readonly<Record<string, VisageService>>;
71
- readonly upstreams: Readonly<Record<string, VisageUpstream>>;
74
+ readonly upstreams: Readonly<Record<string, ResolvedUpstream>>;
72
75
  };
73
- export declare function resolveOptions(options: VisageOptions): ResolvedVisageOptions;
76
+ export declare function resolveOptions({ host, port, cookie, idp, oauth2, services, upstreams, }: VisageOptions): ResolvedVisageOptions;
74
77
  export declare function resolveConfig(options: ResolvedVisageOptions, config: ResolvedConfig, vitePort: number): VisageConfig;
75
78
  export {};
76
79
  //# sourceMappingURL=config.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,MAAM,CAAC;AAE3C,OAAO,KAAK,EACV,eAAe,EAEf,aAAa,EAEb,aAAa,EAEb,aAAa,EACb,cAAc,EACf,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,GAAG;IACvB,QAAQ,CAAC,MAAM,CAAC,EAAE,eAAe,CAAC;IAClC,QAAQ,CAAC,KAAK,EAAE,SAAS,QAAQ,CAAC,aAAa,CAAC,EAAE,CAAC;CACpD,CAAC;AAEF,KAAK,iBAAiB,GAAG;IACvB,QAAQ,C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, mkdirSync, createWriteStream, chmodSync, readFileSync, appendFileSync, writeFileSync } from 'node:fs';
4
+ import { homedir } from 'node:os';
4
5
  import { Readable } from 'node:stream';
5
6
  import { pipeline } from 'node:stream/promises';
6
7
  import { stringify } from 'yaml';
@@ -63,10 +64,11 @@ async function ensureCerts({ bin, certs, hostname, }) {
63
64
  const mkcert = await ensureMkCert(bin);
64
65
  const env = {
65
66
  ...process.env,
66
- CAROOT: join(bin, 'ca'),
67
+ CAROOT: join(process.env.XDG_CACHE_HOME || join(homedir(), '.cache'), 'visage/ca'),
67
68
  TRUST_STORES: process.env.TRUST_STORES ?? 'system',
68
69
  };
69
- // install CA
70
+ mkdirSync(env.CAROOT, { recursive: true });
71
+ // mkcert -install is idempotent; CA files alone do not prove trust-store state.
70
72
  {
71
73
  const result = spawnSync(mkcert, ['-install'], {
72
74
  env,
@@ -268,7 +270,11 @@ http {
268
270
  <%_ if (location.auth?.enabled && location.auth.forward) { %>
269
271
  proxy_set_header Authorization "Bearer $access_token";
270
272
  <%_ } %>
271
- proxy_pass http://<%~ name %>;
273
+ <%_ if (upstream.scheme === 'https') { %>
274
+ proxy_ssl_server_name on;
275
+ proxy_ssl_name <%~ upstream.host %>;
276
+ <%_ } %>
277
+ proxy_pass <%~ upstream.scheme %>://<%~ name %>;
272
278
  }
273
279
  <%_ } %>
274
280
 
@@ -389,11 +395,13 @@ const BaseServices = {
389
395
  };
390
396
  const BaseDexUpstream = {
391
397
  host: 'dex',
398
+ scheme: 'http',
392
399
  port: 5556,
393
400
  locations: { '/dex/': { auth: { enabled: false } } },
394
401
  };
395
402
  const BaseOauth2ProxyUpstream = {
396
403
  host: 'oauth2_proxy',
404
+ scheme: 'http',
397
405
  port: 4180,
398
406
  locations: {
399
407
  '/oauth2/': {
@@ -411,6 +419,7 @@ const BaseOauth2ProxyUpstream = {
411
419
  };
412
420
  const BaseViteUpstream = {
413
421
  host: 'host.docker.internal',
422
+ scheme: 'http',
414
423
  locations: {
415
424
  '/': {
416
425
  auth: { forward: false, redirect: true },
@@ -440,7 +449,7 @@ const DefaultIdpConfig = {
440
449
  const DefaultOAuth2Client = {
441
450
  id: 'visage',
442
451
  secret: 'visage-secret',
443
- scopes: ['openid', 'email', 'profile']};
452
+ scopes: ['openid', 'email', 'profile', 'offline_access']};
444
453
  const DefaultProxyPolicy = {
445
454
  auth: { enabled: true, forward: true, redirect: false },
446
455
  headers: {
@@ -451,15 +460,12 @@ const DefaultProxyPolicy = {
451
460
  'X-Forwarded-Proto': '$scheme',
452
461
  },
453
462
  };
454
- function resolveOptions(options) {
455
- const cookie = options.cookie ?? {};
463
+ function resolveOptions({ host = 'local.vite.app', port = 9001, cookie = {}, idp, oauth2 = {}, services, upstreams, }) {
456
464
  const cookieName = cookie.name ?? 'session';
457
- const oauth2 = options.oauth2 ?? {};
458
465
  const publicClient = oauth2.clientSecret === null;
459
466
  return {
460
- ...options,
461
- host: options.host ?? 'local.vite.app',
462
- port: options.port ?? 9001,
467
+ host,
468
+ port,
463
469
  cookie: {
464
470
  ...DefaultCookiePolicy,
465
471
  cookie_name: cookie.domains === undefined
@@ -476,7 +482,7 @@ function resolveOptions(options) {
476
482
  : { cookie_domains: cookie.domains }),
477
483
  ...(cookie.path === undefined ? {} : { cookie_path: cookie.path }),
478
484
  },
479
- idp: resolveIdpOption(options.idp),
485
+ idp: resolveIdpOption(idp),
480
486
  oauth2: {
481
487
  id: oauth2.clientId ?? DefaultOAuth2Client.id,
482
488
  ...(publicClient
@@ -485,6 +491,15 @@ function resolveOptions(options) {
485
491
  scopes: oauth2.scopes ?? DefaultOAuth2Client.scopes,
486
492
  public: publicClient,
487
493
  },
494
+ ...(services === undefined ? {} : { services }),
495
+ ...(upstreams === undefined
496
+ ? {}
497
+ : {
498
+ upstreams: Object.fromEntries(Object.entries(upstreams).map(([name, upstream]) => [
499
+ name,
500
+ { ...upstream, scheme: upstream.scheme ?? 'http' },
501
+ ])),
502
+ }),
488
503
  };
489
504
  }
490
505
  function resolveIdpOption(idp) {
@@ -518,9 +533,9 @@ function resolveConfig(options, config, vitePort) {
518
533
  ...(options.idp.kind === 'dex' ? { dex: BaseDexUpstream } : {}),
519
534
  ...options.upstreams,
520
535
  };
521
- const { host: idpHost, port: idpPort } = upstreams[options.idp.upstream];
536
+ const { host: idpHost, port: idpPort, scheme: idpScheme, } = upstreams[options.idp.upstream];
522
537
  const origin = `https://${options.host}:${options.port}`;
523
- const idpOrigin = `http://${idpHost}:${idpPort}`;
538
+ const idpOrigin = `${idpScheme}://${idpHost}:${idpPort}`;
524
539
  const idpBase = {
525
540
  upstream: options.idp.upstream,
526
541
  issuer: options.idp.issuer ?? `${origin}${options.idp.path}`,
@@ -1 +1 @@
1
- {"version":3,"file":"nginx.d.ts","sourceRoot":"","sources":["../../src/render/nginx.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AAmD9C,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,YAAY,GAAG,IAAI,CAI3D"}
1
+ {"version":3,"file":"nginx.d.ts","sourceRoot":"","sources":["../../src/render/nginx.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AAuD9C,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,YAAY,GAAG,IAAI,CAI3D"}
@@ -1 +1 @@
1
- {"version":3,"file":"oauth2-proxy.d.ts","sourceRoot":"","sources":["../../src/render/oauth2-proxy.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AAE9C,wBAAgB,sBAAsB,CAAC,MAAM,EAAE,YAAY,GAAG,IAAI,CAQjE"}
1
+ {"version":3,"file":"oauth2-proxy.d.ts","sourceRoot":"","sources":["../../src/render/oauth2-proxy.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AAE9C,wBAAgB,sBAAsB,CAAC,MAAM,EAAE,YAAY,GAAG,IAAI,CAWjE"}
package/dist/types.d.ts CHANGED
@@ -1,22 +1,97 @@
1
+ /**
2
+ * User-configurable options for the Visage Vite plugin.
3
+ */
1
4
  export type VisageOptions = {
5
+ /**
6
+ * Browser-facing hostname for the local Visage HTTPS origin.
7
+ *
8
+ * @defaultValue `'local.vite.app'`
9
+ */
2
10
  readonly host?: string;
11
+ /**
12
+ * Browser-facing HTTPS port for the local Visage proxy.
13
+ *
14
+ * @defaultValue `9001`
15
+ */
3
16
  readonly port?: number;
17
+ /**
18
+ * Session cookie settings normalized into OAuth2 Proxy configuration.
19
+ */
4
20
  readonly cookie?: VisageCookiePolicy;
21
+ /**
22
+ * Identity provider configuration. Omit this to use Visage's managed Dex
23
+ * provider.
24
+ */
5
25
  readonly idp?: VisageDexOptions | VisageIdpOptions;
26
+ /**
27
+ * OAuth2 client settings shared by Dex or an external IdP and OAuth2 Proxy.
28
+ */
6
29
  readonly oauth2?: VisageOAuth2Client;
30
+ /**
31
+ * Additional or replacement Docker Compose services managed with the Vite
32
+ * dev-server lifecycle.
33
+ */
7
34
  readonly services?: Record<string, VisageService>;
35
+ /**
36
+ * Upstream targets that NGINX can route to by path.
37
+ */
8
38
  readonly upstreams?: Record<string, VisageUpstream>;
9
39
  };
40
+ /**
41
+ * Cookie lifetime, scope, and naming policy for the OAuth2 Proxy session.
42
+ */
10
43
  export type VisageCookiePolicy = {
44
+ /**
45
+ * Session cookie name. Host-only cookies are automatically prefixed with
46
+ * `__HOST-` when no domains are configured, so the default rendered
47
+ * host-only cookie name is `__HOST-session`.
48
+ *
49
+ * @defaultValue `'session'`
50
+ */
11
51
  readonly name?: string;
52
+ /**
53
+ * Maximum cookie lifetime using an OAuth2 Proxy duration string.
54
+ *
55
+ * @defaultValue `'8h'`
56
+ */
12
57
  readonly expire?: string;
58
+ /**
59
+ * Interval after which OAuth2 Proxy refreshes the session using an OAuth2
60
+ * Proxy duration string.
61
+ *
62
+ * @defaultValue `'15m'`
63
+ */
13
64
  readonly refresh?: string;
65
+ /**
66
+ * Cookie domains for sharing the session across local hostnames. Leave unset
67
+ * for a host-only cookie.
68
+ */
14
69
  readonly domains?: readonly string[];
70
+ /**
71
+ * Cookie path scope.
72
+ *
73
+ * @defaultValue `'/'`
74
+ */
15
75
  readonly path?: string;
16
76
  };
77
+ /**
78
+ * Managed Dex identity provider options.
79
+ */
17
80
  export type VisageDexOptions = {
81
+ /**
82
+ * Selects the managed Dex provider. Omit this for the default managed Dex
83
+ * provider.
84
+ */
18
85
  readonly kind?: 'dex';
86
+ /**
87
+ * Token expiration and rotation settings rendered into the Dex config.
88
+ */
19
89
  readonly expiry?: VisageDexExpiry;
90
+ /**
91
+ * Static username/password users rendered into the Dex config.
92
+ *
93
+ * @defaultValue `[{ email: 'user@example.com', password: 'pass' }]`
94
+ */
20
95
  readonly users?: readonly VisageDexUser[];
21
96
  };
22
97
  /**
@@ -25,59 +100,217 @@ export type VisageDexOptions = {
25
100
  * @see {@link https://dexidp.io/docs/configuration/tokens/#expiration-and-rotation-settings}
26
101
  */
27
102
  export type VisageDexExpiry = {
103
+ /**
104
+ * Lifetime for ID tokens issued by Dex.
105
+ */
28
106
  readonly idTokens?: string;
107
+ /**
108
+ * Lifetime for in-progress authorization requests.
109
+ */
29
110
  readonly authRequests?: string;
111
+ /**
112
+ * Lifetime for in-progress device authorization requests.
113
+ */
30
114
  readonly deviceRequests?: string;
115
+ /**
116
+ * Rotation interval for Dex signing keys.
117
+ */
31
118
  readonly signingKeys?: string;
119
+ /**
120
+ * Refresh token lifetime and rotation settings.
121
+ */
32
122
  readonly refreshTokens?: {
123
+ /**
124
+ * Maximum time a refresh token may go unused before it expires.
125
+ */
33
126
  readonly validIfNotUsedFor?: string;
127
+ /**
128
+ * Absolute lifetime for refresh tokens, regardless of use.
129
+ */
34
130
  readonly absoluteLifetime?: string;
131
+ /**
132
+ * Whether Dex should skip refresh-token rotation.
133
+ */
35
134
  readonly disableRotation?: boolean;
135
+ /**
136
+ * Grace period during which a rotated refresh token may be reused.
137
+ */
36
138
  readonly reuseInterval?: string;
37
139
  };
38
140
  };
141
+ /**
142
+ * Static user rendered into the managed Dex password database.
143
+ */
39
144
  export type VisageDexUser = {
145
+ /**
146
+ * Email address used as the Dex login identifier.
147
+ */
40
148
  readonly email: string;
149
+ /**
150
+ * Plain-text development password. Visage hashes this before rendering the
151
+ * Dex config.
152
+ */
41
153
  readonly password: string;
154
+ /**
155
+ * Display username. Defaults to the portion of {@link VisageDexUser.email}
156
+ * before `@`.
157
+ */
42
158
  readonly username?: string;
159
+ /**
160
+ * Stable Dex user ID. Defaults to {@link VisageDexUser.email}.
161
+ */
43
162
  readonly userID?: string;
44
163
  };
164
+ /**
165
+ * External OpenID Connect identity provider options.
166
+ */
45
167
  export type VisageIdpOptions = {
168
+ /**
169
+ * Selects the external IdP flow.
170
+ */
46
171
  readonly kind: 'external';
172
+ /**
173
+ * Name of the configured upstream that serves the external IdP.
174
+ */
47
175
  readonly upstream: string;
176
+ /**
177
+ * Public path where the external IdP is exposed through Visage.
178
+ *
179
+ * @defaultValue `'/dex'`
180
+ */
48
181
  readonly path?: string;
182
+ /**
183
+ * OIDC issuer URL. Defaults to the Visage origin plus
184
+ * {@link VisageIdpOptions.path}.
185
+ */
49
186
  readonly issuer?: string;
187
+ /**
188
+ * Browser-facing authorization endpoint URL. Defaults to the Visage origin
189
+ * plus {@link VisageIdpOptions.path} and `/auth`.
190
+ */
50
191
  readonly authorizationEndpoint?: string;
192
+ /**
193
+ * Token endpoint URL used by OAuth2 Proxy.
194
+ *
195
+ * Defaults to the configured IdP upstream origin plus
196
+ * {@link VisageIdpOptions.path} and `/token`.
197
+ */
51
198
  readonly tokenEndpoint?: string;
199
+ /**
200
+ * JWKS endpoint URL used by OAuth2 Proxy.
201
+ *
202
+ * Defaults to the configured IdP upstream origin plus
203
+ * {@link VisageIdpOptions.path} and `/keys`.
204
+ */
52
205
  readonly jwksEndpoint?: string;
53
206
  };
207
+ /**
208
+ * OAuth2 client configuration used by OAuth2 Proxy and, for managed Dex, the
209
+ * rendered Dex static client.
210
+ */
54
211
  export type VisageOAuth2Client = {
212
+ /**
213
+ * OAuth2 client identifier.
214
+ *
215
+ * @defaultValue `'visage'`
216
+ */
55
217
  readonly clientId?: string;
56
218
  /**
57
- * Set to `null` to render a public Dex client and enable OAuth2 Proxy PKCE.
219
+ * OAuth2 client secret.
220
+ *
221
+ * Set to `null` for a public OAuth2 client. OAuth2 Proxy uses PKCE, and
222
+ * managed Dex renders a public static client.
223
+ *
224
+ * @defaultValue `'visage-secret'`
58
225
  */
59
226
  readonly clientSecret?: string | null;
227
+ /**
228
+ * OIDC scopes requested by OAuth2 Proxy.
229
+ *
230
+ * @defaultValue `['openid', 'email', 'profile', 'offline_access']`
231
+ */
60
232
  readonly scopes?: readonly string[];
61
233
  };
234
+ /**
235
+ * Subset of a Docker Compose service definition managed by Visage.
236
+ */
62
237
  export type VisageService = {
238
+ /**
239
+ * Container image reference used for the service.
240
+ */
63
241
  readonly image: string;
242
+ /**
243
+ * Optional command override rendered into the Compose service.
244
+ */
64
245
  readonly command?: readonly string[];
246
+ /**
247
+ * Compose service dependencies that should start before this service.
248
+ */
65
249
  readonly depends_on?: readonly string[];
250
+ /**
251
+ * Additional host-to-IP mappings rendered into the Compose service.
252
+ */
66
253
  readonly extra_hosts?: readonly string[];
67
254
  };
255
+ /**
256
+ * Named proxy target that NGINX routes to for one or more locations.
257
+ */
68
258
  export type VisageUpstream = {
259
+ /**
260
+ * Hostname or Compose service name NGINX should proxy to.
261
+ */
69
262
  readonly host: string;
263
+ /**
264
+ * URL scheme NGINX should use when proxying to this upstream.
265
+ *
266
+ * @defaultValue `'http'`
267
+ */
268
+ readonly scheme?: 'http' | 'https';
269
+ /**
270
+ * Port NGINX should proxy to on {@link VisageUpstream.host}.
271
+ */
70
272
  readonly port: number;
273
+ /**
274
+ * Path-location policies for this upstream, keyed by NGINX location path.
275
+ */
71
276
  readonly locations?: {
72
277
  readonly [path: string]: VisageProxyPolicy;
73
278
  };
74
279
  };
280
+ /**
281
+ * Per-location NGINX authentication and header forwarding policy.
282
+ */
75
283
  export type VisageProxyPolicy = {
284
+ /**
285
+ * OAuth2 authentication behavior for this location.
286
+ */
76
287
  readonly auth?: {
288
+ /**
289
+ * Whether requests to this location require OAuth2 authentication.
290
+ *
291
+ * @defaultValue `true`
292
+ */
77
293
  readonly enabled?: boolean;
294
+ /**
295
+ * Whether unauthenticated browser requests should redirect to sign-in.
296
+ *
297
+ * @defaultValue `false`
298
+ */
78
299
  readonly redirect?: boolean;
300
+ /**
301
+ * Whether the authenticated access token should be forwarded upstream as an
302
+ * `Authorization: Bearer ...` header.
303
+ *
304
+ * @defaultValue `true`
305
+ */
79
306
  readonly forward?: boolean;
80
307
  };
308
+ /**
309
+ * Request headers to set when proxying to the upstream. Values may include
310
+ * NGINX variables. These are merged with Visage's default proxy headers:
311
+ * `Cookie`, `Host`, `X-Real-IP`, `X-Forwarded-For`, and
312
+ * `X-Forwarded-Proto`.
313
+ */
81
314
  readonly headers?: {
82
315
  readonly [key: string]: string;
83
316
  };
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,aAAa,GAAG;IAC1B,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,MAAM,CAAC,EAAE,kBAAkB,CAAC;IACrC,QAAQ,CAAC,GAAG,CAAC,EAAE,gBAAgB,GAAG,gBAAgB,CAAC;IACnD,QAAQ,CAAC,MAAM,CAAC,EAAE,kBAAkB,CAAC;IACrC,QAAQ,CAAC,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,aAAa,CAAC,CAAC;IAClD,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,cAAc,CAAC,CAAC;CACrD,CAAC;AAEF,MA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AAQ,CAAC,MAAM,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC;IACnC;;OAEG;IACH,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB;;OAEG;IACH,QAAQ,CAAC,SAAS,CAAC,EAAE;QAAE,QAAQ,EAAE,IAAI,EAAE,MAAM,GAAG,iBAAiB,CAAA;KAAE,CAAC;CACrE,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,iBAAiB,GAAG;IAC9B;;OAEG;IACH,QAAQ,CAAC,IAAI,CAAC,EAAE;QACd;;;;WAIG;QACH,QAAQ,CAAC,OAAO,CAAC,EAAE,OAAO,CAAC;QAC3B;;;;WAIG;QACH,QAAQ,CAAC,QAAQ,CAAC,EAAE,OAAO,CAAC;QAC5B;;;;;WAKG;QACH,QAAQ,CAAC,OAAO,CAAC,EAAE,OAAO,CAAC;KAC5B,CAAC;IACF;;;;;OAKG;IACH,QAAQ,CAAC,OAAO,CAAC,EAAE;QAAE,QAAQ,EAAE,GAAG,EAAE,MAAM,GAAG,MAAM,CAAA;KAAE,CAAC;CACvD,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@blakearoberts/visage",
3
- "version": "0.0.1-rc.1",
3
+ "version": "0.0.1-rc.4",
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",
@@ -46,12 +46,15 @@
46
46
  "clean": "node -e \"require('node:fs').rmSync('dist', { recursive: true, force: true })\"",
47
47
  "test": "npm run test:unit",
48
48
  "test:e2e": "playwright test test/e2e",
49
- "test:unit": "node --experimental-strip-types --test test/unit/*.test.ts"
49
+ "test:unit": "node --experimental-strip-types --test test/unit/*.test.ts",
50
+ "format": "prettier --write \"{docs,examples,src,test}/**/*.{ts,tsx,js,jsx,json,css,html,md}\" \"*.{json,md}\"",
51
+ "format:check": "prettier --check \"{docs,examples,src,test}/**/*.{ts,tsx,js,jsx,json,css,html,md}\" \"*.{json,md}\""
50
52
  },
51
53
  "devDependencies": {
52
54
  "@playwright/test": "^1.59.1",
53
55
  "@rollup/plugin-typescript": "^12.3.0",
54
56
  "@types/node": "^25.6.2",
57
+ "prettier": "^3.8.3",
55
58
  "rollup": "^4.60.3",
56
59
  "tslib": "^2.8.1",
57
60
  "typescript": "^5.9.3",