Move transport-layer bridge code out of @snowluma/core into a dedicated @snowluma/bridge package and introduce a clear account layer in core. Adds Bridge, BridgeInterface, InjectBridge, ProtocolBridge (stub), adapters, and manager files under packages/bridge and updates package.json exports. In @snowluma/core the former bridge surface is replaced by Account, AccountContext, AccountInterface and AccountManager; apis were moved/renamed to account/apis and now consume AccountContext. Adjustments include packet handling plumbing (use deliverPacket / setPacketHandler), updated sendRawPacket wiring, uploaded-file cache and lifecycle changes (InjectBridge.dispose, ProtocolBridge returns a structured not-implemented result). Tests and imports were updated accordingly.
64 lines
1.8 KiB
JSON
64 lines
1.8 KiB
JSON
{
|
|
"name": "@snowluma/core",
|
|
"version": "1.9.2",
|
|
"description": "SnowLuma core - NTQQ packet sniffer with Node.js native addon",
|
|
"private": true,
|
|
"type": "module",
|
|
"main": "../../dist/index.mjs",
|
|
"exports": {
|
|
".": {
|
|
"types": "./src/index.ts",
|
|
"default": "../../dist/index.mjs"
|
|
},
|
|
"./account": {
|
|
"types": "./src/account/account.ts",
|
|
"default": "./src/account/account.ts"
|
|
},
|
|
"./account-context": {
|
|
"types": "./src/account/account-context.ts",
|
|
"default": "./src/account/account-context.ts"
|
|
},
|
|
"./account-interface": {
|
|
"types": "./src/account/account-interface.ts",
|
|
"default": "./src/account/account-interface.ts"
|
|
},
|
|
"./account-manager": {
|
|
"types": "./src/account/account-manager.ts",
|
|
"default": "./src/account/account-manager.ts"
|
|
},
|
|
"./apis": {
|
|
"types": "./src/account/apis/index.ts",
|
|
"default": "./src/account/apis/index.ts"
|
|
}
|
|
},
|
|
"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/bridge": "workspace:*",
|
|
"@snowluma/common": "workspace:*",
|
|
"@snowluma/onebot": "workspace:*",
|
|
"@snowluma/protocol": "workspace:*",
|
|
"@snowluma/proto-defs": "workspace:*",
|
|
"@snowluma/proton": "workspace:*",
|
|
"@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.18",
|
|
"tsx": "^4.21.0",
|
|
"typescript": "catalog:",
|
|
"vite": "catalog:",
|
|
"vite-plugin-cp": "^6.0.3",
|
|
"vitest": "^4.1.4"
|
|
}
|
|
}
|