diff --git a/package.json b/package.json index 4dde523..4593ef9 100644 --- a/package.json +++ b/package.json @@ -40,6 +40,6 @@ "yakumo": "^1.0.0-beta.16", "yakumo-esbuild": "^1.0.0-beta.6", "yakumo-mocha": "^1.0.0-beta.2", - "yakumo-tsc": "^1.0.0-beta.3" + "yakumo-tsc": "^1.0.0-beta.4" } } diff --git a/packages/client/package.json b/packages/client/package.json index c5495c2..6ca73dc 100644 --- a/packages/client/package.json +++ b/packages/client/package.json @@ -1,7 +1,7 @@ { "name": "@cordisjs/client", "description": "Koishi Console Client", - "version": "0.1.6", + "version": "0.1.8", "type": "module", "exports": { ".": "./client/index.ts", @@ -46,11 +46,11 @@ "dependencies": { "@cordisjs/components": "0.1.0", "@maikolib/vite-plugin-yaml": "^1.0.1", - "@satorijs/protocol": "^1.4.0", + "@satorijs/protocol": "^1.4.1", "@vitejs/plugin-vue": "^4.6.2", "@vueuse/core": "^10.9.0", "cac": "^6.7.14", - "cordis": "^3.16.1", + "cordis": "^3.17.1", "cosmokit": "^1.6.2", "element-plus": "2.7.3", "marked-vue": "^1.3.0", diff --git a/packages/components/client/virtual/list.vue b/packages/components/client/virtual/list.vue index 1033561..ba2ee09 100644 --- a/packages/components/client/virtual/list.vue +++ b/packages/components/client/virtual/list.vue @@ -136,7 +136,7 @@ onActivated(() => { } }) -function onScroll(ev: MouseEvent) { +function onScroll(ev: { scrollTop: number, scrollLeft: number }) { const offset = Math.ceil(scrollTop = root.value.wrapRef.scrollTop) const clientLength = Math.ceil(root.value.wrapRef.clientHeight) const scrollLength = Math.ceil(root.value.wrapRef.scrollHeight) @@ -145,7 +145,7 @@ function onScroll(ev: MouseEvent) { emitEvent(offset, clientLength, scrollLength, ev) } -function emitEvent(offset: number, clientLength: number, scrollLength: number, ev: MouseEvent) { +function emitEvent(offset: number, clientLength: number, scrollLength: number, ev: { scrollTop: number, scrollLeft: number }) { emit('scroll', ev, virtual.range) checkBoundary(true) } diff --git a/packages/components/package.json b/packages/components/package.json index 8497b04..4ef3fee 100644 --- a/packages/components/package.json +++ b/packages/components/package.json @@ -30,6 +30,6 @@ "dependencies": { "@satorijs/element": "^3.1.7", "cosmokit": "^1.6.2", - "schemastery-vue": "^7.3.3" + "schemastery-vue": "^7.3.4" } } diff --git a/plugins/insight/package.json b/plugins/insight/package.json index 5806c7a..af1b0c7 100644 --- a/plugins/insight/package.json +++ b/plugins/insight/package.json @@ -1,7 +1,7 @@ { "name": "@cordisjs/plugin-insight", "description": "Show plugin dependency graph for Cordis", - "version": "3.5.3", + "version": "3.5.4", "type": "module", "main": "lib/index.js", "files": [ @@ -43,11 +43,11 @@ } }, "peerDependencies": { - "@cordisjs/plugin-webui": "^0.1.6", - "cordis": "^3.16.1" + "@cordisjs/plugin-webui": "^0.1.8", + "cordis": "^3.17.1" }, "devDependencies": { - "@cordisjs/client": "^0.1.6", + "@cordisjs/client": "^0.1.8", "@types/d3-force": "^3.0.9", "d3-force": "^3.0.0" }, diff --git a/plugins/logger/client/logs.vue b/plugins/logger/client/logs.vue index 3aeae32..5ff2315 100644 --- a/plugins/logger/client/logs.vue +++ b/plugins/logger/client/logs.vue @@ -90,6 +90,7 @@ const logs = computed(() => { }) async function onTop() { + if (!props.showHistory) return const keys = Object.keys(data.value).filter(key => !data.value[key]).sort((a, b) => { return a.slice(0, 11).localeCompare(b.slice(0, 11)) || +a.slice(11) - +b.slice(11) }).reverse() diff --git a/plugins/logger/package.json b/plugins/logger/package.json index e635055..5763986 100644 --- a/plugins/logger/package.json +++ b/plugins/logger/package.json @@ -1,7 +1,7 @@ { "name": "@cordisjs/plugin-logger", "description": "Logger service for Cordis", - "version": "0.1.0", + "version": "0.1.1", "type": "module", "exports": { ".": { @@ -50,12 +50,12 @@ } }, "peerDependencies": { - "@cordisjs/plugin-webui": "^0.1.7", - "cordis": "^3.16.2" + "@cordisjs/plugin-webui": "^0.1.8", + "cordis": "^3.17.1" }, "devDependencies": { - "@cordisjs/client": "^0.1.7", - "@cordisjs/plugin-manager": "^0.3.0", + "@cordisjs/client": "^0.1.8", + "@cordisjs/plugin-manager": "^0.3.1", "ansi_up": "^6.0.2" }, "dependencies": { diff --git a/plugins/manager/package.json b/plugins/manager/package.json index da33db7..12137ad 100644 --- a/plugins/manager/package.json +++ b/plugins/manager/package.json @@ -1,7 +1,7 @@ { "name": "@cordisjs/plugin-manager", "description": "Manage your bots and plugins with console", - "version": "0.3.0", + "version": "0.3.1", "type": "module", "exports": { ".": { @@ -56,12 +56,12 @@ } }, "peerDependencies": { - "@cordisjs/plugin-webui": "^0.1.6", - "cordis": "^3.16.1" + "@cordisjs/plugin-webui": "^0.1.8", + "cordis": "^3.17.1" }, "devDependencies": { - "@cordisjs/client": "^0.1.6", - "@cordisjs/loader": "^0.11.1", + "@cordisjs/client": "^0.1.8", + "@cordisjs/loader": "^0.12.1", "@cordisjs/plugin-hmr": "^0.2.3" }, "dependencies": { diff --git a/plugins/manager/src/index.ts b/plugins/manager/src/index.ts index 4f5e3db..963c4cf 100644 --- a/plugins/manager/src/index.ts +++ b/plugins/manager/src/index.ts @@ -18,7 +18,7 @@ export default class NodeManager extends Manager { } catch (error) { this.ctx.logger.warn('failed to parse %c', name) this.ctx.logger.debug(error) - object.runtime = { failed: true } + object.runtime = null } this.flushPackage(name) }, diff --git a/plugins/notifier/package.json b/plugins/notifier/package.json index ae9a1b9..bd0101f 100644 --- a/plugins/notifier/package.json +++ b/plugins/notifier/package.json @@ -54,12 +54,12 @@ } }, "peerDependencies": { - "@cordisjs/plugin-webui": "^0.1.6", - "cordis": "^3.16.1" + "@cordisjs/plugin-webui": "^0.1.8", + "cordis": "^3.17.1" }, "devDependencies": { - "@cordisjs/client": "^0.1.6", - "@cordisjs/plugin-manager": "^0.3.0" + "@cordisjs/client": "^0.1.8", + "@cordisjs/plugin-manager": "^0.3.1" }, "dependencies": { "@cordisjs/element": "^0.1.0", diff --git a/plugins/webui/package.json b/plugins/webui/package.json index e03fb26..b8b7fc1 100644 --- a/plugins/webui/package.json +++ b/plugins/webui/package.json @@ -1,7 +1,7 @@ { "name": "@cordisjs/plugin-webui", "description": "Web User Interface for Koishi", - "version": "0.1.6", + "version": "0.1.8", "type": "module", "exports": { ".": { @@ -51,8 +51,8 @@ } }, "peerDependencies": { - "@cordisjs/client": "^0.1.6", - "cordis": "^3.16.1" + "@cordisjs/client": "^0.1.8", + "cordis": "^3.17.1" }, "peerDependenciesMeta": { "@cordisjs/client": { @@ -60,8 +60,8 @@ } }, "devDependencies": { - "@cordisjs/client": "^0.1.6", - "@cordisjs/loader": "^0.11.1", + "@cordisjs/client": "^0.1.8", + "@cordisjs/loader": "^0.12.1", "@cordisjs/plugin-server": "^0.2.3", "@maikolib/vite-plugin-yaml": "^1.0.1", "@types/uuid": "^8.3.4", diff --git a/plugins/webui/src/index.ts b/plugins/webui/src/index.ts index f6af09d..5aec07d 100644 --- a/plugins/webui/src/index.ts +++ b/plugins/webui/src/index.ts @@ -43,7 +43,10 @@ interface HeartbeatConfig { } class NodeWebUI extends WebUI { - static inject = ['server'] + static inject = { + required: ['server'], + optional: ['webui'], // FIXME + } public vite!: ViteDevServer public root: string diff --git a/plugins/webui/src/shared/index.ts b/plugins/webui/src/shared/index.ts index 1d6512f..2266e42 100644 --- a/plugins/webui/src/shared/index.ts +++ b/plugins/webui/src/shared/index.ts @@ -21,6 +21,11 @@ declare module 'cordis' { export type SocketListener = (this: Client, ...args: any[]) => void export abstract class WebUI extends Service { + // FIXME + public inject = { + optional: ['webui'], + } + public id = Math.random().toString(36).slice(2) readonly entries: Dict = Object.create(null)