Introduce an in-tree TypeScript WebSocket package (@snowluma/websocket): move JS websocket implementation into packages/websocket/src (client, server, websocket, extensions, native, index) and add package.json + tsconfig. Replace direct 'ws' dependency in core with the workspace package and update runtime manifest/description. Implement a native addon loader for platform-specific binaries, add typings/refinements across client/server/websocket (more strict types, handshake parsing, permessage-deflate plumbing, buffer/raw data handling), and wire WebSocketClient as the package default export while exposing internal types. Update vite config to bundle the new package and copy only platform-target native binaries into dist/native. Remove legacy JS entrypoints and native loader, and adjust imports/usages in core (ws-transport) to accept broader raw data types.
32 lines
821 B
JSON
32 lines
821 B
JSON
{
|
|
"name": "@snowluma/core",
|
|
"version": "0.1.0",
|
|
"description": "SnowLuma core - NTQQ packet sniffer with Node.js native addon",
|
|
"private": true,
|
|
"type": "module",
|
|
"main": "../../dist/index.mjs",
|
|
"scripts": {
|
|
"build": "vite build",
|
|
"build:all": "cross-env BUILD_WEBUI=true vite build",
|
|
"dev": "tsx src/index.ts",
|
|
"test": "vitest run",
|
|
"test:watch": "vitest",
|
|
"typecheck": "tsc --noEmit"
|
|
},
|
|
"dependencies": {
|
|
"@snowluma/websocket": "workspace:*"
|
|
},
|
|
"devDependencies": {
|
|
"@hono/node-server": "^1.19.14",
|
|
"@rollup/plugin-node-resolve": "^16.0.3",
|
|
"@types/node": "^24.12.2",
|
|
"cross-env": "^10.1.0",
|
|
"hono": "^4.12.14",
|
|
"tsx": "^4.21.0",
|
|
"typescript": "catalog:",
|
|
"vite": "catalog:",
|
|
"vite-plugin-cp": "^6.0.3",
|
|
"vitest": "^4.1.4"
|
|
}
|
|
}
|