mirror of
https://github.com/NapNeko/NapCatQQ.git
synced 2026-02-12 16:00:27 +00:00
Compare commits
12 Commits
copilot/fi
...
v4.9.33
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
5dc33e78ad | ||
|
|
d76a2170a0 | ||
|
|
ec2af3120c | ||
|
|
8de49a3109 | ||
|
|
dbb5a0022e | ||
|
|
cb8c8d6b57 | ||
|
|
93c140ed4e | ||
|
|
457b072f0e | ||
|
|
1869493473 | ||
|
|
f33c66ce15 | ||
|
|
e8d6f86458 | ||
|
|
a000ffdf0d |
2
.gitignore
vendored
2
.gitignore
vendored
@@ -15,3 +15,5 @@ devconfig/*
|
|||||||
checkVersion.sh
|
checkVersion.sh
|
||||||
bun.lockb
|
bun.lockb
|
||||||
tests/run/
|
tests/run/
|
||||||
|
guild1.db-wal
|
||||||
|
guild1.db-shm
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
"name": "NapCatQQ",
|
"name": "NapCatQQ",
|
||||||
"slug": "NapCat.Framework",
|
"slug": "NapCat.Framework",
|
||||||
"description": "高性能的 OneBot 11 协议实现",
|
"description": "高性能的 OneBot 11 协议实现",
|
||||||
"version": "4.9.27",
|
"version": "4.9.32",
|
||||||
"icon": "./logo.png",
|
"icon": "./logo.png",
|
||||||
"authors": [
|
"authors": [
|
||||||
{
|
{
|
||||||
|
|||||||
291
napcat.webui/package-lock.json
generated
291
napcat.webui/package-lock.json
generated
@@ -84,6 +84,7 @@
|
|||||||
"zod": "^3.24.1"
|
"zod": "^3.24.1"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
|
"@eslint/js": "^9.19.0",
|
||||||
"@react-types/shared": "^3.26.0",
|
"@react-types/shared": "^3.26.0",
|
||||||
"@trivago/prettier-plugin-sort-imports": "^5.2.2",
|
"@trivago/prettier-plugin-sort-imports": "^5.2.2",
|
||||||
"@types/crypto-js": "^4.2.2",
|
"@types/crypto-js": "^4.2.2",
|
||||||
@@ -94,14 +95,20 @@
|
|||||||
"@types/react": "^19.0.8",
|
"@types/react": "^19.0.8",
|
||||||
"@types/react-dom": "^19.0.3",
|
"@types/react-dom": "^19.0.3",
|
||||||
"@types/react-window": "^1.8.8",
|
"@types/react-window": "^1.8.8",
|
||||||
|
"@typescript-eslint/eslint-plugin": "^8.22.0",
|
||||||
|
"@typescript-eslint/parser": "^8.22.0",
|
||||||
"@vitejs/plugin-react": "^4.3.4",
|
"@vitejs/plugin-react": "^4.3.4",
|
||||||
"autoprefixer": "^10.4.20",
|
"autoprefixer": "^10.4.20",
|
||||||
"eslint": "^9.19.0",
|
"eslint": "^9.19.0",
|
||||||
|
"eslint-config-prettier": "^10.0.1",
|
||||||
"eslint-plugin-import": "^2.31.0",
|
"eslint-plugin-import": "^2.31.0",
|
||||||
"eslint-plugin-jsx-a11y": "^6.10.2",
|
"eslint-plugin-jsx-a11y": "^6.10.2",
|
||||||
"eslint-plugin-node": "^11.1.0",
|
"eslint-plugin-node": "^11.1.0",
|
||||||
"eslint-plugin-prettier": "5.2.3",
|
"eslint-plugin-prettier": "5.2.3",
|
||||||
|
"eslint-plugin-react": "^7.37.2",
|
||||||
|
"eslint-plugin-react-hooks": "^5.1.0",
|
||||||
"eslint-plugin-unused-imports": "^4.1.4",
|
"eslint-plugin-unused-imports": "^4.1.4",
|
||||||
|
"globals": "^15.14.0",
|
||||||
"postcss": "^8.5.1",
|
"postcss": "^8.5.1",
|
||||||
"prettier": "^3.4.2",
|
"prettier": "^3.4.2",
|
||||||
"typescript": "^5.7.3",
|
"typescript": "^5.7.3",
|
||||||
@@ -8183,8 +8190,6 @@
|
|||||||
"integrity": "sha512-QXwAlHlbcAwNlEEMKQS2RCgJsgXrTJdjXT08xEgbPFa2yYQgVjBymxP5DrfrE7X7iodSzd9qBUHUycdyVJTW1w==",
|
"integrity": "sha512-QXwAlHlbcAwNlEEMKQS2RCgJsgXrTJdjXT08xEgbPFa2yYQgVjBymxP5DrfrE7X7iodSzd9qBUHUycdyVJTW1w==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"optional": true,
|
|
||||||
"peer": true,
|
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@eslint-community/regexpp": "^4.10.0",
|
"@eslint-community/regexpp": "^4.10.0",
|
||||||
"@typescript-eslint/scope-manager": "8.34.0",
|
"@typescript-eslint/scope-manager": "8.34.0",
|
||||||
@@ -8215,8 +8220,6 @@
|
|||||||
"integrity": "sha512-vxXJV1hVFx3IXz/oy2sICsJukaBrtDEQSBiV48/YIV5KWjX1dO+bcIr/kCPrW6weKXvsaGKFNlwH0v2eYdRRbA==",
|
"integrity": "sha512-vxXJV1hVFx3IXz/oy2sICsJukaBrtDEQSBiV48/YIV5KWjX1dO+bcIr/kCPrW6weKXvsaGKFNlwH0v2eYdRRbA==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"optional": true,
|
|
||||||
"peer": true,
|
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@typescript-eslint/scope-manager": "8.34.0",
|
"@typescript-eslint/scope-manager": "8.34.0",
|
||||||
"@typescript-eslint/types": "8.34.0",
|
"@typescript-eslint/types": "8.34.0",
|
||||||
@@ -8242,8 +8245,6 @@
|
|||||||
"integrity": "sha512-iEgDALRf970/B2YExmtPMPF54NenZUf4xpL3wsCRx/lgjz6ul/l13R81ozP/ZNuXfnLCS+oPmG7JIxfdNYKELw==",
|
"integrity": "sha512-iEgDALRf970/B2YExmtPMPF54NenZUf4xpL3wsCRx/lgjz6ul/l13R81ozP/ZNuXfnLCS+oPmG7JIxfdNYKELw==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"optional": true,
|
|
||||||
"peer": true,
|
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@typescript-eslint/tsconfig-utils": "^8.34.0",
|
"@typescript-eslint/tsconfig-utils": "^8.34.0",
|
||||||
"@typescript-eslint/types": "^8.34.0",
|
"@typescript-eslint/types": "^8.34.0",
|
||||||
@@ -8266,8 +8267,6 @@
|
|||||||
"integrity": "sha512-9Ac0X8WiLykl0aj1oYQNcLZjHgBojT6cW68yAgZ19letYu+Hxd0rE0veI1XznSSst1X5lwnxhPbVdwjDRIomRw==",
|
"integrity": "sha512-9Ac0X8WiLykl0aj1oYQNcLZjHgBojT6cW68yAgZ19letYu+Hxd0rE0veI1XznSSst1X5lwnxhPbVdwjDRIomRw==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"optional": true,
|
|
||||||
"peer": true,
|
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@typescript-eslint/types": "8.34.0",
|
"@typescript-eslint/types": "8.34.0",
|
||||||
"@typescript-eslint/visitor-keys": "8.34.0"
|
"@typescript-eslint/visitor-keys": "8.34.0"
|
||||||
@@ -8286,8 +8285,6 @@
|
|||||||
"integrity": "sha512-+W9VYHKFIzA5cBeooqQxqNriAP0QeQ7xTiDuIOr71hzgffm3EL2hxwWBIIj4GuofIbKxGNarpKqIq6Q6YrShOA==",
|
"integrity": "sha512-+W9VYHKFIzA5cBeooqQxqNriAP0QeQ7xTiDuIOr71hzgffm3EL2hxwWBIIj4GuofIbKxGNarpKqIq6Q6YrShOA==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"optional": true,
|
|
||||||
"peer": true,
|
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": "^18.18.0 || ^20.9.0 || >=21.1.0"
|
"node": "^18.18.0 || ^20.9.0 || >=21.1.0"
|
||||||
},
|
},
|
||||||
@@ -8305,8 +8302,6 @@
|
|||||||
"integrity": "sha512-n7zSmOcUVhcRYC75W2pnPpbO1iwhJY3NLoHEtbJwJSNlVAZuwqu05zY3f3s2SDWWDSo9FdN5szqc73DCtDObAg==",
|
"integrity": "sha512-n7zSmOcUVhcRYC75W2pnPpbO1iwhJY3NLoHEtbJwJSNlVAZuwqu05zY3f3s2SDWWDSo9FdN5szqc73DCtDObAg==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"optional": true,
|
|
||||||
"peer": true,
|
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@typescript-eslint/typescript-estree": "8.34.0",
|
"@typescript-eslint/typescript-estree": "8.34.0",
|
||||||
"@typescript-eslint/utils": "8.34.0",
|
"@typescript-eslint/utils": "8.34.0",
|
||||||
@@ -8331,8 +8326,6 @@
|
|||||||
"integrity": "sha512-9V24k/paICYPniajHfJ4cuAWETnt7Ssy+R0Rbcqo5sSFr3QEZ/8TSoUi9XeXVBGXCaLtwTOKSLGcInCAvyZeMA==",
|
"integrity": "sha512-9V24k/paICYPniajHfJ4cuAWETnt7Ssy+R0Rbcqo5sSFr3QEZ/8TSoUi9XeXVBGXCaLtwTOKSLGcInCAvyZeMA==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"optional": true,
|
|
||||||
"peer": true,
|
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": "^18.18.0 || ^20.9.0 || >=21.1.0"
|
"node": "^18.18.0 || ^20.9.0 || >=21.1.0"
|
||||||
},
|
},
|
||||||
@@ -8347,8 +8340,6 @@
|
|||||||
"integrity": "sha512-rOi4KZxI7E0+BMqG7emPSK1bB4RICCpF7QD3KCLXn9ZvWoESsOMlHyZPAHyG04ujVplPaHbmEvs34m+wjgtVtg==",
|
"integrity": "sha512-rOi4KZxI7E0+BMqG7emPSK1bB4RICCpF7QD3KCLXn9ZvWoESsOMlHyZPAHyG04ujVplPaHbmEvs34m+wjgtVtg==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"optional": true,
|
|
||||||
"peer": true,
|
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@typescript-eslint/project-service": "8.34.0",
|
"@typescript-eslint/project-service": "8.34.0",
|
||||||
"@typescript-eslint/tsconfig-utils": "8.34.0",
|
"@typescript-eslint/tsconfig-utils": "8.34.0",
|
||||||
@@ -8378,8 +8369,6 @@
|
|||||||
"integrity": "sha512-8L4tWatGchV9A1cKbjaavS6mwYwp39jql8xUmIIKJdm+qiaeHy5KMKlBrf30akXAWBzn2SqKsNOtSENWUwg7XQ==",
|
"integrity": "sha512-8L4tWatGchV9A1cKbjaavS6mwYwp39jql8xUmIIKJdm+qiaeHy5KMKlBrf30akXAWBzn2SqKsNOtSENWUwg7XQ==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"optional": true,
|
|
||||||
"peer": true,
|
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@eslint-community/eslint-utils": "^4.7.0",
|
"@eslint-community/eslint-utils": "^4.7.0",
|
||||||
"@typescript-eslint/scope-manager": "8.34.0",
|
"@typescript-eslint/scope-manager": "8.34.0",
|
||||||
@@ -8404,8 +8393,6 @@
|
|||||||
"integrity": "sha512-qHV7pW7E85A0x6qyrFn+O+q1k1p3tQCsqIZ1KZ5ESLXY57aTvUd3/a4rdPTeXisvhXn2VQG0VSKUqs8KHF2zcA==",
|
"integrity": "sha512-qHV7pW7E85A0x6qyrFn+O+q1k1p3tQCsqIZ1KZ5ESLXY57aTvUd3/a4rdPTeXisvhXn2VQG0VSKUqs8KHF2zcA==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"optional": true,
|
|
||||||
"peer": true,
|
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@typescript-eslint/types": "8.34.0",
|
"@typescript-eslint/types": "8.34.0",
|
||||||
"eslint-visitor-keys": "^4.2.0"
|
"eslint-visitor-keys": "^4.2.0"
|
||||||
@@ -8424,8 +8411,6 @@
|
|||||||
"integrity": "sha512-Uhdk5sfqcee/9H/rCOJikYz67o0a2Tw2hGRPOG2Y1R2dg7brRe1uG0yaNQDHu+TO/uQPF/5eCapvYSmHUjt7JQ==",
|
"integrity": "sha512-Uhdk5sfqcee/9H/rCOJikYz67o0a2Tw2hGRPOG2Y1R2dg7brRe1uG0yaNQDHu+TO/uQPF/5eCapvYSmHUjt7JQ==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"license": "Apache-2.0",
|
"license": "Apache-2.0",
|
||||||
"optional": true,
|
|
||||||
"peer": true,
|
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": "^18.18.0 || ^20.9.0 || >=21.1.0"
|
"node": "^18.18.0 || ^20.9.0 || >=21.1.0"
|
||||||
},
|
},
|
||||||
@@ -8678,6 +8663,27 @@
|
|||||||
"url": "https://github.com/sponsors/ljharb"
|
"url": "https://github.com/sponsors/ljharb"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"node_modules/array.prototype.findlast": {
|
||||||
|
"version": "1.2.5",
|
||||||
|
"resolved": "https://registry.npmjs.org/array.prototype.findlast/-/array.prototype.findlast-1.2.5.tgz",
|
||||||
|
"integrity": "sha512-CVvd6FHg1Z3POpBLxO6E6zr+rSKEQ9L6rZHAaY7lLfhKsWYUBBOuMs0e9o24oopj6H+geRCX0YJ+TJLBK2eHyQ==",
|
||||||
|
"dev": true,
|
||||||
|
"license": "MIT",
|
||||||
|
"dependencies": {
|
||||||
|
"call-bind": "^1.0.7",
|
||||||
|
"define-properties": "^1.2.1",
|
||||||
|
"es-abstract": "^1.23.2",
|
||||||
|
"es-errors": "^1.3.0",
|
||||||
|
"es-object-atoms": "^1.0.0",
|
||||||
|
"es-shim-unscopables": "^1.0.2"
|
||||||
|
},
|
||||||
|
"engines": {
|
||||||
|
"node": ">= 0.4"
|
||||||
|
},
|
||||||
|
"funding": {
|
||||||
|
"url": "https://github.com/sponsors/ljharb"
|
||||||
|
}
|
||||||
|
},
|
||||||
"node_modules/array.prototype.findlastindex": {
|
"node_modules/array.prototype.findlastindex": {
|
||||||
"version": "1.2.6",
|
"version": "1.2.6",
|
||||||
"resolved": "https://registry.npmjs.org/array.prototype.findlastindex/-/array.prototype.findlastindex-1.2.6.tgz",
|
"resolved": "https://registry.npmjs.org/array.prototype.findlastindex/-/array.prototype.findlastindex-1.2.6.tgz",
|
||||||
@@ -8738,6 +8744,23 @@
|
|||||||
"url": "https://github.com/sponsors/ljharb"
|
"url": "https://github.com/sponsors/ljharb"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"node_modules/array.prototype.tosorted": {
|
||||||
|
"version": "1.1.4",
|
||||||
|
"resolved": "https://registry.npmjs.org/array.prototype.tosorted/-/array.prototype.tosorted-1.1.4.tgz",
|
||||||
|
"integrity": "sha512-p6Fx8B7b7ZhL/gmUsAy0D15WhvDccw3mnGNbZpi3pmeJdxtWsj2jEaI4Y6oo3XiHfzuSgPwKc04MYt6KgvC/wA==",
|
||||||
|
"dev": true,
|
||||||
|
"license": "MIT",
|
||||||
|
"dependencies": {
|
||||||
|
"call-bind": "^1.0.7",
|
||||||
|
"define-properties": "^1.2.1",
|
||||||
|
"es-abstract": "^1.23.3",
|
||||||
|
"es-errors": "^1.3.0",
|
||||||
|
"es-shim-unscopables": "^1.0.2"
|
||||||
|
},
|
||||||
|
"engines": {
|
||||||
|
"node": ">= 0.4"
|
||||||
|
}
|
||||||
|
},
|
||||||
"node_modules/arraybuffer.prototype.slice": {
|
"node_modules/arraybuffer.prototype.slice": {
|
||||||
"version": "1.0.4",
|
"version": "1.0.4",
|
||||||
"resolved": "https://registry.npmjs.org/arraybuffer.prototype.slice/-/arraybuffer.prototype.slice-1.0.4.tgz",
|
"resolved": "https://registry.npmjs.org/arraybuffer.prototype.slice/-/arraybuffer.prototype.slice-1.0.4.tgz",
|
||||||
@@ -9658,6 +9681,34 @@
|
|||||||
"node": ">= 0.4"
|
"node": ">= 0.4"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"node_modules/es-iterator-helpers": {
|
||||||
|
"version": "1.2.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/es-iterator-helpers/-/es-iterator-helpers-1.2.1.tgz",
|
||||||
|
"integrity": "sha512-uDn+FE1yrDzyC0pCo961B2IHbdM8y/ACZsKD4dG6WqrjV53BADjwa7D+1aom2rsNVfLyDgU/eigvlJGJ08OQ4w==",
|
||||||
|
"dev": true,
|
||||||
|
"license": "MIT",
|
||||||
|
"dependencies": {
|
||||||
|
"call-bind": "^1.0.8",
|
||||||
|
"call-bound": "^1.0.3",
|
||||||
|
"define-properties": "^1.2.1",
|
||||||
|
"es-abstract": "^1.23.6",
|
||||||
|
"es-errors": "^1.3.0",
|
||||||
|
"es-set-tostringtag": "^2.0.3",
|
||||||
|
"function-bind": "^1.1.2",
|
||||||
|
"get-intrinsic": "^1.2.6",
|
||||||
|
"globalthis": "^1.0.4",
|
||||||
|
"gopd": "^1.2.0",
|
||||||
|
"has-property-descriptors": "^1.0.2",
|
||||||
|
"has-proto": "^1.2.0",
|
||||||
|
"has-symbols": "^1.1.0",
|
||||||
|
"internal-slot": "^1.1.0",
|
||||||
|
"iterator.prototype": "^1.1.4",
|
||||||
|
"safe-array-concat": "^1.1.3"
|
||||||
|
},
|
||||||
|
"engines": {
|
||||||
|
"node": ">= 0.4"
|
||||||
|
}
|
||||||
|
},
|
||||||
"node_modules/es-object-atoms": {
|
"node_modules/es-object-atoms": {
|
||||||
"version": "1.1.1",
|
"version": "1.1.1",
|
||||||
"resolved": "https://registry.npmjs.org/es-object-atoms/-/es-object-atoms-1.1.1.tgz",
|
"resolved": "https://registry.npmjs.org/es-object-atoms/-/es-object-atoms-1.1.1.tgz",
|
||||||
@@ -9847,8 +9898,6 @@
|
|||||||
"integrity": "sha512-zc1UmCpNltmVY34vuLRV61r1K27sWuX39E+uyUnY8xS2Bex88VV9cugG+UZbRSRGtGyFboj+D8JODyme1plMpw==",
|
"integrity": "sha512-zc1UmCpNltmVY34vuLRV61r1K27sWuX39E+uyUnY8xS2Bex88VV9cugG+UZbRSRGtGyFboj+D8JODyme1plMpw==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"optional": true,
|
|
||||||
"peer": true,
|
|
||||||
"bin": {
|
"bin": {
|
||||||
"eslint-config-prettier": "bin/cli.js"
|
"eslint-config-prettier": "bin/cli.js"
|
||||||
},
|
},
|
||||||
@@ -10157,6 +10206,104 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"node_modules/eslint-plugin-react": {
|
||||||
|
"version": "7.37.5",
|
||||||
|
"resolved": "https://registry.npmjs.org/eslint-plugin-react/-/eslint-plugin-react-7.37.5.tgz",
|
||||||
|
"integrity": "sha512-Qteup0SqU15kdocexFNAJMvCJEfa2xUKNV4CC1xsVMrIIqEy3SQ/rqyxCWNzfrd3/ldy6HMlD2e0JDVpDg2qIA==",
|
||||||
|
"dev": true,
|
||||||
|
"license": "MIT",
|
||||||
|
"dependencies": {
|
||||||
|
"array-includes": "^3.1.8",
|
||||||
|
"array.prototype.findlast": "^1.2.5",
|
||||||
|
"array.prototype.flatmap": "^1.3.3",
|
||||||
|
"array.prototype.tosorted": "^1.1.4",
|
||||||
|
"doctrine": "^2.1.0",
|
||||||
|
"es-iterator-helpers": "^1.2.1",
|
||||||
|
"estraverse": "^5.3.0",
|
||||||
|
"hasown": "^2.0.2",
|
||||||
|
"jsx-ast-utils": "^2.4.1 || ^3.0.0",
|
||||||
|
"minimatch": "^3.1.2",
|
||||||
|
"object.entries": "^1.1.9",
|
||||||
|
"object.fromentries": "^2.0.8",
|
||||||
|
"object.values": "^1.2.1",
|
||||||
|
"prop-types": "^15.8.1",
|
||||||
|
"resolve": "^2.0.0-next.5",
|
||||||
|
"semver": "^6.3.1",
|
||||||
|
"string.prototype.matchall": "^4.0.12",
|
||||||
|
"string.prototype.repeat": "^1.0.0"
|
||||||
|
},
|
||||||
|
"engines": {
|
||||||
|
"node": ">=4"
|
||||||
|
},
|
||||||
|
"peerDependencies": {
|
||||||
|
"eslint": "^3 || ^4 || ^5 || ^6 || ^7 || ^8 || ^9.7"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/eslint-plugin-react-hooks": {
|
||||||
|
"version": "5.2.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/eslint-plugin-react-hooks/-/eslint-plugin-react-hooks-5.2.0.tgz",
|
||||||
|
"integrity": "sha512-+f15FfK64YQwZdJNELETdn5ibXEUQmW1DZL6KXhNnc2heoy/sg9VJJeT7n8TlMWouzWqSWavFkIhHyIbIAEapg==",
|
||||||
|
"dev": true,
|
||||||
|
"license": "MIT",
|
||||||
|
"engines": {
|
||||||
|
"node": ">=10"
|
||||||
|
},
|
||||||
|
"peerDependencies": {
|
||||||
|
"eslint": "^3.0.0 || ^4.0.0 || ^5.0.0 || ^6.0.0 || ^7.0.0 || ^8.0.0-0 || ^9.0.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/eslint-plugin-react/node_modules/brace-expansion": {
|
||||||
|
"version": "1.1.12",
|
||||||
|
"resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.12.tgz",
|
||||||
|
"integrity": "sha512-9T9UjW3r0UW5c1Q7GTwllptXwhvYmEzFhzMfZ9H7FQWt+uZePjZPjBP/W1ZEyZ1twGWom5/56TF4lPcqjnDHcg==",
|
||||||
|
"dev": true,
|
||||||
|
"license": "MIT",
|
||||||
|
"dependencies": {
|
||||||
|
"balanced-match": "^1.0.0",
|
||||||
|
"concat-map": "0.0.1"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/eslint-plugin-react/node_modules/minimatch": {
|
||||||
|
"version": "3.1.2",
|
||||||
|
"resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz",
|
||||||
|
"integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==",
|
||||||
|
"dev": true,
|
||||||
|
"license": "ISC",
|
||||||
|
"dependencies": {
|
||||||
|
"brace-expansion": "^1.1.7"
|
||||||
|
},
|
||||||
|
"engines": {
|
||||||
|
"node": "*"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/eslint-plugin-react/node_modules/resolve": {
|
||||||
|
"version": "2.0.0-next.5",
|
||||||
|
"resolved": "https://registry.npmjs.org/resolve/-/resolve-2.0.0-next.5.tgz",
|
||||||
|
"integrity": "sha512-U7WjGVG9sH8tvjW5SmGbQuui75FiyjAX72HX15DwBBwF9dNiQZRQAg9nnPhYy+TUnE0+VcrttuvNI8oSxZcocA==",
|
||||||
|
"dev": true,
|
||||||
|
"license": "MIT",
|
||||||
|
"dependencies": {
|
||||||
|
"is-core-module": "^2.13.0",
|
||||||
|
"path-parse": "^1.0.7",
|
||||||
|
"supports-preserve-symlinks-flag": "^1.0.0"
|
||||||
|
},
|
||||||
|
"bin": {
|
||||||
|
"resolve": "bin/resolve"
|
||||||
|
},
|
||||||
|
"funding": {
|
||||||
|
"url": "https://github.com/sponsors/ljharb"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/eslint-plugin-react/node_modules/semver": {
|
||||||
|
"version": "6.3.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz",
|
||||||
|
"integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==",
|
||||||
|
"dev": true,
|
||||||
|
"license": "ISC",
|
||||||
|
"bin": {
|
||||||
|
"semver": "bin/semver.js"
|
||||||
|
}
|
||||||
|
},
|
||||||
"node_modules/eslint-plugin-unused-imports": {
|
"node_modules/eslint-plugin-unused-imports": {
|
||||||
"version": "4.1.4",
|
"version": "4.1.4",
|
||||||
"resolved": "https://registry.npmjs.org/eslint-plugin-unused-imports/-/eslint-plugin-unused-imports-4.1.4.tgz",
|
"resolved": "https://registry.npmjs.org/eslint-plugin-unused-imports/-/eslint-plugin-unused-imports-4.1.4.tgz",
|
||||||
@@ -10804,6 +10951,19 @@
|
|||||||
"node": ">=10.13.0"
|
"node": ">=10.13.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"node_modules/globals": {
|
||||||
|
"version": "15.15.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/globals/-/globals-15.15.0.tgz",
|
||||||
|
"integrity": "sha512-7ACyT3wmyp3I61S4fG682L0VA2RGD9otkqGJIwNUMF1SWUombIIk+af1unuDYgMm082aHYwD+mzJvv9Iu8dsgg==",
|
||||||
|
"dev": true,
|
||||||
|
"license": "MIT",
|
||||||
|
"engines": {
|
||||||
|
"node": ">=18"
|
||||||
|
},
|
||||||
|
"funding": {
|
||||||
|
"url": "https://github.com/sponsors/sindresorhus"
|
||||||
|
}
|
||||||
|
},
|
||||||
"node_modules/globalthis": {
|
"node_modules/globalthis": {
|
||||||
"version": "1.0.4",
|
"version": "1.0.4",
|
||||||
"resolved": "https://registry.npmjs.org/globalthis/-/globalthis-1.0.4.tgz",
|
"resolved": "https://registry.npmjs.org/globalthis/-/globalthis-1.0.4.tgz",
|
||||||
@@ -10861,9 +11021,7 @@
|
|||||||
"resolved": "https://registry.npmjs.org/graphemer/-/graphemer-1.4.0.tgz",
|
"resolved": "https://registry.npmjs.org/graphemer/-/graphemer-1.4.0.tgz",
|
||||||
"integrity": "sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag==",
|
"integrity": "sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"license": "MIT",
|
"license": "MIT"
|
||||||
"optional": true,
|
|
||||||
"peer": true
|
|
||||||
},
|
},
|
||||||
"node_modules/has-bigints": {
|
"node_modules/has-bigints": {
|
||||||
"version": "1.1.0",
|
"version": "1.1.0",
|
||||||
@@ -11018,8 +11176,6 @@
|
|||||||
"integrity": "sha512-Hs59xBNfUIunMFgWAbGX5cq6893IbWg4KnrjbYwX3tx0ztorVgTDA6B2sxf8ejHJ4wz8BqGUMYlnzNBer5NvGg==",
|
"integrity": "sha512-Hs59xBNfUIunMFgWAbGX5cq6893IbWg4KnrjbYwX3tx0ztorVgTDA6B2sxf8ejHJ4wz8BqGUMYlnzNBer5NvGg==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"optional": true,
|
|
||||||
"peer": true,
|
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">= 4"
|
"node": ">= 4"
|
||||||
}
|
}
|
||||||
@@ -11583,6 +11739,24 @@
|
|||||||
"integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==",
|
"integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==",
|
||||||
"license": "ISC"
|
"license": "ISC"
|
||||||
},
|
},
|
||||||
|
"node_modules/iterator.prototype": {
|
||||||
|
"version": "1.1.5",
|
||||||
|
"resolved": "https://registry.npmjs.org/iterator.prototype/-/iterator.prototype-1.1.5.tgz",
|
||||||
|
"integrity": "sha512-H0dkQoCa3b2VEeKQBOxFph+JAbcrQdE7KC0UkqwpLmv2EC4P41QXP+rqo9wYodACiG5/WM5s9oDApTU8utwj9g==",
|
||||||
|
"dev": true,
|
||||||
|
"license": "MIT",
|
||||||
|
"dependencies": {
|
||||||
|
"define-data-property": "^1.1.4",
|
||||||
|
"es-object-atoms": "^1.0.0",
|
||||||
|
"get-intrinsic": "^1.2.6",
|
||||||
|
"get-proto": "^1.0.0",
|
||||||
|
"has-symbols": "^1.1.0",
|
||||||
|
"set-function-name": "^2.0.2"
|
||||||
|
},
|
||||||
|
"engines": {
|
||||||
|
"node": ">= 0.4"
|
||||||
|
}
|
||||||
|
},
|
||||||
"node_modules/jackspeak": {
|
"node_modules/jackspeak": {
|
||||||
"version": "3.4.3",
|
"version": "3.4.3",
|
||||||
"resolved": "https://registry.npmjs.org/jackspeak/-/jackspeak-3.4.3.tgz",
|
"resolved": "https://registry.npmjs.org/jackspeak/-/jackspeak-3.4.3.tgz",
|
||||||
@@ -12999,6 +13173,22 @@
|
|||||||
"url": "https://github.com/sponsors/ljharb"
|
"url": "https://github.com/sponsors/ljharb"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"node_modules/object.entries": {
|
||||||
|
"version": "1.1.9",
|
||||||
|
"resolved": "https://registry.npmjs.org/object.entries/-/object.entries-1.1.9.tgz",
|
||||||
|
"integrity": "sha512-8u/hfXFRBD1O0hPUjioLhoWFHRmt6tKA4/vZPyckBr18l1KE9uHrFaFaUi8MDRTpi4uak2goyPTSNJLXX2k2Hw==",
|
||||||
|
"dev": true,
|
||||||
|
"license": "MIT",
|
||||||
|
"dependencies": {
|
||||||
|
"call-bind": "^1.0.8",
|
||||||
|
"call-bound": "^1.0.4",
|
||||||
|
"define-properties": "^1.2.1",
|
||||||
|
"es-object-atoms": "^1.1.1"
|
||||||
|
},
|
||||||
|
"engines": {
|
||||||
|
"node": ">= 0.4"
|
||||||
|
}
|
||||||
|
},
|
||||||
"node_modules/object.fromentries": {
|
"node_modules/object.fromentries": {
|
||||||
"version": "2.0.8",
|
"version": "2.0.8",
|
||||||
"resolved": "https://registry.npmjs.org/object.fromentries/-/object.fromentries-2.0.8.tgz",
|
"resolved": "https://registry.npmjs.org/object.fromentries/-/object.fromentries-2.0.8.tgz",
|
||||||
@@ -14231,8 +14421,6 @@
|
|||||||
"integrity": "sha512-RF0Fw+rO5AMf9MAyaRXI4AV0Ulj5lMHqVxxdSgiVbixSCXoEmmX/jk0CuJw4+3SqroYO9VoUh+HcuJivvtJemA==",
|
"integrity": "sha512-RF0Fw+rO5AMf9MAyaRXI4AV0Ulj5lMHqVxxdSgiVbixSCXoEmmX/jk0CuJw4+3SqroYO9VoUh+HcuJivvtJemA==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"license": "ISC",
|
"license": "ISC",
|
||||||
"optional": true,
|
|
||||||
"peer": true,
|
|
||||||
"bin": {
|
"bin": {
|
||||||
"semver": "bin/semver.js"
|
"semver": "bin/semver.js"
|
||||||
},
|
},
|
||||||
@@ -14532,6 +14720,45 @@
|
|||||||
"node": ">= 0.4"
|
"node": ">= 0.4"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"node_modules/string.prototype.matchall": {
|
||||||
|
"version": "4.0.12",
|
||||||
|
"resolved": "https://registry.npmjs.org/string.prototype.matchall/-/string.prototype.matchall-4.0.12.tgz",
|
||||||
|
"integrity": "sha512-6CC9uyBL+/48dYizRf7H7VAYCMCNTBeM78x/VTUe9bFEaxBepPJDa1Ow99LqI/1yF7kuy7Q3cQsYMrcjGUcskA==",
|
||||||
|
"dev": true,
|
||||||
|
"license": "MIT",
|
||||||
|
"dependencies": {
|
||||||
|
"call-bind": "^1.0.8",
|
||||||
|
"call-bound": "^1.0.3",
|
||||||
|
"define-properties": "^1.2.1",
|
||||||
|
"es-abstract": "^1.23.6",
|
||||||
|
"es-errors": "^1.3.0",
|
||||||
|
"es-object-atoms": "^1.0.0",
|
||||||
|
"get-intrinsic": "^1.2.6",
|
||||||
|
"gopd": "^1.2.0",
|
||||||
|
"has-symbols": "^1.1.0",
|
||||||
|
"internal-slot": "^1.1.0",
|
||||||
|
"regexp.prototype.flags": "^1.5.3",
|
||||||
|
"set-function-name": "^2.0.2",
|
||||||
|
"side-channel": "^1.1.0"
|
||||||
|
},
|
||||||
|
"engines": {
|
||||||
|
"node": ">= 0.4"
|
||||||
|
},
|
||||||
|
"funding": {
|
||||||
|
"url": "https://github.com/sponsors/ljharb"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/string.prototype.repeat": {
|
||||||
|
"version": "1.0.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/string.prototype.repeat/-/string.prototype.repeat-1.0.0.tgz",
|
||||||
|
"integrity": "sha512-0u/TldDbKD8bFCQ/4f5+mNRrXwZ8hg2w7ZR8wa16e8z9XpePWl3eGEcUD0OXpEH/VJH/2G3gjUtR3ZOiBe2S/w==",
|
||||||
|
"dev": true,
|
||||||
|
"license": "MIT",
|
||||||
|
"dependencies": {
|
||||||
|
"define-properties": "^1.1.3",
|
||||||
|
"es-abstract": "^1.17.5"
|
||||||
|
}
|
||||||
|
},
|
||||||
"node_modules/string.prototype.trim": {
|
"node_modules/string.prototype.trim": {
|
||||||
"version": "1.2.10",
|
"version": "1.2.10",
|
||||||
"resolved": "https://registry.npmjs.org/string.prototype.trim/-/string.prototype.trim-1.2.10.tgz",
|
"resolved": "https://registry.npmjs.org/string.prototype.trim/-/string.prototype.trim-1.2.10.tgz",
|
||||||
@@ -14930,8 +15157,6 @@
|
|||||||
"integrity": "sha512-CUgTZL1irw8u29bzrOD/nH85jqyc74D6SshFgujOIA7osm2Rz7dYH77agkx7H4FBNxDq7Cjf+IjaX/8zwFW+ZQ==",
|
"integrity": "sha512-CUgTZL1irw8u29bzrOD/nH85jqyc74D6SshFgujOIA7osm2Rz7dYH77agkx7H4FBNxDq7Cjf+IjaX/8zwFW+ZQ==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"optional": true,
|
|
||||||
"peer": true,
|
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=18.12"
|
"node": ">=18.12"
|
||||||
},
|
},
|
||||||
|
|||||||
30
napiloader/napiLoader-debug.bat
Normal file
30
napiloader/napiLoader-debug.bat
Normal file
@@ -0,0 +1,30 @@
|
|||||||
|
@echo off
|
||||||
|
chcp 65001
|
||||||
|
set NAPCAT_INJECT_PATH=%cd%\napiloader.dll
|
||||||
|
set NAPCAT_LAUNCHER_PATH=%cd%\napimain.exe
|
||||||
|
set NAPCAT_MAIN_PATH=%cd%\nativeLoader.cjs
|
||||||
|
set NAPCAT_DEBUG_CONSOLE=1
|
||||||
|
:loop_read
|
||||||
|
for /f "tokens=2*" %%a in ('reg query "HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall\QQ" /v "UninstallString"') do (
|
||||||
|
set "RetString=%%~b"
|
||||||
|
goto :napcat_boot
|
||||||
|
)
|
||||||
|
|
||||||
|
:napcat_boot
|
||||||
|
for %%a in ("%RetString%") do (
|
||||||
|
set "pathWithoutUninstall=%%~dpa"
|
||||||
|
)
|
||||||
|
|
||||||
|
set "QQPath=%pathWithoutUninstall%QQ.exe"
|
||||||
|
|
||||||
|
if not exist "%QQpath%" (
|
||||||
|
echo provided QQ path is invalid
|
||||||
|
pause
|
||||||
|
exit /b
|
||||||
|
)
|
||||||
|
|
||||||
|
set NAPCAT_MAIN_PATH=%NAPCAT_MAIN_PATH:\=/%
|
||||||
|
|
||||||
|
"%NAPCAT_LAUNCHER_PATH%" "%QQPath%" "%NAPCAT_INJECT_PATH%" "%NAPCAT_MAIN_PATH%"
|
||||||
|
|
||||||
|
pause
|
||||||
27
napiloader/napiLoader.bat
Normal file
27
napiloader/napiLoader.bat
Normal file
@@ -0,0 +1,27 @@
|
|||||||
|
@echo off
|
||||||
|
chcp 65001
|
||||||
|
set NAPCAT_INJECT_PATH=%cd%\napiloader.dll
|
||||||
|
set NAPCAT_LAUNCHER_PATH=%cd%\napimain.exe
|
||||||
|
set NAPCAT_MAIN_PATH=%cd%\nativeLoader.cjs
|
||||||
|
:loop_read
|
||||||
|
for /f "tokens=2*" %%a in ('reg query "HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall\QQ" /v "UninstallString"') do (
|
||||||
|
set "RetString=%%~b"
|
||||||
|
goto :napcat_boot
|
||||||
|
)
|
||||||
|
|
||||||
|
:napcat_boot
|
||||||
|
for %%a in ("%RetString%") do (
|
||||||
|
set "pathWithoutUninstall=%%~dpa"
|
||||||
|
)
|
||||||
|
|
||||||
|
set "QQPath=%pathWithoutUninstall%QQ.exe"
|
||||||
|
|
||||||
|
if not exist "%QQpath%" (
|
||||||
|
echo provided QQ path is invalid
|
||||||
|
pause
|
||||||
|
exit /b
|
||||||
|
)
|
||||||
|
|
||||||
|
set NAPCAT_MAIN_PATH=%NAPCAT_MAIN_PATH:\=/%
|
||||||
|
|
||||||
|
start "" "%NAPCAT_LAUNCHER_PATH%" "%QQPath%" "%NAPCAT_INJECT_PATH%" "%NAPCAT_MAIN_PATH%"
|
||||||
BIN
napiloader/napiloader.dll
Normal file
BIN
napiloader/napiloader.dll
Normal file
Binary file not shown.
BIN
napiloader/napimain.exe
Normal file
BIN
napiloader/napimain.exe
Normal file
Binary file not shown.
4
package-lock.json
generated
4
package-lock.json
generated
@@ -1,12 +1,12 @@
|
|||||||
{
|
{
|
||||||
"name": "napcat",
|
"name": "napcat",
|
||||||
"version": "4.9.27",
|
"version": "4.9.25",
|
||||||
"lockfileVersion": 3,
|
"lockfileVersion": 3,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"packages": {
|
"packages": {
|
||||||
"": {
|
"": {
|
||||||
"name": "napcat",
|
"name": "napcat",
|
||||||
"version": "4.9.27",
|
"version": "4.9.25",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"express": "^5.0.0",
|
"express": "^5.0.0",
|
||||||
"silk-wasm": "^3.6.1",
|
"silk-wasm": "^3.6.1",
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
"name": "napcat",
|
"name": "napcat",
|
||||||
"private": true,
|
"private": true,
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"version": "4.9.27",
|
"version": "4.9.32",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"build:universal": "npm run build:webui && npm run dev:universal || exit 1",
|
"build:universal": "npm run build:webui && npm run dev:universal || exit 1",
|
||||||
"build:framework": "npm run build:webui && npm run dev:framework || exit 1",
|
"build:framework": "npm run build:webui && npm run dev:framework || exit 1",
|
||||||
|
|||||||
@@ -68,11 +68,13 @@ export class FFmpegAddonAdapter implements IFFmpegAdapter {
|
|||||||
const addon = this.ensureAddon();
|
const addon = this.ensureAddon();
|
||||||
const info = await addon.getVideoInfo(videoPath, 'bmp24');
|
const info = await addon.getVideoInfo(videoPath, 'bmp24');
|
||||||
|
|
||||||
|
let format = info.format.includes(',') ? info.format.split(',')[0] ?? info.format : info.format;
|
||||||
|
console.log('[FFmpegAddonAdapter] Detected format:', format);
|
||||||
return {
|
return {
|
||||||
width: info.width,
|
width: info.width,
|
||||||
height: info.height,
|
height: info.height,
|
||||||
duration: info.duration,
|
duration: info.duration,
|
||||||
format: info.format,
|
format: format,
|
||||||
thumbnail: info.image,
|
thumbnail: info.image,
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
@@ -88,7 +90,7 @@ export class FFmpegAddonAdapter implements IFFmpegAdapter {
|
|||||||
/**
|
/**
|
||||||
* 转换为 PCM
|
* 转换为 PCM
|
||||||
*/
|
*/
|
||||||
async convertToPCM (filePath: string, pcmPath: string): Promise<{ result: boolean, sampleRate: number }> {
|
async convertToPCM (filePath: string, pcmPath: string): Promise<{ result: boolean, sampleRate: number; }> {
|
||||||
const addon = this.ensureAddon();
|
const addon = this.ensureAddon();
|
||||||
const result = await addon.decodeAudioToPCM(filePath, pcmPath, 24000);
|
const result = await addon.decodeAudioToPCM(filePath, pcmPath, 24000);
|
||||||
|
|
||||||
@@ -100,13 +102,8 @@ export class FFmpegAddonAdapter implements IFFmpegAdapter {
|
|||||||
*/
|
*/
|
||||||
async convertFile (inputFile: string, outputFile: string, format: string): Promise<void> {
|
async convertFile (inputFile: string, outputFile: string, format: string): Promise<void> {
|
||||||
const addon = this.ensureAddon();
|
const addon = this.ensureAddon();
|
||||||
|
console.log('[FFmpegAddonAdapter] Converting file:', inputFile, 'to', outputFile, 'as', format);
|
||||||
if (format === 'silk' || format === 'ntsilk') {
|
await addon.decodeAudioToFmt(inputFile, outputFile, format);
|
||||||
// 使用 Addon 的 NTSILK 转换
|
|
||||||
await addon.convertToNTSilkTct(inputFile, outputFile);
|
|
||||||
} else {
|
|
||||||
throw new Error(`Format '${format}' is not supported by FFmpeg Addon`);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -49,23 +49,25 @@ export interface AudioPCMResult {
|
|||||||
* FFmpeg interface providing all audio/video processing methods
|
* FFmpeg interface providing all audio/video processing methods
|
||||||
*/
|
*/
|
||||||
export interface FFmpeg {
|
export interface FFmpeg {
|
||||||
|
convertFile (inputFile: string, outputFile: string, format: string): Promise<{ success: boolean; }>;
|
||||||
/**
|
/**
|
||||||
* Get video information including resolution, duration, format, codec and first frame thumbnail
|
* Get video information including resolution, duration, format, codec and first frame thumbnail
|
||||||
*/
|
*/
|
||||||
getVideoInfo(filePath: string, format?: 'bmp' | 'bmp24'): Promise<VideoInfo>;
|
getVideoInfo (filePath: string, format?: 'bmp' | 'bmp24'): Promise<VideoInfo>;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get duration of audio or video file in seconds
|
* Get duration of audio or video file in seconds
|
||||||
*/
|
*/
|
||||||
getDuration(filePath: string): Promise<number>;
|
getDuration (filePath: string): Promise<number>;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Convert audio file to NTSILK format (WeChat voice message format)
|
* Convert audio file to NTSILK format (WeChat voice message format)
|
||||||
*/
|
*/
|
||||||
convertToNTSilkTct(inputPath: string, outputPath: string): Promise<void>;
|
convertToNTSilkTct (inputPath: string, outputPath: string): Promise<void>;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Decode audio file to raw PCM data
|
* Decode audio file to raw PCM data
|
||||||
*/
|
*/
|
||||||
decodeAudioToPCM(filePath: string, pcmPath: string, sampleRate?: number): Promise<{ result: boolean, sampleRate: number }>;
|
decodeAudioToPCM (filePath: string, pcmPath: string, sampleRate?: number): Promise<{ result: boolean, sampleRate: number; }>;
|
||||||
|
decodeAudioToFmt (filePath: string, pcmPath: string, format: string): Promise<{ channels: number; sampleRate: number; format: string; }>;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -48,6 +48,14 @@ export class FFmpegService {
|
|||||||
this.initialized = true;
|
this.initialized = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static getAdapterName (): string {
|
||||||
|
if (!this.adapter) {
|
||||||
|
throw new Error('FFmpeg service not initialized. Please call FFmpegService.init() first.');
|
||||||
|
}
|
||||||
|
return this.adapter.name;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取 FFmpeg 适配器
|
* 获取 FFmpeg 适配器
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
export const napCatVersion = '4.9.27';
|
export const napCatVersion = '4.9.32';
|
||||||
|
|||||||
@@ -17,8 +17,14 @@ export class NTQQFriendApi {
|
|||||||
|
|
||||||
async getBuddyV2SimpleInfoMap () {
|
async getBuddyV2SimpleInfoMap () {
|
||||||
const buddyService = this.context.session.getBuddyService();
|
const buddyService = this.context.session.getBuddyService();
|
||||||
|
let uids: string[] = [];
|
||||||
|
if (this.core.context.basicInfoWrapper.requireMinNTQQBuild('41679')) {
|
||||||
|
const buddyListV2NT = await buddyService.getBuddyListV2('0', true, BuddyListReqType.KNOMAL);
|
||||||
|
uids = buddyListV2NT.data.flatMap(item => item.buddyUids);
|
||||||
|
} else {
|
||||||
const buddyListV2 = await buddyService.getBuddyListV2('0', BuddyListReqType.KNOMAL);
|
const buddyListV2 = await buddyService.getBuddyListV2('0', BuddyListReqType.KNOMAL);
|
||||||
const uids = buddyListV2.data.flatMap(item => item.buddyUids);
|
uids = buddyListV2.data.flatMap(item => item.buddyUids);
|
||||||
|
}
|
||||||
return await this.core.eventWrapper.callNoListenerEvent(
|
return await this.core.eventWrapper.callNoListenerEvent(
|
||||||
'NodeIKernelProfileService/getCoreAndBaseInfo',
|
'NodeIKernelProfileService/getCoreAndBaseInfo',
|
||||||
'nodeStore',
|
'nodeStore',
|
||||||
@@ -47,10 +53,15 @@ export class NTQQFriendApi {
|
|||||||
|
|
||||||
async getBuddyV2ExWithCate () {
|
async getBuddyV2ExWithCate () {
|
||||||
const buddyService = this.context.session.getBuddyService();
|
const buddyService = this.context.session.getBuddyService();
|
||||||
const buddyListV2 = (await buddyService.getBuddyListV2('0', BuddyListReqType.KNOMAL)).data;
|
let uids: string[] = [];
|
||||||
const uids = buddyListV2.flatMap(item => {
|
let buddyListV2: Awaited<ReturnType<typeof buddyService.getBuddyListV2>>['data'];
|
||||||
return item.buddyUids;
|
if (this.core.context.basicInfoWrapper.requireMinNTQQBuild('41679')) {
|
||||||
});
|
buddyListV2 = (await buddyService.getBuddyListV2('0', true, BuddyListReqType.KNOMAL)).data;
|
||||||
|
uids = buddyListV2.flatMap(item => item.buddyUids);
|
||||||
|
} else {
|
||||||
|
buddyListV2 = (await buddyService.getBuddyListV2('0', BuddyListReqType.KNOMAL)).data;
|
||||||
|
uids = buddyListV2.flatMap(item => item.buddyUids);
|
||||||
|
}
|
||||||
const data = await this.core.eventWrapper.callNoListenerEvent(
|
const data = await this.core.eventWrapper.callNoListenerEvent(
|
||||||
'NodeIKernelProfileService/getCoreAndBaseInfo',
|
'NodeIKernelProfileService/getCoreAndBaseInfo',
|
||||||
'nodeStore',
|
'nodeStore',
|
||||||
|
|||||||
@@ -3,122 +3,133 @@ import { NodeIKernelBuddyListener } from '@/core/listeners';
|
|||||||
import { BuddyListReqType } from '@/core/types/user';
|
import { BuddyListReqType } from '@/core/types/user';
|
||||||
|
|
||||||
export interface NodeIKernelBuddyService {
|
export interface NodeIKernelBuddyService {
|
||||||
getBuddyListV2(callFrom: string, reqType: BuddyListReqType): Promise<GeneralCallResult & {
|
getBuddyListV2 (callFrom: string, reqType: BuddyListReqType): Promise<GeneralCallResult & {
|
||||||
data: Array<{
|
data: Array<{
|
||||||
categoryId: number,
|
categoryId: number,
|
||||||
categorySortId: number,
|
categorySortId: number,
|
||||||
categroyName: string,
|
categroyName: string,
|
||||||
categroyMbCount: number,
|
categroyMbCount: number,
|
||||||
onlineCount: number,
|
onlineCount: number,
|
||||||
buddyUids: Array<string>
|
buddyUids: Array<string>;
|
||||||
}>
|
}>;
|
||||||
|
}>;
|
||||||
|
getBuddyListV2 (callFrom: string, isPullRefresh: boolean, reqType: BuddyListReqType): Promise<GeneralCallResult & {
|
||||||
|
data: Array<{
|
||||||
|
categoryId: number,
|
||||||
|
categorySortId: number,
|
||||||
|
categroyName: string,
|
||||||
|
categroyMbCount: number,
|
||||||
|
onlineCount: number,
|
||||||
|
buddyUids: Array<string>;
|
||||||
|
}>;
|
||||||
}>;
|
}>;
|
||||||
|
|
||||||
getBuddyListFromCache(reqType: BuddyListReqType): Promise<Array<
|
|
||||||
|
getBuddyListFromCache (reqType: BuddyListReqType): Promise<Array<
|
||||||
{
|
{
|
||||||
categoryId: number, // 9999为特别关心
|
categoryId: number, // 9999为特别关心
|
||||||
categorySortId: number, // 排序方式
|
categorySortId: number, // 排序方式
|
||||||
categroyName: string, // 分类名
|
categroyName: string, // 分类名
|
||||||
categroyMbCount: number, // 不懂
|
categroyMbCount: number, // 不懂
|
||||||
onlineCount: number, // 在线数目
|
onlineCount: number, // 在线数目
|
||||||
buddyUids: Array<string>// Uids
|
buddyUids: Array<string>;// Uids
|
||||||
}>>;
|
}>>;
|
||||||
|
|
||||||
addKernelBuddyListener(listener: NodeIKernelBuddyListener): number;
|
addKernelBuddyListener (listener: NodeIKernelBuddyListener): number;
|
||||||
|
|
||||||
getAllBuddyCount(): number;
|
getAllBuddyCount (): number;
|
||||||
|
|
||||||
removeKernelBuddyListener(listenerId: number): void;
|
removeKernelBuddyListener (listenerId: number): void;
|
||||||
|
|
||||||
// getBuddyList(nocache: boolean): Promise<GeneralCallResult>;
|
// getBuddyList(nocache: boolean): Promise<GeneralCallResult>;
|
||||||
|
|
||||||
getBuddyNick(uid: number): string;
|
getBuddyNick (uid: number): string;
|
||||||
|
|
||||||
getBuddyRemark(uid: number): string;
|
getBuddyRemark (uid: number): string;
|
||||||
|
|
||||||
setBuddyRemark(param: { uid: string, remark: string, signInfo?: unknown }): void;
|
setBuddyRemark (param: { uid: string, remark: string, signInfo?: unknown; }): void;
|
||||||
|
|
||||||
getAvatarUrl(uid: number): string;
|
getAvatarUrl (uid: number): string;
|
||||||
|
|
||||||
isBuddy(uid: string): boolean;
|
isBuddy (uid: string): boolean;
|
||||||
|
|
||||||
getCategoryNameWithUid(uid: number): string;
|
getCategoryNameWithUid (uid: number): string;
|
||||||
|
|
||||||
getTargetBuddySetting(uid: number): unknown;
|
getTargetBuddySetting (uid: number): unknown;
|
||||||
|
|
||||||
getTargetBuddySettingByType(uid: number, type: number): unknown;
|
getTargetBuddySettingByType (uid: number, type: number): unknown;
|
||||||
|
|
||||||
getBuddyReqUnreadCnt(): number;
|
getBuddyReqUnreadCnt (): number;
|
||||||
|
|
||||||
getBuddyReq(): Promise<GeneralCallResult>;
|
getBuddyReq (): Promise<GeneralCallResult>;
|
||||||
|
|
||||||
delBuddyReq(uid: number): void;
|
delBuddyReq (uid: number): void;
|
||||||
|
|
||||||
clearBuddyReqUnreadCnt(): Promise<GeneralCallResult>;
|
clearBuddyReqUnreadCnt (): Promise<GeneralCallResult>;
|
||||||
|
|
||||||
reqToAddFriends(uid: number, msg: string): void;
|
reqToAddFriends (uid: number, msg: string): void;
|
||||||
|
|
||||||
setSpacePermission(uid: number, permission: number): void;
|
setSpacePermission (uid: number, permission: number): void;
|
||||||
|
|
||||||
approvalFriendRequest(arg: {
|
approvalFriendRequest (arg: {
|
||||||
friendUid: string;
|
friendUid: string;
|
||||||
reqTime: string;
|
reqTime: string;
|
||||||
accept: boolean;
|
accept: boolean;
|
||||||
}): Promise<void>;
|
}): Promise<void>;
|
||||||
|
|
||||||
delBuddy(param: {
|
delBuddy (param: {
|
||||||
friendUid: string;
|
friendUid: string;
|
||||||
tempBlock: boolean;
|
tempBlock: boolean;
|
||||||
tempBothDel: boolean;
|
tempBothDel: boolean;
|
||||||
}): Promise<unknown>;
|
}): Promise<unknown>;
|
||||||
|
|
||||||
delBatchBuddy(uids: number[]): void;
|
delBatchBuddy (uids: number[]): void;
|
||||||
|
|
||||||
getSmartInfos(uid: number): unknown;
|
getSmartInfos (uid: number): unknown;
|
||||||
|
|
||||||
setBuddyCategory(uid: number, category: number): void;
|
setBuddyCategory (uid: number, category: number): void;
|
||||||
|
|
||||||
setBatchBuddyCategory(uids: number[], category: number): void;
|
setBatchBuddyCategory (uids: number[], category: number): void;
|
||||||
|
|
||||||
addCategory(category: string): void;
|
addCategory (category: string): void;
|
||||||
|
|
||||||
delCategory(category: string): void;
|
delCategory (category: string): void;
|
||||||
|
|
||||||
renameCategory(oldCategory: string, newCategory: string): void;
|
renameCategory (oldCategory: string, newCategory: string): void;
|
||||||
|
|
||||||
resortCategory(categorys: string[]): void;
|
resortCategory (categorys: string[]): void;
|
||||||
|
|
||||||
pullCategory(uid: number, category: string): void;
|
pullCategory (uid: number, category: string): void;
|
||||||
|
|
||||||
setTop(uid: number, isTop: boolean): void;
|
setTop (uid: number, isTop: boolean): void;
|
||||||
|
|
||||||
SetSpecialCare(uid: number, isSpecialCare: boolean): void;
|
SetSpecialCare (uid: number, isSpecialCare: boolean): void;
|
||||||
|
|
||||||
setMsgNotify(uid: number, isNotify: boolean): void;
|
setMsgNotify (uid: number, isNotify: boolean): void;
|
||||||
|
|
||||||
hasBuddyList(): boolean;
|
hasBuddyList (): boolean;
|
||||||
|
|
||||||
setBlock(uid: number, isBlock: boolean): void;
|
setBlock (uid: number, isBlock: boolean): void;
|
||||||
|
|
||||||
isBlocked(uid: number): boolean;
|
isBlocked (uid: number): boolean;
|
||||||
|
|
||||||
modifyAddMeSetting(setting: unknown): void;
|
modifyAddMeSetting (setting: unknown): void;
|
||||||
|
|
||||||
getAddMeSetting(): unknown;
|
getAddMeSetting (): unknown;
|
||||||
|
|
||||||
getDoubtBuddyReq(reqId: string, num: number, uk:string): Promise<GeneralCallResult>;
|
getDoubtBuddyReq (reqId: string, num: number, uk: string): Promise<GeneralCallResult>;
|
||||||
|
|
||||||
getDoubtBuddyUnreadNum(): number;
|
getDoubtBuddyUnreadNum (): number;
|
||||||
|
|
||||||
approvalDoubtBuddyReq(uid: string, str1: string, str2: string): void;
|
approvalDoubtBuddyReq (uid: string, str1: string, str2: string): void;
|
||||||
|
|
||||||
delDoubtBuddyReq(uid: number): void;
|
delDoubtBuddyReq (uid: number): void;
|
||||||
|
|
||||||
delAllDoubtBuddyReq(): Promise<GeneralCallResult>;
|
delAllDoubtBuddyReq (): Promise<GeneralCallResult>;
|
||||||
|
|
||||||
reportDoubtBuddyReqUnread(): void;
|
reportDoubtBuddyReqUnread (): void;
|
||||||
|
|
||||||
getBuddyRecommendContactArkJson(uid: string, phoneNumber: string): Promise<GeneralCallResult & { arkMsg: string }>;
|
getBuddyRecommendContactArkJson (uid: string, phoneNumber: string): Promise<GeneralCallResult & { arkMsg: string; }>;
|
||||||
|
|
||||||
isNull(): boolean;
|
isNull (): boolean;
|
||||||
}
|
}
|
||||||
|
|||||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -7,7 +7,7 @@ import { FFmpegService } from '@/common/ffmpeg';
|
|||||||
const out_format = ['mp3', 'amr', 'wma', 'm4a', 'spx', 'ogg', 'wav', 'flac'];
|
const out_format = ['mp3', 'amr', 'wma', 'm4a', 'spx', 'ogg', 'wav', 'flac'];
|
||||||
|
|
||||||
type Payload = {
|
type Payload = {
|
||||||
out_format: string
|
out_format: string;
|
||||||
} & GetFilePayload;
|
} & GetFilePayload;
|
||||||
|
|
||||||
export default class GetRecord extends GetFileBase {
|
export default class GetRecord extends GetFileBase {
|
||||||
@@ -28,9 +28,13 @@ export default class GetRecord extends GetFileBase {
|
|||||||
try {
|
try {
|
||||||
await fs.access(outputFile);
|
await fs.access(outputFile);
|
||||||
} catch {
|
} catch {
|
||||||
|
if (FFmpegService.getAdapterName() === 'FFmpegAddon') {
|
||||||
|
await FFmpegService.convertFile(inputFile, outputFile, payload.out_format);
|
||||||
|
} else {
|
||||||
await this.decodeFile(inputFile, pcmFile);
|
await this.decodeFile(inputFile, pcmFile);
|
||||||
await FFmpegService.convertFile(pcmFile, outputFile, payload.out_format);
|
await FFmpegService.convertFile(pcmFile, outputFile, payload.out_format);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
const base64Data = await fs.readFile(outputFile, { encoding: 'base64' });
|
const base64Data = await fs.readFile(outputFile, { encoding: 'base64' });
|
||||||
res.file = outputFile;
|
res.file = outputFile;
|
||||||
res.url = outputFile;
|
res.url = outputFile;
|
||||||
|
|||||||
@@ -37,7 +37,7 @@ export class SendGroupNotice extends OneBotAction<Payload, null> {
|
|||||||
await checkFileExist(path, 5000);
|
await checkFileExist(path, 5000);
|
||||||
const ImageUploadResult = await this.core.apis.GroupApi.uploadGroupBulletinPic(payload.group_id.toString(), path);
|
const ImageUploadResult = await this.core.apis.GroupApi.uploadGroupBulletinPic(payload.group_id.toString(), path);
|
||||||
if (ImageUploadResult.errCode !== 0) {
|
if (ImageUploadResult.errCode !== 0) {
|
||||||
throw new Error(`群公告${payload.image}设置失败,图片上传失败`);
|
throw new Error(`群公告${payload.image}设置失败,图片上传失败 , 错误信息:${ImageUploadResult.errMsg}`);
|
||||||
}
|
}
|
||||||
|
|
||||||
unlink(path).catch(() => { });
|
unlink(path).catch(() => { });
|
||||||
|
|||||||
@@ -41,30 +41,6 @@ class GetGroupMemberInfo extends OneBotAction<Payload, OB11GroupMember> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async _handle (payload: Payload) {
|
async _handle (payload: Payload) {
|
||||||
// 处理 @全体成员 的特殊情况,跳过 UID 转换直接返回
|
|
||||||
if (payload.user_id === 'all' || payload.user_id === '0') {
|
|
||||||
return {
|
|
||||||
group_id: +payload.group_id,
|
|
||||||
user_id: payload.user_id === 'all' ? 0 : +payload.user_id,
|
|
||||||
nickname: '全体成员',
|
|
||||||
card: '全体成员',
|
|
||||||
sex: 'unknown' as const,
|
|
||||||
age: 0,
|
|
||||||
area: '',
|
|
||||||
level: '0',
|
|
||||||
qq_level: 0,
|
|
||||||
join_time: 0,
|
|
||||||
last_sent_time: 0,
|
|
||||||
title_expire_time: 0,
|
|
||||||
unfriendly: false,
|
|
||||||
card_changeable: false,
|
|
||||||
is_robot: false,
|
|
||||||
shut_up_timestamp: 0,
|
|
||||||
role: 'member' as const,
|
|
||||||
title: '',
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
const isNocache = this.parseBoolean(payload.no_cache ?? true);
|
const isNocache = this.parseBoolean(payload.no_cache ?? true);
|
||||||
const uid = await this.getUid(payload.user_id);
|
const uid = await this.getUid(payload.user_id);
|
||||||
const member = await this.getGroupMemberInfo(payload, uid, isNocache);
|
const member = await this.getGroupMemberInfo(payload, uid, isNocache);
|
||||||
|
|||||||
@@ -47,8 +47,12 @@ export class DownloadFileRecordStream extends BaseDownloadStream<Payload, Downlo
|
|||||||
streamPath = outputFile;
|
streamPath = outputFile;
|
||||||
} catch {
|
} catch {
|
||||||
// 尝试解码 silk 到 pcm 再用 ffmpeg 转换
|
// 尝试解码 silk 到 pcm 再用 ffmpeg 转换
|
||||||
|
if (FFmpegService.getAdapterName() === 'FFmpegAddon') {
|
||||||
|
await FFmpegService.convertFile(downloadPath, outputFile, payload.out_format);
|
||||||
|
} else {
|
||||||
await this.decodeFile(downloadPath, pcmFile);
|
await this.decodeFile(downloadPath, pcmFile);
|
||||||
await FFmpegService.convertFile(pcmFile, outputFile, payload.out_format);
|
await FFmpegService.convertFile(pcmFile, outputFile, payload.out_format);
|
||||||
|
}
|
||||||
streamPath = outputFile;
|
streamPath = outputFile;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
BIN
tests/QQNT.dll
BIN
tests/QQNT.dll
Binary file not shown.
@@ -56,6 +56,7 @@ const FrameworkBaseConfigPlugin: PluginOption[] = [
|
|||||||
// }),
|
// }),
|
||||||
cp({
|
cp({
|
||||||
targets: [
|
targets: [
|
||||||
|
{ src: './napiloader/', dest: 'dist', flatten: true },
|
||||||
{ src: './src/native/', dest: 'dist/native', flatten: false },
|
{ src: './src/native/', dest: 'dist/native', flatten: false },
|
||||||
{ src: './manifest.json', dest: 'dist' },
|
{ src: './manifest.json', dest: 'dist' },
|
||||||
{ src: './src/core/external/napcat.json', dest: 'dist/config/' },
|
{ src: './src/core/external/napcat.json', dest: 'dist/config/' },
|
||||||
|
|||||||
Reference in New Issue
Block a user