Commit dfebc4c9 authored by nanahira's avatar nanahira

catchup

parent 87c26576
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
"dependencies": { "dependencies": {
"reflect-metadata": "^0.1.13", "reflect-metadata": "^0.1.13",
"schemastery": "^1.0.0", "schemastery": "^1.0.0",
"schemastery-gen": "^1.0.1", "schemastery-gen": "^1.0.2",
"typed-reflector": "^1.0.5" "typed-reflector": "^1.0.5"
}, },
"devDependencies": { "devDependencies": {
...@@ -2729,9 +2729,9 @@ ...@@ -2729,9 +2729,9 @@
"integrity": "sha512-TwjfFcstdU1rSkV9/dATEk8YFLa1OOxCuGT2mMepZxpMAATQdVm7Fw2tRr4tEsrqAitP+X1/8P5Vv51OUBClAw==" "integrity": "sha512-TwjfFcstdU1rSkV9/dATEk8YFLa1OOxCuGT2mMepZxpMAATQdVm7Fw2tRr4tEsrqAitP+X1/8P5Vv51OUBClAw=="
}, },
"node_modules/schemastery-gen": { "node_modules/schemastery-gen": {
"version": "1.0.1", "version": "1.0.2",
"resolved": "https://registry.npmjs.org/schemastery-gen/-/schemastery-gen-1.0.1.tgz", "resolved": "https://registry.npmjs.org/schemastery-gen/-/schemastery-gen-1.0.2.tgz",
"integrity": "sha512-eArpoM3kSft6Dsx5IIrwUwdyI563WHnar4s7wspWofwTNx2FA6ZDqVcFD1DjCvJUorgTc7f+OMAJRFkNuWNNSg==", "integrity": "sha512-n7JHMWpQbAxh/xFY3Ns7c2TpZEVIV88dt1A3LE/UvFPSH13bowerKpz+OAtNVuSITnisMekGMV6T480H/sYGTw==",
"dependencies": { "dependencies": {
"lodash": "^4.17.21", "lodash": "^4.17.21",
"reflect-metadata": "^0.1.13", "reflect-metadata": "^0.1.13",
...@@ -5294,9 +5294,9 @@ ...@@ -5294,9 +5294,9 @@
"integrity": "sha512-TwjfFcstdU1rSkV9/dATEk8YFLa1OOxCuGT2mMepZxpMAATQdVm7Fw2tRr4tEsrqAitP+X1/8P5Vv51OUBClAw==" "integrity": "sha512-TwjfFcstdU1rSkV9/dATEk8YFLa1OOxCuGT2mMepZxpMAATQdVm7Fw2tRr4tEsrqAitP+X1/8P5Vv51OUBClAw=="
}, },
"schemastery-gen": { "schemastery-gen": {
"version": "1.0.1", "version": "1.0.2",
"resolved": "https://registry.npmjs.org/schemastery-gen/-/schemastery-gen-1.0.1.tgz", "resolved": "https://registry.npmjs.org/schemastery-gen/-/schemastery-gen-1.0.2.tgz",
"integrity": "sha512-eArpoM3kSft6Dsx5IIrwUwdyI563WHnar4s7wspWofwTNx2FA6ZDqVcFD1DjCvJUorgTc7f+OMAJRFkNuWNNSg==", "integrity": "sha512-n7JHMWpQbAxh/xFY3Ns7c2TpZEVIV88dt1A3LE/UvFPSH13bowerKpz+OAtNVuSITnisMekGMV6T480H/sYGTw==",
"requires": { "requires": {
"lodash": "^4.17.21", "lodash": "^4.17.21",
"reflect-metadata": "^0.1.13", "reflect-metadata": "^0.1.13",
......
...@@ -46,7 +46,7 @@ ...@@ -46,7 +46,7 @@
"dependencies": { "dependencies": {
"reflect-metadata": "^0.1.13", "reflect-metadata": "^0.1.13",
"schemastery": "^1.0.0", "schemastery": "^1.0.0",
"schemastery-gen": "^1.0.1", "schemastery-gen": "^1.0.2",
"typed-reflector": "^1.0.5" "typed-reflector": "^1.0.5"
} }
} }
...@@ -17,7 +17,7 @@ import { ...@@ -17,7 +17,7 @@ import {
} from './def'; } from './def';
import { reflector } from './meta/meta-fetch'; import { reflector } from './meta/meta-fetch';
import { applySelector } from './utility/utility'; import { applySelector } from './utility/utility';
import { RegisterSchema } from 'schemastery-gen'; import { ClassType, RegisterSchema } from 'schemastery-gen';
export interface KoishiPluginRegistrationOptions<T = any> { export interface KoishiPluginRegistrationOptions<T = any> {
name?: string; name?: string;
...@@ -59,7 +59,7 @@ export function KoishiPlugin<T = any>( ...@@ -59,7 +59,7 @@ export function KoishiPlugin<T = any>(
const newClass = class extends originalClass implements PluginClass { const newClass = class extends originalClass implements PluginClass {
static schema = (options.schema as Schema).type static schema = (options.schema as Schema).type
? options.schema ? options.schema
: RegisterSchema()(options.schema); : RegisterSchema()(options.schema as ClassType<T>);
__ctx: Context; __ctx: Context;
__config: T; __config: T;
__pluginOptions: KoishiPluginRegistrationOptions<T>; __pluginOptions: KoishiPluginRegistrationOptions<T>;
......
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