Skip to content

Commit

Permalink
Removing store; Adding schema
Browse files Browse the repository at this point in the history
  • Loading branch information
PRO-2684 committed Jul 21, 2024
1 parent 993a4bf commit f9e02bd
Show file tree
Hide file tree
Showing 2 changed files with 178 additions and 5 deletions.
6 changes: 1 addition & 5 deletions manifest.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
"$schema": "./manifest_schema.json",
"manifest_version": 4,
"type": "theme",
"name": "Transitio",
Expand All @@ -21,11 +22,6 @@
"file": "transitio-release.zip"
}
},
"store": {
"repo": "PRO-2684/transitio",
"branch": "main",
"save_folder": "./styles/"
},
"platform": [
"win32",
"linux",
Expand Down
177 changes: 177 additions & 0 deletions manifest_schema.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,177 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "LiteLoaderQQNT Plugin manifest",
"properties": {
"manifest_version": {
"type": "integer",
"enum": [
1,
2,
3,
4
],
"default": 4,
"title": "Manifest 版本",
"description": "当前版本为 4"
},
"type": {
"type": "string",
"enum": [
"extension",
"theme",
"framework"
],
"title": "插件类型"
},
"name": {
"type": "string",
"title": "插件名称"
},
"slug": {
"type": "string",
"title": "插件标识",
"description": "此插件在代码内的唯一标识符"
},
"description": {
"type": "string",
"title": "插件描述"
},
"icon": {
"title": "插件图标",
"description": "请填写插件图标的相对路径或 null",
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"thumb": {
"title": "插件小图标",
"description": "请填写插件小图标的相对路径或 null (展示在设置界面边栏)",
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"version": {
"type": "string",
"title": "版本号",
"pattern": "^([0-9]+)\\.([0-9]+)\\.([0-9]+)(?:-([0-9A-Za-z-]+(?:\\.[0-9A-Za-z-]+)*))?(?:\\+[0-9A-Za-z-]+)?$"
},
"authors": {
"title": "作者们",
"type": "array",
"items": {
"type": "object",
"properties": {
"name": {
"title": "作者名字",
"type": "string"
},
"link": {
"title": "作者链接",
"type": "string",
"format": "uri"
}
},
"required": [
"name",
"link"
]
}
},
"dependencies": {
"title": "插件依赖",
"description": "填写依赖的 slug",
"type": "array",
"items": {
"type": "string"
}
},
"platform": {
"title": "插件支持的系统平台",
"description": "- Windows: win32 \n- Linux: linux \n- MacOS: darwin",
"type": "array",
"items": {
"type": "string",
"enum": [
"win32",
"linux",
"darwin"
],
"uniqueItems": true
}
},
"injects": {
"title": "要注入的脚本",
"type": "object",
"properties": {
"renderer": {
"title": "渲染进程",
"type": "string"
},
"main": {
"title": "主进程",
"type": "string"
},
"preload": {
"title": "预加载脚本",
"type": "string"
}
}
},
"repository": {
"title": "插件仓库信息",
"type": "object",
"properties": {
"repo": {
"title": "仓库短地址",
"description": "GitHub 仓库地址,格式为 {user}/{repo}",
"type": "string"
},
"branch": {
"title": "分支名称",
"type": "string"
},
"release": {
"type": "object",
"properties": {
"tag": {
"title": "tag 名称",
"description": "不推荐写 latest",
"type": "string"
},
"file": {
"title": "release 内的文件名",
"description": "不填会直接下载 tag 的源码",
"type": "string"
}
},
"required": [
"tag"
]
}
},
"required": [
"repo",
"branch"
]
}
},
"required": [
"manifest_version",
"name",
"slug",
"description",
"version",
"authors",
"platform"
]
}

0 comments on commit f9e02bd

Please sign in to comment.