fix(build): tighten TypeScript build configuration and fix Deno binary websocket sending

This commit is contained in:
2026-04-30 10:27:40 +00:00
parent a957feb868
commit 9ef4ac4a71
9 changed files with 2011 additions and 3948 deletions
+1 -1
View File
@@ -3,6 +3,6 @@
*/
export const commitinfo = {
name: '@push.rocks/smartserve',
version: '2.0.3',
version: '2.0.4',
description: 'a cross platform server module for Node, Deno and Bun'
}
+4 -1
View File
@@ -158,7 +158,10 @@ export class DenoAdapter extends BaseAdapter {
protocol: socket.protocol,
extensions: socket.extensions,
send: (data: string) => socket.send(data),
sendBinary: (data: Uint8Array | ArrayBuffer) => socket.send(data),
sendBinary: (data: Uint8Array | ArrayBuffer) => {
const payload = data instanceof ArrayBuffer ? data : new Uint8Array(data);
socket.send(payload as BufferSource);
},
close: (code?: number, reason?: string) => socket.close(code, reason),
ping: () => { /* Deno handles ping/pong automatically */ },
terminate: () => socket.close(),
+2 -2
View File
@@ -97,7 +97,7 @@ export function Guard<TBody = unknown>(
return undefined;
};
return createInterceptDecorator({ request: interceptor });
return createInterceptDecorator({ request: interceptor } as IInterceptOptions);
}
/**
@@ -119,7 +119,7 @@ export function Transform<TRes = unknown>(
? transformOrTransforms
: [transformOrTransforms];
return createInterceptDecorator({ response: transforms });
return createInterceptDecorator({ response: transforms } as IInterceptOptions);
}
/**