meta-json-schema 1.18.4-beta2 → 1.18.4-beta4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,5 +1,7 @@
1
- import bundle from './util/bundle.mjs';
2
- import { pkg, resolve } from './util/env.mjs';
1
+ import bundle from "./util/bundle.mjs";
2
+ import { pkg, resolve } from "./util/env.mjs";
3
+ import { writeToFileSync } from "./util/file.mjs";
4
+ import fs from "fs";
3
5
 
4
6
  (async () => {
5
7
  // 读取release配置
@@ -13,4 +15,15 @@ import { pkg, resolve } from './util/env.mjs';
13
15
  await bundle(source, target, optimization, true);
14
16
  }
15
17
  }
18
+
19
+ // 提取CHANGELOG
20
+ const changelogs = fs.readFileSync(resolve("CHANGELOG.md"), "utf8");
21
+ writeToFileSync(
22
+ resolve("CHANGELOG"),
23
+ changelogs
24
+ .split("---")
25
+ .map(log => log.trim())
26
+ .filter(log => log.startsWith(`## v${pkg.version}`))
27
+ .filter(Boolean)?.[0] ?? ""
28
+ );
16
29
  })();
@@ -7,9 +7,7 @@
7
7
  "definitions": {
8
8
  "meta-json-schema": { "$ref": "./meta-json-schema.json" },
9
9
  "proxies": { "$ref": "./modules/config/proxies.json" },
10
- "proxy-providers": { "$ref": "./modules/config/proxy-providers.json" },
11
10
  "proxy-groups": { "$ref": "./modules/config/proxy-groups.json" },
12
- "rule-providers": { "$ref": "./modules/rules/provider/provider.json" },
13
11
  "rules": { "$ref": "./modules/config/rules.json" }
14
12
  },
15
13
  "allOf": [
@@ -21,13 +19,6 @@
21
19
  "prepend-rules": { "title": "前置规则配置", "$ref": "#/definitions/rules" }
22
20
  }
23
21
  },
24
- {
25
- "type": "object",
26
- "title": "前置规则集合配置",
27
- "properties": {
28
- "prepend-rule-providers": { "title": "前置规则集合配置", "$ref": "#/definitions/rule-providers" }
29
- }
30
- },
31
22
  {
32
23
  "type": "object",
33
24
  "title": "前置代理节点配置",
@@ -35,13 +26,6 @@
35
26
  "prepend-proxies": { "title": "前置代理节点配置", "$ref": "#/definitions/proxies" }
36
27
  }
37
28
  },
38
- {
39
- "type": "object",
40
- "title": "前置代理集合配置",
41
- "properties": {
42
- "prepend-proxy-providers": { "title": "前置代理集合配置", "$ref": "#/definitions/proxy-providers" }
43
- }
44
- },
45
29
  {
46
30
  "type": "object",
47
31
  "title": "前置代理组配置",
@@ -56,13 +40,6 @@
56
40
  "append-rules": { "title": "后置规则配置", "$ref": "#/definitions/rules" }
57
41
  }
58
42
  },
59
- {
60
- "type": "object",
61
- "title": "后置规则集合配置",
62
- "properties": {
63
- "append-rule-providers": { "title": "后置规则集合配置", "$ref": "#/definitions/rule-providers" }
64
- }
65
- },
66
43
  {
67
44
  "type": "object",
68
45
  "title": "后置代理节点配置",
@@ -70,13 +47,6 @@
70
47
  "append-proxies": { "title": "后置代理节点配置", "$ref": "#/definitions/proxies" }
71
48
  }
72
49
  },
73
- {
74
- "type": "object",
75
- "title": "后置代理集合配置",
76
- "properties": {
77
- "append-proxy-providers": { "title": "后置代理集合配置", "$ref": "#/definitions/proxy-providers" }
78
- }
79
- },
80
50
  {
81
51
  "type": "object",
82
52
  "title": "后置代理组配置",
@@ -2,6 +2,7 @@
2
2
  "cipher": {
3
3
  "description": "加密方法",
4
4
  "enum": [
5
+ "none",
5
6
  "auto",
6
7
  "dummy",
7
8
  "aes-128-gcm",
@@ -8,20 +8,20 @@
8
8
  "enums": { "$ref": "../../../definitions/enums.json" },
9
9
  "base-option": {
10
10
  "type": "object",
11
- "title": "outbound基础配置",
11
+ "title": "出站基础配置",
12
12
  "properties": {
13
13
  "name": {
14
14
  "$ref": "#/definitions/compatible/string",
15
- "title": "outbound名称",
16
- "description": "outbound名称",
17
- "markdownDescription": "outbound名称"
15
+ "title": "出站名称",
16
+ "description": "出站名称",
17
+ "markdownDescription": "出站名称"
18
18
  },
19
19
  "type": {
20
20
  "enum": ["select", "url-test", "fallback", "load-balance", "relay"],
21
21
  "markdownEnumDescriptions": ["手动选择", "延迟选优", "故障转移", "负载均衡", "链式代理"],
22
- "title": "outbound类型",
23
- "description": "outbound类型",
24
- "markdownDescription": "outbound类型"
22
+ "title": "出站类型",
23
+ "description": "出站类型",
24
+ "markdownDescription": "出站类型"
25
25
  },
26
26
  "interface-name": {
27
27
  "$ref": "#/definitions/compatible/string",
@@ -39,7 +39,7 @@
39
39
  },
40
40
  "basic-option": {
41
41
  "type": "object",
42
- "title": "outbound基本配置",
42
+ "title": "出站基本配置",
43
43
  "properties": {
44
44
  "tfo": {
45
45
  "$ref": "#/definitions/compatible/boolean",
@@ -9,7 +9,7 @@
9
9
  "health-check": { "$ref": "../provider/health-check.json" }
10
10
  },
11
11
  "allOf": [
12
- { "title": "outbound基础配置", "required": ["name", "type"], "$ref": "#/definitions/base-option" },
12
+ { "title": "出站基础配置", "required": ["name", "type"], "$ref": "#/definitions/base-option" },
13
13
  {
14
14
  "allOf": [
15
15
  {
@@ -31,8 +31,8 @@
31
31
  "max-failed-times": {
32
32
  "type": "integer",
33
33
  "title": "最大失败次数",
34
- "description": "在timeout时间长度内,请求失败max-failed-times次,提前主动触发健康检查",
35
- "markdownDescription": "在`timeout`时间长度内,请求失败`max-failed-times`次,提前主动触发健康检查",
34
+ "description": "在timeout时间长度内,请求失败max-failed-times次,强制提前主动触发健康检查",
35
+ "markdownDescription": "在`timeout`时间长度内,请求失败`max-failed-times`次,强制提前主动触发健康检查",
36
36
  "default": 5
37
37
  },
38
38
  "disable-udp": {
@@ -35,10 +35,17 @@
35
35
  "default": 100
36
36
  },
37
37
  "use-hosts": {
38
+ "type": "boolean",
39
+ "title": "启用配置中的hosts配置",
40
+ "description": "启用配置中的hosts配置",
41
+ "markdownDescription": "启用配置中的`hosts`配置",
42
+ "default": true
43
+ },
44
+ "use-system-hosts": {
38
45
  "type": "boolean",
39
46
  "title": "查询系统hosts文件",
40
- "description": "查询系统hosts文件",
41
- "markdownDescription": "查询系统`hosts`文件",
47
+ "description": "优先级低于配置中的hosts配置",
48
+ "markdownDescription": "优先级低于配置中的`hosts`配置",
42
49
  "default": true
43
50
  },
44
51
  "nameserver": {
@@ -113,30 +120,30 @@
113
120
  "fake-ip-range": {
114
121
  "$ref": "#/definitions/patterns/ipCIDR",
115
122
  "title": "fake-ip的预留映射地址段",
116
- "description": "tun模式的网卡默认IP也使用此值作为参考",
117
- "markdownDescription": "tun模式的网卡默认IP也使用此值作为参考",
123
+ "description": "TUN模式的网卡默认IP也使用此值作为参考",
124
+ "markdownDescription": "TUN模式的网卡默认IP也使用此值作为参考",
118
125
  "default": "198.18.0.1/16"
119
126
  },
120
127
  "fake-ip-filter": {
121
128
  "$ref": "#/definitions/types/stringArray",
122
129
  "title": "fake-ip过滤",
123
- "description": "不使用fake-ip的地址范围",
124
- "markdownDescription": "不使用`fake-ip`的地址范围",
130
+ "description": "哪些域名不使用fake-ip",
131
+ "markdownDescription": "哪些域名不使用`fake-ip`",
125
132
  "default": ["dns.msftnsci.com", "www.msftnsci.com", "www.msftconnecttest.com"]
126
133
  },
127
134
  "default-nameserver": {
128
- "$ref": "#/definitions/types/serverArray",
135
+ "$ref": "#/definitions/types/stringArray",
129
136
  "title": "元域名解析服务器",
130
- "description": "解析nameserver,fallback以及其他DNS服务器配置的DNS服务器(只能使用纯IP地址,支持加密DNS)",
131
- "markdownDescription": "解析`nameserver`,`fallback`以及其他DNS服务器配置的DNS服务器(只能使用纯IP地址,支持加密DNS)",
137
+ "description": "解析nameserver,fallback以及其他DNS服务器配置的DNS服务器(只能使用纯IP地址,支持UDP,TCP,DoT,DoH,DoQ)",
138
+ "markdownDescription": "解析`nameserver`,`fallback`以及其他DNS服务器配置的DNS服务器(只能使用纯IP地址,支持`UDP`,`TCP`,`DoT`,`DoH`,`DoQ`)",
132
139
  "default": ["114.114.114.114", "223.5.5.5", "8.8.8.8", "1.0.0.1"]
133
140
  },
134
141
  "cache-algorithm": {
135
142
  "enum": ["lru", "arc"],
136
143
  "markdownEnumDescriptions": ["最近最少使用", "自适应替换缓存"],
137
144
  "title": "缓存算法",
138
- "description": "lru: Least Recently Used, arc: Adaptive Replacement Cache",
139
- "markdownDescription": "`lru`: Least Recently Used, `arc`: Adaptive Replacement Cache",
145
+ "description": "缓存算法",
146
+ "markdownDescription": "缓存算法",
140
147
  "default": "lru"
141
148
  },
142
149
  "nameserver-policy": {
@@ -132,7 +132,7 @@
132
132
  "title": "全局UA",
133
133
  "description": "下载外部资源(proxy-provider、rule-provider、Geo等)时使用",
134
134
  "markdownDescription": "下载外部资源(proxy-provider、rule-provider、Geo等)时使用",
135
- "default": "clash.meta/version"
135
+ "default": "clash.meta"
136
136
  }
137
137
  }
138
138
  }
@@ -57,8 +57,8 @@
57
57
  },
58
58
  {
59
59
  "type": "object",
60
- "title": "tun配置",
61
- "properties": { "type": { "title": "tun配置", "const": "tun" } },
60
+ "title": "TUN配置",
61
+ "properties": { "type": { "title": "TUN配置", "const": "tun" } },
62
62
  "$ref": "#/definitions/tun"
63
63
  },
64
64
  {
@@ -43,8 +43,8 @@
43
43
  "auto-route": {
44
44
  "type": "boolean",
45
45
  "title": "自动设置全局路由",
46
- "description": "可以自动将全局流量路由进入tun网卡",
47
- "markdownDescription": "可以自动将全局流量路由进入`tun`网卡",
46
+ "description": "可以自动将全局流量路由进入TUN网卡",
47
+ "markdownDescription": "可以自动将全局流量路由进入`TUN`网卡",
48
48
  "default": true
49
49
  },
50
50
  "auto-detect-interface": {
@@ -15,9 +15,9 @@
15
15
  "properties": {
16
16
  "device": {
17
17
  "type": "string",
18
- "title": "指定tun网卡名称",
19
- "description": "指定tun网卡名称(macOS强制为utun)",
20
- "markdownDescription": "指定tun网卡名称(macOS强制为`utun`)"
18
+ "title": "指定TUN网卡名称",
19
+ "description": "指定TUN网卡名称(macOS强制为utun)",
20
+ "markdownDescription": "指定TUN网卡名称(macOS强制为`utun`)"
21
21
  },
22
22
  "stack": {
23
23
  "type": "string",
@@ -43,7 +43,7 @@
43
43
  "type": "boolean",
44
44
  "title": "自动设置全局路由",
45
45
  "description": "可以自动将全局流量路由进入tun网卡",
46
- "markdownDescription": "可以自动将全局流量路由进入`tun`网卡",
46
+ "markdownDescription": "可以自动将全局流量路由进入`TUN`网卡",
47
47
  "default": true
48
48
  },
49
49
  "auto-detect-interface": {