mirror of
https://github.com/LLOneBot/LLOneBot.git
synced 2024-11-22 01:56:33 +00:00
chore
chore chore
This commit is contained in:
parent
efefb963c0
commit
20f2e66b11
3
.gitignore
vendored
3
.gitignore
vendored
@ -11,5 +11,6 @@ node_modules
|
||||
dist
|
||||
out
|
||||
|
||||
.idea/
|
||||
.DS_Store
|
||||
.idea
|
||||
.vscode
|
||||
|
@ -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"
|
||||
},
|
||||
|
@ -16,12 +16,11 @@ export class LimitedHashTable<K, V> {
|
||||
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<K, V> {
|
||||
}
|
||||
|
||||
//获取最近刚写入的几个值
|
||||
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
|
||||
|
@ -1,4 +1,4 @@
|
||||
import { Context } from "cordis"
|
||||
import { Context } from 'cordis'
|
||||
|
||||
interface ServerRkeyData {
|
||||
group_rkey: string
|
||||
|
@ -24,11 +24,7 @@
|
||||
"noEmit": true
|
||||
},
|
||||
"include": [
|
||||
"src/*",
|
||||
"src/**/*",
|
||||
"scripts/*"
|
||||
],
|
||||
"exclude": [
|
||||
"node_modules"
|
||||
"src",
|
||||
"scripts"
|
||||
]
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user