next.js
9b6e563f - refactor(app-render): extract stream-ops and debug-channel modules (5/8) (#89858)

Commit
2 days ago
refactor(app-render): extract stream-ops and debug-channel modules (5/8) (#89858) ## Summary Pure refactor: extract stream operations and debug-channel code from `app-render.tsx` into separate compile-time switchable modules. Web-only at this stage. - **`stream-ops.web.ts`**: extracted web stream operations (continueFizzStream, renderToFlightStream, renderToFizzStream, etc.) - **`stream-ops.ts`**: re-export switcher (web-only for now, conditional added in next PR) - **`debug-channel-server.web.ts`**: extracted web debug channel implementation - **`debug-channel-server.ts`**: re-export switcher - **`app-render.tsx`**: net reduction via imports from stream-ops/debug-channel instead of inline - **`node-web-streams-helper.ts`**: added `createRuntimePrefetchTransformStream` ## Test plan - [ ] `pnpm --filter=next types` passes - [ ] Existing app-dir e2e tests pass (smoke test: `pnpm test-dev-turbo test/e2e/app-dir/app/`) - [ ] No runtime behavior changes: identical web stream paths --------- Co-authored-by: Tim Neutkens <tim@timneutkens.nl>
Author
Parents
Loading