chore

chore
This commit is contained in:
idranme 2024-09-10 16:21:36 +08:00
parent efefb963c0
commit 20f2e66b11
No known key found for this signature in database
GPG Key ID: 926F7B5B668E495F
6 changed files with 11 additions and 15 deletions

3
.gitignore vendored
View File

@ -11,5 +11,6 @@ node_modules
dist
out
.idea/
.DS_Store
.idea
.vscode

View File

@ -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"
},

View File

@ -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, '_')

View File

@ -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

View File

@ -1,4 +1,4 @@
import { Context } from "cordis"
import { Context } from 'cordis'
interface ServerRkeyData {
group_rkey: string

View File

@ -24,11 +24,7 @@
"noEmit": true
},
"include": [
"src/*",
"src/**/*",
"scripts/*"
],
"exclude": [
"node_modules"
"src",
"scripts"
]
}