fix(build): tighten TypeScript build configuration and fix Deno binary websocket sending
This commit is contained in:
@@ -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'
|
||||
}
|
||||
|
||||
@@ -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(),
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user