Files
qqbot/package.json
rianli f078f0d2f5 fix: preload.cjs 改为同步 require 加载 ESM,修复框架检测不到 register/activate 的问题
- preload.cjs: 移除异步 import() + Proxy 方案,改用 Node 22 原生 CJS require ESM
- package.json: 添加 postbuild 脚本,build 后自动同步产物到 extensions 目录
- upgrade-via-source.sh: 安装后将 extensions 副本替换为 symlink 指向源码目录
2026-03-25 23:41:08 +08:00

68 lines
1.7 KiB
JSON

{
"name": "@tencent-connect/openclaw-qqbot",
"version": "1.6.6",
"type": "module",
"main": "dist/index.js",
"types": "dist/index.d.ts",
"bin": {
"openclaw-qqbot": "./bin/qqbot-cli.js",
"qqbot": "./bin/qqbot-cli.js"
},
"files": [
"dist",
"bin",
"src",
"skills",
"scripts",
"index.ts",
"preload.cjs",
"tsconfig.json",
"openclaw.plugin.json"
],
"openclaw": {
"id": "openclaw-qqbot",
"extensions": [
"./preload.cjs"
],
"channel": {
"id": "qqbot",
"label": "QQ Bot"
}
},
"scripts": {
"build": "tsc || true",
"postbuild": "node -e \"const fs=require('fs'),p=require('path'),ext=p.join(require('os').homedir(),'.openclaw/extensions/openclaw-qqbot');if(fs.existsSync(ext)&&!fs.lstatSync(ext).isSymbolicLink()){const d=p.join(ext,'dist'),pr=p.join(ext,'preload.cjs');fs.cpSync('dist',d,{recursive:true});fs.copyFileSync('preload.cjs',pr);console.log('[postbuild] synced to',ext)}\"",
"dev": "tsc --watch",
"prepack": "npm install --omit=dev",
"postinstall": "node scripts/postinstall-link-sdk.js 2>/dev/null || true"
},
"dependencies": {
"mpg123-decoder": "^1.0.3",
"silk-wasm": "^3.7.1",
"ws": "^8.18.0"
},
"bundledDependencies": [
"mpg123-decoder",
"silk-wasm",
"ws"
],
"devDependencies": {
"@types/node": "^20.0.0",
"@types/ws": "^8.5.0",
"typescript": "^5.9.3"
},
"peerDependencies": {
"openclaw": "*"
},
"homepage": "https://github.com/tencent-connect/openclaw-qqbot",
"repository": {
"type": "git",
"url": "git+https://github.com/tencent-connect/openclaw-qqbot.git"
},
"bundleDependencies": [
"mpg123-decoder",
"silk-wasm",
"ws"
]
}