feat: enhance multiple capabilities file format & fix mixed permissions schema - #9079
Conversation
|
This PR also fixes generation of {
"permissions": ["perm1", { "identifier": "perm2" }]
}Even though mixed permission array are parsed correctly in toml, the identifier = "allow-http"
windows = ["main"]
[[permissions]]
identifier = "allow-read"and identifier = "allow-http"
windows = ["main"]
permissions = ["app:allow-app-hide", { identifier = "allow-read" }]This maybe a bug in Edit: tried to use Edit2: after closing and re-opening vscode, the validation seems to accept it and work fine so maybe after this PR schema fix, users won't have to deal with this at all. |
|
the Even Better TOML extension schema validation isn't perfect, at least autocompletion doesn't always work. That's why we use JSON by default for capabilities. |
|
a change file would be nice here i think |
|
Added |
This enhances the DX of defining multiple definitions in a single JSON file, previously the only way was:
{ "capabilities": [ {...}, {...} ] }now we can also support
[ {...}, {...} ]toml however can't take advantage of this due to the nature of toml but doesn't matter that much