@absolutejs/absolute 0.19.0-beta.271 → 0.19.0-beta.272
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/dist/angular/server.js +797 -0
- package/dist/angular/server.js.map +22 -0
- package/dist/react/server.js +385 -0
- package/dist/react/server.js.map +14 -0
- package/dist/src/angular/server.d.ts +1 -0
- package/dist/src/react/server.d.ts +1 -0
- package/dist/src/svelte/server.d.ts +1 -0
- package/dist/src/vue/server.d.ts +1 -0
- package/dist/svelte/server.js +455 -0
- package/dist/svelte/server.js.map +17 -0
- package/dist/vue/server.js +390 -0
- package/dist/vue/server.js.map +14 -0
- package/package.json +17 -1
|
@@ -0,0 +1,455 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
var __create = Object.create;
|
|
3
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
4
|
+
var __defProp = Object.defineProperty;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
7
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
+
function __accessProp(key) {
|
|
9
|
+
return this[key];
|
|
10
|
+
}
|
|
11
|
+
var __toESMCache_node;
|
|
12
|
+
var __toESMCache_esm;
|
|
13
|
+
var __toESM = (mod, isNodeMode, target) => {
|
|
14
|
+
var canCache = mod != null && typeof mod === "object";
|
|
15
|
+
if (canCache) {
|
|
16
|
+
var cache = isNodeMode ? __toESMCache_node ??= new WeakMap : __toESMCache_esm ??= new WeakMap;
|
|
17
|
+
var cached = cache.get(mod);
|
|
18
|
+
if (cached)
|
|
19
|
+
return cached;
|
|
20
|
+
}
|
|
21
|
+
target = mod != null ? __create(__getProtoOf(mod)) : {};
|
|
22
|
+
const to = isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target;
|
|
23
|
+
for (let key of __getOwnPropNames(mod))
|
|
24
|
+
if (!__hasOwnProp.call(to, key))
|
|
25
|
+
__defProp(to, key, {
|
|
26
|
+
get: __accessProp.bind(mod, key),
|
|
27
|
+
enumerable: true
|
|
28
|
+
});
|
|
29
|
+
if (canCache)
|
|
30
|
+
cache.set(mod, to);
|
|
31
|
+
return to;
|
|
32
|
+
};
|
|
33
|
+
var __toCommonJS = (from) => {
|
|
34
|
+
var entry = (__moduleCache ??= new WeakMap).get(from), desc;
|
|
35
|
+
if (entry)
|
|
36
|
+
return entry;
|
|
37
|
+
entry = __defProp({}, "__esModule", { value: true });
|
|
38
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
39
|
+
for (var key of __getOwnPropNames(from))
|
|
40
|
+
if (!__hasOwnProp.call(entry, key))
|
|
41
|
+
__defProp(entry, key, {
|
|
42
|
+
get: __accessProp.bind(from, key),
|
|
43
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
44
|
+
});
|
|
45
|
+
}
|
|
46
|
+
__moduleCache.set(from, entry);
|
|
47
|
+
return entry;
|
|
48
|
+
};
|
|
49
|
+
var __moduleCache;
|
|
50
|
+
var __commonJS = (cb, mod) => () => (mod || cb((mod = { exports: {} }).exports, mod), mod.exports);
|
|
51
|
+
var __returnValue = (v) => v;
|
|
52
|
+
function __exportSetter(name, newValue) {
|
|
53
|
+
this[name] = __returnValue.bind(null, newValue);
|
|
54
|
+
}
|
|
55
|
+
var __export = (target, all) => {
|
|
56
|
+
for (var name in all)
|
|
57
|
+
__defProp(target, name, {
|
|
58
|
+
get: all[name],
|
|
59
|
+
enumerable: true,
|
|
60
|
+
configurable: true,
|
|
61
|
+
set: __exportSetter.bind(all, name)
|
|
62
|
+
});
|
|
63
|
+
};
|
|
64
|
+
var __legacyDecorateClassTS = function(decorators, target, key, desc) {
|
|
65
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
66
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
|
|
67
|
+
r = Reflect.decorate(decorators, target, key, desc);
|
|
68
|
+
else
|
|
69
|
+
for (var i = decorators.length - 1;i >= 0; i--)
|
|
70
|
+
if (d = decorators[i])
|
|
71
|
+
r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
72
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
73
|
+
};
|
|
74
|
+
var __esm = (fn, res) => () => (fn && (res = fn(fn = 0)), res);
|
|
75
|
+
var __require = import.meta.require;
|
|
76
|
+
|
|
77
|
+
// src/utils/ssrErrorPage.ts
|
|
78
|
+
var ssrErrorPage = (framework, error) => {
|
|
79
|
+
const frameworkColors = {
|
|
80
|
+
angular: "#dd0031",
|
|
81
|
+
html: "#e34c26",
|
|
82
|
+
htmx: "#1a365d",
|
|
83
|
+
react: "#61dafb",
|
|
84
|
+
svelte: "#ff3e00",
|
|
85
|
+
vue: "#42b883"
|
|
86
|
+
};
|
|
87
|
+
const accent = frameworkColors[framework] ?? "#94a3b8";
|
|
88
|
+
const label = framework.charAt(0).toUpperCase() + framework.slice(1);
|
|
89
|
+
const message = error instanceof Error ? error.message : String(error);
|
|
90
|
+
return `<!DOCTYPE html>
|
|
91
|
+
<html>
|
|
92
|
+
<head>
|
|
93
|
+
<meta charset="utf-8">
|
|
94
|
+
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
95
|
+
<title>SSR Error - AbsoluteJS</title>
|
|
96
|
+
<style>
|
|
97
|
+
*{margin:0;padding:0;box-sizing:border-box}
|
|
98
|
+
body{min-height:100vh;background:linear-gradient(135deg,rgba(15,23,42,0.98) 0%,rgba(30,41,59,0.98) 100%);color:#e2e8f0;font-family:"JetBrains Mono","Fira Code",ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;font-size:14px;line-height:1.6;display:flex;align-items:flex-start;justify-content:center;padding:32px}
|
|
99
|
+
.card{max-width:720px;width:100%;background:rgba(30,41,59,0.6);border:1px solid rgba(71,85,105,0.5);border-radius:16px;box-shadow:0 25px 50px -12px rgba(0,0,0,0.5),0 0 0 1px rgba(255,255,255,0.05);overflow:hidden}
|
|
100
|
+
.header{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:20px 24px;background:rgba(15,23,42,0.5);border-bottom:1px solid rgba(71,85,105,0.4)}
|
|
101
|
+
.brand{font-weight:700;font-size:20px;color:#fff;letter-spacing:-0.02em}
|
|
102
|
+
.badge{padding:5px 10px;border-radius:8px;font-size:12px;font-weight:600;background:${accent};color:#fff;opacity:0.95;box-shadow:0 2px 4px rgba(0,0,0,0.2)}
|
|
103
|
+
.kind{color:#94a3b8;font-size:13px;font-weight:500}
|
|
104
|
+
.content{padding:24px}
|
|
105
|
+
.label{font-size:11px;font-weight:600;text-transform:uppercase;letter-spacing:0.08em;color:#94a3b8;margin-bottom:8px}
|
|
106
|
+
.message{margin:0;padding:16px 20px;background:rgba(239,68,68,0.12);border:1px solid rgba(239,68,68,0.25);border-radius:10px;overflow-x:auto;white-space:pre-wrap;word-break:break-word;color:#fca5a5;font-size:13px;line-height:1.5}
|
|
107
|
+
.hint{margin-top:20px;padding:12px 20px;background:rgba(71,85,105,0.3);border-radius:10px;border:1px solid rgba(71,85,105,0.4);color:#cbd5e1;font-size:13px}
|
|
108
|
+
</style>
|
|
109
|
+
</head>
|
|
110
|
+
<body>
|
|
111
|
+
<div class="card">
|
|
112
|
+
<div class="header">
|
|
113
|
+
<div style="display:flex;align-items:center;gap:12px">
|
|
114
|
+
<span class="brand">AbsoluteJS</span>
|
|
115
|
+
<span class="badge">${label}</span>
|
|
116
|
+
</div>
|
|
117
|
+
<span class="kind">Server Render Error</span>
|
|
118
|
+
</div>
|
|
119
|
+
<div class="content">
|
|
120
|
+
<div class="label">What went wrong</div>
|
|
121
|
+
<pre class="message">${message.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">")}</pre>
|
|
122
|
+
<div class="hint">A component threw during server-side rendering. Check the terminal for the full stack trace.</div>
|
|
123
|
+
</div>
|
|
124
|
+
</div>
|
|
125
|
+
</body>
|
|
126
|
+
</html>`;
|
|
127
|
+
};
|
|
128
|
+
|
|
129
|
+
// src/utils/stringModifiers.ts
|
|
130
|
+
var normalizeSlug = (str) => str.trim().replace(/\s+/g, "-").replace(/[^A-Za-z0-9\-_]+/g, "").replace(/[-_]{2,}/g, "-"), toKebab = (str) => normalizeSlug(str).replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase(), toPascal = (str) => {
|
|
131
|
+
if (!str.includes("-") && !str.includes("_")) {
|
|
132
|
+
return str.charAt(0).toUpperCase() + str.slice(1);
|
|
133
|
+
}
|
|
134
|
+
return normalizeSlug(str).split(/[-_]/).filter(Boolean).map((segment) => segment.charAt(0).toUpperCase() + segment.slice(1).toLowerCase()).join("");
|
|
135
|
+
}, toScreamingSnake = (str) => str.replace(/([a-z0-9])([A-Z])/g, "$1_$2").toUpperCase();
|
|
136
|
+
|
|
137
|
+
// src/utils/resolveConvention.ts
|
|
138
|
+
import { basename } from "path";
|
|
139
|
+
var CONVENTIONS_KEY = "__absoluteConventions", isConventionsMap = (value) => Boolean(value) && typeof value === "object", getMap = () => {
|
|
140
|
+
const value = Reflect.get(globalThis, CONVENTIONS_KEY);
|
|
141
|
+
if (isConventionsMap(value))
|
|
142
|
+
return value;
|
|
143
|
+
const empty = {};
|
|
144
|
+
return empty;
|
|
145
|
+
}, derivePageName = (pagePath) => {
|
|
146
|
+
const base = basename(pagePath);
|
|
147
|
+
const dotIndex = base.indexOf(".");
|
|
148
|
+
const name = dotIndex > 0 ? base.slice(0, dotIndex) : base;
|
|
149
|
+
return toPascal(name);
|
|
150
|
+
}, resolveErrorConventionPath = (framework, pageName) => {
|
|
151
|
+
const conventions = getMap()[framework];
|
|
152
|
+
if (!conventions)
|
|
153
|
+
return;
|
|
154
|
+
return conventions.pages?.[pageName]?.error ?? conventions.defaults?.error;
|
|
155
|
+
}, resolveNotFoundConventionPath = (framework) => getMap()[framework]?.defaults?.notFound, setConventions = (map) => {
|
|
156
|
+
Reflect.set(globalThis, CONVENTIONS_KEY, map);
|
|
157
|
+
}, isDev = () => true, buildErrorProps = (error) => {
|
|
158
|
+
const message = error instanceof Error ? error.message : String(error);
|
|
159
|
+
const stack = isDev() && error instanceof Error ? error.stack : undefined;
|
|
160
|
+
return { error: { message, stack } };
|
|
161
|
+
}, renderReactError = async (conventionPath, errorProps) => {
|
|
162
|
+
const { createElement } = await import("react");
|
|
163
|
+
const { renderToReadableStream } = await import("react-dom/server");
|
|
164
|
+
const mod = await import(conventionPath);
|
|
165
|
+
const [firstKey] = Object.keys(mod);
|
|
166
|
+
const ErrorComponent = mod.default ?? (firstKey ? mod[firstKey] : undefined);
|
|
167
|
+
const element = createElement(ErrorComponent, errorProps);
|
|
168
|
+
const stream = await renderToReadableStream(element);
|
|
169
|
+
return new Response(stream, {
|
|
170
|
+
headers: { "Content-Type": "text/html" },
|
|
171
|
+
status: 500
|
|
172
|
+
});
|
|
173
|
+
}, renderSvelteError = async (conventionPath, errorProps) => {
|
|
174
|
+
const { render } = await import("svelte/server");
|
|
175
|
+
const mod = await import(conventionPath);
|
|
176
|
+
const ErrorComponent = mod.default;
|
|
177
|
+
const { head, body } = render(ErrorComponent, {
|
|
178
|
+
props: errorProps
|
|
179
|
+
});
|
|
180
|
+
const html = `<!DOCTYPE html><html><head>${head}</head><body>${body}</body></html>`;
|
|
181
|
+
return new Response(html, {
|
|
182
|
+
headers: { "Content-Type": "text/html" },
|
|
183
|
+
status: 500
|
|
184
|
+
});
|
|
185
|
+
}, unescapeVueStyles = (ssrBody) => {
|
|
186
|
+
let styles = "";
|
|
187
|
+
const body = ssrBody.replace(/<style>([\s\S]*?)<\/style>/g, (_, css) => {
|
|
188
|
+
styles += `<style>${css.replace(/"/g, '"').replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">")}</style>`;
|
|
189
|
+
return "";
|
|
190
|
+
});
|
|
191
|
+
return { body, styles };
|
|
192
|
+
}, renderVueError = async (conventionPath, errorProps) => {
|
|
193
|
+
const { createSSRApp, h } = await import("vue");
|
|
194
|
+
const { renderToString } = await import("vue/server-renderer");
|
|
195
|
+
const mod = await import(conventionPath);
|
|
196
|
+
const ErrorComponent = mod.default;
|
|
197
|
+
const app = createSSRApp({
|
|
198
|
+
render: () => h(ErrorComponent, errorProps)
|
|
199
|
+
});
|
|
200
|
+
const rawBody = await renderToString(app);
|
|
201
|
+
const { styles, body } = unescapeVueStyles(rawBody);
|
|
202
|
+
const html = `<!DOCTYPE html><html><head>${styles}</head><body><div id="root">${body}</div></body></html>`;
|
|
203
|
+
return new Response(html, {
|
|
204
|
+
headers: { "Content-Type": "text/html" },
|
|
205
|
+
status: 500
|
|
206
|
+
});
|
|
207
|
+
}, renderAngularError = async (conventionPath, errorProps) => {
|
|
208
|
+
const mod = await import(conventionPath);
|
|
209
|
+
const renderError = mod.default ?? mod.renderError;
|
|
210
|
+
if (typeof renderError !== "function")
|
|
211
|
+
return null;
|
|
212
|
+
const html = renderError(errorProps);
|
|
213
|
+
return new Response(html, {
|
|
214
|
+
headers: { "Content-Type": "text/html" },
|
|
215
|
+
status: 500
|
|
216
|
+
});
|
|
217
|
+
}, logConventionRenderError = (framework, label, renderError) => {
|
|
218
|
+
const message = renderError instanceof Error ? renderError.message : "";
|
|
219
|
+
if (message.includes("Cannot find module") || message.includes("Cannot find package") || message.includes("not found in module")) {
|
|
220
|
+
console.error(`[SSR] Convention ${label} page for ${framework} failed: missing framework package. Ensure the ${framework} runtime is installed (e.g. bun add ${framework === "react" ? "react react-dom" : framework}).`);
|
|
221
|
+
return;
|
|
222
|
+
}
|
|
223
|
+
console.error(`[SSR] Failed to render ${framework} convention ${label} page:`, renderError);
|
|
224
|
+
}, ERROR_RENDERERS, renderConventionError = async (framework, pageName, error) => {
|
|
225
|
+
const conventionPath = resolveErrorConventionPath(framework, pageName);
|
|
226
|
+
if (!conventionPath)
|
|
227
|
+
return null;
|
|
228
|
+
const errorProps = buildErrorProps(error);
|
|
229
|
+
const renderer = ERROR_RENDERERS[framework];
|
|
230
|
+
if (!renderer)
|
|
231
|
+
return null;
|
|
232
|
+
try {
|
|
233
|
+
return await renderer(conventionPath, errorProps);
|
|
234
|
+
} catch (renderError) {
|
|
235
|
+
logConventionRenderError(framework, "error", renderError);
|
|
236
|
+
}
|
|
237
|
+
return null;
|
|
238
|
+
}, renderReactNotFound = async (conventionPath) => {
|
|
239
|
+
const { createElement } = await import("react");
|
|
240
|
+
const { renderToReadableStream } = await import("react-dom/server");
|
|
241
|
+
const mod = await import(conventionPath);
|
|
242
|
+
const [nfKey] = Object.keys(mod);
|
|
243
|
+
const NotFoundComponent = mod.default ?? (nfKey ? mod[nfKey] : undefined);
|
|
244
|
+
const element = createElement(NotFoundComponent);
|
|
245
|
+
const stream = await renderToReadableStream(element);
|
|
246
|
+
return new Response(stream, {
|
|
247
|
+
headers: { "Content-Type": "text/html" },
|
|
248
|
+
status: 404
|
|
249
|
+
});
|
|
250
|
+
}, renderSvelteNotFound = async (conventionPath) => {
|
|
251
|
+
const { render } = await import("svelte/server");
|
|
252
|
+
const mod = await import(conventionPath);
|
|
253
|
+
const NotFoundComponent = mod.default;
|
|
254
|
+
const { head, body } = render(NotFoundComponent);
|
|
255
|
+
const html = `<!DOCTYPE html><html><head>${head}</head><body>${body}</body></html>`;
|
|
256
|
+
return new Response(html, {
|
|
257
|
+
headers: { "Content-Type": "text/html" },
|
|
258
|
+
status: 404
|
|
259
|
+
});
|
|
260
|
+
}, renderVueNotFound = async (conventionPath) => {
|
|
261
|
+
const { createSSRApp, h } = await import("vue");
|
|
262
|
+
const { renderToString } = await import("vue/server-renderer");
|
|
263
|
+
const mod = await import(conventionPath);
|
|
264
|
+
const NotFoundComponent = mod.default;
|
|
265
|
+
const app = createSSRApp({
|
|
266
|
+
render: () => h(NotFoundComponent)
|
|
267
|
+
});
|
|
268
|
+
const rawBody = await renderToString(app);
|
|
269
|
+
const { styles, body } = unescapeVueStyles(rawBody);
|
|
270
|
+
const html = `<!DOCTYPE html><html><head>${styles}</head><body><div id="root">${body}</div></body></html>`;
|
|
271
|
+
return new Response(html, {
|
|
272
|
+
headers: { "Content-Type": "text/html" },
|
|
273
|
+
status: 404
|
|
274
|
+
});
|
|
275
|
+
}, renderAngularNotFound = async (conventionPath) => {
|
|
276
|
+
const mod = await import(conventionPath);
|
|
277
|
+
const renderNotFound = mod.default ?? mod.renderNotFound;
|
|
278
|
+
if (typeof renderNotFound !== "function")
|
|
279
|
+
return null;
|
|
280
|
+
const html = renderNotFound();
|
|
281
|
+
return new Response(html, {
|
|
282
|
+
headers: { "Content-Type": "text/html" },
|
|
283
|
+
status: 404
|
|
284
|
+
});
|
|
285
|
+
}, NOT_FOUND_RENDERERS, renderConventionNotFound = async (framework) => {
|
|
286
|
+
const conventionPath = resolveNotFoundConventionPath(framework);
|
|
287
|
+
if (!conventionPath)
|
|
288
|
+
return null;
|
|
289
|
+
const renderer = NOT_FOUND_RENDERERS[framework];
|
|
290
|
+
if (!renderer)
|
|
291
|
+
return null;
|
|
292
|
+
try {
|
|
293
|
+
return await renderer(conventionPath);
|
|
294
|
+
} catch (renderError) {
|
|
295
|
+
logConventionRenderError(framework, "not-found", renderError);
|
|
296
|
+
}
|
|
297
|
+
return null;
|
|
298
|
+
}, NOT_FOUND_PRIORITY, renderFirstNotFound = async () => {
|
|
299
|
+
for (const framework of NOT_FOUND_PRIORITY) {
|
|
300
|
+
if (!getMap()[framework]?.defaults?.notFound)
|
|
301
|
+
continue;
|
|
302
|
+
const response = await renderConventionNotFound(framework);
|
|
303
|
+
if (response)
|
|
304
|
+
return response;
|
|
305
|
+
}
|
|
306
|
+
return null;
|
|
307
|
+
};
|
|
308
|
+
var init_resolveConvention = __esm(() => {
|
|
309
|
+
ERROR_RENDERERS = {
|
|
310
|
+
angular: renderAngularError,
|
|
311
|
+
react: renderReactError,
|
|
312
|
+
svelte: renderSvelteError,
|
|
313
|
+
vue: renderVueError
|
|
314
|
+
};
|
|
315
|
+
NOT_FOUND_RENDERERS = {
|
|
316
|
+
angular: renderAngularNotFound,
|
|
317
|
+
react: renderReactNotFound,
|
|
318
|
+
svelte: renderSvelteNotFound,
|
|
319
|
+
vue: renderVueNotFound
|
|
320
|
+
};
|
|
321
|
+
NOT_FOUND_PRIORITY = [
|
|
322
|
+
"react",
|
|
323
|
+
"svelte",
|
|
324
|
+
"vue",
|
|
325
|
+
"angular"
|
|
326
|
+
];
|
|
327
|
+
});
|
|
328
|
+
|
|
329
|
+
// src/constants.ts
|
|
330
|
+
var ANGULAR_INIT_TIMEOUT_MS = 500, ANSI_ESCAPE_LENGTH = 3, ASCII_SPACE = 32, BASE_36_RADIX = 36, BUN_BUILD_WARNING_SUPPRESSION = "wildcard sideEffects are not supported yet", BODY_SLICE_LENGTH = 2000, BYTES_PER_KILOBYTE = 1024, CLI_ARGS_OFFSET = 3, CSS_ERROR_RESOLVE_DELAY_MS = 50, CSS_MAX_CHECK_ATTEMPTS = 10, CSS_MAX_PARSE_TIMEOUT_MS = 500, CSS_SHEET_READY_TIMEOUT_MS = 100, DEFAULT_CHUNK_SIZE = 16384, DEFAULT_DEBOUNCE_MS = 15, DEFAULT_PORT = 3000, DEV_SERVER_RESTART_DEBOUNCE_MS = 100, DOM_UPDATE_DELAY_MS = 50, FILE_PROTOCOL_PREFIX_LENGTH = 7, FOCUS_ID_PREFIX_LENGTH = 3, FOCUS_IDX_PREFIX_LENGTH = 4, FOCUS_NAME_PREFIX_LENGTH = 5, HMR_UPDATE_TIMEOUT_MS = 2000, HOOK_SIGNATURE_LENGTH = 12, HOURS_IN_DAY = 24, HOURS_IN_HALF_DAY = 12, MAX_ERROR_LENGTH = 200, MAX_RECONNECT_ATTEMPTS = 60, MILLISECONDS_IN_A_SECOND = 1000, MINUTES_IN_AN_HOUR = 60, SECONDS_IN_A_MINUTE = 60, MILLISECONDS_IN_A_MINUTE, MILLISECONDS_IN_A_DAY, OVERLAY_FADE_DURATION_MS = 150, PING_INTERVAL_MS = 30000, RAF_BATCH_COUNT = 3, RANDOM_ID_END_INDEX = 11, REBUILD_BATCH_DELAY_MS = 10, REBUILD_RELOAD_DELAY_MS = 200, RECONNECT_INITIAL_DELAY_MS = 500, RECONNECT_POLL_INTERVAL_MS = 300, SIGINT_EXIT_CODE = 130, SIGTERM_EXIT_CODE = 143, SVELTE_CSS_LOAD_TIMEOUT_MS = 500, TIME_PRECISION = 2, TWO_THIRDS, UNFOUND_INDEX = -1, WEBSOCKET_NORMAL_CLOSURE = 1000;
|
|
331
|
+
var init_constants = __esm(() => {
|
|
332
|
+
MILLISECONDS_IN_A_MINUTE = MILLISECONDS_IN_A_SECOND * SECONDS_IN_A_MINUTE;
|
|
333
|
+
MILLISECONDS_IN_A_DAY = MILLISECONDS_IN_A_SECOND * SECONDS_IN_A_MINUTE * MINUTES_IN_AN_HOUR * HOURS_IN_DAY;
|
|
334
|
+
TWO_THIRDS = 2 / 3;
|
|
335
|
+
});
|
|
336
|
+
|
|
337
|
+
// src/utils/escapeScriptContent.ts
|
|
338
|
+
var ESCAPE_LOOKUP, ESCAPE_REGEX, escapeScriptContent = (content) => content.replace(ESCAPE_REGEX, (char) => {
|
|
339
|
+
const escaped = ESCAPE_LOOKUP[char];
|
|
340
|
+
return escaped !== undefined ? escaped : char;
|
|
341
|
+
});
|
|
342
|
+
var init_escapeScriptContent = __esm(() => {
|
|
343
|
+
ESCAPE_LOOKUP = {
|
|
344
|
+
"\u2028": "\\u2028",
|
|
345
|
+
"\u2029": "\\u2029",
|
|
346
|
+
"&": "\\u0026",
|
|
347
|
+
"<": "\\u003C",
|
|
348
|
+
">": "\\u003E"
|
|
349
|
+
};
|
|
350
|
+
ESCAPE_REGEX = /[&><\u2028\u2029]/g;
|
|
351
|
+
});
|
|
352
|
+
|
|
353
|
+
// src/svelte/renderToReadableStream.ts
|
|
354
|
+
var exports_renderToReadableStream = {};
|
|
355
|
+
__export(exports_renderToReadableStream, {
|
|
356
|
+
renderToReadableStream: () => renderToReadableStream
|
|
357
|
+
});
|
|
358
|
+
var renderToReadableStream = async (component, props, {
|
|
359
|
+
bootstrapScriptContent,
|
|
360
|
+
bootstrapScripts = [],
|
|
361
|
+
bootstrapModules = [],
|
|
362
|
+
nonce,
|
|
363
|
+
onError = console.error,
|
|
364
|
+
progressiveChunkSize = DEFAULT_CHUNK_SIZE,
|
|
365
|
+
signal,
|
|
366
|
+
headContent,
|
|
367
|
+
bodyContent
|
|
368
|
+
} = {}) => {
|
|
369
|
+
try {
|
|
370
|
+
const { render } = await import("svelte/server");
|
|
371
|
+
const { head: rawHead, body } = typeof props === "undefined" ? render(component) : render(component, { props });
|
|
372
|
+
const head = rawHead.replace(/(<!--[a-z0-9]+-->)([\s\S]*?)(<!---->)\s*(<title>[\s\S]*?<\/title>)/, "$1$4$2$3");
|
|
373
|
+
const nonceAttr = nonce ? ` nonce="${nonce}"` : "";
|
|
374
|
+
const scripts = (bootstrapScriptContent ? `<script${nonceAttr}>${escapeScriptContent(bootstrapScriptContent)}</script>` : "") + bootstrapScripts.map((src) => `<script${nonceAttr} src="${src}"></script>`).join("") + bootstrapModules.map((src) => `<script${nonceAttr} type="module" src="${src}"></script>`).join("");
|
|
375
|
+
const encoder = new TextEncoder;
|
|
376
|
+
const full = encoder.encode(`<!DOCTYPE html><html lang="en"><head>${head}${headContent ?? ""}</head><body>${body}${scripts}${bodyContent ?? ""}</body></html>`);
|
|
377
|
+
let offset = 0;
|
|
378
|
+
return new ReadableStream({
|
|
379
|
+
type: "bytes",
|
|
380
|
+
cancel(reason) {
|
|
381
|
+
onError?.(reason);
|
|
382
|
+
},
|
|
383
|
+
pull(controller) {
|
|
384
|
+
if (signal?.aborted) {
|
|
385
|
+
controller.close();
|
|
386
|
+
return;
|
|
387
|
+
}
|
|
388
|
+
if (offset >= full.length) {
|
|
389
|
+
controller.close();
|
|
390
|
+
return;
|
|
391
|
+
}
|
|
392
|
+
const end = Math.min(offset + progressiveChunkSize, full.length);
|
|
393
|
+
controller.enqueue(full.subarray(offset, end));
|
|
394
|
+
offset = end;
|
|
395
|
+
}
|
|
396
|
+
});
|
|
397
|
+
} catch (error) {
|
|
398
|
+
onError?.(error);
|
|
399
|
+
throw error;
|
|
400
|
+
}
|
|
401
|
+
};
|
|
402
|
+
var init_renderToReadableStream = __esm(() => {
|
|
403
|
+
init_constants();
|
|
404
|
+
init_escapeScriptContent();
|
|
405
|
+
});
|
|
406
|
+
|
|
407
|
+
// src/svelte/pageHandler.ts
|
|
408
|
+
var ssrDirty = false, buildDirtyResponse = (indexPath, props) => {
|
|
409
|
+
const propsScript = `window.__INITIAL_PROPS__=${JSON.stringify(props)};`;
|
|
410
|
+
const dirtyFlag = "window.__SSR_DIRTY__=true;";
|
|
411
|
+
const scriptTag = indexPath ? `<script type="module" src="${indexPath}"></script>` : "";
|
|
412
|
+
const html = `<!DOCTYPE html><html><head></head><body><script>${propsScript}${dirtyFlag}</script>${scriptTag}</body></html>`;
|
|
413
|
+
return new Response(html, {
|
|
414
|
+
headers: { "Content-Type": "text/html" }
|
|
415
|
+
});
|
|
416
|
+
}, handleSveltePageRequest = async (_PageComponent, pagePath, indexPath, props) => {
|
|
417
|
+
if (ssrDirty) {
|
|
418
|
+
return buildDirtyResponse(indexPath, props);
|
|
419
|
+
}
|
|
420
|
+
try {
|
|
421
|
+
const { default: ImportedPageComponent } = await import(pagePath);
|
|
422
|
+
const { renderToReadableStream: renderToReadableStream2 } = await Promise.resolve().then(() => (init_renderToReadableStream(), exports_renderToReadableStream));
|
|
423
|
+
const stream = await renderToReadableStream2(ImportedPageComponent, props, {
|
|
424
|
+
bootstrapModules: indexPath ? [indexPath] : [],
|
|
425
|
+
bootstrapScriptContent: `window.__INITIAL_PROPS__=${JSON.stringify(props)}`
|
|
426
|
+
});
|
|
427
|
+
return new Response(stream, {
|
|
428
|
+
headers: { "Content-Type": "text/html" }
|
|
429
|
+
});
|
|
430
|
+
} catch (error) {
|
|
431
|
+
console.error("[SSR] Svelte render error:", error);
|
|
432
|
+
const pageName = derivePageName(pagePath);
|
|
433
|
+
const conventionResponse = await renderConventionError("svelte", pageName, error);
|
|
434
|
+
if (conventionResponse)
|
|
435
|
+
return conventionResponse;
|
|
436
|
+
return new Response(ssrErrorPage("svelte", error), {
|
|
437
|
+
headers: { "Content-Type": "text/html" },
|
|
438
|
+
status: 500
|
|
439
|
+
});
|
|
440
|
+
}
|
|
441
|
+
}, invalidateSvelteSsrCache = () => {
|
|
442
|
+
ssrDirty = true;
|
|
443
|
+
};
|
|
444
|
+
var init_pageHandler = __esm(() => {
|
|
445
|
+
init_resolveConvention();
|
|
446
|
+
});
|
|
447
|
+
|
|
448
|
+
// src/svelte/server.ts
|
|
449
|
+
init_pageHandler();
|
|
450
|
+
export {
|
|
451
|
+
handleSveltePageRequest
|
|
452
|
+
};
|
|
453
|
+
|
|
454
|
+
//# debugId=28503CAD758DCD2D64756E2164756E21
|
|
455
|
+
//# sourceMappingURL=server.js.map
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../src/utils/ssrErrorPage.ts", "../src/utils/stringModifiers.ts", "../src/utils/resolveConvention.ts", "../src/constants.ts", "../src/utils/escapeScriptContent.ts", "../src/svelte/renderToReadableStream.ts", "../src/svelte/pageHandler.ts", "../src/svelte/server.ts"],
|
|
4
|
+
"sourcesContent": [
|
|
5
|
+
"export const ssrErrorPage = (framework: string, error: unknown) => {\n\tconst frameworkColors: Record<string, string> = {\n\t\tangular: '#dd0031',\n\t\thtml: '#e34c26',\n\t\thtmx: '#1a365d',\n\t\treact: '#61dafb',\n\t\tsvelte: '#ff3e00',\n\t\tvue: '#42b883'\n\t};\n\n\tconst accent = frameworkColors[framework] ?? '#94a3b8';\n\tconst label = framework.charAt(0).toUpperCase() + framework.slice(1);\n\tconst message = error instanceof Error ? error.message : String(error);\n\n\treturn `<!DOCTYPE html>\n<html>\n<head>\n<meta charset=\"utf-8\">\n<meta name=\"viewport\" content=\"width=device-width, initial-scale=1\">\n<title>SSR Error - AbsoluteJS</title>\n<style>\n*{margin:0;padding:0;box-sizing:border-box}\nbody{min-height:100vh;background:linear-gradient(135deg,rgba(15,23,42,0.98) 0%,rgba(30,41,59,0.98) 100%);color:#e2e8f0;font-family:\"JetBrains Mono\",\"Fira Code\",ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;font-size:14px;line-height:1.6;display:flex;align-items:flex-start;justify-content:center;padding:32px}\n.card{max-width:720px;width:100%;background:rgba(30,41,59,0.6);border:1px solid rgba(71,85,105,0.5);border-radius:16px;box-shadow:0 25px 50px -12px rgba(0,0,0,0.5),0 0 0 1px rgba(255,255,255,0.05);overflow:hidden}\n.header{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:20px 24px;background:rgba(15,23,42,0.5);border-bottom:1px solid rgba(71,85,105,0.4)}\n.brand{font-weight:700;font-size:20px;color:#fff;letter-spacing:-0.02em}\n.badge{padding:5px 10px;border-radius:8px;font-size:12px;font-weight:600;background:${accent};color:#fff;opacity:0.95;box-shadow:0 2px 4px rgba(0,0,0,0.2)}\n.kind{color:#94a3b8;font-size:13px;font-weight:500}\n.content{padding:24px}\n.label{font-size:11px;font-weight:600;text-transform:uppercase;letter-spacing:0.08em;color:#94a3b8;margin-bottom:8px}\n.message{margin:0;padding:16px 20px;background:rgba(239,68,68,0.12);border:1px solid rgba(239,68,68,0.25);border-radius:10px;overflow-x:auto;white-space:pre-wrap;word-break:break-word;color:#fca5a5;font-size:13px;line-height:1.5}\n.hint{margin-top:20px;padding:12px 20px;background:rgba(71,85,105,0.3);border-radius:10px;border:1px solid rgba(71,85,105,0.4);color:#cbd5e1;font-size:13px}\n</style>\n</head>\n<body>\n<div class=\"card\">\n<div class=\"header\">\n<div style=\"display:flex;align-items:center;gap:12px\">\n<span class=\"brand\">AbsoluteJS</span>\n<span class=\"badge\">${label}</span>\n</div>\n<span class=\"kind\">Server Render Error</span>\n</div>\n<div class=\"content\">\n<div class=\"label\">What went wrong</div>\n<pre class=\"message\">${message.replace(/&/g, '&').replace(/</g, '<').replace(/>/g, '>')}</pre>\n<div class=\"hint\">A component threw during server-side rendering. Check the terminal for the full stack trace.</div>\n</div>\n</div>\n</body>\n</html>`;\n};\n",
|
|
6
|
+
"const normalizeSlug = (str: string) =>\n\tstr\n\t\t.trim()\n\t\t.replace(/\\s+/g, '-')\n\t\t.replace(/[^A-Za-z0-9\\-_]+/g, '')\n\t\t.replace(/[-_]{2,}/g, '-');\n\nexport const toKebab = (str: string) =>\n\tnormalizeSlug(str)\n\t\t.replace(/([a-z0-9])([A-Z])/g, '$1-$2')\n\t\t.toLowerCase();\nexport const toPascal = (str: string) => {\n\tif (!str.includes('-') && !str.includes('_')) {\n\t\treturn str.charAt(0).toUpperCase() + str.slice(1);\n\t}\n\n\treturn normalizeSlug(str)\n\t\t.split(/[-_]/)\n\t\t.filter(Boolean)\n\t\t.map(\n\t\t\t(segment) =>\n\t\t\t\tsegment.charAt(0).toUpperCase() + segment.slice(1).toLowerCase()\n\t\t)\n\t\t.join('');\n};\nexport const toScreamingSnake = (str: string) =>\n\tstr.replace(/([a-z0-9])([A-Z])/g, '$1_$2').toUpperCase();\n",
|
|
7
|
+
"import { basename } from 'node:path';\nimport type { ConventionsMap } from '../../types/conventions';\nimport { toPascal } from './stringModifiers';\n\n// Use globalThis so the conventions map is shared across all bundles.\n// The main bundle (dist/index.js) calls setConventions, but framework\n// bundles (dist/svelte/index.js, etc.) need to read the same map.\nconst CONVENTIONS_KEY = '__absoluteConventions';\n\nconst isConventionsMap = (value: unknown): value is ConventionsMap =>\n\tBoolean(value) && typeof value === 'object';\n\nconst getMap = () => {\n\tconst value: unknown = Reflect.get(globalThis, CONVENTIONS_KEY);\n\tif (isConventionsMap(value)) return value;\n\n\tconst empty: ConventionsMap = {};\n\n\treturn empty;\n};\n\nexport const derivePageName = (pagePath: string) => {\n\tconst base = basename(pagePath);\n\t// Strip hash and extension: \"SvelteExample.abc123.js\" → \"SvelteExample\"\n\tconst dotIndex = base.indexOf('.');\n\tconst name = dotIndex > 0 ? base.slice(0, dotIndex) : base;\n\n\treturn toPascal(name);\n};\nexport const getConventions = () => getMap();\nexport const resolveErrorConventionPath = (\n\tframework: keyof ConventionsMap,\n\tpageName: string\n) => {\n\tconst conventions = getMap()[framework];\n\tif (!conventions) return undefined;\n\n\treturn conventions.pages?.[pageName]?.error ?? conventions.defaults?.error;\n};\nexport const resolveNotFoundConventionPath = (\n\tframework: keyof ConventionsMap\n) => getMap()[framework]?.defaults?.notFound;\nexport const setConventions = (map: ConventionsMap) => {\n\tReflect.set(globalThis, CONVENTIONS_KEY, map);\n};\n\nconst isDev = () => process.env.NODE_ENV === 'development';\n\nconst buildErrorProps = (error: unknown) => {\n\tconst message = error instanceof Error ? error.message : String(error);\n\tconst stack = isDev() && error instanceof Error ? error.stack : undefined;\n\n\treturn { error: { message, stack } };\n};\n\nconst renderReactError = async (\n\tconventionPath: string,\n\terrorProps: ReturnType<typeof buildErrorProps>\n) => {\n\tconst { createElement } = await import('react');\n\tconst { renderToReadableStream } = await import('react-dom/server');\n\tconst mod = await import(conventionPath);\n\tconst [firstKey] = Object.keys(mod);\n\tconst ErrorComponent =\n\t\tmod.default ?? (firstKey ? mod[firstKey] : undefined);\n\tconst element = createElement(ErrorComponent, errorProps);\n\tconst stream = await renderToReadableStream(element);\n\n\treturn new Response(stream, {\n\t\theaders: { 'Content-Type': 'text/html' },\n\t\tstatus: 500\n\t});\n};\n\nconst renderSvelteError = async (\n\tconventionPath: string,\n\terrorProps: ReturnType<typeof buildErrorProps>\n) => {\n\tconst { render } = await import('svelte/server');\n\tconst mod = await import(conventionPath);\n\tconst ErrorComponent = mod.default;\n\tconst { head, body } = render(ErrorComponent, {\n\t\tprops: errorProps\n\t});\n\tconst html = `<!DOCTYPE html><html><head>${head}</head><body>${body}</body></html>`;\n\n\treturn new Response(html, {\n\t\theaders: { 'Content-Type': 'text/html' },\n\t\tstatus: 500\n\t});\n};\n\nconst unescapeVueStyles = (ssrBody: string) => {\n\tlet styles = '';\n\tconst body = ssrBody.replace(\n\t\t/<style>([\\s\\S]*?)<\\/style>/g,\n\t\t(_, css: string) => {\n\t\t\tstyles += `<style>${css\n\t\t\t\t.replace(/"/g, '\"')\n\t\t\t\t.replace(/&/g, '&')\n\t\t\t\t.replace(/</g, '<')\n\t\t\t\t.replace(/>/g, '>')}</style>`;\n\n\t\t\treturn '';\n\t\t}\n\t);\n\n\treturn { body, styles };\n};\n\nconst renderVueError = async (\n\tconventionPath: string,\n\terrorProps: ReturnType<typeof buildErrorProps>\n) => {\n\tconst { createSSRApp, h } = await import('vue');\n\tconst { renderToString } = await import('vue/server-renderer');\n\tconst mod = await import(conventionPath);\n\tconst ErrorComponent = mod.default;\n\tconst app = createSSRApp({\n\t\trender: () => h(ErrorComponent, errorProps)\n\t});\n\tconst rawBody = await renderToString(app);\n\n\t// Vue SSR escapes quotes inside <component is=\"style\"> tags.\n\t// Extract style content, unescape it, and move to <head>.\n\tconst { styles, body } = unescapeVueStyles(rawBody);\n\tconst html = `<!DOCTYPE html><html><head>${styles}</head><body><div id=\"root\">${body}</div></body></html>`;\n\n\treturn new Response(html, {\n\t\theaders: { 'Content-Type': 'text/html' },\n\t\tstatus: 500\n\t});\n};\n\nconst renderAngularError = async (\n\tconventionPath: string,\n\terrorProps: ReturnType<typeof buildErrorProps>\n) => {\n\t// Angular error pages are rendered as plain HTML templates\n\t// since the full Angular SSR pipeline is too heavy for error pages\n\tconst mod = await import(conventionPath);\n\tconst renderError = mod.default ?? mod.renderError;\n\tif (typeof renderError !== 'function') return null;\n\n\tconst html = renderError(errorProps);\n\n\treturn new Response(html, {\n\t\theaders: { 'Content-Type': 'text/html' },\n\t\tstatus: 500\n\t});\n};\n\nconst logConventionRenderError = (\n\tframework: keyof ConventionsMap,\n\tlabel: string,\n\trenderError: unknown\n) => {\n\tconst message = renderError instanceof Error ? renderError.message : '';\n\tif (\n\t\tmessage.includes('Cannot find module') ||\n\t\tmessage.includes('Cannot find package') ||\n\t\tmessage.includes('not found in module')\n\t) {\n\t\tconsole.error(\n\t\t\t`[SSR] Convention ${label} page for ${framework} failed: missing framework package. ` +\n\t\t\t\t`Ensure the ${framework} runtime is installed (e.g. bun add ${framework === 'react' ? 'react react-dom' : framework}).`\n\t\t);\n\n\t\treturn;\n\t}\n\n\tconsole.error(\n\t\t`[SSR] Failed to render ${framework} convention ${label} page:`,\n\t\trenderError\n\t);\n};\n\nconst ERROR_RENDERERS: Record<\n\tkeyof ConventionsMap,\n\t(\n\t\tconventionPath: string,\n\t\terrorProps: ReturnType<typeof buildErrorProps>\n\t) => Promise<Response | null>\n> = {\n\tangular: renderAngularError,\n\treact: renderReactError,\n\tsvelte: renderSvelteError,\n\tvue: renderVueError\n};\n\nexport const renderConventionError = async (\n\tframework: keyof ConventionsMap,\n\tpageName: string,\n\terror: unknown\n) => {\n\tconst conventionPath = resolveErrorConventionPath(framework, pageName);\n\tif (!conventionPath) return null;\n\n\tconst errorProps = buildErrorProps(error);\n\tconst renderer = ERROR_RENDERERS[framework];\n\tif (!renderer) return null;\n\n\ttry {\n\t\treturn await renderer(conventionPath, errorProps);\n\t} catch (renderError) {\n\t\tlogConventionRenderError(framework, 'error', renderError);\n\t}\n\n\treturn null;\n};\n\nconst renderReactNotFound = async (conventionPath: string) => {\n\tconst { createElement } = await import('react');\n\tconst { renderToReadableStream } = await import('react-dom/server');\n\tconst mod = await import(conventionPath);\n\tconst [nfKey] = Object.keys(mod);\n\tconst NotFoundComponent = mod.default ?? (nfKey ? mod[nfKey] : undefined);\n\tconst element = createElement(NotFoundComponent);\n\tconst stream = await renderToReadableStream(element);\n\n\treturn new Response(stream, {\n\t\theaders: { 'Content-Type': 'text/html' },\n\t\tstatus: 404\n\t});\n};\n\nconst renderSvelteNotFound = async (conventionPath: string) => {\n\tconst { render } = await import('svelte/server');\n\tconst mod = await import(conventionPath);\n\tconst NotFoundComponent = mod.default;\n\tconst { head, body } = render(NotFoundComponent);\n\tconst html = `<!DOCTYPE html><html><head>${head}</head><body>${body}</body></html>`;\n\n\treturn new Response(html, {\n\t\theaders: { 'Content-Type': 'text/html' },\n\t\tstatus: 404\n\t});\n};\n\nconst renderVueNotFound = async (conventionPath: string) => {\n\tconst { createSSRApp, h } = await import('vue');\n\tconst { renderToString } = await import('vue/server-renderer');\n\tconst mod = await import(conventionPath);\n\tconst NotFoundComponent = mod.default;\n\tconst app = createSSRApp({\n\t\trender: () => h(NotFoundComponent)\n\t});\n\tconst rawBody = await renderToString(app);\n\n\tconst { styles, body } = unescapeVueStyles(rawBody);\n\tconst html = `<!DOCTYPE html><html><head>${styles}</head><body><div id=\"root\">${body}</div></body></html>`;\n\n\treturn new Response(html, {\n\t\theaders: { 'Content-Type': 'text/html' },\n\t\tstatus: 404\n\t});\n};\n\nconst renderAngularNotFound = async (conventionPath: string) => {\n\tconst mod = await import(conventionPath);\n\tconst renderNotFound = mod.default ?? mod.renderNotFound;\n\tif (typeof renderNotFound !== 'function') return null;\n\n\tconst html = renderNotFound();\n\n\treturn new Response(html, {\n\t\theaders: { 'Content-Type': 'text/html' },\n\t\tstatus: 404\n\t});\n};\n\nconst NOT_FOUND_RENDERERS: Record<\n\tkeyof ConventionsMap,\n\t(conventionPath: string) => Promise<Response | null>\n> = {\n\tangular: renderAngularNotFound,\n\treact: renderReactNotFound,\n\tsvelte: renderSvelteNotFound,\n\tvue: renderVueNotFound\n};\n\nexport const renderConventionNotFound = async (\n\tframework: keyof ConventionsMap\n) => {\n\tconst conventionPath = resolveNotFoundConventionPath(framework);\n\tif (!conventionPath) return null;\n\n\tconst renderer = NOT_FOUND_RENDERERS[framework];\n\tif (!renderer) return null;\n\n\ttry {\n\t\treturn await renderer(conventionPath);\n\t} catch (renderError) {\n\t\tlogConventionRenderError(framework, 'not-found', renderError);\n\t}\n\n\treturn null;\n};\n\nconst NOT_FOUND_PRIORITY: (keyof ConventionsMap)[] = [\n\t'react',\n\t'svelte',\n\t'vue',\n\t'angular'\n];\n\nexport const renderFirstNotFound = async () => {\n\tfor (const framework of NOT_FOUND_PRIORITY) {\n\t\tif (!getMap()[framework]?.defaults?.notFound) continue;\n\t\t// eslint-disable-next-line no-await-in-loop -- frameworks must be tried sequentially; first match wins\n\t\tconst response = await renderConventionNotFound(framework);\n\t\tif (response) return response;\n\t}\n\n\treturn null;\n};\n",
|
|
8
|
+
"export const ANGULAR_INIT_TIMEOUT_MS = 500;\nexport const ANSI_ESCAPE_LENGTH = 3;\nexport const ASCII_SPACE = 32;\nexport const BASE_36_RADIX = 36;\nexport const BUN_BUILD_WARNING_SUPPRESSION =\n\t'wildcard sideEffects are not supported yet';\nexport const BODY_SLICE_LENGTH = 2000;\nexport const BYTES_PER_KILOBYTE = 1024;\nexport const CLI_ARGS_OFFSET = 3;\nexport const CSS_ERROR_RESOLVE_DELAY_MS = 50;\nexport const CSS_MAX_CHECK_ATTEMPTS = 10;\nexport const CSS_MAX_PARSE_TIMEOUT_MS = 500;\nexport const CSS_SHEET_READY_TIMEOUT_MS = 100;\nexport const DEFAULT_CHUNK_SIZE = 16_384;\nexport const DEFAULT_DEBOUNCE_MS = 15;\nexport const DEFAULT_PORT = 3000;\nexport const DEV_SERVER_RESTART_DEBOUNCE_MS = 100;\nexport const DOM_UPDATE_DELAY_MS = 50;\nexport const FILE_PROTOCOL_PREFIX_LENGTH = 7;\nexport const FOCUS_ID_PREFIX_LENGTH = 3;\nexport const FOCUS_IDX_PREFIX_LENGTH = 4;\nexport const FOCUS_NAME_PREFIX_LENGTH = 5;\nexport const HMR_UPDATE_TIMEOUT_MS = 2000;\nexport const HOOK_SIGNATURE_LENGTH = 12;\nexport const HOURS_IN_DAY = 24;\nexport const HOURS_IN_HALF_DAY = 12;\nexport const MAX_ERROR_LENGTH = 200;\nexport const MAX_RECONNECT_ATTEMPTS = 60;\nexport const MILLISECONDS_IN_A_SECOND = 1000;\nexport const MINUTES_IN_AN_HOUR = 60;\nexport const SECONDS_IN_A_MINUTE = 60;\nexport const MILLISECONDS_IN_A_MINUTE =\n\tMILLISECONDS_IN_A_SECOND * SECONDS_IN_A_MINUTE;\nexport const MILLISECONDS_IN_A_DAY =\n\tMILLISECONDS_IN_A_SECOND *\n\tSECONDS_IN_A_MINUTE *\n\tMINUTES_IN_AN_HOUR *\n\tHOURS_IN_DAY;\nexport const OVERLAY_FADE_DURATION_MS = 150;\nexport const PING_INTERVAL_MS = 30_000;\nexport const RAF_BATCH_COUNT = 3;\nexport const RANDOM_ID_END_INDEX = 11;\nexport const REBUILD_BATCH_DELAY_MS = 10;\nexport const REBUILD_RELOAD_DELAY_MS = 200;\nexport const RECONNECT_INITIAL_DELAY_MS = 500;\nexport const RECONNECT_POLL_INTERVAL_MS = 300;\nexport const SIGINT_EXIT_CODE = 130;\nexport const SIGTERM_EXIT_CODE = 143;\nexport const SVELTE_CSS_LOAD_TIMEOUT_MS = 500;\nexport const TIME_PRECISION = 2;\nexport const TWO_THIRDS = 2 / 3;\nexport const UNFOUND_INDEX = -1;\nexport const WEBSOCKET_NORMAL_CLOSURE = 1000;\n",
|
|
9
|
+
"const ESCAPE_LOOKUP: Record<string, string> = {\n\t'\\u2028': '\\\\u2028',\n\t'\\u2029': '\\\\u2029',\n\t'&': '\\\\u0026',\n\t'<': '\\\\u003C',\n\t'>': '\\\\u003E'\n};\n\nconst ESCAPE_REGEX = /[&><\\u2028\\u2029]/g;\n\nexport const escapeScriptContent = (content: string) =>\n\tcontent.replace(ESCAPE_REGEX, (char) => {\n\t\tconst escaped = ESCAPE_LOOKUP[char];\n\n\t\treturn escaped !== undefined ? escaped : char;\n\t});\n",
|
|
10
|
+
"import type { Component } from 'svelte';\nimport { DEFAULT_CHUNK_SIZE } from '../constants';\nimport { escapeScriptContent } from '../utils/escapeScriptContent';\n\nexport type RenderStreamOptions = {\n\tbootstrapScriptContent?: string;\n\tbootstrapScripts?: string[];\n\tbootstrapModules?: string[];\n\tnonce?: string;\n\tonError?: (error: unknown) => void;\n\tprogressiveChunkSize?: number;\n\tsignal?: AbortSignal;\n\theadContent?: string;\n\tbodyContent?: string;\n};\n\nexport const renderToReadableStream = async <\n\tProps extends Record<string, unknown> = Record<string, never>\n>(\n\tcomponent: Component<Props>,\n\tprops?: Props,\n\t{\n\t\tbootstrapScriptContent,\n\t\tbootstrapScripts = [],\n\t\tbootstrapModules = [],\n\t\tnonce,\n\t\tonError = console.error,\n\t\tprogressiveChunkSize = DEFAULT_CHUNK_SIZE,\n\t\tsignal,\n\t\theadContent,\n\t\tbodyContent\n\t}: RenderStreamOptions = {}\n) => {\n\ttry {\n\t\tconst { render } = await import('svelte/server');\n\t\tconst { head: rawHead, body } =\n\t\t\ttypeof props === 'undefined'\n\t\t\t\t? // @ts-expect-error Svelte's render function can't determine which overload to choose when the component is generic\n\t\t\t\t\trender(component)\n\t\t\t\t: render(component, { props });\n\t\t// Svelte SSR extracts <title> from <svelte:head> and appends it\n\t\t// after the component end marker (<!---->). The client renderer\n\t\t// places it at its template position, causing a hydration mismatch.\n\t\t// Fix: move <title> back inside the first component marker so both\n\t\t// SSR and client agree on its position.\n\t\tconst head = rawHead.replace(\n\t\t\t/(<!--[a-z0-9]+-->)([\\s\\S]*?)(<!---->)\\s*(<title>[\\s\\S]*?<\\/title>)/,\n\t\t\t'$1$4$2$3'\n\t\t);\n\t\tconst nonceAttr = nonce ? ` nonce=\"${nonce}\"` : '';\n\t\tconst scripts =\n\t\t\t(bootstrapScriptContent\n\t\t\t\t? `<script${nonceAttr}>${escapeScriptContent(bootstrapScriptContent)}</script>`\n\t\t\t\t: '') +\n\t\t\tbootstrapScripts\n\t\t\t\t.map((src) => `<script${nonceAttr} src=\"${src}\"></script>`)\n\t\t\t\t.join('') +\n\t\t\tbootstrapModules\n\t\t\t\t.map(\n\t\t\t\t\t(src) =>\n\t\t\t\t\t\t`<script${nonceAttr} type=\"module\" src=\"${src}\"></script>`\n\t\t\t\t)\n\t\t\t\t.join('');\n\t\tconst encoder = new TextEncoder();\n\t\t// Warning: this encodes the entire document into memory in one buffer\n\t\tconst full = encoder.encode(\n\t\t\t`<!DOCTYPE html><html lang=\"en\"><head>${head}${headContent ?? ''}</head><body>${body}${scripts}${bodyContent ?? ''}</body></html>`\n\t\t);\n\n\t\tlet offset = 0;\n\n\t\treturn new ReadableStream<Uint8Array>({\n\t\t\ttype: 'bytes',\n\t\t\tcancel(reason) {\n\t\t\t\tonError?.(reason);\n\t\t\t},\n\t\t\tpull(controller) {\n\t\t\t\tif (signal?.aborted) {\n\t\t\t\t\tcontroller.close();\n\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tif (offset >= full.length) {\n\t\t\t\t\tcontroller.close();\n\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tconst end = Math.min(\n\t\t\t\t\toffset + progressiveChunkSize,\n\t\t\t\t\tfull.length\n\t\t\t\t);\n\t\t\t\tcontroller.enqueue(full.subarray(offset, end));\n\t\t\t\toffset = end;\n\t\t\t}\n\t\t});\n\t} catch (error) {\n\t\tonError?.(error);\n\t\tthrow error;\n\t}\n};\n",
|
|
11
|
+
"import type { Component as SvelteComponent } from 'svelte';\nimport { ssrErrorPage } from '../utils/ssrErrorPage';\nimport {\n\tderivePageName,\n\trenderConventionError\n} from '../utils/resolveConvention';\n\nlet ssrDirty = false;\n\nconst buildDirtyResponse = (indexPath: string, props?: unknown) => {\n\tconst propsScript = `window.__INITIAL_PROPS__=${JSON.stringify(props)};`;\n\tconst dirtyFlag = 'window.__SSR_DIRTY__=true;';\n\tconst scriptTag = indexPath\n\t\t? `<script type=\"module\" src=\"${indexPath}\"></script>`\n\t\t: '';\n\tconst html = `<!DOCTYPE html><html><head></head><body><script>${propsScript}${dirtyFlag}</script>${scriptTag}</body></html>`;\n\n\treturn new Response(html, {\n\t\theaders: { 'Content-Type': 'text/html' }\n\t});\n};\n\nexport type HandleSveltePageRequest = {\n\t(\n\t\tPageComponent: SvelteComponent<Record<string, never>>,\n\t\tpagePath: string,\n\t\tindexPath: string\n\t): Promise<Response>;\n\t<P extends Record<string, unknown>>(\n\t\tPageComponent: SvelteComponent<P>,\n\t\tpagePath: string,\n\t\tindexPath: string,\n\t\tprops: NoInfer<P>\n\t): Promise<Response>;\n};\n\nexport const handleSveltePageRequest: HandleSveltePageRequest = async <\n\tP extends Record<string, unknown>\n>(\n\t_PageComponent: SvelteComponent<P>,\n\tpagePath: string,\n\tindexPath: string,\n\tprops?: P\n) => {\n\tif (ssrDirty) {\n\t\treturn buildDirtyResponse(indexPath, props);\n\t}\n\n\ttry {\n\t\tconst { default: ImportedPageComponent } = await import(pagePath);\n\t\tconst { renderToReadableStream } = await import(\n\t\t\t'./renderToReadableStream'\n\t\t);\n\n\t\tconst stream = await renderToReadableStream(\n\t\t\tImportedPageComponent,\n\t\t\tprops,\n\t\t\t{\n\t\t\t\tbootstrapModules: indexPath ? [indexPath] : [],\n\t\t\t\tbootstrapScriptContent: `window.__INITIAL_PROPS__=${JSON.stringify(\n\t\t\t\t\tprops\n\t\t\t\t)}`\n\t\t\t}\n\t\t);\n\n\t\treturn new Response(stream, {\n\t\t\theaders: { 'Content-Type': 'text/html' }\n\t\t});\n\t} catch (error) {\n\t\tconsole.error('[SSR] Svelte render error:', error);\n\n\t\tconst pageName = derivePageName(pagePath);\n\t\tconst conventionResponse = await renderConventionError(\n\t\t\t'svelte',\n\t\t\tpageName,\n\t\t\terror\n\t\t);\n\t\tif (conventionResponse) return conventionResponse;\n\n\t\treturn new Response(ssrErrorPage('svelte', error), {\n\t\t\theaders: { 'Content-Type': 'text/html' },\n\t\t\tstatus: 500\n\t\t});\n\t}\n};\n\nexport const invalidateSvelteSsrCache = () => {\n\tssrDirty = true;\n};\n",
|
|
12
|
+
"export { handleSveltePageRequest } from './pageHandler';\n"
|
|
13
|
+
],
|
|
14
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAAa,eAAe,CAAC,WAAmB,UAAmB;AAAA,EAClE,MAAM,kBAA0C;AAAA,IAC/C,SAAS;A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