release: promote develop → main (staging) #5

Merged
chrnx merged 164 commits from develop into main 2026-07-18 19:01:55 +00:00
2 changed files with 14 additions and 2 deletions
Showing only changes of commit 4a6ef784ec - Show all commits

No files matched your search

+6
View File
@@ -17,6 +17,12 @@ green-tea uses calendar versioning: `YY.MM.PATCH`.
### Changed
- App-scope providers now boot exactly once (memoized): a second `app.listen()`
call no longer re-runs provider factories or their side effects.
- **`WsOpenCtx.req`** (available in `@Ws`/`@Sse` handlers) is now a neutral
`WsRequest` (`{ url, headers, protocol, ip }`) instead of the Node
`http.IncomingMessage`, so it works the same across Node and Deno. Node-only
fields such as `req.socket` / `req.rawHeaders` are no longer available on
`ctx.req`; use `ctx.protocol` / `ctx.ip` / `ctx.query` / `ctx.headers`
instead — all still provided.
## [26.7.0-beta.0] - 2026-07-07
+8 -2
View File
@@ -6,12 +6,13 @@ import type { WsSocket, WsRequest } from './http/ws-core';
// doesn't declare a global `WebSocket` either — so we ambient-declare just the shape we use
// (both the instance interface and the `OPEN` static, mirroring the real WebSocket).
interface WebSocketEventMap {
message: { data: unknown };
message: { data: string | ArrayBuffer };
close: object;
error: object;
}
interface WebSocket {
readonly readyState: number;
binaryType: string;
send(data: string): void;
close(code?: number, reason?: string): void;
addEventListener<K extends keyof WebSocketEventMap>(type: K, listener: (event: WebSocketEventMap[K]) => void): void;
@@ -58,7 +59,12 @@ function toWsRequest(request: Request, info: DenoServeHandlerInfo): WsRequest {
function denoSocket(ws: WebSocket): WsSocket {
const inbound = channel<unknown>();
const ac = new AbortController();
ws.addEventListener('message', (e) => inbound.push(typeof e.data === 'string' ? e.data : String(e.data)));
ws.binaryType = 'arraybuffer';
const decoder = new TextDecoder();
ws.addEventListener('message', (e) => {
const data = e.data;
inbound.push(typeof data === 'string' ? data : decoder.decode(data as ArrayBuffer));
});
ws.addEventListener('close', () => {
inbound.close();
ac.abort();