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.
@@ -0,0 +1,44 @@
1
+ name: Release On Tag
2
+
3
+ on:
4
+ push:
5
+ tags:
6
+ - "v*.*.*"
7
+
8
+ jobs:
9
+ bundle_on_commit:
10
+ runs-on: ubuntu-latest
11
+ steps:
12
+ - name: Checkout Repository
13
+ uses: actions/checkout@v4
14
+
15
+ - uses: actions/checkout@v4
16
+ - name: Configure Git Credentials
17
+ run: |
18
+ git config user.name github-actions[bot]
19
+ git config user.email 41898282+github-actions[bot]@users.noreply.github.com
20
+
21
+ - name: Install Node
22
+ uses: actions/setup-node@v4
23
+ with:
24
+ node-version: "20"
25
+
26
+ - name: Bundle
27
+ run: npm install && npm run release
28
+
29
+ - name: Release
30
+ uses: softprops/action-gh-release@v2
31
+ env:
32
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
33
+ with:
34
+ body_path: ${{ github.workspace }}/CHANGELOG
35
+ prerelease: false
36
+ make_latest: true
37
+ files: |
38
+ schemas/*
39
+
40
+ - name: Commit and Push
41
+ run: |
42
+ git add -f schemas
43
+ git commit -m "Release On Tag"
44
+ git push --force origin HEAD:main
@@ -0,0 +1,18 @@
1
+ name: Clean Workflow Runs
2
+
3
+ on:
4
+ schedule:
5
+ - cron: "0 0 * * *"
6
+ workflow_dispatch:
7
+
8
+ jobs:
9
+ delete-workflow-runs:
10
+ runs-on: ubuntu-latest
11
+
12
+ steps:
13
+ - name: Delete workflow runs
14
+ uses: dongchengjie/workflow-runs-cleaner@v1
15
+ with:
16
+ repository: ${{ github.repository }}
17
+ token: ${{ secrets.GITHUB_TOKEN }}
18
+ maintain-span: "3d"
@@ -1,3 +1,3 @@
1
1
  {
2
- "recommendations": ["redhat.vscode-yaml"]
2
+ "recommendations": ["redhat.vscode-yaml", "usernamehw.errorlens"]
3
3
  }
@@ -1,18 +1,30 @@
1
1
  {
2
2
  "json.schemas": [
3
3
  {
4
+ // src 目录的JSON文件使用JSON Schema Draft 07
4
5
  "url": "http://json-schema.org/draft-07/schema",
5
6
  "fileMatch": ["/src/**/*.json"]
6
7
  }
7
8
  ],
8
9
  "yaml.schemas": {
10
+ // test/clash-meta 目录的 YAML 文件使用编译后的 meta-json-schema.json
9
11
  ".temp/meta-json-schema.json": "test/clash-meta/**/*.yaml",
12
+ // test/clash-verge 目录的 YAML 文件使用编译后的 clash-verge-merge-json-schema.json
10
13
  ".temp/clash-verge-merge-json-schema.json": "test/clash-verge/**/*.yaml"
11
14
  },
15
+ // 使用两空格缩进
12
16
  "editor.tabSize": 2,
17
+ // 在 workspace 中排除下列文件
13
18
  "files.exclude": {
14
19
  ".gitattributes": true,
15
20
  ".gitignore": true,
16
- "package-lock.json": true
21
+ "package-lock.json": true,
22
+ "CHANGELOG": true
23
+ },
24
+ // 搜索排除下列目录
25
+ "search.exclude": {
26
+ "node_modules": true, // 忽略模块目录
27
+ ".temp": true, // 忽略编译输出目录
28
+ "schemas": true // 忽略构建发布目录
17
29
  }
18
30
  }
package/CHANGELOG.md CHANGED
@@ -1,3 +1,18 @@
1
+ ## v1.18.4-beta4
2
+
3
+ ### Changes
4
+
5
+ - 新增: `dns` 新增配置项 `use-system-hosts`
6
+ - 调整: 调整部分配置描述
7
+ - 移除: Clash Verge Merge 配置移除`prepend-rule-providers`、`prepend-proxy-providers`、`append-rule-providers`、`append-proxy-providers`
8
+
9
+ ### Bugs Fixes
10
+
11
+ - 修复: cipher 缺少 `none`
12
+ - 修复: `default-nameserver`类型错误
13
+
14
+ ---
15
+
1
16
  ## v1.18.4
2
17
 
3
18
  ### Changes
package/README.md CHANGED
@@ -1,4 +1,8 @@
1
- ## 用法
1
+ ### 🧩 VSCode 插件
2
+
3
+ VS Code 扩展商店搜索 `Meta JSON Schema` 或 `ClashMeta.meta-json-schema`,安装扩展后即可获取 `Clash.Meta`的语法支持。
4
+
5
+ ## 💡 用法
2
6
 
3
7
  <details>
4
8
  <summary>Visual Studio Code中使用</summary>
@@ -35,16 +39,16 @@
35
39
  2. 配置`vite.config.ts`。
36
40
 
37
41
  ```javascript
38
- import { defineConfig } from 'vite';
39
- import monacoEditor from 'vite-plugin-monaco-editor';
42
+ import { defineConfig } from "vite";
43
+ import monacoEditor from "vite-plugin-monaco-editor";
40
44
  export default defineConfig({
41
45
  plugins: [
42
46
  monacoEditor({
43
- languageWorkers: ['editorWorkerService'],
47
+ languageWorkers: ["editorWorkerService"],
44
48
  customWorkers: [
45
49
  {
46
- label: 'yaml',
47
- entry: 'monaco-yaml/yaml.worker'
50
+ label: "yaml",
51
+ entry: "monaco-yaml/yaml.worker"
48
52
  }
49
53
  ]
50
54
  })
@@ -55,16 +59,16 @@
55
59
  3. 代码中配置schema(请根据需求自行修改`fileMatch`)。
56
60
 
57
61
  ```javascript
58
- import * as monaco from 'monaco-editor';
59
- import { configureMonacoYaml } from 'monaco-yaml';
62
+ import * as monaco from "monaco-editor";
63
+ import { configureMonacoYaml } from "monaco-yaml";
60
64
 
61
65
  configureMonacoYaml(monaco, {
62
66
  validate: true,
63
67
  enableSchemaRequest: true,
64
68
  schemas: [
65
69
  {
66
- uri: 'https://fastly.jsdelivr.net/gh/dongchengjie/airport@main/meta-json-schema.json',
67
- fileMatch: ['**/*.clash.yaml']
70
+ uri: "https://fastly.jsdelivr.net/gh/dongchengjie/airport@main/meta-json-schema.json",
71
+ fileMatch: ["**/*.clash.yaml"]
68
72
  }
69
73
  ]
70
74
  });
@@ -78,7 +82,7 @@
78
82
 
79
83
  - <a href="https://dongchengjie.github.io/meta-json-schema/?schema=https://raw.githubusercontent.com/dongchengjie/meta-json-schema/main/schemas/clash-verge-merge-json-schema.json" target="_blank">clash-verge-merge-json-schema</a>
80
84
 
81
- ## 开发
85
+ ## 🖥️ 开发
82
86
 
83
87
  1. 下载代码
84
88
 
@@ -140,11 +144,11 @@ npm run release
140
144
  interface JSONSchema {
141
145
  // 自定义Snippet建议(数组)
142
146
  defaultSnippets?: {
143
- label?: string; // 标题
144
- description?: string; // 描述
145
- markdownDescription?: string; // 描述(markdown格式)
146
- body?: any; // 内容
147
- bodyText?: string; // 内容文本
147
+ label: string; // 标签文本(索引)
148
+ description?: string; // 标签描述(需要点击展开)
149
+ markdownDescription?: string; // 标签描述(需要点击展开,markdown格式,优先级高于description,)
150
+ body: any; // 实际取值内容
151
+ bodyText?: string; // 实际取值内容文本(暂无作用)
148
152
  }[];
149
153
  errorMessage?: string; // 错误信息
150
154
  patternErrorMessage?: string; // 格式错误信息(优先级高于errorMessage)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "meta-json-schema",
3
- "version": "1.18.4-beta2",
3
+ "version": "1.18.4-beta4",
4
4
  "keywords": [
5
5
  "clash",
6
6
  "clash.meta",