Skip to content

Commit

Permalink
housekeeping
Browse files Browse the repository at this point in the history
  • Loading branch information
Dan Nadler committed Feb 7, 2024
1 parent e6f10ea commit 580d637
Show file tree
Hide file tree
Showing 9 changed files with 151 additions and 847 deletions.
423 changes: 146 additions & 277 deletions src-tauri/Cargo.lock

Large diffs are not rendered by default.

1 change: 0 additions & 1 deletion src-tauri/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ memoize = "0.4.2"
rand_distr = { version = "0.4.3", features = ["serde"] }
env_logger = "0.11.0"
tauri = { version = "2.0.0-beta", features = [] }
tauri-plugin-shell = "2.0.0-beta"
serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0"
serde_yaml = "0.9.27"
Expand Down
284 changes: 0 additions & 284 deletions src-tauri/capabilities/schemas/desktop-schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -133,234 +133,6 @@
"$ref": "#/definitions/Identifier"
}
]
},
{
"description": "Reference a permission or permission set by identifier and extends its scope.",
"type": "object",
"oneOf": [
{
"type": "object",
"required": [
"identifier"
],
"properties": {
"identifier": {
"oneOf": [
{
"description": "shell:allow-execute -> Enables the execute command without any pre-configured scope.",
"type": "string",
"enum": [
"shell:allow-execute"
]
},
{
"description": "shell:allow-kill -> Enables the kill command without any pre-configured scope.",
"type": "string",
"enum": [
"shell:allow-kill"
]
},
{
"description": "shell:allow-open -> Enables the open command without any pre-configured scope.",
"type": "string",
"enum": [
"shell:allow-open"
]
},
{
"description": "shell:allow-stdin-write -> Enables the stdin_write command without any pre-configured scope.",
"type": "string",
"enum": [
"shell:allow-stdin-write"
]
},
{
"description": "shell:deny-execute -> Denies the execute command without any pre-configured scope.",
"type": "string",
"enum": [
"shell:deny-execute"
]
},
{
"description": "shell:deny-kill -> Denies the kill command without any pre-configured scope.",
"type": "string",
"enum": [
"shell:deny-kill"
]
},
{
"description": "shell:deny-open -> Denies the open command without any pre-configured scope.",
"type": "string",
"enum": [
"shell:deny-open"
]
},
{
"description": "shell:deny-stdin-write -> Denies the stdin_write command without any pre-configured scope.",
"type": "string",
"enum": [
"shell:deny-stdin-write"
]
}
]
},
"allow": {
"items": {
"title": "Entry",
"description": "A command allowed to be executed by the webview API.",
"type": "object",
"required": [
"args",
"command",
"name",
"sidecar"
],
"properties": {
"args": {
"description": "The allowed arguments for the command execution.",
"allOf": [
{
"$ref": "#/definitions/ShellAllowedArgs"
}
]
},
"command": {
"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`.",
"type": "string"
},
"name": {
"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.",
"type": "string"
},
"sidecar": {
"description": "If this command is a sidecar command.",
"type": "boolean"
}
},
"$schema": "http://json-schema.org/draft-07/schema#",
"definitions": {
"ShellAllowedArg": {
"anyOf": [
{
"description": "A non-configurable argument that is passed to the command in the order it was specified.",
"type": "string"
},
{
"additionalProperties": false,
"description": "A variable that is set while calling the command from the webview API.",
"properties": {
"validator": {
"description": "[regex] validator to require passed values to conform to an expected input.\n\nThis will require the argument value passed to this variable to match the `validator` regex before it will be executed.\n\n[regex]: https://docs.rs/regex/latest/regex/#syntax",
"type": "string"
}
},
"required": [
"validator"
],
"type": "object"
}
],
"description": "A command argument allowed to be executed by the webview API."
},
"ShellAllowedArgs": {
"anyOf": [
{
"description": "Use a simple boolean to allow all or disable all arguments to this command configuration.",
"type": "boolean"
},
{
"description": "A specific set of [`ShellAllowedArg`] that are valid to call for the command configuration.",
"items": {
"$ref": "#/definitions/ShellAllowedArg"
},
"type": "array"
}
],
"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."
}
}
}
},
"deny": {
"items": {
"title": "Entry",
"description": "A command allowed to be executed by the webview API.",
"type": "object",
"required": [
"args",
"command",
"name",
"sidecar"
],
"properties": {
"args": {
"description": "The allowed arguments for the command execution.",
"allOf": [
{
"$ref": "#/definitions/ShellAllowedArgs"
}
]
},
"command": {
"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`.",
"type": "string"
},
"name": {
"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.",
"type": "string"
},
"sidecar": {
"description": "If this command is a sidecar command.",
"type": "boolean"
}
},
"$schema": "http://json-schema.org/draft-07/schema#",
"definitions": {
"ShellAllowedArg": {
"anyOf": [
{
"description": "A non-configurable argument that is passed to the command in the order it was specified.",
"type": "string"
},
{
"additionalProperties": false,
"description": "A variable that is set while calling the command from the webview API.",
"properties": {
"validator": {
"description": "[regex] validator to require passed values to conform to an expected input.\n\nThis will require the argument value passed to this variable to match the `validator` regex before it will be executed.\n\n[regex]: https://docs.rs/regex/latest/regex/#syntax",
"type": "string"
}
},
"required": [
"validator"
],
"type": "object"
}
],
"description": "A command argument allowed to be executed by the webview API."
},
"ShellAllowedArgs": {
"anyOf": [
{
"description": "Use a simple boolean to allow all or disable all arguments to this command configuration.",
"type": "boolean"
},
{
"description": "A specific set of [`ShellAllowedArg`] that are valid to call for the command configuration.",
"items": {
"$ref": "#/definitions/ShellAllowedArg"
},
"type": "array"
}
],
"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."
}
}
}
}
}
}
]
}
]
},
Expand Down Expand Up @@ -962,62 +734,6 @@
"resources:deny-close"
]
},
{
"description": "shell:allow-execute -> Enables the execute command without any pre-configured scope.",
"type": "string",
"enum": [
"shell:allow-execute"
]
},
{
"description": "shell:allow-kill -> Enables the kill command without any pre-configured scope.",
"type": "string",
"enum": [
"shell:allow-kill"
]
},
{
"description": "shell:allow-open -> Enables the open command without any pre-configured scope.",
"type": "string",
"enum": [
"shell:allow-open"
]
},
{
"description": "shell:allow-stdin-write -> Enables the stdin_write command without any pre-configured scope.",
"type": "string",
"enum": [
"shell:allow-stdin-write"
]
},
{
"description": "shell:deny-execute -> Denies the execute command without any pre-configured scope.",
"type": "string",
"enum": [
"shell:deny-execute"
]
},
{
"description": "shell:deny-kill -> Denies the kill command without any pre-configured scope.",
"type": "string",
"enum": [
"shell:deny-kill"
]
},
{
"description": "shell:deny-open -> Denies the open command without any pre-configured scope.",
"type": "string",
"enum": [
"shell:deny-open"
]
},
{
"description": "shell:deny-stdin-write -> Denies the stdin_write command without any pre-configured scope.",
"type": "string",
"enum": [
"shell:deny-stdin-write"
]
},
{
"description": "tray:default -> Default permissions for the plugin.",
"type": "string",
Expand Down
Loading

0 comments on commit 580d637

Please sign in to comment.