|
202 | 202 | "properties": { |
203 | 203 | "allow": { |
204 | 204 | "items": { |
205 | | - "title": "Entry", |
206 | | - "description": "A command allowed to be executed by the webview API.", |
207 | | - "type": "object", |
208 | | - "required": [ |
209 | | - "args", |
210 | | - "cmd", |
211 | | - "name", |
212 | | - "sidecar" |
213 | | - ], |
214 | | - "properties": { |
215 | | - "args": { |
216 | | - "description": "The allowed arguments for the command execution.", |
217 | | - "allOf": [ |
218 | | - { |
219 | | - "$ref": "#/definitions/ShellAllowedArgs" |
| 205 | + "title": "ShellScopeEntry", |
| 206 | + "description": "Shell scope entry.", |
| 207 | + "anyOf": [ |
| 208 | + { |
| 209 | + "type": "object", |
| 210 | + "required": [ |
| 211 | + "cmd", |
| 212 | + "name" |
| 213 | + ], |
| 214 | + "properties": { |
| 215 | + "args": { |
| 216 | + "description": "The allowed arguments for the command execution.", |
| 217 | + "allOf": [ |
| 218 | + { |
| 219 | + "$ref": "#/definitions/ShellScopeEntryAllowedArgs" |
| 220 | + } |
| 221 | + ] |
| 222 | + }, |
| 223 | + "cmd": { |
| 224 | + "description": "The command name. It can start with a variable that resolves to a system base directory. The variables are: `$AUDIO`, `$CACHE`, `$CONFIG`, `$DATA`, `$LOCALDATA`, `$DESKTOP`, `$DOCUMENT`, `$DOWNLOAD`, `$EXE`, `$FONT`, `$HOME`, `$PICTURE`, `$PUBLIC`, `$RUNTIME`, `$TEMPLATE`, `$VIDEO`, `$RESOURCE`, `$LOG`, `$TEMP`, `$APPCONFIG`, `$APPDATA`, `$APPLOCALDATA`, `$APPCACHE`, `$APPLOG`.", |
| 225 | + "type": "string" |
| 226 | + }, |
| 227 | + "name": { |
| 228 | + "description": "The name for this allowed shell command configuration.\n\nThis name will be used inside of the webview API to call this command along with any specified arguments.", |
| 229 | + "type": "string" |
220 | 230 | } |
221 | | - ] |
| 231 | + }, |
| 232 | + "additionalProperties": false |
222 | 233 | }, |
223 | | - "cmd": { |
224 | | - "description": "The command name. It can start with a variable that resolves to a system base directory. The variables are: `$AUDIO`, `$CACHE`, `$CONFIG`, `$DATA`, `$LOCALDATA`, `$DESKTOP`, `$DOCUMENT`, `$DOWNLOAD`, `$EXE`, `$FONT`, `$HOME`, `$PICTURE`, `$PUBLIC`, `$RUNTIME`, `$TEMPLATE`, `$VIDEO`, `$RESOURCE`, `$APP`, `$LOG`, `$TEMP`, `$APPCONFIG`, `$APPDATA`, `$APPLOCALDATA`, `$APPCACHE`, `$APPLOG`.", |
225 | | - "type": "string" |
226 | | - }, |
227 | | - "name": { |
228 | | - "description": "The name for this allowed shell command configuration.\n\nThis name will be used inside of the webview API to call this command along with any specified arguments.", |
229 | | - "type": "string" |
230 | | - }, |
231 | | - "sidecar": { |
232 | | - "description": "If this command is a sidecar command.", |
233 | | - "type": "boolean" |
| 234 | + { |
| 235 | + "type": "object", |
| 236 | + "required": [ |
| 237 | + "name", |
| 238 | + "sidecar" |
| 239 | + ], |
| 240 | + "properties": { |
| 241 | + "args": { |
| 242 | + "description": "The allowed arguments for the command execution.", |
| 243 | + "allOf": [ |
| 244 | + { |
| 245 | + "$ref": "#/definitions/ShellScopeEntryAllowedArgs" |
| 246 | + } |
| 247 | + ] |
| 248 | + }, |
| 249 | + "name": { |
| 250 | + "description": "The name for this allowed shell command configuration.\n\nThis name will be used inside of the webview API to call this command along with any specified arguments.", |
| 251 | + "type": "string" |
| 252 | + }, |
| 253 | + "sidecar": { |
| 254 | + "description": "If this command is a sidecar command.", |
| 255 | + "type": "boolean" |
| 256 | + } |
| 257 | + }, |
| 258 | + "additionalProperties": false |
234 | 259 | } |
235 | | - } |
| 260 | + ] |
236 | 261 | } |
237 | 262 | }, |
238 | 263 | "deny": { |
239 | 264 | "items": { |
240 | | - "title": "Entry", |
241 | | - "description": "A command allowed to be executed by the webview API.", |
242 | | - "type": "object", |
243 | | - "required": [ |
244 | | - "args", |
245 | | - "cmd", |
246 | | - "name", |
247 | | - "sidecar" |
248 | | - ], |
249 | | - "properties": { |
250 | | - "args": { |
251 | | - "description": "The allowed arguments for the command execution.", |
252 | | - "allOf": [ |
253 | | - { |
254 | | - "$ref": "#/definitions/ShellAllowedArgs" |
| 265 | + "title": "ShellScopeEntry", |
| 266 | + "description": "Shell scope entry.", |
| 267 | + "anyOf": [ |
| 268 | + { |
| 269 | + "type": "object", |
| 270 | + "required": [ |
| 271 | + "cmd", |
| 272 | + "name" |
| 273 | + ], |
| 274 | + "properties": { |
| 275 | + "args": { |
| 276 | + "description": "The allowed arguments for the command execution.", |
| 277 | + "allOf": [ |
| 278 | + { |
| 279 | + "$ref": "#/definitions/ShellScopeEntryAllowedArgs" |
| 280 | + } |
| 281 | + ] |
| 282 | + }, |
| 283 | + "cmd": { |
| 284 | + "description": "The command name. It can start with a variable that resolves to a system base directory. The variables are: `$AUDIO`, `$CACHE`, `$CONFIG`, `$DATA`, `$LOCALDATA`, `$DESKTOP`, `$DOCUMENT`, `$DOWNLOAD`, `$EXE`, `$FONT`, `$HOME`, `$PICTURE`, `$PUBLIC`, `$RUNTIME`, `$TEMPLATE`, `$VIDEO`, `$RESOURCE`, `$LOG`, `$TEMP`, `$APPCONFIG`, `$APPDATA`, `$APPLOCALDATA`, `$APPCACHE`, `$APPLOG`.", |
| 285 | + "type": "string" |
| 286 | + }, |
| 287 | + "name": { |
| 288 | + "description": "The name for this allowed shell command configuration.\n\nThis name will be used inside of the webview API to call this command along with any specified arguments.", |
| 289 | + "type": "string" |
255 | 290 | } |
256 | | - ] |
| 291 | + }, |
| 292 | + "additionalProperties": false |
257 | 293 | }, |
258 | | - "cmd": { |
259 | | - "description": "The command name. It can start with a variable that resolves to a system base directory. The variables are: `$AUDIO`, `$CACHE`, `$CONFIG`, `$DATA`, `$LOCALDATA`, `$DESKTOP`, `$DOCUMENT`, `$DOWNLOAD`, `$EXE`, `$FONT`, `$HOME`, `$PICTURE`, `$PUBLIC`, `$RUNTIME`, `$TEMPLATE`, `$VIDEO`, `$RESOURCE`, `$APP`, `$LOG`, `$TEMP`, `$APPCONFIG`, `$APPDATA`, `$APPLOCALDATA`, `$APPCACHE`, `$APPLOG`.", |
260 | | - "type": "string" |
261 | | - }, |
262 | | - "name": { |
263 | | - "description": "The name for this allowed shell command configuration.\n\nThis name will be used inside of the webview API to call this command along with any specified arguments.", |
264 | | - "type": "string" |
265 | | - }, |
266 | | - "sidecar": { |
267 | | - "description": "If this command is a sidecar command.", |
268 | | - "type": "boolean" |
| 294 | + { |
| 295 | + "type": "object", |
| 296 | + "required": [ |
| 297 | + "name", |
| 298 | + "sidecar" |
| 299 | + ], |
| 300 | + "properties": { |
| 301 | + "args": { |
| 302 | + "description": "The allowed arguments for the command execution.", |
| 303 | + "allOf": [ |
| 304 | + { |
| 305 | + "$ref": "#/definitions/ShellScopeEntryAllowedArgs" |
| 306 | + } |
| 307 | + ] |
| 308 | + }, |
| 309 | + "name": { |
| 310 | + "description": "The name for this allowed shell command configuration.\n\nThis name will be used inside of the webview API to call this command along with any specified arguments.", |
| 311 | + "type": "string" |
| 312 | + }, |
| 313 | + "sidecar": { |
| 314 | + "description": "If this command is a sidecar command.", |
| 315 | + "type": "boolean" |
| 316 | + } |
| 317 | + }, |
| 318 | + "additionalProperties": false |
269 | 319 | } |
270 | | - } |
| 320 | + ] |
271 | 321 | } |
272 | 322 | } |
273 | 323 | } |
|
3266 | 3316 | } |
3267 | 3317 | ] |
3268 | 3318 | }, |
3269 | | - "ShellAllowedArg": { |
| 3319 | + "ShellScopeEntryAllowedArg": { |
3270 | 3320 | "description": "A command argument allowed to be executed by the webview API.", |
3271 | 3321 | "anyOf": [ |
3272 | 3322 | { |
|
3294 | 3344 | } |
3295 | 3345 | ] |
3296 | 3346 | }, |
3297 | | - "ShellAllowedArgs": { |
3298 | | - "description": "A set of command arguments allowed to be executed by the webview API.\n\nA value of `true` will allow any arguments to be passed to the command. `false` will disable all arguments. A list of [`ShellAllowedArg`] will set those arguments as the only valid arguments to be passed to the attached command configuration.", |
| 3347 | + "ShellScopeEntryAllowedArgs": { |
| 3348 | + "description": "A set of command arguments allowed to be executed by the webview API.\n\nA value of `true` will allow any arguments to be passed to the command. `false` will disable all arguments. A list of [`ShellScopeEntryAllowedArg`] will set those arguments as the only valid arguments to be passed to the attached command configuration.", |
3299 | 3349 | "anyOf": [ |
3300 | 3350 | { |
3301 | 3351 | "description": "Use a simple boolean to allow all or disable all arguments to this command configuration.", |
3302 | 3352 | "type": "boolean" |
3303 | 3353 | }, |
3304 | 3354 | { |
3305 | | - "description": "A specific set of [`ShellAllowedArg`] that are valid to call for the command configuration.", |
| 3355 | + "description": "A specific set of [`ShellScopeEntryAllowedArg`] that are valid to call for the command configuration.", |
3306 | 3356 | "type": "array", |
3307 | 3357 | "items": { |
3308 | | - "$ref": "#/definitions/ShellAllowedArg" |
| 3358 | + "$ref": "#/definitions/ShellScopeEntryAllowedArg" |
3309 | 3359 | } |
3310 | 3360 | } |
3311 | 3361 | ] |
|
0 commit comments