@mandujs/core 0.54.12 → 0.54.13

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.
Files changed (76) hide show
  1. package/package.json +9 -1
  2. package/scripts/postinstall-lock.ts +153 -153
  3. package/src/a11y/run-audit.ts +15 -15
  4. package/src/agent/__tests__/context.test.ts +49 -1
  5. package/src/agent/context.ts +535 -535
  6. package/src/agent/index.ts +6 -6
  7. package/src/agent/plan.ts +282 -282
  8. package/src/agent/repair.ts +171 -171
  9. package/src/agent/sync.ts +200 -200
  10. package/src/agent/types.ts +8 -0
  11. package/src/agent/verify.ts +100 -2
  12. package/src/brain/doctor/analyzer.ts +7 -7
  13. package/src/bundler/__tests__/build-runner.ts +5 -4
  14. package/src/bundler/__tests__/cold-start.test.ts +60 -60
  15. package/src/bundler/__tests__/css.test.ts +20 -20
  16. package/src/bundler/analyzer.ts +15 -15
  17. package/src/bundler/build.test.ts +66 -15
  18. package/src/bundler/build.ts +165 -103
  19. package/src/bundler/css.ts +42 -42
  20. package/src/bundler/manifest-schema.ts +21 -21
  21. package/src/bundler/plugins/__tests__/block-generated-imports.test.ts +13 -13
  22. package/src/bundler/plugins/block-generated-imports.ts +13 -13
  23. package/src/bundler/types.ts +31 -31
  24. package/src/client/island.ts +79 -79
  25. package/src/config/validate.ts +1 -1
  26. package/src/contract/schema.ts +7 -0
  27. package/src/deploy/inference/context.ts +82 -82
  28. package/src/devtools/client/components/panel/islands-panel.tsx +16 -16
  29. package/src/devtools/client/components/panel/panel-container.tsx +1 -1
  30. package/src/error/formatter.ts +10 -1
  31. package/src/experimental/index.ts +10 -0
  32. package/src/filling/context.ts +17 -17
  33. package/src/filling/filling.ts +22 -1
  34. package/src/filling/index.ts +15 -1
  35. package/src/generator/generate.ts +30 -30
  36. package/src/generator/index.ts +3 -3
  37. package/src/generator/templates.ts +210 -210
  38. package/src/guard/check.ts +9 -9
  39. package/src/guard/config-guard.ts +13 -13
  40. package/src/guard/fs-routes-policy.ts +51 -51
  41. package/src/guard/index.ts +11 -11
  42. package/src/index.ts +0 -10
  43. package/src/internal/index.ts +25 -0
  44. package/src/kitchen/api/file-api.ts +11 -11
  45. package/src/report/index.ts +1 -1
  46. package/src/resource/__tests__/generator.test.ts +6 -6
  47. package/src/resource/__tests__/schema.test.ts +14 -14
  48. package/src/resource/ddl/__tests__/emit.test.ts +165 -165
  49. package/src/resource/ddl/emit.ts +146 -146
  50. package/src/resource/generator-schema.ts +11 -11
  51. package/src/resource/generators/slot.ts +72 -72
  52. package/src/resource/schema.ts +21 -21
  53. package/src/router/client-entry.test.ts +69 -33
  54. package/src/router/client-entry.ts +134 -74
  55. package/src/router/fs-routes.ts +24 -22
  56. package/src/router/fs-scanner.ts +21 -17
  57. package/src/router/fs-types.ts +8 -5
  58. package/src/runtime/__tests__/devtools-adapter.test.ts +68 -68
  59. package/src/runtime/__tests__/observability-lifecycle.test.ts +103 -103
  60. package/src/runtime/__tests__/page-render-response.test.ts +103 -103
  61. package/src/runtime/__tests__/request-middleware.test.ts +70 -70
  62. package/src/runtime/devtools-adapter.ts +68 -68
  63. package/src/runtime/escape.ts +34 -34
  64. package/src/runtime/image-feature.ts +15 -0
  65. package/src/runtime/observability-lifecycle.ts +290 -290
  66. package/src/runtime/page-render-response.ts +106 -106
  67. package/src/runtime/rate-limit.ts +231 -0
  68. package/src/runtime/request-middleware.ts +31 -31
  69. package/src/runtime/scheduler-lifecycle.ts +64 -0
  70. package/src/runtime/server.ts +27 -295
  71. package/src/runtime/ssr.ts +59 -59
  72. package/src/runtime/static-files.ts +289 -289
  73. package/src/runtime/streaming-ssr.ts +22 -22
  74. package/src/spec/schema.ts +4 -3
  75. package/src/watcher/__tests__/watcher.test.ts +59 -59
  76. package/src/watcher/watcher.ts +61 -61
@@ -1,68 +1,68 @@
1
- import { afterEach, describe, expect, it } from "bun:test";
2
- import type { RoutesManifest } from "../../spec/schema";
3
- import {
4
- createRuntimeDevtoolsAdapter,
5
- shouldRecordRuntimeRequest,
6
- type RuntimeDevtoolsAdapter,
7
- } from "../devtools-adapter";
8
-
9
- const manifest: RoutesManifest = {
10
- version: 1,
11
- routes: [],
12
- };
13
-
14
- describe("runtime devtools adapter", () => {
15
- let adapter: RuntimeDevtoolsAdapter | null = null;
16
-
17
- afterEach(() => {
18
- adapter?.stop();
19
- adapter = null;
20
- });
21
-
22
- it("stays disabled outside dev mode", async () => {
23
- adapter = createRuntimeDevtoolsAdapter({
24
- isDev: false,
25
- rootDir: process.cwd(),
26
- manifest,
27
- guardConfig: null,
28
- });
29
-
30
- expect(adapter.kitchen).toBeNull();
31
- expect(adapter.dashboardPath).toBeNull();
32
- const response = await adapter.handleRequest(
33
- new Request("http://localhost:3000/__kitchen"),
34
- "/__kitchen"
35
- );
36
- expect(response).toBeNull();
37
- });
38
-
39
- it("dispatches Kitchen requests in dev mode", async () => {
40
- adapter = createRuntimeDevtoolsAdapter({
41
- isDev: true,
42
- rootDir: process.cwd(),
43
- manifest,
44
- guardConfig: null,
45
- });
46
-
47
- expect(adapter.kitchen).not.toBeNull();
48
- expect(adapter.dashboardPath).toBe("/__kitchen");
49
- await expect(
50
- adapter.handleRequest(new Request("http://localhost:3000/api/ping"), "/api/ping")
51
- ).resolves.toBeNull();
52
-
53
- const response = await adapter.handleRequest(
54
- new Request("http://localhost:3000/__kitchen"),
55
- "/__kitchen"
56
- );
57
- expect(response?.status).toBe(200);
58
- expect(await response?.text()).toContain("Mandu Kitchen");
59
- });
60
-
61
- it("keeps framework-internal request paths out of the Kitchen request log", () => {
62
- expect(shouldRecordRuntimeRequest("/api/ping")).toBe(true);
63
- expect(shouldRecordRuntimeRequest("/_mandu/heap")).toBe(true);
64
- expect(shouldRecordRuntimeRequest("/.mandu/client/runtime.js")).toBe(false);
65
- expect(shouldRecordRuntimeRequest("/__kitchen/api/events")).toBe(false);
66
- expect(shouldRecordRuntimeRequest("/__mandu/events/recent")).toBe(false);
67
- });
68
- });
1
+ import { afterEach, describe, expect, it } from "bun:test";
2
+ import type { RoutesManifest } from "../../spec/schema";
3
+ import {
4
+ createRuntimeDevtoolsAdapter,
5
+ shouldRecordRuntimeRequest,
6
+ type RuntimeDevtoolsAdapter,
7
+ } from "../devtools-adapter";
8
+
9
+ const manifest: RoutesManifest = {
10
+ version: 1,
11
+ routes: [],
12
+ };
13
+
14
+ describe("runtime devtools adapter", () => {
15
+ let adapter: RuntimeDevtoolsAdapter | null = null;
16
+
17
+ afterEach(() => {
18
+ adapter?.stop();
19
+ adapter = null;
20
+ });
21
+
22
+ it("stays disabled outside dev mode", async () => {
23
+ adapter = createRuntimeDevtoolsAdapter({
24
+ isDev: false,
25
+ rootDir: process.cwd(),
26
+ manifest,
27
+ guardConfig: null,
28
+ });
29
+
30
+ expect(adapter.kitchen).toBeNull();
31
+ expect(adapter.dashboardPath).toBeNull();
32
+ const response = await adapter.handleRequest(
33
+ new Request("http://localhost:3000/__kitchen"),
34
+ "/__kitchen"
35
+ );
36
+ expect(response).toBeNull();
37
+ });
38
+
39
+ it("dispatches Kitchen requests in dev mode", async () => {
40
+ adapter = createRuntimeDevtoolsAdapter({
41
+ isDev: true,
42
+ rootDir: process.cwd(),
43
+ manifest,
44
+ guardConfig: null,
45
+ });
46
+
47
+ expect(adapter.kitchen).not.toBeNull();
48
+ expect(adapter.dashboardPath).toBe("/__kitchen");
49
+ await expect(
50
+ adapter.handleRequest(new Request("http://localhost:3000/api/ping"), "/api/ping")
51
+ ).resolves.toBeNull();
52
+
53
+ const response = await adapter.handleRequest(
54
+ new Request("http://localhost:3000/__kitchen"),
55
+ "/__kitchen"
56
+ );
57
+ expect(response?.status).toBe(200);
58
+ expect(await response?.text()).toContain("Mandu Kitchen");
59
+ });
60
+
61
+ it("keeps framework-internal request paths out of the Kitchen request log", () => {
62
+ expect(shouldRecordRuntimeRequest("/api/ping")).toBe(true);
63
+ expect(shouldRecordRuntimeRequest("/_mandu/heap")).toBe(true);
64
+ expect(shouldRecordRuntimeRequest("/.mandu/client/runtime.js")).toBe(false);
65
+ expect(shouldRecordRuntimeRequest("/__kitchen/api/events")).toBe(false);
66
+ expect(shouldRecordRuntimeRequest("/__mandu/events/recent")).toBe(false);
67
+ });
68
+ });
@@ -1,103 +1,103 @@
1
- import { afterEach, describe, expect, test } from "bun:test";
2
- import {
3
- INTERNAL_EVENTS_ENDPOINT,
4
- createRuntimeObservabilityLifecycle,
5
- } from "../observability-lifecycle";
6
- import { eventBus } from "../../observability/event-bus";
7
- import {
8
- resetTracer,
9
- type Span,
10
- type SpanExporter,
11
- } from "../../observability/tracing";
12
-
13
- class CaptureExporter implements SpanExporter {
14
- readonly spans: Span[] = [];
15
- export(spans: Span[]): void {
16
- this.spans.push(...spans);
17
- }
18
- }
19
-
20
- afterEach(() => {
21
- resetTracer();
22
- });
23
-
24
- describe("runtime observability lifecycle", () => {
25
- test("serves heap snapshots with perf data when exposed", async () => {
26
- const lifecycle = createRuntimeObservabilityLifecycle({ isDev: true });
27
- const response = lifecycle.handleEndpoint(
28
- new Request("http://localhost/_mandu/heap"),
29
- "/_mandu/heap"
30
- );
31
-
32
- expect(response?.status).toBe(200);
33
- const body = await response!.json() as {
34
- process: { heapUsed: number };
35
- perf: unknown;
36
- };
37
- expect(body.process.heapUsed).toBeGreaterThan(0);
38
- expect(body.perf).toBeDefined();
39
- });
40
-
41
- test("keeps metrics hidden in production unless explicitly enabled", () => {
42
- const hidden = createRuntimeObservabilityLifecycle({ isDev: false });
43
- const shown = createRuntimeObservabilityLifecycle({
44
- isDev: false,
45
- metricsEndpoint: true,
46
- });
47
-
48
- expect(hidden.handleEndpoint(new Request("http://localhost/_mandu/metrics"), "/_mandu/metrics")).toBeNull();
49
- expect(shown.handleEndpoint(new Request("http://localhost/_mandu/metrics"), "/_mandu/metrics")?.status).toBe(200);
50
- });
51
-
52
- test("serves recent EventBus snapshots from the lifecycle endpoint", async () => {
53
- const lifecycle = createRuntimeObservabilityLifecycle({ isDev: true });
54
- const source = `observability-lifecycle-${Date.now()}`;
55
- eventBus.emit({
56
- type: "http",
57
- severity: "info",
58
- source,
59
- message: "GET /observed 200",
60
- });
61
-
62
- const response = lifecycle.handleEndpoint(
63
- new Request(`http://localhost${INTERNAL_EVENTS_ENDPOINT}/recent?source=${source}`),
64
- `${INTERNAL_EVENTS_ENDPOINT}/recent`
65
- );
66
-
67
- expect(response?.status).toBe(200);
68
- const body = await response!.json() as {
69
- events: Array<{ source: string; message: string }>;
70
- };
71
- expect(body.events.some((event) => event.source === source)).toBe(true);
72
- });
73
-
74
- test("wraps requests in a root tracing span", async () => {
75
- const exporter = new CaptureExporter();
76
- const lifecycle = createRuntimeObservabilityLifecycle({
77
- isDev: false,
78
- tracing: {
79
- enabled: true,
80
- customExporter: exporter,
81
- },
82
- });
83
- const incomingTraceId = "4bf92f3577b34da6a3ce929d0e0e4736";
84
- const incomingSpanId = "00f067aa0ba902b7";
85
- const response = await lifecycle.runRequest(
86
- new Request("https://example.test/users", {
87
- headers: {
88
- traceparent: `00-${incomingTraceId}-${incomingSpanId}-01`,
89
- },
90
- }),
91
- Date.now(),
92
- "corr-1",
93
- async () => new Response("created", { status: 201 })
94
- );
95
-
96
- expect(response.status).toBe(201);
97
- expect(exporter.spans).toHaveLength(1);
98
- expect(exporter.spans[0].traceId).toBe(incomingTraceId);
99
- expect(exporter.spans[0].parentSpanId).toBe(incomingSpanId);
100
- expect(exporter.spans[0].attributes["http.status_code"]).toBe(201);
101
- expect(exporter.spans[0].status).toBe("ok");
102
- });
103
- });
1
+ import { afterEach, describe, expect, test } from "bun:test";
2
+ import {
3
+ INTERNAL_EVENTS_ENDPOINT,
4
+ createRuntimeObservabilityLifecycle,
5
+ } from "../observability-lifecycle";
6
+ import { eventBus } from "../../observability/event-bus";
7
+ import {
8
+ resetTracer,
9
+ type Span,
10
+ type SpanExporter,
11
+ } from "../../observability/tracing";
12
+
13
+ class CaptureExporter implements SpanExporter {
14
+ readonly spans: Span[] = [];
15
+ export(spans: Span[]): void {
16
+ this.spans.push(...spans);
17
+ }
18
+ }
19
+
20
+ afterEach(() => {
21
+ resetTracer();
22
+ });
23
+
24
+ describe("runtime observability lifecycle", () => {
25
+ test("serves heap snapshots with perf data when exposed", async () => {
26
+ const lifecycle = createRuntimeObservabilityLifecycle({ isDev: true });
27
+ const response = lifecycle.handleEndpoint(
28
+ new Request("http://localhost/_mandu/heap"),
29
+ "/_mandu/heap"
30
+ );
31
+
32
+ expect(response?.status).toBe(200);
33
+ const body = await response!.json() as {
34
+ process: { heapUsed: number };
35
+ perf: unknown;
36
+ };
37
+ expect(body.process.heapUsed).toBeGreaterThan(0);
38
+ expect(body.perf).toBeDefined();
39
+ });
40
+
41
+ test("keeps metrics hidden in production unless explicitly enabled", () => {
42
+ const hidden = createRuntimeObservabilityLifecycle({ isDev: false });
43
+ const shown = createRuntimeObservabilityLifecycle({
44
+ isDev: false,
45
+ metricsEndpoint: true,
46
+ });
47
+
48
+ expect(hidden.handleEndpoint(new Request("http://localhost/_mandu/metrics"), "/_mandu/metrics")).toBeNull();
49
+ expect(shown.handleEndpoint(new Request("http://localhost/_mandu/metrics"), "/_mandu/metrics")?.status).toBe(200);
50
+ });
51
+
52
+ test("serves recent EventBus snapshots from the lifecycle endpoint", async () => {
53
+ const lifecycle = createRuntimeObservabilityLifecycle({ isDev: true });
54
+ const source = `observability-lifecycle-${Date.now()}`;
55
+ eventBus.emit({
56
+ type: "http",
57
+ severity: "info",
58
+ source,
59
+ message: "GET /observed 200",
60
+ });
61
+
62
+ const response = lifecycle.handleEndpoint(
63
+ new Request(`http://localhost${INTERNAL_EVENTS_ENDPOINT}/recent?source=${source}`),
64
+ `${INTERNAL_EVENTS_ENDPOINT}/recent`
65
+ );
66
+
67
+ expect(response?.status).toBe(200);
68
+ const body = await response!.json() as {
69
+ events: Array<{ source: string; message: string }>;
70
+ };
71
+ expect(body.events.some((event) => event.source === source)).toBe(true);
72
+ });
73
+
74
+ test("wraps requests in a root tracing span", async () => {
75
+ const exporter = new CaptureExporter();
76
+ const lifecycle = createRuntimeObservabilityLifecycle({
77
+ isDev: false,
78
+ tracing: {
79
+ enabled: true,
80
+ customExporter: exporter,
81
+ },
82
+ });
83
+ const incomingTraceId = "4bf92f3577b34da6a3ce929d0e0e4736";
84
+ const incomingSpanId = "00f067aa0ba902b7";
85
+ const response = await lifecycle.runRequest(
86
+ new Request("https://example.test/users", {
87
+ headers: {
88
+ traceparent: `00-${incomingTraceId}-${incomingSpanId}-01`,
89
+ },
90
+ }),
91
+ Date.now(),
92
+ "corr-1",
93
+ async () => new Response("created", { status: 201 })
94
+ );
95
+
96
+ expect(response.status).toBe(201);
97
+ expect(exporter.spans).toHaveLength(1);
98
+ expect(exporter.spans[0].traceId).toBe(incomingTraceId);
99
+ expect(exporter.spans[0].parentSpanId).toBe(incomingSpanId);
100
+ expect(exporter.spans[0].attributes["http.status_code"]).toBe(201);
101
+ expect(exporter.spans[0].status).toBe("ok");
102
+ });
103
+ });
@@ -1,103 +1,103 @@
1
- import { describe, expect, it } from "bun:test";
2
- import React from "react";
3
- import { renderPageResponse } from "../page-render-response";
4
- import type { BundleManifest } from "../../bundler/types";
5
-
6
- const HYDRATED_MANIFEST: BundleManifest = {
7
- version: 1,
8
- buildTime: "2026-05-19T00:00:00.000Z",
9
- env: "production",
10
- bundles: {
11
- home: {
12
- js: "/.mandu/client/home.island.js",
13
- dependencies: ["_runtime", "_react"],
14
- priority: "visible",
15
- },
16
- },
17
- shared: {
18
- runtime: "/.mandu/client/_runtime.js",
19
- vendor: "/.mandu/client/_react.js",
20
- router: "/.mandu/client/_router.js",
21
- },
22
- importMap: {
23
- imports: {
24
- react: "/.mandu/client/_react.js",
25
- "react-dom": "/.mandu/client/_react-dom.js",
26
- "react-dom/client": "/.mandu/client/_react-dom-client.js",
27
- },
28
- },
29
- };
30
-
31
- describe("runtime page render response orchestration", () => {
32
- it("pre-resolves async components on the non-streaming path", async () => {
33
- async function AsyncPage() {
34
- return React.createElement("main", null, "resolved-page");
35
- }
36
-
37
- const response = await renderPageResponse({
38
- app: React.createElement(AsyncPage),
39
- useStreaming: false,
40
- title: "Async Page",
41
- headTags: "",
42
- isDev: false,
43
- routeId: "page/async",
44
- routePattern: "/async",
45
- loaderData: { ok: true },
46
- transitions: false,
47
- prefetch: false,
48
- spa: false,
49
- devtools: false,
50
- });
51
-
52
- expect(response.status).toBe(200);
53
- const html = await response.text();
54
- expect(html).toContain("resolved-page");
55
- expect(html).toContain("Async Page");
56
- });
57
-
58
- it("uses the streaming renderer when requested", async () => {
59
- const response = await renderPageResponse({
60
- app: React.createElement("main", null, "stream-page"),
61
- useStreaming: true,
62
- title: "Stream Page",
63
- headTags: "",
64
- isDev: false,
65
- routeId: "page/stream",
66
- routePattern: "/stream",
67
- loaderData: { ok: true },
68
- transitions: false,
69
- prefetch: false,
70
- spa: false,
71
- devtools: false,
72
- });
73
-
74
- expect(response.status).toBe(200);
75
- expect(response.headers.get("X-Accel-Buffering")).toBe("no");
76
- const html = await response.text();
77
- expect(html).toContain("stream-page");
78
- expect(html).toContain("Stream Page");
79
- });
80
-
81
- it("serializes non-streaming loaderData as the route server data exactly once", async () => {
82
- const response = await renderPageResponse({
83
- app: React.createElement("main", null, "hydrated-page"),
84
- useStreaming: false,
85
- title: "Hydrated Page",
86
- headTags: "",
87
- isDev: false,
88
- routeId: "home",
89
- routePattern: "/",
90
- loaderData: { items: ["a", "b"] },
91
- hydration: { strategy: "island", priority: "visible", preload: false },
92
- bundleManifest: HYDRATED_MANIFEST,
93
- transitions: false,
94
- prefetch: false,
95
- spa: false,
96
- devtools: false,
97
- });
98
-
99
- const html = await response.text();
100
- expect(html).toContain('"home":{"serverData":{"items":["a","b"]}');
101
- expect(html).not.toContain('"serverData":{"home"');
102
- });
103
- });
1
+ import { describe, expect, it } from "bun:test";
2
+ import React from "react";
3
+ import { renderPageResponse } from "../page-render-response";
4
+ import type { BundleManifest } from "../../bundler/types";
5
+
6
+ const HYDRATED_MANIFEST: BundleManifest = {
7
+ version: 1,
8
+ buildTime: "2026-05-19T00:00:00.000Z",
9
+ env: "production",
10
+ bundles: {
11
+ home: {
12
+ js: "/.mandu/client/home.island.js",
13
+ dependencies: ["_runtime", "_react"],
14
+ priority: "visible",
15
+ },
16
+ },
17
+ shared: {
18
+ runtime: "/.mandu/client/_runtime.js",
19
+ vendor: "/.mandu/client/_react.js",
20
+ router: "/.mandu/client/_router.js",
21
+ },
22
+ importMap: {
23
+ imports: {
24
+ react: "/.mandu/client/_react.js",
25
+ "react-dom": "/.mandu/client/_react-dom.js",
26
+ "react-dom/client": "/.mandu/client/_react-dom-client.js",
27
+ },
28
+ },
29
+ };
30
+
31
+ describe("runtime page render response orchestration", () => {
32
+ it("pre-resolves async components on the non-streaming path", async () => {
33
+ async function AsyncPage() {
34
+ return React.createElement("main", null, "resolved-page");
35
+ }
36
+
37
+ const response = await renderPageResponse({
38
+ app: React.createElement(AsyncPage),
39
+ useStreaming: false,
40
+ title: "Async Page",
41
+ headTags: "",
42
+ isDev: false,
43
+ routeId: "page/async",
44
+ routePattern: "/async",
45
+ loaderData: { ok: true },
46
+ transitions: false,
47
+ prefetch: false,
48
+ spa: false,
49
+ devtools: false,
50
+ });
51
+
52
+ expect(response.status).toBe(200);
53
+ const html = await response.text();
54
+ expect(html).toContain("resolved-page");
55
+ expect(html).toContain("Async Page");
56
+ });
57
+
58
+ it("uses the streaming renderer when requested", async () => {
59
+ const response = await renderPageResponse({
60
+ app: React.createElement("main", null, "stream-page"),
61
+ useStreaming: true,
62
+ title: "Stream Page",
63
+ headTags: "",
64
+ isDev: false,
65
+ routeId: "page/stream",
66
+ routePattern: "/stream",
67
+ loaderData: { ok: true },
68
+ transitions: false,
69
+ prefetch: false,
70
+ spa: false,
71
+ devtools: false,
72
+ });
73
+
74
+ expect(response.status).toBe(200);
75
+ expect(response.headers.get("X-Accel-Buffering")).toBe("no");
76
+ const html = await response.text();
77
+ expect(html).toContain("stream-page");
78
+ expect(html).toContain("Stream Page");
79
+ });
80
+
81
+ it("serializes non-streaming loaderData as the route server data exactly once", async () => {
82
+ const response = await renderPageResponse({
83
+ app: React.createElement("main", null, "hydrated-page"),
84
+ useStreaming: false,
85
+ title: "Hydrated Page",
86
+ headTags: "",
87
+ isDev: false,
88
+ routeId: "home",
89
+ routePattern: "/",
90
+ loaderData: { items: ["a", "b"] },
91
+ hydration: { strategy: "island", priority: "visible", preload: false },
92
+ bundleManifest: HYDRATED_MANIFEST,
93
+ transitions: false,
94
+ prefetch: false,
95
+ spa: false,
96
+ devtools: false,
97
+ });
98
+
99
+ const html = await response.text();
100
+ expect(html).toContain('"home":{"serverData":{"items":["a","b"]}');
101
+ expect(html).not.toContain('"serverData":{"home"');
102
+ });
103
+ });