Skip to content

Commit 51e6856

Browse files
docs: 配置文件 1.2 草案文档
1 parent 75a5dbf commit 51e6856

File tree

3 files changed

+102
-1
lines changed

3 files changed

+102
-1
lines changed

docs/config/1.1/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
## 描述
88
这是 Sundry 的配置文件 (`~/DuckStudio/Sundry/config.json`) 的 1.1 版本。**有关配置文件的详细说明,请参见 jsonc 中的注释。**
99

10-
此版本的配置文件适用 Sundry 1.4.2 及后续版本
10+
此版本的配置文件适用 Sundry 1.4.2 - Sundry 1.4.3
1111

1212
### 与 1.0 版本的区别
1313
> [!WARNING]

docs/config/1.2/README.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# Sundry 配置文件 版本 1.2
2+
3+
| jsonc | json schema |
4+
|-----|-----|
5+
| [config.jsonc](config.jsonc) | [1.2.json](https://github.com/DuckDuckStudio/yazicbs.github.io/blob/main/Tools/Sundry/config/schema/1.2.json) |
6+
7+
## 描述
8+
这是 Sundry 的配置文件 (`~/DuckStudio/Sundry/config.json`) 的 1.2 版本。**有关配置文件的详细说明,请参见 jsonc 中的注释。**
9+
10+
此版本的配置文件适用 Sundry 1.5.x 版本。
11+
12+
### 与 1.1 版本的区别
13+
14+
1.2 版本的配置文件添加了几个可选配置:
15+
16+
| 配置项 | 作用 | 默认值 |
17+
|-----|-----|-----|
18+
| `debug` | 调试模式开关,打开后会输出一些调试信息,除非需要不建议打开 | `false` (bool) |
19+
| `cache.*` | 缓存开关,用于控制是否自动缓存某些内容 | / |
20+
| `cache.validate.schema` | 控制是否缓存验证清单时使用的 yaml schema | `true` (bool) |

docs/config/1.2/config.jsonc

Lines changed: 81 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,81 @@
1+
// Sundry config.json 版本 1.2 示例
2+
// 相关配置项的 key 必须使用小写
3+
4+
{
5+
"$schema": "https://duckduckstudio.github.io/yazicbs.github.io/Tools/Sundry/config/schema/1.1.json",
6+
7+
// 配置文件的版本
8+
// develop: DuckDuckStudio/Sundry main 分支最新提交的版本
9+
"version": "1.2", // str
10+
11+
// 调试模式开关
12+
"debug": false, // bool
13+
14+
"paths": {
15+
// 您的 winget-pkgs 本地仓库路径
16+
"winget-pkgs": "", // str
17+
18+
// 您的 winget-tools 本地仓库路径
19+
"winget-tools": "" // str
20+
},
21+
22+
"repos": {
23+
// 您的 winget-pkgs 仓库
24+
"winget-pkgs": "", // str, owner/repo
25+
26+
// 您的 winget-tools 仓库
27+
"winget-tools": "" // str, owner/repo
28+
},
29+
30+
"git": {
31+
// 是否对提交签名
32+
"signature": false // bool
33+
},
34+
35+
"github": {
36+
"pr": {
37+
// 是否允许维护者修改您的 PR 内容
38+
"maintainer_can_modify": false // bool
39+
}
40+
},
41+
42+
"tools": {
43+
"verify": {
44+
// 暂未实现
45+
// verify 时验证清单中的 URL 是否有效 (#68)
46+
"check_url": false, // bool
47+
48+
// 暂未实现
49+
// 在非干净的 Windows 上验证时显示警告 (#99)
50+
// TODO: 这个配置会不会太长了?
51+
"show_warning_on_non-clean_windows": false // bool
52+
},
53+
"prune": {
54+
"remote": {
55+
// 暂未实现
56+
// prune 时清理远程中已合并的 PR 的分支 (#98)
57+
"prune_merged_branches": false, // bool
58+
59+
// 暂未实现
60+
// prune 时清理远程中已关闭的 PR 的分支 (#98)
61+
"prune_closed_branches": false // bool
62+
}
63+
}
64+
},
65+
66+
// 缓存开关
67+
"cache": {
68+
"validate": {
69+
// 是否缓存验证清单时使用的 yaml schema
70+
"schema": true // bool
71+
}
72+
},
73+
74+
// ================= 待定 / 其他分支兼容 =================
75+
76+
"i18n": {
77+
// 仅 Sundry-Locale i18n 分支
78+
// Sundry 运行时使用的语言
79+
"lang": "zh-cn" // zh-cn | en-us - 全小写
80+
}
81+
}

0 commit comments

Comments
 (0)