BREAKING CHANGE(TypedSocket.createServer): Remove SmartExpress attachment support from createServer and upgrade smartsocket to ^3.0.0

This commit is contained in:
2025-12-03 09:34:33 +00:00
parent e2e359c9c7
commit 14966304e3
6 changed files with 35 additions and 27 deletions

View File

@@ -3,6 +3,6 @@
*/
export const commitinfo = {
name: '@api.global/typedsocket',
version: '3.1.1',
version: '4.0.0',
description: 'A library for creating typed WebSocket connections, supporting bi-directional communication with type safety.'
}

View File

@@ -38,16 +38,12 @@ export class TypedSocket {
* note: this will fail in browser environments as server libs are not bundled.
*/
public static async createServer(
typedrouterArg: plugins.typedrequest.TypedRouter,
smartexpressServerArg?: any
typedrouterArg: plugins.typedrequest.TypedRouter
): Promise<TypedSocket> {
const smartsocketServer = new plugins.smartsocket.Smartsocket({
alias: 'typedsocketServer',
port: 3000,
});
if (smartexpressServerArg) {
smartsocketServer.setExternalServer('smartexpress', smartexpressServerArg);
}
smartsocketServer.socketFunctions.add(
new plugins.smartsocket.SocketFunction({