@satorijs/core
Advanced tools
Comparing version 4.1.0 to 4.1.1
@@ -212,3 +212,2 @@ import { Context, Logger, z, Service } from 'cordis'; | ||
namespace HTTP { | ||
const Config: z<Config>; | ||
function createConfig(this: typeof HTTP, endpoint?: string | boolean): z<Config>; | ||
@@ -224,5 +223,2 @@ } | ||
export type GetSession<C extends Context> = C[typeof Context.session]; | ||
type CordisEvents<C extends Context> = import('cordis').Events<C>; | ||
export interface Events<C extends Context = Context> extends CordisEvents<C> { | ||
} | ||
declare class SatoriContext extends Context { | ||
@@ -229,0 +225,0 @@ constructor(config?: any); |
{ | ||
"name": "@satorijs/core", | ||
"description": "Core components of Satorijs", | ||
"version": "4.1.0", | ||
"version": "4.1.1", | ||
"type": "module", | ||
@@ -59,11 +59,11 @@ "main": "lib/index.cjs", | ||
"peerDependencies": { | ||
"cordis": "^3.15.3" | ||
"cordis": "^3.16.1" | ||
}, | ||
"dependencies": { | ||
"@cordisjs/plugin-http": "^0.5.1", | ||
"@cordisjs/plugin-http": "^0.5.2", | ||
"@satorijs/element": "^3.1.7", | ||
"@satorijs/protocol": "^1.4.0", | ||
"cordis": "^3.15.3", | ||
"cordis": "^3.16.1", | ||
"cosmokit": "^1.6.2" | ||
} | ||
} |
import { Context, Logger, Service, z } from 'cordis' | ||
import { Awaitable, defineProperty, Dict, makeArray, remove } from 'cosmokit' | ||
import { Awaitable, Dict, makeArray, remove } from 'cosmokit' | ||
import { Bot } from './bot' | ||
@@ -81,3 +81,2 @@ import { Session } from './session' | ||
namespace HTTP { | ||
export const Config: z<Config> | ||
export function createConfig(this: typeof HTTP, endpoint?: string | boolean): z<Config> | ||
@@ -87,8 +86,2 @@ } | ||
defineProperty(HTTP, 'Config', z.object({ | ||
timeout: z.natural().role('ms').description('等待连接建立的最长时间。'), | ||
proxyAgent: z.string().description('使用的代理服务器地址。'), | ||
keepAlive: z.boolean().description('是否保持连接。'), | ||
}).description('请求设置')) | ||
HTTP.createConfig = function createConfig(this, endpoint) { | ||
@@ -114,7 +107,2 @@ return z.object({ | ||
type CordisEvents<C extends Context> = import('cordis').Events<C> | ||
// FIXME remove in the future | ||
export interface Events<C extends Context = Context> extends CordisEvents<C> {} | ||
class SatoriContext extends Context { | ||
@@ -121,0 +109,0 @@ constructor(config?: any) { |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
113770
2385
Updated@cordisjs/plugin-http@^0.5.2
Updatedcordis@^3.16.1