Skip to content

Commit

Permalink
chore: bump versions
Browse files Browse the repository at this point in the history
  • Loading branch information
shigma committed Mar 4, 2024
1 parent 6d916e5 commit f65dfac
Show file tree
Hide file tree
Showing 23 changed files with 33 additions and 36 deletions.
2 changes: 1 addition & 1 deletion adapters/dingtalk/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,6 @@
"@cordisjs/server": "^0.1.8"
},
"peerDependencies": {
"@satorijs/satori": "^3.6.1"
"@satorijs/satori": "^3.6.3"
}
}
2 changes: 1 addition & 1 deletion adapters/discord/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,6 @@
"chat"
],
"peerDependencies": {
"@satorijs/satori": "^3.6.1"
"@satorijs/satori": "^3.6.3"
}
}
2 changes: 1 addition & 1 deletion adapters/kook/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,6 @@
"@cordisjs/server": "^0.1.8"
},
"peerDependencies": {
"@satorijs/satori": "^3.6.1"
"@satorijs/satori": "^3.6.3"
}
}
2 changes: 1 addition & 1 deletion adapters/lark/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,6 @@
"@cordisjs/server": "^0.1.8"
},
"peerDependencies": {
"@satorijs/satori": "^3.6.1"
"@satorijs/satori": "^3.6.3"
}
}
2 changes: 1 addition & 1 deletion adapters/line/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,6 @@
"@cordisjs/server": "^0.1.8"
},
"peerDependencies": {
"@satorijs/satori": "^3.6.1"
"@satorijs/satori": "^3.6.3"
}
}
2 changes: 1 addition & 1 deletion adapters/mail/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
"chat"
],
"peerDependencies": {
"@satorijs/satori": "^3.6.1"
"@satorijs/satori": "^3.6.3"
},
"dependencies": {
"@types/mailparser": "^3.4.4",
Expand Down
2 changes: 1 addition & 1 deletion adapters/matrix/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
2 changes: 1 addition & 1 deletion adapters/qq/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
"chat"
],
"peerDependencies": {
"@satorijs/satori": "^3.6.1"
"@satorijs/satori": "^3.6.3"
},
"dependencies": {
"qface": "^1.4.1"
Expand Down
2 changes: 1 addition & 1 deletion adapters/satori/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,6 @@
"chat"
],
"peerDependencies": {
"@satorijs/satori": "^3.6.1"
"@satorijs/satori": "^3.6.3"
}
}
2 changes: 1 addition & 1 deletion adapters/slack/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion adapters/telegram/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion adapters/wechat-official/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
2 changes: 1 addition & 1 deletion adapters/wecom/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
2 changes: 1 addition & 1 deletion adapters/whatsapp/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,6 @@
"@cordisjs/server": "^0.1.8"
},
"peerDependencies": {
"@satorijs/satori": "^3.6.1"
"@satorijs/satori": "^3.6.3"
}
}
2 changes: 1 addition & 1 deletion adapters/zulip/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
"chat"
],
"peerDependencies": {
"@satorijs/satori": "^3.6.1"
"@satorijs/satori": "^3.6.3"
},
"dependencies": {
"marked": "^9.1.6"
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
}
6 changes: 3 additions & 3 deletions packages/core/package.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down Expand Up @@ -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"
}
Expand Down
12 changes: 7 additions & 5 deletions packages/core/src/bot.ts
Original file line number Diff line number Diff line change
@@ -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'
Expand All @@ -26,7 +28,7 @@ export abstract class Bot<C extends Context = Context, T = any> implements Login
public adapter?: Adapter<C, this>
public error?: Error
public callbacks: Dict<Function> = {}
public logger: Logger
public logger: cordis.Logger

// Same as `this.ctx`, but with a more specific type.
protected context: Context
Expand Down Expand Up @@ -158,17 +160,17 @@ export abstract class Bot<C extends Context = Context, T = any> 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)
}
Expand Down
7 changes: 1 addition & 6 deletions packages/core/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
}

Expand Down
4 changes: 2 additions & 2 deletions packages/satori/package.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down Expand Up @@ -36,7 +36,7 @@
"utilities"
],
"dependencies": {
"@satorijs/core": "3.6.1",
"@satorijs/core": "3.6.3",
"cosmokit": "^1.5.2"
}
}
2 changes: 1 addition & 1 deletion packages/server-proxy/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,6 @@
"@cordisjs/server": "^0.1.8"
},
"peerDependencies": {
"@satorijs/satori": "^3.6.1"
"@satorijs/satori": "^3.6.3"
}
}
2 changes: 1 addition & 1 deletion packages/server-satori/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,6 @@
"@cordisjs/server": "^0.1.8"
},
"peerDependencies": {
"@satorijs/satori": "^3.6.1"
"@satorijs/satori": "^3.6.3"
}
}
2 changes: 1 addition & 1 deletion packages/server-temp/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,6 @@
"@cordisjs/server": "^0.1.8"
},
"peerDependencies": {
"@satorijs/satori": "^3.6.1"
"@satorijs/satori": "^3.6.3"
}
}

0 comments on commit f65dfac

Please sign in to comment.