@fluixi/server 1.0.0-alpha.100
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/LICENSE +21 -0
- package/README.md +82 -0
- package/dist/index.cjs +188 -0
- package/dist/index.d.ts +114 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +244 -0
- package/dist/index.mjs +187 -0
- package/dist/tsconfig.lib.tsbuildinfo +1 -0
- package/package.json +53 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Ibrahima Touré
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
<p align="center">
|
|
2
|
+
<img src="https://raw.githubusercontent.com/fluixi/assets/main/logos/128x128.png" alt="Fluixi" width="120" height="120" />
|
|
3
|
+
</p>
|
|
4
|
+
|
|
5
|
+
# @fluixi/server
|
|
6
|
+
|
|
7
|
+
**Server-side rendering for Fluixi — request-scoped, streaming, framework-agnostic.**
|
|
8
|
+
|
|
9
|
+
[](./LICENSE)
|
|
10
|
+

|
|
11
|
+
[](https://www.npmjs.com/package/@fluixi/server)
|
|
12
|
+

|
|
13
|
+
|
|
14
|
+
---
|
|
15
|
+
|
|
16
|
+
## ✨ Overview
|
|
17
|
+
|
|
18
|
+
The universal string renderer lives in [`@fluixi/dom`](../dom) (`renderToString` +
|
|
19
|
+
request-scoping); `@fluixi/server` is the **Node-side home** that makes it
|
|
20
|
+
concurrency-safe and ergonomic:
|
|
21
|
+
|
|
22
|
+
- injects an `AsyncLocalStorage` into `@fluixi/dom`'s request store so concurrent SSR
|
|
23
|
+
requests are isolated (`@fluixi/dom` stays browser-safe by never importing
|
|
24
|
+
`node:async_hooks` itself);
|
|
25
|
+
- re-exports the SSR surface (`renderToString`, `renderToStringAsync`, `getRequestEvent`,
|
|
26
|
+
the request-context primitives);
|
|
27
|
+
- adds request helpers (`renderRequest`, `renderRequestAsync`, `renderRequestToPage`,
|
|
28
|
+
`renderToBodyStream`, `startServer`, `createHtmlDocument`).
|
|
29
|
+
|
|
30
|
+
No meta-framework coupling — SSR is a plain function you call from any server (Express,
|
|
31
|
+
Hono, a worker, or [`@fluixi/start`](../start)).
|
|
32
|
+
|
|
33
|
+
## 📦 Installation
|
|
34
|
+
|
|
35
|
+
```sh
|
|
36
|
+
pnpm add @fluixi/server
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
## 🚀 Usage
|
|
40
|
+
|
|
41
|
+
```ts
|
|
42
|
+
import { startServer } from '@fluixi/server';
|
|
43
|
+
import App from './app';
|
|
44
|
+
|
|
45
|
+
const { render, page, renderAsync, stream } = startServer(App);
|
|
46
|
+
// express: res.send(page(req.url))
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
### Async data (Suspense / resources)
|
|
50
|
+
|
|
51
|
+
`renderRequestAsync` (and `startServer().renderAsync`) await data loaders before
|
|
52
|
+
serializing, then emit a `window.__FX_DATA__` script so the client seeds resources
|
|
53
|
+
without refetching:
|
|
54
|
+
|
|
55
|
+
```ts
|
|
56
|
+
import { renderRequestAsync } from '@fluixi/server';
|
|
57
|
+
const html = await renderRequestAsync(App, { url });
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
### Streaming
|
|
61
|
+
|
|
62
|
+
```ts
|
|
63
|
+
import { renderToBodyStream } from '@fluixi/server';
|
|
64
|
+
// a web ReadableStream of the app body — the host owns the surrounding document
|
|
65
|
+
export const renderStream = (url) => renderToBodyStream(App, { url });
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
### Request-scoped data + redaction
|
|
69
|
+
|
|
70
|
+
```ts
|
|
71
|
+
import { getRequestEvent, setDataRedactor } from '@fluixi/server';
|
|
72
|
+
|
|
73
|
+
// inside a component / loader:
|
|
74
|
+
getRequestEvent()?.request; // the web Request (headers, cookies, …)
|
|
75
|
+
|
|
76
|
+
// strip server-only fields from __FX_DATA__ before they reach the page:
|
|
77
|
+
setDataRedactor((v) => (v?.passwordHash ? { ...v, passwordHash: undefined } : v));
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
## 📄 License
|
|
81
|
+
|
|
82
|
+
[MIT](./LICENSE) © [Fluixi](https://fluixi.dev)
|
package/dist/index.cjs
ADDED
|
@@ -0,0 +1,188 @@
|
|
|
1
|
+
/*! @fluixi/server v1.0.0-alpha.100 | (c) 2026 Ibrahima Touré and Fluixi contributors | MIT */
|
|
2
|
+
"use strict";
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __export = (target, all) => {
|
|
8
|
+
for (var name in all)
|
|
9
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
10
|
+
};
|
|
11
|
+
var __copyProps = (to, from, except, desc) => {
|
|
12
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
13
|
+
for (let key of __getOwnPropNames(from))
|
|
14
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
15
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
16
|
+
}
|
|
17
|
+
return to;
|
|
18
|
+
};
|
|
19
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
20
|
+
|
|
21
|
+
// src/index.ts
|
|
22
|
+
var index_exports = {};
|
|
23
|
+
__export(index_exports, {
|
|
24
|
+
EVENT_REPLAY_TYPES: () => EVENT_REPLAY_TYPES,
|
|
25
|
+
appendResponseHeader: () => import_dom.appendResponseHeader,
|
|
26
|
+
createHtmlDocument: () => createHtmlDocument,
|
|
27
|
+
createRequestContext: () => import_dom.createRequestContext,
|
|
28
|
+
endRequestContext: () => import_dom.endRequestContext,
|
|
29
|
+
eventCaptureScript: () => eventCaptureScript,
|
|
30
|
+
getLocals: () => import_dom.getLocals,
|
|
31
|
+
getRequestContext: () => import_dom.getRequestContext,
|
|
32
|
+
getRequestEvent: () => import_dom.getRequestEvent,
|
|
33
|
+
getRequestLocals: () => import_dom.getRequestLocals,
|
|
34
|
+
isServer: () => import_dom.isServer,
|
|
35
|
+
onRequestEnd: () => import_dom.onRequestEnd,
|
|
36
|
+
preloadServerState: () => preloadServerState,
|
|
37
|
+
renderRequest: () => renderRequest,
|
|
38
|
+
renderRequestAsync: () => renderRequestAsync,
|
|
39
|
+
renderRequestToPage: () => renderRequestToPage,
|
|
40
|
+
renderToBodyStream: () => renderToBodyStream,
|
|
41
|
+
renderToStream: () => renderToStream,
|
|
42
|
+
renderToString: () => import_dom.renderToString,
|
|
43
|
+
renderToStringAsync: () => import_dom.renderToStringAsync,
|
|
44
|
+
runWithRequestContext: () => import_dom.runWithRequestContext,
|
|
45
|
+
serializeNode: () => import_dom.serializeNode,
|
|
46
|
+
setDataRedactor: () => import_dom.setDataRedactor,
|
|
47
|
+
setRequestStore: () => import_dom.setRequestStore,
|
|
48
|
+
setRequestStoreIfUnset: () => import_dom.setRequestStoreIfUnset,
|
|
49
|
+
setServerMode: () => import_dom.setServerMode,
|
|
50
|
+
startServer: () => startServer
|
|
51
|
+
});
|
|
52
|
+
module.exports = __toCommonJS(index_exports);
|
|
53
|
+
var import_dom = require("@fluixi/dom");
|
|
54
|
+
var import_head = require("@fluixi/head");
|
|
55
|
+
function resolveALS() {
|
|
56
|
+
const g = globalThis.AsyncLocalStorage;
|
|
57
|
+
if (g) return g;
|
|
58
|
+
const proc = globalThis.process;
|
|
59
|
+
try {
|
|
60
|
+
return proc?.getBuiltinModule?.("node:async_hooks")?.AsyncLocalStorage;
|
|
61
|
+
} catch {
|
|
62
|
+
return void 0;
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
var ALS = resolveALS();
|
|
66
|
+
if (ALS) {
|
|
67
|
+
(0, import_dom.setRequestStoreIfUnset)(new ALS());
|
|
68
|
+
} else if (!isBrowser()) {
|
|
69
|
+
console.warn(
|
|
70
|
+
"[fluixi/server] AsyncLocalStorage unavailable — using a sync request store (no async isolation across concurrent requests)"
|
|
71
|
+
);
|
|
72
|
+
}
|
|
73
|
+
function isBrowser() {
|
|
74
|
+
return typeof document !== "undefined" || typeof window !== "undefined";
|
|
75
|
+
}
|
|
76
|
+
var EVENT_REPLAY_TYPES = ["click", "input", "change", "submit", "keydown"];
|
|
77
|
+
function eventCaptureScript() {
|
|
78
|
+
const t = JSON.stringify(EVENT_REPLAY_TYPES);
|
|
79
|
+
return `<script>(function(){var q=window.__FX_REPLAY__=[],t=${t},r=function(e){q.push({type:e.type,target:e.target})},i=0;for(;i<t.length;i++)document.addEventListener(t[i],r,true);window.__FX_REPLAY_STOP__=function(){for(var j=0;j<t.length;j++)document.removeEventListener(t[j],r,true)}})();<\/script>`;
|
|
80
|
+
}
|
|
81
|
+
function documentShell(options = {}) {
|
|
82
|
+
const { title = "Fluixi App", lang = "en", stylesheets = [], head = "", bodyAttributes = "", eventReplay = true } = options;
|
|
83
|
+
const styleTags = stylesheets.map((href) => `<link rel="stylesheet" href="${href}">`).join("\n ");
|
|
84
|
+
return `<!DOCTYPE html>
|
|
85
|
+
<html lang="${lang}">
|
|
86
|
+
<head>
|
|
87
|
+
<meta charset="UTF-8">
|
|
88
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
89
|
+
<title>${title}</title>
|
|
90
|
+
${eventReplay ? eventCaptureScript() : ""}
|
|
91
|
+
${styleTags}
|
|
92
|
+
${head}
|
|
93
|
+
</head>
|
|
94
|
+
<body${bodyAttributes ? " " + bodyAttributes : ""}>
|
|
95
|
+
`;
|
|
96
|
+
}
|
|
97
|
+
function documentClose(options = {}) {
|
|
98
|
+
const { scripts = [] } = options;
|
|
99
|
+
const scriptTags = scripts.map((src) => `<script type="module" src="${src}"><\/script>`).join("\n ");
|
|
100
|
+
return `
|
|
101
|
+
${scriptTags}
|
|
102
|
+
</body>
|
|
103
|
+
</html>`;
|
|
104
|
+
}
|
|
105
|
+
function createHtmlDocument(content, options = {}) {
|
|
106
|
+
return documentShell(options) + content + documentClose(options);
|
|
107
|
+
}
|
|
108
|
+
function renderRequest(app, event) {
|
|
109
|
+
return (0, import_dom.renderToString)(() => (0, import_dom.createComponent)(app, { url: event.url ?? "/" }), { event });
|
|
110
|
+
}
|
|
111
|
+
var ISO_REGISTRY_KEY = "__fluixi_iso_states__";
|
|
112
|
+
var ISO_SEED_PREFIX = "__iso:";
|
|
113
|
+
async function preloadServerState(event) {
|
|
114
|
+
const reg = globalThis[ISO_REGISTRY_KEY];
|
|
115
|
+
if (!reg || reg.size === 0) return;
|
|
116
|
+
const ctx = (0, import_dom.getRequestContext)();
|
|
117
|
+
for (const [key, st] of reg) {
|
|
118
|
+
try {
|
|
119
|
+
const value = await st.server(event);
|
|
120
|
+
st.set(value);
|
|
121
|
+
ctx?.data.set(ISO_SEED_PREFIX + key, value);
|
|
122
|
+
} catch (err) {
|
|
123
|
+
console.error(`[fluixi] isomorphic state "${key}" failed to resolve on the server:`, err);
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
function renderRequestAsync(app, event) {
|
|
128
|
+
const head = (0, import_head.createHead)();
|
|
129
|
+
return (0, import_dom.renderToStringAsync)(() => (0, import_dom.createComponent)(app, { url: event.url ?? "/" }), {
|
|
130
|
+
event,
|
|
131
|
+
preload: (e) => {
|
|
132
|
+
const ctx = (0, import_dom.getRequestContext)();
|
|
133
|
+
if (ctx) requestHeads.set(ctx, head);
|
|
134
|
+
return preloadServerState(e);
|
|
135
|
+
}
|
|
136
|
+
}).then((body) => (0, import_head.encodeHeadMarker)((0, import_head.renderHead)(head)) + body);
|
|
137
|
+
}
|
|
138
|
+
var requestHeads = /* @__PURE__ */ new WeakMap();
|
|
139
|
+
(0, import_head.setHeadScope)(() => {
|
|
140
|
+
const ctx = (0, import_dom.getRequestContext)();
|
|
141
|
+
return ctx ? requestHeads.get(ctx) : void 0;
|
|
142
|
+
});
|
|
143
|
+
function renderRequestToPage(app, event, options) {
|
|
144
|
+
return createHtmlDocument(renderRequest(app, event), options);
|
|
145
|
+
}
|
|
146
|
+
function renderToStream(app, event, options = {}) {
|
|
147
|
+
const encoder = new TextEncoder();
|
|
148
|
+
return new ReadableStream({
|
|
149
|
+
async start(controller) {
|
|
150
|
+
controller.enqueue(encoder.encode(documentShell(options)));
|
|
151
|
+
try {
|
|
152
|
+
const content = await renderRequestAsync(app, event);
|
|
153
|
+
controller.enqueue(encoder.encode(content));
|
|
154
|
+
} catch (err) {
|
|
155
|
+
console.error("[fluixi] SSR render failed — falling back to client render:", err);
|
|
156
|
+
}
|
|
157
|
+
controller.enqueue(encoder.encode(documentClose(options)));
|
|
158
|
+
controller.close();
|
|
159
|
+
}
|
|
160
|
+
});
|
|
161
|
+
}
|
|
162
|
+
function renderToBodyStream(app, event) {
|
|
163
|
+
const encoder = new TextEncoder();
|
|
164
|
+
return new ReadableStream({
|
|
165
|
+
async start(controller) {
|
|
166
|
+
try {
|
|
167
|
+
controller.enqueue(encoder.encode(await renderRequestAsync(app, event)));
|
|
168
|
+
} catch (err) {
|
|
169
|
+
console.error("[fluixi] SSR render failed — falling back to client render:", err);
|
|
170
|
+
}
|
|
171
|
+
controller.close();
|
|
172
|
+
}
|
|
173
|
+
});
|
|
174
|
+
}
|
|
175
|
+
function startServer(App) {
|
|
176
|
+
return {
|
|
177
|
+
render: (url) => renderRequest(App, { url }),
|
|
178
|
+
page: (url, opts) => renderRequestToPage(App, { url }, opts),
|
|
179
|
+
/** async render: awaits data loaders/Suspense */
|
|
180
|
+
renderAsync: (url) => renderRequestAsync(App, { url }),
|
|
181
|
+
/** async full-document render */
|
|
182
|
+
pageAsync: async (url, opts) => createHtmlDocument(await renderRequestAsync(App, { url }), opts),
|
|
183
|
+
/** web ReadableStream of the document (shell flushed first) */
|
|
184
|
+
stream: (url, opts) => renderToStream(App, { url }, opts),
|
|
185
|
+
/** web ReadableStream of the app body only (host owns the document) */
|
|
186
|
+
bodyStream: (url) => renderToBodyStream(App, { url })
|
|
187
|
+
};
|
|
188
|
+
}
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @fluixi/server: the environment-agnostic SSR engine.
|
|
3
|
+
*
|
|
4
|
+
* The string renderer itself lives in @fluixi/dom (the universal `renderToString`
|
|
5
|
+
* + the request-scoping primitives), so it stays usable in any environment.
|
|
6
|
+
* This package is the Node-side home that:
|
|
7
|
+
*
|
|
8
|
+
* 1. injects a real AsyncLocalStorage into @fluixi/dom's request store, so
|
|
9
|
+
* concurrent SSR requests are isolated out of the box (the "P0 #4" fix) ,
|
|
10
|
+
* @fluixi/dom can't import `node:async_hooks` itself without breaking
|
|
11
|
+
* browser bundles, so the Node-only server package wires it here;
|
|
12
|
+
* 2. re-exports the SSR surface so apps import one place;
|
|
13
|
+
* 3. adds request helpers (renderRequest / renderToPage / startServer).
|
|
14
|
+
*
|
|
15
|
+
* No vinxi coupling: the meta-framework was never wired into the render path;
|
|
16
|
+
* SSR is a plain function you call from any server (Express/Hono/Nitro/worker).
|
|
17
|
+
*/
|
|
18
|
+
import { renderToString, renderToStringAsync, serializeNode, setDataRedactor, getRequestEvent, getRequestContext, getLocals, getRequestLocals, appendResponseHeader, runWithRequestContext, createRequestContext, setRequestStore, setRequestStoreIfUnset, onRequestEnd, endRequestContext, isServer, setServerMode, type RequestEvent } from '@fluixi/dom';
|
|
19
|
+
export { renderToString, renderToStringAsync, serializeNode, setDataRedactor, getRequestEvent, getRequestContext, getLocals, getRequestLocals, appendResponseHeader, runWithRequestContext, createRequestContext, setRequestStore, setRequestStoreIfUnset, onRequestEnd, endRequestContext, isServer, setServerMode, };
|
|
20
|
+
export type { RequestContext, RequestEvent, RequestLocals, RequestStore, RenderOptions } from '@fluixi/dom';
|
|
21
|
+
export interface DocumentOptions {
|
|
22
|
+
title?: string;
|
|
23
|
+
lang?: string;
|
|
24
|
+
stylesheets?: string[];
|
|
25
|
+
scripts?: string[];
|
|
26
|
+
head?: string;
|
|
27
|
+
bodyAttributes?: string;
|
|
28
|
+
/** Emit the pre-hydration event-capture script in <head> (default true). */
|
|
29
|
+
eventReplay?: boolean;
|
|
30
|
+
}
|
|
31
|
+
/** Discrete events captured before hydration and replayed by startClient. */
|
|
32
|
+
export declare const EVENT_REPLAY_TYPES: string[];
|
|
33
|
+
/**
|
|
34
|
+
* Inline script that records events fired BEFORE hydration so the client can
|
|
35
|
+
* replay them once the delegated handlers are wired (see startClient →
|
|
36
|
+
* replayEvents). Must run early: emit it near the top of <head>. Records only
|
|
37
|
+
* `{type, target}`; since hydration REUSES the server DOM nodes, each recorded
|
|
38
|
+
* target stays live for replay. Custom servers that don't use createHtmlDocument
|
|
39
|
+
* should inject this string into their <head> themselves.
|
|
40
|
+
*/
|
|
41
|
+
export declare function eventCaptureScript(): string;
|
|
42
|
+
/** Wrap rendered content in a complete HTML document. */
|
|
43
|
+
export declare function createHtmlDocument(content: string, options?: DocumentOptions): string;
|
|
44
|
+
/** Render a request to an HTML string, exposing the event via getRequestEvent(). */
|
|
45
|
+
export declare function renderRequest(app: (props: {
|
|
46
|
+
url: string;
|
|
47
|
+
}) => any, event: RequestEvent): string;
|
|
48
|
+
/**
|
|
49
|
+
* Resolve every registered isomorphic state for THIS request (before the app renders):
|
|
50
|
+
* run its `server(event)` resolver, set its signal so the server render reads the value,
|
|
51
|
+
* and stash it in the request data so it serializes into the `__FX_DATA__` JSON transport
|
|
52
|
+
* and the client seeds from the same value (no hydration mismatch, no refetch). Passed as the
|
|
53
|
+
* `preload` hook to the renderer; runs inside the request context.
|
|
54
|
+
*/
|
|
55
|
+
export declare function preloadServerState(event?: RequestEvent): Promise<void>;
|
|
56
|
+
/** Async variant: awaits resources/Suspense before serializing. */
|
|
57
|
+
export declare function renderRequestAsync(app: (props: {
|
|
58
|
+
url: string;
|
|
59
|
+
}) => any, event: RequestEvent): Promise<string>;
|
|
60
|
+
/** Render a full HTML document for a request. */
|
|
61
|
+
export declare function renderRequestToPage(app: (props: {
|
|
62
|
+
url: string;
|
|
63
|
+
}) => any, event: RequestEvent, options?: DocumentOptions): string;
|
|
64
|
+
/**
|
|
65
|
+
* Render a request to a web `ReadableStream<Uint8Array>`, works in Node 18+,
|
|
66
|
+
* Deno, Bun, and edge/worker runtimes (which want a web stream, not a Node
|
|
67
|
+
* Readable). The document **shell** (`<head>` + open `<body>`) is flushed
|
|
68
|
+
* immediately so the browser can start loading assets, then the app HTML
|
|
69
|
+
* (awaiting data loaders/Suspense) and the closing tags follow.
|
|
70
|
+
*
|
|
71
|
+
* Progressive out-of-order Suspense streaming is a later pass; today the body is
|
|
72
|
+
* a single chunk emitted after the async render resolves.
|
|
73
|
+
*/
|
|
74
|
+
export declare function renderToStream(app: (props: {
|
|
75
|
+
url: string;
|
|
76
|
+
}) => any, event: RequestEvent, options?: DocumentOptions): ReadableStream<Uint8Array>;
|
|
77
|
+
/**
|
|
78
|
+
* Render a request to a web `ReadableStream<Uint8Array>` of JUST the app content ,
|
|
79
|
+
* NO document shell. For hosts that own the surrounding HTML document (e.g. a
|
|
80
|
+
* `@fluixi/start` app streaming its `index.html` around the app body): the host
|
|
81
|
+
* flushes the document head first, then pipes this body stream into the mount point,
|
|
82
|
+
* then the document tail. The content includes the `__FX_DATA__` resource-transport
|
|
83
|
+
* script (it's part of the async render output), so hydration seeds without refetch.
|
|
84
|
+
*
|
|
85
|
+
* Single chunk today (the async render resolves fully before emitting); progressive
|
|
86
|
+
* out-of-order Suspense streaming is a later pass, same signature.
|
|
87
|
+
*/
|
|
88
|
+
export declare function renderToBodyStream(app: (props: {
|
|
89
|
+
url: string;
|
|
90
|
+
}) => any, event: RequestEvent): ReadableStream<Uint8Array>;
|
|
91
|
+
/**
|
|
92
|
+
* Server entry helper: returns render/page closures bound to an app.
|
|
93
|
+
*
|
|
94
|
+
* @example
|
|
95
|
+
* import { startServer } from '@fluixi/server';
|
|
96
|
+
* import App from './app';
|
|
97
|
+
* const { render, page } = startServer(App);
|
|
98
|
+
* // express: res.send(page(req.url))
|
|
99
|
+
*/
|
|
100
|
+
export declare function startServer(App: (props: {
|
|
101
|
+
url: string;
|
|
102
|
+
}) => any): {
|
|
103
|
+
render: (url: string) => string;
|
|
104
|
+
page: (url: string, opts?: DocumentOptions) => string;
|
|
105
|
+
/** async render: awaits data loaders/Suspense */
|
|
106
|
+
renderAsync: (url: string) => Promise<string>;
|
|
107
|
+
/** async full-document render */
|
|
108
|
+
pageAsync: (url: string, opts?: DocumentOptions) => Promise<string>;
|
|
109
|
+
/** web ReadableStream of the document (shell flushed first) */
|
|
110
|
+
stream: (url: string, opts?: DocumentOptions) => ReadableStream<Uint8Array<ArrayBufferLike>>;
|
|
111
|
+
/** web ReadableStream of the app body only (host owns the document) */
|
|
112
|
+
bodyStream: (url: string) => ReadableStream<Uint8Array<ArrayBufferLike>>;
|
|
113
|
+
};
|
|
114
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AACH,OAAO,EAEL,cAAc,EACd,mBAAmB,EACnB,aAAa,EACb,eAAe,EACf,eAAe,EACf,iBAAiB,EACjB,SAAS,EACT,gBAAgB,EAChB,oBAAoB,EACpB,qBAAqB,EACrB,oBAAoB,EACpB,eAAe,EACf,sBAAsB,EACtB,YAAY,EACZ,iBAAiB,EACjB,QAAQ,EACR,aAAa,EAEb,KAAK,YAAY,EAClB,MAAM,aAAa,CAAC;AAwCrB,OAAO,EACL,cAAc,EACd,mBAAmB,EACnB,aAAa,EACb,eAAe,EACf,eAAe,EACf,iBAAiB,EACjB,SAAS,EACT,gBAAgB,EAChB,oBAAoB,EACpB,qBAAqB,EACrB,oBAAoB,EACpB,eAAe,EACf,sBAAsB,EACtB,YAAY,EACZ,iBAAiB,EACjB,QAAQ,EACR,aAAa,GACd,CAAC;AACF,YAAY,EAAE,cAAc,EAAE,YAAY,EAAE,aAAa,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAE5G,MAAM,WAAW,eAAe;IAC9B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,WAAW,CAAC,EAAE,MAAM,EAAE,CAAC;IACvB,OAAO,CAAC,EAAE,MAAM,EAAE,CAAC;IACnB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,4EAA4E;IAC5E,WAAW,CAAC,EAAE,OAAO,CAAC;CACvB;AAED,6EAA6E;AAC7E,eAAO,MAAM,kBAAkB,UAAoD,CAAC;AAEpF;;;;;;;GAOG;AACH,wBAAgB,kBAAkB,IAAI,MAAM,CAW3C;AA8BD,yDAAyD;AACzD,wBAAgB,kBAAkB,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,GAAE,eAAoB,GAAG,MAAM,CAEzF;AAED,oFAAoF;AACpF,wBAAgB,aAAa,CAAC,GAAG,EAAE,CAAC,KAAK,EAAE;IAAE,GAAG,EAAE,MAAM,CAAA;CAAE,KAAK,GAAG,EAAE,KAAK,EAAE,YAAY,GAAG,MAAM,CAG/F;AAQD;;;;;;GAMG;AACH,wBAAsB,kBAAkB,CAAC,KAAK,CAAC,EAAE,YAAY,GAAG,OAAO,CAAC,IAAI,CAAC,CAkB5E;AAED,mEAAmE;AACnE,wBAAgB,kBAAkB,CAChC,GAAG,EAAE,CAAC,KAAK,EAAE;IAAE,GAAG,EAAE,MAAM,CAAA;CAAE,KAAK,GAAG,EACpC,KAAK,EAAE,YAAY,GAClB,OAAO,CAAC,MAAM,CAAC,CAcjB;AASD,iDAAiD;AACjD,wBAAgB,mBAAmB,CACjC,GAAG,EAAE,CAAC,KAAK,EAAE;IAAE,GAAG,EAAE,MAAM,CAAA;CAAE,KAAK,GAAG,EACpC,KAAK,EAAE,YAAY,EACnB,OAAO,CAAC,EAAE,eAAe,GACxB,MAAM,CAER;AAED;;;;;;;;;GASG;AACH,wBAAgB,cAAc,CAC5B,GAAG,EAAE,CAAC,KAAK,EAAE;IAAE,GAAG,EAAE,MAAM,CAAA;CAAE,KAAK,GAAG,EACpC,KAAK,EAAE,YAAY,EACnB,OAAO,GAAE,eAAoB,GAC5B,cAAc,CAAC,UAAU,CAAC,CAmB5B;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,kBAAkB,CAChC,GAAG,EAAE,CAAC,KAAK,EAAE;IAAE,GAAG,EAAE,MAAM,CAAA;CAAE,KAAK,GAAG,EACpC,KAAK,EAAE,YAAY,GAClB,cAAc,CAAC,UAAU,CAAC,CAgB5B;AAED;;;;;;;;GAQG;AACH,wBAAgB,WAAW,CAAC,GAAG,EAAE,CAAC,KAAK,EAAE;IAAE,GAAG,EAAE,MAAM,CAAA;CAAE,KAAK,GAAG;kBAE9C,MAAM;gBACR,MAAM,SAAS,eAAe;IAC1C,iDAAiD;uBAC9B,MAAM;IACzB,iCAAiC;qBACV,MAAM,SAAS,eAAe;IAErD,+DAA+D;kBACjD,MAAM,SAAS,eAAe;IAC5C,uEAAuE;sBACrD,MAAM;EAE3B"}
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,244 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @fluixi/server: the environment-agnostic SSR engine.
|
|
3
|
+
*
|
|
4
|
+
* The string renderer itself lives in @fluixi/dom (the universal `renderToString`
|
|
5
|
+
* + the request-scoping primitives), so it stays usable in any environment.
|
|
6
|
+
* This package is the Node-side home that:
|
|
7
|
+
*
|
|
8
|
+
* 1. injects a real AsyncLocalStorage into @fluixi/dom's request store, so
|
|
9
|
+
* concurrent SSR requests are isolated out of the box (the "P0 #4" fix) ,
|
|
10
|
+
* @fluixi/dom can't import `node:async_hooks` itself without breaking
|
|
11
|
+
* browser bundles, so the Node-only server package wires it here;
|
|
12
|
+
* 2. re-exports the SSR surface so apps import one place;
|
|
13
|
+
* 3. adds request helpers (renderRequest / renderToPage / startServer).
|
|
14
|
+
*
|
|
15
|
+
* No vinxi coupling: the meta-framework was never wired into the render path;
|
|
16
|
+
* SSR is a plain function you call from any server (Express/Hono/Nitro/worker).
|
|
17
|
+
*/
|
|
18
|
+
import { createComponent, renderToString, renderToStringAsync, serializeNode, setDataRedactor, getRequestEvent, getRequestContext, getLocals, getRequestLocals, appendResponseHeader, runWithRequestContext, createRequestContext, setRequestStore, setRequestStoreIfUnset, onRequestEnd, endRequestContext, isServer, setServerMode, } from '@fluixi/dom';
|
|
19
|
+
import { createHead, setHeadScope, renderHead, encodeHeadMarker } from '@fluixi/head';
|
|
20
|
+
function resolveALS() {
|
|
21
|
+
const g = globalThis.AsyncLocalStorage;
|
|
22
|
+
if (g)
|
|
23
|
+
return g;
|
|
24
|
+
const proc = globalThis.process;
|
|
25
|
+
try {
|
|
26
|
+
return proc?.getBuiltinModule?.('node:async_hooks')?.AsyncLocalStorage;
|
|
27
|
+
}
|
|
28
|
+
catch {
|
|
29
|
+
return undefined;
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
const ALS = resolveALS();
|
|
33
|
+
if (ALS) {
|
|
34
|
+
// Once per process, whichever copy of this module loads first: see setRequestStoreIfUnset.
|
|
35
|
+
setRequestStoreIfUnset(new ALS());
|
|
36
|
+
}
|
|
37
|
+
else if (!isBrowser()) {
|
|
38
|
+
// Only where it is a real loss. A browser serves one request, its own page, so a
|
|
39
|
+
// sync store is the correct implementation there, not a degraded one, and warning
|
|
40
|
+
// about lost isolation between concurrent requests described a situation that cannot
|
|
41
|
+
// arise. It fired on every page load of every app.
|
|
42
|
+
console.warn('[fluixi/server] AsyncLocalStorage unavailable — using a sync request store (no async isolation across concurrent requests)');
|
|
43
|
+
}
|
|
44
|
+
/** A document means a page, and a page is the one request this runtime will ever serve. */
|
|
45
|
+
function isBrowser() {
|
|
46
|
+
return typeof document !== 'undefined' || typeof window !== 'undefined';
|
|
47
|
+
}
|
|
48
|
+
export { renderToString, renderToStringAsync, serializeNode, setDataRedactor, getRequestEvent, getRequestContext, getLocals, getRequestLocals, appendResponseHeader, runWithRequestContext, createRequestContext, setRequestStore, setRequestStoreIfUnset, onRequestEnd, endRequestContext, isServer, setServerMode, };
|
|
49
|
+
/** Discrete events captured before hydration and replayed by startClient. */
|
|
50
|
+
export const EVENT_REPLAY_TYPES = ['click', 'input', 'change', 'submit', 'keydown'];
|
|
51
|
+
/**
|
|
52
|
+
* Inline script that records events fired BEFORE hydration so the client can
|
|
53
|
+
* replay them once the delegated handlers are wired (see startClient →
|
|
54
|
+
* replayEvents). Must run early: emit it near the top of <head>. Records only
|
|
55
|
+
* `{type, target}`; since hydration REUSES the server DOM nodes, each recorded
|
|
56
|
+
* target stays live for replay. Custom servers that don't use createHtmlDocument
|
|
57
|
+
* should inject this string into their <head> themselves.
|
|
58
|
+
*/
|
|
59
|
+
export function eventCaptureScript() {
|
|
60
|
+
const t = JSON.stringify(EVENT_REPLAY_TYPES);
|
|
61
|
+
// Minified IIFE: queue events on window.__FX_REPLAY__ via capture-phase
|
|
62
|
+
// listeners; expose __FX_REPLAY_STOP__ so the client detaches them after replay.
|
|
63
|
+
return (`<script>(function(){var q=window.__FX_REPLAY__=[],t=${t},` +
|
|
64
|
+
`r=function(e){q.push({type:e.type,target:e.target})},i=0;` +
|
|
65
|
+
`for(;i<t.length;i++)document.addEventListener(t[i],r,true);` +
|
|
66
|
+
`window.__FX_REPLAY_STOP__=function(){for(var j=0;j<t.length;j++)` +
|
|
67
|
+
`document.removeEventListener(t[j],r,true)}})();</script>`);
|
|
68
|
+
}
|
|
69
|
+
/** The document up to (and including) the open <body>, flushable before content. */
|
|
70
|
+
function documentShell(options = {}) {
|
|
71
|
+
const { title = 'Fluixi App', lang = 'en', stylesheets = [], head = '', bodyAttributes = '', eventReplay = true } = options;
|
|
72
|
+
const styleTags = stylesheets.map((href) => `<link rel="stylesheet" href="${href}">`).join('\n ');
|
|
73
|
+
return `<!DOCTYPE html>
|
|
74
|
+
<html lang="${lang}">
|
|
75
|
+
<head>
|
|
76
|
+
<meta charset="UTF-8">
|
|
77
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
78
|
+
<title>${title}</title>
|
|
79
|
+
${eventReplay ? eventCaptureScript() : ''}
|
|
80
|
+
${styleTags}
|
|
81
|
+
${head}
|
|
82
|
+
</head>
|
|
83
|
+
<body${bodyAttributes ? ' ' + bodyAttributes : ''}>
|
|
84
|
+
`;
|
|
85
|
+
}
|
|
86
|
+
/** The trailing scripts + closing tags: flushed after the app content. */
|
|
87
|
+
function documentClose(options = {}) {
|
|
88
|
+
const { scripts = [] } = options;
|
|
89
|
+
const scriptTags = scripts.map((src) => `<script type="module" src="${src}"></script>`).join('\n ');
|
|
90
|
+
return `
|
|
91
|
+
${scriptTags}
|
|
92
|
+
</body>
|
|
93
|
+
</html>`;
|
|
94
|
+
}
|
|
95
|
+
/** Wrap rendered content in a complete HTML document. */
|
|
96
|
+
export function createHtmlDocument(content, options = {}) {
|
|
97
|
+
return documentShell(options) + content + documentClose(options);
|
|
98
|
+
}
|
|
99
|
+
/** Render a request to an HTML string, exposing the event via getRequestEvent(). */
|
|
100
|
+
export function renderRequest(app, event) {
|
|
101
|
+
// Entered as a component, as the client enters it, so both open the same hydration key scope.
|
|
102
|
+
return renderToString(() => createComponent(app, { url: event.url ?? '/' }), { event });
|
|
103
|
+
}
|
|
104
|
+
// Isomorphic request state (paired with fluixi's createIsomorphicState). The
|
|
105
|
+
// two halves communicate only through this globalThis registry, no import edge, so
|
|
106
|
+
// the client half stays free of this server module.
|
|
107
|
+
const ISO_REGISTRY_KEY = '__fluixi_iso_states__';
|
|
108
|
+
const ISO_SEED_PREFIX = '__iso:';
|
|
109
|
+
/**
|
|
110
|
+
* Resolve every registered isomorphic state for THIS request (before the app renders):
|
|
111
|
+
* run its `server(event)` resolver, set its signal so the server render reads the value,
|
|
112
|
+
* and stash it in the request data so it serializes into the `__FX_DATA__` JSON transport
|
|
113
|
+
* and the client seeds from the same value (no hydration mismatch, no refetch). Passed as the
|
|
114
|
+
* `preload` hook to the renderer; runs inside the request context.
|
|
115
|
+
*/
|
|
116
|
+
export async function preloadServerState(event) {
|
|
117
|
+
const reg = globalThis[ISO_REGISTRY_KEY];
|
|
118
|
+
if (!reg || reg.size === 0)
|
|
119
|
+
return;
|
|
120
|
+
const ctx = getRequestContext();
|
|
121
|
+
for (const [key, st] of reg) {
|
|
122
|
+
try {
|
|
123
|
+
const value = await st.server(event);
|
|
124
|
+
st.set(value); // populate the signal for the server render
|
|
125
|
+
ctx?.data.set(ISO_SEED_PREFIX + key, value); // → client seed
|
|
126
|
+
}
|
|
127
|
+
catch (err) {
|
|
128
|
+
// A failing resolver (e.g. the backend is down/restarting) must NOT abort the
|
|
129
|
+
// whole render. Leave the state at its fallback, skip its seed, and let the
|
|
130
|
+
// client resolve/retry after hydration. Resilient SSR degrades, never blanks.
|
|
131
|
+
console.error(`[fluixi] isomorphic state "${key}" failed to resolve on the server:`, err);
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
/** Async variant: awaits resources/Suspense before serializing. */
|
|
136
|
+
export function renderRequestAsync(app, event) {
|
|
137
|
+
// Collect @fluixi/head metadata registered via seo()/useHead during the render, and prepend it
|
|
138
|
+
// as an (inert) marker the adapter/prerender lifts into <head>. No seo() → no marker, no change.
|
|
139
|
+
// The registry is keyed by this request's context, which AsyncLocalStorage carries across the
|
|
140
|
+
// awaits of a lazy route, so a concurrent render can neither clear it nor write into it.
|
|
141
|
+
const head = createHead();
|
|
142
|
+
return renderToStringAsync(() => createComponent(app, { url: event.url ?? '/' }), {
|
|
143
|
+
event,
|
|
144
|
+
preload: (e) => {
|
|
145
|
+
const ctx = getRequestContext();
|
|
146
|
+
if (ctx)
|
|
147
|
+
requestHeads.set(ctx, head);
|
|
148
|
+
return preloadServerState(e);
|
|
149
|
+
},
|
|
150
|
+
}).then((body) => encodeHeadMarker(renderHead(head)) + body);
|
|
151
|
+
}
|
|
152
|
+
// Not in `ctx.data`: that map is serialized to the client as the hydration seed.
|
|
153
|
+
const requestHeads = new WeakMap();
|
|
154
|
+
setHeadScope(() => {
|
|
155
|
+
const ctx = getRequestContext();
|
|
156
|
+
return ctx ? requestHeads.get(ctx) : undefined;
|
|
157
|
+
});
|
|
158
|
+
/** Render a full HTML document for a request. */
|
|
159
|
+
export function renderRequestToPage(app, event, options) {
|
|
160
|
+
return createHtmlDocument(renderRequest(app, event), options);
|
|
161
|
+
}
|
|
162
|
+
/**
|
|
163
|
+
* Render a request to a web `ReadableStream<Uint8Array>`, works in Node 18+,
|
|
164
|
+
* Deno, Bun, and edge/worker runtimes (which want a web stream, not a Node
|
|
165
|
+
* Readable). The document **shell** (`<head>` + open `<body>`) is flushed
|
|
166
|
+
* immediately so the browser can start loading assets, then the app HTML
|
|
167
|
+
* (awaiting data loaders/Suspense) and the closing tags follow.
|
|
168
|
+
*
|
|
169
|
+
* Progressive out-of-order Suspense streaming is a later pass; today the body is
|
|
170
|
+
* a single chunk emitted after the async render resolves.
|
|
171
|
+
*/
|
|
172
|
+
export function renderToStream(app, event, options = {}) {
|
|
173
|
+
const encoder = new TextEncoder();
|
|
174
|
+
return new ReadableStream({
|
|
175
|
+
async start(controller) {
|
|
176
|
+
controller.enqueue(encoder.encode(documentShell(options))); // flush shell first
|
|
177
|
+
try {
|
|
178
|
+
const content = await renderRequestAsync(app, event); // awaits resources
|
|
179
|
+
controller.enqueue(encoder.encode(content));
|
|
180
|
+
}
|
|
181
|
+
catch (err) {
|
|
182
|
+
// SSR failed (e.g. backend down). The head/shell is already flushed (status 200),
|
|
183
|
+
// so we can't send a 500. Emit an EMPTY body and still close the document so it
|
|
184
|
+
// stays well-formed and the client bundle renders the app client-side (CSR
|
|
185
|
+
// fallback), degrade, never blank-and-truncate.
|
|
186
|
+
console.error('[fluixi] SSR render failed — falling back to client render:', err);
|
|
187
|
+
}
|
|
188
|
+
controller.enqueue(encoder.encode(documentClose(options)));
|
|
189
|
+
controller.close();
|
|
190
|
+
},
|
|
191
|
+
});
|
|
192
|
+
}
|
|
193
|
+
/**
|
|
194
|
+
* Render a request to a web `ReadableStream<Uint8Array>` of JUST the app content ,
|
|
195
|
+
* NO document shell. For hosts that own the surrounding HTML document (e.g. a
|
|
196
|
+
* `@fluixi/start` app streaming its `index.html` around the app body): the host
|
|
197
|
+
* flushes the document head first, then pipes this body stream into the mount point,
|
|
198
|
+
* then the document tail. The content includes the `__FX_DATA__` resource-transport
|
|
199
|
+
* script (it's part of the async render output), so hydration seeds without refetch.
|
|
200
|
+
*
|
|
201
|
+
* Single chunk today (the async render resolves fully before emitting); progressive
|
|
202
|
+
* out-of-order Suspense streaming is a later pass, same signature.
|
|
203
|
+
*/
|
|
204
|
+
export function renderToBodyStream(app, event) {
|
|
205
|
+
const encoder = new TextEncoder();
|
|
206
|
+
return new ReadableStream({
|
|
207
|
+
async start(controller) {
|
|
208
|
+
try {
|
|
209
|
+
controller.enqueue(encoder.encode(await renderRequestAsync(app, event)));
|
|
210
|
+
}
|
|
211
|
+
catch (err) {
|
|
212
|
+
// SSR failed (e.g. backend down) and the host already flushed the document head.
|
|
213
|
+
// Emit an EMPTY body and close cleanly so the page stays well-formed and the
|
|
214
|
+
// client bundle renders the app client-side, instead of erroring/truncating the
|
|
215
|
+
// stream into a blank page.
|
|
216
|
+
console.error('[fluixi] SSR render failed — falling back to client render:', err);
|
|
217
|
+
}
|
|
218
|
+
controller.close();
|
|
219
|
+
},
|
|
220
|
+
});
|
|
221
|
+
}
|
|
222
|
+
/**
|
|
223
|
+
* Server entry helper: returns render/page closures bound to an app.
|
|
224
|
+
*
|
|
225
|
+
* @example
|
|
226
|
+
* import { startServer } from '@fluixi/server';
|
|
227
|
+
* import App from './app';
|
|
228
|
+
* const { render, page } = startServer(App);
|
|
229
|
+
* // express: res.send(page(req.url))
|
|
230
|
+
*/
|
|
231
|
+
export function startServer(App) {
|
|
232
|
+
return {
|
|
233
|
+
render: (url) => renderRequest(App, { url }),
|
|
234
|
+
page: (url, opts) => renderRequestToPage(App, { url }, opts),
|
|
235
|
+
/** async render: awaits data loaders/Suspense */
|
|
236
|
+
renderAsync: (url) => renderRequestAsync(App, { url }),
|
|
237
|
+
/** async full-document render */
|
|
238
|
+
pageAsync: async (url, opts) => createHtmlDocument(await renderRequestAsync(App, { url }), opts),
|
|
239
|
+
/** web ReadableStream of the document (shell flushed first) */
|
|
240
|
+
stream: (url, opts) => renderToStream(App, { url }, opts),
|
|
241
|
+
/** web ReadableStream of the app body only (host owns the document) */
|
|
242
|
+
bodyStream: (url) => renderToBodyStream(App, { url }),
|
|
243
|
+
};
|
|
244
|
+
}
|
package/dist/index.mjs
ADDED
|
@@ -0,0 +1,187 @@
|
|
|
1
|
+
/*! @fluixi/server v1.0.0-alpha.100 | (c) 2026 Ibrahima Touré and Fluixi contributors | MIT */
|
|
2
|
+
|
|
3
|
+
// src/index.ts
|
|
4
|
+
import {
|
|
5
|
+
createComponent,
|
|
6
|
+
renderToString,
|
|
7
|
+
renderToStringAsync,
|
|
8
|
+
serializeNode,
|
|
9
|
+
setDataRedactor,
|
|
10
|
+
getRequestEvent,
|
|
11
|
+
getRequestContext,
|
|
12
|
+
getLocals,
|
|
13
|
+
getRequestLocals,
|
|
14
|
+
appendResponseHeader,
|
|
15
|
+
runWithRequestContext,
|
|
16
|
+
createRequestContext,
|
|
17
|
+
setRequestStore,
|
|
18
|
+
setRequestStoreIfUnset,
|
|
19
|
+
onRequestEnd,
|
|
20
|
+
endRequestContext,
|
|
21
|
+
isServer,
|
|
22
|
+
setServerMode
|
|
23
|
+
} from "@fluixi/dom";
|
|
24
|
+
import { createHead, setHeadScope, renderHead, encodeHeadMarker } from "@fluixi/head";
|
|
25
|
+
function resolveALS() {
|
|
26
|
+
const g = globalThis.AsyncLocalStorage;
|
|
27
|
+
if (g) return g;
|
|
28
|
+
const proc = globalThis.process;
|
|
29
|
+
try {
|
|
30
|
+
return proc?.getBuiltinModule?.("node:async_hooks")?.AsyncLocalStorage;
|
|
31
|
+
} catch {
|
|
32
|
+
return void 0;
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
var ALS = resolveALS();
|
|
36
|
+
if (ALS) {
|
|
37
|
+
setRequestStoreIfUnset(new ALS());
|
|
38
|
+
} else if (!isBrowser()) {
|
|
39
|
+
console.warn(
|
|
40
|
+
"[fluixi/server] AsyncLocalStorage unavailable — using a sync request store (no async isolation across concurrent requests)"
|
|
41
|
+
);
|
|
42
|
+
}
|
|
43
|
+
function isBrowser() {
|
|
44
|
+
return typeof document !== "undefined" || typeof window !== "undefined";
|
|
45
|
+
}
|
|
46
|
+
var EVENT_REPLAY_TYPES = ["click", "input", "change", "submit", "keydown"];
|
|
47
|
+
function eventCaptureScript() {
|
|
48
|
+
const t = JSON.stringify(EVENT_REPLAY_TYPES);
|
|
49
|
+
return `<script>(function(){var q=window.__FX_REPLAY__=[],t=${t},r=function(e){q.push({type:e.type,target:e.target})},i=0;for(;i<t.length;i++)document.addEventListener(t[i],r,true);window.__FX_REPLAY_STOP__=function(){for(var j=0;j<t.length;j++)document.removeEventListener(t[j],r,true)}})();<\/script>`;
|
|
50
|
+
}
|
|
51
|
+
function documentShell(options = {}) {
|
|
52
|
+
const { title = "Fluixi App", lang = "en", stylesheets = [], head = "", bodyAttributes = "", eventReplay = true } = options;
|
|
53
|
+
const styleTags = stylesheets.map((href) => `<link rel="stylesheet" href="${href}">`).join("\n ");
|
|
54
|
+
return `<!DOCTYPE html>
|
|
55
|
+
<html lang="${lang}">
|
|
56
|
+
<head>
|
|
57
|
+
<meta charset="UTF-8">
|
|
58
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
59
|
+
<title>${title}</title>
|
|
60
|
+
${eventReplay ? eventCaptureScript() : ""}
|
|
61
|
+
${styleTags}
|
|
62
|
+
${head}
|
|
63
|
+
</head>
|
|
64
|
+
<body${bodyAttributes ? " " + bodyAttributes : ""}>
|
|
65
|
+
`;
|
|
66
|
+
}
|
|
67
|
+
function documentClose(options = {}) {
|
|
68
|
+
const { scripts = [] } = options;
|
|
69
|
+
const scriptTags = scripts.map((src) => `<script type="module" src="${src}"><\/script>`).join("\n ");
|
|
70
|
+
return `
|
|
71
|
+
${scriptTags}
|
|
72
|
+
</body>
|
|
73
|
+
</html>`;
|
|
74
|
+
}
|
|
75
|
+
function createHtmlDocument(content, options = {}) {
|
|
76
|
+
return documentShell(options) + content + documentClose(options);
|
|
77
|
+
}
|
|
78
|
+
function renderRequest(app, event) {
|
|
79
|
+
return renderToString(() => createComponent(app, { url: event.url ?? "/" }), { event });
|
|
80
|
+
}
|
|
81
|
+
var ISO_REGISTRY_KEY = "__fluixi_iso_states__";
|
|
82
|
+
var ISO_SEED_PREFIX = "__iso:";
|
|
83
|
+
async function preloadServerState(event) {
|
|
84
|
+
const reg = globalThis[ISO_REGISTRY_KEY];
|
|
85
|
+
if (!reg || reg.size === 0) return;
|
|
86
|
+
const ctx = getRequestContext();
|
|
87
|
+
for (const [key, st] of reg) {
|
|
88
|
+
try {
|
|
89
|
+
const value = await st.server(event);
|
|
90
|
+
st.set(value);
|
|
91
|
+
ctx?.data.set(ISO_SEED_PREFIX + key, value);
|
|
92
|
+
} catch (err) {
|
|
93
|
+
console.error(`[fluixi] isomorphic state "${key}" failed to resolve on the server:`, err);
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
function renderRequestAsync(app, event) {
|
|
98
|
+
const head = createHead();
|
|
99
|
+
return renderToStringAsync(() => createComponent(app, { url: event.url ?? "/" }), {
|
|
100
|
+
event,
|
|
101
|
+
preload: (e) => {
|
|
102
|
+
const ctx = getRequestContext();
|
|
103
|
+
if (ctx) requestHeads.set(ctx, head);
|
|
104
|
+
return preloadServerState(e);
|
|
105
|
+
}
|
|
106
|
+
}).then((body) => encodeHeadMarker(renderHead(head)) + body);
|
|
107
|
+
}
|
|
108
|
+
var requestHeads = /* @__PURE__ */ new WeakMap();
|
|
109
|
+
setHeadScope(() => {
|
|
110
|
+
const ctx = getRequestContext();
|
|
111
|
+
return ctx ? requestHeads.get(ctx) : void 0;
|
|
112
|
+
});
|
|
113
|
+
function renderRequestToPage(app, event, options) {
|
|
114
|
+
return createHtmlDocument(renderRequest(app, event), options);
|
|
115
|
+
}
|
|
116
|
+
function renderToStream(app, event, options = {}) {
|
|
117
|
+
const encoder = new TextEncoder();
|
|
118
|
+
return new ReadableStream({
|
|
119
|
+
async start(controller) {
|
|
120
|
+
controller.enqueue(encoder.encode(documentShell(options)));
|
|
121
|
+
try {
|
|
122
|
+
const content = await renderRequestAsync(app, event);
|
|
123
|
+
controller.enqueue(encoder.encode(content));
|
|
124
|
+
} catch (err) {
|
|
125
|
+
console.error("[fluixi] SSR render failed — falling back to client render:", err);
|
|
126
|
+
}
|
|
127
|
+
controller.enqueue(encoder.encode(documentClose(options)));
|
|
128
|
+
controller.close();
|
|
129
|
+
}
|
|
130
|
+
});
|
|
131
|
+
}
|
|
132
|
+
function renderToBodyStream(app, event) {
|
|
133
|
+
const encoder = new TextEncoder();
|
|
134
|
+
return new ReadableStream({
|
|
135
|
+
async start(controller) {
|
|
136
|
+
try {
|
|
137
|
+
controller.enqueue(encoder.encode(await renderRequestAsync(app, event)));
|
|
138
|
+
} catch (err) {
|
|
139
|
+
console.error("[fluixi] SSR render failed — falling back to client render:", err);
|
|
140
|
+
}
|
|
141
|
+
controller.close();
|
|
142
|
+
}
|
|
143
|
+
});
|
|
144
|
+
}
|
|
145
|
+
function startServer(App) {
|
|
146
|
+
return {
|
|
147
|
+
render: (url) => renderRequest(App, { url }),
|
|
148
|
+
page: (url, opts) => renderRequestToPage(App, { url }, opts),
|
|
149
|
+
/** async render: awaits data loaders/Suspense */
|
|
150
|
+
renderAsync: (url) => renderRequestAsync(App, { url }),
|
|
151
|
+
/** async full-document render */
|
|
152
|
+
pageAsync: async (url, opts) => createHtmlDocument(await renderRequestAsync(App, { url }), opts),
|
|
153
|
+
/** web ReadableStream of the document (shell flushed first) */
|
|
154
|
+
stream: (url, opts) => renderToStream(App, { url }, opts),
|
|
155
|
+
/** web ReadableStream of the app body only (host owns the document) */
|
|
156
|
+
bodyStream: (url) => renderToBodyStream(App, { url })
|
|
157
|
+
};
|
|
158
|
+
}
|
|
159
|
+
export {
|
|
160
|
+
EVENT_REPLAY_TYPES,
|
|
161
|
+
appendResponseHeader,
|
|
162
|
+
createHtmlDocument,
|
|
163
|
+
createRequestContext,
|
|
164
|
+
endRequestContext,
|
|
165
|
+
eventCaptureScript,
|
|
166
|
+
getLocals,
|
|
167
|
+
getRequestContext,
|
|
168
|
+
getRequestEvent,
|
|
169
|
+
getRequestLocals,
|
|
170
|
+
isServer,
|
|
171
|
+
onRequestEnd,
|
|
172
|
+
preloadServerState,
|
|
173
|
+
renderRequest,
|
|
174
|
+
renderRequestAsync,
|
|
175
|
+
renderRequestToPage,
|
|
176
|
+
renderToBodyStream,
|
|
177
|
+
renderToStream,
|
|
178
|
+
renderToString,
|
|
179
|
+
renderToStringAsync,
|
|
180
|
+
runWithRequestContext,
|
|
181
|
+
serializeNode,
|
|
182
|
+
setDataRedactor,
|
|
183
|
+
setRequestStore,
|
|
184
|
+
setRequestStoreIfUnset,
|
|
185
|
+
setServerMode,
|
|
186
|
+
startServer
|
|
187
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"fileNames":["../../../node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es5.d.ts","../../../node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es2015.d.ts","../../../node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es2016.d.ts","../../../node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es2017.d.ts","../../../node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es2018.d.ts","../../../node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es2019.d.ts","../../../node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es2020.d.ts","../../../node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es2021.d.ts","../../../node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.dom.d.ts","../../../node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.dom.iterable.d.ts","../../../node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es2015.core.d.ts","../../../node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es2015.collection.d.ts","../../../node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es2015.generator.d.ts","../../../node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es2015.iterable.d.ts","../../../node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es2015.promise.d.ts","../../../node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es2015.proxy.d.ts","../../../node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es2015.reflect.d.ts","../../../node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es2015.symbol.d.ts","../../../node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts","../../../node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es2016.array.include.d.ts","../../../node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es2016.intl.d.ts","../../../node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es2017.arraybuffer.d.ts","../../../node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es2017.date.d.ts","../../../node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es2017.object.d.ts","../../../node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es2017.sharedmemory.d.ts","../../../node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es2017.string.d.ts","../../../node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es2017.intl.d.ts","../../../node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es2017.typedarrays.d.ts","../../../node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es2018.asyncgenerator.d.ts","../../../node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es2018.asynciterable.d.ts","../../../node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es2018.intl.d.ts","../../../node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es2018.promise.d.ts","../../../node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es2018.regexp.d.ts","../../../node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es2019.array.d.ts","../../../node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es2019.object.d.ts","../../../node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es2019.string.d.ts","../../../node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es2019.symbol.d.ts","../../../node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es2019.intl.d.ts","../../../node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es2020.bigint.d.ts","../../../node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es2020.date.d.ts","../../../node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es2020.promise.d.ts","../../../node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es2020.sharedmemory.d.ts","../../../node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es2020.string.d.ts","../../../node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es2020.symbol.wellknown.d.ts","../../../node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es2020.intl.d.ts","../../../node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es2020.number.d.ts","../../../node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es2021.promise.d.ts","../../../node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es2021.string.d.ts","../../../node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es2021.weakref.d.ts","../../../node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es2021.intl.d.ts","../../../node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es2025.intl.d.ts","../../../node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.esnext.intl.d.ts","../../../node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.esnext.temporal.d.ts","../../../node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.decorators.d.ts","../../../node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.decorators.legacy.d.ts","../../../node_modules/.pnpm/tslib@2.8.1/node_modules/tslib/tslib.d.ts","../../../node_modules/.pnpm/tslib@2.8.1/node_modules/tslib/modules/index.d.ts","../../dom/dist/lib/dom/utils.d.ts","../../dom/dist/lib/dom/runtime.d.ts","../../reactive/dist/version.generated.d.ts","../../reactive/dist/lib/observable/types.d.ts","../../reactive/dist/lib/observable/subscription.d.ts","../../reactive/dist/lib/observable/observable.d.ts","../../reactive/dist/lib/observable/index.d.ts","../../reactive/dist/lib/subject.d.ts","../../reactive/dist/lib/signal/graph/detect.d.ts","../../reactive/dist/lib/signal/graph/derived.d.ts","../../reactive/dist/lib/signal/graph/runtime.d.ts","../../reactive/dist/lib/signal/graph/compat.d.ts","../../reactive/dist/lib/signal/graph/children.d.ts","../../reactive/dist/lib/signal/graph/ssr-hooks.d.ts","../../reactive/dist/lib/signal/signal.d.ts","../../reactive/dist/lib/signal/list.d.ts","../../reactive/dist/lib/signal/graph/resource.d.ts","../../reactive/dist/lib/signal/graph/debounced.d.ts","../../reactive/dist/lib/signal/graph/suspense.d.ts","../../reactive/dist/lib/signal/graph/error-boundary.d.ts","../../reactive/dist/lib/signal/graph/core.d.ts","../../reactive/dist/lib/signal/graph/index.d.ts","../../reactive/dist/lib/signal/graph/signal-next.d.ts","../../reactive/dist/lib/signal/graph/observe.d.ts","../../reactive/dist/lib/signal/graph/state.d.ts","../../reactive/dist/lib/signal/api.d.ts","../../reactive/dist/lib/signal/resource-api.d.ts","../../reactive/dist/lib/signal/index.d.ts","../../utils/dist/lib/maths/types/basic.d.ts","../../utils/dist/lib/maths/types/advanced.d.ts","../../utils/dist/lib/maths/types/negative.d.ts","../../utils/dist/lib/maths/types/operations.d.ts","../../utils/dist/lib/maths/types/index.d.ts","../../utils/dist/lib/maths/constants.d.ts","../../utils/dist/lib/maths/guards.d.ts","../../utils/dist/lib/maths/fn/basic.d.ts","../../utils/dist/lib/maths/fn/advanced.d.ts","../../utils/dist/lib/maths/fn/vector.d.ts","../../utils/dist/lib/maths/fn/complex.d.ts","../../utils/dist/lib/maths/fn/trigo.d.ts","../../utils/dist/lib/maths/fn/index.d.ts","../../utils/dist/lib/maths/formatter.d.ts","../../utils/dist/lib/maths/random.d.ts","../../utils/dist/lib/maths/parser.d.ts","../../utils/dist/lib/maths/index.d.ts","../../utils/dist/lib/primitive/string/string.d.ts","../../utils/dist/lib/primitive/string/types.d.ts","../../utils/dist/lib/primitive/string/index.d.ts","../../utils/dist/lib/primitive/boolean/types.d.ts","../../utils/dist/lib/primitive/boolean/boolean.d.ts","../../utils/dist/lib/primitive/boolean/index.d.ts","../../utils/dist/lib/primitive/date/types.d.ts","../../utils/dist/lib/primitive/date/date.d.ts","../../utils/dist/lib/primitive/date/index.d.ts","../../utils/dist/lib/primitive/types.d.ts","../../utils/dist/lib/primitive/index.d.ts","../../utils/dist/lib/object/types.d.ts","../../utils/dist/lib/object/object.d.ts","../../utils/dist/lib/object/diff.d.ts","../../utils/dist/lib/object/selector.d.ts","../../utils/dist/lib/object/merge.d.ts","../../utils/dist/lib/object/clone.d.ts","../../utils/dist/lib/object/getter-setter.d.ts","../../utils/dist/lib/object/omit.d.ts","../../utils/dist/lib/object/transform.d.ts","../../utils/dist/lib/object/reconcile.d.ts","../../utils/dist/lib/object/sort.d.ts","../../utils/dist/lib/object/utils.d.ts","../../utils/dist/lib/object/index.d.ts","../../reactive/dist/lib/store/setter.types.d.ts","../../reactive/dist/lib/store/types.d.ts","../../reactive/dist/lib/store/store.d.ts","../../reactive/dist/lib/store/utils.d.ts","../../reactive/dist/lib/store/api.d.ts","../../reactive/dist/lib/store/index.d.ts","../../reactive/dist/lib/signal/utilities.d.ts","../../reactive/dist/lib/signal/cached-resource.d.ts","../../reactive/dist/lib/index.d.ts","../../reactive/dist/index.d.ts","../../dom/dist/lib/dom/types.d.ts","../../dom/dist/lib/dom/integration.d.ts","../../dom/dist/lib/dom/server/host.d.ts","../../dom/dist/lib/dom/island.d.ts","../../dom/dist/lib/dom/hydration.d.ts","../../dom/dist/lib/dom/hydration-state.d.ts","../../dom/dist/lib/dom/index.d.ts","../../dom/dist/lib/shared/types.d.ts","../../dom/dist/lib/html.d.ts","../../dom/dist/lib/dom/dynamic-element.d.ts","../../dom/dist/lib/component/modifiers.d.ts","../../dom/dist/lib/component/index.d.ts","../../dom/dist/lib/flow/show.d.ts","../../dom/dist/lib/flow/for.d.ts","../../dom/dist/lib/flow/index-flow.d.ts","../../dom/dist/lib/flow/switch.d.ts","../../dom/dist/lib/flow/dynamic.d.ts","../../dom/dist/lib/flow/portal.d.ts","../../dom/dist/lib/flow/client-only.d.ts","../../dom/dist/lib/flow/error-boundary.d.ts","../../dom/dist/lib/flow/class-map.d.ts","../../dom/dist/lib/flow/style-map.d.ts","../../dom/dist/lib/flow/index.d.ts","../../dom/dist/lib/dom/server/nodes.d.ts","../../dom/dist/lib/dom/server/serialize.d.ts","../../dom/dist/lib/dom/server/fx-data.d.ts","../../dom/dist/lib/dom/server/request-context.d.ts","../../dom/dist/lib/dom/server/render.d.ts","../../dom/dist/lib/dom/server/index.d.ts","../../dom/dist/lib/index.d.ts","../../dom/dist/version.generated.d.ts","../../dom/dist/lib/dom/versions.d.ts","../../dom/dist/index.d.ts","../../head/dist/types.d.ts","../../head/dist/core.d.ts","../../head/dist/serialize.d.ts","../../head/dist/transport.d.ts","../../head/dist/reconcile.d.ts","../../head/dist/jsonld.d.ts","../../head/dist/components.d.ts","../../head/dist/sitemap.d.ts","../../head/dist/index.d.ts","../src/index.ts","../../../node_modules/.pnpm/@types+node@18.16.9/node_modules/@types/node/assert.d.ts","../../../node_modules/.pnpm/@types+node@18.16.9/node_modules/@types/node/assert/strict.d.ts","../../../node_modules/.pnpm/@types+node@18.16.9/node_modules/@types/node/globals.d.ts","../../../node_modules/.pnpm/@types+node@18.16.9/node_modules/@types/node/async_hooks.d.ts","../../../node_modules/.pnpm/@types+node@18.16.9/node_modules/@types/node/buffer.d.ts","../../../node_modules/.pnpm/@types+node@18.16.9/node_modules/@types/node/child_process.d.ts","../../../node_modules/.pnpm/@types+node@18.16.9/node_modules/@types/node/cluster.d.ts","../../../node_modules/.pnpm/@types+node@18.16.9/node_modules/@types/node/console.d.ts","../../../node_modules/.pnpm/@types+node@18.16.9/node_modules/@types/node/constants.d.ts","../../../node_modules/.pnpm/@types+node@18.16.9/node_modules/@types/node/crypto.d.ts","../../../node_modules/.pnpm/@types+node@18.16.9/node_modules/@types/node/dgram.d.ts","../../../node_modules/.pnpm/@types+node@18.16.9/node_modules/@types/node/diagnostics_channel.d.ts","../../../node_modules/.pnpm/@types+node@18.16.9/node_modules/@types/node/dns.d.ts","../../../node_modules/.pnpm/@types+node@18.16.9/node_modules/@types/node/dns/promises.d.ts","../../../node_modules/.pnpm/@types+node@18.16.9/node_modules/@types/node/domain.d.ts","../../../node_modules/.pnpm/@types+node@18.16.9/node_modules/@types/node/dom-events.d.ts","../../../node_modules/.pnpm/@types+node@18.16.9/node_modules/@types/node/events.d.ts","../../../node_modules/.pnpm/@types+node@18.16.9/node_modules/@types/node/fs.d.ts","../../../node_modules/.pnpm/@types+node@18.16.9/node_modules/@types/node/fs/promises.d.ts","../../../node_modules/.pnpm/@types+node@18.16.9/node_modules/@types/node/http.d.ts","../../../node_modules/.pnpm/@types+node@18.16.9/node_modules/@types/node/http2.d.ts","../../../node_modules/.pnpm/@types+node@18.16.9/node_modules/@types/node/https.d.ts","../../../node_modules/.pnpm/@types+node@18.16.9/node_modules/@types/node/inspector.d.ts","../../../node_modules/.pnpm/@types+node@18.16.9/node_modules/@types/node/module.d.ts","../../../node_modules/.pnpm/@types+node@18.16.9/node_modules/@types/node/net.d.ts","../../../node_modules/.pnpm/@types+node@18.16.9/node_modules/@types/node/os.d.ts","../../../node_modules/.pnpm/@types+node@18.16.9/node_modules/@types/node/path.d.ts","../../../node_modules/.pnpm/@types+node@18.16.9/node_modules/@types/node/perf_hooks.d.ts","../../../node_modules/.pnpm/@types+node@18.16.9/node_modules/@types/node/process.d.ts","../../../node_modules/.pnpm/@types+node@18.16.9/node_modules/@types/node/punycode.d.ts","../../../node_modules/.pnpm/@types+node@18.16.9/node_modules/@types/node/querystring.d.ts","../../../node_modules/.pnpm/@types+node@18.16.9/node_modules/@types/node/readline.d.ts","../../../node_modules/.pnpm/@types+node@18.16.9/node_modules/@types/node/readline/promises.d.ts","../../../node_modules/.pnpm/@types+node@18.16.9/node_modules/@types/node/repl.d.ts","../../../node_modules/.pnpm/@types+node@18.16.9/node_modules/@types/node/stream.d.ts","../../../node_modules/.pnpm/@types+node@18.16.9/node_modules/@types/node/stream/promises.d.ts","../../../node_modules/.pnpm/@types+node@18.16.9/node_modules/@types/node/stream/consumers.d.ts","../../../node_modules/.pnpm/@types+node@18.16.9/node_modules/@types/node/stream/web.d.ts","../../../node_modules/.pnpm/@types+node@18.16.9/node_modules/@types/node/string_decoder.d.ts","../../../node_modules/.pnpm/@types+node@18.16.9/node_modules/@types/node/test.d.ts","../../../node_modules/.pnpm/@types+node@18.16.9/node_modules/@types/node/timers.d.ts","../../../node_modules/.pnpm/@types+node@18.16.9/node_modules/@types/node/timers/promises.d.ts","../../../node_modules/.pnpm/@types+node@18.16.9/node_modules/@types/node/tls.d.ts","../../../node_modules/.pnpm/@types+node@18.16.9/node_modules/@types/node/trace_events.d.ts","../../../node_modules/.pnpm/@types+node@18.16.9/node_modules/@types/node/tty.d.ts","../../../node_modules/.pnpm/@types+node@18.16.9/node_modules/@types/node/url.d.ts","../../../node_modules/.pnpm/@types+node@18.16.9/node_modules/@types/node/util.d.ts","../../../node_modules/.pnpm/@types+node@18.16.9/node_modules/@types/node/v8.d.ts","../../../node_modules/.pnpm/@types+node@18.16.9/node_modules/@types/node/vm.d.ts","../../../node_modules/.pnpm/@types+node@18.16.9/node_modules/@types/node/wasi.d.ts","../../../node_modules/.pnpm/@types+node@18.16.9/node_modules/@types/node/worker_threads.d.ts","../../../node_modules/.pnpm/@types+node@18.16.9/node_modules/@types/node/zlib.d.ts","../../../node_modules/.pnpm/@types+node@18.16.9/node_modules/@types/node/globals.global.d.ts","../../../node_modules/.pnpm/@types+node@18.16.9/node_modules/@types/node/index.d.ts"],"fileIdsList":[[180,226],[183,226],[184,189,217,226],[185,196,197,204,214,225,226],[185,186,196,204,226],[187,226],[188,189,197,205,226],[189,214,222,226],[190,192,196,204,226],[191,226],[192,193,226],[196,226],[194,196,226],[196,197,198,214,225,226],[196,197,198,211,214,217,226],[226,230],[226],[192,196,199,204,214,225,226],[196,197,199,200,204,214,222,225,226],[199,201,214,222,225,226],[180,181,182,183,184,185,186,187,188,189,190,191,192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,223,224,225,226,227,228,229,230,231,232],[196,202,226],[203,225,226],[192,196,204,214,226],[205,226],[206,226],[183,207,226],[208,224,226,230],[209,226],[210,226],[196,211,212,226],[211,213,226,228],[184,196,214,215,216,217,226],[184,214,216,226],[214,215,226],[217,226],[218,226],[196,220,221,226],[220,221,226],[189,204,214,222,226],[223,226],[204,224,226],[184,199,210,225,226],[189,226],[214,226,227],[226,228],[226,229],[184,189,196,198,207,214,225,226,228,230],[214,226,231],[56,226],[166,167,168,226],[147,226],[85,226],[58,59,137,138,139,140,141,142,226],[137,226],[139,160,161,162,163,164,226],[139,226],[163,226],[136,226],[144,226],[85,149,150,151,152,153,154,155,156,157,158,226],[85,144,226],[137,138,143,144,145,146,148,159,165,226],[170,226],[85,170,226],[170,171,172,173,174,175,176,177,226],[171,226],[172,226],[135,226],[60,64,65,85,132,133,134,226],[61,62,63,226],[62,226],[61,226],[68,72,226],[71,72,226],[69,226],[68,226],[69,74,226],[72,226],[78,226],[66,67,68,69,70,71,72,73,74,75,76,77,79,226],[80,81,82,83,84,226],[74,226],[63,66,67,70,71,226],[63,72,226],[129,226],[128,129,130,131,226],[126,226],[63,85,127,128,226],[128,226],[64,226],[57,169,178,226],[87,226],[86,226],[93,94,95,96,97,226],[90,226],[90,91,92,98,99,100,101,226],[86,87,89,226],[86,88,226],[114,226],[114,115,116,117,118,119,120,121,122,123,124,125,226],[102,113,226],[113,114,226],[106,226],[106,107,226],[109,226],[109,110,226],[105,108,111,112,226],[103,104,226]],"fileInfos":[{"version":"bcd24271a113971ba9eb71ff8cb01bc6b0f872a85c23fdbe5d93065b375933cd","affectsGlobalScope":true,"impliedFormat":1},{"version":"3f88bedbeb09c6f5a6645cb24c7c55f1aa22d19ae96c8e6959cbd8b85a707bc6","impliedFormat":1},{"version":"7fe93b39b810eadd916be8db880dd7f0f7012a5cc6ffb62de8f62a2117fa6f1f","impliedFormat":1},{"version":"bb0074cc08b84a2374af33d8bf044b80851ccc9e719a5e202eacf40db2c31600","impliedFormat":1},{"version":"1a7daebe4f45fb03d9ec53d60008fbf9ac45a697fdc89e4ce218bc94b94f94d6","impliedFormat":1},{"version":"f94b133a3cb14a288803be545ac2683e0d0ff6661bcd37e31aaaec54fc382aed","impliedFormat":1},{"version":"f59d0650799f8782fd74cf73c19223730c6d1b9198671b1c5b3a38e1188b5953","impliedFormat":1},{"version":"8a15b4607d9a499e2dbeed9ec0d3c0d7372c850b2d5f1fb259e8f6d41d468a84","impliedFormat":1},{"version":"d6b1eba8496bdd0eed6fc8a685768fe01b2da4a0388b5fe7df558290bffcf32f","affectsGlobalScope":true,"impliedFormat":1},{"version":"7f57fc4404ff020bc45b9c620aff2b40f700b95fe31164024c453a5e3c163c54","impliedFormat":1},{"version":"eadcffda2aa84802c73938e589b9e58248d74c59cb7fcbca6474e3435ac15504","affectsGlobalScope":true,"impliedFormat":1},{"version":"105ba8ff7ba746404fe1a2e189d1d3d2e0eb29a08c18dded791af02f29fb4711","affectsGlobalScope":true,"impliedFormat":1},{"version":"00343ca5b2e3d48fa5df1db6e32ea2a59afab09590274a6cccb1dbae82e60c7c","affectsGlobalScope":true,"impliedFormat":1},{"version":"ebd9f816d4002697cb2864bea1f0b70a103124e18a8cd9645eeccc09bdf80ab4","affectsGlobalScope":true,"impliedFormat":1},{"version":"2c1afac30a01772cd2a9a298a7ce7706b5892e447bb46bdbeef720f7b5da77ad","affectsGlobalScope":true,"impliedFormat":1},{"version":"7b0225f483e4fa685625ebe43dd584bb7973bbd84e66a6ba7bbe175ee1048b4f","affectsGlobalScope":true,"impliedFormat":1},{"version":"c0a4b8ac6ce74679c1da2b3795296f5896e31c38e888469a8e0f99dc3305de60","affectsGlobalScope":true,"impliedFormat":1},{"version":"3084a7b5f569088e0146533a00830e206565de65cae2239509168b11434cd84f","affectsGlobalScope":true,"impliedFormat":1},{"version":"c5079c53f0f141a0698faa903e76cb41cd664e3efb01cc17a5c46ec2eb0bef42","affectsGlobalScope":true,"impliedFormat":1},{"version":"32cafbc484dea6b0ab62cf8473182bbcb23020d70845b406f80b7526f38ae862","affectsGlobalScope":true,"impliedFormat":1},{"version":"fca4cdcb6d6c5ef18a869003d02c9f0fd95df8cfaf6eb431cd3376bc034cad36","affectsGlobalScope":true,"impliedFormat":1},{"version":"b93ec88115de9a9dc1b602291b85baf825c85666bf25985cc5f698073892b467","affectsGlobalScope":true,"impliedFormat":1},{"version":"f5c06dcc3fe849fcb297c247865a161f995cc29de7aa823afdd75aaaddc1419b","affectsGlobalScope":true,"impliedFormat":1},{"version":"b77e16112127a4b169ef0b8c3a4d730edf459c5f25fe52d5e436a6919206c4d7","affectsGlobalScope":true,"impliedFormat":1},{"version":"fbffd9337146eff822c7c00acbb78b01ea7ea23987f6c961eba689349e744f8c","affectsGlobalScope":true,"impliedFormat":1},{"version":"a995c0e49b721312f74fdfb89e4ba29bd9824c770bbb4021d74d2bf560e4c6bd","affectsGlobalScope":true,"impliedFormat":1},{"version":"c7b3542146734342e440a84b213384bfa188835537ddbda50d30766f0593aff9","affectsGlobalScope":true,"impliedFormat":1},{"version":"ce6180fa19b1cccd07ee7f7dbb9a367ac19c0ed160573e4686425060b6df7f57","affectsGlobalScope":true,"impliedFormat":1},{"version":"3f02e2476bccb9dbe21280d6090f0df17d2f66b74711489415a8aa4df73c9675","affectsGlobalScope":true,"impliedFormat":1},{"version":"45e3ab34c1c013c8ab2dc1ba4c80c780744b13b5676800ae2e3be27ae862c40c","affectsGlobalScope":true,"impliedFormat":1},{"version":"805c86f6cca8d7702a62a844856dbaa2a3fd2abef0536e65d48732441dde5b5b","affectsGlobalScope":true,"impliedFormat":1},{"version":"e42e397f1a5a77994f0185fd1466520691456c772d06bf843e5084ceb879a0ad","affectsGlobalScope":true,"impliedFormat":1},{"version":"f4c2b41f90c95b1c532ecc874bd3c111865793b23aebcc1c3cbbabcd5d76ffb0","affectsGlobalScope":true,"impliedFormat":1},{"version":"ab26191cfad5b66afa11b8bf935ef1cd88fabfcb28d30b2dfa6fad877d050332","affectsGlobalScope":true,"impliedFormat":1},{"version":"2088bc26531e38fb05eedac2951480db5309f6be3fa4a08d2221abb0f5b4200d","affectsGlobalScope":true,"impliedFormat":1},{"version":"cb9d366c425fea79716a8fb3af0d78e6b22ebbab3bd64d25063b42dc9f531c1e","affectsGlobalScope":true,"impliedFormat":1},{"version":"500934a8089c26d57ebdb688fc9757389bb6207a3c8f0674d68efa900d2abb34","affectsGlobalScope":true,"impliedFormat":1},{"version":"689da16f46e647cef0d64b0def88910e818a5877ca5379ede156ca3afb780ac3","affectsGlobalScope":true,"impliedFormat":1},{"version":"bc21cc8b6fee4f4c2440d08035b7ea3c06b3511314c8bab6bef7a92de58a2593","affectsGlobalScope":true,"impliedFormat":1},{"version":"7ca53d13d2957003abb47922a71866ba7cb2068f8d154877c596d63c359fed25","affectsGlobalScope":true,"impliedFormat":1},{"version":"54725f8c4df3d900cb4dac84b64689ce29548da0b4e9b7c2de61d41c79293611","affectsGlobalScope":true,"impliedFormat":1},{"version":"e5594bc3076ac29e6c1ebda77939bc4c8833de72f654b6e376862c0473199323","affectsGlobalScope":true,"impliedFormat":1},{"version":"2f3eb332c2d73e729f3364fcc0c2b375e72a121e8157d25a82d67a138c83a95c","affectsGlobalScope":true,"impliedFormat":1},{"version":"6f4427f9642ce8d500970e4e69d1397f64072ab73b97e476b4002a646ac743b1","affectsGlobalScope":true,"impliedFormat":1},{"version":"48915f327cd1dea4d7bd358d9dc7732f58f9e1626a29cc0c05c8c692419d9bb7","affectsGlobalScope":true,"impliedFormat":1},{"version":"b7bf9377723203b5a6a4b920164df22d56a43f593269ba6ae1fdc97774b68855","affectsGlobalScope":true,"impliedFormat":1},{"version":"db9709688f82c9e5f65a119c64d835f906efe5f559d08b11642d56eb85b79357","affectsGlobalScope":true,"impliedFormat":1},{"version":"4b25b8c874acd1a4cf8444c3617e037d444d19080ac9f634b405583fd10ce1f7","affectsGlobalScope":true,"impliedFormat":1},{"version":"37be57d7c90cf1f8112ee2636a068d8fd181289f82b744160ec56a7dc158a9f5","affectsGlobalScope":true,"impliedFormat":1},{"version":"a917a49ac94cd26b754ab84e113369a75d1a47a710661d7cd25e961cc797065f","affectsGlobalScope":true,"impliedFormat":1},{"version":"ffbe6d7b295306b2ba88030f65b74c107d8d99bdcf596ea99c62a02f606108b0","affectsGlobalScope":true,"impliedFormat":1},{"version":"379bc41580c2d774f82e828c70308f24a005b490c25ba34d679d84bcf05c3d9d","affectsGlobalScope":true,"impliedFormat":1},{"version":"4ffedae1d1c2d53fdbca1c96d3c7dda544281f7d262f99b6880634f8fd8d9820","affectsGlobalScope":true,"impliedFormat":1},{"version":"1ce14b81c5cc821994aa8ec1d42b220dd41b27fcc06373bce3958af7421b77d4","affectsGlobalScope":true,"impliedFormat":1},{"version":"b3a048b3e9302ef9a34ef4ebb9aecfb28b66abb3bce577206a79fee559c230da","affectsGlobalScope":true,"impliedFormat":1},{"version":"a6a5253138c5432c68a1510c70fe78a644fe2e632111ba778e1978010d6edfec","impliedFormat":1},{"version":"b8f34dd1757f68e03262b1ca3ddfa668a855b872f8bdd5224d6f993a7b37dc2c","impliedFormat":99},{"version":"bd215d8b222602de406274da53dde3bfc376b02878d5e82fc1d0f9d2d99ce8b6","impliedFormat":99},{"version":"71965158df2f374aeb52da232328cbb43e9929e9f8b9386a2adc759576ecf6c7","impliedFormat":99},{"version":"a7b66ad2448b89653c0fba538f49ac66d93b77278a4ff9cbf269d91b2151ecf3","impliedFormat":99},{"version":"e592cf1b998ce8043e72ca38e2f40c5631e65e937e3102223f7086140bf979a3","impliedFormat":99},{"version":"8ae924f7e7dae8cd2f21420226a0018ff1fc4535941d1872d8c2aa7590118aa2","impliedFormat":99},{"version":"0c3793803047eda869ccbb4f440ab8b50cba134ae61773e95136e801c65f1333","impliedFormat":99},{"version":"e6597aaf78157a53337c8794d2f7eee5eecef77a6ec0c60480c74a936811fa36","impliedFormat":99},{"version":"7112073e38bc7d171cbc5530734f550065ecbc76eb302319c5e8a06105dae5bb","impliedFormat":99},{"version":"3ea055a32e8f15a469a8adf7b16fc5d3a013b2c6a2e6decd0bb66ed838c66fa9","impliedFormat":99},{"version":"abb17955db6c97f3fcf56dd61a60586e04a89a97dfe4c8597124a580d877dde6","impliedFormat":99},{"version":"b1d8d5b3bcf1304bb99ffaeca1b66e30dea68d054cb9ecc9d365945819b4601a","impliedFormat":99},{"version":"c933050f557af5907141168bbe36a4a7bdb54a1a0ec4190ede00cc4cfcec1e5f","impliedFormat":99},{"version":"e8be3e24c3b98c301590ee0fefc462accc9a0f1fa674f62a3b63be9786ef9a99","impliedFormat":99},{"version":"9f1d76bf48b9aaba3daa91a234d570e3426c613a6c436308e324b520d542e33c","impliedFormat":99},{"version":"87065d90999e14fb6eb227a6640afdb860243d1ae9cc637d2ea505e4d1e01e4a","impliedFormat":99},{"version":"64c90d3fa68f87ab2bec298c44f5f4d6698621c259d5dc64971a048e95c47237","impliedFormat":99},{"version":"8a2b5adb6cd6692e133d9e7dd52aa8732ccf44043a4d2965811694689fc6642b","impliedFormat":99},{"version":"f69376437f2c5874af88a65cf9e677083eef9ae87912d4f4e16499689432978a","impliedFormat":99},{"version":"c03135439ad665f4a011a75586bf96098f6fe0b0716e78afc8cdf651bcc8f879","impliedFormat":99},{"version":"290111961dc134d534be036cd591c09a0e65ceed2fcf9aa9666ae2bcdac7034f","impliedFormat":99},{"version":"e6befaa4e35a30b2cd7e48727aa08be84683b2a25d5d613b5d26931500dc12c7","impliedFormat":99},{"version":"814aa42f7acbc916edba8225c5046594e9c53a6c383c04e15e6d1434d338a24e","impliedFormat":99},{"version":"d47aedb715ded67f55d9050634dd26078a0d1a00ec320f84cc32675f4394184d","impliedFormat":99},{"version":"b9e1f1907158fb4a3213ddb5c081531e29a0fda11f388f65050cd91434256bf6","impliedFormat":99},{"version":"77cc564e0e95d2c072e10bf0bedc31165b7b575cc7a074f2492f5773b69944e3","impliedFormat":99},{"version":"fda8abeadf217236d1a7f759850a8ac2c35ffec28efc0e37c5125cbfa58a2039","impliedFormat":99},{"version":"0cfd1c3d95626230597d04cc568e4e5f715d6b2ac72c67594ec5f288b415f390","impliedFormat":99},{"version":"60c5aa29dd3b06180a64dd460164b15e13179d79a56a63764dd903e74a6dac5d","impliedFormat":99},{"version":"631287e5e4a8a6ff2348789b7d2d00944c0f09ff3fed60cc3642323a1ff0ed4a","impliedFormat":99},{"version":"4f24eafbd6e05dd55f4597c6d286171fbe5066785625c482ab5c5cbba2fc7487","impliedFormat":99},{"version":"e9ad8fb60df94fd4f929f944a12d496271d6523e69d5ad4de20fc080a0a30711","impliedFormat":99},{"version":"a928f91a183425984c472e4d2763f7649e8d63c92c74a2fa59482ad8905bc664","impliedFormat":99},{"version":"c323e45a420e39e384e86db3e4470969016e8f507e04a9ceff1f073d8e5efeff","impliedFormat":99},{"version":"120b522225d94dea3356d056952f0ca9c626a4643a7734fbff1b031f16a0cb65","impliedFormat":99},{"version":"52a743346fe3f9758188a0ba974989e2ec948d8bb145539b6b6d6058204f2612","impliedFormat":99},{"version":"b19bb5d1b4f1ed34aad8e57dc096f7f333dc2fccb0a86633b9c8405c4797b190","impliedFormat":99},{"version":"fde9c3aaca2fb4f489fe2c25d3d0a5d56c145272cf92c6fd1f39f41589d9d0b1","impliedFormat":99},{"version":"2289a9520455d5a74bff1f23ddf0bee2593baedb8b9cda9c3e8720ca66338f65","impliedFormat":99},{"version":"1ff7de3d6cb03553a07592092fcd7a0ed61a88c6be9f5344239ac247be712cfd","impliedFormat":99},{"version":"b071dcadeb17235e2a1116231ca370bac5c97ec090fc73b3736791cb0a2aa91d","impliedFormat":99},{"version":"b4ed0f4d07ca274437eb9d49400de8c81659760e59507f08b94442873eb49a25","impliedFormat":99},{"version":"88978beb444b1d65c0f48d1099717d2a935ce74d9e3e1411bcaa1fe497910ab6","impliedFormat":99},{"version":"712fdf289306e77c2c097843e29560d99ff83bd336da277498ea18ca8cd999f0","impliedFormat":99},{"version":"ceb05e55219637c8dcb77490777c52e537363adc0a060af39cc95d46310f2128","impliedFormat":99},{"version":"a1b05ca68a811afb49605cf1346a53efadc4ec6269caf9e19d97bee4543f1479","impliedFormat":99},{"version":"4e454ae8246e2b13c51c12adaccda8d0fe8e36e120d4e5bbc554021244240fdb","impliedFormat":99},{"version":"4edc87837b7285fe2141b92b492ecc6428a5fc152d7d013af9d0e7017e78befa","impliedFormat":99},{"version":"20e3c2b6bfdfbde9073c6309992943094ab954bd50954c2561daa4d377c78bbc","impliedFormat":99},{"version":"de969e2fcf0e6bfe70c844762f81e47e713dfdf3f1b8ed89378ff3865e78f16d","impliedFormat":99},{"version":"7349d52ef2d997de63d4298417883a9ae8d94ad2d6b0a1ad4a11971fbf01ec3d","impliedFormat":99},{"version":"1673bc6ee9b15e4bc9e4de777b1497bd1ec544d6939061ce7a25de9a0c09565d","impliedFormat":99},{"version":"73eae9a32499f88a8c73cedd49a43ecf441116bb55c7a150f346e333b35c687b","impliedFormat":99},{"version":"9b1c12fce85d708544c70e12e0d8ca6c4a9b27690a27448577b9f4053c49908d","impliedFormat":99},{"version":"68e1a72149e6384295c078bdb945bc3238afcaeb850be14f3ba0571661addf82","impliedFormat":99},{"version":"abc4efc89e29e107946fd0a40b96c4c862d4d340c4c26dd7647183568c3e33c3","impliedFormat":99},{"version":"e1cb7303d3d49535d39fac5d8ded4b5e5e430526eb8a44411cfec3694eae6223","impliedFormat":99},{"version":"1fb68873fd2a769163972685c0516cb3f88fcedd57409f285dfe7c71be13cbbd","impliedFormat":99},{"version":"6685db351c23e0cb6cec2426ea1680a41d29c1633d722c7d7621207c55f6491e","impliedFormat":99},{"version":"cc74864af16373ee02499f7e65758f13f903d37aa1e13e7ad5598facc70dc274","impliedFormat":99},{"version":"71830cf6fc186afa64f4d6d015eed23c78a3af68bd8dc770ffa4d5cee77744b3","impliedFormat":99},{"version":"72ff78881cb1d71790e047eba022ce05845b7dd05e94ba64267dc478ce1457f1","impliedFormat":99},{"version":"fdf1008f43e52d69c62571db0aaa782604dca7e7c2206825a9f46ada5154b610","impliedFormat":99},{"version":"9b3b063cf484aa4088728e28f73f98c7b8fa267debd6f289acec4d70f5977253","impliedFormat":99},{"version":"fe21672b2e8f8ad092ba5ca8ecc4c83f3952dd5144e459f1f001dfdac2f9e7a5","impliedFormat":99},{"version":"95b067197bb5c2f7ca7ee0ede9be77c4724aa09687b75d6e8cacf0904ff565f9","impliedFormat":99},{"version":"3ab7a86cdb01a3f6d3845a82add1feee0ec6b0620fde0224ada4ab929f459b61","impliedFormat":99},{"version":"cff8ee18f70c74bdec54c4e6914c00bdfb2d8b602edafd6b04dd89b75601ff7a","impliedFormat":99},{"version":"ea7a689828afde6f1565f81d9a675c48daa0b91c36020aaeef7193b8769cccf9","impliedFormat":99},{"version":"4c362ca187c7fc9d6a986d33da9966cac1738dc14f8da9f1315b0703214f7be5","impliedFormat":99},{"version":"31fd72d5eed13cf54a22680b2370fc1613804204badd0670be0f00b6212e3e46","impliedFormat":99},{"version":"cbc60086514305c697df5c886edd61e7f1026126625c8dcb6fd66a1c9ed7549f","impliedFormat":99},{"version":"acec683ad793f6a14fb9cea06fba995ed12c13e0c5740c4135c87a35d3e4d7f0","impliedFormat":99},{"version":"7a2c56eba331a7a78c53d3755edf5632288f6339408f992e29c5712bac802435","impliedFormat":99},{"version":"0ca832a2f3964b93429b7bb62c1a4b533c4c5dac658665f41b2ffc5a9811f063","impliedFormat":99},{"version":"1af20ce38db476fa040c17d3ac229abc84e05c1f9dfd15f3e47d4296daed6997","impliedFormat":99},{"version":"c7aa91afe42bfced36a88277de57bf8cae1e230cb5964bf834ad25bdc080cb95","impliedFormat":99},{"version":"430a561f4c90a5f9e700a303dfd75686e4c4b39fffd61c60ac6012d6e06bb0d9","impliedFormat":99},{"version":"a75b69291e61381cbfd84b4c04225faa31a4d1a33b688632def6aee1e354a910","impliedFormat":99},{"version":"9a6c3e2900643e20e37b47f712af6420048e737db80c1975707cfde23681b2c9","impliedFormat":99},{"version":"3f06e42c5281bc88f1de705b90b69da10d106a09296ae2bda90e62b5cc0e8cc8","impliedFormat":99},{"version":"73f3a592934d6163184e94890ac9c369ff8d4338e57cdad77a1b775830a06642","impliedFormat":99},{"version":"a5653d4b82d263767466b0b2359b7c20cebbf096393db576d4c0e26b05ae4a52","impliedFormat":99},{"version":"e5003dc4cb838b98f4ee89a8e846d8df84e90213783120db74511d9061e784bf","impliedFormat":99},{"version":"5786b99f61721ecbb26e1a58fd488197ba28d67199c1aa5c6e1a413acec44124","impliedFormat":99},{"version":"6343ba2c99a67005da8275c88399f238a0eca04834f50f89d8398f564450e003","impliedFormat":99},{"version":"2beede478a0e8795dd0a795a98ec041a59ccf00b57169d90ddd6b1086fbb968f","impliedFormat":99},{"version":"34fb18281e5a0aca2ac274078d8ea7c341818d72f5a2c28acb8be93e9ab6df89","impliedFormat":99},{"version":"5cbd33f42fcff0b13d9e86ad23ef6b31556ac6825bd6b880dd0d44d51720a099","impliedFormat":99},{"version":"84acc84e83893647b75fa42389b06590960d6e9d5632af9b77607edbd0235f35","impliedFormat":99},{"version":"b64ac61e141a1352be2a9f3c65b0023e15134e4f9aa7ca5cd4683ba503c1822f","impliedFormat":99},{"version":"c6650df9082a55ae635b96b371b9957d8eafbc12ffdbc0e0b77f0b002fdd8e7f","impliedFormat":99},{"version":"bf25a46e9b09192b9f00e071bd7076703bf5305d6fbbc46536a2b96360f24252","impliedFormat":99},{"version":"a49a3dda1b30b314d9d752b6e76314e90c2b5b4956778e395708f24e10c70caa","impliedFormat":99},{"version":"b6256a91589ed1f889b17151bd2c2ef57b3b117816fa3825681ef7ddc32ef638","impliedFormat":99},{"version":"1e14fc0da463388def4c731404c2901082aea85f35eee21e94e4323cff1c0132","impliedFormat":99},{"version":"143021036cfda6027ef2f4c1701f0d2960a6ed669b8b4f0b1e3a86300c73bbc2","impliedFormat":99},{"version":"6ed94eb8c55370ef516807ffc964a7f5c2f2cdb2906699ff8e3f6c16e3f77ed4","impliedFormat":99},{"version":"fb018cd898b2e07030a2b664f23638bae9b05fa1765a07a960be4f4c1b7e298f","impliedFormat":99},{"version":"65fc185affccf480558c9af27269b4489432c6fffc6ff7a0bed2c3df0c21edad","impliedFormat":99},{"version":"8fdd17136749652837b79c7e683b6d1ba245f75782fb4ceb7b47687f3a05d085","impliedFormat":99},{"version":"03d5d777e8ac9725db7b6b5c89cfde9728bdab156a5d14250e720c3cda464800","impliedFormat":99},{"version":"5325260946f3cb8769cc777c599ff28d0c1d46e3fb7e13c30ab28575aaaa836b","impliedFormat":99},{"version":"8f9fbc7e76fe3aacd3d20d33424b6ff5f38c4f24429e1cd25c2f400d8d6e33c4","impliedFormat":99},{"version":"cca8d9f11c7209da2e992525500746ff81ccb0e74597dc482338b56bbca43977","impliedFormat":99},{"version":"2e37d31274eb3e70f3ae412b5dea534ca020372b23dc11a9855aecbc4c1aa7e6","impliedFormat":99},{"version":"e1f8c08c83687d32a33ac38f2222ec57c6a8d9322e0105137c794b7ac93115e1","impliedFormat":99},{"version":"304cda54f124176fe92469e7f34a2bf8d255c3ad921695be5d7a683b19d3125c","impliedFormat":99},{"version":"640cbbb116c4730a0adb9b17101534fb078622355152e78b609b5f0485236547","impliedFormat":99},{"version":"087c7265e54f2c1e9145dec329ba6d5f522782023bb37654ec85ba01a3abda17","impliedFormat":99},{"version":"c9984e68f8e475ed7c2eda320c2e9ccee8233d224cca5c9b6f70f57619aa197f","impliedFormat":99},{"version":"0c35469a7ed53fd5a28155737458e3767bea04e15b005b42224f00990d803b4f","affectsGlobalScope":true,"impliedFormat":99},{"version":"5f5f0530ca0cc4980f086c4fe77c0cd92f2116c504b844e76616ed7710b14e90","impliedFormat":99},{"version":"9851a6828ed52cdf0c9af89dee41c37a500df097a38536cb2cca67138c528dfa","impliedFormat":99},{"version":"f3f0301dfdef525a45f49b6b6600ff6df43a8d54a2e4963d5d56b8e1f8182699","impliedFormat":99},{"version":"2932ca1163434a0518e079bc06ea83f012a9275094967cf9351bd321b4d498fe","impliedFormat":99},{"version":"f686aa71560688942a313b972eb8832fff7a2eab64bc80eaa8743b684fd60e87","impliedFormat":99},{"version":"62c32e305c95cb36e05b00e9dda3cb733f732a25b00087c5c777bf996ba40092","impliedFormat":99},{"version":"411e31a03a0069f6ef923d114cefc6e614bdf037662428576d5f8c5451108c2b","impliedFormat":99},{"version":"880db5da134fcf5169e7f4ad553ab850c2eba41892bd9f4f8ebd68f554459051","impliedFormat":99},{"version":"7c025f109b0cbc9045b7059a10195f32f2aaf9871d0e20fd90451abeafa66517","impliedFormat":99},{"version":"ecdd5c2c032a0e9f483bed8d3decf099bc949d0115b5733eb87cfb89134cc0f7","impliedFormat":99},{"version":"c4e4ee1701a7a2ab044d6ca099aebb9eefdb941b170a9286b35bb671222ba08d","signature":"9d9c87aaf14fa700187364a31c27a891d77655573124b4343716bf651ea015b7","impliedFormat":99},{"version":"7e771891adaa85b690266bc37bd6eb43bc57eecc4b54693ead36467e7369952a","impliedFormat":1},{"version":"a69c09dbea52352f479d3e7ac949fde3d17b195abe90b045d619f747b38d6d1a","impliedFormat":1},{"version":"f749812878fecfa53cfc13b36e5d35086fb6377983a9df44175da83ccc23af1f","affectsGlobalScope":true,"impliedFormat":1},{"version":"7d2e3fea24c712c99c03ad8f556abedbfe105f87f1be10b95dbd409d24bc05a3","impliedFormat":1},{"version":"211e3f15fbced4ab4be19f49ffa990b9ff20d749d33b65ff753be691e7616239","affectsGlobalScope":true,"impliedFormat":1},{"version":"3719525a8f6ab731e3dfd585d9f87df55ec7d50d461df84f74eb4d68bb165244","impliedFormat":1},{"version":"5a94487653355b56018122d92392beb2e5f4a6c63ba5cef83bbe1c99775ef713","impliedFormat":1},{"version":"d5135ad93b33adcce80b18f8065087934cdc1730d63db58562edcf017e1aad9b","affectsGlobalScope":true,"impliedFormat":1},{"version":"82408ed3e959ddc60d3e9904481b5a8dc16469928257af22a3f7d1a3bc7fd8c4","impliedFormat":1},{"version":"e596c9bb2f29a2699fdd4ae89139612652245192f67f45617c5a4b20832aaae9","impliedFormat":1},{"version":"bb9c4ffa5e6290c6980b63c815cdd1625876dadb2efaf77edbe82984be93e55e","impliedFormat":1},{"version":"1cdcfc1f624d6c08aa12c73935f6e13f095919cd99edf95752951796eb225729","impliedFormat":1},{"version":"4eaff3d8e10676fd7913d8c108890e71c688e1e7d52f6d1d55c39514f493dc47","impliedFormat":1},{"version":"14b5aa23c5d0ae1907bc696ac7b6915d88f7d85799cc0dc2dcf98fbce2c5a67c","impliedFormat":1},{"version":"5c439dafdc09abe4d6c260a96b822fa0ba5be7203c71a63ab1f1423cd9e838ea","impliedFormat":1},{"version":"6b526a5ec4a401ca7c26cfe6a48e641d8f30af76673bad3b06a1b4504594a960","affectsGlobalScope":true,"impliedFormat":1},{"version":"00dee7cdca8b8420c47ea4a31a34b8e8294013ebc4f463fd941e867e7bf05029","affectsGlobalScope":true,"impliedFormat":1},{"version":"3256f3cccd578f9e7fe3a28096c505634bebcee8afb738ffa99368e536ca3a0b","impliedFormat":1},{"version":"1c84b46267610a34028edfd0d035509341751262bac1062857f3c8df7aff7153","impliedFormat":1},{"version":"7f138842074d0a40681775af008c8452093b68c383c94de31759e853c6d06b5c","impliedFormat":1},{"version":"a3d541d303ee505053f5dcbf9fafb65cac3d5631037501cd616195863a6c5740","impliedFormat":1},{"version":"8d3c583a07e0c37e876908c2d5da575019f689df8d9fa4c081d99119d53dba22","impliedFormat":1},{"version":"2c828a5405191d006115ab34e191b8474bc6c86ffdc401d1a9864b1b6e088a58","impliedFormat":1},{"version":"e630e5528e899219ae319e83bef54bf3bcb91b01d76861ecf881e8e614b167f0","affectsGlobalScope":true,"impliedFormat":1},{"version":"bcebb922784739bdb34c18ee51095d25a92b560c78ccd2eaacd6bd00f7443d83","impliedFormat":1},{"version":"7ee6ed878c4528215c82b664fe0cfe80e8b4da6c0d4cc80869367868774db8b1","impliedFormat":1},{"version":"b0973c3cbcdc59b37bf477731d468696ecaf442593ec51bab497a613a580fe30","impliedFormat":1},{"version":"4989e92ba5b69b182d2caaea6295af52b7dc73a4f7a2e336a676722884e7139d","affectsGlobalScope":true,"impliedFormat":1},{"version":"0715e4cd28ad471b2a93f3e552ff51a3ae423417a01a10aa1d3bc7c6b95059d6","affectsGlobalScope":true,"impliedFormat":1},{"version":"5153a2fd150e46ce57bb3f8db1318d33f6ad3261ed70ceeff92281c0608c74a3","impliedFormat":1},{"version":"210d54cd652ec0fec8c8916e4af59bb341065576ecda039842f9ffb2e908507c","impliedFormat":1},{"version":"36b03690b628eab08703d63f04eaa89c5df202e5f1edf3989f13ad389cd2c091","impliedFormat":1},{"version":"0effadd232a20498b11308058e334d3339cc5bf8c4c858393e38d9d4c0013dcf","impliedFormat":1},{"version":"25846d43937c672bab7e8195f3d881f93495df712ee901860effc109918938cc","impliedFormat":1},{"version":"4f3fdeba4e28e21aa719c081b8dc8f91d47e12e773389b9d35679c08151c9d37","impliedFormat":1},{"version":"1b952304137851e45bc009785de89ada562d9376177c97e37702e39e60c2f1ff","impliedFormat":1},{"version":"69ee23dd0d215b09907ad30d23f88b7790c93329d1faf31d7835552a10cf7cbf","impliedFormat":1},{"version":"44b8b584a338b190a59f4f6929d072431950c7bd92ec2694821c11bce180c8a5","impliedFormat":1},{"version":"23b89798789dffbd437c0c423f5d02d11f9736aea73d6abf16db4f812ff36eda","impliedFormat":1},{"version":"f69ff39996a61a0dd10f4bce73272b52e8024a4d58b13ab32bf4712909d0a2b7","impliedFormat":1},{"version":"3c4ba1dd9b12ffa284b565063108f2f031d150ea15b8fafbdc17f5d2a07251f3","affectsGlobalScope":true,"impliedFormat":1},{"version":"e10177274a35a9d07c825615340b2fcde2f610f53f3fb40269fd196b4288dda6","impliedFormat":1},{"version":"1422cd9e705adcc09088fda85a900c2b70e3ad36ea85846f68bd1a884cdf4e2b","impliedFormat":1},{"version":"3c13ef48634e7b5012fcf7e8fce7496352c2d779a7201389ca96a2a81ee4314d","impliedFormat":1},{"version":"5d0a25ec910fa36595f85a67ac992d7a53dd4064a1ba6aea1c9f14ab73a023f2","impliedFormat":1},{"version":"a73ae8c0e62103bb9e21bb6538700881bf135b9a8b125b857ec68edfa0da4ed3","affectsGlobalScope":true,"impliedFormat":1},{"version":"e1c1b2fbe236bf7ee3e342eeae7e20efb8988a0ac7da1cbbfa2c1f66b76c3423","affectsGlobalScope":true,"impliedFormat":1},{"version":"868831cab82b65dfe1d68180e898af1f2101e89ba9b754d1db6fb8cc2fac1921","impliedFormat":1},{"version":"0fe8985a28f82c450a04a6edf1279d7181c0893f37da7d2a27f8efd4fd5edb03","impliedFormat":1},{"version":"e59a892d87e72733e2a9ca21611b9beb52977be2696c7ba4b216cbbb9a48f5aa","impliedFormat":1},{"version":"52120bb7e4583612225bdf08e7c12559548170f11e660d33a33623bae9bbdbba","affectsGlobalScope":true,"impliedFormat":1},{"version":"8a300fa9b698845a1f9c41ecbe2c5966634582a8e2020d51abcace9b55aa959e","impliedFormat":1},{"version":"ab9b9a36e5284fd8d3bf2f7d5fcbc60052f25f27e4d20954782099282c60d23e","affectsGlobalScope":true,"impliedFormat":1},{"version":"a6dd3dba8e665ac43d279e0fdf5219edda0eed69b5e9a5061f46cd6a65c4f7a1","impliedFormat":1}],"root":[179],"options":{"composite":true,"declarationMap":true,"emitDeclarationOnly":false,"importHelpers":true,"module":199,"noEmitOnError":true,"noFallthroughCasesInSwitch":true,"noImplicitOverride":true,"noImplicitReturns":true,"noUnusedLocals":false,"noUnusedParameters":false,"outDir":"./","rootDir":"../src","skipLibCheck":true,"strict":true,"target":9,"tsBuildInfoFile":"./tsconfig.lib.tsbuildinfo"},"referencedMap":[[180,1],[181,1],[183,2],[184,3],[185,4],[186,5],[187,6],[188,7],[189,8],[190,9],[191,10],[192,11],[193,11],[195,12],[194,13],[196,12],[197,14],[198,15],[182,16],[232,17],[199,18],[200,19],[201,20],[233,21],[202,22],[203,23],[204,24],[205,25],[206,26],[207,27],[208,28],[209,29],[210,30],[211,31],[212,31],[213,32],[214,33],[216,34],[215,35],[217,36],[218,37],[219,17],[220,38],[221,39],[222,40],[223,41],[224,42],[225,43],[226,44],[227,45],[228,46],[229,47],[230,48],[231,49],[57,50],[56,17],[54,17],[55,17],[9,17],[10,17],[12,17],[11,17],[2,17],[13,17],[14,17],[15,17],[16,17],[17,17],[18,17],[19,17],[20,17],[3,17],[21,17],[22,17],[4,17],[23,17],[27,17],[24,17],[25,17],[26,17],[28,17],[29,17],[30,17],[5,17],[31,17],[32,17],[33,17],[34,17],[6,17],[38,17],[35,17],[36,17],[37,17],[39,17],[7,17],[40,17],[45,17],[46,17],[41,17],[42,17],[43,17],[44,17],[8,17],[50,17],[47,17],[48,17],[49,17],[51,17],[1,17],[52,17],[53,17],[169,51],[148,52],[147,17],[146,17],[142,53],[141,17],[143,54],[138,55],[140,17],[59,17],[162,17],[139,17],[165,56],[160,57],[164,58],[163,17],[161,17],[137,59],[58,17],[168,17],[157,53],[155,60],[153,53],[156,53],[150,53],[151,53],[159,61],[154,17],[149,53],[158,53],[152,62],[145,60],[166,63],[144,17],[167,17],[176,64],[171,65],[178,66],[175,17],[174,67],[172,67],[177,17],[173,68],[170,53],[136,69],[135,70],[64,71],[63,72],[62,73],[61,72],[83,74],[134,75],[70,76],[69,77],[78,17],[75,78],[67,79],[66,79],[77,77],[79,80],[81,17],[74,17],[68,17],[80,81],[71,17],[82,17],[76,77],[85,82],[73,76],[84,83],[72,84],[133,85],[131,86],[132,87],[127,88],[129,89],[128,17],[130,90],[65,91],[60,17],[179,92],[91,17],[94,93],[93,94],[96,93],[98,95],[97,94],[95,93],[99,17],[92,96],[102,97],[101,17],[100,17],[87,94],[86,17],[90,98],[88,17],[89,99],[119,17],[116,100],[120,100],[126,101],[118,100],[115,100],[121,100],[123,17],[117,100],[124,100],[122,100],[114,102],[125,103],[107,104],[108,105],[106,17],[110,106],[111,107],[109,17],[113,108],[105,109],[103,17],[104,17],[112,17]],"latestChangedDtsFile":"./index.d.ts","version":"6.0.3"}
|
package/package.json
ADDED
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@fluixi/server",
|
|
3
|
+
"version": "1.0.0-alpha.100",
|
|
4
|
+
"description": "Server-side rendering for Fluixi — request-scoped, streaming, framework-agnostic.",
|
|
5
|
+
"license": "MIT",
|
|
6
|
+
"author": "Ibrahima Touré",
|
|
7
|
+
"repository": {
|
|
8
|
+
"type": "git",
|
|
9
|
+
"url": "https://github.com/fluixi/core.git",
|
|
10
|
+
"directory": "packages/server"
|
|
11
|
+
},
|
|
12
|
+
"private": false,
|
|
13
|
+
"publishConfig": {
|
|
14
|
+
"registry": "https://registry.npmjs.org/",
|
|
15
|
+
"access": "public"
|
|
16
|
+
},
|
|
17
|
+
"type": "module",
|
|
18
|
+
"main": "./dist/index.js",
|
|
19
|
+
"module": "./dist/index.js",
|
|
20
|
+
"types": "./dist/index.d.ts",
|
|
21
|
+
"files": [
|
|
22
|
+
"dist",
|
|
23
|
+
"README.md",
|
|
24
|
+
"LICENSE"
|
|
25
|
+
],
|
|
26
|
+
"exports": {
|
|
27
|
+
"./package.json": "./package.json",
|
|
28
|
+
".": {
|
|
29
|
+
"types": "./dist/index.d.ts",
|
|
30
|
+
"import": "./dist/index.mjs",
|
|
31
|
+
"require": "./dist/index.cjs",
|
|
32
|
+
"default": "./dist/index.js"
|
|
33
|
+
}
|
|
34
|
+
},
|
|
35
|
+
"peerDependencies": {
|
|
36
|
+
"@fluixi/dom": "^1.0.0-alpha.100",
|
|
37
|
+
"@fluixi/head": "^1.0.0-alpha.100",
|
|
38
|
+
"@fluixi/reactive": "^1.0.0-alpha.100"
|
|
39
|
+
},
|
|
40
|
+
"devDependencies": {
|
|
41
|
+
"@bambiste/mix-builder": "^0.4.0",
|
|
42
|
+
"cross-env": "^7.0.3",
|
|
43
|
+
"@fluixi/dom": "1.0.0-alpha.100",
|
|
44
|
+
"@fluixi/head": "1.0.0-alpha.100",
|
|
45
|
+
"@fluixi/reactive": "1.0.0-alpha.100"
|
|
46
|
+
},
|
|
47
|
+
"scripts": {
|
|
48
|
+
"test": "vitest run",
|
|
49
|
+
"build": "cross-env NODE_ENV=production mix-builder",
|
|
50
|
+
"build:typings": "tsc -p tsconfig.lib.json",
|
|
51
|
+
"dev": "tsc -w -p tsconfig.lib.json"
|
|
52
|
+
}
|
|
53
|
+
}
|