-
Notifications
You must be signed in to change notification settings - Fork 0
/
plugin.schema.json
156 lines (156 loc) · 6.37 KB
/
plugin.schema.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
{
"$schema": "http://json-schema.org/draft-07/schema#",
"type": "object",
"properties": {
"$schema": {
"type": "string",
"description": "The schema used for this plugin manifest."
},
"id": {
"type": "string",
"minLength": 1,
"maxLength": 100,
"description": "The unique ID of the plugin. Reverse DNS notation is a popular method here, e.g. 'com.company-name.plugin-name'."
},
"name": {
"type": "string",
"minLength": 1,
"maxLength": 100,
"description": "The name of the plugin as it will appear to the user."
},
"type": {
"type": "string",
"enum": ["node", "local"],
"description": "The semver version of the plugin as it will appear to the user. May also be used to cache remote plugins for offline use and manage when to update local plugins."
},
"version": {
"type": "string",
"pattern": "^(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)(?:-((?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\\.(?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\\+([0-9a-zA-Z-]+(?:\\.[0-9a-zA-Z-]+)*))?$",
"description": "The semver version of the plugin as it will appear to the user. May also be used to cache remote plugins for offline use and manage when to update local plugins."
},
"author": {
"type": "string",
"minLength": 1,
"maxLength": 100,
"description": "The author of the plugin (you!) as it will appear to the user."
},
"main": {
"type": "string",
"minLength": 1,
"maxLength": 100,
"description": "The main file to load when activating the plugin. Needs to be a .js file."
},
"dev": {
"type": "string",
"minLength": 1,
"maxLength": 100,
"description": "If the user loads a local plugin in development mode, you can specify a different file to load here. This is often useful for bundlers that start a local dev server. Most commonly will be something like 'http://localhost:3000'."
},
"remote": {
"type": "string",
"minLength": 1,
"maxLength": 100,
"description": "If the plugin is loaded remotely, the URL from which to load it. If the plugin should be available offline, make sure you create a Service Worker loaded by your root index.html. Remote plugins are not currently supported."
},
"icon": {
"type": "string",
"minLength": 1,
"maxLength": 100,
"description": "For main/dev, the relative path from the plugins root to the icon. If the icon was placed alongside the `index.html` file which was at `dist/index.html`, this entry would be `dist/icon.png`. If the icon differs for remote usage, specify `remoteIcon` as well. All web-compatible images are accepted."
},
"remoteIcon": {
"type": "string",
"minLength": 1,
"maxLength": 100,
"description": "For remote usage, the path from the `remote` URL to the icon. If the icon is hosted alongside the `index.html` file, the entry would be `icon.png`. All web-compatible images are accepted. Remote plugins are not currently supported."
},
"settings": {
"type": "object",
"additionalProperties": {
"anyOf": [
{
"type": "object",
"properties": {
"label": {
"type": "string",
"minLength": 1,
"maxLength": 100
},
"required": {
"type": "boolean"
},
"type": {
"type": "string",
"enum": ["text", "password", "status", "button"],
"description": "The type of input to show."
},
"fallback": {
"type": "string",
"minLength": 1,
"maxLength": 1024,
"description": "If no input is given by the user for this field, this is the default value that will be used. Also serves as a placeholder for input fields."
}
},
"required": ["label", "type"],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"label": {
"$ref": "#/properties/settings/additionalProperties/anyOf/0/properties/label"
},
"required": {
"$ref": "#/properties/settings/additionalProperties/anyOf/0/properties/required"
},
"type": {
"type": "string",
"enum": ["toggle"],
"description": "The type of input to show."
},
"fallback": {
"type": "boolean",
"description": "If no input is given by the user for this field, this is the default value that will be used."
}
},
"required": ["label", "type"],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"label": {
"$ref": "#/properties/settings/additionalProperties/anyOf/0/properties/label"
},
"required": {
"$ref": "#/properties/settings/additionalProperties/anyOf/0/properties/required"
},
"type": {
"type": "string",
"enum": ["integer", "slider"],
"description": "The type of input to show."
},
"fallback": {
"type": "number",
"description": "If no input is given by the user for this field, this is the default value that will be used."
},
"min": {
"type": "number",
"description": "The minimum value the user is allowed to enter for this field."
},
"max": {
"type": "number",
"description": "The minimum value the user is allowed to enter for this field."
}
},
"required": ["label", "type", "min", "max"],
"additionalProperties": false
}
]
},
"description": "Settings that will appear in the MIDI Mixer UI for the user to change. These can be accessed programmatically by the plugin. Useful for capturing things like API keys, addresses, and general preferences."
}
},
"required": ["id", "name", "version", "author", "main"],
"additionalProperties": false
}