From 18387b6fe2b7e07f640f2959ca61d44405503697 Mon Sep 17 00:00:00 2001 From: Virgil Clyne Date: Tue, 22 Oct 2024 10:36:19 +0800 Subject: [PATCH] =?UTF-8?q?feat(modkit-shared)!:=20=E5=85=81=E8=AE=B8?= =?UTF-8?q?=E9=A2=9D=E5=A4=96=E9=85=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Update metadata.ts Update script.ts --- packages/modkit/shared/src/types/source/metadata.ts | 8 +++----- packages/modkit/shared/src/types/source/script.ts | 4 ++++ 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/packages/modkit/shared/src/types/source/metadata.ts b/packages/modkit/shared/src/types/source/metadata.ts index 2eb45b3..4125d13 100644 --- a/packages/modkit/shared/src/types/source/metadata.ts +++ b/packages/modkit/shared/src/types/source/metadata.ts @@ -3,12 +3,12 @@ export interface ModuleMetadata { * 模块名称 * @default 读取 package.json 中的 displayName */ - name?: string; + name: string; /** * 模块描述 * @default 读取 package.json 中的 description */ - description?: string; + description: string; /** * 版本号 * @default 默认读取 package.json 中的 version @@ -21,7 +21,5 @@ export interface ModuleMetadata { /** * 额外的配置 */ - extra?: { - [key: string]: string | string[]; - }; + [key: string]: string | string[] | number | boolean | undefined; } diff --git a/packages/modkit/shared/src/types/source/script.ts b/packages/modkit/shared/src/types/source/script.ts index 26714c6..ef4d26b 100644 --- a/packages/modkit/shared/src/types/source/script.ts +++ b/packages/modkit/shared/src/types/source/script.ts @@ -57,4 +57,8 @@ export interface ModuleScript { * @default dev 环境下为 true,其他环境下为 false */ debug?: boolean; + /** + * 额外的配置 + */ + [key: string]: string | number | boolean | undefined; }