vue-ssr-lite 0.1.2 → 0.1.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":"SsrApplicationRuntime.d.ts","sourceRoot":"","sources":["../src/SsrApplicationRuntime.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,EACV,wBAAwB,EACxB,qBAAqB,EACrB,iBAAiB,EACjB,gBAAgB,EAEjB,MAAM,mBAAmB,CAAA;AAE1B,MAAM,WAAW,2BAA2B,CAC1C,iBAAiB,EACjB,aAAa;IAEb,MAAM,EAAE,OAAO,CAAA;IACf,OAAO,EAAE,gBAAgB,CAAC,aAAa,CAAC,CAAA;IACxC,cAAc,CAAC,EAAE,iBAAiB,CAAC,iBAAiB,EAAE,aAAa,CAAC,GAAG,IAAI,CAAA;CAC5E;AAED,eAAO,MAAM,oBAAoB,GAC/B,iBAAiB,SAAS,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EACvE,aAAa,GAAG,OAAO,EACvB,UAAU,GAAG,OAAO,EAEpB,YAAY,wBAAwB,CAClC,iBAAiB,EACjB,aAAa,EACb,UAAU,CACX,EACD,SAAS,2BAA2B,CAAC,iBAAiB,EAAE,aAAa,CAAC,KACrE,OAAO,CAAC,qBAAqB,CAAC,iBAAiB,EAAE,aAAa,EAAE,UAAU,CAAC,CA+F7E,CAAA"}
1
+ {"version":3,"file":"SsrApplicationRuntime.d.ts","sourceRoot":"","sources":["../src/SsrApplicationRuntime.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,EACV,wBAAwB,EACxB,qBAAqB,EACrB,iBAAiB,EACjB,gBAAgB,EAEjB,MAAM,mBAAmB,CAAA;AAE1B,MAAM,WAAW,2BAA2B,CAC1C,iBAAiB,EACjB,aAAa;IAEb,MAAM,EAAE,OAAO,CAAA;IACf,OAAO,EAAE,gBAAgB,CAAC,aAAa,CAAC,CAAA;IACxC,cAAc,CAAC,EAAE,iBAAiB,CAAC,iBAAiB,EAAE,aAAa,CAAC,GAAG,IAAI,CAAA;CAC5E;AAED,eAAO,MAAM,oBAAoB,GAC/B,iBAAiB,SAAS,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EACvE,aAAa,GAAG,OAAO,EACvB,UAAU,GAAG,OAAO,EAEpB,YAAY,wBAAwB,CAClC,iBAAiB,EACjB,aAAa,EACb,UAAU,CACX,EACD,SAAS,2BAA2B,CAAC,iBAAiB,EAAE,aAAa,CAAC,KACrE,OAAO,CAAC,qBAAqB,CAAC,iBAAiB,EAAE,aAAa,EAAE,UAAU,CAAC,CAoG7E,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"SsrBrowserRuntime.d.ts","sourceRoot":"","sources":["../src/SsrBrowserRuntime.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EACV,wBAAwB,EAGzB,MAAM,mBAAmB,CAAA;AAE1B,MAAM,WAAW,iBAAiB;IAChC,aAAa,CAAC,EAAE,MAAM,CAAA;IACtB,cAAc,CAAC,EAAE,MAAM,CAAA;IACvB,kBAAkB,CAAC,EAAE,MAAM,CAAA;CAC5B;AAED,eAAO,MAAM,qBAAqB,GAChC,YAAY,wBAAwB,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC,EACnD,UAAS,iBAAsB,KAC9B,OAAO,CAAC,IAAI,CA2Cd,CAAA"}
1
+ {"version":3,"file":"SsrBrowserRuntime.d.ts","sourceRoot":"","sources":["../src/SsrBrowserRuntime.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EACV,wBAAwB,EAGzB,MAAM,mBAAmB,CAAA;AAE1B,MAAM,WAAW,iBAAiB;IAChC,aAAa,CAAC,EAAE,MAAM,CAAA;IACtB,cAAc,CAAC,EAAE,MAAM,CAAA;IACvB,kBAAkB,CAAC,EAAE,MAAM,CAAA;CAC5B;AAED,eAAO,MAAM,qBAAqB,GAChC,YAAY,wBAAwB,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC,EACnD,UAAS,iBAAsB,KAC9B,OAAO,CAAC,IAAI,CAsDd,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"SsrRenderRuntime.d.ts","sourceRoot":"","sources":["../src/SsrRenderRuntime.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EACV,wBAAwB,EAExB,gBAAgB,EAChB,eAAe,EAChB,MAAM,mBAAmB,CAAA;AAK1B,eAAO,MAAM,oBAAoB,GAC/B,iBAAiB,SAAS,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EACvE,aAAa,GAAG,OAAO,EACvB,UAAU,GAAG,OAAO,EAEpB,YAAY,wBAAwB,CAClC,iBAAiB,EACjB,aAAa,EACb,UAAU,CACX,EACD,SAAS,gBAAgB,CAAC,aAAa,CAAC,KACvC,OAAO,CAAC,eAAe,CAAC,iBAAiB,EAAE,aAAa,CAAC,CA0D3D,CAAA"}
1
+ {"version":3,"file":"SsrRenderRuntime.d.ts","sourceRoot":"","sources":["../src/SsrRenderRuntime.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EACV,wBAAwB,EAExB,gBAAgB,EAChB,eAAe,EAChB,MAAM,mBAAmB,CAAA;AAK1B,eAAO,MAAM,oBAAoB,GAC/B,iBAAiB,SAAS,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EACvE,aAAa,GAAG,OAAO,EACvB,UAAU,GAAG,OAAO,EAEpB,YAAY,wBAAwB,CAClC,iBAAiB,EACjB,aAAa,EACb,UAAU,CACX,EACD,SAAS,gBAAgB,CAAC,aAAa,CAAC,KACvC,OAAO,CAAC,eAAe,CAAC,iBAAiB,EAAE,aAAa,CAAC,CA0E3D,CAAA"}
@@ -1,6 +1,6 @@
1
1
  import { App, Component } from 'vue';
2
2
  import { Router, RouteRecordRaw } from 'vue-router';
3
- import { VueApolloClientOptions, VueApolloState, VueApolloClients } from 'vue-apollo-client';
3
+ import { VueApolloClientOptions, VueApolloRuntime, VueApolloState, VueApolloClients } from 'vue-apollo-client';
4
4
  export type SsrHeaderValue = string | string[] | undefined;
5
5
  export type SsrHeaders = Record<string, SsrHeaderValue>;
6
6
  export interface SsrHeadPayload {
@@ -172,7 +172,9 @@ export interface SsrEndpointDefinition<TPublicConfig = unknown> {
172
172
  handle: (request: SsrHttpRequest<TPublicConfig>, tools: SsrEndpointTools) => SsrHttpResponse | null | Promise<SsrHttpResponse | null>;
173
173
  }
174
174
  export interface SsrEndpointTools {
175
- /** Creates isolated server clients that the runtime stops after the request. */
175
+ /** Creates an isolated typed operation runtime stopped after the request. */
176
+ createApolloRuntime: (options: VueApolloClientOptions) => VueApolloRuntime;
177
+ /** @deprecated Use `createApolloRuntime` and its typed execution methods. */
176
178
  createApolloClients: (options: VueApolloClientOptions) => VueApolloClients;
177
179
  }
178
180
  export interface SsrReadinessProbe {
@@ -1 +1 @@
1
- {"version":3,"file":"SsrRuntimeTypes.d.ts","sourceRoot":"","sources":["../src/SsrRuntimeTypes.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,GAAG,EAAE,SAAS,EAAE,MAAM,KAAK,CAAA;AACzC,OAAO,KAAK,EAAE,MAAM,EAAE,cAAc,EAAE,MAAM,YAAY,CAAA;AACxD,OAAO,KAAK,EACV,sBAAsB,EACtB,cAAc,EACf,MAAM,mBAAmB,CAAA;AAC1B,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAA;AAEzD,MAAM,MAAM,cAAc,GAAG,MAAM,GAAG,MAAM,EAAE,GAAG,SAAS,CAAA;AAC1D,MAAM,MAAM,UAAU,GAAG,MAAM,CAAC,MAAM,EAAE,cAAc,CAAC,CAAA;AAEvD,MAAM,WAAW,cAAc;IAC7B,KAAK,CAAC,EAAE,MAAM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eAAe,CAAC,EAAE,MAAM,EAAE,CAAA;IAC1B,cAAc,CAAC,EAAE,MAAM,EAAE,CAAA;IACzB,YAAY,EAAE,aAAa,CAAA;IAC3B,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,aAAa,CAAC,EAAE,MAAM,CAAA;IACtB,MAAM,CAAC,EAAE,SAAS,CAAA;IAClB,SAAS,CAAC,EAAE,CAAC,OAAO,EAAE,gBAAgB,KAAK,IAAI,CAAA;IAC/C,WAAW,CAAC,EAAE,CACZ,OAAO,EAAE,qBAAqB,CAAC,aAAa,CAAC,KAC1C,eAAe,GAAG,IAAI,GAAG,OAAO,CAAC,eAAe,GAAG,IAAI,CAAC,CAAA;CAC9D;AAED,MAAM,WAAW,oBAAoB,CAAC,aAAa,GAAG,OAAO;IAC3D,IAAI,EAAE,MAAM,CAAA;IACZ,OAAO,EAAE,eAAe,EAAE,CAAA;IAC1B,cAAc,CAAC,EAAE,MAAM,CAAA;IACvB,MAAM,EAAE,gBAAgB,CAAC,aAAa,CAAC,CAAA;IACvC,SAAS,CAAC,EAAE,qBAAqB,CAAC,aAAa,CAAC,EAAE,CAAA;IAClD,SAAS,CAAC,EAAE,iBAAiB,EAAE,CAAA;CAChC;AAED,MAAM,MAAM,0BAA0B,CAAC,aAAa,GAAG,OAAO,IAC1D,oBAAoB,CAAC,aAAa,CAAC,GACnC,CAAC,MAAM,oBAAoB,CAAC,aAAa,CAAC,GAAG,OAAO,CAAC,oBAAoB,CAAC,aAAa,CAAC,CAAC,CAAC,CAAA"}
@@ -0,0 +1,65 @@
1
+ import { inject as C, ref as R, createSSRApp as i } from "vue";
2
+ import { createRouter as v, createMemoryHistory as f, createWebHistory as w } from "vue-router";
3
+ import { createApollo as b } from "vue-apollo-client";
4
+ const p = /* @__PURE__ */ Symbol("vue-ssr-lite-request-context"), E = () => {
5
+ const e = C(p);
6
+ if (!e) throw new Error("vue-ssr-lite request context is not installed.");
7
+ return e;
8
+ }, M = async (e, t) => {
9
+ if (!e?.id || !e.rootComponent)
10
+ throw new Error("An SSR application requires an id and rootComponent.");
11
+ if (t.hydrationState && t.hydrationState.applicationId !== e.id)
12
+ throw new Error("Hydration state belongs to a different SSR application.");
13
+ const a = typeof e.routes == "function" ? e.routes() : e.routes, s = a ? v({
14
+ history: t.server ? f() : w(),
15
+ routes: a,
16
+ scrollBehavior(r, y, n) {
17
+ if (n) return n;
18
+ if (r.hash) return { el: r.hash, top: 24 };
19
+ if (r.fullPath !== y.fullPath)
20
+ return { left: 0, top: 0 };
21
+ }
22
+ }) : null, h = t.hydrationState?.application ?? e.createInitialState?.() ?? {}, q = {
23
+ statusCode: 200,
24
+ headers: {},
25
+ redirect: null
26
+ }, u = {
27
+ request: t.request,
28
+ url: new URL(t.request.url),
29
+ host: t.request.host,
30
+ publicConfig: t.request.publicConfig,
31
+ state: h,
32
+ head: R(null),
33
+ response: q,
34
+ apolloClients: null
35
+ }, S = e.createExtension ? await e.createExtension(u) : void 0, o = { ...u, extension: S }, c = e.apollo ? typeof e.apollo == "function" ? await e.apollo({
36
+ request: t.request,
37
+ publicConfig: t.request.publicConfig,
38
+ server: t.server
39
+ }) : e.apollo : null, m = typeof e.apolloRequestTimeoutMs == "function" ? e.apolloRequestTimeoutMs(t.request.publicConfig) : e.apolloRequestTimeoutMs, l = c ? b(c, {
40
+ server: t.server,
41
+ registerGlobal: !t.server,
42
+ headers: t.request.apolloHeaders,
43
+ initialState: t.hydrationState?.apollo,
44
+ signal: t.request.signal,
45
+ requestTimeoutMs: m ?? t.request.apolloRequestTimeoutMs
46
+ }) : null;
47
+ o.apolloClients = l?.clients ?? null;
48
+ try {
49
+ const r = i(e.rootComponent);
50
+ return s && r.use(s), l && r.use(l), r.provide(p, o), await e.install?.({
51
+ app: r,
52
+ router: s,
53
+ context: o,
54
+ apolloClients: l?.clients ?? null,
55
+ server: t.server
56
+ }), { app: r, router: s, context: o, apollo: l };
57
+ } catch (r) {
58
+ throw l?.stop(), r;
59
+ }
60
+ };
61
+ export {
62
+ p as S,
63
+ M as c,
64
+ E as u
65
+ };
@@ -1,49 +1,63 @@
1
- import { createServer as ae } from "node:http";
2
- import { stat as B, readFile as te } from "node:fs/promises";
3
- import { resolve as j, sep as X, extname as re } from "node:path";
4
- import { createApollo as ie } from "vue-apollo-client";
5
- import { renderToString as ce } from "@vue/server-renderer";
6
- import { c as le } from "./SsrApplicationRuntime-B-6cXN5-.mjs";
7
- import { a as de } from "./SsrSerialization-k-3aCFYt.mjs";
8
- import { r as W, p as ue, i as he } from "./SsrHtmlRuntime-cTFsMSAZ.mjs";
9
- const D = () => globalThis.performance?.now?.() ?? Date.now(), Z = (e) => new TextEncoder().encode(e).byteLength, me = async (e, t) => {
10
- const s = D(), r = await le(e, {
1
+ import { createServer as ie } from "node:http";
2
+ import { stat as _, readFile as re } from "node:fs/promises";
3
+ import { resolve as j, sep as Z, extname as oe } from "node:path";
4
+ import { createApollo as ce } from "vue-apollo-client";
5
+ import { renderToString as le } from "@vue/server-renderer";
6
+ import { c as de } from "./SsrApplicationRuntime-lj5EmDGU.mjs";
7
+ import { a as ue } from "./SsrSerialization-k-3aCFYt.mjs";
8
+ import { r as B, p as he, i as me } from "./SsrHtmlRuntime-cTFsMSAZ.mjs";
9
+ const D = () => globalThis.performance?.now?.() ?? Date.now(), Q = (e) => new TextEncoder().encode(e).byteLength, fe = async (e, t) => {
10
+ const s = D(), r = await de(e, {
11
11
  server: !0,
12
12
  request: t
13
- }), i = D();
13
+ }), c = D();
14
+ let n;
14
15
  try {
15
16
  if (r.router) {
16
- const a = new URL(t.url);
17
- await r.router.push(`${a.pathname}${a.search}${a.hash}`), await r.router.isReady(), r.router.currentRoute.value.matched.length === 0 && (r.context.response.statusCode = 404);
17
+ const h = new URL(t.url);
18
+ await r.router.push(`${h.pathname}${h.search}${h.hash}`), await r.router.isReady(), r.router.currentRoute.value.matched.length === 0 && (r.context.response.statusCode = 404);
18
19
  }
19
- const n = D(), l = {}, v = await ce(r.app, l), C = D(), f = await e.resolveHead?.(r.context) ?? r.context.head.value, m = {
20
+ const i = D(), p = {}, C = await le(r.app, p), w = D(), f = await e.resolveHead?.(r.context) ?? r.context.head.value, y = {
20
21
  version: 1,
21
22
  applicationId: e.id,
22
23
  publicConfig: t.publicConfig,
23
24
  application: r.context.state,
24
25
  apollo: r.apollo?.extract()
25
- }, g = Z(de(m)), o = D();
26
+ }, o = Q(ue(y)), a = D();
26
27
  return {
27
- html: v,
28
- teleports: l.teleports?.body ?? "",
28
+ html: C,
29
+ teleports: p.teleports?.body ?? "",
29
30
  head: f,
30
31
  response: r.context.response,
31
- hydrationState: m,
32
+ hydrationState: y,
32
33
  metrics: {
33
34
  requestId: t.requestId,
34
35
  applicationId: e.id,
35
- contextDurationMs: i - s,
36
- routeDurationMs: n - i,
37
- renderDurationMs: C - n,
38
- totalDurationMs: o - s,
39
- htmlBytes: Z(v),
40
- stateBytes: g
36
+ contextDurationMs: c - s,
37
+ routeDurationMs: i - c,
38
+ renderDurationMs: w - i,
39
+ totalDurationMs: a - s,
40
+ htmlBytes: Q(C),
41
+ stateBytes: o
41
42
  }
42
43
  };
44
+ } catch (i) {
45
+ throw n = i, i;
43
46
  } finally {
44
- await e.cleanup?.(r.context), r.apollo?.stop();
47
+ let i;
48
+ try {
49
+ await e.cleanup?.(r.context);
50
+ } catch (p) {
51
+ i = p, console.error("[vue-ssr-lite] application cleanup failed", p);
52
+ }
53
+ try {
54
+ r.apollo?.stop();
55
+ } catch (p) {
56
+ console.error("[vue-ssr-lite] Apollo cleanup failed", p), i || (i = p);
57
+ }
58
+ if (!n && i) throw i;
45
59
  }
46
- }, fe = {
60
+ }, pe = {
47
61
  ".css": "text/css; charset=utf-8",
48
62
  ".gif": "image/gif",
49
63
  ".html": "text/html; charset=utf-8",
@@ -60,123 +74,123 @@ const D = () => globalThis.performance?.now?.() ?? Date.now(), Z = (e) => new Te
60
74
  ".woff": "font/woff",
61
75
  ".woff2": "font/woff2",
62
76
  ".xml": "application/xml; charset=utf-8"
63
- }, pe = async (e, t, s) => {
77
+ }, we = async (e, t, s) => {
64
78
  try {
65
79
  const r = decodeURIComponent(t).replace(/^\/+/, "");
66
80
  if (!r || s.includes(r)) return null;
67
- const i = j(e, r), n = e.endsWith(X) ? e : `${e}${X}`;
68
- return !i.startsWith(n) || !(await B(i)).isFile() ? null : {
81
+ const c = j(e, r), n = e.endsWith(Z) ? e : `${e}${Z}`;
82
+ return !c.startsWith(n) || !(await _(c)).isFile() ? null : {
69
83
  statusCode: 200,
70
- body: await te(i),
84
+ body: await re(c),
71
85
  headers: {
72
- "content-type": fe[re(i)] || "application/octet-stream",
86
+ "content-type": pe[oe(c)] || "application/octet-stream",
73
87
  "cache-control": t.startsWith("/assets/") ? "public, max-age=31536000, immutable" : "public, max-age=3600"
74
88
  }
75
89
  };
76
90
  } catch {
77
91
  return null;
78
92
  }
79
- }, G = (e) => String(Array.isArray(e) ? e[0] : e || "").split(",", 1)[0].trim(), N = (e) => {
80
- const t = G(e);
93
+ }, J = (e) => String(Array.isArray(e) ? e[0] : e || "").split(",", 1)[0].trim(), U = (e) => {
94
+ const t = J(e);
81
95
  if (!t || t.length > 512 || /[\u0000-\u0020\u007f]/.test(t) || /[\\/@?#]/.test(t))
82
96
  return "";
83
97
  try {
84
98
  const s = t.includes(":") && t.split(":").length > 2 && !t.startsWith("[") ? `[${t}]` : t, r = new URL(`http://${s}`);
85
99
  if (r.username || r.password || r.pathname !== "/" || r.search || r.hash)
86
100
  return "";
87
- const i = r.hostname.toLowerCase().replace(/\.$/, "");
88
- return i ? `${i.includes(":") && !i.startsWith("[") ? `[${i}]` : i}${r.port ? `:${r.port}` : ""}` : "";
101
+ const c = r.hostname.toLowerCase().replace(/\.$/, "");
102
+ return c ? `${c.includes(":") && !c.startsWith("[") ? `[${c}]` : c}${r.port ? `:${r.port}` : ""}` : "";
89
103
  } catch {
90
104
  return "";
91
105
  }
92
- }, _ = (e) => {
93
- const t = N(e);
106
+ }, G = (e) => {
107
+ const t = U(e);
94
108
  if (!t) return "";
95
109
  if (t.startsWith("[")) {
96
110
  const s = t.indexOf("]");
97
111
  return s > 0 ? t.slice(1, s) : "";
98
112
  }
99
113
  return t.replace(/:\d+$/, "");
100
- }, we = (e) => {
114
+ }, ye = (e) => {
101
115
  const t = e.trim().toLowerCase();
102
116
  if (t === "*") return "*";
103
117
  if (t.startsWith("*.")) {
104
- const s = _(t.slice(2));
118
+ const s = G(t.slice(2));
105
119
  return s && !s.includes(":") ? `*.${s}` : "";
106
120
  }
107
- return N(t);
121
+ return U(t);
108
122
  }, ge = (e, t) => {
109
- const s = _(e), r = we(t);
110
- return !s || !r ? !1 : r === "*" ? !0 : r.startsWith("*.") ? s.endsWith(`.${r.slice(2)}`) : N(e) === r || s === _(r);
111
- }, ye = (e, t, s = !1) => N(s && G(e) || t), ve = (e, t, s = !1) => {
123
+ const s = G(e), r = ye(t);
124
+ return !s || !r ? !1 : r === "*" ? !0 : r.startsWith("*.") ? s.endsWith(`.${r.slice(2)}`) : U(e) === r || s === G(r);
125
+ }, ve = (e, t, s = !1) => U(s && J(e) || t), Se = (e, t, s = !1) => {
112
126
  if (!s) return t;
113
- const r = G(e).toLowerCase();
127
+ const r = J(e).toLowerCase();
114
128
  return r === "http" || r === "https" ? r : t;
115
- }, Se = (e, t, s) => {
129
+ }, xe = (e, t, s) => {
116
130
  const r = e.find(
117
131
  (n) => n.hosts.some(
118
- (l) => l !== "*" && ge(t, l)
132
+ (i) => i !== "*" && ge(t, i)
119
133
  )
120
134
  );
121
135
  if (r) return r;
122
- const i = e.find((n) => n.hosts.includes("*"));
123
- return i || (e.find((n) => n.id === s) ?? null);
124
- }, Q = /^[!#$%&'*+.^_`|~0-9A-Za-z-]+$/, xe = (e, t = [], s = []) => {
125
- const r = new Set(t.filter((l) => Q.test(l))), i = new Set(s.filter((l) => Q.test(l)));
136
+ const c = e.find((n) => n.hosts.includes("*"));
137
+ return c || (e.find((n) => n.id === s) ?? null);
138
+ }, Y = /^[!#$%&'*+.^_`|~0-9A-Za-z-]+$/, be = (e, t = [], s = []) => {
139
+ const r = new Set(t.filter((i) => Y.test(i))), c = new Set(s.filter((i) => Y.test(i)));
126
140
  if (!e || r.size === 0) return;
127
- const n = String(e).split(";").map((l) => l.trim()).filter(Boolean).filter((l) => {
128
- const v = l.indexOf("=");
129
- if (v <= 0) return !1;
130
- const C = l.slice(0, v).trim();
131
- return r.has(C) && !i.has(C);
141
+ const n = String(e).split(";").map((i) => i.trim()).filter(Boolean).filter((i) => {
142
+ const p = i.indexOf("=");
143
+ if (p <= 0) return !1;
144
+ const C = i.slice(0, p).trim();
145
+ return r.has(C) && !c.has(C);
132
146
  });
133
147
  return n.length ? n.join("; ") : void 0;
134
- }, be = (e) => typeof e == "string" ? new TextEncoder().encode(e).byteLength : e?.byteLength ?? 0, Y = (e) => ({
148
+ }, Ee = (e) => typeof e == "string" ? new TextEncoder().encode(e).byteLength : e?.byteLength ?? 0, q = (e) => ({
135
149
  statusCode: e.statusCode,
136
150
  body: e.body instanceof Uint8Array ? e.body.slice() : e.body,
137
151
  headers: e.headers ? { ...e.headers } : void 0
138
- }), Le = (e = {}) => {
139
- const t = Number(e.maxEntries ?? 500), s = Number(e.maxBytes ?? 32 * 1024 * 1024), r = Number.isFinite(t) ? Math.max(1, Math.floor(t)) : 500, i = Number.isFinite(s) ? Math.max(1, Math.floor(s)) : 32 * 1024 * 1024, n = /* @__PURE__ */ new Map();
140
- let l = 0;
141
- const v = (f) => {
142
- const m = n.get(f);
143
- return m ? (n.delete(f), l -= m.size, !0) : !1;
152
+ }), Ne = (e = {}) => {
153
+ const t = Number(e.maxEntries ?? 500), s = Number(e.maxBytes ?? 32 * 1024 * 1024), r = Number.isFinite(t) ? Math.max(1, Math.floor(t)) : 500, c = Number.isFinite(s) ? Math.max(1, Math.floor(s)) : 32 * 1024 * 1024, n = /* @__PURE__ */ new Map();
154
+ let i = 0;
155
+ const p = (w) => {
156
+ const f = n.get(w);
157
+ return f ? (n.delete(w), i -= f.size, !0) : !1;
144
158
  }, C = () => {
145
- const f = Date.now();
146
- for (const [m, g] of n)
147
- g.expiresAt <= f && v(m);
148
- for (; n.size > r || l > i; ) {
149
- const m = n.keys().next().value;
150
- if (!m) break;
151
- v(m);
159
+ const w = Date.now();
160
+ for (const [f, y] of n)
161
+ y.expiresAt <= w && p(f);
162
+ for (; n.size > r || i > c; ) {
163
+ const f = n.keys().next().value;
164
+ if (!f) break;
165
+ p(f);
152
166
  }
153
167
  };
154
168
  return {
155
- get(f) {
156
- const m = n.get(f);
157
- return m ? m.expiresAt <= Date.now() ? (v(f), null) : (n.delete(f), n.set(f, m), Y(m.response)) : null;
169
+ get(w) {
170
+ const f = n.get(w);
171
+ return f ? f.expiresAt <= Date.now() ? (p(w), null) : (n.delete(w), n.set(w, f), q(f.response)) : null;
158
172
  },
159
- set(f, m, g) {
160
- const o = Number(g.ttlMs);
173
+ set(w, f, y) {
174
+ const o = Number(y.ttlMs);
161
175
  if (!Number.isFinite(o) || o <= 0) return;
162
- v(f);
163
- const a = Y(m), p = be(a.body);
164
- p > i || (n.set(f, {
176
+ p(w);
177
+ const a = q(f), h = Ee(a.body);
178
+ h > c || (n.set(w, {
165
179
  response: a,
166
180
  expiresAt: Date.now() + o,
167
- size: p,
168
- tags: new Set(g.tags ?? [])
169
- }), l += p, C());
181
+ size: h,
182
+ tags: new Set(y.tags ?? [])
183
+ }), i += h, C());
170
184
  },
171
- invalidate(f = {}) {
172
- const m = new Set(f.keys ?? []), g = new Set(f.tags ?? []);
185
+ invalidate(w = {}) {
186
+ const f = new Set(w.keys ?? []), y = new Set(w.tags ?? []);
173
187
  let o = 0;
174
- for (const [a, p] of n)
175
- (!m.size && !g.size || m.has(a) || [...g].some((S) => p.tags.has(S))) && v(a) && (o += 1);
188
+ for (const [a, h] of n)
189
+ (!f.size && !y.size || f.has(a) || [...y].some((S) => h.tags.has(S))) && p(a) && (o += 1);
176
190
  return o;
177
191
  }
178
192
  };
179
- }, Ee = async (e, t, s) => {
193
+ }, Re = async (e, t, s) => {
180
194
  if (!s || t.method !== "GET" || t.cookie || !Number.isFinite(s.ttlMs) || s.ttlMs <= 0)
181
195
  return null;
182
196
  const r = s.vary ? await s.vary(t) : "";
@@ -188,265 +202,268 @@ const D = () => globalThis.performance?.now?.() ?? Date.now(), Z = (e) => new Te
188
202
  t.search,
189
203
  r
190
204
  ]);
191
- }, Re = (e, t, s) => {
192
- const r = Object.entries(e.headers ?? {}), i = String(
193
- r.find(([l]) => l.toLowerCase() === "cache-control")?.[1] || ""
205
+ }, Ce = (e, t, s) => {
206
+ const r = Object.entries(e.headers ?? {}), c = String(
207
+ r.find(([i]) => i.toLowerCase() === "cache-control")?.[1] || ""
194
208
  ).toLowerCase();
195
- return e.statusCode === 200 && typeof e.body == "string" && !r.some(([l]) => l.toLowerCase() === "set-cookie") && !i.includes("private") && !i.includes("no-store") && (s.shouldCache?.(e, t) ?? !0);
209
+ return e.statusCode === 200 && typeof e.body == "string" && !r.some(([i]) => i.toLowerCase() === "set-cookie") && !c.includes("private") && !c.includes("no-store") && (s.shouldCache?.(e, t) ?? !0);
196
210
  };
197
- class oe extends Error {
211
+ class se extends Error {
198
212
  constructor() {
199
213
  super("SSR request timed out."), this.name = "SsrRequestTimeoutError";
200
214
  }
201
215
  }
202
- const Ce = (e) => {
216
+ const Ae = (e) => {
203
217
  const t = e ?? 4173;
204
218
  if (!Number.isInteger(t) || t < 0 || t > 65535)
205
219
  throw new Error("SSR server port must be an integer between 0 and 65535.");
206
220
  return t;
207
- }, q = async (e) => {
221
+ }, ee = async (e) => {
208
222
  const s = e?.default ?? e, r = typeof s == "function" ? await s() : s;
209
223
  if (!r?.name || !Array.isArray(r.entries) || !r.server)
210
224
  throw new Error("The SSR runtime module does not export a valid runtime definition.");
211
- const i = /* @__PURE__ */ new Set();
225
+ const c = /* @__PURE__ */ new Set();
212
226
  for (const n of r.entries) {
213
- if (!n.id || i.has(n.id))
227
+ if (!n.id || c.has(n.id))
214
228
  throw new Error("SSR runtime entry ids must be present and unique.");
215
- if (i.add(n.id), !n.template || !n.hosts?.length)
229
+ if (c.add(n.id), !n.template || !n.hosts?.length)
216
230
  throw new Error(`SSR runtime entry "${n.id}" requires a template and hosts.`);
217
- const l = !n.roles?.length || !r.server.role || n.roles.includes(r.server.role);
218
- if (n.kind === "ssr" && l && !n.application)
231
+ const i = !n.roles?.length || !r.server.role || n.roles.includes(r.server.role);
232
+ if (n.kind === "ssr" && i && !n.application)
219
233
  throw new Error(`SSR entry "${n.id}" requires an application definition.`);
220
234
  }
221
235
  return r;
222
- }, $ = {
236
+ }, P = {
223
237
  "referrer-policy": "strict-origin-when-cross-origin",
224
238
  "x-content-type-options": "nosniff",
225
239
  "x-frame-options": "SAMEORIGIN"
226
- }, I = (e, t) => {
240
+ }, T = (e, t) => {
227
241
  if (e.method !== "GET" && e.method !== "HEAD") return !1;
228
242
  if (e.headers["sec-fetch-mode"] === "navigate") return !0;
229
243
  const s = String(e.headers.accept || "");
230
- return s.includes("text/html") ? !0 : (!s || s === "*/*") && !re(t);
244
+ return s.includes("text/html") ? !0 : (!s || s === "*/*") && !oe(t);
231
245
  }, Me = (e, t, s = "") => t.end(e.method === "HEAD" ? "" : s), E = (e, t, s) => {
232
246
  t.writeHead(s.statusCode, s.headers ?? {}), Me(e, t, s.body ?? "");
233
- }, T = (e, t, s, r) => E(e, t, {
247
+ }, $ = (e, t, s, r) => E(e, t, {
234
248
  statusCode: s,
235
249
  body: JSON.stringify(r),
236
250
  headers: {
237
251
  "content-type": "application/json; charset=utf-8",
238
252
  "cache-control": "no-store"
239
253
  }
240
- }), ee = async (e, t, s) => {
254
+ }), te = async (e, t, s) => {
241
255
  if (!Number.isFinite(t) || t <= 0) return e;
242
256
  let r;
243
- const i = new Promise((n, l) => {
257
+ const c = new Promise((n, i) => {
244
258
  r = setTimeout(() => {
245
- s.abort(), l(new oe());
259
+ s.abort(), i(new se());
246
260
  }, t);
247
261
  });
248
262
  try {
249
- return await Promise.race([e, i]);
263
+ return await Promise.race([e, c]);
250
264
  } finally {
251
265
  r && clearTimeout(r);
252
266
  }
253
- }, Pe = (e) => e.headers, Te = (e, t, s) => new Promise((r, i) => {
267
+ }, $e = (e) => e.headers, Pe = (e, t, s) => new Promise((r, c) => {
254
268
  e.middlewares(t, s, (n) => {
255
- n ? i(n) : r();
269
+ n ? c(n) : r();
256
270
  });
257
- }), Ne = async (e) => {
271
+ }), Ue = async (e) => {
258
272
  let t = !1;
259
- const s = await q(await e.loadRuntime()), r = s.server, i = r.host || "0.0.0.0", n = Ce(r.port), l = j(
273
+ const s = await ee(await e.loadRuntime()), r = s.server, c = r.host || "0.0.0.0", n = Ae(r.port), i = j(
260
274
  r.root || e.root,
261
275
  r.clientOutDir || "dist/client"
262
- ), v = async () => e.production ? s : q(await e.loadRuntime()), C = async (o, a, p) => {
263
- const c = o.server.root || e.root, S = await te(
264
- j(e.production ? l : c, a),
276
+ ), p = async () => e.production ? s : ee(await e.loadRuntime()), C = async (o, a, h) => {
277
+ const l = o.server.root || e.root, S = await re(
278
+ j(e.production ? i : l, a),
265
279
  "utf8"
266
280
  );
267
- return !e.production && e.vite ? e.vite.transformIndexHtml(p, S) : S;
268
- }, f = async (o) => {
269
- const a = o.server.root || e.root, p = o.entries.filter(
270
- (c) => !c.roles?.length || !o.server.role || c.roles.includes(o.server.role)
281
+ if (e.production || !e.vite) return S;
282
+ const F = `/${a.replaceAll("\\", "/").replace(/^\/+/, "")}`;
283
+ return e.vite.transformIndexHtml(F, S, h);
284
+ }, w = async (o) => {
285
+ const a = o.server.root || e.root, h = o.entries.filter(
286
+ (l) => !l.roles?.length || !o.server.role || l.roles.includes(o.server.role)
271
287
  );
272
288
  await Promise.all(
273
- p.map(async (c) => {
274
- if (!(await B(
275
- j(e.production ? l : a, c.template)
289
+ h.map(async (l) => {
290
+ if (!(await _(
291
+ j(e.production ? i : a, l.template)
276
292
  )).isFile())
277
- throw new Error(`SSR client entry is missing: ${c.template}`);
293
+ throw new Error(`SSR client entry is missing: ${l.template}`);
278
294
  })
279
- ), await Promise.all((o.readiness ?? []).map((c) => c.run()));
280
- }, m = s.entries.filter(
295
+ ), await Promise.all((o.readiness ?? []).map((l) => l.run()));
296
+ }, f = s.entries.filter(
281
297
  (o) => !o.roles?.length || !s.server.role || o.roles.includes(s.server.role)
282
298
  );
283
299
  await Promise.all(
284
- m.map(async (o) => {
300
+ f.map(async (o) => {
285
301
  const a = s.server.root || e.root;
286
- if (!(await B(
287
- j(e.production ? l : a, o.template)
302
+ if (!(await _(
303
+ j(e.production ? i : a, o.template)
288
304
  )).isFile()) throw new Error(`Missing client entry: ${o.template}`);
289
305
  })
290
306
  );
291
- const g = ae(async (o, a) => {
292
- const p = Date.now();
293
- let c = "/", S = "unknown", J;
294
- const A = new AbortController(), V = [];
295
- o.once("aborted", () => A.abort()), a.once("close", () => {
296
- a.writableEnded || A.abort();
307
+ const y = ie(async (o, a) => {
308
+ const h = Date.now();
309
+ let l = "/", S = "unknown", F;
310
+ const I = new AbortController(), V = [];
311
+ o.once("aborted", () => I.abort()), a.once("close", () => {
312
+ a.writableEnded || I.abort();
297
313
  });
298
314
  try {
299
- const h = await v(), u = h.server, M = new URL(o.url || "/", "http://internal");
300
- c = M.pathname;
315
+ const m = await p(), u = m.server, A = new URL(o.url || "/", "http://internal");
316
+ l = A.pathname;
301
317
  const H = u.healthPath || "/healthz", R = u.readinessPath || "/readyz";
302
- if (c === H)
303
- return T(o, a, 200, {
318
+ if (l === H)
319
+ return $(o, a, 200, {
304
320
  status: "ok",
305
- service: h.name,
321
+ service: m.name,
306
322
  role: u.role || "default",
307
- timestamp: new Date(p).toISOString()
323
+ timestamp: new Date(h).toISOString()
308
324
  });
309
- if (c === R) {
325
+ if (l === R) {
310
326
  if (t)
311
- return T(o, a, 503, {
327
+ return $(o, a, 503, {
312
328
  status: "error",
313
- service: h.name,
329
+ service: m.name,
314
330
  message: "Server is shutting down."
315
331
  });
316
332
  try {
317
- return await f(h), T(o, a, 200, {
333
+ return await w(m), $(o, a, 200, {
318
334
  status: "ok",
319
- service: h.name,
335
+ service: m.name,
320
336
  role: u.role || "default"
321
337
  });
322
338
  } catch {
323
- return T(o, a, 503, {
339
+ return $(o, a, 503, {
324
340
  status: "error",
325
- service: h.name,
341
+ service: m.name,
326
342
  message: "A required dependency is unavailable."
327
343
  });
328
344
  }
329
345
  }
330
- const F = ye(
346
+ const L = ve(
331
347
  o.headers["x-forwarded-host"],
332
348
  o.headers.host,
333
349
  u.trustProxy
334
350
  );
335
- if (!F)
351
+ if (!L)
336
352
  return E(o, a, {
337
353
  statusCode: 400,
338
- body: I(o, c) ? W("Invalid request", "The Host header is invalid.") : JSON.stringify({ status: "error", message: "Invalid Host header." }),
354
+ body: T(o, l) ? B("Invalid request", "The Host header is invalid.") : JSON.stringify({ status: "error", message: "Invalid Host header." }),
339
355
  headers: {
340
- "content-type": I(o, c) ? "text/html; charset=utf-8" : "application/json; charset=utf-8",
356
+ "content-type": T(o, l) ? "text/html; charset=utf-8" : "application/json; charset=utf-8",
341
357
  "cache-control": "no-store",
342
- ...$
358
+ ...P
343
359
  }
344
360
  });
345
- const w = Se(
346
- h.entries,
347
- F,
348
- h.defaultEntryId
361
+ const g = xe(
362
+ m.entries,
363
+ L,
364
+ m.defaultEntryId
349
365
  );
350
- if (!w)
351
- return T(o, a, 421, {
366
+ if (!g)
367
+ return $(o, a, 421, {
352
368
  status: "error",
353
- service: h.name,
369
+ service: m.name,
354
370
  message: "No application entry serves this host."
355
371
  });
356
- if (S = w.id, w.roles?.length && u.role && !w.roles.includes(u.role)) {
357
- const d = `Runtime role does not serve entry "${w.id}".`;
372
+ if (S = g.id, g.roles?.length && u.role && !g.roles.includes(u.role)) {
373
+ const d = `Runtime role does not serve entry "${g.id}".`;
358
374
  return E(o, a, {
359
375
  statusCode: 421,
360
- body: I(o, c) ? W("Misdirected request", d) : JSON.stringify({ status: "error", message: d }),
376
+ body: T(o, l) ? B("Misdirected request", d) : JSON.stringify({ status: "error", message: d }),
361
377
  headers: {
362
- "content-type": I(o, c) ? "text/html; charset=utf-8" : "application/json; charset=utf-8",
378
+ "content-type": T(o, l) ? "text/html; charset=utf-8" : "application/json; charset=utf-8",
363
379
  "cache-control": "no-store",
364
- ...$
380
+ ...P
365
381
  }
366
382
  });
367
383
  }
368
- const K = ve(
384
+ const K = Se(
369
385
  o.headers["x-forwarded-proto"],
370
386
  o.socket.encrypted ? "https" : "http",
371
387
  u.trustProxy
372
- ), U = xe(
388
+ ), z = be(
373
389
  o.headers.cookie,
374
390
  u.cookieAllowlist,
375
391
  u.cookieDenylist
376
- ), y = {
377
- requestId: String(o.headers["x-request-id"] || "").trim() || `${p.toString(36)}-${Math.random().toString(36).slice(2, 10)}`,
392
+ ), v = {
393
+ requestId: String(o.headers["x-request-id"] || "").trim() || `${h.toString(36)}-${Math.random().toString(36).slice(2, 10)}`,
378
394
  url: new URL(
379
- `${M.pathname}${M.search}`,
380
- `${K}://${F}`
395
+ `${A.pathname}${A.search}`,
396
+ `${K}://${L}`
381
397
  ).href,
382
- host: F,
398
+ host: L,
383
399
  protocol: K,
384
400
  method: o.method || "GET",
385
- headers: Pe(o),
386
- cookie: U,
387
- apolloHeaders: U ? { cookie: U } : void 0,
401
+ headers: $e(o),
402
+ cookie: z,
403
+ apolloHeaders: z ? { cookie: z } : void 0,
388
404
  apolloRequestTimeoutMs: u.apolloRequestTimeoutMs,
389
405
  publicConfig: u.publicConfig,
390
- signal: A.signal,
391
- pathname: c,
392
- search: M.search,
393
- entryId: w.id
406
+ signal: I.signal,
407
+ pathname: l,
408
+ search: A.search,
409
+ entryId: g.id
394
410
  };
395
- J = y;
396
- const se = {
397
- createApolloClients: (d) => {
398
- const b = ie(d, {
399
- server: !0,
400
- registerGlobal: !1,
401
- headers: y.apolloHeaders,
402
- signal: y.signal,
403
- requestTimeoutMs: y.apolloRequestTimeoutMs
404
- });
405
- return V.push(b), b.clients;
406
- }
411
+ F = v;
412
+ const X = (d) => {
413
+ const b = ce(d, {
414
+ server: !0,
415
+ registerGlobal: !1,
416
+ headers: v.apolloHeaders,
417
+ signal: v.signal,
418
+ requestTimeoutMs: v.apolloRequestTimeoutMs
419
+ });
420
+ return V.push(b), b;
421
+ }, ne = {
422
+ createApolloRuntime: X,
423
+ createApolloClients: (d) => X(d).clients
407
424
  };
408
- for (const d of h.endpoints ?? []) {
409
- if (!d.match(y)) continue;
410
- const b = await ee(
411
- Promise.resolve(d.handle(y, se)),
425
+ for (const d of m.endpoints ?? []) {
426
+ if (!d.match(v)) continue;
427
+ const b = await te(
428
+ Promise.resolve(d.handle(v, ne)),
412
429
  u.requestTimeoutMs ?? 15e3,
413
- A
430
+ I
414
431
  );
415
432
  if (b) return E(o, a, b);
416
433
  }
417
434
  if (e.production) {
418
- const d = await pe(
435
+ const d = await we(
436
+ i,
419
437
  l,
420
- c,
421
- h.entries.map(({ template: b }) => b)
438
+ m.entries.map(({ template: b }) => b)
422
439
  );
423
440
  if (d) return E(o, a, d);
424
- } else if (e.vite && (c.startsWith("/src/") || c.startsWith("/@") || c.includes(".") || c === "/__vite_ping") && (await Te(e.vite, o, a), a.writableEnded))
441
+ } else if (e.vite && (l.startsWith("/src/") || l.startsWith("/@") || l.includes(".") || l === "/__vite_ping") && (await Pe(e.vite, o, a), a.writableEnded))
425
442
  return;
426
- if (!I(o, c))
427
- return T(o, a, 404, {
443
+ if (!T(o, l))
444
+ return $(o, a, 404, {
428
445
  status: "error",
429
- service: h.name,
446
+ service: m.name,
430
447
  message: "Resource not found."
431
448
  });
432
- const P = w.kind === "ssr" ? w.responseCache : void 0;
449
+ const M = g.kind === "ssr" ? g.responseCache : void 0;
433
450
  let k = null;
434
451
  try {
435
- k = await Ee(
436
- w.id,
437
- y,
438
- P
452
+ k = await Re(
453
+ g.id,
454
+ v,
455
+ M
439
456
  );
440
457
  } catch (d) {
441
458
  u.logger?.warn?.("ssr.cache.key.failed", {
442
- entryId: w.id,
443
- requestId: y.requestId,
459
+ entryId: g.id,
460
+ requestId: v.requestId,
444
461
  error: d instanceof Error ? d.message : "Unknown cache error"
445
462
  });
446
463
  }
447
- if (P && k)
464
+ if (M && k)
448
465
  try {
449
- const d = await P.store.get(k);
466
+ const d = await M.store.get(k);
450
467
  if (d)
451
468
  return E(o, a, {
452
469
  ...d,
@@ -457,38 +474,38 @@ const Ce = (e) => {
457
474
  });
458
475
  } catch (d) {
459
476
  u.logger?.warn?.("ssr.cache.read.failed", {
460
- entryId: w.id,
461
- requestId: y.requestId,
477
+ entryId: g.id,
478
+ requestId: v.requestId,
462
479
  error: d instanceof Error ? d.message : "Unknown cache error"
463
480
  });
464
481
  }
465
- let L = await C(h, w.template, o.url || "/");
466
- if (w.kind === "spa")
482
+ let N = await C(m, g.template, o.url || "/");
483
+ if (g.kind === "spa")
467
484
  return E(o, a, {
468
485
  statusCode: 200,
469
- body: L,
486
+ body: N,
470
487
  headers: {
471
488
  "content-type": "text/html; charset=utf-8",
472
- "cache-control": w.cacheControl || "private, no-store",
489
+ "cache-control": g.cacheControl || "private, no-store",
473
490
  vary: "Host, X-Forwarded-Host",
474
- ...$
491
+ ...P
475
492
  }
476
493
  });
477
- const z = w.application;
478
- L = ue(
479
- L,
480
- w.mountSelector || z.mountSelector || "#app"
494
+ const O = g.application;
495
+ N = he(
496
+ N,
497
+ g.mountSelector || O.mountSelector || "#app"
481
498
  );
482
- const x = await ee(
483
- me(z, y),
499
+ const x = await te(
500
+ fe(O, v),
484
501
  u.requestTimeoutMs ?? 15e3,
485
- A
502
+ I
486
503
  );
487
504
  if (x.response.redirect) {
488
- const d = x.response.redirect, b = new URL(d.location, y.url);
505
+ const d = x.response.redirect, b = new URL(d.location, v.url);
489
506
  if (b.protocol !== "http:" && b.protocol !== "https:")
490
507
  throw new Error("SSR redirects must use HTTP or HTTPS.");
491
- if (!d.allowExternal && b.origin !== new URL(y.url).origin)
508
+ if (!d.allowExternal && b.origin !== new URL(v.url).origin)
492
509
  throw new Error("Cross-origin redirect requires allowExternal: true.");
493
510
  return E(o, a, {
494
511
  statusCode: d.statusCode ?? 302,
@@ -498,20 +515,20 @@ const Ce = (e) => {
498
515
  }
499
516
  });
500
517
  }
501
- const ne = he(L, {
502
- applicationId: z.id,
518
+ const ae = me(N, {
519
+ applicationId: O.id,
503
520
  html: x.html,
504
521
  teleports: x.teleports,
505
522
  head: x.head,
506
523
  state: x.hydrationState
507
524
  });
508
525
  u.onMetrics?.(x.metrics), u.logger?.info?.("ssr.render.complete", x.metrics);
509
- const O = {
526
+ const W = {
510
527
  statusCode: x.response.statusCode,
511
- body: ne,
528
+ body: ae,
512
529
  headers: {
513
530
  "content-type": "text/html; charset=utf-8",
514
- "cache-control": w.cacheControl || "private, no-store",
531
+ "cache-control": g.cacheControl || "private, no-store",
515
532
  vary: "Host, X-Forwarded-Host",
516
533
  "server-timing": [
517
534
  `context;dur=${x.metrics.contextDurationMs.toFixed(1)}`,
@@ -519,40 +536,40 @@ const Ce = (e) => {
519
536
  `render;dur=${x.metrics.renderDurationMs.toFixed(1)}`
520
537
  ].join(", "),
521
538
  ...x.response.headers,
522
- ...$
539
+ ...P
523
540
  }
524
541
  };
525
- if (P && k && Re(O, y, P))
542
+ if (M && k && Ce(W, v, M))
526
543
  try {
527
- await P.store.set(k, O, {
528
- ttlMs: P.ttlMs,
529
- tags: await P.tags?.(y)
544
+ await M.store.set(k, W, {
545
+ ttlMs: M.ttlMs,
546
+ tags: await M.tags?.(v)
530
547
  });
531
548
  } catch (d) {
532
549
  u.logger?.warn?.("ssr.cache.write.failed", {
533
- entryId: w.id,
534
- requestId: y.requestId,
550
+ entryId: g.id,
551
+ requestId: v.requestId,
535
552
  error: d instanceof Error ? d.message : "Unknown cache error"
536
553
  });
537
554
  }
538
- return E(o, a, O);
539
- } catch (h) {
540
- e.vite?.ssrFixStacktrace(h);
541
- const u = await v().catch(() => s);
555
+ return E(o, a, W);
556
+ } catch (m) {
557
+ e.vite?.ssrFixStacktrace(m);
558
+ const u = await p().catch(() => s);
542
559
  if (u.server.logger?.error?.("ssr.request.failed", {
543
560
  entryId: S,
544
- pathname: c,
545
- error: h instanceof Error ? h.message : "Unknown error"
561
+ pathname: l,
562
+ error: m instanceof Error ? m.message : "Unknown error"
546
563
  }), a.writableEnded) return;
547
564
  if (a.headersSent) return a.destroy();
548
- const M = h instanceof oe, H = M ? 504 : 500;
565
+ const A = m instanceof se, H = A ? 504 : 500;
549
566
  if (u.server.renderError)
550
567
  try {
551
568
  const R = await u.server.renderError({
552
- error: h,
553
- kind: M ? "timeout" : "internal",
569
+ error: m,
570
+ kind: A ? "timeout" : "internal",
554
571
  production: e.production,
555
- request: J,
572
+ request: F,
556
573
  entryId: S === "unknown" ? void 0 : S
557
574
  });
558
575
  if (R)
@@ -562,7 +579,7 @@ const Ce = (e) => {
562
579
  headers: {
563
580
  ...R.headers,
564
581
  "cache-control": "no-store",
565
- ...$
582
+ ...P
566
583
  }
567
584
  });
568
585
  } catch (R) {
@@ -571,39 +588,39 @@ const Ce = (e) => {
571
588
  error: R instanceof Error ? R.message : "Unknown error renderer failure"
572
589
  });
573
590
  }
574
- return I(o, c) ? E(o, a, {
591
+ return T(o, l) ? E(o, a, {
575
592
  statusCode: H,
576
- body: W(
577
- M ? "Request timed out" : "Application unavailable",
578
- e.production ? "The application could not render this page. Please try again." : h instanceof Error ? h.message : "Unknown rendering failure."
593
+ body: B(
594
+ A ? "Request timed out" : "Application unavailable",
595
+ e.production ? "The application could not render this page. Please try again." : m instanceof Error ? m.message : "Unknown rendering failure."
579
596
  ),
580
597
  headers: {
581
598
  "content-type": "text/html; charset=utf-8",
582
599
  "cache-control": "no-store",
583
- ...$
600
+ ...P
584
601
  }
585
- }) : T(o, a, H, {
602
+ }) : $(o, a, H, {
586
603
  status: "error",
587
604
  service: u.name
588
605
  });
589
606
  } finally {
590
- for (const h of V) h.stop();
607
+ for (const m of V) m.stop();
591
608
  }
592
609
  });
593
610
  return {
594
- nodeServer: g,
611
+ nodeServer: y,
595
612
  address: () => {
596
- const o = g.address();
613
+ const o = y.address();
597
614
  return {
598
- host: typeof o == "object" && o ? o.address : i,
615
+ host: typeof o == "object" && o ? o.address : c,
599
616
  port: typeof o == "object" && o ? o.port : n
600
617
  };
601
618
  },
602
619
  listen: () => new Promise((o, a) => {
603
- const p = (c) => a(c);
604
- g.once("error", p), g.listen(n, i, () => {
605
- g.off("error", p), r.logger?.info?.("ssr.server.listening", {
606
- host: i,
620
+ const h = (l) => a(l);
621
+ y.once("error", h), y.listen(n, c, () => {
622
+ y.off("error", h), r.logger?.info?.("ssr.server.listening", {
623
+ host: c,
607
624
  port: n,
608
625
  role: r.role || "default"
609
626
  }), o();
@@ -617,16 +634,16 @@ const Ce = (e) => {
617
634
  try {
618
635
  await Promise.race([
619
636
  Promise.all([
620
- new Promise((p, c) => {
621
- g.close(
622
- (S) => S ? c(S) : p()
637
+ new Promise((h, l) => {
638
+ y.close(
639
+ (S) => S ? l(S) : h()
623
640
  );
624
641
  }),
625
642
  e.vite?.close()
626
643
  ]),
627
- new Promise((p, c) => {
644
+ new Promise((h, l) => {
628
645
  a = setTimeout(() => {
629
- g.closeAllConnections?.(), c(new Error("SSR server graceful shutdown timed out."));
646
+ y.closeAllConnections?.(), l(new Error("SSR server graceful shutdown timed out."));
630
647
  }, o);
631
648
  })
632
649
  ]);
@@ -637,18 +654,18 @@ const Ce = (e) => {
637
654
  };
638
655
  };
639
656
  export {
640
- Le as a,
641
- we as b,
642
- Ne as c,
643
- Se as d,
644
- ye as e,
645
- xe as f,
646
- ve as g,
647
- pe as h,
648
- Re as i,
649
- Ee as j,
657
+ Ne as a,
658
+ ye as b,
659
+ Ue as c,
660
+ xe as d,
661
+ ve as e,
662
+ be as f,
663
+ Se as g,
664
+ we as h,
665
+ Ce as i,
666
+ Re as j,
650
667
  ge as m,
651
- N as n,
652
- me as r,
653
- _ as s
668
+ U as n,
669
+ fe as r,
670
+ G as s
654
671
  };
package/dist/cli.mjs CHANGED
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
  import { resolve as o, relative as p } from "node:path";
3
3
  import { pathToFileURL as f } from "node:url";
4
- import { c as w } from "./chunks/SsrServerRuntime-Cboc9aUP.mjs";
4
+ import { c as w } from "./chunks/SsrServerRuntime-3f0yAnNL.mjs";
5
5
  const i = (e, r) => {
6
6
  const t = e.indexOf(r);
7
7
  return t >= 0 ? e[t + 1] : void 0;
package/dist/client.mjs CHANGED
@@ -1,33 +1,44 @@
1
- import { c } from "./chunks/SsrApplicationRuntime-B-6cXN5-.mjs";
2
- import { g as d } from "./chunks/SsrSerialization-k-3aCFYt.mjs";
1
+ import { c as d } from "./chunks/SsrApplicationRuntime-lj5EmDGU.mjs";
2
+ import { g as h } from "./chunks/SsrSerialization-k-3aCFYt.mjs";
3
3
  const m = async (e, o = {}) => {
4
- const a = o.stateElementId ?? d(e.id), r = document.getElementById(a);
4
+ const s = o.stateElementId ?? h(e.id), r = document.getElementById(s);
5
5
  if (!r?.textContent)
6
- throw new Error(`SSR hydration state element "${a}" is missing.`);
7
- const n = JSON.parse(
6
+ throw new Error(`SSR hydration state element "${s}" is missing.`);
7
+ const a = JSON.parse(
8
8
  r.textContent
9
9
  );
10
- if (n.version !== 1)
10
+ if (a.version !== 1)
11
11
  throw new Error("Unsupported SSR hydration state version.");
12
- const s = new AbortController(), i = {
12
+ const l = new AbortController(), c = {
13
13
  requestId: `browser-${Date.now().toString(36)}`,
14
14
  url: window.location.href,
15
15
  host: window.location.host,
16
16
  protocol: window.location.protocol === "https:" ? "https" : "http",
17
17
  method: "GET",
18
18
  headers: {},
19
- publicConfig: n.publicConfig,
20
- signal: s.signal
21
- }, t = await c(e, {
22
- server: !1,
23
- request: i,
24
- hydrationState: n
25
- });
26
- t.router && (await t.router.push(
27
- `${window.location.pathname}${window.location.search}${window.location.hash}`
28
- ), await t.router.isReady()), document.head.querySelectorAll(
29
- o.removeHeadSelector ?? "[data-vue-ssr-lite-head]"
30
- ).forEach((l) => l.remove()), t.app.mount(o.mountSelector ?? e.mountSelector ?? "#app"), r.remove();
19
+ publicConfig: a.publicConfig,
20
+ signal: l.signal
21
+ };
22
+ let t;
23
+ try {
24
+ t = await d(e, {
25
+ server: !1,
26
+ request: c,
27
+ hydrationState: a
28
+ }), t.router && (await t.router.push(
29
+ `${window.location.pathname}${window.location.search}${window.location.hash}`
30
+ ), await t.router.isReady()), t.app.mount(o.mountSelector ?? e.mountSelector ?? "#app"), document.head.querySelectorAll(
31
+ o.removeHeadSelector ?? "[data-vue-ssr-lite-head]"
32
+ ).forEach((n) => n.remove()), r.remove();
33
+ } catch (n) {
34
+ l.abort();
35
+ try {
36
+ t?.apollo?.stop();
37
+ } catch (i) {
38
+ console.error("[vue-ssr-lite] hydration cleanup failed", i);
39
+ }
40
+ throw n;
41
+ }
31
42
  };
32
43
  export {
33
44
  m as hydrateSsrApplication
package/dist/index.mjs CHANGED
@@ -1,4 +1,4 @@
1
- import { S, c as i, u as n } from "./chunks/SsrApplicationRuntime-B-6cXN5-.mjs";
1
+ import { S, c as i, u as n } from "./chunks/SsrApplicationRuntime-lj5EmDGU.mjs";
2
2
  import { e as p, g as c, r as d, s as f, a as l } from "./chunks/SsrSerialization-k-3aCFYt.mjs";
3
3
  const s = (e) => e, t = (e) => e;
4
4
  export {
@@ -1 +1 @@
1
- {"version":3,"file":"SsrServerRuntime.d.ts","sourceRoot":"","sources":["../../src/server/SsrServerRuntime.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAA6C,MAAM,WAAW,CAAA;AAGnF,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,MAAM,CAAA;AA4BzC,MAAM,WAAW,uBAAuB;IACtC,UAAU,EAAE,OAAO,CAAA;IACnB,IAAI,EAAE,MAAM,CAAA;IACZ,WAAW,EAAE,MAAM,OAAO,CAAC,OAAO,CAAC,CAAA;IACnC,IAAI,CAAC,EAAE,aAAa,CAAA;CACrB;AAED,MAAM,WAAW,gBAAgB;IAC/B,UAAU,EAAE,UAAU,CAAC,OAAO,YAAY,CAAC,CAAA;IAC3C,MAAM,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAA;IAC3B,KAAK,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAA;IAC1B,OAAO,EAAE,MAAM;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,CAAA;CAC9C;AAgID,eAAO,MAAM,sBAAsB,GACjC,SAAS,uBAAuB,KAC/B,OAAO,CAAC,gBAAgB,CAqf1B,CAAA"}
1
+ {"version":3,"file":"SsrServerRuntime.d.ts","sourceRoot":"","sources":["../../src/server/SsrServerRuntime.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAA6C,MAAM,WAAW,CAAA;AAGnF,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,MAAM,CAAA;AA4BzC,MAAM,WAAW,uBAAuB;IACtC,UAAU,EAAE,OAAO,CAAA;IACnB,IAAI,EAAE,MAAM,CAAA;IACZ,WAAW,EAAE,MAAM,OAAO,CAAC,OAAO,CAAC,CAAA;IACnC,IAAI,CAAC,EAAE,aAAa,CAAA;CACrB;AAED,MAAM,WAAW,gBAAgB;IAC/B,UAAU,EAAE,UAAU,CAAC,OAAO,YAAY,CAAC,CAAA;IAC3C,MAAM,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAA;IAC3B,KAAK,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAA;IAC1B,OAAO,EAAE,MAAM;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,CAAA;CAC9C;AAgID,eAAO,MAAM,sBAAsB,GACjC,SAAS,uBAAuB,KAC/B,OAAO,CAAC,gBAAgB,CA4f1B,CAAA"}
package/dist/server.mjs CHANGED
@@ -1,4 +1,4 @@
1
- import { c as e, a, f as o, i as S, m as t, n, b as R, r as l, d as c, e as i, g as p, h as m, j as d, s as E } from "./chunks/SsrServerRuntime-Cboc9aUP.mjs";
1
+ import { c as e, a, f as o, i as S, m as t, n, b as R, r as l, d as c, e as i, g as p, h as m, j as d, s as E } from "./chunks/SsrServerRuntime-3f0yAnNL.mjs";
2
2
  import { S as A, a as _, b as M, c as v, i as P, p as T, r as h } from "./chunks/SsrHtmlRuntime-cTFsMSAZ.mjs";
3
3
  export {
4
4
  A as SSR_HEAD_MARKER,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vue-ssr-lite",
3
- "version": "0.1.2",
3
+ "version": "0.1.4",
4
4
  "description": "Fully managed Vue 3 SSR runtime with routing, Apollo hydration, Vite, and Node server lifecycle.",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -61,12 +61,13 @@
61
61
  "@vue/server-renderer": "^3.5.40",
62
62
  "graphql": "^16.12.0",
63
63
  "graphql-tag": "^2.12.6",
64
+ "jsdom": "^29.0.2",
64
65
  "typescript": "~5.9.3",
65
66
  "vite": "^7.3.6",
66
67
  "vite-plugin-dts": "^4.5.4",
67
68
  "vitest": "^4.1.5",
68
69
  "vue": "^3.5.40",
69
- "vue-apollo-client": "^1.2.2",
70
+ "vue-apollo-client": "^1.2.4",
70
71
  "vue-router": "^4.6.4"
71
72
  },
72
73
  "resolutions": {
@@ -1,61 +0,0 @@
1
- import { inject as R, ref as i, createSSRApp as v } from "vue";
2
- import { createRouter as f, createMemoryHistory as b, createWebHistory as w } from "vue-router";
3
- import { createApollo as x } from "vue-apollo-client";
4
- const q = /* @__PURE__ */ Symbol("vue-ssr-lite-request-context"), M = () => {
5
- const e = R(q);
6
- if (!e) throw new Error("vue-ssr-lite request context is not installed.");
7
- return e;
8
- }, A = async (e, t) => {
9
- if (!e?.id || !e.rootComponent)
10
- throw new Error("An SSR application requires an id and rootComponent.");
11
- if (t.hydrationState && t.hydrationState.applicationId !== e.id)
12
- throw new Error("Hydration state belongs to a different SSR application.");
13
- const u = typeof e.routes == "function" ? e.routes() : e.routes, s = u ? f({
14
- history: t.server ? b() : w(),
15
- routes: u,
16
- scrollBehavior(a, y, p) {
17
- if (p) return p;
18
- if (a.hash) return { el: a.hash, top: 24 };
19
- if (a.fullPath !== y.fullPath)
20
- return { left: 0, top: 0 };
21
- }
22
- }) : null, h = t.hydrationState?.application ?? e.createInitialState?.() ?? {}, S = {
23
- statusCode: 200,
24
- headers: {},
25
- redirect: null
26
- }, c = {
27
- request: t.request,
28
- url: new URL(t.request.url),
29
- host: t.request.host,
30
- publicConfig: t.request.publicConfig,
31
- state: h,
32
- head: i(null),
33
- response: S,
34
- apolloClients: null
35
- }, m = e.createExtension ? await e.createExtension(c) : void 0, o = { ...c, extension: m }, n = e.apollo ? typeof e.apollo == "function" ? await e.apollo({
36
- request: t.request,
37
- publicConfig: t.request.publicConfig,
38
- server: t.server
39
- }) : e.apollo : null, C = typeof e.apolloRequestTimeoutMs == "function" ? e.apolloRequestTimeoutMs(t.request.publicConfig) : e.apolloRequestTimeoutMs, r = n ? x(n, {
40
- server: t.server,
41
- registerGlobal: !t.server,
42
- headers: t.request.apolloHeaders,
43
- initialState: t.hydrationState?.apollo,
44
- signal: t.request.signal,
45
- requestTimeoutMs: C ?? t.request.apolloRequestTimeoutMs
46
- }) : null;
47
- o.apolloClients = r?.clients ?? null;
48
- const l = v(e.rootComponent);
49
- return s && l.use(s), r && l.use(r), l.provide(q, o), await e.install?.({
50
- app: l,
51
- router: s,
52
- context: o,
53
- apolloClients: r?.clients ?? null,
54
- server: t.server
55
- }), { app: l, router: s, context: o, apollo: r };
56
- };
57
- export {
58
- q as S,
59
- A as c,
60
- M as u
61
- };