From f65dfac90d052811cceb44d470aef5434d5b4f49 Mon Sep 17 00:00:00 2001 From: Shigma Date: Tue, 5 Mar 2024 00:43:58 +0800 Subject: [PATCH] chore: bump versions --- adapters/dingtalk/package.json | 2 +- adapters/discord/package.json | 2 +- adapters/kook/package.json | 2 +- adapters/lark/package.json | 2 +- adapters/line/package.json | 2 +- adapters/mail/package.json | 2 +- adapters/matrix/package.json | 2 +- adapters/qq/package.json | 2 +- adapters/satori/package.json | 2 +- adapters/slack/package.json | 2 +- adapters/telegram/package.json | 2 +- adapters/wechat-official/package.json | 2 +- adapters/wecom/package.json | 2 +- adapters/whatsapp/package.json | 2 +- adapters/zulip/package.json | 2 +- package.json | 4 ++-- packages/core/package.json | 6 +++--- packages/core/src/bot.ts | 12 +++++++----- packages/core/src/index.ts | 7 +------ packages/satori/package.json | 4 ++-- packages/server-proxy/package.json | 2 +- packages/server-satori/package.json | 2 +- packages/server-temp/package.json | 2 +- 23 files changed, 33 insertions(+), 36 deletions(-) diff --git a/adapters/dingtalk/package.json b/adapters/dingtalk/package.json index bd404283..4d6131d5 100644 --- a/adapters/dingtalk/package.json +++ b/adapters/dingtalk/package.json @@ -33,6 +33,6 @@ "@cordisjs/server": "^0.1.8" }, "peerDependencies": { - "@satorijs/satori": "^3.6.1" + "@satorijs/satori": "^3.6.3" } } diff --git a/adapters/discord/package.json b/adapters/discord/package.json index 9e04bb9b..dac51841 100644 --- a/adapters/discord/package.json +++ b/adapters/discord/package.json @@ -32,6 +32,6 @@ "chat" ], "peerDependencies": { - "@satorijs/satori": "^3.6.1" + "@satorijs/satori": "^3.6.3" } } diff --git a/adapters/kook/package.json b/adapters/kook/package.json index 4c4a3299..8a0698bd 100644 --- a/adapters/kook/package.json +++ b/adapters/kook/package.json @@ -32,6 +32,6 @@ "@cordisjs/server": "^0.1.8" }, "peerDependencies": { - "@satorijs/satori": "^3.6.1" + "@satorijs/satori": "^3.6.3" } } diff --git a/adapters/lark/package.json b/adapters/lark/package.json index 717d6ae6..cac501ff 100644 --- a/adapters/lark/package.json +++ b/adapters/lark/package.json @@ -36,6 +36,6 @@ "@cordisjs/server": "^0.1.8" }, "peerDependencies": { - "@satorijs/satori": "^3.6.1" + "@satorijs/satori": "^3.6.3" } } diff --git a/adapters/line/package.json b/adapters/line/package.json index 169078ef..254b135b 100644 --- a/adapters/line/package.json +++ b/adapters/line/package.json @@ -32,6 +32,6 @@ "@cordisjs/server": "^0.1.8" }, "peerDependencies": { - "@satorijs/satori": "^3.6.1" + "@satorijs/satori": "^3.6.3" } } diff --git a/adapters/mail/package.json b/adapters/mail/package.json index df6c7f8b..d310a09c 100644 --- a/adapters/mail/package.json +++ b/adapters/mail/package.json @@ -31,7 +31,7 @@ "chat" ], "peerDependencies": { - "@satorijs/satori": "^3.6.1" + "@satorijs/satori": "^3.6.3" }, "dependencies": { "@types/mailparser": "^3.4.4", diff --git a/adapters/matrix/package.json b/adapters/matrix/package.json index f3fefe1d..e1d723ef 100644 --- a/adapters/matrix/package.json +++ b/adapters/matrix/package.json @@ -30,7 +30,7 @@ "@cordisjs/server": "^0.1.8" }, "peerDependencies": { - "@satorijs/satori": "^3.6.1" + "@satorijs/satori": "^3.6.3" }, "dependencies": { "html5parser": "^2.0.2", diff --git a/adapters/qq/package.json b/adapters/qq/package.json index 8ebd1a03..6c11a40e 100644 --- a/adapters/qq/package.json +++ b/adapters/qq/package.json @@ -30,7 +30,7 @@ "chat" ], "peerDependencies": { - "@satorijs/satori": "^3.6.1" + "@satorijs/satori": "^3.6.3" }, "dependencies": { "qface": "^1.4.1" diff --git a/adapters/satori/package.json b/adapters/satori/package.json index f2482d1f..a56ec543 100644 --- a/adapters/satori/package.json +++ b/adapters/satori/package.json @@ -29,6 +29,6 @@ "chat" ], "peerDependencies": { - "@satorijs/satori": "^3.6.1" + "@satorijs/satori": "^3.6.3" } } diff --git a/adapters/slack/package.json b/adapters/slack/package.json index 726eca86..4fcfed7d 100644 --- a/adapters/slack/package.json +++ b/adapters/slack/package.json @@ -32,7 +32,7 @@ "@cordisjs/server": "^0.1.8" }, "peerDependencies": { - "@satorijs/satori": "^3.6.1" + "@satorijs/satori": "^3.6.3" }, "dependencies": { "@slack/types": "^2.10.0" diff --git a/adapters/telegram/package.json b/adapters/telegram/package.json index 88a01485..84d08a5d 100644 --- a/adapters/telegram/package.json +++ b/adapters/telegram/package.json @@ -36,7 +36,7 @@ "@cordisjs/server": "^0.1.8" }, "peerDependencies": { - "@satorijs/satori": "^3.6.1" + "@satorijs/satori": "^3.6.3" }, "dependencies": { "file-type": "^16.5.4" diff --git a/adapters/wechat-official/package.json b/adapters/wechat-official/package.json index 473f4252..7cd82c26 100644 --- a/adapters/wechat-official/package.json +++ b/adapters/wechat-official/package.json @@ -33,7 +33,7 @@ "@types/xml2js": "^0.4.14" }, "peerDependencies": { - "@satorijs/satori": "^3.6.1" + "@satorijs/satori": "^3.6.3" }, "dependencies": { "@wecom/crypto": "^1.0.1", diff --git a/adapters/wecom/package.json b/adapters/wecom/package.json index 0b99aa9a..a0def48f 100644 --- a/adapters/wecom/package.json +++ b/adapters/wecom/package.json @@ -33,7 +33,7 @@ "@types/xml2js": "^0.4.14" }, "peerDependencies": { - "@satorijs/satori": "^3.6.1" + "@satorijs/satori": "^3.6.3" }, "dependencies": { "@wecom/crypto": "^1.0.1", diff --git a/adapters/whatsapp/package.json b/adapters/whatsapp/package.json index 123687c5..dad461a1 100644 --- a/adapters/whatsapp/package.json +++ b/adapters/whatsapp/package.json @@ -30,6 +30,6 @@ "@cordisjs/server": "^0.1.8" }, "peerDependencies": { - "@satorijs/satori": "^3.6.1" + "@satorijs/satori": "^3.6.3" } } diff --git a/adapters/zulip/package.json b/adapters/zulip/package.json index fce4589d..2bd75462 100644 --- a/adapters/zulip/package.json +++ b/adapters/zulip/package.json @@ -29,7 +29,7 @@ "chat" ], "peerDependencies": { - "@satorijs/satori": "^3.6.1" + "@satorijs/satori": "^3.6.3" }, "dependencies": { "marked": "^9.1.6" diff --git a/package.json b/package.json index cf1b00ae..baeab0e6 100644 --- a/package.json +++ b/package.json @@ -33,8 +33,8 @@ "eslint": "^8.55.0", "shx": "^0.3.4", "typescript": "^5.3.2", - "yakumo": "^1.0.0-beta.8", - "yakumo-esbuild": "^1.0.0-beta.4", + "yakumo": "^1.0.0-beta.11", + "yakumo-esbuild": "^1.0.0-beta.5", "yakumo-tsc": "^1.0.0-beta.3" } } diff --git a/packages/core/package.json b/packages/core/package.json index 6476abff..2c7a8ca0 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -1,7 +1,7 @@ { "name": "@satorijs/core", "description": "Core components of Satorijs", - "version": "3.6.1", + "version": "3.6.3", "type": "module", "main": "lib/index.cjs", "module": "lib/index.mjs", @@ -46,9 +46,9 @@ "dependencies": { "@satorijs/element": "^3.1.5", "@satorijs/protocol": "^1.3.0-alpha.0", - "cordis": "^3.12.0", + "cordis": "^3.13.2", "cosmokit": "^1.5.2", - "undios": "^0.2.3", + "undios": "^0.3.0", "undios-file": "^0.1.2", "ws": "^8.14.2" } diff --git a/packages/core/src/bot.ts b/packages/core/src/bot.ts index e8c703aa..870499a2 100644 --- a/packages/core/src/bot.ts +++ b/packages/core/src/bot.ts @@ -1,5 +1,7 @@ import { clone, Dict, pick, remove } from 'cosmokit' -import { Context, Fragment, Logger } from '.' +import * as cordis from 'cordis' +import h from '@satorijs/element' +import { Context } from '.' import { Adapter } from './adapter' import { MessageEncoder } from './message' import { defineAccessor } from './session' @@ -26,7 +28,7 @@ export abstract class Bot implements Login public adapter?: Adapter public error?: Error public callbacks: Dict = {} - public logger: Logger + public logger: cordis.Logger // Same as `this.ctx`, but with a more specific type. protected context: Context @@ -158,17 +160,17 @@ export abstract class Bot implements Login } } - async createMessage(channelId: string, content: Fragment, guildId?: string, options?: SendOptions) { + async createMessage(channelId: string, content: h.Fragment, guildId?: string, options?: SendOptions) { const { MessageEncoder } = this.constructor as typeof Bot return new MessageEncoder(this, channelId, guildId, options).send(content) } - async sendMessage(channelId: string, content: Fragment, guildId?: string, options?: SendOptions) { + async sendMessage(channelId: string, content: h.Fragment, guildId?: string, options?: SendOptions) { const messages = await this.createMessage(channelId, content, guildId, options) return messages.map(message => message.id) } - async sendPrivateMessage(userId: string, content: Fragment, guildId?: string, options?: SendOptions) { + async sendPrivateMessage(userId: string, content: h.Fragment, guildId?: string, options?: SendOptions) { const { id } = await this.createDirectChannel(userId, guildId ?? options?.session?.guildId) return this.sendMessage(id, content, null, options) } diff --git a/packages/core/src/index.ts b/packages/core/src/index.ts index 439cc242..c7df6024 100644 --- a/packages/core/src/index.ts +++ b/packages/core/src/index.ts @@ -143,12 +143,7 @@ export class Context extends cordis.Context { const result = await component(attrs, children, session) return session.transform(h.normalize(result)) } - const service = 'component:' + name - this.provide(service) - return this.effect(() => { - this[service] = render - return () => this[service] = null - }) + return this.set('component:' + name, render) } } diff --git a/packages/satori/package.json b/packages/satori/package.json index af99826d..9ca8bd45 100644 --- a/packages/satori/package.json +++ b/packages/satori/package.json @@ -1,7 +1,7 @@ { "name": "@satorijs/satori", "description": "Core components of Satorijs", - "version": "3.6.1", + "version": "3.6.3", "type": "module", "main": "lib/index.cjs", "module": "lib/index.mjs", @@ -36,7 +36,7 @@ "utilities" ], "dependencies": { - "@satorijs/core": "3.6.1", + "@satorijs/core": "3.6.3", "cosmokit": "^1.5.2" } } diff --git a/packages/server-proxy/package.json b/packages/server-proxy/package.json index 575e41ff..512acffb 100644 --- a/packages/server-proxy/package.json +++ b/packages/server-proxy/package.json @@ -31,6 +31,6 @@ "@cordisjs/server": "^0.1.8" }, "peerDependencies": { - "@satorijs/satori": "^3.6.1" + "@satorijs/satori": "^3.6.3" } } diff --git a/packages/server-satori/package.json b/packages/server-satori/package.json index d595624b..f1bca82e 100644 --- a/packages/server-satori/package.json +++ b/packages/server-satori/package.json @@ -40,6 +40,6 @@ "@cordisjs/server": "^0.1.8" }, "peerDependencies": { - "@satorijs/satori": "^3.6.1" + "@satorijs/satori": "^3.6.3" } } diff --git a/packages/server-temp/package.json b/packages/server-temp/package.json index c422ccba..514203bb 100644 --- a/packages/server-temp/package.json +++ b/packages/server-temp/package.json @@ -31,6 +31,6 @@ "@cordisjs/server": "^0.1.8" }, "peerDependencies": { - "@satorijs/satori": "^3.6.1" + "@satorijs/satori": "^3.6.3" } }