Skip to content

Commit d4f1d99

Browse files
amrbashirlucasfernog
authored andcommitted
fix(shell): fix inlined docs for scope (tauri-apps#1656)
* fix(shell): fix inlined docs for scope * Update plugins/shell/guest-js/index.ts --------- Co-authored-by: Lucas Fernandes Nogueira <[email protected]>
1 parent 3a94512 commit d4f1d99

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

plugins/shell/guest-js/index.ts

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
*
1919
* ### Restricting access to the {@link Command | `Command`} APIs
2020
*
21-
* The plugin configuration object has a `scope` field that defines an array of CLIs that can be used.
21+
* The plugin permissions object has a `scope` field that defines an array of CLIs that can be used.
2222
* Each CLI is a configuration object `{ name: string, cmd: string, sidecar?: bool, args?: boolean | Arg[] }`.
2323
*
2424
* - `name`: the unique identifier of the command, passed to the {@link Command.create | Command.create function}.
@@ -35,20 +35,21 @@
3535
*
3636
* CLI: `git commit -m "the commit message"`
3737
*
38-
* Configuration:
38+
* Capability:
3939
* ```json
4040
* {
41-
* "plugins": {
42-
* "shell": {
43-
* "scope": [
41+
* "permissions": [
42+
* {
43+
* "identifier": "shell:allow-execute",
44+
* "allow": [
4445
* {
4546
* "name": "run-git-commit",
4647
* "cmd": "git",
4748
* "args": ["commit", "-m", { "validator": "\\S+" }]
4849
* }
4950
* ]
5051
* }
51-
* }
52+
* ]
5253
* }
5354
* ```
5455
* Usage:

0 commit comments

Comments
 (0)