@bymax-one/nest-realtime 1.0.2 → 1.0.4
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/CHANGELOG.md +69 -1
- package/README.md +2 -0
- package/dist/internal/index.cjs +1621 -0
- package/dist/internal/index.d.cts +1457 -0
- package/dist/internal/index.d.ts +1457 -0
- package/dist/internal/index.mjs +1601 -0
- package/dist/server/index.cjs +76 -1616
- package/dist/server/index.d.cts +1 -846
- package/dist/server/index.d.ts +1 -846
- package/dist/server/index.mjs +1 -1603
- package/dist/websocket/index.cjs +33 -1376
- package/dist/websocket/index.d.cts +4 -685
- package/dist/websocket/index.d.ts +4 -685
- package/dist/websocket/index.mjs +3 -1346
- package/package.json +17 -2
package/CHANGELOG.md
CHANGED
|
@@ -7,6 +7,72 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
7
7
|
|
|
8
8
|
## [Unreleased]
|
|
9
9
|
|
|
10
|
+
## [1.0.4] - 2026-08-02
|
|
11
|
+
|
|
12
|
+
### Fixed
|
|
13
|
+
|
|
14
|
+
- **The published declarations required `@types/express`, which the package does
|
|
15
|
+
not depend on.** `dist/internal/index.d.ts` imported `Request` and `Response`
|
|
16
|
+
from `express`, so a consumer compiling with `skipLibCheck: false` failed with
|
|
17
|
+
`TS2307: Cannot find module 'express'` on the root and `./websocket` subpaths.
|
|
18
|
+
`express` is not a dependency, nor a peer, nor an optional peer, so there was no
|
|
19
|
+
supported way to satisfy it.
|
|
20
|
+
|
|
21
|
+
The SSE endpoint reads three fields from the request — `headers`, `ip`, `query` —
|
|
22
|
+
and does two things to the response: sets the anti-buffering headers, and writes
|
|
23
|
+
the keepalive comment. Those are now described by `SseRequest` and
|
|
24
|
+
`SseResponse`, structural contracts an `express.Request` satisfies without being
|
|
25
|
+
named by it. The same shape is what a Fastify request
|
|
26
|
+
provides, so the endpoint no longer assumes a platform it never required.
|
|
27
|
+
|
|
28
|
+
Runtime is unaffected: no bundle ever imported `express`, and the only change to
|
|
29
|
+
the built JavaScript is two JSDoc lines.
|
|
30
|
+
|
|
31
|
+
### Changed
|
|
32
|
+
|
|
33
|
+
- **`pnpm check:surface` now also checks what the published declarations import.**
|
|
34
|
+
Every module a `.d.ts` names has to be a declared peer, `./internal` included —
|
|
35
|
+
the root's declarations re-export from it, so an undeclared import there reaches
|
|
36
|
+
the consumer's compiler just the same. `tsc` could not see this (it only checks
|
|
37
|
+
what this repository references) and neither could `attw` (it checks that
|
|
38
|
+
declarations resolve, not what they contain).
|
|
39
|
+
|
|
40
|
+
## [1.0.3] - 2026-08-02
|
|
41
|
+
|
|
42
|
+
### Fixed
|
|
43
|
+
|
|
44
|
+
- **`transport: 'websocket'` and `'both'` could not resolve a single provider.**
|
|
45
|
+
Registering `BymaxRealtimeWebSocketModule` and then injecting anything the
|
|
46
|
+
package root exports — `RealtimeService`, `ConnectionRegistry`, or any of the
|
|
47
|
+
eight injection tokens — failed with `UnknownElementException` at bootstrap.
|
|
48
|
+
SSE through the root module was unaffected.
|
|
49
|
+
|
|
50
|
+
Each entry point is a separate bundle, so the services and `Symbol` tokens both
|
|
51
|
+
of them reached by a relative path were copied into each. A copied class is a
|
|
52
|
+
different injection token, and the container held one set while the consumer
|
|
53
|
+
imported the other. The shared runtime now lives in one bundle that both entry
|
|
54
|
+
points import by package specifier, which gives it a single identity in
|
|
55
|
+
CommonJS as well as ESM — code splitting could not, since esbuild splits ESM
|
|
56
|
+
only.
|
|
57
|
+
|
|
58
|
+
### Added
|
|
59
|
+
|
|
60
|
+
- **`pnpm check:surface`** compares every name each subpath exports, read from the
|
|
61
|
+
built `.d.ts`, against a checked-in snapshot, and fails on additions as well as
|
|
62
|
+
removals. A type exported for consumers and referenced nowhere internally is
|
|
63
|
+
invisible to `tsc`, to `attw` and to the README snippets, so it can vanish from
|
|
64
|
+
a barrel with every other gate green.
|
|
65
|
+
|
|
66
|
+
- **`pnpm check:runtime`** packs the tarball, lays it out the way npm would, and
|
|
67
|
+
boots NestJS against it in ESM and in CommonJS, resolving every exported token
|
|
68
|
+
from every transport mode. It runs in `prepublishOnly` and in CI. Every other
|
|
69
|
+
gate reads the source or the type declarations, so a defect in how the entry
|
|
70
|
+
points are bundled was invisible to all of them.
|
|
71
|
+
|
|
72
|
+
- **`pnpm size` now checks bundle boundaries structurally**: the root and shared
|
|
73
|
+
bundles must contain no static reference to the Socket.IO stack, and the root
|
|
74
|
+
and WebSocket bundles must _import_ the shared runtime rather than inline it.
|
|
75
|
+
|
|
10
76
|
## [1.0.2] - 2026-08-02
|
|
11
77
|
|
|
12
78
|
### Fixed
|
|
@@ -131,7 +197,9 @@ First published release.
|
|
|
131
197
|
rather than by the manual sweep that raised the NestJS floors — that sweep
|
|
132
198
|
asked about NestJS and never put the same question to the other ten peers.
|
|
133
199
|
|
|
134
|
-
[Unreleased]: https://github.com/bymaxone/nest-realtime/compare/v1.0.
|
|
200
|
+
[Unreleased]: https://github.com/bymaxone/nest-realtime/compare/v1.0.4...HEAD
|
|
201
|
+
[1.0.4]: https://github.com/bymaxone/nest-realtime/compare/v1.0.3...v1.0.4
|
|
202
|
+
[1.0.3]: https://github.com/bymaxone/nest-realtime/compare/v1.0.2...v1.0.3
|
|
135
203
|
[1.0.2]: https://github.com/bymaxone/nest-realtime/compare/v1.0.1...v1.0.2
|
|
136
204
|
[1.0.1]: https://github.com/bymaxone/nest-realtime/compare/v1.0.0...v1.0.1
|
|
137
205
|
[1.0.0]: https://github.com/bymaxone/nest-realtime/releases/tag/v1.0.0
|
package/README.md
CHANGED
|
@@ -107,6 +107,8 @@ The `shared` subpath carries no Node or NestJS import, so the same event names a
|
|
|
107
107
|
|
|
108
108
|
**The `websocket` subpath exists so the server one costs nothing extra.** Everything that touches `@nestjs/websockets`, `@nestjs/platform-socket.io` and `socket.io` is reachable only through it, so an application on SSE — the default transport — never installs the Socket.IO stack. Importing it is what opts in, in the install as much as in the configuration.
|
|
109
109
|
|
|
110
|
+
The package also exposes `@bymax-one/nest-realtime/internal`. It is **not public API** and carries no compatibility promise — it is the shared runtime the two server subpaths import so that a service registered through one and injected through the other is the same class. Import the four above; nothing you need is only there.
|
|
111
|
+
|
|
110
112
|
---
|
|
111
113
|
|
|
112
114
|
> [!TIP]
|