Commit 14768a06 authored by nanahira's avatar nanahira

catchup & allow another partial config type

parent 0a39d141
...@@ -38,7 +38,7 @@ ...@@ -38,7 +38,7 @@
"ws": "^8.2.3" "ws": "^8.2.3"
}, },
"peerDependencies": { "peerDependencies": {
"koishi": "^4.2.1" "koishi": "^4.2.2"
} }
}, },
"node_modules/@babel/code-frame": { "node_modules/@babel/code-frame": {
...@@ -1027,12 +1027,12 @@ ...@@ -1027,12 +1027,12 @@
} }
}, },
"node_modules/@koishijs/core": { "node_modules/@koishijs/core": {
"version": "4.2.1", "version": "4.2.2",
"resolved": "https://registry.npmjs.org/@koishijs/core/-/core-4.2.1.tgz", "resolved": "https://registry.npmjs.org/@koishijs/core/-/core-4.2.2.tgz",
"integrity": "sha512-ZbFquhAP+IPzRp6qHmiMJdkhqR2ai90ROqRiZZijfDliwlsHwsavYx22b+H9eUthCYBbMBjjGjxtdzX5tdpWVg==", "integrity": "sha512-gV62kYVPzXLc8xyzlj3jNhNLvLvqBDcrMEBdtK+xoy/RcvqL6Q2AOXxKmEyNYCbdgCiE7vCcxt9pYLrXmLaiyg==",
"peer": true, "peer": true,
"dependencies": { "dependencies": {
"@koishijs/utils": "^5.0.1", "@koishijs/utils": "^5.1.0",
"fastest-levenshtein": "^1.0.12", "fastest-levenshtein": "^1.0.12",
"schemastery": "^2.4.2" "schemastery": "^2.4.2"
}, },
...@@ -1053,12 +1053,19 @@ ...@@ -1053,12 +1053,19 @@
"koishi": "^4.0.0-rc.0" "koishi": "^4.0.0-rc.0"
} }
}, },
"node_modules/@koishijs/segment": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/@koishijs/segment/-/segment-1.0.0.tgz",
"integrity": "sha512-a+3L3pH+/AtbT1sxrWfweSD4Br768xiEXTMLo9WGABx0t2doR6VVfWqPidPbY7rks8s2RT7x5A13Qzcfe8AveA==",
"peer": true
},
"node_modules/@koishijs/utils": { "node_modules/@koishijs/utils": {
"version": "5.0.1", "version": "5.1.0",
"resolved": "https://registry.npmjs.org/@koishijs/utils/-/utils-5.0.1.tgz", "resolved": "https://registry.npmjs.org/@koishijs/utils/-/utils-5.1.0.tgz",
"integrity": "sha512-usWsR//YsvepI65+KN7ma2sxYF8Nlq5V88BbJS0X8l2+E/NEetSKYJqtwUX2TgtDW+tHxbje0IoHVccJMDRmyg==", "integrity": "sha512-4iDy70gCT15GZ0sg7nw0HMYmpjbPaKQr7U+t9TZHcsb9Gr9pg2u2SP+W7uxwkzaUZpsyBpaj68C3zL/g8yo+0A==",
"peer": true, "peer": true,
"dependencies": { "dependencies": {
"@koishijs/segment": "^1.0.0",
"supports-color": "^8.1.0" "supports-color": "^8.1.0"
} }
}, },
...@@ -4730,14 +4737,14 @@ ...@@ -4730,14 +4737,14 @@
} }
}, },
"node_modules/koishi": { "node_modules/koishi": {
"version": "4.2.1", "version": "4.2.2",
"resolved": "https://registry.npmjs.org/koishi/-/koishi-4.2.1.tgz", "resolved": "https://registry.npmjs.org/koishi/-/koishi-4.2.2.tgz",
"integrity": "sha512-E68YfIMUnL05gIX7KXsyj2IXSCu+QKyOaANbyHAy0t+FO0o7CepsFxRP4BHTtcX/KwoELLOu670KT5DMQvb2nw==", "integrity": "sha512-7++UGlx76Ae4OSyX14VrWR1J+m7JxZyspdEcBuF86LBZKl53eMe0i38DehpuYGMiUO3NCLuDZXc1xjRQgld0DA==",
"peer": true, "peer": true,
"dependencies": { "dependencies": {
"@koa/router": "^10.1.1", "@koa/router": "^10.1.1",
"@koishijs/core": "^4.2.1", "@koishijs/core": "^4.2.2",
"@koishijs/utils": "^5.0.1", "@koishijs/utils": "^5.1.0",
"@types/koa": "*", "@types/koa": "*",
"@types/koa__router": "*", "@types/koa__router": "*",
"@types/ws": "^8.2.2", "@types/ws": "^8.2.2",
...@@ -7552,12 +7559,12 @@ ...@@ -7552,12 +7559,12 @@
} }
}, },
"@koishijs/core": { "@koishijs/core": {
"version": "4.2.1", "version": "4.2.2",
"resolved": "https://registry.npmjs.org/@koishijs/core/-/core-4.2.1.tgz", "resolved": "https://registry.npmjs.org/@koishijs/core/-/core-4.2.2.tgz",
"integrity": "sha512-ZbFquhAP+IPzRp6qHmiMJdkhqR2ai90ROqRiZZijfDliwlsHwsavYx22b+H9eUthCYBbMBjjGjxtdzX5tdpWVg==", "integrity": "sha512-gV62kYVPzXLc8xyzlj3jNhNLvLvqBDcrMEBdtK+xoy/RcvqL6Q2AOXxKmEyNYCbdgCiE7vCcxt9pYLrXmLaiyg==",
"peer": true, "peer": true,
"requires": { "requires": {
"@koishijs/utils": "^5.0.1", "@koishijs/utils": "^5.1.0",
"fastest-levenshtein": "^1.0.12", "fastest-levenshtein": "^1.0.12",
"schemastery": "^2.4.2" "schemastery": "^2.4.2"
} }
...@@ -7572,12 +7579,19 @@ ...@@ -7572,12 +7579,19 @@
"ws": "^8.2.1" "ws": "^8.2.1"
} }
}, },
"@koishijs/segment": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/@koishijs/segment/-/segment-1.0.0.tgz",
"integrity": "sha512-a+3L3pH+/AtbT1sxrWfweSD4Br768xiEXTMLo9WGABx0t2doR6VVfWqPidPbY7rks8s2RT7x5A13Qzcfe8AveA==",
"peer": true
},
"@koishijs/utils": { "@koishijs/utils": {
"version": "5.0.1", "version": "5.1.0",
"resolved": "https://registry.npmjs.org/@koishijs/utils/-/utils-5.0.1.tgz", "resolved": "https://registry.npmjs.org/@koishijs/utils/-/utils-5.1.0.tgz",
"integrity": "sha512-usWsR//YsvepI65+KN7ma2sxYF8Nlq5V88BbJS0X8l2+E/NEetSKYJqtwUX2TgtDW+tHxbje0IoHVccJMDRmyg==", "integrity": "sha512-4iDy70gCT15GZ0sg7nw0HMYmpjbPaKQr7U+t9TZHcsb9Gr9pg2u2SP+W7uxwkzaUZpsyBpaj68C3zL/g8yo+0A==",
"peer": true, "peer": true,
"requires": { "requires": {
"@koishijs/segment": "^1.0.0",
"supports-color": "^8.1.0" "supports-color": "^8.1.0"
}, },
"dependencies": { "dependencies": {
...@@ -10401,14 +10415,14 @@ ...@@ -10401,14 +10415,14 @@
} }
}, },
"koishi": { "koishi": {
"version": "4.2.1", "version": "4.2.2",
"resolved": "https://registry.npmjs.org/koishi/-/koishi-4.2.1.tgz", "resolved": "https://registry.npmjs.org/koishi/-/koishi-4.2.2.tgz",
"integrity": "sha512-E68YfIMUnL05gIX7KXsyj2IXSCu+QKyOaANbyHAy0t+FO0o7CepsFxRP4BHTtcX/KwoELLOu670KT5DMQvb2nw==", "integrity": "sha512-7++UGlx76Ae4OSyX14VrWR1J+m7JxZyspdEcBuF86LBZKl53eMe0i38DehpuYGMiUO3NCLuDZXc1xjRQgld0DA==",
"peer": true, "peer": true,
"requires": { "requires": {
"@koa/router": "^10.1.1", "@koa/router": "^10.1.1",
"@koishijs/core": "^4.2.1", "@koishijs/core": "^4.2.2",
"@koishijs/utils": "^5.0.1", "@koishijs/utils": "^5.1.0",
"@types/koa": "*", "@types/koa": "*",
"@types/koa__router": "*", "@types/koa__router": "*",
"@types/ws": "^8.2.2", "@types/ws": "^8.2.2",
......
...@@ -75,6 +75,6 @@ ...@@ -75,6 +75,6 @@
"testEnvironment": "node" "testEnvironment": "node"
}, },
"peerDependencies": { "peerDependencies": {
"koishi": "^4.2.1" "koishi": "^4.2.2"
} }
} }
import { Context } from 'koishi'; import { Context } from 'koishi';
import { InjectConfig } from './decorators'; import { InjectConfig } from './decorators';
export class BasePlugin<C> { export class BasePlugin<C, PC = Partial<C>> {
constructor(protected ctx: Context, config: Partial<C>) {} constructor(protected ctx: Context, config: PC) {}
@InjectConfig() @InjectConfig()
protected config: C; protected config: C;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment