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
|
dist
|
||||||
out
|
out
|
||||||
|
|
||||||
.idea/
|
|
||||||
.DS_Store
|
.DS_Store
|
||||||
|
.idea
|
||||||
|
.vscode
|
||||||
|
@ -9,7 +9,7 @@
|
|||||||
"build-mac": "npm run build && npm run deploy-mac",
|
"build-mac": "npm run build && npm run deploy-mac",
|
||||||
"deploy-mac": "cp -r dist/* ~/Library/Containers/com.tencent.qq/Data/Documents/LiteLoaderQQNT/plugins/LLOneBot/",
|
"deploy-mac": "cp -r dist/* ~/Library/Containers/com.tencent.qq/Data/Documents/LiteLoaderQQNT/plugins/LLOneBot/",
|
||||||
"build-win": "npm run build && npm run deploy-win",
|
"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 .",
|
"format": "prettier -cw .",
|
||||||
"check": "tsc"
|
"check": "tsc"
|
||||||
},
|
},
|
||||||
@ -21,7 +21,7 @@
|
|||||||
"cordis": "^3.18.0",
|
"cordis": "^3.18.0",
|
||||||
"cors": "^2.8.5",
|
"cors": "^2.8.5",
|
||||||
"cosmokit": "^1.6.2",
|
"cosmokit": "^1.6.2",
|
||||||
"express": "^4.19.2",
|
"express": "^5.0.0",
|
||||||
"fast-xml-parser": "^4.5.0",
|
"fast-xml-parser": "^4.5.0",
|
||||||
"file-type": "^19.5.0",
|
"file-type": "^19.5.0",
|
||||||
"fluent-ffmpeg": "^2.1.3",
|
"fluent-ffmpeg": "^2.1.3",
|
||||||
@ -37,7 +37,7 @@
|
|||||||
"@types/ws": "^8.5.12",
|
"@types/ws": "^8.5.12",
|
||||||
"electron": "^31.4.0",
|
"electron": "^31.4.0",
|
||||||
"electron-vite": "^2.3.0",
|
"electron-vite": "^2.3.0",
|
||||||
"typescript": "^5.5.4",
|
"typescript": "^5.6.2",
|
||||||
"vite": "^5.4.3",
|
"vite": "^5.4.3",
|
||||||
"vite-plugin-cp": "^4.0.8"
|
"vite-plugin-cp": "^4.0.8"
|
||||||
},
|
},
|
||||||
|
@ -133,7 +133,7 @@ export async function uri2local(uri: string, filename?: string, needExt?: boolea
|
|||||||
|
|
||||||
if (type === FileUriType.RemoteURL) {
|
if (type === FileUriType.RemoteURL) {
|
||||||
try {
|
try {
|
||||||
const res = await fetchFile(uri, {'Referer': uri})
|
const res = await fetchFile(uri, { 'Referer': uri })
|
||||||
const match = res.url.match(/.+\/([^/?]*)(?=\?)?/)
|
const match = res.url.match(/.+\/([^/?]*)(?=\?)?/)
|
||||||
if (match?.[1]) {
|
if (match?.[1]) {
|
||||||
filename ??= match[1].replace(/[/\\:*?"<>|]/g, '_')
|
filename ??= match[1].replace(/[/\\:*?"<>|]/g, '_')
|
||||||
|
@ -16,12 +16,11 @@ export class LimitedHashTable<K, V> {
|
|||||||
this.keyToValue.set(key, value)
|
this.keyToValue.set(key, value)
|
||||||
this.valueToKey.set(value, key)
|
this.valueToKey.set(value, key)
|
||||||
while (this.keyToValue.size !== this.valueToKey.size) {
|
while (this.keyToValue.size !== this.valueToKey.size) {
|
||||||
console.log('keyToValue.size !== valueToKey.size Error Atom')
|
|
||||||
this.keyToValue.clear()
|
this.keyToValue.clear()
|
||||||
this.valueToKey.clear()
|
this.valueToKey.clear()
|
||||||
}
|
}
|
||||||
while (this.keyToValue.size > this.maxSize || this.valueToKey.size > this.maxSize) {
|
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.valueToKey.delete(this.keyToValue.get(oldestKey)!)
|
||||||
this.keyToValue.delete(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()
|
const keyList = this.getKeyList()
|
||||||
if (keyList.length === 0) {
|
if (keyList.length === 0) {
|
||||||
return undefined
|
return undefined
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import { Context } from "cordis"
|
import { Context } from 'cordis'
|
||||||
|
|
||||||
interface ServerRkeyData {
|
interface ServerRkeyData {
|
||||||
group_rkey: string
|
group_rkey: string
|
||||||
|
@ -24,11 +24,7 @@
|
|||||||
"noEmit": true
|
"noEmit": true
|
||||||
},
|
},
|
||||||
"include": [
|
"include": [
|
||||||
"src/*",
|
"src",
|
||||||
"src/**/*",
|
"scripts"
|
||||||
"scripts/*"
|
|
||||||
],
|
|
||||||
"exclude": [
|
|
||||||
"node_modules"
|
|
||||||
]
|
]
|
||||||
}
|
}
|
Loading…
x
Reference in New Issue
Block a user