feat: add native WebSocket gateways#127
Merged
Merged
Conversation
…socket app Loads the scaffolded chat_gateway.py via importlib, wires it into a Module, boots a uvicorn server, and verifies the generated `ping` handler returns `pong` over a real websocket connection. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Adds a `pynest generate gateway -n chat -p src` step to the CLI test workflow and asserts the generated file exists with the expected @WebSocketGateway decorator across all app-type variants. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Adds a Blank-only step that loads the scaffolded chat_gateway.py, boots
it via PyNestFactory + uvicorn, opens a websocket to /chat and asserts
the {event:ping} → {event:pong} round-trip. Gated to the Blank matrix
variant since DB-backed apps would fail to boot without their database.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
auspicious-dartinstead ofmain) to productionnest/websockets/module: gateway, server, decorators, contextgenerate gateway, plus docs (docs/websockets.md)tests/test_websockets/andtests/test_cli/test_generate_gateway.pyThis is the websocket commit (
4661ca9) cherry-picked cleanly ontomain. The other commits onauspicious-dartare the DI-engine rewrite that already landed via PR #125.Original PR: #126
Test plan
pynest generate gatewayscaffolding works end-to-end