nestjs/nest 513080d8..7850c9ab
base and head as given
- Server-sent event endpoints are now part of the HTTP routing API
- HTTP routing now uses a dedicated server-sent event stream service
- A server-sent events sample application was added
- An eventsource dependency was added without component usage
- files changed
- 29
- in a component
- 13
- lines in components
- 261
- components
- 7
- public routes changed
- 0
- schema statements
- 0
- new dependencies
- 1
- excluded by role
- 16
Server-sent event endpoints
Added- Before
- SSE endpoints did not exist
- After
- SSE endpoints stream observables
Controllers can declare GET endpoints that stream observable messages as W3C server-sent events. The router formats event fields, opens a streaming HTTP response, and closes the subscription when the request closes.
In favour
- In favour: Closes subscriptions when requests end, avoiding streams that outlive disconnected clients
- In favour: Sets streaming headers that disable caching and proxy buffering
Against
- Against: Declares eventsource without any component use
Inspect 12 source files behind this explanation
- packages/common/constants.ts
- packages/core/helpers/handler-metadata-storage.ts
- packages/core/services/sse-stream.service.ts
- packages/core/router/router-response-controller.ts
- sample/28-sse/src/app.controller.ts
- packages/common/interfaces/http/http-server.interface.ts
- packages/common/decorators/http/sse.decorator.ts
- packages/common/index.ts
- packages/core/services/index.ts
- packages/core/router/router-execution-context.ts
- sample/28-sse/src/app.module.ts
- packages/common/decorators/http/index.ts
1 new dependency between components — Core Router → Core Services
What else could behave differently
16 components · 36 filesThese components import changed code, directly or through other files. A traced dependency is a place to review, not a confirmed runtime failure.
Reached 3
| Component | Symbol | Cited at | Files | Reached by |
|---|---|---|---|---|
| Commonpackages/common/ | Added MessageEvent1 of 2 changed symbols reaching it | packages/common/interfaces/http/http-server.interface.ts:73-78 | 1 | 1 directTrace pathShortest component path from the changed symbol:
Later steps follow file imports; they do not prove this symbol is called. |
| Core Routerpackages/core/router/ | Added HandleResponseFn1 of 6 changed symbols reaching it | packages/core/helpers/handler-metadata-storage.ts:9-13 | 4 | 3 direct · 1 at two stepsTrace pathShortest component path from the changed symbol:
Later steps follow file imports; they do not prove this symbol is called. |
| packages/common/pipes/ | Added MessageEvent1 of 2 changed symbols reaching it | packages/common/interfaces/http/http-server.interface.ts:73-78 | 7 | none direct · 6 at two steps · 1 at three stepsTrace pathShortest component path from the changed symbol:
Later steps follow file imports; they do not prove this symbol is called. |
Held back 9
| Component | Files | Reached by | Resolution |
|---|---|---|---|
| packages/core/ | 3 | none direct · 1 at three steps · 2 at four steps | precise |
| packages/common/utils/ | 1 | none direct · 1 at three steps | precise |
| packages/common/decorators/ | 1 | none direct · 1 at three steps | precise |
| packages/common/cache/ | 1 | none direct · 1 at four steps | precise |
| packages/common/serializer/ | 1 | none direct · 1 at four steps | precise |
| packages/common/http/ | 1 | none direct · 1 at four steps | precise |
| packages/common/cache/decorators/ | 2 | none direct · 2 at four steps | precise |
| packages/common/cache/interceptors/ | 1 | none direct · 1 at four steps | precise |
| packages/common/serializer/decorators/ | 1 | none direct · 1 at four steps | precise |
Ranked lower 4
| Component | Files | Reached by |
|---|---|---|
| packages/core/middleware/ | 4 | none direct · 1 at two steps · 2 at three steps · 1 at four steps |
| sample/28-sse/src/ | 2 | 2 direct |
| packages/common/decorators/core/ | 2 | none direct · 1 at two steps · 1 at three steps |
| packages/common/decorators/http/ | 4 | 1 direct · 3 at two steps |
Statements 3
MessageEvent reached 1 file in Common. 1HandleResponseFn reached 4 files in Core Router. 31MessageEvent reached 7 files in Common Pipes. 6139 reached files belong to no component — tests, docs and config.
Routes, schema, dependencies
| What | Object | Where |
|---|---|---|
| + dependency | eventsource@^1.0.7 | declared, and used by no file in any component |
1 statement, with the line behind it
eventsource was declared, and used by no file in any component.Inspect components, files and symbols
Component
File
Function
imports what changeddownstream of it, one mark per step
Diff
Analysis scope
1447 → 7- files at head1,447
- components210
- changed by this change7
- shown above of 76
Where the new files landed
5 new files| New file | Belongs to | Used by | Calls | Serves |
|---|---|---|---|---|
| packages/core/services/sse-stream.service.ts | Core Servicesbase frame | Core Router | nothing outside its own component | — |
| sample/28-sse/src/3 new files | SSE Samplenew territory | its own component only — 1 of 3 files imported by nothing | nothing outside its own component | — |
| packages/common/decorators/http/sse.decorator.ts | HTTP Decoratorsbase frame | its own component only | Commonpackages/common/enums/ | — |
12 added files carry no component — 7 config, 3 test, 1 asset, 1 docs.
29 files changed, 30 claims stated. 16 components reached in total.