From fc5b8c802dbffc2ea1ab2cdbbf26e18727c8d378 Mon Sep 17 00:00:00 2001 From: snowgitea Date: Wed, 1 Jul 2026 17:56:57 +0800 Subject: [PATCH] chore: src/modules/plugin/config.ts --- src/modules/plugin/config.ts | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 src/modules/plugin/config.ts diff --git a/src/modules/plugin/config.ts b/src/modules/plugin/config.ts new file mode 100644 index 0000000..74aa56b --- /dev/null +++ b/src/modules/plugin/config.ts @@ -0,0 +1,27 @@ +import { ModuleConfig } from '@cool-midway/core'; + +/** + * 模块配置 + */ +export default options => { + return { + // 模块名称 + name: '插件模块', + // 模块描述 + description: '插件查看、安装、卸载、配置等', + // 中间件,只对本模块有效 + middlewares: [], + // 中间件,全局有效 + globalMiddlewares: [], + // 模块加载顺序,默认为0,值越大越优先加载 + order: 0, + // 基础插件配置 + hooks: { + // 文件上传 + upload: { + // 地址前缀 + domain: `http://127.0.0.1:${options?.app?.getConfig('koa.port')}`, + }, + }, + } as ModuleConfig; +};