{{ content }}
@@ -11,7 +11,7 @@
diff --git a/packages/plugin-status/server/profile.ts b/packages/plugin-status/server/profile.ts
index 9182a4d0c4..274b55b413 100644
--- a/packages/plugin-status/server/profile.ts
+++ b/packages/plugin-status/server/profile.ts
@@ -51,18 +51,18 @@ export interface BotData {
currentRate: MessageRate
}
-export namespace BotData {
- function accumulate(record: number[]) {
- return record.slice(1).reduce((prev, curr) => prev + curr, 0)
- }
+function accumulate(record: number[]) {
+ return record.slice(1).reduce((prev, curr) => prev + curr, 0)
+}
- export const from = async (bot: Bot) => ({
+export async function BotData(bot: Bot) {
+ return {
platform: bot.platform,
selfId: bot.selfId,
username: bot.username,
code: await bot.getStatus(),
currentRate: [accumulate(bot.messageSent), accumulate(bot.messageReceived)],
- } as BotData)
+ } as BotData
}
export interface Profile extends Profile.Meta {
@@ -88,7 +88,7 @@ export namespace Profile {
export async function get(ctx: Context, config: Config) {
const [memory, bots] = await Promise.all([
memoryRate(),
- Promise.all(ctx.bots.map(BotData.from)),
+ Promise.all(ctx.bots.filter(bot => bot.platform !== 'sandbox').map(BotData)),
])
const cpu: LoadRate = [appRate, usedRate]
return { bots, memory, cpu, ...await getMeta(ctx, config) } as Profile
From 7da07841c18dd3c83e42f60e0e0750f7dd66bb78 Mon Sep 17 00:00:00 2001
From: LittleC
Date: Thu, 18 Mar 2021 19:46:56 +0800
Subject: [PATCH 18/23] fix(discord): embed typing
---
packages/adapter-discord/src/bot.ts | 2 +-
packages/adapter-discord/src/index.ts | 7 +++++++
packages/adapter-discord/src/utils.ts | 6 ++++--
3 files changed, 12 insertions(+), 3 deletions(-)
diff --git a/packages/adapter-discord/src/bot.ts b/packages/adapter-discord/src/bot.ts
index 351bf74f7b..a467f2aa29 100644
--- a/packages/adapter-discord/src/bot.ts
+++ b/packages/adapter-discord/src/bot.ts
@@ -106,7 +106,7 @@ export class DiscordBot extends Bot<'discord'> {
})
sentMessageId = r.id
}
- if (type === 'image' || type === 'video') {
+ if (type === 'image' || type === 'video' && data.url) {
if (data.url.startsWith('http://') || data.url.startsWith('https://')) {
const a = await axios({
url: data.url,
diff --git a/packages/adapter-discord/src/index.ts b/packages/adapter-discord/src/index.ts
index dc4a4c56b9..106da66e85 100644
--- a/packages/adapter-discord/src/index.ts
+++ b/packages/adapter-discord/src/index.ts
@@ -2,6 +2,7 @@ import { Adapter } from 'koishi-core'
import { AxiosRequestConfig } from 'axios'
import { DiscordBot } from './bot'
import WsClient from './ws'
+import { Embed } from './types'
export * from './bot'
export * as dc from './types'
@@ -15,6 +16,12 @@ declare module 'koishi-core' {
discord?: DiscordOptions
}
+ interface Session {
+ discord?: {
+ embeds: Embed[]
+ }
+ }
+
namespace Bot {
interface Platforms {
discord: DiscordBot
diff --git a/packages/adapter-discord/src/utils.ts b/packages/adapter-discord/src/utils.ts
index 24a818796b..55cffadc66 100644
--- a/packages/adapter-discord/src/utils.ts
+++ b/packages/adapter-discord/src/utils.ts
@@ -28,7 +28,7 @@ export const adaptAuthor = (author: DC.Author): AuthorInfo => ({
nickname: author.username,
})
-export async function adaptMessage(bot: DiscordBot, meta: DC.DiscordMessage, session: MessageInfo = {}) {
+export async function adaptMessage(bot: DiscordBot, meta: DC.DiscordMessage, session: Partial> = {}) {
if (meta.author) {
session.author = adaptAuthor(meta.author)
session.userId = meta.author.id
@@ -90,7 +90,9 @@ export async function adaptMessage(bot: DiscordBot, meta: DC.DiscordMessage, ses
session.content += segment('video', { url: embed.video.url, proxy_url: embed.video.proxy_url })
}
}
- session.content = meta.embeds.map(v => segment('embed', { data: JSON.stringify(v) })).join('') + session.content
+ session.discord = {
+ embeds: meta.embeds
+ }
return session
}
From 49c2c398c956cd6365e3462a5c38168a8011ba97 Mon Sep 17 00:00:00 2001
From: Shigma <1700011071@pku.edu.cn>
Date: Thu, 18 Mar 2021 22:40:11 +0800
Subject: [PATCH 19/23] fix(core): check context for shortcut, fix #159
---
packages/koishi-core/src/app.ts | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/packages/koishi-core/src/app.ts b/packages/koishi-core/src/app.ts
index 3190da8d8f..8b1cfd7349 100644
--- a/packages/koishi-core/src/app.ts
+++ b/packages/koishi-core/src/app.ts
@@ -346,11 +346,12 @@ export class App extends Context {
return argv
}
- private _handleShortcut(content: string, { parsed, quote }: Session) {
+ private _handleShortcut(content: string, session: Session) {
+ const { parsed, quote } = session
if (parsed.prefix || quote) return
for (const shortcut of this._shortcuts) {
const { name, fuzzy, command, greedy, prefix, options = {}, args = [] } = shortcut
- if (prefix && !parsed.appel) continue
+ if (prefix && !parsed.appel || !command.context.match(session)) continue
if (typeof name === 'string') {
if (!fuzzy && content !== name || !content.startsWith(name)) continue
const message = content.slice(name.length)
From 875f75b16e0205ae0492823c8cab61014e5f5e71 Mon Sep 17 00:00:00 2001
From: Shigma <1700011071@pku.edu.cn>
Date: Fri, 19 Mar 2021 01:34:01 +0800
Subject: [PATCH 20/23] feat(mysql, mongo): support custom tables
---
packages/plugin-mongo/src/database.ts | 6 +++++-
packages/plugin-mysql/src/database.ts | 6 +++++-
2 files changed, 10 insertions(+), 2 deletions(-)
diff --git a/packages/plugin-mongo/src/database.ts b/packages/plugin-mongo/src/database.ts
index 36331a0904..3ccf3220c7 100644
--- a/packages/plugin-mongo/src/database.ts
+++ b/packages/plugin-mongo/src/database.ts
@@ -1,7 +1,11 @@
import { MongoClient, Db, Collection } from 'mongodb'
-import { App, Channel, Database, Tables, TableType, User } from 'koishi-core'
+import { App, Channel, Database, User, Tables as KoishiTables } from 'koishi-core'
import { URLSearchParams } from 'url'
+type TableType = keyof Tables
+
+export interface Tables extends KoishiTables {}
+
export interface Config {
username?: string
password?: string
diff --git a/packages/plugin-mysql/src/database.ts b/packages/plugin-mysql/src/database.ts
index 8df9530839..eb24290157 100644
--- a/packages/plugin-mysql/src/database.ts
+++ b/packages/plugin-mysql/src/database.ts
@@ -1,5 +1,5 @@
import { createPool, Pool, PoolConfig, escape as mysqlEscape, escapeId, format, OkPacket, TypeCast } from 'mysql'
-import { TableType, Tables, App, Database } from 'koishi-core'
+import { Tables as KoishiTables, App, Database } from 'koishi-core'
import { Logger } from 'koishi-utils'
import { types } from 'util'
@@ -9,6 +9,10 @@ declare module 'mysql' {
}
}
+type TableType = keyof Tables
+
+export interface Tables extends KoishiTables {}
+
const logger = new Logger('mysql')
export interface Config extends PoolConfig {}
From eb6104f44920506c704133f3e2035a7851aca314 Mon Sep 17 00:00:00 2001
From: Shigma <1700011071@pku.edu.cn>
Date: Fri, 19 Mar 2021 02:13:51 +0800
Subject: [PATCH 21/23] build: dtsc for database plugins
---
build/dtsc.ts | 11 ++++++-----
packages/koishi-core/tsconfig.json | 1 -
packages/koishi-utils/tsconfig.json | 1 -
packages/plugin-mongo/tsconfig.json | 2 +-
packages/plugin-mysql/tsconfig.json | 2 +-
5 files changed, 8 insertions(+), 9 deletions(-)
diff --git a/build/dtsc.ts b/build/dtsc.ts
index fdc0adc784..716be51c1d 100644
--- a/build/dtsc.ts
+++ b/build/dtsc.ts
@@ -34,7 +34,7 @@ async function bundle(path: string) {
const importMap: Record> = {}
const namespaceMap: Record = {}
- let prolog = '', cap: RegExpExecArray
+ let prolog = '', epilog = '', cap: RegExpExecArray
let content = await fs.readFile(entry, 'utf8')
content = content.split(EOL).filter((line) => {
if (cap = /^ {4}import \* as (.+) from ["'](.+)["'];$/.exec(line)) {
@@ -59,6 +59,8 @@ async function bundle(path: string) {
}
} else if (line.startsWith('///')) {
prolog += line + EOL
+ } else if (line.startsWith(' export default ')) {
+ epilog = line.trimStart() + EOL
} else {
return true
}
@@ -85,8 +87,9 @@ async function bundle(path: string) {
if (identifier) return `declare namespace ${identifier} {`
return ''
})
+ .replace(/^( {4})((module|class|namespace) .+ \{)$/gm, (_, $1, $2) => `${$1}declare ${$2}`)
.replace(/\r?\n}/g, '')
- .replace(/^ {4}/gm, ''))
+ .replace(/^ {4}/gm, '') + epilog)
}
async function bundleAll(names: readonly string[]) {
@@ -95,15 +98,13 @@ async function bundleAll(names: readonly string[]) {
}
}
-const targets = ['koishi-utils', 'koishi-core']
-const databases = ['mongo', 'mysql']
+const targets = ['koishi-utils', 'koishi-core', 'plugin-mysql', 'plugin-mongo']
const corePlugins = ['common', 'eval', 'puppeteer', 'teach']
function precedence(name: string) {
if (name.startsWith('adapter')) return 1
if (name.startsWith('koishi')) return 5
const plugin = name.slice(7)
- if (databases.includes(plugin)) return 2
if (corePlugins.includes(plugin)) return 3
return 4
}
diff --git a/packages/koishi-core/tsconfig.json b/packages/koishi-core/tsconfig.json
index e27408c68b..b7549d1c0b 100644
--- a/packages/koishi-core/tsconfig.json
+++ b/packages/koishi-core/tsconfig.json
@@ -3,7 +3,6 @@
"compilerOptions": {
"rootDir": "src",
"outFile": "temp/index.d.ts",
- "tsBuildInfoFile": "tsconfig.tsbuildinfo"
},
"include": [
"src"
diff --git a/packages/koishi-utils/tsconfig.json b/packages/koishi-utils/tsconfig.json
index e27408c68b..b7549d1c0b 100644
--- a/packages/koishi-utils/tsconfig.json
+++ b/packages/koishi-utils/tsconfig.json
@@ -3,7 +3,6 @@
"compilerOptions": {
"rootDir": "src",
"outFile": "temp/index.d.ts",
- "tsBuildInfoFile": "tsconfig.tsbuildinfo"
},
"include": [
"src"
diff --git a/packages/plugin-mongo/tsconfig.json b/packages/plugin-mongo/tsconfig.json
index 54a917908e..8b165bdac1 100644
--- a/packages/plugin-mongo/tsconfig.json
+++ b/packages/plugin-mongo/tsconfig.json
@@ -1,8 +1,8 @@
{
"extends": "../../tsconfig.base",
"compilerOptions": {
- "outDir": "dist",
"rootDir": "src",
+ "outFile": "temp/index.d.ts",
},
"include": [
"src",
diff --git a/packages/plugin-mysql/tsconfig.json b/packages/plugin-mysql/tsconfig.json
index a497f05e83..b9a2903071 100644
--- a/packages/plugin-mysql/tsconfig.json
+++ b/packages/plugin-mysql/tsconfig.json
@@ -1,8 +1,8 @@
{
"extends": "../../tsconfig.base",
"compilerOptions": {
- "outDir": "dist",
"rootDir": "src",
+ "outFile": "temp/index.d.ts",
},
"include": [
"src",
From 6956c815bfa2522b5e47619b425e4dd2c8e953ae Mon Sep 17 00:00:00 2001
From: undefined
Date: Fri, 19 Mar 2021 02:19:05 +0800
Subject: [PATCH 22/23] feat(status): mongo support (#160)
Co-authored-by: Shigma <1700011071@pku.edu.cn>
---
packages/plugin-status/server/mongo.ts | 76 +++++++++++++++++++++++++-
packages/plugin-status/server/stats.ts | 6 +-
2 files changed, 77 insertions(+), 5 deletions(-)
diff --git a/packages/plugin-status/server/mongo.ts b/packages/plugin-status/server/mongo.ts
index 64dc23da87..5f8ccccf7e 100644
--- a/packages/plugin-status/server/mongo.ts
+++ b/packages/plugin-status/server/mongo.ts
@@ -1,5 +1,14 @@
-import { Database } from 'koishi-core'
-import {} from 'koishi-plugin-mongo'
+import { Database, Logger, Time } from 'koishi-core'
+import type MongoDatabase from 'koishi-plugin-mongo'
+import { RECENT_LENGTH, StatRecord, Synchronizer } from './stats'
+
+const logger = new Logger('status')
+
+declare module 'koishi-plugin-mongo' {
+ interface Tables {
+ 'plugin-status': any
+ }
+}
Database.extend('koishi-plugin-mongo', {
async getProfile() {
@@ -13,4 +22,67 @@ Database.extend('koishi-plugin-mongo', {
])
return { allGroups, activeGroups, allUsers, activeUsers, storageSize }
},
+
+ async setChannels(data) {
+ await Promise.all(data.map(ch => this.setChannel(ch.type, ch.id, ch)))
+ },
+
+ Synchronizer: class {
+ groups: StatRecord
+ daily: any
+ hourly: Record
+ longterm: Record
+
+ constructor(private db: MongoDatabase) {
+ this.reset()
+ }
+
+ reset() {
+ this.hourly = Object.fromEntries(Synchronizer.hourlyFields.map(i => [i, 0])) as any
+ this.daily = {}
+ this.longterm = Object.fromEntries(Synchronizer.longtermFields.map(i => [i, 0])) as any
+ this.groups = {}
+ }
+
+ addDaily(field: Synchronizer.DailyField, key: string | number) {
+ if (!this.daily[field]) this.daily[field] = {}
+ const stat: Record = this.daily[field]
+ stat[key] = (stat[key] || 0) + 1
+ }
+
+ async upload(date: Date): Promise {
+ logger.debug(this.hourly, this.daily, this.longterm, this.groups)
+ const coll = this.db.collection('plugin-status')
+ const _date = new Date(date)
+ _date.setMinutes(0)
+ _date.setSeconds(0)
+ _date.setMilliseconds(0)
+ await coll.updateOne({ type: 'hourly', time: _date }, { $inc: this.hourly }, { upsert: true })
+ _date.setHours(0)
+ const $inc = {}
+ for (const key in this.daily) {
+ for (const subkey in this.daily[key]) {
+ $inc[`${key}.${subkey}`] = this.daily[key][subkey]
+ }
+ }
+ if (Object.keys($inc).length) await coll.updateOne({ type: 'daily', time: _date }, { $inc }, { upsert: true })
+ await coll.updateOne({ type: 'longterm', time: _date }, { $inc: this.longterm }, { upsert: true })
+ for (const id in this.groups) {
+ await this.db.channel.updateOne({ id }, { $inc: { ['activity.' + Time.getDateNumber(date)]: this.groups[id] } } as any)
+ }
+ this.reset()
+ logger.debug('stats updated')
+ }
+
+ async download(date: Date) {
+ const time = { $lt: new Date(date) }
+ const coll = this.db.collection('plugin-status')
+ const hourly = await coll.find({ type: 'hourly', time }).sort({ time: -1 }).limit(24 * RECENT_LENGTH).toArray()
+ const daily = await coll.find({ type: 'daily', time }).sort({ time: -1 }).limit(RECENT_LENGTH).toArray()
+ const longterm = await coll.find({ type: 'longterm', time }).sort({ time: -1 }).toArray()
+ const groups = await this.db.channel.find({}).project({ type: 1, pid: 1, name: 1, assignee: 1 })
+ .map(data => ({ ...data, id: `${data.type}:${data.pid}` })).toArray()
+ return { daily, hourly, longterm, groups }
+ }
+ },
})
diff --git a/packages/plugin-status/server/stats.ts b/packages/plugin-status/server/stats.ts
index 594a5ed27e..3bdf804f70 100644
--- a/packages/plugin-status/server/stats.ts
+++ b/packages/plugin-status/server/stats.ts
@@ -120,7 +120,7 @@ async function download(ctx: Context, date: Date) {
const groups = await bot.getGroupList()
for (const { groupId, groupName: name } of groups) {
const id = `${bot.platform}:${groupId}`
- if (!messageMap[id] || groupSet.has(id)) continue
+ if (!messageMap[id] || !groupMap[id] || groupSet.has(id)) continue
groupSet.add(id)
const { name: oldName, assignee } = groupMap[id]
if (name !== oldName) updateList.push({ id, name })
@@ -145,7 +145,7 @@ async function download(ctx: Context, date: Date) {
name: name || key,
value: messageMap[key],
last: daily[0].group[key],
- assignee: ctx.bots[`${platform}:${assignee}`].selfId,
+ assignee: ctx.bots[`${platform}:${assignee}`]?.selfId || '',
})
}
}
@@ -159,7 +159,7 @@ async function download(ctx: Context, date: Date) {
// dialogue
if (ctx.database.getDialoguesById) {
const dialogueMap = average(daily.map(data => data.dialogue))
- const dialogues = await ctx.database.getDialoguesById(Object.keys(dialogueMap) as any, ['id', 'original'])
+ const dialogues = await ctx.database.getDialoguesById(Object.keys(dialogueMap).map(i => +i), ['id', 'original'])
const questionMap: Record = {}
for (const dialogue of dialogues) {
const { id, original: name } = dialogue
From 89b5996eca60360100d221a8d9aec88be45b9275 Mon Sep 17 00:00:00 2001
From: Shigma <1700011071@pku.edu.cn>
Date: Fri, 19 Mar 2021 02:23:40 +0800
Subject: [PATCH 23/23] chore: bump versions
---
packages/adapter-discord/package.json | 4 ++--
packages/adapter-kaiheila/package.json | 4 ++--
packages/adapter-onebot/package.json | 4 ++--
packages/adapter-telegram/package.json | 4 ++--
packages/adapter-tomon/package.json | 4 ++--
packages/koishi-core/package.json | 4 ++--
packages/koishi-test-utils/package.json | 4 ++--
packages/koishi-utils/package.json | 2 +-
packages/koishi/ecosystem.json | 8 ++++----
packages/koishi/package.json | 6 +++---
packages/plugin-adventure/package.json | 6 +++---
packages/plugin-chess/package.json | 4 ++--
packages/plugin-common/package.json | 4 ++--
packages/plugin-dice/package.json | 4 ++--
packages/plugin-eval/package.json | 2 +-
packages/plugin-github/package.json | 4 ++--
packages/plugin-image-search/package.json | 4 ++--
packages/plugin-mongo/package.json | 4 ++--
packages/plugin-monitor/package.json | 4 ++--
packages/plugin-mysql/package.json | 6 +++---
packages/plugin-puppeteer/package.json | 4 ++--
packages/plugin-rss/package.json | 4 ++--
packages/plugin-schedule/package.json | 8 ++++----
packages/plugin-status/package.json | 8 ++++----
packages/plugin-teach/package.json | 8 ++++----
packages/plugin-tools/package.json | 4 ++--
26 files changed, 61 insertions(+), 61 deletions(-)
diff --git a/packages/adapter-discord/package.json b/packages/adapter-discord/package.json
index 041451ad98..3289132c15 100644
--- a/packages/adapter-discord/package.json
+++ b/packages/adapter-discord/package.json
@@ -1,7 +1,7 @@
{
"name": "koishi-adapter-discord",
"description": "Discord adapter for Koishi",
- "version": "1.0.3",
+ "version": "1.0.4",
"main": "dist/index.js",
"typings": "dist/index.d.ts",
"files": [
@@ -28,7 +28,7 @@
"koishi"
],
"peerDependencies": {
- "koishi-core": "^3.2.0"
+ "koishi-core": "^3.2.1"
},
"devDependencies": {
"@types/ws": "^7.4.0",
diff --git a/packages/adapter-kaiheila/package.json b/packages/adapter-kaiheila/package.json
index 64c1ebf073..d6b09821ec 100644
--- a/packages/adapter-kaiheila/package.json
+++ b/packages/adapter-kaiheila/package.json
@@ -24,14 +24,14 @@
"koishi"
],
"peerDependencies": {
- "koishi-core": "^3.2.0"
+ "koishi-core": "^3.2.1"
},
"devDependencies": {
"koishi-test-utils": "^6.0.0-beta.10"
},
"dependencies": {
"axios": "^0.21.1",
- "koishi-utils": "^4.0.1",
+ "koishi-utils": "^4.0.2",
"ws": "^7.4.4"
}
}
diff --git a/packages/adapter-onebot/package.json b/packages/adapter-onebot/package.json
index efdc4f39a1..45673008c9 100644
--- a/packages/adapter-onebot/package.json
+++ b/packages/adapter-onebot/package.json
@@ -27,7 +27,7 @@
"koishi"
],
"peerDependencies": {
- "koishi-core": "^3.2.0"
+ "koishi-core": "^3.2.1"
},
"devDependencies": {
"@types/ws": "^7.4.0",
@@ -36,7 +36,7 @@
},
"dependencies": {
"axios": "^0.21.1",
- "koishi-utils": "^4.0.1",
+ "koishi-utils": "^4.0.2",
"ws": "^7.4.4"
}
}
diff --git a/packages/adapter-telegram/package.json b/packages/adapter-telegram/package.json
index 24c611d3df..656f644c40 100644
--- a/packages/adapter-telegram/package.json
+++ b/packages/adapter-telegram/package.json
@@ -28,7 +28,7 @@
"koishi"
],
"peerDependencies": {
- "koishi-core": "^3.2.0"
+ "koishi-core": "^3.2.1"
},
"devDependencies": {
"koishi-test-utils": "^6.0.0-beta.10"
@@ -36,6 +36,6 @@
"dependencies": {
"axios": "^0.21.1",
"form-data": "^4.0.0",
- "koishi-utils": "^4.0.1"
+ "koishi-utils": "^4.0.2"
}
}
diff --git a/packages/adapter-tomon/package.json b/packages/adapter-tomon/package.json
index c68d964861..cadb9ccd5f 100644
--- a/packages/adapter-tomon/package.json
+++ b/packages/adapter-tomon/package.json
@@ -24,7 +24,7 @@
"koishi"
],
"peerDependencies": {
- "koishi-core": "^3.2.0"
+ "koishi-core": "^3.2.1"
},
"devDependencies": {
"@types/pako": "^1.0.1",
@@ -32,7 +32,7 @@
},
"dependencies": {
"axios": "^0.21.1",
- "koishi-utils": "^4.0.1",
+ "koishi-utils": "^4.0.2",
"pako": "^2.0.3",
"ws": "^7.4.4"
}
diff --git a/packages/koishi-core/package.json b/packages/koishi-core/package.json
index a3400598f0..0a1a8aa6b4 100644
--- a/packages/koishi-core/package.json
+++ b/packages/koishi-core/package.json
@@ -1,7 +1,7 @@
{
"name": "koishi-core",
"description": "Core features for Koishi",
- "version": "3.2.0",
+ "version": "3.2.1",
"main": "dist/index.js",
"typings": "dist/index.d.ts",
"engines": {
@@ -42,7 +42,7 @@
"fastest-levenshtein": "^1.0.12",
"koa": "^2.13.1",
"koa-bodyparser": "^4.3.0",
- "koishi-utils": "^4.0.1",
+ "koishi-utils": "^4.0.2",
"lru-cache": "^6.0.0"
}
}
diff --git a/packages/koishi-test-utils/package.json b/packages/koishi-test-utils/package.json
index 4a4a35d878..3a423b9034 100644
--- a/packages/koishi-test-utils/package.json
+++ b/packages/koishi-test-utils/package.json
@@ -37,8 +37,8 @@
"dependencies": {
"chai": "^4.3.3",
"chai-as-promised": "^7.1.1",
- "koishi-core": "^3.2.0",
- "koishi-utils": "^4.0.1"
+ "koishi-core": "^3.2.1",
+ "koishi-utils": "^4.0.2"
},
"devDependencies": {
"@types/chai": "^4.2.15",
diff --git a/packages/koishi-utils/package.json b/packages/koishi-utils/package.json
index 6869cac482..78539d2ea8 100644
--- a/packages/koishi-utils/package.json
+++ b/packages/koishi-utils/package.json
@@ -1,7 +1,7 @@
{
"name": "koishi-utils",
"description": "Utilities for Koishi",
- "version": "4.0.1",
+ "version": "4.0.2",
"main": "dist/index.js",
"typings": "dist/index.d.ts",
"files": [
diff --git a/packages/koishi/ecosystem.json b/packages/koishi/ecosystem.json
index 89d68d20b8..a340d163bb 100644
--- a/packages/koishi/ecosystem.json
+++ b/packages/koishi/ecosystem.json
@@ -1,6 +1,6 @@
{
"koishi-adapter-discord": {
- "version": "1.0.3",
+ "version": "1.0.4",
"description": "Discord adapter for Koishi"
},
"koishi-adapter-kaiheila": {
@@ -48,14 +48,14 @@
"description": "Image searching plugin for Koishi"
},
"koishi-plugin-mongo": {
- "version": "2.0.0",
+ "version": "2.1.0",
"description": "MongoDB support for Koishi"
},
"koishi-plugin-monitor": {
"version": "1.0.0-beta.27"
},
"koishi-plugin-mysql": {
- "version": "3.0.0",
+ "version": "3.1.0",
"description": "MySQL support for Koishi"
},
"koishi-plugin-puppeteer": {
@@ -71,7 +71,7 @@
"description": "Schedule plugin for Koishi"
},
"koishi-plugin-status": {
- "version": "4.0.0-alpha.0",
+ "version": "4.0.0-alpha.1",
"description": "Show Status of Koishi"
},
"koishi-plugin-teach": {
diff --git a/packages/koishi/package.json b/packages/koishi/package.json
index 683c23af72..1a8165c8e9 100644
--- a/packages/koishi/package.json
+++ b/packages/koishi/package.json
@@ -1,7 +1,7 @@
{
"name": "koishi",
"description": "A QQ bot framework based on CQHTTP",
- "version": "3.2.0",
+ "version": "3.2.1",
"main": "index.js",
"typings": "index.d.ts",
"engines": {
@@ -38,8 +38,8 @@
"cac": "^6.7.2",
"chokidar": "^3.5.1",
"kleur": "^4.1.4",
- "koishi-core": "^3.2.0",
- "koishi-utils": "^4.0.1",
+ "koishi-core": "^3.2.1",
+ "koishi-utils": "^4.0.2",
"prompts": "^2.4.0"
}
}
diff --git a/packages/plugin-adventure/package.json b/packages/plugin-adventure/package.json
index 58502d7e52..8e39991323 100644
--- a/packages/plugin-adventure/package.json
+++ b/packages/plugin-adventure/package.json
@@ -28,11 +28,11 @@
"adventure"
],
"peerDependencies": {
- "koishi-core": "^3.2.0",
+ "koishi-core": "^3.2.1",
"koishi-plugin-common": "^4.1.2",
- "koishi-plugin-mysql": "^3.0.0",
+ "koishi-plugin-mysql": "^3.1.0",
"koishi-plugin-teach": "^2.0.0",
- "koishi-utils": "^4.0.1"
+ "koishi-utils": "^4.0.2"
},
"devDependencies": {
"koishi-test-utils": "^6.0.0-beta.10"
diff --git a/packages/plugin-chess/package.json b/packages/plugin-chess/package.json
index 44973afe2c..98299c345c 100644
--- a/packages/plugin-chess/package.json
+++ b/packages/plugin-chess/package.json
@@ -29,8 +29,8 @@
"game"
],
"peerDependencies": {
- "koishi-core": "^3.2.0",
+ "koishi-core": "^3.2.1",
"koishi-plugin-puppeteer": "^2.0.0",
- "koishi-utils": "^4.0.1"
+ "koishi-utils": "^4.0.2"
}
}
diff --git a/packages/plugin-common/package.json b/packages/plugin-common/package.json
index 3b04c7652b..61aa244d33 100644
--- a/packages/plugin-common/package.json
+++ b/packages/plugin-common/package.json
@@ -30,8 +30,8 @@
"plugin"
],
"peerDependencies": {
- "koishi-core": "^3.2.0",
- "koishi-utils": "^4.0.1"
+ "koishi-core": "^3.2.1",
+ "koishi-utils": "^4.0.2"
},
"devDependencies": {
"koishi-test-utils": "^6.0.0-beta.10"
diff --git a/packages/plugin-dice/package.json b/packages/plugin-dice/package.json
index 971abcf19b..a8f883d77f 100644
--- a/packages/plugin-dice/package.json
+++ b/packages/plugin-dice/package.json
@@ -31,8 +31,8 @@
"dice"
],
"peerDependencies": {
- "koishi-core": "^3.2.0",
- "koishi-utils": "^4.0.1"
+ "koishi-core": "^3.2.1",
+ "koishi-utils": "^4.0.2"
},
"devDependencies": {
"koishi-test-utils": "^6.0.0-beta.10"
diff --git a/packages/plugin-eval/package.json b/packages/plugin-eval/package.json
index 0f36d3a9d4..299d527688 100644
--- a/packages/plugin-eval/package.json
+++ b/packages/plugin-eval/package.json
@@ -33,7 +33,7 @@
"code"
],
"peerDependencies": {
- "koishi-core": "^3.2.0"
+ "koishi-core": "^3.2.1"
},
"dependencies": {
"js-yaml": "^4.0.0",
diff --git a/packages/plugin-github/package.json b/packages/plugin-github/package.json
index 0b15b482c1..90e3764f70 100644
--- a/packages/plugin-github/package.json
+++ b/packages/plugin-github/package.json
@@ -32,9 +32,9 @@
"koishi-test-utils": "^6.0.0-beta.10"
},
"peerDependencies": {
- "koishi-core": "^3.2.0",
+ "koishi-core": "^3.2.1",
"koishi-plugin-puppeteer": "^2.0.0",
- "koishi-utils": "^4.0.1"
+ "koishi-utils": "^4.0.2"
},
"dependencies": {
"@octokit/webhooks-definitions": "^3.62.5",
diff --git a/packages/plugin-image-search/package.json b/packages/plugin-image-search/package.json
index a87d50d109..c85c4f25b5 100644
--- a/packages/plugin-image-search/package.json
+++ b/packages/plugin-image-search/package.json
@@ -33,8 +33,8 @@
"pixiv"
],
"peerDependencies": {
- "koishi-core": "^3.2.0",
- "koishi-utils": "^4.0.1"
+ "koishi-core": "^3.2.1",
+ "koishi-utils": "^4.0.2"
},
"dependencies": {
"axios": "^0.21.1",
diff --git a/packages/plugin-mongo/package.json b/packages/plugin-mongo/package.json
index 099b394894..192ae4673d 100644
--- a/packages/plugin-mongo/package.json
+++ b/packages/plugin-mongo/package.json
@@ -1,7 +1,7 @@
{
"name": "koishi-plugin-mongo",
"description": "MongoDB support for Koishi",
- "version": "2.0.0",
+ "version": "2.1.0",
"main": "dist/index.js",
"typings": "dist/index.d.ts",
"files": [
@@ -35,7 +35,7 @@
"@types/mongodb": "^3.6.9"
},
"peerDependencies": {
- "koishi-core": "^3.2.0"
+ "koishi-core": "^3.2.1"
},
"dependencies": {
"mongodb": "^3.6.4"
diff --git a/packages/plugin-monitor/package.json b/packages/plugin-monitor/package.json
index 451e620d2d..89e47eb357 100644
--- a/packages/plugin-monitor/package.json
+++ b/packages/plugin-monitor/package.json
@@ -17,7 +17,7 @@
},
"homepage": "https://github.com/koishijs/koishi#readme",
"peerDependencies": {
- "koishi-core": "^3.2.0",
- "koishi-utils": "^4.0.1"
+ "koishi-core": "^3.2.1",
+ "koishi-utils": "^4.0.2"
}
}
diff --git a/packages/plugin-mysql/package.json b/packages/plugin-mysql/package.json
index 48524be8aa..f85b1c5f6e 100644
--- a/packages/plugin-mysql/package.json
+++ b/packages/plugin-mysql/package.json
@@ -1,7 +1,7 @@
{
"name": "koishi-plugin-mysql",
"description": "MySQL support for Koishi",
- "version": "3.0.0",
+ "version": "3.1.0",
"main": "dist/index.js",
"typings": "dist/index.d.ts",
"files": [
@@ -35,8 +35,8 @@
"@types/mysql": "^2.15.18"
},
"peerDependencies": {
- "koishi-core": "^3.2.0",
- "koishi-utils": "^4.0.1"
+ "koishi-core": "^3.2.1",
+ "koishi-utils": "^4.0.2"
},
"dependencies": {
"mysql": "^2.18.1"
diff --git a/packages/plugin-puppeteer/package.json b/packages/plugin-puppeteer/package.json
index e43fe44946..4c6dfd5a6e 100644
--- a/packages/plugin-puppeteer/package.json
+++ b/packages/plugin-puppeteer/package.json
@@ -33,8 +33,8 @@
"koishi-test-utils": "^6.0.0-beta.10"
},
"peerDependencies": {
- "koishi-core": "^3.2.0",
- "koishi-utils": "^4.0.1"
+ "koishi-core": "^3.2.1",
+ "koishi-utils": "^4.0.2"
},
"dependencies": {
"chrome-finder": "^1.0.7",
diff --git a/packages/plugin-rss/package.json b/packages/plugin-rss/package.json
index d5f6de7df4..dbaf7cf1ab 100644
--- a/packages/plugin-rss/package.json
+++ b/packages/plugin-rss/package.json
@@ -31,8 +31,8 @@
"rss"
],
"peerDependencies": {
- "koishi-core": "^3.2.0",
- "koishi-utils": "^4.0.1"
+ "koishi-core": "^3.2.1",
+ "koishi-utils": "^4.0.2"
},
"devDependencies": {
"koishi-test-utils": "^6.0.0-beta.10"
diff --git a/packages/plugin-schedule/package.json b/packages/plugin-schedule/package.json
index db8ca7bd17..7451cd7455 100644
--- a/packages/plugin-schedule/package.json
+++ b/packages/plugin-schedule/package.json
@@ -29,12 +29,12 @@
"task"
],
"devDependencies": {
- "koishi-plugin-mongo": "^2.0.0",
- "koishi-plugin-mysql": "^3.0.0",
+ "koishi-plugin-mongo": "^2.1.0",
+ "koishi-plugin-mysql": "^3.1.0",
"koishi-test-utils": "^6.0.0-beta.10"
},
"peerDependencies": {
- "koishi-core": "^3.2.0",
- "koishi-utils": "^4.0.1"
+ "koishi-core": "^3.2.1",
+ "koishi-utils": "^4.0.2"
}
}
diff --git a/packages/plugin-status/package.json b/packages/plugin-status/package.json
index c7a6082f4c..57eb1cd0fd 100644
--- a/packages/plugin-status/package.json
+++ b/packages/plugin-status/package.json
@@ -1,7 +1,7 @@
{
"name": "koishi-plugin-status",
"description": "Show Status of Koishi",
- "version": "4.0.0-alpha.0",
+ "version": "4.0.0-alpha.1",
"main": "dist/index.js",
"typings": "dist/index.d.ts",
"files": [
@@ -28,11 +28,11 @@
"status"
],
"peerDependencies": {
- "koishi-core": "^3.2.0"
+ "koishi-core": "^3.2.1"
},
"devDependencies": {
- "koishi-plugin-mongo": "^2.0.0",
- "koishi-plugin-mysql": "^3.0.0",
+ "koishi-plugin-mongo": "^2.1.0",
+ "koishi-plugin-mysql": "^3.1.0",
"koishi-test-utils": "^6.0.0-beta.10"
},
"dependencies": {
diff --git a/packages/plugin-teach/package.json b/packages/plugin-teach/package.json
index 2767e17845..0d4c3e3a09 100644
--- a/packages/plugin-teach/package.json
+++ b/packages/plugin-teach/package.json
@@ -33,12 +33,12 @@
"conversation"
],
"peerDependencies": {
- "koishi-core": "^3.2.0",
- "koishi-utils": "^4.0.1"
+ "koishi-core": "^3.2.1",
+ "koishi-utils": "^4.0.2"
},
"devDependencies": {
- "koishi-plugin-mongo": "^2.0.0",
- "koishi-plugin-mysql": "^3.0.0",
+ "koishi-plugin-mongo": "^2.1.0",
+ "koishi-plugin-mysql": "^3.1.0",
"koishi-test-utils": "^6.0.0-beta.10"
},
"dependencies": {
diff --git a/packages/plugin-tools/package.json b/packages/plugin-tools/package.json
index 3cc5cce851..537fa2cf50 100644
--- a/packages/plugin-tools/package.json
+++ b/packages/plugin-tools/package.json
@@ -21,8 +21,8 @@
"@types/qrcode": "^1.4.0"
},
"peerDependencies": {
- "koishi-core": "^3.2.0",
- "koishi-utils": "^4.0.1"
+ "koishi-core": "^3.2.1",
+ "koishi-utils": "^4.0.2"
},
"dependencies": {
"axios": "^0.21.1",