|
|
@ -5,6 +5,7 @@ import _ from 'lodash';
|
|
|
|
import moment from 'moment-timezone';
|
|
|
|
import moment from 'moment-timezone';
|
|
|
|
import Schema from 'schemastery';
|
|
|
|
import Schema from 'schemastery';
|
|
|
|
import superagent from 'superagent';
|
|
|
|
import superagent from 'superagent';
|
|
|
|
|
|
|
|
import { Context } from './context';
|
|
|
|
import db from './service/db';
|
|
|
|
import db from './service/db';
|
|
|
|
export { ObjectID, ObjectId, FilterQuery } from 'mongodb';
|
|
|
|
export { ObjectID, ObjectId, FilterQuery } from 'mongodb';
|
|
|
|
export * from './utils';
|
|
|
|
export * from './utils';
|
|
|
@ -55,3 +56,9 @@ export { EventMap } from './service/bus';
|
|
|
|
export {
|
|
|
|
export {
|
|
|
|
db, Schema, yaml, fs, AdmZip, superagent, _, moment,
|
|
|
|
db, Schema, yaml, fs, AdmZip, superagent, _, moment,
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
export const definePlugin = <T = never>(args: {
|
|
|
|
|
|
|
|
using?: keyof Context[];
|
|
|
|
|
|
|
|
apply: (ctx: Context, config: T) => Promise<void> | void;
|
|
|
|
|
|
|
|
schema?: Schema<T>;
|
|
|
|
|
|
|
|
name?: string;
|
|
|
|
|
|
|
|
}) => args;
|
|
|
|