diff --git a/.gitignore b/.gitignore index a3d980a..dd4aade 100644 --- a/.gitignore +++ b/.gitignore @@ -11,5 +11,6 @@ node_modules dist out -.idea/ .DS_Store +.idea +.vscode diff --git a/package.json b/package.json index 494bd5c..48f3787 100644 --- a/package.json +++ b/package.json @@ -9,7 +9,7 @@ "build-mac": "npm run build && npm run deploy-mac", "deploy-mac": "cp -r dist/* ~/Library/Containers/com.tencent.qq/Data/Documents/LiteLoaderQQNT/plugins/LLOneBot/", "build-win": "npm run build && npm run deploy-win", - "deploy-win": "cmd /c \"xcopy /C /S /Y dist\\* %USERPROFILE%\\documents\\LiteLoaderQQNT\\plugins\\LLOneBot\\\"", + "deploy-win": "cmd /c \"xcopy /C /S /Y dist\\* %LITELOADERQQNT_PROFILE%\\plugins\\LLOneBot\\\"", "format": "prettier -cw .", "check": "tsc" }, @@ -21,7 +21,7 @@ "cordis": "^3.18.0", "cors": "^2.8.5", "cosmokit": "^1.6.2", - "express": "^4.19.2", + "express": "^5.0.0", "fast-xml-parser": "^4.5.0", "file-type": "^19.5.0", "fluent-ffmpeg": "^2.1.3", @@ -37,7 +37,7 @@ "@types/ws": "^8.5.12", "electron": "^31.4.0", "electron-vite": "^2.3.0", - "typescript": "^5.5.4", + "typescript": "^5.6.2", "vite": "^5.4.3", "vite-plugin-cp": "^4.0.8" }, diff --git a/src/common/utils/file.ts b/src/common/utils/file.ts index 50d1542..5af41fd 100644 --- a/src/common/utils/file.ts +++ b/src/common/utils/file.ts @@ -133,7 +133,7 @@ export async function uri2local(uri: string, filename?: string, needExt?: boolea if (type === FileUriType.RemoteURL) { try { - const res = await fetchFile(uri, {'Referer': uri}) + const res = await fetchFile(uri, { 'Referer': uri }) const match = res.url.match(/.+\/([^/?]*)(?=\?)?/) if (match?.[1]) { filename ??= match[1].replace(/[/\\:*?"<>|]/g, '_') diff --git a/src/common/utils/table.ts b/src/common/utils/table.ts index 29738af..bdabe0f 100644 --- a/src/common/utils/table.ts +++ b/src/common/utils/table.ts @@ -16,12 +16,11 @@ export class LimitedHashTable { this.keyToValue.set(key, value) this.valueToKey.set(value, key) while (this.keyToValue.size !== this.valueToKey.size) { - console.log('keyToValue.size !== valueToKey.size Error Atom') this.keyToValue.clear() this.valueToKey.clear() } while (this.keyToValue.size > this.maxSize || this.valueToKey.size > this.maxSize) { - const oldestKey = this.keyToValue.keys().next().value + const oldestKey = this.keyToValue.keys().next().value! this.valueToKey.delete(this.keyToValue.get(oldestKey)!) this.keyToValue.delete(oldestKey) } @@ -56,7 +55,7 @@ export class LimitedHashTable { } //获取最近刚写入的几个值 - getHeads(size: number): { key: K; value: V }[] | undefined { + getHeads(size: number): { key: K, value: V }[] | undefined { const keyList = this.getKeyList() if (keyList.length === 0) { return undefined diff --git a/src/ntqqapi/helper/rkey.ts b/src/ntqqapi/helper/rkey.ts index 9b63a5e..afd091b 100644 --- a/src/ntqqapi/helper/rkey.ts +++ b/src/ntqqapi/helper/rkey.ts @@ -1,4 +1,4 @@ -import { Context } from "cordis" +import { Context } from 'cordis' interface ServerRkeyData { group_rkey: string diff --git a/tsconfig.json b/tsconfig.json index 13c53f1..a383f6f 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -24,11 +24,7 @@ "noEmit": true }, "include": [ - "src/*", - "src/**/*", - "scripts/*" - ], - "exclude": [ - "node_modules" + "src", + "scripts" ] } \ No newline at end of file