Compare commits

..

11 Commits

Author SHA1 Message Date
Lucas Nogueira 8049700614 chore: update to tauri 3.0.0-alpha.9
autogenerated commands format changed, needed FS plugin small change
2026-06-18 17:29:56 -03:00
Lucas Nogueira b7dab55a2e chore: update tauri 2026-06-17 12:12:03 -03:00
Lucas Nogueira bc005c44b0 Merge remote-tracking branch 'origin/v2' into feat/cef 2026-05-15 15:33:59 -03:00
Lucas Nogueira 06af78ae51 fix: add cef-dll-sys patch for Windows 2026-05-07 09:30:14 -03:00
Lucas Nogueira 77efbab515 Merge remote-tracking branch 'origin/v2' into feat/cef 2026-05-07 08:45:55 -03:00
FabianLars c6561ab6b4 revert to draft07 schema 2026-03-09 12:32:45 +01:00
FabianLars 8d6a6d6d31 Merge remote-tracking branch 'origin/v2' into feat/cef 2026-03-09 12:31:03 +01:00
Lucas Nogueira 352381c6c6 update to latest tauri feat/cef (schemars v1) 2026-02-18 12:45:33 -03:00
Lucas Nogueira e2840a7b52 Merge branch 'v2' into feat/cef 2026-02-18 12:43:41 -03:00
Lucas Nogueira 93ac4cb59b fix mobile build 2026-02-05 17:29:29 -03:00
Lucas Nogueira ad8ec1b6b8 feat(deep-link): handle RunEvent::Opened on Linux for CEF support 2026-02-05 12:32:26 -03:00
250 changed files with 2555 additions and 7631 deletions
-6
View File
@@ -1,6 +0,0 @@
---
"log": minor:feat
"log-js": minor
---
Added the `FileOpenStrategy` for log rotation. It defaults to append into existing file if any (previous behaviour), and brings a new feature to create a new file per session: `FileOpenStrategy::Rotate`.
@@ -1,6 +0,0 @@
---
positioner: patch
positioner-js: patch
---
Replaced a panic in `calculate_position` with an error return when the window has no associated monitor (e.g. during display sleep or monitor reconfiguration).
-6
View File
@@ -1,6 +0,0 @@
---
"log": patch
"log-js": patch
---
Removed an unused dependency `byte-unit`.
Generated
+843 -118
View File
File diff suppressed because it is too large Load Diff
+7 -1
View File
@@ -19,7 +19,7 @@ tauri-utils = "2.8"
serde_json = "1" serde_json = "1"
thiserror = "2" thiserror = "2"
url = "2" url = "2"
schemars = "0.8" schemars = "1"
dunce = "1" dunce = "1"
specta = "^2.0.0-rc.16" specta = "^2.0.0-rc.16"
glob = "0.3" glob = "0.3"
@@ -39,3 +39,9 @@ codegen-units = 1
lto = true lto = true
incremental = false incremental = false
opt-level = "s" opt-level = "s"
[patch.crates-io]
tauri = { git = "https://github.com/tauri-apps/tauri.git", tag = "tauri-cef-v3.0.0-alpha.9" }
tauri-utils = { git = "https://github.com/tauri-apps/tauri.git", tag = "tauri-cef-v3.0.0-alpha.9" }
tauri-plugin = { git = "https://github.com/tauri-apps/tauri.git", tag = "tauri-cef-v3.0.0-alpha.9" }
tauri-build = { git = "https://github.com/tauri-apps/tauri.git", tag = "tauri-cef-v3.0.0-alpha.9" }
-7
View File
@@ -1,12 +1,5 @@
# Changelog # Changelog
## \[2.0.40]
### Dependencies
- Upgraded to `barcode-scanner-js@2.4.5`
- Upgraded to `global-shortcut-js@2.3.2`
## \[2.0.39] ## \[2.0.39]
### Dependencies ### Dependencies
+4 -4
View File
@@ -1,7 +1,7 @@
{ {
"name": "api", "name": "api",
"private": true, "private": true,
"version": "2.0.40", "version": "2.0.39",
"type": "module", "type": "module",
"scripts": { "scripts": {
"dev": "vite --clearScreen false", "dev": "vite --clearScreen false",
@@ -11,14 +11,14 @@
}, },
"dependencies": { "dependencies": {
"@tauri-apps/api": "^2.11.0", "@tauri-apps/api": "^2.11.0",
"@tauri-apps/plugin-barcode-scanner": "^2.4.5", "@tauri-apps/plugin-barcode-scanner": "^2.4.4",
"@tauri-apps/plugin-biometric": "^2.3.2", "@tauri-apps/plugin-biometric": "^2.3.2",
"@tauri-apps/plugin-cli": "^2.4.1", "@tauri-apps/plugin-cli": "^2.4.1",
"@tauri-apps/plugin-clipboard-manager": "^2.3.2", "@tauri-apps/plugin-clipboard-manager": "^2.3.2",
"@tauri-apps/plugin-dialog": "^2.7.1", "@tauri-apps/plugin-dialog": "^2.7.1",
"@tauri-apps/plugin-fs": "^2.5.1", "@tauri-apps/plugin-fs": "^2.5.1",
"@tauri-apps/plugin-geolocation": "^2.3.2", "@tauri-apps/plugin-geolocation": "^2.3.2",
"@tauri-apps/plugin-global-shortcut": "^2.3.2", "@tauri-apps/plugin-global-shortcut": "^2.3.1",
"@tauri-apps/plugin-haptics": "^2.3.2", "@tauri-apps/plugin-haptics": "^2.3.2",
"@tauri-apps/plugin-http": "^2.5.9", "@tauri-apps/plugin-http": "^2.5.9",
"@tauri-apps/plugin-nfc": "^2.3.5", "@tauri-apps/plugin-nfc": "^2.3.5",
@@ -36,7 +36,7 @@
"@iconify-json/codicon": "^1.2.49", "@iconify-json/codicon": "^1.2.49",
"@iconify-json/ph": "^1.2.2", "@iconify-json/ph": "^1.2.2",
"@sveltejs/vite-plugin-svelte": "^7.0.0", "@sveltejs/vite-plugin-svelte": "^7.0.0",
"@tauri-apps/cli": "2.11.2", "@tauri-apps/cli-cef": "3.0.0-alpha.5",
"@unocss/extractor-svelte": "^66.6.7", "@unocss/extractor-svelte": "^66.6.7",
"svelte": "^5.54.0", "svelte": "^5.54.0",
"unocss": "^66.6.7", "unocss": "^66.6.7",
-7
View File
@@ -1,12 +1,5 @@
# Changelog # Changelog
## \[2.0.44]
### Dependencies
- Upgraded to `barcode-scanner@2.4.5`
- Upgraded to `global-shortcut@2.3.2`
## \[2.0.43] ## \[2.0.43]
### Dependencies ### Dependencies
+3 -3
View File
@@ -1,7 +1,7 @@
[package] [package]
name = "api" name = "api"
publish = false publish = false
version = "2.0.44" version = "2.0.43"
description = "An example Tauri Application showcasing the api" description = "An example Tauri Application showcasing the api"
edition = "2021" edition = "2021"
rust-version = { workspace = true } rust-version = { workspace = true }
@@ -56,12 +56,12 @@ features = [
[target."cfg(any(target_os = \"macos\", windows, target_os = \"linux\", target_os = \"dragonfly\", target_os = \"freebsd\", target_os = \"openbsd\", target_os = \"netbsd\"))".dependencies] [target."cfg(any(target_os = \"macos\", windows, target_os = \"linux\", target_os = \"dragonfly\", target_os = \"freebsd\", target_os = \"openbsd\", target_os = \"netbsd\"))".dependencies]
tauri-plugin-cli = { path = "../../../plugins/cli", version = "2.4.1" } tauri-plugin-cli = { path = "../../../plugins/cli", version = "2.4.1" }
tauri-plugin-global-shortcut = { path = "../../../plugins/global-shortcut", version = "2.3.2" } tauri-plugin-global-shortcut = { path = "../../../plugins/global-shortcut", version = "2.3.1" }
tauri-plugin-updater = { path = "../../../plugins/updater", version = "2.10.1" } tauri-plugin-updater = { path = "../../../plugins/updater", version = "2.10.1" }
tauri-plugin-window-state = { path = "../../../plugins/window-state", version = "2.2.0" } tauri-plugin-window-state = { path = "../../../plugins/window-state", version = "2.2.0" }
[target."cfg(any(target_os = \"android\", target_os = \"ios\"))".dependencies] [target."cfg(any(target_os = \"android\", target_os = \"ios\"))".dependencies]
tauri-plugin-barcode-scanner = { path = "../../../plugins/barcode-scanner/", version = "2.4.5" } tauri-plugin-barcode-scanner = { path = "../../../plugins/barcode-scanner/", version = "2.4.4" }
tauri-plugin-nfc = { path = "../../../plugins/nfc", version = "2.3.5" } tauri-plugin-nfc = { path = "../../../plugins/nfc", version = "2.3.5" }
tauri-plugin-biometric = { path = "../../../plugins/biometric/", version = "2.3.2" } tauri-plugin-biometric = { path = "../../../plugins/biometric/", version = "2.3.2" }
tauri-plugin-geolocation = { path = "../../../plugins/geolocation/", version = "2.3.2" } tauri-plugin-geolocation = { path = "../../../plugins/geolocation/", version = "2.3.2" }
+3 -3
View File
@@ -15,10 +15,10 @@
"@rollup/plugin-node-resolve": "16.0.3", "@rollup/plugin-node-resolve": "16.0.3",
"@rollup/plugin-terser": "1.0.0", "@rollup/plugin-terser": "1.0.0",
"@rollup/plugin-typescript": "12.3.0", "@rollup/plugin-typescript": "12.3.0",
"eslint": "10.4.0", "eslint": "10.2.0",
"eslint-config-prettier": "10.1.8", "eslint-config-prettier": "10.1.8",
"eslint-plugin-security": "4.0.1", "eslint-plugin-security": "4.0.0",
"prettier": "3.8.3", "prettier": "3.8.1",
"rollup": "4.60.3", "rollup": "4.60.3",
"tslib": "2.8.1", "tslib": "2.8.1",
"typescript": "6.0.3", "typescript": "6.0.3",
@@ -0,0 +1,5 @@
# Automatically generated - DO NOT EDIT!
"$schema" = "../../schemas/schema.json"
commands = ["enable","disable","is_enabled"]
@@ -1,13 +0,0 @@
# Automatically generated - DO NOT EDIT!
"$schema" = "../../schemas/schema.json"
[[permission]]
identifier = "allow-disable"
description = "Enables the disable command without any pre-configured scope."
commands.allow = ["disable"]
[[permission]]
identifier = "deny-disable"
description = "Denies the disable command without any pre-configured scope."
commands.deny = ["disable"]
@@ -1,13 +0,0 @@
# Automatically generated - DO NOT EDIT!
"$schema" = "../../schemas/schema.json"
[[permission]]
identifier = "allow-enable"
description = "Enables the enable command without any pre-configured scope."
commands.allow = ["enable"]
[[permission]]
identifier = "deny-enable"
description = "Denies the enable command without any pre-configured scope."
commands.deny = ["enable"]
@@ -1,13 +0,0 @@
# Automatically generated - DO NOT EDIT!
"$schema" = "../../schemas/schema.json"
[[permission]]
identifier = "allow-is-enabled"
description = "Enables the is_enabled command without any pre-configured scope."
commands.allow = ["is_enabled"]
[[permission]]
identifier = "deny-is-enabled"
description = "Denies the is_enabled command without any pre-configured scope."
commands.deny = ["is_enabled"]
@@ -24,10 +24,17 @@
}, },
"permission": { "permission": {
"description": "A list of inlined permissions", "description": "A list of inlined permissions",
"default": [],
"type": "array", "type": "array",
"items": { "items": {
"$ref": "#/definitions/Permission" "$ref": "#/definitions/Permission"
},
"default": []
},
"commands": {
"description": "A list of command names that get `allow-$command` and `deny-$command` permissions\nautogenerated on demand instead of being stored as explicit permissions.\n\nSee [`Manifest::command_permission`] and the ACL resolver for how these are expanded.",
"type": "array",
"items": {
"type": "string"
} }
} }
}, },
@@ -35,9 +42,6 @@
"DefaultPermission": { "DefaultPermission": {
"description": "The default permission set of the plugin.\n\nWorks similarly to a permission with the \"default\" identifier.", "description": "The default permission set of the plugin.\n\nWorks similarly to a permission with the \"default\" identifier.",
"type": "object", "type": "object",
"required": [
"permissions"
],
"properties": { "properties": {
"version": { "version": {
"description": "The version of the permission.", "description": "The version of the permission.",
@@ -46,10 +50,10 @@
"null" "null"
], ],
"format": "uint64", "format": "uint64",
"minimum": 1.0 "minimum": 1
}, },
"description": { "description": {
"description": "Human-readable description of what the permission does. Tauri convention is to use `<h4>` headings in markdown content for Tauri documentation generation purposes.", "description": "Human-readable description of what the permission does.\nTauri convention is to use `<h4>` headings in markdown content\nfor Tauri documentation generation purposes.",
"type": [ "type": [
"string", "string",
"null" "null"
@@ -62,16 +66,14 @@
"type": "string" "type": "string"
} }
} }
} },
"required": [
"permissions"
]
}, },
"PermissionSet": { "PermissionSet": {
"description": "A set of direct permissions grouped together under a new name.", "description": "A set of direct permissions grouped together under a new name.",
"type": "object", "type": "object",
"required": [
"description",
"identifier",
"permissions"
],
"properties": { "properties": {
"identifier": { "identifier": {
"description": "A unique identifier for the permission.", "description": "A unique identifier for the permission.",
@@ -85,17 +87,19 @@
"description": "All permissions this set contains.", "description": "All permissions this set contains.",
"type": "array", "type": "array",
"items": { "items": {
"$ref": "#/definitions/PermissionKind" "type": "string"
} }
} }
} },
"required": [
"identifier",
"description",
"permissions"
]
}, },
"Permission": { "Permission": {
"description": "Descriptions of explicit privileges of commands.\n\nIt can enable commands to be accessible in the frontend of the application.\n\nIf the scope is defined it can be used to fine grain control the access of individual or multiple commands.", "description": "Descriptions of explicit privileges of commands.\n\nIt can enable commands to be accessible in the frontend of the application.\n\nIf the scope is defined it can be used to fine grain control the access of individual or multiple commands.",
"type": "object", "type": "object",
"required": [
"identifier"
],
"properties": { "properties": {
"version": { "version": {
"description": "The version of the permission.", "description": "The version of the permission.",
@@ -104,14 +108,14 @@
"null" "null"
], ],
"format": "uint64", "format": "uint64",
"minimum": 1.0 "minimum": 1
}, },
"identifier": { "identifier": {
"description": "A unique identifier for the permission.", "description": "A unique identifier for the permission.",
"type": "string" "type": "string"
}, },
"description": { "description": {
"description": "Human-readable description of what the permission does. Tauri internal convention is to use `<h4>` headings in markdown content for Tauri documentation generation purposes.", "description": "Human-readable description of what the permission does.\nTauri internal convention is to use `<h4>` headings in markdown content\nfor Tauri documentation generation purposes.",
"type": [ "type": [
"string", "string",
"null" "null"
@@ -147,7 +151,10 @@
"$ref": "#/definitions/Target" "$ref": "#/definitions/Target"
} }
} }
} },
"required": [
"identifier"
]
}, },
"Commands": { "Commands": {
"description": "Allowed and denied commands inside a permission.\n\nIf two commands clash inside of `allow` and `deny`, it should be denied by default.", "description": "Allowed and denied commands inside a permission.\n\nIf two commands clash inside of `allow` and `deny`, it should be denied by default.",
@@ -155,24 +162,24 @@
"properties": { "properties": {
"allow": { "allow": {
"description": "Allowed command.", "description": "Allowed command.",
"default": [],
"type": "array", "type": "array",
"items": { "items": {
"type": "string" "type": "string"
} },
"default": []
}, },
"deny": { "deny": {
"description": "Denied command, which takes priority.", "description": "Denied command, which takes priority.",
"default": [],
"type": "array", "type": "array",
"items": { "items": {
"type": "string" "type": "string"
} },
"default": []
} }
} }
}, },
"Scopes": { "Scopes": {
"description": "An argument for fine grained behavior control of Tauri commands.\n\nIt can be of any serde serializable type and is used to allow or prevent certain actions inside a Tauri command. The configured scope is passed to the command and will be enforced by the command implementation.\n\n## Example\n\n```json { \"allow\": [{ \"path\": \"$HOME/**\" }], \"deny\": [{ \"path\": \"$HOME/secret.txt\" }] } ```", "description": "An argument for fine grained behavior control of Tauri commands.\n\nIt can be of any serde serializable type and is used to allow or prevent certain actions inside a Tauri command.\nThe configured scope is passed to the command and will be enforced by the command implementation.\n\n## Example\n\n```json\n{\n \"allow\": [{ \"path\": \"$HOME/**\" }],\n \"deny\": [{ \"path\": \"$HOME/secret.txt\" }]\n}\n```",
"type": "object", "type": "object",
"properties": { "properties": {
"allow": { "allow": {
@@ -257,84 +264,27 @@
{ {
"description": "MacOS.", "description": "MacOS.",
"type": "string", "type": "string",
"enum": [ "const": "macOS"
"macOS"
]
}, },
{ {
"description": "Windows.", "description": "Windows.",
"type": "string", "type": "string",
"enum": [ "const": "windows"
"windows"
]
}, },
{ {
"description": "Linux.", "description": "Linux.",
"type": "string", "type": "string",
"enum": [ "const": "linux"
"linux"
]
}, },
{ {
"description": "Android.", "description": "Android.",
"type": "string", "type": "string",
"enum": [ "const": "android"
"android"
]
}, },
{ {
"description": "iOS.", "description": "iOS.",
"type": "string", "type": "string",
"enum": [ "const": "iOS"
"iOS"
]
}
]
},
"PermissionKind": {
"type": "string",
"oneOf": [
{
"description": "Enables the disable command without any pre-configured scope.",
"type": "string",
"const": "allow-disable",
"markdownDescription": "Enables the disable command without any pre-configured scope."
},
{
"description": "Denies the disable command without any pre-configured scope.",
"type": "string",
"const": "deny-disable",
"markdownDescription": "Denies the disable command without any pre-configured scope."
},
{
"description": "Enables the enable command without any pre-configured scope.",
"type": "string",
"const": "allow-enable",
"markdownDescription": "Enables the enable command without any pre-configured scope."
},
{
"description": "Denies the enable command without any pre-configured scope.",
"type": "string",
"const": "deny-enable",
"markdownDescription": "Denies the enable command without any pre-configured scope."
},
{
"description": "Enables the is_enabled command without any pre-configured scope.",
"type": "string",
"const": "allow-is-enabled",
"markdownDescription": "Enables the is_enabled command without any pre-configured scope."
},
{
"description": "Denies the is_enabled command without any pre-configured scope.",
"type": "string",
"const": "deny-is-enabled",
"markdownDescription": "Denies the is_enabled command without any pre-configured scope."
},
{
"description": "This permission set configures if your\napplication can enable or disable auto\nstarting the application on boot.\n\n#### Granted Permissions\n\nIt allows all to check, enable and\ndisable the automatic start on boot.\n\n\n#### This default permission set includes:\n\n- `allow-enable`\n- `allow-disable`\n- `allow-is-enabled`",
"type": "string",
"const": "default",
"markdownDescription": "This permission set configures if your\napplication can enable or disable auto\nstarting the application on boot.\n\n#### Granted Permissions\n\nIt allows all to check, enable and\ndisable the automatic start on boot.\n\n\n#### This default permission set includes:\n\n- `allow-enable`\n- `allow-disable`\n- `allow-is-enabled`"
} }
] ]
} }
-4
View File
@@ -1,9 +1,5 @@
# Changelog # Changelog
## \[2.4.5]
- [`d8645ab3`](https://github.com/tauri-apps/plugins-workspace/commit/d8645ab3e5b508456681eb53275c0837db25aeee) ([#3393](https://github.com/tauri-apps/plugins-workspace/pull/3393) by [@AlexisZankowitch](https://github.com/tauri-apps/plugins-workspace/../../AlexisZankowitch)) Fixed a crash on iOS when `cancel()` is invoked by running the cancel handler on the main thread.
## \[2.4.4] ## \[2.4.4]
- [`82fbb0c7`](https://github.com/tauri-apps/plugins-workspace/commit/82fbb0c790288eca72af9ade13828ded7700ff90) ([#3221](https://github.com/tauri-apps/plugins-workspace/pull/3221)) On iOS, fixed an application crash happening when the scanner was started when user denied permission before. - [`82fbb0c7`](https://github.com/tauri-apps/plugins-workspace/commit/82fbb0c790288eca72af9ade13828ded7700ff90) ([#3221](https://github.com/tauri-apps/plugins-workspace/pull/3221)) On iOS, fixed an application crash happening when the scanner was started when user denied permission before.
+1 -1
View File
@@ -1,6 +1,6 @@
[package] [package]
name = "tauri-plugin-barcode-scanner" name = "tauri-plugin-barcode-scanner"
version = "2.4.5" version = "2.4.4"
description = "Scan QR codes, EAN-13 and other kinds of barcodes on Android and iOS" description = "Scan QR codes, EAN-13 and other kinds of barcodes on Android and iOS"
edition = { workspace = true } edition = { workspace = true }
authors = { workspace = true } authors = { workspace = true }
@@ -337,11 +337,10 @@ class BarcodeScannerPlugin: Plugin, AVCaptureMetadataOutputObjectsDelegate {
} }
@objc private func cancel(_ invoke: Invoke) { @objc private func cancel(_ invoke: Invoke) {
DispatchQueue.main.async { [self] in self.invoke?.reject("cancelled")
self.invoke?.reject("cancelled")
self.destroy() destroy()
invoke.resolve() invoke.resolve()
}
} }
} }
+1 -1
View File
@@ -1,6 +1,6 @@
{ {
"name": "@tauri-apps/plugin-barcode-scanner", "name": "@tauri-apps/plugin-barcode-scanner",
"version": "2.4.5", "version": "2.4.4",
"description": "Scan QR codes, EAN-13 and other kinds of barcodes on Android and iOS", "description": "Scan QR codes, EAN-13 and other kinds of barcodes on Android and iOS",
"license": "MIT OR Apache-2.0", "license": "MIT OR Apache-2.0",
"authors": [ "authors": [
@@ -1,13 +0,0 @@
# Automatically generated - DO NOT EDIT!
"$schema" = "../../schemas/schema.json"
[[permission]]
identifier = "allow-cancel"
description = "Enables the cancel command without any pre-configured scope."
commands.allow = ["cancel"]
[[permission]]
identifier = "deny-cancel"
description = "Denies the cancel command without any pre-configured scope."
commands.deny = ["cancel"]
@@ -1,13 +0,0 @@
# Automatically generated - DO NOT EDIT!
"$schema" = "../../schemas/schema.json"
[[permission]]
identifier = "allow-check-permissions"
description = "Enables the check_permissions command without any pre-configured scope."
commands.allow = ["check_permissions"]
[[permission]]
identifier = "deny-check-permissions"
description = "Denies the check_permissions command without any pre-configured scope."
commands.deny = ["check_permissions"]
@@ -0,0 +1,5 @@
# Automatically generated - DO NOT EDIT!
"$schema" = "../../schemas/schema.json"
commands = ["scan","cancel","request_permissions","check_permissions","open_app_settings","vibrate"]
@@ -1,13 +0,0 @@
# Automatically generated - DO NOT EDIT!
"$schema" = "../../schemas/schema.json"
[[permission]]
identifier = "allow-open-app-settings"
description = "Enables the open_app_settings command without any pre-configured scope."
commands.allow = ["open_app_settings"]
[[permission]]
identifier = "deny-open-app-settings"
description = "Denies the open_app_settings command without any pre-configured scope."
commands.deny = ["open_app_settings"]
@@ -1,13 +0,0 @@
# Automatically generated - DO NOT EDIT!
"$schema" = "../../schemas/schema.json"
[[permission]]
identifier = "allow-request-permissions"
description = "Enables the request_permissions command without any pre-configured scope."
commands.allow = ["request_permissions"]
[[permission]]
identifier = "deny-request-permissions"
description = "Denies the request_permissions command without any pre-configured scope."
commands.deny = ["request_permissions"]
@@ -1,13 +0,0 @@
# Automatically generated - DO NOT EDIT!
"$schema" = "../../schemas/schema.json"
[[permission]]
identifier = "allow-scan"
description = "Enables the scan command without any pre-configured scope."
commands.allow = ["scan"]
[[permission]]
identifier = "deny-scan"
description = "Denies the scan command without any pre-configured scope."
commands.deny = ["scan"]
@@ -1,13 +0,0 @@
# Automatically generated - DO NOT EDIT!
"$schema" = "../../schemas/schema.json"
[[permission]]
identifier = "allow-vibrate"
description = "Enables the vibrate command without any pre-configured scope."
commands.allow = ["vibrate"]
[[permission]]
identifier = "deny-vibrate"
description = "Denies the vibrate command without any pre-configured scope."
commands.deny = ["vibrate"]
@@ -24,10 +24,17 @@
}, },
"permission": { "permission": {
"description": "A list of inlined permissions", "description": "A list of inlined permissions",
"default": [],
"type": "array", "type": "array",
"items": { "items": {
"$ref": "#/definitions/Permission" "$ref": "#/definitions/Permission"
},
"default": []
},
"commands": {
"description": "A list of command names that get `allow-$command` and `deny-$command` permissions\nautogenerated on demand instead of being stored as explicit permissions.\n\nSee [`Manifest::command_permission`] and the ACL resolver for how these are expanded.",
"type": "array",
"items": {
"type": "string"
} }
} }
}, },
@@ -35,9 +42,6 @@
"DefaultPermission": { "DefaultPermission": {
"description": "The default permission set of the plugin.\n\nWorks similarly to a permission with the \"default\" identifier.", "description": "The default permission set of the plugin.\n\nWorks similarly to a permission with the \"default\" identifier.",
"type": "object", "type": "object",
"required": [
"permissions"
],
"properties": { "properties": {
"version": { "version": {
"description": "The version of the permission.", "description": "The version of the permission.",
@@ -46,10 +50,10 @@
"null" "null"
], ],
"format": "uint64", "format": "uint64",
"minimum": 1.0 "minimum": 1
}, },
"description": { "description": {
"description": "Human-readable description of what the permission does. Tauri convention is to use `<h4>` headings in markdown content for Tauri documentation generation purposes.", "description": "Human-readable description of what the permission does.\nTauri convention is to use `<h4>` headings in markdown content\nfor Tauri documentation generation purposes.",
"type": [ "type": [
"string", "string",
"null" "null"
@@ -62,16 +66,14 @@
"type": "string" "type": "string"
} }
} }
} },
"required": [
"permissions"
]
}, },
"PermissionSet": { "PermissionSet": {
"description": "A set of direct permissions grouped together under a new name.", "description": "A set of direct permissions grouped together under a new name.",
"type": "object", "type": "object",
"required": [
"description",
"identifier",
"permissions"
],
"properties": { "properties": {
"identifier": { "identifier": {
"description": "A unique identifier for the permission.", "description": "A unique identifier for the permission.",
@@ -85,17 +87,19 @@
"description": "All permissions this set contains.", "description": "All permissions this set contains.",
"type": "array", "type": "array",
"items": { "items": {
"$ref": "#/definitions/PermissionKind" "type": "string"
} }
} }
} },
"required": [
"identifier",
"description",
"permissions"
]
}, },
"Permission": { "Permission": {
"description": "Descriptions of explicit privileges of commands.\n\nIt can enable commands to be accessible in the frontend of the application.\n\nIf the scope is defined it can be used to fine grain control the access of individual or multiple commands.", "description": "Descriptions of explicit privileges of commands.\n\nIt can enable commands to be accessible in the frontend of the application.\n\nIf the scope is defined it can be used to fine grain control the access of individual or multiple commands.",
"type": "object", "type": "object",
"required": [
"identifier"
],
"properties": { "properties": {
"version": { "version": {
"description": "The version of the permission.", "description": "The version of the permission.",
@@ -104,14 +108,14 @@
"null" "null"
], ],
"format": "uint64", "format": "uint64",
"minimum": 1.0 "minimum": 1
}, },
"identifier": { "identifier": {
"description": "A unique identifier for the permission.", "description": "A unique identifier for the permission.",
"type": "string" "type": "string"
}, },
"description": { "description": {
"description": "Human-readable description of what the permission does. Tauri internal convention is to use `<h4>` headings in markdown content for Tauri documentation generation purposes.", "description": "Human-readable description of what the permission does.\nTauri internal convention is to use `<h4>` headings in markdown content\nfor Tauri documentation generation purposes.",
"type": [ "type": [
"string", "string",
"null" "null"
@@ -147,7 +151,10 @@
"$ref": "#/definitions/Target" "$ref": "#/definitions/Target"
} }
} }
} },
"required": [
"identifier"
]
}, },
"Commands": { "Commands": {
"description": "Allowed and denied commands inside a permission.\n\nIf two commands clash inside of `allow` and `deny`, it should be denied by default.", "description": "Allowed and denied commands inside a permission.\n\nIf two commands clash inside of `allow` and `deny`, it should be denied by default.",
@@ -155,24 +162,24 @@
"properties": { "properties": {
"allow": { "allow": {
"description": "Allowed command.", "description": "Allowed command.",
"default": [],
"type": "array", "type": "array",
"items": { "items": {
"type": "string" "type": "string"
} },
"default": []
}, },
"deny": { "deny": {
"description": "Denied command, which takes priority.", "description": "Denied command, which takes priority.",
"default": [],
"type": "array", "type": "array",
"items": { "items": {
"type": "string" "type": "string"
} },
"default": []
} }
} }
}, },
"Scopes": { "Scopes": {
"description": "An argument for fine grained behavior control of Tauri commands.\n\nIt can be of any serde serializable type and is used to allow or prevent certain actions inside a Tauri command. The configured scope is passed to the command and will be enforced by the command implementation.\n\n## Example\n\n```json { \"allow\": [{ \"path\": \"$HOME/**\" }], \"deny\": [{ \"path\": \"$HOME/secret.txt\" }] } ```", "description": "An argument for fine grained behavior control of Tauri commands.\n\nIt can be of any serde serializable type and is used to allow or prevent certain actions inside a Tauri command.\nThe configured scope is passed to the command and will be enforced by the command implementation.\n\n## Example\n\n```json\n{\n \"allow\": [{ \"path\": \"$HOME/**\" }],\n \"deny\": [{ \"path\": \"$HOME/secret.txt\" }]\n}\n```",
"type": "object", "type": "object",
"properties": { "properties": {
"allow": { "allow": {
@@ -257,120 +264,27 @@
{ {
"description": "MacOS.", "description": "MacOS.",
"type": "string", "type": "string",
"enum": [ "const": "macOS"
"macOS"
]
}, },
{ {
"description": "Windows.", "description": "Windows.",
"type": "string", "type": "string",
"enum": [ "const": "windows"
"windows"
]
}, },
{ {
"description": "Linux.", "description": "Linux.",
"type": "string", "type": "string",
"enum": [ "const": "linux"
"linux"
]
}, },
{ {
"description": "Android.", "description": "Android.",
"type": "string", "type": "string",
"enum": [ "const": "android"
"android"
]
}, },
{ {
"description": "iOS.", "description": "iOS.",
"type": "string", "type": "string",
"enum": [ "const": "iOS"
"iOS"
]
}
]
},
"PermissionKind": {
"type": "string",
"oneOf": [
{
"description": "Enables the cancel command without any pre-configured scope.",
"type": "string",
"const": "allow-cancel",
"markdownDescription": "Enables the cancel command without any pre-configured scope."
},
{
"description": "Denies the cancel command without any pre-configured scope.",
"type": "string",
"const": "deny-cancel",
"markdownDescription": "Denies the cancel command without any pre-configured scope."
},
{
"description": "Enables the check_permissions command without any pre-configured scope.",
"type": "string",
"const": "allow-check-permissions",
"markdownDescription": "Enables the check_permissions command without any pre-configured scope."
},
{
"description": "Denies the check_permissions command without any pre-configured scope.",
"type": "string",
"const": "deny-check-permissions",
"markdownDescription": "Denies the check_permissions command without any pre-configured scope."
},
{
"description": "Enables the open_app_settings command without any pre-configured scope.",
"type": "string",
"const": "allow-open-app-settings",
"markdownDescription": "Enables the open_app_settings command without any pre-configured scope."
},
{
"description": "Denies the open_app_settings command without any pre-configured scope.",
"type": "string",
"const": "deny-open-app-settings",
"markdownDescription": "Denies the open_app_settings command without any pre-configured scope."
},
{
"description": "Enables the request_permissions command without any pre-configured scope.",
"type": "string",
"const": "allow-request-permissions",
"markdownDescription": "Enables the request_permissions command without any pre-configured scope."
},
{
"description": "Denies the request_permissions command without any pre-configured scope.",
"type": "string",
"const": "deny-request-permissions",
"markdownDescription": "Denies the request_permissions command without any pre-configured scope."
},
{
"description": "Enables the scan command without any pre-configured scope.",
"type": "string",
"const": "allow-scan",
"markdownDescription": "Enables the scan command without any pre-configured scope."
},
{
"description": "Denies the scan command without any pre-configured scope.",
"type": "string",
"const": "deny-scan",
"markdownDescription": "Denies the scan command without any pre-configured scope."
},
{
"description": "Enables the vibrate command without any pre-configured scope.",
"type": "string",
"const": "allow-vibrate",
"markdownDescription": "Enables the vibrate command without any pre-configured scope."
},
{
"description": "Denies the vibrate command without any pre-configured scope.",
"type": "string",
"const": "deny-vibrate",
"markdownDescription": "Denies the vibrate command without any pre-configured scope."
},
{
"description": "This permission set configures which\nbarcode scanning features are by default exposed.\n\n#### Granted Permissions\n\nIt allows all barcode related features.\n\n\n#### This default permission set includes:\n\n- `allow-cancel`\n- `allow-check-permissions`\n- `allow-open-app-settings`\n- `allow-request-permissions`\n- `allow-scan`\n- `allow-vibrate`",
"type": "string",
"const": "default",
"markdownDescription": "This permission set configures which\nbarcode scanning features are by default exposed.\n\n#### Granted Permissions\n\nIt allows all barcode related features.\n\n\n#### This default permission set includes:\n\n- `allow-cancel`\n- `allow-check-permissions`\n- `allow-open-app-settings`\n- `allow-request-permissions`\n- `allow-scan`\n- `allow-vibrate`"
} }
] ]
} }
@@ -1,13 +0,0 @@
# Automatically generated - DO NOT EDIT!
"$schema" = "../../schemas/schema.json"
[[permission]]
identifier = "allow-authenticate"
description = "Enables the authenticate command without any pre-configured scope."
commands.allow = ["authenticate"]
[[permission]]
identifier = "deny-authenticate"
description = "Denies the authenticate command without any pre-configured scope."
commands.deny = ["authenticate"]
@@ -0,0 +1,5 @@
# Automatically generated - DO NOT EDIT!
"$schema" = "../../schemas/schema.json"
commands = ["authenticate","status"]
@@ -1,13 +0,0 @@
# Automatically generated - DO NOT EDIT!
"$schema" = "../../schemas/schema.json"
[[permission]]
identifier = "allow-status"
description = "Enables the status command without any pre-configured scope."
commands.allow = ["status"]
[[permission]]
identifier = "deny-status"
description = "Denies the status command without any pre-configured scope."
commands.deny = ["status"]
@@ -24,10 +24,17 @@
}, },
"permission": { "permission": {
"description": "A list of inlined permissions", "description": "A list of inlined permissions",
"default": [],
"type": "array", "type": "array",
"items": { "items": {
"$ref": "#/definitions/Permission" "$ref": "#/definitions/Permission"
},
"default": []
},
"commands": {
"description": "A list of command names that get `allow-$command` and `deny-$command` permissions\nautogenerated on demand instead of being stored as explicit permissions.\n\nSee [`Manifest::command_permission`] and the ACL resolver for how these are expanded.",
"type": "array",
"items": {
"type": "string"
} }
} }
}, },
@@ -35,9 +42,6 @@
"DefaultPermission": { "DefaultPermission": {
"description": "The default permission set of the plugin.\n\nWorks similarly to a permission with the \"default\" identifier.", "description": "The default permission set of the plugin.\n\nWorks similarly to a permission with the \"default\" identifier.",
"type": "object", "type": "object",
"required": [
"permissions"
],
"properties": { "properties": {
"version": { "version": {
"description": "The version of the permission.", "description": "The version of the permission.",
@@ -46,10 +50,10 @@
"null" "null"
], ],
"format": "uint64", "format": "uint64",
"minimum": 1.0 "minimum": 1
}, },
"description": { "description": {
"description": "Human-readable description of what the permission does. Tauri convention is to use `<h4>` headings in markdown content for Tauri documentation generation purposes.", "description": "Human-readable description of what the permission does.\nTauri convention is to use `<h4>` headings in markdown content\nfor Tauri documentation generation purposes.",
"type": [ "type": [
"string", "string",
"null" "null"
@@ -62,16 +66,14 @@
"type": "string" "type": "string"
} }
} }
} },
"required": [
"permissions"
]
}, },
"PermissionSet": { "PermissionSet": {
"description": "A set of direct permissions grouped together under a new name.", "description": "A set of direct permissions grouped together under a new name.",
"type": "object", "type": "object",
"required": [
"description",
"identifier",
"permissions"
],
"properties": { "properties": {
"identifier": { "identifier": {
"description": "A unique identifier for the permission.", "description": "A unique identifier for the permission.",
@@ -85,17 +87,19 @@
"description": "All permissions this set contains.", "description": "All permissions this set contains.",
"type": "array", "type": "array",
"items": { "items": {
"$ref": "#/definitions/PermissionKind" "type": "string"
} }
} }
} },
"required": [
"identifier",
"description",
"permissions"
]
}, },
"Permission": { "Permission": {
"description": "Descriptions of explicit privileges of commands.\n\nIt can enable commands to be accessible in the frontend of the application.\n\nIf the scope is defined it can be used to fine grain control the access of individual or multiple commands.", "description": "Descriptions of explicit privileges of commands.\n\nIt can enable commands to be accessible in the frontend of the application.\n\nIf the scope is defined it can be used to fine grain control the access of individual or multiple commands.",
"type": "object", "type": "object",
"required": [
"identifier"
],
"properties": { "properties": {
"version": { "version": {
"description": "The version of the permission.", "description": "The version of the permission.",
@@ -104,14 +108,14 @@
"null" "null"
], ],
"format": "uint64", "format": "uint64",
"minimum": 1.0 "minimum": 1
}, },
"identifier": { "identifier": {
"description": "A unique identifier for the permission.", "description": "A unique identifier for the permission.",
"type": "string" "type": "string"
}, },
"description": { "description": {
"description": "Human-readable description of what the permission does. Tauri internal convention is to use `<h4>` headings in markdown content for Tauri documentation generation purposes.", "description": "Human-readable description of what the permission does.\nTauri internal convention is to use `<h4>` headings in markdown content\nfor Tauri documentation generation purposes.",
"type": [ "type": [
"string", "string",
"null" "null"
@@ -147,7 +151,10 @@
"$ref": "#/definitions/Target" "$ref": "#/definitions/Target"
} }
} }
} },
"required": [
"identifier"
]
}, },
"Commands": { "Commands": {
"description": "Allowed and denied commands inside a permission.\n\nIf two commands clash inside of `allow` and `deny`, it should be denied by default.", "description": "Allowed and denied commands inside a permission.\n\nIf two commands clash inside of `allow` and `deny`, it should be denied by default.",
@@ -155,24 +162,24 @@
"properties": { "properties": {
"allow": { "allow": {
"description": "Allowed command.", "description": "Allowed command.",
"default": [],
"type": "array", "type": "array",
"items": { "items": {
"type": "string" "type": "string"
} },
"default": []
}, },
"deny": { "deny": {
"description": "Denied command, which takes priority.", "description": "Denied command, which takes priority.",
"default": [],
"type": "array", "type": "array",
"items": { "items": {
"type": "string" "type": "string"
} },
"default": []
} }
} }
}, },
"Scopes": { "Scopes": {
"description": "An argument for fine grained behavior control of Tauri commands.\n\nIt can be of any serde serializable type and is used to allow or prevent certain actions inside a Tauri command. The configured scope is passed to the command and will be enforced by the command implementation.\n\n## Example\n\n```json { \"allow\": [{ \"path\": \"$HOME/**\" }], \"deny\": [{ \"path\": \"$HOME/secret.txt\" }] } ```", "description": "An argument for fine grained behavior control of Tauri commands.\n\nIt can be of any serde serializable type and is used to allow or prevent certain actions inside a Tauri command.\nThe configured scope is passed to the command and will be enforced by the command implementation.\n\n## Example\n\n```json\n{\n \"allow\": [{ \"path\": \"$HOME/**\" }],\n \"deny\": [{ \"path\": \"$HOME/secret.txt\" }]\n}\n```",
"type": "object", "type": "object",
"properties": { "properties": {
"allow": { "allow": {
@@ -257,72 +264,27 @@
{ {
"description": "MacOS.", "description": "MacOS.",
"type": "string", "type": "string",
"enum": [ "const": "macOS"
"macOS"
]
}, },
{ {
"description": "Windows.", "description": "Windows.",
"type": "string", "type": "string",
"enum": [ "const": "windows"
"windows"
]
}, },
{ {
"description": "Linux.", "description": "Linux.",
"type": "string", "type": "string",
"enum": [ "const": "linux"
"linux"
]
}, },
{ {
"description": "Android.", "description": "Android.",
"type": "string", "type": "string",
"enum": [ "const": "android"
"android"
]
}, },
{ {
"description": "iOS.", "description": "iOS.",
"type": "string", "type": "string",
"enum": [ "const": "iOS"
"iOS"
]
}
]
},
"PermissionKind": {
"type": "string",
"oneOf": [
{
"description": "Enables the authenticate command without any pre-configured scope.",
"type": "string",
"const": "allow-authenticate",
"markdownDescription": "Enables the authenticate command without any pre-configured scope."
},
{
"description": "Denies the authenticate command without any pre-configured scope.",
"type": "string",
"const": "deny-authenticate",
"markdownDescription": "Denies the authenticate command without any pre-configured scope."
},
{
"description": "Enables the status command without any pre-configured scope.",
"type": "string",
"const": "allow-status",
"markdownDescription": "Enables the status command without any pre-configured scope."
},
{
"description": "Denies the status command without any pre-configured scope.",
"type": "string",
"const": "deny-status",
"markdownDescription": "Denies the status command without any pre-configured scope."
},
{
"description": "This permission set configures which\nbiometric features are by default exposed.\n\n#### Granted Permissions\n\nIt allows acccess to all biometric commands.\n\n\n#### This default permission set includes:\n\n- `allow-authenticate`\n- `allow-status`",
"type": "string",
"const": "default",
"markdownDescription": "This permission set configures which\nbiometric features are by default exposed.\n\n#### Granted Permissions\n\nIt allows acccess to all biometric commands.\n\n\n#### This default permission set includes:\n\n- `allow-authenticate`\n- `allow-status`"
} }
] ]
} }
@@ -1,13 +0,0 @@
# Automatically generated - DO NOT EDIT!
"$schema" = "../../schemas/schema.json"
[[permission]]
identifier = "allow-cli-matches"
description = "Enables the cli_matches command without any pre-configured scope."
commands.allow = ["cli_matches"]
[[permission]]
identifier = "deny-cli-matches"
description = "Denies the cli_matches command without any pre-configured scope."
commands.deny = ["cli_matches"]
@@ -0,0 +1,5 @@
# Automatically generated - DO NOT EDIT!
"$schema" = "../../schemas/schema.json"
commands = ["cli_matches"]
+37 -63
View File
@@ -24,10 +24,17 @@
}, },
"permission": { "permission": {
"description": "A list of inlined permissions", "description": "A list of inlined permissions",
"default": [],
"type": "array", "type": "array",
"items": { "items": {
"$ref": "#/definitions/Permission" "$ref": "#/definitions/Permission"
},
"default": []
},
"commands": {
"description": "A list of command names that get `allow-$command` and `deny-$command` permissions\nautogenerated on demand instead of being stored as explicit permissions.\n\nSee [`Manifest::command_permission`] and the ACL resolver for how these are expanded.",
"type": "array",
"items": {
"type": "string"
} }
} }
}, },
@@ -35,9 +42,6 @@
"DefaultPermission": { "DefaultPermission": {
"description": "The default permission set of the plugin.\n\nWorks similarly to a permission with the \"default\" identifier.", "description": "The default permission set of the plugin.\n\nWorks similarly to a permission with the \"default\" identifier.",
"type": "object", "type": "object",
"required": [
"permissions"
],
"properties": { "properties": {
"version": { "version": {
"description": "The version of the permission.", "description": "The version of the permission.",
@@ -46,10 +50,10 @@
"null" "null"
], ],
"format": "uint64", "format": "uint64",
"minimum": 1.0 "minimum": 1
}, },
"description": { "description": {
"description": "Human-readable description of what the permission does. Tauri convention is to use `<h4>` headings in markdown content for Tauri documentation generation purposes.", "description": "Human-readable description of what the permission does.\nTauri convention is to use `<h4>` headings in markdown content\nfor Tauri documentation generation purposes.",
"type": [ "type": [
"string", "string",
"null" "null"
@@ -62,16 +66,14 @@
"type": "string" "type": "string"
} }
} }
} },
"required": [
"permissions"
]
}, },
"PermissionSet": { "PermissionSet": {
"description": "A set of direct permissions grouped together under a new name.", "description": "A set of direct permissions grouped together under a new name.",
"type": "object", "type": "object",
"required": [
"description",
"identifier",
"permissions"
],
"properties": { "properties": {
"identifier": { "identifier": {
"description": "A unique identifier for the permission.", "description": "A unique identifier for the permission.",
@@ -85,17 +87,19 @@
"description": "All permissions this set contains.", "description": "All permissions this set contains.",
"type": "array", "type": "array",
"items": { "items": {
"$ref": "#/definitions/PermissionKind" "type": "string"
} }
} }
} },
"required": [
"identifier",
"description",
"permissions"
]
}, },
"Permission": { "Permission": {
"description": "Descriptions of explicit privileges of commands.\n\nIt can enable commands to be accessible in the frontend of the application.\n\nIf the scope is defined it can be used to fine grain control the access of individual or multiple commands.", "description": "Descriptions of explicit privileges of commands.\n\nIt can enable commands to be accessible in the frontend of the application.\n\nIf the scope is defined it can be used to fine grain control the access of individual or multiple commands.",
"type": "object", "type": "object",
"required": [
"identifier"
],
"properties": { "properties": {
"version": { "version": {
"description": "The version of the permission.", "description": "The version of the permission.",
@@ -104,14 +108,14 @@
"null" "null"
], ],
"format": "uint64", "format": "uint64",
"minimum": 1.0 "minimum": 1
}, },
"identifier": { "identifier": {
"description": "A unique identifier for the permission.", "description": "A unique identifier for the permission.",
"type": "string" "type": "string"
}, },
"description": { "description": {
"description": "Human-readable description of what the permission does. Tauri internal convention is to use `<h4>` headings in markdown content for Tauri documentation generation purposes.", "description": "Human-readable description of what the permission does.\nTauri internal convention is to use `<h4>` headings in markdown content\nfor Tauri documentation generation purposes.",
"type": [ "type": [
"string", "string",
"null" "null"
@@ -147,7 +151,10 @@
"$ref": "#/definitions/Target" "$ref": "#/definitions/Target"
} }
} }
} },
"required": [
"identifier"
]
}, },
"Commands": { "Commands": {
"description": "Allowed and denied commands inside a permission.\n\nIf two commands clash inside of `allow` and `deny`, it should be denied by default.", "description": "Allowed and denied commands inside a permission.\n\nIf two commands clash inside of `allow` and `deny`, it should be denied by default.",
@@ -155,24 +162,24 @@
"properties": { "properties": {
"allow": { "allow": {
"description": "Allowed command.", "description": "Allowed command.",
"default": [],
"type": "array", "type": "array",
"items": { "items": {
"type": "string" "type": "string"
} },
"default": []
}, },
"deny": { "deny": {
"description": "Denied command, which takes priority.", "description": "Denied command, which takes priority.",
"default": [],
"type": "array", "type": "array",
"items": { "items": {
"type": "string" "type": "string"
} },
"default": []
} }
} }
}, },
"Scopes": { "Scopes": {
"description": "An argument for fine grained behavior control of Tauri commands.\n\nIt can be of any serde serializable type and is used to allow or prevent certain actions inside a Tauri command. The configured scope is passed to the command and will be enforced by the command implementation.\n\n## Example\n\n```json { \"allow\": [{ \"path\": \"$HOME/**\" }], \"deny\": [{ \"path\": \"$HOME/secret.txt\" }] } ```", "description": "An argument for fine grained behavior control of Tauri commands.\n\nIt can be of any serde serializable type and is used to allow or prevent certain actions inside a Tauri command.\nThe configured scope is passed to the command and will be enforced by the command implementation.\n\n## Example\n\n```json\n{\n \"allow\": [{ \"path\": \"$HOME/**\" }],\n \"deny\": [{ \"path\": \"$HOME/secret.txt\" }]\n}\n```",
"type": "object", "type": "object",
"properties": { "properties": {
"allow": { "allow": {
@@ -257,60 +264,27 @@
{ {
"description": "MacOS.", "description": "MacOS.",
"type": "string", "type": "string",
"enum": [ "const": "macOS"
"macOS"
]
}, },
{ {
"description": "Windows.", "description": "Windows.",
"type": "string", "type": "string",
"enum": [ "const": "windows"
"windows"
]
}, },
{ {
"description": "Linux.", "description": "Linux.",
"type": "string", "type": "string",
"enum": [ "const": "linux"
"linux"
]
}, },
{ {
"description": "Android.", "description": "Android.",
"type": "string", "type": "string",
"enum": [ "const": "android"
"android"
]
}, },
{ {
"description": "iOS.", "description": "iOS.",
"type": "string", "type": "string",
"enum": [ "const": "iOS"
"iOS"
]
}
]
},
"PermissionKind": {
"type": "string",
"oneOf": [
{
"description": "Enables the cli_matches command without any pre-configured scope.",
"type": "string",
"const": "allow-cli-matches",
"markdownDescription": "Enables the cli_matches command without any pre-configured scope."
},
{
"description": "Denies the cli_matches command without any pre-configured scope.",
"type": "string",
"const": "deny-cli-matches",
"markdownDescription": "Denies the cli_matches command without any pre-configured scope."
},
{
"description": "Allows reading the CLI matches\n#### This default permission set includes:\n\n- `allow-cli-matches`",
"type": "string",
"const": "default",
"markdownDescription": "Allows reading the CLI matches\n#### This default permission set includes:\n\n- `allow-cli-matches`"
} }
] ]
} }
@@ -1,13 +0,0 @@
# Automatically generated - DO NOT EDIT!
"$schema" = "../../schemas/schema.json"
[[permission]]
identifier = "allow-clear"
description = "Enables the clear command without any pre-configured scope."
commands.allow = ["clear"]
[[permission]]
identifier = "deny-clear"
description = "Denies the clear command without any pre-configured scope."
commands.deny = ["clear"]
@@ -0,0 +1,5 @@
# Automatically generated - DO NOT EDIT!
"$schema" = "../../schemas/schema.json"
commands = ["write_text","read_text","write_image","read_image","write_html","clear"]
@@ -1,13 +0,0 @@
# Automatically generated - DO NOT EDIT!
"$schema" = "../../schemas/schema.json"
[[permission]]
identifier = "allow-read-image"
description = "Enables the read_image command without any pre-configured scope."
commands.allow = ["read_image"]
[[permission]]
identifier = "deny-read-image"
description = "Denies the read_image command without any pre-configured scope."
commands.deny = ["read_image"]
@@ -1,13 +0,0 @@
# Automatically generated - DO NOT EDIT!
"$schema" = "../../schemas/schema.json"
[[permission]]
identifier = "allow-read-text"
description = "Enables the read_text command without any pre-configured scope."
commands.allow = ["read_text"]
[[permission]]
identifier = "deny-read-text"
description = "Denies the read_text command without any pre-configured scope."
commands.deny = ["read_text"]
@@ -1,13 +0,0 @@
# Automatically generated - DO NOT EDIT!
"$schema" = "../../schemas/schema.json"
[[permission]]
identifier = "allow-write-html"
description = "Enables the write_html command without any pre-configured scope."
commands.allow = ["write_html"]
[[permission]]
identifier = "deny-write-html"
description = "Denies the write_html command without any pre-configured scope."
commands.deny = ["write_html"]
@@ -1,13 +0,0 @@
# Automatically generated - DO NOT EDIT!
"$schema" = "../../schemas/schema.json"
[[permission]]
identifier = "allow-write-image"
description = "Enables the write_image command without any pre-configured scope."
commands.allow = ["write_image"]
[[permission]]
identifier = "deny-write-image"
description = "Denies the write_image command without any pre-configured scope."
commands.deny = ["write_image"]
@@ -1,13 +0,0 @@
# Automatically generated - DO NOT EDIT!
"$schema" = "../../schemas/schema.json"
[[permission]]
identifier = "allow-write-text"
description = "Enables the write_text command without any pre-configured scope."
commands.allow = ["write_text"]
[[permission]]
identifier = "deny-write-text"
description = "Denies the write_text command without any pre-configured scope."
commands.deny = ["write_text"]
@@ -24,10 +24,17 @@
}, },
"permission": { "permission": {
"description": "A list of inlined permissions", "description": "A list of inlined permissions",
"default": [],
"type": "array", "type": "array",
"items": { "items": {
"$ref": "#/definitions/Permission" "$ref": "#/definitions/Permission"
},
"default": []
},
"commands": {
"description": "A list of command names that get `allow-$command` and `deny-$command` permissions\nautogenerated on demand instead of being stored as explicit permissions.\n\nSee [`Manifest::command_permission`] and the ACL resolver for how these are expanded.",
"type": "array",
"items": {
"type": "string"
} }
} }
}, },
@@ -35,9 +42,6 @@
"DefaultPermission": { "DefaultPermission": {
"description": "The default permission set of the plugin.\n\nWorks similarly to a permission with the \"default\" identifier.", "description": "The default permission set of the plugin.\n\nWorks similarly to a permission with the \"default\" identifier.",
"type": "object", "type": "object",
"required": [
"permissions"
],
"properties": { "properties": {
"version": { "version": {
"description": "The version of the permission.", "description": "The version of the permission.",
@@ -46,10 +50,10 @@
"null" "null"
], ],
"format": "uint64", "format": "uint64",
"minimum": 1.0 "minimum": 1
}, },
"description": { "description": {
"description": "Human-readable description of what the permission does. Tauri convention is to use `<h4>` headings in markdown content for Tauri documentation generation purposes.", "description": "Human-readable description of what the permission does.\nTauri convention is to use `<h4>` headings in markdown content\nfor Tauri documentation generation purposes.",
"type": [ "type": [
"string", "string",
"null" "null"
@@ -62,16 +66,14 @@
"type": "string" "type": "string"
} }
} }
} },
"required": [
"permissions"
]
}, },
"PermissionSet": { "PermissionSet": {
"description": "A set of direct permissions grouped together under a new name.", "description": "A set of direct permissions grouped together under a new name.",
"type": "object", "type": "object",
"required": [
"description",
"identifier",
"permissions"
],
"properties": { "properties": {
"identifier": { "identifier": {
"description": "A unique identifier for the permission.", "description": "A unique identifier for the permission.",
@@ -85,17 +87,19 @@
"description": "All permissions this set contains.", "description": "All permissions this set contains.",
"type": "array", "type": "array",
"items": { "items": {
"$ref": "#/definitions/PermissionKind" "type": "string"
} }
} }
} },
"required": [
"identifier",
"description",
"permissions"
]
}, },
"Permission": { "Permission": {
"description": "Descriptions of explicit privileges of commands.\n\nIt can enable commands to be accessible in the frontend of the application.\n\nIf the scope is defined it can be used to fine grain control the access of individual or multiple commands.", "description": "Descriptions of explicit privileges of commands.\n\nIt can enable commands to be accessible in the frontend of the application.\n\nIf the scope is defined it can be used to fine grain control the access of individual or multiple commands.",
"type": "object", "type": "object",
"required": [
"identifier"
],
"properties": { "properties": {
"version": { "version": {
"description": "The version of the permission.", "description": "The version of the permission.",
@@ -104,14 +108,14 @@
"null" "null"
], ],
"format": "uint64", "format": "uint64",
"minimum": 1.0 "minimum": 1
}, },
"identifier": { "identifier": {
"description": "A unique identifier for the permission.", "description": "A unique identifier for the permission.",
"type": "string" "type": "string"
}, },
"description": { "description": {
"description": "Human-readable description of what the permission does. Tauri internal convention is to use `<h4>` headings in markdown content for Tauri documentation generation purposes.", "description": "Human-readable description of what the permission does.\nTauri internal convention is to use `<h4>` headings in markdown content\nfor Tauri documentation generation purposes.",
"type": [ "type": [
"string", "string",
"null" "null"
@@ -147,7 +151,10 @@
"$ref": "#/definitions/Target" "$ref": "#/definitions/Target"
} }
} }
} },
"required": [
"identifier"
]
}, },
"Commands": { "Commands": {
"description": "Allowed and denied commands inside a permission.\n\nIf two commands clash inside of `allow` and `deny`, it should be denied by default.", "description": "Allowed and denied commands inside a permission.\n\nIf two commands clash inside of `allow` and `deny`, it should be denied by default.",
@@ -155,24 +162,24 @@
"properties": { "properties": {
"allow": { "allow": {
"description": "Allowed command.", "description": "Allowed command.",
"default": [],
"type": "array", "type": "array",
"items": { "items": {
"type": "string" "type": "string"
} },
"default": []
}, },
"deny": { "deny": {
"description": "Denied command, which takes priority.", "description": "Denied command, which takes priority.",
"default": [],
"type": "array", "type": "array",
"items": { "items": {
"type": "string" "type": "string"
} },
"default": []
} }
} }
}, },
"Scopes": { "Scopes": {
"description": "An argument for fine grained behavior control of Tauri commands.\n\nIt can be of any serde serializable type and is used to allow or prevent certain actions inside a Tauri command. The configured scope is passed to the command and will be enforced by the command implementation.\n\n## Example\n\n```json { \"allow\": [{ \"path\": \"$HOME/**\" }], \"deny\": [{ \"path\": \"$HOME/secret.txt\" }] } ```", "description": "An argument for fine grained behavior control of Tauri commands.\n\nIt can be of any serde serializable type and is used to allow or prevent certain actions inside a Tauri command.\nThe configured scope is passed to the command and will be enforced by the command implementation.\n\n## Example\n\n```json\n{\n \"allow\": [{ \"path\": \"$HOME/**\" }],\n \"deny\": [{ \"path\": \"$HOME/secret.txt\" }]\n}\n```",
"type": "object", "type": "object",
"properties": { "properties": {
"allow": { "allow": {
@@ -257,120 +264,27 @@
{ {
"description": "MacOS.", "description": "MacOS.",
"type": "string", "type": "string",
"enum": [ "const": "macOS"
"macOS"
]
}, },
{ {
"description": "Windows.", "description": "Windows.",
"type": "string", "type": "string",
"enum": [ "const": "windows"
"windows"
]
}, },
{ {
"description": "Linux.", "description": "Linux.",
"type": "string", "type": "string",
"enum": [ "const": "linux"
"linux"
]
}, },
{ {
"description": "Android.", "description": "Android.",
"type": "string", "type": "string",
"enum": [ "const": "android"
"android"
]
}, },
{ {
"description": "iOS.", "description": "iOS.",
"type": "string", "type": "string",
"enum": [ "const": "iOS"
"iOS"
]
}
]
},
"PermissionKind": {
"type": "string",
"oneOf": [
{
"description": "Enables the clear command without any pre-configured scope.",
"type": "string",
"const": "allow-clear",
"markdownDescription": "Enables the clear command without any pre-configured scope."
},
{
"description": "Denies the clear command without any pre-configured scope.",
"type": "string",
"const": "deny-clear",
"markdownDescription": "Denies the clear command without any pre-configured scope."
},
{
"description": "Enables the read_image command without any pre-configured scope.",
"type": "string",
"const": "allow-read-image",
"markdownDescription": "Enables the read_image command without any pre-configured scope."
},
{
"description": "Denies the read_image command without any pre-configured scope.",
"type": "string",
"const": "deny-read-image",
"markdownDescription": "Denies the read_image command without any pre-configured scope."
},
{
"description": "Enables the read_text command without any pre-configured scope.",
"type": "string",
"const": "allow-read-text",
"markdownDescription": "Enables the read_text command without any pre-configured scope."
},
{
"description": "Denies the read_text command without any pre-configured scope.",
"type": "string",
"const": "deny-read-text",
"markdownDescription": "Denies the read_text command without any pre-configured scope."
},
{
"description": "Enables the write_html command without any pre-configured scope.",
"type": "string",
"const": "allow-write-html",
"markdownDescription": "Enables the write_html command without any pre-configured scope."
},
{
"description": "Denies the write_html command without any pre-configured scope.",
"type": "string",
"const": "deny-write-html",
"markdownDescription": "Denies the write_html command without any pre-configured scope."
},
{
"description": "Enables the write_image command without any pre-configured scope.",
"type": "string",
"const": "allow-write-image",
"markdownDescription": "Enables the write_image command without any pre-configured scope."
},
{
"description": "Denies the write_image command without any pre-configured scope.",
"type": "string",
"const": "deny-write-image",
"markdownDescription": "Denies the write_image command without any pre-configured scope."
},
{
"description": "Enables the write_text command without any pre-configured scope.",
"type": "string",
"const": "allow-write-text",
"markdownDescription": "Enables the write_text command without any pre-configured scope."
},
{
"description": "Denies the write_text command without any pre-configured scope.",
"type": "string",
"const": "deny-write-text",
"markdownDescription": "Denies the write_text command without any pre-configured scope."
},
{
"description": "No features are enabled by default, as we believe\nthe clipboard can be inherently dangerous and it is \napplication specific if read and/or write access is needed.\n\nClipboard interaction needs to be explicitly enabled.\n",
"type": "string",
"const": "default",
"markdownDescription": "No features are enabled by default, as we believe\nthe clipboard can be inherently dangerous and it is \napplication specific if read and/or write access is needed.\n\nClipboard interaction needs to be explicitly enabled.\n"
} }
] ]
} }
+1 -1
View File
@@ -14,7 +14,7 @@
"@tauri-apps/plugin-deep-link": "2.4.9" "@tauri-apps/plugin-deep-link": "2.4.9"
}, },
"devDependencies": { "devDependencies": {
"@tauri-apps/cli": "2.11.2", "@tauri-apps/cli-cef": "3.0.0-alpha.5",
"typescript": "^6.0.0", "typescript": "^6.0.0",
"vite": "^8.0.1" "vite": "^8.0.1"
} }
+1 -1
View File
@@ -28,6 +28,6 @@
"@tauri-apps/api": "^2.11.0" "@tauri-apps/api": "^2.11.0"
}, },
"devDependencies": { "devDependencies": {
"@tauri-apps/cli": "2.11.2" "@tauri-apps/cli-cef": "3.0.0-alpha.5"
} }
} }
@@ -0,0 +1,5 @@
# Automatically generated - DO NOT EDIT!
"$schema" = "../../schemas/schema.json"
commands = ["get_current","register","unregister","is_registered"]
@@ -1,13 +0,0 @@
# Automatically generated - DO NOT EDIT!
"$schema" = "../../schemas/schema.json"
[[permission]]
identifier = "allow-get-current"
description = "Enables the get_current command without any pre-configured scope."
commands.allow = ["get_current"]
[[permission]]
identifier = "deny-get-current"
description = "Denies the get_current command without any pre-configured scope."
commands.deny = ["get_current"]
@@ -1,13 +0,0 @@
# Automatically generated - DO NOT EDIT!
"$schema" = "../../schemas/schema.json"
[[permission]]
identifier = "allow-is-registered"
description = "Enables the is_registered command without any pre-configured scope."
commands.allow = ["is_registered"]
[[permission]]
identifier = "deny-is-registered"
description = "Denies the is_registered command without any pre-configured scope."
commands.deny = ["is_registered"]
@@ -1,13 +0,0 @@
# Automatically generated - DO NOT EDIT!
"$schema" = "../../schemas/schema.json"
[[permission]]
identifier = "allow-register"
description = "Enables the register command without any pre-configured scope."
commands.allow = ["register"]
[[permission]]
identifier = "deny-register"
description = "Denies the register command without any pre-configured scope."
commands.deny = ["register"]
@@ -1,13 +0,0 @@
# Automatically generated - DO NOT EDIT!
"$schema" = "../../schemas/schema.json"
[[permission]]
identifier = "allow-unregister"
description = "Enables the unregister command without any pre-configured scope."
commands.allow = ["unregister"]
[[permission]]
identifier = "deny-unregister"
description = "Denies the unregister command without any pre-configured scope."
commands.deny = ["unregister"]
@@ -24,10 +24,17 @@
}, },
"permission": { "permission": {
"description": "A list of inlined permissions", "description": "A list of inlined permissions",
"default": [],
"type": "array", "type": "array",
"items": { "items": {
"$ref": "#/definitions/Permission" "$ref": "#/definitions/Permission"
},
"default": []
},
"commands": {
"description": "A list of command names that get `allow-$command` and `deny-$command` permissions\nautogenerated on demand instead of being stored as explicit permissions.\n\nSee [`Manifest::command_permission`] and the ACL resolver for how these are expanded.",
"type": "array",
"items": {
"type": "string"
} }
} }
}, },
@@ -35,9 +42,6 @@
"DefaultPermission": { "DefaultPermission": {
"description": "The default permission set of the plugin.\n\nWorks similarly to a permission with the \"default\" identifier.", "description": "The default permission set of the plugin.\n\nWorks similarly to a permission with the \"default\" identifier.",
"type": "object", "type": "object",
"required": [
"permissions"
],
"properties": { "properties": {
"version": { "version": {
"description": "The version of the permission.", "description": "The version of the permission.",
@@ -46,10 +50,10 @@
"null" "null"
], ],
"format": "uint64", "format": "uint64",
"minimum": 1.0 "minimum": 1
}, },
"description": { "description": {
"description": "Human-readable description of what the permission does. Tauri convention is to use `<h4>` headings in markdown content for Tauri documentation generation purposes.", "description": "Human-readable description of what the permission does.\nTauri convention is to use `<h4>` headings in markdown content\nfor Tauri documentation generation purposes.",
"type": [ "type": [
"string", "string",
"null" "null"
@@ -62,16 +66,14 @@
"type": "string" "type": "string"
} }
} }
} },
"required": [
"permissions"
]
}, },
"PermissionSet": { "PermissionSet": {
"description": "A set of direct permissions grouped together under a new name.", "description": "A set of direct permissions grouped together under a new name.",
"type": "object", "type": "object",
"required": [
"description",
"identifier",
"permissions"
],
"properties": { "properties": {
"identifier": { "identifier": {
"description": "A unique identifier for the permission.", "description": "A unique identifier for the permission.",
@@ -85,17 +87,19 @@
"description": "All permissions this set contains.", "description": "All permissions this set contains.",
"type": "array", "type": "array",
"items": { "items": {
"$ref": "#/definitions/PermissionKind" "type": "string"
} }
} }
} },
"required": [
"identifier",
"description",
"permissions"
]
}, },
"Permission": { "Permission": {
"description": "Descriptions of explicit privileges of commands.\n\nIt can enable commands to be accessible in the frontend of the application.\n\nIf the scope is defined it can be used to fine grain control the access of individual or multiple commands.", "description": "Descriptions of explicit privileges of commands.\n\nIt can enable commands to be accessible in the frontend of the application.\n\nIf the scope is defined it can be used to fine grain control the access of individual or multiple commands.",
"type": "object", "type": "object",
"required": [
"identifier"
],
"properties": { "properties": {
"version": { "version": {
"description": "The version of the permission.", "description": "The version of the permission.",
@@ -104,14 +108,14 @@
"null" "null"
], ],
"format": "uint64", "format": "uint64",
"minimum": 1.0 "minimum": 1
}, },
"identifier": { "identifier": {
"description": "A unique identifier for the permission.", "description": "A unique identifier for the permission.",
"type": "string" "type": "string"
}, },
"description": { "description": {
"description": "Human-readable description of what the permission does. Tauri internal convention is to use `<h4>` headings in markdown content for Tauri documentation generation purposes.", "description": "Human-readable description of what the permission does.\nTauri internal convention is to use `<h4>` headings in markdown content\nfor Tauri documentation generation purposes.",
"type": [ "type": [
"string", "string",
"null" "null"
@@ -147,7 +151,10 @@
"$ref": "#/definitions/Target" "$ref": "#/definitions/Target"
} }
} }
} },
"required": [
"identifier"
]
}, },
"Commands": { "Commands": {
"description": "Allowed and denied commands inside a permission.\n\nIf two commands clash inside of `allow` and `deny`, it should be denied by default.", "description": "Allowed and denied commands inside a permission.\n\nIf two commands clash inside of `allow` and `deny`, it should be denied by default.",
@@ -155,24 +162,24 @@
"properties": { "properties": {
"allow": { "allow": {
"description": "Allowed command.", "description": "Allowed command.",
"default": [],
"type": "array", "type": "array",
"items": { "items": {
"type": "string" "type": "string"
} },
"default": []
}, },
"deny": { "deny": {
"description": "Denied command, which takes priority.", "description": "Denied command, which takes priority.",
"default": [],
"type": "array", "type": "array",
"items": { "items": {
"type": "string" "type": "string"
} },
"default": []
} }
} }
}, },
"Scopes": { "Scopes": {
"description": "An argument for fine grained behavior control of Tauri commands.\n\nIt can be of any serde serializable type and is used to allow or prevent certain actions inside a Tauri command. The configured scope is passed to the command and will be enforced by the command implementation.\n\n## Example\n\n```json { \"allow\": [{ \"path\": \"$HOME/**\" }], \"deny\": [{ \"path\": \"$HOME/secret.txt\" }] } ```", "description": "An argument for fine grained behavior control of Tauri commands.\n\nIt can be of any serde serializable type and is used to allow or prevent certain actions inside a Tauri command.\nThe configured scope is passed to the command and will be enforced by the command implementation.\n\n## Example\n\n```json\n{\n \"allow\": [{ \"path\": \"$HOME/**\" }],\n \"deny\": [{ \"path\": \"$HOME/secret.txt\" }]\n}\n```",
"type": "object", "type": "object",
"properties": { "properties": {
"allow": { "allow": {
@@ -257,96 +264,27 @@
{ {
"description": "MacOS.", "description": "MacOS.",
"type": "string", "type": "string",
"enum": [ "const": "macOS"
"macOS"
]
}, },
{ {
"description": "Windows.", "description": "Windows.",
"type": "string", "type": "string",
"enum": [ "const": "windows"
"windows"
]
}, },
{ {
"description": "Linux.", "description": "Linux.",
"type": "string", "type": "string",
"enum": [ "const": "linux"
"linux"
]
}, },
{ {
"description": "Android.", "description": "Android.",
"type": "string", "type": "string",
"enum": [ "const": "android"
"android"
]
}, },
{ {
"description": "iOS.", "description": "iOS.",
"type": "string", "type": "string",
"enum": [ "const": "iOS"
"iOS"
]
}
]
},
"PermissionKind": {
"type": "string",
"oneOf": [
{
"description": "Enables the get_current command without any pre-configured scope.",
"type": "string",
"const": "allow-get-current",
"markdownDescription": "Enables the get_current command without any pre-configured scope."
},
{
"description": "Denies the get_current command without any pre-configured scope.",
"type": "string",
"const": "deny-get-current",
"markdownDescription": "Denies the get_current command without any pre-configured scope."
},
{
"description": "Enables the is_registered command without any pre-configured scope.",
"type": "string",
"const": "allow-is-registered",
"markdownDescription": "Enables the is_registered command without any pre-configured scope."
},
{
"description": "Denies the is_registered command without any pre-configured scope.",
"type": "string",
"const": "deny-is-registered",
"markdownDescription": "Denies the is_registered command without any pre-configured scope."
},
{
"description": "Enables the register command without any pre-configured scope.",
"type": "string",
"const": "allow-register",
"markdownDescription": "Enables the register command without any pre-configured scope."
},
{
"description": "Denies the register command without any pre-configured scope.",
"type": "string",
"const": "deny-register",
"markdownDescription": "Denies the register command without any pre-configured scope."
},
{
"description": "Enables the unregister command without any pre-configured scope.",
"type": "string",
"const": "allow-unregister",
"markdownDescription": "Enables the unregister command without any pre-configured scope."
},
{
"description": "Denies the unregister command without any pre-configured scope.",
"type": "string",
"const": "deny-unregister",
"markdownDescription": "Denies the unregister command without any pre-configured scope."
},
{
"description": "Allows reading the opened deep link via the get_current command\n#### This default permission set includes:\n\n- `allow-get-current`",
"type": "string",
"const": "default",
"markdownDescription": "Allows reading the opened deep link via the get_current command\n#### This default permission set includes:\n\n- `allow-get-current`"
} }
] ]
} }
+1 -1
View File
@@ -540,7 +540,7 @@ pub fn init<R: Runtime>() -> TauriPlugin<R, Option<config::Config>> {
Ok(()) Ok(())
}) })
.on_event(|_app, _event| { .on_event(|_app, _event| {
#[cfg(any(target_os = "macos", target_os = "ios"))] #[cfg(desktop)]
if let tauri::RunEvent::Opened { urls } = _event { if let tauri::RunEvent::Opened { urls } = _event {
use tauri::Emitter; use tauri::Emitter;
@@ -0,0 +1,5 @@
# Automatically generated - DO NOT EDIT!
"$schema" = "../../schemas/schema.json"
commands = ["open","save","message"]
@@ -1,13 +0,0 @@
# Automatically generated - DO NOT EDIT!
"$schema" = "../../schemas/schema.json"
[[permission]]
identifier = "allow-message"
description = "Enables the message command without any pre-configured scope."
commands.allow = ["message"]
[[permission]]
identifier = "deny-message"
description = "Denies the message command without any pre-configured scope."
commands.deny = ["message"]
@@ -1,13 +0,0 @@
# Automatically generated - DO NOT EDIT!
"$schema" = "../../schemas/schema.json"
[[permission]]
identifier = "allow-open"
description = "Enables the open command without any pre-configured scope."
commands.allow = ["open"]
[[permission]]
identifier = "deny-open"
description = "Denies the open command without any pre-configured scope."
commands.deny = ["open"]
@@ -1,13 +0,0 @@
# Automatically generated - DO NOT EDIT!
"$schema" = "../../schemas/schema.json"
[[permission]]
identifier = "allow-save"
description = "Enables the save command without any pre-configured scope."
commands.allow = ["save"]
[[permission]]
identifier = "deny-save"
description = "Denies the save command without any pre-configured scope."
commands.deny = ["save"]
+37 -111
View File
@@ -24,10 +24,17 @@
}, },
"permission": { "permission": {
"description": "A list of inlined permissions", "description": "A list of inlined permissions",
"default": [],
"type": "array", "type": "array",
"items": { "items": {
"$ref": "#/definitions/Permission" "$ref": "#/definitions/Permission"
},
"default": []
},
"commands": {
"description": "A list of command names that get `allow-$command` and `deny-$command` permissions\nautogenerated on demand instead of being stored as explicit permissions.\n\nSee [`Manifest::command_permission`] and the ACL resolver for how these are expanded.",
"type": "array",
"items": {
"type": "string"
} }
} }
}, },
@@ -35,9 +42,6 @@
"DefaultPermission": { "DefaultPermission": {
"description": "The default permission set of the plugin.\n\nWorks similarly to a permission with the \"default\" identifier.", "description": "The default permission set of the plugin.\n\nWorks similarly to a permission with the \"default\" identifier.",
"type": "object", "type": "object",
"required": [
"permissions"
],
"properties": { "properties": {
"version": { "version": {
"description": "The version of the permission.", "description": "The version of the permission.",
@@ -46,10 +50,10 @@
"null" "null"
], ],
"format": "uint64", "format": "uint64",
"minimum": 1.0 "minimum": 1
}, },
"description": { "description": {
"description": "Human-readable description of what the permission does. Tauri convention is to use `<h4>` headings in markdown content for Tauri documentation generation purposes.", "description": "Human-readable description of what the permission does.\nTauri convention is to use `<h4>` headings in markdown content\nfor Tauri documentation generation purposes.",
"type": [ "type": [
"string", "string",
"null" "null"
@@ -62,16 +66,14 @@
"type": "string" "type": "string"
} }
} }
} },
"required": [
"permissions"
]
}, },
"PermissionSet": { "PermissionSet": {
"description": "A set of direct permissions grouped together under a new name.", "description": "A set of direct permissions grouped together under a new name.",
"type": "object", "type": "object",
"required": [
"description",
"identifier",
"permissions"
],
"properties": { "properties": {
"identifier": { "identifier": {
"description": "A unique identifier for the permission.", "description": "A unique identifier for the permission.",
@@ -85,17 +87,19 @@
"description": "All permissions this set contains.", "description": "All permissions this set contains.",
"type": "array", "type": "array",
"items": { "items": {
"$ref": "#/definitions/PermissionKind" "type": "string"
} }
} }
} },
"required": [
"identifier",
"description",
"permissions"
]
}, },
"Permission": { "Permission": {
"description": "Descriptions of explicit privileges of commands.\n\nIt can enable commands to be accessible in the frontend of the application.\n\nIf the scope is defined it can be used to fine grain control the access of individual or multiple commands.", "description": "Descriptions of explicit privileges of commands.\n\nIt can enable commands to be accessible in the frontend of the application.\n\nIf the scope is defined it can be used to fine grain control the access of individual or multiple commands.",
"type": "object", "type": "object",
"required": [
"identifier"
],
"properties": { "properties": {
"version": { "version": {
"description": "The version of the permission.", "description": "The version of the permission.",
@@ -104,14 +108,14 @@
"null" "null"
], ],
"format": "uint64", "format": "uint64",
"minimum": 1.0 "minimum": 1
}, },
"identifier": { "identifier": {
"description": "A unique identifier for the permission.", "description": "A unique identifier for the permission.",
"type": "string" "type": "string"
}, },
"description": { "description": {
"description": "Human-readable description of what the permission does. Tauri internal convention is to use `<h4>` headings in markdown content for Tauri documentation generation purposes.", "description": "Human-readable description of what the permission does.\nTauri internal convention is to use `<h4>` headings in markdown content\nfor Tauri documentation generation purposes.",
"type": [ "type": [
"string", "string",
"null" "null"
@@ -147,7 +151,10 @@
"$ref": "#/definitions/Target" "$ref": "#/definitions/Target"
} }
} }
} },
"required": [
"identifier"
]
}, },
"Commands": { "Commands": {
"description": "Allowed and denied commands inside a permission.\n\nIf two commands clash inside of `allow` and `deny`, it should be denied by default.", "description": "Allowed and denied commands inside a permission.\n\nIf two commands clash inside of `allow` and `deny`, it should be denied by default.",
@@ -155,24 +162,24 @@
"properties": { "properties": {
"allow": { "allow": {
"description": "Allowed command.", "description": "Allowed command.",
"default": [],
"type": "array", "type": "array",
"items": { "items": {
"type": "string" "type": "string"
} },
"default": []
}, },
"deny": { "deny": {
"description": "Denied command, which takes priority.", "description": "Denied command, which takes priority.",
"default": [],
"type": "array", "type": "array",
"items": { "items": {
"type": "string" "type": "string"
} },
"default": []
} }
} }
}, },
"Scopes": { "Scopes": {
"description": "An argument for fine grained behavior control of Tauri commands.\n\nIt can be of any serde serializable type and is used to allow or prevent certain actions inside a Tauri command. The configured scope is passed to the command and will be enforced by the command implementation.\n\n## Example\n\n```json { \"allow\": [{ \"path\": \"$HOME/**\" }], \"deny\": [{ \"path\": \"$HOME/secret.txt\" }] } ```", "description": "An argument for fine grained behavior control of Tauri commands.\n\nIt can be of any serde serializable type and is used to allow or prevent certain actions inside a Tauri command.\nThe configured scope is passed to the command and will be enforced by the command implementation.\n\n## Example\n\n```json\n{\n \"allow\": [{ \"path\": \"$HOME/**\" }],\n \"deny\": [{ \"path\": \"$HOME/secret.txt\" }]\n}\n```",
"type": "object", "type": "object",
"properties": { "properties": {
"allow": { "allow": {
@@ -257,108 +264,27 @@
{ {
"description": "MacOS.", "description": "MacOS.",
"type": "string", "type": "string",
"enum": [ "const": "macOS"
"macOS"
]
}, },
{ {
"description": "Windows.", "description": "Windows.",
"type": "string", "type": "string",
"enum": [ "const": "windows"
"windows"
]
}, },
{ {
"description": "Linux.", "description": "Linux.",
"type": "string", "type": "string",
"enum": [ "const": "linux"
"linux"
]
}, },
{ {
"description": "Android.", "description": "Android.",
"type": "string", "type": "string",
"enum": [ "const": "android"
"android"
]
}, },
{ {
"description": "iOS.", "description": "iOS.",
"type": "string", "type": "string",
"enum": [ "const": "iOS"
"iOS"
]
}
]
},
"PermissionKind": {
"type": "string",
"oneOf": [
{
"description": "Enables the ask command without any pre-configured scope. (**DEPRECATED**: This is now an alias to `allow-message` and will be removed in v3)",
"type": "string",
"const": "allow-ask",
"markdownDescription": "Enables the ask command without any pre-configured scope. (**DEPRECATED**: This is now an alias to `allow-message` and will be removed in v3)"
},
{
"description": "Denies the ask command without any pre-configured scope. (**DEPRECATED**: This is now an alias to `deny-message` and will be removed in v3)",
"type": "string",
"const": "deny-ask",
"markdownDescription": "Denies the ask command without any pre-configured scope. (**DEPRECATED**: This is now an alias to `deny-message` and will be removed in v3)"
},
{
"description": "Enables the message command without any pre-configured scope.",
"type": "string",
"const": "allow-message",
"markdownDescription": "Enables the message command without any pre-configured scope."
},
{
"description": "Denies the message command without any pre-configured scope.",
"type": "string",
"const": "deny-message",
"markdownDescription": "Denies the message command without any pre-configured scope."
},
{
"description": "Enables the open command without any pre-configured scope.",
"type": "string",
"const": "allow-open",
"markdownDescription": "Enables the open command without any pre-configured scope."
},
{
"description": "Denies the open command without any pre-configured scope.",
"type": "string",
"const": "deny-open",
"markdownDescription": "Denies the open command without any pre-configured scope."
},
{
"description": "Enables the save command without any pre-configured scope.",
"type": "string",
"const": "allow-save",
"markdownDescription": "Enables the save command without any pre-configured scope."
},
{
"description": "Denies the save command without any pre-configured scope.",
"type": "string",
"const": "deny-save",
"markdownDescription": "Denies the save command without any pre-configured scope."
},
{
"description": "Enables the confirm command without any pre-configured scope. (**DEPRECATED**: This is now an alias to `allow-message` and will be removed in v3)",
"type": "string",
"const": "allow-confirm",
"markdownDescription": "Enables the confirm command without any pre-configured scope. (**DEPRECATED**: This is now an alias to `allow-message` and will be removed in v3)"
},
{
"description": "Denies the confirm command without any pre-configured scope. (**DEPRECATED**: This is now an alias to `deny-message` and will be removed in v3)",
"type": "string",
"const": "deny-confirm",
"markdownDescription": "Denies the confirm command without any pre-configured scope. (**DEPRECATED**: This is now an alias to `deny-message` and will be removed in v3)"
},
{
"description": "This permission set configures the types of dialogs\navailable from the dialog plugin.\n\n#### Granted Permissions\n\nAll dialog types are enabled.\n\n\n\n#### This default permission set includes:\n\n- `allow-message`\n- `allow-save`\n- `allow-open`",
"type": "string",
"const": "default",
"markdownDescription": "This permission set configures the types of dialogs\navailable from the dialog plugin.\n\n#### Granted Permissions\n\nAll dialog types are enabled.\n\n\n\n#### This default permission set includes:\n\n- `allow-message`\n- `allow-save`\n- `allow-open`"
} }
] ]
} }
-2
View File
@@ -20,8 +20,6 @@ ios = { level = "partial", notes = "Access is restricted to Application folder b
tauri-plugin = { workspace = true, features = ["build"] } tauri-plugin = { workspace = true, features = ["build"] }
schemars = { workspace = true } schemars = { workspace = true }
serde = { workspace = true } serde = { workspace = true }
toml = "1.0"
tauri-utils = { workspace = true }
[dependencies] [dependencies]
serde = { workspace = true } serde = { workspace = true }
+36 -85
View File
@@ -7,8 +7,6 @@ use std::{
path::{Path, PathBuf}, path::{Path, PathBuf},
}; };
use tauri_utils::acl::manifest::PermissionFile;
#[path = "src/scope.rs"] #[path = "src/scope.rs"]
#[allow(dead_code)] #[allow(dead_code)]
mod scope; mod scope;
@@ -77,35 +75,35 @@ const BASE_DIR_VARS: &[&str] = &[
"APPCACHE", "APPCACHE",
"APPLOG", "APPLOG",
]; ];
const COMMANDS: &[(&str, &[&str])] = &[ // `write_file` and `read_text_file_lines` allow nested commands, so their permissions are
("mkdir", &[]), // manually authored in `permissions/commands/` instead of being autogenerated from this list.
("create", &[]), const COMMANDS: &[&str] = &[
("copy_file", &[]), "mkdir",
("remove", &[]), "create",
("rename", &[]), "copy_file",
("truncate", &[]), "remove",
("ftruncate", &[]), "rename",
("write", &[]), "truncate",
("write_file", &["open", "write"]), "ftruncate",
("write_text_file", &[]), "write",
("read_dir", &[]), "write_text_file",
("read_file", &[]), "read_dir",
("read", &[]), "read_file",
("open", &[]), "read",
("read_text_file", &[]), "open",
("read_text_file_lines", &["read_text_file_lines_next"]), "read_text_file",
("read_text_file_lines_next", &[]), "read_text_file_lines_next",
("seek", &[]), "seek",
("stat", &[]), "stat",
("lstat", &[]), "lstat",
("fstat", &[]), "fstat",
("exists", &[]), "exists",
("watch", &[]), "watch",
// TODO: Remove this in v3 // TODO: Remove this in v3
("unwatch", &[]), "unwatch",
("size", &[]), "size",
("start_accessing_security_scoped_resource", &[]), "start_accessing_security_scoped_resource",
("stop_accessing_security_scoped_resource", &[]), "stop_accessing_security_scoped_resource",
]; ];
fn main() { fn main() {
@@ -211,59 +209,12 @@ permissions = [
} }
} }
tauri_plugin::Builder::new( tauri_plugin::Builder::new(COMMANDS)
&COMMANDS .global_api_script_path("./api-iife.js")
.iter() .global_scope_schema(
// FIXME: https://docs.rs/crate/tauri-plugin-fs/2.1.0/builds/1571296 schemars::SchemaGenerator::new(schemars::generate::SchemaSettings::draft07())
.filter(|c| c.1.is_empty()) .into_root_schema_for::<FsScopeEntry>(),
.map(|c| c.0) )
.collect::<Vec<_>>(), .android_path("android")
) .build();
.global_api_script_path("./api-iife.js")
.global_scope_schema(schemars::schema_for!(FsScopeEntry))
.android_path("android")
.build();
// workaround to include nested permissions as `tauri_plugin` doesn't support it
let permissions_dir = autogenerated.join("commands");
for (command, nested_commands) in COMMANDS {
if nested_commands.is_empty() {
continue;
}
let permission_path = permissions_dir.join(format!("{command}.toml"));
let content = std::fs::read_to_string(&permission_path)
.unwrap_or_else(|_| panic!("failed to read {command}.toml"));
let mut permission_file = toml::from_str::<PermissionFile>(&content)
.unwrap_or_else(|_| panic!("failed to deserialize {command}.toml"));
for p in permission_file
.permission
.iter_mut()
.filter(|p| p.identifier.starts_with("allow"))
{
for c in nested_commands.iter().map(|s| s.to_string()) {
if !p.commands.allow.contains(&c) {
p.commands.allow.push(c);
}
}
}
let out = toml::to_string_pretty(&permission_file)
.unwrap_or_else(|_| panic!("failed to serialize {command}.toml"));
let out = format!(
r#"# Automatically generated - DO NOT EDIT!
"$schema" = "../../schemas/schema.json"
{out}"#
);
if content != out {
std::fs::write(permission_path, out)
.unwrap_or_else(|_| panic!("failed to write {command}.toml"));
}
}
} }
@@ -0,0 +1,5 @@
# Automatically generated - DO NOT EDIT!
"$schema" = "../../schemas/schema.json"
commands = ["mkdir","create","copy_file","remove","rename","truncate","ftruncate","write","write_text_file","read_dir","read_file","read","open","read_text_file","read_text_file_lines_next","seek","stat","lstat","fstat","exists","watch","unwatch","size","start_accessing_security_scoped_resource","stop_accessing_security_scoped_resource"]
@@ -1,13 +0,0 @@
# Automatically generated - DO NOT EDIT!
"$schema" = "../../schemas/schema.json"
[[permission]]
identifier = "allow-copy-file"
description = "Enables the copy_file command without any pre-configured scope."
commands.allow = ["copy_file"]
[[permission]]
identifier = "deny-copy-file"
description = "Denies the copy_file command without any pre-configured scope."
commands.deny = ["copy_file"]
@@ -1,13 +0,0 @@
# Automatically generated - DO NOT EDIT!
"$schema" = "../../schemas/schema.json"
[[permission]]
identifier = "allow-create"
description = "Enables the create command without any pre-configured scope."
commands.allow = ["create"]
[[permission]]
identifier = "deny-create"
description = "Denies the create command without any pre-configured scope."
commands.deny = ["create"]
@@ -1,13 +0,0 @@
# Automatically generated - DO NOT EDIT!
"$schema" = "../../schemas/schema.json"
[[permission]]
identifier = "allow-exists"
description = "Enables the exists command without any pre-configured scope."
commands.allow = ["exists"]
[[permission]]
identifier = "deny-exists"
description = "Denies the exists command without any pre-configured scope."
commands.deny = ["exists"]
@@ -1,13 +0,0 @@
# Automatically generated - DO NOT EDIT!
"$schema" = "../../schemas/schema.json"
[[permission]]
identifier = "allow-fstat"
description = "Enables the fstat command without any pre-configured scope."
commands.allow = ["fstat"]
[[permission]]
identifier = "deny-fstat"
description = "Denies the fstat command without any pre-configured scope."
commands.deny = ["fstat"]
@@ -1,13 +0,0 @@
# Automatically generated - DO NOT EDIT!
"$schema" = "../../schemas/schema.json"
[[permission]]
identifier = "allow-ftruncate"
description = "Enables the ftruncate command without any pre-configured scope."
commands.allow = ["ftruncate"]
[[permission]]
identifier = "deny-ftruncate"
description = "Denies the ftruncate command without any pre-configured scope."
commands.deny = ["ftruncate"]
@@ -1,13 +0,0 @@
# Automatically generated - DO NOT EDIT!
"$schema" = "../../schemas/schema.json"
[[permission]]
identifier = "allow-lstat"
description = "Enables the lstat command without any pre-configured scope."
commands.allow = ["lstat"]
[[permission]]
identifier = "deny-lstat"
description = "Denies the lstat command without any pre-configured scope."
commands.deny = ["lstat"]
@@ -1,13 +0,0 @@
# Automatically generated - DO NOT EDIT!
"$schema" = "../../schemas/schema.json"
[[permission]]
identifier = "allow-mkdir"
description = "Enables the mkdir command without any pre-configured scope."
commands.allow = ["mkdir"]
[[permission]]
identifier = "deny-mkdir"
description = "Denies the mkdir command without any pre-configured scope."
commands.deny = ["mkdir"]
@@ -1,13 +0,0 @@
# Automatically generated - DO NOT EDIT!
"$schema" = "../../schemas/schema.json"
[[permission]]
identifier = "allow-open"
description = "Enables the open command without any pre-configured scope."
commands.allow = ["open"]
[[permission]]
identifier = "deny-open"
description = "Denies the open command without any pre-configured scope."
commands.deny = ["open"]
@@ -1,13 +0,0 @@
# Automatically generated - DO NOT EDIT!
"$schema" = "../../schemas/schema.json"
[[permission]]
identifier = "allow-read"
description = "Enables the read command without any pre-configured scope."
commands.allow = ["read"]
[[permission]]
identifier = "deny-read"
description = "Denies the read command without any pre-configured scope."
commands.deny = ["read"]
@@ -1,13 +0,0 @@
# Automatically generated - DO NOT EDIT!
"$schema" = "../../schemas/schema.json"
[[permission]]
identifier = "allow-read-dir"
description = "Enables the read_dir command without any pre-configured scope."
commands.allow = ["read_dir"]
[[permission]]
identifier = "deny-read-dir"
description = "Denies the read_dir command without any pre-configured scope."
commands.deny = ["read_dir"]
@@ -1,13 +0,0 @@
# Automatically generated - DO NOT EDIT!
"$schema" = "../../schemas/schema.json"
[[permission]]
identifier = "allow-read-file"
description = "Enables the read_file command without any pre-configured scope."
commands.allow = ["read_file"]
[[permission]]
identifier = "deny-read-file"
description = "Denies the read_file command without any pre-configured scope."
commands.deny = ["read_file"]
@@ -1,13 +0,0 @@
# Automatically generated - DO NOT EDIT!
"$schema" = "../../schemas/schema.json"
[[permission]]
identifier = "allow-read-text-file"
description = "Enables the read_text_file command without any pre-configured scope."
commands.allow = ["read_text_file"]
[[permission]]
identifier = "deny-read-text-file"
description = "Denies the read_text_file command without any pre-configured scope."
commands.deny = ["read_text_file"]
@@ -1,22 +0,0 @@
# Automatically generated - DO NOT EDIT!
"$schema" = "../../schemas/schema.json"
[[permission]]
identifier = "allow-read-text-file-lines"
description = "Enables the read_text_file_lines command without any pre-configured scope."
[permission.commands]
allow = [
"read_text_file_lines",
"read_text_file_lines_next",
]
deny = []
[[permission]]
identifier = "deny-read-text-file-lines"
description = "Denies the read_text_file_lines command without any pre-configured scope."
[permission.commands]
allow = []
deny = ["read_text_file_lines"]
@@ -1,13 +0,0 @@
# Automatically generated - DO NOT EDIT!
"$schema" = "../../schemas/schema.json"
[[permission]]
identifier = "allow-read-text-file-lines-next"
description = "Enables the read_text_file_lines_next command without any pre-configured scope."
commands.allow = ["read_text_file_lines_next"]
[[permission]]
identifier = "deny-read-text-file-lines-next"
description = "Denies the read_text_file_lines_next command without any pre-configured scope."
commands.deny = ["read_text_file_lines_next"]
@@ -1,13 +0,0 @@
# Automatically generated - DO NOT EDIT!
"$schema" = "../../schemas/schema.json"
[[permission]]
identifier = "allow-remove"
description = "Enables the remove command without any pre-configured scope."
commands.allow = ["remove"]
[[permission]]
identifier = "deny-remove"
description = "Denies the remove command without any pre-configured scope."
commands.deny = ["remove"]
@@ -1,13 +0,0 @@
# Automatically generated - DO NOT EDIT!
"$schema" = "../../schemas/schema.json"
[[permission]]
identifier = "allow-rename"
description = "Enables the rename command without any pre-configured scope."
commands.allow = ["rename"]
[[permission]]
identifier = "deny-rename"
description = "Denies the rename command without any pre-configured scope."
commands.deny = ["rename"]
@@ -1,13 +0,0 @@
# Automatically generated - DO NOT EDIT!
"$schema" = "../../schemas/schema.json"
[[permission]]
identifier = "allow-seek"
description = "Enables the seek command without any pre-configured scope."
commands.allow = ["seek"]
[[permission]]
identifier = "deny-seek"
description = "Denies the seek command without any pre-configured scope."
commands.deny = ["seek"]
@@ -1,13 +0,0 @@
# Automatically generated - DO NOT EDIT!
"$schema" = "../../schemas/schema.json"
[[permission]]
identifier = "allow-size"
description = "Enables the size command without any pre-configured scope."
commands.allow = ["size"]
[[permission]]
identifier = "deny-size"
description = "Denies the size command without any pre-configured scope."
commands.deny = ["size"]
@@ -1,13 +0,0 @@
# Automatically generated - DO NOT EDIT!
"$schema" = "../../schemas/schema.json"
[[permission]]
identifier = "allow-start-accessing-security-scoped-resource"
description = "Enables the start_accessing_security_scoped_resource command without any pre-configured scope."
commands.allow = ["start_accessing_security_scoped_resource"]
[[permission]]
identifier = "deny-start-accessing-security-scoped-resource"
description = "Denies the start_accessing_security_scoped_resource command without any pre-configured scope."
commands.deny = ["start_accessing_security_scoped_resource"]
@@ -1,13 +0,0 @@
# Automatically generated - DO NOT EDIT!
"$schema" = "../../schemas/schema.json"
[[permission]]
identifier = "allow-stat"
description = "Enables the stat command without any pre-configured scope."
commands.allow = ["stat"]
[[permission]]
identifier = "deny-stat"
description = "Denies the stat command without any pre-configured scope."
commands.deny = ["stat"]
@@ -1,13 +0,0 @@
# Automatically generated - DO NOT EDIT!
"$schema" = "../../schemas/schema.json"
[[permission]]
identifier = "allow-stop-accessing-security-scoped-resource"
description = "Enables the stop_accessing_security_scoped_resource command without any pre-configured scope."
commands.allow = ["stop_accessing_security_scoped_resource"]
[[permission]]
identifier = "deny-stop-accessing-security-scoped-resource"
description = "Denies the stop_accessing_security_scoped_resource command without any pre-configured scope."
commands.deny = ["stop_accessing_security_scoped_resource"]
@@ -1,13 +0,0 @@
# Automatically generated - DO NOT EDIT!
"$schema" = "../../schemas/schema.json"
[[permission]]
identifier = "allow-truncate"
description = "Enables the truncate command without any pre-configured scope."
commands.allow = ["truncate"]
[[permission]]
identifier = "deny-truncate"
description = "Denies the truncate command without any pre-configured scope."
commands.deny = ["truncate"]
@@ -1,13 +0,0 @@
# Automatically generated - DO NOT EDIT!
"$schema" = "../../schemas/schema.json"
[[permission]]
identifier = "allow-unwatch"
description = "Enables the unwatch command without any pre-configured scope."
commands.allow = ["unwatch"]
[[permission]]
identifier = "deny-unwatch"
description = "Denies the unwatch command without any pre-configured scope."
commands.deny = ["unwatch"]
@@ -1,13 +0,0 @@
# Automatically generated - DO NOT EDIT!
"$schema" = "../../schemas/schema.json"
[[permission]]
identifier = "allow-watch"
description = "Enables the watch command without any pre-configured scope."
commands.allow = ["watch"]
[[permission]]
identifier = "deny-watch"
description = "Denies the watch command without any pre-configured scope."
commands.deny = ["watch"]
@@ -1,13 +0,0 @@
# Automatically generated - DO NOT EDIT!
"$schema" = "../../schemas/schema.json"
[[permission]]
identifier = "allow-write"
description = "Enables the write command without any pre-configured scope."
commands.allow = ["write"]
[[permission]]
identifier = "deny-write"
description = "Denies the write command without any pre-configured scope."
commands.deny = ["write"]
@@ -1,23 +0,0 @@
# Automatically generated - DO NOT EDIT!
"$schema" = "../../schemas/schema.json"
[[permission]]
identifier = "allow-write-file"
description = "Enables the write_file command without any pre-configured scope."
[permission.commands]
allow = [
"write_file",
"open",
"write",
]
deny = []
[[permission]]
identifier = "deny-write-file"
description = "Denies the write_file command without any pre-configured scope."
[permission.commands]
allow = []
deny = ["write_file"]
@@ -1,13 +0,0 @@
# Automatically generated - DO NOT EDIT!
"$schema" = "../../schemas/schema.json"
[[permission]]
identifier = "allow-write-text-file"
description = "Enables the write_text_file command without any pre-configured scope."
commands.allow = ["write_text_file"]
[[permission]]
identifier = "deny-write-text-file"
description = "Denies the write_text_file command without any pre-configured scope."
commands.deny = ["write_text_file"]
@@ -3279,32 +3279,6 @@ Denies the read_text_file command without any pre-configured scope.
<tr> <tr>
<td> <td>
`fs:allow-read-text-file-lines`
</td>
<td>
Enables the read_text_file_lines command without any pre-configured scope.
</td>
</tr>
<tr>
<td>
`fs:deny-read-text-file-lines`
</td>
<td>
Denies the read_text_file_lines command without any pre-configured scope.
</td>
</tr>
<tr>
<td>
`fs:allow-read-text-file-lines-next` `fs:allow-read-text-file-lines-next`
</td> </td>
@@ -3617,32 +3591,6 @@ Denies the write command without any pre-configured scope.
<tr> <tr>
<td> <td>
`fs:allow-write-file`
</td>
<td>
Enables the write_file command without any pre-configured scope.
</td>
</tr>
<tr>
<td>
`fs:deny-write-file`
</td>
<td>
Denies the write_file command without any pre-configured scope.
</td>
</tr>
<tr>
<td>
`fs:allow-write-text-file` `fs:allow-write-text-file`
</td> </td>
@@ -3669,6 +3617,58 @@ Denies the write_text_file command without any pre-configured scope.
<tr> <tr>
<td> <td>
`fs:allow-read-text-file-lines`
</td>
<td>
Enables the read_text_file_lines command without any pre-configured scope.
</td>
</tr>
<tr>
<td>
`fs:deny-read-text-file-lines`
</td>
<td>
Denies the read_text_file_lines command without any pre-configured scope.
</td>
</tr>
<tr>
<td>
`fs:allow-write-file`
</td>
<td>
Enables the write_file command without any pre-configured scope.
</td>
</tr>
<tr>
<td>
`fs:deny-write-file`
</td>
<td>
Denies the write_file command without any pre-configured scope.
</td>
</tr>
<tr>
<td>
`fs:create-app-specific-dirs` `fs:create-app-specific-dirs`
</td> </td>
@@ -0,0 +1,17 @@
"$schema" = "../schemas/schema.json"
# This command allows nested commands, so its permissions are manually
# authored here instead of being autogenerated from the `COMMANDS` list in `build.rs`.
[[permission]]
identifier = "allow-read-text-file-lines"
description = "Enables the read_text_file_lines command without any pre-configured scope."
commands.allow = [
"read_text_file_lines",
"read_text_file_lines_next",
]
[[permission]]
identifier = "deny-read-text-file-lines"
description = "Denies the read_text_file_lines command without any pre-configured scope."
commands.deny = ["read_text_file_lines"]
@@ -0,0 +1,18 @@
"$schema" = "../schemas/schema.json"
# This command allows nested commands, so its permissions are manually
# authored here instead of being autogenerated from the `COMMANDS` list in `build.rs`.
[[permission]]
identifier = "allow-write-file"
description = "Enables the write_file command without any pre-configured scope."
commands.allow = [
"write_file",
"open",
"write",
]
[[permission]]
identifier = "deny-write-file"
description = "Denies the write_file command without any pre-configured scope."
commands.deny = ["write_file"]
File diff suppressed because it is too large Load Diff
+1 -1
View File
@@ -707,7 +707,7 @@ pub async fn read_text_file_lines_next<R: Runtime>(
let lines = resource_table.get::<StdLinesResource>(rid)?; let lines = resource_table.get::<StdLinesResource>(rid)?;
let ret = StdLinesResource::with_lock(&lines, |lines| -> CommandResult<Vec<u8>> { let ret = StdLinesResource::with_lock(&lines, |lines| -> CommandResult<Vec<u8>> {
// This is an optimization to include whether we finished iteration or not (1 or 0) // This is an optimization to include wether we finished iteration or not (1 or 0)
// at the end of returned vector so we can use `tauri::ipc::Response` // at the end of returned vector so we can use `tauri::ipc::Response`
// and avoid serialization overhead of separate values. // and avoid serialization overhead of separate values.
match lines.next() { match lines.next() {
@@ -1,13 +0,0 @@
# Automatically generated - DO NOT EDIT!
"$schema" = "../../schemas/schema.json"
[[permission]]
identifier = "allow-check-permissions"
description = "Enables the check_permissions command without any pre-configured scope."
commands.allow = ["check_permissions"]
[[permission]]
identifier = "deny-check-permissions"
description = "Denies the check_permissions command without any pre-configured scope."
commands.deny = ["check_permissions"]
@@ -1,13 +0,0 @@
# Automatically generated - DO NOT EDIT!
"$schema" = "../../schemas/schema.json"
[[permission]]
identifier = "allow-clear-permissions"
description = "Enables the clear_permissions command without any pre-configured scope."
commands.allow = ["clear_permissions"]
[[permission]]
identifier = "deny-clear-permissions"
description = "Denies the clear_permissions command without any pre-configured scope."
commands.deny = ["clear_permissions"]
@@ -1,13 +0,0 @@
# Automatically generated - DO NOT EDIT!
"$schema" = "../../schemas/schema.json"
[[permission]]
identifier = "allow-clear-watch"
description = "Enables the clear_watch command without any pre-configured scope."
commands.allow = ["clear_watch"]
[[permission]]
identifier = "deny-clear-watch"
description = "Denies the clear_watch command without any pre-configured scope."
commands.deny = ["clear_watch"]
@@ -0,0 +1,5 @@
# Automatically generated - DO NOT EDIT!
"$schema" = "../../schemas/schema.json"
commands = ["get_current_position","watch_position","clear_watch","check_permissions","request_permissions"]
@@ -1,13 +0,0 @@
# Automatically generated - DO NOT EDIT!
"$schema" = "../../schemas/schema.json"
[[permission]]
identifier = "allow-get-current-position"
description = "Enables the get_current_position command without any pre-configured scope."
commands.allow = ["get_current_position"]
[[permission]]
identifier = "deny-get-current-position"
description = "Denies the get_current_position command without any pre-configured scope."
commands.deny = ["get_current_position"]
@@ -1,13 +0,0 @@
# Automatically generated - DO NOT EDIT!
"$schema" = "../../schemas/schema.json"
[[permission]]
identifier = "allow-request-permissions"
description = "Enables the request_permissions command without any pre-configured scope."
commands.allow = ["request_permissions"]
[[permission]]
identifier = "deny-request-permissions"
description = "Denies the request_permissions command without any pre-configured scope."
commands.deny = ["request_permissions"]
@@ -1,13 +0,0 @@
# Automatically generated - DO NOT EDIT!
"$schema" = "../../schemas/schema.json"
[[permission]]
identifier = "allow-watch-position"
description = "Enables the watch_position command without any pre-configured scope."
commands.allow = ["watch_position"]
[[permission]]
identifier = "deny-watch-position"
description = "Denies the watch_position command without any pre-configured scope."
commands.deny = ["watch_position"]
@@ -36,32 +36,6 @@ Denies the check_permissions command without any pre-configured scope.
<tr> <tr>
<td> <td>
`geolocation:allow-clear-permissions`
</td>
<td>
Enables the clear_permissions command without any pre-configured scope.
</td>
</tr>
<tr>
<td>
`geolocation:deny-clear-permissions`
</td>
<td>
Denies the clear_permissions command without any pre-configured scope.
</td>
</tr>
<tr>
<td>
`geolocation:allow-clear-watch` `geolocation:allow-clear-watch`
</td> </td>
@@ -24,10 +24,17 @@
}, },
"permission": { "permission": {
"description": "A list of inlined permissions", "description": "A list of inlined permissions",
"default": [],
"type": "array", "type": "array",
"items": { "items": {
"$ref": "#/definitions/Permission" "$ref": "#/definitions/Permission"
},
"default": []
},
"commands": {
"description": "A list of command names that get `allow-$command` and `deny-$command` permissions\nautogenerated on demand instead of being stored as explicit permissions.\n\nSee [`Manifest::command_permission`] and the ACL resolver for how these are expanded.",
"type": "array",
"items": {
"type": "string"
} }
} }
}, },
@@ -35,9 +42,6 @@
"DefaultPermission": { "DefaultPermission": {
"description": "The default permission set of the plugin.\n\nWorks similarly to a permission with the \"default\" identifier.", "description": "The default permission set of the plugin.\n\nWorks similarly to a permission with the \"default\" identifier.",
"type": "object", "type": "object",
"required": [
"permissions"
],
"properties": { "properties": {
"version": { "version": {
"description": "The version of the permission.", "description": "The version of the permission.",
@@ -46,10 +50,10 @@
"null" "null"
], ],
"format": "uint64", "format": "uint64",
"minimum": 1.0 "minimum": 1
}, },
"description": { "description": {
"description": "Human-readable description of what the permission does. Tauri convention is to use `<h4>` headings in markdown content for Tauri documentation generation purposes.", "description": "Human-readable description of what the permission does.\nTauri convention is to use `<h4>` headings in markdown content\nfor Tauri documentation generation purposes.",
"type": [ "type": [
"string", "string",
"null" "null"
@@ -62,16 +66,14 @@
"type": "string" "type": "string"
} }
} }
} },
"required": [
"permissions"
]
}, },
"PermissionSet": { "PermissionSet": {
"description": "A set of direct permissions grouped together under a new name.", "description": "A set of direct permissions grouped together under a new name.",
"type": "object", "type": "object",
"required": [
"description",
"identifier",
"permissions"
],
"properties": { "properties": {
"identifier": { "identifier": {
"description": "A unique identifier for the permission.", "description": "A unique identifier for the permission.",
@@ -85,17 +87,19 @@
"description": "All permissions this set contains.", "description": "All permissions this set contains.",
"type": "array", "type": "array",
"items": { "items": {
"$ref": "#/definitions/PermissionKind" "type": "string"
} }
} }
} },
"required": [
"identifier",
"description",
"permissions"
]
}, },
"Permission": { "Permission": {
"description": "Descriptions of explicit privileges of commands.\n\nIt can enable commands to be accessible in the frontend of the application.\n\nIf the scope is defined it can be used to fine grain control the access of individual or multiple commands.", "description": "Descriptions of explicit privileges of commands.\n\nIt can enable commands to be accessible in the frontend of the application.\n\nIf the scope is defined it can be used to fine grain control the access of individual or multiple commands.",
"type": "object", "type": "object",
"required": [
"identifier"
],
"properties": { "properties": {
"version": { "version": {
"description": "The version of the permission.", "description": "The version of the permission.",
@@ -104,14 +108,14 @@
"null" "null"
], ],
"format": "uint64", "format": "uint64",
"minimum": 1.0 "minimum": 1
}, },
"identifier": { "identifier": {
"description": "A unique identifier for the permission.", "description": "A unique identifier for the permission.",
"type": "string" "type": "string"
}, },
"description": { "description": {
"description": "Human-readable description of what the permission does. Tauri internal convention is to use `<h4>` headings in markdown content for Tauri documentation generation purposes.", "description": "Human-readable description of what the permission does.\nTauri internal convention is to use `<h4>` headings in markdown content\nfor Tauri documentation generation purposes.",
"type": [ "type": [
"string", "string",
"null" "null"
@@ -147,7 +151,10 @@
"$ref": "#/definitions/Target" "$ref": "#/definitions/Target"
} }
} }
} },
"required": [
"identifier"
]
}, },
"Commands": { "Commands": {
"description": "Allowed and denied commands inside a permission.\n\nIf two commands clash inside of `allow` and `deny`, it should be denied by default.", "description": "Allowed and denied commands inside a permission.\n\nIf two commands clash inside of `allow` and `deny`, it should be denied by default.",
@@ -155,24 +162,24 @@
"properties": { "properties": {
"allow": { "allow": {
"description": "Allowed command.", "description": "Allowed command.",
"default": [],
"type": "array", "type": "array",
"items": { "items": {
"type": "string" "type": "string"
} },
"default": []
}, },
"deny": { "deny": {
"description": "Denied command, which takes priority.", "description": "Denied command, which takes priority.",
"default": [],
"type": "array", "type": "array",
"items": { "items": {
"type": "string" "type": "string"
} },
"default": []
} }
} }
}, },
"Scopes": { "Scopes": {
"description": "An argument for fine grained behavior control of Tauri commands.\n\nIt can be of any serde serializable type and is used to allow or prevent certain actions inside a Tauri command. The configured scope is passed to the command and will be enforced by the command implementation.\n\n## Example\n\n```json { \"allow\": [{ \"path\": \"$HOME/**\" }], \"deny\": [{ \"path\": \"$HOME/secret.txt\" }] } ```", "description": "An argument for fine grained behavior control of Tauri commands.\n\nIt can be of any serde serializable type and is used to allow or prevent certain actions inside a Tauri command.\nThe configured scope is passed to the command and will be enforced by the command implementation.\n\n## Example\n\n```json\n{\n \"allow\": [{ \"path\": \"$HOME/**\" }],\n \"deny\": [{ \"path\": \"$HOME/secret.txt\" }]\n}\n```",
"type": "object", "type": "object",
"properties": { "properties": {
"allow": { "allow": {
@@ -257,114 +264,27 @@
{ {
"description": "MacOS.", "description": "MacOS.",
"type": "string", "type": "string",
"enum": [ "const": "macOS"
"macOS"
]
}, },
{ {
"description": "Windows.", "description": "Windows.",
"type": "string", "type": "string",
"enum": [ "const": "windows"
"windows"
]
}, },
{ {
"description": "Linux.", "description": "Linux.",
"type": "string", "type": "string",
"enum": [ "const": "linux"
"linux"
]
}, },
{ {
"description": "Android.", "description": "Android.",
"type": "string", "type": "string",
"enum": [ "const": "android"
"android"
]
}, },
{ {
"description": "iOS.", "description": "iOS.",
"type": "string", "type": "string",
"enum": [ "const": "iOS"
"iOS"
]
}
]
},
"PermissionKind": {
"type": "string",
"oneOf": [
{
"description": "Enables the check_permissions command without any pre-configured scope.",
"type": "string",
"const": "allow-check-permissions",
"markdownDescription": "Enables the check_permissions command without any pre-configured scope."
},
{
"description": "Denies the check_permissions command without any pre-configured scope.",
"type": "string",
"const": "deny-check-permissions",
"markdownDescription": "Denies the check_permissions command without any pre-configured scope."
},
{
"description": "Enables the clear_permissions command without any pre-configured scope.",
"type": "string",
"const": "allow-clear-permissions",
"markdownDescription": "Enables the clear_permissions command without any pre-configured scope."
},
{
"description": "Denies the clear_permissions command without any pre-configured scope.",
"type": "string",
"const": "deny-clear-permissions",
"markdownDescription": "Denies the clear_permissions command without any pre-configured scope."
},
{
"description": "Enables the clear_watch command without any pre-configured scope.",
"type": "string",
"const": "allow-clear-watch",
"markdownDescription": "Enables the clear_watch command without any pre-configured scope."
},
{
"description": "Denies the clear_watch command without any pre-configured scope.",
"type": "string",
"const": "deny-clear-watch",
"markdownDescription": "Denies the clear_watch command without any pre-configured scope."
},
{
"description": "Enables the get_current_position command without any pre-configured scope.",
"type": "string",
"const": "allow-get-current-position",
"markdownDescription": "Enables the get_current_position command without any pre-configured scope."
},
{
"description": "Denies the get_current_position command without any pre-configured scope.",
"type": "string",
"const": "deny-get-current-position",
"markdownDescription": "Denies the get_current_position command without any pre-configured scope."
},
{
"description": "Enables the request_permissions command without any pre-configured scope.",
"type": "string",
"const": "allow-request-permissions",
"markdownDescription": "Enables the request_permissions command without any pre-configured scope."
},
{
"description": "Denies the request_permissions command without any pre-configured scope.",
"type": "string",
"const": "deny-request-permissions",
"markdownDescription": "Denies the request_permissions command without any pre-configured scope."
},
{
"description": "Enables the watch_position command without any pre-configured scope.",
"type": "string",
"const": "allow-watch-position",
"markdownDescription": "Enables the watch_position command without any pre-configured scope."
},
{
"description": "Denies the watch_position command without any pre-configured scope.",
"type": "string",
"const": "deny-watch-position",
"markdownDescription": "Denies the watch_position command without any pre-configured scope."
} }
] ]
} }

Some files were not shown because too many files have changed in this diff Show More