Skip to content

Commit 424159c

Browse files
chore: sync baked SSR-flip server.js with templates main (dc8dae5) — the flip's verbatim solid-v2/fullstack/server.js copy now passes the @solidjs/vite-plugin 3.0.0-next.29 event seam (handleRequest(request, { event: { nativeEvent: req } }), so getRequestEvent().nativeEvent carries the raw IncomingMessage on flipped scaffolds too), regenerated via scripts/gen-ssr-flip-server.mjs; the solid-v2-basic fixture mirrors the templates' new ^3.0.0-next.29 pin. No TEMPLATES_REF bump: 0.10.0 removed the pin and scaffolds track live templates HEAD. Full suite green: 48 tests / 9 files, including live-GitHub scaffolds against the new templates HEAD.
Co-authored-by: Cursor <cursoragent@cursor.com>
1 parent f8909b3 commit 424159c

2 files changed

Lines changed: 6 additions & 2 deletions

File tree

packages/create/src/utils/ssr-flip.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,11 @@ const server = createServer(async (req, res) => {
7878
}
7979
8080
try {
81-
const response = await handleRequest(webRequest(req));
81+
// The \`options.event\` seam: extra fields spread into the request event,
82+
// conventionally the platform's raw request as \`nativeEvent\` — app code
83+
// reads it back via getRequestEvent() (e.g. the client IP from
84+
// event.nativeEvent.socket.remoteAddress on bare Node).
85+
const response = await handleRequest(webRequest(req), { event: { nativeEvent: req } });
8286
res.statusCode = response.status;
8387
const cookies = response.headers.getSetCookie?.();
8488
response.headers.forEach((value, key) => {

packages/create/tests/fixtures/solid-v2-basic/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
"license": "MIT",
1414
"devDependencies": {
1515
"@solidjs/testing-library": "1.0.0-beta.2",
16-
"@solidjs/vite-plugin": "^3.0.0-next.28",
16+
"@solidjs/vite-plugin": "^3.0.0-next.29",
1717
"@testing-library/jest-dom": "^6.6.3",
1818
"filesystem-routing": "0.2.1",
1919
"jsdom": "^25.0.1",

0 commit comments

Comments
 (0)