Skip to content

Commit 6703c8d

Browse files
committed
fix: 更正部分类型
1 parent ded6364 commit 6703c8d

File tree

2 files changed

+27
-25
lines changed

2 files changed

+27
-25
lines changed

README.md

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -33,45 +33,45 @@
3333

3434
#### 必填字段
3535

36-
| 字段名 | 类型 | 描述 | 示例 |
37-
| ----------- | ------ | ------------------------------ | ----------------------- |
38-
| name | string | 插件包名 | "karin-plugin-basic" |
39-
| type | string | 插件类型 | "npm" \| "git" \| "app" |
40-
| description | string | 插件描述(限制50字符) | "karin plugin basic" |
41-
| time | string | 发布时间 (YYYY-MM-DD HH:mm:ss) | "2025-01-19 10:00:00" |
42-
| license | object | 开源协议信息 | 见下方示例 |
36+
| 字段名 | 类型 | 描述 | 示例 |
37+
| ----------- | ------ | ------------------------------ | ------------------------ |
38+
| name | string | 插件包名 | "karin-plugin-basic" |
39+
| type | string | 插件类型 | "npm" \| "git" \| "app" |
40+
| description | string | 插件描述(限制50字符) | "karin plugin basic" |
41+
| time | string | 发布时间 (YYYY-MM-DD HH:mm:ss) | "2025-01-19 10:00:00" |
42+
| license | object | 开源协议信息 | 见下方示例 |
4343
| home | string | 插件主页 | https://github.com/sj817 |
4444

4545
#### 许可证信息 (license)
4646

47-
| 字段名 | 类型 | 描述 | 示例 |
48-
| ------ | ------ | ---------- | ----------------------------------------------------------------- |
49-
| name | string | 许可证名称 | "MIT" |
47+
| 字段名 | 类型 | 描述 | 示例 |
48+
| ------ | ------ | ---------- | --------------------------------------------------------------- |
49+
| name | string | 许可证名称 | "MIT" |
5050
| url | string | 许可证地址 | https://github.com/karinjs/karin-plugin-basic/blob/main/LICENSE |
5151

5252
#### 作者信息 (author)
5353

5454
作者信息是一个数组,支持多个作者:
5555

56-
| 字段名 | 类型 | 描述 | 示例 |
57-
| ------ | ------ | -------- | -------------------------- |
58-
| name | string | 作者名称 | shijin |
56+
| 字段名 | 类型 | 描述 | 示例 |
57+
| ------ | ------ | -------- | ------------------------ |
58+
| name | string | 作者名称 | shijin |
5959
| home | string | 作者主页 | https://github.com/sj817 |
6060

6161
#### 仓库信息 (repo)
6262

6363
仓库信息是一个数组,支持多个仓库:
6464

65-
| 字段名 | 类型 | 描述 | 示例 |
66-
| ------ | ------ | ---------------------------------------------------------------- | ----------------------------------------------- |
67-
| type | string | 仓库类型 ("github" \| "gitee" \| "gitcode" \| "gitlab" \| "npm") | "github" |
65+
| 字段名 | 类型 | 描述 | 示例 |
66+
| ------ | ------ | ---------------------------------------------------------------- | --------------------------------------------- |
67+
| type | string | 仓库类型 ("github" \| "gitee" \| "gitcode" \| "gitlab" \| "npm") | "github" |
6868
| url | string | 仓库地址 | https://github.com/karinjs/karin-plugin-basic |
69-
| branch | string | 默认分支(npm类型为空字符串) | "main" |
69+
| branch | string | 默认分支(npm类型为空字符串) | "main" |
7070

7171
#### 主页信息 (home)
7272

73-
| 字段名 | 类型 | 描述 | 示例 |
74-
| ------ | ------ | -------- | -------------------------- |
73+
| 字段名 | 类型 | 描述 | 示例 |
74+
| ------ | ------ | -------- | ------------------------ |
7575
| home | string | 主页地址 | https://github.com/sj817 |
7676

7777
### 插件类型说明

types.ts

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/**
2-
* 基类
2+
* 插件基础类型
33
*/
4-
interface Base {
4+
export interface KarinPluginBase {
55
/** 插件包名 */
66
name: string
77
/**
@@ -30,6 +30,8 @@
3030
name: string
3131
/** 主页 */
3232
home: string
33+
/** 头像 仅支持url 如果是github、gitee无需填写 */
34+
avatar?: string
3335
}[]
3436
/** 插件仓库 */
3537
repo: {
@@ -45,21 +47,21 @@
4547
/**
4648
* npm 插件类型
4749
*/
48-
interface Npm extends Base {
50+
export interface KarinNpmPlugin extends KarinPluginBase {
4951
type: 'npm'
5052
}
5153

5254
/**
5355
* git 插件类型
5456
*/
55-
interface Git extends Base {
57+
export interface KarinGitPlugin extends KarinPluginBase {
5658
type: 'git'
5759
}
5860

5961
/**
6062
* 单应用插件类型
6163
*/
62-
interface App extends Base {
64+
export interface KarinAppPlugin extends KarinPluginBase {
6365
type: 'app'
6466
/** app文件直链 */
6567
files: {
@@ -75,4 +77,4 @@
7577
/**
7678
* 插件市场类型每个插件的类型
7779
*/
78-
export type MarketType = Npm | Git | App
80+
export type KarinPluginType = KarinNpmPlugin | KarinGitPlugin | KarinAppPlugin

0 commit comments

Comments
 (0)