Refactor smartsocket implementation for improved WebSocket handling and message protocol

- Updated test files to use new testing library and reduced test cycles for efficiency.
- Removed dependency on smartexpress and integrated direct WebSocket handling.
- Enhanced Smartsocket and SmartsocketClient classes to support new message types and authentication flow.
- Implemented a new message interface for structured communication between client and server.
- Added external server support for smartserve with appropriate WebSocket hooks.
- Improved connection management and error handling in SocketConnection and SocketRequest classes.
- Cleaned up code and removed deprecated socket.io references in favor of native WebSocket.
This commit is contained in:
2025-12-03 02:20:38 +00:00
parent ee59471e14
commit 1d62c9c695
14 changed files with 3901 additions and 3007 deletions

View File

@@ -6,7 +6,7 @@
"typings": "dist_ts/index.d.ts",
"type": "module",
"scripts": {
"test": "(tstest test/)",
"test": "(tstest test/ --verbose)",
"build": "(tsbuild --web --allowimplicitany && tsbundle --from ./ts/index.ts --to dist_bundle/bundle.js)",
"buildDocs": "tsdoc"
},
@@ -14,36 +14,34 @@
"type": "git",
"url": "https://code.foss.global/push.rocks/smartsocket.git"
},
"author": "Lossless GmbH",
"author": "Task Venture Capital GmbH",
"license": "MIT",
"bugs": {
"url": "https://gitlab.com/pushrocks/smartsocket/issues"
"url": "https://community.foss.global/"
},
"homepage": "https://code.foss.global/push.rocks/smartsocket",
"dependencies": {
"@api.global/typedrequest-interfaces": "^3.0.18",
"@api.global/typedserver": "^3.0.27",
"@push.rocks/isohash": "^2.0.0",
"@api.global/typedrequest-interfaces": "^3.0.19",
"@push.rocks/isohash": "^2.0.1",
"@push.rocks/isounique": "^1.0.5",
"@push.rocks/lik": "^6.0.14",
"@push.rocks/lik": "^6.2.2",
"@push.rocks/smartdelay": "^3.0.5",
"@push.rocks/smartenv": "^5.0.12",
"@push.rocks/smartjson": "^5.0.19",
"@push.rocks/smartlog": "^3.0.3",
"@push.rocks/smartpromise": "^4.0.3",
"@push.rocks/smartrx": "^3.0.7",
"@push.rocks/smarttime": "^4.0.6",
"engine.io": "6.6.4",
"socket.io": "4.8.1",
"socket.io-client": "4.8.1"
"@push.rocks/smartenv": "^6.0.0",
"@push.rocks/smartjson": "^5.2.0",
"@push.rocks/smartlog": "^3.1.10",
"@push.rocks/smartpromise": "^4.2.3",
"@push.rocks/smartrx": "^3.0.10",
"@push.rocks/smarttime": "^4.1.1",
"ws": "^8.18.3"
},
"devDependencies": {
"@git.zone/tsbuild": "^2.1.66",
"@git.zone/tsbundle": "^2.0.8",
"@git.zone/tsrun": "^1.2.44",
"@git.zone/tstest": "^1.0.77",
"@push.rocks/tapbundle": "^5.0.23",
"@types/node": "^22.13.10"
"@git.zone/tsbuild": "^3.1.2",
"@git.zone/tsbundle": "^2.6.3",
"@git.zone/tsrun": "^2.0.0",
"@git.zone/tstest": "^3.1.3",
"@push.rocks/smartserve": "^1.1.0",
"@types/node": "^24.10.1",
"@types/ws": "^8.18.1"
},
"private": false,
"files": [
@@ -66,11 +64,12 @@
"communication",
"server",
"client",
"socket.io",
"native websocket",
"authentication",
"reconnection",
"tagging",
"function routing",
"secure"
"secure",
"rpc"
]
}